@zhushanwen/subagent-engine-sdk 0.2.1 → 0.4.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/{chunk-A75XDJIC.js → chunk-AIG5LSGK.js} +3 -0
- package/dist/{chunk-ZXEAW25V.js → chunk-BBVZK5DL.js} +1 -4
- package/dist/chunk-EUSM6ZX4.js +10 -0
- package/dist/{chunk-LEOBWKRM.js → chunk-FJT23P7T.js} +1 -1
- package/dist/{chunk-N3RL6OVM.js → chunk-J4G2MXDS.js} +3 -1
- package/dist/{chunk-ZOFFJNJD.js → chunk-LKPVN3N6.js} +1 -1
- package/dist/{chunk-RULLX6C6.js → chunk-LQR73V67.js} +2 -0
- package/dist/{chunk-YFSN3D5N.js → chunk-TW2FAMAJ.js} +24 -32
- package/dist/{chunk-PPEPBVCC.js → chunk-WS4WAZVR.js} +1 -1
- package/dist/cli-entry.cjs +3 -1
- package/dist/cli-entry.js +1 -1
- package/dist/{contract-types-sSlgppBC.d.cts → contract-types-C71Sqq8d.d.cts} +31 -43
- package/dist/{contract-types-sSlgppBC.d.ts → contract-types-C71Sqq8d.d.ts} +31 -43
- package/dist/env.cjs +1 -4
- package/dist/env.d.cts +4 -1
- package/dist/env.d.ts +4 -1
- package/dist/env.js +1 -1
- package/dist/{error-codes-Dhss2Kmk.d.ts → error-codes-CiOO3PMg.d.cts} +7 -7
- package/dist/{error-codes-DHco5-i_.d.cts → error-codes-D5YlWaBx.d.ts} +7 -7
- package/dist/index.cjs +45 -41
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +16 -15
- package/dist/journal-io.d.cts +1 -1
- package/dist/journal-io.d.ts +1 -1
- package/dist/journal-replay.cjs +3 -0
- package/dist/journal-replay.d.cts +1 -1
- package/dist/journal-replay.d.ts +1 -1
- package/dist/journal-replay.js +1 -1
- package/dist/kill-chain.d.cts +2 -2
- package/dist/kill-chain.d.ts +2 -2
- package/dist/kill-chain.js +2 -2
- package/dist/node-executor.js +2 -2
- package/dist/port-contract.cjs +3 -0
- package/dist/port-contract.d.cts +45 -11
- package/dist/port-contract.d.ts +45 -11
- package/dist/port-contract.js +3 -1
- package/dist/protocol/index.cjs +26 -36
- package/dist/protocol/index.d.cts +95 -172
- package/dist/protocol/index.d.ts +95 -172
- package/dist/protocol/index.js +4 -8
- package/dist/ui-types.cjs +16 -0
- package/dist/ui-types.d.cts +13 -6
- package/dist/ui-types.d.ts +13 -6
- package/dist/ui-types.js +7 -1
- package/package.json +1 -1
- package/src/cli-entry.ts +6 -1
- package/src/data-dir.ts +3 -2
- package/src/env.ts +4 -4
- package/src/journal-replay.ts +4 -0
- package/src/nesting-guard.ts +1 -1
- package/src/paths.ts +1 -1
- package/src/port-contract.ts +44 -11
- package/src/protocol/contract-types.ts +36 -35
- package/src/protocol/engine-protocol.ts +22 -12
- package/src/protocol/error-codes.ts +7 -6
- package/src/protocol/frames.ts +1 -3
- package/src/protocol/methods.ts +38 -30
- package/src/protocol/reverse-channels.ts +21 -172
- package/src/protocol/schema.ts +34 -3
- package/src/ui-types.ts +22 -5
- package/dist/chunk-2DIMPZCQ.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentEvent, E as EngineCapabilities } from './contract-types-
|
|
1
|
+
import { a as AgentEvent, E as EngineCapabilities } from './contract-types-C71Sqq8d.js';
|
|
2
2
|
|
|
3
3
|
/** 协议错误对象(error 帧载荷与反向请求错误应答共用形态)。 */
|
|
4
4
|
interface ProtocolError {
|
|
@@ -46,7 +46,7 @@ type ReverseResponseResult =
|
|
|
46
46
|
{
|
|
47
47
|
ok: true;
|
|
48
48
|
}
|
|
49
|
-
/** 人机交互类(askUser
|
|
49
|
+
/** 人机交互类(askUser)两阶段第一阶段:已受理,结果异步到达(R9-2)。 */
|
|
50
50
|
| {
|
|
51
51
|
ack: true;
|
|
52
52
|
}
|
|
@@ -54,7 +54,6 @@ type ReverseResponseResult =
|
|
|
54
54
|
| {
|
|
55
55
|
unsupported: true;
|
|
56
56
|
};
|
|
57
|
-
type AnyFrame = RequestFrame | ResponseFrame | NotificationFrame | ReverseRequestFrame;
|
|
58
57
|
/** ① 请求:有数字 id + method + params,且无 result/error(与②应答区分)。 */
|
|
59
58
|
declare function isRequestFrame(frame: unknown): frame is RequestFrame;
|
|
60
59
|
/** ② 应答:有 id(number|string)且 result/error 二选一。 */
|
|
@@ -88,15 +87,16 @@ declare class EngineSdkError extends Error {
|
|
|
88
87
|
}
|
|
89
88
|
declare function engineProtocolMismatchError(engineVersion: number): EngineSdkError;
|
|
90
89
|
/**
|
|
91
|
-
* [v1.x]
|
|
92
|
-
* 验收 A6:manifest 无 conversation gate 位的引擎收到
|
|
90
|
+
* [v1.x] resume 会话形态(run.params.resume)的 gate 拒绝具名错误(chat-domain
|
|
91
|
+
* 设计 §3.2 D1-A + 验收 A6:manifest 无 conversation gate 位的引擎收到
|
|
92
|
+
* conversation 请求 → 同步拒;[H1] 文案随 D5 语义收窄——续聊 = resume 续聊)。
|
|
93
93
|
* 文案契约对齐 core capability-gate.ts conversation 分支(错误码
|
|
94
94
|
* engine_capability_unsupported + 「去掉参数 / 修 manifest / 升级引擎包」恢复指引)
|
|
95
95
|
* ——W3 chat 路由切协议客户端时以本构造器替换 core 内联文案,保持两侧一致。
|
|
96
96
|
*/
|
|
97
97
|
declare function engineConversationUnsupportedError(engineId: string): EngineSdkError;
|
|
98
98
|
/**
|
|
99
|
-
* [v1.x]
|
|
99
|
+
* [v1.x] resume 会话形态(run.params.resume / task.conversation=true)派发前的同步 gate:
|
|
100
100
|
* manifest conversation 位 unsupported 即抛 engineConversationUnsupportedError——
|
|
101
101
|
* 进程/record 创建前同步拒(A6:run 域不受影响,仅 chat 面被拦)。
|
|
102
102
|
* 判据单源:core 侧 capability-gate.assertTaskShapeSupported 的 conversation 分支
|
|
@@ -115,4 +115,4 @@ declare function engineTimeoutDetail(stdoutTail: string): string;
|
|
|
115
115
|
/** schema_emulation_failed 的终报文案(宿主编排层「重试一次仍失败」后消费)。 */
|
|
116
116
|
declare function schemaEmulationFailedDetail(error: string, tail: string): string;
|
|
117
117
|
|
|
118
|
-
export {
|
|
118
|
+
export { ENGINE_ERROR_CODE_PREFIX as E, type NotificationFrame as N, type ProtocolError as P, type RequestFrame as R, STDOUT_TAIL_ECHO_CHARS as S, ENGINE_PROTOCOL_ERROR_CODES as a, ENGINE_TIMEOUT_RECOVERY as b, type EngineProtocolErrorCode as c, EngineSdkError as d, type ErrorResponseFrame as e, type EventNotificationParams as f, type ResponseFrame as g, type ReverseRequestFrame as h, type ReverseResponseResult as i, type SuccessResponseFrame as j, assertChatConversationSupported as k, engineConversationUnsupportedError as l, engineProtocolMismatchError as m, engineTimeoutDetail as n, isEngineErrorPassthroughCode as o, isEngineProtocolErrorCode as p, isNotificationFrame as q, isRequestFrame as r, isResponseFrame as s, isReverseRequestFrame as t, schemaEmulationFailedDetail as u };
|
package/dist/index.cjs
CHANGED
|
@@ -6608,10 +6608,10 @@ __export(src_exports, {
|
|
|
6608
6608
|
RELAY_EXIT_CODES: () => RELAY_EXIT_CODES,
|
|
6609
6609
|
RELAY_PROTOCOL_VERSION: () => RELAY_PROTOCOL_VERSION,
|
|
6610
6610
|
REVERSE_CHANNELS: () => REVERSE_CHANNELS,
|
|
6611
|
-
REVERSE_CHANNEL_NAMES: () => REVERSE_CHANNEL_NAMES,
|
|
6612
6611
|
REVERSE_CHANNEL_TIMEOUT_CLASS: () => REVERSE_CHANNEL_TIMEOUT_CLASS,
|
|
6613
6612
|
REVERSE_REQUEST_TIMEOUT_MS: () => REVERSE_REQUEST_TIMEOUT_MS,
|
|
6614
6613
|
SCHEMA_EMULATION_TAIL_CHARS: () => SCHEMA_EMULATION_TAIL_CHARS,
|
|
6614
|
+
SHARED_POOL_KEY: () => SHARED_POOL_KEY,
|
|
6615
6615
|
STDERR_TAIL_CHARS: () => STDERR_TAIL_CHARS,
|
|
6616
6616
|
STDOUT_TAIL_ECHO_CHARS: () => STDOUT_TAIL_ECHO_CHARS,
|
|
6617
6617
|
SUPPORTED_PROTOCOL_RANGE: () => SUPPORTED_PROTOCOL_RANGE,
|
|
@@ -6641,8 +6641,6 @@ __export(src_exports, {
|
|
|
6641
6641
|
hostKindOf: () => hostKindOf,
|
|
6642
6642
|
isEngineErrorPassthroughCode: () => isEngineErrorPassthroughCode,
|
|
6643
6643
|
isEngineProtocolErrorCode: () => isEngineProtocolErrorCode,
|
|
6644
|
-
isHostRoundLifecycleParams: () => isHostRoundLifecycleParams,
|
|
6645
|
-
isHostStreamDeltaParams: () => isHostStreamDeltaParams,
|
|
6646
6644
|
isNotificationFrame: () => isNotificationFrame,
|
|
6647
6645
|
isPidAlive: () => isPidAlive,
|
|
6648
6646
|
isProtocolVersionCompatible: () => isProtocolVersionCompatible,
|
|
@@ -6650,6 +6648,7 @@ __export(src_exports, {
|
|
|
6650
6648
|
isRequestFrame: () => isRequestFrame,
|
|
6651
6649
|
isResponseFrame: () => isResponseFrame,
|
|
6652
6650
|
isReverseRequestFrame: () => isReverseRequestFrame,
|
|
6651
|
+
isUiResponse: () => isUiResponse,
|
|
6653
6652
|
killChain: () => killChain,
|
|
6654
6653
|
notificationFrameSchema: () => notificationFrameSchema,
|
|
6655
6654
|
parseChannel: () => parseChannel,
|
|
@@ -6672,6 +6671,7 @@ __export(src_exports, {
|
|
|
6672
6671
|
reverseRequestFrameSchema: () => reverseRequestFrameSchema,
|
|
6673
6672
|
rotateStderrLogIfNeeded: () => rotateStderrLogIfNeeded,
|
|
6674
6673
|
runEngineCliEntry: () => runEngineCliEntry,
|
|
6674
|
+
runSessionParamsSchema: () => runSessionParamsSchema,
|
|
6675
6675
|
sanitizeSeg: () => sanitizeSeg,
|
|
6676
6676
|
schemaEmulationFailedDetail: () => schemaEmulationFailedDetail,
|
|
6677
6677
|
sessionIdFromHandle: () => sessionIdFromHandle,
|
|
@@ -6737,7 +6737,6 @@ var PROTOCOL_METHODS = [
|
|
|
6737
6737
|
"probe",
|
|
6738
6738
|
"run",
|
|
6739
6739
|
"cancel",
|
|
6740
|
-
"interact",
|
|
6741
6740
|
"read",
|
|
6742
6741
|
"listModels",
|
|
6743
6742
|
"validateModel",
|
|
@@ -6749,44 +6748,19 @@ var PROTOCOL_METHODS = [
|
|
|
6749
6748
|
var REVERSE_CHANNELS = [
|
|
6750
6749
|
"host/log",
|
|
6751
6750
|
"host/askUser",
|
|
6752
|
-
"host/permission",
|
|
6753
6751
|
"host/streamDelta",
|
|
6754
|
-
"host/poolResolved",
|
|
6755
6752
|
"host/handleReady",
|
|
6756
6753
|
"host/childSpawned",
|
|
6757
|
-
"host/childStateChanged"
|
|
6758
|
-
"host/roundLifecycle"
|
|
6754
|
+
"host/childStateChanged"
|
|
6759
6755
|
];
|
|
6760
6756
|
var REVERSE_CHANNEL_TIMEOUT_CLASS = {
|
|
6761
6757
|
"host/log": "data-plane",
|
|
6762
6758
|
"host/streamDelta": "data-plane",
|
|
6763
|
-
"host/poolResolved": "data-plane",
|
|
6764
6759
|
"host/handleReady": "data-plane",
|
|
6765
6760
|
"host/childSpawned": "data-plane",
|
|
6766
6761
|
"host/childStateChanged": "data-plane",
|
|
6767
|
-
"host/
|
|
6768
|
-
"host/askUser": "interaction",
|
|
6769
|
-
"host/permission": "interaction"
|
|
6762
|
+
"host/askUser": "interaction"
|
|
6770
6763
|
};
|
|
6771
|
-
function isHostStreamDeltaParams(value) {
|
|
6772
|
-
if (typeof value !== "object" || value === null) return false;
|
|
6773
|
-
const v = value;
|
|
6774
|
-
const hasRunId = typeof v.runId === "string";
|
|
6775
|
-
const hasRecordId = typeof v.recordId === "string";
|
|
6776
|
-
if (hasRunId === hasRecordId) return false;
|
|
6777
|
-
return typeof v.delta === "string";
|
|
6778
|
-
}
|
|
6779
|
-
function isHostRoundLifecycleParams(value) {
|
|
6780
|
-
if (typeof value !== "object" || value === null) return false;
|
|
6781
|
-
const v = value;
|
|
6782
|
-
const hasRunId = typeof v.runId === "string";
|
|
6783
|
-
const hasRecordId = typeof v.recordId === "string";
|
|
6784
|
-
if (hasRunId === hasRecordId) return false;
|
|
6785
|
-
if (v.phase === "settled" || v.phase === "idle") return true;
|
|
6786
|
-
if (v.phase !== "failed") return false;
|
|
6787
|
-
const err = v.error;
|
|
6788
|
-
return typeof err === "object" && err !== null && typeof err.code === "string" && typeof err.message === "string";
|
|
6789
|
-
}
|
|
6790
6764
|
|
|
6791
6765
|
// src/protocol/error-codes.ts
|
|
6792
6766
|
var ENGINE_PROTOCOL_ERROR_CODES = [
|
|
@@ -6838,7 +6812,7 @@ function engineProtocolMismatchError(engineVersion) {
|
|
|
6838
6812
|
function engineConversationUnsupportedError(engineId) {
|
|
6839
6813
|
return new EngineSdkError(
|
|
6840
6814
|
"engine_capability_unsupported",
|
|
6841
|
-
`engine '${engineId}' \u4E0D\u652F\u6301
|
|
6815
|
+
`engine '${engineId}' \u4E0D\u652F\u6301 resume \u7EED\u804A\uFF08capabilities.conversation = 'unsupported'\uFF0Cmanifest \u65E0 conversation gate \u4F4D\uFF09`,
|
|
6842
6816
|
`\u53BB\u6389 conversation \u53C2\u6570\uFF08\u4E00\u6B21\u6027\u4EFB\u52A1\u9ED8\u8BA4\u5F62\u6001\uFF09\uFF0C\u6216\u4FEE manifest capabilities / \u5347\u7EA7\u5F15\u64CE\u5305\uFF08\u82E5\u5F15\u64CE\u5B9E\u9645\u652F\u6301\u8BE5\u80FD\u529B\uFF09`,
|
|
6843
6817
|
{ engineId, capability: "conversation", declared: "unsupported" }
|
|
6844
6818
|
);
|
|
@@ -6939,6 +6913,7 @@ var notificationFrameSchema = {
|
|
|
6939
6913
|
"turn_end",
|
|
6940
6914
|
"message_end",
|
|
6941
6915
|
"compaction",
|
|
6916
|
+
"activity",
|
|
6942
6917
|
"error"
|
|
6943
6918
|
]
|
|
6944
6919
|
}
|
|
@@ -6976,7 +6951,26 @@ var FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS = [
|
|
|
6976
6951
|
"password",
|
|
6977
6952
|
"secret"
|
|
6978
6953
|
];
|
|
6979
|
-
var
|
|
6954
|
+
var runSessionParamsSchema = {
|
|
6955
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6956
|
+
title: "EngineRunSessionParams",
|
|
6957
|
+
type: "object",
|
|
6958
|
+
additionalProperties: false,
|
|
6959
|
+
required: ["recordId"],
|
|
6960
|
+
properties: {
|
|
6961
|
+
recordId: { type: "string" },
|
|
6962
|
+
resume: {
|
|
6963
|
+
type: "object",
|
|
6964
|
+
additionalProperties: false,
|
|
6965
|
+
required: ["sessionRef"],
|
|
6966
|
+
properties: {
|
|
6967
|
+
// ResumeAnchor.sessionRef = Record<string, string>(引擎定位键值对)
|
|
6968
|
+
sessionRef: { type: "object", additionalProperties: { type: "string" } },
|
|
6969
|
+
journalPath: { type: "string" }
|
|
6970
|
+
}
|
|
6971
|
+
}
|
|
6972
|
+
}
|
|
6973
|
+
};
|
|
6980
6974
|
|
|
6981
6975
|
// src/schema-emulation.ts
|
|
6982
6976
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
@@ -7477,6 +7471,9 @@ function updateFromEvent(record, event) {
|
|
|
7477
7471
|
// ── compaction:不产生数据(不变)──
|
|
7478
7472
|
case "compaction":
|
|
7479
7473
|
return;
|
|
7474
|
+
// ── activity:纯活性信号,reducer no-op(协议语义见 contract-types)──
|
|
7475
|
+
case "activity":
|
|
7476
|
+
return;
|
|
7480
7477
|
default: {
|
|
7481
7478
|
const _exhaustive = event;
|
|
7482
7479
|
return _exhaustive;
|
|
@@ -7587,6 +7584,13 @@ function resolveJournalPath(dataDir, engineId, poolKey, taskId) {
|
|
|
7587
7584
|
return (0, import_node_path.join)(resolvePoolDir(dataDir, engineId, poolKey), `journal-${sanitizeSeg(taskId)}.jsonl`);
|
|
7588
7585
|
}
|
|
7589
7586
|
|
|
7587
|
+
// src/ui-types.ts
|
|
7588
|
+
function isUiResponse(value) {
|
|
7589
|
+
if (typeof value !== "object" || value === null) return false;
|
|
7590
|
+
const v = value;
|
|
7591
|
+
return typeof v.value === "string" || typeof v.confirmed === "boolean" || v.cancelled === true || v.ack === true;
|
|
7592
|
+
}
|
|
7593
|
+
|
|
7590
7594
|
// src/ui-channels.ts
|
|
7591
7595
|
var NUL = "\0";
|
|
7592
7596
|
function normalizeChannelName(markerLiteral) {
|
|
@@ -7690,10 +7694,7 @@ var ENGINE_ENV_DENY_LIST = [
|
|
|
7690
7694
|
"XYZ_RUNTIME_TOKEN",
|
|
7691
7695
|
"XYZ_AGENT_API_KEY",
|
|
7692
7696
|
"XYZ_SUBAGENT_RELAY_SESSION_ID",
|
|
7693
|
-
"XYZ_SUBAGENT_RELAY_RECORD_ID"
|
|
7694
|
-
"XYZ_SUBAGENT_RELAY_STDIN",
|
|
7695
|
-
"XYZ_SUBAGENT_RELAY_STDOUT",
|
|
7696
|
-
"XYZ_SUBAGENT_RELAY_STDERR"
|
|
7697
|
+
"XYZ_SUBAGENT_RELAY_RECORD_ID"
|
|
7697
7698
|
];
|
|
7698
7699
|
var ENGINE_ENV_L0_INFRA_KEYS = [
|
|
7699
7700
|
"XYZ_AGENT_DATA_DIR",
|
|
@@ -8222,6 +8223,7 @@ function parseLine(trimmed) {
|
|
|
8222
8223
|
}
|
|
8223
8224
|
|
|
8224
8225
|
// src/port-contract.ts
|
|
8226
|
+
var SHARED_POOL_KEY = "shared";
|
|
8225
8227
|
function parseCtxModel(ref) {
|
|
8226
8228
|
if (ref === void 0 || ref.trim() === "") return void 0;
|
|
8227
8229
|
const slash = ref.indexOf("/");
|
|
@@ -8237,8 +8239,10 @@ function runEngineCliEntry(opts) {
|
|
|
8237
8239
|
const server = opts.server;
|
|
8238
8240
|
configureLoggerSink({
|
|
8239
8241
|
log(level, component, message, data) {
|
|
8240
|
-
|
|
8242
|
+
if (level !== "debug") {
|
|
8243
|
+
process.stderr.write(`[${level}] [${component}] ${message}${data !== void 0 ? ` ${JSON.stringify(data)}` : ""}
|
|
8241
8244
|
`);
|
|
8245
|
+
}
|
|
8242
8246
|
void server.reverseRequest("host/log", { level, component, message }).catch(() => void 0);
|
|
8243
8247
|
}
|
|
8244
8248
|
});
|
|
@@ -8296,10 +8300,10 @@ function runEngineCliEntry(opts) {
|
|
|
8296
8300
|
RELAY_EXIT_CODES,
|
|
8297
8301
|
RELAY_PROTOCOL_VERSION,
|
|
8298
8302
|
REVERSE_CHANNELS,
|
|
8299
|
-
REVERSE_CHANNEL_NAMES,
|
|
8300
8303
|
REVERSE_CHANNEL_TIMEOUT_CLASS,
|
|
8301
8304
|
REVERSE_REQUEST_TIMEOUT_MS,
|
|
8302
8305
|
SCHEMA_EMULATION_TAIL_CHARS,
|
|
8306
|
+
SHARED_POOL_KEY,
|
|
8303
8307
|
STDERR_TAIL_CHARS,
|
|
8304
8308
|
STDOUT_TAIL_ECHO_CHARS,
|
|
8305
8309
|
SUPPORTED_PROTOCOL_RANGE,
|
|
@@ -8329,8 +8333,6 @@ function runEngineCliEntry(opts) {
|
|
|
8329
8333
|
hostKindOf,
|
|
8330
8334
|
isEngineErrorPassthroughCode,
|
|
8331
8335
|
isEngineProtocolErrorCode,
|
|
8332
|
-
isHostRoundLifecycleParams,
|
|
8333
|
-
isHostStreamDeltaParams,
|
|
8334
8336
|
isNotificationFrame,
|
|
8335
8337
|
isPidAlive,
|
|
8336
8338
|
isProtocolVersionCompatible,
|
|
@@ -8338,6 +8340,7 @@ function runEngineCliEntry(opts) {
|
|
|
8338
8340
|
isRequestFrame,
|
|
8339
8341
|
isResponseFrame,
|
|
8340
8342
|
isReverseRequestFrame,
|
|
8343
|
+
isUiResponse,
|
|
8341
8344
|
killChain,
|
|
8342
8345
|
notificationFrameSchema,
|
|
8343
8346
|
parseChannel,
|
|
@@ -8360,6 +8363,7 @@ function runEngineCliEntry(opts) {
|
|
|
8360
8363
|
reverseRequestFrameSchema,
|
|
8361
8364
|
rotateStderrLogIfNeeded,
|
|
8362
8365
|
runEngineCliEntry,
|
|
8366
|
+
runSessionParamsSchema,
|
|
8363
8367
|
sanitizeSeg,
|
|
8364
8368
|
schemaEmulationFailedDetail,
|
|
8365
8369
|
sessionIdFromHandle,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CANCEL_SETTLE_GRACE_MS, CRASH_REBUILD_BACKOFF_MS, CRASH_REBUILD_MAX_ATTEMPTS, CancelParams, CancelResult, DisposeParams, DisposeResult, ENGINE_EVENT_COALESCE_DEFAULT, ENGINE_EVENT_COALESCE_ENV, ENGINE_PROTOCOL_SCHEMAS, ENGINE_PROTOCOL_VERSION, FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS, HANDSHAKE_TIMEOUT_MS, HostAskUserParams, HostAskUserResult, HostChildSpawnedParams, HostChildStateChangedParams, HostHandleReadyParams, HostLogParams,
|
|
2
|
-
export {
|
|
3
|
-
export { A as AgentCallOpts, a as AgentEvent, b as AgentFailureKind, c as AgentOutcome, d as AgentOutcomeUsage, e as AgentUsage, f as AgentUsageTotal, g as AssertMutuallyAssignable, E as EngineCapabilities, h as EngineHandleData, I as
|
|
1
|
+
export { CANCEL_SETTLE_GRACE_MS, CRASH_REBUILD_BACKOFF_MS, CRASH_REBUILD_MAX_ATTEMPTS, CancelParams, CancelResult, DisposeParams, DisposeResult, ENGINE_EVENT_COALESCE_DEFAULT, ENGINE_EVENT_COALESCE_ENV, ENGINE_PROTOCOL_SCHEMAS, ENGINE_PROTOCOL_VERSION, FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS, HANDSHAKE_TIMEOUT_MS, HostAskUserParams, HostAskUserResult, HostChildSpawnedParams, HostChildStateChangedParams, HostHandleReadyParams, HostLogParams, HostStreamDeltaParams, InitializeParams, InitializeResult, ListModelsParams, ListModelsResult, PROTOCOL_METHODS, PingParams, PingResult, ProbeParams, ProtocolMethod, ProtocolParamsMap, ProtocolResultMap, REVERSE_CHANNELS, REVERSE_CHANNEL_TIMEOUT_CLASS, REVERSE_REQUEST_TIMEOUT_MS, ReadParams, ReverseChannel, ReverseRequestTimeoutClass, RunContextParams, RunParams, RunResult, RunResumeParams, STDERR_TAIL_CHARS, SUPPORTED_PROTOCOL_RANGE, ValidateModelParams, ValidateModelResult, errorResponseFrameSchema, isProtocolVersionCompatible, notificationFrameSchema, protocolErrorSchema, requestFrameSchema, reverseRequestFrameSchema, runSessionParamsSchema, successResponseFrameSchema } from './protocol/index.cjs';
|
|
2
|
+
export { E as ENGINE_ERROR_CODE_PREFIX, a as ENGINE_PROTOCOL_ERROR_CODES, b as ENGINE_TIMEOUT_RECOVERY, c as EngineProtocolErrorCode, d as EngineSdkError, e as ErrorResponseFrame, f as EventNotificationParams, N as NotificationFrame, P as ProtocolError, R as RequestFrame, g as ResponseFrame, h as ReverseRequestFrame, i as ReverseResponseResult, S as STDOUT_TAIL_ECHO_CHARS, j as SuccessResponseFrame, k as assertChatConversationSupported, l as engineConversationUnsupportedError, m as engineProtocolMismatchError, n as engineTimeoutDetail, o as isEngineErrorPassthroughCode, p as isEngineProtocolErrorCode, q as isNotificationFrame, r as isRequestFrame, s as isResponseFrame, t as isReverseRequestFrame, u as schemaEmulationFailedDetail } from './error-codes-CiOO3PMg.cjs';
|
|
3
|
+
export { A as AgentCallOpts, a as AgentEvent, b as AgentFailureKind, c as AgentOutcome, d as AgentOutcomeUsage, e as AgentUsage, f as AgentUsageTotal, g as AssertMutuallyAssignable, E as EngineCapabilities, h as EngineHandleData, I as InternalToolCall, M as ModelCatalogEntry, P as ProbeReport, R as ReplayedTurn, i as ResumeAnchor, S as SessionView, T as ToolCall, j as ToolCallEntry, k as ToolCallResult, l as Turn, W as WorktreeHandle } from './contract-types-C71Sqq8d.cjs';
|
|
4
4
|
export { SCHEMA_EMULATION_TAIL_CHARS, StructuredOutputResult, buildSchemaEmulationSegment, extractAndValidateStructuredOutput } from './schema-emulation.cjs';
|
|
5
5
|
export { ExecutionNestingContext, ExecutionNestingState, NESTED_SPAWN_ENV, NestedSpawnRejectedError, SpawnEnv, assertNotNestedSpawn, buildNestedSpawnEnv } from './nesting-guard.cjs';
|
|
6
6
|
export { CoreLogger, LogLevel, LoggerSink, configureLoggerSink, getLogger, resetLoggerSinkForTests } from './logger.cjs';
|
|
@@ -8,7 +8,7 @@ export { DEFAULT_KILL_GRACE_MS, DEFAULT_NATIVE_INTERRUPT_GRACE_MS, HOST_TIMEOUT_
|
|
|
8
8
|
export { ReplayRecordView, aggregateUsage, createReplayRecord, eventsToSessionView, sessionIdFromHandle, toReplayedTurn, updateFromEvent } from './journal-replay.cjs';
|
|
9
9
|
export { XYZ_DATA_DIR_ENV, resetDataDirWarnForTests, resolveEngineDataDir } from './data-dir.cjs';
|
|
10
10
|
export { resolveEngineDir, resolveEnginesRoot, resolveJournalPath, resolvePoolDir, sanitizeSeg } from './paths.cjs';
|
|
11
|
-
export { UiMethod, UiRequest, UiRequestHandler, UiResponse } from './ui-types.cjs';
|
|
11
|
+
export { UiMethod, UiRequest, UiRequestHandler, UiResponse, isUiResponse } from './ui-types.cjs';
|
|
12
12
|
export { ChannelHandler, ExtensionUiRequestLike, ParsedChannel, UiChannelRegistry, createUiChannelRegistry, parseChannel } from './ui-channels.cjs';
|
|
13
13
|
export { BuildOutboundChildEnvOptions, ENGINE_ENV_DENY_LIST, ENGINE_ENV_L0_INFRA_KEYS, ENGINE_ENV_PREFIXES, EngineChildEnvOptions, EngineRelayEnv, buildEngineChildEnv, buildOutboundChildEnv } from './env.cjs';
|
|
14
14
|
export { DEFAULT_ENGINE_HOST_REQUEST_TIMEOUT_MS, ENGINE_HOST_REQUEST_TIMEOUT_ENV, EngineChildEnv, EngineSelfDestructOptions, ReverseRequestClock, SpawnEngineChildOptions, armEngineSelfDestruct, pumpNdjsonLines, spawnEngineChild } from './spawn.cjs';
|
|
@@ -18,6 +18,6 @@ export { RELAY_ENV_NODE, RELAY_ENV_RECORD_ID, RELAY_ENV_SCRIPT, RELAY_ENV_SESSIO
|
|
|
18
18
|
export { toErrorMessage } from './error-message.cjs';
|
|
19
19
|
export { BestEffortLevel, bestEffort } from './best-effort.cjs';
|
|
20
20
|
export { replayJournal } from './journal-io.cjs';
|
|
21
|
-
export { EngineAgentCallOpts, EngineCtxModel, EngineHandle, EnginePort, EngineRunResult, EngineStream, RunContext, parseCtxModel } from './port-contract.cjs';
|
|
21
|
+
export { EngineAgentCallOpts, EngineCtxModel, EngineHandle, EnginePort, EngineRunResult, EngineStream, RunContext, SHARED_POOL_KEY, parseCtxModel } from './port-contract.cjs';
|
|
22
22
|
export { CliProtocolServerSink, RunEngineCliEntryOptions, runEngineCliEntry } from './cli-entry.cjs';
|
|
23
23
|
import 'node:child_process';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CANCEL_SETTLE_GRACE_MS, CRASH_REBUILD_BACKOFF_MS, CRASH_REBUILD_MAX_ATTEMPTS, CancelParams, CancelResult, DisposeParams, DisposeResult, ENGINE_EVENT_COALESCE_DEFAULT, ENGINE_EVENT_COALESCE_ENV, ENGINE_PROTOCOL_SCHEMAS, ENGINE_PROTOCOL_VERSION, FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS, HANDSHAKE_TIMEOUT_MS, HostAskUserParams, HostAskUserResult, HostChildSpawnedParams, HostChildStateChangedParams, HostHandleReadyParams, HostLogParams,
|
|
2
|
-
export {
|
|
3
|
-
export { A as AgentCallOpts, a as AgentEvent, b as AgentFailureKind, c as AgentOutcome, d as AgentOutcomeUsage, e as AgentUsage, f as AgentUsageTotal, g as AssertMutuallyAssignable, E as EngineCapabilities, h as EngineHandleData, I as
|
|
1
|
+
export { CANCEL_SETTLE_GRACE_MS, CRASH_REBUILD_BACKOFF_MS, CRASH_REBUILD_MAX_ATTEMPTS, CancelParams, CancelResult, DisposeParams, DisposeResult, ENGINE_EVENT_COALESCE_DEFAULT, ENGINE_EVENT_COALESCE_ENV, ENGINE_PROTOCOL_SCHEMAS, ENGINE_PROTOCOL_VERSION, FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS, HANDSHAKE_TIMEOUT_MS, HostAskUserParams, HostAskUserResult, HostChildSpawnedParams, HostChildStateChangedParams, HostHandleReadyParams, HostLogParams, HostStreamDeltaParams, InitializeParams, InitializeResult, ListModelsParams, ListModelsResult, PROTOCOL_METHODS, PingParams, PingResult, ProbeParams, ProtocolMethod, ProtocolParamsMap, ProtocolResultMap, REVERSE_CHANNELS, REVERSE_CHANNEL_TIMEOUT_CLASS, REVERSE_REQUEST_TIMEOUT_MS, ReadParams, ReverseChannel, ReverseRequestTimeoutClass, RunContextParams, RunParams, RunResult, RunResumeParams, STDERR_TAIL_CHARS, SUPPORTED_PROTOCOL_RANGE, ValidateModelParams, ValidateModelResult, errorResponseFrameSchema, isProtocolVersionCompatible, notificationFrameSchema, protocolErrorSchema, requestFrameSchema, reverseRequestFrameSchema, runSessionParamsSchema, successResponseFrameSchema } from './protocol/index.js';
|
|
2
|
+
export { E as ENGINE_ERROR_CODE_PREFIX, a as ENGINE_PROTOCOL_ERROR_CODES, b as ENGINE_TIMEOUT_RECOVERY, c as EngineProtocolErrorCode, d as EngineSdkError, e as ErrorResponseFrame, f as EventNotificationParams, N as NotificationFrame, P as ProtocolError, R as RequestFrame, g as ResponseFrame, h as ReverseRequestFrame, i as ReverseResponseResult, S as STDOUT_TAIL_ECHO_CHARS, j as SuccessResponseFrame, k as assertChatConversationSupported, l as engineConversationUnsupportedError, m as engineProtocolMismatchError, n as engineTimeoutDetail, o as isEngineErrorPassthroughCode, p as isEngineProtocolErrorCode, q as isNotificationFrame, r as isRequestFrame, s as isResponseFrame, t as isReverseRequestFrame, u as schemaEmulationFailedDetail } from './error-codes-D5YlWaBx.js';
|
|
3
|
+
export { A as AgentCallOpts, a as AgentEvent, b as AgentFailureKind, c as AgentOutcome, d as AgentOutcomeUsage, e as AgentUsage, f as AgentUsageTotal, g as AssertMutuallyAssignable, E as EngineCapabilities, h as EngineHandleData, I as InternalToolCall, M as ModelCatalogEntry, P as ProbeReport, R as ReplayedTurn, i as ResumeAnchor, S as SessionView, T as ToolCall, j as ToolCallEntry, k as ToolCallResult, l as Turn, W as WorktreeHandle } from './contract-types-C71Sqq8d.js';
|
|
4
4
|
export { SCHEMA_EMULATION_TAIL_CHARS, StructuredOutputResult, buildSchemaEmulationSegment, extractAndValidateStructuredOutput } from './schema-emulation.js';
|
|
5
5
|
export { ExecutionNestingContext, ExecutionNestingState, NESTED_SPAWN_ENV, NestedSpawnRejectedError, SpawnEnv, assertNotNestedSpawn, buildNestedSpawnEnv } from './nesting-guard.js';
|
|
6
6
|
export { CoreLogger, LogLevel, LoggerSink, configureLoggerSink, getLogger, resetLoggerSinkForTests } from './logger.js';
|
|
@@ -8,7 +8,7 @@ export { DEFAULT_KILL_GRACE_MS, DEFAULT_NATIVE_INTERRUPT_GRACE_MS, HOST_TIMEOUT_
|
|
|
8
8
|
export { ReplayRecordView, aggregateUsage, createReplayRecord, eventsToSessionView, sessionIdFromHandle, toReplayedTurn, updateFromEvent } from './journal-replay.js';
|
|
9
9
|
export { XYZ_DATA_DIR_ENV, resetDataDirWarnForTests, resolveEngineDataDir } from './data-dir.js';
|
|
10
10
|
export { resolveEngineDir, resolveEnginesRoot, resolveJournalPath, resolvePoolDir, sanitizeSeg } from './paths.js';
|
|
11
|
-
export { UiMethod, UiRequest, UiRequestHandler, UiResponse } from './ui-types.js';
|
|
11
|
+
export { UiMethod, UiRequest, UiRequestHandler, UiResponse, isUiResponse } from './ui-types.js';
|
|
12
12
|
export { ChannelHandler, ExtensionUiRequestLike, ParsedChannel, UiChannelRegistry, createUiChannelRegistry, parseChannel } from './ui-channels.js';
|
|
13
13
|
export { BuildOutboundChildEnvOptions, ENGINE_ENV_DENY_LIST, ENGINE_ENV_L0_INFRA_KEYS, ENGINE_ENV_PREFIXES, EngineChildEnvOptions, EngineRelayEnv, buildEngineChildEnv, buildOutboundChildEnv } from './env.js';
|
|
14
14
|
export { DEFAULT_ENGINE_HOST_REQUEST_TIMEOUT_MS, ENGINE_HOST_REQUEST_TIMEOUT_ENV, EngineChildEnv, EngineSelfDestructOptions, ReverseRequestClock, SpawnEngineChildOptions, armEngineSelfDestruct, pumpNdjsonLines, spawnEngineChild } from './spawn.js';
|
|
@@ -18,6 +18,6 @@ export { RELAY_ENV_NODE, RELAY_ENV_RECORD_ID, RELAY_ENV_SCRIPT, RELAY_ENV_SESSIO
|
|
|
18
18
|
export { toErrorMessage } from './error-message.js';
|
|
19
19
|
export { BestEffortLevel, bestEffort } from './best-effort.js';
|
|
20
20
|
export { replayJournal } from './journal-io.js';
|
|
21
|
-
export { EngineAgentCallOpts, EngineCtxModel, EngineHandle, EnginePort, EngineRunResult, EngineStream, RunContext, parseCtxModel } from './port-contract.js';
|
|
21
|
+
export { EngineAgentCallOpts, EngineCtxModel, EngineHandle, EnginePort, EngineRunResult, EngineStream, RunContext, SHARED_POOL_KEY, parseCtxModel } from './port-contract.js';
|
|
22
22
|
export { CliProtocolServerSink, RunEngineCliEntryOptions, runEngineCliEntry } from './cli-entry.js';
|
|
23
23
|
import 'node:child_process';
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
replayJournal
|
|
6
6
|
} from "./chunk-RDH3ZOV6.js";
|
|
7
7
|
import {
|
|
8
|
+
SHARED_POOL_KEY,
|
|
8
9
|
parseCtxModel
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LQR73V67.js";
|
|
10
11
|
import {
|
|
11
12
|
runEngineCliEntry
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-J4G2MXDS.js";
|
|
13
14
|
import {
|
|
14
15
|
resolveEngineDir,
|
|
15
16
|
resolveEnginesRoot,
|
|
@@ -17,7 +18,9 @@ import {
|
|
|
17
18
|
resolvePoolDir,
|
|
18
19
|
sanitizeSeg
|
|
19
20
|
} from "./chunk-OPMY4G4M.js";
|
|
20
|
-
import
|
|
21
|
+
import {
|
|
22
|
+
isUiResponse
|
|
23
|
+
} from "./chunk-EUSM6ZX4.js";
|
|
21
24
|
import {
|
|
22
25
|
createUiChannelRegistry,
|
|
23
26
|
parseChannel
|
|
@@ -28,7 +31,7 @@ import {
|
|
|
28
31
|
ENGINE_ENV_PREFIXES,
|
|
29
32
|
buildEngineChildEnv,
|
|
30
33
|
buildOutboundChildEnv
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BBVZK5DL.js";
|
|
32
35
|
import {
|
|
33
36
|
DEFAULT_ENGINE_HOST_REQUEST_TIMEOUT_MS,
|
|
34
37
|
ENGINE_HOST_REQUEST_TIMEOUT_ENV,
|
|
@@ -42,7 +45,7 @@ import {
|
|
|
42
45
|
probeNodeExecutor,
|
|
43
46
|
resetEngineNodeProbeCache,
|
|
44
47
|
resolveEngineNodeLaunch
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-LKPVN3N6.js";
|
|
46
49
|
import {
|
|
47
50
|
DEFAULT_STDERR_KEEP_DAYS,
|
|
48
51
|
DEFAULT_STDERR_MAX_BYTES,
|
|
@@ -70,11 +73,8 @@ import {
|
|
|
70
73
|
FORBIDDEN_CREDENTIAL_KEY_FRAGMENTS,
|
|
71
74
|
PROTOCOL_METHODS,
|
|
72
75
|
REVERSE_CHANNELS,
|
|
73
|
-
REVERSE_CHANNEL_NAMES,
|
|
74
76
|
REVERSE_CHANNEL_TIMEOUT_CLASS,
|
|
75
77
|
errorResponseFrameSchema,
|
|
76
|
-
isHostRoundLifecycleParams,
|
|
77
|
-
isHostStreamDeltaParams,
|
|
78
78
|
isNotificationFrame,
|
|
79
79
|
isRequestFrame,
|
|
80
80
|
isResponseFrame,
|
|
@@ -83,8 +83,9 @@ import {
|
|
|
83
83
|
protocolErrorSchema,
|
|
84
84
|
requestFrameSchema,
|
|
85
85
|
reverseRequestFrameSchema,
|
|
86
|
+
runSessionParamsSchema,
|
|
86
87
|
successResponseFrameSchema
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-TW2FAMAJ.js";
|
|
88
89
|
import {
|
|
89
90
|
SCHEMA_EMULATION_TAIL_CHARS,
|
|
90
91
|
buildSchemaEmulationSegment,
|
|
@@ -104,7 +105,7 @@ import {
|
|
|
104
105
|
abortWithFallback,
|
|
105
106
|
killChain,
|
|
106
107
|
synthesizeTimeoutOutcome
|
|
107
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-FJT23P7T.js";
|
|
108
109
|
import {
|
|
109
110
|
toErrorMessage
|
|
110
111
|
} from "./chunk-PYO3YR7W.js";
|
|
@@ -132,7 +133,7 @@ import {
|
|
|
132
133
|
isEngineProtocolErrorCode,
|
|
133
134
|
isProtocolVersionCompatible,
|
|
134
135
|
schemaEmulationFailedDetail
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-WS4WAZVR.js";
|
|
136
137
|
import {
|
|
137
138
|
aggregateUsage,
|
|
138
139
|
createReplayRecord,
|
|
@@ -140,7 +141,7 @@ import {
|
|
|
140
141
|
sessionIdFromHandle,
|
|
141
142
|
toReplayedTurn,
|
|
142
143
|
updateFromEvent
|
|
143
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-AIG5LSGK.js";
|
|
144
145
|
import {
|
|
145
146
|
XYZ_DATA_DIR_ENV,
|
|
146
147
|
resetDataDirWarnForTests,
|
|
@@ -189,10 +190,10 @@ export {
|
|
|
189
190
|
RELAY_EXIT_CODES,
|
|
190
191
|
RELAY_PROTOCOL_VERSION,
|
|
191
192
|
REVERSE_CHANNELS,
|
|
192
|
-
REVERSE_CHANNEL_NAMES,
|
|
193
193
|
REVERSE_CHANNEL_TIMEOUT_CLASS,
|
|
194
194
|
REVERSE_REQUEST_TIMEOUT_MS,
|
|
195
195
|
SCHEMA_EMULATION_TAIL_CHARS,
|
|
196
|
+
SHARED_POOL_KEY,
|
|
196
197
|
STDERR_TAIL_CHARS,
|
|
197
198
|
STDOUT_TAIL_ECHO_CHARS,
|
|
198
199
|
SUPPORTED_PROTOCOL_RANGE,
|
|
@@ -222,8 +223,6 @@ export {
|
|
|
222
223
|
hostKindOf,
|
|
223
224
|
isEngineErrorPassthroughCode,
|
|
224
225
|
isEngineProtocolErrorCode,
|
|
225
|
-
isHostRoundLifecycleParams,
|
|
226
|
-
isHostStreamDeltaParams,
|
|
227
226
|
isNotificationFrame,
|
|
228
227
|
isPidAlive,
|
|
229
228
|
isProtocolVersionCompatible,
|
|
@@ -231,6 +230,7 @@ export {
|
|
|
231
230
|
isRequestFrame,
|
|
232
231
|
isResponseFrame,
|
|
233
232
|
isReverseRequestFrame,
|
|
233
|
+
isUiResponse,
|
|
234
234
|
killChain,
|
|
235
235
|
notificationFrameSchema,
|
|
236
236
|
parseChannel,
|
|
@@ -253,6 +253,7 @@ export {
|
|
|
253
253
|
reverseRequestFrameSchema,
|
|
254
254
|
rotateStderrLogIfNeeded,
|
|
255
255
|
runEngineCliEntry,
|
|
256
|
+
runSessionParamsSchema,
|
|
256
257
|
sanitizeSeg,
|
|
257
258
|
schemaEmulationFailedDetail,
|
|
258
259
|
sessionIdFromHandle,
|
package/dist/journal-io.d.cts
CHANGED
package/dist/journal-io.d.ts
CHANGED
package/dist/journal-replay.cjs
CHANGED
|
@@ -193,6 +193,9 @@ function updateFromEvent(record, event) {
|
|
|
193
193
|
// ── compaction:不产生数据(不变)──
|
|
194
194
|
case "compaction":
|
|
195
195
|
return;
|
|
196
|
+
// ── activity:纯活性信号,reducer no-op(协议语义见 contract-types)──
|
|
197
|
+
case "activity":
|
|
198
|
+
return;
|
|
196
199
|
default: {
|
|
197
200
|
const _exhaustive = event;
|
|
198
201
|
return _exhaustive;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as Turn, f as AgentUsageTotal, a as AgentEvent, S as SessionView, h as EngineHandleData, R as ReplayedTurn } from './contract-types-C71Sqq8d.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* reducer 的 record 视图(core ExecutionRecord 的结构子集:reducer 只触碰这四个字段)。
|
package/dist/journal-replay.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as Turn, f as AgentUsageTotal, a as AgentEvent, S as SessionView, h as EngineHandleData, R as ReplayedTurn } from './contract-types-C71Sqq8d.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* reducer 的 record 视图(core ExecutionRecord 的结构子集:reducer 只触碰这四个字段)。
|
package/dist/journal-replay.js
CHANGED
package/dist/kill-chain.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as STDOUT_TAIL_ECHO_CHARS } from './error-codes-
|
|
2
|
-
import { A as AgentCallOpts, c as AgentOutcome } from './contract-types-
|
|
1
|
+
export { S as STDOUT_TAIL_ECHO_CHARS } from './error-codes-CiOO3PMg.cjs';
|
|
2
|
+
import { A as AgentCallOpts, c as AgentOutcome } from './contract-types-C71Sqq8d.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 可杀子进程的结构形状(Node ChildProcess 的结构子集)。
|
package/dist/kill-chain.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { S as STDOUT_TAIL_ECHO_CHARS } from './error-codes-
|
|
2
|
-
import { A as AgentCallOpts, c as AgentOutcome } from './contract-types-
|
|
1
|
+
export { S as STDOUT_TAIL_ECHO_CHARS } from './error-codes-D5YlWaBx.js';
|
|
2
|
+
import { A as AgentCallOpts, c as AgentOutcome } from './contract-types-C71Sqq8d.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 可杀子进程的结构形状(Node ChildProcess 的结构子集)。
|
package/dist/kill-chain.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
abortWithFallback,
|
|
6
6
|
killChain,
|
|
7
7
|
synthesizeTimeoutOutcome
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FJT23P7T.js";
|
|
9
9
|
import "./chunk-PYO3YR7W.js";
|
|
10
10
|
import {
|
|
11
11
|
STDOUT_TAIL_ECHO_CHARS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WS4WAZVR.js";
|
|
13
13
|
import "./chunk-75QEMUGV.js";
|
|
14
14
|
import "./chunk-JSBRDJBE.js";
|
|
15
15
|
export {
|
package/dist/node-executor.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
probeNodeExecutor,
|
|
5
5
|
resetEngineNodeProbeCache,
|
|
6
6
|
resolveEngineNodeLaunch
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-LKPVN3N6.js";
|
|
8
|
+
import "./chunk-WS4WAZVR.js";
|
|
9
9
|
import "./chunk-JSBRDJBE.js";
|
|
10
10
|
export {
|
|
11
11
|
ENGINE_NODE_ENV,
|
package/dist/port-contract.cjs
CHANGED
|
@@ -20,9 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/port-contract.ts
|
|
21
21
|
var port_contract_exports = {};
|
|
22
22
|
__export(port_contract_exports, {
|
|
23
|
+
SHARED_POOL_KEY: () => SHARED_POOL_KEY,
|
|
23
24
|
parseCtxModel: () => parseCtxModel
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(port_contract_exports);
|
|
27
|
+
var SHARED_POOL_KEY = "shared";
|
|
26
28
|
function parseCtxModel(ref) {
|
|
27
29
|
if (ref === void 0 || ref.trim() === "") return void 0;
|
|
28
30
|
const slash = ref.indexOf("/");
|
|
@@ -31,5 +33,6 @@ function parseCtxModel(ref) {
|
|
|
31
33
|
}
|
|
32
34
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
35
|
0 && (module.exports = {
|
|
36
|
+
SHARED_POOL_KEY,
|
|
34
37
|
parseCtxModel
|
|
35
38
|
});
|