pi-plus-sdk 0.1.22 → 0.1.24
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 +1 -0
- package/README.md +7 -0
- package/api.d.ts +27 -0
- package/api.js +92 -92
- package/bedrock-converse-stream.js +1 -1
- package/github-copilot.js +1 -1
- package/modes/interactive/theme/dark.json +1 -1
- package/modes/interactive/theme/light.json +1 -1
- package/package.json +8 -4
- package/modes/interactive/theme/theme-schema.json +0 -361
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- Session recap failures are re-exported from the SDK surface (`packages/plus/src/extensions/recap/events.ts`): `subscribeToRecapFailures(listener)` — fires with a `{ sessionId, reason: "timeout" | "error", message }` `RecapFailure` after every failed auto-title call (the one-off recap LLM call after the first prompt or a compaction hitting its 30s timeout, or a provider error), returning an unsubscribe function — plus the `RecapFailure`/`RecapFailureReason` types. A host (e.g. the pi-plus desktop) can show its own "session name not set" indicator or trigger a retry without polling. In-process only. Hosts that wire `PlusUIDialogHandlers.notify` via `createPlusUIContext` also receive the failure as a transcript warning through the notify bridge, since the TUI warning that replaced the old stderr dump routes through the same `ui.notify`.
|
|
7
8
|
- `/plan <prompt>` in the plan extension (shared core): any argument other than the `show` / `edit` subcommands turns plan mode on (when off) and forwards the text to the model as a user message (queued as steering while the agent is streaming).
|
|
8
9
|
- The plan review dialog renders the plan as markdown instead of raw text (shared core, `packages/plus/src/extensions/plan/component.ts`): `ExitPlanMode` presents the plan file in a scrollable rendered-markdown view with the three Claude Code choices — Approve and proceed / Stay in plan mode / Edit plan — driven by ↑↓/j/k + enter, digit keys 1-3, or esc to stay (a plain-text `ui.select` remains the fallback for RPC / headless hosts). `/plan show` reuses the same view read-only, replacing the raw `ui.notify` dump.
|
|
9
10
|
|
package/README.md
CHANGED
|
@@ -80,6 +80,13 @@ await session.prompt("Review this repository");
|
|
|
80
80
|
`<agentDir>/settings.json` compaction flag (not a per-session setting), so a host
|
|
81
81
|
toggle labeled per-session would surprise users — it also flips behavior for the
|
|
82
82
|
`pipi` CLI sharing that agent dir.
|
|
83
|
+
- Session recap failures are observable: the recap extension (auto-titles the
|
|
84
|
+
session after the first prompt and every compaction) publishes every failed title
|
|
85
|
+
call to `subscribeToRecapFailures(listener)` — `{ sessionId, reason: "timeout" |
|
|
86
|
+
"error", message }` — so a host can surface "session name not set" in its own UI
|
|
87
|
+
or trigger a retry. In-process only (one process hosts the session). Hosts that
|
|
88
|
+
wire `ui.notify` also receive the failure as a transcript warning through the
|
|
89
|
+
notify bridge.
|
|
83
90
|
- The staged `package.json` has an `exports` map, so deep imports are not reachable;
|
|
84
91
|
`api.d.ts` re-exports the `@earendil-works/pi-coding-agent` types (exact-pinned
|
|
85
92
|
dependency, type resolution only — the runtime is self-contained).
|
package/api.d.ts
CHANGED
|
@@ -124,6 +124,33 @@ export interface PlusUIDialogHandlers {
|
|
|
124
124
|
|
|
125
125
|
export declare function createPlusUIContext(handlers: PlusUIDialogHandlers): ExtensionUIContext;
|
|
126
126
|
|
|
127
|
+
// --- pi-plus-session-recap failure feed (shared core, recap/events.ts) -------
|
|
128
|
+
|
|
129
|
+
/** Why a recap run failed: the auto-title call timed out, or the provider errored. */
|
|
130
|
+
export type RecapFailureReason = "timeout" | "error";
|
|
131
|
+
|
|
132
|
+
/** One failed session-recap run. */
|
|
133
|
+
export interface RecapFailure {
|
|
134
|
+
/** Session that owned the recap run. */
|
|
135
|
+
sessionId: string;
|
|
136
|
+
reason: RecapFailureReason;
|
|
137
|
+
/** Human-readable detail (timeout note or the provider error message). */
|
|
138
|
+
message: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Subscribe to session recap failures from every session in this process: the
|
|
143
|
+
* auto-title LLM call (after the first prompt and after every compaction)
|
|
144
|
+
* hitting its 30s timeout ("timeout") or a provider error ("error"). Fires
|
|
145
|
+
* after each failed run; returns an unsubscribe function. In-process only —
|
|
146
|
+
* hosts embed pi-plus in-process, which this covers. Hosts that also wire
|
|
147
|
+
* PlusUIDialogHandlers.notify receive the same failure as a transcript warning
|
|
148
|
+
* through the notify bridge.
|
|
149
|
+
*/
|
|
150
|
+
export declare function subscribeToRecapFailures(
|
|
151
|
+
listener: (failure: RecapFailure) => void,
|
|
152
|
+
): () => void;
|
|
153
|
+
|
|
127
154
|
export interface CreatePlusAgentSessionOptions extends CreateAgentSessionOptions {
|
|
128
155
|
extensionFactories?: InlineExtension[];
|
|
129
156
|
ui?: PlusUIDialogHandlers;
|