dominus-sdk-nodejs 11.0.3 → 11.0.5

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 (54) hide show
  1. package/README.md +351 -351
  2. package/dist/contract/index.d.ts +3 -0
  3. package/dist/contract/index.d.ts.map +1 -0
  4. package/dist/contract/index.js +3 -0
  5. package/dist/contract/index.js.map +1 -0
  6. package/dist/contract/node-envelope.d.ts +12 -0
  7. package/dist/contract/node-envelope.d.ts.map +1 -0
  8. package/dist/contract/node-envelope.js +16 -0
  9. package/dist/contract/node-envelope.js.map +1 -0
  10. package/dist/contract/node-projections.d.ts +15 -0
  11. package/dist/contract/node-projections.d.ts.map +1 -0
  12. package/dist/contract/node-projections.js +4 -0
  13. package/dist/contract/node-projections.js.map +1 -0
  14. package/dist/namespaces/portal.d.ts +10 -0
  15. package/dist/namespaces/portal.d.ts.map +1 -1
  16. package/dist/namespaces/portal.js +11 -0
  17. package/dist/namespaces/portal.js.map +1 -1
  18. package/dist/namespaces/secrets.d.ts +5 -1
  19. package/dist/namespaces/secrets.d.ts.map +1 -1
  20. package/dist/namespaces/secrets.js +15 -1
  21. package/dist/namespaces/secrets.js.map +1 -1
  22. package/docs/agent-guide/2026-06-27-0849-sdk-orient/00-reading-order.md +35 -35
  23. package/docs/agent-guide/2026-06-27-0849-sdk-orient/01-purpose-and-boundaries.md +48 -48
  24. package/docs/agent-guide/2026-06-27-0849-sdk-orient/02-repo-map-and-entrypoints.md +46 -46
  25. package/docs/agent-guide/2026-06-27-0849-sdk-orient/03-api-surface.md +59 -59
  26. package/docs/agent-guide/2026-06-27-0849-sdk-orient/04-data-state-and-storage.md +36 -36
  27. package/docs/agent-guide/2026-06-27-0849-sdk-orient/05-integrations-and-runtime.md +40 -40
  28. package/docs/agent-guide/2026-06-27-0849-sdk-orient/06-workflows-commands-and-ci.md +58 -58
  29. package/docs/agent-guide/2026-06-27-0849-sdk-orient/07-operations-release-and-live-proof.md +40 -40
  30. package/docs/agent-guide/2026-06-27-0849-sdk-orient/08-security-privacy-and-secrets.md +38 -38
  31. package/docs/agent-guide/2026-06-27-0849-sdk-orient/09-known-risks-and-debt.md +34 -34
  32. package/docs/agent-guide/2026-06-27-0849-sdk-orient/10-agent-playbook.md +48 -48
  33. package/docs/agent-guide/2026-08-04-sdk-nodejs/00-reading-order.md +11 -11
  34. package/docs/agent-guide/2026-08-04-sdk-nodejs/01-purpose-and-boundaries.md +14 -14
  35. package/docs/agent-guide/2026-08-04-sdk-nodejs/03-api-surface.md +16 -16
  36. package/docs/agent-guide/2026-08-04-sdk-nodejs/10-agent-playbook.md +14 -14
  37. package/docs/agent-guide/INDEX.md +14 -14
  38. package/docs/agent-guide/current.md +22 -22
  39. package/docs/architecture.md +119 -119
  40. package/docs/atlas/2026-07-24-1231-sdk-nodejs-blockers.md +15 -15
  41. package/docs/atlas/2026-07-24-1231-sdk-nodejs-proof-ladder.md +25 -25
  42. package/docs/atlas/2026-07-24-1231-sdk-nodejs-truthmap.md +43 -43
  43. package/docs/atlas/2026-08-04-sdk-nodejs-blockers.md +12 -12
  44. package/docs/atlas/2026-08-04-sdk-nodejs-proof-ladder.md +9 -9
  45. package/docs/atlas/2026-08-04-sdk-nodejs-truthmap.md +21 -21
  46. package/docs/atlas/INDEX.md +26 -26
  47. package/docs/janitor/2026-06-27-0849-sdk-orient-cleanup-audit.md +102 -102
  48. package/docs/janitor/2026-08-04-sdk-nodejs-cleanup-audit.md +14 -14
  49. package/docs/migration-error-base.md +115 -0
  50. package/docs/plans/2026-08-04-pending-work-fruition-summary.md +46 -46
  51. package/docs/routes-services.md +80 -80
  52. package/docs/usage-reference.md +698 -698
  53. package/docs/workflow-hard-cut-release.md +24 -24
  54. package/package.json +55 -55
@@ -1,46 +1,46 @@
1
- # Pending work fruition summary: dominus-sdk-nodejs
2
-
3
- Generated: 2026-08-04 local. This note analyzes existing linked work without
4
- changing it.
5
-
6
- ## What is present
7
-
8
- The repository has four local linked worktrees around two related themes. The
9
- timeline contract v9 line adds a target query filter and retires the older
10
- company query option. The secret-presence-grid v10 lines add safe presence
11
- data, persisted root-role exposure, and preview code-point counting; reconciled
12
- and release branches carry the latest versions of that work. The main checkout
13
- was not modified and the current production snapshot is separate from those
14
- feature branches.
15
-
16
- ## Likely path to completion
17
-
18
- 1. Compare the timeline and secret-presence branches with current `production`
19
- and choose one coherent SDK contract candidate. Preserve backward
20
- compatibility only where the server contract still requires it.
21
- 2. Trace the timeline query change through Authority methods, generated/public
22
- types, tests, and README examples; confirm the retired company option is
23
- absent where intended and target filtering is consistently shaped.
24
- 3. Trace the secret-presence change through admin/secrets namespaces, preview
25
- counting, root-role projections, public types, and server endpoints. Keep
26
- all responses value-safe and avoid implying secret availability from
27
- indeterminate provider state.
28
- 4. Run build, type tests, the full Node test suite, and focused contract tests
29
- on the reconciled candidate. Then bump the package version once for the
30
- actual release candidate and verify the new version is absent from the
31
- registry.
32
- 5. Push the exact `production` candidate and use the publish workflow plus
33
- registry/version verification to establish package completion. Pair that
34
- with downstream Gateway/worker contract proof where the SDK behavior is
35
- load-bearing.
36
-
37
- ## Open questions
38
-
39
- - Whether timeline v9 and secret-presence v10 should ship together or as two
40
- independently versioned SDK releases.
41
- - Whether persisted root-role data is already available in every targeted
42
- server environment or needs a typed unavailable state in the SDK.
43
- - Which release branch is canonical among the reconciled and release worktrees.
44
-
45
- These questions are intentionally left for contract/release review; the
46
- existing implementation remains untouched.
1
+ # Pending work fruition summary: dominus-sdk-nodejs
2
+
3
+ Generated: 2026-08-04 local. This note analyzes existing linked work without
4
+ changing it.
5
+
6
+ ## What is present
7
+
8
+ The repository has four local linked worktrees around two related themes. The
9
+ timeline contract v9 line adds a target query filter and retires the older
10
+ company query option. The secret-presence-grid v10 lines add safe presence
11
+ data, persisted root-role exposure, and preview code-point counting; reconciled
12
+ and release branches carry the latest versions of that work. The main checkout
13
+ was not modified and the current production snapshot is separate from those
14
+ feature branches.
15
+
16
+ ## Likely path to completion
17
+
18
+ 1. Compare the timeline and secret-presence branches with current `production`
19
+ and choose one coherent SDK contract candidate. Preserve backward
20
+ compatibility only where the server contract still requires it.
21
+ 2. Trace the timeline query change through Authority methods, generated/public
22
+ types, tests, and README examples; confirm the retired company option is
23
+ absent where intended and target filtering is consistently shaped.
24
+ 3. Trace the secret-presence change through admin/secrets namespaces, preview
25
+ counting, root-role projections, public types, and server endpoints. Keep
26
+ all responses value-safe and avoid implying secret availability from
27
+ indeterminate provider state.
28
+ 4. Run build, type tests, the full Node test suite, and focused contract tests
29
+ on the reconciled candidate. Then bump the package version once for the
30
+ actual release candidate and verify the new version is absent from the
31
+ registry.
32
+ 5. Push the exact `production` candidate and use the publish workflow plus
33
+ registry/version verification to establish package completion. Pair that
34
+ with downstream Gateway/worker contract proof where the SDK behavior is
35
+ load-bearing.
36
+
37
+ ## Open questions
38
+
39
+ - Whether timeline v9 and secret-presence v10 should ship together or as two
40
+ independently versioned SDK releases.
41
+ - Whether persisted root-role data is already available in every targeted
42
+ server environment or needs a typed unavailable state in the SDK.
43
+ - Which release branch is canonical among the reconciled and release worktrees.
44
+
45
+ These questions are intentionally left for contract/release review; the
46
+ existing implementation remains untouched.
@@ -1,80 +1,80 @@
1
- # Routes, Services, and Endpoints Assessment
2
-
3
- This assessment is derived from all public namespace methods under `src/namespaces/` and their configured routes in SDK request calls.
4
-
5
- Audited commands: **~450** (hand-counted) across **27** top-level namespace files in `src/namespaces/`. The Service Matrix below lists **29** namespace surfaces because it expands dotted sub-namespaces (e.g. `ai.*` and `auth.*`) into their own rows, so the surface count is intentionally higher than the file count, not a typo. These totals are hand-maintained — re-derive from source before quoting.
6
-
7
- ## Service Matrix
8
-
9
- | Service | Commands | Namespaces | Distinct Route Expressions | Notes |
10
- |---|---:|---|---:|---|
11
- | `guardian` | 146 | dominus.auth | 146 | HTTP API routes via Dominus client. |
12
- | `agent-runtime` | 53 | dominus.ai, dominus.ai.artifacts, dominus.ai.rag, dominus.ai.results, dominus.ai.tools, dominus.ai.workflow | 51 | HTTP API routes via Dominus client. |
13
- | `workflow-manager` | 38 | dominus.workflow | 36 | HTTP API routes via Dominus client. |
14
- | `authority` | 33 | dominus.authority | 33 | Hard-cut app/org/env Authority surface. |
15
- | `platform-worker` | 16 | dominus.platform | 16 | Gateway `/svc/platform/*` group/repository policy surface; policy helpers accept actor attribution headers. |
16
- | `coder-runtime` | 11 | dominus.coder | 11 | Gateway `/svc/coder/*` run lifecycle surface; launch requires exactly one workflow or pipeline recipe ref. |
17
- | `browser-worker` | 11 | dominus.browser | 10 | Authenticated `/svc/browser/*` browser automation primitive; Cloudflare Browser Run default, Browserbase fallback. |
18
- | `portal-worker` | 22 | dominus.portal | 22 | HTTP API routes via Dominus client. |
19
- | `db-worker` | 20 | dominus.db, dominus.ddl | 19 | HTTP API routes via Dominus client. |
20
- | `smith` | 15 | dominus.ddl | 15 | HTTP API routes via Dominus client. |
21
- | `b2-worker` | 14 | dominus.files | 14 | HTTP API routes via Dominus client. |
22
- | `redis-worker` | 14 | dominus.redis | 14 | HTTP API routes via Dominus client. |
23
- | `logs-worker` | 9 | dominus.logs | 4 | HTTP API routes via Dominus client; tail filters include `machine_id`. |
24
- | `scribe` | 7 | dominus.secure | 7 | HTTP API routes via Dominus client. |
25
- | `job-worker` | 8 | dominus.jobs | 6 | HTTP API routes via Dominus client. |
26
- | `artifact-worker` | 6 | dominus.artifacts | 6 | HTTP API routes via Dominus client. |
27
- | `stash-worker` managed tables | 6 | dominus.stash.tables | 6 | Typed self/group table routes through the authenticated gateway. |
28
- | `admin-worker` | 5 | dominus.admin, dominus.files | 5 | HTTP API routes via Dominus client. |
29
- | `warden` | 4 | dominus.secrets | 1 | Selected-scope grant semantics live in this group. |
30
- | `courier-worker` | 5 | dominus.courier | 2 | HTTP API routes via Dominus client. |
31
- | `gateway-local` | 4 | dominus.auth, dominus.health | 3 | Gateway `/health`, `/v1/ping`, and `/jwt/jwks` helpers. |
32
- | `processor-service` | 3 | dominus.processor | 3 | HTTP API routes via Dominus client. |
33
- | `sync-worker` | 2 | dominus.sync | 2 | HTTP API routes via Dominus client. |
34
- | `local-jwt` | 1 | dominus.auth | 1 | Local JWT parsing/validation helpers in auth namespace. |
35
- | `retired-stt` | 0 | (retired) | 0 | Legacy streaming STT namespace/routes are removed in hard cutover. |
36
-
37
- ## Route Prefix Mapping
38
-
39
- | Prefix | Primary Namespace(s) | Expected Backend |
40
- |---|---|---|
41
- | `/api/warden/*` | secrets | `warden` |
42
- | `/api/guardian/*` | auth | `guardian` |
43
- | `/api/authority/*` | authority | `authority` |
44
- | `/api/platform/*` and `/svc/platform/*` | platform | `platform-worker` |
45
- | `/api/coder/*` and `/svc/coder/*` | coder | `coder-runtime` |
46
- | `/api/browser/*` | browser | `browser-worker` |
47
- | `/api/portal/*` | portal | `portal-worker` |
48
- | `/api/database/* and /api/provision/*` | db, ddl (builder + provisioning) | `db-worker` |
49
- | `/api/scribe/*` | secure, open | `scribe` |
50
- | `/api/smith/*` | ddl | `smith` |
51
- | `/api/redis/*` | redis | `redis-worker` |
52
- | `/api/b2/*` | files | `b2-worker` |
53
- | `/api/courier/*` | courier | `courier-worker` |
54
- | `/api/logs/*` | logs | `logs-worker` |
55
- | `/health`, `/v1/ping` | health | `gateway-local` |
56
- | `/api/admin/*` | admin | `admin-worker` |
57
- | `/api/sync/*` | sync | `sync-worker` |
58
- | `/api/job/*` | jobs | `job-worker` |
59
- | `/api/processor/*` | processor | `processor-service` |
60
- | `/api/artifact/*` | artifacts | `artifact-worker` |
61
- | `/svc/stash/tables/*` | stash.tables | `stash-worker` |
62
- | `/api/rag/*, /api/agent/*, /api/llm/*, /api/results/*, /api/orchestration/*, /api/session/*` | ai, ai.rag, ai.tools, ai.workflow, ai.results | `agent-runtime` |
63
- | `/api/workflow/*` | workflow | `workflow-manager` |
64
- | `/api/agent/stt` | ai.stt | `agent-runtime` |
65
-
66
- ## Local and Helper Operations
67
-
68
- - `dominus.auth.validateJwt` performs local payload checks and expiry validation; it is not a full remote introspection endpoint.
69
- - `dominus.auth.getJwks` fetches and caches public signing keys from `/jwt/jwks`.
70
- - `dominus.health.check` uses direct `fetch` to the gateway `/health` route for low-level availability checks.
71
- - `dominus.ai.stt` sends binary audio to `POST /api/agent/stt` for batch transcription.
72
- - `dominus.authority.*` uses the cutover `appSlug` / `env` / `targetOrgId` / `targetAppSlug` / `targetEnv` vocabulary; `contextResolve()` and `mintSelectedScopeJwt()` now send the canonical `org_id` / `app_slug` / `env` and `target_org_id` / `target_env` wire payloads expected by live gateway routes.
73
- - `dominus.browser.*` routes through `/api/browser/*` with `useGateway: true`, producing authenticated gateway paths under `/svc/browser/*`. Browser run metadata remains worker runtime state; Artifact V2 is only for sanitized result/capture payloads.
74
- - `dominus.platform.*` and `dominus.coder.*` call `/svc/platform/*` and `/svc/coder/*` through `gatewayFetch`. Policy/Coder helpers accept actor context and forward it as `X-Actor-Type` / `X-Actor-Id`; `dominus.coder.ensureRun()` requires exactly one of `workflowRecipeRef` or `pipelineRecipeRef`.
75
- - Convenience wrappers like `dominus.courier.sendWelcome` delegate to core routes (for example `/api/courier/send`).
76
-
77
- ## Coverage Notes
78
-
79
- - Gateway routing is enabled per method via `useGateway: true` in namespace implementations; direct calls still target `/api/*` and are transformed by the client when gateway mode is on.
80
- - The exhaustive per-command listing with params/returns/routes is documented in [usage-reference.md](./usage-reference.md).
1
+ # Routes, Services, and Endpoints Assessment
2
+
3
+ This assessment is derived from all public namespace methods under `src/namespaces/` and their configured routes in SDK request calls.
4
+
5
+ Audited commands: **~450** (hand-counted) across **27** top-level namespace files in `src/namespaces/`. The Service Matrix below lists **29** namespace surfaces because it expands dotted sub-namespaces (e.g. `ai.*` and `auth.*`) into their own rows, so the surface count is intentionally higher than the file count, not a typo. These totals are hand-maintained — re-derive from source before quoting.
6
+
7
+ ## Service Matrix
8
+
9
+ | Service | Commands | Namespaces | Distinct Route Expressions | Notes |
10
+ |---|---:|---|---:|---|
11
+ | `guardian` | 146 | dominus.auth | 146 | HTTP API routes via Dominus client. |
12
+ | `agent-runtime` | 53 | dominus.ai, dominus.ai.artifacts, dominus.ai.rag, dominus.ai.results, dominus.ai.tools, dominus.ai.workflow | 51 | HTTP API routes via Dominus client. |
13
+ | `workflow-manager` | 38 | dominus.workflow | 36 | HTTP API routes via Dominus client. |
14
+ | `authority` | 33 | dominus.authority | 33 | Hard-cut app/org/env Authority surface. |
15
+ | `platform-worker` | 16 | dominus.platform | 16 | Gateway `/svc/platform/*` group/repository policy surface; policy helpers accept actor attribution headers. |
16
+ | `coder-runtime` | 11 | dominus.coder | 11 | Gateway `/svc/coder/*` run lifecycle surface; launch requires exactly one workflow or pipeline recipe ref. |
17
+ | `browser-worker` | 11 | dominus.browser | 10 | Authenticated `/svc/browser/*` browser automation primitive; Cloudflare Browser Run default, Browserbase fallback. |
18
+ | `portal-worker` | 22 | dominus.portal | 22 | HTTP API routes via Dominus client. |
19
+ | `db-worker` | 20 | dominus.db, dominus.ddl | 19 | HTTP API routes via Dominus client. |
20
+ | `smith` | 15 | dominus.ddl | 15 | HTTP API routes via Dominus client. |
21
+ | `b2-worker` | 14 | dominus.files | 14 | HTTP API routes via Dominus client. |
22
+ | `redis-worker` | 14 | dominus.redis | 14 | HTTP API routes via Dominus client. |
23
+ | `logs-worker` | 9 | dominus.logs | 4 | HTTP API routes via Dominus client; tail filters include `machine_id`. |
24
+ | `scribe` | 7 | dominus.secure | 7 | HTTP API routes via Dominus client. |
25
+ | `job-worker` | 8 | dominus.jobs | 6 | HTTP API routes via Dominus client. |
26
+ | `artifact-worker` | 6 | dominus.artifacts | 6 | HTTP API routes via Dominus client. |
27
+ | `stash-worker` managed tables | 6 | dominus.stash.tables | 6 | Typed self/group table routes through the authenticated gateway. |
28
+ | `admin-worker` | 5 | dominus.admin, dominus.files | 5 | HTTP API routes via Dominus client. |
29
+ | `warden` | 4 | dominus.secrets | 1 | Selected-scope grant semantics live in this group. |
30
+ | `courier-worker` | 5 | dominus.courier | 2 | HTTP API routes via Dominus client. |
31
+ | `gateway-local` | 4 | dominus.auth, dominus.health | 3 | Gateway `/health`, `/v1/ping`, and `/jwt/jwks` helpers. |
32
+ | `processor-service` | 3 | dominus.processor | 3 | HTTP API routes via Dominus client. |
33
+ | `sync-worker` | 2 | dominus.sync | 2 | HTTP API routes via Dominus client. |
34
+ | `local-jwt` | 1 | dominus.auth | 1 | Local JWT parsing/validation helpers in auth namespace. |
35
+ | `retired-stt` | 0 | (retired) | 0 | Legacy streaming STT namespace/routes are removed in hard cutover. |
36
+
37
+ ## Route Prefix Mapping
38
+
39
+ | Prefix | Primary Namespace(s) | Expected Backend |
40
+ |---|---|---|
41
+ | `/api/warden/*` | secrets | `warden` |
42
+ | `/api/guardian/*` | auth | `guardian` |
43
+ | `/api/authority/*` | authority | `authority` |
44
+ | `/api/platform/*` and `/svc/platform/*` | platform | `platform-worker` |
45
+ | `/api/coder/*` and `/svc/coder/*` | coder | `coder-runtime` |
46
+ | `/api/browser/*` | browser | `browser-worker` |
47
+ | `/api/portal/*` | portal | `portal-worker` |
48
+ | `/api/database/* and /api/provision/*` | db, ddl (builder + provisioning) | `db-worker` |
49
+ | `/api/scribe/*` | secure, open | `scribe` |
50
+ | `/api/smith/*` | ddl | `smith` |
51
+ | `/api/redis/*` | redis | `redis-worker` |
52
+ | `/api/b2/*` | files | `b2-worker` |
53
+ | `/api/courier/*` | courier | `courier-worker` |
54
+ | `/api/logs/*` | logs | `logs-worker` |
55
+ | `/health`, `/v1/ping` | health | `gateway-local` |
56
+ | `/api/admin/*` | admin | `admin-worker` |
57
+ | `/api/sync/*` | sync | `sync-worker` |
58
+ | `/api/job/*` | jobs | `job-worker` |
59
+ | `/api/processor/*` | processor | `processor-service` |
60
+ | `/api/artifact/*` | artifacts | `artifact-worker` |
61
+ | `/svc/stash/tables/*` | stash.tables | `stash-worker` |
62
+ | `/api/rag/*, /api/agent/*, /api/llm/*, /api/results/*, /api/orchestration/*, /api/session/*` | ai, ai.rag, ai.tools, ai.workflow, ai.results | `agent-runtime` |
63
+ | `/api/workflow/*` | workflow | `workflow-manager` |
64
+ | `/api/agent/stt` | ai.stt | `agent-runtime` |
65
+
66
+ ## Local and Helper Operations
67
+
68
+ - `dominus.auth.validateJwt` performs local payload checks and expiry validation; it is not a full remote introspection endpoint.
69
+ - `dominus.auth.getJwks` fetches and caches public signing keys from `/jwt/jwks`.
70
+ - `dominus.health.check` uses direct `fetch` to the gateway `/health` route for low-level availability checks.
71
+ - `dominus.ai.stt` sends binary audio to `POST /api/agent/stt` for batch transcription.
72
+ - `dominus.authority.*` uses the cutover `appSlug` / `env` / `targetOrgId` / `targetAppSlug` / `targetEnv` vocabulary; `contextResolve()` and `mintSelectedScopeJwt()` now send the canonical `org_id` / `app_slug` / `env` and `target_org_id` / `target_env` wire payloads expected by live gateway routes.
73
+ - `dominus.browser.*` routes through `/api/browser/*` with `useGateway: true`, producing authenticated gateway paths under `/svc/browser/*`. Browser run metadata remains worker runtime state; Artifact V2 is only for sanitized result/capture payloads.
74
+ - `dominus.platform.*` and `dominus.coder.*` call `/svc/platform/*` and `/svc/coder/*` through `gatewayFetch`. Policy/Coder helpers accept actor context and forward it as `X-Actor-Type` / `X-Actor-Id`; `dominus.coder.ensureRun()` requires exactly one of `workflowRecipeRef` or `pipelineRecipeRef`.
75
+ - Convenience wrappers like `dominus.courier.sendWelcome` delegate to core routes (for example `/api/courier/send`).
76
+
77
+ ## Coverage Notes
78
+
79
+ - Gateway routing is enabled per method via `useGateway: true` in namespace implementations; direct calls still target `/api/*` and are transformed by the client when gateway mode is on.
80
+ - The exhaustive per-command listing with params/returns/routes is documented in [usage-reference.md](./usage-reference.md).