@sema-agent/cli 1.0.101 → 1.0.102

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/sema-main.js CHANGED
@@ -47339,7 +47339,7 @@ var CHROME_ARM_TABLE, CHROME_ARMS, init_seam = __esm({
47339
47339
  },
47340
47340
  wiring_manifest: {
47341
47341
  required: !1,
47342
- duty: "\u53EF\u9009:\u6E32\u5F15\u64CE\u63A5\u7EBF\u81EA\u8FF0\u91CC\u7684\u4E24\u6BB5\u7528\u6237\u9762\u4E8B\u5B9E(modelGate = \u672C run \u88AB\u6A21\u578B\u95E8\u5378\u6389\u7684\u5DE5\u5177 + \u9010\u5B57\u6062\u590D\u529E\u6CD5;autoMode = \u6B66\u88C5\u4F4D + core \u516D\u8BCD\u539F\u56E0)\u3002\u{1F534} \u4E24\u6BB5\u7F3A\u5E2D\u4E00\u5F8B\u4E0D\u6E32\u80AF\u5B9A\u53E5;reason \u7EDD\u4E0D\u6620\u5C04 capabilities \u516D\u8BCD;restore \u539F\u6837\u5448\u73B0;durable \u91CD\u653E\u6309 run/leg \u5E42\u7B49"
47342
+ duty: "\u53EF\u9009:\u6E32\u5F15\u64CE\u63A5\u7EBF\u81EA\u8FF0\u91CC\u7684\u4E09\u6BB5\u7528\u6237\u9762\u4E8B\u5B9E(modelGate = \u672C run \u88AB\u6A21\u578B\u95E8\u5378\u6389\u7684\u5DE5\u5177 + \u9010\u5B57\u6062\u590D\u529E\u6CD5;autoMode = \u6B66\u88C5\u4F4D + core \u516D\u8BCD\u539F\u56E0;mcp[] = \u672C\u817F\u7533\u62A5\u7684\u6BCF\u53F0 MCP \u670D\u52A1\u5668\u7684\u8FDE\u63A5\u65F6\u5FEB\u7167)\u3002\u{1F534} \u4E09\u6BB5\u7F3A\u5E2D\u4E00\u5F8B\u4E0D\u6E32\u80AF\u5B9A\u53E5;reason \u7EDD\u4E0D\u6620\u5C04 capabilities \u516D\u8BCD;restore \u539F\u6837\u5448\u73B0;mcp \u7684\u7A7A\u6570\u7EC4\u662F\u300C\u4E00\u53F0\u90FD\u6CA1\u7533\u62A5\u300D\u8FD9\u53E5\u6B63\u9762\u4E8B\u5B9E\u3001**\u4E0D\u662F**\u7F3A\u5E2D(\u5224\u5728\u573A\u5199 mcp !== undefined,\u522B\u5199 mcp?.length),errorCode \u6309\u5F00\u96C6\u5206\u652F\u5FC5\u5E26 default;durable \u91CD\u653E\u6309 run/leg \u5E42\u7B49"
47343
47343
  },
47344
47344
  text_segment_end: {
47345
47345
  required: !1,
@@ -50461,12 +50461,13 @@ var assistantArm, userArm, systemArm, diagnosticsArm, steeringInjectedArm, works
50461
50461
  }, wiringManifestArm = function* (m2) {
50462
50462
  if (m2.parentToolCallId !== void 0)
50463
50463
  return;
50464
- let modelGate = m2._sema_modelGate, autoMode = m2._sema_autoMode, hasGate = typeof modelGate == "object" && modelGate !== null, hasAuto = typeof autoMode == "object" && autoMode !== null;
50465
- !hasGate && !hasAuto || (yield chrome({
50464
+ let modelGate = m2._sema_modelGate, autoMode = m2._sema_autoMode, mcp2 = m2._sema_mcp, hasGate = typeof modelGate == "object" && modelGate !== null, hasAuto = typeof autoMode == "object" && autoMode !== null, hasMcp = Array.isArray(mcp2);
50465
+ !hasGate && !hasAuto && !hasMcp || (yield chrome({
50466
50466
  kind: "wiring_manifest",
50467
50467
  laneProof: MAIN,
50468
50468
  ...hasGate ? { modelGate } : {},
50469
50469
  ...hasAuto ? { autoMode } : {},
50470
+ ...hasMcp ? { mcp: mcp2 } : {},
50470
50471
  ...typeof m2.eventId == "string" && m2.eventId.length > 0 ? { eventId: m2.eventId } : {}
50471
50472
  }));
50472
50473
  }, textSegmentEndArm = function* (m2) {
@@ -51595,6 +51596,17 @@ function engineCapNestedTrue(baseUrl, parentKey, key) {
51595
51596
  let parent2 = capsByBase.get(baseUrl)?.[parentKey];
51596
51597
  return parent2 === null || typeof parent2 != "object" ? !1 : parent2[key] === !0;
51597
51598
  }
51599
+ function engineCapValue(baseUrl, key) {
51600
+ if (!baseUrl)
51601
+ return { kind: "unobserved" };
51602
+ let caps = capsByBase.get(baseUrl);
51603
+ if (caps === void 0)
51604
+ return { kind: "unobserved" };
51605
+ if (!(key in caps))
51606
+ return { kind: "not_reported" };
51607
+ let v2 = caps[key];
51608
+ return v2 === void 0 ? { kind: "not_reported" } : v2 === null ? { kind: "null" } : { kind: "value", value: v2 };
51609
+ }
51598
51610
  function engineCapString(baseUrl, key) {
51599
51611
  if (!baseUrl)
51600
51612
  return;
@@ -51615,6 +51627,123 @@ var capsByBase, inFlight, settleByBase, genByBase, init_engineCapsCache = __esm(
51615
51627
  }
51616
51628
  });
51617
51629
 
51630
+ // node_modules/@sema-agent/client-core/dist/principalWire.js
51631
+ function normalizeWirePrincipal(v2) {
51632
+ return v2 !== void 0 && v2.trim() !== "" ? v2 : void 0;
51633
+ }
51634
+ var init_principalWire = __esm({
51635
+ "node_modules/@sema-agent/client-core/dist/principalWire.js"() {
51636
+ }
51637
+ });
51638
+
51639
+ // node_modules/@sema-agent/client-core/dist/engineWireTarget.js
51640
+ function installEngineWireTarget(t2) {
51641
+ return installEngineWireTargetFor(DEFAULT_SESSION_KEY, t2);
51642
+ }
51643
+ function installEngineWireTargetFor(sessionKey, t2) {
51644
+ let prev = installedByKey.get(sessionKey);
51645
+ return installedByKey.set(sessionKey, t2), () => {
51646
+ installedByKey.set(sessionKey, prev);
51647
+ };
51648
+ }
51649
+ function engineWireTarget() {
51650
+ return engineWireTargetFor(DEFAULT_SESSION_KEY);
51651
+ }
51652
+ function engineWireTargetFor(sessionKey) {
51653
+ let installed6 = installedByKey.get(sessionKey) ?? null;
51654
+ if (installed6 !== null) {
51655
+ if (normalizeWirePrincipal(installed6.principal) === installed6.principal)
51656
+ return installed6;
51657
+ let { principal: _dropped, ...rest } = installed6;
51658
+ return rest;
51659
+ }
51660
+ let env6 = hostEnv(), baseUrl = env6.SEMA_LIVE_BASEURL;
51661
+ if (!baseUrl)
51662
+ return null;
51663
+ let envPrincipal = normalizeWirePrincipal(env6.SEMA_LIVE_PRINCIPAL);
51664
+ return {
51665
+ baseUrl,
51666
+ ...env6.SEMA_LIVE_TOKEN ? { token: env6.SEMA_LIVE_TOKEN } : {},
51667
+ ...envPrincipal !== void 0 ? { principal: envPrincipal } : {}
51668
+ };
51669
+ }
51670
+ function engineWireDebugEnabled() {
51671
+ return !!hostEnv().SEMA_DEBUG;
51672
+ }
51673
+ var installedByKey, init_engineWireTarget = __esm({
51674
+ "node_modules/@sema-agent/client-core/dist/engineWireTarget.js"() {
51675
+ init_hostEnv();
51676
+ init_sessionSlot();
51677
+ init_principalWire();
51678
+ installedByKey = createSessionSlot();
51679
+ }
51680
+ });
51681
+
51682
+ // node_modules/@sema-agent/client-core/dist/sqlEngineCapability.js
51683
+ function projectSqlEngineCapability(caps) {
51684
+ if (caps === null || typeof caps != "object")
51685
+ return;
51686
+ if (!("sql" in caps))
51687
+ return { kind: "not_reported" };
51688
+ let sql = caps.sql;
51689
+ if (sql === null)
51690
+ return { kind: "none" };
51691
+ if (sql === void 0)
51692
+ return { kind: "not_reported" };
51693
+ if (typeof sql != "object")
51694
+ return;
51695
+ let s = sql;
51696
+ if (!(typeof s.engine != "string" || s.engine === "") && !(typeof s.isolation != "string" || s.isolation === "") && !(s.txnMode !== null && (typeof s.txnMode != "string" || s.txnMode === "")))
51697
+ return { kind: "present", view: { engine: s.engine, isolation: s.isolation, txnMode: s.txnMode } };
51698
+ }
51699
+ function noteEngineCapsForSqlEngine(baseUrl, caps) {
51700
+ try {
51701
+ if (typeof baseUrl != "string" || baseUrl === "")
51702
+ return;
51703
+ let reading = projectSqlEngineCapability(caps);
51704
+ if (reading === void 0) {
51705
+ readingByBase.delete(baseUrl);
51706
+ return;
51707
+ }
51708
+ readingByBase.set(baseUrl, reading);
51709
+ } catch {
51710
+ }
51711
+ }
51712
+ function observedSqlEngine(baseUrl = engineWireTarget()?.baseUrl) {
51713
+ return typeof baseUrl != "string" || baseUrl === "" ? { kind: "unobserved" } : readingByBase.get(baseUrl) ?? { kind: "unobserved" };
51714
+ }
51715
+ function cleanSqlDetailScalar(v2) {
51716
+ return escapeDisplayControlChars(v2.slice(0, SQL_DETAIL_MAX));
51717
+ }
51718
+ function sqlEngineDoctorDetail(reading) {
51719
+ switch (reading.kind) {
51720
+ case "unobserved":
51721
+ return "not observed \u2014 the engine reports it on /v1/capabilities; this process has not received a capabilities response from the engine yet";
51722
+ case "not_reported":
51723
+ return "not reported by this engine \u2014 the capability position needs a newer engine";
51724
+ case "none":
51725
+ return "none \u2014 the engine reports no SQL engine posture: either this deployment has no SQL backend, or its initialization was refused (the engine log says which)";
51726
+ case "present": {
51727
+ let e = cleanSqlDetailScalar(reading.view.engine), i = cleanSqlDetailScalar(reading.view.isolation), t2 = reading.view.txnMode === null ? "no txn-mode indicator on this engine" : cleanSqlDetailScalar(reading.view.txnMode);
51728
+ return `${e} \xB7 isolation ${i} \xB7 txn ${t2}`;
51729
+ }
51730
+ }
51731
+ }
51732
+ function forgetSqlEngineReading(baseUrl) {
51733
+ typeof baseUrl != "string" || baseUrl === "" || readingByBase.delete(baseUrl);
51734
+ }
51735
+ function __resetSqlEngineReadingsForTests() {
51736
+ readingByBase.clear();
51737
+ }
51738
+ var readingByBase, SQL_DETAIL_MAX, init_sqlEngineCapability = __esm({
51739
+ "node_modules/@sema-agent/client-core/dist/sqlEngineCapability.js"() {
51740
+ init_fleetTaskDesc();
51741
+ init_engineWireTarget();
51742
+ readingByBase = /* @__PURE__ */ new Map();
51743
+ SQL_DETAIL_MAX = 40;
51744
+ }
51745
+ });
51746
+
51618
51747
  // node_modules/@sema-agent/client-core/dist/adapter/types.js
51619
51748
  function eventSeq(ev) {
51620
51749
  return ev.id;
@@ -51883,15 +52012,6 @@ var SSE_HEARTBEAT_GRACE_ENV, SSE_GRACE_MIN_MS, SSE_GRACE_MAX_MS, SDK_DEFAULT_GRA
51883
52012
  }
51884
52013
  });
51885
52014
 
51886
- // node_modules/@sema-agent/client-core/dist/principalWire.js
51887
- function normalizeWirePrincipal(v2) {
51888
- return v2 !== void 0 && v2.trim() !== "" ? v2 : void 0;
51889
- }
51890
- var init_principalWire = __esm({
51891
- "node_modules/@sema-agent/client-core/dist/principalWire.js"() {
51892
- }
51893
- });
51894
-
51895
52015
  // node_modules/@sema-agent/client-core/dist/engineWireSdk.js
51896
52016
  import { AgentClient } from "@sema-agent/sdk";
51897
52017
  function isLoopbackWireUrl(url3) {
@@ -53106,7 +53226,7 @@ function eventToSdkMessage(ev, ctx) {
53106
53226
  // falls back to the mock synthesizer (events.d.ts:79). Not a renderable CC SDKMessage —
53107
53227
  // a side-channel arm `sdkMessagesToCcEvents` reads; CC's own renderer never sees it.
53108
53228
  case "tool_end": {
53109
- let structured = ev.structured, toolEndErrorCode = ev.errorCode, toolEndSettledBy = ev.settledBy, toolEndApprover = ev.approver, toolEndResolution = ev.resolution, collateralAbort = ev._sema_collateral_abort;
53229
+ let structured = ev.structured, toolEndErrorCode = ev.errorCode, toolEndSettledBy = ev.settledBy, toolEndApprover = ev.approver, toolEndResolution = ev.resolution, toolEndAutoDenied = ev.autoDenied, collateralAbort = ev._sema_collateral_abort;
53110
53230
  return projected(stamp(ctx, {
53111
53231
  type: "tool_end_result",
53112
53232
  toolCallId: ev.toolCallId,
@@ -53125,6 +53245,8 @@ function eventToSdkMessage(ev, ctx) {
53125
53245
  ...typeof toolEndApprover == "string" && toolEndApprover.length > 0 ? { approver: toolEndApprover } : {},
53126
53246
  // A-D2:拒绝臂分类(开集、缺席不铸、在场原样;判据本体是上方那段头注)。
53127
53247
  ...typeof toolEndResolution == "string" && toolEndResolution.length > 0 ? { resolution: toolEndResolution } : {},
53248
+ // S-125⑧:自动拒判别位(**严格 true** 才上臂;见上方头注)。
53249
+ ...toolEndAutoDenied === !0 ? { autoDenied: !0 } : {},
53128
53250
  // #324:连坐 abort 机读位(严格 true 才上臂;见上方头注)。
53129
53251
  ...collateralAbort === !0 ? { _sema_collateral_abort: !0 } : {},
53130
53252
  ...ev.eventId !== void 0 ? { eventId: ev.eventId } : {},
@@ -53475,6 +53597,25 @@ function textEndProjection(ev, ctx) {
53475
53597
  ...typeof ev.parentToolCallId == "string" ? { parentToolCallId: ev.parentToolCallId } : {}
53476
53598
  }));
53477
53599
  }
53600
+ function projectMcpSection(raw2) {
53601
+ if (!Array.isArray(raw2))
53602
+ return;
53603
+ let rows2 = [];
53604
+ for (let e of raw2) {
53605
+ if (typeof e != "object" || e === null || Array.isArray(e))
53606
+ continue;
53607
+ let r = e, name = typeof r.name == "string" && r.name.length > 0 ? r.name : void 0, status3 = typeof r.status == "string" && r.status.length > 0 ? r.status : void 0;
53608
+ name === void 0 || status3 === void 0 || rows2.push({
53609
+ name,
53610
+ status: status3,
53611
+ ...typeof r.source == "string" && r.source.length > 0 ? { source: r.source } : {},
53612
+ ...typeof r.errorCode == "string" && r.errorCode.length > 0 ? { errorCode: r.errorCode } : {},
53613
+ ...typeof r.toolCount == "number" && Number.isFinite(r.toolCount) ? { toolCount: r.toolCount } : {}
53614
+ });
53615
+ }
53616
+ if (!(raw2.length > 0 && rows2.length === 0))
53617
+ return rows2;
53618
+ }
53478
53619
  function projectModelGateSection(raw2) {
53479
53620
  if (typeof raw2 != "object" || raw2 === null || Array.isArray(raw2))
53480
53621
  return;
@@ -53490,11 +53631,12 @@ function projectAutoModeSection(raw2) {
53490
53631
  return { armed: armed3, reason };
53491
53632
  }
53492
53633
  function wiringManifestSupersetBody(ev) {
53493
- let modelGate = projectModelGateSection(ev.modelGate), autoMode = projectAutoModeSection(ev.autoMode);
53494
- if (!(modelGate === void 0 && autoMode === void 0))
53634
+ let modelGate = projectModelGateSection(ev.modelGate), autoMode = projectAutoModeSection(ev.autoMode), mcp2 = projectMcpSection(ev.mcp);
53635
+ if (!(modelGate === void 0 && autoMode === void 0 && mcp2 === void 0))
53495
53636
  return {
53496
53637
  ...modelGate !== void 0 ? { _sema_modelGate: modelGate } : {},
53497
- ...autoMode !== void 0 ? { _sema_autoMode: autoMode } : {}
53638
+ ...autoMode !== void 0 ? { _sema_autoMode: autoMode } : {},
53639
+ ...mcp2 !== void 0 ? { _sema_mcp: mcp2 } : {}
53498
53640
  };
53499
53641
  }
53500
53642
  function engineNoticeProjection(ev, ctx) {
@@ -55373,49 +55515,6 @@ var HEADLESS_RECONNECT_MAX, RUN_ROW_TERMINAL_STATUSES, init_headlessReconnectWir
55373
55515
  }
55374
55516
  });
55375
55517
 
55376
- // node_modules/@sema-agent/client-core/dist/engineWireTarget.js
55377
- function installEngineWireTarget(t2) {
55378
- return installEngineWireTargetFor(DEFAULT_SESSION_KEY, t2);
55379
- }
55380
- function installEngineWireTargetFor(sessionKey, t2) {
55381
- let prev = installedByKey.get(sessionKey);
55382
- return installedByKey.set(sessionKey, t2), () => {
55383
- installedByKey.set(sessionKey, prev);
55384
- };
55385
- }
55386
- function engineWireTarget() {
55387
- return engineWireTargetFor(DEFAULT_SESSION_KEY);
55388
- }
55389
- function engineWireTargetFor(sessionKey) {
55390
- let installed6 = installedByKey.get(sessionKey) ?? null;
55391
- if (installed6 !== null) {
55392
- if (normalizeWirePrincipal(installed6.principal) === installed6.principal)
55393
- return installed6;
55394
- let { principal: _dropped, ...rest } = installed6;
55395
- return rest;
55396
- }
55397
- let env6 = hostEnv(), baseUrl = env6.SEMA_LIVE_BASEURL;
55398
- if (!baseUrl)
55399
- return null;
55400
- let envPrincipal = normalizeWirePrincipal(env6.SEMA_LIVE_PRINCIPAL);
55401
- return {
55402
- baseUrl,
55403
- ...env6.SEMA_LIVE_TOKEN ? { token: env6.SEMA_LIVE_TOKEN } : {},
55404
- ...envPrincipal !== void 0 ? { principal: envPrincipal } : {}
55405
- };
55406
- }
55407
- function engineWireDebugEnabled() {
55408
- return !!hostEnv().SEMA_DEBUG;
55409
- }
55410
- var installedByKey, init_engineWireTarget = __esm({
55411
- "node_modules/@sema-agent/client-core/dist/engineWireTarget.js"() {
55412
- init_hostEnv();
55413
- init_sessionSlot();
55414
- init_principalWire();
55415
- installedByKey = createSessionSlot();
55416
- }
55417
- });
55418
-
55419
55518
  // node_modules/@sema-agent/client-core/dist/engineSessionParam.js
55420
55519
  function engineSessionParamFor(sessionKey) {
55421
55520
  let sid = hostSessionFor(sessionKey)?.currentSessionId();
@@ -59470,7 +59569,7 @@ var HITL_ASK_QUESTION_ID_PREFIX, PLAN_REVIEW_QUESTION_ID_PREFIX, HITL_FRAME_CALL
59470
59569
  });
59471
59570
 
59472
59571
  // node_modules/@sema-agent/client-core/dist/hitl/toolApprovalWire.js
59473
- import { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS } from "@sema-agent/sdk";
59572
+ import { RULE_OFFER_MATCHES, RULE_OFFER_BATCH_MEMBER_KINDS, RULE_OFFER_UNCOVERED_REASONS, RULE_OFFERS_ABSENCE_REASONS, DENIAL_LIMIT_KINDS } from "@sema-agent/sdk";
59474
59573
  function isFsApprovalGate(gate) {
59475
59574
  return gate ? gate.kind === "tool_approval" ? !0 : typeof gate.toolName == "string" && toolNameIsFsWrite(gate.toolName) : !1;
59476
59575
  }
@@ -59735,6 +59834,18 @@ function isNonNegativeFinite(v2) {
59735
59834
  function isWireRecordCarrier(v2) {
59736
59835
  return typeof v2 == "object" && v2 !== null && !Array.isArray(v2);
59737
59836
  }
59837
+ function readDenialLimitFallback(v2) {
59838
+ if (!isWireRecordCarrier(v2))
59839
+ return;
59840
+ let d4 = v2;
59841
+ if (isNonNegativeFinite(d4.consecutive) && isNonNegativeFinite(d4.total) && isNonNegativeFinite(d4.autoDenyAfterMs) && !(typeof d4.limit != "string" || d4.limit === ""))
59842
+ return {
59843
+ consecutive: d4.consecutive,
59844
+ total: d4.total,
59845
+ limit: d4.limit,
59846
+ autoDenyAfterMs: d4.autoDenyAfterMs
59847
+ };
59848
+ }
59738
59849
  function isRuleOfferMatch(v2) {
59739
59850
  return typeof v2 == "string" && RULE_OFFER_MATCHES.includes(v2);
59740
59851
  }
@@ -59853,7 +59964,7 @@ async function surfaceToolApprovalFrameAndRespond(frame, respond, streamArgs, si
59853
59964
  let p = pathFromGateMessage(frame.message);
59854
59965
  args = p !== void 0 ? { file_path: p } : {};
59855
59966
  }
59856
- let ruleOffers = readRuleOfferSupply(frame.ruleOffers, frame.ruleSuggestions), card = await surfaceApprovalCard({
59967
+ let ruleOffers = readRuleOfferSupply(frame.ruleOffers, frame.ruleSuggestions), denialLimitFallback = readDenialLimitFallback(frame.denialLimitFallback), card = await surfaceApprovalCard({
59857
59968
  toolName: toolName2,
59858
59969
  args,
59859
59970
  // A-028.3:live 帧腿的卡身份键经 gateIdentity 唯一铸口(帧上无 gatedCallId,以 approvalId 铸)。
@@ -59914,7 +60025,22 @@ async function surfaceToolApprovalFrameAndRespond(frame, respond, streamArgs, si
59914
60025
  // requiresRealApproval 同一条纪律 —— 缺席同时覆盖「真的没有」与「扫不了」,折成显式 false 会把
59915
60026
  // 「没扫到」渲成「已确认干净」,而这一位存在的全部理由就是「人眼读到的顺序 ≠ 真跑的字节顺序」。
59916
60027
  // 🔴 披露不清洗:args 字节在本层一个都不改(清洗会让卡上显示的与真跑的不是同一个东西)。
59917
- ...frame.inputHasBidi === !0 ? { inputHasBidi: !0 } : {}
60028
+ ...frame.inputHasBidi === !0 ? { inputHasBidi: !0 } : {},
60029
+ // ── S-15 第五单(0.59.0):报价缺席因由透传 ────────────────────────────────────────────────
60030
+ // **非空串才 stamp**,词表**不校**(开集;server 已按闭集拒过词表外的值,包再校一遍只会在
60031
+ // core 加员当天把合法值判没 —— `autoMode.reason` 的透传纪律逐字同规)。缺席/坏形 ⇒ 键不 stamp。
60032
+ // 🔴 与 `ruleOffers` 引擎侧互斥,但本层**不据此互删**:两者同时在场是上游坏形,原样上卡让端
60033
+ // 看得见,包替上游把矛盾湮灭掉只会让排障说不清是谁窄没的。
60034
+ ...typeof frame.ruleOffersAbsence == "string" && frame.ruleOffersAbsence !== "" ? { ruleOffersAbsence: frame.ruleOffersAbsence } : {},
60035
+ // ── S-114(0.59.0):auto 分类器限额回落卡透传 ──────────────────────────────────────────────
60036
+ // 经 `readDenialLimitFallback` 四成员窄读(缺一整只丢;判据本体在该函数顶注)。
60037
+ // 🔴 stamp 的是**窄读产物**而不是原对象:端拿到的四座恒是有限非负数 + 非空 limit 串,
60038
+ // 不必各自再写一遍同样的判断(三端各写一遍 = 三份会漂的判官)。
60039
+ ...denialLimitFallback !== void 0 ? { denialLimitFallback } : {},
60040
+ // ── S-125③/#564(0.59.0):ask 出身透传 ────────────────────────────────────────────────────
60041
+ // 非空串才 stamp,词表**不校**(同 ruleOffersAbsence)。🔴 缺席 ⇒ 键不 stamp,**绝不折成
60042
+ // `"policy"`**:那是一个正面事实(出自部署 ToolPolicy),把「老引擎没报」折进去 = 替引擎编话。
60043
+ ...typeof frame.origin == "string" && frame.origin !== "" ? { origin: frame.origin } : {}
59918
60044
  }), decision = card.kind === "allow" ? card.allowSession ? "allow_session" : "allow" : "deny";
59919
60045
  card.kind === "failed" && hostLog("debug", `liveToolApprovalWire: approval card unavailable (${card.reason}) \u2014 fail-closed deny for ${frame.approvalId}`);
59920
60046
  let note;
@@ -59989,6 +60115,19 @@ var cardPortByKey, cardPortMissesByKey, TOOL_APPROVAL_FRAME_KEYS_MIRROR, RESPOND
59989
60115
  // 直证,同文件旧键 0 命中)。✅ **sdk 8.2.0 锚已含本键**(S-134 锚②)⇒ 0.58.0 提货批按退出
59990
60116
  // 条件删掉了对账门里那条 AHEAD_OF_ANCHOR 领先登记,本键回到「逐元素相等」的常态。
59991
60117
  "ruleOffers",
60118
+ // S-15 第五单(client-core 0.59.0):server 7.55.0 起真发 `ruleOffersAbsence`(core #490 修②;
60119
+ // engine 7.60.0 fixture 直证)。⚠️ 与 `ruleOffers` **同形不同命**:它是**追平**不是领先 ——
60120
+ // sdk 8.3.0 的运行期锚已含本键(node 直读 27 项实证)⇒ **不**进 AHEAD_OF_ANCHOR
60121
+ // (往那张表里塞一个锚已有的键,它的第二条退出条件当场红)。
60122
+ "ruleOffersAbsence",
60123
+ // S-114(client-core 0.59.0):server 7.57.0 起真发 `denialLimitFallback`(core 7.4.0 #548;
60124
+ // engine 7.60.0 fixture 直证)。同上一条:sdk 8.3.0 锚已含本键 ⇒ 追平,不进领先表。
60125
+ // 🔴 本键与 `requiresRealApproval` 是孪生键,但两者在镜像里各占一格 —— 合并会让「只有一位在场」
60126
+ // 的坏形无处显形。
60127
+ "denialLimitFallback",
60128
+ // S-125③/#564(client-core 0.59.0):server 7.57.0 起真发 `origin`(core 7.5.0 `ASK_ORIGINS`
60129
+ // 八词;engine 7.60.0 fixture 直证)。同上:sdk 8.3.0 锚已含本键 ⇒ 追平,不进领先表。
60130
+ "origin",
59992
60131
  // #341/[5214]③(client-core 0.43.0):server 7.46.0 起真发 `inputHasBidi`(E-14 Trojan Source 族;
59993
60132
  // 7.44 fixture 同文件 0 命中)。仍**领先** sdk 8.2.0 锚(node 直读 18 项无本键)⇒ AHEAD_OF_ANCHOR 登记。
59994
60133
  "inputHasBidi",
@@ -61157,13 +61296,18 @@ async function waitForParkRowBirth(deps2) {
61157
61296
  } catch {
61158
61297
  }
61159
61298
  }
61160
- };
61299
+ }, lastProbeMs = 0;
61161
61300
  for (; ; ) {
61162
61301
  if (aborted2())
61163
61302
  return { kind: "aborted", waitedMs: now2() - startedAt, probes };
61303
+ {
61304
+ let remainingBeforeProbe = budgetMs - (now2() - startedAt);
61305
+ if (budgetMs > 0 && probes > 0 && lastProbeMs > 0 && remainingBeforeProbe < lastProbeMs)
61306
+ return { kind: "unborn", reason: lastReason, waitedMs: now2() - startedAt, probes };
61307
+ }
61164
61308
  probes += 1;
61165
- let outcome = await probeWithinRemaining(probes, budgetMs - (now2() - startedAt));
61166
- if (outcome === "aborted" || aborted2())
61309
+ let probeStartedAt = now2(), outcome = await probeWithinRemaining(probes, budgetMs - (now2() - startedAt));
61310
+ if (lastProbeMs = now2() - probeStartedAt, outcome === "aborted" || aborted2())
61167
61311
  return { kind: "aborted", waitedMs: now2() - startedAt, probes };
61168
61312
  if (outcome === "deadline")
61169
61313
  return {
@@ -63528,6 +63672,7 @@ __export(dist_exports, {
63528
63672
  DELEGATION_CAP_CODES: () => DELEGATION_CAP_CODES,
63529
63673
  DELEGATION_CONCURRENCY_CAP: () => DELEGATION_CONCURRENCY_CAP,
63530
63674
  DELEGATION_SESSION_CAP: () => DELEGATION_SESSION_CAP,
63675
+ DENIAL_LIMIT_KINDS: () => DENIAL_LIMIT_KINDS,
63531
63676
  DETACH_DURABLE_OFF_400_ANCHOR: () => DETACH_DURABLE_OFF_400_ANCHOR,
63532
63677
  DETACH_HEADER: () => DETACH_HEADER,
63533
63678
  DETACH_WIRE_MIN_ENGINE: () => DETACH_WIRE_MIN_ENGINE,
@@ -63650,6 +63795,7 @@ __export(dist_exports, {
63650
63795
  REWIND_ERROR_CODE_PREFIXES: () => REWIND_ERROR_CODE_PREFIXES,
63651
63796
  RULE_NOT_SENT_REJECTED_WARN_TEXT: () => RULE_NOT_SENT_REJECTED_WARN_TEXT,
63652
63797
  RULE_NOT_SENT_WARN_TEXT: () => RULE_NOT_SENT_WARN_TEXT,
63798
+ RULE_OFFERS_ABSENCE_REASONS: () => RULE_OFFERS_ABSENCE_REASONS,
63653
63799
  RULE_OFFER_BATCH_MEMBER_KINDS: () => RULE_OFFER_BATCH_MEMBER_KINDS,
63654
63800
  RULE_OFFER_MATCHES: () => RULE_OFFER_MATCHES,
63655
63801
  RULE_OFFER_UNCOVERED_REASONS: () => RULE_OFFER_UNCOVERED_REASONS,
@@ -63731,6 +63877,7 @@ __export(dist_exports, {
63731
63877
  __resetHooksWireCapsForTests: () => __resetHooksWireCapsForTests,
63732
63878
  __resetRetainWithoutWakeWarningForTests: () => __resetRetainWithoutWakeWarningForTests,
63733
63879
  __resetRunningChoiceLedgerForTests: () => __resetRunningChoiceLedgerForTests,
63880
+ __resetSqlEngineReadingsForTests: () => __resetSqlEngineReadingsForTests,
63734
63881
  __resetSubagentOutputCapCacheForTests: () => __resetSubagentOutputCapCacheForTests,
63735
63882
  __resetSubagentOwnerLedgerForTests: () => __resetSubagentOwnerLedgerForTests,
63736
63883
  __resetSubagentStreamCapCacheForTests: () => __resetSubagentStreamCapCacheForTests,
@@ -63876,6 +64023,7 @@ __export(dist_exports, {
63876
64023
  engineCapState: () => engineCapState,
63877
64024
  engineCapString: () => engineCapString,
63878
64025
  engineCapTrue: () => engineCapTrue,
64026
+ engineCapValue: () => engineCapValue,
63879
64027
  engineCapsSettled: () => engineCapsSettled,
63880
64028
  engineCcStopSemantics: () => engineCcStopSemantics,
63881
64029
  engineLimitsSupportWarning: () => engineLimitsSupportWarning,
@@ -63918,6 +64066,7 @@ __export(dist_exports, {
63918
64066
  fleetViewStubRowIds: () => fleetViewStubRowIds,
63919
64067
  fmtCtxOut: () => fmtCtxOut,
63920
64068
  fmtTokens: () => fmtTokens,
64069
+ forgetSqlEngineReading: () => forgetSqlEngineReading,
63921
64070
  gateArmedWaitMs: () => gateArmedWaitMs,
63922
64071
  gateKind: () => gateKind,
63923
64072
  getBgParentRun: () => getBgParentRun,
@@ -64061,6 +64210,7 @@ __export(dist_exports, {
64061
64210
  normalizeTaskNotification: () => normalizeTaskNotification,
64062
64211
  normalizeWirePrincipal: () => normalizeWirePrincipal,
64063
64212
  noteBgOwnerAbsence: () => noteBgOwnerAbsence,
64213
+ noteEngineCapsForSqlEngine: () => noteEngineCapsForSqlEngine,
64064
64214
  notePlanReviewAnswered: () => notePlanReviewAnswered,
64065
64215
  notePlanReviewAnsweredFor: () => notePlanReviewAnsweredFor,
64066
64216
  notePlanReviewAnsweredIfDecisive: () => notePlanReviewAnsweredIfDecisive,
@@ -64069,6 +64219,7 @@ __export(dist_exports, {
64069
64219
  notificationDropCounters: () => notificationDropCounters,
64070
64220
  notificationQueuePortMisses: () => notificationQueuePortMisses,
64071
64221
  observeCancelByDeny: () => observeCancelByDeny,
64222
+ observedSqlEngine: () => observedSqlEngine,
64072
64223
  onEngineTaskBound: () => onEngineTaskBound,
64073
64224
  onGateArmed: () => onGateArmed,
64074
64225
  onGateArmedFor: () => onGateArmedFor,
@@ -64125,6 +64276,7 @@ __export(dist_exports, {
64125
64276
  projectFleetAgentRows: () => projectFleetAgentRows,
64126
64277
  projectFleetAgentRowsFor: () => projectFleetAgentRowsFor,
64127
64278
  projectRewind: () => projectRewind,
64279
+ projectSqlEngineCapability: () => projectSqlEngineCapability,
64128
64280
  projectTasks: () => projectTasks,
64129
64281
  projectWorkflowRun: () => projectWorkflowRun,
64130
64282
  projectWorkflowTaskOutput: () => projectWorkflowTaskOutput,
@@ -64246,6 +64398,7 @@ __export(dist_exports, {
64246
64398
  skillCommandsToSpecs: () => skillCommandsToSpecs,
64247
64399
  splitApiErrorSupplement: () => splitApiErrorSupplement,
64248
64400
  spoolMarkerOf: () => spoolMarkerOf,
64401
+ sqlEngineDoctorDetail: () => sqlEngineDoctorDetail,
64249
64402
  stamp: () => stamp,
64250
64403
  startApprovalsFeed: () => startApprovalsFeed,
64251
64404
  steerEngineSubagent: () => steerEngineSubagent,
@@ -64352,6 +64505,7 @@ var init_dist = __esm({
64352
64505
  init_engineInlineTaskStats();
64353
64506
  init_printToolResultFrame();
64354
64507
  init_engineCapsCache();
64508
+ init_sqlEngineCapability();
64355
64509
  init_engineToolLabelStore();
64356
64510
  init_fleetTaskDesc();
64357
64511
  init_hostEnv();
@@ -81926,6 +82080,23 @@ var SECRET_LITERAL_RE, ENV_NAME, hasNul, NON_SECRET_URL, K8S_QUANTITY, TCP_PORT,
81926
82080
  * declared `"local"`, the engine read ABSENT. A value outside the table is REJECTED at parse — a mistyped trust
81927
82081
  * word must never be read as a legal one (the consumer's gate is equally severe: no case-folding). */
81928
82082
  contentOrigin: external_exports2.enum(MCP_CONTENT_ORIGINS).optional(),
82083
+ /** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
82084
+ * (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
82085
+ * consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
82086
+ * `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
82087
+ * no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
82088
+ * no label (`.optional()`, no default — a label has no default tier). 🔴 ZERO rules here (`z.unknown()`):
82089
+ * the label RULE (string, non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
82090
+ * which drops a malformed label's KEY, keeps the server and records the drop. Nothing may live here:
82091
+ * this domain parses all-or-nothing, so ANY rejection at parse (1.7.0 `min/max`, 1.7.1 `z.string()`
82092
+ * against a `null`) lets one bad label default the ENTIRE mcp domain — every server gone, silently when
82093
+ * no onWarning is wired — a blast radius a display label must never have. 1.7.2 makes the key
82094
+ * parse-transparent: whatever JSON value the file carries reaches the consumer verbatim. Display-only:
82095
+ * no gate / policy / trust
82096
+ * effect (the trust axis is `contentOrigin` above, which stays a closed table). Before this key existed
82097
+ * both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
82098
+ * (ticket B-036 / S-143), the projection half lives in the consumer. */
82099
+ source: external_exports2.unknown().optional(),
81929
82100
  notes: external_exports2.string().optional()
81930
82101
  }), McpConfig = external_exports2.object({ servers: external_exports2.array(McpServerSpec).default([]) }).superRefine((cfg, ctx) => {
81931
82102
  let seen2 = /* @__PURE__ */ new Set();
@@ -266157,7 +266328,7 @@ var require_extension = __commonJS({
266157
266328
  var require_websocket2 = __commonJS({
266158
266329
  "node_modules/ws/lib/websocket.js"(exports2, module2) {
266159
266330
  "use strict";
266160
- var EventEmitter5 = __require("events"), https2 = __require("https"), http3 = __require("http"), net = __require("net"), tls = __require("tls"), { randomBytes: randomBytes31, createHash: createHash34 } = __require("crypto"), { Duplex, Readable: Readable5 } = __require("stream"), { URL: URL6 } = __require("url"), PerMessageDeflate2 = require_permessage_deflate2(), Receiver2 = require_receiver2(), Sender2 = require_sender2(), { isBlob: isBlob2 } = require_validation2(), {
266331
+ var EventEmitter5 = __require("events"), https2 = __require("https"), http3 = __require("http"), net = __require("net"), tls = __require("tls"), { randomBytes: randomBytes31, createHash: createHash33 } = __require("crypto"), { Duplex, Readable: Readable5 } = __require("stream"), { URL: URL6 } = __require("url"), PerMessageDeflate2 = require_permessage_deflate2(), Receiver2 = require_receiver2(), Sender2 = require_sender2(), { isBlob: isBlob2 } = require_validation2(), {
266161
266332
  BINARY_TYPES,
266162
266333
  CLOSE_TIMEOUT,
266163
266334
  EMPTY_BUFFER,
@@ -266619,7 +266790,7 @@ var require_websocket2 = __commonJS({
266619
266790
  abortHandshake(websocket, socket, "Invalid Upgrade header");
266620
266791
  return;
266621
266792
  }
266622
- let digest = createHash34("sha1").update(key + GUID).digest("base64");
266793
+ let digest = createHash33("sha1").update(key + GUID).digest("base64");
266623
266794
  if (res.headers["sec-websocket-accept"] !== digest) {
266624
266795
  abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
266625
266796
  return;
@@ -266857,7 +267028,7 @@ var require_subprotocol = __commonJS({
266857
267028
  var require_websocket_server = __commonJS({
266858
267029
  "node_modules/ws/lib/websocket-server.js"(exports2, module2) {
266859
267030
  "use strict";
266860
- var EventEmitter5 = __require("events"), http3 = __require("http"), { Duplex } = __require("stream"), { createHash: createHash34 } = __require("crypto"), extension2 = require_extension(), PerMessageDeflate2 = require_permessage_deflate2(), subprotocol2 = require_subprotocol(), WebSocket3 = require_websocket2(), { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants9(), keyRegex = /^[+/0-9A-Za-z]{22}==$/, RUNNING = 0, CLOSING = 1, CLOSED = 2, WebSocketServer2 = class extends EventEmitter5 {
267031
+ var EventEmitter5 = __require("events"), http3 = __require("http"), { Duplex } = __require("stream"), { createHash: createHash33 } = __require("crypto"), extension2 = require_extension(), PerMessageDeflate2 = require_permessage_deflate2(), subprotocol2 = require_subprotocol(), WebSocket3 = require_websocket2(), { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants9(), keyRegex = /^[+/0-9A-Za-z]{22}==$/, RUNNING = 0, CLOSING = 1, CLOSED = 2, WebSocketServer2 = class extends EventEmitter5 {
266861
267032
  /**
266862
267033
  * Create a `WebSocketServer` instance.
266863
267034
  *
@@ -267104,7 +267275,7 @@ var require_websocket_server = __commonJS({
267104
267275
  "HTTP/1.1 101 Switching Protocols",
267105
267276
  "Upgrade: websocket",
267106
267277
  "Connection: Upgrade",
267107
- `Sec-WebSocket-Accept: ${createHash34("sha1").update(key + GUID).digest("base64")}`
267278
+ `Sec-WebSocket-Accept: ${createHash33("sha1").update(key + GUID).digest("base64")}`
267108
267279
  ], ws = new this.options.WebSocket(null, void 0, this.options);
267109
267280
  if (protocols.size) {
267110
267281
  let protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
@@ -284728,7 +284899,7 @@ function FileEditToolUseRejectedMessage(t0) {
284728
284899
  }
284729
284900
  var import_compiler_runtime43, import_jsx_runtime53, MAX_LINES_TO_RENDER, init_FileEditToolUseRejectedMessage = __esm({
284730
284901
  "build-src/src/components/FileEditToolUseRejectedMessage.tsx"() {
284731
- import_compiler_runtime43 = __toESM(require_compiler_runtime(), 1);
284902
+ import_compiler_runtime43 = __toESM(require_compiler_runtime());
284732
284903
  init_useTerminalSize();
284733
284904
  init_cwd();
284734
284905
  init_ink2();
@@ -284736,7 +284907,7 @@ var import_compiler_runtime43, import_jsx_runtime53, MAX_LINES_TO_RENDER, init_F
284736
284907
  init_MessageResponse();
284737
284908
  init_StructuredDiffList();
284738
284909
  init_stringUtils();
284739
- import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1), MAX_LINES_TO_RENDER = 10;
284910
+ import_jsx_runtime53 = __toESM(require_jsx_runtime()), MAX_LINES_TO_RENDER = 10;
284740
284911
  }
284741
284912
  });
284742
284913
 
@@ -291142,6 +291313,19 @@ function approvalMovedToDurableQueueRow(toolName2) {
291142
291313
  function approvalWindowClosedRow(toolName2) {
291143
291314
  return `sema: the approval window for "${toolName2}" closed \u2014 what happens to that step now is the engine's own policy. By default it keeps the call waiting in a durable queue, so this card is left up and answering it now is normally still accepted; if the engine settled it instead, answering will say so. Nothing was decided by this card.`;
291144
291315
  }
291316
+ function approvalAutoDeniedRow(toolName2) {
291317
+ return `sema: the approval window for "${toolName2}" closed and the engine denied this call itself (auto-deny limit reached \u2014 no human decided it). This card no longer decides anything; the engine may ask again for a later call.`;
291318
+ }
291319
+ function readToolEndAutoDenied(ev) {
291320
+ if (typeof ev != "object" || ev === null) return !1;
291321
+ let rec = ev;
291322
+ return rec.type !== "tool_end" ? !1 : rec.autoDenied === !0;
291323
+ }
291324
+ function readToolEndToolCallId(ev) {
291325
+ if (typeof ev != "object" || ev === null) return;
291326
+ let raw2 = ev.toolCallId;
291327
+ return typeof raw2 == "string" && raw2 !== "" ? raw2 : void 0;
291328
+ }
291145
291329
  function parkRowDeadlineState(row2, nowMs2) {
291146
291330
  if (typeof row2 != "object" || row2 === null) return { kind: "none" };
291147
291331
  let raw2 = row2.deadline;
@@ -291398,6 +291582,53 @@ var PARK_DEADLINE_MAX_SANE_MS, parkRowDeadlineHandoff, lateDecideLane, MAX_LATE_
291398
291582
  });
291399
291583
 
291400
291584
  // build-src/src/sema/liveApprovalCardHandles.ts
291585
+ function noteTerminalSeen(epoch, toolCallId) {
291586
+ for (; terminalSeenByToolCallId.size >= SETTLED_CARD_MAX; ) {
291587
+ let oldest = terminalSeenByToolCallId.values().next();
291588
+ if (oldest.done === !0) break;
291589
+ terminalSeenByToolCallId.delete(oldest.value);
291590
+ }
291591
+ terminalSeenByToolCallId.add(settledKey(epoch, toolCallId));
291592
+ }
291593
+ function resolveToolEndAutoDenied(ev, streamEpoch) {
291594
+ if (typeof ev != "object" || ev === null || ev.type !== "tool_end") return { kind: "none" };
291595
+ let toolCallId = readToolEndToolCallId(ev);
291596
+ if (toolCallId === void 0) return { kind: "none" };
291597
+ let autoDenied = readToolEndAutoDenied(ev), settled = takeSettledCardToolName(toolCallId, streamEpoch), live = callKeyByToolCallId.get(toolCallId);
291598
+ live !== void 0 && live.epoch === streamEpoch && noteTerminalSeen(streamEpoch, toolCallId);
291599
+ let epochLive = streamEpoch === getLiveSessionEpoch();
291600
+ return !autoDenied || !epochLive ? { kind: "none" } : markApprovalCardAutoDenied(toolCallId, streamEpoch) ? { kind: "live" } : settled !== void 0 ? { kind: "late", toolName: settled } : { kind: "none" };
291601
+ }
291602
+ function registerApprovalCardToolCallId(toolCallId, callKey) {
291603
+ let epoch = getLiveSessionEpoch();
291604
+ return typeof toolCallId != "string" || toolCallId === "" || callKeyByToolCallId.set(toolCallId, { callKey, epoch }), epoch;
291605
+ }
291606
+ function forgetApprovalCardToolCallId(toolCallId, callKey, bornEpoch, windowClosedToolName) {
291607
+ if (typeof toolCallId != "string" || toolCallId === "") return;
291608
+ let live = callKeyByToolCallId.get(toolCallId);
291609
+ if (live !== void 0 && live.callKey === callKey && callKeyByToolCallId.delete(toolCallId), !(typeof windowClosedToolName != "string" || windowClosedToolName === "") && !terminalSeenByToolCallId.delete(settledKey(bornEpoch, toolCallId))) {
291610
+ for (; settledCardByToolCallId.size >= SETTLED_CARD_MAX; ) {
291611
+ let oldest = settledCardByToolCallId.keys().next();
291612
+ if (oldest.done === !0) break;
291613
+ settledCardByToolCallId.delete(oldest.value);
291614
+ }
291615
+ settledCardByToolCallId.set(settledKey(bornEpoch, toolCallId), windowClosedToolName);
291616
+ }
291617
+ }
291618
+ function takeSettledCardToolName(toolCallId, epoch) {
291619
+ if (typeof toolCallId != "string" || toolCallId === "") return;
291620
+ if (epoch === void 0) {
291621
+ for (let k3 of settledCardByToolCallId.keys())
291622
+ if (k3.endsWith(`:${toolCallId}`)) {
291623
+ let name2 = settledCardByToolCallId.get(k3);
291624
+ return settledCardByToolCallId.delete(k3), name2;
291625
+ }
291626
+ return;
291627
+ }
291628
+ let k2 = settledKey(epoch, toolCallId), name = settledCardByToolCallId.get(k2);
291629
+ if (name !== void 0)
291630
+ return settledCardByToolCallId.delete(k2), name;
291631
+ }
291401
291632
  function retractApprovalCard(callKey, cause) {
291402
291633
  let handle2 = liveApprovalCards.get(callKey);
291403
291634
  return handle2 === void 0 ? !1 : (liveApprovalCards.delete(callKey), handle2.retract(cause), !0);
@@ -291406,9 +291637,22 @@ function markApprovalCardMovedToDurableQueue(callKey) {
291406
291637
  let handle2 = liveApprovalCards.get(callKey);
291407
291638
  return handle2 === void 0 ? !1 : handle2.windowClosed("parked-frame");
291408
291639
  }
291409
- var liveApprovalCards, init_liveApprovalCardHandles = __esm({
291640
+ function markApprovalCardAutoDenied(toolCallId, streamEpoch) {
291641
+ if (typeof toolCallId != "string" || toolCallId === "") return !1;
291642
+ let born = callKeyByToolCallId.get(toolCallId);
291643
+ if (born === void 0 || streamEpoch !== void 0 && born.epoch !== streamEpoch) return !1;
291644
+ let handle2 = liveApprovalCards.get(born.callKey);
291645
+ return handle2 === void 0 ? !1 : handle2.windowClosed("auto-denied");
291646
+ }
291647
+ function surfaceToolEndAutoDenied(ev, streamEpoch) {
291648
+ let r = resolveToolEndAutoDenied(ev, streamEpoch);
291649
+ return r.kind !== "late" ? r.kind : surfaceLateDecideOutcome(approvalAutoDeniedRow(r.toolName)) ? "late" : "late-unsurfaced";
291650
+ }
291651
+ var liveApprovalCards, callKeyByToolCallId, SETTLED_CARD_MAX, settledCardByToolCallId, settledKey, terminalSeenByToolCallId, init_liveApprovalCardHandles = __esm({
291410
291652
  "build-src/src/sema/liveApprovalCardHandles.ts"() {
291411
- liveApprovalCards = /* @__PURE__ */ new Map();
291653
+ init_askParkExpiry();
291654
+ init_liveSessionStore();
291655
+ liveApprovalCards = /* @__PURE__ */ new Map(), callKeyByToolCallId = /* @__PURE__ */ new Map(), SETTLED_CARD_MAX = 64, settledCardByToolCallId = /* @__PURE__ */ new Map(), settledKey = (epoch, toolCallId) => `${String(epoch)}:${toolCallId}`, terminalSeenByToolCallId = /* @__PURE__ */ new Set();
291412
291656
  }
291413
291657
  });
291414
291658
 
@@ -368930,12 +369174,31 @@ function resolveEngineEntry() {
368930
369174
  function localEngineVersion() {
368931
369175
  let entry = resolveEngineEntry();
368932
369176
  if (entry)
369177
+ return engineVersionOfEntry(entry);
369178
+ }
369179
+ function engineVersionOfEntry(entry) {
369180
+ let readVersion = (dir) => {
368933
369181
  try {
368934
- let pkg = JSON.parse(readFileSync36(join124(entry.cwd, "package.json"), "utf8"));
369182
+ let pkg = JSON.parse(readFileSync36(join124(dir, "package.json"), "utf8"));
368935
369183
  return typeof pkg.version == "string" && pkg.version.length > 0 ? pkg.version : void 0;
368936
369184
  } catch {
368937
369185
  return;
368938
369186
  }
369187
+ }, script = entry.args[0], fromEntry;
369188
+ if (typeof script == "string" && script.length > 0) {
369189
+ let dir = dirname59(script);
369190
+ for (let i = 0; i < 6 && dir !== dirname59(dir); i++) {
369191
+ if (existsSync23(join124(dir, "package.json"))) {
369192
+ fromEntry = readVersion(dir);
369193
+ break;
369194
+ }
369195
+ dir = dirname59(dir);
369196
+ }
369197
+ }
369198
+ let fromCwd = readVersion(entry.cwd);
369199
+ return fromEntry !== void 0 && fromCwd !== void 0 && fromEntry !== fromCwd && logForDebugging(
369200
+ `[engine-lifecycle] torn engine install: entry ${script} belongs to ${fromEntry} but cwd ${entry.cwd} is ${fromCwd} \u2014 version gate follows the ENTRY (what actually runs)`
369201
+ ), fromEntry ?? fromCwd;
368939
369202
  }
368940
369203
  function localDistNewerThanEngine(wantVersion, engineVersion2) {
368941
369204
  if (engineVersion2 === wantVersion) return !1;
@@ -401566,18 +401829,18 @@ var sema_brand_default, init_sema_brand = __esm({
401566
401829
  _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"
401567
401830
  },
401568
401831
  whatsNew: {
401569
- version: "1.0.101",
401832
+ version: "1.0.102",
401570
401833
  notes: [
401571
- "Keys typed in the first second or two after launch \u2014 while the 25MB main bundle is still being parsed \u2014 are now captured by the tiny launcher and seeded into the input box once the prompt is ready, instead of being echoed raw by the terminal or lost. A lone Escape pressed during that window is still treated as Escape, and Ctrl+D still stops the capture.",
401572
- "Approval cards now show rule offers whose match kind is wildcard or subpath, and batch offers that include a directory-read grant (for example the `cd /srv` segment of a compound command); previously those offers were silently dropped from the card.",
401573
- "The wording shown when a resume is refused (placement root changed, or the deployment's preflight refused the token) now comes from the shared client library, so every sema client says the same thing; a retry-after window is only shown when the engine actually sent one.",
401574
- '/doctor has a new "SQL engine" row: on a local single-machine engine it reports none (file stores); on a deployment with a SQL backend it reports the engine, isolation level and transaction mode, and it says "not observed" rather than inventing a value when no engine has answered yet.',
401575
- "sema ps, sema logs and sema attach no longer hang after printing when Ctrl+D was pressed during startup.",
401576
- "The bundled engine is 7.60.0 (core 7.5.0): rule stores are unified, the wiring manifest lists MCP servers, and classifier denial-limit fallbacks are marked on the wire."
401834
+ `Approval cards now carry the facts behind the ask: when the auto-deny limit tripped (counts, which limit, and how long until the engine auto-denies), when an org rule, an unreachable org rule store or a hook asked for the review, and why no "don't ask again" offer is available (mandated gate, shadowed by a higher-priority rule, or a lane that cannot persist rules). Routine asks add no extra line.`,
401835
+ `When an approval window closes and the engine later auto-denies that call (auto-deny limit reached), the transcript now says so with a dedicated line instead of leaving the earlier "the engine's policy decides" note standing; the correction is bound to the card's own session and tool call, so a later session never inherits it.`,
401836
+ `/doctor has a new "MCP servers (engine leg)" row read from the engine's wiring manifest: "not observed" when no run has reported it, "declared no MCP servers" when the engine leg reported an empty list, otherwise one entry per server with status, tool count, error code and source label ("source not declared" when the engine did not carry one).`,
401837
+ "The engine version gate now follows the entry script's own package, so a torn install (new package on disk, old entry still running) is reported once and no longer triggers a second automatic restart.",
401838
+ "The bundled engine is 7.62.0 (core 7.5.2, settings-schema 1.7.1): MCP servers declared with a source label keep it on the wiring manifest. Known issue: with this engine, writing `source: null` for a server in config.d/mcp.json empties the whole MCP server list for that engine \u2014 omit the key or use a string until the next engine update.",
401839
+ 'The SQL engine row in `sema doctor` no longer claims "local file stores" when the engine reports no SQL posture; it now says the backend is either not configured or its initialization was refused and points at the engine log.'
401577
401840
  ]
401578
401841
  },
401579
- productVersion: "1.0.101",
401580
- announcement: 'sema 1.0.101 \u2014 keys typed in the first seconds after launch (before the main bundle has even loaded) are now captured instead of echoed raw or lost, approval cards show rule offers that use wildcard or subpath matching and directory-read grants, resume refusals share one wording with the other sema clients, /doctor has a new "SQL engine" row, and the bundled engine is 7.60.0.',
401842
+ productVersion: "1.0.102",
401843
+ announcement: 'sema 1.0.102 \u2014 the bundled engine is 7.62.0 (MCP servers can carry a source label on the wiring manifest), approval cards now explain auto-deny limits, org rules, hooks and why a rule offer is missing, a card whose approval window closed is corrected when the engine auto-denies the call, /doctor gains an "MCP servers (engine leg)" row, and the engine version gate follows the entry script so a torn install no longer restarts the engine twice.',
401581
401844
  version: "1.0.91"
401582
401845
  };
401583
401846
  }
@@ -405910,18 +406173,18 @@ var require_sema_brand = __commonJS({
405910
406173
  _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"
405911
406174
  },
405912
406175
  whatsNew: {
405913
- version: "1.0.101",
406176
+ version: "1.0.102",
405914
406177
  notes: [
405915
- "Keys typed in the first second or two after launch \u2014 while the 25MB main bundle is still being parsed \u2014 are now captured by the tiny launcher and seeded into the input box once the prompt is ready, instead of being echoed raw by the terminal or lost. A lone Escape pressed during that window is still treated as Escape, and Ctrl+D still stops the capture.",
405916
- "Approval cards now show rule offers whose match kind is wildcard or subpath, and batch offers that include a directory-read grant (for example the `cd /srv` segment of a compound command); previously those offers were silently dropped from the card.",
405917
- "The wording shown when a resume is refused (placement root changed, or the deployment's preflight refused the token) now comes from the shared client library, so every sema client says the same thing; a retry-after window is only shown when the engine actually sent one.",
405918
- '/doctor has a new "SQL engine" row: on a local single-machine engine it reports none (file stores); on a deployment with a SQL backend it reports the engine, isolation level and transaction mode, and it says "not observed" rather than inventing a value when no engine has answered yet.',
405919
- "sema ps, sema logs and sema attach no longer hang after printing when Ctrl+D was pressed during startup.",
405920
- "The bundled engine is 7.60.0 (core 7.5.0): rule stores are unified, the wiring manifest lists MCP servers, and classifier denial-limit fallbacks are marked on the wire."
406178
+ `Approval cards now carry the facts behind the ask: when the auto-deny limit tripped (counts, which limit, and how long until the engine auto-denies), when an org rule, an unreachable org rule store or a hook asked for the review, and why no "don't ask again" offer is available (mandated gate, shadowed by a higher-priority rule, or a lane that cannot persist rules). Routine asks add no extra line.`,
406179
+ `When an approval window closes and the engine later auto-denies that call (auto-deny limit reached), the transcript now says so with a dedicated line instead of leaving the earlier "the engine's policy decides" note standing; the correction is bound to the card's own session and tool call, so a later session never inherits it.`,
406180
+ `/doctor has a new "MCP servers (engine leg)" row read from the engine's wiring manifest: "not observed" when no run has reported it, "declared no MCP servers" when the engine leg reported an empty list, otherwise one entry per server with status, tool count, error code and source label ("source not declared" when the engine did not carry one).`,
406181
+ "The engine version gate now follows the entry script's own package, so a torn install (new package on disk, old entry still running) is reported once and no longer triggers a second automatic restart.",
406182
+ "The bundled engine is 7.62.0 (core 7.5.2, settings-schema 1.7.1): MCP servers declared with a source label keep it on the wiring manifest. Known issue: with this engine, writing `source: null` for a server in config.d/mcp.json empties the whole MCP server list for that engine \u2014 omit the key or use a string until the next engine update.",
406183
+ 'The SQL engine row in `sema doctor` no longer claims "local file stores" when the engine reports no SQL posture; it now says the backend is either not configured or its initialization was refused and points at the engine log.'
405921
406184
  ]
405922
406185
  },
405923
- productVersion: "1.0.101",
405924
- announcement: 'sema 1.0.101 \u2014 keys typed in the first seconds after launch (before the main bundle has even loaded) are now captured instead of echoed raw or lost, approval cards show rule offers that use wildcard or subpath matching and directory-read grants, resume refusals share one wording with the other sema clients, /doctor has a new "SQL engine" row, and the bundled engine is 7.60.0.',
406186
+ productVersion: "1.0.102",
406187
+ announcement: 'sema 1.0.102 \u2014 the bundled engine is 7.62.0 (MCP servers can carry a source label on the wiring manifest), approval cards now explain auto-deny limits, org rules, hooks and why a rule offer is missing, a card whose approval window closed is corrected when the engine auto-denies the call, /doctor gains an "MCP servers (engine leg)" row, and the engine version gate follows the entry script so a torn install no longer restarts the engine twice.',
405925
406188
  version: "1.0.91"
405926
406189
  };
405927
406190
  }
@@ -430172,9 +430435,9 @@ function makeProtocolNamespace(id, prefix) {
430172
430435
  function protocolOf(name) {
430173
430436
  return PROTOCOL_TABLE.find((ns) => name.startsWith(ns.prefix));
430174
430437
  }
430175
- var MCP_PREFIX_NAME, A2A_PREFIX_NAME, MCP_NAMESPACE, A2A_NAMESPACE, PROTOCOL_TABLE, init_protocol_table = __esm({
430438
+ var MCP_PREFIX_NAME, A2A_PREFIX_NAME, MCP_NAMESPACE, A2A_NAMESPACE, PROTOCOL_TABLE, NAMESPACED_NAME_SHAPES, init_protocol_table = __esm({
430176
430439
  "node_modules/@sema-agent/core/dist/core/protocol-table.js"() {
430177
- MCP_PREFIX_NAME = "mcp__", A2A_PREFIX_NAME = "a2a__", MCP_NAMESPACE = makeProtocolNamespace("mcp", MCP_PREFIX_NAME), A2A_NAMESPACE = makeProtocolNamespace("a2a", A2A_PREFIX_NAME), PROTOCOL_TABLE = [MCP_NAMESPACE, A2A_NAMESPACE];
430440
+ MCP_PREFIX_NAME = "mcp__", A2A_PREFIX_NAME = "a2a__", MCP_NAMESPACE = makeProtocolNamespace("mcp", MCP_PREFIX_NAME), A2A_NAMESPACE = makeProtocolNamespace("a2a", A2A_PREFIX_NAME), PROTOCOL_TABLE = [MCP_NAMESPACE, A2A_NAMESPACE], NAMESPACED_NAME_SHAPES = PROTOCOL_TABLE.map((ns) => `${ns.prefix}<peer>__<tool>`).join(", ");
430178
430441
  }
430179
430442
  });
430180
430443
 
@@ -430965,6 +431228,13 @@ var DECISION_REASONS, DECISION_REASON_SET, ALLOW, RETIRED_TEXT_FIELD, RETIRED_WI
430965
431228
  }
430966
431229
  });
430967
431230
 
431231
+ // node_modules/@sema-agent/core/dist/core/auto-mode.js
431232
+ var init_auto_mode = __esm({
431233
+ "node_modules/@sema-agent/core/dist/core/auto-mode.js"() {
431234
+ init_auto_mode_defaults();
431235
+ }
431236
+ });
431237
+
430968
431238
  // node_modules/@sema-agent/core/dist/core/ask-origin.js
430969
431239
  var ASK_ORIGINS, ASK_ORIGIN_SET, init_ask_origin = __esm({
430970
431240
  "node_modules/@sema-agent/core/dist/core/ask-origin.js"() {
@@ -431330,6 +431600,7 @@ var MAX_PENDING_STEER_CHARS, PENDING_STEER_QUEUE_BYTE_BUDGET_BYTES, MAX_PENDING_
431330
431600
  init_harness();
431331
431601
  init_untrusted_text();
431332
431602
  init_tool_policy();
431603
+ init_auto_mode();
431333
431604
  init_ask_origin();
431334
431605
  init_permission_rule_model();
431335
431606
  init_untrusted_egress();
@@ -433173,84 +433444,6 @@ var init_compaction_call_options = __esm({
433173
433444
  }
433174
433445
  });
433175
433446
 
433176
- // node_modules/@sema-agent/core/dist/core/auto-mode.js
433177
- var init_auto_mode = __esm({
433178
- "node_modules/@sema-agent/core/dist/core/auto-mode.js"() {
433179
- init_auto_mode_defaults();
433180
- }
433181
- });
433182
-
433183
- // node_modules/@sema-agent/core/dist/core/runner/denial-limit-arms.js
433184
- var init_denial_limit_arms = __esm({
433185
- "node_modules/@sema-agent/core/dist/core/runner/denial-limit-arms.js"() {
433186
- init_auto_mode();
433187
- init_auto_mode_arming();
433188
- init_types21();
433189
- init_untrusted_text();
433190
- init_ask_origin();
433191
- }
433192
- });
433193
-
433194
- // node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js
433195
- var init_auto_mode_prompt_assets = __esm({
433196
- "node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js"() {
433197
- }
433198
- });
433199
-
433200
- // node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js
433201
- var init_auto_mode_prompt = __esm({
433202
- "node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js"() {
433203
- init_auto_mode_defaults();
433204
- init_auto_mode_prompt_assets();
433205
- init_untrusted_text();
433206
- init_auto_mode_defaults();
433207
- }
433208
- });
433209
-
433210
- // node_modules/@sema-agent/core/dist/core/a2a-task-state.js
433211
- var A2A_TASK_STATES, init_a2a_task_state = __esm({
433212
- "node_modules/@sema-agent/core/dist/core/a2a-task-state.js"() {
433213
- A2A_TASK_STATES = [
433214
- "submitted",
433215
- "working",
433216
- "input-required",
433217
- "completed",
433218
- "canceled",
433219
- "failed",
433220
- "rejected",
433221
- "auth-required",
433222
- "unknown"
433223
- ];
433224
- }
433225
- });
433226
-
433227
- // node_modules/@sema-agent/core/dist/core/a2a.js
433228
- var A2A_CALL_TOTAL_TIMEOUT_MS, A2A_RESPONSE_MAX_BYTES, A2A_STATE_SET, init_a2a = __esm({
433229
- "node_modules/@sema-agent/core/dist/core/a2a.js"() {
433230
- init_build3();
433231
- init_a2a_task_state();
433232
- init_mcp4();
433233
- init_protocol_naming();
433234
- init_protocol_table();
433235
- init_untrusted_text();
433236
- A2A_CALL_TOTAL_TIMEOUT_MS = 10 * 6e4, A2A_RESPONSE_MAX_BYTES = 8 * 1024 * 1024, A2A_STATE_SET = new Set(A2A_TASK_STATES);
433237
- }
433238
- });
433239
-
433240
- // node_modules/@sema-agent/core/dist/agents/agent-transcript-tool.js
433241
- var init_agent_transcript_tool = __esm({
433242
- "node_modules/@sema-agent/core/dist/agents/agent-transcript-tool.js"() {
433243
- init_build3();
433244
- init_tools3();
433245
- init_background_agent_store();
433246
- init_task_registry();
433247
- init_untrusted_text();
433248
- init_subagent_steps();
433249
- init_subagent();
433250
- init_retain_ledger();
433251
- }
433252
- });
433253
-
433254
433447
  // node_modules/@sema-agent/core/dist/core/mailbox-store.js
433255
433448
  var init_mailbox_store = __esm({
433256
433449
  "node_modules/@sema-agent/core/dist/core/mailbox-store.js"() {
@@ -433358,267 +433551,20 @@ var uplinkSeqGlobal, REVIVE_LEASE_TTL_MS, init_send_message_tool = __esm({
433358
433551
  }
433359
433552
  });
433360
433553
 
433361
- // node_modules/@sema-agent/core/dist/core/runner/prepare-permission-rules.js
433362
- var init_prepare_permission_rules = __esm({
433363
- "node_modules/@sema-agent/core/dist/core/runner/prepare-permission-rules.js"() {
433364
- init_permission_rule_model();
433365
- init_permission_rule_org();
433366
- }
433367
- });
433368
-
433369
- // node_modules/@sema-agent/core/dist/core/runner/session-rule-policy.js
433370
- var PATH_WRITE_TOOLS, PATH_CONFINABLE_WRITE_TOOLS, init_session_rule_policy = __esm({
433371
- "node_modules/@sema-agent/core/dist/core/runner/session-rule-policy.js"() {
433372
- init_safety();
433373
- init_safety();
433374
- init_tool_policy();
433375
- PATH_WRITE_TOOLS = /* @__PURE__ */ new Set(["Write", "Edit", "MultiEdit"]), PATH_CONFINABLE_WRITE_TOOLS = /* @__PURE__ */ new Set([...PATH_WRITE_TOOLS, "NotebookEdit"]);
433376
- }
433377
- });
433378
-
433379
- // node_modules/@sema-agent/core/dist/core/skill-tool-specifier.js
433380
- var SPECIFIER_ENFORCED_TOOLS, init_skill_tool_specifier = __esm({
433381
- "node_modules/@sema-agent/core/dist/core/skill-tool-specifier.js"() {
433382
- init_permission_rules();
433383
- init_tool_policy();
433384
- init_bash_readonly_classifier();
433385
- SPECIFIER_ENFORCED_TOOLS = new Set(COARSE_SHELL_TOOLS);
433386
- }
433387
- });
433388
-
433389
- // node_modules/@sema-agent/core/dist/core/runner/active-skill-scope.js
433390
- var init_active_skill_scope = __esm({
433391
- "node_modules/@sema-agent/core/dist/core/runner/active-skill-scope.js"() {
433392
- init_safety();
433393
- init_session_rule_policy();
433394
- init_skill_tool_specifier();
433395
- }
433396
- });
433397
-
433398
- // node_modules/@sema-agent/core/dist/core/runner/prepare-announce-once.js
433399
- var init_prepare_announce_once = __esm({
433400
- "node_modules/@sema-agent/core/dist/core/runner/prepare-announce-once.js"() {
433554
+ // node_modules/@sema-agent/core/dist/core/runner/announce-once-ledger.js
433555
+ var init_announce_once_ledger = __esm({
433556
+ "node_modules/@sema-agent/core/dist/core/runner/announce-once-ledger.js"() {
433401
433557
  init_untrusted_egress();
433402
433558
  init_untrusted_text();
433403
433559
  }
433404
433560
  });
433405
433561
 
433406
- // node_modules/@sema-agent/core/dist/core/hooks.js
433407
- var objectPrototype, init_hooks3 = __esm({
433408
- "node_modules/@sema-agent/core/dist/core/hooks.js"() {
433409
- init_tool_policy();
433410
- init_ask_class();
433411
- init_ask_origin();
433412
- init_auto_mode();
433413
- init_untrusted_text();
433414
- init_reminder_mint();
433415
- init_checkpoint_store();
433416
- init_ask_question();
433417
- init_safe_notify();
433418
- init_permission_rule_org();
433419
- objectPrototype = Object.prototype;
433420
- }
433421
- });
433422
-
433423
- // node_modules/@sema-agent/core/dist/core/sensitive-path-policy.js
433424
- var CASE_INSENSITIVE_FS3, init_sensitive_path_policy = __esm({
433425
- "node_modules/@sema-agent/core/dist/core/sensitive-path-policy.js"() {
433426
- init_safety();
433427
- init_read_deny();
433428
- CASE_INSENSITIVE_FS3 = process.platform === "darwin" || process.platform === "win32";
433429
- }
433430
- });
433431
-
433432
- // node_modules/@sema-agent/core/dist/core/write-protect.js
433433
- var freezeTable, WRITE_PROTECTED_DEFAULT_TABLE, init_write_protect = __esm({
433434
- "node_modules/@sema-agent/core/dist/core/write-protect.js"() {
433435
- init_safety();
433436
- init_session_rule_policy();
433437
- init_sensitive_path_policy();
433438
- freezeTable = (rows2) => Object.freeze(rows2.map((r) => Object.freeze(r))), WRITE_PROTECTED_DEFAULT_TABLE = freezeTable([
433439
- { name: ".gitconfig", kind: "basename" },
433440
- { name: ".gitmodules", kind: "basename" },
433441
- { name: ".bashrc", kind: "basename" },
433442
- { name: ".bash_profile", kind: "basename" },
433443
- { name: ".zshrc", kind: "basename" },
433444
- { name: ".zprofile", kind: "basename" },
433445
- { name: ".profile", kind: "basename" },
433446
- { name: ".zshenv", kind: "basename" },
433447
- { name: ".zlogin", kind: "basename" },
433448
- { name: ".zlogout", kind: "basename" },
433449
- { name: ".bash_login", kind: "basename" },
433450
- { name: ".bash_aliases", kind: "basename" },
433451
- { name: ".bash_logout", kind: "basename" },
433452
- { name: ".envrc", kind: "basename" },
433453
- { name: ".ripgreprc", kind: "basename" },
433454
- { name: ".mcp.json", kind: "basename" },
433455
- { name: ".claude.json", kind: "basename" },
433456
- { name: ".npmrc", kind: "basename" },
433457
- { name: ".yarnrc", kind: "basename" },
433458
- { name: ".yarnrc.yml", kind: "basename" },
433459
- { name: ".pnp.cjs", kind: "basename" },
433460
- { name: ".pnp.loader.mjs", kind: "basename" },
433461
- { name: ".pnpmfile.cjs", kind: "basename" },
433462
- { name: "bunfig.toml", kind: "basename" },
433463
- { name: ".bunfig.toml", kind: "basename" },
433464
- { name: ".bazelrc", kind: "basename" },
433465
- { name: ".bazelversion", kind: "basename" },
433466
- { name: ".bazeliskrc", kind: "basename" },
433467
- { name: ".pre-commit-config.yaml", kind: "basename" },
433468
- { name: "lefthook.yml", kind: "basename" },
433469
- { name: ".lefthook.yml", kind: "basename" },
433470
- { name: "lefthook.yaml", kind: "basename" },
433471
- { name: ".lefthook.yaml", kind: "basename" },
433472
- { name: "gradle-wrapper.properties", kind: "basename" },
433473
- { name: "maven-wrapper.properties", kind: "basename" },
433474
- { name: ".devcontainer.json", kind: "basename" },
433475
- { name: "pyrightconfig.json", kind: "basename" },
433476
- { name: ".git", kind: "segment" },
433477
- { name: ".vscode", kind: "segment" },
433478
- { name: ".idea", kind: "segment" },
433479
- { name: ".claude", kind: "segment" },
433480
- { name: ".husky", kind: "segment" },
433481
- { name: ".cargo", kind: "segment" },
433482
- { name: ".devcontainer", kind: "segment" },
433483
- { name: ".yarn", kind: "segment" },
433484
- { name: ".mvn", kind: "segment" },
433485
- { name: ".config/git", kind: "segment-run" },
433486
- { name: ".ssh", kind: "segment" },
433487
- { name: ".gnupg", kind: "segment" },
433488
- { name: ".sema.json", kind: "basename" },
433489
- { name: ".sema", kind: "segment" }
433490
- ]);
433491
- }
433492
- });
433493
-
433494
- // node_modules/@sema-agent/core/dist/core/cache-break-detector.js
433495
- var SERVER_GAP_MS, init_cache_break_detector = __esm({
433496
- "node_modules/@sema-agent/core/dist/core/cache-break-detector.js"() {
433497
- SERVER_GAP_MS = 5 * 6e4;
433498
- }
433499
- });
433500
-
433501
433562
  // node_modules/@sema-agent/core/dist/brain/timeout.js
433502
433563
  var init_timeout = __esm({
433503
433564
  "node_modules/@sema-agent/core/dist/brain/timeout.js"() {
433504
433565
  }
433505
433566
  });
433506
433567
 
433507
- // node_modules/@sema-agent/core/dist/core/tool-name-aliases.js
433508
- var RETIRED_TOOL_NAMES, init_tool_name_aliases = __esm({
433509
- "node_modules/@sema-agent/core/dist/core/tool-name-aliases.js"() {
433510
- RETIRED_TOOL_NAMES = /* @__PURE__ */ new Map([
433511
- ["read_file", 'renamed "Read"'],
433512
- ["edit_file", 'renamed "Edit"'],
433513
- ["write_file", 'renamed "Write"'],
433514
- ["bash", 'renamed "Bash"'],
433515
- ["bash_readonly", 'folded into "Bash" (read-only posture rides handsReadOnly/shellGate, not a tool name)'],
433516
- ["glob", 'renamed "Glob"'],
433517
- ["grep", 'renamed "Grep"'],
433518
- ["web_fetch", 'renamed "WebFetch"'],
433519
- ["tool_search", 'renamed "ToolSearch"'],
433520
- ["skill", 'renamed "Skill"'],
433521
- ["present_plan", 'renamed "ExitPlanMode"'],
433522
- ["enter_plan_mode", 'renamed "EnterPlanMode"'],
433523
- ["spawn_subagent", 'renamed "Agent"'],
433524
- ["CronCancel", 'renamed "CronDelete"'],
433525
- ["lsp", 'renamed "LSP"'],
433526
- ["submit_output", 'renamed "StructuredOutput"'],
433527
- ["repo_map", 'renamed "RepoMap"'],
433528
- ["read_tool_result", 'renamed "ReadToolResult"'],
433529
- ["report_blocked", 'renamed "ReportBlocked"'],
433530
- ["declare_done", 'renamed "DeclareDone"'],
433531
- ["run_workflow", 'renamed "Workflow"'],
433532
- ["RunWorkflow", 'renamed "Workflow"'],
433533
- ["Task", 'renamed "Agent" (a deployment-defined tool named "Task" is fine \u2014 this fires only when the name matches nothing in the roster)'],
433534
- ["BashOutput", 'renamed "TaskOutput"'],
433535
- ["AgentOutputTool", 'renamed "TaskOutput"'],
433536
- ["BashOutputTool", 'renamed "TaskOutput"'],
433537
- ["AgentOutput", 'renamed "TaskOutput"'],
433538
- ["WorkflowStatus", 'folded into "TaskOutput" (poll by runId)'],
433539
- ["KillShell", 'renamed "TaskStop"'],
433540
- ["KillBash", 'renamed "TaskStop"'],
433541
- ["ListMcpResources", 'renamed "ListMcpResourcesTool"'],
433542
- ["ReadMcpResource", 'renamed "ReadMcpResourceTool"'],
433543
- ["ReadMcpResourceDir", 'renamed "ReadMcpResourceDirTool"'],
433544
- ["MultiEdit", 'removed \u2014 "Edit" accepts the edits[] shape'],
433545
- ["Fork", 'removed \u2014 use Agent with subagent_type: "fork"'],
433546
- ["Sleep", 'removed \u2014 schedule a re-wake with CronCreate({schedule:{kind:"delay"}}) or wait with Monitor'],
433547
- ["Remember", "removed \u2014 memory is file-based; write the memory directory with the ordinary file tools"],
433548
- ["remember", "removed \u2014 memory is file-based; write the memory directory with the ordinary file tools"],
433549
- ["Recall", "removed \u2014 memory is file-based; read the memory directory with the ordinary file tools"],
433550
- ["recall", "removed \u2014 memory is file-based; read the memory directory with the ordinary file tools"]
433551
- ]);
433552
- }
433553
- });
433554
-
433555
- // node_modules/@sema-agent/core/dist/core/lsp-protocol.js
433556
- var init_lsp_protocol = __esm({
433557
- "node_modules/@sema-agent/core/dist/core/lsp-protocol.js"() {
433558
- }
433559
- });
433560
-
433561
- // node_modules/@sema-agent/core/dist/core/shared-memory/types.js
433562
- var SHARED_MEMORY_LIST_TOOL_NAME, SHARED_MEMORY_READ_TOOL_NAME, init_types27 = __esm({
433563
- "node_modules/@sema-agent/core/dist/core/shared-memory/types.js"() {
433564
- SHARED_MEMORY_LIST_TOOL_NAME = "memory_list", SHARED_MEMORY_READ_TOOL_NAME = "memory_read";
433565
- }
433566
- });
433567
-
433568
- // node_modules/@sema-agent/core/dist/core/shared-memory/normalize.js
433569
- var init_normalize = __esm({
433570
- "node_modules/@sema-agent/core/dist/core/shared-memory/normalize.js"() {
433571
- init_untrusted_text();
433572
- init_types27();
433573
- }
433574
- });
433575
-
433576
- // node_modules/@sema-agent/core/dist/core/shared-memory/tools.js
433577
- var LIST_HINT, LIST_DESCRIPTION, READ_HINT, READ_DESCRIPTION, init_tools4 = __esm({
433578
- "node_modules/@sema-agent/core/dist/core/shared-memory/tools.js"() {
433579
- init_build3();
433580
- init_tools3();
433581
- init_normalize();
433582
- init_types27();
433583
- LIST_HINT = "List shared memory stores and their documents \u2014 check here before telling the user you do not have something.", LIST_DESCRIPTION = [
433584
- LIST_HINT,
433585
- "",
433586
- `List the memory documents in a memory store, sorted by path \u2014 each line gives a document's path, size, and last-updated date, but no content (use ${SHARED_MEMORY_READ_TOOL_NAME} for that). Pass store (the store's id) to choose the store, path_prefix to list one directory, and the cursor from a previous call to continue a long listing. Call with no arguments at all to list the memory stores connected to this session \u2014 their ids, a one-line description, and whether each is writable or read-only; that set can change during the session, so re-check it whenever you are unsure which store to use.`,
433587
- "",
433588
- "When store is omitted this call lists the stores themselves, and path_prefix and cursor are ignored.",
433589
- "",
433590
- `Call ${SHARED_MEMORY_LIST_TOOL_NAME} early when context about the project or the work in it would help \u2014 and always before telling the user you do not have something. If a listed document looks relevant, ${SHARED_MEMORY_READ_TOOL_NAME} it.`
433591
- ].join(`
433592
- `), READ_HINT = "Read one shared memory document by store id and path \u2014 treat it as a past snapshot, not the answer.", READ_DESCRIPTION = [
433593
- READ_HINT,
433594
- "",
433595
- "Read one memory document from a memory store by its store id and path.",
433596
- "",
433597
- "Read your memory often so corrections stick. Treat memories as past snapshots to verify against current sources, not the definitive answer.",
433598
- "",
433599
- "## When to access memories",
433600
- "- When memories seem relevant, or the user references prior work with them or others in their organization.",
433601
- "- You MUST access memory when the user explicitly asks you to check, recall, or remember.",
433602
- `- Call ${SHARED_MEMORY_LIST_TOOL_NAME} early when context about the project would help, and always before telling the user you do not have something; if a listed document looks relevant, ${SHARED_MEMORY_READ_TOOL_NAME} it.`,
433603
- "- If the user says to *ignore* or *not use* memory: Do not apply remembered facts, cite, compare against, or mention memory content.",
433604
- "- Memory records can become stale over time. Use memory as context for what was true at a given point in time. Before answering the user or building assumptions based solely on information in memory records, verify that the memory is still correct and up-to-date by reading the current state of the files or resources. If a recalled memory conflicts with current information, trust what you observe now \u2014 and update or remove the stale memory rather than acting on it.",
433605
- "",
433606
- "## Before recommending from memory",
433607
- "",
433608
- "A memory that names a specific function, file, or flag is a claim that it existed *when the memory was written*. It may have been renamed, removed, or never merged. Before recommending it:",
433609
- "",
433610
- "- If the memory names a file path: check the file exists.",
433611
- "- If the memory names a function or flag: grep for it.",
433612
- "- If the user is about to act on your recommendation (not just asking about history), verify first.",
433613
- "",
433614
- '"The memory says X exists" is not the same as "X exists now."',
433615
- "",
433616
- "A memory that summarizes repo state (activity logs, architecture snapshots) is frozen in time. If the user asks about *recent* or *current* state, prefer `git log` or reading the code over recalling the snapshot."
433617
- ].join(`
433618
- `);
433619
- }
433620
- });
433621
-
433622
433568
  // node_modules/@sema-agent/core/dist/core/memory-vector.js
433623
433569
  var init_memory_vector = __esm({
433624
433570
  "node_modules/@sema-agent/core/dist/core/memory-vector.js"() {
@@ -433689,7 +433635,7 @@ var CONSOLIDATION_DEFAULTS, CONSOLIDATION_SEAT_FREEZE_GRACE_MS, init_consolidati
433689
433635
  });
433690
433636
 
433691
433637
  // node_modules/@sema-agent/core/dist/core/memory-engine/tools.js
433692
- var MEMORY_SEARCH_TOOL_NAME2, MEMORY_GET_TOOL_NAME2, MEMORY_INDEX_TOOL_NAME, MEMORY_INDEX_PAGE_CAP_BYTES, MEMORY_GET_PAGE_CAP_BYTES, SEARCH_HINT, FENCE_SEMANTICS_SENTENCE, SEARCH_DESCRIPTION, GET_HINT, GET_DESCRIPTION, INDEX_HINT, INDEX_DESCRIPTION, init_tools5 = __esm({
433638
+ var MEMORY_SEARCH_TOOL_NAME2, MEMORY_GET_TOOL_NAME2, MEMORY_INDEX_TOOL_NAME, MEMORY_INDEX_PAGE_CAP_BYTES, MEMORY_GET_PAGE_CAP_BYTES, SEARCH_HINT, FENCE_SEMANTICS_SENTENCE, SEARCH_DESCRIPTION, GET_HINT, GET_DESCRIPTION, INDEX_HINT, INDEX_DESCRIPTION, init_tools4 = __esm({
433693
433639
  "node_modules/@sema-agent/core/dist/core/memory-engine/tools.js"() {
433694
433640
  init_build3();
433695
433641
  init_tools3();
@@ -433727,12 +433673,6 @@ var MEMORY_SEARCH_TOOL_NAME2, MEMORY_GET_TOOL_NAME2, MEMORY_INDEX_TOOL_NAME, MEM
433727
433673
  }
433728
433674
  });
433729
433675
 
433730
- // node_modules/@sema-agent/core/dist/core/compliance.js
433731
- var init_compliance = __esm({
433732
- "node_modules/@sema-agent/core/dist/core/compliance.js"() {
433733
- }
433734
- });
433735
-
433736
433676
  // node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js
433737
433677
  var init_dual_root = __esm({
433738
433678
  "node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js"() {
@@ -433870,12 +433810,383 @@ var init_prepare_memory = __esm({
433870
433810
  init_engine5();
433871
433811
  init_memory_capture_optout();
433872
433812
  init_layout2();
433873
- init_tools5();
433813
+ init_tools4();
433874
433814
  init_scope_contract();
433875
433815
  init_file_backend();
433876
433816
  }
433877
433817
  });
433878
433818
 
433819
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-memory-engine-session.js
433820
+ var init_prepare_memory_engine_session = __esm({
433821
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-memory-engine-session.js"() {
433822
+ init_content_origin();
433823
+ init_delegation_provenance();
433824
+ init_delegation_settlement();
433825
+ init_protocol_table();
433826
+ init_types21();
433827
+ init_untrusted_text();
433828
+ init_safety();
433829
+ }
433830
+ });
433831
+
433832
+ // node_modules/@sema-agent/core/dist/core/shared-memory/types.js
433833
+ var SHARED_MEMORY_LIST_TOOL_NAME, SHARED_MEMORY_READ_TOOL_NAME, init_types27 = __esm({
433834
+ "node_modules/@sema-agent/core/dist/core/shared-memory/types.js"() {
433835
+ SHARED_MEMORY_LIST_TOOL_NAME = "memory_list", SHARED_MEMORY_READ_TOOL_NAME = "memory_read";
433836
+ }
433837
+ });
433838
+
433839
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-defer-classify.js
433840
+ var init_prepare_defer_classify = __esm({
433841
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-defer-classify.js"() {
433842
+ init_tool_catalog();
433843
+ init_fs();
433844
+ init_ask_question();
433845
+ init_tools4();
433846
+ init_types27();
433847
+ init_tool_disclosure();
433848
+ }
433849
+ });
433850
+
433851
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-listings.js
433852
+ var init_prepare_listings = __esm({
433853
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-listings.js"() {
433854
+ init_default6();
433855
+ init_synthetic_tools();
433856
+ init_turn_attachments();
433857
+ }
433858
+ });
433859
+
433860
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-prompt-inputs.js
433861
+ var init_prepare_prompt_inputs = __esm({
433862
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-prompt-inputs.js"() {
433863
+ init_default6();
433864
+ init_remote_env();
433865
+ init_git_status_frame();
433866
+ init_turn_attachments();
433867
+ }
433868
+ });
433869
+
433870
+ // node_modules/@sema-agent/core/dist/core/shared-memory/normalize.js
433871
+ var init_normalize = __esm({
433872
+ "node_modules/@sema-agent/core/dist/core/shared-memory/normalize.js"() {
433873
+ init_untrusted_text();
433874
+ init_types27();
433875
+ }
433876
+ });
433877
+
433878
+ // node_modules/@sema-agent/core/dist/core/shared-memory/tools.js
433879
+ var LIST_HINT, LIST_DESCRIPTION, READ_HINT, READ_DESCRIPTION, init_tools5 = __esm({
433880
+ "node_modules/@sema-agent/core/dist/core/shared-memory/tools.js"() {
433881
+ init_build3();
433882
+ init_tools3();
433883
+ init_normalize();
433884
+ init_types27();
433885
+ LIST_HINT = "List shared memory stores and their documents \u2014 check here before telling the user you do not have something.", LIST_DESCRIPTION = [
433886
+ LIST_HINT,
433887
+ "",
433888
+ `List the memory documents in a memory store, sorted by path \u2014 each line gives a document's path, size, and last-updated date, but no content (use ${SHARED_MEMORY_READ_TOOL_NAME} for that). Pass store (the store's id) to choose the store, path_prefix to list one directory, and the cursor from a previous call to continue a long listing. Call with no arguments at all to list the memory stores connected to this session \u2014 their ids, a one-line description, and whether each is writable or read-only; that set can change during the session, so re-check it whenever you are unsure which store to use.`,
433889
+ "",
433890
+ "When store is omitted this call lists the stores themselves, and path_prefix and cursor are ignored.",
433891
+ "",
433892
+ `Call ${SHARED_MEMORY_LIST_TOOL_NAME} early when context about the project or the work in it would help \u2014 and always before telling the user you do not have something. If a listed document looks relevant, ${SHARED_MEMORY_READ_TOOL_NAME} it.`
433893
+ ].join(`
433894
+ `), READ_HINT = "Read one shared memory document by store id and path \u2014 treat it as a past snapshot, not the answer.", READ_DESCRIPTION = [
433895
+ READ_HINT,
433896
+ "",
433897
+ "Read one memory document from a memory store by its store id and path.",
433898
+ "",
433899
+ "Read your memory often so corrections stick. Treat memories as past snapshots to verify against current sources, not the definitive answer.",
433900
+ "",
433901
+ "## When to access memories",
433902
+ "- When memories seem relevant, or the user references prior work with them or others in their organization.",
433903
+ "- You MUST access memory when the user explicitly asks you to check, recall, or remember.",
433904
+ `- Call ${SHARED_MEMORY_LIST_TOOL_NAME} early when context about the project would help, and always before telling the user you do not have something; if a listed document looks relevant, ${SHARED_MEMORY_READ_TOOL_NAME} it.`,
433905
+ "- If the user says to *ignore* or *not use* memory: Do not apply remembered facts, cite, compare against, or mention memory content.",
433906
+ "- Memory records can become stale over time. Use memory as context for what was true at a given point in time. Before answering the user or building assumptions based solely on information in memory records, verify that the memory is still correct and up-to-date by reading the current state of the files or resources. If a recalled memory conflicts with current information, trust what you observe now \u2014 and update or remove the stale memory rather than acting on it.",
433907
+ "",
433908
+ "## Before recommending from memory",
433909
+ "",
433910
+ "A memory that names a specific function, file, or flag is a claim that it existed *when the memory was written*. It may have been renamed, removed, or never merged. Before recommending it:",
433911
+ "",
433912
+ "- If the memory names a file path: check the file exists.",
433913
+ "- If the memory names a function or flag: grep for it.",
433914
+ "- If the user is about to act on your recommendation (not just asking about history), verify first.",
433915
+ "",
433916
+ '"The memory says X exists" is not the same as "X exists now."',
433917
+ "",
433918
+ "A memory that summarizes repo state (activity logs, architecture snapshots) is frozen in time. If the user asks about *recent* or *current* state, prefer `git log` or reading the code over recalling the snapshot."
433919
+ ].join(`
433920
+ `);
433921
+ }
433922
+ });
433923
+
433924
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-project-context.js
433925
+ var init_prepare_project_context = __esm({
433926
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-project-context.js"() {
433927
+ init_default6();
433928
+ init_tools4();
433929
+ init_memory4();
433930
+ init_session4();
433931
+ init_tools5();
433932
+ init_types27();
433933
+ init_tools3();
433934
+ init_synthetic_tools();
433935
+ }
433936
+ });
433937
+
433938
+ // node_modules/@sema-agent/core/dist/core/hooks.js
433939
+ var objectPrototype, init_hooks3 = __esm({
433940
+ "node_modules/@sema-agent/core/dist/core/hooks.js"() {
433941
+ init_tool_policy();
433942
+ init_ask_class();
433943
+ init_ask_origin();
433944
+ init_auto_mode();
433945
+ init_untrusted_text();
433946
+ init_reminder_mint();
433947
+ init_checkpoint_store();
433948
+ init_ask_question();
433949
+ init_safe_notify();
433950
+ init_permission_rule_org();
433951
+ objectPrototype = Object.prototype;
433952
+ }
433953
+ });
433954
+
433955
+ // node_modules/@sema-agent/core/dist/core/tool-name-aliases.js
433956
+ var RETIRED_TOOL_NAMES, init_tool_name_aliases = __esm({
433957
+ "node_modules/@sema-agent/core/dist/core/tool-name-aliases.js"() {
433958
+ RETIRED_TOOL_NAMES = /* @__PURE__ */ new Map([
433959
+ ["read_file", 'renamed "Read"'],
433960
+ ["edit_file", 'renamed "Edit"'],
433961
+ ["write_file", 'renamed "Write"'],
433962
+ ["bash", 'renamed "Bash"'],
433963
+ ["bash_readonly", 'folded into "Bash" (read-only posture rides handsReadOnly/shellGate, not a tool name)'],
433964
+ ["glob", 'renamed "Glob"'],
433965
+ ["grep", 'renamed "Grep"'],
433966
+ ["web_fetch", 'renamed "WebFetch"'],
433967
+ ["tool_search", 'renamed "ToolSearch"'],
433968
+ ["skill", 'renamed "Skill"'],
433969
+ ["present_plan", 'renamed "ExitPlanMode"'],
433970
+ ["enter_plan_mode", 'renamed "EnterPlanMode"'],
433971
+ ["spawn_subagent", 'renamed "Agent"'],
433972
+ ["CronCancel", 'renamed "CronDelete"'],
433973
+ ["lsp", 'renamed "LSP"'],
433974
+ ["submit_output", 'renamed "StructuredOutput"'],
433975
+ ["repo_map", 'renamed "RepoMap"'],
433976
+ ["read_tool_result", 'renamed "ReadToolResult"'],
433977
+ ["report_blocked", 'renamed "ReportBlocked"'],
433978
+ ["declare_done", 'renamed "DeclareDone"'],
433979
+ ["run_workflow", 'renamed "Workflow"'],
433980
+ ["RunWorkflow", 'renamed "Workflow"'],
433981
+ ["Task", 'renamed "Agent" (a deployment-defined tool named "Task" is fine \u2014 this fires only when the name matches nothing in the roster)'],
433982
+ ["BashOutput", 'renamed "TaskOutput"'],
433983
+ ["AgentOutputTool", 'renamed "TaskOutput"'],
433984
+ ["BashOutputTool", 'renamed "TaskOutput"'],
433985
+ ["AgentOutput", 'renamed "TaskOutput"'],
433986
+ ["WorkflowStatus", 'folded into "TaskOutput" (poll by runId)'],
433987
+ ["KillShell", 'renamed "TaskStop"'],
433988
+ ["KillBash", 'renamed "TaskStop"'],
433989
+ ["ListMcpResources", 'renamed "ListMcpResourcesTool"'],
433990
+ ["ReadMcpResource", 'renamed "ReadMcpResourceTool"'],
433991
+ ["ReadMcpResourceDir", 'renamed "ReadMcpResourceDirTool"'],
433992
+ ["MultiEdit", 'removed \u2014 "Edit" accepts the edits[] shape'],
433993
+ ["Fork", 'removed \u2014 use Agent with subagent_type: "fork"'],
433994
+ ["Sleep", 'removed \u2014 schedule a re-wake with CronCreate({schedule:{kind:"delay"}}) or wait with Monitor'],
433995
+ ["Remember", "removed \u2014 memory is file-based; write the memory directory with the ordinary file tools"],
433996
+ ["remember", "removed \u2014 memory is file-based; write the memory directory with the ordinary file tools"],
433997
+ ["Recall", "removed \u2014 memory is file-based; read the memory directory with the ordinary file tools"],
433998
+ ["recall", "removed \u2014 memory is file-based; read the memory directory with the ordinary file tools"]
433999
+ ]);
434000
+ }
434001
+ });
434002
+
434003
+ // node_modules/@sema-agent/core/dist/core/runner/session-rule-policy.js
434004
+ var PATH_WRITE_TOOLS, PATH_CONFINABLE_WRITE_TOOLS, init_session_rule_policy = __esm({
434005
+ "node_modules/@sema-agent/core/dist/core/runner/session-rule-policy.js"() {
434006
+ init_safety();
434007
+ init_safety();
434008
+ init_tool_policy();
434009
+ PATH_WRITE_TOOLS = /* @__PURE__ */ new Set(["Write", "Edit", "MultiEdit"]), PATH_CONFINABLE_WRITE_TOOLS = /* @__PURE__ */ new Set([...PATH_WRITE_TOOLS, "NotebookEdit"]);
434010
+ }
434011
+ });
434012
+
434013
+ // node_modules/@sema-agent/core/dist/core/skill-tool-specifier.js
434014
+ var SPECIFIER_ENFORCED_TOOLS, init_skill_tool_specifier = __esm({
434015
+ "node_modules/@sema-agent/core/dist/core/skill-tool-specifier.js"() {
434016
+ init_permission_rules();
434017
+ init_tool_policy();
434018
+ init_bash_readonly_classifier();
434019
+ SPECIFIER_ENFORCED_TOOLS = new Set(COARSE_SHELL_TOOLS);
434020
+ }
434021
+ });
434022
+
434023
+ // node_modules/@sema-agent/core/dist/core/runner/active-skill-scope.js
434024
+ var init_active_skill_scope = __esm({
434025
+ "node_modules/@sema-agent/core/dist/core/runner/active-skill-scope.js"() {
434026
+ init_safety();
434027
+ init_session_rule_policy();
434028
+ init_skill_tool_specifier();
434029
+ }
434030
+ });
434031
+
434032
+ // node_modules/@sema-agent/core/dist/core/runner/denial-limit-arms.js
434033
+ var init_denial_limit_arms = __esm({
434034
+ "node_modules/@sema-agent/core/dist/core/runner/denial-limit-arms.js"() {
434035
+ init_auto_mode();
434036
+ init_auto_mode_arming();
434037
+ init_types21();
434038
+ init_untrusted_text();
434039
+ init_ask_origin();
434040
+ }
434041
+ });
434042
+
434043
+ // node_modules/@sema-agent/core/dist/core/runner/inherited-ask-grants.js
434044
+ var init_inherited_ask_grants = __esm({
434045
+ "node_modules/@sema-agent/core/dist/core/runner/inherited-ask-grants.js"() {
434046
+ init_arg_summary();
434047
+ init_tool_policy();
434048
+ }
434049
+ });
434050
+
434051
+ // node_modules/@sema-agent/core/dist/core/runner/permission-rule-lanes.js
434052
+ var init_permission_rule_lanes = __esm({
434053
+ "node_modules/@sema-agent/core/dist/core/runner/permission-rule-lanes.js"() {
434054
+ init_hooks3();
434055
+ init_permission_rule_model();
434056
+ init_permission_rule_org();
434057
+ }
434058
+ });
434059
+
434060
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-policy-chain.js
434061
+ var init_prepare_policy_chain = __esm({
434062
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-policy-chain.js"() {
434063
+ init_send_message_tool();
434064
+ init_ask_class();
434065
+ init_ask_question();
434066
+ init_checkpoint_store();
434067
+ init_hooks3();
434068
+ init_permission_rules();
434069
+ init_remote_env();
434070
+ init_tool_policy();
434071
+ init_tool_name_aliases();
434072
+ init_protocol_table();
434073
+ init_trace();
434074
+ init_active_skill_scope();
434075
+ init_denial_limit_arms();
434076
+ init_inherited_ask_grants();
434077
+ init_permission_rule_lanes();
434078
+ init_session_rule_policy();
434079
+ }
434080
+ });
434081
+
434082
+ // node_modules/@sema-agent/core/dist/core/media-byte-cap.js
434083
+ var init_media_byte_cap = __esm({
434084
+ "node_modules/@sema-agent/core/dist/core/media-byte-cap.js"() {
434085
+ }
434086
+ });
434087
+
434088
+ // node_modules/@sema-agent/core/dist/core/tool-result-budget.js
434089
+ var init_tool_result_budget = __esm({
434090
+ "node_modules/@sema-agent/core/dist/core/tool-result-budget.js"() {
434091
+ init_message_utils();
434092
+ init_tool_result_store();
434093
+ }
434094
+ });
434095
+
434096
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-context-lane.js
434097
+ var init_prepare_context_lane = __esm({
434098
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-context-lane.js"() {
434099
+ init_harness();
434100
+ init_context_edit();
434101
+ init_context_guard();
434102
+ init_media_byte_cap();
434103
+ init_tool_result_budget();
434104
+ init_tool_result_store();
434105
+ init_trace();
434106
+ init_types21();
434107
+ init_git_status_frame();
434108
+ }
434109
+ });
434110
+
434111
+ // node_modules/@sema-agent/core/dist/prompt-assembly/composer.js
434112
+ var SINGLE_BLOCK_LAYOUT, init_composer = __esm({
434113
+ "node_modules/@sema-agent/core/dist/prompt-assembly/composer.js"() {
434114
+ SINGLE_BLOCK_LAYOUT = { groups: [{ groupId: "body", untilRank: Number.POSITIVE_INFINITY, cacheControlBoundary: !0 }] };
434115
+ }
434116
+ });
434117
+
434118
+ // node_modules/@sema-agent/core/dist/prompt-assembly/assemble.js
434119
+ var init_assemble = __esm({
434120
+ "node_modules/@sema-agent/core/dist/prompt-assembly/assemble.js"() {
434121
+ init_default6();
434122
+ init_composer();
434123
+ init_sema_default();
434124
+ }
434125
+ });
434126
+
434127
+ // node_modules/@sema-agent/core/dist/prompt-assembly/artifact.js
434128
+ var init_artifact = __esm({
434129
+ "node_modules/@sema-agent/core/dist/prompt-assembly/artifact.js"() {
434130
+ init_epoch();
434131
+ }
434132
+ });
434133
+
434134
+ // node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js
434135
+ var init_turn_snapshot = __esm({
434136
+ "node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js"() {
434137
+ init_epoch();
434138
+ }
434139
+ });
434140
+
434141
+ // node_modules/@sema-agent/core/dist/core/cache-break-detector.js
434142
+ var SERVER_GAP_MS, init_cache_break_detector = __esm({
434143
+ "node_modules/@sema-agent/core/dist/core/cache-break-detector.js"() {
434144
+ SERVER_GAP_MS = 5 * 6e4;
434145
+ }
434146
+ });
434147
+
434148
+ // node_modules/@sema-agent/core/dist/core/runner/prompt-hash-salt.js
434149
+ import { randomBytes as randomBytes25 } from "node:crypto";
434150
+ var PROMPT_HASH_SALT, init_prompt_hash_salt = __esm({
434151
+ "node_modules/@sema-agent/core/dist/core/runner/prompt-hash-salt.js"() {
434152
+ PROMPT_HASH_SALT = randomBytes25(16);
434153
+ }
434154
+ });
434155
+
434156
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-turn-wiring.js
434157
+ var init_prepare_turn_wiring = __esm({
434158
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-turn-wiring.js"() {
434159
+ init_assemble();
434160
+ init_artifact();
434161
+ init_turn_snapshot();
434162
+ init_cache_break_detector();
434163
+ init_task_registry();
434164
+ init_tool_policy();
434165
+ init_encoding();
434166
+ init_fs();
434167
+ init_safety();
434168
+ init_prompt_hash_salt();
434169
+ init_turn_attachments();
434170
+ }
434171
+ });
434172
+
434173
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-prompt-assembly.js
434174
+ var init_prepare_prompt_assembly = __esm({
434175
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-prompt-assembly.js"() {
434176
+ init_send_message_tool();
434177
+ init_assemble();
434178
+ init_artifact();
434179
+ init_epoch();
434180
+ init_sema_default();
434181
+ init_tool_catalog();
434182
+ init_default6();
434183
+ init_protocol_table();
434184
+ init_reminder_mint();
434185
+ init_session4();
434186
+ init_prompt_hash_salt();
434187
+ }
434188
+ });
434189
+
433879
434190
  // node_modules/@sema-agent/core/dist/core/retention.js
433880
434191
  var init_retention = __esm({
433881
434192
  "node_modules/@sema-agent/core/dist/core/retention.js"() {
@@ -433936,13 +434247,12 @@ var TASK_LIMIT_KEY_DICT, TASK_LIMIT_KEYS, init_prepare_config_doors = __esm({
433936
434247
  });
433937
434248
 
433938
434249
  // node_modules/@sema-agent/core/dist/core/runner/prepare-safety-scan.js
433939
- var NAMESPACED_NAME_SHAPES, init_prepare_safety_scan = __esm({
434250
+ var init_prepare_safety_scan = __esm({
433940
434251
  "node_modules/@sema-agent/core/dist/core/runner/prepare-safety-scan.js"() {
433941
434252
  init_protocol_table();
433942
434253
  init_fs();
433943
434254
  init_tool_result_store();
433944
434255
  init_present_plan_tool();
433945
- NAMESPACED_NAME_SHAPES = PROTOCOL_TABLE.map((ns) => `${ns.prefix}<peer>__<tool>`).join(", ");
433946
434256
  }
433947
434257
  });
433948
434258
 
@@ -433971,17 +434281,9 @@ var init_session_file_state_replay = __esm({
433971
434281
  }
433972
434282
  });
433973
434283
 
433974
- // node_modules/@sema-agent/core/dist/core/with-retry.js
433975
- var init_with_retry = __esm({
433976
- "node_modules/@sema-agent/core/dist/core/with-retry.js"() {
433977
- }
433978
- });
433979
-
433980
- // node_modules/@sema-agent/core/dist/core/runner/prepare-workspace-restore.js
433981
- var init_prepare_workspace_restore = __esm({
433982
- "node_modules/@sema-agent/core/dist/core/runner/prepare-workspace-restore.js"() {
433983
- init_remote_env();
433984
- init_with_retry();
434284
+ // node_modules/@sema-agent/core/dist/core/runner/workspace-path.js
434285
+ var init_workspace_path = __esm({
434286
+ "node_modules/@sema-agent/core/dist/core/runner/workspace-path.js"() {
433985
434287
  }
433986
434288
  });
433987
434289
 
@@ -433997,57 +434299,68 @@ var init_prepare_hands_readface = __esm({
433997
434299
  init_encoding();
433998
434300
  init_session_file_state_replay();
433999
434301
  init_types21();
434000
- init_prepare_workspace_restore();
434302
+ init_workspace_path();
434001
434303
  }
434002
434304
  });
434003
434305
 
434004
- // node_modules/@sema-agent/core/dist/core/runner/edited-files-ledger.js
434005
- var init_edited_files_ledger = __esm({
434006
- "node_modules/@sema-agent/core/dist/core/runner/edited-files-ledger.js"() {
434306
+ // node_modules/@sema-agent/core/dist/core/with-retry.js
434307
+ var init_with_retry = __esm({
434308
+ "node_modules/@sema-agent/core/dist/core/with-retry.js"() {
434007
434309
  }
434008
434310
  });
434009
434311
 
434010
- // node_modules/@sema-agent/core/dist/prompt-assembly/composer.js
434011
- var SINGLE_BLOCK_LAYOUT, init_composer = __esm({
434012
- "node_modules/@sema-agent/core/dist/prompt-assembly/composer.js"() {
434013
- SINGLE_BLOCK_LAYOUT = { groups: [{ groupId: "body", untilRank: Number.POSITIVE_INFINITY, cacheControlBoundary: !0 }] };
434312
+ // node_modules/@sema-agent/core/dist/core/runner/remote-env-retry.js
434313
+ var init_remote_env_retry = __esm({
434314
+ "node_modules/@sema-agent/core/dist/core/runner/remote-env-retry.js"() {
434315
+ init_remote_env();
434316
+ init_with_retry();
434014
434317
  }
434015
434318
  });
434016
434319
 
434017
- // node_modules/@sema-agent/core/dist/prompt-assembly/assemble.js
434018
- var init_assemble = __esm({
434019
- "node_modules/@sema-agent/core/dist/prompt-assembly/assemble.js"() {
434020
- init_default6();
434021
- init_composer();
434022
- init_sema_default();
434320
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-workspace-restore.js
434321
+ var init_prepare_workspace_restore = __esm({
434322
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-workspace-restore.js"() {
434323
+ init_remote_env();
434324
+ init_remote_env_retry();
434325
+ init_workspace_path();
434326
+ init_remote_env_retry();
434023
434327
  }
434024
434328
  });
434025
434329
 
434026
- // node_modules/@sema-agent/core/dist/prompt-assembly/artifact.js
434027
- var init_artifact = __esm({
434028
- "node_modules/@sema-agent/core/dist/prompt-assembly/artifact.js"() {
434029
- init_epoch();
434330
+ // node_modules/@sema-agent/core/dist/core/runner/park-commit.js
434331
+ var init_park_commit = __esm({
434332
+ "node_modules/@sema-agent/core/dist/core/runner/park-commit.js"() {
434030
434333
  }
434031
434334
  });
434032
434335
 
434033
- // node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js
434034
- var init_turn_snapshot = __esm({
434035
- "node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js"() {
434036
- init_epoch();
434336
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-offload-wrappers.js
434337
+ var init_prepare_offload_wrappers = __esm({
434338
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-offload-wrappers.js"() {
434339
+ init_tool_result_store();
434037
434340
  }
434038
434341
  });
434039
434342
 
434040
- // node_modules/@sema-agent/core/dist/core/tool-result-budget.js
434041
- var init_tool_result_budget = __esm({
434042
- "node_modules/@sema-agent/core/dist/core/tool-result-budget.js"() {
434043
- init_message_utils();
434044
- init_tool_result_store();
434343
+ // node_modules/@sema-agent/core/dist/core/file-history-retention.js
434344
+ var init_file_history_retention = __esm({
434345
+ "node_modules/@sema-agent/core/dist/core/file-history-retention.js"() {
434346
+ init_retention_policy();
434045
434347
  }
434046
434348
  });
434047
434349
 
434048
- // node_modules/@sema-agent/core/dist/core/media-byte-cap.js
434049
- var init_media_byte_cap = __esm({
434050
- "node_modules/@sema-agent/core/dist/core/media-byte-cap.js"() {
434350
+ // node_modules/@sema-agent/core/dist/core/file-history-store.js
434351
+ var init_file_history_store = __esm({
434352
+ "node_modules/@sema-agent/core/dist/core/file-history-store.js"() {
434353
+ init_safety();
434354
+ init_file_history_retention();
434355
+ }
434356
+ });
434357
+
434358
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-file-history.js
434359
+ var init_prepare_file_history = __esm({
434360
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-file-history.js"() {
434361
+ init_node_execution_env();
434362
+ init_remote_env();
434363
+ init_file_history_store();
434051
434364
  }
434052
434365
  });
434053
434366
 
@@ -434057,6 +434370,159 @@ var init_teardown_bounded = __esm({
434057
434370
  }
434058
434371
  });
434059
434372
 
434373
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-execution-env.js
434374
+ var init_prepare_execution_env = __esm({
434375
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-execution-env.js"() {
434376
+ init_stub_env();
434377
+ init_remote_env();
434378
+ init_teardown_bounded();
434379
+ }
434380
+ });
434381
+
434382
+ // node_modules/@sema-agent/core/dist/core/runner/edited-files-ledger.js
434383
+ var init_edited_files_ledger = __esm({
434384
+ "node_modules/@sema-agent/core/dist/core/runner/edited-files-ledger.js"() {
434385
+ }
434386
+ });
434387
+
434388
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-run-refs.js
434389
+ var init_prepare_run_refs = __esm({
434390
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-run-refs.js"() {
434391
+ init_subagent();
434392
+ init_retain_ledger();
434393
+ init_active_skill_scope();
434394
+ init_edited_files_ledger();
434395
+ }
434396
+ });
434397
+
434398
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-inherited-gate.js
434399
+ var init_prepare_inherited_gate = __esm({
434400
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-inherited-gate.js"() {
434401
+ init_subagent();
434402
+ init_ask_question();
434403
+ init_hooks3();
434404
+ init_stub_env();
434405
+ init_tool_policy();
434406
+ init_denial_limit_arms();
434407
+ }
434408
+ });
434409
+
434410
+ // node_modules/@sema-agent/core/dist/orchestration/workflow-script-runner.js
434411
+ var init_workflow_script_runner = __esm({
434412
+ "node_modules/@sema-agent/core/dist/orchestration/workflow-script-runner.js"() {
434413
+ init_governance_baseline_validity();
434414
+ }
434415
+ });
434416
+
434417
+ // node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js
434418
+ var init_auto_mode_prompt_assets = __esm({
434419
+ "node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js"() {
434420
+ }
434421
+ });
434422
+
434423
+ // node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js
434424
+ var init_auto_mode_prompt = __esm({
434425
+ "node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js"() {
434426
+ init_auto_mode_defaults();
434427
+ init_auto_mode_prompt_assets();
434428
+ init_untrusted_text();
434429
+ init_auto_mode_defaults();
434430
+ }
434431
+ });
434432
+
434433
+ // node_modules/@sema-agent/core/dist/core/compliance.js
434434
+ var init_compliance = __esm({
434435
+ "node_modules/@sema-agent/core/dist/core/compliance.js"() {
434436
+ }
434437
+ });
434438
+
434439
+ // node_modules/@sema-agent/core/dist/core/runner/derived-route-fallback.js
434440
+ var init_derived_route_fallback = __esm({
434441
+ "node_modules/@sema-agent/core/dist/core/runner/derived-route-fallback.js"() {
434442
+ init_route_adjudicator();
434443
+ init_types21();
434444
+ }
434445
+ });
434446
+
434447
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-caps-and-workflow.js
434448
+ var init_prepare_caps_and_workflow = __esm({
434449
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-caps-and-workflow.js"() {
434450
+ init_harness();
434451
+ init_subagent();
434452
+ init_cross_session_envelope();
434453
+ init_run_workflow_tool();
434454
+ init_workflow_script_runner();
434455
+ init_workflow_size_guideline();
434456
+ init_auto_mode_arming();
434457
+ init_auto_mode_prompt();
434458
+ init_auto_mode();
434459
+ init_checkpoint_store();
434460
+ init_compliance();
434461
+ init_present_plan_tool();
434462
+ init_roles();
434463
+ init_runtime();
434464
+ init_task_registry();
434465
+ init_tools3();
434466
+ init_derived_route_fallback();
434467
+ init_synthetic_tools();
434468
+ }
434469
+ });
434470
+
434471
+ // node_modules/@sema-agent/core/dist/agents/agent-transcript-tool.js
434472
+ var init_agent_transcript_tool = __esm({
434473
+ "node_modules/@sema-agent/core/dist/agents/agent-transcript-tool.js"() {
434474
+ init_build3();
434475
+ init_tools3();
434476
+ init_background_agent_store();
434477
+ init_task_registry();
434478
+ init_untrusted_text();
434479
+ init_subagent_steps();
434480
+ init_subagent();
434481
+ init_retain_ledger();
434482
+ }
434483
+ });
434484
+
434485
+ // node_modules/@sema-agent/core/dist/agents/list-agents-tool.js
434486
+ var init_list_agents_tool = __esm({
434487
+ "node_modules/@sema-agent/core/dist/agents/list-agents-tool.js"() {
434488
+ init_build3();
434489
+ init_tools3();
434490
+ init_untrusted_text();
434491
+ init_cross_session_ref();
434492
+ init_roster_store();
434493
+ init_peer_directory();
434494
+ }
434495
+ });
434496
+
434497
+ // node_modules/@sema-agent/core/dist/agents/peer-notice-route.js
434498
+ var init_peer_notice_route = __esm({
434499
+ "node_modules/@sema-agent/core/dist/agents/peer-notice-route.js"() {
434500
+ init_mailbox_store();
434501
+ init_peer_directory();
434502
+ init_peer_notices();
434503
+ }
434504
+ });
434505
+
434506
+ // node_modules/@sema-agent/core/dist/agents/peer-session-drain.js
434507
+ var PEER_DRAIN_LEASE_TTL_MS, init_peer_session_drain = __esm({
434508
+ "node_modules/@sema-agent/core/dist/agents/peer-session-drain.js"() {
434509
+ init_mailbox_store();
434510
+ init_types21();
434511
+ init_cross_session_envelope();
434512
+ init_cross_session_judge();
434513
+ init_peer_admission();
434514
+ init_peer_directory();
434515
+ init_untrusted_text();
434516
+ init_list_agents_tool();
434517
+ init_cross_session_judge();
434518
+ init_peer_held_queue();
434519
+ init_peer_idle();
434520
+ init_peer_notices();
434521
+ init_peer_notice_route();
434522
+ PEER_DRAIN_LEASE_TTL_MS = 5 * 6e4;
434523
+ }
434524
+ });
434525
+
434060
434526
  // node_modules/@sema-agent/core/dist/tools/monitor.js
434061
434527
  var MONITOR_DESCRIPTION, init_monitor = __esm({
434062
434528
  "node_modules/@sema-agent/core/dist/tools/monitor.js"() {
@@ -434117,44 +434583,290 @@ var ENTER_DESCRIPTION, init_worktree = __esm({
434117
434583
  }
434118
434584
  });
434119
434585
 
434120
- // node_modules/@sema-agent/core/dist/agents/list-agents-tool.js
434121
- var init_list_agents_tool = __esm({
434122
- "node_modules/@sema-agent/core/dist/agents/list-agents-tool.js"() {
434123
- init_build3();
434124
- init_tools3();
434125
- init_untrusted_text();
434126
- init_cross_session_ref();
434127
- init_roster_store();
434128
- init_peer_directory();
434586
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-delegation-surface.js
434587
+ var init_prepare_delegation_surface = __esm({
434588
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-delegation-surface.js"() {
434589
+ init_agent_transcript_tool();
434590
+ init_send_message_tool();
434591
+ init_peer_session_drain();
434592
+ init_monitor();
434593
+ init_worktree();
434594
+ init_task_registry();
434595
+ init_tool_result_store();
434596
+ init_trace();
434597
+ init_types21();
434129
434598
  }
434130
434599
  });
434131
434600
 
434132
- // node_modules/@sema-agent/core/dist/agents/peer-notice-route.js
434133
- var init_peer_notice_route = __esm({
434134
- "node_modules/@sema-agent/core/dist/agents/peer-notice-route.js"() {
434135
- init_mailbox_store();
434136
- init_peer_directory();
434137
- init_peer_notices();
434601
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-tool-disclosure-mount.js
434602
+ var init_prepare_tool_disclosure_mount = __esm({
434603
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-tool-disclosure-mount.js"() {
434604
+ init_harness();
434605
+ init_cache_break_detector();
434606
+ init_types21();
434607
+ init_tool_disclosure();
434138
434608
  }
434139
434609
  });
434140
434610
 
434141
- // node_modules/@sema-agent/core/dist/agents/peer-session-drain.js
434142
- var PEER_DRAIN_LEASE_TTL_MS, init_peer_session_drain = __esm({
434143
- "node_modules/@sema-agent/core/dist/agents/peer-session-drain.js"() {
434144
- init_mailbox_store();
434611
+ // node_modules/@sema-agent/core/dist/core/runner/checkpoint-scope.js
434612
+ var init_checkpoint_scope = __esm({
434613
+ "node_modules/@sema-agent/core/dist/core/runner/checkpoint-scope.js"() {
434614
+ }
434615
+ });
434616
+
434617
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-wiring-manifest.js
434618
+ var init_prepare_wiring_manifest = __esm({
434619
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-wiring-manifest.js"() {
434620
+ init_peer_session_drain();
434621
+ init_fs();
434622
+ init_checkpoint_store();
434623
+ init_hooks3();
434624
+ init_remote_env();
434625
+ init_tool_result_store();
434626
+ init_tool_policy();
434145
434627
  init_types21();
434146
- init_cross_session_envelope();
434147
- init_cross_session_judge();
434148
- init_peer_admission();
434149
- init_peer_directory();
434150
434628
  init_untrusted_text();
434151
- init_list_agents_tool();
434152
- init_cross_session_judge();
434153
- init_peer_held_queue();
434154
- init_peer_idle();
434155
- init_peer_notices();
434156
- init_peer_notice_route();
434157
- PEER_DRAIN_LEASE_TTL_MS = 5 * 6e4;
434629
+ init_usage_window_store();
434630
+ init_wiring_manifest();
434631
+ init_checkpoint_scope();
434632
+ }
434633
+ });
434634
+
434635
+ // node_modules/@sema-agent/core/dist/core/runner/abort-race.js
434636
+ var init_abort_race = __esm({
434637
+ "node_modules/@sema-agent/core/dist/core/runner/abort-race.js"() {
434638
+ }
434639
+ });
434640
+
434641
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-ask-lane.js
434642
+ var init_prepare_ask_lane = __esm({
434643
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-ask-lane.js"() {
434644
+ init_arg_summary();
434645
+ init_hooks3();
434646
+ init_tool_policy();
434647
+ init_abort_race();
434648
+ init_denial_limit_arms();
434649
+ init_inherited_ask_grants();
434650
+ }
434651
+ });
434652
+
434653
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-suspend-saga.js
434654
+ var init_prepare_suspend_saga = __esm({
434655
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-suspend-saga.js"() {
434656
+ init_task_registry();
434657
+ init_remote_env();
434658
+ init_tool_policy();
434659
+ init_abort_race();
434660
+ init_checkpoint_scope();
434661
+ init_announce_once_ledger();
434662
+ init_remote_env_retry();
434663
+ }
434664
+ });
434665
+
434666
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-boundary-parks.js
434667
+ var init_prepare_boundary_parks = __esm({
434668
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-boundary-parks.js"() {
434669
+ init_background_shell();
434670
+ init_checkpoint_store();
434671
+ init_task_registry();
434672
+ init_checkpoint_scope();
434673
+ init_park_commit();
434674
+ init_remote_env_retry();
434675
+ }
434676
+ });
434677
+
434678
+ // node_modules/@sema-agent/core/dist/core/runner/content-ask-bindings.js
434679
+ var init_content_ask_bindings = __esm({
434680
+ "node_modules/@sema-agent/core/dist/core/runner/content-ask-bindings.js"() {
434681
+ }
434682
+ });
434683
+
434684
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-park-ask.js
434685
+ var init_prepare_park_ask = __esm({
434686
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-park-ask.js"() {
434687
+ init_uuid4();
434688
+ init_value2();
434689
+ init_ask_question();
434690
+ init_background_shell();
434691
+ init_canonical_json();
434692
+ init_checkpoint_store();
434693
+ init_hooks3();
434694
+ init_task_registry();
434695
+ init_tool_policy();
434696
+ init_tool_result_store();
434697
+ init_abort_race();
434698
+ init_checkpoint_scope();
434699
+ init_content_ask_bindings();
434700
+ init_park_commit();
434701
+ init_remote_env_retry();
434702
+ }
434703
+ });
434704
+
434705
+ // node_modules/@sema-agent/core/dist/core/sensitive-path-policy.js
434706
+ var CASE_INSENSITIVE_FS3, init_sensitive_path_policy = __esm({
434707
+ "node_modules/@sema-agent/core/dist/core/sensitive-path-policy.js"() {
434708
+ init_safety();
434709
+ init_read_deny();
434710
+ CASE_INSENSITIVE_FS3 = process.platform === "darwin" || process.platform === "win32";
434711
+ }
434712
+ });
434713
+
434714
+ // node_modules/@sema-agent/core/dist/core/write-protect.js
434715
+ var freezeTable, WRITE_PROTECTED_DEFAULT_TABLE, init_write_protect = __esm({
434716
+ "node_modules/@sema-agent/core/dist/core/write-protect.js"() {
434717
+ init_safety();
434718
+ init_session_rule_policy();
434719
+ init_sensitive_path_policy();
434720
+ freezeTable = (rows2) => Object.freeze(rows2.map((r) => Object.freeze(r))), WRITE_PROTECTED_DEFAULT_TABLE = freezeTable([
434721
+ { name: ".gitconfig", kind: "basename" },
434722
+ { name: ".gitmodules", kind: "basename" },
434723
+ { name: ".bashrc", kind: "basename" },
434724
+ { name: ".bash_profile", kind: "basename" },
434725
+ { name: ".zshrc", kind: "basename" },
434726
+ { name: ".zprofile", kind: "basename" },
434727
+ { name: ".profile", kind: "basename" },
434728
+ { name: ".zshenv", kind: "basename" },
434729
+ { name: ".zlogin", kind: "basename" },
434730
+ { name: ".zlogout", kind: "basename" },
434731
+ { name: ".bash_login", kind: "basename" },
434732
+ { name: ".bash_aliases", kind: "basename" },
434733
+ { name: ".bash_logout", kind: "basename" },
434734
+ { name: ".envrc", kind: "basename" },
434735
+ { name: ".ripgreprc", kind: "basename" },
434736
+ { name: ".mcp.json", kind: "basename" },
434737
+ { name: ".claude.json", kind: "basename" },
434738
+ { name: ".npmrc", kind: "basename" },
434739
+ { name: ".yarnrc", kind: "basename" },
434740
+ { name: ".yarnrc.yml", kind: "basename" },
434741
+ { name: ".pnp.cjs", kind: "basename" },
434742
+ { name: ".pnp.loader.mjs", kind: "basename" },
434743
+ { name: ".pnpmfile.cjs", kind: "basename" },
434744
+ { name: "bunfig.toml", kind: "basename" },
434745
+ { name: ".bunfig.toml", kind: "basename" },
434746
+ { name: ".bazelrc", kind: "basename" },
434747
+ { name: ".bazelversion", kind: "basename" },
434748
+ { name: ".bazeliskrc", kind: "basename" },
434749
+ { name: ".pre-commit-config.yaml", kind: "basename" },
434750
+ { name: "lefthook.yml", kind: "basename" },
434751
+ { name: ".lefthook.yml", kind: "basename" },
434752
+ { name: "lefthook.yaml", kind: "basename" },
434753
+ { name: ".lefthook.yaml", kind: "basename" },
434754
+ { name: "gradle-wrapper.properties", kind: "basename" },
434755
+ { name: "maven-wrapper.properties", kind: "basename" },
434756
+ { name: ".devcontainer.json", kind: "basename" },
434757
+ { name: "pyrightconfig.json", kind: "basename" },
434758
+ { name: ".git", kind: "segment" },
434759
+ { name: ".vscode", kind: "segment" },
434760
+ { name: ".idea", kind: "segment" },
434761
+ { name: ".claude", kind: "segment" },
434762
+ { name: ".husky", kind: "segment" },
434763
+ { name: ".cargo", kind: "segment" },
434764
+ { name: ".devcontainer", kind: "segment" },
434765
+ { name: ".yarn", kind: "segment" },
434766
+ { name: ".mvn", kind: "segment" },
434767
+ { name: ".config/git", kind: "segment-run" },
434768
+ { name: ".ssh", kind: "segment" },
434769
+ { name: ".gnupg", kind: "segment" },
434770
+ { name: ".sema.json", kind: "basename" },
434771
+ { name: ".sema", kind: "segment" }
434772
+ ]);
434773
+ }
434774
+ });
434775
+
434776
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-gate-stations.js
434777
+ var init_prepare_gate_stations = __esm({
434778
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-gate-stations.js"() {
434779
+ init_send_message_tool();
434780
+ init_compliance();
434781
+ init_hooks3();
434782
+ init_present_plan_tool();
434783
+ init_tool_policy();
434784
+ init_trace();
434785
+ init_write_protect();
434786
+ init_session_rule_policy();
434787
+ }
434788
+ });
434789
+
434790
+ // node_modules/@sema-agent/core/dist/core/a2a-task-state.js
434791
+ var A2A_TASK_STATES, init_a2a_task_state = __esm({
434792
+ "node_modules/@sema-agent/core/dist/core/a2a-task-state.js"() {
434793
+ A2A_TASK_STATES = [
434794
+ "submitted",
434795
+ "working",
434796
+ "input-required",
434797
+ "completed",
434798
+ "canceled",
434799
+ "failed",
434800
+ "rejected",
434801
+ "auth-required",
434802
+ "unknown"
434803
+ ];
434804
+ }
434805
+ });
434806
+
434807
+ // node_modules/@sema-agent/core/dist/core/a2a.js
434808
+ var A2A_CALL_TOTAL_TIMEOUT_MS, A2A_RESPONSE_MAX_BYTES, A2A_STATE_SET, init_a2a = __esm({
434809
+ "node_modules/@sema-agent/core/dist/core/a2a.js"() {
434810
+ init_build3();
434811
+ init_a2a_task_state();
434812
+ init_mcp4();
434813
+ init_protocol_naming();
434814
+ init_protocol_table();
434815
+ init_untrusted_text();
434816
+ A2A_CALL_TOTAL_TIMEOUT_MS = 10 * 6e4, A2A_RESPONSE_MAX_BYTES = 8 * 1024 * 1024, A2A_STATE_SET = new Set(A2A_TASK_STATES);
434817
+ }
434818
+ });
434819
+
434820
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-protocol-tools.js
434821
+ var init_prepare_protocol_tools = __esm({
434822
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-protocol-tools.js"() {
434823
+ init_build3();
434824
+ init_mcp4();
434825
+ init_a2a();
434826
+ init_types21();
434827
+ }
434828
+ });
434829
+
434830
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-question-face.js
434831
+ var init_prepare_question_face = __esm({
434832
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-question-face.js"() {
434833
+ init_ask_question();
434834
+ init_canonical_json();
434835
+ init_checkpoint_store();
434836
+ init_content_ask_bindings();
434837
+ init_content_ask_bindings();
434838
+ }
434839
+ });
434840
+
434841
+ // node_modules/@sema-agent/core/dist/core/lsp-protocol.js
434842
+ var init_lsp_protocol = __esm({
434843
+ "node_modules/@sema-agent/core/dist/core/lsp-protocol.js"() {
434844
+ }
434845
+ });
434846
+
434847
+ // node_modules/@sema-agent/core/dist/core/lsp.js
434848
+ var MAX_LSP_FILE_BYTES, init_lsp = __esm({
434849
+ "node_modules/@sema-agent/core/dist/core/lsp.js"() {
434850
+ init_lsp_protocol();
434851
+ init_safety();
434852
+ init_build3();
434853
+ init_tools3();
434854
+ MAX_LSP_FILE_BYTES = 10 * 1e3 * 1e3;
434855
+ }
434856
+ });
434857
+
434858
+ // node_modules/@sema-agent/core/dist/core/runner/prepare-lsp.js
434859
+ var init_prepare_lsp = __esm({
434860
+ "node_modules/@sema-agent/core/dist/core/runner/prepare-lsp.js"() {
434861
+ init_lsp();
434862
+ init_lsp_protocol();
434863
+ }
434864
+ });
434865
+
434866
+ // node_modules/@sema-agent/core/dist/core/runner/rollback-stack.js
434867
+ var init_rollback_stack = __esm({
434868
+ "node_modules/@sema-agent/core/dist/core/runner/rollback-stack.js"() {
434869
+ init_teardown_bounded();
434158
434870
  }
434159
434871
  });
434160
434872
 
@@ -434191,24 +434903,6 @@ One short sentence on what you chose and why. Goes to telemetry and is shown bac
434191
434903
  }
434192
434904
  });
434193
434905
 
434194
- // node_modules/@sema-agent/core/dist/orchestration/workflow-script-runner.js
434195
- var init_workflow_script_runner = __esm({
434196
- "node_modules/@sema-agent/core/dist/orchestration/workflow-script-runner.js"() {
434197
- init_governance_baseline_validity();
434198
- }
434199
- });
434200
-
434201
- // node_modules/@sema-agent/core/dist/core/lsp.js
434202
- var MAX_LSP_FILE_BYTES, init_lsp = __esm({
434203
- "node_modules/@sema-agent/core/dist/core/lsp.js"() {
434204
- init_lsp_protocol();
434205
- init_safety();
434206
- init_build3();
434207
- init_tools3();
434208
- MAX_LSP_FILE_BYTES = 10 * 1e3 * 1e3;
434209
- }
434210
- });
434211
-
434212
434906
  // node_modules/@sema-agent/core/dist/core/park-selfcheck.js
434213
434907
  var init_park_selfcheck = __esm({
434214
434908
  "node_modules/@sema-agent/core/dist/core/park-selfcheck.js"() {
@@ -434218,131 +434912,84 @@ var init_park_selfcheck = __esm({
434218
434912
  }
434219
434913
  });
434220
434914
 
434221
- // node_modules/@sema-agent/core/dist/core/file-history-retention.js
434222
- var init_file_history_retention = __esm({
434223
- "node_modules/@sema-agent/core/dist/core/file-history-retention.js"() {
434224
- init_retention_policy();
434225
- }
434226
- });
434227
-
434228
- // node_modules/@sema-agent/core/dist/core/file-history-store.js
434229
- var init_file_history_store = __esm({
434230
- "node_modules/@sema-agent/core/dist/core/file-history-store.js"() {
434231
- init_safety();
434232
- init_file_history_retention();
434233
- }
434234
- });
434235
-
434236
434915
  // node_modules/@sema-agent/core/dist/core/runner/prepare-task.js
434237
- import { createHash as createHash27, randomBytes as randomBytes25 } from "node:crypto";
434238
- var PROMPT_HASH_SALT, DEFAULT_RESOURCE_TTL_MS, USAGE_WINDOW_REAP_MARGIN_MS, DEFAULT_UNATTENDED_APPROVAL_TTL_MS, init_prepare_task = __esm({
434916
+ var init_prepare_task = __esm({
434239
434917
  "node_modules/@sema-agent/core/dist/core/runner/prepare-task.js"() {
434240
434918
  init_harness();
434241
434919
  init_auto_compaction();
434242
434920
  init_compaction_call_options();
434243
- init_auto_mode();
434244
- init_denial_limit_arms();
434245
- init_auto_mode_arming();
434246
- init_auto_mode_prompt();
434247
- init_roles();
434248
- init_arg_summary();
434249
- init_mcp4();
434250
- init_a2a();
434251
- init_build3();
434252
- init_value2();
434253
434921
  init_uuid4();
434254
434922
  init_runtime();
434255
434923
  init_session4();
434256
- init_subagent();
434257
- init_agent_transcript_tool();
434258
434924
  init_send_message_tool();
434259
- init_retain_ledger();
434260
- init_tool_policy();
434261
- init_permission_rule_model();
434262
- init_prepare_permission_rules();
434263
- init_active_skill_scope();
434264
- init_turn_attachments();
434265
- init_untrusted_text();
434266
- init_prepare_announce_once();
434925
+ init_announce_once_ledger();
434267
434926
  init_reminder_mint();
434268
- init_ask_class();
434269
434927
  init_trace();
434270
- init_session_rule_policy();
434271
- init_hooks3();
434272
- init_write_protect();
434273
- init_cache_break_detector();
434274
434928
  init_request_params();
434275
- init_route_adjudicator();
434276
434929
  init_timeout();
434277
- init_tools3();
434278
- init_tool_name_aliases();
434279
- init_protocol_table();
434280
- init_permission_rules();
434281
- init_lsp_protocol();
434282
434930
  init_tool_result_store();
434283
434931
  init_synthetic_tools();
434284
434932
  init_strict_output_schema();
434285
- init_tool_disclosure();
434286
434933
  init_tools4();
434287
- init_types27();
434288
- init_tools5();
434289
- init_content_origin();
434290
- init_delegation_provenance();
434291
- init_delegation_settlement();
434292
- init_memory4();
434293
- init_compliance();
434294
434934
  init_memory_admission();
434295
434935
  init_prepare_memory();
434936
+ init_prepare_memory_engine_session();
434937
+ init_prepare_defer_classify();
434938
+ init_prepare_listings();
434939
+ init_prepare_prompt_inputs();
434940
+ init_prepare_project_context();
434941
+ init_prepare_policy_chain();
434942
+ init_prepare_context_lane();
434943
+ init_prepare_turn_wiring();
434944
+ init_prepare_context_lane();
434945
+ init_prepare_prompt_assembly();
434296
434946
  init_prepare_config_doors();
434297
434947
  init_prepare_safety_scan();
434298
434948
  init_prepare_acquire_reconcile();
434299
434949
  init_prepare_hands_readface();
434300
- init_edited_files_ledger();
434301
434950
  init_prepare_workspace_restore();
434302
- init_default6();
434303
- init_git_status_frame();
434304
- init_assemble();
434305
- init_tool_catalog();
434306
- init_epoch();
434307
- init_artifact();
434308
- init_turn_snapshot();
434309
- init_sema_default();
434951
+ init_park_commit();
434952
+ init_park_commit();
434953
+ init_prepare_offload_wrappers();
434954
+ init_prepare_file_history();
434955
+ init_prepare_execution_env();
434956
+ init_prepare_run_refs();
434957
+ init_prepare_inherited_gate();
434958
+ init_prepare_caps_and_workflow();
434959
+ init_prepare_delegation_surface();
434960
+ init_prepare_tool_disclosure_mount();
434961
+ init_prepare_wiring_manifest();
434962
+ init_prepare_ask_lane();
434963
+ init_prepare_suspend_saga();
434964
+ init_prepare_boundary_parks();
434965
+ init_prepare_park_ask();
434966
+ init_prepare_gate_stations();
434967
+ init_prepare_park_ask();
434968
+ init_prepare_suspend_saga();
434969
+ init_checkpoint_scope();
434970
+ init_checkpoint_scope();
434971
+ init_prepare_wiring_manifest();
434972
+ init_derived_route_fallback();
434973
+ init_prepare_protocol_tools();
434974
+ init_prepare_question_face();
434975
+ init_prepare_lsp();
434976
+ init_rollback_stack();
434977
+ init_prepare_tool_disclosure_mount();
434978
+ init_prepare_file_history();
434310
434979
  init_context_edit();
434311
- init_tool_result_budget();
434312
- init_media_byte_cap();
434313
- init_context_guard();
434314
- init_stub_env();
434315
434980
  init_remote_env();
434316
434981
  init_teardown_bounded();
434317
- init_background_shell();
434318
434982
  init_task_registry();
434319
- init_monitor();
434320
- init_worktree();
434321
434983
  init_peer_session_drain();
434322
- init_cross_session_envelope();
434323
- init_node_execution_env();
434324
- init_fs();
434325
- init_encoding();
434326
- init_ask_question();
434327
434984
  init_scheduler_tools();
434328
- init_present_plan_tool();
434329
434985
  init_workflow_script_runner();
434330
- init_run_workflow_tool();
434331
- init_workflow_size_guideline();
434332
- init_lsp();
434333
- init_safety();
434334
434986
  init_checkpoint_store();
434335
- init_canonical_json();
434336
- init_wiring_manifest();
434337
434987
  init_park_selfcheck();
434338
- init_usage_window_store();
434339
434988
  init_types21();
434340
- init_file_history_store();
434341
434989
  init_prepare_hands_readface();
434342
434990
  init_checkpoint_store();
434343
434991
  init_prepare_config_doors();
434344
- init_prepare_workspace_restore();
434345
- PROMPT_HASH_SALT = randomBytes25(16), DEFAULT_RESOURCE_TTL_MS = 720 * 60 * 60 * 1e3, USAGE_WINDOW_REAP_MARGIN_MS = 3600 * 1e3, DEFAULT_UNATTENDED_APPROVAL_TTL_MS = 720 * 60 * 60 * 1e3;
434992
+ init_workspace_path();
434346
434993
  }
434347
434994
  });
434348
434995
 
@@ -434449,7 +435096,7 @@ var init_runtask = __esm({
434449
435096
  init_hooks3();
434450
435097
  init_human_input_projection();
434451
435098
  init_untrusted_text();
434452
- init_prepare_announce_once();
435099
+ init_announce_once_ledger();
434453
435100
  init_session_reconcile();
434454
435101
  init_tool_result_store();
434455
435102
  init_lsp_diagnostics();
@@ -435260,7 +435907,7 @@ var init_permission_rule_sync = __esm({
435260
435907
  // node_modules/@sema-agent/core/dist/stores/file/permission-rule-store.js
435261
435908
  import { closeSync as closeSync14, constants as FS2, existsSync as existsSync29, fsyncSync as fsyncSync11, lstatSync as lstatSync5, mkdirSync as mkdirSync24, openSync as openSync15, readFileSync as readFileSync42, readdirSync as readdirSync13, renameSync as renameSync16, unlinkSync as unlinkSync15, writeFileSync as writeFileSync22 } from "node:fs";
435262
435909
  import { join as join157 } from "node:path";
435263
- import { createHash as createHash28, randomBytes as randomBytes26 } from "node:crypto";
435910
+ import { createHash as createHash27, randomBytes as randomBytes26 } from "node:crypto";
435264
435911
  function isRuleFile(v2) {
435265
435912
  let p = v2;
435266
435913
  return typeof p == "object" && p !== null && p.schemaVersion === 3 && Array.isArray(p.rules) && Array.isArray(p.tombstones) && typeof p.rev == "number" && (p.quarantined === void 0 || Array.isArray(p.quarantined));
@@ -435293,7 +435940,7 @@ function atomicPublish(dir, file2, payload2) {
435293
435940
  }
435294
435941
  }
435295
435942
  function checksumOf(body) {
435296
- return `sha256:${createHash28("sha256").update(canonicalize3(body), "utf8").digest("hex")}`;
435943
+ return `sha256:${createHash27("sha256").update(canonicalize3(body), "utf8").digest("hex")}`;
435297
435944
  }
435298
435945
  function assertSafeDir(dir) {
435299
435946
  mkdirSync24(dir, { recursive: !0, mode: 448 });
@@ -435893,7 +436540,7 @@ var init_sync_client = __esm({
435893
436540
  var init_memory_engine = __esm({
435894
436541
  "node_modules/@sema-agent/core/dist/core/memory-engine/index.js"() {
435895
436542
  init_engine5();
435896
- init_tools5();
436543
+ init_tools4();
435897
436544
  init_provenance_wording();
435898
436545
  init_scan();
435899
436546
  init_file_backend();
@@ -458394,7 +459041,7 @@ var init_config7 = __esm({
458394
459041
  });
458395
459042
 
458396
459043
  // build-src/src/utils/api.ts
458397
- import { createHash as createHash29 } from "crypto";
459044
+ import { createHash as createHash28 } from "crypto";
458398
459045
  function filterSwarmFieldsFromSchema(toolName2, schema) {
458399
459046
  let fieldsToRemove = SWARM_FIELDS_BY_TOOL[toolName2];
458400
459047
  if (!fieldsToRemove || fieldsToRemove.length === 0)
@@ -458457,7 +459104,7 @@ function logAPIPrefix(systemPrompt) {
458457
459104
  firstSystemPrompt?.slice(
458458
459105
  0,
458459
459106
  20
458460
- ), firstSystemPrompt?.length, firstSystemPrompt && createHash29("sha256").update(firstSystemPrompt).digest("hex");
459107
+ ), firstSystemPrompt?.length, firstSystemPrompt && createHash28("sha256").update(firstSystemPrompt).digest("hex");
458461
459108
  }
458462
459109
  function splitSysPromptPrefix(systemPrompt, options) {
458463
459110
  let useGlobalCacheFeature = shouldUseGlobalCacheScope();
@@ -466344,12 +466991,15 @@ var CORE_ENGINE_NOTICE_CODES, PENDING_ENGINE_NOTICE_CODES, SURFACEABLE_ENGINE_NO
466344
466991
  var wiringManifestStore_exports = {};
466345
466992
  __export(wiringManifestStore_exports, {
466346
466993
  autoModeDoctorDetail: () => autoModeDoctorDetail,
466994
+ forgetWiringManifestReading: () => forgetWiringManifestReading,
466347
466995
  modelGateRemovedLine: () => modelGateRemovedLine,
466348
466996
  noteWiringManifestReading: () => noteWiringManifestReading,
466349
466997
  observedAutoMode: () => observedAutoMode,
466350
466998
  observedModelGate: () => observedModelGate,
466999
+ observedWiringMcp: () => observedWiringMcp,
466351
467000
  resetWiringManifestReadingForTest: () => resetWiringManifestReadingForTest,
466352
- wiringManifestChromeView: () => wiringManifestChromeView
467001
+ wiringManifestChromeView: () => wiringManifestChromeView,
467002
+ wiringMcpDoctorDetail: () => wiringMcpDoctorDetail
466353
467003
  });
466354
467004
  function wiringManifestChromeView(e) {
466355
467005
  if (typeof e != "object" || e === null) return null;
@@ -466368,23 +467018,50 @@ function wiringManifestChromeView(e) {
466368
467018
  } catch {
466369
467019
  return;
466370
467020
  }
466371
- }, gateClass = readFrom(gate, "class"), gateRestore = readFrom(gate, "restore"), removedRaw = readFrom(gate, "removed"), autoArmed = readFrom(auto, "armed"), autoReason = readFrom(auto, "reason"), modelGate = typeof gateClass == "string" && typeof gateRestore == "string" && Array.isArray(removedRaw) && removedRaw.every((t2) => typeof t2 == "string") ? { class: gateClass, removed: [...removedRaw], restore: gateRestore } : void 0, autoMode = typeof autoArmed == "boolean" && typeof autoReason == "string" ? { armed: autoArmed, reason: autoReason } : void 0;
467021
+ }, gateClass = readFrom(gate, "class"), gateRestore = readFrom(gate, "restore"), removedRaw = readFrom(gate, "removed"), autoArmed = readFrom(auto, "armed"), autoReason = readFrom(auto, "reason"), modelGate = typeof gateClass == "string" && typeof gateRestore == "string" && Array.isArray(removedRaw) && removedRaw.every((t2) => typeof t2 == "string") ? { class: gateClass, removed: [...removedRaw], restore: gateRestore } : void 0, autoMode = typeof autoArmed == "boolean" && typeof autoReason == "string" ? { armed: autoArmed, reason: autoReason } : void 0, mcpRaw = read("mcp"), mcp2;
467022
+ if (Array.isArray(mcpRaw)) {
467023
+ let rows2 = [];
467024
+ for (let raw2 of mcpRaw) {
467025
+ if (typeof raw2 != "object" || raw2 === null || Array.isArray(raw2)) continue;
467026
+ let r = raw2, name = readFrom(r, "name"), status3 = readFrom(r, "status");
467027
+ if (typeof name != "string" || name === "" || typeof status3 != "string" || status3 === "") continue;
467028
+ let source = readFrom(r, "source"), errorCode = readFrom(r, "errorCode"), toolCount = readFrom(r, "toolCount");
467029
+ rows2.push({
467030
+ name,
467031
+ // 🔴 `status` / `errorCode` 一律**开集**读(词的属主是 core):认不得的词照渲不丢行;
467032
+ // 抄一份闭集表会在 core 加员那天把一个合法值连同它那一行一起吞掉。
467033
+ status: status3,
467034
+ ...typeof source == "string" && source !== "" ? { source } : {},
467035
+ ...typeof errorCode == "string" && errorCode !== "" ? { errorCode } : {},
467036
+ // 🔴 `toolCount: 0` 是**读数**(连上了、零工具),不是缺席 ⇒ 有限数就收,别用 falsy 判。
467037
+ ...typeof toolCount == "number" && Number.isFinite(toolCount) ? { toolCount } : {}
467038
+ });
467039
+ }
467040
+ (mcpRaw.length === 0 || rows2.length > 0) && (mcp2 = rows2);
467041
+ }
466372
467042
  return {
466373
467043
  ...modelGate !== void 0 ? { modelGate } : {},
466374
- ...autoMode !== void 0 ? { autoMode } : {}
467044
+ ...autoMode !== void 0 ? { autoMode } : {},
467045
+ ...mcp2 !== void 0 ? { mcp: mcp2 } : {}
466375
467046
  };
466376
467047
  }
466377
467048
  function noteWiringManifestReading(reading) {
466378
- reading.autoMode !== void 0 && (lastAutoMode = reading.autoMode), reading.modelGate !== void 0 && (lastModelGate = reading.modelGate);
467049
+ reading.autoMode !== void 0 && (lastAutoMode = reading.autoMode), reading.modelGate !== void 0 && (lastModelGate = reading.modelGate), reading.mcp !== void 0 && (lastMcp = reading.mcp);
466379
467050
  }
466380
467051
  function observedAutoMode() {
466381
467052
  return lastAutoMode;
466382
467053
  }
467054
+ function observedWiringMcp() {
467055
+ return lastMcp;
467056
+ }
466383
467057
  function observedModelGate() {
466384
467058
  return lastModelGate;
466385
467059
  }
467060
+ function forgetWiringManifestReading() {
467061
+ lastMcp = null, lastAutoMode = null, lastModelGate = null;
467062
+ }
466386
467063
  function resetWiringManifestReadingForTest() {
466387
- lastAutoMode = null, lastModelGate = null;
467064
+ lastMcp = null, lastAutoMode = null, lastModelGate = null;
466388
467065
  }
466389
467066
  function modelGateRemovedLine(gate) {
466390
467067
  return `Model gate removed ${gate.class}: ${gate.removed.join(", ")} \u2014 restore: ${gate.restore}`;
@@ -466392,15 +467069,21 @@ function modelGateRemovedLine(gate) {
466392
467069
  function autoModeDoctorDetail(reading) {
466393
467070
  return reading === null ? {
466394
467071
  status: "info",
466395
- detail: "not observed \u2014 the engine reports it per run leg; this one-shot process has none (run /doctor inside the REPL after a turn)"
467072
+ detail: "not observed \u2014 the engine reports it per run leg; this process has not seen a wiring-manifest frame yet (nothing has run in it, or the engine is older than 7.58.0)"
466396
467073
  } : {
466397
467074
  status: reading.armed ? "ok" : "info",
466398
467075
  detail: `${reading.armed ? "armed" : "not armed"} \xB7 engine reason: ${reading.reason}`
466399
467076
  };
466400
467077
  }
466401
- var lastAutoMode, lastModelGate, init_wiringManifestStore = __esm({
467078
+ function wiringMcpDoctorDetail(rows2, clean9) {
467079
+ return rows2 === null ? "not observed - the engine reports declared MCP servers on the wiring manifest; this process has not seen such a frame yet (nothing has run in it, or the engine is older than 7.60.0)" : rows2.length === 0 ? "this engine leg declared no MCP servers" : rows2.map((r) => {
467080
+ let parts = [`${clean9(r.name, 40)}: ${clean9(r.status, 24)}`];
467081
+ return r.errorCode !== void 0 && parts.push(`code ${clean9(r.errorCode, 40)}`), typeof r.toolCount == "number" && Number.isFinite(r.toolCount) && parts.push(`${r.toolCount} tools`), parts.push(r.source !== void 0 ? `source ${clean9(r.source, 40)}` : "source not declared"), parts.join(" - ");
467082
+ }).join(" | ");
467083
+ }
467084
+ var lastAutoMode, lastMcp, lastModelGate, init_wiringManifestStore = __esm({
466402
467085
  "build-src/src/sema/wiringManifestStore.ts"() {
466403
- lastAutoMode = null, lastModelGate = null;
467086
+ lastAutoMode = null, lastMcp = null, lastModelGate = null;
466404
467087
  }
466405
467088
  });
466406
467089
 
@@ -466501,7 +467184,7 @@ __export(upstreamBridge_exports, {
466501
467184
  seedEngineTaskNotificationDedupFromTranscript: () => seedEngineTaskNotificationDedupFromTranscript,
466502
467185
  timeoutWindowExpiredCallIdOf: () => timeoutWindowExpiredCallIdOf
466503
467186
  });
466504
- import { createHash as createHash30 } from "node:crypto";
467187
+ import { createHash as createHash29 } from "node:crypto";
466505
467188
  function appendBridgeProbe(envName, line) {
466506
467189
  let path28 = envName !== void 0 ? process.env[envName] : void 0;
466507
467190
  if (path28)
@@ -466621,7 +467304,7 @@ function timeoutWindowExpiredCallIdOf(frame) {
466621
467304
  return id.length <= MAX_COLLATERAL_ABORT_ID_CHARS ? id : void 0;
466622
467305
  }
466623
467306
  function identityDigest(v2) {
466624
- return createHash30("sha256").update(Buffer.from(v2, "utf16le")).digest("hex").slice(0, 32);
467307
+ return createHash29("sha256").update(Buffer.from(v2, "utf16le")).digest("hex").slice(0, 32);
466625
467308
  }
466626
467309
  function wireIdentity(raw2) {
466627
467310
  return typeof raw2 != "string" || raw2.length === 0 ? "" : raw2.length <= IDENTITY_INLINE_MAX ? `${String(raw2.length)}:${raw2}` : `${String(raw2.length)}:${raw2.slice(0, 64)}#${identityDigest(raw2)}`;
@@ -468602,6 +469285,74 @@ var clean7, BENIGN_ABSENCE_WORDS, init_ruleEvidenceNote = __esm({
468602
469285
  }
468603
469286
  });
468604
469287
 
469288
+ // build-src/src/sema/askFrameNotes.ts
469289
+ function readDenialLimitFallback3(v2) {
469290
+ if (typeof v2 != "object" || v2 === null) return;
469291
+ let r = v2, num = (n2) => typeof n2 == "number" && Number.isFinite(n2) && n2 >= 0;
469292
+ if (!(!num(r.consecutive) || !num(r.total) || !num(r.autoDenyAfterMs)) && !(typeof r.limit != "string" || r.limit === ""))
469293
+ return {
469294
+ consecutive: r.consecutive,
469295
+ total: r.total,
469296
+ limit: r.limit,
469297
+ autoDenyAfterMs: r.autoDenyAfterMs
469298
+ };
469299
+ }
469300
+ function denialLimitFallbackNote(v2) {
469301
+ if (v2 == null || typeof v2 != "object") return;
469302
+ let parts = ["auto-deny limit reached \u2014 this one needs a real human decision"], num = (n2) => typeof n2 == "number" && Number.isFinite(n2) && n2 >= 0 ? n2 : void 0, consecutive = num(v2.consecutive), total = num(v2.total);
469303
+ consecutive !== void 0 && total !== void 0 && parts.push(`${consecutive} consecutive / ${total} total denials so far`);
469304
+ let limit2 = typeof v2.limit == "string" && v2.limit !== "" ? v2.limit : void 0;
469305
+ limit2 !== void 0 && parts.push(`the limit that tripped: ${cleanUntrustedForDisplay(limit2, 24)}`);
469306
+ let windowMs = num(v2.autoDenyAfterMs);
469307
+ return windowMs !== void 0 && windowMs > 0 && parts.push(`the engine auto-denies it in ${Math.round(windowMs / 1e3)}s if nobody answers`), parts.join("; ");
469308
+ }
469309
+ function askOriginNote(origin2) {
469310
+ if (!(typeof origin2 != "string" || origin2 === ""))
469311
+ switch (origin2) {
469312
+ case "content_question":
469313
+ case "unresolvable":
469314
+ case "ask_rule":
469315
+ case "policy":
469316
+ return;
469317
+ case "org_unavailable":
469318
+ return "asked because the org rule store could not be reached";
469319
+ case "org_rule":
469320
+ return "asked by an org rule";
469321
+ case "hook":
469322
+ return "asked by a hook";
469323
+ case "denial_limit_fallback":
469324
+ return "asked because the auto-deny limit was reached";
469325
+ default:
469326
+ return `asked by an origin this build does not know yet (${cleanUntrustedForDisplay(origin2, 40)})`;
469327
+ }
469328
+ }
469329
+ function ruleOffersAbsenceNote(reason) {
469330
+ if (!(typeof reason != "string" || reason === ""))
469331
+ switch (reason) {
469332
+ case "mandated":
469333
+ return `no "don't ask again" option here: this gate is mandated, so a rule could not switch it off`;
469334
+ case "shadowed":
469335
+ return `no "don't ask again" option here: a higher-priority rule already covers this call`;
469336
+ case "lane_cannot_speak":
469337
+ return `no "don't ask again" option here: this approval lane cannot persist rules`;
469338
+ default:
469339
+ return `no "don't ask again" option here (reason this build does not know yet: ${cleanUntrustedForDisplay(reason, 40)})`;
469340
+ }
469341
+ }
469342
+ function askFrameNoteParts(req) {
469343
+ let denial = denialLimitFallbackNote(req.denialLimitFallback), origin2 = askOriginNote(req.origin), absence = ruleOffersAbsenceNote(req.ruleOffersAbsence);
469344
+ return [
469345
+ ...denial !== void 0 ? [denial] : [],
469346
+ ...origin2 !== void 0 ? [origin2] : [],
469347
+ ...absence !== void 0 ? [absence] : []
469348
+ ];
469349
+ }
469350
+ var init_askFrameNotes = __esm({
469351
+ "build-src/src/sema/askFrameNotes.ts"() {
469352
+ init_untrustedDisplayText();
469353
+ }
469354
+ });
469355
+
468605
469356
  // build-src/src/sema/turnGateJournal.ts
468606
469357
  function journalGatePresented(gateKind2, callId, engineTaskId) {
468607
469358
  try {
@@ -468838,6 +469589,12 @@ function composeCardWireNote(req) {
468838
469589
  ...bidiNote !== void 0 ? [bidiNote] : [],
468839
469590
  ...req.governanceForced === !0 ? ["Required by deployment governance \u2014 permission-mode overrides do not apply"] : [],
468840
469591
  ...req.wireNote !== void 0 ? [req.wireNote] : [],
469592
+ // ── §23a 三位(L-107④):限额回落 · ask 出身 · 「不再询问」缺席原因 ─────────────────────
469593
+ // 🔴 排在 probeCause / ruleEvidence **之前**:这三句答的是「这只门为什么在这儿、为什么必须
469594
+ // 你来批」,而那两句答的是「引擎凭什么这么判」—— 先因后据。缺席零占位 ⇒ 老引擎上卡形与
469595
+ // 修前逐字节相同(additive 不回削)。
469596
+ // 🔴 三位的窄读与措辞全在 askFrameNotes(单源);本处只负责把它们放进这条 dim 行。
469597
+ ...askFrameNoteParts(req),
468841
469598
  ...probeCause !== void 0 ? [probeCauseNoteText(probeCause)] : [],
468842
469599
  ...ruleEvidenceNote !== void 0 ? [ruleEvidenceNote] : []
468843
469600
  ];
@@ -468886,8 +469643,8 @@ function shellApprovalCardPort(req) {
468886
469643
  }
468887
469644
  let tool = lookup.kind === "tool" ? lookup.tool : genericGateTool(req.toolName), { callKey, signal } = req, askDeadlineMs = readAskDeadlineMs(req) ?? readParkRowDeadline(req.callKey);
468888
469645
  return new Promise((resolve58) => {
468889
- let selectedPersistRule, selectedPersistRuleBatchOfferIndex, selectedPersistRuleEdited, windowClosedAtMs, lateApproveConfirmedOnce = !1, lateApproveConfirmShown = !1, stagedPermissionUpdates = [], lateDecideWatchdogTimer, settled = !1, settle3 = (o) => {
468890
- settled || (settled = !0, signal?.removeEventListener("abort", onAbortSignal), askWindowTimer !== void 0 && clearTimeout(askWindowTimer), askBackstopTimer !== void 0 && clearTimeout(askBackstopTimer), lateDecideWatchdogTimer !== void 0 && clearTimeout(lateDecideWatchdogTimer), liveApprovalCards.delete(callKey), journalGateResolved(callKey), resolve58(o));
469646
+ let selectedPersistRule, selectedPersistRuleBatchOfferIndex, selectedPersistRuleEdited, windowClosedAtMs, lateApproveConfirmedOnce = !1, lateApproveConfirmShown = !1, stagedPermissionUpdates = [], lateDecideWatchdogTimer, settled = !1, saidWindowClosed = !1, bornEpoch = getLiveSessionEpoch(), settle3 = (o) => {
469647
+ settled || (settled = !0, signal?.removeEventListener("abort", onAbortSignal), askWindowTimer !== void 0 && clearTimeout(askWindowTimer), askBackstopTimer !== void 0 && clearTimeout(askBackstopTimer), lateDecideWatchdogTimer !== void 0 && clearTimeout(lateDecideWatchdogTimer), liveApprovalCards.delete(callKey), forgetApprovalCardToolCallId(req.toolCallId, callKey, bornEpoch, saidWindowClosed ? req.toolName : void 0), journalGateResolved(callKey), resolve58(o));
468891
469648
  }, removeFromQueue = () => {
468892
469649
  try {
468893
469650
  setQueue((queue3) => queue3.filter((item) => item.toolUseID !== callKey));
@@ -468979,9 +469736,9 @@ function shellApprovalCardPort(req) {
468979
469736
  retractApprovalCard(callKey, "unanswered-after-window");
468980
469737
  }, unansweredBackstopMs(backstopWindowMs)));
468981
469738
  }, windowClosedEvidence = null, windowClosed = (evidence) => {
468982
- if (settled || windowClosedEvidence === "parked-frame" || windowClosedEvidence === "timer" && evidence !== "parked-frame") return !1;
468983
- windowClosedEvidence = evidence, logForDebugging(`liveToolApprovalWire: window closed for "${req.toolName}" callKey=${callKey} evidence=${evidence}`), askWindowTimer !== void 0 && (clearTimeout(askWindowTimer), askWindowTimer = void 0), windowClosedAtMs === void 0 && (windowClosedAtMs = Date.now()), markApprovalCardWindowClosed(callKey);
468984
- let row2 = evidence === "parked-frame" ? approvalMovedToDurableQueueRow(req.toolName) : approvalWindowClosedRow(req.toolName);
469739
+ if (settled || windowClosedEvidence !== null && windowClosedEvidence !== "timer" || windowClosedEvidence === "timer" && evidence === "timer") return !1;
469740
+ windowClosedEvidence = evidence, logForDebugging(`liveToolApprovalWire: window closed for "${req.toolName}" callKey=${callKey} evidence=${evidence}`), askWindowTimer !== void 0 && (clearTimeout(askWindowTimer), askWindowTimer = void 0), windowClosedAtMs === void 0 && (windowClosedAtMs = Date.now()), markApprovalCardWindowClosed(callKey), saidWindowClosed = !0;
469741
+ let row2 = evidence === "parked-frame" ? approvalMovedToDurableQueueRow(req.toolName) : evidence === "auto-denied" ? approvalAutoDeniedRow(req.toolName) : approvalWindowClosedRow(req.toolName);
468985
469742
  return surfaceLateDecideOutcome(row2) || logForDebugging("liveToolApprovalWire: the window-closed status row had nowhere to go \u2014 the user was NOT told"), armBackstopOnce(), !0;
468986
469743
  };
468987
469744
  if (signal?.aborted) {
@@ -469187,7 +469944,7 @@ function shellApprovalCardPort(req) {
469187
469944
  askBackstopTimer !== void 0 && (clearTimeout(askBackstopTimer), askBackstopTimer = void 0), armBackstopOnce(), surfaceLateDecideOutcome(row2) || logForDebugging("liveToolApprovalWire: the late-approve confirmation banner had nowhere to go");
469188
469945
  };
469189
469946
  try {
469190
- if (setQueue((queue3) => [...queue3, confirm2]), logEngineGateFallbackToAsk(req.toolName, syncVerdict), liveApprovalCards.set(callKey, { retract: retractCard, windowClosed }), askDeadlineMs !== void 0 && !isParkRowCard(callKey)) {
469947
+ if (setQueue((queue3) => [...queue3, confirm2]), logEngineGateFallbackToAsk(req.toolName, syncVerdict), liveApprovalCards.set(callKey, { retract: retractCard, windowClosed }), bornEpoch = registerApprovalCardToolCallId(req.toolCallId, callKey), askDeadlineMs !== void 0 && !isParkRowCard(callKey)) {
469191
469948
  let remaining = askDeadlineMs - Date.now();
469192
469949
  backstopWindowMs = Math.max(0, remaining), remaining <= 0 ? (logForDebugging(`liveToolApprovalWire: gate for "${req.toolName}" arrived with its approval window already closed \u2014 the card stays up, saying so`), windowClosed("timer")) : askWindowTimer = setTimeout(() => {
469193
469950
  windowClosed("timer");
@@ -469232,6 +469989,9 @@ var asWireTool, forcedToolLoadFailureForTest, forcedToolNilExportForTest, loadFi
469232
469989
  init_ruleEvidenceNote();
469233
469990
  init_persistedRulesWire2();
469234
469991
  init_armedGateRegistry2();
469992
+ init_askFrameNotes();
469993
+ init_liveSessionStore();
469994
+ init_liveApprovalCardHandles();
469235
469995
  init_liveApprovalCardHandles();
469236
469996
  init_turnGateJournal();
469237
469997
  init_untrustedDisplayText();
@@ -469432,6 +470192,9 @@ function windowKeysFrom(frame, opts) {
469432
470192
  ...typeof frame.serverNowMs == "number" && Number.isFinite(frame.serverNowMs) ? { serverNowMs: frame.serverNowMs } : {}
469433
470193
  };
469434
470194
  }
470195
+ function readRuleOffersAbsenceStamp(card) {
470196
+ return typeof card.ruleOffersAbsence == "string" && card.ruleOffersAbsence !== "" ? { ruleOffersAbsence: card.ruleOffersAbsence } : {};
470197
+ }
469435
470198
  function approvalCardRequestFrom(frame, opts) {
469436
470199
  let card = frame.card, notes = [riskNoteFor(card.risk)];
469437
470200
  card.argsOmitted === !0 && notes.push("arguments omitted by the engine (over the 16 KiB cap) \u2014 this does NOT mean the call has no arguments");
@@ -469469,6 +470232,28 @@ function approvalCardRequestFrom(frame, opts) {
469469
470232
  // 不是 `ApprovalCard` 的键)⇒ 本处**不**去 card 上找它:两位不同源不同算点,在这里补一个同名读
469470
470233
  // 就是拿一个量冒充另一个。那一位由 client-core 的行→卡重铸腿供给(0.48.0 件②)。
469471
470234
  ...card.inputHasBidi === !0 ? { inputHasBidi: !0 } : {},
470235
+ // ── §23a 两位(L-107④ 壳半场,1.0.102;登记在案的「刻意不透」两条同批清账)─────────────
470236
+ // 🔴 修前这两位在本腿被整键剥掉,理由(写在 approvalStreamWire.test 的 DELIBERATELY_NOT_STAMPED
470237
+ // 表里)是「壳侧零消费口 + client-core 也还没投影 ⇒ 透传一个没人读的对象 = 假 affordance」。
470238
+ // **两个前提本批同时消失**:client-core 0.59.0 把两位投影到 `ApprovalCardRequest` 的具名位,
470239
+ // 壳侧 `composeCardWireNote` → `askFrameNoteParts` 是它们的消费口。⇒ 那条登记的退出条件
470240
+ // (逐字:「包侧投影落地那一批本腿改经包面透传,同批删本条」)兑现,两条同批从表里删掉。
470241
+ // 🔴 **本腿一个字都不自己拼**:措辞单源在 askFrameNotes,由卡口(shellApprovalCardPort →
470242
+ // composeCardWireNote)统一渲 —— 本腿只把值原样送到卡入参上。两个铸卡口各拼一遍就是同一句
470243
+ // 话在两条车道上漂开(probeCause / ruleEvidence 当年立的同一条纪律)。
470244
+ // 🔴 **窄读走壳侧单源 `readDenialLimitFallback`**(askFrameNotes):活卡帧腿的窄读在包里做完了,
470245
+ // 但本腿读的是**生 wire**,而包的同名窄读器**没有导出**(dist 直证)⇒ 壳侧只此一把,判据与
470246
+ // server `.strict()` / 包内那把**逐字对齐**(四成员缺一整只丢)。已记候包:包导出后同批删。
470247
+ // 🔴 只按**铸点域**判,绝不再收窄一格(B-025「消费域比铸点域更窄」的病形)。
470248
+ ...(() => {
470249
+ let dlf = readDenialLimitFallback3(card.denialLimitFallback);
470250
+ return dlf !== void 0 ? { denialLimitFallback: dlf } : {};
470251
+ })(),
470252
+ // 🔴 `ruleOffersAbsence` 按**开集**送(非空串即收):闭三词的属主是 core,壳再套一张闭集表会在
470253
+ // core 加员那天把合法值判没。空串是坏值不是「没有原因」⇒ 不送。
470254
+ // ⚠️ 本腿的「不再询问」档**本来就不渲**(ruleOffers/ruleSuggestions 刻意剥,见下方长注):
470255
+ // 送这一位不会造出档位,只会让卡上多一句「为什么没有这一格」—— 那正是它答的那一问。
470256
+ ...readRuleOffersAbsenceStamp(card),
469472
470257
  // ── #144 被越级的持久 allow 规则原文(合并批审计件⑧;**同族第三次**静默漏键)──────────────
469473
470258
  // 🔴 与 `model` / `requiresRealApproval` / `inputHasBidi` 逐字同形:SDK 的 `APPROVAL_CARD_KEYS`
469474
470259
  // 早已列了 `persistedRuleShadowed`(server ≥7.13.0 随卡真发),client-core 的
@@ -469548,6 +470333,15 @@ function genericCardRequestFrom(env6, askId, opts) {
469548
470333
  // 扫描结果,不是卡的展示语义)。防御读:**严格 `true` 才 stamp**,其余(含 `"true"` / `1` / `false`)
469549
470334
  // 一律键缺席。与 v1 腿同一条纪律 —— 未知形帧上少说一句披露只是降级,多说一句「已确认干净」是谎报。
469550
470335
  ...card.inputHasBidi === !0 ? { inputHasBidi: !0 } : {},
470336
+ // §23a 两位同形(L-107④;与 toolCallId / inputHasBidi 同一条降级纪律):这两位与 schemaVersion
470337
+ // **无关** —— 它们是引擎对这只 ask 本身的判定,不是卡的展示语义 ⇒ 未知形帧上照样防御读。
470338
+ // 🔴 措辞与窄读都在 askFrameNotes 单源;本腿只送已成形的值。读法与 v1 腿**同一个函数**
470339
+ // (不是「同样写一遍」)—— 两腿各抄一份窄读器就是同形存量。读不出一律键缺席。
470340
+ ...(() => {
470341
+ let dlf = readDenialLimitFallback3(card.denialLimitFallback);
470342
+ return dlf !== void 0 ? { denialLimitFallback: dlf } : {};
470343
+ })(),
470344
+ ...readRuleOffersAbsenceStamp(card),
469551
470345
  ...opts.signal !== void 0 ? { signal: opts.signal } : {},
469552
470346
  wireNote: notes.join(" \xB7 "),
469553
470347
  // 窗三键(见函数头注)——**先验自洽再投影**;验不过 ⇒ 整族不转(连本地锚点 `receivedAtMs` 都不盖:
@@ -469879,6 +470673,7 @@ var STREAM_APPROVAL_CAP, ASK_DECISION_DISABLED_CODE, IDEMPOTENCY_KEY_MAX, PARKIN
469879
470673
  init_ruleEvidenceNote();
469880
470674
  init_untrustedDisplayText();
469881
470675
  init_wireNoticePort();
470676
+ init_askFrameNotes();
469882
470677
  init_liveToolApprovalWire();
469883
470678
  init_askParkExpiry();
469884
470679
  STREAM_APPROVAL_CAP = "streamApproval", ASK_DECISION_DISABLED_CODE = "feature.approval_ask_disabled", IDEMPOTENCY_KEY_MAX = 255, PARKING_POLL_MAX = 2, PARKING_POLL_DELAY_MS = 400, CAPS_SETTLE_BUDGET_MS = 1500, LEGACY_SETTLE_GRACE_MS = 750, MAX_DECISION_NOTE_CHARS = 2048, TEARDOWN_BUDGET_MS = 1e3;
@@ -470177,6 +470972,7 @@ __export(agentsWire_exports, {
470177
470972
  DELEGATION_CAP_CODES: () => DELEGATION_CAP_CODES,
470178
470973
  DELEGATION_CONCURRENCY_CAP: () => DELEGATION_CONCURRENCY_CAP,
470179
470974
  DELEGATION_SESSION_CAP: () => DELEGATION_SESSION_CAP,
470975
+ DENIAL_LIMIT_KINDS: () => DENIAL_LIMIT_KINDS,
470180
470976
  DETACH_DURABLE_OFF_400_ANCHOR: () => DETACH_DURABLE_OFF_400_ANCHOR,
470181
470977
  DETACH_HEADER: () => DETACH_HEADER,
470182
470978
  DETACH_WIRE_MIN_ENGINE: () => DETACH_WIRE_MIN_ENGINE,
@@ -470299,6 +471095,7 @@ __export(agentsWire_exports, {
470299
471095
  REWIND_ERROR_CODE_PREFIXES: () => REWIND_ERROR_CODE_PREFIXES,
470300
471096
  RULE_NOT_SENT_REJECTED_WARN_TEXT: () => RULE_NOT_SENT_REJECTED_WARN_TEXT,
470301
471097
  RULE_NOT_SENT_WARN_TEXT: () => RULE_NOT_SENT_WARN_TEXT,
471098
+ RULE_OFFERS_ABSENCE_REASONS: () => RULE_OFFERS_ABSENCE_REASONS,
470302
471099
  RULE_OFFER_BATCH_MEMBER_KINDS: () => RULE_OFFER_BATCH_MEMBER_KINDS,
470303
471100
  RULE_OFFER_MATCHES: () => RULE_OFFER_MATCHES,
470304
471101
  RULE_OFFER_UNCOVERED_REASONS: () => RULE_OFFER_UNCOVERED_REASONS,
@@ -470380,6 +471177,7 @@ __export(agentsWire_exports, {
470380
471177
  __resetHooksWireCapsForTests: () => __resetHooksWireCapsForTests,
470381
471178
  __resetRetainWithoutWakeWarningForTests: () => __resetRetainWithoutWakeWarningForTests,
470382
471179
  __resetRunningChoiceLedgerForTests: () => __resetRunningChoiceLedgerForTests,
471180
+ __resetSqlEngineReadingsForTests: () => __resetSqlEngineReadingsForTests,
470383
471181
  __resetSubagentOutputCapCacheForTests: () => __resetSubagentOutputCapCacheForTests,
470384
471182
  __resetSubagentOwnerLedgerForTests: () => __resetSubagentOwnerLedgerForTests,
470385
471183
  __resetSubagentStreamCapCacheForTests: () => __resetSubagentStreamCapCacheForTests,
@@ -470526,6 +471324,7 @@ __export(agentsWire_exports, {
470526
471324
  engineCapState: () => engineCapState,
470527
471325
  engineCapString: () => engineCapString,
470528
471326
  engineCapTrue: () => engineCapTrue,
471327
+ engineCapValue: () => engineCapValue,
470529
471328
  engineCapsSettled: () => engineCapsSettled,
470530
471329
  engineCcStopSemantics: () => engineCcStopSemantics,
470531
471330
  engineLimitsSupportWarning: () => engineLimitsSupportWarning,
@@ -470568,6 +471367,7 @@ __export(agentsWire_exports, {
470568
471367
  fleetViewStubRowIds: () => fleetViewStubRowIds,
470569
471368
  fmtCtxOut: () => fmtCtxOut,
470570
471369
  fmtTokens: () => fmtTokens,
471370
+ forgetSqlEngineReading: () => forgetSqlEngineReading,
470571
471371
  gateArmedWaitMs: () => gateArmedWaitMs,
470572
471372
  gateKind: () => gateKind,
470573
471373
  getBgParentRun: () => getBgParentRun,
@@ -470711,6 +471511,7 @@ __export(agentsWire_exports, {
470711
471511
  normalizeTaskNotification: () => normalizeTaskNotification,
470712
471512
  normalizeWirePrincipal: () => normalizeWirePrincipal,
470713
471513
  noteBgOwnerAbsence: () => noteBgOwnerAbsence,
471514
+ noteEngineCapsForSqlEngine: () => noteEngineCapsForSqlEngine,
470714
471515
  notePlanReviewAnswered: () => notePlanReviewAnswered,
470715
471516
  notePlanReviewAnsweredFor: () => notePlanReviewAnsweredFor,
470716
471517
  notePlanReviewAnsweredIfDecisive: () => notePlanReviewAnsweredIfDecisive,
@@ -470719,6 +471520,7 @@ __export(agentsWire_exports, {
470719
471520
  notificationDropCounters: () => notificationDropCounters,
470720
471521
  notificationQueuePortMisses: () => notificationQueuePortMisses,
470721
471522
  observeCancelByDeny: () => observeCancelByDeny,
471523
+ observedSqlEngine: () => observedSqlEngine,
470722
471524
  onEngineTaskBound: () => onEngineTaskBound,
470723
471525
  onGateArmed: () => onGateArmed,
470724
471526
  onGateArmedFor: () => onGateArmedFor,
@@ -470776,6 +471578,7 @@ __export(agentsWire_exports, {
470776
471578
  projectFleetAgentRows: () => projectFleetAgentRows,
470777
471579
  projectFleetAgentRowsFor: () => projectFleetAgentRowsFor,
470778
471580
  projectRewind: () => projectRewind,
471581
+ projectSqlEngineCapability: () => projectSqlEngineCapability,
470779
471582
  projectTasks: () => projectTasks,
470780
471583
  projectWorkflowRun: () => projectWorkflowRun,
470781
471584
  projectWorkflowTaskOutput: () => projectWorkflowTaskOutput,
@@ -470897,6 +471700,7 @@ __export(agentsWire_exports, {
470897
471700
  skillCommandsToSpecs: () => skillCommandsToSpecs,
470898
471701
  splitApiErrorSupplement: () => splitApiErrorSupplement,
470899
471702
  spoolMarkerOf: () => spoolMarkerOf,
471703
+ sqlEngineDoctorDetail: () => sqlEngineDoctorDetail,
470900
471704
  stamp: () => stamp,
470901
471705
  startApprovalsFeed: () => startApprovalsFeed,
470902
471706
  steerEngineSubagent: () => steerEngineSubagent,
@@ -471157,59 +471961,9 @@ __export(sqlEngineCapability_exports, {
471157
471961
  projectSqlEngineCapability: () => projectSqlEngineCapability,
471158
471962
  sqlEngineDoctorDetail: () => sqlEngineDoctorDetail
471159
471963
  });
471160
- function projectSqlEngineCapability(caps) {
471161
- if (caps === null || typeof caps != "object") return;
471162
- if (!("sql" in caps)) return { kind: "not_reported" };
471163
- let sql = caps.sql;
471164
- if (sql === null) return { kind: "none" };
471165
- if (sql === void 0) return { kind: "not_reported" };
471166
- if (typeof sql != "object") return;
471167
- let s = sql;
471168
- if (!(typeof s.engine != "string" || s.engine === "") && !(typeof s.isolation != "string" || s.isolation === "") && !(s.txnMode !== null && (typeof s.txnMode != "string" || s.txnMode === "")))
471169
- return { kind: "present", view: { engine: s.engine, isolation: s.isolation, txnMode: s.txnMode } };
471170
- }
471171
- function noteEngineCapsForSqlEngine(baseUrl, caps) {
471172
- try {
471173
- let reading = projectSqlEngineCapability(caps);
471174
- if (reading === void 0) {
471175
- readingByBase.delete(baseUrl);
471176
- return;
471177
- }
471178
- readingByBase.set(baseUrl, reading);
471179
- } catch {
471180
- }
471181
- }
471182
- function capsBaseUrl5() {
471183
- let raw2 = process.env.SEMA_LIVE_BASEURL;
471184
- return typeof raw2 == "string" && raw2.trim() !== "" ? raw2 : void 0;
471185
- }
471186
- function observedSqlEngine(baseUrl = capsBaseUrl5()) {
471187
- return typeof baseUrl != "string" || baseUrl === "" ? { kind: "unobserved" } : readingByBase.get(baseUrl) ?? { kind: "unobserved" };
471188
- }
471189
- function sqlEngineDoctorDetail(reading) {
471190
- switch (reading.kind) {
471191
- case "unobserved":
471192
- return "not observed \u2014 the engine reports it on /v1/capabilities; this one-shot process has no engine response (run /doctor inside the REPL after a turn)";
471193
- case "not_reported":
471194
- return "not reported by this engine \u2014 the capability position needs a newer engine";
471195
- case "none":
471196
- return "none \u2014 the engine reports no SQL backend on this deployment (local file stores)";
471197
- case "present": {
471198
- let e = cleanUntrustedForDisplay(reading.view.engine, 40), i = cleanUntrustedForDisplay(reading.view.isolation, 40), t2 = reading.view.txnMode === null ? "no txn-mode indicator on this engine" : cleanUntrustedForDisplay(reading.view.txnMode, 40);
471199
- return `${e} \xB7 isolation ${i} \xB7 txn ${t2}`;
471200
- }
471201
- }
471202
- }
471203
- function forgetSqlEngineReading(baseUrl) {
471204
- typeof baseUrl != "string" || baseUrl === "" || readingByBase.delete(baseUrl);
471205
- }
471206
- function __resetSqlEngineReadingsForTests() {
471207
- readingByBase.clear();
471208
- }
471209
- var readingByBase, init_sqlEngineCapability = __esm({
471964
+ var init_sqlEngineCapability2 = __esm({
471210
471965
  "build-src/src/sema/sqlEngineCapability.ts"() {
471211
- init_untrustedDisplayText();
471212
- readingByBase = /* @__PURE__ */ new Map();
471966
+ init_dist();
471213
471967
  }
471214
471968
  });
471215
471969
 
@@ -471237,7 +471991,7 @@ function armEngineCapsProbes(input) {
471237
471991
  return caps;
471238
471992
  }) : capsProbe;
471239
471993
  if (afterEngineRespawn) {
471240
- resetCapsDiscoveryState(baseUrl), invalidateSelfKnowledgeCap(baseUrl), forgetSqlEngineReading(baseUrl), kickAppendSystemPromptCapProbe(baseUrl, appendCapProbe), invalidateEngineCaps(baseUrl, guardedCapsProbe);
471994
+ resetCapsDiscoveryState(baseUrl), invalidateSelfKnowledgeCap(baseUrl), forgetSqlEngineReading(baseUrl), forgetWiringManifestReading(), kickAppendSystemPromptCapProbe(baseUrl, appendCapProbe), invalidateEngineCaps(baseUrl, guardedCapsProbe);
471241
471995
  return;
471242
471996
  }
471243
471997
  kickAppendSystemPromptCapProbe(baseUrl, appendCapProbe), kickEngineCapsProbe(baseUrl, guardedCapsProbe);
@@ -471249,7 +472003,8 @@ var capsTeeEpochByBase, init_engineCapsArm = __esm({
471249
472003
  init_dist();
471250
472004
  init_projectContextCapGate();
471251
472005
  init_selfKnowledge();
471252
- init_sqlEngineCapability();
472006
+ init_sqlEngineCapability2();
472007
+ init_wiringManifestStore();
471253
472008
  capsTeeEpochByBase = /* @__PURE__ */ new Map();
471254
472009
  }
471255
472010
  });
@@ -471376,8 +472131,8 @@ function ledgerPath(scope) {
471376
472131
  }
471377
472132
  function crashConvergedScopeDigest(baseUrl, principal) {
471378
472133
  try {
471379
- let { createHash: createHash34 } = __require("node:crypto");
471380
- return createHash34("sha256").update(scopeKeyOf(baseUrl, principal)).digest("hex").slice(0, 16);
472134
+ let { createHash: createHash33 } = __require("node:crypto");
472135
+ return createHash33("sha256").update(scopeKeyOf(baseUrl, principal)).digest("hex").slice(0, 16);
471381
472136
  } catch {
471382
472137
  return "nodigest";
471383
472138
  }
@@ -471538,6 +472293,17 @@ async function* normalizeToolNames(events3) {
471538
472293
  yield ev;
471539
472294
  }
471540
472295
  }
472296
+ async function* tapAutoDeniedToolEnds(events3, openEpoch) {
472297
+ for await (let ev of events3) {
472298
+ try {
472299
+ let kind = surfaceToolEndAutoDenied(ev, openEpoch);
472300
+ kind === "live" ? semaDebugLine("liveClient: tool_end autoDenied=true \u2014 the live card said so") : kind === "late" ? semaDebugLine("liveClient: tool_end autoDenied=true \u2014 corrected the window-closed row") : kind === "late-unsurfaced" && semaDebugLine("liveClient: tool_end autoDenied=true \u2014 the late correction could not be surfaced (no transcript sink); the ledger entry is consumed");
472301
+ } catch (e) {
472302
+ semaDebugLine(`liveClient: the autoDenied tap threw (ignored, the stream is never harmed): ${String(e)}`);
472303
+ }
472304
+ yield ev;
472305
+ }
472306
+ }
471541
472307
  async function* stampSubagentOwners(events3, runIdOf, ownerSessionId) {
471542
472308
  for await (let ev of events3)
471543
472309
  recordSubagentOwnerFromProgress(ev, runIdOf(), ownerSessionId), yield ev;
@@ -471870,7 +472636,7 @@ function createLiveConversationClient(config4) {
471870
472636
  ...opts?.signal ? { signal: opts.signal } : {}
471871
472637
  }) : live;
471872
472638
  return diagnoseSseIdleTear(
471873
- normalizeToolNames(
472639
+ normalizeToolNames(tapAutoDeniedToolEnds(
471874
472640
  captureSessionId(
471875
472641
  // §4④ engine 1.163 — AskUserQuestion parks the run `suspended` (no `question` frames anymore);
471876
472642
  // the bridge turns that park into dialog → approvals.decide → runs.events continuation, INSIDE
@@ -471906,8 +472672,9 @@ function createLiveConversationClient(config4) {
471906
472672
  () => headerAcquired,
471907
472673
  () => earlyTaskId,
471908
472674
  () => getLiveSessionEpoch() === openEpoch
471909
- )
471910
- ),
472675
+ ),
472676
+ openEpoch
472677
+ )),
471911
472678
  baseUrlTrimmed,
471912
472679
  opts?.signal
471913
472680
  );
@@ -471928,7 +472695,7 @@ function createLiveConversationClient(config4) {
471928
472695
  events(taskId, opts) {
471929
472696
  let openEpoch = getLiveSessionEpoch();
471930
472697
  return withDurableSuggestionsTail(
471931
- normalizeToolNames(
472698
+ normalizeToolNames(tapAutoDeniedToolEnds(
471932
472699
  captureSessionId(
471933
472700
  bridgeAskUserQuestionGates(
471934
472701
  demuxQuestionFrames(
@@ -471959,8 +472726,9 @@ function createLiveConversationClient(config4) {
471959
472726
  void 0,
471960
472727
  void 0,
471961
472728
  () => getLiveSessionEpoch() === openEpoch
471962
- )
471963
- ),
472729
+ ),
472730
+ openEpoch
472731
+ )),
471964
472732
  taskId,
471965
472733
  (id) => client3.runs.get(id, { ...engineSessionParamSpread() }),
471966
472734
  // 调用方的中断口:补收窗(≤2s)里用户 Ctrl+C / 关流 ⇒ 立刻停,绝不在中断后多打 HTTP。
@@ -472056,7 +472824,9 @@ var ENGINE_TO_CC_TOOL, SUGGESTIONS_TAIL_MAX_ATTEMPTS, SUGGESTIONS_TAIL_RETRY_MS,
472056
472824
  init_engineCapsArm();
472057
472825
  init_crashConvergedNotice();
472058
472826
  init_selfOrchestrationDenial2();
472059
- init_sqlEngineCapability();
472827
+ init_sqlEngineCapability2();
472828
+ init_liveApprovalCardHandles();
472829
+ init_debugLine();
472060
472830
  init_projectContextCapGate();
472061
472831
  init_dist();
472062
472832
  init_dist();
@@ -472754,11 +473524,11 @@ var powerupUnlocked, powerupState_default, init_powerupState = __esm({
472754
473524
  });
472755
473525
 
472756
473526
  // build-src/src/sema/workflowJournalWire.ts
472757
- function capsBaseUrl6() {
473527
+ function capsBaseUrl5() {
472758
473528
  let raw2 = process.env.SEMA_LIVE_BASEURL;
472759
473529
  return typeof raw2 == "string" && raw2.trim() !== "" ? raw2 : void 0;
472760
473530
  }
472761
- function workflowJournalAvailable(baseUrl = capsBaseUrl6()) {
473531
+ function workflowJournalAvailable(baseUrl = capsBaseUrl5()) {
472762
473532
  return engineCapTrue(baseUrl, WORKFLOW_JOURNAL_CAP);
472763
473533
  }
472764
473534
  function resolveJournalFacade() {
@@ -522156,11 +522926,23 @@ async function collectAxesRows(opts, deps2) {
522156
522926
  rows2.push({ label: "Auto mode", status: "warn", detail: "reading unavailable" });
522157
522927
  }
522158
522928
  try {
522159
- let { sqlEngineDoctorDetail: sqlEngineDoctorDetail2, observedSqlEngine: observedSqlEngine2 } = await Promise.resolve().then(() => (init_sqlEngineCapability(), sqlEngineCapability_exports)), reading = deps2?.readSqlEngine !== void 0 ? deps2.readSqlEngine() : observedSqlEngine2();
522929
+ let { sqlEngineDoctorDetail: sqlEngineDoctorDetail2, observedSqlEngine: observedSqlEngine2 } = await Promise.resolve().then(() => (init_sqlEngineCapability2(), sqlEngineCapability_exports)), reading = deps2?.readSqlEngine !== void 0 ? deps2.readSqlEngine() : observedSqlEngine2();
522160
522930
  rows2.push({ label: "SQL engine", status: "info", detail: sqlEngineDoctorDetail2(reading) });
522161
522931
  } catch {
522162
522932
  rows2.push({ label: "SQL engine", status: "warn", detail: "reading unavailable" });
522163
522933
  }
522934
+ try {
522935
+ let { wiringMcpDoctorDetail: wiringMcpDoctorDetail2, observedWiringMcp: observedWiringMcp2 } = await Promise.resolve().then(() => (init_wiringManifestStore(), wiringManifestStore_exports)), readRows = deps2?.readWiringMcp !== void 0 ? deps2.readWiringMcp() : observedWiringMcp2();
522936
+ rows2.push({
522937
+ label: "MCP servers (engine leg)",
522938
+ status: "info",
522939
+ // 消毒口在**呈现面**给(措辞在 store,消毒在这里 —— 与 modelGateRemovedLine 同分工):
522940
+ // 三座都是 UNTRUSTED-for-display,只渲染、绝不参与判定。
522941
+ detail: wiringMcpDoctorDetail2(readRows, (v2, max2) => cleanUntrustedForDisplay(v2, max2))
522942
+ });
522943
+ } catch {
522944
+ rows2.push({ label: "MCP servers (engine leg)", status: "warn", detail: "reading unavailable" });
522945
+ }
522164
522946
  let remote = (() => {
522165
522947
  try {
522166
522948
  return engineTarget.configuredEngineUrl();
@@ -525507,7 +526289,7 @@ var CC_DIR5, CC_GLOBAL_FILE2, MCP_SCOPE_LABELS, init_mcpChannels = __esm({
525507
526289
 
525508
526290
  // build-src/src/sema/importSources.ts
525509
526291
  import { existsSync as existsSync34, mkdirSync as mkdirSync27, readdirSync as readdirSync14, readFileSync as readFileSync52, writeFileSync as writeFileSync27 } from "node:fs";
525510
- import { createHash as createHash31 } from "node:crypto";
526292
+ import { createHash as createHash30 } from "node:crypto";
525511
526293
  import { homedir as homedir48 } from "node:os";
525512
526294
  import { dirname as dirname89, join as join195, resolve as resolve50, sep as sep43 } from "node:path";
525513
526295
  function toSafeName(raw2) {
@@ -525979,7 +526761,7 @@ async function scanImportSources(opts) {
525979
526761
  `) } : { scans, warnings };
525980
526762
  }
525981
526763
  function importScanDigest(scans) {
525982
- let hash2 = createHash31("sha256");
526764
+ let hash2 = createHash30("sha256");
525983
526765
  for (let scan of [...scans].sort((a, b3) => a.sourceId.localeCompare(b3.sourceId))) {
525984
526766
  hash2.update(scan.sourceId).update("\0");
525985
526767
  for (let item of [...scan.result.items].sort((a, b3) => a.id.localeCompare(b3.id)))
@@ -533340,7 +534122,7 @@ __export(cloudResources_exports, {
533340
534122
  cloudResourceRemove: () => cloudResourceRemove,
533341
534123
  cloudResourceSync: () => cloudResourceSync
533342
534124
  });
533343
- import { createHash as createHash32 } from "node:crypto";
534125
+ import { createHash as createHash31 } from "node:crypto";
533344
534126
  import { existsSync as existsSync37, readdirSync as readdirSync16, readFileSync as readFileSync56, statSync as statSync17 } from "node:fs";
533345
534127
  import { basename as basename69, dirname as dirname91, isAbsolute as isAbsolute34, join as join201, resolve as resolve51 } from "node:path";
533346
534128
  import { getEffective as getEffective2, getMeConfig, getScopeConfigDraft as getScopeConfigDraft2, OAuthFlowError as OAuthFlowError3, RegistryApiError as RegistryApiError3 } from "@sema-agent/sdk/registry";
@@ -533827,7 +534609,7 @@ async function readSkillEntry(file2, fallbackName) {
533827
534609
  return { name, display: display2, entry: null, notes: [], skipReason: `skill name '${name}' is not registry-safe (letters/digits/._- , no spaces). Set a conforming 'name:' in the frontmatter.` };
533828
534610
  if (!content)
533829
534611
  return { name, display: display2, entry: null, notes: [], skipReason: `${file2} has no body after the frontmatter \u2014 nothing to upload.` };
533830
- let contentHash = `sha256:${createHash32("sha256").update(content, "utf8").digest("hex")}`;
534612
+ let contentHash = `sha256:${createHash31("sha256").update(content, "utf8").digest("hex")}`;
533831
534613
  return {
533832
534614
  name,
533833
534615
  display: display2,
@@ -544463,7 +545245,7 @@ Usage: sema --remote "your task description"`, () => gracefulShutdown(1));
544463
545245
  pendingHookMessages
544464
545246
  }, renderAndRun);
544465
545247
  }
544466
- }).version("sema 1.0.101", "-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 () => {
545248
+ }).version("sema 1.0.102", "-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 () => {
544467
545249
  await (await Promise.resolve().then(() => (init_bg2(), bg_exports))).psHandler([]), process.exit(process.exitCode ?? 0);
544468
545250
  }), program2.command("logs [id]").description("Print a background session's recent terminal output").action(async (id) => {
544469
545251
  await (await Promise.resolve().then(() => (init_bg2(), bg_exports))).logsHandler(id, []), process.exit(process.exitCode ?? 0);
@@ -546584,7 +547366,7 @@ var init_local_load = __esm({
546584
547366
  // node_modules/@sema-agent/settings-schema/dist/scheduler-store-node.js
546585
547367
  import { mkdirSync as mkdirSync32, readFileSync as readFileSync64, writeFileSync as writeFileSync30, renameSync as renameSync19 } from "node:fs";
546586
547368
  import { dirname as dirname98 } from "node:path";
546587
- import { randomBytes as randomBytes30, createHash as createHash33 } from "node:crypto";
547369
+ import { randomBytes as randomBytes30, createHash as createHash32 } from "node:crypto";
546588
547370
  function loadSchedulerStore(path28) {
546589
547371
  try {
546590
547372
  return parseSchedulerStore(readFileSync64(path28, "utf-8"));