@sema-agent/sdk 33.0.0 → 34.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.yaml CHANGED
@@ -490,6 +490,11 @@ paths:
490
490
  checkout's `.sema/project` marker), `config.memory_project_marker` (the marker is unreadable and this leg needs a project identity) and `config.memory_project_marker_nested` (the marker is nested below the repo root) —
491
491
  refused before the run starts, zero tokens; the request is well-formed, the checkout state conflicts with it (declare the marker's id / fix the marker / use another session; a verbatim retry does not change the verdict). `activeTaskId` is
492
492
  absent. Async / live legs answer 2xx with the same code on the terminal run row / `done` frame's `terminal.code`.
493
+ Server >= 7.144.0, zero-work submissions only: `env.home_unconfirmed` — on the host lane (including `run-local`) the execution environment's home-directory claim
494
+ (`REMOTE_EXEC_HOME_DIR`, absent ⇒ the service process's home) does not match the `HOME` the child process gets, cannot be read, or is not an absolute path ⇒ the
495
+ environment is not minted: no command ran, no model call, nothing billed, the idempotency key is not taken. The request is well-formed, the deployment state conflicts
496
+ with it (drop the claim or set it to `HOME`'s value, or remove `HOME` from the session's `settings.env`); a verbatim retry does not change the verdict. `activeTaskId` is
497
+ absent. Async / live legs answer 2xx with the same code on the terminal run row / `done` frame's `terminal.code`. The only member of the server's `env.*` family today.
493
498
  K-24 (server >= 7.104.0 / S-724, zero-work submissions only): `rewind.store_unconfigured` — this
494
499
  deployment has NO file-history store but the request asks to restore files; the request is well-formed, the
495
500
  deployment shape conflicts with it (change the deployment, not the request; `capabilities.rewindFiles` is false
@@ -530,9 +535,10 @@ paths:
530
535
  no meta header; SQL backends: one `session_event.payload` row is not a readable entry). Nothing ran, nothing
531
536
  billed; `error` is the engine / store sentence (no on-disk path). DETERMINISTIC: a retry cannot change it (the SDK
532
537
  does not auto-retry this code); the repair is the operator's. Also `internal.error` (unclassified).
533
- server >= 7.137.0: `invalid_session` — the session's stored log reads but is structurally broken (a dangling parent, a self-parent, a cycle or
534
- a missing leaf); on the synchronous leg it replaces the earlier `200` + a failed body. Nothing ran. DETERMINISTIC like `corrupt_session`: a retry
535
- cannot change it (the SDK does not auto-retry this code) — switch to a new session or fork from an entry above the break.
538
+ server >= 7.144.0: the same `corrupt_session` also answers a stored log that reads but is structurally broken (a dangling parent, a self-parent, a cycle or
539
+ a missing leaf) when the replay dropped no record — switch to a new session or fork from an entry above the break. Servers 7.137.0–7.143.x answered that form
540
+ `invalid_session` (retired at 7.144.0; this SDK no longer exempts the retired code, so against those servers it is retried by status). A log whose replay DID drop
541
+ records and whose branch broke at the missing parent is no longer refused: the run continues from the break (200).
536
542
  content:
537
543
  application/json:
538
544
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -1952,9 +1958,11 @@ paths:
1952
1958
  total: { type: integer, description: 'present on the out-of-range `?message=` 404 — the message count available.' }
1953
1959
  '500':
1954
1960
  description: >-
1955
- server >= 7.137.0: `invalid_session` — the session's stored log reads but is structurally broken (a dangling parent, a self-parent, a cycle or a
1956
- missing leaf); this read answers it instead of `internal.error`. DETERMINISTIC: a retry cannot change it (the SDK does not auto-retry this code) —
1957
- switch to a new session or fork from an entry above the break. Also `internal.error` (unclassified).
1961
+ `corrupt_session` — the session's stored log cannot be read, or (server >= 7.144.0) reads but is structurally broken (a dangling parent, a self-parent,
1962
+ a cycle or a missing leaf). DETERMINISTIC: a retry cannot change it (the SDK does not auto-retry this code) — switch to a new session or fork from an entry
1963
+ above the break. Servers 7.137.0–7.143.x answered the structurally broken form `invalid_session` (retired at 7.144.0). Known difference (7.144.0): when the
1964
+ replay dropped records and the branch broke at the missing parent, a run continues from the break while this view still answers 500 `corrupt_session`.
1965
+ Also `internal.error` (unclassified).
1958
1966
  content:
1959
1967
  application/json:
1960
1968
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -2110,6 +2118,9 @@ paths:
2110
2118
  description: >-
2111
2119
  `conflict.fork_id_taken` (server >= 7.139.0, keyed fork): `forkId` already names ANOTHER session of yours (a different fork, or a session this fork request did not create); nothing was forked; top-level `forkId`.
2112
2120
  FINAL — pick a new `forkId` and `forkNonce`. (Someone else's session answers `404 not_found.session`, byte-identical to an unknown source.)
2121
+ `conflict.session_archive_stamped` (server >= 7.144.0, `DB_BACKEND=local` only): the source session's stored archive still carries an owner stamp written by an earlier server version (left in place
2122
+ by the one-time data-root migration), so it cannot be forked; nothing was written. The only way out: delete that session and push it again (reads, resumes and pulls work as before). Servers
2123
+ 7.141.0–7.143.x answered it with the bare `conflict` (no `relation`). A plain ConflictError (the `conflict.` prefix family).
2113
2124
  content:
2114
2125
  application/json:
2115
2126
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -2122,9 +2133,10 @@ paths:
2122
2133
  schema: { $ref: '#/components/schemas/ErrorResponse' }
2123
2134
  '500':
2124
2135
  description: >-
2125
- server >= 7.137.0: `invalid_session` — this route has no error mapping of its own; a session error it raises reaches the server's top-level catch, which maps it through the shared table: an `invalid_session` error
2126
- (the SQL session stores raise it while copying a structurally broken stored log) answers 500 `invalid_session` (it was `internal.error` before 7.137.0), `corrupt_session` answers 500 `corrupt_session` as before.
2127
- DETERMINISTIC: a retry cannot change either (the SDK does not auto-retry these codes) — start a new session. Also `internal.error` (unclassified).
2136
+ This route has no error mapping of its own; a session error it raises reaches the server's top-level catch, which maps it through the shared table: `corrupt_session` answers 500 `corrupt_session` —
2137
+ server >= 7.144.0 that includes a structurally broken stored log met while copying (the SQL session stores walk the log through the engine). Servers 7.137.0–7.143.x answered that form
2138
+ 500 `invalid_session` (retired at 7.144.0); before 7.137.0 it was `internal.error`. DETERMINISTIC: a retry cannot change it (the SDK does not auto-retry this code) — start a new session.
2139
+ Also `internal.error` (unclassified).
2128
2140
  content:
2129
2141
  application/json:
2130
2142
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -2300,9 +2312,9 @@ paths:
2300
2312
  (declared 2026-07-31) errorCode "internal.error" — `routes/sessions.ts`'s catch around the owner
2301
2313
  lookup / subscribe setup, sent only when it fires BEFORE the SSE `200` headers went out
2302
2314
  (`!res.headersSent`); once streaming has started a failure just ends the connection instead.
2303
- That catch maps a session error through the shared table first: a session error with a mapped code answers that code (`corrupt_session`; since server 7.137.0 the table also maps `invalid_session` for a structurally broken stored log —
2304
- DETERMINISTIC: a retry cannot change it; the SDK does not auto-retry either code); any other failure stays `internal.error`. The mapping is there but this response does not occur on the stores the server ships:
2305
- none of the three stores the server ships (local file, PostgreSQL, MySQL-protocol) raises `invalid_session` before the stream starts — their head read does not walk the log's parent chain — so only a store of your own can reach it.
2315
+ That catch maps a session error through the shared table first: a session error with a mapped code answers that code (`corrupt_session` — DETERMINISTIC: a retry cannot change it; the SDK does not
2316
+ auto-retry it); any other failure stays `internal.error`. A structurally broken stored log (server >= 7.144.0 `corrupt_session`; 7.137.0–7.143.x `invalid_session`, retired) does not reach this
2317
+ response: none of the three stores the server ships (local file, PostgreSQL, MySQL-protocol) walks the log's parent chain in its head read before the stream starts — only a store of your own can.
2306
2318
  content:
2307
2319
  application/json:
2308
2320
  schema: { $ref: '#/components/schemas/ErrorResponse' }
@@ -3022,10 +3034,10 @@ paths:
3022
3034
  '404': { $ref: '#/components/responses/NotFound' }
3023
3035
  '500':
3024
3036
  description: >-
3025
- Two codes. server >= 7.137.0: `invalid_session` — the session's stored log reads but is structurally broken (a dangling parent, a self-parent,
3026
- a cycle or a missing leaf); this read answers it instead of `internal.error`. DETERMINISTIC: a retry cannot change it (the SDK does not
3027
- auto-retry this code) — switch to a new session or fork from an entry above the break.
3028
- Otherwise errorCode "internal.error" — `routes/sessions.ts`'s catch around `face.status(sessionId)`: core
3037
+ Two codes. `corrupt_session` — the session's stored log cannot be read, or (server >= 7.144.0) reads but is structurally broken (a dangling parent,
3038
+ a self-parent, a cycle or a missing leaf; servers 7.137.0–7.143.x answered that form `invalid_session`, retired at 7.144.0). DETERMINISTIC: a retry cannot change it
3039
+ (the SDK does not auto-retry this code) — switch to a new session or fork from an entry above the break.
3040
+ Otherwise errorCode `internal.error` — `routes/sessions.ts`'s catch around `face.status(sessionId)`: core
3029
3041
  promises the face never throws, so reaching this arm is an assembly defect; the server fails LOUD
3030
3042
  (500) rather than answering a plausible all-keys-absent body. The SDK maps it to
3031
3043
  `InternalServerError`. (codex R1 of the 7.3.1 batch: the arm exists in the shipped 7.53.0 route and
@@ -3563,7 +3575,12 @@ paths:
3563
3575
  schema: { $ref: '#/components/schemas/ErrorResponse' }
3564
3576
  '404': { $ref: '#/components/responses/NotFound' }
3565
3577
  '409':
3566
- description: 409 `conflict` — a commit-time TOCTOU re-classify flipped to fork/stale (carries `relation`).
3578
+ description: >-
3579
+ 409 `conflict` — a commit-time TOCTOU re-classify flipped to fork/stale (carries `relation`; SyncConflictError), or the owner cell changed while the import
3580
+ streamed (no `relation`; restart the sync from Phase A). `conflict.session_archive_stamped` (server >= 7.144.0, `DB_BACKEND=local` only; every
3581
+ log-changing push shape, the payload-fork `fast_forward` included, answers the same code and sentence): the target's stored archive still carries an owner
3582
+ stamp written by an earlier server version — nothing written; the only way out is to delete that session and push it again (restarting the sync hits the
3583
+ same refusal). Servers 7.141.0–7.143.x answered it with the bare `conflict` (no `relation`). A plain ConflictError.
3567
3584
  content:
3568
3585
  application/json:
3569
3586
  schema: { $ref: '#/components/schemas/SyncConflict' }
@@ -14082,6 +14099,7 @@ components:
14082
14099
  content: { type: string }
14083
14100
  sentAt: { type: number, description: 'epoch ms.' }
14084
14101
  heldAt: { type: number, description: 'epoch ms.' }
14102
+ deadline: { type: number, description: 'server >= 7.144.0: the message''s expiry (epoch ms) = the core card''s `deadlineAt`, present only while the expiry timer is armed (absent = no timer, or an older server; never compute one from `heldAt`).' }
14085
14103
  fromSession: { type: string }
14086
14104
  fromName: { type: string }
14087
14105
  fromScope: { type: string }
@@ -14455,6 +14473,33 @@ components:
14455
14473
  while the row was minted earlier, so a hot governance change can make an old row's attribution
14456
14474
  drift in either direction. It feeds no gate/decision path — display only.
14457
14475
 
14476
+ CheckpointRowVerdict:
14477
+ description: >
14478
+ server >= 7.144.0 (core 7.62.0 `CheckpointRowVerdict`, projected verbatim) — WHETHER THIS ENGINE CAN RESUME THIS PARKED ROW: the verdict of the engine's row judge
14479
+ (`judgeCheckpointRow`) on the row's stored bytes. The same type on the operator queue row (`PendingCheckpoint.rowVerdict`), the `/v1/approvals/stream` `pending` frame and the
14480
+ assistant inbox row (`InboxRow.rowVerdict`). ONE JUDGE, TWO FACES: the first-stage resume / decide refusal (409, body carries `reason`) comes from the same judge, so a row
14481
+ listed with a non-`ok` verdict is refused for the same reason when decided — present it as NOT APPROVABLE; the way out is cancelling the run or leaving the row to a
14482
+ replica / version that can resume it. `ok` carries only `kind`; `lacking` / `damaged` carry `code` (the engine's checkpoint error code), `reason` (which arm of a multi-arm code), `requires` (capabilities the row needs and this engine lacks) and `sentence` (the engine's human line —
14483
+ display only, never a match key); `code` / `reason` are open strings (owned by core). Match the two faces on `reason`, not on `code`: the refusal
14484
+ face translates `checkpoint.invalid_outcome` (e.g. `requirements_damaged`) to `approval_binding_mismatch` on a `policy_ask` gate and to `resume_outcome_invalid` on other gates, and that
14485
+ engine refusal carries no `detail.code` (so no `blockedBy`); `checkpoint.unsupported_version` passes through unchanged. The refusal body's `reason` is the verdict's `reason`. ABSENT IS NOT `ok`: the listing did not judge the row (its stored body could not be
14486
+ decoded, it left pending or its bytes changed between two reads, or an older server).
14487
+ oneOf:
14488
+ - type: object
14489
+ additionalProperties: false
14490
+ required: [kind]
14491
+ properties:
14492
+ kind: { const: ok }
14493
+ - type: object
14494
+ additionalProperties: false
14495
+ required: [kind, code, sentence]
14496
+ properties:
14497
+ kind: { type: string, enum: [lacking, damaged] }
14498
+ code: { type: string }
14499
+ reason: { type: string }
14500
+ requires: { type: array, items: { type: string } }
14501
+ sentence: { type: string }
14502
+
14458
14503
  PendingCheckpoint:
14459
14504
  type: object
14460
14505
  description: >
@@ -14478,6 +14523,9 @@ components:
14478
14523
  properties:
14479
14524
  kind: { const: checkpoint, description: 'server >= 7.143.0: the row family (always `checkpoint` on this schema); absent on servers <= 7.142.x, which list this family only.' }
14480
14525
  checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
14526
+ rowVerdict:
14527
+ allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
14528
+ description: 'server >= 7.144.0: the engine row judge''s verdict on this row (ABSENT IS NOT `ok`). A non-`ok` row is refused for the same reason when decided (409). SQL backends read each pending row''s stored body once on the first listing after boot (then memoized by body digest); a row whose body cannot be decoded is listed without it.'
14481
14529
  sessionId: { type: string, description: 'The decide handle: POST /v1/approvals/:sessionId/decide.' }
14482
14530
  scope: { type: string, description: 'Principal; "_" = submitted without one.' }
14483
14531
  taskId: { type: ['string', 'null'], description: 'Suspended run holding the session claim (service-pinned) — join key to trace tool-call blocks + context link.' }
@@ -14689,6 +14737,9 @@ components:
14689
14737
  properties:
14690
14738
  sessionId: { type: string, description: 'The suspended task/session id.' }
14691
14739
  checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
14740
+ rowVerdict:
14741
+ allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
14742
+ description: 'server >= 7.144.0: the same verdict as `PendingCheckpoint.rowVerdict` (ABSENT IS NOT `ok`; both backends).'
14692
14743
  scope: { type: string, description: 'Multi-tenant owner scope.' }
14693
14744
  createdAt: { type: number, description: 'Ask creation time (epoch ms).' }
14694
14745
  gateKind:
@@ -16102,7 +16153,7 @@ components:
16102
16153
  additionalProperties: true
16103
16154
  properties:
16104
16155
  error: { type: string }
16105
- errorCode: { type: string, enum: [conflict, session_active, import_in_flight] }
16156
+ errorCode: { type: string, enum: [conflict, session_active, import_in_flight, conflict.session_archive_stamped], description: '`conflict.session_archive_stamped` (server >= 7.144.0, `DB_BACKEND=local`): the stored archive still carries an earlier version''s owner stamp — no `relation`, delete the session and push it again.' }
16106
16157
  relation: { $ref: '#/components/schemas/SyncRelation' }
16107
16158
  activeTaskId: { type: string, description: Present on `session_active` — the task holding the session lock. }
16108
16159
 
@@ -16183,7 +16234,9 @@ components:
16183
16234
  the branch to the 400 (the fix is the caller's either way: re-encode the id).
16184
16235
  🔴 DETERMINISTIC failure codes (K-24): a few codes arrive on a status that normally means "retry may help" (500 /
16185
16236
  503) while the server contract says a verbatim retry NEVER changes the verdict. The SDK's retry arm exempts them
16186
- by code: `corrupt_session` (500, server >= 7.104.0 / S-612 — the session's saved log cannot be read),
16237
+ by code: `corrupt_session` (500, server >= 7.104.0 / S-612 — the session's saved log cannot be read; server >= 7.144.0 also a stored log that reads but is
16238
+ structurally broken — a dangling parent, a self-parent, a cycle or a missing leaf — on every open face: `GET /v1/sessions/{id}`, `…/memory-status`, the synchronous `POST /v1/tasks`
16239
+ leg and `POST /v1/sessions/{id}/fork`; switch to a new session or fork from an entry above the break),
16187
16240
  `config.tool_name_too_long` / `config.tool_contract_too_long` / `config.tool_roster_bound` (503, server >=
16188
16241
  7.104.0 / S-271 — a deployment-declared tool exceeds the roster bound), `config.tool_schema_bound` (503, server >=
16189
16242
  7.106.0 / core 7.35.0 #765 — a tool's `parameters` schema exceeds the roster row's key bound; "same family, same tier";
@@ -16193,9 +16246,8 @@ components:
16193
16246
  principal is dangling; only re-pointing the assignment, or adding the scenario back to the deployment, helps) and
16194
16247
  `approvals.read_corrupt` (500, server >= 7.134.0 on `GET /v1/approvals` — a queue row's stored body cannot be read; an operator has to repair or
16195
16248
  delete the row; server >= 7.135.0 the same judge answers `GET /v1/assistant/inbox` and `GET /v1/assistant/tasks` too) and `workflow.journal_incompatible`
16196
- (500, server >= 7.135.0 on `GET /v1/workflows/{id}/journal` — a journal row the engine's judge rejects; the body carries `ordinal`; repair the row from the retained copy, never by deleting it) and
16197
- `invalid_session` (500, server >= 7.137.0 — a session whose stored log is structurally broken: a dangling parent, a self-parent, a cycle or a missing leaf; `GET /v1/sessions/{id}` and `…/memory-status` answer it instead of
16198
- `internal.error`, and the synchronous `POST /v1/tasks` leg answers it instead of `200` + a failed body, and so does `POST /v1/sessions/{id}/fork`, whose route has no mapping of its own and lets a session error escape to the server's top-level catch (`GET /v1/sessions/{id}/events` maps a session error through the same table before the stream starts, but none of the three stores the server ships raises `invalid_session` there — the code is mapped, the response does not occur on them); a retry cannot change it — switch to a new session or fork from an entry above the break).
16249
+ (500, server >= 7.135.0 on `GET /v1/workflows/{id}/journal` — a journal row the engine's judge rejects; the body carries `ordinal`; repair the row from the retained copy, never by deleting it).
16250
+ `invalid_session` (500 on servers 7.137.0–7.143.x for the structurally broken form) is RETIRED at server 7.144.0 and no longer exempt: against those older servers the SDK retries it by status.
16199
16251
  Every other 5xx code keeps the status-based retry.
16200
16252
  🔴 server >= 7.135.0 read-failure and store-fault codes (all additive; branch on the code, never the sentence): `503 approvals.read_unavailable` on `GET /v1/approvals`, `/v1/assistant/inbox` and
16201
16253
  `/v1/assistant/tasks` (the queue cannot be read RIGHT NOW — transient, retried by status; until a read succeeds an answer does NOT mean nothing is pending; it moved from the SSE-only table into the status-bearing catalog, status `-` → 503) and, on
@@ -16295,6 +16347,12 @@ components:
16295
16347
  On 409 refusals of a resume (server >= 7.132.0) and on 422 `parked_resume.startup_failed` (server >= 7.134.0 — the parked background agent's pre-claim failure; absent when the engine gave none): the engine's `CheckpointErrorReason` arm (`detail.reason` passed through; see `blockedBy`). On 409 `conflict.checkpoint_ctx_unsealable` (server >= 7.134.0): why the request's credentials cannot be sealed into, or unsealed from, the stored resume context — a closed five-word set (SDK `CHECKPOINT_CTX_UNSEALABLE_REASONS`); which doors can answer which word is written once, in the SDK documentation of `CHECKPOINT_CTX_UNSEALABLE_REASONS`, not here: `no_key_store` (this server has no sealed-key store) / `key_not_held` (sealed with a key this server does not hold — another replica's, or a replaced sealed-key directory) / `unopenable` (the sealed value is damaged or belongs to another session) / `plaintext` (an older server stored it unsealed) / `unrecognized_seal` (a seal format this version does not know) — the way out depends on the door and the `reason`: `key_not_held` (a resume door) — have the operator restore the sealed-key directory that sealed it and restart that replica (it reads its keys only at startup), then resend the same request; `no_key_store` on the submit door — give the service a writable sealed-key directory (`<data root>/sealed-key/`, read at startup), or resubmit WITHOUT those credentials — resending the same submit body is refused again; `no_key_store` on a resume door — the same way out as `key_not_held`: restore the directory that sealed it and restart, then resend (a fresh empty directory does not help: it holds no such key, so the next read says `key_not_held`); `unopenable` / `plaintext` / `unrecognized_seal` — submit the work as a new task (cancel the still-suspended one first); never auto-retry, never match the sentence. A resume door's refusal decides nothing and starts no resume (the card stays pending; the known exception is a terminal run's steer race arm, which first opens a wake card and, when the second read fails for any of the five reasons, withdraws it and then answers 409 — if the withdrawal fails the server only logs it); a submit door's refusal lands before the task runs (nothing runs; a run row already opened for it is closed as `failed` and its idempotency key released, both best-effort — a failed step is only logged by the server and the answer is still the 409). On 400 `rules.inert_entry` (server >= 7.129.0): the engine's `ALLOW_ENTRY_INERT_REASONS` (`tool_name` / `wildcard_all` / `namespace_wildcard` / `content_unsupported` / `grammar` / `near_miss` / `earlier_grammar`). Out-of-vocabulary word ⇒ treat as unknown. (Other codes carry their own `reason` words.)
16296
16348
  server >= 7.137.0: the THREE 400 `request.field_invalid` refusals of `inheritEnv` (a value outside the word set / a non-string / `"all"` on a non-host lane or a deployment with no authorizer session) carry `field: "inheritEnv"` and `reason` — one of
16297
16349
  `unknown_word` / `not_a_string` / `lane_not_host` / `no_authorizer_session` (SDK `INHERIT_ENV_REFUSAL_REASONS`); sentence, code and status are unchanged.
16350
+ thrownName:
16351
+ type: string
16352
+ minLength: 1
16353
+ description: >-
16354
+ server >= 7.144.0 (core 7.62.0): on a resume / decide 409 whose engine reason is `requirements_damaged` — the name of what the engine's row judge saw thrown while reading the
16355
+ parked row (present iff the engine named it as a non-empty string; absent otherwise). Diagnostic only, never a match key; beside `reason`. SDK `ResumeRefusalExtra.thrownName`.
16298
16356
  acceptableForm:
16299
16357
  description: >-
16300
16358
  server >= 7.137.0 (engine 7.56.0), on 409 `resume.constraint_rejected` only: the edit re-judgement (the deployment's resume-edit policy) accepts only the REWRITTEN form — this key is that form's input, read like a card's `args`
@@ -16767,7 +16825,10 @@ components:
16767
16825
  bgAgentId: { type: string }
16768
16826
  Event_text:
16769
16827
  type: object
16770
- description: durable stream only — turn-aggregated answer text (carries the E18 resume-handle eventId).
16828
+ description: >-
16829
+ durable stream only — turn-aggregated answer text (carries the E18 resume-handle eventId). server >= 7.144.0: one row = one SEGMENT (the live text segment's redaction
16830
+ unit is the same one); `text` = each block's original text in order — a block's per-chunk frame bytes, or for a block that has ONLY a `text_end` (no per-chunk frames) its
16831
+ text, which is in the row too (<= 7.143.x concatenated per-chunk bytes only, so such a block was missing).
16771
16832
  allOf: [{ $ref: '#/components/schemas/EventIdentity' }]
16772
16833
  additionalProperties: false # 封闭 + identity 本地镜像:见 Event_reasoning 处的长注
16773
16834
  required: [type, text]
@@ -16793,7 +16854,9 @@ components:
16793
16854
  bgAgentId: { type: string }
16794
16855
  Event_text_delta:
16795
16856
  type: object
16796
- description: live stream only — per-token answer fragment.
16857
+ description: >-
16858
+ live stream only — per-token answer fragment. server >= 7.144.0: the text segment's redaction state spans the engine's text blocks (the segment = the durable `text`
16859
+ row's unit; the engine's `text_end` only delivers a block) — for a block with per-chunk frames, their concatenation = that block's `text_end.content`.
16797
16860
  allOf: [{ $ref: '#/components/schemas/EventIdentity' }]
16798
16861
  additionalProperties: false # 封闭 + identity 本地镜像:见 Event_reasoning 处的长注
16799
16862
  required: [type, delta]
@@ -16807,9 +16870,11 @@ components:
16807
16870
  Event_text_end:
16808
16871
  type: object
16809
16872
  description: >
16810
- LIVE stream only (server >= 7.66.0, core 5.62.0) — the END-OF-SEGMENT signal for one assistant text
16811
- segment. `content` is the segment's AUTHORITATIVE full text (same trust class as `text_delta`, same
16812
- zero content transformation). It retires the "no delta for N ms => the segment must be over" idle-flush
16873
+ LIVE stream only (server >= 7.66.0, core 5.62.0) — the end signal of one engine assistant text BLOCK.
16874
+ server >= 7.144.0: it DELIVERS that block and does not close the segment (the segment = the durable `text` row's unit and may span blocks): `content` = this block's text,
16875
+ judged after the same segment's earlier text and delivering only this block's slice (a credential whose anchor sits in an earlier block is masked here too; <= 7.143.x
16876
+ judged each block alone). A block with per-chunk frames: their concatenation = `content`; a block with only this frame: its text is only here (and in the durable row).
16877
+ `content` is the block's AUTHORITATIVE text (same trust class as `text_delta`, same zero content transformation). It retires the "no delta for N ms => the segment must be over" idle-flush
16813
16878
  heuristic: the boundary is now stated by the engine, not guessed by a timer.
16814
16879
  🔴 A TRUNCATED segment gets NO such frame (core deliberately withholds it) — "no text_end" does NOT
16815
16880
  mean "the segment is still going". 🔴 The durable leg does not append it (the batched `text` event
@@ -17946,6 +18011,14 @@ components:
17946
18011
  kind: { type: string }
17947
18012
  outcome: { type: string }
17948
18013
  label: { type: string }
18014
+ rewrittenBy:
18015
+ type: array
18016
+ items: { type: string }
18017
+ description: >-
18018
+ server >= 7.144.0 (core 7.62.0): this input's text was REWRITTEN before delivery by the leg's prompt screen (an extension's `prompt.submit`) — the extensions that
18019
+ changed it, in the order they did (registration names). The model saw the rewritten text (the caller's own words were not delivered). Rides the frame the screening
18020
+ entrance mints (an objective's `"applied"` frame, a parked steer's or a wake message's, a live steer's `"queued"` frame). ABSENT = the text went as it came (or an older
18021
+ server); the server projects only non-empty names and omits an empty list. Attribution only, never authority.
17949
18022
  eventId: { type: string }
17950
18023
  parentToolCallId: { type: string }
17951
18024
  sourceTaskId: { type: string }
@@ -18510,7 +18583,7 @@ components:
18510
18583
  activity: { type: string }
18511
18584
  summaryParams: { type: array, items: { type: string } }
18512
18585
  resultCards: { type: array, items: { type: string } }
18513
- approvalCard: { type: string, enum: [file-edit, file-write, notebook-edit, shell, fetch, plan, question, generic] }
18586
+ approvalCard: { type: string, enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control] }
18514
18587
  McpToolRuleFace:
18515
18588
  type: object
18516
18589
  additionalProperties: false
@@ -18639,21 +18712,21 @@ components:
18639
18712
  `detail.taskId`; absent when the leg has no run resource (a streaming leg on a deployment without a run store) or on an older
18640
18713
  server. NO `runId` (the model-call layer cannot see the engine's run identity): a resume leg and its original leg share the
18641
18714
  `taskId`. Once per leg per target; it says "this endpoint is unreachable", not "this run failed".
18642
- `session.records_skipped` (K-24; server >= 7.104.0 / S-612 form B; contract §17.4 / appendix D.3) — 🔴 SERVER-MINTED
18643
- (not in core's register; owner, audience `user` and mint all live in the server). The session's saved log was
18644
- OPENED and some records could not be read and were skipped (file session backend only — both SQL backends refuse a
18645
- bad row with `corrupt_session`); the session woke up and THIS TURN RUNS, but the model sees a shorter history.
18646
- `{ dropped, entriesKept, sessionId }`: `dropped` = records skipped by this replay, `entriesKept` = surviving entries
18647
- counted after the open succeeded (the meta header not counted); both are observed counts — do NO arithmetic (there
18648
- is no "total"); `entriesKept === 0` = header present, no entry left (empty context, the turn still runs). NO `runId`
18649
- (minted inside the session store's open; attribution = whichever run's stream / ledger it lands on). Deduplicated
18650
- ONCE PER OPEN: until the log is repaired every real open emits again; a turn served from the server's session cache
18651
- (`SESSION_CACHE_TTL_SEC`, default 300 s) does not reopen and emits nothing — an event, not a standing state. Only an
18652
- open "for this session itself" mints it (a list / export / head / ownership probe reading another session's bad log
18653
- does not). ⚠️ When a skipped record is an ancestor of the current leaf the turn then fails `invalid_session` in
18654
- prepare (core #1077) — the frame still arrives first. ⚠️ The non-streaming synchronous `POST /v1/tasks` registers no
18655
- notice delivery (every `engine_notice` code alike), so there it reaches the operator log only. A log that cannot be
18656
- read AT ALL (no meta header) emits no frame — that turn is refused with 500 `corrupt_session`.
18715
+ `session.records_skipped` (RETIRED at server 7.144.0, no alias; server-minted on 7.104.0–7.143.x with `{ dropped, entriesKept, sessionId }`) — the same fact is
18716
+ now the engine's `session.lineage_rerooted` (below). A consumer branching on the old code reads the new one: `recordsDropped` = the old `dropped`; `entriesOnPath`
18717
+ (the entries the run's context keeps) is NOT the old `entriesKept` (all surviving entries).
18718
+ `session.lineage_rerooted` (server >= 7.144.0 / core 7.62.0; audience `user`; D.3 stays at 48 codes — one code out, one in; file session backend only) — the session this run continues
18719
+ has a log whose replay dropped records it could not read, and this says what the run lost. Two forms, told apart by `detail.break`: `true` — the branch the run reads broke at a parent the
18720
+ log does not hold, and the run continues from the entry that names that parent instead of failing (the synchronous leg answers 200); `false` — the branch is whole (the log's last records
18721
+ were unreadable and its head fell back to the last one still readable, or the damage sat off the branch) and the run continues from `leaf`.
18722
+ `{ break, recordsDropped, recordsTotal, leaf, entriesOnPath, sessionId, runId }` and, when `break` is `true`, `{ missingParentId, rootedAt, entriesCut }` — the replay's count (records, not
18723
+ entries) and its total records (`recordsDropped` of them unreadable), the entry the run continues from (`null` = nothing of the log is readable; always a string when `break` is `true`), the branch's length, the parent not in the
18724
+ log, the entry the branch starts at, and how many entries the log holds that do not descend from `rootedAt`. Counts and entry ids only, never a record's words. Once per prepared leg for a
18725
+ whole branch, once per break for a broken one (and then the whole-branch form is not said); a turn served from the session cache announces too. A break the replay cannot account for (it
18726
+ dropped nothing: a dangling parent, a self-parent, a cycle or a missing leaf) is NOT re-rooted — that turn is refused `corrupt_session` (500 on the synchronous leg; the same code and the
18727
+ same client action as a log that cannot be read at all: do not retry — start a new session or fork from an entry above the break). Servers 7.137.0–7.143.x answered that form
18728
+ `invalid_session`; 7.144.0 retires it from every open face. ⚠️ Known difference: the run continues, while the session view (`GET /v1/sessions/{id}` / `…/memory-status`) still
18729
+ answers 500 `corrupt_session` for the same break.
18657
18730
  PERMISSION-MODE FIVE (K-32; server >= 7.106.0 / core 7.34.0 design/1111 + C-R172; contract appendix D.3 26 → 31 codes; owner
18658
18731
  core, words passed through verbatim): `classifier.unavailable` — the auto-mode classifier could not judge the call (error, or
18659
18732
  the per-rung `AUTO_MODE_CLASSIFIER_TIMEOUT_MS` budget ran out), `{ toolName, toolCallId, cause, disposition, sessionId?, runId? }`,
@@ -20794,8 +20867,11 @@ components:
20794
20867
 
20795
20868
  ToolApprovalCardWord:
20796
20869
  type: string
20797
- enum: [file-edit, file-write, notebook-edit, shell, fetch, plan, question, generic]
20870
+ enum: [file-edit, file-write, notebook-edit, shell, fetch, skill, workflow, plan, question, generic, computer-access, computer-control]
20798
20871
  description: >
20872
+ sdk 34.0.0: twelve words = core 7.62.0 / server 7.144.0 `TOOL_APPROVAL_CARDS` (`skill` / `workflow` were already in the engine's register at core 7.59.0 and were missing here;
20873
+ `computer-access` — the consent card of a tool that hands the model the user's screen, the call carries `apps`, the list asked for — and `computer-control` — that tool's
20874
+ other consent card, the call carries nothing the card needs — are new in core 7.62.0; what each grants is per connection).
20799
20875
  server >= 7.126.0 (core 7.49.0 `TOOL_APPROVAL_CARDS`, verbatim and in order; contract table B `approvalCard` row) — WHICH CARD an approval ask renders on: the one word the engine mints at the gate, the
20800
20876
  ONLY card-word source (it replaces the tool-name-derived `contentKind`). `question` = a question put to the user (the engine's reserved question tool — not a side-effecting tool; a consumer that read
20801
20877
  `contentKind === "content_ask"` reads `approvalCard === "question"`); `generic` = a card with no dedicated renderer. CLOSED set; new words join with a core minor, so a switch on it keeps a default arm.
@@ -21603,6 +21679,9 @@ components:
21603
21679
  sessionId: { type: string, description: '`resolved` frames (checkpoint family): which pending settled.' }
21604
21680
  toolCallId: { type: string, description: '`resolved` frames: the settled pending''s bound tool-call id (absent when the pending carried none).' }
21605
21681
  count: { type: integer, description: '`synced` frames: how many pendings the connect-time snapshot carried.' }
21682
+ rowVerdict:
21683
+ allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
21684
+ description: '`pending` frames only (server >= 7.144.0): the spread PendingCheckpoint row''s `rowVerdict` (ABSENT IS NOT `ok`).'
21606
21685
  checkpointId: { type: string, description: '`pending` frames only (server >= 7.133.0): the spread PendingCheckpoint row''s `checkpointId` (key absent when the row has no trusted value — read as "no joinable identity").' }
21607
21686
  consumerState: { type: string, enum: [absent], description: '`live_pending` frames only (server >= 7.133.0): the spread LivePendingRow''s true-only `consumerState` (no engine leg on this replica is waiting for the ask).' }
21608
21687
  errorCode: { type: string, description: '`error` frames: the machine code (`STREAM_MAX_DURATION` / `draining` / server >= 7.133.0 `approvals.read_unavailable` — the stream STAYS open, do NOT reconnect on it — / `approvals.read_corrupt` — a corrupt row was read, the server closes the stream after the frame).' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/sdk",
3
- "version": "33.0.0",
3
+ "version": "34.0.0",
4
4
  "description": "Typed, zero-runtime-dependency SDK for the Sema agent fleet usage plane. The shared substrate for all doors (CC/Codex MCP façade + web). Server-side only — tokens never enter the browser.",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",