pi-plus-sdk 0.1.14 → 0.1.15

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/api.js +8 -8
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - `/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
+ - 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
+ ### Fixed
11
+
12
+ - Plan mode no longer blocks writes to the plan file itself: the plan extension's gate state moved into a module-level shared holder (`sharedPlanGateState`) that the permissions extension's "plan" permission mode keeps in sync with the mode — so both gates agree on the plan-file carve-out however plan mode is engaged (`/plan`, `EnterPlanMode`, Shift+Tab, `/permissions plan`, or a host writing the shared mode holder). Permission-only plan mode used to be a carve-out-less read-only mode with no plan file at all; now mode "plan" always means full plan mode with the session plan file as the one writable path, exiting plan mode drops a permissions-side "plan" mode to "bypass" instead of leaving the read-only gate latched, and the plan-mode footer indicator renders once (the plan extension no longer sets its own status slot on top of the permissions footer).
13
+
7
14
  - The task store API is re-exported from the SDK surface (`packages/plus/src/extensions/tasks/store.ts`): `TaskStore` (file-backed `TaskCreate`/`TaskUpdate`/`TaskList`/`TaskGet` storage under `<agentDir>/tasks/<sessionId>/`, now a per-process singleton per list id), `subscribeToTasks(listId, listener)` — fires immediately with the current list, then with the full post-mutation list after every task-tool change in this process, returning an unsubscribe function — plus the `Task`/`TaskStatus`/`TaskListListener` types. A host (e.g. the pi-plus desktop) can render a native task panel that stays in sync without polling the files. In-process only: writers in another process are not observed.
8
15
  - Runtime settings layering for hub profiles applies to SDK hosts with no environment plumbing (shared `loader/redirects.mjs` entry for `coding-agent/src/core/settings-manager.ts`): whenever the agent dir passed to `SettingsManager.create` is a hub-materialized profile dir (a direct child of `~/.pi/pi-hub/profiles`, honoring `PI_HUB_PI_DIR`/`PI_HUB_DIR`; the pipi-set `PI_PLUS_BASE_AGENT_DIR` marker also still activates it), the global scope reads the base agent `settings.json` deep-merged under the profile `settings.json` with the profile winning, and writes route per top-level key — the profile-scoped `defaultProvider`/`defaultModel`/`defaultThinkingLevel` to the profile file, everything else to the agent file with any profile shadow cleared. Any other agent dir keeps `SettingsManager.create` behaving exactly as upstream.
9
16
  - The pi-plus context settings are re-exported from the SDK surface (`packages/plus/src/context/threshold-setting.ts`): `readPlusSettings/writePlusSettings/getPlusSettingsPath` for the pi-plus settings store next to `settings.json`, plus the typed getters/setters and UI formatters behind the pipi `/settings` rows — `get/setAutoCompactThresholdPercent` (default 80%), `get/setContextFloorTokens` (default/built-in minimum 13000), and `get/setContextWindowCapTokens` (undefined = no cap). Embedding hosts get the same knobs the TUI edits, against the same file detection actually reads. `SessionManager.deleteSession` and `SessionManager.search` (new in the re-exported upstream surface) cover transcript deletion and title/content search for history-management UIs.