@sixb/agent 0.0.0-stage → 0.2.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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -2
  3. package/dist/abort.d.ts +6 -0
  4. package/dist/abort.d.ts.map +1 -0
  5. package/dist/agent-prompt.d.ts +126 -0
  6. package/dist/agent-prompt.d.ts.map +1 -0
  7. package/dist/agent-runtime/errors.d.ts +13 -0
  8. package/dist/agent-runtime/errors.d.ts.map +1 -0
  9. package/dist/agent-runtime/preflight.d.ts +18 -0
  10. package/dist/agent-runtime/preflight.d.ts.map +1 -0
  11. package/dist/agent-runtime/profile.d.ts +14 -0
  12. package/dist/agent-runtime/profile.d.ts.map +1 -0
  13. package/dist/artifacts/layout-check/layout-check.d.ts +87 -0
  14. package/dist/artifacts/layout-check/layout-check.d.ts.map +1 -0
  15. package/dist/artifacts/materialize.d.ts +115 -0
  16. package/dist/artifacts/materialize.d.ts.map +1 -0
  17. package/dist/artifacts/publish-tool.d.ts +86 -0
  18. package/dist/artifacts/publish-tool.d.ts.map +1 -0
  19. package/dist/ask-parent-tool.d.ts +36 -0
  20. package/dist/ask-parent-tool.d.ts.map +1 -0
  21. package/dist/attachments.d.ts +109 -0
  22. package/dist/attachments.d.ts.map +1 -0
  23. package/dist/child-files.d.ts +91 -0
  24. package/dist/child-files.d.ts.map +1 -0
  25. package/dist/child-questions.d.ts +24 -0
  26. package/dist/child-questions.d.ts.map +1 -0
  27. package/dist/computer-runner.d.ts +74 -0
  28. package/dist/computer-runner.d.ts.map +1 -0
  29. package/dist/context-budget.d.ts +34 -0
  30. package/dist/context-budget.d.ts.map +1 -0
  31. package/dist/context-compaction.d.ts +148 -0
  32. package/dist/context-compaction.d.ts.map +1 -0
  33. package/dist/context-guard.d.ts +69 -0
  34. package/dist/context-guard.d.ts.map +1 -0
  35. package/dist/conversation-memory.d.ts +21 -0
  36. package/dist/conversation-memory.d.ts.map +1 -0
  37. package/dist/conversation-messages.d.ts +33 -0
  38. package/dist/conversation-messages.d.ts.map +1 -0
  39. package/dist/errors.d.ts +46 -0
  40. package/dist/errors.d.ts.map +1 -0
  41. package/dist/execution-plan.d.ts +38 -0
  42. package/dist/execution-plan.d.ts.map +1 -0
  43. package/dist/failure.d.ts +14 -0
  44. package/dist/failure.d.ts.map +1 -0
  45. package/dist/family-mailbox.d.ts +60 -0
  46. package/dist/family-mailbox.d.ts.map +1 -0
  47. package/dist/file-ref.d.ts +6 -0
  48. package/dist/file-ref.d.ts.map +1 -0
  49. package/dist/image-attachments.d.ts +34 -0
  50. package/dist/image-attachments.d.ts.map +1 -0
  51. package/dist/index.d.ts +35 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +14387 -0
  54. package/dist/index.js.map +72 -0
  55. package/dist/inline-images.d.ts +28 -0
  56. package/dist/inline-images.d.ts.map +1 -0
  57. package/dist/message-authors.d.ts +34 -0
  58. package/dist/message-authors.d.ts.map +1 -0
  59. package/dist/message-times.d.ts +9 -0
  60. package/dist/message-times.d.ts.map +1 -0
  61. package/dist/model-adapters.d.ts +59 -0
  62. package/dist/model-adapters.d.ts.map +1 -0
  63. package/dist/model-lines.d.ts +16 -0
  64. package/dist/model-lines.d.ts.map +1 -0
  65. package/dist/prompt-cache.d.ts +28 -0
  66. package/dist/prompt-cache.d.ts.map +1 -0
  67. package/dist/requester.d.ts +15 -0
  68. package/dist/requester.d.ts.map +1 -0
  69. package/dist/run-agent-turn.d.ts +93 -0
  70. package/dist/run-agent-turn.d.ts.map +1 -0
  71. package/dist/run-child.d.ts +77 -0
  72. package/dist/run-child.d.ts.map +1 -0
  73. package/dist/run-conversation-turn.d.ts +42 -0
  74. package/dist/run-conversation-turn.d.ts.map +1 -0
  75. package/dist/run-credential.d.ts +22 -0
  76. package/dist/run-credential.d.ts.map +1 -0
  77. package/dist/run-environment.d.ts +145 -0
  78. package/dist/run-environment.d.ts.map +1 -0
  79. package/dist/run-fate.d.ts +15 -0
  80. package/dist/run-fate.d.ts.map +1 -0
  81. package/dist/run-files-lock.d.ts +16 -0
  82. package/dist/run-files-lock.d.ts.map +1 -0
  83. package/dist/run-sandbox.d.ts +60 -0
  84. package/dist/run-sandbox.d.ts.map +1 -0
  85. package/dist/run-subagent.d.ts +65 -0
  86. package/dist/run-subagent.d.ts.map +1 -0
  87. package/dist/run-workflow-agent-node.d.ts +46 -0
  88. package/dist/run-workflow-agent-node.d.ts.map +1 -0
  89. package/dist/sandbox-api-context.d.ts +34 -0
  90. package/dist/sandbox-api-context.d.ts.map +1 -0
  91. package/dist/sandbox-file-registry.d.ts +9 -0
  92. package/dist/sandbox-file-registry.d.ts.map +1 -0
  93. package/dist/sandbox-files.d.ts +71 -0
  94. package/dist/sandbox-files.d.ts.map +1 -0
  95. package/dist/sandbox-handle.d.ts +15 -0
  96. package/dist/sandbox-handle.d.ts.map +1 -0
  97. package/dist/sandbox-readiness.d.ts +8 -0
  98. package/dist/sandbox-readiness.d.ts.map +1 -0
  99. package/dist/skills/built-in.d.ts +15 -0
  100. package/dist/skills/built-in.d.ts.map +1 -0
  101. package/dist/subagent-context.d.ts +50 -0
  102. package/dist/subagent-context.d.ts.map +1 -0
  103. package/dist/subagent-continuation.d.ts +33 -0
  104. package/dist/subagent-continuation.d.ts.map +1 -0
  105. package/dist/subagent-inbox.d.ts +53 -0
  106. package/dist/subagent-inbox.d.ts.map +1 -0
  107. package/dist/subagent-tools.d.ts +293 -0
  108. package/dist/subagent-tools.d.ts.map +1 -0
  109. package/dist/thread-context.d.ts +17 -0
  110. package/dist/thread-context.d.ts.map +1 -0
  111. package/dist/tools/attachments.d.ts +11 -0
  112. package/dist/tools/attachments.d.ts.map +1 -0
  113. package/dist/tools/bash.d.ts +68 -0
  114. package/dist/tools/bash.d.ts.map +1 -0
  115. package/dist/tools/model-spec.d.ts +9 -0
  116. package/dist/tools/model-spec.d.ts.map +1 -0
  117. package/dist/tools/read.d.ts +43 -0
  118. package/dist/tools/read.d.ts.map +1 -0
  119. package/dist/tools/result-media.d.ts +65 -0
  120. package/dist/tools/result-media.d.ts.map +1 -0
  121. package/dist/tools/result-output.d.ts +18 -0
  122. package/dist/tools/result-output.d.ts.map +1 -0
  123. package/dist/tools/tool-files.d.ts +59 -0
  124. package/dist/tools/tool-files.d.ts.map +1 -0
  125. package/dist/tools/tool-outputs.d.ts +63 -0
  126. package/dist/tools/tool-outputs.d.ts.map +1 -0
  127. package/dist/tools/view-file.d.ts +40 -0
  128. package/dist/tools/view-file.d.ts.map +1 -0
  129. package/dist/tsconfig.json +5 -0
  130. package/dist/turn-runtime.d.ts +19 -0
  131. package/dist/turn-runtime.d.ts.map +1 -0
  132. package/dist/types.d.ts +83 -0
  133. package/dist/types.d.ts.map +1 -0
  134. package/dist/workflow-input-attachments.d.ts +18 -0
  135. package/dist/workflow-input-attachments.d.ts.map +1 -0
  136. package/package.json +59 -4
  137. package/src/abort.ts +40 -0
  138. package/src/agent-prompt.ts +860 -0
  139. package/src/agent-runtime/errors.ts +44 -0
  140. package/src/agent-runtime/preflight.ts +314 -0
  141. package/src/agent-runtime/profile.ts +23 -0
  142. package/src/artifacts/layout-check/check.cjs +478 -0
  143. package/src/artifacts/layout-check/layout-check.ts +460 -0
  144. package/src/artifacts/materialize.ts +380 -0
  145. package/src/artifacts/publish-tool.ts +700 -0
  146. package/src/ask-parent-tool.ts +100 -0
  147. package/src/attachments.ts +1041 -0
  148. package/src/child-files.ts +535 -0
  149. package/src/child-questions.ts +42 -0
  150. package/src/computer-runner.ts +336 -0
  151. package/src/context-budget.ts +177 -0
  152. package/src/context-compaction.ts +1349 -0
  153. package/src/context-guard.ts +826 -0
  154. package/src/conversation-memory.ts +45 -0
  155. package/src/conversation-messages.ts +86 -0
  156. package/src/errors.ts +85 -0
  157. package/src/execution-plan.ts +70 -0
  158. package/src/failure.ts +82 -0
  159. package/src/family-mailbox.ts +189 -0
  160. package/src/file-ref.ts +18 -0
  161. package/src/image-attachments.ts +322 -0
  162. package/src/index.ts +54 -0
  163. package/src/inline-images.ts +69 -0
  164. package/src/message-authors.ts +77 -0
  165. package/src/message-times.ts +24 -0
  166. package/src/model-adapters.ts +273 -0
  167. package/src/model-lines.ts +28 -0
  168. package/src/prompt-cache.ts +40 -0
  169. package/src/requester.ts +21 -0
  170. package/src/run-agent-turn.ts +509 -0
  171. package/src/run-child.ts +344 -0
  172. package/src/run-conversation-turn.ts +272 -0
  173. package/src/run-credential.ts +55 -0
  174. package/src/run-environment.ts +1216 -0
  175. package/src/run-fate.ts +51 -0
  176. package/src/run-files-lock.ts +118 -0
  177. package/src/run-sandbox.ts +63 -0
  178. package/src/run-subagent.ts +433 -0
  179. package/src/run-workflow-agent-node.ts +344 -0
  180. package/src/sandbox-api-context.ts +237 -0
  181. package/src/sandbox-file-registry.ts +26 -0
  182. package/src/sandbox-files.ts +326 -0
  183. package/src/sandbox-handle.ts +19 -0
  184. package/src/sandbox-readiness.ts +22 -0
  185. package/src/skills/built-in.ts +183 -0
  186. package/src/skills/sixb-artifacts/SKILL.md +95 -0
  187. package/src/skills/sixb-artifacts/canvas.md +104 -0
  188. package/src/skills/sixb-artifacts/document.md +63 -0
  189. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/first-job.html +42 -0
  190. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/region.html +29 -0
  191. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/shared.css +35 -0
  192. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/welcome.html +31 -0
  193. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/canvas.json +107 -0
  194. package/src/skills/sixb-artifacts/examples/canvas/retro/canvas.json +158 -0
  195. package/src/skills/sixb-artifacts/examples/document/incident-report/document.md +35 -0
  196. package/src/skills/sixb-artifacts/examples/document/operations-review/document.md +41 -0
  197. package/src/skills/sixb-artifacts/examples/document/operations-review/figures/restorations.svg +1 -0
  198. package/src/skills/sixb-artifacts/examples/page/collections-desk/index.html +169 -0
  199. package/src/skills/sixb-artifacts/examples/page/collections-desk/queries/overdue.json +13 -0
  200. package/src/skills/sixb-artifacts/examples/page/dispatch-board/data/dispatch.json +234 -0
  201. package/src/skills/sixb-artifacts/examples/page/dispatch-board/index.html +245 -0
  202. package/src/skills/sixb-artifacts/examples/page/fleet-planner/data/plan.json +53 -0
  203. package/src/skills/sixb-artifacts/examples/page/fleet-planner/index.html +462 -0
  204. package/src/skills/sixb-artifacts/examples/page/service-explorer/data/service.json +276 -0
  205. package/src/skills/sixb-artifacts/examples/page/service-explorer/index.html +549 -0
  206. package/src/skills/sixb-artifacts/examples/sheet/overdue-invoices/queries/overdue.json +13 -0
  207. package/src/skills/sixb-artifacts/examples/sheet/overdue-invoices/workbook.json +30 -0
  208. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/sheets/Inventory.csv +13 -0
  209. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/sheets/Spend.csv +6 -0
  210. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/workbook.json +47 -0
  211. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/sheets/Quarters.csv +5 -0
  212. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/sheets/Regions.csv +5 -0
  213. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/workbook.json +78 -0
  214. package/src/skills/sixb-artifacts/examples/slides/launch-plan/index.html +63 -0
  215. package/src/skills/sixb-artifacts/examples/slides/q3-review/index.html +133 -0
  216. package/src/skills/sixb-artifacts/file.md +17 -0
  217. package/src/skills/sixb-artifacts/page.md +215 -0
  218. package/src/skills/sixb-artifacts/queries.md +66 -0
  219. package/src/skills/sixb-artifacts/references.md +68 -0
  220. package/src/skills/sixb-artifacts/sheet.md +223 -0
  221. package/src/skills/sixb-artifacts/slides.md +137 -0
  222. package/src/skills/sixb-memory/SKILL.md +68 -0
  223. package/src/skills/text-assets.d.ts +25 -0
  224. package/src/subagent-context.ts +182 -0
  225. package/src/subagent-continuation.ts +56 -0
  226. package/src/subagent-inbox.ts +101 -0
  227. package/src/subagent-tools.ts +1671 -0
  228. package/src/thread-context.ts +31 -0
  229. package/src/tools/attachments.ts +28 -0
  230. package/src/tools/bash.ts +233 -0
  231. package/src/tools/model-spec.ts +27 -0
  232. package/src/tools/read.ts +262 -0
  233. package/src/tools/result-media.ts +351 -0
  234. package/src/tools/result-output.ts +46 -0
  235. package/src/tools/tool-files.ts +204 -0
  236. package/src/tools/tool-outputs.ts +464 -0
  237. package/src/tools/view-file.ts +155 -0
  238. package/src/turn-runtime.ts +33 -0
  239. package/src/types.ts +91 -0
  240. package/src/workflow-input-attachments.ts +140 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sixb contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # @sixb/agent
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Sixb agent harness: the prompt, the model loop and the tools of every agent run, the same code
4
+ whichever runner runs it. A runner claims a run, opens its session and its environment, and hands
5
+ both to the harness.
6
+
7
+ ```text
8
+ runner (the cloud worker today) harness (@sixb/agent)
9
+ claims the run → AgentRunSession builds the prompt and tools, runs the loop, finishes
10
+ opens its environment → openSandbox bash · read · view_file · publish_artifact · children
11
+ ```
12
+
13
+ ```text
14
+ runAgentTurn a conversation turn
15
+ runSubagent a child agent's run
16
+ runWorkflowAgentNode a workflow agent step: the loop, then the structured finalizer
17
+ create*AgentEnvironment the run's prompt, tools and files, in the environment its runner opens
18
+ SubagentCoordinator spawn_agent, wait_agent, message_agent, and the children's questions
19
+ ```
20
+
21
+ A run reaches shared state only through its session (see
22
+ [run sessions](../core/src/agents/README.md)): this package never reads storage, a queue or the
23
+ broker. `publish_artifact` publishes through the session's `artifacts`, as any runner's.
24
+
25
+ The environment is a `RunSandbox` ([run-sandbox.ts](./src/run-sandbox.ts)) that the runner opens
26
+ through `openSandbox`: the cloud worker opens a sandbox from its factory, with the run's token
27
+ added outside it. The harness installs the run's files under its context directory and the `sixb`
28
+ CLI the run's commands call.
29
+
30
+ How the agent uses its sandbox, its children and their questions: [runtime design](./docs/runtime-design.md).
31
+
32
+ The harness runs on Bun.
@@ -0,0 +1,6 @@
1
+ export declare const NEVER_ABORTED_SIGNAL: AbortSignal;
2
+ /** Await a promise while allowing a signal to stop waiting for providers without cancellation. */
3
+ export declare function waitForAbort<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
4
+ /** Wait `ms`, or until `wake` settles, or until the signal aborts, rejecting with its reason. */
5
+ export declare function delay(ms: number, signal: AbortSignal, wake?: Promise<void>): Promise<void>;
6
+ //# sourceMappingURL=abort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../src/abort.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,aAA+B,CAAA;AAEhE,kGAAkG;AAClG,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBrF;AAED,iGAAiG;AACjG,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB1F"}
@@ -0,0 +1,126 @@
1
+ import type { AgentSkillDefinition } from "@sixb/core";
2
+ import type { AgentSystemPromptSize, SandboxModel } from "@sixb/core/internal/agents";
3
+ import type { OntologyDocsIndexEntry } from "@sixb/core/internal/ontology";
4
+ import type { ModelMessage } from "@sixb/core/models";
5
+ import type { SubagentRunFile } from "@sixb/core/storage";
6
+ import type { AgentRequester } from "./requester";
7
+ export type AgentExecutionMode = "conversation" | "subagent" | "workflow-task";
8
+ export interface RenderAgentSystemPromptInput {
9
+ readonly mode: AgentExecutionMode;
10
+ /**
11
+ * Where the run's files are, as the prompt names them: relative to the working directory, or
12
+ * absolute.
13
+ */
14
+ readonly contextDirectory: string;
15
+ readonly instructions?: string;
16
+ readonly skills: readonly AgentSkillDefinition[];
17
+ /** Ontology reference files to list; omitted, the prompt does not mention them. */
18
+ readonly ontologyIndex?: readonly OntologyDocsIndexEntry[];
19
+ readonly sandboxResetAt?: string;
20
+ /** When the conversation's turns moved to this workspace, from a computer or another folder. */
21
+ readonly workspaceMovedAt?: string;
22
+ readonly workspace?: AgentWorkspacePromptContext;
23
+ readonly facts?: AgentRuntimeFacts;
24
+ /**
25
+ * Who takes part in a conversation several people write in ({@link renderConversationPeople});
26
+ * omitted in one its owner holds alone.
27
+ */
28
+ readonly conversation?: string;
29
+ /** Models the sandbox CLI can call; omitted, the prompt does not mention them. */
30
+ readonly sandboxModels?: readonly SandboxModel[];
31
+ readonly memory?: AgentMemoryPromptContext;
32
+ }
33
+ /** The Agent's memory as the prompt shows it. */
34
+ export interface AgentMemoryPromptContext {
35
+ /** Others read the conversation: the project's memory alone is loaded, whoever sends the turn. */
36
+ readonly shared?: boolean;
37
+ readonly repos: readonly {
38
+ readonly repo: "user" | "project";
39
+ /** The repo's MEMORY.md. */
40
+ readonly entry: string;
41
+ }[];
42
+ }
43
+ /**
44
+ * For whom the run happens. Neither the time nor the requester's settings are facts of the prompt:
45
+ * each user message carries when it was sent, in its sender's time zone and locale (see
46
+ * {@link renderCurrentTime}), so the prompt stays byte-stable across runs and senders.
47
+ */
48
+ export interface AgentRuntimeFacts {
49
+ /** Absent when no principal started the run's chain of executions. */
50
+ readonly requester?: AgentRequester;
51
+ }
52
+ /** The time zone and locale a user message was sent in, as its run captured them. */
53
+ export interface SentSettings {
54
+ /** Canonical IANA time zone. */
55
+ readonly timeZone: string;
56
+ /** Canonical BCP 47 language tag. */
57
+ readonly locale: string;
58
+ }
59
+ /** Only non-secret facts about the environment actually prepared for this run. */
60
+ export interface AgentWorkspacePromptContext {
61
+ readonly workingDirectory: string;
62
+ /**
63
+ * How long files outlive the run: a persistent workspace (a thread's) is kept for its next
64
+ * runs, an ephemeral one is discarded when the run ends, and a computer's is the user's own
65
+ * folder, whose files were there before the run and stay after it.
66
+ */
67
+ readonly retention: "persistent" | "ephemeral" | "computer";
68
+ readonly source?: {
69
+ readonly type: "git";
70
+ readonly url: string;
71
+ readonly authenticatedAccess?: "read" | "write";
72
+ };
73
+ }
74
+ export interface RenderWorkflowOutputFinalizerPromptInput {
75
+ readonly instructions?: string;
76
+ }
77
+ /** Render the worker-owned system prompt, with task-specific instructions when supplied. */
78
+ export declare function renderAgentSystemPrompt(input: RenderAgentSystemPromptInput): string;
79
+ /**
80
+ * The system prompt with each section's bytes, as a step records what its request carried: the
81
+ * project's instructions, the memory indexes, the skills catalog and the ontology index apart
82
+ * from Sixb's own text.
83
+ */
84
+ export declare function measureAgentSystemPrompt(input: RenderAgentSystemPromptInput): AgentSystemPromptSize;
85
+ /** Render the worker-owned prompt for the tool-free workflow output projection call. */
86
+ export declare function renderWorkflowOutputFinalizerPrompt(input: RenderWorkflowOutputFinalizerPromptInput): string;
87
+ /** The settings a run captured from its requester, else the project's. */
88
+ export declare function sentSettings(settings: {
89
+ readonly timeZone?: string;
90
+ readonly locale?: string;
91
+ }, project: SentSettings): SentSettings;
92
+ /**
93
+ * When a user message was sent, read in the time zone of the run that answered it, with that run's
94
+ * time zone and locale. Derived from stored data only — never from the clock — so a replayed
95
+ * message always renders the same bytes.
96
+ */
97
+ export declare function renderCurrentTime(sentAt: Date, settings: SentSettings): string;
98
+ /** Someone who writes in a conversation, as the model reads them. */
99
+ export interface ConversationPerson {
100
+ readonly id: string;
101
+ /** The account's display name; the id stands in without one. */
102
+ readonly name?: string;
103
+ }
104
+ /**
105
+ * Who sent a user message, in a conversation several people write in: the last tag of the
106
+ * message. The user's own words before it are not escaped and may imitate it, so only this
107
+ * trailing tag says who wrote the message.
108
+ */
109
+ export declare function renderMessageAuthor(author: ConversationPerson): string;
110
+ /**
111
+ * Who takes part in a shared conversation, in its system prompt: it stays the same whoever sends a
112
+ * turn, and changes only with who takes part, never in front of history already cached.
113
+ */
114
+ export declare function renderConversationPeople(input: {
115
+ readonly owner: ConversationPerson;
116
+ readonly participants: readonly ConversationPerson[];
117
+ }): string;
118
+ /** Close a headless run's only user message with the time its run was created. */
119
+ export declare function withCurrentTime(message: Extract<ModelMessage, {
120
+ role: "user";
121
+ }>, createdAt: Date, settings: SentSettings): Extract<ModelMessage, {
122
+ role: "user";
123
+ }>;
124
+ /** Where the files a parent handed its child are: in the child's task, so it needs no lookup. */
125
+ export declare function renderHandedFiles(files: readonly SubagentRunFile[]): string;
126
+ //# sourceMappingURL=agent-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../src/agent-prompt.ts"],"names":[],"mappings":"AAE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QAAQ,EAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAClE,OAAO,EAAE,YAAY,GACpB,YAAY,CAKd;AAoHD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAK9E;AAED,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAKD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;IAClC,QAAQ,CAAC,YAAY,EAAE,SAAS,kBAAkB,EAAE,CAAA;CACrD,GAAG,MAAM,CAsBT;AAoBD,kFAAkF;AAClF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAChD,SAAS,EAAE,IAAI,EACf,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAGzC;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAY3E"}
@@ -0,0 +1,13 @@
1
+ import type { AgentRuntimeFailureReason, AgentRuntimeProfileCheck } from "./profile";
2
+ /** A provisioned sandbox does not satisfy the worker's versioned agent-runtime contract. */
3
+ export declare class AgentRuntimeProfileError extends Error {
4
+ readonly provider: string;
5
+ readonly check: AgentRuntimeProfileCheck;
6
+ readonly reason: AgentRuntimeFailureReason;
7
+ readonly exitCode?: number | undefined;
8
+ readonly name = "AgentRuntimeProfileError";
9
+ readonly profile: "sixb-agent-runtime/v1";
10
+ readonly remediation: string;
11
+ constructor(provider: string, check: AgentRuntimeProfileCheck, reason: AgentRuntimeFailureReason, exitCode?: number | undefined);
12
+ }
13
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AAEpF,4FAA4F;AAC5F,qBAAa,wBAAyB,SAAQ,KAAK;IAM/C,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,KAAK,EAAE,wBAAwB;IACxC,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM;IAR5B,SAAkB,IAAI,8BAA6B;IACnD,QAAQ,CAAC,OAAO,0BAAwB;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;gBAGjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,wBAAwB,EAC/B,MAAM,EAAE,yBAAyB,EACjC,QAAQ,CAAC,EAAE,MAAM,YAAA;CAS7B"}
@@ -0,0 +1,18 @@
1
+ import type { Sandbox } from "@sixb/core";
2
+ export interface AssertAgentRuntimeProfileInput {
3
+ readonly sandbox: Sandbox;
4
+ readonly env: Readonly<Record<string, string>>;
5
+ readonly projectId: string;
6
+ /** Default to {@link GATEWAY_RETRY_DELAYS_MS} and {@link GATEWAY_RETRY_WINDOW_MS}; tests shorten them. */
7
+ readonly gatewayRetryDelaysMs?: readonly number[];
8
+ readonly gatewayRetryWindowMs?: number;
9
+ }
10
+ /**
11
+ * Validate the concrete provisioned environment before a model can use its sandbox tools.
12
+ *
13
+ * The first command is deterministic and network-free. The second deliberately travels through
14
+ * the installed CLI and run-scoped gateway, proving the launcher, JavaScript fetch stack, gateway
15
+ * capability, DNS, and TLS/CA path (when the configured gateway uses HTTPS) together.
16
+ */
17
+ export declare function assertAgentRuntimeProfile(input: AssertAgentRuntimeProfileInput): Promise<void>;
18
+ //# sourceMappingURL=preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/preflight.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,OAAO,EAAE,MAAM,YAAY,CAAA;AA6BxD,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,0GAA0G;IAC1G,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;CACvC;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,IAAI,CAAC,CAsBf"}
@@ -0,0 +1,14 @@
1
+ export declare const AGENT_RUNTIME_MINIMUM_VERSIONS: {
2
+ readonly bun: {
3
+ readonly major: 1;
4
+ readonly minor: 3;
5
+ };
6
+ readonly node: {
7
+ readonly major: 22;
8
+ readonly minor: 0;
9
+ };
10
+ };
11
+ export type AgentJavascriptRuntime = keyof typeof AGENT_RUNTIME_MINIMUM_VERSIONS;
12
+ export type AgentRuntimeProfileCheck = "bash" | "environment-bootstrap" | "path-bootstrap" | "cli-installation" | "file-tools" | "javascript-runtime" | "cli-execution" | "gateway-connectivity";
13
+ export type AgentRuntimeFailureReason = "command-error" | "timed-out" | "nonzero-exit" | "invalid-output" | "unsupported-version";
14
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/profile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;;;;CAGjC,CAAA;AAEV,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,8BAA8B,CAAA;AAEhF,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,uBAAuB,GACvB,gBAAgB,GAChB,kBAAkB,GAClB,YAAY,GACZ,oBAAoB,GACpB,eAAe,GACf,sBAAsB,CAAA;AAE1B,MAAM,MAAM,yBAAyB,GACjC,eAAe,GACf,WAAW,GACX,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAA"}
@@ -0,0 +1,87 @@
1
+ import type { ArtifactTheme } from "@sixb/core/artifacts";
2
+ import { type FrameLayout, type LayoutProblem } from "@sixb/core/internal/artifacts/frames";
3
+ import { type AgentSandboxHandle } from "../../sandbox-handle";
4
+ /** What the layout check found, for the publish tool to report beside the version. */
5
+ export type LayoutCheck = {
6
+ readonly status: "checked";
7
+ readonly warnings: readonly LayoutWarning[];
8
+ /** One per slide, or a page's at each width, as the agent names them. */
9
+ readonly screenshots: readonly string[];
10
+ } | {
11
+ readonly status: "skipped";
12
+ readonly reason: string;
13
+ };
14
+ export interface LayoutWarning {
15
+ readonly code: string;
16
+ readonly message: string;
17
+ /** The slide's number, or the width a page was checked at: `desktop` or `phone`. */
18
+ readonly part?: string;
19
+ }
20
+ /** What the check lays out: a deck, a page, or a canvas's boards, each a page at its own size. */
21
+ export type CheckLayout = FrameLayout | "canvas";
22
+ /** A canvas's board, as the check opens it. */
23
+ export interface CheckedBoard {
24
+ readonly id: string;
25
+ /** Its HTML file, relative to the version's directory. */
26
+ readonly file: string;
27
+ readonly w: number;
28
+ readonly h: number;
29
+ readonly html: Uint8Array;
30
+ }
31
+ /**
32
+ * What a page's `sixb.query(name)` reads in the check: the query route's JSON as it answers the
33
+ * requester, or why the query failed for them.
34
+ */
35
+ export type CheckedQuery = {
36
+ readonly result: unknown;
37
+ } | {
38
+ readonly error: string;
39
+ };
40
+ /** A width a page is checked at, as a laptop and a phone show it. */
41
+ export type PageView = "desktop" | "phone";
42
+ /**
43
+ * Lays a published deck, page, or canvas out in the sandbox's headless Chromium, as the app's
44
+ * frame does, and reports what a reader would find wrong: on each slide of a deck, on a page at a
45
+ * laptop's width and a phone's, or on each of a canvas's boards at its own size, with a screenshot
46
+ * of each for the Agent to look at. A sandbox without the agent image's browser skips it; so does
47
+ * a check that fails, which never costs the Agent its publish.
48
+ */
49
+ export declare function checkLayout(input: {
50
+ readonly handle: AgentSandboxHandle;
51
+ /** The version's directory in the sandbox. */
52
+ readonly directory: string;
53
+ /** The paths the version publishes, relative to the directory: the check serves no others. */
54
+ readonly files: readonly string[];
55
+ /** Names the check's directory, so each version's screenshots stay apart. */
56
+ readonly name: string;
57
+ /** The version's `theme.json`, which the reader's frame applies over the app's theme. */
58
+ readonly theme?: ArtifactTheme;
59
+ /** The version's queries by name, served where the runtime reads them opened on its own. */
60
+ readonly queries?: Readonly<Record<string, CheckedQuery>>;
61
+ readonly signal: AbortSignal;
62
+ /** Test seam; production allows 120 seconds. */
63
+ readonly timeoutMs?: number;
64
+ } & ({
65
+ readonly layout: FrameLayout;
66
+ readonly entry: Uint8Array;
67
+ } | {
68
+ readonly layout: "canvas";
69
+ readonly boards: readonly CheckedBoard[];
70
+ })): Promise<LayoutCheck>;
71
+ /** A problem where the check found it: on a deck's slide, or on a page at one width. */
72
+ type CheckedProblem = LayoutProblem & {
73
+ readonly theme: "light" | "dark";
74
+ readonly slide?: number;
75
+ readonly view?: PageView;
76
+ /** The canvas's board it is on. */
77
+ readonly board?: string;
78
+ };
79
+ /**
80
+ * The problems as warnings, worst first. A layout break is one warning per element; small text,
81
+ * a small control, and low contrast with one cause, the same element at the same size or in the
82
+ * same colors, is one warning naming every slide or width it is at, so a deck's eyebrow at 17px
83
+ * is one line, not nine. Contrast says which theme it fails in when it fails in one.
84
+ */
85
+ export declare function layoutWarnings(problems: readonly CheckedProblem[]): LayoutWarning[];
86
+ export {};
87
+ //# sourceMappingURL=layout-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-check.d.ts","sourceRoot":"","sources":["../../../src/artifacts/layout-check/layout-check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAGL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAGnB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,sBAAsB,CAAA;AAc3E,sFAAsF;AACtF,MAAM,MAAM,WAAW,GACnB;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;IAC3C,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CACxC,GACD;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,kGAAkG;AAClG,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEhD,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,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AAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACxB,mCAAmC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,aAAa,EAAE,CAiFnF"}
@@ -0,0 +1,115 @@
1
+ import type { Sandbox, SandboxFileRecord } from "@sixb/core";
2
+ import type { AgentRunArtifacts, AgentRunFileStore } from "@sixb/core/internal/agents";
3
+ import type { ArtifactRecord, ArtifactVersionRecord } from "@sixb/core/storage";
4
+ export interface MaterializedArtifacts {
5
+ /** Files to write, at paths relative to the sandbox working directory or absolute. */
6
+ readonly files: readonly SandboxFileRecord[];
7
+ readonly manifestJson: string;
8
+ }
9
+ /** One file of a version just published, with the bytes it holds. */
10
+ export interface PublishedArtifactFile {
11
+ readonly path: string;
12
+ readonly bytes: Uint8Array;
13
+ }
14
+ interface ManifestEntry {
15
+ readonly id: string;
16
+ readonly kind: string;
17
+ readonly title: string;
18
+ readonly version: number;
19
+ /** The artifact's address: an artifact that shows it follows its latest version. */
20
+ readonly address: string;
21
+ /** The same at this version, which never changes: a reply shows what its words describe. */
22
+ readonly pinned: string;
23
+ /**
24
+ * Addresses of its parts: a document's sections, a sheet's sheets and charts, a deck's slides, a
25
+ * canvas's boards and sections.
26
+ */
27
+ readonly parts?: readonly {
28
+ readonly address: string;
29
+ readonly pinned: string;
30
+ readonly name: string;
31
+ }[];
32
+ /** Where the version's files are, as the agent names it; absent when not installed. */
33
+ readonly directory?: string;
34
+ readonly files: readonly string[];
35
+ /**
36
+ * The latest version was published outside this conversation: a person's edit in the app,
37
+ * another conversation, or the project's code. The next version starts from it and keeps its
38
+ * changes.
39
+ */
40
+ readonly edited?: true;
41
+ }
42
+ /**
43
+ * The conversation's artifacts as the run's sandbox holds them: the latest version of each under
44
+ * `<directory>/<id>/`, listed in the manifest, newest first. A publish replaces its artifact's copy
45
+ * and entry, so both stay the latest version for the rest of the run: revising from the copy never
46
+ * starts from the version before. A publish refused because the artifact moved on installs the
47
+ * version it moved to.
48
+ */
49
+ export declare class InstalledArtifacts implements MaterializedArtifacts {
50
+ #private;
51
+ private readonly layout;
52
+ readonly files: readonly SandboxFileRecord[];
53
+ constructor(layout: {
54
+ /** As the agent names it, like the manifest. */
55
+ readonly directory: string;
56
+ readonly manifestPath: string;
57
+ readonly maxBytes: number;
58
+ }, entries: readonly ManifestEntry[], installed: Map<string, number>, files: readonly SandboxFileRecord[]);
59
+ get manifestJson(): string;
60
+ /** The version the manifest lists for an artifact: the one its copy holds. */
61
+ versionOf(artifactId: string): number | undefined;
62
+ /**
63
+ * Install the version just published in place of the artifact's copy, and list it first. One
64
+ * update runs at a time, so parallel publishes never write an older manifest over a newer one.
65
+ */
66
+ replace(sandbox: Sandbox, published: {
67
+ readonly artifact: ArtifactRecord;
68
+ readonly version: ArtifactVersionRecord;
69
+ }, files: readonly PublishedArtifactFile[], signal: AbortSignal, options?: {
70
+ readonly edited?: boolean;
71
+ }): Promise<void>;
72
+ }
73
+ /** What a turn reads of its conversation's artifacts, as its requester, through its session. */
74
+ export type TurnArtifacts = Pick<AgentRunArtifacts, "getVersion" | "list" | "listVersions">;
75
+ /**
76
+ * The latest version of each artifact the conversation shares, installed under `<directory>/<id>/`
77
+ * and listed in a manifest, so the Agent edits what was published rather than whatever an older
78
+ * workspace still holds. Read as the turn's requester, it holds nothing they cannot read. Newest
79
+ * first; artifacts past the byte budget, or whose files cannot be read, are listed without their
80
+ * files.
81
+ */
82
+ export declare function materializeThreadArtifacts(input: {
83
+ /** The conversation's thread, whose artifacts a copy published elsewhere is edited from. */
84
+ readonly threadId: string;
85
+ readonly artifacts: TurnArtifacts;
86
+ readonly blobStorage: AgentRunFileStore;
87
+ /** As the agent names it: relative to the working directory, or absolute. */
88
+ readonly directory: string;
89
+ /** Where the manifest is written, named the same way. */
90
+ readonly manifestPath: string;
91
+ /** A cancelled run stops downloading. */
92
+ readonly signal?: AbortSignal;
93
+ /** Test seam; production installs up to 50 MB. */
94
+ readonly maxBytes?: number;
95
+ }): Promise<InstalledArtifacts>;
96
+ /**
97
+ * Install the latest version of each thread artifact one of `runIds` published a version of, in
98
+ * place of the copy the run holds: a parent turn sees what its children published like its own,
99
+ * whoever published since. One that cannot be installed does not stop the others; the error at the
100
+ * end names each.
101
+ */
102
+ export declare function installArtifactsPublishedBy(input: {
103
+ readonly installed: InstalledArtifacts;
104
+ readonly artifacts: TurnArtifacts;
105
+ readonly blobStorage: AgentRunFileStore;
106
+ readonly sandbox: Sandbox;
107
+ readonly runIds: readonly string[];
108
+ readonly signal: AbortSignal;
109
+ }): Promise<void>;
110
+ /** A version's files with the bytes each holds. Reading stops when the run is cancelled. */
111
+ export declare function readArtifactVersionFiles(blobStorage: AgentRunFileStore, version: ArtifactVersionRecord, signal: AbortSignal): Promise<PublishedArtifactFile[]>;
112
+ /** A blob's bytes. Reading stops when the run is cancelled. */
113
+ export declare function readBlob(blobStorage: AgentRunFileStore, blobId: string, signal: AbortSignal): Promise<Uint8Array>;
114
+ export {};
115
+ //# sourceMappingURL=materialize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../src/artifacts/materialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtF,OAAO,KAAK,EAAmB,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAQhG,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B;AAED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AC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgChB;AAmED,4FAA4F;AAC5F,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAQlC;AAED,+DAA+D;AAC/D,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,iBAAiB,EAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,UAAU,CAAC,CAkBrB"}
@@ -0,0 +1,86 @@
1
+ import { type ArtifactKind, type Principal } from "@sixb/core";
2
+ import { type AgentRunArtifacts, type AgentRunFileStore } from "@sixb/core/internal/agents";
3
+ import type { ModelTool } from "@sixb/core/models";
4
+ import type { AgentSandboxHandle } from "../sandbox-handle";
5
+ import type { AgentFileBudget } from "../tools/tool-files";
6
+ import { type InstalledArtifacts } from "./materialize";
7
+ type PublishableKind = ArtifactKind;
8
+ export declare const PUBLISH_ARTIFACT_TOOL_SPEC: {
9
+ readonly name: "publish_artifact";
10
+ readonly description: "Publish a new artifact from a file or directory in the sandbox: a deliverable the user opens beside the conversation. Read the sixb-artifacts skill before the first publish. To change an artifact you already published, use publish_artifact_version. Returns the artifact's id and version; a refusal says what to fix.";
11
+ readonly inputSchema: {
12
+ type: string;
13
+ properties: {
14
+ path: {
15
+ readonly type: "string";
16
+ readonly description: "A file or a directory in the sandbox, relative to the working directory.";
17
+ };
18
+ kind: {
19
+ type: string;
20
+ enum: ("file" | "document" | "sheet" | "slides" | "page" | "canvas")[];
21
+ };
22
+ title: {
23
+ readonly type: "string";
24
+ readonly description: "Plain text of at most 200 characters naming the deliverable.";
25
+ };
26
+ };
27
+ required: string[];
28
+ additionalProperties: false;
29
+ };
30
+ };
31
+ export declare const PUBLISH_ARTIFACT_VERSION_TOOL_SPEC: {
32
+ readonly name: "publish_artifact_version";
33
+ readonly description: "Publish the next version of an artifact you published, from a file or directory in the sandbox. It keeps its kind, and its earlier versions stay readable. $SIXB_ARTIFACTS lists this conversation's artifacts, each with its latest version under $SIXB_ARTIFACTS_DIR/<id>/. Returns the new version; a refusal says what to fix.";
34
+ readonly inputSchema: {
35
+ type: string;
36
+ properties: {
37
+ id: {
38
+ type: string;
39
+ description: string;
40
+ };
41
+ path: {
42
+ readonly type: "string";
43
+ readonly description: "A file or a directory in the sandbox, relative to the working directory.";
44
+ };
45
+ title: {
46
+ readonly type: "string";
47
+ readonly description: "Plain text of at most 200 characters naming the deliverable.";
48
+ };
49
+ };
50
+ required: string[];
51
+ additionalProperties: false;
52
+ };
53
+ };
54
+ export interface PublishArtifactToolInput {
55
+ readonly path: string;
56
+ readonly kind: PublishableKind;
57
+ readonly title: string;
58
+ }
59
+ export interface PublishArtifactVersionToolInput {
60
+ readonly id: string;
61
+ readonly path: string;
62
+ readonly title: string;
63
+ }
64
+ interface PublishToolsInput {
65
+ /** The run's artifacts, through its session: what it reads as its requester, and publishes. */
66
+ readonly artifacts: AgentRunArtifacts;
67
+ /** The conversation the run publishes into, and its owner, who owns what the Agent creates. */
68
+ readonly threadId: string;
69
+ readonly owner: Principal;
70
+ /** Where the version's files are stored before it is published. */
71
+ readonly blobStorage: AgentRunFileStore;
72
+ /** Shared with every other file the run stores. */
73
+ readonly budget: AgentFileBudget;
74
+ readonly resolveSandbox: () => Promise<AgentSandboxHandle>;
75
+ /** The conversation's artifacts in the sandbox, which each publish keeps current. */
76
+ readonly installed: Promise<InstalledArtifacts>;
77
+ }
78
+ /**
79
+ * `publish_artifact` and `publish_artifact_version`: each reads a file or a directory from the
80
+ * sandbox, stores its bytes, and publishes them through the run's session, which applies a run's
81
+ * rules (see `AgentRunArtifacts.publish`). The version exists when the tool returns, so the
82
+ * conversation shows it mid-turn and a cancelled run keeps it.
83
+ */
84
+ export declare function createPublishArtifactTools(input: PublishToolsInput): readonly [ModelTool<PublishArtifactToolInput>, ModelTool<PublishArtifactVersionToolInput>];
85
+ export {};
86
+ //# sourceMappingURL=publish-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish-tool.d.ts","sourceRoot":"","sources":["../../src/artifacts/publish-tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EAKjB,KAAK,SAAS,EAEf,MAAM,YAAY,CAAA;AAEnB,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAA;AASnC,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAS9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAO1D,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,eAAe,CAAA;AAQtB,KAAK,eAAe,GAAG,YAAY,CAAA;AAenC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAc7B,CAAA;AAEV,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;CAcrC,CAAA;AAEV,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,iBAAiB;IACzB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC1D,qFAAqF;IACrF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAChD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,GACvB,SAAS,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAAE,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAmB5F"}
@@ -0,0 +1,36 @@
1
+ import { type AgentMessage } from "@sixb/core";
2
+ import { type ModelTool } from "@sixb/core/models";
3
+ import type { SubagentInbox } from "./subagent-inbox";
4
+ export interface AskParentInput {
5
+ readonly question: string;
6
+ }
7
+ /** What `ask_parent` answers: the parent's answer, or that it comes in a later turn. */
8
+ export type AskParentOutput = {
9
+ readonly answer: string;
10
+ }
11
+ /** `question`: its id, which the answer of a later turn replies to. */
12
+ | {
13
+ readonly status: "deferred";
14
+ readonly question: string;
15
+ readonly note: string;
16
+ }
17
+ /** It paused on a held call too: only a decision continues it, without an answer. */
18
+ | {
19
+ readonly status: "unanswered";
20
+ readonly question: string;
21
+ readonly note: string;
22
+ };
23
+ /**
24
+ * What a question deferred in the step that held a call reads as once the child continues: the
25
+ * decision continues it, and no answer comes with it. Only a continuation reads it, as the child
26
+ * paused right after that step, so what its thread keeps may say so without changing a byte the
27
+ * model already read.
28
+ */
29
+ export declare function unansweredQuestion<TMessage extends Pick<AgentMessage, "parts">>(messages: readonly TMessage[]): readonly TMessage[];
30
+ /**
31
+ * A child's question to its parent, which it waits for within its step. Its parent answers with
32
+ * `message_agent`; when its turn ends first, the child pauses on the question and a later turn
33
+ * continues it with the answer.
34
+ */
35
+ export declare function createAskParentTool(inbox: SubagentInbox): ModelTool<AskParentInput>;
36
+ //# sourceMappingURL=ask-parent-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-parent-tool.d.ts","sourceRoot":"","sources":["../src/ask-parent-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,YAAY,CAAA;AACpE,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAEjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAED,wFAAwF;AACxF,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC7B,uEAAuE;GACrE;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACnF,qFAAqF;GACnF;IAAE,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AASvF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAS,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAC7E,QAAQ,EAAE,SAAS,QAAQ,EAAE,GAC5B,SAAS,QAAQ,EAAE,CAiBrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC,cAAc,CAAC,CA+BnF"}