@sema-agent/sdk 9.8.0 → 9.8.1

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 CHANGED
@@ -79,6 +79,10 @@ not, so a decoder that rejects "any Z" is wrong).
79
79
 
80
80
  Typed errors (`APIError` hierarchy: `AuthError`, `RateLimitedError`, `ConflictError`, `ApprovalStaleError`, …) let callers branch on semantics instead of strings.
81
81
 
82
+ ## 9.8.1 — 2026-09-19(spec-only patch;零运行时改动)
83
+
84
+ - `spec/openapi.yaml` device 四个文本字段的长度单位写真:`DeviceRevokeRequest.reason` / `DeviceEnrollRequest.{displayName,platformArch,workspaceRoot}` 在 server 侧按 **UTF-8 字节**门禁(`Buffer.byteLength`),本文件的全局单位约定只在字段**显式写明 UTF-8** 时才允许这个例外——9.8.0 的 `reason` 只写了 BYTES、另三个字段没有 `maxLength`。现在四个字段都带 server 的数字作**宽松字符界**(方向刻意:多字节值可过 schema、被 server 以点名字段的 400 拒,绝不出现客户端假拒)并写明 UTF-8。codex 补审 r1 抓出(sdk 台账 K-03)。
85
+
82
86
  ## 9.8.0 — 2026-09-19(additive;追平 server **7.88.0 → 7.88.2** 的 device 车道面;新子路径 `@sema-agent/sdk/device`;devDep server 钉 7.87.1 → 7.88.2)
83
87
 
84
88
  **一句话:device 车道在 SDK 上此前是一片空白 —— 管理面六动词无型、提交体的 `deviceId` 无键、能力位 `deviceExecutor.management` 只能从索引签名拿 `unknown`、而 executor 最需要的那两只纯函数(握手签名的字节编码)只存在于 server 包里;这一车把四件一次补齐,并给协议镜像装上对 server **发布字节**的同源锚门五格。**
package/openapi.yaml CHANGED
@@ -16707,9 +16707,9 @@ components:
16707
16707
  type: string
16708
16708
  enum: [darwin, linux]
16709
16709
  description: 'The v1 CLOSED SET. A third value (e.g. `win32`) ⇒ 400 request.field_invalid — never silently accepted.'
16710
- platformArch: { type: string }
16711
- displayName: { type: string, description: 'Echoed back by `GET /v1/devices` as `name`, and HONESTLY ABSENT there when empty.' }
16712
- workspaceRoot: { type: string, minLength: 1, description: 'The device-side root every instruction resolves against. Required and non-empty. Over its byte column ⇒ 400 (a silently truncated value is a DIFFERENT value).' }
16710
+ platformArch: { type: string, maxLength: 32, description: 'At most 32 **UTF-8 bytes** (producer gates byte length; `maxLength` is the looser character bound, see the unit convention).' }
16711
+ displayName: { type: string, maxLength: 255, description: 'Echoed back by `GET /v1/devices` as `name`, and HONESTLY ABSENT there when empty. At most 255 **UTF-8 bytes** (producer gates byte length; `maxLength` is the looser character bound).' }
16712
+ workspaceRoot: { type: string, minLength: 1, maxLength: 1024, description: 'The device-side root every instruction resolves against. Required and non-empty. At most 1024 **UTF-8 bytes** (producer gates byte length; `maxLength` is the looser character bound) ⇒ over it 400 request.field_invalid (a silently truncated value is a DIFFERENT value).' }
16713
16713
 
16714
16714
  DeviceEnrollResult:
16715
16715
  type: object
@@ -16730,7 +16730,7 @@ components:
16730
16730
  description: 'The `POST /v1/devices/{deviceId}/revoke` body (closed shape; the only accepted key is `reason`). Absent body is folded to `{}` server-side.'
16731
16731
  additionalProperties: false
16732
16732
  properties:
16733
- reason: { type: string, maxLength: 512, description: 'At most 512 BYTES; over it ⇒ 400 request.field_invalid — a silently truncated audit reason is a DIFFERENT reason.' }
16733
+ reason: { type: string, maxLength: 512, description: 'At most 512 **UTF-8 bytes** (the producer gates `Buffer.byteLength(reason, "utf8")`, NOT `.length` — this is the one family where the file''s unit convention''s explicit-UTF-8 carve-out applies); `maxLength: 512` is the deliberately LOOSER character bound (a multi-byte value can pass this schema and still get 400 request.field_invalid naming the field — loud, never a client-side false refusal). A silently truncated audit reason is a DIFFERENT reason.' }
16734
16734
 
16735
16735
  DeviceRevokeResult:
16736
16736
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/sdk",
3
- "version": "9.8.0",
3
+ "version": "9.8.1",
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",