From f1a40d1c5411e3e1ec85d9cdc29d61194bfa0b9c Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 06:02:30 +0000 Subject: [PATCH 01/18] Project import generated by Copybara. FolderOrigin-RevId: b31318e06ac415532fa16ad18652f8fb1fced134 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 294a86e..ecf84ad 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "3acc63c2c655c22b5ca7f2d55b63a6b87eced2bc", + "sourceSha": "b31318e06ac415532fa16ad18652f8fb1fced134", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "f87f5364fd971eefcad133bb02991889e2e8b326", + "priorProjectedBase": "84f570f8fa6a22ffc3c9140345af1cda0e412a82", "definitionDigest": "1b99f898b612f6adeb8261ebea5314f7e78f0d41d4667ce98cb9bb94155369f4", "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", "contentDigest": "61ee43f5ee663f7e545546713e03c35b551e3c97dab8b6f5f60cc1eb51a5a179", From a1d7c14fc01de5fe3dda36e946978f27c78252ca Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 16:01:57 +0000 Subject: [PATCH 02/18] Project import generated by Copybara. FolderOrigin-RevId: 9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78 --- .repository-projection.json | 4 +- openapi/connectors/v1/connectors.openapi.yaml | 158 ++++++++++++++++++ proto/connectors/v1/connectors.proto | 61 +++++++ 3 files changed, 221 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index ecf84ad..9759165 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "b31318e06ac415532fa16ad18652f8fb1fced134", + "sourceSha": "9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78", "destinationRepository": "dx-corp/api", "priorProjectedBase": "84f570f8fa6a22ffc3c9140345af1cda0e412a82", "definitionDigest": "1b99f898b612f6adeb8261ebea5314f7e78f0d41d4667ce98cb9bb94155369f4", "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", - "contentDigest": "61ee43f5ee663f7e545546713e03c35b551e3c97dab8b6f5f60cc1eb51a5a179", + "contentDigest": "b75a9f3012a18eafa320bc92c27f1844b653fed675b790773e7c37169f59cf18", "publicationEligible": true } diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index 8283412..a219308 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -219,6 +219,46 @@ paths: application/json: schema: $ref: '#/components/schemas/connectors.v1.ListProvidersResponse' + /connectors.v1.ConnectorService/ListProviderPreviews: + post: + tags: + - connectors.v1.ConnectorService + summary: ListProviderPreviews + description: |- + Lists catalog providers that are installed in the active revision but + remain hidden from ListProviders until their generated-canary family + proofs are complete. This surface intentionally omits setup, auth, and + runtime details so callers cannot register an unqualified provider. + operationId: connectors.v1.ConnectorService.ListProviderPreviews + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/connectors.v1.ListProviderPreviewsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/connectors.v1.ListProviderPreviewsResponse' /connectors.v1.ConnectorService/PreviewCustomConnector: post: tags: @@ -1286,6 +1326,13 @@ components: description: |- ProviderInstallationState is the lifecycle state of a provider-issued app installation. Only ACTIVE installations may resolve for event ingress. + connectors.v1.ProviderQualificationState: + type: string + title: ProviderQualificationState + enum: + - PROVIDER_QUALIFICATION_STATE_UNSPECIFIED + - PROVIDER_QUALIFICATION_STATE_PENDING + - PROVIDER_QUALIFICATION_STATE_QUALIFIED connectors.v1.ProviderResourceLifecycleState: type: string title: ProviderResourceLifecycleState @@ -2148,11 +2195,78 @@ components: items: $ref: '#/components/schemas/connectors.v1.ConnectorAuthBinding' title: auth_bindings + tier: + type: string + title: tier + description: |- + tier is derived by the catalog compiler from the executable runtime + shape. It is not an authored readiness or verification claim. + rolloutKind: + type: string + title: rollout_kind + description: |- + rollout_kind controls durable catalog exposure. Machine imports use + generated_canary until every required family has visible proof. + canaryCohortSha256: + type: string + title: canary_cohort_sha256 + description: |- + Immutable source/import cohort used to bind generated-canary proof. + Empty for built-in and tenant-owned custom providers. title: ConnectorProvider additionalProperties: false description: |- ConnectorProvider describes a managed connector provider that can be used to register a connection. + connectors.v1.ConnectorProviderPreview: + type: object + properties: + id: + type: string + title: id + minLength: 1 + displayName: + type: string + title: display_name + catalogCategories: + type: array + items: + type: string + title: catalog_categories + tier: + type: string + title: tier + rolloutKind: + type: string + title: rollout_kind + qualificationState: + title: qualification_state + $ref: '#/components/schemas/connectors.v1.ProviderQualificationState' + resourceFamilyCount: + type: integer + title: resource_family_count + format: int32 + providerActionCount: + type: integer + title: provider_action_count + format: int32 + requiredFamilyCount: + type: integer + title: required_family_count + format: int32 + qualifiedFamilyCount: + type: integer + title: qualified_family_count + format: int32 + customerVisible: + type: boolean + title: customer_visible + title: ConnectorProviderPreview + additionalProperties: false + description: |- + ConnectorProviderPreview is safe discovery metadata for an installed + provider that is not yet customer-visible. It deliberately excludes auth, + endpoint, credential, action, and request-planning fields. connectors.v1.ConnectorQueryParamBinding: type: object properties: @@ -3089,6 +3203,43 @@ components: title: connectors title: ListCustomConnectorsResponse additionalProperties: false + connectors.v1.ListProviderPreviewsRequest: + type: object + properties: + query: + type: string + title: query + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + title: ListProviderPreviewsRequest + additionalProperties: false + connectors.v1.ListProviderPreviewsResponse: + type: object + properties: + previews: + type: array + items: + $ref: '#/components/schemas/connectors.v1.ConnectorProviderPreview' + title: previews + total: + type: integer + title: total + format: int32 + catalogVersion: + type: string + title: catalog_version + visibilitySnapshot: + type: string + title: visibility_snapshot + title: ListProviderPreviewsResponse + additionalProperties: false connectors.v1.ListProvidersRequest: type: object properties: @@ -3124,6 +3275,13 @@ components: catalogVersion: type: string title: catalog_version + visibilitySnapshot: + type: string + title: visibility_snapshot + description: |- + Changes whenever qualification visibility changes inside one catalog + revision. Clients compare this across pages and preview/ready reads and + restart the read when it differs. title: ListProvidersResponse additionalProperties: false connectors.v1.ListSyncSchedulesRequest: diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index 9539529..fa75a44 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -62,6 +62,15 @@ service ConnectorService { option (common.v1.risk_level) = RISK_LEVEL_LOW; } + // Lists catalog providers that are installed in the active revision but + // remain hidden from ListProviders until their generated-canary family + // proofs are complete. This surface intentionally omits setup, auth, and + // runtime details so callers cannot register an unqualified provider. + rpc ListProviderPreviews(ListProviderPreviewsRequest) returns (ListProviderPreviewsResponse) { + option (common.v1.required_scopes) = "connectors:read"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } rpc PreviewCustomConnector(PreviewCustomConnectorRequest) returns (PreviewCustomConnectorResponse) { option (common.v1.required_scopes) = "connectors:write"; option (common.v1.organization_scope_field) = "organization_id"; @@ -710,6 +719,15 @@ message ConnectorProvider { repeated string aliases = 14; ConnectorCatalogProvenance provenance = 15; repeated ConnectorAuthBinding auth_bindings = 16; + // tier is derived by the catalog compiler from the executable runtime + // shape. It is not an authored readiness or verification claim. + string tier = 17; + // rollout_kind controls durable catalog exposure. Machine imports use + // generated_canary until every required family has visible proof. + string rollout_kind = 18; + // Immutable source/import cohort used to bind generated-canary proof. + // Empty for built-in and tenant-owned custom providers. + string canary_cohort_sha256 = 19; } // CustomConnectorActionMetadata is the tenant-editable presentation and @@ -922,6 +940,49 @@ message ListProvidersResponse { repeated ConnectorProvider providers = 1; int32 total = 2 [(buf.validate.field).int32.gte = 0]; string catalog_version = 3; + // Changes whenever qualification visibility changes inside one catalog + // revision. Clients compare this across pages and preview/ready reads and + // restart the read when it differs. + string visibility_snapshot = 4; +} + +enum ProviderQualificationState { + PROVIDER_QUALIFICATION_STATE_UNSPECIFIED = 0; + PROVIDER_QUALIFICATION_STATE_PENDING = 1; + PROVIDER_QUALIFICATION_STATE_QUALIFIED = 2; +} + +message ListProviderPreviewsRequest { + string query = 1; + int32 limit = 2 [(buf.validate.field).int32 = { + gte: 0 + lte: 200 + }]; + int32 offset = 3 [(buf.validate.field).int32.gte = 0]; +} + +// ConnectorProviderPreview is safe discovery metadata for an installed +// provider that is not yet customer-visible. It deliberately excludes auth, +// endpoint, credential, action, and request-planning fields. +message ConnectorProviderPreview { + string id = 1 [(buf.validate.field).string.min_len = 1]; + string display_name = 2; + repeated string catalog_categories = 3; + string tier = 4; + string rollout_kind = 5; + ProviderQualificationState qualification_state = 6 [(buf.validate.field).enum.defined_only = true]; + int32 resource_family_count = 7 [(buf.validate.field).int32.gte = 0]; + int32 provider_action_count = 8 [(buf.validate.field).int32.gte = 0]; + int32 required_family_count = 9 [(buf.validate.field).int32.gte = 0]; + int32 qualified_family_count = 10 [(buf.validate.field).int32.gte = 0]; + bool customer_visible = 11; +} + +message ListProviderPreviewsResponse { + repeated ConnectorProviderPreview previews = 1; + int32 total = 2 [(buf.validate.field).int32.gte = 0]; + string catalog_version = 3; + string visibility_snapshot = 4; } message RefreshConnectionRequest { From ac703a8e803c25d6515e7b87daaf2dc5e154f0fb Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 16:32:37 +0000 Subject: [PATCH 03/18] Project import generated by Copybara. FolderOrigin-RevId: 67f00d037a06934e42acff64499f0bfa518e220e --- .repository-projection.json | 4 +- openapi/console/v1/console.openapi.yaml | 67 +++++++++++++++++++++++++ openapi/deixic/v1/deixic.openapi.yaml | 67 +++++++++++++++++++++++++ proto/console/v1/console.proto | 34 +++++++++++-- 4 files changed, 167 insertions(+), 5 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 9759165..185d2eb 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9ffaa22bee2d27571af1dfd4dcd9d05a5668ae78", + "sourceSha": "67f00d037a06934e42acff64499f0bfa518e220e", "destinationRepository": "dx-corp/api", "priorProjectedBase": "84f570f8fa6a22ffc3c9140345af1cda0e412a82", "definitionDigest": "1b99f898b612f6adeb8261ebea5314f7e78f0d41d4667ce98cb9bb94155369f4", "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", - "contentDigest": "b75a9f3012a18eafa320bc92c27f1844b653fed675b790773e7c37169f59cf18", + "contentDigest": "a974f5794e89e4cf63fd3c910945dfba6539143368af37d779eab2e172c1b7d3", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index f4842da..81ac651 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -20068,6 +20068,52 @@ components: catalogProvenance: title: catalog_provenance $ref: '#/components/schemas/connectors.v1.ConnectorCatalogProvenance' + catalogTier: + type: string + title: catalog_tier + description: |- + catalog_tier is the connector catalog owner's shape-derived tier. Console + carries it verbatim and never promotes a provider's readiness. + providerActions: + type: array + items: + type: string + title: provider_actions + description: |- + provider_actions names the typed runtime actions exposed by the published + provider. Together with resource_families this distinguishes sync, + action-only, and combined providers without inferring support from labels. + catalogStatus: + type: string + title: catalog_status + description: |- + catalog_status is either ready (published and connectable) or + qualification_pending (installed preview, not connectable). + setupAllowed: + type: boolean + title: setup_allowed + configured: + type: boolean + title: configured + providerActionCount: + type: integer + title: provider_action_count + format: int32 + resourceFamilyCount: + type: integer + title: resource_family_count + format: int32 + requiredFamilyCount: + type: integer + title: required_family_count + format: int32 + qualifiedFamilyCount: + type: integer + title: qualified_family_count + format: int32 + rolloutKind: + type: string + title: rollout_kind title: IntegrationTile additionalProperties: false console.v1.InterruptOperatingThreadRequest: @@ -21090,6 +21136,27 @@ components: type: integer title: total format: int32 + installedTotal: + type: integer + title: installed_total + format: int32 + nullable: true + previewTotal: + type: integer + title: preview_total + format: int32 + nullable: true + readyTotal: + type: integer + title: ready_total + format: int32 + configuredTotal: + type: integer + title: configured_total + format: int32 + previewInventoryUnavailable: + type: boolean + title: preview_inventory_unavailable title: ListIntegrationTilesResponse additionalProperties: false console.v1.ListManagedProviderAccessEventsRequest: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index c464fe8..677e2b7 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -19399,6 +19399,52 @@ components: catalogProvenance: title: catalog_provenance $ref: '#/components/schemas/connectors.v1.ConnectorCatalogProvenance' + catalogTier: + type: string + title: catalog_tier + description: |- + catalog_tier is the connector catalog owner's shape-derived tier. Console + carries it verbatim and never promotes a provider's readiness. + providerActions: + type: array + items: + type: string + title: provider_actions + description: |- + provider_actions names the typed runtime actions exposed by the published + provider. Together with resource_families this distinguishes sync, + action-only, and combined providers without inferring support from labels. + catalogStatus: + type: string + title: catalog_status + description: |- + catalog_status is either ready (published and connectable) or + qualification_pending (installed preview, not connectable). + setupAllowed: + type: boolean + title: setup_allowed + configured: + type: boolean + title: configured + providerActionCount: + type: integer + title: provider_action_count + format: int32 + resourceFamilyCount: + type: integer + title: resource_family_count + format: int32 + requiredFamilyCount: + type: integer + title: required_family_count + format: int32 + qualifiedFamilyCount: + type: integer + title: qualified_family_count + format: int32 + rolloutKind: + type: string + title: rollout_kind title: IntegrationTile additionalProperties: false console.v1.InterruptOperatingThreadRequest: @@ -20421,6 +20467,27 @@ components: type: integer title: total format: int32 + installedTotal: + type: integer + title: installed_total + format: int32 + nullable: true + previewTotal: + type: integer + title: preview_total + format: int32 + nullable: true + readyTotal: + type: integer + title: ready_total + format: int32 + configuredTotal: + type: integer + title: configured_total + format: int32 + previewInventoryUnavailable: + type: boolean + title: preview_inventory_unavailable title: ListIntegrationTilesResponse additionalProperties: false console.v1.ListManagedProviderAccessEventsRequest: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 5b5f484..6a244c5 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -2710,7 +2710,9 @@ message DexComputerCorrectionEpisode { repeated string evidence_digests_sha256 = 8 [(buf.validate.field).repeated = { min_items: 1 max_items: 64 - items: {string: {len: 64}} + items: { + string: {len: 64} + } }]; OperatingCorrectionReviewState review_state = 9 [(buf.validate.field).enum.defined_only = true]; bool production_learning = 10; @@ -5191,6 +5193,11 @@ message ListIntegrationTilesRequest { message ListIntegrationTilesResponse { repeated IntegrationTile tiles = 1; int32 total = 2 [(buf.validate.field).int32.gte = 0]; + optional int32 installed_total = 3 [(buf.validate.field).int32.gte = 0]; + optional int32 preview_total = 4 [(buf.validate.field).int32.gte = 0]; + int32 ready_total = 5 [(buf.validate.field).int32.gte = 0]; + int32 configured_total = 6 [(buf.validate.field).int32.gte = 0]; + bool preview_inventory_unavailable = 7; } message ListPinnedSourcesRequest { @@ -7166,6 +7173,23 @@ message IntegrationTile { bool oauth_supported = 28; repeated IntegrationCredentialField credential_fields = 29; connectors.v1.ConnectorCatalogProvenance catalog_provenance = 30; + // catalog_tier is the connector catalog owner's shape-derived tier. Console + // carries it verbatim and never promotes a provider's readiness. + string catalog_tier = 31; + // provider_actions names the typed runtime actions exposed by the published + // provider. Together with resource_families this distinguishes sync, + // action-only, and combined providers without inferring support from labels. + repeated string provider_actions = 32; + // catalog_status is either ready (published and connectable) or + // qualification_pending (installed preview, not connectable). + string catalog_status = 33; + bool setup_allowed = 34; + bool configured = 35; + int32 provider_action_count = 36 [(buf.validate.field).int32.gte = 0]; + int32 resource_family_count = 37 [(buf.validate.field).int32.gte = 0]; + int32 required_family_count = 38 [(buf.validate.field).int32.gte = 0]; + int32 qualified_family_count = 39 [(buf.validate.field).int32.gte = 0]; + string rollout_kind = 40; } message OnboardingTask { @@ -9116,7 +9140,9 @@ message CaptureFormSelectSpec { message CaptureFormUploadSpec { repeated string accepted_content_types = 1 [(buf.validate.field).repeated = { max_items: 32 - items: {string: {max_len: 128}} + items: { + string: {max_len: 128} + } }]; int64 max_size_bytes = 2 [(buf.validate.field).int64 = { gt: 0 @@ -9295,7 +9321,9 @@ message CaptureFormPublicationInput { string custom_domain_id = 2 [(buf.validate.field).string.max_len = 255]; repeated string allowed_origins = 3 [(buf.validate.field).repeated = { max_items: 32 - items: {string: {max_len: 2048}} + items: { + string: {max_len: 2048} + } }]; bool embed_enabled = 4; google.protobuf.Timestamp expires_at = 5; From 82cf8df841204129de701cc79460ae6329187e59 Mon Sep 17 00:00:00 2001 From: Copybara Date: Sun, 20 Sep 2026 18:24:35 +0000 Subject: [PATCH 04/18] Project import generated by Copybara. FolderOrigin-RevId: 0274e34d132f6b00a9c72841e39eda43084db5d4 --- .repository-projection.json | 4 +- openapi/connectors/v1/connectors.openapi.yaml | 71 +++++++++++++++++++ openapi/console/v1/console.openapi.yaml | 34 +++++++++ openapi/deixic/v1/deixic.openapi.yaml | 34 +++++++++ proto/connectors/v1/connectors.proto | 29 ++++++++ proto/console/v1/console.proto | 13 ++++ 6 files changed, 183 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 185d2eb..a45444d 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "67f00d037a06934e42acff64499f0bfa518e220e", + "sourceSha": "0274e34d132f6b00a9c72841e39eda43084db5d4", "destinationRepository": "dx-corp/api", "priorProjectedBase": "84f570f8fa6a22ffc3c9140345af1cda0e412a82", "definitionDigest": "1b99f898b612f6adeb8261ebea5314f7e78f0d41d4667ce98cb9bb94155369f4", "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", - "contentDigest": "a974f5794e89e4cf63fd3c910945dfba6539143368af37d779eab2e172c1b7d3", + "contentDigest": "4850ff2cb477e15a442cb21c35b3355353f700a5880770b286a92f1772e0815c", "publicationEligible": true } diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index a219308..7cf4106 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -2213,6 +2213,12 @@ components: description: |- Immutable source/import cohort used to bind generated-canary proof. Empty for built-in and tenant-owned custom providers. + description: + type: string + title: description + description: |- + Customer-facing source description. Empty means the catalog has no + authoritative description. title: ConnectorProvider additionalProperties: false description: |- @@ -2261,6 +2267,24 @@ components: customerVisible: type: boolean title: customer_visible + description: + type: string + title: description + description: Customer-facing source description. Empty means unknown. + resourceFamilies: + type: array + items: + $ref: '#/components/schemas/connectors.v1.ConnectorResourceFamilySummary' + title: resource_families + description: |- + Safe family metadata for discovery. These summaries carry no endpoint, + auth, credential, or request-planning data. + providerActionIds: + type: array + items: + type: string + title: provider_action_ids + description: Stable action identifiers are kept separate from readable resource types. title: ConnectorProviderPreview additionalProperties: false description: |- @@ -2363,11 +2387,58 @@ components: cost: title: cost $ref: '#/components/schemas/connectors.v1.ConnectorCostProjection' + displayName: + type: string + title: display_name + description: |- + Customer-facing label supplied by the catalog source. Empty means the + catalog has no authoritative label; consumers must not infer one from id. + sourceCoverageTypes: + type: array + items: + type: string + title: source_coverage_types + description: |- + Exact coverage taxonomy declared by the source catalog. This is source + metadata, not a Mono canonical resource type. + sourceProjectionTemplate: + type: string + title: source_projection_template + description: |- + Projection template declared by the source catalog. It records upstream + intent and does not claim that Mono executes that domain projection. title: ConnectorResourceFamily additionalProperties: false description: |- ConnectorResourceFamily names one upstream resource collection the runtime can read. + connectors.v1.ConnectorResourceFamilySummary: + type: object + properties: + id: + type: string + title: id + minLength: 1 + displayName: + type: string + title: display_name + sourceCoverageTypes: + type: array + items: + type: string + title: source_coverage_types + sourceProjectionTemplate: + type: string + title: source_projection_template + eventKind: + type: string + title: event_kind + minLength: 1 + title: ConnectorResourceFamilySummary + additionalProperties: false + description: |- + Safe discovery metadata for one provider resource family. Endpoint, auth, + request-planning, and response-schema details are intentionally excluded. connectors.v1.ConnectorRuntime: type: object properties: diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index 81ac651..321b53a 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -19953,6 +19953,32 @@ components: IntegrationCredentialField describes the credential reference slots Console can ask a workspace admin to provide for an integration. Values submitted for these fields must be secret references, not raw credential material. + console.v1.IntegrationResourceType: + type: object + properties: + id: + type: string + title: id + displayName: + type: string + title: display_name + sourceCoverageTypes: + type: array + items: + type: string + title: source_coverage_types + sourceProjectionTemplate: + type: string + title: source_projection_template + eventKind: + type: string + title: event_kind + title: IntegrationResourceType + additionalProperties: false + description: |- + IntegrationResourceType is safe catalog discovery metadata for one provider + resource family. source_* fields preserve the imported source taxonomy and + projection intent; they do not claim a canonical or implemented Mono mapping. console.v1.IntegrationTile: type: object properties: @@ -20114,6 +20140,14 @@ components: rolloutKind: type: string title: rollout_kind + resourceTypes: + type: array + items: + $ref: '#/components/schemas/console.v1.IntegrationResourceType' + title: resource_types + providerDescription: + type: string + title: provider_description title: IntegrationTile additionalProperties: false console.v1.InterruptOperatingThreadRequest: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index 677e2b7..9302554 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -19284,6 +19284,32 @@ components: IntegrationCredentialField describes the credential reference slots Console can ask a workspace admin to provide for an integration. Values submitted for these fields must be secret references, not raw credential material. + console.v1.IntegrationResourceType: + type: object + properties: + id: + type: string + title: id + displayName: + type: string + title: display_name + sourceCoverageTypes: + type: array + items: + type: string + title: source_coverage_types + sourceProjectionTemplate: + type: string + title: source_projection_template + eventKind: + type: string + title: event_kind + title: IntegrationResourceType + additionalProperties: false + description: |- + IntegrationResourceType is safe catalog discovery metadata for one provider + resource family. source_* fields preserve the imported source taxonomy and + projection intent; they do not claim a canonical or implemented Mono mapping. console.v1.IntegrationTile: type: object properties: @@ -19445,6 +19471,14 @@ components: rolloutKind: type: string title: rollout_kind + resourceTypes: + type: array + items: + $ref: '#/components/schemas/console.v1.IntegrationResourceType' + title: resource_types + providerDescription: + type: string + title: provider_description title: IntegrationTile additionalProperties: false console.v1.InterruptOperatingThreadRequest: diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index fa75a44..68cfc26 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -618,6 +618,25 @@ message ConnectorResourceFamily { ConnectorIncrementalBinding incremental = 18; bool synthetic_primary_key = 19; ConnectorCostProjection cost = 20; + // Customer-facing label supplied by the catalog source. Empty means the + // catalog has no authoritative label; consumers must not infer one from id. + string display_name = 21; + // Exact coverage taxonomy declared by the source catalog. This is source + // metadata, not a Mono canonical resource type. + repeated string source_coverage_types = 22; + // Projection template declared by the source catalog. It records upstream + // intent and does not claim that Mono executes that domain projection. + string source_projection_template = 23; +} + +// Safe discovery metadata for one provider resource family. Endpoint, auth, +// request-planning, and response-schema details are intentionally excluded. +message ConnectorResourceFamilySummary { + string id = 1 [(buf.validate.field).string.min_len = 1]; + string display_name = 2; + repeated string source_coverage_types = 3; + string source_projection_template = 4; + string event_kind = 5 [(buf.validate.field).string.min_len = 1]; } message ConnectorCostProjection { @@ -728,6 +747,9 @@ message ConnectorProvider { // Immutable source/import cohort used to bind generated-canary proof. // Empty for built-in and tenant-owned custom providers. string canary_cohort_sha256 = 19; + // Customer-facing source description. Empty means the catalog has no + // authoritative description. + string description = 20; } // CustomConnectorActionMetadata is the tenant-editable presentation and @@ -976,6 +998,13 @@ message ConnectorProviderPreview { int32 required_family_count = 9 [(buf.validate.field).int32.gte = 0]; int32 qualified_family_count = 10 [(buf.validate.field).int32.gte = 0]; bool customer_visible = 11; + // Customer-facing source description. Empty means unknown. + string description = 12; + // Safe family metadata for discovery. These summaries carry no endpoint, + // auth, credential, or request-planning data. + repeated ConnectorResourceFamilySummary resource_families = 13; + // Stable action identifiers are kept separate from readable resource types. + repeated string provider_action_ids = 14; } message ListProviderPreviewsResponse { diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 6a244c5..13c3c8e 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -7139,6 +7139,17 @@ message IntegrationCredentialField { string credential_type = 6; } +// IntegrationResourceType is safe catalog discovery metadata for one provider +// resource family. source_* fields preserve the imported source taxonomy and +// projection intent; they do not claim a canonical or implemented Mono mapping. +message IntegrationResourceType { + string id = 1; + string display_name = 2; + repeated string source_coverage_types = 3; + string source_projection_template = 4; + string event_kind = 5; +} + message IntegrationTile { string id = 1; string name = 2; @@ -7190,6 +7201,8 @@ message IntegrationTile { int32 required_family_count = 38 [(buf.validate.field).int32.gte = 0]; int32 qualified_family_count = 39 [(buf.validate.field).int32.gte = 0]; string rollout_kind = 40; + repeated IntegrationResourceType resource_types = 41; + string provider_description = 42; } message OnboardingTask { From 1bf0483537e9dbb10e4846fdaf20c64031335f4a Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Sun, 20 Sep 2026 21:35:58 +0000 Subject: [PATCH 05/18] chore: project api from Mono a2e8b231b208 --- .repository-projection.json | 10 +- openapi/agentruntime/v1/runtime.openapi.yaml | 10658 ++++++++++++++++ openapi/agents/v1/agents.openapi.yaml | 2968 +++++ openapi/codex/v1/codex.openapi.yaml | 1086 ++ openapi/connectors/v1/connectors.openapi.yaml | 135 + openapi/console/v1/console.openapi.yaml | 72 + openapi/objectives/v1/objectives.openapi.yaml | 1384 ++ proto/agentruntime/v1/runtime.proto | 2948 +++++ proto/agents/v1/agents.proto | 1055 ++ proto/codex/v1/codex.proto | 387 + proto/connectors/v1/connectors.proto | 67 + proto/console/v1/console.proto | 9 + proto/objectives/v1/objectives.proto | 399 + scripts/distribution-validation.mjs | 67 +- 14 files changed, 21234 insertions(+), 11 deletions(-) create mode 100644 openapi/agentruntime/v1/runtime.openapi.yaml create mode 100644 openapi/agents/v1/agents.openapi.yaml create mode 100644 openapi/codex/v1/codex.openapi.yaml create mode 100644 openapi/objectives/v1/objectives.openapi.yaml create mode 100644 proto/agentruntime/v1/runtime.proto create mode 100644 proto/agents/v1/agents.proto create mode 100644 proto/codex/v1/codex.proto create mode 100644 proto/objectives/v1/objectives.proto diff --git a/.repository-projection.json b/.repository-projection.json index a45444d..972a9e3 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "0274e34d132f6b00a9c72841e39eda43084db5d4", + "sourceSha": "a2e8b231b208f9e30b0a115eb132176e1e7c301a", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "84f570f8fa6a22ffc3c9140345af1cda0e412a82", - "definitionDigest": "1b99f898b612f6adeb8261ebea5314f7e78f0d41d4667ce98cb9bb94155369f4", - "toolDigest": "c8000985e1bd708bf1f8754b27cc1a2aad67af10ee23cf5317bd1fba670b4456", - "contentDigest": "4850ff2cb477e15a442cb21c35b3355353f700a5880770b286a92f1772e0815c", + "priorProjectedBase": "892fea89dc5649ef151a2869eaecbdc681ac0dce", + "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", + "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", + "contentDigest": "ece7654c0f907952dbd746834bf20050cbf828677d4b2637b54bd7e86dce8e53", "publicationEligible": true } diff --git a/openapi/agentruntime/v1/runtime.openapi.yaml b/openapi/agentruntime/v1/runtime.openapi.yaml new file mode 100644 index 0000000..519e432 --- /dev/null +++ b/openapi/agentruntime/v1/runtime.openapi.yaml @@ -0,0 +1,10658 @@ +openapi: 3.1.0 +info: + title: agentruntime.v1 +paths: + /agentruntime.v1.AgentRuntimeService/HandleTrigger: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: HandleTrigger + description: |- + HandleTrigger receives a normalized product or integration trigger, + resolves agent/objective context, records an AgentRun, and dispatches it. + operationId: agentruntime.v1.AgentRuntimeService.HandleTrigger + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HandleTriggerRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HandleTriggerResponse' + /agentruntime.v1.AgentRuntimeService/AdmitOperatingChannelEvent: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: AdmitOperatingChannelEvent + description: |- + AdmitOperatingChannelEvent accepts provider-issued coordinates from a + channel edge that cannot know tenant ownership. Platform resolves the + installation and external actor before durably admitting the event. + operationId: agentruntime.v1.AgentRuntimeService.AdmitOperatingChannelEvent + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.AdmitOperatingChannelEventRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.AdmitOperatingChannelEventResponse' + /agentruntime.v1.AgentRuntimeService/AdmitSurfaceInvocation: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: AdmitSurfaceInvocation + description: |- + AdmitSurfaceInvocation accepts a provider-neutral invocation from a + verified surface adapter. Platform resolves installation ownership and + the external actor before binding the provider object to an operating + thread and durably admitting work. + operationId: agentruntime.v1.AgentRuntimeService.AdmitSurfaceInvocation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.AdmitSurfaceInvocationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.AdmitSurfaceInvocationResponse' + /agentruntime.v1.AgentRuntimeService/EnsureOrganizationEmail: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: EnsureOrganizationEmail + description: |- + Identity reconciles one approved organization and its active default workspace. + Caller scope is service-only; this request cannot select provider credentials. + operationId: agentruntime.v1.AgentRuntimeService.EnsureOrganizationEmail + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.EnsureOrganizationEmailRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.EnsureOrganizationEmailResponse' + /agentruntime.v1.AgentRuntimeService/ClaimNextRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ClaimNextRun + description: |- + ClaimNextRun atomically leases the next queued or retry-ready run for a + worker. A claim transitions the run to RUNNING and increments attempt. + operationId: agentruntime.v1.AgentRuntimeService.ClaimNextRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ClaimNextRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ClaimNextRunResponse' + /agentruntime.v1.AgentRuntimeService/HeartbeatRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: HeartbeatRun + description: |- + HeartbeatRun extends an active worker lease. Expired leases are eligible + to be reclaimed by another worker from the last checkpoint. + operationId: agentruntime.v1.AgentRuntimeService.HeartbeatRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HeartbeatRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HeartbeatRunResponse' + /agentruntime.v1.AgentRuntimeService/RenewRunLease: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RenewRunLease + description: |- + RenewRunLease recovers a still-owned worker lease after it has expired but + before the run has been parked, completed, or otherwise taken over. + operationId: agentruntime.v1.AgentRuntimeService.RenewRunLease + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RenewRunLeaseRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RenewRunLeaseResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunStep: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunStep + description: RecordRunStep upserts the durable record for one execution step. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunStep + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunStepRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunStepResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunCheckpoint: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunCheckpoint + description: |- + RecordRunCheckpoint stores an opaque resume snapshot. Checkpoints are the + source of truth for resuming work; deterministic replay is not required. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunCheckpoint + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunCheckpointRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunCheckpointResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunArtifact: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunArtifact + description: RecordRunArtifact links a produced artifact to the run and optional step. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunArtifact + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunArtifactRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunArtifactResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunCost: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunCost + description: RecordRunCost links metering/cost data to the run and optional step. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunCost + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunCostRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunCostResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunStreamCursor: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunStreamCursor + description: RecordRunStreamCursor stores a consumer cursor into the run event stream. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunStreamCursor + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunStreamCursorRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunStreamCursorResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunEvent: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunEvent + description: |- + RecordRunEvent appends an adapter-observed lifecycle event to an existing + AgentRun without requiring a worker lease. Channel adapters use this to + attach Slack/Teams/email delivery, approval, model, and tool milestones + while Platform remains the durable source of truth for the run timeline. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunEvent + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunEventRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunEventResponse' + /agentruntime.v1.AgentRuntimeService/ControlRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ControlRun + description: |- + ControlRun records a human, channel, scheduler, or system control against + the active autonomous run/session. Controls are durable steering input; the + Slack adapter is not responsible for keeping the agent alive turn by turn. + operationId: agentruntime.v1.AgentRuntimeService.ControlRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ControlRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ControlRunResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunWorkItem: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunWorkItem + description: |- + RecordRunWorkItem creates or replaces one node in the autonomous work graph. + Work items, not VFS projections, are the canonical state for long-horizon + goals, child runs, waits, tool activity, blockers, and completion gates. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunWorkItem + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunWorkItemRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunWorkItemResponse' + /agentruntime.v1.AgentRuntimeService/UpdateRunWorkItem: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: UpdateRunWorkItem + description: UpdateRunWorkItem patches progress for one autonomous work graph node. + operationId: agentruntime.v1.AgentRuntimeService.UpdateRunWorkItem + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.UpdateRunWorkItemRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.UpdateRunWorkItemResponse' + /agentruntime.v1.AgentRuntimeService/ListRunWorkItems: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListRunWorkItems + description: ListRunWorkItems returns the typed work graph for one run or work envelope. + operationId: agentruntime.v1.AgentRuntimeService.ListRunWorkItems + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunWorkItemsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunWorkItemsResponse' + /agentruntime.v1.AgentRuntimeService/YieldRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: YieldRun + description: |- + YieldRun ends the current leased run step while keeping the autonomous + session alive. Inline yields enqueue a successor AgentRun immediately; + end-session yields close the run without enqueueing more autonomous work. + Timer, approval, input, and event blocking use WaitRun/ResumeRun. + operationId: agentruntime.v1.AgentRuntimeService.YieldRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.YieldRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.YieldRunResponse' + /agentruntime.v1.AgentRuntimeService/WaitRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: WaitRun + description: |- + WaitRun parks the run on an approval, input, timer, or event wait and + clears the worker lease so no compute is held while blocked. + operationId: agentruntime.v1.AgentRuntimeService.WaitRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.WaitRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.WaitRunResponse' + /agentruntime.v1.AgentRuntimeService/ResumeRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ResumeRun + description: ResumeRun resolves a wait and requeues the run from its latest checkpoint. + operationId: agentruntime.v1.AgentRuntimeService.ResumeRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ResumeRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ResumeRunResponse' + /agentruntime.v1.AgentRuntimeService/CompleteRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: CompleteRun + description: CompleteRun marks the run successful and releases any active lease. + operationId: agentruntime.v1.AgentRuntimeService.CompleteRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.CompleteRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.CompleteRunResponse' + /agentruntime.v1.AgentRuntimeService/FailRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: FailRun + description: |- + FailRun records a failed attempt. Retryable failures can move to RETRYING; + exhausted attempts stay FAILED until they are moved to the dead letter set. + operationId: agentruntime.v1.AgentRuntimeService.FailRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.FailRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.FailRunResponse' + /agentruntime.v1.AgentRuntimeService/CancelRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: CancelRun + description: CancelRun cancels a run before it reaches a terminal success/failure. + operationId: agentruntime.v1.AgentRuntimeService.CancelRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.CancelRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.CancelRunResponse' + /agentruntime.v1.AgentRuntimeService/RetryRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RetryRun + description: RetryRun explicitly schedules a failed run for another attempt. + operationId: agentruntime.v1.AgentRuntimeService.RetryRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RetryRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RetryRunResponse' + /agentruntime.v1.AgentRuntimeService/DeadLetterRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: DeadLetterRun + description: DeadLetterRun moves an exhausted or poison run out of normal scheduling. + operationId: agentruntime.v1.AgentRuntimeService.DeadLetterRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.DeadLetterRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.DeadLetterRunResponse' + /agentruntime.v1.AgentRuntimeService/GetRun: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: GetRun + description: GetRun retrieves an AgentRun by ID. + operationId: agentruntime.v1.AgentRuntimeService.GetRun + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetRunRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetRunResponse' + /agentruntime.v1.AgentRuntimeService/GetTeammateWorkLedger: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: GetTeammateWorkLedger + description: |- + GetTeammateWorkLedger retrieves the durable teammate work projection for + one run. It joins run state, waits, memory citations, connector grants, + VFS state, proactive policy, and channel-visible status into the compact + read model workers and operator consoles use for long-horizon handoff. + operationId: agentruntime.v1.AgentRuntimeService.GetTeammateWorkLedger + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetTeammateWorkLedgerRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetTeammateWorkLedgerResponse' + /agentruntime.v1.AgentRuntimeService/ListRunsByWorkEnvelope: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListRunsByWorkEnvelope + description: |- + ListRunsByWorkEnvelope retrieves newest runs that belong to one durable + channel work envelope, such as a Slack thread or future email/Jira/Teams object. + operationId: agentruntime.v1.AgentRuntimeService.ListRunsByWorkEnvelope + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunsByWorkEnvelopeRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunsByWorkEnvelopeResponse' + /agentruntime.v1.AgentRuntimeService/GetChannelThreadAdoption: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: GetChannelThreadAdoption + description: |- + GetChannelThreadAdoption resolves whether a channel thread has been + explicitly adopted by an agent and can receive no-mention continuations. + operationId: agentruntime.v1.AgentRuntimeService.GetChannelThreadAdoption + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetChannelThreadAdoptionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetChannelThreadAdoptionResponse' + /agentruntime.v1.AgentRuntimeService/RecordChannelThreadAdoption: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordChannelThreadAdoption + description: |- + RecordChannelThreadAdoption durably records an adapter-observed channel + thread adoption without requiring the adapter to create a new AgentRun. + operationId: agentruntime.v1.AgentRuntimeService.RecordChannelThreadAdoption + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordChannelThreadAdoptionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordChannelThreadAdoptionResponse' + /agentruntime.v1.AgentRuntimeService/ListChannelThreadAdoptions: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListChannelThreadAdoptions + description: |- + ListChannelThreadAdoptions returns the durable adoption projection for + operator/debug surfaces and channel-adapter reconciliation. + operationId: agentruntime.v1.AgentRuntimeService.ListChannelThreadAdoptions + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListChannelThreadAdoptionsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListChannelThreadAdoptionsResponse' + /agentruntime.v1.AgentRuntimeService/ListRunWaits: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListRunWaits + description: |- + ListRunWaits returns a pending-work projection over parked AgentRun waits + without requiring clients to replay runtime events or read full run + snapshots. + operationId: agentruntime.v1.AgentRuntimeService.ListRunWaits + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunWaitsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunWaitsResponse' + /agentruntime.v1.AgentRuntimeService/RecordChannelActionReceipt: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordChannelActionReceipt + description: |- + RecordChannelActionReceipt durably records an interactive channel action, + such as a Slack approval button or slash command, before any side effects + resume runtime work. + operationId: agentruntime.v1.AgentRuntimeService.RecordChannelActionReceipt + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordChannelActionReceiptRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordChannelActionReceiptResponse' + /agentruntime.v1.AgentRuntimeService/GetChannelActionReceipt: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: GetChannelActionReceipt + description: GetChannelActionReceipt retrieves one recorded channel action receipt. + operationId: agentruntime.v1.AgentRuntimeService.GetChannelActionReceipt + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetChannelActionReceiptRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.GetChannelActionReceiptResponse' + /agentruntime.v1.AgentRuntimeService/ListChannelActionReceipts: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListChannelActionReceipts + description: |- + ListChannelActionReceipts returns durable channel action receipts for + audit, idempotency, and channel adapter reconciliation. + operationId: agentruntime.v1.AgentRuntimeService.ListChannelActionReceipts + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListChannelActionReceiptsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListChannelActionReceiptsResponse' + /agentruntime.v1.AgentRuntimeService/ListRunEvents: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListRunEvents + description: ListRunEvents returns the append-only event log for an AgentRun. + operationId: agentruntime.v1.AgentRuntimeService.ListRunEvents + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunEventsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunEventsResponse' + /agentruntime.v1.AgentRuntimeService/ListRunVirtualFiles: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ListRunVirtualFiles + description: |- + ListRunVirtualFiles lists the durable read model of a run's virtual + filesystem, including context files and agent-authored proposal files. + operationId: agentruntime.v1.AgentRuntimeService.ListRunVirtualFiles + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunVirtualFilesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ListRunVirtualFilesResponse' + /agentruntime.v1.AgentRuntimeService/ReadRunVirtualFile: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ReadRunVirtualFile + description: |- + ReadRunVirtualFile reads a bounded slice of one run virtual file. Workers + should use this instead of loading every virtual file into model context. + operationId: agentruntime.v1.AgentRuntimeService.ReadRunVirtualFile + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ReadRunVirtualFileRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ReadRunVirtualFileResponse' + /agentruntime.v1.AgentRuntimeService/StatRunVirtualFile: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: StatRunVirtualFile + description: |- + StatRunVirtualFile returns the typed, content-free VFS projection for one + run virtual file by path. + operationId: agentruntime.v1.AgentRuntimeService.StatRunVirtualFile + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.StatRunVirtualFileRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.StatRunVirtualFileResponse' + /agentruntime.v1.AgentRuntimeService/WatchRunVirtualFiles: {} + /agentruntime.v1.AgentRuntimeService/BatchReadRunVirtualFiles: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: BatchReadRunVirtualFiles + description: |- + BatchReadRunVirtualFiles reads multiple bounded VFS slices in one request + while making per-file and total-budget truncation explicit. + operationId: agentruntime.v1.AgentRuntimeService.BatchReadRunVirtualFiles + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.BatchReadRunVirtualFilesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.BatchReadRunVirtualFilesResponse' + /agentruntime.v1.AgentRuntimeService/BuildRunVirtualFileContextPack: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: BuildRunVirtualFileContextPack + description: |- + BuildRunVirtualFileContextPack returns an ordered, cited set of VFS + snippets for a task or query so workers can hydrate model context without + hand-rolling list/search/read loops. + operationId: agentruntime.v1.AgentRuntimeService.BuildRunVirtualFileContextPack + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.BuildRunVirtualFileContextPackRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.BuildRunVirtualFileContextPackResponse' + /agentruntime.v1.AgentRuntimeService/SearchRunVirtualFiles: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: SearchRunVirtualFiles + description: |- + SearchRunVirtualFiles performs bounded literal or regex search over text + virtual files projected for an AgentRun. + operationId: agentruntime.v1.AgentRuntimeService.SearchRunVirtualFiles + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.SearchRunVirtualFilesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.SearchRunVirtualFilesResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunVirtualFileProposal: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunVirtualFileProposal + description: |- + RecordRunVirtualFileProposal writes an agent-authored file into the + proposal/workspace side of the VFS. Source mounts such as /context remain + read-only; promotion to real side effects happens through reviewers or + downstream services. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunVirtualFileProposal + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunVirtualFileProposalRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunVirtualFileProposalResponse' + /agentruntime.v1.AgentRuntimeService/RecordRunVirtualFileTransaction: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RecordRunVirtualFileTransaction + description: |- + RecordRunVirtualFileTransaction atomically stages a multi-file VFS change + set as durable proposal artifacts with shared revision and review metadata. + operationId: agentruntime.v1.AgentRuntimeService.RecordRunVirtualFileTransaction + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunVirtualFileTransactionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RecordRunVirtualFileTransactionResponse' + /agentruntime.v1.AgentRuntimeService/PromoteRunVirtualFileTransaction: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: PromoteRunVirtualFileTransaction + description: |- + PromoteRunVirtualFileTransaction records a reviewed transaction as the + accepted workspace view. Promotion is idempotent by transaction and keeps + proposal artifacts intact for audit. + operationId: agentruntime.v1.AgentRuntimeService.PromoteRunVirtualFileTransaction + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.PromoteRunVirtualFileTransactionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.PromoteRunVirtualFileTransactionResponse' + /agentruntime.v1.AgentRuntimeService/DiffRunVirtualFileTransaction: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: DiffRunVirtualFileTransaction + description: |- + DiffRunVirtualFileTransaction previews a staged VFS transaction as + per-file stats, hunks, conflicts, and unified diff text. + operationId: agentruntime.v1.AgentRuntimeService.DiffRunVirtualFileTransaction + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.DiffRunVirtualFileTransactionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.DiffRunVirtualFileTransactionResponse' + /agentruntime.v1.AgentRuntimeService/ApplyRunVirtualFileTransaction: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: ApplyRunVirtualFileTransaction + description: |- + ApplyRunVirtualFileTransaction applies a transaction when the diff is + clean, and otherwise returns structured conflicts without mutating state. + operationId: agentruntime.v1.AgentRuntimeService.ApplyRunVirtualFileTransaction + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ApplyRunVirtualFileTransactionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.ApplyRunVirtualFileTransactionResponse' + /agentruntime.v1.AgentRuntimeService/RebaseRunVirtualFileTransaction: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: RebaseRunVirtualFileTransaction + description: |- + RebaseRunVirtualFileTransaction restages a clean transaction on top of the + latest accepted VFS revisions while preserving proposed content metadata. + operationId: agentruntime.v1.AgentRuntimeService.RebaseRunVirtualFileTransaction + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RebaseRunVirtualFileTransactionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.RebaseRunVirtualFileTransactionResponse' + /agentruntime.v1.AgentRuntimeService/HydrateRunVirtualFileMount: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: HydrateRunVirtualFileMount + description: |- + HydrateRunVirtualFileMount resolves a lazy connector mount into bounded + run-scoped VFS files without exposing credentials to the worker. + operationId: agentruntime.v1.AgentRuntimeService.HydrateRunVirtualFileMount + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HydrateRunVirtualFileMountRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.HydrateRunVirtualFileMountResponse' + /agentruntime.v1.AgentRuntimeService/InspectRunVirtualFiles: + post: + tags: + - agentruntime.v1.AgentRuntimeService + summary: InspectRunVirtualFiles + description: |- + InspectRunVirtualFiles returns a debug projection over mounts, + transactions, content addresses, and Cerebro indexing readiness. + operationId: agentruntime.v1.AgentRuntimeService.InspectRunVirtualFiles + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.InspectRunVirtualFilesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agentruntime.v1.InspectRunVirtualFilesResponse' +components: + schemas: + agentruntime.v1.AgentRunArtifactKind: + type: string + title: AgentRunArtifactKind + enum: + - AGENT_RUN_ARTIFACT_KIND_UNSPECIFIED + - AGENT_RUN_ARTIFACT_KIND_TOOL_RESULT + - AGENT_RUN_ARTIFACT_KIND_CHART + - AGENT_RUN_ARTIFACT_KIND_REPORT + - AGENT_RUN_ARTIFACT_KIND_FILE + - AGENT_RUN_ARTIFACT_KIND_TRANSCRIPT + - AGENT_RUN_ARTIFACT_KIND_APPROVAL_PLAN + - AGENT_RUN_ARTIFACT_KIND_SYSTEM + - AGENT_RUN_ARTIFACT_KIND_PATCH + - AGENT_RUN_ARTIFACT_KIND_PULL_REQUEST + - AGENT_RUN_ARTIFACT_KIND_PULL_REQUEST_COMMENT + - AGENT_RUN_ARTIFACT_KIND_CI_STATUS + - AGENT_RUN_ARTIFACT_KIND_RUN_PANEL + - AGENT_RUN_ARTIFACT_KIND_EVALUATION_EXAMPLE + description: AgentRunArtifactKind classifies durable output produced by a run or step. + agentruntime.v1.AgentRunState: + type: string + title: AgentRunState + enum: + - AGENT_RUN_STATE_UNSPECIFIED + - AGENT_RUN_STATE_ACCEPTED + - AGENT_RUN_STATE_QUEUED + - AGENT_RUN_STATE_RUNNING + - AGENT_RUN_STATE_WAITING + - AGENT_RUN_STATE_SUCCEEDED + - AGENT_RUN_STATE_FAILED + - AGENT_RUN_STATE_CANCELLED + - AGENT_RUN_STATE_RETRYING + - AGENT_RUN_STATE_DEAD_LETTERED + description: AgentRunState describes the runtime lifecycle of one durable attempt. + agentruntime.v1.AgentRunStepKind: + type: string + title: AgentRunStepKind + enum: + - AGENT_RUN_STEP_KIND_UNSPECIFIED + - AGENT_RUN_STEP_KIND_MODEL_CALL + - AGENT_RUN_STEP_KIND_TOOL_CALL_INTENT + - AGENT_RUN_STEP_KIND_TOOL_RESULT + - AGENT_RUN_STEP_KIND_APPROVAL_WAIT + - AGENT_RUN_STEP_KIND_ERROR + - AGENT_RUN_STEP_KIND_SYSTEM + - AGENT_RUN_STEP_KIND_CONTEXT_ENRICHMENT + - AGENT_RUN_STEP_KIND_PLAN + - AGENT_RUN_STEP_KIND_PATCH + - AGENT_RUN_STEP_KIND_TEST + - AGENT_RUN_STEP_KIND_PULL_REQUEST_SYNC + - AGENT_RUN_STEP_KIND_REVIEW_SYNC + description: AgentRunStepKind classifies the durable work represented by a run step. + agentruntime.v1.AgentRunStepState: + type: string + title: AgentRunStepState + enum: + - AGENT_RUN_STEP_STATE_UNSPECIFIED + - AGENT_RUN_STEP_STATE_PENDING + - AGENT_RUN_STEP_STATE_RUNNING + - AGENT_RUN_STEP_STATE_WAITING + - AGENT_RUN_STEP_STATE_SUCCEEDED + - AGENT_RUN_STEP_STATE_FAILED + - AGENT_RUN_STEP_STATE_CANCELLED + - AGENT_RUN_STEP_STATE_SKIPPED + description: AgentRunStepState describes progress for a single durable step record. + agentruntime.v1.AgentRunWaitState: + type: string + title: AgentRunWaitState + enum: + - AGENT_RUN_WAIT_STATE_UNSPECIFIED + - AGENT_RUN_WAIT_STATE_PENDING + - AGENT_RUN_WAIT_STATE_RESOLVED + - AGENT_RUN_WAIT_STATE_EXPIRED + - AGENT_RUN_WAIT_STATE_CANCELLED + description: AgentRunWaitState describes the read-model state of a parked wait. + agentruntime.v1.AgentRunWaitType: + type: string + title: AgentRunWaitType + enum: + - AGENT_RUN_WAIT_TYPE_UNSPECIFIED + - AGENT_RUN_WAIT_TYPE_APPROVAL + - AGENT_RUN_WAIT_TYPE_INPUT + - AGENT_RUN_WAIT_TYPE_EVENT + - AGENT_RUN_WAIT_TYPE_TIMER + description: AgentRunWaitType describes why a run released its worker lease. + agentruntime.v1.AgentWorkItemKind: + type: string + title: AgentWorkItemKind + enum: + - AGENT_WORK_ITEM_KIND_UNSPECIFIED + - AGENT_WORK_ITEM_KIND_ROOT + - AGENT_WORK_ITEM_KIND_MODEL_CALL + - AGENT_WORK_ITEM_KIND_TOOL_CALL + - AGENT_WORK_ITEM_KIND_CHILD_RUN + - AGENT_WORK_ITEM_KIND_WAIT + - AGENT_WORK_ITEM_KIND_MEMORY + - AGENT_WORK_ITEM_KIND_USER_INPUT + - AGENT_WORK_ITEM_KIND_FOLLOWUP + - AGENT_WORK_ITEM_KIND_RECOVERY + description: AgentWorkItemKind classifies nodes in the autonomous work graph. + agentruntime.v1.AgentWorkItemState: + type: string + title: AgentWorkItemState + enum: + - AGENT_WORK_ITEM_STATE_UNSPECIFIED + - AGENT_WORK_ITEM_STATE_PENDING + - AGENT_WORK_ITEM_STATE_RUNNING + - AGENT_WORK_ITEM_STATE_WAITING + - AGENT_WORK_ITEM_STATE_BLOCKED + - AGENT_WORK_ITEM_STATE_SUCCEEDED + - AGENT_WORK_ITEM_STATE_FAILED + - AGENT_WORK_ITEM_STATE_CANCELLED + description: AgentWorkItemState describes durable progress for a work graph node. + agentruntime.v1.AutonomyProcessingState: + type: string + title: AutonomyProcessingState + enum: + - AUTONOMY_PROCESSING_STATE_UNSPECIFIED + - AUTONOMY_PROCESSING_STATE_QUEUED + - AUTONOMY_PROCESSING_STATE_ORIENTING + - AUTONOMY_PROCESSING_STATE_THINKING + - AUTONOMY_PROCESSING_STATE_USING_TOOL + - AUTONOMY_PROCESSING_STATE_SPAWNING_CHILDREN + - AUTONOMY_PROCESSING_STATE_WAITING_ON_APPROVAL + - AUTONOMY_PROCESSING_STATE_WAITING_ON_EVENT + - AUTONOMY_PROCESSING_STATE_SYNTHESIZING + - AUTONOMY_PROCESSING_STATE_COMPLETING + - AUTONOMY_PROCESSING_STATE_IDLE + - AUTONOMY_PROCESSING_STATE_FAILED + description: |- + AutonomyProcessingState is the channel-safe processing presence for a + long-lived autonomous teammate. Adapters update the same visible Slack + message from this state instead of posting one reply per runtime turn. + agentruntime.v1.AutonomySessionState: + type: string + title: AutonomySessionState + enum: + - AUTONOMY_SESSION_STATE_UNSPECIFIED + - AUTONOMY_SESSION_STATE_ACTIVE + - AUTONOMY_SESSION_STATE_IDLE + - AUTONOMY_SESSION_STATE_WAITING + - AUTONOMY_SESSION_STATE_FAILED + - AUTONOMY_SESSION_STATE_CANCELLED + description: |- + AutonomySessionState is the coarse lifecycle for the long-lived teammate + session attached to a work envelope. + agentruntime.v1.ChannelActionAuthorizationOutcome: + type: string + title: ChannelActionAuthorizationOutcome + enum: + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_UNSPECIFIED + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_ALLOWED + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_DENIED + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_UNMAPPED_ACTOR + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_WRONG_APPROVER + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_EXPIRED + - CHANNEL_ACTION_AUTHORIZATION_OUTCOME_STALE + description: |- + ChannelActionAuthorizationOutcome records the actor-resolution and policy + decision for a channel action. + agentruntime.v1.ChannelActionDeliveryOutcome: + type: string + title: ChannelActionDeliveryOutcome + enum: + - CHANNEL_ACTION_DELIVERY_OUTCOME_UNSPECIFIED + - CHANNEL_ACTION_DELIVERY_OUTCOME_NOT_ATTEMPTED + - CHANNEL_ACTION_DELIVERY_OUTCOME_UPDATED + - CHANNEL_ACTION_DELIVERY_OUTCOME_FAILED + - CHANNEL_ACTION_DELIVERY_OUTCOME_SKIPPED + description: |- + ChannelActionDeliveryOutcome records whether the channel message/update was + reconciled after handling an action. + agentruntime.v1.ChannelActionExecutionOutcome: + type: string + title: ChannelActionExecutionOutcome + enum: + - CHANNEL_ACTION_EXECUTION_OUTCOME_UNSPECIFIED + - CHANNEL_ACTION_EXECUTION_OUTCOME_PENDING + - CHANNEL_ACTION_EXECUTION_OUTCOME_SUCCEEDED + - CHANNEL_ACTION_EXECUTION_OUTCOME_FAILED + - CHANNEL_ACTION_EXECUTION_OUTCOME_DUPLICATE + - CHANNEL_ACTION_EXECUTION_OUTCOME_TARGET_NOT_FOUND + - CHANNEL_ACTION_EXECUTION_OUTCOME_ALREADY_RESOLVED + - CHANNEL_ACTION_EXECUTION_OUTCOME_UNAUTHORIZED + - CHANNEL_ACTION_EXECUTION_OUTCOME_EXPIRED + - CHANNEL_ACTION_EXECUTION_OUTCOME_STALE + description: |- + ChannelActionExecutionOutcome records the durable side-effect result for a + channel action. + agentruntime.v1.ChannelActionKind: + type: string + title: ChannelActionKind + enum: + - CHANNEL_ACTION_KIND_UNSPECIFIED + - CHANNEL_ACTION_KIND_APPROVAL_DECISION + - CHANNEL_ACTION_KIND_WAIT_RESUME + - CHANNEL_ACTION_KIND_OBJECTIVE_CONTROL + - CHANNEL_ACTION_KIND_MEMORY_DECISION + - CHANNEL_ACTION_KIND_OPS_COMMAND + - CHANNEL_ACTION_KIND_GENERIC + - CHANNEL_ACTION_KIND_CODEX_INTERACTION + - CHANNEL_ACTION_KIND_BROWSER_CONTROL + - CHANNEL_ACTION_KIND_DESKTOP_CONTROL + description: |- + ChannelActionKind classifies the user or integration action submitted from a + durable channel surface. + agentruntime.v1.ChannelActionTargetKind: + type: string + title: ChannelActionTargetKind + enum: + - CHANNEL_ACTION_TARGET_KIND_UNSPECIFIED + - CHANNEL_ACTION_TARGET_KIND_RUN + - CHANNEL_ACTION_TARGET_KIND_WAIT + - CHANNEL_ACTION_TARGET_KIND_APPROVAL + - CHANNEL_ACTION_TARGET_KIND_OBJECTIVE + - CHANNEL_ACTION_TARGET_KIND_ARTIFACT + - CHANNEL_ACTION_TARGET_KIND_MEMORY_CANDIDATE + - CHANNEL_ACTION_TARGET_KIND_TOOL_EXECUTION + - CHANNEL_ACTION_TARGET_KIND_CODEX_SESSION + - CHANNEL_ACTION_TARGET_KIND_PATCH + - CHANNEL_ACTION_TARGET_KIND_PULL_REQUEST + - CHANNEL_ACTION_TARGET_KIND_BROWSER_SESSION + - CHANNEL_ACTION_TARGET_KIND_BROWSER_TAB + - CHANNEL_ACTION_TARGET_KIND_BROWSER_NATIVE_HOST + - CHANNEL_ACTION_TARGET_KIND_DESKTOP_SESSION + description: |- + ChannelActionTargetKind identifies the platform object controlled by a + channel action. + agentruntime.v1.NativeAgentEventSource: + type: string + title: NativeAgentEventSource + enum: + - NATIVE_AGENT_EVENT_SOURCE_UNSPECIFIED + - NATIVE_AGENT_EVENT_SOURCE_MAESTRO + - NATIVE_AGENT_EVENT_SOURCE_CODEX + - NATIVE_AGENT_EVENT_SOURCE_CLAUDE_CODE + - NATIVE_AGENT_EVENT_SOURCE_OTHER + description: |- + NativeAgentEventSource identifies the native Agent Workforce emitter that + produced an observed event. Platform does not infer authority from this + source; proof states below remain missing/unverified until joined to a + Platform resolver, credential, or meter authority. + agentruntime.v1.OperatingChannelContextEntityKind: + type: string + title: OperatingChannelContextEntityKind + enum: + - OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_UNSPECIFIED + - OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_CHANNEL + - OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_MESSAGE + - OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_CANVAS + - OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_LIST + description: |- + A provider-owned object the actor was viewing when a channel turn began. + The edge converts Slack's polymorphic app_context JSON into this bounded + contract; Platform may use the coordinates for governed source reads but + must not treat them as tenant authority. + agentruntime.v1.RunControlMode: + type: string + title: RunControlMode + enum: + - RUN_CONTROL_MODE_UNSPECIFIED + - RUN_CONTROL_MODE_STEER + - RUN_CONTROL_MODE_FOLLOWUP + - RUN_CONTROL_MODE_COLLECT + - RUN_CONTROL_MODE_INTERRUPT + - RUN_CONTROL_MODE_CANCEL + - RUN_CONTROL_MODE_SYSTEM_WAKE + description: |- + RunControlMode describes durable input applied to an autonomous run/session. + Steering and followups are optional controls; they are not the worker loop. + agentruntime.v1.RuntimeAudience: + type: string + title: RuntimeAudience + enum: + - RUNTIME_AUDIENCE_UNSPECIFIED + - RUNTIME_AUDIENCE_AGENT + - RUNTIME_AUDIENCE_TRIGGER_ACTOR + - RUNTIME_AUDIENCE_CHANNEL + - RUNTIME_AUDIENCE_WORKSPACE_ADMINS + - RUNTIME_AUDIENCE_AUDIT + - RUNTIME_AUDIENCE_SYSTEM + description: |- + RuntimeAudience identifies the audience allowed to see a runtime event or + wait projection. Audience is separate from visibility so clients can render a + channel-safe summary while keeping admin/audit detail available elsewhere. + agentruntime.v1.RuntimeChannelKind: + type: string + title: RuntimeChannelKind + enum: + - RUNTIME_CHANNEL_KIND_UNSPECIFIED + - RUNTIME_CHANNEL_KIND_SLACK + - RUNTIME_CHANNEL_KIND_WEB + - RUNTIME_CHANNEL_KIND_API + - RUNTIME_CHANNEL_KIND_EMAIL + - RUNTIME_CHANNEL_KIND_GITHUB + - RUNTIME_CHANNEL_KIND_LINEAR + - RUNTIME_CHANNEL_KIND_JIRA + - RUNTIME_CHANNEL_KIND_IDE + - RUNTIME_CHANNEL_KIND_MONITORING + - RUNTIME_CHANNEL_KIND_BROWSER_EXTENSION + - RUNTIME_CHANNEL_KIND_DESKTOP_HELPER + - RUNTIME_CHANNEL_KIND_CALENDAR + - RUNTIME_CHANNEL_KIND_TEAMS + - RUNTIME_CHANNEL_KIND_WHATSAPP + - RUNTIME_CHANNEL_KIND_APPLE_MESSAGES + description: |- + RuntimeChannelKind classifies the inbound or outbound channel adapter that + owns the human conversation surface for a run. + agentruntime.v1.RuntimeDependencyStatus: + type: string + title: RuntimeDependencyStatus + enum: + - RUNTIME_DEPENDENCY_STATUS_UNSPECIFIED + - RUNTIME_DEPENDENCY_STATUS_RESOLVED + - RUNTIME_DEPENDENCY_STATUS_NOT_FOUND + - RUNTIME_DEPENDENCY_STATUS_NOT_CONFIGURED + - RUNTIME_DEPENDENCY_STATUS_LOADED + description: |- + RuntimeDependencyStatus describes the readiness of a platform boundary that + contributed context to an AgentRun. + agentruntime.v1.RuntimeEventType: + type: string + title: RuntimeEventType + enum: + - RUNTIME_EVENT_TYPE_UNSPECIFIED + - RUNTIME_EVENT_TYPE_TRIGGER_ACCEPTED + - RUNTIME_EVENT_TYPE_AGENT_CONFIG_RESOLVED + - RUNTIME_EVENT_TYPE_OBJECTIVE_RESOLVED + - RUNTIME_EVENT_TYPE_CONTEXT_BUILT + - RUNTIME_EVENT_TYPE_WORKER_DISPATCHED + - RUNTIME_EVENT_TYPE_RUN_FAILED + - RUNTIME_EVENT_TYPE_RUN_QUEUED + - RUNTIME_EVENT_TYPE_RUN_CLAIMED + - RUNTIME_EVENT_TYPE_LEASE_HEARTBEAT + - RUNTIME_EVENT_TYPE_STEP_RECORDED + - RUNTIME_EVENT_TYPE_CHECKPOINT_RECORDED + - RUNTIME_EVENT_TYPE_ARTIFACT_RECORDED + - RUNTIME_EVENT_TYPE_COST_RECORDED + - RUNTIME_EVENT_TYPE_RUN_WAITING + - RUNTIME_EVENT_TYPE_RUN_RESUMED + - RUNTIME_EVENT_TYPE_RUN_SUCCEEDED + - RUNTIME_EVENT_TYPE_RUN_CANCELLED + - RUNTIME_EVENT_TYPE_RUN_RETRY_SCHEDULED + - RUNTIME_EVENT_TYPE_RUN_DEAD_LETTERED + - RUNTIME_EVENT_TYPE_STREAM_CURSOR_RECORDED + - RUNTIME_EVENT_TYPE_CODEX_INTERACTION_REQUESTED + - RUNTIME_EVENT_TYPE_CODEX_INTERACTION_RESOLVED + - RUNTIME_EVENT_TYPE_CODEX_PROGRESS_RECORDED + - RUNTIME_EVENT_TYPE_CODEX_OUTPUT_SYNCED + - RUNTIME_EVENT_TYPE_CODEX_OUTCOME_OBSERVED + - RUNTIME_EVENT_TYPE_CHANNEL_MESSAGE_RECORDED + - RUNTIME_EVENT_TYPE_MODEL_RESPONSE_RECORDED + - RUNTIME_EVENT_TYPE_TOOL_CALL_RECORDED + - RUNTIME_EVENT_TYPE_TOOL_RESULT_RECORDED + - RUNTIME_EVENT_TYPE_APPROVAL_REQUESTED + - RUNTIME_EVENT_TYPE_APPROVAL_RESOLVED + - RUNTIME_EVENT_TYPE_AGENT_PROGRESS_RECORDED + - RUNTIME_EVENT_TYPE_RUN_CONTROL_RECORDED + - RUNTIME_EVENT_TYPE_WORK_ITEM_RECORDED + - RUNTIME_EVENT_TYPE_WORK_ITEM_UPDATED + - RUNTIME_EVENT_TYPE_PROCESSING_PRESENCE_RECORDED + - RUNTIME_EVENT_TYPE_AUTONOMY_SESSION_RECORDED + - RUNTIME_EVENT_TYPE_RUN_YIELDED + description: RuntimeEventType classifies append-only AgentRun events. + agentruntime.v1.RuntimeEvidenceGapReason: + type: string + title: RuntimeEvidenceGapReason + enum: + - RUNTIME_EVIDENCE_GAP_REASON_UNSPECIFIED + - RUNTIME_EVIDENCE_GAP_REASON_CREDENTIAL_UNVERIFIED + - RUNTIME_EVIDENCE_GAP_REASON_PRINCIPAL_UNRESOLVED + - RUNTIME_EVIDENCE_GAP_REASON_COST_UNRECORDED + description: |- + RuntimeEvidenceGapReason identifies the missing proof that prevents a + runtime action from being considered approval-ready. + agentruntime.v1.RuntimeEvidenceState: + type: string + title: RuntimeEvidenceState + enum: + - RUNTIME_EVIDENCE_STATE_UNSPECIFIED + - RUNTIME_EVIDENCE_STATE_NATIVE_OBSERVED + - RUNTIME_EVIDENCE_STATE_PLATFORM_PROVEN + - RUNTIME_EVIDENCE_STATE_MISSING + - RUNTIME_EVIDENCE_STATE_UNVERIFIED + description: |- + RuntimeEvidenceState records whether Platform merely observed a native event + or has joined it to a resolver/proof source. + agentruntime.v1.RuntimeRedactionKind: + type: string + title: RuntimeRedactionKind + enum: + - RUNTIME_REDACTION_KIND_UNSPECIFIED + - RUNTIME_REDACTION_KIND_PII + - RUNTIME_REDACTION_KIND_CREDENTIAL + - RUNTIME_REDACTION_KIND_TOOL_ARGS + - RUNTIME_REDACTION_KIND_POLICY_DETAIL + - RUNTIME_REDACTION_KIND_INTERNAL_CONTEXT + description: |- + RuntimeRedactionKind identifies data categories that were removed or must be + removed before channel/user rendering. + agentruntime.v1.RuntimeSensitivity: + type: string + title: RuntimeSensitivity + enum: + - RUNTIME_SENSITIVITY_UNSPECIFIED + - RUNTIME_SENSITIVITY_PUBLIC + - RUNTIME_SENSITIVITY_INTERNAL + - RUNTIME_SENSITIVITY_CONFIDENTIAL + - RUNTIME_SENSITIVITY_RESTRICTED + description: |- + RuntimeSensitivity classifies how carefully runtime payloads must be handled + before projection outside Platform. + agentruntime.v1.RuntimeTriggerKind: + type: string + title: RuntimeTriggerKind + enum: + - RUNTIME_TRIGGER_KIND_UNSPECIFIED + - RUNTIME_TRIGGER_KIND_SLACK_APP_MENTION + - RUNTIME_TRIGGER_KIND_SLACK_DIRECT_MESSAGE + - RUNTIME_TRIGGER_KIND_SLACK_SLASH_COMMAND + - RUNTIME_TRIGGER_KIND_SLACK_ACTION + - RUNTIME_TRIGGER_KIND_SLACK_THREAD_CONTINUATION + - RUNTIME_TRIGGER_KIND_SLACK_EVENT + - RUNTIME_TRIGGER_KIND_ENSEMBLE_WEB_MESSAGE + - RUNTIME_TRIGGER_KIND_ENSEMBLE_WEBHOOK_EVENT + - RUNTIME_TRIGGER_KIND_SCHEDULE + - RUNTIME_TRIGGER_KIND_EMAIL + - RUNTIME_TRIGGER_KIND_API + - RUNTIME_TRIGGER_KIND_WEB + - RUNTIME_TRIGGER_KIND_GITHUB_ISSUE_COMMENT + - RUNTIME_TRIGGER_KIND_GITHUB_PULL_REQUEST_COMMENT + - RUNTIME_TRIGGER_KIND_LINEAR_ACTION + - RUNTIME_TRIGGER_KIND_IDE_COMMAND + - RUNTIME_TRIGGER_KIND_MONITORING_ALERT + - RUNTIME_TRIGGER_KIND_PROACTIVE_PATTERN + - RUNTIME_TRIGGER_KIND_SLACK_ASSISTANT_THREAD_STARTED + - RUNTIME_TRIGGER_KIND_SLACK_ASSISTANT_THREAD_CONTEXT_CHANGED + - RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_CREATED + - RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_UPDATED + - RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_CANCELLED + - RUNTIME_TRIGGER_KIND_TEAMS_MESSAGE + - RUNTIME_TRIGGER_KIND_TEAMS_CHANNEL_MENTION + - RUNTIME_TRIGGER_KIND_WHATSAPP_DIRECT_MESSAGE + - RUNTIME_TRIGGER_KIND_WHATSAPP_GROUP_MESSAGE + - RUNTIME_TRIGGER_KIND_WHATSAPP_BUTTON_REPLY + description: |- + RuntimeTriggerKind classifies the normalized source event that started or + resumed a run. The legacy string source_event_type remains for compatibility + with early producers and arbitrary integration event names. + agentruntime.v1.RuntimeVirtualFileOperation: + type: string + title: RuntimeVirtualFileOperation + enum: + - RUNTIME_VIRTUAL_FILE_OPERATION_UNSPECIFIED + - RUNTIME_VIRTUAL_FILE_OPERATION_WRITE + - RUNTIME_VIRTUAL_FILE_OPERATION_DELETE + - RUNTIME_VIRTUAL_FILE_OPERATION_RENAME + agentruntime.v1.RuntimeVirtualFileReasonCode: + type: string + title: RuntimeVirtualFileReasonCode + enum: + - RUNTIME_VIRTUAL_FILE_REASON_CODE_UNSPECIFIED + - RUNTIME_VIRTUAL_FILE_REASON_CODE_NOT_FOUND + - RUNTIME_VIRTUAL_FILE_REASON_CODE_FILTERED_OUT + - RUNTIME_VIRTUAL_FILE_REASON_CODE_TOTAL_BUDGET_EXHAUSTED + - RUNTIME_VIRTUAL_FILE_REASON_CODE_PATH_INVALID + - RUNTIME_VIRTUAL_FILE_REASON_CODE_CAPABILITY_DENIED + - RUNTIME_VIRTUAL_FILE_REASON_CODE_REVISION_CONFLICT + - RUNTIME_VIRTUAL_FILE_REASON_CODE_CURSOR_LAGGED + - RUNTIME_VIRTUAL_FILE_REASON_CODE_TEMPORARILY_UNAVAILABLE + description: |- + RuntimeVirtualFileReasonCode is a stable, machine-readable reason taxonomy + for VFS skips and precondition failures. Human strings may evolve; clients + should branch on this enum. + agentruntime.v1.RuntimeVirtualFileRedactionState: + type: string + title: RuntimeVirtualFileRedactionState + enum: + - RUNTIME_VIRTUAL_FILE_REDACTION_STATE_UNSPECIFIED + - RUNTIME_VIRTUAL_FILE_REDACTION_STATE_RAW + - RUNTIME_VIRTUAL_FILE_REDACTION_STATE_REDACTED + - RUNTIME_VIRTUAL_FILE_REDACTION_STATE_PREVIEW_ONLY + - RUNTIME_VIRTUAL_FILE_REDACTION_STATE_DENIED + description: |- + RuntimeVirtualFileRedactionState mirrors the workspace VFS byte plane's + redaction contract so Runtime VFS callers can discover whether content is + safe to read, preview-only, already redacted, or denied. + agentruntime.v1.RuntimeVirtualFileTransactionApplyStatus: + type: string + title: RuntimeVirtualFileTransactionApplyStatus + enum: + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_UNSPECIFIED + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_CLEAN + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_IDENTICAL + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_CONFLICT + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_MISSING_BASE + - RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_MISSING_TARGET + agentruntime.v1.RuntimeVirtualFileTransactionOutcome: + type: string + title: RuntimeVirtualFileTransactionOutcome + enum: + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_UNSPECIFIED + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_CLEAN + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_APPLIED + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_REBASED + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_CONFLICT + - RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_NOOP + agentruntime.v1.RuntimeVisibilityLevel: + type: string + title: RuntimeVisibilityLevel + enum: + - RUNTIME_VISIBILITY_LEVEL_UNSPECIFIED + - RUNTIME_VISIBILITY_LEVEL_AGENT_ONLY + - RUNTIME_VISIBILITY_LEVEL_USER_VISIBLE + - RUNTIME_VISIBILITY_LEVEL_CHANNEL_VISIBLE + - RUNTIME_VISIBILITY_LEVEL_ADMIN_VISIBLE + - RUNTIME_VISIBILITY_LEVEL_AUDIT_ONLY + description: |- + RuntimeVisibilityLevel declares whether runtime state can be projected to + humans or should remain internal/audit-only. Unspecified values are treated + conservatively as agent-only by service helpers and consumers. + agentruntime.v1.RuntimeWorkEnvelopeKind: + type: string + title: RuntimeWorkEnvelopeKind + enum: + - RUNTIME_WORK_ENVELOPE_KIND_UNSPECIFIED + - RUNTIME_WORK_ENVELOPE_KIND_CONVERSATION_THREAD + - RUNTIME_WORK_ENVELOPE_KIND_DIRECT_CONVERSATION + - RUNTIME_WORK_ENVELOPE_KIND_TICKET + - RUNTIME_WORK_ENVELOPE_KIND_CALENDAR_EVENT + - RUNTIME_WORK_ENVELOPE_KIND_PULL_REQUEST + - RUNTIME_WORK_ENVELOPE_KIND_INCIDENT + - RUNTIME_WORK_ENVELOPE_KIND_REPOSITORY + - RUNTIME_WORK_ENVELOPE_KIND_DOCUMENT + - RUNTIME_WORK_ENVELOPE_KIND_RECORD + description: |- + RuntimeWorkEnvelopeKind classifies the durable human/work object a trigger + belongs to. Envelopes group retries and follow-up messages across channels + without making the runtime depend on Slack-specific string labels. + agentruntime.v1.SurfaceInvocationControl: + type: string + title: SurfaceInvocationControl + enum: + - SURFACE_INVOCATION_CONTROL_UNSPECIFIED + - SURFACE_INVOCATION_CONTROL_WORK + - SURFACE_INVOCATION_CONTROL_CANCEL + agentruntime.v1.SurfaceTargetKind: + type: string + title: SurfaceTargetKind + enum: + - SURFACE_TARGET_KIND_UNSPECIFIED + - SURFACE_TARGET_KIND_CONVERSATION + - SURFACE_TARGET_KIND_TICKET + - SURFACE_TARGET_KIND_PULL_REQUEST + - SURFACE_TARGET_KIND_INCIDENT + - SURFACE_TARGET_KIND_REPOSITORY + - SURFACE_TARGET_KIND_DOCUMENT + - SURFACE_TARGET_KIND_RECORD + description: |- + SurfaceTargetKind classifies the provider object that owns interaction + context. It is deliberately independent of conversation channel shape. + agentruntime.v1.YieldContinuation: + type: string + title: YieldContinuation + enum: + - YIELD_CONTINUATION_UNSPECIFIED + - YIELD_CONTINUATION_INLINE_NEXT_STEP + - YIELD_CONTINUATION_SCHEDULED + - YIELD_CONTINUATION_WAIT + - YIELD_CONTINUATION_END_SESSION + description: |- + YieldContinuation describes how Platform should continue an autonomous + session after the current run releases its lease. + agents.v1.AgentStatus: + type: string + title: AgentStatus + enum: + - AGENT_STATUS_UNSPECIFIED + - AGENT_STATUS_ACTIVE + - AGENT_STATUS_IDLE + - AGENT_STATUS_BUSY + - AGENT_STATUS_OFFLINE + - AGENT_STATUS_DEGRADED + - AGENT_STATUS_SUSPENDED + description: AgentStatus describes the operational state of an agent. + agents.v1.AutonomyAuthority: + type: string + title: AutonomyAuthority + enum: + - AUTONOMY_AUTHORITY_UNSPECIFIED + - AUTONOMY_AUTHORITY_OWN + - AUTONOMY_AUTHORITY_RECOMMEND + - AUTONOMY_AUTHORITY_REQUIRE_APPROVAL + - AUTONOMY_AUTHORITY_DENY + description: AutonomyAuthority describes how independently a teammate may act. + agents.v1.CommitmentKind: + type: string + title: CommitmentKind + enum: + - COMMITMENT_KIND_UNSPECIFIED + - COMMITMENT_KIND_FOLLOW_UP + - COMMITMENT_KIND_WATCH + - COMMITMENT_KIND_RETRY + - COMMITMENT_KIND_SUMMARIZE + - COMMITMENT_KIND_MONITOR + - COMMITMENT_KIND_REMEDIATE + - COMMITMENT_KIND_HANDOFF + description: CommitmentKind describes the durable commitments a teammate can accept. + agents.v1.InitiativeTriggerKind: + type: string + title: InitiativeTriggerKind + enum: + - INITIATIVE_TRIGGER_KIND_UNSPECIFIED + - INITIATIVE_TRIGGER_KIND_SCHEDULE + - INITIATIVE_TRIGGER_KIND_SLACK_EVENT + - INITIATIVE_TRIGGER_KIND_PLATFORM_EVENT + - INITIATIVE_TRIGGER_KIND_OBJECTIVE_WAKE + - INITIATIVE_TRIGGER_KIND_WAIT_RESOLVED + - INITIATIVE_TRIGGER_KIND_EVAL_REGRESSION + - INITIATIVE_TRIGGER_KIND_STALLED_WORK + description: |- + InitiativeTriggerKind describes events that can let a teammate start work + without a fresh direct human prompt. + agents.v1.PresenceEvent: + type: string + title: PresenceEvent + enum: + - PRESENCE_EVENT_UNSPECIFIED + - PRESENCE_EVENT_ACCEPTED + - PRESENCE_EVENT_WAITING + - PRESENCE_EVENT_PROGRESS + - PRESENCE_EVENT_BLOCKED + - PRESENCE_EVENT_COMPLETED + - PRESENCE_EVENT_FAILED + - PRESENCE_EVENT_ESCALATED + description: PresenceEvent describes channel-visible teammate activity. + agents.v1.TeammateChannelCapability: + type: string + title: TeammateChannelCapability + enum: + - TEAMMATE_CHANNEL_CAPABILITY_UNSPECIFIED + - TEAMMATE_CHANNEL_CAPABILITY_INGEST + - TEAMMATE_CHANNEL_CAPABILITY_RENDER + description: |- + TeammateChannelCapability describes what a channel adapter can do for a + teammate profile. + agents.v1.TeammateChannelEventKind: + type: string + title: TeammateChannelEventKind + enum: + - TEAMMATE_CHANNEL_EVENT_KIND_UNSPECIFIED + - TEAMMATE_CHANNEL_EVENT_KIND_MESSAGE_CREATED + - TEAMMATE_CHANNEL_EVENT_KIND_THREAD_REPLY_CREATED + - TEAMMATE_CHANNEL_EVENT_KIND_COMMAND_INVOKED + - TEAMMATE_CHANNEL_EVENT_KIND_ACTION_INVOKED + - TEAMMATE_CHANNEL_EVENT_KIND_REACTION_ADDED + - TEAMMATE_CHANNEL_EVENT_KIND_REACTION_REMOVED + - TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_STARTED + - TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_CONTEXT_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_EMAIL_RECEIVED + - TEAMMATE_CHANNEL_EVENT_KIND_CALENDAR_EVENT_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_ISSUE_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_SCHEDULED_WAKE + - TEAMMATE_CHANNEL_EVENT_KIND_WEBHOOK_RECEIVED + description: |- + TeammateChannelEventKind describes normalized inbound channel events that can + become AgentRuntime triggers. + agents.v1.TeammateChannelKind: + type: string + title: TeammateChannelKind + enum: + - TEAMMATE_CHANNEL_KIND_UNSPECIFIED + - TEAMMATE_CHANNEL_KIND_SLACK + - TEAMMATE_CHANNEL_KIND_EMAIL + - TEAMMATE_CHANNEL_KIND_CALENDAR + - TEAMMATE_CHANNEL_KIND_JIRA + - TEAMMATE_CHANNEL_KIND_TEAMS + - TEAMMATE_CHANNEL_KIND_WEB + - TEAMMATE_CHANNEL_KIND_WEBHOOK + - TEAMMATE_CHANNEL_KIND_WHATSAPP + - TEAMMATE_CHANNEL_KIND_APPLE_MESSAGES + description: |- + TeammateChannelKind identifies a product or provider channel that can ingest + user activity or render teammate runtime events. It intentionally lives in + agents/v1 instead of agentruntime/v1 so teammate profiles can describe + supported channels without creating a proto import cycle. + agents.v1.TeammateLifecycle: + type: string + title: TeammateLifecycle + enum: + - TEAMMATE_LIFECYCLE_UNSPECIFIED + - TEAMMATE_LIFECYCLE_DRAFT + - TEAMMATE_LIFECYCLE_ACTIVE + - TEAMMATE_LIFECYCLE_PAUSED + - TEAMMATE_LIFECYCLE_DEPRECATED + description: |- + TeammateLifecycle describes whether a teammate profile can be used to + initiate durable work. + agents.v1.TeammateRuntimeRenderEventKind: + type: string + title: TeammateRuntimeRenderEventKind + enum: + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_UNSPECIFIED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TRIGGER_ACCEPTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RUN_STARTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_PROGRESS + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_STARTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_OBJECTIVE_UPDATED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_REQUESTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_RESOLVED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_PROPOSED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_ARTIFACT_CREATED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_MEMORY_PROPOSED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_WAITING + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RESUMED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_FAILED + description: |- + TeammateRuntimeRenderEventKind describes Platform runtime events a channel + adapter can project back into the provider surface. + codex.v1.CodexActionType: + type: string + title: CodexActionType + enum: + - CODEX_ACTION_TYPE_UNSPECIFIED + - CODEX_ACTION_TYPE_START_WORK + - CODEX_ACTION_TYPE_FOLLOW_UP + - CODEX_ACTION_TYPE_INVESTIGATE + - CODEX_ACTION_TYPE_FIX + - CODEX_ACTION_TYPE_REVIEW + - CODEX_ACTION_TYPE_TEST + - CODEX_ACTION_TYPE_EXPLAIN + - CODEX_ACTION_TYPE_RETRY + - CODEX_ACTION_TYPE_FORK + description: |- + CodexActionType describes the user intent that should shape prompting, + permissions, routing, and output expectations for a Codex run. + codex.v1.CodexAuthorityScope: + type: string + title: CodexAuthorityScope + enum: + - CODEX_AUTHORITY_SCOPE_UNSPECIFIED + - CODEX_AUTHORITY_SCOPE_DISCUSS_ONLY + - CODEX_AUTHORITY_SCOPE_READ_ONLY + - CODEX_AUTHORITY_SCOPE_WORKSPACE_WRITE + description: |- + CodexAuthorityScope is the maximum local filesystem authority requested for + delegated work. Platform policy, device mappings, and native confirmation + may only narrow this value. + codex.v1.CodexBackend: + type: string + title: CodexBackend + enum: + - CODEX_BACKEND_UNSPECIFIED + - CODEX_BACKEND_APP_SERVER + - CODEX_BACKEND_CODEX_SDK + - CODEX_BACKEND_CLAUDE_CODE + - CODEX_BACKEND_INTERNAL_AGENT + - CODEX_BACKEND_MODEL_TRIAGE + description: CodexBackend identifies the execution backend selected for a run. + codex.v1.CodexContextSourceKind: + type: string + title: CodexContextSourceKind + enum: + - CODEX_CONTEXT_SOURCE_KIND_UNSPECIFIED + - CODEX_CONTEXT_SOURCE_KIND_SLACK_MESSAGE + - CODEX_CONTEXT_SOURCE_KIND_SLACK_THREAD + - CODEX_CONTEXT_SOURCE_KIND_GITHUB_PULL_REQUEST + - CODEX_CONTEXT_SOURCE_KIND_GITHUB_ISSUE + - CODEX_CONTEXT_SOURCE_KIND_LINEAR_TICKET + - CODEX_CONTEXT_SOURCE_KIND_JIRA_TICKET + - CODEX_CONTEXT_SOURCE_KIND_SENTRY_EVENT + - CODEX_CONTEXT_SOURCE_KIND_DATADOG_DASHBOARD + - CODEX_CONTEXT_SOURCE_KIND_LOG_SNIPPET + - CODEX_CONTEXT_SOURCE_KIND_SCREENSHOT + - CODEX_CONTEXT_SOURCE_KIND_MEMORY + - CODEX_CONTEXT_SOURCE_KIND_URL + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_THING + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_FACT + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_EVENT + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_ACTION + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_PREDICTION + - CODEX_CONTEXT_SOURCE_KIND_GRANOLA_MEETING + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_EMAIL_THREAD + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_DRIVE_FILE + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_CALENDAR_EVENT + - CODEX_CONTEXT_SOURCE_KIND_DEPLOYMENT + - CODEX_CONTEXT_SOURCE_KIND_BUILD + description: |- + CodexContextSourceKind names a structured context source enriched before a + run reaches the worker. + codex.v1.CodexExecutionIntent: + type: string + title: CodexExecutionIntent + enum: + - CODEX_EXECUTION_INTENT_UNSPECIFIED + - CODEX_EXECUTION_INTENT_READ_ONLY_DIAGNOSIS + - CODEX_EXECUTION_INTENT_PATCH_AND_VERIFY + - CODEX_EXECUTION_INTENT_REVIEW_ONLY + - CODEX_EXECUTION_INTENT_TEST_AUTHORING + - CODEX_EXECUTION_INTENT_EXPLANATION + description: CodexExecutionIntent captures the expected risk and write profile. + codex.v1.CodexInteractionType: + type: string + title: CodexInteractionType + enum: + - CODEX_INTERACTION_TYPE_UNSPECIFIED + - CODEX_INTERACTION_TYPE_APPROVE_PLAN + - CODEX_INTERACTION_TYPE_REJECT_PLAN + - CODEX_INTERACTION_TYPE_APPLY_PATCH + - CODEX_INTERACTION_TYPE_DISCARD_PATCH + - CODEX_INTERACTION_TYPE_STOP_TURN + - CODEX_INTERACTION_TYPE_RETRY_TURN + - CODEX_INTERACTION_TYPE_FORK_THREAD + - CODEX_INTERACTION_TYPE_APPROVE_COMMAND + - CODEX_INTERACTION_TYPE_PROVIDE_INPUT + description: CodexInteractionType describes a channel-native control action. + codex.v1.CodexInteractivityMode: + type: string + title: CodexInteractivityMode + enum: + - CODEX_INTERACTIVITY_MODE_UNSPECIFIED + - CODEX_INTERACTIVITY_MODE_BACKGROUND + - CODEX_INTERACTIVITY_MODE_THREAD_CONVERSATION + - CODEX_INTERACTIVITY_MODE_HUMAN_APPROVAL_GATED + description: |- + CodexInteractivityMode controls how much of the run is projected back to a + human conversation surface. + codex.v1.CodexMemoryScopeKind: + type: string + title: CodexMemoryScopeKind + enum: + - CODEX_MEMORY_SCOPE_KIND_UNSPECIFIED + - CODEX_MEMORY_SCOPE_KIND_THREAD + - CODEX_MEMORY_SCOPE_KIND_REPOSITORY + - CODEX_MEMORY_SCOPE_KIND_TEAM + - CODEX_MEMORY_SCOPE_KIND_WORKSPACE + description: CodexMemoryScopeKind identifies the retrieval scope for prior run memory. + codex.v1.CodexOutputKind: + type: string + title: CodexOutputKind + enum: + - CODEX_OUTPUT_KIND_UNSPECIFIED + - CODEX_OUTPUT_KIND_THREAD_MESSAGE + - CODEX_OUTPUT_KIND_PULL_REQUEST + - CODEX_OUTPUT_KIND_PULL_REQUEST_COMMENT + - CODEX_OUTPUT_KIND_ARTIFACT + - CODEX_OUTPUT_KIND_RUN_PANEL + - CODEX_OUTPUT_KIND_EVALUATION_EXAMPLE + - CODEX_OUTPUT_KIND_DRAFT_MESSAGE + - CODEX_OUTPUT_KIND_DECISION_BRIEF + - CODEX_OUTPUT_KIND_PREPARED_FUTURE + - CODEX_OUTPUT_KIND_ISSUE + description: |- + CodexOutputKind classifies an artifact or external object the run should + create or synchronize. + codex.v1.CodexProgressStage: + type: string + title: CodexProgressStage + enum: + - CODEX_PROGRESS_STAGE_UNSPECIFIED + - CODEX_PROGRESS_STAGE_ACCEPTED + - CODEX_PROGRESS_STAGE_CONTEXT_ENRICHING + - CODEX_PROGRESS_STAGE_PLANNING + - CODEX_PROGRESS_STAGE_WAITING_FOR_APPROVAL + - CODEX_PROGRESS_STAGE_EDITING + - CODEX_PROGRESS_STAGE_TESTING + - CODEX_PROGRESS_STAGE_CREATING_OUTPUT + - CODEX_PROGRESS_STAGE_WATCHING_CI + - CODEX_PROGRESS_STAGE_COMPLETED + - CODEX_PROGRESS_STAGE_FAILED + - CODEX_PROGRESS_STAGE_CANCELLED + description: CodexProgressStage classifies user-visible run progress. + common.v1.DeliveryChannel: + type: string + title: DeliveryChannel + enum: + - DELIVERY_CHANNEL_UNSPECIFIED + - DELIVERY_CHANNEL_SLACK + - DELIVERY_CHANNEL_EMAIL + - DELIVERY_CHANNEL_WEBHOOK + - DELIVERY_CHANNEL_IN_APP + - DELIVERY_CHANNEL_PUSH + description: DeliveryChannel identifies the notification delivery channel. + common.v1.EntityType: + type: string + title: EntityType + enum: + - ENTITY_TYPE_UNSPECIFIED + - ENTITY_TYPE_CONTACT + - ENTITY_TYPE_COMPANY + - ENTITY_TYPE_DEAL + - ENTITY_TYPE_TICKET + - ENTITY_TYPE_CUSTOMER + - ENTITY_TYPE_OPPORTUNITY + description: EntityType identifies the kind of entity across systems. + common.v1.RiskLevel: + type: string + title: RiskLevel + enum: + - RISK_LEVEL_UNSPECIFIED + - RISK_LEVEL_LOW + - RISK_LEVEL_MEDIUM + - RISK_LEVEL_HIGH + - RISK_LEVEL_CRITICAL + description: RiskLevel classifies the risk of an action. + common.v1.Surface: + type: string + title: Surface + enum: + - SURFACE_UNSPECIFIED + - SURFACE_ENSEMBLE + - SURFACE_CHAT + - SURFACE_MAESTRO + - SURFACE_CONDUCTOR + - SURFACE_SLACK + - SURFACE_EXTERNAL_AGENT + description: |- + Surface identifies the product or channel surface that originated a platform + action. It is shared by runtime, audit, and product-facing services so + callers do not invent drift-prone string labels. + google.protobuf.NullValue: + type: string + title: NullValue + enum: + - NULL_VALUE + description: |- + `NullValue` is a singleton enumeration to represent the null value for the + `Value` type union. + + The JSON representation for `NullValue` is JSON `null`. + objectives.v1.MutationStatus: + type: string + title: MutationStatus + enum: + - MUTATION_STATUS_UNSPECIFIED + - MUTATION_STATUS_PENDING + - MUTATION_STATUS_APPROVED + - MUTATION_STATUS_DENIED + - MUTATION_STATUS_EXECUTED + - MUTATION_STATUS_ROLLED_BACK + description: MutationStatus describes the status of a mutation operation. + objectives.v1.ObjectiveState: + type: string + title: ObjectiveState + enum: + - OBJECTIVE_STATE_UNSPECIFIED + - OBJECTIVE_STATE_PENDING + - OBJECTIVE_STATE_RUNNING + - OBJECTIVE_STATE_BLOCKED + - OBJECTIVE_STATE_DEGRADED + - OBJECTIVE_STATE_AWAITING_APPROVAL + - OBJECTIVE_STATE_QUEUED + - OBJECTIVE_STATE_COMPLETED + - OBJECTIVE_STATE_FAILED + - OBJECTIVE_STATE_CANCELLED + description: ObjectiveState describes the lifecycle state of an objective. + agentruntime.v1.AdmitOperatingChannelEventRequest: + type: object + properties: + providerId: + type: string + title: provider_id + minLength: 1 + providerAppId: + type: string + title: provider_app_id + minLength: 1 + providerWorkspaceId: + type: string + title: provider_workspace_id + minLength: 1 + providerEnterpriseId: + type: string + title: provider_enterprise_id + sourceEventId: + type: string + title: source_event_id + minLength: 1 + sourceEventType: + type: string + title: source_event_type + minLength: 1 + providerChannelId: + type: string + title: provider_channel_id + minLength: 1 + providerRootThreadId: + type: string + title: provider_root_thread_id + minLength: 1 + providerMessageId: + type: string + title: provider_message_id + minLength: 1 + actorSubject: + type: string + title: actor_subject + minLength: 1 + normalizedText: + type: string + title: normalized_text + attachments: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.OperatingChannelAttachmentMetadata' + title: attachments + traceparent: + type: string + title: traceparent + tracestate: + type: string + title: tracestate + directConversation: + type: boolean + title: direct_conversation + explicitMention: + type: boolean + title: explicit_mention + interaction: + title: interaction + $ref: '#/components/schemas/agentruntime.v1.OperatingChannelInteraction' + slackRtsActionToken: + type: string + title: slack_rts_action_token + description: |- + Short-lived Slack RTS authority from the triggering message/app_mention. + Server-owned execution context; never forwarded to the model or receipts. + contextEntities: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.OperatingChannelContextEntity' + title: context_entities + maxItems: 20 + providerDeliveryEndpoint: + type: string + title: provider_delivery_endpoint + maxLength: 2048 + description: |- + Authenticated provider callback endpoint used only for outbound transport. + Platform validates and persists this outside model-visible context. + email: + title: email + $ref: '#/components/schemas/agentruntime.v1.OperatingChannelEmailMetadata' + title: AdmitOperatingChannelEventRequest + additionalProperties: false + description: |- + Provider-coordinate admission deliberately has no organization_id or + workspace_id fields. Those authority-bearing coordinates are resolved by + Platform through ConnectorService before any durable tenant write occurs. + agentruntime.v1.AdmitOperatingChannelEventResponse: + type: object + properties: + accepted: + type: boolean + title: accepted + duplicate: + type: boolean + title: duplicate + ignoredReason: + type: string + title: ignored_reason + conversationId: + type: string + title: conversation_id + turnId: + type: string + title: turn_id + title: AdmitOperatingChannelEventResponse + additionalProperties: false + agentruntime.v1.AdmitSurfaceInvocationRequest: + type: object + properties: + providerId: + type: string + title: provider_id + minLength: 1 + connectionId: + type: string + title: connection_id + maxLength: 512 + providerAppId: + type: string + title: provider_app_id + minLength: 1 + providerWorkspaceId: + type: string + title: provider_workspace_id + minLength: 1 + providerEnterpriseId: + type: string + title: provider_enterprise_id + maxLength: 512 + actor: + title: actor + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationActor' + target: + title: target + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationTarget' + trigger: + title: trigger + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationTrigger' + text: + type: string + title: text + maxLength: 32768 + attachments: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationAttachmentRef' + title: attachments + maxItems: 20 + contextRefs: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationContextRef' + title: context_refs + maxItems: 20 + projectionContext: + title: projection_context + $ref: '#/components/schemas/google.protobuf.Struct' + idempotencyKey: + type: string + title: idempotency_key + maxLength: 512 + minLength: 1 + traceparent: + type: string + title: traceparent + maxLength: 512 + tracestate: + type: string + title: tracestate + maxLength: 512 + contextSnapshots: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationContextSnapshot' + title: context_snapshots + maxItems: 20 + control: + title: control + $ref: '#/components/schemas/agentruntime.v1.SurfaceInvocationControl' + acknowledgementRequested: + type: boolean + title: acknowledgement_requested + description: |- + Providers with a native agent/session UI may request a fast, governed + acknowledgement projection while ordinary work continues. + title: AdmitSurfaceInvocationRequest + additionalProperties: false + description: |- + The adapter, not this request, verifies the provider-native webhook. A + surface-edge service can normalize Slack, Linear, Jira, Salesforce, + documents, incidents, and future providers into this one typed contract. + Tenant scope is absent by design and is resolved through ConnectorService. + agentruntime.v1.AdmitSurfaceInvocationResponse: + type: object + properties: + accepted: + type: boolean + title: accepted + duplicate: + type: boolean + title: duplicate + ignoredReason: + type: string + title: ignored_reason + conversationId: + type: string + title: conversation_id + turnId: + type: string + title: turn_id + title: AdmitSurfaceInvocationResponse + additionalProperties: false + agentruntime.v1.AgentAutonomySession: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + workEnvelopeId: + type: string + title: work_envelope_id + workEnvelopeKind: + title: work_envelope_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelopeKind' + channelContext: + title: channel_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelContext' + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AutonomySessionState' + processingState: + title: processing_state + $ref: '#/components/schemas/agentruntime.v1.AutonomyProcessingState' + processingSummary: + type: string + title: processing_summary + rootRunId: + type: string + title: root_run_id + activeRunId: + type: string + title: active_run_id + currentGoal: + type: string + title: current_goal + nextAction: + type: string + title: next_action + blocker: + type: string + title: blocker + processingMessageTs: + type: string + title: processing_message_ts + assistantStreamTs: + type: string + title: assistant_stream_ts + lastPresenceEventId: + type: string + title: last_presence_event_id + lastPresenceUpdateAt: + title: last_presence_update_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + finalResponsePending: + type: boolean + title: final_response_pending + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentAutonomySession + additionalProperties: false + description: |- + AgentAutonomySession is the durable teammate session projected over one + objective/work envelope. Platform owns this identity so Slack can wake, + steer, or inspect the same autonomous worker without becoming the run loop. + agentruntime.v1.AgentRun: + type: object + properties: + id: + type: string + title: id + trigger: + title: trigger + $ref: '#/components/schemas/agentruntime.v1.NormalizedTrigger' + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentRunState' + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + agentConfig: + title: agent_config + $ref: '#/components/schemas/agents.v1.AgentConfig' + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + context: + title: context + $ref: '#/components/schemas/agentruntime.v1.RuntimeContext' + workerQueue: + type: string + title: worker_queue + errorMessage: + type: string + title: error_message + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + attempt: + type: integer + title: attempt + format: int32 + maxAttempts: + type: integer + title: max_attempts + format: int32 + lease: + title: lease + $ref: '#/components/schemas/agentruntime.v1.AgentRunLease' + latestCheckpoint: + title: latest_checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + steps: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunStep' + title: steps + waits: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunWait' + title: waits + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + costs: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunCost' + title: costs + streamCursors: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunStreamCursor' + title: stream_cursors + queuedAt: + title: queued_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + startedAt: + title: started_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + waitingAt: + title: waiting_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + completedAt: + title: completed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + cancelledAt: + title: cancelled_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + nextRetryAt: + title: next_retry_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + deadLetteredAt: + title: dead_lettered_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + cancellationReason: + type: string + title: cancellation_reason + deadLetterReason: + type: string + title: dead_letter_reason + checkpoints: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + title: checkpoints + traceContext: + title: trace_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeTraceContext' + autonomySessionId: + type: string + title: autonomy_session_id + title: AgentRun + additionalProperties: false + description: |- + AgentRun is the canonical agent runtime execution record. It owns the + durable child records needed to resume from checkpoints and audit each + attempt without replaying model/tool side effects. + agentruntime.v1.AgentRunArtifact: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + stepId: + type: string + title: step_id + artifactType: + type: string + title: artifact_type + deprecated: true + uri: + type: string + title: uri + contentType: + type: string + title: content_type + digest: + type: string + title: digest + metadata: + title: metadata + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + artifactKind: + title: artifact_kind + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifactKind' + codexOutput: + title: codex_output + $ref: '#/components/schemas/codex.v1.CodexOutputTarget' + title: AgentRunArtifact + additionalProperties: false + description: AgentRunArtifact records durable output produced by a run or step. + agentruntime.v1.AgentRunCheckpoint: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + stepId: + type: string + title: step_id + sequence: + type: + - integer + - string + title: sequence + format: int64 + resumeToken: + type: string + title: resume_token + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentRunCheckpoint + additionalProperties: false + description: |- + AgentRunCheckpoint is an opaque resume snapshot. Workers can deserialize the + payload they own, restore local state, and continue from the next step. + agentruntime.v1.AgentRunCost: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + stepId: + type: string + title: step_id + meterRef: + type: string + title: meter_ref + provider: + type: string + title: provider + model: + type: string + title: model + inputTokens: + type: + - integer + - string + title: input_tokens + format: int64 + outputTokens: + type: + - integer + - string + title: output_tokens + format: int64 + totalTokens: + type: + - integer + - string + title: total_tokens + format: int64 + currency: + type: string + title: currency + estimatedCostMicros: + type: + - integer + - string + title: estimated_cost_micros + format: int64 + recordedAt: + title: recorded_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentRunCost + additionalProperties: false + description: AgentRunCost records metering information associated with a run or step. + agentruntime.v1.AgentRunLease: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + workerId: + type: string + title: worker_id + token: + type: string + title: token + workerQueue: + type: string + title: worker_queue + attempt: + type: integer + title: attempt + format: int32 + claimedAt: + title: claimed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + heartbeatAt: + title: heartbeat_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentRunLease + additionalProperties: false + description: AgentRunLease is the claim token a worker must present while mutating a run. + agentruntime.v1.AgentRunLinkage: + type: object + properties: + runId: + type: string + title: run_id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + objectiveId: + type: string + title: objective_id + title: AgentRunLinkage + additionalProperties: false + description: |- + AgentRunLinkage carries the shared identifiers every durable run record uses + for partitioning, authorization, and audit joins. + agentruntime.v1.AgentRunStep: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + name: + type: string + title: name + kind: + type: string + title: kind + deprecated: true + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentRunStepState' + attempt: + type: integer + title: attempt + format: int32 + input: + title: input + $ref: '#/components/schemas/google.protobuf.Struct' + output: + title: output + $ref: '#/components/schemas/google.protobuf.Struct' + errorMessage: + type: string + title: error_message + checkpointId: + type: string + title: checkpoint_id + startedAt: + title: started_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + endedAt: + title: ended_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + stepKind: + title: step_kind + $ref: '#/components/schemas/agentruntime.v1.AgentRunStepKind' + codexProgress: + title: codex_progress + $ref: '#/components/schemas/codex.v1.CodexRunProgress' + traceContext: + title: trace_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeTraceContext' + title: AgentRunStep + additionalProperties: false + description: AgentRunStep is one durable unit of work within a run. + agentruntime.v1.AgentRunStreamCursor: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + consumer: + type: string + title: consumer + nextSequence: + type: + - integer + - string + title: next_sequence + format: int64 + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentRunStreamCursor + additionalProperties: false + description: AgentRunStreamCursor stores a consumer cursor into the append-only event log. + agentruntime.v1.AgentRunWait: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + stepId: + type: string + title: step_id + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitType' + externalRef: + type: string + title: external_ref + reason: + type: string + title: reason + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resumeAfter: + title: resume_after + $ref: '#/components/schemas/google.protobuf.Timestamp' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resolvedAt: + title: resolved_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resolvedByEventId: + type: string + title: resolved_by_event_id + visibility: + title: visibility + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityMetadata' + codexInteraction: + title: codex_interaction + $ref: '#/components/schemas/codex.v1.CodexInteractionRequest' + title: AgentRunWait + additionalProperties: false + description: |- + AgentRunWait records a parked run. While active, the run has no lease and no + worker compute should be held. + agentruntime.v1.AgentRunWaitSummary: + type: object + properties: + runId: + type: string + title: run_id + waitId: + type: string + title: wait_id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + objectiveId: + type: string + title: objective_id + stepId: + type: string + title: step_id + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitType' + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitState' + externalRef: + type: string + title: external_ref + reason: + type: string + title: reason + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resumeAfter: + title: resume_after + $ref: '#/components/schemas/google.protobuf.Timestamp' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resolvedAt: + title: resolved_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resolvedByEventId: + type: string + title: resolved_by_event_id + visibility: + title: visibility + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityMetadata' + channelContext: + title: channel_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelContext' + workEnvelope: + title: work_envelope + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelope' + title: AgentRunWaitSummary + additionalProperties: false + agentruntime.v1.AgentWorkItem: + type: object + properties: + id: + type: string + title: id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + autonomySessionId: + type: string + title: autonomy_session_id + runId: + type: string + title: run_id + workEnvelopeId: + type: string + title: work_envelope_id + parentWorkItemId: + type: string + title: parent_work_item_id + ownerChildRunId: + type: string + title: owner_child_run_id + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItemKind' + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItemState' + title: + type: string + title: title + goal: + type: string + title: goal + nextAction: + type: string + title: next_action + blocker: + type: string + title: blocker + waitId: + type: string + title: wait_id + toolExecutionId: + type: string + title: tool_execution_id + evidenceRefs: + type: array + items: + type: string + title: evidence_refs + completionGate: + type: string + title: completion_gate + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + startedAt: + title: started_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + completedAt: + title: completed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + failedAt: + title: failed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + cancelledAt: + title: cancelled_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: AgentWorkItem + additionalProperties: false + description: |- + AgentWorkItem is one node in the autonomous work graph. Workers and + reconcilers mutate this typed record directly; VFS ledgers are projections. + agentruntime.v1.ApplyRunVirtualFileTransactionRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + transactionId: + type: string + title: transaction_id + minLength: 1 + expectedParentRevisionId: + type: string + title: expected_parent_revision_id + approverId: + type: string + title: approver_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + contextLines: + type: integer + title: context_lines + format: int32 + title: ApplyRunVirtualFileTransactionRequest + additionalProperties: false + agentruntime.v1.ApplyRunVirtualFileTransactionRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.ApplyRunVirtualFileTransactionResponse: + type: object + properties: + outcome: + title: outcome + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionOutcome' + diff: + title: diff + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionDiff' + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: files + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: ApplyRunVirtualFileTransactionResponse + additionalProperties: false + agentruntime.v1.BatchReadRunVirtualFilesRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + selector: + title: selector + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileSelector' + perFileLimit: + type: integer + title: per_file_limit + format: int32 + totalLimit: + type: integer + title: total_limit + format: int32 + limit: + type: integer + title: limit + format: int32 + title: BatchReadRunVirtualFilesRequest + additionalProperties: false + agentruntime.v1.BatchReadRunVirtualFilesResponse: + type: object + properties: + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileReadResult' + title: files + totalContentBytes: + type: integer + title: total_content_bytes + format: int32 + budgetExhausted: + type: boolean + title: budget_exhausted + skippedCount: + type: integer + title: skipped_count + format: int32 + title: BatchReadRunVirtualFilesResponse + additionalProperties: false + agentruntime.v1.BuildRunVirtualFileContextPackRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + query: + type: string + title: query + selector: + title: selector + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileSelector' + seedPaths: + type: array + items: + type: string + title: seed_paths + perFileLimit: + type: integer + title: per_file_limit + format: int32 + totalLimit: + type: integer + title: total_limit + format: int32 + limit: + type: integer + title: limit + format: int32 + title: BuildRunVirtualFileContextPackRequest + additionalProperties: false + agentruntime.v1.BuildRunVirtualFileContextPackResponse: + type: object + properties: + snippets: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileReadResult' + title: snippets + totalContentBytes: + type: integer + title: total_content_bytes + format: int32 + budgetExhausted: + type: boolean + title: budget_exhausted + skippedCount: + type: integer + title: skipped_count + format: int32 + skippedPaths: + type: array + items: + type: string + title: skipped_paths + title: BuildRunVirtualFileContextPackResponse + additionalProperties: false + agentruntime.v1.CancelRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + reason: + type: string + title: reason + title: CancelRunRequest + additionalProperties: false + agentruntime.v1.CancelRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: CancelRunResponse + additionalProperties: false + agentruntime.v1.ChannelActionActor: + type: object + properties: + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + threadId: + type: string + title: thread_id + messageId: + type: string + title: message_id + actionId: + type: string + title: action_id + callbackId: + type: string + title: callback_id + actorChannelId: + type: string + title: actor_channel_id + actorEntityId: + type: string + title: actor_entity_id + principalId: + type: string + title: principal_id + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: ChannelActionActor + additionalProperties: false + description: |- + ChannelActionActor captures the channel coordinates and resolved platform + identity for the actor who submitted an action. + agentruntime.v1.ChannelActionActor.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agentruntime.v1.ChannelActionReceipt: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + minLength: 1 + idempotencyKey: + type: string + title: idempotency_key + minLength: 1 + requestHash: + type: string + title: request_hash + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + actionKind: + title: action_kind + $ref: '#/components/schemas/agentruntime.v1.ChannelActionKind' + targetKind: + title: target_kind + $ref: '#/components/schemas/agentruntime.v1.ChannelActionTargetKind' + targetId: + type: string + title: target_id + runId: + type: string + title: run_id + waitId: + type: string + title: wait_id + approvalRequestId: + type: string + title: approval_request_id + objectiveId: + type: string + title: objective_id + actor: + title: actor + $ref: '#/components/schemas/agentruntime.v1.ChannelActionActor' + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + authorizationOutcome: + title: authorization_outcome + $ref: '#/components/schemas/agentruntime.v1.ChannelActionAuthorizationOutcome' + executionOutcome: + title: execution_outcome + $ref: '#/components/schemas/agentruntime.v1.ChannelActionExecutionOutcome' + deliveryOutcome: + title: delivery_outcome + $ref: '#/components/schemas/agentruntime.v1.ChannelActionDeliveryOutcome' + reason: + type: string + title: reason + errorReason: + type: string + title: error_reason + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + codexInteractionDecision: + title: codex_interaction_decision + $ref: '#/components/schemas/codex.v1.CodexInteractionDecision' + title: ChannelActionReceipt + additionalProperties: false + description: |- + ChannelActionReceipt is the durable audit and idempotency record for a + user-visible action submitted through a channel adapter. + agentruntime.v1.ChannelThreadAdoption: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + minLength: 1 + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + workEnvelopeId: + type: string + title: work_envelope_id + firstAdoptedRunId: + type: string + title: first_adopted_run_id + lastRunId: + type: string + title: last_run_id + firstAdoptedAt: + title: first_adopted_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + lastMessageId: + type: string + title: last_message_id + lastSourceEventId: + type: string + title: last_source_event_id + lastAdoptionReason: + type: string + title: last_adoption_reason + adoptionPolicy: + type: string + title: adoption_policy + metadata: + title: metadata + $ref: '#/components/schemas/google.protobuf.Struct' + channelContext: + title: channel_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelContext' + workEnvelope: + title: work_envelope + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelope' + organizationId: + type: string + title: organization_id + minLength: 1 + description: |- + Tenant organization that owns this adoption row. Required for shared-runtime + isolation; storage uniqueness and list filters are organization-scoped. + title: ChannelThreadAdoption + additionalProperties: false + agentruntime.v1.ClaimNextRunRequest: + type: object + properties: + workerId: + type: string + title: worker_id + minLength: 1 + workerQueue: + type: string + title: worker_queue + leaseSeconds: + type: integer + title: lease_seconds + format: int32 + title: ClaimNextRunRequest + additionalProperties: false + agentruntime.v1.ClaimNextRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + lease: + title: lease + $ref: '#/components/schemas/agentruntime.v1.AgentRunLease' + events: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: events + title: ClaimNextRunResponse + additionalProperties: false + agentruntime.v1.CompleteRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + result: + title: result + $ref: '#/components/schemas/google.protobuf.Struct' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + title: CompleteRunRequest + additionalProperties: false + agentruntime.v1.CompleteRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: CompleteRunResponse + additionalProperties: false + agentruntime.v1.ControlRunRequest: + type: object + properties: + runId: + type: string + title: run_id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + workEnvelopeId: + type: string + title: work_envelope_id + autonomySessionId: + type: string + title: autonomy_session_id + mode: + title: mode + $ref: '#/components/schemas/agentruntime.v1.RunControlMode' + message: + type: string + title: message + idempotencyKey: + type: string + title: idempotency_key + channelContext: + title: channel_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelContext' + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + visibility: + title: visibility + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityMetadata' + title: ControlRunRequest + additionalProperties: false + agentruntime.v1.ControlRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + controlId: + type: string + title: control_id + cancelled: + type: boolean + title: cancelled + queuedForWorker: + type: boolean + title: queued_for_worker + title: ControlRunResponse + additionalProperties: false + agentruntime.v1.DeadLetterRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + reason: + type: string + title: reason + title: DeadLetterRunRequest + additionalProperties: false + agentruntime.v1.DeadLetterRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: DeadLetterRunResponse + additionalProperties: false + agentruntime.v1.DiffRunVirtualFileTransactionRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + transactionId: + type: string + title: transaction_id + minLength: 1 + contextLines: + type: integer + title: context_lines + format: int32 + title: DiffRunVirtualFileTransactionRequest + additionalProperties: false + agentruntime.v1.DiffRunVirtualFileTransactionResponse: + type: object + properties: + diff: + title: diff + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionDiff' + title: DiffRunVirtualFileTransactionResponse + additionalProperties: false + agentruntime.v1.EnsureOrganizationEmailRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + minLength: 1 + workspaceId: + type: string + title: workspace_id + minLength: 1 + title: EnsureOrganizationEmailRequest + additionalProperties: false + description: Identity supplies these coordinates from its approved organization directory. + agentruntime.v1.EnsureOrganizationEmailResponse: + type: object + properties: + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + mailbox: + type: string + title: mailbox + connectionId: + type: string + title: connection_id + title: EnsureOrganizationEmailResponse + additionalProperties: false + agentruntime.v1.FailRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + errorMessage: + type: string + title: error_message + minLength: 1 + retryable: + type: boolean + title: retryable + retryDelaySeconds: + type: integer + title: retry_delay_seconds + format: int32 + title: FailRunRequest + additionalProperties: false + agentruntime.v1.FailRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: FailRunResponse + additionalProperties: false + agentruntime.v1.GetChannelActionReceiptRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: GetChannelActionReceiptRequest + additionalProperties: false + agentruntime.v1.GetChannelActionReceiptResponse: + type: object + properties: + receipt: + title: receipt + $ref: '#/components/schemas/agentruntime.v1.ChannelActionReceipt' + title: GetChannelActionReceiptResponse + additionalProperties: false + agentruntime.v1.GetChannelThreadAdoptionRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + minLength: 1 + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + includeExpired: + type: boolean + title: include_expired + organizationId: + type: string + title: organization_id + minLength: 1 + title: GetChannelThreadAdoptionRequest + additionalProperties: false + agentruntime.v1.GetChannelThreadAdoptionResponse: + type: object + properties: + adoption: + title: adoption + $ref: '#/components/schemas/agentruntime.v1.ChannelThreadAdoption' + title: GetChannelThreadAdoptionResponse + additionalProperties: false + agentruntime.v1.GetRunRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: GetRunRequest + additionalProperties: false + agentruntime.v1.GetRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + title: GetRunResponse + additionalProperties: false + agentruntime.v1.GetTeammateWorkLedgerRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + title: GetTeammateWorkLedgerRequest + additionalProperties: false + agentruntime.v1.GetTeammateWorkLedgerResponse: + type: object + properties: + ledger: + title: ledger + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedger' + ledgerFile: + title: ledger_file + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: GetTeammateWorkLedgerResponse + additionalProperties: false + agentruntime.v1.HandleTriggerRequest: + type: object + properties: + trigger: + title: trigger + $ref: '#/components/schemas/agentruntime.v1.NormalizedTrigger' + title: HandleTriggerRequest + required: + - trigger + additionalProperties: false + agentruntime.v1.HandleTriggerResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + events: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: events + idempotentReplay: + type: boolean + title: idempotent_replay + title: HandleTriggerResponse + additionalProperties: false + agentruntime.v1.HeartbeatRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + extendSeconds: + type: integer + title: extend_seconds + format: int32 + title: HeartbeatRunRequest + additionalProperties: false + agentruntime.v1.HeartbeatRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + lease: + title: lease + $ref: '#/components/schemas/agentruntime.v1.AgentRunLease' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: HeartbeatRunResponse + additionalProperties: false + agentruntime.v1.HydrateRunVirtualFileMountRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + mount: + type: string + title: mount + minLength: 1 + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + query: + type: string + title: query + limit: + type: integer + title: limit + format: int32 + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + idempotencyKey: + type: string + title: idempotency_key + title: HydrateRunVirtualFileMountRequest + additionalProperties: false + agentruntime.v1.HydrateRunVirtualFileMountRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.HydrateRunVirtualFileMountResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: files + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: HydrateRunVirtualFileMountResponse + additionalProperties: false + agentruntime.v1.InspectRunVirtualFilesRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + title: InspectRunVirtualFilesRequest + additionalProperties: false + agentruntime.v1.InspectRunVirtualFilesResponse: + type: object + properties: + summary: + title: summary + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileInspectorSummary' + mounts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileInspectorMount' + title: mounts + transactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileInspectorTransaction' + title: transactions + entries: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + title: entries + producers: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileInspectorProducer' + title: producers + title: InspectRunVirtualFilesResponse + additionalProperties: false + agentruntime.v1.ListChannelActionReceiptsRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + idempotencyKey: + type: string + title: idempotency_key + actorEntityId: + type: string + title: actor_entity_id + targetKind: + title: target_kind + $ref: '#/components/schemas/agentruntime.v1.ChannelActionTargetKind' + targetId: + type: string + title: target_id + runId: + type: string + title: run_id + waitId: + type: string + title: wait_id + approvalRequestId: + type: string + title: approval_request_id + objectiveId: + type: string + title: objective_id + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + threadId: + type: string + title: thread_id + messageId: + type: string + title: message_id + actionId: + type: string + title: action_id + limit: + type: integer + title: limit + format: int32 + title: ListChannelActionReceiptsRequest + additionalProperties: false + agentruntime.v1.ListChannelActionReceiptsResponse: + type: object + properties: + receipts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.ChannelActionReceipt' + title: receipts + title: ListChannelActionReceiptsResponse + additionalProperties: false + agentruntime.v1.ListChannelThreadAdoptionsRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + threadId: + type: string + title: thread_id + workEnvelopeId: + type: string + title: work_envelope_id + includeExpired: + type: boolean + title: include_expired + limit: + type: integer + title: limit + format: int32 + organizationId: + type: string + title: organization_id + minLength: 1 + description: |- + Organization scope for list filtering. Required so a shared Agent Runtime + database cannot return another tenant's adoption projection for a reused + workspace id. + title: ListChannelThreadAdoptionsRequest + additionalProperties: false + agentruntime.v1.ListChannelThreadAdoptionsResponse: + type: object + properties: + adoptions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.ChannelThreadAdoption' + title: adoptions + title: ListChannelThreadAdoptionsResponse + additionalProperties: false + agentruntime.v1.ListRunEventsRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + audience: + title: audience + $ref: '#/components/schemas/agentruntime.v1.RuntimeAudience' + pageSize: + type: integer + title: page_size + format: int32 + pageToken: + type: string + title: page_token + title: ListRunEventsRequest + additionalProperties: false + agentruntime.v1.ListRunEventsResponse: + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: events + nextPageToken: + type: string + title: next_page_token + title: ListRunEventsResponse + additionalProperties: false + agentruntime.v1.ListRunVirtualFilesRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + pathPrefix: + type: string + title: path_prefix + limit: + type: integer + title: limit + format: int32 + includeTombstones: + type: boolean + title: include_tombstones + title: ListRunVirtualFilesRequest + additionalProperties: false + agentruntime.v1.ListRunVirtualFilesResponse: + type: object + properties: + entries: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + title: entries + title: ListRunVirtualFilesResponse + additionalProperties: false + agentruntime.v1.ListRunWaitsRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + runId: + type: string + title: run_id + agentId: + type: string + title: agent_id + objectiveId: + type: string + title: objective_id + workEnvelopeId: + type: string + title: work_envelope_id + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitState' + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitType' + audience: + title: audience + $ref: '#/components/schemas/agentruntime.v1.RuntimeAudience' + limit: + type: integer + title: limit + format: int32 + pageToken: + type: string + title: page_token + externalRef: + type: string + title: external_ref + description: |- + external_ref filters waits by their external join key, such as an + approvals.v1 ApprovalRequest id carried by desktop-control approval waits. + title: ListRunWaitsRequest + additionalProperties: false + agentruntime.v1.ListRunWaitsResponse: + type: object + properties: + waits: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitSummary' + title: waits + nextPageToken: + type: string + title: next_page_token + title: ListRunWaitsResponse + additionalProperties: false + agentruntime.v1.ListRunWorkItemsRequest: + type: object + properties: + runId: + type: string + title: run_id + workspaceId: + type: string + title: workspace_id + workEnvelopeId: + type: string + title: work_envelope_id + autonomySessionId: + type: string + title: autonomy_session_id + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItemState' + limit: + type: integer + title: limit + format: int32 + title: ListRunWorkItemsRequest + additionalProperties: false + agentruntime.v1.ListRunWorkItemsResponse: + type: object + properties: + workItems: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItem' + title: work_items + title: ListRunWorkItemsResponse + additionalProperties: false + agentruntime.v1.ListRunsByWorkEnvelopeRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + workEnvelopeId: + type: string + title: work_envelope_id + minLength: 1 + limit: + type: integer + title: limit + format: int32 + title: ListRunsByWorkEnvelopeRequest + additionalProperties: false + agentruntime.v1.ListRunsByWorkEnvelopeResponse: + type: object + properties: + runs: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + title: runs + title: ListRunsByWorkEnvelopeResponse + additionalProperties: false + agentruntime.v1.NativeAgentEventEvidence: + type: object + properties: + evidenceState: + title: evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + principalEvidenceState: + title: principal_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + credentialEvidenceState: + title: credential_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + costEvidenceState: + title: cost_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + nativeSource: + title: native_source + $ref: '#/components/schemas/agentruntime.v1.NativeAgentEventSource' + nativeKind: + type: string + title: native_kind + minLength: 1 + sourceEventId: + type: string + title: source_event_id + minLength: 1 + sourceEventType: + type: string + title: source_event_type + minLength: 1 + sourceEventTime: + title: source_event_time + $ref: '#/components/schemas/google.protobuf.Timestamp' + tenantId: + type: string + title: tenant_id + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + minLength: 1 + sessionId: + type: string + title: session_id + agentRunId: + type: string + title: agent_run_id + minLength: 1 + agentRunStepId: + type: string + title: agent_run_step_id + agentId: + type: string + title: agent_id + actorId: + type: string + title: actor_id + principalId: + type: string + title: principal_id + threadId: + type: string + title: thread_id + turnId: + type: string + title: turn_id + traceId: + type: string + title: trace_id + requestId: + type: string + title: request_id + responseId: + type: string + title: response_id + parentEventId: + type: string + title: parent_event_id + toolCallId: + type: string + title: tool_call_id + toolExecutionId: + type: string + title: tool_execution_id + actionId: + type: string + title: action_id + toolNamespace: + type: string + title: tool_namespace + toolName: + type: string + title: tool_name + toolVersion: + type: string + title: tool_version + capability: + type: string + title: capability + connectorId: + type: string + title: connector_id + mutatesResource: + type: boolean + title: mutates_resource + riskLevel: + title: risk_level + $ref: '#/components/schemas/common.v1.RiskLevel' + argumentsRedacted: + type: boolean + title: arguments_redacted + outputRedacted: + type: boolean + title: output_redacted + safeArgumentsRef: + type: string + title: safe_arguments_ref + safeArgumentsSha256: + type: string + title: safe_arguments_sha256 + safeArgumentsKeyCount: + type: integer + title: safe_arguments_key_count + format: int32 + safeOutputRef: + type: string + title: safe_output_ref + safeOutputSha256: + type: string + title: safe_output_sha256 + safeOutputKeyCount: + type: integer + title: safe_output_key_count + format: int32 + redactionCount: + type: integer + title: redaction_count + format: int32 + redactions: + type: array + items: + type: string + title: redactions + evidenceGaps: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceGap' + title: evidence_gaps + schema: + type: string + title: schema + minLength: 1 + title: NativeAgentEventEvidence + required: + - sourceEventTime + additionalProperties: false + description: |- + NativeAgentEventEvidence is the typed receipt primitive for safe native + Agent Workforce events from Maestro and Codex. It carries source/correlation + identifiers, redaction metadata, and safe refs only; raw prompts, tool + arguments, shell output, MCP result bodies, image bytes, transcripts, token + values, provider response bodies, and credential grants must not be copied + here. + agentruntime.v1.NativeToolAttemptEvidence: + type: object + properties: + evidenceState: + title: evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + credentialEvidenceState: + title: credential_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + nativeKind: + type: string + title: native_kind + minLength: 1 + sourceEventId: + type: string + title: source_event_id + minLength: 1 + sourceEventType: + type: string + title: source_event_type + sourceEventSource: + type: string + title: source_event_source + sourceEventSubject: + type: string + title: source_event_subject + tenantId: + type: string + title: tenant_id + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + minLength: 1 + sessionId: + type: string + title: session_id + agentRunId: + type: string + title: agent_run_id + minLength: 1 + agentRunStepId: + type: string + title: agent_run_step_id + agentId: + type: string + title: agent_id + actorId: + type: string + title: actor_id + principalId: + type: string + title: principal_id + traceId: + type: string + title: trace_id + requestId: + type: string + title: request_id + responseId: + type: string + title: response_id + parentEventId: + type: string + title: parent_event_id + toolCallId: + type: string + title: tool_call_id + minLength: 1 + toolExecutionId: + type: string + title: tool_execution_id + toolNamespace: + type: string + title: tool_namespace + toolName: + type: string + title: tool_name + minLength: 1 + toolVersion: + type: string + title: tool_version + capability: + type: string + title: capability + connectorId: + type: string + title: connector_id + mutatesResource: + type: boolean + title: mutates_resource + riskLevel: + title: risk_level + $ref: '#/components/schemas/common.v1.RiskLevel' + argumentsRedacted: + type: boolean + title: arguments_redacted + safeArgumentsRef: + type: string + title: safe_arguments_ref + safeArgumentsSha256: + type: string + title: safe_arguments_sha256 + safeArgumentsKeyCount: + type: integer + title: safe_arguments_key_count + format: int32 + redactionCount: + type: integer + title: redaction_count + format: int32 + redactions: + type: array + items: + type: string + title: redactions + evidenceGaps: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceGap' + title: evidence_gaps + sourceEventTime: + title: source_event_time + $ref: '#/components/schemas/google.protobuf.Timestamp' + principalEvidenceState: + title: principal_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + costEvidenceState: + title: cost_evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + title: NativeToolAttemptEvidence + additionalProperties: false + description: |- + NativeToolAttemptEvidence is the typed Platform primitive for answering + "What did the agent try to do?" from a native Maestro/Codex tool-attempt + event. It intentionally carries only redaction-safe identifiers, summaries, + and digest references; raw prompts, tool arguments, and credential grants + must not be copied here. + agentruntime.v1.NormalizedTrigger: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + minLength: 1 + surface: + type: string + title: surface + deprecated: true + channelId: + type: string + title: channel_id + description: |- + Deprecated flat channel field. New callers should send channel_context; + the runtime normalizes this field for legacy consumers and idempotency + joins. + idempotencyKey: + type: string + title: idempotency_key + minLength: 1 + sourceEventId: + type: string + title: source_event_id + sourceEventType: + type: string + title: source_event_type + deprecated: true + actorId: + type: string + title: actor_id + correlationId: + type: string + title: correlation_id + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + receivedAt: + title: received_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + channelContext: + title: channel_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelContext' + triggerKind: + title: trigger_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeTriggerKind' + workEnvelope: + title: work_envelope + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelope' + codexWork: + title: codex_work + $ref: '#/components/schemas/codex.v1.CodexWorkRequest' + proactiveContext: + title: proactive_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeProactiveContext' + objectiveId: + type: string + title: objective_id + description: |- + objective_id binds a trigger to an already-created Objective. Console and + other product surfaces use this when the user message first creates the + Objective, so AgentRuntime does not have to rediscover the active goal. + organizationId: + type: string + title: organization_id + minLength: 1 + title: NormalizedTrigger + additionalProperties: false + description: |- + NormalizedTrigger is the source-neutral trigger contract. Surface is an enum + so product callers share one durable taxonomy across Slack, Ensemble, Chat, + Maestro, and Conductor. The legacy string field remains for wire-compatible + migration of early callers. + agentruntime.v1.OperatingChannelAttachmentMetadata: + type: object + properties: + providerAttachmentId: + type: string + title: provider_attachment_id + minLength: 1 + kind: + type: string + title: kind + mediaType: + type: string + title: media_type + name: + type: string + title: name + sizeBytes: + type: + - integer + - string + title: size_bytes + format: int64 + title: OperatingChannelAttachmentMetadata + additionalProperties: false + description: |- + Safe attachment metadata accepted from a channel edge. Provider download + URLs, credentials, and raw attachment bodies are intentionally excluded. + agentruntime.v1.OperatingChannelContextEntity: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.OperatingChannelContextEntityKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + maxLength: 512 + minLength: 1 + providerChannelId: + type: string + title: provider_channel_id + maxLength: 512 + providerMessageId: + type: string + title: provider_message_id + maxLength: 512 + providerResourceId: + type: string + title: provider_resource_id + maxLength: 512 + title: OperatingChannelContextEntity + additionalProperties: false + agentruntime.v1.OperatingChannelEmailMetadata: + type: object + properties: + mailbox: + type: string + title: mailbox + maxLength: 254 + sender: + type: string + title: sender + maxLength: 254 + subject: + type: string + title: subject + maxLength: 512 + title: OperatingChannelEmailMetadata + additionalProperties: false + description: |- + Email reply coordinates authenticated by the email edge and validated against + the resolved mailbox installation before persistence. Never model authority. + agentruntime.v1.OperatingChannelInteraction: + type: object + properties: + actionId: + type: string + title: action_id + maxLength: 128 + minLength: 1 + actionToken: + type: string + title: action_token + maxLength: 4096 + minLength: 1 + actionTimestamp: + type: string + title: action_timestamp + maxLength: 64 + minLength: 1 + title: OperatingChannelInteraction + additionalProperties: false + description: |- + A bounded interactive action submitted by a signed channel edge. The token + is opaque to the edge and must be validated by Platform before it resolves + any canonical receipt, question, or session control. + agentruntime.v1.PromoteRunVirtualFileTransactionRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + transactionId: + type: string + title: transaction_id + minLength: 1 + expectedParentRevisionId: + type: string + title: expected_parent_revision_id + approverId: + type: string + title: approver_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + title: PromoteRunVirtualFileTransactionRequest + additionalProperties: false + agentruntime.v1.PromoteRunVirtualFileTransactionRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.PromoteRunVirtualFileTransactionResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: files + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: PromoteRunVirtualFileTransactionResponse + additionalProperties: false + agentruntime.v1.ReadRunVirtualFileRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + path: + type: string + title: path + minLength: 1 + offset: + type: integer + title: offset + format: int32 + limit: + type: integer + title: limit + format: int32 + includeTombstones: + type: boolean + title: include_tombstones + title: ReadRunVirtualFileRequest + additionalProperties: false + agentruntime.v1.ReadRunVirtualFileResponse: + type: object + properties: + entry: + title: entry + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + content: + type: string + title: content + offset: + type: integer + title: offset + format: int32 + nextOffset: + type: integer + title: next_offset + format: int32 + eof: + type: boolean + title: eof + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + title: ReadRunVirtualFileResponse + additionalProperties: false + agentruntime.v1.RebaseRunVirtualFileTransactionRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + sourceTransactionId: + type: string + title: source_transaction_id + minLength: 1 + transactionId: + type: string + title: transaction_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + idempotencyKey: + type: string + title: idempotency_key + contextLines: + type: integer + title: context_lines + format: int32 + title: RebaseRunVirtualFileTransactionRequest + additionalProperties: false + agentruntime.v1.RebaseRunVirtualFileTransactionRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RebaseRunVirtualFileTransactionResponse: + type: object + properties: + outcome: + title: outcome + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionOutcome' + sourceTransactionId: + type: string + title: source_transaction_id + transactionId: + type: string + title: transaction_id + diff: + title: diff + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionDiff' + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: files + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RebaseRunVirtualFileTransactionResponse + additionalProperties: false + agentruntime.v1.RecordChannelActionReceiptRequest: + type: object + properties: + receipt: + title: receipt + $ref: '#/components/schemas/agentruntime.v1.ChannelActionReceipt' + title: RecordChannelActionReceiptRequest + required: + - receipt + additionalProperties: false + agentruntime.v1.RecordChannelActionReceiptResponse: + type: object + properties: + receipt: + title: receipt + $ref: '#/components/schemas/agentruntime.v1.ChannelActionReceipt' + idempotentReplay: + type: boolean + title: idempotent_replay + title: RecordChannelActionReceiptResponse + additionalProperties: false + agentruntime.v1.RecordChannelThreadAdoptionRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + minLength: 1 + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + messageId: + type: string + title: message_id + sourceEventId: + type: string + title: source_event_id + adoptionReason: + type: string + title: adoption_reason + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + workEnvelopeId: + type: string + title: work_envelope_id + metadata: + title: metadata + $ref: '#/components/schemas/google.protobuf.Struct' + organizationId: + type: string + title: organization_id + minLength: 1 + title: RecordChannelThreadAdoptionRequest + additionalProperties: false + agentruntime.v1.RecordChannelThreadAdoptionResponse: + type: object + properties: + adoption: + title: adoption + $ref: '#/components/schemas/agentruntime.v1.ChannelThreadAdoption' + title: RecordChannelThreadAdoptionResponse + additionalProperties: false + agentruntime.v1.RecordRunArtifactRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + artifact: + title: artifact + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: RecordRunArtifactRequest + required: + - artifact + additionalProperties: false + agentruntime.v1.RecordRunArtifactResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifact: + title: artifact + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunArtifactResponse + additionalProperties: false + agentruntime.v1.RecordRunCheckpointRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + title: RecordRunCheckpointRequest + required: + - checkpoint + additionalProperties: false + agentruntime.v1.RecordRunCheckpointResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunCheckpointResponse + additionalProperties: false + agentruntime.v1.RecordRunCostRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + cost: + title: cost + $ref: '#/components/schemas/agentruntime.v1.AgentRunCost' + title: RecordRunCostRequest + required: + - cost + additionalProperties: false + agentruntime.v1.RecordRunCostResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + cost: + title: cost + $ref: '#/components/schemas/agentruntime.v1.AgentRunCost' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunCostResponse + additionalProperties: false + agentruntime.v1.RecordRunEventRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.RuntimeEventType' + message: + type: string + title: message + minLength: 1 + attributes: + title: attributes + $ref: '#/components/schemas/google.protobuf.Struct' + stepId: + type: string + title: step_id + checkpointId: + type: string + title: checkpoint_id + artifactId: + type: string + title: artifact_id + costId: + type: string + title: cost_id + waitId: + type: string + title: wait_id + visibility: + title: visibility + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityMetadata' + nativeToolAttempt: + title: native_tool_attempt + $ref: '#/components/schemas/agentruntime.v1.NativeToolAttemptEvidence' + nativeAgentEvent: + title: native_agent_event + $ref: '#/components/schemas/agentruntime.v1.NativeAgentEventEvidence' + title: RecordRunEventRequest + additionalProperties: false + agentruntime.v1.RecordRunEventResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunEventResponse + additionalProperties: false + agentruntime.v1.RecordRunStepRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + step: + title: step + $ref: '#/components/schemas/agentruntime.v1.AgentRunStep' + title: RecordRunStepRequest + required: + - step + additionalProperties: false + agentruntime.v1.RecordRunStepResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + step: + title: step + $ref: '#/components/schemas/agentruntime.v1.AgentRunStep' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunStepResponse + additionalProperties: false + agentruntime.v1.RecordRunStreamCursorRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + cursor: + title: cursor + $ref: '#/components/schemas/agentruntime.v1.AgentRunStreamCursor' + title: RecordRunStreamCursorRequest + required: + - cursor + additionalProperties: false + agentruntime.v1.RecordRunStreamCursorResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + cursor: + title: cursor + $ref: '#/components/schemas/agentruntime.v1.AgentRunStreamCursor' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunStreamCursorResponse + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileProposalRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + path: + type: string + title: path + minLength: 1 + mediaType: + type: string + title: media_type + content: + type: string + title: content + proposalKind: + type: string + title: proposal_kind + stepId: + type: string + title: step_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + idempotencyKey: + type: string + title: idempotency_key + sensitivity: + title: sensitivity + $ref: '#/components/schemas/agentruntime.v1.RuntimeSensitivity' + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + title: RecordRunVirtualFileProposalRequest + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileProposalRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileProposalResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifact: + title: artifact + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + file: + title: file + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunVirtualFileProposalResponse + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileTransactionRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + transactionId: + type: string + title: transaction_id + parentRevisionId: + type: string + title: parent_revision_id + changes: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileChange' + title: changes + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + idempotencyKey: + type: string + title: idempotency_key + title: RecordRunVirtualFileTransactionRequest + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileTransactionRequest.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RecordRunVirtualFileTransactionResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + artifacts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentRunArtifact' + title: artifacts + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: files + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunVirtualFileTransactionResponse + additionalProperties: false + agentruntime.v1.RecordRunWorkItemRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + workItem: + title: work_item + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItem' + title: RecordRunWorkItemRequest + required: + - workItem + additionalProperties: false + agentruntime.v1.RecordRunWorkItemResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + workItem: + title: work_item + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItem' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RecordRunWorkItemResponse + additionalProperties: false + agentruntime.v1.RenewRunLeaseRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + extendSeconds: + type: integer + title: extend_seconds + format: int32 + title: RenewRunLeaseRequest + additionalProperties: false + agentruntime.v1.RenewRunLeaseResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + lease: + title: lease + $ref: '#/components/schemas/agentruntime.v1.AgentRunLease' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + renewedAfterExpiry: + type: boolean + title: renewed_after_expiry + title: RenewRunLeaseResponse + additionalProperties: false + agentruntime.v1.ResumeRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + waitId: + type: string + title: wait_id + minLength: 1 + resumeEventId: + type: string + title: resume_event_id + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + codexInteractionDecision: + title: codex_interaction_decision + $ref: '#/components/schemas/codex.v1.CodexInteractionDecision' + title: ResumeRunRequest + additionalProperties: false + agentruntime.v1.ResumeRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: ResumeRunResponse + additionalProperties: false + agentruntime.v1.RetryRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + retryDelaySeconds: + type: integer + title: retry_delay_seconds + format: int32 + reason: + type: string + title: reason + title: RetryRunRequest + additionalProperties: false + agentruntime.v1.RetryRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: RetryRunResponse + additionalProperties: false + agentruntime.v1.RuntimeCalendarEventCoordinates: + type: object + properties: + connectionId: + type: string + title: connection_id + minLength: 1 + calendarId: + type: string + title: calendar_id + minLength: 1 + eventId: + type: string + title: event_id + minLength: 1 + recurringSeriesId: + type: string + title: recurring_series_id + recurringInstanceId: + type: string + title: recurring_instance_id + providerRevision: + type: string + title: provider_revision + title: RuntimeCalendarEventCoordinates + additionalProperties: false + description: RuntimeCalendarEventCoordinates identifies one event or recurring instance. + agentruntime.v1.RuntimeCerebroFactsContext: + type: object + properties: + provider: + type: string + title: provider + workspaceId: + type: string + title: workspace_id + query: + type: string + title: query + thingIds: + type: array + items: + type: string + title: thing_ids + factIds: + type: array + items: + type: string + title: fact_ids + eventIds: + type: array + items: + type: string + title: event_ids + sourceHealthSummary: + title: source_health_summary + $ref: '#/components/schemas/agentruntime.v1.RuntimeSourceHealthSummary' + beliefDebugSummary: + type: string + title: belief_debug_summary + rolloutId: + type: string + title: rollout_id + rolloutSummary: + type: string + title: rollout_summary + rolloutResult: + type: string + title: rollout_result + retrievalCounts: + type: object + title: retrieval_counts + additionalProperties: + type: + - integer + - string + title: value + format: int64 + title: RuntimeCerebroFactsContext + additionalProperties: false + description: |- + RuntimeCerebroFactsContext carries the identifiers and retrieval counts that + let AgentRuntime, Ensemble, and operators trace a proactive run back to + Cerebro without parsing payload maps. + agentruntime.v1.RuntimeCerebroFactsContext.RetrievalCountsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: + - integer + - string + title: value + format: int64 + title: RetrievalCountsEntry + additionalProperties: false + agentruntime.v1.RuntimeChannelContext: + type: object + oneOf: + - properties: + calendar: + title: calendar + $ref: '#/components/schemas/agentruntime.v1.RuntimeCalendarEventCoordinates' + title: calendar + required: + - calendar + - properties: + email: + title: email + $ref: '#/components/schemas/agentruntime.v1.RuntimeEmailThreadCoordinates' + title: email + required: + - email + - properties: + slack: + title: slack + $ref: '#/components/schemas/agentruntime.v1.RuntimeSlackThreadCoordinates' + title: slack + required: + - slack + - properties: + teams: + title: teams + $ref: '#/components/schemas/agentruntime.v1.RuntimeTeamsThreadCoordinates' + title: teams + required: + - teams + - properties: + web: + title: web + $ref: '#/components/schemas/agentruntime.v1.RuntimeWebConversationCoordinates' + title: web + required: + - web + - properties: + whatsapp: + title: whatsapp + $ref: '#/components/schemas/agentruntime.v1.RuntimeWhatsAppConversationCoordinates' + title: whatsapp + required: + - whatsapp + properties: + calendar: + title: calendar + $ref: '#/components/schemas/agentruntime.v1.RuntimeCalendarEventCoordinates' + email: + title: email + $ref: '#/components/schemas/agentruntime.v1.RuntimeEmailThreadCoordinates' + slack: + title: slack + $ref: '#/components/schemas/agentruntime.v1.RuntimeSlackThreadCoordinates' + teams: + title: teams + $ref: '#/components/schemas/agentruntime.v1.RuntimeTeamsThreadCoordinates' + web: + title: web + $ref: '#/components/schemas/agentruntime.v1.RuntimeWebConversationCoordinates' + whatsapp: + title: whatsapp + $ref: '#/components/schemas/agentruntime.v1.RuntimeWhatsAppConversationCoordinates' + channelKind: + title: channel_kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeChannelKind' + providerWorkspaceId: + type: string + title: provider_workspace_id + channelId: + type: string + title: channel_id + threadId: + type: string + title: thread_id + messageId: + type: string + title: message_id + actorId: + type: string + title: actor_id + description: |- + Deprecated overloaded actor field. New Slack and channel adapters should + set actor_channel_id for the provider-local respondent, actor_entity_id for + the resolved canonical entity, and principal_id for the authenticated + platform principal when available. + permalink: + type: string + title: permalink + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + actorChannelId: + type: string + title: actor_channel_id + actorEntityId: + type: string + title: actor_entity_id + principalId: + type: string + title: principal_id + title: RuntimeChannelContext + additionalProperties: false + description: |- + RuntimeChannelContext carries stable channel coordinates for channel + adapters. Slack teammates use provider_workspace_id for team_id, channel_id + for the conversation, thread_id for the Slack thread_ts, and message_id for + the triggering message/event timestamp. + agentruntime.v1.RuntimeChannelContext.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agentruntime.v1.RuntimeContext: + type: object + properties: + dependencies: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeDependency' + title: dependencies + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + virtualFiles: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFile' + title: virtual_files + teammateCapabilityProfile: + title: teammate_capability_profile + description: |- + Typed profile for persistent teammate runtime capabilities. Workers and + channel renderers should use this field as the source of truth; any VFS + JSON projection is only a compatibility/read surface. + $ref: '#/components/schemas/agentruntime.v1.TeammateCapabilityProfile' + title: RuntimeContext + additionalProperties: false + description: RuntimeContext captures the boundary decisions used to construct a run. + agentruntime.v1.RuntimeContext.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agentruntime.v1.RuntimeDependency: + type: object + properties: + service: + type: string + title: service + minLength: 1 + purpose: + type: string + title: purpose + required: + type: boolean + title: required + status: + type: string + title: status + deprecated: true + referenceId: + type: string + title: reference_id + statusType: + title: status_type + $ref: '#/components/schemas/agentruntime.v1.RuntimeDependencyStatus' + title: RuntimeDependency + additionalProperties: false + description: RuntimeDependency names one platform service boundary the runtime depends on. + agentruntime.v1.RuntimeEmailThreadCoordinates: + type: object + properties: + connectionId: + type: string + title: connection_id + minLength: 1 + mailboxId: + type: string + title: mailbox_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + messageId: + type: string + title: message_id + providerRevision: + type: string + title: provider_revision + title: RuntimeEmailThreadCoordinates + additionalProperties: false + description: RuntimeEmailThreadCoordinates identifies one provider mailbox thread. + agentruntime.v1.RuntimeEvent: + type: object + properties: + id: + type: string + title: id + runId: + type: string + title: run_id + sequence: + type: + - integer + - string + title: sequence + format: int64 + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.RuntimeEventType' + message: + type: string + title: message + attributes: + title: attributes + $ref: '#/components/schemas/google.protobuf.Struct' + occurredAt: + title: occurred_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + stepId: + type: string + title: step_id + checkpointId: + type: string + title: checkpoint_id + artifactId: + type: string + title: artifact_id + costId: + type: string + title: cost_id + waitId: + type: string + title: wait_id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + visibility: + title: visibility + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityMetadata' + codexProgress: + title: codex_progress + $ref: '#/components/schemas/codex.v1.CodexRunProgress' + codexInteraction: + title: codex_interaction + $ref: '#/components/schemas/codex.v1.CodexInteractionRequest' + codexOutcome: + title: codex_outcome + $ref: '#/components/schemas/codex.v1.CodexOutcomeSignal' + traceContext: + title: trace_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeTraceContext' + nativeToolAttempt: + title: native_tool_attempt + $ref: '#/components/schemas/agentruntime.v1.NativeToolAttemptEvidence' + nativeAgentEvent: + title: native_agent_event + $ref: '#/components/schemas/agentruntime.v1.NativeAgentEventEvidence' + title: RuntimeEvent + additionalProperties: false + description: |- + RuntimeEvent is appended, never mutated, for AgentRun state transitions and + runtime orchestration decisions. + agentruntime.v1.RuntimeEvidenceGap: + type: object + properties: + reason: + title: reason + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceGapReason' + evidenceState: + title: evidence_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvidenceState' + message: + type: string + title: message + source: + type: string + title: source + sourceEventId: + type: string + title: source_event_id + runtimeEventId: + type: string + title: runtime_event_id + traceId: + type: string + title: trace_id + approvalBlocking: + type: boolean + title: approval_blocking + title: RuntimeEvidenceGap + additionalProperties: false + description: |- + RuntimeEvidenceGap records a typed, safe reason why a runtime observation is + not yet approval-ready. It carries only proof-state metadata and debug refs; + raw credentials, grants, prompts, and tool arguments must not be copied here. + agentruntime.v1.RuntimeProactiveContext: + type: object + properties: + proactiveRuntime: + type: boolean + title: proactive_runtime + proactiveIngest: + type: string + title: proactive_ingest + sourceEvent: + title: source_event + $ref: '#/components/schemas/agentruntime.v1.RuntimeProactiveSourceEvent' + thingIds: + type: array + items: + type: string + title: thing_ids + actionClass: + type: string + title: action_class + riskLevel: + type: string + title: risk_level + externalSideEffect: + type: boolean + title: external_side_effect + factsContext: + title: facts_context + $ref: '#/components/schemas/agentruntime.v1.RuntimeCerebroFactsContext' + policy: + title: policy + $ref: '#/components/schemas/agentruntime.v1.RuntimeProactivePolicy' + title: RuntimeProactiveContext + additionalProperties: false + description: |- + RuntimeProactiveContext is the first-class proactive trigger envelope. It + keeps event identity, policy hints, risk hints, and Cerebro context out of + ad hoc trigger payload conventions. + agentruntime.v1.RuntimeProactivePolicy: + type: object + properties: + wakeEnabled: + type: boolean + title: wake_enabled + nullable: true + triggerKinds: + type: array + items: + type: string + title: trigger_kinds + allowCustomerFacing: + type: boolean + title: allow_customer_facing + postRunStarted: + type: boolean + title: post_run_started + title: RuntimeProactivePolicy + additionalProperties: false + description: |- + RuntimeProactivePolicy carries teammate/channel wake controls in the same + trigger contract that AgentRuntime admission evaluates. + agentruntime.v1.RuntimeProactiveSourceEvent: + type: object + properties: + stream: + type: string + title: stream + subject: + type: string + title: subject + sequence: + type: + - integer + - string + title: sequence + format: int64 + eventId: + type: string + title: event_id + eventFamily: + type: string + title: event_family + eventType: + type: string + title: event_type + providerObjectId: + type: string + title: provider_object_id + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + providerRevision: + type: string + title: provider_revision + title: RuntimeProactiveSourceEvent + additionalProperties: false + description: |- + RuntimeProactiveSourceEvent identifies the upstream event that caused a + proactive trigger candidate without copying the full source payload into the + runtime record. + agentruntime.v1.RuntimeRedaction: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedactionKind' + fieldPath: + type: string + title: field_path + replacement: + type: string + title: replacement + reason: + type: string + title: reason + title: RuntimeRedaction + additionalProperties: false + description: |- + RuntimeRedaction records one projected field or payload category that has + been redacted for channel/user display. + agentruntime.v1.RuntimeSlackThreadCoordinates: + type: object + properties: + providerWorkspaceId: + type: string + title: provider_workspace_id + minLength: 1 + channelId: + type: string + title: channel_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + messageId: + type: string + title: message_id + title: RuntimeSlackThreadCoordinates + additionalProperties: false + description: RuntimeSlackThreadCoordinates identifies one Slack conversation thread. + agentruntime.v1.RuntimeSourceHealthSummary: + type: object + properties: + status: + type: string + title: status + checkedSources: + type: array + items: + type: string + title: checked_sources + staleSources: + type: array + items: + type: string + title: stale_sources + summary: + type: string + title: summary + title: RuntimeSourceHealthSummary + additionalProperties: false + description: |- + RuntimeSourceHealthSummary is the compact source-health projection used by + proactive runtime context. Cerebro remains the source of truth for detailed + health records. + agentruntime.v1.RuntimeTeamsThreadCoordinates: + type: object + properties: + tenantId: + type: string + title: tenant_id + minLength: 1 + conversationId: + type: string + title: conversation_id + minLength: 1 + threadId: + type: string + title: thread_id + minLength: 1 + messageId: + type: string + title: message_id + title: RuntimeTeamsThreadCoordinates + additionalProperties: false + description: |- + RuntimeTeamsThreadCoordinates identifies one Microsoft Teams chat or channel + thread. tenant_id is the Microsoft tenant, conversation_id is the channel or + chat, and thread_id is the reply-chain root (the message itself when there is + no thread). + agentruntime.v1.RuntimeTraceContext: + type: object + properties: + traceId: + type: string + title: trace_id + spanId: + type: string + title: span_id + parentSpanId: + type: string + title: parent_span_id + traceparent: + type: string + title: traceparent + tracestate: + type: string + title: tracestate + title: RuntimeTraceContext + additionalProperties: false + description: |- + RuntimeTraceContext captures the W3C trace context that causally owns a + durable AgentRun lifecycle record. It is persisted with runs, events, and + steps so retries, worker claims, and parked waits can resume the same + distributed trace instead of starting unrelated service-local traces. + agentruntime.v1.RuntimeVirtualFile: + type: object + properties: + path: + type: string + title: path + minLength: 1 + mediaType: + type: string + title: media_type + content: + type: string + title: content + sourceService: + type: string + title: source_service + sourceReferenceId: + type: string + title: source_reference_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + provenance: + title: provenance + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileProvenance' + sensitivity: + title: sensitivity + $ref: '#/components/schemas/agentruntime.v1.RuntimeSensitivity' + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + title: RuntimeVirtualFile + additionalProperties: false + description: |- + RuntimeVirtualFile is a read-only file projected into an agent run from + platform services. It lets workers consume rich context through a stable VFS + instead of parsing flat runtime attributes. + agentruntime.v1.RuntimeVirtualFile.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileChange: + type: object + properties: + path: + type: string + title: path + minLength: 1 + mediaType: + type: string + title: media_type + content: + type: string + title: content + proposalKind: + type: string + title: proposal_kind + stepId: + type: string + title: step_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + sensitivity: + title: sensitivity + $ref: '#/components/schemas/agentruntime.v1.RuntimeSensitivity' + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + operation: + title: operation + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileOperation' + renameFrom: + type: string + title: rename_from + title: RuntimeVirtualFileChange + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileChange.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileDiffHunk: + type: object + properties: + oldStartLine: + type: integer + title: old_start_line + format: int32 + oldLineCount: + type: integer + title: old_line_count + format: int32 + newStartLine: + type: integer + title: new_start_line + format: int32 + newLineCount: + type: integer + title: new_line_count + format: int32 + header: + type: string + title: header + unifiedDiff: + type: string + title: unified_diff + title: RuntimeVirtualFileDiffHunk + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileEntry: + type: object + properties: + path: + type: string + title: path + mediaType: + type: string + title: media_type + sourceService: + type: string + title: source_service + sourceReferenceId: + type: string + title: source_reference_id + metadata: + type: object + title: metadata + additionalProperties: + type: string + title: value + sizeBytes: + type: + - integer + - string + title: size_bytes + format: int64 + contentSha256: + type: string + title: content_sha256 + contentTruncated: + type: boolean + title: content_truncated + mount: + type: string + title: mount + kind: + type: string + title: kind + permissions: + type: string + title: permissions + view: + type: string + title: view + revisionId: + type: string + title: revision_id + parentRevisionId: + type: string + title: parent_revision_id + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + cachePolicy: + type: string + title: cache_policy + policy: + type: string + title: policy + lazy: + type: boolean + title: lazy + secretRefCount: + type: integer + title: secret_ref_count + format: int32 + cerebroIndex: + type: string + title: cerebro_index + contentAddress: + type: string + title: content_address + provenance: + title: provenance + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileProvenance' + sensitivity: + title: sensitivity + $ref: '#/components/schemas/agentruntime.v1.RuntimeSensitivity' + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + operation: + title: operation + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileOperation' + tombstone: + type: boolean + title: tombstone + renameFrom: + type: string + title: rename_from + renameTo: + type: string + title: rename_to + capabilities: + type: array + items: + type: string + title: capabilities + writable: + type: boolean + title: writable + readOnly: + type: boolean + title: read_only + generated: + type: boolean + title: generated + evidenceBacked: + type: boolean + title: evidence_backed + externallyIndexed: + type: boolean + title: externally_indexed + title: RuntimeVirtualFileEntry + additionalProperties: false + description: |- + RuntimeVirtualFileEntry is an ls/stat-friendly projection of one virtual + file. It intentionally omits content so callers can discover before reading. + agentruntime.v1.RuntimeVirtualFileEntry.MetadataEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: MetadataEntry + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileInspectorMount: + type: object + properties: + path: + type: string + title: path + fileCount: + type: integer + title: file_count + format: int32 + sizeBytes: + type: + - integer + - string + title: size_bytes + format: int64 + lazy: + type: boolean + title: lazy + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + cachePolicy: + type: string + title: cache_policy + policy: + type: string + title: policy + cerebroIndex: + type: string + title: cerebro_index + secretRefCount: + type: integer + title: secret_ref_count + format: int32 + sourceServices: + type: array + items: + type: string + title: source_services + previewOnlyFileCount: + type: integer + title: preview_only_file_count + format: int32 + deniedFileCount: + type: integer + title: denied_file_count + format: int32 + restrictedFileCount: + type: integer + title: restricted_file_count + format: int32 + capabilities: + type: array + items: + type: string + title: capabilities + writable: + type: boolean + title: writable + readOnly: + type: boolean + title: read_only + generated: + type: boolean + title: generated + evidenceBacked: + type: boolean + title: evidence_backed + externallyIndexed: + type: boolean + title: externally_indexed + title: RuntimeVirtualFileInspectorMount + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileInspectorProducer: + type: object + properties: + producerService: + type: string + title: producer_service + producerKind: + type: string + title: producer_kind + fileCount: + type: integer + title: file_count + format: int32 + revisionCount: + type: integer + title: revision_count + format: int32 + runtimeEventIds: + type: array + items: + type: string + title: runtime_event_ids + artifactIds: + type: array + items: + type: string + title: artifact_ids + stepIds: + type: array + items: + type: string + title: step_ids + toolExecutionIds: + type: array + items: + type: string + title: tool_execution_ids + traceIds: + type: array + items: + type: string + title: trace_ids + hydrationIds: + type: array + items: + type: string + title: hydration_ids + transactionIds: + type: array + items: + type: string + title: transaction_ids + parentRevisionIds: + type: array + items: + type: string + title: parent_revision_ids + title: RuntimeVirtualFileInspectorProducer + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileInspectorSummary: + type: object + properties: + fileCount: + type: integer + title: file_count + format: int32 + mountCount: + type: integer + title: mount_count + format: int32 + transactionCount: + type: integer + title: transaction_count + format: int32 + lazyMountCount: + type: integer + title: lazy_mount_count + format: int32 + hydratedFileCount: + type: integer + title: hydrated_file_count + format: int32 + cerebroCandidateCount: + type: integer + title: cerebro_candidate_count + format: int32 + cerebroReadyCount: + type: integer + title: cerebro_ready_count + format: int32 + acceptedFileCount: + type: integer + title: accepted_file_count + format: int32 + contentAddressCount: + type: integer + title: content_address_count + format: int32 + hydrationCacheHitCount: + type: integer + title: hydration_cache_hit_count + format: int32 + staleTransactionCount: + type: integer + title: stale_transaction_count + format: int32 + shadowedFileCount: + type: integer + title: shadowed_file_count + format: int32 + producerCount: + type: integer + title: producer_count + format: int32 + previewOnlyFileCount: + type: integer + title: preview_only_file_count + format: int32 + deniedFileCount: + type: integer + title: denied_file_count + format: int32 + restrictedFileCount: + type: integer + title: restricted_file_count + format: int32 + tombstoneFileCount: + type: integer + title: tombstone_file_count + format: int32 + deleteFileCount: + type: integer + title: delete_file_count + format: int32 + renameFileCount: + type: integer + title: rename_file_count + format: int32 + title: RuntimeVirtualFileInspectorSummary + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileInspectorTransaction: + type: object + properties: + transactionId: + type: string + title: transaction_id + view: + type: string + title: view + parentRevisionId: + type: string + title: parent_revision_id + fileCount: + type: integer + title: file_count + format: int32 + policy: + type: string + title: policy + cerebroIndex: + type: string + title: cerebro_index + contentAddresses: + type: array + items: + type: string + title: content_addresses + tombstoneFileCount: + type: integer + title: tombstone_file_count + format: int32 + deleteFileCount: + type: integer + title: delete_file_count + format: int32 + renameFileCount: + type: integer + title: rename_file_count + format: int32 + title: RuntimeVirtualFileInspectorTransaction + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileMatch: + type: object + properties: + path: + type: string + title: path + lineNumber: + type: integer + title: line_number + format: int32 + snippet: + type: string + title: snippet + mount: + type: string + title: mount + sourceService: + type: string + title: source_service + beforeContext: + type: array + items: + type: string + title: before_context + afterContext: + type: array + items: + type: string + title: after_context + score: + type: integer + title: score + format: int32 + matchReasons: + type: array + items: + type: string + title: match_reasons + view: + type: string + title: view + kind: + type: string + title: kind + transactionId: + type: string + title: transaction_id + title: RuntimeVirtualFileMatch + additionalProperties: false + description: RuntimeVirtualFileMatch is one bounded search match in a virtual file. + agentruntime.v1.RuntimeVirtualFileProvenance: + type: object + properties: + producerService: + type: string + title: producer_service + producerKind: + type: string + title: producer_kind + sourceReferenceId: + type: string + title: source_reference_id + runtimeEventId: + type: string + title: runtime_event_id + artifactId: + type: string + title: artifact_id + stepId: + type: string + title: step_id + toolExecutionId: + type: string + title: tool_execution_id + hydrationId: + type: string + title: hydration_id + transactionId: + type: string + title: transaction_id + promotionId: + type: string + title: promotion_id + evidenceHandle: + type: string + title: evidence_handle + traceId: + type: string + title: trace_id + spanId: + type: string + title: span_id + parentRevisionIds: + type: array + items: + type: string + title: parent_revision_ids + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + title: RuntimeVirtualFileProvenance + additionalProperties: false + description: |- + RuntimeVirtualFileProvenance is the typed causal projection for a VFS + revision. Producers still preserve legacy metadata keys, but workers should + prefer this shape when explaining, citing, promoting, or rebasing files. + agentruntime.v1.RuntimeVirtualFileReadResult: + type: object + properties: + path: + type: string + title: path + entry: + title: entry + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + content: + type: string + title: content + offset: + type: integer + title: offset + format: int32 + nextOffset: + type: integer + title: next_offset + format: int32 + eof: + type: boolean + title: eof + skipped: + type: boolean + title: skipped + skipReason: + type: string + title: skip_reason + citation: + type: string + title: citation + rank: + type: integer + title: rank + format: int32 + rankReason: + type: string + title: rank_reason + reasonCode: + title: reason_code + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileReasonCode' + redactionState: + title: redaction_state + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileRedactionState' + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + title: RuntimeVirtualFileReadResult + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileSelector: + type: object + properties: + paths: + type: array + items: + type: string + title: paths + pathPrefix: + type: string + title: path_prefix + views: + type: array + items: + type: string + title: views + kinds: + type: array + items: + type: string + title: kinds + mounts: + type: array + items: + type: string + title: mounts + transactionIds: + type: array + items: + type: string + title: transaction_ids + policies: + type: array + items: + type: string + title: policies + sourceServices: + type: array + items: + type: string + title: source_services + cerebroIndexes: + type: array + items: + type: string + title: cerebro_indexes + includeTombstones: + type: boolean + title: include_tombstones + title: RuntimeVirtualFileSelector + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileTransactionConflict: + type: object + properties: + path: + type: string + title: path + reasonCode: + title: reason_code + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileReasonCode' + applyStatus: + title: apply_status + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionApplyStatus' + message: + type: string + title: message + parentRevisionId: + type: string + title: parent_revision_id + baseRevisionId: + type: string + title: base_revision_id + currentRevisionId: + type: string + title: current_revision_id + proposedRevisionId: + type: string + title: proposed_revision_id + hunks: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileDiffHunk' + title: hunks + title: RuntimeVirtualFileTransactionConflict + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileTransactionDiff: + type: object + properties: + transactionId: + type: string + title: transaction_id + files: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionFileDiff' + title: files + unifiedDiff: + type: string + title: unified_diff + fileCount: + type: integer + title: file_count + format: int32 + changedFileCount: + type: integer + title: changed_file_count + format: int32 + additions: + type: integer + title: additions + format: int32 + deletions: + type: integer + title: deletions + format: int32 + stale: + type: boolean + title: stale + outcome: + title: outcome + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionOutcome' + conflicts: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionConflict' + title: conflicts + title: RuntimeVirtualFileTransactionDiff + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileTransactionFileDiff: + type: object + properties: + path: + type: string + title: path + operation: + title: operation + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileOperation' + applyStatus: + title: apply_status + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileTransactionApplyStatus' + parentRevisionId: + type: string + title: parent_revision_id + baseRevisionId: + type: string + title: base_revision_id + currentRevisionId: + type: string + title: current_revision_id + proposedRevisionId: + type: string + title: proposed_revision_id + baseContentSha256: + type: string + title: base_content_sha256 + currentContentSha256: + type: string + title: current_content_sha256 + proposedContentSha256: + type: string + title: proposed_content_sha256 + additions: + type: integer + title: additions + format: int32 + deletions: + type: integer + title: deletions + format: int32 + binary: + type: boolean + title: binary + tombstone: + type: boolean + title: tombstone + renameFrom: + type: string + title: rename_from + renameTo: + type: string + title: rename_to + unifiedDiff: + type: string + title: unified_diff + hunks: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileDiffHunk' + title: hunks + title: RuntimeVirtualFileTransactionFileDiff + additionalProperties: false + agentruntime.v1.RuntimeVirtualFileWatchEvent: + type: object + properties: + cursor: + type: string + title: cursor + operation: + type: string + title: operation + path: + type: string + title: path + revisionId: + type: string + title: revision_id + parentRevisionId: + type: string + title: parent_revision_id + transactionId: + type: string + title: transaction_id + view: + type: string + title: view + spanId: + type: string + title: span_id + evidenceHandle: + type: string + title: evidence_handle + runtimeEventId: + type: string + title: runtime_event_id + artifactId: + type: string + title: artifact_id + traceId: + type: string + title: trace_id + hydrationId: + type: string + title: hydration_id + promotionId: + type: string + title: promotion_id + producerService: + type: string + title: producer_service + producerKind: + type: string + title: producer_kind + occurredAt: + title: occurred_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + checkpointId: + type: string + title: checkpoint_id + entry: + title: entry + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + title: RuntimeVirtualFileWatchEvent + additionalProperties: false + agentruntime.v1.RuntimeVisibilityMetadata: + type: object + properties: + level: + title: level + $ref: '#/components/schemas/agentruntime.v1.RuntimeVisibilityLevel' + audiences: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeAudience' + title: audiences + sensitivity: + title: sensitivity + $ref: '#/components/schemas/agentruntime.v1.RuntimeSensitivity' + safeSummary: + type: string + title: safe_summary + redactions: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeRedaction' + title: redactions + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: RuntimeVisibilityMetadata + additionalProperties: false + description: |- + RuntimeVisibilityMetadata carries the projection policy for runtime events + and waits. Safe summaries are required when visibility is user/channel + visible so clients never need to render raw internal payloads. + agentruntime.v1.RuntimeVisibilityMetadata.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agentruntime.v1.RuntimeWebConversationCoordinates: + type: object + properties: + conversationId: + type: string + title: conversation_id + minLength: 1 + messageId: + type: string + title: message_id + title: RuntimeWebConversationCoordinates + additionalProperties: false + description: RuntimeWebConversationCoordinates identifies a Platform-owned web thread. + agentruntime.v1.RuntimeWhatsAppConversationCoordinates: + type: object + properties: + wabaId: + type: string + title: waba_id + minLength: 1 + phoneNumberId: + type: string + title: phone_number_id + minLength: 1 + chatId: + type: string + title: chat_id + minLength: 1 + messageId: + type: string + title: message_id + title: RuntimeWhatsAppConversationCoordinates + additionalProperties: false + description: |- + RuntimeWhatsAppConversationCoordinates identifies one WhatsApp Business + conversation. chat_id is the peer wa_id for a 1:1 chat or the group id. + agentruntime.v1.RuntimeWorkEnvelope: + type: object + properties: + id: + type: string + title: id + minLength: 1 + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelopeKind' + rootId: + type: string + title: root_id + parentId: + type: string + title: parent_id + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: RuntimeWorkEnvelope + additionalProperties: false + description: |- + RuntimeWorkEnvelope identifies the durable work object that groups related + normalized triggers. For Slack this is usually a conversation thread; future + adapters can map email threads, Jira tickets, calendar events, and Teams + threads into the same runtime primitive. + agentruntime.v1.RuntimeWorkEnvelope.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agentruntime.v1.SearchRunVirtualFilesRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + query: + type: string + title: query + minLength: 1 + pathPrefix: + type: string + title: path_prefix + limit: + type: integer + title: limit + format: int32 + selector: + title: selector + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileSelector' + regex: + type: boolean + title: regex + contextLines: + type: integer + title: context_lines + format: int32 + caseSensitive: + type: boolean + title: case_sensitive + title: SearchRunVirtualFilesRequest + additionalProperties: false + agentruntime.v1.SearchRunVirtualFilesResponse: + type: object + properties: + matches: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileMatch' + title: matches + totalMatches: + type: integer + title: total_matches + format: int32 + limitExhausted: + type: boolean + title: limit_exhausted + title: SearchRunVirtualFilesResponse + additionalProperties: false + agentruntime.v1.StatRunVirtualFileRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + path: + type: string + title: path + minLength: 1 + includeTombstones: + type: boolean + title: include_tombstones + title: StatRunVirtualFileRequest + additionalProperties: false + agentruntime.v1.StatRunVirtualFileResponse: + type: object + properties: + entry: + title: entry + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileEntry' + title: StatRunVirtualFileResponse + additionalProperties: false + agentruntime.v1.SurfaceInvocationActor: + type: object + properties: + externalId: + type: string + title: external_id + minLength: 1 + displayName: + type: string + title: display_name + maxLength: 512 + title: SurfaceInvocationActor + additionalProperties: false + agentruntime.v1.SurfaceInvocationAttachmentRef: + type: object + properties: + externalId: + type: string + title: external_id + minLength: 1 + name: + type: string + title: name + minLength: 1 + contentType: + type: string + title: content_type + maxLength: 255 + canonicalUrl: + type: string + title: canonical_url + maxLength: 2048 + title: SurfaceInvocationAttachmentRef + additionalProperties: false + agentruntime.v1.SurfaceInvocationContextRef: + type: object + properties: + kind: + type: string + title: kind + minLength: 1 + externalId: + type: string + title: external_id + minLength: 1 + canonicalUrl: + type: string + title: canonical_url + maxLength: 2048 + title: SurfaceInvocationContextRef + additionalProperties: false + agentruntime.v1.SurfaceInvocationContextSnapshot: + type: object + properties: + sourceKind: + type: string + title: source_kind + maxLength: 128 + minLength: 1 + sourceExternalId: + type: string + title: source_external_id + maxLength: 512 + minLength: 1 + sourceRevision: + type: string + title: source_revision + maxLength: 512 + sourcePayloadSha256: + type: string + title: source_payload_sha256 + pattern: ^[0-9a-f]{64}$ + description: |- + Digest of the complete authenticated provider payload or governed read + response from which `content` was selected. + observedAt: + title: observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + content: + title: content + $ref: '#/components/schemas/google.protobuf.Struct' + title: SurfaceInvocationContextSnapshot + additionalProperties: false + description: |- + A bounded provider-native context snapshot captured by the authenticated + edge. `content` is model-visible context, while the remaining fields bind it + to the provider read or signed delivery that produced it. Snapshots confer + no tenant or mutation authority. + agentruntime.v1.SurfaceInvocationTarget: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.SurfaceTargetKind' + externalId: + type: string + title: external_id + minLength: 1 + parentExternalId: + type: string + title: parent_external_id + maxLength: 512 + revision: + type: string + title: revision + maxLength: 512 + canonicalUrl: + type: string + title: canonical_url + maxLength: 2048 + title: SurfaceInvocationTarget + additionalProperties: false + agentruntime.v1.SurfaceInvocationTrigger: + type: object + properties: + kind: + type: string + title: kind + minLength: 1 + externalId: + type: string + title: external_id + minLength: 1 + title: SurfaceInvocationTrigger + additionalProperties: false + agentruntime.v1.TeammateCapability: + type: object + properties: + id: + type: string + title: id + owner: + type: string + title: owner + contractPaths: + type: array + items: + type: string + title: contract_paths + rpcs: + type: array + items: + type: string + title: rpcs + isolation: + type: string + title: isolation + slackVisible: + type: boolean + title: slack_visible + requiresLease: + type: boolean + title: requires_lease + proposalOnly: + type: boolean + title: proposal_only + evidenceBacked: + type: boolean + title: evidence_backed + title: TeammateCapability + additionalProperties: false + description: TeammateCapability is one Platform-owned capability made available to a run. + agentruntime.v1.TeammateCapabilityProfile: + type: object + properties: + schemaVersion: + type: string + title: schema_version + runId: + type: string + title: run_id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + workEnvelopeId: + type: string + title: work_envelope_id + workEnvelopeKind: + type: string + title: work_envelope_kind + surface: + type: string + title: surface + channelKind: + type: string + title: channel_kind + executionOwner: + type: string + title: execution_owner + channelIngressOwner: + type: string + title: channel_ingress_owner + channelRenderer: + type: string + title: channel_renderer + schedulerOwner: + type: string + title: scheduler_owner + memoryOwner: + type: string + title: memory_owner + evidenceOwner: + type: string + title: evidence_owner + privilegeModel: + type: string + title: privilege_model + alwaysOn: + type: boolean + title: always_on + ambient: + type: boolean + title: ambient + capabilities: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.TeammateCapability' + title: capabilities + executionPath: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.TeammateExecutionStep' + title: execution_path + isolationBoundaries: + type: array + items: + type: string + title: isolation_boundaries + contextPaths: + type: array + items: + type: string + title: context_paths + guardrails: + type: array + items: + type: string + title: guardrails + title: TeammateCapabilityProfile + additionalProperties: false + description: |- + TeammateCapabilityProfile describes the runtime capability and isolation + contract Platform grants to a persistent teammate run. + agentruntime.v1.TeammateExecutionStep: + type: object + properties: + id: + type: string + title: id + owner: + type: string + title: owner + reads: + type: array + items: + type: string + title: reads + writes: + type: array + items: + type: string + title: writes + rpcs: + type: array + items: + type: string + title: rpcs + isolation: + type: string + title: isolation + slackBehavior: + type: string + title: slack_behavior + title: TeammateExecutionStep + additionalProperties: false + description: TeammateExecutionStep is the concise ownership path for capability use. + agentruntime.v1.TeammateWorkLedger: + type: object + properties: + schemaVersion: + type: string + title: schema_version + runId: + type: string + title: run_id + linkage: + title: linkage + $ref: '#/components/schemas/agentruntime.v1.AgentRunLinkage' + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentRunState' + objectiveTitle: + type: string + title: objective_title + workerQueue: + type: string + title: worker_queue + attempt: + type: integer + title: attempt + format: int32 + workEnvelopeId: + type: string + title: work_envelope_id + workEnvelopeKind: + type: string + title: work_envelope_kind + workstreamId: + type: string + title: workstream_id + nextAction: + type: string + title: next_action + blockers: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerBlocker' + title: blockers + connectorAccess: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerConnectorAccess' + title: connector_access + memoryCitations: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerMemoryCitation' + title: memory_citations + vfsSummary: + title: vfs_summary + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerVfsSummary' + cerebroContext: + title: cerebro_context + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerCerebroContext' + proactivePolicy: + title: proactive_policy + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerProactivePolicy' + channelStatus: + title: channel_status + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerChannelStatus' + evidencePaths: + type: array + items: + type: string + title: evidence_paths + handoffPolicy: + type: string + title: handoff_policy + resumeCheckpointPath: + type: string + title: resume_checkpoint_path + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + eventCount: + type: integer + title: event_count + format: int32 + activeWorkItems: + type: array + items: + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItem' + title: active_work_items + activeWorkItemCount: + type: integer + title: active_work_item_count + format: int32 + blockedWorkItemCount: + type: integer + title: blocked_work_item_count + format: int32 + title: TeammateWorkLedger + additionalProperties: false + description: |- + TeammateWorkLedger is the compact, durable read model a persistent digital + teammate uses to resume work, explain what it has actually checked, and keep + Slack or other human-facing channels clean while tool-heavy work happens + under the hood. + agentruntime.v1.TeammateWorkLedgerBlocker: + type: object + properties: + waitId: + type: string + title: wait_id + type: + title: type + $ref: '#/components/schemas/agentruntime.v1.AgentRunWaitType' + reason: + type: string + title: reason + externalRef: + type: string + title: external_ref + resumeAfter: + title: resume_after + $ref: '#/components/schemas/google.protobuf.Timestamp' + visibilitySummary: + type: string + title: visibility_summary + resumeContract: + title: resume_contract + $ref: '#/components/schemas/agentruntime.v1.TeammateWorkLedgerWaitResumeContract' + title: TeammateWorkLedgerBlocker + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerCerebroContext: + type: object + properties: + provider: + type: string + title: provider + query: + type: string + title: query + thingIds: + type: array + items: + type: string + title: thing_ids + factIds: + type: array + items: + type: string + title: fact_ids + eventIds: + type: array + items: + type: string + title: event_ids + eligibleFileCount: + type: integer + title: eligible_file_count + format: int32 + title: TeammateWorkLedgerCerebroContext + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerChannelStatus: + type: object + properties: + channelKind: + type: string + title: channel_kind + channelId: + type: string + title: channel_id + threadId: + type: string + title: thread_id + lastVisibleEventId: + type: string + title: last_visible_event_id + lastVisibleSummary: + type: string + title: last_visible_summary + processingState: + title: processing_state + $ref: '#/components/schemas/agentruntime.v1.AutonomyProcessingState' + processingSummary: + type: string + title: processing_summary + processingMessageTs: + type: string + title: processing_message_ts + assistantStreamTs: + type: string + title: assistant_stream_ts + lastPresenceEventId: + type: string + title: last_presence_event_id + lastPresenceUpdateAt: + title: last_presence_update_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + finalResponsePending: + type: boolean + title: final_response_pending + autonomySessionId: + type: string + title: autonomy_session_id + title: TeammateWorkLedgerChannelStatus + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerConnectorAccess: + type: object + properties: + mountPath: + type: string + title: mount_path + providerId: + type: string + title: provider_id + connectionId: + type: string + title: connection_id + capabilities: + type: array + items: + type: string + title: capabilities + grantRequired: + type: boolean + title: grant_required + leasePolicy: + type: string + title: lease_policy + identityMode: + type: string + title: identity_mode + credentialVersionStrategy: + type: string + title: credential_version_strategy + secretRefCount: + type: integer + title: secret_ref_count + format: int32 + credentialRefNames: + type: array + items: + type: string + title: credential_ref_names + title: TeammateWorkLedgerConnectorAccess + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerMemoryCitation: + type: object + properties: + memoryId: + type: string + title: memory_id + memoryType: + type: string + title: memory_type + source: + type: string + title: source + sourceUris: + type: array + items: + type: string + title: source_uris + supersedesMemoryId: + type: string + title: supersedes_memory_id + supersededByMemoryId: + type: string + title: superseded_by_memory_id + reviewStatus: + type: string + title: review_status + entityIds: + type: array + items: + type: string + title: entity_ids + contentPreview: + type: string + title: content_preview + title: TeammateWorkLedgerMemoryCitation + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerProactivePolicy: + type: object + properties: + enabled: + type: boolean + title: enabled + triggerKinds: + type: array + items: + type: string + title: trigger_kinds + progressUpdateTriggers: + type: array + items: + type: string + title: progress_update_triggers + presencePolicy: + type: string + title: presence_policy + updateBudget: + type: integer + title: update_budget + format: int32 + title: TeammateWorkLedgerProactivePolicy + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerVfsSummary: + type: object + properties: + fileCount: + type: integer + title: file_count + format: int32 + mountCount: + type: integer + title: mount_count + format: int32 + connectorMountCount: + type: integer + title: connector_mount_count + format: int32 + memoryRecordCount: + type: integer + title: memory_record_count + format: int32 + transactionCount: + type: integer + title: transaction_count + format: int32 + cerebroIndexEligibleFileCount: + type: integer + title: cerebro_index_eligible_file_count + format: int32 + hasResumeCheckpoint: + type: boolean + title: has_resume_checkpoint + title: TeammateWorkLedgerVfsSummary + additionalProperties: false + agentruntime.v1.TeammateWorkLedgerWaitResumeContract: + type: object + properties: + schemaVersion: + type: string + title: schema_version + resumeRpc: + type: string + title: resume_rpc + lookupRpc: + type: string + title: lookup_rpc + lookupExternalRefField: + type: string + title: lookup_external_ref_field + requiredResumeFields: + type: array + items: + type: string + title: required_resume_fields + allowedDecisions: + type: array + items: + type: string + title: allowed_decisions + channelActionValueFields: + type: array + items: + type: string + title: channel_action_value_fields + idempotencyJoinKey: + type: string + title: idempotency_join_key + approvalRequestId: + type: string + title: approval_request_id + requiresSafeSummary: + type: boolean + title: requires_safe_summary + title: TeammateWorkLedgerWaitResumeContract + additionalProperties: false + description: |- + TeammateWorkLedgerWaitResumeContract makes parked-run resumption + machine-readable for channel adapters and workers. Slack actions can carry + only the compact value fields, then resolve the durable wait through + ListRunWaits before calling ResumeRun. + agentruntime.v1.UpdateRunWorkItemRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + workItemId: + type: string + title: work_item_id + minLength: 1 + state: + title: state + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItemState' + nextAction: + type: string + title: next_action + nullable: true + blocker: + type: string + title: blocker + nullable: true + waitId: + type: string + title: wait_id + nullable: true + toolExecutionId: + type: string + title: tool_execution_id + nullable: true + evidenceRefs: + type: array + items: + type: string + title: evidence_refs + completionGate: + type: string + title: completion_gate + nullable: true + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + title: UpdateRunWorkItemRequest + additionalProperties: false + agentruntime.v1.UpdateRunWorkItemResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + workItem: + title: work_item + $ref: '#/components/schemas/agentruntime.v1.AgentWorkItem' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: UpdateRunWorkItemResponse + additionalProperties: false + agentruntime.v1.WaitRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + wait: + title: wait + $ref: '#/components/schemas/agentruntime.v1.AgentRunWait' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + title: WaitRunRequest + required: + - wait + additionalProperties: false + agentruntime.v1.WaitRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + wait: + title: wait + $ref: '#/components/schemas/agentruntime.v1.AgentRunWait' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + title: WaitRunResponse + additionalProperties: false + agentruntime.v1.WatchRunVirtualFilesRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + sinceCursor: + type: string + title: since_cursor + limit: + type: integer + title: limit + format: int32 + follow: + type: boolean + title: follow + selector: + title: selector + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileSelector' + title: WatchRunVirtualFilesRequest + additionalProperties: false + agentruntime.v1.WatchRunVirtualFilesResponse: + type: object + properties: + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeVirtualFileWatchEvent' + title: WatchRunVirtualFilesResponse + additionalProperties: false + agentruntime.v1.YieldRunRequest: + type: object + properties: + runId: + type: string + title: run_id + minLength: 1 + leaseToken: + type: string + title: lease_token + minLength: 1 + continuation: + title: continuation + $ref: '#/components/schemas/agentruntime.v1.YieldContinuation' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + resumeAfter: + title: resume_after + $ref: '#/components/schemas/google.protobuf.Timestamp' + wait: + title: wait + $ref: '#/components/schemas/agentruntime.v1.AgentRunWait' + presenceStatusText: + type: string + title: presence_status_text + idempotencyKey: + type: string + title: idempotency_key + yieldBudget: + type: integer + title: yield_budget + format: int32 + title: YieldRunRequest + additionalProperties: false + agentruntime.v1.YieldRunResponse: + type: object + properties: + run: + title: run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + successorRun: + title: successor_run + $ref: '#/components/schemas/agentruntime.v1.AgentRun' + wait: + title: wait + $ref: '#/components/schemas/agentruntime.v1.AgentRunWait' + checkpoint: + title: checkpoint + $ref: '#/components/schemas/agentruntime.v1.AgentRunCheckpoint' + event: + title: event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + presenceEvent: + title: presence_event + $ref: '#/components/schemas/agentruntime.v1.RuntimeEvent' + sessionBlocked: + type: boolean + title: session_blocked + yieldCount: + type: integer + title: yield_count + format: int32 + title: YieldRunResponse + additionalProperties: false + agents.v1.Agent: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + name: + type: string + title: name + description: + type: string + title: description + agentType: + type: string + title: agent_type + description: |- + agent_type aligns with identity/v1 IntrospectResponse.agent_type and + IssueAgentTokenRequest.agent_type. Examples: "sdr", "support", "coding", + "ops", "research". + capabilities: + type: array + items: + type: string + title: capabilities + description: |- + capabilities aligns with identity/v1 IntrospectResponse.capabilities and + IssueAgentTokenRequest.capabilities. Used by capability-based delegation + routing. Examples: "hubspot-write", "email-send", "code-review". + surfaces: + type: array + items: + type: string + title: surfaces + description: |- + surfaces this agent can operate on. Aligns with the surface field in + meter/v1, objectives/v1, approvals/v1. Examples: "ensemble", "chat", + "maestro", "conductor", "slack". + status: + title: status + $ref: '#/components/schemas/agents.v1.AgentStatus' + activeConfigVersion: + type: integer + title: active_config_version + format: int32 + ownerId: + type: string + title: owner_id + lastHeartbeatAt: + title: last_heartbeat_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + a2a: + title: a2a + description: |- + a2a is the Platform-owned discovery projection for spec-native A2A peers. + Remote agents use it to discover where to fetch the Agent Card, which + transport/profile is supported, and which skills can be delegated to this + agent or its child/subagent lanes. + $ref: '#/components/schemas/agents.v1.AgentA2APeerProjection' + capacity: + title: capacity + description: |- + capacity is the registry-owned load projection used by fleet-scale + delegation discovery and operator read models. + $ref: '#/components/schemas/agents.v1.AgentCapacity' + title: Agent + additionalProperties: false + description: |- + Agent is the canonical agent definition record. + The id field is the value stored in every agent_id / agent string field + across the platform: meter/v1 RecordUsageRequest.agent_id, + objectives/v1 Objective.agent_id, approvals/v1 ApprovalRequest.agent_id, + governance/v1 EvaluateActionRequest.agent_id, memory/v1 Memory.agent, + and events/v1 Change.actor_id when actor_type is "agent". + agents.v1.AgentA2APeerProjection: + type: object + properties: + publicEndpointUrl: + type: string + title: public_endpoint_url + internalEndpointUrl: + type: string + title: internal_endpoint_url + agentCardUrl: + type: string + title: agent_card_url + protocolBinding: + type: string + title: protocol_binding + protocolVersion: + type: string + title: protocol_version + supportedExtensions: + type: array + items: + type: string + title: supported_extensions + skills: + type: array + items: + $ref: '#/components/schemas/agents.v1.AgentA2ASkill' + title: skills + securitySchemes: + type: array + items: + type: string + title: security_schemes + agentCardObservedAt: + title: agent_card_observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + agentCardEtag: + type: string + title: agent_card_etag + agentCardHash: + type: string + title: agent_card_hash + pushNotifications: + type: boolean + title: push_notifications + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: AgentA2APeerProjection + additionalProperties: false + agents.v1.AgentA2APeerProjection.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.AgentA2ASkill: + type: object + properties: + id: + type: string + title: id + name: + type: string + title: name + description: + type: string + title: description + tags: + type: array + items: + type: string + title: tags + inputModes: + type: array + items: + type: string + title: input_modes + outputModes: + type: array + items: + type: string + title: output_modes + requiredContextGrants: + type: array + items: + type: string + title: required_context_grants + approvalPolicyRef: + type: string + title: approval_policy_ref + maxAutonomy: + type: string + title: max_autonomy + requiredArtifactKinds: + type: array + items: + type: string + title: required_artifact_kinds + optionalArtifactKinds: + type: array + items: + type: string + title: optional_artifact_kinds + allowedTaskClasses: + type: array + items: + type: string + title: allowed_task_classes + deniedTaskClasses: + type: array + items: + type: string + title: denied_task_classes + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: AgentA2ASkill + additionalProperties: false + agents.v1.AgentA2ASkill.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.AgentCapacity: + type: object + properties: + current: + type: integer + title: current + format: int32 + max: + type: integer + title: max + format: int32 + remaining: + type: integer + title: remaining + format: int32 + reservedDelegationCount: + type: integer + title: reserved_delegation_count + format: int32 + title: AgentCapacity + additionalProperties: false + agents.v1.AgentConfig: + type: object + properties: + version: + type: integer + title: version + format: int32 + agentId: + type: string + title: agent_id + skillIds: + type: array + items: + type: string + title: skill_ids + description: |- + skill_ids reference skills/v1 Skill.id — the reusable capabilities + this agent has loaded. + promptBindings: + type: object + title: prompt_bindings + additionalProperties: + type: string + title: value + description: |- + prompt_bindings maps prompt name to label (e.g., "sdr-outreach" -> "production"). + Aligns with prompts/v1 ResolveRequest.name and ResolveRequest.label. + modelPreferences: + type: object + title: model_preferences + additionalProperties: + type: string + title: value + description: |- + model_preferences maps surface to preferred model identifier + (e.g., "ensemble" -> "claude-opus-4.6"). Aligns with meter/v1 + RecordUsageRequest.model and keys/v1 ResolveProviderRefRequest.provider. + integrationIds: + type: array + items: + type: string + title: integration_ids + description: |- + integration_ids reference connectors/v1 Connection.id — the external + system connections this agent is authorized to use. + entityTypeScopes: + type: array + items: + type: string + title: entity_type_scopes + description: |- + entity_type_scopes restrict which entities/v1 EntityType values this + agent can operate on. Empty means unrestricted. + maxConcurrentObjectives: + type: integer + title: max_concurrent_objectives + format: int32 + description: |- + max_concurrent_objectives caps the number of objectives/v1 Objective + records this agent can hold in RUNNING or BLOCKED state simultaneously. + costBudgetUsd: + type: number + title: cost_budget_usd + format: double + description: |- + cost_budget_usd is the per-period spend ceiling enforced against + meter/v1 usage records for this agent. + notificationChannel: + type: string + title: notification_channel + description: |- + notification_channel specifies the preferred notifications/v1 + DeliveryChannel for this agent's escalations. Stored as string to + avoid cross-package import (e.g., "DELIVERY_CHANNEL_SLACK"). + parameters: + title: parameters + description: parameters holds arbitrary agent-specific tuning knobs. + $ref: '#/components/schemas/google.protobuf.Struct' + author: + type: string + title: author + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + entityTypeScopeEnums: + type: array + items: + $ref: '#/components/schemas/common.v1.EntityType' + title: entity_type_scope_enums + notificationChannelEnum: + title: notification_channel_enum + $ref: '#/components/schemas/common.v1.DeliveryChannel' + teammateProfile: + title: teammate_profile + $ref: '#/components/schemas/agents.v1.DigitalTeammateProfile' + title: AgentConfig + additionalProperties: false + description: |- + AgentConfig is an immutable snapshot of everything that shapes an agent's + behavior. Promotion and rollback are both config version reassignments — + the same pattern as prompts/v1 Label. + agents.v1.AgentConfig.ModelPreferencesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: ModelPreferencesEntry + additionalProperties: false + agents.v1.AgentConfig.PromptBindingsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: PromptBindingsEntry + additionalProperties: false + agents.v1.AutonomyPolicy: + type: object + properties: + rules: + type: array + items: + $ref: '#/components/schemas/agents.v1.AutonomyRule' + title: rules + defaultAuthority: + title: default_authority + $ref: '#/components/schemas/agents.v1.AutonomyAuthority' + maxRiskWithoutApproval: + title: max_risk_without_approval + $ref: '#/components/schemas/common.v1.RiskLevel' + title: AutonomyPolicy + additionalProperties: false + description: |- + AutonomyPolicy describes the default authority and specific action rules + that ToolExecution, Governance, and Approvals can enforce. + agents.v1.AutonomyRule: + type: object + properties: + actionType: + type: string + title: action_type + toolCapability: + type: string + title: tool_capability + maxRisk: + title: max_risk + $ref: '#/components/schemas/common.v1.RiskLevel' + authority: + not: + enum: + - 0 + title: authority + $ref: '#/components/schemas/agents.v1.AutonomyAuthority' + approvalPolicyRef: + type: string + title: approval_policy_ref + governancePolicyRef: + type: string + title: governance_policy_ref + rationale: + type: string + title: rationale + title: AutonomyRule + additionalProperties: false + description: AutonomyRule constrains a class of actions or tool capabilities. + agents.v1.CommitmentPolicy: + type: object + properties: + allowedKinds: + type: array + items: + $ref: '#/components/schemas/agents.v1.CommitmentKind' + title: allowed_kinds + templates: + type: array + items: + $ref: '#/components/schemas/agents.v1.CommitmentTemplate' + title: templates + defaultDueSeconds: + type: integer + title: default_due_seconds + format: int32 + maxOpenCommitments: + type: integer + title: max_open_commitments + format: int32 + requireObjectiveForCommitment: + type: boolean + title: require_objective_for_commitment + title: CommitmentPolicy + additionalProperties: false + description: |- + CommitmentPolicy describes which durable objectives and wakes can be created + from teammate commitments. + agents.v1.CommitmentTemplate: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.CommitmentKind' + objectiveTitleTemplate: + type: string + title: objective_title_template + objectiveDescriptionTemplate: + type: string + title: objective_description_template + wakeReasonTemplate: + type: string + title: wake_reason_template + requiredJoinKeys: + type: array + items: + type: string + title: required_join_keys + title: CommitmentTemplate + additionalProperties: false + description: CommitmentTemplate maps a commitment kind to objective and wake templates. + agents.v1.DigitalTeammateProfile: + type: object + properties: + id: + type: string + title: id + version: + type: integer + title: version + format: int32 + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + displayName: + type: string + title: display_name + role: + type: string + title: role + purpose: + type: string + title: purpose + ownerUserId: + type: string + title: owner_user_id + ownerTeamId: + type: string + title: owner_team_id + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + lifecycle: + title: lifecycle + $ref: '#/components/schemas/agents.v1.TeammateLifecycle' + responsibilities: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateResponsibility' + title: responsibilities + commitmentPolicy: + title: commitment_policy + $ref: '#/components/schemas/agents.v1.CommitmentPolicy' + initiativePolicy: + title: initiative_policy + $ref: '#/components/schemas/agents.v1.InitiativePolicy' + autonomyPolicy: + title: autonomy_policy + $ref: '#/components/schemas/agents.v1.AutonomyPolicy' + memoryPolicy: + title: memory_policy + $ref: '#/components/schemas/agents.v1.MemoryPolicy' + presencePolicy: + title: presence_policy + $ref: '#/components/schemas/agents.v1.PresencePolicy' + outputPolicy: + title: output_policy + $ref: '#/components/schemas/agents.v1.OutputPolicy' + evalPolicy: + title: eval_policy + $ref: '#/components/schemas/agents.v1.EvalPolicy' + escalationPolicy: + title: escalation_policy + $ref: '#/components/schemas/agents.v1.EscalationPolicy' + labels: + type: object + title: labels + additionalProperties: + type: string + title: value + parameters: + title: parameters + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + channelManifests: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelManifest' + title: channel_manifests + title: DigitalTeammateProfile + additionalProperties: false + description: |- + DigitalTeammateProfile is the versioned contract for how an AgentConfig acts + as a durable teammate across objectives, workflows, tools, memory, evals, and + Slack or other delivery surfaces. + agents.v1.DigitalTeammateProfile.LabelsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: LabelsEntry + additionalProperties: false + agents.v1.EscalationPolicy: + type: object + properties: + approverUserIds: + type: array + items: + type: string + title: approver_user_ids + approverTeamIds: + type: array + items: + type: string + title: approver_team_ids + escalateAfterSeconds: + type: integer + title: escalate_after_seconds + format: int32 + fallbackChannel: + title: fallback_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + title: EscalationPolicy + additionalProperties: false + description: |- + EscalationPolicy describes who must be contacted when the teammate blocks or + needs approval. + agents.v1.EvalBinding: + type: object + properties: + suiteName: + type: string + title: suite_name + metricName: + type: string + title: metric_name + minimumScore: + type: number + title: minimum_score + format: double + failureAction: + type: string + title: failure_action + title: EvalBinding + additionalProperties: false + description: EvalBinding describes one score that should gate or monitor teammate quality. + agents.v1.EvalPolicy: + type: object + properties: + bindings: + type: array + items: + $ref: '#/components/schemas/agents.v1.EvalBinding' + title: bindings + loopDefinitionId: + type: string + title: loop_definition_id + productionSampleRateBasisPoints: + type: integer + title: production_sample_rate_basis_points + maximum: 10000 + format: int32 + title: EvalPolicy + additionalProperties: false + description: EvalPolicy binds production behavior to loop and eval scoring. + agents.v1.InitiativePolicy: + type: object + properties: + triggers: + type: array + items: + $ref: '#/components/schemas/agents.v1.InitiativeTrigger' + title: triggers + maxInitiatedRunsPerDay: + type: integer + title: max_initiated_runs_per_day + format: int32 + requireHumanSeed: + type: boolean + title: require_human_seed + title: InitiativePolicy + additionalProperties: false + description: |- + InitiativePolicy describes bounded conditions where a teammate can start or + resume work proactively. + agents.v1.InitiativeTrigger: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.InitiativeTriggerKind' + triggerRef: + type: string + title: trigger_ref + filterExpr: + type: string + title: filter_expr + workflowDefinitionId: + type: string + title: workflow_definition_id + objectiveTemplateId: + type: string + title: objective_template_id + title: InitiativeTrigger + additionalProperties: false + description: InitiativeTrigger binds a proactive trigger to workflow or objective state. + agents.v1.MemoryPolicy: + type: object + properties: + allowedScopeRefs: + type: array + items: + type: string + title: allowed_scope_refs + allowUserMemory: + type: boolean + title: allow_user_memory + allowTeamMemory: + type: boolean + title: allow_team_memory + allowAgentMemory: + type: boolean + title: allow_agent_memory + requireReviewForNewMemory: + type: boolean + title: require_review_for_new_memory + defaultRetentionDays: + type: integer + title: default_retention_days + format: int32 + requiredSourceTypes: + type: array + items: + type: string + title: required_source_types + allowCrossChannelRecall: + type: boolean + title: allow_cross_channel_recall + title: MemoryPolicy + additionalProperties: false + description: MemoryPolicy describes what a teammate may recall or propose remembering. + agents.v1.OutputPolicy: + type: object + properties: + requiredArtifactKinds: + type: array + items: + type: string + title: required_artifact_kinds + optionalArtifactKinds: + type: array + items: + type: string + title: optional_artifact_kinds + renderChannelCards: + type: boolean + title: render_channel_cards + defaultVisibility: + type: string + title: default_visibility + title: OutputPolicy + additionalProperties: false + description: OutputPolicy describes durable work products and channel-safe renderings. + agents.v1.PresencePolicy: + type: object + properties: + primaryChannel: + title: primary_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + primaryChannelId: + type: string + title: primary_channel_id + defaultThreadPolicy: + type: string + title: default_thread_policy + progressUpdateIntervalSeconds: + type: integer + title: progress_update_interval_seconds + format: int32 + visibleEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.PresenceEvent' + title: visible_events + postActionReceipts: + type: boolean + title: post_action_receipts + postBlockerUpdates: + type: boolean + title: post_blocker_updates + title: PresencePolicy + additionalProperties: false + description: |- + PresencePolicy describes how a teammate reports work back to Slack or other + delivery channels. + agents.v1.TeammateChannelManifest: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.TeammateChannelKind' + label: + type: string + title: label + deliveryChannel: + not: + enum: + - 0 + title: delivery_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + platformSurface: + title: platform_surface + $ref: '#/components/schemas/common.v1.Surface' + channelId: + type: string + title: channel_id + capabilities: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelCapability' + title: capabilities + inboundEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelEventKind' + title: inbound_events + runtimeEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateRuntimeRenderEventKind' + title: runtime_events + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: TeammateChannelManifest + additionalProperties: false + description: |- + TeammateChannelManifest describes one channel adapter supported by a + teammate profile. Durable execution remains owned by AgentRuntime; this + manifest lets product surfaces declare the provider-specific ingress and + rendering coverage they can project. + agents.v1.TeammateChannelManifest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.TeammateResponsibility: + type: object + properties: + id: + type: string + title: id + title: + type: string + title: title + description: + type: string + title: description + capabilityRefs: + type: array + items: + type: string + title: capability_refs + ownedEntityTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.EntityType' + title: owned_entity_types + defaultSkillIds: + type: array + items: + type: string + title: default_skill_ids + promptNames: + type: array + items: + type: string + title: prompt_names + successMetricRefs: + type: array + items: + type: string + title: success_metric_refs + title: TeammateResponsibility + additionalProperties: false + description: |- + TeammateResponsibility binds a role claim to capabilities, entities, prompts, + skills, and measurable outcomes. + codex.v1.CodexApprovalPolicy: + type: object + properties: + dryRun: + type: boolean + title: dry_run + allowWrites: + type: boolean + title: allow_writes + requirePlanApproval: + type: boolean + title: require_plan_approval + requirePatchApproval: + type: boolean + title: require_patch_approval + requireCommandApproval: + type: boolean + title: require_command_approval + protectedPathGlobs: + type: array + items: + type: string + title: protected_path_globs + approverEntityIds: + type: array + items: + type: string + title: approver_entity_ids + networkEgressAllowlist: + type: array + items: + type: string + title: network_egress_allowlist + scrubSecretsFromOutputs: + type: boolean + title: scrub_secrets_from_outputs + sandboxMode: + type: string + title: sandbox_mode + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexApprovalPolicy + additionalProperties: false + description: |- + CodexApprovalPolicy captures governance controls before a worker performs + write, network, or otherwise sensitive operations. + codex.v1.CodexApprovalPolicy.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexBudgetPolicy: + type: object + properties: + maxInputTokens: + type: + - integer + - string + title: max_input_tokens + format: int64 + maxOutputTokens: + type: + - integer + - string + title: max_output_tokens + format: int64 + maxTotalTokens: + type: + - integer + - string + title: max_total_tokens + format: int64 + maxCostMicros: + type: + - integer + - string + title: max_cost_micros + format: int64 + maxRunSeconds: + type: integer + title: max_run_seconds + format: int32 + maxToolCalls: + type: integer + title: max_tool_calls + format: int32 + maxRetries: + type: integer + title: max_retries + format: int32 + title: CodexBudgetPolicy + additionalProperties: false + description: CodexBudgetPolicy defines per-run resource limits. + codex.v1.CodexContextItem: + type: object + properties: + sourceKind: + title: source_kind + $ref: '#/components/schemas/codex.v1.CodexContextSourceKind' + id: + type: string + title: id + uri: + type: string + title: uri + title: + type: string + title: title + text: + type: string + title: text + contentType: + type: string + title: content_type + digest: + type: string + title: digest + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexContextItem + additionalProperties: false + description: CodexContextItem is a single enriched context object available to the run. + codex.v1.CodexContextItem.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexConversationRef: + type: object + properties: + sessionId: + type: string + title: session_id + appServerThreadId: + type: string + title: app_server_thread_id + previousRunId: + type: string + title: previous_run_id + parentRunId: + type: string + title: parent_run_id + followupToTurnId: + type: string + title: followup_to_turn_id + channelThreadId: + type: string + title: channel_thread_id + channelMessageId: + type: string + title: channel_message_id + keepSessionAlive: + type: boolean + title: keep_session_alive + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexConversationRef + additionalProperties: false + description: CodexConversationRef carries durable session coordinates across turns. + codex.v1.CodexConversationRef.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexInteractionDecision: + type: object + properties: + interactionType: + title: interaction_type + $ref: '#/components/schemas/codex.v1.CodexInteractionType' + decision: + type: string + title: decision + reason: + type: string + title: reason + actorEntityId: + type: string + title: actor_entity_id + selectedChoice: + type: string + title: selected_choice + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexInteractionDecision + additionalProperties: false + description: CodexInteractionDecision captures the user's response to a Codex control. + codex.v1.CodexInteractionDecision.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexInteractionRequest: + type: object + properties: + interactionType: + title: interaction_type + $ref: '#/components/schemas/codex.v1.CodexInteractionType' + runId: + type: string + title: run_id + waitId: + type: string + title: wait_id + stepId: + type: string + title: step_id + artifactId: + type: string + title: artifact_id + patchId: + type: string + title: patch_id + prompt: + type: string + title: prompt + choices: + type: array + items: + type: string + title: choices + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexInteractionRequest + additionalProperties: false + description: |- + CodexInteractionRequest describes a pending human decision projected to a + channel surface. + codex.v1.CodexInteractionRequest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexMemoryScope: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/codex.v1.CodexMemoryScopeKind' + key: + type: string + title: key + retentionDays: + type: integer + title: retention_days + format: int32 + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexMemoryScope + additionalProperties: false + description: CodexMemoryScope describes what prior run knowledge should be retrieved. + codex.v1.CodexMemoryScope.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexOutcomeSignal: + type: object + properties: + runId: + type: string + title: run_id + pullRequestUrl: + type: string + title: pull_request_url + merged: + type: boolean + title: merged + reverted: + type: boolean + title: reverted + humanEdited: + type: boolean + title: human_edited + channelReaction: + type: string + title: channel_reaction + reviewOutcome: + type: string + title: review_outcome + observedAt: + title: observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexOutcomeSignal + additionalProperties: false + description: CodexOutcomeSignal feeds evaluation and routing loops after the run. + codex.v1.CodexOutcomeSignal.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexOutputTarget: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/codex.v1.CodexOutputKind' + id: + type: string + title: id + uri: + type: string + title: uri + title: + type: string + title: title + draft: + type: boolean + title: draft + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexOutputTarget + additionalProperties: false + description: CodexOutputTarget describes a desired or produced external output. + codex.v1.CodexOutputTarget.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexPreparedFutureRef: + type: object + properties: + preparedFutureId: + type: string + title: prepared_future_id + cerebroActionId: + type: string + title: cerebro_action_id + cerebroPredictionId: + type: string + title: cerebro_prediction_id + cerebroFactIds: + type: array + items: + type: string + title: cerebro_fact_ids + sourceRecordIds: + type: array + items: + type: string + title: source_record_ids + artifactIds: + type: array + items: + type: string + title: artifact_ids + approvalRequestIds: + type: array + items: + type: string + title: approval_request_ids + evidenceUri: + type: string + title: evidence_uri + sourceHealth: + type: string + title: source_health + riskLevel: + type: string + title: risk_level + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexPreparedFutureRef + additionalProperties: false + description: |- + CodexPreparedFutureRef ties a Codex run to the reviewable next move it is + preparing. It is a grouping contract, not an approval or execution grant. + codex.v1.CodexPreparedFutureRef.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexRoutingPolicy: + type: object + properties: + backend: + title: backend + $ref: '#/components/schemas/codex.v1.CodexBackend' + workerQueue: + type: string + title: worker_queue + modelTier: + type: string + title: model_tier + preferredAgentId: + type: string + title: preferred_agent_id + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexRoutingPolicy + additionalProperties: false + description: CodexRoutingPolicy captures backend and worker selection. + codex.v1.CodexRoutingPolicy.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexRunProgress: + type: object + properties: + stage: + title: stage + $ref: '#/components/schemas/codex.v1.CodexProgressStage' + safeSummary: + type: string + title: safe_summary + progressPercent: + type: integer + title: progress_percent + maximum: 100 + format: int32 + filesRead: + type: integer + title: files_read + format: int32 + filesChanged: + type: integer + title: files_changed + format: int32 + commandsRun: + type: integer + title: commands_run + format: int32 + inputTokens: + type: + - integer + - string + title: input_tokens + format: int64 + outputTokens: + type: + - integer + - string + title: output_tokens + format: int64 + estimatedCostMicros: + type: + - integer + - string + title: estimated_cost_micros + format: int64 + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexRunProgress + additionalProperties: false + description: CodexRunProgress is the compact, user-visible progress projection. + codex.v1.CodexRunProgress.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexWorkRequest: + type: object + properties: + actionType: + title: action_type + $ref: '#/components/schemas/codex.v1.CodexActionType' + executionIntent: + title: execution_intent + $ref: '#/components/schemas/codex.v1.CodexExecutionIntent' + prompt: + type: string + title: prompt + repo: + type: string + title: repo + cwd: + type: string + title: cwd + branch: + type: string + title: branch + baseBranch: + type: string + title: base_branch + tenantId: + type: string + title: tenant_id + reason: + type: string + title: reason + conversation: + title: conversation + $ref: '#/components/schemas/codex.v1.CodexConversationRef' + routing: + title: routing + $ref: '#/components/schemas/codex.v1.CodexRoutingPolicy' + budget: + title: budget + $ref: '#/components/schemas/codex.v1.CodexBudgetPolicy' + approvalPolicy: + title: approval_policy + $ref: '#/components/schemas/codex.v1.CodexApprovalPolicy' + interactivityMode: + title: interactivity_mode + $ref: '#/components/schemas/codex.v1.CodexInteractivityMode' + contextItems: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexContextItem' + title: context_items + desiredOutputs: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexOutputTarget' + title: desired_outputs + memoryScopes: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexMemoryScope' + title: memory_scopes + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + preparedFuture: + title: prepared_future + $ref: '#/components/schemas/codex.v1.CodexPreparedFutureRef' + resourceId: + type: string + title: resource_id + maxLength: 512 + pattern: ^$|^[^/\\:][^\\:]*$|^[A-Za-z][A-Za-z0-9+.-]+:([^A-Za-z/\\][^\\]*|[A-Za-z]([^:\\][^\\]*)?)$ + description: |- + Stable Platform resource identity. Local absolute paths are forbidden, + including drive-root forms after local schemes (e.g. file:C:/Windows). + requestedAuthority: + title: requested_authority + $ref: '#/components/schemas/codex.v1.CodexAuthorityScope' + title: CodexWorkRequest + additionalProperties: false + description: |+ + CodexWorkRequest is the typed payload for Slack, GitHub, Linear, CLI, IDE, + and monitoring-triggered Codex work. + resource_id must not be an absolute local path: + ``` + this.resource_id == '' || (!this.resource_id.startsWith('/') && !this.resource_id.startsWith('\\') && !this.resource_id.matches('^[A-Za-z]:[/\\\\].*') && !this.resource_id.matches('^[A-Za-z][A-Za-z0-9+.-]*:[A-Za-z]:.*')) + ``` + + codex.v1.CodexWorkRequest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + google.protobuf.ListValue: + type: object + properties: + values: + type: array + items: + $ref: '#/components/schemas/google.protobuf.Value' + title: values + description: Repeated field of dynamically typed values. + title: ListValue + additionalProperties: false + description: |- + `ListValue` is a wrapper around a repeated field of values. + + The JSON representation for `ListValue` is JSON array. + google.protobuf.Struct: + type: object + additionalProperties: + $ref: '#/components/schemas/google.protobuf.Value' + description: |- + `Struct` represents a structured data value, consisting of fields + which map to dynamically typed values. In some languages, `Struct` + might be supported by a native representation. For example, in + scripting languages like JS a struct is represented as an + object. The details of that representation are described together + with the proto support for the language. + + The JSON representation for `Struct` is JSON object. + google.protobuf.Struct.FieldsEntry: + type: object + properties: + key: + type: string + title: key + value: + title: value + $ref: '#/components/schemas/google.protobuf.Value' + title: FieldsEntry + additionalProperties: false + google.protobuf.Timestamp: + type: string + examples: + - 1s + - 1.000340012s + format: date-time + description: |- + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + ) to obtain a formatter capable of generating timestamps in this format. + google.protobuf.Value: + oneOf: + - type: "null" + - type: number + - type: string + - type: boolean + - type: array + - type: object + additionalProperties: true + description: |- + `Value` represents a dynamically typed value which can be either + null, a number, a string, a boolean, a recursive struct value, or a + list of values. A producer of value is expected to set one of these + variants. Absence of any variant indicates an error. + + The JSON representation for `Value` is JSON value. + objectives.v1.MutationRecord: + type: object + properties: + targetIntegration: + type: string + title: target_integration + operation: + type: string + title: operation + status: + title: status + $ref: '#/components/schemas/objectives.v1.MutationStatus' + approvalId: + type: string + title: approval_id + title: MutationRecord + additionalProperties: false + description: MutationRecord tracks a write operation performed by an objective. + objectives.v1.Objective: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + surface: + type: string + title: surface + title: + type: string + title: title + description: + type: string + title: description + state: + title: state + $ref: '#/components/schemas/objectives.v1.ObjectiveState' + provenance: + type: array + items: + $ref: '#/components/schemas/objectives.v1.ProvenanceRecord' + title: provenance + mutations: + type: array + items: + $ref: '#/components/schemas/objectives.v1.MutationRecord' + title: mutations + wakeSchedule: + title: wake_schedule + $ref: '#/components/schemas/objectives.v1.WakeSchedule' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + idempotencyKey: + type: string + title: idempotency_key + organizationId: + type: string + title: organization_id + title: Objective + additionalProperties: false + description: Objective is the canonical agent objective record. + objectives.v1.ProvenanceRecord: + type: object + properties: + sourceIntegration: + type: string + title: source_integration + sourceId: + type: string + title: source_id + freshnessSeconds: + type: integer + title: freshness_seconds + format: int32 + confidence: + type: number + title: confidence + format: float + title: ProvenanceRecord + additionalProperties: false + description: ProvenanceRecord tracks where data came from. + objectives.v1.WakeSchedule: + type: object + properties: + wakeAt: + title: wake_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + reason: + type: string + title: reason + retryCount: + type: integer + title: retry_count + format: int32 + maxRetries: + type: integer + title: max_retries + format: int32 + backoffSeconds: + type: integer + title: backoff_seconds + format: int32 + title: WakeSchedule + additionalProperties: false + description: WakeSchedule defines when and how an objective should be reactivated. + connect-protocol-version: + type: number + title: Connect-Protocol-Version + enum: + - 1 + description: Define the version of the Connect protocol + const: 1 + connect-timeout-header: + type: number + title: Connect-Timeout-Ms + description: Define the timeout, in ms + connect.error: + type: object + properties: + code: + type: string + examples: + - not_found + enum: + - canceled + - unknown + - invalid_argument + - deadline_exceeded + - not_found + - already_exists + - permission_denied + - resource_exhausted + - failed_precondition + - aborted + - out_of_range + - unimplemented + - internal + - unavailable + - data_loss + - unauthenticated + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + message: + type: string + description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + detail: + $ref: '#/components/schemas/google.protobuf.Any' + title: Connect Error + additionalProperties: true + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' + google.protobuf.Any: + type: object + properties: + type: + type: string + value: + type: string + format: binary + debug: + type: object + additionalProperties: true + additionalProperties: true + description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +security: [] +tags: + - name: agentruntime.v1.AgentRuntimeService + description: |- + AgentRuntimeService accepts normalized triggers and manages durable + AgentRun execution attempts. Workers claim runs by lease, checkpoint their + progress, release compute while waiting for human/input/event gates, and + resume from checkpoints rather than replaying LLM or tool calls. diff --git a/openapi/agents/v1/agents.openapi.yaml b/openapi/agents/v1/agents.openapi.yaml new file mode 100644 index 0000000..c880d2d --- /dev/null +++ b/openapi/agents/v1/agents.openapi.yaml @@ -0,0 +1,2968 @@ +openapi: 3.1.0 +info: + title: agents.v1 +paths: + /agents.v1.AgentService/Register: + post: + tags: + - agents.v1.AgentService + summary: Register + description: Register creates a new agent definition. + operationId: agents.v1.AgentService.Register + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RegisterRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RegisterResponse' + /agents.v1.AgentService/Get: + post: + tags: + - agents.v1.AgentService + summary: Get + description: Get retrieves an agent by ID. + operationId: agents.v1.AgentService.Get + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetResponse' + /agents.v1.AgentService/List: + post: + tags: + - agents.v1.AgentService + summary: List + description: List returns agents matching the query filters. + operationId: agents.v1.AgentService.List + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListResponse' + /agents.v1.AgentService/Update: + post: + tags: + - agents.v1.AgentService + summary: Update + description: Update modifies mutable agent metadata (name, description, surfaces). + operationId: agents.v1.AgentService.Update + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.UpdateRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.UpdateResponse' + /agents.v1.AgentService/Deregister: + post: + tags: + - agents.v1.AgentService + summary: Deregister + description: Deregister removes an agent from the registry. + operationId: agents.v1.AgentService.Deregister + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.DeregisterRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.DeregisterResponse' + /agents.v1.AgentService/PushConfig: + post: + tags: + - agents.v1.AgentService + summary: PushConfig + description: |- + PushConfig creates a new immutable configuration version for an agent. + The agent's active_config_version advances atomically. + operationId: agents.v1.AgentService.PushConfig + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.PushConfigRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.PushConfigResponse' + /agents.v1.AgentService/GetConfig: + post: + tags: + - agents.v1.AgentService + summary: GetConfig + description: GetConfig retrieves a specific configuration version. + operationId: agents.v1.AgentService.GetConfig + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetConfigRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetConfigResponse' + /agents.v1.AgentService/ListConfigs: + post: + tags: + - agents.v1.AgentService + summary: ListConfigs + description: ListConfigs returns all configuration versions for an agent. + operationId: agents.v1.AgentService.ListConfigs + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListConfigsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListConfigsResponse' + /agents.v1.AgentService/RollbackConfig: + post: + tags: + - agents.v1.AgentService + summary: RollbackConfig + description: RollbackConfig atomically reverts an agent to a prior configuration version. + operationId: agents.v1.AgentService.RollbackConfig + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RollbackConfigRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RollbackConfigResponse' + /agents.v1.AgentService/Delegate: + post: + tags: + - agents.v1.AgentService + summary: Delegate + description: |- + Delegate requests that another agent (or any agent with a matching + capability) accept a unit of work. The delegation is tracked as a + DelegationRecord and linked to the originating objective and optional + workflow step. + operationId: agents.v1.AgentService.Delegate + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.DelegateRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.DelegateResponse' + /agents.v1.AgentService/ResolveDelegation: + post: + tags: + - agents.v1.AgentService + summary: ResolveDelegation + description: ResolveDelegation records the outcome of a delegation. + operationId: agents.v1.AgentService.ResolveDelegation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ResolveDelegationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ResolveDelegationResponse' + /agents.v1.AgentService/RenewDelegationLease: + post: + tags: + - agents.v1.AgentService + summary: RenewDelegationLease + description: |- + RenewDelegationLease records observed remote progress for an active + delegation so reserved target capacity is not reaped while work is healthy. + operationId: agents.v1.AgentService.RenewDelegationLease + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RenewDelegationLeaseRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.RenewDelegationLeaseResponse' + /agents.v1.AgentService/ControlA2ADelegationTask: + post: + tags: + - agents.v1.AgentService + summary: ControlA2ADelegationTask + description: |- + ControlA2ADelegationTask sends a fenced operating-plane control request to + the remote A2A task backing a Platform delegation. This is the Platform + control surface for steering, collecting from, interrupting, or canceling + a remote Maestro task or one of its subagent lanes. + operationId: agents.v1.AgentService.ControlA2ADelegationTask + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ControlA2ADelegationTaskRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ControlA2ADelegationTaskResponse' + /agents.v1.AgentService/GetDelegation: + post: + tags: + - agents.v1.AgentService + summary: GetDelegation + description: GetDelegation retrieves a delegation record by ID. + operationId: agents.v1.AgentService.GetDelegation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetDelegationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetDelegationResponse' + /agents.v1.AgentService/ListDelegations: + post: + tags: + - agents.v1.AgentService + summary: ListDelegations + description: ListDelegations returns delegations matching the query filters. + operationId: agents.v1.AgentService.ListDelegations + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListDelegationsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.ListDelegationsResponse' + /agents.v1.AgentService/GetA2ADelegationGraph: + post: + tags: + - agents.v1.AgentService + summary: GetA2ADelegationGraph + description: |- + GetA2ADelegationGraph returns the server-owned swarm graph for a remote + A2A delegation family. Callers may anchor the graph by root delegation id + or by any child delegation id in the lineage. + operationId: agents.v1.AgentService.GetA2ADelegationGraph + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetA2ADelegationGraphRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.GetA2ADelegationGraphResponse' + /agents.v1.AgentService/Heartbeat: + post: + tags: + - agents.v1.AgentService + summary: Heartbeat + description: |- + Heartbeat records agent liveness. The registry uses this to maintain + presence state and route capability-based delegation requests. + operationId: agents.v1.AgentService.Heartbeat + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.HeartbeatRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/agents.v1.HeartbeatResponse' +components: + schemas: + agents.v1.A2ADelegationTaskControlMode: + type: string + title: A2ADelegationTaskControlMode + enum: + - A2A_DELEGATION_TASK_CONTROL_MODE_UNSPECIFIED + - A2A_DELEGATION_TASK_CONTROL_MODE_STEER + - A2A_DELEGATION_TASK_CONTROL_MODE_FOLLOWUP + - A2A_DELEGATION_TASK_CONTROL_MODE_COLLECT + - A2A_DELEGATION_TASK_CONTROL_MODE_INTERRUPT + - A2A_DELEGATION_TASK_CONTROL_MODE_CANCEL + description: |- + A2ADelegationTaskControlMode describes the remote task-control action that + Platform asks the target A2A peer to apply. + agents.v1.AgentStatus: + type: string + title: AgentStatus + enum: + - AGENT_STATUS_UNSPECIFIED + - AGENT_STATUS_ACTIVE + - AGENT_STATUS_IDLE + - AGENT_STATUS_BUSY + - AGENT_STATUS_OFFLINE + - AGENT_STATUS_DEGRADED + - AGENT_STATUS_SUSPENDED + description: AgentStatus describes the operational state of an agent. + agents.v1.AutonomyAuthority: + type: string + title: AutonomyAuthority + enum: + - AUTONOMY_AUTHORITY_UNSPECIFIED + - AUTONOMY_AUTHORITY_OWN + - AUTONOMY_AUTHORITY_RECOMMEND + - AUTONOMY_AUTHORITY_REQUIRE_APPROVAL + - AUTONOMY_AUTHORITY_DENY + description: AutonomyAuthority describes how independently a teammate may act. + agents.v1.CommitmentKind: + type: string + title: CommitmentKind + enum: + - COMMITMENT_KIND_UNSPECIFIED + - COMMITMENT_KIND_FOLLOW_UP + - COMMITMENT_KIND_WATCH + - COMMITMENT_KIND_RETRY + - COMMITMENT_KIND_SUMMARIZE + - COMMITMENT_KIND_MONITOR + - COMMITMENT_KIND_REMEDIATE + - COMMITMENT_KIND_HANDOFF + description: CommitmentKind describes the durable commitments a teammate can accept. + agents.v1.DelegationStatus: + type: string + title: DelegationStatus + enum: + - DELEGATION_STATUS_UNSPECIFIED + - DELEGATION_STATUS_PENDING + - DELEGATION_STATUS_ACCEPTED + - DELEGATION_STATUS_REJECTED + - DELEGATION_STATUS_COMPLETED + - DELEGATION_STATUS_FAILED + - DELEGATION_STATUS_TIMED_OUT + description: DelegationStatus describes the lifecycle state of a delegation. + agents.v1.InitiativeTriggerKind: + type: string + title: InitiativeTriggerKind + enum: + - INITIATIVE_TRIGGER_KIND_UNSPECIFIED + - INITIATIVE_TRIGGER_KIND_SCHEDULE + - INITIATIVE_TRIGGER_KIND_SLACK_EVENT + - INITIATIVE_TRIGGER_KIND_PLATFORM_EVENT + - INITIATIVE_TRIGGER_KIND_OBJECTIVE_WAKE + - INITIATIVE_TRIGGER_KIND_WAIT_RESOLVED + - INITIATIVE_TRIGGER_KIND_EVAL_REGRESSION + - INITIATIVE_TRIGGER_KIND_STALLED_WORK + description: |- + InitiativeTriggerKind describes events that can let a teammate start work + without a fresh direct human prompt. + agents.v1.PresenceEvent: + type: string + title: PresenceEvent + enum: + - PRESENCE_EVENT_UNSPECIFIED + - PRESENCE_EVENT_ACCEPTED + - PRESENCE_EVENT_WAITING + - PRESENCE_EVENT_PROGRESS + - PRESENCE_EVENT_BLOCKED + - PRESENCE_EVENT_COMPLETED + - PRESENCE_EVENT_FAILED + - PRESENCE_EVENT_ESCALATED + description: PresenceEvent describes channel-visible teammate activity. + agents.v1.TeammateChannelCapability: + type: string + title: TeammateChannelCapability + enum: + - TEAMMATE_CHANNEL_CAPABILITY_UNSPECIFIED + - TEAMMATE_CHANNEL_CAPABILITY_INGEST + - TEAMMATE_CHANNEL_CAPABILITY_RENDER + description: |- + TeammateChannelCapability describes what a channel adapter can do for a + teammate profile. + agents.v1.TeammateChannelEventKind: + type: string + title: TeammateChannelEventKind + enum: + - TEAMMATE_CHANNEL_EVENT_KIND_UNSPECIFIED + - TEAMMATE_CHANNEL_EVENT_KIND_MESSAGE_CREATED + - TEAMMATE_CHANNEL_EVENT_KIND_THREAD_REPLY_CREATED + - TEAMMATE_CHANNEL_EVENT_KIND_COMMAND_INVOKED + - TEAMMATE_CHANNEL_EVENT_KIND_ACTION_INVOKED + - TEAMMATE_CHANNEL_EVENT_KIND_REACTION_ADDED + - TEAMMATE_CHANNEL_EVENT_KIND_REACTION_REMOVED + - TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_STARTED + - TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_CONTEXT_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_EMAIL_RECEIVED + - TEAMMATE_CHANNEL_EVENT_KIND_CALENDAR_EVENT_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_ISSUE_CHANGED + - TEAMMATE_CHANNEL_EVENT_KIND_SCHEDULED_WAKE + - TEAMMATE_CHANNEL_EVENT_KIND_WEBHOOK_RECEIVED + description: |- + TeammateChannelEventKind describes normalized inbound channel events that can + become AgentRuntime triggers. + agents.v1.TeammateChannelKind: + type: string + title: TeammateChannelKind + enum: + - TEAMMATE_CHANNEL_KIND_UNSPECIFIED + - TEAMMATE_CHANNEL_KIND_SLACK + - TEAMMATE_CHANNEL_KIND_EMAIL + - TEAMMATE_CHANNEL_KIND_CALENDAR + - TEAMMATE_CHANNEL_KIND_JIRA + - TEAMMATE_CHANNEL_KIND_TEAMS + - TEAMMATE_CHANNEL_KIND_WEB + - TEAMMATE_CHANNEL_KIND_WEBHOOK + - TEAMMATE_CHANNEL_KIND_WHATSAPP + - TEAMMATE_CHANNEL_KIND_APPLE_MESSAGES + description: |- + TeammateChannelKind identifies a product or provider channel that can ingest + user activity or render teammate runtime events. It intentionally lives in + agents/v1 instead of agentruntime/v1 so teammate profiles can describe + supported channels without creating a proto import cycle. + agents.v1.TeammateLifecycle: + type: string + title: TeammateLifecycle + enum: + - TEAMMATE_LIFECYCLE_UNSPECIFIED + - TEAMMATE_LIFECYCLE_DRAFT + - TEAMMATE_LIFECYCLE_ACTIVE + - TEAMMATE_LIFECYCLE_PAUSED + - TEAMMATE_LIFECYCLE_DEPRECATED + description: |- + TeammateLifecycle describes whether a teammate profile can be used to + initiate durable work. + agents.v1.TeammateRuntimeRenderEventKind: + type: string + title: TeammateRuntimeRenderEventKind + enum: + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_UNSPECIFIED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TRIGGER_ACCEPTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RUN_STARTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_PROGRESS + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_STARTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_OBJECTIVE_UPDATED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_REQUESTED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_RESOLVED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_PROPOSED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_ARTIFACT_CREATED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_MEMORY_PROPOSED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_WAITING + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RESUMED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_COMPLETED + - TEAMMATE_RUNTIME_RENDER_EVENT_KIND_FAILED + description: |- + TeammateRuntimeRenderEventKind describes Platform runtime events a channel + adapter can project back into the provider surface. + common.v1.DeliveryChannel: + type: string + title: DeliveryChannel + enum: + - DELIVERY_CHANNEL_UNSPECIFIED + - DELIVERY_CHANNEL_SLACK + - DELIVERY_CHANNEL_EMAIL + - DELIVERY_CHANNEL_WEBHOOK + - DELIVERY_CHANNEL_IN_APP + - DELIVERY_CHANNEL_PUSH + description: DeliveryChannel identifies the notification delivery channel. + common.v1.EntityType: + type: string + title: EntityType + enum: + - ENTITY_TYPE_UNSPECIFIED + - ENTITY_TYPE_CONTACT + - ENTITY_TYPE_COMPANY + - ENTITY_TYPE_DEAL + - ENTITY_TYPE_TICKET + - ENTITY_TYPE_CUSTOMER + - ENTITY_TYPE_OPPORTUNITY + description: EntityType identifies the kind of entity across systems. + common.v1.RiskLevel: + type: string + title: RiskLevel + enum: + - RISK_LEVEL_UNSPECIFIED + - RISK_LEVEL_LOW + - RISK_LEVEL_MEDIUM + - RISK_LEVEL_HIGH + - RISK_LEVEL_CRITICAL + description: RiskLevel classifies the risk of an action. + common.v1.Surface: + type: string + title: Surface + enum: + - SURFACE_UNSPECIFIED + - SURFACE_ENSEMBLE + - SURFACE_CHAT + - SURFACE_MAESTRO + - SURFACE_CONDUCTOR + - SURFACE_SLACK + - SURFACE_EXTERNAL_AGENT + description: |- + Surface identifies the product or channel surface that originated a platform + action. It is shared by runtime, audit, and product-facing services so + callers do not invent drift-prone string labels. + google.protobuf.NullValue: + type: string + title: NullValue + enum: + - NULL_VALUE + description: |- + `NullValue` is a singleton enumeration to represent the null value for the + `Value` type union. + + The JSON representation for `NullValue` is JSON `null`. + agents.v1.A2ADelegationGraphEdge: + type: object + properties: + parentDelegationId: + type: string + title: parent_delegation_id + childDelegationId: + type: string + title: child_delegation_id + title: A2ADelegationGraphEdge + additionalProperties: false + agents.v1.A2ADelegationGraphNode: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + depth: + type: integer + title: depth + format: int32 + childCount: + type: integer + title: child_count + format: int32 + terminal: + type: boolean + title: terminal + title: A2ADelegationGraphNode + additionalProperties: false + agents.v1.A2ADelegationTaskControlResult: + type: object + properties: + taskId: + type: string + title: task_id + state: + type: string + title: state + controlId: + type: string + title: control_id + controlMode: + type: string + title: control_mode + cancelled: + type: boolean + title: cancelled + queuedForWorker: + type: boolean + title: queued_for_worker + parentTaskId: + type: string + title: parent_task_id + targetRunId: + type: string + title: target_run_id + appliedRunId: + type: string + title: applied_run_id + targetExternal: + type: boolean + title: target_external + subagentLaneId: + type: string + title: subagent_lane_id + workItemId: + type: string + title: work_item_id + observedAt: + title: observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + rawPayloadWithheld: + type: boolean + title: raw_payload_withheld + title: A2ADelegationTaskControlResult + additionalProperties: false + agents.v1.Agent: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + name: + type: string + title: name + description: + type: string + title: description + agentType: + type: string + title: agent_type + description: |- + agent_type aligns with identity/v1 IntrospectResponse.agent_type and + IssueAgentTokenRequest.agent_type. Examples: "sdr", "support", "coding", + "ops", "research". + capabilities: + type: array + items: + type: string + title: capabilities + description: |- + capabilities aligns with identity/v1 IntrospectResponse.capabilities and + IssueAgentTokenRequest.capabilities. Used by capability-based delegation + routing. Examples: "hubspot-write", "email-send", "code-review". + surfaces: + type: array + items: + type: string + title: surfaces + description: |- + surfaces this agent can operate on. Aligns with the surface field in + meter/v1, objectives/v1, approvals/v1. Examples: "ensemble", "chat", + "maestro", "conductor", "slack". + status: + title: status + $ref: '#/components/schemas/agents.v1.AgentStatus' + activeConfigVersion: + type: integer + title: active_config_version + format: int32 + ownerId: + type: string + title: owner_id + lastHeartbeatAt: + title: last_heartbeat_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + a2a: + title: a2a + description: |- + a2a is the Platform-owned discovery projection for spec-native A2A peers. + Remote agents use it to discover where to fetch the Agent Card, which + transport/profile is supported, and which skills can be delegated to this + agent or its child/subagent lanes. + $ref: '#/components/schemas/agents.v1.AgentA2APeerProjection' + capacity: + title: capacity + description: |- + capacity is the registry-owned load projection used by fleet-scale + delegation discovery and operator read models. + $ref: '#/components/schemas/agents.v1.AgentCapacity' + title: Agent + additionalProperties: false + description: |- + Agent is the canonical agent definition record. + The id field is the value stored in every agent_id / agent string field + across the platform: meter/v1 RecordUsageRequest.agent_id, + objectives/v1 Objective.agent_id, approvals/v1 ApprovalRequest.agent_id, + governance/v1 EvaluateActionRequest.agent_id, memory/v1 Memory.agent, + and events/v1 Change.actor_id when actor_type is "agent". + agents.v1.AgentA2APeerProjection: + type: object + properties: + publicEndpointUrl: + type: string + title: public_endpoint_url + internalEndpointUrl: + type: string + title: internal_endpoint_url + agentCardUrl: + type: string + title: agent_card_url + protocolBinding: + type: string + title: protocol_binding + protocolVersion: + type: string + title: protocol_version + supportedExtensions: + type: array + items: + type: string + title: supported_extensions + skills: + type: array + items: + $ref: '#/components/schemas/agents.v1.AgentA2ASkill' + title: skills + securitySchemes: + type: array + items: + type: string + title: security_schemes + agentCardObservedAt: + title: agent_card_observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + agentCardEtag: + type: string + title: agent_card_etag + agentCardHash: + type: string + title: agent_card_hash + pushNotifications: + type: boolean + title: push_notifications + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: AgentA2APeerProjection + additionalProperties: false + agents.v1.AgentA2APeerProjection.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.AgentA2ASkill: + type: object + properties: + id: + type: string + title: id + name: + type: string + title: name + description: + type: string + title: description + tags: + type: array + items: + type: string + title: tags + inputModes: + type: array + items: + type: string + title: input_modes + outputModes: + type: array + items: + type: string + title: output_modes + requiredContextGrants: + type: array + items: + type: string + title: required_context_grants + approvalPolicyRef: + type: string + title: approval_policy_ref + maxAutonomy: + type: string + title: max_autonomy + requiredArtifactKinds: + type: array + items: + type: string + title: required_artifact_kinds + optionalArtifactKinds: + type: array + items: + type: string + title: optional_artifact_kinds + allowedTaskClasses: + type: array + items: + type: string + title: allowed_task_classes + deniedTaskClasses: + type: array + items: + type: string + title: denied_task_classes + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: AgentA2ASkill + additionalProperties: false + agents.v1.AgentA2ASkill.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.AgentCapacity: + type: object + properties: + current: + type: integer + title: current + format: int32 + max: + type: integer + title: max + format: int32 + remaining: + type: integer + title: remaining + format: int32 + reservedDelegationCount: + type: integer + title: reserved_delegation_count + format: int32 + title: AgentCapacity + additionalProperties: false + agents.v1.AgentConfig: + type: object + properties: + version: + type: integer + title: version + format: int32 + agentId: + type: string + title: agent_id + skillIds: + type: array + items: + type: string + title: skill_ids + description: |- + skill_ids reference skills/v1 Skill.id — the reusable capabilities + this agent has loaded. + promptBindings: + type: object + title: prompt_bindings + additionalProperties: + type: string + title: value + description: |- + prompt_bindings maps prompt name to label (e.g., "sdr-outreach" -> "production"). + Aligns with prompts/v1 ResolveRequest.name and ResolveRequest.label. + modelPreferences: + type: object + title: model_preferences + additionalProperties: + type: string + title: value + description: |- + model_preferences maps surface to preferred model identifier + (e.g., "ensemble" -> "claude-opus-4.6"). Aligns with meter/v1 + RecordUsageRequest.model and keys/v1 ResolveProviderRefRequest.provider. + integrationIds: + type: array + items: + type: string + title: integration_ids + description: |- + integration_ids reference connectors/v1 Connection.id — the external + system connections this agent is authorized to use. + entityTypeScopes: + type: array + items: + type: string + title: entity_type_scopes + description: |- + entity_type_scopes restrict which entities/v1 EntityType values this + agent can operate on. Empty means unrestricted. + maxConcurrentObjectives: + type: integer + title: max_concurrent_objectives + format: int32 + description: |- + max_concurrent_objectives caps the number of objectives/v1 Objective + records this agent can hold in RUNNING or BLOCKED state simultaneously. + costBudgetUsd: + type: number + title: cost_budget_usd + format: double + description: |- + cost_budget_usd is the per-period spend ceiling enforced against + meter/v1 usage records for this agent. + notificationChannel: + type: string + title: notification_channel + description: |- + notification_channel specifies the preferred notifications/v1 + DeliveryChannel for this agent's escalations. Stored as string to + avoid cross-package import (e.g., "DELIVERY_CHANNEL_SLACK"). + parameters: + title: parameters + description: parameters holds arbitrary agent-specific tuning knobs. + $ref: '#/components/schemas/google.protobuf.Struct' + author: + type: string + title: author + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + entityTypeScopeEnums: + type: array + items: + $ref: '#/components/schemas/common.v1.EntityType' + title: entity_type_scope_enums + notificationChannelEnum: + title: notification_channel_enum + $ref: '#/components/schemas/common.v1.DeliveryChannel' + teammateProfile: + title: teammate_profile + $ref: '#/components/schemas/agents.v1.DigitalTeammateProfile' + title: AgentConfig + additionalProperties: false + description: |- + AgentConfig is an immutable snapshot of everything that shapes an agent's + behavior. Promotion and rollback are both config version reassignments — + the same pattern as prompts/v1 Label. + agents.v1.AgentConfig.ModelPreferencesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: ModelPreferencesEntry + additionalProperties: false + agents.v1.AgentConfig.PromptBindingsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: PromptBindingsEntry + additionalProperties: false + agents.v1.AgentDiscoveryEvidence: + type: object + properties: + schema: + type: string + title: schema + decision: + type: string + title: decision + reason: + type: string + title: reason + workspaceId: + type: string + title: workspace_id + capability: + type: string + title: capability + capabilities: + type: array + items: + type: string + title: capabilities + agentType: + type: string + title: agent_type + a2aSkillId: + type: string + title: a2a_skill_id + taskClass: + type: string + title: task_class + requireA2aDispatch: + type: boolean + title: require_a2a_dispatch + surface: + type: string + title: surface + status: + type: string + title: status + candidateCount: + type: integer + title: candidate_count + format: int32 + matchedCount: + type: integer + title: matched_count + format: int32 + exclusions: + type: array + items: + $ref: '#/components/schemas/agents.v1.AgentDiscoveryExclusion' + title: exclusions + title: AgentDiscoveryEvidence + additionalProperties: false + description: |- + AgentDiscoveryEvidence is the safe, operator-auditable explanation for an + A2A/delegation discovery query. It intentionally carries identifiers, + counts, and policy labels, not task payloads or customer content. + agents.v1.AgentDiscoveryExclusion: + type: object + properties: + reason: + type: string + title: reason + count: + type: integer + title: count + format: int32 + sampleAgentIds: + type: array + items: + type: string + title: sample_agent_ids + policyReasons: + type: array + items: + type: string + title: policy_reasons + policyScopes: + type: array + items: + type: string + title: policy_scopes + allowedTaskClasses: + type: array + items: + type: string + title: allowed_task_classes + deniedTaskClasses: + type: array + items: + type: string + title: denied_task_classes + title: AgentDiscoveryExclusion + additionalProperties: false + description: |- + AgentDiscoveryExclusion summarizes why candidates did not appear in the + discovery result. Samples are agent ids only, capped by the server. + agents.v1.AutonomyPolicy: + type: object + properties: + rules: + type: array + items: + $ref: '#/components/schemas/agents.v1.AutonomyRule' + title: rules + defaultAuthority: + title: default_authority + $ref: '#/components/schemas/agents.v1.AutonomyAuthority' + maxRiskWithoutApproval: + title: max_risk_without_approval + $ref: '#/components/schemas/common.v1.RiskLevel' + title: AutonomyPolicy + additionalProperties: false + description: |- + AutonomyPolicy describes the default authority and specific action rules + that ToolExecution, Governance, and Approvals can enforce. + agents.v1.AutonomyRule: + type: object + properties: + actionType: + type: string + title: action_type + toolCapability: + type: string + title: tool_capability + maxRisk: + title: max_risk + $ref: '#/components/schemas/common.v1.RiskLevel' + authority: + not: + enum: + - 0 + title: authority + $ref: '#/components/schemas/agents.v1.AutonomyAuthority' + approvalPolicyRef: + type: string + title: approval_policy_ref + governancePolicyRef: + type: string + title: governance_policy_ref + rationale: + type: string + title: rationale + title: AutonomyRule + additionalProperties: false + description: AutonomyRule constrains a class of actions or tool capabilities. + agents.v1.CommitmentPolicy: + type: object + properties: + allowedKinds: + type: array + items: + $ref: '#/components/schemas/agents.v1.CommitmentKind' + title: allowed_kinds + templates: + type: array + items: + $ref: '#/components/schemas/agents.v1.CommitmentTemplate' + title: templates + defaultDueSeconds: + type: integer + title: default_due_seconds + format: int32 + maxOpenCommitments: + type: integer + title: max_open_commitments + format: int32 + requireObjectiveForCommitment: + type: boolean + title: require_objective_for_commitment + title: CommitmentPolicy + additionalProperties: false + description: |- + CommitmentPolicy describes which durable objectives and wakes can be created + from teammate commitments. + agents.v1.CommitmentTemplate: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.CommitmentKind' + objectiveTitleTemplate: + type: string + title: objective_title_template + objectiveDescriptionTemplate: + type: string + title: objective_description_template + wakeReasonTemplate: + type: string + title: wake_reason_template + requiredJoinKeys: + type: array + items: + type: string + title: required_join_keys + title: CommitmentTemplate + additionalProperties: false + description: CommitmentTemplate maps a commitment kind to objective and wake templates. + agents.v1.ControlA2ADelegationTaskRequest: + type: object + properties: + delegationId: + type: string + title: delegation_id + minLength: 1 + mode: + not: + enum: + - 0 + title: mode + $ref: '#/components/schemas/agents.v1.A2ADelegationTaskControlMode' + message: + type: string + title: message + idempotencyKey: + type: string + title: idempotency_key + targetRunId: + type: string + title: target_run_id + description: |- + Optional target selectors allow Platform callers to control a remote + subagent lane or child run while still fencing the command by the root + remote task id stored on the delegation. + childRunId: + type: string + title: child_run_id + subagentLaneId: + type: string + title: subagent_lane_id + workItemId: + type: string + title: work_item_id + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + metadata: + title: metadata + $ref: '#/components/schemas/google.protobuf.Struct' + title: ControlA2ADelegationTaskRequest + additionalProperties: false + agents.v1.ControlA2ADelegationTaskResponse: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + remoteTask: + title: remote_task + $ref: '#/components/schemas/agents.v1.A2ADelegationTaskControlResult' + title: ControlA2ADelegationTaskResponse + additionalProperties: false + agents.v1.DelegateRequest: + type: object + properties: + fromAgentId: + type: string + title: from_agent_id + minLength: 1 + toAgentId: + type: string + title: to_agent_id + description: |- + Specify to_agent_id for direct delegation, or required_capability for + capability-based routing through the registry. + requiredCapability: + type: string + title: required_capability + objectiveId: + type: string + title: objective_id + workflowRunId: + type: string + title: workflow_run_id + workflowStepId: + type: string + title: workflow_step_id + contextPayload: + type: string + title: context_payload + format: byte + reason: + type: string + title: reason + a2aSkillId: + type: string + title: a2a_skill_id + title: DelegateRequest + additionalProperties: false + agents.v1.DelegateResponse: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + title: DelegateResponse + additionalProperties: false + agents.v1.DelegationRecord: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + fromAgentId: + type: string + title: from_agent_id + toAgentId: + type: string + title: to_agent_id + requiredCapability: + type: string + title: required_capability + objectiveId: + type: string + title: objective_id + description: |- + objective_id links to the objectives/v1 Objective created for this + delegated unit of work. + workflowRunId: + type: string + title: workflow_run_id + description: |- + workflow_run_id and workflow_step_id link to workflows/v1 when this + delegation occurs within a workflow execution. + workflowStepId: + type: string + title: workflow_step_id + status: + title: status + $ref: '#/components/schemas/agents.v1.DelegationStatus' + contextPayload: + type: string + title: context_payload + format: byte + resultPayload: + type: string + title: result_payload + format: byte + reason: + type: string + title: reason + errorMessage: + type: string + title: error_message + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + resolvedAt: + title: resolved_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + a2aTaskId: + type: string + title: a2a_task_id + a2aMessageId: + type: string + title: a2a_message_id + a2aEndpointUrl: + type: string + title: a2a_endpoint_url + a2aDispatchStatus: + type: string + title: a2a_dispatch_status + a2aDispatchError: + type: string + title: a2a_dispatch_error + a2aSkillId: + type: string + title: a2a_skill_id + a2aDispatchedAt: + title: a2a_dispatched_at + description: |- + a2a_dispatched_at is the server time when the remote A2A task was first + accepted by the target transport. + $ref: '#/components/schemas/google.protobuf.Timestamp' + a2aLeaseRenewedAt: + title: a2a_lease_renewed_at + description: |- + a2a_lease_renewed_at is the last server time Platform observed remote A2A + progress for this delegation. + $ref: '#/components/schemas/google.protobuf.Timestamp' + a2aResumeWaitContracts: + type: array + items: + $ref: '#/components/schemas/google.protobuf.Struct' + title: a2a_resume_wait_contracts + description: |- + a2a_resume_wait_contracts are server-derived contracts that an origin + runtime can use to park the parent run on typed remote A2A callback events + after the target transport accepts the delegation. + a2aRootDelegationId: + type: string + title: a2a_root_delegation_id + description: |- + a2a_root_delegation_id identifies the root Platform delegation in an A2A + swarm chain. Root delegations use their own delegation id. + a2aParentDelegationId: + type: string + title: a2a_parent_delegation_id + description: |- + a2a_parent_delegation_id identifies the immediate parent Platform + delegation when this record was spawned by another remote A2A worker. + a2aDelegationChain: + type: array + items: + type: string + title: a2a_delegation_chain + description: |- + a2a_delegation_chain is the ordered Platform delegation lineage from root + to this delegation. + title: DelegationRecord + additionalProperties: false + description: |- + DelegationRecord tracks a typed hand-off between agents. The from_agent_id + creates an objective (objectives/v1) or references a workflow step + (workflows/v1 StepRun) and delegates execution to another agent resolved + by ID or by capability through the registry. + agents.v1.DeregisterRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + reason: + type: string + title: reason + title: DeregisterRequest + additionalProperties: false + agents.v1.DeregisterResponse: + type: object + title: DeregisterResponse + additionalProperties: false + agents.v1.DigitalTeammateProfile: + type: object + properties: + id: + type: string + title: id + version: + type: integer + title: version + format: int32 + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + displayName: + type: string + title: display_name + role: + type: string + title: role + purpose: + type: string + title: purpose + ownerUserId: + type: string + title: owner_user_id + ownerTeamId: + type: string + title: owner_team_id + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + lifecycle: + title: lifecycle + $ref: '#/components/schemas/agents.v1.TeammateLifecycle' + responsibilities: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateResponsibility' + title: responsibilities + commitmentPolicy: + title: commitment_policy + $ref: '#/components/schemas/agents.v1.CommitmentPolicy' + initiativePolicy: + title: initiative_policy + $ref: '#/components/schemas/agents.v1.InitiativePolicy' + autonomyPolicy: + title: autonomy_policy + $ref: '#/components/schemas/agents.v1.AutonomyPolicy' + memoryPolicy: + title: memory_policy + $ref: '#/components/schemas/agents.v1.MemoryPolicy' + presencePolicy: + title: presence_policy + $ref: '#/components/schemas/agents.v1.PresencePolicy' + outputPolicy: + title: output_policy + $ref: '#/components/schemas/agents.v1.OutputPolicy' + evalPolicy: + title: eval_policy + $ref: '#/components/schemas/agents.v1.EvalPolicy' + escalationPolicy: + title: escalation_policy + $ref: '#/components/schemas/agents.v1.EscalationPolicy' + labels: + type: object + title: labels + additionalProperties: + type: string + title: value + parameters: + title: parameters + $ref: '#/components/schemas/google.protobuf.Struct' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + channelManifests: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelManifest' + title: channel_manifests + title: DigitalTeammateProfile + additionalProperties: false + description: |- + DigitalTeammateProfile is the versioned contract for how an AgentConfig acts + as a durable teammate across objectives, workflows, tools, memory, evals, and + Slack or other delivery surfaces. + agents.v1.DigitalTeammateProfile.LabelsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: LabelsEntry + additionalProperties: false + agents.v1.EscalationPolicy: + type: object + properties: + approverUserIds: + type: array + items: + type: string + title: approver_user_ids + approverTeamIds: + type: array + items: + type: string + title: approver_team_ids + escalateAfterSeconds: + type: integer + title: escalate_after_seconds + format: int32 + fallbackChannel: + title: fallback_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + title: EscalationPolicy + additionalProperties: false + description: |- + EscalationPolicy describes who must be contacted when the teammate blocks or + needs approval. + agents.v1.EvalBinding: + type: object + properties: + suiteName: + type: string + title: suite_name + metricName: + type: string + title: metric_name + minimumScore: + type: number + title: minimum_score + format: double + failureAction: + type: string + title: failure_action + title: EvalBinding + additionalProperties: false + description: EvalBinding describes one score that should gate or monitor teammate quality. + agents.v1.EvalPolicy: + type: object + properties: + bindings: + type: array + items: + $ref: '#/components/schemas/agents.v1.EvalBinding' + title: bindings + loopDefinitionId: + type: string + title: loop_definition_id + productionSampleRateBasisPoints: + type: integer + title: production_sample_rate_basis_points + maximum: 10000 + format: int32 + title: EvalPolicy + additionalProperties: false + description: EvalPolicy binds production behavior to loop and eval scoring. + agents.v1.GetA2ADelegationGraphRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + rootDelegationId: + type: string + title: root_delegation_id + description: Root Platform delegation id for the swarm graph. + delegationId: + type: string + title: delegation_id + description: |- + Any Platform delegation id in the swarm graph. If provided without + root_delegation_id, the server derives the root from recorded lineage. + maxDepth: + type: integer + title: max_depth + maximum: 100 + format: int32 + description: Maximum child depth to return from the root. Zero means no depth limit. + limit: + type: integer + title: limit + maximum: 1000 + format: int32 + description: Maximum graph nodes to return. Zero uses the server default. + title: GetA2ADelegationGraphRequest + additionalProperties: false + agents.v1.GetA2ADelegationGraphResponse: + type: object + properties: + rootDelegationId: + type: string + title: root_delegation_id + nodes: + type: array + items: + $ref: '#/components/schemas/agents.v1.A2ADelegationGraphNode' + title: nodes + edges: + type: array + items: + $ref: '#/components/schemas/agents.v1.A2ADelegationGraphEdge' + title: edges + total: + type: integer + title: total + format: int32 + truncated: + type: boolean + title: truncated + missingParentDelegationIds: + type: array + items: + type: string + title: missing_parent_delegation_ids + title: GetA2ADelegationGraphResponse + additionalProperties: false + agents.v1.GetConfigRequest: + type: object + properties: + agentId: + type: string + title: agent_id + minLength: 1 + version: + exclusiveMinimum: 0 + type: integer + title: version + format: int32 + title: GetConfigRequest + additionalProperties: false + agents.v1.GetConfigResponse: + type: object + properties: + config: + title: config + $ref: '#/components/schemas/agents.v1.AgentConfig' + title: GetConfigResponse + additionalProperties: false + agents.v1.GetDelegationRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: GetDelegationRequest + additionalProperties: false + agents.v1.GetDelegationResponse: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + title: GetDelegationResponse + additionalProperties: false + agents.v1.GetRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: GetRequest + additionalProperties: false + agents.v1.GetResponse: + type: object + properties: + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + title: GetResponse + additionalProperties: false + agents.v1.HeartbeatRequest: + type: object + properties: + agentId: + type: string + title: agent_id + minLength: 1 + status: + title: status + $ref: '#/components/schemas/agents.v1.AgentStatus' + currentObjectiveIds: + type: array + items: + type: string + title: current_objective_ids + description: |- + current_objective_ids lists the objectives/v1 Objective.id values this + agent currently holds. Used for capacity-aware delegation routing. + surface: + type: string + title: surface + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + a2a: + title: a2a + $ref: '#/components/schemas/agents.v1.AgentA2APeerProjection' + title: HeartbeatRequest + additionalProperties: false + agents.v1.HeartbeatResponse: + type: object + properties: + nextHeartbeatBy: + title: next_heartbeat_by + $ref: '#/components/schemas/google.protobuf.Timestamp' + title: HeartbeatResponse + additionalProperties: false + agents.v1.InitiativePolicy: + type: object + properties: + triggers: + type: array + items: + $ref: '#/components/schemas/agents.v1.InitiativeTrigger' + title: triggers + maxInitiatedRunsPerDay: + type: integer + title: max_initiated_runs_per_day + format: int32 + requireHumanSeed: + type: boolean + title: require_human_seed + title: InitiativePolicy + additionalProperties: false + description: |- + InitiativePolicy describes bounded conditions where a teammate can start or + resume work proactively. + agents.v1.InitiativeTrigger: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.InitiativeTriggerKind' + triggerRef: + type: string + title: trigger_ref + filterExpr: + type: string + title: filter_expr + workflowDefinitionId: + type: string + title: workflow_definition_id + objectiveTemplateId: + type: string + title: objective_template_id + title: InitiativeTrigger + additionalProperties: false + description: InitiativeTrigger binds a proactive trigger to workflow or objective state. + agents.v1.ListConfigsRequest: + type: object + properties: + agentId: + type: string + title: agent_id + minLength: 1 + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + title: ListConfigsRequest + additionalProperties: false + agents.v1.ListConfigsResponse: + type: object + properties: + configs: + type: array + items: + $ref: '#/components/schemas/agents.v1.AgentConfig' + title: configs + total: + type: integer + title: total + format: int32 + hasMore: + type: boolean + title: has_more + title: ListConfigsResponse + additionalProperties: false + agents.v1.ListDelegationsRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + fromAgentId: + type: string + title: from_agent_id + toAgentId: + type: string + title: to_agent_id + status: + title: status + $ref: '#/components/schemas/agents.v1.DelegationStatus' + workflowRunId: + type: string + title: workflow_run_id + limit: + type: integer + title: limit + format: int32 + offset: + type: integer + title: offset + format: int32 + a2aTaskId: + type: string + title: a2a_task_id + description: A2A remote task id returned by the target peer. + a2aMessageId: + type: string + title: a2a_message_id + description: A2A message id used for dispatch/callback correlation. + a2aSkillId: + type: string + title: a2a_skill_id + description: A2A skill id requested for the delegation. + a2aDispatchStatus: + type: string + title: a2a_dispatch_status + description: A2A transport dispatch status recorded by Platform. + a2aRootDelegationId: + type: string + title: a2a_root_delegation_id + description: Root Platform delegation id for a remote A2A swarm chain. + a2aParentDelegationId: + type: string + title: a2a_parent_delegation_id + description: Immediate parent Platform delegation id for a remote A2A swarm chain. + a2aOnly: + type: boolean + title: a2a_only + description: Limit results to delegations that have A2A transport or swarm lineage. + title: ListDelegationsRequest + additionalProperties: false + agents.v1.ListDelegationsResponse: + type: object + properties: + delegations: + type: array + items: + $ref: '#/components/schemas/agents.v1.DelegationRecord' + title: delegations + total: + type: integer + title: total + format: int32 + title: ListDelegationsResponse + additionalProperties: false + agents.v1.ListRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + agentType: + type: string + title: agent_type + capability: + type: string + title: capability + surface: + type: string + title: surface + status: + title: status + $ref: '#/components/schemas/agents.v1.AgentStatus' + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + a2aSkillId: + type: string + title: a2a_skill_id + description: A2A skill ID required for fleet-scale delegation discovery. + taskClass: + type: string + title: task_class + description: Task class that must be allowed by the matched peer or skill policy. + requireA2aDispatch: + type: boolean + title: require_a2a_dispatch + description: Require peers to expose a dispatchable A2A HTTP+JSON endpoint. + eligibleForDelegation: + type: boolean + title: eligible_for_delegation + description: Use delegation-eligible discovery semantics even when only generic filters are supplied. + title: ListRequest + additionalProperties: false + agents.v1.ListResponse: + type: object + properties: + agents: + type: array + items: + $ref: '#/components/schemas/agents.v1.Agent' + title: agents + total: + type: integer + title: total + format: int32 + discoveryEvidence: + title: discovery_evidence + $ref: '#/components/schemas/agents.v1.AgentDiscoveryEvidence' + title: ListResponse + additionalProperties: false + agents.v1.MemoryPolicy: + type: object + properties: + allowedScopeRefs: + type: array + items: + type: string + title: allowed_scope_refs + allowUserMemory: + type: boolean + title: allow_user_memory + allowTeamMemory: + type: boolean + title: allow_team_memory + allowAgentMemory: + type: boolean + title: allow_agent_memory + requireReviewForNewMemory: + type: boolean + title: require_review_for_new_memory + defaultRetentionDays: + type: integer + title: default_retention_days + format: int32 + requiredSourceTypes: + type: array + items: + type: string + title: required_source_types + allowCrossChannelRecall: + type: boolean + title: allow_cross_channel_recall + title: MemoryPolicy + additionalProperties: false + description: MemoryPolicy describes what a teammate may recall or propose remembering. + agents.v1.OutputPolicy: + type: object + properties: + requiredArtifactKinds: + type: array + items: + type: string + title: required_artifact_kinds + optionalArtifactKinds: + type: array + items: + type: string + title: optional_artifact_kinds + renderChannelCards: + type: boolean + title: render_channel_cards + defaultVisibility: + type: string + title: default_visibility + title: OutputPolicy + additionalProperties: false + description: OutputPolicy describes durable work products and channel-safe renderings. + agents.v1.PresencePolicy: + type: object + properties: + primaryChannel: + title: primary_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + primaryChannelId: + type: string + title: primary_channel_id + defaultThreadPolicy: + type: string + title: default_thread_policy + progressUpdateIntervalSeconds: + type: integer + title: progress_update_interval_seconds + format: int32 + visibleEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.PresenceEvent' + title: visible_events + postActionReceipts: + type: boolean + title: post_action_receipts + postBlockerUpdates: + type: boolean + title: post_blocker_updates + title: PresencePolicy + additionalProperties: false + description: |- + PresencePolicy describes how a teammate reports work back to Slack or other + delivery channels. + agents.v1.PushConfigRequest: + type: object + properties: + agentId: + type: string + title: agent_id + minLength: 1 + skillIds: + type: array + items: + type: string + title: skill_ids + promptBindings: + type: object + title: prompt_bindings + additionalProperties: + type: string + title: value + modelPreferences: + type: object + title: model_preferences + additionalProperties: + type: string + title: value + integrationIds: + type: array + items: + type: string + title: integration_ids + entityTypeScopes: + type: array + items: + type: string + title: entity_type_scopes + maxConcurrentObjectives: + type: integer + title: max_concurrent_objectives + format: int32 + costBudgetUsd: + type: number + title: cost_budget_usd + format: double + notificationChannel: + type: string + title: notification_channel + parameters: + title: parameters + $ref: '#/components/schemas/google.protobuf.Struct' + author: + type: string + title: author + entityTypeScopeEnums: + type: array + items: + $ref: '#/components/schemas/common.v1.EntityType' + title: entity_type_scope_enums + notificationChannelEnum: + title: notification_channel_enum + $ref: '#/components/schemas/common.v1.DeliveryChannel' + teammateProfile: + title: teammate_profile + $ref: '#/components/schemas/agents.v1.DigitalTeammateProfile' + title: PushConfigRequest + additionalProperties: false + agents.v1.PushConfigRequest.ModelPreferencesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: ModelPreferencesEntry + additionalProperties: false + agents.v1.PushConfigRequest.PromptBindingsEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: PromptBindingsEntry + additionalProperties: false + agents.v1.PushConfigResponse: + type: object + properties: + config: + title: config + $ref: '#/components/schemas/agents.v1.AgentConfig' + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + title: PushConfigResponse + additionalProperties: false + agents.v1.RegisterRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + name: + type: string + title: name + description: + type: string + title: description + agentType: + type: string + title: agent_type + capabilities: + type: array + items: + type: string + title: capabilities + minItems: 1 + surfaces: + type: array + items: + type: string + title: surfaces + ownerId: + type: string + title: owner_id + id: + type: string + title: id + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + a2a: + title: a2a + $ref: '#/components/schemas/agents.v1.AgentA2APeerProjection' + title: RegisterRequest + additionalProperties: false + agents.v1.RegisterResponse: + type: object + properties: + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + title: RegisterResponse + additionalProperties: false + agents.v1.RenewDelegationLeaseRequest: + type: object + properties: + delegationId: + type: string + title: delegation_id + minLength: 1 + title: RenewDelegationLeaseRequest + additionalProperties: false + agents.v1.RenewDelegationLeaseResponse: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + title: RenewDelegationLeaseResponse + additionalProperties: false + agents.v1.ResolveDelegationRequest: + type: object + properties: + delegationId: + type: string + title: delegation_id + minLength: 1 + status: + not: + enum: + - 0 + title: status + $ref: '#/components/schemas/agents.v1.DelegationStatus' + resultPayload: + type: string + title: result_payload + format: byte + errorMessage: + type: string + title: error_message + title: ResolveDelegationRequest + additionalProperties: false + agents.v1.ResolveDelegationResponse: + type: object + properties: + delegation: + title: delegation + $ref: '#/components/schemas/agents.v1.DelegationRecord' + title: ResolveDelegationResponse + additionalProperties: false + agents.v1.RollbackConfigRequest: + type: object + properties: + agentId: + type: string + title: agent_id + minLength: 1 + targetVersion: + exclusiveMinimum: 0 + type: integer + title: target_version + format: int32 + actor: + type: string + title: actor + reason: + type: string + title: reason + title: RollbackConfigRequest + additionalProperties: false + agents.v1.RollbackConfigResponse: + type: object + properties: + config: + title: config + $ref: '#/components/schemas/agents.v1.AgentConfig' + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + title: RollbackConfigResponse + additionalProperties: false + agents.v1.TeammateChannelManifest: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/agents.v1.TeammateChannelKind' + label: + type: string + title: label + deliveryChannel: + not: + enum: + - 0 + title: delivery_channel + $ref: '#/components/schemas/common.v1.DeliveryChannel' + platformSurface: + title: platform_surface + $ref: '#/components/schemas/common.v1.Surface' + channelId: + type: string + title: channel_id + capabilities: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelCapability' + title: capabilities + inboundEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateChannelEventKind' + title: inbound_events + runtimeEvents: + type: array + items: + $ref: '#/components/schemas/agents.v1.TeammateRuntimeRenderEventKind' + title: runtime_events + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: TeammateChannelManifest + additionalProperties: false + description: |- + TeammateChannelManifest describes one channel adapter supported by a + teammate profile. Durable execution remains owned by AgentRuntime; this + manifest lets product surfaces declare the provider-specific ingress and + rendering coverage they can project. + agents.v1.TeammateChannelManifest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + agents.v1.TeammateResponsibility: + type: object + properties: + id: + type: string + title: id + title: + type: string + title: title + description: + type: string + title: description + capabilityRefs: + type: array + items: + type: string + title: capability_refs + ownedEntityTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.EntityType' + title: owned_entity_types + defaultSkillIds: + type: array + items: + type: string + title: default_skill_ids + promptNames: + type: array + items: + type: string + title: prompt_names + successMetricRefs: + type: array + items: + type: string + title: success_metric_refs + title: TeammateResponsibility + additionalProperties: false + description: |- + TeammateResponsibility binds a role claim to capabilities, entities, prompts, + skills, and measurable outcomes. + agents.v1.UpdateRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + name: + type: string + title: name + description: + type: string + title: description + capabilities: + type: array + items: + type: string + title: capabilities + surfaces: + type: array + items: + type: string + title: surfaces + surfaceTypes: + type: array + items: + $ref: '#/components/schemas/common.v1.Surface' + title: surface_types + a2a: + title: a2a + $ref: '#/components/schemas/agents.v1.AgentA2APeerProjection' + title: UpdateRequest + additionalProperties: false + agents.v1.UpdateResponse: + type: object + properties: + agent: + title: agent + $ref: '#/components/schemas/agents.v1.Agent' + title: UpdateResponse + additionalProperties: false + google.protobuf.ListValue: + type: object + properties: + values: + type: array + items: + $ref: '#/components/schemas/google.protobuf.Value' + title: values + description: Repeated field of dynamically typed values. + title: ListValue + additionalProperties: false + description: |- + `ListValue` is a wrapper around a repeated field of values. + + The JSON representation for `ListValue` is JSON array. + google.protobuf.Struct: + type: object + additionalProperties: + $ref: '#/components/schemas/google.protobuf.Value' + description: |- + `Struct` represents a structured data value, consisting of fields + which map to dynamically typed values. In some languages, `Struct` + might be supported by a native representation. For example, in + scripting languages like JS a struct is represented as an + object. The details of that representation are described together + with the proto support for the language. + + The JSON representation for `Struct` is JSON object. + google.protobuf.Struct.FieldsEntry: + type: object + properties: + key: + type: string + title: key + value: + title: value + $ref: '#/components/schemas/google.protobuf.Value' + title: FieldsEntry + additionalProperties: false + google.protobuf.Timestamp: + type: string + examples: + - 1s + - 1.000340012s + format: date-time + description: |- + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + ) to obtain a formatter capable of generating timestamps in this format. + google.protobuf.Value: + oneOf: + - type: "null" + - type: number + - type: string + - type: boolean + - type: array + - type: object + additionalProperties: true + description: |- + `Value` represents a dynamically typed value which can be either + null, a number, a string, a boolean, a recursive struct value, or a + list of values. A producer of value is expected to set one of these + variants. Absence of any variant indicates an error. + + The JSON representation for `Value` is JSON value. + connect-protocol-version: + type: number + title: Connect-Protocol-Version + enum: + - 1 + description: Define the version of the Connect protocol + const: 1 + connect-timeout-header: + type: number + title: Connect-Timeout-Ms + description: Define the timeout, in ms + connect.error: + type: object + properties: + code: + type: string + examples: + - not_found + enum: + - canceled + - unknown + - invalid_argument + - deadline_exceeded + - not_found + - already_exists + - permission_denied + - resource_exhausted + - failed_precondition + - aborted + - out_of_range + - unimplemented + - internal + - unavailable + - data_loss + - unauthenticated + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + message: + type: string + description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + detail: + $ref: '#/components/schemas/google.protobuf.Any' + title: Connect Error + additionalProperties: true + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' + google.protobuf.Any: + type: object + properties: + type: + type: string + value: + type: string + format: binary + debug: + type: object + additionalProperties: true + additionalProperties: true + description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +security: [] +tags: + - name: agents.v1.AgentService + description: |- + AgentService manages agent definitions, versioned configuration, and + cross-agent delegation. Every string agent_id in the platform (meter, + objectives, approvals, governance, memory) resolves to an Agent record + owned by this service. diff --git a/openapi/codex/v1/codex.openapi.yaml b/openapi/codex/v1/codex.openapi.yaml new file mode 100644 index 0000000..ca81ac9 --- /dev/null +++ b/openapi/codex/v1/codex.openapi.yaml @@ -0,0 +1,1086 @@ +openapi: 3.1.0 +info: + title: codex.v1 +paths: {} +components: + schemas: + codex.v1.CodexActionType: + type: string + title: CodexActionType + enum: + - CODEX_ACTION_TYPE_UNSPECIFIED + - CODEX_ACTION_TYPE_START_WORK + - CODEX_ACTION_TYPE_FOLLOW_UP + - CODEX_ACTION_TYPE_INVESTIGATE + - CODEX_ACTION_TYPE_FIX + - CODEX_ACTION_TYPE_REVIEW + - CODEX_ACTION_TYPE_TEST + - CODEX_ACTION_TYPE_EXPLAIN + - CODEX_ACTION_TYPE_RETRY + - CODEX_ACTION_TYPE_FORK + description: |- + CodexActionType describes the user intent that should shape prompting, + permissions, routing, and output expectations for a Codex run. + codex.v1.CodexAuthorityScope: + type: string + title: CodexAuthorityScope + enum: + - CODEX_AUTHORITY_SCOPE_UNSPECIFIED + - CODEX_AUTHORITY_SCOPE_DISCUSS_ONLY + - CODEX_AUTHORITY_SCOPE_READ_ONLY + - CODEX_AUTHORITY_SCOPE_WORKSPACE_WRITE + description: |- + CodexAuthorityScope is the maximum local filesystem authority requested for + delegated work. Platform policy, device mappings, and native confirmation + may only narrow this value. + codex.v1.CodexBackend: + type: string + title: CodexBackend + enum: + - CODEX_BACKEND_UNSPECIFIED + - CODEX_BACKEND_APP_SERVER + - CODEX_BACKEND_CODEX_SDK + - CODEX_BACKEND_CLAUDE_CODE + - CODEX_BACKEND_INTERNAL_AGENT + - CODEX_BACKEND_MODEL_TRIAGE + description: CodexBackend identifies the execution backend selected for a run. + codex.v1.CodexContextSourceKind: + type: string + title: CodexContextSourceKind + enum: + - CODEX_CONTEXT_SOURCE_KIND_UNSPECIFIED + - CODEX_CONTEXT_SOURCE_KIND_SLACK_MESSAGE + - CODEX_CONTEXT_SOURCE_KIND_SLACK_THREAD + - CODEX_CONTEXT_SOURCE_KIND_GITHUB_PULL_REQUEST + - CODEX_CONTEXT_SOURCE_KIND_GITHUB_ISSUE + - CODEX_CONTEXT_SOURCE_KIND_LINEAR_TICKET + - CODEX_CONTEXT_SOURCE_KIND_JIRA_TICKET + - CODEX_CONTEXT_SOURCE_KIND_SENTRY_EVENT + - CODEX_CONTEXT_SOURCE_KIND_DATADOG_DASHBOARD + - CODEX_CONTEXT_SOURCE_KIND_LOG_SNIPPET + - CODEX_CONTEXT_SOURCE_KIND_SCREENSHOT + - CODEX_CONTEXT_SOURCE_KIND_MEMORY + - CODEX_CONTEXT_SOURCE_KIND_URL + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_THING + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_FACT + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_EVENT + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_ACTION + - CODEX_CONTEXT_SOURCE_KIND_CEREBRO_PREDICTION + - CODEX_CONTEXT_SOURCE_KIND_GRANOLA_MEETING + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_EMAIL_THREAD + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_DRIVE_FILE + - CODEX_CONTEXT_SOURCE_KIND_GOOGLE_CALENDAR_EVENT + - CODEX_CONTEXT_SOURCE_KIND_DEPLOYMENT + - CODEX_CONTEXT_SOURCE_KIND_BUILD + description: |- + CodexContextSourceKind names a structured context source enriched before a + run reaches the worker. + codex.v1.CodexExecutionIntent: + type: string + title: CodexExecutionIntent + enum: + - CODEX_EXECUTION_INTENT_UNSPECIFIED + - CODEX_EXECUTION_INTENT_READ_ONLY_DIAGNOSIS + - CODEX_EXECUTION_INTENT_PATCH_AND_VERIFY + - CODEX_EXECUTION_INTENT_REVIEW_ONLY + - CODEX_EXECUTION_INTENT_TEST_AUTHORING + - CODEX_EXECUTION_INTENT_EXPLANATION + description: CodexExecutionIntent captures the expected risk and write profile. + codex.v1.CodexGitState: + type: string + title: CodexGitState + enum: + - CODEX_GIT_STATE_UNSPECIFIED + - CODEX_GIT_STATE_UNCHANGED + - CODEX_GIT_STATE_DIRTY + - CODEX_GIT_STATE_COMMITTED + description: CodexGitState records the repository state without embedding branch prose. + codex.v1.CodexInteractionType: + type: string + title: CodexInteractionType + enum: + - CODEX_INTERACTION_TYPE_UNSPECIFIED + - CODEX_INTERACTION_TYPE_APPROVE_PLAN + - CODEX_INTERACTION_TYPE_REJECT_PLAN + - CODEX_INTERACTION_TYPE_APPLY_PATCH + - CODEX_INTERACTION_TYPE_DISCARD_PATCH + - CODEX_INTERACTION_TYPE_STOP_TURN + - CODEX_INTERACTION_TYPE_RETRY_TURN + - CODEX_INTERACTION_TYPE_FORK_THREAD + - CODEX_INTERACTION_TYPE_APPROVE_COMMAND + - CODEX_INTERACTION_TYPE_PROVIDE_INPUT + description: CodexInteractionType describes a channel-native control action. + codex.v1.CodexInteractivityMode: + type: string + title: CodexInteractivityMode + enum: + - CODEX_INTERACTIVITY_MODE_UNSPECIFIED + - CODEX_INTERACTIVITY_MODE_BACKGROUND + - CODEX_INTERACTIVITY_MODE_THREAD_CONVERSATION + - CODEX_INTERACTIVITY_MODE_HUMAN_APPROVAL_GATED + description: |- + CodexInteractivityMode controls how much of the run is projected back to a + human conversation surface. + codex.v1.CodexMemoryScopeKind: + type: string + title: CodexMemoryScopeKind + enum: + - CODEX_MEMORY_SCOPE_KIND_UNSPECIFIED + - CODEX_MEMORY_SCOPE_KIND_THREAD + - CODEX_MEMORY_SCOPE_KIND_REPOSITORY + - CODEX_MEMORY_SCOPE_KIND_TEAM + - CODEX_MEMORY_SCOPE_KIND_WORKSPACE + description: CodexMemoryScopeKind identifies the retrieval scope for prior run memory. + codex.v1.CodexOutputKind: + type: string + title: CodexOutputKind + enum: + - CODEX_OUTPUT_KIND_UNSPECIFIED + - CODEX_OUTPUT_KIND_THREAD_MESSAGE + - CODEX_OUTPUT_KIND_PULL_REQUEST + - CODEX_OUTPUT_KIND_PULL_REQUEST_COMMENT + - CODEX_OUTPUT_KIND_ARTIFACT + - CODEX_OUTPUT_KIND_RUN_PANEL + - CODEX_OUTPUT_KIND_EVALUATION_EXAMPLE + - CODEX_OUTPUT_KIND_DRAFT_MESSAGE + - CODEX_OUTPUT_KIND_DECISION_BRIEF + - CODEX_OUTPUT_KIND_PREPARED_FUTURE + - CODEX_OUTPUT_KIND_ISSUE + description: |- + CodexOutputKind classifies an artifact or external object the run should + create or synchronize. + codex.v1.CodexProgressStage: + type: string + title: CodexProgressStage + enum: + - CODEX_PROGRESS_STAGE_UNSPECIFIED + - CODEX_PROGRESS_STAGE_ACCEPTED + - CODEX_PROGRESS_STAGE_CONTEXT_ENRICHING + - CODEX_PROGRESS_STAGE_PLANNING + - CODEX_PROGRESS_STAGE_WAITING_FOR_APPROVAL + - CODEX_PROGRESS_STAGE_EDITING + - CODEX_PROGRESS_STAGE_TESTING + - CODEX_PROGRESS_STAGE_CREATING_OUTPUT + - CODEX_PROGRESS_STAGE_WATCHING_CI + - CODEX_PROGRESS_STAGE_COMPLETED + - CODEX_PROGRESS_STAGE_FAILED + - CODEX_PROGRESS_STAGE_CANCELLED + description: CodexProgressStage classifies user-visible run progress. + codex.v1.CodexVerificationStatus: + type: string + title: CodexVerificationStatus + enum: + - CODEX_VERIFICATION_STATUS_UNSPECIFIED + - CODEX_VERIFICATION_STATUS_NOT_RUN + - CODEX_VERIFICATION_STATUS_PASSED + - CODEX_VERIFICATION_STATUS_FAILED + - CODEX_VERIFICATION_STATUS_PARTIAL + description: CodexVerificationStatus records whether the bounded result was verified. + google.protobuf.NullValue: + type: string + title: NullValue + enum: + - NULL_VALUE + description: |- + `NullValue` is a singleton enumeration to represent the null value for the + `Value` type union. + + The JSON representation for `NullValue` is JSON `null`. + codex.v1.CodexApprovalPolicy: + type: object + properties: + dryRun: + type: boolean + title: dry_run + allowWrites: + type: boolean + title: allow_writes + requirePlanApproval: + type: boolean + title: require_plan_approval + requirePatchApproval: + type: boolean + title: require_patch_approval + requireCommandApproval: + type: boolean + title: require_command_approval + protectedPathGlobs: + type: array + items: + type: string + title: protected_path_globs + approverEntityIds: + type: array + items: + type: string + title: approver_entity_ids + networkEgressAllowlist: + type: array + items: + type: string + title: network_egress_allowlist + scrubSecretsFromOutputs: + type: boolean + title: scrub_secrets_from_outputs + sandboxMode: + type: string + title: sandbox_mode + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexApprovalPolicy + additionalProperties: false + description: |- + CodexApprovalPolicy captures governance controls before a worker performs + write, network, or otherwise sensitive operations. + codex.v1.CodexApprovalPolicy.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexBudgetPolicy: + type: object + properties: + maxInputTokens: + type: + - integer + - string + title: max_input_tokens + format: int64 + maxOutputTokens: + type: + - integer + - string + title: max_output_tokens + format: int64 + maxTotalTokens: + type: + - integer + - string + title: max_total_tokens + format: int64 + maxCostMicros: + type: + - integer + - string + title: max_cost_micros + format: int64 + maxRunSeconds: + type: integer + title: max_run_seconds + format: int32 + maxToolCalls: + type: integer + title: max_tool_calls + format: int32 + maxRetries: + type: integer + title: max_retries + format: int32 + title: CodexBudgetPolicy + additionalProperties: false + description: CodexBudgetPolicy defines per-run resource limits. + codex.v1.CodexContextItem: + type: object + properties: + sourceKind: + title: source_kind + $ref: '#/components/schemas/codex.v1.CodexContextSourceKind' + id: + type: string + title: id + uri: + type: string + title: uri + title: + type: string + title: title + text: + type: string + title: text + contentType: + type: string + title: content_type + digest: + type: string + title: digest + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexContextItem + additionalProperties: false + description: CodexContextItem is a single enriched context object available to the run. + codex.v1.CodexContextItem.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexConversationRef: + type: object + properties: + sessionId: + type: string + title: session_id + appServerThreadId: + type: string + title: app_server_thread_id + previousRunId: + type: string + title: previous_run_id + parentRunId: + type: string + title: parent_run_id + followupToTurnId: + type: string + title: followup_to_turn_id + channelThreadId: + type: string + title: channel_thread_id + channelMessageId: + type: string + title: channel_message_id + keepSessionAlive: + type: boolean + title: keep_session_alive + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexConversationRef + additionalProperties: false + description: CodexConversationRef carries durable session coordinates across turns. + codex.v1.CodexConversationRef.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexInteractionDecision: + type: object + properties: + interactionType: + title: interaction_type + $ref: '#/components/schemas/codex.v1.CodexInteractionType' + decision: + type: string + title: decision + reason: + type: string + title: reason + actorEntityId: + type: string + title: actor_entity_id + selectedChoice: + type: string + title: selected_choice + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexInteractionDecision + additionalProperties: false + description: CodexInteractionDecision captures the user's response to a Codex control. + codex.v1.CodexInteractionDecision.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexInteractionRequest: + type: object + properties: + interactionType: + title: interaction_type + $ref: '#/components/schemas/codex.v1.CodexInteractionType' + runId: + type: string + title: run_id + waitId: + type: string + title: wait_id + stepId: + type: string + title: step_id + artifactId: + type: string + title: artifact_id + patchId: + type: string + title: patch_id + prompt: + type: string + title: prompt + choices: + type: array + items: + type: string + title: choices + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Struct' + expiresAt: + title: expires_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexInteractionRequest + additionalProperties: false + description: |- + CodexInteractionRequest describes a pending human decision projected to a + channel surface. + codex.v1.CodexInteractionRequest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexMemoryScope: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/codex.v1.CodexMemoryScopeKind' + key: + type: string + title: key + retentionDays: + type: integer + title: retention_days + format: int32 + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexMemoryScope + additionalProperties: false + description: CodexMemoryScope describes what prior run knowledge should be retrieved. + codex.v1.CodexMemoryScope.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexOutcomeSignal: + type: object + properties: + runId: + type: string + title: run_id + pullRequestUrl: + type: string + title: pull_request_url + merged: + type: boolean + title: merged + reverted: + type: boolean + title: reverted + humanEdited: + type: boolean + title: human_edited + channelReaction: + type: string + title: channel_reaction + reviewOutcome: + type: string + title: review_outcome + observedAt: + title: observed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexOutcomeSignal + additionalProperties: false + description: CodexOutcomeSignal feeds evaluation and routing loops after the run. + codex.v1.CodexOutcomeSignal.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexOutputTarget: + type: object + properties: + kind: + title: kind + $ref: '#/components/schemas/codex.v1.CodexOutputKind' + id: + type: string + title: id + uri: + type: string + title: uri + title: + type: string + title: title + draft: + type: boolean + title: draft + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexOutputTarget + additionalProperties: false + description: CodexOutputTarget describes a desired or produced external output. + codex.v1.CodexOutputTarget.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexPreparedFutureRef: + type: object + properties: + preparedFutureId: + type: string + title: prepared_future_id + cerebroActionId: + type: string + title: cerebro_action_id + cerebroPredictionId: + type: string + title: cerebro_prediction_id + cerebroFactIds: + type: array + items: + type: string + title: cerebro_fact_ids + sourceRecordIds: + type: array + items: + type: string + title: source_record_ids + artifactIds: + type: array + items: + type: string + title: artifact_ids + approvalRequestIds: + type: array + items: + type: string + title: approval_request_ids + evidenceUri: + type: string + title: evidence_uri + sourceHealth: + type: string + title: source_health + riskLevel: + type: string + title: risk_level + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexPreparedFutureRef + additionalProperties: false + description: |- + CodexPreparedFutureRef ties a Codex run to the reviewable next move it is + preparing. It is a grouping contract, not an approval or execution grant. + codex.v1.CodexPreparedFutureRef.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexRoutingPolicy: + type: object + properties: + backend: + title: backend + $ref: '#/components/schemas/codex.v1.CodexBackend' + workerQueue: + type: string + title: worker_queue + modelTier: + type: string + title: model_tier + preferredAgentId: + type: string + title: preferred_agent_id + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexRoutingPolicy + additionalProperties: false + description: CodexRoutingPolicy captures backend and worker selection. + codex.v1.CodexRoutingPolicy.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexRunProgress: + type: object + properties: + stage: + title: stage + $ref: '#/components/schemas/codex.v1.CodexProgressStage' + safeSummary: + type: string + title: safe_summary + progressPercent: + type: integer + title: progress_percent + maximum: 100 + format: int32 + filesRead: + type: integer + title: files_read + format: int32 + filesChanged: + type: integer + title: files_changed + format: int32 + commandsRun: + type: integer + title: commands_run + format: int32 + inputTokens: + type: + - integer + - string + title: input_tokens + format: int64 + outputTokens: + type: + - integer + - string + title: output_tokens + format: int64 + estimatedCostMicros: + type: + - integer + - string + title: estimated_cost_micros + format: int64 + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: CodexRunProgress + additionalProperties: false + description: CodexRunProgress is the compact, user-visible progress projection. + codex.v1.CodexRunProgress.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexWorkRequest: + type: object + properties: + actionType: + title: action_type + $ref: '#/components/schemas/codex.v1.CodexActionType' + executionIntent: + title: execution_intent + $ref: '#/components/schemas/codex.v1.CodexExecutionIntent' + prompt: + type: string + title: prompt + repo: + type: string + title: repo + cwd: + type: string + title: cwd + branch: + type: string + title: branch + baseBranch: + type: string + title: base_branch + tenantId: + type: string + title: tenant_id + reason: + type: string + title: reason + conversation: + title: conversation + $ref: '#/components/schemas/codex.v1.CodexConversationRef' + routing: + title: routing + $ref: '#/components/schemas/codex.v1.CodexRoutingPolicy' + budget: + title: budget + $ref: '#/components/schemas/codex.v1.CodexBudgetPolicy' + approvalPolicy: + title: approval_policy + $ref: '#/components/schemas/codex.v1.CodexApprovalPolicy' + interactivityMode: + title: interactivity_mode + $ref: '#/components/schemas/codex.v1.CodexInteractivityMode' + contextItems: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexContextItem' + title: context_items + desiredOutputs: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexOutputTarget' + title: desired_outputs + memoryScopes: + type: array + items: + $ref: '#/components/schemas/codex.v1.CodexMemoryScope' + title: memory_scopes + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + preparedFuture: + title: prepared_future + $ref: '#/components/schemas/codex.v1.CodexPreparedFutureRef' + resourceId: + type: string + title: resource_id + maxLength: 512 + pattern: ^$|^[^/\\:][^\\:]*$|^[A-Za-z][A-Za-z0-9+.-]+:([^A-Za-z/\\][^\\]*|[A-Za-z]([^:\\][^\\]*)?)$ + description: |- + Stable Platform resource identity. Local absolute paths are forbidden, + including drive-root forms after local schemes (e.g. file:C:/Windows). + requestedAuthority: + title: requested_authority + $ref: '#/components/schemas/codex.v1.CodexAuthorityScope' + title: CodexWorkRequest + additionalProperties: false + description: |+ + CodexWorkRequest is the typed payload for Slack, GitHub, Linear, CLI, IDE, + and monitoring-triggered Codex work. + resource_id must not be an absolute local path: + ``` + this.resource_id == '' || (!this.resource_id.startsWith('/') && !this.resource_id.startsWith('\\') && !this.resource_id.matches('^[A-Za-z]:[/\\\\].*') && !this.resource_id.matches('^[A-Za-z][A-Za-z0-9+.-]*:[A-Za-z]:.*')) + ``` + + codex.v1.CodexWorkRequest.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false + codex.v1.CodexWorkResult: + type: object + properties: + outcome: + type: string + title: outcome + maxLength: 256 + minLength: 1 + summary: + type: string + title: summary + maxLength: 8192 + minLength: 1 + findings: + type: array + items: + type: string + maxLength: 1024 + maxItems: 64 + title: findings + maxItems: 64 + changedFiles: + type: array + items: + type: string + maxLength: 1024 + pattern: ^([^./\\:][^/\\:]*|\.[^./\\:][^/\\:]*|\.\.[^/\\:][^/\\:]*)(/([^./\\:][^/\\:]*|\.[^./\\:][^/\\:]*|\.\.[^/\\:][^/\\:]*))*$ + maxItems: 256 + title: changed_files + maxItems: 256 + testsRun: + type: array + items: + type: string + maxLength: 2048 + maxItems: 128 + title: tests_run + maxItems: 128 + verificationStatus: + title: verification_status + $ref: '#/components/schemas/codex.v1.CodexVerificationStatus' + evidenceRefs: + type: array + items: + type: string + maxLength: 2048 + maxItems: 128 + title: evidence_refs + maxItems: 128 + ownerInputRequired: + type: string + title: owner_input_required + maxLength: 2048 + codexThreadId: + type: string + title: codex_thread_id + maxLength: 256 + gitState: + title: git_state + $ref: '#/components/schemas/codex.v1.CodexGitState' + title: CodexWorkResult + additionalProperties: false + description: |+ + CodexWorkResult is the bounded, channel-safe completion projection for a + delegated Codex run. changed_files are relative to resource_id's mapped root. + changed_files entries must be normalized workspace-relative paths: + ``` + this.changed_files.all(path, path != '' && !path.startsWith('/') && !path.contains('\\') && !path.matches('^[A-Za-z]:.*') && !path.matches('(^|/)\\.{1,2}(/|$)') && !path.contains('//') && !path.endsWith('/')) + ``` + + google.protobuf.ListValue: + type: object + properties: + values: + type: array + items: + $ref: '#/components/schemas/google.protobuf.Value' + title: values + description: Repeated field of dynamically typed values. + title: ListValue + additionalProperties: false + description: |- + `ListValue` is a wrapper around a repeated field of values. + + The JSON representation for `ListValue` is JSON array. + google.protobuf.Struct: + type: object + additionalProperties: + $ref: '#/components/schemas/google.protobuf.Value' + description: |- + `Struct` represents a structured data value, consisting of fields + which map to dynamically typed values. In some languages, `Struct` + might be supported by a native representation. For example, in + scripting languages like JS a struct is represented as an + object. The details of that representation are described together + with the proto support for the language. + + The JSON representation for `Struct` is JSON object. + google.protobuf.Struct.FieldsEntry: + type: object + properties: + key: + type: string + title: key + value: + title: value + $ref: '#/components/schemas/google.protobuf.Value' + title: FieldsEntry + additionalProperties: false + google.protobuf.Timestamp: + type: string + examples: + - 1s + - 1.000340012s + format: date-time + description: |- + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + ) to obtain a formatter capable of generating timestamps in this format. + google.protobuf.Value: + oneOf: + - type: "null" + - type: number + - type: string + - type: boolean + - type: array + - type: object + additionalProperties: true + description: |- + `Value` represents a dynamically typed value which can be either + null, a number, a string, a boolean, a recursive struct value, or a + list of values. A producer of value is expected to set one of these + variants. Absence of any variant indicates an error. + + The JSON representation for `Value` is JSON value. +security: [] diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index 7cf4106..22dba8f 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -508,6 +508,45 @@ paths: application/json: schema: $ref: '#/components/schemas/connectors.v1.ResolveProviderInstallationResponse' + /connectors.v1.ConnectorService/EnrollSurfaceTarget: + post: + tags: + - connectors.v1.ConnectorService + summary: EnrollSurfaceTarget + description: |- + EnrollSurfaceTarget selects one exact provider object for background + observation. Provider-specific adapters verify current read access before + a durable target is created; this call never grants connector authority. + operationId: connectors.v1.ConnectorService.EnrollSurfaceTarget + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/connectors.v1.EnrollSurfaceTargetRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/connectors.v1.EnrollSurfaceTargetResponse' /connectors.v1.ConnectorService/VerifyConnectionActive: post: tags: @@ -1309,6 +1348,13 @@ components: - HEALTH_STATUS_UNHEALTHY - HEALTH_STATUS_UNKNOWN description: HealthStatus describes the health state of a connection. + connectors.v1.OAuthActorMode: + type: string + title: OAuthActorMode + enum: + - O_AUTH_ACTOR_MODE_UNSPECIFIED + - O_AUTH_ACTOR_MODE_USER + - O_AUTH_ACTOR_MODE_APP connectors.v1.ProviderContentTrust: type: string title: ProviderContentTrust @@ -1753,6 +1799,12 @@ components: title: governed description: Catalog-owned tool metadata. Presence does not grant execution authority. $ref: '#/components/schemas/connectors.v1.ConnectorGovernedAction' + surfaceProjection: + type: boolean + title: surface_projection + description: |- + This action may be emitted by a registered object-surface projector. + Presence is descriptive only; installation authority is still required. title: ConnectorActionDefinition additionalProperties: false description: ConnectorActionDefinition declares one provider-native operation. @@ -2510,6 +2562,16 @@ components: ConnectorService, the catalog owner, publishes its authoritative action inventory here. Named `provider_actions` instead of connectors-rs's `actions` -- see the naming-debt note at the top of this file. + credentialDestinationHostSuffixes: + type: array + items: + type: string + title: credential_destination_host_suffixes + description: |- + Optional DNS suffix constraints for credential-bearing destinations whose + hostname is supplied by connection configuration. Hosts must equal a + suffix or be its dot-delimited subdomain; ports, IP literals, userinfo, + trailing dots, and encoded lookalikes are rejected before auth resolves. title: ConnectorRuntime additionalProperties: false description: |- @@ -2726,6 +2788,73 @@ components: title: status title: DeleteCustomConnectorResponse additionalProperties: false + connectors.v1.EnrollSurfaceTargetRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 256 + minLength: 1 + workspaceId: + type: string + title: workspace_id + maxLength: 256 + minLength: 1 + connectionId: + type: string + title: connection_id + maxLength: 256 + minLength: 1 + providerId: + type: string + title: provider_id + maxLength: 128 + minLength: 1 + targetKind: + type: string + title: target_kind + maxLength: 64 + minLength: 1 + externalId: + type: string + title: external_id + maxLength: 1024 + minLength: 1 + canonicalUrl: + type: string + title: canonical_url + maxLength: 4096 + idempotencyKey: + type: string + title: idempotency_key + maxLength: 256 + minLength: 1 + title: EnrollSurfaceTargetRequest + additionalProperties: false + connectors.v1.EnrollSurfaceTargetResponse: + type: object + properties: + connectionId: + type: string + title: connection_id + providerId: + type: string + title: provider_id + targetKind: + type: string + title: target_kind + externalId: + type: string + title: external_id + state: + type: string + title: state + idempotentReplay: + type: boolean + title: idempotent_replay + title: EnrollSurfaceTargetResponse + additionalProperties: false connectors.v1.ExecuteConnectorActionRequest: type: object properties: @@ -3152,6 +3281,12 @@ components: description: |- Optional GitHub organization or username with this App already installed. Selects user OAuth instead of new installation; never grants tenant access. + actorMode: + title: actor_mode + description: |- + Selects the provider identity represented by the resulting token. The + app actor is currently supported only by Linear agent installations. + $ref: '#/components/schemas/connectors.v1.OAuthActorMode' title: InitiateOAuthFlowRequest additionalProperties: false connectors.v1.InitiateOAuthFlowResponse: diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index 321b53a..a4e6f15 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -8749,6 +8749,24 @@ paths: $ref: '#/components/schemas/console.v1.ManagedSetup' components: schemas: + agentruntime.v1.RuntimeWorkEnvelopeKind: + type: string + title: RuntimeWorkEnvelopeKind + enum: + - RUNTIME_WORK_ENVELOPE_KIND_UNSPECIFIED + - RUNTIME_WORK_ENVELOPE_KIND_CONVERSATION_THREAD + - RUNTIME_WORK_ENVELOPE_KIND_DIRECT_CONVERSATION + - RUNTIME_WORK_ENVELOPE_KIND_TICKET + - RUNTIME_WORK_ENVELOPE_KIND_CALENDAR_EVENT + - RUNTIME_WORK_ENVELOPE_KIND_PULL_REQUEST + - RUNTIME_WORK_ENVELOPE_KIND_INCIDENT + - RUNTIME_WORK_ENVELOPE_KIND_REPOSITORY + - RUNTIME_WORK_ENVELOPE_KIND_DOCUMENT + - RUNTIME_WORK_ENVELOPE_KIND_RECORD + description: |- + RuntimeWorkEnvelopeKind classifies the durable human/work object a trigger + belongs to. Envelopes group retries and follow-up messages across channels + without making the runtime depend on Slack-specific string labels. common.v1.RiskLevel: type: string title: RiskLevel @@ -10055,6 +10073,46 @@ components: - TRACE_ANNOTATION_STATUS_RESOLVED - TRACE_ANNOTATION_STATUS_DISMISSED - TRACE_ANNOTATION_STATUS_ARCHIVED + agentruntime.v1.RuntimeWorkEnvelope: + type: object + properties: + id: + type: string + title: id + minLength: 1 + kind: + title: kind + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelopeKind' + rootId: + type: string + title: root_id + parentId: + type: string + title: parent_id + attributes: + type: object + title: attributes + additionalProperties: + type: string + title: value + title: RuntimeWorkEnvelope + additionalProperties: false + description: |- + RuntimeWorkEnvelope identifies the durable work object that groups related + normalized triggers. For Slack this is usually a conversation thread; future + adapters can map email threads, Jira tickets, calendar events, and Teams + threads into the same runtime primitive. + agentruntime.v1.RuntimeWorkEnvelope.AttributesEntry: + type: object + properties: + key: + type: string + title: key + value: + type: string + title: value + title: AttributesEntry + additionalProperties: false connectors.v1.ConnectorCatalogProvenance: type: object properties: @@ -23973,6 +24031,20 @@ components: title: actor_id minLength: 1 description: Authenticated actor whose tenant-scoped task binding admitted this dispatch. + workEnvelope: + title: work_envelope + description: |- + Provider-neutral object identity retained from the admitted surface. It + groups retries and follow-ups by durable provider object without granting + any tool or connector authority. + $ref: '#/components/schemas/agentruntime.v1.RuntimeWorkEnvelope' + surfaceContext: + title: surface_context + description: |- + Bounded, edge-authenticated provider context retained with the dispatch + and sent to Maestro on every replay. It contains provenance-bearing + surface snapshots, never provider credentials. + $ref: '#/components/schemas/google.protobuf.Struct' title: OperatingRunDispatch required: - enqueuedAt diff --git a/openapi/objectives/v1/objectives.openapi.yaml b/openapi/objectives/v1/objectives.openapi.yaml new file mode 100644 index 0000000..96fd285 --- /dev/null +++ b/openapi/objectives/v1/objectives.openapi.yaml @@ -0,0 +1,1384 @@ +openapi: 3.1.0 +info: + title: objectives.v1 +paths: + /objectives.v1.ObjectiveService/Create: + post: + tags: + - objectives.v1.ObjectiveService + summary: Create + operationId: objectives.v1.ObjectiveService.Create + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.CreateRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.CreateResponse' + /objectives.v1.ObjectiveService/Get: + post: + tags: + - objectives.v1.ObjectiveService + summary: Get + operationId: objectives.v1.ObjectiveService.Get + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.GetRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.GetResponse' + /objectives.v1.ObjectiveService/Transition: + post: + tags: + - objectives.v1.ObjectiveService + summary: Transition + operationId: objectives.v1.ObjectiveService.Transition + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.TransitionRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.TransitionResponse' + /objectives.v1.ObjectiveService/Wake: + post: + tags: + - objectives.v1.ObjectiveService + summary: Wake + operationId: objectives.v1.ObjectiveService.Wake + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.WakeRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.WakeResponse' + /objectives.v1.ObjectiveService/ScheduleWake: + post: + tags: + - objectives.v1.ObjectiveService + summary: ScheduleWake + operationId: objectives.v1.ObjectiveService.ScheduleWake + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.ScheduleWakeRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.ScheduleWakeResponse' + /objectives.v1.ObjectiveService/Query: + post: + tags: + - objectives.v1.ObjectiveService + summary: Query + operationId: objectives.v1.ObjectiveService.Query + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.QueryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.QueryResponse' + /objectives.v1.ObjectiveService/RecordProvenance: + post: + tags: + - objectives.v1.ObjectiveService + summary: RecordProvenance + operationId: objectives.v1.ObjectiveService.RecordProvenance + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RecordProvenanceRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RecordProvenanceResponse' + /objectives.v1.ObjectiveService/RecordMutation: + post: + tags: + - objectives.v1.ObjectiveService + summary: RecordMutation + operationId: objectives.v1.ObjectiveService.RecordMutation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RecordMutationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RecordMutationResponse' + /objectives.v1.ObjectiveService/GetGovernanceEvaluation: + post: + tags: + - objectives.v1.ObjectiveService + summary: GetGovernanceEvaluation + operationId: objectives.v1.ObjectiveService.GetGovernanceEvaluation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.GetGovernanceEvaluationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.GetGovernanceEvaluationResponse' + /objectives.v1.ObjectiveService/Cancel: + post: + tags: + - objectives.v1.ObjectiveService + summary: Cancel + operationId: objectives.v1.ObjectiveService.Cancel + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.CancelRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.CancelResponse' + /objectives.v1.ObjectiveService/AppendTurn: + post: + tags: + - objectives.v1.ObjectiveService + summary: AppendTurn + operationId: objectives.v1.ObjectiveService.AppendTurn + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.AppendTurnRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.AppendTurnResponse' + /objectives.v1.ObjectiveService/RunStep: + post: + tags: + - objectives.v1.ObjectiveService + summary: RunStep + operationId: objectives.v1.ObjectiveService.RunStep + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RunStepRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.RunStepResponse' + /objectives.v1.ObjectiveService/WaitForEvent: + post: + tags: + - objectives.v1.ObjectiveService + summary: WaitForEvent + operationId: objectives.v1.ObjectiveService.WaitForEvent + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.WaitForEventRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.WaitForEventResponse' + /objectives.v1.ObjectiveService/ListTurns: + post: + tags: + - objectives.v1.ObjectiveService + summary: ListTurns + operationId: objectives.v1.ObjectiveService.ListTurns + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.ListTurnsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.ListTurnsResponse' + /objectives.v1.ObjectiveService/QueryTurns: + post: + tags: + - objectives.v1.ObjectiveService + summary: QueryTurns + operationId: objectives.v1.ObjectiveService.QueryTurns + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.QueryTurnsRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/objectives.v1.QueryTurnsResponse' +components: + schemas: + common.v1.Surface: + type: string + title: Surface + enum: + - SURFACE_UNSPECIFIED + - SURFACE_ENSEMBLE + - SURFACE_CHAT + - SURFACE_MAESTRO + - SURFACE_CONDUCTOR + - SURFACE_SLACK + - SURFACE_EXTERNAL_AGENT + description: |- + Surface identifies the product or channel surface that originated a platform + action. It is shared by runtime, audit, and product-facing services so + callers do not invent drift-prone string labels. + objectives.v1.MutationStatus: + type: string + title: MutationStatus + enum: + - MUTATION_STATUS_UNSPECIFIED + - MUTATION_STATUS_PENDING + - MUTATION_STATUS_APPROVED + - MUTATION_STATUS_DENIED + - MUTATION_STATUS_EXECUTED + - MUTATION_STATUS_ROLLED_BACK + description: MutationStatus describes the status of a mutation operation. + objectives.v1.ObjectiveState: + type: string + title: ObjectiveState + enum: + - OBJECTIVE_STATE_UNSPECIFIED + - OBJECTIVE_STATE_PENDING + - OBJECTIVE_STATE_RUNNING + - OBJECTIVE_STATE_BLOCKED + - OBJECTIVE_STATE_DEGRADED + - OBJECTIVE_STATE_AWAITING_APPROVAL + - OBJECTIVE_STATE_QUEUED + - OBJECTIVE_STATE_COMPLETED + - OBJECTIVE_STATE_FAILED + - OBJECTIVE_STATE_CANCELLED + description: ObjectiveState describes the lifecycle state of an objective. + objectives.v1.TurnKind: + type: string + title: TurnKind + enum: + - TURN_KIND_UNSPECIFIED + - TURN_KIND_USER_MESSAGE + - TURN_KIND_LLM_CALL + - TURN_KIND_TOOL_CALL + - TURN_KIND_APPROVAL_WAIT + - TURN_KIND_SLEEP + - TURN_KIND_EVENT_WAIT + description: TurnKind identifies the durable work represented by an objective turn. + objectives.v1.TurnStatus: + type: string + title: TurnStatus + enum: + - TURN_STATUS_UNSPECIFIED + - TURN_STATUS_PENDING + - TURN_STATUS_RUNNING + - TURN_STATUS_COMPLETED + - TURN_STATUS_FAILED + - TURN_STATUS_REPLAY + description: TurnStatus describes replayable execution state for a journaled turn. + google.protobuf.Any: + type: object + properties: + type: + type: string + value: + type: string + format: binary + debug: + type: object + additionalProperties: true + additionalProperties: true + description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + google.protobuf.Timestamp: + type: string + examples: + - 1s + - 1.000340012s + format: date-time + description: |- + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + ) to obtain a formatter capable of generating timestamps in this format. + objectives.v1.AppendTurnRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/objectives.v1.TurnKind' + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Any' + idempotencyKey: + type: string + title: idempotency_key + sequence: + type: integer + title: sequence + format: int32 + result: + title: result + $ref: '#/components/schemas/google.protobuf.Any' + status: + title: status + $ref: '#/components/schemas/objectives.v1.TurnStatus' + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + title: AppendTurnRequest + additionalProperties: false + objectives.v1.AppendTurnResponse: + type: object + properties: + turn: + title: turn + $ref: '#/components/schemas/objectives.v1.Turn' + replayed: + type: boolean + title: replayed + title: AppendTurnResponse + additionalProperties: false + objectives.v1.CancelRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + reason: + type: string + title: reason + title: CancelRequest + additionalProperties: false + objectives.v1.CancelResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: CancelResponse + additionalProperties: false + objectives.v1.CreateRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + surface: + type: string + title: surface + title: + type: string + title: title + minLength: 1 + description: + type: string + title: description + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + idempotencyKey: + type: string + title: idempotency_key + provenance: + type: array + items: + $ref: '#/components/schemas/objectives.v1.ProvenanceRecord' + title: provenance + organizationId: + type: string + title: organization_id + title: CreateRequest + additionalProperties: false + objectives.v1.CreateResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: CreateResponse + additionalProperties: false + objectives.v1.GetGovernanceEvaluationRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + title: GetGovernanceEvaluationRequest + additionalProperties: false + objectives.v1.GetGovernanceEvaluationResponse: + type: object + properties: + objectiveId: + type: string + title: objective_id + compliant: + type: boolean + title: compliant + violations: + type: array + items: + type: string + title: violations + title: GetGovernanceEvaluationResponse + additionalProperties: false + objectives.v1.GetRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: GetRequest + additionalProperties: false + objectives.v1.GetResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: GetResponse + additionalProperties: false + objectives.v1.ListTurnsRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + title: ListTurnsRequest + additionalProperties: false + objectives.v1.ListTurnsResponse: + type: object + properties: + turns: + type: array + items: + $ref: '#/components/schemas/objectives.v1.Turn' + title: turns + total: + type: integer + title: total + format: int32 + title: ListTurnsResponse + additionalProperties: false + objectives.v1.MutationRecord: + type: object + properties: + targetIntegration: + type: string + title: target_integration + operation: + type: string + title: operation + status: + title: status + $ref: '#/components/schemas/objectives.v1.MutationStatus' + approvalId: + type: string + title: approval_id + title: MutationRecord + additionalProperties: false + description: MutationRecord tracks a write operation performed by an objective. + objectives.v1.Objective: + type: object + properties: + id: + type: string + title: id + workspaceId: + type: string + title: workspace_id + agentId: + type: string + title: agent_id + surface: + type: string + title: surface + title: + type: string + title: title + description: + type: string + title: description + state: + title: state + $ref: '#/components/schemas/objectives.v1.ObjectiveState' + provenance: + type: array + items: + $ref: '#/components/schemas/objectives.v1.ProvenanceRecord' + title: provenance + mutations: + type: array + items: + $ref: '#/components/schemas/objectives.v1.MutationRecord' + title: mutations + wakeSchedule: + title: wake_schedule + $ref: '#/components/schemas/objectives.v1.WakeSchedule' + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + updatedAt: + title: updated_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + surfaceType: + title: surface_type + $ref: '#/components/schemas/common.v1.Surface' + idempotencyKey: + type: string + title: idempotency_key + organizationId: + type: string + title: organization_id + title: Objective + additionalProperties: false + description: Objective is the canonical agent objective record. + objectives.v1.ObjectiveTurn: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + turn: + title: turn + $ref: '#/components/schemas/objectives.v1.Turn' + title: ObjectiveTurn + additionalProperties: false + objectives.v1.ProvenanceRecord: + type: object + properties: + sourceIntegration: + type: string + title: source_integration + sourceId: + type: string + title: source_id + freshnessSeconds: + type: integer + title: freshness_seconds + format: int32 + confidence: + type: number + title: confidence + format: float + title: ProvenanceRecord + additionalProperties: false + description: ProvenanceRecord tracks where data came from. + objectives.v1.QueryRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + state: + title: state + $ref: '#/components/schemas/objectives.v1.ObjectiveState' + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + organizationId: + type: string + title: organization_id + title: QueryRequest + additionalProperties: false + objectives.v1.QueryResponse: + type: object + properties: + objectives: + type: array + items: + $ref: '#/components/schemas/objectives.v1.Objective' + title: objectives + total: + type: integer + title: total + format: int32 + title: QueryResponse + additionalProperties: false + objectives.v1.QueryTurnsRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + minLength: 1 + agentId: + type: string + title: agent_id + limit: + type: integer + title: limit + maximum: 200 + format: int32 + offset: + type: integer + title: offset + format: int32 + payloadChannelId: + type: string + title: payload_channel_id + omitTotal: + type: boolean + title: omit_total + title: QueryTurnsRequest + additionalProperties: false + objectives.v1.QueryTurnsResponse: + type: object + properties: + turns: + type: array + items: + $ref: '#/components/schemas/objectives.v1.ObjectiveTurn' + title: turns + total: + type: integer + title: total + format: int32 + title: QueryTurnsResponse + additionalProperties: false + objectives.v1.RecordMutationRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + mutation: + title: mutation + $ref: '#/components/schemas/objectives.v1.MutationRecord' + title: RecordMutationRequest + required: + - mutation + additionalProperties: false + objectives.v1.RecordMutationResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: RecordMutationResponse + additionalProperties: false + objectives.v1.RecordProvenanceRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + provenance: + title: provenance + $ref: '#/components/schemas/objectives.v1.ProvenanceRecord' + title: RecordProvenanceRequest + required: + - provenance + additionalProperties: false + objectives.v1.RecordProvenanceResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: RecordProvenanceResponse + additionalProperties: false + objectives.v1.RunStepRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + idempotencyKey: + type: string + title: idempotency_key + minLength: 1 + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/objectives.v1.TurnKind' + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Any' + result: + title: result + $ref: '#/components/schemas/google.protobuf.Any' + title: RunStepRequest + additionalProperties: false + objectives.v1.RunStepResponse: + type: object + properties: + turn: + title: turn + $ref: '#/components/schemas/objectives.v1.Turn' + replayed: + type: boolean + title: replayed + title: RunStepResponse + additionalProperties: false + objectives.v1.ScheduleWakeRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + wakeSchedule: + title: wake_schedule + $ref: '#/components/schemas/objectives.v1.WakeSchedule' + state: + title: state + description: State to hold until wake_at is due. If unspecified, the service uses BLOCKED. + $ref: '#/components/schemas/objectives.v1.ObjectiveState' + title: ScheduleWakeRequest + required: + - wakeSchedule + additionalProperties: false + objectives.v1.ScheduleWakeResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: ScheduleWakeResponse + additionalProperties: false + objectives.v1.TransitionRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + state: + not: + enum: + - 0 + title: state + $ref: '#/components/schemas/objectives.v1.ObjectiveState' + reason: + type: string + title: reason + title: TransitionRequest + additionalProperties: false + objectives.v1.TransitionResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: TransitionResponse + additionalProperties: false + objectives.v1.Turn: + type: object + properties: + id: + type: string + title: id + objectiveId: + type: string + title: objective_id + sequence: + type: integer + title: sequence + format: int32 + kind: + title: kind + $ref: '#/components/schemas/objectives.v1.TurnKind' + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Any' + result: + title: result + $ref: '#/components/schemas/google.protobuf.Any' + status: + title: status + $ref: '#/components/schemas/objectives.v1.TurnStatus' + startedAt: + title: started_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + completedAt: + title: completed_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + idempotencyKey: + type: string + title: idempotency_key + title: Turn + additionalProperties: false + description: Turn is the per-objective replay journal used by agent sessions. + objectives.v1.WaitForEventPayload: + type: object + properties: + eventSubject: + type: string + title: event_subject + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Any' + title: WaitForEventPayload + additionalProperties: false + objectives.v1.WaitForEventRequest: + type: object + properties: + objectiveId: + type: string + title: objective_id + minLength: 1 + idempotencyKey: + type: string + title: idempotency_key + eventSubject: + type: string + title: event_subject + minLength: 1 + payload: + title: payload + $ref: '#/components/schemas/google.protobuf.Any' + title: WaitForEventRequest + additionalProperties: false + objectives.v1.WaitForEventResponse: + type: object + properties: + turn: + title: turn + $ref: '#/components/schemas/objectives.v1.Turn' + replayed: + type: boolean + title: replayed + title: WaitForEventResponse + additionalProperties: false + objectives.v1.WakeRequest: + type: object + properties: + id: + type: string + title: id + minLength: 1 + title: WakeRequest + additionalProperties: false + objectives.v1.WakeResponse: + type: object + properties: + objective: + title: objective + $ref: '#/components/schemas/objectives.v1.Objective' + title: WakeResponse + additionalProperties: false + objectives.v1.WakeSchedule: + type: object + properties: + wakeAt: + title: wake_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + reason: + type: string + title: reason + retryCount: + type: integer + title: retry_count + format: int32 + maxRetries: + type: integer + title: max_retries + format: int32 + backoffSeconds: + type: integer + title: backoff_seconds + format: int32 + title: WakeSchedule + additionalProperties: false + description: WakeSchedule defines when and how an objective should be reactivated. + connect-protocol-version: + type: number + title: Connect-Protocol-Version + enum: + - 1 + description: Define the version of the Connect protocol + const: 1 + connect-timeout-header: + type: number + title: Connect-Timeout-Ms + description: Define the timeout, in ms + connect.error: + type: object + properties: + code: + type: string + examples: + - not_found + enum: + - canceled + - unknown + - invalid_argument + - deadline_exceeded + - not_found + - already_exists + - permission_denied + - resource_exhausted + - failed_precondition + - aborted + - out_of_range + - unimplemented + - internal + - unavailable + - data_loss + - unauthenticated + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + message: + type: string + description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + detail: + $ref: '#/components/schemas/google.protobuf.Any' + title: Connect Error + additionalProperties: true + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' +security: [] +tags: + - name: objectives.v1.ObjectiveService + description: ObjectiveService manages agent objectives and their lifecycle. diff --git a/proto/agentruntime/v1/runtime.proto b/proto/agentruntime/v1/runtime.proto new file mode 100644 index 0000000..f5276ff --- /dev/null +++ b/proto/agentruntime/v1/runtime.proto @@ -0,0 +1,2948 @@ +syntax = "proto3"; + +package agentruntime.v1; + +import "agents/v1/agents.proto"; +import "buf/validate/validate.proto"; +import "codex/v1/codex.proto"; +import "common/v1/authz.proto"; +import "common/v1/risk.proto"; +import "common/v1/surface.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "objectives/v1/objectives.proto"; + +option go_package = "github.com/evalops/platform/gen/go/agentruntime/v1;agentruntimev1"; + +// AgentRuntimeService accepts normalized triggers and manages durable +// AgentRun execution attempts. Workers claim runs by lease, checkpoint their +// progress, release compute while waiting for human/input/event gates, and +// resume from checkpoints rather than replaying LLM or tool calls. +service AgentRuntimeService { + // HandleTrigger receives a normalized product or integration trigger, + // resolves agent/objective context, records an AgentRun, and dispatches it. + rpc HandleTrigger(HandleTriggerRequest) returns (HandleTriggerResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.organization_scope_field) = "trigger.organization_id"; + option (common.v1.workspace_scope_field) = "trigger.workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // AdmitOperatingChannelEvent accepts provider-issued coordinates from a + // channel edge that cannot know tenant ownership. Platform resolves the + // installation and external actor before durably admitting the event. + rpc AdmitOperatingChannelEvent(AdmitOperatingChannelEventRequest) returns (AdmitOperatingChannelEventResponse) { + option (common.v1.required_scopes) = "channel-edge:admit"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // AdmitSurfaceInvocation accepts a provider-neutral invocation from a + // verified surface adapter. Platform resolves installation ownership and + // the external actor before binding the provider object to an operating + // thread and durably admitting work. + rpc AdmitSurfaceInvocation(AdmitSurfaceInvocationRequest) returns (AdmitSurfaceInvocationResponse) { + option (common.v1.required_scopes) = "surface-edge:admit"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // Identity reconciles one approved organization and its active default workspace. + // Caller scope is service-only; this request cannot select provider credentials. + rpc EnsureOrganizationEmail(EnsureOrganizationEmailRequest) returns (EnsureOrganizationEmailResponse) { + option (common.v1.required_scopes) = "organization-email:provision"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ClaimNextRun atomically leases the next queued or retry-ready run for a + // worker. A claim transitions the run to RUNNING and increments attempt. + rpc ClaimNextRun(ClaimNextRunRequest) returns (ClaimNextRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // HeartbeatRun extends an active worker lease. Expired leases are eligible + // to be reclaimed by another worker from the last checkpoint. + rpc HeartbeatRun(HeartbeatRunRequest) returns (HeartbeatRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RenewRunLease recovers a still-owned worker lease after it has expired but + // before the run has been parked, completed, or otherwise taken over. + rpc RenewRunLease(RenewRunLeaseRequest) returns (RenewRunLeaseResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RecordRunStep upserts the durable record for one execution step. + rpc RecordRunStep(RecordRunStepRequest) returns (RecordRunStepResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunCheckpoint stores an opaque resume snapshot. Checkpoints are the + // source of truth for resuming work; deterministic replay is not required. + rpc RecordRunCheckpoint(RecordRunCheckpointRequest) returns (RecordRunCheckpointResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunArtifact links a produced artifact to the run and optional step. + rpc RecordRunArtifact(RecordRunArtifactRequest) returns (RecordRunArtifactResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunCost links metering/cost data to the run and optional step. + rpc RecordRunCost(RecordRunCostRequest) returns (RecordRunCostResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunStreamCursor stores a consumer cursor into the run event stream. + rpc RecordRunStreamCursor(RecordRunStreamCursorRequest) returns (RecordRunStreamCursorResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunEvent appends an adapter-observed lifecycle event to an existing + // AgentRun without requiring a worker lease. Channel adapters use this to + // attach Slack/Teams/email delivery, approval, model, and tool milestones + // while Platform remains the durable source of truth for the run timeline. + rpc RecordRunEvent(RecordRunEventRequest) returns (RecordRunEventResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ControlRun records a human, channel, scheduler, or system control against + // the active autonomous run/session. Controls are durable steering input; the + // Slack adapter is not responsible for keeping the agent alive turn by turn. + rpc ControlRun(ControlRunRequest) returns (ControlRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunWorkItem creates or replaces one node in the autonomous work graph. + // Work items, not VFS projections, are the canonical state for long-horizon + // goals, child runs, waits, tool activity, blockers, and completion gates. + rpc RecordRunWorkItem(RecordRunWorkItemRequest) returns (RecordRunWorkItemResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // UpdateRunWorkItem patches progress for one autonomous work graph node. + rpc UpdateRunWorkItem(UpdateRunWorkItemRequest) returns (UpdateRunWorkItemResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ListRunWorkItems returns the typed work graph for one run or work envelope. + rpc ListRunWorkItems(ListRunWorkItemsRequest) returns (ListRunWorkItemsResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // YieldRun ends the current leased run step while keeping the autonomous + // session alive. Inline yields enqueue a successor AgentRun immediately; + // end-session yields close the run without enqueueing more autonomous work. + // Timer, approval, input, and event blocking use WaitRun/ResumeRun. + rpc YieldRun(YieldRunRequest) returns (YieldRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // WaitRun parks the run on an approval, input, timer, or event wait and + // clears the worker lease so no compute is held while blocked. + rpc WaitRun(WaitRunRequest) returns (WaitRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ResumeRun resolves a wait and requeues the run from its latest checkpoint. + rpc ResumeRun(ResumeRunRequest) returns (ResumeRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // CompleteRun marks the run successful and releases any active lease. + rpc CompleteRun(CompleteRunRequest) returns (CompleteRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // FailRun records a failed attempt. Retryable failures can move to RETRYING; + // exhausted attempts stay FAILED until they are moved to the dead letter set. + rpc FailRun(FailRunRequest) returns (FailRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // CancelRun cancels a run before it reaches a terminal success/failure. + rpc CancelRun(CancelRunRequest) returns (CancelRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RetryRun explicitly schedules a failed run for another attempt. + rpc RetryRun(RetryRunRequest) returns (RetryRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // DeadLetterRun moves an exhausted or poison run out of normal scheduling. + rpc DeadLetterRun(DeadLetterRunRequest) returns (DeadLetterRunResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // GetRun retrieves an AgentRun by ID. + rpc GetRun(GetRunRequest) returns (GetRunResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // GetTeammateWorkLedger retrieves the durable teammate work projection for + // one run. It joins run state, waits, memory citations, connector grants, + // VFS state, proactive policy, and channel-visible status into the compact + // read model workers and operator consoles use for long-horizon handoff. + rpc GetTeammateWorkLedger(GetTeammateWorkLedgerRequest) returns (GetTeammateWorkLedgerResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListRunsByWorkEnvelope retrieves newest runs that belong to one durable + // channel work envelope, such as a Slack thread or future email/Jira/Teams object. + rpc ListRunsByWorkEnvelope(ListRunsByWorkEnvelopeRequest) returns (ListRunsByWorkEnvelopeResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // GetChannelThreadAdoption resolves whether a channel thread has been + // explicitly adopted by an agent and can receive no-mention continuations. + rpc GetChannelThreadAdoption(GetChannelThreadAdoptionRequest) returns (GetChannelThreadAdoptionResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RecordChannelThreadAdoption durably records an adapter-observed channel + // thread adoption without requiring the adapter to create a new AgentRun. + rpc RecordChannelThreadAdoption(RecordChannelThreadAdoptionRequest) returns (RecordChannelThreadAdoptionResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ListChannelThreadAdoptions returns the durable adoption projection for + // operator/debug surfaces and channel-adapter reconciliation. + rpc ListChannelThreadAdoptions(ListChannelThreadAdoptionsRequest) returns (ListChannelThreadAdoptionsResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListRunWaits returns a pending-work projection over parked AgentRun waits + // without requiring clients to replay runtime events or read full run + // snapshots. + rpc ListRunWaits(ListRunWaitsRequest) returns (ListRunWaitsResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RecordChannelActionReceipt durably records an interactive channel action, + // such as a Slack approval button or slash command, before any side effects + // resume runtime work. + rpc RecordChannelActionReceipt(RecordChannelActionReceiptRequest) returns (RecordChannelActionReceiptResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // GetChannelActionReceipt retrieves one recorded channel action receipt. + rpc GetChannelActionReceipt(GetChannelActionReceiptRequest) returns (GetChannelActionReceiptResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListChannelActionReceipts returns durable channel action receipts for + // audit, idempotency, and channel adapter reconciliation. + rpc ListChannelActionReceipts(ListChannelActionReceiptsRequest) returns (ListChannelActionReceiptsResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListRunEvents returns the append-only event log for an AgentRun. + rpc ListRunEvents(ListRunEventsRequest) returns (ListRunEventsResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListRunVirtualFiles lists the durable read model of a run's virtual + // filesystem, including context files and agent-authored proposal files. + rpc ListRunVirtualFiles(ListRunVirtualFilesRequest) returns (ListRunVirtualFilesResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ReadRunVirtualFile reads a bounded slice of one run virtual file. Workers + // should use this instead of loading every virtual file into model context. + rpc ReadRunVirtualFile(ReadRunVirtualFileRequest) returns (ReadRunVirtualFileResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // StatRunVirtualFile returns the typed, content-free VFS projection for one + // run virtual file by path. + rpc StatRunVirtualFile(StatRunVirtualFileRequest) returns (StatRunVirtualFileResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // WatchRunVirtualFiles streams a resumable VFS timeline for local agent + // development and inspectors without polling the full VFS projection. + rpc WatchRunVirtualFiles(WatchRunVirtualFilesRequest) returns (stream WatchRunVirtualFilesResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // BatchReadRunVirtualFiles reads multiple bounded VFS slices in one request + // while making per-file and total-budget truncation explicit. + rpc BatchReadRunVirtualFiles(BatchReadRunVirtualFilesRequest) returns (BatchReadRunVirtualFilesResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // BuildRunVirtualFileContextPack returns an ordered, cited set of VFS + // snippets for a task or query so workers can hydrate model context without + // hand-rolling list/search/read loops. + rpc BuildRunVirtualFileContextPack(BuildRunVirtualFileContextPackRequest) returns (BuildRunVirtualFileContextPackResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // SearchRunVirtualFiles performs bounded literal or regex search over text + // virtual files projected for an AgentRun. + rpc SearchRunVirtualFiles(SearchRunVirtualFilesRequest) returns (SearchRunVirtualFilesResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RecordRunVirtualFileProposal writes an agent-authored file into the + // proposal/workspace side of the VFS. Source mounts such as /context remain + // read-only; promotion to real side effects happens through reviewers or + // downstream services. + rpc RecordRunVirtualFileProposal(RecordRunVirtualFileProposalRequest) returns (RecordRunVirtualFileProposalResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RecordRunVirtualFileTransaction atomically stages a multi-file VFS change + // set as durable proposal artifacts with shared revision and review metadata. + rpc RecordRunVirtualFileTransaction(RecordRunVirtualFileTransactionRequest) returns (RecordRunVirtualFileTransactionResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // PromoteRunVirtualFileTransaction records a reviewed transaction as the + // accepted workspace view. Promotion is idempotent by transaction and keeps + // proposal artifacts intact for audit. + rpc PromoteRunVirtualFileTransaction(PromoteRunVirtualFileTransactionRequest) returns (PromoteRunVirtualFileTransactionResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + + // DiffRunVirtualFileTransaction previews a staged VFS transaction as + // per-file stats, hunks, conflicts, and unified diff text. + rpc DiffRunVirtualFileTransaction(DiffRunVirtualFileTransactionRequest) returns (DiffRunVirtualFileTransactionResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ApplyRunVirtualFileTransaction applies a transaction when the diff is + // clean, and otherwise returns structured conflicts without mutating state. + rpc ApplyRunVirtualFileTransaction(ApplyRunVirtualFileTransactionRequest) returns (ApplyRunVirtualFileTransactionResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + + // RebaseRunVirtualFileTransaction restages a clean transaction on top of the + // latest accepted VFS revisions while preserving proposed content metadata. + rpc RebaseRunVirtualFileTransaction(RebaseRunVirtualFileTransactionRequest) returns (RebaseRunVirtualFileTransactionResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // HydrateRunVirtualFileMount resolves a lazy connector mount into bounded + // run-scoped VFS files without exposing credentials to the worker. + rpc HydrateRunVirtualFileMount(HydrateRunVirtualFileMountRequest) returns (HydrateRunVirtualFileMountResponse) { + option (common.v1.required_scopes) = "agentruntime:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // InspectRunVirtualFiles returns a debug projection over mounts, + // transactions, content addresses, and Cerebro indexing readiness. + rpc InspectRunVirtualFiles(InspectRunVirtualFilesRequest) returns (InspectRunVirtualFilesResponse) { + option (common.v1.required_scopes) = "agentruntime:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } +} + +// AgentRunState describes the runtime lifecycle of one durable attempt. +enum AgentRunState { + AGENT_RUN_STATE_UNSPECIFIED = 0; + AGENT_RUN_STATE_ACCEPTED = 1; + AGENT_RUN_STATE_QUEUED = 2; + AGENT_RUN_STATE_RUNNING = 3; + AGENT_RUN_STATE_WAITING = 4; + AGENT_RUN_STATE_SUCCEEDED = 5; + AGENT_RUN_STATE_FAILED = 6; + AGENT_RUN_STATE_CANCELLED = 7; + AGENT_RUN_STATE_RETRYING = 8; + AGENT_RUN_STATE_DEAD_LETTERED = 9; +} + +// AgentRunStepState describes progress for a single durable step record. +enum AgentRunStepState { + AGENT_RUN_STEP_STATE_UNSPECIFIED = 0; + AGENT_RUN_STEP_STATE_PENDING = 1; + AGENT_RUN_STEP_STATE_RUNNING = 2; + AGENT_RUN_STEP_STATE_WAITING = 3; + AGENT_RUN_STEP_STATE_SUCCEEDED = 4; + AGENT_RUN_STEP_STATE_FAILED = 5; + AGENT_RUN_STEP_STATE_CANCELLED = 6; + AGENT_RUN_STEP_STATE_SKIPPED = 7; +} + +// AgentRunStepKind classifies the durable work represented by a run step. +enum AgentRunStepKind { + AGENT_RUN_STEP_KIND_UNSPECIFIED = 0; + AGENT_RUN_STEP_KIND_MODEL_CALL = 1; + AGENT_RUN_STEP_KIND_TOOL_CALL_INTENT = 2; + AGENT_RUN_STEP_KIND_TOOL_RESULT = 3; + AGENT_RUN_STEP_KIND_APPROVAL_WAIT = 4; + AGENT_RUN_STEP_KIND_ERROR = 5; + AGENT_RUN_STEP_KIND_SYSTEM = 6; + AGENT_RUN_STEP_KIND_CONTEXT_ENRICHMENT = 7; + AGENT_RUN_STEP_KIND_PLAN = 8; + AGENT_RUN_STEP_KIND_PATCH = 9; + AGENT_RUN_STEP_KIND_TEST = 10; + AGENT_RUN_STEP_KIND_PULL_REQUEST_SYNC = 11; + AGENT_RUN_STEP_KIND_REVIEW_SYNC = 12; +} + +// AgentRunWaitType describes why a run released its worker lease. +enum AgentRunWaitType { + AGENT_RUN_WAIT_TYPE_UNSPECIFIED = 0; + AGENT_RUN_WAIT_TYPE_APPROVAL = 1; + AGENT_RUN_WAIT_TYPE_INPUT = 2; + AGENT_RUN_WAIT_TYPE_EVENT = 3; + AGENT_RUN_WAIT_TYPE_TIMER = 4; +} + +// AgentRunWaitState describes the read-model state of a parked wait. +enum AgentRunWaitState { + AGENT_RUN_WAIT_STATE_UNSPECIFIED = 0; + AGENT_RUN_WAIT_STATE_PENDING = 1; + AGENT_RUN_WAIT_STATE_RESOLVED = 2; + AGENT_RUN_WAIT_STATE_EXPIRED = 3; + AGENT_RUN_WAIT_STATE_CANCELLED = 4; +} + +// AgentRunArtifactKind classifies durable output produced by a run or step. +enum AgentRunArtifactKind { + AGENT_RUN_ARTIFACT_KIND_UNSPECIFIED = 0; + AGENT_RUN_ARTIFACT_KIND_TOOL_RESULT = 1; + AGENT_RUN_ARTIFACT_KIND_CHART = 2; + AGENT_RUN_ARTIFACT_KIND_REPORT = 3; + AGENT_RUN_ARTIFACT_KIND_FILE = 4; + AGENT_RUN_ARTIFACT_KIND_TRANSCRIPT = 5; + AGENT_RUN_ARTIFACT_KIND_APPROVAL_PLAN = 6; + AGENT_RUN_ARTIFACT_KIND_SYSTEM = 7; + AGENT_RUN_ARTIFACT_KIND_PATCH = 8; + AGENT_RUN_ARTIFACT_KIND_PULL_REQUEST = 9; + AGENT_RUN_ARTIFACT_KIND_PULL_REQUEST_COMMENT = 10; + AGENT_RUN_ARTIFACT_KIND_CI_STATUS = 11; + AGENT_RUN_ARTIFACT_KIND_RUN_PANEL = 12; + AGENT_RUN_ARTIFACT_KIND_EVALUATION_EXAMPLE = 13; +} + +// RuntimeEventType classifies append-only AgentRun events. +enum RuntimeEventType { + RUNTIME_EVENT_TYPE_UNSPECIFIED = 0; + RUNTIME_EVENT_TYPE_TRIGGER_ACCEPTED = 1; + RUNTIME_EVENT_TYPE_AGENT_CONFIG_RESOLVED = 2; + RUNTIME_EVENT_TYPE_OBJECTIVE_RESOLVED = 3; + RUNTIME_EVENT_TYPE_CONTEXT_BUILT = 4; + RUNTIME_EVENT_TYPE_WORKER_DISPATCHED = 5; + RUNTIME_EVENT_TYPE_RUN_FAILED = 6; + RUNTIME_EVENT_TYPE_RUN_QUEUED = 7; + RUNTIME_EVENT_TYPE_RUN_CLAIMED = 8; + RUNTIME_EVENT_TYPE_LEASE_HEARTBEAT = 9; + RUNTIME_EVENT_TYPE_STEP_RECORDED = 10; + RUNTIME_EVENT_TYPE_CHECKPOINT_RECORDED = 11; + RUNTIME_EVENT_TYPE_ARTIFACT_RECORDED = 12; + RUNTIME_EVENT_TYPE_COST_RECORDED = 13; + RUNTIME_EVENT_TYPE_RUN_WAITING = 14; + RUNTIME_EVENT_TYPE_RUN_RESUMED = 15; + RUNTIME_EVENT_TYPE_RUN_SUCCEEDED = 16; + RUNTIME_EVENT_TYPE_RUN_CANCELLED = 17; + RUNTIME_EVENT_TYPE_RUN_RETRY_SCHEDULED = 18; + RUNTIME_EVENT_TYPE_RUN_DEAD_LETTERED = 19; + RUNTIME_EVENT_TYPE_STREAM_CURSOR_RECORDED = 20; + RUNTIME_EVENT_TYPE_CODEX_INTERACTION_REQUESTED = 21; + RUNTIME_EVENT_TYPE_CODEX_INTERACTION_RESOLVED = 22; + RUNTIME_EVENT_TYPE_CODEX_PROGRESS_RECORDED = 23; + RUNTIME_EVENT_TYPE_CODEX_OUTPUT_SYNCED = 24; + RUNTIME_EVENT_TYPE_CODEX_OUTCOME_OBSERVED = 25; + RUNTIME_EVENT_TYPE_CHANNEL_MESSAGE_RECORDED = 26; + RUNTIME_EVENT_TYPE_MODEL_RESPONSE_RECORDED = 27; + RUNTIME_EVENT_TYPE_TOOL_CALL_RECORDED = 28; + RUNTIME_EVENT_TYPE_TOOL_RESULT_RECORDED = 29; + RUNTIME_EVENT_TYPE_APPROVAL_REQUESTED = 30; + RUNTIME_EVENT_TYPE_APPROVAL_RESOLVED = 31; + RUNTIME_EVENT_TYPE_AGENT_PROGRESS_RECORDED = 32; + RUNTIME_EVENT_TYPE_RUN_CONTROL_RECORDED = 33; + RUNTIME_EVENT_TYPE_WORK_ITEM_RECORDED = 34; + RUNTIME_EVENT_TYPE_WORK_ITEM_UPDATED = 35; + RUNTIME_EVENT_TYPE_PROCESSING_PRESENCE_RECORDED = 36; + RUNTIME_EVENT_TYPE_AUTONOMY_SESSION_RECORDED = 37; + RUNTIME_EVENT_TYPE_RUN_YIELDED = 38; +} + +// RuntimeEvidenceState records whether Platform merely observed a native event +// or has joined it to a resolver/proof source. +enum RuntimeEvidenceState { + RUNTIME_EVIDENCE_STATE_UNSPECIFIED = 0; + RUNTIME_EVIDENCE_STATE_NATIVE_OBSERVED = 1; + RUNTIME_EVIDENCE_STATE_PLATFORM_PROVEN = 2; + RUNTIME_EVIDENCE_STATE_MISSING = 3; + RUNTIME_EVIDENCE_STATE_UNVERIFIED = 4; +} + +// NativeAgentEventSource identifies the native Agent Workforce emitter that +// produced an observed event. Platform does not infer authority from this +// source; proof states below remain missing/unverified until joined to a +// Platform resolver, credential, or meter authority. +enum NativeAgentEventSource { + NATIVE_AGENT_EVENT_SOURCE_UNSPECIFIED = 0; + NATIVE_AGENT_EVENT_SOURCE_MAESTRO = 1; + NATIVE_AGENT_EVENT_SOURCE_CODEX = 2; + // NATIVE_AGENT_EVENT_SOURCE_CLAUDE_CODE and + // NATIVE_AGENT_EVENT_SOURCE_OTHER mirror sessions.v1.AgentKind so a native + // event observed from Claude Code, or from an emitter that is none of the + // above, carries an honest source instead of being misattributed to + // Maestro or Codex. Proof states remain missing/unverified for these + // sources the same as for the existing ones until joined to a Platform + // resolver, credential, or meter authority. + NATIVE_AGENT_EVENT_SOURCE_CLAUDE_CODE = 3; + NATIVE_AGENT_EVENT_SOURCE_OTHER = 4; +} + +// RuntimeEvidenceGapReason identifies the missing proof that prevents a +// runtime action from being considered approval-ready. +enum RuntimeEvidenceGapReason { + RUNTIME_EVIDENCE_GAP_REASON_UNSPECIFIED = 0; + RUNTIME_EVIDENCE_GAP_REASON_CREDENTIAL_UNVERIFIED = 1; + RUNTIME_EVIDENCE_GAP_REASON_PRINCIPAL_UNRESOLVED = 2; + RUNTIME_EVIDENCE_GAP_REASON_COST_UNRECORDED = 3; +} + +// RunControlMode describes durable input applied to an autonomous run/session. +// Steering and followups are optional controls; they are not the worker loop. +enum RunControlMode { + RUN_CONTROL_MODE_UNSPECIFIED = 0; + RUN_CONTROL_MODE_STEER = 1; + RUN_CONTROL_MODE_FOLLOWUP = 2; + RUN_CONTROL_MODE_COLLECT = 3; + RUN_CONTROL_MODE_INTERRUPT = 4; + RUN_CONTROL_MODE_CANCEL = 5; + RUN_CONTROL_MODE_SYSTEM_WAKE = 6; +} + +// AutonomyProcessingState is the channel-safe processing presence for a +// long-lived autonomous teammate. Adapters update the same visible Slack +// message from this state instead of posting one reply per runtime turn. +enum AutonomyProcessingState { + AUTONOMY_PROCESSING_STATE_UNSPECIFIED = 0; + AUTONOMY_PROCESSING_STATE_QUEUED = 1; + AUTONOMY_PROCESSING_STATE_ORIENTING = 2; + AUTONOMY_PROCESSING_STATE_THINKING = 3; + AUTONOMY_PROCESSING_STATE_USING_TOOL = 4; + AUTONOMY_PROCESSING_STATE_SPAWNING_CHILDREN = 5; + AUTONOMY_PROCESSING_STATE_WAITING_ON_APPROVAL = 6; + AUTONOMY_PROCESSING_STATE_WAITING_ON_EVENT = 7; + AUTONOMY_PROCESSING_STATE_SYNTHESIZING = 8; + AUTONOMY_PROCESSING_STATE_COMPLETING = 9; + AUTONOMY_PROCESSING_STATE_IDLE = 10; + AUTONOMY_PROCESSING_STATE_FAILED = 11; +} + +// AgentWorkItemKind classifies nodes in the autonomous work graph. +enum AgentWorkItemKind { + AGENT_WORK_ITEM_KIND_UNSPECIFIED = 0; + AGENT_WORK_ITEM_KIND_ROOT = 1; + AGENT_WORK_ITEM_KIND_MODEL_CALL = 2; + AGENT_WORK_ITEM_KIND_TOOL_CALL = 3; + AGENT_WORK_ITEM_KIND_CHILD_RUN = 4; + AGENT_WORK_ITEM_KIND_WAIT = 5; + AGENT_WORK_ITEM_KIND_MEMORY = 6; + AGENT_WORK_ITEM_KIND_USER_INPUT = 7; + AGENT_WORK_ITEM_KIND_FOLLOWUP = 8; + AGENT_WORK_ITEM_KIND_RECOVERY = 9; +} + +// AgentWorkItemState describes durable progress for a work graph node. +enum AgentWorkItemState { + AGENT_WORK_ITEM_STATE_UNSPECIFIED = 0; + AGENT_WORK_ITEM_STATE_PENDING = 1; + AGENT_WORK_ITEM_STATE_RUNNING = 2; + AGENT_WORK_ITEM_STATE_WAITING = 3; + AGENT_WORK_ITEM_STATE_BLOCKED = 4; + AGENT_WORK_ITEM_STATE_SUCCEEDED = 5; + AGENT_WORK_ITEM_STATE_FAILED = 6; + AGENT_WORK_ITEM_STATE_CANCELLED = 7; +} + +// AutonomySessionState is the coarse lifecycle for the long-lived teammate +// session attached to a work envelope. +enum AutonomySessionState { + AUTONOMY_SESSION_STATE_UNSPECIFIED = 0; + AUTONOMY_SESSION_STATE_ACTIVE = 1; + AUTONOMY_SESSION_STATE_IDLE = 2; + AUTONOMY_SESSION_STATE_WAITING = 3; + AUTONOMY_SESSION_STATE_FAILED = 4; + AUTONOMY_SESSION_STATE_CANCELLED = 5; +} + +// YieldContinuation describes how Platform should continue an autonomous +// session after the current run releases its lease. +enum YieldContinuation { + YIELD_CONTINUATION_UNSPECIFIED = 0; + YIELD_CONTINUATION_INLINE_NEXT_STEP = 1; + YIELD_CONTINUATION_SCHEDULED = 2; + YIELD_CONTINUATION_WAIT = 3; + YIELD_CONTINUATION_END_SESSION = 4; +} + +// RuntimeDependencyStatus describes the readiness of a platform boundary that +// contributed context to an AgentRun. +enum RuntimeDependencyStatus { + RUNTIME_DEPENDENCY_STATUS_UNSPECIFIED = 0; + RUNTIME_DEPENDENCY_STATUS_RESOLVED = 1; + RUNTIME_DEPENDENCY_STATUS_NOT_FOUND = 2; + RUNTIME_DEPENDENCY_STATUS_NOT_CONFIGURED = 3; + RUNTIME_DEPENDENCY_STATUS_LOADED = 4; +} + +// RuntimeWorkEnvelopeKind classifies the durable human/work object a trigger +// belongs to. Envelopes group retries and follow-up messages across channels +// without making the runtime depend on Slack-specific string labels. +enum RuntimeWorkEnvelopeKind { + RUNTIME_WORK_ENVELOPE_KIND_UNSPECIFIED = 0; + RUNTIME_WORK_ENVELOPE_KIND_CONVERSATION_THREAD = 1; + RUNTIME_WORK_ENVELOPE_KIND_DIRECT_CONVERSATION = 2; + RUNTIME_WORK_ENVELOPE_KIND_TICKET = 3; + RUNTIME_WORK_ENVELOPE_KIND_CALENDAR_EVENT = 4; + RUNTIME_WORK_ENVELOPE_KIND_PULL_REQUEST = 5; + RUNTIME_WORK_ENVELOPE_KIND_INCIDENT = 6; + RUNTIME_WORK_ENVELOPE_KIND_REPOSITORY = 7; + RUNTIME_WORK_ENVELOPE_KIND_DOCUMENT = 8; + RUNTIME_WORK_ENVELOPE_KIND_RECORD = 9; +} + +// SurfaceTargetKind classifies the provider object that owns interaction +// context. It is deliberately independent of conversation channel shape. +enum SurfaceTargetKind { + SURFACE_TARGET_KIND_UNSPECIFIED = 0; + SURFACE_TARGET_KIND_CONVERSATION = 1; + SURFACE_TARGET_KIND_TICKET = 2; + SURFACE_TARGET_KIND_PULL_REQUEST = 3; + SURFACE_TARGET_KIND_INCIDENT = 4; + SURFACE_TARGET_KIND_REPOSITORY = 5; + SURFACE_TARGET_KIND_DOCUMENT = 6; + SURFACE_TARGET_KIND_RECORD = 7; +} + +// RuntimeChannelKind classifies the inbound or outbound channel adapter that +// owns the human conversation surface for a run. +enum RuntimeChannelKind { + RUNTIME_CHANNEL_KIND_UNSPECIFIED = 0; + RUNTIME_CHANNEL_KIND_SLACK = 1; + RUNTIME_CHANNEL_KIND_WEB = 2; + RUNTIME_CHANNEL_KIND_API = 3; + RUNTIME_CHANNEL_KIND_EMAIL = 4; + RUNTIME_CHANNEL_KIND_GITHUB = 5; + RUNTIME_CHANNEL_KIND_LINEAR = 6; + RUNTIME_CHANNEL_KIND_JIRA = 7; + RUNTIME_CHANNEL_KIND_IDE = 8; + RUNTIME_CHANNEL_KIND_MONITORING = 9; + RUNTIME_CHANNEL_KIND_BROWSER_EXTENSION = 10; + RUNTIME_CHANNEL_KIND_DESKTOP_HELPER = 11; + RUNTIME_CHANNEL_KIND_CALENDAR = 12; + RUNTIME_CHANNEL_KIND_TEAMS = 13; + RUNTIME_CHANNEL_KIND_WHATSAPP = 14; + RUNTIME_CHANNEL_KIND_APPLE_MESSAGES = 15; +} + +// RuntimeTriggerKind classifies the normalized source event that started or +// resumed a run. The legacy string source_event_type remains for compatibility +// with early producers and arbitrary integration event names. +enum RuntimeTriggerKind { + RUNTIME_TRIGGER_KIND_UNSPECIFIED = 0; + RUNTIME_TRIGGER_KIND_SLACK_APP_MENTION = 1; + RUNTIME_TRIGGER_KIND_SLACK_DIRECT_MESSAGE = 2; + RUNTIME_TRIGGER_KIND_SLACK_SLASH_COMMAND = 3; + RUNTIME_TRIGGER_KIND_SLACK_ACTION = 4; + RUNTIME_TRIGGER_KIND_SLACK_THREAD_CONTINUATION = 5; + RUNTIME_TRIGGER_KIND_SLACK_EVENT = 6; + RUNTIME_TRIGGER_KIND_ENSEMBLE_WEB_MESSAGE = 7; + RUNTIME_TRIGGER_KIND_ENSEMBLE_WEBHOOK_EVENT = 8; + RUNTIME_TRIGGER_KIND_SCHEDULE = 9; + RUNTIME_TRIGGER_KIND_EMAIL = 10; + RUNTIME_TRIGGER_KIND_API = 11; + RUNTIME_TRIGGER_KIND_WEB = 12; + RUNTIME_TRIGGER_KIND_GITHUB_ISSUE_COMMENT = 13; + RUNTIME_TRIGGER_KIND_GITHUB_PULL_REQUEST_COMMENT = 14; + RUNTIME_TRIGGER_KIND_LINEAR_ACTION = 15; + RUNTIME_TRIGGER_KIND_IDE_COMMAND = 16; + RUNTIME_TRIGGER_KIND_MONITORING_ALERT = 17; + RUNTIME_TRIGGER_KIND_PROACTIVE_PATTERN = 18; + RUNTIME_TRIGGER_KIND_SLACK_ASSISTANT_THREAD_STARTED = 19; + RUNTIME_TRIGGER_KIND_SLACK_ASSISTANT_THREAD_CONTEXT_CHANGED = 20; + RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_CREATED = 21; + RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_UPDATED = 22; + RUNTIME_TRIGGER_KIND_CALENDAR_EVENT_CANCELLED = 23; + RUNTIME_TRIGGER_KIND_TEAMS_MESSAGE = 24; + RUNTIME_TRIGGER_KIND_TEAMS_CHANNEL_MENTION = 25; + RUNTIME_TRIGGER_KIND_WHATSAPP_DIRECT_MESSAGE = 26; + RUNTIME_TRIGGER_KIND_WHATSAPP_GROUP_MESSAGE = 27; + RUNTIME_TRIGGER_KIND_WHATSAPP_BUTTON_REPLY = 28; +} + +// RuntimeVisibilityLevel declares whether runtime state can be projected to +// humans or should remain internal/audit-only. Unspecified values are treated +// conservatively as agent-only by service helpers and consumers. +enum RuntimeVisibilityLevel { + RUNTIME_VISIBILITY_LEVEL_UNSPECIFIED = 0; + RUNTIME_VISIBILITY_LEVEL_AGENT_ONLY = 1; + RUNTIME_VISIBILITY_LEVEL_USER_VISIBLE = 2; + RUNTIME_VISIBILITY_LEVEL_CHANNEL_VISIBLE = 3; + RUNTIME_VISIBILITY_LEVEL_ADMIN_VISIBLE = 4; + RUNTIME_VISIBILITY_LEVEL_AUDIT_ONLY = 5; +} + +// RuntimeAudience identifies the audience allowed to see a runtime event or +// wait projection. Audience is separate from visibility so clients can render a +// channel-safe summary while keeping admin/audit detail available elsewhere. +enum RuntimeAudience { + RUNTIME_AUDIENCE_UNSPECIFIED = 0; + RUNTIME_AUDIENCE_AGENT = 1; + RUNTIME_AUDIENCE_TRIGGER_ACTOR = 2; + RUNTIME_AUDIENCE_CHANNEL = 3; + RUNTIME_AUDIENCE_WORKSPACE_ADMINS = 4; + RUNTIME_AUDIENCE_AUDIT = 5; + RUNTIME_AUDIENCE_SYSTEM = 6; +} + +// ChannelActionKind classifies the user or integration action submitted from a +// durable channel surface. +enum ChannelActionKind { + CHANNEL_ACTION_KIND_UNSPECIFIED = 0; + CHANNEL_ACTION_KIND_APPROVAL_DECISION = 1; + CHANNEL_ACTION_KIND_WAIT_RESUME = 2; + CHANNEL_ACTION_KIND_OBJECTIVE_CONTROL = 3; + CHANNEL_ACTION_KIND_MEMORY_DECISION = 4; + CHANNEL_ACTION_KIND_OPS_COMMAND = 5; + CHANNEL_ACTION_KIND_GENERIC = 6; + CHANNEL_ACTION_KIND_CODEX_INTERACTION = 7; + CHANNEL_ACTION_KIND_BROWSER_CONTROL = 8; + CHANNEL_ACTION_KIND_DESKTOP_CONTROL = 9; +} + +// ChannelActionTargetKind identifies the platform object controlled by a +// channel action. +enum ChannelActionTargetKind { + CHANNEL_ACTION_TARGET_KIND_UNSPECIFIED = 0; + CHANNEL_ACTION_TARGET_KIND_RUN = 1; + CHANNEL_ACTION_TARGET_KIND_WAIT = 2; + CHANNEL_ACTION_TARGET_KIND_APPROVAL = 3; + CHANNEL_ACTION_TARGET_KIND_OBJECTIVE = 4; + CHANNEL_ACTION_TARGET_KIND_ARTIFACT = 5; + CHANNEL_ACTION_TARGET_KIND_MEMORY_CANDIDATE = 6; + CHANNEL_ACTION_TARGET_KIND_TOOL_EXECUTION = 7; + CHANNEL_ACTION_TARGET_KIND_CODEX_SESSION = 8; + CHANNEL_ACTION_TARGET_KIND_PATCH = 9; + CHANNEL_ACTION_TARGET_KIND_PULL_REQUEST = 10; + CHANNEL_ACTION_TARGET_KIND_BROWSER_SESSION = 11; + CHANNEL_ACTION_TARGET_KIND_BROWSER_TAB = 12; + CHANNEL_ACTION_TARGET_KIND_BROWSER_NATIVE_HOST = 13; + CHANNEL_ACTION_TARGET_KIND_DESKTOP_SESSION = 14; +} + +// ChannelActionAuthorizationOutcome records the actor-resolution and policy +// decision for a channel action. +enum ChannelActionAuthorizationOutcome { + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_UNSPECIFIED = 0; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_ALLOWED = 1; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_DENIED = 2; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_UNMAPPED_ACTOR = 3; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_WRONG_APPROVER = 4; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_EXPIRED = 5; + CHANNEL_ACTION_AUTHORIZATION_OUTCOME_STALE = 6; +} + +// ChannelActionExecutionOutcome records the durable side-effect result for a +// channel action. +enum ChannelActionExecutionOutcome { + CHANNEL_ACTION_EXECUTION_OUTCOME_UNSPECIFIED = 0; + CHANNEL_ACTION_EXECUTION_OUTCOME_PENDING = 1; + CHANNEL_ACTION_EXECUTION_OUTCOME_SUCCEEDED = 2; + CHANNEL_ACTION_EXECUTION_OUTCOME_FAILED = 3; + CHANNEL_ACTION_EXECUTION_OUTCOME_DUPLICATE = 4; + CHANNEL_ACTION_EXECUTION_OUTCOME_TARGET_NOT_FOUND = 5; + CHANNEL_ACTION_EXECUTION_OUTCOME_ALREADY_RESOLVED = 6; + CHANNEL_ACTION_EXECUTION_OUTCOME_UNAUTHORIZED = 7; + CHANNEL_ACTION_EXECUTION_OUTCOME_EXPIRED = 8; + CHANNEL_ACTION_EXECUTION_OUTCOME_STALE = 9; +} + +// ChannelActionDeliveryOutcome records whether the channel message/update was +// reconciled after handling an action. +enum ChannelActionDeliveryOutcome { + CHANNEL_ACTION_DELIVERY_OUTCOME_UNSPECIFIED = 0; + CHANNEL_ACTION_DELIVERY_OUTCOME_NOT_ATTEMPTED = 1; + CHANNEL_ACTION_DELIVERY_OUTCOME_UPDATED = 2; + CHANNEL_ACTION_DELIVERY_OUTCOME_FAILED = 3; + CHANNEL_ACTION_DELIVERY_OUTCOME_SKIPPED = 4; +} + +// RuntimeSensitivity classifies how carefully runtime payloads must be handled +// before projection outside Platform. +enum RuntimeSensitivity { + RUNTIME_SENSITIVITY_UNSPECIFIED = 0; + RUNTIME_SENSITIVITY_PUBLIC = 1; + RUNTIME_SENSITIVITY_INTERNAL = 2; + RUNTIME_SENSITIVITY_CONFIDENTIAL = 3; + RUNTIME_SENSITIVITY_RESTRICTED = 4; +} + +// RuntimeRedactionKind identifies data categories that were removed or must be +// removed before channel/user rendering. +enum RuntimeRedactionKind { + RUNTIME_REDACTION_KIND_UNSPECIFIED = 0; + RUNTIME_REDACTION_KIND_PII = 1; + RUNTIME_REDACTION_KIND_CREDENTIAL = 2; + RUNTIME_REDACTION_KIND_TOOL_ARGS = 3; + RUNTIME_REDACTION_KIND_POLICY_DETAIL = 4; + RUNTIME_REDACTION_KIND_INTERNAL_CONTEXT = 5; +} + +// RuntimeVirtualFileRedactionState mirrors the workspace VFS byte plane's +// redaction contract so Runtime VFS callers can discover whether content is +// safe to read, preview-only, already redacted, or denied. +enum RuntimeVirtualFileRedactionState { + RUNTIME_VIRTUAL_FILE_REDACTION_STATE_UNSPECIFIED = 0; + RUNTIME_VIRTUAL_FILE_REDACTION_STATE_RAW = 1; + RUNTIME_VIRTUAL_FILE_REDACTION_STATE_REDACTED = 2; + RUNTIME_VIRTUAL_FILE_REDACTION_STATE_PREVIEW_ONLY = 3; + RUNTIME_VIRTUAL_FILE_REDACTION_STATE_DENIED = 4; +} + +// RuntimeWebConversationCoordinates identifies a Platform-owned web thread. +message RuntimeWebConversationCoordinates { + string conversation_id = 1 [(buf.validate.field).string.min_len = 1]; + string message_id = 2; +} + +// RuntimeSlackThreadCoordinates identifies one Slack conversation thread. +message RuntimeSlackThreadCoordinates { + string provider_workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string channel_id = 2 [(buf.validate.field).string.min_len = 1]; + string thread_id = 3 [(buf.validate.field).string.min_len = 1]; + string message_id = 4; +} + +// RuntimeEmailThreadCoordinates identifies one provider mailbox thread. +message RuntimeEmailThreadCoordinates { + string connection_id = 1 [(buf.validate.field).string.min_len = 1]; + string mailbox_id = 2 [(buf.validate.field).string.min_len = 1]; + string thread_id = 3 [(buf.validate.field).string.min_len = 1]; + string message_id = 4; + string provider_revision = 5; +} + +// RuntimeCalendarEventCoordinates identifies one event or recurring instance. +message RuntimeCalendarEventCoordinates { + string connection_id = 1 [(buf.validate.field).string.min_len = 1]; + string calendar_id = 2 [(buf.validate.field).string.min_len = 1]; + string event_id = 3 [(buf.validate.field).string.min_len = 1]; + string recurring_series_id = 4; + string recurring_instance_id = 5; + string provider_revision = 6; +} + +// RuntimeTeamsThreadCoordinates identifies one Microsoft Teams chat or channel +// thread. tenant_id is the Microsoft tenant, conversation_id is the channel or +// chat, and thread_id is the reply-chain root (the message itself when there is +// no thread). +message RuntimeTeamsThreadCoordinates { + string tenant_id = 1 [(buf.validate.field).string.min_len = 1]; + string conversation_id = 2 [(buf.validate.field).string.min_len = 1]; + string thread_id = 3 [(buf.validate.field).string.min_len = 1]; + string message_id = 4; +} + +// RuntimeWhatsAppConversationCoordinates identifies one WhatsApp Business +// conversation. chat_id is the peer wa_id for a 1:1 chat or the group id. +message RuntimeWhatsAppConversationCoordinates { + string waba_id = 1 [(buf.validate.field).string.min_len = 1]; + string phone_number_id = 2 [(buf.validate.field).string.min_len = 1]; + string chat_id = 3 [(buf.validate.field).string.min_len = 1]; + string message_id = 4; +} + +// RuntimeChannelContext carries stable channel coordinates for channel +// adapters. Slack teammates use provider_workspace_id for team_id, channel_id +// for the conversation, thread_id for the Slack thread_ts, and message_id for +// the triggering message/event timestamp. +message RuntimeChannelContext { + RuntimeChannelKind channel_kind = 1 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 2; + string channel_id = 3; + string thread_id = 4; + string message_id = 5; + // Deprecated overloaded actor field. New Slack and channel adapters should + // set actor_channel_id for the provider-local respondent, actor_entity_id for + // the resolved canonical entity, and principal_id for the authenticated + // platform principal when available. + string actor_id = 6; + string permalink = 7; + map attributes = 8; + string actor_channel_id = 9; + string actor_entity_id = 10; + string principal_id = 11; + // coordinates is the canonical provider-specific identity for new channel + // adapters. Flat fields 2 through 5 remain for wire-compatible migration. + oneof coordinates { + RuntimeWebConversationCoordinates web = 12; + RuntimeSlackThreadCoordinates slack = 13; + RuntimeEmailThreadCoordinates email = 14; + RuntimeCalendarEventCoordinates calendar = 15; + RuntimeTeamsThreadCoordinates teams = 16; + RuntimeWhatsAppConversationCoordinates whatsapp = 17; + } +} + +// RuntimeWorkEnvelope identifies the durable work object that groups related +// normalized triggers. For Slack this is usually a conversation thread; future +// adapters can map email threads, Jira tickets, calendar events, and Teams +// threads into the same runtime primitive. +message RuntimeWorkEnvelope { + string id = 1 [(buf.validate.field).string.min_len = 1]; + RuntimeWorkEnvelopeKind kind = 2 [(buf.validate.field).enum.defined_only = true]; + string root_id = 3; + string parent_id = 4; + map attributes = 5; +} + +// RuntimeProactiveSourceEvent identifies the upstream event that caused a +// proactive trigger candidate without copying the full source payload into the +// runtime record. +message RuntimeProactiveSourceEvent { + string stream = 1; + string subject = 2; + uint64 sequence = 3; + string event_id = 4; + string event_family = 5; + string event_type = 6; + string provider_object_id = 7; + string provider_id = 8; + string connection_id = 9; + string provider_revision = 10; +} + +// RuntimeProactivePolicy carries teammate/channel wake controls in the same +// trigger contract that AgentRuntime admission evaluates. +message RuntimeProactivePolicy { + optional bool wake_enabled = 1; + repeated string trigger_kinds = 2; + bool allow_customer_facing = 3; + bool post_run_started = 4; +} + +// RuntimeSourceHealthSummary is the compact source-health projection used by +// proactive runtime context. Cerebro remains the source of truth for detailed +// health records. +message RuntimeSourceHealthSummary { + string status = 1; + repeated string checked_sources = 2; + repeated string stale_sources = 3; + string summary = 4; +} + +// RuntimeCerebroFactsContext carries the identifiers and retrieval counts that +// let AgentRuntime, Ensemble, and operators trace a proactive run back to +// Cerebro without parsing payload maps. +message RuntimeCerebroFactsContext { + string provider = 1; + string workspace_id = 2; + string query = 3; + repeated string thing_ids = 4; + repeated string fact_ids = 5; + repeated string event_ids = 6; + RuntimeSourceHealthSummary source_health_summary = 7; + string belief_debug_summary = 8; + string rollout_id = 9; + string rollout_summary = 10; + string rollout_result = 11; + map retrieval_counts = 12 [(buf.validate.field).map.values.int64.gte = 0]; +} + +// RuntimeProactiveContext is the first-class proactive trigger envelope. It +// keeps event identity, policy hints, risk hints, and Cerebro context out of +// ad hoc trigger payload conventions. +message RuntimeProactiveContext { + bool proactive_runtime = 1; + string proactive_ingest = 2; + RuntimeProactiveSourceEvent source_event = 3; + repeated string thing_ids = 4; + string action_class = 5; + string risk_level = 6; + bool external_side_effect = 7; + RuntimeCerebroFactsContext facts_context = 8; + RuntimeProactivePolicy policy = 9; +} + +// RuntimeRedaction records one projected field or payload category that has +// been redacted for channel/user display. +message RuntimeRedaction { + RuntimeRedactionKind kind = 1 [(buf.validate.field).enum.defined_only = true]; + string field_path = 2; + string replacement = 3; + string reason = 4; +} + +// RuntimeVisibilityMetadata carries the projection policy for runtime events +// and waits. Safe summaries are required when visibility is user/channel +// visible so clients never need to render raw internal payloads. +message RuntimeVisibilityMetadata { + RuntimeVisibilityLevel level = 1 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeAudience audiences = 2 [(buf.validate.field).repeated.items.enum.defined_only = true]; + RuntimeSensitivity sensitivity = 3 [(buf.validate.field).enum.defined_only = true]; + string safe_summary = 4; + repeated RuntimeRedaction redactions = 5; + map attributes = 6; +} + +// ChannelActionActor captures the channel coordinates and resolved platform +// identity for the actor who submitted an action. +message ChannelActionActor { + RuntimeChannelKind channel_kind = 1 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 2; + string channel_id = 3; + string thread_id = 4; + string message_id = 5; + string action_id = 6; + string callback_id = 7; + string actor_channel_id = 8; + string actor_entity_id = 9; + string principal_id = 10; + map attributes = 11; +} + +// ChannelActionReceipt is the durable audit and idempotency record for a +// user-visible action submitted through a channel adapter. +message ChannelActionReceipt { + string id = 1; + string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; + string idempotency_key = 3 [(buf.validate.field).string.min_len = 1]; + string request_hash = 4; + common.v1.Surface surface_type = 5 [(buf.validate.field).enum.defined_only = true]; + ChannelActionKind action_kind = 6 [(buf.validate.field).enum.defined_only = true]; + ChannelActionTargetKind target_kind = 7 [(buf.validate.field).enum.defined_only = true]; + string target_id = 8; + string run_id = 9; + string wait_id = 10; + string approval_request_id = 11; + string objective_id = 12; + ChannelActionActor actor = 13; + google.protobuf.Struct payload = 14; + ChannelActionAuthorizationOutcome authorization_outcome = 15 [(buf.validate.field).enum.defined_only = true]; + ChannelActionExecutionOutcome execution_outcome = 16 [(buf.validate.field).enum.defined_only = true]; + ChannelActionDeliveryOutcome delivery_outcome = 17 [(buf.validate.field).enum.defined_only = true]; + string reason = 18; + string error_reason = 19; + google.protobuf.Timestamp created_at = 20; + google.protobuf.Timestamp updated_at = 21; + codex.v1.CodexInteractionDecision codex_interaction_decision = 22; +} + +// NormalizedTrigger is the source-neutral trigger contract. Surface is an enum +// so product callers share one durable taxonomy across Slack, Ensemble, Chat, +// Maestro, and Conductor. The legacy string field remains for wire-compatible +// migration of early callers. +message NormalizedTrigger { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2 [(buf.validate.field).string.min_len = 1]; + string surface = 3 [deprecated = true]; + // Deprecated flat channel field. New callers should send channel_context; + // the runtime normalizes this field for legacy consumers and idempotency + // joins. + string channel_id = 4; + string idempotency_key = 5 [(buf.validate.field).string.min_len = 1]; + string source_event_id = 6; + string source_event_type = 7 [deprecated = true]; + string actor_id = 8; + string correlation_id = 9; + google.protobuf.Struct payload = 10; + google.protobuf.Timestamp received_at = 11; + common.v1.Surface surface_type = 12 [(buf.validate.field).enum.defined_only = true]; + RuntimeChannelContext channel_context = 13; + RuntimeTriggerKind trigger_kind = 14 [(buf.validate.field).enum.defined_only = true]; + RuntimeWorkEnvelope work_envelope = 15; + codex.v1.CodexWorkRequest codex_work = 16; + RuntimeProactiveContext proactive_context = 17; + // objective_id binds a trigger to an already-created Objective. Console and + // other product surfaces use this when the user message first creates the + // Objective, so AgentRuntime does not have to rediscover the active goal. + string objective_id = 18; + string organization_id = 19 [(buf.validate.field).string.min_len = 1]; +} + +// RuntimeContext captures the boundary decisions used to construct a run. +message RuntimeContext { + repeated RuntimeDependency dependencies = 1; + map attributes = 2; + repeated RuntimeVirtualFile virtual_files = 3; + // Typed profile for persistent teammate runtime capabilities. Workers and + // channel renderers should use this field as the source of truth; any VFS + // JSON projection is only a compatibility/read surface. + TeammateCapabilityProfile teammate_capability_profile = 4; +} + +// TeammateCapabilityProfile describes the runtime capability and isolation +// contract Platform grants to a persistent teammate run. +message TeammateCapabilityProfile { + string schema_version = 1; + string run_id = 2; + string workspace_id = 3; + string agent_id = 4; + string work_envelope_id = 5; + string work_envelope_kind = 6; + string surface = 7; + string channel_kind = 8; + string execution_owner = 9; + string channel_ingress_owner = 10; + string channel_renderer = 11; + string scheduler_owner = 12; + string memory_owner = 13; + string evidence_owner = 14; + string privilege_model = 15; + bool always_on = 16; + bool ambient = 17; + repeated TeammateCapability capabilities = 18; + repeated TeammateExecutionStep execution_path = 19; + repeated string isolation_boundaries = 20; + repeated string context_paths = 21; + repeated string guardrails = 22; +} + +// TeammateCapability is one Platform-owned capability made available to a run. +message TeammateCapability { + string id = 1; + string owner = 2; + repeated string contract_paths = 3; + repeated string rpcs = 4; + string isolation = 5; + bool slack_visible = 6; + bool requires_lease = 7; + bool proposal_only = 8; + bool evidence_backed = 9; +} + +// TeammateExecutionStep is the concise ownership path for capability use. +message TeammateExecutionStep { + string id = 1; + string owner = 2; + repeated string reads = 3; + repeated string writes = 4; + repeated string rpcs = 5; + string isolation = 6; + string slack_behavior = 7; +} + +// RuntimeVirtualFile is a read-only file projected into an agent run from +// platform services. It lets workers consume rich context through a stable VFS +// instead of parsing flat runtime attributes. +message RuntimeVirtualFile { + string path = 1 [(buf.validate.field).string.min_len = 1]; + string media_type = 2; + string content = 3; + string source_service = 4; + string source_reference_id = 5; + map metadata = 6; + RuntimeVirtualFileProvenance provenance = 7; + RuntimeSensitivity sensitivity = 8 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileRedactionState redaction_state = 9 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 10; +} + +// RuntimeVirtualFileProvenance is the typed causal projection for a VFS +// revision. Producers still preserve legacy metadata keys, but workers should +// prefer this shape when explaining, citing, promoting, or rebasing files. +message RuntimeVirtualFileProvenance { + string producer_service = 1; + string producer_kind = 2; + string source_reference_id = 3; + string runtime_event_id = 4; + string artifact_id = 5; + string step_id = 6; + string tool_execution_id = 7; + string hydration_id = 8; + string transaction_id = 9; + string promotion_id = 10; + string evidence_handle = 11; + string trace_id = 12; + string span_id = 13; + repeated string parent_revision_ids = 14; + string provider_id = 15; + string connection_id = 16; +} + +// RuntimeVirtualFileEntry is an ls/stat-friendly projection of one virtual +// file. It intentionally omits content so callers can discover before reading. +message RuntimeVirtualFileEntry { + string path = 1; + string media_type = 2; + string source_service = 3; + string source_reference_id = 4; + map metadata = 5; + int64 size_bytes = 6 [(buf.validate.field).int64.gte = 0]; + string content_sha256 = 7; + bool content_truncated = 8; + string mount = 9; + string kind = 10; + string permissions = 11; + string view = 12; + string revision_id = 13; + string parent_revision_id = 14; + string provider_id = 15; + string connection_id = 16; + string cache_policy = 17; + string policy = 18; + bool lazy = 19; + int32 secret_ref_count = 20 [(buf.validate.field).int32.gte = 0]; + string cerebro_index = 21; + string content_address = 22; + RuntimeVirtualFileProvenance provenance = 23; + RuntimeSensitivity sensitivity = 24 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileRedactionState redaction_state = 25 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 26; + RuntimeVirtualFileOperation operation = 27 [(buf.validate.field).enum.defined_only = true]; + bool tombstone = 28; + string rename_from = 29; + string rename_to = 30; + repeated string capabilities = 31; + bool writable = 32; + bool read_only = 33; + bool generated = 34; + bool evidence_backed = 35; + bool externally_indexed = 36; +} + +enum RuntimeVirtualFileOperation { + RUNTIME_VIRTUAL_FILE_OPERATION_UNSPECIFIED = 0; + RUNTIME_VIRTUAL_FILE_OPERATION_WRITE = 1; + RUNTIME_VIRTUAL_FILE_OPERATION_DELETE = 2; + RUNTIME_VIRTUAL_FILE_OPERATION_RENAME = 3; +} + +// RuntimeVirtualFileReasonCode is a stable, machine-readable reason taxonomy +// for VFS skips and precondition failures. Human strings may evolve; clients +// should branch on this enum. +enum RuntimeVirtualFileReasonCode { + RUNTIME_VIRTUAL_FILE_REASON_CODE_UNSPECIFIED = 0; + RUNTIME_VIRTUAL_FILE_REASON_CODE_NOT_FOUND = 1; + RUNTIME_VIRTUAL_FILE_REASON_CODE_FILTERED_OUT = 2; + RUNTIME_VIRTUAL_FILE_REASON_CODE_TOTAL_BUDGET_EXHAUSTED = 3; + RUNTIME_VIRTUAL_FILE_REASON_CODE_PATH_INVALID = 4; + RUNTIME_VIRTUAL_FILE_REASON_CODE_CAPABILITY_DENIED = 5; + RUNTIME_VIRTUAL_FILE_REASON_CODE_REVISION_CONFLICT = 6; + RUNTIME_VIRTUAL_FILE_REASON_CODE_CURSOR_LAGGED = 7; + RUNTIME_VIRTUAL_FILE_REASON_CODE_TEMPORARILY_UNAVAILABLE = 8; +} + +// RuntimeVirtualFileMatch is one bounded search match in a virtual file. +message RuntimeVirtualFileMatch { + string path = 1; + int32 line_number = 2 [(buf.validate.field).int32.gte = 0]; + string snippet = 3; + string mount = 4; + string source_service = 5; + repeated string before_context = 6; + repeated string after_context = 7; + int32 score = 8 [(buf.validate.field).int32.gte = 0]; + repeated string match_reasons = 9; + string view = 10; + string kind = 11; + string transaction_id = 12; +} + +// RuntimeDependency names one platform service boundary the runtime depends on. +message RuntimeDependency { + string service = 1 [(buf.validate.field).string.min_len = 1]; + string purpose = 2; + bool required = 3; + string status = 4 [deprecated = true]; + string reference_id = 5; + RuntimeDependencyStatus status_type = 6 [(buf.validate.field).enum.defined_only = true]; +} + +// AgentRunLinkage carries the shared identifiers every durable run record uses +// for partitioning, authorization, and audit joins. +message AgentRunLinkage { + string run_id = 1; + string workspace_id = 2; + string agent_id = 3; + string objective_id = 4; +} + +// RuntimeTraceContext captures the W3C trace context that causally owns a +// durable AgentRun lifecycle record. It is persisted with runs, events, and +// steps so retries, worker claims, and parked waits can resume the same +// distributed trace instead of starting unrelated service-local traces. +message RuntimeTraceContext { + string trace_id = 1; + string span_id = 2; + string parent_span_id = 3; + string traceparent = 4; + string tracestate = 5; +} + +// AgentRun is the canonical agent runtime execution record. It owns the +// durable child records needed to resume from checkpoints and audit each +// attempt without replaying model/tool side effects. +message AgentRun { + string id = 1; + NormalizedTrigger trigger = 2; + AgentRunState state = 3; + agents.v1.Agent agent = 4; + agents.v1.AgentConfig agent_config = 5; + objectives.v1.Objective objective = 6; + RuntimeContext context = 7; + string worker_queue = 8; + string error_message = 9; + google.protobuf.Timestamp created_at = 10; + google.protobuf.Timestamp updated_at = 11; + + AgentRunLinkage linkage = 12; + int32 attempt = 15; + int32 max_attempts = 16; + AgentRunLease lease = 17; + AgentRunCheckpoint latest_checkpoint = 18; + repeated AgentRunStep steps = 19; + repeated AgentRunWait waits = 20; + repeated AgentRunArtifact artifacts = 21; + repeated AgentRunCost costs = 22; + repeated AgentRunStreamCursor stream_cursors = 23; + google.protobuf.Timestamp queued_at = 24; + google.protobuf.Timestamp started_at = 25; + google.protobuf.Timestamp waiting_at = 26; + google.protobuf.Timestamp completed_at = 27; + google.protobuf.Timestamp cancelled_at = 28; + google.protobuf.Timestamp next_retry_at = 29; + google.protobuf.Timestamp dead_lettered_at = 30; + string cancellation_reason = 31; + string dead_letter_reason = 32; + repeated AgentRunCheckpoint checkpoints = 33; + RuntimeTraceContext trace_context = 34; + string autonomy_session_id = 35; +} + +// AgentRunLease is the claim token a worker must present while mutating a run. +message AgentRunLease { + string id = 1; + AgentRunLinkage linkage = 2; + string worker_id = 6; + string token = 7; + string worker_queue = 8; + int32 attempt = 9; + google.protobuf.Timestamp claimed_at = 10; + google.protobuf.Timestamp heartbeat_at = 11; + google.protobuf.Timestamp expires_at = 12; +} + +// AgentRunStep is one durable unit of work within a run. +message AgentRunStep { + string id = 1; + AgentRunLinkage linkage = 2; + string name = 6; + string kind = 7 [deprecated = true]; + AgentRunStepState state = 8; + int32 attempt = 9; + google.protobuf.Struct input = 10; + google.protobuf.Struct output = 11; + string error_message = 12; + string checkpoint_id = 13; + google.protobuf.Timestamp started_at = 14; + google.protobuf.Timestamp ended_at = 15; + AgentRunStepKind step_kind = 16 [(buf.validate.field).enum.defined_only = true]; + codex.v1.CodexRunProgress codex_progress = 17; + RuntimeTraceContext trace_context = 18; +} + +// AgentRunCheckpoint is an opaque resume snapshot. Workers can deserialize the +// payload they own, restore local state, and continue from the next step. +message AgentRunCheckpoint { + string id = 1; + AgentRunLinkage linkage = 2; + string step_id = 6; + int64 sequence = 7; + string resume_token = 8; + google.protobuf.Struct payload = 9; + google.protobuf.Timestamp created_at = 10; +} + +// AgentRunWait records a parked run. While active, the run has no lease and no +// worker compute should be held. +message AgentRunWait { + string id = 1; + AgentRunLinkage linkage = 2; + string step_id = 6; + AgentRunWaitType type = 7; + string external_ref = 8; + string reason = 9; + google.protobuf.Struct payload = 10; + google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp resume_after = 12; + google.protobuf.Timestamp expires_at = 13; + google.protobuf.Timestamp resolved_at = 14; + string resolved_by_event_id = 15; + RuntimeVisibilityMetadata visibility = 16; + codex.v1.CodexInteractionRequest codex_interaction = 17; +} + +// AgentRunArtifact records durable output produced by a run or step. +message AgentRunArtifact { + string id = 1; + AgentRunLinkage linkage = 2; + string step_id = 6; + string artifact_type = 7 [deprecated = true]; + string uri = 8; + string content_type = 9; + string digest = 10; + google.protobuf.Struct metadata = 11; + google.protobuf.Timestamp created_at = 12; + AgentRunArtifactKind artifact_kind = 16 [(buf.validate.field).enum.defined_only = true]; + codex.v1.CodexOutputTarget codex_output = 17; +} + +// AgentRunCost records metering information associated with a run or step. +message AgentRunCost { + string id = 1; + AgentRunLinkage linkage = 2; + string step_id = 6; + string meter_ref = 7; + string provider = 8; + string model = 9; + int64 input_tokens = 10; + int64 output_tokens = 11; + int64 total_tokens = 12; + string currency = 13; + int64 estimated_cost_micros = 14; + google.protobuf.Timestamp recorded_at = 15; +} + +// AgentRunStreamCursor stores a consumer cursor into the append-only event log. +message AgentRunStreamCursor { + string id = 1; + AgentRunLinkage linkage = 2; + string consumer = 4; + int64 next_sequence = 5; + google.protobuf.Timestamp updated_at = 6; +} + +// RuntimeEvent is appended, never mutated, for AgentRun state transitions and +// runtime orchestration decisions. +message RuntimeEvent { + string id = 1; + string run_id = 2; + int64 sequence = 3; + RuntimeEventType type = 4; + string message = 5; + google.protobuf.Struct attributes = 6; + google.protobuf.Timestamp occurred_at = 7; + string step_id = 11; + string checkpoint_id = 12; + string artifact_id = 13; + string cost_id = 14; + string wait_id = 15; + AgentRunLinkage linkage = 16; + RuntimeVisibilityMetadata visibility = 17; + codex.v1.CodexRunProgress codex_progress = 18; + codex.v1.CodexInteractionRequest codex_interaction = 19; + codex.v1.CodexOutcomeSignal codex_outcome = 20; + RuntimeTraceContext trace_context = 21; + NativeToolAttemptEvidence native_tool_attempt = 22; + NativeAgentEventEvidence native_agent_event = 23; +} + +// RuntimeEvidenceGap records a typed, safe reason why a runtime observation is +// not yet approval-ready. It carries only proof-state metadata and debug refs; +// raw credentials, grants, prompts, and tool arguments must not be copied here. +message RuntimeEvidenceGap { + RuntimeEvidenceGapReason reason = 1 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState evidence_state = 2 [(buf.validate.field).enum.defined_only = true]; + string message = 3; + string source = 4; + string source_event_id = 5; + string runtime_event_id = 6; + string trace_id = 7; + bool approval_blocking = 8; +} + +// NativeToolAttemptEvidence is the typed Platform primitive for answering +// "What did the agent try to do?" from a native Maestro/Codex tool-attempt +// event. It intentionally carries only redaction-safe identifiers, summaries, +// and digest references; raw prompts, tool arguments, and credential grants +// must not be copied here. +message NativeToolAttemptEvidence { + RuntimeEvidenceState evidence_state = 1 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState credential_evidence_state = 2 [(buf.validate.field).enum.defined_only = true]; + string native_kind = 3 [(buf.validate.field).string.min_len = 1]; + string source_event_id = 4 [(buf.validate.field).string.min_len = 1]; + string source_event_type = 5; + string source_event_source = 6; + string source_event_subject = 7; + string tenant_id = 8; + string organization_id = 9; + string workspace_id = 10 [(buf.validate.field).string.min_len = 1]; + string session_id = 11; + string agent_run_id = 12 [(buf.validate.field).string.min_len = 1]; + string agent_run_step_id = 13; + string agent_id = 14; + string actor_id = 15; + string principal_id = 16; + string trace_id = 17; + string request_id = 18; + string response_id = 19; + string parent_event_id = 20; + string tool_call_id = 21 [(buf.validate.field).string.min_len = 1]; + string tool_execution_id = 22; + string tool_namespace = 23; + string tool_name = 24 [(buf.validate.field).string.min_len = 1]; + string tool_version = 25; + string capability = 26; + string connector_id = 27; + bool mutates_resource = 28; + common.v1.RiskLevel risk_level = 29 [(buf.validate.field).enum.defined_only = true]; + bool arguments_redacted = 30; + string safe_arguments_ref = 31; + string safe_arguments_sha256 = 32; + int32 safe_arguments_key_count = 33 [(buf.validate.field).int32.gte = 0]; + int32 redaction_count = 34 [(buf.validate.field).int32.gte = 0]; + repeated string redactions = 35; + repeated RuntimeEvidenceGap evidence_gaps = 36; + google.protobuf.Timestamp source_event_time = 37; + RuntimeEvidenceState principal_evidence_state = 38 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState cost_evidence_state = 39 [(buf.validate.field).enum.defined_only = true]; +} + +// NativeAgentEventEvidence is the typed receipt primitive for safe native +// Agent Workforce events from Maestro and Codex. It carries source/correlation +// identifiers, redaction metadata, and safe refs only; raw prompts, tool +// arguments, shell output, MCP result bodies, image bytes, transcripts, token +// values, provider response bodies, and credential grants must not be copied +// here. +message NativeAgentEventEvidence { + RuntimeEvidenceState evidence_state = 1 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState principal_evidence_state = 2 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState credential_evidence_state = 3 [(buf.validate.field).enum.defined_only = true]; + RuntimeEvidenceState cost_evidence_state = 4 [(buf.validate.field).enum.defined_only = true]; + NativeAgentEventSource native_source = 5 [(buf.validate.field).enum.defined_only = true]; + string native_kind = 6 [(buf.validate.field).string.min_len = 1]; + string source_event_id = 7 [(buf.validate.field).string.min_len = 1]; + string source_event_type = 8 [(buf.validate.field).string.min_len = 1]; + google.protobuf.Timestamp source_event_time = 9 [(buf.validate.field).required = true]; + string tenant_id = 10; + string organization_id = 11; + string workspace_id = 12 [(buf.validate.field).string.min_len = 1]; + string session_id = 13; + string agent_run_id = 14 [(buf.validate.field).string.min_len = 1]; + string agent_run_step_id = 15; + string agent_id = 16; + string actor_id = 17; + string principal_id = 18; + string thread_id = 19; + string turn_id = 20; + string trace_id = 21; + string request_id = 22; + string response_id = 23; + string parent_event_id = 24; + string tool_call_id = 25; + string tool_execution_id = 26; + string action_id = 27; + string tool_namespace = 28; + string tool_name = 29; + string tool_version = 30; + string capability = 31; + string connector_id = 32; + bool mutates_resource = 33; + common.v1.RiskLevel risk_level = 34 [(buf.validate.field).enum.defined_only = true]; + bool arguments_redacted = 35; + bool output_redacted = 36; + string safe_arguments_ref = 37; + string safe_arguments_sha256 = 38; + int32 safe_arguments_key_count = 39 [(buf.validate.field).int32.gte = 0]; + string safe_output_ref = 40; + string safe_output_sha256 = 41; + int32 safe_output_key_count = 42 [(buf.validate.field).int32.gte = 0]; + int32 redaction_count = 43 [(buf.validate.field).int32.gte = 0]; + repeated string redactions = 44; + repeated RuntimeEvidenceGap evidence_gaps = 45; + string schema = 46 [(buf.validate.field).string.min_len = 1]; +} + +// AgentAutonomySession is the durable teammate session projected over one +// objective/work envelope. Platform owns this identity so Slack can wake, +// steer, or inspect the same autonomous worker without becoming the run loop. +message AgentAutonomySession { + string id = 1; + AgentRunLinkage linkage = 2; + string work_envelope_id = 3; + RuntimeWorkEnvelopeKind work_envelope_kind = 4 [(buf.validate.field).enum.defined_only = true]; + RuntimeChannelContext channel_context = 5; + AutonomySessionState state = 6 [(buf.validate.field).enum.defined_only = true]; + AutonomyProcessingState processing_state = 7 [(buf.validate.field).enum.defined_only = true]; + string processing_summary = 8; + string root_run_id = 9; + string active_run_id = 10; + string current_goal = 11; + string next_action = 12; + string blocker = 13; + string processing_message_ts = 14; + string assistant_stream_ts = 15; + string last_presence_event_id = 16; + google.protobuf.Timestamp last_presence_update_at = 17; + bool final_response_pending = 18; + google.protobuf.Timestamp created_at = 19; + google.protobuf.Timestamp updated_at = 20; +} + +// AgentWorkItem is one node in the autonomous work graph. Workers and +// reconcilers mutate this typed record directly; VFS ledgers are projections. +message AgentWorkItem { + string id = 1; + AgentRunLinkage linkage = 2; + string autonomy_session_id = 3; + string run_id = 4; + string work_envelope_id = 5; + string parent_work_item_id = 6; + string owner_child_run_id = 7; + AgentWorkItemKind kind = 8 [(buf.validate.field).enum.defined_only = true]; + AgentWorkItemState state = 9 [(buf.validate.field).enum.defined_only = true]; + string title = 10; + string goal = 11; + string next_action = 12; + string blocker = 13; + string wait_id = 14; + string tool_execution_id = 15; + repeated string evidence_refs = 16; + string completion_gate = 17; + google.protobuf.Struct payload = 18; + google.protobuf.Timestamp created_at = 19; + google.protobuf.Timestamp updated_at = 20; + google.protobuf.Timestamp started_at = 21; + google.protobuf.Timestamp completed_at = 22; + google.protobuf.Timestamp failed_at = 23; + google.protobuf.Timestamp cancelled_at = 24; +} + +message HandleTriggerRequest { + NormalizedTrigger trigger = 1 [(buf.validate.field).required = true]; +} + +message HandleTriggerResponse { + AgentRun run = 1; + repeated RuntimeEvent events = 2; + bool idempotent_replay = 3; +} + +// Safe attachment metadata accepted from a channel edge. Provider download +// URLs, credentials, and raw attachment bodies are intentionally excluded. +message OperatingChannelAttachmentMetadata { + string provider_attachment_id = 1 [(buf.validate.field).string.min_len = 1]; + string kind = 2; + string media_type = 3; + string name = 4; + int64 size_bytes = 5 [(buf.validate.field).int64.gte = 0]; +} + +// A bounded interactive action submitted by a signed channel edge. The token +// is opaque to the edge and must be validated by Platform before it resolves +// any canonical receipt, question, or session control. +message OperatingChannelInteraction { + string action_id = 1 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; + string action_token = 2 [(buf.validate.field).string = { + min_len: 1 + max_len: 4096 + }]; + string action_timestamp = 3 [(buf.validate.field).string = { + min_len: 1 + max_len: 64 + }]; +} + +// Email reply coordinates authenticated by the email edge and validated against +// the resolved mailbox installation before persistence. Never model authority. +message OperatingChannelEmailMetadata { + string mailbox = 1 [(buf.validate.field).string.max_len = 254]; + string sender = 2 [(buf.validate.field).string.max_len = 254]; + string subject = 3 [(buf.validate.field).string.max_len = 512]; +} + +// Provider-coordinate admission deliberately has no organization_id or +// workspace_id fields. Those authority-bearing coordinates are resolved by +// Platform through ConnectorService before any durable tenant write occurs. +message AdmitOperatingChannelEventRequest { + string provider_id = 1 [(buf.validate.field).string.min_len = 1]; + string provider_app_id = 2 [(buf.validate.field).string.min_len = 1]; + string provider_workspace_id = 3 [(buf.validate.field).string.min_len = 1]; + string provider_enterprise_id = 4; + string source_event_id = 5 [(buf.validate.field).string.min_len = 1]; + string source_event_type = 6 [(buf.validate.field).string.min_len = 1]; + string provider_channel_id = 7 [(buf.validate.field).string.min_len = 1]; + string provider_root_thread_id = 8 [(buf.validate.field).string.min_len = 1]; + string provider_message_id = 9 [(buf.validate.field).string.min_len = 1]; + string actor_subject = 10 [(buf.validate.field).string.min_len = 1]; + string normalized_text = 11; + repeated OperatingChannelAttachmentMetadata attachments = 12; + string traceparent = 13; + string tracestate = 14; + bool direct_conversation = 15; + bool explicit_mention = 16; + OperatingChannelInteraction interaction = 17; + // Short-lived Slack RTS authority from the triggering message/app_mention. + // Server-owned execution context; never forwarded to the model or receipts. + string slack_rts_action_token = 18; + repeated OperatingChannelContextEntity context_entities = 19 [(buf.validate.field).repeated.max_items = 20]; + // Authenticated provider callback endpoint used only for outbound transport. + // Platform validates and persists this outside model-visible context. + string provider_delivery_endpoint = 20 [(buf.validate.field).string.max_len = 2048]; + OperatingChannelEmailMetadata email = 21; +} + +message AdmitOperatingChannelEventResponse { + bool accepted = 1; + bool duplicate = 2; + string ignored_reason = 3; + string conversation_id = 4; + string turn_id = 5; +} + +message SurfaceInvocationActor { + string external_id = 1 [(buf.validate.field).string.min_len = 1]; + string display_name = 2 [(buf.validate.field).string.max_len = 512]; +} + +message SurfaceInvocationTarget { + SurfaceTargetKind kind = 1 [(buf.validate.field).enum.defined_only = true]; + string external_id = 2 [(buf.validate.field).string.min_len = 1]; + string parent_external_id = 3 [(buf.validate.field).string.max_len = 512]; + string revision = 4 [(buf.validate.field).string.max_len = 512]; + string canonical_url = 5 [(buf.validate.field).string.max_len = 2048]; +} + +message SurfaceInvocationTrigger { + string kind = 1 [(buf.validate.field).string.min_len = 1]; + string external_id = 2 [(buf.validate.field).string.min_len = 1]; +} + +message SurfaceInvocationAttachmentRef { + string external_id = 1 [(buf.validate.field).string.min_len = 1]; + string name = 2 [(buf.validate.field).string.min_len = 1]; + string content_type = 3 [(buf.validate.field).string.max_len = 255]; + string canonical_url = 4 [(buf.validate.field).string.max_len = 2048]; +} + +message SurfaceInvocationContextRef { + string kind = 1 [(buf.validate.field).string.min_len = 1]; + string external_id = 2 [(buf.validate.field).string.min_len = 1]; + string canonical_url = 3 [(buf.validate.field).string.max_len = 2048]; +} + +// A bounded provider-native context snapshot captured by the authenticated +// edge. `content` is model-visible context, while the remaining fields bind it +// to the provider read or signed delivery that produced it. Snapshots confer +// no tenant or mutation authority. +message SurfaceInvocationContextSnapshot { + string source_kind = 1 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; + string source_external_id = 2 [(buf.validate.field).string = { + min_len: 1 + max_len: 512 + }]; + string source_revision = 3 [(buf.validate.field).string.max_len = 512]; + // Digest of the complete authenticated provider payload or governed read + // response from which `content` was selected. + string source_payload_sha256 = 4 [(buf.validate.field).string.pattern = "^[0-9a-f]{64}$"]; + google.protobuf.Timestamp observed_at = 5; + google.protobuf.Struct content = 6; +} + +enum SurfaceInvocationControl { + SURFACE_INVOCATION_CONTROL_UNSPECIFIED = 0; + SURFACE_INVOCATION_CONTROL_WORK = 1; + SURFACE_INVOCATION_CONTROL_CANCEL = 2; +} + +// The adapter, not this request, verifies the provider-native webhook. A +// surface-edge service can normalize Slack, Linear, Jira, Salesforce, +// documents, incidents, and future providers into this one typed contract. +// Tenant scope is absent by design and is resolved through ConnectorService. +message AdmitSurfaceInvocationRequest { + string provider_id = 1 [(buf.validate.field).string.min_len = 1]; + string connection_id = 2 [(buf.validate.field).string.max_len = 512]; + string provider_app_id = 3 [(buf.validate.field).string.min_len = 1]; + string provider_workspace_id = 4 [(buf.validate.field).string.min_len = 1]; + string provider_enterprise_id = 5 [(buf.validate.field).string.max_len = 512]; + SurfaceInvocationActor actor = 6; + SurfaceInvocationTarget target = 7; + SurfaceInvocationTrigger trigger = 8; + string text = 9 [(buf.validate.field).string.max_len = 32768]; + repeated SurfaceInvocationAttachmentRef attachments = 10 [(buf.validate.field).repeated.max_items = 20]; + repeated SurfaceInvocationContextRef context_refs = 11 [(buf.validate.field).repeated.max_items = 20]; + google.protobuf.Struct projection_context = 12; + string idempotency_key = 13 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 512 + ]; + string traceparent = 14 [(buf.validate.field).string.max_len = 512]; + string tracestate = 15 [(buf.validate.field).string.max_len = 512]; + repeated SurfaceInvocationContextSnapshot context_snapshots = 16 [(buf.validate.field).repeated.max_items = 20]; + SurfaceInvocationControl control = 17 [(buf.validate.field).enum.defined_only = true]; + // Providers with a native agent/session UI may request a fast, governed + // acknowledgement projection while ordinary work continues. + bool acknowledgement_requested = 18; +} + +message AdmitSurfaceInvocationResponse { + bool accepted = 1; + bool duplicate = 2; + string ignored_reason = 3; + string conversation_id = 4; + string turn_id = 5; +} + +message ClaimNextRunRequest { + string worker_id = 1 [(buf.validate.field).string.min_len = 1]; + string worker_queue = 2; + int32 lease_seconds = 3 [(buf.validate.field).int32.gte = 0]; +} + +message ClaimNextRunResponse { + AgentRun run = 1; + AgentRunLease lease = 2; + repeated RuntimeEvent events = 3; +} + +message HeartbeatRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + int32 extend_seconds = 3 [(buf.validate.field).int32.gte = 0]; +} + +message HeartbeatRunResponse { + AgentRun run = 1; + AgentRunLease lease = 2; + RuntimeEvent event = 3; +} + +message RenewRunLeaseRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + int32 extend_seconds = 3 [(buf.validate.field).int32.gte = 0]; +} + +message RenewRunLeaseResponse { + AgentRun run = 1; + AgentRunLease lease = 2; + RuntimeEvent event = 3; + bool renewed_after_expiry = 4; +} + +message RecordRunStepRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + AgentRunStep step = 3 [(buf.validate.field).required = true]; +} + +message RecordRunStepResponse { + AgentRun run = 1; + AgentRunStep step = 2; + RuntimeEvent event = 3; +} + +message RecordRunCheckpointRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + AgentRunCheckpoint checkpoint = 3 [(buf.validate.field).required = true]; +} + +message RecordRunCheckpointResponse { + AgentRun run = 1; + AgentRunCheckpoint checkpoint = 2; + RuntimeEvent event = 3; +} + +message RecordRunArtifactRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + AgentRunArtifact artifact = 3 [(buf.validate.field).required = true]; +} + +message RecordRunArtifactResponse { + AgentRun run = 1; + AgentRunArtifact artifact = 2; + RuntimeEvent event = 3; +} + +message RecordRunCostRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + AgentRunCost cost = 3 [(buf.validate.field).required = true]; +} + +message RecordRunCostResponse { + AgentRun run = 1; + AgentRunCost cost = 2; + RuntimeEvent event = 3; +} + +message RecordRunStreamCursorRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + AgentRunStreamCursor cursor = 2 [(buf.validate.field).required = true]; +} + +message RecordRunStreamCursorResponse { + AgentRun run = 1; + AgentRunStreamCursor cursor = 2; + RuntimeEvent event = 3; +} + +message RecordRunEventRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + RuntimeEventType type = 2 [(buf.validate.field).enum.defined_only = true]; + string message = 3 [(buf.validate.field).string.min_len = 1]; + google.protobuf.Struct attributes = 4; + string step_id = 5; + string checkpoint_id = 6; + string artifact_id = 7; + string cost_id = 8; + string wait_id = 9; + RuntimeVisibilityMetadata visibility = 10; + NativeToolAttemptEvidence native_tool_attempt = 11; + NativeAgentEventEvidence native_agent_event = 12; +} + +message RecordRunEventResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message ControlRunRequest { + string run_id = 1; + string workspace_id = 2; + string agent_id = 3; + string work_envelope_id = 4; + string autonomy_session_id = 5; + RunControlMode mode = 6 [(buf.validate.field).enum.defined_only = true]; + string message = 7; + string idempotency_key = 8; + RuntimeChannelContext channel_context = 9; + google.protobuf.Struct payload = 10; + RuntimeVisibilityMetadata visibility = 11; +} + +message ControlRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; + string control_id = 3; + bool cancelled = 4; + bool queued_for_worker = 5; +} + +message RecordRunWorkItemRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + AgentWorkItem work_item = 2 [(buf.validate.field).required = true]; +} + +message RecordRunWorkItemResponse { + AgentRun run = 1; + AgentWorkItem work_item = 2; + RuntimeEvent event = 3; +} + +message UpdateRunWorkItemRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string work_item_id = 2 [(buf.validate.field).string.min_len = 1]; + AgentWorkItemState state = 3 [(buf.validate.field).enum.defined_only = true]; + optional string next_action = 4; + optional string blocker = 5; + optional string wait_id = 6; + optional string tool_execution_id = 7; + repeated string evidence_refs = 8; + optional string completion_gate = 9; + google.protobuf.Struct payload = 10; +} + +message UpdateRunWorkItemResponse { + AgentRun run = 1; + AgentWorkItem work_item = 2; + RuntimeEvent event = 3; +} + +message ListRunWorkItemsRequest { + string run_id = 1; + string workspace_id = 2; + string work_envelope_id = 3; + string autonomy_session_id = 4; + AgentWorkItemState state = 5 [(buf.validate.field).enum.defined_only = true]; + int32 limit = 6 [(buf.validate.field).int32.gte = 0]; +} + +message ListRunWorkItemsResponse { + repeated AgentWorkItem work_items = 1; +} + +message YieldRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + YieldContinuation continuation = 3 [(buf.validate.field).enum.defined_only = true]; + AgentRunCheckpoint checkpoint = 4; + google.protobuf.Timestamp resume_after = 5; + AgentRunWait wait = 6; + string presence_status_text = 7; + string idempotency_key = 8; + int32 yield_budget = 9 [(buf.validate.field).int32.gte = 0]; +} + +message YieldRunResponse { + AgentRun run = 1; + AgentRun successor_run = 2; + AgentRunWait wait = 3; + AgentRunCheckpoint checkpoint = 4; + RuntimeEvent event = 5; + RuntimeEvent presence_event = 6; + bool session_blocked = 7; + int32 yield_count = 8 [(buf.validate.field).int32.gte = 0]; +} + +message WaitRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + AgentRunWait wait = 3 [(buf.validate.field).required = true]; + AgentRunCheckpoint checkpoint = 4; +} + +message WaitRunResponse { + AgentRun run = 1; + AgentRunWait wait = 2; + AgentRunCheckpoint checkpoint = 3; + RuntimeEvent event = 4; +} + +message ResumeRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string wait_id = 2 [(buf.validate.field).string.min_len = 1]; + string resume_event_id = 3; + google.protobuf.Struct payload = 4; + codex.v1.CodexInteractionDecision codex_interaction_decision = 5; +} + +message ResumeRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message CompleteRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + google.protobuf.Struct result = 3; + AgentRunCheckpoint checkpoint = 4; +} + +message CompleteRunResponse { + AgentRun run = 1; + AgentRunCheckpoint checkpoint = 2; + RuntimeEvent event = 3; +} + +message FailRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string error_message = 3 [(buf.validate.field).string.min_len = 1]; + bool retryable = 4; + int32 retry_delay_seconds = 5 [(buf.validate.field).int32.gte = 0]; +} + +message FailRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message CancelRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string reason = 2; +} + +message CancelRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message RetryRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + int32 retry_delay_seconds = 2 [(buf.validate.field).int32.gte = 0]; + string reason = 3; +} + +message RetryRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message DeadLetterRunRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string reason = 2; +} + +message DeadLetterRunResponse { + AgentRun run = 1; + RuntimeEvent event = 2; +} + +message GetRunRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetRunResponse { + AgentRun run = 1; +} + +message GetTeammateWorkLedgerRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetTeammateWorkLedgerResponse { + TeammateWorkLedger ledger = 1; + RuntimeVirtualFile ledger_file = 2; +} + +// TeammateWorkLedger is the compact, durable read model a persistent digital +// teammate uses to resume work, explain what it has actually checked, and keep +// Slack or other human-facing channels clean while tool-heavy work happens +// under the hood. +message TeammateWorkLedger { + string schema_version = 1; + string run_id = 2; + AgentRunLinkage linkage = 3; + AgentRunState state = 4; + string objective_title = 5; + string worker_queue = 6; + int32 attempt = 7 [(buf.validate.field).int32.gte = 0]; + string work_envelope_id = 8; + string work_envelope_kind = 9; + string workstream_id = 10; + string next_action = 11; + repeated TeammateWorkLedgerBlocker blockers = 12; + repeated TeammateWorkLedgerConnectorAccess connector_access = 13; + repeated TeammateWorkLedgerMemoryCitation memory_citations = 14; + TeammateWorkLedgerVfsSummary vfs_summary = 15; + TeammateWorkLedgerCerebroContext cerebro_context = 16; + TeammateWorkLedgerProactivePolicy proactive_policy = 17; + TeammateWorkLedgerChannelStatus channel_status = 18; + repeated string evidence_paths = 19; + string handoff_policy = 20; + string resume_checkpoint_path = 21; + google.protobuf.Timestamp updated_at = 22; + int32 event_count = 23 [(buf.validate.field).int32.gte = 0]; + repeated AgentWorkItem active_work_items = 24; + int32 active_work_item_count = 25 [(buf.validate.field).int32.gte = 0]; + int32 blocked_work_item_count = 26 [(buf.validate.field).int32.gte = 0]; +} + +message TeammateWorkLedgerBlocker { + string wait_id = 1; + AgentRunWaitType type = 2; + string reason = 3; + string external_ref = 4; + google.protobuf.Timestamp resume_after = 5; + string visibility_summary = 6; + TeammateWorkLedgerWaitResumeContract resume_contract = 7; +} + +// TeammateWorkLedgerWaitResumeContract makes parked-run resumption +// machine-readable for channel adapters and workers. Slack actions can carry +// only the compact value fields, then resolve the durable wait through +// ListRunWaits before calling ResumeRun. +message TeammateWorkLedgerWaitResumeContract { + string schema_version = 1; + string resume_rpc = 2; + string lookup_rpc = 3; + string lookup_external_ref_field = 4; + repeated string required_resume_fields = 5; + repeated string allowed_decisions = 6; + repeated string channel_action_value_fields = 7; + string idempotency_join_key = 8; + string approval_request_id = 9; + bool requires_safe_summary = 10; +} + +message TeammateWorkLedgerConnectorAccess { + string mount_path = 1; + string provider_id = 2; + string connection_id = 3; + repeated string capabilities = 4; + bool grant_required = 5; + string lease_policy = 6; + string identity_mode = 7; + string credential_version_strategy = 8; + int32 secret_ref_count = 9 [(buf.validate.field).int32.gte = 0]; + repeated string credential_ref_names = 10; +} + +message TeammateWorkLedgerMemoryCitation { + string memory_id = 1; + string memory_type = 2; + string source = 3; + repeated string source_uris = 4; + string supersedes_memory_id = 5; + string superseded_by_memory_id = 6; + string review_status = 7; + repeated string entity_ids = 8; + string content_preview = 9; +} + +message TeammateWorkLedgerVfsSummary { + int32 file_count = 1 [(buf.validate.field).int32.gte = 0]; + int32 mount_count = 2 [(buf.validate.field).int32.gte = 0]; + int32 connector_mount_count = 3 [(buf.validate.field).int32.gte = 0]; + int32 memory_record_count = 4 [(buf.validate.field).int32.gte = 0]; + int32 transaction_count = 5 [(buf.validate.field).int32.gte = 0]; + int32 cerebro_index_eligible_file_count = 6 [(buf.validate.field).int32.gte = 0]; + bool has_resume_checkpoint = 7; +} + +message TeammateWorkLedgerCerebroContext { + string provider = 1; + string query = 2; + repeated string thing_ids = 3; + repeated string fact_ids = 4; + repeated string event_ids = 5; + int32 eligible_file_count = 6 [(buf.validate.field).int32.gte = 0]; +} + +message TeammateWorkLedgerProactivePolicy { + bool enabled = 1; + repeated string trigger_kinds = 2; + repeated string progress_update_triggers = 3; + string presence_policy = 4; + int32 update_budget = 5 [(buf.validate.field).int32.gte = 0]; +} + +message TeammateWorkLedgerChannelStatus { + string channel_kind = 1; + string channel_id = 2; + string thread_id = 3; + string last_visible_event_id = 4; + string last_visible_summary = 5; + AutonomyProcessingState processing_state = 6 [(buf.validate.field).enum.defined_only = true]; + string processing_summary = 7; + string processing_message_ts = 8; + string assistant_stream_ts = 9; + string last_presence_event_id = 10; + google.protobuf.Timestamp last_presence_update_at = 11; + bool final_response_pending = 12; + string autonomy_session_id = 13; +} + +message ListRunsByWorkEnvelopeRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string work_envelope_id = 2 [(buf.validate.field).string.min_len = 1]; + int32 limit = 3 [(buf.validate.field).int32.gte = 0]; +} + +message ListRunsByWorkEnvelopeResponse { + repeated AgentRun runs = 1; +} + +message ChannelThreadAdoption { + string id = 1; + string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; + string agent_id = 3 [(buf.validate.field).string.min_len = 1]; + RuntimeChannelKind channel_kind = 4 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 5; + string channel_id = 6 [(buf.validate.field).string.min_len = 1]; + string thread_id = 7 [(buf.validate.field).string.min_len = 1]; + string work_envelope_id = 8; + string first_adopted_run_id = 9; + string last_run_id = 10; + google.protobuf.Timestamp first_adopted_at = 11; + google.protobuf.Timestamp updated_at = 12; + google.protobuf.Timestamp expires_at = 13; + string last_message_id = 14; + string last_source_event_id = 15; + string last_adoption_reason = 16; + string adoption_policy = 17; + google.protobuf.Struct metadata = 18; + RuntimeChannelContext channel_context = 19; + RuntimeWorkEnvelope work_envelope = 20; + // Tenant organization that owns this adoption row. Required for shared-runtime + // isolation; storage uniqueness and list filters are organization-scoped. + string organization_id = 21 [(buf.validate.field).string.min_len = 1]; +} + +message GetChannelThreadAdoptionRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2 [(buf.validate.field).string.min_len = 1]; + RuntimeChannelKind channel_kind = 3 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 4; + string channel_id = 5 [(buf.validate.field).string.min_len = 1]; + string thread_id = 6 [(buf.validate.field).string.min_len = 1]; + bool include_expired = 7; + string organization_id = 8 [(buf.validate.field).string.min_len = 1]; +} + +message GetChannelThreadAdoptionResponse { + ChannelThreadAdoption adoption = 1; +} + +message RecordChannelThreadAdoptionRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2 [(buf.validate.field).string.min_len = 1]; + RuntimeChannelKind channel_kind = 3 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 4; + string channel_id = 5 [(buf.validate.field).string.min_len = 1]; + string thread_id = 6 [(buf.validate.field).string.min_len = 1]; + string message_id = 7; + string source_event_id = 8; + string adoption_reason = 9; + google.protobuf.Timestamp expires_at = 10; + string work_envelope_id = 11; + google.protobuf.Struct metadata = 12; + string organization_id = 13 [(buf.validate.field).string.min_len = 1]; +} + +message RecordChannelThreadAdoptionResponse { + ChannelThreadAdoption adoption = 1; +} + +message ListChannelThreadAdoptionsRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2; + RuntimeChannelKind channel_kind = 3 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 4; + string channel_id = 5; + string thread_id = 6; + string work_envelope_id = 7; + bool include_expired = 8; + int32 limit = 9 [(buf.validate.field).int32.gte = 0]; + // Organization scope for list filtering. Required so a shared Agent Runtime + // database cannot return another tenant's adoption projection for a reused + // workspace id. + string organization_id = 10 [(buf.validate.field).string.min_len = 1]; +} + +message ListChannelThreadAdoptionsResponse { + repeated ChannelThreadAdoption adoptions = 1; +} + +message ListRunWaitsRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string run_id = 2; + string agent_id = 3; + string objective_id = 4; + string work_envelope_id = 5; + AgentRunWaitState state = 6 [(buf.validate.field).enum.defined_only = true]; + AgentRunWaitType type = 7 [(buf.validate.field).enum.defined_only = true]; + RuntimeAudience audience = 8 [(buf.validate.field).enum.defined_only = true]; + int32 limit = 9 [(buf.validate.field).int32.gte = 0]; + string page_token = 10; + // external_ref filters waits by their external join key, such as an + // approvals.v1 ApprovalRequest id carried by desktop-control approval waits. + string external_ref = 11; +} + +message AgentRunWaitSummary { + string run_id = 1; + string wait_id = 2; + string workspace_id = 3; + string agent_id = 4; + string objective_id = 5; + string step_id = 6; + AgentRunWaitType type = 7; + AgentRunWaitState state = 8; + string external_ref = 9; + string reason = 10; + google.protobuf.Struct payload = 11; + google.protobuf.Timestamp created_at = 12; + google.protobuf.Timestamp resume_after = 13; + google.protobuf.Timestamp expires_at = 14; + google.protobuf.Timestamp resolved_at = 15; + string resolved_by_event_id = 16; + RuntimeVisibilityMetadata visibility = 17; + RuntimeChannelContext channel_context = 18; + RuntimeWorkEnvelope work_envelope = 19; +} + +message ListRunWaitsResponse { + repeated AgentRunWaitSummary waits = 1; + string next_page_token = 2; +} + +message RecordChannelActionReceiptRequest { + ChannelActionReceipt receipt = 1 [(buf.validate.field).required = true]; +} + +message RecordChannelActionReceiptResponse { + ChannelActionReceipt receipt = 1; + bool idempotent_replay = 2; +} + +message GetChannelActionReceiptRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetChannelActionReceiptResponse { + ChannelActionReceipt receipt = 1; +} + +message ListChannelActionReceiptsRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string idempotency_key = 2; + string actor_entity_id = 3; + ChannelActionTargetKind target_kind = 4 [(buf.validate.field).enum.defined_only = true]; + string target_id = 5; + string run_id = 6; + string wait_id = 7; + string approval_request_id = 8; + string objective_id = 9; + RuntimeChannelKind channel_kind = 10 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 11; + string channel_id = 12; + string thread_id = 13; + string message_id = 14; + string action_id = 15; + int32 limit = 16 [(buf.validate.field).int32.gte = 0]; +} + +message ListChannelActionReceiptsResponse { + repeated ChannelActionReceipt receipts = 1; +} + +message ListRunEventsRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + RuntimeAudience audience = 2 [(buf.validate.field).enum.defined_only = true]; + int32 page_size = 3 [(buf.validate.field).int32.gte = 0]; + string page_token = 4; +} + +message ListRunEventsResponse { + repeated RuntimeEvent events = 1; + string next_page_token = 2; +} + +message ListRunVirtualFilesRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string path_prefix = 2; + int32 limit = 3 [(buf.validate.field).int32.gte = 0]; + bool include_tombstones = 4; +} + +message ListRunVirtualFilesResponse { + repeated RuntimeVirtualFileEntry entries = 1; +} + +message ReadRunVirtualFileRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string path = 2 [(buf.validate.field).string.min_len = 1]; + int32 offset = 3 [(buf.validate.field).int32.gte = 0]; + int32 limit = 4 [(buf.validate.field).int32.gte = 0]; + bool include_tombstones = 5; +} + +message ReadRunVirtualFileResponse { + RuntimeVirtualFileEntry entry = 1; + string content = 2; + int32 offset = 3; + int32 next_offset = 4; + bool eof = 5; + RuntimeVirtualFileRedactionState redaction_state = 6 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 7; +} + +message StatRunVirtualFileRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string path = 2 [(buf.validate.field).string.min_len = 1]; + bool include_tombstones = 3; +} + +message StatRunVirtualFileResponse { + RuntimeVirtualFileEntry entry = 1; +} + +message WatchRunVirtualFilesRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string since_cursor = 2; + int32 limit = 3 [(buf.validate.field).int32.gte = 0]; + bool follow = 4; + RuntimeVirtualFileSelector selector = 5; +} + +message WatchRunVirtualFilesResponse { + RuntimeVirtualFileWatchEvent event = 1; +} + +message RuntimeVirtualFileWatchEvent { + string cursor = 1; + string operation = 2; + string path = 3; + string revision_id = 4; + string parent_revision_id = 5; + string transaction_id = 6; + string view = 7; + string span_id = 8; + string evidence_handle = 9; + string runtime_event_id = 10; + string artifact_id = 11; + string trace_id = 12; + string hydration_id = 13; + string promotion_id = 14; + string producer_service = 15; + string producer_kind = 16; + google.protobuf.Timestamp occurred_at = 17; + string checkpoint_id = 18; + RuntimeVirtualFileEntry entry = 19; +} + +message RuntimeVirtualFileSelector { + repeated string paths = 1; + string path_prefix = 2; + repeated string views = 3; + repeated string kinds = 4; + repeated string mounts = 5; + repeated string transaction_ids = 6; + repeated string policies = 7; + repeated string source_services = 8; + repeated string cerebro_indexes = 9; + bool include_tombstones = 10; +} + +message RuntimeVirtualFileReadResult { + string path = 1; + RuntimeVirtualFileEntry entry = 2; + string content = 3; + int32 offset = 4 [(buf.validate.field).int32.gte = 0]; + int32 next_offset = 5 [(buf.validate.field).int32.gte = 0]; + bool eof = 6; + bool skipped = 7; + string skip_reason = 8; + string citation = 9; + int32 rank = 10 [(buf.validate.field).int32.gte = 0]; + string rank_reason = 11; + RuntimeVirtualFileReasonCode reason_code = 12 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileRedactionState redaction_state = 13 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 14; +} + +message BatchReadRunVirtualFilesRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + RuntimeVirtualFileSelector selector = 2; + int32 per_file_limit = 3 [(buf.validate.field).int32.gte = 0]; + int32 total_limit = 4 [(buf.validate.field).int32.gte = 0]; + int32 limit = 5 [(buf.validate.field).int32.gte = 0]; +} + +message BatchReadRunVirtualFilesResponse { + repeated RuntimeVirtualFileReadResult files = 1; + int32 total_content_bytes = 2 [(buf.validate.field).int32.gte = 0]; + bool budget_exhausted = 3; + int32 skipped_count = 4 [(buf.validate.field).int32.gte = 0]; +} + +message BuildRunVirtualFileContextPackRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string query = 2; + RuntimeVirtualFileSelector selector = 3; + repeated string seed_paths = 4; + int32 per_file_limit = 5 [(buf.validate.field).int32.gte = 0]; + int32 total_limit = 6 [(buf.validate.field).int32.gte = 0]; + int32 limit = 7 [(buf.validate.field).int32.gte = 0]; +} + +message BuildRunVirtualFileContextPackResponse { + repeated RuntimeVirtualFileReadResult snippets = 1; + int32 total_content_bytes = 2 [(buf.validate.field).int32.gte = 0]; + bool budget_exhausted = 3; + int32 skipped_count = 4 [(buf.validate.field).int32.gte = 0]; + repeated string skipped_paths = 5; +} + +message SearchRunVirtualFilesRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string query = 2 [(buf.validate.field).string.min_len = 1]; + string path_prefix = 3; + int32 limit = 4 [(buf.validate.field).int32.gte = 0]; + RuntimeVirtualFileSelector selector = 5; + bool regex = 6; + int32 context_lines = 7 [(buf.validate.field).int32.gte = 0]; + bool case_sensitive = 8; +} + +message SearchRunVirtualFilesResponse { + repeated RuntimeVirtualFileMatch matches = 1; + int32 total_matches = 2 [(buf.validate.field).int32.gte = 0]; + bool limit_exhausted = 3; +} + +message RecordRunVirtualFileProposalRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string path = 3 [(buf.validate.field).string.min_len = 1]; + string media_type = 4; + string content = 5; + string proposal_kind = 6; + string step_id = 7; + map metadata = 8; + string idempotency_key = 9; + RuntimeSensitivity sensitivity = 10 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileRedactionState redaction_state = 11 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 12; +} + +message RecordRunVirtualFileProposalResponse { + AgentRun run = 1; + AgentRunArtifact artifact = 2; + RuntimeVirtualFile file = 3; + RuntimeEvent event = 4; +} + +message RuntimeVirtualFileChange { + string path = 1 [(buf.validate.field).string.min_len = 1]; + string media_type = 2; + string content = 3; + string proposal_kind = 4; + string step_id = 5; + map metadata = 6; + RuntimeSensitivity sensitivity = 7 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileRedactionState redaction_state = 8 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeRedaction redactions = 9; + RuntimeVirtualFileOperation operation = 10 [(buf.validate.field).enum.defined_only = true]; + string rename_from = 11; +} + +message RecordRunVirtualFileTransactionRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string transaction_id = 3; + string parent_revision_id = 4; + repeated RuntimeVirtualFileChange changes = 5; + map metadata = 6; + string idempotency_key = 7; +} + +message RecordRunVirtualFileTransactionResponse { + AgentRun run = 1; + repeated AgentRunArtifact artifacts = 2; + repeated RuntimeVirtualFile files = 3; + RuntimeEvent event = 4; +} + +message PromoteRunVirtualFileTransactionRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string transaction_id = 3 [(buf.validate.field).string.min_len = 1]; + string expected_parent_revision_id = 4; + string approver_id = 5; + map metadata = 6; +} + +message PromoteRunVirtualFileTransactionResponse { + AgentRun run = 1; + repeated AgentRunArtifact artifacts = 2; + repeated RuntimeVirtualFile files = 3; + RuntimeEvent event = 4; +} + +enum RuntimeVirtualFileTransactionApplyStatus { + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_UNSPECIFIED = 0; + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_CLEAN = 1; + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_IDENTICAL = 2; + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_CONFLICT = 3; + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_MISSING_BASE = 4; + RUNTIME_VIRTUAL_FILE_TRANSACTION_APPLY_STATUS_MISSING_TARGET = 5; +} + +enum RuntimeVirtualFileTransactionOutcome { + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_UNSPECIFIED = 0; + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_CLEAN = 1; + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_APPLIED = 2; + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_REBASED = 3; + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_CONFLICT = 4; + RUNTIME_VIRTUAL_FILE_TRANSACTION_OUTCOME_NOOP = 5; +} + +message RuntimeVirtualFileDiffHunk { + int32 old_start_line = 1 [(buf.validate.field).int32.gte = 0]; + int32 old_line_count = 2 [(buf.validate.field).int32.gte = 0]; + int32 new_start_line = 3 [(buf.validate.field).int32.gte = 0]; + int32 new_line_count = 4 [(buf.validate.field).int32.gte = 0]; + string header = 5; + string unified_diff = 6; +} + +message RuntimeVirtualFileTransactionFileDiff { + string path = 1; + RuntimeVirtualFileOperation operation = 2 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileTransactionApplyStatus apply_status = 3 [(buf.validate.field).enum.defined_only = true]; + string parent_revision_id = 4; + string base_revision_id = 5; + string current_revision_id = 6; + string proposed_revision_id = 7; + string base_content_sha256 = 8; + string current_content_sha256 = 9; + string proposed_content_sha256 = 10; + int32 additions = 11 [(buf.validate.field).int32.gte = 0]; + int32 deletions = 12 [(buf.validate.field).int32.gte = 0]; + bool binary = 13; + bool tombstone = 14; + string rename_from = 15; + string rename_to = 16; + string unified_diff = 17; + repeated RuntimeVirtualFileDiffHunk hunks = 18; +} + +message RuntimeVirtualFileTransactionConflict { + string path = 1; + RuntimeVirtualFileReasonCode reason_code = 2 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileTransactionApplyStatus apply_status = 3 [(buf.validate.field).enum.defined_only = true]; + string message = 4; + string parent_revision_id = 5; + string base_revision_id = 6; + string current_revision_id = 7; + string proposed_revision_id = 8; + repeated RuntimeVirtualFileDiffHunk hunks = 9; +} + +message RuntimeVirtualFileTransactionDiff { + string transaction_id = 1; + repeated RuntimeVirtualFileTransactionFileDiff files = 2; + string unified_diff = 3; + int32 file_count = 4 [(buf.validate.field).int32.gte = 0]; + int32 changed_file_count = 5 [(buf.validate.field).int32.gte = 0]; + int32 additions = 6 [(buf.validate.field).int32.gte = 0]; + int32 deletions = 7 [(buf.validate.field).int32.gte = 0]; + bool stale = 8; + RuntimeVirtualFileTransactionOutcome outcome = 9 [(buf.validate.field).enum.defined_only = true]; + repeated RuntimeVirtualFileTransactionConflict conflicts = 10; +} + +message DiffRunVirtualFileTransactionRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string transaction_id = 2 [(buf.validate.field).string.min_len = 1]; + int32 context_lines = 3 [(buf.validate.field).int32.gte = 0]; +} + +message DiffRunVirtualFileTransactionResponse { + RuntimeVirtualFileTransactionDiff diff = 1; +} + +message ApplyRunVirtualFileTransactionRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string transaction_id = 3 [(buf.validate.field).string.min_len = 1]; + string expected_parent_revision_id = 4; + string approver_id = 5; + map metadata = 6; + int32 context_lines = 7 [(buf.validate.field).int32.gte = 0]; +} + +message ApplyRunVirtualFileTransactionResponse { + RuntimeVirtualFileTransactionOutcome outcome = 1 [(buf.validate.field).enum.defined_only = true]; + RuntimeVirtualFileTransactionDiff diff = 2; + AgentRun run = 3; + repeated AgentRunArtifact artifacts = 4; + repeated RuntimeVirtualFile files = 5; + RuntimeEvent event = 6; +} + +message RebaseRunVirtualFileTransactionRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string source_transaction_id = 3 [(buf.validate.field).string.min_len = 1]; + string transaction_id = 4; + map metadata = 5; + string idempotency_key = 6; + int32 context_lines = 7 [(buf.validate.field).int32.gte = 0]; +} + +message RebaseRunVirtualFileTransactionResponse { + RuntimeVirtualFileTransactionOutcome outcome = 1 [(buf.validate.field).enum.defined_only = true]; + string source_transaction_id = 2; + string transaction_id = 3; + RuntimeVirtualFileTransactionDiff diff = 4; + AgentRun run = 5; + repeated AgentRunArtifact artifacts = 6; + repeated RuntimeVirtualFile files = 7; + RuntimeEvent event = 8; +} + +message HydrateRunVirtualFileMountRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; + string lease_token = 2 [(buf.validate.field).string.min_len = 1]; + string mount = 3 [(buf.validate.field).string.min_len = 1]; + string provider_id = 4; + string connection_id = 5; + string query = 6; + int32 limit = 7 [(buf.validate.field).int32.gte = 0]; + map metadata = 8; + string idempotency_key = 9; +} + +message HydrateRunVirtualFileMountResponse { + AgentRun run = 1; + repeated AgentRunArtifact artifacts = 2; + repeated RuntimeVirtualFile files = 3; + RuntimeEvent event = 4; +} + +message InspectRunVirtualFilesRequest { + string run_id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message RuntimeVirtualFileInspectorSummary { + int32 file_count = 1 [(buf.validate.field).int32.gte = 0]; + int32 mount_count = 2 [(buf.validate.field).int32.gte = 0]; + int32 transaction_count = 3 [(buf.validate.field).int32.gte = 0]; + int32 lazy_mount_count = 4 [(buf.validate.field).int32.gte = 0]; + int32 hydrated_file_count = 5 [(buf.validate.field).int32.gte = 0]; + int32 cerebro_candidate_count = 6 [(buf.validate.field).int32.gte = 0]; + int32 cerebro_ready_count = 7 [(buf.validate.field).int32.gte = 0]; + int32 accepted_file_count = 8 [(buf.validate.field).int32.gte = 0]; + int32 content_address_count = 9 [(buf.validate.field).int32.gte = 0]; + int32 hydration_cache_hit_count = 10 [(buf.validate.field).int32.gte = 0]; + int32 stale_transaction_count = 11 [(buf.validate.field).int32.gte = 0]; + int32 shadowed_file_count = 12 [(buf.validate.field).int32.gte = 0]; + int32 producer_count = 13 [(buf.validate.field).int32.gte = 0]; + int32 preview_only_file_count = 14 [(buf.validate.field).int32.gte = 0]; + int32 denied_file_count = 15 [(buf.validate.field).int32.gte = 0]; + int32 restricted_file_count = 16 [(buf.validate.field).int32.gte = 0]; + int32 tombstone_file_count = 17 [(buf.validate.field).int32.gte = 0]; + int32 delete_file_count = 18 [(buf.validate.field).int32.gte = 0]; + int32 rename_file_count = 19 [(buf.validate.field).int32.gte = 0]; +} + +message RuntimeVirtualFileInspectorMount { + string path = 1; + int32 file_count = 2 [(buf.validate.field).int32.gte = 0]; + int64 size_bytes = 3 [(buf.validate.field).int64.gte = 0]; + bool lazy = 4; + string provider_id = 5; + string connection_id = 6; + string cache_policy = 7; + string policy = 8; + string cerebro_index = 9; + int32 secret_ref_count = 10 [(buf.validate.field).int32.gte = 0]; + repeated string source_services = 11; + int32 preview_only_file_count = 12 [(buf.validate.field).int32.gte = 0]; + int32 denied_file_count = 13 [(buf.validate.field).int32.gte = 0]; + int32 restricted_file_count = 14 [(buf.validate.field).int32.gte = 0]; + repeated string capabilities = 15; + bool writable = 16; + bool read_only = 17; + bool generated = 18; + bool evidence_backed = 19; + bool externally_indexed = 20; +} + +message RuntimeVirtualFileInspectorTransaction { + string transaction_id = 1; + string view = 2; + string parent_revision_id = 3; + int32 file_count = 4 [(buf.validate.field).int32.gte = 0]; + string policy = 5; + string cerebro_index = 6; + repeated string content_addresses = 7; + int32 tombstone_file_count = 8 [(buf.validate.field).int32.gte = 0]; + int32 delete_file_count = 9 [(buf.validate.field).int32.gte = 0]; + int32 rename_file_count = 10 [(buf.validate.field).int32.gte = 0]; +} + +message RuntimeVirtualFileInspectorProducer { + string producer_service = 1; + string producer_kind = 2; + int32 file_count = 3 [(buf.validate.field).int32.gte = 0]; + int32 revision_count = 4 [(buf.validate.field).int32.gte = 0]; + repeated string runtime_event_ids = 5; + repeated string artifact_ids = 6; + repeated string step_ids = 7; + repeated string tool_execution_ids = 8; + repeated string trace_ids = 9; + repeated string hydration_ids = 10; + repeated string transaction_ids = 11; + repeated string parent_revision_ids = 12; +} + +message InspectRunVirtualFilesResponse { + RuntimeVirtualFileInspectorSummary summary = 1; + repeated RuntimeVirtualFileInspectorMount mounts = 2; + repeated RuntimeVirtualFileInspectorTransaction transactions = 3; + repeated RuntimeVirtualFileEntry entries = 4; + repeated RuntimeVirtualFileInspectorProducer producers = 5; +} + +// A provider-owned object the actor was viewing when a channel turn began. +// The edge converts Slack's polymorphic app_context JSON into this bounded +// contract; Platform may use the coordinates for governed source reads but +// must not treat them as tenant authority. +enum OperatingChannelContextEntityKind { + OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_UNSPECIFIED = 0; + OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_CHANNEL = 1; + OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_MESSAGE = 2; + OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_CANVAS = 3; + OPERATING_CHANNEL_CONTEXT_ENTITY_KIND_LIST = 4; +} + +message OperatingChannelContextEntity { + OperatingChannelContextEntityKind kind = 1 [(buf.validate.field).enum.defined_only = true]; + string provider_workspace_id = 2 [(buf.validate.field).string = { + min_len: 1 + max_len: 512 + }]; + string provider_channel_id = 3 [(buf.validate.field).string.max_len = 512]; + string provider_message_id = 4 [(buf.validate.field).string.max_len = 512]; + string provider_resource_id = 5 [(buf.validate.field).string.max_len = 512]; +} + +// Identity supplies these coordinates from its approved organization directory. +message EnsureOrganizationEmailRequest { + string organization_id = 1 [(buf.validate.field).string.min_len = 1]; + string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; +} + +message EnsureOrganizationEmailResponse { + string organization_id = 1; + string workspace_id = 2; + string mailbox = 3; + string connection_id = 4; +} diff --git a/proto/agents/v1/agents.proto b/proto/agents/v1/agents.proto new file mode 100644 index 0000000..7865401 --- /dev/null +++ b/proto/agents/v1/agents.proto @@ -0,0 +1,1055 @@ +syntax = "proto3"; + +package agents.v1; + +import "buf/validate/validate.proto"; +import "common/v1/authz.proto"; +import "common/v1/delivery.proto"; +import "common/v1/entity.proto"; +import "common/v1/risk.proto"; +import "common/v1/surface.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/evalops/platform/gen/go/agents/v1;agentsv1"; + +// AgentService manages agent definitions, versioned configuration, and +// cross-agent delegation. Every string agent_id in the platform (meter, +// objectives, approvals, governance, memory) resolves to an Agent record +// owned by this service. +service AgentService { + // Register creates a new agent definition. + rpc Register(RegisterRequest) returns (RegisterResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // Get retrieves an agent by ID. + rpc Get(GetRequest) returns (GetResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // List returns agents matching the query filters. + rpc List(ListRequest) returns (ListResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // Update modifies mutable agent metadata (name, description, surfaces). + rpc Update(UpdateRequest) returns (UpdateResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // Deregister removes an agent from the registry. + rpc Deregister(DeregisterRequest) returns (DeregisterResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + + // PushConfig creates a new immutable configuration version for an agent. + // The agent's active_config_version advances atomically. + rpc PushConfig(PushConfigRequest) returns (PushConfigResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // GetConfig retrieves a specific configuration version. + rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListConfigs returns all configuration versions for an agent. + rpc ListConfigs(ListConfigsRequest) returns (ListConfigsResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // RollbackConfig atomically reverts an agent to a prior configuration version. + rpc RollbackConfig(RollbackConfigRequest) returns (RollbackConfigResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + + // Delegate requests that another agent (or any agent with a matching + // capability) accept a unit of work. The delegation is tracked as a + // DelegationRecord and linked to the originating objective and optional + // workflow step. + rpc Delegate(DelegateRequest) returns (DelegateResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ResolveDelegation records the outcome of a delegation. + rpc ResolveDelegation(ResolveDelegationRequest) returns (ResolveDelegationResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // RenewDelegationLease records observed remote progress for an active + // delegation so reserved target capacity is not reaped while work is healthy. + rpc RenewDelegationLease(RenewDelegationLeaseRequest) returns (RenewDelegationLeaseResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + + // ControlA2ADelegationTask sends a fenced operating-plane control request to + // the remote A2A task backing a Platform delegation. This is the Platform + // control surface for steering, collecting from, interrupting, or canceling + // a remote Maestro task or one of its subagent lanes. + rpc ControlA2ADelegationTask(ControlA2ADelegationTaskRequest) returns (ControlA2ADelegationTaskResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + + // GetDelegation retrieves a delegation record by ID. + rpc GetDelegation(GetDelegationRequest) returns (GetDelegationResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // ListDelegations returns delegations matching the query filters. + rpc ListDelegations(ListDelegationsRequest) returns (ListDelegationsResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // GetA2ADelegationGraph returns the server-owned swarm graph for a remote + // A2A delegation family. Callers may anchor the graph by root delegation id + // or by any child delegation id in the lineage. + rpc GetA2ADelegationGraph(GetA2ADelegationGraphRequest) returns (GetA2ADelegationGraphResponse) { + option (common.v1.required_scopes) = "agent-registry:read"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + + // Heartbeat records agent liveness. The registry uses this to maintain + // presence state and route capability-based delegation requests. + rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse) { + option (common.v1.required_scopes) = "agent-registry:write"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } +} + +// AgentStatus describes the operational state of an agent. +enum AgentStatus { + AGENT_STATUS_UNSPECIFIED = 0; + AGENT_STATUS_ACTIVE = 1; + AGENT_STATUS_IDLE = 2; + AGENT_STATUS_BUSY = 3; + AGENT_STATUS_OFFLINE = 4; + AGENT_STATUS_DEGRADED = 5; + AGENT_STATUS_SUSPENDED = 6; +} + +// DelegationStatus describes the lifecycle state of a delegation. +enum DelegationStatus { + DELEGATION_STATUS_UNSPECIFIED = 0; + DELEGATION_STATUS_PENDING = 1; + DELEGATION_STATUS_ACCEPTED = 2; + DELEGATION_STATUS_REJECTED = 3; + DELEGATION_STATUS_COMPLETED = 4; + DELEGATION_STATUS_FAILED = 5; + DELEGATION_STATUS_TIMED_OUT = 6; +} + +// A2ADelegationTaskControlMode describes the remote task-control action that +// Platform asks the target A2A peer to apply. +enum A2ADelegationTaskControlMode { + A2A_DELEGATION_TASK_CONTROL_MODE_UNSPECIFIED = 0; + A2A_DELEGATION_TASK_CONTROL_MODE_STEER = 1; + A2A_DELEGATION_TASK_CONTROL_MODE_FOLLOWUP = 2; + A2A_DELEGATION_TASK_CONTROL_MODE_COLLECT = 3; + A2A_DELEGATION_TASK_CONTROL_MODE_INTERRUPT = 4; + A2A_DELEGATION_TASK_CONTROL_MODE_CANCEL = 5; +} + +// Agent is the canonical agent definition record. +// The id field is the value stored in every agent_id / agent string field +// across the platform: meter/v1 RecordUsageRequest.agent_id, +// objectives/v1 Objective.agent_id, approvals/v1 ApprovalRequest.agent_id, +// governance/v1 EvaluateActionRequest.agent_id, memory/v1 Memory.agent, +// and events/v1 Change.actor_id when actor_type is "agent". +message Agent { + string id = 1; + string workspace_id = 2; + string name = 3; + string description = 4; + + // agent_type aligns with identity/v1 IntrospectResponse.agent_type and + // IssueAgentTokenRequest.agent_type. Examples: "sdr", "support", "coding", + // "ops", "research". + string agent_type = 5; + + // capabilities aligns with identity/v1 IntrospectResponse.capabilities and + // IssueAgentTokenRequest.capabilities. Used by capability-based delegation + // routing. Examples: "hubspot-write", "email-send", "code-review". + repeated string capabilities = 6; + + // surfaces this agent can operate on. Aligns with the surface field in + // meter/v1, objectives/v1, approvals/v1. Examples: "ensemble", "chat", + // "maestro", "conductor", "slack". + repeated string surfaces = 7; + + AgentStatus status = 8; + int32 active_config_version = 9; + string owner_id = 10; + google.protobuf.Timestamp last_heartbeat_at = 11; + google.protobuf.Timestamp created_at = 12; + google.protobuf.Timestamp updated_at = 13; + repeated common.v1.Surface surface_types = 14 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + + // a2a is the Platform-owned discovery projection for spec-native A2A peers. + // Remote agents use it to discover where to fetch the Agent Card, which + // transport/profile is supported, and which skills can be delegated to this + // agent or its child/subagent lanes. + AgentA2APeerProjection a2a = 15; + + // capacity is the registry-owned load projection used by fleet-scale + // delegation discovery and operator read models. + AgentCapacity capacity = 16; +} + +message AgentCapacity { + int32 current = 1; + int32 max = 2; + int32 remaining = 3; + int32 reserved_delegation_count = 4; +} + +message AgentA2APeerProjection { + string public_endpoint_url = 1; + string internal_endpoint_url = 2; + string agent_card_url = 3; + string protocol_binding = 4; + string protocol_version = 5; + repeated string supported_extensions = 6; + repeated AgentA2ASkill skills = 7; + repeated string security_schemes = 8; + google.protobuf.Timestamp agent_card_observed_at = 9; + string agent_card_etag = 10; + string agent_card_hash = 11; + bool push_notifications = 12; + map attributes = 13; +} + +message AgentA2ASkill { + string id = 1; + string name = 2; + string description = 3; + repeated string tags = 4; + repeated string input_modes = 5; + repeated string output_modes = 6; + repeated string required_context_grants = 7; + string approval_policy_ref = 8; + string max_autonomy = 9; + repeated string required_artifact_kinds = 10; + repeated string optional_artifact_kinds = 11; + repeated string allowed_task_classes = 12; + repeated string denied_task_classes = 13; + map attributes = 14; +} + +// AgentConfig is an immutable snapshot of everything that shapes an agent's +// behavior. Promotion and rollback are both config version reassignments — +// the same pattern as prompts/v1 Label. +message AgentConfig { + int32 version = 1; + string agent_id = 2; + + // skill_ids reference skills/v1 Skill.id — the reusable capabilities + // this agent has loaded. + repeated string skill_ids = 3; + + // prompt_bindings maps prompt name to label (e.g., "sdr-outreach" -> "production"). + // Aligns with prompts/v1 ResolveRequest.name and ResolveRequest.label. + map prompt_bindings = 4; + + // model_preferences maps surface to preferred model identifier + // (e.g., "ensemble" -> "claude-opus-4.6"). Aligns with meter/v1 + // RecordUsageRequest.model and keys/v1 ResolveProviderRefRequest.provider. + map model_preferences = 5; + + // integration_ids reference connectors/v1 Connection.id — the external + // system connections this agent is authorized to use. + repeated string integration_ids = 6; + + // entity_type_scopes restrict which entities/v1 EntityType values this + // agent can operate on. Empty means unrestricted. + repeated string entity_type_scopes = 7; + + // max_concurrent_objectives caps the number of objectives/v1 Objective + // records this agent can hold in RUNNING or BLOCKED state simultaneously. + int32 max_concurrent_objectives = 8; + + // cost_budget_usd is the per-period spend ceiling enforced against + // meter/v1 usage records for this agent. + double cost_budget_usd = 9; + + // notification_channel specifies the preferred notifications/v1 + // DeliveryChannel for this agent's escalations. Stored as string to + // avoid cross-package import (e.g., "DELIVERY_CHANNEL_SLACK"). + string notification_channel = 10; + + // parameters holds arbitrary agent-specific tuning knobs. + google.protobuf.Struct parameters = 11; + + string author = 12; + google.protobuf.Timestamp created_at = 13; + repeated common.v1.EntityType entity_type_scope_enums = 14; + common.v1.DeliveryChannel notification_channel_enum = 15; + DigitalTeammateProfile teammate_profile = 16; +} + +// TeammateLifecycle describes whether a teammate profile can be used to +// initiate durable work. +enum TeammateLifecycle { + TEAMMATE_LIFECYCLE_UNSPECIFIED = 0; + TEAMMATE_LIFECYCLE_DRAFT = 1; + TEAMMATE_LIFECYCLE_ACTIVE = 2; + TEAMMATE_LIFECYCLE_PAUSED = 3; + TEAMMATE_LIFECYCLE_DEPRECATED = 4; +} + +// CommitmentKind describes the durable commitments a teammate can accept. +enum CommitmentKind { + COMMITMENT_KIND_UNSPECIFIED = 0; + COMMITMENT_KIND_FOLLOW_UP = 1; + COMMITMENT_KIND_WATCH = 2; + COMMITMENT_KIND_RETRY = 3; + COMMITMENT_KIND_SUMMARIZE = 4; + COMMITMENT_KIND_MONITOR = 5; + COMMITMENT_KIND_REMEDIATE = 6; + COMMITMENT_KIND_HANDOFF = 7; +} + +// InitiativeTriggerKind describes events that can let a teammate start work +// without a fresh direct human prompt. +enum InitiativeTriggerKind { + INITIATIVE_TRIGGER_KIND_UNSPECIFIED = 0; + INITIATIVE_TRIGGER_KIND_SCHEDULE = 1; + INITIATIVE_TRIGGER_KIND_SLACK_EVENT = 2; + INITIATIVE_TRIGGER_KIND_PLATFORM_EVENT = 3; + INITIATIVE_TRIGGER_KIND_OBJECTIVE_WAKE = 4; + INITIATIVE_TRIGGER_KIND_WAIT_RESOLVED = 5; + INITIATIVE_TRIGGER_KIND_EVAL_REGRESSION = 6; + INITIATIVE_TRIGGER_KIND_STALLED_WORK = 7; +} + +// AutonomyAuthority describes how independently a teammate may act. +enum AutonomyAuthority { + AUTONOMY_AUTHORITY_UNSPECIFIED = 0; + AUTONOMY_AUTHORITY_OWN = 1; + AUTONOMY_AUTHORITY_RECOMMEND = 2; + AUTONOMY_AUTHORITY_REQUIRE_APPROVAL = 3; + AUTONOMY_AUTHORITY_DENY = 4; +} + +// PresenceEvent describes channel-visible teammate activity. +enum PresenceEvent { + PRESENCE_EVENT_UNSPECIFIED = 0; + PRESENCE_EVENT_ACCEPTED = 1; + PRESENCE_EVENT_WAITING = 2; + PRESENCE_EVENT_PROGRESS = 3; + PRESENCE_EVENT_BLOCKED = 4; + PRESENCE_EVENT_COMPLETED = 5; + PRESENCE_EVENT_FAILED = 6; + PRESENCE_EVENT_ESCALATED = 7; +} + +// TeammateChannelKind identifies a product or provider channel that can ingest +// user activity or render teammate runtime events. It intentionally lives in +// agents/v1 instead of agentruntime/v1 so teammate profiles can describe +// supported channels without creating a proto import cycle. +enum TeammateChannelKind { + TEAMMATE_CHANNEL_KIND_UNSPECIFIED = 0; + TEAMMATE_CHANNEL_KIND_SLACK = 1; + TEAMMATE_CHANNEL_KIND_EMAIL = 2; + TEAMMATE_CHANNEL_KIND_CALENDAR = 3; + TEAMMATE_CHANNEL_KIND_JIRA = 4; + TEAMMATE_CHANNEL_KIND_TEAMS = 5; + TEAMMATE_CHANNEL_KIND_WEB = 6; + TEAMMATE_CHANNEL_KIND_WEBHOOK = 7; + TEAMMATE_CHANNEL_KIND_WHATSAPP = 8; + TEAMMATE_CHANNEL_KIND_APPLE_MESSAGES = 9; +} + +// TeammateChannelCapability describes what a channel adapter can do for a +// teammate profile. +enum TeammateChannelCapability { + TEAMMATE_CHANNEL_CAPABILITY_UNSPECIFIED = 0; + TEAMMATE_CHANNEL_CAPABILITY_INGEST = 1; + TEAMMATE_CHANNEL_CAPABILITY_RENDER = 2; +} + +// TeammateChannelEventKind describes normalized inbound channel events that can +// become AgentRuntime triggers. +enum TeammateChannelEventKind { + TEAMMATE_CHANNEL_EVENT_KIND_UNSPECIFIED = 0; + TEAMMATE_CHANNEL_EVENT_KIND_MESSAGE_CREATED = 1; + TEAMMATE_CHANNEL_EVENT_KIND_THREAD_REPLY_CREATED = 2; + TEAMMATE_CHANNEL_EVENT_KIND_COMMAND_INVOKED = 3; + TEAMMATE_CHANNEL_EVENT_KIND_ACTION_INVOKED = 4; + TEAMMATE_CHANNEL_EVENT_KIND_REACTION_ADDED = 5; + TEAMMATE_CHANNEL_EVENT_KIND_REACTION_REMOVED = 6; + TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_STARTED = 7; + TEAMMATE_CHANNEL_EVENT_KIND_ASSISTANT_THREAD_CONTEXT_CHANGED = 8; + TEAMMATE_CHANNEL_EVENT_KIND_EMAIL_RECEIVED = 9; + TEAMMATE_CHANNEL_EVENT_KIND_CALENDAR_EVENT_CHANGED = 10; + TEAMMATE_CHANNEL_EVENT_KIND_ISSUE_CHANGED = 11; + TEAMMATE_CHANNEL_EVENT_KIND_SCHEDULED_WAKE = 12; + TEAMMATE_CHANNEL_EVENT_KIND_WEBHOOK_RECEIVED = 13; +} + +// TeammateRuntimeRenderEventKind describes Platform runtime events a channel +// adapter can project back into the provider surface. +enum TeammateRuntimeRenderEventKind { + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_UNSPECIFIED = 0; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TRIGGER_ACCEPTED = 1; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RUN_STARTED = 2; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_PROGRESS = 3; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_STARTED = 4; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_STEP_COMPLETED = 5; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_OBJECTIVE_UPDATED = 6; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_REQUESTED = 7; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_APPROVAL_RESOLVED = 8; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_PROPOSED = 9; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_TOOL_COMPLETED = 10; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_ARTIFACT_CREATED = 11; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_MEMORY_PROPOSED = 12; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_WAITING = 13; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_RESUMED = 14; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_COMPLETED = 15; + TEAMMATE_RUNTIME_RENDER_EVENT_KIND_FAILED = 16; +} + +// DigitalTeammateProfile is the versioned contract for how an AgentConfig acts +// as a durable teammate across objectives, workflows, tools, memory, evals, and +// Slack or other delivery surfaces. +message DigitalTeammateProfile { + string id = 1; + int32 version = 2; + string workspace_id = 3; + string agent_id = 4; + + string display_name = 5; + string role = 6; + string purpose = 7; + string owner_user_id = 8; + string owner_team_id = 9; + + repeated common.v1.Surface surface_types = 10 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + TeammateLifecycle lifecycle = 11 [(buf.validate.field).enum.defined_only = true]; + + repeated TeammateResponsibility responsibilities = 12; + CommitmentPolicy commitment_policy = 13; + InitiativePolicy initiative_policy = 14; + AutonomyPolicy autonomy_policy = 15; + MemoryPolicy memory_policy = 16; + PresencePolicy presence_policy = 17; + OutputPolicy output_policy = 18; + EvalPolicy eval_policy = 19; + EscalationPolicy escalation_policy = 20; + + map labels = 21; + google.protobuf.Struct parameters = 22; + google.protobuf.Timestamp created_at = 23; + google.protobuf.Timestamp updated_at = 24; + repeated TeammateChannelManifest channel_manifests = 25; +} + +// TeammateChannelManifest describes one channel adapter supported by a +// teammate profile. Durable execution remains owned by AgentRuntime; this +// manifest lets product surfaces declare the provider-specific ingress and +// rendering coverage they can project. +message TeammateChannelManifest { + TeammateChannelKind kind = 1 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string label = 2; + common.v1.DeliveryChannel delivery_channel = 3 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + common.v1.Surface platform_surface = 4 [(buf.validate.field).enum.defined_only = true]; + string channel_id = 5; + repeated TeammateChannelCapability capabilities = 6 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + repeated TeammateChannelEventKind inbound_events = 7 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + repeated TeammateRuntimeRenderEventKind runtime_events = 8 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + map attributes = 9; +} + +// TeammateResponsibility binds a role claim to capabilities, entities, prompts, +// skills, and measurable outcomes. +message TeammateResponsibility { + string id = 1; + string title = 2; + string description = 3; + repeated string capability_refs = 4; + repeated common.v1.EntityType owned_entity_types = 5 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + repeated string default_skill_ids = 6; + repeated string prompt_names = 7; + repeated string success_metric_refs = 8; +} + +// CommitmentPolicy describes which durable objectives and wakes can be created +// from teammate commitments. +message CommitmentPolicy { + repeated CommitmentKind allowed_kinds = 1 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + repeated CommitmentTemplate templates = 2; + int32 default_due_seconds = 3 [(buf.validate.field).int32.gte = 0]; + int32 max_open_commitments = 4 [(buf.validate.field).int32.gte = 0]; + bool require_objective_for_commitment = 5; +} + +// CommitmentTemplate maps a commitment kind to objective and wake templates. +message CommitmentTemplate { + CommitmentKind kind = 1 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string objective_title_template = 2; + string objective_description_template = 3; + string wake_reason_template = 4; + repeated string required_join_keys = 5; +} + +// InitiativePolicy describes bounded conditions where a teammate can start or +// resume work proactively. +message InitiativePolicy { + repeated InitiativeTrigger triggers = 1; + int32 max_initiated_runs_per_day = 2 [(buf.validate.field).int32.gte = 0]; + bool require_human_seed = 3; +} + +// InitiativeTrigger binds a proactive trigger to workflow or objective state. +message InitiativeTrigger { + InitiativeTriggerKind kind = 1 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string trigger_ref = 2; + string filter_expr = 3; + string workflow_definition_id = 4; + string objective_template_id = 5; +} + +// AutonomyPolicy describes the default authority and specific action rules +// that ToolExecution, Governance, and Approvals can enforce. +message AutonomyPolicy { + repeated AutonomyRule rules = 1; + AutonomyAuthority default_authority = 2 [(buf.validate.field).enum.defined_only = true]; + common.v1.RiskLevel max_risk_without_approval = 3 [(buf.validate.field).enum.defined_only = true]; +} + +// AutonomyRule constrains a class of actions or tool capabilities. +message AutonomyRule { + string action_type = 1; + string tool_capability = 2; + common.v1.RiskLevel max_risk = 3 [(buf.validate.field).enum.defined_only = true]; + AutonomyAuthority authority = 4 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string approval_policy_ref = 5; + string governance_policy_ref = 6; + string rationale = 7; +} + +// MemoryPolicy describes what a teammate may recall or propose remembering. +message MemoryPolicy { + repeated string allowed_scope_refs = 1; + bool allow_user_memory = 2; + bool allow_team_memory = 3; + bool allow_agent_memory = 4; + bool require_review_for_new_memory = 5; + int32 default_retention_days = 6 [(buf.validate.field).int32.gte = 0]; + repeated string required_source_types = 7; + bool allow_cross_channel_recall = 8; +} + +// PresencePolicy describes how a teammate reports work back to Slack or other +// delivery channels. +message PresencePolicy { + common.v1.DeliveryChannel primary_channel = 1 [(buf.validate.field).enum.defined_only = true]; + string primary_channel_id = 2; + string default_thread_policy = 3; + int32 progress_update_interval_seconds = 4 [(buf.validate.field).int32.gte = 0]; + repeated PresenceEvent visible_events = 5 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + bool post_action_receipts = 6; + bool post_blocker_updates = 7; +} + +// OutputPolicy describes durable work products and channel-safe renderings. +message OutputPolicy { + repeated string required_artifact_kinds = 1; + repeated string optional_artifact_kinds = 2; + bool render_channel_cards = 3; + string default_visibility = 4; +} + +// EvalPolicy binds production behavior to loop and eval scoring. +message EvalPolicy { + repeated EvalBinding bindings = 1; + string loop_definition_id = 2; + int32 production_sample_rate_basis_points = 3 [(buf.validate.field).int32 = { + gte: 0 + lte: 10000 + }]; +} + +// EvalBinding describes one score that should gate or monitor teammate quality. +message EvalBinding { + string suite_name = 1; + string metric_name = 2; + double minimum_score = 3; + string failure_action = 4; +} + +// EscalationPolicy describes who must be contacted when the teammate blocks or +// needs approval. +message EscalationPolicy { + repeated string approver_user_ids = 1; + repeated string approver_team_ids = 2; + int32 escalate_after_seconds = 3 [(buf.validate.field).int32.gte = 0]; + common.v1.DeliveryChannel fallback_channel = 4 [(buf.validate.field).enum.defined_only = true]; +} + +// DelegationRecord tracks a typed hand-off between agents. The from_agent_id +// creates an objective (objectives/v1) or references a workflow step +// (workflows/v1 StepRun) and delegates execution to another agent resolved +// by ID or by capability through the registry. +message DelegationRecord { + string id = 1; + string workspace_id = 2; + string from_agent_id = 3; + string to_agent_id = 4; + string required_capability = 5; + + // objective_id links to the objectives/v1 Objective created for this + // delegated unit of work. + string objective_id = 6; + + // workflow_run_id and workflow_step_id link to workflows/v1 when this + // delegation occurs within a workflow execution. + string workflow_run_id = 7; + string workflow_step_id = 8; + + DelegationStatus status = 9; + bytes context_payload = 10; + bytes result_payload = 11; + string reason = 12; + string error_message = 13; + google.protobuf.Timestamp created_at = 14; + google.protobuf.Timestamp resolved_at = 15; + string a2a_task_id = 16; + string a2a_message_id = 17; + string a2a_endpoint_url = 18; + string a2a_dispatch_status = 19; + string a2a_dispatch_error = 20; + string a2a_skill_id = 21; + + // a2a_dispatched_at is the server time when the remote A2A task was first + // accepted by the target transport. + google.protobuf.Timestamp a2a_dispatched_at = 22; + + // a2a_lease_renewed_at is the last server time Platform observed remote A2A + // progress for this delegation. + google.protobuf.Timestamp a2a_lease_renewed_at = 23; + + // a2a_resume_wait_contracts are server-derived contracts that an origin + // runtime can use to park the parent run on typed remote A2A callback events + // after the target transport accepts the delegation. + repeated google.protobuf.Struct a2a_resume_wait_contracts = 24; + + // a2a_root_delegation_id identifies the root Platform delegation in an A2A + // swarm chain. Root delegations use their own delegation id. + string a2a_root_delegation_id = 25; + + // a2a_parent_delegation_id identifies the immediate parent Platform + // delegation when this record was spawned by another remote A2A worker. + string a2a_parent_delegation_id = 26; + + // a2a_delegation_chain is the ordered Platform delegation lineage from root + // to this delegation. + repeated string a2a_delegation_chain = 27; +} + +// --------------------------------------------------------------------------- +// RPC request/response messages +// --------------------------------------------------------------------------- + +message RegisterRequest { + string workspace_id = 1; + string name = 2; + string description = 3; + string agent_type = 4; + repeated string capabilities = 5 [(buf.validate.field).repeated.min_items = 1]; + repeated string surfaces = 6; + string owner_id = 7; + string id = 8; + repeated common.v1.Surface surface_types = 9 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + AgentA2APeerProjection a2a = 10; +} + +message RegisterResponse { + Agent agent = 1; +} + +message GetRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetResponse { + Agent agent = 1; +} + +message ListRequest { + string workspace_id = 1; + string agent_type = 2; + string capability = 3; + string surface = 4; + AgentStatus status = 5; + int32 limit = 6 [(buf.validate.field).int32 = { + gte: 0 + lte: 200 + }]; + int32 offset = 7 [(buf.validate.field).int32.gte = 0]; + common.v1.Surface surface_type = 8 [(buf.validate.field).enum.defined_only = true]; + // A2A skill ID required for fleet-scale delegation discovery. + string a2a_skill_id = 9; + // Task class that must be allowed by the matched peer or skill policy. + string task_class = 10; + // Require peers to expose a dispatchable A2A HTTP+JSON endpoint. + bool require_a2a_dispatch = 11; + // Use delegation-eligible discovery semantics even when only generic filters are supplied. + bool eligible_for_delegation = 12; +} + +message ListResponse { + repeated Agent agents = 1; + int32 total = 2; + AgentDiscoveryEvidence discovery_evidence = 3; +} + +// AgentDiscoveryEvidence is the safe, operator-auditable explanation for an +// A2A/delegation discovery query. It intentionally carries identifiers, +// counts, and policy labels, not task payloads or customer content. +message AgentDiscoveryEvidence { + string schema = 1; + string decision = 2; + string reason = 3; + string workspace_id = 4; + string capability = 5; + repeated string capabilities = 6; + string agent_type = 7; + string a2a_skill_id = 8; + string task_class = 9; + bool require_a2a_dispatch = 10; + string surface = 11; + string status = 12; + int32 candidate_count = 13; + int32 matched_count = 14; + repeated AgentDiscoveryExclusion exclusions = 15; +} + +// AgentDiscoveryExclusion summarizes why candidates did not appear in the +// discovery result. Samples are agent ids only, capped by the server. +message AgentDiscoveryExclusion { + string reason = 1; + int32 count = 2; + repeated string sample_agent_ids = 3; + repeated string policy_reasons = 4; + repeated string policy_scopes = 5; + repeated string allowed_task_classes = 6; + repeated string denied_task_classes = 7; +} + +message UpdateRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; + string name = 2; + string description = 3; + repeated string capabilities = 4; + repeated string surfaces = 5; + repeated common.v1.Surface surface_types = 6 [(buf.validate.field).repeated.items.enum = { + defined_only: true + not_in: [0] + }]; + AgentA2APeerProjection a2a = 7; +} + +message UpdateResponse { + Agent agent = 1; +} + +message DeregisterRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; + string reason = 2; +} + +message DeregisterResponse {} + +message PushConfigRequest { + string agent_id = 1 [(buf.validate.field).string.min_len = 1]; + repeated string skill_ids = 2; + map prompt_bindings = 3; + map model_preferences = 4; + repeated string integration_ids = 5; + repeated string entity_type_scopes = 6; + int32 max_concurrent_objectives = 7; + double cost_budget_usd = 8; + string notification_channel = 9; + google.protobuf.Struct parameters = 10; + string author = 11; + repeated common.v1.EntityType entity_type_scope_enums = 12; + common.v1.DeliveryChannel notification_channel_enum = 13; + DigitalTeammateProfile teammate_profile = 14; +} + +message PushConfigResponse { + AgentConfig config = 1; + Agent agent = 2; +} + +message GetConfigRequest { + string agent_id = 1 [(buf.validate.field).string.min_len = 1]; + int32 version = 2 [(buf.validate.field).int32.gt = 0]; +} + +message GetConfigResponse { + AgentConfig config = 1; +} + +message ListConfigsRequest { + string agent_id = 1 [(buf.validate.field).string.min_len = 1]; + int32 limit = 2 [(buf.validate.field).int32 = { + gte: 0 + lte: 200 + }]; + int32 offset = 3 [(buf.validate.field).int32.gte = 0]; +} + +message ListConfigsResponse { + repeated AgentConfig configs = 1; + int32 total = 2; + bool has_more = 3; +} + +message RollbackConfigRequest { + string agent_id = 1 [(buf.validate.field).string.min_len = 1]; + int32 target_version = 2 [(buf.validate.field).int32.gt = 0]; + string actor = 3; + string reason = 4; +} + +message RollbackConfigResponse { + AgentConfig config = 1; + Agent agent = 2; +} + +message DelegateRequest { + string from_agent_id = 1 [(buf.validate.field).string.min_len = 1]; + // Specify to_agent_id for direct delegation, or required_capability for + // capability-based routing through the registry. + string to_agent_id = 2; + string required_capability = 3; + string objective_id = 4; + string workflow_run_id = 5; + string workflow_step_id = 6; + bytes context_payload = 7; + string reason = 8; + string a2a_skill_id = 9; +} + +message DelegateResponse { + DelegationRecord delegation = 1; +} + +message ResolveDelegationRequest { + string delegation_id = 1 [(buf.validate.field).string.min_len = 1]; + DelegationStatus status = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + bytes result_payload = 3; + string error_message = 4; +} + +message ResolveDelegationResponse { + DelegationRecord delegation = 1; +} + +message RenewDelegationLeaseRequest { + string delegation_id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message RenewDelegationLeaseResponse { + DelegationRecord delegation = 1; +} + +message ControlA2ADelegationTaskRequest { + string delegation_id = 1 [(buf.validate.field).string.min_len = 1]; + A2ADelegationTaskControlMode mode = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string message = 3; + string idempotency_key = 4; + + // Optional target selectors allow Platform callers to control a remote + // subagent lane or child run while still fencing the command by the root + // remote task id stored on the delegation. + string target_run_id = 5; + string child_run_id = 6; + string subagent_lane_id = 7; + string work_item_id = 8; + google.protobuf.Struct payload = 9; + google.protobuf.Struct metadata = 10; +} + +message A2ADelegationTaskControlResult { + string task_id = 1; + string state = 2; + string control_id = 3; + string control_mode = 4; + bool cancelled = 5; + bool queued_for_worker = 6; + string parent_task_id = 7; + string target_run_id = 8; + string applied_run_id = 9; + bool target_external = 10; + string subagent_lane_id = 11; + string work_item_id = 12; + google.protobuf.Timestamp observed_at = 13; + bool raw_payload_withheld = 14; +} + +message ControlA2ADelegationTaskResponse { + DelegationRecord delegation = 1; + A2ADelegationTaskControlResult remote_task = 2; +} + +message GetDelegationRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetDelegationResponse { + DelegationRecord delegation = 1; +} + +message ListDelegationsRequest { + string workspace_id = 1; + string from_agent_id = 2; + string to_agent_id = 3; + DelegationStatus status = 4; + string workflow_run_id = 5; + int32 limit = 6; + int32 offset = 7; + // A2A remote task id returned by the target peer. + string a2a_task_id = 8; + // A2A message id used for dispatch/callback correlation. + string a2a_message_id = 9; + // A2A skill id requested for the delegation. + string a2a_skill_id = 10; + // A2A transport dispatch status recorded by Platform. + string a2a_dispatch_status = 11; + // Root Platform delegation id for a remote A2A swarm chain. + string a2a_root_delegation_id = 12; + // Immediate parent Platform delegation id for a remote A2A swarm chain. + string a2a_parent_delegation_id = 13; + // Limit results to delegations that have A2A transport or swarm lineage. + bool a2a_only = 14; +} + +message ListDelegationsResponse { + repeated DelegationRecord delegations = 1; + int32 total = 2; +} + +message GetA2ADelegationGraphRequest { + string workspace_id = 1; + // Root Platform delegation id for the swarm graph. + string root_delegation_id = 2; + // Any Platform delegation id in the swarm graph. If provided without + // root_delegation_id, the server derives the root from recorded lineage. + string delegation_id = 3; + // Maximum child depth to return from the root. Zero means no depth limit. + int32 max_depth = 4 [(buf.validate.field).int32 = { + gte: 0 + lte: 100 + }]; + // Maximum graph nodes to return. Zero uses the server default. + int32 limit = 5 [(buf.validate.field).int32 = { + gte: 0 + lte: 1000 + }]; +} + +message A2ADelegationGraphNode { + DelegationRecord delegation = 1; + int32 depth = 2; + int32 child_count = 3; + bool terminal = 4; +} + +message A2ADelegationGraphEdge { + string parent_delegation_id = 1; + string child_delegation_id = 2; +} + +message GetA2ADelegationGraphResponse { + string root_delegation_id = 1; + repeated A2ADelegationGraphNode nodes = 2; + repeated A2ADelegationGraphEdge edges = 3; + int32 total = 4; + bool truncated = 5; + repeated string missing_parent_delegation_ids = 6; +} + +message HeartbeatRequest { + string agent_id = 1 [(buf.validate.field).string.min_len = 1]; + AgentStatus status = 2; + // current_objective_ids lists the objectives/v1 Objective.id values this + // agent currently holds. Used for capacity-aware delegation routing. + repeated string current_objective_ids = 3; + string surface = 4; + common.v1.Surface surface_type = 5 [(buf.validate.field).enum.defined_only = true]; + AgentA2APeerProjection a2a = 6; +} + +message HeartbeatResponse { + google.protobuf.Timestamp next_heartbeat_by = 1; +} diff --git a/proto/codex/v1/codex.proto b/proto/codex/v1/codex.proto new file mode 100644 index 0000000..8eb4c0d --- /dev/null +++ b/proto/codex/v1/codex.proto @@ -0,0 +1,387 @@ +syntax = "proto3"; + +package codex.v1; + +option go_package = "github.com/evalops/platform/gen/go/codex/v1;codexv1"; + +import "buf/validate/validate.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +// CodexActionType describes the user intent that should shape prompting, +// permissions, routing, and output expectations for a Codex run. +enum CodexActionType { + CODEX_ACTION_TYPE_UNSPECIFIED = 0; + CODEX_ACTION_TYPE_START_WORK = 1; + CODEX_ACTION_TYPE_FOLLOW_UP = 2; + CODEX_ACTION_TYPE_INVESTIGATE = 3; + CODEX_ACTION_TYPE_FIX = 4; + CODEX_ACTION_TYPE_REVIEW = 5; + CODEX_ACTION_TYPE_TEST = 6; + CODEX_ACTION_TYPE_EXPLAIN = 7; + CODEX_ACTION_TYPE_RETRY = 8; + CODEX_ACTION_TYPE_FORK = 9; +} + +// CodexBackend identifies the execution backend selected for a run. +enum CodexBackend { + CODEX_BACKEND_UNSPECIFIED = 0; + CODEX_BACKEND_APP_SERVER = 1; + CODEX_BACKEND_CODEX_SDK = 2; + CODEX_BACKEND_CLAUDE_CODE = 3; + CODEX_BACKEND_INTERNAL_AGENT = 4; + CODEX_BACKEND_MODEL_TRIAGE = 5; +} + +// CodexExecutionIntent captures the expected risk and write profile. +enum CodexExecutionIntent { + CODEX_EXECUTION_INTENT_UNSPECIFIED = 0; + CODEX_EXECUTION_INTENT_READ_ONLY_DIAGNOSIS = 1; + CODEX_EXECUTION_INTENT_PATCH_AND_VERIFY = 2; + CODEX_EXECUTION_INTENT_REVIEW_ONLY = 3; + CODEX_EXECUTION_INTENT_TEST_AUTHORING = 4; + CODEX_EXECUTION_INTENT_EXPLANATION = 5; +} + +// CodexInteractivityMode controls how much of the run is projected back to a +// human conversation surface. +enum CodexInteractivityMode { + CODEX_INTERACTIVITY_MODE_UNSPECIFIED = 0; + CODEX_INTERACTIVITY_MODE_BACKGROUND = 1; + CODEX_INTERACTIVITY_MODE_THREAD_CONVERSATION = 2; + CODEX_INTERACTIVITY_MODE_HUMAN_APPROVAL_GATED = 3; +} + +// CodexAuthorityScope is the maximum local filesystem authority requested for +// delegated work. Platform policy, device mappings, and native confirmation +// may only narrow this value. +enum CodexAuthorityScope { + CODEX_AUTHORITY_SCOPE_UNSPECIFIED = 0; + CODEX_AUTHORITY_SCOPE_DISCUSS_ONLY = 1; + CODEX_AUTHORITY_SCOPE_READ_ONLY = 2; + CODEX_AUTHORITY_SCOPE_WORKSPACE_WRITE = 3; +} + +// CodexVerificationStatus records whether the bounded result was verified. +enum CodexVerificationStatus { + CODEX_VERIFICATION_STATUS_UNSPECIFIED = 0; + CODEX_VERIFICATION_STATUS_NOT_RUN = 1; + CODEX_VERIFICATION_STATUS_PASSED = 2; + CODEX_VERIFICATION_STATUS_FAILED = 3; + CODEX_VERIFICATION_STATUS_PARTIAL = 4; +} + +// CodexGitState records the repository state without embedding branch prose. +enum CodexGitState { + CODEX_GIT_STATE_UNSPECIFIED = 0; + CODEX_GIT_STATE_UNCHANGED = 1; + CODEX_GIT_STATE_DIRTY = 2; + CODEX_GIT_STATE_COMMITTED = 3; +} + +// CodexInteractionType describes a channel-native control action. +enum CodexInteractionType { + CODEX_INTERACTION_TYPE_UNSPECIFIED = 0; + CODEX_INTERACTION_TYPE_APPROVE_PLAN = 1; + CODEX_INTERACTION_TYPE_REJECT_PLAN = 2; + CODEX_INTERACTION_TYPE_APPLY_PATCH = 3; + CODEX_INTERACTION_TYPE_DISCARD_PATCH = 4; + CODEX_INTERACTION_TYPE_STOP_TURN = 5; + CODEX_INTERACTION_TYPE_RETRY_TURN = 6; + CODEX_INTERACTION_TYPE_FORK_THREAD = 7; + CODEX_INTERACTION_TYPE_APPROVE_COMMAND = 8; + CODEX_INTERACTION_TYPE_PROVIDE_INPUT = 9; +} + +// CodexContextSourceKind names a structured context source enriched before a +// run reaches the worker. +enum CodexContextSourceKind { + CODEX_CONTEXT_SOURCE_KIND_UNSPECIFIED = 0; + CODEX_CONTEXT_SOURCE_KIND_SLACK_MESSAGE = 1; + CODEX_CONTEXT_SOURCE_KIND_SLACK_THREAD = 2; + CODEX_CONTEXT_SOURCE_KIND_GITHUB_PULL_REQUEST = 3; + CODEX_CONTEXT_SOURCE_KIND_GITHUB_ISSUE = 4; + CODEX_CONTEXT_SOURCE_KIND_LINEAR_TICKET = 5; + CODEX_CONTEXT_SOURCE_KIND_JIRA_TICKET = 6; + CODEX_CONTEXT_SOURCE_KIND_SENTRY_EVENT = 7; + CODEX_CONTEXT_SOURCE_KIND_DATADOG_DASHBOARD = 8; + CODEX_CONTEXT_SOURCE_KIND_LOG_SNIPPET = 9; + CODEX_CONTEXT_SOURCE_KIND_SCREENSHOT = 10; + CODEX_CONTEXT_SOURCE_KIND_MEMORY = 11; + CODEX_CONTEXT_SOURCE_KIND_URL = 12; + CODEX_CONTEXT_SOURCE_KIND_CEREBRO_THING = 13; + CODEX_CONTEXT_SOURCE_KIND_CEREBRO_FACT = 14; + CODEX_CONTEXT_SOURCE_KIND_CEREBRO_EVENT = 15; + CODEX_CONTEXT_SOURCE_KIND_CEREBRO_ACTION = 16; + CODEX_CONTEXT_SOURCE_KIND_CEREBRO_PREDICTION = 17; + CODEX_CONTEXT_SOURCE_KIND_GRANOLA_MEETING = 18; + CODEX_CONTEXT_SOURCE_KIND_GOOGLE_EMAIL_THREAD = 19; + CODEX_CONTEXT_SOURCE_KIND_GOOGLE_DRIVE_FILE = 20; + CODEX_CONTEXT_SOURCE_KIND_GOOGLE_CALENDAR_EVENT = 21; + CODEX_CONTEXT_SOURCE_KIND_DEPLOYMENT = 22; + CODEX_CONTEXT_SOURCE_KIND_BUILD = 23; +} + +// CodexMemoryScopeKind identifies the retrieval scope for prior run memory. +enum CodexMemoryScopeKind { + CODEX_MEMORY_SCOPE_KIND_UNSPECIFIED = 0; + CODEX_MEMORY_SCOPE_KIND_THREAD = 1; + CODEX_MEMORY_SCOPE_KIND_REPOSITORY = 2; + CODEX_MEMORY_SCOPE_KIND_TEAM = 3; + CODEX_MEMORY_SCOPE_KIND_WORKSPACE = 4; +} + +// CodexOutputKind classifies an artifact or external object the run should +// create or synchronize. +enum CodexOutputKind { + CODEX_OUTPUT_KIND_UNSPECIFIED = 0; + CODEX_OUTPUT_KIND_THREAD_MESSAGE = 1; + CODEX_OUTPUT_KIND_PULL_REQUEST = 2; + CODEX_OUTPUT_KIND_PULL_REQUEST_COMMENT = 3; + CODEX_OUTPUT_KIND_ARTIFACT = 4; + CODEX_OUTPUT_KIND_RUN_PANEL = 5; + CODEX_OUTPUT_KIND_EVALUATION_EXAMPLE = 6; + CODEX_OUTPUT_KIND_DRAFT_MESSAGE = 7; + CODEX_OUTPUT_KIND_DECISION_BRIEF = 8; + CODEX_OUTPUT_KIND_PREPARED_FUTURE = 9; + CODEX_OUTPUT_KIND_ISSUE = 10; +} + +// CodexProgressStage classifies user-visible run progress. +enum CodexProgressStage { + CODEX_PROGRESS_STAGE_UNSPECIFIED = 0; + CODEX_PROGRESS_STAGE_ACCEPTED = 1; + CODEX_PROGRESS_STAGE_CONTEXT_ENRICHING = 2; + CODEX_PROGRESS_STAGE_PLANNING = 3; + CODEX_PROGRESS_STAGE_WAITING_FOR_APPROVAL = 4; + CODEX_PROGRESS_STAGE_EDITING = 5; + CODEX_PROGRESS_STAGE_TESTING = 6; + CODEX_PROGRESS_STAGE_CREATING_OUTPUT = 7; + CODEX_PROGRESS_STAGE_WATCHING_CI = 8; + CODEX_PROGRESS_STAGE_COMPLETED = 9; + CODEX_PROGRESS_STAGE_FAILED = 10; + CODEX_PROGRESS_STAGE_CANCELLED = 11; +} + +// CodexConversationRef carries durable session coordinates across turns. +message CodexConversationRef { + string session_id = 1; + string app_server_thread_id = 2; + string previous_run_id = 3; + string parent_run_id = 4; + string followup_to_turn_id = 5; + string channel_thread_id = 6; + string channel_message_id = 7; + bool keep_session_alive = 8; + map attributes = 9; +} + +// CodexRoutingPolicy captures backend and worker selection. +message CodexRoutingPolicy { + CodexBackend backend = 1; + string worker_queue = 2; + string model_tier = 3; + string preferred_agent_id = 4; + map attributes = 5; +} + +// CodexBudgetPolicy defines per-run resource limits. +message CodexBudgetPolicy { + int64 max_input_tokens = 1 [(buf.validate.field).int64.gte = 0]; + int64 max_output_tokens = 2 [(buf.validate.field).int64.gte = 0]; + int64 max_total_tokens = 3 [(buf.validate.field).int64.gte = 0]; + int64 max_cost_micros = 4 [(buf.validate.field).int64.gte = 0]; + int32 max_run_seconds = 5 [(buf.validate.field).int32.gte = 0]; + int32 max_tool_calls = 6 [(buf.validate.field).int32.gte = 0]; + int32 max_retries = 7 [(buf.validate.field).int32.gte = 0]; +} + +// CodexApprovalPolicy captures governance controls before a worker performs +// write, network, or otherwise sensitive operations. +message CodexApprovalPolicy { + bool dry_run = 1; + bool allow_writes = 2; + bool require_plan_approval = 3; + bool require_patch_approval = 4; + bool require_command_approval = 5; + repeated string protected_path_globs = 6; + repeated string approver_entity_ids = 7; + repeated string network_egress_allowlist = 8; + bool scrub_secrets_from_outputs = 9; + string sandbox_mode = 10; + map attributes = 11; +} + +// CodexContextItem is a single enriched context object available to the run. +message CodexContextItem { + CodexContextSourceKind source_kind = 1; + string id = 2; + string uri = 3; + string title = 4; + string text = 5; + string content_type = 6; + string digest = 7; + map attributes = 8; +} + +// CodexMemoryScope describes what prior run knowledge should be retrieved. +message CodexMemoryScope { + CodexMemoryScopeKind kind = 1; + string key = 2; + int32 retention_days = 3 [(buf.validate.field).int32.gte = 0]; + map attributes = 4; +} + +// CodexOutputTarget describes a desired or produced external output. +message CodexOutputTarget { + CodexOutputKind kind = 1; + string id = 2; + string uri = 3; + string title = 4; + bool draft = 5; + map attributes = 6; +} + +// CodexPreparedFutureRef ties a Codex run to the reviewable next move it is +// preparing. It is a grouping contract, not an approval or execution grant. +message CodexPreparedFutureRef { + string prepared_future_id = 1; + string cerebro_action_id = 2; + string cerebro_prediction_id = 3; + repeated string cerebro_fact_ids = 4; + repeated string source_record_ids = 5; + repeated string artifact_ids = 6; + repeated string approval_request_ids = 7; + string evidence_uri = 8; + string source_health = 9; + string risk_level = 10; + map attributes = 11; +} + +// CodexWorkRequest is the typed payload for Slack, GitHub, Linear, CLI, IDE, +// and monitoring-triggered Codex work. +message CodexWorkRequest { + option (buf.validate.message).cel = { + id: "codex.v1.work_request.resource_id_not_local_absolute" + message: "resource_id must not be an absolute local path" + expression: "this.resource_id == '' || (!this.resource_id.startsWith('/') && !this.resource_id.startsWith('\\\\') && !this.resource_id.matches('^[A-Za-z]:[/\\\\\\\\].*') && !this.resource_id.matches('^[A-Za-z][A-Za-z0-9+.-]*:[A-Za-z]:.*'))" + }; + + CodexActionType action_type = 1; + CodexExecutionIntent execution_intent = 2; + string prompt = 3; + string repo = 4; + string cwd = 5; + string branch = 6; + string base_branch = 7; + string tenant_id = 8; + string reason = 9; + CodexConversationRef conversation = 10; + CodexRoutingPolicy routing = 11; + CodexBudgetPolicy budget = 12; + CodexApprovalPolicy approval_policy = 13; + CodexInteractivityMode interactivity_mode = 14; + repeated CodexContextItem context_items = 15; + repeated CodexOutputTarget desired_outputs = 16; + repeated CodexMemoryScope memory_scopes = 17; + map attributes = 18; + CodexPreparedFutureRef prepared_future = 19; + // Stable Platform resource identity. Local absolute paths are forbidden, + // including drive-root forms after local schemes (e.g. file:C:/Windows). + string resource_id = 20 [(buf.validate.field).string = { + max_len: 512 + pattern: "^$|^[^/\\\\:][^\\\\:]*$|^[A-Za-z][A-Za-z0-9+.-]+:([^A-Za-z/\\\\][^\\\\]*|[A-Za-z]([^:\\\\][^\\\\]*)?)$" + }]; + CodexAuthorityScope requested_authority = 21 [(buf.validate.field).enum.defined_only = true]; +} + +// CodexWorkResult is the bounded, channel-safe completion projection for a +// delegated Codex run. changed_files are relative to resource_id's mapped root. +message CodexWorkResult { + option (buf.validate.message).cel = { + id: "codex.v1.work_result.changed_files_workspace_relative" + message: "changed_files entries must be normalized workspace-relative paths" + expression: "this.changed_files.all(path, path != '' && !path.startsWith('/') && !path.contains('\\\\') && !path.matches('^[A-Za-z]:.*') && !path.matches('(^|/)\\\\.{1,2}(/|$)') && !path.contains('//') && !path.endsWith('/'))" + }; + + string outcome = 1 [(buf.validate.field).string = {min_len: 1, max_len: 256}]; + string summary = 2 [(buf.validate.field).string = {min_len: 1, max_len: 8192}]; + repeated string findings = 3 [ + (buf.validate.field).repeated.max_items = 64, + (buf.validate.field).repeated.items.string.max_len = 1024 + ]; + repeated string changed_files = 4 [ + (buf.validate.field).repeated.max_items = 256, + (buf.validate.field).repeated.items.string = { + max_len: 1024 + pattern: "^([^./\\\\:][^/\\\\:]*|\\.[^./\\\\:][^/\\\\:]*|\\.\\.[^/\\\\:][^/\\\\:]*)(/([^./\\\\:][^/\\\\:]*|\\.[^./\\\\:][^/\\\\:]*|\\.\\.[^/\\\\:][^/\\\\:]*))*$" + } + ]; + repeated string tests_run = 5 [ + (buf.validate.field).repeated.max_items = 128, + (buf.validate.field).repeated.items.string.max_len = 2048 + ]; + CodexVerificationStatus verification_status = 6 [(buf.validate.field).enum.defined_only = true]; + repeated string evidence_refs = 7 [ + (buf.validate.field).repeated.max_items = 128, + (buf.validate.field).repeated.items.string.max_len = 2048 + ]; + string owner_input_required = 8 [(buf.validate.field).string.max_len = 2048]; + string codex_thread_id = 9 [(buf.validate.field).string.max_len = 256]; + CodexGitState git_state = 10 [(buf.validate.field).enum.defined_only = true]; +} + +// CodexInteractionRequest describes a pending human decision projected to a +// channel surface. +message CodexInteractionRequest { + CodexInteractionType interaction_type = 1; + string run_id = 2; + string wait_id = 3; + string step_id = 4; + string artifact_id = 5; + string patch_id = 6; + string prompt = 7; + repeated string choices = 8; + google.protobuf.Struct payload = 9; + google.protobuf.Timestamp expires_at = 10; + map attributes = 11; +} + +// CodexInteractionDecision captures the user's response to a Codex control. +message CodexInteractionDecision { + CodexInteractionType interaction_type = 1; + string decision = 2; + string reason = 3; + string actor_entity_id = 4; + string selected_choice = 5; + google.protobuf.Struct payload = 6; + map attributes = 7; +} + +// CodexRunProgress is the compact, user-visible progress projection. +message CodexRunProgress { + CodexProgressStage stage = 1; + string safe_summary = 2; + int32 progress_percent = 3 [(buf.validate.field).int32 = { gte: 0, lte: 100 }]; + int32 files_read = 4 [(buf.validate.field).int32.gte = 0]; + int32 files_changed = 5 [(buf.validate.field).int32.gte = 0]; + int32 commands_run = 6 [(buf.validate.field).int32.gte = 0]; + int64 input_tokens = 7 [(buf.validate.field).int64.gte = 0]; + int64 output_tokens = 8 [(buf.validate.field).int64.gte = 0]; + int64 estimated_cost_micros = 9 [(buf.validate.field).int64.gte = 0]; + google.protobuf.Timestamp updated_at = 10; + map attributes = 11; +} + +// CodexOutcomeSignal feeds evaluation and routing loops after the run. +message CodexOutcomeSignal { + string run_id = 1; + string pull_request_url = 2; + bool merged = 3; + bool reverted = 4; + bool human_edited = 5; + string channel_reaction = 6; + string review_outcome = 7; + google.protobuf.Timestamp observed_at = 8; + map attributes = 9; +} diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index 68cfc26..d7fb929 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -113,6 +113,15 @@ service ConnectorService { option (common.v1.risk_level) = RISK_LEVEL_LOW; } + // EnrollSurfaceTarget selects one exact provider object for background + // observation. Provider-specific adapters verify current read access before + // a durable target is created; this call never grants connector authority. + rpc EnrollSurfaceTarget(EnrollSurfaceTargetRequest) returns (EnrollSurfaceTargetResponse) { + option (common.v1.required_scopes) = "connectors:write"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } rpc VerifyConnectionActive(VerifyConnectionActiveRequest) returns (VerifyConnectionActiveResponse) { option (common.v1.required_scopes) = "connectors:connection-active:verify"; option (common.v1.organization_scope_field) = "organization_id"; @@ -391,6 +400,47 @@ message ResolveProviderInstallationResponse { ProviderInstallation installation = 2; } +message EnrollSurfaceTargetRequest { + string organization_id = 1 [(buf.validate.field).string = { + min_len: 1 + max_len: 256 + }]; + string workspace_id = 2 [(buf.validate.field).string = { + min_len: 1 + max_len: 256 + }]; + string connection_id = 3 [(buf.validate.field).string = { + min_len: 1 + max_len: 256 + }]; + string provider_id = 4 [(buf.validate.field).string = { + min_len: 1 + max_len: 128 + }]; + string target_kind = 5 [(buf.validate.field).string = { + min_len: 1 + max_len: 64 + }]; + string external_id = 6 [(buf.validate.field).string = { + min_len: 1 + max_len: 1024 + }]; + string canonical_url = 7 [(buf.validate.field).string.max_len = 4096]; + string idempotency_key = 8 [(buf.validate.field).string = { + min_len: 1 + max_len: 256 + }]; +} + +message EnrollSurfaceTargetResponse { + string connection_id = 1; + string provider_id = 2; + string target_kind = 3; + string external_id = 4; + string state = 5; + bool idempotent_replay = 6; +} + message VerifyConnectionActiveRequest { string organization_id = 1 [(buf.validate.field).string.min_len = 1]; string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; @@ -501,6 +551,11 @@ message ConnectorRuntime { // inventory here. Named `provider_actions` instead of connectors-rs's // `actions` -- see the naming-debt note at the top of this file. repeated ConnectorActionDefinition provider_actions = 10; + // Optional DNS suffix constraints for credential-bearing destinations whose + // hostname is supplied by connection configuration. Hosts must equal a + // suffix or be its dot-delimited subdomain; ports, IP literals, userinfo, + // trailing dots, and encoded lookalikes are rejected before auth resolves. + repeated string credential_destination_host_suffixes = 11; } // ConnectorActionDefinition declares one provider-native operation. @@ -524,6 +579,9 @@ message ConnectorActionDefinition { string effect = 13; // Catalog-owned tool metadata. Presence does not grant execution authority. ConnectorGovernedAction governed = 14; + // This action may be emitted by a registered object-surface projector. + // Presence is descriptive only; installation authority is still required. + bool surface_projection = 15; } // ConnectorGovernedAction preserves published tool descriptions, schemas, and @@ -1091,6 +1149,15 @@ message InitiateOAuthFlowRequest { // Optional GitHub organization or username with this App already installed. // Selects user OAuth instead of new installation; never grants tenant access. string github_existing_account = 6; + // Selects the provider identity represented by the resulting token. The + // app actor is currently supported only by Linear agent installations. + OAuthActorMode actor_mode = 7; +} + +enum OAuthActorMode { + O_AUTH_ACTOR_MODE_UNSPECIFIED = 0; + O_AUTH_ACTOR_MODE_USER = 1; + O_AUTH_ACTOR_MODE_APP = 2; } message InitiateOAuthFlowResponse { diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 13c3c8e..5758a6e 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package console.v1; +import "agentruntime/v1/runtime.proto"; import "buf/validate/validate.proto"; import "common/v1/authz.proto"; import "common/v1/classification.proto"; @@ -3846,6 +3847,14 @@ message OperatingRunDispatch { OperatingTaskEnvironmentBinding task_environment = 27; // Authenticated actor whose tenant-scoped task binding admitted this dispatch. string actor_id = 28 [(buf.validate.field).string.min_len = 1]; + // Provider-neutral object identity retained from the admitted surface. It + // groups retries and follow-ups by durable provider object without granting + // any tool or connector authority. + agentruntime.v1.RuntimeWorkEnvelope work_envelope = 29; + // Bounded, edge-authenticated provider context retained with the dispatch + // and sent to Maestro on every replay. It contains provenance-bearing + // surface snapshots, never provider credentials. + google.protobuf.Struct surface_context = 30; } // Immutable task identity admitted from authenticated actor and tenant/channel scope. diff --git a/proto/objectives/v1/objectives.proto b/proto/objectives/v1/objectives.proto new file mode 100644 index 0000000..02d2c80 --- /dev/null +++ b/proto/objectives/v1/objectives.proto @@ -0,0 +1,399 @@ +syntax = "proto3"; + +package objectives.v1; + +import "buf/validate/validate.proto"; +import "common/v1/authz.proto"; +import "common/v1/surface.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/evalops/platform/gen/go/objectives/v1;objectivesv1"; + +// ObjectiveService manages agent objectives and their lifecycle. +service ObjectiveService { + rpc Create(CreateRequest) returns (CreateResponse) { + option (common.v1.required_scopes) = "objectives:write"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc Get(GetRequest) returns (GetResponse) { + option (common.v1.required_scopes) = "objectives:read"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc Transition(TransitionRequest) returns (TransitionResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc Wake(WakeRequest) returns (WakeResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc ScheduleWake(ScheduleWakeRequest) returns (ScheduleWakeResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc Query(QueryRequest) returns (QueryResponse) { + option (common.v1.required_scopes) = "objectives:read"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc RecordProvenance(RecordProvenanceRequest) returns (RecordProvenanceResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc RecordMutation(RecordMutationRequest) returns (RecordMutationResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc GetGovernanceEvaluation(GetGovernanceEvaluationRequest) returns (GetGovernanceEvaluationResponse) { + option (common.v1.required_scopes) = "objectives:read"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc Cancel(CancelRequest) returns (CancelResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc AppendTurn(AppendTurnRequest) returns (AppendTurnResponse) { + option (common.v1.required_scopes) = "objectives:write"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc RunStep(RunStepRequest) returns (RunStepResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + rpc WaitForEvent(WaitForEventRequest) returns (WaitForEventResponse) { + option (common.v1.required_scopes) = "objectives:write"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc ListTurns(ListTurnsRequest) returns (ListTurnsResponse) { + option (common.v1.required_scopes) = "objectives:read"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + rpc QueryTurns(QueryTurnsRequest) returns (QueryTurnsResponse) { + option (common.v1.required_scopes) = "objectives:read"; + option (common.v1.organization_scope_field) = "organization_id"; + option (common.v1.workspace_scope_field) = "workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } +} + +// ObjectiveState describes the lifecycle state of an objective. +enum ObjectiveState { + OBJECTIVE_STATE_UNSPECIFIED = 0; + OBJECTIVE_STATE_PENDING = 1; + OBJECTIVE_STATE_RUNNING = 2; + OBJECTIVE_STATE_BLOCKED = 3; + OBJECTIVE_STATE_DEGRADED = 4; + OBJECTIVE_STATE_AWAITING_APPROVAL = 5; + OBJECTIVE_STATE_QUEUED = 6; + OBJECTIVE_STATE_COMPLETED = 7; + OBJECTIVE_STATE_FAILED = 8; + OBJECTIVE_STATE_CANCELLED = 9; +} + +// MutationStatus describes the status of a mutation operation. +enum MutationStatus { + MUTATION_STATUS_UNSPECIFIED = 0; + MUTATION_STATUS_PENDING = 1; + MUTATION_STATUS_APPROVED = 2; + MUTATION_STATUS_DENIED = 3; + MUTATION_STATUS_EXECUTED = 4; + MUTATION_STATUS_ROLLED_BACK = 5; +} + +// TurnKind identifies the durable work represented by an objective turn. +enum TurnKind { + TURN_KIND_UNSPECIFIED = 0; + TURN_KIND_USER_MESSAGE = 1; + TURN_KIND_LLM_CALL = 2; + TURN_KIND_TOOL_CALL = 3; + TURN_KIND_APPROVAL_WAIT = 4; + TURN_KIND_SLEEP = 5; + TURN_KIND_EVENT_WAIT = 6; +} + +// TurnStatus describes replayable execution state for a journaled turn. +enum TurnStatus { + TURN_STATUS_UNSPECIFIED = 0; + TURN_STATUS_PENDING = 1; + TURN_STATUS_RUNNING = 2; + TURN_STATUS_COMPLETED = 3; + TURN_STATUS_FAILED = 4; + TURN_STATUS_REPLAY = 5; +} + +// Objective is the canonical agent objective record. +message Objective { + string id = 1; + string workspace_id = 2; + string agent_id = 3; + string surface = 4; + string title = 5; + string description = 6; + ObjectiveState state = 7; + repeated ProvenanceRecord provenance = 8; + repeated MutationRecord mutations = 9; + WakeSchedule wake_schedule = 10; + google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp updated_at = 12; + common.v1.Surface surface_type = 13 [(buf.validate.field).enum.defined_only = true]; + string idempotency_key = 14; + string organization_id = 15; +} + +// ProvenanceRecord tracks where data came from. +message ProvenanceRecord { + string source_integration = 1; + string source_id = 2; + int32 freshness_seconds = 3; + float confidence = 4; +} + +// MutationRecord tracks a write operation performed by an objective. +message MutationRecord { + string target_integration = 1; + string operation = 2; + MutationStatus status = 3; + string approval_id = 4; +} + +// WakeSchedule defines when and how an objective should be reactivated. +message WakeSchedule { + google.protobuf.Timestamp wake_at = 1; + string reason = 2; + int32 retry_count = 3; + int32 max_retries = 4; + int32 backoff_seconds = 5; +} + +// Turn is the per-objective replay journal used by agent sessions. +message Turn { + string id = 1; + string objective_id = 2; + int32 sequence = 3; + TurnKind kind = 4; + google.protobuf.Any payload = 5; + google.protobuf.Any result = 6; + TurnStatus status = 7; + google.protobuf.Timestamp started_at = 8; + google.protobuf.Timestamp completed_at = 9; + string idempotency_key = 10; +} + +message WaitForEventPayload { + string event_subject = 1; + google.protobuf.Any payload = 2; +} + +message CreateRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2; + string surface = 3; + string title = 4 [(buf.validate.field).string.min_len = 1]; + string description = 5; + common.v1.Surface surface_type = 6 [(buf.validate.field).enum.defined_only = true]; + string idempotency_key = 7; + repeated ProvenanceRecord provenance = 8; + string organization_id = 9; +} + +message CreateResponse { + Objective objective = 1; +} + +message GetRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetResponse { + Objective objective = 1; +} + +message TransitionRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; + ObjectiveState state = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string reason = 3; +} + +message TransitionResponse { + Objective objective = 1; +} + +message WakeRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message WakeResponse { + Objective objective = 1; +} + +message ScheduleWakeRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; + WakeSchedule wake_schedule = 2 [(buf.validate.field).required = true]; + // State to hold until wake_at is due. If unspecified, the service uses BLOCKED. + ObjectiveState state = 3 [(buf.validate.field).enum.defined_only = true]; +} + +message ScheduleWakeResponse { + Objective objective = 1; +} + +message QueryRequest { + string workspace_id = 1 [(buf.validate.field).string.min_len = 1]; + string agent_id = 2; + ObjectiveState state = 3; + int32 limit = 4 [(buf.validate.field).int32.lte = 200]; + int32 offset = 5 [(buf.validate.field).int32.gte = 0]; + string organization_id = 6; +} + +message QueryResponse { + repeated Objective objectives = 1; + int32 total = 2; +} + +message RecordProvenanceRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + ProvenanceRecord provenance = 2 [(buf.validate.field).required = true]; +} + +message RecordProvenanceResponse { + Objective objective = 1; +} + +message RecordMutationRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + MutationRecord mutation = 2 [(buf.validate.field).required = true]; +} + +message RecordMutationResponse { + Objective objective = 1; +} + +message GetGovernanceEvaluationRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; +} + +message GetGovernanceEvaluationResponse { + string objective_id = 1; + bool compliant = 2; + repeated string violations = 3; +} + +message CancelRequest { + string id = 1 [(buf.validate.field).string.min_len = 1]; + string reason = 2; +} + +message CancelResponse { + Objective objective = 1; +} + +message AppendTurnRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + TurnKind kind = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + google.protobuf.Any payload = 3; + string idempotency_key = 4; + int32 sequence = 5 [(buf.validate.field).int32.gte = 0]; + google.protobuf.Any result = 6; + TurnStatus status = 7 [(buf.validate.field).enum.defined_only = true]; + string organization_id = 8; + string workspace_id = 9; +} + +message AppendTurnResponse { + Turn turn = 1; + bool replayed = 2; +} + +message RunStepRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + string idempotency_key = 2 [(buf.validate.field).string.min_len = 1]; + TurnKind kind = 3 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + google.protobuf.Any payload = 4; + google.protobuf.Any result = 5; +} + +message RunStepResponse { + Turn turn = 1; + bool replayed = 2; +} + +message WaitForEventRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + string idempotency_key = 2; + string event_subject = 3 [(buf.validate.field).string.min_len = 1]; + google.protobuf.Any payload = 4; +} + +message WaitForEventResponse { + Turn turn = 1; + bool replayed = 2; +} + +message ListTurnsRequest { + string objective_id = 1 [(buf.validate.field).string.min_len = 1]; + int32 limit = 2 [(buf.validate.field).int32.lte = 200]; + int32 offset = 3 [(buf.validate.field).int32.gte = 0]; + string organization_id = 4; + string workspace_id = 5; +} + +message ListTurnsResponse { + repeated Turn turns = 1; + int32 total = 2; +} + +message ObjectiveTurn { + Objective objective = 1; + Turn turn = 2; +} + +message QueryTurnsRequest { + string organization_id = 1; + string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; + string agent_id = 3; + int32 limit = 4 [ + (buf.validate.field).int32.gte = 0, + (buf.validate.field).int32.lte = 200 + ]; + int32 offset = 5 [(buf.validate.field).int32.gte = 0]; + string payload_channel_id = 6; + bool omit_total = 7; +} + +message QueryTurnsResponse { + repeated ObjectiveTurn turns = 1; + int32 total = 2 [(buf.validate.field).int32.gte = 0]; +} diff --git a/scripts/distribution-validation.mjs b/scripts/distribution-validation.mjs index 9cc6486..13c5b1b 100644 --- a/scripts/distribution-validation.mjs +++ b/scripts/distribution-validation.mjs @@ -6,14 +6,27 @@ import { join, relative, resolve } from "node:path"; import { pathToFileURL } from "node:url"; import { parseArgs } from "node:util"; -const NAMES = new Set(["endpoint", "private-runner", "private-deployment", "api", "examples", "plugins"]); +const NAMES = new Set(["endpoint", "private-runner", "private-deployment", "api", "examples", "plugins", "capobara"]); const SHA = /^[0-9a-f]{40}$/; const HEX = /^[0-9a-f]{64}$/; +// `toolDigest` is the one provenance field with two legitimate shapes. Node +// hashes the contents of its own TOOL_INPUTS script list, giving a 64-hex +// SHA-256; Capobara embeds the git tree id of `rust/tools/capobara`, giving a +// 40-hex object name. Both are valid "the tool that ran this matches the tool +// committed at this revision" proofs, and the Rust side's +// `git::is_tree_id_or_digest` accepts both widths for exactly this reason -- +// this predicate is its twin and must stay in step with it. A receipt written +// by either implementation has to validate here, or a clone of +// `dx-corp/capobara` fails `invalid provenance toolDigest` against a +// perfectly correct tree. +const TOOL_DIGEST = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/; const PROTO = [ + "agentruntime/v1/runtime.proto", "agents/v1/agents.proto", "codex/v1/codex.proto", "common/v1/analytics.proto", "common/v1/authz.proto", "common/v1/classification.proto", - "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", "common/v1/surface.proto", - "connectors/v1/connectors.proto", "console/v1/console.proto", "deixic/v1/deixic.proto", - "memory/v1/memory.proto", "meter/v1/meter.proto", "orbcontrol/v1/orb_control.proto", + "common/v1/delivery.proto", "common/v1/entity.proto", "common/v1/risk.proto", + "common/v1/surface.proto", "connectors/v1/connectors.proto", "console/v1/console.proto", + "deixic/v1/deixic.proto", "memory/v1/memory.proto", "meter/v1/meter.proto", + "objectives/v1/objectives.proto", "orbcontrol/v1/orb_control.proto", "platform/v1/platform.proto", "remoterunner/v1/remoterunner.proto", "toolexecution/v1/toolexecution.proto", "traces/v1/traces.proto", "vfs/v1/filesystem.proto", ].sort(); @@ -82,7 +95,8 @@ export async function validateProvenance(name, root) { requireValue(provenance.projection === name && provenance.sourceRepository === "dx-corp/mono" && provenance.destinationRepository === `dx-corp/${name}`, "projection provenance identity mismatch"); requireValue(SHA.test(provenance.sourceSha) && SHA.test(provenance.priorProjectedBase), "projection SHAs are invalid"); - for (const key of ["definitionDigest", "toolDigest", "contentDigest"]) requireValue(HEX.test(provenance[key]), `invalid provenance ${key}`); + for (const key of ["definitionDigest", "contentDigest"]) requireValue(HEX.test(provenance[key]), `invalid provenance ${key}`); + requireValue(TOOL_DIGEST.test(provenance.toolDigest), "invalid provenance toolDigest"); requireValue(typeof provenance.publicationEligible === "boolean", "invalid publication eligibility"); return provenance; } @@ -244,6 +258,47 @@ async function validatePlugins(root, files) { for (const path of files) requireValue(!/(?:prompt-audit|session-history|product-kit)/i.test(path), `private plugin surface: ${path}`); } +// `capobara` is admitted here like every other catalog entry: `validate.mjs` +// admits any name the catalog holds, and the `sync` job validates every +// prepared projection between Capobara's dry run and its real run, so a +// catalog entry with no validator here fails its publication on +// `unsupported distribution: capobara`. +// +// The compile proof for the projected crate lives in the crate's own +// `tests/standalone_build.rs`, which copies it out of the workspace and runs +// `cargo build --locked`. Repeating that here would add a full dependency +// build to every catalog verification, so this checks the standalone +// closure without compiling: the manifest, the crate-root lockfile and the +// single-package workspace that the projection has to produce, plus the +// internal surfaces it must not carry. +async function validateCapobara(root, files) { + for (const required of ["Cargo.toml", "Cargo.lock", "README.md", "build.rs", "src/main.rs", "src/lib.rs"]) { + requireValue(files.includes(required), `capobara is missing ${required}`); + } + for (const path of files) { + requireValue(!/^scripts\//.test(path), `capobara contains an internal surface: ${path}`); + requireValue(!/^tests\/fixtures\/definitions\//.test(path), `capobara contains an excluded fixture: ${path}`); + } + const manifest = await readFile(join(root, "Cargo.toml"), "utf8"); + requireValue(!/\bworkspace\s*=\s*true/.test(manifest), "capobara Cargo.toml still inherits from the Mono workspace"); + // Resolution must include dependencies here: with `--no-deps` nothing is + // resolved, so `--locked` has nothing to compare and a stale lockfile + // passes. With the full graph, `--locked` fails when the projected + // crate-root lockfile does not match the projected manifest, which is the + // failure this projection is most exposed to -- the standalone lockfile is + // generated separately from the workspace one and can go stale without any + // Mono build noticing. + // + // This resolves all 178 locked packages, so on a cold runner it fetches the + // crates.io index and downloads every `.crate`. That is a network-dependent + // step in the component's CI gate; the component already declares `rust` in + // `ci.test.tools`, and nothing cheaper discriminates (see above). + const metadata = JSON.parse(run("cargo", ["metadata", "--locked", "--format-version", "1"], root)); + requireValue(metadata.workspace_members.length === 1, "capobara standalone workspace gained a member"); + const member = metadata.packages.find(pkg => pkg.id === metadata.workspace_members[0]); + requireValue(member?.name === "capobara", "capobara standalone workspace member is not the crate"); +} + export async function validateDistribution({ name, target }) { requireValue(NAMES.has(name), `unsupported distribution: ${name}`); const root = resolve(target); @@ -252,7 +307,7 @@ export async function validateDistribution({ name, target }) { await validateProvenance(name, root); const validators = { endpoint: validateEndpoint, "private-runner": validateRunner, "private-deployment": validateDeployment, - api: validateApi, examples: validateExamples, plugins: validatePlugins, + api: validateApi, examples: validateExamples, plugins: validatePlugins, capobara: validateCapobara, }; await validators[name](root, files); return { name, target: root, files: files.length, valid: true }; From b3a0310d8e70b2c8678d24d8e14166ce200c817b Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Sun, 20 Sep 2026 22:53:39 +0000 Subject: [PATCH 06/18] chore: project api from Mono cc1e1c0a4251 --- .repository-projection.json | 6 +++--- openapi/connectors/v1/connectors.openapi.yaml | 7 +++++++ proto/connectors/v1/connectors.proto | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 972a9e3..5a64df3 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "a2e8b231b208f9e30b0a115eb132176e1e7c301a", + "sourceSha": "cc1e1c0a42519977b42d956cc61e4624197a33e8", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "892fea89dc5649ef151a2869eaecbdc681ac0dce", + "priorProjectedBase": "efea36a7ee8e544eedd3cf72f7518541646f34a8", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", - "contentDigest": "ece7654c0f907952dbd746834bf20050cbf828677d4b2637b54bd7e86dce8e53", + "contentDigest": "837881ae666635d2dcd286a4230d6660915214cc1621664b0cce39589ebb17d4", "publicationEligible": true } diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index 22dba8f..1da62a4 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -3287,6 +3287,13 @@ components: Selects the provider identity represented by the resulting token. The app actor is currently supported only by Linear agent installations. $ref: '#/components/schemas/connectors.v1.OAuthActorMode' + actorLinkConnectionId: + type: string + title: actor_link_connection_id + description: |- + Existing connection whose provider actor should be privately linked to + the authenticated Deixic principal. This runs user OAuth only, verifies + the provider subject, and never replaces the connection's credentials. title: InitiateOAuthFlowRequest additionalProperties: false connectors.v1.InitiateOAuthFlowResponse: diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index d7fb929..81e2c7c 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -1152,6 +1152,10 @@ message InitiateOAuthFlowRequest { // Selects the provider identity represented by the resulting token. The // app actor is currently supported only by Linear agent installations. OAuthActorMode actor_mode = 7; + // Existing connection whose provider actor should be privately linked to + // the authenticated Deixic principal. This runs user OAuth only, verifies + // the provider subject, and never replaces the connection's credentials. + string actor_link_connection_id = 8; } enum OAuthActorMode { From 86523c3089cc7371d85c97a56572760680e50a25 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 00:26:24 +0000 Subject: [PATCH 07/18] chore: project api from Mono 9b559bc70e7d --- .repository-projection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repository-projection.json b/.repository-projection.json index 5a64df3..25df348 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,7 +3,7 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "cc1e1c0a42519977b42d956cc61e4624197a33e8", + "sourceSha": "9b559bc70e7d8afc723d2ac67c8c62fe0cfbdeeb", "destinationRepository": "dx-corp/api", "priorProjectedBase": "efea36a7ee8e544eedd3cf72f7518541646f34a8", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", From aff3c56ab88c134502572eadff3cec0df6434e3e Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 01:11:59 +0000 Subject: [PATCH 08/18] chore: project api from Mono 78799bd5ae75 --- .repository-projection.json | 6 +- openapi/console/v1/console.openapi.yaml | 123 ++++++++++++++++++ openapi/deixic/v1/deixic.openapi.yaml | 120 +++++++++++++++++ .../v1/toolexecution.openapi.yaml | 62 +++++++++ proto/console/v1/console.proto | 46 +++++++ proto/toolexecution/v1/toolexecution.proto | 31 +++++ 6 files changed, 385 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 25df348..71a3849 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9b559bc70e7d8afc723d2ac67c8c62fe0cfbdeeb", + "sourceSha": "78799bd5ae75fdb86a0e0f8a56b5ce891fe42e71", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "efea36a7ee8e544eedd3cf72f7518541646f34a8", + "priorProjectedBase": "f42198abd128f1e1624d7d1468c12655644805f9", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", - "contentDigest": "837881ae666635d2dcd286a4230d6660915214cc1621664b0cce39589ebb17d4", + "contentDigest": "f7b9283b21f4fbd1865623fee48f517eb5d2f4cb77ab5551131fd2343c7a23e8", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index a4e6f15..e3d75d7 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -9591,6 +9591,29 @@ components: - OPERATING_SURFACE_KIND_WHATSAPP - OPERATING_SURFACE_KIND_APPLE_MESSAGES - OPERATING_SURFACE_KIND_EMAIL + console.v1.OperatingTaskEnvironmentStageKind: + type: string + title: OperatingTaskEnvironmentStageKind + enum: + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_UNSPECIFIED + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_SOURCE + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PREPARATION + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PROVISIONING + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_NETWORK + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_EXECUTION + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_RETAINED_STATE + console.v1.OperatingTaskEnvironmentStageState: + type: string + title: OperatingTaskEnvironmentStageState + enum: + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNSPECIFIED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_NOT_REQUIRED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_ABSENT + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_PENDING + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_READY + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_FAILED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_RETAINED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNKNOWN console.v1.OperatingTaskKind: type: string title: OperatingTaskKind @@ -18756,6 +18779,14 @@ components: type: integer title: retention_hours format: int32 + stages: + type: array + items: + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStage' + title: stages + workspaceRecipe: + title: workspace_recipe + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' title: GetOperatingTaskEnvironmentResponse additionalProperties: false console.v1.GetOperatingThreadRequest: @@ -24261,9 +24292,33 @@ components: - 8 - 168 - 720 + workspaceRecipe: + title: workspace_recipe + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' title: OperatingTaskEnvironmentBinding additionalProperties: false description: Immutable task identity admitted from authenticated actor and tenant/channel scope. + console.v1.OperatingTaskEnvironmentStage: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStageKind' + state: + not: + enum: + - 0 + title: state + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStageState' + code: + type: string + title: code + maxLength: 128 + title: OperatingTaskEnvironmentStage + additionalProperties: false console.v1.OperatingThreadEvent: type: object properties: @@ -24574,6 +24629,25 @@ components: projectSource: title: project_source $ref: '#/components/schemas/toolexecution.v1.ToolExecutionProjectSource' + workspaceRecipe: + title: workspace_recipe + description: Accepted once with the task and replayed unchanged. + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' + codingAcceptance: + title: coding_acceptance + description: |- + Exact coding requirements accepted on the first task revision. Later + revisions must match this value rather than re-running current selector + policy. Absence is meaningful for an admitted non-coding task. + $ref: '#/components/schemas/console.v1.CodingAcceptanceContract' + workspaceRecipeAdmissionVersion: + type: integer + title: workspace_recipe_admission_version + format: int32 + description: |- + Marks records admitted by the immutable workspace-recipe contract. + Zero identifies legacy records whose absent recipe/contract must replay + without reinterpretation. title: OperatingTurnRecord additionalProperties: false console.v1.OperatingTurnRoute: @@ -31855,6 +31929,55 @@ components: title: ToolExecutionProjectSourceFile additionalProperties: false description: An immutable file restored below the private task workspace. + toolexecution.v1.ToolExecutionWorkspaceRecipe: + type: object + properties: + schemaVersion: + type: string + title: schema_version + const: deixic.workspace_recipe.v1 + recipeId: + type: string + title: recipe_id + minLength: 1 + recipeVersion: + type: + - integer + - string + title: recipe_version + minimum: 1 + format: int64 + recipeDigest: + type: string + title: recipe_digest + minLength: 1 + sourceManifestDigest: + type: string + title: source_manifest_digest + minLength: 1 + requiredRuntimes: + type: array + items: + type: string + maxLength: 64 + minLength: 1 + maxItems: 16 + title: required_runtimes + maxItems: 16 + preparationTool: + type: string + title: preparation_tool + const: computer.check_runtimes + executionOwner: + type: string + title: execution_owner + const: platform-api.dex + title: ToolExecutionWorkspaceRecipe + additionalProperties: false + description: |- + Versioned, server-owned preparation recipe for one task workspace. The + recipe carries bounded declarative requirements; it cannot contain shell + commands, repository hooks, credentials, or approval policy. traces.v1.TraceAnnotation: type: object properties: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index 9302554..7c1a154 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -9068,6 +9068,29 @@ components: - OPERATING_SURFACE_KIND_WHATSAPP - OPERATING_SURFACE_KIND_APPLE_MESSAGES - OPERATING_SURFACE_KIND_EMAIL + console.v1.OperatingTaskEnvironmentStageKind: + type: string + title: OperatingTaskEnvironmentStageKind + enum: + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_UNSPECIFIED + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_SOURCE + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PREPARATION + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PROVISIONING + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_NETWORK + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_EXECUTION + - OPERATING_TASK_ENVIRONMENT_STAGE_KIND_RETAINED_STATE + console.v1.OperatingTaskEnvironmentStageState: + type: string + title: OperatingTaskEnvironmentStageState + enum: + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNSPECIFIED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_NOT_REQUIRED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_ABSENT + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_PENDING + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_READY + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_FAILED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_RETAINED + - OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNKNOWN console.v1.OperatingTaskKind: type: string title: OperatingTaskKind @@ -18121,6 +18144,14 @@ components: type: integer title: retention_hours format: int32 + stages: + type: array + items: + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStage' + title: stages + workspaceRecipe: + title: workspace_recipe + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' title: GetOperatingTaskEnvironmentResponse additionalProperties: false console.v1.GetOperatingThreadRequest: @@ -22849,6 +22880,27 @@ components: OperatingSurfaceMetadata is the credential-free origin and continuation target for one canonical operating conversation. Provider coordinates are always returned inside the already-authorized tenant scope. + console.v1.OperatingTaskEnvironmentStage: + type: object + properties: + kind: + not: + enum: + - 0 + title: kind + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStageKind' + state: + not: + enum: + - 0 + title: state + $ref: '#/components/schemas/console.v1.OperatingTaskEnvironmentStageState' + code: + type: string + title: code + maxLength: 128 + title: OperatingTaskEnvironmentStage + additionalProperties: false console.v1.OperatingThreadEvent: type: object properties: @@ -23159,6 +23211,25 @@ components: projectSource: title: project_source $ref: '#/components/schemas/toolexecution.v1.ToolExecutionProjectSource' + workspaceRecipe: + title: workspace_recipe + description: Accepted once with the task and replayed unchanged. + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' + codingAcceptance: + title: coding_acceptance + description: |- + Exact coding requirements accepted on the first task revision. Later + revisions must match this value rather than re-running current selector + policy. Absence is meaningful for an admitted non-coding task. + $ref: '#/components/schemas/console.v1.CodingAcceptanceContract' + workspaceRecipeAdmissionVersion: + type: integer + title: workspace_recipe_admission_version + format: int32 + description: |- + Marks records admitted by the immutable workspace-recipe contract. + Zero identifies legacy records whose absent recipe/contract must replay + without reinterpretation. title: OperatingTurnRecord additionalProperties: false console.v1.OperatingTurnRoute: @@ -30295,6 +30366,55 @@ components: title: ToolExecutionProjectSourceFile additionalProperties: false description: An immutable file restored below the private task workspace. + toolexecution.v1.ToolExecutionWorkspaceRecipe: + type: object + properties: + schemaVersion: + type: string + title: schema_version + const: deixic.workspace_recipe.v1 + recipeId: + type: string + title: recipe_id + minLength: 1 + recipeVersion: + type: + - integer + - string + title: recipe_version + minimum: 1 + format: int64 + recipeDigest: + type: string + title: recipe_digest + minLength: 1 + sourceManifestDigest: + type: string + title: source_manifest_digest + minLength: 1 + requiredRuntimes: + type: array + items: + type: string + maxLength: 64 + minLength: 1 + maxItems: 16 + title: required_runtimes + maxItems: 16 + preparationTool: + type: string + title: preparation_tool + const: computer.check_runtimes + executionOwner: + type: string + title: execution_owner + const: platform-api.dex + title: ToolExecutionWorkspaceRecipe + additionalProperties: false + description: |- + Versioned, server-owned preparation recipe for one task workspace. The + recipe carries bounded declarative requirements; it cannot contain shell + commands, repository hooks, credentials, or approval policy. traces.v1.TraceAnnotation: type: object properties: diff --git a/openapi/toolexecution/v1/toolexecution.openapi.yaml b/openapi/toolexecution/v1/toolexecution.openapi.yaml index 3411c4f..bae86e8 100644 --- a/openapi/toolexecution/v1/toolexecution.openapi.yaml +++ b/openapi/toolexecution/v1/toolexecution.openapi.yaml @@ -673,6 +673,9 @@ components: organizationId: type: string title: organization_id + taskId: + type: string + title: task_id title: ListToolExecutionsRequest additionalProperties: false toolexecution.v1.ListToolExecutionsResponse: @@ -1047,6 +1050,16 @@ components: projectImport: title: project_import $ref: '#/components/schemas/toolexecution.v1.ToolExecutionProjectImport' + workspaceRecipe: + title: workspace_recipe + description: |- + Exact Platform-admitted task recipe. Executor preparation is authorized + from this typed linkage, never from caller-controlled metadata. + $ref: '#/components/schemas/toolexecution.v1.ToolExecutionWorkspaceRecipe' + taskId: + type: string + title: task_id + description: Platform-admitted task identity used for tenant-scoped owner inspection. title: ToolExecutionLinkage additionalProperties: false description: |- @@ -1349,6 +1362,55 @@ components: ToolExecutionTraceContext carries the W3C trace context that causally owns a tool call. It lets the AgentRun, ToolExecution, connector, and MCP spans stay on one distributed trace even when the execution is retried or parked. + toolexecution.v1.ToolExecutionWorkspaceRecipe: + type: object + properties: + schemaVersion: + type: string + title: schema_version + const: deixic.workspace_recipe.v1 + recipeId: + type: string + title: recipe_id + minLength: 1 + recipeVersion: + type: + - integer + - string + title: recipe_version + minimum: 1 + format: int64 + recipeDigest: + type: string + title: recipe_digest + minLength: 1 + sourceManifestDigest: + type: string + title: source_manifest_digest + minLength: 1 + requiredRuntimes: + type: array + items: + type: string + maxLength: 64 + minLength: 1 + maxItems: 16 + title: required_runtimes + maxItems: 16 + preparationTool: + type: string + title: preparation_tool + const: computer.check_runtimes + executionOwner: + type: string + title: execution_owner + const: platform-api.dex + title: ToolExecutionWorkspaceRecipe + additionalProperties: false + description: |- + Versioned, server-owned preparation recipe for one task workspace. The + recipe carries bounded declarative requirements; it cannot contain shell + commands, repository hooks, credentials, or approval policy. toolexecution.v1.ToolOutputProposal: type: object properties: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 5758a6e..6061b07 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -2026,6 +2026,16 @@ message OperatingTurnRecord { // prompts, outputs, customer identifiers, credentials, or tool payloads. OperatingCustomerOutcomeIdentity customer_outcome_identity = 18; toolexecution.v1.ToolExecutionProjectSource project_source = 19; + // Accepted once with the task and replayed unchanged. + toolexecution.v1.ToolExecutionWorkspaceRecipe workspace_recipe = 20; + // Exact coding requirements accepted on the first task revision. Later + // revisions must match this value rather than re-running current selector + // policy. Absence is meaningful for an admitted non-coding task. + CodingAcceptanceContract coding_acceptance = 21; + // Marks records admitted by the immutable workspace-recipe contract. + // Zero identifies legacy records whose absent recipe/contract must replay + // without reinterpretation. + int32 workspace_recipe_admission_version = 22 [(buf.validate.field).int32.gte = 0]; } message OperatingCustomerOutcomeIdentity { @@ -3883,6 +3893,7 @@ message OperatingTaskEnvironmentBinding { 720 ] }]; + toolexecution.v1.ToolExecutionWorkspaceRecipe workspace_recipe = 10; } message OperatingRequiredInitialToolIntent { @@ -10104,6 +10115,41 @@ message GetOperatingTaskEnvironmentResponse { // A cleanup decision was already accepted before a later policy change. bool cleanup_accepted = 8; int32 retention_hours = 9; + repeated OperatingTaskEnvironmentStage stages = 10; + toolexecution.v1.ToolExecutionWorkspaceRecipe workspace_recipe = 11; +} + +enum OperatingTaskEnvironmentStageKind { + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_UNSPECIFIED = 0; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_SOURCE = 1; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PREPARATION = 2; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_PROVISIONING = 3; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_NETWORK = 4; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_EXECUTION = 5; + OPERATING_TASK_ENVIRONMENT_STAGE_KIND_RETAINED_STATE = 6; +} + +enum OperatingTaskEnvironmentStageState { + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNSPECIFIED = 0; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_NOT_REQUIRED = 1; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_ABSENT = 2; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_PENDING = 3; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_READY = 4; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_FAILED = 5; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_RETAINED = 6; + OPERATING_TASK_ENVIRONMENT_STAGE_STATE_UNKNOWN = 7; +} + +message OperatingTaskEnvironmentStage { + OperatingTaskEnvironmentStageKind kind = 1 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + OperatingTaskEnvironmentStageState state = 2 [(buf.validate.field).enum = { + defined_only: true + not_in: [0] + }]; + string code = 3 [(buf.validate.field).string.max_len = 128]; } // Caller chooses the project and observed acceptance version, never a Git SHA. diff --git a/proto/toolexecution/v1/toolexecution.proto b/proto/toolexecution/v1/toolexecution.proto index e71f0e0..d15b15e 100644 --- a/proto/toolexecution/v1/toolexecution.proto +++ b/proto/toolexecution/v1/toolexecution.proto @@ -137,6 +137,36 @@ message ToolExecutionLinkage { string application_id = 13 [(buf.validate.field).string.min_len = 1]; ToolExecutionProjectSource project_source = 14; ToolExecutionProjectImport project_import = 15; + // Exact Platform-admitted task recipe. Executor preparation is authorized + // from this typed linkage, never from caller-controlled metadata. + ToolExecutionWorkspaceRecipe workspace_recipe = 16; + // Platform-admitted task identity used for tenant-scoped owner inspection. + string task_id = 17; +} + +// Versioned, server-owned preparation recipe for one task workspace. The +// recipe carries bounded declarative requirements; it cannot contain shell +// commands, repository hooks, credentials, or approval policy. +message ToolExecutionWorkspaceRecipe { + string schema_version = 1 [(buf.validate.field).string.const = "deixic.workspace_recipe.v1"]; + string recipe_id = 2 [(buf.validate.field).string.min_len = 1]; + uint64 recipe_version = 3 [(buf.validate.field).uint64.gte = 1]; + string recipe_digest = 4 [(buf.validate.field).string.min_len = 1]; + string source_manifest_digest = 5 [(buf.validate.field).string.min_len = 1]; + repeated string required_runtimes = 6 [(buf.validate.field).repeated = { + max_items: 16 + items: { + string: { + min_len: 1 + max_len: 64 + } + } + }]; + string preparation_tool = 7 [(buf.validate.field).string.const = "computer.check_runtimes"]; + // Skills, MCP tools, approvals, and credentials remain authorized through + // their existing admitted contracts; this recipe carries no such authority. + reserved 8, 9; + string execution_owner = 10 [(buf.validate.field).string.const = "platform-api.dex"]; } // ToolExecutionAttachmentMount is an immutable, server-authorized VFS version @@ -414,6 +444,7 @@ message ListToolExecutionsRequest { int32 limit = 10 [(buf.validate.field).int32.gte = 0]; int32 offset = 11 [(buf.validate.field).int32.gte = 0]; string organization_id = 12; + string task_id = 13; } message ListToolExecutionsResponse { From d87ef719d065040285cc722ae4d71b0920bc9b6c Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 02:38:20 +0000 Subject: [PATCH 09/18] chore: project api from Mono 9a003786d767 --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 71a3849..1e7d6c4 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,9 +3,9 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "78799bd5ae75fdb86a0e0f8a56b5ce891fe42e71", + "sourceSha": "9a003786d7679e9029fa077557bc7ab4d00eb48f", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "f42198abd128f1e1624d7d1468c12655644805f9", + "priorProjectedBase": "98eb7b0dceab52c85e417aec11647f16f680d6a0", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", "contentDigest": "f7b9283b21f4fbd1865623fee48f517eb5d2f4cb77ab5551131fd2343c7a23e8", From 0aa7b6f54c7b8f09494ba7fa1667241b2b5b3195 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 03:26:00 +0000 Subject: [PATCH 10/18] chore: project api from Mono 511bd2305f5a --- .repository-projection.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 1e7d6c4..46945ba 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "9a003786d7679e9029fa077557bc7ab4d00eb48f", + "sourceSha": "511bd2305f5a92cfbedb91208d7bc0820fda29b5", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "98eb7b0dceab52c85e417aec11647f16f680d6a0", + "priorProjectedBase": "432a7e83b8d2367be1d8c8d65e0ee33b89dccafb", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", - "toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f", + "toolDigest": "e9fc82741fdf4a797b076d29d51e14aced32368b", "contentDigest": "f7b9283b21f4fbd1865623fee48f517eb5d2f4cb77ab5551131fd2343c7a23e8", "publicationEligible": true } From 6a4f422c4640688884a7934359a0670656526852 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 06:20:31 +0000 Subject: [PATCH 11/18] chore: project api from Mono ad7b9df0b712 --- .repository-projection.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 46945ba..6cf42aa 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "511bd2305f5a92cfbedb91208d7bc0820fda29b5", + "sourceSha": "ad7b9df0b7129a2fe8a6cda64eed199b0ea9a748", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "432a7e83b8d2367be1d8c8d65e0ee33b89dccafb", + "priorProjectedBase": "9b547354dfb44934b853443aa73d296901ef1d2b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", - "toolDigest": "e9fc82741fdf4a797b076d29d51e14aced32368b", + "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", "contentDigest": "f7b9283b21f4fbd1865623fee48f517eb5d2f4cb77ab5551131fd2343c7a23e8", "publicationEligible": true } From 33b4bc470b15c9d55766483c7c5f7dd84518e7e6 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 06:52:57 +0000 Subject: [PATCH 12/18] chore: project api from Mono 3a95acea6719 --- .repository-projection.json | 4 +- openapi/connectors/v1/connectors.openapi.yaml | 42 +++++++++++++++++-- proto/connectors/v1/connectors.proto | 27 ++++++++++-- proto/console/v1/console.proto | 1 + proto/deixic/v1/deixic.proto | 1 + 5 files changed, 67 insertions(+), 8 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 6cf42aa..c0e8b49 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "ad7b9df0b7129a2fe8a6cda64eed199b0ea9a748", + "sourceSha": "3a95acea6719539cd068e54ad31208582b6e2bc3", "destinationRepository": "dx-corp/api", "priorProjectedBase": "9b547354dfb44934b853443aa73d296901ef1d2b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", - "contentDigest": "f7b9283b21f4fbd1865623fee48f517eb5d2f4cb77ab5551131fd2343c7a23e8", + "contentDigest": "5af8306d7fe130ac9e946d512e6fa73e7626013df20bc39344d13b7ab05fdef6", "publicationEligible": true } diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index 1da62a4..244e403 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -874,7 +874,8 @@ paths: summary: CompleteOAuthFlow description: |- CompleteOAuthFlow exchanges the authorization code for access/refresh - tokens and registers the connection in one call. + tokens. Providers that authorize more than one tenant return an explicit + selection list; the caller completes the same state with selected_tenant_id. operationId: connectors.v1.ConnectorService.CompleteOAuthFlow parameters: - name: Connect-Protocol-Version @@ -1282,6 +1283,7 @@ components: - AUTH_TYPE_BASIC - AUTH_TYPE_MTLS - AUTH_TYPE_GITHUB_APP + - AUTH_TYPE_NONE description: AuthType describes the authentication method for a connection. connectors.v1.ConnectorActionErrorKind: type: string @@ -1568,8 +1570,10 @@ components: code: type: string title: code - minLength: 1 - description: Authorization code returned by the provider on the redirect. + description: |- + Authorization code returned by the provider on the redirect. Required on + the first completion and empty only when selected_tenant_id completes an + already-custodied multi-tenant authorization. redirectUri: type: string title: redirect_uri @@ -1591,6 +1595,13 @@ components: description: |- Untrusted GitHub callback coordinate; verified against the authenticated provider user and configured product App before connection registration. + selectedTenantId: + type: string + title: selected_tenant_id + description: |- + Exact provider tenant selected from a prior CompleteOAuthFlow response. + Leave empty on the authorization-code exchange. The server never chooses + an authorized tenant implicitly. title: CompleteOAuthFlowRequest additionalProperties: false connectors.v1.CompleteOAuthFlowResponse: @@ -1599,6 +1610,17 @@ components: connection: title: connection $ref: '#/components/schemas/connectors.v1.Connection' + authorizedTenants: + type: array + items: + $ref: '#/components/schemas/connectors.v1.OAuthProviderTenant' + title: authorized_tenants + description: |- + Authorized provider tenants requiring explicit customer selection before + the connection can be registered. Empty when connection is populated. + tenantSelectionRequired: + type: boolean + title: tenant_selection_required title: CompleteOAuthFlowResponse additionalProperties: false connectors.v1.Connection: @@ -3550,6 +3572,20 @@ components: $ref: '#/components/schemas/connectors.v1.UpcomingCallSourceState' title: ListUpcomingCallsResponse additionalProperties: false + connectors.v1.OAuthProviderTenant: + type: object + properties: + tenantId: + type: string + title: tenant_id + tenantName: + type: string + title: tenant_name + tenantType: + type: string + title: tenant_type + title: OAuthProviderTenant + additionalProperties: false connectors.v1.PreviewCustomConnectorRequest: type: object properties: diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index 81e2c7c..08abe68 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -181,7 +181,8 @@ service ConnectorService { option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } // CompleteOAuthFlow exchanges the authorization code for access/refresh - // tokens and registers the connection in one call. + // tokens. Providers that authorize more than one tenant return an explicit + // selection list; the caller completes the same state with selected_tenant_id. rpc CompleteOAuthFlow(CompleteOAuthFlowRequest) returns (CompleteOAuthFlowResponse) { option (common.v1.required_scopes) = "connectors:write"; option (common.v1.organization_scope_field) = "organization_id"; @@ -271,6 +272,10 @@ enum AuthType { AUTH_TYPE_BASIC = 3; AUTH_TYPE_MTLS = 4; AUTH_TYPE_GITHUB_APP = 5; + // The provider endpoint is public and registration requires no credential. + // This is distinct from UNSPECIFIED, which asks the server to use the + // provider's configured default authentication type. + AUTH_TYPE_NONE = 6; } // HealthStatus describes the health state of a connection. @@ -1183,8 +1188,10 @@ message CompleteOAuthFlowRequest { string provider_id = 3 [(buf.validate.field).string.min_len = 1]; // State token returned from InitiateOAuthFlow. string state = 4 [(buf.validate.field).string.min_len = 1]; - // Authorization code returned by the provider on the redirect. - string code = 5 [(buf.validate.field).string.min_len = 1]; + // Authorization code returned by the provider on the redirect. Required on + // the first completion and empty only when selected_tenant_id completes an + // already-custodied multi-tenant authorization. + string code = 5; // Same redirect_uri passed to InitiateOAuthFlow; providers verify it. string redirect_uri = 6 [(buf.validate.field).string.min_len = 1]; // Human-friendly label persisted on the connection record. @@ -1193,10 +1200,24 @@ message CompleteOAuthFlowRequest { // Untrusted GitHub callback coordinate; verified against the authenticated // provider user and configured product App before connection registration. uint64 github_installation_id = 9; + // Exact provider tenant selected from a prior CompleteOAuthFlow response. + // Leave empty on the authorization-code exchange. The server never chooses + // an authorized tenant implicitly. + string selected_tenant_id = 10; } message CompleteOAuthFlowResponse { Connection connection = 1; + // Authorized provider tenants requiring explicit customer selection before + // the connection can be registered. Empty when connection is populated. + repeated OAuthProviderTenant authorized_tenants = 2; + bool tenant_selection_required = 3; +} + +message OAuthProviderTenant { + string tenant_id = 1; + string tenant_name = 2; + string tenant_type = 3; } message InitiateMcpOAuthFlowRequest { diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 6061b07..5cac770 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -656,6 +656,7 @@ service ConsoleService { // ListIntegrationTiles returns setup and health tiles for onboarding. rpc ListIntegrationTiles(ListIntegrationTilesRequest) returns (ListIntegrationTilesResponse) { option (common.v1.required_scopes) = "console:read"; + option (common.v1.required_scopes) = "connectors:read"; option (common.v1.workspace_scope_field) = "query.workspace_id"; option (common.v1.risk_level) = RISK_LEVEL_LOW; diff --git a/proto/deixic/v1/deixic.proto b/proto/deixic/v1/deixic.proto index 4b68d95..aca50f4 100644 --- a/proto/deixic/v1/deixic.proto +++ b/proto/deixic/v1/deixic.proto @@ -430,6 +430,7 @@ service DeixicService { // Uses the canonical console.v1.ConsoleService.ListIntegrationTiles message contract. rpc ListIntegrationTiles(console.v1.ListIntegrationTilesRequest) returns (console.v1.ListIntegrationTilesResponse) { option (common.v1.required_scopes) = "console:read"; + option (common.v1.required_scopes) = "connectors:read"; option (common.v1.workspace_scope_field) = "query.workspace_id"; option (common.v1.risk_level) = RISK_LEVEL_LOW; From 525330e642d3779d423dbc74fe54ddb05b6af98d Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 08:09:07 +0000 Subject: [PATCH 13/18] chore: project api from Mono c16f3515c56a --- .repository-projection.json | 4 +- openapi/console/v1/console.openapi.yaml | 492 ++++++++++++++++++++++++ openapi/deixic/v1/deixic.openapi.yaml | 492 ++++++++++++++++++++++++ openapi/meter/v1/meter.openapi.yaml | 179 +++++++++ proto/console/v1/console.proto | 215 +++++++++++ proto/deixic/v1/deixic.proto | 36 ++ proto/meter/v1/meter.proto | 68 ++++ 7 files changed, 1484 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index c0e8b49..0b34cac 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "3a95acea6719539cd068e54ad31208582b6e2bc3", + "sourceSha": "c16f3515c56a8ad5f531ab9b7cba7f9493e579bf", "destinationRepository": "dx-corp/api", "priorProjectedBase": "9b547354dfb44934b853443aa73d296901ef1d2b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", - "contentDigest": "5af8306d7fe130ac9e946d512e6fa73e7626013df20bc39344d13b7ab05fdef6", + "contentDigest": "83f23b52425dd854d1716f080f280cdd7cdbc61c39a4791825db577adc46d2a0", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index e3d75d7..d15f5ab 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -4680,6 +4680,222 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.EngageStaffProductIssueReportResponse' + /console.v1.ConsoleService/PrepareStaffProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: PrepareStaffProductIssueRecovery + description: PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: console.v1.ConsoleService.PrepareStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.PrepareStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /console.v1.ConsoleService/ScanStaffProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: ScanStaffProductIssueRecovery + description: ScanStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: console.v1.ConsoleService.ScanStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ScanStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /console.v1.ConsoleService/ReviewStaffProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: ReviewStaffProductIssueRecovery + description: ReviewStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: console.v1.ConsoleService.ReviewStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ReviewStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /console.v1.ConsoleService/ExecuteStaffProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: ExecuteStaffProductIssueRecovery + description: ExecuteStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: console.v1.ConsoleService.ExecuteStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ExecuteStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /console.v1.ConsoleService/GetProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: GetProductIssueRecovery + description: GetProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + operationId: console.v1.ConsoleService.GetProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.GetProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /console.v1.ConsoleService/ReplyProductIssueRecovery: + post: + tags: + - console.v1.ConsoleService + summary: ReplyProductIssueRecovery + description: ReplyProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + operationId: console.v1.ConsoleService.ReplyProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ReplyProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' /console.v1.ConsoleService/GetOperatingFeedback: post: tags: @@ -17846,6 +18062,29 @@ components: maxItems: 200 title: EvaluateWorkspaceArtifactStyleGuideResponse additionalProperties: false + console.v1.ExecuteStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ExecuteStaffProductIssueRecoveryRequest + additionalProperties: false console.v1.FinalizeBusinessObjectAuthorityTransferRequest: type: object properties: @@ -18997,6 +19236,19 @@ components: $ref: '#/components/schemas/console.v1.TenantPrivacySetting' title: GetPrivacySettingsResponse additionalProperties: false + console.v1.GetProductIssueRecoveryRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + title: GetProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.GetProspectingWatchProgramRequest: type: object properties: @@ -19558,6 +19810,13 @@ components: console.v1.InferenceCreditBalance: type: object properties: + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + description: Original cash charges restored through verified customer recovery. grantedMicros: type: - integer @@ -19744,6 +20003,12 @@ components: console.v1.InferenceCreditReconciliation: type: object properties: + compensatedDifferenceMicros: + type: + - integer + - string + title: compensated_difference_micros + format: int64 balanced: type: boolean title: balanced @@ -24912,6 +25177,60 @@ components: title: unavailable_reason title: PrepareBusinessObjectAuthorityTransferResponse additionalProperties: false + console.v1.PrepareStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + sourceOrganizationId: + type: string + title: source_organization_id + maxLength: 4000 + sourceWorkspaceId: + type: string + title: source_workspace_id + maxLength: 4000 + reportId: + type: string + title: report_id + maxLength: 4000 + errorCode: + type: string + title: error_code + maxLength: 4000 + startUnixSeconds: + type: + - integer + - string + title: start_unix_seconds + format: int64 + endUnixSeconds: + type: + - integer + - string + title: end_unix_seconds + format: int64 + recipientPrincipalId: + type: string + title: recipient_principal_id + maxLength: 4000 + customerSummary: + type: string + title: customer_summary + maxLength: 4000 + deploymentVerification: + type: string + title: deployment_verification + maxLength: 4000 + title: PrepareStaffProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.PrewarmOperatingThreadRequest: type: object properties: @@ -25095,6 +25414,95 @@ components: title: private_route title: PrivateProfileRoute additionalProperties: false + console.v1.ProductIssueRecovery: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + reportReference: + type: string + title: report_reference + maxLength: 4000 + recipientPrincipalId: + type: string + title: recipient_principal_id + maxLength: 4000 + customerSummary: + type: string + title: customer_summary + maxLength: 4000 + state: + type: string + title: state + maxLength: 4000 + revision: + type: + - integer + - string + title: revision + format: int64 + affectedRequestCount: + type: + - integer + - string + title: affected_request_count + format: int64 + expectedCreditMicros: + type: + - integer + - string + title: expected_credit_micros + format: int64 + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + remainingRequestCount: + type: + - integer + - string + title: remaining_request_count + format: int64 + notificationId: + type: string + title: notification_id + maxLength: 4000 + lastReply: + type: string + title: last_reply + maxLength: 4000 + coverage: + type: string + title: coverage + maxLength: 4000 + deploymentVerification: + type: string + title: deployment_verification + maxLength: 4000 + title: ProductIssueRecovery + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. + console.v1.ProductIssueRecoveryResponse: + type: object + properties: + recovery: + title: recovery + $ref: '#/components/schemas/console.v1.ProductIssueRecovery' + title: ProductIssueRecoveryResponse + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ProductIssueReport: type: object properties: @@ -26065,6 +26473,30 @@ components: required: - channel additionalProperties: false + console.v1.ReplyProductIssueRecoveryRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + idempotencyKey: + type: string + title: idempotency_key + maxLength: 4000 + message: + type: string + title: message + maxLength: 4000 + resolved: + type: boolean + title: resolved + title: ReplyProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ReserveComputerMissionApexSessionRequest: type: object properties: @@ -26544,6 +26976,29 @@ components: - draft - receipt additionalProperties: false + console.v1.ReviewStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ReviewStaffProductIssueRecoveryRequest + additionalProperties: false console.v1.ReviewWorkspaceMemoryRequest: type: object properties: @@ -26793,6 +27248,30 @@ components: title: evidence_refs title: RunAsIdentitySummary additionalProperties: false + console.v1.ScanStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ScanStaffProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ScenarioFixture: type: object properties: @@ -31368,6 +31847,13 @@ components: meter.v1.PrepaidCreditBalance: type: object properties: + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + description: Cash recovery, separate from purchases and non-cash grants. developmentCreditOnly: type: boolean title: development_credit_only @@ -31444,6 +31930,12 @@ components: meter.v1.PrepaidCreditReconciliation: type: object properties: + compensatedDifferenceMicros: + type: + - integer + - string + title: compensated_difference_micros + format: int64 grantedDifferenceMicros: type: - integer diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index 7c1a154..3e38590 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -5953,6 +5953,222 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.EngageStaffProductIssueReportResponse' + /deixic.v1.DeixicService/PrepareStaffProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: PrepareStaffProductIssueRecovery + description: PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: deixic.v1.DeixicService.PrepareStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.PrepareStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /deixic.v1.DeixicService/ScanStaffProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: ScanStaffProductIssueRecovery + description: ScanStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: deixic.v1.DeixicService.ScanStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ScanStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /deixic.v1.DeixicService/ReviewStaffProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: ReviewStaffProductIssueRecovery + description: ReviewStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: deixic.v1.DeixicService.ReviewStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ReviewStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /deixic.v1.DeixicService/ExecuteStaffProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: ExecuteStaffProductIssueRecovery + description: ExecuteStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + operationId: deixic.v1.DeixicService.ExecuteStaffProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ExecuteStaffProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /deixic.v1.DeixicService/GetProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: GetProductIssueRecovery + description: GetProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + operationId: deixic.v1.DeixicService.GetProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.GetProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' + /deixic.v1.DeixicService/ReplyProductIssueRecovery: + post: + tags: + - deixic.v1.DeixicService + summary: ReplyProductIssueRecovery + description: ReplyProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + operationId: deixic.v1.DeixicService.ReplyProductIssueRecovery + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ReplyProductIssueRecoveryRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ProductIssueRecoveryResponse' /deixic.v1.DeixicService/GetOperatingFeedback: post: tags: @@ -17228,6 +17444,29 @@ components: maxItems: 200 title: EvaluateWorkspaceArtifactStyleGuideResponse additionalProperties: false + console.v1.ExecuteStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ExecuteStaffProductIssueRecoveryRequest + additionalProperties: false console.v1.FinalizeBusinessObjectAuthorityTransferRequest: type: object properties: @@ -18362,6 +18601,19 @@ components: $ref: '#/components/schemas/console.v1.TenantPrivacySetting' title: GetPrivacySettingsResponse additionalProperties: false + console.v1.GetProductIssueRecoveryRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + title: GetProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.GetProspectingWatchProgramRequest: type: object properties: @@ -18831,6 +19083,13 @@ components: console.v1.InferenceCreditBalance: type: object properties: + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + description: Original cash charges restored through verified customer recovery. grantedMicros: type: - integer @@ -19017,6 +19276,12 @@ components: console.v1.InferenceCreditReconciliation: type: object properties: + compensatedDifferenceMicros: + type: + - integer + - string + title: compensated_difference_micros + format: int64 balanced: type: boolean title: balanced @@ -23494,6 +23759,60 @@ components: title: unavailable_reason title: PrepareBusinessObjectAuthorityTransferResponse additionalProperties: false + console.v1.PrepareStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + sourceOrganizationId: + type: string + title: source_organization_id + maxLength: 4000 + sourceWorkspaceId: + type: string + title: source_workspace_id + maxLength: 4000 + reportId: + type: string + title: report_id + maxLength: 4000 + errorCode: + type: string + title: error_code + maxLength: 4000 + startUnixSeconds: + type: + - integer + - string + title: start_unix_seconds + format: int64 + endUnixSeconds: + type: + - integer + - string + title: end_unix_seconds + format: int64 + recipientPrincipalId: + type: string + title: recipient_principal_id + maxLength: 4000 + customerSummary: + type: string + title: customer_summary + maxLength: 4000 + deploymentVerification: + type: string + title: deployment_verification + maxLength: 4000 + title: PrepareStaffProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.PrewarmOperatingThreadRequest: type: object properties: @@ -23677,6 +23996,95 @@ components: title: private_route title: PrivateProfileRoute additionalProperties: false + console.v1.ProductIssueRecovery: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + reportReference: + type: string + title: report_reference + maxLength: 4000 + recipientPrincipalId: + type: string + title: recipient_principal_id + maxLength: 4000 + customerSummary: + type: string + title: customer_summary + maxLength: 4000 + state: + type: string + title: state + maxLength: 4000 + revision: + type: + - integer + - string + title: revision + format: int64 + affectedRequestCount: + type: + - integer + - string + title: affected_request_count + format: int64 + expectedCreditMicros: + type: + - integer + - string + title: expected_credit_micros + format: int64 + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + remainingRequestCount: + type: + - integer + - string + title: remaining_request_count + format: int64 + notificationId: + type: string + title: notification_id + maxLength: 4000 + lastReply: + type: string + title: last_reply + maxLength: 4000 + coverage: + type: string + title: coverage + maxLength: 4000 + deploymentVerification: + type: string + title: deployment_verification + maxLength: 4000 + title: ProductIssueRecovery + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. + console.v1.ProductIssueRecoveryResponse: + type: object + properties: + recovery: + title: recovery + $ref: '#/components/schemas/console.v1.ProductIssueRecovery' + title: ProductIssueRecoveryResponse + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ProductIssueReport: type: object properties: @@ -24620,6 +25028,30 @@ components: required: - channel additionalProperties: false + console.v1.ReplyProductIssueRecoveryRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + idempotencyKey: + type: string + title: idempotency_key + maxLength: 4000 + message: + type: string + title: message + maxLength: 4000 + resolved: + type: boolean + title: resolved + title: ReplyProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ReserveComputerMissionApexSessionRequest: type: object properties: @@ -25099,6 +25531,29 @@ components: - draft - receipt additionalProperties: false + console.v1.ReviewStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ReviewStaffProductIssueRecoveryRequest + additionalProperties: false console.v1.ReviewWorkspaceMemoryRequest: type: object properties: @@ -25348,6 +25803,30 @@ components: title: evidence_refs title: RunAsIdentitySummary additionalProperties: false + console.v1.ScanStaffProductIssueRecoveryRequest: + type: object + properties: + organizationId: + type: string + title: organization_id + maxLength: 4000 + workspaceId: + type: string + title: workspace_id + maxLength: 4000 + recoveryId: + type: string + title: recovery_id + maxLength: 4000 + expectedRevision: + type: + - integer + - string + title: expected_revision + format: int64 + title: ScanStaffProductIssueRecoveryRequest + additionalProperties: false + description: Durable, explicitly scoped customer recovery contract. console.v1.ScenarioFixture: type: object properties: @@ -29873,6 +30352,13 @@ components: meter.v1.PrepaidCreditBalance: type: object properties: + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + description: Cash recovery, separate from purchases and non-cash grants. developmentCreditOnly: type: boolean title: development_credit_only @@ -29949,6 +30435,12 @@ components: meter.v1.PrepaidCreditReconciliation: type: object properties: + compensatedDifferenceMicros: + type: + - integer + - string + title: compensated_difference_micros + format: int64 grantedDifferenceMicros: type: - integer diff --git a/openapi/meter/v1/meter.openapi.yaml b/openapi/meter/v1/meter.openapi.yaml index 84b291c..9b21ba4 100644 --- a/openapi/meter/v1/meter.openapi.yaml +++ b/openapi/meter/v1/meter.openapi.yaml @@ -294,6 +294,78 @@ paths: application/json: schema: $ref: '#/components/schemas/meter.v1.ReserveWorkCreditsResponse' + /meter.v1.MeterService/PreviewPrepaidCompensation: + post: + tags: + - meter.v1.MeterService + summary: PreviewPrepaidCompensation + description: Read original settlement eligibility without accepting or issuing compensation. + operationId: meter.v1.MeterService.PreviewPrepaidCompensation + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/meter.v1.PreviewPrepaidCompensationRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/meter.v1.PreviewPrepaidCompensationResponse' + /meter.v1.MeterService/CompensatePrepaidCredit: + post: + tags: + - meter.v1.MeterService + summary: CompensatePrepaidCredit + description: Restore a cash-funded settled request once across all recovery incidents. + operationId: meter.v1.MeterService.CompensatePrepaidCredit + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/meter.v1.CompensatePrepaidCreditRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/meter.v1.CompensatePrepaidCreditResponse' /meter.v1.MeterService/SettlePrepaidCredits: post: tags: @@ -1587,6 +1659,51 @@ components: title: warnings title: CheckBudgetResponse additionalProperties: false + meter.v1.CompensatePrepaidCreditRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + maxLength: 256 + minLength: 1 + gatewayRequestId: + type: string + title: gateway_request_id + maxLength: 256 + minLength: 1 + incidentId: + type: string + title: incident_id + maxLength: 256 + minLength: 1 + idempotencyKey: + type: string + title: idempotency_key + maxLength: 256 + minLength: 1 + title: CompensatePrepaidCreditRequest + additionalProperties: false + description: Organization and actor come exclusively from the authenticated recovery service. + meter.v1.CompensatePrepaidCreditResponse: + type: object + properties: + compensatedMicros: + exclusiveMinimum: 0 + type: + - integer + - string + title: compensated_micros + format: int64 + receiptId: + type: string + title: receipt_id + duplicate: + type: boolean + title: duplicate + description: Another incident or retry already restored this original charge. + title: CompensatePrepaidCreditResponse + additionalProperties: false meter.v1.DevelopmentCreditGrant: type: object properties: @@ -2526,9 +2643,37 @@ components: format: int64 title: MeterSummaryBucket additionalProperties: false + meter.v1.PrepaidCompensationEligibility: + type: object + properties: + gatewayRequestId: + type: string + title: gateway_request_id + eligible: + type: boolean + title: eligible + creditMicros: + type: + - integer + - string + title: credit_micros + format: int64 + reason: + type: string + title: reason + description: 'Stable owner codes: eligible, not_found, unsettled, zero_charge, grant_funded.' + title: PrepaidCompensationEligibility + additionalProperties: false meter.v1.PrepaidCreditBalance: type: object properties: + compensatedMicros: + type: + - integer + - string + title: compensated_micros + format: int64 + description: Cash recovery, separate from purchases and non-cash grants. developmentCreditOnly: type: boolean title: development_credit_only @@ -2605,6 +2750,12 @@ components: meter.v1.PrepaidCreditReconciliation: type: object properties: + compensatedDifferenceMicros: + type: + - integer + - string + title: compensated_difference_micros + format: int64 grantedDifferenceMicros: type: - integer @@ -2703,6 +2854,34 @@ components: $ref: '#/components/schemas/google.protobuf.Timestamp' title: PrepaidRunBalance additionalProperties: false + meter.v1.PreviewPrepaidCompensationRequest: + type: object + properties: + workspaceId: + type: string + title: workspace_id + maxLength: 256 + minLength: 1 + gatewayRequestIds: + type: array + items: + type: string + maxItems: 100 + title: gateway_request_ids + maxItems: 100 + minItems: 1 + title: PreviewPrepaidCompensationRequest + additionalProperties: false + meter.v1.PreviewPrepaidCompensationResponse: + type: object + properties: + entries: + type: array + items: + $ref: '#/components/schemas/meter.v1.PrepaidCompensationEligibility' + title: entries + title: PreviewPrepaidCompensationResponse + additionalProperties: false meter.v1.QueryUsageRequest: type: object properties: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 5cac770..f1f2def 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -987,6 +987,42 @@ service ConsoleService { option (common.v1.staff_account_required) = true; option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc PrepareStaffProductIssueRecovery(PrepareStaffProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ScanStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ScanStaffProductIssueRecovery(ScanStaffProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ReviewStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ReviewStaffProductIssueRecovery(ReviewStaffProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ExecuteStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ExecuteStaffProductIssueRecovery(ExecuteStaffProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // GetProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + rpc GetProductIssueRecovery(GetProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "console:read"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + // ReplyProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + rpc ReplyProductIssueRecovery(ReplyProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "console:write"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } // GetOperatingFeedback returns the latest durable feedback revision for one // Dex response, including a retraction marker when the operator removed it. rpc GetOperatingFeedback(GetOperatingFeedbackRequest) returns (GetOperatingFeedbackResponse) { @@ -8576,6 +8612,8 @@ enum OperatingHomepageSuggestionFeedbackAction { // Model credits are separate from subscriptions; automatic refill requires explicit consent. message InferenceCreditBalance { + // Original cash charges restored through verified customer recovery. + int64 compensated_micros = 13 [(buf.validate.field).int64.gte = 0]; // Non-cash development funding remains separate from purchased credits. int64 granted_micros = 8 [(buf.validate.field).int64.gte = 0]; int64 expired_grant_micros = 9 [(buf.validate.field).int64.gte = 0]; @@ -8635,6 +8673,7 @@ message InferenceRunCreditBalance { google.protobuf.Timestamp oldest_pending_at = 6; } message InferenceCreditReconciliation { + int64 compensated_difference_micros = 10; // A comparison of materialized counters with source rows in one snapshot. bool balanced = 1; int64 purchased_difference_micros = 2; @@ -10686,3 +10725,179 @@ message WorkspaceBrandVoice { uint64 version = 7; google.protobuf.Timestamp updated_at = 8; } + +// Durable, explicitly scoped customer recovery contract. +message PrepareStaffProductIssueRecoveryRequest { + string organization_id = 1 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string workspace_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string source_organization_id = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string source_workspace_id = 4 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string report_id = 5 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string error_code = 6 [ + (common.v1.classification) = DATA_CLASSIFICATION_SAFE, + (buf.validate.field).string.max_len = 4000 + ]; + int64 start_unix_seconds = 7; + int64 end_unix_seconds = 8; + string recipient_principal_id = 9 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string customer_summary = 10 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; + string deployment_verification = 11 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; +} + +// Durable, explicitly scoped customer recovery contract. +message ScanStaffProductIssueRecoveryRequest { + string organization_id = 1 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string workspace_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string recovery_id = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + int64 expected_revision = 4; +} + +message ReviewStaffProductIssueRecoveryRequest { + string organization_id = 1 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string workspace_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string recovery_id = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + int64 expected_revision = 4; +} + +message ExecuteStaffProductIssueRecoveryRequest { + string organization_id = 1 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string workspace_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string recovery_id = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + int64 expected_revision = 4; +} + +// Durable, explicitly scoped customer recovery contract. +message GetProductIssueRecoveryRequest { + ConsoleQuery query = 1; + string recovery_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; +} + +// Durable, explicitly scoped customer recovery contract. +message ReplyProductIssueRecoveryRequest { + ConsoleQuery query = 1; + string recovery_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string idempotency_key = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string message = 4 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; + bool resolved = 5; +} + +// Durable, explicitly scoped customer recovery contract. +message ProductIssueRecovery { + string organization_id = 1 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string workspace_id = 2 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string recovery_id = 3 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string report_reference = 4 [ + (common.v1.classification) = DATA_CLASSIFICATION_SAFE, + (buf.validate.field).string.max_len = 4000 + ]; + string recipient_principal_id = 5 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string customer_summary = 6 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; + string state = 7 [ + (common.v1.classification) = DATA_CLASSIFICATION_SAFE, + (buf.validate.field).string.max_len = 4000 + ]; + int64 revision = 8; + int64 affected_request_count = 9; + int64 expected_credit_micros = 10; + int64 compensated_micros = 11; + int64 remaining_request_count = 12; + string notification_id = 13 [ + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER, + (buf.validate.field).string.max_len = 4000 + ]; + string last_reply = 14 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; + string coverage = 15 [ + (common.v1.classification) = DATA_CLASSIFICATION_SAFE, + (buf.validate.field).string.max_len = 4000 + ]; + string deployment_verification = 16 [ + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT, + (buf.validate.field).string.max_len = 4000 + ]; +} + +// Durable, explicitly scoped customer recovery contract. +message ProductIssueRecoveryResponse { + ProductIssueRecovery recovery = 1; +} diff --git a/proto/deixic/v1/deixic.proto b/proto/deixic/v1/deixic.proto index aca50f4..a595b92 100644 --- a/proto/deixic/v1/deixic.proto +++ b/proto/deixic/v1/deixic.proto @@ -1218,6 +1218,42 @@ service DeixicService { option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc PrepareStaffProductIssueRecovery(console.v1.PrepareStaffProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ScanStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ScanStaffProductIssueRecovery(console.v1.ScanStaffProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ReviewStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ReviewStaffProductIssueRecovery(console.v1.ReviewStaffProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // ExecuteStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. + rpc ExecuteStaffProductIssueRecovery(console.v1.ExecuteStaffProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } + // GetProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + rpc GetProductIssueRecovery(console.v1.GetProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "console:read"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + // ReplyProductIssueRecovery accesses only the authenticated recovery recipient or authorized staff. + rpc ReplyProductIssueRecovery(console.v1.ReplyProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { + option (common.v1.required_scopes) = "console:write"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } // Uses the canonical console.v1.ConsoleService.GetOperatingFeedback message contract. rpc GetOperatingFeedback(console.v1.GetOperatingFeedbackRequest) returns (console.v1.GetOperatingFeedbackResponse) { option (common.v1.required_scopes) = "console:read"; diff --git a/proto/meter/v1/meter.proto b/proto/meter/v1/meter.proto index 67a631b..90fbc8c 100644 --- a/proto/meter/v1/meter.proto +++ b/proto/meter/v1/meter.proto @@ -62,6 +62,18 @@ service MeterService { option (common.v1.workspace_scope_field) = "workspace_id"; option (common.v1.risk_level) = RISK_LEVEL_HIGH; } + // Read original settlement eligibility without accepting or issuing compensation. + rpc PreviewPrepaidCompensation(PreviewPrepaidCompensationRequest) returns (PreviewPrepaidCompensationResponse) { + option (common.v1.required_scopes) = "meter:credits:compensate"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } + // Restore a cash-funded settled request once across all recovery incidents. + rpc CompensatePrepaidCredit(CompensatePrepaidCreditRequest) returns (CompensatePrepaidCreditResponse) { + option (common.v1.required_scopes) = "meter:credits:compensate"; + option (common.v1.workspace_scope_field) = "workspace_id"; + option (common.v1.risk_level) = RISK_LEVEL_HIGH; + } // SettlePrepaidCredits operates only on the caller's authorized organization and workspace. rpc SettlePrepaidCredits(SettlePrepaidCreditsRequest) returns (SettlePrepaidCreditsResponse) { option (common.v1.required_scopes) = "meter:credits:settle"; @@ -761,6 +773,8 @@ message GetEventDashboardResponse { // Prepaid credits are USD amounts in integer millionths of a dollar. // Meter owns funding, reservations, settlement, and the available balance. message PrepaidCreditBalance { + // Cash recovery, separate from purchases and non-cash grants. + int64 compensated_micros = 13 [(buf.validate.field).int64.gte = 0]; // Enrolled development programs cannot consume paid credits or trigger paid refill. bool development_credit_only = 12; // Non-cash development funding, kept separate from purchased credits. @@ -805,6 +819,7 @@ message PrepaidRunBalance { google.protobuf.Timestamp oldest_pending_at = 6; } message PrepaidCreditReconciliation { + int64 compensated_difference_micros = 12; int64 granted_difference_micros = 10; int64 invalid_grant_allocation_count = 11 [(buf.validate.field).int64.gte = 0]; // A comparison of materialized counters with source rows in one snapshot. @@ -1052,3 +1067,56 @@ message ReserveWorkCreditsResponse { // True only for the atomic first reservation; false never authorizes execution. bool created = 3; } + +// Organization and actor come exclusively from the authenticated recovery service. +message CompensatePrepaidCreditRequest { + string workspace_id = 1 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 256, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + string gateway_request_id = 2 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 256, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + string incident_id = 3 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 256, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + string idempotency_key = 4 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 256, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; +} +message CompensatePrepaidCreditResponse { + int64 compensated_micros = 1 [(buf.validate.field).int64.gt = 0]; + string receipt_id = 2 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + // Another incident or retry already restored this original charge. + bool duplicate = 3; +} + +message PreviewPrepaidCompensationRequest { + string workspace_id = 1 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 256, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + repeated string gateway_request_ids = 2 [ + (buf.validate.field).repeated.min_items = 1, + (buf.validate.field).repeated.max_items = 100, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; +} +message PrepaidCompensationEligibility { + string gateway_request_id = 1 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + bool eligible = 2; + int64 credit_micros = 3 [(buf.validate.field).int64.gte = 0]; + // Stable owner codes: eligible, not_found, unsettled, zero_charge, grant_funded. + string reason = 4 [(common.v1.classification) = DATA_CLASSIFICATION_SAFE]; +} +message PreviewPrepaidCompensationResponse { + repeated PrepaidCompensationEligibility entries = 1; +} From dd8dceb087f04b5dc8c786dd5d2bf6cc9989684a Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Mon, 21 Sep 2026 09:44:40 +0000 Subject: [PATCH 14/18] chore: project api from Mono 4ab4845398fd --- .repository-projection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 0b34cac..55677f6 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "c16f3515c56a8ad5f531ab9b7cba7f9493e579bf", + "sourceSha": "4ab4845398fdca60f84eb815733b8e2361b4856d", "destinationRepository": "dx-corp/api", "priorProjectedBase": "9b547354dfb44934b853443aa73d296901ef1d2b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", - "toolDigest": "1885e6c68d4a94f6633f0a96aecfbe92501547e6", + "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", "contentDigest": "83f23b52425dd854d1716f080f280cdd7cdbc61c39a4791825db577adc46d2a0", "publicationEligible": true } From c46a7cfe6d5aacbed7d7aef7188ac5af7406f44f Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 01:03:40 +0000 Subject: [PATCH 15/18] chore: project api from Mono 43ad52f7bcc9 --- .repository-projection.json | 6 +++--- openapi/connectors/v1/connectors.openapi.yaml | 15 ++++++++++++++- proto/connectors/v1/connectors.proto | 12 +++++++++++- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 55677f6..725835e 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "4ab4845398fdca60f84eb815733b8e2361b4856d", + "sourceSha": "43ad52f7bcc9498f3f63ad108e528eb210107a86", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "9b547354dfb44934b853443aa73d296901ef1d2b", + "priorProjectedBase": "a9de5e284484ba056c0dd4e7b8c0cb656c515c7b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", - "contentDigest": "83f23b52425dd854d1716f080f280cdd7cdbc61c39a4791825db577adc46d2a0", + "contentDigest": "135e6a6e239a917032fbd1086f092e39febcd9bc465c699ea72e271efff850e7", "publicationEligible": true } diff --git a/openapi/connectors/v1/connectors.openapi.yaml b/openapi/connectors/v1/connectors.openapi.yaml index 244e403..4840bce 100644 --- a/openapi/connectors/v1/connectors.openapi.yaml +++ b/openapi/connectors/v1/connectors.openapi.yaml @@ -3611,7 +3611,6 @@ components: document: type: string title: document - minLength: 1 sourceUri: type: string title: source_uri @@ -3628,8 +3627,22 @@ components: descriptionsReviewed: type: boolean title: descriptions_reviewed + expectedSpecSha256: + type: string + title: expected_spec_sha256 + pattern: ^(|[0-9a-f]{64})$ + description: |- + expected_spec_sha256 binds a create request to the exact remote bytes + returned by preview. It is optional for preview and inline definitions, + and required by the Connectors owner when create fetches source_uri. title: PreviewCustomConnectorRequest additionalProperties: false + description: |+ + document or source_uri is required: + ``` + size(this.document) > 0 || size(this.source_uri) > 0 + ``` + connectors.v1.PreviewCustomConnectorResponse: type: object properties: diff --git a/proto/connectors/v1/connectors.proto b/proto/connectors/v1/connectors.proto index 08abe68..5474937 100644 --- a/proto/connectors/v1/connectors.proto +++ b/proto/connectors/v1/connectors.proto @@ -846,16 +846,26 @@ message CustomConnector { } message PreviewCustomConnectorRequest { + option (buf.validate.message).cel = { + id: "connectors.v1.preview_custom_connector_request.source_required" + message: "document or source_uri is required" + expression: "size(this.document) > 0 || size(this.source_uri) > 0" + }; + string organization_id = 1 [(buf.validate.field).string.min_len = 1]; string workspace_id = 2 [(buf.validate.field).string.min_len = 1]; string name = 3 [(buf.validate.field).string.min_len = 1]; string description = 4; string source_type = 5 [(buf.validate.field).string.min_len = 1]; - string document = 6 [(buf.validate.field).string.min_len = 1]; + string document = 6; string source_uri = 7; repeated string approved_destination_origins = 8; repeated CustomConnectorActionMetadata actions = 9; bool descriptions_reviewed = 10; + // expected_spec_sha256 binds a create request to the exact remote bytes + // returned by preview. It is optional for preview and inline definitions, + // and required by the Connectors owner when create fetches source_uri. + string expected_spec_sha256 = 11 [(buf.validate.field).string.pattern = "^(|[0-9a-f]{64})$"]; } message PreviewCustomConnectorResponse { From a29facb2a60baef8fd31a9a76e9b65f25075153f Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 02:24:39 +0000 Subject: [PATCH 16/18] chore: project api from Mono 2df44a8283c0 --- .repository-projection.json | 4 +- openapi/console/v1/console.openapi.yaml | 101 ++++++++++++++++++++++++ openapi/deixic/v1/deixic.openapi.yaml | 101 ++++++++++++++++++++++++ proto/console/v1/console.proto | 30 +++++++ proto/deixic/v1/deixic.proto | 6 ++ 5 files changed, 240 insertions(+), 2 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 725835e..86af07e 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "43ad52f7bcc9498f3f63ad108e528eb210107a86", + "sourceSha": "2df44a8283c07c0ba875174e70d2aaabb72d19cc", "destinationRepository": "dx-corp/api", "priorProjectedBase": "a9de5e284484ba056c0dd4e7b8c0cb656c515c7b", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", - "contentDigest": "135e6a6e239a917032fbd1086f092e39febcd9bc465c699ea72e271efff850e7", + "contentDigest": "7e71829fc001f6d1c06a7b08eaf331eb3a27ca489aead2bb4e6058e6c1444ce1", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index d15f5ab..b1e12ca 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -4680,6 +4680,42 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.EngageStaffProductIssueReportResponse' + /console.v1.ConsoleService/ListStaffProductIssueRecoveries: + post: + tags: + - console.v1.ConsoleService + summary: ListStaffProductIssueRecoveries + description: Lists the global recovery queue under verified staff authority. + operationId: console.v1.ConsoleService.ListStaffProductIssueRecoveries + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ListStaffProductIssueRecoveriesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ListStaffProductIssueRecoveriesResponse' /console.v1.ConsoleService/PrepareStaffProductIssueRecovery: post: tags: @@ -22114,6 +22150,39 @@ components: $ref: '#/components/schemas/meter.v1.ListManagedInferenceAdminEventsRequest' title: ListStaffManagedInferenceAdminEventsRequest additionalProperties: false + console.v1.ListStaffProductIssueRecoveriesRequest: + type: object + properties: + state: + type: string + title: state + maxLength: 32 + description: Empty means all states; otherwise one existing recovery state. + pageSize: + type: integer + title: page_size + maximum: 100 + description: Zero defaults to 25; at most 100 rows. + pageToken: + type: string + title: page_token + maxLength: 4096 + title: ListStaffProductIssueRecoveriesRequest + additionalProperties: false + description: Global staff queue. Tenant scope is returned explicitly on each row. + console.v1.ListStaffProductIssueRecoveriesResponse: + type: object + properties: + recoveries: + type: array + items: + $ref: '#/components/schemas/console.v1.StaffProductIssueRecoverySummary' + title: recoveries + nextPageToken: + type: string + title: next_page_token + title: ListStaffProductIssueRecoveriesResponse + additionalProperties: false console.v1.ListStaffProductIssueReportsRequest: type: object properties: @@ -27897,6 +27966,38 @@ components: description: |- StaffInferenceRoutingProfile is the durable Dex inference override for the single server-configured STAFF organization. + console.v1.StaffProductIssueRecoverySummary: + type: object + properties: + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + recoveryId: + type: string + title: recovery_id + reportReference: + type: string + title: report_reference + recipientPrincipalId: + type: string + title: recipient_principal_id + customerSummary: + type: string + title: customer_summary + state: + type: string + title: state + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + lastReply: + type: string + title: last_reply + title: StaffProductIssueRecoverySummary + additionalProperties: false console.v1.StaffProductIssueReport: type: object properties: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index 3e38590..d441365 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -5953,6 +5953,42 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.EngageStaffProductIssueReportResponse' + /deixic.v1.DeixicService/ListStaffProductIssueRecoveries: + post: + tags: + - deixic.v1.DeixicService + summary: ListStaffProductIssueRecoveries + description: Lists the global recovery queue under verified staff authority. + operationId: deixic.v1.DeixicService.ListStaffProductIssueRecoveries + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ListStaffProductIssueRecoveriesRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ListStaffProductIssueRecoveriesResponse' /deixic.v1.DeixicService/PrepareStaffProductIssueRecovery: post: tags: @@ -21387,6 +21423,39 @@ components: $ref: '#/components/schemas/meter.v1.ListManagedInferenceAdminEventsRequest' title: ListStaffManagedInferenceAdminEventsRequest additionalProperties: false + console.v1.ListStaffProductIssueRecoveriesRequest: + type: object + properties: + state: + type: string + title: state + maxLength: 32 + description: Empty means all states; otherwise one existing recovery state. + pageSize: + type: integer + title: page_size + maximum: 100 + description: Zero defaults to 25; at most 100 rows. + pageToken: + type: string + title: page_token + maxLength: 4096 + title: ListStaffProductIssueRecoveriesRequest + additionalProperties: false + description: Global staff queue. Tenant scope is returned explicitly on each row. + console.v1.ListStaffProductIssueRecoveriesResponse: + type: object + properties: + recoveries: + type: array + items: + $ref: '#/components/schemas/console.v1.StaffProductIssueRecoverySummary' + title: recoveries + nextPageToken: + type: string + title: next_page_token + title: ListStaffProductIssueRecoveriesResponse + additionalProperties: false console.v1.ListStaffProductIssueReportsRequest: type: object properties: @@ -26428,6 +26497,38 @@ components: description: |- StaffInferenceRoutingProfile is the durable Dex inference override for the single server-configured STAFF organization. + console.v1.StaffProductIssueRecoverySummary: + type: object + properties: + organizationId: + type: string + title: organization_id + workspaceId: + type: string + title: workspace_id + recoveryId: + type: string + title: recovery_id + reportReference: + type: string + title: report_reference + recipientPrincipalId: + type: string + title: recipient_principal_id + customerSummary: + type: string + title: customer_summary + state: + type: string + title: state + createdAt: + title: created_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + lastReply: + type: string + title: last_reply + title: StaffProductIssueRecoverySummary + additionalProperties: false console.v1.StaffProductIssueReport: type: object properties: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index f1f2def..0bf136b 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -987,6 +987,12 @@ service ConsoleService { option (common.v1.staff_account_required) = true; option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // Lists the global recovery queue under verified staff authority. + rpc ListStaffProductIssueRecoveries(ListStaffProductIssueRecoveriesRequest) returns (ListStaffProductIssueRecoveriesResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } // PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. rpc PrepareStaffProductIssueRecovery(PrepareStaffProductIssueRecoveryRequest) returns (ProductIssueRecoveryResponse) { option (common.v1.required_scopes) = "support_access.manage"; @@ -10901,3 +10907,27 @@ message ProductIssueRecovery { message ProductIssueRecoveryResponse { ProductIssueRecovery recovery = 1; } + +// Global staff queue. Tenant scope is returned explicitly on each row. +message ListStaffProductIssueRecoveriesRequest { + // Empty means all states; otherwise one existing recovery state. + string state = 1 [(buf.validate.field).string.max_len = 32]; + // Zero defaults to 25; at most 100 rows. + uint32 page_size = 2 [(buf.validate.field).uint32.lte = 100]; + string page_token = 3 [(buf.validate.field).string.max_len = 4096]; +} +message ListStaffProductIssueRecoveriesResponse { + repeated StaffProductIssueRecoverySummary recoveries = 1; + string next_page_token = 2; +} +message StaffProductIssueRecoverySummary { + string organization_id = 1 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + string workspace_id = 2 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + string recovery_id = 3 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + string report_reference = 4 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + string recipient_principal_id = 5 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + string customer_summary = 6 [(common.v1.classification) = DATA_CLASSIFICATION_CONTENT]; + string state = 7 [(common.v1.classification) = DATA_CLASSIFICATION_SAFE]; + google.protobuf.Timestamp created_at = 8; + string last_reply = 9 [(common.v1.classification) = DATA_CLASSIFICATION_CONTENT]; +} diff --git a/proto/deixic/v1/deixic.proto b/proto/deixic/v1/deixic.proto index a595b92..9c47421 100644 --- a/proto/deixic/v1/deixic.proto +++ b/proto/deixic/v1/deixic.proto @@ -1218,6 +1218,12 @@ service DeixicService { option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // Lists the global recovery queue under verified staff authority. + rpc ListStaffProductIssueRecoveries(console.v1.ListStaffProductIssueRecoveriesRequest) returns (console.v1.ListStaffProductIssueRecoveriesResponse) { + option (common.v1.required_scopes) = "support_access.manage"; + option (common.v1.staff_account_required) = true; + option (common.v1.risk_level) = RISK_LEVEL_LOW; + } // PrepareStaffProductIssueRecovery advances the staff-reviewed recovery of charged failures. rpc PrepareStaffProductIssueRecovery(console.v1.PrepareStaffProductIssueRecoveryRequest) returns (console.v1.ProductIssueRecoveryResponse) { option (common.v1.required_scopes) = "support_access.manage"; From 5e45d26c5ae07a15766c6b152e68ed8910b61c88 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 05:08:34 +0000 Subject: [PATCH 17/18] chore: project api from Mono f6e0aa99e756 --- .repository-projection.json | 6 +++--- openapi/console/v1/console.openapi.yaml | 17 ++++++++++++++++- openapi/deixic/v1/deixic.openapi.yaml | 17 ++++++++++++++++- proto/console/v1/console.proto | 15 +++++++++++++++ 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 86af07e..093e87a 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "2df44a8283c07c0ba875174e70d2aaabb72d19cc", + "sourceSha": "f6e0aa99e756a677a1f035d6825462abd1fffe0c", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "a9de5e284484ba056c0dd4e7b8c0cb656c515c7b", + "priorProjectedBase": "3c616f65601b50873ffff1bcde4e238599b3659c", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", - "contentDigest": "7e71829fc001f6d1c06a7b08eaf331eb3a27ca489aead2bb4e6058e6c1444ce1", + "contentDigest": "af711aaad6c4ce1e58865a025562485a296843a19b589a671b975d950e7259ae", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index b1e12ca..c2c4fa3 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -9672,6 +9672,19 @@ components: - OPERATING_CORRECTION_REVIEW_STATE_APPROVED - OPERATING_CORRECTION_REVIEW_STATE_REJECTED - OPERATING_CORRECTION_REVIEW_STATE_INELIGIBLE + console.v1.OperatingExecutionPlacement: + type: string + title: OperatingExecutionPlacement + enum: + - OPERATING_EXECUTION_PLACEMENT_UNSPECIFIED + - OPERATING_EXECUTION_PLACEMENT_INLINE_TURN + - OPERATING_EXECUTION_PLACEMENT_COMPUTER_MISSION + description: |- + Server-owned Auto decision pinned to an accepted task, never a channel preference. + Where an accepted Auto task executes. The classifier already picks a model + from the task's purpose; this records the execution environment that same + decision implies, so placement is durable, replayable, and attributable to + the policy version that chose it rather than re-derived at each stage. console.v1.OperatingExecutionProfileKind: type: string title: OperatingExecutionProfileKind @@ -23012,9 +23025,11 @@ components: policyVersion: type: string title: policy_version + placement: + title: placement + $ref: '#/components/schemas/console.v1.OperatingExecutionPlacement' title: OperatingAutoModelRoute additionalProperties: false - description: Server-owned Auto decision pinned to an accepted task, never a channel preference. console.v1.OperatingCapabilityContract: type: object properties: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index d441365..a2c575c 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -9190,6 +9190,19 @@ components: - OPERATING_CORRECTION_REVIEW_STATE_APPROVED - OPERATING_CORRECTION_REVIEW_STATE_REJECTED - OPERATING_CORRECTION_REVIEW_STATE_INELIGIBLE + console.v1.OperatingExecutionPlacement: + type: string + title: OperatingExecutionPlacement + enum: + - OPERATING_EXECUTION_PLACEMENT_UNSPECIFIED + - OPERATING_EXECUTION_PLACEMENT_INLINE_TURN + - OPERATING_EXECUTION_PLACEMENT_COMPUTER_MISSION + description: |- + Server-owned Auto decision pinned to an accepted task, never a channel preference. + Where an accepted Auto task executes. The classifier already picks a model + from the task's purpose; this records the execution environment that same + decision implies, so placement is durable, replayable, and attributable to + the policy version that chose it rather than re-derived at each stage. console.v1.OperatingExecutionRuntime: type: string title: OperatingExecutionRuntime @@ -22149,9 +22162,11 @@ components: policyVersion: type: string title: policy_version + placement: + title: placement + $ref: '#/components/schemas/console.v1.OperatingExecutionPlacement' title: OperatingAutoModelRoute additionalProperties: false - description: Server-owned Auto decision pinned to an accepted task, never a channel preference. console.v1.OperatingCapabilityRequirementState: type: object properties: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 0bf136b..948c1d4 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -8709,10 +8709,25 @@ message FulfillInferenceCreditCheckoutResponse { } // Server-owned Auto decision pinned to an accepted task, never a channel preference. +// Where an accepted Auto task executes. The classifier already picks a model +// from the task's purpose; this records the execution environment that same +// decision implies, so placement is durable, replayable, and attributable to +// the policy version that chose it rather than re-derived at each stage. +enum OperatingExecutionPlacement { + OPERATING_EXECUTION_PLACEMENT_UNSPECIFIED = 0; + // The turn runs inline on the conversation's own runner. + OPERATING_EXECUTION_PLACEMENT_INLINE_TURN = 1; + // The work is long-running and belongs on a Computer. Platform remains the + // durable Run authority; this records the placement decision, it does not + // transfer mission ownership. + OPERATING_EXECUTION_PLACEMENT_COMPUTER_MISSION = 2; +} + message OperatingAutoModelRoute { OperatingModelSelection target = 1; StaffInferenceRoutingPurpose purpose = 2; string policy_version = 3; + OperatingExecutionPlacement placement = 4; } // Customer-defined business schemas. Field and relationship IDs remain stable across versions. From 090e26059ed657561f2576ba54de4813b9ad3a44 Mon Sep 17 00:00:00 2001 From: dx-corp projector Date: Tue, 22 Sep 2026 06:41:47 +0000 Subject: [PATCH 18/18] chore: project api from Mono 3457dcec675e --- .repository-projection.json | 6 +- openapi/console/v1/console.openapi.yaml | 140 ++++++++++++++++++++++++ openapi/deixic/v1/deixic.openapi.yaml | 134 +++++++++++++++++++++++ proto/console/v1/console.proto | 66 +++++++++++ proto/deixic/v1/deixic.proto | 8 ++ 5 files changed, 351 insertions(+), 3 deletions(-) diff --git a/.repository-projection.json b/.repository-projection.json index 093e87a..ae2b022 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "api", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "f6e0aa99e756a677a1f035d6825462abd1fffe0c", + "sourceSha": "3457dcec675e2f625d5c4fd2b029354a6c999872", "destinationRepository": "dx-corp/api", - "priorProjectedBase": "3c616f65601b50873ffff1bcde4e238599b3659c", + "priorProjectedBase": "e764dcd689aac72dcdec4c212c4bb55ee572d79d", "definitionDigest": "144b18a5c1f3e7ee6e2d1abc32f80a97adfeacd088911ec659d63622fe85d18c", "toolDigest": "f58d71f023a4f0a27d77cb96dcc5348a40816d0b", - "contentDigest": "af711aaad6c4ce1e58865a025562485a296843a19b589a671b975d950e7259ae", + "contentDigest": "d2824e000820bf3c6f06ba07ad78da049a98e9f757b1f5b856d8947ca567940e", "publicationEligible": true } diff --git a/openapi/console/v1/console.openapi.yaml b/openapi/console/v1/console.openapi.yaml index c2c4fa3..f6623b5 100644 --- a/openapi/console/v1/console.openapi.yaml +++ b/openapi/console/v1/console.openapi.yaml @@ -3921,6 +3921,48 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.ArchiveOperatingThreadResponse' + /console.v1.ConsoleService/ForkOperatingThread: + post: + tags: + - console.v1.ConsoleService + summary: ForkOperatingThread + description: |- + ForkOperatingThread copies one operating thread's conversation content + into a new thread owned by the caller. The fork inherits content only: + the source's model selection, Auto route, receipts, attachments, and turn + records are all dropped, because each carries authority granted to the + source's principal rather than to the forker. Repeating a request with + the same idempotency key and digest returns the original fork. + operationId: console.v1.ConsoleService.ForkOperatingThread + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ForkOperatingThreadRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ForkOperatingThreadResponse' /console.v1.ConsoleService/RenameOperatingThread: post: tags: @@ -18207,6 +18249,59 @@ components: title: memory_id title: ForgetWorkspaceMemoryResponse additionalProperties: false + console.v1.ForkOperatingThreadRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + sourceChannelId: + type: string + title: source_channel_id + minLength: 1 + throughMessageId: + type: string + title: through_message_id + maxLength: 512 + description: |- + Copy history up to and including this message. Empty copies the whole + thread as of expected_source_conversation_revision. + expectedSourceConversationRevision: + type: + - integer + - string + title: expected_source_conversation_revision + format: int64 + description: |- + The source conversation_revision the caller observed. The fork is refused + when the source has moved since, so a fork always names a state the + caller actually read. + idempotencyKey: + type: string + title: idempotency_key + maxLength: 512 + minLength: 1 + label: + type: string + title: label + maxLength: 80 + title: ForkOperatingThreadRequest + required: + - query + additionalProperties: false + console.v1.ForkOperatingThreadResponse: + type: object + properties: + channel: + title: channel + $ref: '#/components/schemas/console.v1.OperatingChannel' + replayed: + type: boolean + title: replayed + title: ForkOperatingThreadResponse + required: + - channel + additionalProperties: false console.v1.FulfillInferenceCreditCheckoutRequest: type: object properties: @@ -23180,6 +23275,12 @@ components: archivedByDisplayName: type: string title: archived_by_display_name + fork: + title: fork + description: |- + Fork provenance is durable owner metadata, absent on a thread that was + started directly. + $ref: '#/components/schemas/console.v1.OperatingThreadFork' title: OperatingChannel additionalProperties: false description: |- @@ -24780,6 +24881,45 @@ components: OperatingThreadExecution is the user-safe projection of one durable Dex thread. Runner, Pod, service, certificate, and cluster coordinates are intentionally absent. + console.v1.OperatingThreadFork: + type: object + properties: + sourceChannelId: + type: string + title: source_channel_id + throughMessageId: + type: string + title: through_message_id + description: The last source message copied into the fork. + sourceConversationRevision: + type: + - integer + - string + title: source_conversation_revision + format: int64 + description: |- + The source's conversation_revision at the moment of the fork. Together + with through_message_id this names exactly what was copied. + forkedByPrincipalId: + type: string + title: forked_by_principal_id + forkedAt: + title: forked_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + copiedMessageCount: + type: integer + title: copied_message_count + format: int32 + title: OperatingThreadFork + additionalProperties: false + description: |- + Where a forked operating thread came from. + + A fork copies conversation content and nothing else. It does not inherit + the source's pinned model selection, its Auto route, its receipts, its + attachments, or its turn records, because each of those carries authority + that was granted to the source thread's principal rather than to whoever + forked it. The fork re-resolves all of them under the forking principal. console.v1.OperatingThreadResponse: type: object properties: diff --git a/openapi/deixic/v1/deixic.openapi.yaml b/openapi/deixic/v1/deixic.openapi.yaml index a2c575c..2a51c27 100644 --- a/openapi/deixic/v1/deixic.openapi.yaml +++ b/openapi/deixic/v1/deixic.openapi.yaml @@ -4116,6 +4116,42 @@ paths: application/json: schema: $ref: '#/components/schemas/console.v1.ArchiveOperatingThreadResponse' + /deixic.v1.DeixicService/ForkOperatingThread: + post: + tags: + - deixic.v1.DeixicService + summary: ForkOperatingThread + description: Uses the canonical console.v1.ConsoleService.ForkOperatingThread message contract. + operationId: deixic.v1.DeixicService.ForkOperatingThread + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ForkOperatingThreadRequest' + required: true + responses: + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/console.v1.ForkOperatingThreadResponse' /deixic.v1.DeixicService/RenameOperatingThread: post: tags: @@ -17589,6 +17625,59 @@ components: title: memory_id title: ForgetWorkspaceMemoryResponse additionalProperties: false + console.v1.ForkOperatingThreadRequest: + type: object + properties: + query: + title: query + $ref: '#/components/schemas/console.v1.ConsoleQuery' + sourceChannelId: + type: string + title: source_channel_id + minLength: 1 + throughMessageId: + type: string + title: through_message_id + maxLength: 512 + description: |- + Copy history up to and including this message. Empty copies the whole + thread as of expected_source_conversation_revision. + expectedSourceConversationRevision: + type: + - integer + - string + title: expected_source_conversation_revision + format: int64 + description: |- + The source conversation_revision the caller observed. The fork is refused + when the source has moved since, so a fork always names a state the + caller actually read. + idempotencyKey: + type: string + title: idempotency_key + maxLength: 512 + minLength: 1 + label: + type: string + title: label + maxLength: 80 + title: ForkOperatingThreadRequest + required: + - query + additionalProperties: false + console.v1.ForkOperatingThreadResponse: + type: object + properties: + channel: + title: channel + $ref: '#/components/schemas/console.v1.OperatingChannel' + replayed: + type: boolean + title: replayed + title: ForkOperatingThreadResponse + required: + - channel + additionalProperties: false console.v1.FulfillInferenceCreditCheckoutRequest: type: object properties: @@ -22267,6 +22356,12 @@ components: archivedByDisplayName: type: string title: archived_by_display_name + fork: + title: fork + description: |- + Fork provenance is durable owner metadata, absent on a thread that was + started directly. + $ref: '#/components/schemas/console.v1.OperatingThreadFork' title: OperatingChannel additionalProperties: false description: |- @@ -23362,6 +23457,45 @@ components: OperatingThreadExecution is the user-safe projection of one durable Dex thread. Runner, Pod, service, certificate, and cluster coordinates are intentionally absent. + console.v1.OperatingThreadFork: + type: object + properties: + sourceChannelId: + type: string + title: source_channel_id + throughMessageId: + type: string + title: through_message_id + description: The last source message copied into the fork. + sourceConversationRevision: + type: + - integer + - string + title: source_conversation_revision + format: int64 + description: |- + The source's conversation_revision at the moment of the fork. Together + with through_message_id this names exactly what was copied. + forkedByPrincipalId: + type: string + title: forked_by_principal_id + forkedAt: + title: forked_at + $ref: '#/components/schemas/google.protobuf.Timestamp' + copiedMessageCount: + type: integer + title: copied_message_count + format: int32 + title: OperatingThreadFork + additionalProperties: false + description: |- + Where a forked operating thread came from. + + A fork copies conversation content and nothing else. It does not inherit + the source's pinned model selection, its Auto route, its receipts, its + attachments, or its turn records, because each of those carries authority + that was granted to the source thread's principal rather than to whoever + forked it. The fork re-resolves all of them under the forking principal. console.v1.OperatingThreadResponse: type: object properties: diff --git a/proto/console/v1/console.proto b/proto/console/v1/console.proto index 948c1d4..1ae64ab 100644 --- a/proto/console/v1/console.proto +++ b/proto/console/v1/console.proto @@ -827,6 +827,18 @@ service ConsoleService { option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // ForkOperatingThread copies one operating thread's conversation content + // into a new thread owned by the caller. The fork inherits content only: + // the source's model selection, Auto route, receipts, attachments, and turn + // records are all dropped, because each carries authority granted to the + // source's principal rather than to the forker. Repeating a request with + // the same idempotency key and digest returns the original fork. + rpc ForkOperatingThread(ForkOperatingThreadRequest) returns (ForkOperatingThreadResponse) { + option (common.v1.required_scopes) = "console:write"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } // RenameOperatingThread replaces the durable user-visible title for one // owner-backed operating thread. The desired title makes retries idempotent. rpc RenameOperatingThread(RenameOperatingThreadRequest) returns (RenameOperatingThreadResponse) { @@ -1934,6 +1946,28 @@ message OperatingChannel { // archived channel and cleared when the channel is unarchived. string archived_by_principal_id = 13; string archived_by_display_name = 14; + // Fork provenance is durable owner metadata, absent on a thread that was + // started directly. + OperatingThreadFork fork = 15; +} + +// Where a forked operating thread came from. +// +// A fork copies conversation content and nothing else. It does not inherit +// the source's pinned model selection, its Auto route, its receipts, its +// attachments, or its turn records, because each of those carries authority +// that was granted to the source thread's principal rather than to whoever +// forked it. The fork re-resolves all of them under the forking principal. +message OperatingThreadFork { + string source_channel_id = 1 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + // The last source message copied into the fork. + string through_message_id = 2 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + // The source's conversation_revision at the moment of the fork. Together + // with through_message_id this names exactly what was copied. + int64 source_conversation_revision = 3; + string forked_by_principal_id = 4 [(common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER]; + google.protobuf.Timestamp forked_at = 5; + int32 copied_message_count = 6; } enum OperatingThreadArchiveFilter { @@ -2390,6 +2424,38 @@ message ArchiveOperatingThreadResponse { bool replayed = 3; } +message ForkOperatingThreadRequest { + ConsoleQuery query = 1 [(buf.validate.field).required = true]; + string source_channel_id = 2 [ + (buf.validate.field).string.min_len = 1, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + // Copy history up to and including this message. Empty copies the whole + // thread as of expected_source_conversation_revision. + string through_message_id = 3 [ + (buf.validate.field).string.max_len = 512, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + // The source conversation_revision the caller observed. The fork is refused + // when the source has moved since, so a fork always names a state the + // caller actually read. + int64 expected_source_conversation_revision = 4; + string idempotency_key = 5 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.max_len = 512, + (common.v1.classification) = DATA_CLASSIFICATION_IDENTIFIER + ]; + string label = 6 [ + (buf.validate.field).string.max_len = 80, + (common.v1.classification) = DATA_CLASSIFICATION_CONTENT + ]; +} + +message ForkOperatingThreadResponse { + OperatingChannel channel = 1 [(buf.validate.field).required = true]; + bool replayed = 2; +} + message RenameOperatingThreadRequest { ConsoleQuery query = 1 [(buf.validate.field).required = true]; string channel_id = 2 [ diff --git a/proto/deixic/v1/deixic.proto b/proto/deixic/v1/deixic.proto index 9c47421..df63906 100644 --- a/proto/deixic/v1/deixic.proto +++ b/proto/deixic/v1/deixic.proto @@ -842,6 +842,14 @@ service DeixicService { option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; } + // Uses the canonical console.v1.ConsoleService.ForkOperatingThread message contract. + rpc ForkOperatingThread(console.v1.ForkOperatingThreadRequest) returns (console.v1.ForkOperatingThreadResponse) { + option (common.v1.required_scopes) = "console:write"; + option (common.v1.workspace_scope_field) = "query.workspace_id"; + + option (common.v1.risk_level) = RISK_LEVEL_MEDIUM; + } + // Uses the canonical console.v1.ConsoleService.RenameOperatingThread message contract. rpc RenameOperatingThread(console.v1.RenameOperatingThreadRequest) returns (console.v1.RenameOperatingThreadResponse) { option (common.v1.required_scopes) = "console:write";