@stigmer/cli 3.35.0 → 3.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/auth0.d.ts.map +1 -1
- package/auth/auth0.js.map +1 -1
- package/auth/callback-server.d.ts.map +1 -1
- package/auth/callback-server.js.map +1 -1
- package/auth/index.d.ts.map +1 -1
- package/auth/index.js.map +1 -1
- package/auth/login.d.ts.map +1 -1
- package/auth/login.js.map +1 -1
- package/auth/pages.d.ts.map +1 -1
- package/auth/pages.js.map +1 -1
- package/auth/pkce.d.ts.map +1 -1
- package/auth/pkce.js.map +1 -1
- package/auth/token.d.ts.map +1 -1
- package/auth/token.js.map +1 -1
- package/backend.d.ts.map +1 -1
- package/backend.js.map +1 -1
- package/cli/stigmer.d.ts.map +1 -1
- package/cli/stigmer.js.map +1 -1
- package/client/client.d.ts.map +1 -1
- package/client/client.js.map +1 -1
- package/client/index.d.ts.map +1 -1
- package/client/index.js.map +1 -1
- package/commands/agent-exec-flags.d.ts.map +1 -1
- package/commands/agent-exec-flags.js.map +1 -1
- package/commands/apikey/duration.d.ts.map +1 -1
- package/commands/apikey/duration.js.map +1 -1
- package/commands/apikey/index.d.ts.map +1 -1
- package/commands/apikey/index.js.map +1 -1
- package/commands/apply.d.ts.map +1 -1
- package/commands/apply.js.map +1 -1
- package/commands/auth/index.d.ts.map +1 -1
- package/commands/auth/index.js.map +1 -1
- package/commands/auth/login.d.ts.map +1 -1
- package/commands/auth/login.js.map +1 -1
- package/commands/auth/whoami.d.ts.map +1 -1
- package/commands/auth/whoami.js.map +1 -1
- package/commands/bootstrap.d.ts.map +1 -1
- package/commands/bootstrap.js.map +1 -1
- package/commands/completion.d.ts.map +1 -1
- package/commands/completion.js.map +1 -1
- package/commands/config/backend.d.ts.map +1 -1
- package/commands/config/backend.js.map +1 -1
- package/commands/config/context.d.ts.map +1 -1
- package/commands/config/context.js.map +1 -1
- package/commands/config/index.d.ts.map +1 -1
- package/commands/config/index.js.map +1 -1
- package/commands/config/kv.d.ts.map +1 -1
- package/commands/config/kv.js.map +1 -1
- package/commands/connect.d.ts.map +1 -1
- package/commands/connect.js.map +1 -1
- package/commands/delete.d.ts.map +1 -1
- package/commands/delete.js.map +1 -1
- package/commands/diff.d.ts.map +1 -1
- package/commands/diff.js.map +1 -1
- package/commands/down.d.ts.map +1 -1
- package/commands/down.js.map +1 -1
- package/commands/download.d.ts.map +1 -1
- package/commands/download.js.map +1 -1
- package/commands/execution/approve.d.ts.map +1 -1
- package/commands/execution/approve.js.map +1 -1
- package/commands/execution/control.d.ts.map +1 -1
- package/commands/execution/control.js.map +1 -1
- package/commands/execution/index.d.ts.map +1 -1
- package/commands/execution/index.js.map +1 -1
- package/commands/execution/logs.d.ts.map +1 -1
- package/commands/execution/logs.js.map +1 -1
- package/commands/execution/trace.d.ts.map +1 -1
- package/commands/execution/trace.js.map +1 -1
- package/commands/get.d.ts.map +1 -1
- package/commands/get.js.map +1 -1
- package/commands/install.d.ts.map +1 -1
- package/commands/install.js.map +1 -1
- package/commands/internal-daemon.d.ts.map +1 -1
- package/commands/internal-daemon.js.map +1 -1
- package/commands/list.d.ts.map +1 -1
- package/commands/list.js.map +1 -1
- package/commands/logs.d.ts.map +1 -1
- package/commands/logs.js.map +1 -1
- package/commands/marketplace.d.ts.map +1 -1
- package/commands/marketplace.js.map +1 -1
- package/commands/mcp-server.d.ts.map +1 -1
- package/commands/mcp-server.js.map +1 -1
- package/commands/push.d.ts.map +1 -1
- package/commands/push.js.map +1 -1
- package/commands/reset.d.ts.map +1 -1
- package/commands/reset.js.map +1 -1
- package/commands/resume.d.ts.map +1 -1
- package/commands/resume.js.map +1 -1
- package/commands/run.d.ts.map +1 -1
- package/commands/run.js.map +1 -1
- package/commands/schedule.d.ts.map +1 -1
- package/commands/schedule.js.map +1 -1
- package/commands/search.d.ts.map +1 -1
- package/commands/search.js.map +1 -1
- package/commands/setup.d.ts.map +1 -1
- package/commands/setup.js.map +1 -1
- package/commands/share.d.ts.map +1 -1
- package/commands/share.js.map +1 -1
- package/commands/shared.d.ts.map +1 -1
- package/commands/shared.js.map +1 -1
- package/commands/status.d.ts.map +1 -1
- package/commands/status.js.map +1 -1
- package/commands/tag.d.ts.map +1 -1
- package/commands/tag.js.map +1 -1
- package/commands/up.d.ts.map +1 -1
- package/commands/up.js.map +1 -1
- package/commands/usage.d.ts.map +1 -1
- package/commands/usage.js.map +1 -1
- package/commands/validate.d.ts.map +1 -1
- package/commands/validate.js.map +1 -1
- package/commands/version.d.ts.map +1 -1
- package/commands/version.js.map +1 -1
- package/config/config.d.ts.map +1 -1
- package/config/config.js.map +1 -1
- package/config/index.d.ts.map +1 -1
- package/config/index.js.map +1 -1
- package/config/keys.d.ts.map +1 -1
- package/config/keys.js.map +1 -1
- package/config/paths.d.ts.map +1 -1
- package/config/paths.js.map +1 -1
- package/config/resolve.d.ts.map +1 -1
- package/config/resolve.js.map +1 -1
- package/errors/classify.d.ts.map +1 -1
- package/errors/classify.js.map +1 -1
- package/errors/cli-exit-error.d.ts.map +1 -1
- package/errors/cli-exit-error.js.map +1 -1
- package/errors/exit-codes.d.ts.map +1 -1
- package/errors/exit-codes.js.map +1 -1
- package/errors/handle.d.ts.map +1 -1
- package/errors/handle.js.map +1 -1
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js.map +1 -1
- package/errors/usage-error.d.ts.map +1 -1
- package/errors/usage-error.js.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/local/artifact.d.ts.map +1 -1
- package/local/artifact.js.map +1 -1
- package/local/bootstrap.d.ts.map +1 -1
- package/local/bootstrap.js.map +1 -1
- package/local/constants.d.ts.map +1 -1
- package/local/constants.js.map +1 -1
- package/local/daemon/components.d.ts.map +1 -1
- package/local/daemon/components.js.map +1 -1
- package/local/daemon/env.d.ts.map +1 -1
- package/local/daemon/env.js.map +1 -1
- package/local/daemon/host.d.ts.map +1 -1
- package/local/daemon/host.js.map +1 -1
- package/local/daemon/index.d.ts.map +1 -1
- package/local/daemon/index.js.map +1 -1
- package/local/daemon/launch.d.ts.map +1 -1
- package/local/daemon/launch.js.map +1 -1
- package/local/daemon/process.d.ts.map +1 -1
- package/local/daemon/process.js.map +1 -1
- package/local/daemon/supervisor.d.ts.map +1 -1
- package/local/daemon/supervisor.js.map +1 -1
- package/local/daemon/types.d.ts.map +1 -1
- package/local/daemon/types.js.map +1 -1
- package/local/llm-config.d.ts.map +1 -1
- package/local/llm-config.js.map +1 -1
- package/local/logs/tail.d.ts.map +1 -1
- package/local/logs/tail.js.map +1 -1
- package/local/logs/view.d.ts.map +1 -1
- package/local/logs/view.js.map +1 -1
- package/local/net/tcp.d.ts.map +1 -1
- package/local/net/tcp.js.map +1 -1
- package/local/operator-config.d.ts.map +1 -1
- package/local/operator-config.js.map +1 -1
- package/local/paths.d.ts.map +1 -1
- package/local/paths.js.map +1 -1
- package/local/reset.d.ts.map +1 -1
- package/local/reset.js.map +1 -1
- package/local/runtime/index.d.ts.map +1 -1
- package/local/runtime/index.js.map +1 -1
- package/local/runtime/node.d.ts.map +1 -1
- package/local/runtime/node.js.map +1 -1
- package/local/runtime/runner.d.ts.map +1 -1
- package/local/runtime/runner.js.map +1 -1
- package/local/runtime/runtimes-install.d.ts.map +1 -1
- package/local/runtime/runtimes-install.js.map +1 -1
- package/local/runtime/server.d.ts.map +1 -1
- package/local/runtime/server.js.map +1 -1
- package/local/runtime/which.d.ts.map +1 -1
- package/local/runtime/which.js.map +1 -1
- package/local/setup/prompt.d.ts.map +1 -1
- package/local/setup/prompt.js.map +1 -1
- package/local/setup/wizard.d.ts.map +1 -1
- package/local/setup/wizard.js.map +1 -1
- package/local/state/health-state.d.ts.map +1 -1
- package/local/state/health-state.js.map +1 -1
- package/local/state/index.d.ts.map +1 -1
- package/local/state/index.js.map +1 -1
- package/local/state/lock.d.ts.map +1 -1
- package/local/state/lock.js.map +1 -1
- package/local/state/log-rotation.d.ts.map +1 -1
- package/local/state/log-rotation.js.map +1 -1
- package/local/state/pidfile.d.ts.map +1 -1
- package/local/state/pidfile.js.map +1 -1
- package/local/state/proc.d.ts.map +1 -1
- package/local/state/proc.js.map +1 -1
- package/local/state/startup-config.d.ts.map +1 -1
- package/local/state/startup-config.js.map +1 -1
- package/local/status.d.ts.map +1 -1
- package/local/status.js.map +1 -1
- package/local/temporal/download.d.ts.map +1 -1
- package/local/temporal/download.js.map +1 -1
- package/local/temporal/index.d.ts.map +1 -1
- package/local/temporal/index.js.map +1 -1
- package/local/temporal/inspect.d.ts.map +1 -1
- package/local/temporal/inspect.js.map +1 -1
- package/local/temporal/manager.d.ts.map +1 -1
- package/local/temporal/manager.js.map +1 -1
- package/local/temporal/supervisor.d.ts.map +1 -1
- package/local/temporal/supervisor.js.map +1 -1
- package/local/webconsole/index.d.ts.map +1 -1
- package/local/webconsole/index.js.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.js.map +1 -1
- package/marketplace/config.d.ts.map +1 -1
- package/marketplace/config.js.map +1 -1
- package/marketplace/github.d.ts.map +1 -1
- package/marketplace/github.js.map +1 -1
- package/marketplace/index.d.ts.map +1 -1
- package/marketplace/index.js.map +1 -1
- package/marketplace/install.d.ts.map +1 -1
- package/marketplace/install.js.map +1 -1
- package/marketplace/materialize.d.ts.map +1 -1
- package/marketplace/materialize.js.map +1 -1
- package/marketplace/official.d.ts.map +1 -1
- package/marketplace/official.js.map +1 -1
- package/marketplace/read.d.ts.map +1 -1
- package/marketplace/read.js.map +1 -1
- package/marketplace/ref.d.ts.map +1 -1
- package/marketplace/ref.js.map +1 -1
- package/marketplace/render.d.ts.map +1 -1
- package/marketplace/render.js.map +1 -1
- package/output/command-result.d.ts.map +1 -1
- package/output/command-result.js.map +1 -1
- package/output/confirm.d.ts.map +1 -1
- package/output/confirm.js.map +1 -1
- package/output/format.d.ts.map +1 -1
- package/output/format.js.map +1 -1
- package/output/index.d.ts.map +1 -1
- package/output/index.js.map +1 -1
- package/output/ndjson.d.ts.map +1 -1
- package/output/ndjson.js.map +1 -1
- package/output/proto.d.ts.map +1 -1
- package/output/proto.js.map +1 -1
- package/output/style.d.ts.map +1 -1
- package/output/style.js.map +1 -1
- package/output/table.d.ts.map +1 -1
- package/output/table.js.map +1 -1
- package/package.json +7 -7
- package/program.d.ts.map +1 -1
- package/program.js.map +1 -1
- package/registry/aliases.d.ts.map +1 -1
- package/registry/aliases.js.map +1 -1
- package/registry/index.d.ts.map +1 -1
- package/registry/index.js.map +1 -1
- package/registry/metadata.d.ts.map +1 -1
- package/registry/metadata.js.map +1 -1
- package/registry/registry.d.ts.map +1 -1
- package/registry/registry.js.map +1 -1
- package/registry/verb-support.d.ts.map +1 -1
- package/registry/verb-support.js.map +1 -1
- package/registry/verbs.d.ts.map +1 -1
- package/registry/verbs.js.map +1 -1
- package/resources/apply/apply.d.ts.map +1 -1
- package/resources/apply/apply.js.map +1 -1
- package/resources/apply/discovery.d.ts.map +1 -1
- package/resources/apply/discovery.js.map +1 -1
- package/resources/apply/handlers.d.ts.map +1 -1
- package/resources/apply/handlers.js.map +1 -1
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/discover.d.ts.map +1 -1
- package/resources/connect/discover.js.map +1 -1
- package/resources/connect/display.d.ts.map +1 -1
- package/resources/connect/display.js.map +1 -1
- package/resources/connect/oauth.d.ts.map +1 -1
- package/resources/connect/oauth.js.map +1 -1
- package/resources/cursor-pages.d.ts.map +1 -1
- package/resources/cursor-pages.js.map +1 -1
- package/resources/delete.d.ts.map +1 -1
- package/resources/delete.js.map +1 -1
- package/resources/diff.d.ts.map +1 -1
- package/resources/diff.js.map +1 -1
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js.map +1 -1
- package/resources/download.d.ts.map +1 -1
- package/resources/download.js.map +1 -1
- package/resources/execution-approve.d.ts.map +1 -1
- package/resources/execution-approve.js.map +1 -1
- package/resources/execution-control.d.ts.map +1 -1
- package/resources/execution-control.js.map +1 -1
- package/resources/execution-format.d.ts.map +1 -1
- package/resources/execution-format.js.map +1 -1
- package/resources/execution-logs.d.ts.map +1 -1
- package/resources/execution-logs.js.map +1 -1
- package/resources/execution-trace.d.ts.map +1 -1
- package/resources/execution-trace.js.map +1 -1
- package/resources/execution.d.ts.map +1 -1
- package/resources/execution.js.map +1 -1
- package/resources/get-bindings.d.ts.map +1 -1
- package/resources/get-bindings.js.map +1 -1
- package/resources/get.d.ts.map +1 -1
- package/resources/get.js.map +1 -1
- package/resources/git.d.ts.map +1 -1
- package/resources/git.js.map +1 -1
- package/resources/ignore/index.d.ts.map +1 -1
- package/resources/ignore/index.js.map +1 -1
- package/resources/ignore/matcher.d.ts.map +1 -1
- package/resources/ignore/matcher.js.map +1 -1
- package/resources/list.d.ts.map +1 -1
- package/resources/list.js.map +1 -1
- package/resources/mcp/placeholder-resolver.d.ts.map +1 -1
- package/resources/mcp/placeholder-resolver.js.map +1 -1
- package/resources/mcp/runtime-env.d.ts.map +1 -1
- package/resources/mcp/runtime-env.js.map +1 -1
- package/resources/picker/ink.d.ts.map +1 -1
- package/resources/picker/ink.js.map +1 -1
- package/resources/picker/tty.d.ts.map +1 -1
- package/resources/picker/tty.js.map +1 -1
- package/resources/plugin.d.ts.map +1 -1
- package/resources/plugin.js.map +1 -1
- package/resources/reference.d.ts.map +1 -1
- package/resources/reference.js.map +1 -1
- package/resources/render.d.ts.map +1 -1
- package/resources/render.js.map +1 -1
- package/resources/run/agent-exec.d.ts.map +1 -1
- package/resources/run/agent-exec.js.map +1 -1
- package/resources/run/attachments.d.ts.map +1 -1
- package/resources/run/attachments.js.map +1 -1
- package/resources/run/create.d.ts.map +1 -1
- package/resources/run/create.js.map +1 -1
- package/resources/run/env.d.ts.map +1 -1
- package/resources/run/env.js.map +1 -1
- package/resources/run/epilogue.d.ts.map +1 -1
- package/resources/run/epilogue.js.map +1 -1
- package/resources/run/header.d.ts.map +1 -1
- package/resources/run/header.js.map +1 -1
- package/resources/run/prepare.d.ts.map +1 -1
- package/resources/run/prepare.js.map +1 -1
- package/resources/run/resolve.d.ts.map +1 -1
- package/resources/run/resolve.js.map +1 -1
- package/resources/run/resume.d.ts.map +1 -1
- package/resources/run/resume.js.map +1 -1
- package/resources/run/stream.d.ts.map +1 -1
- package/resources/run/stream.js.map +1 -1
- package/resources/run/workflow-stream.d.ts.map +1 -1
- package/resources/run/workflow-stream.js.map +1 -1
- package/resources/run/workspace.d.ts.map +1 -1
- package/resources/run/workspace.js.map +1 -1
- package/resources/schedule.d.ts.map +1 -1
- package/resources/schedule.js.map +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js.map +1 -1
- package/resources/session.d.ts.map +1 -1
- package/resources/session.js.map +1 -1
- package/resources/share.d.ts.map +1 -1
- package/resources/share.js.map +1 -1
- package/resources/skill.d.ts.map +1 -1
- package/resources/skill.js.map +1 -1
- package/resources/stream/approval-detect.d.ts.map +1 -1
- package/resources/stream/approval-detect.js.map +1 -1
- package/resources/stream/convert.d.ts.map +1 -1
- package/resources/stream/convert.js.map +1 -1
- package/resources/stream/diff.d.ts.map +1 -1
- package/resources/stream/diff.js.map +1 -1
- package/resources/stream/events.d.ts.map +1 -1
- package/resources/stream/events.js.map +1 -1
- package/resources/stream/headless.d.ts.map +1 -1
- package/resources/stream/headless.js.map +1 -1
- package/resources/stream/ink.d.ts.map +1 -1
- package/resources/stream/ink.js.map +1 -1
- package/resources/stream/render-ndjson.d.ts.map +1 -1
- package/resources/stream/render-ndjson.js.map +1 -1
- package/resources/stream/render-plaintext.d.ts.map +1 -1
- package/resources/stream/render-plaintext.js.map +1 -1
- package/resources/stream/snapshot.d.ts.map +1 -1
- package/resources/stream/snapshot.js.map +1 -1
- package/resources/stream/subagent.d.ts.map +1 -1
- package/resources/stream/subagent.js.map +1 -1
- package/resources/stream/submit.d.ts.map +1 -1
- package/resources/stream/submit.js.map +1 -1
- package/resources/stream/todo.d.ts.map +1 -1
- package/resources/stream/todo.js.map +1 -1
- package/resources/stream/tool-state.d.ts.map +1 -1
- package/resources/stream/tool-state.js.map +1 -1
- package/resources/stream/tty.d.ts.map +1 -1
- package/resources/stream/tty.js.map +1 -1
- package/resources/stream/workflow-event-view.d.ts.map +1 -1
- package/resources/stream/workflow-event-view.js.map +1 -1
- package/resources/stream/workflow-render-ndjson.d.ts.map +1 -1
- package/resources/stream/workflow-render-ndjson.js.map +1 -1
- package/resources/stream/workflow-render-plaintext.d.ts.map +1 -1
- package/resources/stream/workflow-render-plaintext.js.map +1 -1
- package/resources/tag.d.ts.map +1 -1
- package/resources/tag.js.map +1 -1
- package/resources/task-configs.d.ts.map +1 -1
- package/resources/task-configs.js.map +1 -1
- package/resources/usage.d.ts.map +1 -1
- package/resources/usage.js.map +1 -1
- package/resources/validate.d.ts.map +1 -1
- package/resources/validate.js.map +1 -1
- package/resources/version.d.ts.map +1 -1
- package/resources/version.js.map +1 -1
- package/runtime.d.ts.map +1 -1
- package/runtime.js.map +1 -1
- package/version.d.ts.map +1 -1
- package/version.js.map +1 -1
- package/src/auth/pkce.test.ts +0 -37
- package/src/auth/token.test.ts +0 -151
- package/src/client/client.test.ts +0 -142
- package/src/commands/apikey/duration.test.ts +0 -23
- package/src/commands/auth/login.test.ts +0 -52
- package/src/commands/auth/whoami.test.ts +0 -96
- package/src/commands/bootstrap.test.ts +0 -178
- package/src/commands/config/backend.test.ts +0 -122
- package/src/commands/config/context.test.ts +0 -171
- package/src/commands/connect.test.ts +0 -113
- package/src/commands/install.test.ts +0 -307
- package/src/commands/marketplace.test.ts +0 -205
- package/src/commands/mcp-server.test.ts +0 -65
- package/src/commands/validate.test.ts +0 -168
- package/src/config/config.test.ts +0 -132
- package/src/config/keys.test.ts +0 -61
- package/src/config/resolve.test.ts +0 -242
- package/src/errors/clierr.test.ts +0 -172
- package/src/local/artifact.test.ts +0 -54
- package/src/local/bootstrap.test.ts +0 -166
- package/src/local/daemon/components.test.ts +0 -148
- package/src/local/daemon/daemon.integration.test.ts +0 -216
- package/src/local/daemon/env.test.ts +0 -108
- package/src/local/daemon/launch.test.ts +0 -136
- package/src/local/daemon/supervisor.test.ts +0 -260
- package/src/local/llm-config.test.ts +0 -66
- package/src/local/logs/tail.test.ts +0 -70
- package/src/local/logs/view.test.ts +0 -46
- package/src/local/operator-config.test.ts +0 -72
- package/src/local/reset.test.ts +0 -53
- package/src/local/runtime/runtime.test.ts +0 -240
- package/src/local/runtime/runtimes-install.test.ts +0 -58
- package/src/local/runtime/server.test.ts +0 -253
- package/src/local/setup/wizard.test.ts +0 -94
- package/src/local/state/state.test.ts +0 -210
- package/src/local/status.test.ts +0 -108
- package/src/local/temporal/download.test.ts +0 -248
- package/src/local/temporal/inspect.test.ts +0 -83
- package/src/local/temporal/manager.test.ts +0 -64
- package/src/local/temporal/supervisor.test.ts +0 -77
- package/src/marketplace/__fixtures__/cursor-marketplace.ts +0 -69
- package/src/marketplace/config.test.ts +0 -254
- package/src/marketplace/github.test.ts +0 -394
- package/src/marketplace/install.test.ts +0 -261
- package/src/marketplace/official.test.ts +0 -107
- package/src/marketplace/read.test.ts +0 -93
- package/src/marketplace/ref.test.ts +0 -179
- package/src/output/command-result.test.ts +0 -73
- package/src/output/confirm.test.ts +0 -43
- package/src/output/format.test.ts +0 -65
- package/src/output/proto.test.ts +0 -72
- package/src/output/table.test.ts +0 -37
- package/src/program.test.ts +0 -62
- package/src/registry/aliases.test.ts +0 -142
- package/src/registry/registry.test.ts +0 -355
- package/src/resources/apply/apply.integration.test.ts +0 -353
- package/src/resources/apply/apply.test.ts +0 -134
- package/src/resources/apply/discovery.integration.test.ts +0 -99
- package/src/resources/connect/__fixtures__/stdio-crash.mjs +0 -6
- package/src/resources/connect/__fixtures__/stdio-server.mjs +0 -48
- package/src/resources/connect/connect.integration.test.ts +0 -383
- package/src/resources/connect/discover.test.ts +0 -84
- package/src/resources/connect/oauth.test.ts +0 -158
- package/src/resources/cursor-pages.test.ts +0 -55
- package/src/resources/diff.integration.test.ts +0 -103
- package/src/resources/diff.test.ts +0 -34
- package/src/resources/documents.test.ts +0 -67
- package/src/resources/execution-approve.test.ts +0 -50
- package/src/resources/execution-format.test.ts +0 -48
- package/src/resources/execution.integration.test.ts +0 -285
- package/src/resources/execution.test.ts +0 -138
- package/src/resources/ignore/ignore.test.ts +0 -62
- package/src/resources/mcp/placeholder-resolver.test.ts +0 -71
- package/src/resources/mcp/runtime-env.test.ts +0 -102
- package/src/resources/mutate-verbs.integration.test.ts +0 -455
- package/src/resources/picker/tty.test.ts +0 -37
- package/src/resources/plugin.test.ts +0 -379
- package/src/resources/push-download.integration.test.ts +0 -175
- package/src/resources/read-completion.integration.test.ts +0 -164
- package/src/resources/read-verbs.integration.test.ts +0 -603
- package/src/resources/reference.test.ts +0 -107
- package/src/resources/run/agent-exec.test.ts +0 -179
- package/src/resources/run/attachments.test.ts +0 -135
- package/src/resources/run/create.test.ts +0 -336
- package/src/resources/run/env.test.ts +0 -131
- package/src/resources/run/header.test.ts +0 -79
- package/src/resources/run/prepare.test.ts +0 -428
- package/src/resources/run/workflow-stream.integration.test.ts +0 -157
- package/src/resources/run/workspace.test.ts +0 -93
- package/src/resources/share.test.ts +0 -523
- package/src/resources/skill.test.ts +0 -364
- package/src/resources/stream/diff.test.ts +0 -338
- package/src/resources/stream/headless.test.ts +0 -119
- package/src/resources/stream/lazy-import.test.ts +0 -63
- package/src/resources/stream/render-ndjson.test.ts +0 -126
- package/src/resources/stream/render-plaintext.test.ts +0 -127
- package/src/resources/stream/snapshot.test.ts +0 -111
- package/src/resources/stream/submit.test.ts +0 -77
- package/src/resources/stream/workflow-event-view.test.ts +0 -116
- package/src/resources/stream/workflow-render.test.ts +0 -81
- package/src/resources/task-configs.test.ts +0 -98
- package/src/resources/usage.test.ts +0 -94
- package/src/resources/validate.test.ts +0 -79
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { describe, expect, it } from "vitest";
|
|
5
|
-
import { temporalPidFile } from "../paths.js";
|
|
6
|
-
import { writePidFile } from "../state/pidfile.js";
|
|
7
|
-
import { TemporalManager } from "./manager.js";
|
|
8
|
-
|
|
9
|
-
function tempHome(): string {
|
|
10
|
-
return mkdtempSync(join(tmpdir(), "stigmer-home-"));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
describe("TemporalManager", () => {
|
|
14
|
-
it("exposes the frontend address", () => {
|
|
15
|
-
const manager = TemporalManager.forHome(tempHome());
|
|
16
|
-
expect(manager.address).toBe("127.0.0.1:7233");
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("reads the PID from the ~/.stigmer/temporal.pid location", () => {
|
|
20
|
-
const home = tempHome();
|
|
21
|
-
const manager = TemporalManager.forHome(home);
|
|
22
|
-
expect(manager.getPid()).toBeNull();
|
|
23
|
-
writePidFile(temporalPidFile(home), 5151);
|
|
24
|
-
expect(manager.getPid()).toBe(5151);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("reports not-running when there is no PID file", async () => {
|
|
28
|
-
const manager = TemporalManager.forHome(tempHome());
|
|
29
|
-
expect(await manager.isRunning()).toBe(false);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// A stale PID file naming THIS process (the restarted container's fresh PID
|
|
33
|
-
// namespace reused it) can never be a running Temporal.
|
|
34
|
-
it("reports not-running when the PID file names the current process", async () => {
|
|
35
|
-
const home = tempHome();
|
|
36
|
-
writePidFile(temporalPidFile(home), process.pid);
|
|
37
|
-
expect(await TemporalManager.forHome(home).isRunning()).toBe(false);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe("STIGMER_TEMPORAL_BIN", () => {
|
|
41
|
-
it("relocates only the binary; data, log, PID and lock stay under the home", async () => {
|
|
42
|
-
const home = tempHome();
|
|
43
|
-
const binPath = join(tempHome(), "opt", "temporal");
|
|
44
|
-
mkdirSync(join(binPath, ".."), { recursive: true });
|
|
45
|
-
writeFileSync(binPath, "#!/bin/sh\n");
|
|
46
|
-
|
|
47
|
-
const manager = TemporalManager.forHome(home, { STIGMER_TEMPORAL_BIN: binPath });
|
|
48
|
-
expect(manager.binPath).toBe(binPath);
|
|
49
|
-
|
|
50
|
-
// Nothing to download: the pre-installed binary is what ensureInstalled checks for.
|
|
51
|
-
await manager.ensureInstalled();
|
|
52
|
-
expect(existsSync(join(home, ".stigmer", "bin", "temporal"))).toBe(false);
|
|
53
|
-
// State still lives in the home layout.
|
|
54
|
-
writePidFile(temporalPidFile(home), 5151);
|
|
55
|
-
expect(manager.getPid()).toBe(5151);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it("is ignored when empty, keeping the ~/.stigmer/bin default", () => {
|
|
59
|
-
const home = tempHome();
|
|
60
|
-
const manager = TemporalManager.forHome(home, { STIGMER_TEMPORAL_BIN: "" });
|
|
61
|
-
expect(manager.binPath).toBe(join(home, ".stigmer", "bin", "temporal"));
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { type Logger } from "../../logger.js";
|
|
3
|
-
import { type SupervisedTarget, TemporalSupervisor } from "./supervisor.js";
|
|
4
|
-
|
|
5
|
-
const silentLog: Logger = { debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() };
|
|
6
|
-
|
|
7
|
-
function makeTarget(overrides: Partial<SupervisedTarget> = {}): SupervisedTarget & {
|
|
8
|
-
isRunning: ReturnType<typeof vi.fn>;
|
|
9
|
-
start: ReturnType<typeof vi.fn>;
|
|
10
|
-
} {
|
|
11
|
-
return {
|
|
12
|
-
isRunning: vi.fn(async () => true),
|
|
13
|
-
start: vi.fn(async () => {}),
|
|
14
|
-
...overrides,
|
|
15
|
-
} as never;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function makeSupervisor(target: SupervisedTarget) {
|
|
19
|
-
return new TemporalSupervisor(target, { backoffMs: 0, sleep: async () => {}, log: silentLog });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
describe("TemporalSupervisor.checkHealthAndRestart", () => {
|
|
23
|
-
it("does nothing while the target is healthy", async () => {
|
|
24
|
-
const target = makeTarget({ isRunning: vi.fn(async () => true) });
|
|
25
|
-
await makeSupervisor(target).checkHealthAndRestart();
|
|
26
|
-
expect(target.start).not.toHaveBeenCalled();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it("restarts when the target is unhealthy", async () => {
|
|
30
|
-
const target = makeTarget({ isRunning: vi.fn(async () => false) });
|
|
31
|
-
await makeSupervisor(target).checkHealthAndRestart();
|
|
32
|
-
expect(target.start).toHaveBeenCalledTimes(1);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it("swallows a restart failure (retried on the next tick)", async () => {
|
|
36
|
-
const target = makeTarget({
|
|
37
|
-
isRunning: vi.fn(async () => false),
|
|
38
|
-
start: vi.fn(async () => {
|
|
39
|
-
throw new Error("boom");
|
|
40
|
-
}),
|
|
41
|
-
});
|
|
42
|
-
await expect(makeSupervisor(target).checkHealthAndRestart()).resolves.toBeUndefined();
|
|
43
|
-
expect(target.start).toHaveBeenCalledTimes(1);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it("does not restart if stopped during the backoff", async () => {
|
|
47
|
-
const target = makeTarget({ isRunning: vi.fn(async () => false) });
|
|
48
|
-
const supervisor = new TemporalSupervisor(target, {
|
|
49
|
-
backoffMs: 0,
|
|
50
|
-
// Stop the supervisor while it is "sleeping" through the backoff.
|
|
51
|
-
sleep: async () => {
|
|
52
|
-
supervisor.stop();
|
|
53
|
-
},
|
|
54
|
-
log: silentLog,
|
|
55
|
-
});
|
|
56
|
-
await supervisor.checkHealthAndRestart();
|
|
57
|
-
expect(target.start).not.toHaveBeenCalled();
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
describe("TemporalSupervisor start/stop", () => {
|
|
62
|
-
it("schedules ticks and stops cleanly", async () => {
|
|
63
|
-
vi.useFakeTimers();
|
|
64
|
-
try {
|
|
65
|
-
const target = makeTarget({ isRunning: vi.fn(async () => true) });
|
|
66
|
-
const supervisor = new TemporalSupervisor(target, { intervalMs: 1000, log: silentLog });
|
|
67
|
-
supervisor.start();
|
|
68
|
-
await vi.advanceTimersByTimeAsync(1000);
|
|
69
|
-
expect(target.isRunning).toHaveBeenCalledTimes(1);
|
|
70
|
-
supervisor.stop();
|
|
71
|
-
await vi.advanceTimersByTimeAsync(5000);
|
|
72
|
-
expect(target.isRunning).toHaveBeenCalledTimes(1); // no further ticks after stop
|
|
73
|
-
} finally {
|
|
74
|
-
vi.useRealTimers();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// A small Cursor-dialect marketplace written to a directory for the
|
|
2
|
-
// marketplace suites: two plugins offered (one with a skill, one MCP-only,
|
|
3
|
-
// the second under a nested source directory) and one entry whose directory
|
|
4
|
-
// is missing, so every suite sees an offered list and a dropped entry. It
|
|
5
|
-
// names itself `acme-plugins`: the vendors' own names are built into every
|
|
6
|
-
// client, so a fixture under one of them would meet the reserved-name
|
|
7
|
-
// refusal instead of being added. Its plugins carry names no real catalogue
|
|
8
|
-
// offers (`warmer`, `codeforge`): a bare-name install searches the official
|
|
9
|
-
// catalogue too, which in a checkout is the live `plugins/` tree, and a
|
|
10
|
-
// fixture named after a real plugin would collide with it as the catalogue
|
|
11
|
-
// grows.
|
|
12
|
-
|
|
13
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
14
|
-
import { dirname, join } from "node:path";
|
|
15
|
-
|
|
16
|
-
export const CURSOR_MARKETPLACE_NAME = "acme-plugins";
|
|
17
|
-
|
|
18
|
-
export function writeCursorMarketplace(root: string): void {
|
|
19
|
-
const write = (rel: string, content: string): void => {
|
|
20
|
-
const full = join(root, rel);
|
|
21
|
-
mkdirSync(dirname(full), { recursive: true });
|
|
22
|
-
writeFileSync(full, content);
|
|
23
|
-
};
|
|
24
|
-
write(
|
|
25
|
-
".cursor-plugin/marketplace.json",
|
|
26
|
-
JSON.stringify({
|
|
27
|
-
name: CURSOR_MARKETPLACE_NAME,
|
|
28
|
-
metadata: { description: "A test catalogue" },
|
|
29
|
-
plugins: [
|
|
30
|
-
{
|
|
31
|
-
name: "warmer",
|
|
32
|
-
source: "warmer",
|
|
33
|
-
description: "Keeps things warm.",
|
|
34
|
-
},
|
|
35
|
-
{ name: "codeforge", source: "third_party/codeforge" },
|
|
36
|
-
{ name: "ghost", source: "ghost", description: "Listed, not present." },
|
|
37
|
-
],
|
|
38
|
-
}),
|
|
39
|
-
);
|
|
40
|
-
write(
|
|
41
|
-
"warmer/.cursor-plugin/plugin.json",
|
|
42
|
-
JSON.stringify({
|
|
43
|
-
name: "warmer",
|
|
44
|
-
version: "1.0.0",
|
|
45
|
-
description: "The warmer plugin.",
|
|
46
|
-
skills: "./skills/",
|
|
47
|
-
}),
|
|
48
|
-
);
|
|
49
|
-
write(
|
|
50
|
-
"warmer/skills/warm/SKILL.md",
|
|
51
|
-
"---\nname: warm\ndescription: Warms.\n---\nKeep it warm.\n",
|
|
52
|
-
);
|
|
53
|
-
write(
|
|
54
|
-
"third_party/codeforge/.cursor-plugin/plugin.json",
|
|
55
|
-
JSON.stringify({
|
|
56
|
-
name: "codeforge",
|
|
57
|
-
version: "2.1.0",
|
|
58
|
-
mcpServers: "./mcp.json",
|
|
59
|
-
}),
|
|
60
|
-
);
|
|
61
|
-
write(
|
|
62
|
-
"third_party/codeforge/mcp.json",
|
|
63
|
-
JSON.stringify({
|
|
64
|
-
mcpServers: {
|
|
65
|
-
codeforge: { type: "http", url: "https://api.githubcopilot.com/mcp/" },
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
// Pins the marketplace list over the real config file (HOME redirected):
|
|
2
|
-
// the official one is always first and never stored; add and remove round-
|
|
3
|
-
// trip through the file's own dialect (`type`); a hand-edited entry the CLI
|
|
4
|
-
// cannot read is listed with its reason, kept on save, and named when a
|
|
5
|
-
// command asks for it; the reserved name and --standalone refuse.
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
mkdirSync,
|
|
9
|
-
mkdtempSync,
|
|
10
|
-
readFileSync,
|
|
11
|
-
rmSync,
|
|
12
|
-
writeFileSync,
|
|
13
|
-
} from "node:fs";
|
|
14
|
-
import { tmpdir } from "node:os";
|
|
15
|
-
import { join } from "node:path";
|
|
16
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
17
|
-
import { configPath, load } from "../config/index.js";
|
|
18
|
-
import { setStandalone } from "../runtime.js";
|
|
19
|
-
import {
|
|
20
|
-
OFFICIAL_MARKETPLACE_NAME,
|
|
21
|
-
addMarketplace,
|
|
22
|
-
describeSource,
|
|
23
|
-
findMarketplace,
|
|
24
|
-
isOwnerRepo,
|
|
25
|
-
listMarketplaces,
|
|
26
|
-
narrowEntry,
|
|
27
|
-
removeMarketplace,
|
|
28
|
-
} from "./config.js";
|
|
29
|
-
|
|
30
|
-
let home: string;
|
|
31
|
-
let originalHome: string | undefined;
|
|
32
|
-
|
|
33
|
-
beforeEach(() => {
|
|
34
|
-
originalHome = process.env.HOME;
|
|
35
|
-
home = mkdtempSync(join(tmpdir(), "stigmer-marketplace-config-"));
|
|
36
|
-
process.env.HOME = home;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
afterEach(() => {
|
|
40
|
-
setStandalone(false);
|
|
41
|
-
if (originalHome === undefined) delete process.env.HOME;
|
|
42
|
-
else process.env.HOME = originalHome;
|
|
43
|
-
rmSync(home, { recursive: true, force: true });
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
function writeConfig(yaml: string): void {
|
|
47
|
-
mkdirSync(join(home, ".stigmer"), { recursive: true });
|
|
48
|
-
writeFileSync(configPath(), yaml);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const BUILT_IN_NAMES = [OFFICIAL_MARKETPLACE_NAME];
|
|
52
|
-
|
|
53
|
-
describe("listMarketplaces", () => {
|
|
54
|
-
it("is the built-in source alone on a fresh machine, the official catalogue", () => {
|
|
55
|
-
const listing = listMarketplaces();
|
|
56
|
-
expect(listing.known.map((m) => m.name)).toEqual(BUILT_IN_NAMES);
|
|
57
|
-
expect(listing.known[0]?.source).toEqual({ type: "official" });
|
|
58
|
-
expect(listing.known).toHaveLength(1);
|
|
59
|
-
expect(listing.unreadable).toEqual([]);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("lists configured entries after the built-in, in file order, names the unreadable ones, and lets the built-in win over a same-named entry", () => {
|
|
63
|
-
writeConfig(
|
|
64
|
-
[
|
|
65
|
-
"backend:",
|
|
66
|
-
" type: local",
|
|
67
|
-
"marketplaces:",
|
|
68
|
-
" acme:",
|
|
69
|
-
" type: github",
|
|
70
|
-
" repo: acme/plugins",
|
|
71
|
-
// A hand edit under the built-in's name: the built-in wins, the entry stays in the file.
|
|
72
|
-
" stigmer:",
|
|
73
|
-
" type: github",
|
|
74
|
-
" repo: someone/fork",
|
|
75
|
-
" pinned:",
|
|
76
|
-
" type: github",
|
|
77
|
-
" repo: anthropics/claude-code",
|
|
78
|
-
" ref: v1.2.3",
|
|
79
|
-
" team:",
|
|
80
|
-
" type: local",
|
|
81
|
-
" path: /srv/plugins",
|
|
82
|
-
" broken:",
|
|
83
|
-
" type: gitlab",
|
|
84
|
-
" repo: a/b",
|
|
85
|
-
" typeless:",
|
|
86
|
-
" repo: a/b",
|
|
87
|
-
"",
|
|
88
|
-
].join("\n"),
|
|
89
|
-
);
|
|
90
|
-
const listing = listMarketplaces();
|
|
91
|
-
expect(listing.known.map((m) => m.name)).toEqual([
|
|
92
|
-
...BUILT_IN_NAMES,
|
|
93
|
-
"acme",
|
|
94
|
-
"pinned",
|
|
95
|
-
"team",
|
|
96
|
-
]);
|
|
97
|
-
expect(listing.known[0]?.source).toEqual({ type: "official" });
|
|
98
|
-
expect(listing.known[1]?.source).toEqual({
|
|
99
|
-
type: "github",
|
|
100
|
-
repo: "acme/plugins",
|
|
101
|
-
});
|
|
102
|
-
expect(listing.known[2]?.source).toEqual({
|
|
103
|
-
type: "github",
|
|
104
|
-
repo: "anthropics/claude-code",
|
|
105
|
-
ref: "v1.2.3",
|
|
106
|
-
});
|
|
107
|
-
expect(listing.known[3]?.source).toEqual({
|
|
108
|
-
type: "local",
|
|
109
|
-
path: "/srv/plugins",
|
|
110
|
-
});
|
|
111
|
-
expect(listing.unreadable).toEqual([
|
|
112
|
-
{
|
|
113
|
-
name: "broken",
|
|
114
|
-
reason: "unknown type 'gitlab' (expected 'github' or 'local')",
|
|
115
|
-
},
|
|
116
|
-
{ name: "typeless", reason: "no 'type' (expected 'github' or 'local')" },
|
|
117
|
-
]);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
describe("addMarketplace and removeMarketplace", () => {
|
|
122
|
-
it("round-trips a github source and a local source through the file", () => {
|
|
123
|
-
addMarketplace("acme", {
|
|
124
|
-
type: "github",
|
|
125
|
-
repo: "acme/plugins",
|
|
126
|
-
});
|
|
127
|
-
addMarketplace("team", { type: "local", path: "/srv/plugins" });
|
|
128
|
-
const text = readFileSync(configPath(), "utf8");
|
|
129
|
-
expect(text).toContain("marketplaces:");
|
|
130
|
-
expect(text).toContain("type: github");
|
|
131
|
-
expect(text).toContain("repo: acme/plugins");
|
|
132
|
-
expect(text).not.toContain("ref:");
|
|
133
|
-
expect(text).toContain("path: /srv/plugins");
|
|
134
|
-
expect(listMarketplaces().known.map((m) => m.name)).toEqual([
|
|
135
|
-
...BUILT_IN_NAMES,
|
|
136
|
-
"acme",
|
|
137
|
-
"team",
|
|
138
|
-
]);
|
|
139
|
-
|
|
140
|
-
removeMarketplace("acme");
|
|
141
|
-
expect(listMarketplaces().known.map((m) => m.name)).toEqual([
|
|
142
|
-
...BUILT_IN_NAMES,
|
|
143
|
-
"team",
|
|
144
|
-
]);
|
|
145
|
-
removeMarketplace("team");
|
|
146
|
-
expect(load().marketplaces).toBeUndefined();
|
|
147
|
-
expect(readFileSync(configPath(), "utf8")).not.toContain("marketplaces");
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
it("keeps the rest of the config and an unreadable entry across a save", () => {
|
|
151
|
-
writeConfig(
|
|
152
|
-
"backend:\n type: cloud\nbackends:\n cloud:\n type: cloud\n token: t\ncurrent_backend: cloud\nmarketplaces:\n broken:\n type: gitlab\n",
|
|
153
|
-
);
|
|
154
|
-
addMarketplace("team", { type: "local", path: "/srv/plugins" });
|
|
155
|
-
const after = load();
|
|
156
|
-
expect(after.current_backend).toBe("cloud");
|
|
157
|
-
expect(after.backends?.["cloud"]?.token).toBe("t");
|
|
158
|
-
expect(after.marketplaces?.["broken"]).toEqual({ type: "gitlab" });
|
|
159
|
-
expect(after.marketplaces?.["team"]).toEqual({
|
|
160
|
-
type: "local",
|
|
161
|
-
path: "/srv/plugins",
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
it("refuses the built-in name, a duplicate, an unknown removal, and the built-in's removal; a vendor's name is free", () => {
|
|
166
|
-
expect(() =>
|
|
167
|
-
addMarketplace("stigmer", { type: "local", path: "/x" }),
|
|
168
|
-
).toThrow(/'stigmer' is a built-in source and cannot be added or replaced/);
|
|
169
|
-
addMarketplace("cursor-plugins", { type: "github", repo: "cursor/plugins" });
|
|
170
|
-
addMarketplace("team", { type: "local", path: "/srv/plugins" });
|
|
171
|
-
expect(() =>
|
|
172
|
-
addMarketplace("team", { type: "local", path: "/other" }),
|
|
173
|
-
).toThrow(/already configured/);
|
|
174
|
-
expect(() => removeMarketplace("nope")).toThrow(
|
|
175
|
-
/no marketplace named 'nope'/,
|
|
176
|
-
);
|
|
177
|
-
expect(() => removeMarketplace("stigmer")).toThrow(
|
|
178
|
-
/'stigmer' is a built-in source and cannot be removed/,
|
|
179
|
-
);
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
it("refuses under --standalone instead of writing a default file over the user's", () => {
|
|
183
|
-
writeConfig(
|
|
184
|
-
"backend:\n type: cloud\nbackends:\n cloud:\n type: cloud\n token: t\ncurrent_backend: cloud\n",
|
|
185
|
-
);
|
|
186
|
-
setStandalone(true);
|
|
187
|
-
expect(() => addMarketplace("team", { type: "local", path: "/x" })).toThrow(
|
|
188
|
-
/--standalone/,
|
|
189
|
-
);
|
|
190
|
-
expect(() => removeMarketplace("team")).toThrow(/--standalone/);
|
|
191
|
-
setStandalone(false);
|
|
192
|
-
expect(load().backends?.["cloud"]?.token).toBe("t");
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
describe("findMarketplace", () => {
|
|
197
|
-
it("finds the official and configured ones, returns undefined for an unknown name, and names an unreadable entry", () => {
|
|
198
|
-
writeConfig(
|
|
199
|
-
"backend:\n type: local\nmarketplaces:\n team:\n type: local\n path: /srv\n broken:\n type: gitlab\n",
|
|
200
|
-
);
|
|
201
|
-
expect(findMarketplace("stigmer")?.source).toEqual({ type: "official" });
|
|
202
|
-
expect(findMarketplace("team")?.source).toEqual({
|
|
203
|
-
type: "local",
|
|
204
|
-
path: "/srv",
|
|
205
|
-
});
|
|
206
|
-
expect(findMarketplace("nope")).toBeUndefined();
|
|
207
|
-
expect(() => findMarketplace("broken")).toThrow(
|
|
208
|
-
/configured but cannot be read: unknown type 'gitlab'/,
|
|
209
|
-
);
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
describe("narrowEntry, describeSource, isOwnerRepo", () => {
|
|
214
|
-
it("refuses a github entry without a repo and a local entry without a path", () => {
|
|
215
|
-
expect(narrowEntry({ type: "github" })).toEqual({
|
|
216
|
-
ok: false,
|
|
217
|
-
reason: "type 'github' needs 'repo: owner/repo'",
|
|
218
|
-
});
|
|
219
|
-
expect(narrowEntry({ type: "github", repo: "not-a-repo" })).toEqual({
|
|
220
|
-
ok: false,
|
|
221
|
-
reason: "type 'github' needs 'repo: owner/repo'",
|
|
222
|
-
});
|
|
223
|
-
expect(narrowEntry({ type: "github", repo: "a/b", ref: "" })).toEqual({
|
|
224
|
-
ok: false,
|
|
225
|
-
reason: "'ref' must be a non-empty branch, tag or commit",
|
|
226
|
-
});
|
|
227
|
-
expect(narrowEntry({ type: "local" })).toEqual({
|
|
228
|
-
ok: false,
|
|
229
|
-
reason: "type 'local' needs 'path: <directory>'",
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
it("describes each source in one phrase", () => {
|
|
234
|
-
expect(describeSource({ type: "official" })).toBe("built in");
|
|
235
|
-
expect(describeSource({ type: "github", repo: "cursor/plugins" })).toBe(
|
|
236
|
-
"github.com/cursor/plugins",
|
|
237
|
-
);
|
|
238
|
-
expect(
|
|
239
|
-
describeSource({ type: "github", repo: "cursor/plugins", ref: "main" }),
|
|
240
|
-
).toBe("github.com/cursor/plugins@main");
|
|
241
|
-
expect(describeSource({ type: "local", path: "/srv/plugins" })).toBe(
|
|
242
|
-
"/srv/plugins",
|
|
243
|
-
);
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
it("accepts owner/repo as GitHub spells it and nothing else", () => {
|
|
247
|
-
expect(isOwnerRepo("cursor/plugins")).toBe(true);
|
|
248
|
-
expect(isOwnerRepo("my-org/my.repo_1")).toBe(true);
|
|
249
|
-
expect(isOwnerRepo("cursor")).toBe(false);
|
|
250
|
-
expect(isOwnerRepo("a/b/c")).toBe(false);
|
|
251
|
-
expect(isOwnerRepo("../x")).toBe(false);
|
|
252
|
-
expect(isOwnerRepo("a/")).toBe(false);
|
|
253
|
-
});
|
|
254
|
-
});
|