@stigmer/cli 0.1.0-dev.20261017064309.g94d062a29f89 → 0.1.1
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/README.md +5 -4
- package/auth/auth0.js +1 -1
- package/auth/auth0.js.map +1 -1
- package/auth/token.d.ts +26 -4
- package/auth/token.d.ts.map +1 -1
- package/auth/token.js +120 -24
- package/auth/token.js.map +1 -1
- package/client/client.d.ts.map +1 -1
- package/client/client.js +21 -8
- package/client/client.js.map +1 -1
- package/command-tree.d.ts +63 -0
- package/command-tree.d.ts.map +1 -0
- package/command-tree.js +128 -0
- package/command-tree.js.map +1 -0
- package/commands/access-history/index.d.ts.map +1 -1
- package/commands/access-history/index.js +13 -1
- package/commands/access-history/index.js.map +1 -1
- package/commands/agent-exec-flags.d.ts +2 -0
- package/commands/agent-exec-flags.d.ts.map +1 -1
- package/commands/agent-exec-flags.js +9 -5
- package/commands/agent-exec-flags.js.map +1 -1
- package/commands/apikey/duration.d.ts.map +1 -1
- package/commands/apikey/duration.js +1 -2
- package/commands/apikey/duration.js.map +1 -1
- package/commands/apikey/index.d.ts.map +1 -1
- package/commands/apikey/index.js +3 -4
- package/commands/apikey/index.js.map +1 -1
- package/commands/apply.d.ts.map +1 -1
- package/commands/apply.js +2 -32
- package/commands/apply.js.map +1 -1
- package/commands/auth/index.d.ts.map +1 -1
- package/commands/auth/index.js +7 -5
- package/commands/auth/index.js.map +1 -1
- package/commands/auth/whoami.js +1 -1
- package/commands/config/index.js +3 -3
- package/commands/config/kv.d.ts.map +1 -1
- package/commands/config/kv.js +18 -14
- package/commands/config/kv.js.map +1 -1
- package/commands/connect.d.ts.map +1 -1
- package/commands/connect.js +18 -2
- package/commands/connect.js.map +1 -1
- package/commands/download.d.ts.map +1 -1
- package/commands/download.js +81 -54
- package/commands/download.js.map +1 -1
- package/commands/eval.d.ts.map +1 -1
- package/commands/eval.js +17 -19
- package/commands/eval.js.map +1 -1
- package/commands/file.d.ts +3 -0
- package/commands/file.d.ts.map +1 -0
- package/commands/file.js +64 -0
- package/commands/file.js.map +1 -0
- package/commands/get.d.ts.map +1 -1
- package/commands/get.js +20 -13
- package/commands/get.js.map +1 -1
- package/commands/help.d.ts +15 -0
- package/commands/help.d.ts.map +1 -0
- package/commands/help.js +175 -0
- package/commands/help.js.map +1 -0
- package/commands/internal-daemon.d.ts.map +1 -1
- package/commands/internal-daemon.js +9 -2
- package/commands/internal-daemon.js.map +1 -1
- package/commands/list.d.ts.map +1 -1
- package/commands/list.js +22 -1
- package/commands/list.js.map +1 -1
- package/commands/logs.js +1 -1
- package/commands/logs.js.map +1 -1
- package/commands/mcp-server.d.ts +16 -6
- package/commands/mcp-server.d.ts.map +1 -1
- package/commands/mcp-server.js +51 -26
- package/commands/mcp-server.js.map +1 -1
- package/commands/provider-key/index.d.ts +3 -0
- package/commands/provider-key/index.d.ts.map +1 -0
- package/commands/provider-key/index.js +156 -0
- package/commands/provider-key/index.js.map +1 -0
- package/commands/push.js +8 -8
- package/commands/push.js.map +1 -1
- package/commands/resume.d.ts.map +1 -1
- package/commands/resume.js +17 -11
- package/commands/resume.js.map +1 -1
- package/commands/routine.d.ts.map +1 -1
- package/commands/routine.js +42 -3
- package/commands/routine.js.map +1 -1
- package/commands/run.d.ts.map +1 -1
- package/commands/run.js +34 -15
- package/commands/run.js.map +1 -1
- package/commands/runs/approve.d.ts.map +1 -1
- package/commands/runs/approve.js +10 -2
- package/commands/runs/approve.js.map +1 -1
- package/commands/runs/control.d.ts.map +1 -1
- package/commands/runs/control.js +24 -16
- package/commands/runs/control.js.map +1 -1
- package/commands/runs/index.d.ts.map +1 -1
- package/commands/runs/index.js +1 -2
- package/commands/runs/index.js.map +1 -1
- package/commands/runs/logs.d.ts.map +1 -1
- package/commands/runs/logs.js +7 -4
- package/commands/runs/logs.js.map +1 -1
- package/commands/runs/to-eval-case.d.ts.map +1 -1
- package/commands/runs/to-eval-case.js +13 -4
- package/commands/runs/to-eval-case.js.map +1 -1
- package/commands/runs/trace.js +1 -1
- package/commands/runs/trace.js.map +1 -1
- package/commands/search.js +2 -3
- package/commands/search.js.map +1 -1
- package/commands/service-account/index.d.ts.map +1 -1
- package/commands/service-account/index.js +4 -2
- package/commands/service-account/index.js.map +1 -1
- package/commands/session-help.d.ts +5 -0
- package/commands/session-help.d.ts.map +1 -0
- package/commands/session-help.js +38 -0
- package/commands/session-help.js.map +1 -0
- package/commands/setup.js +5 -5
- package/commands/setup.js.map +1 -1
- package/commands/shared.d.ts +10 -2
- package/commands/shared.d.ts.map +1 -1
- package/commands/shared.js +30 -3
- package/commands/shared.js.map +1 -1
- package/commands/tag.d.ts.map +1 -1
- package/commands/tag.js +11 -6
- package/commands/tag.js.map +1 -1
- package/commands/up.d.ts.map +1 -1
- package/commands/up.js +51 -21
- package/commands/up.js.map +1 -1
- package/commands/validate.js +2 -2
- package/commands/validate.js.map +1 -1
- package/commands/version.d.ts.map +1 -1
- package/commands/version.js +8 -4
- package/commands/version.js.map +1 -1
- package/config/config.d.ts +5 -22
- package/config/config.d.ts.map +1 -1
- package/config/config.js +56 -47
- package/config/config.js.map +1 -1
- package/config/index.d.ts +2 -2
- package/config/index.d.ts.map +1 -1
- package/config/index.js +1 -1
- package/config/index.js.map +1 -1
- package/config/keys.js +4 -4
- package/config/keys.js.map +1 -1
- package/config/paths.js +2 -2
- package/config/paths.js.map +1 -1
- package/config/resolve.d.ts +12 -2
- package/config/resolve.d.ts.map +1 -1
- package/config/resolve.js +18 -8
- package/config/resolve.js.map +1 -1
- package/errors/classify.d.ts +20 -0
- package/errors/classify.d.ts.map +1 -1
- package/errors/classify.js +97 -21
- package/errors/classify.js.map +1 -1
- package/errors/command-line.d.ts +14 -0
- package/errors/command-line.d.ts.map +1 -0
- package/errors/command-line.js +90 -0
- package/errors/command-line.js.map +1 -0
- package/errors/handle.js +2 -2
- package/errors/handle.js.map +1 -1
- package/errors/index.d.ts +2 -2
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +12 -2
- package/errors/index.js.map +1 -1
- package/errors/usage-error.js +1 -1
- package/errors/usage-error.js.map +1 -1
- package/global-options.d.ts +35 -0
- package/global-options.d.ts.map +1 -0
- package/global-options.js +81 -0
- package/global-options.js.map +1 -0
- package/local/artifact.d.ts +1 -20
- package/local/artifact.d.ts.map +1 -1
- package/local/artifact.js +35 -117
- package/local/artifact.js.map +1 -1
- package/local/constants.d.ts +3 -9
- package/local/constants.d.ts.map +1 -1
- package/local/constants.js +3 -9
- package/local/constants.js.map +1 -1
- package/local/daemon/components.d.ts +18 -5
- package/local/daemon/components.d.ts.map +1 -1
- package/local/daemon/components.js +61 -23
- package/local/daemon/components.js.map +1 -1
- package/local/daemon/env.d.ts +1 -5
- package/local/daemon/env.d.ts.map +1 -1
- package/local/daemon/env.js +0 -2
- package/local/daemon/env.js.map +1 -1
- package/local/daemon/host.d.ts +5 -0
- package/local/daemon/host.d.ts.map +1 -1
- package/local/daemon/host.js +68 -21
- package/local/daemon/host.js.map +1 -1
- package/local/daemon/index.d.ts +2 -1
- package/local/daemon/index.d.ts.map +1 -1
- package/local/daemon/index.js +2 -1
- package/local/daemon/index.js.map +1 -1
- package/local/daemon/launch.d.ts +58 -9
- package/local/daemon/launch.d.ts.map +1 -1
- package/local/daemon/launch.js +210 -64
- package/local/daemon/launch.js.map +1 -1
- package/local/daemon/process.d.ts +11 -7
- package/local/daemon/process.d.ts.map +1 -1
- package/local/daemon/process.js +74 -38
- package/local/daemon/process.js.map +1 -1
- package/local/daemon/signals.d.ts +3 -0
- package/local/daemon/signals.d.ts.map +1 -0
- package/local/daemon/signals.js +19 -0
- package/local/daemon/signals.js.map +1 -0
- package/local/daemon/supervisor.d.ts +9 -2
- package/local/daemon/supervisor.d.ts.map +1 -1
- package/local/daemon/supervisor.js +81 -22
- package/local/daemon/supervisor.js.map +1 -1
- package/local/daemon/types.d.ts +6 -1
- package/local/daemon/types.d.ts.map +1 -1
- package/local/daemon/types.js +2 -3
- package/local/daemon/types.js.map +1 -1
- package/local/llm-config.d.ts +4 -2
- package/local/llm-config.d.ts.map +1 -1
- package/local/llm-config.js +15 -9
- package/local/llm-config.js.map +1 -1
- package/local/logs/view.d.ts.map +1 -1
- package/local/logs/view.js +5 -6
- package/local/logs/view.js.map +1 -1
- package/local/net/tcp.d.ts +8 -6
- package/local/net/tcp.d.ts.map +1 -1
- package/local/net/tcp.js +13 -8
- package/local/net/tcp.js.map +1 -1
- package/local/paths.d.ts +1 -1
- package/local/paths.d.ts.map +1 -1
- package/local/paths.js +2 -3
- package/local/paths.js.map +1 -1
- package/local/provider-reach.d.ts +18 -0
- package/local/provider-reach.d.ts.map +1 -0
- package/local/provider-reach.js +109 -0
- package/local/provider-reach.js.map +1 -0
- package/local/reset.d.ts.map +1 -1
- package/local/reset.js +1 -2
- package/local/reset.js.map +1 -1
- package/local/runtime/index.d.ts.map +1 -1
- package/local/runtime/index.js +1 -2
- package/local/runtime/index.js.map +1 -1
- package/local/runtime/node.js +1 -1
- package/local/runtime/runner.js +2 -2
- package/local/runtime/runner.js.map +1 -1
- package/local/runtime/runtimes-install.js +1 -1
- package/local/runtime/server.d.ts.map +1 -1
- package/local/runtime/server.js +2 -4
- package/local/runtime/server.js.map +1 -1
- package/local/runtime/which.js +1 -1
- package/local/runtime/which.js.map +1 -1
- package/local/setup/wizard.d.ts +1 -1
- package/local/setup/wizard.d.ts.map +1 -1
- package/local/setup/wizard.js +7 -5
- package/local/setup/wizard.js.map +1 -1
- package/local/state/health-state.d.ts +6 -0
- package/local/state/health-state.d.ts.map +1 -1
- package/local/state/health-state.js +6 -2
- package/local/state/health-state.js.map +1 -1
- package/local/state/lock.d.ts +3 -2
- package/local/state/lock.d.ts.map +1 -1
- package/local/state/lock.js +26 -28
- package/local/state/lock.js.map +1 -1
- package/local/state/log-rotation.d.ts.map +1 -1
- package/local/state/log-rotation.js +2 -3
- package/local/state/log-rotation.js.map +1 -1
- package/local/state/pidfile.d.ts +24 -1
- package/local/state/pidfile.d.ts.map +1 -1
- package/local/state/pidfile.js +54 -6
- package/local/state/pidfile.js.map +1 -1
- package/local/state/proc.d.ts +31 -0
- package/local/state/proc.d.ts.map +1 -1
- package/local/state/proc.js +98 -1
- package/local/state/proc.js.map +1 -1
- package/local/state/startup-config.d.ts +2 -2
- package/local/status.d.ts +2 -4
- package/local/status.d.ts.map +1 -1
- package/local/status.js +26 -41
- package/local/status.js.map +1 -1
- package/local/temporal/download.d.ts +9 -5
- package/local/temporal/download.d.ts.map +1 -1
- package/local/temporal/download.js +29 -8
- package/local/temporal/download.js.map +1 -1
- package/local/temporal/index.d.ts +1 -1
- package/local/temporal/index.d.ts.map +1 -1
- package/local/temporal/index.js +1 -1
- package/local/temporal/index.js.map +1 -1
- package/local/temporal/manager.d.ts +31 -5
- package/local/temporal/manager.d.ts.map +1 -1
- package/local/temporal/manager.js +74 -35
- package/local/temporal/manager.js.map +1 -1
- package/local/temporal/supervisor.js +1 -1
- package/local/temporal/supervisor.js.map +1 -1
- package/local/webconsole/index.d.ts +5 -2
- package/local/webconsole/index.d.ts.map +1 -1
- package/local/webconsole/index.js +8 -6
- package/local/webconsole/index.js.map +1 -1
- package/marketplace/github.js +1 -1
- package/marketplace/github.js.map +1 -1
- package/marketplace/official.js +1 -1
- package/marketplace/official.js.map +1 -1
- package/output/command-result.d.ts +6 -0
- package/output/command-result.d.ts.map +1 -1
- package/output/command-result.js +13 -2
- package/output/command-result.js.map +1 -1
- package/output/confirm.d.ts.map +1 -1
- package/output/confirm.js +2 -3
- package/output/confirm.js.map +1 -1
- package/output/format.d.ts.map +1 -1
- package/output/format.js +5 -6
- package/output/format.js.map +1 -1
- package/output/index.d.ts +2 -2
- package/output/index.d.ts.map +1 -1
- package/output/index.js +2 -2
- package/output/index.js.map +1 -1
- package/output/printable.d.ts +8 -0
- package/output/printable.d.ts.map +1 -0
- package/output/printable.js +24 -0
- package/output/printable.js.map +1 -0
- package/output/proto.d.ts.map +1 -1
- package/output/proto.js +3 -4
- package/output/proto.js.map +1 -1
- package/output/style.js +2 -2
- package/output/style.js.map +1 -1
- package/output/table.d.ts +20 -1
- package/output/table.d.ts.map +1 -1
- package/output/table.js +75 -17
- package/output/table.js.map +1 -1
- package/package.json +13 -10
- package/program.d.ts +0 -14
- package/program.d.ts.map +1 -1
- package/program.js +57 -119
- package/program.js.map +1 -1
- package/registry/aliases.d.ts.map +1 -1
- package/registry/aliases.js +0 -3
- package/registry/aliases.js.map +1 -1
- package/registry/index.d.ts +1 -1
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js +1 -1
- package/registry/index.js.map +1 -1
- package/registry/metadata.d.ts +0 -15
- package/registry/metadata.d.ts.map +1 -1
- package/registry/metadata.js +16 -57
- package/registry/metadata.js.map +1 -1
- package/registry/registry.d.ts +1 -5
- package/registry/registry.d.ts.map +1 -1
- package/registry/registry.js +3 -11
- package/registry/registry.js.map +1 -1
- package/registry/verb-support.d.ts.map +1 -1
- package/registry/verb-support.js +28 -5
- package/registry/verb-support.js.map +1 -1
- package/resources/agent/quality.d.ts +10 -5
- package/resources/agent/quality.d.ts.map +1 -1
- package/resources/agent/quality.js +19 -9
- package/resources/agent/quality.js.map +1 -1
- package/resources/agent/resolve.js +3 -3
- package/resources/agent/resolve.js.map +1 -1
- package/resources/apply/apply.d.ts +4 -3
- package/resources/apply/apply.d.ts.map +1 -1
- package/resources/apply/apply.js +54 -41
- package/resources/apply/apply.js.map +1 -1
- package/resources/apply/handlers.d.ts.map +1 -1
- package/resources/apply/handlers.js +3 -4
- package/resources/apply/handlers.js.map +1 -1
- package/resources/channel.d.ts.map +1 -1
- package/resources/channel.js +3 -4
- package/resources/channel.js.map +1 -1
- package/resources/connect/connect.js +2 -2
- package/resources/connect/connect.js.map +1 -1
- package/resources/delete.d.ts.map +1 -1
- package/resources/delete.js +38 -4
- package/resources/delete.js.map +1 -1
- package/resources/documents.js +1 -1
- package/resources/documents.js.map +1 -1
- package/resources/download.d.ts +43 -3
- package/resources/download.d.ts.map +1 -1
- package/resources/download.js +169 -34
- package/resources/download.js.map +1 -1
- package/resources/eval-run/options.d.ts +3 -1
- package/resources/eval-run/options.d.ts.map +1 -1
- package/resources/eval-run/options.js +36 -18
- package/resources/eval-run/options.js.map +1 -1
- package/resources/eval-run/report.d.ts +4 -2
- package/resources/eval-run/report.d.ts.map +1 -1
- package/resources/eval-run/report.js +9 -7
- package/resources/eval-run/report.js.map +1 -1
- package/resources/eval-run/run.d.ts +2 -1
- package/resources/eval-run/run.d.ts.map +1 -1
- package/resources/eval-run/run.js +13 -7
- package/resources/eval-run/run.js.map +1 -1
- package/resources/file.d.ts +27 -0
- package/resources/file.d.ts.map +1 -0
- package/resources/file.js +82 -0
- package/resources/file.js.map +1 -0
- package/resources/get-bindings.d.ts.map +1 -1
- package/resources/get-bindings.js +18 -0
- package/resources/get-bindings.js.map +1 -1
- package/resources/git.d.ts +1 -1
- package/resources/git.js +1 -1
- package/resources/list.d.ts +21 -2
- package/resources/list.d.ts.map +1 -1
- package/resources/list.js +148 -31
- package/resources/list.js.map +1 -1
- package/resources/plugin.d.ts.map +1 -1
- package/resources/plugin.js +4 -0
- package/resources/plugin.js.map +1 -1
- package/resources/provider-key.d.ts +81 -0
- package/resources/provider-key.d.ts.map +1 -0
- package/resources/provider-key.js +261 -0
- package/resources/provider-key.js.map +1 -0
- package/resources/reference.d.ts +15 -21
- package/resources/reference.d.ts.map +1 -1
- package/resources/reference.js +42 -88
- package/resources/reference.js.map +1 -1
- package/resources/render.d.ts +31 -7
- package/resources/render.d.ts.map +1 -1
- package/resources/render.js +66 -38
- package/resources/render.js.map +1 -1
- package/resources/routine.d.ts +21 -5
- package/resources/routine.d.ts.map +1 -1
- package/resources/routine.js +104 -15
- package/resources/routine.js.map +1 -1
- package/resources/run/agent-exec.d.ts +12 -2
- package/resources/run/agent-exec.d.ts.map +1 -1
- package/resources/run/agent-exec.js +85 -38
- package/resources/run/agent-exec.js.map +1 -1
- package/resources/run/create.d.ts +16 -12
- package/resources/run/create.d.ts.map +1 -1
- package/resources/run/create.js +14 -15
- package/resources/run/create.js.map +1 -1
- package/resources/run/engines.d.ts +32 -0
- package/resources/run/engines.d.ts.map +1 -0
- package/resources/run/engines.js +39 -0
- package/resources/run/engines.js.map +1 -0
- package/resources/run/environment.d.ts +11 -0
- package/resources/run/environment.d.ts.map +1 -0
- package/resources/run/environment.js +30 -0
- package/resources/run/environment.js.map +1 -0
- package/resources/run/epilogue.d.ts +1 -1
- package/resources/run/epilogue.d.ts.map +1 -1
- package/resources/run/epilogue.js +18 -19
- package/resources/run/epilogue.js.map +1 -1
- package/resources/run/files.d.ts +104 -0
- package/resources/run/files.d.ts.map +1 -0
- package/resources/run/files.js +316 -0
- package/resources/run/files.js.map +1 -0
- package/resources/run/header.d.ts +11 -9
- package/resources/run/header.d.ts.map +1 -1
- package/resources/run/header.js +14 -14
- package/resources/run/header.js.map +1 -1
- package/resources/run/prepare.d.ts +31 -25
- package/resources/run/prepare.d.ts.map +1 -1
- package/resources/run/prepare.js +42 -51
- package/resources/run/prepare.js.map +1 -1
- package/resources/run/references.d.ts.map +1 -1
- package/resources/run/references.js +6 -5
- package/resources/run/references.js.map +1 -1
- package/resources/run/resolve.js +1 -1
- package/resources/run/resolve.js.map +1 -1
- package/resources/run/resume.d.ts +3 -1
- package/resources/run/resume.d.ts.map +1 -1
- package/resources/run/resume.js +25 -10
- package/resources/run/resume.js.map +1 -1
- package/resources/run/stream.d.ts +34 -2
- package/resources/run/stream.d.ts.map +1 -1
- package/resources/run/stream.js +92 -8
- package/resources/run/stream.js.map +1 -1
- package/resources/run/workspace.d.ts +9 -12
- package/resources/run/workspace.d.ts.map +1 -1
- package/resources/run/workspace.js +29 -36
- package/resources/run/workspace.js.map +1 -1
- package/resources/run-approve.d.ts.map +1 -1
- package/resources/run-approve.js +2 -11
- package/resources/run-approve.js.map +1 -1
- package/resources/run-control.d.ts +3 -3
- package/resources/run-control.d.ts.map +1 -1
- package/resources/run-control.js +4 -5
- package/resources/run-control.js.map +1 -1
- package/resources/run-format.d.ts +2 -2
- package/resources/run-format.d.ts.map +1 -1
- package/resources/run-format.js +3 -4
- package/resources/run-format.js.map +1 -1
- package/resources/run-logs.d.ts +2 -0
- package/resources/run-logs.d.ts.map +1 -1
- package/resources/run-logs.js +16 -6
- package/resources/run-logs.js.map +1 -1
- package/resources/run-scores.d.ts +6 -2
- package/resources/run-scores.d.ts.map +1 -1
- package/resources/run-scores.js +7 -4
- package/resources/run-scores.js.map +1 -1
- package/resources/run-to-eval-case.js +2 -2
- package/resources/run-to-eval-case.js.map +1 -1
- package/resources/runs.d.ts +3 -3
- package/resources/runs.d.ts.map +1 -1
- package/resources/runs.js +5 -5
- package/resources/runs.js.map +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +1 -2
- package/resources/search.js.map +1 -1
- package/resources/service-account.d.ts +2 -0
- package/resources/service-account.d.ts.map +1 -1
- package/resources/service-account.js +3 -1
- package/resources/service-account.js.map +1 -1
- package/resources/session.d.ts +4 -3
- package/resources/session.d.ts.map +1 -1
- package/resources/session.js +10 -7
- package/resources/session.js.map +1 -1
- package/resources/skill.d.ts +1 -1
- package/resources/skill.d.ts.map +1 -1
- package/resources/skill.js +7 -8
- package/resources/skill.js.map +1 -1
- package/resources/stream/answer.d.ts +1 -2
- package/resources/stream/answer.d.ts.map +1 -1
- package/resources/stream/answer.js +3 -16
- package/resources/stream/answer.js.map +1 -1
- package/resources/stream/composer.d.ts +16 -0
- package/resources/stream/composer.d.ts.map +1 -0
- package/resources/stream/composer.js +171 -0
- package/resources/stream/composer.js.map +1 -0
- package/resources/stream/ink.d.ts +20 -4
- package/resources/stream/ink.d.ts.map +1 -1
- package/resources/stream/ink.js +34 -3
- package/resources/stream/ink.js.map +1 -1
- package/resources/stream/render-plaintext.d.ts +1 -0
- package/resources/stream/render-plaintext.d.ts.map +1 -1
- package/resources/stream/render-plaintext.js +21 -4
- package/resources/stream/render-plaintext.js.map +1 -1
- package/resources/stream/tty.js +1 -1
- package/resources/stream/tty.js.map +1 -1
- package/resources/tag.d.ts.map +1 -1
- package/resources/tag.js +7 -8
- package/resources/tag.js.map +1 -1
- package/resources/usage.d.ts +3 -2
- package/resources/usage.d.ts.map +1 -1
- package/resources/usage.js +19 -16
- package/resources/usage.js.map +1 -1
- package/resources/validate.d.ts.map +1 -1
- package/resources/validate.js +1 -12
- package/resources/validate.js.map +1 -1
- package/resources/version.d.ts +17 -3
- package/resources/version.d.ts.map +1 -1
- package/resources/version.js +105 -14
- package/resources/version.js.map +1 -1
- package/resources/views/agent.d.ts +3 -0
- package/resources/views/agent.d.ts.map +1 -0
- package/resources/views/agent.js +54 -0
- package/resources/views/agent.js.map +1 -0
- package/resources/views/environment.d.ts +3 -0
- package/resources/views/environment.d.ts.map +1 -0
- package/resources/views/environment.js +37 -0
- package/resources/views/environment.js.map +1 -0
- package/resources/views/index.d.ts +22 -0
- package/resources/views/index.d.ts.map +1 -0
- package/resources/views/index.js +70 -0
- package/resources/views/index.js.map +1 -0
- package/resources/views/organization.d.ts +3 -0
- package/resources/views/organization.d.ts.map +1 -0
- package/resources/views/organization.js +27 -0
- package/resources/views/organization.js.map +1 -0
- package/resources/views/routine.d.ts +3 -0
- package/resources/views/routine.d.ts.map +1 -0
- package/resources/views/routine.js +37 -0
- package/resources/views/routine.js.map +1 -0
- package/resources/views/run.d.ts +3 -0
- package/resources/views/run.d.ts.map +1 -0
- package/resources/views/run.js +45 -0
- package/resources/views/run.js.map +1 -0
- package/resources/views/session.d.ts +5 -0
- package/resources/views/session.d.ts.map +1 -0
- package/resources/views/session.js +85 -0
- package/resources/views/session.js.map +1 -0
- package/resources/views/skill.d.ts +5 -0
- package/resources/views/skill.d.ts.map +1 -0
- package/resources/views/skill.js +48 -0
- package/resources/views/skill.js.map +1 -0
- package/resources/views/view.d.ts +66 -0
- package/resources/views/view.d.ts.map +1 -0
- package/resources/views/view.js +130 -0
- package/resources/views/view.js.map +1 -0
- package/resources/views/words.d.ts +52 -0
- package/resources/views/words.d.ts.map +1 -0
- package/resources/views/words.js +190 -0
- package/resources/views/words.js.map +1 -0
- package/runtime.d.ts +22 -0
- package/runtime.d.ts.map +1 -1
- package/runtime.js +33 -2
- package/runtime.js.map +1 -1
- package/src/auth/auth0.ts +1 -1
- package/src/auth/token.ts +136 -26
- package/src/client/client.ts +23 -16
- package/src/command-tree.ts +152 -0
- package/src/commands/access-history/index.ts +15 -2
- package/src/commands/agent-exec-flags.ts +11 -5
- package/src/commands/apikey/duration.ts +1 -2
- package/src/commands/apikey/index.ts +3 -4
- package/src/commands/apply.ts +3 -22
- package/src/commands/auth/index.ts +7 -5
- package/src/commands/auth/whoami.ts +1 -1
- package/src/commands/config/index.ts +3 -3
- package/src/commands/config/kv.ts +18 -14
- package/src/commands/connect.ts +21 -3
- package/src/commands/download.ts +106 -62
- package/src/commands/eval.ts +22 -21
- package/src/commands/file.ts +80 -0
- package/src/commands/get.ts +19 -13
- package/src/commands/help.ts +182 -0
- package/src/commands/internal-daemon.ts +9 -2
- package/src/commands/list.ts +22 -1
- package/src/commands/logs.ts +1 -1
- package/src/commands/mcp-server.ts +57 -28
- package/src/commands/provider-key/index.ts +192 -0
- package/src/commands/push.ts +8 -8
- package/src/commands/resume.ts +20 -12
- package/src/commands/routine.ts +58 -5
- package/src/commands/run.ts +37 -17
- package/src/commands/runs/approve.ts +13 -4
- package/src/commands/runs/control.ts +50 -27
- package/src/commands/runs/index.ts +1 -2
- package/src/commands/runs/logs.ts +9 -5
- package/src/commands/runs/to-eval-case.ts +18 -6
- package/src/commands/runs/trace.ts +1 -1
- package/src/commands/search.ts +2 -3
- package/src/commands/service-account/index.ts +7 -2
- package/src/commands/session-help.ts +39 -0
- package/src/commands/setup.ts +5 -5
- package/src/commands/shared.ts +32 -3
- package/src/commands/tag.ts +13 -7
- package/src/commands/up.ts +55 -21
- package/src/commands/validate.ts +2 -2
- package/src/commands/version.ts +9 -4
- package/src/config/config.ts +66 -69
- package/src/config/index.ts +1 -2
- package/src/config/keys.ts +4 -4
- package/src/config/paths.ts +2 -2
- package/src/config/resolve.ts +20 -8
- package/src/errors/classify.ts +110 -21
- package/src/errors/command-line.ts +95 -0
- package/src/errors/handle.ts +2 -2
- package/src/errors/index.ts +12 -2
- package/src/errors/usage-error.ts +1 -1
- package/src/global-options.ts +100 -0
- package/src/local/artifact.ts +46 -140
- package/src/local/constants.ts +3 -9
- package/src/local/daemon/components.ts +78 -22
- package/src/local/daemon/env.ts +3 -8
- package/src/local/daemon/host.ts +64 -19
- package/src/local/daemon/index.ts +2 -1
- package/src/local/daemon/launch.ts +251 -72
- package/src/local/daemon/process.ts +78 -46
- package/src/local/daemon/signals.ts +19 -0
- package/src/local/daemon/supervisor.ts +84 -21
- package/src/local/daemon/types.ts +8 -4
- package/src/local/llm-config.ts +15 -9
- package/src/local/logs/view.ts +5 -6
- package/src/local/net/tcp.ts +18 -11
- package/src/local/paths.ts +2 -3
- package/src/local/provider-reach.ts +124 -0
- package/src/local/reset.ts +1 -2
- package/src/local/runtime/index.ts +1 -2
- package/src/local/runtime/node.ts +1 -1
- package/src/local/runtime/runner.ts +2 -2
- package/src/local/runtime/runtimes-install.ts +1 -1
- package/src/local/runtime/server.ts +2 -4
- package/src/local/runtime/which.ts +1 -1
- package/src/local/setup/wizard.ts +7 -5
- package/src/local/state/health-state.ts +10 -2
- package/src/local/state/lock.ts +26 -28
- package/src/local/state/log-rotation.ts +2 -3
- package/src/local/state/pidfile.ts +61 -6
- package/src/local/state/proc.ts +104 -1
- package/src/local/state/startup-config.ts +2 -2
- package/src/local/status.ts +30 -41
- package/src/local/temporal/download.ts +31 -9
- package/src/local/temporal/index.ts +1 -1
- package/src/local/temporal/manager.ts +94 -34
- package/src/local/temporal/supervisor.ts +1 -1
- package/src/local/webconsole/index.ts +8 -5
- package/src/marketplace/github.ts +1 -1
- package/src/marketplace/official.ts +1 -1
- package/src/output/command-result.ts +14 -2
- package/src/output/confirm.ts +2 -3
- package/src/output/format.ts +5 -6
- package/src/output/index.ts +8 -1
- package/src/output/printable.ts +26 -0
- package/src/output/proto.ts +3 -4
- package/src/output/style.ts +2 -2
- package/src/output/table.ts +118 -15
- package/src/program.ts +58 -128
- package/src/registry/aliases.ts +0 -3
- package/src/registry/index.ts +0 -1
- package/src/registry/metadata.ts +16 -64
- package/src/registry/registry.ts +3 -13
- package/src/registry/verb-support.ts +28 -5
- package/src/resources/agent/quality.ts +29 -8
- package/src/resources/agent/resolve.ts +3 -3
- package/src/resources/apply/apply.ts +58 -49
- package/src/resources/apply/handlers.ts +3 -4
- package/src/resources/channel.ts +3 -4
- package/src/resources/connect/connect.ts +2 -2
- package/src/resources/delete.ts +44 -4
- package/src/resources/documents.ts +1 -1
- package/src/resources/download.ts +239 -43
- package/src/resources/eval-run/options.ts +38 -17
- package/src/resources/eval-run/report.ts +11 -5
- package/src/resources/eval-run/run.ts +13 -9
- package/src/resources/file.ts +114 -0
- package/src/resources/get-bindings.ts +18 -0
- package/src/resources/git.ts +1 -1
- package/src/resources/list.ts +178 -34
- package/src/resources/plugin.ts +3 -0
- package/src/resources/provider-key.ts +327 -0
- package/src/resources/reference.ts +41 -85
- package/src/resources/render.ts +72 -38
- package/src/resources/routine.ts +152 -15
- package/src/resources/run/agent-exec.ts +95 -44
- package/src/resources/run/create.ts +27 -24
- package/src/resources/run/engines.ts +57 -0
- package/src/resources/run/environment.ts +43 -0
- package/src/resources/run/epilogue.ts +18 -17
- package/src/resources/run/files.ts +433 -0
- package/src/resources/run/header.ts +18 -18
- package/src/resources/run/prepare.ts +67 -74
- package/src/resources/run/references.ts +6 -5
- package/src/resources/run/resolve.ts +1 -1
- package/src/resources/run/resume.ts +28 -9
- package/src/resources/run/stream.ts +110 -9
- package/src/resources/run/workspace.ts +37 -47
- package/src/resources/run-approve.ts +2 -14
- package/src/resources/run-control.ts +4 -5
- package/src/resources/run-format.ts +3 -4
- package/src/resources/run-logs.ts +17 -6
- package/src/resources/run-scores.ts +14 -4
- package/src/resources/run-to-eval-case.ts +2 -2
- package/src/resources/runs.ts +5 -5
- package/src/resources/search.ts +1 -2
- package/src/resources/service-account.ts +4 -1
- package/src/resources/session.ts +10 -7
- package/src/resources/skill.ts +7 -8
- package/src/resources/stream/answer.ts +3 -19
- package/src/resources/stream/composer.ts +170 -0
- package/src/resources/stream/ink.tsx +74 -10
- package/src/resources/stream/render-plaintext.ts +22 -4
- package/src/resources/stream/tty.ts +1 -1
- package/src/resources/tag.ts +7 -9
- package/src/resources/usage.ts +19 -15
- package/src/resources/validate.ts +1 -10
- package/src/resources/version.ts +117 -15
- package/src/resources/views/agent.ts +60 -0
- package/src/resources/views/environment.ts +41 -0
- package/src/resources/views/index.ts +82 -0
- package/src/resources/views/organization.ts +29 -0
- package/src/resources/views/routine.ts +39 -0
- package/src/resources/views/run.ts +46 -0
- package/src/resources/views/session.ts +91 -0
- package/src/resources/views/skill.ts +49 -0
- package/src/resources/views/view.ts +188 -0
- package/src/resources/views/words.ts +191 -0
- package/src/runtime.ts +51 -2
- package/errors/exit-codes.d.ts +0 -10
- package/errors/exit-codes.d.ts.map +0 -1
- package/errors/exit-codes.js +0 -15
- package/errors/exit-codes.js.map +0 -1
- package/resources/run/attachments.d.ts +0 -24
- package/resources/run/attachments.d.ts.map +0 -1
- package/resources/run/attachments.js +0 -237
- package/resources/run/attachments.js.map +0 -1
- package/src/errors/exit-codes.ts +0 -17
- package/src/resources/run/attachments.ts +0 -300
- package/src/types/marked-terminal.d.ts +0 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/resources/reference.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/resources/reference.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,mBAAmB;AACnB,EAAE;AACF,iCAAiC;AACjC,sDAAsD;AACtD,gEAAgE;AAChE,EAAE;AACF,6EAA6E;AAC7E,8BAA8B;AAC9B,EAAE;AACF,gFAAgF;AAChF,+E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AAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QACvC,IAAI,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAChD,OAAO,iEAAiE,CAAC;QAC3E,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,8BAA8B,CAAC;AACxC,CAAC"}
|
package/resources/render.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DescMessage, JsonValue, Message } from "@bufbuild/protobuf";
|
|
2
2
|
import type { OutputFormat } from "../output/index.js";
|
|
3
|
+
import { type TerminalStream } from "../output/index.js";
|
|
3
4
|
export type JsonObject = Record<string, JsonValue>;
|
|
4
5
|
/** How a table cell names an organization value: its label, or the value as given. */
|
|
5
6
|
export type OrgLabel = (value: string) => string;
|
|
@@ -7,11 +8,14 @@ export type OrgLabel = (value: string) => string;
|
|
|
7
8
|
* A row extractor + headers describing a collection's table view. A table
|
|
8
9
|
* whose rows name organizations lists them in `orgs`, so the caller can
|
|
9
10
|
* label each distinct value once (by slug, in place of the id the rows
|
|
10
|
-
* carry) before the rows render through `orgLabel`.
|
|
11
|
+
* carry) before the rows render through `orgLabel`. `shrink` names the
|
|
12
|
+
* free-text columns (a description, a subject, a display name) that give up
|
|
13
|
+
* width on a narrow terminal; an id or a slug a person copies is never one.
|
|
11
14
|
*/
|
|
12
15
|
export interface TableShape {
|
|
13
16
|
readonly resourceName: string;
|
|
14
17
|
readonly headers: readonly string[];
|
|
18
|
+
readonly shrink?: readonly string[];
|
|
15
19
|
readonly row: (json: JsonObject, orgLabel: OrgLabel) => readonly string[];
|
|
16
20
|
readonly orgs?: (json: JsonObject) => readonly string[];
|
|
17
21
|
}
|
|
@@ -30,19 +34,39 @@ export declare function renderResource(schema: DescMessage, message: Message, fo
|
|
|
30
34
|
/**
|
|
31
35
|
* Render a collection for a read verb (json/yaml = protojson array, the
|
|
32
36
|
* wire as-is; table = grid, naming each organization by `orgLabels` where
|
|
33
|
-
* it holds one).
|
|
37
|
+
* it holds one, fitted to `stream`'s width when it is a terminal).
|
|
34
38
|
*/
|
|
35
|
-
export declare function renderCollection(schema: DescMessage, messages: readonly Message[], format: OutputFormat, table: TableShape, orgLabels?: ReadonlyMap<string, string
|
|
39
|
+
export declare function renderCollection(schema: DescMessage, messages: readonly Message[], format: OutputFormat, table: TableShape, orgLabels?: ReadonlyMap<string, string>, stream?: TerminalStream): string;
|
|
36
40
|
/** The organization values a human table's rows name; none for machine output or a table that names none. */
|
|
37
41
|
export declare function tableOrganizations(schema: DescMessage, messages: readonly Message[], format: OutputFormat, table: TableShape): readonly string[];
|
|
38
42
|
/**
|
|
39
43
|
* Render a *list message* (e.g. RunList, SessionList) for a read verb.
|
|
40
44
|
*
|
|
41
|
-
* Unlike `renderCollection`, which serializes a bare slice,
|
|
42
|
-
* `
|
|
43
|
-
* `next_page_token`), while table projects the nested `entries` into a grid.
|
|
45
|
+
* Unlike `renderCollection`, which serializes a bare slice, json/yaml emit the whole list envelope (including
|
|
46
|
+
* `next_page_token`), while table projects the nested `entries` into a grid fitted to `stream`'s width.
|
|
44
47
|
*/
|
|
45
|
-
export declare function renderListMessage(schema: DescMessage, message: Message, format: OutputFormat, table: TableShape): string;
|
|
48
|
+
export declare function renderListMessage(schema: DescMessage, message: Message, format: OutputFormat, table: TableShape, stream?: TerminalStream): string;
|
|
49
|
+
/**
|
|
50
|
+
* The engine and run settings a resource names, each empty when not set
|
|
51
|
+
* (protojson omits defaults, so an absent field is "not set here"). A turn
|
|
52
|
+
* records the settings it ran with on status.run_config, resolved from its
|
|
53
|
+
* message, its agent and its lane, so those are shown in place of what the
|
|
54
|
+
* message asked.
|
|
55
|
+
*/
|
|
56
|
+
export declare function runSettingFields(spec: JsonObject, status: JsonObject): Array<[string, string | undefined]>;
|
|
57
|
+
/**
|
|
58
|
+
* An instant to the minute in UTC, "2026-10-31 09:15 UTC": the same for
|
|
59
|
+
* every reader, wherever their machine is. A value that does not parse is
|
|
60
|
+
* shown as given; none, undefined.
|
|
61
|
+
*/
|
|
62
|
+
export declare function instant(value: string): string | undefined;
|
|
63
|
+
/** When a resource was created and last changed, from its audit ("" for either it does not carry). */
|
|
64
|
+
export declare function audited(json: JsonObject): {
|
|
65
|
+
created: string;
|
|
66
|
+
updated: string;
|
|
67
|
+
};
|
|
68
|
+
/** A protojson object, or {} for anything else. */
|
|
69
|
+
export declare function asObject(value: JsonValue | undefined): JsonObject;
|
|
46
70
|
/** Read a string field from a protojson object, defaulting to "". */
|
|
47
71
|
export declare function str(json: JsonObject, key: string): string;
|
|
48
72
|
/** Read a nested object field from a protojson object, defaulting to {}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/resources/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/resources/render.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EASL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD,sFAAsF;AACtF,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,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EACnB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,UAAU,EACjB,MAAM,GAAE,cAA+B,GACtC,MAAM,CASR;AA8BD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAc1G;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMzD;AAED,sGAAsG;AACtG,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAG9E;AAYD,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAEjE;AAED,qEAAqE;AACrE,wBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,4EAA4E;AAC5E,wBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAE7D;AAED,iEAAiE;AACjE,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE3D"}
|
package/resources/render.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
// Uniform rendering for read verbs.
|
|
2
2
|
//
|
|
3
|
-
// All resource protos share the ApiResourceMetadata envelope, so the
|
|
4
|
-
// (table) view of a single `get` is derived
|
|
5
|
-
// projection
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
3
|
+
// All resource protos share the ApiResourceMetadata envelope, so the generic
|
|
4
|
+
// human (table) view of a single `get` is derived from the protojson
|
|
5
|
+
// projection; the kinds a person reads most have a view designed for them
|
|
6
|
+
// instead (resources/views), and every other kind keeps this one. The common
|
|
7
|
+
// fields it adds are the ones several kinds share by name: the description,
|
|
8
|
+
// the settings a run starts from (spec.harness and spec.run_config: an
|
|
9
|
+
// agent's run defaults, a share's or channel's saved settings, a session's
|
|
10
|
+
// engine), and when it was created and last changed. json/yaml use the canonical protojson
|
|
11
|
+
// renderers for full fidelity. Collections render via the
|
|
12
|
+
// shared table renderer with a caller-supplied row extractor, fitted to the
|
|
13
|
+
// width of the terminal stdout is (piped, nothing is cut).
|
|
11
14
|
//
|
|
12
15
|
// The render boundary intentionally uses the base proto types (DescMessage /
|
|
13
16
|
// Message) so generic verb dispatch can pass a (schema, message) pair without
|
|
14
17
|
// threading a concrete type parameter through the registry.
|
|
15
|
-
import { protoToJsonValue, renderEmpty, renderProtoJson, renderProtoListJson, renderProtoListYaml, renderProtoYaml, renderTable, } from "../output/index.js";
|
|
18
|
+
import { protoToJsonValue, renderEmpty, renderProtoJson, renderProtoListJson, renderProtoListYaml, renderProtoYaml, renderTable, terminalWidth, } from "../output/index.js";
|
|
16
19
|
/** Render a single resource for a read verb (json/yaml = protojson, always complete; table = fields). */
|
|
17
20
|
export function renderResource(schema, message, format, options = {}) {
|
|
18
21
|
if (format === "json")
|
|
@@ -24,9 +27,9 @@ export function renderResource(schema, message, format, options = {}) {
|
|
|
24
27
|
/**
|
|
25
28
|
* Render a collection for a read verb (json/yaml = protojson array, the
|
|
26
29
|
* wire as-is; table = grid, naming each organization by `orgLabels` where
|
|
27
|
-
* it holds one).
|
|
30
|
+
* it holds one, fitted to `stream`'s width when it is a terminal).
|
|
28
31
|
*/
|
|
29
|
-
export function renderCollection(schema, messages, format, table, orgLabels = new Map()) {
|
|
32
|
+
export function renderCollection(schema, messages, format, table, orgLabels = new Map(), stream = process.stdout) {
|
|
30
33
|
if (format === "json")
|
|
31
34
|
return renderProtoListJson(schema, messages);
|
|
32
35
|
if (format === "yaml")
|
|
@@ -35,7 +38,7 @@ export function renderCollection(schema, messages, format, table, orgLabels = ne
|
|
|
35
38
|
return renderEmpty(table.resourceName);
|
|
36
39
|
const label = labelFrom(orgLabels);
|
|
37
40
|
const rows = messages.map((message) => table.row(asObject(protoToJsonValue(schema, message)), label));
|
|
38
|
-
return `\n${renderTable(table.headers, rows)}`;
|
|
41
|
+
return `\n${renderTable(table.headers, rows, { width: terminalWidth(stream), shrink: table.shrink })}`;
|
|
39
42
|
}
|
|
40
43
|
/** The organization values a human table's rows name; none for machine output or a table that names none. */
|
|
41
44
|
export function tableOrganizations(schema, messages, format, table) {
|
|
@@ -47,11 +50,10 @@ export function tableOrganizations(schema, messages, format, table) {
|
|
|
47
50
|
/**
|
|
48
51
|
* Render a *list message* (e.g. RunList, SessionList) for a read verb.
|
|
49
52
|
*
|
|
50
|
-
* Unlike `renderCollection`, which serializes a bare slice,
|
|
51
|
-
* `
|
|
52
|
-
* `next_page_token`), while table projects the nested `entries` into a grid.
|
|
53
|
+
* Unlike `renderCollection`, which serializes a bare slice, json/yaml emit the whole list envelope (including
|
|
54
|
+
* `next_page_token`), while table projects the nested `entries` into a grid fitted to `stream`'s width.
|
|
53
55
|
*/
|
|
54
|
-
export function renderListMessage(schema, message, format, table) {
|
|
56
|
+
export function renderListMessage(schema, message, format, table, stream = process.stdout) {
|
|
55
57
|
if (format === "json")
|
|
56
58
|
return renderProtoJson(schema, message);
|
|
57
59
|
if (format === "yaml")
|
|
@@ -62,7 +64,7 @@ export function renderListMessage(schema, message, format, table) {
|
|
|
62
64
|
const rows = (Array.isArray(list) ? list : []).map((entry) => table.row(asObject(entry), label));
|
|
63
65
|
if (rows.length === 0)
|
|
64
66
|
return renderEmpty(table.resourceName);
|
|
65
|
-
return `\n${renderTable(table.headers, rows)}`;
|
|
67
|
+
return `\n${renderTable(table.headers, rows, { width: terminalWidth(stream), shrink: table.shrink })}`;
|
|
66
68
|
}
|
|
67
69
|
// How a table names an organization: its label where one is known, else the value as given.
|
|
68
70
|
function labelFrom(orgLabels) {
|
|
@@ -81,32 +83,57 @@ function renderResourceFields(json, options) {
|
|
|
81
83
|
pushField(fields, "Org", options.orgLabel ?? metadata.org);
|
|
82
84
|
pushField(fields, "Visibility", metadata.visibility);
|
|
83
85
|
pushField(fields, "Description", spec.description);
|
|
84
|
-
|
|
86
|
+
for (const [key, value] of runSettingFields(spec, asObject(obj.status)))
|
|
87
|
+
pushField(fields, key, value);
|
|
88
|
+
const { created, updated } = audited(obj);
|
|
89
|
+
pushField(fields, "Created", instant(created));
|
|
90
|
+
pushField(fields, "Updated", instant(updated));
|
|
85
91
|
const width = Math.max(0, ...fields.map(([key]) => key.length));
|
|
86
92
|
const lines = fields.map(([key, value]) => ` ${key}:${" ".repeat(width - key.length + 2)}${value}`);
|
|
87
93
|
return `\n${lines.join("\n")}\n`;
|
|
88
94
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
/**
|
|
96
|
+
* The engine and run settings a resource names, each empty when not set
|
|
97
|
+
* (protojson omits defaults, so an absent field is "not set here"). A turn
|
|
98
|
+
* records the settings it ran with on status.run_config, resolved from its
|
|
99
|
+
* message, its agent and its lane, so those are shown in place of what the
|
|
100
|
+
* message asked.
|
|
101
|
+
*/
|
|
102
|
+
export function runSettingFields(spec, status) {
|
|
95
103
|
const runConfig = asObject(status.run_config ?? spec.run_config);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
return [
|
|
105
|
+
["Harness", enumWord(spec.harness, "HARNESS_")],
|
|
106
|
+
["Model", str(runConfig, "model_name")],
|
|
107
|
+
["Speed tier", enumWord(runConfig.service_tier, "SERVICE_TIER_")],
|
|
108
|
+
["Thinking", enumWord(runConfig.thinking_mode, "THINKING_MODE_")],
|
|
109
|
+
["Cost cap", typeof runConfig.max_cost_usd === "number" ? `$${runConfig.max_cost_usd} per message` : undefined],
|
|
110
|
+
["Tool rounds", typeof runConfig.max_tool_rounds === "number" ? `at most ${runConfig.max_tool_rounds} per message` : undefined],
|
|
111
|
+
[
|
|
112
|
+
"Tool result size",
|
|
113
|
+
typeof runConfig.max_tool_result_chars === "number" ? `at most ${runConfig.max_tool_result_chars} characters` : undefined,
|
|
114
|
+
],
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* An instant to the minute in UTC, "2026-10-31 09:15 UTC": the same for
|
|
119
|
+
* every reader, wherever their machine is. A value that does not parse is
|
|
120
|
+
* shown as given; none, undefined.
|
|
121
|
+
*/
|
|
122
|
+
export function instant(value) {
|
|
123
|
+
if (value === "")
|
|
124
|
+
return undefined;
|
|
125
|
+
const ms = Date.parse(value);
|
|
126
|
+
if (Number.isNaN(ms))
|
|
127
|
+
return value;
|
|
128
|
+
const iso = new Date(ms).toISOString();
|
|
129
|
+
return `${iso.slice(0, 10)} ${iso.slice(11, 16)} UTC`;
|
|
130
|
+
}
|
|
131
|
+
/** When a resource was created and last changed, from its audit ("" for either it does not carry). */
|
|
132
|
+
export function audited(json) {
|
|
133
|
+
const audit = asObject(asObject(asObject(json.status).audit).spec_audit);
|
|
134
|
+
return { created: str(audit, "created_at"), updated: str(audit, "updated_at") };
|
|
108
135
|
}
|
|
109
|
-
// A protojson enum name as the word a person reads ("
|
|
136
|
+
// A protojson enum name as the word a person reads ("HARNESS_CLAUDE" -> "claude").
|
|
110
137
|
function enumWord(value, prefix) {
|
|
111
138
|
if (typeof value !== "string")
|
|
112
139
|
return undefined;
|
|
@@ -116,7 +143,8 @@ function pushField(fields, key, value) {
|
|
|
116
143
|
if (typeof value === "string" && value !== "")
|
|
117
144
|
fields.push([key, value]);
|
|
118
145
|
}
|
|
119
|
-
|
|
146
|
+
/** A protojson object, or {} for anything else. */
|
|
147
|
+
export function asObject(value) {
|
|
120
148
|
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
|
|
121
149
|
}
|
|
122
150
|
/** Read a string field from a protojson object, defaulting to "". */
|
package/resources/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/resources/render.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/resources/render.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,uEAAuE;AACvE,2EAA2E;AAC3E,2FAA2F;AAC3F,0DAA0D;AAC1D,4EAA4E;AAC5E,2DAA2D;AAC3D,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,4DAA4D;AAI5D,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAkC5B,yGAAyG;AACzG,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,OAAgB,EAChB,MAAoB,EACpB,UAA+B,EAAE;IAEjC,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,OAAO,oBAAoB,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAmB,EACnB,QAA4B,EAC5B,MAAoB,EACpB,KAAiB,EACjB,YAAyC,IAAI,GAAG,EAAE,EAClD,SAAyB,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AM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,QAAQ,CAAC,KAA4B;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3G,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAE,GAAW;IAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAE,GAAW;IAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,IAAI,CAAC,IAAgB,EAAE,GAAW;IAChD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;AAC5B,CAAC"}
|
package/resources/routine.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import type { RoutineFire } from "@stigmer/apis/ai/stigmer/agentic/routine/v1/io_pb";
|
|
1
2
|
import type { Stigmer } from "@stigmer/client";
|
|
2
|
-
import { CommandResult } from "../output/index.js";
|
|
3
|
+
import { CommandResult, type TerminalStream } from "../output/index.js";
|
|
3
4
|
/**
|
|
4
|
-
* Resolve `ref` (an `rtn_…`
|
|
5
|
+
* Resolve `ref` (an `rtn_…` id, `org/slug`, or bare slug against `org`),
|
|
5
6
|
* clear its platform pause, and describe the outcome.
|
|
6
7
|
*/
|
|
7
8
|
export declare function resumeRoutine(stigmer: Stigmer, ref: string, org: string): Promise<CommandResult>;
|
|
8
9
|
/**
|
|
9
|
-
* Resolve `ref` (an `rtn_…`
|
|
10
|
-
* against `org`) and fire it once, immediately
|
|
10
|
+
* Resolve `ref` (an `rtn_…` id, `org/slug`, or bare slug
|
|
11
|
+
* against `org`) and fire it once, immediately, with `text` as the run's
|
|
12
|
+
* note when one is given.
|
|
11
13
|
*
|
|
12
14
|
* The fire is SYNCHRONOUS: the RPC runs the full run create pipeline
|
|
13
15
|
* and the result names the run's real outcome — the created run's
|
|
@@ -18,5 +20,19 @@ export declare function resumeRoutine(stigmer: Stigmer, ref: string, org: string
|
|
|
18
20
|
* teaching copy; the CLI relays the server's message verbatim (never
|
|
19
21
|
* pattern-match refusal text).
|
|
20
22
|
*/
|
|
21
|
-
export declare function fireRoutine(stigmer: Stigmer, ref: string, org: string): Promise<CommandResult>;
|
|
23
|
+
export declare function fireRoutine(stigmer: Stigmer, ref: string, org: string, text?: string): Promise<CommandResult>;
|
|
24
|
+
/** Output format for a fire history: a table, or the ledger rows as the server returned them. */
|
|
25
|
+
export type FiresFormat = "table" | "yaml" | "json";
|
|
26
|
+
export interface FiresStreams {
|
|
27
|
+
write(text: string): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve `ref` and render its newest `limit` fires (0 reads every page).
|
|
31
|
+
*/
|
|
32
|
+
export declare function showRoutineFires(stigmer: Stigmer, ref: string, org: string, limit: number, format: FiresFormat, streams?: FiresStreams): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* The table view of a fire history, fitted to `stream`'s width; a routine
|
|
35
|
+
* never fired says so. A fire's REASON is free text and gives up width first.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderFiresTable(fires: readonly RoutineFire[], stream?: TerminalStream): string;
|
|
22
38
|
//# sourceMappingURL=routine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routine.d.ts","sourceRoot":"","sources":["../src/resources/routine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routine.d.ts","sourceRoot":"","sources":["../src/resources/routine.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAErF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACL,aAAa,EAMb,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAS5B;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAatG;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAuCxB;AA2BD,iGAAiG;AACjG,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAID;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,YAA+B,GACvC,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,EAAE,MAAM,GAAE,cAA+B,GAAG,MAAM,CAK/G"}
|
package/resources/routine.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
// `routine resume` and `routine
|
|
2
|
-
// auto-pause from a routine and reports what was cleared
|
|
1
|
+
// `routine resume`, `routine fire` and `routine fires` dispatch. Resume
|
|
2
|
+
// clears a platform auto-pause from a routine and reports what was cleared;
|
|
3
|
+
// fire starts it now, with an optional note for that run; fires lists its
|
|
4
|
+
// fire history.
|
|
3
5
|
//
|
|
4
6
|
// "Paused" is the platform's latch (status.paused_reason, written after
|
|
5
7
|
// repeated failed runs), distinct from "disabled", the owner's switch
|
|
@@ -13,18 +15,28 @@
|
|
|
13
15
|
// versus "was not paused" can only be told apart by looking first. The
|
|
14
16
|
// resume call is made either way — on the no-op path it doubles as a
|
|
15
17
|
// harmless re-arm of the routine's schedule.
|
|
18
|
+
//
|
|
19
|
+
// The fire history's table shows one row per fire, newest first: when it
|
|
20
|
+
// was recorded, whether the schedule or a caller started it, who that
|
|
21
|
+
// caller was (a person, or a service account whose key another system
|
|
22
|
+
// holds), the outcome, the run and the reason. The caller's name and the
|
|
23
|
+
// reason are text from outside the CLI (a profile, a launch gate's copy),
|
|
24
|
+
// so each passes through the one-line cleaning `runs scores` uses. yaml and
|
|
25
|
+
// json print the ledger rows as the server returned them.
|
|
16
26
|
import { create } from "@bufbuild/protobuf";
|
|
17
27
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
18
|
-
import { FireRoutineInputSchema, RoutineFireOutcome } from "@stigmer/apis/ai/stigmer/agentic/routine/v1/io_pb";
|
|
28
|
+
import { FireRoutineInputSchema, ListRoutineFiresRequestSchema, RoutineFireOrigin, RoutineFireOutcome, RoutineFireSchema, } from "@stigmer/apis/ai/stigmer/agentic/routine/v1/io_pb";
|
|
19
29
|
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
20
30
|
import { UsageError } from "../errors/index.js";
|
|
21
|
-
import { CommandResult } from "../output/index.js";
|
|
22
|
-
import {
|
|
31
|
+
import { CommandResult, renderEmpty, renderProtoListJson, renderProtoListYaml, renderTable, terminalWidth, } from "../output/index.js";
|
|
32
|
+
import { readCursorPages } from "./cursor-pages.js";
|
|
33
|
+
import { idPrefixOf, parseReference } from "./reference.js";
|
|
34
|
+
import { oneLine } from "./run-scores.js";
|
|
23
35
|
import { requireOrganization } from "../client/single-org.js";
|
|
24
|
-
/** The routine kind's id
|
|
25
|
-
const
|
|
36
|
+
/** The routine kind's id prefix (proto kind_meta): `rtn`. */
|
|
37
|
+
const ROUTINE_ID_PREFIX = idPrefixOf(ApiResourceKind.routine);
|
|
26
38
|
/**
|
|
27
|
-
* Resolve `ref` (an `rtn_…`
|
|
39
|
+
* Resolve `ref` (an `rtn_…` id, `org/slug`, or bare slug against `org`),
|
|
28
40
|
* clear its platform pause, and describe the outcome.
|
|
29
41
|
*/
|
|
30
42
|
export async function resumeRoutine(stigmer, ref, org) {
|
|
@@ -39,19 +51,20 @@ export async function resumeRoutine(stigmer, ref, org) {
|
|
|
39
51
|
return describeOutcome(resumed, wasPausedReason, wasFailures);
|
|
40
52
|
}
|
|
41
53
|
async function loadRoutine(stigmer, ref, org) {
|
|
42
|
-
const parsed = parseReference(ref, org,
|
|
54
|
+
const parsed = parseReference(ref, org, ROUTINE_ID_PREFIX);
|
|
43
55
|
if (parsed.kind === "id") {
|
|
44
56
|
return stigmer.routine.get(parsed.id);
|
|
45
57
|
}
|
|
46
58
|
await requireOrganization(stigmer, parsed.org, [
|
|
47
59
|
"stigmer config context set --org <org>",
|
|
48
|
-
"stigmer routine
|
|
60
|
+
"stigmer routine <command> --org <org> ...",
|
|
49
61
|
]);
|
|
50
62
|
return stigmer.routine.getByReference({ org: parsed.org, slug: parsed.slug });
|
|
51
63
|
}
|
|
52
64
|
/**
|
|
53
|
-
* Resolve `ref` (an `rtn_…`
|
|
54
|
-
* against `org`) and fire it once, immediately
|
|
65
|
+
* Resolve `ref` (an `rtn_…` id, `org/slug`, or bare slug
|
|
66
|
+
* against `org`) and fire it once, immediately, with `text` as the run's
|
|
67
|
+
* note when one is given.
|
|
55
68
|
*
|
|
56
69
|
* The fire is SYNCHRONOUS: the RPC runs the full run create pipeline
|
|
57
70
|
* and the result names the run's real outcome — the created run's
|
|
@@ -62,13 +75,13 @@ async function loadRoutine(stigmer, ref, org) {
|
|
|
62
75
|
* teaching copy; the CLI relays the server's message verbatim (never
|
|
63
76
|
* pattern-match refusal text).
|
|
64
77
|
*/
|
|
65
|
-
export async function fireRoutine(stigmer, ref, org) {
|
|
78
|
+
export async function fireRoutine(stigmer, ref, org, text) {
|
|
66
79
|
const before = await loadRoutine(stigmer, ref, org);
|
|
67
80
|
const id = before.metadata?.id ?? "";
|
|
68
81
|
if (id === "") {
|
|
69
82
|
throw new UsageError(`Routine '${ref}' has no id — cannot fire`);
|
|
70
83
|
}
|
|
71
|
-
const fired = await stigmer.routine.fire(create(FireRoutineInputSchema, { id }));
|
|
84
|
+
const fired = await stigmer.routine.fire(create(FireRoutineInputSchema, text === undefined ? { id } : { id, text }));
|
|
72
85
|
const routine = fired.routine ?? before;
|
|
73
86
|
const slug = routine.metadata?.slug ?? "";
|
|
74
87
|
const name = routine.metadata?.name || slug;
|
|
@@ -76,6 +89,7 @@ export async function fireRoutine(stigmer, ref, org) {
|
|
|
76
89
|
const result = CommandResult.success(`Routine '${name}' fired — run started`);
|
|
77
90
|
const section = result.addSection();
|
|
78
91
|
section.field("Run", fired.runId);
|
|
92
|
+
section.field("Fire", fired.fireId);
|
|
79
93
|
section.field("Watch it", `stigmer get run ${fired.runId}`);
|
|
80
94
|
if (routine.status?.nextFireAt !== undefined) {
|
|
81
95
|
section.field("Next scheduled fire", timestampDate(routine.status.nextFireAt).toISOString());
|
|
@@ -91,7 +105,7 @@ export async function fireRoutine(stigmer, ref, org) {
|
|
|
91
105
|
const result = CommandResult.error(`Routine '${name}' fired, but ${what}`);
|
|
92
106
|
const section = result.addSection();
|
|
93
107
|
section.field("Reason", fired.refusalReason);
|
|
94
|
-
result.hint(
|
|
108
|
+
result.hint(`The fire is recorded in the routine's fire history (stigmer routine fires ${ref}); fix the cause and fire it again.`);
|
|
95
109
|
return result;
|
|
96
110
|
}
|
|
97
111
|
function describeOutcome(routine, wasPausedReason, wasFailures) {
|
|
@@ -115,4 +129,79 @@ function describeOutcome(routine, wasPausedReason, wasFailures) {
|
|
|
115
129
|
}
|
|
116
130
|
return result;
|
|
117
131
|
}
|
|
132
|
+
const FIRES_HEADERS = ["FIRED", "ORIGIN", "STARTED BY", "OUTCOME", "RUN", "REASON"];
|
|
133
|
+
/**
|
|
134
|
+
* Resolve `ref` and render its newest `limit` fires (0 reads every page).
|
|
135
|
+
*/
|
|
136
|
+
export async function showRoutineFires(stigmer, ref, org, limit, format, streams = defaultStreams()) {
|
|
137
|
+
const routine = await loadRoutine(stigmer, ref, org);
|
|
138
|
+
const routineId = routine.metadata?.id ?? "";
|
|
139
|
+
if (routineId === "") {
|
|
140
|
+
throw new UsageError(`Routine '${ref}' has no id — cannot list its fires`);
|
|
141
|
+
}
|
|
142
|
+
const fires = await readCursorPages(limit, (pageSize, pageToken) => stigmer.routine.listFires(create(ListRoutineFiresRequestSchema, { routineId, pageSize, pageToken })));
|
|
143
|
+
if (format === "yaml") {
|
|
144
|
+
streams.write(renderProtoListYaml(RoutineFireSchema, fires));
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (format === "json") {
|
|
148
|
+
streams.write(renderProtoListJson(RoutineFireSchema, fires));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
streams.write(renderFiresTable(fires));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The table view of a fire history, fitted to `stream`'s width; a routine
|
|
155
|
+
* never fired says so. A fire's REASON is free text and gives up width first.
|
|
156
|
+
*/
|
|
157
|
+
export function renderFiresTable(fires, stream = process.stdout) {
|
|
158
|
+
if (fires.length === 0) {
|
|
159
|
+
return renderEmpty("fires");
|
|
160
|
+
}
|
|
161
|
+
return `\n${renderTable(FIRES_HEADERS, fires.map(fireRow), { width: terminalWidth(stream), shrink: ["REASON"] })}\n`;
|
|
162
|
+
}
|
|
163
|
+
function fireRow(fire) {
|
|
164
|
+
return [
|
|
165
|
+
fire.recordedAt === undefined ? "" : timestampDate(fire.recordedAt).toISOString(),
|
|
166
|
+
ORIGIN_LABELS[fire.origin],
|
|
167
|
+
startedBy(fire),
|
|
168
|
+
OUTCOME_LABELS[fire.outcome],
|
|
169
|
+
fire.runId,
|
|
170
|
+
oneLine(fire.reason),
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
/** How a fire began, in words; keyed by every origin, so it stays exhaustive. */
|
|
174
|
+
const ORIGIN_LABELS = {
|
|
175
|
+
[RoutineFireOrigin.UNSPECIFIED]: "",
|
|
176
|
+
[RoutineFireOrigin.SCHEDULE]: "Scheduled",
|
|
177
|
+
[RoutineFireOrigin.MANUAL]: "Manual",
|
|
178
|
+
};
|
|
179
|
+
/** What a fire produced, in words; keyed by every outcome, so it stays exhaustive. */
|
|
180
|
+
const OUTCOME_LABELS = {
|
|
181
|
+
[RoutineFireOutcome.UNSPECIFIED]: "",
|
|
182
|
+
[RoutineFireOutcome.STARTED]: "started",
|
|
183
|
+
[RoutineFireOutcome.REFUSED]: "refused",
|
|
184
|
+
[RoutineFireOutcome.TARGET_MISSING]: "agent missing",
|
|
185
|
+
[RoutineFireOutcome.SKIPPED]: "skipped",
|
|
186
|
+
[RoutineFireOutcome.COMPLETED]: "completed",
|
|
187
|
+
[RoutineFireOutcome.FAILED]: "failed",
|
|
188
|
+
[RoutineFireOutcome.TIMED_OUT]: "timed out",
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Who started a fire: the caller's name, else email, else id, and the id
|
|
192
|
+
* of the service account whose key minted an app user's token when there
|
|
193
|
+
* is one. A schedule fire has no caller; its origin already says so.
|
|
194
|
+
*/
|
|
195
|
+
function startedBy(fire) {
|
|
196
|
+
const actor = fire.firedBy;
|
|
197
|
+
const who = oneLine(actor?.displayName || actor?.email || actor?.id || "");
|
|
198
|
+
if (who === "") {
|
|
199
|
+
return "—";
|
|
200
|
+
}
|
|
201
|
+
const mintedBy = oneLine(actor?.mintedBy ?? "");
|
|
202
|
+
return mintedBy === "" ? who : `${who} (through service account ${mintedBy})`;
|
|
203
|
+
}
|
|
204
|
+
function defaultStreams() {
|
|
205
|
+
return { write: (text) => void process.stdout.write(text) };
|
|
206
|
+
}
|
|
118
207
|
//# sourceMappingURL=routine.js.map
|
package/resources/routine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routine.js","sourceRoot":"","sources":["../src/resources/routine.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"routine.js","sourceRoot":"","sources":["../src/resources/routine.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,4EAA4E;AAC5E,0EAA0E;AAC1E,gBAAgB;AAChB,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,uEAAuE;AACvE,2EAA2E;AAC3E,oEAAoE;AACpE,uCAAuC;AACvC,EAAE;AACF,kEAAkE;AAClE,yEAAyE;AACzE,uEAAuE;AACvE,qEAAqE;AACrE,6CAA6C;AAC7C,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,sEAAsE;AACtE,yEAAyE;AACzE,0EAA0E;AAC1E,4EAA4E;AAC5E,0DAA0D;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,mFAAmF,CAAC;AAEpH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UA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EAAE,CAAC;QACf,OAAO,GAAG,CAAC;IACb,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;IAChD,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,6BAA6B,QAAQ,GAAG,CAAC;AAChF,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,EAAE,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;AACtE,CAAC"}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import type { Agent } from "@stigmer/apis/ai/stigmer/agentic/agent/v1/api_pb";
|
|
2
2
|
import type { BackendClient } from "../../client/index.js";
|
|
3
3
|
import type { PreparedRun } from "./prepare.js";
|
|
4
|
-
import { type RunOutputMode } from "./stream.js";
|
|
4
|
+
import { type RunOutputMode, type RunUntil } from "./stream.js";
|
|
5
5
|
export interface ResolvedAgentExecInput {
|
|
6
6
|
/** The agent to run; undefined is the built-in assistant. */
|
|
7
7
|
readonly agent: Agent | undefined;
|
|
8
8
|
readonly prepared: PreparedRun;
|
|
9
9
|
readonly org: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Where the turn's outputs are downloaded; "" skips download. */
|
|
11
11
|
readonly downloadDir: string;
|
|
12
12
|
readonly outputMode: RunOutputMode;
|
|
13
|
+
/** On a terminal: return when the person leaves (the default) or when the turn ends. */
|
|
14
|
+
readonly until?: RunUntil;
|
|
13
15
|
readonly client: BackendClient;
|
|
14
16
|
}
|
|
15
17
|
export declare function executeResolvedAgent(input: ResolvedAgentExecInput): Promise<void>;
|
|
18
|
+
/** A progress sink that can take back the lines it wrote. */
|
|
19
|
+
export type ProgressLines = ((line: string) => void) & {
|
|
20
|
+
/** Erases the lines written since the last `keep`, so the session view starts where they began. */
|
|
21
|
+
readonly clear: () => void;
|
|
22
|
+
/** Leaves what is on screen in place: something not to be erased (a warning) follows. */
|
|
23
|
+
readonly keep: () => void;
|
|
24
|
+
};
|
|
25
|
+
export declare function stderrProgress(stream?: NodeJS.WriteStream): ProgressLines;
|
|
16
26
|
//# sourceMappingURL=agent-exec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-exec.d.ts","sourceRoot":"","sources":["../../src/resources/run/agent-exec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-exec.d.ts","sourceRoot":"","sources":["../../src/resources/run/agent-exec.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AAG9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAA8B,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5F,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiFvF;AASD,6DAA6D;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG;IACrD,mGAAmG;IACnG,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAOF,wBAAgB,cAAc,CAAC,MAAM,GAAE,MAAM,CAAC,WAA4B,GAAG,aAAa,CAkBzF"}
|