@skaile/workspaces 3.25.0 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/app-sdk/index.js +1 -1
  3. package/dist/{asset-feeds-6RKRMM6C.js → asset-feeds-ISSC2HYE.js} +4 -4
  4. package/dist/{asset-feeds-6RKRMM6C.js.map → asset-feeds-ISSC2HYE.js.map} +1 -1
  5. package/dist/asset-manager/index.js +1 -1
  6. package/dist/bridge/drivers/claude-sdk.js +3 -3
  7. package/dist/bridge/drivers/codex.js +1 -1
  8. package/dist/bridge/drivers/continue.js +2 -2
  9. package/dist/bridge/drivers/echo.js +3 -3
  10. package/dist/bridge/drivers/gemini.js +3 -3
  11. package/dist/bridge/drivers/goose.js +2 -2
  12. package/dist/bridge/drivers/omp.js +1 -1
  13. package/dist/bridge/drivers/opencode.js +2 -2
  14. package/dist/bridge/drivers/qwen.js +3 -3
  15. package/dist/bridge/index.js +4 -4
  16. package/dist/{chunk-LRA7VUT6.js → chunk-3DOLXE4Z.js} +3 -3
  17. package/dist/{chunk-LRA7VUT6.js.map → chunk-3DOLXE4Z.js.map} +1 -1
  18. package/dist/{chunk-HTIGD3DR.js → chunk-5SXY4B65.js} +3 -3
  19. package/dist/{chunk-HTIGD3DR.js.map → chunk-5SXY4B65.js.map} +1 -1
  20. package/dist/{chunk-YNO3LBRH.js → chunk-A565EFTW.js} +3 -3
  21. package/dist/{chunk-YNO3LBRH.js.map → chunk-A565EFTW.js.map} +1 -1
  22. package/dist/{chunk-5PFJVZ7F.js → chunk-ALSDJ6F4.js} +2 -2
  23. package/dist/{chunk-5PFJVZ7F.js.map → chunk-ALSDJ6F4.js.map} +1 -1
  24. package/dist/{chunk-ZQZXCVYV.js → chunk-AY4OKT3U.js} +2 -2
  25. package/dist/{chunk-ZQZXCVYV.js.map → chunk-AY4OKT3U.js.map} +1 -1
  26. package/dist/{chunk-X3DODPMF.js → chunk-DGPCBJNQ.js} +2 -2
  27. package/dist/{chunk-X3DODPMF.js.map → chunk-DGPCBJNQ.js.map} +1 -1
  28. package/dist/{chunk-BKUKF632.js → chunk-GLOHIJ7B.js} +3 -3
  29. package/dist/{chunk-BKUKF632.js.map → chunk-GLOHIJ7B.js.map} +1 -1
  30. package/dist/{chunk-J4WDQL42.js → chunk-KFH5GCDB.js} +3 -3
  31. package/dist/{chunk-J4WDQL42.js.map → chunk-KFH5GCDB.js.map} +1 -1
  32. package/dist/{chunk-6NTKN6QC.js → chunk-NQG77HXO.js} +3 -3
  33. package/dist/{chunk-6NTKN6QC.js.map → chunk-NQG77HXO.js.map} +1 -1
  34. package/dist/{chunk-WMZT7VDS.js → chunk-NRKEZBVP.js} +5 -5
  35. package/dist/{chunk-WMZT7VDS.js.map → chunk-NRKEZBVP.js.map} +1 -1
  36. package/dist/{chunk-4YRRPWHY.js → chunk-Q6SWQEF7.js} +156 -28
  37. package/dist/chunk-Q6SWQEF7.js.map +1 -0
  38. package/dist/{chunk-NKPDUYRH.js → chunk-RPE5VYB6.js} +4 -4
  39. package/dist/{chunk-NKPDUYRH.js.map → chunk-RPE5VYB6.js.map} +1 -1
  40. package/dist/{chunk-UEW6C64M.js → chunk-S3Z5KF6R.js} +3 -3
  41. package/dist/{chunk-UEW6C64M.js.map → chunk-S3Z5KF6R.js.map} +1 -1
  42. package/dist/{chunk-V6QKAC3Z.js → chunk-U2QALNKX.js} +8 -5
  43. package/dist/chunk-U2QALNKX.js.map +1 -0
  44. package/dist/{chunk-HGDFQDHT.js → chunk-UOERRCR3.js} +6 -6
  45. package/dist/{chunk-HGDFQDHT.js.map → chunk-UOERRCR3.js.map} +1 -1
  46. package/dist/{chunk-3CF5HJ6V.js → chunk-UQTPSVJV.js} +6 -6
  47. package/dist/{chunk-3CF5HJ6V.js.map → chunk-UQTPSVJV.js.map} +1 -1
  48. package/dist/{chunk-BIPMCNAK.js → chunk-XGO6CP5S.js} +3 -3
  49. package/dist/{chunk-BIPMCNAK.js.map → chunk-XGO6CP5S.js.map} +1 -1
  50. package/dist/{chunk-3D3BKCVQ.js → chunk-XHPWI6XF.js} +4 -4
  51. package/dist/{chunk-3D3BKCVQ.js.map → chunk-XHPWI6XF.js.map} +1 -1
  52. package/dist/cli/index.js +32 -32
  53. package/dist/connectors/index.js +5 -5
  54. package/dist/{ensure-sources-XYDPVBSP.js → ensure-sources-YH6X5XI4.js} +4 -4
  55. package/dist/{ensure-sources-XYDPVBSP.js.map → ensure-sources-YH6X5XI4.js.map} +1 -1
  56. package/dist/factory-assets/connectors/box.js +5 -5
  57. package/dist/factory-assets/connectors/deploy.js +5 -5
  58. package/dist/factory-assets/connectors/devserver.js +5 -5
  59. package/dist/factory-assets/connectors/flow/adapter.js +5 -5
  60. package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
  61. package/dist/factory-assets/connectors/flow.js +5 -5
  62. package/dist/factory-assets/connectors/git.js +5 -5
  63. package/dist/factory-assets/connectors/gmail.js +5 -5
  64. package/dist/factory-assets/connectors/googledrive.js +5 -5
  65. package/dist/factory-assets/connectors/local.js +5 -5
  66. package/dist/factory-assets/connectors/mattermost.js +5 -5
  67. package/dist/factory-assets/connectors/memory.js +5 -5
  68. package/dist/factory-assets/connectors/minio.js +5 -5
  69. package/dist/factory-assets/connectors/postgres.js +5 -5
  70. package/dist/factory-assets/connectors/s3.js +5 -5
  71. package/dist/factory-assets/connectors/sharepoint.js +5 -5
  72. package/dist/factory-assets/connectors/sqlite.js +5 -5
  73. package/dist/factory-assets/connectors/static-server.js +5 -5
  74. package/dist/factory-assets/connectors/tunnel.js +5 -5
  75. package/dist/factory-assets/connectors/webdav.js +5 -5
  76. package/dist/factory-assets/connectors/xstate-store.js +5 -5
  77. package/dist/factory-assets/connectors/xstate.js +5 -5
  78. package/dist/{helpers-47SRTVSY.js → helpers-EJEK6NN6.js} +4 -4
  79. package/dist/{helpers-47SRTVSY.js.map → helpers-EJEK6NN6.js.map} +1 -1
  80. package/dist/{library-publish-W7CIEIJJ.js → library-publish-66FHWXAA.js} +6 -6
  81. package/dist/{library-publish-W7CIEIJJ.js.map → library-publish-66FHWXAA.js.map} +1 -1
  82. package/dist/{open-library-B2PEJ3UT.js → open-library-4W2UGVJN.js} +5 -5
  83. package/dist/{open-library-B2PEJ3UT.js.map → open-library-4W2UGVJN.js.map} +1 -1
  84. package/dist/{project-TOICQYNZ.js → project-6OECVELE.js} +5 -5
  85. package/dist/{project-TOICQYNZ.js.map → project-6OECVELE.js.map} +1 -1
  86. package/dist/runner/index.js +9 -9
  87. package/dist/runner/src/resource-handler.d.ts +34 -1
  88. package/dist/runner/src/resource-handler.d.ts.map +1 -1
  89. package/dist/runner/src/serve.d.ts +3 -0
  90. package/dist/runner/src/serve.d.ts.map +1 -1
  91. package/dist/sdk/asset-manager.js +1 -1
  92. package/dist/sdk/bridge.js +4 -4
  93. package/dist/sdk/index.js +9 -9
  94. package/dist/sdk/runner.js +9 -9
  95. package/dist/sdk/session.js +2 -2
  96. package/dist/sdk/types.js +1 -1
  97. package/dist/session/index.js +2 -2
  98. package/dist/{setup-HLKIP7XW.js → setup-6IEVFDWB.js} +6 -6
  99. package/dist/{setup-HLKIP7XW.js.map → setup-6IEVFDWB.js.map} +1 -1
  100. package/dist/{source-HZTCDRGB.js → source-HJQNRGTP.js} +6 -6
  101. package/dist/{source-HZTCDRGB.js.map → source-HJQNRGTP.js.map} +1 -1
  102. package/dist/{source-manifest-publish-KEDEMOQO.js → source-manifest-publish-VU4BGFDU.js} +7 -7
  103. package/dist/{source-manifest-publish-KEDEMOQO.js.map → source-manifest-publish-VU4BGFDU.js.map} +1 -1
  104. package/dist/tui/index.js +9 -9
  105. package/dist/types/index.js +1 -1
  106. package/dist/types/src/events.d.ts +7 -0
  107. package/dist/types/src/events.d.ts.map +1 -1
  108. package/dist/types/src/index.d.ts +1 -0
  109. package/dist/types/src/index.d.ts.map +1 -1
  110. package/dist/types/src/protocol.d.ts +11 -0
  111. package/dist/types/src/protocol.d.ts.map +1 -1
  112. package/dist/types/src/version.d.ts +6 -1
  113. package/dist/types/src/version.d.ts.map +1 -1
  114. package/dist/workspace-plugin/adapters/mcp.js +2 -2
  115. package/dist/workspace-plugin/index.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/chunk-4YRRPWHY.js.map +0 -1
  118. package/dist/chunk-V6QKAC3Z.js.map +0 -1
@@ -1,6 +1,9 @@
1
1
  // types/src/mentions.ts
2
2
  var MENTION_GROUPS = ["agent", "humans", "humans_here", "here", "all"];
3
3
 
4
+ // types/src/protocol.ts
5
+ var SESSION_ROOT_CONNECTOR_ID = "@session";
6
+
4
7
  // types/src/reactions.ts
5
8
  var QUICK_REACTIONS = [
6
9
  "\u{1F44D}",
@@ -100,8 +103,8 @@ function withActivityLabelDefs(defs, z) {
100
103
  }
101
104
 
102
105
  // types/src/version.ts
103
- var PROTOCOL_VERSION = { major: 3, minor: 13, patch: 0 };
104
- var PROTOCOL_VERSION_STRING = "3.13.0";
106
+ var PROTOCOL_VERSION = { major: 3, minor: 14, patch: 0 };
107
+ var PROTOCOL_VERSION_STRING = "3.14.0";
105
108
  function parseVersion(s) {
106
109
  const parts = s.split(".");
107
110
  if (parts.length !== 3) {
@@ -120,6 +123,6 @@ function formatVersion(v) {
120
123
  return `${v.major}.${v.minor}.${v.patch}`;
121
124
  }
122
125
 
123
- export { MENTION_GROUPS, PROTOCOL_VERSION, PROTOCOL_VERSION_STRING, QUICK_REACTIONS, TOOL_ACTIVITY_LABEL_DESCRIPTION, TOOL_ACTIVITY_LABEL_MAX_CHARS, TOOL_ACTIVITY_LABEL_PARAM, TOOL_ACTIVITY_PROMPT_SECTION, declaresActivityLabel, formatVersion, isRenderCapability, isUserInvokable, parseVersion, stripActivityLabel, withActivityLabelDefs, withActivityLabelJsonSchema, withActivityLabelShape };
124
- //# sourceMappingURL=chunk-V6QKAC3Z.js.map
125
- //# sourceMappingURL=chunk-V6QKAC3Z.js.map
126
+ export { MENTION_GROUPS, PROTOCOL_VERSION, PROTOCOL_VERSION_STRING, QUICK_REACTIONS, SESSION_ROOT_CONNECTOR_ID, TOOL_ACTIVITY_LABEL_DESCRIPTION, TOOL_ACTIVITY_LABEL_MAX_CHARS, TOOL_ACTIVITY_LABEL_PARAM, TOOL_ACTIVITY_PROMPT_SECTION, declaresActivityLabel, formatVersion, isRenderCapability, isUserInvokable, parseVersion, stripActivityLabel, withActivityLabelDefs, withActivityLabelJsonSchema, withActivityLabelShape };
127
+ //# sourceMappingURL=chunk-U2QALNKX.js.map
128
+ //# sourceMappingURL=chunk-U2QALNKX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../types/src/mentions.ts","../types/src/protocol.ts","../types/src/reactions.ts","../types/src/capabilities.ts","../types/src/tool-activity.ts","../types/src/version.ts"],"names":[],"mappings":"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","file":"chunk-U2QALNKX.js","sourcesContent":["/**\n * Mentions — types for @-mention support in session messages.\n *\n * A Mention records who was addressed in a message, whether a specific user\n * or a well-known group. Group mentions carry a resolved array of user IDs\n * so consumers can perform membership checks without the resolver.\n */\n\n// ---------------------------------------------------------------------------\n// Groups\n// ---------------------------------------------------------------------------\n\n/**\n * Well-known group mention targets as a `const` array.\n *\n * Use this for validation or exhaustive checks against `MentionGroup`.\n *\n * @docLink packages/types/messages#mention\n */\nexport const MENTION_GROUPS = [\"agent\", \"humans\", \"humans_here\", \"here\", \"all\"] as const;\n\n/**\n * A well-known group that can be `@`-mentioned: `'agent' | 'humans' | 'humans_here' | 'here' | 'all'`.\n *\n * @docLink packages/types/messages#mention\n */\nexport type MentionGroup = (typeof MENTION_GROUPS)[number];\n\n// ---------------------------------------------------------------------------\n// Mention discriminated union\n// ---------------------------------------------------------------------------\n\n/**\n * A parsed `@`-mention in a session message. Records who was addressed — either a\n * specific user or a well-known group — along with the source text position.\n *\n * Group mentions carry a resolved array of user IDs so consumers can perform\n * membership checks without needing the resolver.\n *\n * @docLink packages/types/messages#mention\n */\nexport type Mention =\n | {\n type: \"user\";\n userId: string;\n name: string;\n /** Position of the `@` character in the source text. */\n offset: number;\n /** Length of the full `@token` string including the `@`. */\n length: number;\n }\n | {\n type: \"group\";\n group: MentionGroup;\n /** User IDs resolved at parse time (e.g. all online users for `@here`). */\n resolved: string[];\n /** Position of the `@` character in the source text. */\n offset: number;\n /** Length of the full `@token` string including the `@`. */\n length: number;\n }\n | {\n type: \"custom\";\n /** Consumer-defined mention kind, e.g. \"assistant\". */\n kind: string;\n /** User IDs this mention resolves to (so isMentioned works); may be empty. */\n resolved: string[];\n /** Optional consumer payload, e.g. { sessionId, ownerId }. */\n data?: Record<string, unknown>;\n /** Position of the `@` character in the source text. */\n offset: number;\n /** Length of the full `@token` string including the `@`. */\n length: number;\n };\n","/**\n * Agent Protocol — messages exchanged between agent client and server.\n *\n * AgentCommand: sent toward the agent (client → server)\n * AgentEvent: sent from the agent (server → client) — defined in events.ts\n *\n * Protocol v3 (since `@skaile/workspaces/types@4.0.0`, shipped 2026-05-10) removed\n * the following commands from the {@link AgentCommand} union: `configure` /\n * `ConfigureCommandV2`, `provision_secrets`, `request_access_token`,\n * `add_resource`, `remove_resource`, `set_log_level`, `state_action`,\n * `lifecycle`, `remount_mount`, `compact`, `reconfigure_agent`. Their\n * semantics ride on:\n * - {@link SessionInitCommand} (one deterministic envelope at session\n * start that delivers identity, resolved config, pre-minted credentials,\n * secrets, capabilities, shared state, active flows, resume hints, and\n * logging config), and\n * - `host.*` / `runner.*` capability invocations (bidirectional\n * capability registry).\n *\n * Spec: `_devlog/specs/2026-05-10-deterministic-session-bootstrap.md`.\n */\n\nimport type {\n CapabilityApproveCommand,\n CapabilityDeregisterCommand,\n CapabilityRegisterCommand,\n CapabilityResultCommand,\n} from \"./capabilities.js\";\nimport type { ConnectorContent, ConnectorOperation, ListOptions, SearchOptions } from \"./events.js\";\nimport type { ReplyRef } from \"./messaging.js\";\n\n/** Text and scoped attachments; unsupported drivers must reject attachments explicitly. */\nexport interface AgentPromptInput {\n text: string;\n attachments?: Array<\n | { type: \"image\"; path: string }\n | { type: \"file\"; path: string; name: string }\n | { type: \"skill\"; path: string; name: string }\n >;\n}\n\n/**\n * Discriminated union of all commands sent from client to agent server.\n *\n * Narrow via `command.type` or a `switch` statement.\n *\n * @docLink packages/types/protocol-v3#agent-command\n */\nexport type AgentCommand =\n // `messageId` is an opt-in receipt-correlation token (Protocol 3.8). When\n // present the runner MUST emit exactly one `prompt_ack` carrying it back,\n // as the first act of handling the prompt — before any readiness gate that\n // could swallow it. Absent, the prompt is fire-and-forget as in 3.7.\n | {\n type: \"prompt\";\n prompt: string;\n attachments?: AgentPromptInput[\"attachments\"];\n replyTo?: ReplyRef;\n messageId?: string;\n }\n // `question` binds the answer to the sub-question it belongs to, verbatim from\n // the `question` event that asked it. Omit it and the answer fills the next\n // unanswered slot in order — correct only while the host answers top-down.\n | { type: \"reply\"; answer: string; question?: string; requestId?: string }\n | { type: \"cancel\" }\n | { type: \"shutdown\" }\n | ConnectorRequestCommand\n | DebugCommand\n | ConnectorMutateCommand\n | ConnectorQueryCommand\n | ConnectorConfigCommand\n | StateUpdateCommand\n | CustomMessageCommand\n // Protocol v2 capability commands.\n | CapabilityRegisterCommand\n | CapabilityDeregisterCommand\n | CapabilityResultCommand\n | CapabilityApproveCommand;\n\n// ---------------------------------------------------------------------------\n// Resource declaration types (retained for capability inputs)\n// ---------------------------------------------------------------------------\n\n/**\n * A resource declaration carried by `runner.add_mount` / `runner.add_connector`\n * capability invocations. Mirrors the `skaile.yaml` mount/connector schema\n * but flattened for transport.\n *\n * Used by:\n * - {@link ResolvedSkaileConfig.mounts} / `.connectors` (lifecycle.ts)\n * - `runner.add_mount.input.declaration` / `runner.add_connector.input.declaration`\n *\n * @docLink packages/types/protocol-v3#resource-declaration\n */\nexport type ResourceDeclaration = {\n id: string;\n driver: string;\n source: string;\n target?: string;\n access: \"read-only\" | \"read-write\";\n auth?: string;\n /**\n * Identifier of the `ProviderLink` this resource is bound to when\n * `auth: 'backend'`. Read by the platform credential mediator to dispatch\n * the mint (and re-read by the runner when an `exposeAccessToken` git\n * mount needs to surface a managed-gitconfig credential helper). Optional\n * because not every backend-auth driver is provider-linked, and not every\n * resource uses backend auth.\n */\n providerLinkId?: string;\n options?: Record<string, unknown>;\n};\n\n/**\n * Migration strategy carried by `runner.add_mount.input.migration` when\n * replacing the workspace mount of an empty project.\n *\n * @docLink packages/types/protocol-v3#resource-migration\n */\nexport type ResourceMigration =\n | { strategy: \"replace-workspace\"; targetFolder?: string | null }\n | { strategy: \"none\" };\n\n// ---------------------------------------------------------------------------\n// Generic connector mutation / query (Protocol 2.2 — kept in v3)\n// ---------------------------------------------------------------------------\n//\n// Phase 4 of the flow-connector extraction removed the 6 typed flow commands\n// (`start_flow`, `approve_flow_node`, `provide_flow_input`, `cancel_flow`,\n// `set_flow_autonomous_mode`, `retry_flow_node`) plus the implicit\n// `configure.activeFlows` rehydration. Every removed command is reachable\n// via `connector_mutate` against the `flow` connector — see\n// `MIGRATION-flow-connector.md` for the per-op mapping table.\n\n/**\n * Generic connector mutation. Routes to ConnectorManager.executeOp(id, op, payload).\n * Replaces the typed flow commands in Protocol 2.2 — see\n * MIGRATION-flow-connector.md for the per-op mapping table.\n *\n * @docLink packages/types/protocol-v3#connector-mutate-command\n * @since 2.2.0\n */\nexport type ConnectorMutateCommand = {\n type: \"connector_mutate\";\n /** Target connector id (matches `connectors[].id` in skaile.yaml). */\n id: string;\n /** Operation name as declared by the adapter's describeOperations(). */\n op: string;\n /** Operation arguments. Adapter-specific shape. Optional for nullary ops. */\n payload?: Record<string, unknown>;\n /**\n * Opt-in acknowledgement correlation (Protocol 3.7). When present the runner\n * MUST emit exactly one `connector_mutate_response` carrying this `requestId`.\n * When absent the command is fire-and-forget, byte-identical to 3.6 behaviour.\n */\n requestId?: string;\n};\n\n/**\n * Generic connector read. Same dispatch as connector_mutate but the result\n * is returned to the caller as a `connector_query_response` event correlated\n * by `requestId`. Use for read-only queries that should not kick a turn.\n *\n * @since 2.2.0\n */\nexport type ConnectorQueryCommand = {\n type: \"connector_query\";\n requestId: string;\n id: string;\n op: string;\n payload?: Record<string, unknown>;\n};\n\n/**\n * Query the internal state of a running agent server for diagnostics.\n *\n * @docLink packages/types/protocol-v3#debug-command\n */\nexport type DebugCommand = {\n type: \"debug\";\n query: \"tools\" | \"connectors\" | \"mcp\" | \"config\" | \"state\" | \"commands\";\n args?: Record<string, unknown>;\n};\n\n/**\n * Reserved `ConnectorRequestCommand.connectorId` that addresses the session's\n * own root directory (the runner's project dir, `/skaile` in a container)\n * rather than a mount. Only `write` and `delete` are served, and only for\n * `skaile.yaml`, `.skaile/assets/**` and `.skaile/chat-files/**`. It is never\n * registered as a connector, so the agent's prompt and the\n * `resources_available` lists do not show it. The runner routes this id\n * before any connector lookup, so a connector declared with it is unreachable\n * through `resource_request`.\n */\nexport const SESSION_ROOT_CONNECTOR_ID = \"@session\";\n\n/**\n * Browse or modify connectors from the frontend.\n *\n * The wire `type:` string is `\"resource_request\"` for protocol stability.\n * The server responds with a `ConnectorResponseEvent` correlated by `requestId`.\n *\n * @docLink packages/types/protocol-v3#connector-request-command\n */\nexport type ConnectorRequestCommand = {\n type: \"resource_request\";\n /** UUID for request/response correlation. */\n requestId: string;\n /** Connector ID (e.g. \"docs\", \"project-db\"). */\n connectorId: string;\n /** Operation to perform. */\n operation: ConnectorOperation;\n /** Target path (directory, file, key, etc.). */\n path?: string;\n /** Operation-specific options (ListOptions, SearchOptions). */\n options?: ListOptions | SearchOptions;\n /** Content payload for write operations. */\n content?: ConnectorContent;\n};\n\n/**\n * Sent by the frontend to add, remove, or refresh connectors at runtime without a session restart.\n *\n * @docLink packages/types/protocol-v3#connector-config-command\n */\nexport interface ConnectorConfigCommand {\n type: \"connector_config\";\n action: \"add\" | \"remove\" | \"refresh\";\n /** Required when action === \"add\". */\n declaration?: {\n id: string;\n driver: string;\n access?: \"read-only\" | \"read-write\";\n options?: Record<string, unknown>;\n };\n /** Required when action === \"remove\". */\n connectorId?: string;\n}\n\n/**\n * Client/component writes shared state to the runtime.\n *\n * Store namespace must start with `\"app\"` or `\"component:\"` when sent from the client.\n *\n * @docLink packages/types/protocol-v3#state-update-command\n */\nexport type StateUpdateCommand = {\n type: \"state_update\";\n /** Store namespace — must start with \"app\" or \"component:\" from client. */\n store: string;\n /** Full state snapshot (replaces previous). */\n state: Record<string, unknown>;\n};\n\n/**\n * User-originated message with a custom type (from input extensions).\n *\n * Unlike a plain `prompt`, a custom message carries structured data\n * (`customType` + `customData`) alongside the text content. The agent\n * receives these on the `finished` event as `customType`/`customData`\n * fields. On the frontend, the custom message is rendered by the\n * matching dynamic component (or its fallback template).\n *\n * @docLink packages/types/protocol-v3#custom-message-command\n */\nexport type CustomMessageCommand = {\n type: \"custom_message\";\n /** Plain-text content (backward-compatible summary). */\n content: string;\n /** Custom message type identifier (e.g. \"gif\"). */\n customType: string;\n /** Structured data for the custom message type. */\n customData: Record<string, unknown>;\n};\n","/**\n * Reactions -- emoji reactions on session messages.\n *\n * Any session participant (user or agent) can react to any message.\n * Reactions are persisted in a dedicated DB model and broadcast as\n * transient events for real-time updates.\n */\n\n/**\n * A single emoji reaction on a message, set by any session participant (user or agent).\n *\n * Reactions are persisted in a dedicated DB model and broadcast as transient events\n * for real-time updates.\n *\n * @docLink packages/types/messages#reaction\n */\nexport type Reaction = {\n /** Unicode emoji character (e.g. \"thumbs up\", not \":thumbsup:\"). */\n emoji: string;\n /** ID of the user (or \"agent\" for agent reactions). */\n userId: string;\n /** Display name at reaction time (avoids extra lookups for tooltip rendering). */\n userName: string;\n /** Unix epoch milliseconds. */\n timestamp: number;\n};\n\n/**\n * Quick-access emojis shown in the reaction bar picker.\n *\n * An `as const` array of eight Unicode emoji characters in display order.\n *\n * @docLink packages/types/messages#reaction\n */\nexport const QUICK_REACTIONS = [\n \"\\u{1F44D}\",\n \"\\u{1F440}\",\n \"\\u2705\",\n \"\\u2764\\uFE0F\",\n \"\\u{1F914}\",\n \"\\u{1FAE1}\",\n \"\\u{1F44F}\",\n \"\\u{1F389}\",\n] as const;\n","/**\n * Capability layer — Protocol v2's unified registry of LLM-invokable entry points.\n *\n * A {@link Capability} is a named, schema-typed entry point that the LLM can call\n * during a session. Capabilities are registered into a per-session\n * registry by either side (host platform via `side: 'client'` or runtime via\n * `side: 'agent'`) and routed by the bridge at invocation time.\n *\n * This module defines the wire types only; the runtime registry, the\n * `defineCapability` helper, and the per-handler logger live in\n * `@skaile/workspaces/runner`.\n *\n * @see {@link MessageV2} envelope that carries capability commands and events\n * @see {@link ProtocolVersion} for the version contract\n *\n * @category Capabilities\n * @since 2.0.0\n */\n\n// ---------------------------------------------------------------------------\n// Capability shape\n// ---------------------------------------------------------------------------\n\n/**\n * Visibility scope for a capability. Determines which surfaces the capability\n * appears on and which callers can invoke it.\n *\n * - `'llm'`: registered as an LLM tool, surfaced in the `<CAPABILITIES>` system\n * prompt section. The agent driver can invoke it.\n * - `'user'`: appears in user-facing surfaces — the command palette (cmdK),\n * debug menus, capability lists.\n * - `'runtime'`: invocable only by trusted runner / platform code paths. Never\n * reaches the LLM tool list. Never reaches the command palette. Used for\n * host RPCs (`host.refresh_credential`, `host.audit`, `host.notify_user`,\n * `host.persist_compaction_attempt`) and runner RPCs (`runner.add_mount`,\n * `runner.set_log_level`, `runner.lifecycle`, ...).\n *\n * Multiple audiences are allowed (e.g. `['llm', 'user']`). The default when\n * {@link Capability.audience} is omitted is `['llm', 'user']`, preserving the\n * v2.x default visibility for capabilities that haven't migrated yet.\n *\n * @category Capabilities\n * @since 3.0.0\n * @docLink packages/types/capabilities#capability-audience\n */\nexport type CapabilityAudience = \"llm\" | \"user\" | \"runtime\";\n\n/**\n * Source of truth for who registered a capability. Used for trust enforcement\n * (the bridge rejects mismatches between registering side and origin kind)\n * and for the `capability:<origin>:<name>` log taxonomy.\n *\n * Variants:\n * - `framework`: built-in (e.g. `__capabilities.list`)\n * - `client`: host platform (e.g. `platform.react`)\n * - `agent`: self-registered by the agent runtime\n * - `flow`: injected by an active flow execution\n * - `skill`: from a skill's MCP surface\n * - `mcp`: from a generic MCP server\n * - `connector`: from a connector (e.g. `postgres.query`)\n * - `mount`: surfaced by a filesystem mount\n * - `app`: from an embedded, agent-controllable app (carries the originating\n * `appId`). Handlers run in the app itself — see {@link Capability.side} `'app'`.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-origin\n */\nexport type CapabilityOrigin =\n | { kind: \"framework\" }\n | { kind: \"client\" }\n | { kind: \"agent\" }\n | { kind: \"flow\"; flowId: string }\n | { kind: \"skill\"; skillId: string }\n | { kind: \"mcp\"; serverId: string }\n | { kind: \"connector\"; connectorId: string }\n | { kind: \"mount\"; mountId: string }\n | { kind: \"app\"; appId: string };\n\n/**\n * Render contract for a capability that produces a UI surface when invoked.\n *\n * When the LLM invokes a capability whose `render` is set, the bridge emits\n * a {@link RenderInvokedEvent} carrying the capability name and props. The\n * client renders the configured `source` at the chosen `target`. Clients\n * without a render layer can fall back to the markdown `fallback` template.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#render-spec\n */\nexport type RenderSpec = {\n /** Where the rendered component lives. */\n source: { kind: \"web-component\"; url: string; tagName: string } | { kind: \"iframe\"; url: string };\n /** Render placements supported by the component. */\n targets: (\"chat\" | \"preview\" | \"modal\" | \"input-extension\")[];\n /** Markdown template with `{{prop}}` placeholders for clients without a render layer. */\n fallback?: string;\n /** True when props may be partial during streaming. */\n streaming?: boolean;\n /** Interaction names the rendered component may fire back as state events. */\n interactions?: string[];\n};\n\n/**\n * A named, schema-typed entry point that the LLM can invoke during a session.\n *\n * Capabilities can be declared statically (via `ConfigureCommand.capabilities`)\n * or dynamically (via {@link CapabilityRegisterCommand} /\n * {@link CapabilityRegisterEvent}). They are cached for replay across\n * subscriber reconnects and session hibernation.\n *\n * @example Defining a client-side fire-and-forget tool (uses the runner's\n * `defineCapability` helper, which serializes a {@link Capability} to the wire):\n * ```ts\n * const reactTool = defineCapability({\n * name: 'platform.react',\n * description: 'Acknowledge a user message with a Unicode emoji.',\n * side: 'client',\n * origin: { kind: 'client' },\n * fireAndForget: true,\n * input: z.object({ emoji: z.string(), targetSeq: z.number().optional() }),\n * handler: async ({ emoji, targetSeq }, ctx) => { ... },\n * });\n * ```\n *\n * @see {@link RenderCapability} for capabilities that render UI components\n * @see {@link CapabilityOrigin} for who-registered-it metadata\n * @see {@link isRenderCapability} for the type-guard\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability\n */\nexport type Capability = {\n /** Unique within a session. Convention: namespaced as `<origin>.<name>` (e.g. `platform.react`, `ui.gif`). */\n name: string;\n /**\n * Human-readable label for user-facing surfaces (cmdK action palette,\n * capability menus, debug panels). Falls back to {@link Capability.name}\n * when omitted. Pure presentation — the LLM sees `name`, not `displayName`.\n */\n displayName?: string;\n /** Human/LLM-readable summary. Shown to the LLM as part of tool registration. */\n description: string;\n /** JSON Schema validating the invocation arguments. Authored as Zod, converted at register time. */\n inputSchema: Record<string, unknown>;\n /** Optional return shape. Omit for fire-and-forget effects. */\n outputSchema?: Record<string, unknown>;\n /** Where the handler runs. `client` = host platform, `agent` = runtime/skill/connector, `app` = embedded app. */\n side: \"client\" | \"agent\" | \"app\";\n /** Discriminated tag identifying who registered the capability. Used for trust enforcement and audit. */\n origin: CapabilityOrigin;\n /** Lifetime: `session` survives the whole session, `turn` is dropped at end-of-turn. */\n scope?: \"session\" | \"turn\";\n /** When true, the bridge auto-resolves with `{}` immediately and runs the handler in the background. */\n fireAndForget?: boolean;\n /** When true, the platform shows a confirm UI before dispatch and waits for {@link CapabilityApproveCommand}. */\n requiresApproval?: boolean;\n /** Documentation hint (not enforced) describing whether this is a side-effect, render, or pure query. */\n kind?: \"effect\" | \"render\" | \"query\";\n /**\n * Whether this capability should be exposed in user-facing surfaces (cmdK\n * action palette, capability menus). When omitted, the consumer applies a\n * default per-origin via {@link isUserInvokable}.\n *\n * - `true`: surface in cmdK and capability menus.\n * - `false`: hide from user surfaces (LLM-only or low-level).\n * - `undefined`: defer to {@link isUserInvokable}'s inference rules.\n *\n * @deprecated Set {@link Capability.audience} instead. `userInvokable` is\n * kept as a read-only shim for v2.x consumers and is honoured by\n * {@link isUserInvokable} when {@link Capability.audience} is absent.\n */\n userInvokable?: boolean;\n /**\n * Audience scoping for this capability. See {@link CapabilityAudience} for\n * the meaning of each value and combinations.\n *\n * When omitted, consumers treat the capability as `['llm', 'user']` (the\n * v2.x default). Host RPCs and runner RPCs MUST set this to `['runtime']`\n * so they never leak to the LLM tool list or the user-facing surfaces.\n *\n * @category Capabilities\n * @since 3.0.0\n */\n audience?: CapabilityAudience[];\n /** Appended to the system prompt's `<CAPABILITIES>` section. Use for usage hints the LLM should always see. */\n promptFragment?: string;\n /**\n * Per-capability override for how long the runner waits on the\n * `capability_result` round-trip before timing out. When omitted the\n * runner applies its default (`DEFAULT_CAPABILITY_CALL_TIMEOUT_MS`, 60s).\n *\n * Set this for capabilities that legitimately block far longer than a\n * normal tool call — e.g. `platform.ask_session` suspends the caller's\n * turn until a peer session answers, which can take minutes.\n *\n * @category Capabilities\n * @since 3.3.0\n */\n callTimeoutMs?: number;\n /** Present iff this is a render capability — see {@link RenderCapability}. */\n render?: RenderSpec;\n};\n\n/**\n * A {@link Capability} that produces a UI surface when invoked. The narrowed\n * type guarantees `render` is set, which simplifies frontend lookup.\n *\n * @see {@link isRenderCapability}\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#render-capability\n */\nexport type RenderCapability = Capability & { render: NonNullable<Capability[\"render\"]> };\n\n/**\n * Type-guard for {@link RenderCapability}. Use after {@link Capability}\n * lookup to narrow the type before reading `render`.\n *\n * @example\n * ```ts\n * for (const cap of registry.list()) {\n * if (isRenderCapability(cap)) console.log(cap.render.targets);\n * }\n * ```\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#is-render-capability\n */\nexport function isRenderCapability(cap: Capability): cap is RenderCapability {\n return cap.render !== undefined;\n}\n\n/**\n * Decide whether a capability should be surfaced in user-facing actions\n * (cmdK action palette, capability menus).\n *\n * Resolution order (first match wins):\n *\n * 1. {@link Capability.audience} is set — return `audience.includes('user')`.\n * Capabilities scoped to `'runtime'` only never appear in user surfaces.\n * 2. {@link Capability.userInvokable} is set (v2.x shim) — return that value.\n * 3. Default per-origin inference table below.\n *\n * Default-inference rules (when both `audience` and `userInvokable` are\n * omitted):\n * | Origin | Default |\n * | ------------ | ---------------------------------------------------------------------- |\n * | `framework` | `false` (LLM discovery surfaces, e.g. `__capabilities.list`) |\n * | `client` | `false` (platform ack tools — `platform.react`, `platform.pass`) |\n * | `agent` | `false` (agent-defined; assume internal unless flagged) |\n * | `flow` | `false` (per-cap opt-in) |\n * | `connector` | `false` (low-level FS / data ops) |\n * | `mount` | `false` (low-level FS ops) |\n * | `app` | `false` (LLM-only; app authors opt in via `audience: ['llm','user']`) |\n * | `mcp` | `true` if `kind === 'effect'`, else `false` |\n * | `skill` | `true` if `kind` ∈ {`effect`, `render`}, else `false` |\n *\n * @example\n * ```ts\n * for (const cap of capabilities.values()) {\n * if (isUserInvokable(cap)) registerCommandPaletteAction(cap);\n * }\n * ```\n *\n * @category Capabilities\n * @since 2.1.0\n * @docLink packages/types/capabilities#is-user-invokable\n */\nexport function isUserInvokable(cap: Capability): boolean {\n if (cap.audience !== undefined) {\n return cap.audience.includes(\"user\");\n }\n if (cap.userInvokable !== undefined) {\n return cap.userInvokable;\n }\n switch (cap.origin.kind) {\n case \"framework\":\n case \"client\":\n case \"agent\":\n case \"flow\":\n case \"connector\":\n case \"mount\":\n case \"app\":\n return false;\n case \"mcp\":\n return cap.kind === \"effect\";\n case \"skill\":\n return cap.kind === \"effect\" || cap.kind === \"render\";\n default:\n return false;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Capability commands (client → agent)\n// ---------------------------------------------------------------------------\n\n/**\n * Register one or more capabilities mid-session (client → agent).\n *\n * The platform sends this when a new client-side tool becomes available\n * after `configure` has already returned (e.g. a user installs a new\n * extension during the session).\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-register-command\n */\nexport type CapabilityRegisterCommand = {\n type: \"capability_register\";\n capabilities: Capability[];\n};\n\n/**\n * Deregister capabilities by name (client → agent). Names that are not\n * currently registered are ignored silently.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-deregister-command\n */\nexport type CapabilityDeregisterCommand = {\n type: \"capability_deregister\";\n names: string[];\n};\n\n/**\n * Return the result of a previously {@link CapabilityInvokedEvent | invoked} client-side\n * capability (client → agent). Bridges that registered the capability with\n * `fireAndForget: true` MAY skip this command; the bridge auto-resolves with `{}`.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-result-command\n */\nexport type CapabilityResultCommand = {\n type: \"capability_result\";\n /** Correlation token matching the {@link CapabilityInvokedEvent.callId}. */\n callId: string;\n /** Successful result payload, or an error envelope. */\n result: unknown | { error: string };\n};\n\n/**\n * Invoke an **agent-side** capability (client → agent). The host names the\n * capability and supplies its input; the runner answers with a matching\n * {@link CapabilityResultEvent}. The mirror of {@link CapabilityInvokedEvent},\n * which reports the LLM invoking a client-side capability in the opposite\n * direction and shares this discriminant.\n *\n * @category Capabilities\n * @since 3.23.0\n * @docLink packages/types/capabilities#capability-invoke-command\n */\nexport type CapabilityInvokeCommand = {\n type: \"capability_invoked\";\n /** Correlation token the answering {@link CapabilityResultEvent} echoes. */\n callId: string;\n /** Name of the {@link Capability} to invoke. */\n name: string;\n /** Input payload, validated against the capability's schema by the registry. */\n input: unknown;\n};\n\n/**\n * Return the result of a platform-invoked **agent-side** capability\n * (agent → client). The mirror of {@link CapabilityResultCommand}, which\n * carries the same shape in the opposite direction for client-side\n * capabilities; `runner.attach_instance` and its `runner.*` siblings answer\n * with this one.\n *\n * Both directions share the `capability_result` discriminant, so the sender\n * decides which type applies — they are never both valid on one hop.\n *\n * @category Capabilities\n * @since 3.23.0\n * @docLink packages/types/capabilities#capability-result-event\n */\nexport type CapabilityResultEvent = {\n type: \"capability_result\";\n /** Correlation token matching the invoking call. */\n callId: string;\n /** Successful result payload, or an error envelope. */\n result: unknown | { error: string };\n};\n\n/**\n * Approve or reject a capability call that was invoked with\n * `requiresApproval: true` (client → agent). The platform shows a confirm\n * UI and forwards the user's decision via this command.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-approve-command\n */\nexport type CapabilityApproveCommand = {\n type: \"capability_approve\";\n /** Correlation token matching the {@link CapabilityInvokedEvent.callId}. */\n callId: string;\n /** User's decision. */\n decision: \"approved\" | \"rejected\";\n /** Optional rationale stored alongside the decision for audit. */\n feedback?: string;\n /** User ID of the decider (informational — framework enforces no policy). */\n decidedBy: string;\n};\n\n// ---------------------------------------------------------------------------\n// Capability events (agent → client)\n// ---------------------------------------------------------------------------\n\n/**\n * Register one or more capabilities mid-session (agent → client). Mirrors\n * {@link CapabilityRegisterCommand} for the agent-initiated direction; used\n * when the runtime adds a capability after `configure` (e.g. when a flow\n * starts and injects flow-scoped tools).\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-register-event\n */\nexport type CapabilityRegisterEvent = {\n type: \"capability_register\";\n capabilities: Capability[];\n};\n\n/**\n * Deregister capabilities by name (agent → client).\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-deregister-event\n */\nexport type CapabilityDeregisterEvent = {\n type: \"capability_deregister\";\n names: string[];\n};\n\n/**\n * Notify the client that a capability has been invoked by the LLM (agent →\n * client). For client-side capabilities the platform's handler runs in\n * response to this event and replies with {@link CapabilityResultCommand}.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#capability-invoked-event\n */\nexport type CapabilityInvokedEvent = {\n type: \"capability_invoked\";\n /** Correlation token for the eventual {@link CapabilityResultCommand}. */\n callId: string;\n /** Name of the invoked {@link Capability}. */\n name: string;\n /** Validated input payload (already conforms to the capability's `inputSchema`). */\n input: unknown;\n /** In v2.0.0 the LLM is the only invoker. */\n invokedBy: \"agent\";\n};\n\n/**\n * Notify the client that a render capability should be drawn (agent →\n * client). Emitted alongside {@link CapabilityInvokedEvent} when the\n * invoked capability's `render` block is populated.\n *\n * Clients without a render layer can fall back to the capability's\n * `render.fallback` markdown template.\n *\n * @category Capabilities\n * @since 2.0.0\n * @docLink packages/types/capabilities#render-invoked-event\n */\nexport type RenderInvokedEvent = {\n type: \"render_invoked\";\n /** Name of the invoked render capability. */\n capabilityName: string;\n /** Props passed to the rendered component (already conforms to `inputSchema`). */\n props: unknown;\n /** Correlation token shared with the matching {@link CapabilityInvokedEvent}. */\n callId: string;\n};\n","/**\n * Agent-authored tool-call activity labels.\n *\n * Every tool the runtime advertises to the model carries one extra optional\n * string parameter, {@link TOOL_ACTIVITY_LABEL_PARAM}, in which the agent\n * describes the call in plain language (\"Reading the Q3 budget spreadsheet\").\n * The normalizer surfaces it as `ToolCallEvent.label` so the chat can show it\n * instead of the raw tool name and arguments.\n *\n * The parameter is added at the ADVERTISE layer only and stripped before the\n * real handler runs. It never enters a capability's registered `inputSchema`,\n * because that schema is hashed into the resume signature.\n *\n * Zod is passed in rather than imported: the Claude SDK and the bridge each\n * bring their own zod instance, and the schema must be built with the one the\n * SDK validates against.\n *\n * @category Tools\n * @since 3.24.0\n */\n\n/** Name of the optional parameter injected into every advertised tool schema. */\nexport const TOOL_ACTIVITY_LABEL_PARAM = \"activity_label\";\n\n/** Longest label the normalizer passes on; longer text is truncated with an ellipsis. */\nexport const TOOL_ACTIVITY_LABEL_MAX_CHARS = 120;\n\n/** LLM-facing description of {@link TOOL_ACTIVITY_LABEL_PARAM}. */\nexport const TOOL_ACTIVITY_LABEL_DESCRIPTION =\n \"Short plain-language description (under ~12 words, present tense) of what this call does, \" +\n \"shown to the user while it runs, e.g. 'Reading the Q3 budget spreadsheet'. \" +\n \"Never include secrets.\";\n\n/** System-prompt guidance telling the agent to fill the label on every call. */\nexport const TOOL_ACTIVITY_PROMPT_SECTION = [\n \"## Tool-call activity labels\",\n \"\",\n `Whenever a tool offers an \\`${TOOL_ACTIVITY_LABEL_PARAM}\\` parameter, always fill it. For the Bash tool, always fill its \\`description\\` parameter.`,\n \"The text is shown to the user while the call runs, in place of the tool's technical details, so write it for a non-technical reader:\",\n \"under ~12 words, present tense, naming the thing being worked on (e.g. 'Reading the Q3 budget spreadsheet', 'Checking which invoices are overdue').\",\n \"Never put secrets, tokens or raw file contents in it.\",\n].join(\"\\n\");\n\n/**\n * Add {@link TOOL_ACTIVITY_LABEL_PARAM} to a zod raw shape (a record of zod\n * fields, as `createSdkMcpServer` accepts). Returns the shape unchanged when\n * the tool already declares a property of that name.\n */\nexport function withActivityLabelShape(\n shape: Record<string, unknown>,\n z: any,\n): Record<string, unknown> {\n if (Object.hasOwn(shape, TOOL_ACTIVITY_LABEL_PARAM)) return shape;\n return {\n ...shape,\n [TOOL_ACTIVITY_LABEL_PARAM]: z.string().optional().describe(TOOL_ACTIVITY_LABEL_DESCRIPTION),\n };\n}\n\n/**\n * Add {@link TOOL_ACTIVITY_LABEL_PARAM} to a JSON Schema object's top-level\n * `properties`. Returns the schema unchanged when it already declares the\n * property.\n */\nexport function withActivityLabelJsonSchema(\n schema: Record<string, unknown> | undefined,\n): Record<string, unknown> {\n const base = schema ?? {};\n if (declaresActivityLabel(base)) return base;\n const props = (base.properties ?? {}) as Record<string, unknown>;\n return {\n ...base,\n properties: {\n ...props,\n [TOOL_ACTIVITY_LABEL_PARAM]: { type: \"string\", description: TOOL_ACTIVITY_LABEL_DESCRIPTION },\n },\n };\n}\n\n/** True when a JSON Schema object itself declares {@link TOOL_ACTIVITY_LABEL_PARAM}. */\nexport function declaresActivityLabel(schema: unknown): boolean {\n if (!schema || typeof schema !== \"object\") return false;\n const props = (schema as Record<string, unknown>).properties;\n return !!props && typeof props === \"object\" && Object.hasOwn(props, TOOL_ACTIVITY_LABEL_PARAM);\n}\n\n/**\n * Remove {@link TOOL_ACTIVITY_LABEL_PARAM} from a tool input before it reaches\n * the handler. Returns a shallow copy; non-object inputs and inputs without\n * the key are returned as-is.\n */\nexport function stripActivityLabel<T>(input: T): T {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) return input;\n if (!Object.hasOwn(input, TOOL_ACTIVITY_LABEL_PARAM)) return input;\n const { [TOOL_ACTIVITY_LABEL_PARAM]: _label, ...rest } = input as Record<string, unknown>;\n return rest as T;\n}\n\n/**\n * Wrap in-process SDK tool defs: advertise {@link TOOL_ACTIVITY_LABEL_PARAM}\n * and strip it before each handler runs. A def that already declares the\n * property is returned untouched — the value is then the tool's own argument.\n */\nexport function withActivityLabelDefs<\n T extends { inputSchema: Record<string, unknown>; handler: (args: any) => unknown },\n>(defs: T[], z: any): T[] {\n return defs.map((def) => {\n if (Object.hasOwn(def.inputSchema, TOOL_ACTIVITY_LABEL_PARAM)) return def;\n return {\n ...def,\n inputSchema: withActivityLabelShape(def.inputSchema, z),\n // Forward the SDK's trailing args (`extra`) untouched.\n handler: (args: unknown, ...rest: unknown[]) =>\n (def.handler as (a: unknown, ...r: unknown[]) => unknown)(\n stripActivityLabel(args),\n ...rest,\n ),\n };\n });\n}\n","/**\n * Protocol versioning primitives for Skaile Agent Protocol v2.\n *\n * The protocol is versioned by a structured {@link ProtocolVersion} record\n * (`major.minor.patch`). The compatibility rule applied at handshake is\n * **major-equality**: a runner emits {@link IncompatibleProtocolEvent} and\n * shuts down when its declared major does not match the platform's announced\n * major. Minor and patch differences ride through transparently because\n * unknown fields are preserved on round-trip (see `MessageMeta` round-trip\n * contract in `messaging.ts`).\n *\n * @category Protocol\n * @since 2.0.0\n */\n\n/**\n * Structured semantic version triple for the agent protocol.\n *\n * @example\n * ```ts\n * const v: ProtocolVersion = { major: 2, minor: 0, patch: 0 };\n * ```\n *\n * @category Protocol\n * @since 2.0.0\n * @docLink packages/types/protocol-v2#protocol-version\n */\nexport type ProtocolVersion = {\n /** Incremented on breaking wire-format changes (field removed, semantics changed, required field added). */\n major: number;\n /** Incremented on additive wire-format changes (new optional fields, new event types). */\n minor: number;\n /** Incremented on bug-fix or doc-only changes that do not affect the wire. */\n patch: number;\n};\n\n/**\n * The protocol version the framework currently speaks. Runners and platforms\n * compare this against the peer's announced version at session boot via\n * `SessionInitCommand.protocolVersion`.\n *\n * @example\n * ```ts\n * import { PROTOCOL_VERSION } from '@skaile/workspaces/types';\n * if (cmd.protocolVersion.major !== PROTOCOL_VERSION.major) {\n * emit({ type: 'incompatible_protocol', agentVersion: PROTOCOL_VERSION, platformVersion: cmd.protocolVersion });\n * }\n * ```\n *\n * @category Protocol\n * @since 3.0.0\n *\n * Changed in 3.14.0:\n * Optional `sessionRoot` flag on `resources_available`, advertising the\n * reserved `SESSION_ROOT_CONNECTOR_ID` write target for session-owned files.\n * Older peers ignore the flag and never send the reserved id.\n *\n * Changed in 3.13.0:\n * Optional agent-authored `label` on the `tool_call` event, and a new\n * `\"tool-activity\"` member of `SystemPromptSection.label`. Older peers ignore\n * both; a host that renders `label` can feature-detect it by this minor.\n *\n * Changed in 3.12.0:\n * Optional structured prompt attachments and question/reply requestId correlation.\n * Older peers retain text prompts and ignore unknown optional fields. Managed\n * question hosts must echo requestId; this minor does not advertise or admit the\n * separately gated codex-app-server-v1 runtime.\n *\n * Changed in 3.10.0:\n * Additive rejection cause on the AI-credential refresh input. The\n * `host.refresh_credential` `ai-credentials` input gains an optional\n * `rejection?: CredentialRejection` (`'auth' | 'usage-limit'`), sent only\n * alongside `reason: 'retry-401'` and only from the two runner call sites that\n * genuinely classified the failure — the driver's auth self-heal (`'auth'`) and\n * its usage-limit failover (`'usage-limit'`). `reason: 'retry-401'` collapsed\n * both, so a limit-blocked session on a config that is not opted into\n * `autoActivate` never re-resolved; the field is what lets the platform tell\n * them apart. `auth` asserts only that the rejection was auth-shaped, never\n * that capacity is fine (Anthropic mislabels OAuth quota exhaustion as\n * `authentication_error`); only `usage-limit` is a positive assertion. The\n * connector and MCP refresh paths classify nothing and keep emitting exactly\n * today's bytes. There is no peer-version gate, so a 3.9 peer does receive the\n * key on those two inputs; it is unaffected because nothing was removed or\n * reshaped and it must ignore an unknown key — and an unrecognised value —\n * rather than reject the input, which is also what allows a third rejection\n * later without a major bump. A 3.10 host against a 3.9 runner never sees the\n * field and must not read its absence as \"not a limit\" (feature-detect on\n * `major === 3 && minor >= 10`).\n * Spec: skaile-ai/platform#3562.\n *\n * Changed in 3.9.0:\n * Additive live AI-provider-seat signals, all optional under the\n * major-equality rule:\n * - `AgentEvent` gains `provider_response_seen`, emitted when the runner\n * observes a 401 or a 429 / subscription-limit rejection from the AI\n * provider, attributed to the pinned `AIProviderConfig`. A platform with\n * no handler broadcasts it harmlessly; consumers must ignore unknown\n * fields, since the platform half ships independently.\n * - The `CredentialMint` success branch gains an optional `configId` — the\n * seat the platform actually minted for. When it differs from the one the\n * runner asked for, the runner repoints the live session at it. A platform\n * that omits the field produces exactly 3.8 behaviour (no switch is ever\n * detected).\n * - The `credentialRotated` broadcast may carry `entry.data.configId` to\n * move a running session to a different seat rather than merely rotating\n * the token on the current one. Absent → today's re-pull.\n * A 3.8 peer is unaffected: nothing was removed or re-shaped, every addition is\n * opt-in on a field a 3.8 peer never sets. A 3.9 host against a 3.8 runner sees\n * no `provider_response_seen` and must not read that as \"no limits were hit\"\n * (feature-detect on `major === 3 && minor >= 9`).\n *\n * Changed in 3.8.0:\n * Additive `prompt` receipt acknowledgement. The `prompt` command gains an\n * optional `messageId`; when set the runner emits exactly one new `prompt_ack`\n * event echoing it, as the first act of handling the frame — before the\n * session-readiness gate, the secrets check and the driver start, each of which\n * could previously drop a prompt with no trace at all. When absent nothing is\n * emitted, so a 3.7 host sees byte-identical behaviour. A 3.8 host against a\n * 3.7 runner gets no ack and must not read that as a lost prompt — feature-detect\n * on `major === 3 && minor >= 8`. The ack is receipt-only: it says the frame\n * arrived, never that the turn ran.\n *\n * Changed in 3.7.0:\n * Additive `connector_mutate` acknowledgement + flow-hydrate reconciliation.\n * Three changes, all additive under the major-equality rule:\n * - `ConnectorMutateCommand` gains an optional `requestId`. When set, the\n * runner emits exactly one new `connector_mutate_response` event (with\n * `ok` / `result` / `error` / `code` / `reconciled`) on every terminal path,\n * including the paths that previously only logged. When absent nothing is\n * emitted, so a 3.6 host sees byte-identical behaviour.\n * - `flow.hydrate` accepts an optional `payload.pendingDecisions` —\n * `PendingGateDecision[]` the runner replays against the snapshot in the\n * same invocation that creates the flow connector, reporting the outcome as\n * `reconciled`. A host that omits the key gets today's hydrate.\n * - A flow-targeted mutate whose connector is not yet registered now waits\n * (bounded, `SKAILE_FLOW_MUTATE_CONNECTOR_WAIT_MS`, default 8000 ms) and\n * re-plans instead of failing — a behaviour change on a path that used to\n * fail silently, visible to a 3.6 host only as the op succeeding.\n * A 3.6 peer is unaffected: no symbol was removed or re-shaped, the ack is\n * opt-in on a field a 3.6 host never sets, and unknown fields ride through the\n * round-trip. A 3.7 host against a 3.6 runner sees `requestId` ignored and no\n * response, which it must treat as \"unacknowledged\" (feature-detect on\n * `major === 3 && minor >= 7`). Spec: `runner/MIGRATION-flow-connector.md`.\n *\n * Changed in 3.6.0:\n * Additive resolved-agent-config wire field. `ResolvedSkaileConfig` gains an\n * optional `agentConfig?: ResolvedAgentConfig` carrying the platform-resolved\n * driver / provider / model / cloud / cloudConfig / thinking / effort — the\n * same values the platform bakes into the generated skaile.yaml\n * `agent-config.default`. The runner applies it disk-first: any on-disk\n * `agent-config` profile with at least one agent setting disables the wire\n * value outright, so yaml-on-disk (docker-mode) sessions are byte-identical.\n * Additive under the major-equality rule: an older runner ignores the field\n * and an older platform simply omits it.\n *\n * Changed in 3.5.0:\n * Flow-connector host-contract fix (workspaces#379). Three coordinated changes,\n * all additive under the major-equality rule:\n * - `op:\"hydrate\"` on the bare `\"flow\"` connector now auto-creates the\n * `flow:<runId>` connector on a cold container from its `{ state, flow }`\n * payload, so a persisted run rehydrates in one op. A peer that still issues\n * `start` then `hydrate` keeps working unchanged.\n * - The dead `SessionInit.activeFlows` field (never read by the runner) and its\n * `ActiveFlowRehydration` type are removed — wire-compatible (nothing produced\n * or consumed them) but source-breaking for typed hosts, hence the bump.\n * - Malformed / conflicting flow `start` and `hydrate` payloads now fail loudly\n * (warn with a reason) instead of silently falling through.\n * Because the handshake compares only `major`, a 3.4 host and a 3.5 runner\n * interoperate: the auto-create path is opt-in on the payload the host sends, and\n * the removed field was already inert. Spec: `runner/MIGRATION-flow-connector.md`.\n *\n * Changed in 3.4.0:\n * Additive embedded-app capability source. `CapabilityOrigin` gains a\n * `{ kind: 'app'; appId: string }` variant and `Capability.side` gains `'app'`\n * (\"the handler runs in the embedded app\"). Both are additive: a peer that does\n * not understand `origin:'app'` / `side:'app'` never produces or routes them, so\n * they ride through transparently under the major-equality rule. No new message\n * types — `capability_register` / `capability_invoked` / `capability_result` /\n * `capability_approve` / `render_invoked` are reused verbatim. Spec:\n * `_devlog/specs/2026-07-07-app-capability-source.md`.\n *\n * Changed in 3.3.0:\n * Additive agent-to-agent (session-to-session) communication extension.\n * `AgentEvent` gains an `a2a_message` variant carrying cross-session messages\n * (`direction`, `peerSessionId`, `peerName`, `exchangeId`, `text`). `Capability`\n * gains an optional `callTimeoutMs?: number` so a long-running capability call\n * (e.g. a 5-minute `platform.ask_session`) can exceed the default capability-call\n * timeout. Both are additive: a peer that does not understand them ignores the\n * event / falls back to the default timeout, so they ride through transparently\n * under the major-equality rule.\n *\n * Changed in 3.2.0:\n * Additive wake-time resume cascade. `AgentReconfigureOptions` gains optional\n * `resumeSessionId` and `expectedCapabilitySignature` fields driving the tier-1\n * native SDK resume path; `AgentEvent` gains `ResumeAttemptedEvent` and\n * `ResumeFailedEvent`. `FinishedEvent` gains optional `customType` /\n * `customData` for capability-routed custom payloads. All additive — clients\n * that omit the resume hint or ignore the new events keep working unchanged.\n *\n * Changed in 3.1.0:\n * Additive cost / token usage extension. `FinishedEvent` gains an optional\n * `tokens?: TokenUsage` field carrying per-turn input / output / cache-read /\n * cache-creation / reasoning token counts. `AgentDriver.getTokenUsage()` is\n * widened to return the same `TokenUsage` shape (existing consumers reading\n * `inputTokens` / `outputTokens` keep working unchanged). Drivers that do not\n * surface token usage continue to return `null` / omit the field.\n *\n * Changed in 3.0.0:\n * Major bump for the deterministic session bootstrap rewrite. `ConfigureCommandV2`,\n * `provision_secrets`, `request_access_token`, `add_resource`, `remove_resource`,\n * `set_log_level`, `state_action`, `lifecycle`, `remount_mount`, `compact`, and\n * `reconfigure_agent` are removed from the `AgentCommand` union. Their semantics\n * are reachable through:\n * - `session_init` (one deterministic envelope at session start that delivers\n * identity, resolved config, pre-minted credentials, secrets, capabilities,\n * shared state, active flows, resume hints, and logging config),\n * - `host.refresh_credential` (capability invocation that replaces the\n * refresh-on-401 path of `request_access_token`), and\n * - `runner.*` capabilities (`runner.add_mount`, `runner.add_connector`,\n * `runner.remove_resource`, `runner.update_credential`, `runner.set_log_level`,\n * `runner.set_state`, `runner.lifecycle`) invoked by the platform via the\n * bidirectional capability registry.\n *\n * Capabilities gain an `audience: ('llm' | 'user' | 'runtime')[]` field that\n * scopes visibility: host RPCs (`host.*`) and runner RPCs (`runner.*`) are\n * `['runtime']` and never reach the LLM tool list or the user-facing command\n * palette. v2.x capabilities without an explicit `audience` default to\n * `['llm', 'user']`, preserving prior behaviour.\n *\n * Spec: `_devlog/specs/2026-05-10-deterministic-session-bootstrap.md`.\n *\n * @docLink packages/types/protocol-v3#protocol-version\n */\nexport const PROTOCOL_VERSION: ProtocolVersion = { major: 3, minor: 14, patch: 0 };\n\n/**\n * String form of {@link PROTOCOL_VERSION}, kept in lock-step. Useful for\n * `package.json` version fields and HTTP `User-Agent` strings.\n *\n * @category Protocol\n * @since 3.0.0\n * @docLink packages/types/protocol-v3#protocol-version\n */\nexport const PROTOCOL_VERSION_STRING = \"3.14.0\";\n\n/**\n * Parse a `\"major.minor.patch\"` string into a {@link ProtocolVersion}.\n *\n * @param s - the version string to parse, exactly three dot-separated non-negative integers\n * @returns the parsed protocol version\n * @throws {Error} if the string is not exactly three dot-separated non-negative integers\n *\n * @example\n * ```ts\n * parseVersion('2.0.0'); // { major: 2, minor: 0, patch: 0 }\n * parseVersion('2.1'); // throws\n * ```\n *\n * @category Protocol\n * @since 2.0.0\n * @docLink packages/types/protocol-v2#parse-version\n */\nexport function parseVersion(s: string): ProtocolVersion {\n const parts = s.split(\".\");\n if (parts.length !== 3) {\n throw new Error(`Invalid ProtocolVersion: \"${s}\" (expected \"major.minor.patch\")`);\n }\n const [maj, min, pat] = parts;\n const major = Number(maj);\n const minor = Number(min);\n const patch = Number(pat);\n if (\n !Number.isInteger(major) ||\n !Number.isInteger(minor) ||\n !Number.isInteger(patch) ||\n major < 0 ||\n minor < 0 ||\n patch < 0\n ) {\n throw new Error(`Invalid ProtocolVersion: \"${s}\" (each part must be a non-negative integer)`);\n }\n return { major, minor, patch };\n}\n\n/**\n * Format a {@link ProtocolVersion} record into its `\"major.minor.patch\"` string form.\n *\n * @param v - the protocol version to format\n * @returns the dot-joined string form\n *\n * @example\n * ```ts\n * formatVersion({ major: 2, minor: 0, patch: 0 }); // '2.0.0'\n * ```\n *\n * @category Protocol\n * @since 2.0.0\n * @docLink packages/types/protocol-v2#format-version\n */\nexport function formatVersion(v: ProtocolVersion): string {\n return `${v.major}.${v.minor}.${v.patch}`;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { openLibraryManager, createFullRegistry } from './chunk-BIPMCNAK.js';
2
- import { logErr, logInfo, logWarn, logOk, S } from './chunk-YNO3LBRH.js';
1
+ import { openLibraryManager, createFullRegistry } from './chunk-XGO6CP5S.js';
2
+ import { logErr, logInfo, logWarn, logOk, S } from './chunk-A565EFTW.js';
3
3
  import { getStoreManifestsDir, LocalCatalogSource, writeCuratedManifest } from './chunk-TCHEW3T2.js';
4
4
  import { computeDeterministicHash, discoverAssetsInTree } from './chunk-DZ4UZOFB.js';
5
5
  import { WorkspaceYamlEditor } from './chunk-HSRHO7SK.js';
@@ -313,12 +313,12 @@ function addSourceManifestCommands(src) {
313
313
  ).option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--publisher <name>", "Override the publisher (--overwrite only)").option("--dev", "Include assets under the source's dev_paths", false).option("--overwrite", "Discard curation and re-scan the full inventory", false).action((arg, opts) => runRebuild(arg, opts));
314
314
  manifest.command("verify <src>").description("Verify hashes, deps, and schema (read-only)").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--strict", "Fail on advisory checks (warnings force a nonzero exit)", false).action((arg, opts) => runVerify(arg, opts));
315
315
  manifest.command("publish <src>").description("Push the curated sidecar manifest and publish it to the store").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--as <namespace>", "Publisher namespace (default: your store username)").option("--sidecar-repo <url>", "Public GitHub repo you own to hold the curated manifest").option("--ref <gitref>", "Foreign source ref to ingest (branch/sha; default: main)").option("--dry-run", "Print the publish plan without pushing or calling the store", false).action(async (arg, opts) => {
316
- const { runPublish } = await import('./source-manifest-publish-KEDEMOQO.js');
316
+ const { runPublish } = await import('./source-manifest-publish-VU4BGFDU.js');
317
317
  await runPublish(arg, opts);
318
318
  });
319
319
  manifest.command("propose <src>").description("Open a PR to upstream with the sidecar manifest").action(() => notWired("propose"));
320
320
  manifest.command("yank <src>").description("Retract the source's published assets from the store").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--asset <ref>", "Yank only the asset matching this ref/name").action(async (arg, opts) => {
321
- const { runYank } = await import('./source-manifest-publish-KEDEMOQO.js');
321
+ const { runYank } = await import('./source-manifest-publish-VU4BGFDU.js');
322
322
  await runYank(arg, opts);
323
323
  });
324
324
  }
@@ -684,5 +684,5 @@ function makeSourceCommand() {
684
684
  }
685
685
 
686
686
  export { autoSyncForSearch, ensureClone, findCacheKeyCollision, indexingHadFailures, legacySourceConfigHint, makeSourceCommand, normalizeSourceUrl, readProjectSources, resolveSourceArg, sourceClonePath, sourceMatchesKey, syncProjectSources };
687
- //# sourceMappingURL=chunk-HGDFQDHT.js.map
688
- //# sourceMappingURL=chunk-HGDFQDHT.js.map
687
+ //# sourceMappingURL=chunk-UOERRCR3.js.map
688
+ //# sourceMappingURL=chunk-UOERRCR3.js.map