@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,603 +0,0 @@
|
|
|
1
|
-
// In-process integration test for the read verbs (get/list).
|
|
2
|
-
//
|
|
3
|
-
// Stands up a real Connect backend over h2c serving the query controllers the
|
|
4
|
-
// CLI calls, points an SDK node client at it, and drives the resource layer
|
|
5
|
-
// (fetchResource / listResources) end to end. Asserts the rendered JSON matches
|
|
6
|
-
// the backend's protojson (the parity contract) and that backend RPC errors map
|
|
7
|
-
// to the right CLI exit code via classify().
|
|
8
|
-
|
|
9
|
-
import { create, toJson } from "@bufbuild/protobuf";
|
|
10
|
-
import { timestampFromDate } from "@bufbuild/protobuf/wkt";
|
|
11
|
-
import { Code, ConnectError, type ConnectRouter } from "@connectrpc/connect";
|
|
12
|
-
import { connectNodeAdapter } from "@connectrpc/connect-node";
|
|
13
|
-
import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
14
|
-
import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
|
|
15
|
-
import { AgentChannelSchema } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
|
|
16
|
-
import { AgentChannelQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/query_pb";
|
|
17
|
-
import { AgentChannelInstallState } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/status_pb";
|
|
18
|
-
import { AgentInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
|
|
19
|
-
import { AgentInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/query_pb";
|
|
20
|
-
import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
21
|
-
import { ChannelAppQueryController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/query_pb";
|
|
22
|
-
import { EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
|
|
23
|
-
import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
|
|
24
|
-
import { ScheduleSchema } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
25
|
-
import { ScheduleQueryController } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/query_pb";
|
|
26
|
-
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
27
|
-
import { ApiKeySchema } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
|
|
28
|
-
import { ApiKeyQueryController } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/query_pb";
|
|
29
|
-
import { SearchResultSchema } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
|
|
30
|
-
import { SearchService } from "@stigmer/protos/ai/stigmer/search/v1/query_pb";
|
|
31
|
-
import { OrganizationSchema } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
|
|
32
|
-
import { OrganizationQueryController } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/query_pb";
|
|
33
|
-
import { createNodeClient, normalizeEndpoint } from "@stigmer/sdk/node";
|
|
34
|
-
import type { Stigmer } from "@stigmer/sdk";
|
|
35
|
-
import { createServer as createHttp2Server, type Http2Server, type ServerHttp2Session } from "node:http2";
|
|
36
|
-
import type { AddressInfo } from "node:net";
|
|
37
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
38
|
-
import { classify, ExitCode } from "../errors/index.js";
|
|
39
|
-
import { fetchResource } from "./get.js";
|
|
40
|
-
import { listResources } from "./list.js";
|
|
41
|
-
import { renderResource } from "./render.js";
|
|
42
|
-
|
|
43
|
-
const knownAgent = create(AgentSchema, {
|
|
44
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
45
|
-
kind: "Agent",
|
|
46
|
-
metadata: { name: "Reviewer", slug: "reviewer", org: "acme", id: "agt_1" },
|
|
47
|
-
spec: { description: "reviews code" },
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const knownInstance = create(AgentInstanceSchema, {
|
|
51
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
52
|
-
kind: "AgentInstance",
|
|
53
|
-
metadata: { name: "reviewer-default", slug: "reviewer-default", org: "acme", id: "ain_1" },
|
|
54
|
-
spec: { agentId: "agt_1", description: "Default instance (auto-created, no custom configuration)" },
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const knownOrg = create(OrganizationSchema, {
|
|
58
|
-
apiVersion: "tenancy.stigmer.ai/v1",
|
|
59
|
-
kind: "Organization",
|
|
60
|
-
metadata: { name: "Acme", slug: "acme", org: "acme", id: "acme" },
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const knownApiKey = create(ApiKeySchema, {
|
|
64
|
-
apiVersion: "iam.stigmer.ai/v1",
|
|
65
|
-
kind: "ApiKey",
|
|
66
|
-
metadata: { name: "ci", org: "acme", id: "key_1" },
|
|
67
|
-
spec: { fingerprint: "abcd", neverExpires: true },
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// Second org/API-key entries so the list tests can pin the
|
|
71
|
-
// dispatcher-applied --limit slice — both RPCs are unpaginated (Empty
|
|
72
|
-
// request), the exact shape that shipped ignoring the flag when handlers
|
|
73
|
-
// owned rendering (stigmer/stigmer#312).
|
|
74
|
-
const secondOrg = create(OrganizationSchema, {
|
|
75
|
-
apiVersion: "tenancy.stigmer.ai/v1",
|
|
76
|
-
kind: "Organization",
|
|
77
|
-
metadata: { name: "Beta Clinic", slug: "beta-clinic", org: "beta-clinic", id: "beta-clinic" },
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const secondApiKey = create(ApiKeySchema, {
|
|
81
|
-
apiVersion: "iam.stigmer.ai/v1",
|
|
82
|
-
kind: "ApiKey",
|
|
83
|
-
metadata: { name: "local-dev", org: "acme", id: "key_2" },
|
|
84
|
-
spec: { fingerprint: "ef01", neverExpires: true },
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const knownSearchResult = create(SearchResultSchema, {
|
|
88
|
-
kind: ApiResourceKind.agent,
|
|
89
|
-
id: "agt_1",
|
|
90
|
-
name: "Reviewer",
|
|
91
|
-
slug: "reviewer",
|
|
92
|
-
qualifiedSlug: "acme/reviewer",
|
|
93
|
-
org: "acme",
|
|
94
|
-
description: "reviews code",
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// The three T07 cutover kinds — wired into get-bindings and list alongside
|
|
98
|
-
// this test. environment lists via the SearchService (it is search-indexed);
|
|
99
|
-
// the two channel kinds list via their dedicated query RPCs.
|
|
100
|
-
const knownEnvironment = create(EnvironmentSchema, {
|
|
101
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
102
|
-
kind: "Environment",
|
|
103
|
-
metadata: { name: "clinic-patient-db", slug: "clinic-patient-db", org: "acme", id: "env_1" },
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
const knownEnvironmentSearchResult = create(SearchResultSchema, {
|
|
107
|
-
kind: ApiResourceKind.environment,
|
|
108
|
-
id: "env_1",
|
|
109
|
-
name: "clinic-patient-db",
|
|
110
|
-
slug: "clinic-patient-db",
|
|
111
|
-
qualifiedSlug: "acme/clinic-patient-db",
|
|
112
|
-
org: "acme",
|
|
113
|
-
description: "clinic patient database credentials",
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
// Spec/status populated to exercise every AGENT_CHANNEL_TABLE column:
|
|
117
|
-
// agent_ref, the provider oneof, install_state, and enabled.
|
|
118
|
-
const knownChannel = create(AgentChannelSchema, {
|
|
119
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
120
|
-
kind: "AgentChannel",
|
|
121
|
-
metadata: { name: "clinic-patient-whatsapp", slug: "clinic-patient-whatsapp", org: "acme", id: "ach_1" },
|
|
122
|
-
spec: {
|
|
123
|
-
enabled: true,
|
|
124
|
-
agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "clinic-assistant" },
|
|
125
|
-
providerConfig: { case: "whatsapp", value: { phoneNumberId: "106540352242922" } },
|
|
126
|
-
},
|
|
127
|
-
status: { installState: AgentChannelInstallState.installed },
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
// Secret fields carry the redaction marker, matching what the server's
|
|
131
|
-
// RedactChannelApp pipeline returns on every list/get response.
|
|
132
|
-
const knownChannelApp = create(ChannelAppSchema, {
|
|
133
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
134
|
-
kind: "ChannelApp",
|
|
135
|
-
metadata: { name: "clinic-meta-app", slug: "clinic-meta-app", org: "acme", id: "chapp_1" },
|
|
136
|
-
spec: {
|
|
137
|
-
providerConfig: {
|
|
138
|
-
case: "whatsapp",
|
|
139
|
-
value: {
|
|
140
|
-
appId: "108954",
|
|
141
|
-
appSecret: "***REDACTED***",
|
|
142
|
-
accessToken: "***REDACTED***",
|
|
143
|
-
verifyToken: "***REDACTED***",
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
status: { audit: { specAudit: { createdAt: timestampFromDate(new Date("2026-07-20T10:00:00Z")) } } },
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
// Second entry (slack arm) so the list tests cover both provider derivations
|
|
151
|
-
// and the client-side --limit slice (listByOrg has no pagination).
|
|
152
|
-
const secondChannelApp = create(ChannelAppSchema, {
|
|
153
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
154
|
-
kind: "ChannelApp",
|
|
155
|
-
metadata: { name: "clinic-slack-app", slug: "clinic-slack-app", org: "acme", id: "chapp_2" },
|
|
156
|
-
spec: {
|
|
157
|
-
providerConfig: {
|
|
158
|
-
case: "slack",
|
|
159
|
-
value: { clientId: "12.34", clientSecret: "***REDACTED***", signingSecret: "***REDACTED***" },
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
// Spec/status populated to exercise every SCHEDULE_TABLE column — and the
|
|
165
|
-
// exact condition the table exists to surface (stigmer/stigmer#352): the
|
|
166
|
-
// owner's switch is ON (spec.enabled) while the platform's failure latch is
|
|
167
|
-
// SET (status.paused_reason), two different states with two different
|
|
168
|
-
// remedies.
|
|
169
|
-
const pausedSchedule = create(ScheduleSchema, {
|
|
170
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
171
|
-
kind: "Schedule",
|
|
172
|
-
metadata: { name: "daily-fee-reminders", slug: "daily-fee-reminders", org: "acme", id: "sch_1" },
|
|
173
|
-
spec: {
|
|
174
|
-
cron: "0 9 * * *",
|
|
175
|
-
timeZone: "Asia/Kolkata",
|
|
176
|
-
enabled: true,
|
|
177
|
-
target: {
|
|
178
|
-
case: "agent",
|
|
179
|
-
value: { agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "clinic-assistant" } },
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
status: { pausedReason: "5 consecutive failed runs", consecutiveFailures: 5 },
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
// Owner-disabled and never fired: empty status, so the row must derive
|
|
186
|
-
// "active" from an absent paused_reason and print no bogus timestamps.
|
|
187
|
-
const disabledSchedule = create(ScheduleSchema, {
|
|
188
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
189
|
-
kind: "Schedule",
|
|
190
|
-
metadata: { name: "weekly-digest", slug: "weekly-digest", org: "acme", id: "sch_2" },
|
|
191
|
-
spec: {
|
|
192
|
-
cron: "30 6 * * 1",
|
|
193
|
-
timeZone: "UTC",
|
|
194
|
-
enabled: false,
|
|
195
|
-
target: {
|
|
196
|
-
case: "agent",
|
|
197
|
-
value: { agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "reviewer" } },
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
let backend: Http2Server;
|
|
203
|
-
let client: Stigmer;
|
|
204
|
-
const openSessions = new Set<ServerHttp2Session>();
|
|
205
|
-
|
|
206
|
-
beforeAll(async () => {
|
|
207
|
-
const routes = (router: ConnectRouter) => {
|
|
208
|
-
router.service(AgentQueryController, {
|
|
209
|
-
get: (req) => {
|
|
210
|
-
if (req.value !== "agt_1") throw new ConnectError("agent not found", Code.NotFound);
|
|
211
|
-
return knownAgent;
|
|
212
|
-
},
|
|
213
|
-
getByReference: (req) => {
|
|
214
|
-
if (req.slug !== "reviewer") throw new ConnectError("agent not found", Code.NotFound);
|
|
215
|
-
return knownAgent;
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
router.service(AgentInstanceQueryController, {
|
|
219
|
-
get: (req) => {
|
|
220
|
-
if (req.value !== "ain_1") throw new ConnectError("agent instance not found", Code.NotFound);
|
|
221
|
-
return knownInstance;
|
|
222
|
-
},
|
|
223
|
-
getByReference: (req) => {
|
|
224
|
-
if (req.slug !== "reviewer-default") throw new ConnectError("agent instance not found", Code.NotFound);
|
|
225
|
-
return knownInstance;
|
|
226
|
-
},
|
|
227
|
-
list: (req) => {
|
|
228
|
-
if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
|
|
229
|
-
return { totalCount: 1, items: [knownInstance] };
|
|
230
|
-
},
|
|
231
|
-
});
|
|
232
|
-
router.service(SearchService, {
|
|
233
|
-
// Kind-aware: search-backed list sends a single-kind query, so the
|
|
234
|
-
// environment arm proves the kind actually rode the request.
|
|
235
|
-
search: (req) => {
|
|
236
|
-
if (req.kinds.length === 1 && req.kinds[0] === ApiResourceKind.environment) {
|
|
237
|
-
return { entries: [knownEnvironmentSearchResult], totalCount: 1, totalPages: 1 };
|
|
238
|
-
}
|
|
239
|
-
return { entries: [knownSearchResult], totalCount: 1, totalPages: 1 };
|
|
240
|
-
},
|
|
241
|
-
});
|
|
242
|
-
router.service(OrganizationQueryController, {
|
|
243
|
-
findMyOrganizations: () => ({ entries: [knownOrg, secondOrg] }),
|
|
244
|
-
});
|
|
245
|
-
router.service(ApiKeyQueryController, {
|
|
246
|
-
findAll: () => ({ entries: [knownApiKey, secondApiKey] }),
|
|
247
|
-
});
|
|
248
|
-
router.service(EnvironmentQueryController, {
|
|
249
|
-
get: (req) => {
|
|
250
|
-
if (req.value !== "env_1") throw new ConnectError("environment not found", Code.NotFound);
|
|
251
|
-
return knownEnvironment;
|
|
252
|
-
},
|
|
253
|
-
getByReference: (req) => {
|
|
254
|
-
if (req.slug !== "clinic-patient-db") throw new ConnectError("environment not found", Code.NotFound);
|
|
255
|
-
return knownEnvironment;
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
router.service(AgentChannelQueryController, {
|
|
259
|
-
get: (req) => {
|
|
260
|
-
if (req.value !== "ach_1") throw new ConnectError("agent channel not found", Code.NotFound);
|
|
261
|
-
return knownChannel;
|
|
262
|
-
},
|
|
263
|
-
getByReference: (req) => {
|
|
264
|
-
if (req.slug !== "clinic-patient-whatsapp") throw new ConnectError("agent channel not found", Code.NotFound);
|
|
265
|
-
return knownChannel;
|
|
266
|
-
},
|
|
267
|
-
list: (req) => {
|
|
268
|
-
if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
|
|
269
|
-
return { totalCount: 1, items: [knownChannel] };
|
|
270
|
-
},
|
|
271
|
-
});
|
|
272
|
-
router.service(ChannelAppQueryController, {
|
|
273
|
-
get: (req) => {
|
|
274
|
-
if (req.value !== "chapp_1") throw new ConnectError("channel app not found", Code.NotFound);
|
|
275
|
-
return knownChannelApp;
|
|
276
|
-
},
|
|
277
|
-
getByReference: (req) => {
|
|
278
|
-
if (req.slug !== "clinic-meta-app") throw new ConnectError("channel app not found", Code.NotFound);
|
|
279
|
-
return knownChannelApp;
|
|
280
|
-
},
|
|
281
|
-
listByOrg: (req) => {
|
|
282
|
-
if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
|
|
283
|
-
return { entries: [knownChannelApp, secondChannelApp] };
|
|
284
|
-
},
|
|
285
|
-
});
|
|
286
|
-
router.service(ScheduleQueryController, {
|
|
287
|
-
get: (req) => {
|
|
288
|
-
if (req.value !== "sch_1") throw new ConnectError("schedule not found", Code.NotFound);
|
|
289
|
-
return pausedSchedule;
|
|
290
|
-
},
|
|
291
|
-
getByReference: (req) => {
|
|
292
|
-
if (req.slug !== "daily-fee-reminders") throw new ConnectError("schedule not found", Code.NotFound);
|
|
293
|
-
return pausedSchedule;
|
|
294
|
-
},
|
|
295
|
-
list: (req) => {
|
|
296
|
-
if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
|
|
297
|
-
return { totalCount: 2, items: [pausedSchedule, disabledSchedule] };
|
|
298
|
-
},
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
backend = createHttp2Server(connectNodeAdapter({ routes }));
|
|
302
|
-
backend.on("session", (session) => {
|
|
303
|
-
openSessions.add(session);
|
|
304
|
-
session.on("close", () => openSessions.delete(session));
|
|
305
|
-
});
|
|
306
|
-
await new Promise<void>((resolve) => backend.listen(0, "127.0.0.1", resolve));
|
|
307
|
-
const port = (backend.address() as AddressInfo).port;
|
|
308
|
-
client = createNodeClient({ baseUrl: normalizeEndpoint(`127.0.0.1:${port}`) });
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
afterAll(async () => {
|
|
312
|
-
for (const session of openSessions) session.destroy();
|
|
313
|
-
await new Promise<void>((resolve) => backend.close(() => resolve()));
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
describe("get integration", () => {
|
|
317
|
-
it("fetches an agent by org/slug and renders backend protojson", async () => {
|
|
318
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.agent, {
|
|
319
|
-
kind: "ref",
|
|
320
|
-
org: "acme",
|
|
321
|
-
slug: "reviewer",
|
|
322
|
-
});
|
|
323
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
324
|
-
expect(rendered).toEqual(toJson(AgentSchema, knownAgent, { useProtoFieldName: true }));
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
it("fetches an agent by ID", async () => {
|
|
328
|
-
const { message } = await fetchResource(client, ApiResourceKind.agent, { kind: "id", id: "agt_1" });
|
|
329
|
-
expect(JSON.parse(renderResource(AgentSchema, message, "json"))).toMatchObject({
|
|
330
|
-
metadata: { id: "agt_1" },
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
it("fetches an agent instance by org/slug and renders backend protojson", async () => {
|
|
335
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.agent_instance, {
|
|
336
|
-
kind: "ref",
|
|
337
|
-
org: "acme",
|
|
338
|
-
slug: "reviewer-default",
|
|
339
|
-
});
|
|
340
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
341
|
-
expect(rendered).toEqual(toJson(AgentInstanceSchema, knownInstance, { useProtoFieldName: true }));
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
it("fetches an agent instance by ID", async () => {
|
|
345
|
-
const { message } = await fetchResource(client, ApiResourceKind.agent_instance, { kind: "id", id: "ain_1" });
|
|
346
|
-
expect(JSON.parse(renderResource(AgentInstanceSchema, message, "json"))).toMatchObject({
|
|
347
|
-
metadata: { id: "ain_1" },
|
|
348
|
-
spec: { agent_id: "agt_1" },
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
it("resolves an organization by slug through findMyOrganizations", async () => {
|
|
353
|
-
const { message } = await fetchResource(client, ApiResourceKind.organization, {
|
|
354
|
-
kind: "ref",
|
|
355
|
-
org: "acme",
|
|
356
|
-
slug: "acme",
|
|
357
|
-
});
|
|
358
|
-
expect(JSON.parse(renderResource(OrganizationSchema, message, "json"))).toMatchObject({
|
|
359
|
-
metadata: { slug: "acme" },
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
it("fetches an environment by org/slug and renders backend protojson", async () => {
|
|
364
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.environment, {
|
|
365
|
-
kind: "ref",
|
|
366
|
-
org: "acme",
|
|
367
|
-
slug: "clinic-patient-db",
|
|
368
|
-
});
|
|
369
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
370
|
-
expect(rendered).toEqual(toJson(EnvironmentSchema, knownEnvironment, { useProtoFieldName: true }));
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
it("fetches an environment by ID", async () => {
|
|
374
|
-
const { message } = await fetchResource(client, ApiResourceKind.environment, { kind: "id", id: "env_1" });
|
|
375
|
-
expect(JSON.parse(renderResource(EnvironmentSchema, message, "json"))).toMatchObject({
|
|
376
|
-
metadata: { id: "env_1" },
|
|
377
|
-
});
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
it("fetches an agent channel by org/slug and renders backend protojson", async () => {
|
|
381
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.agent_channel, {
|
|
382
|
-
kind: "ref",
|
|
383
|
-
org: "acme",
|
|
384
|
-
slug: "clinic-patient-whatsapp",
|
|
385
|
-
});
|
|
386
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
387
|
-
expect(rendered).toEqual(toJson(AgentChannelSchema, knownChannel, { useProtoFieldName: true }));
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
it("fetches an agent channel by ID", async () => {
|
|
391
|
-
const { message } = await fetchResource(client, ApiResourceKind.agent_channel, { kind: "id", id: "ach_1" });
|
|
392
|
-
expect(JSON.parse(renderResource(AgentChannelSchema, message, "json"))).toMatchObject({
|
|
393
|
-
metadata: { id: "ach_1" },
|
|
394
|
-
spec: { enabled: true },
|
|
395
|
-
});
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
it("fetches a channel app by org/slug and renders backend protojson", async () => {
|
|
399
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.channel_app, {
|
|
400
|
-
kind: "ref",
|
|
401
|
-
org: "acme",
|
|
402
|
-
slug: "clinic-meta-app",
|
|
403
|
-
});
|
|
404
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
405
|
-
expect(rendered).toEqual(toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true }));
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
it("fetches a channel app by ID", async () => {
|
|
409
|
-
const { message } = await fetchResource(client, ApiResourceKind.channel_app, { kind: "id", id: "chapp_1" });
|
|
410
|
-
expect(JSON.parse(renderResource(ChannelAppSchema, message, "json"))).toMatchObject({
|
|
411
|
-
metadata: { id: "chapp_1" },
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
it("fetches a schedule by org/slug and renders backend protojson", async () => {
|
|
416
|
-
const { schema, message } = await fetchResource(client, ApiResourceKind.schedule, {
|
|
417
|
-
kind: "ref",
|
|
418
|
-
org: "acme",
|
|
419
|
-
slug: "daily-fee-reminders",
|
|
420
|
-
});
|
|
421
|
-
const rendered = JSON.parse(renderResource(schema, message, "json"));
|
|
422
|
-
expect(rendered).toEqual(toJson(ScheduleSchema, pausedSchedule, { useProtoFieldName: true }));
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
it("fetches a schedule by ID, exposing the pause diagnosis get exists for", async () => {
|
|
426
|
-
const { message } = await fetchResource(client, ApiResourceKind.schedule, { kind: "id", id: "sch_1" });
|
|
427
|
-
// The full resource is where an operator reads WHY the platform paused
|
|
428
|
-
// a schedule (paused_reason + the streak) — the list table only flags it.
|
|
429
|
-
expect(JSON.parse(renderResource(ScheduleSchema, message, "json"))).toMatchObject({
|
|
430
|
-
metadata: { id: "sch_1" },
|
|
431
|
-
spec: { enabled: true },
|
|
432
|
-
status: { paused_reason: "5 consecutive failed runs", consecutive_failures: 5 },
|
|
433
|
-
});
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
it("maps a NotFound backend error to ExitCode.NotFound", async () => {
|
|
437
|
-
const err = await fetchResource(client, ApiResourceKind.agent, { kind: "id", id: "missing" }).catch((e) => e);
|
|
438
|
-
const classified = classify(err);
|
|
439
|
-
expect(classified?.exitCode).toBe(ExitCode.NotFound);
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
it("rejects an unsupported kind with a usage error", async () => {
|
|
443
|
-
// session's read verbs are narrowed out of the verb matrix
|
|
444
|
-
// (stigmer/stigmer#354): the command layer refuses at the gate, and this
|
|
445
|
-
// resource-layer fallback answers anyone bypassing the gate. Wiring
|
|
446
|
-
// session get requires BOTH the binding and the matrix line — the
|
|
447
|
-
// registry conformance test enforces the pairing.
|
|
448
|
-
const err = await fetchResource(client, ApiResourceKind.session, { kind: "id", id: "x" }).catch((e) => e);
|
|
449
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
|
|
453
|
-
describe("list integration", () => {
|
|
454
|
-
it("lists agents via the search service as JSON", async () => {
|
|
455
|
-
const out = await listResources(client, ApiResourceKind.agent, "acme", 50, "json");
|
|
456
|
-
expect(JSON.parse(out)).toEqual([toJson(SearchResultSchema, knownSearchResult, { useProtoFieldName: true })]);
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
it("lists organizations via findMyOrganizations as JSON", async () => {
|
|
460
|
-
const out = await listResources(client, ApiResourceKind.organization, "acme", 50, "json");
|
|
461
|
-
expect(JSON.parse(out)).toEqual([
|
|
462
|
-
toJson(OrganizationSchema, knownOrg, { useProtoFieldName: true }),
|
|
463
|
-
toJson(OrganizationSchema, secondOrg, { useProtoFieldName: true }),
|
|
464
|
-
]);
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
it("applies --limit to organizations (findMyOrganizations has no pagination)", async () => {
|
|
468
|
-
const out = await listResources(client, ApiResourceKind.organization, "acme", 1, "json");
|
|
469
|
-
expect(JSON.parse(out)).toEqual([toJson(OrganizationSchema, knownOrg, { useProtoFieldName: true })]);
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
it("lists API keys via findAll as JSON", async () => {
|
|
473
|
-
const out = await listResources(client, ApiResourceKind.api_key, "acme", 50, "json");
|
|
474
|
-
expect(JSON.parse(out)).toEqual([
|
|
475
|
-
toJson(ApiKeySchema, knownApiKey, { useProtoFieldName: true }),
|
|
476
|
-
toJson(ApiKeySchema, secondApiKey, { useProtoFieldName: true }),
|
|
477
|
-
]);
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
it("applies --limit to API keys (findAll has no pagination)", async () => {
|
|
481
|
-
const out = await listResources(client, ApiResourceKind.api_key, "acme", 1, "json");
|
|
482
|
-
expect(JSON.parse(out)).toEqual([toJson(ApiKeySchema, knownApiKey, { useProtoFieldName: true })]);
|
|
483
|
-
});
|
|
484
|
-
|
|
485
|
-
it("renders a human table for search-backed lists", async () => {
|
|
486
|
-
const out = await listResources(client, ApiResourceKind.agent, "acme", 50, "table");
|
|
487
|
-
expect(out).toContain("NAME");
|
|
488
|
-
expect(out).toContain("acme/reviewer");
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
it("lists agent instances via the dedicated list RPC as JSON", async () => {
|
|
492
|
-
const out = await listResources(client, ApiResourceKind.agent_instance, "acme", 50, "json");
|
|
493
|
-
expect(JSON.parse(out)).toEqual([toJson(AgentInstanceSchema, knownInstance, { useProtoFieldName: true })]);
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
it("renders a human table for agent instances with their parent agent", async () => {
|
|
497
|
-
const out = await listResources(client, ApiResourceKind.agent_instance, "acme", 50, "table");
|
|
498
|
-
expect(out).toContain("AGENT");
|
|
499
|
-
expect(out).toContain("reviewer-default");
|
|
500
|
-
expect(out).toContain("agt_1");
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
it("lists environments via the search service as JSON", async () => {
|
|
504
|
-
const out = await listResources(client, ApiResourceKind.environment, "acme", 50, "json");
|
|
505
|
-
expect(JSON.parse(out)).toEqual([
|
|
506
|
-
toJson(SearchResultSchema, knownEnvironmentSearchResult, { useProtoFieldName: true }),
|
|
507
|
-
]);
|
|
508
|
-
});
|
|
509
|
-
|
|
510
|
-
it("renders a human table for environment lists", async () => {
|
|
511
|
-
const out = await listResources(client, ApiResourceKind.environment, "acme", 50, "table");
|
|
512
|
-
expect(out).toContain("NAME");
|
|
513
|
-
expect(out).toContain("acme/clinic-patient-db");
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
it("lists agent channels via the dedicated list RPC as JSON", async () => {
|
|
517
|
-
const out = await listResources(client, ApiResourceKind.agent_channel, "acme", 50, "json");
|
|
518
|
-
expect(JSON.parse(out)).toEqual([toJson(AgentChannelSchema, knownChannel, { useProtoFieldName: true })]);
|
|
519
|
-
});
|
|
520
|
-
|
|
521
|
-
it("renders a human table for agent channels with the serving signals", async () => {
|
|
522
|
-
const out = await listResources(client, ApiResourceKind.agent_channel, "acme", 50, "table");
|
|
523
|
-
expect(out).toContain("PROVIDER");
|
|
524
|
-
expect(out).toContain("STATE");
|
|
525
|
-
expect(out).toContain("ENABLED");
|
|
526
|
-
expect(out).toContain("acme/clinic-assistant"); // agent_ref as org/slug
|
|
527
|
-
expect(out).toContain("whatsapp"); // derived from the provider oneof
|
|
528
|
-
expect(out).toContain("installed"); // status.install_state
|
|
529
|
-
expect(out).toContain("true"); // spec.enabled
|
|
530
|
-
});
|
|
531
|
-
|
|
532
|
-
it("lists channel apps via listByOrg as JSON", async () => {
|
|
533
|
-
const out = await listResources(client, ApiResourceKind.channel_app, "acme", 50, "json");
|
|
534
|
-
expect(JSON.parse(out)).toEqual([
|
|
535
|
-
toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true }),
|
|
536
|
-
toJson(ChannelAppSchema, secondChannelApp, { useProtoFieldName: true }),
|
|
537
|
-
]);
|
|
538
|
-
});
|
|
539
|
-
|
|
540
|
-
it("renders a human table for channel apps with provider and created date", async () => {
|
|
541
|
-
const out = await listResources(client, ApiResourceKind.channel_app, "acme", 50, "table");
|
|
542
|
-
expect(out).toContain("PROVIDER");
|
|
543
|
-
expect(out).toContain("whatsapp");
|
|
544
|
-
expect(out).toContain("slack");
|
|
545
|
-
expect(out).toContain("2026-07-20"); // status.audit.spec_audit.created_at
|
|
546
|
-
// Secrets never reach the table (redaction markers stay in json/yaml only).
|
|
547
|
-
expect(out).not.toContain("***REDACTED***");
|
|
548
|
-
});
|
|
549
|
-
|
|
550
|
-
it("applies --limit client-side for channel apps (listByOrg has no pagination)", async () => {
|
|
551
|
-
const out = await listResources(client, ApiResourceKind.channel_app, "acme", 1, "json");
|
|
552
|
-
expect(JSON.parse(out)).toEqual([toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true })]);
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
it("lists schedules as a table keeping the owner switch and the platform latch distinct", async () => {
|
|
556
|
-
const out = await listResources(client, ApiResourceKind.schedule, "acme", 50, "table");
|
|
557
|
-
for (const header of ["ID", "SLUG", "TARGET", "CRON", "TZ", "ENABLED", "STATE"]) {
|
|
558
|
-
expect(out).toContain(header);
|
|
559
|
-
}
|
|
560
|
-
const rows = out.split("\n");
|
|
561
|
-
// The stigmer/stigmer#352 condition: enabled by the owner, paused by the
|
|
562
|
-
// platform. Collapsing these into one column would hide exactly this.
|
|
563
|
-
const pausedRow = rows.find((line) => line.includes("sch_1"));
|
|
564
|
-
expect(pausedRow).toContain("acme/clinic-assistant");
|
|
565
|
-
expect(pausedRow).toContain("0 9 * * *");
|
|
566
|
-
expect(pausedRow).toContain("Asia/Kolkata");
|
|
567
|
-
expect(pausedRow).toContain("true");
|
|
568
|
-
expect(pausedRow).toContain("paused");
|
|
569
|
-
// Owner-disabled with an empty status: derived state is "active" (no
|
|
570
|
-
// platform latch), and the absent timestamps render nothing bogus.
|
|
571
|
-
const disabledRow = rows.find((line) => line.includes("sch_2"));
|
|
572
|
-
expect(disabledRow).toContain("false");
|
|
573
|
-
expect(disabledRow).toContain("active");
|
|
574
|
-
expect(disabledRow).not.toContain("paused");
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
it("lists schedules as JSON matching backend protojson", async () => {
|
|
578
|
-
const out = await listResources(client, ApiResourceKind.schedule, "acme", 50, "json");
|
|
579
|
-
expect(JSON.parse(out)).toEqual([
|
|
580
|
-
toJson(ScheduleSchema, pausedSchedule, { useProtoFieldName: true }),
|
|
581
|
-
toJson(ScheduleSchema, disabledSchedule, { useProtoFieldName: true }),
|
|
582
|
-
]);
|
|
583
|
-
});
|
|
584
|
-
|
|
585
|
-
it("refuses to list schedules without an org context, before any RPC", async () => {
|
|
586
|
-
// ListSchedulesRequest requires org (min_len 1); an unset cloud context
|
|
587
|
-
// resolves to "". The branch refuses with actionable copy instead of
|
|
588
|
-
// relaying the server's raw validation error.
|
|
589
|
-
const err = await listResources(client, ApiResourceKind.schedule, "", 50, "table").catch((e) => e);
|
|
590
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
591
|
-
expect(String(err.message)).toContain("--org");
|
|
592
|
-
});
|
|
593
|
-
|
|
594
|
-
it("rejects a kind whose list is unwired with a usage error", async () => {
|
|
595
|
-
// agent_share's read verbs are narrowed out of the verb matrix
|
|
596
|
-
// (stigmer/stigmer#354): the command layer refuses at the gate, and this
|
|
597
|
-
// resource-layer fallback answers anyone bypassing the gate. Wiring
|
|
598
|
-
// agent_share list requires BOTH the LIST_HANDLERS entry and the matrix
|
|
599
|
-
// line — the registry conformance test enforces the pairing.
|
|
600
|
-
const err = await listResources(client, ApiResourceKind.agent_share, "acme", 50, "json").catch((e) => e);
|
|
601
|
-
expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
|
|
602
|
-
});
|
|
603
|
-
});
|