pi-agent-flow 1.8.39 → 2.0.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/README.md +33 -37
- package/agents/audit.md +18 -22
- package/agents/build.md +20 -22
- package/agents/craft.md +20 -27
- package/agents/debug.md +21 -28
- package/agents/ideas.md +18 -101
- package/agents/scout.md +15 -19
- package/dist/batch/batch-bash.d.ts +2 -2
- package/dist/batch/batch-bash.d.ts.map +1 -1
- package/dist/batch/batch-bash.js +3 -3
- package/dist/batch/batch-bash.js.map +1 -1
- package/dist/batch/constants.d.ts +19 -5
- package/dist/batch/constants.d.ts.map +1 -1
- package/dist/batch/constants.js +4 -3
- package/dist/batch/constants.js.map +1 -1
- package/dist/batch/execute.d.ts +0 -1
- package/dist/batch/execute.d.ts.map +1 -1
- package/dist/batch/execute.js +101 -10
- package/dist/batch/execute.js.map +1 -1
- package/dist/batch/fuzzy-edit.d.ts +0 -6
- package/dist/batch/fuzzy-edit.d.ts.map +1 -1
- package/dist/batch/fuzzy-edit.js +1 -1
- package/dist/batch/fuzzy-edit.js.map +1 -1
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +87 -16
- package/dist/batch/index.js.map +1 -1
- package/dist/batch/render.d.ts +0 -1
- package/dist/batch/render.d.ts.map +1 -1
- package/dist/batch/render.js +7 -101
- package/dist/batch/render.js.map +1 -1
- package/dist/batch/summary.d.ts +5 -0
- package/dist/batch/summary.d.ts.map +1 -0
- package/dist/batch/summary.js +101 -0
- package/dist/batch/summary.js.map +1 -0
- package/dist/{config.d.ts → config/config.d.ts} +34 -2
- package/dist/config/config.d.ts.map +1 -0
- package/dist/{config.js → config/config.js} +157 -9
- package/dist/config/config.js.map +1 -0
- package/dist/config/log.d.ts +27 -0
- package/dist/config/log.d.ts.map +1 -0
- package/dist/config/log.js +104 -0
- package/dist/config/log.js.map +1 -0
- package/dist/{settings-resolver.d.ts → config/settings-resolver.d.ts} +9 -2
- package/dist/config/settings-resolver.d.ts.map +1 -0
- package/dist/config/settings-resolver.js +275 -0
- package/dist/config/settings-resolver.js.map +1 -0
- package/dist/core/agents.d.ts.map +1 -0
- package/dist/{agents.js → core/agents.js} +11 -10
- package/dist/core/agents.js.map +1 -0
- package/dist/core/delegation.d.ts +24 -0
- package/dist/core/delegation.d.ts.map +1 -0
- package/dist/core/delegation.js +55 -0
- package/dist/core/delegation.js.map +1 -0
- package/dist/core/depth.d.ts.map +1 -0
- package/dist/{depth.js → core/depth.js} +9 -8
- package/dist/core/depth.js.map +1 -0
- package/dist/{executor.d.ts → core/executor.d.ts} +13 -3
- package/dist/core/executor.d.ts.map +1 -0
- package/dist/{executor.js → core/executor.js} +79 -15
- package/dist/core/executor.js.map +1 -0
- package/dist/{flow.d.ts → core/flow.d.ts} +4 -1
- package/dist/core/flow.d.ts.map +1 -0
- package/dist/{flow.js → core/flow.js} +179 -25
- package/dist/core/flow.js.map +1 -0
- package/dist/{session-mode.d.ts → core/session-mode.d.ts} +2 -1
- package/dist/core/session-mode.d.ts.map +1 -0
- package/dist/{session-mode.js → core/session-mode.js} +1 -1
- package/dist/core/session-mode.js.map +1 -0
- package/dist/core/session-registry.d.ts +16 -0
- package/dist/core/session-registry.d.ts.map +1 -0
- package/dist/core/session-registry.js +30 -0
- package/dist/core/session-registry.js.map +1 -0
- package/dist/core/transitions.d.ts.map +1 -0
- package/dist/{transitions.js → core/transitions.js} +1 -1
- package/dist/core/transitions.js.map +1 -0
- package/dist/flow/command.d.ts +8 -0
- package/dist/flow/command.d.ts.map +1 -0
- package/dist/flow/command.js +189 -0
- package/dist/flow/command.js.map +1 -0
- package/dist/flow/continuation.d.ts +16 -0
- package/dist/flow/continuation.d.ts.map +1 -0
- package/dist/flow/continuation.js +151 -0
- package/dist/flow/continuation.js.map +1 -0
- package/dist/flow/index.d.ts +15 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +22 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/flow/settings-command.d.ts +51 -0
- package/dist/flow/settings-command.d.ts.map +1 -0
- package/dist/flow/settings-command.js +851 -0
- package/dist/flow/settings-command.js.map +1 -0
- package/dist/flow/store.d.ts +26 -0
- package/dist/flow/store.d.ts.map +1 -0
- package/dist/flow/store.js +158 -0
- package/dist/flow/store.js.map +1 -0
- package/dist/flow/template-strings.d.ts +8 -0
- package/dist/flow/template-strings.d.ts.map +1 -0
- package/dist/flow/template-strings.js +39 -0
- package/dist/flow/template-strings.js.map +1 -0
- package/dist/flow/types.d.ts +55 -0
- package/dist/flow/types.d.ts.map +1 -0
- package/dist/flow/types.js +5 -0
- package/dist/flow/types.js.map +1 -0
- package/dist/flow/warp-command.d.ts +9 -0
- package/dist/flow/warp-command.d.ts.map +1 -0
- package/dist/flow/warp-command.js +405 -0
- package/dist/flow/warp-command.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +115 -32
- package/dist/index.js.map +1 -1
- package/dist/{notify-state.d.ts → notify/notify-state.d.ts} +2 -1
- package/dist/notify/notify-state.d.ts.map +1 -0
- package/dist/notify/notify-state.js.map +1 -0
- package/dist/notify/notify.d.ts.map +1 -0
- package/dist/{notify.js → notify/notify.js} +3 -2
- package/dist/notify/notify.js.map +1 -0
- package/dist/{cli-args.d.ts → snapshot/cli-args.d.ts} +4 -2
- package/dist/snapshot/cli-args.d.ts.map +1 -0
- package/dist/{cli-args.js → snapshot/cli-args.js} +10 -1
- package/dist/snapshot/cli-args.js.map +1 -0
- package/dist/snapshot/index.d.ts +2 -0
- package/dist/snapshot/index.d.ts.map +1 -0
- package/dist/snapshot/index.js +2 -0
- package/dist/snapshot/index.js.map +1 -0
- package/dist/{reasoning-strip.d.ts → snapshot/reasoning-strip.d.ts} +0 -4
- package/dist/snapshot/reasoning-strip.d.ts.map +1 -0
- package/dist/{reasoning-strip.js → snapshot/reasoning-strip.js} +2 -2
- package/dist/snapshot/reasoning-strip.js.map +1 -0
- package/dist/{runner-events.d.ts → snapshot/runner-events.d.ts} +13 -1
- package/dist/snapshot/runner-events.d.ts.map +1 -0
- package/dist/{runner-events.js → snapshot/runner-events.js} +16 -4
- package/dist/snapshot/runner-events.js.map +1 -0
- package/dist/{snapshot.d.ts → snapshot/snapshot.d.ts} +29 -3
- package/dist/snapshot/snapshot.d.ts.map +1 -0
- package/dist/{snapshot.js → snapshot/snapshot.js} +347 -39
- package/dist/snapshot/snapshot.js.map +1 -0
- package/dist/{structured-output.d.ts → snapshot/structured-output.d.ts} +1 -1
- package/dist/snapshot/structured-output.d.ts.map +1 -0
- package/dist/{structured-output.js → snapshot/structured-output.js} +13 -0
- package/dist/snapshot/structured-output.js.map +1 -0
- package/dist/{flow-prompt.d.ts → steering/flow-prompt.d.ts} +2 -2
- package/dist/steering/flow-prompt.d.ts.map +1 -0
- package/dist/{flow-prompt.js → steering/flow-prompt.js} +3 -3
- package/dist/steering/flow-prompt.js.map +1 -0
- package/dist/{sliding-prompt.d.ts → steering/sliding-prompt.d.ts} +8 -7
- package/dist/steering/sliding-prompt.d.ts.map +1 -0
- package/dist/{sliding-prompt.js → steering/sliding-prompt.js} +15 -64
- package/dist/steering/sliding-prompt.js.map +1 -0
- package/dist/{tool-utils.d.ts → steering/tool-utils.d.ts} +1 -0
- package/dist/steering/tool-utils.d.ts.map +1 -0
- package/dist/{tool-utils.js → steering/tool-utils.js} +10 -3
- package/dist/steering/tool-utils.js.map +1 -0
- package/dist/{ask-user.d.ts → tools/ask-user.d.ts} +3 -15
- package/dist/tools/ask-user.d.ts.map +1 -0
- package/dist/tools/ask-user.js +778 -0
- package/dist/tools/ask-user.js.map +1 -0
- package/dist/{timed-bash.d.ts → tools/timed-bash.d.ts} +2 -7
- package/dist/tools/timed-bash.d.ts.map +1 -0
- package/dist/{timed-bash.js → tools/timed-bash.js} +2 -2
- package/dist/tools/timed-bash.js.map +1 -0
- package/dist/{web-tool.d.ts → tools/web-tool.d.ts} +1 -1
- package/dist/tools/web-tool.d.ts.map +1 -0
- package/dist/{web-tool.js → tools/web-tool.js} +8 -7
- package/dist/tools/web-tool.js.map +1 -0
- package/dist/tui/flow-colors.d.ts +55 -0
- package/dist/tui/flow-colors.d.ts.map +1 -0
- package/dist/tui/flow-colors.js +22 -0
- package/dist/tui/flow-colors.js.map +1 -0
- package/dist/{render-utils.d.ts → tui/render-utils.d.ts} +1 -1
- package/dist/tui/render-utils.d.ts.map +1 -0
- package/dist/{render-utils.js → tui/render-utils.js} +3 -3
- package/dist/tui/render-utils.js.map +1 -0
- package/dist/tui/render.d.ts +21 -0
- package/dist/tui/render.d.ts.map +1 -0
- package/dist/tui/render.js +813 -0
- package/dist/tui/render.js.map +1 -0
- package/dist/tui/scramble/algorithm.d.ts +7 -0
- package/dist/tui/scramble/algorithm.d.ts.map +1 -0
- package/dist/tui/scramble/algorithm.js +227 -0
- package/dist/tui/scramble/algorithm.js.map +1 -0
- package/dist/tui/scramble/constants.d.ts +99 -0
- package/dist/tui/scramble/constants.d.ts.map +1 -0
- package/dist/tui/scramble/constants.js +101 -0
- package/dist/tui/scramble/constants.js.map +1 -0
- package/dist/tui/scramble/index.d.ts +6 -0
- package/dist/tui/scramble/index.d.ts.map +1 -0
- package/dist/tui/scramble/index.js +6 -0
- package/dist/tui/scramble/index.js.map +1 -0
- package/dist/tui/scramble/manager.d.ts +48 -0
- package/dist/tui/scramble/manager.d.ts.map +1 -0
- package/dist/tui/scramble/manager.js +959 -0
- package/dist/tui/scramble/manager.js.map +1 -0
- package/dist/tui/scramble/utils.d.ts +18 -0
- package/dist/tui/scramble/utils.d.ts.map +1 -0
- package/dist/tui/scramble/utils.js +145 -0
- package/dist/tui/scramble/utils.js.map +1 -0
- package/dist/tui/single-select-layout.d.ts +17 -0
- package/dist/tui/single-select-layout.d.ts.map +1 -0
- package/dist/{single-select-layout.js → tui/single-select-layout.js} +8 -25
- package/dist/tui/single-select-layout.js.map +1 -0
- package/dist/types/flow.d.ts +110 -0
- package/dist/types/flow.d.ts.map +1 -0
- package/dist/{types.js → types/flow.js} +3 -54
- package/dist/types/flow.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/output.d.ts +104 -0
- package/dist/types/output.d.ts.map +1 -0
- package/dist/types/output.js +5 -0
- package/dist/types/output.js.map +1 -0
- package/dist/types/ui.d.ts +24 -0
- package/dist/types/ui.d.ts.map +1 -0
- package/dist/types/ui.js +55 -0
- package/dist/types/ui.js.map +1 -0
- package/package.json +7 -4
- package/dist/agents.d.ts.map +0 -1
- package/dist/agents.js.map +0 -1
- package/dist/ask-user.d.ts.map +0 -1
- package/dist/ask-user.js +0 -1405
- package/dist/ask-user.js.map +0 -1
- package/dist/batch.d.ts +0 -12
- package/dist/batch.d.ts.map +0 -1
- package/dist/batch.js +0 -11
- package/dist/batch.js.map +0 -1
- package/dist/cli-args.d.ts.map +0 -1
- package/dist/cli-args.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/depth.d.ts.map +0 -1
- package/dist/depth.js.map +0 -1
- package/dist/executor.d.ts.map +0 -1
- package/dist/executor.js.map +0 -1
- package/dist/flow-prompt.d.ts.map +0 -1
- package/dist/flow-prompt.js.map +0 -1
- package/dist/flow.d.ts.map +0 -1
- package/dist/flow.js.map +0 -1
- package/dist/notify-state.d.ts.map +0 -1
- package/dist/notify-state.js.map +0 -1
- package/dist/notify.d.ts.map +0 -1
- package/dist/notify.js.map +0 -1
- package/dist/reasoning-strip.d.ts.map +0 -1
- package/dist/reasoning-strip.js.map +0 -1
- package/dist/render-utils.d.ts.map +0 -1
- package/dist/render-utils.js.map +0 -1
- package/dist/render.d.ts +0 -24
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -592
- package/dist/render.js.map +0 -1
- package/dist/runner-events.d.ts.map +0 -1
- package/dist/runner-events.js.map +0 -1
- package/dist/scramble.d.ts +0 -171
- package/dist/scramble.d.ts.map +0 -1
- package/dist/scramble.js +0 -2261
- package/dist/scramble.js.map +0 -1
- package/dist/session-mode.d.ts.map +0 -1
- package/dist/session-mode.js.map +0 -1
- package/dist/settings-resolver.d.ts.map +0 -1
- package/dist/settings-resolver.js +0 -148
- package/dist/settings-resolver.js.map +0 -1
- package/dist/single-select-layout.d.ts +0 -20
- package/dist/single-select-layout.d.ts.map +0 -1
- package/dist/single-select-layout.js.map +0 -1
- package/dist/sliding-prompt.d.ts.map +0 -1
- package/dist/sliding-prompt.js.map +0 -1
- package/dist/snapshot.d.ts.map +0 -1
- package/dist/snapshot.js.map +0 -1
- package/dist/spec-mode.d.ts +0 -13
- package/dist/spec-mode.d.ts.map +0 -1
- package/dist/spec-mode.js +0 -90
- package/dist/spec-mode.js.map +0 -1
- package/dist/structured-output.d.ts.map +0 -1
- package/dist/structured-output.js.map +0 -1
- package/dist/timed-bash.d.ts.map +0 -1
- package/dist/timed-bash.js.map +0 -1
- package/dist/tool-utils.d.ts.map +0 -1
- package/dist/tool-utils.js.map +0 -1
- package/dist/transitions.d.ts.map +0 -1
- package/dist/transitions.js.map +0 -1
- package/dist/types.d.ts +0 -208
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/web-tool.d.ts.map +0 -1
- package/dist/web-tool.js.map +0 -1
- /package/dist/{agents.d.ts → core/agents.d.ts} +0 -0
- /package/dist/{depth.d.ts → core/depth.d.ts} +0 -0
- /package/dist/{transitions.d.ts → core/transitions.d.ts} +0 -0
- /package/dist/{notify-state.js → notify/notify-state.js} +0 -0
- /package/dist/{notify.d.ts → notify/notify.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -42,31 +42,45 @@ pi install .
|
|
|
42
42
|
|
|
43
43
|
## Features
|
|
44
44
|
|
|
45
|
+
### Flow System
|
|
45
46
|
- **Flow-state delegation** — six bundled specialist flows (`scout`, `debug`, `build`, `craft`, `audit`, `ideas`) plus custom flows via Markdown front-matter
|
|
46
47
|
- **Isolated forked context** — each flow runs as an isolated `pi` child process with a session snapshot (or clean slate when configured)
|
|
47
48
|
- **Parallel execution** — batch independent flows into one call with bounded concurrency
|
|
48
|
-
- **
|
|
49
|
-
- **
|
|
50
|
-
- **Depth guards** — configurable max delegation depth (default: `3`)
|
|
49
|
+
- **Depth guards & cycle prevention** — configurable max delegation depth (default: `3`) and automatic blocking of re-entering ancestor flows
|
|
50
|
+
- **Post-flow advisories** — built-in transition matrix suggesting optimal next flows (e.g. `scout` → `build`, `debug` → `build`)
|
|
51
51
|
- **Session timeout modes** — child flows use controlled budgets: `fast` (300s), `default` (600s), `long` (900s), or `extreme_long` (1200s)
|
|
52
52
|
- **Two-stage timeout awareness** — flows receive deadline hints in their prompt; the parent UI shows live countdowns and injects warning reminders before hard kill
|
|
53
53
|
- **Graceful shutdown** — parent `SIGINT`/`SIGTERM` propagates to all child process groups; orphaned sub-agents are force-killed after a grace period
|
|
54
|
-
- **Cycle prevention** — blocks re-entering flows already in the ancestor stack
|
|
55
54
|
- **Model tiering & failover** — flows map to `lite` / `flash` / `full` tiers with primary + failover model chains
|
|
56
55
|
- **Persistent flow mode** — switch global model strategies with `--flow-mode`; written to `settings.json` and remembered across sessions
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
### Tools
|
|
58
58
|
- **Unified batch tools** — `batch` (read/write/edit/delete) and `batch_read` replace separate file tools for cross-cutting work
|
|
59
59
|
- **Web tool** — built-in `web` search (Brave + DuckDuckGo) and page fetch with HTML→Markdown conversion
|
|
60
|
-
- **
|
|
61
|
-
- **
|
|
62
|
-
- **
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
- **Ask-user prompts** — interactive `ask_user` with overlay/inline display, preferred-choice guidance, comments, and optional timeouts
|
|
61
|
+
- **Structured reports** — every flow returns structured output with `summary`, `files`, `actions`, `commands`, `notDone`, `nextSteps`, `reasoning`, and `notes`; optional JSON schema for machine-readable results
|
|
62
|
+
- **Mechanically enriched commands** — bash commands in structured output are replaced with exact verbatim tool-call strings and annotated with `executionTime`
|
|
63
|
+
|
|
64
|
+
### TUI & Rendering
|
|
65
|
+
- **Rich activity panel** — collapsed view with per-flow stats, live countdowns, and expanded view with full reports and tool traces
|
|
66
|
+
- **Glitch scramble animations** — `glitch` text animation on act, msg, TPS lines, and tool results
|
|
65
67
|
- **Smooth streaming metrics** — token counters and smoothed TPS increment tick-by-tick during active streaming
|
|
66
|
-
- **Quad-mode TUI scramble** — `stream`, `cascade`, `ripple`, and `illuminate` text animations on act, msg, TPS lines, and tool results (batch, web, ask_user) in the collapsed activity panel (default: `illuminate`)
|
|
67
|
-
- **`/spec` command** — toggle spec-driven planning mode that guides the orchestrator through investigate → discuss → plan → delegate
|
|
68
68
|
- **Dynamic notifications** — terminal and desktop alerts adapt their title/body based on flow completion state or pending `ask_user` decisions
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
### Developer Experience
|
|
71
|
+
- **Local development loop** — `npm link` local checkout for instant iteration; `scripts/switch.sh` toggles between local and published builds
|
|
72
|
+
- **Payload dump workflow** — capture exact child-flow prompts via `PI_FLOW_DUMP_SNAPSHOT` or `--dump`; sync to repo with `scripts/sync-dumps.sh`
|
|
73
|
+
- **Steering hint** — lightweight routing reminder dynamically injected before each user message; stripped from child snapshots to avoid duplication
|
|
74
|
+
- **Session snapshot sanitization** — removes steering hints, reasoning artifacts, and non-inheritable content before forking; compresses prior flow results into compact context maps
|
|
75
|
+
- **Shared context inheritance** — child flows receive the parent's sanitized session automatically; write forward-looking intents and let the child pick up context from its inherited snapshot
|
|
76
|
+
- **Project flow confirmation** — prompts before running project-local flows from `.pi/agents/` for security
|
|
77
|
+
- **TUI-safe logging** — `logWarn`/`logError` routes to a log file instead of stderr during TUI rendering to prevent on-screen text flash
|
|
78
|
+
|
|
79
|
+
### Configuration
|
|
80
|
+
- **Flow model strategies** — define tiered model chains (`lite` / `flash` / `full`) with `flowModelConfigs`; switch modes via `--flow-mode` (performance / balance / quality)
|
|
81
|
+
- **Flow settings** — persistent runtime defaults under `flowSettings` (session mode, concurrency, tool optimization, structured output)
|
|
82
|
+
- **CLI flags** — `--flow-max-depth`, `--flow-session-mode`, `--flow-max-concurrency`, `--no-steering`, `--no-animation`, and more
|
|
83
|
+
- **Environment variables** — `PI_FLOW_DUMP_SNAPSHOT`, `PI_FLOW_MAX_DEPTH`, `PI_FLOW_TOOL_OPTIMIZE`, `PI_TUI_MODE`, and others
|
|
70
84
|
|
|
71
85
|
---
|
|
72
86
|
|
|
@@ -173,27 +187,6 @@ Flows are aware of their deadline from the moment they start:
|
|
|
173
187
|
|
|
174
188
|
---
|
|
175
189
|
|
|
176
|
-
## `/spec` Command
|
|
177
|
-
|
|
178
|
-
Toggle spec-driven planning mode with the `/spec` command. When active, the steering hint instructs the orchestrator to follow a four-phase workflow:
|
|
179
|
-
|
|
180
|
-
1. **Investigate** — read package files, tests, and config directly; delegate broad discovery to `[scout]`
|
|
181
|
-
2. **Discuss** — ask 2–3 targeted, evidence-based questions via `ask_user`, marking the recommended choice with `[preferred]`
|
|
182
|
-
3. **Recommend Exit** — prompt the user to type `/spec` when ready to proceed; do not initiate builds yourself
|
|
183
|
-
4. **Synthesize** — on `/spec` deactivation, a plan is auto-generated from the conversation and placed in the editor for review
|
|
184
|
-
|
|
185
|
-
Run `/spec` with a prompt to activate immediately and start investigating:
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
/spec Add a REST API endpoint for user preferences
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Run `/spec` without arguments to toggle the mode on or off. When off, the orchestrator uses the standard implement-mode behavior: investigate first, then delegate directly to flows.
|
|
192
|
-
|
|
193
|
-
When you deactivate spec mode, a new session is created and the orchestrator synthesizes a full implementation plan from the conversation history, placing it in the editor for review.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
190
|
## Flow Definitions
|
|
198
191
|
|
|
199
192
|
Create `.md` files in `~/.pi/agent/agents/` (user-level) or `.pi/agents/` (project-level):
|
|
@@ -502,10 +495,13 @@ per-flow sessionMode > --flow-session-mode > PI_FLOW_SESSION_MODE > flowSettings
|
|
|
502
495
|
| `PI_FLOW_REMINDER_FILE` | Path to a file the parent writes warning messages into; the timed-bash wrapper reads it before each tool call |
|
|
503
496
|
| `PI_FLOW_DEBUG_CONTEXT` | Set to `1` to emit context-compression telemetry to stderr |
|
|
504
497
|
| `PI_OFFLINE` | Always set to `1` for child flow processes |
|
|
498
|
+
| `PI_FLOW_NO_STEERING` | Set to `1` to disable orchestrator steering hint injection |
|
|
505
499
|
| `PI_FLOW_NO_STRATEGIC_HINT` | Set to `1` to suppress the strategic planning hints appended after tool calls |
|
|
506
|
-
| `
|
|
507
|
-
| `
|
|
508
|
-
| `
|
|
500
|
+
| `PI_FLOW_NO_ANIMATION` | Set to `1` to disable all flow animation (instant render) |
|
|
501
|
+
| `PI_FLOW_NO_GLITCH` | Set to `1` to disable glitch/scramble effect |
|
|
502
|
+
| `PI_FLOW_LOG_FILE` | TUI-safe log file path (default: `$TMPDIR/pi-agent-flow.log`; set to `/dev/null` to suppress) |
|
|
503
|
+
| `PI_FLOW_DUMP_MAX_AGE_HOURS` | Max age of dump files before auto-cleanup deletes them (default: `168` = 7 days) |
|
|
504
|
+
| `PI_FLOW_SKIP_STRUCTURED_DIRECTIVE` | Set to `1` to skip structured output directive if a provider rejects that prompt shape |
|
|
509
505
|
|
|
510
506
|
### Notifications
|
|
511
507
|
|
package/agents/audit.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit
|
|
3
|
-
description: Audit security
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Audit security quality correctness and apply fixes
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: flash
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
mission: During this audit flow your mission is to verify and remediate quality security and correctness issues. Be adversarial look for what others miss fix safe issues directly and treat the conversation history above as background reference only.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
4. Fix — apply safe, localized fixes directly with available tools.
|
|
19
|
-
5. Verify — run relevant tests or checks after fixes when practical.
|
|
20
|
-
6. Report — distinguish fixed issues from remaining risks.
|
|
21
|
-
|
|
22
|
-
## Rules
|
|
23
|
-
|
|
24
|
-
- Be specific: cite exact file paths and line numbers.
|
|
25
|
-
- If code is clean, say so; do not invent issues.
|
|
26
|
-
- Fix issues autonomously when the fix is safe and localized.
|
|
27
|
-
- Do not apply risky rewrites or broad redesigns from audit; flag them with severity instead.
|
|
28
|
-
- If a fix requires broader redesign, recommend [craft] in [Next Steps].
|
|
29
|
-
- If root cause is unclear, recommend [debug] rather than guessing.
|
|
11
|
+
workflow:
|
|
12
|
+
1 Scope: identify the files behavior or change set to audit
|
|
13
|
+
2 Inspect: review security correctness maintainability and performance risks use batch with o read s offset l limit for targeted file reading instead of bash sed head tail
|
|
14
|
+
3 Classify: assign severity and explain the impact of each issue found
|
|
15
|
+
4 Fix: apply safe localized fixes directly with available tools
|
|
16
|
+
5 Verify: run relevant tests or checks after fixes when practical
|
|
17
|
+
6 Report: distinguish fixed issues from remaining risks
|
|
30
18
|
|
|
19
|
+
rules:
|
|
20
|
+
Be specific cite exact file paths and line numbers
|
|
21
|
+
If code is clean say so do not invent issues
|
|
22
|
+
Fix issues autonomously when the fix is safe and localized
|
|
23
|
+
Do not apply risky rewrites or broad redesigns from audit flag them with severity instead
|
|
24
|
+
If a fix requires broader redesign recommend craft in next steps
|
|
25
|
+
If root cause is unclear recommend debug rather than guessing
|
|
26
|
+
See _conventions for tmp scripts and batch reads
|
package/agents/build.md
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build
|
|
3
|
-
description: Implement features
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Implement features fix bugs write tests deploy and ship
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: flash
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
mission: Implement and verify changes. Verify first then ship. Prior conversation is background reference only.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
workflow:
|
|
12
|
+
1 Analyze: read existing code for context
|
|
13
|
+
2 Plan: outline approach before modifying
|
|
14
|
+
3 Test: write or identify a failing test when practical
|
|
15
|
+
4 Execute: implement changes following core principles
|
|
16
|
+
5 Verify: run tests and checks refactor only if working
|
|
17
|
+
6 Ship: commit push monitor CI fix failures until green
|
|
18
|
+
7 Cleanup: delete old branch local and remote if requested otherwise leave the branch for the user to merge
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Rules
|
|
24
|
-
|
|
25
|
-
- Follow SOLID, DRY, KISS.
|
|
26
|
-
- Run `git branch --show-current` before making changes.
|
|
27
|
-
- Commit with conventional messages: `feat:`, `fix:`, `refactor:`.
|
|
28
|
-
- Always squash-merge into `main` (`git merge --squash`); delete old branch after merge.
|
|
29
|
-
- Update relevant docs; if none changed, state why.
|
|
30
|
-
- Unexpected errors → recommend [debug], don't guess.
|
|
20
|
+
rules:
|
|
21
|
+
Follow SOLID (Single Responsibility Open Closed Liskov Substitution Interface Segregation Dependency Inversion) DRY (Do Not Repeat Yourself) KISS (Keep It Simple Stupid) TDD (Test Driven Development)
|
|
22
|
+
Run git branch show current before making changes
|
|
23
|
+
Commit with conventional messages feat fix refactor
|
|
24
|
+
Do not merge to main unless the user explicitly requests it
|
|
25
|
+
If merging use squash merge
|
|
26
|
+
Update relevant docs if none changed, state why
|
|
27
|
+
Unexpected errors recommend debug do not guess
|
|
28
|
+
See _conventions for tmp scripts and batch reads
|
package/agents/craft.md
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: craft
|
|
3
|
-
description: Plan structure
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Plan structure break down requirements design solutions
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: full
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Favor clean migration: if a redesign is warranted, cut fully rather than leaving half-measures.
|
|
28
|
-
- Document trade-offs explicitly when the optimal path is unclear.
|
|
29
|
-
- Do not implement changes from this flow unless explicitly requested.
|
|
30
|
-
|
|
31
|
-
## Note
|
|
32
|
-
|
|
33
|
-
This flow operates in design mode — produce plans and specifications, not implementations. When a clean-slate redesign is warranted by the requirements, embrace it fully: define the target architecture, migration steps, and rollback strategy. When incremental change suffices, prefer it. The key principle is intentional design over accidental complexity.
|
|
9
|
+
mission: During this craft flow your mission is to design a clear well structured plan for implementation. Think architecturally evaluate the full landscape design for clean migration and treat the conversation history above as background reference only.
|
|
10
|
+
|
|
11
|
+
workflow:
|
|
12
|
+
1 Understand: define the problem constraints existing behavior and success criteria
|
|
13
|
+
2 Explore: map relevant patterns dependencies and existing architecture use batch with o read s offset l limit for targeted file reading instead of bash sed head tail
|
|
14
|
+
3 Evaluate: assess whether the change fits existing patterns or requires a clean migration prefer incremental improvement when safe endorse full cut redesign when the architecture demands it
|
|
15
|
+
4 Design: produce a concrete plan with ordered tasks data flow module boundaries and interface contracts
|
|
16
|
+
5 Review: check risks edge cases test strategy migration path and handoff to build
|
|
17
|
+
|
|
18
|
+
rules:
|
|
19
|
+
Follow SOLID (Single Responsibility Open Closed Liskov Substitution Interface Segregation Dependency Inversion) DRY (Do Not Repeat Yourself) KISS (Keep It Simple Stupid)
|
|
20
|
+
Design for ten x build for one x
|
|
21
|
+
Prefer explicit assumptions and constraints over hidden decisions state what you assume and why
|
|
22
|
+
When redesigning preserve data integrity and migration paths never orphan existing consumers
|
|
23
|
+
Favor clean migration if a redesign is warranted cut fully rather than leaving half measures
|
|
24
|
+
Document trade offs explicitly when the optimal path is unclear
|
|
25
|
+
Do not implement changes from this flow unless explicitly requested
|
|
26
|
+
See _conventions for tmp scripts and batch reads
|
package/agents/debug.md
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debug
|
|
3
|
-
description:
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Hypothesis driven root cause analysis minimal instrumentation targeted fix verify
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: lite
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- Use `batch` with `o: "read"`, `s: <offset>`, and `l: <limit>` for targeted file reading instead of bash `sed`/`head`/`tail`.
|
|
29
|
-
- Do not suggest fixes until root cause is confirmed.
|
|
30
|
-
- Implement fixes only after root cause is confirmed.
|
|
31
|
-
- Run tests or reproduction steps after fixing.
|
|
32
|
-
- Documentation-only updates are required after finishing the work when relevant and safe; if no docs changed, explain why in the final report.
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
mission: Find why the bug happens not the first plausible story prove it with runtime or test evidence apply the smallest safe fix verify then clean up. Treat conversation history as background only.
|
|
10
|
+
|
|
11
|
+
workflow:
|
|
12
|
+
1 Reproduce: nail exact steps inputs env and expected vs actual if you cannot reproduce say what is missing
|
|
13
|
+
2 Hypothesize: list three to five concrete causes subsystem branch timing data shape each must be falsifiable
|
|
14
|
+
3 Instrument: add minimal temporary logs or probes so one run can support or reject several hypotheses in parallel tag each log with hypothesisId prefer existing test hooks or stderr over noisy prints
|
|
15
|
+
4 Run once: clear prior logs if applicable reproduce read the evidence before editing logic
|
|
16
|
+
5 Conclude: for each hypothesis state CONFIRMED REJECTED or INCONCLUSIVE with cited lines log stack trace assertion
|
|
17
|
+
6 Fix: only after a hypothesis is confirmed by evidence no speculative guards revert any change tied to a rejected hypothesis
|
|
18
|
+
7 Verify: same repro plus tests compare before and after evidence no sleep or polling hacks as fixes unless the product contract truly requires delay
|
|
19
|
+
8 Finalize: remove temporary instrumentation after verification or when orchestrator confirms if applicable update relevant docs, runbooks, or troubleshooting notes after finishing Documentation-only updates are required after finishing the work
|
|
20
|
+
|
|
21
|
+
rules:
|
|
22
|
+
Evidence before edits read errors failing tests and traces before wide code reads
|
|
23
|
+
Targeted reads use batch with o read s and l avoid bash sed head tail for source
|
|
24
|
+
No fix without proof do not ship guesses if blocked report what evidence is still missing
|
|
25
|
+
Keep instrumentation through verification do not strip logs until the post fix run proves the fix or the user confirms
|
|
26
|
+
State missing evidence or environment gaps do not invent a fix
|
|
27
|
+
See _conventions for tmp scripts and batch reads
|
package/agents/ideas.md
CHANGED
|
@@ -1,107 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ideas
|
|
3
|
-
description: Generate ideas
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Generate ideas explore possibilities think creatively using inherited context as background
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: full
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- If file context is needed, use `batch` with `o: "read"`, `s: <offset>`, and `l: <limit>` for targeted reading instead of bash `sed`/`head`/`tail`.
|
|
26
|
-
- Do not implement changes from this flow.
|
|
27
|
-
|
|
28
|
-
## Decision Gates
|
|
29
|
-
|
|
30
|
-
When you encounter a choice that materially affects the recommendation, **do not decide unilaterally**. Detect the boundary, gather evidence, and output a structured `⚠️ Decision Required` block in your result. The **main agent** (not this sub-flow) will present it to the user via `ask_user`.
|
|
31
|
-
|
|
32
|
-
Only emit a decision block for choices where the user's preference would **materially change** the direction.
|
|
33
|
-
|
|
34
|
-
### Triggers
|
|
35
|
-
|
|
36
|
-
1. **Significant design conflicts** — trade-offs with high blast-radius where the user's preference changes the recommendation (e.g., complexity vs. simplicity, coupling vs. isolation, build-vs-buy, monolith vs. services).
|
|
37
|
-
2. **Short-term vs. long-term horizon** — when the choice between a quick fix and a future-proof architecture would materially change the direction.
|
|
38
|
-
|
|
39
|
-
### Decision block format
|
|
40
|
-
|
|
41
|
-
When you hit a trigger, gather evidence with available tools (`batch`, `bash`, `web`), then synthesize a neutral summary and emit this exact block inside your result:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
⚠️ Decision Required: <one-line, focused question>
|
|
45
|
-
Context:
|
|
46
|
-
<3–7 bullet or short-paragraph summary of current state, constraints, trade-offs, and a recommendation if you have one>
|
|
47
|
-
Options:
|
|
48
|
-
1. <title> — <short description>
|
|
49
|
-
2. <title> — <short description>
|
|
50
|
-
[3–4. ...]
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Rules for the decision block:
|
|
54
|
-
- One focused question only. Do not bundle multiple unrelated decisions.
|
|
55
|
-
- Provide 2–4 distinct, labeled options with short descriptions when trade-offs are non-obvious.
|
|
56
|
-
- Do not emit more than **one** decision block for the same boundary. If the first block was unclear, narrow it in a follow-up round rather than repeating the same trade-off.
|
|
57
|
-
- After emitting the block, **stop** the current ideas round. Do not continue speculating past a confirmed ambiguity.
|
|
58
|
-
|
|
59
|
-
### Example decision blocks
|
|
60
|
-
|
|
61
|
-
**Significant design conflict:**
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
⚠️ Decision Required: Which persistence strategy should we adopt for the shared state module?
|
|
65
|
-
Context:
|
|
66
|
-
• Current design has two viable paths.
|
|
67
|
-
• In-memory: simplest implementation, fastest reads, no external dependency, but state is lost on restart and cannot be shared across instances.
|
|
68
|
-
• Redis: survives restarts, supports horizontal scaling, adds infra complexity and network latency.
|
|
69
|
-
• Recommendation: start in-memory and migrate to Redis only if multi-instance deployment becomes a real requirement.
|
|
70
|
-
Options:
|
|
71
|
-
1. In-memory cache — Zero-dependency, fastest, not shared across instances
|
|
72
|
-
2. Redis-backed store — Scalable and durable, adds ops overhead
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Short-term vs. long-term horizon:**
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
⚠️ Decision Required: Should we ship a minimal regex-based parser now or build a proper AST parser first?
|
|
79
|
-
Context:
|
|
80
|
-
• The user wants config-file validation.
|
|
81
|
-
• Regex parser: can be done in ~1 day, covers 90% of cases, brittle on nested structures.
|
|
82
|
-
• AST parser: takes ~3 days, handles all edge cases, enables future linting and auto-fix.
|
|
83
|
-
• The config format is still evolving; a brittle parser may need a full rewrite in two weeks.
|
|
84
|
-
Options:
|
|
85
|
-
1. Ship regex parser now — Fastest path, accept rewrite risk if format changes
|
|
86
|
-
2. Build AST parser first — Future-proof, higher upfront cost
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Anti-overasking guardrails
|
|
90
|
-
|
|
91
|
-
Apply a strict decision-block budget per boundary:
|
|
92
|
-
|
|
93
|
-
- **Max 1** decision block per decision boundary in normal cases.
|
|
94
|
-
- **Max 2** decision blocks for the same boundary when the first was unclear.
|
|
95
|
-
- Never repeat the same trade-off without new evidence.
|
|
96
|
-
|
|
97
|
-
Escalation ladder:
|
|
98
|
-
|
|
99
|
-
1. **Attempt 1:** structured options + concise context (examples above).
|
|
100
|
-
2. **Attempt 2 (only if needed):** narrower question with your explicit recommendation:
|
|
101
|
-
- `Proceed with recommended option`
|
|
102
|
-
- `Choose another option` (triggers freeform)
|
|
103
|
-
- `Stop for now`
|
|
104
|
-
|
|
105
|
-
After attempt 2:
|
|
106
|
-
- If the boundary is a **significant design conflict** or **horizon choice**: **stop and mark blocked**. Do not continue emitting decision blocks.
|
|
107
|
-
- If the boundary is **ambiguity-only** and the user says "your call" or equivalent: proceed with the most reversible default, state assumptions explicitly, and continue.
|
|
9
|
+
mission: During this ideas flow your mission is to generate and compare possible directions. Use inherited context as background and constraints but avoid anchoring too tightly on prior solutions.
|
|
10
|
+
|
|
11
|
+
workflow:
|
|
12
|
+
1 Diverge: explore many possibilities without judging too early
|
|
13
|
+
2 Evaluate: compare trade offs risks effort and reversibility
|
|
14
|
+
3 Recommend: identify the strongest options and explain why
|
|
15
|
+
4 Package: present choices clearly enough for planning or implementation handoff
|
|
16
|
+
|
|
17
|
+
rules:
|
|
18
|
+
Stay focused on the requested intent creativity should still serve the objective
|
|
19
|
+
Prefer several distinct options over variations of the same idea
|
|
20
|
+
Make assumptions explicit when evidence is limited
|
|
21
|
+
If file context is needed use batch with o read s offset l limit for targeted reading instead of bash sed head tail
|
|
22
|
+
Do not implement changes from this flow
|
|
23
|
+
See _conventions for batch reads and tmp scripts
|
|
24
|
+
See decision gates for material choices that require user preference
|
package/agents/scout.md
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scout
|
|
3
|
-
description: Discover files
|
|
4
|
-
tools: batch
|
|
3
|
+
description: Discover files trace code paths map architecture
|
|
4
|
+
tools: batch bash find grep ls web
|
|
5
5
|
maxDepth: 0
|
|
6
6
|
tier: lite
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
mission: During this scout flow your mission is to discover relevant context. Move fast stay surgical and treat the conversation history above as background reference only. This is a read oriented flow do not modify files.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
workflow:
|
|
12
|
+
1 Survey: use ls find and grep to locate relevant files and symbols before reading whole files
|
|
13
|
+
2 Inspect: use batch with o read s offset l limit for targeted file reading instead of bash sed head tail
|
|
14
|
+
3 Trace: if batch returns a context map for a large file use the reported line ranges for targeted follow up reads then follow code paths dependencies configuration and tests that explain the requested area
|
|
15
|
+
4 Report: cite concrete evidence with precise file paths and line ranges stop when the requested context is mapped
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Rules
|
|
22
|
-
|
|
23
|
-
- This is a read-oriented flow: do not modify files.
|
|
24
|
-
- Cite every finding with a precise file path and line number or range.
|
|
25
|
-
- Include relevant snippets or evidence inline so citations are verifiable.
|
|
26
|
-
- Show actual code/data, not excessive summaries.
|
|
27
|
-
- If something is not found, say so directly — do not guess.
|
|
17
|
+
rules:
|
|
18
|
+
This is a read oriented flow do not modify files
|
|
19
|
+
Cite every finding with a precise file path and line number or range
|
|
20
|
+
Include relevant snippets or evidence inline so citations are verifiable
|
|
21
|
+
Show actual code or data not excessive summaries
|
|
22
|
+
If something is not found say so directly do not guess
|
|
23
|
+
See _conventions for batch reads and tmp scripts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BashOpResult, type PendingBashResult } from "./constants.js";
|
|
2
|
-
|
|
2
|
+
interface TrackedBashResult {
|
|
3
3
|
id: string;
|
|
4
4
|
command: string;
|
|
5
5
|
status: "ok" | "error" | "aborted";
|
|
@@ -64,7 +64,6 @@ export declare function executeBatchBash(ops: Array<{
|
|
|
64
64
|
}>, defaultCwd: string, tracker: BashProcessTracker, signal?: AbortSignal, softTimeoutMs?: number): Promise<BashOpResult[]>;
|
|
65
65
|
/** Poll for completed bash results. */
|
|
66
66
|
export declare function pollBatchBashResults(ids: string[], tracker: BashProcessTracker): PendingBashResult[];
|
|
67
|
-
export declare const BatchBashPollParams: any;
|
|
68
67
|
export declare function createBatchBashPollTool(tracker: BashProcessTracker): {
|
|
69
68
|
name: string;
|
|
70
69
|
label: string;
|
|
@@ -89,4 +88,5 @@ export declare function createBatchBashPollTool(tracker: BashProcessTracker): {
|
|
|
89
88
|
isError: boolean;
|
|
90
89
|
}>;
|
|
91
90
|
};
|
|
91
|
+
export {};
|
|
92
92
|
//# sourceMappingURL=batch-bash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-bash.d.ts","sourceRoot":"","sources":["../../src/batch/batch-bash.ts"],"names":[],"mappings":"AAiBA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAKtB,MAAM,gBAAgB,CAAC;AAgBxB,
|
|
1
|
+
{"version":3,"file":"batch-bash.d.ts","sourceRoot":"","sources":["../../src/batch/batch-bash.ts"],"names":[],"mappings":"AAiBA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAKtB,MAAM,gBAAgB,CAAC;AAgBxB,UAAU,iBAAiB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,SAAS,CAAwC;IAEzD,sFAAsF;IACtF,MAAM,CACL,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,WAAW,GAClB,IAAI;IAoFP,2CAA2C;IAC3C,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI9B,0DAA0D;IAC1D,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAOlC,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIjD,iFAAiF;IACjF,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIxD,mFAAmF;IACnF,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAMvD,+CAA+C;IAC/C,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI5C,wCAAwC;IACxC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIjC,qCAAqC;IACrC,OAAO,CAAC,SAAS;IAWjB,6CAA6C;IAC7C,QAAQ,IAAI,IAAI;CAKhB;AAWD,sEAAsE;AACtE,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA8B,EACxC,QAAQ,GAAE,MAA8B,GACtC,MAAM,CAiCR;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASrF;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,KAAK,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAC5D,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,WAAW,EACpB,aAAa,GAAE,MAA6B,GAC1C,OAAO,CAAC,YAAY,EAAE,CAAC,CAqDzB;AAoCD,uCAAuC;AACvC,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,MAAM,EAAE,EACb,OAAO,EAAE,kBAAkB,GACzB,iBAAiB,EAAE,CAgCrB;AAaD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,kBAAkB;;;;;;;4BAgBzC,OAAO,GAAG,OAAO;yBAS3B,MAAM,SACZ,OAAO,YACJ,WAAW,cACT,OAAO;;;;;;;;;;;;;;;EAqCrB"}
|
package/dist/batch/batch-bash.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { appendStrategicHintOnce } from "../tool-utils.js";
|
|
1
|
+
import { appendStrategicHintOnce } from "../steering/tool-utils.js";
|
|
2
2
|
/**
|
|
3
3
|
* batch bash -- parallel bash execution and polling.
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@ import { appendStrategicHintOnce } from "../tool-utils.js";
|
|
|
14
14
|
import { spawn } from "node:child_process";
|
|
15
15
|
import { Type } from "@sinclair/typebox";
|
|
16
16
|
import { BASH_SOFT_TIMEOUT_MS, BASH_POLL_TAIL_LINES, MAX_BASH_OUTPUT_BYTES, MAX_BASH_OUTPUT_LINES, } from "./constants.js";
|
|
17
|
-
import { classifyDuration } from "../timed-bash.js";
|
|
17
|
+
import { classifyDuration } from "../tools/timed-bash.js";
|
|
18
18
|
/**
|
|
19
19
|
* Process tracker for batch bash operations.
|
|
20
20
|
* Both the `batch` tool (launch side) and `batch_bash_poll` tool (read side)
|
|
@@ -332,7 +332,7 @@ export function pollBatchBashResults(ids, tracker) {
|
|
|
332
332
|
// ---------------------------------------------------------------------------
|
|
333
333
|
// Poll tool schema & factory
|
|
334
334
|
// ---------------------------------------------------------------------------
|
|
335
|
-
|
|
335
|
+
const BatchBashPollParams = Type.Object({
|
|
336
336
|
i: Type.Array(Type.String(), {
|
|
337
337
|
description: "Array of bash operation IDs to poll for results.",
|
|
338
338
|
minItems: 1,
|