@stigmer/cli 3.35.0 → 3.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/auth0.d.ts.map +1 -1
- package/auth/auth0.js.map +1 -1
- package/auth/callback-server.d.ts.map +1 -1
- package/auth/callback-server.js.map +1 -1
- package/auth/index.d.ts.map +1 -1
- package/auth/index.js.map +1 -1
- package/auth/login.d.ts.map +1 -1
- package/auth/login.js.map +1 -1
- package/auth/pages.d.ts.map +1 -1
- package/auth/pages.js.map +1 -1
- package/auth/pkce.d.ts.map +1 -1
- package/auth/pkce.js.map +1 -1
- package/auth/token.d.ts.map +1 -1
- package/auth/token.js.map +1 -1
- package/backend.d.ts.map +1 -1
- package/backend.js.map +1 -1
- package/cli/stigmer.d.ts.map +1 -1
- package/cli/stigmer.js.map +1 -1
- package/client/client.d.ts.map +1 -1
- package/client/client.js.map +1 -1
- package/client/index.d.ts.map +1 -1
- package/client/index.js.map +1 -1
- package/commands/agent-exec-flags.d.ts.map +1 -1
- package/commands/agent-exec-flags.js.map +1 -1
- package/commands/apikey/duration.d.ts.map +1 -1
- package/commands/apikey/duration.js.map +1 -1
- package/commands/apikey/index.d.ts.map +1 -1
- package/commands/apikey/index.js.map +1 -1
- package/commands/apply.d.ts.map +1 -1
- package/commands/apply.js.map +1 -1
- package/commands/auth/index.d.ts.map +1 -1
- package/commands/auth/index.js.map +1 -1
- package/commands/auth/login.d.ts.map +1 -1
- package/commands/auth/login.js.map +1 -1
- package/commands/auth/whoami.d.ts.map +1 -1
- package/commands/auth/whoami.js.map +1 -1
- package/commands/bootstrap.d.ts.map +1 -1
- package/commands/bootstrap.js.map +1 -1
- package/commands/completion.d.ts.map +1 -1
- package/commands/completion.js.map +1 -1
- package/commands/config/backend.d.ts.map +1 -1
- package/commands/config/backend.js.map +1 -1
- package/commands/config/context.d.ts.map +1 -1
- package/commands/config/context.js.map +1 -1
- package/commands/config/index.d.ts.map +1 -1
- package/commands/config/index.js.map +1 -1
- package/commands/config/kv.d.ts.map +1 -1
- package/commands/config/kv.js.map +1 -1
- package/commands/connect.d.ts.map +1 -1
- package/commands/connect.js.map +1 -1
- package/commands/delete.d.ts.map +1 -1
- package/commands/delete.js.map +1 -1
- package/commands/diff.d.ts.map +1 -1
- package/commands/diff.js.map +1 -1
- package/commands/down.d.ts.map +1 -1
- package/commands/down.js.map +1 -1
- package/commands/download.d.ts.map +1 -1
- package/commands/download.js.map +1 -1
- package/commands/execution/approve.d.ts.map +1 -1
- package/commands/execution/approve.js.map +1 -1
- package/commands/execution/control.d.ts.map +1 -1
- package/commands/execution/control.js.map +1 -1
- package/commands/execution/index.d.ts.map +1 -1
- package/commands/execution/index.js.map +1 -1
- package/commands/execution/logs.d.ts.map +1 -1
- package/commands/execution/logs.js.map +1 -1
- package/commands/execution/trace.d.ts.map +1 -1
- package/commands/execution/trace.js.map +1 -1
- package/commands/get.d.ts.map +1 -1
- package/commands/get.js.map +1 -1
- package/commands/install.d.ts.map +1 -1
- package/commands/install.js.map +1 -1
- package/commands/internal-daemon.d.ts.map +1 -1
- package/commands/internal-daemon.js.map +1 -1
- package/commands/list.d.ts.map +1 -1
- package/commands/list.js.map +1 -1
- package/commands/logs.d.ts.map +1 -1
- package/commands/logs.js.map +1 -1
- package/commands/marketplace.d.ts.map +1 -1
- package/commands/marketplace.js.map +1 -1
- package/commands/mcp-server.d.ts.map +1 -1
- package/commands/mcp-server.js.map +1 -1
- package/commands/push.d.ts.map +1 -1
- package/commands/push.js.map +1 -1
- package/commands/reset.d.ts.map +1 -1
- package/commands/reset.js.map +1 -1
- package/commands/resume.d.ts.map +1 -1
- package/commands/resume.js.map +1 -1
- package/commands/run.d.ts.map +1 -1
- package/commands/run.js.map +1 -1
- package/commands/schedule.d.ts.map +1 -1
- package/commands/schedule.js.map +1 -1
- package/commands/search.d.ts.map +1 -1
- package/commands/search.js.map +1 -1
- package/commands/setup.d.ts.map +1 -1
- package/commands/setup.js.map +1 -1
- package/commands/share.d.ts.map +1 -1
- package/commands/share.js.map +1 -1
- package/commands/shared.d.ts.map +1 -1
- package/commands/shared.js.map +1 -1
- package/commands/status.d.ts.map +1 -1
- package/commands/status.js.map +1 -1
- package/commands/tag.d.ts.map +1 -1
- package/commands/tag.js.map +1 -1
- package/commands/up.d.ts.map +1 -1
- package/commands/up.js.map +1 -1
- package/commands/usage.d.ts.map +1 -1
- package/commands/usage.js.map +1 -1
- package/commands/validate.d.ts.map +1 -1
- package/commands/validate.js.map +1 -1
- package/commands/version.d.ts.map +1 -1
- package/commands/version.js.map +1 -1
- package/config/config.d.ts.map +1 -1
- package/config/config.js.map +1 -1
- package/config/index.d.ts.map +1 -1
- package/config/index.js.map +1 -1
- package/config/keys.d.ts.map +1 -1
- package/config/keys.js.map +1 -1
- package/config/paths.d.ts.map +1 -1
- package/config/paths.js.map +1 -1
- package/config/resolve.d.ts.map +1 -1
- package/config/resolve.js.map +1 -1
- package/errors/classify.d.ts.map +1 -1
- package/errors/classify.js.map +1 -1
- package/errors/cli-exit-error.d.ts.map +1 -1
- package/errors/cli-exit-error.js.map +1 -1
- package/errors/exit-codes.d.ts.map +1 -1
- package/errors/exit-codes.js.map +1 -1
- package/errors/handle.d.ts.map +1 -1
- package/errors/handle.js.map +1 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js.map +1 -1
- package/errors/usage-error.d.ts.map +1 -1
- package/errors/usage-error.js.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/local/artifact.d.ts.map +1 -1
- package/local/artifact.js.map +1 -1
- package/local/bootstrap.d.ts.map +1 -1
- package/local/bootstrap.js.map +1 -1
- package/local/constants.d.ts.map +1 -1
- package/local/constants.js.map +1 -1
- package/local/daemon/components.d.ts.map +1 -1
- package/local/daemon/components.js.map +1 -1
- package/local/daemon/env.d.ts.map +1 -1
- package/local/daemon/env.js.map +1 -1
- package/local/daemon/host.d.ts.map +1 -1
- package/local/daemon/host.js.map +1 -1
- package/local/daemon/index.d.ts.map +1 -1
- package/local/daemon/index.js.map +1 -1
- package/local/daemon/launch.d.ts.map +1 -1
- package/local/daemon/launch.js.map +1 -1
- package/local/daemon/process.d.ts.map +1 -1
- package/local/daemon/process.js.map +1 -1
- package/local/daemon/supervisor.d.ts.map +1 -1
- package/local/daemon/supervisor.js.map +1 -1
- package/local/daemon/types.d.ts.map +1 -1
- package/local/daemon/types.js.map +1 -1
- package/local/llm-config.d.ts.map +1 -1
- package/local/llm-config.js.map +1 -1
- package/local/logs/tail.d.ts.map +1 -1
- package/local/logs/tail.js.map +1 -1
- package/local/logs/view.d.ts.map +1 -1
- package/local/logs/view.js.map +1 -1
- package/local/net/tcp.d.ts.map +1 -1
- package/local/net/tcp.js.map +1 -1
- package/local/operator-config.d.ts.map +1 -1
- package/local/operator-config.js.map +1 -1
- package/local/paths.d.ts.map +1 -1
- package/local/paths.js.map +1 -1
- package/local/reset.d.ts.map +1 -1
- package/local/reset.js.map +1 -1
- package/local/runtime/index.d.ts.map +1 -1
- package/local/runtime/index.js.map +1 -1
- package/local/runtime/node.d.ts.map +1 -1
- package/local/runtime/node.js.map +1 -1
- package/local/runtime/runner.d.ts.map +1 -1
- package/local/runtime/runner.js.map +1 -1
- package/local/runtime/runtimes-install.d.ts.map +1 -1
- package/local/runtime/runtimes-install.js.map +1 -1
- package/local/runtime/server.d.ts.map +1 -1
- package/local/runtime/server.js.map +1 -1
- package/local/runtime/which.d.ts.map +1 -1
- package/local/runtime/which.js.map +1 -1
- package/local/setup/prompt.d.ts.map +1 -1
- package/local/setup/prompt.js.map +1 -1
- package/local/setup/wizard.d.ts.map +1 -1
- package/local/setup/wizard.js.map +1 -1
- package/local/state/health-state.d.ts.map +1 -1
- package/local/state/health-state.js.map +1 -1
- package/local/state/index.d.ts.map +1 -1
- package/local/state/index.js.map +1 -1
- package/local/state/lock.d.ts.map +1 -1
- package/local/state/lock.js.map +1 -1
- package/local/state/log-rotation.d.ts.map +1 -1
- package/local/state/log-rotation.js.map +1 -1
- package/local/state/pidfile.d.ts.map +1 -1
- package/local/state/pidfile.js.map +1 -1
- package/local/state/proc.d.ts.map +1 -1
- package/local/state/proc.js.map +1 -1
- package/local/state/startup-config.d.ts.map +1 -1
- package/local/state/startup-config.js.map +1 -1
- package/local/status.d.ts.map +1 -1
- package/local/status.js.map +1 -1
- package/local/temporal/download.d.ts.map +1 -1
- package/local/temporal/download.js.map +1 -1
- package/local/temporal/index.d.ts.map +1 -1
- package/local/temporal/index.js.map +1 -1
- package/local/temporal/inspect.d.ts.map +1 -1
- package/local/temporal/inspect.js.map +1 -1
- package/local/temporal/manager.d.ts.map +1 -1
- package/local/temporal/manager.js.map +1 -1
- package/local/temporal/supervisor.d.ts.map +1 -1
- package/local/temporal/supervisor.js.map +1 -1
- package/local/webconsole/index.d.ts.map +1 -1
- package/local/webconsole/index.js.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.js.map +1 -1
- package/marketplace/config.d.ts.map +1 -1
- package/marketplace/config.js.map +1 -1
- package/marketplace/github.d.ts.map +1 -1
- package/marketplace/github.js.map +1 -1
- package/marketplace/index.d.ts.map +1 -1
- package/marketplace/index.js.map +1 -1
- package/marketplace/install.d.ts.map +1 -1
- package/marketplace/install.js.map +1 -1
- package/marketplace/materialize.d.ts.map +1 -1
- package/marketplace/materialize.js.map +1 -1
- package/marketplace/official.d.ts.map +1 -1
- package/marketplace/official.js.map +1 -1
- package/marketplace/read.d.ts.map +1 -1
- package/marketplace/read.js.map +1 -1
- package/marketplace/ref.d.ts.map +1 -1
- package/marketplace/ref.js.map +1 -1
- package/marketplace/render.d.ts.map +1 -1
- package/marketplace/render.js.map +1 -1
- package/output/command-result.d.ts.map +1 -1
- package/output/command-result.js.map +1 -1
- package/output/confirm.d.ts.map +1 -1
- package/output/confirm.js.map +1 -1
- package/output/format.d.ts.map +1 -1
- package/output/format.js.map +1 -1
- package/output/index.d.ts.map +1 -1
- package/output/index.js.map +1 -1
- package/output/ndjson.d.ts.map +1 -1
- package/output/ndjson.js.map +1 -1
- package/output/proto.d.ts.map +1 -1
- package/output/proto.js.map +1 -1
- package/output/style.d.ts.map +1 -1
- package/output/style.js.map +1 -1
- package/output/table.d.ts.map +1 -1
- package/output/table.js.map +1 -1
- package/package.json +7 -7
- package/program.d.ts.map +1 -1
- package/program.js.map +1 -1
- package/registry/aliases.d.ts.map +1 -1
- package/registry/aliases.js.map +1 -1
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js.map +1 -1
- package/registry/metadata.d.ts.map +1 -1
- package/registry/metadata.js.map +1 -1
- package/registry/registry.d.ts.map +1 -1
- package/registry/registry.js.map +1 -1
- package/registry/verb-support.d.ts.map +1 -1
- package/registry/verb-support.js.map +1 -1
- package/registry/verbs.d.ts.map +1 -1
- package/registry/verbs.js.map +1 -1
- package/resources/apply/apply.d.ts.map +1 -1
- package/resources/apply/apply.js.map +1 -1
- package/resources/apply/discovery.d.ts.map +1 -1
- package/resources/apply/discovery.js.map +1 -1
- package/resources/apply/handlers.d.ts.map +1 -1
- package/resources/apply/handlers.js.map +1 -1
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/discover.d.ts.map +1 -1
- package/resources/connect/discover.js.map +1 -1
- package/resources/connect/display.d.ts.map +1 -1
- package/resources/connect/display.js.map +1 -1
- package/resources/connect/oauth.d.ts.map +1 -1
- package/resources/connect/oauth.js.map +1 -1
- package/resources/cursor-pages.d.ts.map +1 -1
- package/resources/cursor-pages.js.map +1 -1
- package/resources/delete.d.ts.map +1 -1
- package/resources/delete.js.map +1 -1
- package/resources/diff.d.ts.map +1 -1
- package/resources/diff.js.map +1 -1
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js.map +1 -1
- package/resources/download.d.ts.map +1 -1
- package/resources/download.js.map +1 -1
- package/resources/execution-approve.d.ts.map +1 -1
- package/resources/execution-approve.js.map +1 -1
- package/resources/execution-control.d.ts.map +1 -1
- package/resources/execution-control.js.map +1 -1
- package/resources/execution-format.d.ts.map +1 -1
- package/resources/execution-format.js.map +1 -1
- package/resources/execution-logs.d.ts.map +1 -1
- package/resources/execution-logs.js.map +1 -1
- package/resources/execution-trace.d.ts.map +1 -1
- package/resources/execution-trace.js.map +1 -1
- package/resources/execution.d.ts.map +1 -1
- package/resources/execution.js.map +1 -1
- package/resources/get-bindings.d.ts.map +1 -1
- package/resources/get-bindings.js.map +1 -1
- package/resources/get.d.ts.map +1 -1
- package/resources/get.js.map +1 -1
- package/resources/git.d.ts.map +1 -1
- package/resources/git.js.map +1 -1
- package/resources/ignore/index.d.ts.map +1 -1
- package/resources/ignore/index.js.map +1 -1
- package/resources/ignore/matcher.d.ts.map +1 -1
- package/resources/ignore/matcher.js.map +1 -1
- package/resources/list.d.ts.map +1 -1
- package/resources/list.js.map +1 -1
- package/resources/mcp/placeholder-resolver.d.ts.map +1 -1
- package/resources/mcp/placeholder-resolver.js.map +1 -1
- package/resources/mcp/runtime-env.d.ts.map +1 -1
- package/resources/mcp/runtime-env.js.map +1 -1
- package/resources/picker/ink.d.ts.map +1 -1
- package/resources/picker/ink.js.map +1 -1
- package/resources/picker/tty.d.ts.map +1 -1
- package/resources/picker/tty.js.map +1 -1
- package/resources/plugin.d.ts.map +1 -1
- package/resources/plugin.js.map +1 -1
- package/resources/reference.d.ts.map +1 -1
- package/resources/reference.js.map +1 -1
- package/resources/render.d.ts.map +1 -1
- package/resources/render.js.map +1 -1
- package/resources/run/agent-exec.d.ts.map +1 -1
- package/resources/run/agent-exec.js.map +1 -1
- package/resources/run/attachments.d.ts.map +1 -1
- package/resources/run/attachments.js.map +1 -1
- package/resources/run/create.d.ts.map +1 -1
- package/resources/run/create.js.map +1 -1
- package/resources/run/env.d.ts.map +1 -1
- package/resources/run/env.js.map +1 -1
- package/resources/run/epilogue.d.ts.map +1 -1
- package/resources/run/epilogue.js.map +1 -1
- package/resources/run/header.d.ts.map +1 -1
- package/resources/run/header.js.map +1 -1
- package/resources/run/prepare.d.ts.map +1 -1
- package/resources/run/prepare.js.map +1 -1
- package/resources/run/resolve.d.ts.map +1 -1
- package/resources/run/resolve.js.map +1 -1
- package/resources/run/resume.d.ts.map +1 -1
- package/resources/run/resume.js.map +1 -1
- package/resources/run/stream.d.ts.map +1 -1
- package/resources/run/stream.js.map +1 -1
- package/resources/run/workflow-stream.d.ts.map +1 -1
- package/resources/run/workflow-stream.js.map +1 -1
- package/resources/run/workspace.d.ts.map +1 -1
- package/resources/run/workspace.js.map +1 -1
- package/resources/schedule.d.ts.map +1 -1
- package/resources/schedule.js.map +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js.map +1 -1
- package/resources/session.d.ts.map +1 -1
- package/resources/session.js.map +1 -1
- package/resources/share.d.ts.map +1 -1
- package/resources/share.js.map +1 -1
- package/resources/skill.d.ts.map +1 -1
- package/resources/skill.js.map +1 -1
- package/resources/stream/approval-detect.d.ts.map +1 -1
- package/resources/stream/approval-detect.js.map +1 -1
- package/resources/stream/convert.d.ts.map +1 -1
- package/resources/stream/convert.js.map +1 -1
- package/resources/stream/diff.d.ts.map +1 -1
- package/resources/stream/diff.js.map +1 -1
- package/resources/stream/events.d.ts.map +1 -1
- package/resources/stream/events.js.map +1 -1
- package/resources/stream/headless.d.ts.map +1 -1
- package/resources/stream/headless.js.map +1 -1
- package/resources/stream/ink.d.ts.map +1 -1
- package/resources/stream/ink.js.map +1 -1
- package/resources/stream/render-ndjson.d.ts.map +1 -1
- package/resources/stream/render-ndjson.js.map +1 -1
- package/resources/stream/render-plaintext.d.ts.map +1 -1
- package/resources/stream/render-plaintext.js.map +1 -1
- package/resources/stream/snapshot.d.ts.map +1 -1
- package/resources/stream/snapshot.js.map +1 -1
- package/resources/stream/subagent.d.ts.map +1 -1
- package/resources/stream/subagent.js.map +1 -1
- package/resources/stream/submit.d.ts.map +1 -1
- package/resources/stream/submit.js.map +1 -1
- package/resources/stream/todo.d.ts.map +1 -1
- package/resources/stream/todo.js.map +1 -1
- package/resources/stream/tool-state.d.ts.map +1 -1
- package/resources/stream/tool-state.js.map +1 -1
- package/resources/stream/tty.d.ts.map +1 -1
- package/resources/stream/tty.js.map +1 -1
- package/resources/stream/workflow-event-view.d.ts.map +1 -1
- package/resources/stream/workflow-event-view.js.map +1 -1
- package/resources/stream/workflow-render-ndjson.d.ts.map +1 -1
- package/resources/stream/workflow-render-ndjson.js.map +1 -1
- package/resources/stream/workflow-render-plaintext.d.ts.map +1 -1
- package/resources/stream/workflow-render-plaintext.js.map +1 -1
- package/resources/tag.d.ts.map +1 -1
- package/resources/tag.js.map +1 -1
- package/resources/task-configs.d.ts.map +1 -1
- package/resources/task-configs.js.map +1 -1
- package/resources/usage.d.ts.map +1 -1
- package/resources/usage.js.map +1 -1
- package/resources/validate.d.ts.map +1 -1
- package/resources/validate.js.map +1 -1
- package/resources/version.d.ts.map +1 -1
- package/resources/version.js.map +1 -1
- package/runtime.d.ts.map +1 -1
- package/runtime.js.map +1 -1
- package/version.d.ts.map +1 -1
- package/version.js.map +1 -1
- package/src/auth/pkce.test.ts +0 -37
- package/src/auth/token.test.ts +0 -151
- package/src/client/client.test.ts +0 -142
- package/src/commands/apikey/duration.test.ts +0 -23
- package/src/commands/auth/login.test.ts +0 -52
- package/src/commands/auth/whoami.test.ts +0 -96
- package/src/commands/bootstrap.test.ts +0 -178
- package/src/commands/config/backend.test.ts +0 -122
- package/src/commands/config/context.test.ts +0 -171
- package/src/commands/connect.test.ts +0 -113
- package/src/commands/install.test.ts +0 -307
- package/src/commands/marketplace.test.ts +0 -205
- package/src/commands/mcp-server.test.ts +0 -65
- package/src/commands/validate.test.ts +0 -168
- package/src/config/config.test.ts +0 -132
- package/src/config/keys.test.ts +0 -61
- package/src/config/resolve.test.ts +0 -242
- package/src/errors/clierr.test.ts +0 -172
- package/src/local/artifact.test.ts +0 -54
- package/src/local/bootstrap.test.ts +0 -166
- package/src/local/daemon/components.test.ts +0 -148
- package/src/local/daemon/daemon.integration.test.ts +0 -216
- package/src/local/daemon/env.test.ts +0 -108
- package/src/local/daemon/launch.test.ts +0 -136
- package/src/local/daemon/supervisor.test.ts +0 -260
- package/src/local/llm-config.test.ts +0 -66
- package/src/local/logs/tail.test.ts +0 -70
- package/src/local/logs/view.test.ts +0 -46
- package/src/local/operator-config.test.ts +0 -72
- package/src/local/reset.test.ts +0 -53
- package/src/local/runtime/runtime.test.ts +0 -240
- package/src/local/runtime/runtimes-install.test.ts +0 -58
- package/src/local/runtime/server.test.ts +0 -253
- package/src/local/setup/wizard.test.ts +0 -94
- package/src/local/state/state.test.ts +0 -210
- package/src/local/status.test.ts +0 -108
- package/src/local/temporal/download.test.ts +0 -248
- package/src/local/temporal/inspect.test.ts +0 -83
- package/src/local/temporal/manager.test.ts +0 -64
- package/src/local/temporal/supervisor.test.ts +0 -77
- package/src/marketplace/__fixtures__/cursor-marketplace.ts +0 -69
- package/src/marketplace/config.test.ts +0 -254
- package/src/marketplace/github.test.ts +0 -394
- package/src/marketplace/install.test.ts +0 -261
- package/src/marketplace/official.test.ts +0 -107
- package/src/marketplace/read.test.ts +0 -93
- package/src/marketplace/ref.test.ts +0 -179
- package/src/output/command-result.test.ts +0 -73
- package/src/output/confirm.test.ts +0 -43
- package/src/output/format.test.ts +0 -65
- package/src/output/proto.test.ts +0 -72
- package/src/output/table.test.ts +0 -37
- package/src/program.test.ts +0 -62
- package/src/registry/aliases.test.ts +0 -142
- package/src/registry/registry.test.ts +0 -355
- package/src/resources/apply/apply.integration.test.ts +0 -353
- package/src/resources/apply/apply.test.ts +0 -134
- package/src/resources/apply/discovery.integration.test.ts +0 -99
- package/src/resources/connect/__fixtures__/stdio-crash.mjs +0 -6
- package/src/resources/connect/__fixtures__/stdio-server.mjs +0 -48
- package/src/resources/connect/connect.integration.test.ts +0 -383
- package/src/resources/connect/discover.test.ts +0 -84
- package/src/resources/connect/oauth.test.ts +0 -158
- package/src/resources/cursor-pages.test.ts +0 -55
- package/src/resources/diff.integration.test.ts +0 -103
- package/src/resources/diff.test.ts +0 -34
- package/src/resources/documents.test.ts +0 -67
- package/src/resources/execution-approve.test.ts +0 -50
- package/src/resources/execution-format.test.ts +0 -48
- package/src/resources/execution.integration.test.ts +0 -285
- package/src/resources/execution.test.ts +0 -138
- package/src/resources/ignore/ignore.test.ts +0 -62
- package/src/resources/mcp/placeholder-resolver.test.ts +0 -71
- package/src/resources/mcp/runtime-env.test.ts +0 -102
- package/src/resources/mutate-verbs.integration.test.ts +0 -455
- package/src/resources/picker/tty.test.ts +0 -37
- package/src/resources/plugin.test.ts +0 -379
- package/src/resources/push-download.integration.test.ts +0 -175
- package/src/resources/read-completion.integration.test.ts +0 -164
- package/src/resources/read-verbs.integration.test.ts +0 -603
- package/src/resources/reference.test.ts +0 -107
- package/src/resources/run/agent-exec.test.ts +0 -179
- package/src/resources/run/attachments.test.ts +0 -135
- package/src/resources/run/create.test.ts +0 -336
- package/src/resources/run/env.test.ts +0 -131
- package/src/resources/run/header.test.ts +0 -79
- package/src/resources/run/prepare.test.ts +0 -428
- package/src/resources/run/workflow-stream.integration.test.ts +0 -157
- package/src/resources/run/workspace.test.ts +0 -93
- package/src/resources/share.test.ts +0 -523
- package/src/resources/skill.test.ts +0 -364
- package/src/resources/stream/diff.test.ts +0 -338
- package/src/resources/stream/headless.test.ts +0 -119
- package/src/resources/stream/lazy-import.test.ts +0 -63
- package/src/resources/stream/render-ndjson.test.ts +0 -126
- package/src/resources/stream/render-plaintext.test.ts +0 -127
- package/src/resources/stream/snapshot.test.ts +0 -111
- package/src/resources/stream/submit.test.ts +0 -77
- package/src/resources/stream/workflow-event-view.test.ts +0 -116
- package/src/resources/stream/workflow-render.test.ts +0 -81
- package/src/resources/task-configs.test.ts +0 -98
- package/src/resources/usage.test.ts +0 -94
- package/src/resources/validate.test.ts +0 -79
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { chmodSync, mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { CliExitError } from "../../errors/cli-exit-error.js";
|
|
6
|
-
import { resolveNode, resolveServerNode } from "./node.js";
|
|
7
|
-
import { acquireRunner, resolveRunner } from "./runner.js";
|
|
8
|
-
import { which } from "./which.js";
|
|
9
|
-
|
|
10
|
-
function tempDir(prefix: string): string {
|
|
11
|
-
return mkdtempSync(join(tmpdir(), prefix));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Snapshot and restore the env vars these resolvers read, so tests don't leak.
|
|
15
|
-
const TOUCHED = ["PATH", "STIGMER_RUNNER_DIR", "STIGMER_NODE_BIN"] as const;
|
|
16
|
-
let saved: Record<string, string | undefined>;
|
|
17
|
-
|
|
18
|
-
beforeEach(() => {
|
|
19
|
-
saved = {};
|
|
20
|
-
for (const key of TOUCHED) saved[key] = process.env[key];
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
afterEach(() => {
|
|
24
|
-
for (const key of TOUCHED) {
|
|
25
|
-
if (saved[key] === undefined) delete process.env[key];
|
|
26
|
-
else process.env[key] = saved[key];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe("which", () => {
|
|
31
|
-
it("resolves an executable on PATH and returns null for an unknown name", () => {
|
|
32
|
-
const dir = tempDir("stigmer-which-");
|
|
33
|
-
const exe = join(dir, "myexec");
|
|
34
|
-
writeFileSync(exe, "#!/bin/sh\n");
|
|
35
|
-
chmodSync(exe, 0o755);
|
|
36
|
-
process.env.PATH = dir;
|
|
37
|
-
|
|
38
|
-
expect(which("myexec")).toBe(exe);
|
|
39
|
-
expect(which("definitely-not-a-real-binary-xyz")).toBeNull();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("checks an absolute path directly", () => {
|
|
43
|
-
const dir = tempDir("stigmer-which-");
|
|
44
|
-
const exe = join(dir, "tool");
|
|
45
|
-
writeFileSync(exe, "#!/bin/sh\n");
|
|
46
|
-
chmodSync(exe, 0o755);
|
|
47
|
-
expect(which(exe)).toBe(exe);
|
|
48
|
-
expect(which(join(dir, "missing"))).toBeNull();
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// A fake "node" whose --version and capability-probe behavior the test
|
|
53
|
-
// controls, making these tests deterministic regardless of which Node runs
|
|
54
|
-
// the suite itself. The fake INSPECTS the probe script it receives ("fts5"
|
|
55
|
-
// in the source distinguishes the server's FTS5 probe from the runner's
|
|
56
|
-
// module-presence probe), so a mutation that wires resolveServerNode to the
|
|
57
|
-
// weaker probe — or neuters the FTS5 probe's failure exit — fails here.
|
|
58
|
-
function fakeNodeBinary(opts: { version: string; hasSqlite: boolean; hasFts5?: boolean }): string {
|
|
59
|
-
const bin = join(tempDir("stigmer-node-"), "node");
|
|
60
|
-
const fts5Exit = (opts.hasFts5 ?? opts.hasSqlite) ? 0 : 1;
|
|
61
|
-
writeFileSync(
|
|
62
|
-
bin,
|
|
63
|
-
`#!/bin/sh\n` +
|
|
64
|
-
`if [ "$1" = "--version" ]; then echo "${opts.version}"; exit 0; fi\n` +
|
|
65
|
-
`case "$2" in *fts5*) exit ${fts5Exit};; esac\n` +
|
|
66
|
-
`exit ${opts.hasSqlite ? 0 : 1}\n`,
|
|
67
|
-
);
|
|
68
|
-
chmodSync(bin, 0o755);
|
|
69
|
-
return bin;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
describe("resolveNode", () => {
|
|
73
|
-
it("resolves the current runtime iff it provides node:sqlite", () => {
|
|
74
|
-
// The contract, not an environment assumption: on a supported Node the
|
|
75
|
-
// own-runtime path resolves; on an unsupported one (e.g. 23.0-23.3, the
|
|
76
|
-
// gap the old version-table gate let through) it must throw the
|
|
77
|
-
// capability error rather than hand the runner a Node it will crash on.
|
|
78
|
-
delete process.env.STIGMER_NODE_BIN;
|
|
79
|
-
if (process.getBuiltinModule?.("node:sqlite") !== undefined) {
|
|
80
|
-
expect(resolveNode()).toBe(process.execPath);
|
|
81
|
-
} else {
|
|
82
|
-
expect(() => resolveNode()).toThrow(/node:sqlite/);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it("honors an override that passes the capability probe", () => {
|
|
87
|
-
const bin = fakeNodeBinary({ version: "v22.13.0", hasSqlite: true });
|
|
88
|
-
process.env.STIGMER_NODE_BIN = bin;
|
|
89
|
-
expect(resolveNode()).toBe(bin);
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
it("rejects an override that is not a working Node", () => {
|
|
93
|
-
process.env.STIGMER_NODE_BIN = "/nonexistent/node";
|
|
94
|
-
expect(() => resolveNode()).toThrow(CliExitError);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it("rejects a Node without node:sqlite, naming the version and capability", () => {
|
|
98
|
-
// The shape of a real 23.0-23.3 binary: healthy --version, no node:sqlite.
|
|
99
|
-
process.env.STIGMER_NODE_BIN = fakeNodeBinary({ version: "v23.1.0", hasSqlite: false });
|
|
100
|
-
|
|
101
|
-
expect(() => resolveNode()).toThrow(/node:sqlite/);
|
|
102
|
-
expect(() => resolveNode()).toThrow(/v23\.1\.0/);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
describe("resolveServerNode", () => {
|
|
107
|
-
it("honors an override that passes the FTS5 capability probe", () => {
|
|
108
|
-
const bin = fakeNodeBinary({ version: "v22.13.0", hasSqlite: true });
|
|
109
|
-
process.env.STIGMER_NODE_BIN = bin;
|
|
110
|
-
expect(resolveServerNode()).toBe(bin);
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it("rejects a Node whose sqlite lacks FTS5, naming the capability (the 23.4 trap)", () => {
|
|
114
|
-
// The shape of a REAL 23.4 binary: node:sqlite present (the module probe
|
|
115
|
-
// would pass), FTS5 absent (the fts5 probe fails) — pinning that the
|
|
116
|
-
// server resolution dispatches the STRONGER probe (D4 #14).
|
|
117
|
-
process.env.STIGMER_NODE_BIN = fakeNodeBinary({ version: "v23.4.0", hasSqlite: true, hasFts5: false });
|
|
118
|
-
|
|
119
|
-
expect(() => resolveServerNode()).toThrow(/FTS5/);
|
|
120
|
-
expect(() => resolveServerNode()).toThrow(/v23\.4\.0/);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it("the runner resolution still accepts the 23.4 shape (module present, FTS5 absent)", () => {
|
|
124
|
-
// The two probes deliberately differ: the runner needs only node:sqlite.
|
|
125
|
-
const bin = fakeNodeBinary({ version: "v23.4.0", hasSqlite: true, hasFts5: false });
|
|
126
|
-
process.env.STIGMER_NODE_BIN = bin;
|
|
127
|
-
expect(resolveNode()).toBe(bin);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it("runs the real FTS5 probe against the current runtime", () => {
|
|
131
|
-
// The one place the REAL probe script executes end-to-end (the fake-node
|
|
132
|
-
// tests above only exercise the dispatch and error copy). Conditional on
|
|
133
|
-
// the runtime's own capability — the resolveNode own-runtime pattern —
|
|
134
|
-
// so a no-FTS5 Node (e.g. 23.4) asserts the throw instead of the pass.
|
|
135
|
-
delete process.env.STIGMER_NODE_BIN;
|
|
136
|
-
if (currentRuntimeHasFts5()) {
|
|
137
|
-
expect(resolveServerNode()).toBe(process.execPath);
|
|
138
|
-
} else {
|
|
139
|
-
expect(() => resolveServerNode()).toThrow(/FTS5/);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
function currentRuntimeHasFts5(): boolean {
|
|
144
|
-
const sqlite = process.getBuiltinModule?.("node:sqlite");
|
|
145
|
-
if (sqlite === undefined) return false;
|
|
146
|
-
try {
|
|
147
|
-
new sqlite.DatabaseSync(":memory:").exec("CREATE VIRTUAL TABLE t USING fts5(x)");
|
|
148
|
-
return true;
|
|
149
|
-
} catch {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
describe("resolveRunner", () => {
|
|
156
|
-
const fakeNode = (): string => "/usr/bin/node";
|
|
157
|
-
|
|
158
|
-
it("resolves a built runner from STIGMER_RUNNER_DIR", () => {
|
|
159
|
-
const dir = tempDir("stigmer-runner-");
|
|
160
|
-
writeFileSync(join(dir, "package.json"), "{}");
|
|
161
|
-
mkdirSync(join(dir, "dist"));
|
|
162
|
-
writeFileSync(join(dir, "dist", "main.js"), "//");
|
|
163
|
-
process.env.STIGMER_RUNNER_DIR = dir;
|
|
164
|
-
|
|
165
|
-
const resolution = resolveRunner(fakeNode);
|
|
166
|
-
expect(resolution).toEqual({ nodeBin: "/usr/bin/node", entryPath: join(dir, "dist", "main.js"), appDir: dir });
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
it("errors with build guidance when dist/main.js is missing", () => {
|
|
170
|
-
const dir = tempDir("stigmer-runner-");
|
|
171
|
-
writeFileSync(join(dir, "package.json"), "{}");
|
|
172
|
-
process.env.STIGMER_RUNNER_DIR = dir;
|
|
173
|
-
expect(() => resolveRunner(fakeNode)).toThrow(/not built/);
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
it("rejects an override that is not a runner package", () => {
|
|
177
|
-
const dir = tempDir("stigmer-runner-");
|
|
178
|
-
process.env.STIGMER_RUNNER_DIR = join(dir, "no-package-here"); // no package.json
|
|
179
|
-
expect(() => resolveRunner(fakeNode)).toThrow(/not a runner package/);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
describe("acquireRunner", () => {
|
|
184
|
-
const fakeNode = (): string => "/usr/bin/node";
|
|
185
|
-
|
|
186
|
-
it("installs the slim package and resolves its main.js entry", () => {
|
|
187
|
-
const home = tempDir("stigmer-home-");
|
|
188
|
-
const installed: Array<{ dir: string; spec: string }> = [];
|
|
189
|
-
const install = (dir: string, spec: string): void => {
|
|
190
|
-
installed.push({ dir, spec });
|
|
191
|
-
// Simulate the npm install laying down the slim package.
|
|
192
|
-
const pkgDir = join(dir, "node_modules", "@stigmer", "runner-slim");
|
|
193
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
194
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
const resolution = acquireRunner({ home, version: "0.5.0", node: fakeNode, install });
|
|
198
|
-
|
|
199
|
-
const expectedEntry = join(home, ".stigmer", "runtimes", "0.5.0", "node_modules", "@stigmer", "runner-slim", "main.js");
|
|
200
|
-
expect(resolution.nodeBin).toBe("/usr/bin/node");
|
|
201
|
-
expect(resolution.entryPath).toBe(expectedEntry);
|
|
202
|
-
expect(resolution.appDir).toBe(join(home, ".stigmer", "runtimes", "0.5.0", "node_modules", "@stigmer", "runner-slim"));
|
|
203
|
-
expect(installed).toEqual([{ dir: join(home, ".stigmer", "runtimes", "0.5.0"), spec: "@stigmer/runner-slim@0.5.0" }]);
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
it("reuses a prior install without reinstalling", () => {
|
|
207
|
-
const home = tempDir("stigmer-home-");
|
|
208
|
-
const pkgDir = join(home, ".stigmer", "runtimes", "0.5.0", "node_modules", "@stigmer", "runner-slim");
|
|
209
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
210
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
211
|
-
|
|
212
|
-
const install = vi.fn();
|
|
213
|
-
const resolution = acquireRunner({ home, version: "0.5.0", node: fakeNode, install });
|
|
214
|
-
|
|
215
|
-
expect(resolution.entryPath).toBe(join(pkgDir, "main.js"));
|
|
216
|
-
expect(install).not.toHaveBeenCalled();
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
it("refuses to acquire for a non-release (dev) build", () => {
|
|
220
|
-
const home = tempDir("stigmer-home-");
|
|
221
|
-
expect(() => acquireRunner({ home, version: "0.0.0-dev", node: fakeNode, install: vi.fn() })).toThrow(
|
|
222
|
-
/non-release build/,
|
|
223
|
-
);
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// Presence beats acquirability (the server acquirer's rule; the all-in-one
|
|
227
|
-
// image bakes a dev-stamped runtime npm never published).
|
|
228
|
-
it("uses an already-installed runtime even for a non-release (dev) build", () => {
|
|
229
|
-
const home = tempDir("stigmer-home-");
|
|
230
|
-
const pkgDir = join(home, ".stigmer", "runtimes", "0.0.0-dev.abc123", "node_modules", "@stigmer", "runner-slim");
|
|
231
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
232
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
233
|
-
|
|
234
|
-
const install = vi.fn();
|
|
235
|
-
const resolution = acquireRunner({ home, version: "0.0.0-dev.abc123", node: fakeNode, install });
|
|
236
|
-
|
|
237
|
-
expect(resolution.entryPath).toBe(join(pkgDir, "main.js"));
|
|
238
|
-
expect(install).not.toHaveBeenCalled();
|
|
239
|
-
});
|
|
240
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Pins the shared runtimes-install contract both acquirers depend on: the
|
|
2
|
-
// no-clobber root manifest (the runner and the server install into ONE
|
|
3
|
-
// per-version root), the dev-version gate, and the actionable install
|
|
4
|
-
// failure.
|
|
5
|
-
|
|
6
|
-
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
|
-
import { tmpdir } from "node:os";
|
|
8
|
-
import { join } from "node:path";
|
|
9
|
-
import { describe, expect, it } from "vitest";
|
|
10
|
-
import { CliExitError } from "../../errors/cli-exit-error.js";
|
|
11
|
-
import { ensureRuntimesRoot, isAcquirableRelease, npmInstallIntoRuntimes } from "./runtimes-install.js";
|
|
12
|
-
|
|
13
|
-
function tempDir(): string {
|
|
14
|
-
return mkdtempSync(join(tmpdir(), "stigmer-runtimes-"));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
describe("ensureRuntimesRoot", () => {
|
|
18
|
-
it("creates the root with the stable manifest when absent", () => {
|
|
19
|
-
const dir = join(tempDir(), "0.5.0");
|
|
20
|
-
ensureRuntimesRoot(dir);
|
|
21
|
-
const manifest = JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
|
|
22
|
-
expect(manifest).toEqual({ name: "stigmer-runtime", private: true, version: "0.0.0" });
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it("never clobbers an existing root manifest — the shared-root contract", () => {
|
|
26
|
-
const dir = tempDir();
|
|
27
|
-
writeFileSync(join(dir, "package.json"), '{"name":"stigmer-runtime","marker":"first-installer"}\n');
|
|
28
|
-
ensureRuntimesRoot(dir);
|
|
29
|
-
expect(readFileSync(join(dir, "package.json"), "utf8")).toContain("first-installer");
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
describe("isAcquirableRelease", () => {
|
|
34
|
-
it("admits releases and rc/next versions, refuses dev builds", () => {
|
|
35
|
-
expect(isAcquirableRelease("0.5.0")).toBe(true);
|
|
36
|
-
expect(isAcquirableRelease("0.5.0-rc.1")).toBe(true);
|
|
37
|
-
expect(isAcquirableRelease("0.0.0-dev")).toBe(false);
|
|
38
|
-
expect(isAcquirableRelease("0.5.0-dev.20260825")).toBe(false);
|
|
39
|
-
// The bare stamp an unbundled server reports; the substring test this once was let it through.
|
|
40
|
-
expect(isAcquirableRelease("dev")).toBe(false);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe("npmInstallIntoRuntimes", () => {
|
|
45
|
-
it("wraps an install failure in an actionable CliExitError with remediation hints", () => {
|
|
46
|
-
// /dev/null/x is unwritable on every POSIX system, so the real npm spawn
|
|
47
|
-
// fails deterministically without network access.
|
|
48
|
-
const attempt = (): void => npmInstallIntoRuntimes("/dev/null/x", "@stigmer/nonexistent@0.0.0");
|
|
49
|
-
expect(attempt).toThrow(CliExitError);
|
|
50
|
-
try {
|
|
51
|
-
attempt();
|
|
52
|
-
} catch (err) {
|
|
53
|
-
const hints = (err as CliExitError).hints?.join("\n") ?? "";
|
|
54
|
-
expect(hints).toMatch(/npm install/);
|
|
55
|
-
expect(hints).toMatch(/remove/i);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
// Pins the server resolution: exactly like the runner's (explicit dir →
|
|
2
|
-
// repo tree → acquired slim package).
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
mkdirSync,
|
|
6
|
-
mkdtempSync,
|
|
7
|
-
readFileSync,
|
|
8
|
-
writeFileSync,
|
|
9
|
-
} from "node:fs";
|
|
10
|
-
import { tmpdir } from "node:os";
|
|
11
|
-
import { join } from "node:path";
|
|
12
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
13
|
-
import { acquireServer, ensureServer, resolveServerTs } from "./server.js";
|
|
14
|
-
|
|
15
|
-
function tempDir(prefix: string): string {
|
|
16
|
-
return mkdtempSync(join(tmpdir(), prefix));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const fakeNode = (): string => "/usr/bin/node";
|
|
20
|
-
|
|
21
|
-
// Snapshot and restore the env vars the resolution reads, so tests don't leak.
|
|
22
|
-
const TOUCHED = [
|
|
23
|
-
"STIGMER_SERVER_DIR",
|
|
24
|
-
"STIGMER_NODE_BIN",
|
|
25
|
-
"STIGMER_RUNTIMES_DIR",
|
|
26
|
-
] as const;
|
|
27
|
-
let saved: Record<string, string | undefined>;
|
|
28
|
-
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
saved = {};
|
|
31
|
-
for (const key of TOUCHED) {
|
|
32
|
-
saved[key] = process.env[key];
|
|
33
|
-
delete process.env[key];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
afterEach(() => {
|
|
38
|
-
for (const key of TOUCHED) {
|
|
39
|
-
if (saved[key] === undefined) delete process.env[key];
|
|
40
|
-
else process.env[key] = saved[key];
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
function builtServerDir(): string {
|
|
45
|
-
const dir = tempDir("stigmer-server-");
|
|
46
|
-
writeFileSync(join(dir, "package.json"), "{}");
|
|
47
|
-
mkdirSync(join(dir, "dist"));
|
|
48
|
-
writeFileSync(join(dir, "dist", "main.js"), "//");
|
|
49
|
-
return dir;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
describe("ensureServer", () => {
|
|
53
|
-
it("resolves the server from STIGMER_SERVER_DIR", () => {
|
|
54
|
-
const dir = builtServerDir();
|
|
55
|
-
process.env.STIGMER_SERVER_DIR = dir;
|
|
56
|
-
|
|
57
|
-
expect(ensureServer({ node: fakeNode })).toEqual({
|
|
58
|
-
nodeBin: "/usr/bin/node",
|
|
59
|
-
entryPath: join(dir, "dist", "main.js"),
|
|
60
|
-
appDir: dir,
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
describe("resolveServerTs", () => {
|
|
66
|
-
it("resolves a built server from STIGMER_SERVER_DIR", () => {
|
|
67
|
-
const dir = builtServerDir();
|
|
68
|
-
process.env.STIGMER_SERVER_DIR = dir;
|
|
69
|
-
|
|
70
|
-
expect(resolveServerTs(fakeNode)).toEqual({
|
|
71
|
-
nodeBin: "/usr/bin/node",
|
|
72
|
-
entryPath: join(dir, "dist", "main.js"),
|
|
73
|
-
appDir: dir,
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it("errors with build guidance when dist/main.js is missing", () => {
|
|
78
|
-
const dir = tempDir("stigmer-server-");
|
|
79
|
-
writeFileSync(join(dir, "package.json"), "{}");
|
|
80
|
-
process.env.STIGMER_SERVER_DIR = dir;
|
|
81
|
-
|
|
82
|
-
expect(() => resolveServerTs(fakeNode)).toThrow(/not built/);
|
|
83
|
-
// Remediation rides in hints, not the message.
|
|
84
|
-
const hints = captureHints(() => resolveServerTs(fakeNode));
|
|
85
|
-
expect(hints.join("\n")).toMatch(/make build-server/);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it("rejects an override that is not a server package", () => {
|
|
89
|
-
const dir = tempDir("stigmer-server-");
|
|
90
|
-
process.env.STIGMER_SERVER_DIR = join(dir, "no-package-here"); // no package.json
|
|
91
|
-
expect(() => resolveServerTs(fakeNode)).toThrow(/not a server package/);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
describe("acquireServer", () => {
|
|
96
|
-
it("installs the slim package and resolves its main.js entry", () => {
|
|
97
|
-
const home = tempDir("stigmer-home-");
|
|
98
|
-
const installed: Array<{ dir: string; spec: string }> = [];
|
|
99
|
-
const install = (dir: string, spec: string): void => {
|
|
100
|
-
installed.push({ dir, spec });
|
|
101
|
-
// Simulate the npm install laying down the slim package.
|
|
102
|
-
const pkgDir = join(dir, "node_modules", "@stigmer", "server-slim");
|
|
103
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
104
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const launch = acquireServer({
|
|
108
|
-
home,
|
|
109
|
-
version: "0.5.0",
|
|
110
|
-
node: fakeNode,
|
|
111
|
-
install,
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
const installDir = join(home, ".stigmer", "runtimes", "0.5.0");
|
|
115
|
-
expect(launch).toEqual({
|
|
116
|
-
nodeBin: "/usr/bin/node",
|
|
117
|
-
entryPath: join(
|
|
118
|
-
installDir,
|
|
119
|
-
"node_modules",
|
|
120
|
-
"@stigmer",
|
|
121
|
-
"server-slim",
|
|
122
|
-
"main.js",
|
|
123
|
-
),
|
|
124
|
-
appDir: join(installDir, "node_modules", "@stigmer", "server-slim"),
|
|
125
|
-
});
|
|
126
|
-
expect(installed).toEqual([
|
|
127
|
-
{ dir: installDir, spec: "@stigmer/server-slim@0.5.0" },
|
|
128
|
-
]);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it("reuses a prior install without reinstalling", () => {
|
|
132
|
-
const home = tempDir("stigmer-home-");
|
|
133
|
-
const pkgDir = join(
|
|
134
|
-
home,
|
|
135
|
-
".stigmer",
|
|
136
|
-
"runtimes",
|
|
137
|
-
"0.5.0",
|
|
138
|
-
"node_modules",
|
|
139
|
-
"@stigmer",
|
|
140
|
-
"server-slim",
|
|
141
|
-
);
|
|
142
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
143
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
144
|
-
|
|
145
|
-
const install = vi.fn();
|
|
146
|
-
const launch = acquireServer({
|
|
147
|
-
home,
|
|
148
|
-
version: "0.5.0",
|
|
149
|
-
node: fakeNode,
|
|
150
|
-
install,
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
expect(launch.nodeBin).toBe("/usr/bin/node");
|
|
154
|
-
expect(install).not.toHaveBeenCalled();
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
// The runner and the server share one per-version install root; acquiring
|
|
158
|
-
// the server after the runner must ADD to it, never clobber the root
|
|
159
|
-
// manifest the runner's install already wrote.
|
|
160
|
-
it("shares the runtimes install root with the runner without clobbering it", () => {
|
|
161
|
-
const home = tempDir("stigmer-home-");
|
|
162
|
-
const installDir = join(home, ".stigmer", "runtimes", "0.5.0");
|
|
163
|
-
mkdirSync(installDir, { recursive: true });
|
|
164
|
-
writeFileSync(
|
|
165
|
-
join(installDir, "package.json"),
|
|
166
|
-
'{"name":"stigmer-runtime","marker":"pre-existing"}\n',
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
const install = (dir: string): void => {
|
|
170
|
-
const pkgDir = join(dir, "node_modules", "@stigmer", "server-slim");
|
|
171
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
172
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
173
|
-
};
|
|
174
|
-
acquireServer({ home, version: "0.5.0", node: fakeNode, install });
|
|
175
|
-
|
|
176
|
-
expect(readFileSync(join(installDir, "package.json"), "utf8")).toContain(
|
|
177
|
-
"pre-existing",
|
|
178
|
-
);
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
// The hunted npm failure shape: the install runs but the platform-native
|
|
182
|
-
// package was skipped (unsupported OS/arch), so the entry never appears.
|
|
183
|
-
it("errors actionably when the install produces no entry", () => {
|
|
184
|
-
const home = tempDir("stigmer-home-");
|
|
185
|
-
const install = vi.fn(); // runs, lays down nothing
|
|
186
|
-
const attempt = (): unknown => acquireServer({ home, version: "0.5.0", node: fakeNode, install });
|
|
187
|
-
expect(attempt).toThrow(/install did not produce/);
|
|
188
|
-
expect(install).toHaveBeenCalledOnce();
|
|
189
|
-
const hints = captureHints(attempt).join("\n");
|
|
190
|
-
expect(hints).toMatch(/platform-native/);
|
|
191
|
-
expect(hints).toMatch(/Remove .* and retry/);
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// Presence beats acquirability: the all-in-one image bakes a dev-stamped
|
|
195
|
-
// runtime npm never published; an installed runtime is usable whatever its
|
|
196
|
-
// version string, and only an install we would have to perform is refused.
|
|
197
|
-
it("uses an already-installed runtime even for a non-release (dev) build", () => {
|
|
198
|
-
const home = tempDir("stigmer-home-");
|
|
199
|
-
const pkgDir = join(home, ".stigmer", "runtimes", "0.0.0-dev.abc123", "node_modules", "@stigmer", "server-slim");
|
|
200
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
201
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
202
|
-
|
|
203
|
-
const install = vi.fn();
|
|
204
|
-
const launch = acquireServer({ home, version: "0.0.0-dev.abc123", node: fakeNode, install });
|
|
205
|
-
|
|
206
|
-
expect(launch.entryPath).toBe(join(pkgDir, "main.js"));
|
|
207
|
-
expect(install).not.toHaveBeenCalled();
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
// STIGMER_RUNTIMES_DIR relocates the whole acquired-runtimes root; the
|
|
211
|
-
// per-version layout under it is unchanged, so a pre-filled root is found
|
|
212
|
-
// exactly where an on-demand install would have put things.
|
|
213
|
-
it("reads the runtimes root from STIGMER_RUNTIMES_DIR, keeping the per-version layout", () => {
|
|
214
|
-
const home = tempDir("stigmer-home-");
|
|
215
|
-
const root = tempDir("stigmer-runtimes-");
|
|
216
|
-
process.env.STIGMER_RUNTIMES_DIR = root;
|
|
217
|
-
const pkgDir = join(root, "0.5.0", "node_modules", "@stigmer", "server-slim");
|
|
218
|
-
mkdirSync(pkgDir, { recursive: true });
|
|
219
|
-
writeFileSync(join(pkgDir, "main.js"), "// slim bundle");
|
|
220
|
-
|
|
221
|
-
const install = vi.fn();
|
|
222
|
-
const launch = acquireServer({ home, version: "0.5.0", node: fakeNode, install });
|
|
223
|
-
|
|
224
|
-
expect(launch.entryPath).toBe(join(pkgDir, "main.js"));
|
|
225
|
-
expect(launch.appDir).toBe(pkgDir);
|
|
226
|
-
expect(install).not.toHaveBeenCalled();
|
|
227
|
-
expect(readFileSync(join(pkgDir, "main.js"), "utf8")).toBe("// slim bundle");
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
it("refuses to acquire for a non-release (dev) build, naming the fallback", () => {
|
|
231
|
-
const home = tempDir("stigmer-home-");
|
|
232
|
-
const attempt = (): unknown =>
|
|
233
|
-
acquireServer({
|
|
234
|
-
home,
|
|
235
|
-
version: "0.0.0-dev",
|
|
236
|
-
node: fakeNode,
|
|
237
|
-
install: vi.fn(),
|
|
238
|
-
});
|
|
239
|
-
expect(attempt).toThrow(/non-release build/);
|
|
240
|
-
// The escape hatch rides in the hints: the explicit server dir.
|
|
241
|
-
const hints = captureHints(attempt);
|
|
242
|
-
expect(hints.join("\n")).toMatch(/STIGMER_SERVER_DIR/);
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
function captureHints(attempt: () => unknown): readonly string[] {
|
|
247
|
-
try {
|
|
248
|
-
attempt();
|
|
249
|
-
} catch (err) {
|
|
250
|
-
return (err as { hints?: readonly string[] }).hints ?? [];
|
|
251
|
-
}
|
|
252
|
-
throw new Error("expected the attempt to throw");
|
|
253
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import type { Config } from "../../config/config.js";
|
|
3
|
-
import { readLlm } from "../llm-config.js";
|
|
4
|
-
import { readOperator } from "../operator-config.js";
|
|
5
|
-
import {
|
|
6
|
-
PROVIDER_CHOICES,
|
|
7
|
-
applyChoice,
|
|
8
|
-
applyOperatorIdentity,
|
|
9
|
-
buildLlmForChoice,
|
|
10
|
-
buildOperatorForInputs,
|
|
11
|
-
} from "./wizard.js";
|
|
12
|
-
|
|
13
|
-
function config(local?: unknown): Config {
|
|
14
|
-
return { backend: { type: "local", local } };
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Regression pin: every provider offered by `stigmer setup` promises an
|
|
18
|
-
// execution path the native runner must actually serve. The runner constructs
|
|
19
|
-
// Anthropic clients only and the registry's native-harness entries are all
|
|
20
|
-
// Anthropic — so this list is anthropic + skip, full stop. If this test fails
|
|
21
|
-
// because a provider was added, the native runner and model registry must gain
|
|
22
|
-
// real support for it first (see sdk/react DISABLED_PROVIDERS for the same
|
|
23
|
-
// decision on the UI side).
|
|
24
|
-
describe("PROVIDER_CHOICES", () => {
|
|
25
|
-
it("offers exactly anthropic and skip", () => {
|
|
26
|
-
expect([...PROVIDER_CHOICES]).toEqual(["anthropic", "skip"]);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe("buildLlmForChoice", () => {
|
|
31
|
-
it("persists provider and key only — there is no model concept, the registry owns it (oss#314)", () => {
|
|
32
|
-
expect(buildLlmForChoice("anthropic")).toEqual({ provider: "anthropic" });
|
|
33
|
-
expect(buildLlmForChoice("anthropic", { apiKey: "k" })).toEqual({
|
|
34
|
-
provider: "anthropic",
|
|
35
|
-
api_key: "k",
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("returns undefined for skip (clears config)", () => {
|
|
40
|
-
expect(buildLlmForChoice("skip")).toBeUndefined();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe("applyChoice", () => {
|
|
45
|
-
it("writes the selection while preserving siblings", () => {
|
|
46
|
-
const cfg = config({ temporal: { managed: true }, llm: { provider: "anthropic", model: "stale" } });
|
|
47
|
-
const updated = applyChoice(cfg, "anthropic", { apiKey: "k" });
|
|
48
|
-
expect(readLlm(updated)).toEqual({ provider: "anthropic", api_key: "k" });
|
|
49
|
-
expect((updated.backend.local as { temporal: unknown }).temporal).toEqual({ managed: true });
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("skip clears the llm section", () => {
|
|
53
|
-
const updated = applyChoice(config({ llm: { provider: "anthropic" } }), "skip");
|
|
54
|
-
expect(readLlm(updated)).toBeUndefined();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
describe("buildOperatorForInputs", () => {
|
|
59
|
-
it("persists email (and optional name), trimmed", () => {
|
|
60
|
-
expect(buildOperatorForInputs(" ada@example.com ", "")).toEqual({ email: "ada@example.com" });
|
|
61
|
-
expect(buildOperatorForInputs("ada@example.com", " Ada ")).toEqual({
|
|
62
|
-
email: "ada@example.com",
|
|
63
|
-
name: "Ada",
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it("returns undefined for empty inputs — nothing to persist, identity stays anonymous", () => {
|
|
68
|
-
expect(buildOperatorForInputs("", "")).toBeUndefined();
|
|
69
|
-
expect(buildOperatorForInputs(" ", "")).toBeUndefined();
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// The server's boot rules, surfaced at setup time (oss#796): a malformed
|
|
73
|
-
// identity must never be persisted only to fail the next `stigmer up`.
|
|
74
|
-
it("refuses what the server's boot check would refuse", () => {
|
|
75
|
-
expect(() => buildOperatorForInputs("not-an-email", "")).toThrow(/missing '@'/);
|
|
76
|
-
expect(() => buildOperatorForInputs("", "Ada")).toThrow(/set both or neither/);
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
describe("applyOperatorIdentity", () => {
|
|
81
|
-
it("writes the identity while preserving siblings", () => {
|
|
82
|
-
const cfg = config({ temporal: { managed: true }, llm: { provider: "anthropic" } });
|
|
83
|
-
const updated = applyOperatorIdentity(cfg, "ada@example.com", "Ada");
|
|
84
|
-
expect(readOperator(updated)).toEqual({ email: "ada@example.com", name: "Ada" });
|
|
85
|
-
expect(readLlm(updated)).toEqual({ provider: "anthropic" });
|
|
86
|
-
expect((updated.backend.local as { temporal: unknown }).temporal).toEqual({ managed: true });
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it("empty inputs leave the config unchanged (skip, not clear)", () => {
|
|
90
|
-
const cfg = config({ operator: { email: "keep@example.com" } });
|
|
91
|
-
const updated = applyOperatorIdentity(cfg, "", "");
|
|
92
|
-
expect(readOperator(updated)).toEqual({ email: "keep@example.com" });
|
|
93
|
-
});
|
|
94
|
-
});
|