@zhushanwen/pi-goal 0.5.1 → 0.5.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": "@zhushanwen/pi-goal",
3
- "version": "0.5.1",
3
+ "version": "0.5.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",
@@ -24,7 +24,7 @@
24
24
  "peerDependencies": {
25
25
  "@earendil-works/pi-ai": "*",
26
26
  "@earendil-works/pi-tui": "*",
27
- "@mariozechner/pi-coding-agent": "*",
27
+ "@earendil-works/pi-coding-agent": "*",
28
28
  "@sinclair/typebox": "*"
29
29
  },
30
30
  "dependencies": {
@@ -9,7 +9,7 @@
9
9
  * 用 fake pi + fake ctx(不 import Pi SDK 真实实现)。
10
10
  * handleGoalCommand(pi, session, args, ctx) → Promise<void>。
11
11
  */
12
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
12
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
13
13
  import { describe, expect, it } from "vitest";
14
14
 
15
15
  import { handleGoalCommand } from "../adapters/command-adapter";
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * 用 fake pi + fake ctx(不 import Pi SDK)。handler 签名 (pi, session, ctx) → void/result。
11
11
  */
12
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
12
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
13
13
  import { describe, expect, it, vi } from "vitest";
14
14
 
15
15
  import { handleAgentEnd } from "../adapters/event-handlers/agent-end";
@@ -15,7 +15,7 @@
15
15
  * 不 mock handleCreate:走真实 createGoal 让 session.state 含完整字段(slug/objective/budget),
16
16
  * 避免 hand-rolled state 与生产路径不一致。pi/ctx 用最小 fake(对齐 index.test.ts makeFactoryFixture)。
17
17
  */
18
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
18
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
19
19
  import { describe, expect, it } from "vitest";
20
20
 
21
21
  import { registerGoalControlTool, type GoalControlDetails } from "../adapters/goal-control-adapter";
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * 用最小 fake pi + fake ctx 实例化 goalExtension 工厂,再调 pi.__goalInit。
8
8
  */
9
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
9
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
10
10
  import { describe, expect, it } from "vitest";
11
11
 
12
12
  import goalExtension from "../index";
@@ -14,7 +14,7 @@
14
14
  * adapters 层可 import Pi 类型(桥接 Pi 和 service)。
15
15
  */
16
16
 
17
- import type { CustomEntry, ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
17
+ import type { CustomEntry, ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
18
18
 
19
19
  import { parseGoalArgs } from "../commands";
20
20
  import {
@@ -18,7 +18,7 @@
18
18
  * 检查之后——终态 goal 仍走终态 notify(不被 ESC 影响),非 active 状态直接返回。
19
19
  */
20
20
 
21
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
21
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
22
22
 
23
23
  import { checkBudgetOnTurnEnd } from "../../engine/budget";
24
24
  import { isActiveStatus, isTerminalStatus } from "../../engine/goal";
@@ -15,7 +15,7 @@
15
15
  * contextInjectionPrompt 恒定建议 plan mode(AI 自行决定是否用)。
16
16
  */
17
17
 
18
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
18
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
19
19
 
20
20
  import { AUTO_CLEAR_TURNS, CONTEXT_USAGE_RATIO_LIMIT } from "../../constants";
21
21
  import { isActiveStatus, isTerminalStatus } from "../../engine/goal";
@@ -7,7 +7,7 @@
7
7
  * 不 persist / updateWidget。
8
8
  */
9
9
 
10
- import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
10
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
11
11
 
12
12
  import { applyEvent } from "../../service";
13
13
  import type { GoalSession } from "../../session";
@@ -4,7 +4,7 @@
4
4
  * 调 reconstructGoalState 重建持久化状态 + updateWidget。
5
5
  */
6
6
 
7
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
7
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
8
8
 
9
9
  import { updateWidget } from "../../projection/widget";
10
10
  import type { GoalSession } from "../../session";
@@ -10,7 +10,7 @@
10
10
  * 不 persist(与旧 index.ts 行为对齐——turn_end 只内存变更 + widget)。
11
11
  */
12
12
 
13
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
13
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
14
14
 
15
15
  import { updateWidget } from "../../projection/widget";
16
16
  import { applyEvent } from "../../service";
@@ -25,8 +25,8 @@
25
25
  */
26
26
 
27
27
  import { StringEnum } from "@earendil-works/pi-ai";
28
- import type { ExtensionAPI, ExtensionContext, Theme } from "@mariozechner/pi-coding-agent";
29
- import { Text } from "@mariozechner/pi-tui";
28
+ import type { ExtensionAPI, ExtensionContext, Theme } from "@earendil-works/pi-coding-agent";
29
+ import { Text } from "@earendil-works/pi-tui";
30
30
  import { type GuiComponent, guiComponent, type GuiRenderResult,guiResult } from "@xyz-agent/extension-protocol";
31
31
  import { type Static, Type } from "typebox";
32
32
 
@@ -9,7 +9,7 @@
9
9
  * - session: ctx.sessionManager.getEntries + ctx.getContextUsage + ctx.signal
10
10
  */
11
11
 
12
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
12
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
13
13
 
14
14
  import { ENTRY_TYPE, HISTORY_ENTRY_TYPE } from "../persistence";
15
15
  import type { MessagingPort, PersistencePort, SessionPort, UiPort } from "../ports";
package/src/index.ts CHANGED
@@ -17,8 +17,8 @@
17
17
  * FR-6.7:移除 pendingPause(ESC 改用 ctx.signal.aborted 守卫,在 event-adapter)。
18
18
  */
19
19
 
20
- import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext, Theme } from "@mariozechner/pi-coding-agent";
21
- import { Text } from "@mariozechner/pi-tui";
20
+ import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext, Theme } from "@earendil-works/pi-coding-agent";
21
+ import { Text } from "@earendil-works/pi-tui";
22
22
 
23
23
  import { handleGoalCommand } from "./adapters/command-adapter";
24
24
  import {