@sema-agent/sdk 36.0.0 → 37.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 +79 -3
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/control-types.d.ts +2 -2
- package/dist/errors.d.ts +39 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +42 -8
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +134 -3
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/health.d.ts +100 -10
- package/dist/health.d.ts.map +1 -1
- package/dist/health.js +13 -10
- package/dist/health.js.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/approvals.d.ts +4 -1
- package/dist/resources/approvals.d.ts.map +1 -1
- package/dist/resources/approvals.js +4 -1
- package/dist/resources/approvals.js.map +1 -1
- package/dist/resources/projects.d.ts +24 -0
- package/dist/resources/projects.d.ts.map +1 -0
- package/dist/resources/projects.js +19 -0
- package/dist/resources/projects.js.map +1 -0
- package/dist/resources/rules.d.ts +16 -11
- package/dist/resources/rules.d.ts.map +1 -1
- package/dist/resources/rules.js +2 -2
- package/dist/resources/rules.js.map +1 -1
- package/dist/resources/runs.d.ts +4 -2
- package/dist/resources/runs.d.ts.map +1 -1
- package/dist/resources/runs.js +4 -2
- package/dist/resources/runs.js.map +1 -1
- package/dist/resources/sessions.d.ts +43 -1
- package/dist/resources/sessions.d.ts.map +1 -1
- package/dist/resources/sessions.js +8 -0
- package/dist/resources/sessions.js.map +1 -1
- package/dist/resources/tool-approvals.d.ts +7 -6
- package/dist/resources/tool-approvals.d.ts.map +1 -1
- package/dist/resources/tool-approvals.js.map +1 -1
- package/dist/settings.d.ts +6 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/sse.d.ts +14 -4
- package/dist/sse.d.ts.map +1 -1
- package/dist/sse.js +23 -7
- package/dist/sse.js.map +1 -1
- package/dist/sync.d.ts +8 -4
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +6 -3
- package/dist/sync.js.map +1 -1
- package/dist/transport.d.ts +29 -5
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +29 -18
- package/dist/transport.js.map +1 -1
- package/dist/types.d.ts +261 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -1
- package/openapi.yaml +592 -39
- package/package.json +2 -2
package/openapi.yaml
CHANGED
|
@@ -895,8 +895,14 @@ paths:
|
|
|
895
895
|
summary: Steer a RUNNING durable run — inject mid-flight direction (supervision).
|
|
896
896
|
description: >
|
|
897
897
|
design/80 D-A. The core of *supervision* (vs mere approve/deny): inject direction into a running run.
|
|
898
|
-
AT-MOST-ONCE — steer is NOT idempotent (no retry). `trusted` is NOT a body field
|
|
899
|
-
|
|
898
|
+
AT-MOST-ONCE — steer is NOT idempotent (no retry). `trusted` is NOT a body field, and the caller's role does
|
|
899
|
+
not change how the text reaches the model (server >= 7.147.0): the body is ALWAYS delivered as USER input,
|
|
900
|
+
whether or not the caller is an operator — on the live leg the engine's "new message from the user while you
|
|
901
|
+
were working" section (a user message), on the parked / wake legs the engine's fenced data section
|
|
902
|
+
(`<<<UNTRUSTED supervisor steering message …>>>`) in the resumed run's first turn; never a `<system-reminder>`.
|
|
903
|
+
Operator identity only decides AUTHORIZATION (reaching another owner's run past the owner gate). The only text
|
|
904
|
+
delivered as system input is text the service itself mints (the `/decide` pointer text for a still-parked
|
|
905
|
+
workflow host). Servers <= 7.146.x minted an operator's steer body as a `<system-reminder>`. A
|
|
900
906
|
durably PARKED run (row status `suspended` OR `needs_review`) → the steer is PARKED on the pending
|
|
901
907
|
checkpoint and answered **202** `{status:<the row status the server read just before parking>,
|
|
902
908
|
delivery:"queued"}`; it is injected when the run resumes. (server 7.16.0: `status` echoes the REAL
|
|
@@ -2447,7 +2453,11 @@ paths:
|
|
|
2447
2453
|
`task_done` checkpoint and resume it as the next turn's input. This is NOT a gate decision: it never
|
|
2448
2454
|
allows/denies a pending action — a pending gate ⇒ 409 `wake.gate_pending` (resolve through that gate's
|
|
2449
2455
|
own decide entry; approvals are never bypassed). Empty park + no message ⇒ nothing to deliver.
|
|
2450
|
-
Owner-scoped
|
|
2456
|
+
Owner-scoped. The `message` is ALWAYS delivered as USER input (server >= 7.147.0), whether or not the caller is
|
|
2457
|
+
an operator: the resumed turn reads it in the engine's fenced data section
|
|
2458
|
+
(`<<<UNTRUSTED supervisor steering message …>>>`), never as a `<system-reminder>` (servers <= 7.146.x minted an
|
|
2459
|
+
operator's message as one). Operator identity only decides AUTHORIZATION (an explicit operator passes the owner
|
|
2460
|
+
gate). Resume
|
|
2451
2461
|
burns model budget — rate/quota/lease gates apply. 501 without the checkpoint store.
|
|
2452
2462
|
requestBody:
|
|
2453
2463
|
required: false
|
|
@@ -4609,6 +4619,114 @@ paths:
|
|
|
4609
4619
|
schema: { $ref: '#/components/schemas/PolicyInfo' }
|
|
4610
4620
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
4611
4621
|
|
|
4622
|
+
/v1/projects:
|
|
4623
|
+
parameters:
|
|
4624
|
+
- $ref: '#/components/parameters/PrincipalHeader'
|
|
4625
|
+
get:
|
|
4626
|
+
tags: [projects]
|
|
4627
|
+
operationId: projectsList
|
|
4628
|
+
x-status: live # server >= 7.147.0 (contract GET /v1/projects). SDK projects.list().
|
|
4629
|
+
summary: List the project registry (read-only).
|
|
4630
|
+
description: >
|
|
4631
|
+
server >= 7.147.0 — the project registry's LIST face. The registry is published ONLY by the configuration center: a deployment with no center leg applying configuration has no registry
|
|
4632
|
+
and answers 501 `capability.unavailable` (capability bit `projects === false` reads the same fact — gate on the bit, never trial-by-501; ABSENT bit = an older server, both faces 404).
|
|
4633
|
+
Visibility fails closed: a fleet caller sees every registration; a caller with a verified principal sees only the registrations whose `registeredBy` is itself; no identity => 401.
|
|
4634
|
+
Archived registrations (`archivedAt` present) are NOT listed by default; `?archived=true` lists ONLY the archived ones; `?archived=false` = the default; any other value => 400 `request.query_invalid`.
|
|
4635
|
+
There is no write verb (create / update / archive answer 405 + `Allow: GET` today; a write face will get its own capability bit).
|
|
4636
|
+
parameters:
|
|
4637
|
+
- in: query
|
|
4638
|
+
name: archived
|
|
4639
|
+
required: false
|
|
4640
|
+
schema: { type: string, enum: ['true', 'false'] }
|
|
4641
|
+
responses:
|
|
4642
|
+
'200':
|
|
4643
|
+
description: The visible registrations (possibly empty).
|
|
4644
|
+
content:
|
|
4645
|
+
application/json:
|
|
4646
|
+
schema: { $ref: '#/components/schemas/ProjectsPage' }
|
|
4647
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
4648
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
4649
|
+
'501': { $ref: '#/components/responses/NotImplemented' }
|
|
4650
|
+
/v1/projects/{projectId}:
|
|
4651
|
+
parameters:
|
|
4652
|
+
- $ref: '#/components/parameters/PrincipalHeader'
|
|
4653
|
+
- in: path
|
|
4654
|
+
name: projectId
|
|
4655
|
+
required: true
|
|
4656
|
+
schema: { type: string }
|
|
4657
|
+
get:
|
|
4658
|
+
tags: [projects]
|
|
4659
|
+
operationId: projectsGet
|
|
4660
|
+
x-status: live # server >= 7.147.0. SDK projects.get().
|
|
4661
|
+
summary: Read one registration (archived or not).
|
|
4662
|
+
description: >
|
|
4663
|
+
server >= 7.147.0 — one registry row (the same projection as a `GET /v1/projects` list row, key for key). Answers whether or not the registration is archived (a session row references it by id).
|
|
4664
|
+
`:projectId` must be a canonical UUID (an upper-case form is accepted and folded to lower case), else 400 `request.id_invalid`. 404 `not_found.project` = no such registration OR one the caller may not see — the two
|
|
4665
|
+
arms answer the same code and sentence (no existence oracle). 501 `capability.unavailable` = no registry on this deployment (see the list face). The session-to-project relation is read on the session view's top-level `projectId`.
|
|
4666
|
+
responses:
|
|
4667
|
+
'200':
|
|
4668
|
+
description: The registration row.
|
|
4669
|
+
content:
|
|
4670
|
+
application/json:
|
|
4671
|
+
schema: { $ref: '#/components/schemas/ProjectRow' }
|
|
4672
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
4673
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
4674
|
+
'404': { $ref: '#/components/responses/NotFound' }
|
|
4675
|
+
'501': { $ref: '#/components/responses/NotImplemented' }
|
|
4676
|
+
/v1/sessions/{sessionId}/rewind-files:
|
|
4677
|
+
parameters:
|
|
4678
|
+
- $ref: '#/components/parameters/PrincipalHeader'
|
|
4679
|
+
- in: path
|
|
4680
|
+
name: sessionId
|
|
4681
|
+
required: true
|
|
4682
|
+
schema: { type: string }
|
|
4683
|
+
post:
|
|
4684
|
+
tags: [sessions]
|
|
4685
|
+
operationId: sessionsRewindFiles
|
|
4686
|
+
x-status: live # server >= 7.147.0 (contract section 28). SDK sessions.rewindFiles().
|
|
4687
|
+
summary: Restore the session's tracked files to an older boundary, outside any run (code only).
|
|
4688
|
+
description: >
|
|
4689
|
+
server >= 7.147.0 (contract section 28) — the CC "Restore code" arm as an immediate door: NO model call, NO session entry written, NO conversation fork — it only converges the session's TRACKED files (the ones the agent changed through
|
|
4690
|
+
Edit / Write / NotebookEdit; the same tracked set as the submit body's `restoreFiles` / `rewindFilesTo`) to an older boundary. The restore itself happens in the engine's out-of-run verb; this service does auth, handle translation,
|
|
4691
|
+
deployment-shape and occupancy checks, and pass-through. Body `{ to, dryRun? }` is closed (shape before value): not an object / no `to` / a key outside the set (including `acceptPartialRestore`, which belongs to the submit body's run
|
|
4692
|
+
seat) => 400 `request.body_shape`. `to` = a rewind handle (a prompt's `taskId`, the session view's `messages[].taskId`), 1..255 chars. `dryRun: true` previews only (no file written).
|
|
4693
|
+
200 is the engine's `RewindFilesResult` verbatim, told apart by `dryRun`: `{ dryRun: true, preview }` where `preview` is `{ filesChanged, insertions, deletions }` OR `null` ("this deployment cannot give stats" — NOT "nothing would change");
|
|
4694
|
+
`{ dryRun: false, restore }` with the per-file ledger (`outcome` is `complete` or `partial`; a partial restore is a 200 listing every refused / failed file, and re-sending the same request keeps converging).
|
|
4695
|
+
Gate order: 429 `limit.rate_exceeded` -> capability facts (501) -> id shape (400) -> session head (404) -> owner or explicit operator (a stranger and "no such session" answer byte-identical 404) -> corrupt archive (500) -> body (400)
|
|
4696
|
+
-> the one execution-start resolver (read-only mirror 409 `conflict.session_mirror` + `forkPath`; `conflict.fork_in_progress`; `conflict.session_id_retired`; `execution_lane.not_served` + `boundLane`) -> workspace root (host lane: 409
|
|
4697
|
+
`conflict.session_workspace_unknown`) -> `to` resolution (404 `rewind_files_to.unknown_event`) -> the durable claim (409 `conflict.session_active_run` with `activeTaskId`) -> the engine. Not billed.
|
|
4698
|
+
Probe with the capability bits `sessionRewindFiles` / `sessionRewindFilesPreview`; an ABSENT bit = an older server (404 `not_found.route`). The SDK does not auto-retry (a POST with no idempotency key).
|
|
4699
|
+
requestBody:
|
|
4700
|
+
required: true
|
|
4701
|
+
content:
|
|
4702
|
+
application/json:
|
|
4703
|
+
schema: { $ref: '#/components/schemas/SessionRewindFilesRequest' }
|
|
4704
|
+
responses:
|
|
4705
|
+
'200':
|
|
4706
|
+
description: The engine's rewind result, told apart by `dryRun`.
|
|
4707
|
+
content:
|
|
4708
|
+
application/json:
|
|
4709
|
+
schema: { $ref: '#/components/schemas/SessionRewindFilesResult' }
|
|
4710
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
4711
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
4712
|
+
'404': { $ref: '#/components/responses/NotFound' }
|
|
4713
|
+
'409':
|
|
4714
|
+
description: >-
|
|
4715
|
+
Told apart by `errorCode` (all `ConflictError`): `conflict.session_active_run` (body `activeTaskId` — the run holding the session's durable claim, including one parked on an approval; wait or cancel it, then resend);
|
|
4716
|
+
`rewind.session_busy` (TRANSIENT — this engine process has work running / queued on the session or a write it issued has not settled; nothing was touched; resend after it ends);
|
|
4717
|
+
`conflict.session_workspace_unknown` (host lane — this process does not know the session's restorable working directory: the submit body's `cwd` is registered inside the server process and is gone after a server restart until the
|
|
4718
|
+
next submit that carries `cwd`, or the registered directory is no longer on disk; real restore and `dryRun` judge the same, nothing written, the sentence never echoes a path — send a submit with `cwd` first, then resend);
|
|
4719
|
+
`rewind.files_env_unsupported` / `rewind.store_unconfigured` (no filesystem-mounting execution environment / no file-history store — the capability bit is false and the door answers 501 first; these rows are completeness: change the deployment);
|
|
4720
|
+
plus the shared execution-start refusals (`conflict.session_mirror` + `forkPath`, `conflict.fork_in_progress`, `conflict.session_id_retired`, `execution_lane.not_served` + `boundLane`).
|
|
4721
|
+
content:
|
|
4722
|
+
application/json:
|
|
4723
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
4724
|
+
'422':
|
|
4725
|
+
description: '`rewind_snapshot.unresolvable` — that entry has no usable file-history boundary (never minted, evicted by retention, or unreadable).'
|
|
4726
|
+
content:
|
|
4727
|
+
application/json:
|
|
4728
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
4729
|
+
'501': { $ref: '#/components/responses/NotImplemented' }
|
|
4612
4730
|
/v1/models:
|
|
4613
4731
|
parameters:
|
|
4614
4732
|
- $ref: '#/components/parameters/PrincipalHeader'
|
|
@@ -6616,10 +6734,10 @@ paths:
|
|
|
6616
6734
|
🔴 SETTLE RULE (server >= 7.145.0, one rule for both redeem doors — cc-import and local-import answer the SAME receipt from ONE mint point):
|
|
6617
6735
|
when the redemption walk completes with the engine's COMPLETE member table, the redemption settles — `200` + the receipt
|
|
6618
6736
|
`RuleImportReceipt` `{ members, rev }`, one row per member in the engine's walk order. A member the engine refused is a row with
|
|
6619
|
-
outcome `indeterminate`
|
|
6620
|
-
|
|
6737
|
+
outcome `indeterminate` (it is NOT KNOWN whether it landed) or `refused` (KNOWN not written; server >= 7.146.0) — both carry `reason` (the engine's `RuleRefusalCode` verbatim; a 7.145.x server's one word is `store_refused`) + `detail` (the engine's sentence verbatim); see the `RuleImportMember`
|
|
6738
|
+
schema for the arm definitions (one definition). The ticket is
|
|
6621
6739
|
USED (the same ticket again ⇒ 404). Reconcile against `GET /v1/rules` by `key` (the identity triple of a listing row); to fill a gap,
|
|
6622
|
-
run a fresh import (idempotent — landed members read `no-op`).
|
|
6740
|
+
run a fresh import (idempotent — landed members read `no-op`).
|
|
6623
6741
|
<= 7.144.x answered such a member with 503 `state.rule_import_retry` until the ticket expired, with the old body `{ result: { members, rev } }` (retired, no alias).
|
|
6624
6742
|
requestBody:
|
|
6625
6743
|
required: true
|
|
@@ -8524,10 +8642,9 @@ components:
|
|
|
8524
8642
|
stripped), accepted on EVERY lane and deployment. ABSENT = the default scrub AND clears the session's previous
|
|
8525
8643
|
declaration (not sticky). Verdicts (all three submit doors): out-of-vocabulary ⇒ 400 `request.field_invalid` (the sentence
|
|
8526
8644
|
names both words); `all` on a non-host lane (e2b / k8s / local-docker / ssh / adb / device / `none`; the no-execution-environment lane was `in-process` on servers <= 7.146.x) ⇒ 400
|
|
8527
|
-
`request.field_invalid` "applies to the host lane only" (`scrub` still accepted); `
|
|
8528
|
-
400 `request.field_invalid`; hosted deployment (`REQUIRE_PRINCIPAL=true`) × `all` ⇒ 422 `request.host_posture_refused`
|
|
8645
|
+
`request.field_invalid` "applies to the host lane only" (`scrub` still accepted); hosted deployment (`REQUIRE_PRINCIPAL=true`) × `all` ⇒ 422 `request.host_posture_refused`
|
|
8529
8646
|
(same code / status as the write-containment leg; reach = `hostPostureDeclarationsHonored`, NOT
|
|
8530
|
-
`TASK_WRITE_FACE_ESCALATION`); resume legs replay the persisted body under the same
|
|
8647
|
+
`TASK_WRITE_FACE_ESCALATION`); resume legs replay the persisted body under the same lane and hosted-deployment checks, folded into 409
|
|
8531
8648
|
`resume_blocked_by_policy`; servers <= 7.105.0 ⇒ 400 `request.body_shape` (unknown key, `unknownKeys: ["inheritEnv"]`).
|
|
8532
8649
|
READ `capabilities.projectContext` BEFOREHAND (host lane ∧ not hosted — equal to this key's lane + reach gates for every
|
|
8533
8650
|
combination); `taskWriteFaceOpen` is NOT its reading. Residual (server S-908): the binding is keyed by SESSION and written
|
|
@@ -10391,6 +10508,34 @@ components:
|
|
|
10391
10508
|
allOf: [{ $ref: '#/components/schemas/CredentialPlaneCapability' }]
|
|
10392
10509
|
description: >-
|
|
10393
10510
|
server >= 7.137.0 (config-dependent; the object is always present): the member git credential plane's one reading — see `CredentialPlaneCapability`. ABSENT = an older server: render "plane off, reason unknown".
|
|
10511
|
+
settingsContract:
|
|
10512
|
+
allOf: [{ $ref: '#/components/schemas/SettingsContractCapability' }]
|
|
10513
|
+
description: >-
|
|
10514
|
+
server >= 7.147.0 (a version bit: always present, does not vary with the deployment shape) — the embedded settings contract's version and, per hook entry type, the field names its reader carries; see `SettingsContractCapability`.
|
|
10515
|
+
Listed is not executed (`mcp_tool` is refused whole). ABSENT = server <= 7.146.x: no such table.
|
|
10516
|
+
projects:
|
|
10517
|
+
type: boolean
|
|
10518
|
+
description: >-
|
|
10519
|
+
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
|
|
10520
|
+
(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).
|
|
10521
|
+
sessionRewindFiles:
|
|
10522
|
+
type: boolean
|
|
10523
|
+
description: >-
|
|
10524
|
+
server >= 7.147.0 (facility + config): `POST /v1/sessions/{id}/rewind-files` resolves on this deployment = file-history store ∧ session head read ∧ anchor store ∧ an execution lane with hands ∧ a workspace that survives one
|
|
10525
|
+
execution (multi-tenant host / local-docker / e2b / k8s are false) ∧ the session store is owned by this process (`DB_BACKEND=local`; mysql / pg are false). False => the door answers 501. `FILE_HISTORY_CAPTURE=false` does not affect it.
|
|
10526
|
+
Distinct from `rewindFilesTo` (rewind as part of a submit, running a run). ABSENT = an older server (the door 404s).
|
|
10527
|
+
sessionRewindFilesPreview:
|
|
10528
|
+
type: boolean
|
|
10529
|
+
description: >-
|
|
10530
|
+
server >= 7.147.0: the previous bit ∧ the store implements `diffStats` (local files: true; the SQL twins: false today). False is NOT "dryRun refused": dryRun is accepted and answers `preview: null`. ABSENT = an older server.
|
|
10531
|
+
adoptionImport:
|
|
10532
|
+
allOf: [{ $ref: '#/components/schemas/AdoptionImportCapability' }]
|
|
10533
|
+
description: >-
|
|
10534
|
+
server >= 7.146.0 (present-iff, per caller): the adoption batch import door is usable by THIS caller — deployment has the adoption log ∧ the session store has staged import ∧ the caller is, verbatim, the source principal of an adopted row.
|
|
10535
|
+
ABSENT = an older worker, or this caller has nothing to import today (same action: do not offer the import entry).
|
|
10536
|
+
engine:
|
|
10537
|
+
allOf: [{ $ref: '#/components/schemas/EngineCapability' }]
|
|
10538
|
+
description: 'server >= 7.146.0 (always present): the engine lifecycle face — see EngineCapability. ABSENT = an older worker (no handover lane).'
|
|
10394
10539
|
inherit_env.own_credential_values_withheld:
|
|
10395
10540
|
type: boolean
|
|
10396
10541
|
description: >-
|
|
@@ -10946,6 +11091,7 @@ components:
|
|
|
10946
11091
|
outputStyle: { type: boolean }
|
|
10947
11092
|
env: { type: boolean, description: 'TRUE on the single-user host lane (server emits `cwdHonored(config)`). It is NOT hard-coded false any more — the old always-false value predated the per-task shellEnv seam and hid a live capability.' }
|
|
10948
11093
|
hooks: { type: boolean, description: 'Single-user deployments only (`requirePrincipal !== true`).' }
|
|
11094
|
+
autoCompactEnabled: { type: boolean, description: 'server >= 7.146.0, constant true — the request key `settings.autoCompactEnabled` (boolean; handed verbatim to the engine''s auto-compaction seat `compaction.autoCompact`; absent = the deployment seat''s default, i.e. on) is accepted. ABSENT = an older server (the key answers 400 `request.body_shape`).' }
|
|
10949
11095
|
pluginHooks: { type: boolean, description: 'server >= 7.133.0 — the request `settings.hooks[]` PLUGIN-CONTEXT keys (command entry `plugin { name, root, dataDir?, options? }` / exec-form `args`) are accepted; same predicate as `hooks` (single-user true, multi-tenant false). ABSENT or false = the keys are stripped silently — send only on sight of the bit.' }
|
|
10950
11096
|
managedHookGroups: { type: boolean, description: 'server >= 7.133.0 — the request `settings.hooks[]` GROUP `source` key (managed lanes `managedPolicy` / `managedPlugin:<name>`) is accepted; same predicate as `hooks`. ABSENT or false = stripped silently (the managed-lane semantics do not apply, it is not a refusal).' }
|
|
10951
11097
|
httpHookAllowlists: { type: boolean, description: 'server >= 7.142.0 — the request keys `settings.allowedHttpHookUrls` / `settings.httpHookAllowedEnvVars` (the settings-schema package''s two http-hook allowlists) are read and enforced at the dial-out point. The SAME predicate as `hooks` (true on the single-user lane; false where `settings.hooks` is ignored). ABSENT = server <= 7.141.x, which answers 400 `request.body_shape` for those keys — send only on sight of the bit.' }
|
|
@@ -12884,9 +13030,269 @@ components:
|
|
|
12884
13030
|
compat:
|
|
12885
13031
|
$ref: '#/components/schemas/ModelCompat'
|
|
12886
13032
|
description: >-
|
|
12887
|
-
S-188 (server >=7.69.0, settings-schema >=1.10.0) — this row's wire-compatibility declaration for
|
|
12888
|
-
|
|
13033
|
+
S-188 (server >=7.69.0, settings-schema >=1.10.0) — this row's wire-compatibility declaration for ITS lane: five openai-completions keys, or (server >= 7.147.0) five anthropic-messages keys (before 7.147.0 that
|
|
13034
|
+
lane's declaration was dropped whole). ABSENT = this model declared nothing; see ModelCompat for the two causes of
|
|
12889
13035
|
absence and why absence must NOT be rendered as "the operator did not write one".
|
|
13036
|
+
thinkingLevelMap:
|
|
13037
|
+
$ref: '#/components/schemas/ModelThinkingLevelMap'
|
|
13038
|
+
description: >-
|
|
13039
|
+
server >= 7.147.0 (present-iff the catalog entry declared it; `{}` is carried as declared) — the row's per-rung endpoint spelling of thinking. Read the SAME row's `supportsThinkingOff` / `supportedEffortLevels` (the engine's reading of this
|
|
13040
|
+
declaration), never derive "can it be turned off" or "which rungs" from this key. On an anthropic-messages row the current engine does not read it (the row still carries it). The env deployment has no such seat.
|
|
13041
|
+
|
|
13042
|
+
AdoptionImportCapability:
|
|
13043
|
+
type: object
|
|
13044
|
+
description: >-
|
|
13045
|
+
server >= 7.146.0 — `Capabilities.adoptionImport`: the adoption batch import door (`POST /v1/adoption/{id}/sessions`) is usable by THIS caller. `adoptionId` is the `:id` in that URL (the caller's own adopted row);
|
|
13046
|
+
`maxSessions` / `maxSessionBytes` are the effective values of `ADOPTION_IMPORT_MAX_SESSIONS` (default 100) / `ADOPTION_IMPORT_MAX_SESSION_BYTES` (default 6291456, range 1048576..8388593).
|
|
13047
|
+
additionalProperties: true
|
|
13048
|
+
required: [adoptionId, maxSessions, maxSessionBytes]
|
|
13049
|
+
properties:
|
|
13050
|
+
adoptionId: { type: string }
|
|
13051
|
+
maxSessions: { type: integer, minimum: 1 }
|
|
13052
|
+
maxSessionBytes: { type: integer, minimum: 1048576, maximum: 8388593 }
|
|
13053
|
+
|
|
13054
|
+
EngineCapability:
|
|
13055
|
+
type: object
|
|
13056
|
+
description: >-
|
|
13057
|
+
server >= 7.146.0 — `Capabilities.engine`, the engine lifecycle face. `handover` is true iff the two handover-lane doors (`POST /v1/engine/handover` · `POST /v1/engine/attach`) resolve on this deployment
|
|
13058
|
+
(attach-lease leg assembled ∧ not multi-tenant ∧ the leg still observing); otherwise those doors answer 501 `capability.engine_handover_unavailable`.
|
|
13059
|
+
additionalProperties: true
|
|
13060
|
+
required: [handover]
|
|
13061
|
+
properties:
|
|
13062
|
+
handover: { type: boolean }
|
|
13063
|
+
|
|
13064
|
+
ProjectContextItem:
|
|
13065
|
+
type: object
|
|
13066
|
+
description: 'One context entry of a project registration: `folder` / `file` = an absolute host path, `note` = free text.'
|
|
13067
|
+
additionalProperties: true
|
|
13068
|
+
required: [kind, value]
|
|
13069
|
+
properties:
|
|
13070
|
+
kind: { type: string, enum: [folder, file, note] }
|
|
13071
|
+
value: { type: string }
|
|
13072
|
+
|
|
13073
|
+
ProjectRow:
|
|
13074
|
+
type: object
|
|
13075
|
+
description: >-
|
|
13076
|
+
server >= 7.147.0 — one project registry row: `{ id, ...the settings contract's ProjectRegistration keys under their own names }` (the same projection for a `GET /v1/projects` list row and the `GET /v1/projects/{projectId}` body;
|
|
13077
|
+
no `name` / `repos` / `createdAt` aliases). Optional keys are absent when not registered — no empty values are minted. `id` is the registry key (a lower-case canonical UUID — the same value as the submit body's `projectId` and the session
|
|
13078
|
+
view's `projectId`). `archivedAt` present = archived.
|
|
13079
|
+
additionalProperties: true
|
|
13080
|
+
required: [id, displayName, gitRemotes, defaultScopes, registeredBy, registeredAt]
|
|
13081
|
+
properties:
|
|
13082
|
+
id: { type: string }
|
|
13083
|
+
displayName: { type: string }
|
|
13084
|
+
goal: { type: string }
|
|
13085
|
+
contextItems: { type: array, items: { $ref: '#/components/schemas/ProjectContextItem' } }
|
|
13086
|
+
gitRemotes: { type: array, items: { type: string } }
|
|
13087
|
+
defaultScopes: { type: array, items: { type: string } }
|
|
13088
|
+
notes: { type: string }
|
|
13089
|
+
icon: { type: string }
|
|
13090
|
+
color: { type: string }
|
|
13091
|
+
registeredBy: { type: string }
|
|
13092
|
+
registeredAt: { type: string, format: date-time }
|
|
13093
|
+
archivedAt: { type: string, format: date-time }
|
|
13094
|
+
|
|
13095
|
+
ProjectsPage:
|
|
13096
|
+
type: object
|
|
13097
|
+
description: 'server >= 7.147.0 — the `GET /v1/projects` body: the visible registrations (always present, possibly empty).'
|
|
13098
|
+
additionalProperties: true
|
|
13099
|
+
required: [projects]
|
|
13100
|
+
properties:
|
|
13101
|
+
projects: { type: array, items: { $ref: '#/components/schemas/ProjectRow' } }
|
|
13102
|
+
|
|
13103
|
+
SessionRewindFilesRequest:
|
|
13104
|
+
type: object
|
|
13105
|
+
description: >-
|
|
13106
|
+
`POST /v1/sessions/{sessionId}/rewind-files` body (server >= 7.147.0), CLOSED — shape before value. There is no `acceptPartialRestore` (a partial restore answers 200 with the ledger).
|
|
13107
|
+
additionalProperties: false
|
|
13108
|
+
required: [to]
|
|
13109
|
+
properties:
|
|
13110
|
+
to: { type: string, minLength: 1, maxLength: 255, description: 'A rewind handle this server minted (a prompt''s taskId, or a message''s eventId) — the same handle space and the same reader as the submit body''s `rewindFilesTo`. Unknown => 404 `rewind_files_to.unknown_event`.' }
|
|
13111
|
+
dryRun: { type: boolean, description: 'true => preview only; no file is written. Absent = false.' }
|
|
13112
|
+
|
|
13113
|
+
SessionRewindFilesDiffStats:
|
|
13114
|
+
type: object
|
|
13115
|
+
description: 'The files a rewind changed / would change (engine `FileHistoryDiffStats`); `filesChanged` paths are verbatim (never truncated). A preview is an UPPER BOUND.'
|
|
13116
|
+
additionalProperties: true
|
|
13117
|
+
required: [filesChanged, insertions, deletions]
|
|
13118
|
+
properties:
|
|
13119
|
+
filesChanged: { type: array, items: { type: string } }
|
|
13120
|
+
insertions: { type: integer, minimum: 0 }
|
|
13121
|
+
deletions: { type: integer, minimum: 0 }
|
|
13122
|
+
|
|
13123
|
+
SessionRewindLedger:
|
|
13124
|
+
type: object
|
|
13125
|
+
description: >-
|
|
13126
|
+
The per-file restore ledger (engine `FileHistoryRestoreResult`; `outcome` is only `complete` or `partial` here — `failed` is a thrown engine refusal answered as an error code). `partial` lists EVERY refused / failed file;
|
|
13127
|
+
per-file idempotent. Free-text leaves pass the egress seat (paths one line, unbounded; reasons one line, bounded to 500 code units; credential-shaped spans masked).
|
|
13128
|
+
additionalProperties: true
|
|
13129
|
+
required: [outcome, filesChanged, identicalSkipped, refused, failed]
|
|
13130
|
+
properties:
|
|
13131
|
+
outcome: { type: string, enum: [complete, partial] }
|
|
13132
|
+
filesChanged: { type: array, items: { type: string } }
|
|
13133
|
+
identicalSkipped: { type: array, items: { type: string } }
|
|
13134
|
+
refused:
|
|
13135
|
+
type: array
|
|
13136
|
+
items:
|
|
13137
|
+
type: object
|
|
13138
|
+
additionalProperties: true
|
|
13139
|
+
required: [path, reason, class]
|
|
13140
|
+
properties:
|
|
13141
|
+
path: { type: string }
|
|
13142
|
+
reason: { type: string }
|
|
13143
|
+
class: { type: string, description: 'The engine''s closed word (`link_safety` / `base_unavailable` / `key_unresolvable`); read as an open set.' }
|
|
13144
|
+
failed:
|
|
13145
|
+
type: array
|
|
13146
|
+
items:
|
|
13147
|
+
type: object
|
|
13148
|
+
additionalProperties: true
|
|
13149
|
+
required: [path, reason]
|
|
13150
|
+
properties:
|
|
13151
|
+
path: { type: string }
|
|
13152
|
+
reason: { type: string }
|
|
13153
|
+
modeNotPreserved: { type: integer, minimum: 0, description: 'Files whose recorded POSIX mode could not be re-applied (an environment without the optional mode face).' }
|
|
13154
|
+
error: { $ref: '#/components/schemas/SessionRewindLedgerError' }
|
|
13155
|
+
|
|
13156
|
+
SessionRewindLedgerError:
|
|
13157
|
+
type: object
|
|
13158
|
+
description: 'A store fault on the ledger (present iff the store answered one). The engine''s `code` member is `errorCode` on this wire; `permanence` verbatim (absent = the store did not judge).'
|
|
13159
|
+
additionalProperties: true
|
|
13160
|
+
required: [errorCode, message]
|
|
13161
|
+
properties:
|
|
13162
|
+
errorCode: { type: string }
|
|
13163
|
+
message: { type: string }
|
|
13164
|
+
permanence: { type: string, enum: [transient, terminal] }
|
|
13165
|
+
|
|
13166
|
+
SessionRewindFilesPreviewResult:
|
|
13167
|
+
type: object
|
|
13168
|
+
description: 'The `dryRun: true` 200 body: `preview` is the stats, or null = this deployment gives no stats (NOT "nothing would change").'
|
|
13169
|
+
additionalProperties: true
|
|
13170
|
+
required: [dryRun, preview]
|
|
13171
|
+
properties:
|
|
13172
|
+
dryRun: { const: true }
|
|
13173
|
+
preview:
|
|
13174
|
+
oneOf:
|
|
13175
|
+
- { $ref: '#/components/schemas/SessionRewindFilesDiffStats' }
|
|
13176
|
+
- { type: 'null' }
|
|
13177
|
+
|
|
13178
|
+
SessionRewindFilesRestoreResult:
|
|
13179
|
+
type: object
|
|
13180
|
+
description: 'The `dryRun: false` (default) 200 body: `restore` is the per-file ledger.'
|
|
13181
|
+
additionalProperties: true
|
|
13182
|
+
required: [dryRun, restore]
|
|
13183
|
+
properties:
|
|
13184
|
+
dryRun: { const: false }
|
|
13185
|
+
restore: { $ref: '#/components/schemas/SessionRewindLedger' }
|
|
13186
|
+
|
|
13187
|
+
SessionRewindFilesResult:
|
|
13188
|
+
description: 'server >= 7.147.0 — the engine''s `RewindFilesResult` verbatim, discriminated by `dryRun`.'
|
|
13189
|
+
oneOf:
|
|
13190
|
+
- { $ref: '#/components/schemas/SessionRewindFilesPreviewResult' }
|
|
13191
|
+
- { $ref: '#/components/schemas/SessionRewindFilesRestoreResult' }
|
|
13192
|
+
|
|
13193
|
+
ModelThinkingLevelMap:
|
|
13194
|
+
type: object
|
|
13195
|
+
description: >-
|
|
13196
|
+
server >= 7.147.0 — one row's per-rung endpoint spelling of thinking, the catalog entry's `thinkingLevelMap` verbatim: keys ⊆ `off|minimal|low|medium|high|xhigh|max`, values a non-empty string (what that rung sends to the endpoint)
|
|
13197
|
+
or `null` (the endpoint does not support that rung). `{}` = declared, no overrides.
|
|
13198
|
+
additionalProperties: false
|
|
13199
|
+
properties:
|
|
13200
|
+
off: { type: [string, 'null'], minLength: 1 }
|
|
13201
|
+
minimal: { type: [string, 'null'], minLength: 1 }
|
|
13202
|
+
low: { type: [string, 'null'], minLength: 1 }
|
|
13203
|
+
medium: { type: [string, 'null'], minLength: 1 }
|
|
13204
|
+
high: { type: [string, 'null'], minLength: 1 }
|
|
13205
|
+
xhigh: { type: [string, 'null'], minLength: 1 }
|
|
13206
|
+
max: { type: [string, 'null'], minLength: 1 }
|
|
13207
|
+
|
|
13208
|
+
PayloadTruncated:
|
|
13209
|
+
type: object
|
|
13210
|
+
description: >-
|
|
13211
|
+
server >= 7.147.0 — present iff a PARKED REDELIVERY frame (idle-time arrival, drained at the next stream open) exceeded the inbox byte budget (65,535 UTF-8 bytes of the serialized extension keys on the narrowest backend) and was
|
|
13212
|
+
replaced by its MINIMAL form: dedup-key positions + the attribution side-record (when it still fits) + `summary` + `injected:false` (`task_notification`) / `runId` `status` `summary` (`workflow_complete`). Every other key is absent. Presence = the frame is not the full form.
|
|
13213
|
+
additionalProperties: true
|
|
13214
|
+
required: [droppedKeys, bytes]
|
|
13215
|
+
properties:
|
|
13216
|
+
droppedKeys: { type: array, items: { type: string }, description: 'The dropped key names in the full form''s key order (the last one is `summary` when the side-record did not fit either).' }
|
|
13217
|
+
bytes: { type: integer, minimum: 0, description: 'The UTF-8 byte count of the full form''s extension keys.' }
|
|
13218
|
+
|
|
13219
|
+
SemaPeerNotice:
|
|
13220
|
+
type: object
|
|
13221
|
+
description: >-
|
|
13222
|
+
server >= 7.147.0 — the typed body of a receipt / idle card (`_sema_provenance.peerMeta.notice`). `state` is an OPEN string, verbatim (receipts `held` / `held_by_policy` / `denied` / `expired` / `delivered` / `refused` / `dropped`; idle
|
|
13223
|
+
`idle` / `exited` / `unavailable` / `expired`; out-of-vocabulary words pass through). `recipient` / `target` / `detail` / `dropReason` are redacted.
|
|
13224
|
+
additionalProperties: true
|
|
13225
|
+
required: [state]
|
|
13226
|
+
properties:
|
|
13227
|
+
state: { type: string }
|
|
13228
|
+
refSeq: { type: integer }
|
|
13229
|
+
recipient: { type: string }
|
|
13230
|
+
dropReason: { type: string }
|
|
13231
|
+
finishedAt: { type: number }
|
|
13232
|
+
detail: { type: string }
|
|
13233
|
+
target: { type: string }
|
|
13234
|
+
|
|
13235
|
+
SemaPeerMeta:
|
|
13236
|
+
type: object
|
|
13237
|
+
description: >-
|
|
13238
|
+
server >= 7.147.0 — the typed peer metadata of a session-inbox record (the engine's authoritative copy); identity / addressing strings verbatim. NEVER projected (credential / identity-token class): `senderKey`, `gateReceiptId`, `occupant`, `fromOccupant`.
|
|
13239
|
+
additionalProperties: true
|
|
13240
|
+
properties:
|
|
13241
|
+
fromSession: { type: string }
|
|
13242
|
+
fromRoot: { type: string }
|
|
13243
|
+
fromMode: { type: string, enum: [bypass, prompting] }
|
|
13244
|
+
kind: { type: string, description: 'Open set; today `peer_message` / `idle_notice` / `delivery_notice` / `idle_subscription` / `engine_frame`.' }
|
|
13245
|
+
fromScope: { type: string }
|
|
13246
|
+
notice: { $ref: '#/components/schemas/SemaPeerNotice' }
|
|
13247
|
+
urgent: { type: boolean }
|
|
13248
|
+
|
|
13249
|
+
SemaProvenance:
|
|
13250
|
+
type: object
|
|
13251
|
+
description: >-
|
|
13252
|
+
The `task_notification._sema_provenance` attribution side-record — typed attribution, never model text. `kind` is CLOSED (server passes all four core lane words; an out-of-vocabulary value drops the WHOLE key and counts
|
|
13253
|
+
`server.trace.projection-input-malformed`, which on the wire is the same as absent). Present together with its carrier (`agentMessage` / `crossSessionMessage` / `crossSessionNotice` / `inboxNotice`) on a full-form frame; the ONE exception is the minimal form of a parked redelivery frame (`payloadTruncated` present): the carrier is dropped whole and this side-record is kept (attribution travels with the text), so read the carrier only after checking it is there.
|
|
13254
|
+
additionalProperties: true
|
|
13255
|
+
required: [kind, from, taskId, seq]
|
|
13256
|
+
properties:
|
|
13257
|
+
kind: { type: string, enum: [agent_message, cross_session_message, cross_session_notice, inbox_notice] }
|
|
13258
|
+
from: { type: string }
|
|
13259
|
+
taskId: { type: string }
|
|
13260
|
+
seq: { type: integer }
|
|
13261
|
+
agentType: { type: string }
|
|
13262
|
+
peerMeta: { $ref: '#/components/schemas/SemaPeerMeta' }
|
|
13263
|
+
|
|
13264
|
+
TaskNotificationCrossSessionMessage:
|
|
13265
|
+
type: object
|
|
13266
|
+
description: 'server >= 7.147.0 — a message from a peer session. `from` (canonical encoded address), `fromSession`, `fromScope` verbatim; `fromName` and `body` (UNTRUSTED peer text) are redacted.'
|
|
13267
|
+
additionalProperties: true
|
|
13268
|
+
required: [from, body]
|
|
13269
|
+
properties:
|
|
13270
|
+
from: { type: string }
|
|
13271
|
+
fromSession: { type: string }
|
|
13272
|
+
fromName: { type: string }
|
|
13273
|
+
fromMode: { type: string, enum: [bypass, prompting] }
|
|
13274
|
+
fromScope: { type: string }
|
|
13275
|
+
body: { type: string }
|
|
13276
|
+
|
|
13277
|
+
TaskNotificationCrossSessionNotice:
|
|
13278
|
+
type: object
|
|
13279
|
+
description: 'server >= 7.147.0 — a delivery receipt / peer idle notice. `text` is the sentence the engine rendered for the MODEL (redacted); render the card from `_sema_provenance.peerMeta.notice`, do not parse `text`.'
|
|
13280
|
+
additionalProperties: true
|
|
13281
|
+
required: [kind, text]
|
|
13282
|
+
properties:
|
|
13283
|
+
kind: { type: string, enum: [delivery_notice, idle_notice] }
|
|
13284
|
+
text: { type: string }
|
|
13285
|
+
|
|
13286
|
+
TaskNotificationInboxNotice:
|
|
13287
|
+
type: object
|
|
13288
|
+
description: 'server >= 7.147.0 — an inbox count line: a drain stopped with letters still in the box. Non-negative integers; frame `task_id` = `inbox:<box>`, `seq` = the drain round (restarts at 1 per run).'
|
|
13289
|
+
additionalProperties: true
|
|
13290
|
+
required: [pending, delivered]
|
|
13291
|
+
properties:
|
|
13292
|
+
pending: { type: integer, minimum: 0 }
|
|
13293
|
+
delivered: { type: integer, minimum: 0 }
|
|
13294
|
+
urgent: { type: integer, minimum: 0 }
|
|
13295
|
+
resupplied: { type: integer, minimum: 0 }
|
|
12890
13296
|
|
|
12891
13297
|
ModelCompat:
|
|
12892
13298
|
# 新(8.9.0 / S-188):`ModelInfo.compat` 的形 = core `OpenAICompletionsCompat` 的逐字镜像。
|
|
@@ -12894,9 +13300,10 @@ components:
|
|
|
12894
13300
|
# 所以这里写闭集 enum 是**如实**的,不是本仓自己加的一道门 —— 消费方不必再验一遍。
|
|
12895
13301
|
type: object
|
|
12896
13302
|
description: >
|
|
12897
|
-
One model row's wire-compatibility declaration for
|
|
12898
|
-
`OpenAICompletionsCompat`, mirrored key-for-key; server >= 7.69.0 / S-188)
|
|
12899
|
-
|
|
13303
|
+
One model row's wire-compatibility declaration for ITS lane. **openai-completions** rows carry five keys (core
|
|
13304
|
+
`OpenAICompletionsCompat`, mirrored key-for-key; server >= 7.69.0 / S-188): how THIS gateway takes the thinking parameter and what the max-tokens field is called.
|
|
13305
|
+
**anthropic-messages** rows carry five other keys (core `AnthropicMessagesCompat`; server >= 7.147.0; before that this lane's declaration was dropped whole): `thinkingMode`, `effortLevels`, `supportsTemperature`,
|
|
13306
|
+
`contextManagement`, `interleavedThinking`. A row carries only ITS lane's keys (a declaration holding another lane's key is dropped whole); the wire has no key naming the row's lane, so read by key. No URL, no credential.
|
|
12900
13307
|
🔴 ABSENT has TWO indistinguishable causes: (a) the model genuinely declared nothing (the engine infers
|
|
12901
13308
|
from baseUrl / model id), or (b) the operator wrote one and the server DROPPED IT WHOLE (shape / word /
|
|
12902
13309
|
unknown key), logging a named warning and falling back to the engine's inference. So a panel must NOT
|
|
@@ -12927,6 +13334,15 @@ components:
|
|
|
12927
13334
|
thinkingFormat:
|
|
12928
13335
|
$ref: '#/components/schemas/ModelThinkingFormat'
|
|
12929
13336
|
description: 'How this gateway takes the thinking on/off parameter. Absent => the engine infers (default `openai`, i.e. `reasoning_effort`).'
|
|
13337
|
+
thinkingMode: { type: string, enum: [budget, adaptive], description: 'anthropic-messages lane (server >= 7.147.0), present iff declared: how thinking is switched on — `budget` (token budget) or `adaptive` (the model''s thinking cannot be turned off; the same row''s `supportsThinkingOff` reads false).' }
|
|
13338
|
+
effortLevels:
|
|
13339
|
+
type: array
|
|
13340
|
+
minItems: 1
|
|
13341
|
+
items: { $ref: '#/components/schemas/ModelThinkingLevel' }
|
|
13342
|
+
description: 'anthropic-messages lane (server >= 7.147.0), present iff declared non-empty: the effort tiers this lane accepts (a subset of the six-rung ladder).'
|
|
13343
|
+
supportsTemperature: { type: boolean, description: 'anthropic-messages lane (server >= 7.147.0), present iff declared: does the endpoint accept `temperature`.' }
|
|
13344
|
+
contextManagement: { type: boolean, description: 'anthropic-messages lane (server >= 7.147.0), present iff declared: does the endpoint accept the context-management declaration.' }
|
|
13345
|
+
interleavedThinking: { type: boolean, description: 'anthropic-messages lane (server >= 7.147.0), present iff declared: does the endpoint accept interleaved thinking.' }
|
|
12930
13346
|
|
|
12931
13347
|
ModelThinkingLevel:
|
|
12932
13348
|
# 六档思考梯(core ThinkingLevel)。CLOSED:server 铸 Model 那一刻逐词判成员,出集词让整只 compat 被丢。
|
|
@@ -13162,6 +13578,8 @@ components:
|
|
|
13162
13578
|
agentFailures: { type: integer, description: 'Count of agent-runs that ended failed — present only when > 0 (a "completed, with failures" flag without an N+1 get).' }
|
|
13163
13579
|
parked: { type: boolean, enum: [true], description: 'server >= 7.135.0 (core 7.55.0 `runParkedOf`) — present, always the literal `true`, ONLY while the run is `running` AND at least one of its agents is parked at an approval gate; otherwise the key is ABSENT (never `false`). Read it as "the run is waiting on a person", not "failed". Older servers never send it.' }
|
|
13164
13580
|
errorCode: { type: string, description: 'The run row''s machine code (open set; e.g. `workflow.agent_parked` for a drained parked terminal) — present only when the row has one. (Declared here in 26.1.0: the engine summary has emitted it since before 7.134.0.)' }
|
|
13581
|
+
budgetOvershoot: { $ref: '#/components/schemas/WorkflowBudgetOvershoot' }
|
|
13582
|
+
timeoutInterruption: { $ref: '#/components/schemas/WorkflowTimeoutInterruption' }
|
|
13165
13583
|
currentPhase: { type: string, description: 'Title of the phase currently executing (absent once terminal).' }
|
|
13166
13584
|
status: { $ref: '#/components/schemas/WorkflowRunStatus' }
|
|
13167
13585
|
phaseCount: { type: integer, description: 'Phases recorded.' }
|
|
@@ -13171,6 +13589,39 @@ components:
|
|
|
13171
13589
|
endedAt: { type: integer, description: 'End epoch ms (absent while running).' }
|
|
13172
13590
|
createdAt: { type: integer, description: 'Record-creation epoch ms (listByScope sort key).' }
|
|
13173
13591
|
|
|
13592
|
+
WorkflowBudgetOvershoot:
|
|
13593
|
+
type: object
|
|
13594
|
+
description: >
|
|
13595
|
+
`WorkflowRunSummary.budgetOvershoot` — the run's TERMINAL token-budget overshoot (the engine's summary projection, passed through on the list face as a shallow copy).
|
|
13596
|
+
Present ONLY when the run actually spent MORE than its ceiling; absent on every run that stayed within one and on every run that set no budget. The overshoot is
|
|
13597
|
+
`spentTokens + unsettledTokens - budgetTokens`; a run whose overshoot rests ENTIRELY on `unsettledTokens` is a best-effort disclosure, not a measurement ("this run appears to
|
|
13598
|
+
have overrun, and here is what was seen") — `spentTokens` carries no such caveat (it is the gate's own settled figure). Lets a list row be flagged "completed, and over budget" without an N+1 `get`.
|
|
13599
|
+
The detail face (`GET /v1/workflows/:id`) does not carry it.
|
|
13600
|
+
required: [budgetTokens, spentTokens]
|
|
13601
|
+
additionalProperties: false
|
|
13602
|
+
properties:
|
|
13603
|
+
budgetTokens: { type: number, description: "The run's token ceiling." }
|
|
13604
|
+
spentTokens: { type: number, description: "Settled tokens." }
|
|
13605
|
+
unsettledTokens: { type: number, description: 'Unsettled (in-flight / not yet reported) token estimate; absent = no unsettled part.' }
|
|
13606
|
+
|
|
13607
|
+
WorkflowTimeoutInterruption:
|
|
13608
|
+
type: object
|
|
13609
|
+
description: >
|
|
13610
|
+
`WorkflowRunSummary.timeoutInterruption` — the run's TERMINAL total-timeout interruption (the engine's summary projection, passed through on the list face as a shallow copy).
|
|
13611
|
+
Present ONLY when the `totalTimeoutMs` deadline had fired by the time the run reached its terminal; absent on a run that finished inside its deadline, one that failed for its own
|
|
13612
|
+
reason first, and one that armed no deadline. Lets a row separate "this run was CUT SHORT, and here is what it had achieved" from "this run failed" (both read `status: failed`).
|
|
13613
|
+
The counts are a POINT-IN-TIME SNAPSHOT taken BEFORE the terminal fold that marks abandoned agents failed: `agentsFailed` here is NOT `WorkflowRunSummary.agentFailures`
|
|
13614
|
+
(the record's tally, which counts the abandoned ones) — swapping one for the other reports abandoned work as failed work. `agentsInFlight` includes calls still queued for a concurrency slot.
|
|
13615
|
+
The detail face (`GET /v1/workflows/:id`) does not carry it.
|
|
13616
|
+
required: [timeoutMs, agentsCompleted, agentsFailed, agentsInFlight]
|
|
13617
|
+
additionalProperties: false
|
|
13618
|
+
properties:
|
|
13619
|
+
timeoutMs: { type: number, description: "The deadline that fired (the run's configured `totalTimeoutMs`)." }
|
|
13620
|
+
agentsCompleted: { type: integer }
|
|
13621
|
+
agentsFailed: { type: integer, description: 'Agents that had failed on their own when the clock ran out (pre-abandonment).' }
|
|
13622
|
+
agentsInFlight: { type: integer, description: 'Agent records still running at that moment (including calls queued for a concurrency slot).' }
|
|
13623
|
+
approvalWaitedMs: { type: number, description: "The LARGEST single leg's human-approval wait in ms — a lower bound on how much of the window went on a person rather than on work, never a sum; absent = no leg reported one (NOT `0`)." }
|
|
13624
|
+
|
|
13174
13625
|
WorkflowActivityBeat:
|
|
13175
13626
|
# 新增(2026-07-25 回填批)—— workflow 监视面 "Activity · last N of M tool calls" 的一拍。
|
|
13176
13627
|
type: object
|
|
@@ -14260,6 +14711,33 @@ components:
|
|
|
14260
14711
|
boundCallId: { type: string, description: 'The current pending''s pendingAction.toolCallId — the D-1 anchor to echo back on the relocated decide.' }
|
|
14261
14712
|
boundInputHash: { type: string, description: 'Server-minted; present only when the row has one. Echo verbatim, never recompute.' }
|
|
14262
14713
|
|
|
14714
|
+
SettingsContractCapability:
|
|
14715
|
+
type: object
|
|
14716
|
+
description: >-
|
|
14717
|
+
server >= 7.147.0 (a version bit: always present, does not vary with the deployment shape) — the `GET /v1/capabilities` `settingsContract` segment: which version of the embedded settings contract this server runs,
|
|
14718
|
+
and which field NAMES its reader carries for each hook entry type. Read it instead of keeping a "which server version knows which keys" table: it answers whether a key would be stripped as out-of-contract by this
|
|
14719
|
+
server's reader (resume replay) or refused 400 `request.body_shape` by the closed-key gate on a new submit.
|
|
14720
|
+
`version` = the installed `@sema-agent/settings-schema` package version (`X.Y.Z`). `hookEntryFields` = the contract's hook-entry field table projected per entry type — `{ command, prompt, agent, http, mcp_tool }`,
|
|
14721
|
+
one array of field NAMES each (names only, never the value types; the discriminator `type` is not in a column; column order = the key order of an entry the contract reader installs).
|
|
14722
|
+
🔴 CARRIED is not EXECUTED: this server runs only `command` / `http` / `prompt` / `agent` entries (`mcp_tool` is refused whole), and a column can list a key the reader carries without executing it; whether the hooks bundle
|
|
14723
|
+
is adopted at all is `taskSettings.hooks`. Wire keys the server reads itself (a group's `source`, a command entry's `plugin`) are not contract fields and are not in a column.
|
|
14724
|
+
ABSENT = server <= 7.146.x: no such table to read — do not infer which keys that reader carries; the per-key facts for older servers live on the keys themselves (for example `args` of a command hook entry: server >= 7.133.0, probe `capabilities.taskSettings.pluginHooks`).
|
|
14725
|
+
Open on the read side: a later contract may add an entry type (one more key of the same shape), or this object another member.
|
|
14726
|
+
required: [version, hookEntryFields]
|
|
14727
|
+
additionalProperties: true
|
|
14728
|
+
properties:
|
|
14729
|
+
version: { type: string, description: 'The embedded `@sema-agent/settings-schema` package version, `X.Y.Z`.' }
|
|
14730
|
+
hookEntryFields:
|
|
14731
|
+
type: object
|
|
14732
|
+
description: 'Per hook entry type, the contract field NAMES the reader carries (names only; the discriminator `type` is not listed). Listed is not executed.'
|
|
14733
|
+
required: [command, prompt, agent, http, mcp_tool]
|
|
14734
|
+
properties:
|
|
14735
|
+
command: { type: array, items: { type: string } }
|
|
14736
|
+
prompt: { type: array, items: { type: string } }
|
|
14737
|
+
agent: { type: array, items: { type: string } }
|
|
14738
|
+
http: { type: array, items: { type: string } }
|
|
14739
|
+
mcp_tool: { type: array, items: { type: string } }
|
|
14740
|
+
additionalProperties: { type: array, items: { type: string } }
|
|
14263
14741
|
CredentialPlaneCapability:
|
|
14264
14742
|
type: object
|
|
14265
14743
|
description: >-
|
|
@@ -14501,9 +14979,11 @@ components:
|
|
|
14501
14979
|
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
|
|
14502
14980
|
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
|
|
14503
14981
|
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 —
|
|
14504
|
-
display only, never a match key); `code` / `reason` are open strings (owned by core).
|
|
14505
|
-
|
|
14506
|
-
|
|
14982
|
+
display only, never a match key); `code` / `reason` are open strings (owned by core). server >= 7.147.0: the two faces match on `code` EQUALITY — every decision-class resume door (`/decide`, `/plan_review`, `/resume`, `/wake`)
|
|
14983
|
+
answers the row's OWN refusal with the engine's original code (`checkpoint.invalid_outcome`, e.g. `requirements_damaged`; `checkpoint.unsupported_version` likewise), the same judge's same code as this verdict's `code`, and the refusal's
|
|
14984
|
+
`error` starts with this verdict's `sentence`; a cause code (`approval_binding_mismatch` for a binding seat, `resume_outcome_invalid` for a body cell / content reject) is given only to a refusal that really has a cause, and that is not the row's own refusal.
|
|
14985
|
+
Servers <= 7.146.x translate by gate instead (`checkpoint.invalid_outcome` becomes `approval_binding_mismatch` on a `policy_ask` gate and `resume_outcome_invalid` on other gates, with no `blockedBy`): against those, match the two faces on `reason`, not on `code`.
|
|
14986
|
+
The refusal body's `reason` is the verdict's `reason`. ABSENT IS NOT `ok`: the listing did not judge the row (it left
|
|
14507
14987
|
pending or its bytes changed between two reads, or an older server). server >= 7.145.0: on SQL backends a row whose stored body cannot be read as a checkpoint
|
|
14508
14988
|
carries the verdict too (the judge answers on the raw bytes — always `damaged`) and is listed on both the operator queue and the assistant inbox (7.144.x
|
|
14509
14989
|
listed it without this key and refused the whole inbox). An `ok` does not guarantee the decide succeeds: the judge does not inspect `pendingAction`, so a
|
|
@@ -14993,7 +15473,7 @@ components:
|
|
|
14993
15473
|
# 新增(2026-07-25 回填批):§4b resume / §4c plan_review / §4d preempt 三条决策端点此前在本文件里都只声明
|
|
14994
15474
|
# 了 `{status}` 一个字段——与 SDK 三批核查前的旧类型同样陈旧。下面的形按 server 源码逐字取证:
|
|
14995
15475
|
# • resume / plan_review 200(共用 `driveResumeIntoRunLog`,`src/http/routes/approvals-assistant.ts`):
|
|
14996
|
-
# `{ taskId
|
|
15476
|
+
# `{ taskId?, sessionId, status, errorCode?, errorMessage?, retriable? }`(后三个条件 spread ⇒ 缺则省键;`taskId` 在认领缺席的同步终局体上缺席)
|
|
14997
15477
|
# • preempt 202(`src/http/routes/approvals-assistant.ts` 三个出口):`{ taskId, status, note }`
|
|
14998
15478
|
# ⚠️ `status` 在 202 上**并非恒为 `"preempting"`**:两个 no-op 出口分别回 `run.status` 与
|
|
14999
15479
|
# `now?.status ?? "failed"` —— 所以这里不能把它写成 const。
|
|
@@ -15002,7 +15482,7 @@ components:
|
|
|
15002
15482
|
The response of the §4b/§4c/§4d decision endpoints (resume / plan_review / preempt). Union of the two
|
|
15003
15483
|
real body shapes — `sessionId` appears only on resume/plan_review, `note` only on preempt; everything
|
|
15004
15484
|
else is shared (absent keys are OMITTED, never null).
|
|
15005
|
-
required: [
|
|
15485
|
+
required: [status]
|
|
15006
15486
|
# 封闭(census 批2 第二段,2026-07-30):上面那段 2026-07-25 的取证已把两条腿的键集逐字列全 ——
|
|
15007
15487
|
# 七个属性就是三个出口的并集,再多一个键就是没人登记过的新 wire 面,正是要红的形。
|
|
15008
15488
|
additionalProperties: false
|
|
@@ -15012,7 +15492,14 @@ components:
|
|
|
15012
15492
|
description: >
|
|
15013
15493
|
[2400] HITL-12: present (true) on the resume/plan_review 200 (same casting point as the decide leg);
|
|
15014
15494
|
absent on the preempt 202.
|
|
15015
|
-
taskId:
|
|
15495
|
+
taskId:
|
|
15496
|
+
type: string
|
|
15497
|
+
description: >
|
|
15498
|
+
The run the continuation belongs to (resume / plan_review: the run row that holds the session claim; preempt: the run being yielded).
|
|
15499
|
+
The ACCEPTED form (`status: "resuming"`, the durable-deployment default) and the preempt 202 always carry it. ABSENT on a synchronous terminal
|
|
15500
|
+
resume / plan_review body when no run row holds the session claim (claim absent; the server's causes are not exhaustive): the server still drives
|
|
15501
|
+
the continuation (writes no ledger, flips no row) and answers `{ sessionId, status, ... }`. Absence means there is no run row to follow, NOT that
|
|
15502
|
+
nothing ran; do not backfill it from the path id. It tightens back to required once the server settles this form.
|
|
15016
15503
|
decisionCommitted: { type: boolean, enum: [true], description: 'server >= 7.138.0 - SETTLEMENT EVIDENCE: `true` = the gate this request named was durably settled with THIS request''s decision (historical evidence, not the card''s current state). Always the literal `true`, never `false`. Absent = unprovable or deliberately omitted => read as "not committed" (fail-closed); do not infer it from the absence of `errorCode`. It coexists with `errorCode: cancelled` / `retriable: true`; `retriable: true` only says the run re-parked.' }
|
|
15017
15504
|
checkpointId: { type: string, description: 'server >= 7.138.0 - only alongside `decisionCommitted`: the gate identity of the row selected before execution (same name and value as the operator queue / inbox row / park ledger row). Absent when the identity is unreadable or not applicable (an idempotent replay carries none); absence infers nothing.' }
|
|
15018
15505
|
status:
|
|
@@ -15160,6 +15647,13 @@ components:
|
|
|
15160
15647
|
the host store and has no tuple); the three members are each optional. 🔴 READ IT AS "WAS IT STORED", NEVER AS "IS IT A SUBAGENT": key PRESENT = a delegated subagent's transcript (even `{}` when the tuple held only a
|
|
15161
15648
|
kind); key ABSENT has three causes — an older server (<= 7.132.x) / an ordinary session / a deployment whose store keeps no placement tuple (the local backend: the copy parked from the private short-TTL store is an
|
|
15162
15649
|
ordinary session row). Absence is NOT "not a subagent": fall back to the identity the fleet row (`id`) / `GET /v1/agents/roster` (`handle`) already carry.
|
|
15650
|
+
projectId:
|
|
15651
|
+
type: string
|
|
15652
|
+
description: >-
|
|
15653
|
+
server >= 7.147.0, top-level additive key, PRESENT-IFF: the `project.id` of the last `workspace_changed` frame this session row recorded — the project the engine judged for the session's last OWN leg (from the `.sema/project` marker
|
|
15654
|
+
in the checkout, or, with no marker, the submit body's `projectId` declaration; which one is not on the wire). The same value domain as `ProjectRow.id`. This service neither judges projects nor reads markers. No capability bit.
|
|
15655
|
+
ABSENT reads "this server did not say", NEVER "belongs to no project": no leg has recorded a frame yet / that frame had no project / the deployment's session store keeps no such cell (memory store) / an older server.
|
|
15656
|
+
A forked session starts with no record. The session LIST row does not carry it and `GET /v1/sessions` has no `?projectId=` filter.
|
|
15163
15657
|
userInputUndrained:
|
|
15164
15658
|
type: array
|
|
15165
15659
|
description: >-
|
|
@@ -15779,6 +16273,27 @@ components:
|
|
|
15779
16273
|
description: >-
|
|
15780
16274
|
server >= 7.141.0 — THIS DEPLOYMENT's memory-sync park reading (a deployment fact: present <=> the deployment has a sync leg;
|
|
15781
16275
|
independent of the session and of `?scope=`). `parked: []` = syncing. ABSENT = no sync leg, or an older server.
|
|
16276
|
+
writeHome:
|
|
16277
|
+
type: string
|
|
16278
|
+
description: >-
|
|
16279
|
+
server >= 7.146.0 — the session's memory write home (the engine's absolute directory, verbatim). PRESENT-IFF the engine answered it AND the single-user host lane (the same range predicate as the capability bit `projectContext`;
|
|
16280
|
+
hosted / sandbox / device / no-hands lanes: absent). With `?scope=` = the answer of the store that layer lives on; without it = the one session-level home the engine chose across the stores (the home of the newest store that names one; absent while any
|
|
16281
|
+
store's reading is unreadable, on a same-instant tie, or when no store names one). ABSENT is "this read cannot say", not "no home".
|
|
16282
|
+
planes:
|
|
16283
|
+
type: array
|
|
16284
|
+
description: >-
|
|
16285
|
+
server >= 7.146.0 — the per-store breakdown, PRESENT-IFF no `?scope=` AND the single-user host lane (the same predicate as `writeHome`): one row per store in the engine's store order, each row the engine's own answer for that store
|
|
16286
|
+
(`writeHome` verbatim, absent when that store names none); the engine row's other keys are not on the wire.
|
|
16287
|
+
items: { $ref: '#/components/schemas/SessionMemoryPlaneStatus' }
|
|
16288
|
+
|
|
16289
|
+
SessionMemoryPlaneStatus:
|
|
16290
|
+
type: object
|
|
16291
|
+
description: 'server >= 7.146.0 — one row of `SessionMemoryStatusResponse.planes`. A response projection: declared key by key and left open.'
|
|
16292
|
+
additionalProperties: true
|
|
16293
|
+
required: [plane]
|
|
16294
|
+
properties:
|
|
16295
|
+
plane: { type: string, description: 'The store''s seat: `project` or `personal` (read as an open set).' }
|
|
16296
|
+
writeHome: { type: string, description: 'The write home the engine answered for that store, verbatim; absent when that store names none.' }
|
|
15782
16297
|
|
|
15783
16298
|
SessionMemorySync:
|
|
15784
16299
|
type: object
|
|
@@ -16379,8 +16894,9 @@ components:
|
|
|
16379
16894
|
`index`); server >= 7.132.0 widens that group to every tool-name list on the body, the agent definitions and the two host-path lists, and adds
|
|
16380
16895
|
`too_long` (a text over its character cap; beside `count` + `cap`) — closed words `over_cap` / `too_long` / `bad_entry` (SDK `RequestFieldRefusalExtra`); server >= 7.133.0 adds `too_large` (a payload over its BYTE cap, only on 413 `request.payload_too_large`: `{ field: "body", reason: "too_large", cap }` — `count` ABSENT when the read stopped at the cap and cannot measure; a request body over 8 MiB is now always that 413) and the `request.invalid_json` reasons `not_json` | `not_object` (400, every JSON-body door; formerly `request.rejected`/`request.body_shape` by door).
|
|
16381
16896
|
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.)
|
|
16382
|
-
server >= 7.137.0: the
|
|
16383
|
-
`unknown_word` / `not_a_string` / `lane_not_host`
|
|
16897
|
+
server >= 7.137.0: the 400 `request.field_invalid` refusals of `inheritEnv` (a value outside the word set / a non-string / `"all"` on a non-host lane) carry `field: "inheritEnv"` and `reason` — one of
|
|
16898
|
+
`unknown_word` / `not_a_string` / `lane_not_host` (SDK `INHERIT_ENV_REFUSAL_REASONS`); sentence, code and status are unchanged. The set is these three words and no more from server >= 7.147.0:
|
|
16899
|
+
a fourth word that earlier server sources declared for a case the HTTP face does not reach (the server's own record) is retired, and an out-of-vocabulary word from a server <= 7.146.x is read as unknown.
|
|
16384
16900
|
thrownName:
|
|
16385
16901
|
type: string
|
|
16386
16902
|
minLength: 1
|
|
@@ -17785,6 +18301,7 @@ components:
|
|
|
17785
18301
|
properties:
|
|
17786
18302
|
type: { const: compacted }
|
|
17787
18303
|
tokensBefore: { type: integer }
|
|
18304
|
+
summarizedCrossSessionMessages: { type: integer, minimum: 1, description: 'server >= 7.147.0: how many already-delivered cross-session messages (session-inbox `crossSessionMessage` carriers) this summary swallowed; present iff >= 1 (absent = none swallowed or an older server, not 0).' }
|
|
17788
18305
|
trigger: { type: string, description: '开集(engine-shaped,别当闭合枚举):`auto`(逼近窗口上限)/ `manual`(`POST /v1/runs/:id/compact`,发在该 run 自己的流上)/ `forced`(core ≥5.16.0 的 prompt-too-long 恢复腿)。缺席按 auto 渲染;未知值也按 auto 渲染,别崩。' }
|
|
17789
18306
|
preserved_segment:
|
|
17790
18307
|
type: object
|
|
@@ -18778,10 +19295,13 @@ components:
|
|
|
18778
19295
|
`permission.read_deny_unapplied` — a mode released a shell call whose reads the read station could not establish while a read-deny
|
|
18779
19296
|
table is in force (none of its rows applied to what it reads), `{ mode, toolCallId, tiers, rows, rowCount, sessionId, runId }`,
|
|
18780
19297
|
`tiers` = the built-in tiers in use, `rows` = the first eight non-built-in rule texts (`rowCount` = total); every such call. ·
|
|
18781
|
-
`permission.rule_store_unavailable` — this person's persisted permission rules could not be READ,
|
|
18782
|
-
SKIPPED them (no allow / ask / deny row took part
|
|
18783
|
-
|
|
18784
|
-
once per run.
|
|
19298
|
+
`permission.rule_store_unavailable` — this person's persisted permission rules could not be READ (a read failure, a corrupt store, a read
|
|
19299
|
+
that did not answer in time), so the verdict that read served SKIPPED them (no allow / ask / deny row took part); replaces the approval frame's
|
|
19300
|
+
retired `ruleStoreUnreadable` seat, `{ at, sessionId, runId }`, `at` closed two words `prepare` (the path rows taken at run start: the run's file and
|
|
19301
|
+
shell checks lack them until the run ends, the next run reads again) / `call` (one call's own rule check; every later call reads again); once per run.
|
|
19302
|
+
FAIL-CLOSED from server >= 7.127.0 (core 7.50.0): at `call` the call asks a person (a deny row among the unreadable rows may forbid it; ask class
|
|
19303
|
+
`rule_unreadable`, which `bypassPermissions` asks too and a headless run refuses); at `prepare` only the run's path tables lack the rows.
|
|
19304
|
+
Server [7.106.0, 7.127.0): the same notice, but the unreadable read raised no card (a skipped deny row protected nothing; a mode released `rule_unreadable`).
|
|
18785
19305
|
Starter whitelist (server 7.36): `memory.session_polluted` `{reason, sessionId?}` ·
|
|
18786
19306
|
`memory.harvest_quarantined` `{count, moved, escalated, reason?}` — `moved` and `escalated` MUST NOT be
|
|
18787
19307
|
subtracted from each other (an in-place tombstone counts as both) · `memory.delegation_static_mark_waived`
|
|
@@ -19233,6 +19753,29 @@ components:
|
|
|
19233
19753
|
required: [path, edits]
|
|
19234
19754
|
additionalProperties: true
|
|
19235
19755
|
properties: { path: { type: string }, edits: { type: integer } }
|
|
19756
|
+
agentMessage:
|
|
19757
|
+
type: object
|
|
19758
|
+
description: 'A delegated subagent''s uplink message (`status: "event"`, `task_type: "background_agent"`): the render discriminator, always together with `_sema_provenance`. `body` is UNTRUSTED subagent text (egress-redacted).'
|
|
19759
|
+
additionalProperties: true
|
|
19760
|
+
required: [from, body]
|
|
19761
|
+
properties:
|
|
19762
|
+
from: { type: string }
|
|
19763
|
+
body: { type: string }
|
|
19764
|
+
crossSessionMessage:
|
|
19765
|
+
allOf: [{ $ref: '#/components/schemas/TaskNotificationCrossSessionMessage' }]
|
|
19766
|
+
description: 'server >= 7.147.0 — session-inbox carrier 1 of 3: a message from a peer session. At most one of the four carriers is present (core priority `agentMessage` -> `crossSessionMessage` -> `crossSessionNotice` -> `inboxNotice`); on <= 7.146.x the three inbox carriers are always absent.'
|
|
19767
|
+
crossSessionNotice:
|
|
19768
|
+
allOf: [{ $ref: '#/components/schemas/TaskNotificationCrossSessionNotice' }]
|
|
19769
|
+
description: 'server >= 7.147.0 — session-inbox carrier 2 of 3: a delivery receipt / peer idle notice.'
|
|
19770
|
+
inboxNotice:
|
|
19771
|
+
allOf: [{ $ref: '#/components/schemas/TaskNotificationInboxNotice' }]
|
|
19772
|
+
description: 'server >= 7.147.0 — session-inbox carrier 3 of 3: an inbox count line.'
|
|
19773
|
+
_sema_provenance:
|
|
19774
|
+
allOf: [{ $ref: '#/components/schemas/SemaProvenance' }]
|
|
19775
|
+
description: 'The attribution side-record, together with its carrier on a full-form frame (the minimal form `payloadTruncated` drops the carrier and keeps this); present-but-unreadable (bad shape / out-of-vocabulary word) => the whole key is absent.'
|
|
19776
|
+
payloadTruncated:
|
|
19777
|
+
allOf: [{ $ref: '#/components/schemas/PayloadTruncated' }]
|
|
19778
|
+
description: 'server >= 7.147.0 — present iff this PARKED REDELIVERY frame exceeded the inbox byte budget and is the minimal form (every other key absent). Live frames and durable ledger rows never carry it.'
|
|
19236
19779
|
resumable: { type: boolean }
|
|
19237
19780
|
result: { type: string, description: 'UNTRUSTED display text.' }
|
|
19238
19781
|
output_file: { type: string }
|
|
@@ -19706,8 +20249,8 @@ components:
|
|
|
19706
20249
|
frame and the inbox row; the `card_json` card deliberately does NOT carry it (it travels with `origin`,
|
|
19707
20250
|
which is not on the card). Absence = `origin` is not that word — NOT an assertion that the rule store
|
|
19708
20251
|
is healthy.
|
|
19709
|
-
RETIRED: server >= 7.106.0 (core 7.34.0, BREAKING — wire) never mints this key on either face
|
|
19710
|
-
|
|
20252
|
+
RETIRED: server >= 7.106.0 (core 7.34.0, BREAKING — wire) never mints this key on either face; the
|
|
20253
|
+
signal moved to the session stream's user-facing
|
|
19711
20254
|
`engine_notice` `permission.rule_store_unavailable` (`detail.at` = `prepare` / `call`; what the run does while the rules cannot be read is
|
|
19712
20255
|
that notice's own text). Kept on the frame because servers 7.72–7.105 are inside the supported range and still send it, and the closed inbox row
|
|
19713
20256
|
declares the same key; it goes with the next major once the support floor is >= 7.106.0 (`origin: rule_store_unavailable` itself stays).
|
|
@@ -21554,6 +22097,9 @@ components:
|
|
|
21554
22097
|
server >= 7.135.0 — the idempotency anchor of this workflow completion: the SAME id rides every notification path of one completion (this frame / `task_notification` / fleet `bg_notification` / inbox replay) and
|
|
21555
22098
|
is the dedup key ACROSS paths (the same value domain as `task_notification.completionId`). ABSENT when the engine gave none (an orphan the service terminated itself) — dedup on `runId` as before. The read faces
|
|
21556
22099
|
(`GET /v1/workflows/{id}` etc.) deliberately never carry it. Older servers' re-delivered frames have no such key.
|
|
22100
|
+
payloadTruncated:
|
|
22101
|
+
allOf: [{ $ref: '#/components/schemas/PayloadTruncated' }]
|
|
22102
|
+
description: 'server >= 7.147.0 — present iff this parked redelivery frame exceeded the inbox byte budget: the minimal form is `runId` + `status` + `summary` + this key (`completionId` / `diagnostics` absent).'
|
|
21557
22103
|
diagnostics:
|
|
21558
22104
|
type: string
|
|
21559
22105
|
maxLength: 4000
|
|
@@ -23607,7 +24153,7 @@ components:
|
|
|
23607
24153
|
goes through the EXISTING durable redemption leg (the same CAS as POST /v1/approvals/{sessionId}/decide) instead of the old 404 `tool_approval.not_pending`
|
|
23608
24154
|
(`cause: unknown_or_other_replica`). Body = the redemption leg's receipt (ApprovalDecisionResult's keys — `status` / `taskId` / `sessionId` / ... as they come) plus the three keys
|
|
23609
24155
|
this door adds: `approvalId` / `askId` (the same 64-hex value) and the discriminant `accepted`. `decision` is the two-word direction on the REPLAY form only (`allow` / `deny`,
|
|
23610
|
-
`allow_session` folded to `allow`); `rememberApplied
|
|
24156
|
+
`allow_session` folded to `allow`); `rememberApplied` appears only when this request asked `allow_session` and this is the FIRST redemption (server >= 7.147.0: the leg's own boolean answer; <= 7.146.x always `false`; the replay form carries none);
|
|
23611
24157
|
`rulePersisted` / `ruleRefusal` / `persistedRule*` are the `persistRule` outcome on the redemption leg (a rule that fails to store NEVER flips the verdict).
|
|
23612
24158
|
`idempotent: true` appears only on the REPLAY (the same already-redeemed card answered again returns the first redemption's receipt).
|
|
23613
24159
|
CLOSED like its two sibling arms (the census keeps this op's 200 body closed): the key set is ApprovalDecisionResult's own keys (one source per shape, by `$ref`) plus the added ones.
|
|
@@ -23629,7 +24175,7 @@ components:
|
|
|
23629
24175
|
retriable: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/retriable' }
|
|
23630
24176
|
idempotent: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/idempotent' }
|
|
23631
24177
|
executionOutcome: { $ref: '#/components/schemas/ApprovalDecisionResult/properties/executionOutcome' }
|
|
23632
|
-
rememberApplied: { type: boolean,
|
|
24178
|
+
rememberApplied: { type: boolean, description: 'Present only when this request asked `allow_session` AND this is the FIRST redemption (not the replay form). server >= 7.147.0: the redemption leg''s own answer (true = it remembered the session grant, false = this once only); a server <= 7.146.x always answered false here ("a parked redemption cannot remember a session grant").' }
|
|
23633
24179
|
rulePersisted: { $ref: '#/components/schemas/ToolApprovalRespondApplied/properties/rulePersisted' }
|
|
23634
24180
|
ruleRefusal: { $ref: '#/components/schemas/ToolApprovalRespondApplied/properties/ruleRefusal' }
|
|
23635
24181
|
persistedRule: { $ref: '#/components/schemas/ToolApprovalRespondApplied/properties/persistedRule' }
|
|
@@ -24050,27 +24596,34 @@ components:
|
|
|
24050
24596
|
|
|
24051
24597
|
RuleImportMember:
|
|
24052
24598
|
description: >
|
|
24053
|
-
server >= 7.145.0 — one row of the redemption receipt (server `ImportOutcomeMember`),
|
|
24054
|
-
`persisted` = written by this redemption; `no-op` = an equal rule was already in the store (the engine's `deduped`)
|
|
24055
|
-
`refused` =
|
|
24056
|
-
|
|
24057
|
-
`indeterminate` = the engine refused this member and
|
|
24058
|
-
|
|
24059
|
-
receipt schema reads the same table).
|
|
24599
|
+
server >= 7.145.0 — one row of the redemption receipt (server `ImportOutcomeMember`), three arms on `outcome`:
|
|
24600
|
+
`persisted` = written by this redemption; `no-op` = an equal rule was already in the store (the engine's `deduped`) — these two carry only `key` / `outcome`;
|
|
24601
|
+
`refused` = the engine refused this member and it is KNOWN not written (the engine answered `committed: "no"`) — carries `reason` (the engine's `RuleRefusalCode` verbatim, an open string,
|
|
24602
|
+
e.g. `unsupported.layer_root`) and `detail` (the engine's sentence verbatim); server >= 7.146.0 mints it (a 7.145.x server never does — it was described as RESERVED in the 36.0.0 contract text, corrected in 37.0.0);
|
|
24603
|
+
`indeterminate` = the engine refused this member and it is NOT KNOWN whether it landed (`committed` unknown; 7.145.0 minted EVERY engine member refusal as this arm with `reason: store_refused`) — carries `reason` and `detail` likewise.
|
|
24604
|
+
`reason` / `detail` are present iff `outcome` is `refused` | `indeterminate`. The four words are a closed set (the server's persisted receipt schema reads the same table).
|
|
24060
24605
|
oneOf:
|
|
24061
24606
|
- type: object
|
|
24062
24607
|
additionalProperties: false
|
|
24063
24608
|
required: [key, outcome]
|
|
24064
24609
|
properties:
|
|
24065
24610
|
key: { $ref: '#/components/schemas/RuleImportKey' }
|
|
24066
|
-
outcome: { type: string, enum: [persisted, no-op
|
|
24611
|
+
outcome: { type: string, enum: [persisted, no-op] }
|
|
24612
|
+
- type: object
|
|
24613
|
+
additionalProperties: false
|
|
24614
|
+
required: [key, outcome, reason, detail]
|
|
24615
|
+
properties:
|
|
24616
|
+
key: { $ref: '#/components/schemas/RuleImportKey' }
|
|
24617
|
+
outcome: { const: refused }
|
|
24618
|
+
reason: { type: string, minLength: 1 }
|
|
24619
|
+
detail: { type: string }
|
|
24067
24620
|
- type: object
|
|
24068
24621
|
additionalProperties: false
|
|
24069
24622
|
required: [key, outcome, reason, detail]
|
|
24070
24623
|
properties:
|
|
24071
24624
|
key: { $ref: '#/components/schemas/RuleImportKey' }
|
|
24072
24625
|
outcome: { const: indeterminate }
|
|
24073
|
-
reason: {
|
|
24626
|
+
reason: { type: string, minLength: 1 }
|
|
24074
24627
|
detail: { type: string }
|
|
24075
24628
|
|
|
24076
24629
|
RuleImportReceipt:
|