@sema-agent/core 7.68.2 → 7.68.3

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.68.3 — 2026-11-14
2
+
3
+ ### A composition's later legs continue the session its first leg entered and never enter it again: a file rewind, a branch point and the other operations a run performs on entering a session now act once, on the leg that enters (#4510; behavior change; narrowing: one, below, open to veto @server; widening: none; two further changes of reading, below (a goal handed an empty `sessionId`; a session deleted between two legs); hard-breaking: none; closed sets: none; exports: none; wire: none)
4
+
5
+ - **Before.** The verification gate's fix legs (`runWithVerification`, `runDeveloperTask`, `verifyCompleted`, `resumeWithVerification`), the repair loop's later attempts (`runRepairLoop`) and a goal's later iterations (`runGoal`) were built from the caller's whole spec plus the session to continue, dropping only `wake`. Every other session-bound member rode along, so each later leg entered the session again: `rewindFilesTo` (and `resumeAt` + `restoreFiles`) converged the tracked files back to the target boundary before the leg ran — over the earlier legs' edits, deleting the files they had created — and `resumeAt` branched the session again, so the later leg was not shown the earlier legs' turns. Measured on 7.68.2 (real Runner, scripted model, real files, the in-memory file-history store): with `{ rewindFilesTo: <turn>, verify }` the fix leg started on the target turn's bytes (`a.txt` back to the target turn's, the first leg's new `b.txt` gone) and the run ended `completed` with `verification.verdict: "PASS"` after two rounds; each later fix round did the same (three rounds: every fix leg started on the target turn's bytes); so did the repair loop's repair attempt and a goal's second iteration; with `resumeAt` alone (no `restoreFiles`) the fix leg's first request no longer held the first leg's turn — the branch point is taken again on every later leg whether or not files are restored (the read-only review leg, three fix legs: the session branched four times on 7.68.2, once on 7.68.3).
6
+ - **Affected versions.** Measured on 7.68.2 only. By reading the code, every release read — 7.50.0, 7.60.0, 7.66.0 and each of 7.67.0 – 7.68.2 — builds the fix leg, the repair attempt and the goal iteration from the caller's whole spec with a new `sessionId`, and `rewindFilesTo` is a `TaskSpec` member at 7.50.0 (read, not run, on those; releases before 7.50.0 were not read). No release read is free of it.
7
+ - **Now.** The session-bound column of `TaskSpec` has two kinds: the session's address and the run's demand on it (`sessionId`, `requireExistingSession`), and the operations a run performs on entering it (`wake`, `resumeAt`, `resumeAtMode`, `restoreFiles`, `acceptPartialRestore`, `unplacedHistoryRecordedUnder`, `rewindFilesTo`). A later leg of a composition runs in the session the leg before it reported and carries none of the entering operations; `requireExistingSession` rides on as the caller wrote it (a session gone between the legs is still refused `resume.session_not_found`, as before). The leg that enters keeps its members and applies each exactly once: a call's first leg (the caller's spec as written), and a resumed repair loop's first attempt (it enters on its carried diagnoses; it opens on an objective of its own and so, as in 7.68.2, does not carry `wake` — a leg opens on an objective or on `wake`, never both). A member added to either kind later is read by its kind. Measured, same lane, same scripted model (7.68.3): the fix leg starts on the first leg's bytes (`a.txt` as the first leg wrote it, `b.txt` there) and is shown the first leg's turn; every restore the history store performs happens while the first leg is being prepared, none after any leg reached the model; three rounds, the repair attempt and the goal's second iteration read the same.
8
+ - **Behavior change, `runGoal` with an empty `sessionId`.** Iterations from the second on now continue the session the previous iteration ran in. Before, `sessionId: ""` was handed to every iteration and each one ran in a session of its own (measured on 7.68.2: the two iterations in two sessions, the second not shown the first's turn), so the goal's work was split across sessions. A named `sessionId` is unchanged (every iteration in it, measured on both); a goal that names none still mints one session id for the whole goal, as before (by the code, not measured).
9
+ - **Behavior change, a session gone between the legs.** When the session is deleted between two legs and the caller did not write `requireExistingSession`, a later leg used to be refused only as a side effect of the entering operation it re-applied — `rewind_snapshot.unresolvable` (`rewindFilesTo`) or `resume_at.not_found` (`resumeAt`), the target being absent from the new session's log (measured on 7.68.2, the default `TtlSessionStore` without a repository, the session released by the host after the first leg — that store deletes an unplaced row on `release`; an idle sweep does the same by the code, not measured). It now continues by `sessionId` alone and, like a later leg of a caller that wrote no entering operation, runs on a newly created empty session (measured on 7.68.3: `completed`, `verification.verdict: "PASS"`, the leg's request without the earlier turns; the leg started on the files as the first leg left them). The repair loop and a goal read the same way (the read-only review leg's probe, the `rewindFilesTo` shape; on 7.68.2 all three roads were refused `rewind_snapshot.unresolvable`): the repair loop's later attempt runs on the new empty session and the loop ends `candidate_only`; a goal's later iterations run on it and the goal ends `max_iterations`. To have it refused, write `requireExistingSession: true`: the later leg keeps it and is refused `resume.session_not_found` before reaching the model, on 7.68.2 and 7.68.3 alike (measured: the verification gate by the pin; the repair loop and a goal by the review leg's probe, refused on the second leg on both releases). A later leg that requires its session on its own is #4521. Nothing here deletes a session: on the default store with the row left alone, the session row is still there after the first leg and the fix leg continues it (measured, both versions).
10
+ - **Narrowing (open to veto).** A caller that relied on a fix leg / later attempt / later iteration re-applying its rewind or its branch point no longer gets it: the later leg starts on the files and the conversation the leg before it left.
11
+ - **Not changed.** `runCascade` still drops the whole column from every rung, the first included: a `rewindFilesTo` / `resumeAt` handed to a cascade is not applied, and nothing on the result says so (measured on both versions: zero restores, the rung in a session of its own, no `rewindNotes`; #4519). A workflow agent spawned without a governance object (the trusted-dev lane passes the script's whole spec) that names `sessionId` and an entering member would apply that member again on a stall / throttle retry — read from the code, not measured (#4520); under governance the script cannot name the column (its whitelist and the column share no member, by the code). An untyped `rewindFilesTo` in `resumeWithVerification`'s resume config is not refused by the resume door: the resumed leg applies it once (measured on both versions; its fix legs no longer apply it again, 7.68.3); and a goal's `doneCheck` state still carries the session id the caller preset, which with an empty `sessionId` is not the session the iterations ran in (read from the code, not measured) — both #4522. The repair loop's clean restart already ran without the column (a session of its own, measured on both).
12
+ - **Rules.** The column's one reading becomes two kinds read off the same table (`withoutSessionBinding` drops both, unchanged); the per-call-site spread `{ ...spec, sessionId }` at the three later-leg sites is gone — one derivation (`withOpeningObjective(spec, objective, continues?)`) answers both the entering leg and a later leg; −1 behavior (entering operations re-applied per leg); `runGoal`'s later iterations read the session the same way the gate and the repair loop do (the previous leg's result).
13
+ - **Pins.** `test/backlog4510-later-leg-session-entry.test.ts` — V1–V11 (the gate: rewind, multi-round, `resumeAt` + `restoreFiles`, `resumeAt` alone, the qualifiers, the fix leg's spec, `verifyCompleted` and `resumeWithVerification` handed the column untyped, `requireExistingSession` with the session gone, then the two readings: the default store between the legs, and the session gone without `requireExistingSession`), R1–R3 (repair attempt, the clean-restart road, a resumed loop's entering attempt), G1–G4 (goal: rewind, branch, empty `sessionId`, named session), T1–T4 (the derivation reads the kinds), C1 (the cascade reading); 17 of 23 red on 7.68.2, 23 of 23 green on the fix; ten mutations, each red on its cells (implementation car's lane log).
14
+ - **Consumers.** @server: the admission door's refusal of a file rewind (`rewindFilesTo`, and `resumeAt` + `restoreFiles`) beside `verify` can be lifted for a deployment whose engine is 7.68.3 or later — raise the engine requirement to 7.68.3 and drop the refusal under it: the rewind is applied once, before the implementation leg, and never again in the gate (pins V1–V8). `runRepairLoop` and `runGoal` read the same if you expose them. The condition holds for a resume whose configuration carries no entering operation: the engine's resume door still accepts an untyped `rewindFilesTo` in `resumeWithVerification`'s resume configuration and applies it once on the resumed leg, on 7.68.2 and 7.68.3 alike (7.68.3 only stops that run's fix legs from applying it a second time, pin V8; the door's own acceptance is #4522) — keep it out of what you hand the resume. Keep the refusal beside `cascade`: a cascade does not apply the member at all (above). No export, wire or closed-set change; no consumer code is asked for.
15
+
1
16
  ## 7.68.2 — 2026-11-13
2
17
 
3
18
  ### A file rewind writes a recorded version only under the directory it was recorded under — one recorded elsewhere is refused file by file, a run that does not accept a partial restore moves nothing, and the preview and the restore name every file (#4328, closes the write shapes of #4446; behavior change; narrowing: six, below, open to veto @server @cli @client-core; widening: two, below, open to veto @server @cli; hard-breaking: none at runtime — compliance-kit cells a backend that has not followed reads red, below; closed sets: `FILE_HISTORY_REFUSAL_CLASSES` +2 (`recorded_elsewhere`, `place_unrecorded`; the same two on a refused file's `FileRestoreApplyOutcome.class`), `ENGINE_CAPABILITIES` +1 (`file_history.recorded_place`), new `FileRestoreApplyOutcome.action` (`write`, `delete`); exports: +6 functions, +2 types, none removed; signatures: `restore` and `diffStats` of `FileHistoryStore` and of both bundled stores take an optional last parameter `options` (`FileHistoryRestoreOptions`); wire: optional members only — `TaskSpec.unplacedHistoryRecordedUnder`, `RewindFilesRequest.unplacedHistoryRecordedUnder`, `files` on the restore result and the preview, `recordedUnder` / `action` on a refused row, `failed` on a `files` row, `absoluteEntriesOmitted` on the export envelope)
@@ -201,7 +201,7 @@ export async function runRepairLoop(runner, implSpec, config) {
201
201
  const spec = restartedOnce
202
202
  ? cleanRestartSpec()
203
203
  : isRepair
204
- ? withOpeningObjective({ ...laterAttemptSpec, sessionId: lastResult.sessionId }, repairObjective(bundle))
204
+ ? withOpeningObjective(laterAttemptSpec, repairObjective(bundle), lastResult.sessionId)
205
205
  : isSeededResume
206
206
  ? withOpeningObjective(implSpec, implSpec.sessionId ? repairObjective(bundle) : `${implSpec.objective}\n\n${repairObjective(bundle)}`)
207
207
  : implSpec;
@@ -285,7 +285,7 @@ async function verifyCompletedPlaced(runner, result, specBase, objective, config
285
285
  }
286
286
  refuseUnhonorableInternals(internals, "before_leg");
287
287
  const fixLegSpec = {
288
- ...withOpeningObjective({ ...allowance.spec, sessionId: current.sessionId }, fixObjective(outcome.findings)),
288
+ ...withOpeningObjective(allowance.spec, fixObjective(outcome.findings), current.sessionId),
289
289
  ...childClampSeats({
290
290
  ...clampSourceOf(specBase),
291
291
  readFace: foldedRootsFace ? "roots" : specBase.readFace,
@@ -20,17 +20,21 @@
20
20
  * object): it compares objects, it does not take a value.
21
21
  */
22
22
  import type { TaskSpec } from "./task-spec.js";
23
- /** The one non-placeholder value of the member table's column: the member lives and dies with `sessionId` — it addresses the
24
- * session a run acquires or an entry of that session's history (the session to continue, to require, to branch at, whose file
25
- * boundary to restore, whose parked notifications to wake on), so a run that is handed a new session of its own carries none of them. */
23
+ /** The two non-placeholder values of the member table's column — the member lives and dies with `sessionId`, so a run that is
24
+ * handed a new session of its own carries neither kind:
25
+ * - {@link SESSION}: the session's address and the run's demand on it (the session to continue, the requirement that it exists);
26
+ * - {@link ENTRY}: an operation a run performs on ENTERING that session — branch it at an entry, converge its files to a history
27
+ * boundary (and how), open on what is parked for it. The leg that enters performs it once; a later leg in the session an earlier
28
+ * leg of the same call entered carries none of them. */
26
29
  declare const SESSION: "session";
30
+ declare const ENTRY: "entry";
27
31
  /** Every {@link TaskSpec} member, by name — the type's own key set, fenced both ways (a member added to `TaskSpec` and not
28
32
  * listed here, or a name here that `TaskSpec` does not declare, is a compile error). The value is a column: `0` for an
29
- * ordinary member, {@link SESSION} for one that is bound to the spec's session. */
33
+ * ordinary member, {@link SESSION} or {@link ENTRY} for one that is bound to the spec's session. */
30
34
  declare const SPEC_MEMBER_TABLE: {
31
35
  taskId: 0;
32
36
  objective: 0;
33
- wake: "session";
37
+ wake: "entry";
34
38
  principal: 0;
35
39
  isolationScope: 0;
36
40
  actor: 0;
@@ -46,8 +50,8 @@ declare const SPEC_MEMBER_TABLE: {
46
50
  requireExistingSession: "session";
47
51
  oneShot: 0;
48
52
  clientContext: 0;
49
- resumeAt: "session";
50
- resumeAtMode: "session";
53
+ resumeAt: "entry";
54
+ resumeAtMode: "entry";
51
55
  model: 0;
52
56
  modelRole: 0;
53
57
  roles: 0;
@@ -66,10 +70,10 @@ declare const SPEC_MEMBER_TABLE: {
66
70
  fileHistory: 0;
67
71
  projectMemory: 0;
68
72
  instructionFamily: 0;
69
- restoreFiles: "session";
70
- acceptPartialRestore: "session";
71
- unplacedHistoryRecordedUnder: "session";
72
- rewindFilesTo: "session";
73
+ restoreFiles: "entry";
74
+ acceptPartialRestore: "entry";
75
+ unplacedHistoryRecordedUnder: "entry";
76
+ rewindFilesTo: "entry";
73
77
  tools: 0;
74
78
  allowTools: 0;
75
79
  excludeTools: 0;
@@ -141,14 +145,16 @@ declare const SPEC_MEMBER_TABLE: {
141
145
  };
142
146
  /** Every {@link TaskSpec} member, by name. */
143
147
  export declare const TASK_SPEC_MEMBERS: readonly string[];
144
- /** The members the table marks as bound to the spec's session — a name here is a member that means something only beside
145
- * `sessionId` (`requireExistingSession` without one is refused, `resumeAt` / `resumeAtMode` branch the session it names,
148
+ /** The members the table marks as bound to the spec's session (either kind) — a name here is a member that means something only
149
+ * beside `sessionId` (`requireExistingSession` without one is refused, `resumeAt` / `resumeAtMode` branch the session it names,
146
150
  * `restoreFiles` needs the `resumeAt` it restores to, `rewindFilesTo` / `acceptPartialRestore` / `unplacedHistoryRecordedUnder` address its file-history boundaries). */
147
151
  export type SessionBoundSpecMember = {
148
- [K in keyof typeof SPEC_MEMBER_TABLE]: (typeof SPEC_MEMBER_TABLE)[K] extends typeof SESSION ? K : never;
152
+ [K in keyof typeof SPEC_MEMBER_TABLE]: (typeof SPEC_MEMBER_TABLE)[K] extends typeof SESSION | typeof ENTRY ? K : never;
149
153
  }[keyof typeof SPEC_MEMBER_TABLE];
150
154
  /** The session-bound members, in table order. */
151
155
  export declare const SESSION_BOUND_SPEC_MEMBERS: readonly SessionBoundSpecMember[];
156
+ /** The session-bound members of the {@link ENTRY} kind — the operations a run performs on entering its session — in table order. */
157
+ export declare const SESSION_ENTRY_SPEC_MEMBERS: readonly SessionBoundSpecMember[];
152
158
  /**
153
159
  * The spec for a run that gets a session of its own: the caller's spec without every session-bound member, by the table (never
154
160
  * by a name written at the call site), so a member added to the column is dropped here too. A shallow copy — every other member
@@ -156,11 +162,17 @@ export declare const SESSION_BOUND_SPEC_MEMBERS: readonly SessionBoundSpecMember
156
162
  */
157
163
  export declare function withoutSessionBinding(spec: TaskSpec): Omit<TaskSpec, SessionBoundSpecMember>;
158
164
  /**
159
- * The spec of a leg that opens on a new objective — a later attempt or a fix leg continuing a session the caller's leg may have
160
- * woken: the spec with that objective and without `wake`. A leg opens on exactly one input (the door refuses `wake` beside an
161
- * objective), and the new objective is this one's. A shallow copy, as {@link withoutSessionBinding}.
165
+ * The spec of a leg a composition opens on an objective of its own, from the caller's spec. A leg opens on exactly one input (the
166
+ * door refuses `wake` beside an objective), and the objective is this one's.
167
+ * - Without `continues`: the leg that ENTERS the caller's session (a resumed repair loop's first attempt) — every member of the column
168
+ * stays but `wake`.
169
+ * - With `continues`: a LATER leg, in the session an earlier leg of the same call entered (a fix leg, a later repair attempt, a later
170
+ * goal iteration) — the leg runs in `continues`, and every {@link ENTRY} member is dropped, by the table: the earlier leg performed
171
+ * those on entering, and carried into a later leg each would be performed again (a rewind written back over the earlier legs' files,
172
+ * a branch that drops their turns). The {@link SESSION} members other than the address stay as the caller wrote them.
173
+ * A member added to the column is read here as its kind says. A shallow copy, as {@link withoutSessionBinding}.
162
174
  */
163
- export declare function withOpeningObjective(spec: Omit<TaskSpec, "objective">, objective: string): TaskSpec;
175
+ export declare function withOpeningObjective(spec: Omit<TaskSpec, "objective">, objective: string, continues?: string): TaskSpec;
164
176
  /** What one read of a caller's spec answered: the snapshot every reader reads, the caller's own object (for the roster's identity
165
177
  * check only), and the refusal the read met (thrown at prepare's door), if any. */
166
178
  export interface CallerSpecRead<S extends Partial<TaskSpec> = TaskSpec> {
@@ -2,12 +2,13 @@ import { RETIRED_TASK_SPEC_KEYS, retiredKeyOf, retiredKeyRefusal } from "./retir
2
2
  import { thrownText } from "./thrown-value.js";
3
3
  import { strayMembersOf } from "./own-property-receipt.js";
4
4
  const SESSION = "session";
5
+ const ENTRY = "entry";
5
6
  const SPEC_MEMBER_TABLE = {
6
- taskId: 0, objective: 0, wake: SESSION, principal: 0, isolationScope: 0, actor: 0, runOrigin: 0, interactionPosture: 0, approvalReach: 0, interactiveQuestionFallback: 0,
7
- images: 0, userAttachments: 0, sessionId: SESSION, projectId: 0, workspace: 0, requireExistingSession: SESSION, oneShot: 0, clientContext: 0, resumeAt: SESSION,
8
- resumeAtMode: SESSION, model: 0, modelRole: 0, roles: 0, compactionModel: 0, advisorModel: 0, thinking: 0, systemPrompt: 0,
7
+ taskId: 0, objective: 0, wake: ENTRY, principal: 0, isolationScope: 0, actor: 0, runOrigin: 0, interactionPosture: 0, approvalReach: 0, interactiveQuestionFallback: 0,
8
+ images: 0, userAttachments: 0, sessionId: SESSION, projectId: 0, workspace: 0, requireExistingSession: SESSION, oneShot: 0, clientContext: 0, resumeAt: ENTRY,
9
+ resumeAtMode: ENTRY, model: 0, modelRole: 0, roles: 0, compactionModel: 0, advisorModel: 0, thinking: 0, systemPrompt: 0,
9
10
  promptRole: 0, promptForm: 0, promptBinding: 0, promptLocale: 0, appendSystemPrompt: 0, outputStyle: 0, memory: 0, suggestNextPrompts: 0, fileHistory: 0,
10
- projectMemory: 0, instructionFamily: 0, restoreFiles: SESSION, acceptPartialRestore: SESSION, unplacedHistoryRecordedUnder: SESSION, rewindFilesTo: SESSION, tools: 0, allowTools: 0, excludeTools: 0, excludeAllTools: 0,
11
+ projectMemory: 0, instructionFamily: 0, restoreFiles: ENTRY, acceptPartialRestore: ENTRY, unplacedHistoryRecordedUnder: ENTRY, rewindFilesTo: ENTRY, tools: 0, allowTools: 0, excludeTools: 0, excludeAllTools: 0,
11
12
  deferTools: 0, toolMaterializeStrategy: 0, alwaysLoadTools: 0, restoreGatedTools: 0, deferSelfResolve: 0, promptLean: 0, agents: 0, toolPolicy: 0,
12
13
  basePolicyForResumeEdit: 0, onAsk: 0, onQuestion: 0, lspManager: 0, lspDiagnostics: 0, mods: 0, peerPresence: 0, durableApproval: 0,
13
14
  resourceSuspend: 0, preemptSignal: 0, resilience: 0, finalVerification: 0, maxSuspends: 0, checkpointStore: 0, handsReadOnly: 0, memoryPersistenceCapable: 0,
@@ -19,16 +20,18 @@ const SPEC_MEMBER_TABLE = {
19
20
  language: 0,
20
21
  };
21
22
  export const TASK_SPEC_MEMBERS = Object.keys(SPEC_MEMBER_TABLE);
22
- export const SESSION_BOUND_SPEC_MEMBERS = TASK_SPEC_MEMBERS.filter((name) => Reflect.get(SPEC_MEMBER_TABLE, name) === SESSION);
23
+ export const SESSION_BOUND_SPEC_MEMBERS = TASK_SPEC_MEMBERS.filter((name) => Reflect.get(SPEC_MEMBER_TABLE, name) !== 0);
24
+ export const SESSION_ENTRY_SPEC_MEMBERS = SESSION_BOUND_SPEC_MEMBERS.filter((name) => Reflect.get(SPEC_MEMBER_TABLE, name) === ENTRY);
23
25
  export function withoutSessionBinding(spec) {
24
26
  const own = { ...spec };
25
27
  for (const name of SESSION_BOUND_SPEC_MEMBERS)
26
28
  Reflect.deleteProperty(own, name);
27
29
  return own;
28
30
  }
29
- export function withOpeningObjective(spec, objective) {
30
- const own = { ...spec, objective };
31
- Reflect.deleteProperty(own, "wake");
31
+ export function withOpeningObjective(spec, objective, continues) {
32
+ const own = { ...spec, objective, ...(continues !== undefined ? { sessionId: continues } : {}) };
33
+ for (const name of continues !== undefined ? SESSION_ENTRY_SPEC_MEMBERS : ["wake"])
34
+ Reflect.deleteProperty(own, name);
32
35
  return own;
33
36
  }
34
37
  const MEMBERS = new Set(TASK_SPEC_MEMBERS);
@@ -3,6 +3,7 @@ import { Type } from "typebox";
3
3
  import { delimitUntrusted } from "../core/untrusted-text.js";
4
4
  import { recipeContinuationLeg } from "../core/input-author.js";
5
5
  import { legTaskIdOf } from "../core/leg-identity.js";
6
+ import { withOpeningObjective } from "../core/task-spec-members.js";
6
7
  import { isDurablePause, pauseFamily } from "../agents/suspend-guard.js";
7
8
  import { OUTPUT_TOOL_NAME, mountRuleFace, toolFace } from "../core/tool-catalog-entries.js";
8
9
  export const DECLARE_DONE_TOOL_NAME = "DeclareDone";
@@ -143,7 +144,8 @@ export async function runGoal(runner, spec, internals) {
143
144
  ? spec.taskSpec.tools
144
145
  : [...(spec.taskSpec.tools ?? []), createDeclareDoneTool(doneRef)];
145
146
  const roundInternals = { ...internals, goalMode: true };
146
- const result = await runner.runTask({ ...spec.taskSpec, sessionId, objective, tools, signal: goalSignal }, iteration === 1 ? roundInternals : recipeContinuationLeg(roundInternals));
147
+ const leg = { ...spec.taskSpec, tools, signal: goalSignal };
148
+ const result = await runner.runTask(lastResult === undefined ? { ...leg, sessionId, objective } : withOpeningObjective(leg, objective, lastResult.sessionId), iteration === 1 ? roundInternals : recipeContinuationLeg(roundInternals));
147
149
  lastResult = result;
148
150
  cumulativeTokens += (result.stats.tokens ?? 0) + (result.stats.nested?.tokens ?? 0);
149
151
  spentCostMicroUsd += (result.stats.costMicroUsd ?? 0) + (result.stats.nested?.costMicroUsd ?? 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/core",
3
- "version": "7.68.2",
3
+ "version": "7.68.3",
4
4
  "description": "Stateless, task-oriented AI agent core",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -132,7 +132,7 @@
132
132
  "dependencies": {
133
133
  "@modelcontextprotocol/client": "2.4.0",
134
134
  "@modelcontextprotocol/core": "2.4.0",
135
- "@sema-agent/primitives": "7.68.2",
135
+ "@sema-agent/primitives": "7.68.3",
136
136
  "typebox": "1.1.39",
137
137
  "undici": "7.30.2"
138
138
  },
@@ -0,0 +1,39 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/core-stores-sql",
4
+ "version": "7.68.3",
5
+ "from": "55c147112bd479cd3898e00829c387d78fdb21f7",
6
+ "to": "v7.68.3",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "subpaths": [],
11
+ "subpathsUnread": [
12
+ "from",
13
+ "to"
14
+ ],
15
+ "narrowed": [],
16
+ "faces": {
17
+ "open": [],
18
+ "source": null
19
+ },
20
+ "closedSetMembers": [],
21
+ "closedSetsUnreadable": [],
22
+ "typeKeys": [],
23
+ "typeKeysUnreadableArms": [],
24
+ "typeKeysFlattenedCount": 3,
25
+ "signatures": [],
26
+ "versionLiterals": [],
27
+ "declarationMoves": [],
28
+ "mintMoves": [],
29
+ "criteriaObserves": [],
30
+ "consumersHint": {
31
+ "cli": [],
32
+ "server": [],
33
+ "sdk": [],
34
+ "note": "scanned cli@a51393fd server@027f7b3e4 sdk@6e55f1b — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
35
+ },
36
+ "breakingCount": 0,
37
+ "breakingItems": [],
38
+ "toResolvedAt": "d04d328eb407a57a9cc6656453ab8d0422254265"
39
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.68.3",
4
+ "from": "55c147112bd479cd3898e00829c387d78fdb21f7",
5
+ "to": "v7.68.3",
6
+ "added": [],
7
+ "removed": [],
8
+ "changed": [],
9
+ "subpaths": [],
10
+ "narrowed": [
11
+ {
12
+ "id": "F1",
13
+ "source": "behaviorFlips.summary",
14
+ "text": "#4510 (behavior change; narrowing, open to veto @server): a composition's later legs — the verification gate's fix legs (`runWithVerification`, `runDeveloperTask`, `verifyCompleted`, `resumeWithVerification`), the repair loop's later attempts (`runRepairLoop`) and a goal's later iterations (`runGoal`) — continue the session the leg before them reported and carry none of the operations a run performs on entering a session (`wake`, `resumeAt`, `resumeAtMode`, `restoreFiles`, `acceptPartialRestore`, `unplacedHistoryRecordedUnder`, `rewindFilesTo`); the leg that enters applies them exactly once."
15
+ }
16
+ ],
17
+ "faces": {
18
+ "open": [
19
+ "TRACE_EVENT_KINDS",
20
+ "TraceEvent"
21
+ ],
22
+ "source": "src/core/contract-faces.ts"
23
+ },
24
+ "closedSetMembers": [],
25
+ "closedSetsUnreadable": [],
26
+ "typeKeys": [],
27
+ "typeKeysUnreadableArms": [],
28
+ "typeKeysFlattenedCount": 305,
29
+ "signatures": [],
30
+ "versionLiterals": [],
31
+ "declarationMoves": [],
32
+ "mintMoves": [],
33
+ "criteriaObserves": [
34
+ {
35
+ "kind": "typeMember",
36
+ "name": "GoalResult.iterations",
37
+ "assertions": [
38
+ "G4.a",
39
+ "G5.a"
40
+ ]
41
+ },
42
+ {
43
+ "kind": "typeMember",
44
+ "name": "GoalResult.result.sessionId",
45
+ "assertions": [
46
+ "G4.a",
47
+ "G5.a"
48
+ ]
49
+ },
50
+ {
51
+ "kind": "typeMember",
52
+ "name": "GoalResult.status",
53
+ "assertions": [
54
+ "G4.a"
55
+ ]
56
+ },
57
+ {
58
+ "kind": "typeMember",
59
+ "name": "RepairResult.repairTerminal",
60
+ "assertions": [
61
+ "G3.a"
62
+ ]
63
+ },
64
+ {
65
+ "kind": "typeMember",
66
+ "name": "TaskResult.rewindNotes",
67
+ "assertions": [
68
+ "G8.a"
69
+ ]
70
+ },
71
+ {
72
+ "kind": "typeMember",
73
+ "name": "TaskResult.sessionId",
74
+ "assertions": [
75
+ "G2.a",
76
+ "G8.a"
77
+ ]
78
+ },
79
+ {
80
+ "kind": "typeMember",
81
+ "name": "TaskResult.terminal.code",
82
+ "assertions": [
83
+ "G6.a",
84
+ "G7.a"
85
+ ]
86
+ },
87
+ {
88
+ "kind": "typeMember",
89
+ "name": "TaskResult.terminal.kind",
90
+ "assertions": [
91
+ "G1.a",
92
+ "G2.a",
93
+ "G3.a",
94
+ "G6.a",
95
+ "G7.a",
96
+ "G8.a"
97
+ ]
98
+ },
99
+ {
100
+ "kind": "typeMember",
101
+ "name": "VerificationResult.verification.rounds",
102
+ "assertions": [
103
+ "G1.a"
104
+ ]
105
+ },
106
+ {
107
+ "kind": "typeMember",
108
+ "name": "VerificationResult.verification.verdict",
109
+ "assertions": [
110
+ "G1.a",
111
+ "G2.a",
112
+ "G7.a"
113
+ ]
114
+ }
115
+ ],
116
+ "consumersHint": {
117
+ "cli": [],
118
+ "server": [],
119
+ "sdk": [],
120
+ "note": "scanned cli@a51393fd server@027f7b3e4 sdk@6e55f1b — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
121
+ },
122
+ "breakingCount": 0,
123
+ "breakingItems": [],
124
+ "toResolvedAt": "d04d328eb407a57a9cc6656453ab8d0422254265"
125
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/mods-kernel",
4
+ "version": "7.68.3",
5
+ "from": "55c147112bd479cd3898e00829c387d78fdb21f7",
6
+ "to": "v7.68.3",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "subpaths": [],
11
+ "subpathsUnread": [
12
+ "from",
13
+ "to"
14
+ ],
15
+ "narrowed": [],
16
+ "faces": {
17
+ "open": [],
18
+ "source": null
19
+ },
20
+ "closedSetMembers": [],
21
+ "closedSetsUnreadable": [],
22
+ "typeKeys": [],
23
+ "typeKeysUnreadableArms": [],
24
+ "typeKeysFlattenedCount": 1,
25
+ "signatures": [],
26
+ "versionLiterals": [],
27
+ "declarationMoves": [],
28
+ "mintMoves": [],
29
+ "criteriaObserves": [],
30
+ "consumersHint": {
31
+ "cli": [],
32
+ "server": [],
33
+ "sdk": [],
34
+ "note": "scanned cli@a51393fd server@027f7b3e4 sdk@6e55f1b — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
35
+ },
36
+ "breakingCount": 0,
37
+ "breakingItems": [],
38
+ "toResolvedAt": "d04d328eb407a57a9cc6656453ab8d0422254265"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/primitives",
4
+ "version": "7.68.3",
5
+ "from": "55c147112bd479cd3898e00829c387d78fdb21f7",
6
+ "to": "v7.68.3",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "subpaths": [],
11
+ "subpathsUnread": [
12
+ "from",
13
+ "to"
14
+ ],
15
+ "narrowed": [],
16
+ "faces": {
17
+ "open": [],
18
+ "source": null
19
+ },
20
+ "closedSetMembers": [],
21
+ "closedSetsUnreadable": [],
22
+ "typeKeys": [],
23
+ "typeKeysUnreadableArms": [],
24
+ "typeKeysFlattenedCount": 7,
25
+ "signatures": [],
26
+ "versionLiterals": [],
27
+ "declarationMoves": [],
28
+ "mintMoves": [],
29
+ "criteriaObserves": [],
30
+ "consumersHint": {
31
+ "cli": [],
32
+ "server": [],
33
+ "sdk": [],
34
+ "note": "scanned cli@a51393fd server@027f7b3e4 sdk@6e55f1b — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
35
+ },
36
+ "breakingCount": 0,
37
+ "breakingItems": [],
38
+ "toResolvedAt": "d04d328eb407a57a9cc6656453ab8d0422254265"
39
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "repo": "core",
3
+ "package": "@sema-agent/wiki-gate",
4
+ "version": "7.68.3",
5
+ "from": "55c147112bd479cd3898e00829c387d78fdb21f7",
6
+ "to": "v7.68.3",
7
+ "added": [],
8
+ "removed": [],
9
+ "changed": [],
10
+ "subpaths": [],
11
+ "subpathsUnread": [
12
+ "from",
13
+ "to"
14
+ ],
15
+ "narrowed": [],
16
+ "faces": {
17
+ "open": [],
18
+ "source": null
19
+ },
20
+ "closedSetMembers": [],
21
+ "closedSetsUnreadable": [],
22
+ "typeKeys": [],
23
+ "typeKeysUnreadableArms": [],
24
+ "typeKeysFlattenedCount": 5,
25
+ "signatures": [],
26
+ "versionLiterals": [],
27
+ "declarationMoves": [],
28
+ "mintMoves": [],
29
+ "criteriaObserves": [],
30
+ "consumersHint": {
31
+ "cli": [],
32
+ "server": [],
33
+ "sdk": [],
34
+ "note": "scanned cli@a51393fd server@027f7b3e4 sdk@6e55f1b — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
35
+ },
36
+ "breakingCount": 0,
37
+ "breakingItems": [],
38
+ "toResolvedAt": "d04d328eb407a57a9cc6656453ab8d0422254265"
39
+ }