@zarel-ai/sdk 0.6.0 → 0.7.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 +1 -1
- package/README.md +29 -31
- package/dist/_internal/auth-headers.d.ts +3 -3
- package/dist/_internal/auth-headers.d.ts.map +1 -1
- package/dist/_internal/auth-headers.js +5 -3
- package/dist/_internal/auth-headers.js.map +1 -1
- package/dist/_internal/confirmation.d.ts +1 -1
- package/dist/_internal/confirmation.d.ts.map +1 -1
- package/dist/_internal/confirmation.js +3 -1
- package/dist/_internal/confirmation.js.map +1 -1
- package/dist/_internal/event-iterator.d.ts.map +1 -1
- package/dist/_internal/event-iterator.js +3 -1
- package/dist/_internal/event-iterator.js.map +1 -1
- package/dist/_internal/fetch-client.d.ts +26 -18
- package/dist/_internal/fetch-client.d.ts.map +1 -1
- package/dist/_internal/fetch-client.js +40 -35
- package/dist/_internal/fetch-client.js.map +1 -1
- package/dist/_internal/interceptors.d.ts.map +1 -1
- package/dist/_internal/interceptors.js.map +1 -1
- package/dist/_internal/mcp.d.ts.map +1 -1
- package/dist/_internal/mcp.js +6 -4
- package/dist/_internal/mcp.js.map +1 -1
- package/dist/_internal/pagination.d.ts +5 -5
- package/dist/_internal/pagination.d.ts.map +1 -1
- package/dist/_internal/pagination.js +7 -5
- package/dist/_internal/pagination.js.map +1 -1
- package/dist/_internal/require-token.d.ts +4 -4
- package/dist/_internal/require-token.d.ts.map +1 -1
- package/dist/_internal/require-token.js +6 -4
- package/dist/_internal/require-token.js.map +1 -1
- package/dist/_internal/retry-after.d.ts.map +1 -1
- package/dist/_internal/retry-after.js +2 -0
- package/dist/_internal/retry-after.js.map +1 -1
- package/dist/_internal/sse-client.d.ts.map +1 -1
- package/dist/_internal/sse-client.js +4 -3
- package/dist/_internal/sse-client.js.map +1 -1
- package/dist/_internal/version.d.ts +2 -2
- package/dist/_internal/version.d.ts.map +1 -1
- package/dist/_internal/version.js +4 -2
- package/dist/_internal/version.js.map +1 -1
- package/dist/client.d.ts +8 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +10 -10
- package/dist/client.js.map +1 -1
- package/dist/contract/_singleton.d.ts +31 -6
- package/dist/contract/_singleton.d.ts.map +1 -1
- package/dist/contract/_singleton.js +30 -6
- package/dist/contract/_singleton.js.map +1 -1
- package/dist/contract/actions.d.ts +16 -4
- package/dist/contract/actions.d.ts.map +1 -1
- package/dist/contract/actions.js +13 -12
- package/dist/contract/actions.js.map +1 -1
- package/dist/contract/assistant.d.ts +3 -3
- package/dist/contract/assistant.d.ts.map +1 -1
- package/dist/contract/assistant.js +13 -11
- package/dist/contract/assistant.js.map +1 -1
- package/dist/contract/batch.d.ts +9 -20
- package/dist/contract/batch.d.ts.map +1 -1
- package/dist/contract/batch.js +14 -6
- package/dist/contract/batch.js.map +1 -1
- package/dist/contract/capabilities.d.ts +7 -13
- package/dist/contract/capabilities.d.ts.map +1 -1
- package/dist/contract/capabilities.js +10 -8
- package/dist/contract/capabilities.js.map +1 -1
- package/dist/contract/constraints.d.ts +7 -13
- package/dist/contract/constraints.d.ts.map +1 -1
- package/dist/contract/constraints.js +10 -8
- package/dist/contract/constraints.js.map +1 -1
- package/dist/contract/events.d.ts +9 -13
- package/dist/contract/events.d.ts.map +1 -1
- package/dist/contract/events.js +12 -13
- package/dist/contract/events.js.map +1 -1
- package/dist/contract/flows.d.ts +30 -19
- package/dist/contract/flows.d.ts.map +1 -1
- package/dist/contract/flows.js +46 -29
- package/dist/contract/flows.js.map +1 -1
- package/dist/contract/index.d.ts +207 -32
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +13 -14
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/metadata.d.ts +6 -20
- package/dist/contract/metadata.d.ts.map +1 -1
- package/dist/contract/metadata.js +16 -8
- package/dist/contract/metadata.js.map +1 -1
- package/dist/contract/process-model.d.ts +10 -15
- package/dist/contract/process-model.d.ts.map +1 -1
- package/dist/contract/process-model.js +11 -9
- package/dist/contract/process-model.js.map +1 -1
- package/dist/contract/roots/channels.d.ts.map +1 -1
- package/dist/contract/roots/channels.js +12 -10
- package/dist/contract/roots/channels.js.map +1 -1
- package/dist/contract/roots/events.d.ts.map +1 -1
- package/dist/contract/roots/events.js +2 -0
- package/dist/contract/roots/events.js.map +1 -1
- package/dist/contract/roots/index.d.ts +3 -2
- package/dist/contract/roots/index.d.ts.map +1 -1
- package/dist/contract/roots/index.js +13 -12
- package/dist/contract/roots/index.js.map +1 -1
- package/dist/contract/roots/mcp-servers.d.ts +11 -29
- package/dist/contract/roots/mcp-servers.d.ts.map +1 -1
- package/dist/contract/roots/mcp-servers.js +22 -18
- package/dist/contract/roots/mcp-servers.js.map +1 -1
- package/dist/contract/roots/profiles.d.ts +13 -12
- package/dist/contract/roots/profiles.d.ts.map +1 -1
- package/dist/contract/roots/profiles.js +18 -7
- package/dist/contract/roots/profiles.js.map +1 -1
- package/dist/contract/roots/timezone.d.ts +3 -3
- package/dist/contract/roots/timezone.d.ts.map +1 -1
- package/dist/contract/roots/timezone.js +5 -2
- package/dist/contract/roots/timezone.js.map +1 -1
- package/dist/contract/roots/treatment.d.ts +3 -2
- package/dist/contract/roots/treatment.d.ts.map +1 -1
- package/dist/contract/roots/treatment.js +8 -8
- package/dist/contract/roots/treatment.js.map +1 -1
- package/dist/contract/roots/vocabulary.d.ts +20 -13
- package/dist/contract/roots/vocabulary.d.ts.map +1 -1
- package/dist/contract/roots/vocabulary.js +28 -9
- package/dist/contract/roots/vocabulary.js.map +1 -1
- package/dist/contract/schemas.d.ts +7 -10
- package/dist/contract/schemas.d.ts.map +1 -1
- package/dist/contract/schemas.js +10 -8
- package/dist/contract/schemas.js.map +1 -1
- package/dist/contract/skills.d.ts +14 -4
- package/dist/contract/skills.d.ts.map +1 -1
- package/dist/contract/skills.js +11 -11
- package/dist/contract/skills.js.map +1 -1
- package/dist/errors.d.ts +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/generated/contract.d.ts +4494 -706
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/index.d.ts +119 -7
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/runtime.d.ts +1490 -368
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/unwrap-map.d.ts +5 -2
- package/dist/generated/unwrap-map.d.ts.map +1 -1
- package/dist/generated/unwrap-map.js +5 -5
- package/dist/generated/unwrap-map.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/actions.d.ts +5 -6
- package/dist/resources/actions.d.ts.map +1 -1
- package/dist/resources/actions.js +9 -10
- package/dist/resources/actions.js.map +1 -1
- package/dist/resources/audit.d.ts +6 -6
- package/dist/resources/audit.d.ts.map +1 -1
- package/dist/resources/audit.js +3 -25
- package/dist/resources/audit.js.map +1 -1
- package/dist/resources/authorization-ceiling.d.ts +2 -2
- package/dist/resources/authorization-ceiling.d.ts.map +1 -1
- package/dist/resources/authorization-ceiling.js +8 -7
- package/dist/resources/authorization-ceiling.js.map +1 -1
- package/dist/resources/authorization-operation-ids.d.ts +1 -1
- package/dist/resources/authorization-operation-ids.d.ts.map +1 -1
- package/dist/resources/authorization-operation-ids.js +4 -2
- package/dist/resources/authorization-operation-ids.js.map +1 -1
- package/dist/resources/authorization.d.ts +53 -19
- package/dist/resources/authorization.d.ts.map +1 -1
- package/dist/resources/authorization.js +24 -6
- package/dist/resources/authorization.js.map +1 -1
- package/dist/resources/authorizations.d.ts +3 -5
- package/dist/resources/authorizations.d.ts.map +1 -1
- package/dist/resources/authorizations.js +4 -2
- package/dist/resources/authorizations.js.map +1 -1
- package/dist/resources/channels.d.ts +7 -7
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/channels.js +10 -10
- package/dist/resources/channels.js.map +1 -1
- package/dist/resources/contracts.d.ts +2 -2
- package/dist/resources/contracts.d.ts.map +1 -1
- package/dist/resources/contracts.js +15 -14
- package/dist/resources/contracts.js.map +1 -1
- package/dist/resources/conversation-sessions.d.ts +19 -20
- package/dist/resources/conversation-sessions.d.ts.map +1 -1
- package/dist/resources/conversation-sessions.js +17 -22
- package/dist/resources/conversation-sessions.js.map +1 -1
- package/dist/resources/conversation.d.ts +4 -4
- package/dist/resources/conversation.d.ts.map +1 -1
- package/dist/resources/conversation.js +13 -11
- package/dist/resources/conversation.js.map +1 -1
- package/dist/resources/embedding-credentials.d.ts +3 -3
- package/dist/resources/embedding-credentials.d.ts.map +1 -1
- package/dist/resources/embedding-credentials.js +8 -6
- package/dist/resources/embedding-credentials.js.map +1 -1
- package/dist/resources/entities.d.ts +50 -32
- package/dist/resources/entities.d.ts.map +1 -1
- package/dist/resources/entities.js +51 -32
- package/dist/resources/entities.js.map +1 -1
- package/dist/resources/events.d.ts +4 -5
- package/dist/resources/events.d.ts.map +1 -1
- package/dist/resources/events.js +12 -11
- package/dist/resources/events.js.map +1 -1
- package/dist/resources/flows.d.ts +18 -15
- package/dist/resources/flows.d.ts.map +1 -1
- package/dist/resources/flows.js +41 -27
- package/dist/resources/flows.js.map +1 -1
- package/dist/resources/imports.d.ts.map +1 -1
- package/dist/resources/imports.js +1 -1
- package/dist/resources/imports.js.map +1 -1
- package/dist/resources/index.d.ts +3 -2
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +6 -2
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/llm-credentials.d.ts +21 -6
- package/dist/resources/llm-credentials.d.ts.map +1 -1
- package/dist/resources/llm-credentials.js +25 -10
- package/dist/resources/llm-credentials.js.map +1 -1
- package/dist/resources/llm-services.d.ts +8 -8
- package/dist/resources/llm-services.d.ts.map +1 -1
- package/dist/resources/llm-services.js +11 -9
- package/dist/resources/llm-services.js.map +1 -1
- package/dist/resources/mcp.d.ts.map +1 -1
- package/dist/resources/mcp.js +5 -3
- package/dist/resources/mcp.js.map +1 -1
- package/dist/resources/receipts.d.ts +1 -1
- package/dist/resources/receipts.d.ts.map +1 -1
- package/dist/resources/receipts.js +1 -1
- package/dist/resources/receipts.js.map +1 -1
- package/dist/resources/records.d.ts +1 -1
- package/dist/resources/records.d.ts.map +1 -1
- package/dist/resources/records.js +7 -5
- package/dist/resources/records.js.map +1 -1
- package/dist/resources/role-assignments.d.ts +4 -5
- package/dist/resources/role-assignments.d.ts.map +1 -1
- package/dist/resources/role-assignments.js +8 -7
- package/dist/resources/role-assignments.js.map +1 -1
- package/dist/resources/roles.d.ts +23 -23
- package/dist/resources/roles.d.ts.map +1 -1
- package/dist/resources/roles.js +20 -14
- package/dist/resources/roles.js.map +1 -1
- package/dist/resources/runtime-entities.d.ts +12 -9
- package/dist/resources/runtime-entities.d.ts.map +1 -1
- package/dist/resources/runtime-entities.js +5 -8
- package/dist/resources/runtime-entities.js.map +1 -1
- package/dist/resources/state-machine.d.ts +6 -12
- package/dist/resources/state-machine.d.ts.map +1 -1
- package/dist/resources/state-machine.js +17 -21
- package/dist/resources/state-machine.js.map +1 -1
- package/dist/resources/system.d.ts.map +1 -1
- package/dist/resources/system.js +5 -5
- package/dist/resources/system.js.map +1 -1
- package/dist/resources/tools.d.ts +2 -2
- package/dist/resources/tools.d.ts.map +1 -1
- package/dist/resources/tools.js +7 -5
- package/dist/resources/tools.js.map +1 -1
- package/dist/resources/traces.d.ts +1 -7
- package/dist/resources/traces.d.ts.map +1 -1
- package/dist/resources/traces.js +4 -29
- package/dist/resources/traces.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -2
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +21 -17
- package/dist/runtime/index.js.map +1 -1
- package/dist/types/actions.d.ts +7 -8
- package/dist/types/actions.d.ts.map +1 -1
- package/dist/types/actions.js +4 -2
- package/dist/types/actions.js.map +1 -1
- package/dist/types/audit.d.ts +5 -7
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +6 -6
- package/dist/types/audit.js.map +1 -1
- package/dist/types/channels.d.ts +1 -1
- package/dist/types/channels.d.ts.map +1 -1
- package/dist/types/channels.js +5 -3
- package/dist/types/channels.js.map +1 -1
- package/dist/types/collections-contract.d.ts +50 -0
- package/dist/types/collections-contract.d.ts.map +1 -0
- package/dist/types/collections-contract.js +22 -0
- package/dist/types/collections-contract.js.map +1 -0
- package/dist/types/confirmation.d.ts +4 -4
- package/dist/types/confirmation.d.ts.map +1 -1
- package/dist/types/confirmation.js +6 -4
- package/dist/types/confirmation.js.map +1 -1
- package/dist/types/contracts.d.ts +12 -15
- package/dist/types/contracts.d.ts.map +1 -1
- package/dist/types/contracts.js +5 -4
- package/dist/types/contracts.js.map +1 -1
- package/dist/types/conversation-sessions.d.ts +1 -1
- package/dist/types/conversation-sessions.d.ts.map +1 -1
- package/dist/types/conversation-sessions.js +3 -1
- package/dist/types/conversation-sessions.js.map +1 -1
- package/dist/types/conversation.d.ts +13 -40
- package/dist/types/conversation.d.ts.map +1 -1
- package/dist/types/entities.d.ts +52 -16
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/entities.js +12 -0
- package/dist/types/entities.js.map +1 -1
- package/dist/types/events-stream.d.ts +2 -2
- package/dist/types/events-stream.d.ts.map +1 -1
- package/dist/types/events-stream.js +6 -4
- package/dist/types/events-stream.js.map +1 -1
- package/dist/types/flows-contract.d.ts +28 -7
- package/dist/types/flows-contract.d.ts.map +1 -1
- package/dist/types/flows-contract.js +11 -4
- package/dist/types/flows-contract.js.map +1 -1
- package/dist/types/flows.d.ts +27 -58
- package/dist/types/flows.d.ts.map +1 -1
- package/dist/types/flows.js +8 -20
- package/dist/types/flows.js.map +1 -1
- package/dist/types/imports.d.ts +9 -0
- package/dist/types/imports.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/locale.d.ts +2 -2
- package/dist/types/locale.d.ts.map +1 -1
- package/dist/types/locale.js +4 -2
- package/dist/types/locale.js.map +1 -1
- package/dist/types/mcp-and-events-contract.d.ts +51 -0
- package/dist/types/mcp-and-events-contract.d.ts.map +1 -0
- package/dist/types/mcp-and-events-contract.js +20 -0
- package/dist/types/mcp-and-events-contract.js.map +1 -0
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +3 -1
- package/dist/types/mcp.js.map +1 -1
- package/dist/types/platform.d.ts +12 -12
- package/dist/types/platform.d.ts.map +1 -1
- package/dist/types/platform.js +0 -1
- package/dist/types/platform.js.map +1 -1
- package/dist/types/receipt.d.ts +3 -5
- package/dist/types/receipt.d.ts.map +1 -1
- package/dist/types/receipt.js +5 -5
- package/dist/types/receipt.js.map +1 -1
- package/dist/types/records.d.ts +3 -3
- package/dist/types/records.d.ts.map +1 -1
- package/dist/types/records.js +2 -0
- package/dist/types/records.js.map +1 -1
- package/dist/types/spec.d.ts +2 -2
- package/dist/types/spec.d.ts.map +1 -1
- package/dist/types/state-machine.d.ts +48 -84
- package/dist/types/state-machine.d.ts.map +1 -1
- package/dist/types/state-machine.js +9 -4
- package/dist/types/state-machine.js.map +1 -1
- package/dist/types/system.d.ts.map +1 -1
- package/dist/types/tools.d.ts +36 -28
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/types/tools.js +6 -6
- package/dist/types/tools.js.map +1 -1
- package/dist/types/traces.d.ts +6 -9
- package/dist/types/traces.d.ts.map +1 -1
- package/dist/types/traces.js +5 -5
- package/dist/types/traces.js.map +1 -1
- package/dist/types/treatment-contract.d.ts +70 -0
- package/dist/types/treatment-contract.d.ts.map +1 -0
- package/dist/types/treatment-contract.js +20 -0
- package/dist/types/treatment-contract.js.map +1 -0
- package/dist/types/workflows.d.ts +14 -0
- package/dist/types/workflows.d.ts.map +1 -1
- package/dist/types/workflows.js +7 -6
- package/dist/types/workflows.js.map +1 -1
- package/package.json +93 -96
- package/dist/contract/governance.d.ts +0 -6
- package/dist/contract/governance.d.ts.map +0 -1
- package/dist/contract/governance.js +0 -17
- package/dist/contract/governance.js.map +0 -1
package/dist/types/tools.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface FieldToolDefinition {
|
|
|
23
23
|
/**
|
|
24
24
|
* The effective display field of the *referenced* entity for a
|
|
25
25
|
* reference/reference[] field — the field a client labels/searches the target
|
|
26
|
-
* by
|
|
26
|
+
* by. Resolved server-side; omitted when unresolvable.
|
|
27
27
|
* (Mirror of the contract-side `FieldToolDefinition` — kept in lockstep.)
|
|
28
28
|
*/
|
|
29
29
|
display_field?: string;
|
|
@@ -51,7 +51,7 @@ export interface UserVisibleEntityTool {
|
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Per-edge projection of a `StateMachineTransition` exposed to UIs through
|
|
54
|
-
* the catalog
|
|
54
|
+
* the catalog. `requires_reason` is omitted when the
|
|
55
55
|
* underlying flag is `false` or absent.
|
|
56
56
|
*/
|
|
57
57
|
export interface TransitionEdge {
|
|
@@ -61,7 +61,7 @@ export interface TransitionEdge {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Per-user projection of a state-machine `(entity, field)` transition tool
|
|
64
|
-
* trio
|
|
64
|
+
* trio. Carries the rendering inputs needed by the UI surfaces
|
|
65
65
|
* (`<FieldTransitions>`, `<TransitionRequestQueue>`).
|
|
66
66
|
*/
|
|
67
67
|
export interface UserVisibleTransitionTool {
|
|
@@ -77,13 +77,12 @@ export interface UserVisibleTransitionTool {
|
|
|
77
77
|
inspect: boolean;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
* Per-user projection of a YAML-declared `action`
|
|
81
|
-
* authorized to dispatch. Carries the rendering inputs needed by the
|
|
80
|
+
* Per-user projection of a YAML-declared `action` the user is
|
|
81
|
+
* authorized to dispatch. Carries the rendering inputs needed by the UI
|
|
82
82
|
* surfaces (`<EntityActions>`, `<EntityRecordActions>`).
|
|
83
83
|
*
|
|
84
|
-
*
|
|
85
|
-
* the
|
|
86
|
-
* and entity-fallback decisions are NOT projected.
|
|
84
|
+
* ONE ENTRY IN EITHER `actions[]` OR `dispatchable_actions[]` — the element type is shared and
|
|
85
|
+
* the RULE is not: `actions[]` is exposed AND granted, `dispatchable_actions[]` is granted.
|
|
87
86
|
*/
|
|
88
87
|
export interface UserVisibleActionTool {
|
|
89
88
|
/** Action name from YAML — unique within the tenant. */
|
|
@@ -96,14 +95,14 @@ export interface UserVisibleActionTool {
|
|
|
96
95
|
description?: string;
|
|
97
96
|
/** Dispatcher-recognised intent string — `action.<name>` or `external.<ns>.<tool>`. */
|
|
98
97
|
intent_type: string;
|
|
99
|
-
/** Whether the action is native (declared in tenant YAML) or external
|
|
98
|
+
/** Whether the action is native (declared in tenant YAML) or external. */
|
|
100
99
|
provenance: 'native' | 'external';
|
|
101
100
|
}
|
|
102
101
|
/**
|
|
103
102
|
* Per-tenant role declaration. Always projected for every caller — read-only
|
|
104
103
|
* metadata used by UIs to render role pickers and label other catalog
|
|
105
104
|
* references. Editing is gated separately by the `roles` contract-section
|
|
106
|
-
* policy (
|
|
105
|
+
* policy (surfaced to UIs via {@link UserToolCatalog.admin_sections}).
|
|
107
106
|
*/
|
|
108
107
|
export interface UserVisibleRole {
|
|
109
108
|
name: string;
|
|
@@ -112,8 +111,8 @@ export interface UserVisibleRole {
|
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
114
113
|
* Per-tenant flow declaration projected for users with `inspect` policy on the
|
|
115
|
-
* flow (open
|
|
116
|
-
*
|
|
114
|
+
* flow (open by default). Only carries what a navigation list needs — the
|
|
115
|
+
* full editable shape is fetched from the contract API.
|
|
117
116
|
*/
|
|
118
117
|
export interface UserVisibleFlow {
|
|
119
118
|
name: string;
|
|
@@ -129,13 +128,11 @@ export interface UserVisibleSkill {
|
|
|
129
128
|
description?: string;
|
|
130
129
|
}
|
|
131
130
|
/**
|
|
132
|
-
*
|
|
131
|
+
* Mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
|
|
133
132
|
* of contract sections; `UserToolCatalog.admin_sections` is a subset (the
|
|
134
|
-
* sections the user can `update`). The SDK
|
|
135
|
-
* import the contract package, so this is a hand-maintained mirror
|
|
136
|
-
*
|
|
137
|
-
* dissolution had created. The ADR-0136 QI-001 gate compared seven mirrors and
|
|
138
|
-
* did not compare this one, which is why nothing said so. It does now.
|
|
133
|
+
* sections the user can `update`). The SDK has no dependencies and does not
|
|
134
|
+
* import the contract package, so this is a hand-maintained mirror: keep it
|
|
135
|
+
* equal to the contract package's list.
|
|
139
136
|
*/
|
|
140
137
|
export declare const CONTRACT_SECTION_NAMES: readonly ["metadata", "entities", "roles", "skills", "actions", "schemas", "capabilities", "flows", "constraints", "events", "llm", "embeddings", "treatment", "channels", "channels/credentials", "mcp_servers", "quotas", "timezone", "process_model", "authorization"];
|
|
141
138
|
export type ContractSectionName = typeof CONTRACT_SECTION_NAMES[number];
|
|
@@ -144,22 +141,33 @@ export interface UserToolCatalog {
|
|
|
144
141
|
user_name: string;
|
|
145
142
|
user_roles: string[];
|
|
146
143
|
entities: UserVisibleEntityTool[];
|
|
147
|
-
/**
|
|
144
|
+
/** Trio-coupled state-machine projection. */
|
|
148
145
|
transitions?: UserVisibleTransitionTool[];
|
|
149
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* THE TOOL SURFACE — every EXPOSED action, exactly the actions offered as MCP tools.
|
|
148
|
+
*/
|
|
150
149
|
actions?: UserVisibleActionTool[];
|
|
151
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* EVERY GRANTED action, exposure irrelevant — what may be DISPATCHED by name through
|
|
152
|
+
* `POST /runtime/actions/:name`.
|
|
153
|
+
*
|
|
154
|
+
* A UI offering action buttons reads THIS one, not `actions`. An unexposed action has no MCP
|
|
155
|
+
* tool and is still dispatchable, and the bare `/runtime/records` surface answers
|
|
156
|
+
* `action_required` for a verb that carries a named action — so a button missing here leaves
|
|
157
|
+
* the verb with no path at all.
|
|
158
|
+
*/
|
|
159
|
+
dispatchable_actions?: UserVisibleActionTool[];
|
|
160
|
+
/** Declared roles in the tenant contract (read-only metadata). */
|
|
152
161
|
roles: UserVisibleRole[];
|
|
153
|
-
/**
|
|
162
|
+
/** Flows the user can `inspect` (open by default). */
|
|
154
163
|
flows: UserVisibleFlow[];
|
|
155
|
-
/**
|
|
164
|
+
/** Skills whose YAML `constraints` evaluate true for the user. */
|
|
156
165
|
skills: UserVisibleSkill[];
|
|
157
166
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* `manage_imports` / `manage_api_keys` capability codes.
|
|
167
|
+
* Contract sections the user can `update`. A UI can derive which admin
|
|
168
|
+
* **mutation** pages to offer (roles, skills, flows, authorization,
|
|
169
|
+
* state machines, settings) and the admin-tier pages (imports, API keys)
|
|
170
|
+
* from this.
|
|
163
171
|
*/
|
|
164
172
|
admin_sections: ContractSectionName[];
|
|
165
173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,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CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClC;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC/C,kEAAkE;IAClE,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,kEAAkE;IAClE,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,mBAAmB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/types/tools.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// ── Tools ────────────────────────────────────────────────────────────────
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
6
|
exports.CONTRACT_SECTION_NAMES = void 0;
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* Mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
|
|
7
9
|
* of contract sections; `UserToolCatalog.admin_sections` is a subset (the
|
|
8
|
-
* sections the user can `update`). The SDK
|
|
9
|
-
* import the contract package, so this is a hand-maintained mirror
|
|
10
|
-
*
|
|
11
|
-
* dissolution had created. The ADR-0136 QI-001 gate compared seven mirrors and
|
|
12
|
-
* did not compare this one, which is why nothing said so. It does now.
|
|
10
|
+
* sections the user can `update`). The SDK has no dependencies and does not
|
|
11
|
+
* import the contract package, so this is a hand-maintained mirror: keep it
|
|
12
|
+
* equal to the contract package's list.
|
|
13
13
|
*/
|
|
14
14
|
exports.CONTRACT_SECTION_NAMES = [
|
|
15
15
|
'metadata', 'entities', 'roles', 'skills', 'actions', 'schemas',
|
package/dist/types/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":";AAAA,4EAA4E;;;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,4EAA4E;;;AA2I5E;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAG;IAClC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IAC/D,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ;IAChD,KAAK,EAAE,YAAY,EAAE,WAAW;IAChC,UAAU,EAAE,sBAAsB;IAClC,aAAa,EAAE,QAAQ,EAAE,UAAU;IACnC,eAAe,EAAE,eAAe;CAC1B,CAAC"}
|
package/dist/types/traces.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Trace observability types
|
|
2
|
+
* Trace observability types.
|
|
3
3
|
*
|
|
4
|
-
* Wire shapes
|
|
5
|
-
*
|
|
6
|
-
* canonical-with-runtime surface here as plain interfaces avoids forcing
|
|
7
|
-
* SDK consumers to depend on the runtime contract package.
|
|
4
|
+
* Wire shapes of the runtime API's trace responses, kept as plain interfaces
|
|
5
|
+
* with no dependencies.
|
|
8
6
|
*/
|
|
9
7
|
/**
|
|
10
8
|
* WHICH WINDOW a trace's timing fields were measured over.
|
|
11
9
|
*
|
|
12
|
-
* The listing and the single-trace read answer different questions about the same trace
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* so. Each surface now declares its own.
|
|
10
|
+
* The listing and the single-trace read answer different questions about the same trace: a
|
|
11
|
+
* conversation answered in 6 s whose webhook retry settled at 40 s reports 6 s in the list and
|
|
12
|
+
* 40 s when opened. Both are true, so each surface declares its own basis.
|
|
16
13
|
*/
|
|
17
14
|
export type TraceDurationBasis = 'anchor_evidence' | 'all_evidence';
|
|
18
15
|
export type TraceOutcome = 'executed' | 'refused' | 'awaiting_human_decision' | 'failed';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,yBAAyB,GAAG,QAAQ,CAAC;AAEzF,MAAM,MAAM,UAAU,GAChB,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,YAAY,GACZ,eAAe,GACf,MAAM,GACN,WAAW,GACX,OAAO,CAAC;AAEd,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EA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E,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;uEACmE;IACnE,QAAQ,CAAC,cAAc,EAAE,kBAAkB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
|
package/dist/types/traces.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
/**
|
|
3
|
-
* Trace observability types
|
|
5
|
+
* Trace observability types.
|
|
4
6
|
*
|
|
5
|
-
* Wire shapes
|
|
6
|
-
*
|
|
7
|
-
* canonical-with-runtime surface here as plain interfaces avoids forcing
|
|
8
|
-
* SDK consumers to depend on the runtime contract package.
|
|
7
|
+
* Wire shapes of the runtime API's trace responses, kept as plain interfaces
|
|
8
|
+
* with no dependencies.
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
//# sourceMappingURL=traces.js.map
|
package/dist/types/traces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC;;;;;GAKG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ContractTreatmentPatchPayload, ContractTreatmentRailsPatchPayload, ContractDeletedAckPayload, ContractProfileCreatePayload, ContractProfileWritePayload, ContractProfilePayload, ContractTenantMetadataPayload, ContractTenantMetadataWritePayload, ContractTreatmentPayload, ContractTreatmentRailsPayload, ContractTreatmentWritePayload, ContractVocabularyCreatePayload, ContractVocabularyEntryPayload, ContractVocabularyWritePayload } from '../generated';
|
|
2
|
+
/**
|
|
3
|
+
* The baseline conversation treatment as the READ answers it: the mergeable fields, plus
|
|
4
|
+
* `vocabulary` composed from `/contract/treatment/vocabulary`. `vocabulary` is ABSENT when
|
|
5
|
+
* that collection is empty — never present-and-empty, and never a stale copy from an older
|
|
6
|
+
* publish.
|
|
7
|
+
*/
|
|
8
|
+
export type ContractTreatment = ContractTreatmentPayload;
|
|
9
|
+
/**
|
|
10
|
+
* The PATCH bodies. Deliberately NOT the write types: RFC 7396 reads `null` as a REMOVAL,
|
|
11
|
+
* and it is the only way to clear a field. Typing both verbs with the write body made
|
|
12
|
+
* `patch({persona: null})` a compile error on a route that answers 200 with the key gone.
|
|
13
|
+
*
|
|
14
|
+
* A NESTED removal (`{style: {tone: null}}`) is expressible too: every nested value
|
|
15
|
+
* names a `*Patch` sibling whose properties admit `null`, so clearing one key inside `style` and
|
|
16
|
+
* leaving its siblings standing compiles and answers 200.
|
|
17
|
+
*
|
|
18
|
+
* TWO PLACES IT DOES NOT, and both are the schema telling the truth rather than a gap.
|
|
19
|
+
* `hard_refusals` requires both its keys on the MERGED value, so clearing either would leave a
|
|
20
|
+
* document the server refuses in every stored state — clear `hard_refusals` whole instead. And
|
|
21
|
+
* `drift_detection.max_turns_without_domain_action` carries a server-side default, so a `null` there is
|
|
22
|
+
* accepted and RE-DEFAULTED rather than removed; only `{drift_detection: null}` clears it.
|
|
23
|
+
*/
|
|
24
|
+
export type ContractTreatmentPatch = ContractTreatmentPatchPayload;
|
|
25
|
+
export type ContractTreatmentRailsPatch = ContractTreatmentRailsPatchPayload;
|
|
26
|
+
/**
|
|
27
|
+
* The PUT/PATCH body. Deliberately NOT `ContractTreatment`: `vocabulary`, `profiles` and
|
|
28
|
+
* `rails` are refused here, each by name, each pointing at the route that owns it.
|
|
29
|
+
*/
|
|
30
|
+
export type ContractTreatmentWrite = ContractTreatmentWritePayload;
|
|
31
|
+
/** The non-overridable half of the treatment, applied AFTER any profile merge. */
|
|
32
|
+
export type ContractTreatmentRails = ContractTreatmentRailsPayload;
|
|
33
|
+
/** One vocabulary entry, as every `/contract/treatment/vocabulary*` route answers it. */
|
|
34
|
+
export type ContractVocabularyEntry = ContractVocabularyEntryPayload;
|
|
35
|
+
/** The POST body — both fields required. */
|
|
36
|
+
export type ContractVocabularyCreate = ContractVocabularyCreatePayload;
|
|
37
|
+
/**
|
|
38
|
+
* The PUT/PATCH body for an existing entry. `means` is required by PUT (a total write states
|
|
39
|
+
* its value) and optional in a PATCH; `term` is accepted so a read round-trips, and is
|
|
40
|
+
* immutable.
|
|
41
|
+
*/
|
|
42
|
+
export type ContractVocabularyWrite = ContractVocabularyWritePayload;
|
|
43
|
+
/** One treatment profile — a named partial override, stored as one blob. */
|
|
44
|
+
export type ContractProfile = ContractProfilePayload;
|
|
45
|
+
/**
|
|
46
|
+
* The PUT/PATCH body for a profile — the flat treatment.
|
|
47
|
+
*
|
|
48
|
+
* DISTINCT FROM `ContractTreatmentWrite`, and the difference is `vocabulary`: the baseline
|
|
49
|
+
* write refuses it (the tenant's list is its own collection, `/contract/treatment/vocabulary`),
|
|
50
|
+
* while a profile's list is an OVERRIDE that is appended to the baseline's and has no collection
|
|
51
|
+
* of its own.
|
|
52
|
+
*/
|
|
53
|
+
export type ContractProfileWrite = ContractProfileWritePayload;
|
|
54
|
+
/**
|
|
55
|
+
* The POST body — `ContractProfileWrite` plus `name`.
|
|
56
|
+
*
|
|
57
|
+
* NO `channels`: a profile's channel membership is not written by any route of the contract
|
|
58
|
+
* API.
|
|
59
|
+
*/
|
|
60
|
+
export type ContractProfileCreate = ContractProfileCreatePayload;
|
|
61
|
+
/**
|
|
62
|
+
* The tenant metadata composite. `label` is RESOLVED from the contract's semantic labels
|
|
63
|
+
* against the request locale — it is not writable here.
|
|
64
|
+
*/
|
|
65
|
+
export type ContractTenantMetadata = ContractTenantMetadataPayload;
|
|
66
|
+
/** The PUT/PATCH body for the metadata composite. `label` is refused. */
|
|
67
|
+
export type ContractTenantMetadataWrite = ContractTenantMetadataWritePayload;
|
|
68
|
+
/** What both collection DELETEs answer. Not `void`. */
|
|
69
|
+
export type ContractDeletedAck = ContractDeletedAckPayload;
|
|
70
|
+
//# sourceMappingURL=treatment-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treatment-contract.d.ts","sourceRoot":"","sources":["../../src/types/treatment-contract.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACR,6BAA6B,EAC7B,kCAAkC,EAClC,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,sBAAsB,EACtB,6BAA6B,EAC7B,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EACjC,MAAM,cAAc,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AACnE,MAAM,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,yFAAyF;AACzF,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE,4CAA4C;AAC5C,MAAM,MAAM,wBAAwB,GAAG,+BAA+B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,yEAAyE;AACzE,MAAM,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAE7E,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
4
|
+
// Types for the `contract.treatment` family — the baseline treatment document, its
|
|
5
|
+
// `rails`, and the two normalized child collections (`vocabulary`, `profiles`).
|
|
6
|
+
//
|
|
7
|
+
// EVERY SHAPE HERE IS DERIVED from the contract API's OpenAPI document (through
|
|
8
|
+
// `generated/contract.ts`), so there is one description of the `/contract/treatment*` and
|
|
9
|
+
// `/contract/metadata` wire. The treatment document is closed: the route refuses keys it
|
|
10
|
+
// does not declare.
|
|
11
|
+
//
|
|
12
|
+
// THE READ AND THE WRITE ARE DIFFERENT SHAPES, and one type cannot be both.
|
|
13
|
+
// `ContractTreatment` (read) carries `vocabulary`, composed from the collection that owns it;
|
|
14
|
+
// `ContractTreatmentWrite` (write) refuses it, along with `profiles` and `rails`. A GET body is
|
|
15
|
+
// therefore not a legal PUT body, and the refusal names the route to use.
|
|
16
|
+
//
|
|
17
|
+
// The vocabulary collection (`/contract/treatment/vocabulary`) is the single source of the
|
|
18
|
+
// tenant's term list. Both collection DELETEs answer `{success, data: {message}}`.
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
//# sourceMappingURL=treatment-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treatment-contract.js","sourceRoot":"","sources":["../../src/types/treatment-contract.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,mFAAmF;AACnF,gFAAgF;AAChF,EAAE;AACF,gFAAgF;AAChF,0FAA0F;AAC1F,yFAAyF;AACzF,oBAAoB;AACpB,EAAE;AACF,4EAA4E;AAC5E,8FAA8F;AAC9F,gGAAgG;AAChG,0EAA0E;AAC1E,EAAE;AACF,2FAA2F;AAC3F,mFAAmF"}
|
|
@@ -13,6 +13,20 @@ export interface WorkflowStateMachineConfig {
|
|
|
13
13
|
initial: string;
|
|
14
14
|
transitions: WorkflowTransitionConfig[];
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* NARROWER THAN THE WIRE, DELIBERATELY.
|
|
18
|
+
*
|
|
19
|
+
* `StateMachineReplayBody.new_config` is published OPEN — its keys are a state-machine
|
|
20
|
+
* configuration the MCP `replay_workflow` tool validates, not a shape the document knows — so the
|
|
21
|
+
* API accepts configurations this type refuses. Not derived from the document for that reason:
|
|
22
|
+
* deriving would replace a helpful shape with `Record<string, unknown>` and hand every caller the
|
|
23
|
+
* job the tool already does. Other request types are derived because their wire shape IS the
|
|
24
|
+
* useful shape; here it is not.
|
|
25
|
+
*
|
|
26
|
+
* What that costs: if the tool's accepted configuration changes, this type does not follow
|
|
27
|
+
* automatically. That is stated here rather than left for a reader to discover from a refused
|
|
28
|
+
* request.
|
|
29
|
+
*/
|
|
16
30
|
export interface WorkflowReplayRequest {
|
|
17
31
|
instance_id: string;
|
|
18
32
|
new_config: WorkflowStateMachineConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,wBAAwB,EAAE,CAAC;CAC3C;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,0BAA0B,CAAC;CAC1C;AAED,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,yBAAyB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,CAAC;IAChB,cAAc,EAAE,CAAC,CAAC;IAClB,MAAM,EAAE,EAAE,CAAC;CACd;AAED,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG,yBAAyB,CAAC"}
|
package/dist/types/workflows.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright 2026 Nicolas Moreno
|
|
2
4
|
// ── Workflows (service-endpoint only) ────────────────────────────────────
|
|
3
5
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// -
|
|
8
|
-
// -
|
|
9
|
-
// - flow instance/step types → ./flows.ts
|
|
6
|
+
// Request/response shapes of the state-machine replay operation
|
|
7
|
+
// (`POST /runtime/state-machine/replay`). Related types live elsewhere:
|
|
8
|
+
// - state-machine event types → ./state-machine.ts
|
|
9
|
+
// - transition-request types → ./state-machine.ts
|
|
10
|
+
// - flow instance types → ./flows.ts
|
|
10
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
12
|
//# sourceMappingURL=workflows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,EAAE;AACF,wEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,4EAA4E;AAC5E,EAAE;AACF,gEAAgE;AAChE,wEAAwE;AACxE,sDAAsD;AACtD,sDAAsD;AACtD,8CAA8C"}
|
package/package.json
CHANGED
|
@@ -1,103 +1,100 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/Zarel-AI/platform.git",
|
|
11
|
-
"directory": "sdk/packages/sdk"
|
|
12
|
-
},
|
|
13
|
-
"main": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js",
|
|
19
|
-
"require": "./dist/index.js"
|
|
2
|
+
"name": "@zarel-ai/sdk",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "TypeScript SDK for the Zarel API",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Nicolas Moreno",
|
|
8
|
+
"url": "https://zarel.ai"
|
|
20
9
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
"homepage": "https://zarel.ai",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Zarel-AI/zarel-sdk-typescript.git",
|
|
14
|
+
"directory": "packages/sdk"
|
|
25
15
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"require": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./dist/client.d.ts",
|
|
26
|
+
"import": "./dist/client.js",
|
|
27
|
+
"require": "./dist/client.js"
|
|
28
|
+
},
|
|
29
|
+
"./errors": {
|
|
30
|
+
"types": "./dist/errors.d.ts",
|
|
31
|
+
"import": "./dist/errors.js",
|
|
32
|
+
"require": "./dist/errors.js"
|
|
33
|
+
},
|
|
34
|
+
"./types": {
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"import": "./dist/types/index.js",
|
|
37
|
+
"require": "./dist/types/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./resources": {
|
|
40
|
+
"types": "./dist/resources/index.d.ts",
|
|
41
|
+
"import": "./dist/resources/index.js",
|
|
42
|
+
"require": "./dist/resources/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./resources/*": {
|
|
45
|
+
"types": "./dist/resources/*.d.ts",
|
|
46
|
+
"import": "./dist/resources/*.js",
|
|
47
|
+
"require": "./dist/resources/*.js"
|
|
48
|
+
}
|
|
30
49
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
50
|
+
"typesVersions": {
|
|
51
|
+
"*": {
|
|
52
|
+
"client": [
|
|
53
|
+
"dist/client.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"errors": [
|
|
56
|
+
"dist/errors.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"types": [
|
|
59
|
+
"dist/types/index.d.ts"
|
|
60
|
+
],
|
|
61
|
+
"resources": [
|
|
62
|
+
"dist/resources/index.d.ts"
|
|
63
|
+
],
|
|
64
|
+
"resources/*": [
|
|
65
|
+
"dist/resources/*.d.ts"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
35
68
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
69
|
+
"files": [
|
|
70
|
+
"dist",
|
|
71
|
+
"README.md",
|
|
72
|
+
"LICENSE"
|
|
73
|
+
],
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=18.0.0"
|
|
40
76
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"files": [
|
|
67
|
-
"dist",
|
|
68
|
-
"README.md",
|
|
69
|
-
"LICENSE"
|
|
70
|
-
],
|
|
71
|
-
"engines": {
|
|
72
|
-
"node": ">=18.0.0"
|
|
73
|
-
},
|
|
74
|
-
"sideEffects": false,
|
|
75
|
-
"publishConfig": {
|
|
76
|
-
"access": "public"
|
|
77
|
-
},
|
|
78
|
-
"scripts": {
|
|
79
|
-
"prepack": "npm run build",
|
|
80
|
-
"build": "tsc",
|
|
81
|
-
"test": "jest",
|
|
82
|
-
"lint": "eslint src/ tests/",
|
|
83
|
-
"gen:sdk-types": "openapi-typescript ../../../docs/api/runtime-openapi-v1.yaml -o src/generated/runtime.ts && openapi-typescript ../../../docs/api/contract-openapi-v1.yaml -o src/generated/contract.ts",
|
|
84
|
-
"gen:sdk-unwrap-map": "tsx ../../../scripts/toolchain/gen-sdk-unwrap-map.ts src/generated/unwrap-map.ts",
|
|
85
|
-
"gen:sdk": "npm run gen:sdk-types && npm run gen:sdk-unwrap-map"
|
|
86
|
-
},
|
|
87
|
-
"devDependencies": {
|
|
88
|
-
"@types/jest": "^29.5.12",
|
|
89
|
-
"@types/node": "^20.11.0",
|
|
90
|
-
"jest": "^29.7.0",
|
|
91
|
-
"openapi-typescript": "7.13.0",
|
|
92
|
-
"ts-jest": "^29.1.2",
|
|
93
|
-
"tsx": "^4.7.0",
|
|
94
|
-
"typescript": "^5.3.3",
|
|
95
|
-
"yaml": "2.8.2"
|
|
96
|
-
},
|
|
97
|
-
"keywords": [
|
|
98
|
-
"zarel",
|
|
99
|
-
"zarel-ai",
|
|
100
|
-
"sdk",
|
|
101
|
-
"api-client"
|
|
102
|
-
]
|
|
77
|
+
"sideEffects": false,
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"prepack": "npm run build",
|
|
83
|
+
"build": "rm -rf dist && tsc",
|
|
84
|
+
"test": "jest"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@jest/globals": "^29.7.0",
|
|
88
|
+
"@types/jest": "^29.5.12",
|
|
89
|
+
"@types/node": "^20.11.0",
|
|
90
|
+
"jest": "^29.7.0",
|
|
91
|
+
"ts-jest": "^29.1.2",
|
|
92
|
+
"typescript": "^5.3.3"
|
|
93
|
+
},
|
|
94
|
+
"keywords": [
|
|
95
|
+
"zarel",
|
|
96
|
+
"zarel-ai",
|
|
97
|
+
"sdk",
|
|
98
|
+
"api-client"
|
|
99
|
+
]
|
|
103
100
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../src/contract/governance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,iBAAiB;gBACzC,MAAM,EAAE,WAAW;CAOlC"}
|