@xynogen/pix-core 0.2.0 → 0.2.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Pi extension — core UI/UX bundle (welcome banner, footer, model picker, self-update)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@xynogen/pix-data": "
|
|
46
|
-
"@xynogen/pix-skills": "
|
|
45
|
+
"@xynogen/pix-data": "*",
|
|
46
|
+
"@xynogen/pix-skills": "*",
|
|
47
47
|
"typebox": "^1.1.38"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
19
|
-
import registerSkillLoader from "@xynogen/pix-skills";
|
|
20
19
|
import registerAgentSop from "./commands/agent-sop/agent-sop.ts";
|
|
21
20
|
import registerClear from "./commands/clear/clear.ts";
|
|
22
21
|
import registerDiff from "./commands/diff/diff.ts";
|
|
@@ -32,7 +31,6 @@ import registerWelcome from "./ui/welcome.ts";
|
|
|
32
31
|
|
|
33
32
|
export default function (pi: ExtensionAPI): void {
|
|
34
33
|
registerAgentSop(pi);
|
|
35
|
-
registerSkillLoader(pi);
|
|
36
34
|
registerWelcome(pi);
|
|
37
35
|
registerFooter(pi);
|
|
38
36
|
registerDiagnostics(pi);
|
|
@@ -100,7 +100,7 @@ describe("partitionTools", () => {
|
|
|
100
100
|
test("without an active set, every tool counts as active (gated 0)", () => {
|
|
101
101
|
const { active, gated } = partitionTools([
|
|
102
102
|
tool("read", "builtin"),
|
|
103
|
-
tool("
|
|
103
|
+
tool("find", "builtin"),
|
|
104
104
|
]);
|
|
105
105
|
expect(active).toBe(2);
|
|
106
106
|
expect(gated).toBe(0);
|
|
@@ -111,8 +111,8 @@ describe("partitionTools", () => {
|
|
|
111
111
|
[
|
|
112
112
|
tool("read", "builtin"),
|
|
113
113
|
tool("grep", "builtin"),
|
|
114
|
-
tool("
|
|
115
|
-
tool("
|
|
114
|
+
tool("find", "builtin"),
|
|
115
|
+
tool("ls", "builtin"),
|
|
116
116
|
],
|
|
117
117
|
["read", "grep"],
|
|
118
118
|
);
|
|
@@ -146,8 +146,8 @@ describe("buildOrientation", () => {
|
|
|
146
146
|
[
|
|
147
147
|
tool("read", "builtin"),
|
|
148
148
|
tool("grep", "builtin"),
|
|
149
|
-
tool("
|
|
150
|
-
tool("
|
|
149
|
+
tool("find", "builtin"),
|
|
150
|
+
tool("ls", "builtin"),
|
|
151
151
|
],
|
|
152
152
|
[],
|
|
153
153
|
["read", "grep"], // active set: 2 gated out
|
|
@@ -158,7 +158,7 @@ describe("buildOrientation", () => {
|
|
|
158
158
|
|
|
159
159
|
test("singular phrasing when exactly one tool is gated", () => {
|
|
160
160
|
const out = buildOrientation(
|
|
161
|
-
[tool("read", "builtin"), tool("
|
|
161
|
+
[tool("read", "builtin"), tool("find", "builtin")],
|
|
162
162
|
[],
|
|
163
163
|
["read"],
|
|
164
164
|
);
|
|
@@ -177,7 +177,7 @@ describe("buildOrientation", () => {
|
|
|
177
177
|
|
|
178
178
|
test("no gate line when active set is unknown", () => {
|
|
179
179
|
const out = buildOrientation(
|
|
180
|
-
[tool("read", "builtin"), tool("
|
|
180
|
+
[tool("read", "builtin"), tool("find", "builtin")],
|
|
181
181
|
[],
|
|
182
182
|
);
|
|
183
183
|
expect(out).not.toContain("gated out of the prompt");
|
|
@@ -183,7 +183,9 @@ afterAll(() => {
|
|
|
183
183
|
delete process.env.PI_CODING_AGENT_DIR;
|
|
184
184
|
try {
|
|
185
185
|
rmSync(tmpAgentDir, { recursive: true });
|
|
186
|
-
} catch {
|
|
186
|
+
} catch {
|
|
187
|
+
// temp dir may already be gone — safe to ignore
|
|
188
|
+
}
|
|
187
189
|
});
|
|
188
190
|
|
|
189
191
|
function makeHost(toolNames: string[]) {
|
|
@@ -245,7 +247,7 @@ function makeCtx() {
|
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
describe("/toolbox command", () => {
|
|
248
|
-
const ALL = ["read", "write", "bash", "grep", "
|
|
250
|
+
const ALL = ["read", "write", "bash", "grep", "find"];
|
|
249
251
|
|
|
250
252
|
async function boot() {
|
|
251
253
|
const host = makeHost(ALL);
|
|
@@ -267,7 +269,7 @@ describe("/toolbox command", () => {
|
|
|
267
269
|
expect(notes.length).toBe(1);
|
|
268
270
|
// only non-core tools shown, all start active
|
|
269
271
|
expect(notes[0].text).toContain("✓ active grep");
|
|
270
|
-
expect(notes[0].text).toContain("✓ active
|
|
272
|
+
expect(notes[0].text).toContain("✓ active find");
|
|
271
273
|
// core tools excluded from toolbox
|
|
272
274
|
expect(notes[0].text).not.toContain(" read");
|
|
273
275
|
expect(notes[0].text).not.toContain(" bash");
|
|
@@ -278,15 +280,15 @@ describe("/toolbox command", () => {
|
|
|
278
280
|
const { ctx, notes } = makeCtx();
|
|
279
281
|
await host.command("toolbox")?.handler("list", ctx);
|
|
280
282
|
expect(notes[0].text).toContain("grep");
|
|
281
|
-
expect(notes[0].text).toContain("
|
|
283
|
+
expect(notes[0].text).toContain("find");
|
|
282
284
|
expect(notes[0].text).not.toContain(" bash");
|
|
283
285
|
});
|
|
284
286
|
|
|
285
287
|
test("/toolbox list <query> filters", async () => {
|
|
286
288
|
const host = await boot();
|
|
287
289
|
const { ctx, notes } = makeCtx();
|
|
288
|
-
await host.command("toolbox")?.handler("list
|
|
289
|
-
expect(notes[0].text).toContain("
|
|
290
|
+
await host.command("toolbox")?.handler("list fin", ctx);
|
|
291
|
+
expect(notes[0].text).toContain("find");
|
|
290
292
|
expect(notes[0].text).not.toContain("✓ active read");
|
|
291
293
|
});
|
|
292
294
|
|