You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by wy...@apache.org on 2026/10/14 01:19:13 UTC
(maka) 13/14: Restore reviewed Plan execution through the native Agent and product UI
This is an automated email from the ASF dual-hosted git repository.
M4n5ter pushed a commit to branch feat/runtime-host-rust
in repository https://gitbox.apache.org/repos/asf/maka.git
commit d4da7a0753603c308ef2d8d6251c2ec1c1905359
Author: Wang <m4...@gmail.com>
AuthorDate: Wed Oct 14 03:34:57 2026 +0800
Restore reviewed Plan execution through the native Agent and product UI
---
packages/plugin-sdk/src/configurations.ts | 10 +
packages/plugin-sdk/src/contracts.ts | 7722 ++++++++++++--------
packages/plugin-sdk/src/generated/runtime.ts | 351 +-
plugins/agent/agent-screen/README.md | 2 +
plugins/agent/agent-screen/README.zh-CN.md | 2 +
plugins/agent/agent-screen/actions.ts | 17 +
plugins/agent/agent-screen/events.ts | 14 +-
plugins/agent/agent-screen/frame.ts | 56 +-
plugins/agent/agent-screen/index.ts | 2 +
plugins/agent/agent-screen/plan.ts | 545 ++
plugins/agent/agent-screen/raw-events.ts | 3 +-
plugins/agent/agent-screen/results.ts | 41 +
plugins/agent/agent-screen/state.ts | 11 +-
plugins/agent/api/src/contract.rs | 33 +
plugins/agent/api/src/contract_plan.rs | 149 +
plugins/agent/api/src/session.rs | 2 +
plugins/agent/assistant/README.md | 2 +
plugins/agent/assistant/README.zh-CN.md | 2 +
plugins/agent/assistant/src/plan.rs | 42 +-
plugins/agent/assistant/src/plan/artifact.rs | 3 +
plugins/agent/assistant/src/plan/owner.rs | 2 +-
plugins/agent/assistant/src/plan/repository.rs | 47 +-
plugins/agent/assistant/src/plan/transition.rs | 18 +-
plugins/agent/assistant/tests/plan.rs | 84 +
plugins/agent/facts/src/execution.rs | 5 +-
plugins/agent/native/Cargo.toml | 2 +-
plugins/agent/native/README.md | 2 +
plugins/agent/native/README.zh-CN.md | 2 +
plugins/agent/native/src/owner.rs | 100 +-
plugins/agent/native/src/owner/execution.rs | 7 +-
plugins/agent/native/src/owner/imports.rs | 1 +
plugins/agent/native/src/owner/notifications.rs | 5 +-
plugins/agent/native/src/owner/plan.rs | 479 ++
plugins/agent/native/src/owner/plan/dispatch.rs | 283 +
plugins/agent/native/src/owner/plan/tools.rs | 325 +
plugins/agent/native/src/owner/queue.rs | 31 +-
plugins/agent/native/src/owner/queue/controls.rs | 10 +-
.../agent/native/src/owner/scheduler/dispatch.rs | 31 +-
plugins/agent/native/src/owner/tests.rs | 4 +
plugins/agent/native/src/owner/tests/plan.rs | 395 +
.../agent/native/src/owner/tests/service_tools.rs | 12 +-
plugins/agent/native/src/service.rs | 33 +
plugins/agent/native/src/tools.rs | 18 +
plugins/application/authoring/index.ts | 26 +-
plugins/shared/locale.ts | 134 +
products/maka/bundle/src/installation.ts | 1 +
products/maka/bundle/tests/plan.test.mjs | 304 +
products/maka/bundle/tests/ui-authoring.test.mjs | 15 +
products/maka/cli/notices.json | 29 +-
.../integration/terminal/bundled_product/chat.rs | 1 +
.../terminal/bundled_product/chat/plan.rs | 165 +
tools/schema/src/lib.rs | 7 +
52 files changed, 8415 insertions(+), 3172 deletions(-)
diff --git a/packages/plugin-sdk/src/configurations.ts b/packages/plugin-sdk/src/configurations.ts
index f3a8b28292..7af84da8b7 100644
--- a/packages/plugin-sdk/src/configurations.ts
+++ b/packages/plugin-sdk/src/configurations.ts
@@ -180,6 +180,11 @@ export const configurations = {
type: 'boolean',
default: false,
},
+ plans: {
+ description: 'Enable planning, reviewed approval and execution progress.',
+ type: 'boolean',
+ default: false,
+ },
todo: {
description: 'Enable the session-scoped, model-maintained checklist.',
type: 'boolean',
@@ -679,6 +684,11 @@ export const configurations = {
description: 'Enable explicitly approved, bounded Goal continuation.',
default: false,
},
+ plans: {
+ type: 'boolean',
+ description: 'Enable planning, reviewed approval and execution progress.',
+ default: false,
+ },
todo: {
type: 'boolean',
description: 'Enable the session-scoped, model-maintained checklist.',
diff --git a/packages/plugin-sdk/src/contracts.ts b/packages/plugin-sdk/src/contracts.ts
index 317b0cf210..dedaa0aea1 100644
--- a/packages/plugin-sdk/src/contracts.ts
+++ b/packages/plugin-sdk/src/contracts.ts
@@ -7028,6 +7028,10 @@ export const contracts = {
AgentSession: {
type: 'object',
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -7096,6 +7100,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
description:
'Stable business-data origin, independent of package or activation revisions.',
@@ -7531,405 +7539,163 @@ export const contracts = {
},
resources: {},
},
- checklist: {
- mode: 'query',
+ changePlan: {
+ mode: 'mutation',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentChecklistRead',
+ title: 'AgentPlanChange',
type: 'object',
properties: {
sessionId: {
type: 'string',
},
- offset: {
- type: 'integer',
- format: 'uint',
- minimum: 0,
- maximum: 200,
- default: 0,
- },
- },
- additionalProperties: false,
- required: ['sessionId'],
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentChecklist',
- type: 'object',
- properties: {
- enabled: {
- type: 'boolean',
- },
revision: {
- type: ['integer', 'null'],
- format: 'uint64',
- minimum: 0,
- },
- total: {
- type: 'integer',
- format: 'uint',
- minimum: 0,
- },
- completed: {
- type: 'integer',
- format: 'uint',
- minimum: 0,
- },
- current: {
- anyOf: [
- {
- $ref: '#/$defs/AgentTodoItem',
- },
- {
- type: 'null',
- },
- ],
- },
- offset: {
type: 'integer',
- format: 'uint',
- minimum: 0,
- },
- items: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentTodoItem',
- },
- maxItems: 20,
- },
- nextOffset: {
- type: ['integer', 'null'],
- format: 'uint',
+ format: 'uint64',
minimum: 0,
},
- },
- additionalProperties: false,
- required: ['enabled', 'total', 'completed', 'offset', 'items'],
- $defs: {
- AgentTodoItem: {
- type: 'object',
- properties: {
- content: {
- type: 'string',
- minLength: 1,
- maxLength: 200,
- },
- status: {
- $ref: '#/$defs/AgentTodoStatus',
- },
- },
- additionalProperties: false,
- required: ['content', 'status'],
- },
- AgentTodoStatus: {
- type: 'string',
- enum: ['pending', 'in_progress', 'completed'],
- },
- },
- },
- resources: {},
- },
- create: {
- mode: 'mutation',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentCreate',
- type: 'object',
- properties: {
- automaticTitle: {
- description:
- 'Treat title as a placeholder for one title derived from the first user message.',
- type: 'boolean',
- default: false,
- },
- tools: {
- description:
- "Immutable narrowing of this Agent's installed tools. None uses the installation;\nan empty list permits no model tools. External executors cannot enforce this.",
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- maxItems: 128,
- default: null,
- uniqueItems: true,
- },
- title: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 32,
- },
- workspace: {
- $ref: '#/$defs/AgentWorkspaceSelection',
+ action: {
+ $ref: '#/$defs/AgentPlanAction',
},
},
additionalProperties: false,
- required: ['title', 'labels', 'workspace'],
+ required: ['sessionId', 'revision', 'action'],
$defs: {
- AgentWorkspaceSelection: {
+ AgentPlanAction: {
oneOf: [
{
type: 'object',
properties: {
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
+ proposalId: {
+ type: 'string',
+ },
+ proposalRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ approval: {
+ $ref: '#/$defs/AgentPlanApproval',
},
kind: {
type: 'string',
- const: 'isolated_git',
+ const: 'approve',
},
},
additionalProperties: false,
- required: ['kind', 'selection'],
+ required: ['kind', 'proposalId', 'proposalRevision', 'approval'],
},
{
type: 'object',
properties: {
- project: {
- $ref: '#/$defs/AgentProjectRef',
+ proposalId: {
+ type: 'string',
},
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
+ kind: {
+ type: 'string',
+ const: 'revise',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'proposalId'],
+ },
+ {
+ type: 'object',
+ properties: {
+ proposalId: {
+ type: 'string',
},
kind: {
type: 'string',
- const: 'project',
+ const: 'abandon',
},
},
additionalProperties: false,
- required: ['kind', 'project', 'selection'],
+ required: ['kind', 'proposalId'],
},
{
type: 'object',
properties: {
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
+ executionId: {
+ type: 'string',
+ },
+ approval: {
+ $ref: '#/$defs/AgentPlanApproval',
},
kind: {
type: 'string',
- const: 'directory',
+ const: 'resume',
},
},
additionalProperties: false,
- required: ['kind', 'selection'],
+ required: ['kind', 'executionId', 'approval'],
},
{
type: 'object',
properties: {
- sessionId: {
+ executionId: {
+ type: 'string',
+ },
+ reason: {
type: 'string',
- minLength: 1,
- maxLength: 128,
},
kind: {
type: 'string',
- const: 'session',
+ const: 'cancel',
},
},
additionalProperties: false,
- required: ['kind', 'sessionId'],
+ required: ['kind', 'executionId', 'reason'],
},
],
},
- AgentDirectorySelection: {
+ AgentPlanApproval: {
type: 'object',
properties: {
- rootId: {
- type: 'string',
- minLength: 1,
- maxLength: 64,
+ target: {
+ $ref: '#/$defs/AgentScheduledTarget',
},
- segments: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 64,
+ model: {
+ $ref: '#/$defs/ModelSelection',
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ thinkingLevel: {
+ anyOf: [
+ {
+ $ref: '#/$defs/ThinkingLevel',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
additionalProperties: false,
- required: ['rootId', 'segments', 'directoryIdentity'],
+ required: ['target', 'model'],
},
- AgentProjectRef: {
+ AgentScheduledTarget: {
+ description:
+ 'Exact observed source boundary. This data is checked against the original\nSession; passing it never grants execution by itself.',
type: 'object',
properties: {
- id: {
+ sessionId: {
type: 'string',
- format: 'uuid',
},
- revision: {
- type: 'string',
- pattern: '^[a-f0-9]{64}$',
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
},
- },
- additionalProperties: false,
- required: ['id', 'revision'],
- },
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentCreated',
- oneOf: [
- {
- type: 'object',
- properties: {
- session: {
- $ref: '#/$defs/AgentSession',
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
},
- kind: {
- type: 'string',
- const: 'created',
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
},
additionalProperties: false,
- required: ['kind', 'session'],
+ required: ['sessionId', 'workspace', 'permissions', 'boundaryRevision'],
},
- {
- type: 'object',
- properties: {
- reason: {
- $ref: '#/$defs/AgentRejection',
- },
- kind: {
- type: 'string',
- const: 'rejected',
- },
- },
- additionalProperties: false,
- required: ['kind', 'reason'],
- },
- ],
- $defs: {
- AgentSession: {
- type: 'object',
- properties: {
- tools: {
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- },
- dataSource: {
- $ref: '#/$defs/AgentDataSource',
- },
- permissions: {
- $ref: '#/$defs/AgentWorkspacePermissions',
- },
- boundaryRevision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- id: {
- type: 'string',
- },
- title: {
- type: 'string',
- },
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- workspace: {
- $ref: '#/$defs/AgentWorkspace',
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- updatedAt: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- archived: {
- type: 'boolean',
- },
- hasUnread: {
- type: 'boolean',
- },
- activity: {
- $ref: '#/$defs/AgentSessionActivity',
- },
- },
- additionalProperties: false,
- required: [
- 'dataSource',
- 'permissions',
- 'boundaryRevision',
- 'id',
- 'title',
- 'labels',
- 'workspace',
- 'revision',
- 'updatedAt',
- 'archived',
- 'hasUnread',
- 'activity',
- ],
- },
- AgentDataSource: {
- description:
- 'Stable business-data origin, independent of package or activation revisions.',
- type: 'object',
- properties: {
- stateDomain: {
- type: 'string',
- },
- deployment: {
- type: 'string',
- format: 'uuid',
- },
- namespace: {
- $ref: '#/$defs/InstanceId',
- },
- },
- additionalProperties: false,
- required: ['stateDomain', 'deployment', 'namespace'],
- },
- InstanceId: {
- description:
- 'Hierarchical, stable source keys. Display aliases never become data identities.',
- type: 'array',
- items: {
- type: 'string',
- format: 'uuid',
- },
- },
- AgentWorkspacePermissions: {
- type: 'object',
- properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
- },
- requestPermissions: {
- type: 'boolean',
- },
- },
- additionalProperties: false,
- required: ['access', 'requestPermissions'],
- },
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
- type: 'string',
- enum: ['read_only', 'workspace_write'],
- },
- AgentWorkspace: {
+ AgentWorkspace: {
type: 'object',
properties: {
worktree: {
@@ -8000,2499 +7766,2833 @@ export const contracts = {
'directory',
],
},
- AgentSessionActivity: {
- type: 'string',
- enum: ['idle', 'working', 'waiting'],
- },
- AgentRejection: {
- type: 'string',
- enum: [
- 'title_invalid',
- 'labels_invalid',
- 'tools_unavailable',
- 'workspace_unavailable',
- 'session_unavailable',
- 'closed',
- ],
- },
- },
- },
- resources: {},
- },
- directories: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentDirectories',
- oneOf: [
- {
- type: 'object',
- properties: {
- kind: {
- type: 'string',
- const: 'roots',
- },
- },
- required: ['kind'],
- additionalProperties: false,
- },
- {
+ AgentWorkspacePermissions: {
type: 'object',
properties: {
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
- },
- after: {
- type: ['string', 'null'],
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
},
- kind: {
- type: 'string',
- const: 'children',
+ requestPermissions: {
+ type: 'boolean',
},
},
additionalProperties: false,
- required: ['kind', 'selection', 'after'],
+ required: ['access', 'requestPermissions'],
},
- ],
- $defs: {
- AgentDirectorySelection: {
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ ModelSelection: {
+ description:
+ 'Exact public selection observed by a caller, checked once at run admission.',
type: 'object',
properties: {
- rootId: {
+ connectionId: {
type: 'string',
minLength: 1,
- maxLength: 64,
+ maxLength: 128,
},
- segments: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 64,
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
},
- directoryIdentity: {
+ modelId: {
type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ minLength: 1,
+ maxLength: 512,
},
},
additionalProperties: false,
- required: ['rootId', 'segments', 'directoryIdentity'],
+ required: ['connectionId', 'revision', 'modelId'],
+ },
+ ThinkingLevel: {
+ type: 'string',
+ enum: ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'ultra'],
},
},
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentDirectoryPage',
+ title: 'AgentPlanResult',
oneOf: [
{
type: 'object',
properties: {
- roots: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentDirectory',
- },
- maxItems: 8,
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'roots',
+ const: 'committed',
},
},
additionalProperties: false,
- required: ['kind', 'roots'],
+ required: ['kind', 'revision'],
},
{
type: 'object',
properties: {
- directory: {
- $ref: '#/$defs/AgentDirectory',
- },
- children: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentDirectory',
- },
- maxItems: 32,
- },
- after: {
- type: ['string', 'null'],
+ actual: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'children',
+ const: 'conflict',
},
},
additionalProperties: false,
- required: ['kind', 'directory', 'children', 'after'],
+ required: ['kind', 'actual'],
},
- ],
- $defs: {
- AgentDirectory: {
+ {
type: 'object',
properties: {
- name: {
+ reason: {
type: 'string',
},
- path: {
+ kind: {
type: 'string',
- },
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
+ const: 'rejected',
},
},
additionalProperties: false,
- required: ['name', 'path', 'selection'],
+ required: ['kind', 'reason'],
},
- AgentDirectorySelection: {
+ ],
+ },
+ resources: {},
+ },
+ checklist: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentChecklistRead',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ },
+ offset: {
+ type: 'integer',
+ format: 'uint',
+ minimum: 0,
+ maximum: 200,
+ default: 0,
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentChecklist',
+ type: 'object',
+ properties: {
+ enabled: {
+ type: 'boolean',
+ },
+ revision: {
+ type: ['integer', 'null'],
+ format: 'uint64',
+ minimum: 0,
+ },
+ total: {
+ type: 'integer',
+ format: 'uint',
+ minimum: 0,
+ },
+ completed: {
+ type: 'integer',
+ format: 'uint',
+ minimum: 0,
+ },
+ current: {
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentTodoItem',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ offset: {
+ type: 'integer',
+ format: 'uint',
+ minimum: 0,
+ },
+ items: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentTodoItem',
+ },
+ maxItems: 20,
+ },
+ nextOffset: {
+ type: ['integer', 'null'],
+ format: 'uint',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ required: ['enabled', 'total', 'completed', 'offset', 'items'],
+ $defs: {
+ AgentTodoItem: {
type: 'object',
properties: {
- rootId: {
+ content: {
type: 'string',
minLength: 1,
- maxLength: 64,
- },
- segments: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 64,
+ maxLength: 200,
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ status: {
+ $ref: '#/$defs/AgentTodoStatus',
},
},
additionalProperties: false,
- required: ['rootId', 'segments', 'directoryIdentity'],
+ required: ['content', 'status'],
+ },
+ AgentTodoStatus: {
+ type: 'string',
+ enum: ['pending', 'in_progress', 'completed'],
},
},
},
resources: {},
},
- editQueue: {
+ create: {
mode: 'mutation',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentQueueMutation',
+ title: 'AgentCreate',
type: 'object',
properties: {
- sessionId: {
+ automaticTitle: {
+ description:
+ 'Treat title as a placeholder for one title derived from the first user message.',
+ type: 'boolean',
+ default: false,
+ },
+ tools: {
+ description:
+ "Immutable narrowing of this Agent's installed tools. None uses the installation;\nan empty list permits no model tools. External executors cannot enforce this.",
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
+ maxItems: 128,
+ default: null,
+ uniqueItems: true,
+ },
+ title: {
type: 'string',
minLength: 1,
maxLength: 128,
},
- expectedRevision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- maximum: 9007199254740991,
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 32,
},
- edit: {
- $ref: '#/$defs/AgentQueueAction',
+ workspace: {
+ $ref: '#/$defs/AgentWorkspaceSelection',
},
},
additionalProperties: false,
- required: ['sessionId', 'expectedRevision', 'edit'],
+ required: ['title', 'labels', 'workspace'],
$defs: {
- AgentQueueAction: {
+ AgentWorkspaceSelection: {
oneOf: [
{
type: 'object',
properties: {
- messageId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
},
kind: {
type: 'string',
- const: 'retract',
+ const: 'isolated_git',
},
},
additionalProperties: false,
- required: ['kind', 'messageId'],
+ required: ['kind', 'selection'],
},
{
type: 'object',
properties: {
- messageId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
+ project: {
+ $ref: '#/$defs/AgentProjectRef',
+ },
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
},
kind: {
type: 'string',
- const: 'promote',
+ const: 'project',
},
},
additionalProperties: false,
- required: ['kind', 'messageId'],
+ required: ['kind', 'project', 'selection'],
},
{
type: 'object',
properties: {
- messageId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- message: {
- type: 'string',
- maxLength: 65536,
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
},
kind: {
type: 'string',
- const: 'update',
+ const: 'directory',
},
},
additionalProperties: false,
- required: ['kind', 'messageId', 'message'],
+ required: ['kind', 'selection'],
},
{
type: 'object',
properties: {
- messageIds: {
- type: 'array',
- items: {
- type: 'string',
- },
- minItems: 1,
- maxItems: 64,
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
kind: {
type: 'string',
- const: 'reorder',
+ const: 'session',
},
},
additionalProperties: false,
- required: ['kind', 'messageIds'],
+ required: ['kind', 'sessionId'],
},
],
},
+ AgentDirectorySelection: {
+ type: 'object',
+ properties: {
+ rootId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 64,
+ },
+ segments: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 64,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['rootId', 'segments', 'directoryIdentity'],
+ },
+ AgentProjectRef: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ format: 'uuid',
+ },
+ revision: {
+ type: 'string',
+ pattern: '^[a-f0-9]{64}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'revision'],
+ },
},
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentQueueMutationResult',
+ title: 'AgentCreated',
oneOf: [
{
type: 'object',
properties: {
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ session: {
+ $ref: '#/$defs/AgentSession',
},
kind: {
type: 'string',
- const: 'committed',
+ const: 'created',
},
},
additionalProperties: false,
- required: ['kind', 'revision'],
+ required: ['kind', 'session'],
},
{
type: 'object',
properties: {
- expected: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- actual: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ reason: {
+ $ref: '#/$defs/AgentRejection',
},
kind: {
type: 'string',
- const: 'revision_conflict',
+ const: 'rejected',
},
},
additionalProperties: false,
- required: ['kind', 'expected', 'actual'],
+ required: ['kind', 'reason'],
},
- {
+ ],
+ $defs: {
+ AgentSession: {
type: 'object',
properties: {
- reason: {
- $ref: '#/$defs/AgentQueueRejection',
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
},
- kind: {
+ tools: {
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
+ },
+ dataSource: {
+ $ref: '#/$defs/AgentDataSource',
+ },
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ id: {
type: 'string',
- const: 'rejected',
+ },
+ title: {
+ type: 'string',
+ },
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ archived: {
+ type: 'boolean',
+ },
+ hasUnread: {
+ type: 'boolean',
+ },
+ activity: {
+ $ref: '#/$defs/AgentSessionActivity',
},
},
additionalProperties: false,
- required: ['kind', 'reason'],
- },
- ],
- $defs: {
- AgentQueueRejection: {
- type: 'string',
- enum: [
- 'closed',
- 'missing',
- 'in_flight',
- 'invalid_edit',
- 'execution_changed',
- 'not_running',
+ required: [
+ 'dataSource',
+ 'permissions',
+ 'boundaryRevision',
+ 'id',
+ 'title',
+ 'labels',
+ 'workspace',
+ 'revision',
+ 'updatedAt',
+ 'archived',
+ 'hasUnread',
+ 'activity',
],
},
- },
- },
- resources: {},
- },
- execute: {
- mode: 'mutation',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentExecute',
- type: 'object',
- properties: {
- attachments: {
- description:
- 'IDs of immutable user uploads in this Session, resolved by the Agent owner.',
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 8,
- default: [],
- },
- sessionId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- message: {
+ CollaborationMode: {
type: 'string',
- maxLength: 65536,
- },
- executor: {
- $ref: '#/$defs/AgentExecutorSelection',
+ enum: ['agent', 'plan'],
},
- },
- additionalProperties: false,
- required: ['sessionId', 'message', 'executor'],
- $defs: {
- AgentExecutorSelection: {
+ AgentDataSource: {
+ description:
+ 'Stable business-data origin, independent of package or activation revisions.',
type: 'object',
properties: {
- executor: {
+ stateDomain: {
type: 'string',
- minLength: 1,
- maxLength: 128,
},
- settings: {
- $ref: '#/$defs/ExecutorSettings',
+ deployment: {
+ type: 'string',
+ format: 'uuid',
+ },
+ namespace: {
+ $ref: '#/$defs/InstanceId',
},
},
additionalProperties: false,
- required: ['executor', 'settings'],
+ required: ['stateDomain', 'deployment', 'namespace'],
},
- ExecutorSettings: {
+ InstanceId: {
description:
- 'Executor-owned model selection, independent of Host model connections.',
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ AgentWorkspacePermissions: {
type: 'object',
properties: {
- model: {
- type: ['string', 'null'],
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
},
- thinkingLevel: {
- anyOf: [
- {
- $ref: '#/$defs/ThinkingLevel',
- },
- {
- type: 'null',
- },
- ],
+ requestPermissions: {
+ type: 'boolean',
},
},
additionalProperties: false,
+ required: ['access', 'requestPermissions'],
},
- ThinkingLevel: {
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
type: 'string',
- enum: ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'ultra'],
+ enum: ['read_only', 'workspace_write'],
},
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentSendResult',
- oneOf: [
- {
+ AgentWorkspace: {
type: 'object',
properties: {
- sessionId: {
- type: 'string',
- },
- reason: {
- $ref: '#/$defs/AgentSkillInputRejection',
- },
- skills: {
+ worktree: {
+ description:
+ 'Native owner allocation; never accepted from a caller as workspace authority.',
anyOf: [
{
- $ref: '#/$defs/SkillInvocationResult',
+ $ref: '#/$defs/Binding',
},
{
type: 'null',
},
],
},
- kind: {
- type: 'string',
- const: 'rejected',
+ projectId: {
+ description: "Optional membership in this Agent's canonical Project catalog.",
+ type: ['string', 'null'],
+ format: 'uuid',
},
- },
- additionalProperties: false,
- required: ['kind', 'sessionId', 'reason'],
- },
- {
- type: 'object',
- properties: {
- sessionId: {
+ path: {
type: 'string',
+ minLength: 1,
+ maxLength: 4096,
},
- invocationId: {
+ directoryIdentity: {
type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
},
- kind: {
+ identity: {
type: 'string',
- const: 'started',
+ pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
},
},
additionalProperties: false,
- required: ['kind', 'sessionId', 'invocationId'],
+ required: ['path', 'directoryIdentity', 'identity'],
},
- {
+ Binding: {
+ description: 'Immutable allocation intent, not the current child branch or HEAD.',
type: 'object',
properties: {
- sessionId: {
+ id: {
type: 'string',
},
- messageId: {
+ common_dir: {
type: 'string',
},
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ source: {
+ type: 'string',
},
- kind: {
+ source_identity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ base_commit: {
+ type: 'string',
+ },
+ directory: {
type: 'string',
- const: 'queued',
},
},
additionalProperties: false,
- required: ['kind', 'sessionId', 'messageId', 'revision'],
- },
- ],
- $defs: {
- AgentSkillInputRejection: {
+ required: [
+ 'id',
+ 'common_dir',
+ 'source',
+ 'source_identity',
+ 'base_commit',
+ 'directory',
+ ],
+ },
+ AgentSessionActivity: {
type: 'string',
- enum: ['skills_unavailable', 'input_too_large'],
+ enum: ['idle', 'working', 'waiting'],
},
- SkillInvocationResult: {
+ AgentRejection: {
+ type: 'string',
+ enum: [
+ 'title_invalid',
+ 'labels_invalid',
+ 'tools_unavailable',
+ 'busy',
+ 'workspace_unavailable',
+ 'session_unavailable',
+ 'closed',
+ ],
+ },
+ },
+ },
+ resources: {},
+ },
+ directories: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentDirectories',
+ oneOf: [
+ {
type: 'object',
properties: {
- loaded: {
- type: 'array',
- items: {
- $ref: '#/$defs/LoadedSkill',
- },
+ kind: {
+ type: 'string',
+ const: 'roots',
},
- failed: {
- type: 'array',
- items: {
- $ref: '#/$defs/SkillInvocationFailure',
- },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
},
- receipts: {
+ after: {
+ type: ['string', 'null'],
+ },
+ kind: {
+ type: 'string',
+ const: 'children',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'selection', 'after'],
+ },
+ ],
+ $defs: {
+ AgentDirectorySelection: {
+ type: 'object',
+ properties: {
+ rootId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 64,
+ },
+ segments: {
type: 'array',
items: {
- $ref: '#/$defs/SkillInvocationReceipt',
+ type: 'string',
},
+ maxItems: 64,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
},
},
additionalProperties: false,
- required: ['loaded', 'failed', 'receipts'],
+ required: ['rootId', 'segments', 'directoryIdentity'],
},
- LoadedSkill: {
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentDirectoryPage',
+ oneOf: [
+ {
type: 'object',
properties: {
- id: {
- type: 'string',
+ roots: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentDirectory',
+ },
+ maxItems: 8,
},
- name: {
+ kind: {
type: 'string',
+ const: 'roots',
},
},
additionalProperties: false,
- required: ['id', 'name'],
+ required: ['kind', 'roots'],
},
- SkillInvocationFailure: {
- anyOf: [
- {
- $ref: '#/$defs/SkillRequestFailure',
+ {
+ type: 'object',
+ properties: {
+ directory: {
+ $ref: '#/$defs/AgentDirectory',
},
- {
- $ref: '#/$defs/SkillOverflowFailure',
+ children: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentDirectory',
+ },
+ maxItems: 32,
},
- ],
+ after: {
+ type: ['string', 'null'],
+ },
+ kind: {
+ type: 'string',
+ const: 'children',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'directory', 'children', 'after'],
},
- SkillRequestFailure: {
+ ],
+ $defs: {
+ AgentDirectory: {
type: 'object',
properties: {
- request: {
+ name: {
type: 'string',
},
- reason: {
- $ref: '#/$defs/SkillFailureReason',
+ path: {
+ type: 'string',
+ },
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
},
},
additionalProperties: false,
- required: ['request', 'reason'],
- },
- SkillFailureReason: {
- type: 'string',
- enum: [
- 'invalid_name',
- 'not_found',
- 'disabled',
- 'host_incompatible',
- 'resolution_failed',
- ],
+ required: ['name', 'path', 'selection'],
},
- SkillOverflowFailure: {
+ AgentDirectorySelection: {
type: 'object',
properties: {
- reason: {
- $ref: '#/$defs/TooManyRequests',
+ rootId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 64,
},
- requestLimit: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ segments: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 64,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
},
},
additionalProperties: false,
- required: ['reason', 'requestLimit'],
+ required: ['rootId', 'segments', 'directoryIdentity'],
},
- TooManyRequests: {
+ },
+ },
+ resources: {},
+ },
+ editQueue: {
+ mode: 'mutation',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentQueueMutation',
+ type: 'object',
+ properties: {
+ sessionId: {
type: 'string',
- enum: ['too_many_requests'],
+ minLength: 1,
+ maxLength: 128,
},
- SkillInvocationReceipt: {
- description:
- 'Boolean wire discriminants are validated here, not retained as mutable\nbusiness fields beside a contradictory enum variant.',
- anyOf: [
+ expectedRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ edit: {
+ $ref: '#/$defs/AgentQueueAction',
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'expectedRevision', 'edit'],
+ $defs: {
+ AgentQueueAction: {
+ oneOf: [
{
type: 'object',
properties: {
- invocation: {
- $ref: '#/$defs/SkillInvocationMode',
- },
- request: {
+ messageId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- success: {
- const: true,
- },
- ref: {
+ kind: {
type: 'string',
+ const: 'retract',
},
- id: {
+ },
+ additionalProperties: false,
+ required: ['kind', 'messageId'],
+ },
+ {
+ type: 'object',
+ properties: {
+ messageId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- name: {
+ kind: {
type: 'string',
- },
- scope: {
- $ref: '#/$defs/SkillScope',
- },
- source: {
- $ref: '#/$defs/SkillSource',
- },
- truncated: {
- type: 'boolean',
+ const: 'promote',
},
},
additionalProperties: false,
- required: [
- 'invocation',
- 'request',
- 'success',
- 'ref',
- 'id',
- 'name',
- 'scope',
- 'source',
- 'truncated',
- ],
+ required: ['kind', 'messageId'],
},
{
type: 'object',
properties: {
- invocation: {
- $ref: '#/$defs/SkillInvocationMode',
- },
- request: {
+ messageId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- success: {
- const: false,
+ message: {
+ type: 'string',
+ maxLength: 65536,
},
- reason: {
- $ref: '#/$defs/SkillFailureReason',
+ kind: {
+ type: 'string',
+ const: 'update',
},
},
additionalProperties: false,
- required: ['invocation', 'request', 'success', 'reason'],
+ required: ['kind', 'messageId', 'message'],
},
{
type: 'object',
properties: {
- invocation: {
- const: 'explicit',
- },
- success: {
- const: false,
- },
- reason: {
- $ref: '#/$defs/TooManyRequests',
+ messageIds: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ minItems: 1,
+ maxItems: 64,
},
- requestLimit: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ kind: {
+ type: 'string',
+ const: 'reorder',
},
},
additionalProperties: false,
- required: ['invocation', 'success', 'reason', 'requestLimit'],
+ required: ['kind', 'messageIds'],
},
],
},
- SkillInvocationMode: {
- type: 'string',
- enum: ['explicit', 'model_tool'],
- },
- SkillScope: {
- type: 'string',
- enum: ['project', 'workspace', 'user', 'custom'],
- },
- SkillSource: {
- type: 'string',
- enum: ['maka', 'agents', 'legacy', 'custom'],
- },
- },
- },
- resources: {},
- },
- execution: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentExecutionRead',
- type: 'object',
- properties: {
- sessionId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- invocationId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
},
- additionalProperties: false,
- required: ['sessionId', 'invocationId'],
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentExecutionResult',
+ title: 'AgentQueueMutationResult',
oneOf: [
{
type: 'object',
properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
kind: {
type: 'string',
- const: 'missing',
+ const: 'committed',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['kind', 'revision'],
},
{
type: 'object',
properties: {
- execution: {
- $ref: '#/$defs/AgentExecution',
+ expected: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ actual: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'found',
+ const: 'revision_conflict',
},
},
additionalProperties: false,
- required: ['kind', 'execution'],
+ required: ['kind', 'expected', 'actual'],
},
- ],
- $defs: {
- AgentExecution: {
- description:
- 'Canonical physical execution receipt, independent of the current Session tip.',
+ {
type: 'object',
properties: {
- sessionId: {
- type: 'string',
- },
- turnId: {
- type: 'string',
- },
- runId: {
- type: 'string',
+ reason: {
+ $ref: '#/$defs/AgentQueueRejection',
},
- invocationId: {
+ kind: {
type: 'string',
- },
- highWater: {
- description: 'Run-local event count, not the root-global transcript cursor.',
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- state: {
- $ref: '#/$defs/AgentExecutionState',
+ const: 'rejected',
},
},
additionalProperties: false,
- required: ['sessionId', 'turnId', 'runId', 'invocationId', 'highWater', 'state'],
+ required: ['kind', 'reason'],
},
- AgentExecutionState: {
+ ],
+ $defs: {
+ AgentQueueRejection: {
type: 'string',
enum: [
- 'admitted',
- 'running',
- 'waiting',
- 'paused',
- 'completed',
- 'failed',
- 'cancelled',
+ 'closed',
+ 'missing',
+ 'in_flight',
+ 'invalid_edit',
+ 'execution_changed',
+ 'not_running',
],
},
},
},
resources: {},
},
- executorSetup: {
+ execute: {
mode: 'mutation',
input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentExecute',
type: 'object',
- additionalProperties: false,
properties: {
- executor: {
+ attachments: {
+ description:
+ 'IDs of immutable user uploads in this Session, resolved by the Agent owner.',
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 8,
+ default: [],
+ },
+ sessionId: {
type: 'string',
minLength: 1,
maxLength: 128,
},
- action: {
- $ref: '#/$defs/ExecutorSetupAction',
+ message: {
+ type: 'string',
+ maxLength: 65536,
+ },
+ executor: {
+ $ref: '#/$defs/AgentExecutorSelection',
},
},
- required: ['executor', 'action'],
- title: 'AgentExecutorSetup',
- $schema: 'https://json-schema.org/draft/2020-12/schema',
+ additionalProperties: false,
+ required: ['sessionId', 'message', 'executor'],
$defs: {
- ExecutorSetupAction: {
- oneOf: [
- {
- type: 'object',
- properties: {
- kind: {
- type: 'string',
- const: 'check',
- },
- },
- required: ['kind'],
- additionalProperties: false,
+ AgentExecutorSelection: {
+ type: 'object',
+ properties: {
+ executor: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- {
- type: 'object',
- additionalProperties: false,
- properties: {
- methodId: {
- type: 'string',
- minLength: 1,
- maxLength: 1024,
- },
- kind: {
- type: 'string',
- const: 'authenticate',
- },
- },
- required: ['kind', 'methodId'],
+ settings: {
+ $ref: '#/$defs/ExecutorSettings',
},
- ],
+ },
+ additionalProperties: false,
+ required: ['executor', 'settings'],
},
- },
- },
- output: {
- oneOf: [
- {
+ ExecutorSettings: {
+ description:
+ 'Executor-owned model selection, independent of Host model connections.',
type: 'object',
- additionalProperties: false,
properties: {
- info: {
+ model: {
+ type: ['string', 'null'],
+ },
+ thinkingLevel: {
anyOf: [
{
- $ref: '#/$defs/ExecutorSetupInfo',
+ $ref: '#/$defs/ThinkingLevel',
},
{
type: 'null',
},
],
},
- methods: {
- type: 'array',
- items: {
- $ref: '#/$defs/ExecutorAuthenticationMethod',
- },
- maxItems: 32,
+ },
+ additionalProperties: false,
+ },
+ ThinkingLevel: {
+ type: 'string',
+ enum: ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'ultra'],
+ },
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentSendResult',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ },
+ reason: {
+ $ref: '#/$defs/AgentSkillInputRejection',
+ },
+ skills: {
+ anyOf: [
+ {
+ $ref: '#/$defs/SkillInvocationResult',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
kind: {
type: 'string',
- const: 'checked',
+ const: 'rejected',
},
},
- required: ['kind', 'methods'],
+ additionalProperties: false,
+ required: ['kind', 'sessionId', 'reason'],
},
{
type: 'object',
properties: {
+ sessionId: {
+ type: 'string',
+ },
+ invocationId: {
+ type: 'string',
+ },
kind: {
type: 'string',
- const: 'authenticated',
+ const: 'started',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['kind', 'sessionId', 'invocationId'],
},
{
type: 'object',
- additionalProperties: false,
properties: {
- diagnostic: {
+ sessionId: {
type: 'string',
- maxLength: 2048,
+ },
+ messageId: {
+ type: 'string',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'unresolved',
+ const: 'queued',
},
},
- required: ['kind', 'diagnostic'],
- description:
- 'No authentication confirmation was observed; never automatically replay it.',
+ additionalProperties: false,
+ required: ['kind', 'sessionId', 'messageId', 'revision'],
},
],
- title: 'ExecutorSetupResult',
- $schema: 'https://json-schema.org/draft/2020-12/schema',
$defs: {
- ExecutorSetupInfo: {
+ AgentSkillInputRejection: {
+ type: 'string',
+ enum: ['skills_unavailable', 'input_too_large'],
+ },
+ SkillInvocationResult: {
type: 'object',
- additionalProperties: false,
properties: {
- title: {
- type: ['string', 'null'],
- maxLength: 256,
+ loaded: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/LoadedSkill',
+ },
},
- name: {
- type: 'string',
- maxLength: 256,
+ failed: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/SkillInvocationFailure',
+ },
},
- version: {
- type: 'string',
- maxLength: 256,
+ receipts: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/SkillInvocationReceipt',
+ },
},
},
- required: ['name', 'version'],
+ additionalProperties: false,
+ required: ['loaded', 'failed', 'receipts'],
},
- ExecutorAuthenticationMethod: {
+ LoadedSkill: {
type: 'object',
- additionalProperties: false,
properties: {
id: {
type: 'string',
- minLength: 1,
- maxLength: 1024,
},
name: {
type: 'string',
- minLength: 1,
- maxLength: 256,
- },
- description: {
- type: ['string', 'null'],
- maxLength: 2048,
- },
- supported: {
- type: 'boolean',
},
},
- required: ['id', 'name', 'supported'],
- },
- },
- },
- progress: {
- oneOf: [
- {
- type: 'object',
additionalProperties: false,
- properties: {
- url: {
- type: 'string',
- maxLength: 8192,
+ required: ['id', 'name'],
+ },
+ SkillInvocationFailure: {
+ anyOf: [
+ {
+ $ref: '#/$defs/SkillRequestFailure',
},
- kind: {
- type: 'string',
- const: 'authorization_url',
+ {
+ $ref: '#/$defs/SkillOverflowFailure',
},
- },
- required: ['kind', 'url'],
- },
- ],
- title: 'ExecutorSetupProgress',
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- },
- resources: {},
- },
- executors: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentExecutorsRead',
- type: 'object',
- additionalProperties: false,
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentExecutors',
- type: 'object',
- properties: {
- executors: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- setup: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- },
- additionalProperties: false,
- required: ['executors', 'setup'],
- },
- resources: {},
- },
- generateRecap: {
- mode: 'mutation',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentRecapGenerate',
- type: 'object',
- properties: {
- sessionId: {
- type: 'string',
- },
- model: {
- $ref: '#/$defs/ModelSelection',
+ ],
},
- },
- additionalProperties: false,
- required: ['sessionId', 'model'],
- $defs: {
- ModelSelection: {
- description:
- 'Exact public selection observed by a caller, checked once at run admission.',
+ SkillRequestFailure: {
type: 'object',
properties: {
- connectionId: {
+ request: {
type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
},
- modelId: {
- type: 'string',
- minLength: 1,
- maxLength: 512,
+ reason: {
+ $ref: '#/$defs/SkillFailureReason',
},
},
additionalProperties: false,
- required: ['connectionId', 'revision', 'modelId'],
+ required: ['request', 'reason'],
},
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentRecapReceipt',
- oneOf: [
- {
+ SkillFailureReason: {
+ type: 'string',
+ enum: [
+ 'invalid_name',
+ 'not_found',
+ 'disabled',
+ 'host_incompatible',
+ 'resolution_failed',
+ ],
+ },
+ SkillOverflowFailure: {
type: 'object',
properties: {
- operationId: {
- type: 'string',
- format: 'uuid',
+ reason: {
+ $ref: '#/$defs/TooManyRequests',
},
- through: {
+ requestLimit: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- kind: {
- type: 'string',
- const: 'pending',
- },
},
additionalProperties: false,
- required: ['kind', 'operationId', 'through'],
+ required: ['reason', 'requestLimit'],
},
- {
- type: 'object',
- properties: {
- operationId: {
- type: 'string',
- format: 'uuid',
- },
- through: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- text: {
- type: 'string',
- },
- modelId: {
- type: 'string',
- },
- kind: {
- type: 'string',
- const: 'ready',
- },
- },
- additionalProperties: false,
- required: ['kind', 'operationId', 'through', 'text', 'modelId'],
+ TooManyRequests: {
+ type: 'string',
+ enum: ['too_many_requests'],
},
- {
- type: 'object',
- properties: {
- operationId: {
- type: 'string',
- format: 'uuid',
- },
- through: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ SkillInvocationReceipt: {
+ description:
+ 'Boolean wire discriminants are validated here, not retained as mutable\nbusiness fields beside a contradictory enum variant.',
+ anyOf: [
+ {
+ type: 'object',
+ properties: {
+ invocation: {
+ $ref: '#/$defs/SkillInvocationMode',
+ },
+ request: {
+ type: 'string',
+ },
+ success: {
+ const: true,
+ },
+ ref: {
+ type: 'string',
+ },
+ id: {
+ type: 'string',
+ },
+ name: {
+ type: 'string',
+ },
+ scope: {
+ $ref: '#/$defs/SkillScope',
+ },
+ source: {
+ $ref: '#/$defs/SkillSource',
+ },
+ truncated: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'invocation',
+ 'request',
+ 'success',
+ 'ref',
+ 'id',
+ 'name',
+ 'scope',
+ 'source',
+ 'truncated',
+ ],
},
- reason: {
- $ref: '#/$defs/AgentRecapFailure',
+ {
+ type: 'object',
+ properties: {
+ invocation: {
+ $ref: '#/$defs/SkillInvocationMode',
+ },
+ request: {
+ type: 'string',
+ },
+ success: {
+ const: false,
+ },
+ reason: {
+ $ref: '#/$defs/SkillFailureReason',
+ },
+ },
+ additionalProperties: false,
+ required: ['invocation', 'request', 'success', 'reason'],
},
- kind: {
- type: 'string',
- const: 'failed',
+ {
+ type: 'object',
+ properties: {
+ invocation: {
+ const: 'explicit',
+ },
+ success: {
+ const: false,
+ },
+ reason: {
+ $ref: '#/$defs/TooManyRequests',
+ },
+ requestLimit: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ required: ['invocation', 'success', 'reason', 'requestLimit'],
},
- },
- additionalProperties: false,
- required: ['kind', 'operationId', 'through', 'reason'],
+ ],
},
- ],
- $defs: {
- AgentRecapFailure: {
+ SkillInvocationMode: {
type: 'string',
- enum: ['empty_or_oversized_output', 'incomplete_output', 'model_unavailable'],
+ enum: ['explicit', 'model_tool'],
+ },
+ SkillScope: {
+ type: 'string',
+ enum: ['project', 'workspace', 'user', 'custom'],
+ },
+ SkillSource: {
+ type: 'string',
+ enum: ['maka', 'agents', 'legacy', 'custom'],
},
},
},
resources: {},
},
- goal: {
+ execution: {
mode: 'query',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentGoalRead',
+ title: 'AgentExecutionRead',
type: 'object',
properties: {
sessionId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ invocationId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
},
additionalProperties: false,
- required: ['sessionId'],
+ required: ['sessionId', 'invocationId'],
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentGoalView',
- type: 'object',
- properties: {
- enabled: {
- type: 'boolean',
+ title: 'AgentExecutionResult',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'missing',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
},
- current: {
- anyOf: [
- {
- $ref: '#/$defs/AgentGoalDetail',
+ {
+ type: 'object',
+ properties: {
+ execution: {
+ $ref: '#/$defs/AgentExecution',
},
- {
- type: 'null',
+ kind: {
+ type: 'string',
+ const: 'found',
},
- ],
+ },
+ additionalProperties: false,
+ required: ['kind', 'execution'],
},
- },
- additionalProperties: false,
- required: ['enabled'],
+ ],
$defs: {
- AgentGoalDetail: {
+ AgentExecution: {
+ description:
+ 'Canonical physical execution receipt, independent of the current Session tip.',
type: 'object',
properties: {
- id: {
+ sessionId: {
type: 'string',
- format: 'uuid',
},
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- objective: {
+ turnId: {
type: 'string',
},
- status: {
- $ref: '#/$defs/GoalStatus',
+ runId: {
+ type: 'string',
},
- iterations: {
- type: 'integer',
- format: 'uint32',
- minimum: 0,
+ invocationId: {
+ type: 'string',
},
- maxIterations: {
+ highWater: {
+ description: 'Run-local event count, not the root-global transcript cursor.',
type: 'integer',
- format: 'uint32',
- minimum: 0,
- },
- tokenBudget: {
- type: ['integer', 'null'],
format: 'uint64',
minimum: 0,
},
- consumed: {
- $ref: '#/$defs/GoalMeter',
- },
- pending: {
- type: 'boolean',
- },
- report: {
- anyOf: [
- {
- $ref: '#/$defs/GoalReport',
- },
- {
- type: 'null',
- },
- ],
- },
- note: {
- type: 'string',
+ state: {
+ $ref: '#/$defs/AgentExecutionState',
},
},
additionalProperties: false,
- required: [
- 'id',
- 'revision',
- 'objective',
- 'status',
- 'iterations',
- 'maxIterations',
- 'consumed',
- 'pending',
- 'note',
- ],
+ required: ['sessionId', 'turnId', 'runId', 'invocationId', 'highWater', 'state'],
},
- GoalStatus: {
+ AgentExecutionState: {
type: 'string',
enum: [
- 'armed',
- 'active',
- 'paused',
+ 'admitted',
+ 'running',
'waiting',
- 'achieved',
- 'impossible',
+ 'paused',
+ 'completed',
+ 'failed',
'cancelled',
- 'cancellation_unknown',
- 'max_iterations',
- 'budget_limited',
- 'budget_unknown',
- 'blocked',
],
},
- GoalMeter: {
+ },
+ },
+ resources: {},
+ },
+ executorSetup: {
+ mode: 'mutation',
+ input: {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ executor: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ action: {
+ $ref: '#/$defs/ExecutorSetupAction',
+ },
+ },
+ required: ['executor', 'action'],
+ title: 'AgentExecutorSetup',
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ $defs: {
+ ExecutorSetupAction: {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'check',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ methodId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 1024,
+ },
+ kind: {
+ type: 'string',
+ const: 'authenticate',
+ },
+ },
+ required: ['kind', 'methodId'],
+ },
+ ],
+ },
+ },
+ },
+ output: {
+ oneOf: [
+ {
type: 'object',
+ additionalProperties: false,
properties: {
- known: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ info: {
+ anyOf: [
+ {
+ $ref: '#/$defs/ExecutorSetupInfo',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
- missing: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ methods: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/ExecutorAuthenticationMethod',
+ },
+ maxItems: 32,
+ },
+ kind: {
+ type: 'string',
+ const: 'checked',
},
},
- required: ['known', 'missing'],
+ required: ['kind', 'methods'],
},
- GoalReport: {
+ {
type: 'object',
properties: {
- status: {
- $ref: '#/$defs/GoalReportKind',
- },
- note: {
+ kind: {
type: 'string',
+ const: 'authenticated',
},
},
+ required: ['kind'],
additionalProperties: false,
- required: ['status', 'note'],
},
- GoalReportKind: {
- type: 'string',
- enum: ['progress', 'achieved', 'waiting', 'impossible'],
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ diagnostic: {
+ type: 'string',
+ maxLength: 2048,
+ },
+ kind: {
+ type: 'string',
+ const: 'unresolved',
+ },
+ },
+ required: ['kind', 'diagnostic'],
+ description:
+ 'No authentication confirmation was observed; never automatically replay it.',
},
- },
- },
- resources: {},
- },
- goalReceipt: {
- mode: 'query',
- input: {
+ ],
+ title: 'ExecutorSetupResult',
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentGoalReceiptRead',
- type: 'object',
- properties: {
- reference: {
- $ref: '#/$defs/RecoveryRef',
- },
- },
- additionalProperties: false,
- required: ['reference'],
$defs: {
- RecoveryRef: {
+ ExecutorSetupInfo: {
type: 'object',
+ additionalProperties: false,
properties: {
- source: {
- $ref: '#/$defs/DeploymentRef',
- },
- namespace: {
- $ref: '#/$defs/InstanceId',
+ title: {
+ type: ['string', 'null'],
+ maxLength: 256,
},
- export: {
+ name: {
type: 'string',
+ maxLength: 256,
},
- method: {
+ version: {
type: 'string',
+ maxLength: 256,
},
- operation: {
+ },
+ required: ['name', 'version'],
+ },
+ ExecutorAuthenticationMethod: {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ id: {
type: 'string',
- format: 'uuid',
+ minLength: 1,
+ maxLength: 1024,
},
- fingerprint: {
+ name: {
type: 'string',
+ minLength: 1,
+ maxLength: 256,
},
- contract: {
- $ref: '#/$defs/Contract',
+ description: {
+ type: ['string', 'null'],
+ maxLength: 2048,
},
- recovery: {
- $ref: '#/$defs/RecoveryProtocol',
+ supported: {
+ type: 'boolean',
},
},
- additionalProperties: false,
- required: [
- 'source',
- 'namespace',
- 'export',
- 'method',
- 'operation',
- 'fingerprint',
- 'contract',
- 'recovery',
- ],
+ required: ['id', 'name', 'supported'],
},
- DeploymentRef: {
+ },
+ },
+ progress: {
+ oneOf: [
+ {
type: 'object',
+ additionalProperties: false,
properties: {
- stateDomain: {
+ url: {
type: 'string',
+ maxLength: 8192,
},
- deployment: {
+ kind: {
type: 'string',
- format: 'uuid',
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ const: 'authorization_url',
},
},
- additionalProperties: false,
- required: ['stateDomain', 'deployment', 'revision'],
+ required: ['kind', 'url'],
},
- InstanceId: {
- description:
- 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ ],
+ title: 'ExecutorSetupProgress',
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ },
+ resources: {},
+ },
+ executors: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentExecutorsRead',
+ type: 'object',
+ additionalProperties: false,
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentExecutors',
+ type: 'object',
+ properties: {
+ executors: {
type: 'array',
items: {
type: 'string',
- format: 'uuid',
},
},
- Contract: {
+ setup: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ additionalProperties: false,
+ required: ['executors', 'setup'],
+ },
+ resources: {},
+ },
+ generateRecap: {
+ mode: 'mutation',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentRecapGenerate',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ },
+ model: {
+ $ref: '#/$defs/ModelSelection',
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'model'],
+ $defs: {
+ ModelSelection: {
description:
- 'Public contract definitions are package data, not live registration records.',
+ 'Exact public selection observed by a caller, checked once at run admission.',
type: 'object',
properties: {
- name: {
+ connectionId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- version: {
+ revision: {
type: 'integer',
- format: 'uint32',
- minimum: 0,
- },
- transport: {
- $ref: '#/$defs/Transport',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
},
- interface: {
- $ref: '#/$defs/Interface',
+ modelId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 512,
},
},
additionalProperties: false,
- required: ['name', 'version', 'transport', 'interface'],
- },
- Transport: {
- type: 'string',
- enum: ['local', 'remote'],
- },
- Interface: {
- oneOf: [
- {
- type: 'object',
- properties: {
- methods: {
- type: 'object',
- additionalProperties: {
- $ref: '#/$defs/Method',
- },
- },
- kind: {
- type: 'string',
- const: 'service',
- },
- },
- additionalProperties: false,
- required: ['kind', 'methods'],
- },
- {
- type: 'object',
- properties: {
- props: true,
- events: {
- type: 'object',
- additionalProperties: true,
- },
- captures: {
- type: 'object',
- additionalProperties: {
- $ref: '#/$defs/Capture',
- },
- },
- kind: {
- type: 'string',
- const: 'component',
- },
- },
- additionalProperties: false,
- required: ['kind', 'props', 'events', 'captures'],
- },
- {
- type: 'object',
- properties: {
- schema: true,
- kind: {
- type: 'string',
- const: 'value',
- },
- },
- additionalProperties: false,
- required: ['kind', 'schema'],
- },
- {
- type: 'object',
- properties: {
- resource: {
- type: 'string',
- },
- schema: true,
- kind: {
- type: 'string',
- const: 'resource',
- },
- },
- additionalProperties: false,
- required: ['kind', 'resource', 'schema'],
- },
- ],
+ required: ['connectionId', 'revision', 'modelId'],
},
- Method: {
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentRecapReceipt',
+ oneOf: [
+ {
type: 'object',
properties: {
- mode: {
- $ref: '#/$defs/MethodMode',
+ operationId: {
+ type: 'string',
+ format: 'uuid',
},
- input: true,
- output: true,
- progress: {
- description:
- 'Bounded transient observations from this mutation, separate from its\noriginal final receipt. Only mutation methods may declare progress.',
+ through: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
- resources: {
- type: 'object',
- additionalProperties: {
- $ref: '#/$defs/ResourceSlot',
- },
+ kind: {
+ type: 'string',
+ const: 'pending',
},
},
additionalProperties: false,
- required: ['mode', 'input', 'output', 'resources'],
- },
- MethodMode: {
- type: 'string',
- enum: ['query', 'mutation', 'subscription'],
+ required: ['kind', 'operationId', 'through'],
},
- ResourceSlot: {
- description:
- 'One declared input slot: its nominal type and whether the caller may omit it.',
+ {
type: 'object',
properties: {
- type: {
- $ref: '#/$defs/ResourceType',
+ operationId: {
+ type: 'string',
+ format: 'uuid',
},
- optional: {
- type: 'boolean',
+ through: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ text: {
+ type: 'string',
+ },
+ modelId: {
+ type: 'string',
+ },
+ kind: {
+ type: 'string',
+ const: 'ready',
},
},
additionalProperties: false,
- required: ['type', 'optional'],
+ required: ['kind', 'operationId', 'through', 'text', 'modelId'],
},
- ResourceType: {
- description:
- 'Nominal read-only resource shape, not a resource id or authorization token.',
+ {
type: 'object',
properties: {
- name: {
+ operationId: {
type: 'string',
+ format: 'uuid',
},
- version: {
+ through: {
type: 'integer',
- format: 'uint32',
+ format: 'uint64',
minimum: 0,
},
- },
- additionalProperties: false,
- required: ['name', 'version'],
- },
- Capture: {
- type: 'object',
- properties: {
- input: true,
- output: {
- $ref: '#/$defs/CaptureOutput',
+ reason: {
+ $ref: '#/$defs/AgentRecapFailure',
+ },
+ kind: {
+ type: 'string',
+ const: 'failed',
},
},
additionalProperties: false,
- required: ['input', 'output'],
- },
- CaptureOutput: {
- description:
- 'Resource captures enter checked service slots; continuations remain in the\noriginal presentation owner and only decide admission of query feedback.',
- oneOf: [
- {
- type: 'object',
- properties: {
- resource: {
- $ref: '#/$defs/ResourceType',
- },
- kind: {
- type: 'string',
- const: 'resource',
- },
- },
- additionalProperties: false,
- required: ['kind', 'resource'],
- },
- {
- type: 'object',
- properties: {
- kind: {
- type: 'string',
- const: 'continuation',
- },
- },
- required: ['kind'],
- additionalProperties: false,
- },
- ],
+ required: ['kind', 'operationId', 'through', 'reason'],
},
- RecoveryProtocol: {
+ ],
+ $defs: {
+ AgentRecapFailure: {
type: 'string',
- enum: ['journal_v1'],
- },
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'Nullable_AgentGoalResult',
- anyOf: [
- {
- $ref: '#/$defs/AgentGoalResult',
- },
- {
- type: 'null',
- },
- ],
- $defs: {
- AgentGoalResult: {
- oneOf: [
- {
- type: 'object',
- properties: {
- goalId: {
- type: 'string',
- format: 'uuid',
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- kind: {
- type: 'string',
- const: 'committed',
- },
- },
- additionalProperties: false,
- required: ['kind', 'goalId', 'revision'],
- },
- {
- type: 'object',
- properties: {
- actual: {
- type: ['integer', 'null'],
- format: 'uint64',
- minimum: 0,
- },
- kind: {
- type: 'string',
- const: 'conflict',
- },
- },
- additionalProperties: false,
- required: ['kind'],
- },
- {
- type: 'object',
- properties: {
- reason: {
- type: 'string',
- },
- kind: {
- type: 'string',
- const: 'rejected',
- },
- },
- additionalProperties: false,
- required: ['kind', 'reason'],
- },
- ],
+ enum: ['empty_or_oversized_output', 'incomplete_output', 'model_unavailable'],
},
},
},
resources: {},
},
- history: {
+ goal: {
mode: 'query',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentHistoryRead',
+ title: 'AgentGoalRead',
type: 'object',
properties: {
sessionId: {
type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- through: {
- type: ['integer', 'null'],
- format: 'uint64',
- minimum: 0,
- maximum: 9007199254740991,
- },
- position: {
- $ref: '#/$defs/HistoryPosition',
- },
- includeThinking: {
- type: 'boolean',
- default: false,
},
},
additionalProperties: false,
- required: ['sessionId', 'position'],
- $defs: {
- HistoryPosition: {
- description:
- 'Cursor sequence addresses a sparse transcript row; Event addresses the raw\nevent log. Before excludes its end and After includes its start. Returned\nchunks always retain ascending source order, including a reverse window.',
- oneOf: [
- {
- type: 'object',
- properties: {
- kind: {
- type: 'string',
- const: 'start',
- },
- },
- required: ['kind'],
- additionalProperties: false,
- },
- {
- type: 'object',
- properties: {
- kind: {
- type: 'string',
- const: 'tail',
- },
- },
- required: ['kind'],
- additionalProperties: false,
- },
- {
- type: 'object',
- properties: {
- cursor: {
- $ref: '#/$defs/Cursor',
- },
- kind: {
- type: 'string',
- const: 'before',
- },
- },
- additionalProperties: false,
- required: ['kind', 'cursor'],
- },
+ required: ['sessionId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentGoalView',
+ type: 'object',
+ properties: {
+ enabled: {
+ type: 'boolean',
+ },
+ current: {
+ anyOf: [
{
- type: 'object',
- properties: {
- cursor: {
- $ref: '#/$defs/Cursor',
- },
- kind: {
- type: 'string',
- const: 'after',
- },
- },
- additionalProperties: false,
- required: ['kind', 'cursor'],
+ $ref: '#/$defs/AgentGoalDetail',
},
{
- description:
- 'Locate canonical output at an execution event, including sparse rows.',
- type: 'object',
- properties: {
- sequence: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
- },
- kind: {
- type: 'string',
- const: 'event',
- },
- },
- additionalProperties: false,
- required: ['kind', 'sequence'],
+ type: 'null',
},
],
},
- Cursor: {
- description:
- "Byte offset in one message field's UTF-8 text, not a bearer capability.",
+ },
+ additionalProperties: false,
+ required: ['enabled'],
+ $defs: {
+ AgentGoalDetail: {
type: 'object',
properties: {
- field: {
- $ref: '#/$defs/HistoryField',
- default: 'body',
+ id: {
+ type: 'string',
+ format: 'uuid',
},
- sequence: {
+ revision: {
type: 'integer',
format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
+ minimum: 0,
},
- offset: {
+ objective: {
+ type: 'string',
+ },
+ status: {
+ $ref: '#/$defs/GoalStatus',
+ },
+ iterations: {
type: 'integer',
- format: 'uint64',
+ format: 'uint32',
minimum: 0,
- maximum: 9007199254740991,
},
- },
- additionalProperties: false,
- required: ['sequence', 'offset'],
- },
- HistoryField: {
- description: 'A readable field in a conversation window, in presentation order.',
- type: 'string',
- enum: ['thinking', 'body'],
- },
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentHistoryPage',
- oneOf: [
- {
- type: 'object',
- properties: {
- through: {
+ maxIterations: {
type: 'integer',
- format: 'uint64',
+ format: 'uint32',
minimum: 0,
},
- kind: {
- type: 'string',
- const: 'preparing',
- },
- },
- additionalProperties: false,
- required: ['kind', 'through'],
- },
- {
- type: 'object',
- properties: {
- through: {
- type: 'integer',
+ tokenBudget: {
+ type: ['integer', 'null'],
format: 'uint64',
minimum: 0,
},
- chunks: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentHistoryChunk',
- },
+ consumed: {
+ $ref: '#/$defs/GoalMeter',
},
- before: {
+ pending: {
+ type: 'boolean',
+ },
+ report: {
anyOf: [
{
- $ref: '#/$defs/Cursor',
+ $ref: '#/$defs/GoalReport',
},
{
type: 'null',
},
],
},
- after: {
- anyOf: [
- {
- $ref: '#/$defs/Cursor',
- },
- {
- type: 'null',
- },
- ],
- },
- kind: {
+ note: {
type: 'string',
- const: 'ready',
},
},
additionalProperties: false,
- required: ['kind', 'through', 'chunks', 'before', 'after'],
+ required: [
+ 'id',
+ 'revision',
+ 'objective',
+ 'status',
+ 'iterations',
+ 'maxIterations',
+ 'consumed',
+ 'pending',
+ 'note',
+ ],
},
- ],
- $defs: {
- AgentHistoryChunk: {
+ GoalStatus: {
+ type: 'string',
+ enum: [
+ 'armed',
+ 'active',
+ 'paused',
+ 'waiting',
+ 'achieved',
+ 'impossible',
+ 'cancelled',
+ 'cancellation_unknown',
+ 'max_iterations',
+ 'budget_limited',
+ 'budget_unknown',
+ 'blocked',
+ ],
+ },
+ GoalMeter: {
type: 'object',
properties: {
- attachments: {
- description:
- 'Display metadata only, on the first user-message fragment; no storage capability.',
- type: 'array',
- items: {
- $ref: '#/$defs/AgentHistoryAttachment',
- },
- maxItems: 8,
- },
- timing: {
- anyOf: [
- {
- $ref: '#/$defs/HistoryTurnTiming',
- },
- {
- type: 'null',
- },
- ],
- },
- field: {
- $ref: '#/$defs/HistoryField',
- },
- messageId: {
- type: 'string',
- },
- turnId: {
- type: 'string',
- },
- timestamp: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- role: {
- $ref: '#/$defs/Role',
- },
- sequence: {
+ known: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- offset: {
+ missing: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- totalBytes: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ },
+ required: ['known', 'missing'],
+ },
+ GoalReport: {
+ type: 'object',
+ properties: {
+ status: {
+ $ref: '#/$defs/GoalReportKind',
},
- text: {
+ note: {
type: 'string',
},
- tool: {
- anyOf: [
- {
- $ref: '#/$defs/HistoryTool',
- },
- {
- type: 'null',
- },
- ],
- },
},
additionalProperties: false,
- required: [
- 'field',
- 'messageId',
- 'turnId',
- 'timestamp',
- 'role',
- 'sequence',
- 'offset',
- 'totalBytes',
- 'text',
- 'tool',
- ],
+ required: ['status', 'note'],
},
- AgentHistoryAttachment: {
+ GoalReportKind: {
+ type: 'string',
+ enum: ['progress', 'achieved', 'waiting', 'impossible'],
+ },
+ },
+ },
+ resources: {},
+ },
+ goalReceipt: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentGoalReceiptRead',
+ type: 'object',
+ properties: {
+ reference: {
+ $ref: '#/$defs/RecoveryRef',
+ },
+ },
+ additionalProperties: false,
+ required: ['reference'],
+ $defs: {
+ RecoveryRef: {
type: 'object',
properties: {
- name: {
+ source: {
+ $ref: '#/$defs/DeploymentRef',
+ },
+ namespace: {
+ $ref: '#/$defs/InstanceId',
+ },
+ export: {
type: 'string',
},
- mimeType: {
+ method: {
type: 'string',
},
- bytes: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ operation: {
+ type: 'string',
+ format: 'uuid',
},
- kind: {
- $ref: '#/$defs/AttachmentKind',
+ fingerprint: {
+ type: 'string',
+ },
+ contract: {
+ $ref: '#/$defs/Contract',
+ },
+ recovery: {
+ $ref: '#/$defs/RecoveryProtocol',
},
},
additionalProperties: false,
- required: ['name', 'mimeType', 'bytes', 'kind'],
- },
- AttachmentKind: {
- type: 'string',
- enum: ['image', 'pdf', 'doc', 'code', 'other'],
+ required: [
+ 'source',
+ 'namespace',
+ 'export',
+ 'method',
+ 'operation',
+ 'fingerprint',
+ 'contract',
+ 'recovery',
+ ],
},
- HistoryTurnTiming: {
- description:
- 'Recorded logical Turn boundaries at the same history fence. An unfinished\nhistorical boundary alone does not establish that execution is still live.',
+ DeploymentRef: {
type: 'object',
properties: {
- startedAt: {
+ stateDomain: {
+ type: 'string',
+ },
+ deployment: {
+ type: 'string',
+ format: 'uuid',
+ },
+ revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
- maximum: 9007199254740991,
- },
- finished: {
- anyOf: [
- {
- $ref: '#/$defs/HistoryTurnFinished',
- },
- {
- type: 'null',
- },
- ],
},
},
additionalProperties: false,
- required: ['startedAt', 'finished'],
+ required: ['stateDomain', 'deployment', 'revision'],
},
- HistoryTurnFinished: {
+ InstanceId: {
+ description:
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ Contract: {
+ description:
+ 'Public contract definitions are package data, not live registration records.',
type: 'object',
properties: {
- at: {
+ name: {
+ type: 'string',
+ },
+ version: {
type: 'integer',
- format: 'uint64',
+ format: 'uint32',
minimum: 0,
- maximum: 9007199254740991,
},
- outcome: {
- $ref: '#/$defs/HistoryTurnOutcome',
+ transport: {
+ $ref: '#/$defs/Transport',
+ },
+ interface: {
+ $ref: '#/$defs/Interface',
},
},
additionalProperties: false,
- required: ['at', 'outcome'],
- },
- HistoryTurnOutcome: {
- type: 'string',
- enum: ['completed', 'failed', 'aborted'],
+ required: ['name', 'version', 'transport', 'interface'],
},
- HistoryField: {
- description: 'A readable field in a conversation window, in presentation order.',
+ Transport: {
type: 'string',
- enum: ['thinking', 'body'],
+ enum: ['local', 'remote'],
},
- Role: {
- description:
- 'Canonical message author/kind; the field identifies body versus thinking.\nTool body JSON contributes string values, never its keys.',
- type: 'string',
- enum: ['user', 'assistant', 'tool_call', 'tool_result'],
- },
- HistoryTool: {
- description:
- 'Canonical references at the requested fence, never execution authority.\nBoth references are present only for a unique same-Turn call/result pair\nwith matching origin and parentage. An unpaired row retains its own reference.',
- type: 'object',
- properties: {
- toolUseId: {
- type: 'string',
- },
- call: {
- anyOf: [
- {
- $ref: '#/$defs/HistoryToolCall',
+ Interface: {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ methods: {
+ type: 'object',
+ additionalProperties: {
+ $ref: '#/$defs/Method',
+ },
},
- {
- type: 'null',
+ kind: {
+ type: 'string',
+ const: 'service',
},
- ],
+ },
+ additionalProperties: false,
+ required: ['kind', 'methods'],
},
- result: {
- anyOf: [
- {
- $ref: '#/$defs/HistoryToolResult',
+ {
+ type: 'object',
+ properties: {
+ props: true,
+ events: {
+ type: 'object',
+ additionalProperties: true,
},
- {
- type: 'null',
+ captures: {
+ type: 'object',
+ additionalProperties: {
+ $ref: '#/$defs/Capture',
+ },
},
- ],
- },
- },
- additionalProperties: false,
- required: ['toolUseId', 'call', 'result'],
- },
- HistoryToolCall: {
- type: 'object',
- properties: {
- presentation: {
- description:
- 'Opaque display contract captured at dispatch; no execution authority.',
- type: ['string', 'null'],
- default: null,
- },
- sequence: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
+ kind: {
+ type: 'string',
+ const: 'component',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'props', 'events', 'captures'],
},
- name: {
- type: 'string',
+ {
+ type: 'object',
+ properties: {
+ schema: true,
+ kind: {
+ type: 'string',
+ const: 'value',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'schema'],
},
- title: {
- anyOf: [
- {
- $ref: '#/$defs/DisplayText',
+ {
+ type: 'object',
+ properties: {
+ resource: {
+ type: 'string',
},
- {
- type: 'null',
+ schema: true,
+ kind: {
+ type: 'string',
+ const: 'resource',
},
- ],
- },
- pending: {
- description:
- 'This native Turn is still open at the history fence; not execution authority.',
- type: 'boolean',
- },
- dispatched: {
- description:
- 'A unique original Host dispatch is recorded at this fence; not liveness.',
- type: 'boolean',
+ },
+ additionalProperties: false,
+ required: ['kind', 'resource', 'schema'],
},
- },
- additionalProperties: false,
- required: ['sequence', 'name', 'title', 'pending', 'dispatched'],
+ ],
},
- DisplayText: {
- description:
- 'Presentation text is distinct from the stable identity used for navigation.',
+ Method: {
type: 'object',
properties: {
- fallback: {
- type: 'string',
+ mode: {
+ $ref: '#/$defs/MethodMode',
},
- translations: {
+ input: true,
+ output: true,
+ progress: {
+ description:
+ 'Bounded transient observations from this mutation, separate from its\noriginal final receipt. Only mutation methods may declare progress.',
+ },
+ resources: {
type: 'object',
additionalProperties: {
- type: 'string',
+ $ref: '#/$defs/ResourceSlot',
},
- default: {},
},
},
additionalProperties: false,
- required: ['fallback'],
+ required: ['mode', 'input', 'output', 'resources'],
},
- HistoryToolResult: {
+ MethodMode: {
+ type: 'string',
+ enum: ['query', 'mutation', 'subscription'],
+ },
+ ResourceSlot: {
+ description:
+ 'One declared input slot: its nominal type and whether the caller may omit it.',
type: 'object',
properties: {
- settlement: {
- anyOf: [
- {
- $ref: '#/$defs/ToolSettlement',
- },
- {
- type: 'null',
- },
- ],
- },
- sequence: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
- },
- isError: {
- description: 'Does not distinguish failed from unknown effects.',
- type: 'boolean',
+ type: {
+ $ref: '#/$defs/ResourceType',
},
- image: {
- description:
- 'Canonical content is an image; this does not grant artifact reads.',
+ optional: {
type: 'boolean',
},
},
additionalProperties: false,
- required: ['settlement', 'sequence', 'isError', 'image'],
- },
- ToolSettlement: {
- description:
- 'Recorded Host settlement for presentation; returned is not business success.\nForeign/provider results do not establish this Host evidence.',
- type: 'string',
- enum: ['returned', 'failed', 'unknown', 'rejected'],
+ required: ['type', 'optional'],
},
- Cursor: {
+ ResourceType: {
description:
- "Byte offset in one message field's UTF-8 text, not a bearer capability.",
+ 'Nominal read-only resource shape, not a resource id or authorization token.',
type: 'object',
properties: {
- field: {
- $ref: '#/$defs/HistoryField',
- default: 'body',
- },
- sequence: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
+ name: {
+ type: 'string',
},
- offset: {
+ version: {
type: 'integer',
- format: 'uint64',
+ format: 'uint32',
minimum: 0,
- maximum: 9007199254740991,
},
},
additionalProperties: false,
- required: ['sequence', 'offset'],
+ required: ['name', 'version'],
},
- },
- },
- resources: {},
- },
- import: {
- mode: 'mutation',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentImportChange',
- oneOf: [
- {
+ Capture: {
type: 'object',
properties: {
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- maximum: 9007199254740991,
- },
- id: {
- type: ['string', 'null'],
- format: 'uuid',
- },
- name: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- location: {
- $ref: '#/$defs/AgentImportLocation',
- },
- kind: {
- type: 'string',
- const: 'save_source',
+ input: true,
+ output: {
+ $ref: '#/$defs/CaptureOutput',
},
},
additionalProperties: false,
- required: ['kind', 'revision', 'id', 'name', 'location'],
+ required: ['input', 'output'],
},
- {
- type: 'object',
- properties: {
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- maximum: 9007199254740991,
- },
- id: {
- type: 'string',
- format: 'uuid',
+ CaptureOutput: {
+ description:
+ 'Resource captures enter checked service slots; continuations remain in the\noriginal presentation owner and only decide admission of query feedback.',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ resource: {
+ $ref: '#/$defs/ResourceType',
+ },
+ kind: {
+ type: 'string',
+ const: 'resource',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'resource'],
},
- kind: {
- type: 'string',
- const: 'remove_source',
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'continuation',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
},
- },
- additionalProperties: false,
- required: ['kind', 'revision', 'id'],
+ ],
+ },
+ RecoveryProtocol: {
+ type: 'string',
+ enum: ['journal_v1'],
},
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'Nullable_AgentGoalResult',
+ anyOf: [
{
- type: 'object',
- properties: {
- selection: {
- $ref: '#/$defs/AgentImportSelection',
- },
- directory: {
- $ref: '#/$defs/AgentDirectorySelection',
- },
- title: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- kind: {
- type: 'string',
- const: 'copy',
- },
- },
- additionalProperties: false,
- required: ['kind', 'selection', 'directory', 'title'],
+ $ref: '#/$defs/AgentGoalResult',
+ },
+ {
+ type: 'null',
},
],
$defs: {
- AgentImportLocation: {
+ AgentGoalResult: {
oneOf: [
{
type: 'object',
properties: {
- directory: {
- $ref: '#/$defs/AgentDirectorySelection',
+ goalId: {
+ type: 'string',
+ format: 'uuid',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'codex',
+ const: 'committed',
},
},
additionalProperties: false,
- required: ['kind', 'directory'],
+ required: ['kind', 'goalId', 'revision'],
},
{
type: 'object',
properties: {
- directory: {
- $ref: '#/$defs/AgentDirectorySelection',
+ actual: {
+ type: ['integer', 'null'],
+ format: 'uint64',
+ minimum: 0,
},
kind: {
type: 'string',
- const: 'claude_code',
+ const: 'conflict',
},
},
additionalProperties: false,
- required: ['kind', 'directory'],
+ required: ['kind'],
},
{
type: 'object',
properties: {
- directory: {
- $ref: '#/$defs/AgentDirectorySelection',
- },
- database: {
+ reason: {
type: 'string',
- minLength: 1,
- maxLength: 255,
},
kind: {
type: 'string',
- const: 'open_code',
+ const: 'rejected',
},
},
additionalProperties: false,
- required: ['kind', 'directory', 'database'],
+ required: ['kind', 'reason'],
},
],
},
- AgentDirectorySelection: {
- type: 'object',
- properties: {
- rootId: {
- type: 'string',
- minLength: 1,
- maxLength: 64,
- },
- segments: {
- type: 'array',
- items: {
- type: 'string',
+ },
+ },
+ resources: {},
+ },
+ history: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentHistoryRead',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ through: {
+ type: ['integer', 'null'],
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ position: {
+ $ref: '#/$defs/HistoryPosition',
+ },
+ includeThinking: {
+ type: 'boolean',
+ default: false,
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'position'],
+ $defs: {
+ HistoryPosition: {
+ description:
+ 'Cursor sequence addresses a sparse transcript row; Event addresses the raw\nevent log. Before excludes its end and After includes its start. Returned\nchunks always retain ascending source order, including a reverse window.',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'start',
+ },
},
- maxItems: 64,
+ required: ['kind'],
+ additionalProperties: false,
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'tail',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
},
- },
- additionalProperties: false,
- required: ['rootId', 'segments', 'directoryIdentity'],
- },
- AgentImportSelection: {
- type: 'object',
- properties: {
- source: {
- $ref: '#/$defs/AgentImportSourceRef',
+ {
+ type: 'object',
+ properties: {
+ cursor: {
+ $ref: '#/$defs/Cursor',
+ },
+ kind: {
+ type: 'string',
+ const: 'before',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'cursor'],
},
- entry: {
- $ref: '#/$defs/AgentImportEntryRef',
+ {
+ type: 'object',
+ properties: {
+ cursor: {
+ $ref: '#/$defs/Cursor',
+ },
+ kind: {
+ type: 'string',
+ const: 'after',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'cursor'],
},
- digest: {
- type: 'string',
- pattern: '^[a-f0-9]{64}$',
+ {
+ description:
+ 'Locate canonical output at an execution event, including sparse rows.',
+ type: 'object',
+ properties: {
+ sequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
+ },
+ kind: {
+ type: 'string',
+ const: 'event',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'sequence'],
},
- },
- additionalProperties: false,
- required: ['source', 'entry', 'digest'],
+ ],
},
- AgentImportSourceRef: {
+ Cursor: {
+ description:
+ "Byte offset in one message field's UTF-8 text, not a bearer capability.",
type: 'object',
properties: {
- id: {
- type: 'string',
- format: 'uuid',
+ field: {
+ $ref: '#/$defs/HistoryField',
+ default: 'body',
},
- revision: {
+ sequence: {
type: 'integer',
format: 'uint64',
minimum: 1,
maximum: 9007199254740991,
},
- },
- additionalProperties: false,
- required: ['id', 'revision'],
- },
- AgentImportEntryRef: {
- type: 'object',
- properties: {
- sessionId: {
- type: 'string',
- minLength: 1,
- maxLength: 1024,
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
+ offset: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
},
},
additionalProperties: false,
- required: ['sessionId', 'path'],
+ required: ['sequence', 'offset'],
+ },
+ HistoryField: {
+ description: 'A readable field in a conversation window, in presentation order.',
+ type: 'string',
+ enum: ['thinking', 'body'],
},
},
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentImportResult',
+ title: 'AgentHistoryPage',
oneOf: [
{
type: 'object',
properties: {
- revision: {
+ through: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- sources: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentImportSource',
- },
- },
kind: {
type: 'string',
- const: 'sources',
+ const: 'preparing',
},
},
additionalProperties: false,
- required: ['kind', 'revision', 'sources'],
+ required: ['kind', 'through'],
},
{
type: 'object',
properties: {
- session: {
- $ref: '#/$defs/AgentSession',
+ through: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ chunks: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentHistoryChunk',
+ },
+ },
+ before: {
+ anyOf: [
+ {
+ $ref: '#/$defs/Cursor',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ after: {
+ anyOf: [
+ {
+ $ref: '#/$defs/Cursor',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
kind: {
type: 'string',
- const: 'imported',
+ const: 'ready',
},
},
additionalProperties: false,
- required: ['kind', 'session'],
+ required: ['kind', 'through', 'chunks', 'before', 'after'],
},
- {
+ ],
+ $defs: {
+ AgentHistoryChunk: {
type: 'object',
properties: {
- kind: {
+ attachments: {
+ description:
+ 'Display metadata only, on the first user-message fragment; no storage capability.',
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentHistoryAttachment',
+ },
+ maxItems: 8,
+ },
+ timing: {
+ anyOf: [
+ {
+ $ref: '#/$defs/HistoryTurnTiming',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ field: {
+ $ref: '#/$defs/HistoryField',
+ },
+ messageId: {
type: 'string',
- const: 'changed',
},
- },
- required: ['kind'],
- additionalProperties: false,
- },
- {
- type: 'object',
- properties: {
- kind: {
+ turnId: {
type: 'string',
- const: 'unavailable',
+ },
+ timestamp: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ role: {
+ $ref: '#/$defs/Role',
+ },
+ sequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ offset: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ totalBytes: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ text: {
+ type: 'string',
+ },
+ tool: {
+ anyOf: [
+ {
+ $ref: '#/$defs/HistoryTool',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
- required: ['kind'],
additionalProperties: false,
+ required: [
+ 'field',
+ 'messageId',
+ 'turnId',
+ 'timestamp',
+ 'role',
+ 'sequence',
+ 'offset',
+ 'totalBytes',
+ 'text',
+ 'tool',
+ ],
},
- {
+ AgentHistoryAttachment: {
type: 'object',
properties: {
- kind: {
+ name: {
type: 'string',
- const: 'invalid',
+ },
+ mimeType: {
+ type: 'string',
+ },
+ bytes: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ kind: {
+ $ref: '#/$defs/AttachmentKind',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['name', 'mimeType', 'bytes', 'kind'],
},
- {
+ AttachmentKind: {
+ type: 'string',
+ enum: ['image', 'pdf', 'doc', 'code', 'other'],
+ },
+ HistoryTurnTiming: {
+ description:
+ 'Recorded logical Turn boundaries at the same history fence. An unfinished\nhistorical boundary alone does not establish that execution is still live.',
type: 'object',
properties: {
- kind: {
- type: 'string',
- const: 'busy',
+ startedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ finished: {
+ anyOf: [
+ {
+ $ref: '#/$defs/HistoryTurnFinished',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['startedAt', 'finished'],
},
- {
+ HistoryTurnFinished: {
type: 'object',
properties: {
- kind: {
- type: 'string',
- const: 'limit',
+ at: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ outcome: {
+ $ref: '#/$defs/HistoryTurnOutcome',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['at', 'outcome'],
},
- ],
- $defs: {
- AgentImportSource: {
+ HistoryTurnOutcome: {
+ type: 'string',
+ enum: ['completed', 'failed', 'aborted'],
+ },
+ HistoryField: {
+ description: 'A readable field in a conversation window, in presentation order.',
+ type: 'string',
+ enum: ['thinking', 'body'],
+ },
+ Role: {
+ description:
+ 'Canonical message author/kind; the field identifies body versus thinking.\nTool body JSON contributes string values, never its keys.',
+ type: 'string',
+ enum: ['user', 'assistant', 'tool_call', 'tool_result'],
+ },
+ HistoryTool: {
+ description:
+ 'Canonical references at the requested fence, never execution authority.\nBoth references are present only for a unique same-Turn call/result pair\nwith matching origin and parentage. An unpaired row retains its own reference.',
type: 'object',
properties: {
- id: {
- type: 'string',
- format: 'uuid',
- },
- name: {
+ toolUseId: {
type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- location: {
- $ref: '#/$defs/AgentImportLocation',
},
- path: {
+ call: {
+ anyOf: [
+ {
+ $ref: '#/$defs/HistoryToolCall',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ result: {
+ anyOf: [
+ {
+ $ref: '#/$defs/HistoryToolResult',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ },
+ additionalProperties: false,
+ required: ['toolUseId', 'call', 'result'],
+ },
+ HistoryToolCall: {
+ type: 'object',
+ properties: {
+ presentation: {
+ description:
+ 'Opaque display contract captured at dispatch; no execution authority.',
+ type: ['string', 'null'],
+ default: null,
+ },
+ sequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
+ },
+ name: {
+ type: 'string',
+ },
+ title: {
+ anyOf: [
+ {
+ $ref: '#/$defs/DisplayText',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ pending: {
+ description:
+ 'This native Turn is still open at the history fence; not execution authority.',
+ type: 'boolean',
+ },
+ dispatched: {
+ description:
+ 'A unique original Host dispatch is recorded at this fence; not liveness.',
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['sequence', 'name', 'title', 'pending', 'dispatched'],
+ },
+ DisplayText: {
+ description:
+ 'Presentation text is distinct from the stable identity used for navigation.',
+ type: 'object',
+ properties: {
+ fallback: {
+ type: 'string',
+ },
+ translations: {
+ type: 'object',
+ additionalProperties: {
+ type: 'string',
+ },
+ default: {},
+ },
+ },
+ additionalProperties: false,
+ required: ['fallback'],
+ },
+ HistoryToolResult: {
+ type: 'object',
+ properties: {
+ settlement: {
+ anyOf: [
+ {
+ $ref: '#/$defs/ToolSettlement',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ sequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
+ },
+ isError: {
+ description: 'Does not distinguish failed from unknown effects.',
+ type: 'boolean',
+ },
+ image: {
+ description:
+ 'Canonical content is an image; this does not grant artifact reads.',
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['settlement', 'sequence', 'isError', 'image'],
+ },
+ ToolSettlement: {
+ description:
+ 'Recorded Host settlement for presentation; returned is not business success.\nForeign/provider results do not establish this Host evidence.',
+ type: 'string',
+ enum: ['returned', 'failed', 'unknown', 'rejected'],
+ },
+ Cursor: {
+ description:
+ "Byte offset in one message field's UTF-8 text, not a bearer capability.",
+ type: 'object',
+ properties: {
+ field: {
+ $ref: '#/$defs/HistoryField',
+ default: 'body',
+ },
+ sequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
+ },
+ offset: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ },
+ additionalProperties: false,
+ required: ['sequence', 'offset'],
+ },
+ },
+ },
+ resources: {},
+ },
+ import: {
+ mode: 'mutation',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentImportChange',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ id: {
+ type: ['string', 'null'],
+ format: 'uuid',
+ },
+ name: {
type: 'string',
minLength: 1,
- maxLength: 4096,
+ maxLength: 128,
+ },
+ location: {
+ $ref: '#/$defs/AgentImportLocation',
+ },
+ kind: {
+ type: 'string',
+ const: 'save_source',
},
},
additionalProperties: false,
- required: ['id', 'name', 'location', 'path'],
+ required: ['kind', 'revision', 'id', 'name', 'location'],
+ },
+ {
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 9007199254740991,
+ },
+ id: {
+ type: 'string',
+ format: 'uuid',
+ },
+ kind: {
+ type: 'string',
+ const: 'remove_source',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'revision', 'id'],
+ },
+ {
+ type: 'object',
+ properties: {
+ selection: {
+ $ref: '#/$defs/AgentImportSelection',
+ },
+ directory: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ title: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ kind: {
+ type: 'string',
+ const: 'copy',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'selection', 'directory', 'title'],
},
+ ],
+ $defs: {
AgentImportLocation: {
oneOf: [
{
@@ -10567,215 +10667,105 @@ export const contracts = {
additionalProperties: false,
required: ['rootId', 'segments', 'directoryIdentity'],
},
- AgentSession: {
+ AgentImportSelection: {
type: 'object',
properties: {
- tools: {
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- },
- dataSource: {
- $ref: '#/$defs/AgentDataSource',
- },
- permissions: {
- $ref: '#/$defs/AgentWorkspacePermissions',
- },
- boundaryRevision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ source: {
+ $ref: '#/$defs/AgentImportSourceRef',
},
- id: {
- type: 'string',
+ entry: {
+ $ref: '#/$defs/AgentImportEntryRef',
},
- title: {
+ digest: {
type: 'string',
- },
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- workspace: {
- $ref: '#/$defs/AgentWorkspace',
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- updatedAt: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- archived: {
- type: 'boolean',
- },
- hasUnread: {
- type: 'boolean',
- },
- activity: {
- $ref: '#/$defs/AgentSessionActivity',
+ pattern: '^[a-f0-9]{64}$',
},
},
additionalProperties: false,
- required: [
- 'dataSource',
- 'permissions',
- 'boundaryRevision',
- 'id',
- 'title',
- 'labels',
- 'workspace',
- 'revision',
- 'updatedAt',
- 'archived',
- 'hasUnread',
- 'activity',
- ],
+ required: ['source', 'entry', 'digest'],
},
- AgentDataSource: {
- description:
- 'Stable business-data origin, independent of package or activation revisions.',
+ AgentImportSourceRef: {
type: 'object',
properties: {
- stateDomain: {
- type: 'string',
- },
- deployment: {
+ id: {
type: 'string',
format: 'uuid',
},
- namespace: {
- $ref: '#/$defs/InstanceId',
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
},
},
additionalProperties: false,
- required: ['stateDomain', 'deployment', 'namespace'],
- },
- InstanceId: {
- description:
- 'Hierarchical, stable source keys. Display aliases never become data identities.',
- type: 'array',
- items: {
- type: 'string',
- format: 'uuid',
- },
+ required: ['id', 'revision'],
},
- AgentWorkspacePermissions: {
+ AgentImportEntryRef: {
type: 'object',
properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 1024,
},
- requestPermissions: {
- type: 'boolean',
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
},
},
additionalProperties: false,
- required: ['access', 'requestPermissions'],
- },
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
- type: 'string',
- enum: ['read_only', 'workspace_write'],
+ required: ['sessionId', 'path'],
},
- AgentWorkspace: {
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentImportResult',
+ oneOf: [
+ {
type: 'object',
properties: {
- worktree: {
- description:
- 'Native owner allocation; never accepted from a caller as workspace authority.',
- anyOf: [
- {
- $ref: '#/$defs/Binding',
- },
- {
- type: 'null',
- },
- ],
- },
- projectId: {
- description: "Optional membership in this Agent's canonical Project catalog.",
- type: ['string', 'null'],
- format: 'uuid',
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ sources: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentImportSource',
+ },
},
- identity: {
+ kind: {
type: 'string',
- pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ const: 'sources',
},
},
additionalProperties: false,
- required: ['path', 'directoryIdentity', 'identity'],
+ required: ['kind', 'revision', 'sources'],
},
- Binding: {
- description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ {
type: 'object',
properties: {
- id: {
- type: 'string',
- },
- common_dir: {
- type: 'string',
- },
- source: {
- type: 'string',
- },
- source_identity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
- },
- base_commit: {
- type: 'string',
+ session: {
+ $ref: '#/$defs/AgentSession',
},
- directory: {
+ kind: {
type: 'string',
+ const: 'imported',
},
},
additionalProperties: false,
- required: [
- 'id',
- 'common_dir',
- 'source',
- 'source_identity',
- 'base_commit',
- 'directory',
- ],
- },
- AgentSessionActivity: {
- type: 'string',
- enum: ['idle', 'working', 'waiting'],
+ required: ['kind', 'session'],
},
- },
- },
- resources: {},
- },
- importDirectories: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentDirectories',
- oneOf: [
{
type: 'object',
properties: {
kind: {
type: 'string',
- const: 'roots',
+ const: 'changed',
},
},
required: ['kind'],
@@ -10784,110 +10774,123 @@ export const contracts = {
{
type: 'object',
properties: {
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
- },
- after: {
- type: ['string', 'null'],
- },
kind: {
type: 'string',
- const: 'children',
+ const: 'unavailable',
},
},
+ required: ['kind'],
additionalProperties: false,
- required: ['kind', 'selection', 'after'],
},
- ],
- $defs: {
- AgentDirectorySelection: {
+ {
type: 'object',
properties: {
- rootId: {
- type: 'string',
- minLength: 1,
- maxLength: 64,
- },
- segments: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 64,
- },
- directoryIdentity: {
+ kind: {
type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ const: 'invalid',
},
},
+ required: ['kind'],
additionalProperties: false,
- required: ['rootId', 'segments', 'directoryIdentity'],
},
- },
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentDirectoryPage',
- oneOf: [
{
type: 'object',
properties: {
- roots: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentDirectory',
- },
- maxItems: 8,
- },
kind: {
type: 'string',
- const: 'roots',
+ const: 'busy',
},
},
+ required: ['kind'],
additionalProperties: false,
- required: ['kind', 'roots'],
},
{
type: 'object',
properties: {
- directory: {
- $ref: '#/$defs/AgentDirectory',
- },
- children: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentDirectory',
- },
- maxItems: 32,
- },
- after: {
- type: ['string', 'null'],
- },
kind: {
type: 'string',
- const: 'children',
+ const: 'limit',
},
},
+ required: ['kind'],
additionalProperties: false,
- required: ['kind', 'directory', 'children', 'after'],
},
],
$defs: {
- AgentDirectory: {
+ AgentImportSource: {
type: 'object',
properties: {
- name: {
+ id: {
type: 'string',
+ format: 'uuid',
},
- path: {
+ name: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- selection: {
- $ref: '#/$defs/AgentDirectorySelection',
+ location: {
+ $ref: '#/$defs/AgentImportLocation',
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
},
},
additionalProperties: false,
- required: ['name', 'path', 'selection'],
+ required: ['id', 'name', 'location', 'path'],
+ },
+ AgentImportLocation: {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ directory: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ kind: {
+ type: 'string',
+ const: 'codex',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'directory'],
+ },
+ {
+ type: 'object',
+ properties: {
+ directory: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ kind: {
+ type: 'string',
+ const: 'claude_code',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'directory'],
+ },
+ {
+ type: 'object',
+ properties: {
+ directory: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ database: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 255,
+ },
+ kind: {
+ type: 'string',
+ const: 'open_code',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'directory', 'database'],
+ },
+ ],
},
AgentDirectorySelection: {
type: 'object',
@@ -10912,241 +10915,375 @@ export const contracts = {
additionalProperties: false,
required: ['rootId', 'segments', 'directoryIdentity'],
},
- },
- },
- resources: {},
- },
- imports: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentImportsRead',
- oneOf: [
- {
+ AgentSession: {
type: 'object',
properties: {
- kind: {
- type: 'string',
- const: 'sources',
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
},
- },
- required: ['kind'],
- additionalProperties: false,
- },
- {
- type: 'object',
- properties: {
- source: {
- $ref: '#/$defs/AgentImportSourceRef',
+ tools: {
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
},
- query: {
- $ref: '#/$defs/AgentImportQuery',
+ dataSource: {
+ $ref: '#/$defs/AgentDataSource',
},
- kind: {
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ id: {
type: 'string',
- const: 'catalog',
},
- },
- additionalProperties: false,
- required: ['kind', 'source', 'query'],
- },
- {
- type: 'object',
- properties: {
- source: {
- $ref: '#/$defs/AgentImportSourceRef',
+ title: {
+ type: 'string',
},
- entry: {
- $ref: '#/$defs/AgentImportEntryRef',
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
},
- digest: {
- type: ['string', 'null'],
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
},
- after: {
+ revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
- maximum: 7499,
},
- kind: {
- type: 'string',
- const: 'preview',
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
- },
- additionalProperties: false,
- required: ['kind', 'source', 'entry', 'digest', 'after'],
- },
- {
- type: 'object',
- properties: {
- after: {
- type: ['string', 'null'],
+ archived: {
+ type: 'boolean',
},
- kind: {
- type: 'string',
- const: 'copies',
+ hasUnread: {
+ type: 'boolean',
+ },
+ activity: {
+ $ref: '#/$defs/AgentSessionActivity',
},
},
additionalProperties: false,
- required: ['kind', 'after'],
+ required: [
+ 'dataSource',
+ 'permissions',
+ 'boundaryRevision',
+ 'id',
+ 'title',
+ 'labels',
+ 'workspace',
+ 'revision',
+ 'updatedAt',
+ 'archived',
+ 'hasUnread',
+ 'activity',
+ ],
},
- ],
- $defs: {
- AgentImportSourceRef: {
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
+ AgentDataSource: {
+ description:
+ 'Stable business-data origin, independent of package or activation revisions.',
type: 'object',
properties: {
- id: {
+ stateDomain: {
+ type: 'string',
+ },
+ deployment: {
type: 'string',
format: 'uuid',
},
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
+ namespace: {
+ $ref: '#/$defs/InstanceId',
},
},
additionalProperties: false,
- required: ['id', 'revision'],
+ required: ['stateDomain', 'deployment', 'namespace'],
},
- AgentImportQuery: {
+ InstanceId: {
+ description:
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ AgentWorkspacePermissions: {
type: 'object',
properties: {
- text: {
- type: 'string',
- maxLength: 1024,
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
},
- includeArchived: {
+ requestPermissions: {
type: 'boolean',
},
- cursor: {
- type: ['string', 'null'],
- },
},
additionalProperties: false,
- required: ['text', 'includeArchived', 'cursor'],
+ required: ['access', 'requestPermissions'],
},
- AgentImportEntryRef: {
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ AgentWorkspace: {
type: 'object',
properties: {
- sessionId: {
- type: 'string',
- minLength: 1,
- maxLength: 1024,
+ worktree: {
+ description:
+ 'Native owner allocation; never accepted from a caller as workspace authority.',
+ anyOf: [
+ {
+ $ref: '#/$defs/Binding',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ projectId: {
+ description: "Optional membership in this Agent's canonical Project catalog.",
+ type: ['string', 'null'],
+ format: 'uuid',
},
path: {
type: 'string',
minLength: 1,
maxLength: 4096,
},
- },
- additionalProperties: false,
- required: ['sessionId', 'path'],
- },
- },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ identity: {
+ type: 'string',
+ pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['path', 'directoryIdentity', 'identity'],
+ },
+ Binding: {
+ description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ common_dir: {
+ type: 'string',
+ },
+ source: {
+ type: 'string',
+ },
+ source_identity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ base_commit: {
+ type: 'string',
+ },
+ directory: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'id',
+ 'common_dir',
+ 'source',
+ 'source_identity',
+ 'base_commit',
+ 'directory',
+ ],
+ },
+ AgentSessionActivity: {
+ type: 'string',
+ enum: ['idle', 'working', 'waiting'],
+ },
+ },
},
- output: {
+ resources: {},
+ },
+ importDirectories: {
+ mode: 'query',
+ input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentImportsPage',
+ title: 'AgentDirectories',
oneOf: [
{
type: 'object',
properties: {
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ kind: {
+ type: 'string',
+ const: 'roots',
},
- sources: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentImportSource',
- },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ after: {
+ type: ['string', 'null'],
},
kind: {
type: 'string',
- const: 'sources',
+ const: 'children',
},
},
additionalProperties: false,
- required: ['kind', 'revision', 'sources'],
+ required: ['kind', 'selection', 'after'],
},
- {
+ ],
+ $defs: {
+ AgentDirectorySelection: {
type: 'object',
properties: {
- source: {
- $ref: '#/$defs/AgentImportSourceRef',
+ rootId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 64,
},
- entries: {
+ segments: {
type: 'array',
items: {
- $ref: '#/$defs/AgentImportEntry',
+ type: 'string',
},
- maxItems: 16,
- },
- next: {
- type: ['string', 'null'],
+ maxItems: 64,
},
- kind: {
+ directoryIdentity: {
type: 'string',
- const: 'catalog',
+ pattern: '^sha256:[a-f0-9]{64}$',
},
},
additionalProperties: false,
- required: ['kind', 'source', 'entries', 'next'],
+ required: ['rootId', 'segments', 'directoryIdentity'],
},
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentDirectoryPage',
+ oneOf: [
{
type: 'object',
properties: {
- preview: {
- $ref: '#/$defs/AgentImportPreview',
+ roots: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentDirectory',
+ },
+ maxItems: 8,
},
kind: {
type: 'string',
- const: 'preview',
+ const: 'roots',
},
},
additionalProperties: false,
- required: ['kind', 'preview'],
+ required: ['kind', 'roots'],
},
{
type: 'object',
properties: {
- sessions: {
+ directory: {
+ $ref: '#/$defs/AgentDirectory',
+ },
+ children: {
type: 'array',
items: {
- $ref: '#/$defs/AgentSession',
+ $ref: '#/$defs/AgentDirectory',
},
- maxItems: 16,
+ maxItems: 32,
},
- next: {
+ after: {
type: ['string', 'null'],
},
kind: {
type: 'string',
- const: 'copies',
+ const: 'children',
},
},
additionalProperties: false,
- required: ['kind', 'sessions', 'next'],
+ required: ['kind', 'directory', 'children', 'after'],
},
- {
+ ],
+ $defs: {
+ AgentDirectory: {
type: 'object',
properties: {
- kind: {
+ name: {
type: 'string',
- const: 'changed',
+ },
+ path: {
+ type: 'string',
+ },
+ selection: {
+ $ref: '#/$defs/AgentDirectorySelection',
+ },
+ },
+ additionalProperties: false,
+ required: ['name', 'path', 'selection'],
+ },
+ AgentDirectorySelection: {
+ type: 'object',
+ properties: {
+ rootId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 64,
+ },
+ segments: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 64,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['rootId', 'segments', 'directoryIdentity'],
},
+ },
+ },
+ resources: {},
+ },
+ imports: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentImportsRead',
+ oneOf: [
{
type: 'object',
properties: {
kind: {
type: 'string',
- const: 'unavailable',
+ const: 'sources',
},
},
required: ['kind'],
@@ -11155,66 +11292,285 @@ export const contracts = {
{
type: 'object',
properties: {
+ source: {
+ $ref: '#/$defs/AgentImportSourceRef',
+ },
+ query: {
+ $ref: '#/$defs/AgentImportQuery',
+ },
kind: {
type: 'string',
- const: 'invalid',
+ const: 'catalog',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['kind', 'source', 'query'],
},
{
type: 'object',
properties: {
+ source: {
+ $ref: '#/$defs/AgentImportSourceRef',
+ },
+ entry: {
+ $ref: '#/$defs/AgentImportEntryRef',
+ },
+ digest: {
+ type: ['string', 'null'],
+ },
+ after: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ maximum: 7499,
+ },
kind: {
type: 'string',
- const: 'busy',
+ const: 'preview',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['kind', 'source', 'entry', 'digest', 'after'],
},
{
type: 'object',
properties: {
+ after: {
+ type: ['string', 'null'],
+ },
kind: {
type: 'string',
- const: 'limit',
+ const: 'copies',
},
},
- required: ['kind'],
additionalProperties: false,
+ required: ['kind', 'after'],
},
],
$defs: {
- AgentImportSource: {
+ AgentImportSourceRef: {
type: 'object',
properties: {
id: {
type: 'string',
format: 'uuid',
},
- name: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- location: {
- $ref: '#/$defs/AgentImportLocation',
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
},
},
additionalProperties: false,
- required: ['id', 'name', 'location', 'path'],
+ required: ['id', 'revision'],
},
- AgentImportLocation: {
- oneOf: [
- {
- type: 'object',
+ AgentImportQuery: {
+ type: 'object',
+ properties: {
+ text: {
+ type: 'string',
+ maxLength: 1024,
+ },
+ includeArchived: {
+ type: 'boolean',
+ },
+ cursor: {
+ type: ['string', 'null'],
+ },
+ },
+ additionalProperties: false,
+ required: ['text', 'includeArchived', 'cursor'],
+ },
+ AgentImportEntryRef: {
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 1024,
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'path'],
+ },
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentImportsPage',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ sources: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentImportSource',
+ },
+ },
+ kind: {
+ type: 'string',
+ const: 'sources',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'revision', 'sources'],
+ },
+ {
+ type: 'object',
+ properties: {
+ source: {
+ $ref: '#/$defs/AgentImportSourceRef',
+ },
+ entries: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentImportEntry',
+ },
+ maxItems: 16,
+ },
+ next: {
+ type: ['string', 'null'],
+ },
+ kind: {
+ type: 'string',
+ const: 'catalog',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'source', 'entries', 'next'],
+ },
+ {
+ type: 'object',
+ properties: {
+ preview: {
+ $ref: '#/$defs/AgentImportPreview',
+ },
+ kind: {
+ type: 'string',
+ const: 'preview',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'preview'],
+ },
+ {
+ type: 'object',
+ properties: {
+ sessions: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentSession',
+ },
+ maxItems: 16,
+ },
+ next: {
+ type: ['string', 'null'],
+ },
+ kind: {
+ type: 'string',
+ const: 'copies',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'sessions', 'next'],
+ },
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'changed',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'unavailable',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'invalid',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'busy',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'limit',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
+ },
+ ],
+ $defs: {
+ AgentImportSource: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ format: 'uuid',
+ },
+ name: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ location: {
+ $ref: '#/$defs/AgentImportLocation',
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'name', 'location', 'path'],
+ },
+ AgentImportLocation: {
+ oneOf: [
+ {
+ type: 'object',
properties: {
directory: {
$ref: '#/$defs/AgentDirectorySelection',
@@ -11442,6 +11798,10 @@ export const contracts = {
AgentSession: {
type: 'object',
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -11510,6 +11870,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
description:
'Stable business-data origin, independent of package or activation revisions.',
@@ -12606,39 +12970,938 @@ export const contracts = {
},
},
},
- output: {
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentSessionPage',
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'string',
+ },
+ needsYouCount: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ sessions: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentSession',
+ },
+ maxItems: 32,
+ },
+ before: {
+ type: ['string', 'null'],
+ },
+ after: {
+ type: ['string', 'null'],
+ },
+ },
+ additionalProperties: false,
+ required: ['revision', 'needsYouCount', 'sessions', 'before', 'after'],
+ $defs: {
+ AgentSession: {
+ type: 'object',
+ properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
+ tools: {
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
+ },
+ dataSource: {
+ $ref: '#/$defs/AgentDataSource',
+ },
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ id: {
+ type: 'string',
+ },
+ title: {
+ type: 'string',
+ },
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ archived: {
+ type: 'boolean',
+ },
+ hasUnread: {
+ type: 'boolean',
+ },
+ activity: {
+ $ref: '#/$defs/AgentSessionActivity',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'dataSource',
+ 'permissions',
+ 'boundaryRevision',
+ 'id',
+ 'title',
+ 'labels',
+ 'workspace',
+ 'revision',
+ 'updatedAt',
+ 'archived',
+ 'hasUnread',
+ 'activity',
+ ],
+ },
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
+ AgentDataSource: {
+ description:
+ 'Stable business-data origin, independent of package or activation revisions.',
+ type: 'object',
+ properties: {
+ stateDomain: {
+ type: 'string',
+ },
+ deployment: {
+ type: 'string',
+ format: 'uuid',
+ },
+ namespace: {
+ $ref: '#/$defs/InstanceId',
+ },
+ },
+ additionalProperties: false,
+ required: ['stateDomain', 'deployment', 'namespace'],
+ },
+ InstanceId: {
+ description:
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ AgentWorkspacePermissions: {
+ type: 'object',
+ properties: {
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
+ },
+ requestPermissions: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['access', 'requestPermissions'],
+ },
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ AgentWorkspace: {
+ type: 'object',
+ properties: {
+ worktree: {
+ description:
+ 'Native owner allocation; never accepted from a caller as workspace authority.',
+ anyOf: [
+ {
+ $ref: '#/$defs/Binding',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ projectId: {
+ description: "Optional membership in this Agent's canonical Project catalog.",
+ type: ['string', 'null'],
+ format: 'uuid',
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ identity: {
+ type: 'string',
+ pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['path', 'directoryIdentity', 'identity'],
+ },
+ Binding: {
+ description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ common_dir: {
+ type: 'string',
+ },
+ source: {
+ type: 'string',
+ },
+ source_identity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ base_commit: {
+ type: 'string',
+ },
+ directory: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'id',
+ 'common_dir',
+ 'source',
+ 'source_identity',
+ 'base_commit',
+ 'directory',
+ ],
+ },
+ AgentSessionActivity: {
+ type: 'string',
+ enum: ['idle', 'working', 'waiting'],
+ },
+ },
+ },
+ resources: {},
+ },
+ markRead: {
+ mode: 'mutation',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentMarkRead',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ messageId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'messageId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentMarkReadResult',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ session: {
+ $ref: '#/$defs/AgentSession',
+ },
+ kind: {
+ type: 'string',
+ const: 'observed',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'session'],
+ },
+ {
+ type: 'object',
+ properties: {
+ reason: {
+ $ref: '#/$defs/AgentRejection',
+ },
+ kind: {
+ type: 'string',
+ const: 'rejected',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'reason'],
+ },
+ ],
+ $defs: {
+ AgentSession: {
+ type: 'object',
+ properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
+ tools: {
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
+ },
+ dataSource: {
+ $ref: '#/$defs/AgentDataSource',
+ },
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ id: {
+ type: 'string',
+ },
+ title: {
+ type: 'string',
+ },
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ archived: {
+ type: 'boolean',
+ },
+ hasUnread: {
+ type: 'boolean',
+ },
+ activity: {
+ $ref: '#/$defs/AgentSessionActivity',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'dataSource',
+ 'permissions',
+ 'boundaryRevision',
+ 'id',
+ 'title',
+ 'labels',
+ 'workspace',
+ 'revision',
+ 'updatedAt',
+ 'archived',
+ 'hasUnread',
+ 'activity',
+ ],
+ },
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
+ AgentDataSource: {
+ description:
+ 'Stable business-data origin, independent of package or activation revisions.',
+ type: 'object',
+ properties: {
+ stateDomain: {
+ type: 'string',
+ },
+ deployment: {
+ type: 'string',
+ format: 'uuid',
+ },
+ namespace: {
+ $ref: '#/$defs/InstanceId',
+ },
+ },
+ additionalProperties: false,
+ required: ['stateDomain', 'deployment', 'namespace'],
+ },
+ InstanceId: {
+ description:
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ AgentWorkspacePermissions: {
+ type: 'object',
+ properties: {
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
+ },
+ requestPermissions: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['access', 'requestPermissions'],
+ },
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ AgentWorkspace: {
+ type: 'object',
+ properties: {
+ worktree: {
+ description:
+ 'Native owner allocation; never accepted from a caller as workspace authority.',
+ anyOf: [
+ {
+ $ref: '#/$defs/Binding',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ projectId: {
+ description: "Optional membership in this Agent's canonical Project catalog.",
+ type: ['string', 'null'],
+ format: 'uuid',
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ identity: {
+ type: 'string',
+ pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['path', 'directoryIdentity', 'identity'],
+ },
+ Binding: {
+ description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ common_dir: {
+ type: 'string',
+ },
+ source: {
+ type: 'string',
+ },
+ source_identity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ base_commit: {
+ type: 'string',
+ },
+ directory: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'id',
+ 'common_dir',
+ 'source',
+ 'source_identity',
+ 'base_commit',
+ 'directory',
+ ],
+ },
+ AgentSessionActivity: {
+ type: 'string',
+ enum: ['idle', 'working', 'waiting'],
+ },
+ AgentRejection: {
+ type: 'string',
+ enum: [
+ 'title_invalid',
+ 'labels_invalid',
+ 'tools_unavailable',
+ 'busy',
+ 'workspace_unavailable',
+ 'session_unavailable',
+ 'closed',
+ ],
+ },
+ },
+ },
+ resources: {},
+ },
+ metadata: {
+ mode: 'mutation',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentMetadata',
+ type: 'object',
+ properties: {
+ collaborationMode: {
+ description: 'Changing collaboration is only allowed while the Session is idle.',
+ anyOf: [
+ {
+ $ref: '#/$defs/CollaborationMode',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ default: null,
+ },
+ permissions: {
+ description: 'Omission leaves the permission boundary and its approvals unchanged.',
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentPermissionChange',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ sessionId: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ expectedRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 1,
+ maximum: 9007199254740991,
+ },
+ title: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ },
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 32,
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId', 'expectedRevision', 'title', 'labels'],
+ $defs: {
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
+ AgentPermissionChange: {
+ type: 'object',
+ properties: {
+ settings: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ revokeGrants: {
+ description:
+ 'Invalidate additive approvals even when the base policy is unchanged.',
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['settings', 'revokeGrants'],
+ },
+ AgentWorkspacePermissions: {
+ type: 'object',
+ properties: {
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
+ },
+ requestPermissions: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['access', 'requestPermissions'],
+ },
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ },
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentMetadataResult',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ session: {
+ $ref: '#/$defs/AgentSession',
+ },
+ kind: {
+ type: 'string',
+ const: 'committed',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'session'],
+ },
+ {
+ type: 'object',
+ properties: {
+ expected: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ actual: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ kind: {
+ type: 'string',
+ const: 'revision_conflict',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'expected', 'actual'],
+ },
+ {
+ type: 'object',
+ properties: {
+ reason: {
+ $ref: '#/$defs/AgentRejection',
+ },
+ kind: {
+ type: 'string',
+ const: 'rejected',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'reason'],
+ },
+ ],
+ $defs: {
+ AgentSession: {
+ type: 'object',
+ properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
+ tools: {
+ type: ['array', 'null'],
+ items: {
+ type: 'string',
+ },
+ },
+ dataSource: {
+ $ref: '#/$defs/AgentDataSource',
+ },
+ permissions: {
+ $ref: '#/$defs/AgentWorkspacePermissions',
+ },
+ boundaryRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ id: {
+ type: 'string',
+ },
+ title: {
+ type: 'string',
+ },
+ labels: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ workspace: {
+ $ref: '#/$defs/AgentWorkspace',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ archived: {
+ type: 'boolean',
+ },
+ hasUnread: {
+ type: 'boolean',
+ },
+ activity: {
+ $ref: '#/$defs/AgentSessionActivity',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'dataSource',
+ 'permissions',
+ 'boundaryRevision',
+ 'id',
+ 'title',
+ 'labels',
+ 'workspace',
+ 'revision',
+ 'updatedAt',
+ 'archived',
+ 'hasUnread',
+ 'activity',
+ ],
+ },
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
+ AgentDataSource: {
+ description:
+ 'Stable business-data origin, independent of package or activation revisions.',
+ type: 'object',
+ properties: {
+ stateDomain: {
+ type: 'string',
+ },
+ deployment: {
+ type: 'string',
+ format: 'uuid',
+ },
+ namespace: {
+ $ref: '#/$defs/InstanceId',
+ },
+ },
+ additionalProperties: false,
+ required: ['stateDomain', 'deployment', 'namespace'],
+ },
+ InstanceId: {
+ description:
+ 'Hierarchical, stable source keys. Display aliases never become data identities.',
+ type: 'array',
+ items: {
+ type: 'string',
+ format: 'uuid',
+ },
+ },
+ AgentWorkspacePermissions: {
+ type: 'object',
+ properties: {
+ access: {
+ $ref: '#/$defs/AgentWorkspaceAccess',
+ },
+ requestPermissions: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ required: ['access', 'requestPermissions'],
+ },
+ AgentWorkspaceAccess: {
+ description:
+ 'Access inside the original selected directory; never an ambient filesystem grant.',
+ type: 'string',
+ enum: ['read_only', 'workspace_write'],
+ },
+ AgentWorkspace: {
+ type: 'object',
+ properties: {
+ worktree: {
+ description:
+ 'Native owner allocation; never accepted from a caller as workspace authority.',
+ anyOf: [
+ {
+ $ref: '#/$defs/Binding',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ projectId: {
+ description: "Optional membership in this Agent's canonical Project catalog.",
+ type: ['string', 'null'],
+ format: 'uuid',
+ },
+ path: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 4096,
+ },
+ directoryIdentity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ identity: {
+ type: 'string',
+ pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ },
+ },
+ additionalProperties: false,
+ required: ['path', 'directoryIdentity', 'identity'],
+ },
+ Binding: {
+ description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ common_dir: {
+ type: 'string',
+ },
+ source: {
+ type: 'string',
+ },
+ source_identity: {
+ type: 'string',
+ pattern: '^sha256:[a-f0-9]{64}$',
+ },
+ base_commit: {
+ type: 'string',
+ },
+ directory: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'id',
+ 'common_dir',
+ 'source',
+ 'source_identity',
+ 'base_commit',
+ 'directory',
+ ],
+ },
+ AgentSessionActivity: {
+ type: 'string',
+ enum: ['idle', 'working', 'waiting'],
+ },
+ AgentRejection: {
+ type: 'string',
+ enum: [
+ 'title_invalid',
+ 'labels_invalid',
+ 'tools_unavailable',
+ 'busy',
+ 'workspace_unavailable',
+ 'session_unavailable',
+ 'closed',
+ ],
+ },
+ },
+ },
+ resources: {},
+ },
+ observe: {
+ mode: 'query',
+ input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentSessionPage',
+ title: 'AgentSessionRead',
type: 'object',
properties: {
- revision: {
+ sessionId: {
type: 'string',
+ minLength: 1,
+ maxLength: 128,
},
- needsYouCount: {
+ },
+ additionalProperties: false,
+ required: ['sessionId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentObservation',
+ type: 'object',
+ properties: {
+ session: {
+ $ref: '#/$defs/AgentSession',
+ },
+ through: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- sessions: {
+ run: {
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentRun',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ parts: {
type: 'array',
items: {
- $ref: '#/$defs/AgentSession',
+ $ref: '#/$defs/AgentPart',
},
- maxItems: 32,
- },
- before: {
- type: ['string', 'null'],
- },
- after: {
- type: ['string', 'null'],
},
},
additionalProperties: false,
- required: ['revision', 'needsYouCount', 'sessions', 'before', 'after'],
+ required: ['session', 'through', 'parts'],
$defs: {
AgentSession: {
type: 'object',
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -12707,6 +13970,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
description:
'Stable business-data origin, independent of package or activation revisions.',
@@ -12829,15 +14096,63 @@ export const contracts = {
type: 'string',
enum: ['idle', 'working', 'waiting'],
},
+ AgentRun: {
+ type: 'object',
+ properties: {
+ invocationId: {
+ type: 'string',
+ },
+ turnId: {
+ type: 'string',
+ },
+ state: {
+ $ref: '#/$defs/AgentRunState',
+ },
+ },
+ additionalProperties: false,
+ required: ['invocationId', 'turnId', 'state'],
+ },
+ AgentRunState: {
+ type: 'string',
+ enum: ['admitted', 'running', 'waiting_for_user'],
+ },
+ AgentPart: {
+ type: 'object',
+ properties: {
+ startSequence: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ messageId: {
+ type: 'string',
+ },
+ stepId: {
+ type: 'string',
+ },
+ partId: {
+ type: 'string',
+ },
+ textKind: {
+ $ref: '#/$defs/AgentContentKind',
+ },
+ },
+ additionalProperties: false,
+ required: ['startSequence', 'messageId', 'stepId', 'partId', 'textKind'],
+ },
+ AgentContentKind: {
+ type: 'string',
+ enum: ['text', 'thinking'],
+ },
},
},
resources: {},
},
- markRead: {
- mode: 'mutation',
+ pendingInteractions: {
+ mode: 'query',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentMarkRead',
+ title: 'AgentSessionRead',
type: 'object',
properties: {
sessionId: {
@@ -12845,724 +14160,686 @@ export const contracts = {
minLength: 1,
maxLength: 128,
},
- messageId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
},
additionalProperties: false,
- required: ['sessionId', 'messageId'],
+ required: ['sessionId'],
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentMarkReadResult',
- oneOf: [
- {
- type: 'object',
- properties: {
- session: {
- $ref: '#/$defs/AgentSession',
- },
- kind: {
- type: 'string',
- const: 'observed',
- },
+ title: 'AgentPendingInteractions',
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ entries: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentInteractionSummary',
},
- additionalProperties: false,
- required: ['kind', 'session'],
+ maxItems: 16,
},
- {
+ },
+ additionalProperties: false,
+ required: ['revision', 'entries'],
+ $defs: {
+ AgentInteractionSummary: {
type: 'object',
properties: {
- reason: {
- $ref: '#/$defs/AgentRejection',
+ requestId: {
+ type: 'string',
},
kind: {
- type: 'string',
- const: 'rejected',
+ $ref: '#/$defs/AgentInteractionKind',
+ },
+ toolUseId: {
+ type: ['string', 'null'],
},
},
additionalProperties: false,
- required: ['kind', 'reason'],
+ required: ['requestId', 'kind', 'toolUseId'],
},
- ],
+ AgentInteractionKind: {
+ type: 'string',
+ enum: ['service_approval', 'question', 'permissions', 'form', 'client_capability'],
+ },
+ },
+ },
+ resources: {},
+ },
+ plan: {
+ mode: 'query',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentPlanRead',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentPlanView',
+ type: 'object',
+ properties: {
+ enabled: {
+ type: 'boolean',
+ },
+ current: {
+ $ref: '#/$defs/AgentPlanSnapshot',
+ },
+ },
+ additionalProperties: false,
+ required: ['enabled', 'current'],
$defs: {
- AgentSession: {
+ AgentPlanSnapshot: {
+ description:
+ 'Public business data only; frozen execution authority remains with the owner.',
type: 'object',
properties: {
- tools: {
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- },
- dataSource: {
- $ref: '#/$defs/AgentDataSource',
- },
- permissions: {
- $ref: '#/$defs/AgentWorkspacePermissions',
- },
- boundaryRevision: {
+ revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
+ proposal: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanProposal',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ execution: {
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentPlanExecution',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ },
+ additionalProperties: false,
+ required: ['revision'],
+ },
+ PlanProposal: {
+ type: 'object',
+ properties: {
id: {
type: 'string',
},
- title: {
+ planId: {
type: 'string',
},
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- workspace: {
- $ref: '#/$defs/AgentWorkspace',
- },
revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- updatedAt: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ turnId: {
+ type: 'string',
},
- archived: {
- type: 'boolean',
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
},
- hasUnread: {
- type: 'boolean',
+ status: {
+ $ref: '#/$defs/PlanProposalStatus',
+ },
+ supersedes: {
+ type: ['string', 'null'],
},
- activity: {
- $ref: '#/$defs/AgentSessionActivity',
+ sourceExecutionId: {
+ type: ['string', 'null'],
+ },
+ submittedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
},
additionalProperties: false,
required: [
- 'dataSource',
- 'permissions',
- 'boundaryRevision',
'id',
- 'title',
- 'labels',
- 'workspace',
+ 'planId',
'revision',
- 'updatedAt',
- 'archived',
- 'hasUnread',
- 'activity',
+ 'turnId',
+ 'artifact',
+ 'status',
+ 'submittedAt',
],
},
- AgentDataSource: {
- description:
- 'Stable business-data origin, independent of package or activation revisions.',
+ PlanArtifact: {
type: 'object',
properties: {
- stateDomain: {
+ title: {
type: 'string',
},
- deployment: {
- type: 'string',
- format: 'uuid',
+ overview: {
+ type: ['string', 'null'],
},
- namespace: {
- $ref: '#/$defs/InstanceId',
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanStep',
+ },
+ minItems: 1,
+ maxItems: 50,
+ },
+ risks: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 20,
+ default: [],
},
},
additionalProperties: false,
- required: ['stateDomain', 'deployment', 'namespace'],
- },
- InstanceId: {
- description:
- 'Hierarchical, stable source keys. Display aliases never become data identities.',
- type: 'array',
- items: {
- type: 'string',
- format: 'uuid',
- },
+ required: ['title', 'steps'],
},
- AgentWorkspacePermissions: {
+ PlanStep: {
type: 'object',
properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
+ id: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ pattern: '^[A-Za-z0-9_-]+$',
},
- requestPermissions: {
- type: 'boolean',
+ title: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 30,
+ },
+ description: {
+ type: 'string',
+ },
+ files: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 50,
+ default: [],
+ },
+ complexity: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanComplexity',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
additionalProperties: false,
- required: ['access', 'requestPermissions'],
+ required: ['id', 'title', 'description'],
},
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
+ PlanComplexity: {
type: 'string',
- enum: ['read_only', 'workspace_write'],
+ enum: ['low', 'medium', 'high'],
},
- AgentWorkspace: {
+ PlanProposalStatus: {
+ type: 'string',
+ enum: ['pending_approval', 'revision_requested', 'abandoned', 'approved'],
+ },
+ AgentPlanExecution: {
type: 'object',
properties: {
- worktree: {
- description:
- 'Native owner allocation; never accepted from a caller as workspace authority.',
+ id: {
+ type: 'string',
+ },
+ proposalId: {
+ type: 'string',
+ },
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
+ },
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanProgress',
+ },
+ },
+ phase: {
+ $ref: '#/$defs/AgentPlanPhase',
+ },
+ invocation: {
anyOf: [
{
- $ref: '#/$defs/Binding',
+ $ref: '#/$defs/Invocation',
},
{
type: 'null',
},
],
},
- projectId: {
- description: "Optional membership in this Agent's canonical Project catalog.",
+ reason: {
type: ['string', 'null'],
- format: 'uuid',
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ cancellation: {
+ type: ['string', 'null'],
},
- identity: {
- type: 'string',
- pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
},
additionalProperties: false,
- required: ['path', 'directoryIdentity', 'identity'],
+ required: ['id', 'proposalId', 'artifact', 'steps', 'phase', 'updatedAt'],
},
- Binding: {
- description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ PlanProgress: {
type: 'object',
properties: {
id: {
type: 'string',
},
- common_dir: {
- type: 'string',
+ status: {
+ $ref: '#/$defs/PlanStepStatus',
},
- source: {
+ note: {
+ type: ['string', 'null'],
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'status'],
+ },
+ PlanStepStatus: {
+ type: 'string',
+ enum: ['pending', 'in_progress', 'completed', 'skipped'],
+ },
+ AgentPlanPhase: {
+ type: 'string',
+ enum: ['awaiting_admission', 'active', 'interrupted', 'completed', 'cancelled'],
+ },
+ Invocation: {
+ type: 'object',
+ properties: {
+ session_id: {
type: 'string',
},
- source_identity: {
+ turn_id: {
type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
},
- base_commit: {
+ run_id: {
type: 'string',
},
- directory: {
+ invocation_id: {
type: 'string',
},
},
- additionalProperties: false,
- required: [
- 'id',
- 'common_dir',
- 'source',
- 'source_identity',
- 'base_commit',
- 'directory',
- ],
- },
- AgentSessionActivity: {
- type: 'string',
- enum: ['idle', 'working', 'waiting'],
- },
- AgentRejection: {
- type: 'string',
- enum: [
- 'title_invalid',
- 'labels_invalid',
- 'tools_unavailable',
- 'workspace_unavailable',
- 'session_unavailable',
- 'closed',
- ],
+ required: ['session_id', 'turn_id', 'run_id', 'invocation_id'],
},
},
},
resources: {},
},
- metadata: {
- mode: 'mutation',
+ planHistory: {
+ mode: 'query',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentMetadata',
+ title: 'AgentPlanHistoryRead',
type: 'object',
properties: {
- permissions: {
- description: 'Omission leaves the permission boundary and its approvals unchanged.',
- anyOf: [
- {
- $ref: '#/$defs/AgentPermissionChange',
- },
- {
- type: 'null',
- },
- ],
- },
sessionId: {
type: 'string',
- minLength: 1,
- maxLength: 128,
},
- expectedRevision: {
- type: 'integer',
+ throughRevision: {
+ type: ['integer', 'null'],
format: 'uint64',
- minimum: 1,
- maximum: 9007199254740991,
- },
- title: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
+ minimum: 0,
},
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- maxItems: 32,
+ after: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ default: 0,
},
},
additionalProperties: false,
- required: ['sessionId', 'expectedRevision', 'title', 'labels'],
- $defs: {
- AgentPermissionChange: {
- type: 'object',
- properties: {
- settings: {
- $ref: '#/$defs/AgentWorkspacePermissions',
- },
- revokeGrants: {
- description:
- 'Invalidate additive approvals even when the base policy is unchanged.',
- type: 'boolean',
- },
- },
- additionalProperties: false,
- required: ['settings', 'revokeGrants'],
- },
- AgentWorkspacePermissions: {
- type: 'object',
- properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
- },
- requestPermissions: {
- type: 'boolean',
- },
- },
- additionalProperties: false,
- required: ['access', 'requestPermissions'],
- },
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
- type: 'string',
- enum: ['read_only', 'workspace_write'],
- },
- },
+ required: ['sessionId'],
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentMetadataResult',
- oneOf: [
- {
- type: 'object',
- properties: {
- session: {
- $ref: '#/$defs/AgentSession',
- },
- kind: {
- type: 'string',
- const: 'committed',
- },
+ title: 'AgentPlanHistory',
+ type: 'object',
+ properties: {
+ throughRevision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ snapshots: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/AgentPlanSnapshot',
},
- additionalProperties: false,
- required: ['kind', 'session'],
},
- {
+ nextAfter: {
+ type: ['integer', 'null'],
+ format: 'uint64',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ required: ['throughRevision', 'snapshots'],
+ $defs: {
+ AgentPlanSnapshot: {
+ description:
+ 'Public business data only; frozen execution authority remains with the owner.',
type: 'object',
properties: {
- expected: {
+ revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- actual: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ proposal: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanProposal',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
- kind: {
- type: 'string',
- const: 'revision_conflict',
+ execution: {
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentPlanExecution',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
additionalProperties: false,
- required: ['kind', 'expected', 'actual'],
+ required: ['revision'],
},
- {
+ PlanProposal: {
type: 'object',
properties: {
- reason: {
- $ref: '#/$defs/AgentRejection',
- },
- kind: {
+ id: {
type: 'string',
- const: 'rejected',
- },
- },
- additionalProperties: false,
- required: ['kind', 'reason'],
- },
- ],
- $defs: {
- AgentSession: {
- type: 'object',
- properties: {
- tools: {
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- },
- dataSource: {
- $ref: '#/$defs/AgentDataSource',
},
- permissions: {
- $ref: '#/$defs/AgentWorkspacePermissions',
+ planId: {
+ type: 'string',
},
- boundaryRevision: {
+ revision: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- id: {
+ turnId: {
type: 'string',
},
- title: {
- type: 'string',
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
},
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
+ status: {
+ $ref: '#/$defs/PlanProposalStatus',
},
- workspace: {
- $ref: '#/$defs/AgentWorkspace',
+ supersedes: {
+ type: ['string', 'null'],
},
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ sourceExecutionId: {
+ type: ['string', 'null'],
},
- updatedAt: {
+ submittedAt: {
type: 'integer',
format: 'uint64',
minimum: 0,
},
- archived: {
- type: 'boolean',
- },
- hasUnread: {
- type: 'boolean',
- },
- activity: {
- $ref: '#/$defs/AgentSessionActivity',
- },
},
additionalProperties: false,
required: [
- 'dataSource',
- 'permissions',
- 'boundaryRevision',
'id',
- 'title',
- 'labels',
- 'workspace',
+ 'planId',
'revision',
- 'updatedAt',
- 'archived',
- 'hasUnread',
- 'activity',
+ 'turnId',
+ 'artifact',
+ 'status',
+ 'submittedAt',
],
},
- AgentDataSource: {
- description:
- 'Stable business-data origin, independent of package or activation revisions.',
+ PlanArtifact: {
type: 'object',
properties: {
- stateDomain: {
+ title: {
type: 'string',
},
- deployment: {
- type: 'string',
- format: 'uuid',
+ overview: {
+ type: ['string', 'null'],
},
- namespace: {
- $ref: '#/$defs/InstanceId',
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanStep',
+ },
+ minItems: 1,
+ maxItems: 50,
+ },
+ risks: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 20,
+ default: [],
},
},
additionalProperties: false,
- required: ['stateDomain', 'deployment', 'namespace'],
- },
- InstanceId: {
- description:
- 'Hierarchical, stable source keys. Display aliases never become data identities.',
- type: 'array',
- items: {
- type: 'string',
- format: 'uuid',
- },
+ required: ['title', 'steps'],
},
- AgentWorkspacePermissions: {
+ PlanStep: {
type: 'object',
properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
+ id: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ pattern: '^[A-Za-z0-9_-]+$',
},
- requestPermissions: {
- type: 'boolean',
+ title: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 30,
+ },
+ description: {
+ type: 'string',
+ },
+ files: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 50,
+ default: [],
+ },
+ complexity: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanComplexity',
+ },
+ {
+ type: 'null',
+ },
+ ],
},
},
additionalProperties: false,
- required: ['access', 'requestPermissions'],
+ required: ['id', 'title', 'description'],
},
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
+ PlanComplexity: {
type: 'string',
- enum: ['read_only', 'workspace_write'],
+ enum: ['low', 'medium', 'high'],
},
- AgentWorkspace: {
+ PlanProposalStatus: {
+ type: 'string',
+ enum: ['pending_approval', 'revision_requested', 'abandoned', 'approved'],
+ },
+ AgentPlanExecution: {
type: 'object',
properties: {
- worktree: {
- description:
- 'Native owner allocation; never accepted from a caller as workspace authority.',
+ id: {
+ type: 'string',
+ },
+ proposalId: {
+ type: 'string',
+ },
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
+ },
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanProgress',
+ },
+ },
+ phase: {
+ $ref: '#/$defs/AgentPlanPhase',
+ },
+ invocation: {
anyOf: [
{
- $ref: '#/$defs/Binding',
+ $ref: '#/$defs/Invocation',
},
{
type: 'null',
},
],
},
- projectId: {
- description: "Optional membership in this Agent's canonical Project catalog.",
+ reason: {
type: ['string', 'null'],
- format: 'uuid',
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
},
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ cancellation: {
+ type: ['string', 'null'],
},
- identity: {
- type: 'string',
- pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
},
additionalProperties: false,
- required: ['path', 'directoryIdentity', 'identity'],
+ required: ['id', 'proposalId', 'artifact', 'steps', 'phase', 'updatedAt'],
},
- Binding: {
- description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ PlanProgress: {
type: 'object',
properties: {
id: {
type: 'string',
},
- common_dir: {
- type: 'string',
+ status: {
+ $ref: '#/$defs/PlanStepStatus',
},
- source: {
+ note: {
+ type: ['string', 'null'],
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'status'],
+ },
+ PlanStepStatus: {
+ type: 'string',
+ enum: ['pending', 'in_progress', 'completed', 'skipped'],
+ },
+ AgentPlanPhase: {
+ type: 'string',
+ enum: ['awaiting_admission', 'active', 'interrupted', 'completed', 'cancelled'],
+ },
+ Invocation: {
+ type: 'object',
+ properties: {
+ session_id: {
type: 'string',
},
- source_identity: {
+ turn_id: {
type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
},
- base_commit: {
+ run_id: {
type: 'string',
},
- directory: {
+ invocation_id: {
type: 'string',
},
},
- additionalProperties: false,
- required: [
- 'id',
- 'common_dir',
- 'source',
- 'source_identity',
- 'base_commit',
- 'directory',
- ],
- },
- AgentSessionActivity: {
- type: 'string',
- enum: ['idle', 'working', 'waiting'],
- },
- AgentRejection: {
- type: 'string',
- enum: [
- 'title_invalid',
- 'labels_invalid',
- 'tools_unavailable',
- 'workspace_unavailable',
- 'session_unavailable',
- 'closed',
- ],
+ required: ['session_id', 'turn_id', 'run_id', 'invocation_id'],
},
},
},
resources: {},
},
- observe: {
+ planReceipt: {
mode: 'query',
input: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentSessionRead',
- type: 'object',
- properties: {
- sessionId: {
- type: 'string',
- minLength: 1,
- maxLength: 128,
- },
- },
- additionalProperties: false,
- required: ['sessionId'],
- },
- output: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentObservation',
+ title: 'AgentPlanReceiptRead',
type: 'object',
properties: {
- session: {
- $ref: '#/$defs/AgentSession',
- },
- through: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- run: {
- anyOf: [
- {
- $ref: '#/$defs/AgentRun',
- },
- {
- type: 'null',
- },
- ],
- },
- parts: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentPart',
- },
+ reference: {
+ $ref: '#/$defs/RecoveryRef',
},
},
additionalProperties: false,
- required: ['session', 'through', 'parts'],
+ required: ['reference'],
$defs: {
- AgentSession: {
+ RecoveryRef: {
type: 'object',
properties: {
- tools: {
- type: ['array', 'null'],
- items: {
- type: 'string',
- },
- },
- dataSource: {
- $ref: '#/$defs/AgentDataSource',
- },
- permissions: {
- $ref: '#/$defs/AgentWorkspacePermissions',
+ source: {
+ $ref: '#/$defs/DeploymentRef',
},
- boundaryRevision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ namespace: {
+ $ref: '#/$defs/InstanceId',
},
- id: {
+ export: {
type: 'string',
},
- title: {
+ method: {
type: 'string',
},
- labels: {
- type: 'array',
- items: {
- type: 'string',
- },
- },
- workspace: {
- $ref: '#/$defs/AgentWorkspace',
- },
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- updatedAt: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ operation: {
+ type: 'string',
+ format: 'uuid',
},
- archived: {
- type: 'boolean',
+ fingerprint: {
+ type: 'string',
},
- hasUnread: {
- type: 'boolean',
+ contract: {
+ $ref: '#/$defs/Contract',
},
- activity: {
- $ref: '#/$defs/AgentSessionActivity',
+ recovery: {
+ $ref: '#/$defs/RecoveryProtocol',
},
},
additionalProperties: false,
required: [
- 'dataSource',
- 'permissions',
- 'boundaryRevision',
- 'id',
- 'title',
- 'labels',
- 'workspace',
- 'revision',
- 'updatedAt',
- 'archived',
- 'hasUnread',
- 'activity',
+ 'source',
+ 'namespace',
+ 'export',
+ 'method',
+ 'operation',
+ 'fingerprint',
+ 'contract',
+ 'recovery',
],
},
- AgentDataSource: {
- description:
- 'Stable business-data origin, independent of package or activation revisions.',
+ DeploymentRef: {
type: 'object',
properties: {
stateDomain: {
@@ -13572,12 +14849,14 @@ export const contracts = {
type: 'string',
format: 'uuid',
},
- namespace: {
- $ref: '#/$defs/InstanceId',
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
},
},
additionalProperties: false,
- required: ['stateDomain', 'deployment', 'namespace'],
+ required: ['stateDomain', 'deployment', 'revision'],
},
InstanceId: {
description:
@@ -13588,208 +14867,270 @@ export const contracts = {
format: 'uuid',
},
},
- AgentWorkspacePermissions: {
+ Contract: {
+ description:
+ 'Public contract definitions are package data, not live registration records.',
+ type: 'object',
+ properties: {
+ name: {
+ type: 'string',
+ },
+ version: {
+ type: 'integer',
+ format: 'uint32',
+ minimum: 0,
+ },
+ transport: {
+ $ref: '#/$defs/Transport',
+ },
+ interface: {
+ $ref: '#/$defs/Interface',
+ },
+ },
+ additionalProperties: false,
+ required: ['name', 'version', 'transport', 'interface'],
+ },
+ Transport: {
+ type: 'string',
+ enum: ['local', 'remote'],
+ },
+ Interface: {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ methods: {
+ type: 'object',
+ additionalProperties: {
+ $ref: '#/$defs/Method',
+ },
+ },
+ kind: {
+ type: 'string',
+ const: 'service',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'methods'],
+ },
+ {
+ type: 'object',
+ properties: {
+ props: true,
+ events: {
+ type: 'object',
+ additionalProperties: true,
+ },
+ captures: {
+ type: 'object',
+ additionalProperties: {
+ $ref: '#/$defs/Capture',
+ },
+ },
+ kind: {
+ type: 'string',
+ const: 'component',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'props', 'events', 'captures'],
+ },
+ {
+ type: 'object',
+ properties: {
+ schema: true,
+ kind: {
+ type: 'string',
+ const: 'value',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'schema'],
+ },
+ {
+ type: 'object',
+ properties: {
+ resource: {
+ type: 'string',
+ },
+ schema: true,
+ kind: {
+ type: 'string',
+ const: 'resource',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'resource', 'schema'],
+ },
+ ],
+ },
+ Method: {
type: 'object',
properties: {
- access: {
- $ref: '#/$defs/AgentWorkspaceAccess',
+ mode: {
+ $ref: '#/$defs/MethodMode',
},
- requestPermissions: {
- type: 'boolean',
+ input: true,
+ output: true,
+ progress: {
+ description:
+ 'Bounded transient observations from this mutation, separate from its\noriginal final receipt. Only mutation methods may declare progress.',
+ },
+ resources: {
+ type: 'object',
+ additionalProperties: {
+ $ref: '#/$defs/ResourceSlot',
+ },
},
},
additionalProperties: false,
- required: ['access', 'requestPermissions'],
+ required: ['mode', 'input', 'output', 'resources'],
},
- AgentWorkspaceAccess: {
- description:
- 'Access inside the original selected directory; never an ambient filesystem grant.',
+ MethodMode: {
type: 'string',
- enum: ['read_only', 'workspace_write'],
+ enum: ['query', 'mutation', 'subscription'],
},
- AgentWorkspace: {
+ ResourceSlot: {
+ description:
+ 'One declared input slot: its nominal type and whether the caller may omit it.',
type: 'object',
properties: {
- worktree: {
- description:
- 'Native owner allocation; never accepted from a caller as workspace authority.',
- anyOf: [
- {
- $ref: '#/$defs/Binding',
- },
- {
- type: 'null',
- },
- ],
- },
- projectId: {
- description: "Optional membership in this Agent's canonical Project catalog.",
- type: ['string', 'null'],
- format: 'uuid',
- },
- path: {
- type: 'string',
- minLength: 1,
- maxLength: 4096,
- },
- directoryIdentity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
+ type: {
+ $ref: '#/$defs/ResourceType',
},
- identity: {
- type: 'string',
- pattern: '^workspace:v1:[A-Fa-f0-9-]{36}$',
+ optional: {
+ type: 'boolean',
},
},
additionalProperties: false,
- required: ['path', 'directoryIdentity', 'identity'],
+ required: ['type', 'optional'],
},
- Binding: {
- description: 'Immutable allocation intent, not the current child branch or HEAD.',
+ ResourceType: {
+ description:
+ 'Nominal read-only resource shape, not a resource id or authorization token.',
type: 'object',
properties: {
- id: {
- type: 'string',
- },
- common_dir: {
- type: 'string',
- },
- source: {
- type: 'string',
- },
- source_identity: {
- type: 'string',
- pattern: '^sha256:[a-f0-9]{64}$',
- },
- base_commit: {
+ name: {
type: 'string',
},
- directory: {
- type: 'string',
+ version: {
+ type: 'integer',
+ format: 'uint32',
+ minimum: 0,
},
},
additionalProperties: false,
- required: [
- 'id',
- 'common_dir',
- 'source',
- 'source_identity',
- 'base_commit',
- 'directory',
- ],
- },
- AgentSessionActivity: {
- type: 'string',
- enum: ['idle', 'working', 'waiting'],
+ required: ['name', 'version'],
},
- AgentRun: {
+ Capture: {
type: 'object',
properties: {
- invocationId: {
- type: 'string',
- },
- turnId: {
- type: 'string',
- },
- state: {
- $ref: '#/$defs/AgentRunState',
+ input: true,
+ output: {
+ $ref: '#/$defs/CaptureOutput',
},
},
additionalProperties: false,
- required: ['invocationId', 'turnId', 'state'],
- },
- AgentRunState: {
- type: 'string',
- enum: ['admitted', 'running', 'waiting_for_user'],
+ required: ['input', 'output'],
},
- AgentPart: {
- type: 'object',
- properties: {
- startSequence: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
- },
- messageId: {
- type: 'string',
- },
- stepId: {
- type: 'string',
- },
- partId: {
- type: 'string',
+ CaptureOutput: {
+ description:
+ 'Resource captures enter checked service slots; continuations remain in the\noriginal presentation owner and only decide admission of query feedback.',
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ resource: {
+ $ref: '#/$defs/ResourceType',
+ },
+ kind: {
+ type: 'string',
+ const: 'resource',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'resource'],
},
- textKind: {
- $ref: '#/$defs/AgentContentKind',
+ {
+ type: 'object',
+ properties: {
+ kind: {
+ type: 'string',
+ const: 'continuation',
+ },
+ },
+ required: ['kind'],
+ additionalProperties: false,
},
- },
- additionalProperties: false,
- required: ['startSequence', 'messageId', 'stepId', 'partId', 'textKind'],
- },
- AgentContentKind: {
- type: 'string',
- enum: ['text', 'thinking'],
+ ],
},
- },
- },
- resources: {},
- },
- pendingInteractions: {
- mode: 'query',
- input: {
- $schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentSessionRead',
- type: 'object',
- properties: {
- sessionId: {
+ RecoveryProtocol: {
type: 'string',
- minLength: 1,
- maxLength: 128,
+ enum: ['journal_v1'],
},
},
- additionalProperties: false,
- required: ['sessionId'],
},
output: {
$schema: 'https://json-schema.org/draft/2020-12/schema',
- title: 'AgentPendingInteractions',
- type: 'object',
- properties: {
- revision: {
- type: 'integer',
- format: 'uint64',
- minimum: 0,
+ title: 'Nullable_AgentPlanResult',
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentPlanResult',
},
- entries: {
- type: 'array',
- items: {
- $ref: '#/$defs/AgentInteractionSummary',
- },
- maxItems: 16,
+ {
+ type: 'null',
},
- },
- additionalProperties: false,
- required: ['revision', 'entries'],
+ ],
$defs: {
- AgentInteractionSummary: {
- type: 'object',
- properties: {
- requestId: {
- type: 'string',
+ AgentPlanResult: {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ kind: {
+ type: 'string',
+ const: 'committed',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'revision'],
},
- kind: {
- $ref: '#/$defs/AgentInteractionKind',
+ {
+ type: 'object',
+ properties: {
+ actual: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ kind: {
+ type: 'string',
+ const: 'conflict',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'actual'],
},
- toolUseId: {
- type: ['string', 'null'],
+ {
+ type: 'object',
+ properties: {
+ reason: {
+ type: 'string',
+ },
+ kind: {
+ type: 'string',
+ const: 'rejected',
+ },
+ },
+ additionalProperties: false,
+ required: ['kind', 'reason'],
},
- },
- additionalProperties: false,
- required: ['requestId', 'kind', 'toolUseId'],
- },
- AgentInteractionKind: {
- type: 'string',
- enum: ['service_approval', 'question', 'permissions', 'form', 'client_capability'],
+ ],
},
},
},
@@ -14703,6 +16044,10 @@ export const contracts = {
AgentSession: {
type: 'object',
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -14771,6 +16116,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
description:
'Stable business-data origin, independent of package or activation revisions.',
@@ -20028,6 +21377,283 @@ export const contracts = {
},
resources: {},
},
+ watchPlan: {
+ mode: 'subscription',
+ input: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentPlanRead',
+ type: 'object',
+ properties: {
+ sessionId: {
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: ['sessionId'],
+ },
+ output: {
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
+ title: 'AgentPlanView',
+ type: 'object',
+ properties: {
+ enabled: {
+ type: 'boolean',
+ },
+ current: {
+ $ref: '#/$defs/AgentPlanSnapshot',
+ },
+ },
+ additionalProperties: false,
+ required: ['enabled', 'current'],
+ $defs: {
+ AgentPlanSnapshot: {
+ description:
+ 'Public business data only; frozen execution authority remains with the owner.',
+ type: 'object',
+ properties: {
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ proposal: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanProposal',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ execution: {
+ anyOf: [
+ {
+ $ref: '#/$defs/AgentPlanExecution',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ },
+ additionalProperties: false,
+ required: ['revision'],
+ },
+ PlanProposal: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ planId: {
+ type: 'string',
+ },
+ revision: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ turnId: {
+ type: 'string',
+ },
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
+ },
+ status: {
+ $ref: '#/$defs/PlanProposalStatus',
+ },
+ supersedes: {
+ type: ['string', 'null'],
+ },
+ sourceExecutionId: {
+ type: ['string', 'null'],
+ },
+ submittedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ required: [
+ 'id',
+ 'planId',
+ 'revision',
+ 'turnId',
+ 'artifact',
+ 'status',
+ 'submittedAt',
+ ],
+ },
+ PlanArtifact: {
+ type: 'object',
+ properties: {
+ title: {
+ type: 'string',
+ },
+ overview: {
+ type: ['string', 'null'],
+ },
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanStep',
+ },
+ minItems: 1,
+ maxItems: 50,
+ },
+ risks: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 20,
+ default: [],
+ },
+ },
+ additionalProperties: false,
+ required: ['title', 'steps'],
+ },
+ PlanStep: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 128,
+ pattern: '^[A-Za-z0-9_-]+$',
+ },
+ title: {
+ type: 'string',
+ minLength: 1,
+ maxLength: 30,
+ },
+ description: {
+ type: 'string',
+ },
+ files: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ maxItems: 50,
+ default: [],
+ },
+ complexity: {
+ anyOf: [
+ {
+ $ref: '#/$defs/PlanComplexity',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'title', 'description'],
+ },
+ PlanComplexity: {
+ type: 'string',
+ enum: ['low', 'medium', 'high'],
+ },
+ PlanProposalStatus: {
+ type: 'string',
+ enum: ['pending_approval', 'revision_requested', 'abandoned', 'approved'],
+ },
+ AgentPlanExecution: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ proposalId: {
+ type: 'string',
+ },
+ artifact: {
+ $ref: '#/$defs/PlanArtifact',
+ },
+ steps: {
+ type: 'array',
+ items: {
+ $ref: '#/$defs/PlanProgress',
+ },
+ },
+ phase: {
+ $ref: '#/$defs/AgentPlanPhase',
+ },
+ invocation: {
+ anyOf: [
+ {
+ $ref: '#/$defs/Invocation',
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ reason: {
+ type: ['string', 'null'],
+ },
+ cancellation: {
+ type: ['string', 'null'],
+ },
+ updatedAt: {
+ type: 'integer',
+ format: 'uint64',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'proposalId', 'artifact', 'steps', 'phase', 'updatedAt'],
+ },
+ PlanProgress: {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ },
+ status: {
+ $ref: '#/$defs/PlanStepStatus',
+ },
+ note: {
+ type: ['string', 'null'],
+ },
+ },
+ additionalProperties: false,
+ required: ['id', 'status'],
+ },
+ PlanStepStatus: {
+ type: 'string',
+ enum: ['pending', 'in_progress', 'completed', 'skipped'],
+ },
+ AgentPlanPhase: {
+ type: 'string',
+ enum: ['awaiting_admission', 'active', 'interrupted', 'completed', 'cancelled'],
+ },
+ Invocation: {
+ type: 'object',
+ properties: {
+ session_id: {
+ type: 'string',
+ },
+ turn_id: {
+ type: 'string',
+ },
+ run_id: {
+ type: 'string',
+ },
+ invocation_id: {
+ type: 'string',
+ },
+ },
+ required: ['session_id', 'turn_id', 'run_id', 'invocation_id'],
+ },
+ },
+ },
+ resources: {},
+ },
watchSchedules: {
mode: 'subscription',
input: {
@@ -22141,6 +23767,10 @@ export const contracts = {
type: 'object',
additionalProperties: false,
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -22208,6 +23838,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
type: 'object',
additionalProperties: false,
@@ -22336,6 +23970,7 @@ export const contracts = {
'title_invalid',
'labels_invalid',
'tools_unavailable',
+ 'busy',
'workspace_unavailable',
'session_unavailable',
'closed',
@@ -22589,6 +24224,10 @@ export const contracts = {
type: 'object',
additionalProperties: false,
properties: {
+ collaborationMode: {
+ $ref: '#/$defs/CollaborationMode',
+ default: 'agent',
+ },
tools: {
type: ['array', 'null'],
items: {
@@ -22656,6 +24295,10 @@ export const contracts = {
'activity',
],
},
+ CollaborationMode: {
+ type: 'string',
+ enum: ['agent', 'plan'],
+ },
AgentDataSource: {
type: 'object',
additionalProperties: false,
@@ -22784,6 +24427,7 @@ export const contracts = {
'title_invalid',
'labels_invalid',
'tools_unavailable',
+ 'busy',
'workspace_unavailable',
'session_unavailable',
'closed',
diff --git a/packages/plugin-sdk/src/generated/runtime.ts b/packages/plugin-sdk/src/generated/runtime.ts
index 3cb9eade74..8edf068bf5 100644
--- a/packages/plugin-sdk/src/generated/runtime.ts
+++ b/packages/plugin-sdk/src/generated/runtime.ts
@@ -207,6 +207,13 @@ export type RuntimeProtocol =
| SkillPreparationRecord
| AgentList
| AgentCreate
+ | AgentPlanRead
+ | AgentPlanView
+ | AgentPlanHistoryRead
+ | AgentPlanHistory
+ | AgentPlanChange
+ | AgentPlanResult
+ | AgentPlanReceiptRead
| AgentGoalRead
| AgentGoalView
| AgentGoalChange
@@ -1723,11 +1730,13 @@ export type WorkHubCoordinator =
reason: AgentRejection;
kind: 'rejected';
};
+export type CollaborationMode = 'agent' | 'plan';
export type AgentSessionActivity = 'idle' | 'working' | 'waiting';
export type AgentRejection =
| 'title_invalid'
| 'labels_invalid'
| 'tools_unavailable'
+ | 'busy'
| 'workspace_unavailable'
| 'session_unavailable'
| 'closed';
@@ -2977,6 +2986,57 @@ export type AgentWorkspaceSelection =
sessionId: string;
kind: 'session';
};
+export type PlanComplexity = 'low' | 'medium' | 'high';
+export type PlanProposalStatus =
+ | 'pending_approval'
+ | 'revision_requested'
+ | 'abandoned'
+ | 'approved';
+export type PlanStepStatus = 'pending' | 'in_progress' | 'completed' | 'skipped';
+export type AgentPlanPhase =
+ | 'awaiting_admission'
+ | 'active'
+ | 'interrupted'
+ | 'completed'
+ | 'cancelled';
+export type AgentPlanAction =
+ | {
+ proposalId: string;
+ proposalRevision: number;
+ approval: AgentPlanApproval;
+ kind: 'approve';
+ }
+ | {
+ proposalId: string;
+ kind: 'revise';
+ }
+ | {
+ proposalId: string;
+ kind: 'abandon';
+ }
+ | {
+ executionId: string;
+ approval: AgentPlanApproval;
+ kind: 'resume';
+ }
+ | {
+ executionId: string;
+ reason: string;
+ kind: 'cancel';
+ };
+export type AgentPlanResult =
+ | {
+ revision: number;
+ kind: 'committed';
+ }
+ | {
+ actual: number;
+ kind: 'conflict';
+ }
+ | {
+ reason: string;
+ kind: 'rejected';
+ };
export type GoalStatus =
| 'armed'
| 'active'
@@ -6605,6 +6665,10 @@ export interface AgentConfiguration {
* Enable explicitly approved, bounded Goal continuation.
*/
goals?: boolean;
+ /**
+ * Enable planning, reviewed approval and execution progress.
+ */
+ plans?: boolean;
/**
* Enable the session-scoped, model-maintained checklist.
*/
@@ -7174,6 +7238,7 @@ export interface AgentDirectorySelection {
directoryIdentity: string;
}
export interface AgentSession {
+ collaborationMode?: CollaborationMode & string;
tools?: string[] | null;
dataSource: AgentDataSource;
permissions: AgentWorkspacePermissions;
@@ -8538,6 +8603,278 @@ export interface AgentProjectRef {
id: string;
revision: string;
}
+export interface AgentPlanRead {
+ sessionId: string;
+}
+export interface AgentPlanView {
+ enabled: boolean;
+ current: AgentPlanSnapshot;
+}
+/**
+ * Public business data only; frozen execution authority remains with the owner.
+ */
+export interface AgentPlanSnapshot {
+ revision: number;
+ proposal?: PlanProposal | null;
+ execution?: AgentPlanExecution | null;
+}
+export interface PlanProposal {
+ id: string;
+ planId: string;
+ revision: number;
+ turnId: string;
+ artifact: PlanArtifact;
+ status: PlanProposalStatus;
+ supersedes?: string | null;
+ sourceExecutionId?: string | null;
+ submittedAt: number;
+}
+export interface PlanArtifact {
+ title: string;
+ overview?: string | null;
+ /**
+ * @minItems 1
+ * @maxItems 50
+ */
+ steps: [PlanStep, ...PlanStep[]];
+ /**
+ * @maxItems 20
+ */
+ risks?:
+ | []
+ | [string]
+ | [string, string]
+ | [string, string, string]
+ | [string, string, string, string]
+ | [string, string, string, string, string]
+ | [string, string, string, string, string, string]
+ | [string, string, string, string, string, string, string]
+ | [string, string, string, string, string, string, string, string]
+ | [string, string, string, string, string, string, string, string, string]
+ | [string, string, string, string, string, string, string, string, string, string]
+ | [string, string, string, string, string, string, string, string, string, string, string]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ]
+ | [
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ string,
+ ];
+}
+export interface PlanStep {
+ id: string;
+ title: string;
+ description: string;
+ /**
+ * @maxItems 50
+ */
+ files?: string[];
+ complexity?: PlanComplexity | null;
+}
+export interface AgentPlanExecution {
+ id: string;
+ proposalId: string;
+ artifact: PlanArtifact;
+ steps: PlanProgress[];
+ phase: AgentPlanPhase;
+ invocation?: Invocation | null;
+ reason?: string | null;
+ cancellation?: string | null;
+ updatedAt: number;
+}
+export interface PlanProgress {
+ id: string;
+ status: PlanStepStatus;
+ note?: string | null;
+}
+export interface AgentPlanHistoryRead {
+ sessionId: string;
+ throughRevision?: number | null;
+ after?: number;
+}
+export interface AgentPlanHistory {
+ throughRevision: number;
+ snapshots: AgentPlanSnapshot[];
+ nextAfter?: number | null;
+}
+export interface AgentPlanChange {
+ sessionId: string;
+ revision: number;
+ action: AgentPlanAction;
+}
+export interface AgentPlanApproval {
+ target: AgentScheduledTarget;
+ model: ModelSelection;
+ thinkingLevel?: ThinkingLevel | null;
+}
+/**
+ * Exact observed source boundary. This data is checked against the original
+ * Session; passing it never grants execution by itself.
+ */
+export interface AgentScheduledTarget {
+ sessionId: string;
+ workspace: AgentWorkspace;
+ permissions: AgentWorkspacePermissions;
+ boundaryRevision: number;
+}
+export interface AgentPlanReceiptRead {
+ reference: RecoveryRef;
+}
export interface AgentGoalRead {
sessionId: string;
}
@@ -8572,16 +8909,6 @@ export interface AgentGoalApproval {
model: ModelSelection;
thinkingLevel?: ThinkingLevel | null;
}
-/**
- * Exact observed source boundary. This data is checked against the original
- * Session; passing it never grants execution by itself.
- */
-export interface AgentScheduledTarget {
- sessionId: string;
- workspace: AgentWorkspace;
- permissions: AgentWorkspacePermissions;
- boundaryRevision: number;
-}
export interface AgentGoalReceiptRead {
reference: RecoveryRef;
}
@@ -9058,6 +9385,10 @@ export interface AgentDirectory {
selection: AgentDirectorySelection;
}
export interface AgentMetadata {
+ /**
+ * Changing collaboration is only allowed while the Session is idle.
+ */
+ collaborationMode?: CollaborationMode | null;
/**
* Omission leaves the permission boundary and its approvals unchanged.
*/
diff --git a/plugins/agent/agent-screen/README.md b/plugins/agent/agent-screen/README.md
index 0c747fbedb..61e84a2036 100644
--- a/plugins/agent/agent-screen/README.md
+++ b/plugins/agent/agent-screen/README.md
@@ -38,3 +38,5 @@
Modules share the existing `State`; they do not own separate stores or dispatch loops. View helpers return native scenes. Publication of a candidate frame and its intents still happens once at the component boundary. The default footer is a bound component, documented in the [runtime UI guide](../../../skills/maka-plugin-authoring/references/runtime-ui.md).
The Goal command opens a session-scoped panel with objective, iteration limit and optional token threshold. Native editors supply immutable snapshots for review before creation. The confirmation retains the selected model, workspace and permission boundary. Controls use the displayed Goal revision; a newer observation dismisses a stale confirmation. Original operation recovery checks the saved receipt rather than submitting another Goal.
+
+The Plan command presents the current proposal or execution, ordered steps, risks and progress. Approval and resume review the exact artifact, selected model, workspace and access; a newer Plan revision dismisses the confirmation. Users can request revision, abandon a proposal or cancel its execution. History uses a pinned revision and bounded pages without live controls. Planning/Agent mode changes use the original session metadata mutation and are unavailable during active or queued wo [...]
diff --git a/plugins/agent/agent-screen/README.zh-CN.md b/plugins/agent/agent-screen/README.zh-CN.md
index fd35307f97..d65b95e433 100644
--- a/plugins/agent/agent-screen/README.zh-CN.md
+++ b/plugins/agent/agent-screen/README.zh-CN.md
@@ -38,3 +38,5 @@
各模块共用原有 `State`,没有独立 store 或额外事件循环。视图函数返回原生场景;候选帧和调用意图仍在组件边界一次发布。自定义 footer 是绑定的组件,详见[运行时 UI 指南](../../../skills/maka-plugin-authoring/references/runtime-ui.md)。
「持续目标」命令打开当前会话的目标面板,包含目标内容、轮数上限和可选 token 阈值。原生编辑器提供不可变快照供创建前查看;确认内容保留所选模型、工作区和权限边界。控制操作使用展示时的目标版本,收到新版本后会清除过期确认。操作恢复读取已保存的原始回执,不会再次提交目标。
+
+「计划」命令展示当前提案或执行、步骤、风险和进度。批准和继续前查看固定的计划内容、所选模型、工作区和权限;新计划版本会清除过期确认。用户可以要求修订、放弃提案或取消执行。历史使用固定版本和有界分页,不提供修改控件。规划/执行模式切换使用原有会话元数据操作,执行中或有排队工作时不可切换。结果未知的审批读取原始回执恢复,不会重复提交。
diff --git a/plugins/agent/agent-screen/actions.ts b/plugins/agent/agent-screen/actions.ts
index 62abbc509f..8cdd95ec9f 100644
--- a/plugins/agent/agent-screen/actions.ts
+++ b/plugins/agent/agent-screen/actions.ts
@@ -46,6 +46,7 @@ import { type Backend, type Request, type State, type RootCommand } from './stat
import { toolCards } from '../../shared/tool-cards.js';
import { readingKey } from './state.js';
import { newGoalState, watchGoal } from './goal.js';
+import { newPlanState, watchPlan } from './plan.js';
import { messages } from './messages.js';
export function intent(
@@ -301,6 +302,8 @@ export function select(state: State, actions: Action[], session: AgentSession |
state.recallAnchor = null;
state.selected = session;
state.epoch++;
+ state.plan = newPlanState();
+ if (session) watchPlan(state);
state.goal = newGoalState();
if (session) watchGoal(state);
state.recap = { receipt: null, loaded: false, loading: null, failed: false, confirmation: null };
@@ -420,6 +423,9 @@ export function mutationPending(state: State) {
'queue',
'receipt',
'recapGenerate',
+ 'planChange',
+ 'planMode',
+ 'planReceipt',
'goalChange',
'goalField',
'goalReceipt',
@@ -716,6 +722,13 @@ export function rootCommands(
},
]
: []),
+ {
+ kind: 'plan-open',
+ id: 'plan-open',
+ label: text.planTitle,
+ hint: '',
+ disabled: !route || !state.selected || state.plan.page?.enabled === false,
+ },
{
kind: 'goal-open',
id: 'goal-open',
@@ -936,6 +949,10 @@ export function rootCommand(
if (!state.checklist.watch) watchChecklist(state);
if (target === 'tui') state.inspector = state.inspector === 'checklist' ? null : 'checklist';
else state.dialog = 'checklist';
+ } else if (kind === 'plan-open') {
+ if (!state.plan.watch) watchPlan(state);
+ if (target === 'tui') state.inspector = state.inspector === 'plan' ? null : 'plan';
+ else state.dialog = 'plan';
} else if (kind === 'goal-open') {
if (!state.goal.watch) watchGoal(state);
if (target === 'tui') state.inspector = state.inspector === 'goal' ? null : 'goal';
diff --git a/plugins/agent/agent-screen/events.ts b/plugins/agent/agent-screen/events.ts
index 582cfa5e3c..3f1a0ad331 100644
--- a/plugins/agent/agent-screen/events.ts
+++ b/plugins/agent/agent-screen/events.ts
@@ -25,6 +25,7 @@ import type {
AgentSessionPage,
AgentChecklist,
AgentGoalView,
+ AgentPlanView,
ComponentInput,
ComponentValues,
Emission,
@@ -37,6 +38,7 @@ import { resolveLocale } from '../../shared/locale.js';
import { type Node, type Presentation } from '../../shared/view.js';
import { goalUpdate } from './goal.js';
+import { planUpdate } from './plan.js';
import { messages } from './messages.js';
import { toolCards } from '../../shared/tool-cards.js';
import { follow, select } from './actions.js';
@@ -181,7 +183,13 @@ export function handleEvent<N extends Node>(
return frame(presentation, configuredLocale, state, values, actions);
if (input.kind === 'action') {
const outcome = input.event as ActionOutcome;
- if (state.goal.watch?.key === input.key) {
+ if (state.plan.watch?.key === input.key) {
+ if (outcome.status === 'updated') planUpdate(state, outcome.value as AgentPlanView);
+ else if (outcome.status === 'failed' || outcome.status === 'not_accepted') {
+ state.plan.watch = null;
+ state.plan.failed = true;
+ }
+ } else if (state.goal.watch?.key === input.key) {
if (outcome.status === 'updated') goalUpdate(state, outcome.value as AgentGoalView);
else if (outcome.status === 'failed' || outcome.status === 'not_accepted') {
state.goal.watch = null;
@@ -239,7 +247,9 @@ export function handleEvent<N extends Node>(
request.kind === 'markRead' ||
request.kind === 'uploadAttachment' ||
request.kind === 'recapGenerate' ||
- request.kind === 'goalChange')
+ request.kind === 'goalChange' ||
+ request.kind === 'planChange' ||
+ request.kind === 'planMode')
)
receipt(state, actions, request, outcome.reply);
else if (outcome.status === 'succeeded')
diff --git a/plugins/agent/agent-screen/frame.ts b/plugins/agent/agent-screen/frame.ts
index 04c55d6457..f470939e22 100644
--- a/plugins/agent/agent-screen/frame.ts
+++ b/plugins/agent/agent-screen/frame.ts
@@ -50,6 +50,7 @@ import {
import { checklistView } from './checklist-view.js';
import { goalView, goalTerminal } from './goal.js';
+import { planView } from './plan.js';
import { recapView } from './recap-view.js';
import { attachmentView } from '../../shared/attachments.js';
@@ -100,6 +101,8 @@ export function frame<N extends Node>(
}
retainSelectedDraft(state.drafts, state.selected);
if (
+ !state.restoring &&
+ !state.uncertain &&
!Object.values(state.pending).some(
(request) => request.kind === 'draftPage' || request.kind === 'draftReceipt',
)
@@ -238,6 +241,7 @@ export function frame<N extends Node>(
const inspectorOpen =
conversationRoute(state) && !!state.selected && (state.inspector !== null || inlineInteraction);
const inspectorSlots = [
+ planView(presentation, state, theme, locale),
goalView(presentation, state, theme, locale),
checklistView(presentation, state, theme, locale),
recapView(presentation, state, theme, locale),
@@ -412,6 +416,27 @@ export function frame<N extends Node>(
),
]
: []),
+ ...(conversationRoute(state) &&
+ state.selected &&
+ state.inspector !== 'plan' &&
+ state.dialog !== 'plan' &&
+ (state.selected.collaborationMode === 'plan' ||
+ state.plan.page?.current.proposal?.status === 'pending_approval' ||
+ state.plan.page?.current.execution?.phase === 'active')
+ ? [
+ ui.button(
+ 'plan-open',
+ state.plan.page?.current.proposal?.status === 'pending_approval'
... 4709 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org