@sema-agent/sdk 11.2.1 → 12.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.
Files changed (51) hide show
  1. package/README.md +102 -0
  2. package/dist/control-types.d.ts +12 -10
  3. package/dist/control-types.d.ts.map +1 -1
  4. package/dist/control-types.js +1 -1
  5. package/dist/control-types.js.map +1 -1
  6. package/dist/errors.d.ts +9 -1
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +11 -3
  9. package/dist/errors.js.map +1 -1
  10. package/dist/events.d.ts +10 -0
  11. package/dist/events.d.ts.map +1 -1
  12. package/dist/events.js.map +1 -1
  13. package/dist/health.d.ts +118 -6
  14. package/dist/health.d.ts.map +1 -1
  15. package/dist/health.js +51 -1
  16. package/dist/health.js.map +1 -1
  17. package/dist/index.d.ts +13 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +6 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/registry/auth.d.ts +36 -16
  22. package/dist/registry/auth.d.ts.map +1 -1
  23. package/dist/registry/auth.js +17 -4
  24. package/dist/registry/auth.js.map +1 -1
  25. package/dist/registry/errors.d.ts +6 -5
  26. package/dist/registry/errors.d.ts.map +1 -1
  27. package/dist/registry/errors.js +6 -5
  28. package/dist/registry/errors.js.map +1 -1
  29. package/dist/registry/index.d.ts +3 -3
  30. package/dist/registry/index.js +3 -3
  31. package/dist/registry/scopes-effective.d.ts +34 -6
  32. package/dist/registry/scopes-effective.d.ts.map +1 -1
  33. package/dist/registry/scopes-effective.js +2 -2
  34. package/dist/registry/scopes-effective.js.map +1 -1
  35. package/dist/resources/approvals.d.ts +41 -0
  36. package/dist/resources/approvals.d.ts.map +1 -1
  37. package/dist/resources/approvals.js.map +1 -1
  38. package/dist/resources/sessions.d.ts +40 -1
  39. package/dist/resources/sessions.d.ts.map +1 -1
  40. package/dist/resources/sessions.js +48 -0
  41. package/dist/resources/sessions.js.map +1 -1
  42. package/dist/resources/tool-approvals.d.ts +102 -14
  43. package/dist/resources/tool-approvals.d.ts.map +1 -1
  44. package/dist/resources/tool-approvals.js +49 -1
  45. package/dist/resources/tool-approvals.js.map +1 -1
  46. package/dist/types.d.ts +180 -13
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/types.js.map +1 -1
  49. package/openapi.yaml +463 -14
  50. package/package.json +2 -2
  51. package/registry-openapi.yaml +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/sdk",
3
- "version": "11.2.1",
3
+ "version": "12.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",
@@ -52,6 +52,6 @@
52
52
  "prepublishOnly": "rm -f tsconfig.tsbuildinfo && npm run build && npm run typecheck --workspaces=false --prefix ../.. && npm test --workspaces=false --prefix ../.."
53
53
  },
54
54
  "devDependencies": {
55
- "@sema-agent/registry-core": "^0.17.1"
55
+ "@sema-agent/settings-schema": "^5.0.0"
56
56
  }
57
57
  }
@@ -4,7 +4,8 @@ info:
4
4
  version: "0.1.0"
5
5
  description: >
6
6
  ⚠️ AUTHORITY POSTURE (read first): the registry SERVER lives in the sema-registry repo (web AI);
7
- the machine contract single-source is `@sema-agent/registry-core` (zod schemas + path constants —
7
+ the machine contract single-source is `@sema-agent/settings-schema` (renamed from
8
+ `@sema-agent/registry-core` at 1.0.0, 2026-08-26; zod schemas + path constants —
8
9
  AUTH_V1_PATHS/SCOPES_V1_PATHS etc.; the SDK keeps value-copies with same-source anchor tests).
9
10
  THIS file documents the surface the SDK's registry subpath actually calls, so a consumer generating
10
11
  a client from spec sees the full face — it mirrors, it does not rule. Backfilled 2026-07-28 from
@@ -12,7 +13,7 @@ info:
12
13
  `registry-spec-path-gate.test.ts` (reflective: every /api path the SDK hits must be here, zero baseline).
13
14
  USER-PLANE paths carry real request/response shapes; the ADMIN family (RegistryAdmin, user-JWT
14
15
  role-gated — "admin" is a registry-side ROLE, not a separate credential) is documented loose
15
- (operator tooling; shapes live in registry-core/zod and the registry server).
16
+ (operator tooling; shapes live in settings-schema/zod and the registry server).
16
17
  x-sdk-subpath: "@sema-agent/sdk/registry"
17
18
  paths:
18
19
  /api/healthz:
@@ -27,7 +28,7 @@ paths:
27
28
  post:
28
29
  operationId: registryDeviceCode
29
30
  summary: Start the device-authorization flow (requestDeviceCode).
30
- requestBody: { required: false, content: { application/json: { schema: { type: object, additionalProperties: true, description: 'registry-core DeviceCodeRequest (open: client metadata).' } } } }
31
+ requestBody: { required: false, content: { application/json: { schema: { type: object, additionalProperties: true, description: 'settings-schema DeviceCodeRequest (open: client metadata).' } } } }
31
32
  responses:
32
33
  '200':
33
34
  description: '{device_code, user_code, verification_uri(_complete)?, interval, expires_in}.'
@@ -36,7 +37,7 @@ paths:
36
37
  post:
37
38
  operationId: registryDeviceToken
38
39
  summary: Poll the device flow (pollUntilApproved's leg).
39
- requestBody: { required: true, content: { application/json: { schema: { type: object, required: [grant_type, device_code], properties: { grant_type: { type: string, description: 'The RFC 8628 device grant type constant (registry-core DEVICE_GRANT_TYPE).' }, device_code: { type: string } } } } } }
40
+ requestBody: { required: true, content: { application/json: { schema: { type: object, required: [grant_type, device_code], properties: { grant_type: { type: string, description: 'The RFC 8628 device grant type constant (settings-schema DEVICE_GRANT_TYPE).' }, device_code: { type: string } } } } } }
40
41
  description: >
41
42
  OAuth device-token semantics: `authorization_pending` keeps the interval, `slow_down` adds +5s,
42
43
  `access_denied`/`expired_token` are terminal (typed errors in the SDK). Success = the token pair.
@@ -85,7 +86,7 @@ paths:
85
86
  operationId: registryScopesList
86
87
  summary: List the caller's scopes (listScopes; `?counts=` optional).
87
88
  responses:
88
- '200': { description: 'ScopesListResponse (registry-core schema).', content: { application/json: { schema: { type: object, additionalProperties: true } } } }
89
+ '200': { description: 'ScopesListResponse (settings-schema schema).', content: { application/json: { schema: { type: object, additionalProperties: true } } } }
89
90
  post:
90
91
  operationId: registryScopesCreate
91
92
  summary: 'ADMIN: create a scope/space.'