dominus-sdk-nodejs 11.0.6 → 11.0.8
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 +2 -2
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/namespaces/artifacts.d.ts.map +1 -1
- package/dist/namespaces/artifacts.js +13 -2
- package/dist/namespaces/artifacts.js.map +1 -1
- package/dist/namespaces/authority.d.ts +8 -0
- package/dist/namespaces/authority.d.ts.map +1 -1
- package/dist/namespaces/authority.js +21 -0
- package/dist/namespaces/authority.js.map +1 -1
- package/dist/namespaces/recipes.d.ts +17 -1
- package/dist/namespaces/recipes.d.ts.map +1 -1
- package/dist/namespaces/recipes.js +23 -2
- package/dist/namespaces/recipes.js.map +1 -1
- package/dist/namespaces/secrets.js +4 -4
- package/dist/namespaces/secrets.js.map +1 -1
- package/dist/refs/grammar.d.ts +54 -0
- package/dist/refs/grammar.d.ts.map +1 -0
- package/dist/refs/grammar.js +179 -0
- package/dist/refs/grammar.js.map +1 -0
- package/dist/refs/resolve.d.ts +49 -0
- package/dist/refs/resolve.d.ts.map +1 -0
- package/dist/refs/resolve.js +129 -0
- package/dist/refs/resolve.js.map +1 -0
- package/dist/refs/types.d.ts +56 -0
- package/dist/refs/types.d.ts.map +1 -0
- package/dist/refs/types.js +15 -0
- package/dist/refs/types.js.map +1 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/00-reading-order.md +42 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/01-purpose-and-boundaries.md +45 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/02-repo-map-and-entrypoints.md +36 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/03-api-surface.md +59 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/04-data-state-and-storage.md +36 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/05-integrations-and-runtime.md +36 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/06-workflows-commands-and-ci.md +45 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/07-operations-release-and-live-proof.md +43 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/08-security-privacy-and-secrets.md +42 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/09-known-risks-and-debt.md +37 -0
- package/docs/agent-guide/2026-08-25-2103-sdk-nodejs/10-agent-playbook.md +51 -0
- package/docs/agent-guide/INDEX.md +19 -8
- package/docs/agent-guide/current.md +9 -8
- package/docs/atlas/INDEX.md +5 -1
- package/docs/janitor/2026-08-25-2103-sdk-nodejs-cleanup-audit.md +112 -0
- package/docs/routes-services.md +5 -0
- package/docs/usage-reference.md +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Security, privacy, and secrets
|
|
2
|
+
|
|
3
|
+
## Auth boundaries
|
|
4
|
+
|
|
5
|
+
- Service auth: `DOMINUS_TOKEN` (PSK) → minted service JWT from gateway
|
|
6
|
+
`/jwt/mint`, cached 55 min (`JWT_CACHE_TTL = 3300000`), refreshed 5 min
|
|
7
|
+
before expiry via the in-process mutex in `ensureValidJwt`
|
|
8
|
+
(`src/lib/client.ts`).
|
|
9
|
+
- Namespace methods may use a caller-provided user JWT (`userToken` option)
|
|
10
|
+
where backend semantics require it (e.g. portal / user-scoped calls).
|
|
11
|
+
- Identity families are distinct: service token, service JWT, portal user JWT,
|
|
12
|
+
client JWT, and selected-scope operator token are not interchangeable.
|
|
13
|
+
|
|
14
|
+
## Secret / config resolution surfaces
|
|
15
|
+
|
|
16
|
+
- `DOMINUS_TOKEN` is read at import in `src/index.ts` and used to set the
|
|
17
|
+
`dominusCache` encryption key.
|
|
18
|
+
- Secret values live in `src/lib/config.ts` env resolution. Never log or paste
|
|
19
|
+
`DOMINUS_TOKEN`, user tokens, or secret values.
|
|
20
|
+
- `dominus.secrets.*` exposes presence/preview surfaces that avoid returning
|
|
21
|
+
secret values; `admin` surfaces use persisted root-role patterns.
|
|
22
|
+
|
|
23
|
+
## Error handling security notes
|
|
24
|
+
|
|
25
|
+
- Every error thrown from `getServiceJwt` carries `endpoint='/jwt/mint'` so
|
|
26
|
+
downstream consumers (Summit etc.) can classify by `DominusError.endpoint`.
|
|
27
|
+
- Service-side 401s (anything that's not `/portal/auth/*`) must NOT be
|
|
28
|
+
laundered into user-session expiry by callers (kernel rule in
|
|
29
|
+
`dominus-platform/docs/DOMINUS_CRITICAL_PATTERNS.md` §1).
|
|
30
|
+
|
|
31
|
+
## PHI / sensitive-data rules
|
|
32
|
+
|
|
33
|
+
- Never write PHI, secrets, credentials, cookies, raw reports, DICOM bytes,
|
|
34
|
+
screenshots, HARs, or raw response bodies into docs.
|
|
35
|
+
- Log writes (`logs.ingest` / `ingestBatch`) swallow on purpose — a log write
|
|
36
|
+
must never break the caller. Log reads (`logs.tail`, `logs.query`) propagate
|
|
37
|
+
errors so a broken query is not indistinguishable from an empty result.
|
|
38
|
+
|
|
39
|
+
## What must never be logged, pasted, or written into docs
|
|
40
|
+
|
|
41
|
+
- `DOMINUS_TOKEN`, user tokens, secrets from `stash`/`secrets`/`warden`,
|
|
42
|
+
raw gateway response bodies containing PHI.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Known risks and debt
|
|
2
|
+
|
|
3
|
+
## Stale or inconsistent docs (fixed in this pass)
|
|
4
|
+
|
|
5
|
+
- `docs/agent-guide/current.md` pointed at the 2026-06-27 snapshot while
|
|
6
|
+
`INDEX.md` pointed at 2026-08-04 — inconsistent; updated to this snapshot.
|
|
7
|
+
- `CLAUDE.md` pointed at `2026-06-27-0849-sdk-orient/` and its old audit while
|
|
8
|
+
README pointed at 2026-08-04 — updated to this snapshot.
|
|
9
|
+
- `docs/agent-guide/2026-06-27-0849-sdk-orient/` and
|
|
10
|
+
`2026-08-04-sdk-nodejs/` (partial: only 00/01/03/10) are retained as history.
|
|
11
|
+
|
|
12
|
+
## Aging docs to verify against source
|
|
13
|
+
|
|
14
|
+
- `docs/architecture.md`, `docs/routes-services.md`, `docs/usage-reference.md`
|
|
15
|
+
— authored over time; verify route/namespace/behavior claims against `src/`
|
|
16
|
+
before trusting. The v6.6.0-era claim "no committed tests" is already
|
|
17
|
+
superseded (`tests/` is committed).
|
|
18
|
+
|
|
19
|
+
## Fragile / slow checks
|
|
20
|
+
|
|
21
|
+
- `npm test` includes a full `tsc` build, so it is slower than a pure runtime
|
|
22
|
+
run; type tests require `tsconfig.type-tests.json`.
|
|
23
|
+
|
|
24
|
+
## Cleanup candidates (deferred)
|
|
25
|
+
|
|
26
|
+
- `dist/` and `node_modules/` are gitignored generated residue — safe to clean
|
|
27
|
+
(`npm run clean` for `dist/`) but deferred under dirty-tree policy (untracked
|
|
28
|
+
`_worktrees/` present in the checkout).
|
|
29
|
+
- `_worktrees/s4-contract` and `_worktrees/t2-sdk-docs` are linked git
|
|
30
|
+
worktrees registered with the repo but untracked from the main tree; they are
|
|
31
|
+
user work and must not be touched without approval.
|
|
32
|
+
|
|
33
|
+
## Known blockers / links
|
|
34
|
+
|
|
35
|
+
- See `docs/janitor/2026-08-25-2103-sdk-nodejs-cleanup-audit.md` for the full
|
|
36
|
+
drift and approval queue.
|
|
37
|
+
- `docs/atlas/2026-08-04-sdk-nodejs-blockers.md` for the prior blocker record.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Agent playbook
|
|
2
|
+
|
|
3
|
+
## If you are changing X, read Y first
|
|
4
|
+
|
|
5
|
+
| If you are changing… | Read first |
|
|
6
|
+
|---|---|
|
|
7
|
+
| A namespace method | `src/namespaces/<name>.ts` + the wiring in `src/index.ts`; keep methods thin, transport via `this.client.request` / `streamRequest` / `binaryUpload` / `binaryDownload` |
|
|
8
|
+
| The transport / request lifecycle | `src/lib/client.ts`; preserve the base64 request protocol, legacy base64 response envelopes, JWT caching, and retry behavior |
|
|
9
|
+
| Errors | `src/lib/errors.ts`; new throws on service-auth paths must pass the `endpoint` argument |
|
|
10
|
+
| `recipe://` / `ar://` refs | `src/refs/resolve.ts`, `src/refs/types.ts`; receipts preserve the answering service's response unmodified |
|
|
11
|
+
| Wire contracts | `src/contract/*.ts`, `src/contracts/versioned-storage.ts` |
|
|
12
|
+
| Public surface | `src/index.ts`; add new namespace/type exports there and update `docs/usage-reference.md`, `docs/routes-services.md` |
|
|
13
|
+
| Browser automation | `src/namespaces/browser.ts`; use `/api/browser/*` with `useGateway: true`, never worker-local `/runs/*` |
|
|
14
|
+
|
|
15
|
+
## If validation fails, try Z
|
|
16
|
+
|
|
17
|
+
1. `npm run build` first — `dist/` must compile before `npm test`.
|
|
18
|
+
2. Check env: `DOMINUS_TOKEN` and `DOMINUS_PROJECT` must be set before the SDK
|
|
19
|
+
singleton is imported for live calls; type/tests should not require them.
|
|
20
|
+
3. `npm run lint` (`tsc --noEmit`) to isolate type errors from runtime errors.
|
|
21
|
+
4. If runtime tests fail on environment-dependent calls, report that explicitly
|
|
22
|
+
in change notes rather than hiding it.
|
|
23
|
+
|
|
24
|
+
## Common traps
|
|
25
|
+
|
|
26
|
+
- **Reads must throw, writes must swallow.** Never add a `catch { return [] }`
|
|
27
|
+
to a read (`logs.tail`, `logs.query`, or any non-ingest call). `ingest` /
|
|
28
|
+
`ingestBatch` swallow on purpose.
|
|
29
|
+
- **Do not regress the JWT TTL.** SDK caches the service JWT for 55 min
|
|
30
|
+
(`JWT_CACHE_TTL = 3300000`) against a 1-hour jwt-worker expiry. Use
|
|
31
|
+
`mintServiceJwt({ forceRefresh: true })` for cache-bypass, not direct
|
|
32
|
+
`dominusCache` poking.
|
|
33
|
+
- **Do not use `dist/` for design decisions** — `src/` is the source of truth.
|
|
34
|
+
- **Do not point browser methods at `/runs/*` directly.**
|
|
35
|
+
- **Do not launder service-side 401s into user-session expiry** (kernel rule).
|
|
36
|
+
|
|
37
|
+
## Which Kyle skill to use
|
|
38
|
+
|
|
39
|
+
| Need | Skill |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Repo docs / cleanup / janitor | `kyle-janitor` |
|
|
42
|
+
| Truth maps / atlas | `kyle-atlas` |
|
|
43
|
+
| Behavior bug | `kyle-diagnose` / `kyle-fix` |
|
|
44
|
+
| Dominus platform contract changes | `dominus-expert` |
|
|
45
|
+
|
|
46
|
+
## Handoff expectations
|
|
47
|
+
|
|
48
|
+
- Never commit/push from janitor or docs work in this repo unless explicitly
|
|
49
|
+
asked; leave changes uncommitted for review.
|
|
50
|
+
- When docs expose stale platform truth, route the finding to `kyle-atlas` or
|
|
51
|
+
`dominus-expert` rather than rewriting worker-owned facts inline.
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
# Agent Guide Index
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-08-
|
|
4
|
-
Current snapshot: `2026-08-
|
|
3
|
+
Last updated: 2026-08-25 21:03 local
|
|
4
|
+
Current snapshot: `2026-08-25-2103-sdk-nodejs/00-reading-order.md`
|
|
5
|
+
|
|
6
|
+
## Use This When
|
|
7
|
+
|
|
8
|
+
Working in `dominus-sdk-nodejs`: changing a namespace, transport, error, ref
|
|
9
|
+
resolution, or release flow; adding public surface; or validating a change.
|
|
10
|
+
The published package entry point and `src/` remain authoritative.
|
|
5
11
|
|
|
6
12
|
## Read Order
|
|
7
13
|
|
|
8
|
-
1. `2026-08-
|
|
9
|
-
2. `2026-08-
|
|
10
|
-
3. `2026-08-
|
|
11
|
-
4. `2026-08-
|
|
14
|
+
1. `2026-08-25-2103-sdk-nodejs/00-reading-order.md`
|
|
15
|
+
2. `2026-08-25-2103-sdk-nodejs/01-purpose-and-boundaries.md`
|
|
16
|
+
3. `2026-08-25-2103-sdk-nodejs/03-api-surface.md`
|
|
17
|
+
4. `2026-08-25-2103-sdk-nodejs/10-agent-playbook.md`
|
|
18
|
+
|
|
19
|
+
## Snapshot History
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
| Snapshot | Reason | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `2026-08-25-2103-sdk-nodejs` | Current | v11.0.7 at `4f7b377`; 28 namespaces, full 00–10 pack |
|
|
24
|
+
| `2026-08-04-sdk-nodejs` | Prior | Partial pack (00/01/03/10); v10.x-era truth |
|
|
25
|
+
| `2026-06-27-0849-sdk-orient` | Historical | v6.6.0-era orientation pack; superseded |
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Current Agent-Guide Snapshot
|
|
2
2
|
|
|
3
|
-
Latest snapshot: `2026-
|
|
3
|
+
Latest snapshot: `2026-08-25-2103-sdk-nodejs/00-reading-order.md`
|
|
4
4
|
|
|
5
|
-
Generated 2026-
|
|
5
|
+
Generated 2026-08-25 from SDK v11.0.7 (`package.json`) on branch `production`
|
|
6
|
+
at commit `4f7b377`.
|
|
6
7
|
|
|
7
8
|
## Top Five Facts To Refresh Before Editing
|
|
8
9
|
|
|
9
|
-
1. **Version + changelog.**
|
|
10
|
-
`CHANGELOG.md
|
|
11
|
-
|
|
10
|
+
1. **Version + changelog.** `package.json` `version` is `11.0.7`; the top of
|
|
11
|
+
`CHANGELOG.md` is the current behavior record (v11.0.0 breaking:
|
|
12
|
+
`logs.tail` reads propagate errors).
|
|
13
|
+
2. **Namespace count.** `src/namespaces/` has 28 files, each wired as a
|
|
12
14
|
`public readonly` property in `src/index.ts`. Re-count before claiming a
|
|
13
15
|
surface is missing.
|
|
14
|
-
3. **Tests exist.** `tests/` has
|
|
15
|
-
|
|
16
|
-
stale and is corrected in this pass.
|
|
16
|
+
3. **Tests exist and are current.** `tests/` has 35 `.test.js` files plus type
|
|
17
|
+
tests; HEAD `4f7b377` reports 179 tests green via `npm test`.
|
|
17
18
|
4. **Storage rule.** `dominus.stash.*` is the primary storage surface;
|
|
18
19
|
`redis`/`db`/`files`/`artifacts` are building blocks (see
|
|
19
20
|
`docs/architecture.md` §2a).
|
package/docs/atlas/INDEX.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Atlas Index
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-08-
|
|
3
|
+
Last updated: 2026-08-25 local
|
|
4
|
+
|
|
5
|
+
Read first: the current agent-guide pack
|
|
6
|
+
`docs/agent-guide/2026-08-25-2103-sdk-nodejs/00-reading-order.md` and the latest
|
|
7
|
+
cleanup audit `docs/janitor/2026-08-25-2103-sdk-nodejs-cleanup-audit.md`.
|
|
4
8
|
|
|
5
9
|
Latest snapshot:
|
|
6
10
|
[truthmap](2026-08-04-sdk-nodejs-truthmap.md),
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Janitor Cleanup Audit: dominus-sdk-nodejs
|
|
2
|
+
|
|
3
|
+
Generated: 2026-08-25 21:03 local
|
|
4
|
+
Target repo: `C:\developer\codingroot\repos\dominus_active\dominus-sdk-nodejs`
|
|
5
|
+
Git root: same as target repo
|
|
6
|
+
Branch/status: `production` @ `4f7b377`; working tree has untracked
|
|
7
|
+
`_worktrees/` (linked git worktrees) → **dirty_limited** per janitor wave
|
|
8
|
+
policy: docs-only writes, no broad generated cleanup, no edits to user work.
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Created a fresh source-backed agent-guide snapshot (v11.0.7, commit `4f7b377`),
|
|
13
|
+
wired it into the repo read path (README, CLAUDE.md, agent-guide INDEX/current,
|
|
14
|
+
atlas INDEX), and fixed stale pointer drift (CLAUDE.md and current.md were
|
|
15
|
+
pointing at the 2026-06-27 snapshot). No generated cleanup was applied because
|
|
16
|
+
the checkout is dirty (untracked `_worktrees/`); cleanup candidates are queued
|
|
17
|
+
for approval.
|
|
18
|
+
|
|
19
|
+
## Executive Actions Applied
|
|
20
|
+
|
|
21
|
+
| Action | Path | Why safe | Verification |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| New agent-guide snapshot | `docs/agent-guide/2026-08-25-2103-sdk-nodejs/` (00–10) | Source-backed from `src/`, `package.json`, workflows, CHANGELOG | `git diff --check`; paths verified against repo listing |
|
|
24
|
+
| Re-point current.md | `docs/agent-guide/current.md` | Was stale (June snapshot) | Consistent with INDEX.md |
|
|
25
|
+
| Re-point CLAUDE.md | `CLAUDE.md` | Was stale (June snapshot/audit) | Consistent with README |
|
|
26
|
+
| Re-point README.md | `README.md` | Pointer line only | Points to new snapshot + audit |
|
|
27
|
+
| Update atlas index | `docs/atlas/INDEX.md` | Add read-first surfaces | Points to new snapshot + audit |
|
|
28
|
+
|
|
29
|
+
## Docs Written
|
|
30
|
+
|
|
31
|
+
| File | Purpose | Source-backed by |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `docs/agent-guide/2026-08-25-2103-sdk-nodejs/00-reading-order.md` | Read order + stale-doc map | `package.json`, `src/`, workflows |
|
|
34
|
+
| `.../01-purpose-and-boundaries.md` | Purpose, ownership, boundary | `src/index.ts`, `package.json` |
|
|
35
|
+
| `.../02-repo-map-and-entrypoints.md` | Directory + entrypoint map | repo listing, `package.json` scripts |
|
|
36
|
+
| `.../03-api-surface.md` | Namespace/API table | `src/namespaces/*`, `src/index.ts` |
|
|
37
|
+
| `.../04-data-state-and-storage.md` | State surfaces + safety rules | `src/lib/cache.ts`, `client.ts`, CHANGELOG v11.0.0 |
|
|
38
|
+
| `.../05-integrations-and-runtime.md` | Gateway/auth/env integrations | `src/lib/client.ts`, `config.ts`, CLAUDE.md |
|
|
39
|
+
| `.../06-workflows-commands-and-ci.md` | Commands + CI map | `package.json`, `.github/workflows/*` |
|
|
40
|
+
| `.../07-operations-release-and-live-proof.md` | Release lane + live proof | `.github/workflows/publish-production.yml` |
|
|
41
|
+
| `.../08-security-privacy-and-secrets.md` | Auth/secrets/PHI rules | `src/lib/client.ts`, `errors.ts` |
|
|
42
|
+
| `.../09-known-risks-and-debt.md` | Stale docs, cleanup candidates | current repo state |
|
|
43
|
+
| `.../10-agent-playbook.md` | Task→read-first, traps, skills | CLAUDE.md, `src/` |
|
|
44
|
+
| `docs/agent-guide/INDEX.md` | Current snapshot pointer + history | snapshot set |
|
|
45
|
+
| `docs/agent-guide/current.md` | Latest snapshot + top-5 facts | `package.json`, `src/namespaces/` |
|
|
46
|
+
| `docs/janitor/2026-08-25-2103-sdk-nodejs-cleanup-audit.md` | This audit | this run |
|
|
47
|
+
|
|
48
|
+
## Drift Findings
|
|
49
|
+
|
|
50
|
+
| Finding | Evidence | Risk | Recommendation | Approval needed |
|
|
51
|
+
|---|---|---|---|---|
|
|
52
|
+
| `CLAUDE.md` pointed at 2026-06-27 snapshot/audit | `git show` of file | Agents orient from stale v6.6-era pack | Re-point (done) | No |
|
|
53
|
+
| `current.md` pointed at 2026-06-27 while INDEX pointed at 2026-08-04 | read both | Confusing read path | Re-point (done) | No |
|
|
54
|
+
| `docs/architecture.md` / `routes-services.md` / `usage-reference.md` aging | last edits precede 08-04 pack | Stale route/behavior claims | Verify against `src/` in a later pass | No |
|
|
55
|
+
| `dist/` + `node_modules/` generated residue | `.gitignore` | Disk noise only | `npm run clean` for `dist/`; `npm ci`/reinstall for `node_modules` | Yes (dirty tree) |
|
|
56
|
+
|
|
57
|
+
## Stale Or Conflicting Docs
|
|
58
|
+
|
|
59
|
+
| Doc | Problem | Stronger source | Proposed action |
|
|
60
|
+
|---|---|---|---|
|
|
61
|
+
| `docs/agent-guide/2026-06-27-0849-sdk-orient/` | v6.6.0-era, superseded | current snapshot | Retain as history |
|
|
62
|
+
| `docs/agent-guide/2026-08-04-sdk-nodejs/` | Partial (00/01/03/10 only) | current snapshot | Retain as history |
|
|
63
|
+
|
|
64
|
+
## Orphan / Generated / Scratch Candidates
|
|
65
|
+
|
|
66
|
+
| Path | Evidence | Proposed action | Safe now? |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `dist/` | gitignored build output (`npm run clean`) | Remove | No (dirty tree) |
|
|
69
|
+
| `node_modules/` | gitignored deps | Remove/reinstall | No (dirty tree) |
|
|
70
|
+
| `_worktrees/` | linked git worktrees (untracked) | Leave alone — user work | No (never) |
|
|
71
|
+
|
|
72
|
+
## Auto-Cleanup Performed
|
|
73
|
+
|
|
74
|
+
None. The working tree has untracked `_worktrees/`, so per janitor dirty-tree
|
|
75
|
+
policy broad generated cleanup was skipped entirely. `dist/` and
|
|
76
|
+
`node_modules/` remain untouched.
|
|
77
|
+
|
|
78
|
+
## Expert Review Queue
|
|
79
|
+
|
|
80
|
+
| Candidate | Why expert should view it first | Suggested expert | First review question |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| `_worktrees/s4-contract`, `_worktrees/t2-sdk-docs` | Linked git worktrees owned by kteam/cu lanes; removal or archival affects in-flight work | `dominus-expert` | Are these worktree branches still active, and should any be merged/cleaned? |
|
|
83
|
+
| Gateway/worker wire-contract claims in aging docs | Crosses Dominus platform contracts | `dominus-expert` | Do `docs/routes-services.md` / `architecture.md` still match `/svc/*` reality? |
|
|
84
|
+
|
|
85
|
+
## Worktree / Branch / Plan Residue
|
|
86
|
+
|
|
87
|
+
| Item | Evidence | Proposed action | Owner |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| `_worktrees/s4-contract` | `git worktree list` — branch `kteam/dominus-onboarding-build/item4-invite` @ `6ec0e7b` | Leave; queue for expert | kteam |
|
|
90
|
+
| `_worktrees/t2-sdk-docs` | `git worktree list` — branch `cu/t2-sdk-docs-node-20260818` @ `b794fb0` | Leave; queue for expert | cu |
|
|
91
|
+
| Local branches (`codex/*`, `cu/*`, `kteam/*`, `s4-contract`) | `git branch -a` | Keep; not this run's call to prune | lane owners |
|
|
92
|
+
|
|
93
|
+
## Approval Queue
|
|
94
|
+
|
|
95
|
+
- [ ] `dist/` removal (`npm run clean`) — generated build residue — verify `npm run build` regenerates.
|
|
96
|
+
- [ ] `node_modules/` removal/reinstall — generated deps — verify `npm ci` + `npm test` green.
|
|
97
|
+
- [ ] Worktree pruning/archival for `_worktrees/s4-contract` and `_worktrees/t2-sdk-docs` — in-flight lane work — verify branch status first.
|
|
98
|
+
|
|
99
|
+
## Not Touching
|
|
100
|
+
|
|
101
|
+
- `_worktrees/` — untracked user work; hard rule.
|
|
102
|
+
- `docs/plans/` — historical plans.
|
|
103
|
+
- Any tracked source or CI file.
|
|
104
|
+
- Previous agent-guide snapshots and janitor audits.
|
|
105
|
+
|
|
106
|
+
## Follow-Up Skills
|
|
107
|
+
|
|
108
|
+
| Need | Skill | First action |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| Verify aging platform docs against source | `kyle-atlas` | Re-run truthmap for `docs/routes-services.md` / `architecture.md` |
|
|
111
|
+
| Confirm worktree lane status | `dominus-expert` | Inspect kteam/cu branches |
|
|
112
|
+
| Refresh knowledge for this repo | `kyle-learn` | Move durable facts to `.claude/knowledge` |
|
package/docs/routes-services.md
CHANGED
|
@@ -32,6 +32,7 @@ Audited commands: **~450** (hand-counted) across **27** top-level namespace file
|
|
|
32
32
|
| `processor-service` | 3 | dominus.processor | 3 | HTTP API routes via Dominus client. |
|
|
33
33
|
| `sync-worker` | 2 | dominus.sync | 2 | HTTP API routes via Dominus client. |
|
|
34
34
|
| `local-jwt` | 1 | dominus.auth | 1 | Local JWT parsing/validation helpers in auth namespace. |
|
|
35
|
+
| `ref-resolver` | 2 | dominus.refs | 3 | `ar://` → artifact-worker V2 retrieve; `recipe://` → stash `get` probe with recipe-worker fall-through. |
|
|
35
36
|
| `retired-stt` | 0 | (retired) | 0 | Legacy streaming STT namespace/routes are removed in hard cutover. |
|
|
36
37
|
|
|
37
38
|
## Route Prefix Mapping
|
|
@@ -58,6 +59,9 @@ Audited commands: **~450** (hand-counted) across **27** top-level namespace file
|
|
|
58
59
|
| `/api/job/*` | jobs | `job-worker` |
|
|
59
60
|
| `/api/processor/*` | processor | `processor-service` |
|
|
60
61
|
| `/api/artifact/*` | artifacts | `artifact-worker` |
|
|
62
|
+
| `/api/artifact/v2/retrieve` | refs (ar:// lane) | `artifact-worker` |
|
|
63
|
+
| `/svc/stash/get` | refs (recipe:// stash lane) | `stash-worker` |
|
|
64
|
+
| `/api/recipe/recipes/*` | refs (recipe:// fall-through lane) | `recipe-worker` |
|
|
61
65
|
| `/svc/stash/tables/*` | stash.tables | `stash-worker` |
|
|
62
66
|
| `/api/rag/*, /api/agent/*, /api/llm/*, /api/results/*, /api/orchestration/*, /api/session/*` | ai, ai.rag, ai.tools, ai.workflow, ai.results | `agent-runtime` |
|
|
63
67
|
| `/api/workflow/*` | workflow | `workflow-manager` |
|
|
@@ -77,4 +81,5 @@ Audited commands: **~450** (hand-counted) across **27** top-level namespace file
|
|
|
77
81
|
## Coverage Notes
|
|
78
82
|
|
|
79
83
|
- 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.
|
|
84
|
+
- `dominus.refs.resolve` is the two-lane ref overlay: `ar://` refs cross the wire verbatim to `POST /api/artifact/v2/retrieve`; `recipe://` refs probe `POST /svc/stash/get` and fall through to `GET /api/recipe/recipes/{type}/{name}` on a typed `stash.not_found.*` / `stash.forbidden.scope_not_allowed` miss. `dominus.refs.parse` is local grammar with no I/O.
|
|
80
85
|
- The exhaustive per-command listing with params/returns/routes is documented in [usage-reference.md](./usage-reference.md).
|
package/docs/usage-reference.md
CHANGED
|
@@ -696,3 +696,18 @@ Legacy-named helpers still exist for stable call sites; they **call `POST /api/a
|
|
|
696
696
|
| `dominus.artifacts.unwatchV2` | `options: Pick<V2WatchOptions, 'watcherName'> & V2ArtifactSelectorOptions` | `Promise<Record<string, unknown>>` | `POST /api/artifact/v2/unwatch` | Remove a watcher. |
|
|
697
697
|
| `dominus.artifacts.listV2` | `options?: V2ListArtifactOptions` | `Promise<Record<string, unknown>>` | `POST /api/artifact/v2/list` | List addressed artifact heads. |
|
|
698
698
|
| `dominus.artifacts.deleteV2` | `options: V2DeleteArtifactOptions` | `Promise<Record<string, unknown>>` | `POST /api/artifact/v2/delete` | Delete or tombstone an addressed artifact selector. |
|
|
699
|
+
|
|
700
|
+
## dominus.refs
|
|
701
|
+
|
|
702
|
+
Source: `src/refs/resolve.ts` (RefResolver)
|
|
703
|
+
|
|
704
|
+
The `dominus.refs` namespace is the ref resolver overlay. It resolves `ar://` and
|
|
705
|
+
`recipe://` refs to service-native receipts; `stash://`, `warden://`, and `wf://`
|
|
706
|
+
throw `ref.scheme.unresolvable` naming the missing contract and its owning service.
|
|
707
|
+
`parse` is pure grammar with no I/O; `resolve` performs transport and returns a
|
|
708
|
+
`ResolvedRef` discriminated on the answering service (`source`).
|
|
709
|
+
|
|
710
|
+
| Command | Params | Returns | Route | What it does |
|
|
711
|
+
|---|---|---|---|---|
|
|
712
|
+
| `dominus.refs.parse` | `ref: string` | `KernelRef` | *(local, no I/O)* | Parse a ref into its discriminated `KernelRef` (ar / recipe / unresolvable). |
|
|
713
|
+
| `dominus.refs.resolve` | `ref: string, options?: ResolveOptions` | `Promise<ResolvedRef>` | `POST /api/artifact/v2/retrieve` (ar://) · `POST /svc/stash/get` → `GET /api/recipe/recipes/{type}/{name}` (recipe://) | Resolve a ref to its service-native receipt; `ar://` crosses the wire verbatim, `recipe://` probes the stash lane and falls through to recipe-worker on a typed miss. |
|