@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
package/src/program.test.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { buildProgram } from "./program.js";
|
|
3
|
-
import { VERSION } from "./version.js";
|
|
4
|
-
|
|
5
|
-
describe("buildProgram", () => {
|
|
6
|
-
it("registers the foundational commands", () => {
|
|
7
|
-
const program = buildProgram();
|
|
8
|
-
const names = program.commands.map((command) => command.name()).sort();
|
|
9
|
-
expect(names).toContain("version");
|
|
10
|
-
expect(names).toContain("completion");
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("registers the Wave 2b read commands", () => {
|
|
14
|
-
const program = buildProgram();
|
|
15
|
-
const names = program.commands.map((command) => command.name());
|
|
16
|
-
expect(names).toEqual(expect.arrayContaining(["search", "usage", "diff"]));
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("registers the Wave 2d artifact commands", () => {
|
|
20
|
-
const program = buildProgram();
|
|
21
|
-
const names = program.commands.map((command) => command.name());
|
|
22
|
-
expect(names).toEqual(expect.arrayContaining(["push", "download"]));
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it("registers the Wave 3c streaming commands", () => {
|
|
26
|
-
const program = buildProgram();
|
|
27
|
-
const names = program.commands.map((command) => command.name());
|
|
28
|
-
expect(names).toEqual(expect.arrayContaining(["run", "resume"]));
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("has no draft command: a plugin is authored outside Stigmer and installed, never drafted by a system agent", () => {
|
|
32
|
-
const program = buildProgram();
|
|
33
|
-
const names = program.commands.map((command) => command.name());
|
|
34
|
-
expect(names).not.toContain("draft");
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it("exposes the share subcommands", () => {
|
|
38
|
-
const program = buildProgram();
|
|
39
|
-
const share = program.commands.find((command) => command.name() === "share");
|
|
40
|
-
const subs = share?.commands.map((command) => command.name());
|
|
41
|
-
expect(subs).toEqual(["agent"]);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it("exposes the usage subcommands", () => {
|
|
45
|
-
const program = buildProgram();
|
|
46
|
-
const usage = program.commands.find((command) => command.name() === "usage");
|
|
47
|
-
const subs = usage?.commands.map((command) => command.name()).sort();
|
|
48
|
-
expect(subs).toEqual(["agent", "org", "session"]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("exposes the global flags as persistent options", () => {
|
|
52
|
-
const program = buildProgram();
|
|
53
|
-
const longFlags = program.options.map((option) => option.long);
|
|
54
|
-
expect(longFlags).toEqual(
|
|
55
|
-
expect.arrayContaining(["--debug", "--standalone", "--org", "--api-key"]),
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("reports a semver-shaped version", () => {
|
|
60
|
-
expect(VERSION).toMatch(/^\d+\.\d+\.\d+/);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import {
|
|
3
|
-
generateAliases,
|
|
4
|
-
normalizeAlias,
|
|
5
|
-
pluralize,
|
|
6
|
-
toKebabCase,
|
|
7
|
-
toSnakeCase,
|
|
8
|
-
} from "./aliases.js";
|
|
9
|
-
|
|
10
|
-
function normalized(aliases: string[]): Set<string> {
|
|
11
|
-
return new Set(aliases.map(normalizeAlias));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
describe("generateAliases", () => {
|
|
15
|
-
it("derives the full McpServer alias set", () => {
|
|
16
|
-
const found = normalized(
|
|
17
|
-
generateAliases("McpServer", "MCP Server", "mcp", "mcp_server"),
|
|
18
|
-
);
|
|
19
|
-
for (const exp of [
|
|
20
|
-
"mcpserver",
|
|
21
|
-
"mcp-server",
|
|
22
|
-
"mcp_server",
|
|
23
|
-
"mcp",
|
|
24
|
-
"mcpservers",
|
|
25
|
-
"mcp-servers",
|
|
26
|
-
"mcp_servers",
|
|
27
|
-
"mcps",
|
|
28
|
-
]) {
|
|
29
|
-
expect(found).toContain(exp);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("derives the Agent alias set", () => {
|
|
34
|
-
const found = normalized(generateAliases("Agent", "Agent", "agt", "agent"));
|
|
35
|
-
for (const exp of ["agent", "agt", "agents", "agts"]) {
|
|
36
|
-
expect(found).toContain(exp);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("derives the Workflow alias set", () => {
|
|
41
|
-
const found = normalized(
|
|
42
|
-
generateAliases("Workflow", "Workflow", "wfl", "workflow"),
|
|
43
|
-
);
|
|
44
|
-
for (const exp of ["workflow", "wfl", "workflows", "wfls"]) {
|
|
45
|
-
expect(found).toContain(exp);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it("derives the OAuthApp alias set including the canonical proto name", () => {
|
|
50
|
-
// "OAuthApp" is the only kind whose PascalCase name has consecutive
|
|
51
|
-
// capitals, so its split-derived forms (o-auth-app) diverge from the proto
|
|
52
|
-
// enum name (oauth_app). Both families must be accepted: the canonical
|
|
53
|
-
// spellings via protoName (stigmer/stigmer#470), and the historical
|
|
54
|
-
// split-derived spellings for backward compatibility.
|
|
55
|
-
const found = normalized(
|
|
56
|
-
generateAliases("OAuthApp", "OAuth App", "oapp", "oauth_app"),
|
|
57
|
-
);
|
|
58
|
-
for (const exp of [
|
|
59
|
-
"oauth_app",
|
|
60
|
-
"oauth-app",
|
|
61
|
-
"oauth_apps",
|
|
62
|
-
"oauth-apps",
|
|
63
|
-
"oauthapp",
|
|
64
|
-
"oauthapps",
|
|
65
|
-
"o_auth_app",
|
|
66
|
-
"o-auth-app",
|
|
67
|
-
"oapp",
|
|
68
|
-
"oapps",
|
|
69
|
-
]) {
|
|
70
|
-
expect(found).toContain(exp);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("does not let a multi-word display name steal the parent's name", () => {
|
|
75
|
-
// "Agent Instance" must NOT register "agent" (that belongs to Agent).
|
|
76
|
-
const found = normalized(
|
|
77
|
-
generateAliases(
|
|
78
|
-
"AgentInstance",
|
|
79
|
-
"Agent Instance",
|
|
80
|
-
"ain",
|
|
81
|
-
"agent_instance",
|
|
82
|
-
),
|
|
83
|
-
);
|
|
84
|
-
expect(found).not.toContain("agent");
|
|
85
|
-
expect(found).toContain("agentinstance");
|
|
86
|
-
expect(found).toContain("agent-instance");
|
|
87
|
-
expect(found).toContain("ain");
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it("produces no duplicate normalized aliases", () => {
|
|
91
|
-
// "agent" as protoName re-derives already-added forms — dedupe must hold.
|
|
92
|
-
const aliases = generateAliases("Agent", "Agent", "agent", "agent");
|
|
93
|
-
const lower = aliases.map(normalizeAlias);
|
|
94
|
-
expect(new Set(lower).size).toBe(lower.length);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
describe("case conversion", () => {
|
|
99
|
-
it.each([
|
|
100
|
-
["McpServer", "mcp-server"],
|
|
101
|
-
["Agent", "agent"],
|
|
102
|
-
["AgentInstance", "agent-instance"],
|
|
103
|
-
["WorkflowExecution", "workflow-execution"],
|
|
104
|
-
["", ""],
|
|
105
|
-
])("toKebabCase(%s) = %s", (input, expected) => {
|
|
106
|
-
expect(toKebabCase(input)).toBe(expected);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it.each([
|
|
110
|
-
["McpServer", "mcp_server"],
|
|
111
|
-
["Agent", "agent"],
|
|
112
|
-
["AgentInstance", "agent_instance"],
|
|
113
|
-
["WorkflowExecution", "workflow_execution"],
|
|
114
|
-
["", ""],
|
|
115
|
-
])("toSnakeCase(%s) = %s", (input, expected) => {
|
|
116
|
-
expect(toSnakeCase(input)).toBe(expected);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
describe("pluralize", () => {
|
|
121
|
-
it.each([
|
|
122
|
-
["agent", "agents"],
|
|
123
|
-
["workflow", "workflows"],
|
|
124
|
-
["mcpserver", "mcpservers"],
|
|
125
|
-
["agents", "agents"],
|
|
126
|
-
["", ""],
|
|
127
|
-
])("pluralize(%s) = %s", (input, expected) => {
|
|
128
|
-
expect(pluralize(input)).toBe(expected);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
describe("normalizeAlias", () => {
|
|
133
|
-
it.each([
|
|
134
|
-
["Agent", "agent"],
|
|
135
|
-
[" agent ", "agent"],
|
|
136
|
-
["MCP-Server", "mcp-server"],
|
|
137
|
-
["WORKFLOW", "workflow"],
|
|
138
|
-
["", ""],
|
|
139
|
-
])("normalizeAlias(%s) = %s", (input, expected) => {
|
|
140
|
-
expect(normalizeAlias(input)).toBe(expected);
|
|
141
|
-
});
|
|
142
|
-
});
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { APPLY_HANDLERS } from "../resources/apply/handlers.js";
|
|
4
|
-
import { DELETE_HANDLERS } from "../resources/delete.js";
|
|
5
|
-
import { GET_BINDINGS } from "../resources/get-bindings.js";
|
|
6
|
-
import { isExecutionAlias } from "../resources/execution.js";
|
|
7
|
-
import { LIST_HANDLERS, SEARCH_KINDS } from "../resources/list.js";
|
|
8
|
-
import { VALIDATE_SCHEMAS } from "../resources/validate.js";
|
|
9
|
-
import { normalizeAlias } from "./aliases.js";
|
|
10
|
-
import { defaultRegistry } from "./registry.js";
|
|
11
|
-
import { Verb } from "./verbs.js";
|
|
12
|
-
|
|
13
|
-
const registry = defaultRegistry();
|
|
14
|
-
|
|
15
|
-
describe("registry — alias resolution", () => {
|
|
16
|
-
it.each([
|
|
17
|
-
["mcp", ApiResourceKind.mcp_server],
|
|
18
|
-
["mcp-server", ApiResourceKind.mcp_server],
|
|
19
|
-
["mcp_server", ApiResourceKind.mcp_server],
|
|
20
|
-
["McpServer", ApiResourceKind.mcp_server],
|
|
21
|
-
["mcpservers", ApiResourceKind.mcp_server],
|
|
22
|
-
["agent", ApiResourceKind.agent],
|
|
23
|
-
["agents", ApiResourceKind.agent],
|
|
24
|
-
["agt", ApiResourceKind.agent],
|
|
25
|
-
["workflow", ApiResourceKind.workflow],
|
|
26
|
-
["wfl", ApiResourceKind.workflow],
|
|
27
|
-
["org", ApiResourceKind.organization],
|
|
28
|
-
["oapp", ApiResourceKind.oauth_app],
|
|
29
|
-
// The canonical proto enum name and its kebab/plural companions
|
|
30
|
-
// (stigmer/stigmer#470) plus the historical split-derived spellings,
|
|
31
|
-
// which must keep working.
|
|
32
|
-
["oauth_app", ApiResourceKind.oauth_app],
|
|
33
|
-
["oauth-app", ApiResourceKind.oauth_app],
|
|
34
|
-
["oauth_apps", ApiResourceKind.oauth_app],
|
|
35
|
-
["o_auth_app", ApiResourceKind.oauth_app],
|
|
36
|
-
["o-auth-app", ApiResourceKind.oauth_app],
|
|
37
|
-
["agentchannel", ApiResourceKind.agent_channel],
|
|
38
|
-
["agent-channel", ApiResourceKind.agent_channel],
|
|
39
|
-
["agent_channel", ApiResourceKind.agent_channel],
|
|
40
|
-
["AgentChannel", ApiResourceKind.agent_channel],
|
|
41
|
-
["agentchannels", ApiResourceKind.agent_channel],
|
|
42
|
-
["ach", ApiResourceKind.agent_channel],
|
|
43
|
-
])("resolves %s -> kind", (alias, kind) => {
|
|
44
|
-
expect(registry.getByAlias(alias)?.kind).toBe(kind);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("agent_channel does not steal the agent alias (multi-word first-word guard)", () => {
|
|
48
|
-
expect(registry.getByAlias("agent")?.kind).toBe(ApiResourceKind.agent);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("resolution is case-insensitive", () => {
|
|
52
|
-
expect(registry.getByAlias("MCP-SERVER")?.kind).toBe(
|
|
53
|
-
ApiResourceKind.mcp_server,
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it("returns undefined for an unknown alias", () => {
|
|
58
|
-
expect(registry.getByAlias("nope")).toBeUndefined();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// The runtime execution kinds are served by the pre-gate `list executions`
|
|
62
|
-
// route and their dedicated controllers; registering either would put a
|
|
63
|
-
// row in `list types` that the pre-gate route then shadows — the
|
|
64
|
-
// stigmer/stigmer#469 class (see the alias-shadowing suite below).
|
|
65
|
-
it("does not register the runtime execution kinds as addressable types", () => {
|
|
66
|
-
for (const kind of [
|
|
67
|
-
ApiResourceKind.agent_execution,
|
|
68
|
-
ApiResourceKind.workflow_execution,
|
|
69
|
-
]) {
|
|
70
|
-
expect(registry.getByKind(kind)).toBeUndefined();
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
describe("registry — YAML kind resolution", () => {
|
|
76
|
-
it("resolves the exact YAML kind", () => {
|
|
77
|
-
expect(registry.getByYamlKind("McpServer")?.kind).toBe(
|
|
78
|
-
ApiResourceKind.mcp_server,
|
|
79
|
-
);
|
|
80
|
-
expect(registry.getByYamlKind("Workflow")?.kind).toBe(
|
|
81
|
-
ApiResourceKind.workflow,
|
|
82
|
-
);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
describe("registry — verb support matrix", () => {
|
|
87
|
-
it("agent supports read + run + search verbs", () => {
|
|
88
|
-
for (const v of [
|
|
89
|
-
Verb.Apply,
|
|
90
|
-
Verb.Validate,
|
|
91
|
-
Verb.Get,
|
|
92
|
-
Verb.List,
|
|
93
|
-
Verb.Delete,
|
|
94
|
-
Verb.Run,
|
|
95
|
-
Verb.Search,
|
|
96
|
-
]) {
|
|
97
|
-
expect(registry.supportsVerb(ApiResourceKind.agent, v)).toBe(true);
|
|
98
|
-
}
|
|
99
|
-
expect(registry.supportsVerb(ApiResourceKind.agent, Verb.Push)).toBe(false);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it("skill supports push but not apply", () => {
|
|
103
|
-
expect(registry.supportsVerb(ApiResourceKind.skill, Verb.Push)).toBe(true);
|
|
104
|
-
expect(registry.supportsVerb(ApiResourceKind.skill, Verb.Apply)).toBe(
|
|
105
|
-
false,
|
|
106
|
-
);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it("workflow_instance has no list verb", () => {
|
|
110
|
-
expect(
|
|
111
|
-
registry.supportsVerb(ApiResourceKind.workflow_instance, Verb.Get),
|
|
112
|
-
).toBe(true);
|
|
113
|
-
expect(
|
|
114
|
-
registry.supportsVerb(ApiResourceKind.workflow_instance, Verb.List),
|
|
115
|
-
).toBe(false);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it("agent_channel supports the full declarative verb set", () => {
|
|
119
|
-
for (const v of [Verb.Apply, Verb.Get, Verb.List, Verb.Delete]) {
|
|
120
|
-
expect(registry.supportsVerb(ApiResourceKind.agent_channel, v)).toBe(
|
|
121
|
-
true,
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
// The install flow is console-driven and cloud-only — never a CLI verb.
|
|
125
|
-
expect(registry.supportsVerb(ApiResourceKind.agent_channel, Verb.Run)).toBe(
|
|
126
|
-
false,
|
|
127
|
-
);
|
|
128
|
-
expect(
|
|
129
|
-
registry.supportsVerb(ApiResourceKind.agent_channel, Verb.Search),
|
|
130
|
-
).toBe(false);
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it("schedule supports the full declarative verb set", () => {
|
|
134
|
-
for (const v of [Verb.Apply, Verb.Get, Verb.List, Verb.Delete]) {
|
|
135
|
-
expect(registry.supportsVerb(ApiResourceKind.schedule, v)).toBe(true);
|
|
136
|
-
}
|
|
137
|
-
// Firing rides `stigmer schedule trigger`, never the generic run verb.
|
|
138
|
-
expect(registry.supportsVerb(ApiResourceKind.schedule, Verb.Run)).toBe(
|
|
139
|
-
false,
|
|
140
|
-
);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it("agent_share promises only apply (narrowed — stigmer/stigmer#354)", () => {
|
|
144
|
-
expect(registry.supportsVerb(ApiResourceKind.agent_share, Verb.Apply)).toBe(
|
|
145
|
-
true,
|
|
146
|
-
);
|
|
147
|
-
for (const v of [Verb.Get, Verb.List, Verb.Delete]) {
|
|
148
|
-
expect(registry.supportsVerb(ApiResourceKind.agent_share, v)).toBe(false);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
it("session promises apply + list; get/delete stay narrowed (stigmer/stigmer#354, #469)", () => {
|
|
153
|
-
expect(registry.supportsVerb(ApiResourceKind.session, Verb.Apply)).toBe(
|
|
154
|
-
true,
|
|
155
|
-
);
|
|
156
|
-
expect(registry.supportsVerb(ApiResourceKind.session, Verb.List)).toBe(
|
|
157
|
-
true,
|
|
158
|
-
);
|
|
159
|
-
for (const v of [Verb.Get, Verb.Delete]) {
|
|
160
|
-
expect(registry.supportsVerb(ApiResourceKind.session, v)).toBe(false);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
it("typesForVerb(get) includes the core read kinds", () => {
|
|
165
|
-
const kinds = new Set(registry.typesForVerb(Verb.Get).map((t) => t.kind));
|
|
166
|
-
expect(kinds).toContain(ApiResourceKind.agent);
|
|
167
|
-
expect(kinds).toContain(ApiResourceKind.workflow);
|
|
168
|
-
expect(kinds).toContain(ApiResourceKind.mcp_server);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
describe("registry — completeness", () => {
|
|
173
|
-
it("registers every CLI-relevant kind with metadata", () => {
|
|
174
|
-
for (const info of registry.all()) {
|
|
175
|
-
expect(info.name).not.toBe("");
|
|
176
|
-
expect(info.singular).toBe(info.name.toLowerCase());
|
|
177
|
-
expect(info.aliases.length).toBeGreaterThan(0);
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
// The canonical proto enum name is the spelling a proto-literate user is most
|
|
182
|
-
// likely to type; it must resolve for EVERY kind by construction, not by
|
|
183
|
-
// accident of PascalCase spelling. OAuthApp was the counterexample
|
|
184
|
-
// (stigmer/stigmer#470): its split-derived aliases (o_auth_app) diverged from
|
|
185
|
-
// the proto name (oauth_app), so only it failed.
|
|
186
|
-
it("resolves every registered kind's canonical proto enum name (snake and kebab)", () => {
|
|
187
|
-
for (const info of registry.all()) {
|
|
188
|
-
const protoName = ApiResourceKind[info.kind];
|
|
189
|
-
expect(
|
|
190
|
-
registry.getByAlias(protoName)?.kind,
|
|
191
|
-
`canonical proto name '${protoName}' must resolve to its own kind`,
|
|
192
|
-
).toBe(info.kind);
|
|
193
|
-
const kebab = protoName.replaceAll("_", "-");
|
|
194
|
-
expect(
|
|
195
|
-
registry.getByAlias(kebab)?.kind,
|
|
196
|
-
`kebab form '${kebab}' of the canonical proto name must resolve to its own kind`,
|
|
197
|
-
).toBe(info.kind);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
// buildRegistry's byAlias.set is last-wins: a collision between two kinds'
|
|
202
|
-
// alias sets would silently shadow the earlier kind. The one collision found
|
|
203
|
-
// by hand ("Agent Instance" nearly stealing "agent") is prevented inside
|
|
204
|
-
// generateAliases; this pin makes the whole class a red test instead of a
|
|
205
|
-
// hand-check as future kinds (and their derived forms) are added.
|
|
206
|
-
it("no two kinds share an alias (silent last-wins shadowing guard)", () => {
|
|
207
|
-
const claimedBy = new Map<string, string>();
|
|
208
|
-
for (const info of registry.all()) {
|
|
209
|
-
for (const alias of info.aliases) {
|
|
210
|
-
const key = normalizeAlias(alias);
|
|
211
|
-
const owner = claimedBy.get(key);
|
|
212
|
-
expect(
|
|
213
|
-
owner === undefined || owner === info.name,
|
|
214
|
-
`alias '${key}' is claimed by both ${owner} and ${info.name} — the later registration silently wins`,
|
|
215
|
-
).toBe(true);
|
|
216
|
-
claimedBy.set(key, info.name);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
// The verb matrix is a PROMISE (`list types` prints it; the command layer
|
|
223
|
-
// gates on it), but each verb actually runs through its own dispatch
|
|
224
|
-
// registry. A pair present in the matrix but absent from its registry fails
|
|
225
|
-
// at the point of use with "not implemented" — the stigmer/stigmer#353 bug
|
|
226
|
-
// class. This suite holds the two to strict bidirectional equality so the
|
|
227
|
-
// drift is a red test instead of a runtime surprise. Verbs deliberately
|
|
228
|
-
// withheld are narrowed out of the matrix (recorded in stigmer/stigmer#354),
|
|
229
|
-
// never exempted here — an exemption category would legitimize exactly the
|
|
230
|
-
// state this suite exists to reject.
|
|
231
|
-
describe("registry — verb/dispatch conformance", () => {
|
|
232
|
-
// Special cases are kind/verb pairs that genuinely work through bespoke
|
|
233
|
-
// code instead of a registry entry; each names its dispatch site.
|
|
234
|
-
const DISPATCH: ReadonlyArray<{
|
|
235
|
-
label: string;
|
|
236
|
-
verb: Verb;
|
|
237
|
-
wired: ReadonlySet<ApiResourceKind>;
|
|
238
|
-
specialCases: ReadonlyMap<ApiResourceKind, string>;
|
|
239
|
-
}> = [
|
|
240
|
-
{
|
|
241
|
-
label: "apply",
|
|
242
|
-
verb: Verb.Apply,
|
|
243
|
-
wired: new Set(APPLY_HANDLERS.keys()),
|
|
244
|
-
specialCases: new Map(),
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
label: "get",
|
|
248
|
-
verb: Verb.Get,
|
|
249
|
-
wired: new Set(GET_BINDINGS.keys()),
|
|
250
|
-
specialCases: new Map([
|
|
251
|
-
[
|
|
252
|
-
ApiResourceKind.organization,
|
|
253
|
-
"fetchOrganization in resources/get.ts (not org-scoped; a slug resolves via findMyOrganizations)",
|
|
254
|
-
],
|
|
255
|
-
]),
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
label: "list",
|
|
259
|
-
verb: Verb.List,
|
|
260
|
-
wired: new Set([...LIST_HANDLERS.keys(), ...SEARCH_KINDS]),
|
|
261
|
-
specialCases: new Map(),
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
label: "validate",
|
|
265
|
-
verb: Verb.Validate,
|
|
266
|
-
wired: new Set(VALIDATE_SCHEMAS.keys()),
|
|
267
|
-
specialCases: new Map(),
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
label: "delete",
|
|
271
|
-
verb: Verb.Delete,
|
|
272
|
-
wired: new Set(DELETE_HANDLERS.keys()),
|
|
273
|
-
specialCases: new Map([
|
|
274
|
-
[
|
|
275
|
-
ApiResourceKind.organization,
|
|
276
|
-
"planOrganizationDelete in resources/delete.ts (not org-scoped; resolved via memberships)",
|
|
277
|
-
],
|
|
278
|
-
]),
|
|
279
|
-
},
|
|
280
|
-
];
|
|
281
|
-
|
|
282
|
-
it.each(DISPATCH)(
|
|
283
|
-
"every kind promising '$label' has a dispatch entry",
|
|
284
|
-
({ verb, wired, specialCases }) => {
|
|
285
|
-
for (const info of registry.all()) {
|
|
286
|
-
if (!info.supportedVerbs.has(verb)) continue;
|
|
287
|
-
if (specialCases.has(info.kind)) continue;
|
|
288
|
-
expect(
|
|
289
|
-
wired.has(info.kind),
|
|
290
|
-
`${info.name} promises '${verb}' in the verb matrix but has no dispatch entry — ` +
|
|
291
|
-
"wire it or narrow the matrix (stigmer/stigmer#353, #354)",
|
|
292
|
-
).toBe(true);
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
);
|
|
296
|
-
|
|
297
|
-
it.each(DISPATCH)(
|
|
298
|
-
"every '$label' dispatch entry is promised in the matrix",
|
|
299
|
-
({ verb, wired }) => {
|
|
300
|
-
for (const kind of wired) {
|
|
301
|
-
expect(
|
|
302
|
-
registry.supportsVerb(kind, verb),
|
|
303
|
-
`${ApiResourceKind[kind]} is wired for '${verb}' but the verb matrix does not promise it — ` +
|
|
304
|
-
"dead dispatch the command-layer gate blocks",
|
|
305
|
-
).toBe(true);
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
);
|
|
309
|
-
|
|
310
|
-
it("special cases do not shadow a real dispatch entry", () => {
|
|
311
|
-
for (const { label, wired, specialCases } of DISPATCH) {
|
|
312
|
-
for (const kind of specialCases.keys()) {
|
|
313
|
-
expect(
|
|
314
|
-
wired.has(kind),
|
|
315
|
-
`${ApiResourceKind[kind]} '${label}' is documented as a special case yet also has a registry entry — drop one`,
|
|
316
|
-
).toBe(false);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
// `stigmer list` resolves a handful of aliases BEFORE consulting the
|
|
323
|
-
// registry (commands/list.ts): `types` (a command word, not a kind) and the
|
|
324
|
-
// execution family. A pre-gate alias that intercepts a REGISTERED kind hides
|
|
325
|
-
// that kind's registry dispatch behind bespoke behavior the verb matrix
|
|
326
|
-
// cannot describe — sessions shipped working-but-unadvertised for two months
|
|
327
|
-
// exactly this way (stigmer/stigmer#469). Every pre-gate predicate must be
|
|
328
|
-
// listed here; the pin holds each one away from every registered kind's
|
|
329
|
-
// alias set, so a future bypass for an addressable kind is a red test, not
|
|
330
|
-
// a silently lying `list types` row.
|
|
331
|
-
describe("registry — pre-gate list aliases cannot shadow registered kinds", () => {
|
|
332
|
-
const PRE_GATE_PREDICATES: ReadonlyArray<{
|
|
333
|
-
name: string;
|
|
334
|
-
matches: (type: string) => boolean;
|
|
335
|
-
}> = [
|
|
336
|
-
{
|
|
337
|
-
name: "executions (resources/execution.ts isExecutionAlias)",
|
|
338
|
-
matches: isExecutionAlias,
|
|
339
|
-
},
|
|
340
|
-
];
|
|
341
|
-
|
|
342
|
-
it("no registered kind's alias is intercepted by a pre-gate predicate", () => {
|
|
343
|
-
for (const { name, matches } of PRE_GATE_PREDICATES) {
|
|
344
|
-
for (const info of registry.all()) {
|
|
345
|
-
for (const alias of info.aliases) {
|
|
346
|
-
expect(
|
|
347
|
-
matches(alias),
|
|
348
|
-
`registry alias '${alias}' (${info.name}) is intercepted by the pre-gate route ${name} — ` +
|
|
349
|
-
"it shadows the kind's registry dispatch (the stigmer/stigmer#469 works-but-unadvertised class)",
|
|
350
|
-
).toBe(false);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
});
|