@zhushanwen/pi-subagent-workflow 8.14.2 → 8.14.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/package.json +5 -5
- package/src/host/__tests__/inflight-reporter.test.ts +1 -1
- package/src/host/__tests__/pi-host.test.ts +2 -2
- package/src/host/inflight-reporter.ts +1 -1
- package/src/host/pi-host.ts +3 -3
- package/src/interface/format.ts +1 -1
- package/src/interface/gui-mappers.ts +3 -3
- package/src/interface/helpers.ts +1 -1
- package/src/interface/subagent-actions.ts +1 -1
- package/src/interface/tool-workflow-script.ts +1 -1
- package/src/interface/tool-workflow.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-subagent-workflow",
|
|
3
|
-
"version": "8.14.
|
|
3
|
+
"version": "8.14.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"description": "Unified subagent execution and multi-agent workflow orchestration for Pi — spawned-process agent runtime with sync/background modes, stateful workflow management with persistence, state machine, and execution tracing.",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
57
|
+
"@zhushanwen/extension-protocol": "0.11.0",
|
|
58
|
+
"@zhushanwen/session-delivery": "0.10.0",
|
|
59
59
|
"@zhushanwen/pi-ext-guards": "0.4.0",
|
|
60
60
|
"@zhushanwen/pi-extension-logger": "0.6.0",
|
|
61
|
-
"@zhushanwen/subagent-core": "0.10.
|
|
61
|
+
"@zhushanwen/subagent-core": "0.10.4",
|
|
62
62
|
"@zhushanwen/pi-subagent-cli": "0.4.0",
|
|
63
63
|
"@zhushanwen/zcode-subagent-cli": "0.3.1"
|
|
64
64
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
68
68
|
"@earendil-works/pi-tui": "^0.84.4",
|
|
69
69
|
"typebox": "*",
|
|
70
|
-
"@zhushanwen/pi-pending-notifications": "0.7.
|
|
70
|
+
"@zhushanwen/pi-pending-notifications": "0.7.2",
|
|
71
71
|
"@zhushanwen/pi-structured-output": "5.1.7"
|
|
72
72
|
},
|
|
73
73
|
"peerDependenciesMeta": {
|
|
@@ -31,7 +31,7 @@ vi.mock("@zhushanwen/pi-extension-logger", () => extensionLoggerMock);
|
|
|
31
31
|
vi.mock("@zhushanwen/subagent-core", () => ({ getInFlightSnapshot: mockSnapshot }));
|
|
32
32
|
|
|
33
33
|
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
34
|
-
import { INFLIGHT_REPORT_ACK, SUBAGENT_INFLIGHT_MARKER } from "@
|
|
34
|
+
import { INFLIGHT_REPORT_ACK, SUBAGENT_INFLIGHT_MARKER } from "@zhushanwen/extension-protocol";
|
|
35
35
|
|
|
36
36
|
import { createInFlightReporter } from "../inflight-reporter.ts";
|
|
37
37
|
|
|
@@ -41,12 +41,12 @@ const sessionDeliveryMock = vi.hoisted(() => ({
|
|
|
41
41
|
vi.mock("@earendil-works/pi-coding-agent", () => piCodingAgentMock);
|
|
42
42
|
vi.mock("@zhushanwen/pi-extension-logger", () => extensionLoggerMock);
|
|
43
43
|
vi.mock("@zhushanwen/pi-pending-notifications", () => pendingNotificationsMock);
|
|
44
|
-
vi.mock("@
|
|
44
|
+
vi.mock("@zhushanwen/session-delivery", () => sessionDeliveryMock);
|
|
45
45
|
|
|
46
46
|
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
47
47
|
import { getLogger } from "@zhushanwen/pi-extension-logger";
|
|
48
48
|
import { countActiveFromEntries } from "@zhushanwen/pi-pending-notifications";
|
|
49
|
-
import { createDelivery } from "@
|
|
49
|
+
import { createDelivery } from "@zhushanwen/session-delivery";
|
|
50
50
|
|
|
51
51
|
import { createPiHostServices, createPiNotifyDomainPorts } from "../pi-host.ts";
|
|
52
52
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
// (30min 有界),不丢 errs-safe 兜底。
|
|
38
38
|
|
|
39
39
|
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
40
|
-
import { SUBAGENT_INFLIGHT_MARKER, callMarkerRpc, isInFlightReportAck } from "@
|
|
40
|
+
import { SUBAGENT_INFLIGHT_MARKER, callMarkerRpc, isInFlightReportAck } from "@zhushanwen/extension-protocol";
|
|
41
41
|
import { getInFlightSnapshot } from "@zhushanwen/subagent-core";
|
|
42
42
|
import { getLogger } from "@zhushanwen/pi-extension-logger";
|
|
43
43
|
import { toErrorMessage } from "@zhushanwen/pi-ext-guards";
|
package/src/host/pi-host.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
//
|
|
6
6
|
// 本文件属壳侧(shell),不进 core 切面——对 pi SDK 与 pi 宿主协作件
|
|
7
7
|
// (@earendil-works/pi-coding-agent / @zhushanwen/pi-extension-logger /
|
|
8
|
-
// @zhushanwen/pi-pending-notifications / @
|
|
8
|
+
// @zhushanwen/pi-pending-notifications / @zhushanwen/session-delivery)的运行时
|
|
9
9
|
// import 收敛在此层,core 闭包(D9 守卫对象)不得出现这些包。
|
|
10
10
|
//
|
|
11
11
|
// 端口语义:
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// - countActiveFromEntries 适配:pi 侧真函数返回 CountActiveResult 对象,core
|
|
23
23
|
// 端口契约是 number(core 消费面只读 .count,notify-ports.ts 契约注释)——
|
|
24
24
|
// foundation 单元登记给本单元的适配责任。
|
|
25
|
-
// - createDelivery 透传:@
|
|
25
|
+
// - createDelivery 透传:@zhushanwen/session-delivery 的 createDelivery 与 core
|
|
26
26
|
// 的 Delivery* 结构化类型逐字段结构兼容(DeliveryHandle 的 sendChecked/depth
|
|
27
27
|
// 是结构超集成员,多不碍兼容)——结构兼容由本注入点 typecheck 守护,上游签名
|
|
28
28
|
// 漂移即红(notify-ports.ts「闭包红线」段)。
|
|
@@ -34,7 +34,7 @@ import { fileURLToPath } from "node:url";
|
|
|
34
34
|
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
35
35
|
import { getLogger } from "@zhushanwen/pi-extension-logger";
|
|
36
36
|
import { countActiveFromEntries } from "@zhushanwen/pi-pending-notifications";
|
|
37
|
-
import { createDelivery } from "@
|
|
37
|
+
import { createDelivery } from "@zhushanwen/session-delivery";
|
|
38
38
|
|
|
39
39
|
import type { DiscoveryRoot, HostServices } from "@zhushanwen/subagent-core";
|
|
40
40
|
import type { LogLevel } from "@zhushanwen/subagent-core";
|
package/src/interface/format.ts
CHANGED
|
@@ -13,7 +13,7 @@ import os from "node:os";
|
|
|
13
13
|
|
|
14
14
|
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
15
15
|
|
|
16
|
-
import { firstContentText } from "@
|
|
16
|
+
import { firstContentText } from "@zhushanwen/extension-protocol";
|
|
17
17
|
|
|
18
18
|
import type { AgentEventLogEntry, DisplayItem, ExecutionStatus } from "@zhushanwen/subagent-core";
|
|
19
19
|
import { DEFAULT_AGENT_NAME } from "@zhushanwen/subagent-core";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GUI 协议映射辅助函数 —— run/subagent 状态字符串 → 协议 TreeItem 状态 + 图标。
|
|
3
3
|
*
|
|
4
|
-
* 协议包 @
|
|
4
|
+
* 协议包 @zhushanwen/extension-protocol 的 list-tree 组件用 TreeItem.status(三态)
|
|
5
5
|
* + TreeItem.icon 表达运行态。本模块把 workflow/subagent 领域的丰富状态字符串收口
|
|
6
6
|
* 到这两个枚举,供 helpers.ts / tool-workflow.ts / subagent-actions.ts 复用。
|
|
7
7
|
*
|
|
8
|
-
* 参考:@
|
|
8
|
+
* 参考:@zhushanwen/extension-protocol GuiComponentProps['list-tree']。
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { GuiContext, TreeItem, TreeItemIcon } from "@
|
|
11
|
+
import type { GuiContext, TreeItem, TreeItemIcon } from "@zhushanwen/extension-protocol";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 从 Pi ExtensionContext 构造协议 GuiContext 的最小子集。
|
package/src/interface/helpers.ts
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
type GuiRenderResult,
|
|
27
27
|
guiResult,
|
|
28
28
|
isGuiCapable,
|
|
29
|
-
} from "@
|
|
29
|
+
} from "@zhushanwen/extension-protocol";
|
|
30
30
|
import { mapRunIcon, mapRunStatus } from "./gui-mappers.ts";
|
|
31
31
|
|
|
32
32
|
// ── 常量 ─────────────────────────────────────────────────────
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
type GuiRenderResult,
|
|
33
33
|
guiResult,
|
|
34
34
|
isGuiCapable,
|
|
35
|
-
} from "@
|
|
35
|
+
} from "@zhushanwen/extension-protocol";
|
|
36
36
|
// C5②/C5⑦:创作闭环统一走 core barrel(generateWorkflowScript/saveWorkflow/
|
|
37
37
|
// deleteWorkflow/lintScript 均为 barrel 导出面;深路径在 npm/vendored 形态不可达)
|
|
38
38
|
import {
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
type GuiRenderResult,
|
|
29
29
|
guiResult,
|
|
30
30
|
isGuiCapable,
|
|
31
|
-
} from "@
|
|
31
|
+
} from "@zhushanwen/extension-protocol";
|
|
32
32
|
import { type Static, Type } from "typebox";
|
|
33
33
|
|
|
34
34
|
import { SLUG_MAX_LENGTH } from "@zhushanwen/subagent-core";
|