@bastani/atomic 0.9.45 → 0.9.46

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 (214) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +22 -0
  3. package/dist/builtin/intercom/broker/broker.ts +124 -10
  4. package/dist/builtin/intercom/broker/client.ts +177 -25
  5. package/dist/builtin/intercom/broker/multinode-router.ts +228 -27
  6. package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
  7. package/dist/builtin/intercom/broker/recipient-receipts.ts +38 -4
  8. package/dist/builtin/intercom/broker/send-handler.ts +9 -2
  9. package/dist/builtin/intercom/broker/sql-outbox-store.ts +29 -4
  10. package/dist/builtin/intercom/group.ts +25 -0
  11. package/dist/builtin/intercom/index.bundle.mjs +177 -35
  12. package/dist/builtin/intercom/package.json +1 -1
  13. package/dist/builtin/intercom/retry-policy.ts +7 -0
  14. package/dist/builtin/intercom/types.ts +21 -0
  15. package/dist/builtin/mcp/package.json +1 -1
  16. package/dist/builtin/subagents/CHANGELOG.md +21 -0
  17. package/dist/builtin/subagents/package.json +1 -1
  18. package/dist/builtin/subagents/src/extension/index.bundle.mjs +152 -56
  19. package/dist/builtin/web-access/package.json +1 -1
  20. package/dist/builtin/workflows/CHANGELOG.md +79 -0
  21. package/dist/builtin/workflows/builtin/{chunk-6901nsd6.js → chunk-6jpwc09k.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-vwx023ge.js → chunk-qhm35ntx.js} +1 -1
  23. package/dist/builtin/workflows/builtin/{chunk-jvna28mq.js → chunk-zhyqnf5g.js} +331 -68
  24. package/dist/builtin/workflows/builtin/goal.js +2 -2
  25. package/dist/builtin/workflows/builtin/index.js +3 -3
  26. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  27. package/dist/builtin/workflows/package.json +1 -1
  28. package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +1 -0
  29. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6.md +2 -2
  30. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_sol.md +2 -2
  31. package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_terra.md +77 -0
  32. package/dist/builtin/workflows/src/authoring.d.ts +1 -1
  33. package/dist/builtin/workflows/src/durable/journal/internal.d.ts +2 -0
  34. package/dist/builtin/workflows/src/extension/index.bundle.mjs +7104 -3387
  35. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +11105 -7264
  36. package/dist/builtin/workflows/src/index.js +6796 -3606
  37. package/dist/builtin/workflows/src/local-worker-entry.mjs +11105 -7264
  38. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +19 -0
  39. package/dist/core/agent-session-boundaries.d.ts.map +1 -1
  40. package/dist/core/agent-session-boundaries.js +1 -0
  41. package/dist/core/agent-session-boundaries.js.map +1 -1
  42. package/dist/core/agent-session-events.d.ts.map +1 -1
  43. package/dist/core/agent-session-events.js +2 -1
  44. package/dist/core/agent-session-events.js.map +1 -1
  45. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  46. package/dist/core/agent-session-extension-bindings.js +15 -2
  47. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  48. package/dist/core/agent-session-methods.d.ts +3 -2
  49. package/dist/core/agent-session-methods.d.ts.map +1 -1
  50. package/dist/core/agent-session-methods.js.map +1 -1
  51. package/dist/core/agent-session-prompt.d.ts +4 -2
  52. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  53. package/dist/core/agent-session-prompt.js +13 -8
  54. package/dist/core/agent-session-prompt.js.map +1 -1
  55. package/dist/core/agent-session-recovery.d.ts.map +1 -1
  56. package/dist/core/agent-session-recovery.js +92 -1
  57. package/dist/core/agent-session-recovery.js.map +1 -1
  58. package/dist/core/agent-session-tasks.d.ts.map +1 -1
  59. package/dist/core/agent-session-tasks.js +8 -1
  60. package/dist/core/agent-session-tasks.js.map +1 -1
  61. package/dist/core/agent-session-transfer.d.ts.map +1 -1
  62. package/dist/core/agent-session-transfer.js +5 -0
  63. package/dist/core/agent-session-transfer.js.map +1 -1
  64. package/dist/core/agent-session.d.ts +2 -0
  65. package/dist/core/agent-session.d.ts.map +1 -1
  66. package/dist/core/agent-session.js +2 -0
  67. package/dist/core/agent-session.js.map +1 -1
  68. package/dist/core/copilot-errors.d.ts +6 -0
  69. package/dist/core/copilot-errors.d.ts.map +1 -0
  70. package/dist/core/copilot-errors.js +17 -0
  71. package/dist/core/copilot-errors.js.map +1 -0
  72. package/dist/core/execution-model-router.d.ts.map +1 -1
  73. package/dist/core/execution-model-router.js +12 -2
  74. package/dist/core/execution-model-router.js.map +1 -1
  75. package/dist/core/extensions/context-types.d.ts +7 -0
  76. package/dist/core/extensions/context-types.d.ts.map +1 -1
  77. package/dist/core/extensions/context-types.js.map +1 -1
  78. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  79. package/dist/core/extensions/runner-context.js +6 -0
  80. package/dist/core/extensions/runner-context.js.map +1 -1
  81. package/dist/core/extensions/ui-types.d.ts +9 -1
  82. package/dist/core/extensions/ui-types.d.ts.map +1 -1
  83. package/dist/core/extensions/ui-types.js.map +1 -1
  84. package/dist/core/extensions/workflow-activity-hub.d.ts +4 -0
  85. package/dist/core/extensions/workflow-activity-hub.d.ts.map +1 -1
  86. package/dist/core/extensions/workflow-activity-hub.js +26 -5
  87. package/dist/core/extensions/workflow-activity-hub.js.map +1 -1
  88. package/dist/core/extensions/workflow-events.d.ts +5 -0
  89. package/dist/core/extensions/workflow-events.d.ts.map +1 -1
  90. package/dist/core/extensions/workflow-events.js.map +1 -1
  91. package/dist/core/messages.d.ts +5 -0
  92. package/dist/core/messages.d.ts.map +1 -1
  93. package/dist/core/messages.js +1 -1
  94. package/dist/core/messages.js.map +1 -1
  95. package/dist/core/model-fallback-failures.d.ts +1 -1
  96. package/dist/core/model-fallback-failures.d.ts.map +1 -1
  97. package/dist/core/model-fallback-failures.js +37 -3
  98. package/dist/core/model-fallback-failures.js.map +1 -1
  99. package/dist/core/model-resolver-defaults.js +2 -2
  100. package/dist/core/model-resolver-defaults.js.map +1 -1
  101. package/dist/core/model-runtime-streaming.js +2 -2
  102. package/dist/core/model-runtime-streaming.js.map +1 -1
  103. package/dist/core/package-manager-npm.d.ts.map +1 -1
  104. package/dist/core/package-manager-npm.js +7 -3
  105. package/dist/core/package-manager-npm.js.map +1 -1
  106. package/dist/core/provider-composer.d.ts.map +1 -1
  107. package/dist/core/provider-composer.js +19 -11
  108. package/dist/core/provider-composer.js.map +1 -1
  109. package/dist/core/provider-rate-limits.d.ts +55 -6
  110. package/dist/core/provider-rate-limits.d.ts.map +1 -1
  111. package/dist/core/provider-rate-limits.js +182 -29
  112. package/dist/core/provider-rate-limits.js.map +1 -1
  113. package/dist/core/provider-request-admission.d.ts.map +1 -1
  114. package/dist/core/provider-request-admission.js +42 -18
  115. package/dist/core/provider-request-admission.js.map +1 -1
  116. package/dist/core/storage/node-sqlite.d.ts.map +1 -1
  117. package/dist/core/storage/node-sqlite.js +176 -19
  118. package/dist/core/storage/node-sqlite.js.map +1 -1
  119. package/dist/core/storage/provider.d.ts +4 -2
  120. package/dist/core/storage/provider.d.ts.map +1 -1
  121. package/dist/core/storage/provider.js +94 -5
  122. package/dist/core/storage/provider.js.map +1 -1
  123. package/dist/core/structured-output/index.d.ts.map +1 -1
  124. package/dist/core/structured-output/index.js +15 -8
  125. package/dist/core/structured-output/index.js.map +1 -1
  126. package/dist/core/structured-output/provider-failure.d.ts +17 -0
  127. package/dist/core/structured-output/provider-failure.d.ts.map +1 -0
  128. package/dist/core/structured-output/provider-failure.js +28 -0
  129. package/dist/core/structured-output/provider-failure.js.map +1 -0
  130. package/dist/core/tasks/completion.d.ts +6 -1
  131. package/dist/core/tasks/completion.d.ts.map +1 -1
  132. package/dist/core/tasks/completion.js +33 -18
  133. package/dist/core/tasks/completion.js.map +1 -1
  134. package/dist/core/tasks/pause.d.ts +2 -1
  135. package/dist/core/tasks/pause.d.ts.map +1 -1
  136. package/dist/core/tasks/pause.js +3 -2
  137. package/dist/core/tasks/pause.js.map +1 -1
  138. package/dist/core/tools/bash.d.ts.map +1 -1
  139. package/dist/core/tools/bash.js +13 -7
  140. package/dist/core/tools/bash.js.map +1 -1
  141. package/dist/core/tools/grep.d.ts.map +1 -1
  142. package/dist/core/tools/grep.js +6 -4
  143. package/dist/core/tools/grep.js.map +1 -1
  144. package/dist/core/tools/shell-task-render.d.ts +1 -0
  145. package/dist/core/tools/shell-task-render.d.ts.map +1 -1
  146. package/dist/core/tools/shell-task-render.js +7 -2
  147. package/dist/core/tools/shell-task-render.js.map +1 -1
  148. package/dist/core/tools/shell-task-status.d.ts.map +1 -1
  149. package/dist/core/tools/shell-task-status.js +2 -1
  150. package/dist/core/tools/shell-task-status.js.map +1 -1
  151. package/dist/extensions/tool-search/tool.d.ts +5 -0
  152. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  153. package/dist/extensions/tool-search/tool.js +38 -5
  154. package/dist/extensions/tool-search/tool.js.map +1 -1
  155. package/dist/index.d.ts +1 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +1 -1
  158. package/dist/index.js.map +1 -1
  159. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  160. package/dist/modes/interactive/components/assistant-message.js +20 -12
  161. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  162. package/dist/modes/interactive/components/chat-session-host-actions.js +3 -2
  163. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  164. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  165. package/dist/modes/interactive/components/login-dialog.js +42 -14
  166. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  167. package/dist/modes/interactive/interactive-extension-context.js +2 -1
  168. package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
  169. package/dist/modes/interactive/interactive-extension-custom-ui.js +1 -1
  170. package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
  171. package/dist/modes/interactive/interactive-extension-dialogs.js +10 -4
  172. package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
  173. package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -0
  174. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  175. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  176. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  177. package/dist/modes/interactive/interactive-startup.js +5 -6
  178. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  179. package/dist/modes/interactive-engine/engine-custom-ui.d.ts +3 -0
  180. package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
  181. package/dist/modes/interactive-engine/engine-custom-ui.js +1 -0
  182. package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
  183. package/dist/modes/interactive-engine/protocol.d.ts +6 -0
  184. package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
  185. package/dist/modes/interactive-engine/protocol.js +9 -0
  186. package/dist/modes/interactive-engine/protocol.js.map +1 -1
  187. package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
  188. package/dist/modes/interactive-engine/remote-component.js +3 -2
  189. package/dist/modes/interactive-engine/remote-component.js.map +1 -1
  190. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  191. package/dist/modes/rpc/rpc-client-process.js +8 -1
  192. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  193. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  194. package/dist/modes/rpc/rpc-client.js +7 -1
  195. package/dist/modes/rpc/rpc-client.js.map +1 -1
  196. package/dist/utils/ansi.d.ts +2 -0
  197. package/dist/utils/ansi.d.ts.map +1 -1
  198. package/dist/utils/ansi.js +5 -0
  199. package/dist/utils/ansi.js.map +1 -1
  200. package/docs/codemode.md +1 -1
  201. package/docs/intercom/reference.md +3 -3
  202. package/docs/llama-cpp.md +25 -14
  203. package/docs/models/evals.md +31 -12
  204. package/docs/models/reference.md +23 -51
  205. package/docs/models.md +3 -4
  206. package/docs/providers.md +5 -15
  207. package/docs/settings.md +1 -1
  208. package/docs/storage.md +2 -2
  209. package/docs/tools.md +1 -1
  210. package/docs/tui.md +2 -0
  211. package/docs/workflows/api-reference.md +20 -1
  212. package/docs/workflows/operations.md +17 -4
  213. package/npm-shrinkwrap.json +64 -44
  214. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  goal_default
3
- } from "./chunk-vwx023ge.js";
4
- import"./chunk-jvna28mq.js";
3
+ } from "./chunk-qhm35ntx.js";
4
+ import"./chunk-zhyqnf5g.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
@@ -16,8 +16,8 @@ import {
16
16
  } from "./chunk-z3pajrfs.js";
17
17
  import {
18
18
  goal_default
19
- } from "./chunk-vwx023ge.js";
20
- import"./chunk-jvna28mq.js";
19
+ } from "./chunk-qhm35ntx.js";
20
+ import"./chunk-zhyqnf5g.js";
21
21
  import"./chunk-z0d03ktm.js";
22
22
  import {
23
23
  open_claude_design_default
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-dcxscfnb.js";
28
28
  import {
29
29
  ralph_default
30
- } from "./chunk-6901nsd6.js";
30
+ } from "./chunk-6jpwc09k.js";
31
31
  import {
32
32
  tournament_default
33
33
  } from "./chunk-49kkbdpr.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ralph_default
3
- } from "./chunk-6901nsd6.js";
4
- import"./chunk-jvna28mq.js";
3
+ } from "./chunk-6jpwc09k.js";
4
+ import"./chunk-zhyqnf5g.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.45",
3
+ "version": "0.9.46",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -29,6 +29,7 @@ Create or revise prompts for the user's target model. Keep the common prompt por
29
29
  | Target | Read | Main distinctions |
30
30
  | --- | --- | --- |
31
31
  | GPT-6.1 Sol | `references/gpt_6_1_sol.md` | Supported-effort migration, task and approval contracts, selective Astra-observed templates, tool and conversation compatibility |
32
+ | GPT-6.1 Terra | `references/gpt_6_1_terra.md` | Visual, computer-use, and writing task contracts; start at `medium` effort (`none` supported); same-effort migration from GPT-5.6 Terra; selective Astra-observed templates |
32
33
  | GPT-6 Astra, Sol, Luna | `references/gpt_6.md` | OpenAI's official templates for approval pauses, skill-instruction conflicts, writing style, delegation, and verification; Sol/Luna effort sensitivity |
33
34
  | GPT-5.6 Sol, Terra, Luna | `references/gpt_5_6.md` | Lean prompts, concise defaults, high-effort and pro-mode prompts, programmatic tool stages, cache-friendly ordering |
34
35
  | GPT-5.5 | `references/gpt_5_5.md` | Outcome-first baseline, retrieval limits, grounded drafts, explicit validation |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this reference when targeting `gpt-6-astra`, `gpt-6-sol`, or `gpt-6-luna`, migrating a prompt to the GPT-6 family, or diagnosing early stops, excessive verification, under-delegation, or writing-style drift. Guidance checked on September 22, 2026 against [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model). The prompt blocks labeled **OpenAI template** are quoted verbatim from that guide. Start from them, then edit the wording to fit the product's approval gates and house style.
4
4
 
5
- OpenAI positions the three models by reasoning demand, latency, and cost: Astra for the highest capability and long multi-step work across code, browsers, and professional software; Sol for strong reasoning on demanding tasks; Luna for efficient, repeatable work at scale. OpenAI offers the templates below as a starting point for the whole family, but the behaviors they address were observed on Astra. Evaluate them on the chosen model and workload. See [Sol and Luna differences](#sol-and-luna-differences) before choosing effort or a tool-calling API.
5
+ OpenAI positions the three models by reasoning demand, latency, and cost: Astra for the highest capability and long multi-step work across code, browsers, and professional software; Sol for strong reasoning on demanding tasks; Luna for efficient, repeatable work at scale. OpenAI offers the templates below as a starting point for the whole family, but the behaviors they address were observed on Astra. Evaluate them on the chosen model and workload. See [Sol and Luna differences](#sol-and-luna-differences) before choosing effort or a tool-calling API. For `gpt-6.1-sol` and `gpt-6.1-terra`, start with [gpt_6_1_sol.md](gpt_6_1_sol.md) or [gpt_6_1_terra.md](gpt_6_1_terra.md), which link back here for the shared templates.
6
6
 
7
7
  ## When it asks before doing authorized work
8
8
 
@@ -79,7 +79,7 @@ OpenAI template, for reducing jargon and stock phrases:
79
79
  ```text
80
80
  Avoid using slop words or phrases like "Bottom Line:" in conclusions, "delve," "foster," "leverage," "it's worth noting," "importantly," "Question? Answer." or "This isn't about X. It's about Y.", "genuinely" or hyphenated compound descriptions and adjectives. Do not use concluding summary statements such as "In short:..", "The simplest mental model is:...".
81
81
 
82
- State the intended action directly. Avoid adding what you won't do, what will remain unchanged, or how you'll separate or categorize results. Do not use contrastive framing such as "X, not Y" or "X—not Y" that introduces an unprompted alternative that the user didn't ask about. Avoid invented compound labels like "exact-head checks" and "editorial-row layouts", vague qualifiers, and canned transitions; use plain verbs and prepositions to state the actual relationship directly.
82
+ State the intended action directly. Avoid adding what you won't do, what will remain unchanged, or how you'll separate or categorize results. Do not use contrastive framing such as "X, not Y" that introduces an unprompted alternative that the user didn't ask about. Avoid invented compound labels like "exact-head checks" and "editorial-row layouts", vague qualifiers, and canned transitions; use plain verbs and prepositions to state the actual relationship directly.
83
83
  ```
84
84
 
85
85
  Caveats: do not trim contractual fields, citations, validation evidence, or warnings the reader needs. For technical audiences, plain language still includes exact identifiers, commands, and API names. If a parser or UI requires Markdown, tables, or fixed headings, state that requirement after the style template so it wins.
@@ -1,6 +1,6 @@
1
1
  # GPT-6.1 Sol prompting and migration
2
2
 
3
- Use this reference when targeting `gpt-6.1-sol` or migrating from `gpt-6-sol`. Distilled from [OpenAI's GPT-6 Astra and GPT-6.1 Sol guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-6-astra-gpt-61-sol), checked September 30, 2026. OpenAI recommends Sol 6.1 for complex coding, computer use, and professional work when balancing quality and cost. Compare models on your own tasks; this positioning is not a measured improvement for your workload.
3
+ Use this reference when targeting `gpt-6.1-sol` or migrating from `gpt-6-sol`. Distilled from [OpenAI's GPT-6 Astra and GPT-6.1 Sol guide](https://developers.openai.com/api/docs/guides/prompt-guidance#gpt-61-sol), checked September 30, 2026; the Sol section was rechecked October 26, 2026. OpenAI describes Sol 6.1 as delivering near-Astra performance at a lower cost for complex coding, computer use, and professional work. Compare models on your own tasks; this positioning is not a measured improvement for your workload. For GPT-6.1 Terra, see [gpt_6_1_terra.md](gpt_6_1_terra.md).
4
4
 
5
5
  The source separates Sol 6.1 specifications and migration guidance from shared prompt templates. Those templates address behavior observed with Astra, not independently established Sol 6.1 behavior. Apply them only to failures you observe on Sol 6.1. The snippets below are adaptations, not verbatim OpenAI quotations.
6
6
 
@@ -59,7 +59,7 @@ Sol 6.1 tool calling requires the Responses API; Chat Completions supports reque
59
59
 
60
60
  The official guide also describes shared GPT-6 async tool calling, mid-turn steering, and changing reasoning effort while preserving the prompt cache. These require application support. Do not assume Atomic or another host implements each feature because a prompt names it. Check the relevant [async tool calling](https://developers.openai.com/api/docs/guides/async-tool-calling), [steering](https://developers.openai.com/api/docs/guides/steering), or [reasoning configuration](https://developers.openai.com/api/docs/guides/reasoning#change-reasoning-mid-conversation) contract before relying on it.
61
61
 
62
- For application migration details, consult the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-6-astra-migration-quickstart). It covers unsupported sampling and logprob parameters during reasoning, cache configuration changes, and feature compatibility. Those are host changes, not extra prompt instructions. Astra's monitoring and speed-availability descriptions are not Sol 6.1-specific prompting recommendations.
62
+ For application migration details, consult the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/prompt-guidance#update-api-and-model-parameters). It covers unsupported sampling and logprob parameters during reasoning, cache configuration changes, and feature compatibility. Those are host changes, not extra prompt instructions. Astra's monitoring and speed-availability descriptions are not Sol 6.1-specific prompting recommendations.
63
63
 
64
64
  ## Validate one adjustment
65
65
 
@@ -0,0 +1,77 @@
1
+ # GPT-6.1 Terra prompting and migration
2
+
3
+ Use this reference when targeting `gpt-6.1-terra` or migrating from GPT-5.6 Terra. Distilled from the GPT-6.1 Terra section and migration checklist of [OpenAI's GPT-6 guide](https://developers.openai.com/api/docs/guides/prompt-guidance#gpt-61-terra), the [model page](https://developers.openai.com/api/docs/models/gpt-6.1-terra), the [GPT-6.1 Terra announcement](https://openai.com/index/introducing-gpt-6-1-terra), and [A model guide for the GPT-6 family](https://openai.com/index/practical-guide-building-gpt-6/), all checked October 26, 2026.
4
+
5
+ The guide's shared prompt templates address behavior observed with GPT-6 Astra, not independently established Terra behavior. OpenAI gives no Terra-specific prompt wording. Apply the shared templates only to failures you observe on Terra. The snippets below are adaptations, not verbatim OpenAI quotations.
6
+
7
+ ## When to choose Terra
8
+
9
+ OpenAI positions Terra as a fast, efficient model for visual reasoning, precise computer use, and clear, natural writing. Its stated uses are matching product photos to catalog entries, comparing or interpreting technical drawings, acting on application screens, and drafting and revising text. The announcement also names high-volume automation, such as reading incoming invoices and entering their details into accounting software, and says GPT-6.1 Sol and GPT-6 Astra remain the better choice for the most complex coding tasks. Terra accepts text and image input and returns text.
10
+
11
+ This positioning is not a measured result for your workload. Compare Terra with the model you would otherwise use on representative inputs before routing work to it.
12
+
13
+ ## Start with the task contract
14
+
15
+ State the result, who it is for, the relevant context and constraints, and what counts as done. For visual work, name the inputs and what to compare them against. Begin with the prompt that already works, then change one prompt or configuration variable at a time.
16
+
17
+ ```text
18
+ Complete [requested outcome] using [images, screens, or documents provided].
19
+ Compare against [criteria or reference entries]. Stay within [scope].
20
+ Preserve [binding constraints] and stop before [actions requiring approval].
21
+ Return [required format], including [evidence and validation results].
22
+ If a required detail is not present or legible in the input, identify it
23
+ rather than inventing it.
24
+ ```
25
+
26
+ Replace the placeholders with the actual task. A request to read or extract does not authorize submitting forms, and a drafting request does not authorize sending the text.
27
+
28
+ ## Choosing reasoning effort
29
+
30
+ Terra supports `none`, `low`, `medium` (default), `high`, `xhigh`, and `max`. OpenAI's advice is to start with `medium` and increase effort only if the quality improvement is worth the added time and tokens. Unlike GPT-6 Astra and GPT-6.1 Sol, Terra supports `none`.
31
+
32
+ The family model guide maps effort to work type across GPT-6 models: `low` for routine tasks such as extracting facts or making small edits, `medium` for work requiring judgment such as planning or comparing options, `high` for difficult debugging, deeper analysis, or careful review, and `xhigh` or `max` to test when `high` falls short, kept only if the improvement justifies the time and cost. The sources do not describe how sensitive Terra is to effort, so measure it rather than assuming the Sol and Luna behavior in the [GPT-6 family reference](gpt_6.md#sol-and-luna-differences) applies.
33
+
34
+ Keep the prompt fixed while comparing efforts. Do not compensate for a lower effort by adding repeated instructions; that hides which change caused the result. A prompt cannot select effort; the application's request does.
35
+
36
+ ## When migrating from GPT-5.6 Terra
37
+
38
+ OpenAI's migration advice is specific: compare both models on representative images and workflows using the same reasoning effort. Preserve the current effective effort where Terra supports it. If the existing request uses `minimal`, start with `low` and compare representative tasks.
39
+
40
+ Run the unchanged prompt on both models first. Measure task success, answer correctness on your images, completion of screen workflows, tool behavior, latency, tokens, and cost per successful task. Change the prompt only for a regression you can point to, and retest after each change.
41
+
42
+ Two host changes are not prompt fixes. If the application calls tools through Chat Completions, move those requests to the Responses API; Terra supports Chat Completions only for requests without tools. When effort is not `none`, sampling and logprob parameters must be removed; see the source's [API and model parameters checklist](https://developers.openai.com/api/docs/guides/prompt-guidance#update-api-and-model-parameters).
43
+
44
+ ## Computer use and screen work
45
+
46
+ OpenAI points to the [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for acting on screens and the [image inputs guide](https://developers.openai.com/api/docs/guides/images-vision) for visual analysis. The family model guide, whose model and computer-use sections name Astra, Sol, and Luna but not Terra, recommends choosing the simplest reliable way to do each step: use an API or connected tool when it can do the job directly, and use computer use when the model needs to read a screen, click buttons, or fill in a form. It also recommends replacing blanket "always ask" rules with explicit boundaries for what can proceed independently.
47
+
48
+ ```text
49
+ For each step, use [API or connected tool] when it can complete the step
50
+ directly. Use the screen only to read information, click, or fill in fields
51
+ that no tool covers. You may [independent actions]. Before [submitting,
52
+ sending, purchasing, or deleting], stop and show what you will submit.
53
+ ```
54
+
55
+ Computer use requires the host to provide the tool and a harness that controls the browser or desktop. Naming it in a prompt does not enable it.
56
+
57
+ ## Writing and revision
58
+
59
+ For drafting and revision, the family model guide recommends describing what a useful response looks like, for example plain language, technical detail suited to the audience, and a short handoff covering what changed, what was checked, and what still needs attention. Name the audience, register, length, and the facts the text must keep. The sources do not say whether Terra shares Astra's tendency toward formatted, detailed answers; use the [writing-style templates](gpt_6.md#when-responses-are-too-formatted-or-too-long) only if you observe it.
60
+
61
+ ## When an Astra template addresses an observed failure
62
+
63
+ | Observed failure on your Terra task | Selective reference | Boundary to preserve |
64
+ | --- | --- | --- |
65
+ | Stops before completing authorized work, or asks non-blocking questions | [Initiative and follow-through](gpt_6.md#when-it-asks-before-doing-authorized-work) | Real approval gates, especially form submissions and external writes |
66
+ | A skill or repository instruction causes an unexplained pause | [Instruction following](gpt_6.md#when-skills-or-repo-instructions-change-behavior) | System, security, permission, and higher-priority repository rules |
67
+ | Answers are too detailed, formatted, or repetitive | [Writing style](gpt_6.md#when-responses-are-too-formatted-or-too-long) | Required fields, citations, evidence, and parser format |
68
+ | Useful independent work is not delegated | [Delegation](gpt_6.md#when-it-under-delegates-or-over-serializes-work) | Actual host capabilities, concurrency, cost, and file ownership |
69
+ | Small changes trigger repeated or unrelated verification | [Testing and verification](gpt_6.md#when-it-tests-too-broadly-or-repeats-checks) | Required project checks, safety checks, and user-requested validation |
70
+
71
+ Do not treat these as Terra tendencies merely because the templates are shared. Test the smallest applicable adjustment first.
72
+
73
+ Async tool calling, mid-turn steering, and changing effort with `configuration_update` are shared GPT-6 features that need application support. Check the [async tool calling](https://developers.openai.com/api/docs/guides/async-tool-calling), [steering](https://developers.openai.com/api/docs/guides/steering), or [reasoning configuration](https://developers.openai.com/api/docs/guides/reasoning#change-reasoning-mid-conversation) contract before relying on one. Fast mode and data-residency availability are deployment choices, not prompting recommendations.
74
+
75
+ ## Validate one adjustment
76
+
77
+ Use representative cases for your workload: an image-matching or extraction case with a known answer, a drawing or document comparison, a screen workflow that reaches an approval boundary, a drafting or revision task, an early-stop case, and a format-sensitive answer. Compare the unchanged baseline with one adjustment at the same effort. Verify correctness against the known answers, completed workflows, output validity, respected approval boundaries, and cost per successful task. Then compare effort separately if needed. Report checks that were not run; do not claim an improvement without observed results.
@@ -8,7 +8,7 @@ export type { RunJournalOption, RunJournalSettings } from "./durable/journal/res
8
8
  export { resolveRunJournal } from "./durable/journal/resolution.js";
9
9
  export { openSqlRunJournal, SqlRunJournal } from "./durable/journal/sqlite-run-journal.js";
10
10
  export * from "./durable/journal/types.js";
11
- export type { AgentSessionAdapter, CompleteAdapter, CompleteStageOpts, EffectiveBudget, GitWorktreeSetupOptions, GitWorktreeSetupResult, PromptAdapter, PromptOptions, ResolvedInputs, RunResult, RunStatus, StageAdapters, StageContext, StageExecutionMeta, StageMcpOptions, StageOptions, StageOutputOptions, StagePromptOptions, StageSendUserMessageOptions, StageSessionCreateOptions, StageSessionCreateResult, StageSessionEvent, StageSessionRuntime, StageSnapshot, StageStatus, StageUserMessageContent, StageUserMessageDelivery, ToolNodeSnapshot, WorkflowAction, WorkflowArtifact, WorkflowBudget, WorkflowChainOptions, WorkflowChildResult, WorkflowContextMode, WorkflowControlEvent, WorkflowCustomToolDefinition, WorkflowCustomUiComponent, WorkflowCustomUiFactory, WorkflowCustomUiKeybindings, WorkflowCustomUiOptions, WorkflowCustomUiOverlayHandle, WorkflowCustomUiOverlayOptions, WorkflowCustomUiTheme, WorkflowCustomUiTui, WorkflowDetails, WorkflowDetailsMode, WorkflowDetailsStatus, WorkflowExecutionMode, WorkflowExecutionPolicy, WorkflowExitOptions, WorkflowExitStatus, WorkflowInputBindings, WorkflowInputSchema, WorkflowInputSchemaMap, WorkflowInputValues, WorkflowIntercomSummary, WorkflowMaxOutput, WorkflowMcpPort, WorkflowModelAttempt, WorkflowModelCatalogPort, WorkflowModelFallbackFields, WorkflowModelInfo, WorkflowModelUsage, WorkflowModelValue, WorkflowOutputMode, WorkflowOutputSchema, WorkflowOutputSchemaMap, WorkflowOutputValues, WorkflowParallelFailure, WorkflowParallelOptions, WorkflowPersistencePort, WorkflowProgressSummary, WorkflowProviderRateLimit, WorkflowRunChildArgs, WorkflowRunChildOptions, WorkflowRunChildOptionsArgument, WorkflowRunOutput, WorkflowRuntimeConfig, WorkflowSerializableObject, WorkflowSerializablePrimitive, WorkflowSerializableValue, WorkflowSharedTaskDefaults, WorkflowTaskContext, WorkflowTaskContextInput, WorkflowTaskOptions, WorkflowTaskResult, WorkflowTaskSessionFields, WorkflowTaskSessionOptions, WorkflowTaskStep, WorkflowThinkingLevel, WorkflowToolContext, WorkflowToolError, WorkflowToolFailure, WorkflowToolOptions, WorkflowToolOutcome, WorkflowToolPrimitive, WorkflowToolReturnOptions, WorkflowToolSuccess, WorkflowToolThrowOptions, WorkflowUIAdapter, WorkflowUIContext, WorkflowWorktreeInputBinding, } from "./shared/authoring-contract.js";
11
+ export type { AgentSessionAdapter, CompleteAdapter, CompleteStageOpts, EffectiveBudget, GitWorktreeSetupOptions, GitWorktreeSetupResult, PromptAdapter, PromptOptions, ResolvedInputs, RunFailureClassification, RunResult, RunStatus, StageAdapters, StageContext, StageExecutionMeta, StageMcpOptions, StageOptions, StageOutputOptions, StagePromptOptions, StageSendUserMessageOptions, StageSessionCreateOptions, StageSessionCreateResult, StageSessionEvent, StageSessionRuntime, StageSnapshot, StageStatus, StageUserMessageContent, StageUserMessageDelivery, ToolNodeSnapshot, WorkflowAction, WorkflowArtifact, WorkflowBudget, WorkflowChainOptions, WorkflowChildResult, WorkflowContextMode, WorkflowControlEvent, WorkflowCustomToolDefinition, WorkflowCustomUiComponent, WorkflowCustomUiFactory, WorkflowCustomUiKeybindings, WorkflowCustomUiOptions, WorkflowCustomUiOverlayHandle, WorkflowCustomUiOverlayOptions, WorkflowCustomUiTheme, WorkflowCustomUiTui, WorkflowDetails, WorkflowDetailsMode, WorkflowDetailsStatus, WorkflowExecutionMode, WorkflowExecutionPolicy, WorkflowExitOptions, WorkflowExitStatus, WorkflowInputBindings, WorkflowInputSchema, WorkflowInputSchemaMap, WorkflowInputValues, WorkflowIntercomSummary, WorkflowMaxOutput, WorkflowMcpPort, WorkflowModelAttempt, WorkflowModelCatalogPort, WorkflowModelFallbackFields, WorkflowModelInfo, WorkflowModelUsage, WorkflowModelValue, WorkflowOutputMode, WorkflowOutputSchema, WorkflowOutputSchemaMap, WorkflowOutputValues, WorkflowParallelFailure, WorkflowParallelOptions, WorkflowPersistencePort, WorkflowProgressSummary, WorkflowProviderRateLimit, WorkflowRunChildArgs, WorkflowRunChildOptions, WorkflowRunChildOptionsArgument, WorkflowRunOutput, WorkflowRuntimeConfig, WorkflowSerializableObject, WorkflowSerializablePrimitive, WorkflowSerializableValue, WorkflowSharedTaskDefaults, WorkflowTaskContext, WorkflowTaskContextInput, WorkflowTaskOptions, WorkflowTaskResult, WorkflowTaskSessionFields, WorkflowTaskSessionOptions, WorkflowTaskStep, WorkflowThinkingLevel, WorkflowToolContext, WorkflowToolError, WorkflowToolFailure, WorkflowToolOptions, WorkflowToolOutcome, WorkflowToolPrimitive, WorkflowToolReturnOptions, WorkflowToolSuccess, WorkflowToolThrowOptions, WorkflowUIAdapter, WorkflowUIContext, WorkflowWorktreeInputBinding, } from "./shared/authoring-contract.js";
12
12
  import type * as AuthoringContract from "./shared/authoring-contract.js";
13
13
  import type { AuthoredWorkflowSpec as SharedAuthoredWorkflowSpec, WorkflowInputsFromSchemas, WorkflowOutputsFromSchemas, WorkflowProvidedInputsFromSchemas } from "./shared/workflow-authoring-types.js";
14
14
  export type { WorkflowInputsFromSchemas, WorkflowOutputsFromSchemas, WorkflowProvidedInputsFromSchemas, } from "./shared/workflow-authoring-types.js";
@@ -18,6 +18,8 @@ export declare function runJournalAppendMany(journal: RunJournal): RunJournalApp
18
18
  export type JournalAppendGuard = (tx: SqliteExecutor, runId: string) => Promise<void>;
19
19
  export interface SqlPoolStorage {
20
20
  transaction<T>(body: (tx: SqliteExecutor) => Promise<T>): Promise<T>;
21
+ /** Statements outside any transaction: they read the last commit without taking the shared write lock. */
22
+ read<T>(body: (executor: SqliteExecutor) => Promise<T>): Promise<T>;
21
23
  withAppendGuard<T>(guard: JournalAppendGuard, action: () => Promise<T>): Promise<T>;
22
24
  readonly tables: Readonly<{
23
25
  runs: string;