@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,379 +0,0 @@
|
|
|
1
|
-
// Pins the plugin directory walker: detection by any of the four manifests,
|
|
2
|
-
// sorted sized entries, the ignore matcher applied (defaults, .gitignore,
|
|
3
|
-
// .stigmerignore), symlinks never followed, and the JSON projection that
|
|
4
|
-
// reduces overlay documents to their paths; then the prepared push (the
|
|
5
|
-
// deterministic archive and its SHA-256, the server's own digest), the
|
|
6
|
-
// install summary renderer (only the kinds installed are counted; the Next
|
|
7
|
-
// section says what each server still needs), and `readNextSteps` against an
|
|
8
|
-
// in-memory backend: a sign-in for an OAuth server without a grant, "signed
|
|
9
|
-
// in" with one, the variables an API-key server wants and where they are
|
|
10
|
-
// asked, the agent an MCP-only plugin still needs, and no line for a server
|
|
11
|
-
// the CLI cannot read.
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
mkdirSync,
|
|
15
|
-
mkdtempSync,
|
|
16
|
-
rmSync,
|
|
17
|
-
symlinkSync,
|
|
18
|
-
writeFileSync,
|
|
19
|
-
} from "node:fs";
|
|
20
|
-
import { tmpdir } from "node:os";
|
|
21
|
-
import { join } from "node:path";
|
|
22
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
23
|
-
import { readPluginPackage } from "@stigmer/plugin-package";
|
|
24
|
-
import {
|
|
25
|
-
describePlugin,
|
|
26
|
-
isPluginDirectory,
|
|
27
|
-
readPluginDirectory,
|
|
28
|
-
} from "./plugin.js";
|
|
29
|
-
|
|
30
|
-
let root: string;
|
|
31
|
-
|
|
32
|
-
function write(rel: string, content: string): void {
|
|
33
|
-
const full = join(root, rel);
|
|
34
|
-
mkdirSync(join(full, ".."), { recursive: true });
|
|
35
|
-
writeFileSync(full, content);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
beforeAll(() => {
|
|
39
|
-
root = mkdtempSync(join(tmpdir(), "stigmer-plugin-walk-"));
|
|
40
|
-
write(
|
|
41
|
-
".cursor-plugin/plugin.json",
|
|
42
|
-
JSON.stringify({
|
|
43
|
-
name: "walker",
|
|
44
|
-
skills: "./skills/",
|
|
45
|
-
mcpServers: "./mcp.json",
|
|
46
|
-
variables: {
|
|
47
|
-
type: "object",
|
|
48
|
-
properties: { TOKEN: { type: "string" } },
|
|
49
|
-
required: ["TOKEN"],
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
53
|
-
write(
|
|
54
|
-
"mcp.json",
|
|
55
|
-
JSON.stringify({
|
|
56
|
-
mcpServers: {
|
|
57
|
-
api: {
|
|
58
|
-
type: "http",
|
|
59
|
-
url: "https://api.example.com/mcp",
|
|
60
|
-
headers: { Authorization: "Bearer ${TOKEN}" },
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
);
|
|
65
|
-
write(
|
|
66
|
-
"skills/greet/SKILL.md",
|
|
67
|
-
"---\nname: greet\ndescription: Says hello.\n---\nSay hello.\n",
|
|
68
|
-
);
|
|
69
|
-
write("skills/greet/scripts/hello.sh", "echo hello");
|
|
70
|
-
write("skills/greet/secrets.yaml", "never: included");
|
|
71
|
-
write("skills/greet/.env", "SECRET=1");
|
|
72
|
-
write("node_modules/dep/index.js", "module.exports = 1");
|
|
73
|
-
write("ai.stigmer/agent.yaml", "kind: Agent\n");
|
|
74
|
-
write(".gitignore", "*.log\n");
|
|
75
|
-
write("debug.log", "ignored by .gitignore");
|
|
76
|
-
write(".stigmerignore", "drafts/\n");
|
|
77
|
-
write("drafts/idea.md", "ignored by .stigmerignore");
|
|
78
|
-
symlinkSync(join(root, "mcp.json"), join(root, "mcp-link.json"));
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
afterAll(() => {
|
|
82
|
-
rmSync(root, { recursive: true, force: true });
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
describe("isPluginDirectory", () => {
|
|
86
|
-
it("is true for a directory holding any of the four manifests and false otherwise", () => {
|
|
87
|
-
expect(isPluginDirectory(root)).toBe(true);
|
|
88
|
-
expect(isPluginDirectory(join(root, "skills"))).toBe(false);
|
|
89
|
-
expect(isPluginDirectory(join(root, "mcp.json"))).toBe(false);
|
|
90
|
-
expect(isPluginDirectory(join(root, "does-not-exist"))).toBe(false);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
describe("readPluginDirectory", () => {
|
|
95
|
-
it("lists sorted, sized, contained entries and applies every ignore source", () => {
|
|
96
|
-
const { files, stats } = readPluginDirectory(root);
|
|
97
|
-
expect(files.entries.map((e) => e.path)).toEqual([
|
|
98
|
-
".cursor-plugin/plugin.json",
|
|
99
|
-
".gitignore",
|
|
100
|
-
".stigmerignore",
|
|
101
|
-
"ai.stigmer/agent.yaml",
|
|
102
|
-
"mcp.json",
|
|
103
|
-
"skills/greet/SKILL.md",
|
|
104
|
-
"skills/greet/scripts/hello.sh",
|
|
105
|
-
]);
|
|
106
|
-
expect(
|
|
107
|
-
files.entries.find((e) => e.path === "skills/greet/scripts/hello.sh")
|
|
108
|
-
?.size,
|
|
109
|
-
).toBe("echo hello".length);
|
|
110
|
-
// .env and secrets.yaml (security defaults), debug.log (.gitignore); the
|
|
111
|
-
// symlink is neither a file nor a directory and is skipped uncounted.
|
|
112
|
-
expect(stats).toMatchObject({
|
|
113
|
-
filesIncluded: 7,
|
|
114
|
-
filesIgnored: 3,
|
|
115
|
-
dirsSkipped: 2,
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
it("reads exactly the listed bytes", () => {
|
|
120
|
-
const { files } = readPluginDirectory(root);
|
|
121
|
-
expect(new TextDecoder().decode(files.read("ai.stigmer/agent.yaml"))).toBe(
|
|
122
|
-
"kind: Agent\n",
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
it("feeds the reader a plugin it accepts", () => {
|
|
127
|
-
const { files, stats } = readPluginDirectory(root);
|
|
128
|
-
const outcome = readPluginPackage(files);
|
|
129
|
-
expect(outcome.ok).toBe(true);
|
|
130
|
-
if (!outcome.ok) return;
|
|
131
|
-
const description = describePlugin(outcome.plugin, outcome.warnings, stats);
|
|
132
|
-
expect(description.plugin.overlay).toEqual({
|
|
133
|
-
agent: "ai.stigmer/agent.yaml",
|
|
134
|
-
workflows: [],
|
|
135
|
-
mcpServers: [],
|
|
136
|
-
});
|
|
137
|
-
expect(description.excludedFiles).toBe(3);
|
|
138
|
-
expect(JSON.stringify(description)).not.toContain("bytes");
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
describe("the archive of a walked directory", () => {
|
|
143
|
-
it("is deterministic and round-trips through the library's own reader", async () => {
|
|
144
|
-
const { archivePlugin } = await import("@stigmer/plugin-package/client");
|
|
145
|
-
const { unzipSync } = await import("fflate");
|
|
146
|
-
const directory = readPluginDirectory(root);
|
|
147
|
-
const first = archivePlugin(directory.files);
|
|
148
|
-
const second = archivePlugin(directory.files);
|
|
149
|
-
expect(Buffer.from(first).equals(Buffer.from(second))).toBe(true);
|
|
150
|
-
const entries = Object.keys(unzipSync(first)).sort();
|
|
151
|
-
expect(entries).toEqual(directory.files.entries.map((e) => e.path));
|
|
152
|
-
expect(entries).not.toContain("debug.log");
|
|
153
|
-
expect(entries).not.toContain("mcp-link.json");
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
describe("preparePluginPush", () => {
|
|
158
|
-
it("carries the walked archive and its SHA-256, the identity the server records", async () => {
|
|
159
|
-
const { createHash } = await import("node:crypto");
|
|
160
|
-
const { preparePluginPush } = await import("./plugin.js");
|
|
161
|
-
const { archivePlugin } = await import("@stigmer/plugin-package/client");
|
|
162
|
-
const prepared = await preparePluginPush(root);
|
|
163
|
-
expect(prepared.plugin.name).toBe("walker");
|
|
164
|
-
expect(prepared.dir).toBe(root);
|
|
165
|
-
expect(prepared.stats.filesIgnored).toBe(3);
|
|
166
|
-
const bytes = archivePlugin(readPluginDirectory(root).files);
|
|
167
|
-
expect(Buffer.from(prepared.archive).equals(Buffer.from(bytes))).toBe(true);
|
|
168
|
-
expect(prepared.digest).toBe(createHash("sha256").update(bytes).digest("hex"));
|
|
169
|
-
expect(prepared.digest).toMatch(/^[a-f0-9]{64}$/);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it("refuses offline with the same sentences validate prints", async () => {
|
|
173
|
-
const { preparePluginPush } = await import("./plugin.js");
|
|
174
|
-
const broken = mkdtempSync(join(tmpdir(), "stigmer-plugin-broken-"));
|
|
175
|
-
try {
|
|
176
|
-
writeFileSync(join(broken, "plugin.json"), JSON.stringify({ name: "Not Valid!" }));
|
|
177
|
-
await expect(preparePluginPush(broken)).rejects.toThrow(/plugin cannot be installed/);
|
|
178
|
-
} finally {
|
|
179
|
-
rmSync(broken, { recursive: true, force: true });
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
describe("renderPushOutcome", () => {
|
|
185
|
-
it("summarises the install by kind, lists members and carries warnings", async () => {
|
|
186
|
-
const { renderPushOutcome } = await import("./plugin.js");
|
|
187
|
-
const { create } = await import("@bufbuild/protobuf");
|
|
188
|
-
const { PluginSchema } =
|
|
189
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/api_pb");
|
|
190
|
-
const { PluginMemberSchema } =
|
|
191
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/io_pb");
|
|
192
|
-
const { PluginDialect } =
|
|
193
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/spec_pb");
|
|
194
|
-
const { PluginState } =
|
|
195
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/status_pb");
|
|
196
|
-
const { ApiResourceKind } =
|
|
197
|
-
await import("@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb");
|
|
198
|
-
const { renderResult } = await import("../output/command-result.js");
|
|
199
|
-
|
|
200
|
-
const plugin = create(PluginSchema, {
|
|
201
|
-
metadata: { id: "plg_1", slug: "thermos" },
|
|
202
|
-
spec: {
|
|
203
|
-
name: "thermos",
|
|
204
|
-
version: "1.2.0",
|
|
205
|
-
dialect: PluginDialect.CURSOR,
|
|
206
|
-
},
|
|
207
|
-
status: {
|
|
208
|
-
digest: "a".repeat(64),
|
|
209
|
-
state: PluginState.READY,
|
|
210
|
-
materialized: { skills: 2, mcpServers: 1, agents: 1, workflows: 0 },
|
|
211
|
-
warnings: [
|
|
212
|
-
{
|
|
213
|
-
kind: "model-hint-unresolved",
|
|
214
|
-
message:
|
|
215
|
-
"sub-agent 'reviewer' names model 'sonnet'; it runs on the session's model",
|
|
216
|
-
},
|
|
217
|
-
],
|
|
218
|
-
},
|
|
219
|
-
});
|
|
220
|
-
const members = [
|
|
221
|
-
create(PluginMemberSchema, {
|
|
222
|
-
kind: ApiResourceKind.skill,
|
|
223
|
-
id: "skl_1",
|
|
224
|
-
slug: "review",
|
|
225
|
-
name: "review",
|
|
226
|
-
}),
|
|
227
|
-
create(PluginMemberSchema, {
|
|
228
|
-
kind: ApiResourceKind.skill,
|
|
229
|
-
id: "skl_2",
|
|
230
|
-
slug: "triage",
|
|
231
|
-
name: "triage",
|
|
232
|
-
}),
|
|
233
|
-
create(PluginMemberSchema, {
|
|
234
|
-
kind: ApiResourceKind.mcp_server,
|
|
235
|
-
id: "mcp_1",
|
|
236
|
-
slug: "github",
|
|
237
|
-
name: "github",
|
|
238
|
-
}),
|
|
239
|
-
create(PluginMemberSchema, {
|
|
240
|
-
kind: ApiResourceKind.agent,
|
|
241
|
-
id: "agt_1",
|
|
242
|
-
slug: "thermos",
|
|
243
|
-
name: "thermos",
|
|
244
|
-
}),
|
|
245
|
-
];
|
|
246
|
-
const result = renderPushOutcome({ plugin, members, archiveBytes: 2048 });
|
|
247
|
-
const lines: string[] = [];
|
|
248
|
-
const original = process.stderr.write.bind(process.stderr);
|
|
249
|
-
process.stderr.write = ((chunk: string | Uint8Array) => {
|
|
250
|
-
lines.push(String(chunk));
|
|
251
|
-
return true;
|
|
252
|
-
}) as typeof process.stderr.write;
|
|
253
|
-
try {
|
|
254
|
-
renderResult(result, "human");
|
|
255
|
-
} finally {
|
|
256
|
-
process.stderr.write = original;
|
|
257
|
-
}
|
|
258
|
-
const text = lines.join("");
|
|
259
|
-
expect(text).toContain(
|
|
260
|
-
"Installed plugin 'thermos' (2 skills, 1 MCP server, 1 agent) with 1 warning",
|
|
261
|
-
);
|
|
262
|
-
expect(text).toContain("Skills");
|
|
263
|
-
expect(text).toContain("review, triage");
|
|
264
|
-
expect(text).toContain("Cursor plugin");
|
|
265
|
-
expect(text).toContain("runs on the session's model");
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
describe("readNextSteps", () => {
|
|
270
|
-
it("reads what each server still needs, best-effort, and names the agent an MCP-only plugin lacks", async () => {
|
|
271
|
-
const { readNextSteps, renderPushOutcome } = await import("./plugin.js");
|
|
272
|
-
const { create } = await import("@bufbuild/protobuf");
|
|
273
|
-
const { Code, ConnectError, createRouterTransport } =
|
|
274
|
-
await import("@connectrpc/connect");
|
|
275
|
-
const { Stigmer } = await import("@stigmer/sdk");
|
|
276
|
-
const { McpServerQueryController } =
|
|
277
|
-
await import("@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/query_pb");
|
|
278
|
-
const { McpServerSchema } =
|
|
279
|
-
await import("@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb");
|
|
280
|
-
const { GetOAuthGrantStatusOutputSchema, OAuthConnectionHealth } =
|
|
281
|
-
await import("@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/io_pb");
|
|
282
|
-
const { McpServerAuthSchema, McpServerSpecSchema } =
|
|
283
|
-
await import("@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/spec_pb");
|
|
284
|
-
const { EnvVarDeclarationSchema } =
|
|
285
|
-
await import("@stigmer/protos/ai/stigmer/agentic/environment/v1/spec_pb");
|
|
286
|
-
const { PluginSchema } =
|
|
287
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/api_pb");
|
|
288
|
-
const { PluginMemberSchema } =
|
|
289
|
-
await import("@stigmer/protos/ai/stigmer/agentic/plugin/v1/io_pb");
|
|
290
|
-
const { ApiResourceKind } =
|
|
291
|
-
await import("@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb");
|
|
292
|
-
const { renderResult } = await import("../output/command-result.js");
|
|
293
|
-
|
|
294
|
-
const shapes: Record<string, "oauth" | "oauth-granted" | "api-key" | "open" | "missing"> = {
|
|
295
|
-
linear: "oauth",
|
|
296
|
-
notion: "oauth-granted",
|
|
297
|
-
warmth: "api-key",
|
|
298
|
-
weather: "open",
|
|
299
|
-
ghost: "missing",
|
|
300
|
-
};
|
|
301
|
-
const transport = createRouterTransport(({ service }) => {
|
|
302
|
-
service(McpServerQueryController, {
|
|
303
|
-
getByReference: (ref) => {
|
|
304
|
-
const shape = shapes[ref.slug];
|
|
305
|
-
if (shape === undefined || shape === "missing")
|
|
306
|
-
throw new ConnectError("no server", Code.NotFound);
|
|
307
|
-
const spec = create(McpServerSpecSchema);
|
|
308
|
-
if (shape === "oauth" || shape === "oauth-granted") {
|
|
309
|
-
spec.auth = create(McpServerAuthSchema, { targetEnvVar: "TOKEN", oauthOnly: true });
|
|
310
|
-
spec.env = { TOKEN: create(EnvVarDeclarationSchema, { isSecret: true }) };
|
|
311
|
-
}
|
|
312
|
-
if (shape === "api-key") spec.env = { API_TOKEN: create(EnvVarDeclarationSchema, { isSecret: true }) };
|
|
313
|
-
return create(McpServerSchema, { metadata: { id: `mcp_${ref.slug}`, org: "acme", slug: ref.slug }, spec });
|
|
314
|
-
},
|
|
315
|
-
getOAuthGrantStatus: (input) => {
|
|
316
|
-
const granted = input.resourceId === "mcp_notion";
|
|
317
|
-
return create(GetOAuthGrantStatusOutputSchema, {
|
|
318
|
-
connected: granted,
|
|
319
|
-
connectionHealth: granted
|
|
320
|
-
? OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_HEALTHY
|
|
321
|
-
: OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_NO_GRANT,
|
|
322
|
-
});
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
const client = new Stigmer({ baseUrl: "/", getAccessToken: () => "t", customTransport: transport });
|
|
327
|
-
const member = (slug: string) =>
|
|
328
|
-
create(PluginMemberSchema, { kind: ApiResourceKind.mcp_server, id: `mcp_${slug}`, slug, name: slug });
|
|
329
|
-
|
|
330
|
-
const next = await readNextSteps(client, "acme", Object.keys(shapes).map(member));
|
|
331
|
-
expect(next).toEqual([
|
|
332
|
-
{ kind: "sign-in", server: "linear", command: "stigmer connect mcp-server linear" },
|
|
333
|
-
{ kind: "signed-in", server: "notion" },
|
|
334
|
-
{
|
|
335
|
-
kind: "api-key",
|
|
336
|
-
server: "warmth",
|
|
337
|
-
variables: ["API_TOKEN"],
|
|
338
|
-
askedAt: "connect",
|
|
339
|
-
command: "stigmer connect mcp-server warmth --env API_TOKEN=...",
|
|
340
|
-
},
|
|
341
|
-
{ kind: "add-to-agent", servers: ["linear", "notion", "warmth", "weather", "ghost"] },
|
|
342
|
-
]);
|
|
343
|
-
|
|
344
|
-
// With an agent, the variables are the agent's to ask and no agent is missing.
|
|
345
|
-
const withAgent = await readNextSteps(client, "acme", [
|
|
346
|
-
member("warmth"),
|
|
347
|
-
create(PluginMemberSchema, { kind: ApiResourceKind.agent, id: "agt_1", slug: "thermos", name: "thermos" }),
|
|
348
|
-
]);
|
|
349
|
-
expect(withAgent).toEqual([
|
|
350
|
-
{ kind: "api-key", server: "warmth", variables: ["API_TOKEN"], askedAt: "agent" },
|
|
351
|
-
]);
|
|
352
|
-
|
|
353
|
-
// The renderer names only the kinds installed and prints the Next section.
|
|
354
|
-
const plugin = create(PluginSchema, {
|
|
355
|
-
metadata: { id: "plg_1", slug: "linear" },
|
|
356
|
-
status: { materialized: { skills: 0, mcpServers: 1, agents: 0, workflows: 0 } },
|
|
357
|
-
});
|
|
358
|
-
const result = renderPushOutcome(
|
|
359
|
-
{ plugin, members: [member("linear")], archiveBytes: 10 },
|
|
360
|
-
{ next: next.slice(0, 1) },
|
|
361
|
-
);
|
|
362
|
-
const lines: string[] = [];
|
|
363
|
-
const original = process.stderr.write.bind(process.stderr);
|
|
364
|
-
process.stderr.write = ((chunk: string | Uint8Array) => {
|
|
365
|
-
lines.push(String(chunk));
|
|
366
|
-
return true;
|
|
367
|
-
}) as typeof process.stderr.write;
|
|
368
|
-
try {
|
|
369
|
-
renderResult(result, "human");
|
|
370
|
-
} finally {
|
|
371
|
-
process.stderr.write = original;
|
|
372
|
-
}
|
|
373
|
-
const text = lines.join("");
|
|
374
|
-
expect(text).toContain("Installed plugin 'linear' (1 MCP server)");
|
|
375
|
-
expect(text).not.toContain("0 skills");
|
|
376
|
-
expect(text).toContain("Next");
|
|
377
|
-
expect(text).toContain("Sign in to linear: stigmer connect mcp-server linear");
|
|
378
|
-
});
|
|
379
|
-
});
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
// In-process integration test for `push skill` and `download execution`.
|
|
2
|
-
//
|
|
3
|
-
// Stands up a Connect backend (skill push + execution query/artifact-URL) plus a
|
|
4
|
-
// plain HTTP server standing in for object storage, then drives the resource
|
|
5
|
-
// layer end to end: pushSkill zips a temp dir and uploads it (asserting the
|
|
6
|
-
// server receives a valid ZIP), and downloadExecutionArtifacts streams a
|
|
7
|
-
// presigned URL to disk (asserting partial-failure tolerance).
|
|
8
|
-
|
|
9
|
-
import { createServer as createHttpServer, type Server as HttpServer } from "node:http";
|
|
10
|
-
import { createServer as createHttp2Server, type Http2Server, type ServerHttp2Session } from "node:http2";
|
|
11
|
-
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
12
|
-
import type { AddressInfo } from "node:net";
|
|
13
|
-
import { tmpdir } from "node:os";
|
|
14
|
-
import { join } from "node:path";
|
|
15
|
-
import { create } from "@bufbuild/protobuf";
|
|
16
|
-
import { Code, ConnectError, type ConnectRouter } from "@connectrpc/connect";
|
|
17
|
-
import { connectNodeAdapter } from "@connectrpc/connect-node";
|
|
18
|
-
import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
19
|
-
import { ExecutionPhase } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
20
|
-
import { GetArtifactDownloadUrlResponseSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/io_pb";
|
|
21
|
-
import { AgentExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/query_pb";
|
|
22
|
-
import { SkillSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/api_pb";
|
|
23
|
-
import { SkillCommandController } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/command_pb";
|
|
24
|
-
import { createNodeClient, normalizeEndpoint } from "@stigmer/sdk/node";
|
|
25
|
-
import type { Stigmer } from "@stigmer/sdk";
|
|
26
|
-
import { unzipSync } from "fflate";
|
|
27
|
-
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
28
|
-
import { downloadExecutionArtifacts } from "./download.js";
|
|
29
|
-
import { pushSkill } from "./skill.js";
|
|
30
|
-
|
|
31
|
-
const SKILL_MD = ["---", "name: my-skill", "---", "# My Skill"].join("\n");
|
|
32
|
-
const ARTIFACT_BODY = "hello artifact contents";
|
|
33
|
-
|
|
34
|
-
let backend: Http2Server;
|
|
35
|
-
let storage: HttpServer;
|
|
36
|
-
let storageUrl: string;
|
|
37
|
-
let client: Stigmer;
|
|
38
|
-
const openSessions = new Set<ServerHttp2Session>();
|
|
39
|
-
|
|
40
|
-
let pushedArtifacts: Uint8Array[] = [];
|
|
41
|
-
let pushedTags: string[] = [];
|
|
42
|
-
|
|
43
|
-
beforeEach(() => {
|
|
44
|
-
pushedArtifacts = [];
|
|
45
|
-
pushedTags = [];
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const execution = create(AgentExecutionSchema, {
|
|
49
|
-
metadata: { id: "aex_done" },
|
|
50
|
-
status: {
|
|
51
|
-
phase: ExecutionPhase.EXECUTION_COMPLETED,
|
|
52
|
-
artifacts: [
|
|
53
|
-
{ name: "report.txt", storageKey: "store/report.txt", sizeBytes: 23n },
|
|
54
|
-
{ name: "broken.txt", storageKey: "store/missing.txt", sizeBytes: 5n },
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
beforeAll(async () => {
|
|
60
|
-
// Object-storage stand-in: serves the good key, 404s anything else.
|
|
61
|
-
storage = createHttpServer((req, res) => {
|
|
62
|
-
if (req.url === "/store/report.txt") {
|
|
63
|
-
res.writeHead(200, { "content-type": "text/plain" });
|
|
64
|
-
res.end(ARTIFACT_BODY);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
res.writeHead(404);
|
|
68
|
-
res.end("not found");
|
|
69
|
-
});
|
|
70
|
-
await new Promise<void>((resolve) => storage.listen(0, "127.0.0.1", resolve));
|
|
71
|
-
storageUrl = `http://127.0.0.1:${(storage.address() as AddressInfo).port}`;
|
|
72
|
-
|
|
73
|
-
const routes = (router: ConnectRouter) => {
|
|
74
|
-
router.service(SkillCommandController, {
|
|
75
|
-
push: (req) => {
|
|
76
|
-
pushedArtifacts.push(req.artifact);
|
|
77
|
-
pushedTags.push(req.tag);
|
|
78
|
-
return create(SkillSchema, {
|
|
79
|
-
metadata: { id: "skl_1", slug: "my-skill", version: { id: "v2", previousVersionId: "v1" } },
|
|
80
|
-
spec: { tag: req.tag },
|
|
81
|
-
status: { versionHash: "abcdef1234567890" },
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
router.service(AgentExecutionQueryController, {
|
|
86
|
-
get: (req) => {
|
|
87
|
-
if (req.value !== "aex_done") throw new ConnectError("not found", Code.NotFound);
|
|
88
|
-
return execution;
|
|
89
|
-
},
|
|
90
|
-
getArtifactDownloadUrl: (req) =>
|
|
91
|
-
create(GetArtifactDownloadUrlResponseSchema, { downloadUrl: `${storageUrl}/${req.storageKey}` }),
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
backend = createHttp2Server(connectNodeAdapter({ routes }));
|
|
96
|
-
backend.on("session", (session) => {
|
|
97
|
-
openSessions.add(session);
|
|
98
|
-
session.on("close", () => openSessions.delete(session));
|
|
99
|
-
});
|
|
100
|
-
await new Promise<void>((resolve) => backend.listen(0, "127.0.0.1", resolve));
|
|
101
|
-
const port = (backend.address() as AddressInfo).port;
|
|
102
|
-
client = createNodeClient({ baseUrl: normalizeEndpoint(`127.0.0.1:${port}`) });
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
afterAll(async () => {
|
|
106
|
-
for (const session of openSessions) session.destroy();
|
|
107
|
-
await new Promise<void>((resolve) => backend.close(() => resolve()));
|
|
108
|
-
await new Promise<void>((resolve) => storage.close(() => resolve()));
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
describe("pushSkill", () => {
|
|
112
|
-
it("zips a directory and uploads a valid artifact", async () => {
|
|
113
|
-
const dir = mkdtempSync(join(tmpdir(), "push-it-"));
|
|
114
|
-
try {
|
|
115
|
-
writeFileSync(join(dir, "SKILL.md"), SKILL_MD);
|
|
116
|
-
writeFileSync(join(dir, "tool.py"), "print('x')\n");
|
|
117
|
-
writeFileSync(join(dir, ".env"), "SECRET=1\n"); // must be excluded
|
|
118
|
-
|
|
119
|
-
const result = await pushSkill(client, dir, "acme", "v1.2.3", "first push", {
|
|
120
|
-
respectGitignore: true,
|
|
121
|
-
extraIgnore: [],
|
|
122
|
-
extraInclude: [],
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
expect(result.skillName).toBe("my-skill");
|
|
126
|
-
expect(result.slug).toBe("my-skill");
|
|
127
|
-
expect(result.tag).toBe("v1.2.3");
|
|
128
|
-
expect(result.versionChanged).toBe(true);
|
|
129
|
-
expect(result.isNewResource).toBe(false);
|
|
130
|
-
expect(pushedTags).toEqual(["v1.2.3"]);
|
|
131
|
-
|
|
132
|
-
const entries = Object.keys(unzipSync(pushedArtifacts[0])).sort();
|
|
133
|
-
expect(entries).toEqual(["SKILL.md", "tool.py"]);
|
|
134
|
-
} finally {
|
|
135
|
-
rmSync(dir, { recursive: true, force: true });
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it("defaults an empty tag to 'latest'", async () => {
|
|
140
|
-
const dir = mkdtempSync(join(tmpdir(), "push-it-"));
|
|
141
|
-
try {
|
|
142
|
-
writeFileSync(join(dir, "SKILL.md"), SKILL_MD);
|
|
143
|
-
await pushSkill(client, dir, "acme", "", "", { respectGitignore: true, extraIgnore: [], extraInclude: [] });
|
|
144
|
-
expect(pushedTags).toEqual(["latest"]);
|
|
145
|
-
} finally {
|
|
146
|
-
rmSync(dir, { recursive: true, force: true });
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
describe("downloadExecutionArtifacts", () => {
|
|
152
|
-
it("downloads available artifacts and tolerates partial failures", async () => {
|
|
153
|
-
const out = mkdtempSync(join(tmpdir(), "dl-it-"));
|
|
154
|
-
try {
|
|
155
|
-
const outcome = await downloadExecutionArtifacts(client, "aex_done", { artifactName: "", outputDir: out });
|
|
156
|
-
expect(outcome.total).toBe(2);
|
|
157
|
-
expect(outcome.downloaded).toBe(1); // broken.txt 404s, report.txt succeeds
|
|
158
|
-
expect(outcome.noArtifacts).toBe(false);
|
|
159
|
-
expect(readFileSync(join(out, "report.txt"), "utf8")).toBe(ARTIFACT_BODY);
|
|
160
|
-
} finally {
|
|
161
|
-
rmSync(out, { recursive: true, force: true });
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
it("filters to a named artifact", async () => {
|
|
166
|
-
const out = mkdtempSync(join(tmpdir(), "dl-it-"));
|
|
167
|
-
try {
|
|
168
|
-
const outcome = await downloadExecutionArtifacts(client, "aex_done", { artifactName: "report.txt", outputDir: out });
|
|
169
|
-
expect(outcome.total).toBe(1);
|
|
170
|
-
expect(outcome.downloaded).toBe(1);
|
|
171
|
-
} finally {
|
|
172
|
-
rmSync(out, { recursive: true, force: true });
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
});
|