@astralyn/pi 1.4.9 → 1.4.11
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 +69 -0
- package/dist/bundle/chunks/{chunk-BAGHIP5J.js → chunk-NUQMVNKQ.js} +3 -3
- package/dist/bundle/chunks/{chunk-3PKXUKTB.js → chunk-PUU43PDV.js} +121 -136
- package/dist/bundle/chunks/{chunk-F66AY3WR.js → chunk-TH3QDDPD.js} +1 -1
- package/dist/bundle/chunks/{execute-P22VMM2H.js → execute-VLAIP26K.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-VKMBQTR2.js → virtual-modules-63XNTSVN.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/agent-session.d.ts +34 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +99 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +14 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/isolated-session.d.ts +7 -2
- package/dist/core/isolated-session.d.ts.map +1 -1
- package/dist/core/isolated-session.js +7 -3
- package/dist/core/isolated-session.js.map +1 -1
- package/dist/core/session-manager.d.ts +17 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +29 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/tasks/delivery.d.ts +31 -12
- package/dist/core/tasks/delivery.d.ts.map +1 -1
- package/dist/core/tasks/delivery.js +97 -36
- package/dist/core/tasks/delivery.js.map +1 -1
- package/dist/core/tasks/execution.d.ts +27 -14
- package/dist/core/tasks/execution.d.ts.map +1 -1
- package/dist/core/tasks/execution.js +90 -86
- package/dist/core/tasks/execution.js.map +1 -1
- package/dist/core/tasks/limits.d.ts +7 -11
- package/dist/core/tasks/limits.d.ts.map +1 -1
- package/dist/core/tasks/limits.js +8 -16
- package/dist/core/tasks/limits.js.map +1 -1
- package/dist/core/tasks/output.d.ts +9 -1
- package/dist/core/tasks/output.d.ts.map +1 -1
- package/dist/core/tasks/output.js +23 -10
- package/dist/core/tasks/output.js.map +1 -1
- package/dist/core/tasks/presentation.d.ts +1 -1
- package/dist/core/tasks/presentation.d.ts.map +1 -1
- package/dist/core/tasks/presentation.js +6 -4
- package/dist/core/tasks/presentation.js.map +1 -1
- package/dist/core/tasks/record.d.ts +41 -29
- package/dist/core/tasks/record.d.ts.map +1 -1
- package/dist/core/tasks/record.js +82 -37
- package/dist/core/tasks/record.js.map +1 -1
- package/dist/core/tasks/reminder.js +2 -2
- package/dist/core/tasks/reminder.js.map +1 -1
- package/dist/core/tasks/runtime.d.ts +15 -23
- package/dist/core/tasks/runtime.d.ts.map +1 -1
- package/dist/core/tasks/runtime.js +50 -178
- package/dist/core/tasks/runtime.js.map +1 -1
- package/dist/core/tasks/scheduler.d.ts +3 -1
- package/dist/core/tasks/scheduler.d.ts.map +1 -1
- package/dist/core/tasks/scheduler.js +16 -12
- package/dist/core/tasks/scheduler.js.map +1 -1
- package/dist/core/tasks/session.d.ts +24 -6
- package/dist/core/tasks/session.d.ts.map +1 -1
- package/dist/core/tasks/session.js +70 -22
- package/dist/core/tasks/session.js.map +1 -1
- package/dist/core/tasks/store.d.ts +17 -4
- package/dist/core/tasks/store.d.ts.map +1 -1
- package/dist/core/tasks/store.js +45 -48
- package/dist/core/tasks/store.js.map +1 -1
- package/dist/core/tasks/types.d.ts +64 -93
- package/dist/core/tasks/types.d.ts.map +1 -1
- package/dist/core/tasks/types.js +7 -0
- package/dist/core/tasks/types.js.map +1 -1
- package/dist/core/tools/shell-execution.d.ts.map +1 -1
- package/dist/core/tools/shell-execution.js +2 -1
- package/dist/core/tools/shell-execution.js.map +1 -1
- package/dist/core/tools/shell-tool.d.ts.map +1 -1
- package/dist/core/tools/shell-tool.js +20 -13
- package/dist/core/tools/shell-tool.js.map +1 -1
- package/dist/extensions/agent/activity-lines.d.ts +10 -0
- package/dist/extensions/agent/activity-lines.d.ts.map +1 -0
- package/dist/extensions/agent/activity-lines.js +76 -0
- package/dist/extensions/agent/activity-lines.js.map +1 -0
- package/dist/extensions/agent/activity.d.ts +25 -4
- package/dist/extensions/agent/activity.d.ts.map +1 -1
- package/dist/extensions/agent/activity.js +76 -21
- package/dist/extensions/agent/activity.js.map +1 -1
- package/dist/extensions/agent/artifacts.d.ts +15 -0
- package/dist/extensions/agent/artifacts.d.ts.map +1 -0
- package/dist/extensions/agent/artifacts.js +44 -0
- package/dist/extensions/agent/artifacts.js.map +1 -0
- package/dist/extensions/agent/progress.d.ts +30 -4
- package/dist/extensions/agent/progress.d.ts.map +1 -1
- package/dist/extensions/agent/progress.js +84 -11
- package/dist/extensions/agent/progress.js.map +1 -1
- package/dist/extensions/agent/render.d.ts.map +1 -1
- package/dist/extensions/agent/render.js +8 -24
- package/dist/extensions/agent/render.js.map +1 -1
- package/dist/extensions/agent/report.d.ts +11 -3
- package/dist/extensions/agent/report.d.ts.map +1 -1
- package/dist/extensions/agent/report.js +32 -7
- package/dist/extensions/agent/report.js.map +1 -1
- package/dist/extensions/agent/tool.d.ts.map +1 -1
- package/dist/extensions/agent/tool.js +20 -5
- package/dist/extensions/agent/tool.js.map +1 -1
- package/dist/extensions/agent/types.d.ts +2 -0
- package/dist/extensions/agent/types.d.ts.map +1 -1
- package/dist/extensions/agent/types.js.map +1 -1
- package/dist/extensions/agent/worker.d.ts +7 -0
- package/dist/extensions/agent/worker.d.ts.map +1 -1
- package/dist/extensions/agent/worker.js +9 -3
- package/dist/extensions/agent/worker.js.map +1 -1
- package/dist/extensions/cached-compaction/summary.d.ts +1 -1
- package/dist/extensions/cached-compaction/summary.d.ts.map +1 -1
- package/dist/extensions/cached-compaction/summary.js +13 -16
- package/dist/extensions/cached-compaction/summary.js.map +1 -1
- package/dist/extensions/search/index.d.ts.map +1 -1
- package/dist/extensions/search/index.js +6 -7
- package/dist/extensions/search/index.js.map +1 -1
- package/dist/extensions/tasks/tool/actions.d.ts +1 -2
- package/dist/extensions/tasks/tool/actions.d.ts.map +1 -1
- package/dist/extensions/tasks/tool/actions.js +12 -80
- package/dist/extensions/tasks/tool/actions.js.map +1 -1
- package/dist/extensions/tasks/tool/constants.d.ts +1 -3
- package/dist/extensions/tasks/tool/constants.d.ts.map +1 -1
- package/dist/extensions/tasks/tool/constants.js +1 -3
- package/dist/extensions/tasks/tool/constants.js.map +1 -1
- package/dist/extensions/tasks/tool/schema.d.ts +2 -3
- package/dist/extensions/tasks/tool/schema.d.ts.map +1 -1
- package/dist/extensions/tasks/tool/schema.js +10 -18
- package/dist/extensions/tasks/tool/schema.js.map +1 -1
- package/dist/extensions/tasks/tool/types.d.ts +1 -17
- package/dist/extensions/tasks/tool/types.d.ts.map +1 -1
- package/dist/extensions/tasks/tool/types.js.map +1 -1
- package/dist/extensions/tasks/tool.d.ts +1 -2
- package/dist/extensions/tasks/tool.d.ts.map +1 -1
- package/dist/extensions/tasks/tool.js +5 -6
- package/dist/extensions/tasks/tool.js.map +1 -1
- package/dist/extensions/tasks/ui/completion-render.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/completion-render.js +2 -2
- package/dist/extensions/tasks/ui/completion-render.js.map +1 -1
- package/dist/extensions/tasks/ui/footer.d.ts +37 -0
- package/dist/extensions/tasks/ui/footer.d.ts.map +1 -0
- package/dist/extensions/tasks/ui/footer.js +129 -0
- package/dist/extensions/tasks/ui/footer.js.map +1 -0
- package/dist/extensions/tasks/ui/frame.d.ts +36 -0
- package/dist/extensions/tasks/ui/frame.d.ts.map +1 -0
- package/dist/extensions/tasks/ui/frame.js +33 -0
- package/dist/extensions/tasks/ui/frame.js.map +1 -0
- package/dist/extensions/tasks/ui/help.d.ts +6 -0
- package/dist/extensions/tasks/ui/help.d.ts.map +1 -0
- package/dist/extensions/tasks/ui/help.js +53 -0
- package/dist/extensions/tasks/ui/help.js.map +1 -0
- package/dist/extensions/tasks/ui/inspector.d.ts +4 -3
- package/dist/extensions/tasks/ui/inspector.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/inspector.js +25 -6
- package/dist/extensions/tasks/ui/inspector.js.map +1 -1
- package/dist/extensions/tasks/ui/layout.d.ts +15 -18
- package/dist/extensions/tasks/ui/layout.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/layout.js +162 -255
- package/dist/extensions/tasks/ui/layout.js.map +1 -1
- package/dist/extensions/tasks/ui/list.d.ts +3 -1
- package/dist/extensions/tasks/ui/list.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/list.js +19 -14
- package/dist/extensions/tasks/ui/list.js.map +1 -1
- package/dist/extensions/tasks/ui/manager.d.ts +17 -5
- package/dist/extensions/tasks/ui/manager.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/manager.js +147 -90
- package/dist/extensions/tasks/ui/manager.js.map +1 -1
- package/dist/extensions/tasks/ui/model.d.ts +32 -5
- package/dist/extensions/tasks/ui/model.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/model.js +7 -7
- package/dist/extensions/tasks/ui/model.js.map +1 -1
- package/dist/extensions/tasks/ui/panes.d.ts +40 -0
- package/dist/extensions/tasks/ui/panes.d.ts.map +1 -0
- package/dist/extensions/tasks/ui/panes.js +144 -0
- package/dist/extensions/tasks/ui/panes.js.map +1 -0
- package/dist/extensions/tasks/ui/render.d.ts +2 -16
- package/dist/extensions/tasks/ui/render.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/render.js +13 -85
- package/dist/extensions/tasks/ui/render.js.map +1 -1
- package/dist/extensions/tasks/ui/viewport.d.ts +12 -4
- package/dist/extensions/tasks/ui/viewport.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/viewport.js +23 -7
- package/dist/extensions/tasks/ui/viewport.js.map +1 -1
- package/dist/extensions/tasks/ui/views.d.ts +12 -6
- package/dist/extensions/tasks/ui/views.d.ts.map +1 -1
- package/dist/extensions/tasks/ui/views.js +39 -32
- package/dist/extensions/tasks/ui/views.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +11 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +43 -17
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +38 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +11 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +48 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/bundled/extensions/agent.md +39 -7
- package/docs/bundled/extensions/statusline.md +1 -1
- package/docs/bundled/tasks.md +28 -37
- package/docs/bundled/tool-presentation.md +1 -1
- package/docs/extensions.md +15 -13
- package/docs/json.md +3 -0
- package/docs/models-configuration.md +1 -1
- package/docs/models.md +7 -85
- package/docs/rpc.md +14 -0
- package/docs/sdk.md +12 -2
- package/docs/session-format.md +11 -5
- package/docs/sessions.md +1 -1
- package/docs/usage.md +2 -0
- package/package.json +3 -4
- package/dist/modes/interactive/tool-view/tool-execution.d.ts +0 -14
- package/dist/modes/interactive/tool-view/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/tool-view/tool-execution.js +0 -13
- package/dist/modes/interactive/tool-view/tool-execution.js.map +0 -1
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/npm-shrinkwrap.json +0 -4207
package/docs/session-format.md
CHANGED
|
@@ -10,11 +10,15 @@ Sessions are stored as JSONL (JSON Lines) files. Each line is a JSON object with
|
|
|
10
10
|
|
|
11
11
|
Pi resolves the working directory to an absolute path, removes one leading `/` or `\`, replaces every `/`, `\`, and `:` with `-`, then wraps the result in `--`. For example, `/path/to/project` is stored under `--path-to-project--`; `C:\Users\me\project` is stored under `--C--Users-me-project--`. By default the session ID is a UUID; callers can supply their own through the SDK or `--session-id`.
|
|
12
12
|
|
|
13
|
+
## Session Artifacts
|
|
14
|
+
|
|
15
|
+
A session file `<name>.jsonl` owns an artifacts directory `<name>/` beside it, created on demand by whatever writes there. The bundled `Agent` extension keeps each Agent's complete report and transcript in `<name>/agents/<task-id>/` (see [Agent](bundled/extensions/agent.md)). The directory holds nested session files, but session discovery reads only `.jsonl` files directly inside the session directory, so they never appear in `/resume` or `pi -c`. Forking or cloning a session does not copy artifacts: they belong to the session that created them. Sessions that are not persisted (`--no-session`) have no artifacts directory.
|
|
16
|
+
|
|
13
17
|
## Deleting Sessions
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
A session consists of its `.jsonl` file, its artifacts directory, and the `<name>.jsonl.tasks-late.jsonl` sidecar when present. To remove a session by hand, delete all three under `~/.pi/agent/sessions/`.
|
|
16
20
|
|
|
17
|
-
Pi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, pi uses the `trash` CLI to avoid permanent deletion.
|
|
21
|
+
Pi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). It removes the session file, its artifacts directory and its sidecar together. When available, pi uses the `trash` CLI, passing every path in one invocation, to avoid permanent deletion; otherwise it deletes them permanently. The deletion succeeds when the session file is gone, and files that could not be removed are reported.
|
|
18
22
|
|
|
19
23
|
## Session Version
|
|
20
24
|
|
|
@@ -344,7 +348,7 @@ Managed execution uses ordinary version-3 custom entries; it does not add a new
|
|
|
344
348
|
|
|
345
349
|
`task.id` is the execution ID, not a worker display number. `usage` has the `Usage` shape above and is absent when the executor reported none. Consumers count only the first valid usage settlement per ID within the entries they aggregate; malformed records, unsupported versions, blank IDs, and non-finite or negative usage/cost values are ignored. A later valid duplicate is not an adjustment. Do not create these host-owned entries yourself or bill again from a result/read/notification.
|
|
346
350
|
|
|
347
|
-
A `TaskSnapshot` has `id`, `kind` (executor-owned source label, such as `bash`, `powershell`, or an extension-defined label), `label` (human source name, such as `Bash` or `Agent`), `title`, `output` (`log` or `report`), `toolCallId`, `anchorId`, `mode`, `status`, and numeric millisecond `startedAt`; optional fields include `endedAt`, `input`, `facts`, `display`, `outputPath`, `result`, and `error`. `input` is `{ label, text, truncated, language? }`, what the task was asked to do; `facts` are up to 16 `[label, value]` Details rows, such as `["Exit", "1"]`. `result` is the bounded model-readable text and `display` is bounded human-only
|
|
351
|
+
A `TaskSnapshot` has `id`, `kind` (executor-owned source label, such as `bash`, `powershell`, or an extension-defined label), `label` (human source name, such as `Bash` or `Agent`), `title`, `output` (`log` or `report`), `toolCallId`, `anchorId`, `mode`, `status`, and numeric millisecond `startedAt`; optional fields include `endedAt`, `input`, `facts`, `display`, `outputPath`, `result`, and `error`. `input` is `{ label, text, truncated, language? }`, what the task was asked to do; `facts` are up to 16 `[label, value]` Details rows, such as `["Exit", "1"]`. `result` is the bounded model-readable text and `display` is the bounded human-only view that `/tasks` shows in place of the result; both use `{ text, truncated }`. Only the result, error and facts reach model context. Truncation flags record clipping at the producing/retention boundary. Mode (`foreground` or `background`) is independent of status and records where the task actually ran: `background` only when its caller was released with a background outcome, so a task whose result was returned inline is `foreground` even if background was requested. A terminal snapshot carries `display` only when the executor's completion supplied it. Persisted terminal statuses are `completed`, `partial`, `failed`, `cancelled`, or `timeout`; live snapshots can also be `queued`, `running`, or `stopping`.
|
|
348
352
|
|
|
349
353
|
The retained result text is bounded (up to 48 KiB) and carries no executor-private details; images are replaced with a text omission marker. Source truncation is explicit; the reader never recognizes truncation by matching output text. `outputPath`, if present, points to an ephemeral executor-owned file which may already have been removed on eviction or runtime shutdown; restored records drop it. Save important output separately.
|
|
350
354
|
|
|
@@ -381,11 +385,11 @@ A shell completion's `details` can look like this:
|
|
|
381
385
|
|
|
382
386
|
The message carries everything needed for replay after `/reload`, branch navigation, history eviction or restart; rendering does not open the saved log or query a live task. Unsupported or malformed completion details, including versions 1 and 2, use bounded plain message text. There is no legacy text parser, dual-format reconstruction or migration.
|
|
383
387
|
|
|
384
|
-
A completion is acknowledged only after its message is persisted
|
|
388
|
+
A completion is acknowledged only after its message is persisted; reads and aborting during an output read cannot consume a notification. Snapshots and repeated reads do not create more usage. Historical extension-owned `background-task` notifications and old `bg create` and `tasks wait` tool results remain transcript history shown as saved text, not new runnable tasks.
|
|
385
389
|
|
|
386
390
|
Session-wide statistics aggregate the ledger across all entries; the bundled Statusline uses the active branch. Accrued retries, failures, cancellations and worker compaction count when usage is reported. No usage is invented for a provider that does not expose it, and worker billing does not occupy the parent's context window. See [SDK session statistics](sdk.md#session-statistics).
|
|
387
391
|
|
|
388
|
-
**Late settlement quarantine:** an executor that ignores cancellation and settles after its runtime or launch branch is retired cannot append to the replacement session or move its active leaf. The originating session retains the latest 32 bounded quarantine records in memory. For persisted sessions it also appends audit JSONL to `<session-file>.tasks-late.jsonl`, with `{ version: 1, sessionId, generation, task, usage? }`. A sidecar write failure is reported and leaves only the bounded in-memory record. This sidecar is separate from the session tree and active totals; it is not automatically reconciled, replayed or used to resume execution. Preserve it if you need to audit late provider costs
|
|
392
|
+
**Late settlement quarantine:** an executor that ignores cancellation and settles after its runtime or launch branch is retired cannot append to the replacement session or move its active leaf. The originating session retains the latest 32 bounded quarantine records in memory. For persisted sessions it also appends audit JSONL to `<session-file>.tasks-late.jsonl`, with `{ version: 1, sessionId, generation, task, usage? }`. A sidecar write failure is reported and leaves only the bounded in-memory record. This sidecar is separate from the session tree and active totals; it is not automatically reconciled, replayed or used to resume execution. Preserve it if you need to audit late provider costs. Deleting the session from `/resume` also removes its sidecar.
|
|
389
393
|
|
|
390
394
|
### CustomMessageEntry
|
|
391
395
|
|
|
@@ -516,6 +520,7 @@ Import `SessionManager` and its session types from `@astralyn/pi` as shown above
|
|
|
516
520
|
|
|
517
521
|
- `SessionManager.create(cwd: string, sessionDir?: string, options?: NewSessionOptions): SessionManager` — create a persisted session.
|
|
518
522
|
- `SessionManager.open(path: string, sessionDir?: string, cwdOverride?: string): SessionManager` — open a session file. `cwdOverride` takes precedence over the header's `cwd`.
|
|
523
|
+
- `SessionManager.createAt(path: string, cwd: string, options?: NewSessionOptions): SessionManager` — create a persisted session at an exact file path, creating its directory. As for any session, the file appears once it holds a conversation.
|
|
519
524
|
- `SessionManager.continueRecent(cwd: string, sessionDir?: string): SessionManager` — open the most recent session or create one.
|
|
520
525
|
- `SessionManager.inMemory(cwd?: string, options?: NewSessionOptions, entries?: FileEntry[]): SessionManager` — create a non-persisted session, optionally initialized from entries.
|
|
521
526
|
- `SessionManager.forkFrom(sourcePath: string, targetCwd: string, sessionDir?: string, options?: NewSessionOptions): SessionManager` — fork into another working directory.
|
|
@@ -567,6 +572,7 @@ All of these return the appended entry ID:
|
|
|
567
572
|
- `getEntries(): SessionEntry[]` and `getHeader(): SessionHeader | null`
|
|
568
573
|
- `getSessionName(): string | undefined`
|
|
569
574
|
- `getCwd(): string`, `getSessionDir(): string`, `getSessionId(): string`, and `getSessionFile(): string | undefined`
|
|
575
|
+
- `getArtifactDir(): string | undefined` — the directory the session file owns (`<name>/` for `<name>.jsonl`), or `undefined` when the session is not persisted. It is not created for you; create it before writing. Also available on `ctx.sessionManager` in extensions.
|
|
570
576
|
- `usesDefaultSessionDir(): boolean` and `isPersisted(): boolean`
|
|
571
577
|
|
|
572
578
|
## Virtual selections and nested calls
|
package/docs/sessions.md
CHANGED
|
@@ -48,7 +48,7 @@ In the picker you can:
|
|
|
48
48
|
- rename with Ctrl+R
|
|
49
49
|
- delete with Ctrl+D, then confirm
|
|
50
50
|
|
|
51
|
-
When available, pi uses the `trash` CLI for deletion instead of permanently removing files.
|
|
51
|
+
Deleting a session also removes its artifacts directory (such as saved Agent reports and transcripts) and its late-task sidecar. When available, pi uses the `trash` CLI for deletion instead of permanently removing files.
|
|
52
52
|
|
|
53
53
|
## Naming Sessions
|
|
54
54
|
|
package/docs/usage.md
CHANGED
|
@@ -178,6 +178,8 @@ See [Pi Packages](packages.md) for package sources and security notes.
|
|
|
178
178
|
|
|
179
179
|
Print mode writes errors to stderr. A final assistant response with an `error` or `aborted` stop reason exits nonzero; a response cut off at the model's output token limit (a `length` stop reason) still prints its partial text to stdout, warns on stderr, and also exits nonzero.
|
|
180
180
|
|
|
181
|
+
Print mode and `--mode json` wait for Background tasks started by a prompt: the process stays alive until every unsettled task has finished and the turn that delivers its result has completed, so the printed response is the one that follows the result. While it waits, one line on stderr names the running tasks. Ctrl+C (`SIGINT`) or `SIGTERM` stops the wait, terminates the work and exits (130 and 143); a second signal exits at once.
|
|
182
|
+
|
|
181
183
|
In print mode, pi also reads piped stdin and merges it into the initial prompt:
|
|
182
184
|
|
|
183
185
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astralyn/pi",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.11",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
"docs",
|
|
26
26
|
"examples",
|
|
27
27
|
"schemas",
|
|
28
|
-
"CHANGELOG.md"
|
|
29
|
-
"npm-shrinkwrap.json"
|
|
28
|
+
"CHANGELOG.md"
|
|
30
29
|
],
|
|
31
30
|
"scripts": {
|
|
32
31
|
"clean": "shx rm -rf dist",
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
"verify:package-install": "node scripts/verify-package-install.mjs",
|
|
54
53
|
"profile:tui": "node scripts/profile-node.mjs --mode tui",
|
|
55
54
|
"profile:rpc": "node scripts/profile-node.mjs --mode rpc",
|
|
56
|
-
"
|
|
55
|
+
"lockfile": "npm install --package-lock-only --ignore-scripts",
|
|
57
56
|
"prepare": "husky",
|
|
58
57
|
"prepublishOnly": "npm run clean && npm run build"
|
|
59
58
|
},
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { TUI } from "@earendil-works/pi-tui";
|
|
2
|
-
import { ToolExecutionComponent as NativeToolExecutionComponent, type ToolExecutionOptions } from "../components/tool-execution.ts";
|
|
3
|
-
import { type ToolDefinitionLike } from "./shell.ts";
|
|
4
|
-
export type { ToolRenderers } from "../../../core/extensions/types.ts";
|
|
5
|
-
export type { ToolExecutionOptions } from "../components/tool-execution.ts";
|
|
6
|
-
/**
|
|
7
|
-
* Compatibility entry point for the distribution's original tool-view import path.
|
|
8
|
-
* Lifecycle and renderer composition live in the native component; this adapter only supplies
|
|
9
|
-
* the default shell for callers that construct the old distribution component directly.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ToolExecutionComponent extends NativeToolExecutionComponent {
|
|
12
|
-
constructor(toolName: string, toolCallId: string, args: any, options: ToolExecutionOptions | undefined, toolDefinition: ToolDefinitionLike | undefined, ui: TUI, cwd: string);
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=tool-execution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/tool-view/tool-execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACN,sBAAsB,IAAI,4BAA4B,EACtD,KAAK,oBAAoB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,YAAY,CAAC;AAEpE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5E;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,4BAA4B;gBAEtE,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,oBAAoB,YAAK,EAClC,cAAc,EAAE,kBAAkB,GAAG,SAAS,EAC9C,EAAE,EAAE,GAAG,EACP,GAAG,EAAE,MAAM;CAIZ"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ToolExecutionComponent as NativeToolExecutionComponent, } from "../components/tool-execution.js";
|
|
2
|
-
import { withToolShell } from "./shell.js";
|
|
3
|
-
/**
|
|
4
|
-
* Compatibility entry point for the distribution's original tool-view import path.
|
|
5
|
-
* Lifecycle and renderer composition live in the native component; this adapter only supplies
|
|
6
|
-
* the default shell for callers that construct the old distribution component directly.
|
|
7
|
-
*/
|
|
8
|
-
export class ToolExecutionComponent extends NativeToolExecutionComponent {
|
|
9
|
-
constructor(toolName, toolCallId, args, options = {}, toolDefinition, ui, cwd) {
|
|
10
|
-
super(toolName, toolCallId, args, options, withToolShell(toolName, toolDefinition), ui, cwd);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=tool-execution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution.js","sourceRoot":"","sources":["../../../../src/modes/interactive/tool-view/tool-execution.ts"],"names":[],"mappings":"AACA,OAAO,EACN,sBAAsB,IAAI,4BAA4B,GAEtD,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA2B,aAAa,EAAE,MAAM,YAAY,CAAC;AAKpE;;;;GAIG;AACH,MAAM,OAAO,sBAAuB,SAAQ,4BAA4B;IACvE,YACC,QAAgB,EAChB,UAAkB,EAClB,IAAS,EACT,UAAgC,EAAE,EAClC,cAA8C,EAC9C,EAAO,EACP,GAAW;QAEX,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE,cAAc,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAC9F,CAAC;CACD","sourcesContent":["import type { TUI } from \"@earendil-works/pi-tui\";\nimport {\n\tToolExecutionComponent as NativeToolExecutionComponent,\n\ttype ToolExecutionOptions,\n} from \"../components/tool-execution.ts\";\nimport { type ToolDefinitionLike, withToolShell } from \"./shell.ts\";\n\nexport type { ToolRenderers } from \"../../../core/extensions/types.ts\";\nexport type { ToolExecutionOptions } from \"../components/tool-execution.ts\";\n\n/**\n * Compatibility entry point for the distribution's original tool-view import path.\n * Lifecycle and renderer composition live in the native component; this adapter only supplies\n * the default shell for callers that construct the old distribution component directly.\n */\nexport class ToolExecutionComponent extends NativeToolExecutionComponent {\n\tconstructor(\n\t\ttoolName: string,\n\t\ttoolCallId: string,\n\t\targs: any,\n\t\toptions: ToolExecutionOptions = {},\n\t\ttoolDefinition: ToolDefinitionLike | undefined,\n\t\tui: TUI,\n\t\tcwd: string,\n\t) {\n\t\tsuper(toolName, toolCallId, args, options, withToolShell(toolName, toolDefinition), ui, cwd);\n\t}\n}\n"]}
|
|
Binary file
|
package/docs/images/exy.png
DELETED
|
Binary file
|