@jr2/orchestrator 0.6.0 → 0.7.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.
- package/console/components/app.ts +55 -15
- package/console/components/bottom-drawer.ts +259 -0
- package/console/components/drawer.ts +14 -6
- package/console/components/fleet.ts +36 -13
- package/console/components/machine-pane.ts +61 -5
- package/console/components/nav.ts +54 -8
- package/console/conversation.ts +161 -0
- package/console/login.ts +123 -0
- package/console/main.ts +600 -60
- package/console/store.ts +611 -64
- package/console/style.css +231 -0
- package/docs/agents-block.md +2 -2
- package/docs/concepts/agents-and-turns.md +86 -9
- package/docs/concepts/architecture.md +41 -28
- package/docs/concepts/callers-and-hooks.md +205 -0
- package/docs/concepts/charts.md +7 -5
- package/docs/concepts/composition.md +10 -1
- package/docs/concepts/converge.md +4 -2
- package/docs/concepts/durable-runs.md +43 -16
- package/docs/concepts/effects.md +50 -22
- package/docs/concepts/gates.md +95 -25
- package/docs/concepts/machines-and-workflows.md +5 -4
- package/docs/concepts/pools-and-sources.md +187 -11
- package/docs/concepts/secrets-and-trust.md +73 -33
- package/docs/concepts/the-menu.md +11 -0
- package/docs/concepts/workspaces.md +6 -5
- package/docs/get-started/a-model-decides.md +14 -13
- package/docs/get-started/an-agent-in-a-sandbox.md +43 -34
- package/docs/get-started/connect-a-model.md +1 -1
- package/docs/get-started/create-an-instance.md +17 -14
- package/docs/guides/add-tools-to-the-sandbox.md +55 -11
- package/docs/guides/answer-a-gate-from-a-forge.md +304 -0
- package/docs/guides/answer-a-gate.md +74 -37
- package/docs/guides/bind-open-parts.md +24 -8
- package/docs/guides/call-an-mcp-tool-from-a-machine.md +572 -0
- package/docs/guides/cancel-a-run.md +26 -16
- package/docs/guides/fix-a-failed-converge.md +18 -6
- package/docs/guides/give-a-caller-a-scope.md +203 -0
- package/docs/guides/give-an-agent-mcp-tools.md +422 -0
- package/docs/guides/iterate-on-a-machine-on-kind.md +10 -9
- package/docs/guides/let-an-agent-write-a-chart.md +9 -6
- package/docs/guides/look-inside-a-sandbox.md +101 -31
- package/docs/guides/open-the-console.md +63 -14
- package/docs/guides/read-a-conversation.md +225 -0
- package/docs/guides/run-a-chart-by-name.md +17 -16
- package/docs/guides/run-one-worker-per-item.md +15 -9
- package/docs/guides/set-an-agents-access-and-dials.md +2 -0
- package/docs/guides/start-a-run-for-each-alert.md +290 -0
- package/docs/guides/start-a-run-from-a-run.md +18 -16
- package/docs/guides/start-a-run.md +24 -18
- package/docs/guides/steer-an-agent.md +332 -0
- package/docs/guides/use-a-hosted-provider.md +1 -1
- package/docs/guides/watch-a-run.md +127 -121
- package/docs/guides/write-a-hook-kind.md +238 -0
- package/docs/guides/write-a-tool-as-an-mcp-server.md +351 -0
- package/docs/guides/write-a-workflow.md +17 -7
- package/docs/llms.txt +81 -15
- package/docs/reference/authoring-surface/agent.md +1 -1
- package/docs/reference/authoring-surface/answer.md +1 -1
- package/docs/reference/authoring-surface/arg.md +1 -1
- package/docs/reference/authoring-surface/basic.md +1 -1
- package/docs/reference/authoring-surface/bearer.md +1 -1
- package/docs/reference/authoring-surface/branchname.md +1 -1
- package/docs/reference/authoring-surface/carry.md +23 -0
- package/docs/reference/authoring-surface/chartschema.md +1 -1
- package/docs/reference/authoring-surface/chartschemafor.md +1 -1
- package/docs/reference/authoring-surface/command.md +1 -1
- package/docs/reference/authoring-surface/customize.md +4 -1
- package/docs/reference/authoring-surface/defineconfig.md +1 -1
- package/docs/reference/authoring-surface/defineevent.md +1 -1
- package/docs/reference/authoring-surface/dispatch.md +5 -4
- package/docs/reference/authoring-surface/fail.md +1 -1
- package/docs/reference/authoring-surface/file.md +1 -1
- package/docs/reference/authoring-surface/frompick.md +1 -1
- package/docs/reference/authoring-surface/gate.md +118 -0
- package/docs/reference/authoring-surface/group-agents.md +15 -0
- package/docs/reference/authoring-surface/group-charts.md +16 -0
- package/docs/reference/authoring-surface/group-composition.md +25 -0
- package/docs/reference/authoring-surface/group-config.md +17 -0
- package/docs/reference/authoring-surface/group-effects.md +48 -0
- package/docs/reference/authoring-surface/group-failure.md +13 -0
- package/docs/reference/authoring-surface/group-gates.md +16 -0
- package/docs/reference/authoring-surface/group-machine-and-events.md +15 -0
- package/docs/reference/authoring-surface/group-steering.md +12 -0
- package/docs/reference/authoring-surface/group-types-these-signatures-name.md +137 -0
- package/docs/reference/authoring-surface/group-workspaces-and-repos.md +15 -0
- package/docs/reference/authoring-surface/http.md +1 -1
- package/docs/reference/authoring-surface/isfailure.md +1 -1
- package/docs/reference/authoring-surface/isready.md +1 -1
- package/docs/reference/authoring-surface/jr2setup.md +13 -3
- package/docs/reference/authoring-surface/mcp.md +107 -0
- package/docs/reference/authoring-surface/open.md +5 -3
- package/docs/reference/authoring-surface/openbody.md +1 -1
- package/docs/reference/authoring-surface/paramsof.md +1 -1
- package/docs/reference/authoring-surface/pool.md +77 -9
- package/docs/reference/authoring-surface/push.md +1 -1
- package/docs/reference/authoring-surface/readyof.md +1 -1
- package/docs/reference/authoring-surface/reread.md +19 -0
- package/docs/reference/authoring-surface/secret.md +1 -1
- package/docs/reference/authoring-surface/sentby.md +1 -1
- package/docs/reference/authoring-surface/skip.md +22 -0
- package/docs/reference/authoring-surface/source.md +56 -1
- package/docs/reference/authoring-surface/steer.md +93 -0
- package/docs/reference/authoring-surface/text.md +1 -1
- package/docs/reference/authoring-surface/type-agentdefinition.md +14 -1
- package/docs/reference/authoring-surface/type-agentmcpserver.md +54 -0
- package/docs/reference/authoring-surface/type-anyframepath.md +1 -1
- package/docs/reference/authoring-surface/type-anyworktreepath.md +1 -1
- package/docs/reference/authoring-surface/type-binding.md +1 -1
- package/docs/reference/authoring-surface/type-caller.md +40 -0
- package/docs/reference/authoring-surface/type-callerrecord.md +32 -0
- package/docs/reference/authoring-surface/type-carry.md +19 -0
- package/docs/reference/authoring-surface/type-chainlink.md +3 -3
- package/docs/reference/authoring-surface/type-commandoutput.md +1 -1
- package/docs/reference/authoring-surface/type-customize.md +16 -1
- package/docs/reference/authoring-surface/type-delivered.md +17 -0
- package/docs/reference/authoring-surface/type-deliveredevent.md +18 -0
- package/docs/reference/authoring-surface/type-dispatchdefinition.md +4 -3
- package/docs/reference/authoring-surface/type-dispatchoutput.md +1 -1
- package/docs/reference/authoring-surface/type-effectbinding.md +12 -2
- package/docs/reference/authoring-surface/type-framepath.md +1 -1
- package/docs/reference/authoring-surface/type-gatebinding.md +15 -0
- package/docs/reference/authoring-surface/type-gatehooks.md +12 -0
- package/docs/reference/authoring-surface/type-gatelook.md +37 -0
- package/docs/reference/authoring-surface/type-gateoutcome.md +32 -0
- package/docs/reference/authoring-surface/type-gatereply.md +19 -0
- package/docs/reference/authoring-surface/type-gateslot.md +21 -0
- package/docs/reference/authoring-surface/type-gateslotinput.md +13 -0
- package/docs/reference/authoring-surface/type-gateslotparts.md +18 -0
- package/docs/reference/authoring-surface/type-gateslots.md +12 -0
- package/docs/reference/authoring-surface/type-gatetypesat.md +13 -0
- package/docs/reference/authoring-surface/type-hostinjectedinput.md +1 -1
- package/docs/reference/authoring-surface/type-httpoutput.md +1 -1
- package/docs/reference/authoring-surface/type-jr2config.md +37 -2
- package/docs/reference/authoring-surface/type-lateroutcome.md +1 -1
- package/docs/reference/authoring-surface/type-lends.md +5 -1
- package/docs/reference/authoring-surface/type-lookoutput.md +14 -0
- package/docs/reference/authoring-surface/type-mcpcalloutput.md +78 -0
- package/docs/reference/authoring-surface/type-mcpnotreturned.md +42 -0
- package/docs/reference/authoring-surface/type-mcpoptions.md +47 -0
- package/docs/reference/authoring-surface/type-mcpoutput.md +50 -0
- package/docs/reference/authoring-surface/type-mcpreadoutput.md +53 -0
- package/docs/reference/authoring-surface/type-mcpremoteserver.md +50 -0
- package/docs/reference/authoring-surface/type-mcpserver.md +41 -0
- package/docs/reference/authoring-surface/type-mcpstdioserver.md +42 -0
- package/docs/reference/authoring-surface/type-namedsecret.md +4 -4
- package/docs/reference/authoring-surface/type-openbodydeclaration.md +1 -1
- package/docs/reference/authoring-surface/type-openbodyoutput.md +1 -1
- package/docs/reference/authoring-surface/type-poolnextinput.md +1 -1
- package/docs/reference/authoring-surface/type-poolspec.md +11 -6
- package/docs/reference/authoring-surface/type-pushoutput.md +1 -1
- package/docs/reference/authoring-surface/type-pushsourcespec.md +38 -0
- package/docs/reference/authoring-surface/type-readsourcespec.md +47 -0
- package/docs/reference/authoring-surface/type-reposlot.md +1 -1
- package/docs/reference/authoring-surface/type-reread.md +18 -0
- package/docs/reference/authoring-surface/type-runsconfig.md +41 -0
- package/docs/reference/authoring-surface/type-sender.md +26 -1
- package/docs/reference/authoring-surface/type-sendercallerfield.md +14 -0
- package/docs/reference/authoring-surface/type-size.md +1 -1
- package/docs/reference/authoring-surface/type-skip.md +19 -0
- package/docs/reference/authoring-surface/type-sourcehooks.md +23 -0
- package/docs/reference/authoring-surface/type-sourcein.md +25 -0
- package/docs/reference/authoring-surface/type-sourcereply.md +18 -0
- package/docs/reference/authoring-surface/type-sourcespec.md +16 -7
- package/docs/reference/authoring-surface/type-sourceverdict.md +49 -0
- package/docs/reference/authoring-surface/type-standingpoolmachine.md +12 -0
- package/docs/reference/authoring-surface/type-standingpoolspec.md +51 -0
- package/docs/reference/authoring-surface/type-steerargs.md +20 -0
- package/docs/reference/authoring-surface/type-thinkinglevel.md +1 -1
- package/docs/reference/authoring-surface/type-usercontainer.md +1 -1
- package/docs/reference/authoring-surface/type-workspaced.md +1 -1
- package/docs/reference/authoring-surface/type-worktreefound.md +3 -3
- package/docs/reference/authoring-surface/type-worktreeinput.md +1 -1
- package/docs/reference/authoring-surface/type-worktreeoptions.md +1 -1
- package/docs/reference/authoring-surface/type-worktreeoutput.md +1 -1
- package/docs/reference/authoring-surface/type-worktreepath.md +1 -1
- package/docs/reference/authoring-surface/type-worktreeready.md +1 -1
- package/docs/reference/authoring-surface/type-worktreerefused.md +4 -4
- package/docs/reference/authoring-surface/workspace.md +1 -1
- package/docs/reference/authoring-surface/worktree.md +1 -1
- package/docs/reference/authoring-surface.md +88 -167
- package/docs/reference/cli.md +413 -74
- package/docs/reference/config.md +235 -2
- package/docs/reference/decisions/0002-duplex-streaming-actor.md +71 -11
- package/docs/reference/decisions/0005-sandbox-pod-composition.md +14 -10
- package/docs/reference/decisions/0006-agent-control-surface.md +4 -4
- package/docs/reference/decisions/0007-durable-machine-state.md +1 -1
- package/docs/reference/decisions/0009-cli-and-instance-interface.md +150 -49
- package/docs/reference/decisions/0010-bdd-acceptance-tests.md +5 -3
- package/docs/reference/decisions/0011-workflow-defined-events.md +256 -12
- package/docs/reference/decisions/0012-workspace-wrapper-machine.md +9 -2
- package/docs/reference/decisions/0013-the-agent-reaches-its-machine-through-a-container-it-cannot-read.md +20 -14
- package/docs/reference/decisions/0014-observation-is-open-run-state-is-not.md +53 -27
- package/docs/reference/decisions/0015-authoring-surface-absorbs-the-mechanism.md +18 -14
- package/docs/reference/decisions/0017-pool-over-a-source-port.md +226 -12
- package/docs/reference/decisions/0018-instance-agents-are-definitions-jr2-assembles-the-harness.md +15 -7
- package/docs/reference/decisions/0019-one-converging-command-against-the-current-context.md +32 -18
- package/docs/reference/decisions/0021-workspace-continuity-is-a-lease-that-answers-back.md +14 -1
- package/docs/reference/decisions/0022-observation-is-a-level-triggered-feed.md +4 -4
- package/docs/reference/decisions/0023-the-harness-prints-the-conversation.md +116 -34
- package/docs/reference/decisions/0024-an-agents-turn-ends-with-the-state-that-asked-for-it.md +38 -37
- package/docs/reference/decisions/0025-cancel-ends-a-run-stop-parks-it.md +10 -5
- package/docs/reference/decisions/0027-the-harness-is-jr2s-own-server-flue-retires-the-wire-stays.md +7 -6
- package/docs/reference/decisions/0028-what-an-agent-may-do-to-the-workspace-is-part-of-its-definition.md +23 -7
- package/docs/reference/decisions/0029-a-menu-is-fixed-for-a-conversation-and-a-turn-is-told-its-allowed-picks.md +18 -10
- package/docs/reference/decisions/0030-a-snapshot-names-the-machine-it-was-written-under.md +3 -2
- package/docs/reference/decisions/0031-menu-only-agents-run-on-the-instance-harness.md +23 -18
- package/docs/reference/decisions/0032-the-console-unlocks-with-a-callers-credential.md +101 -0
- package/docs/reference/decisions/0033-a-machine-declares-the-input-that-starts-it.md +4 -3
- package/docs/reference/decisions/0034-the-console-renders-with-preact-and-the-server-erases-the-types.md +6 -6
- package/docs/reference/decisions/0037-an-instance-builds-its-sandbox-images-jr2-injects-the-harness.md +5 -4
- package/docs/reference/decisions/0049-a-machine-carries-its-parts-and-composes-by-invoke.md +19 -19
- package/docs/reference/decisions/0050-what-code-names-config-declares-what-the-cli-names-discovery-finds.md +6 -1
- package/docs/reference/decisions/0054-the-kit-ships-machines-and-a-shipped-machine-leaves-its-parts-open.md +55 -40
- package/docs/reference/decisions/0055-a-release-is-a-pushed-tag-and-the-publish-guard-is-the-credential.md +14 -13
- package/docs/reference/decisions/0057-a-turn-is-its-frame-its-dials-and-whether-it-continues.md +7 -0
- package/docs/reference/decisions/0058-a-harness-answers-the-orchestrator-alone.md +13 -7
- package/docs/reference/decisions/0059-a-harness-holds-stand-ins-and-the-custodian-holds-the-keys.md +38 -30
- package/docs/reference/decisions/0062-jr2-briefs-the-agent-on-its-seat-never-on-its-task.md +64 -17
- package/docs/reference/decisions/0063-the-orchestrator-watches-the-cluster.md +2 -1
- package/docs/reference/decisions/0064-a-workspace-waits-for-capacity.md +2 -2
- package/docs/reference/decisions/0065-a-persist-survives-a-crash-and-history-is-kept-for-a-set-time.md +109 -0
- package/docs/reference/decisions/0066-a-model-tier-runs-a-real-model-and-a-change-to-what-it-reads-runs-the-tier.md +51 -23
- package/docs/reference/decisions/0067-an-effect-is-an-actor-slot-and-runs-at-most-once-unless-marked-idempotent.md +94 -54
- package/docs/reference/decisions/0068-an-effector-holds-an-effects-secrets-and-signs-its-wire.md +101 -47
- package/docs/reference/decisions/0069-the-orchestrator-is-a-kit-image-and-an-instance-publishes-its-assembly.md +32 -9
- package/docs/reference/decisions/0070-a-machine-lends-its-parts-to-a-chart.md +17 -13
- package/docs/reference/decisions/0071-a-run-starts-a-run-through-a-dispatch-effect.md +56 -30
- package/docs/reference/decisions/0072-the-docs-ship-inside-the-kit-and-an-instances-agents-md-indexes-them.md +35 -25
- package/docs/reference/decisions/0075-a-machine-cuts-a-worktree-and-the-workspace-only-clones.md +4 -3
- package/docs/reference/decisions/0076-an-agents-control-credential-lives-only-where-no-workspace-code-runs.md +37 -10
- package/docs/reference/decisions/0078-a-caller-comes-from-one-authenticator-seam-and-acts-within-its-scopes.md +285 -0
- package/docs/reference/decisions/0079-an-agent-holds-mcp-tools-a-machine-calls-them-as-an-effect-and-the-machine-is-the-approval.md +198 -0
- package/docs/reference/decisions.md +6 -4
- package/docs/reference/glossary.md +96 -42
- package/docs/reference/hooks.md +1077 -0
- package/docs/reference/http-api.md +976 -149
- package/docs/why.md +2 -1
- package/package.json +10 -3
- package/src/actor.ts +36 -10
- package/src/agent.ts +50 -0
- package/src/assembly-checks.ts +530 -4
- package/src/callers.ts +245 -0
- package/src/chart.ts +52 -7
- package/src/config.ts +550 -1
- package/src/conversations.ts +453 -0
- package/src/custodian.ts +8 -2
- package/src/customize.ts +143 -4
- package/src/dispatch-effect.ts +142 -26
- package/src/durability.ts +2 -0
- package/src/duration.ts +20 -0
- package/src/effect-checks.ts +2 -1
- package/src/effect.ts +60 -7
- package/src/effector-wire.ts +272 -27
- package/src/gate-brand.ts +16 -0
- package/src/gate.ts +634 -48
- package/src/harness-client.ts +10 -4
- package/src/held-secrets.ts +72 -23
- package/src/holds.ts +2 -2
- package/src/hook-kinds/discord.ts +92 -0
- package/src/hook-kinds/door.ts +107 -0
- package/src/hook-kinds/github.ts +89 -0
- package/src/hook-kinds/gitlab.ts +72 -0
- package/src/hook-kinds/hook.ts +7 -0
- package/src/hook-kinds/index.ts +465 -0
- package/src/hook-kinds/slack.ts +151 -0
- package/src/hook-kinds/webhook.ts +113 -0
- package/src/hooks.ts +506 -0
- package/src/http-effect.ts +76 -38
- package/src/http.ts +889 -94
- package/src/index.ts +16 -5
- package/src/instance.ts +196 -26
- package/src/internal.ts +22 -3
- package/src/machine-doc.ts +26 -1
- package/src/mcp-effect.ts +424 -0
- package/src/mount-digest.ts +41 -7
- package/src/names.ts +64 -2
- package/src/notices.ts +138 -10
- package/src/open-body.ts +25 -11
- package/src/open-effect.ts +17 -4
- package/src/open.ts +4 -2
- package/src/parts.ts +87 -9
- package/src/party.ts +2 -1
- package/src/pick.ts +2 -2
- package/src/pool.ts +1142 -163
- package/src/registration.ts +203 -13
- package/src/run-host.ts +1509 -171
- package/src/run-list.ts +191 -0
- package/src/sandbox-kube.ts +53 -5
- package/src/secret-placement.ts +239 -33
- package/src/server.ts +53 -4
- package/src/setup.ts +72 -32
- package/src/snapshot-store.ts +565 -48
- package/src/steer.ts +111 -0
- package/src/stub-harness.ts +6 -2
- package/src/tokens.ts +263 -22
- package/src/wire.ts +17 -0
- package/src/workspace.ts +50 -6
- package/src/worktree.ts +3 -3
- package/docs/reference/decisions/0032-the-console-unlocks-with-the-instance-token.md +0 -61
- package/docs/reference/decisions/0065-a-persist-survives-a-crash-and-history-is-a-week.md +0 -65
|
@@ -9,8 +9,9 @@ See where a run is and what its [Agents](../reference/glossary.md#agent) do, in
|
|
|
9
9
|
[Console](../reference/glossary.md#console) and the pod log of an Agent.
|
|
10
10
|
|
|
11
11
|
The CLI shows the status of a run: where its [Machine](../reference/glossary.md#machine) is, its context, and its open
|
|
12
|
-
[Gates](../reference/glossary.md#gate). The Console shows where the Machine is and, with the
|
|
13
|
-
|
|
12
|
+
[Gates](../reference/glossary.md#gate). The Console shows where the Machine is and, with the credential of a
|
|
13
|
+
[Caller](../reference/glossary.md#caller) that has the `answer` scope, the open Gates. `jr2 logs` and the pod log show
|
|
14
|
+
the [Conversation](../reference/glossary.md#conversation) of each Agent: its prompts, its text, and its calls.
|
|
14
15
|
|
|
15
16
|
The examples on this page use a run of the [Workflow](../reference/glossary.md#workflow) `release`. Its Gate `review`
|
|
16
17
|
waits for `approve` or `reject`. [Answer a Gate](answer-a-gate.md) gives the file `workflows/release.ts`. In the
|
|
@@ -34,7 +35,7 @@ jr2 run release --input '{"version":"2.0.0"}' --detach
|
|
|
34
35
|
|
|
35
36
|
```text
|
|
36
37
|
→ context <context> / namespace <namespace>
|
|
37
|
-
{"runId":"
|
|
38
|
+
{"runId":"41ca7842-786f-44ca-9083-47109500da5f"}
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
Your run ids, instance ids and `assembly` hash are different from the values on this page.
|
|
@@ -49,32 +50,50 @@ jr2 runs
|
|
|
49
50
|
|
|
50
51
|
```text
|
|
51
52
|
→ context <context> / namespace <namespace>
|
|
52
|
-
|
|
53
|
-
ping (machine)
|
|
54
|
-
release (machine)
|
|
55
|
-
[{"runId":"a2d8b5b5-645c-44d2-8175-a949493e2320","workflow":"release","instanceId":"6242963e-76d0-4acd-ac86-09359a29912f","status":"active","value":"review","context":{"version":"2.0.0"},"children":[],"waiting":[],"held":[],"assembly":"28c844453c20"}]
|
|
53
|
+
[{"runId":"41ca7842-786f-44ca-9083-47109500da5f","workflow":"release","status":"active","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:17:04.653Z","assembly":"19d0bf0cbe10","openGates":1}]
|
|
56
54
|
```
|
|
57
55
|
|
|
58
|
-
`jr2 runs` prints a JSON array of the runs that did not end
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
[
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
`jr2 runs` prints a JSON array of the runs that did not end, the newest start first. Each item is a summary of the run:
|
|
57
|
+
its id, its Workflow, its status, who started it and when, its [Assembly](../reference/glossary.md#assembly), and the
|
|
58
|
+
number of its open Gates (`openGates`). `--status ended` lists the runs that ended, and `--status all` lists both.
|
|
59
|
+
`--workflow` and `--since` (such as `7d`) filter the list. [`jr2 workflows`](../reference/cli.md#workflows) lists the
|
|
60
|
+
Workflows that a run can start. To read the state and the context of a run, use `jr2 status <run id>`. A run with a
|
|
61
|
+
[Workspace](../reference/glossary.md#workspace) that waits for capacity also has `placing`: the path of each such
|
|
62
|
+
Workspace in the run. `jr2 status` tells why it waits. A run that a `dispatch` [Effect](../reference/glossary.md#effect)
|
|
63
|
+
started has `dispatchedBy`: the run that started it, the slot of the Effect, the id of the Effect (`effect`), and its
|
|
64
|
+
`depth` in the chain. [Start a run from a run](start-a-run-from-a-run.md) shows it.
|
|
65
|
+
|
|
66
|
+
## List the runs that ended
|
|
67
|
+
|
|
68
|
+
Give `--status ended` to list the runs that ended. Give `--workflow` and `--since` to make the list shorter. `--since`
|
|
69
|
+
takes a duration, such as `2h` or `7d`, or an ISO-8601 time:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
jr2 runs --status ended --workflow release --since 7d
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
→ context <context> / namespace <namespace>
|
|
77
|
+
[{"runId":"cad78069-0d8d-4c04-9cf4-3f771693274f","workflow":"release","status":"done","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:16:37.594Z","endedAt":"2026-11-06T19:16:39.762Z","assembly":"19d0bf0cbe10","openGates":0},{"runId":"a4099c00-88a6-4add-8068-dcf39e8c4224","workflow":"release","status":"done","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:16:30.787Z","endedAt":"2026-11-06T19:16:34.593Z","assembly":"19d0bf0cbe10","openGates":0},{"runId":"08b42407-1c4f-4776-9879-7c505bfa6695","workflow":"release","status":"done","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:16:18.276Z","endedAt":"2026-11-06T19:16:22.355Z","assembly":"19d0bf0cbe10","openGates":0},{"runId":"342fef91-53a1-4640-87bf-6fb4395beebf","workflow":"release","status":"done","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:16:00.147Z","endedAt":"2026-11-06T19:16:05.091Z","assembly":"19d0bf0cbe10","openGates":0},{"runId":"0c948d65-fd6f-453a-87fa-71ec00c7fe68","workflow":"release","status":"failed","reason":"The changelog is not ready.","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"startedAt":"2026-11-06T19:15:39.018Z","endedAt":"2026-11-06T19:15:52.902Z","assembly":"19d0bf0cbe10","openGates":0}]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
An ended run has `endedAt`. `reason` tells why a run is `failed`, `error`, `lost` or `drifted`. `--status` also takes a
|
|
81
|
+
comma list of statuses, such as `--status failed,error`. jr2 keeps an ended run for
|
|
82
|
+
[`runs.retain`](../reference/config.md#runs), 30 days by default. `jr2 runs` reads every page of the list.
|
|
83
|
+
[`GET /runs`](../reference/http-api.md#get-runs) gives the list one page at a time, with a `cursor`.
|
|
66
84
|
|
|
67
85
|
## Read the status of a run
|
|
68
86
|
|
|
69
87
|
Run [`jr2 status`](../reference/cli.md#status) with the run id. It reads a run that ended too:
|
|
70
88
|
|
|
71
89
|
```sh
|
|
72
|
-
jr2 status
|
|
90
|
+
jr2 status 41ca
|
|
73
91
|
```
|
|
74
92
|
|
|
75
93
|
```text
|
|
76
94
|
→ context <context> / namespace <namespace>
|
|
77
|
-
{"runId":"
|
|
95
|
+
{"runId":"41ca7842-786f-44ca-9083-47109500da5f","workflow":"release","instanceId":"a17469b8-b648-44dc-acb9-dcce6fcb81ad","startedAt":"2026-11-06T19:17:04.653Z","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"status":"active","value":"review","context":{"version":"2.0.0"},"children":[],"waiting":[],"held":[],"assembly":"19d0bf0cbe10","gates":[{"gate":"review","path":["review"],"accepts":[{"name":"approve","description":"Release this version.","input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}},{"name":"reject","description":"Do not release this version. Say why.","input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1}},"required":["reason"],"additionalProperties":false}}],"acceptsNow":["approve","reject"],"meta":{"version":"2.0.0"}}]}
|
|
96
|
+
started by: token/instance on behalf of kubernetes-admin
|
|
78
97
|
```
|
|
79
98
|
|
|
80
99
|
The status is a [`RunStatus`](../reference/http-api.md#type-runstatus), with the open Gates of the run:
|
|
@@ -90,10 +109,16 @@ The status is a [`RunStatus`](../reference/http-api.md#type-runstatus), with the
|
|
|
90
109
|
| `fault` | The error, when the status is `error`. |
|
|
91
110
|
| `output` | The output of the Machine, when the run ended. For `failed`, the Failure: `{ reason, detail? }`. |
|
|
92
111
|
| `reason` | Why jr2 set the status, when the Machine did not set it, such as `drifted`. |
|
|
93
|
-
| `assembly` | The hash of the
|
|
112
|
+
| `assembly` | The hash of the Assembly that the run started under, and holds. |
|
|
94
113
|
| `gates` | Each open Gate. [Answer a Gate](answer-a-gate.md) explains its fields. |
|
|
95
114
|
| `worktrees` | Each [Worktree](../reference/glossary.md#worktree) that the run cut: its `slot`, its `path`, and its `branch`, which is `null` when the Worktree is detached. |
|
|
96
115
|
|
|
116
|
+
`jr2 status` also prints on stderr who started the run, from `startedBy`: `started by: <via>/<name>`, then the name that
|
|
117
|
+
jr2 shows and `on behalf of <party>` when the [Caller](../reference/glossary.md#caller) gave them. For a run that a
|
|
118
|
+
`dispatch` started, `jr2 status` reads each run of the chain, up to the first run that a Caller started. Then the line
|
|
119
|
+
also names the runs between, as `through run <run id> (<slot>)`. A run that jr2 started says `started by: jr2 (<why>)`.
|
|
120
|
+
A cancelled run also prints `cancelled by: <via>/<name>`.
|
|
121
|
+
|
|
97
122
|
For a run that cut a Worktree, `jr2 status` also prints one line on stderr for each cut:
|
|
98
123
|
`worktree: <path> (<slot>), branch <branch>`, or `worktree: <path> (<slot>), detached`. jr2 reads each line from the
|
|
99
124
|
record of the cut, so these lines do not change when an Agent changes the branch in the Worktree.
|
|
@@ -105,40 +130,54 @@ and the [Repos](../reference/glossary.md#repo) of the Instance.
|
|
|
105
130
|
|
|
106
131
|
## Follow a run
|
|
107
132
|
|
|
108
|
-
Run [`jr2
|
|
133
|
+
Run [`jr2 watch`](../reference/cli.md#watch). It prints the state now, then each change, until the run ends. It prints
|
|
134
|
+
the lines that `jr2 run` prints while it is attached:
|
|
109
135
|
|
|
110
136
|
```sh
|
|
111
|
-
jr2
|
|
137
|
+
jr2 watch 41ca
|
|
112
138
|
```
|
|
113
139
|
|
|
114
|
-
While `jr2
|
|
140
|
+
While `jr2 watch` runs, send `approve` to the Gate in a second terminal:
|
|
115
141
|
|
|
116
142
|
```sh
|
|
117
|
-
jr2 send
|
|
143
|
+
jr2 send 41ca --gate review --event approve
|
|
118
144
|
```
|
|
119
145
|
|
|
120
|
-
The run ends. `jr2
|
|
146
|
+
The run ends. `jr2 watch` prints the state when it attached, then the last status, and stops:
|
|
121
147
|
|
|
122
148
|
```text
|
|
123
149
|
→ context <context> / namespace <namespace>
|
|
124
|
-
|
|
125
|
-
|
|
150
|
+
run 41ca7842-786f-44ca-9083-47109500da5f (release) — attached
|
|
151
|
+
→ active "review"
|
|
152
|
+
→ done "released"
|
|
126
153
|
```
|
|
127
154
|
|
|
128
|
-
When the run ended before you attach, `jr2
|
|
129
|
-
|
|
130
|
-
|
|
155
|
+
When the run ended before you attach, `jr2 watch` prints only its last status. With `--json`, it prints each status as
|
|
156
|
+
one JSON line:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
jr2 watch 41ca --json
|
|
160
|
+
```
|
|
131
161
|
|
|
132
|
-
|
|
133
|
-
|
|
162
|
+
```text
|
|
163
|
+
→ context <context> / namespace <namespace>
|
|
164
|
+
{"runId":"41ca7842-786f-44ca-9083-47109500da5f","workflow":"release","instanceId":"a17469b8-b648-44dc-acb9-dcce6fcb81ad","startedAt":"2026-11-06T19:17:04.653Z","status":"done","value":"released","context":{"version":"2.0.0"},"children":[],"waiting":[],"held":[],"assembly":"19d0bf0cbe10","startedBy":{"kind":"caller","via":"token","name":"instance","onBehalfOf":"kubernetes-admin"},"answers":[{"gate":"review","type":"approve","at":"2026-11-06T19:17:14.022Z","answeredBy":{"via":"token","name":"instance","onBehalfOf":"kubernetes-admin"}}]}
|
|
165
|
+
```
|
|
134
166
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
|
167
|
+
After the last status of a run that failed, `jr2 watch` prints `failed: <reason>`, as `jr2 run` does. `jr2 watch` exits
|
|
168
|
+
with `0` when it reads the run, also when the run ended with the status `error`. Read `status` in the last status.
|
|
169
|
+
|
|
170
|
+
Without `--json`, `jr2 watch` prints each line on stdout. With `--json`, it prints each status as one JSON line on
|
|
171
|
+
stdout, and the other activity of the run on stderr, one line for each item of activity:
|
|
172
|
+
|
|
173
|
+
| Line | What happened |
|
|
174
|
+
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
175
|
+
| `emit <emit>` | The Machine sent an [Emit](../reference/glossary.md#emit). `<emit>` is its JSON. |
|
|
176
|
+
| `retry <child> attempt <n> (<reason>)` | jr2 tries a [Turn](../reference/glossary.md#turn) of an Agent again. `<child>` names its Machine. `<reason>` says why. With `runaway reroll`, the Harness ended a [Runaway](../reference/glossary.md#runaway), and jr2 runs the Turn one more time in a new conversation. A second Runaway is an Agent fault. |
|
|
177
|
+
| `placing <child>: waits for a node — <message>` | The [Sandbox](../reference/glossary.md#sandbox) of a Workspace waits for a node. With a quota, the line says `waits for quota`. |
|
|
178
|
+
| `placed <child> after <n>s` | The Sandbox got its node after `<n>` seconds. |
|
|
179
|
+
| ``child-error: `<child>` failed below <agent>'s pick `<pick>` — <error>`` | A child that an Agent's pick started failed. The Agent does not get this error. |
|
|
180
|
+
| `looked: gate <gate> read its fact, and the run took "<event>"` | The look of a Gate slot read the fact that the Gate waits for, and the run took the event of its `until`. No Caller answered. |
|
|
142
181
|
|
|
143
182
|
A line about the root Workspace of the run has no `<child>`. `jr2 run` prints the same lines, with two spaces before
|
|
144
183
|
each line. It prints each change of status as `→ <status> <state>`.
|
|
@@ -153,8 +192,9 @@ each line. It prints each change of status as `→ <status> <state>`.
|
|
|
153
192
|
- The `Activity` tab in the drawer lists the Emits of the runs of the Workflow that you selected. Each Emit shows the
|
|
154
193
|
first 8 characters of the run id, and only the type of the Emit.
|
|
155
194
|
|
|
156
|
-
To see more, type the Instance token in the `
|
|
157
|
-
shows `live
|
|
195
|
+
To see more, type a Caller token, such as the Instance token, in the `Caller token` box in the nav. Push Enter. When the
|
|
196
|
+
badge beside the box shows `live`, the nav shows who the Console acts as, such as `as token/instance`. With the `answer`
|
|
197
|
+
and `read` scopes for the Workflow ([Open the Console](open-the-console.md) gives what each scope shows):
|
|
158
198
|
|
|
159
199
|
- In the Fleet rail, `⚑` and a number show the open Gates of each run.
|
|
160
200
|
- The `Attention` tab shows the open Gates, and you can answer them. See [Answer a Gate](answer-a-gate.md).
|
|
@@ -163,17 +203,20 @@ shows `live`:
|
|
|
163
203
|
- For a run that you selected that ended `failed`, the Console shows the reason of its
|
|
164
204
|
[Failure](../reference/glossary.md#failure): `failed: <reason>`, as `jr2 status` shows it. With no token, the rail
|
|
165
205
|
shows only the status `failed`, in orange.
|
|
206
|
+
- For the run that you selected, the Console shows who started it, such as `started by token/ci`.
|
|
207
|
+
- The Fleet rail lists the ended runs of the Workflow under its live runs. The bottom drawer shows the conversation of
|
|
208
|
+
each Agent slot of the run that you selected ([Open the Console](open-the-console.md#read-a-conversation)).
|
|
166
209
|
|
|
167
210
|
## Watch from a program
|
|
168
211
|
|
|
169
212
|
The [Orchestrator](../reference/glossary.md#orchestrator) sends the activity of a run as Server-Sent Events. A program
|
|
170
213
|
can read them:
|
|
171
214
|
|
|
172
|
-
| Route | Token
|
|
173
|
-
| ---------------------------------------------------------------------------------------------------------- |
|
|
174
|
-
| [`GET /runs/:runId/events`](../reference/http-api.md#get-runs-runid-events) |
|
|
175
|
-
| [`GET /workflows/:name/runs/:runId/events`](../reference/http-api.md#get-workflows-name-runs-runid-events) | none
|
|
176
|
-
| [`GET /workflows/:name/events`](../reference/http-api.md#get-workflows-name-events) | none
|
|
215
|
+
| Route | Token | What it sends |
|
|
216
|
+
| ---------------------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
|
|
217
|
+
| [`GET /runs/:runId/events`](../reference/http-api.md#get-runs-runid-events) | `read` scope | The full status of one run, its Emits, and its other activity, until it ends. |
|
|
218
|
+
| [`GET /workflows/:name/runs/:runId/events`](../reference/http-api.md#get-workflows-name-runs-runid-events) | none | The state of one live run, and the type of each Emit, with no context. |
|
|
219
|
+
| [`GET /workflows/:name/events`](../reference/http-api.md#get-workflows-name-events) | none | A `runs` event with all the live runs, then the same events for each run. It stays open. |
|
|
177
220
|
|
|
178
221
|
The run of the steps above ended, and a feed of one run sends only a live run. Start a new run:
|
|
179
222
|
|
|
@@ -183,7 +226,7 @@ jr2 run release --input '{"version":"2.0.0"}' --detach
|
|
|
183
226
|
|
|
184
227
|
```text
|
|
185
228
|
→ context <context> / namespace <namespace>
|
|
186
|
-
{"runId":"
|
|
229
|
+
{"runId":"0e4a6a62-587e-4550-aee8-58642dde0637"}
|
|
187
230
|
```
|
|
188
231
|
|
|
189
232
|
To read its feed, forward a port to the Orchestrator, as [Start a run](start-a-run.md#start-a-run-with-the-http-api)
|
|
@@ -203,10 +246,10 @@ The feed sends the status when you attached, then the last status, and closes:
|
|
|
203
246
|
|
|
204
247
|
```text
|
|
205
248
|
event: status
|
|
206
|
-
data: {"runId":"
|
|
249
|
+
data: {"runId":"0e4a6a62-587e-4550-aee8-58642dde0637","workflow":"release","status":"active","value":"review","children":[]}
|
|
207
250
|
|
|
208
251
|
event: status
|
|
209
|
-
data: {"runId":"
|
|
252
|
+
data: {"runId":"0e4a6a62-587e-4550-aee8-58642dde0637","workflow":"release","status":"done","value":"released","children":[]}
|
|
210
253
|
```
|
|
211
254
|
|
|
212
255
|
The first event is the status when you attach. The feed of one run closes when the run ends. While the run waits, the
|
|
@@ -214,8 +257,23 @@ feed also sends a comment line, `:`, at intervals, to keep the connection open.
|
|
|
214
257
|
|
|
215
258
|
## Read an Agent's conversation
|
|
216
259
|
|
|
217
|
-
|
|
218
|
-
|
|
260
|
+
Run [`jr2 logs`](../reference/cli.md#logs) with the run id. It prints the conversation of each Agent of the run, in the
|
|
261
|
+
order of the time of each entry. Give an Agent slot or the name of an Agent to print only that Agent. Add `-f` to follow
|
|
262
|
+
the conversations while the run continues:
|
|
263
|
+
|
|
264
|
+
```sh
|
|
265
|
+
jr2 logs <run id> coder -f
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
The Orchestrator keeps each conversation for as long as it keeps the run, so `jr2 logs` also reads a run that ended.
|
|
269
|
+
[Read a conversation](read-a-conversation.md) tells what each line shows, how long jr2 keeps a conversation, and how the
|
|
270
|
+
Console shows it.
|
|
271
|
+
|
|
272
|
+
## Read the pod log
|
|
273
|
+
|
|
274
|
+
The [Harness](../reference/glossary.md#harness) that runs an Agent's Turn also prints the conversation to the log of its
|
|
275
|
+
container, `harness`. The lines have the form that `jr2 logs` prints. Read them with `kubectl logs`. Add `-f` to follow
|
|
276
|
+
them. A cluster that sends its pod logs to a log store keeps them there for as long as that store keeps them.
|
|
219
277
|
|
|
220
278
|
For a [Menu](../reference/glossary.md#menu)-only Agent, an Agent with `workspace: "none"`, read the log of the
|
|
221
279
|
[Instance Harness](../reference/glossary.md#instance-harness):
|
|
@@ -225,99 +283,44 @@ kubectl -n <namespace> logs -f statefulset/jr2-instance-harness -c harness
|
|
|
225
283
|
```
|
|
226
284
|
|
|
227
285
|
The Instance Harness runs the Turns of all the Menu-only Agents of the Instance. Thus its log can hold the lines of more
|
|
228
|
-
than one run. Each line of a conversation holds its Instance ID, which starts
|
|
229
|
-
run, keep the lines that hold `[<run id>/`:
|
|
286
|
+
than one run. Each line of a conversation holds its [Instance ID](../reference/glossary.md#instance-id), which starts
|
|
287
|
+
with the run id. To read the lines of one run, keep the lines that hold `[<run id>/`:
|
|
230
288
|
|
|
231
289
|
```sh
|
|
232
290
|
kubectl -n <namespace> logs statefulset/jr2-instance-harness -c harness | grep -F '[<run id>/'
|
|
233
291
|
```
|
|
234
292
|
|
|
235
|
-
For an Agent that works in a Workspace, read the log of its Sandbox. Find the Sandbox with
|
|
236
|
-
[Look inside a Sandbox](look-inside-a-sandbox.md) shows. The
|
|
293
|
+
For an Agent that works in a Workspace, read the log of its Sandbox. Find the Sandbox with
|
|
294
|
+
[`jr2 workspace ls`](../reference/cli.md#workspace-ls), as [Look inside a Sandbox](look-inside-a-sandbox.md) shows. The
|
|
295
|
+
pod has the name of the Sandbox, in the `SANDBOX` column:
|
|
237
296
|
|
|
238
297
|
```sh
|
|
239
|
-
|
|
298
|
+
jr2 workspace ls <run id>
|
|
240
299
|
kubectl -n <namespace> logs -f <sandbox> -c harness
|
|
241
300
|
```
|
|
242
301
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
``In docs/intro/repo, run `node bin/greet.js`. Then finish, with what it printed.``:
|
|
302
|
+
The log of a Sandbox also tells the story of its run, in lines that start with `[run]`. `jr2 logs` does not print these
|
|
303
|
+
lines:
|
|
246
304
|
|
|
247
305
|
```text
|
|
248
306
|
jr2 harness serving on :8080
|
|
249
307
|
[run] [status] running · body: cutting
|
|
250
|
-
[run] [status] running · body: cutting
|
|
251
|
-
[run] [status] running · body: working
|
|
252
308
|
[run] [status] running · body: working
|
|
253
309
|
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [prompt] In docs/intro/repo, run `node bin/greet.js`. Then finish, with what it printed.
|
|
254
|
-
|
|
255
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] Work in /work/target/task, on branch jr2/task-84f810c8-dda7-4577-a57e-4a09a4e7f507 — your tools are rooted there, so a relative path lands inside it. Commit what you do there, then call finish.
|
|
256
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
257
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] <jr2-turn>
|
|
258
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] Working directory: /work/target/task
|
|
259
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] Allowed now: `mcp__jr2__finish`.
|
|
260
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] </jr2-turn>
|
|
261
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [thinking] The user wants me to:
|
|
262
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] 1. Run `node bin/greet.js` from the `docs/intro/repo` directory within the worktree
|
|
263
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] 2. Report what it printed
|
|
264
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] 3. Commit my work and call finish
|
|
265
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
266
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] Let me first run the command.
|
|
267
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
268
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [text]
|
|
269
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
270
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
271
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [bash] cd /work/target/task && node docs/intro/repo/bin/greet.js
|
|
272
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [thinking] The command printed "hello, world". Now I need to finish with that information.
|
|
273
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
274
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [text]
|
|
275
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
276
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder]
|
|
277
|
-
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [finish] {"summary":"Ran `node bin/greet.js` from docs/intro/repo. It printed: hello, world"}
|
|
310
|
+
…
|
|
278
311
|
[coder] [9501dd2f-95ba-479b-b384-307c736a8aad/body/coder] [finish answer] Delivered "finish" to the workflow (delivery 1b61fa16-50b7-4202-b7ed-b46a6ead5930). The workflow consumed it and moved on: your turn is over.
|
|
279
312
|
[run] [status] running · body: review
|
|
280
|
-
[run] [status] running · body: review
|
|
281
313
|
```
|
|
282
314
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
[Instance ID](../reference/glossary.md#instance-id) of the conversation in brackets. The Instance ID starts with the run
|
|
287
|
-
id. The first line of each message then has a label in brackets. The next lines of the same message have no label:
|
|
288
|
-
|
|
289
|
-
| Line | What it shows |
|
|
290
|
-
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
291
|
-
| `[<agent>] [<iid>] [prompt] <text>` | A message that the model reads: the prompt of the Turn, or a message that jr2 adds to the Turn. |
|
|
292
|
-
| `[<agent>] [<iid>] [thinking] <text>` | The thinking of the model. |
|
|
293
|
-
| `[<agent>] [<iid>] [text] <text>` | The text of the model. |
|
|
294
|
-
| `[<agent>] [<iid>] [<call>] <input>` | A call of a [Working tool](../reference/glossary.md#working-tools), or a pick from the Menu. `<input>` is a path for read, write and edit, the command for `bash`, or else JSON. |
|
|
295
|
-
| `[<agent>] [<iid>] [<pick> answer] <text>` | The answer that the model got for a pick from its Menu. |
|
|
296
|
-
| `[<agent>] [<iid>] [<pick> error] <text>` | An answer to a pick that the model reads as an error, such as a refusal. |
|
|
297
|
-
| `[<agent>] [<iid>] [compacted] <text>` | The Harness made the context of the conversation smaller: `context <before> → ~<after> tokens (window <window>)`. |
|
|
298
|
-
| `[<agent>] [<iid>] [thinking level] <text>` | The model has no thinking level of the name that the Turn asked for, and the line names the level that the model ran at. The Harness prints it one time for each Turn. |
|
|
299
|
-
|
|
300
|
-
The log of a Sandbox also tells the story of its run, in lines that start with `[run]`. `[run] [status] <state>` gives
|
|
301
|
-
the state of the run, then the state of each Machine that it invokes, separated by `·`, such as
|
|
302
|
-
`running · body: working`. When the run ends, the line gives its status. `[run] [emit] <type> <payload>` gives an Emit.
|
|
303
|
-
A Turn that runs in a different Harness shows only as `[<agent>] [admitted] <prompt>` and
|
|
315
|
+
`[run] [status] <state>` gives the state of the run, then the state of each Machine that it invokes, separated by `·`,
|
|
316
|
+
such as `running · body: working`. When the run ends, the line gives its status. `[run] [emit] <type> <payload>` gives
|
|
317
|
+
an Emit. A Turn that runs in a different Harness shows only as `[<agent>] [admitted] <prompt>` and
|
|
304
318
|
`[<agent>] [pick] <pick> <input>`. `<input>` is the JSON of the input of the pick, and it is absent for a pick with no
|
|
305
319
|
input. The lines of the story of the run have no Instance ID.
|
|
306
320
|
|
|
307
|
-
The Harness does not print the result of a Working tool. For example, it does not print the text of a file that the
|
|
308
|
-
Agent read, or the output of a command that the Agent ran.
|
|
309
|
-
|
|
310
|
-
The Harness cuts an input that is longer than 2000 characters at its end, and marks the cut with `…`. It cuts a long
|
|
311
|
-
answer to a pick in its middle, and marks the cut with `… [<n> characters cut] …`. The model reads the full text. The
|
|
312
|
-
Harness cuts only the log.
|
|
313
|
-
|
|
314
321
|
The log of a Sandbox goes away with its pod. The Workspace deletes its Sandbox when its body gets to its final state,
|
|
315
322
|
and when a [Failure](../reference/glossary.md#failure) goes up through it. `jr2 send <run id> --event CANCEL` without
|
|
316
|
-
`--keep` also deletes it.
|
|
317
|
-
|
|
318
|
-
```sh
|
|
319
|
-
kubectl -n <namespace> logs <sandbox> -c harness > <file>
|
|
320
|
-
```
|
|
323
|
+
`--keep` also deletes it. `jr2 logs` still reads the conversations after that.
|
|
321
324
|
|
|
322
325
|
> **Caution**
|
|
323
326
|
>
|
|
@@ -332,18 +335,21 @@ kubectl -n <namespace> logs <sandbox> -c harness > <file>
|
|
|
332
335
|
- A prefix that no run id starts with is an error. The command exits with `1`: `no run "<prefix>"`
|
|
333
336
|
- A prefix that more than one run id starts with is an error. The command lists the run ids, and exits with `1`:
|
|
334
337
|
`error: run id "<prefix>" is ambiguous`
|
|
335
|
-
- `GET /runs/:runId/events` refuses a call without
|
|
338
|
+
- `GET /runs/:runId/events` refuses a call without a Caller's credential, with the status code `401`: `unauthorized`. It
|
|
339
|
+
refuses a Caller without the `read` scope for the Workflow of the run with the status code `403`.
|
|
336
340
|
- `GET /workflows/:name/runs/:runId/events` sends only a live run of that Workflow. For a different run, it refuses with
|
|
337
341
|
the status code `404`: `no live run "<run id>" of "<workflow>"`
|
|
338
342
|
|
|
339
343
|
## Read next
|
|
340
344
|
|
|
341
345
|
- [Durable runs](../concepts/durable-runs.md)
|
|
342
|
-
- [ADR-0009](../reference/decisions/0009-cli-and-instance-interface.md): `jr2 runs`, `jr2 status`, `jr2
|
|
343
|
-
id prefixes.
|
|
346
|
+
- [ADR-0009](../reference/decisions/0009-cli-and-instance-interface.md): `jr2 runs`, `jr2 status`, `jr2 watch`,
|
|
347
|
+
`jr2 logs`, and run id prefixes.
|
|
344
348
|
- [ADR-0014](../reference/decisions/0014-observation-is-open-run-state-is-not.md): what the Console and the feeds show
|
|
345
349
|
without the token.
|
|
346
350
|
- [ADR-0022](../reference/decisions/0022-observation-is-a-level-triggered-feed.md): the feeds.
|
|
347
|
-
- [ADR-0023](../reference/decisions/0023-the-harness-prints-the-conversation.md): the conversation in the pod log
|
|
351
|
+
- [ADR-0023](../reference/decisions/0023-the-harness-prints-the-conversation.md): the conversation in the pod log, and
|
|
352
|
+
the copy that the Orchestrator keeps.
|
|
348
353
|
- [Architecture](../concepts/architecture.md): the Harness and the Instance Harness.
|
|
354
|
+
- [Read a conversation](read-a-conversation.md)
|
|
349
355
|
- [Look inside a Sandbox](look-inside-a-sandbox.md)
|