@zarel-ai/sdk 0.6.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.
- package/LICENSE +21 -0
- package/README.md +412 -0
- package/dist/_internal/auth-headers.d.ts +19 -0
- package/dist/_internal/auth-headers.d.ts.map +1 -0
- package/dist/_internal/auth-headers.js +30 -0
- package/dist/_internal/auth-headers.js.map +1 -0
- package/dist/_internal/confirmation.d.ts +24 -0
- package/dist/_internal/confirmation.d.ts.map +1 -0
- package/dist/_internal/confirmation.js +54 -0
- package/dist/_internal/confirmation.js.map +1 -0
- package/dist/_internal/event-iterator.d.ts +18 -0
- package/dist/_internal/event-iterator.d.ts.map +1 -0
- package/dist/_internal/event-iterator.js +151 -0
- package/dist/_internal/event-iterator.js.map +1 -0
- package/dist/_internal/fetch-client.d.ts +141 -0
- package/dist/_internal/fetch-client.d.ts.map +1 -0
- package/dist/_internal/fetch-client.js +471 -0
- package/dist/_internal/fetch-client.js.map +1 -0
- package/dist/_internal/interceptors.d.ts +40 -0
- package/dist/_internal/interceptors.d.ts.map +1 -0
- package/dist/_internal/interceptors.js +28 -0
- package/dist/_internal/interceptors.js.map +1 -0
- package/dist/_internal/mcp.d.ts +11 -0
- package/dist/_internal/mcp.d.ts.map +1 -0
- package/dist/_internal/mcp.js +79 -0
- package/dist/_internal/mcp.js.map +1 -0
- package/dist/_internal/pagination.d.ts +71 -0
- package/dist/_internal/pagination.d.ts.map +1 -0
- package/dist/_internal/pagination.js +130 -0
- package/dist/_internal/pagination.js.map +1 -0
- package/dist/_internal/require-token.d.ts +17 -0
- package/dist/_internal/require-token.d.ts.map +1 -0
- package/dist/_internal/require-token.js +25 -0
- package/dist/_internal/require-token.js.map +1 -0
- package/dist/_internal/retry-after.d.ts +2 -0
- package/dist/_internal/retry-after.d.ts.map +1 -0
- package/dist/_internal/retry-after.js +34 -0
- package/dist/_internal/retry-after.js.map +1 -0
- package/dist/_internal/sse-client.d.ts +43 -0
- package/dist/_internal/sse-client.d.ts.map +1 -0
- package/dist/_internal/sse-client.js +250 -0
- package/dist/_internal/sse-client.js.map +1 -0
- package/dist/_internal/version.d.ts +5 -0
- package/dist/_internal/version.d.ts.map +1 -0
- package/dist/_internal/version.js +12 -0
- package/dist/_internal/version.js.map +1 -0
- package/dist/client.d.ts +74 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +86 -0
- package/dist/client.js.map +1 -0
- package/dist/contract/_singleton.d.ts +18 -0
- package/dist/contract/_singleton.d.ts.map +1 -0
- package/dist/contract/_singleton.js +27 -0
- package/dist/contract/_singleton.js.map +1 -0
- package/dist/contract/actions.d.ts +18 -0
- package/dist/contract/actions.d.ts.map +1 -0
- package/dist/contract/actions.js +36 -0
- package/dist/contract/actions.js.map +1 -0
- package/dist/contract/assistant.d.ts +65 -0
- package/dist/contract/assistant.d.ts.map +1 -0
- package/dist/contract/assistant.js +44 -0
- package/dist/contract/assistant.js.map +1 -0
- package/dist/contract/batch.d.ts +27 -0
- package/dist/contract/batch.d.ts.map +1 -0
- package/dist/contract/batch.js +20 -0
- package/dist/contract/batch.js.map +1 -0
- package/dist/contract/capabilities.d.ts +21 -0
- package/dist/contract/capabilities.d.ts.map +1 -0
- package/dist/contract/capabilities.js +31 -0
- package/dist/contract/capabilities.js.map +1 -0
- package/dist/contract/constraints.d.ts +21 -0
- package/dist/contract/constraints.d.ts.map +1 -0
- package/dist/contract/constraints.js +31 -0
- package/dist/contract/constraints.js.map +1 -0
- package/dist/contract/events.d.ts +33 -0
- package/dist/contract/events.d.ts.map +1 -0
- package/dist/contract/events.js +56 -0
- package/dist/contract/events.js.map +1 -0
- package/dist/contract/flows.d.ts +44 -0
- package/dist/contract/flows.d.ts.map +1 -0
- package/dist/contract/flows.js +109 -0
- package/dist/contract/flows.js.map +1 -0
- package/dist/contract/governance.d.ts +6 -0
- package/dist/contract/governance.d.ts.map +1 -0
- package/dist/contract/governance.js +17 -0
- package/dist/contract/governance.js.map +1 -0
- package/dist/contract/index.d.ts +137 -0
- package/dist/contract/index.d.ts.map +1 -0
- package/dist/contract/index.js +177 -0
- package/dist/contract/index.js.map +1 -0
- package/dist/contract/metadata.d.ts +26 -0
- package/dist/contract/metadata.d.ts.map +1 -0
- package/dist/contract/metadata.js +25 -0
- package/dist/contract/metadata.js.map +1 -0
- package/dist/contract/process-model.d.ts +31 -0
- package/dist/contract/process-model.d.ts.map +1 -0
- package/dist/contract/process-model.js +51 -0
- package/dist/contract/process-model.js.map +1 -0
- package/dist/contract/roots/channels.d.ts +27 -0
- package/dist/contract/roots/channels.d.ts.map +1 -0
- package/dist/contract/roots/channels.js +53 -0
- package/dist/contract/roots/channels.js.map +1 -0
- package/dist/contract/roots/events.d.ts +7 -0
- package/dist/contract/roots/events.d.ts.map +1 -0
- package/dist/contract/roots/events.js +19 -0
- package/dist/contract/roots/events.js.map +1 -0
- package/dist/contract/roots/index.d.ts +15 -0
- package/dist/contract/roots/index.d.ts.map +1 -0
- package/dist/contract/roots/index.js +38 -0
- package/dist/contract/roots/index.js.map +1 -0
- package/dist/contract/roots/mcp-servers.d.ts +46 -0
- package/dist/contract/roots/mcp-servers.d.ts.map +1 -0
- package/dist/contract/roots/mcp-servers.js +68 -0
- package/dist/contract/roots/mcp-servers.js.map +1 -0
- package/dist/contract/roots/profiles.d.ts +18 -0
- package/dist/contract/roots/profiles.d.ts.map +1 -0
- package/dist/contract/roots/profiles.js +31 -0
- package/dist/contract/roots/profiles.js.map +1 -0
- package/dist/contract/roots/timezone.d.ts +10 -0
- package/dist/contract/roots/timezone.d.ts.map +1 -0
- package/dist/contract/roots/timezone.js +19 -0
- package/dist/contract/roots/timezone.js.map +1 -0
- package/dist/contract/roots/treatment.d.ts +11 -0
- package/dist/contract/roots/treatment.d.ts.map +1 -0
- package/dist/contract/roots/treatment.js +37 -0
- package/dist/contract/roots/treatment.js.map +1 -0
- package/dist/contract/roots/vocabulary.d.ts +18 -0
- package/dist/contract/roots/vocabulary.d.ts.map +1 -0
- package/dist/contract/roots/vocabulary.js +31 -0
- package/dist/contract/roots/vocabulary.js.map +1 -0
- package/dist/contract/schemas.d.ts +18 -0
- package/dist/contract/schemas.d.ts.map +1 -0
- package/dist/contract/schemas.js +31 -0
- package/dist/contract/schemas.js.map +1 -0
- package/dist/contract/skills.d.ts +20 -0
- package/dist/contract/skills.d.ts.map +1 -0
- package/dist/contract/skills.js +36 -0
- package/dist/contract/skills.js.map +1 -0
- package/dist/errors.d.ts +65 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +80 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/contract.d.ts +7688 -0
- package/dist/generated/contract.d.ts.map +1 -0
- package/dist/generated/contract.js +7 -0
- package/dist/generated/contract.js.map +1 -0
- package/dist/generated/index.d.ts +41 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +3 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/runtime.d.ts +4020 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/generated/runtime.js +7 -0
- package/dist/generated/runtime.js.map +1 -0
- package/dist/generated/unwrap-map.d.ts +989 -0
- package/dist/generated/unwrap-map.d.ts.map +1 -0
- package/dist/generated/unwrap-map.js +344 -0
- package/dist/generated/unwrap-map.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/actions.d.ts +33 -0
- package/dist/resources/actions.d.ts.map +1 -0
- package/dist/resources/actions.js +52 -0
- package/dist/resources/actions.js.map +1 -0
- package/dist/resources/audit.d.ts +52 -0
- package/dist/resources/audit.d.ts.map +1 -0
- package/dist/resources/audit.js +86 -0
- package/dist/resources/audit.js.map +1 -0
- package/dist/resources/authorization-ceiling.d.ts +25 -0
- package/dist/resources/authorization-ceiling.d.ts.map +1 -0
- package/dist/resources/authorization-ceiling.js +26 -0
- package/dist/resources/authorization-ceiling.js.map +1 -0
- package/dist/resources/authorization-operation-ids.d.ts +15 -0
- package/dist/resources/authorization-operation-ids.d.ts.map +1 -0
- package/dist/resources/authorization-operation-ids.js +31 -0
- package/dist/resources/authorization-operation-ids.js.map +1 -0
- package/dist/resources/authorization.d.ts +60 -0
- package/dist/resources/authorization.d.ts.map +1 -0
- package/dist/resources/authorization.js +51 -0
- package/dist/resources/authorization.js.map +1 -0
- package/dist/resources/authorizations.d.ts +38 -0
- package/dist/resources/authorizations.d.ts.map +1 -0
- package/dist/resources/authorizations.js +19 -0
- package/dist/resources/authorizations.js.map +1 -0
- package/dist/resources/channels.d.ts +36 -0
- package/dist/resources/channels.d.ts.map +1 -0
- package/dist/resources/channels.js +61 -0
- package/dist/resources/channels.js.map +1 -0
- package/dist/resources/contracts.d.ts +46 -0
- package/dist/resources/contracts.d.ts.map +1 -0
- package/dist/resources/contracts.js +86 -0
- package/dist/resources/contracts.js.map +1 -0
- package/dist/resources/conversation-sessions.d.ts +62 -0
- package/dist/resources/conversation-sessions.d.ts.map +1 -0
- package/dist/resources/conversation-sessions.js +48 -0
- package/dist/resources/conversation-sessions.js.map +1 -0
- package/dist/resources/conversation.d.ts +48 -0
- package/dist/resources/conversation.d.ts.map +1 -0
- package/dist/resources/conversation.js +104 -0
- package/dist/resources/conversation.js.map +1 -0
- package/dist/resources/embedding-credentials.d.ts +60 -0
- package/dist/resources/embedding-credentials.d.ts.map +1 -0
- package/dist/resources/embedding-credentials.js +53 -0
- package/dist/resources/embedding-credentials.js.map +1 -0
- package/dist/resources/entities.d.ts +66 -0
- package/dist/resources/entities.d.ts.map +1 -0
- package/dist/resources/entities.js +106 -0
- package/dist/resources/entities.js.map +1 -0
- package/dist/resources/events.d.ts +45 -0
- package/dist/resources/events.d.ts.map +1 -0
- package/dist/resources/events.js +71 -0
- package/dist/resources/events.js.map +1 -0
- package/dist/resources/flows.d.ts +45 -0
- package/dist/resources/flows.d.ts.map +1 -0
- package/dist/resources/flows.js +82 -0
- package/dist/resources/flows.js.map +1 -0
- package/dist/resources/imports.d.ts +8 -0
- package/dist/resources/imports.d.ts.map +1 -0
- package/dist/resources/imports.js +14 -0
- package/dist/resources/imports.js.map +1 -0
- package/dist/resources/index.d.ts +24 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +41 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/llm-credentials.d.ts +47 -0
- package/dist/resources/llm-credentials.d.ts.map +1 -0
- package/dist/resources/llm-credentials.js +46 -0
- package/dist/resources/llm-credentials.js.map +1 -0
- package/dist/resources/llm-services.d.ts +46 -0
- package/dist/resources/llm-services.d.ts.map +1 -0
- package/dist/resources/llm-services.js +41 -0
- package/dist/resources/llm-services.js.map +1 -0
- package/dist/resources/mcp.d.ts +8 -0
- package/dist/resources/mcp.d.ts.map +1 -0
- package/dist/resources/mcp.js +25 -0
- package/dist/resources/mcp.js.map +1 -0
- package/dist/resources/receipts.d.ts +25 -0
- package/dist/resources/receipts.d.ts.map +1 -0
- package/dist/resources/receipts.js +54 -0
- package/dist/resources/receipts.js.map +1 -0
- package/dist/resources/records.d.ts +51 -0
- package/dist/resources/records.d.ts.map +1 -0
- package/dist/resources/records.js +103 -0
- package/dist/resources/records.js.map +1 -0
- package/dist/resources/role-assignments.d.ts +27 -0
- package/dist/resources/role-assignments.d.ts.map +1 -0
- package/dist/resources/role-assignments.js +40 -0
- package/dist/resources/role-assignments.js.map +1 -0
- package/dist/resources/roles.d.ts +39 -0
- package/dist/resources/roles.d.ts.map +1 -0
- package/dist/resources/roles.js +42 -0
- package/dist/resources/roles.js.map +1 -0
- package/dist/resources/runtime-entities.d.ts +23 -0
- package/dist/resources/runtime-entities.d.ts.map +1 -0
- package/dist/resources/runtime-entities.js +29 -0
- package/dist/resources/runtime-entities.js.map +1 -0
- package/dist/resources/state-machine.d.ts +45 -0
- package/dist/resources/state-machine.d.ts.map +1 -0
- package/dist/resources/state-machine.js +86 -0
- package/dist/resources/state-machine.js.map +1 -0
- package/dist/resources/system.d.ts +12 -0
- package/dist/resources/system.d.ts.map +1 -0
- package/dist/resources/system.js +26 -0
- package/dist/resources/system.js.map +1 -0
- package/dist/resources/tools.d.ts +22 -0
- package/dist/resources/tools.d.ts.map +1 -0
- package/dist/resources/tools.js +33 -0
- package/dist/resources/tools.js.map +1 -0
- package/dist/resources/traces.d.ts +65 -0
- package/dist/resources/traces.d.ts.map +1 -0
- package/dist/resources/traces.js +97 -0
- package/dist/resources/traces.js.map +1 -0
- package/dist/runtime/index.d.ts +128 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +210 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/types/actions.d.ts +32 -0
- package/dist/types/actions.d.ts.map +1 -0
- package/dist/types/actions.js +9 -0
- package/dist/types/actions.js.map +1 -0
- package/dist/types/audit.d.ts +65 -0
- package/dist/types/audit.d.ts.map +1 -0
- package/dist/types/audit.js +14 -0
- package/dist/types/audit.js.map +1 -0
- package/dist/types/channels.d.ts +37 -0
- package/dist/types/channels.d.ts.map +1 -0
- package/dist/types/channels.js +6 -0
- package/dist/types/channels.js.map +1 -0
- package/dist/types/confirmation.d.ts +53 -0
- package/dist/types/confirmation.d.ts.map +1 -0
- package/dist/types/confirmation.js +17 -0
- package/dist/types/confirmation.js.map +1 -0
- package/dist/types/contracts.d.ts +194 -0
- package/dist/types/contracts.d.ts.map +1 -0
- package/dist/types/contracts.js +10 -0
- package/dist/types/contracts.js.map +1 -0
- package/dist/types/conversation-sessions.d.ts +58 -0
- package/dist/types/conversation-sessions.d.ts.map +1 -0
- package/dist/types/conversation-sessions.js +6 -0
- package/dist/types/conversation-sessions.js.map +1 -0
- package/dist/types/conversation.d.ts +96 -0
- package/dist/types/conversation.d.ts.map +1 -0
- package/dist/types/conversation.js +3 -0
- package/dist/types/conversation.js.map +1 -0
- package/dist/types/entities.d.ts +22 -0
- package/dist/types/entities.d.ts.map +1 -0
- package/dist/types/entities.js +4 -0
- package/dist/types/entities.js.map +1 -0
- package/dist/types/events-stream.d.ts +82 -0
- package/dist/types/events-stream.d.ts.map +1 -0
- package/dist/types/events-stream.js +65 -0
- package/dist/types/events-stream.js.map +1 -0
- package/dist/types/flows-contract.d.ts +8 -0
- package/dist/types/flows-contract.d.ts.map +1 -0
- package/dist/types/flows-contract.js +7 -0
- package/dist/types/flows-contract.js.map +1 -0
- package/dist/types/flows.d.ts +66 -0
- package/dist/types/flows.d.ts.map +1 -0
- package/dist/types/flows.js +25 -0
- package/dist/types/flows.js.map +1 -0
- package/dist/types/imports.d.ts +57 -0
- package/dist/types/imports.d.ts.map +1 -0
- package/dist/types/imports.js +3 -0
- package/dist/types/imports.js.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/locale.d.ts +24 -0
- package/dist/types/locale.d.ts.map +1 -0
- package/dist/types/locale.js +17 -0
- package/dist/types/locale.js.map +1 -0
- package/dist/types/mcp.d.ts +28 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/mcp.js +12 -0
- package/dist/types/mcp.js.map +1 -0
- package/dist/types/platform.d.ts +51 -0
- package/dist/types/platform.d.ts.map +1 -0
- package/dist/types/platform.js +4 -0
- package/dist/types/platform.js.map +1 -0
- package/dist/types/receipt.d.ts +79 -0
- package/dist/types/receipt.d.ts.map +1 -0
- package/dist/types/receipt.js +15 -0
- package/dist/types/receipt.js.map +1 -0
- package/dist/types/records.d.ts +45 -0
- package/dist/types/records.d.ts.map +1 -0
- package/dist/types/records.js +4 -0
- package/dist/types/records.js.map +1 -0
- package/dist/types/spec.d.ts +6 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/spec.js +3 -0
- package/dist/types/spec.js.map +1 -0
- package/dist/types/state-machine.d.ts +100 -0
- package/dist/types/state-machine.d.ts.map +1 -0
- package/dist/types/state-machine.js +9 -0
- package/dist/types/state-machine.js.map +1 -0
- package/dist/types/system.d.ts +28 -0
- package/dist/types/system.d.ts.map +1 -0
- package/dist/types/system.js +3 -0
- package/dist/types/system.js.map +1 -0
- package/dist/types/tools.d.ts +188 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +22 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/types/traces.d.ts +77 -0
- package/dist/types/traces.d.ts.map +1 -0
- package/dist/types/traces.js +11 -0
- package/dist/types/traces.js.map +1 -0
- package/dist/types/workflows.d.ts +42 -0
- package/dist/types/workflows.d.ts.map +1 -0
- package/dist/types/workflows.js +11 -0
- package/dist/types/workflows.js.map +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// spec-050 / ADR-0098 — runtime plane namespace.
|
|
3
|
+
//
|
|
4
|
+
// Resources here target `{tenant}.zarel.ai/v1` with `runtimeToken`
|
|
5
|
+
// (JWT class 'tenant'). Composed via wrappers over the existing
|
|
6
|
+
// Resource classes under ../resources/* — the wire contracts are
|
|
7
|
+
// unchanged (FR-011); only the access shape changes (FR-001, FR-013).
|
|
8
|
+
//
|
|
9
|
+
// Plane token guard: the FetchClient bound to this namespace has
|
|
10
|
+
// `requireTokenCode: 'runtime_token_missing'`, so every call throws
|
|
11
|
+
// ZarelAuthError before network I/O when runtimeToken is absent.
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.RuntimeNamespace = void 0;
|
|
14
|
+
const conversation_1 = require("../resources/conversation");
|
|
15
|
+
const conversation_sessions_1 = require("../resources/conversation-sessions");
|
|
16
|
+
const channels_1 = require("../resources/channels");
|
|
17
|
+
const tools_1 = require("../resources/tools");
|
|
18
|
+
const records_1 = require("../resources/records");
|
|
19
|
+
const state_machine_1 = require("../resources/state-machine");
|
|
20
|
+
const role_assignments_1 = require("../resources/role-assignments");
|
|
21
|
+
const runtime_entities_1 = require("../resources/runtime-entities");
|
|
22
|
+
const events_1 = require("../resources/events");
|
|
23
|
+
const imports_1 = require("../resources/imports");
|
|
24
|
+
const flows_1 = require("../resources/flows");
|
|
25
|
+
const llm_services_1 = require("../resources/llm-services");
|
|
26
|
+
const llm_credentials_1 = require("../resources/llm-credentials");
|
|
27
|
+
const embedding_credentials_1 = require("../resources/embedding-credentials");
|
|
28
|
+
const actions_1 = require("../resources/actions");
|
|
29
|
+
const traces_1 = require("../resources/traces");
|
|
30
|
+
const audit_1 = require("../resources/audit");
|
|
31
|
+
const receipts_1 = require("../resources/receipts");
|
|
32
|
+
const system_1 = require("../resources/system");
|
|
33
|
+
const authorizations_1 = require("../resources/authorizations");
|
|
34
|
+
const mcp_1 = require("../resources/mcp");
|
|
35
|
+
// ── Composite sub-namespaces (FR-013 idiomatic taxonomy) ───────────────
|
|
36
|
+
class RuntimeConversationSessions {
|
|
37
|
+
_conversation;
|
|
38
|
+
_sessions;
|
|
39
|
+
actions;
|
|
40
|
+
constructor(_conversation, _sessions) {
|
|
41
|
+
this._conversation = _conversation;
|
|
42
|
+
this._sessions = _sessions;
|
|
43
|
+
this.actions = {
|
|
44
|
+
list: _conversation.actions.bind(_conversation),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
list = (...args) => this._conversation.sessions(...args);
|
|
48
|
+
get = (sessionKey, opts) => this._conversation.session(sessionKey, opts);
|
|
49
|
+
create = (input) => this._sessions.create(input);
|
|
50
|
+
delete = (sessionKey) => this._conversation.deleteSession(sessionKey);
|
|
51
|
+
}
|
|
52
|
+
class RuntimeConversation {
|
|
53
|
+
sessions;
|
|
54
|
+
_conversation;
|
|
55
|
+
constructor(client) {
|
|
56
|
+
this._conversation = new conversation_1.ConversationResource(client);
|
|
57
|
+
const sessions = new conversation_sessions_1.ConversationSessionsResource(client);
|
|
58
|
+
this.sessions = new RuntimeConversationSessions(this._conversation, sessions);
|
|
59
|
+
}
|
|
60
|
+
send = (...args) => this._conversation.send(...args);
|
|
61
|
+
}
|
|
62
|
+
class RuntimeFlows {
|
|
63
|
+
instances;
|
|
64
|
+
// The appended lifecycle log. `/runtime/flows/events` is declared in the
|
|
65
|
+
// OpenAPI and mounted by runtime-api, and this namespace was the missing
|
|
66
|
+
// half — so the platform's only per-step history had no SDK binding, and
|
|
67
|
+
// the sibling `state_machine.events` shape it mirrors did.
|
|
68
|
+
events;
|
|
69
|
+
callbacks;
|
|
70
|
+
constructor(client) {
|
|
71
|
+
const f = new flows_1.FlowsResource(client);
|
|
72
|
+
this.instances = {
|
|
73
|
+
list: f.listInstances.bind(f),
|
|
74
|
+
get: f.getInstance.bind(f),
|
|
75
|
+
};
|
|
76
|
+
this.events = {
|
|
77
|
+
list: f.listEvents.bind(f),
|
|
78
|
+
get: f.getEvent.bind(f),
|
|
79
|
+
};
|
|
80
|
+
this.callbacks = {
|
|
81
|
+
resolve: f.resolveCallback.bind(f),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class RuntimeStateMachine {
|
|
86
|
+
instances;
|
|
87
|
+
events;
|
|
88
|
+
transitions;
|
|
89
|
+
replay;
|
|
90
|
+
constructor(client) {
|
|
91
|
+
const sm = new state_machine_1.StateMachineResource(client);
|
|
92
|
+
this.instances = {
|
|
93
|
+
list: sm.listInstances.bind(sm),
|
|
94
|
+
get: sm.getInstance.bind(sm),
|
|
95
|
+
};
|
|
96
|
+
this.events = {
|
|
97
|
+
list: sm.listEvents.bind(sm),
|
|
98
|
+
get: sm.getEvent.bind(sm),
|
|
99
|
+
};
|
|
100
|
+
this.transitions = {
|
|
101
|
+
list: sm.listTransitionRequests.bind(sm),
|
|
102
|
+
listPending: sm.listPendingTransitions.bind(sm),
|
|
103
|
+
get: sm.getTransitionRequest.bind(sm),
|
|
104
|
+
create: sm.createTransitionRequest.bind(sm),
|
|
105
|
+
resolve: sm.resolveTransitionRequest.bind(sm),
|
|
106
|
+
};
|
|
107
|
+
this.replay = sm.replay.bind(sm);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
class RuntimeEvents {
|
|
111
|
+
subscriptions;
|
|
112
|
+
deliveries;
|
|
113
|
+
// G3 — typed SSE stream over GET /runtime/events/stream.
|
|
114
|
+
stream;
|
|
115
|
+
// Async-iterable (pull) view over the same stream.
|
|
116
|
+
iterate;
|
|
117
|
+
constructor(client) {
|
|
118
|
+
const e = new events_1.EventsResource(client);
|
|
119
|
+
this.subscriptions = {
|
|
120
|
+
list: e.listSubscriptions.bind(e),
|
|
121
|
+
create: e.subscribe.bind(e),
|
|
122
|
+
delete: e.deleteSubscription.bind(e),
|
|
123
|
+
};
|
|
124
|
+
this.deliveries = {
|
|
125
|
+
list: e.listDeliveries.bind(e),
|
|
126
|
+
};
|
|
127
|
+
this.stream = e.stream.bind(e);
|
|
128
|
+
this.iterate = e.iterate.bind(e);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
class RuntimeRoles {
|
|
132
|
+
assignments;
|
|
133
|
+
constructor(client) {
|
|
134
|
+
this.assignments = new role_assignments_1.RoleAssignmentsResource(client);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
class RuntimeLlm {
|
|
138
|
+
services;
|
|
139
|
+
credentials;
|
|
140
|
+
constructor(client) {
|
|
141
|
+
this.services = new llm_services_1.LlmServicesResource(client);
|
|
142
|
+
this.credentials = new llm_credentials_1.LlmCredentialsResource(client);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
class RuntimeEmbeddings {
|
|
146
|
+
credentials;
|
|
147
|
+
constructor(client) {
|
|
148
|
+
this.credentials = new embedding_credentials_1.EmbeddingCredentialsResource(client);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
class RuntimeImports {
|
|
152
|
+
_imp;
|
|
153
|
+
constructor(client) {
|
|
154
|
+
this._imp = new imports_1.ImportsResource(client);
|
|
155
|
+
}
|
|
156
|
+
snapshot = (...args) => this._imp.snapshot(...args);
|
|
157
|
+
}
|
|
158
|
+
// ── Top-level RuntimeNamespace ─────────────────────────────────────────
|
|
159
|
+
class RuntimeNamespace {
|
|
160
|
+
records;
|
|
161
|
+
conversation;
|
|
162
|
+
tools;
|
|
163
|
+
flows;
|
|
164
|
+
stateMachine;
|
|
165
|
+
events;
|
|
166
|
+
roles;
|
|
167
|
+
// ADR-0098 D9 — recompute rewrites runtime.records, so its verb is here; entity
|
|
168
|
+
// AUTHORING stays on `contract.entities`.
|
|
169
|
+
entities;
|
|
170
|
+
llm;
|
|
171
|
+
embeddings;
|
|
172
|
+
traces;
|
|
173
|
+
// ADR-0108 — audit tamper-evidence bundle download (binary .tar.gz).
|
|
174
|
+
audit;
|
|
175
|
+
// Desk Spec 3 — the caller's own governance receipts (self-scoped, no view_traces).
|
|
176
|
+
receipts;
|
|
177
|
+
actions;
|
|
178
|
+
imports;
|
|
179
|
+
system;
|
|
180
|
+
// ADR-0102 §6 (S3b) — effective-authorizations introspection.
|
|
181
|
+
authorizations;
|
|
182
|
+
// Sub-spec A (A4) — typed path for the raw MCP stream POST.
|
|
183
|
+
mcp;
|
|
184
|
+
// ADR-0133 §B.4 — the four channel ops (channel-class credential only). The
|
|
185
|
+
// closed SDK duplex surface `@zarel-ai/channels` imports (QI-002).
|
|
186
|
+
channels;
|
|
187
|
+
constructor(client) {
|
|
188
|
+
this.records = new records_1.RecordsResource(client);
|
|
189
|
+
this.conversation = new RuntimeConversation(client);
|
|
190
|
+
this.tools = new tools_1.ToolsResource(client);
|
|
191
|
+
this.flows = new RuntimeFlows(client);
|
|
192
|
+
this.stateMachine = new RuntimeStateMachine(client);
|
|
193
|
+
this.events = new RuntimeEvents(client);
|
|
194
|
+
this.roles = new RuntimeRoles(client);
|
|
195
|
+
this.entities = new runtime_entities_1.RuntimeEntitiesResource(client);
|
|
196
|
+
this.llm = new RuntimeLlm(client);
|
|
197
|
+
this.embeddings = new RuntimeEmbeddings(client);
|
|
198
|
+
this.traces = new traces_1.TracesResource(client);
|
|
199
|
+
this.audit = new audit_1.AuditResource(client);
|
|
200
|
+
this.receipts = new receipts_1.ReceiptsResource(client);
|
|
201
|
+
this.actions = new actions_1.ActionsResource(client);
|
|
202
|
+
this.imports = new RuntimeImports(client);
|
|
203
|
+
this.system = new system_1.SystemResource(client);
|
|
204
|
+
this.authorizations = new authorizations_1.AuthorizationsResource(client);
|
|
205
|
+
this.mcp = new mcp_1.McpResource(client);
|
|
206
|
+
this.channels = new channels_1.ChannelsResource(client);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.RuntimeNamespace = RuntimeNamespace;
|
|
210
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,EAAE;AACF,mEAAmE;AACnE,gEAAgE;AAChE,iEAAiE;AACjE,sEAAsE;AACtE,EAAE;AACF,iEAAiE;AACjE,oEAAoE;AACpE,iEAAiE;;;AAGjE,4DAAiE;AACjE,8EAAkF;AAClF,oDAAyD;AACzD,8CAAmD;AACnD,kDAAuD;AACvD,8DAAkE;AAClE,oEAAwE;AACxE,oEAAwE;AACxE,gDAAqD;AACrD,kDAAuD;AACvD,8CAAmD;AACnD,4DAAgE;AAChE,kEAAsE;AACtE,8EAAkF;AAClF,kDAAuD;AACvD,gDAAqD;AACrD,8CAAmD;AACnD,oDAAyD;AACzD,gDAAqD;AACrD,gEAAqE;AACrE,0CAA+C;AAE/C,0EAA0E;AAE1E,MAAM,2BAA2B;IAEA;IAAsD;IAD1E,OAAO,CAA4C;IAC5D,YAA6B,aAAmC,EAAmB,SAAuC;QAA7F,kBAAa,GAAb,aAAa,CAAsB;QAAmB,cAAS,GAAT,SAAS,CAA8B;QACtH,IAAI,CAAC,OAAO,GAAG;YACX,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;SAClD,CAAC;IACN,CAAC;IACD,IAAI,GAAG,CAAC,GAAG,IAAkD,EAAgD,EAAE,CAC3G,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,I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,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,0CAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAc,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAa,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAgB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,yBAAe,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAc,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,uCAAsB,CAAC,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,GAAG,GAAG,IAAI,iBAAW,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAgB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;CACJ;AAlDD,4CAkDC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire-level types for the actions dispatch surface (Spec 016 / ADR-0085).
|
|
3
|
+
*
|
|
4
|
+
* Lives under `types/` so consumers can reach them via the
|
|
5
|
+
* `@zarel-ai/sdk/types` subpath after the spec-050 plane split.
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionDispatchParams {
|
|
8
|
+
/** Optional record id for record-scoped actions. null/undefined for entity-level. */
|
|
9
|
+
record_id?: string | number | null;
|
|
10
|
+
/**
|
|
11
|
+
* Optional operator note. The runtime dispatch handler IGNORES it (ADR-0127
|
|
12
|
+
* dropped it from the OpenAPI request body), but the zarel-ai/react confirm
|
|
13
|
+
* dialog still collects it; full removal is deferred to the frontend
|
|
14
|
+
* confirmation migration to the US3 token round-trip.
|
|
15
|
+
*/
|
|
16
|
+
notes?: string;
|
|
17
|
+
/** Optional payload forwarded to the underlying entity intent. */
|
|
18
|
+
payload?: Record<string, unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional idempotency key. V1 wire-format-only pass-through; server-side
|
|
21
|
+
* deduplication is not yet implemented (research §R4).
|
|
22
|
+
*/
|
|
23
|
+
idempotency_key?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ActionDispatchSuccessResponse {
|
|
26
|
+
success: true;
|
|
27
|
+
/** The dispatched record (for create/update verbs). null for delete. */
|
|
28
|
+
data: Record<string, unknown> | null;
|
|
29
|
+
/** ADR-0085 telemetry tag. */
|
|
30
|
+
resolved_via_action: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,oBAAoB;IACjC,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC1C,OAAO,EAAE,IAAI,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,8BAA8B;IAC9B,mBAAmB,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wire-level types for the actions dispatch surface (Spec 016 / ADR-0085).
|
|
4
|
+
*
|
|
5
|
+
* Lives under `types/` so consumers can reach them via the
|
|
6
|
+
* `@zarel-ai/sdk/types` subpath after the spec-050 plane split.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit log read-surface types (GTM Phase 0 M1).
|
|
3
|
+
*
|
|
4
|
+
* Wire shapes mirror the runtime contract module's audit DTOs (see
|
|
5
|
+
* authoring/packages/contract/src/domain/types/audit.ts). Kept as plain
|
|
6
|
+
* interfaces so SDK consumers need not depend on the runtime contract package
|
|
7
|
+
* (same convention as `types/traces.ts`).
|
|
8
|
+
*
|
|
9
|
+
* Distinct from `AuditLogName` (`state_machine | flows`) in `resources/audit.ts`,
|
|
10
|
+
* which names the ADR-0108 evidence hash-chains, not these row-tables.
|
|
11
|
+
*/
|
|
12
|
+
/** The two privacy-preserving audit ROW-tables that can be listed. */
|
|
13
|
+
export type AuditRowLogName = 'binding_violations' | 'topic_refusals';
|
|
14
|
+
export interface BindingViolationAuditRow {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly entity: string;
|
|
17
|
+
readonly field: string;
|
|
18
|
+
readonly binding_mode: 'bind' | 'assert' | 'immutable';
|
|
19
|
+
readonly reason: string;
|
|
20
|
+
readonly input_sha256: string;
|
|
21
|
+
readonly input_masked: string;
|
|
22
|
+
readonly path_context: string | null;
|
|
23
|
+
readonly trace_id: string;
|
|
24
|
+
readonly created_by: string;
|
|
25
|
+
readonly created_at: string;
|
|
26
|
+
}
|
|
27
|
+
export interface TopicRefusalAuditRow {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly channel_name: string | null;
|
|
30
|
+
readonly verdict: string;
|
|
31
|
+
readonly category: string;
|
|
32
|
+
readonly reason: 'matched' | 'no_verdict' | 'unscored';
|
|
33
|
+
readonly confidence: number | null;
|
|
34
|
+
readonly strategy: string | null;
|
|
35
|
+
readonly fallback_used: boolean;
|
|
36
|
+
readonly contract_version: number;
|
|
37
|
+
readonly input_sha256: string;
|
|
38
|
+
readonly input_masked: string;
|
|
39
|
+
readonly latency_ms: number | null;
|
|
40
|
+
readonly trace_id: string;
|
|
41
|
+
readonly created_by: string;
|
|
42
|
+
readonly created_at: string;
|
|
43
|
+
}
|
|
44
|
+
/** Shared filters (both logs). `from`/`to` are inclusive ISO date-time bounds. */
|
|
45
|
+
export interface AuditListParamsBase {
|
|
46
|
+
readonly from?: string;
|
|
47
|
+
readonly to?: string;
|
|
48
|
+
readonly limit?: number;
|
|
49
|
+
readonly cursor?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface BindingViolationAuditListParams extends AuditListParamsBase {
|
|
52
|
+
readonly entity?: string;
|
|
53
|
+
readonly field?: string;
|
|
54
|
+
readonly bindingMode?: 'bind' | 'assert' | 'immutable';
|
|
55
|
+
}
|
|
56
|
+
export interface TopicRefusalAuditListParams extends AuditListParamsBase {
|
|
57
|
+
readonly category?: string;
|
|
58
|
+
readonly reason?: 'matched' | 'no_verdict' | 'unscored';
|
|
59
|
+
readonly verdict?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AuditListResponse<Row> {
|
|
62
|
+
readonly items: ReadonlyArray<Row>;
|
|
63
|
+
readonly next_cursor: string | null;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0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4
|
+
*
|
|
5
|
+
* Wire shapes mirror the runtime contract module's audit DTOs (see
|
|
6
|
+
* authoring/packages/contract/src/domain/types/audit.ts). Kept as plain
|
|
7
|
+
* interfaces so SDK consumers need not depend on the runtime contract package
|
|
8
|
+
* (same convention as `types/traces.ts`).
|
|
9
|
+
*
|
|
10
|
+
* Distinct from `AuditLogName` (`state_machine | flows`) in `resources/audit.ts`,
|
|
11
|
+
* which names the ADR-0108 evidence hash-chains, not these row-tables.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface MintPartyTokenRequest {
|
|
2
|
+
/** The recipient's keyed party pseudonym (64-hex). Channel is implied by the credential. */
|
|
3
|
+
readonly party_ref: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PartyToken {
|
|
6
|
+
readonly token: string;
|
|
7
|
+
readonly expires_at: string;
|
|
8
|
+
}
|
|
9
|
+
/** The fetch(=claim) response: the directive metadata PLUS the resolved body. */
|
|
10
|
+
export interface ChannelDirectiveContent {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly channel_name: string;
|
|
13
|
+
readonly recipient_ref: string;
|
|
14
|
+
readonly content_ref: string;
|
|
15
|
+
readonly delivery_mode: 'freeform' | 'template' | 'deferred';
|
|
16
|
+
readonly template?: {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly version: number;
|
|
19
|
+
};
|
|
20
|
+
readonly correlation: {
|
|
21
|
+
readonly session_key: string;
|
|
22
|
+
readonly turn_seq: number;
|
|
23
|
+
};
|
|
24
|
+
readonly deadline_at?: string;
|
|
25
|
+
/** The reply body to deliver (metadata-only stays on the audit rows; this is the fetch). */
|
|
26
|
+
readonly content: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ChannelSendResult {
|
|
29
|
+
readonly status: 'accepted' | 'failed' | 'deferred';
|
|
30
|
+
readonly provider_message_id?: string;
|
|
31
|
+
readonly attested_by: 'runtime' | 'channel_provider';
|
|
32
|
+
}
|
|
33
|
+
/** A `channel.directive_created` event off the subscribe stream. */
|
|
34
|
+
export interface ChannelDirectiveStreamEvent {
|
|
35
|
+
readonly directive_id: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/types/channels.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IAClC,4FAA4F;IAC5F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAED,iFAAiF;AACjF,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAClF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IACpD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,SAAS,GAAG,kBAAkB,CAAC;CACxD;AAED,oEAAoE;AACpE,MAAM,WAAW,2BAA2B;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CACjC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ADR-0133 §B.4 — the four channel-ops DTOs (SDK-local, zero-dep mirror of the
|
|
3
|
+
// @zarel-ai/channel-port wire schemas). The runtime plane validates against the zod
|
|
4
|
+
// schemas; these are the typed client view.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
//# sourceMappingURL=channels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/types/channels.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,oFAAoF;AACpF,4CAA4C"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The client half of the confirmation round-trip (ADR-0127 US3).
|
|
3
|
+
*
|
|
4
|
+
* A `confirm` guard pauses a write and answers `409 confirmation_required`
|
|
5
|
+
* carrying, under `error.confirmation`, every guard that fired plus ONE consent
|
|
6
|
+
* token bound to the whole set. The caller shows the human every prompt and
|
|
7
|
+
* re-submits the IDENTICAL request with the token in `X-Zarel-Confirmation-Token`.
|
|
8
|
+
*
|
|
9
|
+
* Hand-authored rather than imported from `@zarel-ai/contract/core` — the SDK
|
|
10
|
+
* ships no runtime dependency on the platform packages, and its wire types are
|
|
11
|
+
* the OpenAPI projection. `tests/confirmation-types-assignability.test.ts` pins
|
|
12
|
+
* these against `generated/runtime.ts` at compile time, so a spec change that
|
|
13
|
+
* renames or adds a field fails the suite instead of drifting silently.
|
|
14
|
+
*/
|
|
15
|
+
/** One guard that paused a write, with the prompt the human is shown for it. */
|
|
16
|
+
export interface ConfirmationGuard {
|
|
17
|
+
/**
|
|
18
|
+
* The guard's own name: an entity check's `name`, or `<field>__<from>__<to>`
|
|
19
|
+
* for a state-machine edge. Never a governed action name.
|
|
20
|
+
*/
|
|
21
|
+
readonly name: string;
|
|
22
|
+
/** Human-readable prompt for THIS guard, resolved server-side. */
|
|
23
|
+
readonly prompt: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The challenge attached to a `409 confirmation_required`.
|
|
27
|
+
*
|
|
28
|
+
* ONE challenge per WRITE, not per guard: a single write can fire several
|
|
29
|
+
* `confirm` guards at once and the token is bound to the whole set. A caller
|
|
30
|
+
* MUST render every entry of {@link guards} before retrying — consenting on one
|
|
31
|
+
* prompt while another stayed hidden signs for a condition the operator never
|
|
32
|
+
* saw.
|
|
33
|
+
*/
|
|
34
|
+
export interface ConfirmationChallenge {
|
|
35
|
+
/** Every guard that fired on this write. Never empty. */
|
|
36
|
+
readonly guards: readonly ConfirmationGuard[];
|
|
37
|
+
/** The opaque `zct1.…` consent token to echo on the confirming retry. */
|
|
38
|
+
readonly token: string;
|
|
39
|
+
/** ISO-8601 expiry — the caller cannot derive it from the opaque token. */
|
|
40
|
+
readonly expires_at: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Per-call option accepted by every write that a `confirm` guard can pause.
|
|
44
|
+
*
|
|
45
|
+
* The retry must re-send the request BYTE-IDENTICAL: the token binds the payload
|
|
46
|
+
* as it was requested, so an edited retry is a different write and is challenged
|
|
47
|
+
* again by design.
|
|
48
|
+
*/
|
|
49
|
+
export interface ConfirmationRetryOptions {
|
|
50
|
+
/** `challenge.token` from the prior `409 confirmation_required`. */
|
|
51
|
+
confirmationToken?: string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=confirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../src/types/confirmation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IAClC,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC9C,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACrC,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The client half of the confirmation round-trip (ADR-0127 US3).
|
|
4
|
+
*
|
|
5
|
+
* A `confirm` guard pauses a write and answers `409 confirmation_required`
|
|
6
|
+
* carrying, under `error.confirmation`, every guard that fired plus ONE consent
|
|
7
|
+
* token bound to the whole set. The caller shows the human every prompt and
|
|
8
|
+
* re-submits the IDENTICAL request with the token in `X-Zarel-Confirmation-Token`.
|
|
9
|
+
*
|
|
10
|
+
* Hand-authored rather than imported from `@zarel-ai/contract/core` — the SDK
|
|
11
|
+
* ships no runtime dependency on the platform packages, and its wire types are
|
|
12
|
+
* the OpenAPI projection. `tests/confirmation-types-assignability.test.ts` pins
|
|
13
|
+
* these against `generated/runtime.ts` at compile time, so a spec change that
|
|
14
|
+
* renames or adds a field fails the suite instead of drifting silently.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
//# sourceMappingURL=confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.js","sourceRoot":"","sources":["../../src/types/confirmation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG"}
|