@sema-agent/cli 1.0.77 → 1.0.78
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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/sema-main.js +56 -28
- package/sema.js +1 -1
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sema-agent/cli",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.78",
|
|
10
10
|
"license": "BUSL-1.1",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@sema-agent/sdk": "6.17.2",
|
package/package.json
CHANGED
package/sema-main.js
CHANGED
|
@@ -61798,6 +61798,12 @@ function installSubagentActivitySink(sink2) {
|
|
|
61798
61798
|
activitySink = prev;
|
|
61799
61799
|
};
|
|
61800
61800
|
}
|
|
61801
|
+
function installSubagentTailMetaSink(sink2) {
|
|
61802
|
+
let prev = tailMetaSink;
|
|
61803
|
+
return tailMetaSink = sink2, () => {
|
|
61804
|
+
tailMetaSink = prev;
|
|
61805
|
+
};
|
|
61806
|
+
}
|
|
61801
61807
|
function isEngineSubagentTailActive(taskId) {
|
|
61802
61808
|
return activeTails.has(taskId);
|
|
61803
61809
|
}
|
|
@@ -61833,8 +61839,22 @@ function tailEngineSubagent(taskId) {
|
|
|
61833
61839
|
for await (let ev of stream5) {
|
|
61834
61840
|
if (ac.signal.aborted)
|
|
61835
61841
|
break;
|
|
61836
|
-
|
|
61837
|
-
|
|
61842
|
+
switch (connectLogged || (connectLogged = !0, hostLog("debug", `[subagent-tail] ${taskId} stream connected +${Date.now() - openedAt}ms`)), ev.event) {
|
|
61843
|
+
case "meta":
|
|
61844
|
+
try {
|
|
61845
|
+
let out6 = tailMetaSink?.({ taskId, meta: ev.data });
|
|
61846
|
+
out6 !== null && typeof out6 == "object" && typeof out6.then == "function" && out6.then(void 0, (e) => {
|
|
61847
|
+
hostLog("debug", `[subagent-tail] ${taskId} meta sink rejected: ${String(e).slice(0, 160)}`);
|
|
61848
|
+
});
|
|
61849
|
+
} catch (e) {
|
|
61850
|
+
hostLog("debug", `[subagent-tail] ${taskId} meta sink threw: ${String(e).slice(0, 160)}`);
|
|
61851
|
+
}
|
|
61852
|
+
continue;
|
|
61853
|
+
case "forward":
|
|
61854
|
+
break;
|
|
61855
|
+
default:
|
|
61856
|
+
continue;
|
|
61857
|
+
}
|
|
61838
61858
|
let d4 = ev.data, t2 = d4.type;
|
|
61839
61859
|
if (frames += 1, !firstContentLogged && (t2 === "text_delta" || t2 === "reasoning_delta" || t2 === "tool_start") && (firstContentLogged = !0, hostLog("debug", `[subagent-tail] ${taskId} first content frame +${Date.now() - openedAt}ms (${String(t2)})`)), t2 === "text_delta" || t2 === "reasoning_delta")
|
|
61840
61860
|
typeof d4.delta == "string" && d4.delta.length > 0 && publishSubagentContentEvent({
|
|
@@ -61885,7 +61905,7 @@ function hasActiveSubagentTail(taskId) {
|
|
|
61885
61905
|
function __activeTailCountForTests() {
|
|
61886
61906
|
return activeTails.size;
|
|
61887
61907
|
}
|
|
61888
|
-
var capByBase2, CAP_FALSE_RETRY_TTL_MS2, activeTails, activitySink, init_engineSubagentTail = __esm({
|
|
61908
|
+
var capByBase2, CAP_FALSE_RETRY_TTL_MS2, activeTails, activitySink, tailMetaSink, init_engineSubagentTail = __esm({
|
|
61889
61909
|
"node_modules/@sema-agent/client-core/dist/subagent/engineSubagentTail.js"() {
|
|
61890
61910
|
init_host();
|
|
61891
61911
|
init_engineWireSdk();
|
|
@@ -61894,6 +61914,7 @@ var capByBase2, CAP_FALSE_RETRY_TTL_MS2, activeTails, activitySink, init_engineS
|
|
|
61894
61914
|
init_subagentContentStore();
|
|
61895
61915
|
capByBase2 = /* @__PURE__ */ new Map(), CAP_FALSE_RETRY_TTL_MS2 = 5 * 6e4;
|
|
61896
61916
|
activeTails = /* @__PURE__ */ new Map(), activitySink = null;
|
|
61917
|
+
tailMetaSink = null;
|
|
61897
61918
|
}
|
|
61898
61919
|
});
|
|
61899
61920
|
|
|
@@ -64374,13 +64395,14 @@ async function surfaceFsApprovalAndDecide(deps2, taskId, argsByCall, signal) {
|
|
|
64374
64395
|
let { pending: pending2, gatedCallId } = found, toolName2 = typeof pending2.toolName == "string" ? pending2.toolName : "", args = (gatedCallId !== void 0 ? argsByCall.get(gatedCallId) : void 0) ?? pending2.input ?? {};
|
|
64375
64396
|
if (typeof args != "object" || args === null)
|
|
64376
64397
|
return { kind: "failed", gatedCallId, reason: "gate has no tool input payload" };
|
|
64377
|
-
let bridge3 = new HitlBridge(deps2.client, taskId), callKey = approvalCallKey(gatedCallId, taskId), ruleSuggestionsReadOnly = readRuleSuggestions(pending2.ruleSuggestions), card = await surfaceApprovalCard({
|
|
64398
|
+
let bridge3 = new HitlBridge(deps2.client, taskId), callKey = approvalCallKey(gatedCallId, taskId), ruleSuggestionsReadOnly = readRuleSuggestions(pending2.ruleSuggestions), durableProbeCause = pending2.riskDescriptor?.probeCause, card = await surfaceApprovalCard({
|
|
64378
64399
|
toolName: toolName2,
|
|
64379
64400
|
args,
|
|
64380
64401
|
callKey,
|
|
64381
64402
|
...signal ? { signal } : {},
|
|
64382
64403
|
...pending2.governanceForced === !0 ? { governanceForced: !0 } : {},
|
|
64383
|
-
...ruleSuggestionsReadOnly !== void 0 ? { ruleSuggestionsReadOnly } : {}
|
|
64404
|
+
...ruleSuggestionsReadOnly !== void 0 ? { ruleSuggestionsReadOnly } : {},
|
|
64405
|
+
...isProbeCauseCarrier(durableProbeCause) ? { probeCause: durableProbeCause } : {}
|
|
64384
64406
|
});
|
|
64385
64407
|
switch (card.kind) {
|
|
64386
64408
|
case "failed":
|
|
@@ -64449,6 +64471,9 @@ function pathFromGateMessage(message) {
|
|
|
64449
64471
|
if (typeof message == "string")
|
|
64450
64472
|
return FS_WRITE_GATE_ASK_PATTERN.exec(message)?.[1];
|
|
64451
64473
|
}
|
|
64474
|
+
function isProbeCauseCarrier(v2) {
|
|
64475
|
+
return typeof v2 == "object" && v2 !== null && !Array.isArray(v2);
|
|
64476
|
+
}
|
|
64452
64477
|
function readRuleSuggestions(v2) {
|
|
64453
64478
|
if (!Array.isArray(v2) || v2.length === 0 || v2.length > 8)
|
|
64454
64479
|
return;
|
|
@@ -64501,7 +64526,10 @@ async function surfaceToolApprovalFrameAndRespond(frame, respond, streamArgs, si
|
|
|
64501
64526
|
// (server 明说空串不铸键:「空串是坏值不是『空规则』」)—— 一格空白的规则解释比没有解释更坏。
|
|
64502
64527
|
// 🔴 stamp 的是**原文字节**(不 trim、不截、不改写):展示值一改写就不再是「你那条规则」的原文;
|
|
64503
64528
|
// 渲染面的长度夹取归壳,与 `message`/`sourceAgentName` 同族口径(本模块对展示文本零加工)。
|
|
64504
|
-
...typeof frame.persistedRuleShadowed == "string" && frame.persistedRuleShadowed.trim() !== "" ? { persistedRuleShadowed: frame.persistedRuleShadowed } : {}
|
|
64529
|
+
...typeof frame.persistedRuleShadowed == "string" && frame.persistedRuleShadowed.trim() !== "" ? { persistedRuleShadowed: frame.persistedRuleShadowed } : {},
|
|
64530
|
+
// #280 件1(0.30.4):探针因由随卡透传 —— 载体形判之外零校验零改写(内部结构归呈卡端窄读器,
|
|
64531
|
+
// isProbeCauseCarrier 顶注);缺席/坏载体 ⇒ 键不 stamp,卡形字节不变。
|
|
64532
|
+
...isProbeCauseCarrier(frame.probeCause) ? { probeCause: frame.probeCause } : {}
|
|
64505
64533
|
}), decision = card.kind === "allow" ? card.allowSession ? "allow_session" : "allow" : "deny";
|
|
64506
64534
|
card.kind === "failed" && hostLog("debug", `liveToolApprovalWire: approval card unavailable (${card.reason}) \u2014 fail-closed deny for ${frame.approvalId}`);
|
|
64507
64535
|
let note;
|
|
@@ -64553,6 +64581,11 @@ var cardPortByKey, cardPortMissesByKey, TOOL_APPROVAL_FRAME_KEYS_MIRROR, RESPOND
|
|
|
64553
64581
|
// (sdk 6.14.0/6.15.0 的 TOOL_APPROVAL_FRAME_KEYS 都还没有它)⇒ 对账门里有一条**带退出条件**的
|
|
64554
64582
|
// 领先登记(AHEAD_OF_ANCHOR):SDK 锚一旦补上,那条登记当场红,逼人删登记而不是让豁免长住。
|
|
64555
64583
|
"persistedRuleShadowed",
|
|
64584
|
+
// #280 件1(client-core 0.30.4):server 7.21.0-rc(#253)起真发 `probeCause`(直证 = engine
|
|
64585
|
+
// 7.22.0 fixture 的 `@sema-agent/server/dist/tool-approval.d.ts`)。⚠️ 本键**领先** SDK 运行期锚
|
|
64586
|
+
// 一代(sdk 6.17.2 尚无)⇒ 对账门里有一条带退出条件的领先登记(AHEAD_OF_ANCHOR),SDK 锚一旦
|
|
64587
|
+
// 补上,那条登记当场红,逼人删登记回到逐元素相等 —— #144 persistedRuleShadowed 同形先例。
|
|
64588
|
+
"probeCause",
|
|
64556
64589
|
"delegation",
|
|
64557
64590
|
"outcome"
|
|
64558
64591
|
];
|
|
@@ -67850,6 +67883,7 @@ __export(dist_exports, {
|
|
|
67850
67883
|
installHostFor: () => installHostFor,
|
|
67851
67884
|
installNotificationQueuePort: () => installNotificationQueuePort,
|
|
67852
67885
|
installSubagentActivitySink: () => installSubagentActivitySink,
|
|
67886
|
+
installSubagentTailMetaSink: () => installSubagentTailMetaSink,
|
|
67853
67887
|
installWorkflowStatusProbe: () => installWorkflowStatusProbe,
|
|
67854
67888
|
isAllowedCatalogUrl: () => isAllowedCatalogUrl,
|
|
67855
67889
|
isAlreadyResolvedGateReason: () => isAlreadyResolvedGateReason,
|
|
@@ -109067,7 +109101,7 @@ var import_stack_utils, import_jsx_runtime6, cleanupPath, stackUtils, init_Error
|
|
|
109067
109101
|
// build-src/src/ink/components/TerminalSizeContext.tsx
|
|
109068
109102
|
var import_react9, TerminalSizeContext, init_TerminalSizeContext = __esm({
|
|
109069
109103
|
"build-src/src/ink/components/TerminalSizeContext.tsx"() {
|
|
109070
|
-
import_react9 = __toESM(require_react()), TerminalSizeContext = (0, import_react9.createContext)(null);
|
|
109104
|
+
import_react9 = __toESM(require_react(), 1), TerminalSizeContext = (0, import_react9.createContext)(null);
|
|
109071
109105
|
}
|
|
109072
109106
|
});
|
|
109073
109107
|
|
|
@@ -317012,7 +317046,7 @@ function useClaudeAiLimits() {
|
|
|
317012
317046
|
}
|
|
317013
317047
|
var import_react69, init_claudeAiLimitsHook = __esm({
|
|
317014
317048
|
"build-src/src/services/claudeAiLimitsHook.ts"() {
|
|
317015
|
-
import_react69 = __toESM(require_react());
|
|
317049
|
+
import_react69 = __toESM(require_react(), 1);
|
|
317016
317050
|
init_claudeAiLimits();
|
|
317017
317051
|
}
|
|
317018
317052
|
});
|
|
@@ -400155,18 +400189,15 @@ var sema_brand_default, init_sema_brand = __esm({
|
|
|
400155
400189
|
_doc: "displayName/email \u7559 null = \u8FD0\u884C\u65F6\u56DE\u9000(\u540D\u5B57\u53D6\u672C\u673A OS \u7528\u6237\u540D,\u90AE\u7BB1\u4E0D\u663E\u793A)\u3002\u522B\u70E7\u4E2A\u4EBA\u4FE1\u606F\u8FDB\u54C1\u724C\u6587\u4EF6(F-S1-1:\u65B0\u7528\u6237\u66FE\u770B\u5230 Welcome back Clay!)\u3002"
|
|
400156
400190
|
},
|
|
400157
400191
|
whatsNew: {
|
|
400158
|
-
version: "1.0.
|
|
400192
|
+
version: "1.0.78",
|
|
400159
400193
|
notes: [
|
|
400160
|
-
"
|
|
400161
|
-
"
|
|
400162
|
-
"
|
|
400163
|
-
"The engine-fence suite gained a full 7.22.0 lane (41 live checks) and the 7.18 fence re-run stays green on the new engine, so wire regressions in approvals, session reads, and SSE cleanup surface before a release rather than after",
|
|
400164
|
-
"Two upstream default flips are now pinned by tests so they cannot silently drift: shell-history files are readable by built-in tools (deny still available via explicit configuration), and a throwing activity listener no longer fails the whole leg",
|
|
400165
|
-
"client-core 0.30.3: principal handling gained a single normalization primitive (an all-whitespace principal now means absent \u2014 no more blank identity headers), turn-error classification and session-id mapping moved to shared single sources, and approval-card rule suggestions share one persistence verdict across surfaces"
|
|
400194
|
+
"Approval cards now actually show the reversibility-probe note promised in 1.0.77: client-core 0.30.4 forwards the probe cause on both the live approval frame and the durable parked row, so the one-line 'reversibility probe: \u2026 \u2014 roots: \u2026' explanation reaches the card in the default interactive path (this closes the gap where 1.0.77 advertised the note but the wire dropped it in transit)",
|
|
400195
|
+
"The subagent tail stream now publishes engine meta frames to the shell, so content-frame availability is knowable per subagent (groundwork; the viewing-pane hint that consumes it ships separately)",
|
|
400196
|
+
"No engine change: still 7.22.0"
|
|
400166
400197
|
]
|
|
400167
400198
|
},
|
|
400168
|
-
productVersion: "1.0.
|
|
400169
|
-
announcement: "sema 1.0.
|
|
400199
|
+
productVersion: "1.0.78",
|
|
400200
|
+
announcement: "sema 1.0.78 \u2014 Fix release: the reversibility-probe note on approval cards (advertised in 1.0.77) now actually renders \u2014 client-core 0.30.4 forwards the probe cause across both the live frame and durable parked rows, closing the transit gap a black-box audit caught. Subagent tail streams now surface engine meta frames as groundwork for per-agent content-frame hints. Engine unchanged at 7.22.0."
|
|
400170
400201
|
};
|
|
400171
400202
|
}
|
|
400172
400203
|
});
|
|
@@ -404369,18 +404400,15 @@ var require_sema_brand = __commonJS({
|
|
|
404369
404400
|
_doc: "displayName/email \u7559 null = \u8FD0\u884C\u65F6\u56DE\u9000(\u540D\u5B57\u53D6\u672C\u673A OS \u7528\u6237\u540D,\u90AE\u7BB1\u4E0D\u663E\u793A)\u3002\u522B\u70E7\u4E2A\u4EBA\u4FE1\u606F\u8FDB\u54C1\u724C\u6587\u4EF6(F-S1-1:\u65B0\u7528\u6237\u66FE\u770B\u5230 Welcome back Clay!)\u3002"
|
|
404370
404401
|
},
|
|
404371
404402
|
whatsNew: {
|
|
404372
|
-
version: "1.0.
|
|
404403
|
+
version: "1.0.78",
|
|
404373
404404
|
notes: [
|
|
404374
|
-
"
|
|
404375
|
-
"
|
|
404376
|
-
"
|
|
404377
|
-
"The engine-fence suite gained a full 7.22.0 lane (41 live checks) and the 7.18 fence re-run stays green on the new engine, so wire regressions in approvals, session reads, and SSE cleanup surface before a release rather than after",
|
|
404378
|
-
"Two upstream default flips are now pinned by tests so they cannot silently drift: shell-history files are readable by built-in tools (deny still available via explicit configuration), and a throwing activity listener no longer fails the whole leg",
|
|
404379
|
-
"client-core 0.30.3: principal handling gained a single normalization primitive (an all-whitespace principal now means absent \u2014 no more blank identity headers), turn-error classification and session-id mapping moved to shared single sources, and approval-card rule suggestions share one persistence verdict across surfaces"
|
|
404405
|
+
"Approval cards now actually show the reversibility-probe note promised in 1.0.77: client-core 0.30.4 forwards the probe cause on both the live approval frame and the durable parked row, so the one-line 'reversibility probe: \u2026 \u2014 roots: \u2026' explanation reaches the card in the default interactive path (this closes the gap where 1.0.77 advertised the note but the wire dropped it in transit)",
|
|
404406
|
+
"The subagent tail stream now publishes engine meta frames to the shell, so content-frame availability is knowable per subagent (groundwork; the viewing-pane hint that consumes it ships separately)",
|
|
404407
|
+
"No engine change: still 7.22.0"
|
|
404380
404408
|
]
|
|
404381
404409
|
},
|
|
404382
|
-
productVersion: "1.0.
|
|
404383
|
-
announcement: "sema 1.0.
|
|
404410
|
+
productVersion: "1.0.78",
|
|
404411
|
+
announcement: "sema 1.0.78 \u2014 Fix release: the reversibility-probe note on approval cards (advertised in 1.0.77) now actually renders \u2014 client-core 0.30.4 forwards the probe cause across both the live frame and durable parked rows, closing the transit gap a black-box audit caught. Subagent tail streams now surface engine meta frames as groundwork for per-agent content-frame hints. Engine unchanged at 7.22.0."
|
|
404384
404412
|
};
|
|
404385
404413
|
}
|
|
404386
404414
|
});
|
|
@@ -476908,7 +476936,7 @@ var import_jsx_runtime414, init_chrome_context_window_warning = __esm({
|
|
|
476908
476936
|
init_autoCompact();
|
|
476909
476937
|
init_compactWarningHook();
|
|
476910
476938
|
init_contextWindowUpgradeCheck();
|
|
476911
|
-
import_jsx_runtime414 = __toESM(require_jsx_runtime()
|
|
476939
|
+
import_jsx_runtime414 = __toESM(require_jsx_runtime());
|
|
476912
476940
|
}
|
|
476913
476941
|
});
|
|
476914
476942
|
|
|
@@ -529519,7 +529547,7 @@ Usage: sema --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
529519
529547
|
pendingHookMessages
|
|
529520
529548
|
}, renderAndRun);
|
|
529521
529549
|
}
|
|
529522
|
-
}).version("sema 1.0.
|
|
529550
|
+
}).version("sema 1.0.78", "-v, --version", "Output the version number"), program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)"), program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux."), canUserConfigureAdvisor() && program2.addOption(new Option("--advisor <model>", "Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp()), program2.addOption(new Option("--bg, --background", "Start the session as a background agent and return immediately (manage with `sema agents`)")), program2.command("ps").description("List background sessions").action(async () => {
|
|
529523
529551
|
await (await Promise.resolve().then(() => (init_bg2(), bg_exports))).psHandler([]), process.exit(process.exitCode ?? 0);
|
|
529524
529552
|
}), program2.command("logs [id]").description("Print a background session's recent terminal output").action(async (id) => {
|
|
529525
529553
|
await (await Promise.resolve().then(() => (init_bg2(), bg_exports))).logsHandler(id, []), process.exit(process.exitCode ?? 0);
|
package/sema.js
CHANGED
|
@@ -71,7 +71,7 @@ function installBootSignalTailFrame(argv2 = process.argv.slice(2)) {
|
|
|
71
71
|
installBootSignalTailFrame();
|
|
72
72
|
|
|
73
73
|
// build-src/src/sema/preludeEntry.ts
|
|
74
|
-
var versionLine = "sema 1.0.
|
|
74
|
+
var versionLine = "sema 1.0.78" ? "sema 1.0.78" : "";
|
|
75
75
|
var argv = process.argv.slice(2);
|
|
76
76
|
var wantsVersionFastPath = argv.length === 1 && (argv[0] === "--version" || argv[0] === "-v");
|
|
77
77
|
if (wantsVersionFastPath && versionLine) {
|