@pi-unipi/unipi 2.8.0 → 2.9.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/kanboard",
3
- "version": "2.6.1",
4
- "description": "Visualization layer for unipi workflow — HTTP server with htmx/Alpine.js UI, modular parsers, TUI overlay, and kanban board",
3
+ "version": "2.9.0",
4
+ "description": "Visualization layer for unipi workflow \u2014 HTTP server with htmx/Alpine.js UI, modular parsers, TUI overlay, and kanban board",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "license": "MIT",
@@ -39,19 +39,23 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@pi-unipi/core": "2.6.1"
42
+ "@pi-unipi/core": "2.9.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@earendil-works/pi-coding-agent": "^0.80.0",
46
- "@earendil-works/pi-tui": "^0.80.0"
45
+ "@earendil-works/pi-coding-agent": "^0.84.0",
46
+ "@earendil-works/pi-tui": "^0.84.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^25.6.0",
50
50
  "typescript": "^6.0.0"
51
51
  },
52
52
  "pi": {
53
- "extensions": [],
54
- "skills": [],
53
+ "extensions": [
54
+ "./index.ts"
55
+ ],
56
+ "skills": [
57
+ "./skills"
58
+ ],
55
59
  "prompts": [],
56
60
  "themes": []
57
61
  }
@@ -37,7 +37,7 @@ At session startup, enabled servers connect and discover tools in parallel. Regi
37
37
 
38
38
  MCP input properties are cloned and recursively canonicalized before registration: schema object keys use locale-independent UTF-16 code-unit order, valid schema `required` string arrays are sorted and deduplicated, a missing top-level `required` becomes `[]`, and literal-value arrays keep their source order. Each tool also receives a stable label matching its final Pi name. These stable definitions and registration order prevent equivalent MCP configurations from changing the serialized tool list between runs, improving provider prompt-cache reuse. A server that fails discovery is excluded from the combined set; a registration error fails startup for that prepared set and is not reported as successful.
39
39
 
40
- Pi 0.80 cannot remove dynamically registered tools. Enabling, disabling, deleting, or changing MCP servers is therefore applied on the next Pi restart rather than mutating the tool list mid-session. This prevents stale schemas and makes the restart an explicit cache-epoch boundary.
40
+ Pi 0.84 cannot remove dynamically registered tools. Enabling, disabling, deleting, or changing MCP servers is therefore applied on the next Pi restart rather than mutating the tool list mid-session. This prevents stale schemas and makes the restart an explicit cache-epoch boundary.
41
41
 
42
42
  ### Bounded Results
43
43
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/mcp",
3
- "version": "2.6.1",
4
- "description": "MCP server management extension for Pi coding agent — browse, add, configure, and use MCP servers",
3
+ "version": "2.9.0",
4
+ "description": "MCP server management extension for Pi coding agent \u2014 browse, add, configure, and use MCP servers",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "license": "MIT",
@@ -30,19 +30,23 @@
30
30
  "test": "npx tsx --test tests/**/*.test.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@pi-unipi/core": "2.6.1"
33
+ "@pi-unipi/core": "2.9.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@earendil-works/pi-coding-agent": "^0.80.0",
37
- "@earendil-works/pi-tui": "^0.80.0",
36
+ "@earendil-works/pi-coding-agent": "^0.84.0",
37
+ "@earendil-works/pi-tui": "^0.84.0",
38
38
  "typebox": "^1.1.38"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^25.6.0"
42
42
  },
43
43
  "pi": {
44
- "extensions": [],
45
- "skills": [],
44
+ "extensions": [
45
+ "./src/index.ts"
46
+ ],
47
+ "skills": [
48
+ "./skills"
49
+ ],
46
50
  "prompts": [],
47
51
  "themes": []
48
52
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/memory",
3
- "version": "2.6.1",
3
+ "version": "2.9.0",
4
4
  "description": "Persistent cross-session memory with MemPalace backend (auto-installed) and SQLite fallback for Pi coding agent",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -39,12 +39,12 @@
39
39
  "README.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@pi-unipi/core": "2.6.1",
43
- "@pi-unipi/info-screen": "2.6.1",
42
+ "@pi-unipi/core": "2.9.0",
43
+ "@pi-unipi/info-screen": "2.9.0",
44
44
  "js-yaml": "^4.1.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "@earendil-works/pi-coding-agent": "^0.80.0",
47
+ "@earendil-works/pi-coding-agent": "^0.84.0",
48
48
  "typebox": "^1.1.38"
49
49
  },
50
50
  "devDependencies": {
@@ -52,8 +52,12 @@
52
52
  "@types/node": "^25.6.0"
53
53
  },
54
54
  "pi": {
55
- "extensions": [],
56
- "skills": [],
55
+ "extensions": [
56
+ "./index.ts"
57
+ ],
58
+ "skills": [
59
+ "./skills"
60
+ ],
57
61
  "prompts": [],
58
62
  "themes": []
59
63
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/milestone",
3
- "version": "2.6.1",
4
- "description": "Lifecycle layer for project-level goals — MILESTONES.md tracking, session hooks, auto-sync",
3
+ "version": "2.9.0",
4
+ "description": "Lifecycle layer for project-level goals \u2014 MILESTONES.md tracking, session hooks, auto-sync",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "scripts": {
@@ -32,11 +32,11 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@pi-unipi/core": "2.6.1"
35
+ "@pi-unipi/core": "2.9.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@earendil-works/pi-coding-agent": "^0.80.0",
39
- "@earendil-works/pi-tui": "^0.80.0",
38
+ "@earendil-works/pi-coding-agent": "^0.84.0",
39
+ "@earendil-works/pi-tui": "^0.84.0",
40
40
  "typebox": "^1.1.38"
41
41
  },
42
42
  "devDependencies": {
@@ -44,8 +44,12 @@
44
44
  "typescript": "^6.0.0"
45
45
  },
46
46
  "pi": {
47
- "extensions": [],
48
- "skills": [],
47
+ "extensions": [
48
+ "./index.ts"
49
+ ],
50
+ "skills": [
51
+ "./skills"
52
+ ],
49
53
  "prompts": [],
50
54
  "themes": []
51
55
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/notify",
3
- "version": "2.6.1",
4
- "description": "Cross-platform notification extension for Pi — native OS, Gotify, and Telegram notifications for agent lifecycle events",
3
+ "version": "2.9.0",
4
+ "description": "Cross-platform notification extension for Pi \u2014 native OS, Gotify, and Telegram notifications for agent lifecycle events",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "license": "MIT",
@@ -34,19 +34,21 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@pi-unipi/core": "2.6.1",
37
+ "@pi-unipi/core": "2.9.0",
38
38
  "node-notifier": "^10.0.1"
39
39
  },
40
40
  "peerDependencies": {
41
- "@earendil-works/pi-coding-agent": "^0.80.0",
42
- "@earendil-works/pi-tui": "^0.80.0",
41
+ "@earendil-works/pi-coding-agent": "^0.84.0",
42
+ "@earendil-works/pi-tui": "^0.84.0",
43
43
  "typebox": "^1.1.38"
44
44
  },
45
45
  "pi": {
46
46
  "extensions": [
47
47
  "./index.ts"
48
48
  ],
49
- "skills": [],
49
+ "skills": [
50
+ "./skills"
51
+ ],
50
52
  "prompts": [],
51
53
  "themes": []
52
54
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/ralph",
3
- "version": "2.6.1",
3
+ "version": "2.9.0",
4
4
  "description": "Long-running iterative development loops for Pi coding agent",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -20,6 +20,7 @@
20
20
  ],
21
21
  "files": [
22
22
  "*.ts",
23
+ "!*.test.ts",
23
24
  "SKILL.md",
24
25
  "README.md"
25
26
  ],
@@ -30,18 +31,22 @@
30
31
  "test": "npx tsx --test reminder.test.ts"
31
32
  },
32
33
  "dependencies": {
33
- "@pi-unipi/core": "2.6.1",
34
- "@pi-unipi/info-screen": "2.6.1"
34
+ "@pi-unipi/core": "2.9.0",
35
+ "@pi-unipi/info-screen": "2.9.0"
35
36
  },
36
37
  "peerDependencies": {
37
- "@earendil-works/pi-ai": "^0.80.0",
38
- "@earendil-works/pi-coding-agent": "^0.80.0",
39
- "@earendil-works/pi-tui": "^0.80.0",
38
+ "@earendil-works/pi-ai": "^0.84.0",
39
+ "@earendil-works/pi-coding-agent": "^0.84.0",
40
+ "@earendil-works/pi-tui": "^0.84.0",
40
41
  "typebox": "^1.1.38"
41
42
  },
42
43
  "pi": {
43
- "extensions": [],
44
- "skills": [],
44
+ "extensions": [
45
+ "./index.ts"
46
+ ],
47
+ "skills": [
48
+ "./SKILL.md"
49
+ ],
45
50
  "prompts": [],
46
51
  "themes": []
47
52
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/subagents",
3
- "version": "2.6.1",
3
+ "version": "2.9.0",
4
4
  "description": "Subagents for UniPi \u2014 parallel execution, file locking, workflow integration",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -9,20 +9,21 @@
9
9
  "test": "npx tsx --test src/__tests__/*.test.ts"
10
10
  },
11
11
  "dependencies": {
12
- "@pi-unipi/core": "2.6.1",
13
- "@earendil-works/pi-agent-core": "^0.80.0",
12
+ "@pi-unipi/core": "2.9.0",
13
+ "@earendil-works/pi-agent-core": "^0.84.0",
14
14
  "acorn": "8.18.0"
15
15
  },
16
16
  "devDependencies": {
17
17
  "typescript": "^5.8.3"
18
18
  },
19
19
  "peerDependencies": {
20
- "@earendil-works/pi-coding-agent": "^0.80.0",
21
- "@earendil-works/pi-tui": "^0.80.0",
20
+ "@earendil-works/pi-coding-agent": "^0.84.0",
21
+ "@earendil-works/pi-tui": "^0.84.0",
22
22
  "typebox": "^1.1.38"
23
23
  },
24
24
  "files": [
25
25
  "src/**/*.ts",
26
+ "!src/__tests__/**",
26
27
  "src/global.d.ts",
27
28
  "agents/*.md",
28
29
  "prompts/*.md",
@@ -36,7 +37,9 @@
36
37
  "skills": [
37
38
  "./skills"
38
39
  ],
39
- "prompts": [],
40
+ "prompts": [
41
+ "./prompts"
42
+ ],
40
43
  "themes": []
41
44
  }
42
45
  }
@@ -10,10 +10,12 @@ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
10
10
  import {
11
11
  type AgentSession,
12
12
  type AgentSessionEvent,
13
+ type CreateAgentSessionOptions,
13
14
  createAgentSession,
14
15
  DefaultResourceLoader,
15
16
  type ExtensionAPI,
16
17
  getAgentDir,
18
+ type ModelRuntime,
17
19
  SessionManager,
18
20
  SettingsManager,
19
21
  } from "@earendil-works/pi-coding-agent";
@@ -174,12 +176,16 @@ export async function runAgent(
174
176
  const model = options.model ?? ctx.model;
175
177
 
176
178
  // Create session
177
- const sessionOpts: Parameters<typeof createAgentSession>[0] = {
179
+ // SDK >=0.84: CreateAgentSessionOptions takes `modelRuntime` (the canonical
180
+ // ModelRuntime) instead of the removed `modelRegistry` option. The extension
181
+ // context exposes only the ModelRegistry facade, whose `runtime` field is the
182
+ // same ModelRuntime the parent session runs on.
183
+ const sessionOpts: CreateAgentSessionOptions = {
178
184
  cwd: effectiveCwd,
179
185
  agentDir,
180
186
  sessionManager: SessionManager.inMemory(effectiveCwd),
181
187
  settingsManager: SettingsManager.create(effectiveCwd, agentDir),
182
- modelRegistry: ctx.modelRegistry,
188
+ modelRuntime: (ctx.modelRegistry as unknown as { runtime: ModelRuntime }).runtime,
183
189
  model,
184
190
  tools: toolNames,
185
191
  resourceLoader: loader,
@@ -12245,7 +12245,7 @@ ${agentPrompt}`;
12245
12245
  agentDir,
12246
12246
  sessionManager: SessionManager.inMemory(effectiveCwd),
12247
12247
  settingsManager: SettingsManager.create(effectiveCwd, agentDir),
12248
- modelRegistry: ctx.modelRegistry,
12248
+ modelRuntime: ctx.modelRegistry.runtime,
12249
12249
  model,
12250
12250
  tools: toolNames,
12251
12251
  resourceLoader: loader
@@ -22747,7 +22747,9 @@ ${theme.fg("error", task.error)}` : "";
22747
22747
  "Use bg_run instead of bash for commands expected to run for a long time, such as test suites, dev servers, watchers, or builds.",
22748
22748
  "Set isAgent:true only when the background task launches an LLM/agent process; false for scripts, tests, dev servers, sleeps.",
22749
22749
  "Always set name to a concise 2-6 word human-readable label; do not use the raw command as the name.",
22750
- "After a default bg_run launch, continue only independent useful work; otherwise end the turn and wait for <background-task-notification>.",
22750
+ "bg_run returns immediately. With notifyOnCompletion:true and triggerOnCompletion:true (both defaults), completed, failed, or killed terminal state is delivered as <background-task-notification> and automatically starts a follow-up agent turn.",
22751
+ "After a default bg_run launch, continue only independent useful work that does not merely wait for the task; otherwise briefly acknowledge it if useful, then end the current turn. Do not call sleep, bg_status, or bg_logs merely to wait; the terminal notification will wake you.",
22752
+ "A running result is not an instruction to poll again.",
22751
22753
  "Treat <background-task-notification> as durable terminal truth. Do not call bg_status to reconfirm it.",
22752
22754
  "Do not set notifyOnCompletion:false or triggerOnCompletion:false unless intentionally opting out."
22753
22755
  ],
@@ -35034,6 +35036,9 @@ function isCustomEntry(entry, customType) {
35034
35036
  function stripDynamicSystemPromptFooter(systemPrompt) {
35035
35037
  return systemPrompt.replace(/\nCurrent date and time:[^\n]*(?:\nCurrent working directory:[^\n]*)?$/u, "").replace(/\nCurrent working directory:[^\n]*$/u, "").trim();
35036
35038
  }
35039
+ function sessionModelRuntime(ctx) {
35040
+ return ctx.modelRegistry.runtime;
35041
+ }
35037
35042
  function createBtwResourceLoader(ctx, appendSystemPrompt = [BTW_SYSTEM_PROMPT]) {
35038
35043
  const extensionsResult = { extensions: [], errors: [], runtime: createExtensionRuntime() };
35039
35044
  const systemPrompt = stripDynamicSystemPromptFooter(ctx.getSystemPrompt());
@@ -35044,7 +35049,9 @@ function createBtwResourceLoader(ctx, appendSystemPrompt = [BTW_SYSTEM_PROMPT])
35044
35049
  getThemes: () => ({ themes: [], diagnostics: [] }),
35045
35050
  getAgentsFiles: () => ({ agentsFiles: [] }),
35046
35051
  getSystemPrompt: () => systemPrompt,
35052
+ getSystemPromptSource: () => void 0,
35047
35053
  getAppendSystemPrompt: () => appendSystemPrompt,
35054
+ getAppendSystemPromptSources: () => [],
35048
35055
  extendResources: () => {
35049
35056
  },
35050
35057
  reload: async () => {
@@ -35939,7 +35946,7 @@ function btw_default(pi) {
35939
35946
  const { session } = await createAgentSession2({
35940
35947
  sessionManager: SessionManager3.inMemory(),
35941
35948
  model: ctx.model,
35942
- modelRegistry: ctx.modelRegistry,
35949
+ modelRuntime: sessionModelRuntime(ctx),
35943
35950
  thinkingLevel: pi.getThinkingLevel(),
35944
35951
  tools: ["read", "bash", "edit", "write"],
35945
35952
  resourceLoader: createBtwResourceLoader(ctx)
@@ -36341,7 +36348,7 @@ ${summary}`;
36341
36348
  const { session } = await createAgentSession2({
36342
36349
  sessionManager: SessionManager3.inMemory(),
36343
36350
  model,
36344
- modelRegistry: ctx.modelRegistry,
36351
+ modelRuntime: sessionModelRuntime(ctx),
36345
36352
  thinkingLevel: "off",
36346
36353
  tools: [],
36347
36354
  resourceLoader: createBtwResourceLoader(ctx, [BTW_SUMMARIZE_SYSTEM_PROMPT])
@@ -51212,7 +51219,7 @@ function compactorExtension(pi) {
51212
51219
  return resumeContext;
51213
51220
  }
51214
51221
  });
51215
- pi.on("turn_end", async (_event, ctx) => {
51222
+ pi.on("agent_end", async (_event, ctx) => {
51216
51223
  const cwd = ctx.cwd ?? process.cwd();
51217
51224
  config = loadConfig4(cwd);
51218
51225
  const decision = decideAutoCompaction({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/updater",
3
- "version": "2.6.1",
4
- "description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
3
+ "version": "2.9.0",
4
+ "description": "Auto-updater, changelog browser, and readme browser for Unipi \u2014 checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "license": "MIT",
@@ -34,19 +34,23 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@pi-unipi/core": "2.6.1"
37
+ "@pi-unipi/core": "2.9.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@earendil-works/pi-coding-agent": "^0.80.0",
41
- "@earendil-works/pi-tui": "^0.80.0"
40
+ "@earendil-works/pi-coding-agent": "^0.84.0",
41
+ "@earendil-works/pi-tui": "^0.84.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^25.6.0",
45
45
  "typescript": "^6.0.0"
46
46
  },
47
47
  "pi": {
48
- "extensions": [],
49
- "skills": [],
48
+ "extensions": [
49
+ "./index.ts"
50
+ ],
51
+ "skills": [
52
+ "./skills"
53
+ ],
50
54
  "prompts": [],
51
55
  "themes": []
52
56
  }
@@ -1,8 +1,6 @@
1
1
  # @pi-unipi/utility
2
2
 
3
- Environment info, diagnostics, cleanup, name badge, and diff rendering. The grab-bag package for maintaining your development environment and making tool output readable.
4
-
5
- The diff rendering is the standout feature — Shiki-powered syntax-highlighted diffs for `write` and `edit` tool output. Side-by-side view for edits, unified view for writes, with color presets and auto-fallback on narrow terminals.
3
+ Environment info, diagnostics, cleanup, and the session name badge. The grab-bag package for maintaining your development environment and keeping an eye on provider cache behavior.
6
4
 
7
5
  ## Commands
8
6
 
@@ -15,7 +13,9 @@ The diff rendering is the standout feature — Shiki-powered syntax-highlighted
15
13
  | `/unipi:reload` | Explain how to reload extensions |
16
14
  | `/unipi:name-badge` | Toggle name badge overlay |
17
15
  | `/unipi:badge-gen` | Generate session name via LLM and enable badge |
18
- | `/unipi:util-settings` | Unified settings for badge and diff rendering |
16
+ | `/unipi:badge-name` | Set the session name shown in the badge |
17
+ | `/unipi:badge-settings` | Configure badge behavior |
18
+ | `/unipi:util-settings` | Unified settings TUI (badge) |
19
19
  | `/unipi:prefix-cache` | Show privacy-safe request-prefix transitions and provider cache token counters |
20
20
 
21
21
  ### Examples
@@ -31,7 +31,7 @@ The diff rendering is the standout feature — Shiki-powered syntax-highlighted
31
31
 
32
32
  ## Special Triggers
33
33
 
34
- Utility registers with the info-screen dashboard, showing module status and diagnostic results. The footer subscribes to utility events for its extension status segment.
34
+ Utility registers with the info-screen dashboard, showing module status and diagnostic results. The footer subscribes to utility events for its extension status segment. When Herdr is present, the badge module syncs the session name to the pane title.
35
35
 
36
36
  ## Provider prefix-cache diagnostics
37
37
 
@@ -41,71 +41,31 @@ The fingerprints are keyed HMAC-SHA-256 values using a random in-memory key that
41
41
 
42
42
  `/unipi:cleanup` includes private `~/.unipi/tool-results/` artifacts in the normal temporary-file retention policy (7 days by default). Use dry-run mode to review candidates before deletion.
43
43
 
44
- The diff rendering feature wraps Pi's built-in `write` and `edit` tools. When enabled, these tools show syntax-highlighted diffs instead of plain output. This is a transparent replacement — the agent doesn't need to know about it.
45
-
46
44
  ## Agent Tools
47
45
 
48
46
  | Tool | Description |
49
47
  |------|-------------|
50
- | `ctx_batch` | Atomic batch execution with rollback support |
51
48
  | `ctx_env` | Environment inspection for debugging |
52
- | `write` | Write file with syntax-highlighted diff (when diff enabled) |
53
- | `edit` | Edit file with split/unified diff view (when diff enabled) |
54
-
55
- ### Batch Execution
56
-
57
- ```typescript
58
- import { BatchBuilder } from "@pi-unipi/utility/tools/batch";
59
-
60
- const report = await new BatchBuilder()
61
- .addCommand("search", { query: "refactor" })
62
- .addTool("memory_search", { query: "patterns" })
63
- .withOptions({ failFast: true, commandTimeoutMs: 30000 })
64
- .execute(myExecutor);
65
-
66
- if (!report.success) {
67
- console.log("Failed:", report.results.find(r => !r.success)?.error);
68
- }
69
- ```
49
+ | `set_session_name` | Set the session name for badge display (when badge agent-tool is enabled) |
70
50
 
71
51
  ## Configurables
72
52
 
73
- ### Diff Rendering
53
+ ### Name Badge
74
54
 
75
55
  ```
76
56
  /unipi:util-settings # Open unified settings TUI
77
57
  ```
78
58
 
79
- Or edit `.unipi/config/util-settings.json` directly:
59
+ Or edit `.unipi/config/util-settings.json` directly (migrated automatically from the legacy `.unipi/config/badge.json` on first read):
80
60
 
81
61
  ```json
82
62
  {
83
- "diff": {
84
- "enabled": true,
85
- "theme": "default",
86
- "shikiTheme": "github-dark",
87
- "splitMinWidth": 150
63
+ "badge": {
64
+ "badgeEnabled": true
88
65
  }
89
66
  }
90
67
  ```
91
68
 
92
- | Setting | Default | Options |
93
- |---------|---------|---------|
94
- | `enabled` | true | true/false |
95
- | `theme` | "default" | default, midnight, subtle, neon |
96
- | `shikiTheme` | "github-dark" | github-dark, dracula, one-dark-pro, catppuccin-mocha, nord, tokyo-night |
97
- | `splitMinWidth` | 150 | Minimum terminal width for split view |
98
-
99
- Environment variable overrides: `DIFF_ADD_BG`, `DIFF_REM_BG`, etc.
100
-
101
- Features:
102
- - Split view (side-by-side) for `edit`, auto-falls back to unified on narrow terminals
103
- - Unified view (stacked) for `write` overwrites
104
- - LRU cache (192 entries) for Shiki highlights
105
- - Large diff fallback (skip highlighting above 80k chars)
106
-
107
- ### Name Badge
108
-
109
69
  The badge is a persistent HUD overlay in the top-right corner showing the current session name. It auto-restores visibility on session restart.
110
70
 
111
71
  ## Programmatic API
@@ -113,35 +73,9 @@ The badge is a persistent HUD overlay in the top-right corner showing the curren
113
73
  | Module | Path | Description |
114
74
  |--------|------|-------------|
115
75
  | ProcessLifecycle | `lifecycle/process` | Parent PID polling, orphan detection, signal handlers |
116
- | cleanupStale | `lifecycle/cleanup` | Stale DB/temp/session/cache cleanup with dry-run |
117
- | TTLCache | `cache/ttl-cache` | Memory or SQLite-backed TTL cache |
76
+ | cleanupStale | `lifecycle/cleanup` | Stale DB/temp/session cleanup with dry-run |
118
77
  | AnalyticsCollector | `analytics/collector` | Privacy-respecting event collection with daily rollup |
119
78
  | runDiagnostics | `diagnostics/engine` | Cross-module health checks with plugin architecture |
120
- | detectCapabilities | `display/capabilities` | Terminal feature detection (color, Nerd Font, unicode) |
121
- | Width Utilities | `display/width` | ANSI-aware clamp, wrap, collapse, pad, center |
122
-
123
- ### TTL Cache
124
-
125
- ```typescript
126
- import { TTLCache } from "@pi-unipi/utility/cache/ttl-cache";
127
-
128
- const cache = new TTLCache({ defaultTtlMs: 60000 });
129
- await cache.set("key", { data: "value" });
130
- const value = await cache.get("key");
131
- ```
132
-
133
- ### Terminal Capabilities
134
-
135
- ```typescript
136
- import { detectCapabilities, getIcon } from "@pi-unipi/utility/display/capabilities";
137
-
138
- const caps = detectCapabilities();
139
- console.log("Nerd Font:", caps.nerdFont);
140
- console.log("Truecolor:", caps.truecolor);
141
- console.log(getIcon("󰘳", "[OK]")); // Uses Nerd Font if available
142
- ```
143
-
144
- Capability detection distinguishes basic color, xterm-256-compatible terminals, and truecolor-capable terminals. Apple Terminal is treated as color-capable but not truecolor-capable so renderers can fall back safely.
145
79
 
146
80
  ## Privacy
147
81
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pi-unipi/utility",
3
- "version": "2.6.1",
4
- "description": "Utility commands and tools for Pi coding agent — lifecycle, diagnostics, cache, analytics, display, batch execution",
3
+ "version": "2.9.0",
4
+ "description": "Utility commands and tools for Pi coding agent \u2014 lifecycle, diagnostics, cache, analytics, display, batch execution",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "license": "MIT",
@@ -36,22 +36,24 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@pi-unipi/core": "2.6.1"
40
- },
41
- "devDependencies": {
42
- "@types/diff": "^7.0.2"
39
+ "@pi-unipi/core": "2.9.0"
43
40
  },
41
+ "devDependencies": {},
44
42
  "peerDependencies": {
45
- "@earendil-works/pi-coding-agent": "^0.80.0",
46
- "@earendil-works/pi-tui": "^0.80.0",
43
+ "@earendil-works/pi-coding-agent": "^0.84.0",
44
+ "@earendil-works/pi-tui": "^0.84.0",
47
45
  "typebox": "^1.1.38"
48
46
  },
49
47
  "scripts": {
50
48
  "test": "npx tsx --test tests/**/*.test.ts"
51
49
  },
52
50
  "pi": {
53
- "extensions": [],
54
- "skills": [],
51
+ "extensions": [
52
+ "./src/index.ts"
53
+ ],
54
+ "skills": [
55
+ "./skills"
56
+ ],
55
57
  "prompts": [],
56
58
  "themes": []
57
59
  }
@@ -3,13 +3,12 @@
3
3
  *
4
4
  * Comprehensive utilities suite for Pi coding agent:
5
5
  * - Commands: continue, reload, status, cleanup, env, doctor, badge
6
- * - Tools: ctx_batch, ctx_env, set_session_name
6
+ * - Tools: ctx_env, set_session_name
7
7
  * - Lifecycle: process management, stale cleanup
8
- * - Cache: TTL cache with optional persistence
9
8
  * - Analytics: lightweight event collection
10
9
  * - Diagnostics: cross-module health checks
11
- * - Display: terminal capabilities, width utilities
12
- * - TUI: settings inspector pattern, name badge
10
+ * - Prefix-cache observability: privacy-safe provider cache stats
11
+ * - TUI: util settings, name badge (incl. Herdr pane title sync)
13
12
  */
14
13
 
15
14
  import { dirname } from "node:path";