@sema-agent/sdk 0.0.100 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi.yaml +347 -0
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -1958,7 +1958,44 @@ components:
|
|
|
1958
1958
|
outputTokens: { type: integer }
|
|
1959
1959
|
costUsd: { type: number }
|
|
1960
1960
|
cacheHitRate: { type: number }
|
|
1961
|
+
toolCalls: { type: integer }
|
|
1962
|
+
cacheWriteTokens: { type: integer, description: Short-TTL cache-write tokens. }
|
|
1963
|
+
cacheWriteTokensLong: { type: integer, description: Long-TTL (1h) cache-write tokens, priced separately. }
|
|
1964
|
+
totalInputTokens:
|
|
1965
|
+
type: integer
|
|
1966
|
+
description: Normalized total input (prompt + cache reads) — the denominator most cost views want.
|
|
1967
|
+
costMicroUsd:
|
|
1968
|
+
type: integer
|
|
1969
|
+
description: >
|
|
1970
|
+
Integer micro-USD cost. Prefer this over the float `costUsd` for accounting (no FP drift). Both are
|
|
1971
|
+
emitted; they describe the same spend.
|
|
1972
|
+
costBreakdown:
|
|
1973
|
+
description: >
|
|
1974
|
+
Per-axis cost detail (LLM root / nested subagents / compaction / infra). Deliberately untyped — it is an
|
|
1975
|
+
OPEN map whose axes grow with the engine; read defensively rather than modelling it.
|
|
1976
|
+
humanReview:
|
|
1977
|
+
type: object
|
|
1978
|
+
description: MF-24 — human-in-the-loop wait ledger for this task (present once any gate was hit).
|
|
1979
|
+
required: [count, totalWaitMs, gates]
|
|
1980
|
+
properties:
|
|
1981
|
+
count: { type: integer }
|
|
1982
|
+
totalWaitMs: { type: integer }
|
|
1983
|
+
gates:
|
|
1984
|
+
type: array
|
|
1985
|
+
description: One row per gate. OPEN objects — engine may add keys.
|
|
1986
|
+
items:
|
|
1987
|
+
type: object
|
|
1988
|
+
required: [kind, waitMs]
|
|
1989
|
+
additionalProperties: true
|
|
1990
|
+
properties:
|
|
1991
|
+
kind: { type: string }
|
|
1992
|
+
waitMs: { type: integer }
|
|
1993
|
+
decision: { type: string }
|
|
1994
|
+
toolName: { type: string }
|
|
1961
1995
|
required: [turns, tokens]
|
|
1996
|
+
# 🔴 OPEN: the engine may carry fields not named here (live-observed, e.g. extra costBreakdown axes) — the SDK
|
|
1997
|
+
# passes them through rather than dropping, so consumers must not assume this list is exhaustive.
|
|
1998
|
+
additionalProperties: true
|
|
1962
1999
|
|
|
1963
2000
|
TaskRequest:
|
|
1964
2001
|
type: object
|
|
@@ -2086,6 +2123,96 @@ components:
|
|
|
2086
2123
|
properties:
|
|
2087
2124
|
count: { type: integer }
|
|
2088
2125
|
role: { type: string, description: A model role name. }
|
|
2126
|
+
compactionModel:
|
|
2127
|
+
type: string
|
|
2128
|
+
description: >
|
|
2129
|
+
Pin a SEPARATE (usually cheaper) model for compaction. Validated against the catalog on submit — an
|
|
2130
|
+
unknown ref is a 400, not a silent fallback to the main model's price.
|
|
2131
|
+
appendSystemPrompt: { type: string, description: Text appended to the assembled system prompt for this task. }
|
|
2132
|
+
promptProfile:
|
|
2133
|
+
type: string
|
|
2134
|
+
enum: [simple, classic]
|
|
2135
|
+
description: Which prompt-assembly profile to use.
|
|
2136
|
+
clientContext:
|
|
2137
|
+
type: object
|
|
2138
|
+
description: Non-authoritative client hints (never trusted for authz).
|
|
2139
|
+
properties:
|
|
2140
|
+
timeZone: { type: string }
|
|
2141
|
+
userEmail: { type: string }
|
|
2142
|
+
sandboxImageProfile: { type: string, description: Sandbox image profile name for the execution env. }
|
|
2143
|
+
capabilitiesNeeded:
|
|
2144
|
+
type: array
|
|
2145
|
+
items: { type: string }
|
|
2146
|
+
description: Capability names the caller requires; the worker refuses up front rather than 501-ing mid-run.
|
|
2147
|
+
memoryWrite: { type: boolean, description: Allow this task to WRITE user memory (read is governed separately). }
|
|
2148
|
+
settings:
|
|
2149
|
+
type: object
|
|
2150
|
+
description: >
|
|
2151
|
+
TOC `settings.json` contract carried to the worker (CC-parity v1: permissions/hooks/env/model/
|
|
2152
|
+
outputStyle). The SDK owns the schema in `src/settings.ts` (`SemaSettings`) — it is deliberately NOT
|
|
2153
|
+
duplicated here as a component: the service passes it through to core rather than interpreting it, so
|
|
2154
|
+
the TS type is the single authority. OPEN object.
|
|
2155
|
+
additionalProperties: true
|
|
2156
|
+
cwd: { type: string, description: Working directory for the execution env. }
|
|
2157
|
+
selfOrchestration: { type: boolean, description: Permit S8 self-orchestration (run_workflow) inside this task. }
|
|
2158
|
+
enableFork: { type: boolean, description: Permit session forking from inside this task. }
|
|
2159
|
+
agents:
|
|
2160
|
+
type: array
|
|
2161
|
+
items:
|
|
2162
|
+
type: object
|
|
2163
|
+
description: >
|
|
2164
|
+
One per-task sub-agent definition. Shape owned by `TaskAgentDefinition` in the SDK types; kept OPEN
|
|
2165
|
+
here rather than duplicated (same reasoning as `settings`).
|
|
2166
|
+
additionalProperties: true
|
|
2167
|
+
description: Per-task sub-agent definitions (roster additions scoped to this task only).
|
|
2168
|
+
interactiveTools: { type: boolean, description: Mount interactive (prompting) tools. }
|
|
2169
|
+
retainBackgroundProcesses: { type: boolean, description: Keep background processes alive past the turn. }
|
|
2170
|
+
excludeTools:
|
|
2171
|
+
type: array
|
|
2172
|
+
items: { type: string }
|
|
2173
|
+
description: Tool names to withhold from this task's roster.
|
|
2174
|
+
deferTools:
|
|
2175
|
+
type: array
|
|
2176
|
+
items: { type: string }
|
|
2177
|
+
description: Tool names to DEFER (discoverable via tool search instead of mounted up front).
|
|
2178
|
+
attachments:
|
|
2179
|
+
type: object
|
|
2180
|
+
description: >
|
|
2181
|
+
Turn-boundary reminder attachments (design/133 + G1). Each flag opts INTO an injection; omitted = off.
|
|
2182
|
+
`changedFiles` may also be an object to cap the listing.
|
|
2183
|
+
additionalProperties: true
|
|
2184
|
+
properties:
|
|
2185
|
+
todoReminder: { type: boolean }
|
|
2186
|
+
todoReminderMode: { type: string, enum: [baseline, off] }
|
|
2187
|
+
changedFiles:
|
|
2188
|
+
oneOf:
|
|
2189
|
+
- { type: boolean }
|
|
2190
|
+
- { type: object, properties: { maxFiles: { type: integer } } }
|
|
2191
|
+
planModeReminder: { type: boolean }
|
|
2192
|
+
budgetUsd: { type: boolean }
|
|
2193
|
+
backgroundTasks: { type: boolean }
|
|
2194
|
+
toolsDelta: { type: boolean }
|
|
2195
|
+
agentListing: { type: boolean }
|
|
2196
|
+
skillsListing: { type: boolean }
|
|
2197
|
+
mcpInstructions: { type: boolean }
|
|
2198
|
+
limits:
|
|
2199
|
+
type: object
|
|
2200
|
+
description: >
|
|
2201
|
+
Per-task bounds. The three `false`-only switches are OPT-OUTS of engine defaults (there is no `true`
|
|
2202
|
+
form — passing false disables that default behaviour).
|
|
2203
|
+
properties:
|
|
2204
|
+
timeoutSec: { type: integer }
|
|
2205
|
+
maxOutputTokens: { type: integer }
|
|
2206
|
+
maxTurns: { type: integer }
|
|
2207
|
+
deadlineNudge: { type: boolean, enum: [false] }
|
|
2208
|
+
callCapByDeadline: { type: boolean, enum: [false] }
|
|
2209
|
+
gracefulFinalize: { type: boolean, enum: [false] }
|
|
2210
|
+
outputRetries: { type: integer, description: How many times to retry a malformed structured output. }
|
|
2211
|
+
compaction:
|
|
2212
|
+
type: object
|
|
2213
|
+
description: Compaction tuning for this task.
|
|
2214
|
+
properties:
|
|
2215
|
+
clampTolerance: { type: number }
|
|
2089
2216
|
|
|
2090
2217
|
TaskResult:
|
|
2091
2218
|
type: object
|
|
@@ -2096,6 +2223,46 @@ components:
|
|
|
2096
2223
|
sessionId: { type: string }
|
|
2097
2224
|
status: { $ref: '#/components/schemas/RunStatus' }
|
|
2098
2225
|
result: { type: string }
|
|
2226
|
+
model:
|
|
2227
|
+
type: string
|
|
2228
|
+
description: >
|
|
2229
|
+
MF-25 — the EFFECTIVE model id that served this task: the RESOLVED `Model.id`, NOT the requested
|
|
2230
|
+
`model` ref (which may be a role / catalog name / `@mention`). Lets a UI echo "served by X" instead of
|
|
2231
|
+
the requested ref. A mid-run degradation is reported separately via `degraded`. Verified to reach the
|
|
2232
|
+
wire by a real-HTTP regression pin on the server side (`test/effective-model-echo-wire.test.ts`).
|
|
2233
|
+
salvagedOutput:
|
|
2234
|
+
type: string
|
|
2235
|
+
description: Partial output preserved when the run could not complete normally (best-effort salvage).
|
|
2236
|
+
blockedReason:
|
|
2237
|
+
type: string
|
|
2238
|
+
description: Why a `blocked` status was reached (human-readable).
|
|
2239
|
+
checkpointGate:
|
|
2240
|
+
description: >
|
|
2241
|
+
The gate kind that produced `checkpointToken` when the run suspended. Deliberately UNTYPED here —
|
|
2242
|
+
the shape is core's and still evolving; treat it as opaque and branch on `status`/`errorCode` instead.
|
|
2243
|
+
degraded:
|
|
2244
|
+
type: object
|
|
2245
|
+
description: >
|
|
2246
|
+
Set when the run was served by a FALLBACK model after the requested one became unusable mid-run.
|
|
2247
|
+
`from`/`to` are resolved `Model.id`s; `atTurn` is the turn index where the switch happened.
|
|
2248
|
+
required: [from, to, reason, atTurn]
|
|
2249
|
+
properties:
|
|
2250
|
+
from: { type: string }
|
|
2251
|
+
to: { type: string }
|
|
2252
|
+
reason:
|
|
2253
|
+
type: string
|
|
2254
|
+
description: >
|
|
2255
|
+
Open enum — known values `breaker_open` | `rate_limit` | `budget` | `server_error` |
|
|
2256
|
+
`last_resort`; treat unknown values as opaque rather than failing closed.
|
|
2257
|
+
chain:
|
|
2258
|
+
type: array
|
|
2259
|
+
items: { type: string }
|
|
2260
|
+
description: The full fallback chain walked, when more than one hop occurred.
|
|
2261
|
+
atTurn: { type: integer }
|
|
2262
|
+
structuredOutput:
|
|
2263
|
+
description: >
|
|
2264
|
+
The task's structured (schema-constrained) output when one was requested. Shape is caller-defined,
|
|
2265
|
+
so this is intentionally untyped.
|
|
2099
2266
|
errorCode:
|
|
2100
2267
|
type: string
|
|
2101
2268
|
description: >
|
|
@@ -2144,6 +2311,37 @@ components:
|
|
|
2144
2311
|
description: >
|
|
2145
2312
|
System attribution DERIVED FROM the authenticating credential (unforgeable; body injection ignored).
|
|
2146
2313
|
e.g. oa | cc-mcp | portal. LIVE (service cf1be73).
|
|
2314
|
+
suggestions:
|
|
2315
|
+
type: array
|
|
2316
|
+
items: { type: string }
|
|
2317
|
+
description: Follow-up prompt suggestions produced for this run (absent when none were generated).
|
|
2318
|
+
supervisorCost: { $ref: '#/components/schemas/SupervisorCostBreakdown' }
|
|
2319
|
+
|
|
2320
|
+
SupervisorCostBreakdown:
|
|
2321
|
+
type: object
|
|
2322
|
+
description: >
|
|
2323
|
+
Per-axis cost rollup for a supervised run. `llm` is `null` on a run whose LLM spend was not attributed
|
|
2324
|
+
(e.g. no brain call). All amounts are integer micro-USD (no float drift).
|
|
2325
|
+
required: [llm, infra, totalMicroUsd]
|
|
2326
|
+
properties:
|
|
2327
|
+
llm:
|
|
2328
|
+
type: ['object', 'null']
|
|
2329
|
+
required: [llmRootMicroUsd, nestedSubagentMicroUsd, memoryConsolidationMicroUsd, compactionMicroUsd]
|
|
2330
|
+
properties:
|
|
2331
|
+
llmRootMicroUsd: { type: integer }
|
|
2332
|
+
nestedSubagentMicroUsd: { type: integer }
|
|
2333
|
+
memoryConsolidationMicroUsd: { type: integer }
|
|
2334
|
+
compactionMicroUsd: { type: integer }
|
|
2335
|
+
infra:
|
|
2336
|
+
type: object
|
|
2337
|
+
description: Service-owned infra rates (the engine prices only LLM tokens); all default 0 when unpriced.
|
|
2338
|
+
required: [toolCallMicroUsd, sandboxWalltimeMicroUsd, egressMicroUsd, totalMicroUsd]
|
|
2339
|
+
properties:
|
|
2340
|
+
toolCallMicroUsd: { type: integer }
|
|
2341
|
+
sandboxWalltimeMicroUsd: { type: integer }
|
|
2342
|
+
egressMicroUsd: { type: integer }
|
|
2343
|
+
totalMicroUsd: { type: integer }
|
|
2344
|
+
totalMicroUsd: { type: integer, description: llm + infra. }
|
|
2147
2345
|
|
|
2148
2346
|
CancelAck:
|
|
2149
2347
|
type: object
|
|
@@ -2155,6 +2353,13 @@ components:
|
|
|
2155
2353
|
taskId: { type: string }
|
|
2156
2354
|
status: { type: string }
|
|
2157
2355
|
note: { type: string }
|
|
2356
|
+
errorCode:
|
|
2357
|
+
type: [string, "null"]
|
|
2358
|
+
description: >
|
|
2359
|
+
Present on the two real terminal paths (the common `"cancelled"` outcome, and an explicit `null` when a
|
|
2360
|
+
concurrent reaper/another leg terminalized first — the ack reports the ACTUAL row, it does not fabricate
|
|
2361
|
+
"cancelled"). OMITTED entirely on the plain `cancelling` / no-op branches, so treat absence as "unknown",
|
|
2362
|
+
not as "no error".
|
|
2158
2363
|
|
|
2159
2364
|
ResumeEvicted:
|
|
2160
2365
|
type: object
|
|
@@ -2362,6 +2567,74 @@ components:
|
|
|
2362
2567
|
memory:
|
|
2363
2568
|
type: boolean
|
|
2364
2569
|
description: Memory transparency endpoints (GET/DELETE /v1/memory) available. the pinned wire contract.
|
|
2570
|
+
workflows: { type: boolean, description: "S8 self-orchestration workflow routes are mounted." }
|
|
2571
|
+
workflowsList: { type: boolean, description: "`GET /v1/workflows` list face (separate from the per-run reads)." }
|
|
2572
|
+
resumeAt: { type: boolean, description: "E18 resume-at-message anchors are resolvable." }
|
|
2573
|
+
rewindFiles: { type: boolean, description: "E19 working-tree snapshot/restore is wired." }
|
|
2574
|
+
rewindFilesTo: { type: boolean, description: "Restore to a SPECIFIC entry id (not just the latest snapshot)." }
|
|
2575
|
+
manualCompact: { type: boolean, description: "`POST /v1/runs/:id/compact` (needs a run store)." }
|
|
2576
|
+
sessions: { type: boolean, description: "Session read face (`GET /v1/sessions/:id`)." }
|
|
2577
|
+
sessionList: { type: boolean, description: "`GET /v1/sessions` list/picker face." }
|
|
2578
|
+
sessionSearch: { type: boolean, description: "Server-side session search." }
|
|
2579
|
+
sessionFork: { type: boolean, description: "Session fork verb." }
|
|
2580
|
+
sessionDelete: { type: boolean, description: "Session delete verb." }
|
|
2581
|
+
sessionInit: { type: boolean, description: "Session pre-initialization verb." }
|
|
2582
|
+
sessionPolicy: { type: boolean, description: "E6 per-session operator-tightened tool rules are durable." }
|
|
2583
|
+
usage: { type: boolean, description: "Usage analytics face." }
|
|
2584
|
+
policy: { type: boolean, description: "`GET /v1/policy` (autonomy/permission READ side)." }
|
|
2585
|
+
permissionModeWrite: { type: boolean, description: "Runtime permission-mode WRITE. Advertised false by design — autonomy is CONFIG, not steer; the READ side is `policy`." }
|
|
2586
|
+
modelSelection: { type: boolean, description: "`model` accepted per request." }
|
|
2587
|
+
effortSelection: { type: boolean, description: "`reasoningEffort` accepted per request." }
|
|
2588
|
+
compactionModel: { type: boolean, description: "A separate model may be pinned for compaction." }
|
|
2589
|
+
appendSystemPrompt: { type: boolean, description: "Per-request system-prompt append is honoured." }
|
|
2590
|
+
toolOutput: { type: boolean, description: "`tool_end` carries the model-facing output." }
|
|
2591
|
+
messageIdentity: { type: boolean, description: "Content events carry `eventId` (+ `parentToolCallId` for sub-agents)." }
|
|
2592
|
+
forwardSubagentEvents: { type: boolean, description: "Sub-agent events are forwarded onto the parent stream." }
|
|
2593
|
+
subagentSteer: { type: boolean, description: "Mid-flight steer of a named sub-agent." }
|
|
2594
|
+
subagentResume: { type: boolean, description: "Operator resume of a settled sub-agent." }
|
|
2595
|
+
subagentOutput: { type: boolean, description: "Sub-agent output read face." }
|
|
2596
|
+
subagentStream: { type: boolean, description: "Per-sub-agent event stream." }
|
|
2597
|
+
taskHandles: { type: boolean, description: "Durable task handles (output/stop verbs by handle)." }
|
|
2598
|
+
taskAgents: { type: boolean, description: "Per-task agent definitions are accepted." }
|
|
2599
|
+
retainBackgroundProcesses: { type: boolean, description: "Background processes may be retained past the turn." }
|
|
2600
|
+
interactiveTools: { type: boolean, description: "Interactive (prompting) tools are available." }
|
|
2601
|
+
projectContext: { type: boolean, description: "Project-context injection is wired." }
|
|
2602
|
+
mcp: { type: boolean, description: "MCP servers can be attached." }
|
|
2603
|
+
mcpInjection: { type: boolean, description: "Per-request MCP injection is accepted." }
|
|
2604
|
+
mcpElicitation: { type: boolean, description: "MCP elicitation round-trips are supported." }
|
|
2605
|
+
askUserQuestion: { type: boolean, description: "AskUserQuestion gate is available (durable when approvals are)." }
|
|
2606
|
+
toolApproval: { type: boolean, description: "Tool-approval gating is active." }
|
|
2607
|
+
promptSuggestions: { type: boolean, description: "Follow-up prompt suggestions are generated." }
|
|
2608
|
+
modelUsage: { type: boolean, description: "`GET /v1/runs/:id/model-usage` (needs a run store + usage plane)." }
|
|
2609
|
+
scheduler: { type: boolean, description: "Assistant-scheduler face is mounted." }
|
|
2610
|
+
sendUserFile: { type: boolean, description: "Outbound user-file delivery is wired." }
|
|
2611
|
+
sendUserFileLedger: { type: boolean, description: "The send-file ledger (audit of deliveries) is available." }
|
|
2612
|
+
excludeTools:
|
|
2613
|
+
type: array
|
|
2614
|
+
items: { type: string }
|
|
2615
|
+
description: Tool names this worker will honour in a request's exclude list.
|
|
2616
|
+
deferTools:
|
|
2617
|
+
type: array
|
|
2618
|
+
items: { type: string }
|
|
2619
|
+
description: Tool names that can be DEFERRED (surfaced via search rather than mounted up front).
|
|
2620
|
+
s3PublicEndpoint:
|
|
2621
|
+
type: ["string", "null"]
|
|
2622
|
+
description: >
|
|
2623
|
+
Public base URL for artifact/snapshot links, when the deployment exposes one. `null` = not configured
|
|
2624
|
+
(links are then worker-relative). One of only two NON-boolean capability values the server emits.
|
|
2625
|
+
taskSettings:
|
|
2626
|
+
type: object
|
|
2627
|
+
description: >
|
|
2628
|
+
Which `settings.json` sub-faces this worker honours (CC-parity v1). OPEN object — unknown keys may
|
|
2629
|
+
appear. The other non-boolean capability value.
|
|
2630
|
+
additionalProperties: true
|
|
2631
|
+
properties:
|
|
2632
|
+
permissions: { type: boolean }
|
|
2633
|
+
permissionMode: { type: boolean }
|
|
2634
|
+
model: { type: boolean }
|
|
2635
|
+
outputStyle: { type: boolean }
|
|
2636
|
+
env: { type: boolean }
|
|
2637
|
+
hooks: { type: boolean }
|
|
2365
2638
|
memoryWrite:
|
|
2366
2639
|
type: boolean
|
|
2367
2640
|
description: MF-30 — memory WRITE (append/edit/forget) available (deps.memory.append; server.ts:828).
|
|
@@ -2583,6 +2856,9 @@ components:
|
|
|
2583
2856
|
properties:
|
|
2584
2857
|
id: { type: string, description: 'Run id (= WorkflowRun.id).' }
|
|
2585
2858
|
scope: { type: string, description: 'Tenant/group scope (= the creating principal).' }
|
|
2859
|
+
name: { type: string, description: "The workflow script's declared `meta.name`." }
|
|
2860
|
+
description: { type: string, description: "The workflow script's declared `meta.description` (one-liner)." }
|
|
2861
|
+
currentPhase: { type: string, description: 'Title of the phase currently executing (absent once terminal).' }
|
|
2586
2862
|
status: { $ref: '#/components/schemas/WorkflowRunStatus' }
|
|
2587
2863
|
phaseCount: { type: integer, description: 'Phases recorded.' }
|
|
2588
2864
|
agentCount: { type: integer, description: 'Agent-runs recorded.' }
|
|
@@ -2601,6 +2877,8 @@ components:
|
|
|
2601
2877
|
properties:
|
|
2602
2878
|
id: { type: string }
|
|
2603
2879
|
scope: { type: string }
|
|
2880
|
+
name: { type: string, description: "The workflow script's declared `meta.name`." }
|
|
2881
|
+
description: { type: string, description: "The workflow script's declared `meta.description` (one-liner)." }
|
|
2604
2882
|
status: { $ref: '#/components/schemas/WorkflowRunStatus' }
|
|
2605
2883
|
phases: { type: array, description: 'Phase records (permissive).', items: {} }
|
|
2606
2884
|
agents: { type: array, description: 'Agent-run records (permissive).', items: {} }
|
|
@@ -2873,6 +3151,18 @@ components:
|
|
|
2873
3151
|
(they carry a RiskDescriptor); ABSENT for resource_limit/needs_review/plan_review — UI tolerates undefined.
|
|
2874
3152
|
spentMicroUsd: { type: number, description: 'cumulative spend on the suspend chain (when a resource ledger is attached).' }
|
|
2875
3153
|
deadline: { type: integer, description: 'awaiting-human SLA deadline (epoch ms).' }
|
|
3154
|
+
contentKind:
|
|
3155
|
+
type: string
|
|
3156
|
+
description: >
|
|
3157
|
+
Open enum (known value `content_ask`) distinguishing WHAT is being asked about, for gates whose payload
|
|
3158
|
+
is content rather than a tool call. Treat unknown values as opaque.
|
|
3159
|
+
sourceTaskId: { type: string, description: 'The task that produced this checkpoint (when distinct from sessionId).' }
|
|
3160
|
+
principal: { type: string, description: 'The submitting principal, when the deployment records one.' }
|
|
3161
|
+
createdAt: { type: integer, description: 'Creation time, epoch ms (NOTE — SessionRecord.createdAt is an ISO string).' }
|
|
3162
|
+
preview:
|
|
3163
|
+
description: >
|
|
3164
|
+
Optional human-facing preview of what is being approved. Deliberately UNTYPED — the shape follows the
|
|
3165
|
+
gate kind and is meant for display only; never branch on it.
|
|
2876
3166
|
|
|
2877
3167
|
InboxRow:
|
|
2878
3168
|
description: >
|
|
@@ -2883,6 +3173,20 @@ components:
|
|
|
2883
3173
|
- type: object
|
|
2884
3174
|
properties:
|
|
2885
3175
|
objective: { type: ['string', 'null'], description: 'task objective, null if unavailable.' }
|
|
3176
|
+
toolName:
|
|
3177
|
+
type: ['string', 'null']
|
|
3178
|
+
description: 'The gated tool, when the pause came from a tool call (null for non-tool gates).'
|
|
3179
|
+
toolCallId: { type: string, description: 'The gated tool-call id.' }
|
|
3180
|
+
boundCallId: { type: string, description: 'D-1 decision binding — echo it back on /decide.' }
|
|
3181
|
+
boundInputHash:
|
|
3182
|
+
type: string
|
|
3183
|
+
description: >
|
|
3184
|
+
D-1 decision binding — hash of the bound tool input. Echo on /decide so an approval cannot land on
|
|
3185
|
+
a DIFFERENT call that was swapped in after the operator looked.
|
|
3186
|
+
input:
|
|
3187
|
+
description: >
|
|
3188
|
+
REDACTED tool input for display. Untyped by design (per-tool shape) — and note the raw `toolInput`
|
|
3189
|
+
is deliberately NOT on this row: the handler always strips it (along with `token`) before returning.
|
|
2886
3190
|
|
|
2887
3191
|
InboxList:
|
|
2888
3192
|
type: object
|
|
@@ -2960,6 +3264,10 @@ components:
|
|
|
2960
3264
|
properties:
|
|
2961
3265
|
provider: { type: string }
|
|
2962
3266
|
modelId: { type: string }
|
|
3267
|
+
window:
|
|
3268
|
+
$ref: '#/components/schemas/SessionWindow'
|
|
3269
|
+
promptEpoch:
|
|
3270
|
+
$ref: '#/components/schemas/PromptEpoch'
|
|
2963
3271
|
messages:
|
|
2964
3272
|
type: array
|
|
2965
3273
|
items: {}
|
|
@@ -2980,6 +3288,45 @@ components:
|
|
|
2980
3288
|
runCount: { type: integer }
|
|
2981
3289
|
objectivePreview: { type: ['string', 'null'] }
|
|
2982
3290
|
lastStatus: { type: string }
|
|
3291
|
+
lastRunId:
|
|
3292
|
+
type: ['string', 'null']
|
|
3293
|
+
description: The most recent run's id (null when the session has no run yet) — lets a picker deep-link.
|
|
3294
|
+
title:
|
|
3295
|
+
type: ['string', 'null']
|
|
3296
|
+
description: >
|
|
3297
|
+
Auto-generated session summary title (service-side `session-titler`: one cheap model call kicked off in
|
|
3298
|
+
the background after the first submit, idempotent via an IS-NULL gate). Genuinely `null` until it lands,
|
|
3299
|
+
so render a fallback rather than waiting on it.
|
|
3300
|
+
|
|
3301
|
+
SessionWindow:
|
|
3302
|
+
type: object
|
|
3303
|
+
description: >
|
|
3304
|
+
Pagination window echoed by `GET /v1/sessions/:id` when the caller asked for a message slice.
|
|
3305
|
+
OPEN object — additional keys may appear.
|
|
3306
|
+
required: [offset, total]
|
|
3307
|
+
additionalProperties: true
|
|
3308
|
+
properties:
|
|
3309
|
+
offset: { type: integer, description: Index of the first returned message within the full context. }
|
|
3310
|
+
total: { type: integer, description: Total messages available (so a client can page). }
|
|
3311
|
+
|
|
3312
|
+
PromptEpoch:
|
|
3313
|
+
type: object
|
|
3314
|
+
description: >
|
|
3315
|
+
A session's prompt-epoch pin (server >=1.220, additive on `GET /v1/sessions/:id`). Identifies WHICH
|
|
3316
|
+
assembled system-prompt artifact this session is pinned to, so a transcript stays reproducible across
|
|
3317
|
+
prompt-pack releases. IDs/digests only — never prompt text. OPEN object.
|
|
3318
|
+
required: [epoch, artifactDigest, packId, assemblyApi, activatedBy]
|
|
3319
|
+
additionalProperties: true
|
|
3320
|
+
properties:
|
|
3321
|
+
epoch: { type: integer, description: Monotonic epoch counter within the session. }
|
|
3322
|
+
artifactDigest: { type: string, description: 'Content digest of the assembled artifact (`sha256:<64 hex>`).' }
|
|
3323
|
+
packId: { type: string, description: 'Prompt-pack identity, e.g. `sema-default@1`.' }
|
|
3324
|
+
assemblyApi: { type: integer, description: Assembly-contract version (currently always 1). }
|
|
3325
|
+
activatedBy:
|
|
3326
|
+
type: string
|
|
3327
|
+
description: >
|
|
3328
|
+
Open enum — known values `session_start` | `compaction` | `legacy_migration`; treat unknown values as
|
|
3329
|
+
opaque rather than failing closed.
|
|
2983
3330
|
|
|
2984
3331
|
SessionListPage:
|
|
2985
3332
|
type: object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
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",
|