@sema-agent/sdk 38.0.0 → 39.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/README.md +153 -4
- package/dist/device/index.d.ts +20 -5
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +17 -6
- package/dist/device/index.js.map +1 -1
- package/dist/errors.d.ts +12 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -2
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +26 -7
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/health.d.ts +6 -3
- package/dist/health.d.ts.map +1 -1
- package/dist/health.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/principal-inbox.d.ts +4 -0
- package/dist/resources/principal-inbox.d.ts.map +1 -1
- package/dist/resources/principal-inbox.js +4 -0
- package/dist/resources/principal-inbox.js.map +1 -1
- package/dist/resources/questions.d.ts +22 -16
- package/dist/resources/questions.d.ts.map +1 -1
- package/dist/resources/questions.js.map +1 -1
- package/dist/resources/session-sync.d.ts +5 -0
- package/dist/resources/session-sync.d.ts.map +1 -1
- package/dist/resources/session-sync.js +5 -0
- package/dist/resources/session-sync.js.map +1 -1
- package/dist/resources/tool-approvals.d.ts +4 -1
- package/dist/resources/tool-approvals.d.ts.map +1 -1
- package/dist/resources/tool-approvals.js.map +1 -1
- package/dist/transport.d.ts +3 -0
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +4 -0
- package/dist/transport.js.map +1 -1
- package/dist/types.d.ts +48 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/openapi.yaml +88 -21
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -6449,7 +6449,14 @@ paths:
|
|
|
6449
6449
|
'404': { description: '`org_delivery.not_member` — one byte-identical body for six causes (see the description); the gate is not an existence probe.' }
|
|
6450
6450
|
'409': { description: '`org_delivery.inbox_full` — the recipient''s box holds 50 unconfirmed envelopes.' }
|
|
6451
6451
|
'410': { description: '`org_delivery.recipient_tombstoned` — the recipient''s mailbox is in its pre-delete state.' }
|
|
6452
|
-
'429':
|
|
6452
|
+
'429':
|
|
6453
|
+
description: >-
|
|
6454
|
+
`org_delivery.rate_limited` — one sentence for the sender-attempt bound, the pair bound and the recipient aggregate bound. server >= 7.149.0: the body adds `retryAfterSec`
|
|
6455
|
+
(integer seconds to the end of the current clock-hour bucket, rounded up, >= 1) and the response carries the same value as `Retry-After`, one number for all three bounds;
|
|
6456
|
+
server <= 7.148.x: neither (no window given — not "retry at once").
|
|
6457
|
+
headers:
|
|
6458
|
+
Retry-After: { schema: { type: integer }, description: 'server >= 7.149.0: seconds to the end of the current clock-hour bucket (same value as the body `retryAfterSec`).' }
|
|
6459
|
+
'500': { description: '`internal.org_delivery_quota_unreadable` (server >= 7.149.0; code family deterministic) — `DB_BACKEND=local` only: the delivery-quota state file cannot be read, so EVERY delivery is refused until an operator repairs or moves the file and restarts the service (the store reads it only at boot). No `Retry-After`; retrying will not change the answer (the SDK''s `NON_RETRYABLE_CODES` carries it). Before 7.149.0 this state answered `500 internal.error`.' }
|
|
6453
6460
|
'501': { description: 'No delivery gate mounted (`PRINCIPAL_INBOX_ASSISTANT` off) — `capability.unavailable`.' }
|
|
6454
6461
|
|
|
6455
6462
|
/v1/diagnostics/wiring:
|
|
@@ -9291,6 +9298,15 @@ components:
|
|
|
9291
9298
|
cancel scene to look at", NOT "nothing was wrong at cancel time"). Landings: `GET /v1/runs/{taskId}` -> `result.cancelContext`
|
|
9292
9299
|
(and the same object rides the other cancelled-terminal landings listed on `abortCause`). Shape and per-key reading
|
|
9293
9300
|
rules: `CancelContext`.
|
|
9301
|
+
readDenyFloor:
|
|
9302
|
+
allOf: [{ $ref: '#/components/schemas/ReadDenyFloorSummary' }]
|
|
9303
|
+
description: >
|
|
9304
|
+
server >= 7.149.0, PRESENT-IFF the run WENT AHEAD while its read-deny rules are not byte-enforced: the read-deny table has rows, the execution
|
|
9305
|
+
environment (lane) does not keep the byte floor, and the deployment did not set `READ_DENY_FLOOR_REQUIRED=true` (when it did, the synchronous
|
|
9306
|
+
`POST /v1/tasks` answers 409 `config.read_deny_floor_unkept` and the asynchronous legs land the same code on the terminal row - the run does not go).
|
|
9307
|
+
ABSENT = no such disclosure: the run did not start (entry budget gate / refused submit), the table is empty, the lane keeps the byte floor, or an older
|
|
9308
|
+
server - absence does NOT prove the read-deny rules were kept. Landings, one value: `GET /v1/runs/{taskId}` -> `result.readDenyFloor` ·
|
|
9309
|
+
`POST /v1/tasks/stream` -> `done.result.readDenyFloor` · the `POST /v1/tasks` 200 body at its top level · the ledger `done` row's `result`. Shape: `ReadDenyFloorSummary`.
|
|
9294
9310
|
|
|
9295
9311
|
abortCause:
|
|
9296
9312
|
allOf: [{ $ref: '#/components/schemas/AbortCause' }]
|
|
@@ -9342,6 +9358,18 @@ components:
|
|
|
9342
9358
|
CLOSED set, additive-only by the server's rule (a new word is a new server version in `wire-changes` AND a new SDK
|
|
9343
9359
|
minor, in this enum in the same batch): read an unknown word as "the server aborted this run, cause not recognised".
|
|
9344
9360
|
|
|
9361
|
+
ReadDenyFloorSummary:
|
|
9362
|
+
type: object
|
|
9363
|
+
additionalProperties: false
|
|
9364
|
+
required: [code, message]
|
|
9365
|
+
description: >
|
|
9366
|
+
`TaskResult.readDenyFloor` (server >= 7.149.0): the run-level disclosure that a run WENT AHEAD while its read-deny rules are not byte-enforced.
|
|
9367
|
+
`{ code, message }` is the same pair as that run's `engine_notice` frame `config.read_deny_floor_unkept`; `message` is the server's lane-specific
|
|
9368
|
+
sentence (display text, never a match key). Two keys, no others.
|
|
9369
|
+
properties:
|
|
9370
|
+
code: { type: string, enum: [config.read_deny_floor_unkept] }
|
|
9371
|
+
message: { type: string }
|
|
9372
|
+
|
|
9345
9373
|
CancelContext:
|
|
9346
9374
|
type: object
|
|
9347
9375
|
# 封闭(K-43,sdk 16.0.0):铸点 `run-cancel-context.js` `buildCancelContext` 是逐键条件 spread 的字面量(lastEventKind / lastEventAgeMs / lastBrainStatus / elapsedMs),
|
|
@@ -10640,6 +10668,15 @@ components:
|
|
|
10640
10668
|
description: >-
|
|
10641
10669
|
server >= 7.147.0 (config-dependent): the project registry read face (`GET /v1/projects[?archived]` · `GET /v1/projects/{id}`) resolves. true iff a registry exists — it is published only by the configuration center
|
|
10642
10670
|
(a center configured and not dry-run); false => both doors answer 501 `capability.unavailable`. Read-only: the bit does not cover write verbs (none exist; a write face gets its own bit). ABSENT = an older server (both doors 404).
|
|
10671
|
+
projectInheritance:
|
|
10672
|
+
type: boolean
|
|
10673
|
+
description: >-
|
|
10674
|
+
server >= 7.150.0 (config-dependent; a predicate-class bit): a submitted run that carries `projectId` (or whose session row declared a project earlier) INHERITS the project brief (`goal` / `notes` / `note` items folded into the system prompt's
|
|
10675
|
+
append fold, after `appendSystemPrompt` and before `settings.outputStyle`, one 16384-character cap) from this deployment's project registry. The working directory (the first `folder` item fills an absent request `cwd`) and the `folder` / `file`
|
|
10676
|
+
item names are inherited ONLY where `projectContext` is true (single-owner host deployments): `projectInheritance: true` does not promise an inherited `cwd`. Read the bit; do not infer it
|
|
10677
|
+
from `projects` (today both read the one "a registry exists" fact, which is not a promise they stay one). True is NOT "every project is inherited": only a registration that carries the center's content attestation (`ProjectRow.contentAttestedAt`)
|
|
10678
|
+
is inherited. A client that already folds project content into `appendSystemPrompt` stops folding on `true` (else the brief repeats); an append segment near the cap plus the brief answers 400 `request.field_conflict` (`reason: "system_prompt_fold"`,
|
|
10679
|
+
`fields` includes `projectId`). ABSENT = server <= 7.149.x (no inheritance).
|
|
10643
10680
|
sessionRewindFiles:
|
|
10644
10681
|
type: boolean
|
|
10645
10682
|
description: >-
|
|
@@ -11342,7 +11379,7 @@ components:
|
|
|
11342
11379
|
additionalProperties: true
|
|
11343
11380
|
properties:
|
|
11344
11381
|
enabled: { type: boolean, enum: [true] }
|
|
11345
|
-
protocolVersion: { type: integer, description: 'The protocol REVISION this server speaks (the `challenge` frame carries the same value
|
|
11382
|
+
protocolVersion: { type: integer, description: 'The protocol REVISION this server speaks (the `challenge` frame carries the same value). Server >= 7.150.0 reads 5 (7.143.x-7.149.x read 4, 7.137.x-7.142.x read 3, 7.133.x-7.136.x read 2, <= 7.132.x read 1). The accepted window is [lowest accepted revision, this value]: <= 7.149.x accept [1, this value]; server >= 7.150.0 accepts only [5, 5] (every path an instruction carries arrives anchored but unfolded, and an executor written for revision <= 4 expects folded paths), so a hello declaring <= 4 is answered with `helloReject` / `protocol_version_unsupported` carrying `minProtocolVersion: 5` and a human `message`. An executor declares the SMALLER of its own highest revision and this value, and takes its outcome-code set from the declared revision (revision 2 added `liveness_no_output`; revision 3 added `name_too_long`; revision 4 added `symlink_loop` — file instructions only; revision 5 added no word).' }
|
|
11346
11383
|
maxInflightPerDevice: { type: integer }
|
|
11347
11384
|
wsPath: { type: string }
|
|
11348
11385
|
relayUrl: { type: string, description: 'server >= 7.137.0. PRESENT-IFF the operator declared `DEVICE_RELAY_URL` as a ws(s) URL: the device-facing direct entry — an absolute ws(s) URL (no userinfo / query / fragment), verbatim. A dialer dials it instead of building engine address + `wsPath`; absent = build it as before. server >= 7.141.0 requires the env on the device lane (a ws(s) URL, or the literal `none` = no relay => this key absent); on <= 7.140.x absence may also mean the operator wrote nothing.' }
|
|
@@ -13162,6 +13199,7 @@ components:
|
|
|
13162
13199
|
supportsThinkingOff: { type: boolean, description: "Whether this model's reasoning can be turned off — the engine's one reading `thinkingOffSpelled` (derived from the row's API family, `compat`, `thinkingLevelMap.off` and `reasoning` declaration; the catalog carries no key for it). ALWAYS PRESENT on a server >= 7.138.0 (a plain boolean, not three-state); ABSENT = an older server (unknown, not `false`)." }
|
|
13163
13200
|
defaultThinking: { type: string, enum: [minimal, low, medium, high, xhigh, max, 'off'], description: 'server >= 7.148.0, present iff declared: the model''s default thinking rung (the engine''s `Model.defaultThinking`, seven rungs incl. `off` — a request that names no rung then carries an explicit off). ABSENT = no model-level default (the provider''s own default applies), or an older server. Whether thinking CAN be turned off is `supportsThinkingOff`.' }
|
|
13164
13201
|
contextWindow: { type: integer, description: 'E4 (SHIPPED) — context-window token DENOMINATOR for the %-used gauge; omitted when unknown.' }
|
|
13202
|
+
contextWindowSource: { type: string, enum: [declared, assumed], description: 'server >= 7.149.0, PRESENT-IFF `contextWindow` is present: where the window came from. `declared` = someone along the model''s inheritance chain wrote a number (the catalog entry''s `contextWindow`, the deployment''s `MODEL_CONTEXT_WINDOW` which an entry that writes none inherits, or `MODEL_CHEAP_CONTEXT_WINDOW` for the cheap slot); `assumed` = nobody wrote one and the server filled a conservative guess (131072 since 7.149.0; 7.148.x and before assumed 262144 and did not say so) - an estimate, not a measurement: the engine sizes its compaction trigger and tool-schema deferral on it, so a model whose real window is smaller reaches its limit before compaction starts and a larger one compacts earlier than it needs to. CLOSED two words. ABSENT = a server <= 7.148.x (source unknown, NOT `declared`) or a row with no `contextWindow`.' }
|
|
13165
13203
|
maxOutputTokens: { type: integer, description: 'E4 (SHIPPED) — single-call max output tokens; omitted when unknown.' }
|
|
13166
13204
|
supportedEffortLevels:
|
|
13167
13205
|
type: array
|
|
@@ -13243,6 +13281,7 @@ components:
|
|
|
13243
13281
|
registeredBy: { type: string }
|
|
13244
13282
|
registeredAt: { type: string, format: date-time }
|
|
13245
13283
|
archivedAt: { type: string, format: date-time }
|
|
13284
|
+
contentAttestedAt: { type: string, format: date-time, description: "server >= 7.150.0, PRESENT-IFF the registration carries the configuration center's content attestation (settings-schema 25.1.0): the time the center's write path last admitted the project's goal / notes / contextItems under the publisher role. Present = the project is eligible for context inheritance (`capabilities.projectInheritance`); absent = the content did not pass the publisher write path (written before the upgrade / an older server) — the row is still listed and readable. A proof of admission, not a freshness claim." }
|
|
13246
13285
|
|
|
13247
13286
|
ProjectsPage:
|
|
13248
13287
|
type: object
|
|
@@ -14812,7 +14851,7 @@ components:
|
|
|
14812
14851
|
type: boolean
|
|
14813
14852
|
enum: [true]
|
|
14814
14853
|
description: >-
|
|
14815
|
-
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key). Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
14854
|
+
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). server >= 7.150.0 reads this bit as "this question + this leg" (the card and the `allow_session` receipt read one judge): a leg with no session, or one whose session-occupant token cannot be read (the session store carries no execution seat — the engine's default in-memory store), carries it too; the card carries it IFF a click on `allow_session` receipts `rememberApplied: false` (a write failure or an ambiguous commit is known only after the decision settles and is still reported on the receipt alone). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key) — and on <= 7.149.x ABSENT is also what those two leg shapes showed while `allow_session` still receipted `false`, so "absent = remembered" does not hold there for them. Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
14816
14855
|
governanceForced: { type: boolean, enum: [true] }
|
|
14817
14856
|
mandated: { type: boolean, enum: [true], description: 'server >= 7.101.0 (T4①): the mandated bit, same layer and shape as the two flags above (present only when true); the SAME value as `frame.mandated` (read once when the entry is minted).' }
|
|
14818
14857
|
mandate:
|
|
@@ -15270,7 +15309,7 @@ components:
|
|
|
15270
15309
|
type: boolean
|
|
15271
15310
|
enum: [true]
|
|
15272
15311
|
description: >-
|
|
15273
|
-
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key). Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
15312
|
+
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). server >= 7.150.0 reads this bit as "this question + this leg" (the card and the `allow_session` receipt read one judge): a leg with no session, or one whose session-occupant token cannot be read (the session store carries no execution seat — the engine's default in-memory store), carries it too; the card carries it IFF a click on `allow_session` receipts `rememberApplied: false` (a write failure or an ambiguous commit is known only after the decision settles and is still reported on the receipt alone). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key) — and on <= 7.149.x ABSENT is also what those two leg shapes showed while `allow_session` still receipted `false`, so "absent = remembered" does not hold there for them. Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
15274
15313
|
governanceForced:
|
|
15275
15314
|
type: boolean
|
|
15276
15315
|
enum: [true]
|
|
@@ -17185,6 +17224,18 @@ components:
|
|
|
17185
17224
|
- $ref: '#/components/schemas/ErrorResponse'
|
|
17186
17225
|
- type: object
|
|
17187
17226
|
properties:
|
|
17227
|
+
wayOut:
|
|
17228
|
+
type: string
|
|
17229
|
+
enum: [cancel_run, newer_worker]
|
|
17230
|
+
description: >-
|
|
17231
|
+
server >= 7.149.0, PRESENT-IFF the server can say the client's way out of a refused card (the engine judged the card not resumable on this engine;
|
|
17232
|
+
the three decision doors `POST /v1/approvals/{sessionId}/decide` · `.../plan_review` · `.../resume` refuse alike). CLOSED two words, decided by the verdict and the card alone
|
|
17233
|
+
(not by which door, not by the decision word): `cancel_run` - the card takes NO decision on this engine (approve / deny / reject / edit all refused), the way out is
|
|
17234
|
+
`POST /v1/runs/{taskId}/cancel`, which expires the card, drives the run to the cancelled terminal and frees the session (then start a new task) - render no approve / deny;
|
|
17235
|
+
`newer_worker` - a row parked by a newer engine: a worker at or above the version that parked it can resume it and the same decision lands there; the card stays pending
|
|
17236
|
+
(cancel is giving it up). ABSENT = the server cannot say a client way out (the card sits on a plain park of an already-terminal run, the run is running, the row's owner is
|
|
17237
|
+
unreadable, or no durable run store) - ask the operator; do NOT render "decide again" from `retriable`. Not carried: a refusal of the decision body's own cell (fix that
|
|
17238
|
+
cell and decide again), a deployment-fact refusal, `POST /v1/sessions/{sessionId}/wake`. SDK: `err.extra.wayOut` (`ResumeRefusalExtra.wayOut`).
|
|
17188
17239
|
retriable:
|
|
17189
17240
|
type: boolean
|
|
17190
17241
|
enum: [true]
|
|
@@ -19295,10 +19346,11 @@ components:
|
|
|
19295
19346
|
tool's input schema and named it — the failed turn's `errorKind` is `tool_schema_refused` — so that tool's parameters are sent as an empty object schema from then on for this transcript (MCP and A2A tools only,
|
|
19296
19347
|
at most 8 per transcript; the model can still call the tool); once per refusal). All three audience `user`.
|
|
19297
19348
|
`mcp.authorization_required` (core 7.59.0) — an MCP server the user must authorize before it serves them: the leg's dial failed `unauthorized`, or a request was refused that way and that refusal is its answer (a repeat-safe call refused with 401
|
|
19298
|
-
and sent once more on a renewed credential announces only if that send is refused too). The leg does not park on it. `{ server, reason
|
|
19349
|
+
and sent once more on a renewed credential announces only if that send is refused too). The leg does not park on it. `{ server, reason?, authorizeUrl?, principal?, sessionId, runId }` — `reason` is `rejected` (401) / `scope` (403
|
|
19299
19350
|
`insufficient_scope`) / `none` (the authorization seat holds no authorization for this user), the engine's closed set, echoed by the server (read OPEN); `authorizeUrl` only ever comes from the deployment's authorization seat (this deployment
|
|
19300
19351
|
has none, so it is always absent and the sentence points at connector settings); `principal` is the run's principal when it has one. Once per leg per server (a resume is a new leg and may announce again). The same fact on the status faces is
|
|
19301
|
-
`errorCode: "unauthorized"` + `authorization`.
|
|
19352
|
+
`errorCode: "unauthorized"` + `authorization`. server >= 7.150.0: `reason` / `authorizeUrl` are members of the MCP authorization record and leave through the same disposition table as the status faces (structural slots: they do not pass the
|
|
19353
|
+
detail's free-text redaction and truncation); a `reason` word outside the closed set drops the pair as a whole, so `reason` is PRESENT IFF its word is in the closed set (read `reason` as optional; servers before 7.150.0 always carry it), and `authorizeUrl` is not let through today (always absent). `server` / `principal` / `sessionId` / `runId` stay as they were. NOT on the user whitelist, though core 7.59.0's register holds them: `model.role_defaulted` (a role seat names a model word the catalog does not hold, so the role reads as unset and the run goes on)
|
|
19302
19354
|
and `route.credential_rebound` (the HOST moved a per-model credential's binding, outside any run) are audience `operator` — they never reach this stream.
|
|
19303
19355
|
Value change: `permission.rule_row_dropped`'s `detail.rows[].rule` is, since core 7.53.0, the rule's original text (the same reading as
|
|
19304
19356
|
`allowed_tool_not_granted`'s `entries[].entry`: at most 1 024 code points, longer cut to 1 024 + a truncation mark, CONTROL CHARACTERS RIDE AS DATA —
|
|
@@ -19379,6 +19431,11 @@ components:
|
|
|
19379
19431
|
with a finish reason the engine does not understand, so the text above may be cut short (`finishReason` = the provider's own word, an OPEN string, passed through verbatim; once per run per word); and
|
|
19380
19432
|
`route.stream_end_ignored` `{statement, word, frames, sessionId, runId}` — the provider had already ended the turn and its stream sent more (`statement` in {`ending`, `error`, `content`}, `word` = the late first
|
|
19381
19433
|
frame's ending reason / error word / content kind, `frames` = how many frames came after the end; the first ending counts, anything later never entered the turn; once per run per (statement, word)).
|
|
19434
|
+
server 7.149.0 (the user-visible whitelist grows 51 -> 52 codes; contract appendix D.3): `config.read_deny_floor_unkept` (the engine's code, passed through; the code book lists audience `operator`
|
|
19435
|
+
but this server puts it on the run event stream) - this run WENT AHEAD while its read-deny rules are not byte-enforced (the read-deny table has rows, the execution environment does not
|
|
19436
|
+
keep the byte floor, `READ_DENY_FLOOR_REQUIRED` is not set; when it is set the run does not go: the synchronous `POST /v1/tasks` answers 409 with the same code). `detail` =
|
|
19437
|
+
`{ rowCount, sessionId, runId }` - the table's row count and the run it speaks of (a ladder level / verifier / subagent leg is its own run id); `message` is rewritten by the server per lane.
|
|
19438
|
+
The same `{ code, message }` pair lands once more on the terminal result as `readDenyFloor` (`TaskResult.readDenyFloor`).
|
|
19382
19439
|
A notice whose `detail.sessionId` is absent is HONESTLY NOT DELIVERED (the server never guesses a session),
|
|
19383
19440
|
so the frame's absence does NOT mean "did not happen" — the operator-facing structured log always has the
|
|
19384
19441
|
full family. `detail` is already redacted + size-bounded by the server; still treat it as external text.
|
|
@@ -19937,7 +19994,7 @@ components:
|
|
|
19937
19994
|
type: boolean
|
|
19938
19995
|
enum: [true]
|
|
19939
19996
|
description: >-
|
|
19940
|
-
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key). Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
19997
|
+
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). server >= 7.150.0 reads this bit as "this question + this leg" (the card and the `allow_session` receipt read one judge): a leg with no session, or one whose session-occupant token cannot be read (the session store carries no execution seat — the engine's default in-memory store), carries it too; the card carries it IFF a click on `allow_session` receipts `rememberApplied: false` (a write failure or an ambiguous commit is known only after the decision settles and is still reported on the receipt alone). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key) — and on <= 7.149.x ABSENT is also what those two leg shapes showed while `allow_session` still receipted `false`, so "absent = remembered" does not hold there for them. Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
19941
19998
|
governanceForced:
|
|
19942
19999
|
type: boolean
|
|
19943
20000
|
enum: [true]
|
|
@@ -20455,7 +20512,7 @@ components:
|
|
|
20455
20512
|
type: boolean
|
|
20456
20513
|
enum: [true]
|
|
20457
20514
|
description: >-
|
|
20458
|
-
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key). Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
20515
|
+
server >= 7.116.0, ADDITIVE, present ONLY when true (never `false`): the "remember for this session" answer (live `allow_session` / durable `/decide` `remember:"session"`) will NOT be remembered on this card — the decision is accepted and applies once, the receipt's `rememberApplied` is `false` (existing key, not a new one), later cards of the same kind still ask. A shell reads this to decide whether to render the "allow for the session" choice instead of inferring it from `requiresRealApproval` / `mandated` / `governanceForced`. One bit for four reasons: the operator-governance gate / a human must approve each time / a mandated card / the answer would also grant more than this one call (new in 7.116.0: approving an engine `Skill` card activates the skill and frees its listed tools for the run, which the card cannot show, so it is not remembered). server >= 7.150.0 reads this bit as "this question + this leg" (the card and the `allow_session` receipt read one judge): a leg with no session, or one whose session-occupant token cannot be read (the session store carries no execution seat — the engine's default in-memory store), carries it too; the card carries it IFF a click on `allow_session` receipts `rememberApplied: false` (a write failure or an ambiguous commit is known only after the decision settles and is still reported on the receipt alone). ABSENT = remember works on this card, OR an older server (<= 7.115.x never carries the key) — and on <= 7.149.x ABSENT is also what those two leg shapes showed while `allow_session` still receipted `false`, so "absent = remembered" does not hold there for them. Same bit on the live frame, the `approval_request` card (= `card_json`, incl. the reconnect replay), the `livePending` row, and the `/v1/approvals` `pending[]` row (+ their `/stream` frames); NOT on inbox rows.
|
|
20459
20516
|
governanceForced:
|
|
20460
20517
|
type: boolean
|
|
20461
20518
|
enum: [true]
|
|
@@ -21600,9 +21657,15 @@ components:
|
|
|
21600
21657
|
through GET /v1/runs/:id/events — and there it IS registered, as the closed `Event_question` /
|
|
21601
21658
|
`Event_question_complete` arms (keep the key sets mirrored; a gate enforces it).
|
|
21602
21659
|
Respond via POST /v1/questions/{questionId}/respond. 🔴 An UNANSWERED ask does NOT "fall back to the headless
|
|
21603
|
-
default"
|
|
21604
|
-
|
|
21605
|
-
|
|
21660
|
+
default". server >= 7.150.0: the landing reads ONE fact — did this delivery put the card up on this leg's LIVE face (the
|
|
21661
|
+
direct SSE write)? Shown, window spent, nobody answered ⇒ one FAILED question (no park, no second decider; coded
|
|
21662
|
+
`question.human_channel_failed` on an interactive stream, else the continue-on-your-judgment card with `reason: callback_failed`).
|
|
21663
|
+
Not shown (background / resumed leg whose card reached only the run ledger, a detach stream that dropped before the card,
|
|
21664
|
+
an unwritable open frame, the concurrency / total cap, an over-cap payload, a leg with no question context) ⇒ no answer
|
|
21665
|
+
obtained: a DURABLE deployment PARKS a checkpoint (an operator answers via decide with `answer`), a non-durable deployment
|
|
21666
|
+
continues on the `declined_unavailable` synthetic-continuation card. `permissionMode: dontAsk` is outside the table: on a DURABLE
|
|
21667
|
+
deployment the engine's mode table refuses the ask (no card, no park, tool not executed); a non-durable deployment is unchanged today.
|
|
21668
|
+
The run never hangs either way.
|
|
21606
21669
|
required: [type, questionId]
|
|
21607
21670
|
additionalProperties: true
|
|
21608
21671
|
properties:
|
|
@@ -21611,11 +21674,11 @@ components:
|
|
|
21611
21674
|
questions:
|
|
21612
21675
|
type: array
|
|
21613
21676
|
items: { $ref: '#/components/schemas/AskQuestion' }
|
|
21614
|
-
description: '"question" only: the model''s structured questions, secret-redacted. UNTRUSTED — never re-feed to a model. Absent on an over-cap payload — and then NO frame is emitted at all: the
|
|
21677
|
+
description: '"question" only: the model''s structured questions, secret-redacted. UNTRUSTED — never re-feed to a model. Absent on an over-cap payload — and then NO frame is emitted at all: no card was shown, so the landing is "no answer obtained" (see this schema''s description).'
|
|
21615
21678
|
outcome:
|
|
21616
21679
|
type: string
|
|
21617
21680
|
enum: [answered, unanswered]
|
|
21618
|
-
description: '"question_complete" only: `answered` = a human responded; `unanswered` = ttl/abort/throttle released it
|
|
21681
|
+
description: '"question_complete" only: `answered` = a human responded; `unanswered` = ttl/abort/throttle released it. Cosmetic dismiss reason only; never derive the run''s fate from it — on server >= 7.150.0 a question that WAS shown and went unanswered does not park, one that never reached the live face parks on a durable deployment.'
|
|
21619
21682
|
serverNowMs:
|
|
21620
21683
|
type: integer
|
|
21621
21684
|
description: 'server >= 7.3.0, ADDITIVE: the server-signed emit timestamp. A server-minted side-frame has no core-stream eventId to carry, so this is its own time coordinate. Absent on older servers.'
|
|
@@ -22026,9 +22089,9 @@ components:
|
|
|
22026
22089
|
GET /v1/runs/:id/events — that half is what this schema registers.
|
|
22027
22090
|
🔴 UNTRUSTED-for-display: `questions` is secret-redacted, render only, NEVER re-feed to a model.
|
|
22028
22091
|
`questions` absent ⇒ the payload exceeded the 16 KiB cap and was dropped — and then NO frame is emitted
|
|
22029
|
-
at all: the
|
|
22030
|
-
checkpoint
|
|
22031
|
-
synthetic-continuation card. It does NOT "headless-default".
|
|
22092
|
+
at all: no card was shown, so the landing is "no answer obtained" (server >= 7.150.0: a DURABLE deployment
|
|
22093
|
+
PARKS a checkpoint at once, without waiting out the window; a non-durable one continues via the
|
|
22094
|
+
`declined_unavailable` synthetic-continuation card). It does NOT "headless-default".
|
|
22032
22095
|
additionalProperties: false
|
|
22033
22096
|
required: [type, questionId]
|
|
22034
22097
|
properties:
|
|
@@ -22048,7 +22111,7 @@ components:
|
|
|
22048
22111
|
type: integer
|
|
22049
22112
|
description: >
|
|
22050
22113
|
server >= 7.39.0, OPEN frame only: the coordinator's OWN answer window (`QUESTION_TTL_MS`, default 5 minutes) — at expiry the ask is
|
|
22051
|
-
released
|
|
22114
|
+
released (`unanswered`); on server >= 7.150.0 whether the run then parks reads whether the card was shown on the leg's live face. Minted from the SAME ttl the release timer arms
|
|
22052
22115
|
(one source, so a countdown rendered from it never disagrees with the release). Relative; with `expiresAtMs` and `serverNowMs` it is a
|
|
22053
22116
|
clock-skew-proof trio.
|
|
22054
22117
|
expiresAtMs:
|
|
@@ -22058,10 +22121,10 @@ components:
|
|
|
22058
22121
|
type: object
|
|
22059
22122
|
description: >
|
|
22060
22123
|
AskUserQuestion CLOSE frame (dialog-dismiss signal). `answered` = a human responded; `unanswered` =
|
|
22061
|
-
ttl / abort / throttle released it
|
|
22062
|
-
|
|
22063
|
-
|
|
22064
|
-
|
|
22124
|
+
ttl / abort / throttle released it. Cosmetic dismiss reason — it does not itself change the run's status, and
|
|
22125
|
+
the run's fate must never be derived from it (server >= 7.150.0: a question that WAS shown and went unanswered
|
|
22126
|
+
does not park; one that never reached the live face parks on a durable deployment; the old "the model got the
|
|
22127
|
+
headless default" reading is wrong).
|
|
22065
22128
|
additionalProperties: false
|
|
22066
22129
|
required: [type, questionId]
|
|
22067
22130
|
properties:
|
|
@@ -23304,6 +23367,10 @@ components:
|
|
|
23304
23367
|
and the `GET /v1/sessions/{sessionId}/mcp` panel's `servers[]` (the panel row carries no `errorCode`, so presence there reads "this server is unauthorized"). ONLY the closed word `reason` leaves the server: the engine record's two
|
|
23305
23368
|
addresses (`authorizeUrl` — only ever from the deployment's authorization seat, which this deployment does not have — and `resourceMetadataUrl`, which the remote self-reports in its challenge header and is untrusted) never go on the wire.
|
|
23306
23369
|
A record whose word is outside the set, or that is not an object, is absent as a whole (the weakest claim, no minted word). The user-facing "go authorize" is the session notice `mcp.authorization_required`.
|
|
23370
|
+
server >= 7.150.0: every projection face of the record reads this one disposition table — the three faces above, plus the session history (`GET /v1/sessions/{sessionId}` `messages[].details.authorization`, a tool-result card whose `details.code` is
|
|
23371
|
+
`unauthorized`) and `tool_end.structured.authorization` (`GET /v1/runs/{runId}/events` and SSE `tool_end`, a self-registered card whose `structured.code` is `unauthorized`): both carry ONLY `{ reason }`. On <= 7.149.x the history also carried the remote's
|
|
23372
|
+
self-reported `resourceMetadataUrl` and `tool_end.structured.authorization` carried any card member that passed the text redactor; neither member is declared by this contract (`details` / `structured` are open bags), so a reader of
|
|
23373
|
+
`authorization.resourceMetadataUrl` there reads `undefined` on >= 7.150.0. No knob.
|
|
23307
23374
|
properties:
|
|
23308
23375
|
reason:
|
|
23309
23376
|
type: string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "39.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",
|