@mininglamp-oss/octo-runtime 1.1.12 → 1.1.14

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 (195) hide show
  1. package/README.md +1 -1
  2. package/apps/cli/dist/adapters.d.ts +19 -1
  3. package/apps/cli/dist/adapters.js +154 -28
  4. package/apps/cli/dist/build-info.json +2 -2
  5. package/apps/cli/dist/codex.d.ts +5 -0
  6. package/apps/cli/dist/codex.js +36 -0
  7. package/apps/cli/dist/kernel.d.ts +4 -0
  8. package/apps/cli/dist/kernel.js +84 -0
  9. package/apps/cli/dist/main.js +8 -7
  10. package/apps/cli/dist/manifest.json +33 -22
  11. package/apps/cli/dist/output.d.ts +1 -0
  12. package/apps/cli/dist/output.js +8 -4
  13. package/apps/cli/dist/playboard.js +21 -12
  14. package/apps/cli/dist/provider-launch.d.ts +28 -0
  15. package/apps/cli/dist/provider-launch.js +52 -0
  16. package/apps/cli/dist/providers.d.ts +182 -0
  17. package/apps/cli/dist/providers.js +34 -0
  18. package/dist/public/adapter-sdk.d.ts +2 -0
  19. package/dist/public/adapter-sdk.js +2 -0
  20. package/dist/public/protocol.d.ts +2 -2
  21. package/dist/public/protocol.js +1 -1
  22. package/node_modules/@mininglamp-oss/octo-runtime-acp-client/dist/index.js +4 -4
  23. package/node_modules/@mininglamp-oss/octo-runtime-acp-client/package.json +3 -3
  24. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.d.ts +26 -10
  25. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/dist/index.js +44 -53
  26. package/node_modules/@mininglamp-oss/octo-runtime-adapter-acp/package.json +4 -4
  27. package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.d.ts +10 -35
  28. package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/dist/index.js +21 -29
  29. package/node_modules/@mininglamp-oss/octo-runtime-adapter-antigravity/package.json +3 -3
  30. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/agent-env.d.ts +3 -0
  31. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/agent-env.js +10 -0
  32. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.d.ts +14 -68
  33. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/dist/index.js +77 -61
  34. package/node_modules/@mininglamp-oss/octo-runtime-adapter-claude-code/package.json +3 -3
  35. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.d.ts +19 -31
  36. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/dist/index.js +28 -18
  37. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codebuddy/package.json +4 -4
  38. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/agent-env.d.ts +3 -0
  39. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/agent-env.js +10 -0
  40. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.d.ts +6 -5
  41. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/app-server.js +55 -54
  42. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.d.ts +54 -0
  43. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/engine.js +147 -0
  44. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/environment.js +4 -8
  45. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.d.ts +20 -92
  46. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/index.js +103 -217
  47. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.d.ts +2 -2
  48. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/mcp.js +4 -11
  49. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.d.ts +9 -5
  50. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/dist/service.js +77 -81
  51. package/node_modules/@mininglamp-oss/octo-runtime-adapter-codex/package.json +3 -3
  52. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-SMTJTIN7.js → chunk-AE3OJBDS.js} +1 -1
  53. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-H3S6WM37.js → chunk-NGR74QLF.js} +0 -1
  54. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/{chunk-RISQ6NGV.js → chunk-XIUZ6GXG.js} +1 -1
  55. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.d.ts +0 -1
  56. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/errors.js +1 -1
  57. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.d.ts +6 -8
  58. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/index.js +16 -21
  59. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/launch.js +2 -2
  60. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/dist/trajectory.js +2 -2
  61. package/node_modules/@mininglamp-oss/octo-runtime-adapter-dsh/package.json +3 -3
  62. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.d.ts +14 -16
  63. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/adapter.js +29 -46
  64. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/agent-env.d.ts +3 -0
  65. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/agent-env.js +10 -0
  66. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/client.js +4 -7
  67. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.d.ts +13 -21
  68. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/dist/index.js +47 -36
  69. package/node_modules/@mininglamp-oss/octo-runtime-adapter-grok-build/package.json +5 -5
  70. package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.d.ts +24 -8
  71. package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/dist/index.js +14 -7
  72. package/node_modules/@mininglamp-oss/octo-runtime-adapter-hermes/package.json +2 -2
  73. package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.d.ts +24 -8
  74. package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/dist/index.js +13 -6
  75. package/node_modules/@mininglamp-oss/octo-runtime-adapter-kimi-code/package.json +2 -2
  76. package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.d.ts +24 -8
  77. package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/dist/index.js +14 -7
  78. package/node_modules/@mininglamp-oss/octo-runtime-adapter-mcode/package.json +2 -2
  79. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.d.ts +7 -7
  80. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/dist/index.js +28 -31
  81. package/node_modules/@mininglamp-oss/octo-runtime-adapter-openclaw/package.json +3 -3
  82. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.d.ts +16 -25
  83. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/dist/index.js +113 -179
  84. package/node_modules/@mininglamp-oss/octo-runtime-adapter-opencode/package.json +4 -4
  85. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.d.ts +24 -8
  86. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/dist/index.js +14 -6
  87. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qodercli/package.json +3 -2
  88. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.d.ts +24 -8
  89. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/dist/index.js +14 -6
  90. package/node_modules/@mininglamp-oss/octo-runtime-adapter-qoderclicn/package.json +3 -2
  91. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/activity.d.ts +5 -1
  92. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.d.ts +48 -0
  93. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/agent-env.js +234 -0
  94. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/approval.js +7 -2
  95. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/environment.js +1 -1
  96. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/execution-scope.d.ts +5 -1
  97. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.d.ts +25 -14
  98. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/index.js +112 -59
  99. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/mcp.js +1 -1
  100. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.d.ts +11 -1
  101. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/process-launch.js +89 -8
  102. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.d.ts +10 -0
  103. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/provider-launch.js +25 -0
  104. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/public-display.js +10 -3
  105. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/package.json +2 -2
  106. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.d.ts +19 -1
  107. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/adapters.js +154 -28
  108. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/build-info.json +2 -2
  109. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.d.ts +5 -0
  110. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/codex.js +36 -0
  111. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/kernel.d.ts +4 -0
  112. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/kernel.js +84 -0
  113. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/main.js +8 -7
  114. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/manifest.json +33 -22
  115. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.d.ts +1 -0
  116. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/output.js +8 -4
  117. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/playboard.js +21 -12
  118. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.d.ts +28 -0
  119. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/provider-launch.js +52 -0
  120. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.d.ts +182 -0
  121. package/node_modules/@mininglamp-oss/octo-runtime-cli/dist/providers.js +34 -0
  122. package/node_modules/@mininglamp-oss/octo-runtime-cli/package.json +20 -20
  123. package/node_modules/@mininglamp-oss/octo-runtime-client/build-info.json +2 -2
  124. package/node_modules/@mininglamp-oss/octo-runtime-client/dist/client.js +2 -2
  125. package/node_modules/@mininglamp-oss/octo-runtime-client/package.json +5 -5
  126. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-ipc.schema.json +3 -104
  127. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/protocol.schema.json +166 -1870
  128. package/node_modules/@mininglamp-oss/octo-runtime-cross-service/package.json +1 -1
  129. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.d.ts +0 -2
  130. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/index.js +122 -65
  131. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.d.ts +2 -2
  132. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/invoke-input.js +13 -85
  133. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-output-silence.d.ts +21 -0
  134. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/model-output-silence.js +176 -0
  135. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.d.ts +3 -2
  136. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/watchdog.js +8 -4
  137. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/package.json +3 -3
  138. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.d.ts +1 -1
  139. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/index.js +1 -1
  140. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.d.ts +5 -0
  141. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/dist/server.js +17 -20
  142. package/node_modules/@mininglamp-oss/octo-runtime-executor-kernel/package.json +5 -5
  143. package/node_modules/@mininglamp-oss/octo-runtime-host-sdk/package.json +4 -4
  144. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/adapter-metadata.d.ts +1 -1
  145. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.d.ts +0 -2
  146. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.js +0 -2
  147. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.d.ts +0 -1
  148. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.js +3 -9
  149. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-configuration.js +1 -8
  150. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.d.ts +1 -5
  151. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +3 -292
  152. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/experience.js +7 -0
  153. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +2 -0
  154. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +18 -13
  155. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +90 -608
  156. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.js +32 -1
  157. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.d.ts +7 -18
  158. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +34 -189
  159. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +11 -22
  160. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +38 -78
  161. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.js +6 -0
  162. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.d.ts +2 -1
  163. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.js +5 -40
  164. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.js +2 -1
  165. package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +1 -1
  166. package/package.json +34 -37
  167. package/packages/octo-runtime-protocol/schema/kernel-ipc.schema.json +3 -104
  168. package/packages/octo-runtime-protocol/schema/protocol.schema.json +166 -1870
  169. package/dist/public/codex.d.ts +0 -1
  170. package/dist/public/codex.js +0 -1
  171. package/dist/public/dsh.d.ts +0 -2
  172. package/dist/public/dsh.js +0 -1
  173. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/actmode.d.ts +0 -5
  174. package/node_modules/@mininglamp-oss/octo-runtime-adapter-sdk/dist/actmode.js +0 -8
  175. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-configuration-fixtures.json +0 -1219
  176. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/context-fixtures.json +0 -5988
  177. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/kernel-client.behavior.json +0 -56
  178. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/native-invoke-fixtures.json +0 -116
  179. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/run-protocol-fixtures.json +0 -761
  180. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/runtime-selection-fixtures.json +0 -663
  181. package/node_modules/@mininglamp-oss/octo-runtime-client/schema/session-name-fixtures.json +0 -191
  182. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.d.ts +0 -12
  183. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/context.js +0 -89
  184. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.d.ts +0 -33
  185. package/node_modules/@mininglamp-oss/octo-runtime-executor-core/dist/execution-preparation.js +0 -93
  186. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.d.ts +0 -4
  187. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.js +0 -36
  188. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.d.ts +0 -3
  189. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.js +0 -80
  190. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.d.ts +0 -3
  191. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.js +0 -9
  192. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.d.ts +0 -3
  193. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.js +0 -68
  194. /package/node_modules/@mininglamp-oss/octo-runtime-client/{schema → fixtures}/kernel-ipc-fixtures.json +0 -0
  195. /package/packages/octo-runtime-protocol/{schema → test/fixtures}/kernel-ipc-fixtures.json +0 -0
@@ -31,10 +31,6 @@ export type MessageExposure = "public_reasoning" | "public_summary" | "public_pl
31
31
  * via the `definition` "HostControl".
32
32
  */
33
33
  export type HostControl = {
34
- type: "evidence";
35
- name: "execution";
36
- payload: ExecutionEvidence;
37
- } | {
38
34
  type: "evidence";
39
35
  name: "session";
40
36
  payload: {
@@ -67,7 +63,7 @@ export type HostControl = {
67
63
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
68
64
  * via the `definition` "RunProtocolErrorCode".
69
65
  */
70
- export type RunProtocolErrorCode = "PROTOCOL_MODE_INVALID" | "PROTOCOL_MODE_UNSUPPORTED" | "EXECUTION_PROTOCOL_MISMATCH" | "EXECUTION_IDENTITY_CONFLICT" | "NATIVE_METHOD_UNSUPPORTED" | "NATIVE_RESPONSE_INVALID" | "INTERACTION_NOT_ACTIVE" | "INVALID_QUESTION_RESPONSE" | "ASYNC_ANSWER_REJECTED" | "OPERATION_OUTCOME_UNKNOWN" | "HOST_EXECUTION_FAILED" | "HOST_ENDED_WITHOUT_TERMINAL" | "PROVIDER_MESSAGE_TOO_LARGE" | "HOST_FRAME_TOO_LARGE" | "STREAM_QUEUE_ITEM_TOO_LARGE" | "STREAM_QUEUE_BYTES_EXCEEDED" | "STREAM_QUEUE_ITEMS_EXCEEDED" | "STREAM_GAP" | "STREAM_EXPIRED" | "REMOTE_NATIVE_UNSUPPORTED" | "HOST_FRAME_INVALID" | "HOST_CONTROL_INVALID" | "HOST_RECEIPT_INVALID" | "PROTOCOL_SUPPORT_INVALID";
66
+ export type RunProtocolErrorCode = "PROTOCOL_MODE_INVALID" | "PROTOCOL_MODE_UNSUPPORTED" | "EXECUTION_PROTOCOL_MISMATCH" | "EXECUTION_IDENTITY_CONFLICT" | "NATIVE_METHOD_UNSUPPORTED" | "NATIVE_RESPONSE_INVALID" | "INTERACTION_NOT_ACTIVE" | "INVALID_QUESTION_RESPONSE" | "ASYNC_ANSWER_REJECTED" | "OPERATION_OUTCOME_UNKNOWN" | "HOST_EXECUTION_FAILED" | "HOST_ENDED_WITHOUT_TERMINAL" | "WORKDIR_REQUIRED" | "WORKDIR_INVALID" | "WORKDIR_NOT_FOUND" | "WORKDIR_NOT_DIRECTORY" | "WORKDIR_UNAVAILABLE" | "PROVIDER_MESSAGE_TOO_LARGE" | "HOST_FRAME_TOO_LARGE" | "STREAM_QUEUE_ITEM_TOO_LARGE" | "STREAM_QUEUE_BYTES_EXCEEDED" | "STREAM_QUEUE_ITEMS_EXCEEDED" | "STREAM_GAP" | "STREAM_EXPIRED" | "REMOTE_NATIVE_UNSUPPORTED" | "HOST_FRAME_INVALID" | "HOST_CONTROL_INVALID" | "HOST_RECEIPT_INVALID" | "PROTOCOL_SUPPORT_INVALID";
71
67
  export type ProtocolMode1 = "native" | "canonical";
72
68
  /**
73
69
  * Public, channel-neutral project notification. No runtime context, reasoning, credentials, or tool payloads belong in this envelope.
@@ -82,7 +78,7 @@ export type NotificationMessage = NotificationMessage1;
82
78
  */
83
79
  export type ApprovalMode = "ask" | "assisted" | "full_access";
84
80
  /**
85
- * Open Context item. Built-in types retain their payload contracts; unknown optional types are preserved and ignored by unsupported consumers.
81
+ * Opaque ordered item. The envelope validates structure; consuming Adapters validate shared settings and their privately agreed payloads. Private items require no public registration.
86
82
  *
87
83
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
88
84
  * via the `definition` "ContextItem".
@@ -90,140 +86,23 @@ export type ApprovalMode = "ask" | "assisted" | "full_access";
90
86
  export type ContextItem = {
91
87
  namespace: string;
92
88
  name: string;
93
- guidance?: string;
94
- data_format?: "text";
95
89
  payload: Record<string, unknown>;
96
90
  };
97
91
  /**
98
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
99
- * via the `definition` "PersistentContextEnvelope".
92
+ * In addition to draft-07 validation, every consumer must enforce the x-octo semantic keywords: unique ordered namespace/name tuples, compact UTF-8 JSON byte budget, JSON nesting depth with the envelope at depth zero, and Unicode scalar strings in every nested value and object key. Canonical hashing uses ECMAScript JSON number serialization, including -0 becoming 0 and normalized exponent notation; object keys are sorted by UTF-16 code units before ECMAScript integer-index enumeration. U+2028/U+2029 and non-ASCII scalar values are not escaped or Unicode-normalized.
100
93
  */
101
94
  export type PersistentContextEnvelope = ContextEnvelope;
102
95
  /**
103
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
104
- * via the `definition` "PublicObjectMaterial".
105
- */
106
- export type PublicObjectMaterial = {
107
- resource_ref: string;
108
- object_type: "task" | "discussion" | "discussion_comment" | "discussion_reply" | "local_file" | "drive_file";
109
- object_id?: string;
110
- origin: "mention" | "attachment" | "object_action" | "source_entity";
111
- revision?: string;
112
- byte_size: number;
113
- digest: string;
114
- object_scope?: {
115
- type: "user" | "teamspace";
116
- id: string;
117
- };
118
- selector?: {
119
- mode: "core" | "content" | "history" | "chain" | "metadata";
120
- start?: number;
121
- end?: number;
122
- };
123
- };
124
- /**
125
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
126
- * via the `definition` "ContextModelSelectionPayload".
127
- */
128
- export type ContextModelSelectionPayload = {
129
- id?: string;
130
- use_provider_default?: true;
131
- } & ContextModelSelectionPayload1;
132
- export type ContextModelSelectionPayload1 = {
133
- [k: string]: unknown;
134
- };
135
- /**
136
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
137
- * via the `definition` "ContextReasoningPayload".
138
- */
139
- export type ContextReasoningPayload = {
140
- effort?: string;
141
- use_provider_default?: true;
142
- } & ContextReasoningPayload1;
143
- export type ContextReasoningPayload1 = {
144
- [k: string]: unknown;
145
- };
146
- /**
147
- * fixed uses the supplied path; random creates a workspace on the AgentSession's first run and reuses it for subsequent runs; none delegates workspace ownership to a preset Agent.
148
- *
149
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
150
- * via the `definition` "ContextWorkspacePayload".
151
- */
152
- export type ContextWorkspacePayload = {
153
- mode: "fixed";
154
- path: string;
155
- } | {
156
- mode: "random";
157
- } | {
158
- mode: "none";
159
- };
160
- /**
161
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
162
- * via the `definition` "ContextRuntimeSelectionPayload".
163
- */
164
- export type ContextRuntimeSelectionPayload = {
165
- mode: "candidates" | "explicit";
166
- runtime_id?: string;
167
- /**
168
- * @minItems 1
169
- * @maxItems 64
170
- */
171
- runtime_ids?: [string, ...string[]];
172
- strategy?: "preferred_failover";
173
- offline_behavior?: "wait" | "fail";
174
- failover?: "candidates" | "none";
175
- } & ContextRuntimeSelectionPayload1;
176
- export type ContextRuntimeSelectionPayload1 = {
177
- mode?: "candidates";
178
- } | {
179
- mode?: "explicit";
180
- };
181
- /**
182
- * A channel continuity descriptor. The x-octo-matching-trigger-fields keyword requires trigger_fact.message_id == trigger_message_id and matching presence/value of trigger_fact.message_seq and trigger_seq.
183
- *
184
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
185
- * via the `definition` "ContextContinuityPayload".
186
- */
187
- export type ContextContinuityPayload = ChannelContextDescriptor & {
188
- session_generation?: {
189
- [k: string]: unknown;
190
- };
191
- trigger_seq?: {
192
- [k: string]: unknown;
193
- };
194
- trigger_fact?: {
195
- message_seq?: {
196
- [k: string]: unknown;
197
- };
198
- occurred_at_ms?: {
199
- [k: string]: unknown;
200
- };
201
- };
202
- };
203
- /**
204
- * Worker-frozen Context runtime candidates. Explicit selection cannot fail over.
205
- *
206
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
207
- * via the `definition` "ResolvedRuntimeSelection".
208
- */
209
- export type ResolvedRuntimeSelection = ResolvedRuntimeSelection1;
210
- /**
211
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
212
- * via the `definition` "ResolvedExecutionPlan".
213
- */
214
- export type ResolvedExecutionPlan = ResolvedExecutionPlan1;
215
- /**
216
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
217
- * via the `definition` "AgentSource".
96
+ * In addition to draft-07 validation, every consumer must enforce the x-octo semantic keywords: unique ordered namespace/name tuples, compact UTF-8 JSON byte budget, JSON nesting depth with the envelope at depth zero, and Unicode scalar strings in every nested value and object key. Canonical hashing uses ECMAScript JSON number serialization, including -0 becoming 0 and normalized exponent notation; object keys are sorted by UTF-16 code units before ECMAScript integer-index enumeration. U+2028/U+2029 and non-ASCII scalar values are not escaped or Unicode-normalized.
218
97
  */
219
- export type AgentSource = "preset" | "provisioned";
98
+ export type PersistentContextEnvelope1 = ContextEnvelope;
220
99
  /**
221
- * Dynamic server-name map. No business-specific names are enumerated. Each value must match one closed transport variant.
100
+ * In addition to draft-07 validation, every consumer must enforce the x-octo semantic keywords: unique ordered namespace/name tuples, compact UTF-8 JSON byte budget, JSON nesting depth with the envelope at depth zero, and Unicode scalar strings in every nested value and object key. Canonical hashing uses ECMAScript JSON number serialization, including -0 becoming 0 and normalized exponent notation; object keys are sorted by UTF-16 code units before ECMAScript integer-index enumeration. U+2028/U+2029 and non-ASCII scalar values are not escaped or Unicode-normalized.
222
101
  *
223
102
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
224
- * via the `definition` "McpServers".
103
+ * via the `definition` "PersistentContextEnvelope".
225
104
  */
226
- export type McpServers = Record<string, McpServer>;
105
+ export type PersistentContextEnvelope2 = ContextEnvelope;
227
106
  /**
228
107
  * Provider-neutral interaction. Omitted delivery retains synchronous blocking semantics; async questions allow continued work. Only Adapter-owned automatic approvals may omit external responses; this does not imply completion.
229
108
  *
@@ -239,19 +118,19 @@ export type InteractionRequestedPayload = InteractionRequestedPayload1;
239
118
  */
240
119
  export type ApprovalDisplayDetails = Record<string, unknown>;
241
120
  /**
242
- * Bounded history result. complete means only that the requested window was returned, not that the local journal is authoritative.
121
+ * Provider-neutral per-invocation MCP server definition.
243
122
  *
244
123
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
245
- * via the `definition` "ContextSyncResult".
124
+ * via the `definition` "McpServer".
246
125
  */
247
- export type ContextSyncResult = ContextSyncResult1;
126
+ export type McpServer = McpStdioServer | McpStreamableHttpServer;
248
127
  /**
249
- * Provider-neutral per-invocation MCP server definition.
128
+ * Dynamic server-name map. No business-specific names are enumerated. Each value must match one closed transport variant.
250
129
  *
251
130
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
252
- * via the `definition` "McpServer".
131
+ * via the `definition` "McpServers".
253
132
  */
254
- export type McpServer = McpStdioServer | McpStreamableHttpServer;
133
+ export type McpServers = Record<string, McpServer>;
255
134
  /**
256
135
  * Ordered provider-native user input. Image bytes are materialized only for the invocation, never used as a text fallback.
257
136
  *
@@ -270,6 +149,13 @@ export type ModelInputPart = {
270
149
  byteSize: number;
271
150
  sha256: string;
272
151
  };
152
+ /**
153
+ * Serializable execution request sent from Core to Adapter Host. AbortSignal is added in src/index.ts because it cannot cross a process boundary.
154
+ *
155
+ * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
156
+ * via the `definition` "InvokeRequestWire".
157
+ */
158
+ export type InvokeRequestWire = InvokeRequestWire1;
273
159
  /**
274
160
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
275
161
  * via the `definition` "ActivitySubject".
@@ -286,25 +172,6 @@ export type ActivitySubject = {
286
172
  type: "interaction";
287
173
  id: string;
288
174
  };
289
- /**
290
- * Declarative MCP resource operation. Only deployed scoped operations may execute; schema validation does not authorize access.
291
- *
292
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
293
- * via the `definition` "ContextReferenceEntry".
294
- */
295
- export type ContextReferenceEntry = {
296
- locator?: ContextMcpLocator;
297
- } & {
298
- resource_ref: string;
299
- resolver: "mcp";
300
- locator: {};
301
- /**
302
- * Frozen non-secret JSON parameters supplied by the authenticated resolver plan, not model-generated commands.
303
- */
304
- params?: Record<string, unknown>;
305
- authorization_ref?: string;
306
- revision?: string;
307
- };
308
175
  /**
309
176
  * @minItems 1
310
177
  * @maxItems 128
@@ -313,37 +180,6 @@ export type ContextReferenceEntry = {
313
180
  * via the `definition` "ModelInputParts".
314
181
  */
315
182
  export type ModelInputParts = [ModelInputPart, ...ModelInputPart[]];
316
- /**
317
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
318
- * via the `definition` "AgentEnv".
319
- */
320
- export type AgentEnv = {
321
- agentConfig?: {
322
- timeoutSeconds?: {
323
- [k: string]: unknown;
324
- };
325
- };
326
- } & {
327
- schema: "octo.context-envelope/v3";
328
- /**
329
- * @maxItems 32
330
- */
331
- items: (ContextItem & ({
332
- namespace?: "octo.execution";
333
- } | {
334
- namespace?: "octo.security";
335
- name?: "approval_policy";
336
- } | {
337
- namespace?: "octo.control";
338
- name?: "instructions";
339
- }))[];
340
- agentSource?: AgentSource;
341
- workdir?: string;
342
- controlInstructions?: string;
343
- approvalMode?: ApprovalMode;
344
- agentConfig?: AgentConfig;
345
- runtimeLimits?: RuntimeLimits;
346
- };
347
183
  /**
348
184
  * Serializable data shapes for the Octo Runtime NDJSON protocol. Runtime behavior remains hand-written in src/index.ts, and this schema is the source of truth for generated TypeScript types. The x-octo-unicode-scalar-strings semantic keyword requires every JSON string value and object member name to contain Unicode scalar values only: unpaired UTF-16 surrogates are rejected, not repaired or normalized. Consumers must enforce this protocol-wide rule even when validating a definition directly.
349
185
  */
@@ -425,7 +261,7 @@ export interface CanonicalHostFrame {
425
261
  */
426
262
  export interface CanonicalEventWire {
427
263
  protocolVersion: 2;
428
- type: "session.update" | "execution.update" | "usage.update" | "model_step.started" | "model_step.finished" | "message.create" | "message.delta" | "message.update" | "tool_call.create" | "tool_call.delta" | "tool_call.update" | "activity.started" | "activity.updated" | "activity.finished" | "plan.updated" | "tool_call.progress" | "run.notice" | "interaction.requested" | "interaction.resolved" | "run.queued" | "run.started" | "run.completed" | "run.failed" | "run.cancelled";
264
+ type: "session.update" | "usage.update" | "model_step.started" | "model_step.finished" | "message.create" | "message.delta" | "message.update" | "tool_call.create" | "tool_call.delta" | "tool_call.update" | "activity.started" | "activity.updated" | "activity.finished" | "plan.updated" | "tool_call.progress" | "run.notice" | "interaction.requested" | "interaction.resolved" | "run.queued" | "run.started" | "run.completed" | "run.failed" | "run.cancelled";
429
265
  payload: CanonicalEventPayload;
430
266
  }
431
267
  /**
@@ -613,19 +449,6 @@ export interface ControlHostFrame {
613
449
  kind: "control";
614
450
  control: HostControl;
615
451
  }
616
- /**
617
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
618
- * via the `definition` "ExecutionEvidence".
619
- */
620
- export interface ExecutionEvidence {
621
- actmode: {
622
- requested: "default" | "plan";
623
- effective: "default" | "plan" | null;
624
- status: "applied" | "fallback" | "unknown";
625
- nativeMode?: string;
626
- reason?: "provider_unsupported" | "adapter_unmapped" | "provider_unconfirmed";
627
- };
628
- }
629
452
  /**
630
453
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
631
454
  * via the `definition` "ServiceProcessSnapshot".
@@ -2028,88 +1851,55 @@ export interface ContextEnvelope {
2028
1851
  items: ContextItem[];
2029
1852
  }
2030
1853
  /**
2031
- * Agent defaults and mandatory constraints, stored under one external configuration version. Authorized configuration writers may persist system instructions in mandatory with text-only entries. Ephemeral business content and default-layer instructions are forbidden; callers cannot submit trusted control instructions.
1854
+ * Agent defaults and mandatory execution constraints stored under one external configuration version. Application prompts belong to caller-provided ordinary inputs, not execution settings.
2032
1855
  *
2033
1856
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2034
1857
  * via the `definition` "ContextConfiguration".
2035
1858
  */
2036
1859
  export interface ContextConfiguration {
2037
- defaults: ContextEnvelope;
2038
- mandatory: PersistentContextEnvelope;
1860
+ defaults: PersistentContextEnvelope;
1861
+ mandatory: PersistentContextEnvelope1;
2039
1862
  }
2040
1863
  /**
2041
- * Public Context facts. Preparation is distinct from Adapter application or invocation. This projection excludes resource files, trusted instruction text, credentials and Runtime paths.
2042
- *
2043
1864
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2044
- * via the `definition` "RunContextProjection".
1865
+ * via the `definition` "ContextAdapterPayload".
2045
1866
  */
2046
- export interface RunContextProjection {
2047
- run_id: string;
2048
- context_hash: string;
2049
- actual_runtime_id?: string;
2050
- preparation_status: "unknown" | "prepared";
2051
- application_status: "unknown" | "applied";
2052
- invocation_status: "unknown";
2053
- model_uses_provider_default: boolean;
2054
- effort_uses_provider_default: boolean;
2055
- /**
2056
- * Frozen inline object facts proven by a matching preparation receipt. Source fields are provenance claims, not access grants. No contents, local handles, paths or credentials are exposed; application is separately evidenced by application_status.
2057
- *
2058
- * @maxItems 32
2059
- */
2060
- object_materials?: PublicObjectMaterial[];
2061
- execution: {
2062
- adapter_type: string;
2063
- model?: string;
2064
- effort?: string;
2065
- approval_mode: "ask" | "assisted" | "full_access";
2066
- workspace_mode: "fixed" | "random" | "none";
2067
- };
1867
+ export interface ContextAdapterPayload {
1868
+ type: string;
2068
1869
  }
2069
1870
  /**
2070
- * Workspace preparation for the current Run lease and frozen execution Context; it does not prove Provider use of model context.
2071
- *
2072
1871
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2073
- * via the `definition` "ContextPreparationReceipt".
1872
+ * via the `definition` "ContextModelPayload".
2074
1873
  */
2075
- export interface ContextPreparationReceipt {
2076
- context_hash: string;
2077
- run_id: string;
2078
- lease_id: string;
2079
- fencing_token: number;
2080
- workspace_mode: "fixed" | "random" | "none";
2081
- workspace_path: string;
2082
- provider_state_dir: string;
2083
- /**
2084
- * @maxItems 256
2085
- */
2086
- warnings: string[];
1874
+ export interface ContextModelPayload {
1875
+ selection?: ContextModelSelectionPayload;
1876
+ reasoning?: ContextReasoningPayload;
2087
1877
  }
2088
1878
  /**
2089
1879
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2090
- * via the `definition` "ContextAdapterPayload".
1880
+ * via the `definition` "ContextModelSelectionPayload".
2091
1881
  */
2092
- export interface ContextAdapterPayload {
2093
- type: string;
2094
- provider_agent_id?: string;
1882
+ export interface ContextModelSelectionPayload {
1883
+ id: string;
2095
1884
  }
2096
1885
  /**
2097
1886
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2098
- * via the `definition` "ContextActmodePayload".
1887
+ * via the `definition` "ContextReasoningPayload".
2099
1888
  */
2100
- export interface ContextActmodePayload {
2101
- mode: "default" | "plan";
1889
+ export interface ContextReasoningPayload {
1890
+ effort: string;
2102
1891
  }
2103
1892
  /**
1893
+ * Caller-owned, already prepared directory. Runtime validates the concrete local execution path and never allocates or recreates an application workspace.
1894
+ *
2104
1895
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2105
- * via the `definition` "ContextModelPayload".
1896
+ * via the `definition` "ContextWorkspacePayload".
2106
1897
  */
2107
- export interface ContextModelPayload {
2108
- selection?: ContextModelSelectionPayload;
2109
- reasoning?: ContextReasoningPayload;
1898
+ export interface ContextWorkspacePayload {
1899
+ path: string;
2110
1900
  }
2111
1901
  /**
2112
- * Snake-case frozen watchdog limits, with the same bounds as RuntimeLimits. Legacy enforcement=observe cannot be combined with v2 settings.
1902
+ * Snake-case frozen watchdog limits, with the same bounds as RuntimeLimits.
2113
1903
  *
2114
1904
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2115
1905
  * via the `definition` "ContextLimitsPayload".
@@ -2123,7 +1913,6 @@ export interface ContextLimitsPayload {
2123
1913
  tool_wall_timeout_ms?: number;
2124
1914
  run_timeout_ms?: number;
2125
1915
  cancel_grace_ms?: number;
2126
- enforcement?: "enforce" | "observe";
2127
1916
  }
2128
1917
  /**
2129
1918
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
@@ -2132,196 +1921,6 @@ export interface ContextLimitsPayload {
2132
1921
  export interface ContextApprovalPolicyPayload {
2133
1922
  mode: ApprovalMode;
2134
1923
  }
2135
- /**
2136
- * Untrusted inline selection text with optional resource reference, source metadata and summary. Source metadata is not an authorization claim.
2137
- *
2138
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2139
- * via the `definition` "ContextSelectionEntry".
2140
- */
2141
- export interface ContextSelectionEntry {
2142
- text: string;
2143
- resource_ref?: string;
2144
- source?: {
2145
- [k: string]: unknown;
2146
- } | string;
2147
- summary?: string;
2148
- }
2149
- /**
2150
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2151
- * via the `definition` "ContextMcpLocator".
2152
- */
2153
- export interface ContextMcpLocator {
2154
- server_ref: string;
2155
- tool: string;
2156
- }
2157
- export interface ContextResourceEntry {
2158
- resource_ref: string;
2159
- resolver: "mcp";
2160
- locator: {};
2161
- /**
2162
- * Frozen non-secret JSON parameters supplied by the authenticated resolver plan, not model-generated commands.
2163
- */
2164
- params?: Record<string, unknown>;
2165
- authorization_ref?: string;
2166
- revision?: string;
2167
- }
2168
- /**
2169
- * Control instruction containing only non-empty text. Authorization belongs to the authenticated upstream boundary, not to a caller-supplied source label.
2170
- *
2171
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2172
- * via the `definition` "ContextInstructionEntry".
2173
- */
2174
- export interface ContextInstructionEntry {
2175
- text: string;
2176
- }
2177
- /**
2178
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2179
- * via the `definition` "ContextInstructionsPayload".
2180
- */
2181
- export interface ContextInstructionsPayload {
2182
- entries: ContextInstructionEntry[];
2183
- }
2184
- /**
2185
- * Snapshot selection descriptor in ExecutionEnvelope. Scope, consumer_key, and session_generation isolate the consumption cursor.
2186
- *
2187
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2188
- * via the `definition` "ChannelContextDescriptor".
2189
- */
2190
- export interface ChannelContextDescriptor {
2191
- scope: ChannelScope;
2192
- consumer_key: string;
2193
- session_generation: number;
2194
- trigger_message_id: string;
2195
- trigger_seq?: number;
2196
- trigger_fact: ChannelMessageFact;
2197
- }
2198
- /**
2199
- * Platform-neutral channel isolation key. account_id may be null but remains explicit; an absent thread_id selects the conversation root.
2200
- *
2201
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2202
- * via the `definition` "ChannelScope".
2203
- */
2204
- export interface ChannelScope {
2205
- tenant_id: string;
2206
- endpoint_id: string;
2207
- channel: string;
2208
- account_id: string | null;
2209
- bot_id: string;
2210
- conversation_id: string;
2211
- thread_id?: string | null;
2212
- }
2213
- /**
2214
- * A platform-neutral message fact in the rebuildable channel journal. Message content is always untrusted external input.
2215
- *
2216
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2217
- * via the `definition` "ChannelMessageFact".
2218
- */
2219
- export interface ChannelMessageFact {
2220
- message_id: string;
2221
- message_seq?: number;
2222
- sender: ChannelMessageSender;
2223
- occurred_at_ms: number;
2224
- /**
2225
- * @minItems 1
2226
- */
2227
- parts: [ChannelMessagePart, ...ChannelMessagePart[]];
2228
- flags?: ChannelMessageFlags;
2229
- }
2230
- /**
2231
- * Normalized sender fact without platform credentials.
2232
- *
2233
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2234
- * via the `definition` "ChannelMessageSender".
2235
- */
2236
- export interface ChannelMessageSender {
2237
- id: string;
2238
- label?: string;
2239
- kind: string;
2240
- }
2241
- /**
2242
- * Normalized platform message part. type and text are common fields; connector extensions remain untrusted external data.
2243
- *
2244
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2245
- * via the `definition` "ChannelMessagePart".
2246
- */
2247
- export interface ChannelMessagePart {
2248
- type: string;
2249
- text?: string;
2250
- [k: string]: unknown;
2251
- }
2252
- /**
2253
- * Common message flags that affect context projection. Self and control messages are excluded from provider-visible context.
2254
- *
2255
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2256
- * via the `definition` "ChannelMessageFlags".
2257
- */
2258
- export interface ChannelMessageFlags {
2259
- self?: boolean;
2260
- control?: boolean;
2261
- }
2262
- export interface ResolvedRuntimeSelection1 {
2263
- schema: "octo.runtime-selection/v2";
2264
- selection_mode: "explicit" | "candidates";
2265
- explicit_runtime_id?: string;
2266
- /**
2267
- * @minItems 1
2268
- * @maxItems 64
2269
- */
2270
- authorized_candidates: [
2271
- {
2272
- runtime_id: string;
2273
- priority: number;
2274
- owner_subject_type: "user" | "teamspace";
2275
- owner_subject_id: string;
2276
- },
2277
- ...{
2278
- runtime_id: string;
2279
- priority: number;
2280
- owner_subject_type: "user" | "teamspace";
2281
- owner_subject_id: string;
2282
- }[]
2283
- ];
2284
- offline_behavior: "wait" | "fail";
2285
- failover: "candidates" | "none";
2286
- }
2287
- export interface ResolvedExecutionPlan1 {
2288
- actmode?: "default" | "plan";
2289
- adapter_type: string;
2290
- workdir: string;
2291
- workspace?: ContextWorkspacePayload;
2292
- model?: string;
2293
- effort?: string;
2294
- approval_mode: ApprovalMode;
2295
- runtime_limits?: ContextLimitsPayload;
2296
- provider_agent_id?: string;
2297
- agent_source: AgentSource;
2298
- envs?: ContextEnvsPayload;
2299
- mcp?: ContextMcpPayload;
2300
- }
2301
- /**
2302
- * Run 级环境变量列表;以 key 标识变量,按 key 合并,不进入模型输入。
2303
- *
2304
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2305
- * via the `definition` "ContextEnvsPayload".
2306
- */
2307
- export interface ContextEnvsPayload {
2308
- /**
2309
- * @maxItems 128
2310
- */
2311
- env_variables: {
2312
- key: string;
2313
- value: string;
2314
- }[];
2315
- }
2316
- /**
2317
- * Run-scoped MCP connection templates. Server names are dynamic keys; values are validated by transport. Variables resolve only in the execution environment, never in the model context.
2318
- *
2319
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2320
- * via the `definition` "ContextMcpPayload".
2321
- */
2322
- export interface ContextMcpPayload {
2323
- mcpServers: McpServers;
2324
- }
2325
1924
  /**
2326
1925
  * Runtime-owned phase-aware invocation watchdog budgets.
2327
1926
  *
@@ -2337,52 +1936,6 @@ export interface RuntimeLimits {
2337
1936
  toolWallTimeoutMs?: number;
2338
1937
  runTimeoutMs?: number;
2339
1938
  cancelGraceMs?: number;
2340
- enforcement?: "observe" | "enforce";
2341
- }
2342
- /**
2343
- * Adapter-internal configuration derived from the resolved execution plan, not a public source of run model or approval choices. Legacy permission and thinking fields are forbidden.
2344
- *
2345
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2346
- * via the `definition` "AgentConfig".
2347
- */
2348
- export interface AgentConfig {
2349
- /**
2350
- * Default provider CLI working directory. It is a cwd, not a filesystem security boundary.
2351
- */
2352
- workdir?: string;
2353
- /**
2354
- * Model identifier.
2355
- */
2356
- model?: string;
2357
- /**
2358
- * Provider sandbox mode identifier.
2359
- */
2360
- sandbox?: string;
2361
- /**
2362
- * Provider-side agent identifier.
2363
- */
2364
- providerAgentId?: string;
2365
- /**
2366
- * Optional provider reasoning effort identifier. Provider adapters may define an explicit default.
2367
- */
2368
- effort?: string;
2369
- /**
2370
- * Invocation timeout in seconds.
2371
- */
2372
- timeoutSeconds?: number;
2373
- /**
2374
- * OpenClaw configuration path.
2375
- */
2376
- openclawConfigPath?: string;
2377
- /**
2378
- * OpenClaw state directory.
2379
- */
2380
- openclawStateDir?: string;
2381
- /**
2382
- * Provider-specific extension options passed through unchanged by Core.
2383
- */
2384
- providerOptions?: Record<string, unknown>;
2385
- [k: string]: unknown;
2386
1939
  }
2387
1940
  /**
2388
1941
  * Non-blocking question batch. IDs are positions scoped to this interaction, not provider-native question IDs.
@@ -2647,58 +2200,6 @@ export interface RunIdentity {
2647
2200
  */
2648
2201
  agentSessionId: string;
2649
2202
  }
2650
- /**
2651
- * Idempotent context-only batch appended by agent-worker to its bound daemon.
2652
- *
2653
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2654
- * via the `definition` "ChannelContextAppend".
2655
- */
2656
- export interface ChannelContextAppend {
2657
- agent_id: string;
2658
- scope: ChannelScope;
2659
- /**
2660
- * @minItems 1
2661
- * @maxItems 100
2662
- */
2663
- facts: [ChannelMessageFact, ...ChannelMessageFact[]];
2664
- gap_after_seq?: number;
2665
- }
2666
- /**
2667
- * Bounded backfill requested by the daemon after cold start or gap detection. It never carries platform tokens.
2668
- *
2669
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2670
- * via the `definition` "ContextSyncRequest".
2671
- */
2672
- export interface ContextSyncRequest {
2673
- request_id: string;
2674
- run_id: string;
2675
- scope: ChannelScope;
2676
- trigger_message_id: string;
2677
- trigger_seq?: number;
2678
- after_seq?: number;
2679
- limit: number;
2680
- }
2681
- export interface ContextSyncResult1 {
2682
- request_id: string;
2683
- scope: ChannelScope;
2684
- /**
2685
- * @maxItems 100
2686
- */
2687
- facts: ChannelMessageFact[];
2688
- completeness: "complete" | "partial" | "unavailable";
2689
- through_seq?: number;
2690
- }
2691
- /**
2692
- * Result of advancing the consumer cursor with version CAS after terminal durability.
2693
- *
2694
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2695
- * via the `definition` "ContextCommitResult".
2696
- */
2697
- export interface ContextCommitResult {
2698
- snapshot_id: string;
2699
- committed: boolean;
2700
- reason?: "already_committed" | "snapshot_not_found" | "snapshot_not_submitted" | "consumer_advanced" | "snapshot_failed";
2701
- }
2702
2203
  /**
2703
2204
  * A per-invocation MCP server launched as a child process by the provider.
2704
2205
  *
@@ -2735,14 +2236,8 @@ export interface McpStreamableHttpServer {
2735
2236
  startupTimeoutMs?: number;
2736
2237
  toolTimeoutMs?: number;
2737
2238
  }
2738
- /**
2739
- * Serializable execution request sent from Core to Adapter Host. AbortSignal is added in src/index.ts because it cannot cross a process boundary.
2740
- *
2741
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2742
- * via the `definition` "InvokeRequestWire".
2743
- */
2744
- export interface InvokeRequestWire {
2745
- executionEnvOverrides?: ContextEnvsPayload1;
2239
+ export interface InvokeRequestWire1 {
2240
+ executionEnvOverrides?: ContextEnvsPayload;
2746
2241
  /**
2747
2242
  * Active Adapter Host invocation identifier and cancellation target.
2748
2243
  */
@@ -2797,27 +2292,15 @@ export interface InvokeRequestWire {
2797
2292
  * Frozen alternate user turn for the first turn of a fresh provider session after resume fails.
2798
2293
  */
2799
2294
  freshFallbackModelInput?: string;
2800
- /**
2801
- * Provider process cwd. Sandboxing, containers, or host permissions provide the actual access boundary.
2802
- */
2803
- workdir: string;
2804
- /**
2805
- * Trusted session instructions. Adapters inject them only when starting a provider session; resuming an existing session must not inject or clear them.
2806
- */
2807
- controlInstructions: string;
2808
- context: ContextEnvelope;
2809
2295
  runMetadata?: Record<string, unknown>;
2810
- approvalMode: ApprovalMode;
2811
2296
  providerSession?: ProviderSession;
2812
- runtimeLimits?: RuntimeLimits;
2813
- agentConfig: AgentConfig;
2814
2297
  protocolVersion: 2;
2815
- agentSource: AgentSource;
2298
+ agentEnv: AgentEnv;
2816
2299
  }
2817
2300
  /**
2818
- * Run 级环境变量列表;以 key 标识变量,按 key 合并,不进入模型输入。
2301
+ * Trusted ingress execution environment, independent of business Context; never render or persist in business snapshots.
2819
2302
  */
2820
- export interface ContextEnvsPayload1 {
2303
+ export interface ContextEnvsPayload {
2821
2304
  /**
2822
2305
  * @maxItems 128
2823
2306
  */
@@ -2826,6 +2309,19 @@ export interface ContextEnvsPayload1 {
2826
2309
  value: string;
2827
2310
  }[];
2828
2311
  }
2312
+ /**
2313
+ * Execution envelope forwarded unchanged to the Adapter. Only shared bean types belong to the public protocol; Harness-specific payloads are private agreements between the caller and its Adapter.
2314
+ *
2315
+ * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2316
+ * via the `definition` "AgentEnv".
2317
+ */
2318
+ export interface AgentEnv {
2319
+ schema: "octo.context-envelope/v3";
2320
+ /**
2321
+ * @maxItems 32
2322
+ */
2323
+ items: ContextItem[];
2324
+ }
2829
2325
  /**
2830
2326
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2831
2327
  * via the `definition` "ActivityInfo".
@@ -2896,13 +2392,9 @@ export interface ToolProgressPayload {
2896
2392
  unit?: "items" | "bytes" | "steps";
2897
2393
  };
2898
2394
  }
2899
- /**
2900
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2901
- * via the `definition` "RunNoticePayload".
2902
- */
2903
2395
  export interface RunNoticePayload {
2904
2396
  noticeId: string;
2905
- code: "retry_scheduled" | "context_compacted" | "model_rerouted" | "config_warning" | "provider_diagnostic";
2397
+ code: "retry_scheduled" | "context_compacted" | "model_rerouted" | "config_warning" | "provider_diagnostic" | "model_output_idle";
2906
2398
  severity: "info" | "warning";
2907
2399
  params: {
2908
2400
  [k: string]: string | number | boolean;
@@ -2910,40 +2402,6 @@ export interface RunNoticePayload {
2910
2402
  relatedActivityId?: string;
2911
2403
  relatedItemId?: string;
2912
2404
  }
2913
- /**
2914
- * Untrusted inline selection text with optional resource reference, source metadata and summary. Source metadata is not an authorization claim.
2915
- *
2916
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2917
- * via the `definition` "ContextInlineEntry".
2918
- */
2919
- export interface ContextInlineEntry {
2920
- text: string;
2921
- resource_ref?: string;
2922
- source?: {
2923
- [k: string]: unknown;
2924
- } | string;
2925
- summary?: string;
2926
- }
2927
- /**
2928
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2929
- * via the `definition` "ContextInlinePayload".
2930
- */
2931
- export interface ContextInlinePayload {
2932
- /**
2933
- * @minItems 1
2934
- */
2935
- entries: [ContextInlineEntry, ...ContextInlineEntry[]];
2936
- }
2937
- /**
2938
- * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2939
- * via the `definition` "ContextReferencesPayload".
2940
- */
2941
- export interface ContextReferencesPayload {
2942
- /**
2943
- * @minItems 1
2944
- */
2945
- entries: [ContextReferenceEntry, ...ContextReferenceEntry[]];
2946
- }
2947
2405
  /**
2948
2406
  * Business authorization intent; never a tool installation definition.
2949
2407
  *
@@ -2986,6 +2444,30 @@ export interface IssuedToolAuthorization {
2986
2444
  namespace: string;
2987
2445
  expires_at: string;
2988
2446
  }
2447
+ /**
2448
+ * Run 级环境变量列表;以 key 标识变量,按 key 合并,不进入模型输入。
2449
+ *
2450
+ * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2451
+ * via the `definition` "ContextEnvsPayload".
2452
+ */
2453
+ export interface ContextEnvsPayload1 {
2454
+ /**
2455
+ * @maxItems 128
2456
+ */
2457
+ env_variables: {
2458
+ key: string;
2459
+ value: string;
2460
+ }[];
2461
+ }
2462
+ /**
2463
+ * Run-scoped MCP connection templates. Server names are dynamic keys; values are validated by transport. Variables resolve only in the execution environment, never in the model context.
2464
+ *
2465
+ * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
2466
+ * via the `definition` "ContextMcpPayload".
2467
+ */
2468
+ export interface ContextMcpPayload {
2469
+ mcpServers: McpServers;
2470
+ }
2989
2471
  export interface InvokeInputWire {
2990
2472
  /**
2991
2473
  * Optional caller-owned nonblank display name of 1-256 Unicode code points, without C0/DEL/C1 controls; Core supplies a random UUID default without business naming policy.
@@ -3009,14 +2491,13 @@ export interface InvokeInputWire {
3009
2491
  freshFallbackModelInputParts?: ModelInputParts;
3010
2492
  freshFallbackImagesUnavailable?: boolean;
3011
2493
  agentEnv: AgentEnv;
3012
- [k: string]: unknown;
3013
2494
  }
3014
2495
  /**
3015
2496
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
3016
2497
  * via the `definition` "KernelInvokeEnvironmentWire".
3017
2498
  */
3018
2499
  export interface KernelInvokeEnvironmentWire {
3019
- executionEnvOverrides?: ContextEnvsPayload;
2500
+ executionEnvOverrides?: ContextEnvsPayload1;
3020
2501
  }
3021
2502
  /**
3022
2503
  * This interface was referenced by `OctoRuntimeProtocolSchema`'s JSON-Schema
@@ -3034,7 +2515,6 @@ export interface InteractionResponseWire {
3034
2515
  */
3035
2516
  export interface HostedAdapterMetadataWire {
3036
2517
  type: string;
3037
- agentSources: AgentSource[];
3038
2518
  workspace?: boolean;
3039
2519
  protocolSupport?: AdapterProtocolSupport;
3040
2520
  processModel?: string;
@@ -3045,3 +2525,5 @@ export interface HostedAdapterMetadataWire {
3045
2525
  unavailableReason?: string | null;
3046
2526
  [k: string]: unknown;
3047
2527
  }
2528
+ export declare const KERNEL_IPC_VERSION: 2;
2529
+ export declare const RUN_PROTOCOL_ERRORS: readonly ["PROTOCOL_MODE_INVALID", "PROTOCOL_MODE_UNSUPPORTED", "EXECUTION_PROTOCOL_MISMATCH", "EXECUTION_IDENTITY_CONFLICT", "NATIVE_METHOD_UNSUPPORTED", "NATIVE_RESPONSE_INVALID", "INTERACTION_NOT_ACTIVE", "INVALID_QUESTION_RESPONSE", "ASYNC_ANSWER_REJECTED", "OPERATION_OUTCOME_UNKNOWN", "HOST_EXECUTION_FAILED", "HOST_ENDED_WITHOUT_TERMINAL", "WORKDIR_REQUIRED", "WORKDIR_INVALID", "WORKDIR_NOT_FOUND", "WORKDIR_NOT_DIRECTORY", "WORKDIR_UNAVAILABLE", "PROVIDER_MESSAGE_TOO_LARGE", "HOST_FRAME_TOO_LARGE", "STREAM_QUEUE_ITEM_TOO_LARGE", "STREAM_QUEUE_BYTES_EXCEEDED", "STREAM_QUEUE_ITEMS_EXCEEDED", "STREAM_GAP", "STREAM_EXPIRED", "REMOTE_NATIVE_UNSUPPORTED", "HOST_FRAME_INVALID", "HOST_CONTROL_INVALID", "HOST_RECEIPT_INVALID", "PROTOCOL_SUPPORT_INVALID"];