syntax = "proto3"; package artifact.v1alpha; // Google API import "google/api/field_behavior.proto"; import "google/api/resource.proto"; // Protocol Buffers Well-Known Types import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; // System Management Messages // System represents a system configuration for Knowledge Base System. // The system defines how knowledge bases are created and configured based on // the RAG system settings, including: // - AI model family (e.g., "openai", "gemini") // - RAG algorithms and methods // - Embedding vector dimensionality // - Chunking strategies // - Other system-wide configurations // // Systems are global resources managed by administrators to provide // consistent configurations across knowledge bases. // // Field ordering follows AIP standard: name(1), id(2), display_name(3), // slug(4), aliases(5), description(6) message System { option (google.api.resource) = { type: "api.instill.tech/System" pattern: "systems/{system}" }; // ===== Standard AIP fields 1-6 (ALL resources must follow this order) ===== // Field 1: Canonical resource name. // Format: `systems/{system.id}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 2: Immutable canonical resource ID (80-96 bits entropy, base62). // Format: `sys-{base62_hash}` (e.g., "sys-8f3a2k9e7c1") // This is the last segment of the `name` field. string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 3: Human-readable display name for UI. // Example: "OpenAI", "Gemini", "Default" string display_name = 3 [(google.api.field_behavior) = REQUIRED]; // Field 4: URL-friendly slug (no prefix). // Generated from display_name, used for human-friendly URLs. // Example: "openai", "gemini", "default" string slug = 4 [(google.api.field_behavior) = OPTIONAL]; // Field 5: Previous slugs for backward compatibility. // When display_name changes, old slug is stored here. repeated string aliases = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 6: Optional description. optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; // ===== Timestamps (common to all resources) ===== // Field 7: System creation time. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 8: System update time. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // ===== Resource-specific fields start from field 9+ ===== // Complete system configuration as structured JSON. // Contains nested configuration for RAG system components: // - rag.embedding.model_family: AI model family name // - rag.embedding.dimensionality: Vector embedding dimensions // - Additional RAG-related settings google.protobuf.Struct config = 9 [(google.api.field_behavior) = REQUIRED]; // Indicates if this is the default system configuration used when creating // new knowledge bases. Only one system can be default at a time. bool is_default = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // System delete time (for soft delete). optional google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetSystemAdminRequest (admin only) message GetSystemAdminRequest { // The resource name of the system to retrieve. // Format: `systems/{system}` // If not specified, returns the default system. string name = 1 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = {type: "api.instill.tech/System"} ]; } // GetSystemAdminResponse (admin only) message GetSystemAdminResponse { // The requested system System system = 1; } // CreateSystemAdminRequest (admin only) message CreateSystemAdminRequest { // The system to create System system = 1; } // CreateSystemAdminResponse (admin only) message CreateSystemAdminResponse { // The created system System system = 1; } // UpdateSystemAdminRequest (admin only) message UpdateSystemAdminRequest { // The system fields to update. System system = 1; // The update mask specifies the subset of fields that should be modified. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } // UpdateSystemAdminResponse (admin only) message UpdateSystemAdminResponse { // The updated system System system = 1; } // ListSystemsAdminRequest (admin only) message ListSystemsAdminRequest { // Empty - lists all systems } // ListSystemsAdminResponse (admin only) message ListSystemsAdminResponse { // List of all systems repeated System systems = 1; } // DeleteSystemAdminRequest (admin only) message DeleteSystemAdminRequest { // The resource name of the system to delete. // Format: `systems/{system}` // The default system cannot be deleted. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = {type: "api.instill.tech/System"} ]; } // DeleteSystemAdminResponse (admin only) message DeleteSystemAdminResponse { // Whether the deletion was successful bool success = 1; // Status message string message = 2; } // RenameSystemAdminRequest (admin only) // Updates the display name of a system configuration. // Note: The canonical ID (sys-xxx) is immutable. Only display_name and slug // change. message RenameSystemAdminRequest { // The resource name of the system to rename. // Format: `systems/{system}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = {type: "api.instill.tech/System"} ]; // The new display name. A new slug will be generated from this. // The old slug will be added to aliases for backward compatibility. string new_display_name = 2 [(google.api.field_behavior) = REQUIRED]; } // RenameSystemAdminResponse (admin only) message RenameSystemAdminResponse { // The updated system resource with new display_name and slug. System system = 1; } // SetDefaultSystemAdminRequest (admin only) // Sets a system as the default. This will unset any currently default system. message SetDefaultSystemAdminRequest { // The resource name of the system to set as default. // Format: `systems/{system}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = {type: "api.instill.tech/System"} ]; } // SetDefaultSystemAdminResponse (admin only) message SetDefaultSystemAdminResponse { // The updated system that is now the default System system = 1; } // GetDefaultSystemAdminRequest (admin only) // Retrieves the current default system configuration message GetDefaultSystemAdminRequest {} // GetDefaultSystemAdminResponse (admin only) message GetDefaultSystemAdminResponse { // The current default system System system = 1; }