@zhushanwen/subagent-engine-sdk 0.7.0 → 0.8.0
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/dist/best-effort.cjs +9 -1
- package/dist/best-effort.js +2 -2
- package/dist/{chunk-X24IVQKJ.js → chunk-3FVBDH3X.js} +3 -2
- package/dist/{chunk-YL5W5EMV.js → chunk-AF2ETADP.js} +1 -1
- package/dist/chunk-D36ZIQQK.js +28 -0
- package/dist/{chunk-W23PAAGX.js → chunk-DIIYVO4O.js} +1 -27
- package/dist/{chunk-RCT7L777.js → chunk-F7VDVSBZ.js} +1 -1
- package/dist/{chunk-HERD6RIR.js → chunk-MQPASWMA.js} +2 -2
- package/dist/{chunk-75QEMUGV.js → chunk-NXNNXGTY.js} +10 -1
- package/dist/{chunk-EJMF63R5.js → chunk-QMEHSKNR.js} +1 -1
- package/dist/{chunk-J4G2MXDS.js → chunk-VE3NVT7K.js} +1 -1
- package/dist/cli-entry.cjs +9 -1
- package/dist/cli-entry.js +2 -2
- package/dist/{contract-types-DiWyGRXr.d.cts → contract-types-DqOD58r-.d.cts} +7 -12
- package/dist/{contract-types-DiWyGRXr.d.ts → contract-types-DqOD58r-.d.ts} +7 -12
- package/dist/data-dir.cjs +10 -2
- package/dist/data-dir.js +2 -2
- package/dist/env.cjs +9 -1
- package/dist/env.d.cts +6 -6
- package/dist/env.d.ts +6 -6
- package/dist/env.js +2 -2
- package/dist/error-codes-C3oVToMr.d.cts +311 -0
- package/dist/error-codes-CiDwaODz.d.ts +311 -0
- package/dist/index.cjs +41 -3
- package/dist/index.d.cts +31 -3
- package/dist/index.d.ts +31 -3
- package/dist/index.js +62 -31
- package/dist/journal-io.d.cts +1 -1
- package/dist/journal-io.d.ts +1 -1
- package/dist/journal-replay.d.cts +1 -1
- package/dist/journal-replay.d.ts +1 -1
- package/dist/kill-chain.cjs +9 -1
- package/dist/kill-chain.d.cts +1 -1
- package/dist/kill-chain.d.ts +1 -1
- package/dist/kill-chain.js +2 -2
- package/dist/logger.cjs +11 -1
- package/dist/logger.js +1 -1
- package/dist/port-contract.d.cts +12 -6
- package/dist/port-contract.d.ts +12 -6
- package/dist/protocol/index.cjs +1 -1
- package/dist/protocol/index.d.cts +4 -296
- package/dist/protocol/index.d.ts +4 -296
- package/dist/protocol/index.js +7 -5
- package/dist/server/index.cjs +217 -0
- package/dist/server/index.d.cts +146 -0
- package/dist/server/index.d.ts +146 -0
- package/dist/server/index.js +143 -0
- package/dist/spawn.cjs +9 -1
- package/dist/spawn.js +3 -3
- package/package.json +12 -1
package/dist/spawn.cjs
CHANGED
|
@@ -30,8 +30,16 @@ __export(spawn_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(spawn_exports);
|
|
31
31
|
var import_node_child_process = require("child_process");
|
|
32
32
|
|
|
33
|
+
// src/global-slots.ts
|
|
34
|
+
var ENGINE_SDK_SLOT_KEYS = {
|
|
35
|
+
/** dataDir 缺省告警一次性标记(data-dir.ts)。 */
|
|
36
|
+
dataDirWarned: "@zhushanwen/subagent-engine-sdk.data-dir-warned",
|
|
37
|
+
/** logger sink 进程级单例(logger.ts)。 */
|
|
38
|
+
loggerSink: "@zhushanwen/subagent-engine-sdk.logger-sink"
|
|
39
|
+
};
|
|
40
|
+
|
|
33
41
|
// src/logger.ts
|
|
34
|
-
var SINK_SLOT_KEY =
|
|
42
|
+
var SINK_SLOT_KEY = Symbol.for(ENGINE_SDK_SLOT_KEYS.loggerSink);
|
|
35
43
|
function getSinkSlot() {
|
|
36
44
|
let slot = Reflect.get(globalThis, SINK_SLOT_KEY);
|
|
37
45
|
if (!slot) {
|
package/dist/spawn.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
armEngineSelfDestruct,
|
|
6
6
|
pumpNdjsonLines,
|
|
7
7
|
spawnEngineChild
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-MQPASWMA.js";
|
|
9
|
+
import "./chunk-F7VDVSBZ.js";
|
|
10
10
|
import "./chunk-PYO3YR7W.js";
|
|
11
11
|
import "./chunk-SFNTX7Q3.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NXNNXGTY.js";
|
|
13
13
|
import "./chunk-JSBRDJBE.js";
|
|
14
14
|
export {
|
|
15
15
|
DEFAULT_ENGINE_HOST_REQUEST_TIMEOUT_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/subagent-engine-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Engine-side SDK for the subagent engine protocol: NDJSON stdio contract types, engine primitives (schema emulation, nesting guard, kill chain, journal replay projection, data-dir/paths resolution) — the shared contract root between subagent-core and engine CLI packages (engines import SDK only, never core)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,17 @@
|
|
|
32
32
|
"default": "./dist/protocol/index.cjs"
|
|
33
33
|
},
|
|
34
34
|
"default": "./dist/protocol/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./server": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/server/index.d.ts",
|
|
39
|
+
"default": "./dist/server/index.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/server/index.d.cts",
|
|
43
|
+
"default": "./dist/server/index.cjs"
|
|
44
|
+
},
|
|
45
|
+
"default": "./dist/server/index.js"
|
|
35
46
|
}
|
|
36
47
|
},
|
|
37
48
|
"$comment": "W1 骨架(docs/design/subagent-engine-protocolization.impl-plan.md §2.1)。双形态同 subagent-core 先例(D4):workspace 消费走 import 条件 -> src;npm 消费走 publishConfig -> dist。exports 面先收窄到 ./ 与 ./protocol(exports = semver 契约,收窄不放宽;引擎包 W5/W7 消费经主 barrel)。协议版本独立于包版本:ENGINE_PROTOCOL_VERSION = 1(src/protocol/engine-protocol.ts)。不变量:本包禁止 import @zhushanwen/subagent-core(守卫 .githooks/check-engine-sdk-boundary.mjs)。src/env.ts 与 src/spawn.ts 是 W12 领地(impl-plan §2.12),本单元仅空骨架占位。tsup entry 逐模块具名登记(§2.1 末行),新增模块必须同步登记。files 不含 src/(对齐 subagent-core 2026-09-16 同型收敛):npm 消费面经 publishConfig 整体替换后全指 dist,TS 源仅服务 workspace(node_modules symlink 直读磁盘源文件,不经 tarball);dist 产物无 sourcemap/sourceMappingURL,移除 src 零断链。已知残留:顶层 main(src/index.ts,workspace 形态载体)被 npm files 规则强制隐含打进 tarball,对 npm 消费者不可达,纯体积噪声。",
|