@bastani/atomic 0.9.13-alpha.2 → 0.9.13-alpha.3
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/builtin/i-have-adhd/package.json +1 -1
- package/dist/builtin/intercom/CHANGELOG.md +14 -0
- package/dist/builtin/intercom/README.md +12 -12
- package/dist/builtin/intercom/incoming-message-delivery.ts +1 -1
- package/dist/builtin/intercom/index.ts +1 -1
- package/dist/builtin/intercom/intercom-tool.ts +1 -1
- package/dist/builtin/intercom/intercom-utils.ts +3 -6
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/result-renderers.ts +1 -1
- package/dist/builtin/intercom/session-target.ts +1 -15
- package/dist/builtin/intercom/skills/intercom/SKILL.md +6 -6
- package/dist/builtin/intercom/terminal-ordering-barrier.ts +2 -2
- package/dist/builtin/intercom/ui/inline-message.ts +7 -5
- package/dist/builtin/intercom/ui/session-list.ts +23 -10
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +19 -0
- package/dist/builtin/subagents/README.md +29 -73
- package/dist/builtin/subagents/package.json +2 -2
- package/dist/builtin/subagents/prompts/parallel-cleanup.md +1 -1
- package/dist/builtin/subagents/prompts/parallel-review.md +1 -1
- package/dist/builtin/subagents/prompts/review-loop.md +2 -2
- package/dist/builtin/subagents/skills/subagent/SKILL.md +23 -59
- package/dist/builtin/subagents/skills/tmux/SKILL.md +1 -1
- package/dist/builtin/subagents/src/extension/control-notices.ts +2 -3
- package/dist/builtin/subagents/src/extension/doctor.ts +2 -14
- package/dist/builtin/subagents/src/extension/fanout-child.ts +1 -17
- package/dist/builtin/subagents/src/extension/index.ts +9 -70
- package/dist/builtin/subagents/src/extension/notification-content.ts +1 -1
- package/dist/builtin/subagents/src/extension/prompt-guidance.ts +2 -2
- package/dist/builtin/subagents/src/extension/schemas.ts +2 -8
- package/dist/builtin/subagents/src/extension/tool-description.ts +2 -3
- package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +1 -1
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +5 -46
- package/dist/builtin/subagents/src/runs/{background → foreground}/completion-notification.ts +2 -2
- package/dist/builtin/subagents/src/runs/foreground/inprocess-run-sync.ts +25 -88
- package/dist/builtin/subagents/src/runs/{background → foreground}/notify.ts +5 -5
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +11 -28
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +3 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +2 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-runtime.ts +0 -5
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +30 -20
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +4 -4
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +0 -13
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +104 -48
- package/dist/builtin/subagents/src/runs/inprocess/index.ts +1 -1
- package/dist/builtin/subagents/src/runs/inprocess/runner.ts +5 -5
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-api.ts +0 -7
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-core.ts +0 -10
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-projection.ts +3 -108
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-sanitize.ts +0 -4
- package/dist/builtin/subagents/src/runs/shared/subagent-control.ts +1 -1
- package/dist/builtin/subagents/src/shared/formatters.ts +3 -5
- package/dist/builtin/subagents/src/shared/model-resolution.ts +78 -0
- package/dist/builtin/subagents/src/shared/status-format.ts +4 -11
- package/dist/builtin/subagents/src/shared/types-config.ts +10 -9
- package/dist/builtin/subagents/src/shared/types-nested.ts +127 -0
- package/dist/builtin/subagents/src/shared/types-results.ts +2 -8
- package/dist/builtin/subagents/src/shared/types-runtime.ts +0 -9
- package/dist/builtin/subagents/src/shared/types.ts +1 -1
- package/dist/builtin/subagents/src/shared/utils.ts +1 -109
- package/dist/builtin/subagents/src/slash/slash-commands.ts +7 -17
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -252
- package/dist/builtin/subagents/src/tui/render-layout.ts +4 -4
- package/dist/builtin/subagents/src/tui/render-result.ts +0 -9
- package/dist/builtin/subagents/src/tui/render-stable-output.ts +1 -34
- package/dist/builtin/subagents/src/tui/render.ts +0 -2
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/README.md +3 -3
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/durable/backend.ts +11 -0
- package/dist/builtin/workflows/src/durable/completed-catalog-stage-groups.ts +63 -25
- package/dist/builtin/workflows/src/durable/completed-catalog.ts +166 -25
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +42 -24
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +2 -1
- package/dist/builtin/workflows/src/durable/run-timing.ts +28 -7
- package/dist/builtin/workflows/src/durable/scoped-backend.ts +4 -0
- package/dist/builtin/workflows/src/durable/targeted-inspection.ts +110 -0
- package/dist/builtin/workflows/src/engine/run-durable-stage-session.ts +2 -2
- package/dist/builtin/workflows/src/engine/runtime.ts +19 -2
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +3 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +680 -152
- package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +6 -0
- package/dist/builtin/workflows/src/extension/ui-surface.ts +2 -0
- package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +6 -1
- package/dist/builtin/workflows/src/extension/workflow-targets.ts +18 -10
- package/dist/builtin/workflows/src/extension/workflow-tool-inspection.ts +31 -16
- package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +75 -3
- package/dist/builtin/workflows/src/extension/workflow-tool.ts +53 -6
- package/dist/builtin/workflows/src/runs/background/run-inspect.ts +5 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +94 -60
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-context.ts +1 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +7 -7
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +25 -4
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-types.ts +4 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +2 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +142 -4
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +2 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-session-heartbeat.ts +88 -0
- package/dist/builtin/workflows/src/tui/run-detail.ts +25 -12
- package/dist/builtin/workflows/src/tui/workflow-resume-selector.ts +1 -0
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +16 -5
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-export.d.ts.map +1 -1
- package/dist/core/agent-session-export.js +2 -1
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +8 -4
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +5 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-summary.d.ts +21 -0
- package/dist/core/agent-session-summary.d.ts.map +1 -0
- package/dist/core/agent-session-summary.js +156 -0
- package/dist/core/agent-session-summary.js.map +1 -0
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +0 -4
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-transfer.d.ts.map +1 -1
- package/dist/core/agent-session-transfer.js +0 -2
- package/dist/core/agent-session-transfer.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +6 -0
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session.d.ts +7 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +8 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.js +2 -2
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/session-summarization.d.ts +41 -0
- package/dist/core/compaction/session-summarization.d.ts.map +1 -0
- package/dist/core/compaction/session-summarization.js +97 -0
- package/dist/core/compaction/session-summarization.js.map +1 -0
- package/dist/core/extensions/ui-types.d.ts +2 -0
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +3 -1
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +9 -1
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +24 -1
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +48 -0
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +10 -0
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +10 -1
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +3 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +5 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +4 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/bash.d.ts +0 -15
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -81
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/fetch-url.d.ts +12 -0
- package/dist/core/tools/fetch-url.d.ts.map +1 -1
- package/dist/core/tools/fetch-url.js +76 -10
- package/dist/core/tools/fetch-url.js.map +1 -1
- package/dist/core/tools/index.js +4 -4
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/session-temp-dir.d.ts +2 -2
- package/dist/core/tools/session-temp-dir.d.ts.map +1 -1
- package/dist/core/tools/session-temp-dir.js +6 -7
- package/dist/core/tools/session-temp-dir.js.map +1 -1
- package/dist/core/usage-totals.js +1 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/host-session-picker.d.ts.map +1 -1
- package/dist/modes/interactive/components/host-session-picker.js +1 -0
- package/dist/modes/interactive/components/host-session-picker.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.js +29 -4
- package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.js +6 -0
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +4 -1
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/docs/environment-variables.md +1 -1
- package/docs/intercom.md +20 -21
- package/docs/quickstart.md +5 -1
- package/docs/sdk.md +1 -1
- package/docs/session-format.md +15 -0
- package/docs/sessions.md +8 -0
- package/docs/settings.md +6 -0
- package/docs/subagents.md +19 -31
- package/docs/tools.md +3 -5
- package/docs/usage.md +1 -1
- package/docs/windows.md +1 -1
- package/docs/workflows.md +60 -32
- package/npm-shrinkwrap.json +29 -29
- package/package.json +2 -2
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +0 -331
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +0 -161
- package/dist/builtin/subagents/src/runs/inprocess/background-single.ts +0 -195
- package/dist/builtin/subagents/src/runs/inprocess/background.ts +0 -90
- package/dist/builtin/subagents/src/shared/types-async.ts +0 -247
- package/dist/builtin/subagents/src/tui/render-widget-graph.ts +0 -217
- package/dist/builtin/subagents/src/tui/render-widget.ts +0 -366
- package/dist/core/async/format.d.ts +0 -3
- package/dist/core/async/format.d.ts.map +0 -1
- package/dist/core/async/format.js +0 -52
- package/dist/core/async/format.js.map +0 -1
- package/dist/core/async/job-manager.d.ts +0 -40
- package/dist/core/async/job-manager.d.ts.map +0 -1
- package/dist/core/async/job-manager.js +0 -293
- package/dist/core/async/job-manager.js.map +0 -1
- package/dist/core/async/session-manager.d.ts +0 -16
- package/dist/core/async/session-manager.d.ts.map +0 -1
- package/dist/core/async/session-manager.js +0 -34
- package/dist/core/async/session-manager.js.map +0 -1
- package/dist/core/async/types.d.ts +0 -23
- package/dist/core/async/types.d.ts.map +0 -1
- package/dist/core/async/types.js +0 -2
- package/dist/core/async/types.js.map +0 -1
- package/dist/core/tools/bash-async-execution.d.ts +0 -27
- package/dist/core/tools/bash-async-execution.d.ts.map +0 -1
- package/dist/core/tools/bash-async-execution.js +0 -81
- package/dist/core/tools/bash-async-execution.js.map +0 -1
- package/dist/core/tools/bash-async-jobs.d.ts +0 -30
- package/dist/core/tools/bash-async-jobs.d.ts.map +0 -1
- package/dist/core/tools/bash-async-jobs.js +0 -87
- package/dist/core/tools/bash-async-jobs.js.map +0 -1
- package/dist/core/tools/bash-async-output.d.ts +0 -13
- package/dist/core/tools/bash-async-output.d.ts.map +0 -1
- package/dist/core/tools/bash-async-output.js +0 -122
- package/dist/core/tools/bash-async-output.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-types.js","sourceRoot":"","sources":["../../src/core/settings-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Transport } from \"@earendil-works/pi-ai/compat\";\nimport type { ScrollViewScrollbar } from \"@earendil-works/pi-tui\";\n\nexport interface CompactionSettings {\n\tenabled?: boolean; // default: true\n\treserveTokens?: number; // default: 16384\n\tcompression_ratio?: number; // default: 0.5 (fraction of compactable context to keep)\n\tpreserve_recent?: number; // default: 2 (recent context-eligible messages to keep)\n\tquery?: string; // default: auto-detected from session context\n}\n\nexport interface BranchSummarySettings {\n\treserveTokens?: number; // default: 16384 (tokens reserved for prompt + LLM response)\n\tskipPrompt?: boolean; // default: false - when true, skips \"Summarize branch?\" prompt and defaults to no summary\n}\n\nexport interface ProviderRetrySettings {\n\ttimeoutMs?: number; // SDK/provider request timeout in milliseconds\n\tmaxRetries?: number; // SDK/provider retry attempts\n\tmaxRetryDelayMs?: number; // default: 60000 (max server-requested delay before failing)\n}\n\nexport interface RetrySettings {\n\tenabled?: boolean; // default: true\n\tmaxRetries?: number; // default: 3\n\tbaseDelayMs?: number; // default: 2000 (exponential backoff: 2s, 4s, 8s)\n\tprovider?: ProviderRetrySettings;\n}\n\nexport interface TerminalSettings {\n\tshowImages?: boolean; // default: true (only relevant if terminal supports images)\n\timageWidthCells?: number; // default: 60 (preferred inline image width in terminal cells)\n\tclearOnShrink?: boolean; // default: false (clear empty rows when content shrinks)\n\tshowTerminalProgress?: boolean; // default: false (OSC 9;4 terminal progress indicators)\n}\n\nexport interface ImageSettings {\n\tautoResize?: boolean; // default: true (resize images to 2000x2000 max for better model compatibility)\n\tblockImages?: boolean; // default: false - when true, prevents all images from being sent to LLM providers\n}\n\nexport interface SearchSettings {\n\tcontextBefore?: number;\n\tcontextAfter?: number;\n}\nexport interface ThinkingBudgetsSettings {\n\tminimal?: number;\n\tlow?: number;\n\tmedium?: number;\n\thigh?: number;\n}\n\nexport type MermaidRenderingMode = \"off\" | \"final\" | \"streaming\";\n\nexport interface MarkdownSettings {\n\tcodeBlockIndent?: string; // default: \" \"\n\tmermaid?: MermaidRenderingMode; // default: \"streaming\"\n\tlatex?: boolean; // default: true\n}\n\nexport interface WarningSettings {\n\tanthropicExtraUsage?: boolean; // default: true\n}\n\nexport interface CodexFastModeSettings {\n\tchat?: boolean; // default: false\n\tworkflow?: boolean; // default: false\n}\n\nexport type DefaultProjectTrust = \"ask\" | \"always\" | \"never\";\n\nexport type TransportSetting = Transport;\n\n/**\n * Package source for npm/git packages.\n * - String form: load all resources from the package\n * - Object form: filter which resources to load\n * - autoload=false: start empty and apply only explicit resource patterns\n */\nexport type PackageSource =\n\t| string\n\t| {\n\t\t\tsource: string;\n\t\t\tautoload?: boolean;\n\t\t\textensions?: string[];\n\t\t\tskills?: string[];\n\t\t\tprompts?: string[];\n\t\t\tthemes?: string[];\n\t\t\tworkflows?: string[];\n\t };\n\nexport interface BashInterceptorSettings {\n\tenabled?: boolean; // default: false\n}\n\nexport interface Settings {\n\tlastChangelogVersion?: string;\n\tfirstRunOnboardingStartedVersion?: string;\n\tonboardedVersion?: string;\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tfallbackModels?: string[]; // Ordered main-chat fallback models, optionally suffixed with :thinkingLevel\n\ttransport?: TransportSetting; // default: \"auto\"\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\ttheme?: string;\n\tenableAnalytics?: boolean; // storage only; no analytics transmission is performed\n\ttrackingId?: string; // stable UUID generated on first analytics opt-in\n\tshowCacheMissNotices?: boolean; // default: false\n\tcompaction?: CompactionSettings;\n\tbranchSummary?: BranchSummarySettings;\n\tretry?: RetrySettings;\n\thideThinkingBlock?: boolean;\n\texternalEditor?: string; // Command for Ctrl+G external editor; takes precedence over VISUAL/EDITOR\n\tshellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)\n\tquietStartup?: boolean;\n\tdefaultProjectTrust?: DefaultProjectTrust; // default: \"ask\"; global setting only\n\tshellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., \"shopt -s expand_aliases\" for alias support)\n\tbashInterceptor?: BashInterceptorSettings; // default: disabled; when enabled, user_bash handlers can intercept bash tool execution\n\tsearch?: SearchSettings; // Context lines for search results; defaults: before=1, after=3\n\tnpmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., [\"mise\", \"exec\", \"node@20\", \"--\", \"npm\"])\n\tcollapseChangelog?: boolean; // Show condensed changelog after update (use /changelog for full)\n\tenableInstallTelemetry?: boolean; // default: true - anonymous version/update ping after changelog-detected updates\n\tpackages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)\n\textensions?: string[]; // Array of local extension file paths or directories\n\tskills?: string[]; // Array of local skill file paths or directories\n\tprompts?: string[]; // Array of local prompt template paths or directories\n\tthemes?: string[]; // Array of local theme file paths or directories\n\tworkflows?: string[]; // Array of local workflow file paths or directories\n\tenableSkillCommands?: boolean; // default: true - register skills as /skill:name commands\n\tterminal?: TerminalSettings;\n\timages?: ImageSettings;\n\tenabledModels?: string[]; // Model patterns for cycling (same format as --models CLI flag)\n\tdoubleEscapeAction?: \"fork\" | \"tree\" | \"none\"; // Action for double-escape with empty editor (default: \"tree\")\n\ttreeFilterMode?: \"default\" | \"no-tools\" | \"user-only\" | \"labeled-only\" | \"all\"; // Default filter when opening /tree\n\tthinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels\n\teditorPaddingX?: number; // Horizontal padding for input editor (default: 0)\n\toutputPad?: 0 | 1; // Horizontal padding for chat message output (default: 1)\n\tautocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)\n\tshowHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME\n\tfullscreenScrollbar?: ScrollViewScrollbar; // default: \"auto\"\n\tmarkdown?: MarkdownSettings;\n\twarnings?: WarningSettings;\n\tcodexFastMode?: CodexFastModeSettings; // OpenAI priority service tier toggles for chat/workflow\n\tsessionDir?: string; // Custom session storage directory (same format as --session-dir CLI flag)\n\thttpProxy?: string; // Proxy URL applied as HTTP_PROXY and HTTPS_PROXY; global setting only\n\thttpIdleTimeoutMs?: number | string; // HTTP idle timeout; 0 or \"disabled\" disables it\n\twebsocketConnectTimeoutMs?: number | string; // WebSocket connect timeout; 0 or \"disabled\" disables it\n}\n\nexport type SettingsScope = \"global\" | \"project\";\n\nexport interface SettingsManagerCreateOptions {\n\tprojectTrusted?: boolean;\n}\n\nexport type SettingsFieldOrigin = \"primary\" | \"legacy\";\n\nexport interface SettingsStorage {\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;\n\tgetFieldOrigin?(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined;\n}\n\nexport interface SettingsError {\n\tscope: SettingsScope;\n\terror: Error;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"settings-types.js","sourceRoot":"","sources":["../../src/core/settings-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Transport } from \"@earendil-works/pi-ai/compat\";\nimport type { ScrollViewScrollbar } from \"@earendil-works/pi-tui\";\n\nexport interface CompactionSettings {\n\tenabled?: boolean; // default: true\n\treserveTokens?: number; // default: 16384\n\tcompression_ratio?: number; // default: 0.5 (fraction of compactable context to keep)\n\tpreserve_recent?: number; // default: 2 (recent context-eligible messages to keep)\n\tquery?: string; // default: auto-detected from session context\n}\n\nexport interface BranchSummarySettings {\n\treserveTokens?: number; // default: 16384 (tokens reserved for prompt + LLM response)\n\tskipPrompt?: boolean; // default: false - when true, skips \"Summarize branch?\" prompt and defaults to no summary\n}\n\nexport interface SessionSummarySettings {\n\tenabled?: boolean; // default: true - generate a one-line resume-picker summary once the agent goes idle\n}\n\nexport interface ProviderRetrySettings {\n\ttimeoutMs?: number; // SDK/provider request timeout in milliseconds\n\tmaxRetries?: number; // SDK/provider retry attempts\n\tmaxRetryDelayMs?: number; // default: 60000 (max server-requested delay before failing)\n}\n\nexport interface RetrySettings {\n\tenabled?: boolean; // default: true\n\tmaxRetries?: number; // default: 3\n\tbaseDelayMs?: number; // default: 2000 (exponential backoff: 2s, 4s, 8s)\n\tprovider?: ProviderRetrySettings;\n}\n\nexport interface TerminalSettings {\n\tshowImages?: boolean; // default: true (only relevant if terminal supports images)\n\timageWidthCells?: number; // default: 60 (preferred inline image width in terminal cells)\n\tclearOnShrink?: boolean; // default: false (clear empty rows when content shrinks)\n\tshowTerminalProgress?: boolean; // default: false (OSC 9;4 terminal progress indicators)\n}\n\nexport interface ImageSettings {\n\tautoResize?: boolean; // default: true (resize images to 2000x2000 max for better model compatibility)\n\tblockImages?: boolean; // default: false - when true, prevents all images from being sent to LLM providers\n}\n\nexport interface SearchSettings {\n\tcontextBefore?: number;\n\tcontextAfter?: number;\n}\nexport interface ThinkingBudgetsSettings {\n\tminimal?: number;\n\tlow?: number;\n\tmedium?: number;\n\thigh?: number;\n}\n\nexport type MermaidRenderingMode = \"off\" | \"final\" | \"streaming\";\n\nexport interface MarkdownSettings {\n\tcodeBlockIndent?: string; // default: \" \"\n\tmermaid?: MermaidRenderingMode; // default: \"streaming\"\n\tlatex?: boolean; // default: true\n}\n\nexport interface WarningSettings {\n\tanthropicExtraUsage?: boolean; // default: true\n}\n\nexport interface CodexFastModeSettings {\n\tchat?: boolean; // default: false\n\tworkflow?: boolean; // default: false\n}\n\nexport type DefaultProjectTrust = \"ask\" | \"always\" | \"never\";\n\nexport type TransportSetting = Transport;\n\n/**\n * Package source for npm/git packages.\n * - String form: load all resources from the package\n * - Object form: filter which resources to load\n * - autoload=false: start empty and apply only explicit resource patterns\n */\nexport type PackageSource =\n\t| string\n\t| {\n\t\t\tsource: string;\n\t\t\tautoload?: boolean;\n\t\t\textensions?: string[];\n\t\t\tskills?: string[];\n\t\t\tprompts?: string[];\n\t\t\tthemes?: string[];\n\t\t\tworkflows?: string[];\n\t };\n\nexport interface BashInterceptorSettings {\n\tenabled?: boolean; // default: false\n}\n\nexport interface Settings {\n\tlastChangelogVersion?: string;\n\tfirstRunOnboardingStartedVersion?: string;\n\tonboardedVersion?: string;\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tfallbackModels?: string[]; // Ordered main-chat fallback models, optionally suffixed with :thinkingLevel\n\ttransport?: TransportSetting; // default: \"auto\"\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\ttheme?: string;\n\tenableAnalytics?: boolean; // storage only; no analytics transmission is performed\n\ttrackingId?: string; // stable UUID generated on first analytics opt-in\n\tshowCacheMissNotices?: boolean; // default: false\n\tcompaction?: CompactionSettings;\n\tbranchSummary?: BranchSummarySettings;\n\tsessionSummary?: SessionSummarySettings;\n\tretry?: RetrySettings;\n\thideThinkingBlock?: boolean;\n\texternalEditor?: string; // Command for Ctrl+G external editor; takes precedence over VISUAL/EDITOR\n\tshellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)\n\tquietStartup?: boolean;\n\tdefaultProjectTrust?: DefaultProjectTrust; // default: \"ask\"; global setting only\n\tshellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., \"shopt -s expand_aliases\" for alias support)\n\tbashInterceptor?: BashInterceptorSettings; // default: disabled; when enabled, user_bash handlers can intercept bash tool execution\n\tsearch?: SearchSettings; // Context lines for search results; defaults: before=1, after=3\n\tnpmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., [\"mise\", \"exec\", \"node@20\", \"--\", \"npm\"])\n\tcollapseChangelog?: boolean; // Show condensed changelog after update (use /changelog for full)\n\tenableInstallTelemetry?: boolean; // default: true - anonymous version/update ping after changelog-detected updates\n\tpackages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)\n\textensions?: string[]; // Array of local extension file paths or directories\n\tskills?: string[]; // Array of local skill file paths or directories\n\tprompts?: string[]; // Array of local prompt template paths or directories\n\tthemes?: string[]; // Array of local theme file paths or directories\n\tworkflows?: string[]; // Array of local workflow file paths or directories\n\tenableSkillCommands?: boolean; // default: true - register skills as /skill:name commands\n\tterminal?: TerminalSettings;\n\timages?: ImageSettings;\n\tenabledModels?: string[]; // Model patterns for cycling (same format as --models CLI flag)\n\tdoubleEscapeAction?: \"fork\" | \"tree\" | \"none\"; // Action for double-escape with empty editor (default: \"tree\")\n\ttreeFilterMode?: \"default\" | \"no-tools\" | \"user-only\" | \"labeled-only\" | \"all\"; // Default filter when opening /tree\n\tthinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels\n\teditorPaddingX?: number; // Horizontal padding for input editor (default: 0)\n\toutputPad?: 0 | 1; // Horizontal padding for chat message output (default: 1)\n\tautocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)\n\tshowHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME\n\tfullscreenScrollbar?: ScrollViewScrollbar; // default: \"auto\"\n\tmarkdown?: MarkdownSettings;\n\twarnings?: WarningSettings;\n\tcodexFastMode?: CodexFastModeSettings; // OpenAI priority service tier toggles for chat/workflow\n\tsessionDir?: string; // Custom session storage directory (same format as --session-dir CLI flag)\n\thttpProxy?: string; // Proxy URL applied as HTTP_PROXY and HTTPS_PROXY; global setting only\n\thttpIdleTimeoutMs?: number | string; // HTTP idle timeout; 0 or \"disabled\" disables it\n\twebsocketConnectTimeoutMs?: number | string; // WebSocket connect timeout; 0 or \"disabled\" disables it\n}\n\nexport type SettingsScope = \"global\" | \"project\";\n\nexport interface SettingsManagerCreateOptions {\n\tprojectTrusted?: boolean;\n}\n\nexport type SettingsFieldOrigin = \"primary\" | \"legacy\";\n\nexport interface SettingsStorage {\n\twithLock(scope: SettingsScope, fn: (current: string | undefined) => string | undefined): void;\n\tgetFieldOrigin?(scope: SettingsScope, field: keyof Settings): SettingsFieldOrigin | undefined;\n}\n\nexport interface SettingsError {\n\tscope: SettingsScope;\n\terror: Error;\n}\n"]}
|
|
@@ -266,8 +266,8 @@ export const BUNDLED_EXTENSION_SLASH_COMMANDS = [
|
|
|
266
266
|
description: "Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|interrupt|quit|pause|resume|inputs|reload] [args]",
|
|
267
267
|
getArgumentCompletions: getBundledWorkflowArgumentCompletions,
|
|
268
268
|
},
|
|
269
|
-
{ name: "run", description: "Run a subagent directly: /run agent[output=file] [task] [--
|
|
270
|
-
{ name: "parallel", description: "Run agents in parallel: /parallel scout task1 -> reviewer task2 [--
|
|
269
|
+
{ name: "run", description: "Run a subagent directly: /run agent[output=file] [task] [--fork]" },
|
|
270
|
+
{ name: "parallel", description: "Run agents in parallel: /parallel scout task1 -> reviewer task2 [--fork]" },
|
|
271
271
|
{ name: "subagents-doctor", description: "Show subagent diagnostics" },
|
|
272
272
|
{ name: "mcp", description: "Show MCP server status" },
|
|
273
273
|
{ name: "mcp-auth", description: "Authenticate with an MCP server (OAuth)" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AA8BnC,MAAM,0BAA0B,GAA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,EAAE,EAAE;IACjD,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,QAAQ,EAAE,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAuC;IACnF;QACC,IAAI,EAAE,UAAU;QAChB,WAAW,EACV,iKAAiK;QAClK,sBAAsB,EAAE,qCAAqC;KAC7D;IACD,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,yEAAyE,EAAE;IACvG,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,iFAAiF,EAAE;IACpH,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,2BAA2B,EAAE;IACtE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE;IACtD,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,yCAAyC,EAAE;IAC5E,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iDAAiD,EAAE;IACnF,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,+CAA+C,EAAE;IACxF,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;IACnE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;IAC7D,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,+BAA+B,EAAE;CAClE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\targumentHint?: string;\n\tgetArgumentCompletions?: (argumentPrefix: string) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\ntype WorkflowInputCompletionMetadata = {\n\tdescription: string;\n\tkind?: \"boolean\" | \"number\" | \"string\";\n};\n\ntype WorkflowCompletionMetadata = {\n\tname: string;\n\tdescription: string;\n\tinputs: Record<string, WorkflowInputCompletionMetadata>;\n};\n\nconst WORKFLOW_ADMIN_COMPLETIONS: AutocompleteItem[] = [\n\t{ value: \"connect \", label: \"connect\", description: \"Attach to a run (picker if no id)\" },\n\t{ value: \"attach \", label: \"attach\", description: \"Open the in-place attach pane on a node\" },\n\t{ value: \"list \", label: \"list\", description: \"List registered workflows\" },\n\t{ value: \"status \", label: \"status\", description: \"List current-session active and retained terminal runs\" },\n\t{ value: \"interrupt \", label: \"interrupt\", description: \"Interrupt a run\" },\n\t{ value: \"quit \", label: \"quit\", description: \"Quit a run and keep it resumable\" },\n\t{ value: \"pause \", label: \"pause\", description: \"Pause a run or stage\" },\n\t{ value: \"resume \", label: \"resume\", description: \"Re-open overlay for a run\" },\n\t{ value: \"inputs \", label: \"inputs\", description: \"Show a workflow's input schema\" },\n\t{ value: \"reload \", label: \"reload\", description: \"Reload workflow resources\" },\n];\n\nconst BUNDLED_WORKFLOW_COMPLETION_METADATA: WorkflowCompletionMetadata[] = [\n\t{\n\t\tname: \"adversarial-verification\",\n\t\tdescription:\n\t\t\t\"Produce a candidate, challenge it with fresh-context rubric-based verifiers, and reduce their evidence through a bounded repair loop.\",\n\t\tinputs: {\n\t\t\ttask: { description: \"Task whose candidate result must be independently verified.\", kind: \"string\" },\n\t\t\tverifier_count: { description: \"Number of independent verifiers per review round.\", kind: \"number\" },\n\t\t\tmax_repairs: { description: \"Maximum candidate repair rounds before rejection.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"classify-and-act\",\n\t\tdescription:\n\t\t\t\"Classify a task with structured confidence, route deterministically to an isolated category action, and ask for human selection when confidence is low.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to classify and execute.\", kind: \"string\" },\n\t\t\tcategories: { description: \"Ordered action categories available to the classifier and fallback chooser.\" },\n\t\t\tconfidence_threshold: {\n\t\t\t\tdescription: \"Minimum structured confidence required to route without human selection.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"fan-out-and-synthesize\",\n\t\tdescription:\n\t\t\t\"Partition a task, run bounded independent artifact branches, then synthesize all evidence at an explicit barrier.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to partition, investigate, and synthesize.\", kind: \"string\" },\n\t\t\tmax_branches: {\n\t\t\t\tdescription: \"Maximum number of independent partitions produced and executed.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t\tmax_concurrency: { description: \"Maximum number of branch agents running concurrently.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"generate-and-filter\",\n\t\tdescription:\n\t\t\t\"Generate more independent candidates than needed, deduplicate and filter them by rubric, optionally judge them, and return a parent-consumable shortlist.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Prompt for candidate generation and selection.\", kind: \"string\" },\n\t\t\tnum_candidates: { description: \"Number of independent candidates to generate.\", kind: \"number\" },\n\t\t\tshortlist_size: { description: \"Maximum number of candidates in the final shortlist.\", kind: \"number\" },\n\t\t\tuse_judge: { description: \"Whether an independent judge reviews the filtered shortlist.\", kind: \"boolean\" },\n\t\t\tmax_concurrency: { description: \"Maximum simultaneous generator stages.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"goal\",\n\t\tdescription:\n\t\t\t\"Goal Runner workflow with bounded sub-agent orchestration turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the objective text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tobjective: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"The objective or delta for this Goal Runner workflow run. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tacceptance_criteria: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Original immutable task contract this run must remain consistent with. Defaults to objective. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_turns: {\n\t\t\t\tdescription: \"Maximum orchestrator/review turns before Goal Runner stops as needs_human.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t\tbase_branch: {\n\t\t\t\tdescription: \"Optional branch reviewers compare the current code delta against (default origin/main).\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tgit_worktree_dir: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tcreate_pr: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the objective text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation after Goal completes.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"loop-until-done\",\n\t\tdescription:\n\t\t\t\"Repeat evidence-producing work and independent completion evaluation against a durable ledger until done or an inspectable iteration-limit failure.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription: \"Objective whose explicit completion condition controls the bounded loop.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_iterations: {\n\t\t\t\tdescription: \"Maximum work/evaluation iterations before returning an inspectable failed status (1-20).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"open-claude-design\",\n\t\tdescription:\n\t\t\t\"AI-powered design workflow: combined discovery/init → design-system/reference research → curated reference discovery → HTML generation → live-driven refinement → rich HTML handoff. The discovery stage asks what to build, the output type, and which references to emulate, then runs impeccable init for PRODUCT.md/DESIGN.md (references take precedence over project context). The user iteratively reviews the generated HTML.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"What to design (for example, a dashboard, page, component, or prototype). The discovery stage refines this into a confirmed brief and asks for the output type and references.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tdiscover_references: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Discover beautiful, current reference designs from notable design websites (Awwwards, recent.design, Dribbble, Monet, Motionsites) and feed them to generation. Set false to skip the network/browser reference pass.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t\tmax_refinements: {\n\t\t\t\tdescription: \"Maximum generate/user-feedback loop iterations (default 3).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"ralph\",\n\t\tdescription:\n\t\t\t\"Raw prompt → research-prompt-refinement → research → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the prompt text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"The task or goal to research, execute, and refine. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tacceptance_criteria: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Original immutable task contract this run must remain consistent with. Defaults to prompt. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_loops: { description: \"Maximum research/orchestrate/review iterations (default 10).\", kind: \"number\" },\n\t\t\tbase_branch: {\n\t\t\t\tdescription: \"Branch reviewers compare the current code delta against (default origin/main).\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tgit_worktree_dir: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tcreate_pr: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the prompt text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"tournament\",\n\t\tdescription:\n\t\t\t\"Run several independent whole-task attempts through a balanced pairwise judging bracket and return an auditable winner.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task every competing agent must attempt independently.\", kind: \"string\" },\n\t\t\tnum_attempts: { description: \"Number of independent whole-task attempts (2-8).\", kind: \"number\" },\n\t\t\tmax_concurrency: {\n\t\t\t\tdescription: \"Maximum simultaneously active attempts or pairwise judges (1-8).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n];\n\nfunction completeWorkflowToken(argumentText: string, candidates: AutocompleteItem[]): AutocompleteItem[] | null {\n\tconst tokenStart = /\\s$/.test(argumentText)\n\t\t? argumentText.length\n\t\t: Math.max(argumentText.lastIndexOf(\" \"), argumentText.lastIndexOf(\"\\t\")) + 1;\n\tconst head = argumentText.slice(0, tokenStart);\n\tconst token = argumentText.slice(tokenStart);\n\tconst normalizedToken = token.trimEnd();\n\tconst filtered = candidates\n\t\t.filter((candidate) => candidate.value.startsWith(token) && candidate.value.trimEnd() !== normalizedToken)\n\t\t.map((candidate) => ({ ...candidate, value: `${head}${candidate.value}` }));\n\treturn filtered.length > 0 ? filtered : null;\n}\n\nfunction bundledWorkflowNameItems(): AutocompleteItem[] {\n\treturn BUNDLED_WORKFLOW_COMPLETION_METADATA.map((workflow) => ({\n\t\tvalue: `${workflow.name} `,\n\t\tlabel: workflow.name,\n\t\tdescription: `Run workflow: ${workflow.name}`,\n\t}));\n}\n\nexport function getBundledWorkflowArgumentCompletions(argumentPrefix: string): AutocompleteItem[] | null {\n\tconst parts = argumentPrefix.trim().split(/\\s+/).filter(Boolean);\n\tconst subcommand = parts[0] ?? \"\";\n\tconst workflowItems = bundledWorkflowNameItems();\n\tif (!argumentPrefix.includes(\" \")) {\n\t\treturn completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\t}\n\tif (subcommand === \"inputs\") return completeWorkflowToken(argumentPrefix, workflowItems);\n\tif (subcommand === \"interrupt\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Interrupt all in-flight runs\" },\n\t\t\t{ value: \"--yes \", label: \"--yes\", description: \"Skip confirmation\" },\n\t\t\t{ value: \"-y \", label: \"-y\", description: \"Skip confirmation\" },\n\t\t]);\n\t}\n\tif (subcommand === \"quit\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Quit and keep all in-flight runs resumable\" },\n\t\t]);\n\t}\n\tif (!subcommand) return completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\n\tconst workflow = BUNDLED_WORKFLOW_COMPLETION_METADATA.find((candidate) => candidate.name === subcommand);\n\tif (!workflow) return null;\n\tconst tokenStart = /\\s$/.test(argumentPrefix)\n\t\t? argumentPrefix.length\n\t\t: Math.max(argumentPrefix.lastIndexOf(\" \"), argumentPrefix.lastIndexOf(\"\\t\")) + 1;\n\tconst token = argumentPrefix.slice(tokenStart);\n\tconst equalsIndex = token.indexOf(\"=\");\n\tif (equalsIndex > 0) {\n\t\tconst inputName = token.slice(0, equalsIndex);\n\t\tconst input = workflow.inputs[inputName];\n\t\tif (input?.kind !== \"boolean\") return null;\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: `${inputName}=true `, label: \"true\", description: inputName },\n\t\t\t{ value: `${inputName}=false `, label: \"false\", description: inputName },\n\t\t]);\n\t}\n\n\treturn completeWorkflowToken(argumentPrefix, [\n\t\t{ value: \"--no-picker \", label: \"--no-picker\", description: \"Skip interactive input picker\" },\n\t\t{ value: \"--help \", label: \"--help\", description: \"Show this workflow's input schema\" },\n\t\t...Object.entries(workflow.inputs).map(([name, input]) => ({\n\t\t\tvalue: `${name}=`,\n\t\t\tlabel: name,\n\t\t\tdescription: input.description,\n\t\t})),\n\t]);\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"trust\", description: \"Save project trust decision for future sessions\" },\n\t{ name: \"login\", description: \"Configure provider authentication\", argumentHint: \"<provider>\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Compact older context with verbatim line ranges\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n\nexport const BUNDLED_EXTENSION_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{\n\t\tname: \"workflow\",\n\t\tdescription:\n\t\t\t\"Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|interrupt|quit|pause|resume|inputs|reload] [args]\",\n\t\tgetArgumentCompletions: getBundledWorkflowArgumentCompletions,\n\t},\n\t{ name: \"run\", description: \"Run a subagent directly: /run agent[output=file] [task] [--bg] [--fork]\" },\n\t{ name: \"parallel\", description: \"Run agents in parallel: /parallel scout task1 -> reviewer task2 [--bg] [--fork]\" },\n\t{ name: \"subagents-doctor\", description: \"Show subagent diagnostics\" },\n\t{ name: \"mcp\", description: \"Show MCP server status\" },\n\t{ name: \"mcp-auth\", description: \"Authenticate with an MCP server (OAuth)\" },\n\t{ name: \"curator\", description: \"Toggle or configure the search curator workflow\" },\n\t{ name: \"google-account\", description: \"Show the active Google account for Gemini Web\" },\n\t{ name: \"search\", description: \"Browse stored web search results\" },\n\t{ name: \"websearch\", description: \"Open web search curator\" },\n\t{ name: \"intercom\", description: \"Open session intercom overlay\" },\n];\n"]}
|
|
1
|
+
{"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACN,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GACjC,MAAM,2BAA2B,CAAC;AA8BnC,MAAM,0BAA0B,GAAuB;IACtD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,mCAAmC,EAAE;IACzF,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAE;IAC7F,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAC3E,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,wDAAwD,EAAE;IAC5G,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE;IAC3E,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,kCAAkC,EAAE;IAClF,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE;IACxE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,2BAA2B,EAAE;IAC/E,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACpF,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,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,EAAE;CAClE,CAAC","sourcesContent":["import type { AutocompleteItem } from \"@earendil-works/pi-tui\";\nimport { APP_NAME } from \"../config.ts\";\nimport {\n\tATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\tATOMIC_GUIDE_COMMAND_NAME,\n\tgetAtomicGuideArgumentCompletions,\n} from \"./atomic-guide-command.ts\";\nimport type { SourceInfo } from \"./source-info.ts\";\n\nexport type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n\targumentHint?: string;\n\tgetArgumentCompletions?: (argumentPrefix: string) => AutocompleteItem[] | null | Promise<AutocompleteItem[] | null>;\n}\n\ntype WorkflowInputCompletionMetadata = {\n\tdescription: string;\n\tkind?: \"boolean\" | \"number\" | \"string\";\n};\n\ntype WorkflowCompletionMetadata = {\n\tname: string;\n\tdescription: string;\n\tinputs: Record<string, WorkflowInputCompletionMetadata>;\n};\n\nconst WORKFLOW_ADMIN_COMPLETIONS: AutocompleteItem[] = [\n\t{ value: \"connect \", label: \"connect\", description: \"Attach to a run (picker if no id)\" },\n\t{ value: \"attach \", label: \"attach\", description: \"Open the in-place attach pane on a node\" },\n\t{ value: \"list \", label: \"list\", description: \"List registered workflows\" },\n\t{ value: \"status \", label: \"status\", description: \"List current-session active and retained terminal runs\" },\n\t{ value: \"interrupt \", label: \"interrupt\", description: \"Interrupt a run\" },\n\t{ value: \"quit \", label: \"quit\", description: \"Quit a run and keep it resumable\" },\n\t{ value: \"pause \", label: \"pause\", description: \"Pause a run or stage\" },\n\t{ value: \"resume \", label: \"resume\", description: \"Re-open overlay for a run\" },\n\t{ value: \"inputs \", label: \"inputs\", description: \"Show a workflow's input schema\" },\n\t{ value: \"reload \", label: \"reload\", description: \"Reload workflow resources\" },\n];\n\nconst BUNDLED_WORKFLOW_COMPLETION_METADATA: WorkflowCompletionMetadata[] = [\n\t{\n\t\tname: \"adversarial-verification\",\n\t\tdescription:\n\t\t\t\"Produce a candidate, challenge it with fresh-context rubric-based verifiers, and reduce their evidence through a bounded repair loop.\",\n\t\tinputs: {\n\t\t\ttask: { description: \"Task whose candidate result must be independently verified.\", kind: \"string\" },\n\t\t\tverifier_count: { description: \"Number of independent verifiers per review round.\", kind: \"number\" },\n\t\t\tmax_repairs: { description: \"Maximum candidate repair rounds before rejection.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"classify-and-act\",\n\t\tdescription:\n\t\t\t\"Classify a task with structured confidence, route deterministically to an isolated category action, and ask for human selection when confidence is low.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to classify and execute.\", kind: \"string\" },\n\t\t\tcategories: { description: \"Ordered action categories available to the classifier and fallback chooser.\" },\n\t\t\tconfidence_threshold: {\n\t\t\t\tdescription: \"Minimum structured confidence required to route without human selection.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"fan-out-and-synthesize\",\n\t\tdescription:\n\t\t\t\"Partition a task, run bounded independent artifact branches, then synthesize all evidence at an explicit barrier.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task to partition, investigate, and synthesize.\", kind: \"string\" },\n\t\t\tmax_branches: {\n\t\t\t\tdescription: \"Maximum number of independent partitions produced and executed.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t\tmax_concurrency: { description: \"Maximum number of branch agents running concurrently.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"generate-and-filter\",\n\t\tdescription:\n\t\t\t\"Generate more independent candidates than needed, deduplicate and filter them by rubric, optionally judge them, and return a parent-consumable shortlist.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Prompt for candidate generation and selection.\", kind: \"string\" },\n\t\t\tnum_candidates: { description: \"Number of independent candidates to generate.\", kind: \"number\" },\n\t\t\tshortlist_size: { description: \"Maximum number of candidates in the final shortlist.\", kind: \"number\" },\n\t\t\tuse_judge: { description: \"Whether an independent judge reviews the filtered shortlist.\", kind: \"boolean\" },\n\t\t\tmax_concurrency: { description: \"Maximum simultaneous generator stages.\", kind: \"number\" },\n\t\t},\n\t},\n\t{\n\t\tname: \"goal\",\n\t\tdescription:\n\t\t\t\"Goal Runner workflow with bounded sub-agent orchestration turns, immutable acceptance criteria, ledger artifacts, parallel reviewers, and reducer-gated completion. When launching follow-up goal runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the objective text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tobjective: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"The objective or delta for this Goal Runner workflow run. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tacceptance_criteria: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Original immutable task contract this run must remain consistent with. Defaults to objective. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_turns: {\n\t\t\t\tdescription: \"Maximum orchestrator/review turns before Goal Runner stops as needs_human.\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t\tbase_branch: {\n\t\t\t\tdescription: \"Optional branch reviewers compare the current code delta against (default origin/main).\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tgit_worktree_dir: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tcreate_pr: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to run the final pull-request creation stage after reviewer/reducer approval. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the objective text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation after Goal completes.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"loop-until-done\",\n\t\tdescription:\n\t\t\t\"Repeat evidence-producing work and independent completion evaluation against a durable ledger until done or an inspectable iteration-limit failure.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription: \"Objective whose explicit completion condition controls the bounded loop.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_iterations: {\n\t\t\t\tdescription: \"Maximum work/evaluation iterations before returning an inspectable failed status (1-20).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"open-claude-design\",\n\t\tdescription:\n\t\t\t\"AI-powered design workflow: combined discovery/init → design-system/reference research → curated reference discovery → HTML generation → live-driven refinement → rich HTML handoff. The discovery stage asks what to build, the output type, and which references to emulate, then runs impeccable init for PRODUCT.md/DESIGN.md (references take precedence over project context). The user iteratively reviews the generated HTML.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"What to design (for example, a dashboard, page, component, or prototype). The discovery stage refines this into a confirmed brief and asks for the output type and references.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tdiscover_references: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Discover beautiful, current reference designs from notable design websites (Awwwards, recent.design, Dribbble, Monet, Motionsites) and feed them to generation. Set false to skip the network/browser reference pass.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t\tmax_refinements: {\n\t\t\t\tdescription: \"Maximum generate/user-feedback loop iterations (default 3).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"ralph\",\n\t\tdescription:\n\t\t\t\"Raw prompt → research-prompt-refinement → research → orchestrate → multi-model parallel review loop with bounded iteration and immutable acceptance criteria. When launching follow-up ralph runs from review findings, pass the ORIGINAL task text as acceptance_criteria so deltas cannot drift from the literal contract. If the task includes submitting a pull request (or MR/review), remove that final action from the prompt text and set create_pr=true instead when preparing the workflow inputs.\",\n\t\tinputs: {\n\t\t\tprompt: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"The task or goal to research, execute, and refine. Do not include PR/MR submission instructions here; strip them from the task text and request them via create_pr=true instead.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tacceptance_criteria: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Original immutable task contract this run must remain consistent with. Defaults to prompt. Orchestrators launching follow-up runs from reviewer findings should pass the ORIGINAL task text here.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tmax_loops: { description: \"Maximum research/orchestrate/review iterations (default 10).\", kind: \"number\" },\n\t\t\tbase_branch: {\n\t\t\t\tdescription: \"Branch reviewers compare the current code delta against (default origin/main).\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tgit_worktree_dir: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Optional Git worktree path. Leave at the default unless the user explicitly requested worktree isolation — stages never create git worktrees on their own. Must start inside a Git repo; absolute paths are used as-is, relative paths resolve from the repo root, existing Git worktrees from the invoking repository are reused/shared as-is, and missing paths are created from base_branch.\",\n\t\t\t\tkind: \"string\",\n\t\t\t},\n\t\t\tcreate_pr: {\n\t\t\t\tdescription:\n\t\t\t\t\t\"Whether to run the final pull-request creation stage. Defaults to false; prompt text alone does not opt in. If the task asks to submit a PR/MR/review, remove that from the prompt text and set this to true — only the final stage then attempts provider-appropriate PR/MR/review creation.\",\n\t\t\t\tkind: \"boolean\",\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tname: \"tournament\",\n\t\tdescription:\n\t\t\t\"Run several independent whole-task attempts through a balanced pairwise judging bracket and return an auditable winner.\",\n\t\tinputs: {\n\t\t\tprompt: { description: \"Task every competing agent must attempt independently.\", kind: \"string\" },\n\t\t\tnum_attempts: { description: \"Number of independent whole-task attempts (2-8).\", kind: \"number\" },\n\t\t\tmax_concurrency: {\n\t\t\t\tdescription: \"Maximum simultaneously active attempts or pairwise judges (1-8).\",\n\t\t\t\tkind: \"number\",\n\t\t\t},\n\t\t},\n\t},\n];\n\nfunction completeWorkflowToken(argumentText: string, candidates: AutocompleteItem[]): AutocompleteItem[] | null {\n\tconst tokenStart = /\\s$/.test(argumentText)\n\t\t? argumentText.length\n\t\t: Math.max(argumentText.lastIndexOf(\" \"), argumentText.lastIndexOf(\"\\t\")) + 1;\n\tconst head = argumentText.slice(0, tokenStart);\n\tconst token = argumentText.slice(tokenStart);\n\tconst normalizedToken = token.trimEnd();\n\tconst filtered = candidates\n\t\t.filter((candidate) => candidate.value.startsWith(token) && candidate.value.trimEnd() !== normalizedToken)\n\t\t.map((candidate) => ({ ...candidate, value: `${head}${candidate.value}` }));\n\treturn filtered.length > 0 ? filtered : null;\n}\n\nfunction bundledWorkflowNameItems(): AutocompleteItem[] {\n\treturn BUNDLED_WORKFLOW_COMPLETION_METADATA.map((workflow) => ({\n\t\tvalue: `${workflow.name} `,\n\t\tlabel: workflow.name,\n\t\tdescription: `Run workflow: ${workflow.name}`,\n\t}));\n}\n\nexport function getBundledWorkflowArgumentCompletions(argumentPrefix: string): AutocompleteItem[] | null {\n\tconst parts = argumentPrefix.trim().split(/\\s+/).filter(Boolean);\n\tconst subcommand = parts[0] ?? \"\";\n\tconst workflowItems = bundledWorkflowNameItems();\n\tif (!argumentPrefix.includes(\" \")) {\n\t\treturn completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\t}\n\tif (subcommand === \"inputs\") return completeWorkflowToken(argumentPrefix, workflowItems);\n\tif (subcommand === \"interrupt\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Interrupt all in-flight runs\" },\n\t\t\t{ value: \"--yes \", label: \"--yes\", description: \"Skip confirmation\" },\n\t\t\t{ value: \"-y \", label: \"-y\", description: \"Skip confirmation\" },\n\t\t]);\n\t}\n\tif (subcommand === \"quit\") {\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: \"--all \", label: \"--all\", description: \"Quit and keep all in-flight runs resumable\" },\n\t\t]);\n\t}\n\tif (!subcommand) return completeWorkflowToken(argumentPrefix, [...WORKFLOW_ADMIN_COMPLETIONS, ...workflowItems]);\n\n\tconst workflow = BUNDLED_WORKFLOW_COMPLETION_METADATA.find((candidate) => candidate.name === subcommand);\n\tif (!workflow) return null;\n\tconst tokenStart = /\\s$/.test(argumentPrefix)\n\t\t? argumentPrefix.length\n\t\t: Math.max(argumentPrefix.lastIndexOf(\" \"), argumentPrefix.lastIndexOf(\"\\t\")) + 1;\n\tconst token = argumentPrefix.slice(tokenStart);\n\tconst equalsIndex = token.indexOf(\"=\");\n\tif (equalsIndex > 0) {\n\t\tconst inputName = token.slice(0, equalsIndex);\n\t\tconst input = workflow.inputs[inputName];\n\t\tif (input?.kind !== \"boolean\") return null;\n\t\treturn completeWorkflowToken(argumentPrefix, [\n\t\t\t{ value: `${inputName}=true `, label: \"true\", description: inputName },\n\t\t\t{ value: `${inputName}=false `, label: \"false\", description: inputName },\n\t\t]);\n\t}\n\n\treturn completeWorkflowToken(argumentPrefix, [\n\t\t{ value: \"--no-picker \", label: \"--no-picker\", description: \"Skip interactive input picker\" },\n\t\t{ value: \"--help \", label: \"--help\", description: \"Show this workflow's input schema\" },\n\t\t...Object.entries(workflow.inputs).map(([name, input]) => ({\n\t\t\tvalue: `${name}=`,\n\t\t\tlabel: name,\n\t\t\tdescription: input.description,\n\t\t})),\n\t]);\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{ name: \"model\", description: \"Select model (opens selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for ctrl+p cycling\" },\n\t{ name: \"fast\", description: \"Configure Codex fast mode for chat and workflows\" },\n\t{ name: \"export\", description: \"Export session (HTML default, or specify path: .html/.jsonl)\" },\n\t{ name: \"import\", description: \"Import and resume a session from a JSONL file\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{\n\t\tname: ATOMIC_GUIDE_COMMAND_NAME,\n\t\tdescription: ATOMIC_GUIDE_COMMAND_DESCRIPTION,\n\t\tgetArgumentCompletions: getAtomicGuideArgumentCompletions,\n\t},\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous user message\" },\n\t{ name: \"clone\", description: \"Duplicate the current session at the current position\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"trust\", description: \"Save project trust decision for future sessions\" },\n\t{ name: \"login\", description: \"Configure provider authentication\", argumentHint: \"<provider>\" },\n\t{ name: \"logout\", description: \"Remove provider authentication\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"compact\", description: \"Compact older context with verbatim line ranges\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload keybindings, extensions, skills, prompts, and themes\" },\n\t{ name: \"exit\", description: `Exit ${APP_NAME}` },\n\t{ name: \"quit\", description: `Quit ${APP_NAME}` },\n];\n\nexport const BUNDLED_EXTENSION_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{\n\t\tname: \"workflow\",\n\t\tdescription:\n\t\t\t\"Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|interrupt|quit|pause|resume|inputs|reload] [args]\",\n\t\tgetArgumentCompletions: getBundledWorkflowArgumentCompletions,\n\t},\n\t{ name: \"run\", description: \"Run a subagent directly: /run agent[output=file] [task] [--fork]\" },\n\t{ name: \"parallel\", description: \"Run agents in parallel: /parallel scout task1 -> reviewer task2 [--fork]\" },\n\t{ name: \"subagents-doctor\", description: \"Show subagent diagnostics\" },\n\t{ name: \"mcp\", description: \"Show MCP server status\" },\n\t{ name: \"mcp-auth\", description: \"Authenticate with an MCP server (OAuth)\" },\n\t{ name: \"curator\", description: \"Toggle or configure the search curator workflow\" },\n\t{ name: \"google-account\", description: \"Show the active Google account for Gemini Web\" },\n\t{ name: \"search\", description: \"Browse stored web search results\" },\n\t{ name: \"websearch\", description: \"Open web search curator\" },\n\t{ name: \"intercom\", description: \"Open session intercom overlay\" },\n];\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
|
2
2
|
import { type Static, Type } from "typebox";
|
|
3
|
-
import type { AsyncJobManager } from "../async/job-manager.js";
|
|
4
|
-
import type { AsyncJobDeliveryMessage } from "../async/types.js";
|
|
5
3
|
import type { BashResult } from "../bash-executor.ts";
|
|
6
4
|
import type { ToolDefinition } from "../extensions/types.ts";
|
|
7
5
|
import { type BashInterceptorRule } from "./bash-interceptor.ts";
|
|
@@ -12,7 +10,6 @@ declare const bashSchema: Type.TObject<{
|
|
|
12
10
|
timeout: Type.TOptional<Type.TNumber>;
|
|
13
11
|
cwd: Type.TOptional<Type.TString>;
|
|
14
12
|
pty: Type.TOptional<Type.TBoolean>;
|
|
15
|
-
async: Type.TOptional<Type.TBoolean>;
|
|
16
13
|
}>;
|
|
17
14
|
export declare const bashToolSystemPromptContribution: Readonly<{
|
|
18
15
|
readonly snippet: "Execute a shell command.";
|
|
@@ -23,13 +20,6 @@ export interface BashToolDetails {
|
|
|
23
20
|
truncation?: TruncationResult;
|
|
24
21
|
fullOutputPath?: string;
|
|
25
22
|
exitCode?: number | null;
|
|
26
|
-
async?: {
|
|
27
|
-
jobId: string;
|
|
28
|
-
type: "bash";
|
|
29
|
-
state: "running" | "completed" | "failed";
|
|
30
|
-
command?: string;
|
|
31
|
-
status?: "running" | "completed" | "failed";
|
|
32
|
-
};
|
|
33
23
|
timeoutSeconds?: number;
|
|
34
24
|
requestedTimeoutSeconds?: number;
|
|
35
25
|
wallTimeMs?: number;
|
|
@@ -75,11 +65,6 @@ export interface BashToolOptions {
|
|
|
75
65
|
interceptorEnabled?: boolean | (() => boolean);
|
|
76
66
|
availableTools?: string[];
|
|
77
67
|
interceptorRules?: BashInterceptorRule[];
|
|
78
|
-
/** Enable background bash jobs and session-managed async result delivery. */
|
|
79
|
-
asyncEnabled?: boolean;
|
|
80
|
-
asyncJobManager?: AsyncJobManager;
|
|
81
|
-
asyncJobDeliveryHandler?: (message: AsyncJobDeliveryMessage) => void | Promise<void>;
|
|
82
|
-
asyncJobSessionId?: symbol;
|
|
83
68
|
/**
|
|
84
69
|
* Session-scoped directory for overflow logs, resolved per execution so a
|
|
85
70
|
* session switch (fork, branch, resume) follows the live transcript session.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../../src/core/tools/bash.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAa5C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../../src/core/tools/bash.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAa5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAA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AE,eAAe,GACvB,cAAc,CAAC,OAAO,UAAU,EAAE,eAAe,GAAG,SAAS,EAAE,eAAe,CAAC,CAgQjF;AACD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,UAAU,CAAC,CAEnG"}
|
package/dist/core/tools/bash.js
CHANGED
|
@@ -10,8 +10,6 @@ import { truncateToVisualLines } from "../../modes/interactive/components/visual
|
|
|
10
10
|
import { theme } from "../../modes/interactive/theme/theme.js";
|
|
11
11
|
import { createChildProcessEnvironment, waitForChildProcess } from "../../utils/child-process.js";
|
|
12
12
|
import { getShellConfig, getShellEnv, killProcessTree, trackDetachedChildPid, untrackDetachedChildPid, } from "../../utils/shell.js";
|
|
13
|
-
import { startAsyncBashCommand } from "./bash-async-execution.js";
|
|
14
|
-
import { abortManagedBashJob, getManagedBashJob } from "./bash-async-jobs.js";
|
|
15
13
|
import { checkBashInterceptionCandidates, DEFAULT_BASH_INTERCEPTOR_RULES, } from "./bash-interceptor.js";
|
|
16
14
|
import { stripLeadingCdCommand } from "./bash-leading-cd.js";
|
|
17
15
|
import { executeNativePty } from "./bash-pty-native.js";
|
|
@@ -35,7 +33,7 @@ const bashBaseSchema = Type.Object({
|
|
|
35
33
|
cwd: Type.Optional(Type.String({ description: "Working directory for the command." })),
|
|
36
34
|
pty: Type.Optional(Type.Boolean({ description: "Run with PTY handling." })),
|
|
37
35
|
}, { additionalProperties: false });
|
|
38
|
-
const bashSchema =
|
|
36
|
+
const bashSchema = bashBaseSchema;
|
|
39
37
|
export const bashToolSystemPromptContribution = Object.freeze({
|
|
40
38
|
snippet: "Execute a shell command.",
|
|
41
39
|
guidelines: Object.freeze([
|
|
@@ -264,74 +262,18 @@ export function createBashToolDefinition(cwd, options) {
|
|
|
264
262
|
: (options?.interceptorEnabled ?? !!interceptor);
|
|
265
263
|
const availableTools = options?.availableTools ?? ["read", "search", "find", "edit", "write"];
|
|
266
264
|
const interceptorRules = options?.interceptorRules ?? DEFAULT_BASH_INTERCEPTOR_RULES;
|
|
267
|
-
const asyncEnabled = options?.asyncEnabled ?? false;
|
|
268
|
-
const asyncJobManager = options?.asyncJobManager, asyncJobDeliveryHandler = options?.asyncJobDeliveryHandler, asyncJobSessionId = options?.asyncJobSessionId;
|
|
269
265
|
const sessionTempDirOption = options?.sessionTempDir;
|
|
270
266
|
const resolveSessionTempDir = () => typeof sessionTempDirOption === "function" ? sessionTempDirOption() : sessionTempDirOption;
|
|
271
267
|
return {
|
|
272
268
|
name: "bash",
|
|
273
269
|
label: "bash",
|
|
274
|
-
description: "Execute a shell command in the session workspace, with optional PTY
|
|
270
|
+
description: "Execute a shell command in the session workspace, with optional PTY handling.",
|
|
275
271
|
promptSnippet: bashToolSystemPromptContribution.snippet,
|
|
276
272
|
promptGuidelines: exposeSessionEnvironment ? [...bashToolSystemPromptContribution.guidelines] : undefined,
|
|
277
|
-
parameters:
|
|
273
|
+
parameters: bashSchema,
|
|
278
274
|
maxResultSizeChars: Infinity,
|
|
279
275
|
async execute(_toolCallId, bashCommand, signal, onUpdate, _ctx) {
|
|
280
276
|
const { command } = bashCommand;
|
|
281
|
-
const jobStatusMatch = command.match(/^__atomic_bash_job\s+(\S+)$/);
|
|
282
|
-
if (jobStatusMatch) {
|
|
283
|
-
const job = getManagedBashJob(jobStatusMatch[1]);
|
|
284
|
-
if (!job)
|
|
285
|
-
throw new Error(`Unknown bash async job: ${jobStatusMatch[1]}`);
|
|
286
|
-
if (job.status !== "running")
|
|
287
|
-
asyncJobManager?.acknowledgeDeliveries([job.jobId]);
|
|
288
|
-
const text = [
|
|
289
|
-
`Job ${job.jobId}: ${job.status}`,
|
|
290
|
-
`Command: ${job.command}`,
|
|
291
|
-
job.error ? `Error: ${job.error}` : undefined,
|
|
292
|
-
job.output,
|
|
293
|
-
]
|
|
294
|
-
.filter(Boolean)
|
|
295
|
-
.join("\n");
|
|
296
|
-
return {
|
|
297
|
-
content: [{ type: "text", text }],
|
|
298
|
-
details: {
|
|
299
|
-
async: {
|
|
300
|
-
jobId: job.jobId,
|
|
301
|
-
type: "bash",
|
|
302
|
-
state: job.status,
|
|
303
|
-
command: job.command,
|
|
304
|
-
status: job.status,
|
|
305
|
-
},
|
|
306
|
-
exitCode: job.exitCode,
|
|
307
|
-
timeoutSeconds: job.timeoutSeconds,
|
|
308
|
-
...(job.requestedTimeoutSeconds !== undefined
|
|
309
|
-
? { requestedTimeoutSeconds: job.requestedTimeoutSeconds }
|
|
310
|
-
: {}),
|
|
311
|
-
...(job.fullOutputPath ? { fullOutputPath: job.fullOutputPath } : {}),
|
|
312
|
-
wallTimeMs: (job.endedAt ?? Date.now()) - job.startedAt,
|
|
313
|
-
},
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
const jobCancelMatch = command.match(/^__atomic_bash_job_cancel\s+(\S+)$/);
|
|
317
|
-
if (jobCancelMatch) {
|
|
318
|
-
const job = abortManagedBashJob(jobCancelMatch[1]);
|
|
319
|
-
if (!job)
|
|
320
|
-
throw new Error(`Unknown bash async job: ${jobCancelMatch[1]}`);
|
|
321
|
-
asyncJobManager?.acknowledgeDeliveries([job.jobId]);
|
|
322
|
-
return {
|
|
323
|
-
content: [{ type: "text", text: `Cancellation requested for bash job ${job.jobId}` }],
|
|
324
|
-
details: {
|
|
325
|
-
async: {
|
|
326
|
-
jobId: job.jobId,
|
|
327
|
-
type: "bash",
|
|
328
|
-
state: job.status,
|
|
329
|
-
command: job.command,
|
|
330
|
-
status: job.status,
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
277
|
const timeout = normalizeTimeoutSeconds(bashCommand.timeout);
|
|
336
278
|
const sessionEnvironment = snapshotBashSessionEnvironment(_ctx, exposeSessionEnvironment);
|
|
337
279
|
const resourceCtx = _ctx;
|
|
@@ -384,26 +326,6 @@ export function createBashToolDefinition(cwd, options) {
|
|
|
384
326
|
return bashResultToToolResult(intercepted.result);
|
|
385
327
|
const ops = intercepted?.operations ?? defaultOps;
|
|
386
328
|
const executionContext = primaryInterception ? spawnContext : (strippedCdContext ?? spawnContext);
|
|
387
|
-
if (bashCommand.async) {
|
|
388
|
-
if (!asyncEnabled)
|
|
389
|
-
throw new Error("bash async execution is disabled");
|
|
390
|
-
return startAsyncBashCommand({
|
|
391
|
-
command: executionContext.command,
|
|
392
|
-
cwd: executionContext.cwd,
|
|
393
|
-
env: executionContext.env,
|
|
394
|
-
pty: bashCommand.pty,
|
|
395
|
-
timeoutSeconds: timeout,
|
|
396
|
-
requestedTimeoutSeconds: bashCommand.timeout !== undefined && bashCommand.timeout !== timeout
|
|
397
|
-
? bashCommand.timeout
|
|
398
|
-
: undefined,
|
|
399
|
-
signal,
|
|
400
|
-
operations: ops,
|
|
401
|
-
manager: asyncJobManager,
|
|
402
|
-
deliveryHandler: asyncJobDeliveryHandler,
|
|
403
|
-
sessionId: asyncJobSessionId,
|
|
404
|
-
sessionTempDir: resolveSessionTempDir(),
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
329
|
const output = new OutputAccumulator({
|
|
408
330
|
tempFilePrefix: `${APP_NAME}-bash`,
|
|
409
331
|
tempDir: resolveSessionTempDir(),
|