@datatechsolutions/ui 3.7.4 → 3.8.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.
Files changed (159) hide show
  1. package/dist/astrlabe/contracts.d.mts +517 -0
  2. package/dist/astrlabe/contracts.d.ts +517 -0
  3. package/dist/astrlabe/graph-node.d.mts +28 -0
  4. package/dist/astrlabe/graph-node.d.ts +28 -0
  5. package/dist/astrlabe/index.d.mts +743 -0
  6. package/dist/astrlabe/index.d.ts +743 -0
  7. package/dist/astrlabe/index.js +108 -108
  8. package/dist/astrlabe/index.mjs +4 -4
  9. package/dist/astrlabe/utils.d.mts +60 -0
  10. package/dist/astrlabe/utils.d.ts +60 -0
  11. package/dist/astrlabe/workflow-canvas.d.mts +6 -0
  12. package/dist/astrlabe/workflow-canvas.d.ts +6 -0
  13. package/dist/astrlabe/workflow-canvas.js +4 -4
  14. package/dist/astrlabe/workflow-canvas.mjs +3 -3
  15. package/dist/astrlabe/workflow-preview-canvas.d.mts +10 -0
  16. package/dist/astrlabe/workflow-preview-canvas.d.ts +10 -0
  17. package/dist/billing-panel-DsHhhJqG.d.mts +18 -0
  18. package/dist/billing-panel-DsHhhJqG.d.ts +18 -0
  19. package/dist/brand/index.d.mts +71 -0
  20. package/dist/brand/index.d.ts +71 -0
  21. package/dist/{chunk-GAN7AKZ2.mjs → chunk-32DHEVOH.mjs} +3 -3
  22. package/dist/{chunk-GAN7AKZ2.mjs.map → chunk-32DHEVOH.mjs.map} +1 -1
  23. package/dist/{chunk-IYDGO7RW.js → chunk-3H5CFLVK.js} +135 -135
  24. package/dist/{chunk-IYDGO7RW.js.map → chunk-3H5CFLVK.js.map} +1 -1
  25. package/dist/{chunk-QL2JYRBN.js → chunk-3X3IYDG6.js} +68 -68
  26. package/dist/{chunk-QL2JYRBN.js.map → chunk-3X3IYDG6.js.map} +1 -1
  27. package/dist/{chunk-N5365CGD.mjs → chunk-57E4TCB2.mjs} +3 -3
  28. package/dist/{chunk-N5365CGD.mjs.map → chunk-57E4TCB2.mjs.map} +1 -1
  29. package/dist/{chunk-4HP7XS5I.mjs → chunk-5W6LMDXV.mjs} +4 -4
  30. package/dist/{chunk-4HP7XS5I.mjs.map → chunk-5W6LMDXV.mjs.map} +1 -1
  31. package/dist/{chunk-EIZM2EQA.mjs → chunk-5YVOLHSW.mjs} +4 -4
  32. package/dist/{chunk-EIZM2EQA.mjs.map → chunk-5YVOLHSW.mjs.map} +1 -1
  33. package/dist/{chunk-ZWLMKOHZ.mjs → chunk-74BU2EBZ.mjs} +6 -6
  34. package/dist/{chunk-ZWLMKOHZ.mjs.map → chunk-74BU2EBZ.mjs.map} +1 -1
  35. package/dist/{chunk-7WIWDSF6.js → chunk-7JZFNKJD.js} +36 -36
  36. package/dist/{chunk-7WIWDSF6.js.map → chunk-7JZFNKJD.js.map} +1 -1
  37. package/dist/{chunk-DCBRGVD3.mjs → chunk-A4A3SQTV.mjs} +3 -3
  38. package/dist/{chunk-DCBRGVD3.mjs.map → chunk-A4A3SQTV.mjs.map} +1 -1
  39. package/dist/{chunk-JUDQX6MP.mjs → chunk-CZZOCKEA.mjs} +3 -3
  40. package/dist/{chunk-JUDQX6MP.mjs.map → chunk-CZZOCKEA.mjs.map} +1 -1
  41. package/dist/{chunk-DWIBK7GV.js → chunk-E57RZXOR.js} +25 -25
  42. package/dist/{chunk-DWIBK7GV.js.map → chunk-E57RZXOR.js.map} +1 -1
  43. package/dist/{chunk-Z3BMHKKH.mjs → chunk-E6C7MFHJ.mjs} +3 -3
  44. package/dist/{chunk-Z3BMHKKH.mjs.map → chunk-E6C7MFHJ.mjs.map} +1 -1
  45. package/dist/{chunk-P7GVXI7Y.mjs → chunk-EWYAM4WJ.mjs} +3 -3
  46. package/dist/{chunk-P7GVXI7Y.mjs.map → chunk-EWYAM4WJ.mjs.map} +1 -1
  47. package/dist/{chunk-VDO6MDQW.js → chunk-F35GFICG.js} +13 -13
  48. package/dist/{chunk-VDO6MDQW.js.map → chunk-F35GFICG.js.map} +1 -1
  49. package/dist/{chunk-BEUPW5WS.js → chunk-FKUIVS6I.js} +28 -28
  50. package/dist/{chunk-BEUPW5WS.js.map → chunk-FKUIVS6I.js.map} +1 -1
  51. package/dist/{chunk-GD6FHRHV.js → chunk-FNA66TT4.js} +3 -3
  52. package/dist/{chunk-GD6FHRHV.js.map → chunk-FNA66TT4.js.map} +1 -1
  53. package/dist/{chunk-RBB5YGWH.js → chunk-H37VDL7Y.js} +4 -4
  54. package/dist/{chunk-RBB5YGWH.js.map → chunk-H37VDL7Y.js.map} +1 -1
  55. package/dist/{chunk-KI4UPW4Z.js → chunk-HBOORO52.js} +4 -4
  56. package/dist/{chunk-KI4UPW4Z.js.map → chunk-HBOORO52.js.map} +1 -1
  57. package/dist/{chunk-MGZTZELL.mjs → chunk-KKXI7CPF.mjs} +3 -3
  58. package/dist/{chunk-MGZTZELL.mjs.map → chunk-KKXI7CPF.mjs.map} +1 -1
  59. package/dist/{chunk-IKH5IRDK.mjs → chunk-PCUINUIC.mjs} +3 -3
  60. package/dist/{chunk-IKH5IRDK.mjs.map → chunk-PCUINUIC.mjs.map} +1 -1
  61. package/dist/{chunk-CTCO2YI5.mjs → chunk-PYNXIDG3.mjs} +3 -3
  62. package/dist/{chunk-CTCO2YI5.mjs.map → chunk-PYNXIDG3.mjs.map} +1 -1
  63. package/dist/{chunk-MFAVWJWE.js → chunk-Q4QORAMH.js} +10 -10
  64. package/dist/{chunk-MFAVWJWE.js.map → chunk-Q4QORAMH.js.map} +1 -1
  65. package/dist/{chunk-ZF7RJNPD.js → chunk-Q7HRCCFT.js} +45 -45
  66. package/dist/{chunk-ZF7RJNPD.js.map → chunk-Q7HRCCFT.js.map} +1 -1
  67. package/dist/{chunk-R2RPRRB4.js → chunk-RCHTRG7R.js} +55 -55
  68. package/dist/{chunk-R2RPRRB4.js.map → chunk-RCHTRG7R.js.map} +1 -1
  69. package/dist/{chunk-FIB2CFJK.js → chunk-TCP45Q4B.js} +9 -9
  70. package/dist/{chunk-FIB2CFJK.js.map → chunk-TCP45Q4B.js.map} +1 -1
  71. package/dist/{chunk-SUU7XPRX.js → chunk-TJPPZU77.js} +34 -34
  72. package/dist/{chunk-SUU7XPRX.js.map → chunk-TJPPZU77.js.map} +1 -1
  73. package/dist/{chunk-XT76DMP5.js → chunk-VPFVW7ZF.js} +35 -35
  74. package/dist/{chunk-XT76DMP5.js.map → chunk-VPFVW7ZF.js.map} +1 -1
  75. package/dist/{chunk-IKHWYYZC.mjs → chunk-VS6PTRQ7.mjs} +3 -3
  76. package/dist/{chunk-IKHWYYZC.mjs.map → chunk-VS6PTRQ7.mjs.map} +1 -1
  77. package/dist/{chunk-YNHQ36UU.mjs → chunk-WDBVIU7W.mjs} +3 -3
  78. package/dist/{chunk-YNHQ36UU.mjs.map → chunk-WDBVIU7W.mjs.map} +1 -1
  79. package/dist/{chunk-MRLEINJN.mjs → chunk-ZP37M2QK.mjs} +7 -7
  80. package/dist/{chunk-MRLEINJN.mjs.map → chunk-ZP37M2QK.mjs.map} +1 -1
  81. package/dist/dynamic-island-confirm-BKsZkAEP.d.mts +17 -0
  82. package/dist/dynamic-island-confirm-BKsZkAEP.d.ts +17 -0
  83. package/dist/index-BNRGVAS5.d.mts +222 -0
  84. package/dist/index-BoebbJ44.d.mts +49 -0
  85. package/dist/index-BoebbJ44.d.ts +49 -0
  86. package/dist/index-CnCY-b5V.d.ts +222 -0
  87. package/dist/index.d.mts +5316 -0
  88. package/dist/index.d.ts +5316 -0
  89. package/dist/index.js +665 -665
  90. package/dist/index.mjs +2 -2
  91. package/dist/layout-engine-YZcVr20M.d.mts +19 -0
  92. package/dist/layout-engine-YZcVr20M.d.ts +19 -0
  93. package/dist/lib/i18n-context.d.mts +36 -0
  94. package/dist/lib/i18n-context.d.ts +36 -0
  95. package/dist/lib/router-context.d.mts +35 -0
  96. package/dist/lib/router-context.d.ts +35 -0
  97. package/dist/navigation-BiWVffAN.d.mts +49 -0
  98. package/dist/navigation-BiWVffAN.d.ts +49 -0
  99. package/dist/platform/admin/index.d.mts +17 -0
  100. package/dist/platform/admin/index.d.ts +17 -0
  101. package/dist/platform/admin/index.js +10 -10
  102. package/dist/platform/admin/index.mjs +4 -4
  103. package/dist/platform/agents-workspace.d.mts +19 -0
  104. package/dist/platform/agents-workspace.d.ts +19 -0
  105. package/dist/platform/agents-workspace.js +7 -7
  106. package/dist/platform/agents-workspace.mjs +6 -6
  107. package/dist/platform/app-shell.d.mts +64 -0
  108. package/dist/platform/app-shell.d.ts +64 -0
  109. package/dist/platform/app-shell.js +4 -4
  110. package/dist/platform/app-shell.mjs +3 -3
  111. package/dist/platform/auth/index.d.mts +73 -0
  112. package/dist/platform/auth/index.d.ts +73 -0
  113. package/dist/platform/auth/index.js +22 -22
  114. package/dist/platform/auth/index.mjs +4 -4
  115. package/dist/platform/billing/index.d.mts +29 -0
  116. package/dist/platform/billing/index.d.ts +29 -0
  117. package/dist/platform/billing/index.js +4 -4
  118. package/dist/platform/billing/index.mjs +3 -3
  119. package/dist/platform/impersonation/index.d.mts +19 -0
  120. package/dist/platform/impersonation/index.d.ts +19 -0
  121. package/dist/platform/impersonation/index.js +4 -4
  122. package/dist/platform/impersonation/index.mjs +3 -3
  123. package/dist/platform/index.d.mts +188 -0
  124. package/dist/platform/index.d.ts +188 -0
  125. package/dist/platform/index.js +86 -86
  126. package/dist/platform/index.mjs +18 -18
  127. package/dist/platform/pages/index.d.mts +574 -0
  128. package/dist/platform/pages/index.d.ts +574 -0
  129. package/dist/platform/pages/index.js +461 -264
  130. package/dist/platform/pages/index.js.map +1 -1
  131. package/dist/platform/pages/index.mjs +228 -31
  132. package/dist/platform/pages/index.mjs.map +1 -1
  133. package/dist/platform/rbac.d.mts +42 -0
  134. package/dist/platform/rbac.d.ts +42 -0
  135. package/dist/platform/settings/index.d.mts +31 -0
  136. package/dist/platform/settings/index.d.ts +31 -0
  137. package/dist/platform/settings/index.js +7 -7
  138. package/dist/platform/settings/index.mjs +6 -6
  139. package/dist/platform/telemetry/index.d.mts +51 -0
  140. package/dist/platform/telemetry/index.d.ts +51 -0
  141. package/dist/platform/utils/index.d.mts +32 -0
  142. package/dist/platform/utils/index.d.ts +32 -0
  143. package/dist/platform/windsock-admin-client.d.mts +57 -0
  144. package/dist/platform/windsock-admin-client.d.ts +57 -0
  145. package/dist/platform/workflow-api-client.d.mts +6 -0
  146. package/dist/platform/workflow-api-client.d.ts +6 -0
  147. package/dist/platform/workflow-canvas-shell.d.mts +18 -0
  148. package/dist/platform/workflow-canvas-shell.d.ts +18 -0
  149. package/dist/platform/workflow-canvas-shell.js +5 -5
  150. package/dist/platform/workflow-canvas-shell.mjs +4 -4
  151. package/dist/rule-form-BYJzyork.d.mts +128 -0
  152. package/dist/rule-form-BYJzyork.d.ts +128 -0
  153. package/dist/workflow-api-client-CpFl3WcG.d.mts +468 -0
  154. package/dist/workflow-api-client-uLICOanv.d.ts +468 -0
  155. package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
  156. package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
  157. package/dist/workflow-store-o17I6L6A.d.ts +79 -0
  158. package/dist/workflow-store-ppVHdMZi.d.mts +79 -0
  159. package/package.json +1 -1
@@ -0,0 +1,517 @@
1
+ /**
2
+ * Core Contracts
3
+ * ==============
4
+ * Self-contained workflow contracts for embeddable usage.
5
+ * No dependency on shared-domain.
6
+ */
7
+ type WorkflowNodeType = 'agent' | 'tool' | 'agent_tool' | 'rule' | 'start' | 'end' | 'if_else' | 'code' | 'http_request' | 's3_write' | 'template_transform' | 'iteration' | 'knowledge_base' | 'answer' | 'question_classifier' | 'parameter_extractor' | 'variable_assigner' | 'variable_aggregator' | 'document_extractor' | 'list_operator' | 'iteration_start' | 'note' | 'entity' | 'datasource' | 'model_provider' | 'dashboard_output' | 'group' | 'audio_input' | 'speech_transcriber';
8
+ type StartNodeConfig = {
9
+ type: 'start';
10
+ inputVariables: string[];
11
+ };
12
+ type EndNodeConfig = {
13
+ type: 'end';
14
+ outputVariables: string[];
15
+ };
16
+ type IfElseNodeConfig = {
17
+ type: 'if_else';
18
+ conditions: Array<{
19
+ variable: string;
20
+ operator: string;
21
+ value: string;
22
+ }>;
23
+ logicalOperator: 'and' | 'or';
24
+ };
25
+ type CodeOperation = 'passthrough' | 'return' | 'merge' | 'pick' | 'parse_json' | 'regex_extract' | 'xml_titles';
26
+ type CodeNodeConfig = {
27
+ type: 'code';
28
+ language: 'javascript' | 'python' | 'typescript';
29
+ code: string;
30
+ } | {
31
+ type: 'code';
32
+ operation: CodeOperation;
33
+ /** Dotted ref into the variable pool (`nodeId.path`) for ops that
34
+ * read a specific upstream value. Leave empty for `passthrough`
35
+ * which reads the sole incoming edge automatically. */
36
+ from?: string;
37
+ /** `return` — the literal JSON value to emit. */
38
+ value?: unknown;
39
+ /** `pick` — whitelist of keys to project off `incoming`. */
40
+ fields?: string[];
41
+ /** `regex_extract` — regex pattern and flags (`i m s x U R`;
42
+ * `g` is implicit). `group` defaults to 1 (first capture group). */
43
+ pattern?: string;
44
+ flags?: string;
45
+ group?: number;
46
+ /** `regex_extract` / `xml_titles` — key name to expose matches
47
+ * under in the node's output object (default: `matches` / `titles`). */
48
+ output?: string;
49
+ /** `xml_titles` — by default drops the channel/feed title; set
50
+ * `true` to keep it in the result array. */
51
+ keepChannel?: boolean;
52
+ };
53
+ type HttpRequestNodeConfig = {
54
+ type: 'http_request';
55
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
56
+ url: string;
57
+ headers: Record<string, string>;
58
+ body: string;
59
+ timeoutMs: number;
60
+ /** How to decode the response body before storing it under `output.body`.
61
+ * `json` (default) tries `serde_json::from_slice` and falls back to text.
62
+ * `text` always stores the body as a raw string — use for RSS/HTML/XML. */
63
+ parseResponse?: 'json' | 'text';
64
+ };
65
+ type S3WriteNodeConfig = {
66
+ type: 's3_write';
67
+ bucket?: string;
68
+ key: string;
69
+ sourceUrl?: string;
70
+ body?: string;
71
+ contentType?: string;
72
+ timeoutMs?: number;
73
+ connectionId?: string;
74
+ allowMissingTemplateFields?: boolean;
75
+ };
76
+ type TemplateTransformNodeConfig = {
77
+ type: 'template_transform';
78
+ template: string;
79
+ outputVariable: string;
80
+ };
81
+ type IterationNodeConfig = {
82
+ type: 'iteration';
83
+ iteratorVariable: string;
84
+ maxIterations: number;
85
+ };
86
+ type KnowledgeBaseNodeConfig = {
87
+ type: 'knowledge_base';
88
+ sourceId: string;
89
+ topK: number;
90
+ similarityThreshold: number;
91
+ };
92
+ type AnswerNodeConfig = {
93
+ type: 'answer';
94
+ outputTemplate: string;
95
+ outputVariables: string[];
96
+ };
97
+ type QuestionClassifierNodeConfig = {
98
+ type: 'question_classifier';
99
+ modelId: string;
100
+ instructions: string;
101
+ categories: Array<{
102
+ id: string;
103
+ name: string;
104
+ description: string;
105
+ }>;
106
+ };
107
+ type ParameterExtractorNodeConfig = {
108
+ type: 'parameter_extractor';
109
+ modelId: string;
110
+ parameters: Array<{
111
+ name: string;
112
+ type: 'string' | 'number' | 'boolean' | 'array';
113
+ description: string;
114
+ required: boolean;
115
+ }>;
116
+ };
117
+ type VariableAssignerNodeConfig = {
118
+ type: 'variable_assigner';
119
+ assignments: Array<{
120
+ target: string;
121
+ source: string;
122
+ }>;
123
+ };
124
+ type VariableAggregatorNodeConfig = {
125
+ type: 'variable_aggregator';
126
+ inputVariables: string[];
127
+ outputVariable: string;
128
+ aggregationMode: 'array' | 'object' | 'concatenate';
129
+ };
130
+ type DocumentExtractorNodeConfig = {
131
+ type: 'document_extractor';
132
+ extractionMode: 'text' | 'table' | 'structured';
133
+ outputVariable: string;
134
+ };
135
+ type ListOperatorNodeConfig = {
136
+ type: 'list_operator';
137
+ operation: 'filter' | 'map' | 'sort' | 'limit' | 'deduplicate' | 'flatten';
138
+ inputVariable: string;
139
+ outputVariable: string;
140
+ condition?: string;
141
+ sortKey?: string;
142
+ sortOrder?: 'asc' | 'desc';
143
+ limitCount?: number;
144
+ };
145
+ type IterationStartNodeConfig = {
146
+ type: 'iteration_start';
147
+ iteratorVariable: string;
148
+ itemVariable: string;
149
+ indexVariable: string;
150
+ };
151
+ type NoteNodeConfig = {
152
+ type: 'note';
153
+ text: string;
154
+ color: 'yellow' | 'blue' | 'green' | 'pink' | 'purple';
155
+ width: number;
156
+ height: number;
157
+ };
158
+ type GroupNodeConfig = {
159
+ type: 'group';
160
+ label: string;
161
+ description?: string;
162
+ color: 'indigo' | 'teal' | 'amber' | 'rose' | 'slate';
163
+ isExpanded: boolean;
164
+ width: number;
165
+ height: number;
166
+ collapsedWidth: number;
167
+ collapsedHeight: number;
168
+ };
169
+ type EntityNodeConfig = {
170
+ type: 'entity';
171
+ entityMasterId: string;
172
+ selectedFields: string[];
173
+ filterVariables: Record<string, string>;
174
+ outputVariable: string;
175
+ limit: number;
176
+ };
177
+ type DatasourceFilterOp = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'like' | 'in';
178
+ type DatasourceFilter = {
179
+ /** Column identifier — must match `[a-zA-Z0-9_]+` (validator enforces). */
180
+ column: string;
181
+ /** Comparison operator; defaults to `eq` when omitted. */
182
+ op?: DatasourceFilterOp;
183
+ /** Scalar (string / number / bool) or array (required when op = `in`).
184
+ * Strings may reference pool variables via `{{ nodeId.path }}` /
185
+ * `{{ inputs.field }}` — the engine renders them before binding. */
186
+ value?: string | number | boolean | Array<string | number | boolean> | null;
187
+ };
188
+ type DatasourceNodeConfig = {
189
+ type: 'datasource';
190
+ datasourceId: string;
191
+ dialect: string;
192
+ table: string;
193
+ selectedColumns: string[];
194
+ /** Preferred shape: full filter array with per-row operator. */
195
+ filters?: DatasourceFilter[];
196
+ /** Legacy: variable-name → column-name map (implicit `eq`). Kept so
197
+ * older graphs still load; new UI writes `filters` instead. */
198
+ filterVariables?: Record<string, string>;
199
+ outputVariable: string;
200
+ limit: number;
201
+ };
202
+ type RuleNodeConfig = {
203
+ type: 'rule';
204
+ /** Slug / id of the rule row in `astrlabe.agent_rules`. Required for
205
+ * the rule executor to resolve a definition at run-time. */
206
+ ruleId?: string;
207
+ /** Execution priority when several rules feed into the same branch. */
208
+ priority?: number;
209
+ /** Master switch. Disabled rules are skipped at run-time. */
210
+ enabled?: boolean;
211
+ entityId?: string;
212
+ outputVariable?: string;
213
+ priceVariable?: string;
214
+ contextVariables?: Record<string, string>;
215
+ };
216
+ type AgentNodeConfig = {
217
+ type: 'agent';
218
+ /** `astrlabe.agents.id` — identifies which agent config to run. */
219
+ agentId?: string;
220
+ /** Preferred path: references `astrlabe.model_provider_connections.id`. */
221
+ connectionId?: string;
222
+ /** Escape hatch: inline provider + model when no connection row exists. */
223
+ provider?: ModelProviderType;
224
+ model?: string;
225
+ /** Optional override of the agent's stored model id. */
226
+ modelId?: string;
227
+ /** System + user prompts rendered through the template engine
228
+ * (`{{ nodeId.path }}` / `{{ inputs.x }}`). */
229
+ systemPrompt?: string;
230
+ userPrompt?: string;
231
+ maxTokens?: number;
232
+ temperature?: number;
233
+ /**
234
+ * Optional structured-output contract. When set, the engine parses the
235
+ * LLM's text as JSON, validates against the schema, and exposes the
236
+ * typed object under `output.parsed`. Validation failures fail the
237
+ * node with `AGENT_OUTPUT_SCHEMA_VIOLATION` so downstream nodes never
238
+ * see half-formed data. Schema is the JSON-Schema-Draft-7 subset the
239
+ * Rust validator understands today (`type`, `properties`, `required`,
240
+ * `items`, `enum`).
241
+ */
242
+ outputSchema?: AgentOutputSchema;
243
+ };
244
+ type AgentOutputSchema = {
245
+ type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
246
+ properties?: Record<string, AgentOutputSchema>;
247
+ required?: string[];
248
+ items?: AgentOutputSchema;
249
+ enum?: Array<string | number | boolean | null>;
250
+ description?: string;
251
+ };
252
+ type ModelProviderType = 'aws_bedrock' | 'openai_api' | 'google_vertex' | 'azure_openai' | 'anthropic_api' | 'groq' | 'mistral' | 'huggingface' | 'ollama' | 'custom';
253
+ type ModelProviderNodeConfig = {
254
+ type: 'model_provider';
255
+ /** References astrlabe.model_provider_connections.id when persisted */
256
+ connectionId?: string;
257
+ /** References astrlabe.model_providers.slug */
258
+ providerType: ModelProviderType;
259
+ name?: string;
260
+ region?: string;
261
+ endpoint?: string;
262
+ credentialRef?: string;
263
+ apiKeyRef?: string;
264
+ modelFilter?: string[];
265
+ };
266
+ /**
267
+ * DashboardOutput is the terminal node that emits a DashboardSpec so the UI
268
+ * (astrlabe, kori-erp) can render the run result without bespoke code. Either
269
+ * inline `dashboard` (literal spec) or `dashboardFrom` (reference to an
270
+ * upstream node's output) is used.
271
+ */
272
+ type DashboardOutputNodeConfig = {
273
+ type: 'dashboard_output';
274
+ /** Inline DashboardSpec literal. Shape matches @datatechsolutions/ui DashboardSpec. */
275
+ dashboard?: Record<string, unknown>;
276
+ /** Reference to an upstream node's value (`"nodeId"` or `"nodeId.path"`) that already conforms to DashboardSpec. */
277
+ dashboardFrom?: string;
278
+ };
279
+ type AudioInputNodeConfig = {
280
+ type: 'audio_input';
281
+ /** Public HTTPS URL or presigned S3 URL. Templates with `{{ }}`
282
+ * placeholders are rendered against the variable pool at run time. */
283
+ url: string;
284
+ /** Optional container hint (`mp3`, `wav`, `m4a`, …). When omitted the
285
+ * executor derives it from the URL extension. */
286
+ format?: string;
287
+ allowMissingTemplateFields?: boolean;
288
+ };
289
+ type SpeechTranscriberNodeConfig = {
290
+ type: 'speech_transcriber';
291
+ /** Template ref to the audio URL (e.g. `"{{ audio_in.url }}"`). */
292
+ audioUrl: string;
293
+ /** Whisper model id. Defaults to `whisper-1` on the executor side. */
294
+ model?: string;
295
+ /** BCP-47 language hint. Leave blank for auto-detect. */
296
+ language?: string;
297
+ /** Vocabulary / style guidance prompt. Template-rendered. */
298
+ prompt?: string;
299
+ /** `verbose_json` (default) is required for segments[] to be populated. */
300
+ responseFormat?: 'verbose_json' | 'json' | 'text';
301
+ /** Override for tests / private proxies. Defaults to the OpenAI endpoint. */
302
+ endpoint?: string;
303
+ /** Default 120_000ms — Whisper can take a while on long audio. */
304
+ timeoutMs?: number;
305
+ allowMissingTemplateFields?: boolean;
306
+ };
307
+ type LogicNodeConfig = StartNodeConfig | EndNodeConfig | IfElseNodeConfig | CodeNodeConfig | HttpRequestNodeConfig | S3WriteNodeConfig | TemplateTransformNodeConfig | IterationNodeConfig | KnowledgeBaseNodeConfig | AnswerNodeConfig | QuestionClassifierNodeConfig | ParameterExtractorNodeConfig | VariableAssignerNodeConfig | VariableAggregatorNodeConfig | DocumentExtractorNodeConfig | ListOperatorNodeConfig | IterationStartNodeConfig | NoteNodeConfig | GroupNodeConfig | EntityNodeConfig | DatasourceNodeConfig | RuleNodeConfig | AgentNodeConfig | ModelProviderNodeConfig | DashboardOutputNodeConfig | AudioInputNodeConfig | SpeechTranscriberNodeConfig;
308
+ type WorkflowNodeData = {
309
+ entityId: string;
310
+ label: string;
311
+ config?: LogicNodeConfig;
312
+ errorStrategy?: 'fail_graph' | 'fail_branch' | 'continue';
313
+ };
314
+ type WorkflowNode = {
315
+ id: string;
316
+ type: WorkflowNodeType;
317
+ position: {
318
+ x: number;
319
+ y: number;
320
+ };
321
+ data: WorkflowNodeData;
322
+ parentId?: string;
323
+ extent?: 'parent';
324
+ style?: {
325
+ width?: number;
326
+ height?: number;
327
+ };
328
+ };
329
+ type WorkflowEdge = {
330
+ id: string;
331
+ source: string;
332
+ target: string;
333
+ sourceHandle: string | null;
334
+ targetHandle: string | null;
335
+ };
336
+ type WorkflowViewport = {
337
+ x: number;
338
+ y: number;
339
+ zoom: number;
340
+ };
341
+ type WorkflowGraph = {
342
+ nodes: WorkflowNode[];
343
+ edges: WorkflowEdge[];
344
+ viewport?: WorkflowViewport;
345
+ };
346
+ type Workflow = {
347
+ id: string;
348
+ organizationId: string;
349
+ name: string;
350
+ description?: string;
351
+ graph: WorkflowGraph;
352
+ publishedGraph: WorkflowGraph | null;
353
+ version: number;
354
+ isDraft?: boolean;
355
+ createdAt: Date | string;
356
+ updatedAt: Date | string;
357
+ };
358
+ type WorkflowNodeStatus = 'pending' | 'running' | 'success' | 'error' | 'skipped';
359
+ type VariableValue = string | number | boolean | null | VariableValue[] | {
360
+ [key: string]: VariableValue;
361
+ };
362
+ type NodeExecutionResult = {
363
+ nodeId: string;
364
+ nodeType: WorkflowNodeType;
365
+ status: WorkflowNodeStatus;
366
+ inputs?: Record<string, VariableValue>;
367
+ outputs: Record<string, VariableValue>;
368
+ error?: string;
369
+ durationMs: number;
370
+ startedAt: string;
371
+ completedAt: string;
372
+ };
373
+ type WorkflowRunStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
374
+ type WorkflowRun = {
375
+ id: string;
376
+ workflowId: string;
377
+ organizationId: string;
378
+ status: WorkflowRunStatus;
379
+ inputVariables: Record<string, VariableValue>;
380
+ outputVariables: Record<string, VariableValue>;
381
+ nodeResults: NodeExecutionResult[];
382
+ error: string | null;
383
+ totalDurationMs: number | null;
384
+ triggeredBy: string;
385
+ graphSnapshot: WorkflowGraph;
386
+ createdAt: string;
387
+ updatedAt: string;
388
+ };
389
+ type AgentConfig = {
390
+ agentId: string;
391
+ id?: string;
392
+ name: string;
393
+ /** Human-friendly display name — name is the slug-ish id, displayName
394
+ * is what shows up in admin listings and agent pickers. */
395
+ displayName?: string;
396
+ description?: string;
397
+ role?: string;
398
+ avatar?: string;
399
+ modelId?: string;
400
+ modelProviderId?: string;
401
+ /** Preferred — references `astrlabe.model_provider_connections.id`. */
402
+ connectionId?: string;
403
+ framework?: string;
404
+ instruction?: string;
405
+ /** System prompt; historically some seeds use `systemPrompt`, others
406
+ * `instruction`. UI reads `systemPrompt ?? instruction`. */
407
+ systemPrompt?: string;
408
+ order?: number;
409
+ temperature?: number;
410
+ maxTokens?: number;
411
+ /** Canonical Bedrock-aligned field. Treated as a synonym of
412
+ * `maxTokens` — new UIs write this one. */
413
+ maxOutputTokens?: number;
414
+ topP?: number;
415
+ topK?: number;
416
+ /** ELO score driving the difficulty tier in the canvas. */
417
+ elo?: number;
418
+ difficulty?: 'beginner' | 'intermediate' | 'advanced' | 'expert' | string;
419
+ tags?: string[];
420
+ status?: 'draft' | 'active' | 'archived' | string;
421
+ metadata?: Record<string, unknown>;
422
+ version?: number;
423
+ enabled?: boolean;
424
+ active?: boolean;
425
+ [key: string]: unknown;
426
+ };
427
+ /**
428
+ * Canonical persist payload the `AgentModal` emits via `onPersist`.
429
+ * The receiver translates this to the shape the backend handler
430
+ * (POST /agents/configs or PATCH /agents/configs/{id}) expects.
431
+ */
432
+ type AgentPersistPayload = {
433
+ agentId?: string;
434
+ name: string;
435
+ displayName?: string;
436
+ description?: string;
437
+ role?: string;
438
+ avatar?: string;
439
+ modelId?: string;
440
+ connectionId?: string;
441
+ framework?: string;
442
+ systemPrompt?: string;
443
+ temperature?: number;
444
+ maxOutputTokens?: number;
445
+ topP?: number;
446
+ topK?: number;
447
+ elo?: number;
448
+ difficulty?: string;
449
+ tags?: string[];
450
+ status?: string;
451
+ enabledToolIds?: string[];
452
+ metadata?: Record<string, unknown>;
453
+ /** Structured-output contract — when set, the engine parses + validates
454
+ * the LLM's response against this schema. `undefined` clears any
455
+ * previously-stored schema. See `AgentOutputSchema` for the supported
456
+ * JSON Schema subset. */
457
+ outputSchema?: AgentOutputSchema;
458
+ };
459
+ type AgentModel = {
460
+ id: string;
461
+ name: string;
462
+ provider: string;
463
+ enabled: boolean;
464
+ };
465
+ type WorkflowTool = {
466
+ toolId: string;
467
+ name: string;
468
+ category?: string;
469
+ icon?: string;
470
+ endpoint?: string;
471
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
472
+ enabled: boolean;
473
+ [key: string]: unknown;
474
+ };
475
+ type AgentTool = {
476
+ agentToolId: string;
477
+ name: string;
478
+ description?: string;
479
+ category?: 'search' | 'code' | 'file' | 'web' | 'math' | 'custom';
480
+ icon?: string;
481
+ enabled: boolean;
482
+ compatibleFrameworks?: string[];
483
+ parameters?: Array<{
484
+ name: string;
485
+ type: string;
486
+ description: string;
487
+ required: boolean;
488
+ }>;
489
+ [key: string]: unknown;
490
+ };
491
+ type AgentRule = {
492
+ ruleId: string;
493
+ name: string;
494
+ description?: string;
495
+ enabled: boolean;
496
+ /** Visual order in the admin list. Alias for `priority` kept for
497
+ * legacy clients — new code should read `priority`. */
498
+ order?: number;
499
+ priority?: number;
500
+ /** Canonical singular — object with an `operator` key that the Rust
501
+ * `RuleExecutor` dispatches on. */
502
+ condition?: Record<string, unknown>;
503
+ /** Canonical singular — object with `type` + `params`. */
504
+ action?: Record<string, unknown>;
505
+ /** Legacy: older servers returned an array of action entries. Keep
506
+ * for backwards compat so the UI can still render historical
507
+ * payloads. */
508
+ conditions?: Array<Record<string, unknown>>;
509
+ actions?: Array<Record<string, unknown>>;
510
+ status?: 'draft' | 'active' | 'archived' | string;
511
+ tags?: string[];
512
+ validFrom?: string | null;
513
+ validUntil?: string | null;
514
+ [key: string]: unknown;
515
+ };
516
+
517
+ export type { AgentConfig, AgentModel, AgentNodeConfig, AgentOutputSchema, AgentPersistPayload, AgentRule, AgentTool, AnswerNodeConfig, AudioInputNodeConfig, CodeNodeConfig, CodeOperation, DashboardOutputNodeConfig, DatasourceFilter, DatasourceFilterOp, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, ModelProviderNodeConfig, ModelProviderType, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, S3WriteNodeConfig, SpeechTranscriberNodeConfig, StartNodeConfig, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowTool, WorkflowViewport };
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface GraphNodeIconBubbleProps {
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ declare function GraphNodeIconBubble({ children, className }: GraphNodeIconBubbleProps): react_jsx_runtime.JSX.Element;
9
+ interface GraphNodeHeaderProps {
10
+ icon: ReactNode;
11
+ title: string;
12
+ description?: string;
13
+ compact?: boolean;
14
+ iconClassName?: string;
15
+ }
16
+ declare function GraphNodeHeader({ icon, title, description, compact, iconClassName, }: GraphNodeHeaderProps): react_jsx_runtime.JSX.Element;
17
+ interface GraphNodeMetaProps {
18
+ compact?: boolean;
19
+ children: ReactNode;
20
+ }
21
+ declare function GraphNodeMeta({ compact, children }: GraphNodeMetaProps): react_jsx_runtime.JSX.Element | null;
22
+ interface GraphNodeBadgeProps {
23
+ children: ReactNode;
24
+ className?: string;
25
+ }
26
+ declare function GraphNodeBadge({ children, className }: GraphNodeBadgeProps): react_jsx_runtime.JSX.Element;
27
+
28
+ export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta };
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface GraphNodeIconBubbleProps {
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ declare function GraphNodeIconBubble({ children, className }: GraphNodeIconBubbleProps): react_jsx_runtime.JSX.Element;
9
+ interface GraphNodeHeaderProps {
10
+ icon: ReactNode;
11
+ title: string;
12
+ description?: string;
13
+ compact?: boolean;
14
+ iconClassName?: string;
15
+ }
16
+ declare function GraphNodeHeader({ icon, title, description, compact, iconClassName, }: GraphNodeHeaderProps): react_jsx_runtime.JSX.Element;
17
+ interface GraphNodeMetaProps {
18
+ compact?: boolean;
19
+ children: ReactNode;
20
+ }
21
+ declare function GraphNodeMeta({ compact, children }: GraphNodeMetaProps): react_jsx_runtime.JSX.Element | null;
22
+ interface GraphNodeBadgeProps {
23
+ children: ReactNode;
24
+ className?: string;
25
+ }
26
+ declare function GraphNodeBadge({ children, className }: GraphNodeBadgeProps): react_jsx_runtime.JSX.Element;
27
+
28
+ export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta };