@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,127 +0,0 @@
|
|
|
1
|
-
// Tests for the plaintext renderer: AI text to data, terse status lines to
|
|
2
|
-
// status, approvals auto-skipped, untracked event kinds silent.
|
|
3
|
-
|
|
4
|
-
import { describe, expect, it } from "vitest";
|
|
5
|
-
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
6
|
-
import type { StreamEvent, ToolCallInfo } from "./events.js";
|
|
7
|
-
import { PlaintextRenderer } from "./render-plaintext.js";
|
|
8
|
-
|
|
9
|
-
function toolInfo(overrides: Partial<ToolCallInfo> = {}): ToolCallInfo {
|
|
10
|
-
return { id: "t1", name: "read", status: "completed", result: "", error: "", durationMs: 0, ...overrides };
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function render(events: StreamEvent[]): { data: string; status: string } {
|
|
14
|
-
let data = "";
|
|
15
|
-
let status = "";
|
|
16
|
-
const r = new PlaintextRenderer({ data: { write: (s) => void (data += s) }, status: { write: (s) => void (status += s) } });
|
|
17
|
-
for (const e of events) r.render(e);
|
|
18
|
-
return { data, status };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
describe("PlaintextRenderer", () => {
|
|
22
|
-
it("streams AI text to data and finalizes on stream end", () => {
|
|
23
|
-
const { data } = render([
|
|
24
|
-
{ kind: "aiStreamDelta", content: "Hello", subAgentId: "" },
|
|
25
|
-
{ kind: "aiStreamDelta", content: " world", subAgentId: "" },
|
|
26
|
-
{ kind: "aiStreamEnd", content: "Hello world", subAgentId: "", toolCalls: [] },
|
|
27
|
-
]);
|
|
28
|
-
expect(data).toBe("Hello world\n");
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("writes tool success and failure lines to status", () => {
|
|
32
|
-
const { status } = render([
|
|
33
|
-
{ kind: "toolRunning", toolCallId: "t1", subAgentId: "", toolCall: toolInfo({ status: "running" }) },
|
|
34
|
-
{ kind: "toolCompleted", toolCallId: "t1", subAgentId: "", toolCall: toolInfo() },
|
|
35
|
-
{ kind: "toolCompleted", toolCallId: "t2", subAgentId: "", toolCall: toolInfo({ name: "shell", error: "exploded" }) },
|
|
36
|
-
]);
|
|
37
|
-
expect(status).toContain("⠋ read");
|
|
38
|
-
expect(status).toContain("✓ read");
|
|
39
|
-
expect(status).toContain("✗ shell: exploded");
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("titles shell status lines with the model-authored intent when present (stigmer#276)", () => {
|
|
43
|
-
const { status } = render([
|
|
44
|
-
{
|
|
45
|
-
kind: "toolRunning",
|
|
46
|
-
toolCallId: "t1",
|
|
47
|
-
subAgentId: "",
|
|
48
|
-
toolCall: toolInfo({
|
|
49
|
-
name: "execute",
|
|
50
|
-
status: "running",
|
|
51
|
-
args: { command: "npx vitest run src/parser", description: "Run unit tests for the parser" },
|
|
52
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
kind: "toolCompleted",
|
|
56
|
-
toolCallId: "t1",
|
|
57
|
-
subAgentId: "",
|
|
58
|
-
toolCall: toolInfo({
|
|
59
|
-
name: "execute",
|
|
60
|
-
args: { command: "npx vitest run src/parser", description: "Run unit tests for the parser" },
|
|
61
|
-
}),
|
|
62
|
-
},
|
|
63
|
-
]);
|
|
64
|
-
expect(status).toContain("⠋ Run unit tests for the parser");
|
|
65
|
-
expect(status).toContain("✓ Run unit tests for the parser");
|
|
66
|
-
expect(status).not.toContain("execute");
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("keeps the raw tool name when there is no intent, and never titles non-shell tools from description", () => {
|
|
70
|
-
const { status } = render([
|
|
71
|
-
{
|
|
72
|
-
kind: "toolCompleted",
|
|
73
|
-
toolCallId: "t1",
|
|
74
|
-
subAgentId: "",
|
|
75
|
-
toolCall: toolInfo({ name: "execute", args: { command: "ls" } }),
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
kind: "toolCompleted",
|
|
79
|
-
toolCallId: "t2",
|
|
80
|
-
subAgentId: "",
|
|
81
|
-
toolCall: toolInfo({
|
|
82
|
-
name: "task",
|
|
83
|
-
args: { description: "general-purpose research", prompt: "Find the docs" },
|
|
84
|
-
}),
|
|
85
|
-
},
|
|
86
|
-
]);
|
|
87
|
-
// A task tool's description is the sub-agent subject, never a row title.
|
|
88
|
-
expect(status).toContain("✓ execute");
|
|
89
|
-
expect(status).toContain("✓ task");
|
|
90
|
-
expect(status).not.toContain("general-purpose research");
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it("renders an interrupted tool with the neutral glyph, not a checkmark (issue #207)", () => {
|
|
94
|
-
const { status } = render([
|
|
95
|
-
{ kind: "toolInterrupted", toolCallId: "t1", subAgentId: "", toolCall: toolInfo({ name: "shell", status: "interrupted" }) },
|
|
96
|
-
]);
|
|
97
|
-
expect(status).toContain("⊘ shell (interrupted)");
|
|
98
|
-
expect(status).not.toContain("✓");
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it("notes the auto-skip for approvals and resolves to SKIP", () => {
|
|
102
|
-
const r = new PlaintextRenderer({ data: { write: () => {} }, status: { write: () => {} } });
|
|
103
|
-
const action = r.resolveApproval({
|
|
104
|
-
kind: "approvalNeeded", toolCallId: "t1", toolName: "delete", argsPreview: "", message: "", fromSubAgent: false, subAgentName: "",
|
|
105
|
-
});
|
|
106
|
-
expect(action).toBe(ApprovalAction.SKIP);
|
|
107
|
-
|
|
108
|
-
const { status } = render([
|
|
109
|
-
{ kind: "approvalNeeded", toolCallId: "t1", toolName: "delete", argsPreview: "", message: "", fromSubAgent: false, subAgentName: "" },
|
|
110
|
-
]);
|
|
111
|
-
expect(status).toContain("Approval needed: delete (auto-skipped in non-TTY mode)");
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
it("renders sub-agent and context-compaction lines, stays silent on phase/done", () => {
|
|
115
|
-
const { data, status } = render([
|
|
116
|
-
{ kind: "subAgentStarted", id: "s1", name: "researcher", description: "Explore code", input: "" },
|
|
117
|
-
{ kind: "subAgentCompleted", id: "s1", status: "SUB_AGENT_COMPLETED", toolCount: 2, output: "" },
|
|
118
|
-
{ kind: "contextCompacted", source: "graph_start", tokensBefore: 12000, tokensAfter: 6000, compressionRatio: 0.5, durationMs: 10, messagesBefore: 8, messagesAfter: 3 },
|
|
119
|
-
{ kind: "phaseChange", phase: "in_progress", previous: "pending" },
|
|
120
|
-
{ kind: "done", phase: "completed", error: "" },
|
|
121
|
-
]);
|
|
122
|
-
expect(status).toContain("↳ Sub-agent: Explore code");
|
|
123
|
-
expect(status).toContain("✓ Sub-agent completed: s1");
|
|
124
|
-
expect(status).toContain("Context compacted (12K → 6K tokens)");
|
|
125
|
-
expect(data).toBe("");
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
// Tests for the historical-replay projection (snapshotToEvents). Stored
|
|
2
|
-
// executions must yield the same event vocabulary as the live differ, with
|
|
3
|
-
// `done` emitted only for the final execution.
|
|
4
|
-
|
|
5
|
-
import { create } from "@bufbuild/protobuf";
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import {
|
|
8
|
-
AgentExecutionSchema,
|
|
9
|
-
AgentExecutionStatusSchema,
|
|
10
|
-
type AgentExecution,
|
|
11
|
-
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
12
|
-
import { AgentExecutionSpecSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/spec_pb";
|
|
13
|
-
import {
|
|
14
|
-
AgentMessageSchema,
|
|
15
|
-
ToolCallSchema,
|
|
16
|
-
type AgentMessage,
|
|
17
|
-
type ToolCall,
|
|
18
|
-
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
19
|
-
import {
|
|
20
|
-
ExecutionPhase,
|
|
21
|
-
MessageType,
|
|
22
|
-
ToolCallStatus,
|
|
23
|
-
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
24
|
-
import type { StreamEvent } from "./events.js";
|
|
25
|
-
import { snapshotToEvents } from "./snapshot.js";
|
|
26
|
-
|
|
27
|
-
function exec(opts: {
|
|
28
|
-
message?: string;
|
|
29
|
-
phase?: ExecutionPhase;
|
|
30
|
-
messages?: AgentMessage[];
|
|
31
|
-
error?: string;
|
|
32
|
-
}): AgentExecution {
|
|
33
|
-
return create(AgentExecutionSchema, {
|
|
34
|
-
spec: create(AgentExecutionSpecSchema, { message: opts.message ?? "" }),
|
|
35
|
-
status: create(AgentExecutionStatusSchema, {
|
|
36
|
-
phase: opts.phase ?? ExecutionPhase.EXECUTION_COMPLETED,
|
|
37
|
-
messages: opts.messages ?? [],
|
|
38
|
-
error: opts.error ?? "",
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function aiMsg(content: string): AgentMessage {
|
|
44
|
-
return create(AgentMessageSchema, { type: MessageType.MESSAGE_AI, content });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function systemMsg(content: string): AgentMessage {
|
|
48
|
-
return create(AgentMessageSchema, { type: MessageType.MESSAGE_SYSTEM, content });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function toolMsg(tc: ToolCall): AgentMessage {
|
|
52
|
-
return create(AgentMessageSchema, { type: MessageType.MESSAGE_TOOL, toolCalls: [tc], timestamp: "t1" });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function tool(id: string, status: ToolCallStatus): ToolCall {
|
|
56
|
-
return create(ToolCallSchema, { id, name: "read", status, startedAt: "t0" });
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const kinds = (events: StreamEvent[]): string[] => events.map((e) => e.kind);
|
|
60
|
-
|
|
61
|
-
describe("snapshotToEvents", () => {
|
|
62
|
-
it("emits the human prompt, AI text, and a terminal done for the last execution", () => {
|
|
63
|
-
const events = snapshotToEvents([exec({ message: "do it", messages: [aiMsg("done")] })]);
|
|
64
|
-
expect(kinds(events)).toEqual(["humanMessage", "aiMessage", "done"]);
|
|
65
|
-
expect(events[0]).toMatchObject({ kind: "humanMessage", content: "do it" });
|
|
66
|
-
expect(events[2]).toMatchObject({ kind: "done", phase: "completed" });
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("suppresses the 'execute' placeholder prompt", () => {
|
|
70
|
-
const events = snapshotToEvents([exec({ message: "execute", messages: [aiMsg("hi")] })]);
|
|
71
|
-
expect(kinds(events)).toEqual(["aiMessage", "done"]);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("promotes a MESSAGE_TOOL into a stateful tool event by status", () => {
|
|
75
|
-
const events = snapshotToEvents([
|
|
76
|
-
exec({ messages: [toolMsg(tool("tc1", ToolCallStatus.TOOL_CALL_COMPLETED))] }),
|
|
77
|
-
]);
|
|
78
|
-
expect(kinds(events)).toEqual(["toolCompleted", "done"]);
|
|
79
|
-
expect(events[0]).toMatchObject({ kind: "toolCompleted", toolCallId: "tc1" });
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("replays a platform-interrupted call as toolInterrupted — never a live running block", () => {
|
|
83
|
-
// Issue #207: before the fix an INTERRUPTED status fell through to
|
|
84
|
-
// "unknown" (non-terminal) and replayed as toolRunning, a block that never
|
|
85
|
-
// closes. It must replay as its own settled event.
|
|
86
|
-
const events = snapshotToEvents([
|
|
87
|
-
exec({
|
|
88
|
-
phase: ExecutionPhase.EXECUTION_CANCELLED,
|
|
89
|
-
messages: [toolMsg(tool("tc1", ToolCallStatus.TOOL_CALL_INTERRUPTED))],
|
|
90
|
-
}),
|
|
91
|
-
]);
|
|
92
|
-
expect(kinds(events)).toEqual(["toolInterrupted", "done"]);
|
|
93
|
-
expect(events[0]).toMatchObject({ kind: "toolInterrupted", toolCallId: "tc1" });
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it("only the final execution emits done", () => {
|
|
97
|
-
const events = snapshotToEvents([
|
|
98
|
-
exec({ message: "first", messages: [aiMsg("a")] }),
|
|
99
|
-
exec({ message: "second", messages: [aiMsg("b")] }),
|
|
100
|
-
]);
|
|
101
|
-
expect(kinds(events)).toEqual(["humanMessage", "aiMessage", "humanMessage", "aiMessage", "done"]);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it("carries the failure phase + error into done", () => {
|
|
105
|
-
const events = snapshotToEvents([
|
|
106
|
-
exec({ phase: ExecutionPhase.EXECUTION_FAILED, error: "boom", messages: [systemMsg("context")] }),
|
|
107
|
-
]);
|
|
108
|
-
const done = events.at(-1);
|
|
109
|
-
expect(done).toMatchObject({ kind: "done", phase: "failed", error: "boom" });
|
|
110
|
-
});
|
|
111
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// Tests for approval-submit resilience: retry classification, backoff loop,
|
|
2
|
-
// and stream-error message parity with Go.
|
|
3
|
-
|
|
4
|
-
import { describe, expect, it } from "vitest";
|
|
5
|
-
import { Code, ConnectError } from "@connectrpc/connect";
|
|
6
|
-
import { classifyStreamError, isRetryableSubmitError, retryWithBackoff } from "./submit.js";
|
|
7
|
-
|
|
8
|
-
const never = new AbortController().signal;
|
|
9
|
-
|
|
10
|
-
describe("isRetryableSubmitError", () => {
|
|
11
|
-
it("retries transient gRPC codes", () => {
|
|
12
|
-
for (const code of [Code.Unavailable, Code.DeadlineExceeded, Code.ResourceExhausted, Code.Aborted, Code.Internal, Code.Unknown]) {
|
|
13
|
-
expect(isRetryableSubmitError(new ConnectError("x", code))).toBe(true);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("retries FailedPrecondition only for 'no pending approvals'", () => {
|
|
18
|
-
expect(isRetryableSubmitError(new ConnectError("no pending approvals yet", Code.FailedPrecondition))).toBe(true);
|
|
19
|
-
expect(isRetryableSubmitError(new ConnectError("something else", Code.FailedPrecondition))).toBe(false);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it("does not retry permanent codes, but retries non-RPC errors", () => {
|
|
23
|
-
expect(isRetryableSubmitError(new ConnectError("nope", Code.NotFound))).toBe(false);
|
|
24
|
-
expect(isRetryableSubmitError(new ConnectError("nope", Code.InvalidArgument))).toBe(false);
|
|
25
|
-
expect(isRetryableSubmitError(new Error("socket hang up"))).toBe(true);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe("retryWithBackoff", () => {
|
|
30
|
-
it("retries a retryable failure then succeeds", async () => {
|
|
31
|
-
let calls = 0;
|
|
32
|
-
await retryWithBackoff(never, 3, 1, async () => {
|
|
33
|
-
calls++;
|
|
34
|
-
if (calls < 3) throw new ConnectError("lost", Code.Unavailable);
|
|
35
|
-
});
|
|
36
|
-
expect(calls).toBe(3);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("stops immediately on a non-retryable failure", async () => {
|
|
40
|
-
let calls = 0;
|
|
41
|
-
await expect(
|
|
42
|
-
retryWithBackoff(never, 3, 1, async () => {
|
|
43
|
-
calls++;
|
|
44
|
-
throw new ConnectError("bad", Code.InvalidArgument);
|
|
45
|
-
}),
|
|
46
|
-
).rejects.toBeInstanceOf(ConnectError);
|
|
47
|
-
expect(calls).toBe(1);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it("gives up after maxAttempts and throws the last error", async () => {
|
|
51
|
-
let calls = 0;
|
|
52
|
-
await expect(
|
|
53
|
-
retryWithBackoff(never, 2, 1, async () => {
|
|
54
|
-
calls++;
|
|
55
|
-
throw new ConnectError("still down", Code.Unavailable);
|
|
56
|
-
}),
|
|
57
|
-
).rejects.toBeInstanceOf(ConnectError);
|
|
58
|
-
expect(calls).toBe(2);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
describe("classifyStreamError", () => {
|
|
63
|
-
it("maps known codes and appends a resume hint", () => {
|
|
64
|
-
const msg = classifyStreamError(new ConnectError("x", Code.Unavailable), "ses_1");
|
|
65
|
-
expect(msg).toContain("Connection to server lost.");
|
|
66
|
-
expect(msg).toContain("stigmer resume ses_1");
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("omits the resume hint when there is no session", () => {
|
|
70
|
-
const msg = classifyStreamError(new ConnectError("x", Code.DeadlineExceeded), "");
|
|
71
|
-
expect(msg).toBe("Server response timed out.");
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it("falls back for non-RPC errors", () => {
|
|
75
|
-
expect(classifyStreamError(new Error("boom"), "")).toBe("Unexpected stream error: boom");
|
|
76
|
-
});
|
|
77
|
-
});
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { create } from "@bufbuild/protobuf";
|
|
2
|
-
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
3
|
-
import {
|
|
4
|
-
ApprovalRequestedPayloadSchema,
|
|
5
|
-
ApprovalResolvedPayloadSchema,
|
|
6
|
-
BudgetCheckpointPayloadSchema,
|
|
7
|
-
ExecutionFailedPayloadSchema,
|
|
8
|
-
TaskFailedPayloadSchema,
|
|
9
|
-
TaskRetryingPayloadSchema,
|
|
10
|
-
WorkflowExecutionEventSchema,
|
|
11
|
-
WorkflowEventType,
|
|
12
|
-
} from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/event_pb";
|
|
13
|
-
import { describe, expect, it } from "vitest";
|
|
14
|
-
import { toWorkflowEventView, workflowEventTypeName } from "./workflow-event-view.js";
|
|
15
|
-
|
|
16
|
-
describe("workflowEventTypeName", () => {
|
|
17
|
-
it("returns the canonical proto name for the type", () => {
|
|
18
|
-
expect(workflowEventTypeName(WorkflowEventType.execution_started)).toBe("execution_started");
|
|
19
|
-
expect(workflowEventTypeName(WorkflowEventType.approval_requested)).toBe("approval_requested");
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
describe("toWorkflowEventView", () => {
|
|
24
|
-
it("formats the HH:MM:SS slice of occurred_at", () => {
|
|
25
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
26
|
-
eventType: WorkflowEventType.execution_started,
|
|
27
|
-
occurredAt: "2026-06-12T13:45:09.123Z",
|
|
28
|
-
payload: { case: "executionStarted", value: {} as never },
|
|
29
|
-
});
|
|
30
|
-
expect(toWorkflowEventView(event).time).toBe("13:45:09");
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it("falls back to dashes when occurred_at is empty", () => {
|
|
34
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
35
|
-
eventType: WorkflowEventType.execution_started,
|
|
36
|
-
payload: { case: "executionStarted", value: {} as never },
|
|
37
|
-
});
|
|
38
|
-
expect(toWorkflowEventView(event).time).toBe("--------");
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it("marks execution_completed/failed/cancelled/terminated as terminal", () => {
|
|
42
|
-
for (const c of ["executionCompleted", "executionCancelled", "executionTerminated"] as const) {
|
|
43
|
-
const event = create(WorkflowExecutionEventSchema, { payload: { case: c, value: {} as never } });
|
|
44
|
-
expect(toWorkflowEventView(event).terminal).toBe(true);
|
|
45
|
-
}
|
|
46
|
-
const failed = create(WorkflowExecutionEventSchema, {
|
|
47
|
-
payload: { case: "executionFailed", value: create(ExecutionFailedPayloadSchema, { error: "boom" }) },
|
|
48
|
-
});
|
|
49
|
-
const view = toWorkflowEventView(failed);
|
|
50
|
-
expect(view.terminal).toBe(true);
|
|
51
|
-
expect(view.tone).toBe("error");
|
|
52
|
-
expect(view.text).toBe("execution failed: boom");
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("does not mark task/lifecycle non-terminal events as terminal", () => {
|
|
56
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
57
|
-
taskName: "validate",
|
|
58
|
-
payload: { case: "taskStarted", value: {} as never },
|
|
59
|
-
});
|
|
60
|
-
const view = toWorkflowEventView(event);
|
|
61
|
-
expect(view.terminal).toBe(false);
|
|
62
|
-
expect(view.text).toBe("task started: validate");
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("extracts the error and task name for task_failed", () => {
|
|
66
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
67
|
-
taskName: "send",
|
|
68
|
-
payload: { case: "taskFailed", value: create(TaskFailedPayloadSchema, { error: "timeout" }) },
|
|
69
|
-
});
|
|
70
|
-
expect(toWorkflowEventView(event).text).toBe("task failed: send — timeout");
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it("includes the next attempt for task_retrying", () => {
|
|
74
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
75
|
-
taskName: "send",
|
|
76
|
-
payload: { case: "taskRetrying", value: create(TaskRetryingPayloadSchema, { nextAttempt: 3 }) },
|
|
77
|
-
});
|
|
78
|
-
expect(toWorkflowEventView(event).text).toBe("task retrying: send (attempt 3)");
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it("renders the prompt for approval_requested", () => {
|
|
82
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
83
|
-
taskName: "review",
|
|
84
|
-
payload: { case: "approvalRequested", value: create(ApprovalRequestedPayloadSchema, { prompt: "ok?" }) },
|
|
85
|
-
});
|
|
86
|
-
expect(toWorkflowEventView(event).text).toBe("approval requested: review — ok?");
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it("renders the action and resolver for approval_resolved", () => {
|
|
90
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
91
|
-
taskName: "review",
|
|
92
|
-
payload: {
|
|
93
|
-
case: "approvalResolved",
|
|
94
|
-
value: create(ApprovalResolvedPayloadSchema, { action: ApprovalAction.APPROVE, resolvedBy: "alice" }),
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
expect(toWorkflowEventView(event).text).toBe("approval resolved: review — approve by alice");
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it("converts micros to a dollar amount for budget_checkpoint", () => {
|
|
101
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
102
|
-
payload: { case: "budgetCheckpoint", value: create(BudgetCheckpointPayloadSchema, { costConsumedMicros: 1_234_500n }) },
|
|
103
|
-
});
|
|
104
|
-
expect(toWorkflowEventView(event).text).toBe("budget: $1.2345 spent");
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it("falls back to a generic line for events without a dedicated view", () => {
|
|
108
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
109
|
-
eventType: WorkflowEventType.signal_received,
|
|
110
|
-
payload: { case: "signalReceived", value: {} as never },
|
|
111
|
-
});
|
|
112
|
-
const view = toWorkflowEventView(event);
|
|
113
|
-
expect(view.glyph).toBe("");
|
|
114
|
-
expect(view.text).toBe("event: signal_received");
|
|
115
|
-
});
|
|
116
|
-
});
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { create } from "@bufbuild/protobuf";
|
|
2
|
-
import {
|
|
3
|
-
ApprovalRequestedPayloadSchema,
|
|
4
|
-
ExecutionFailedPayloadSchema,
|
|
5
|
-
WorkflowExecutionEventSchema,
|
|
6
|
-
WorkflowEventType,
|
|
7
|
-
} from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/event_pb";
|
|
8
|
-
import { describe, expect, it } from "vitest";
|
|
9
|
-
import { renderWorkflowEventPlaintext } from "./workflow-render-plaintext.js";
|
|
10
|
-
import { workflowEventToNdjson } from "./workflow-render-ndjson.js";
|
|
11
|
-
|
|
12
|
-
function collect(): { sink: { write(line: string): void }; lines: string[] } {
|
|
13
|
-
const lines: string[] = [];
|
|
14
|
-
return { sink: { write: (line) => lines.push(line) }, lines };
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
describe("renderWorkflowEventPlaintext", () => {
|
|
18
|
-
it("renders a single uncolored line with timestamp, glyph, and text", () => {
|
|
19
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
20
|
-
eventType: WorkflowEventType.task_started,
|
|
21
|
-
occurredAt: "2026-06-12T13:45:09Z",
|
|
22
|
-
taskName: "validate",
|
|
23
|
-
payload: { case: "taskStarted", value: {} as never },
|
|
24
|
-
});
|
|
25
|
-
const { sink, lines } = collect();
|
|
26
|
-
renderWorkflowEventPlaintext(event, sink, false);
|
|
27
|
-
expect(lines).toEqual(["[13:45:09] → task started: validate\n"]);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("pads the glyph column for the generic fallback line", () => {
|
|
31
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
32
|
-
eventType: WorkflowEventType.signal_received,
|
|
33
|
-
occurredAt: "2026-06-12T13:45:09Z",
|
|
34
|
-
payload: { case: "signalReceived", value: {} as never },
|
|
35
|
-
});
|
|
36
|
-
const { sink, lines } = collect();
|
|
37
|
-
renderWorkflowEventPlaintext(event, sink, false);
|
|
38
|
-
expect(lines).toEqual(["[13:45:09] event: signal_received\n"]);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
describe("workflowEventToNdjson", () => {
|
|
43
|
-
it("uses the canonical event type as `type` and carries the occurred_at ts", () => {
|
|
44
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
45
|
-
eventType: WorkflowEventType.execution_started,
|
|
46
|
-
occurredAt: "2026-06-12T13:45:09Z",
|
|
47
|
-
sequenceNumber: 1n,
|
|
48
|
-
payload: { case: "executionStarted", value: {} as never },
|
|
49
|
-
});
|
|
50
|
-
const env = workflowEventToNdjson(event);
|
|
51
|
-
expect(env.type).toBe("execution_started");
|
|
52
|
-
expect(env.ts).toBe("2026-06-12T13:45:09Z");
|
|
53
|
-
expect(env.payload).toEqual({ sequence: 1 });
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("surfaces salient fields and strips empty ones", () => {
|
|
57
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
58
|
-
eventType: WorkflowEventType.execution_failed,
|
|
59
|
-
occurredAt: "2026-06-12T13:45:10Z",
|
|
60
|
-
sequenceNumber: 7n,
|
|
61
|
-
payload: { case: "executionFailed", value: create(ExecutionFailedPayloadSchema, { error: "boom" }) },
|
|
62
|
-
});
|
|
63
|
-
const env = workflowEventToNdjson(event);
|
|
64
|
-
expect(env.payload).toEqual({ sequence: 7, error: "boom" });
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it("includes the tool call id on approval_requested (drives interactive approval)", () => {
|
|
68
|
-
const event = create(WorkflowExecutionEventSchema, {
|
|
69
|
-
eventType: WorkflowEventType.approval_requested,
|
|
70
|
-
occurredAt: "2026-06-12T13:45:11Z",
|
|
71
|
-
sequenceNumber: 9n,
|
|
72
|
-
taskName: "review",
|
|
73
|
-
payload: {
|
|
74
|
-
case: "approvalRequested",
|
|
75
|
-
value: create(ApprovalRequestedPayloadSchema, { prompt: "ok?", toolCallId: "tc_1" }),
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
const env = workflowEventToNdjson(event);
|
|
79
|
-
expect(env.payload).toMatchObject({ task: "review", prompt: "ok?", toolCallId: "tc_1" });
|
|
80
|
-
});
|
|
81
|
-
});
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { fromJson, type JsonValue } from "@bufbuild/protobuf";
|
|
2
|
-
import { type Workflow, WorkflowSchema } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
|
|
3
|
-
import {
|
|
4
|
-
WorkflowTaskKind,
|
|
5
|
-
WorkflowTaskKindSchema,
|
|
6
|
-
} from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/enum_pb";
|
|
7
|
-
import { describe, expect, it } from "vitest";
|
|
8
|
-
import { decodeWorkflowTaskConfigs, TASK_CONFIG_SCHEMAS } from "./task-configs.js";
|
|
9
|
-
|
|
10
|
-
function makeWorkflow(tasks: JsonValue): Workflow {
|
|
11
|
-
return fromJson(WorkflowSchema, {
|
|
12
|
-
apiVersion: "agentic.stigmer.ai/v1",
|
|
13
|
-
kind: "Workflow",
|
|
14
|
-
metadata: { name: "decode-test", org: "acme" },
|
|
15
|
-
spec: {
|
|
16
|
-
description: "task-config decode fixture",
|
|
17
|
-
document: { dsl: "1.0.0", namespace: "acme", name: "decode-test", version: "1.0.0" },
|
|
18
|
-
tasks,
|
|
19
|
-
},
|
|
20
|
-
}) as Workflow;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
describe("TASK_CONFIG_SCHEMAS", () => {
|
|
24
|
-
// The stigmer/stigmer#353 drift class: hold the map and the proto enum to
|
|
25
|
-
// strict bidirectional equality, so a new task kind cannot ship without a
|
|
26
|
-
// CLI schema binding and a retired kind cannot linger in the map. The
|
|
27
|
-
// server-side twin of this promise is unmarshalTaskConfig's kind switch.
|
|
28
|
-
it("covers every WorkflowTaskKind exactly (bidirectional)", () => {
|
|
29
|
-
const declaredKinds = WorkflowTaskKindSchema.values
|
|
30
|
-
.map((v) => v.number as WorkflowTaskKind)
|
|
31
|
-
.filter((n) => n !== WorkflowTaskKind.workflow_task_kind_unspecified)
|
|
32
|
-
.sort((a, b) => a - b);
|
|
33
|
-
const mappedKinds = [...TASK_CONFIG_SCHEMAS.keys()].sort((a, b) => a - b);
|
|
34
|
-
expect(mappedKinds).toEqual(declaredKinds);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
describe("decodeWorkflowTaskConfigs", () => {
|
|
39
|
-
it("rejects the string duration form a real apply rejects (the #778 repro)", () => {
|
|
40
|
-
const workflow = makeWorkflow([
|
|
41
|
-
{ name: "conditional_wait", kind: "wait", task_config: { duration: "5s" } },
|
|
42
|
-
]);
|
|
43
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).toThrow(
|
|
44
|
-
/task 'conditional_wait' \(wait\): invalid task_config/,
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it("accepts the typed duration object", () => {
|
|
49
|
-
const workflow = makeWorkflow([
|
|
50
|
-
{ name: "cooldown", kind: "wait", task_config: { duration: { seconds: 5 } } },
|
|
51
|
-
]);
|
|
52
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).not.toThrow();
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("rejects unknown task_config fields, mirroring the server's strict decode", () => {
|
|
56
|
-
const workflow = makeWorkflow([
|
|
57
|
-
{
|
|
58
|
-
name: "gate",
|
|
59
|
-
kind: "human_input",
|
|
60
|
-
task_config: { prompt: "Approve?", escalation_task: "somewhere" },
|
|
61
|
-
},
|
|
62
|
-
]);
|
|
63
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).toThrow(/gate.*human_input.*task_config/);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("rejects values outside an enum's membership", () => {
|
|
67
|
-
const workflow = makeWorkflow([
|
|
68
|
-
{
|
|
69
|
-
name: "gate",
|
|
70
|
-
kind: "human_input",
|
|
71
|
-
task_config: { prompt: "Approve?", timeout: 60, on_timeout: "sometimes" },
|
|
72
|
-
},
|
|
73
|
-
]);
|
|
74
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).toThrow(/gate.*invalid task_config/);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it("accepts the agent_call DSL shorthands a real apply accepts (never stricter)", () => {
|
|
78
|
-
const workflow = makeWorkflow([
|
|
79
|
-
{
|
|
80
|
-
name: "review",
|
|
81
|
-
kind: "agent_call",
|
|
82
|
-
task_config: {
|
|
83
|
-
agent: "acme/code-reviewer",
|
|
84
|
-
message: "Review ${ $context.pr.diff }",
|
|
85
|
-
harness: "cursor",
|
|
86
|
-
run_config: { model_name: "composer-2.5", service_tier: "fast" },
|
|
87
|
-
environment_refs: [{ slug: "shared-secrets" }],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
]);
|
|
91
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).not.toThrow();
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
it("skips tasks without a task_config (protovalidate territory, not decode truth)", () => {
|
|
95
|
-
const workflow = makeWorkflow([{ name: "bare", kind: "set_vars" }]);
|
|
96
|
-
expect(() => decodeWorkflowTaskConfigs(workflow)).not.toThrow();
|
|
97
|
-
});
|
|
98
|
-
});
|