@sema-agent/sdk 34.0.0 → 35.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 +58 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/normalize.d.ts +9 -3
- package/dist/normalize.d.ts.map +1 -1
- package/dist/normalize.js +2 -0
- package/dist/normalize.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.map +1 -1
- package/dist/resources/rules.d.ts +48 -48
- package/dist/resources/rules.d.ts.map +1 -1
- package/dist/resources/rules.js +8 -4
- package/dist/resources/rules.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/types.d.ts +26 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/openapi.yaml +90 -59
- package/package.json +2 -2
package/openapi.yaml
CHANGED
|
@@ -3517,7 +3517,10 @@ paths:
|
|
|
3517
3517
|
description: >
|
|
3518
3518
|
409 `conflict` — a `fork`/`stale` PUSH without `resolution:"overwrite-dst"` (carries `relation`; the SDK
|
|
3519
3519
|
surfaces SyncConflictError), OR an active run (`session_active`, `activeTaskId`) / an in-flight import
|
|
3520
|
-
(`import_in_flight`) on the session (ConflictError).
|
|
3520
|
+
(`import_in_flight`) on the session (ConflictError). `conflict.session_archive_stamped` (server >= 7.145.0, `DB_BACKEND=local` only):
|
|
3521
|
+
the same two shapes (`fork` / `stale` without consent) onto a stored archive that still carries an earlier version's owner stamp — body
|
|
3522
|
+
`{ error, errorCode }` only (no `relation`), no staging, no lease, nothing written; consent cannot help, the only way out is to delete that
|
|
3523
|
+
session and push it again. A plain ConflictError. Servers 7.144.x answered these two shapes here with the `relation`-carrying `conflict`.
|
|
3521
3524
|
content:
|
|
3522
3525
|
application/json:
|
|
3523
3526
|
schema: { $ref: '#/components/schemas/SyncConflict' }
|
|
@@ -6533,8 +6536,8 @@ paths:
|
|
|
6533
6536
|
x-status: gated # server routes/rules.ts;PERMISSION_RULES_ENABLED + 规则店装配,缺一 ⇒ 501 capability.rule_store_required。SDK rules.ccImportPrepare() 消费。
|
|
6534
6537
|
summary: Preview a CC-settings rule import and mint a one-shot redemption ticket.
|
|
6535
6538
|
description: >
|
|
6536
|
-
Read the
|
|
6537
|
-
what the import WOULD do plus a ticket.
|
|
6539
|
+
Read the permission lists (allow / deny / ask) of 1–3 user-editable CC settings layers the caller submits, and
|
|
6540
|
+
answer with what the import WOULD do plus a ticket.
|
|
6538
6541
|
|
|
6539
6542
|
🔴 NO PERMISSION RULE is persisted by this call — only POST /v1/rules/cc-import/redeem reaches the
|
|
6540
6543
|
writer. But the call is NOT free of durable state and NOT idempotent: every successful prepare writes
|
|
@@ -6543,8 +6546,8 @@ paths:
|
|
|
6543
6546
|
rejection tries to discard the record it just created, best-effort — a leftover orphan pending record
|
|
6544
6547
|
affects no adjudication, but it is not a promise of zero residue either.)
|
|
6545
6548
|
|
|
6546
|
-
|
|
6547
|
-
|
|
6549
|
+
All three lists are read (server >= 7.67.0 / engine 7.9.0; earlier servers read the allow list only): every candidate and every
|
|
6550
|
+
receipt row carries its `behavior`.
|
|
6548
6551
|
|
|
6549
6552
|
The ticket is principal-bound, expiring (10 min), single-use (atomically consumed) and payload-bound
|
|
6550
6553
|
(it pins a digest of the candidate set at mint time). It is NOT a cacheable credential and must never
|
|
@@ -6609,6 +6612,15 @@ paths:
|
|
|
6609
6612
|
the ticket is STILL USABLE — retry as-is after `retryAfterSec` (echoed in `Retry-After`). Folding
|
|
6610
6613
|
that into the 404 would tell a caller their confirmation is lost when it is not; the two call for
|
|
6611
6614
|
opposite handling.
|
|
6615
|
+
|
|
6616
|
+
🔴 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
|
+
when the redemption walk completes with the engine's COMPLETE member table, the redemption settles — `200` + the receipt
|
|
6618
|
+
`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` + reason `store_refused` + `detail` (the engine's sentence verbatim: its refusal carries free text only, so the
|
|
6620
|
+
server does not guess whether it is a verdict or a transient, and neither claims it landed nor guarantees it did not); the ticket is
|
|
6621
|
+
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`). `refused` is a RESERVED outcome word, not minted by this server.
|
|
6623
|
+
<= 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).
|
|
6612
6624
|
requestBody:
|
|
6613
6625
|
required: true
|
|
6614
6626
|
content:
|
|
@@ -6624,17 +6636,19 @@ paths:
|
|
|
6624
6636
|
description: What the import ACTUALLY did (a different moment and contract from the preview).
|
|
6625
6637
|
content:
|
|
6626
6638
|
application/json:
|
|
6627
|
-
schema: { $ref: '#/components/schemas/
|
|
6639
|
+
schema: { $ref: '#/components/schemas/RuleImportReceipt' }
|
|
6628
6640
|
'400': { $ref: '#/components/responses/BadRequest' } # request.body_shape — body is not {ticket}
|
|
6629
6641
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
6630
6642
|
'404': { $ref: '#/components/responses/NotFound' } # not_found.rule_ticket — the UNIFORM arm (forged / another principal's / expired / already used). Never branch on the cause.
|
|
6631
6643
|
'429': { $ref: '#/components/responses/RateLimited' }
|
|
6632
6644
|
'503':
|
|
6633
6645
|
description: >
|
|
6634
|
-
errorCode `state.rule_import_retry` — the
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6646
|
+
errorCode `state.rule_import_retry` — the redemption ended WITHOUT a complete member table (server >= 7.145.0: the engine refused the
|
|
6647
|
+
whole batch before walking it, the member loop threw midway, the confirmation lost to a concurrent writer, or the store threw before the
|
|
6648
|
+
walk), the claim was released and THE TICKET IS STILL USABLE. Body carries `retryAfterSec` and the same value rides `Retry-After`.
|
|
6649
|
+
Retry the SAME ticket: it walks again and hands back the complete table (members landed by the interrupted walk read `no-op`). A refused
|
|
6650
|
+
MEMBER is not this arm — that redemption settles with a 200 receipt row `indeterminate`. This is the only error arm on this endpoint a
|
|
6651
|
+
caller may distinguish from the uniform 404, and the distinction is load-bearing.
|
|
6638
6652
|
headers:
|
|
6639
6653
|
Retry-After:
|
|
6640
6654
|
schema: { type: integer }
|
|
@@ -10021,7 +10035,7 @@ components:
|
|
|
10021
10035
|
scenario: { type: string }
|
|
10022
10036
|
jobId: { type: string }
|
|
10023
10037
|
source: { type: string, description: 'Credential-derived system attribution (service-pinned).' }
|
|
10024
|
-
objectivePreview: { type: string, maxLength: 120, description: 'Objective, secret-redacted then truncated (service-pinned
|
|
10038
|
+
objectivePreview: { type: string, maxLength: 120, description: 'Objective, secret-redacted then truncated (service-pinned). ABSENT when the run row has no preview: older rows, and from server >= 7.145.0 any run on a leg that declares a prompt screen (`prompt.submit` / `classic.UserPromptSubmit`, wildcards included) until the engine delivers the objective verbatim — absent for good when the screen rewrote / dropped it or the leg returns results only (`verify` / `cascade`). The same column feeds the inbox `objective`, the assistant-task `name`, the session-list `objectivePreview` and the fleet row `name`: read absence / `null` as "no preview", never as an empty string.' }
|
|
10025
10039
|
owner: { type: string, description: 'Run owner principal (service-pinned; operator view).' }
|
|
10026
10040
|
startedAt: { type: string, format: date-time }
|
|
10027
10041
|
endedAt: { type: string, format: date-time }
|
|
@@ -14482,8 +14496,11 @@ components:
|
|
|
14482
14496
|
replica / version that can resume it. `ok` carries only `kind`; `lacking` / `damaged` carry `code` (the engine's checkpoint error code), `reason` (which arm of a multi-arm code), `requires` (capabilities the row needs and this engine lacks) and `sentence` (the engine's human line —
|
|
14483
14497
|
display only, never a match key); `code` / `reason` are open strings (owned by core). Match the two faces on `reason`, not on `code`: the refusal
|
|
14484
14498
|
face translates `checkpoint.invalid_outcome` (e.g. `requirements_damaged`) to `approval_binding_mismatch` on a `policy_ask` gate and to `resume_outcome_invalid` on other gates, and that
|
|
14485
|
-
engine refusal carries no `detail.code` (so no `blockedBy`); `checkpoint.unsupported_version` passes through unchanged. The refusal body's `reason` is the verdict's `reason`. ABSENT IS NOT `ok`: the listing did not judge the row (
|
|
14486
|
-
|
|
14499
|
+
engine refusal carries no `detail.code` (so no `blockedBy`); `checkpoint.unsupported_version` passes through unchanged. The refusal body's `reason` is the verdict's `reason`. ABSENT IS NOT `ok`: the listing did not judge the row (it left
|
|
14500
|
+
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
|
|
14501
|
+
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
|
|
14502
|
+
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
|
|
14503
|
+
row missing only that is judged `ok` and its decide still fails (a known engine gap).
|
|
14487
14504
|
oneOf:
|
|
14488
14505
|
- type: object
|
|
14489
14506
|
additionalProperties: false
|
|
@@ -14525,7 +14542,16 @@ components:
|
|
|
14525
14542
|
checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
|
|
14526
14543
|
rowVerdict:
|
|
14527
14544
|
allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
|
|
14528
|
-
description: 'server >= 7.144.0: the engine row judge''s verdict on this row (ABSENT IS NOT `ok`). A non-`ok` row is refused for the same reason when decided (409). SQL backends read each pending row''s stored body once on the first listing after boot (then memoized by body digest); a row whose body cannot be
|
|
14545
|
+
description: 'server >= 7.144.0: the engine row judge''s verdict on this row (ABSENT IS NOT `ok`). A non-`ok` row is refused for the same reason when decided (409). SQL backends read each pending row''s stored body once on the first listing after boot (then memoized by body digest); server >= 7.145.0 a row whose body cannot be read as a checkpoint carries it too (always `damaged`; 7.144.x listed that row without it).'
|
|
14546
|
+
agent:
|
|
14547
|
+
allOf: [{ $ref: '#/components/schemas/SessionAgent' }]
|
|
14548
|
+
description: >-
|
|
14549
|
+
server >= 7.145.0: where this row's session sits in the delegation tree — the SAME read port, type and value as the top-level `agent` of
|
|
14550
|
+
`GET /v1/sessions/{sessionId}` (the row's identity is its session). A background delegated child's parked row has an empty `taskId` and its own
|
|
14551
|
+
`sessionId`; an ownership judge reads `parentSessionId` / `rootSessionId` to link it back to the delegating session. ABSENT means this server did not
|
|
14552
|
+
say, NOT "not a child": a host session's own row, a synchronously delegated child, a `subagent_type: "fork"` background child (an ordinary fork of the
|
|
14553
|
+
parent session, still unlinkable), a store keeping no delegation tuple (`DB_BACKEND=memory`), local-backend child transcripts copied into the host store by
|
|
14554
|
+
7.140.x and earlier, a read that failed (only that row lacks the key), or an older server.
|
|
14529
14555
|
sessionId: { type: string, description: 'The decide handle: POST /v1/approvals/:sessionId/decide.' }
|
|
14530
14556
|
scope: { type: string, description: 'Principal; "_" = submitted without one.' }
|
|
14531
14557
|
taskId: { type: ['string', 'null'], description: 'Suspended run holding the session claim (service-pinned) — join key to trace tool-call blocks + context link.' }
|
|
@@ -14739,7 +14765,7 @@ components:
|
|
|
14739
14765
|
checkpointId: { type: string, minLength: 1, maxLength: 128, description: 'server >= 7.133.0: the NON-SECRET stable identity of the pause this row parks on — the join key where the token cannot go; the SAME value as `PausedCause.checkpointId`. Carried on three durable read surfaces (GET /v1/approvals `pending[]` rows, the /v1/approvals/stream `pending` frame, GET /v1/assistant/inbox rows). A row whose value is unreadable or untrusted (non-string / empty / over 128 / contains the token / an old row / an older server) is STILL LISTED with the key ABSENT — read absence as "this row has no joinable identity", never as a required key.' }
|
|
14740
14766
|
rowVerdict:
|
|
14741
14767
|
allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
|
|
14742
|
-
description: 'server >= 7.144.0: the same verdict as `PendingCheckpoint.rowVerdict` (ABSENT IS NOT `ok`; both backends).'
|
|
14768
|
+
description: 'server >= 7.144.0: the same verdict as `PendingCheckpoint.rowVerdict` (ABSENT IS NOT `ok`; both backends). server >= 7.145.0 on SQL backends: a row whose stored body cannot be read for its summary is LISTED (previously the whole inbox answered 500 / 503) with its column facts (`sessionId` / `scope` / `createdAt` / `gateKind` / `deadline` / `checkpointId`) plus this key; summary-derived keys are absent and `input` is `null`, while `objective` is still filled from the run row preview independently of the summary. A row whose gate kind column cannot be read is not listed. The verdict is usually non-`ok` (`damaged` …); exception: a row missing only `pendingAction` is judged `ok` and its decide still fails (a known engine gap). On `DB_BACKEND=local` that shape still answers the whole listing with 503 `approvals.read_unavailable`.'
|
|
14743
14769
|
scope: { type: string, description: 'Multi-tenant owner scope.' }
|
|
14744
14770
|
createdAt: { type: number, description: 'Ask creation time (epoch ms).' }
|
|
14745
14771
|
gateKind:
|
|
@@ -21682,6 +21708,9 @@ components:
|
|
|
21682
21708
|
rowVerdict:
|
|
21683
21709
|
allOf: [{ $ref: '#/components/schemas/CheckpointRowVerdict' }]
|
|
21684
21710
|
description: '`pending` frames only (server >= 7.144.0): the spread PendingCheckpoint row''s `rowVerdict` (ABSENT IS NOT `ok`).'
|
|
21711
|
+
agent:
|
|
21712
|
+
allOf: [{ $ref: '#/components/schemas/SessionAgent' }]
|
|
21713
|
+
description: '`pending` frames of the checkpoint family only (server >= 7.145.0): the spread PendingCheckpoint row''s `agent` (same read port; `resolved` frames do not carry it; absent = this server did not say, not "not a child").'
|
|
21685
21714
|
checkpointId: { type: string, description: '`pending` frames only (server >= 7.133.0): the spread PendingCheckpoint row''s `checkpointId` (key absent when the row has no trusted value — read as "no joinable identity").' }
|
|
21686
21715
|
consumerState: { type: string, enum: [absent], description: '`live_pending` frames only (server >= 7.133.0): the spread LivePendingRow''s true-only `consumerState` (no engine leg on this replica is waiting for the ask).' }
|
|
21687
21716
|
errorCode: { type: string, description: '`error` frames: the machine code (`STREAM_MAX_DURATION` / `draining` / server >= 7.133.0 `approvals.read_unavailable` — the stream STAYS open, do NOT reconnect on it — / `approvals.read_corrupt` — a corrupt row was read, the server closes the stream after the frame).' }
|
|
@@ -23895,7 +23924,7 @@ components:
|
|
|
23895
23924
|
|
|
23896
23925
|
⚠️ ON THIS HTTP ROUTE `found` IS ALWAYS TRUE. Upstream only writes false when its injected file reader
|
|
23897
23926
|
returns undefined or throws, and the server adapter hands back the request's own REQUIRED `content`
|
|
23898
|
-
field — so it can never be absent. Empty text, `{}`, and a file with no
|
|
23927
|
+
field — so it can never be absent. Empty text, `{}`, and a file with no permission lists all still report
|
|
23899
23928
|
`found: true` (they simply yield no candidates). Do NOT use `found` as "did this layer contribute
|
|
23900
23929
|
rules" — read `candidates` for that. The field is kept because it is part of core's preview shape
|
|
23901
23930
|
(it only discriminates for a host whose reader touches a real filesystem).
|
|
@@ -23911,7 +23940,7 @@ components:
|
|
|
23911
23940
|
description: >
|
|
23912
23941
|
One settings layer submitted to rulesCcImportPrepare. The CONTENT is submitted by the caller because a
|
|
23913
23942
|
cloud deployment has no access to the user's filesystem — that is the deployment shape, not a bypass:
|
|
23914
|
-
|
|
23943
|
+
the server reads exactly the permission lists of that submitted content.
|
|
23915
23944
|
|
|
23916
23945
|
🔴 TWO ARMS BY `layer` (server >= 7.143.0 / engine 7.61.0, BREAKING, no alias): a `userSettings` layer is `{ layer, path, content }` and carries
|
|
23917
23946
|
NO `root` (a body sending one ⇒ 400 `request.body_shape`; its `/`-rooted path rules stay in the settings file, reported as
|
|
@@ -23998,58 +24027,60 @@ components:
|
|
|
23998
24027
|
never hand it to another user.
|
|
23999
24028
|
expiresAtMs: { type: integer, description: 'Absolute server-clock expiry (the window is 10 minutes — one interaction, not a session).' }
|
|
24000
24029
|
|
|
24001
|
-
|
|
24030
|
+
RuleImportKey:
|
|
24002
24031
|
type: object
|
|
24003
|
-
description: >
|
|
24004
|
-
One member of the redeem 200 (core `RedeemedBatchMember`, the 200-REACHABLE arm verbatim — core d.ts
|
|
24005
|
-
permission-rule-consent.d.ts). The union's third arm `{status:"refused", reason}` is STRUCTURALLY
|
|
24006
|
-
UNREACHABLE on this route's 200: any refused member makes the server treat the whole redeem as
|
|
24007
|
-
indeterminate, release the claim and answer 503 `state.rule_import_retry` (server rules-consent.ts) —
|
|
24008
|
-
so this schema honestly describes the two-value `status` only.
|
|
24009
24032
|
additionalProperties: false
|
|
24010
|
-
|
|
24033
|
+
description: >
|
|
24034
|
+
server >= 7.145.0 — a rule's identity in a rule-import redemption receipt: the SAME identity triple as a `GET /v1/rules` listing row
|
|
24035
|
+
(`behavior` + canonical `rule` text + the discriminated `scope` string `global` / `project:<root>`, NOT the preview's `RuleScope` object).
|
|
24036
|
+
Reconcile a receipt row against the listing by comparing these three fields; pass them verbatim to `DELETE /v1/rules`.
|
|
24037
|
+
required: [behavior, rule, scope]
|
|
24011
24038
|
properties:
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24039
|
+
behavior: { $ref: '#/components/schemas/RuleBehavior' }
|
|
24040
|
+
rule: { type: string, minLength: 1 }
|
|
24041
|
+
scope: { type: string, minLength: 1 }
|
|
24042
|
+
|
|
24043
|
+
RuleImportMember:
|
|
24044
|
+
description: >
|
|
24045
|
+
server >= 7.145.0 — one row of the redemption receipt (server `ImportOutcomeMember`), two arms on `outcome`:
|
|
24046
|
+
`persisted` = written by this redemption; `no-op` = an equal rule was already in the store (the engine's `deduped`);
|
|
24047
|
+
`refused` = RESERVED (known refused, known not written) — NOT minted by this server version: the engine's member refusal carries free
|
|
24048
|
+
text only; the word appears once the engine gives the refusal arm a machine-readable verdict bit (that version adds its fields to this arm);
|
|
24049
|
+
`indeterminate` = the engine refused this member and the cause is free text only — it is NOT KNOWN whether it landed: exactly then the row
|
|
24050
|
+
carries `reason: store_refused` and `detail` (the engine's sentence verbatim). The four words are a closed set (the server's persisted
|
|
24051
|
+
receipt schema reads the same table).
|
|
24052
|
+
oneOf:
|
|
24053
|
+
- type: object
|
|
24054
|
+
additionalProperties: false
|
|
24055
|
+
required: [key, outcome]
|
|
24056
|
+
properties:
|
|
24057
|
+
key: { $ref: '#/components/schemas/RuleImportKey' }
|
|
24058
|
+
outcome: { type: string, enum: [persisted, no-op, refused] }
|
|
24059
|
+
- type: object
|
|
24060
|
+
additionalProperties: false
|
|
24061
|
+
required: [key, outcome, reason, detail]
|
|
24062
|
+
properties:
|
|
24063
|
+
key: { $ref: '#/components/schemas/RuleImportKey' }
|
|
24064
|
+
outcome: { const: indeterminate }
|
|
24065
|
+
reason: { const: store_refused }
|
|
24066
|
+
detail: { type: string }
|
|
24024
24067
|
|
|
24025
|
-
|
|
24068
|
+
RuleImportReceipt:
|
|
24026
24069
|
type: object
|
|
24027
|
-
description: >
|
|
24028
|
-
What the import ACTUALLY did (server >= 7.46.0, BREAKING #2 there / core 5.58.0 redeemRuleBatch
|
|
24029
|
-
members passthrough) — a different moment and a different contract from the preview, because dedup,
|
|
24030
|
-
concurrency and redemption-time validation can each move an entry between the two.
|
|
24031
|
-
|
|
24032
|
-
🔴 SHAPE CHANGE (A-075.13): the old three-bucket form `{persisted[], deduped[], skippedAtRedeem[],
|
|
24033
|
-
rev}` left the wire in server 7.46.0 — a consumer reading `result.persisted.length` gets undefined.
|
|
24034
|
-
This schema describes the real wire since then; the SDK type changed with it (a staleness fix, not a
|
|
24035
|
-
behavior change).
|
|
24036
24070
|
additionalProperties: false
|
|
24071
|
+
description: >
|
|
24072
|
+
server >= 7.145.0 — the 200 body of rulesCcImportRedeem: the rule-import REDEMPTION RECEIPT, the same receipt (one mint point) as
|
|
24073
|
+
`POST /v1/rules/local-import/redeem` (a door this SDK does not wrap). Replaces the <= 7.144.x cc-import body
|
|
24074
|
+
`{ result: { members: <engine RedeemedBatchMember rows: candidateIndex / behavior / rule / scope object / status / alreadyRedeemed / dot>, rev } }`,
|
|
24075
|
+
which left the wire (the SDK's `CcImportRedeemResult` / `CcImportResult` / `CcImportRedeemedMember` are deleted, no alias). See the
|
|
24076
|
+
endpoint description for the settle rule.
|
|
24037
24077
|
required: [members, rev]
|
|
24038
24078
|
properties:
|
|
24039
24079
|
members:
|
|
24040
24080
|
type: array
|
|
24041
|
-
items: { $ref: '#/components/schemas/
|
|
24042
|
-
description: '
|
|
24043
|
-
rev: { type: integer, description: 'The
|
|
24044
|
-
|
|
24045
|
-
CcImportRedeemResult:
|
|
24046
|
-
type: object
|
|
24047
|
-
description: 'The 200 body of rulesCcImportRedeem.'
|
|
24048
|
-
additionalProperties: false
|
|
24049
|
-
required: [result]
|
|
24050
|
-
properties:
|
|
24051
|
-
result: { $ref: '#/components/schemas/CcImportResult' }
|
|
24052
|
-
|
|
24081
|
+
items: { $ref: '#/components/schemas/RuleImportMember' }
|
|
24082
|
+
description: 'One row per member, in the engine''s walk order.'
|
|
24083
|
+
rev: { type: integer, minimum: 0, description: 'The bucket''s OCC revision when the redemption finished (bucket-local; not comparable across principals).' }
|
|
24053
24084
|
# ── design/203 §2 撤销面(server 7.12.0)—— 列举行 + 两口的 200 体 ────────────────────────────────
|
|
24054
24085
|
# 行形逐字段照 server `src/rules-consent.ts` 的 `PersistedRuleWireRow`(它自己逐字段照 core 的
|
|
24055
24086
|
# `PersistedAllowRule`,只把 `scope` 换成判别式串)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.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",
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"prepublishOnly": "rm -f tsconfig.tsbuildinfo && npm run build && npm run typecheck --workspaces=false --prefix ../.. && npm test --workspaces=false --prefix ../.. && npm run prepack"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@sema-agent/settings-schema": "^
|
|
58
|
+
"@sema-agent/settings-schema": "^17.0.0"
|
|
59
59
|
}
|
|
60
60
|
}
|