@pi-unipi/unipi 2.0.7 → 2.0.8
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/LICENSE +21 -0
- package/package.json +5 -5
- package/packages/ask-user/ask-ui.ts +3 -3
- package/packages/ask-user/commands.ts +1 -1
- package/packages/ask-user/handoff.ts +1 -1
- package/packages/ask-user/index.ts +1 -1
- package/packages/ask-user/launcher-ui.ts +2 -2
- package/packages/ask-user/package.json +5 -4
- package/packages/ask-user/settings-tui.ts +2 -2
- package/packages/ask-user/tools.ts +2 -2
- package/packages/autocomplete/package.json +4 -3
- package/packages/autocomplete/src/__tests__/provider.sorting.test.ts +1 -1
- package/packages/autocomplete/src/index.ts +1 -1
- package/packages/autocomplete/src/provider.ts +2 -2
- package/packages/autocomplete/src/sorting.ts +1 -1
- package/packages/btw/extensions/btw.ts +3 -3
- package/packages/btw/package.json +5 -4
- package/packages/cocoindex/commands.ts +1 -1
- package/packages/cocoindex/index.ts +1 -1
- package/packages/cocoindex/installer.ts +1 -1
- package/packages/cocoindex/package.json +5 -5
- package/packages/cocoindex/tools.ts +2 -2
- package/packages/compactor/package.json +7 -5
- package/packages/compactor/src/commands/index.ts +1 -1
- package/packages/compactor/src/compaction/cut.ts +2 -2
- package/packages/compactor/src/compaction/hooks.ts +4 -4
- package/packages/compactor/src/compaction/normalize.ts +1 -1
- package/packages/compactor/src/compaction/summarize.ts +1 -1
- package/packages/compactor/src/display/diff-presentation.ts +1 -1
- package/packages/compactor/src/display/diff-renderer.ts +1 -1
- package/packages/compactor/src/display/diff-width-safety.ts +1 -1
- package/packages/compactor/src/display/line-width-safety.ts +1 -1
- package/packages/compactor/src/index.ts +1 -1
- package/packages/compactor/src/session/recall-blocks.ts +2 -2
- package/packages/compactor/src/tools/register.ts +10 -10
- package/packages/compactor/src/tui/settings-overlay.ts +3 -3
- package/packages/compactor/src/types.ts +1 -1
- package/packages/core/package.json +5 -5
- package/packages/footer/package.json +4 -3
- package/packages/footer/src/commands.ts +1 -1
- package/packages/footer/src/events.ts +1 -1
- package/packages/footer/src/help.ts +2 -2
- package/packages/footer/src/index.ts +3 -3
- package/packages/footer/src/rendering/renderer.ts +2 -2
- package/packages/footer/src/rendering/theme.ts +1 -1
- package/packages/footer/src/segments/status-ext.ts +1 -1
- package/packages/footer/src/tui/settings-tui.ts +2 -2
- package/packages/footer/src/types.ts +1 -1
- package/packages/info-screen/core-groups.ts +3 -3
- package/packages/info-screen/index.ts +1 -1
- package/packages/info-screen/package.json +5 -4
- package/packages/info-screen/tui/info-overlay.ts +3 -3
- package/packages/input-shortcuts/package.json +4 -3
- package/packages/input-shortcuts/src/chord-overlay.ts +2 -2
- package/packages/input-shortcuts/src/index.ts +2 -2
- package/packages/input-shortcuts/src/settings-overlay.ts +2 -2
- package/packages/input-shortcuts/src/status.ts +1 -1
- package/packages/kanboard/commands.ts +1 -1
- package/packages/kanboard/index.ts +1 -1
- package/packages/kanboard/package.json +4 -3
- package/packages/kanboard/tui/kanboard-overlay.ts +2 -2
- package/packages/mcp/package.json +5 -4
- package/packages/mcp/src/index.ts +1 -1
- package/packages/mcp/src/tui/add-overlay.ts +2 -2
- package/packages/mcp/src/tui/settings-overlay.ts +2 -2
- package/packages/memory/commands.ts +1 -1
- package/packages/memory/embedding.ts +1 -1
- package/packages/memory/index.ts +1 -1
- package/packages/memory/package.json +4 -3
- package/packages/memory/tools.ts +2 -2
- package/packages/memory/tui/settings-tui.ts +1 -1
- package/packages/milestone/commands.ts +1 -1
- package/packages/milestone/hooks.ts +1 -1
- package/packages/milestone/index.ts +1 -1
- package/packages/milestone/package.json +5 -4
- package/packages/notify/commands.ts +1 -1
- package/packages/notify/events.ts +1 -1
- package/packages/notify/index.ts +1 -1
- package/packages/notify/package.json +5 -4
- package/packages/notify/tools.ts +2 -2
- package/packages/notify/tui/gotify-setup.ts +3 -3
- package/packages/notify/tui/ntfy-setup.ts +3 -3
- package/packages/notify/tui/recap-model-selector.ts +3 -3
- package/packages/notify/tui/settings-overlay.ts +3 -3
- package/packages/notify/tui/telegram-setup.ts +3 -3
- package/packages/ralph/index.ts +1 -1
- package/packages/ralph/package.json +6 -5
- package/packages/ralph/ralph-loop.ts +1 -1
- package/packages/ralph/tools.ts +2 -2
- package/packages/subagents/package.json +6 -5
- package/packages/subagents/src/agent-manager.ts +2 -2
- package/packages/subagents/src/agent-runner.ts +3 -3
- package/packages/subagents/src/conversation-viewer.ts +2 -2
- package/packages/subagents/src/custom-agents.ts +1 -1
- package/packages/subagents/src/index.ts +4 -4
- package/packages/subagents/src/model-resolver.ts +1 -1
- package/packages/subagents/src/types.ts +2 -2
- package/packages/subagents/src/widget.ts +3 -3
- package/packages/unipi/index.ts +1 -1
- package/packages/updater/package.json +4 -3
- package/packages/updater/src/commands.ts +1 -1
- package/packages/updater/src/index.ts +1 -1
- package/packages/updater/src/markdown.ts +4 -4
- package/packages/updater/src/tui/changelog-overlay.ts +4 -4
- package/packages/updater/src/tui/readme-overlay.ts +4 -4
- package/packages/updater/src/tui/settings-overlay.ts +3 -3
- package/packages/updater/src/tui/update-overlay.ts +4 -4
- package/packages/utility/package.json +4 -3
- package/packages/utility/src/commands.ts +1 -1
- package/packages/utility/src/diff/renderer.ts +1 -1
- package/packages/utility/src/diff/wrapper.ts +2 -2
- package/packages/utility/src/index.ts +2 -2
- package/packages/utility/src/info-screen.ts +1 -1
- package/packages/utility/src/tools/env.ts +1 -1
- package/packages/utility/src/tui/badge-settings-tui.ts +2 -2
- package/packages/utility/src/tui/name-badge-state.ts +1 -1
- package/packages/utility/src/tui/name-badge.ts +3 -3
- package/packages/utility/src/tui/util-settings-tui.ts +2 -2
- package/packages/web-api/package.json +6 -4
- package/packages/web-api/src/commands.ts +1 -1
- package/packages/web-api/src/index.ts +1 -1
- package/packages/web-api/src/tools.ts +2 -2
- package/packages/web-api/src/tui/settings-dialog.ts +1 -1
- package/packages/workflow/commands.ts +1 -1
- package/packages/workflow/index.ts +1 -1
- package/packages/workflow/package.json +6 -5
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Uses the project-wide cached model list from ~/.unipi/config/models-cache.json.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Component } from "@
|
|
9
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
10
|
-
import type { Theme } from "@
|
|
8
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
9
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
10
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
11
11
|
import { readModelCache, type CachedModel } from "@pi-unipi/core";
|
|
12
12
|
import { loadConfig, saveConfig } from "../settings.js";
|
|
13
13
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Allows toggling platforms, configuring credentials, and per-event settings.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Component } from "@
|
|
9
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
10
|
-
import type { Theme } from "@
|
|
8
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
9
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
10
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
11
11
|
import {
|
|
12
12
|
loadConfig,
|
|
13
13
|
saveConfig,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Guides user through BotFather flow and auto-detects chat ID.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Component } from "@
|
|
9
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
10
|
-
import type { Theme } from "@
|
|
8
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
9
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
10
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
11
11
|
import { pollForChatId } from "../platforms/telegram.js";
|
|
12
12
|
import { updateConfig } from "../settings.js";
|
|
13
13
|
|
package/packages/ralph/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Emits MODULE_READY, RALPH_LOOP_START/END events.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI, ExtensionContext } from "@
|
|
8
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
import {
|
|
10
10
|
UNIPI_EVENTS,
|
|
11
11
|
MODULES,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/ralph",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Long-running iterative development loops for Pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -38,9 +39,9 @@
|
|
|
38
39
|
"@pi-unipi/info-screen": "*"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
42
|
+
"@earendil-works/pi-ai": "^0.75.5",
|
|
43
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
44
|
+
"@earendil-works/pi-tui": "^0.75.5",
|
|
45
|
+
"typebox": "^1.1.38"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path from "node:path";
|
|
10
|
-
import type { ExtensionContext } from "@
|
|
10
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
11
11
|
import {
|
|
12
12
|
RALPH_DIR,
|
|
13
13
|
RALPH_COMPLETE_MARKER,
|
package/packages/ralph/tools.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Tools for the LLM to control ralph loops.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Type } from "
|
|
8
|
-
import type { ExtensionAPI, ExtensionContext } from "@
|
|
7
|
+
import { Type } from "typebox";
|
|
8
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
import { RALPH_COMPLETE_MARKER, RALPH_DEFAULTS, RALPH_TOOLS } from "@pi-unipi/core";
|
|
10
10
|
import { RalphLoopManager, DEFAULT_REFLECT_INSTRUCTIONS } from "./ralph-loop.js";
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/subagents",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Subagents for UniPi — parallel execution, file locking, workflow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@pi-unipi/core": "*",
|
|
21
21
|
"@pi-unipi/workflow": "*",
|
|
22
|
-
"@pi-unipi/info-screen": "*"
|
|
22
|
+
"@pi-unipi/info-screen": "*",
|
|
23
|
+
"@earendil-works/pi-agent-core": "^0.75.5"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"typescript": "^5.8.3"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
29
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
30
|
+
"@earendil-works/pi-tui": "^0.75.5",
|
|
31
|
+
"typebox": "^1.1.38"
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
|
-
import type { Model } from "@
|
|
10
|
-
import type { AgentSession, ExtensionAPI, ExtensionContext } from "@
|
|
9
|
+
import type { Model } from "@earendil-works/pi-ai";
|
|
10
|
+
import type { AgentSession, ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
11
11
|
import { runAgent, type ToolActivity } from "./agent-runner.js";
|
|
12
12
|
import { resolveModel, type ModelRegistry } from "./model-resolver.js";
|
|
13
13
|
import type { AgentRecord, AgentConfig, AgentType, ThinkingLevel } from "./types.js";
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Forwards abort signals for ESC propagation.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Model } from "@
|
|
9
|
-
import type { ExtensionContext } from "@
|
|
8
|
+
import type { Model } from "@earendil-works/pi-ai";
|
|
9
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import {
|
|
11
11
|
type AgentSession,
|
|
12
12
|
type AgentSessionEvent,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getAgentDir,
|
|
17
17
|
SessionManager,
|
|
18
18
|
SettingsManager,
|
|
19
|
-
} from "@
|
|
19
|
+
} from "@earendil-works/pi-coding-agent";
|
|
20
20
|
import { BUILTIN_CONFIGS, type AgentConfig, type AgentType, type ThinkingLevel } from "./types.js";
|
|
21
21
|
|
|
22
22
|
/** Tools excluded from subagents to prevent nesting. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Supports keyboard navigation: ↑↓, PgUp/PgDn, Home/End, Esc/q to close.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AgentSession } from "@
|
|
9
|
+
import type { AgentSession } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import {
|
|
11
11
|
type Component,
|
|
12
12
|
matchesKey,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
truncateToWidth,
|
|
15
15
|
visibleWidth,
|
|
16
16
|
wrapTextWithAnsi,
|
|
17
|
-
} from "@
|
|
17
|
+
} from "@earendil-works/pi-tui";
|
|
18
18
|
import type { AgentActivity } from "./types.js";
|
|
19
19
|
|
|
20
20
|
/** Lines consumed by chrome: top border + header + header sep + footer sep + footer + bottom border. */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { existsSync, readdirSync, readFileSync, renameSync } from "node:fs";
|
|
10
10
|
import { join } from "node:path";
|
|
11
11
|
import { homedir } from "node:os";
|
|
12
|
-
import { parseFrontmatter } from "@
|
|
12
|
+
import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
13
13
|
import type { AgentConfig } from "./types.js";
|
|
14
14
|
|
|
15
15
|
/** Backup a corrupted file by renaming to .bak */
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* ESC propagation: all children abort on parent ESC
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { defineTool, type ExtensionAPI } from "@
|
|
10
|
-
import { Text } from "@
|
|
11
|
-
import { Type } from "
|
|
9
|
+
import { defineTool, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
11
|
+
import { Type } from "typebox";
|
|
12
12
|
import { existsSync, readdirSync } from "node:fs";
|
|
13
13
|
import { join } from "node:path";
|
|
14
14
|
import { homedir } from "node:os";
|
|
@@ -337,7 +337,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
// Store session context for badge generation
|
|
340
|
-
let sessionCtx: import("@
|
|
340
|
+
let sessionCtx: import("@earendil-works/pi-coding-agent").ExtensionContext | null = null;
|
|
341
341
|
|
|
342
342
|
// Session start: emit MODULE_READY + capture context
|
|
343
343
|
pi.on("session_start", async (_event, ctx) => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* to actual Model instances using the registry.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { Model } from "@
|
|
8
|
+
import type { Model } from "@earendil-works/pi-ai";
|
|
9
9
|
|
|
10
10
|
export interface ModelRegistry {
|
|
11
11
|
find(provider: string, modelId: string): Model<any> | undefined;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @pi-unipi/subagents — Type definitions
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { ThinkingLevel } from "@
|
|
6
|
-
import type { AgentSession } from "@
|
|
5
|
+
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
6
|
+
import type { AgentSession } from "@earendil-works/pi-coding-agent";
|
|
7
7
|
|
|
8
8
|
export type { ThinkingLevel };
|
|
9
9
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - ANSI-aware truncation via pi-tui
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { truncateToWidth } from "@
|
|
14
|
-
import type { ExtensionUIContext } from "@
|
|
13
|
+
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
14
|
+
import type { ExtensionUIContext } from "@earendil-works/pi-coding-agent";
|
|
15
15
|
import type { AgentManager } from "./agent-manager.js";
|
|
16
16
|
import type { AgentActivity } from "./types.js";
|
|
17
17
|
|
|
@@ -96,7 +96,7 @@ export class AgentWidget {
|
|
|
96
96
|
private spinnerFrame = 0;
|
|
97
97
|
private timer?: ReturnType<typeof setInterval>;
|
|
98
98
|
private uiCtx?: ExtensionUIContext;
|
|
99
|
-
private tui?: import("@
|
|
99
|
+
private tui?: import("@earendil-works/pi-tui").TUI;
|
|
100
100
|
private widgetRegistered = false;
|
|
101
101
|
/** Last content key — skips requestRender when only spinner changed. */
|
|
102
102
|
private lastContentKey = "";
|
package/packages/unipi/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/updater",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"@pi-unipi/core": "*"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
47
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
48
|
+
"@earendil-works/pi-tui": "^0.75.5"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@types/node": "^25.6.0",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Registers /unipi:readme [package], /unipi:changelog, /unipi:updater-settings
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ExtensionAPI, ExtensionCommandContext } from "@
|
|
7
|
+
import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
8
8
|
import { UNIPI_PREFIX, UPDATER_COMMANDS } from "@pi-unipi/core";
|
|
9
9
|
import { renderReadmeOverlay } from "./tui/readme-overlay.js";
|
|
10
10
|
import { renderChangelogOverlay } from "./tui/changelog-overlay.js";
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* with theme-aware styling. Falls back to simple ANSI rendering otherwise.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Markdown } from "@
|
|
10
|
-
import type { MarkdownTheme } from "@
|
|
11
|
-
import { getMarkdownTheme } from "@
|
|
12
|
-
import type { Theme } from "@
|
|
9
|
+
import { Markdown } from "@earendil-works/pi-tui";
|
|
10
|
+
import type { MarkdownTheme } from "@earendil-works/pi-tui";
|
|
11
|
+
import { getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
12
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Render markdown text to terminal-formatted lines.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { existsSync } from "fs";
|
|
9
9
|
import { join } from "path";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { parseChangelog } from "../changelog.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import { getInstalledPackageVersion } from "@pi-unipi/core";
|
|
@@ -39,9 +39,9 @@ function padVisible(content: string, targetWidth: number): string {
|
|
|
39
39
|
*/
|
|
40
40
|
export function renderChangelogOverlay() {
|
|
41
41
|
return (
|
|
42
|
-
tui: import("@
|
|
42
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
43
43
|
theme: Theme,
|
|
44
|
-
_kb: import("@
|
|
44
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
45
45
|
done: (result: { viewed: boolean } | null) => void,
|
|
46
46
|
) => {
|
|
47
47
|
const installedVersion = getInstalledPackageVersion(
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { readFileSync } from "fs";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { discoverReadmes, resolveReadmePath } from "../readme.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import type { ReadmeEntry } from "../../types.js";
|
|
@@ -38,9 +38,9 @@ function padVisible(content: string, targetWidth: number): string {
|
|
|
38
38
|
*/
|
|
39
39
|
export function renderReadmeOverlay(params?: { openDirect?: string }) {
|
|
40
40
|
return (
|
|
41
|
-
tui: import("@
|
|
41
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
42
42
|
theme: Theme,
|
|
43
|
-
_kb: import("@
|
|
43
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
44
44
|
done: (result: { viewed: boolean } | null) => void,
|
|
45
45
|
) => {
|
|
46
46
|
const state: ReadmeState = {
|
|
@@ -42,9 +42,9 @@ function trunc(text: string, width: number): string {
|
|
|
42
42
|
*/
|
|
43
43
|
export function renderSettingsOverlay() {
|
|
44
44
|
return (
|
|
45
|
-
tui: import("@
|
|
46
|
-
_theme: import("@
|
|
47
|
-
_kb: import("@
|
|
45
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
46
|
+
_theme: import("@earendil-works/pi-coding-agent").Theme,
|
|
47
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
48
48
|
done: (result: { saved: boolean } | null) => void,
|
|
49
49
|
) => {
|
|
50
50
|
const state = {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { join } from "path";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { parseChangelog, getNewerVersions } from "../changelog.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import { installUpdate } from "../installer.js";
|
|
@@ -41,9 +41,9 @@ interface UpdateState {
|
|
|
41
41
|
*/
|
|
42
42
|
export function renderUpdateOverlay(checkResult: UpdateCheckResult) {
|
|
43
43
|
return (
|
|
44
|
-
tui: import("@
|
|
44
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
45
45
|
theme: Theme,
|
|
46
|
-
_kb: import("@
|
|
46
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
47
47
|
done: (result: { updated: boolean } | null) => void,
|
|
48
48
|
) => {
|
|
49
49
|
const config = loadConfig();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/utility",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Utility commands and tools for Pi coding agent — lifecycle, diagnostics, cache, analytics, display, batch execution",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"@types/diff": "^7.0.2"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
50
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
51
|
+
"typebox": "^1.1.38"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
54
|
"test": "npx tsx --test tests/**/*.test.ts"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - /unipi:doctor — run diagnostics
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { ExtensionAPI, ExtensionContext } from "@
|
|
13
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
14
14
|
import {
|
|
15
15
|
UNIPI_PREFIX,
|
|
16
16
|
UTILITY_COMMANDS,
|
|
@@ -13,7 +13,7 @@ import type { ParsedDiff, DiffLine } from "./parser.js";
|
|
|
13
13
|
import type { DiffColors } from "./theme.js";
|
|
14
14
|
import { hexToBgAnsi, hexToFgAnsi } from "./theme.js";
|
|
15
15
|
import { hlBlock, detectLanguage } from "./highlighter.js";
|
|
16
|
-
import { truncateToWidth as piTruncateToWidth, visibleWidth as piVisibleWidth } from "@
|
|
16
|
+
import { truncateToWidth as piTruncateToWidth, visibleWidth as piVisibleWidth } from "@earendil-works/pi-tui";
|
|
17
17
|
|
|
18
18
|
// ─── Constants ──────────────────────────────────────────────────────────────────
|
|
19
19
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
import * as fs from "node:fs";
|
|
13
13
|
import * as path from "node:path";
|
|
14
|
-
import type { ExtensionAPI, ToolDefinition, AgentToolResult } from "@
|
|
15
|
-
import { visibleWidth as piVisibleWidth, truncateToWidth as piTruncateToWidth } from "@
|
|
14
|
+
import type { ExtensionAPI, ToolDefinition, AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
15
|
+
import { visibleWidth as piVisibleWidth, truncateToWidth as piTruncateToWidth } from "@earendil-works/pi-tui";
|
|
16
16
|
import { readDiffSettings } from "./settings.js";
|
|
17
17
|
import { parseDiff } from "./parser.js";
|
|
18
18
|
import { resolveDiffColors, applyDiffPalette } from "./theme.js";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - TUI: settings inspector pattern, name badge
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { ExtensionAPI, InputEvent, AgentEndEvent } from "@
|
|
15
|
+
import type { ExtensionAPI, InputEvent, AgentEndEvent } from "@earendil-works/pi-coding-agent";
|
|
16
16
|
import {
|
|
17
17
|
UNIPI_EVENTS,
|
|
18
18
|
MODULES,
|
|
@@ -44,7 +44,7 @@ let firstMessageSeen = false;
|
|
|
44
44
|
let firstUserText = "";
|
|
45
45
|
|
|
46
46
|
/** Stored UI context from first input, used to show badge overlay after agent responds */
|
|
47
|
-
let firstInputCtx: import("@
|
|
47
|
+
let firstInputCtx: import("@earendil-works/pi-coding-agent").ExtensionContext | null = null;
|
|
48
48
|
|
|
49
49
|
/** All commands registered by this module */
|
|
50
50
|
const ALL_COMMANDS = [
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Model list loaded from shared model cache (~/.unipi/config/models-cache.json).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { Component } from "@
|
|
10
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
9
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
10
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
11
|
import type { CachedModel } from "@pi-unipi/core";
|
|
12
12
|
import { readModelCache } from "@pi-unipi/core";
|
|
13
13
|
import {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Generate session name via background agent event
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { ExtensionAPI } from "@
|
|
11
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { UNIPI_EVENTS, emitEvent } from "@pi-unipi/core";
|
|
13
13
|
import { NameBadgeComponent } from "./name-badge.js";
|
|
14
14
|
import { readBadgeSettings } from "./badge-settings.js";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Display-only — no input handling, no focus.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { Component } from "@
|
|
10
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
9
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
10
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
|
|
13
13
|
/** Placeholder text when no session name is set */
|
|
14
14
|
const PLACEHOLDER = "Set a name";
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* Replaces badge-settings-tui.ts as the primary settings interface.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { Component } from "@
|
|
12
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
11
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
12
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
13
13
|
import type { CachedModel } from "@pi-unipi/core";
|
|
14
14
|
import { readModelCache } from "@pi-unipi/core";
|
|
15
15
|
import {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/web-api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Web search, read, and summarize tools with provider-based backend selection for Pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -46,12 +47,13 @@
|
|
|
46
47
|
"wreq-js": "^2.3.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
50
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
51
|
+
"@earendil-works/pi-tui": "^0.75.5",
|
|
52
|
+
"typebox": "^1.1.38"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@types/lodash": "^4.17.24",
|
|
56
|
+
"@types/mime-types": "^3.0.1",
|
|
55
57
|
"@types/node": "^25.6.0"
|
|
56
58
|
}
|
|
57
59
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Registers /unipi:web-settings and /unipi:web-cache-clear commands.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ExtensionAPI, ExtensionCommandContext } from "@
|
|
7
|
+
import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
8
8
|
import { UNIPI_PREFIX } from "@pi-unipi/core";
|
|
9
9
|
import { showSettingsDialog } from "./tui/settings-dialog.js";
|
|
10
10
|
import { webCache } from "./cache.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Provides agent tools: web-search, multi-web-content-read, web-llm-summarize
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
import {
|
|
10
10
|
UNIPI_EVENTS,
|
|
11
11
|
MODULES,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Implements smart provider selection based on ranking.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Type } from "
|
|
9
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import { Type } from "typebox";
|
|
9
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import { registry } from "./providers/registry.js";
|
|
11
11
|
import type {
|
|
12
12
|
WebProvider,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses pi's TUI components for provider selection and key input.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionCommandContext } from "@
|
|
8
|
+
import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
import { registry } from "../providers/registry.js";
|
|
10
10
|
import {
|
|
11
11
|
getApiKey,
|