@stigmer/cli 3.35.0 → 3.36.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,455 +0,0 @@
|
|
|
1
|
-
// In-process integration test for the mutating verbs (delete / tag).
|
|
2
|
-
//
|
|
3
|
-
// Stands up a real Connect backend over h2c serving the query *and* command
|
|
4
|
-
// controllers these verbs call, points an SDK node client at it, and drives the
|
|
5
|
-
// resource layer (planDelete → perform, tagVersion) end to end. Asserts the
|
|
6
|
-
// rendered result shape, the special-case routing (execution→cancel,
|
|
7
|
-
// already-terminal), and that backend errors map to the right CLI exit code.
|
|
8
|
-
|
|
9
|
-
import { create } from "@bufbuild/protobuf";
|
|
10
|
-
import { Code, ConnectError, type ConnectRouter } from "@connectrpc/connect";
|
|
11
|
-
import { connectNodeAdapter } from "@connectrpc/connect-node";
|
|
12
|
-
import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
13
|
-
import { AgentCommandController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/command_pb";
|
|
14
|
-
import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
|
|
15
|
-
import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
16
|
-
import { AgentExecutionCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/command_pb";
|
|
17
|
-
import { ExecutionPhase } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
18
|
-
import { AgentExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/query_pb";
|
|
19
|
-
import { AgentChannelSchema } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
|
|
20
|
-
import { AgentChannelCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/command_pb";
|
|
21
|
-
import { AgentChannelQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/query_pb";
|
|
22
|
-
import { AgentInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
|
|
23
|
-
import { AgentInstanceCommandController } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/command_pb";
|
|
24
|
-
import { AgentInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/query_pb";
|
|
25
|
-
import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
26
|
-
import { ChannelAppCommandController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/command_pb";
|
|
27
|
-
import { ChannelAppQueryController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/query_pb";
|
|
28
|
-
import { EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
|
|
29
|
-
import { EnvironmentCommandController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/command_pb";
|
|
30
|
-
import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
|
|
31
|
-
import { McpServerSchema } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
|
|
32
|
-
import { McpServerCommandController } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/command_pb";
|
|
33
|
-
import { McpServerQueryController } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/query_pb";
|
|
34
|
-
import { ScheduleSchema } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
35
|
-
import { ScheduleCommandController } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/command_pb";
|
|
36
|
-
import { ScheduleQueryController } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/query_pb";
|
|
37
|
-
import { WorkflowSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
|
|
38
|
-
import { WorkflowCommandController } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/command_pb";
|
|
39
|
-
import { WorkflowQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/query_pb";
|
|
40
|
-
import { WorkflowInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/api_pb";
|
|
41
|
-
import { WorkflowInstanceCommandController } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/command_pb";
|
|
42
|
-
import { WorkflowInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflowinstance/v1/query_pb";
|
|
43
|
-
import { createNodeClient, normalizeEndpoint } from "@stigmer/sdk/node";
|
|
44
|
-
import type { Stigmer } from "@stigmer/sdk";
|
|
45
|
-
import { createServer as createHttp2Server, type Http2Server, type ServerHttp2Session } from "node:http2";
|
|
46
|
-
import type { AddressInfo } from "node:net";
|
|
47
|
-
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
48
|
-
import { classify, ExitCode } from "../errors/index.js";
|
|
49
|
-
import { planDelete } from "./delete.js";
|
|
50
|
-
import { tagVersion } from "./tag.js";
|
|
51
|
-
|
|
52
|
-
const knownAgent = create(AgentSchema, {
|
|
53
|
-
metadata: { name: "Reviewer", slug: "reviewer", org: "acme", id: "agt_1" },
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const knownInstance = create(AgentInstanceSchema, {
|
|
57
|
-
metadata: { name: "reviewer-default", slug: "reviewer-default", org: "acme", id: "ain_1" },
|
|
58
|
-
spec: { agentId: "agt_1" },
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const knownMcp = create(McpServerSchema, {
|
|
62
|
-
metadata: { name: "Filesystem", slug: "filesystem", org: "acme", id: "mcp_1" },
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const knownWorkflow = create(WorkflowSchema, {
|
|
66
|
-
metadata: { name: "Deploy", slug: "deploy", org: "acme", id: "wfl_1" },
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const knownEnvironment = create(EnvironmentSchema, {
|
|
70
|
-
metadata: { name: "clinic-patient-db", slug: "clinic-patient-db", org: "acme", id: "env_1" },
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const knownChannel = create(AgentChannelSchema, {
|
|
74
|
-
metadata: { name: "clinic-patient-whatsapp", slug: "clinic-patient-whatsapp", org: "acme", id: "ach_1" },
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const knownChannelApp = create(ChannelAppSchema, {
|
|
78
|
-
metadata: { name: "clinic-meta-app", slug: "clinic-meta-app", org: "acme", id: "chapp_1" },
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
const knownSchedule = create(ScheduleSchema, {
|
|
82
|
-
metadata: { name: "daily-fee-reminders", slug: "daily-fee-reminders", org: "acme", id: "sch_1" },
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const knownWorkflowInstance = create(WorkflowInstanceSchema, {
|
|
86
|
-
metadata: { name: "deploy-default", slug: "deploy-default", org: "acme", id: "win_1" },
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// Pending execution (cancellable) vs. an already-terminal one.
|
|
90
|
-
const pendingExecution = create(AgentExecutionSchema, {
|
|
91
|
-
metadata: { id: "aex_run" },
|
|
92
|
-
status: { phase: ExecutionPhase.EXECUTION_PENDING },
|
|
93
|
-
});
|
|
94
|
-
const cancelledExecution = create(AgentExecutionSchema, {
|
|
95
|
-
metadata: { id: "aex_run" },
|
|
96
|
-
status: { phase: ExecutionPhase.EXECUTION_CANCELLED },
|
|
97
|
-
});
|
|
98
|
-
const completedExecution = create(AgentExecutionSchema, {
|
|
99
|
-
metadata: { id: "aex_done" },
|
|
100
|
-
status: { phase: ExecutionPhase.EXECUTION_COMPLETED },
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
let backend: Http2Server;
|
|
104
|
-
let client: Stigmer;
|
|
105
|
-
const openSessions = new Set<ServerHttp2Session>();
|
|
106
|
-
|
|
107
|
-
// Spies for the command-side calls, reset per test.
|
|
108
|
-
let cancelCalls: string[] = [];
|
|
109
|
-
let tagCalls: { workflowId: string; versionHash: string; tag: string }[] = [];
|
|
110
|
-
// Force-carrying deletes record what actually rode the RPC.
|
|
111
|
-
let environmentDeletes: { resourceId: string; force: boolean }[] = [];
|
|
112
|
-
let channelAppDeletes: { resourceId: string; force: boolean }[] = [];
|
|
113
|
-
// agent_channel, schedule, and workflow_instance delete by typed ID — no
|
|
114
|
-
// force field exists on their wire contracts.
|
|
115
|
-
let channelDeleteIds: string[] = [];
|
|
116
|
-
let scheduleDeleteIds: string[] = [];
|
|
117
|
-
let workflowInstanceDeleteIds: string[] = [];
|
|
118
|
-
|
|
119
|
-
beforeEach(() => {
|
|
120
|
-
cancelCalls = [];
|
|
121
|
-
tagCalls = [];
|
|
122
|
-
environmentDeletes = [];
|
|
123
|
-
channelAppDeletes = [];
|
|
124
|
-
channelDeleteIds = [];
|
|
125
|
-
scheduleDeleteIds = [];
|
|
126
|
-
workflowInstanceDeleteIds = [];
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
beforeAll(async () => {
|
|
130
|
-
const routes = (router: ConnectRouter) => {
|
|
131
|
-
router.service(AgentQueryController, {
|
|
132
|
-
get: (req) => {
|
|
133
|
-
if (req.value !== "agt_1") throw new ConnectError("agent not found", Code.NotFound);
|
|
134
|
-
return knownAgent;
|
|
135
|
-
},
|
|
136
|
-
getByReference: (req) => {
|
|
137
|
-
if (req.slug !== "reviewer") throw new ConnectError("agent not found", Code.NotFound);
|
|
138
|
-
return knownAgent;
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
router.service(AgentCommandController, {
|
|
142
|
-
delete: () => knownAgent,
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
router.service(AgentInstanceQueryController, {
|
|
146
|
-
get: (req) => {
|
|
147
|
-
if (req.value !== "ain_1") throw new ConnectError("agent instance not found", Code.NotFound);
|
|
148
|
-
return knownInstance;
|
|
149
|
-
},
|
|
150
|
-
getByReference: (req) => {
|
|
151
|
-
if (req.slug !== "reviewer-default") throw new ConnectError("agent instance not found", Code.NotFound);
|
|
152
|
-
return knownInstance;
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
router.service(AgentInstanceCommandController, {
|
|
156
|
-
delete: () => knownInstance,
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
router.service(McpServerQueryController, {
|
|
160
|
-
getByReference: () => knownMcp,
|
|
161
|
-
});
|
|
162
|
-
router.service(McpServerCommandController, {
|
|
163
|
-
delete: (req) => {
|
|
164
|
-
if (req.resourceId !== "mcp_1") throw new ConnectError("bad id", Code.InvalidArgument);
|
|
165
|
-
return knownMcp;
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
router.service(EnvironmentQueryController, {
|
|
170
|
-
getByReference: (req) => {
|
|
171
|
-
if (req.slug !== "clinic-patient-db") throw new ConnectError("environment not found", Code.NotFound);
|
|
172
|
-
return knownEnvironment;
|
|
173
|
-
},
|
|
174
|
-
});
|
|
175
|
-
router.service(EnvironmentCommandController, {
|
|
176
|
-
delete: (req) => {
|
|
177
|
-
environmentDeletes.push({ resourceId: req.resourceId, force: req.force });
|
|
178
|
-
return knownEnvironment;
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
router.service(AgentChannelQueryController, {
|
|
183
|
-
getByReference: (req) => {
|
|
184
|
-
if (req.slug !== "clinic-patient-whatsapp") throw new ConnectError("agent channel not found", Code.NotFound);
|
|
185
|
-
return knownChannel;
|
|
186
|
-
},
|
|
187
|
-
});
|
|
188
|
-
router.service(AgentChannelCommandController, {
|
|
189
|
-
delete: (req) => {
|
|
190
|
-
channelDeleteIds.push(req.value);
|
|
191
|
-
return knownChannel;
|
|
192
|
-
},
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
router.service(ChannelAppQueryController, {
|
|
196
|
-
getByReference: (req) => {
|
|
197
|
-
if (req.slug !== "clinic-meta-app") throw new ConnectError("channel app not found", Code.NotFound);
|
|
198
|
-
return knownChannelApp;
|
|
199
|
-
},
|
|
200
|
-
});
|
|
201
|
-
router.service(ChannelAppCommandController, {
|
|
202
|
-
delete: (req) => {
|
|
203
|
-
channelAppDeletes.push({ resourceId: req.resourceId, force: req.force });
|
|
204
|
-
return knownChannelApp;
|
|
205
|
-
},
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
router.service(ScheduleQueryController, {
|
|
209
|
-
getByReference: (req) => {
|
|
210
|
-
if (req.slug !== "daily-fee-reminders") throw new ConnectError("schedule not found", Code.NotFound);
|
|
211
|
-
return knownSchedule;
|
|
212
|
-
},
|
|
213
|
-
});
|
|
214
|
-
router.service(ScheduleCommandController, {
|
|
215
|
-
delete: (req) => {
|
|
216
|
-
scheduleDeleteIds.push(req.value);
|
|
217
|
-
return knownSchedule;
|
|
218
|
-
},
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
router.service(WorkflowInstanceQueryController, {
|
|
222
|
-
getByReference: (req) => {
|
|
223
|
-
if (req.slug !== "deploy-default") throw new ConnectError("workflow instance not found", Code.NotFound);
|
|
224
|
-
return knownWorkflowInstance;
|
|
225
|
-
},
|
|
226
|
-
});
|
|
227
|
-
router.service(WorkflowInstanceCommandController, {
|
|
228
|
-
delete: (req) => {
|
|
229
|
-
workflowInstanceDeleteIds.push(req.value);
|
|
230
|
-
return knownWorkflowInstance;
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
router.service(WorkflowQueryController, {
|
|
235
|
-
getByReference: (req) => {
|
|
236
|
-
if (req.slug !== "deploy") throw new ConnectError("workflow not found", Code.NotFound);
|
|
237
|
-
return knownWorkflow;
|
|
238
|
-
},
|
|
239
|
-
});
|
|
240
|
-
router.service(WorkflowCommandController, {
|
|
241
|
-
tagVersion: (req) => {
|
|
242
|
-
tagCalls.push({ workflowId: req.workflowId, versionHash: req.versionHash, tag: req.tag });
|
|
243
|
-
return knownWorkflow;
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
router.service(AgentExecutionQueryController, {
|
|
248
|
-
get: (req) => {
|
|
249
|
-
if (req.value === "aex_done") return completedExecution;
|
|
250
|
-
if (req.value === "aex_run") return pendingExecution;
|
|
251
|
-
throw new ConnectError("execution not found", Code.NotFound);
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
router.service(AgentExecutionCommandController, {
|
|
255
|
-
cancel: (req) => {
|
|
256
|
-
cancelCalls.push(req.id);
|
|
257
|
-
return cancelledExecution;
|
|
258
|
-
},
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
backend = createHttp2Server(connectNodeAdapter({ routes }));
|
|
263
|
-
backend.on("session", (session) => {
|
|
264
|
-
openSessions.add(session);
|
|
265
|
-
session.on("close", () => openSessions.delete(session));
|
|
266
|
-
});
|
|
267
|
-
await new Promise<void>((resolve) => backend.listen(0, "127.0.0.1", resolve));
|
|
268
|
-
const port = (backend.address() as AddressInfo).port;
|
|
269
|
-
client = createNodeClient({ baseUrl: normalizeEndpoint(`127.0.0.1:${port}`) });
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
afterAll(async () => {
|
|
273
|
-
for (const session of openSessions) session.destroy();
|
|
274
|
-
await new Promise<void>((resolve) => backend.close(() => resolve()));
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
describe("delete (standard kinds)", () => {
|
|
278
|
-
it("describes then deletes an agent by ID", async () => {
|
|
279
|
-
const plan = await planDelete(client, "agent", "agt_1", "acme");
|
|
280
|
-
|
|
281
|
-
expect(plan.warning.status).toBe("warning");
|
|
282
|
-
expect(plan.warning.sections[0].fields).toEqual([
|
|
283
|
-
{ key: "ID", value: "agt_1" },
|
|
284
|
-
{ key: "Name", value: "Reviewer" },
|
|
285
|
-
{ key: "Slug", value: "reviewer" },
|
|
286
|
-
{ key: "Org", value: "acme" },
|
|
287
|
-
]);
|
|
288
|
-
|
|
289
|
-
const result = await plan.perform();
|
|
290
|
-
expect(result.status).toBe("success");
|
|
291
|
-
expect(result.message).toBe("Agent deleted successfully");
|
|
292
|
-
expect(result.sections[0].title).toBe("Deleted Agent");
|
|
293
|
-
expect(result.sections[0].fields).toContainEqual({ key: "ID", value: "agt_1" });
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it("resolves an agent by org/slug for the pre-Get", async () => {
|
|
297
|
-
const plan = await planDelete(client, "agent", "reviewer", "acme");
|
|
298
|
-
expect((await plan.perform()).status).toBe("success");
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
it("describes then deletes an agent instance by org/slug", async () => {
|
|
302
|
-
const plan = await planDelete(client, "agent-instance", "reviewer-default", "acme");
|
|
303
|
-
|
|
304
|
-
expect(plan.warning.status).toBe("warning");
|
|
305
|
-
expect(plan.warning.sections[0].fields).toContainEqual({ key: "ID", value: "ain_1" });
|
|
306
|
-
|
|
307
|
-
const result = await plan.perform();
|
|
308
|
-
expect(result.status).toBe("success");
|
|
309
|
-
expect(result.message).toBe("Agent Instance deleted successfully");
|
|
310
|
-
});
|
|
311
|
-
|
|
312
|
-
it("deletes an MCP server via the DeleteResourceInput shape", async () => {
|
|
313
|
-
const plan = await planDelete(client, "mcpserver", "filesystem", "acme");
|
|
314
|
-
const result = await plan.perform();
|
|
315
|
-
expect(result.status).toBe("success");
|
|
316
|
-
expect(result.message).toBe("MCP Server deleted successfully");
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
it("maps a NotFound on the pre-Get to ExitCode.NotFound", async () => {
|
|
320
|
-
const err = await planDelete(client, "agent", "missing", "acme").catch((e) => e);
|
|
321
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.NotFound);
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
it("deletes a schedule via its typed ID (tears down the Temporal artifact server-side)", async () => {
|
|
325
|
-
const plan = await planDelete(client, "schedule", "daily-fee-reminders", "acme");
|
|
326
|
-
const result = await plan.perform();
|
|
327
|
-
expect(result.status).toBe("success");
|
|
328
|
-
expect(result.message).toBe("Schedule deleted successfully");
|
|
329
|
-
expect(scheduleDeleteIds).toEqual(["sch_1"]);
|
|
330
|
-
});
|
|
331
|
-
|
|
332
|
-
it("deletes a workflow instance via its typed ID", async () => {
|
|
333
|
-
const plan = await planDelete(client, "workflow-instance", "deploy-default", "acme");
|
|
334
|
-
const result = await plan.perform();
|
|
335
|
-
expect(result.status).toBe("success");
|
|
336
|
-
expect(result.message).toBe("Workflow Instance deleted successfully");
|
|
337
|
-
expect(workflowInstanceDeleteIds).toEqual(["win_1"]);
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
it("rejects an unknown type and lists exactly the wired types", async () => {
|
|
341
|
-
const err = await planDelete(client, "bogus", "x", "acme").catch((e) => e);
|
|
342
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
343
|
-
// The list is derived from DELETE_HANDLERS (+ the two special cases), so
|
|
344
|
-
// it must name the wired kinds and never the narrowed ones (#354).
|
|
345
|
-
const message = String(err.message);
|
|
346
|
-
for (const wired of [
|
|
347
|
-
"environment",
|
|
348
|
-
"agentchannel",
|
|
349
|
-
"channelapp",
|
|
350
|
-
"schedule",
|
|
351
|
-
"workflowinstance",
|
|
352
|
-
"execution",
|
|
353
|
-
"organization",
|
|
354
|
-
]) {
|
|
355
|
-
expect(message).toContain(wired);
|
|
356
|
-
}
|
|
357
|
-
expect(message).not.toContain("session");
|
|
358
|
-
expect(message).not.toContain("oauthapp");
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
it("rejects a narrowed kind at the verb gate with a usage error", async () => {
|
|
362
|
-
// session's delete verb is narrowed out of the matrix
|
|
363
|
-
// (stigmer/stigmer#354), so the refusal now happens at the verb-support
|
|
364
|
-
// gate ("does not support") rather than the dispatch fall-through.
|
|
365
|
-
const err = await planDelete(client, "session", "ses_1", "acme").catch((e) => e);
|
|
366
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
367
|
-
expect(String(err.message)).toContain("does not support");
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
describe("delete (cutover kinds: environment, agent channel, channel app)", () => {
|
|
372
|
-
it("deletes an environment via the DeleteResourceInput shape", async () => {
|
|
373
|
-
const plan = await planDelete(client, "environment", "clinic-patient-db", "acme");
|
|
374
|
-
const result = await plan.perform();
|
|
375
|
-
|
|
376
|
-
expect(result.status).toBe("success");
|
|
377
|
-
expect(result.message).toBe("Environment deleted successfully");
|
|
378
|
-
expect(environmentDeletes).toEqual([{ resourceId: "env_1", force: false }]);
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
it("threads --force through the environment delete (generic ack carrier)", async () => {
|
|
382
|
-
const plan = await planDelete(client, "environment", "clinic-patient-db", "acme", true);
|
|
383
|
-
await plan.perform();
|
|
384
|
-
expect(environmentDeletes).toEqual([{ resourceId: "env_1", force: true }]);
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
it("deletes an agent channel via its typed-ID contract, ignoring force gracefully", async () => {
|
|
388
|
-
const plan = await planDelete(client, "agent-channel", "clinic-patient-whatsapp", "acme", true);
|
|
389
|
-
|
|
390
|
-
// The teardown-vs-pause distinction rides the warning (server doc contract).
|
|
391
|
-
expect(plan.warning.hints).toContain(
|
|
392
|
-
"Delete is the connection's full teardown; to pause instead, apply with spec.enabled: false.",
|
|
393
|
-
);
|
|
394
|
-
|
|
395
|
-
const result = await plan.perform();
|
|
396
|
-
expect(result.status).toBe("success");
|
|
397
|
-
expect(result.message).toBe("Agent Channel deleted successfully");
|
|
398
|
-
expect(channelDeleteIds).toEqual(["ach_1"]);
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
it("deletes a channel app via the DeleteResourceInput shape", async () => {
|
|
402
|
-
const plan = await planDelete(client, "channel-app", "clinic-meta-app", "acme");
|
|
403
|
-
const result = await plan.perform();
|
|
404
|
-
|
|
405
|
-
expect(result.status).toBe("success");
|
|
406
|
-
expect(result.message).toBe("Channel App deleted successfully");
|
|
407
|
-
expect(channelAppDeletes).toEqual([{ resourceId: "chapp_1", force: false }]);
|
|
408
|
-
});
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
describe("delete execution (cancel special case)", () => {
|
|
412
|
-
it("cancels a non-terminal execution", async () => {
|
|
413
|
-
const plan = await planDelete(client, "execution", "aex_run", "");
|
|
414
|
-
expect(plan.confirmPrompt).toContain("cancellation");
|
|
415
|
-
|
|
416
|
-
const result = await plan.perform();
|
|
417
|
-
expect(result.status).toBe("success");
|
|
418
|
-
expect(result.message).toBe("Execution cancelled successfully");
|
|
419
|
-
expect(result.sections[0].fields).toContainEqual({ key: "Status", value: "cancelled" });
|
|
420
|
-
expect(cancelCalls).toEqual(["aex_run"]);
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
it("reports an already-terminal execution without issuing a cancel", async () => {
|
|
424
|
-
const plan = await planDelete(client, "execution", "aex_done", "");
|
|
425
|
-
const result = await plan.perform();
|
|
426
|
-
expect(result.status).toBe("warning");
|
|
427
|
-
expect(result.message).toBe("Execution was already in terminal state");
|
|
428
|
-
expect(result.sections[0].fields).toContainEqual({ key: "Status", value: "completed" });
|
|
429
|
-
expect(cancelCalls).toEqual([]);
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
it("rejects a non-execution ID with a usage error", async () => {
|
|
433
|
-
const err = await planDelete(client, "execution", "agt_1", "").catch((e) => e);
|
|
434
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
435
|
-
});
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
describe("tag (workflow versions)", () => {
|
|
439
|
-
it("tags a workflow version and truncates the hash in the message", async () => {
|
|
440
|
-
const result = await tagVersion(client, "workflow", "acme/deploy", "abcdef1234567890", "stable", "acme");
|
|
441
|
-
expect(result.status).toBe("success");
|
|
442
|
-
expect(result.message).toBe("Tagged version abcdef123456 as 'stable'");
|
|
443
|
-
expect(tagCalls).toEqual([{ workflowId: "wfl_1", versionHash: "abcdef1234567890", tag: "stable" }]);
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
it("uses the org context for a bare slug", async () => {
|
|
447
|
-
await tagVersion(client, "wf", "deploy", "abc", "v1", "acme");
|
|
448
|
-
expect(tagCalls[0]?.workflowId).toBe("wfl_1");
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
it("rejects unsupported resource types with a usage error", async () => {
|
|
452
|
-
const err = await tagVersion(client, "agent", "acme/x", "abc", "v1", "acme").catch((e) => e);
|
|
453
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
454
|
-
});
|
|
455
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
-
import { interactiveBrowseEnabled } from "./tty.js";
|
|
3
|
-
|
|
4
|
-
const TTY = { isTTY: true };
|
|
5
|
-
const PIPE = { isTTY: false };
|
|
6
|
-
|
|
7
|
-
describe("interactiveBrowseEnabled", () => {
|
|
8
|
-
const originalTerm = process.env.TERM;
|
|
9
|
-
afterEach(() => {
|
|
10
|
-
process.env.TERM = originalTerm;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("enables the picker for inline output on a full TTY", () => {
|
|
14
|
-
process.env.TERM = "xterm-256color";
|
|
15
|
-
expect(interactiveBrowseEnabled("inline", { stdin: TTY, stdout: TTY })).toBe(true);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("disables the picker in JSON output mode", () => {
|
|
19
|
-
process.env.TERM = "xterm-256color";
|
|
20
|
-
expect(interactiveBrowseEnabled("json", { stdin: TTY, stdout: TTY })).toBe(false);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("disables the picker when stdout is not a TTY (piped output)", () => {
|
|
24
|
-
process.env.TERM = "xterm-256color";
|
|
25
|
-
expect(interactiveBrowseEnabled("inline", { stdin: TTY, stdout: PIPE })).toBe(false);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("disables the picker when stdin is not a TTY (piped input)", () => {
|
|
29
|
-
process.env.TERM = "xterm-256color";
|
|
30
|
-
expect(interactiveBrowseEnabled("inline", { stdin: PIPE, stdout: TTY })).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("disables the picker on a dumb terminal", () => {
|
|
34
|
-
process.env.TERM = "dumb";
|
|
35
|
-
expect(interactiveBrowseEnabled("inline", { stdin: TTY, stdout: TTY })).toBe(false);
|
|
36
|
-
});
|
|
37
|
-
});
|