pi-plus 0.1.20 → 0.1.22
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 +4 -1
- package/README.md +3 -3
- package/package.json +1 -1
- package/pipi.js +102 -85
package/CHANGELOG.md
CHANGED
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
-
- The `/init` command (shared core, `packages/plus/src/extensions/init/`): analyzes the codebase and creates `
|
|
7
|
+
- The `/init` command (shared core, `packages/plus/src/extensions/init/`): analyzes the codebase and creates `AGENTS.md` at the cwd root, or suggests improvements when it already exists; pi loads `AGENTS.md` automatically.
|
|
8
8
|
- `pipi profile add <name> -p <provider>` with no token/model/url/thinking/--set now invokes that provider's interactive login after saving the profile: the OAuth login page opens in the browser (or the API-key setup prompts run in the terminal) and the credential is persisted into the profile's isolated agent dir (`~/.pi/pi-hub/profiles/<name>/auth.json`), so the profile is ready to launch. A cancelled or failed login keeps the profile and suggests `pipi profile update <name> -t <key>`. The CLI injects the flow via hub's `dispatchHubCommand` `login` hook; the flow itself lives in the shared core (`packages/plus/src/auth/login.ts`).
|
|
9
9
|
- The interactive TUI's `/login` is disabled: it shows a status line pointing at `pipi profile add <name> -p <provider>` instead of starting the login flow, and it no longer appears in autocomplete or `/help` (via the `interactive-mode` and `slash-commands` redirect wrappers in the shared core).
|
|
10
|
+
- `--sign-in` on `pipi profile add` / `pipi profile update`: runs the provider's interactive login (OAuth page / API-key setup) for the profile even when it already carries a token, and the sign-in overwrites the profile token — the `loginProvider` credential's key is stored as the profile token for api-key logins, and the token is cleared for OAuth logins (whose credential lives in the profile dir's `auth.json`, so it survives re-materialization). The flow is the same `loginProvider` entry `pi-plus-sdk` re-exports; bash/zsh completions list the flag.
|
|
11
|
+
- The session recap extension (`pi-plus-session-recap`, shared core `packages/plus/src/extensions/recap/`) is registered in the `pipi` CLI: after the first prompt is answered and after every compaction, a one-off LLM call distills a ≤8-word recap applied as the session name — visible in the tab title and as the displayed text in the resume session list (which shows `name ?? firstMessage` in place of the raw first message). A manual rename permanently locks the session against further recaps.
|
|
10
12
|
|
|
11
13
|
### Changed
|
|
12
14
|
|
|
13
15
|
- **The repository split the pi-plus sources into three packages**: the shared override core (context/compaction/reasoning + the seven non-TUI extensions + the core redirect wrappers) stays in `packages/plus`, all CLI logic (hub dispatch, completion, usage print, banner/vim/tab-title/plain-tools/`/cd`, the main wrapper, the source-mode loader) moved to `packages/plus-cli`, and the programmatic entry moved to `packages/plus-api`. The published `pi-plus` package is now **CLI-only**: `api.js`/`api.d.ts` are gone from the artifact, the `exports` map has no `.` entry (so `import "pi-plus"` fails by design), and the `@earendil-works/pi-coding-agent` types dependency is dropped. Library hosts should depend on the new **`pi-plus-sdk`** package instead, published from `packages/plus-api`.
|
|
14
16
|
- The `/cd` working-directory switch extension moved to the shared core (`packages/plus/src/extensions/cd/`) so the `pi-plus-sdk` artifact registers it too; it is no longer CLI-only.
|
|
17
|
+
- Launching under a hub profile now layers settings at runtime instead of baking them at launch: pipi sets `PI_PLUS_BASE_AGENT_DIR` to the plain agent dir before pointing `PI_CODING_AGENT_DIR` at the profile dir, so the session reads `~/.pi/agent/settings.json` deep-merged under the profile `settings.json` (profile wins) and general writes land in the agent file live. With general keys — including `packages` — now written straight to the base file, the old exit hook that synced the profile copy's `packages` back to the agent settings at process exit was dropped (it could only clobber the base after the layering change).
|
|
15
18
|
- Entries below this note predate the split and describe the combined `pi-plus` artifact.
|
|
16
19
|
|
|
17
20
|
### Fixed
|
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ not own pi's command). Library hosts embedding pi in-process use the separate
|
|
|
11
11
|
|
|
12
12
|
## What this layer adds on top of the shared core
|
|
13
13
|
|
|
14
|
-
The context-detection/compaction/reasoning overrides and the
|
|
15
|
-
(subagent, tasks, memory, plan, ask-user, hooks, context-guard, /cd, /init) live in
|
|
14
|
+
The context-detection/compaction/reasoning overrides and the ten non-TUI extensions
|
|
15
|
+
(subagent, tasks, memory, plan, ask-user, hooks, context-guard, recap, /cd, /init) live in
|
|
16
16
|
[`../plus`](../plus) and are shared with the SDK. This package adds the CLI-only pieces:
|
|
17
17
|
|
|
18
|
-
1. **Hub profiles** (`src/coding-agent/main.ts` wrapper, backed by `@earendil-works/pi-hub` = [`../hub`](../hub)) — named pi profiles (provider/models/thinking/token/base URL) stored in `~/.pi/profiles.json`, materialized into isolated agent dirs under `~/.pi/pi-hub/profiles/<name>/`. Adds `pipi profile …`, `pipi use` / `pipi unuse`, and the `pipi --as <name>` flag. The wrapper resolves the profile, sets `PI_CODING_AGENT_DIR` in-process (read lazily by `getAgentDir()`), and delegates to the original `main`. `pipi profile add <name> -p <provider>` with no credential invokes the provider's interactive login (OAuth page / API-key setup) against the profile dir via hub's injected `login` hook, using `loginProvider` from [`../plus`](../plus)`/src/auth/login.ts
|
|
18
|
+
1. **Hub profiles** (`src/coding-agent/main.ts` wrapper, backed by `@earendil-works/pi-hub` = [`../hub`](../hub)) — named pi profiles (provider/models/thinking/token/base URL) stored in `~/.pi/profiles.json`, materialized into isolated agent dirs under `~/.pi/pi-hub/profiles/<name>/`. Adds `pipi profile …`, `pipi use` / `pipi unuse`, and the `pipi --as <name>` flag. The wrapper resolves the profile, sets `PI_CODING_AGENT_DIR` in-process (read lazily by `getAgentDir()`), and delegates to the original `main`. `pipi profile add <name> -p <provider>` with no credential — or `pipi profile add/update <name> --sign-in` for an explicit sign-in that overwrites the profile token — invokes the provider's interactive login (OAuth page / API-key setup) against the profile dir via hub's injected `login` hook, using `loginProvider` from [`../plus`](../plus)`/src/auth/login.ts` (the same entry `pi-plus-sdk` re-exports for embedded hosts); the TUI `/login` is disabled by core redirect wrappers in favour of this flow.
|
|
19
19
|
2. **Shell completion** (`src/completion/`) — `pipi completion <bash|zsh>` prints a completion script covering the whole CLI: hub subcommands (with dynamic profile/model names from `~/.pi/profiles.json`) plus pi's native commands and flags.
|
|
20
20
|
3. **Usage print** (`src/coding-agent/cli/args.ts` wrapper) — `pipi --help` gains a "Profile commands (pi-plus)" section.
|
|
21
21
|
4. **Welcome banner** (`src/coding-agent/ui/banner.ts`) — pipi's TUI startup header is a CC-style banner with a block-character π+ mark: condensed logo by default, boxed variant with Extensions/Skills feeds, compact/plain degradation on narrow terminals, `resumed <id> · <title>` on resume/fork.
|