@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.
- package/dist/astrlabe/contracts.d.mts +517 -0
- package/dist/astrlabe/contracts.d.ts +517 -0
- package/dist/astrlabe/graph-node.d.mts +28 -0
- package/dist/astrlabe/graph-node.d.ts +28 -0
- package/dist/astrlabe/index.d.mts +743 -0
- package/dist/astrlabe/index.d.ts +743 -0
- package/dist/astrlabe/index.js +108 -108
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/utils.d.mts +60 -0
- package/dist/astrlabe/utils.d.ts +60 -0
- package/dist/astrlabe/workflow-canvas.d.mts +6 -0
- package/dist/astrlabe/workflow-canvas.d.ts +6 -0
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/astrlabe/workflow-preview-canvas.d.mts +10 -0
- package/dist/astrlabe/workflow-preview-canvas.d.ts +10 -0
- package/dist/billing-panel-DsHhhJqG.d.mts +18 -0
- package/dist/billing-panel-DsHhhJqG.d.ts +18 -0
- package/dist/brand/index.d.mts +71 -0
- package/dist/brand/index.d.ts +71 -0
- package/dist/{chunk-GAN7AKZ2.mjs → chunk-32DHEVOH.mjs} +3 -3
- package/dist/{chunk-GAN7AKZ2.mjs.map → chunk-32DHEVOH.mjs.map} +1 -1
- package/dist/{chunk-IYDGO7RW.js → chunk-3H5CFLVK.js} +135 -135
- package/dist/{chunk-IYDGO7RW.js.map → chunk-3H5CFLVK.js.map} +1 -1
- package/dist/{chunk-QL2JYRBN.js → chunk-3X3IYDG6.js} +68 -68
- package/dist/{chunk-QL2JYRBN.js.map → chunk-3X3IYDG6.js.map} +1 -1
- package/dist/{chunk-N5365CGD.mjs → chunk-57E4TCB2.mjs} +3 -3
- package/dist/{chunk-N5365CGD.mjs.map → chunk-57E4TCB2.mjs.map} +1 -1
- package/dist/{chunk-4HP7XS5I.mjs → chunk-5W6LMDXV.mjs} +4 -4
- package/dist/{chunk-4HP7XS5I.mjs.map → chunk-5W6LMDXV.mjs.map} +1 -1
- package/dist/{chunk-EIZM2EQA.mjs → chunk-5YVOLHSW.mjs} +4 -4
- package/dist/{chunk-EIZM2EQA.mjs.map → chunk-5YVOLHSW.mjs.map} +1 -1
- package/dist/{chunk-ZWLMKOHZ.mjs → chunk-74BU2EBZ.mjs} +6 -6
- package/dist/{chunk-ZWLMKOHZ.mjs.map → chunk-74BU2EBZ.mjs.map} +1 -1
- package/dist/{chunk-7WIWDSF6.js → chunk-7JZFNKJD.js} +36 -36
- package/dist/{chunk-7WIWDSF6.js.map → chunk-7JZFNKJD.js.map} +1 -1
- package/dist/{chunk-DCBRGVD3.mjs → chunk-A4A3SQTV.mjs} +3 -3
- package/dist/{chunk-DCBRGVD3.mjs.map → chunk-A4A3SQTV.mjs.map} +1 -1
- package/dist/{chunk-JUDQX6MP.mjs → chunk-CZZOCKEA.mjs} +3 -3
- package/dist/{chunk-JUDQX6MP.mjs.map → chunk-CZZOCKEA.mjs.map} +1 -1
- package/dist/{chunk-DWIBK7GV.js → chunk-E57RZXOR.js} +25 -25
- package/dist/{chunk-DWIBK7GV.js.map → chunk-E57RZXOR.js.map} +1 -1
- package/dist/{chunk-Z3BMHKKH.mjs → chunk-E6C7MFHJ.mjs} +3 -3
- package/dist/{chunk-Z3BMHKKH.mjs.map → chunk-E6C7MFHJ.mjs.map} +1 -1
- package/dist/{chunk-P7GVXI7Y.mjs → chunk-EWYAM4WJ.mjs} +3 -3
- package/dist/{chunk-P7GVXI7Y.mjs.map → chunk-EWYAM4WJ.mjs.map} +1 -1
- package/dist/{chunk-VDO6MDQW.js → chunk-F35GFICG.js} +13 -13
- package/dist/{chunk-VDO6MDQW.js.map → chunk-F35GFICG.js.map} +1 -1
- package/dist/{chunk-BEUPW5WS.js → chunk-FKUIVS6I.js} +28 -28
- package/dist/{chunk-BEUPW5WS.js.map → chunk-FKUIVS6I.js.map} +1 -1
- package/dist/{chunk-GD6FHRHV.js → chunk-FNA66TT4.js} +3 -3
- package/dist/{chunk-GD6FHRHV.js.map → chunk-FNA66TT4.js.map} +1 -1
- package/dist/{chunk-RBB5YGWH.js → chunk-H37VDL7Y.js} +4 -4
- package/dist/{chunk-RBB5YGWH.js.map → chunk-H37VDL7Y.js.map} +1 -1
- package/dist/{chunk-KI4UPW4Z.js → chunk-HBOORO52.js} +4 -4
- package/dist/{chunk-KI4UPW4Z.js.map → chunk-HBOORO52.js.map} +1 -1
- package/dist/{chunk-MGZTZELL.mjs → chunk-KKXI7CPF.mjs} +3 -3
- package/dist/{chunk-MGZTZELL.mjs.map → chunk-KKXI7CPF.mjs.map} +1 -1
- package/dist/{chunk-IKH5IRDK.mjs → chunk-PCUINUIC.mjs} +3 -3
- package/dist/{chunk-IKH5IRDK.mjs.map → chunk-PCUINUIC.mjs.map} +1 -1
- package/dist/{chunk-CTCO2YI5.mjs → chunk-PYNXIDG3.mjs} +3 -3
- package/dist/{chunk-CTCO2YI5.mjs.map → chunk-PYNXIDG3.mjs.map} +1 -1
- package/dist/{chunk-MFAVWJWE.js → chunk-Q4QORAMH.js} +10 -10
- package/dist/{chunk-MFAVWJWE.js.map → chunk-Q4QORAMH.js.map} +1 -1
- package/dist/{chunk-ZF7RJNPD.js → chunk-Q7HRCCFT.js} +45 -45
- package/dist/{chunk-ZF7RJNPD.js.map → chunk-Q7HRCCFT.js.map} +1 -1
- package/dist/{chunk-R2RPRRB4.js → chunk-RCHTRG7R.js} +55 -55
- package/dist/{chunk-R2RPRRB4.js.map → chunk-RCHTRG7R.js.map} +1 -1
- package/dist/{chunk-FIB2CFJK.js → chunk-TCP45Q4B.js} +9 -9
- package/dist/{chunk-FIB2CFJK.js.map → chunk-TCP45Q4B.js.map} +1 -1
- package/dist/{chunk-SUU7XPRX.js → chunk-TJPPZU77.js} +34 -34
- package/dist/{chunk-SUU7XPRX.js.map → chunk-TJPPZU77.js.map} +1 -1
- package/dist/{chunk-XT76DMP5.js → chunk-VPFVW7ZF.js} +35 -35
- package/dist/{chunk-XT76DMP5.js.map → chunk-VPFVW7ZF.js.map} +1 -1
- package/dist/{chunk-IKHWYYZC.mjs → chunk-VS6PTRQ7.mjs} +3 -3
- package/dist/{chunk-IKHWYYZC.mjs.map → chunk-VS6PTRQ7.mjs.map} +1 -1
- package/dist/{chunk-YNHQ36UU.mjs → chunk-WDBVIU7W.mjs} +3 -3
- package/dist/{chunk-YNHQ36UU.mjs.map → chunk-WDBVIU7W.mjs.map} +1 -1
- package/dist/{chunk-MRLEINJN.mjs → chunk-ZP37M2QK.mjs} +7 -7
- package/dist/{chunk-MRLEINJN.mjs.map → chunk-ZP37M2QK.mjs.map} +1 -1
- package/dist/dynamic-island-confirm-BKsZkAEP.d.mts +17 -0
- package/dist/dynamic-island-confirm-BKsZkAEP.d.ts +17 -0
- package/dist/index-BNRGVAS5.d.mts +222 -0
- package/dist/index-BoebbJ44.d.mts +49 -0
- package/dist/index-BoebbJ44.d.ts +49 -0
- package/dist/index-CnCY-b5V.d.ts +222 -0
- package/dist/index.d.mts +5316 -0
- package/dist/index.d.ts +5316 -0
- package/dist/index.js +665 -665
- package/dist/index.mjs +2 -2
- package/dist/layout-engine-YZcVr20M.d.mts +19 -0
- package/dist/layout-engine-YZcVr20M.d.ts +19 -0
- package/dist/lib/i18n-context.d.mts +36 -0
- package/dist/lib/i18n-context.d.ts +36 -0
- package/dist/lib/router-context.d.mts +35 -0
- package/dist/lib/router-context.d.ts +35 -0
- package/dist/navigation-BiWVffAN.d.mts +49 -0
- package/dist/navigation-BiWVffAN.d.ts +49 -0
- package/dist/platform/admin/index.d.mts +17 -0
- package/dist/platform/admin/index.d.ts +17 -0
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- package/dist/platform/agents-workspace.d.mts +19 -0
- package/dist/platform/agents-workspace.d.ts +19 -0
- package/dist/platform/agents-workspace.js +7 -7
- package/dist/platform/agents-workspace.mjs +6 -6
- package/dist/platform/app-shell.d.mts +64 -0
- package/dist/platform/app-shell.d.ts +64 -0
- package/dist/platform/app-shell.js +4 -4
- package/dist/platform/app-shell.mjs +3 -3
- package/dist/platform/auth/index.d.mts +73 -0
- package/dist/platform/auth/index.d.ts +73 -0
- package/dist/platform/auth/index.js +22 -22
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.d.mts +29 -0
- package/dist/platform/billing/index.d.ts +29 -0
- package/dist/platform/billing/index.js +4 -4
- package/dist/platform/billing/index.mjs +3 -3
- package/dist/platform/impersonation/index.d.mts +19 -0
- package/dist/platform/impersonation/index.d.ts +19 -0
- package/dist/platform/impersonation/index.js +4 -4
- package/dist/platform/impersonation/index.mjs +3 -3
- package/dist/platform/index.d.mts +188 -0
- package/dist/platform/index.d.ts +188 -0
- package/dist/platform/index.js +86 -86
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.d.mts +574 -0
- package/dist/platform/pages/index.d.ts +574 -0
- package/dist/platform/pages/index.js +461 -264
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +228 -31
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/rbac.d.mts +42 -0
- package/dist/platform/rbac.d.ts +42 -0
- package/dist/platform/settings/index.d.mts +31 -0
- package/dist/platform/settings/index.d.ts +31 -0
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/telemetry/index.d.mts +51 -0
- package/dist/platform/telemetry/index.d.ts +51 -0
- package/dist/platform/utils/index.d.mts +32 -0
- package/dist/platform/utils/index.d.ts +32 -0
- package/dist/platform/windsock-admin-client.d.mts +57 -0
- package/dist/platform/windsock-admin-client.d.ts +57 -0
- package/dist/platform/workflow-api-client.d.mts +6 -0
- package/dist/platform/workflow-api-client.d.ts +6 -0
- package/dist/platform/workflow-canvas-shell.d.mts +18 -0
- package/dist/platform/workflow-canvas-shell.d.ts +18 -0
- package/dist/platform/workflow-canvas-shell.js +5 -5
- package/dist/platform/workflow-canvas-shell.mjs +4 -4
- package/dist/rule-form-BYJzyork.d.mts +128 -0
- package/dist/rule-form-BYJzyork.d.ts +128 -0
- package/dist/workflow-api-client-CpFl3WcG.d.mts +468 -0
- package/dist/workflow-api-client-uLICOanv.d.ts +468 -0
- package/dist/workflow-canvas--qaYKuMm.d.ts +113 -0
- package/dist/workflow-canvas-B80fmD_n.d.mts +113 -0
- package/dist/workflow-store-o17I6L6A.d.ts +79 -0
- package/dist/workflow-store-ppVHdMZi.d.mts +79 -0
- package/package.json +1 -1
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
import { WorkflowGraph, WorkflowRun, AgentRule, WorkflowTool, AgentTool, Workflow, VariableValue, AgentModel } from './astrlabe/contracts.mjs';
|
|
2
|
+
import { A as AgentWithPrompts } from './index-BNRGVAS5.mjs';
|
|
3
|
+
import { AgentPrompt } from '@datatechsolutions/shared-domain/ports/workflow';
|
|
4
|
+
import { AgentConfigLike, DataSource } from '@datatechsolutions/shared-domain/common';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
type DialectCategory = {
|
|
8
|
+
id: string;
|
|
9
|
+
labelKey: string;
|
|
10
|
+
icon: React.ComponentType<{
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
gradient: string;
|
|
14
|
+
dialects: DialectOption[];
|
|
15
|
+
};
|
|
16
|
+
type DialectOption = {
|
|
17
|
+
value: string;
|
|
18
|
+
label: string;
|
|
19
|
+
defaultPort?: number;
|
|
20
|
+
/** 'standard' = host/port/db, 'connection-string' = single URL, 'cloud' = project/dataset/key */
|
|
21
|
+
formType: 'standard' | 'connection-string' | 'cloud-bigquery' | 'cloud-snowflake' | 'cloud-key' | 'vector-key';
|
|
22
|
+
};
|
|
23
|
+
declare const DIALECT_CATEGORIES: DialectCategory[];
|
|
24
|
+
declare function findDialect(value: string): DialectOption | undefined;
|
|
25
|
+
declare function findCategory(dialectValue: string): DialectCategory | undefined;
|
|
26
|
+
type DatasourceFormData = {
|
|
27
|
+
name: string;
|
|
28
|
+
dialect: string;
|
|
29
|
+
host?: string;
|
|
30
|
+
port?: number;
|
|
31
|
+
database?: string;
|
|
32
|
+
username?: string;
|
|
33
|
+
password?: string;
|
|
34
|
+
schema?: string;
|
|
35
|
+
ssl?: boolean;
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
connectionString?: string;
|
|
38
|
+
projectId?: string;
|
|
39
|
+
dataset?: string;
|
|
40
|
+
keyFile?: string;
|
|
41
|
+
account?: string;
|
|
42
|
+
warehouse?: string;
|
|
43
|
+
region?: string;
|
|
44
|
+
bucket?: string;
|
|
45
|
+
token?: string;
|
|
46
|
+
apiKey?: string;
|
|
47
|
+
environment?: string;
|
|
48
|
+
index?: string;
|
|
49
|
+
url?: string;
|
|
50
|
+
/** Whitelist of tables the engine is allowed to query. Empty/undef =
|
|
51
|
+
* allow every table the credential can see. */
|
|
52
|
+
allowedTables?: string[];
|
|
53
|
+
/** Columns the engine MUST NOT surface to workflows. Applied at the
|
|
54
|
+
* driver layer — trying to SELECT a blocked column still fails. */
|
|
55
|
+
blockedColumns?: string[];
|
|
56
|
+
/** Max concurrent connections in the org's cached pool (default 5). */
|
|
57
|
+
maxPoolSize?: number;
|
|
58
|
+
/** Query/connect timeout in ms (default 5000). */
|
|
59
|
+
timeoutMs?: number;
|
|
60
|
+
};
|
|
61
|
+
type Labels = Record<string, string>;
|
|
62
|
+
type DatasourceFormModalProps = {
|
|
63
|
+
open: boolean;
|
|
64
|
+
onClose: () => void;
|
|
65
|
+
labels: Labels;
|
|
66
|
+
onSave: (data: DatasourceFormData) => void;
|
|
67
|
+
};
|
|
68
|
+
declare function DatasourceFormModal({ open, onClose, labels, onSave }: DatasourceFormModalProps): react_jsx_runtime.JSX.Element;
|
|
69
|
+
type DatasourceModalProps = {
|
|
70
|
+
open: boolean;
|
|
71
|
+
onClose: () => void;
|
|
72
|
+
labels: Labels;
|
|
73
|
+
onSave: (data: DatasourceFormData) => void;
|
|
74
|
+
};
|
|
75
|
+
declare function DatasourceModal({ open, onClose, labels, onSave }: DatasourceModalProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Register an authenticated fetch function (call once from a provider/layout).
|
|
79
|
+
* After this, all workflow API calls automatically include the JWT token.
|
|
80
|
+
*/
|
|
81
|
+
declare function setAuthenticatedFetch(authFetch: typeof fetch): void;
|
|
82
|
+
declare function setAccessTokenProvider(provider: () => Promise<string | null>): void;
|
|
83
|
+
declare function getCurrentAccessToken(): Promise<string | null>;
|
|
84
|
+
/**
|
|
85
|
+
* Build a full URL for a workflow API path, optionally appending the current
|
|
86
|
+
* access token as a query parameter. Useful for APIs that require auth but
|
|
87
|
+
* cannot set custom headers (EventSource, direct links).
|
|
88
|
+
*/
|
|
89
|
+
declare function buildAuthenticatedApiUrl(path: string, options?: {
|
|
90
|
+
includeAccessToken?: boolean;
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
type NodeValidationIssue = {
|
|
93
|
+
nodeId: string;
|
|
94
|
+
nodeType: string;
|
|
95
|
+
field?: string;
|
|
96
|
+
code: string;
|
|
97
|
+
message: string;
|
|
98
|
+
};
|
|
99
|
+
type AiValidateResponse = {
|
|
100
|
+
ok: boolean;
|
|
101
|
+
structuralIssues: string[];
|
|
102
|
+
nodeIssues: NodeValidationIssue[];
|
|
103
|
+
rationale?: string | null;
|
|
104
|
+
};
|
|
105
|
+
declare function aiValidateWorkflow(body: {
|
|
106
|
+
graph: WorkflowGraph;
|
|
107
|
+
connectionId?: string;
|
|
108
|
+
}): Promise<AiValidateResponse>;
|
|
109
|
+
type AiGenerateResponse = {
|
|
110
|
+
graph: WorkflowGraph;
|
|
111
|
+
ok: boolean;
|
|
112
|
+
structuralIssues: string[];
|
|
113
|
+
nodeIssues: NodeValidationIssue[];
|
|
114
|
+
rationale?: string | null;
|
|
115
|
+
};
|
|
116
|
+
declare function aiGenerateWorkflow(body: {
|
|
117
|
+
prompt: string;
|
|
118
|
+
connectionId: string;
|
|
119
|
+
context?: string;
|
|
120
|
+
}): Promise<AiGenerateResponse>;
|
|
121
|
+
declare function getWorkflows(): Promise<Workflow[]>;
|
|
122
|
+
declare function getWorkflowById(workflowId: string): Promise<Workflow>;
|
|
123
|
+
declare function createWorkflow(data: {
|
|
124
|
+
name: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
}): Promise<Workflow>;
|
|
127
|
+
declare function deleteWorkflow(workflowId: string): Promise<{
|
|
128
|
+
deleted: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
declare function saveWorkflowDraft(workflowId: string, graph: WorkflowGraph, metadata?: {
|
|
131
|
+
name?: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
slug?: string | null;
|
|
134
|
+
isDraft?: boolean;
|
|
135
|
+
isActive?: boolean;
|
|
136
|
+
}): Promise<Workflow>;
|
|
137
|
+
/**
|
|
138
|
+
* Settings modal PATCH — updates the workflow's identity + lifecycle
|
|
139
|
+
* fields in one call. Pass `isDraft: true` to move a published workflow
|
|
140
|
+
* back to draft, `isActive: false` to archive, etc. Anything omitted is
|
|
141
|
+
* left untouched.
|
|
142
|
+
*/
|
|
143
|
+
declare function updateWorkflowSettings(workflowId: string, changes: {
|
|
144
|
+
name?: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
slug?: string | null;
|
|
147
|
+
isDraft?: boolean;
|
|
148
|
+
isActive?: boolean;
|
|
149
|
+
}): Promise<Workflow>;
|
|
150
|
+
declare function publishWorkflow(workflowId: string): Promise<Workflow>;
|
|
151
|
+
declare function executeWorkflow(workflowId: string, inputVariables?: Record<string, VariableValue>): Promise<WorkflowRun>;
|
|
152
|
+
declare function getWorkflowRuns(workflowId: string): Promise<WorkflowRun[]>;
|
|
153
|
+
interface WorkflowTemplateSummary {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
description: string;
|
|
157
|
+
tags: string[];
|
|
158
|
+
}
|
|
159
|
+
declare function listWorkflowTemplates(): Promise<WorkflowTemplateSummary[]>;
|
|
160
|
+
/**
|
|
161
|
+
* Instantiate a workflow from a template. `connectionId` is required when
|
|
162
|
+
* the template references a `{{connectionId}}` placeholder (all LLM-backed
|
|
163
|
+
* templates do).
|
|
164
|
+
*/
|
|
165
|
+
declare function createWorkflowFromTemplate(templateId: string, body: {
|
|
166
|
+
connectionId?: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
}): Promise<Workflow>;
|
|
169
|
+
interface ModelProviderConnection {
|
|
170
|
+
id: string;
|
|
171
|
+
organizationId: string;
|
|
172
|
+
providerId: string;
|
|
173
|
+
providerSlug?: string;
|
|
174
|
+
name: string;
|
|
175
|
+
region?: string;
|
|
176
|
+
endpoint?: string;
|
|
177
|
+
credentialRef?: string;
|
|
178
|
+
apiKeyRef?: string;
|
|
179
|
+
modelFilter?: string[];
|
|
180
|
+
config?: Record<string, unknown>;
|
|
181
|
+
enabled: boolean;
|
|
182
|
+
createdAt?: string;
|
|
183
|
+
updatedAt?: string;
|
|
184
|
+
}
|
|
185
|
+
declare function listModelProviderConnections(): Promise<ModelProviderConnection[]>;
|
|
186
|
+
/**
|
|
187
|
+
* One model family record joined onto a provider in the catalog.
|
|
188
|
+
* Mirrors the `FamilyView` shape returned by `agents_providers.rs`.
|
|
189
|
+
*/
|
|
190
|
+
type ModelFamilyCatalogEntry = {
|
|
191
|
+
id: string;
|
|
192
|
+
slug: string;
|
|
193
|
+
name: string;
|
|
194
|
+
modelIds: string[];
|
|
195
|
+
maxTokens?: number | null;
|
|
196
|
+
contextWindow?: string | null;
|
|
197
|
+
supportsTools?: boolean | null;
|
|
198
|
+
supportsVision?: boolean | null;
|
|
199
|
+
costTier?: string | null;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Catalog of supported LLM providers. Previously hard-coded in the
|
|
203
|
+
* connections modal; now backed by `astrlabe.model_providers` +
|
|
204
|
+
* `astrlabe.model_families` so new providers can be added server-side
|
|
205
|
+
* without a frontend release.
|
|
206
|
+
*/
|
|
207
|
+
type ModelProviderCatalogEntry = {
|
|
208
|
+
id: string;
|
|
209
|
+
slug: string;
|
|
210
|
+
/** Slug normalized into the `ModelProviderType` enum the runtime uses. */
|
|
211
|
+
normalizedSlug: string;
|
|
212
|
+
name: string;
|
|
213
|
+
category?: string | null;
|
|
214
|
+
logoUrl?: string | null;
|
|
215
|
+
docsUrl?: string | null;
|
|
216
|
+
authType?: string | null;
|
|
217
|
+
/**
|
|
218
|
+
* Full family records joined from `model_families`. Empty array if no
|
|
219
|
+
* families are seeded for this provider (`custom`, where the operator
|
|
220
|
+
* supplies the model id at node-config time).
|
|
221
|
+
*/
|
|
222
|
+
families: ModelFamilyCatalogEntry[];
|
|
223
|
+
/** @deprecated — array of family slugs only. New callers read `families`. */
|
|
224
|
+
supportedModelFamilies?: unknown;
|
|
225
|
+
regions?: string[] | null;
|
|
226
|
+
enabled: boolean;
|
|
227
|
+
};
|
|
228
|
+
declare function listModelProviderCatalog(): Promise<ModelProviderCatalogEntry[]>;
|
|
229
|
+
declare function createModelProviderConnection(body: {
|
|
230
|
+
providerSlug?: string;
|
|
231
|
+
providerId?: string;
|
|
232
|
+
name: string;
|
|
233
|
+
region?: string;
|
|
234
|
+
endpoint?: string;
|
|
235
|
+
credentialRef?: string;
|
|
236
|
+
apiKeyRef?: string;
|
|
237
|
+
modelFilter?: string[];
|
|
238
|
+
config?: Record<string, unknown>;
|
|
239
|
+
}): Promise<ModelProviderConnection>;
|
|
240
|
+
declare function updateModelProviderConnection(id: string, body: {
|
|
241
|
+
name?: string;
|
|
242
|
+
region?: string;
|
|
243
|
+
endpoint?: string;
|
|
244
|
+
credentialRef?: string;
|
|
245
|
+
apiKeyRef?: string;
|
|
246
|
+
modelFilter?: string[];
|
|
247
|
+
config?: Record<string, unknown>;
|
|
248
|
+
enabled?: boolean;
|
|
249
|
+
}): Promise<ModelProviderConnection>;
|
|
250
|
+
declare function deleteModelProviderConnection(id: string): Promise<{
|
|
251
|
+
deleted: boolean;
|
|
252
|
+
}>;
|
|
253
|
+
declare function getAgentPrompts(agentId: string): Promise<AgentPrompt[]>;
|
|
254
|
+
declare function getAgentModels(): Promise<AgentModel[]>;
|
|
255
|
+
declare function getAgentTools(agentId: string): Promise<WorkflowTool[]>;
|
|
256
|
+
declare function updateAgentTool(toolId: string, updates: Partial<WorkflowTool>): Promise<WorkflowTool>;
|
|
257
|
+
declare function createAgentTool(tool: Omit<WorkflowTool, 'organizationId' | 'createdAt' | 'updatedAt'>): Promise<WorkflowTool>;
|
|
258
|
+
declare function deleteAgentTool(toolId: string): Promise<{
|
|
259
|
+
deleted: boolean;
|
|
260
|
+
}>;
|
|
261
|
+
declare function getAgentToolDefinitions(): Promise<AgentTool[]>;
|
|
262
|
+
/**
|
|
263
|
+
* Create a custom agent tool definition. The backend (`POST
|
|
264
|
+
* /agents/tool-definitions`) requires:
|
|
265
|
+
* { name, description, toolType, inputSchema, handlerConfig }
|
|
266
|
+
* where `inputSchema` is a JSON-Schema object with `type` + `properties`.
|
|
267
|
+
*/
|
|
268
|
+
declare function createAgentToolDefinition(toolDef: {
|
|
269
|
+
name: string;
|
|
270
|
+
description?: string;
|
|
271
|
+
toolType: string;
|
|
272
|
+
inputSchema: Record<string, unknown>;
|
|
273
|
+
handlerConfig: Record<string, unknown>;
|
|
274
|
+
}): Promise<AgentTool>;
|
|
275
|
+
declare function getAgentRules(): Promise<AgentRule[]>;
|
|
276
|
+
declare function updateAgentRule(ruleId: string, updates: Partial<AgentRule> & Record<string, unknown>): Promise<AgentRule>;
|
|
277
|
+
declare function createAgentRule(rule: Partial<AgentRule> & Record<string, unknown>): Promise<AgentRule>;
|
|
278
|
+
declare function deleteAgentRule(ruleId: string): Promise<{
|
|
279
|
+
deleted: boolean;
|
|
280
|
+
}>;
|
|
281
|
+
declare function executeAgentRule(ruleId: string, input: Record<string, unknown>): Promise<unknown>;
|
|
282
|
+
declare function createAgentConfig(input: Partial<AgentConfigLike>): Promise<AgentConfigLike>;
|
|
283
|
+
declare function updateAgentConfig(agentId: string, updates: Partial<AgentConfigLike>): Promise<AgentConfigLike>;
|
|
284
|
+
declare function deleteAgentConfig(agentId: string): Promise<{
|
|
285
|
+
deleted: boolean;
|
|
286
|
+
}>;
|
|
287
|
+
declare function createAgentPrompt(input: Omit<AgentPrompt, 'promptId' | 'version' | 'createdAt'>): Promise<AgentPrompt>;
|
|
288
|
+
declare function updateAgentPrompt(promptId: string, updates: Partial<AgentPrompt>): Promise<AgentPrompt>;
|
|
289
|
+
declare function deleteAgentPrompt(promptId: string): Promise<{
|
|
290
|
+
deleted: boolean;
|
|
291
|
+
}>;
|
|
292
|
+
/**
|
|
293
|
+
* Patch an existing tool definition. The Rust handler takes the id in
|
|
294
|
+
* the BODY (`toolId`) rather than the URL, and accepts a narrower set
|
|
295
|
+
* of fields than create: `{toolId, name?, description?, parameters?,
|
|
296
|
+
* implementationKey?}`. `implementationKey` is a JSON string that wraps
|
|
297
|
+
* `handlerConfig` — the page wrapper produces that shape before calling.
|
|
298
|
+
*/
|
|
299
|
+
declare function updateAgentToolDefinition(agentToolId: string, updates: {
|
|
300
|
+
name?: string;
|
|
301
|
+
description?: string;
|
|
302
|
+
parameters?: Record<string, unknown>;
|
|
303
|
+
implementationKey?: string;
|
|
304
|
+
}): Promise<AgentTool>;
|
|
305
|
+
declare function deleteAgentToolDefinition(agentToolId: string): Promise<{
|
|
306
|
+
deleted: boolean;
|
|
307
|
+
}>;
|
|
308
|
+
type WorkflowRunListParams = {
|
|
309
|
+
workflowId?: string;
|
|
310
|
+
status?: string;
|
|
311
|
+
limit?: number;
|
|
312
|
+
offset?: number;
|
|
313
|
+
};
|
|
314
|
+
declare function listWorkflowRuns(params?: WorkflowRunListParams): Promise<{
|
|
315
|
+
items: WorkflowRun[];
|
|
316
|
+
total: number;
|
|
317
|
+
}>;
|
|
318
|
+
declare function getWorkflowRunById(runId: string): Promise<WorkflowRun>;
|
|
319
|
+
declare function cancelWorkflowRun(runId: string): Promise<WorkflowRun>;
|
|
320
|
+
declare function replayWorkflowRun(workflowId: string, runId: string, overrides?: Record<string, VariableValue>): Promise<WorkflowRun>;
|
|
321
|
+
type NodeMetrics = {
|
|
322
|
+
tokensIn?: number;
|
|
323
|
+
tokensOut?: number;
|
|
324
|
+
costUsd?: number;
|
|
325
|
+
provider?: string;
|
|
326
|
+
model?: string;
|
|
327
|
+
};
|
|
328
|
+
type RunTimelineEntry = {
|
|
329
|
+
nodeId: string;
|
|
330
|
+
nodeType: string;
|
|
331
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
|
|
332
|
+
startedAt: string | null;
|
|
333
|
+
completedAt: string | null;
|
|
334
|
+
durationMs: number | null;
|
|
335
|
+
inputs?: Record<string, unknown>;
|
|
336
|
+
outputs?: Record<string, unknown>;
|
|
337
|
+
error?: string;
|
|
338
|
+
metrics?: NodeMetrics;
|
|
339
|
+
};
|
|
340
|
+
declare function getRunTimeline(workflowId: string, runId: string): Promise<RunTimelineEntry[]>;
|
|
341
|
+
type AnalyticsSummary = {
|
|
342
|
+
totalRuns: number;
|
|
343
|
+
runsByStatus: Record<string, number>;
|
|
344
|
+
avgDurationMs: number;
|
|
345
|
+
successRate: number;
|
|
346
|
+
perWorkflow: Array<{
|
|
347
|
+
workflowId: string;
|
|
348
|
+
name: string;
|
|
349
|
+
runs: number;
|
|
350
|
+
successRate: number;
|
|
351
|
+
}>;
|
|
352
|
+
series?: Array<{
|
|
353
|
+
date: string;
|
|
354
|
+
runs: number;
|
|
355
|
+
successes: number;
|
|
356
|
+
failures: number;
|
|
357
|
+
}>;
|
|
358
|
+
};
|
|
359
|
+
declare function getAnalyticsSummary(params?: {
|
|
360
|
+
from?: string;
|
|
361
|
+
to?: string;
|
|
362
|
+
}): Promise<AnalyticsSummary>;
|
|
363
|
+
type PresignUploadInput = {
|
|
364
|
+
fileName: string;
|
|
365
|
+
contentType: string;
|
|
366
|
+
fileSize?: number;
|
|
367
|
+
folder?: string;
|
|
368
|
+
};
|
|
369
|
+
type PresignedUpload = {
|
|
370
|
+
uploadUrl: string;
|
|
371
|
+
downloadUrl: string;
|
|
372
|
+
objectKey: string;
|
|
373
|
+
expiresAt: string;
|
|
374
|
+
};
|
|
375
|
+
declare function presignUpload(input: PresignUploadInput): Promise<PresignedUpload>;
|
|
376
|
+
declare function getUploadDownloadUrl(objectKey: string): Promise<{
|
|
377
|
+
downloadUrl: string;
|
|
378
|
+
}>;
|
|
379
|
+
declare function deleteUpload(objectKey: string): Promise<{
|
|
380
|
+
deleted: boolean;
|
|
381
|
+
}>;
|
|
382
|
+
type RunEvent = {
|
|
383
|
+
/**
|
|
384
|
+
* Discriminator for the event payload. The set is open-ended on purpose
|
|
385
|
+
* — Phase 2/3 of the generative-UI work adds `ui-render` (per-section
|
|
386
|
+
* progressive rendering) and `run-paused` (operator-input pause) without
|
|
387
|
+
* a breaking change.
|
|
388
|
+
*/
|
|
389
|
+
type: 'run-started' | 'node-started' | 'node-completed' | 'node-failed' | 'run-completed' | 'run-failed' | 'run-paused' | 'ui-render' | 'log';
|
|
390
|
+
runId: string;
|
|
391
|
+
nodeId?: string;
|
|
392
|
+
data?: Record<string, unknown>;
|
|
393
|
+
timestamp: string;
|
|
394
|
+
};
|
|
395
|
+
type PublicSampleWorkflow = {
|
|
396
|
+
slug: string;
|
|
397
|
+
name: string | null;
|
|
398
|
+
description: string | null;
|
|
399
|
+
graph: WorkflowGraph;
|
|
400
|
+
version: number | null;
|
|
401
|
+
publishedAt: string | null;
|
|
402
|
+
};
|
|
403
|
+
declare function getPublicSampleWorkflow(slug: string): Promise<PublicSampleWorkflow>;
|
|
404
|
+
type ApprovalDecision = {
|
|
405
|
+
/** True approves and resumes the run; false fails it with `reason`. */
|
|
406
|
+
approved: boolean;
|
|
407
|
+
/** Operator-supplied rationale, surfaced on the audit row. */
|
|
408
|
+
reason?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Captured payload — for `input_request` sections this carries the
|
|
411
|
+
* form field values. The downstream workflow nodes read it from
|
|
412
|
+
* `inputs.approvals.<nodeId>.payload`.
|
|
413
|
+
*/
|
|
414
|
+
payload?: Record<string, unknown>;
|
|
415
|
+
};
|
|
416
|
+
type ApprovalResponse = {
|
|
417
|
+
approvalId: string;
|
|
418
|
+
sourceRunId: string;
|
|
419
|
+
resumedRunId: string;
|
|
420
|
+
nodeId: string;
|
|
421
|
+
approved: boolean;
|
|
422
|
+
status: string;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Resolve a paused workflow run by recording an operator decision.
|
|
426
|
+
* The backend writes an audit row, merges the decision into the run's
|
|
427
|
+
* inputs, and re-executes — see #457.
|
|
428
|
+
*/
|
|
429
|
+
declare function submitApproval(runId: string, nodeId: string, decision: ApprovalDecision): Promise<ApprovalResponse>;
|
|
430
|
+
/**
|
|
431
|
+
* Connection state for {@link subscribeToRunEvents}. UI consumers can
|
|
432
|
+
* surface this — e.g. show "reconnecting…" badge — by passing an
|
|
433
|
+
* `onState` callback.
|
|
434
|
+
*/
|
|
435
|
+
type RunSubscriptionState = 'live' | 'reconnecting' | 'polling' | 'closed';
|
|
436
|
+
/**
|
|
437
|
+
* Subscribe to a run's event stream with auto-reconnect + polling fallback.
|
|
438
|
+
*
|
|
439
|
+
* The default `EventSource` drops silently on idle proxies / cold-restarts
|
|
440
|
+
* (CloudFront + Lambda Function URL combo at customer scale will close
|
|
441
|
+
* an idle connection after ~30–60s). When that happens the run viewer
|
|
442
|
+
* looks frozen with no signal to the user.
|
|
443
|
+
*
|
|
444
|
+
* Lifecycle:
|
|
445
|
+
* 1. Open SSE. On `open`, state = `live`.
|
|
446
|
+
* 2. On `error`, close the source and exponential-backoff (1s → 2s → 4s
|
|
447
|
+
* → 8s → 16s, with jitter). State = `reconnecting`.
|
|
448
|
+
* 3. After {@link SSE_MAX_RECONNECT_ATTEMPTS} failures, fall back to
|
|
449
|
+
* polling `GET /workflow-runs/{runId}` every 5s. State = `polling`.
|
|
450
|
+
* 4. On terminal event (`run-completed` / `run-failed`) or terminal
|
|
451
|
+
* polled status (completed/failed/cancelled), close + state = `closed`.
|
|
452
|
+
* 5. Returned disposer also flips to `closed`; idempotent.
|
|
453
|
+
*
|
|
454
|
+
* Backwards-compatible with the previous 3-arg signature; pass `onState`
|
|
455
|
+
* as a 4th arg if you want to render connection-state UI.
|
|
456
|
+
*/
|
|
457
|
+
declare function subscribeToRunEvents(runId: string, onEvent: (event: RunEvent) => void, onError?: (error: Event) => void, onState?: (state: RunSubscriptionState) => void): () => void;
|
|
458
|
+
declare function getAgentConfigsWithPrompts(): Promise<AgentWithPrompts[]>;
|
|
459
|
+
declare function getDatasources(): Promise<DataSource[]>;
|
|
460
|
+
declare function createDatasource(data: DatasourceFormData): Promise<DataSource>;
|
|
461
|
+
declare function getDatasourceTables(datasourceId: string): Promise<string[]>;
|
|
462
|
+
declare function getDatasourceSchema(datasourceId: string, table: string): Promise<Array<{
|
|
463
|
+
name: string;
|
|
464
|
+
type: string;
|
|
465
|
+
nullable?: boolean;
|
|
466
|
+
}>>;
|
|
467
|
+
|
|
468
|
+
export { getAgentToolDefinitions as $, type AnalyticsSummary as A, createAgentTool as B, createAgentToolDefinition as C, type DatasourceFormData as D, createDatasource as E, createModelProviderConnection as F, createWorkflow as G, createWorkflowFromTemplate as H, deleteAgentConfig as I, deleteAgentPrompt as J, deleteAgentRule as K, deleteAgentTool as L, type ModelProviderConnection as M, type NodeMetrics as N, deleteAgentToolDefinition as O, type PresignUploadInput as P, deleteModelProviderConnection as Q, type RunTimelineEntry as R, deleteUpload as S, deleteWorkflow as T, executeAgentRule as U, executeWorkflow as V, type WorkflowRunListParams as W, getAgentConfigsWithPrompts as X, getAgentModels as Y, getAgentPrompts as Z, getAgentRules as _, DIALECT_CATEGORIES as a, getAgentTools as a0, getAnalyticsSummary as a1, getCurrentAccessToken as a2, getDatasourceSchema as a3, getDatasourceTables as a4, getDatasources as a5, getPublicSampleWorkflow as a6, getRunTimeline as a7, getUploadDownloadUrl as a8, getWorkflowById as a9, getWorkflowRunById as aa, getWorkflowRuns as ab, getWorkflows as ac, listModelProviderCatalog as ad, listModelProviderConnections as ae, listWorkflowRuns as af, listWorkflowTemplates as ag, presignUpload as ah, publishWorkflow as ai, replayWorkflowRun as aj, saveWorkflowDraft as ak, setAccessTokenProvider as al, setAuthenticatedFetch as am, submitApproval as an, subscribeToRunEvents as ao, updateAgentConfig as ap, updateAgentPrompt as aq, updateAgentRule as ar, updateAgentTool as as, updateAgentToolDefinition as at, updateModelProviderConnection as au, updateWorkflowSettings as av, DatasourceFormModal as b, type DatasourceFormModalProps as c, DatasourceModal as d, type DatasourceModalProps as e, findCategory as f, findDialect as g, type AiGenerateResponse as h, type AiValidateResponse as i, type ApprovalDecision as j, type ApprovalResponse as k, type ModelFamilyCatalogEntry as l, type ModelProviderCatalogEntry as m, type NodeValidationIssue as n, type PresignedUpload as o, type PublicSampleWorkflow as p, type RunEvent as q, type RunSubscriptionState as r, type WorkflowTemplateSummary as s, aiGenerateWorkflow as t, aiValidateWorkflow as u, buildAuthenticatedApiUrl as v, cancelWorkflowRun as w, createAgentConfig as x, createAgentPrompt as y, createAgentRule as z };
|