@zhushanwen/pi-goal 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +13 -2
  2. package/src/index.ts +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-goal",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Codex-style /goal command for Pi — persistent goal-driven autonomous loop with evidence-based completion, token/time budgets, blocked detection, and steering templates.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -22,7 +22,18 @@
22
22
  "index.ts"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@mariozechner/pi-coding-agent": "*"
25
+ "@mariozechner/pi-coding-agent": "*",
26
+ "@earendil-works/pi-tui": "*",
27
+ "@earendil-works/pi-ai": "*",
28
+ "@sinclair/typebox": "*"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "@earendil-works/pi-tui": {
32
+ "optional": true
33
+ },
34
+ "@earendil-works/pi-ai": {
35
+ "optional": true
36
+ }
26
37
  },
27
38
  "scripts": {
28
39
  "typecheck": "npx tsc --noEmit"
package/src/index.ts CHANGED
@@ -751,7 +751,10 @@ export default function goalExtension(pi: ExtensionAPI) {
751
751
  } catch (err) {
752
752
  const msg = err instanceof Error ? err.message : String(err);
753
753
  const inputSummary = JSON.stringify(params, null, 2);
754
- throw new Error(`${msg}\n\nInput: ${inputSummary}`);
754
+ return {
755
+ content: [{ type: "text", text: `${msg}\n\nInput: ${inputSummary}` }],
756
+ isError: true,
757
+ };
755
758
  }
756
759
  },
757
760