pi-thread-engine 0.2.1 → 0.2.3
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/index.ts +2 -11
- package/package.json +8 -6
- package/src/core/registry.ts +3 -1
package/extensions/index.ts
CHANGED
|
@@ -34,7 +34,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
34
34
|
pi.on("session_start", async (_event, ctx) => {
|
|
35
35
|
for (const entry of ctx.sessionManager.getEntries()) {
|
|
36
36
|
if (entry.type === "custom" && entry.customType === "pi-threads-state") {
|
|
37
|
-
const data = entry.data as
|
|
37
|
+
const data = entry.data as { threads?: Thread[]; stories?: Story[]; timestamp?: number };
|
|
38
38
|
if (data?.threads) {
|
|
39
39
|
registry.restore(data.threads, data.stories ?? []);
|
|
40
40
|
}
|
|
@@ -99,15 +99,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function stateColor(state: string): string {
|
|
103
|
-
switch (state) {
|
|
104
|
-
case "running": return "warning";
|
|
105
|
-
case "completed": return "success";
|
|
106
|
-
case "failed": case "killed": return "error";
|
|
107
|
-
default: return "muted";
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
102
|
function typeIcon(type: string): string {
|
|
112
103
|
switch (type) {
|
|
113
104
|
case "parallel": return "⫘";
|
|
@@ -511,7 +502,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
511
502
|
? `Fusion: ${prompts[0]?.slice(0, 40)}`
|
|
512
503
|
: `${type}: ${taskPrompts.length} tasks`;
|
|
513
504
|
|
|
514
|
-
const thread = registry.create(type as
|
|
505
|
+
const thread = registry.create(type as ThreadType, label, taskPrompts, {
|
|
515
506
|
models,
|
|
516
507
|
cwd: ctx.cwd,
|
|
517
508
|
backend,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-thread-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Thread engineering for pi — all 7 thread types, stories, fusion, zero-touch, TUI dashboard",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"orchestration"
|
|
20
20
|
],
|
|
21
21
|
"pi": {
|
|
22
|
-
"extensions": [
|
|
22
|
+
"extensions": [
|
|
23
|
+
"./extensions/index.ts"
|
|
24
|
+
]
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
25
27
|
"extensions/",
|
|
@@ -28,9 +30,9 @@
|
|
|
28
30
|
"PLAN.md"
|
|
29
31
|
],
|
|
30
32
|
"peerDependencies": {
|
|
31
|
-
"@mariozechner/pi-
|
|
32
|
-
"@mariozechner/pi-
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
33
|
+
"@mariozechner/pi-ai": "^0.56.0",
|
|
34
|
+
"@mariozechner/pi-coding-agent": "^0.56.0",
|
|
35
|
+
"@mariozechner/pi-tui": "^0.56.0",
|
|
36
|
+
"@sinclair/typebox": "^0.34.48"
|
|
35
37
|
}
|
|
36
38
|
}
|