@jr2/orchestrator 0.4.1 → 0.6.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 (361) hide show
  1. package/README.md +20 -2
  2. package/console/components/app.ts +2 -0
  3. package/console/components/fleet.ts +14 -1
  4. package/console/components/machine-pane.ts +41 -2
  5. package/console/main.ts +13 -1
  6. package/console/store.ts +102 -6
  7. package/console/style.css +21 -0
  8. package/docs/agents-block.md +5 -0
  9. package/docs/concepts/agents-and-turns.md +478 -0
  10. package/docs/concepts/architecture.md +243 -0
  11. package/docs/concepts/charts.md +146 -0
  12. package/docs/concepts/composition.md +357 -0
  13. package/docs/concepts/converge.md +257 -0
  14. package/docs/concepts/durable-runs.md +189 -0
  15. package/docs/concepts/effects.md +658 -0
  16. package/docs/concepts/gates.md +208 -0
  17. package/docs/concepts/machines-and-workflows.md +298 -0
  18. package/docs/concepts/pools-and-sources.md +230 -0
  19. package/docs/concepts/secrets-and-trust.md +306 -0
  20. package/docs/concepts/the-menu.md +381 -0
  21. package/docs/concepts/workspaces.md +756 -0
  22. package/docs/get-started/a-model-decides.md +563 -0
  23. package/docs/get-started/an-agent-in-a-sandbox.md +383 -0
  24. package/docs/get-started/connect-a-model.md +248 -0
  25. package/docs/get-started/create-an-instance.md +194 -0
  26. package/docs/get-started/have-your-assistant-write-a-machine.md +993 -0
  27. package/docs/get-started/install.md +130 -0
  28. package/docs/guides/add-tools-to-the-sandbox.md +308 -0
  29. package/docs/guides/answer-a-gate.md +304 -0
  30. package/docs/guides/bind-open-parts.md +224 -0
  31. package/docs/guides/cancel-a-run.md +146 -0
  32. package/docs/guides/clean-up.md +206 -0
  33. package/docs/guides/cut-a-worktree.md +560 -0
  34. package/docs/guides/fix-a-failed-converge.md +361 -0
  35. package/docs/guides/give-the-cluster-git-credentials.md +222 -0
  36. package/docs/guides/iterate-on-a-machine-on-kind.md +190 -0
  37. package/docs/guides/let-an-agent-write-a-chart.md +230 -0
  38. package/docs/guides/look-inside-a-sandbox.md +177 -0
  39. package/docs/guides/mirror-the-kit-images.md +176 -0
  40. package/docs/guides/move-from-kind-to-a-shared-cluster.md +318 -0
  41. package/docs/guides/open-the-console.md +91 -0
  42. package/docs/guides/publish-a-machine-as-an-npm-package.md +350 -0
  43. package/docs/guides/push-and-sign-a-branch.md +532 -0
  44. package/docs/guides/run-a-chart-by-name.md +270 -0
  45. package/docs/guides/run-a-command-or-call-a-url.md +587 -0
  46. package/docs/guides/run-one-worker-per-item.md +322 -0
  47. package/docs/guides/set-an-agents-access-and-dials.md +420 -0
  48. package/docs/guides/size-a-workspace.md +217 -0
  49. package/docs/guides/start-a-run-from-a-run.md +237 -0
  50. package/docs/guides/start-a-run.md +207 -0
  51. package/docs/guides/upgrade-the-kit-version.md +240 -0
  52. package/docs/guides/use-a-hosted-provider.md +214 -0
  53. package/docs/guides/use-a-local-model.md +313 -0
  54. package/docs/guides/watch-a-run.md +349 -0
  55. package/docs/guides/write-a-workflow.md +318 -0
  56. package/docs/index.md +44 -0
  57. package/docs/llms.txt +237 -0
  58. package/docs/reference/authoring-surface/agent.md +151 -0
  59. package/docs/reference/authoring-surface/answer.md +156 -0
  60. package/docs/reference/authoring-surface/arg.md +82 -0
  61. package/docs/reference/authoring-surface/basic.md +62 -0
  62. package/docs/reference/authoring-surface/bearer.md +53 -0
  63. package/docs/reference/authoring-surface/branchname.md +15 -0
  64. package/docs/reference/authoring-surface/chartschema.md +23 -0
  65. package/docs/reference/authoring-surface/chartschemafor.md +48 -0
  66. package/docs/reference/authoring-surface/command.md +206 -0
  67. package/docs/reference/authoring-surface/customize.md +64 -0
  68. package/docs/reference/authoring-surface/defineconfig.md +41 -0
  69. package/docs/reference/authoring-surface/defineevent.md +114 -0
  70. package/docs/reference/authoring-surface/dispatch.md +126 -0
  71. package/docs/reference/authoring-surface/fail.md +96 -0
  72. package/docs/reference/authoring-surface/file.md +142 -0
  73. package/docs/reference/authoring-surface/frompick.md +277 -0
  74. package/docs/reference/authoring-surface/http.md +259 -0
  75. package/docs/reference/authoring-surface/isfailure.md +58 -0
  76. package/docs/reference/authoring-surface/isready.md +14 -0
  77. package/docs/reference/authoring-surface/jr2setup.md +237 -0
  78. package/docs/reference/authoring-surface/open.md +105 -0
  79. package/docs/reference/authoring-surface/openbody.md +86 -0
  80. package/docs/reference/authoring-surface/paramsof.md +143 -0
  81. package/docs/reference/authoring-surface/pool.md +186 -0
  82. package/docs/reference/authoring-surface/push.md +130 -0
  83. package/docs/reference/authoring-surface/readyof.md +21 -0
  84. package/docs/reference/authoring-surface/secret.md +139 -0
  85. package/docs/reference/authoring-surface/sentby.md +83 -0
  86. package/docs/reference/authoring-surface/source.md +51 -0
  87. package/docs/reference/authoring-surface/text.md +62 -0
  88. package/docs/reference/authoring-surface/type-agentdeclaration.md +27 -0
  89. package/docs/reference/authoring-surface/type-agentdefinition.md +80 -0
  90. package/docs/reference/authoring-surface/type-agentlogic.md +15 -0
  91. package/docs/reference/authoring-surface/type-agentslots.md +15 -0
  92. package/docs/reference/authoring-surface/type-answeraction.md +12 -0
  93. package/docs/reference/authoring-surface/type-anyframepath.md +14 -0
  94. package/docs/reference/authoring-surface/type-anyworktreepath.md +15 -0
  95. package/docs/reference/authoring-surface/type-arg.md +19 -0
  96. package/docs/reference/authoring-surface/type-argnames.md +12 -0
  97. package/docs/reference/authoring-surface/type-bindactors.md +14 -0
  98. package/docs/reference/authoring-surface/type-binding.md +61 -0
  99. package/docs/reference/authoring-surface/type-bindingof.md +12 -0
  100. package/docs/reference/authoring-surface/type-bodyacceptsdoor.md +15 -0
  101. package/docs/reference/authoring-surface/type-bodyacceptsslots.md +17 -0
  102. package/docs/reference/authoring-surface/type-ceilings.md +41 -0
  103. package/docs/reference/authoring-surface/type-chainlink.md +19 -0
  104. package/docs/reference/authoring-surface/type-chartaction.md +46 -0
  105. package/docs/reference/authoring-surface/type-chartagent.md +28 -0
  106. package/docs/reference/authoring-surface/type-chartevent.md +20 -0
  107. package/docs/reference/authoring-surface/type-chartguard.md +20 -0
  108. package/docs/reference/authoring-surface/type-chartinvoke.md +28 -0
  109. package/docs/reference/authoring-surface/type-chartjson.md +14 -0
  110. package/docs/reference/authoring-surface/type-chartstate.md +46 -0
  111. package/docs/reference/authoring-surface/type-charttext.md +40 -0
  112. package/docs/reference/authoring-surface/type-charttransition.md +22 -0
  113. package/docs/reference/authoring-surface/type-charttransitions.md +14 -0
  114. package/docs/reference/authoring-surface/type-chartvalue.md +15 -0
  115. package/docs/reference/authoring-surface/type-childat.md +12 -0
  116. package/docs/reference/authoring-surface/type-childslots.md +12 -0
  117. package/docs/reference/authoring-surface/type-commandenv.md +15 -0
  118. package/docs/reference/authoring-surface/type-commandinput.md +20 -0
  119. package/docs/reference/authoring-surface/type-commandoptions.md +56 -0
  120. package/docs/reference/authoring-surface/type-commandoutput.md +122 -0
  121. package/docs/reference/authoring-surface/type-customize.md +111 -0
  122. package/docs/reference/authoring-surface/type-dispatchdefinition.md +39 -0
  123. package/docs/reference/authoring-surface/type-dispatchinput.md +14 -0
  124. package/docs/reference/authoring-surface/type-dispatchopenparts.md +14 -0
  125. package/docs/reference/authoring-surface/type-dispatchoutput.md +72 -0
  126. package/docs/reference/authoring-surface/type-doorlessinput.md +19 -0
  127. package/docs/reference/authoring-surface/type-duration.md +15 -0
  128. package/docs/reference/authoring-surface/type-effectbinding.md +93 -0
  129. package/docs/reference/authoring-surface/type-effectlogic.md +12 -0
  130. package/docs/reference/authoring-surface/type-envopenparts.md +14 -0
  131. package/docs/reference/authoring-surface/type-eventaudience.md +27 -0
  132. package/docs/reference/authoring-surface/type-eventdef.md +45 -0
  133. package/docs/reference/authoring-surface/type-eventfrom.md +16 -0
  134. package/docs/reference/authoring-surface/type-eventsemantics.md +26 -0
  135. package/docs/reference/authoring-surface/type-execoutcome.md +34 -0
  136. package/docs/reference/authoring-surface/type-failslot.md +14 -0
  137. package/docs/reference/authoring-surface/type-failure.md +19 -0
  138. package/docs/reference/authoring-surface/type-failureinput.md +20 -0
  139. package/docs/reference/authoring-surface/type-filebody.md +37 -0
  140. package/docs/reference/authoring-surface/type-framepath.md +14 -0
  141. package/docs/reference/authoring-surface/type-frominput.md +14 -0
  142. package/docs/reference/authoring-surface/type-hostinjectedinput.md +56 -0
  143. package/docs/reference/authoring-surface/type-httpdefinition.md +104 -0
  144. package/docs/reference/authoring-surface/type-httpfileinput.md +20 -0
  145. package/docs/reference/authoring-surface/type-httpinput.md +12 -0
  146. package/docs/reference/authoring-surface/type-httpmethod.md +14 -0
  147. package/docs/reference/authoring-surface/type-httpopenparts.md +12 -0
  148. package/docs/reference/authoring-surface/type-httpoutput.md +95 -0
  149. package/docs/reference/authoring-surface/type-httprequestparts.md +33 -0
  150. package/docs/reference/authoring-surface/type-jr2config.md +126 -0
  151. package/docs/reference/authoring-surface/type-lateroutcome.md +21 -0
  152. package/docs/reference/authoring-surface/type-lends.md +38 -0
  153. package/docs/reference/authoring-surface/type-logicat.md +12 -0
  154. package/docs/reference/authoring-surface/type-markedif.md +12 -0
  155. package/docs/reference/authoring-surface/type-mergedactors.md +12 -0
  156. package/docs/reference/authoring-surface/type-namedsecret.md +25 -0
  157. package/docs/reference/authoring-surface/type-namestart.md +77 -0
  158. package/docs/reference/authoring-surface/type-noslotworkspaceoptions.md +27 -0
  159. package/docs/reference/authoring-surface/type-notworktreekeys.md +12 -0
  160. package/docs/reference/authoring-surface/type-openbodydeclaration.md +40 -0
  161. package/docs/reference/authoring-surface/type-openbodylogic.md +14 -0
  162. package/docs/reference/authoring-surface/type-openbodyoutput.md +42 -0
  163. package/docs/reference/authoring-surface/type-openbodyslot.md +18 -0
  164. package/docs/reference/authoring-surface/type-opencommandinput.md +22 -0
  165. package/docs/reference/authoring-surface/type-openeffect.md +12 -0
  166. package/docs/reference/authoring-surface/type-openeffectslots.md +12 -0
  167. package/docs/reference/authoring-surface/type-openof.md +12 -0
  168. package/docs/reference/authoring-surface/type-opensecret.md +23 -0
  169. package/docs/reference/authoring-surface/type-opensecretmark.md +12 -0
  170. package/docs/reference/authoring-surface/type-permissivenoslotworkspaceoptions.md +26 -0
  171. package/docs/reference/authoring-surface/type-permissiveworkspaceoptions.md +27 -0
  172. package/docs/reference/authoring-surface/type-poolmachine.md +28 -0
  173. package/docs/reference/authoring-surface/type-poolnextinput.md +22 -0
  174. package/docs/reference/authoring-surface/type-poolspec.md +60 -0
  175. package/docs/reference/authoring-surface/type-pushinput.md +34 -0
  176. package/docs/reference/authoring-surface/type-pushoptions.md +79 -0
  177. package/docs/reference/authoring-surface/type-pushoutput.md +149 -0
  178. package/docs/reference/authoring-surface/type-pushwireoutput.md +12 -0
  179. package/docs/reference/authoring-surface/type-quantity.md +14 -0
  180. package/docs/reference/authoring-surface/type-reached.md +12 -0
  181. package/docs/reference/authoring-surface/type-reposlot.md +70 -0
  182. package/docs/reference/authoring-surface/type-reposlotsof.md +16 -0
  183. package/docs/reference/authoring-surface/type-sandboxoptions.md +84 -0
  184. package/docs/reference/authoring-surface/type-secret.md +25 -0
  185. package/docs/reference/authoring-surface/type-sender.md +19 -0
  186. package/docs/reference/authoring-surface/type-sentbyguards.md +12 -0
  187. package/docs/reference/authoring-surface/type-size.md +85 -0
  188. package/docs/reference/authoring-surface/type-slothandles.md +24 -0
  189. package/docs/reference/authoring-surface/type-sourcenextresult.md +17 -0
  190. package/docs/reference/authoring-surface/type-sourcespec.md +44 -0
  191. package/docs/reference/authoring-surface/type-syncstate.md +12 -0
  192. package/docs/reference/authoring-surface/type-text.md +19 -0
  193. package/docs/reference/authoring-surface/type-textpart.md +24 -0
  194. package/docs/reference/authoring-surface/type-thinkinglevel.md +39 -0
  195. package/docs/reference/authoring-surface/type-toparameterizedobject.md +14 -0
  196. package/docs/reference/authoring-surface/type-toprovidedactor.md +14 -0
  197. package/docs/reference/authoring-surface/type-unknown.md +21 -0
  198. package/docs/reference/authoring-surface/type-usercontainer.md +77 -0
  199. package/docs/reference/authoring-surface/type-withoutemptyindex.md +20 -0
  200. package/docs/reference/authoring-surface/type-workflowevent.md +46 -0
  201. package/docs/reference/authoring-surface/type-workspaceaccess.md +16 -0
  202. package/docs/reference/authoring-surface/type-workspaced.md +115 -0
  203. package/docs/reference/authoring-surface/type-workspacehandles.md +22 -0
  204. package/docs/reference/authoring-surface/type-workspacemachine.md +29 -0
  205. package/docs/reference/authoring-surface/type-workspaceof.md +13 -0
  206. package/docs/reference/authoring-surface/type-workspaceoptions.md +27 -0
  207. package/docs/reference/authoring-surface/type-worktreefound.md +16 -0
  208. package/docs/reference/authoring-surface/type-worktreeinput.md +56 -0
  209. package/docs/reference/authoring-surface/type-worktreekey.md +14 -0
  210. package/docs/reference/authoring-surface/type-worktreeoptions.md +29 -0
  211. package/docs/reference/authoring-surface/type-worktreeoutput.md +45 -0
  212. package/docs/reference/authoring-surface/type-worktreepath.md +16 -0
  213. package/docs/reference/authoring-surface/type-worktreeready.md +37 -0
  214. package/docs/reference/authoring-surface/type-worktreerefused.md +21 -0
  215. package/docs/reference/authoring-surface/workspace.md +287 -0
  216. package/docs/reference/authoring-surface/worktree.md +71 -0
  217. package/docs/reference/authoring-surface.md +217 -0
  218. package/docs/reference/cli.md +433 -0
  219. package/docs/reference/config.md +765 -0
  220. package/docs/reference/decisions/0001-operator-owned-generic-sandbox.md +114 -0
  221. package/docs/reference/decisions/0002-duplex-streaming-actor.md +117 -0
  222. package/docs/reference/decisions/0004-worktree-provisioning-model.md +130 -0
  223. package/docs/reference/decisions/0005-sandbox-pod-composition.md +240 -0
  224. package/docs/reference/decisions/0006-agent-control-surface.md +50 -0
  225. package/docs/reference/decisions/0007-durable-machine-state.md +109 -0
  226. package/docs/reference/decisions/0008-orchestrator-as-deployed-app.md +60 -0
  227. package/docs/reference/decisions/0009-cli-and-instance-interface.md +275 -0
  228. package/docs/reference/decisions/0010-bdd-acceptance-tests.md +160 -0
  229. package/docs/reference/decisions/0011-workflow-defined-events.md +141 -0
  230. package/docs/reference/decisions/0012-workspace-wrapper-machine.md +103 -0
  231. package/docs/reference/decisions/0013-the-agent-reaches-its-machine-through-a-container-it-cannot-read.md +175 -0
  232. package/docs/reference/decisions/0014-observation-is-open-run-state-is-not.md +95 -0
  233. package/docs/reference/decisions/0015-authoring-surface-absorbs-the-mechanism.md +271 -0
  234. package/docs/reference/decisions/0016-agent-turn-mechanics-are-internal.md +126 -0
  235. package/docs/reference/decisions/0017-pool-over-a-source-port.md +71 -0
  236. package/docs/reference/decisions/0018-instance-agents-are-definitions-jr2-assembles-the-harness.md +111 -0
  237. package/docs/reference/decisions/0019-one-converging-command-against-the-current-context.md +287 -0
  238. package/docs/reference/decisions/0020-private-ca-trust-is-a-named-concept.md +60 -0
  239. package/docs/reference/decisions/0021-workspace-continuity-is-a-lease-that-answers-back.md +101 -0
  240. package/docs/reference/decisions/0022-observation-is-a-level-triggered-feed.md +103 -0
  241. package/docs/reference/decisions/0023-the-harness-prints-the-conversation.md +175 -0
  242. package/docs/reference/decisions/0024-an-agents-turn-ends-with-the-state-that-asked-for-it.md +436 -0
  243. package/docs/reference/decisions/0025-cancel-ends-a-run-stop-parks-it.md +65 -0
  244. package/docs/reference/decisions/0026-a-turn-that-is-over-is-never-prompted.md +62 -0
  245. package/docs/reference/decisions/0027-the-harness-is-jr2s-own-server-flue-retires-the-wire-stays.md +245 -0
  246. package/docs/reference/decisions/0028-what-an-agent-may-do-to-the-workspace-is-part-of-its-definition.md +90 -0
  247. package/docs/reference/decisions/0029-a-menu-is-fixed-for-a-conversation-and-a-turn-is-told-its-allowed-picks.md +154 -0
  248. package/docs/reference/decisions/0030-a-snapshot-names-the-machine-it-was-written-under.md +100 -0
  249. package/docs/reference/decisions/0031-menu-only-agents-run-on-the-instance-harness.md +193 -0
  250. package/docs/reference/decisions/0032-the-console-unlocks-with-the-instance-token.md +61 -0
  251. package/docs/reference/decisions/0033-a-machine-declares-the-input-that-starts-it.md +126 -0
  252. package/docs/reference/decisions/0034-the-console-renders-with-preact-and-the-server-erases-the-types.md +57 -0
  253. package/docs/reference/decisions/0035-a-runaway-turn-is-ended-rerolled-once-then-a-fault.md +92 -0
  254. package/docs/reference/decisions/0036-a-turn-compacts-its-own-context-mid-flight.md +138 -0
  255. package/docs/reference/decisions/0037-an-instance-builds-its-sandbox-images-jr2-injects-the-harness.md +196 -0
  256. package/docs/reference/decisions/0038-jr2-up-builds-every-image-it-deploys.md +170 -0
  257. package/docs/reference/decisions/0039-image-garbage-collects-by-reachability.md +115 -0
  258. package/docs/reference/decisions/0041-a-build-the-host-already-holds-is-not-spent-again.md +64 -0
  259. package/docs/reference/decisions/0042-ready-is-not-routable-an-admission-retries-its-connection.md +142 -0
  260. package/docs/reference/decisions/0043-the-kit-is-tested-as-installed-a-local-registry-stands-in-for-npm.md +170 -0
  261. package/docs/reference/decisions/0044-kit-images-live-at-a-canonical-home-a-self-host-mirrors-it.md +85 -0
  262. package/docs/reference/decisions/0045-the-platform-joins-the-image-address-and-the-cluster-chooses-it.md +82 -0
  263. package/docs/reference/decisions/0046-a-converge-failure-carries-its-diagnosis.md +34 -0
  264. package/docs/reference/decisions/0047-the-git-ssh-key-source-is-the-users-choice.md +47 -0
  265. package/docs/reference/decisions/0048-the-orchestrator-boots-without-its-repos.md +36 -0
  266. package/docs/reference/decisions/0049-a-machine-carries-its-parts-and-composes-by-invoke.md +126 -0
  267. package/docs/reference/decisions/0050-what-code-names-config-declares-what-the-cli-names-discovery-finds.md +73 -0
  268. package/docs/reference/decisions/0051-a-repo-is-a-slot-on-the-workspace-and-a-cache-on-the-node.md +238 -0
  269. package/docs/reference/decisions/0052-a-sandbox-lands-where-an-ordinary-pod-lands-and-the-cache-follows-it.md +86 -0
  270. package/docs/reference/decisions/0053-a-fetch-inside-the-pod-asks-the-node-cache-and-the-cache-asks-the-remote.md +123 -0
  271. package/docs/reference/decisions/0054-the-kit-ships-machines-and-a-shipped-machine-leaves-its-parts-open.md +126 -0
  272. package/docs/reference/decisions/0055-a-release-is-a-pushed-tag-and-the-publish-guard-is-the-credential.md +107 -0
  273. package/docs/reference/decisions/0056-a-global-jr2-hands-off-to-the-instances-own-and-an-instance-has-one-kit-version.md +62 -0
  274. package/docs/reference/decisions/0057-a-turn-is-its-frame-its-dials-and-whether-it-continues.md +152 -0
  275. package/docs/reference/decisions/0058-a-harness-answers-the-orchestrator-alone.md +108 -0
  276. package/docs/reference/decisions/0059-a-harness-holds-stand-ins-and-the-custodian-holds-the-keys.md +427 -0
  277. package/docs/reference/decisions/0060-a-workspace-states-its-size-and-jr2-reserves-all-of-it.md +111 -0
  278. package/docs/reference/decisions/0061-a-memory-kill-ends-the-agents-processes-not-the-harness.md +83 -0
  279. package/docs/reference/decisions/0062-jr2-briefs-the-agent-on-its-seat-never-on-its-task.md +239 -0
  280. package/docs/reference/decisions/0063-the-orchestrator-watches-the-cluster.md +82 -0
  281. package/docs/reference/decisions/0064-a-workspace-waits-for-capacity.md +79 -0
  282. package/docs/reference/decisions/0065-a-persist-survives-a-crash-and-history-is-a-week.md +65 -0
  283. package/docs/reference/decisions/0066-a-model-tier-runs-a-real-model-and-a-change-to-what-it-reads-runs-the-tier.md +552 -0
  284. package/docs/reference/decisions/0067-an-effect-is-an-actor-slot-and-runs-at-most-once-unless-marked-idempotent.md +458 -0
  285. package/docs/reference/decisions/0068-an-effector-holds-an-effects-secrets-and-signs-its-wire.md +475 -0
  286. package/docs/reference/decisions/0069-the-orchestrator-is-a-kit-image-and-an-instance-publishes-its-assembly.md +180 -0
  287. package/docs/reference/decisions/0070-a-machine-lends-its-parts-to-a-chart.md +334 -0
  288. package/docs/reference/decisions/0071-a-run-starts-a-run-through-a-dispatch-effect.md +183 -0
  289. package/docs/reference/decisions/0072-the-docs-ship-inside-the-kit-and-an-instances-agents-md-indexes-them.md +144 -0
  290. package/docs/reference/decisions/0073-a-machine-fails-a-run-with-fail-and-an-uncaught-failure-ends-it-failed.md +122 -0
  291. package/docs/reference/decisions/0074-an-unrouted-mechanism-event-is-refused-at-load-and-faults-the-run.md +76 -0
  292. package/docs/reference/decisions/0075-a-machine-cuts-a-worktree-and-the-workspace-only-clones.md +295 -0
  293. package/docs/reference/decisions/0076-an-agents-control-credential-lives-only-where-no-workspace-code-runs.md +320 -0
  294. package/docs/reference/decisions/0077-jr2-requires-landlock-on-every-sandbox-node.md +79 -0
  295. package/docs/reference/decisions.md +86 -0
  296. package/docs/reference/glossary.md +687 -0
  297. package/docs/reference/http-api.md +1386 -0
  298. package/docs/reference/machines.md +189 -0
  299. package/docs/reference/mechanism-events.md +72 -0
  300. package/docs/why.md +207 -0
  301. package/package.json +5 -3
  302. package/src/actor.ts +694 -106
  303. package/src/agent.ts +114 -38
  304. package/src/ambient.ts +3 -4
  305. package/src/assembly-checks.ts +189 -7
  306. package/src/cause.ts +234 -0
  307. package/src/chart.ts +345 -46
  308. package/src/charts.ts +43 -8
  309. package/src/config.ts +440 -178
  310. package/src/custodian.lua +17 -5
  311. package/src/custodian.ts +325 -99
  312. package/src/customize.ts +199 -49
  313. package/src/dispatch-effect.ts +945 -0
  314. package/src/door-compat.ts +217 -0
  315. package/src/durability.ts +11 -4
  316. package/src/effect-checks.ts +50 -3
  317. package/src/effect.ts +641 -128
  318. package/src/effector-wire.ts +165 -13
  319. package/src/fail.ts +222 -0
  320. package/src/harness-client.ts +587 -50
  321. package/src/harness-env.ts +33 -0
  322. package/src/held-secrets.ts +125 -16
  323. package/src/holds.ts +3 -0
  324. package/src/http-effect.ts +556 -58
  325. package/src/http.ts +480 -30
  326. package/src/index.ts +74 -82
  327. package/src/instance.ts +68 -8
  328. package/src/internal.ts +85 -0
  329. package/src/kube-client.ts +6 -3
  330. package/src/machine-doc.ts +24 -7
  331. package/src/mechanism-routes.ts +168 -0
  332. package/src/model-keys.generated.ts +53 -0
  333. package/src/model-keys.ts +42 -58
  334. package/src/names.ts +19 -6
  335. package/src/notices.ts +483 -41
  336. package/src/open-body.ts +242 -40
  337. package/src/open-effect.ts +81 -8
  338. package/src/open.ts +90 -6
  339. package/src/parts.ts +213 -30
  340. package/src/party.ts +101 -2
  341. package/src/pick.ts +497 -11
  342. package/src/pool.ts +282 -50
  343. package/src/registration.ts +133 -12
  344. package/src/repo-identity.ts +7 -3
  345. package/src/repos.ts +22 -3
  346. package/src/run-host.ts +665 -45
  347. package/src/run-output.ts +38 -0
  348. package/src/sandbox-effect.ts +457 -71
  349. package/src/sandbox-kube.ts +66 -17
  350. package/src/secret-placement.ts +59 -17
  351. package/src/server.ts +3 -0
  352. package/src/setup.ts +325 -62
  353. package/src/size.ts +121 -9
  354. package/src/snapshot-store.ts +54 -10
  355. package/src/stub-harness.ts +44 -16
  356. package/src/timers.ts +14 -1
  357. package/src/tokens.ts +107 -32
  358. package/src/vocabulary.ts +88 -14
  359. package/src/wire.ts +100 -26
  360. package/src/workspace.ts +771 -238
  361. package/src/worktree.ts +249 -0
@@ -0,0 +1,687 @@
1
+ ---
2
+ title: Glossary
3
+ description: "The terms of jr2: what each one means, and the words to avoid."
4
+ ---
5
+
6
+ # Glossary
7
+
8
+ A kit of composable pieces that a user assembles into an xstate Machine for any agentic workflow, coding or otherwise.
9
+ Agents that use a Workspace work in isolated Sandboxes, and an Orchestrator that runs the Machine coordinates them.
10
+
11
+ ## Language
12
+
13
+ ### Instance and distribution
14
+
15
+ <a id="instance"></a>
16
+
17
+ **Instance**:
18
+ A user-owned folder, made by `jr2 init`, that holds its Workflows and the deployment facts that a Machine cannot carry,
19
+ such as reach and credentials. This folder is the deployed Orchestrator, and it is a deployment assembly, not a unit to
20
+ share: reusable work is published as packages.
21
+ _Avoid_: workspace (collides with Workspace), project
22
+
23
+ <a id="jr2-cli"></a>
24
+
25
+ **jr2 CLI**:
26
+ The `jr2` binary: the primary interface to an Instance, on top of the Orchestrator's API. It is installed globally and
27
+ also in each Instance; inside an Instance, a Handoff makes the Instance's own copy the one that runs.
28
+ _Avoid_: cli tool, launcher (the global copy is the same package)
29
+
30
+ <a id="handoff"></a>
31
+
32
+ **Handoff**:
33
+ The passing of a command, unchanged, from a global jr2 CLI to the Instance's own copy when the Instance holds a
34
+ different copy; the global copy then does nothing else. Outside an Instance, or when the Instance holds the same copy,
35
+ there is no Handoff.
36
+ _Avoid_: shim, proxy, wrapper, delegate, relaunch, re-exec
37
+
38
+ <a id="kit-version"></a>
39
+
40
+ **Kit version**:
41
+ The one version an Instance is: the version of the Orchestrator package that the Instance pins, which is the tag of
42
+ every Kit image it deploys, the Orchestrator's own included. The jr2 CLI that runs and the Assembly it publishes must
43
+ use that same version; two copies in one Instance are not a version but a refusal.
44
+ _Avoid_: CLI version, orchestrator version, kit release (when meaning the Instance's pin)
45
+
46
+ <a id="assembly"></a>
47
+
48
+ **Assembly**:
49
+ The Instance's Workflows, its config and what they import, as the one unit that the Orchestrator loads: what `jr2 up`
50
+ publishes to a running Orchestrator, and what a run holds for its life. The Orchestrator keeps the current Assembly,
51
+ every Assembly that a live run holds, and the one its `current` pointer names, and collects the rest.
52
+ _Avoid_: program (an executable), bundle (the staging mechanism), build, release, generation
53
+
54
+ <a id="jr2-application"></a>
55
+
56
+ **jr2 Application**:
57
+ An Instance under GitOps, whose manifests deploy the Orchestrator with its config and secrets. The same folder runs on
58
+ a local cluster and on a real cluster.
59
+ _Avoid_: deployment
60
+
61
+ <a id="assistant"></a>
62
+
63
+ **Assistant**:
64
+ The AI product that works for its user in an Instance folder, on the host and outside any cluster and any run: it
65
+ writes Machines, config and Sandbox Images from the docs that its Kit version bundles. It is never an Agent: an Agent
66
+ works inside a run, and an Assistant never does.
67
+ _Avoid_: agent (unqualified), coding agent (a `coder` Agent codes too), copilot, AI (unqualified)
68
+
69
+ <a id="console"></a>
70
+
71
+ **Console**:
72
+ The browser surface that the Orchestrator serves, where a person sees the Workflows, their runs and their Machines.
73
+ Observation needs no token; the Instance token unlocks control, so that a person can start runs and see and answer the
74
+ open Gates.
75
+ _Avoid_: visualizer (only one panel of it), dashboard, UI (unqualified), viz
76
+
77
+ <a id="kit-image"></a>
78
+
79
+ **Kit image**:
80
+ An image that jr2 owns and builds, and that an Instance deploys but never authors. Kit images are the kit's second
81
+ channel of distribution, beside its packages, and they are released together with the packages, at one version.
82
+ _Avoid_: system image, base image, jr2 image (ambiguous with a Sandbox Image), instance image (retired: the
83
+ Orchestrator is a Kit image, and an Instance publishes an Assembly)
84
+
85
+ <a id="pinned-image"></a>
86
+
87
+ **Pinned image**:
88
+ An image that an Instance deploys but that jr2 neither owns nor builds. The kit names its exact bytes, so one Kit
89
+ version always deploys the same image.
90
+ _Avoid_: kit image (it is not jr2-owned), vendored image, third-party image, base image
91
+
92
+ ### Machines and authoring
93
+
94
+ <a id="machine"></a>
95
+
96
+ **Machine**:
97
+ The xstate state machine that defines the control flow of a workflow. It is the unit that a user writes.
98
+ _Avoid_: workflow, graph
99
+
100
+ <a id="workflow"></a>
101
+
102
+ **Workflow**:
103
+ A Machine or a Chart registered under a name in an Instance: the unit that the Orchestrator runs and that `jr2 run`
104
+ names, from one of three origins, a Machine in the Assembly, a Chart file in the Assembly, or a Chart published at run time; a named Chart is a child of its Chart wrapper, named `<wrapper>/<name>`. A Workflow is only that name, because the Machine carries all its parts, so the kit ships Machines and never
105
+ Workflows.
106
+ _Avoid_: app, pipeline
107
+
108
+ <a id="authoring-surface"></a>
109
+
110
+ **Authoring surface**:
111
+ The names that an author writes in a Workflow's module or in an Instance's config, and nothing else. What the kit's own
112
+ packages share with each other is internal, and the Machines that the kit ships are not part of it.
113
+ _Avoid_: public API (the CLI and the HTTP API are public too), SDK, authoring API
114
+
115
+ <a id="orchestrator"></a>
116
+
117
+ **Orchestrator**:
118
+ The runtime that runs Machines, as the single writer of their run snapshots. Single means one writer, not one Workflow
119
+ per process: one Orchestrator hosts many Workflows and many runs.
120
+ _Avoid_: runner, engine (the loop in a Harness that runs a model)
121
+
122
+ <a id="run-status"></a>
123
+
124
+ **Run status**:
125
+ How a run of a Workflow stands, as the Orchestrator records it: `live` while it runs, then one of six ends. `done`: the
126
+ Machine got to a final state; `failed`: a Failure that no state caught ended it; `error`: the run faulted on an error or
127
+ a mechanism event that no state of the Machine handled; `cancelled`: a person ended it; `lost`: what it held in the
128
+ cluster went away under it while no Orchestrator hosted it; `drifted`: jr2 keeps it but never resumes it, because of
129
+ drift.
130
+ _Avoid_: outcome (an Effect's output), result, state (the Machine's), settlement (a Submission's), stopped (xstate's)
131
+
132
+ <a id="failure"></a>
133
+
134
+ **Failure**:
135
+ The end that a Machine chooses for work that did not succeed, with a reason for a person. It goes up from the state that
136
+ fails, through each parent Machine, until a state catches it; when none does, the run ends `failed`. It is not a fault:
137
+ a fault is the end that nobody chose.
138
+ _Avoid_: abort and aborted (a Settlement's and the wire's), fault and error (a defect's), exception, throw, rejection
139
+
140
+ <a id="actor"></a>
141
+
142
+ **Actor**:
143
+ An xstate actor in a Machine that drives a remote worker through a Harness: a local handle in the Orchestrator for work
144
+ that occurs remotely. An Agent is an Actor in a named slot.
145
+ _Avoid_: agent actor
146
+
147
+ <a id="agent"></a>
148
+
149
+ **Agent**:
150
+ A configured worker, such as a coder or a reviewer: a model, instructions, Working tools and access to the Workspace.
151
+ It is a data definition that a Machine carries in a named Actor slot, so its name is the slot's name and its scope is
152
+ that Machine; a Turn can set its Dials but never its identity.
153
+ _Avoid_: role, persona, roster entry
154
+
155
+ <a id="dials"></a>
156
+
157
+ **Dials**:
158
+ The two fields of an Agent's definition that a Machine state can set for one Turn: the model and the thinking level,
159
+ which tell how hard to run and not who runs. All other fields are identity, which only the definition sets; what a Turn
160
+ is about and where it works is its Frame, not a Dial.
161
+ _Avoid_: options, overrides, settings
162
+
163
+ <a id="frame"></a>
164
+
165
+ **Frame**:
166
+ What a Machine state sets for one Turn that is neither identity nor a Dial: the prompt, and the root directory of the
167
+ Working tools. It belongs to the Turn and not to the definition, because a Worktree exists only after its run starts,
168
+ so no definition can name it.
169
+ _Avoid_: overrides, input (unqualified), working directory (the mechanism, not the concept)
170
+
171
+ <a id="turn-placement"></a>
172
+
173
+ **Turn Placement**:
174
+ The mechanism half of a Turn, stated instead of resolved: where its Harness is and which Sandbox can deliver its picks.
175
+ It is not an authoring surface: in a real run, an Agent in a Sandbox gets it from its Workspace and an Agent with no
176
+ access to the Workspace goes to the Instance Harness, so only a test tier with no Workspace states it.
177
+ _Avoid_: coordinates, connection, transport
178
+
179
+ <a id="vocabulary"></a>
180
+
181
+ **Vocabulary**:
182
+ The workflow events that a Machine accepts, each with a name, a payload schema and an optional audience, scoped to that
183
+ Machine alone: a nested Machine keeps its own. It is the set that a Gate's accepted events and an Agent's Menu come
184
+ from, and the set that each delivery is validated against.
185
+ _Avoid_: events (unqualified), event manifest (the retired module export), schema
186
+
187
+ <a id="writing"></a>
188
+
189
+ **writing**:
190
+ The transitions that one state writes for one event name; one name can have several writings, on one path or on
191
+ different paths. A writing belongs to the party that its state, or the nearest state above it, invokes, and at the root
192
+ it belongs to both parties.
193
+
194
+ <a id="machine-shape"></a>
195
+
196
+ **Machine shape**:
197
+ The facts about a Machine that decide whether it can still read a persisted snapshot: its states, invokes and
198
+ transition targets, but not what its guards and actions do. A mismatch between a snapshot and its Machine's shape is
199
+ **drift**, as is an Assembly the run holds that the Orchestrator can no longer read (lost from the volume, published
200
+ for another Kit version, or failing to load); jr2 keeps a run with drift but never resumes it.
201
+ _Avoid_: version (a content address, not an ordering), schema
202
+
203
+ <a id="gate"></a>
204
+
205
+ **Gate**:
206
+ A pending external input on a run, from a human or any outside system (a webhook, CI), that lives while the state that
207
+ invokes it is active. It is an addressable resource with its own accepted events, because concurrent children park at
208
+ the same time and a caller acts on one specific decision.
209
+ _Avoid_: humanGate (humans are one caller among many), approval (one possible event, not the resource)
210
+
211
+ <a id="sender"></a>
212
+
213
+ **Sender**:
214
+ The party that delivered an event: an Agent or a Gate. Only the Orchestrator writes the Sender, on each event that a
215
+ party delivers, and the Machine's own events have none.
216
+ _Avoid_: origin, Caller (the holder of the credential behind a Gate's answer)
217
+
218
+ <a id="caller"></a>
219
+
220
+ **Caller**:
221
+ The holder of a credential that acts on an Instance from outside its Machines, such as a person, a CI job or a bridge
222
+ to a chat service: it starts a run, answers a Gate or cancels a run. A Caller can act **on behalf of** another party,
223
+ but that is the Caller's claim, which jr2 does not check.
224
+ _Avoid_: principal (it brings policies and roles that an Instance does not have), user (a CI job is a Caller), actor
225
+ (xstate's word), Sender (a party inside the run)
226
+
227
+ <a id="emit"></a>
228
+
229
+ **Emit**:
230
+ A message of progress or notice that a Machine's author sends from it to whoever watches the run, beside its
231
+ automatic status. It is never control: nothing consumes an Emit, and an Emit cannot drive a Machine.
232
+ _Avoid_: event (what a Gate or an Agent delivers), log (not a diagnostic)
233
+
234
+ <a id="effect"></a>
235
+
236
+ **Effect**:
237
+ Work that a Machine does outside itself: it runs a command, calls a URL, pushes a branch or starts a run. A run that
238
+ an Effect started is **dispatched by** the run that started it, and the two are independent: an in-run child is a
239
+ nested Machine, never a dispatched run.
240
+ _Avoid_: action (xstate's word), side effect, job, task, step, operation, errand, tool; sub-run, child run, nested run,
241
+ spawned run (a dispatched run is a run of its own)
242
+
243
+ <a id="open"></a>
244
+
245
+ **Open**:
246
+ A part that a Machine declares but does not bind, so that its composer binds it: for example, a Repo Slot with no url,
247
+ an Agent with no model, or an Effect with no url, program or secret. It is the shape that a packaged Machine ships in,
248
+ `jr2 up` refuses an Open part that nobody bound, and a run never sees one, except an Open body, which a run binds.
249
+ _Avoid_: unset, default (an Open part has none), placeholder
250
+
251
+ <a id="open-body"></a>
252
+
253
+ **Open body**:
254
+ A body slot that a Machine declares and leaves for a run to bind with a Chart, stating the parts it lends, the Agents a
255
+ Chart may define, and the ceilings it sets. It is the one Open part that a run binds, and nothing a Chart names resolves
256
+ anywhere else.
257
+ _Avoid_: wrapper (any Machine with a body slot; the Chart wrapper is the one that declares an Open body), host,
258
+ template, sandbox
259
+
260
+ <a id="chart-wrapper"></a>
261
+
262
+ **Chart wrapper**:
263
+ A Machine that declares an Open body: the Workflow a Chart runs under, which lends the Chart its parts, allows its
264
+ Agents and sets its ceilings. A Chart never runs on its own.
265
+ _Avoid_: wrapper (unqualified: any Machine with a body slot, `workspace()` and `pool()` included), host, jig, chassis,
266
+ template, scaffold, fixture
267
+
268
+ <a id="chart"></a>
269
+
270
+ **Chart**:
271
+ A Machine written as data alone, with no code of its own, that a run supplies to bind an Open body. Its author is an
272
+ Agent whose pick carries it; a Chart kept under a name is the same text, kept. Its states, transitions, events and
273
+ Agents are its own; every other part is one that the Open body lends it, named by its slot. It carries no url and names
274
+ no Turn's placement: the Open body places the Turns its Chart starts.
275
+ _Avoid_: dynamic workflow (a Chart under a name IS a Workflow), plan, script, template, body (the slot, not what fills it)
276
+
277
+ <a id="reference"></a>
278
+
279
+ **Reference**:
280
+ A path lookup a Chart writes in place of data, `{{context.ticket.title}}` or `{ "$ref": "event.summary" }`, that jr2
281
+ resolves on the run's context, event or input at invoke time. A path walk and nothing else: no operator, no call.
282
+ _Avoid_: template, expression, interpolation, variable, placeholder (the `{{ }}` spelling of a reference, not the thing)
283
+
284
+ ### Turns and conversations
285
+
286
+ <a id="turn"></a>
287
+
288
+ **Turn**:
289
+ One Agent's answer to the Frame that a Machine state set for it: the prompt, the work, and the pick that ends it. It
290
+ belongs to the state that asked for it and ends when that state stops waiting; it rides on a Submission but is not one.
291
+ _Avoid_: session (a conversation spans Turns), generation, request
292
+
293
+ <a id="instance-id"></a>
294
+
295
+ **Instance ID**:
296
+ The identifier of one Agent's conversation, which jr2 computes and no author names. A Turn gets a fresh one unless it
297
+ continues, and one Agent has one continued conversation per Machine instance, which every state of that Machine may
298
+ continue until jr2 faults that conversation.
299
+ _Avoid_: conversation id, session id, conversation pin, scope
300
+
301
+ <a id="turn-id"></a>
302
+
303
+ **Turn ID**:
304
+ The identifier of one Turn, which jr2 mints through its input mapper when a Machine state invokes the Agent and no
305
+ author names. Two Turns that
306
+ continue one conversation share an Instance ID and never a Turn ID, so a restore can tell which Turn an admission
307
+ belongs to.
308
+ _Avoid_: invocation id, run id (a run is a Machine instance), submission id (a Turn can ride several Submissions)
309
+
310
+ <a id="submission"></a>
311
+
312
+ **Submission**:
313
+ One admitted prompt on a conversation: the Harness's unit of work. A Turn rides on a Submission, and a conversation,
314
+ which an Instance ID names, spans many Submissions.
315
+ _Avoid_: request, job
316
+
317
+ <a id="admission"></a>
318
+
319
+ **Admission**:
320
+ The Harness's acceptance of a Submission, which the Orchestrator keeps as the coordinate it re-attaches by after a
321
+ restart.
322
+ _Avoid_: handle, ticket
323
+
324
+ <a id="settlement"></a>
325
+
326
+ **Settlement**:
327
+ How a Submission ends. It is one of four: completed, ended, failed or aborted. Completed: its run returned, and its
328
+ Turn is still open. Failed: the Harness could not run it to its end, as on a provider error, a Runaway or a restart
329
+ of the Harness. Ended: the Turn's own pick ended the Turn, from this Submission or from an earlier one of the same
330
+ Turn. Aborted: something else ended the Turn, or it was over before it started. The Orchestrator judges how a Turn
331
+ ended, and the Turn's sweep says it. It is what the history view reports for each Submission.
332
+ _Avoid_: result, status
333
+
334
+ <a id="sweep"></a>
335
+
336
+ **Sweep**:
337
+ The Turn's sweep: the Orchestrator's end of an Agent's Submissions when the state that asked for the Turn stops
338
+ waiting. It settles the running Submission and every one queued behind it. It says how the Turn ended: by the Turn's
339
+ own pick, or by something else. Two other sweeps are not this one: the image sweep of `jr2 up` (ADR-0039,
340
+ "swept N image(s)"), and the Repo sweep of `jr2 gc` (ADR-0051).
341
+ _Avoid_: abort (the wire's route, not the act), cancel (the end of a run)
342
+
343
+ <a id="runaway"></a>
344
+
345
+ **Runaway**:
346
+ A Turn that will not end on its own, which the Harness ends when the Turn runs past the point where jr2 stops believing
347
+ it will end. It is a fault class, named for what jr2 observed and not for what the model did.
348
+ _Avoid_: degeneration (the model behavior, not the fault class), loop, hang, stall
349
+
350
+ <a id="step"></a>
351
+
352
+ **step**:
353
+ One tool call of a model answer that the engine starts while a Turn is live, whether or not it runs: a call of a
354
+ Working tool or a pick, a call of an unknown tool or with invalid arguments, a pick that the Harness blocks as the
355
+ second pick of its model answer, each call of a model answer that hit the output limit, and the call that trips the
356
+ Runaway watch. A call after a pick that ended the Turn is not a step. The Harness counts steps to find a Runaway. A
357
+ **step boundary** is the point after a model answer and the results of all its calls, and before the next model
358
+ request; there the Harness can restate the Turn part.
359
+ _Avoid_: turn (a Turn is the Agent's whole answer to its Frame), round, iteration, request
360
+
361
+ <a id="compaction"></a>
362
+
363
+ **Compaction**:
364
+ The cut that the Harness makes in a conversation's model context during a Turn: a summary plus a retained tail replaces
365
+ the earlier context. jr2 alone decides when it occurs, and it changes what the model sees, never what jr2
366
+ recorded.
367
+ _Avoid_: summarization (one part of a Compaction), truncation (the failure that Compaction prevents), pruning
368
+
369
+ <a id="menu"></a>
370
+
371
+ **Menu**:
372
+ The workflow events that an Agent can ever be offered in its Machine, which do not change for the life of a
373
+ conversation. It is what the Agent may say, as its Working tools are what it may do; the part that one Turn may pick now
374
+ is its Allowed picks.
375
+ _Avoid_: tools (unqualified), tool list
376
+
377
+ <a id="allowed-picks"></a>
378
+
379
+ **Allowed picks**:
380
+ The part of the Menu that one Turn may pick now: the picks that the live Machine would accept from this Agent at this
381
+ moment. They follow the active mode and the guards, and they are empty while the invoking state is not at Rest.
382
+ _Avoid_: menu (the fixed set), open picks, active tools, legal moves
383
+
384
+ <a id="mode"></a>
385
+
386
+ **mode**:
387
+ A child state of an Agent's state that invokes nothing. The Agent is at Rest there, with a different set of Allowed
388
+ picks.
389
+ _Avoid_: substate, phase
390
+
391
+ <a id="rest"></a>
392
+
393
+ **Rest**:
394
+ The condition of an Agent's state in which a pick is answered: no state below it runs something, and no pending timer
395
+ will move the Machine to another state inside it. jr2 reads it from the Machine, and it is not a state.
396
+ _Avoid_: idle, the rest state (a state named rest means nothing to jr2)
397
+
398
+ <a id="outstanding"></a>
399
+
400
+ **outstanding**:
401
+ A pick that is delivered and not yet answered.
402
+ _Avoid_: held pick (collides with Held secret), pending
403
+
404
+ <a id="chain"></a>
405
+
406
+ **Chain**:
407
+ Every reply since a pick, oldest first, each one a **link**: a child's output, or an event of the Machine's that a party
408
+ below the Agent's state delivered, such as a Gate's answer or a nested Agent's pick. An event that the Machine sends
409
+ itself and a child's error are not links, and the last link is the pick's default answer.
410
+ _Avoid_: history (the view of Settlements), log
411
+
412
+ <a id="briefing"></a>
413
+
414
+ **Briefing**:
415
+ jr2's own text to the model: the facts about the Agent's seat and the mechanism that a correct Agent needs and cannot
416
+ find out for itself, and nothing about the task. It has a standing part, the same on every Turn, and a Turn part after
417
+ the Frame's prompt that carries the Allowed picks, any **notices**, and a **pick's briefing** for an Allowed pick whose
418
+ parameter needs one (a Chart).
419
+ _Avoid_: system prompt (the Turn part is not in it), preamble, header, instructions (identity's word), nudge (a
420
+ re-prompt of an open Turn)
421
+
422
+ <a id="working-tools"></a>
423
+
424
+ **Working tools**:
425
+ The file and shell tools that the Harness runs in its own container: what an Agent may do, as its Menu is what it may
426
+ say. Every program that they run, and their file I/O, is confined, so it cannot reach what the Harness itself holds. The Agent's access to
427
+ the Workspace decides which of them it gets, and a Menu-only Agent gets none.
428
+ _Avoid_: tools (unqualified), sandbox tools
429
+
430
+ ### Sandboxes, Harnesses and secrets
431
+
432
+ <a id="sandbox"></a>
433
+
434
+ **Sandbox**:
435
+ The isolated pod in which an Agent works, with a filesystem of its own. Agents in different Sandboxes share no host
436
+ resources: no ports, no filesystem, no process space.
437
+ _Avoid_: worker pod, container
438
+
439
+ <a id="harness"></a>
440
+
441
+ **Harness**:
442
+ jr2's own long-running server that hosts the conversations of Agents and executes their Working tools, in every Sandbox
443
+ and once per Instance as the Instance Harness. It holds no Agent of its own: each Submission carries the definition
444
+ that it runs.
445
+ _Avoid_: flue agent, server, `local()`
446
+
447
+ <a id="engine"></a>
448
+
449
+ **engine**:
450
+ The loop in a Harness that runs a model's requests and the tool calls of each model answer, for one conversation. The
451
+ Harness can replace it: the engine is not the Harness's contract. What the engine keeps of a conversation is its
452
+ **engine part**, in a folder that the engine names, which jr2's record does not read.
453
+ _Avoid_: runtime, runner, agent loop, harness (the server that holds the engine), Orchestrator
454
+
455
+ <a id="instance-harness"></a>
456
+
457
+ **Instance Harness**:
458
+ The one Harness of an Instance that is in no Sandbox: the Turns of every Menu-only Agent run on it, also when a
459
+ Workspace encloses that Agent. Its pod has a Custodian and no Worktree, and it keeps a conversation only while a live
460
+ run holds it.
461
+ _Avoid_: shared harness, global harness, dev harness
462
+
463
+ <a id="custodian"></a>
464
+
465
+ **Custodian**:
466
+ The jr2-composed container in every Harness pod, a Sandbox or the Instance Harness, that holds the pod's Held secrets
467
+ and carries the Harness's traffic out. The Agent executes no code in it, and it controls no egress: a client that goes
468
+ around it sends only a Stand-in.
469
+ _Avoid_: proxy (the mechanism, and the Handoff's word), sidecar (its deployment shape), MITM, vault, egress gateway,
470
+ firewall
471
+
472
+ <a id="held-secret"></a>
473
+
474
+ **Held secret**:
475
+ A credential that the Harness uses through its pod's Custodian but never holds: a model API key above all, and the
476
+ Sandbox tokens. The Harness holds only its Stand-in, so no Agent can take the secret out of the pod. Workspace code can
477
+ spend it through the Custodian, while the pod lives, only when its Workspace grants that secret.
478
+ _Avoid_: masked secret, injected secret, proxied key, secret (unqualified)
479
+
480
+ <a id="stand-in"></a>
481
+
482
+ **Stand-in**:
483
+ The value that the Harness holds in place of a Held secret. It means something only to the Custodian, and only toward a
484
+ host or a route that the secret is bound to; sent anywhere else, it arrives as it left. It is secret, and only the
485
+ Harness itself holds it: Workspace code gets a Stand-in only for a secret that its Workspace grants, and never the one
486
+ for the control token. The one public Stand-in is the fetch token's, which can only ask for a fetch.
487
+ _Avoid_: placeholder (an Open part's word), dummy key, fake key, token, mask
488
+
489
+ <a id="sandbox-token"></a>
490
+
491
+ **Sandbox token**:
492
+ A credential that jr2 makes for one Sandbox, which its Custodian alone holds. There are two. The **control token** lets
493
+ the Harness read each Agent's Menu and deliver its picks, for the Agent that the Harness names. The **fetch token** lets
494
+ a process in the pod ask for a fetch of a Repo that the Sandbox holds. Each one is good only for its own work and in its
495
+ own Sandbox, and neither one reaches a Gate.
496
+ _Avoid_: pod token, agent token, slot token, Instance token (the Caller's credential)
497
+
498
+ <a id="workspace-code"></a>
499
+
500
+ **Workspace code**:
501
+ Each process in a Sandbox whose program or input comes from the Workspace's shared files: what an Agent's Working tools
502
+ run, tests and builds, git and what a repository's own config makes it run, and a command that a Machine runs there. Any
503
+ Agent can run what another Agent wrote, so jr2 trusts none of it, and no credential that acts for an Agent is where
504
+ Workspace code runs.
505
+ _Avoid_: agent code (any Agent can run another's), user code, untrusted code (unqualified), tool process
506
+
507
+ <a id="check-pod"></a>
508
+
509
+ **Check pod**:
510
+ The one-shot pod in which the provider preflight of `jr2 up` checks the models of one class of Harness pod, before the
511
+ converge writes an object that the Instance reads. It has a Custodian, its own copies of the objects that it reads, and
512
+ labels that no Harness pod has. Its check container calls each model as a Turn calls it. The preflight is the step of
513
+ `jr2 up`, and a check is what the check container does for one model: one call, and at most a second one after an
514
+ answer in text. `jr2 check` is not this check: it runs the typecheck and the Machine walk of `jr2 up`, with no pod and no
515
+ cluster.
516
+ _Avoid_: probe, probe pod, preflight pod, test pod, Harness (it runs none)
517
+
518
+ <a id="effector"></a>
519
+
520
+ **Effector**:
521
+ The container where jr2's own process runs a Machine's Effects and holds their secrets, and where the Agent executes
522
+ nothing: a Sandbox Effector or the Instance Effector. Every Effect runs in it except a command that names no secret,
523
+ which runs beside the Agent, and a dispatch that names no target, which runs in the Orchestrator's own process; a
524
+ command that runs in it sees a pinned commit, never the live Worktree.
525
+ _Avoid_: Courier, Actuator, Clerk, machine container, tool image
526
+
527
+ <a id="sandbox-effector"></a>
528
+
529
+ **Sandbox Effector**:
530
+ The Effector as a container in a Sandbox pod, present only when a Machine needs it, that can read the Worktree but not
531
+ write it. It runs a branch push, an Effect that calls a URL with a Worktree file as its body, and a command that names
532
+ an Effect secret.
533
+ _Avoid_: sidecar, worker, runner
534
+
535
+ <a id="instance-effector"></a>
536
+
537
+ **Instance Effector**:
538
+ The Effector as a stateless pod of its own, one per Instance, for an Effect that calls a URL and reads no Worktree file,
539
+ and for a dispatch that starts a run on another Orchestrator.
540
+ _Avoid_: sidecar, worker, runner
541
+
542
+ <a id="effect-secret"></a>
543
+
544
+ **Effect secret**:
545
+ A secret as an Effect uses it: the real value, in an Effector. It is a placement, not a kind: one secret is a Held
546
+ secret where an Agent's pod names it and an Effect secret where an Effect names it, and it can be both.
547
+ _Avoid_: secret (unqualified), injected secret
548
+
549
+ <a id="sandbox-image"></a>
550
+
551
+ **Sandbox Image**:
552
+ The user-owned image that a Sandbox's Harness runs in: the tools that the Agent's Working tools can reach, and the shell
553
+ that a human gets where the Harness runs. A Workspace names it as a fact of its Machine, built by `jr2 up` or brought
554
+ from a registry, and it carries no part of jr2.
555
+ _Avoid_: workspace image (a Workspace is a Machine; the image is the pod's), agent image, harness image (the kit's own),
556
+ toolchain
557
+
558
+ <a id="sandbox-node"></a>
559
+
560
+ **Sandbox node**:
561
+ A node that an Instance's Sandboxes may be placed on: every node where an ordinary pod lands, unless the Instance
562
+ selects otherwise, and no node needs a jr2 label. The set moves as nodes come and go, and the node caches of Repos are
563
+ kept on exactly these nodes.
564
+ _Avoid_: worker, candidate node, eligible node, data-plane node, schedulable node (the wider set that build platforms
565
+ are read from)
566
+
567
+ <a id="size"></a>
568
+
569
+ **Size**:
570
+ The ceiling of memory and CPU, and nothing else, that a Workspace states for its whole Sandbox and that jr2 reserves in
571
+ full. It is a fact of the Machine, never of a run: a composer can change it, and an Instance only sets the default for a
572
+ Workspace that states none.
573
+ _Avoid_: resources, requests, limits (the pod fields it becomes), class (a placement word), quota (the cluster owner's
574
+ cap)
575
+
576
+ <a id="user-container"></a>
577
+
578
+ **User Container**:
579
+ The optional third container in a Sandbox pod: a user-owned image, named by the Workspace like the Sandbox Image, that
580
+ runs its own entrypoint and shares the pod's checkouts and ports. It is the zero-contract seat for unattended services
581
+ and for sessions whose credentials the Agent must not reach: jr2 puts nothing in its process and never commands or
582
+ probes it.
583
+ _Avoid_: sidecar (its deployment shape), debug container (a one-off attach, not a seat), dev container
584
+
585
+ ### Work, Workspaces and Repos
586
+
587
+ <a id="source"></a>
588
+
589
+ **Source**:
590
+ The port from which a Pool gets its work items. A queue, a generator or a re-queried set can be a Source, and a Work
591
+ Source is one Source adapter.
592
+ _Avoid_: queue (one possible backing, and not FIFO), feed
593
+
594
+ <a id="pool"></a>
595
+
596
+ **Pool**:
597
+ The Machine that the kit supplies to run one worker Machine for each Source item, with a limit on how many run at the
598
+ same time.
599
+ _Avoid_: scheduler, work loop
600
+
601
+ <a id="work-source"></a>
602
+
603
+ **Work Source**:
604
+ The Source adapter for tickets, modeled as a set of behaviors and not as one common data schema. It owns the dependency
605
+ graph of its items and gives out the Ready-set, so the Machine never encodes a dependency edge.
606
+ _Avoid_: ticket system, backend
607
+
608
+ <a id="ready-set"></a>
609
+
610
+ **Ready-set**:
611
+ The work items that a Work Source can give out now: the items that nothing blocks, in dependency order. It changes
612
+ during a run, so it is not a fixed queue.
613
+ _Avoid_: queue, backlog (all the items; the Ready-set is the unblocked part)
614
+
615
+ <a id="workspace"></a>
616
+
617
+ **Workspace**:
618
+ A long-lived Sandbox bound to one unit of work, modeled as a child Machine that wraps the author's body Machine. A coder
619
+ Agent and a reviewer Agent of that unit of work share one Workspace, so a Workspace is per unit of work and not per
620
+ Agent run.
621
+ _Avoid_: workspace pod
622
+
623
+ <a id="placing"></a>
624
+
625
+ **Placing**:
626
+ The Workspace state in which its Sandbox waits, with no deadline, for capacity: a node, or room under the cluster
627
+ owner's quota.
628
+ _Avoid_: pending (a Pod phase, and the Gate's word), queued, parked (a Gate's), admission (the Harness's)
629
+
630
+ <a id="lease"></a>
631
+
632
+ **Lease**:
633
+ The assertion that a Workspace is still wanted, renewed for the whole life of its Sandbox; a Sandbox whose Lease lapses
634
+ can be reaped as abandoned. It only asserts: the run learns nothing about Continuity from the Lease.
635
+ _Avoid_: heartbeat (the timer it replaced), keepalive (the annotation, not the concept)
636
+
637
+ <a id="continuity"></a>
638
+
639
+ **Continuity**:
640
+ Whether a Workspace is still the one that its body Machine attached to. It is not existence: a Sandbox can still exist
641
+ after its clones, Worktrees and unpushed commits are gone.
642
+ _Avoid_: liveness (what the Lease asserts), health (a probe concept, about serving)
643
+
644
+ <a id="repo"></a>
645
+
646
+ **Repo**:
647
+ A git repository, identified by the host and path of its url, so urls that differ only in scheme, user or a `.git`
648
+ suffix are one Repo. A Machine names a Repo only through a Repo Slot: a Repo has no name, and a user declares no catalog
649
+ of Repos.
650
+ _Avoid_: project, source, remote, catalog entry, repo name
651
+
652
+ <a id="repo-slot"></a>
653
+
654
+ **Repo Slot**:
655
+ The Machine's own name for one Repo that its Workspace attaches. The Machine binds it, leaves it Open, or binds it from
656
+ each run's input; jr2 gives it no meaning.
657
+ _Avoid_: role, alias, repo name, workdir, primary repo
658
+
659
+ <a id="binding"></a>
660
+
661
+ **Binding**:
662
+ What a Repo Slot resolves to: a Repo's url and an optional base. The Sandbox's own clone stays on that base, and a new
663
+ branch starts from it. With no base, both use the Repo's own default branch.
664
+ _Avoid_: config, catalog entry
665
+
666
+ <a id="project-layout"></a>
667
+
668
+ **Project layout**:
669
+ The convention for the checkouts in a Sandbox: under each Repo Slot, the Sandbox's own clone of the Repo, with the
670
+ Worktrees beside it. An Agent reads the clone and works in a Worktree. The node's cache of the Repo is not part of the
671
+ layout.
672
+ _Avoid_: directory structure, repo tree
673
+
674
+ <a id="worktree"></a>
675
+
676
+ **Worktree**:
677
+ A git worktree of a Repo Slot, in a folder that a Machine names, beside the Sandbox's own clone. It holds one branch, or
678
+ one commit with no branch. The Machine, not jr2, chooses how many Worktrees it cuts, their branches, and which Agents
679
+ work in them.
680
+ _Avoid_: checkout, task branch
681
+
682
+ <a id="cut"></a>
683
+
684
+ **Cut**:
685
+ An Effect's act that makes a Worktree, or reads the one that a cut already made at that path. A cut that cannot happen
686
+ changes nothing.
687
+ _Avoid_: attach (the Workspace's step, which only clones), provision