@sema-agent/core 7.66.0 → 7.66.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 7.66.1 — 2026-11-10
2
+
3
+ **Hard-breaking changes:** none. **Closed sets:** none. **Exports:** +0 / −0 names; no type or signature change. **Wire:** no key added or removed. **Behavior (narrowing, open to veto):** a question (`AskUserQuestion`) nobody answers, on a leg with no durable question face — a synchronous child or fork, or a leg with a checkpoint store and a shell / egress / irreversible tool but neither `durableApproval` nor `forceDurableGate` — is refused as not shown instead of parked as an `irreversible_ask` row.
4
+
5
+ **Packages:** `@sema-agent/primitives`, `@sema-agent/mods-kernel` and `@sema-agent/core-stores-sql` are re-cut at 7.66.1 beside core with contents identical to 7.66.0 (no source of theirs changed in this patch).
6
+
7
+ ### A question parks only on a leg whose question face is durable — one judge, `durableQuestionFace` (#4054; fix; behavior narrowing open to veto; hard-breaking: none; closed sets: none; exports: +0 / −0; wire: none) (@server @cli @test)
8
+
9
+ - **Before (v7.66.0).** The park closure took a question whenever it existed, i.e. on a checkpoint store plus any arming cause: a `durableApproval` opt-in, the `forceDurableGate` entitlement, or the safety vocabulary (a mounted shell, an egress or irreversible tool). A synchronous child or fork inherits its parent's store and mounts a shell, but carries no durable opt-in of its own, so its unanswered question (no live face, or a face that answered `unavailable`) parked as an `irreversible_ask` row. The delegating parent read `status: suspended … PARKED at an approval gate`, the parent's run went on to finish, and nothing could resume the row (sema-server answers a decide on it with `409 conflict.resume_context_unavailable`). A root leg with a store and a shell but no opt-in parked its question the same way. Meanwhile the engine's own reading of "can a question be held for a person on this leg", `durableQuestionFace` (a store ∧ (`durableApproval` ∨ `forceDurableGate`)), said no. That is the reading that mounts the question tool on a leg with no live face, and the one the manifest's `question.interactiveToolsWithoutDeliveryFace` cell reads. So one fact had two readings.
10
+ - **Now.** One judge. The park closure declines a question on a leg where `durableQuestionFace` is false, at every park site: the first pass, and the re-route after a face answered `unavailable`. The gate's content lane then gives its existing refusal, with `isError` set and no row written: "AskUserQuestion could not be parked for a durable human answer on this path … the question was NOT shown to anyone. Proceed with your best judgment and state the assumption you made." The child carries on and reports. The park phase reads the question-face phase's own value (`prepare-question-face.ts`); it does not derive the fact a second time. Unchanged: a permission ask under the safety vocabulary still parks (`irreversible_ask`, a synchronous child's included). A leg with `durableApproval` still parks its question (`human`): the root, a background child the delegation tool forwards the opt-in to, or a workflow agent. So does a leg with `forceDurableGate`. A live question face still answers in-stream first.
11
+ - **Who is hurt (narrowing, open to veto).** (1) A deployment whose synchronous children or forks ask questions with nobody attached. Each such child used to park a row nobody could resume; it now reads the refusal and carries on (sema-server 7.150.x on a deployment that mounts a shell; its S-3854). (2) A root run with a checkpoint store and a shell (or an egress / irreversible tool) but neither `durableApproval` nor `forceDurableGate`. Its question used to park as `irreversible_ask` and could be resumed; it is refused now. (3) A consumer that pins "a question parks as `irreversible_ask`".
12
+ - **Compensation.** To have a question held for a person, declare it: `durableApproval` on the leg, or the `forceDurableGate` entitlement. That is the declaration the reserved placeholder `QUESTION_AWAITS_RESUME` already names. If a synchronous child's question must wait for a person, give the run a live question face (the child reads its parent's) or let the parent ask. Rows parked by v7.66.0 stay as they are.
13
+ - **Rules.** Judges of question durability: 2 → 1 (the park closure no longer decides a question by its arming causes). Special cases: 0.
14
+ - **Pins.** `test/backlog4054-sync-child-question-one-judge.test.ts`: ① a background-shape parent's synchronous child asks; ①b the same with the reserved placeholder face; ⑤ a synchronous fork asks; ⑥ a root leg with a store and a shell and no opt-in asks. ⑧ a root leg whose manifest reports the forced question tool has no delivery face. All five are red on v7.66.0 (a row is written). ② the parent leg's own question under `durableApproval`, ③ a `forceDurableGate` leg's question and ④ a synchronous child's irreversible tool still park (green on both). ⑦ one judge, one derivation. Each mutation is red on its cell: the decline removed, the judge swapped for the park lane's arming, a second predicate from the entitlement alone, the effective-opt-in twin, the content-ask conjunct dropped.
15
+
1
16
  ## 7.66.0 — 2026-11-04
2
17
 
3
18
  ### Errata to the 7.63.0 section (11-04)
@@ -64,6 +64,8 @@ export interface PrepareParkAskInput {
64
64
  toolRosterDeltas: ToolRosterDeltaSeat;
65
65
  /** borrowed-readonly — the wiring-manifest phase's park predicate (`parkLane.effective`): arms `suspendAsk`. */
66
66
  parkLaneArmed: boolean;
67
+ /** borrowed-readonly — the question-face phase's `durableQuestionFace`: THE one judge of whether a question may park on this leg. */
68
+ durableQuestionFace: boolean;
67
69
  /** borrowed-readonly — the question-face phase's routability predicate (the mounted question tool is the engine's own,
68
70
  * resolved against the LIVE roster per call). */
69
71
  contentAskRoutable: (toolCallId: string) => boolean;
@@ -30,7 +30,7 @@ const wordlessDemand = (toolName) => {
30
30
  throw new Error(`a real-approval demand for "${toolName}" reached the park with no origin word — the origin stamp precedes every park`);
31
31
  };
32
32
  export function prepareParkAsk(input) {
33
- const { askLane, saga, spec, deps, sessionId, askSource, checkpointStore, checkpointScope, toolRosterDeltas, parkLaneArmed, contentAskRoutable, liveQuestionFace, mountedQuestionTool, contentAskBindings, lateStrandedAnswers, discloseStrandedAnswers, onAsk, runtimeCaps, inheritedUnavailableAsks, basePolicyForResumeEdit, budgetSnapshot, handsCwdRef, handsRoot, stampCallTarget, shellReadLandings, advertisedWritableDirs, exemptRoots, offloadStore, suspendTargetGap, session, sessions, suspendChainBase, maxSuspends, remoteEnvFailures, shellGatedTools, irreversibilityTier, toolMarkSources, effectiveShellGate, durableApproval, priorLedger, liveSpendRef, resourceTotal, ruleOffersOf, grantBindingOf, now, humanReviewRef, abortController, harness, pausedRef } = input;
33
+ const { askLane, saga, spec, deps, sessionId, askSource, checkpointStore, checkpointScope, toolRosterDeltas, parkLaneArmed, durableQuestionFace, contentAskRoutable, liveQuestionFace, mountedQuestionTool, contentAskBindings, lateStrandedAnswers, discloseStrandedAnswers, onAsk, runtimeCaps, inheritedUnavailableAsks, basePolicyForResumeEdit, budgetSnapshot, handsCwdRef, handsRoot, stampCallTarget, shellReadLandings, advertisedWritableDirs, exemptRoots, offloadStore, suspendTargetGap, session, sessions, suspendChainBase, maxSuspends, remoteEnvFailures, shellGatedTools, irreversibilityTier, toolMarkSources, effectiveShellGate, durableApproval, priorLedger, liveSpendRef, resourceTotal, ruleOffersOf, grantBindingOf, now, humanReviewRef, abortController, harness, pausedRef } = input;
34
34
  if (askLane === undefined || saga === undefined)
35
35
  return { parkAsk: undefined };
36
36
  const { composedCallSignal, approvalPreviewOf } = askLane;
@@ -114,6 +114,8 @@ export function prepareParkAsk(input) {
114
114
  const suspendAsk = parkLaneArmed && checkpointStore !== undefined
115
115
  ? async (req, postHookArgs, safety, liveFaceUnavailable, realApproval, allowRuleShadowed, askDecisionReason, probeReason, probeCause, segmentCoverage, matchedAskRule, probeMandated, carry) => {
116
116
  const contentAsk = isEngineQuestionFace(req.face);
117
+ if (contentAsk && !durableQuestionFace)
118
+ return undefined;
117
119
  const syncFirstEligible = contentAsk ? contentAskRoutable(req.toolCallId) : isLiveApproverSeat(onAsk);
118
120
  if (syncFirstEligible &&
119
121
  runtimeCaps?.forceDurableGate !== true &&
@@ -91,8 +91,8 @@ export interface PrepareQuestionFaceResult {
91
91
  deliveryId: string;
92
92
  toolCallId: string;
93
93
  }>;
94
- /** owned — whether a durable delivery face exists (store wired ∧ (durableApproval ∨ forceDurableGate));
95
- * the manifest's composition-lie detector reuses this exact value. */
94
+ /** owned — whether a durable delivery face exists (store wired ∧ (durableApproval ∨ forceDurableGate)); the manifest's
95
+ * composition-lie detector and the park closure's content-ask decline (a question parks only where it holds) reuse this exact value. */
96
96
  durableQuestionFace: boolean;
97
97
  /** owned — the face the tool was mounted with: the gate-bound answer for THIS call id if one exists (one-shot),
98
98
  * else the live face itself; the raw frozen seat when no live face exists. */
@@ -873,7 +873,7 @@ export async function prepareTask(request, deps, sessions, resume, internals, ru
873
873
  const inheritedAnchorRecords = chainAnchorRecords(chainTop, inheritedParentConstraints ?? []);
874
874
  const { saga } = prepareSuspendSaga({ gateMachineryActive, crossBoundary, abortController, harness, checkpointStore, deps, sessionId, hostTaskId, taskScope, liveSpendRef, resume, nestedStats, internals, activeTools, outputRef, readFileStateForCheckpoint, faceCheckpointSection, writeFaceCheckpointSection, skillGrantCheckpointSection, skillScopesCheckpointSection: () => legMods.skillScopes.frozen(), reminderMark, handsCwdRef, handsRoot: attachmentRootCanonical, handsHome: attachmentRootCanonical !== undefined ? legAnchors.home : undefined, worktreeSessionRef, undeliveredContinuationRef, inheritedParentConstraints, seedInheritedGate, ancestorRulesNow, inheritedShellGate, permissionMode, inheritedAdmittedOrgScopes, inheritedPathRuleAnchors: chainTop !== legAnchors ? inheritedAnchorRecords.pathRuleAnchors : undefined, inheritedPathRuleInstallations: inheritedAnchorRecords.pathRuleInstallations, ownOrgVerdictRef, orgGovernedProvenance, announcedListingsRef, gitStatusRef, hookIdentity, placementRootResolved, compositionLegResolved, checkpointScope, runOrigin: doors.runOrigin, toolCeiling: toolCeilingRead, toolListsJudged, ownToolLists, externalContentTargetActive, remoteEnvFailures, memoryEngineSession, suspendLoopRef, ownedEnv });
875
875
  const { suspendForResource, suspendForPlatformLimit, suspendForReview } = prepareBoundaryParks({ saga, spec, checkpointStore, checkpointScope, abortController, harness, session, sessions, sessionId, askSource, deps, priorLedger, maxSlices, maxSuspends, resourceTotal, priorSuspendCount, suspendChainBase, humanReviewRef, liveSpendRef, now, pausedRef, remoteEnvFailures, resourceSuspendEligible, durableSuspendInfraReady, suspendTargetGap });
876
- const { parkAsk } = prepareParkAsk({ askLane, saga, spec, deps, sessionId, askSource, checkpointStore, checkpointScope, toolRosterDeltas: rosterSeat, parkLaneArmed, contentAskRoutable, liveQuestionFace, mountedQuestionTool, contentAskBindings, lateStrandedAnswers, discloseStrandedAnswers, onAsk, runtimeCaps, inheritedUnavailableAsks, basePolicyForResumeEdit, budgetSnapshot, handsCwdRef, handsRoot: attachmentRootCanonical, stampCallTarget, shellReadLandings, advertisedWritableDirs, exemptRoots: legExemptRoots, offloadStore, suspendTargetGap, session, sessions, suspendChainBase, maxSuspends, remoteEnvFailures, shellGatedTools, irreversibilityTier, toolMarkSources, effectiveShellGate, durableApproval, priorLedger, liveSpendRef, resourceTotal, ruleOffersOf, grantBindingOf, now, humanReviewRef, abortController, harness, pausedRef });
876
+ const { parkAsk } = prepareParkAsk({ askLane, saga, spec, deps, sessionId, askSource, checkpointStore, checkpointScope, toolRosterDeltas: rosterSeat, parkLaneArmed, durableQuestionFace, contentAskRoutable, liveQuestionFace, mountedQuestionTool, contentAskBindings, lateStrandedAnswers, discloseStrandedAnswers, onAsk, runtimeCaps, inheritedUnavailableAsks, basePolicyForResumeEdit, budgetSnapshot, handsCwdRef, handsRoot: attachmentRootCanonical, stampCallTarget, shellReadLandings, advertisedWritableDirs, exemptRoots: legExemptRoots, offloadStore, suspendTargetGap, session, sessions, suspendChainBase, maxSuspends, remoteEnvFailures, shellGatedTools, irreversibilityTier, toolMarkSources, effectiveShellGate, durableApproval, priorLedger, liveSpendRef, resourceTotal, ruleOffersOf, grantBindingOf, now, humanReviewRef, abortController, harness, pausedRef });
877
877
  const seatInputsFor = skillGateWiring({ tools, skillToolName: SKILL_TOOL_NAME, seatOf: skillSeatOf, mode: () => permissionMode.current, lane: skillGrantLane, onAllowed: (info) => emitTrace(deps.tracer, () => ({ kind: "permission.skill_allowed", version: 1, taskId: hostTaskId, ...info, entries: [...info.entries], ts: Date.now() })), allowEntries: { deploymentAllows: { ...allowEntryLanes.deployment, onAllowed: (info) => emitTrace(deps.tracer, () => ({ kind: "permission.allowed_tools_allowed", version: 1, taskId: hostTaskId, source: "deployment", ...info, entries: [...info.entries], ts: Date.now() })) }, requestAllows: { ...allowEntryLanes.request, onAllowed: (info) => emitTrace(deps.tracer, () => ({ kind: "permission.allowed_tools_allowed", version: 1, taskId: hostTaskId, source: "request", ...info, entries: [...info.entries], ts: Date.now() })) } } });
878
878
  const { approvedCallScreen } = prepareGateStations({ askLane, parkAsk, tools, toolRosterDeltas: rosterSeat, crossBoundaryCheck: crossBoundary.seat({ tools, roster: rosterSeat }), deps, toolCallGateArmedRef, effectivePolicy, modBus: legMods.bus, inheritedInstallations, egressTools, irreversibleTools, spec, complianceDenies, harness, blockedToolCalls, inheritedAskGrants, inheritedUnavailableAsks, foldAskClasses, ancestorSandboxAdmissions, preToolContexts, toolOccurrences, batchHaltRef, blockedTracked, hookIdentity, reminderMark, hostTaskId, sessionId, noticeRoute, noticeDestinations, handsCwdRef, stampCallTarget, readDenyInForce: (toolCallId) => ({ tiers: handsReadFace.readDenyBuiltinTiersActive, rows: [...readDenyAdditionsNormalized.map((e) => e.pattern), ...(pathTables?.forCall(toolCallId).ruleRows ?? handsReadFaceInput.denyRuleRows).filter((r) => r.faces.includes("read")).map((r) => r.rule)] }), hookEnvFace, writeProtectionCheck, shellReadCheck, readFace: () => resolvedReadFace, irreversibilityTier, reversibilityProbes, abortController, shellGatedTools, autoModeDecider: autoModeDeciderRef, autoModeDenialTracking: autoModeDenialTrackingRef, askRoute: { ...wiringManifest.ask, effective: askSeatEffective(wiringManifest) }, permissionMode, toolMarkSources, ...(deps.a2a?.isolatePeers === true ? { a2aIsolatePeers: true } : {}), ancestorArbitrations, runId, stopForDenialLimit, permissionRuleLane, seatInputsFor, permissionRuleOrgLane, questionToolMounted, sandboxAdmissionArmed, sandboxBoundaryCapable, emitSandboxAdmitted, delegation, frameSettlement });
879
879
  const postureFrameRef = { report: (err) => deps.onError?.(err, { phase: "degraded", sessionId }) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/core",
3
- "version": "7.66.0",
3
+ "version": "7.66.1",
4
4
  "description": "Stateless, task-oriented AI agent core",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -124,7 +124,7 @@
124
124
  "dependencies": {
125
125
  "@modelcontextprotocol/client": "2.4.0",
126
126
  "@modelcontextprotocol/core": "2.4.0",
127
- "@sema-agent/primitives": "7.66.0",
127
+ "@sema-agent/primitives": "7.66.1",
128
128
  "typebox": "1.1.39",
129
129
  "undici": "7.30.0"
130
130
  },
@@ -0,0 +1,30 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/core-stores-sql",
4
+ "version": "7.66.1",
5
+ "from": "221be44613c0641e31654fcf2a9768c68f49f288",
6
+ "to": "v7.66.1",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "narrowed": [],
11
+ "closedSetMembers": [],
12
+ "closedSetsUnreadable": [],
13
+ "typeKeys": [],
14
+ "typeKeysUnreadableArms": [],
15
+ "typeKeysFlattenedCount": 3,
16
+ "signatures": [],
17
+ "versionLiterals": [],
18
+ "declarationMoves": [],
19
+ "mintMoves": [],
20
+ "criteriaObserves": [],
21
+ "consumersHint": {
22
+ "cli": [],
23
+ "server": [],
24
+ "sdk": [],
25
+ "note": "scanned cli@650de0c6 server@a66aafbdd sdk@80381f2 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
26
+ },
27
+ "breakingCount": 0,
28
+ "breakingItems": [],
29
+ "toResolvedAt": "c5d0a1676c4d47fbb8091833735be247d862a2de"
30
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.66.1",
4
+ "from": "221be44613c0641e31654fcf2a9768c68f49f288",
5
+ "to": "v7.66.1",
6
+ "added": [],
7
+ "removed": [],
8
+ "changed": [],
9
+ "narrowed": [],
10
+ "closedSetMembers": [],
11
+ "closedSetsUnreadable": [],
12
+ "typeKeys": [],
13
+ "typeKeysUnreadableArms": [],
14
+ "typeKeysFlattenedCount": 275,
15
+ "signatures": [],
16
+ "versionLiterals": [],
17
+ "declarationMoves": [],
18
+ "mintMoves": [],
19
+ "criteriaObserves": [
20
+ {
21
+ "kind": "taskEventField",
22
+ "name": "tool_end.gate",
23
+ "assertions": [
24
+ "G1.b"
25
+ ]
26
+ },
27
+ {
28
+ "kind": "typeMember",
29
+ "name": "Checkpoint.gate",
30
+ "assertions": [
31
+ "G1.a",
32
+ "G2.a",
33
+ "G2.b"
34
+ ]
35
+ }
36
+ ],
37
+ "consumersHint": {
38
+ "cli": [],
39
+ "server": [],
40
+ "sdk": [],
41
+ "note": "scanned cli@650de0c6 server@a66aafbdd sdk@80381f2 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
42
+ },
43
+ "breakingCount": 0,
44
+ "breakingItems": [],
45
+ "toResolvedAt": "c5d0a1676c4d47fbb8091833735be247d862a2de"
46
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/mods-kernel",
4
+ "version": "7.66.1",
5
+ "from": "221be44613c0641e31654fcf2a9768c68f49f288",
6
+ "to": "v7.66.1",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "narrowed": [],
11
+ "closedSetMembers": [],
12
+ "closedSetsUnreadable": [],
13
+ "typeKeys": [],
14
+ "typeKeysUnreadableArms": [],
15
+ "typeKeysFlattenedCount": 1,
16
+ "signatures": [],
17
+ "versionLiterals": [],
18
+ "declarationMoves": [],
19
+ "mintMoves": [],
20
+ "criteriaObserves": [],
21
+ "consumersHint": {
22
+ "cli": [],
23
+ "server": [],
24
+ "sdk": [],
25
+ "note": "scanned cli@650de0c6 server@a66aafbdd sdk@80381f2 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
26
+ },
27
+ "breakingCount": 0,
28
+ "breakingItems": [],
29
+ "toResolvedAt": "c5d0a1676c4d47fbb8091833735be247d862a2de"
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/primitives",
4
+ "version": "7.66.1",
5
+ "from": "221be44613c0641e31654fcf2a9768c68f49f288",
6
+ "to": "v7.66.1",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "narrowed": [],
11
+ "closedSetMembers": [],
12
+ "closedSetsUnreadable": [],
13
+ "typeKeys": [],
14
+ "typeKeysUnreadableArms": [],
15
+ "typeKeysFlattenedCount": 6,
16
+ "signatures": [],
17
+ "versionLiterals": [],
18
+ "declarationMoves": [],
19
+ "mintMoves": [],
20
+ "criteriaObserves": [],
21
+ "consumersHint": {
22
+ "cli": [],
23
+ "server": [],
24
+ "sdk": [],
25
+ "note": "scanned cli@650de0c6 server@a66aafbdd sdk@80381f2 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
26
+ },
27
+ "breakingCount": 0,
28
+ "breakingItems": [],
29
+ "toResolvedAt": "c5d0a1676c4d47fbb8091833735be247d862a2de"
30
+ }