@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
package/commands/help.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// What `stigmer --help` and every command's help say beyond the options: the
|
|
2
|
+
// groups the top-level commands sit in, in the order a person reaches for
|
|
3
|
+
// them (run and resume first, then your library, then the local stack, then
|
|
4
|
+
// settings), and each runnable command's short examples.
|
|
5
|
+
//
|
|
6
|
+
// The groups are Commander's own (`helpGroup`), so the docs generator
|
|
7
|
+
// (scripts/gen-cli-docs.ts) reads a command's group from the command and the
|
|
8
|
+
// reference pages cannot disagree with help. Groups appear in the order their
|
|
9
|
+
// first command is registered (program.ts registers by group).
|
|
10
|
+
//
|
|
11
|
+
// Each example is declared once, here, and printed under "Examples:" by
|
|
12
|
+
// `examples` (command-tree.ts). A command's reference page keeps its own
|
|
13
|
+
// hand-written Examples section, whose prose explains a line; the docs check
|
|
14
|
+
// fails when a help example is missing from its page, so the two cannot
|
|
15
|
+
// drift. Every example is parsed through the real program in a test, so one
|
|
16
|
+
// that stops parsing fails the build.
|
|
17
|
+
import { commandPath, documentedCommands, examples, runnableCommands } from "../command-tree.js";
|
|
18
|
+
/** The help groups, in the order help lists them. */
|
|
19
|
+
export const HELP_GROUPS = ["Run agents", "Your library", "Packages", "Local stack", "Account and access", "Configuration"];
|
|
20
|
+
/** The group of each top-level command a person sees. */
|
|
21
|
+
export const COMMAND_GROUPS = {
|
|
22
|
+
run: "Run agents",
|
|
23
|
+
resume: "Run agents",
|
|
24
|
+
runs: "Run agents",
|
|
25
|
+
get: "Your library",
|
|
26
|
+
list: "Your library",
|
|
27
|
+
search: "Your library",
|
|
28
|
+
apply: "Your library",
|
|
29
|
+
validate: "Your library",
|
|
30
|
+
delete: "Your library",
|
|
31
|
+
tag: "Your library",
|
|
32
|
+
agent: "Your library",
|
|
33
|
+
routine: "Your library",
|
|
34
|
+
channel: "Your library",
|
|
35
|
+
vault: "Your library",
|
|
36
|
+
file: "Your library",
|
|
37
|
+
connect: "Your library",
|
|
38
|
+
push: "Packages",
|
|
39
|
+
install: "Packages",
|
|
40
|
+
marketplace: "Packages",
|
|
41
|
+
mcp: "Packages",
|
|
42
|
+
eval: "Packages",
|
|
43
|
+
download: "Packages",
|
|
44
|
+
up: "Local stack",
|
|
45
|
+
down: "Local stack",
|
|
46
|
+
status: "Local stack",
|
|
47
|
+
logs: "Local stack",
|
|
48
|
+
setup: "Local stack",
|
|
49
|
+
reset: "Local stack",
|
|
50
|
+
"mcp-server": "Local stack",
|
|
51
|
+
auth: "Account and access",
|
|
52
|
+
apikey: "Account and access",
|
|
53
|
+
"service-account": "Account and access",
|
|
54
|
+
"provider-key": "Account and access",
|
|
55
|
+
"access-history": "Account and access",
|
|
56
|
+
usage: "Account and access",
|
|
57
|
+
config: "Configuration",
|
|
58
|
+
completion: "Configuration",
|
|
59
|
+
version: "Configuration",
|
|
60
|
+
};
|
|
61
|
+
/** Each runnable command's examples, by path. */
|
|
62
|
+
export const HELP_EXAMPLES = new Map([
|
|
63
|
+
["stigmer access-history export", [{ say: "everything, oldest first, one JSON object per line", run: "stigmer access-history export > access-history.jsonl" }, { say: "only what came after the last entry you hold", run: "stigmer access-history export --after 42 >> access-history.jsonl" }]],
|
|
64
|
+
["stigmer access-history list", [{ say: "the newest 50 changes", run: "stigmer access-history list" }, { say: "the newest 200, as JSON", run: "stigmer access-history list --limit 200 -o json" }]],
|
|
65
|
+
["stigmer agent quality", [{ say: "how the agent's runs were graded over the last 30 days, per version", run: "stigmer agent quality variance-reporter" }, { say: "the last week's failed grades, newest first", run: "stigmer agent quality variance-reporter --days 7 --flagged --limit 50" }]],
|
|
66
|
+
["stigmer apikey create", [{ say: "create a new API key", run: "stigmer apikey create --name \"ci-pipeline\"" }, { say: "create a key that never expires", run: "stigmer apikey create --name \"automation\" --never-expires" }]],
|
|
67
|
+
["stigmer apikey fingerprint", [{ say: "look up which key matches a raw token", run: "stigmer apikey fingerprint stk_abc123..." }]],
|
|
68
|
+
["stigmer apply", [{ say: "apply a single resource file", run: "stigmer apply -f agent.yaml" }, { say: "apply all resources in a directory", run: "stigmer apply -f ./manifests/" }]],
|
|
69
|
+
["stigmer auth login", [{ say: "log in to Stigmer Cloud", run: "stigmer auth login" }]],
|
|
70
|
+
["stigmer auth logout", [{ say: "log out", run: "stigmer auth logout" }]],
|
|
71
|
+
["stigmer auth whoami", [{ say: "check who you're logged in as", run: "stigmer auth whoami" }]],
|
|
72
|
+
["stigmer channel disable", [{ say: "pause any channel (web, Slack or WhatsApp), keeping its configuration", run: "stigmer channel disable acme-corp/variance-reporter-slack" }]],
|
|
73
|
+
["stigmer channel enable", [{ say: "turn it back on", run: "stigmer channel enable acme-corp/variance-reporter-slack" }]],
|
|
74
|
+
["stigmer channel link", [{ say: "turn on an Agent's chat link for your Organization's members", run: "stigmer channel link variance-reporter" }, { say: "make the link public and print the embed snippet", run: "stigmer channel link variance-reporter --audience public" }]],
|
|
75
|
+
["stigmer completion", [{ say: "install permanently", run: "stigmer completion bash > /etc/bash_completion.d/stigmer" }]],
|
|
76
|
+
["stigmer config backend add", [{ say: "register a self-hosted server (mint the key with `stigmer apikey create`)", run: "stigmer config backend add staging --endpoint stigmer.example.com:7234 --api-key stk_..." }]],
|
|
77
|
+
["stigmer config backend list", [{ say: "see what is configured", run: "stigmer config backend list" }]],
|
|
78
|
+
["stigmer config backend remove", [{ say: "remove one (switch away from it first)", run: "stigmer config backend remove staging" }]],
|
|
79
|
+
["stigmer config backend set", [{ say: "switch backend", run: "stigmer config backend set cloud" }]],
|
|
80
|
+
["stigmer config backend status", [{ say: "show which backend is active and whether it answers", run: "stigmer config backend status" }]],
|
|
81
|
+
["stigmer config backend use", [{ say: "switch between backends", run: "stigmer config backend use staging" }]],
|
|
82
|
+
["stigmer config context set", [{ say: "set active organization", run: "stigmer config context set --org my-org" }]],
|
|
83
|
+
["stigmer config context show", [{ say: "show the active organization", run: "stigmer config context show" }]],
|
|
84
|
+
["stigmer config get", [{ say: "print the active organization", run: "stigmer config get context.org" }]],
|
|
85
|
+
["stigmer config list", [{ say: "list all configuration values", run: "stigmer config list" }]],
|
|
86
|
+
["stigmer config path", [{ say: "show the config file path", run: "stigmer config path" }]],
|
|
87
|
+
["stigmer config set", [{ say: "make acme the active organization", run: "stigmer config set context.org acme" }]],
|
|
88
|
+
["stigmer connect plugin", [{ say: "list the tools the linear plugin's MCP server offers", run: "stigmer connect plugin linear" }]],
|
|
89
|
+
["stigmer delete", [{ say: "delete an agent by slug", run: "stigmer delete agent my-agent" }, { say: "delete an agent by ID", run: "stigmer delete agent agt_abc123" }]],
|
|
90
|
+
["stigmer down", [{ say: "stop the local stack", run: "stigmer down" }]],
|
|
91
|
+
["stigmer down server", [{ say: "stop the whole stack, as stigmer down does", run: "stigmer down server" }]],
|
|
92
|
+
["stigmer download", [{ say: "download all outputs from a run", run: "stigmer download run run_01abc123" }, { say: "download to a specific directory", run: "stigmer download run run_01abc123 --output-dir ./results/" }]],
|
|
93
|
+
["stigmer eval cancel", [{ say: "cancel a running eval run", run: "stigmer eval cancel evr_01abc123" }]],
|
|
94
|
+
["stigmer eval run", [{ say: "a plugin's own cases on the built-in assistant, with and without it", run: "stigmer eval run --plugin thermos" }, { say: "the cases of every plugin the agent attaches, on the agent", run: "stigmer eval run --agent variance-reporter" }, { say: "the cases of an Eval pushed with stigmer push eval, at its stable version", run: "stigmer eval run --agent variance-reporter --eval variance-reporter-evals@stable" }, { say: "the plugin's cases on the agent, with and without the plugin", run: "stigmer eval run --agent variance-reporter --plugin payroll" }]],
|
|
95
|
+
["stigmer file upload", [{ say: "upload a spreadsheet to reuse, and see the id it is named by", run: "stigmer file upload q3-ledger.xlsx" }, { say: "upload into a conversation you already have", run: "stigmer file upload notes.md --session ses_01abc123" }]],
|
|
96
|
+
["stigmer get", [{ say: "get an agent by slug", run: "stigmer get agent my-agent" }, { say: "get by org-qualified slug", run: "stigmer get agent acme-corp/variance-reporter" }]],
|
|
97
|
+
["stigmer install", [{ say: "install from the official catalogue by name", run: "stigmer install linear" }, { say: "install from a source you added, naming it", run: "stigmer install acme-plugins/thermos" }]],
|
|
98
|
+
["stigmer list", [{ say: "list all agents", run: "stigmer list agents" }, { say: "list available resource types", run: "stigmer list types" }]],
|
|
99
|
+
["stigmer logs", [{ say: "follow all components live (tail snapshot first)", run: "stigmer logs" }, { say: "show the last 100 lines and exit", run: "stigmer logs --no-follow --tail 100" }]],
|
|
100
|
+
["stigmer marketplace add", [{ say: "add your company's catalogue (a public GitHub repository with a marketplace file)", run: "stigmer marketplace add acme/agent-plugins" }, { say: "add a repository at a branch or tag, or from its URL", run: "stigmer marketplace add acme/agent-plugins@main" }]],
|
|
101
|
+
["stigmer marketplace list", [{ say: "see what is configured, and what one offers", run: "stigmer marketplace list" }]],
|
|
102
|
+
["stigmer marketplace remove", [{ say: "stop installing from one (plugins already installed stay)", run: "stigmer marketplace remove acme-plugins" }]],
|
|
103
|
+
["stigmer marketplace show", [{ say: "list what one catalogue offers", run: "stigmer marketplace show acme-plugins" }]],
|
|
104
|
+
["stigmer mcp add", [{ say: "add an MCP server as a plugin, sending a header from your environment", run: "stigmer mcp add acme https://mcp.acme.example/mcp --header 'Authorization=Bearer ${ACME_TOKEN}'" }]],
|
|
105
|
+
["stigmer mcp-server", [{ say: "serve on stdio, as an MCP client spawns it", run: "stigmer mcp-server" }, { say: "serve over HTTP on a port of your own", run: "stigmer mcp-server --transport http --port 9090" }]],
|
|
106
|
+
["stigmer provider-key delete", [{ say: "remove a key; asks first on a terminal", run: "stigmer provider-key delete anthropic" }]],
|
|
107
|
+
["stigmer provider-key list", [{ say: "see every provider and where it stands", run: "stigmer provider-key list" }]],
|
|
108
|
+
["stigmer provider-key set", [{ say: "save the Anthropic key, typed at a hidden prompt", run: "stigmer provider-key set anthropic" }, { say: "save a key from a script, through stdin", run: "stigmer provider-key set openai --key-stdin < openai.key" }]],
|
|
109
|
+
["stigmer push", [{ say: "push a skill from the current directory", run: "stigmer push skill" }, { say: "push from a specific directory", run: "stigmer push skill ./my-skill/" }]],
|
|
110
|
+
["stigmer reset", [{ say: "reset runtime data (configuration preserved), with confirmation", run: "stigmer reset" }, { say: "reset without the confirmation prompt", run: "stigmer reset --force" }]],
|
|
111
|
+
["stigmer resume", [{ say: "browse recent sessions interactively", run: "stigmer resume" }, { say: "resume by session ID", run: "stigmer resume ses_01j9z3k8m2q4r6t8v0w2y4a6c8" }]],
|
|
112
|
+
["stigmer routine fire", [{ say: "fire a routine once, right now — the fastest way to validate one", run: "stigmer routine fire my-org/daily-fee-reminders" }, { say: "start it with a note for this run, such as the alert that prompted it", run: "stigmer routine fire triage --text \"Sentry alert SEN-4521 fired\"" }]],
|
|
113
|
+
["stigmer routine fires", [{ say: "see who started each run, and how it went", run: "stigmer routine fires triage" }]],
|
|
114
|
+
["stigmer routine resume", [{ say: "clear a platform pause after fixing the underlying failure", run: "stigmer routine resume my-org/daily-fee-reminders" }]],
|
|
115
|
+
["stigmer run", [{ say: "run an agent with a message", run: "stigmer run my-agent -m \"Summarize the Q4 earnings report\"" }, { say: "give the shell back when the turn ends, with its outputs saved", run: "stigmer run variance-reporter --attach ledger.csv --download ./out --until turn -m \"Review this quarter's ledger.\"" }]],
|
|
116
|
+
["stigmer runs approve", [{ say: "allow the one tool call the run waits on", run: "stigmer runs approve run_01xyz789" }, { say: "deny a named call (its tool_use_id, from `stigmer runs logs`) with a reason", run: "stigmer runs approve run_01xyz789 --tool-call run_01xyz789.toolu_abc --action deny --comment \"not on prod\"" }]],
|
|
117
|
+
["stigmer runs cancel", [{ say: "cancel a run: every unfinished turn of its conversation stops", run: "stigmer runs cancel run_01abc123" }]],
|
|
118
|
+
["stigmer runs logs", [{ say: "follow a run's events until it ends", run: "stigmer runs logs run_01abc123 --follow" }]],
|
|
119
|
+
["stigmer runs pause", [{ say: "pause a run, saying why", run: "stigmer runs pause run_01abc123 --reason \"investigating issue\"" }]],
|
|
120
|
+
["stigmer runs resume", [{ say: "resume a paused run", run: "stigmer runs resume run_01abc123" }]],
|
|
121
|
+
["stigmer runs scores", [{ say: "people's thumbs, the run-health checks and the AI judge, one row per score", run: "stigmer runs scores run_01abc123" }, { say: "the scores as JSON, for a script", run: "stigmer runs scores run_01abc123 -o json" }]],
|
|
122
|
+
["stigmer runs terminate", [{ say: "force-stop immediately (unrecoverable)", run: "stigmer runs terminate run_01xyz789 --reason \"stuck run\"" }]],
|
|
123
|
+
["stigmer runs to-eval-case", [{ say: "write the case into evals/<name from the request>/", run: "stigmer runs to-eval-case run_01abc123" }, { say: "name the case, and also check that the plugin's review skill fired", run: "stigmer runs to-eval-case run_01abc123 --name finds-the-bug --skill thermos:review" }]],
|
|
124
|
+
["stigmer runs trace", [{ say: "list the run's events as YAML", run: "stigmer runs trace run_01abc123 -o yaml" }]],
|
|
125
|
+
["stigmer search", [{ say: "search for agents related to variance reports", run: "stigmer search agents \"variance report\"" }, { say: "output as JSON for scripting", run: "stigmer search agents \"data\" --output json" }]],
|
|
126
|
+
["stigmer service-account create", [{ say: "create a service account with the Member role", run: "stigmer service-account create ci-deploy" }, { say: "create one with another role", run: "stigmer service-account create release-bot --role admin" }]],
|
|
127
|
+
["stigmer service-account delete", [{ say: "delete one; every key it has stops working at once", run: "stigmer service-account delete ci-deploy" }]],
|
|
128
|
+
["stigmer service-account keys", [{ say: "list one's API keys; revoke one with: stigmer delete apikey <id>", run: "stigmer service-account keys ci-deploy" }]],
|
|
129
|
+
["stigmer service-account list", [{ say: "list the Organization's service accounts, newest first", run: "stigmer service-account list" }]],
|
|
130
|
+
["stigmer setup", [{ say: "interactive setup", run: "stigmer setup" }, { say: "non-interactive: configure Anthropic", run: "stigmer setup --provider anthropic --api-key sk-ant-xxx" }]],
|
|
131
|
+
["stigmer status", [{ say: "show component health and LLM configuration", run: "stigmer status" }, { say: "machine-readable status for scripts", run: "stigmer status --json" }]],
|
|
132
|
+
["stigmer tag", [{ say: "tag an agent version as stable, by the short hash the history prints", run: "stigmer tag agent acme-corp/variance-reporter 3f8a1c0e9b7d stable" }, { say: "the same, by its full 64-character hash", run: "stigmer tag agent acme-corp/variance-reporter 3f8a1c0e9b7d2a4c6e5f1b3d9a7c0e2f4b6d8a1c3e5f7b9d0a2c4e6f8b1d3a5c stable" }]],
|
|
133
|
+
["stigmer up", [{ say: "start the full local stack (server, runner, Temporal)", run: "stigmer up" }]],
|
|
134
|
+
["stigmer up server", [{ say: "start only the control plane (no runners)", run: "stigmer up server" }]],
|
|
135
|
+
["stigmer usage agent", [{ say: "view agent usage for a date range", run: "stigmer usage agent agt-01abc123 --from 2026-03-01 --to 2026-03-31" }]],
|
|
136
|
+
["stigmer usage hours", [{ say: "view the organization's agent hours (Stigmer Cloud)", run: "stigmer usage hours" }]],
|
|
137
|
+
["stigmer usage org", [{ say: "view organization-wide usage", run: "stigmer usage org --from 2026-03-01 --to 2026-03-31" }]],
|
|
138
|
+
["stigmer usage session", [{ say: "view usage for a specific session", run: "stigmer usage session ses_01j9z3k8m2q4r6t8v0w2y4a6c8" }]],
|
|
139
|
+
["stigmer validate", [{ say: "validate a single file", run: "stigmer validate -f agent.yaml" }, { say: "validate all YAML files in a directory", run: "stigmer validate -f ./manifests/" }]],
|
|
140
|
+
["stigmer vault connect-link", [{ say: "make a one-time sign-in page whose login lands in a shared vault", run: "stigmer vault connect-link ledger-keys --address https://mcp.linear.app/mcp --return-url https://app.example.com/settings" }]],
|
|
141
|
+
["stigmer vault create", [{ say: "create a shared vault for the finance team and add its key", run: "stigmer vault create \"Ledger keys\"" }]],
|
|
142
|
+
["stigmer vault mine", [{ say: "see what your vault holds (names only)", run: "stigmer vault mine" }]],
|
|
143
|
+
["stigmer vault remove-connection", [{ say: "remove the GitHub login from your vault", run: "stigmer vault remove-connection github.com --mine" }]],
|
|
144
|
+
["stigmer vault remove-secret", [{ say: "remove a key from a script, without the question", run: "stigmer vault remove-secret LINEAR_API_KEY --mine --force" }]],
|
|
145
|
+
["stigmer vault set-connection", [{ say: "save a GitHub token so private repositories clone", run: "stigmer vault set-connection github.com --mine --from-file ~/.github-token" }]],
|
|
146
|
+
["stigmer vault set-secret", [{ say: "save your OpenAI key in your own vault (prompts with hidden input)", run: "stigmer vault set-secret OPENAI_API_KEY --mine" }, { say: "save a key from an environment variable you already have", run: "stigmer vault set-secret LINEAR_API_KEY --mine --from-env LINEAR_API_KEY" }]],
|
|
147
|
+
["stigmer version", [{ say: "print the CLI version", run: "stigmer version" }]],
|
|
148
|
+
]);
|
|
149
|
+
/** `stigmer --help`'s own examples: the first three lines of the quickstart a person reaches for. */
|
|
150
|
+
export const ROOT_EXAMPLES = [
|
|
151
|
+
{ say: "start the local stack", run: "stigmer up" },
|
|
152
|
+
{
|
|
153
|
+
say: "run an agent on a file, and get the shell back with its outputs saved",
|
|
154
|
+
run: 'stigmer run variance-reporter --attach ledger.csv --download ./out --until turn -m "Review this quarter\'s ledger."',
|
|
155
|
+
},
|
|
156
|
+
{ say: "see an agent's instructions, skills and tools", run: "stigmer get agent variance-reporter" },
|
|
157
|
+
];
|
|
158
|
+
/** Give every top-level command its group, Commander's `help` the last one, and every runnable command its examples. */
|
|
159
|
+
export function applyHelp(program) {
|
|
160
|
+
examples(program, ROOT_EXAMPLES);
|
|
161
|
+
for (const cmd of documentedCommands(program)) {
|
|
162
|
+
const group = COMMAND_GROUPS[cmd.name()];
|
|
163
|
+
if (group !== undefined)
|
|
164
|
+
cmd.helpGroup(`${group}:`);
|
|
165
|
+
}
|
|
166
|
+
// Commander's own `help` joins the last group; the default is cleared at
|
|
167
|
+
// once, so a command added later has no group until it is given one.
|
|
168
|
+
program.commandsGroup("Configuration:").helpCommand(true).commandsGroup("");
|
|
169
|
+
for (const cmd of runnableCommands(program)) {
|
|
170
|
+
const list = HELP_EXAMPLES.get(commandPath(cmd));
|
|
171
|
+
if (list !== undefined)
|
|
172
|
+
examples(cmd, list);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/commands/help.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,yDAAyD;AACzD,EAAE;AACF,sEAAsE;AACtE,6EAA6E;AAC7E,8EAA8E;AAC9E,+DAA+D;AAC/D,EAAE;AACF,wEAAwE;AACxE,yEAAyE;AACzE,6EAA6E;AAC7E,wEAAwE;AACxE,4EAA4E;AAC5E,sCAAsC;AAGtC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAoB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEnH,qDAAqD;AACrD,MAAM,CAAC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QACE,GAAG,EAAE,uEAAuE;QAC5E,GAAG,EAAE,qHAAqH;KAC3H;IACD,EAAE,GAAG,EAAE,+CAA+C,EAAE,GAAG,EAAE,qCAAqC,EAAE;CACrG,CAAC;AAEF,wHAAwH;AACxH,MAAM,UAAU,SAAS,CAAC,OAAgB;IACxC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IACtD,CAAC;IACD,yEAAyE;IACzE,qEAAqE;IACrE,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC5E,KAAK,MAAM,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,IAAI,IAAI,KAAK,SAAS;YAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-daemon.d.ts","sourceRoot":"","sources":["../src/commands/internal-daemon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal-daemon.d.ts","sourceRoot":"","sources":["../src/commands/internal-daemon.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAU7D"}
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
// that `up` re-execs. It is not meant to be invoked directly; it runs the local
|
|
3
3
|
// stack until it receives SIGTERM/SIGINT, then exits with the daemon's code.
|
|
4
4
|
// (`stigmer up --foreground` runs the same body in the launching process.)
|
|
5
|
+
//
|
|
6
|
+
// The stop request is armed as the action's first act, before the daemon body
|
|
7
|
+
// is imported: `stigmer down` may arrive while the stack is still starting,
|
|
8
|
+
// and a signal with no handler yet would end this process and orphan whatever
|
|
9
|
+
// it had started (stigmer#1175).
|
|
10
|
+
import { shutdownOnSignals } from "../local/daemon/signals.js";
|
|
5
11
|
export function registerInternalDaemon(program) {
|
|
6
12
|
program
|
|
7
13
|
.command("internal-daemon", { hidden: true })
|
|
8
14
|
.description("internal: run the supervised local-stack daemon (do not invoke directly)")
|
|
9
15
|
.action(async () => {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
16
|
+
const shutdown = shutdownOnSignals();
|
|
17
|
+
const { runInternalDaemon } = await import("../local/daemon/process.js");
|
|
18
|
+
const code = await runInternalDaemon({ shutdown });
|
|
12
19
|
process.exit(code);
|
|
13
20
|
});
|
|
14
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-daemon.js","sourceRoot":"","sources":["../src/commands/internal-daemon.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,6EAA6E;AAC7E,2EAA2E;
|
|
1
|
+
{"version":3,"file":"internal-daemon.js","sourceRoot":"","sources":["../src/commands/internal-daemon.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,6EAA6E;AAC7E,2EAA2E;AAC3E,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAC9E,iCAAiC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO;SACJ,OAAO,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SAC5C,WAAW,CAAC,0EAA0E,CAAC;SACvF,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;QACrC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;QACzE,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/commands/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../src/commands/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../src/commands/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAenD;AAkGD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe1E"}
|
package/commands/list.js
CHANGED
|
@@ -4,6 +4,7 @@ import { stringify as toYaml } from "yaml";
|
|
|
4
4
|
import { ensureAuthenticated, resolveOrganization } from "../config/index.js";
|
|
5
5
|
import { UsageError } from "../errors/index.js";
|
|
6
6
|
import { renderTable } from "../output/index.js";
|
|
7
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
7
8
|
import { ALL_VERBS, defaultRegistry, Verb } from "../registry/index.js";
|
|
8
9
|
import { addReadFlags, globalOrg, readFormat } from "./shared.js";
|
|
9
10
|
const DEFAULT_LIMIT = 50;
|
|
@@ -14,6 +15,7 @@ export function registerList(program) {
|
|
|
14
15
|
.option("--limit <n>", "maximum number of results (0 reads every page)", String(DEFAULT_LIMIT))
|
|
15
16
|
.option("--verb <verb>", "filter to types supporting this verb (only for 'list types')")
|
|
16
17
|
.option("-l, --label <key=value>", "keep only resources carrying this label (repeatable; every pair must match)", collectLabel, [])
|
|
18
|
+
.option("--session <id>", "files: list one conversation's Files, what was given to it and what its turns saved (only for 'list files')")
|
|
17
19
|
.action((type, options, command) => runList(type, options, command));
|
|
18
20
|
addReadFlags(list);
|
|
19
21
|
}
|
|
@@ -22,6 +24,9 @@ async function runList(type, options, command) {
|
|
|
22
24
|
if ((options.label ?? []).length > 0) {
|
|
23
25
|
throw new UsageError("--label filters resources; 'list types' has none to filter");
|
|
24
26
|
}
|
|
27
|
+
if (options.session !== undefined) {
|
|
28
|
+
throw new UsageError("--session names a conversation whose Files to list; 'list types' has none");
|
|
29
|
+
}
|
|
25
30
|
process.stdout.write(renderTypes(options.verb, readFormat(options)));
|
|
26
31
|
return;
|
|
27
32
|
}
|
|
@@ -34,7 +39,10 @@ async function runList(type, options, command) {
|
|
|
34
39
|
// this; sessions shipped works-but-unadvertised through exactly such a
|
|
35
40
|
// bypass for two months (stigmer/stigmer#469).
|
|
36
41
|
const { isRunAlias } = await import("../resources/runs.js");
|
|
42
|
+
const sessionId = options.session ?? "";
|
|
37
43
|
if (isRunAlias(type)) {
|
|
44
|
+
if (options.session !== undefined)
|
|
45
|
+
throw sessionFilterRefusal(type);
|
|
38
46
|
await runListRuns(options, command, labels);
|
|
39
47
|
return;
|
|
40
48
|
}
|
|
@@ -45,6 +53,16 @@ async function runList(type, options, command) {
|
|
|
45
53
|
if (!info.supportedVerbs.has(Verb.List)) {
|
|
46
54
|
throw new UsageError(`${info.displayName} does not support 'list'`);
|
|
47
55
|
}
|
|
56
|
+
// A conversation holds Files and nothing else a list names, so the
|
|
57
|
+
// filter is refused for every other type rather than ignored.
|
|
58
|
+
if (options.session !== undefined) {
|
|
59
|
+
if (info.kind !== ApiResourceKind.file)
|
|
60
|
+
throw sessionFilterRefusal(type);
|
|
61
|
+
const { isSessionId } = await import("../resources/reference.js");
|
|
62
|
+
if (!isSessionId(sessionId)) {
|
|
63
|
+
throw new UsageError(`invalid session ID: ${sessionId}\n\nA conversation is named by its ID (e.g., ses_01abc123)`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
48
66
|
const [{ connectBackend }, { listResources }] = await Promise.all([
|
|
49
67
|
import("../backend.js"),
|
|
50
68
|
import("../resources/list.js"),
|
|
@@ -52,9 +70,12 @@ async function runList(type, options, command) {
|
|
|
52
70
|
const client = connectBackend();
|
|
53
71
|
ensureAuthenticated(client.config);
|
|
54
72
|
const org = resolveOrganization(client.config, globalOrg(command));
|
|
55
|
-
const rendered = await listResources(client.stigmer, info.kind, org, parseLimit(options.limit), readFormat(options), labels);
|
|
73
|
+
const rendered = await listResources(client.stigmer, info.kind, org, parseLimit(options.limit), readFormat(options), { labels, sessionId });
|
|
56
74
|
process.stdout.write(rendered);
|
|
57
75
|
}
|
|
76
|
+
function sessionFilterRefusal(type) {
|
|
77
|
+
return new UsageError(`--session lists one conversation's Files; 'list ${type}' takes no conversation (use 'list files --session <id>')`);
|
|
78
|
+
}
|
|
58
79
|
// Runs bypass the registry: they're listed by their own controller. Results are
|
|
59
80
|
// scoped to the resolved org context (--org flag, env, or configured context);
|
|
60
81
|
// an unset cloud context resolves to "" = permission-bounded across orgs.
|
package/commands/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../src/commands/list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,8EAA8E;AAG9E,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,U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,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzE,OAAO,KAAK,WAAW,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC;AAClE,CAAC"}
|
package/commands/logs.js
CHANGED
|
@@ -19,7 +19,7 @@ async function runLogs(options) {
|
|
|
19
19
|
const { allComponents, componentByName, followAll, printTail } = await import("../local/logs/view.js");
|
|
20
20
|
const { logDir } = await import("../local/paths.js");
|
|
21
21
|
const { CliExitError } = await import("../errors/cli-exit-error.js");
|
|
22
|
-
const { ExitCode } = await import("
|
|
22
|
+
const { ExitCode } = await import("@stigmer/client/exit-codes");
|
|
23
23
|
const dir = logDir(homedir());
|
|
24
24
|
const tail = Number.parseInt(options.tail ?? "50", 10);
|
|
25
25
|
const tailLines = Number.isNaN(tail) ? 50 : tail;
|
package/commands/logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../src/commands/logs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,uEAAuE;AACvE,EAAE;AACF,+DAA+D;AAC/D,wCAAwC;AACxC,yDAAyD;AAGzD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AASlC,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,iBAAiB,EAAE,sDAAsD,CAAC;SACjF,MAAM,CAAC,oBAAoB,EAAE,iDAAiD,EAAE,IAAI,CAAC;SACrF,MAAM,CAAC,wBAAwB,EAAE,+DAA+D,CAAC;SACjG,MAAM,CAAC,UAAU,EAAE,2DAA2D,CAAC;SAC/E,MAAM,CAAC,CAAC,OAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AACtD,CA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I,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,GAAS,EAAE;YAC1B,MAAM,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/commands/mcp-server.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
-
import type
|
|
2
|
+
import { type Config } from "../config/config.js";
|
|
3
|
+
/** The cloud backend whose sign-in the server's credential comes from. */
|
|
4
|
+
export interface CloudSignIn {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
/** The address the server dials, the entry's own or Stigmer Cloud's. */
|
|
7
|
+
readonly endpoint: string;
|
|
8
|
+
}
|
|
3
9
|
/** Flags the command bridges into the server's environment. */
|
|
4
10
|
export interface McpServerFlags {
|
|
5
11
|
transport?: string;
|
|
@@ -11,12 +17,16 @@ export interface McpServerFlags {
|
|
|
11
17
|
}
|
|
12
18
|
export declare function registerMcpServer(program: Command): void;
|
|
13
19
|
/**
|
|
14
|
-
* Bridge
|
|
15
|
-
* pre-existing environment variable (or a flag bridged before this)
|
|
16
|
-
*
|
|
17
|
-
*
|
|
20
|
+
* Bridge the active backend into the server's environment, but only where
|
|
21
|
+
* unset, so a pre-existing environment variable (or a flag bridged before this)
|
|
22
|
+
* wins. The local daemon is reached without auth; a named backend contributes
|
|
23
|
+
* its endpoint, and a self-hosted entry its API key. A cloud entry's sign-in is
|
|
24
|
+
* returned instead of bridged, for the caller to hand the server as a token
|
|
25
|
+
* provider. The credential goes only to its own backend: when the environment
|
|
26
|
+
* already names another address (a runner spawning this command for its
|
|
27
|
+
* server), none applies, and none does when a key was already given.
|
|
18
28
|
*/
|
|
19
|
-
export declare function applyConfigEnv(config: Config, env: NodeJS.ProcessEnv):
|
|
29
|
+
export declare function applyConfigEnv(config: Config, env: NodeJS.ProcessEnv): CloudSignIn | undefined;
|
|
20
30
|
/** Bridge explicitly-set flags into the server's environment (highest precedence). */
|
|
21
31
|
export declare function applyFlagsEnv(flags: McpServerFlags, env: NodeJS.ProcessEnv): void;
|
|
22
32
|
//# sourceMappingURL=mcp-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/commands/mcp-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/commands/mcp-server.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,qBAAqB,CAAC;AAGjE,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAeD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAYxD;AA6BD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,WAAW,GAAG,SAAS,CAiB9F;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAOjF"}
|
package/commands/mcp-server.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// The server is the TypeScript `@stigmer/mcp-server` package, and the CLI runs it
|
|
4
4
|
// IN-PROCESS via its `run(cfg, signal)` embed API — the module exists precisely
|
|
5
|
-
// so a host like the CLI embeds it rather than shelling out
|
|
6
|
-
// out only because Go cannot import TypeScript). This avoids a child process, an
|
|
5
|
+
// so a host like the CLI embeds it rather than shelling out. This avoids a child process, an
|
|
7
6
|
// npx/tsx resolution dance, and a second Node startup.
|
|
8
7
|
//
|
|
9
8
|
// MCP clients (Cursor, Claude Desktop, Windsurf) spawn `stigmer mcp-server` and
|
|
@@ -12,29 +11,31 @@
|
|
|
12
11
|
// CLI owns the shutdown signal and aborts the server's AbortController on
|
|
13
12
|
// SIGINT/SIGTERM.
|
|
14
13
|
//
|
|
15
|
-
// Configuration precedence
|
|
14
|
+
// Configuration precedence: flags > env > ~/.stigmer config
|
|
16
15
|
// > server defaults. We realize that precedence by bridging config into the
|
|
17
16
|
// environment only where unset, then letting explicit flags override, and finally
|
|
18
17
|
// letting the server read its Config from the environment.
|
|
18
|
+
//
|
|
19
|
+
// A cloud sign-in is the exception: its access token expires within the hour,
|
|
20
|
+
// and an IDE keeps this server running all day. So the token is not copied into
|
|
21
|
+
// the environment once; the server is handed a token provider over the signed-in
|
|
22
|
+
// backend instead (auth/token.ts, createBackendTokenSource), which refreshes the
|
|
23
|
+
// sign-in and saves it as every other command does. A given key (flag or
|
|
24
|
+
// environment) still wins and is never refreshed.
|
|
25
|
+
import { activeBackend } from "../config/config.js";
|
|
26
|
+
import { DEFAULT_CLOUD_ENDPOINT } from "../config/resolve.js";
|
|
19
27
|
const HELP_AFTER = `
|
|
20
28
|
Environment variables:
|
|
21
29
|
STIGMER_SERVER_ADDRESS gRPC address (default: CLI config, else localhost:7234)
|
|
22
|
-
STIGMER_API_KEY API key (
|
|
30
|
+
STIGMER_API_KEY API key (default: the active CLI backend's credential)
|
|
23
31
|
STIGMER_MCP_TRANSPORT stdio | http | both (default: stdio)
|
|
24
32
|
STIGMER_MCP_ROSTER full | channels | memory (default: full; channels = send_channel_message only, memory = remember only)
|
|
25
33
|
STIGMER_MCP_HTTP_PORT HTTP listen port (default: 8080)
|
|
26
34
|
STIGMER_MCP_LOG_FORMAT text | json (default: text)
|
|
27
35
|
STIGMER_MCP_LOG_LEVEL debug | info | warn | error (default: info)
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
$ stigmer mcp-server
|
|
32
|
-
|
|
33
|
-
# HTTP mode on a custom port
|
|
34
|
-
$ stigmer mcp-server --transport http --port 9090
|
|
35
|
-
|
|
36
|
-
# Cursor mcp.json:
|
|
37
|
-
# { "command": "stigmer", "args": ["mcp-server"] }`;
|
|
37
|
+
In Cursor's mcp.json:
|
|
38
|
+
{ "command": "stigmer", "args": ["mcp-server"] }`;
|
|
38
39
|
export function registerMcpServer(program) {
|
|
39
40
|
program
|
|
40
41
|
.command("mcp-server")
|
|
@@ -50,16 +51,22 @@ export function registerMcpServer(program) {
|
|
|
50
51
|
}
|
|
51
52
|
async function runMcpServer(flags) {
|
|
52
53
|
const { load } = await import("../config/config.js");
|
|
53
|
-
|
|
54
|
+
// Flags first, then the config fills only what is still unset: the same
|
|
55
|
+
// precedence, with the final address known before a credential is bridged.
|
|
54
56
|
applyFlagsEnv(flags, process.env);
|
|
57
|
+
const signIn = applyConfigEnv(load(), process.env);
|
|
55
58
|
// Imported lazily so `stigmer --help`/`version` never pull in the MCP stack.
|
|
56
59
|
const { run, defaultConfig } = await import("@stigmer/mcp-server");
|
|
60
|
+
const { createBackendTokenSource } = await import("../auth/token.js");
|
|
61
|
+
const options = signIn === undefined
|
|
62
|
+
? {}
|
|
63
|
+
: { getAccessToken: createBackendTokenSource(signIn.name, signIn.endpoint).getAccessToken };
|
|
57
64
|
const controller = new AbortController();
|
|
58
65
|
const onSignal = () => controller.abort();
|
|
59
66
|
process.once("SIGINT", onSignal);
|
|
60
67
|
process.once("SIGTERM", onSignal);
|
|
61
68
|
try {
|
|
62
|
-
await run(defaultConfig(), controller.signal);
|
|
69
|
+
await run(defaultConfig(), controller.signal, options);
|
|
63
70
|
}
|
|
64
71
|
finally {
|
|
65
72
|
process.removeListener("SIGINT", onSignal);
|
|
@@ -67,21 +74,36 @@ async function runMcpServer(flags) {
|
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
/**
|
|
70
|
-
* Bridge
|
|
71
|
-
* pre-existing environment variable (or a flag bridged before this)
|
|
72
|
-
*
|
|
73
|
-
*
|
|
77
|
+
* Bridge the active backend into the server's environment, but only where
|
|
78
|
+
* unset, so a pre-existing environment variable (or a flag bridged before this)
|
|
79
|
+
* wins. The local daemon is reached without auth; a named backend contributes
|
|
80
|
+
* its endpoint, and a self-hosted entry its API key. A cloud entry's sign-in is
|
|
81
|
+
* returned instead of bridged, for the caller to hand the server as a token
|
|
82
|
+
* provider. The credential goes only to its own backend: when the environment
|
|
83
|
+
* already names another address (a runner spawning this command for its
|
|
84
|
+
* server), none applies, and none does when a key was already given.
|
|
74
85
|
*/
|
|
75
86
|
export function applyConfigEnv(config, env) {
|
|
76
|
-
|
|
87
|
+
// Both already given (flags, or a runner's own environment): the config is
|
|
88
|
+
// not read, so a dangling current_backend cannot stop a server that needs
|
|
89
|
+
// nothing from it.
|
|
90
|
+
if (isSet(env.STIGMER_SERVER_ADDRESS) && isSet(env.STIGMER_API_KEY))
|
|
91
|
+
return undefined;
|
|
92
|
+
const { name, entry } = activeBackend(config);
|
|
93
|
+
if (entry === undefined) {
|
|
77
94
|
setIfEmpty(env, "STIGMER_SERVER_ADDRESS", "localhost:7234");
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const cloud = config.backend.cloud;
|
|
81
|
-
if (cloud !== undefined) {
|
|
82
|
-
setIfEmpty(env, "STIGMER_SERVER_ADDRESS", cloud.endpoint);
|
|
83
|
-
setIfEmpty(env, "STIGMER_API_KEY", cloud.token);
|
|
95
|
+
return undefined;
|
|
84
96
|
}
|
|
97
|
+
const endpoint = entry.endpoint || (entry.type === "cloud" ? DEFAULT_CLOUD_ENDPOINT : undefined);
|
|
98
|
+
if (endpoint === undefined)
|
|
99
|
+
return undefined;
|
|
100
|
+
setIfEmpty(env, "STIGMER_SERVER_ADDRESS", endpoint);
|
|
101
|
+
if (env.STIGMER_SERVER_ADDRESS !== endpoint || isSet(env.STIGMER_API_KEY))
|
|
102
|
+
return undefined;
|
|
103
|
+
if (entry.type === "cloud")
|
|
104
|
+
return { name, endpoint };
|
|
105
|
+
setIfEmpty(env, "STIGMER_API_KEY", entry.api_key);
|
|
106
|
+
return undefined;
|
|
85
107
|
}
|
|
86
108
|
/** Bridge explicitly-set flags into the server's environment (highest precedence). */
|
|
87
109
|
export function applyFlagsEnv(flags, env) {
|
|
@@ -92,6 +114,9 @@ export function applyFlagsEnv(flags, env) {
|
|
|
92
114
|
setIfPresent(env, "STIGMER_MCP_LOG_FORMAT", flags.logFormat);
|
|
93
115
|
setIfPresent(env, "STIGMER_MCP_LOG_LEVEL", flags.logLevel);
|
|
94
116
|
}
|
|
117
|
+
function isSet(value) {
|
|
118
|
+
return value !== undefined && value !== "";
|
|
119
|
+
}
|
|
95
120
|
function setIfEmpty(env, key, value) {
|
|
96
121
|
if (value !== undefined && value !== "" && (env[key] === undefined || env[key] === "")) {
|
|
97
122
|
env[key] = value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/commands/mcp-server.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,kFAAkF;AAClF,gFAAgF;AAChF,
|
|
1
|
+
{"version":3,"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