@jaggerxtrm/pi-extensions 0.9.2 → 0.9.4
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/extensions/auto-session-name/index.ts +1 -1
- package/extensions/auto-update/index.ts +1 -1
- package/extensions/beads/index.ts +42 -5
- package/extensions/compact-header/index.ts +3 -3
- package/extensions/custom-footer/index.ts +2 -2
- package/extensions/custom-provider-qwen-cli/index.ts +2 -2
- package/extensions/git-checkpoint/index.ts +1 -1
- package/extensions/lsp-bootstrap/index.ts +1 -1
- package/extensions/pi-serena-compact/index.ts +14 -14
- package/extensions/pi-serena-compact/package.json +2 -2
- package/extensions/quality-gates/index.ts +1 -1
- package/extensions/serena-pool/index.ts +1 -1
- package/extensions/serena-pool/package.json +1 -1
- package/extensions/service-skills/index.ts +1 -1
- package/extensions/session-flow/index.ts +2 -2
- package/extensions/sp-terminal-overlay/index.ts +2 -2
- package/extensions/xtrm-loader/index.ts +1 -1
- package/extensions/xtrm-ui/format.ts +1 -1
- package/extensions/xtrm-ui/index.ts +7 -10
- package/extensions/xtrm-ui/package.json +1 -1
- package/package.json +1 -1
- package/src/core/adapter.ts +1 -1
- package/src/index.ts +1 -1
- package/src/registry.ts +13 -5
- package/extensions/xtrm-ui/themes/pidex-dark-flattools.json +0 -79
- package/extensions/xtrm-ui/themes/pidex-dark.json +0 -85
- package/extensions/xtrm-ui/themes/pidex-light-flattools.json +0 -79
- package/extensions/xtrm-ui/themes/pidex-light.json +0 -85
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Automatically names sessions based on the first user message.
|
|
5
5
|
*/
|
|
6
|
-
import type { ExtensionAPI } from "@
|
|
6
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
7
7
|
|
|
8
8
|
export default function (pi: ExtensionAPI) {
|
|
9
9
|
let named = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-pi Auto Update — check for new oh-pi version on session start
|
|
3
3
|
*/
|
|
4
|
-
import type { ExtensionAPI } from "@
|
|
4
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { execSync } from "node:child_process";
|
|
6
6
|
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@
|
|
2
|
-
import { isToolCallEventType, isBashToolResult } from "@
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { isToolCallEventType, isBashToolResult } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import { SubprocessRunner, EventAdapter } from "../../src/core";
|
|
4
4
|
|
|
5
5
|
export default function (pi: ExtensionAPI) {
|
|
@@ -75,6 +75,41 @@ export default function (pi: ExtensionAPI) {
|
|
|
75
75
|
return false;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
// --- Claim-lookup cache -------------------------------------------------------
|
|
79
|
+
// getActiveClaim spawns bd kv get (~850ms) + bd show (~300ms); hasTrackableWork spawns
|
|
80
|
+
// bd list (~350ms). Running these on EVERY mutating tool call added ~1s to each edit.
|
|
81
|
+
// Cache the resolved values with a short TTL and invalidate on the bd update --claim /
|
|
82
|
+
// bd close commands we already intercept in the tool_result hook below.
|
|
83
|
+
let activeClaimCache: { sessionId: string; cwd: string; value: string | null; expiresAt: number } | null = null;
|
|
84
|
+
let hasTrackableWorkCache: { cwd: string; value: boolean; expiresAt: number } | null = null;
|
|
85
|
+
const ACTIVE_CLAIM_TTL_MS = 3000;
|
|
86
|
+
const HAS_TRACKABLE_WORK_TTL_MS = 5000;
|
|
87
|
+
|
|
88
|
+
const invalidateClaimCache = (): void => {
|
|
89
|
+
activeClaimCache = null;
|
|
90
|
+
hasTrackableWorkCache = null;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const getActiveClaimCached = async (sessionId: string, cwd: string): Promise<string | null> => {
|
|
94
|
+
const now = Date.now();
|
|
95
|
+
if (activeClaimCache && activeClaimCache.sessionId === sessionId && activeClaimCache.cwd === cwd && activeClaimCache.expiresAt > now) {
|
|
96
|
+
return activeClaimCache.value;
|
|
97
|
+
}
|
|
98
|
+
const value = await getActiveClaim(sessionId, cwd);
|
|
99
|
+
activeClaimCache = { sessionId, cwd, value, expiresAt: Date.now() + ACTIVE_CLAIM_TTL_MS };
|
|
100
|
+
return value;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const hasTrackableWorkCached = async (cwd: string): Promise<boolean> => {
|
|
104
|
+
const now = Date.now();
|
|
105
|
+
if (hasTrackableWorkCache && hasTrackableWorkCache.cwd === cwd && hasTrackableWorkCache.expiresAt > now) {
|
|
106
|
+
return hasTrackableWorkCache.value;
|
|
107
|
+
}
|
|
108
|
+
const value = await hasTrackableWork(cwd);
|
|
109
|
+
hasTrackableWorkCache = { cwd, value, expiresAt: Date.now() + HAS_TRACKABLE_WORK_TTL_MS };
|
|
110
|
+
return value;
|
|
111
|
+
};
|
|
112
|
+
|
|
78
113
|
const stripQuoted = (command: string): string => command.replace(/'[^']*'|"[^"]*"/g, "");
|
|
79
114
|
const isSpecialistsSubprocessCommand = (commandUnquoted: string): boolean =>
|
|
80
115
|
/\bspecialists\s+(run|resume|result|feed|stop|status)\b/.test(commandUnquoted);
|
|
@@ -105,9 +140,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
105
140
|
const sessionId = getSessionId(ctx);
|
|
106
141
|
|
|
107
142
|
if (EventAdapter.isMutatingFileTool(event)) {
|
|
108
|
-
const claim = await
|
|
143
|
+
const claim = await getActiveClaimCached(sessionId, cwd);
|
|
109
144
|
if (!claim) {
|
|
110
|
-
const hasWork = await
|
|
145
|
+
const hasWork = await hasTrackableWorkCached(cwd);
|
|
111
146
|
if (hasWork) {
|
|
112
147
|
if (ctx.hasUI) {
|
|
113
148
|
ctx.ui.notify("Beads: Edit blocked. Claim an issue first.", "warning");
|
|
@@ -138,7 +173,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
138
173
|
}
|
|
139
174
|
|
|
140
175
|
if (/\bgit\s+commit\b/.test(commandUnquoted)) {
|
|
141
|
-
const claim = await
|
|
176
|
+
const claim = await getActiveClaimCached(sessionId, cwd);
|
|
142
177
|
if (claim) {
|
|
143
178
|
return {
|
|
144
179
|
block: true,
|
|
@@ -165,6 +200,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
165
200
|
const issueId = issueMatch[1];
|
|
166
201
|
await SubprocessRunner.run("bd", ["kv", "set", `claimed:${sessionId}`, issueId], { cwd });
|
|
167
202
|
memoryGateFired = false;
|
|
203
|
+
invalidateClaimCache();
|
|
168
204
|
const claimNotice = `\n\n✅ **Beads**: Session \`${sessionId}\` claimed issue \`${issueId}\`. File edits are now unblocked.`;
|
|
169
205
|
return { content: [...event.content, { type: "text", text: claimNotice }] };
|
|
170
206
|
}
|
|
@@ -177,6 +213,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
177
213
|
if (closedIssueId) {
|
|
178
214
|
await SubprocessRunner.run("bd", ["kv", "set", `closed-this-session:${sessionId}`, closedIssueId], { cwd });
|
|
179
215
|
memoryGateFired = false;
|
|
216
|
+
invalidateClaimCache();
|
|
180
217
|
}
|
|
181
218
|
|
|
182
219
|
const memoryGateText = closedIssueId
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* oh-pi Compact Header — table-style startup info with dynamic column widths
|
|
3
3
|
*/
|
|
4
|
-
import type { ExtensionAPI } from "@
|
|
5
|
-
import { VERSION } from "@
|
|
6
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
4
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
5
|
+
import { VERSION } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
7
7
|
|
|
8
8
|
export default function (pi: ExtensionAPI) {
|
|
9
9
|
pi.on("session_start", async (_event, ctx) => {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Line 3: ◐ 4843.5 Rework project bootstrap... — beads claim or ○ 6 open
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
11
|
-
import { truncateToWidth, visibleWidth } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
11
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
12
12
|
|
|
13
13
|
import { SubprocessRunner, EventAdapter } from "../../src/core";
|
|
14
14
|
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* # Then /login qwen-cli, or set QWEN_CLI_API_KEY=...
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "@
|
|
13
|
-
import type { ExtensionAPI } from "@
|
|
12
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "@earendil-works/pi-ai";
|
|
13
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
14
14
|
|
|
15
15
|
// =============================================================================
|
|
16
16
|
// Constants
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* When forking, offers to restore code to that point in history.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
const checkpoints = new Map<string, string>();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ExtensionAPI, ToolResultEvent } from "@
|
|
1
|
+
import type { ExtensionAPI, ToolResultEvent } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
|
|
3
3
|
// Serena/GitNexus MCP tool names that produce verbose output
|
|
4
4
|
const COMPACT_TOOLS = new Set([
|
|
5
5
|
// Serena symbol operations
|
|
6
6
|
"find_symbol",
|
|
7
|
-
"find_referencing_symbols",
|
|
7
|
+
"find_referencing_symbols",
|
|
8
8
|
"get_symbols_overview",
|
|
9
9
|
"jet_brains_find_symbol",
|
|
10
10
|
"jet_brains_find_referencing_symbols",
|
|
11
11
|
"jet_brains_get_symbols_overview",
|
|
12
12
|
"jet_brains_type_hierarchy",
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
// Serena file operations
|
|
15
15
|
"read_file",
|
|
16
16
|
"create_text_file",
|
|
@@ -18,30 +18,30 @@ const COMPACT_TOOLS = new Set([
|
|
|
18
18
|
"replace_lines",
|
|
19
19
|
"delete_lines",
|
|
20
20
|
"insert_at_line",
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
// Serena search/navigation
|
|
23
23
|
"search_for_pattern",
|
|
24
24
|
"list_dir",
|
|
25
25
|
"find_file",
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
// Serena symbol editing
|
|
28
28
|
"replace_symbol_body",
|
|
29
29
|
"insert_after_symbol",
|
|
30
30
|
"insert_before_symbol",
|
|
31
31
|
"rename_symbol",
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
// GitNexus
|
|
34
34
|
"gitnexus_query",
|
|
35
35
|
"gitnexus_context",
|
|
36
36
|
"gitnexus_impact",
|
|
37
37
|
"gitnexus_detect_changes",
|
|
38
38
|
"gitnexus_list_repos",
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
// Serena memory
|
|
41
41
|
"read_memory",
|
|
42
42
|
"write_memory",
|
|
43
43
|
"list_memories",
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
// Other verbose tools
|
|
46
46
|
"execute_shell_command",
|
|
47
47
|
"structured_return",
|
|
@@ -66,10 +66,10 @@ function getTextContent(content: Array<{ type: string; text?: string }>): string
|
|
|
66
66
|
|
|
67
67
|
function truncateLines(text: string, maxLines: number, maxLineLen = 180): string {
|
|
68
68
|
const lines = text.split("\n");
|
|
69
|
-
const truncated = lines.map(line =>
|
|
69
|
+
const truncated = lines.map(line =>
|
|
70
70
|
line.length > maxLineLen ? line.slice(0, maxLineLen) + "…" : line
|
|
71
71
|
);
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
if (truncated.length <= maxLines) return truncated.join("\n");
|
|
74
74
|
return truncated.slice(0, maxLines).join("\n") + `\n… +${truncated.length - maxLines} more lines`;
|
|
75
75
|
}
|
|
@@ -80,16 +80,16 @@ function compactResult(
|
|
|
80
80
|
maxLines: number = 6,
|
|
81
81
|
): Array<{ type: string; text: string }> {
|
|
82
82
|
const textContent = getTextContent(content);
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
if (!textContent) {
|
|
85
85
|
return [{ type: "text", text: "✓ No output" }];
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
// For certain tools, show more output
|
|
89
89
|
const effectiveMaxLines = PRESERVE_OUTPUT_TOOLS.has(toolName) ? 12 : maxLines;
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
const compacted = truncateLines(textContent, effectiveMaxLines, 180);
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
return [{ type: "text", text: compacted }];
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "index.ts",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
15
|
+
"@earendil-works/pi-coding-agent": "^0.80.0",
|
|
16
|
+
"@earendil-works/pi-tui": "^0.80.0"
|
|
17
17
|
},
|
|
18
18
|
"pi": {
|
|
19
19
|
"extensions": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { SubprocessRunner, EventAdapter } from "../../src/core";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* controlling Serena is verifiably dead (pid+startTime check). Process-group
|
|
21
21
|
* kills are bounded to ours, so editor LSPs / tests / hooks are never touched.
|
|
22
22
|
*/
|
|
23
|
-
import type { ExtensionAPI } from "@
|
|
23
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
24
24
|
import { spawn, execFileSync } from "node:child_process";
|
|
25
25
|
import { connect } from "node:net";
|
|
26
26
|
import { existsSync, mkdirSync, openSync, writeSync, closeSync, readFileSync, unlinkSync, realpathSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@
|
|
2
|
-
import { isBashToolResult } from "@
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { isBashToolResult } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import { SubprocessRunner, EventAdapter } from "../../src/core";
|
|
4
4
|
|
|
5
5
|
function isClaimCommand(command: string): { isClaim: boolean; issueId: string | null } {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
|
|
2
|
-
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@
|
|
3
|
-
import { matchesKey, truncateToWidth, visibleWidth } from "@
|
|
2
|
+
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
4
4
|
|
|
5
5
|
const MAX_BUFFER_LINES = 2000;
|
|
6
6
|
const DEFAULT_VISIBLE_LINES = 24;
|
|
@@ -17,7 +17,7 @@ interface HunkCursor {
|
|
|
17
17
|
newLine: number;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function shortenHome(path: string): string {
|
|
21
21
|
const home = process.env.HOME;
|
|
22
22
|
if (home && path.startsWith(home)) return `~${path.slice(home.length)}`;
|
|
23
23
|
return path;
|
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
LsToolDetails,
|
|
21
21
|
ReadToolDetails,
|
|
22
22
|
ToolResultEvent,
|
|
23
|
-
} from "@
|
|
23
|
+
} from "@earendil-works/pi-coding-agent";
|
|
24
24
|
import {
|
|
25
25
|
CustomEditor,
|
|
26
26
|
createBashTool,
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
createLsTool,
|
|
31
31
|
createReadTool,
|
|
32
32
|
createWriteTool,
|
|
33
|
-
} from "@
|
|
34
|
-
import { Box, Text, truncateToWidth, visibleWidth } from "@
|
|
33
|
+
} from "@earendil-works/pi-coding-agent";
|
|
34
|
+
import { Box, Text, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
35
35
|
import { existsSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
36
36
|
import { basename, dirname, join } from "node:path";
|
|
37
37
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -184,14 +184,11 @@ function resolvePiCodingAgentEntryPath(): string {
|
|
|
184
184
|
|
|
185
185
|
candidates.push(
|
|
186
186
|
join(dirname(process.execPath), "..", "lib", "node_modules", "@earendil-works", "pi-coding-agent", "dist", "index.js"),
|
|
187
|
-
join(dirname(process.execPath), "..", "lib", "node_modules", "@mariozechner", "pi-coding-agent", "dist", "index.js"),
|
|
188
187
|
);
|
|
189
188
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
} catch {}
|
|
194
|
-
}
|
|
189
|
+
try {
|
|
190
|
+
candidates.push(maybeFileUrlToPath(import.meta.resolve("@earendil-works/pi-coding-agent")));
|
|
191
|
+
} catch {}
|
|
195
192
|
|
|
196
193
|
const entryPath = candidates.find((candidate) => existsSync(candidate));
|
|
197
194
|
if (!entryPath) throw new Error("Could not resolve pi-coding-agent entry path");
|
|
@@ -1710,7 +1707,7 @@ function registerXtrmUiTools(pi: ExtensionAPI, getPrefs: () => XtrmUiPrefs): voi
|
|
|
1710
1707
|
// ============================================================================
|
|
1711
1708
|
|
|
1712
1709
|
function isXtrmTheme(name: string | undefined): boolean {
|
|
1713
|
-
return name === "pidex-dark" || name === "pidex-light";
|
|
1710
|
+
return name === "pidex-dark" || name === "pidex-light" || name === "pidex-dark-flattools" || name === "pidex-light-flattools";
|
|
1714
1711
|
}
|
|
1715
1712
|
|
|
1716
1713
|
export default function xtrmUiExtension(pi: ExtensionAPI): void {
|
package/package.json
CHANGED
package/src/core/adapter.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as nodePath from "node:path";
|
|
3
3
|
|
|
4
|
-
import type { ExtensionAPI, ToolCallEvent } from "@
|
|
4
|
+
import type { ExtensionAPI, ToolCallEvent } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { PI_MUTATING_FILE_TOOLS } from "./guard-rules";
|
|
6
6
|
|
|
7
7
|
export class EventAdapter {
|
package/src/index.ts
CHANGED
package/src/registry.ts
CHANGED
|
@@ -8,22 +8,21 @@ import customFooterExtension from "./extensions/custom-footer.ts";
|
|
|
8
8
|
import customProviderQwenCliExtension from "./extensions/custom-provider-qwen-cli.ts";
|
|
9
9
|
import gitCheckpointExtension from "./extensions/git-checkpoint.ts";
|
|
10
10
|
import lspBootstrapExtension from "./extensions/lsp-bootstrap.ts";
|
|
11
|
-
import piSerenaCompactExtension from "./extensions/pi-serena-compact.ts";
|
|
12
11
|
import serenaPoolExtension from "./extensions/serena-pool.ts";
|
|
13
12
|
import qualityGatesExtension from "./extensions/quality-gates.ts";
|
|
14
13
|
import serviceSkillsExtension from "./extensions/service-skills.ts";
|
|
15
14
|
import sessionFlowExtension from "./extensions/session-flow.ts";
|
|
16
15
|
import spTerminalOverlayExtension from "./extensions/sp-terminal-overlay.ts";
|
|
17
|
-
import xtprompt from "./extensions/xtprompt.ts";
|
|
18
16
|
import xtrmLoaderExtension from "./extensions/xtrm-loader.ts";
|
|
19
17
|
import xtrmUiExtension from "./extensions/xtrm-ui.ts";
|
|
18
|
+
import xtpromptExtension from "./extensions/xtprompt.ts";
|
|
20
19
|
|
|
21
20
|
export type ManagedPiExtension = {
|
|
22
21
|
readonly id: string;
|
|
23
22
|
readonly register: (pi: ExtensionAPI) => void;
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
const allManagedPiExtensions: readonly ManagedPiExtension[] = [
|
|
27
26
|
{ id: "auto-session-name", register: autoSessionNameExtension },
|
|
28
27
|
{ id: "auto-update", register: autoUpdateExtension },
|
|
29
28
|
{ id: "beads", register: beadsExtension },
|
|
@@ -33,16 +32,25 @@ export const managedPiExtensions: readonly ManagedPiExtension[] = [
|
|
|
33
32
|
{ id: "git-checkpoint", register: gitCheckpointExtension },
|
|
34
33
|
{ id: "serena-pool", register: serenaPoolExtension },
|
|
35
34
|
{ id: "lsp-bootstrap", register: lspBootstrapExtension },
|
|
36
|
-
{ id: "pi-serena-compact", register: piSerenaCompactExtension },
|
|
37
35
|
{ id: "quality-gates", register: qualityGatesExtension },
|
|
38
36
|
{ id: "service-skills", register: serviceSkillsExtension },
|
|
39
37
|
{ id: "session-flow", register: sessionFlowExtension },
|
|
40
38
|
{ id: "sp-terminal-overlay", register: spTerminalOverlayExtension },
|
|
41
|
-
{ id: "xtprompt", register: xtprompt },
|
|
42
39
|
{ id: "xtrm-loader", register: xtrmLoaderExtension },
|
|
43
40
|
{ id: "xtrm-ui", register: xtrmUiExtension },
|
|
41
|
+
{ id: "xtprompt", register: xtpromptExtension },
|
|
44
42
|
];
|
|
45
43
|
|
|
44
|
+
// Extensions disabled by default. Source preserved in ./extensions/ — remove an
|
|
45
|
+
// id from this set to re-enable. (xtrm-e2vkn)
|
|
46
|
+
// - quality-gates: hook-script lookup (.claude/hooks/quality-check.*) is broken
|
|
47
|
+
// under the managed .xtrm/hooks layout, so it never fires. Disabled until
|
|
48
|
+
const DISABLED_EXTENSIONS = new Set<string>(["quality-gates"]);
|
|
49
|
+
|
|
50
|
+
export const managedPiExtensions: readonly ManagedPiExtension[] = allManagedPiExtensions.filter(
|
|
51
|
+
(extension) => !DISABLED_EXTENSIONS.has(extension.id),
|
|
52
|
+
);
|
|
53
|
+
|
|
46
54
|
function registerManagedExtension(pi: ExtensionAPI, extension: ManagedPiExtension): void {
|
|
47
55
|
try {
|
|
48
56
|
extension.register(pi);
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
-
"name": "pidex-dark-flattools",
|
|
4
|
-
"vars": {
|
|
5
|
-
"accentBlue": "#b8d3ff",
|
|
6
|
-
"accentCyan": "#b8d3ff",
|
|
7
|
-
"accentTeal": "#c7d2e0",
|
|
8
|
-
"successGreen": "#9fd59f",
|
|
9
|
-
"errorRed": "#ff9a9a",
|
|
10
|
-
"warningAmber": "#d2b48c",
|
|
11
|
-
"surface": "#000000",
|
|
12
|
-
"surfaceAlt": "#111111",
|
|
13
|
-
"surfaceMuted": "#1a1a1a",
|
|
14
|
-
"surfaceUser": "#1f1f1f",
|
|
15
|
-
"surfaceCustom": "#161616",
|
|
16
|
-
"gray": "#a7a7a7",
|
|
17
|
-
"dimGray": "#8a8a8a",
|
|
18
|
-
"borderGray": "#666666",
|
|
19
|
-
"borderBright": "#9a9a9a"
|
|
20
|
-
},
|
|
21
|
-
"colors": {
|
|
22
|
-
"accent": "accentBlue",
|
|
23
|
-
"border": "borderGray",
|
|
24
|
-
"borderAccent": "borderBright",
|
|
25
|
-
"borderMuted": "borderGray",
|
|
26
|
-
"success": "successGreen",
|
|
27
|
-
"error": "errorRed",
|
|
28
|
-
"warning": "warningAmber",
|
|
29
|
-
"muted": "gray",
|
|
30
|
-
"dim": "dimGray",
|
|
31
|
-
"text": "",
|
|
32
|
-
"thinkingText": "gray",
|
|
33
|
-
"selectedBg": "surfaceMuted",
|
|
34
|
-
"userMessageBg": "surfaceUser",
|
|
35
|
-
"userMessageText": "",
|
|
36
|
-
"customMessageBg": "surfaceCustom",
|
|
37
|
-
"customMessageText": "",
|
|
38
|
-
"customMessageLabel": "accentBlue",
|
|
39
|
-
"toolPendingBg": "",
|
|
40
|
-
"toolSuccessBg": "",
|
|
41
|
-
"toolErrorBg": "",
|
|
42
|
-
"toolTitle": "",
|
|
43
|
-
"toolOutput": "gray",
|
|
44
|
-
"mdHeading": "warningAmber",
|
|
45
|
-
"mdLink": "accentBlue",
|
|
46
|
-
"mdLinkUrl": "dimGray",
|
|
47
|
-
"mdCode": "accentCyan",
|
|
48
|
-
"mdCodeBlock": "gray",
|
|
49
|
-
"mdCodeBlockBorder": "borderGray",
|
|
50
|
-
"mdQuote": "gray",
|
|
51
|
-
"mdQuoteBorder": "borderGray",
|
|
52
|
-
"mdHr": "borderGray",
|
|
53
|
-
"mdListBullet": "accentTeal",
|
|
54
|
-
"toolDiffAdded": "successGreen",
|
|
55
|
-
"toolDiffRemoved": "errorRed",
|
|
56
|
-
"toolDiffContext": "gray",
|
|
57
|
-
"syntaxComment": "#6b7280",
|
|
58
|
-
"syntaxKeyword": "#7aa2f7",
|
|
59
|
-
"syntaxFunction": "#c0caf5",
|
|
60
|
-
"syntaxVariable": "#a9b1d6",
|
|
61
|
-
"syntaxString": "#9ece6a",
|
|
62
|
-
"syntaxNumber": "#ff9e64",
|
|
63
|
-
"syntaxType": "#73daca",
|
|
64
|
-
"syntaxOperator": "#c0caf5",
|
|
65
|
-
"syntaxPunctuation": "#8f9bb3",
|
|
66
|
-
"thinkingOff": "borderGray",
|
|
67
|
-
"thinkingMinimal": "#707070",
|
|
68
|
-
"thinkingLow": "#7a7a7a",
|
|
69
|
-
"thinkingMedium": "#858585",
|
|
70
|
-
"thinkingHigh": "#8f8f8f",
|
|
71
|
-
"thinkingXhigh": "#999999",
|
|
72
|
-
"bashMode": "accentTeal"
|
|
73
|
-
},
|
|
74
|
-
"export": {
|
|
75
|
-
"pageBg": "#12161d",
|
|
76
|
-
"cardBg": "#171b22",
|
|
77
|
-
"infoBg": "#28230f"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
-
"name": "pidex-dark",
|
|
4
|
-
"vars": {
|
|
5
|
-
"accentBlue": "#b8d3ff",
|
|
6
|
-
"accentCyan": "#b8d3ff",
|
|
7
|
-
"accentTeal": "#c7d2e0",
|
|
8
|
-
"successGreen": "#9fd59f",
|
|
9
|
-
"errorRed": "#ff9a9a",
|
|
10
|
-
"warningAmber": "#d2b48c",
|
|
11
|
-
"surface": "#000000",
|
|
12
|
-
"surfaceAlt": "#111111",
|
|
13
|
-
"surfaceMuted": "#1a1a1a",
|
|
14
|
-
"surfaceUser": "#1f1f1f",
|
|
15
|
-
"surfaceCustom": "#161616",
|
|
16
|
-
"gray": "#a7a7a7",
|
|
17
|
-
"dimGray": "#8a8a8a",
|
|
18
|
-
"borderGray": "#666666",
|
|
19
|
-
"borderBright": "#9a9a9a"
|
|
20
|
-
},
|
|
21
|
-
"colors": {
|
|
22
|
-
"accent": "accentBlue",
|
|
23
|
-
"border": "borderGray",
|
|
24
|
-
"borderAccent": "borderBright",
|
|
25
|
-
"borderMuted": "borderGray",
|
|
26
|
-
"success": "successGreen",
|
|
27
|
-
"error": "errorRed",
|
|
28
|
-
"warning": "warningAmber",
|
|
29
|
-
"muted": "gray",
|
|
30
|
-
"dim": "dimGray",
|
|
31
|
-
"text": "",
|
|
32
|
-
"thinkingText": "gray",
|
|
33
|
-
|
|
34
|
-
"selectedBg": "surfaceMuted",
|
|
35
|
-
"userMessageBg": "surfaceUser",
|
|
36
|
-
"userMessageText": "",
|
|
37
|
-
"customMessageBg": "surfaceCustom",
|
|
38
|
-
"customMessageText": "",
|
|
39
|
-
"customMessageLabel": "accentBlue",
|
|
40
|
-
"toolPendingBg": "surfaceMuted",
|
|
41
|
-
"toolSuccessBg": "surfaceMuted",
|
|
42
|
-
"toolErrorBg": "surfaceMuted",
|
|
43
|
-
"toolTitle": "",
|
|
44
|
-
"toolOutput": "gray",
|
|
45
|
-
|
|
46
|
-
"mdHeading": "warningAmber",
|
|
47
|
-
"mdLink": "accentBlue",
|
|
48
|
-
"mdLinkUrl": "dimGray",
|
|
49
|
-
"mdCode": "accentCyan",
|
|
50
|
-
"mdCodeBlock": "gray",
|
|
51
|
-
"mdCodeBlockBorder": "borderGray",
|
|
52
|
-
"mdQuote": "gray",
|
|
53
|
-
"mdQuoteBorder": "borderGray",
|
|
54
|
-
"mdHr": "borderGray",
|
|
55
|
-
"mdListBullet": "accentTeal",
|
|
56
|
-
|
|
57
|
-
"toolDiffAdded": "successGreen",
|
|
58
|
-
"toolDiffRemoved": "errorRed",
|
|
59
|
-
"toolDiffContext": "gray",
|
|
60
|
-
|
|
61
|
-
"syntaxComment": "#6b7280",
|
|
62
|
-
"syntaxKeyword": "#7aa2f7",
|
|
63
|
-
"syntaxFunction": "#c0caf5",
|
|
64
|
-
"syntaxVariable": "#a9b1d6",
|
|
65
|
-
"syntaxString": "#9ece6a",
|
|
66
|
-
"syntaxNumber": "#ff9e64",
|
|
67
|
-
"syntaxType": "#73daca",
|
|
68
|
-
"syntaxOperator": "#c0caf5",
|
|
69
|
-
"syntaxPunctuation": "#8f9bb3",
|
|
70
|
-
|
|
71
|
-
"thinkingOff": "borderGray",
|
|
72
|
-
"thinkingMinimal": "#707070",
|
|
73
|
-
"thinkingLow": "#7a7a7a",
|
|
74
|
-
"thinkingMedium": "#858585",
|
|
75
|
-
"thinkingHigh": "#8f8f8f",
|
|
76
|
-
"thinkingXhigh": "#999999",
|
|
77
|
-
|
|
78
|
-
"bashMode": "accentTeal"
|
|
79
|
-
},
|
|
80
|
-
"export": {
|
|
81
|
-
"pageBg": "#12161d",
|
|
82
|
-
"cardBg": "#171b22",
|
|
83
|
-
"infoBg": "#28230f"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
-
"name": "pidex-light-flattools",
|
|
4
|
-
"vars": {
|
|
5
|
-
"accentBlue": "#44546a",
|
|
6
|
-
"accentCyan": "#5f6b7a",
|
|
7
|
-
"accentTeal": "#5f6b7a",
|
|
8
|
-
"successGreen": "#587558",
|
|
9
|
-
"errorRed": "#a85f5f",
|
|
10
|
-
"warningAmber": "#8e7348",
|
|
11
|
-
"surface": "#ffffff",
|
|
12
|
-
"surfaceAlt": "#f1f1f1",
|
|
13
|
-
"surfaceMuted": "#e6e6e6",
|
|
14
|
-
"surfaceUser": "#f0f0f0",
|
|
15
|
-
"surfaceCustom": "#f5f5f5",
|
|
16
|
-
"gray": "#5f5f5f",
|
|
17
|
-
"dimGray": "#7a7a7a",
|
|
18
|
-
"borderGray": "#b9b9b9",
|
|
19
|
-
"borderBright": "#9f9f9f"
|
|
20
|
-
},
|
|
21
|
-
"colors": {
|
|
22
|
-
"accent": "accentBlue",
|
|
23
|
-
"border": "borderGray",
|
|
24
|
-
"borderAccent": "borderBright",
|
|
25
|
-
"borderMuted": "borderGray",
|
|
26
|
-
"success": "successGreen",
|
|
27
|
-
"error": "errorRed",
|
|
28
|
-
"warning": "warningAmber",
|
|
29
|
-
"muted": "gray",
|
|
30
|
-
"dim": "dimGray",
|
|
31
|
-
"text": "",
|
|
32
|
-
"thinkingText": "gray",
|
|
33
|
-
"selectedBg": "surfaceMuted",
|
|
34
|
-
"userMessageBg": "surfaceUser",
|
|
35
|
-
"userMessageText": "",
|
|
36
|
-
"customMessageBg": "surfaceCustom",
|
|
37
|
-
"customMessageText": "",
|
|
38
|
-
"customMessageLabel": "accentBlue",
|
|
39
|
-
"toolPendingBg": "",
|
|
40
|
-
"toolSuccessBg": "",
|
|
41
|
-
"toolErrorBg": "",
|
|
42
|
-
"toolTitle": "",
|
|
43
|
-
"toolOutput": "gray",
|
|
44
|
-
"mdHeading": "warningAmber",
|
|
45
|
-
"mdLink": "accentBlue",
|
|
46
|
-
"mdLinkUrl": "dimGray",
|
|
47
|
-
"mdCode": "accentCyan",
|
|
48
|
-
"mdCodeBlock": "gray",
|
|
49
|
-
"mdCodeBlockBorder": "borderGray",
|
|
50
|
-
"mdQuote": "gray",
|
|
51
|
-
"mdQuoteBorder": "borderGray",
|
|
52
|
-
"mdHr": "borderGray",
|
|
53
|
-
"mdListBullet": "accentTeal",
|
|
54
|
-
"toolDiffAdded": "successGreen",
|
|
55
|
-
"toolDiffRemoved": "errorRed",
|
|
56
|
-
"toolDiffContext": "gray",
|
|
57
|
-
"syntaxComment": "#6b7280",
|
|
58
|
-
"syntaxKeyword": "#3569c8",
|
|
59
|
-
"syntaxFunction": "#3b4351",
|
|
60
|
-
"syntaxVariable": "#364152",
|
|
61
|
-
"syntaxString": "#3f7d3d",
|
|
62
|
-
"syntaxNumber": "#b06500",
|
|
63
|
-
"syntaxType": "#2c7a7b",
|
|
64
|
-
"syntaxOperator": "#3b4351",
|
|
65
|
-
"syntaxPunctuation": "#55606f",
|
|
66
|
-
"thinkingOff": "borderGray",
|
|
67
|
-
"thinkingMinimal": "#9d9d9d",
|
|
68
|
-
"thinkingLow": "#979797",
|
|
69
|
-
"thinkingMedium": "#919191",
|
|
70
|
-
"thinkingHigh": "#8b8b8b",
|
|
71
|
-
"thinkingXhigh": "#858585",
|
|
72
|
-
"bashMode": "accentTeal"
|
|
73
|
-
},
|
|
74
|
-
"export": {
|
|
75
|
-
"pageBg": "#f5f7fa",
|
|
76
|
-
"cardBg": "#ffffff",
|
|
77
|
-
"infoBg": "#fff5e6"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
-
"name": "pidex-light",
|
|
4
|
-
"vars": {
|
|
5
|
-
"accentBlue": "#44546a",
|
|
6
|
-
"accentCyan": "#5f6b7a",
|
|
7
|
-
"accentTeal": "#5f6b7a",
|
|
8
|
-
"successGreen": "#587558",
|
|
9
|
-
"errorRed": "#a85f5f",
|
|
10
|
-
"warningAmber": "#8e7348",
|
|
11
|
-
"surface": "#ffffff",
|
|
12
|
-
"surfaceAlt": "#f1f1f1",
|
|
13
|
-
"surfaceMuted": "#e6e6e6",
|
|
14
|
-
"surfaceUser": "#f0f0f0",
|
|
15
|
-
"surfaceCustom": "#f5f5f5",
|
|
16
|
-
"gray": "#5f5f5f",
|
|
17
|
-
"dimGray": "#7a7a7a",
|
|
18
|
-
"borderGray": "#b9b9b9",
|
|
19
|
-
"borderBright": "#9f9f9f"
|
|
20
|
-
},
|
|
21
|
-
"colors": {
|
|
22
|
-
"accent": "accentBlue",
|
|
23
|
-
"border": "borderGray",
|
|
24
|
-
"borderAccent": "borderBright",
|
|
25
|
-
"borderMuted": "borderGray",
|
|
26
|
-
"success": "successGreen",
|
|
27
|
-
"error": "errorRed",
|
|
28
|
-
"warning": "warningAmber",
|
|
29
|
-
"muted": "gray",
|
|
30
|
-
"dim": "dimGray",
|
|
31
|
-
"text": "",
|
|
32
|
-
"thinkingText": "gray",
|
|
33
|
-
|
|
34
|
-
"selectedBg": "surfaceMuted",
|
|
35
|
-
"userMessageBg": "surfaceUser",
|
|
36
|
-
"userMessageText": "",
|
|
37
|
-
"customMessageBg": "surfaceCustom",
|
|
38
|
-
"customMessageText": "",
|
|
39
|
-
"customMessageLabel": "accentBlue",
|
|
40
|
-
"toolPendingBg": "surfaceAlt",
|
|
41
|
-
"toolSuccessBg": "surfaceAlt",
|
|
42
|
-
"toolErrorBg": "surfaceAlt",
|
|
43
|
-
"toolTitle": "",
|
|
44
|
-
"toolOutput": "gray",
|
|
45
|
-
|
|
46
|
-
"mdHeading": "warningAmber",
|
|
47
|
-
"mdLink": "accentBlue",
|
|
48
|
-
"mdLinkUrl": "dimGray",
|
|
49
|
-
"mdCode": "accentCyan",
|
|
50
|
-
"mdCodeBlock": "gray",
|
|
51
|
-
"mdCodeBlockBorder": "borderGray",
|
|
52
|
-
"mdQuote": "gray",
|
|
53
|
-
"mdQuoteBorder": "borderGray",
|
|
54
|
-
"mdHr": "borderGray",
|
|
55
|
-
"mdListBullet": "accentTeal",
|
|
56
|
-
|
|
57
|
-
"toolDiffAdded": "successGreen",
|
|
58
|
-
"toolDiffRemoved": "errorRed",
|
|
59
|
-
"toolDiffContext": "gray",
|
|
60
|
-
|
|
61
|
-
"syntaxComment": "#6b7280",
|
|
62
|
-
"syntaxKeyword": "#3569c8",
|
|
63
|
-
"syntaxFunction": "#3b4351",
|
|
64
|
-
"syntaxVariable": "#364152",
|
|
65
|
-
"syntaxString": "#3f7d3d",
|
|
66
|
-
"syntaxNumber": "#b06500",
|
|
67
|
-
"syntaxType": "#2c7a7b",
|
|
68
|
-
"syntaxOperator": "#3b4351",
|
|
69
|
-
"syntaxPunctuation": "#55606f",
|
|
70
|
-
|
|
71
|
-
"thinkingOff": "borderGray",
|
|
72
|
-
"thinkingMinimal": "#9d9d9d",
|
|
73
|
-
"thinkingLow": "#979797",
|
|
74
|
-
"thinkingMedium": "#919191",
|
|
75
|
-
"thinkingHigh": "#8b8b8b",
|
|
76
|
-
"thinkingXhigh": "#858585",
|
|
77
|
-
|
|
78
|
-
"bashMode": "accentTeal"
|
|
79
|
-
},
|
|
80
|
-
"export": {
|
|
81
|
-
"pageBg": "#f5f7fa",
|
|
82
|
-
"cardBg": "#ffffff",
|
|
83
|
-
"infoBg": "#fff5e6"
|
|
84
|
-
}
|
|
85
|
-
}
|