pi-thread-engine 0.2.1 → 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.
@@ -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 any;
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
  }
@@ -511,7 +511,7 @@ export default function (pi: ExtensionAPI) {
511
511
  ? `Fusion: ${prompts[0]?.slice(0, 40)}`
512
512
  : `${type}: ${taskPrompts.length} tasks`;
513
513
 
514
- const thread = registry.create(type as any, label, taskPrompts, {
514
+ const thread = registry.create(type as ThreadType, label, taskPrompts, {
515
515
  models,
516
516
  cwd: ctx.cwd,
517
517
  backend,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-thread-engine",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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": ["./extensions/index.ts"]
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-coding-agent": "*",
32
- "@mariozechner/pi-tui": "*",
33
- "@sinclair/typebox": "*",
34
- "@mariozechner/pi-ai": "*"
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
  }
@@ -47,7 +47,9 @@ export class ThreadRegistry {
47
47
  for (const h of this.handlers) {
48
48
  try {
49
49
  h(event);
50
- } catch {}
50
+ } catch (e) {
51
+ console.error("[pi-threads] event handler error:", e);
52
+ }
51
53
  }
52
54
  }
53
55