@xynogen/pix-core 0.4.4 → 0.4.6
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/README.md +3 -0
- package/package.json +3 -2
- package/src/extension.ts +2 -0
- package/src/once.test.ts +38 -0
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ Pi activates extensions per installed package via each package's `pi.extensions`
|
|
|
44
44
|
|---|---|
|
|
45
45
|
| `pix-optimizer` | Caveman mode + RTK tool rewriting + jq/TOON JSON compression (`/opt`) |
|
|
46
46
|
| `pix-gate` | Permission gate for dangerous bash commands |
|
|
47
|
+
| `pix-subagent` | `agent` / `agent_result` / `agent_steer` — planner-driven sub-agents with live widget |
|
|
47
48
|
|
|
48
49
|
## Install
|
|
49
50
|
|
|
@@ -55,6 +56,8 @@ pi install npm:@xynogen/pix-core
|
|
|
55
56
|
|
|
56
57
|
## Full distro
|
|
57
58
|
|
|
59
|
+
Source: [github.com/xynogen/pix-mono](https://github.com/xynogen/pix-mono)
|
|
60
|
+
|
|
58
61
|
To install the complete pix suite (all packages + Pi itself):
|
|
59
62
|
|
|
60
63
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Pi extension bundle — installs and activates all core pix-* extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/extension.ts",
|
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
"@xynogen/pix-todo": "*",
|
|
58
58
|
"@xynogen/pix-ask": "*",
|
|
59
59
|
"@xynogen/pix-optimizer": "*",
|
|
60
|
-
"@xynogen/pix-gate": "*"
|
|
60
|
+
"@xynogen/pix-gate": "*",
|
|
61
|
+
"@xynogen/pix-subagent": "*"
|
|
61
62
|
},
|
|
62
63
|
"peerDependencies": {
|
|
63
64
|
"@earendil-works/pi-coding-agent": "*",
|
package/src/extension.ts
CHANGED
|
@@ -28,6 +28,7 @@ import registerOptimizer from "@xynogen/pix-optimizer/src/index.ts";
|
|
|
28
28
|
import registerPrompts from "@xynogen/pix-prompts/src/extension.ts";
|
|
29
29
|
import registerRead from "@xynogen/pix-read/src/extension.ts";
|
|
30
30
|
import registerSkills from "@xynogen/pix-skills/src/index.ts";
|
|
31
|
+
import registerSubagent from "@xynogen/pix-subagent/src/extension.ts";
|
|
31
32
|
import registerTodo from "@xynogen/pix-todo/src/index.ts";
|
|
32
33
|
import registerUpdate from "@xynogen/pix-update/src/extension.ts";
|
|
33
34
|
import registerWelcome from "@xynogen/pix-welcome/src/extension.ts";
|
|
@@ -59,6 +60,7 @@ const MEMBERS: Factory[] = [
|
|
|
59
60
|
registerAsk,
|
|
60
61
|
registerOptimizer,
|
|
61
62
|
registerGate,
|
|
63
|
+
registerSubagent,
|
|
62
64
|
];
|
|
63
65
|
|
|
64
66
|
export default function (pi: ExtensionAPI): void {
|
package/src/once.test.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { afterEach, describe, expect, it } from "bun:test";
|
|
2
|
+
import registerSubagent from "@xynogen/pix-subagent/src/extension.ts";
|
|
2
3
|
import registerTodo from "@xynogen/pix-todo/src/todo.ts";
|
|
3
4
|
|
|
4
5
|
// Mirror of the per-instance guard. pix-core does not own once.ts (each member
|
|
@@ -141,3 +142,40 @@ describe("member factory dedupe (pix-todo)", () => {
|
|
|
141
142
|
expect(tools2).toEqual(["todo"]);
|
|
142
143
|
});
|
|
143
144
|
});
|
|
145
|
+
|
|
146
|
+
describe("member factory dedupe (pix-subagent)", () => {
|
|
147
|
+
function makeHost() {
|
|
148
|
+
const toolNames: string[] = [];
|
|
149
|
+
const pi = {
|
|
150
|
+
registerTool(def: { name: string }) {
|
|
151
|
+
toolNames.push(def.name);
|
|
152
|
+
},
|
|
153
|
+
appendEntry() {},
|
|
154
|
+
on() {},
|
|
155
|
+
getAvailableAgentTypes() {
|
|
156
|
+
return [];
|
|
157
|
+
},
|
|
158
|
+
getAvailableModels() {
|
|
159
|
+
return [];
|
|
160
|
+
},
|
|
161
|
+
registerMessageRenderer() {},
|
|
162
|
+
} as never;
|
|
163
|
+
return { pi, toolNames };
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
it("registers agent tools once across core + standalone activation (same pi)", () => {
|
|
167
|
+
const { pi, toolNames } = makeHost();
|
|
168
|
+
registerSubagent(pi);
|
|
169
|
+
registerSubagent(pi);
|
|
170
|
+
expect(toolNames).toEqual(["agent", "agent_result", "agent_steer"]);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it("registers agent tools again for a fresh pi instance (/new rehydration)", () => {
|
|
174
|
+
const { pi: pi1, toolNames: tools1 } = makeHost();
|
|
175
|
+
const { pi: pi2, toolNames: tools2 } = makeHost();
|
|
176
|
+
registerSubagent(pi1);
|
|
177
|
+
registerSubagent(pi2);
|
|
178
|
+
expect(tools1).toEqual(["agent", "agent_result", "agent_steer"]);
|
|
179
|
+
expect(tools2).toEqual(["agent", "agent_result", "agent_steer"]);
|
|
180
|
+
});
|
|
181
|
+
});
|