dominus-sdk-nodejs 11.0.0 → 11.0.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
@@ -18,44 +18,58 @@ npm install dominus-sdk-nodejs
18
18
 
19
19
  ## Quick Start
20
20
 
21
- ```ts
22
- import { dominus, normalizeSchemaBuilderMigration } from 'dominus-sdk-nodejs';
21
+ Token-required hello using only the developer-stable catalog verbs. Set project
22
+ scope with `DOMINUS_PROJECT` or CLI `select_project`. Other SDK namespaces exist
23
+ for operators and advanced use; this path is the stable teaching surface. The
24
+ catalog publishes the same lower-camel method names used by TypeScript callers.
23
25
 
24
- // Service auth (PSK from DOMINUS_TOKEN)
25
- const tables = await dominus.db.tables('public');
26
+ Set both values before the Node.js process imports the SDK singleton:
26
27
 
27
- // User auth flow
28
- const session = await dominus.portal.login('user@example.com', 'password');
29
- const me = await dominus.portal.me(session.access_token as string);
28
+ ```bash
29
+ export DOMINUS_TOKEN="your-psk-token"
30
+ export DOMINUS_PROJECT="your-project-slug"
31
+ ```
30
32
 
31
- // AI runtime
32
- const result = await dominus.ai.runAgent({
33
- conversationId: 'conv-1',
34
- systemPrompt: 'You are concise.',
35
- userPrompt: 'Summarize current task status.'
36
- });
33
+ ```ts
34
+ import { dominus } from 'dominus-sdk-nodejs';
37
35
 
38
- // Courier send
39
- await dominus.courier.sendWelcome('user@example.com', 'noreply@app.com', {
40
- name: 'John',
41
- productName: 'MyApp',
36
+ const run = await dominus.workflow.ensure({
37
+ workflowRecipeRef: 'recipe://workflow-recipe-v1/hello@v1',
42
38
  });
43
39
 
44
- // Courier admin
45
- const mailConfig = await dominus.courier.getMailConfig('project-id');
46
- const templates = await dominus.courier.listTemplates('project-id');
47
-
48
- // Files
49
- const uploaded = await dominus.files.upload(Buffer.from('hello'), 'hello.txt');
40
+ await dominus.artifacts.storeV2({
41
+ group: 'your-group',
42
+ owner: 'your-project-slug',
43
+ environment: 'production',
44
+ kind: 'blob',
45
+ artifactKey: 'hello',
46
+ data: Buffer.from('hello dominus').toString('base64'),
47
+ });
48
+ const artifact = await dominus.artifacts.retrieveV2({
49
+ group: 'your-group',
50
+ owner: 'your-project-slug',
51
+ environment: 'production',
52
+ kind: 'blob',
53
+ artifactKey: 'hello',
54
+ });
50
55
 
51
- // Schema builder request normalization
52
- const migration = normalizeSchemaBuilderMigration({
53
- operation: 'create_table',
54
- migrationName: 'create_reports',
55
- tableName: 'reports',
56
- columns: [{ name: 'id', type: 'UUID', primaryKey: true }],
56
+ await dominus.stash.put({
57
+ env: 'production',
58
+ kind: 'config',
59
+ scope: 'self',
60
+ key: 'hello',
61
+ value: { greeting: 'hello' },
57
62
  });
58
- await dominus.ddl.previewMigration('tenant_secure_backend', migration.operation, migration.params, migration.migrationName);
63
+ await dominus.stash.getItem({
64
+ env: 'production',
65
+ kind: 'config',
66
+ scope: 'self',
67
+ key: 'hello',
68
+ });
69
+
70
+ const runId = String((run as { run_id?: string }).run_id ?? '');
71
+ const timeline = await dominus.authority.getRunTimeline(runId);
72
+ const verdict = await dominus.authority.getRunVerdict(runId);
59
73
  ```
60
74
 
61
75
  ## Workflow Lifecycle
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Per-surface `contract/session.ts` — Q-1 (M5 Identity & Session).
3
+ *
4
+ * One `Session` object carries the kernel identity + envelope fields
5
+ * across SDK / CLI / MCP / HTTP transports. JWT worker remains the
6
+ * issuer; the Session is the consumed representation per M5 + B1 + OQ2
7
+ * (canonical Error Envelope at Full tier).
8
+ *
9
+ * **Surface contract rule (B1):** every surface repo (Node SDK,
10
+ * Python SDK, CLI, MCP, gateway) ships its own `contract/session.ts`
11
+ * mirroring this shape byte-for-byte so a Session minted in one
12
+ * surface is consumable in any other. The schema below is the
13
+ * authoritative reference; per-surface additions are forbidden.
14
+ *
15
+ * **Hard preserves from Q-1 handoff:**
16
+ * - 6 JWT identity families — discriminated by `identity.kind`. No new
17
+ * identity family may be added without an ADR.
18
+ * - Credentials are BY REFERENCE (bytes never exposed).
19
+ * - `request_id` and `correlation_id` are inherited from the canonical
20
+ * Error Envelope (`dominus-platform/docs/contracts/errors.spec.json`).
21
+ * Session carries them; it does not invent them.
22
+ * - The Session does not mint JWTs. `jwt-worker` is the issuer; Session
23
+ * is the consumed shape.
24
+ */
25
+ /** The 6 JWT identity families currently minted by jwt-worker. */
26
+ export type IdentityKind = "service" | "service_jwt" | "portal_user" | "selected_scope_operator" | "client" | "product_machine";
27
+ /**
28
+ * Resolved JWT claim shape (the consumer-side projection; the
29
+ * issuer (`jwt-worker`) may carry richer claims but only these
30
+ * land in a Session).
31
+ */
32
+ export interface SessionClaims {
33
+ /** JWT `sub` (subject). */
34
+ subject: string;
35
+ /** JWT `iss` (issuer). */
36
+ issuer: string;
37
+ /** JWT `aud` (audience). */
38
+ audience: string | string[];
39
+ /** JWT `exp` (expiry, epoch seconds). */
40
+ expires_at: number;
41
+ /** JWT `iat` (issued at, epoch seconds). */
42
+ issued_at: number;
43
+ /** Original claims (full JWT payload, for diagnostics). */
44
+ raw: Record<string, unknown>;
45
+ }
46
+ /**
47
+ * Resolved scopes per org / app / env. The shape mirrors the resolved
48
+ * scope tree produced by jwt-worker for the requesting session.
49
+ */
50
+ export interface ResolvedScopes {
51
+ org_id: string | null;
52
+ app_slug: string | null;
53
+ env: "production" | "staging" | "dev" | "preview" | null;
54
+ /** Granted scope keys. */
55
+ grants: readonly string[];
56
+ }
57
+ /**
58
+ * Rotatable credentials BY REFERENCE. Bytes never appear in the Session.
59
+ * The reference is opaque; consumers exchange it via
60
+ * `jwt-worker /jwt/rotate` or `mintServiceJwt({ forceRefresh: true })`.
61
+ */
62
+ export interface CredentialsRef {
63
+ /** Opaque handle resolved by the issuer on demand. */
64
+ handle: string;
65
+ /** Mint generation counter (incremented on every rotation). */
66
+ generation: number;
67
+ /** Last rotation timestamp (epoch ms). */
68
+ rotated_at: number;
69
+ }
70
+ /** One discriminated entry per identity family. */
71
+ export type Identity = {
72
+ kind: "service";
73
+ service_name: string;
74
+ } | {
75
+ kind: "service_jwt";
76
+ service_id: string;
77
+ } | {
78
+ kind: "portal_user";
79
+ user_id: string;
80
+ tenant_id: string | null;
81
+ } | {
82
+ kind: "selected_scope_operator";
83
+ operator_id: string;
84
+ selected_scope: string;
85
+ } | {
86
+ kind: "client";
87
+ client_id: string;
88
+ label: string;
89
+ } | {
90
+ kind: "product_machine";
91
+ product_id: string;
92
+ machine_id: string;
93
+ };
94
+ /**
95
+ * The canonical Session object. One per logical session; structurally
96
+ * identical across SDK / CLI / MCP / HTTP surfaces.
97
+ *
98
+ * Invariants:
99
+ * - `request_id` and `correlation_id` come from the canonical envelope;
100
+ * minting a Session from a context without them throws
101
+ * `validation_failed`.
102
+ * - `credentials.handle` is the only credential reference; passing bytes
103
+ * is rejected by `mintFromContext`.
104
+ * - `identity.kind` is one of the 6 locked families.
105
+ */
106
+ export interface Session {
107
+ /** Discriminated identity. */
108
+ identity: Identity;
109
+ /** Resolved claims from the issuing JWT. */
110
+ claims: SessionClaims;
111
+ /** Resolved scopes per org / app / env. */
112
+ scopes: ResolvedScopes;
113
+ /** Rotatable credentials by reference. */
114
+ credentials: CredentialsRef;
115
+ /** Canonical envelope `request_id`. */
116
+ request_id: string;
117
+ /** Canonical envelope `correlation_id`. */
118
+ correlation_id: string;
119
+ /** Wall-clock time the Session was minted (epoch ms). */
120
+ minted_at: number;
121
+ }
122
+ /**
123
+ * Bootstrap context passed to `mintFromContext`. Surfaces populate this
124
+ * from their own source of truth (SDK reads from cache + JWT decode;
125
+ * CLI from disk cache; MCP from headers; HTTP from request headers).
126
+ */
127
+ export interface SessionContext {
128
+ /** Decoded JWT payload (claims). The signature is verified by the surface. */
129
+ claims: Record<string, unknown>;
130
+ /** Canonical envelope `request_id`. */
131
+ request_id: string;
132
+ /** Canonical envelope `correlation_id`. */
133
+ correlation_id: string;
134
+ /** Credentials BY REFERENCE — never raw token bytes. */
135
+ credentials: CredentialsRef;
136
+ }
137
+ /**
138
+ * Thrown when context is missing envelope identity fields or exposes
139
+ * credential bytes. Carries the canonical envelope `validation_failed`
140
+ * semantics.
141
+ */
142
+ export declare class SessionMintError extends Error {
143
+ readonly endpoint = "/contract/session.mint";
144
+ readonly code: "validation_failed" | "credential_bytes_leaked";
145
+ readonly details?: Record<string, unknown>;
146
+ constructor(code: "validation_failed" | "credential_bytes_leaked", message: string, details?: Record<string, unknown>);
147
+ }
148
+ /**
149
+ * Mint a Session from a populated context. This is the single canonical
150
+ * factory across all surfaces; per-surface modules wrap it but do not
151
+ * invent new constructors.
152
+ */
153
+ export declare function mintFromContext(ctx: SessionContext): Session;
154
+ /**
155
+ * Resolve the discriminated `Identity` from JWT claims. Rejects unknown
156
+ * families — adds must land via an ADR first.
157
+ */
158
+ export declare function resolveIdentity(claims: Record<string, unknown>): Identity;
159
+ export declare function resolveClaims(claims: Record<string, unknown>): SessionClaims;
160
+ export declare function resolveScopes(claims: Record<string, unknown>): ResolvedScopes;
161
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/contract/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,kEAAkE;AAClE,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,aAAa,GACb,aAAa,GACb,yBAAyB,GACzB,QAAQ,GACR,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,C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.ts` — Q-1 (M5 Identity & Session).
3
+ *
4
+ * One `Session` object carries the kernel identity + envelope fields
5
+ * across SDK / CLI / MCP / HTTP transports. JWT worker remains the
6
+ * issuer; the Session is the consumed representation per M5 + B1 + OQ2
7
+ * (canonical Error Envelope at Full tier).
8
+ *
9
+ * **Surface contract rule (B1):** every surface repo (Node SDK,
10
+ * Python SDK, CLI, MCP, gateway) ships its own `contract/session.ts`
11
+ * mirroring this shape byte-for-byte so a Session minted in one
12
+ * surface is consumable in any other. The schema below is the
13
+ * authoritative reference; per-surface additions are forbidden.
14
+ *
15
+ * **Hard preserves from Q-1 handoff:**
16
+ * - 6 JWT identity families — discriminated by `identity.kind`. No new
17
+ * identity family may be added without an ADR.
18
+ * - Credentials are BY REFERENCE (bytes never exposed).
19
+ * - `request_id` and `correlation_id` are inherited from the canonical
20
+ * Error Envelope (`dominus-platform/docs/contracts/errors.spec.json`).
21
+ * Session carries them; it does not invent them.
22
+ * - The Session does not mint JWTs. `jwt-worker` is the issuer; Session
23
+ * is the consumed shape.
24
+ */
25
+ /**
26
+ * Thrown when context is missing envelope identity fields or exposes
27
+ * credential bytes. Carries the canonical envelope `validation_failed`
28
+ * semantics.
29
+ */
30
+ export class SessionMintError extends Error {
31
+ endpoint = "/contract/session.mint";
32
+ code;
33
+ details;
34
+ constructor(code, message, details) {
35
+ super(message);
36
+ this.code = code;
37
+ this.details = details;
38
+ this.name = "SessionMintError";
39
+ }
40
+ }
41
+ /**
42
+ * Mint a Session from a populated context. This is the single canonical
43
+ * factory across all surfaces; per-surface modules wrap it but do not
44
+ * invent new constructors.
45
+ */
46
+ export function mintFromContext(ctx) {
47
+ if (!ctx || typeof ctx !== "object") {
48
+ throw new SessionMintError("validation_failed", "SessionContext is required", { received: typeof ctx });
49
+ }
50
+ if (typeof ctx.request_id !== "string" || ctx.request_id.length === 0) {
51
+ throw new SessionMintError("validation_failed", "request_id is required from the canonical envelope");
52
+ }
53
+ if (typeof ctx.correlation_id !== "string" || ctx.correlation_id.length === 0) {
54
+ throw new SessionMintError("validation_failed", "correlation_id is required from the canonical envelope");
55
+ }
56
+ if (!ctx.claims || typeof ctx.claims !== "object") {
57
+ throw new SessionMintError("validation_failed", "claims (decoded JWT payload) are required");
58
+ }
59
+ if (!ctx.credentials ||
60
+ typeof ctx.credentials.handle !== "string" ||
61
+ typeof ctx.credentials.generation !== "number" ||
62
+ typeof ctx.credentials.rotated_at !== "number") {
63
+ throw new SessionMintError("validation_failed", "credentials must be a by-reference record; raw token bytes are forbidden");
64
+ }
65
+ const identity = resolveIdentity(ctx.claims);
66
+ return {
67
+ identity,
68
+ claims: resolveClaims(ctx.claims),
69
+ scopes: resolveScopes(ctx.claims),
70
+ credentials: ctx.credentials,
71
+ request_id: ctx.request_id,
72
+ correlation_id: ctx.correlation_id,
73
+ minted_at: Date.now(),
74
+ };
75
+ }
76
+ /**
77
+ * Resolve the discriminated `Identity` from JWT claims. Rejects unknown
78
+ * families — adds must land via an ADR first.
79
+ */
80
+ export function resolveIdentity(claims) {
81
+ const rawKind = claims.identity_kind ?? claims.family ?? claims.subject_kind;
82
+ switch (rawKind) {
83
+ case "service": {
84
+ const service_name = String(claims.service_name ?? claims.sub ?? "");
85
+ if (!service_name) {
86
+ throw new SessionMintError("validation_failed", "service family requires service_name or sub");
87
+ }
88
+ return { kind: "service", service_name };
89
+ }
90
+ case "service_jwt": {
91
+ const service_id = String(claims.service_id ?? claims.sub ?? "");
92
+ if (!service_id) {
93
+ throw new SessionMintError("validation_failed", "service_jwt family requires service_id or sub");
94
+ }
95
+ return { kind: "service_jwt", service_id };
96
+ }
97
+ case "portal_user": {
98
+ const user_id = String(claims.user_id ?? claims.sub ?? "");
99
+ if (!user_id) {
100
+ throw new SessionMintError("validation_failed", "portal_user family requires user_id or sub");
101
+ }
102
+ const tenant_id = typeof claims.tenant_id === "string" ? claims.tenant_id : null;
103
+ return { kind: "portal_user", user_id, tenant_id };
104
+ }
105
+ case "selected_scope_operator": {
106
+ const operator_id = String(claims.operator_id ?? claims.sub ?? "");
107
+ const selected_scope = String(claims.selected_scope ?? "");
108
+ if (!operator_id || !selected_scope) {
109
+ throw new SessionMintError("validation_failed", "selected_scope_operator family requires operator_id and selected_scope");
110
+ }
111
+ return { kind: "selected_scope_operator", operator_id, selected_scope };
112
+ }
113
+ case "client": {
114
+ const client_id = String(claims.client_id ?? claims.sub ?? "");
115
+ if (!client_id) {
116
+ throw new SessionMintError("validation_failed", "client family requires client_id or sub");
117
+ }
118
+ const label = String(claims.label ?? "");
119
+ return { kind: "client", client_id, label };
120
+ }
121
+ case "product_machine": {
122
+ const product_id = String(claims.product_id ?? "");
123
+ const machine_id = String(claims.machine_id ?? claims.sub ?? "");
124
+ if (!product_id || !machine_id) {
125
+ throw new SessionMintError("validation_failed", "product_machine family requires product_id and machine_id");
126
+ }
127
+ return { kind: "product_machine", product_id, machine_id };
128
+ }
129
+ default:
130
+ throw new SessionMintError("validation_failed", `unknown identity family: ${String(rawKind)}`);
131
+ }
132
+ }
133
+ export function resolveClaims(claims) {
134
+ const now = Math.floor(Date.now() / 1000);
135
+ return {
136
+ subject: String(claims.sub ?? ""),
137
+ issuer: String(claims.iss ?? "dominus-jwt-worker"),
138
+ audience: (claims.aud ?? "dominus"),
139
+ expires_at: Number(claims.exp ?? now + 3600),
140
+ issued_at: Number(claims.iat ?? now),
141
+ raw: claims,
142
+ };
143
+ }
144
+ export function resolveScopes(claims) {
145
+ const env = claims.env;
146
+ const env_typed = env === "production" ||
147
+ env === "staging" ||
148
+ env === "dev" ||
149
+ env === "preview"
150
+ ? env
151
+ : null;
152
+ const grants = Array.isArray(claims.scopes)
153
+ ? claims.scopes
154
+ : Array.isArray(claims.scope)
155
+ ? claims.scope
156
+ : [];
157
+ return {
158
+ org_id: typeof claims.org_id === "string" ? claims.org_id : null,
159
+ app_slug: typeof claims.app_slug === "string" ? claims.app_slug : null,
160
+ env: env_typed,
161
+ grants,
162
+ };
163
+ }
164
+ //# sourceMappingURL=session.js.map
@@ -0,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C;QAClD,QAAQ,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,SAAS,CAAsB;QACxD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,GAAG,IAAI,CAAC;QAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC;QACpC,GAAG,EAAE,MAAM;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAA+B;IAC3D,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;IACvB,MAAM,SAAS,GACb,GAAG,KAAK,YAAY;QACpB,GAAG,KAAK,SAAS;QACjB,GAAG,KAAK,KAAK;QACb,GAAG,KAAK,SAAS;QACf,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,IAAI,CAAC;IACX,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QACzC,CAAC,CAAE,MAAM,CAAC,MAA4B;QACtC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;YAC3B,CAAC,CAAE,MAAM,CAAC,KAA2B;YACrC,CAAC,CAAC,EAAE,CAAC;IACT,OAAO;QACL,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;QAChE,QAAQ,EAAE,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;QACtE,GAAG,EAAE,SAAS;QACd,MAAM;KACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dominus-sdk-nodejs",
3
- "version": "11.0.0",
3
+ "version": "11.0.1",
4
4
  "description": "Node.js SDK for the Dominus gateway-first platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "clean": "rm -rf dist",
22
22
  "prepublishOnly": "npm run build",
23
23
  "typecheck": "tsc --noEmit",
24
- "test": "npm run build && npm run test:types && node --test tests/artifacts-contract.test.js tests/auth.test.js tests/health.test.js tests/browser.test.js tests/recipes.test.js tests/recipes-stash-routing.test.js tests/platform-coder.test.js tests/publisher.test.js tests/workflow-lifecycle.test.js tests/logs.test.js tests/public-exports.test.js tests/authority-contract.test.js tests/error-contract.test.js tests/admin.test.js tests/control-plane.test.js tests/schema-builder-contract.test.js tests/files-contract.test.js tests/storage-wire-contract.test.js tests/stash-artifact-facade.test.js tests/stash-managed-tables.test.js tests/conversation-format.test.js tests/per-call-controls.test.js tests/provision-verify-contract.test.js tests/secrets-presence-contract.test.js",
24
+ "test": "npm run build && npm run test:types && node --test tests/artifacts-contract.test.js tests/auth.test.js tests/health.test.js tests/browser.test.js tests/recipes.test.js tests/recipes-stash-routing.test.js tests/platform-coder.test.js tests/publisher.test.js tests/workflow-lifecycle.test.js tests/logs.test.js tests/public-exports.test.js tests/authority-contract.test.js tests/error-contract.test.js tests/admin.test.js tests/control-plane.test.js tests/schema-builder-contract.test.js tests/files-contract.test.js tests/storage-wire-contract.test.js tests/stash-artifact-facade.test.js tests/stash-managed-tables.test.js tests/conversation-format.test.js tests/per-call-controls.test.js tests/provision-verify-contract.test.js tests/secrets-presence-contract.test.js tests/readme-quickstart.test.js",
25
25
  "test:types": "tsc -p tsconfig.type-tests.json",
26
26
  "lint": "tsc --noEmit"
27
27
  },