@astralyn/pi 0.82.3 → 0.82.5
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 +49 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +3 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +3 -2
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +33 -14
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +2 -3
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +18 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +11 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/plan/constants.d.ts +31 -0
- package/dist/extensions/plan/constants.d.ts.map +1 -0
- package/dist/extensions/plan/constants.js +57 -0
- package/dist/extensions/plan/constants.js.map +1 -0
- package/dist/extensions/plan/index.d.ts +21 -0
- package/dist/extensions/plan/index.d.ts.map +1 -0
- package/dist/extensions/plan/index.js +291 -0
- package/dist/extensions/plan/index.js.map +1 -0
- package/dist/extensions/plan/schema.d.ts +15 -0
- package/dist/extensions/plan/schema.d.ts.map +1 -0
- package/dist/extensions/plan/schema.js +13 -0
- package/dist/extensions/plan/schema.js.map +1 -0
- package/dist/extensions/plan/state.d.ts +29 -0
- package/dist/extensions/plan/state.d.ts.map +1 -0
- package/dist/extensions/plan/state.js +74 -0
- package/dist/extensions/plan/state.js.map +1 -0
- package/dist/extensions/plan/storage.d.ts +18 -0
- package/dist/extensions/plan/storage.d.ts.map +1 -0
- package/dist/extensions/plan/storage.js +58 -0
- package/dist/extensions/plan/storage.js.map +1 -0
- package/dist/extensions/question/dialog.d.ts +3 -1
- package/dist/extensions/question/dialog.d.ts.map +1 -1
- package/dist/extensions/question/dialog.js +106 -52
- package/dist/extensions/question/dialog.js.map +1 -1
- package/dist/extensions/question/index.d.ts.map +1 -1
- package/dist/extensions/question/index.js +2 -2
- package/dist/extensions/question/index.js.map +1 -1
- package/dist/extensions/question/render-cache.d.ts +9 -0
- package/dist/extensions/question/render-cache.d.ts.map +1 -1
- package/dist/extensions/question/render-cache.js +22 -0
- package/dist/extensions/question/render-cache.js.map +1 -1
- package/dist/extensions/question/results.d.ts.map +1 -1
- package/dist/extensions/question/results.js +6 -1
- package/dist/extensions/question/results.js.map +1 -1
- package/dist/extensions/question/schema.d.ts +4 -0
- package/dist/extensions/question/schema.d.ts.map +1 -1
- package/dist/extensions/question/schema.js +19 -28
- package/dist/extensions/question/schema.js.map +1 -1
- package/dist/extensions/question/types.d.ts +1 -1
- package/dist/extensions/question/types.d.ts.map +1 -1
- package/dist/extensions/question/types.js.map +1 -1
- package/dist/extensions/rewind/anchor.d.ts +29 -0
- package/dist/extensions/rewind/anchor.d.ts.map +1 -0
- package/dist/extensions/rewind/anchor.js +35 -0
- package/dist/extensions/rewind/anchor.js.map +1 -0
- package/dist/extensions/rewind/engine.d.ts +2 -6
- package/dist/extensions/rewind/engine.d.ts.map +1 -1
- package/dist/extensions/rewind/engine.js +41 -10
- package/dist/extensions/rewind/engine.js.map +1 -1
- package/dist/extensions/rewind/index.d.ts.map +1 -1
- package/dist/extensions/rewind/index.js +55 -21
- package/dist/extensions/rewind/index.js.map +1 -1
- package/dist/extensions/rewind/menu.d.ts.map +1 -1
- package/dist/extensions/rewind/menu.js +7 -2
- package/dist/extensions/rewind/menu.js.map +1 -1
- package/dist/extensions/rewind/restore.d.ts +26 -9
- package/dist/extensions/rewind/restore.d.ts.map +1 -1
- package/dist/extensions/rewind/restore.js +58 -16
- package/dist/extensions/rewind/restore.js.map +1 -1
- package/dist/extensions/subagent/activity.d.ts +1 -0
- package/dist/extensions/subagent/activity.d.ts.map +1 -1
- package/dist/extensions/subagent/activity.js +20 -4
- package/dist/extensions/subagent/activity.js.map +1 -1
- package/dist/extensions/subagent/agents.d.ts.map +1 -1
- package/dist/extensions/subagent/agents.js +13 -18
- package/dist/extensions/subagent/agents.js.map +1 -1
- package/dist/extensions/subagent/constants.d.ts +5 -4
- package/dist/extensions/subagent/constants.d.ts.map +1 -1
- package/dist/extensions/subagent/constants.js +12 -5
- package/dist/extensions/subagent/constants.js.map +1 -1
- package/dist/extensions/subagent/index.d.ts.map +1 -1
- package/dist/extensions/subagent/index.js +12 -5
- package/dist/extensions/subagent/index.js.map +1 -1
- package/dist/extensions/subagent/render.d.ts.map +1 -1
- package/dist/extensions/subagent/render.js +166 -41
- package/dist/extensions/subagent/render.js.map +1 -1
- package/dist/extensions/subagent/resolve.d.ts +2 -5
- package/dist/extensions/subagent/resolve.d.ts.map +1 -1
- package/dist/extensions/subagent/resolve.js +8 -13
- package/dist/extensions/subagent/resolve.js.map +1 -1
- package/dist/extensions/subagent/runner.d.ts +3 -1
- package/dist/extensions/subagent/runner.d.ts.map +1 -1
- package/dist/extensions/subagent/runner.js +115 -66
- package/dist/extensions/subagent/runner.js.map +1 -1
- package/dist/extensions/subagent/schema.d.ts +0 -6
- package/dist/extensions/subagent/schema.d.ts.map +1 -1
- package/dist/extensions/subagent/schema.js +3 -4
- package/dist/extensions/subagent/schema.js.map +1 -1
- package/dist/extensions/subagent/sdk-runner.d.ts.map +1 -1
- package/dist/extensions/subagent/sdk-runner.js +37 -16
- package/dist/extensions/subagent/sdk-runner.js.map +1 -1
- package/dist/extensions/subagent/types.d.ts +10 -2
- package/dist/extensions/subagent/types.d.ts.map +1 -1
- package/dist/extensions/subagent/types.js.map +1 -1
- package/dist/extensions/todo/constants.d.ts +1 -1
- package/dist/extensions/todo/constants.d.ts.map +1 -1
- package/dist/extensions/todo/constants.js +29 -4
- package/dist/extensions/todo/constants.js.map +1 -1
- package/dist/extensions/todo/index.d.ts +1 -1
- package/dist/extensions/todo/index.d.ts.map +1 -1
- package/dist/extensions/todo/index.js +22 -3
- package/dist/extensions/todo/index.js.map +1 -1
- package/dist/extensions/todo/schema.d.ts +6 -5
- package/dist/extensions/todo/schema.d.ts.map +1 -1
- package/dist/extensions/todo/schema.js +20 -9
- package/dist/extensions/todo/schema.js.map +1 -1
- package/dist/extensions/todo/state.d.ts +5 -1
- package/dist/extensions/todo/state.d.ts.map +1 -1
- package/dist/extensions/todo/state.js +184 -38
- package/dist/extensions/todo/state.js.map +1 -1
- package/dist/extensions/todo/view.d.ts.map +1 -1
- package/dist/extensions/todo/view.js +10 -6
- package/dist/extensions/todo/view.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +36 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/utils/coalescing-terminal.d.ts +116 -0
- package/dist/utils/coalescing-terminal.d.ts.map +1 -0
- package/dist/utils/coalescing-terminal.js +256 -0
- package/dist/utils/coalescing-terminal.js.map +1 -0
- package/docs/bundled/extensions/README.md +1 -0
- package/docs/bundled/extensions/plan.md +31 -0
- package/docs/bundled/extensions/question.md +9 -7
- package/docs/bundled/extensions/rewind.md +19 -8
- package/docs/bundled/extensions/subagent.md +16 -16
- package/docs/bundled/extensions/todo.md +5 -3
- package/docs/compaction.md +6 -2
- package/docs/docs.json +4 -0
- package/docs/extensions.md +4 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,8 @@ Exactly one mode is required per call:
|
|
|
8
8
|
|
|
9
9
|
- **Single**: `agent`, `description`, and `prompt`.
|
|
10
10
|
- **Parallel**: `tasks`, an array of independent task objects.
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
There is deliberately no chain mode: sequential work is driven by the parent, which reads each report before writing the next briefing.
|
|
12
13
|
|
|
13
14
|
Every task object has:
|
|
14
15
|
|
|
@@ -17,11 +18,9 @@ agent? Agent profile name; defaults to general
|
|
|
17
18
|
description Short UI label
|
|
18
19
|
prompt Self-contained worker briefing
|
|
19
20
|
cwd? Relative directory inside the parent working directory
|
|
20
|
-
model? Temporary provider/model override
|
|
21
|
-
thinking? Temporary thinking-level override
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
Parallel
|
|
23
|
+
Parallel batches allow at most eight tasks. A session-scoped gate runs at most five workers concurrently, including sibling `subagent` calls from the same parent session.
|
|
25
24
|
|
|
26
25
|
## Agent profiles
|
|
27
26
|
|
|
@@ -50,26 +49,26 @@ Project definitions are loaded only after Pi trusts the project. Invalid Markdow
|
|
|
50
49
|
|
|
51
50
|
Built-in profiles:
|
|
52
51
|
|
|
53
|
-
- `general`: read, bash, edit,
|
|
54
|
-
- `explorer`:
|
|
52
|
+
- `general`: read, bash, edit, and write.
|
|
53
|
+
- `explorer`: `read`, `grep`, `find`, and `ls`, plus `bash` constrained by its system prompt to read-only inspection (git history, counting, and similar).
|
|
55
54
|
|
|
56
|
-
A profile may only allow Pi built-in tools. Child sessions load no extensions, skills, or prompt templates, so a worker cannot recursively call `subagent` or inherit unrelated extension capabilities. Project context files such as `AGENTS.md` remain available.
|
|
55
|
+
A profile may only allow Pi built-in tools. Child sessions load no extensions, skills, or prompt templates, so a worker cannot recursively call `subagent` or inherit unrelated extension capabilities. Project context files such as `AGENTS.md` remain available, except for the built-in `explorer`, which skips them: read-only exploration needs no commit/PR rules, and the parent interprets its results.
|
|
57
56
|
|
|
58
57
|
## Model and thinking selection
|
|
59
58
|
|
|
60
|
-
The model/thinking resolution
|
|
59
|
+
The model/thinking resolution has exactly two layers:
|
|
61
60
|
|
|
62
61
|
```text
|
|
63
|
-
|
|
64
|
-
> saved /agents profile override
|
|
65
|
-
> profile Markdown frontmatter
|
|
66
|
-
> current parent session
|
|
62
|
+
saved /agents profile override > current parent session
|
|
67
63
|
```
|
|
68
64
|
|
|
65
|
+
Callers cannot pick models per call, and profile Markdown `model`/`thinking`
|
|
66
|
+
frontmatter is intentionally ignored: agent files travel across machines, so a
|
|
67
|
+
pinned model rarely exists in the reader's environment.
|
|
68
|
+
|
|
69
69
|
Run `/agents` to choose a profile and set either field to:
|
|
70
70
|
|
|
71
|
-
- **inherit**:
|
|
72
|
-
- **agent default**: clear the saved override and use Markdown/default inheritance;
|
|
71
|
+
- **inherit**: follow the parent session's current value;
|
|
73
72
|
- a configured `provider/model` or explicit supported thinking level.
|
|
74
73
|
|
|
75
74
|
Overrides are user-owned and saved atomically in:
|
|
@@ -84,8 +83,9 @@ They apply only to future subagent runs and never change the parent session's `/
|
|
|
84
83
|
|
|
85
84
|
- The parent tool call waits until every worker reaches a terminal state.
|
|
86
85
|
- Parent abort, `/reload`, `/new`, `/resume`, `/fork`, and session shutdown abort active child sessions. Queued workers do not survive the call.
|
|
87
|
-
- Parallel worker failures do not cancel other independent workers.
|
|
88
|
-
-
|
|
86
|
+
- Parallel worker failures do not cancel other independent workers.
|
|
87
|
+
- Transient provider errors auto-retry: the worker session retries retryable stream errors with backoff (visible as `Retrying (n/m) in Xs…`), and a failure that produced no work (for example a preflight auth throw) is rerun at the task level up to two more times. Runs with partial work behind them are never rerun.
|
|
88
|
+
- Progress is rendered in Pi's native tool transcript. The collapsed view shows an intent line (for example `Verifying changes`), the current tool marked with `›`, live elapsed time, usage with a `ctx:` context watermark, and the configured expand hint. The call-level status dot belongs to the tool shell; run and activity rows only use `›`, `○`, `✓`, `×`, and `■`. `Ctrl+O` shows bounded activities and final Markdown reports; expanded batches start with a numbered contents list whose numbers match the `──` section headers.
|
|
89
89
|
- Full child transcripts are not stored separately. Bounded run details remain in the parent tool result, so completed calls restore naturally in the parent session tree.
|
|
90
90
|
- Nested usage is returned with the tool result and included in parent session accounting.
|
|
91
91
|
|
|
@@ -4,10 +4,12 @@ Adds a `todo` tool plus `/todos` for multi-step work, with a live overlay above
|
|
|
4
4
|
|
|
5
5
|
## Behavior
|
|
6
6
|
|
|
7
|
-
- Actions: `create`, `update`, `list`, `get`, `delete`, `clear`. Statuses: `pending`, `in_progress`, `completed`, `deleted`. `list` accepts an optional `status` filter and `includeDeleted`; `status: "deleted"` includes tombstones directly.
|
|
7
|
+
- Actions: `create`, `update`, `list`, `get`, `delete`, `clear`. Statuses: `pending`, `in_progress`, `completed`, `deleted`. `list` accepts an optional `status` filter and `includeDeleted`; `status: "deleted"` includes tombstones directly. Parameters that do not apply to the chosen action are rejected with guidance (for example `blockedBy` on `update` points at `addBlockedBy`/`removeBlockedBy`) instead of being silently ignored.
|
|
8
8
|
- The live overlay renders above the editor and hides itself when there are no visible tasks.
|
|
9
|
-
- Creation always starts a task as `pending
|
|
10
|
-
-
|
|
9
|
+
- Creation always starts a task as `pending` and requires both `subject` and `description` (what done means); `blockedBy` dependencies are supported for sequencing, and missing dependencies, deleted dependencies, self-dependencies, and cycles are rejected. A task cannot move to `in_progress` or `completed` until every `blockedBy` dependency is `completed` (a task that is already active may still take on a new incomplete dependency — a prerequisite discovered mid-work).
|
|
10
|
+
- `update` manages both edge directions: `addBlockedBy`/`removeBlockedBy` change what the task waits on, `addBlocks`/`removeBlocks` change what waits on it (stored as the targets' `blockedBy`, with the same validation and cycle checks). An empty string removes `description`, `activeForm`, or `owner`; `metadata` merges with `null` deleting keys.
|
|
11
|
+
- `list` lines show only unresolved blockers plus the task's `@owner`; full `blockedBy`/`blocks` detail lives in `get`.
|
|
12
|
+
- Deletion — via `delete` or `update` with `status: "deleted"` — leaves an immutable tombstone for branch history, removes that task from every dependent `blockedBy` list, and therefore releases dependents; the tool result names pending dependents that ended up fully unblocked. A deletion cannot be combined with other field edits in the same call. `clear` empties the list without reusing ids.
|
|
11
13
|
- Newly completed tasks remain visible for 30 seconds, then drop from the overlay; historical completions loaded by `/reload` or `/tree` stay hidden so live work remains prominent.
|
|
12
14
|
- **Exactly one `in_progress`.** Moving a task to `in_progress` auto-demotes any other `in_progress` tasks to `pending`; the tool result lists demoted ids so the model sees the side effect.
|
|
13
15
|
- **Verification soft nudge.** When a completion leaves the list fully done with 3+ completed tasks and no subject/description matching `verif|test|check|review`, the tool result appends a short NOTE (text only — `details` schema unchanged).
|
package/docs/compaction.md
CHANGED
|
@@ -284,7 +284,7 @@ Fired before auto-compaction or `/compact`. Can cancel or provide custom summary
|
|
|
284
284
|
|
|
285
285
|
```typescript
|
|
286
286
|
pi.on("session_before_compact", async (event, ctx) => {
|
|
287
|
-
const { preparation, branchEntries, customInstructions, reason, willRetry, signal } = event;
|
|
287
|
+
const { preparation, branchEntries, customInstructions, reason, timing, willRetry, signal } = event;
|
|
288
288
|
|
|
289
289
|
// preparation.messagesToSummarize - messages to summarize
|
|
290
290
|
// preparation.turnPrefixMessages - split turn prefix (if isSplitTurn)
|
|
@@ -296,10 +296,14 @@ pi.on("session_before_compact", async (event, ctx) => {
|
|
|
296
296
|
|
|
297
297
|
// branchEntries - all entries on current branch (for custom state)
|
|
298
298
|
// reason - "manual" (/compact), "threshold", or "overflow"
|
|
299
|
+
// timing - "manual", "midTurn" (between tool batches), "postRun", or "prePrompt"
|
|
299
300
|
// willRetry - whether overflow recovery intends to retry if compaction produces a safe retained context
|
|
300
301
|
// signal - AbortSignal (pass to LLM calls)
|
|
301
302
|
|
|
302
|
-
// Cancel:
|
|
303
|
+
// Cancel. Consequences depend on timing: a "midTurn" cancel skips compaction
|
|
304
|
+
// for the rest of the run and the run continues at your risk of overflowing;
|
|
305
|
+
// other timings leave the over-threshold context to fail closed before the
|
|
306
|
+
// next provider request.
|
|
303
307
|
return { cancel: true };
|
|
304
308
|
|
|
305
309
|
// Custom summary:
|
package/docs/docs.json
CHANGED
package/docs/extensions.md
CHANGED
|
@@ -454,12 +454,14 @@ Fired on compaction. See [compaction.md](compaction.md) for details.
|
|
|
454
454
|
|
|
455
455
|
```typescript
|
|
456
456
|
pi.on("session_before_compact", async (event, ctx) => {
|
|
457
|
-
const { preparation, branchEntries, customInstructions, reason, willRetry, signal } = event;
|
|
457
|
+
const { preparation, branchEntries, customInstructions, reason, timing, willRetry, signal } = event;
|
|
458
458
|
|
|
459
459
|
// reason - "manual" (/compact), "threshold", or "overflow"
|
|
460
|
+
// timing - "manual", "midTurn" (between tool batches), "postRun", or "prePrompt"
|
|
460
461
|
// willRetry - whether overflow recovery intends to retry if compaction produces a safe retained context
|
|
461
462
|
|
|
462
|
-
// Cancel
|
|
463
|
+
// Cancel. A "midTurn" cancel skips compaction for the rest of the run and the
|
|
464
|
+
// run continues at your risk; other timings fail closed on the oversized context.
|
|
463
465
|
return { cancel: true };
|
|
464
466
|
|
|
465
467
|
// Custom summary:
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astralyn/pi",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@astralyn/pi",
|
|
9
|
-
"version": "0.82.
|
|
9
|
+
"version": "0.82.5",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@earendil-works/pi-agent-core": "0.82.1",
|