@datatechsolutions/ui 2.11.82 → 2.11.84
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/index.d.mts +2 -2
- package/dist/astrlabe/index.d.ts +2 -2
- package/dist/astrlabe/index.js +110 -106
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/chunk-3T2WGL47.js +44 -0
- package/dist/chunk-3T2WGL47.js.map +1 -0
- package/dist/{chunk-HAZP5J67.mjs → chunk-63AL2RN5.mjs} +187 -17
- package/dist/chunk-63AL2RN5.mjs.map +1 -0
- package/dist/chunk-64G2HBRQ.mjs +481 -0
- package/dist/chunk-64G2HBRQ.mjs.map +1 -0
- package/dist/{chunk-J3OYJ44D.mjs → chunk-BH2AU3LG.mjs} +3 -3
- package/dist/{chunk-J3OYJ44D.mjs.map → chunk-BH2AU3LG.mjs.map} +1 -1
- package/dist/chunk-CCRBT7TA.mjs +941 -0
- package/dist/chunk-CCRBT7TA.mjs.map +1 -0
- package/dist/chunk-CHLJUSXX.mjs +128 -0
- package/dist/chunk-CHLJUSXX.mjs.map +1 -0
- package/dist/chunk-CXIQWPBH.js +214 -0
- package/dist/chunk-CXIQWPBH.js.map +1 -0
- package/dist/chunk-EDE36MKE.mjs +412 -0
- package/dist/chunk-EDE36MKE.mjs.map +1 -0
- package/dist/{chunk-M7P2TQ6X.js → chunk-EFREXNZB.js} +64 -64
- package/dist/{chunk-M7P2TQ6X.js.map → chunk-EFREXNZB.js.map} +1 -1
- package/dist/chunk-FAGDZEKM.js +23 -0
- package/dist/chunk-FAGDZEKM.js.map +1 -0
- package/dist/{chunk-TUEYBNWL.js → chunk-GV6WJCEB.js} +3 -3
- package/dist/{chunk-TUEYBNWL.js.map → chunk-GV6WJCEB.js.map} +1 -1
- package/dist/chunk-HU3EAHFO.mjs +20 -0
- package/dist/chunk-HU3EAHFO.mjs.map +1 -0
- package/dist/{chunk-LLFU42KC.mjs → chunk-I6WYV2AN.mjs} +3 -3
- package/dist/{chunk-LLFU42KC.mjs.map → chunk-I6WYV2AN.mjs.map} +1 -1
- package/dist/chunk-JJWFMKZY.js +132 -0
- package/dist/chunk-JJWFMKZY.js.map +1 -0
- package/dist/{chunk-K4QJV3GC.js → chunk-L6FVIWAJ.js} +308 -137
- package/dist/chunk-L6FVIWAJ.js.map +1 -0
- package/dist/chunk-MNQEZL7B.mjs +210 -0
- package/dist/chunk-MNQEZL7B.mjs.map +1 -0
- package/dist/chunk-SGJ24J2Q.js +943 -0
- package/dist/chunk-SGJ24J2Q.js.map +1 -0
- package/dist/chunk-SW6TVAIJ.js +418 -0
- package/dist/chunk-SW6TVAIJ.js.map +1 -0
- package/dist/chunk-SYNVNTLJ.mjs +20 -0
- package/dist/chunk-SYNVNTLJ.mjs.map +1 -0
- package/dist/chunk-UQXVCVAN.mjs +41 -0
- package/dist/chunk-UQXVCVAN.mjs.map +1 -0
- package/dist/chunk-WGELLCOZ.js +22 -0
- package/dist/chunk-WGELLCOZ.js.map +1 -0
- package/dist/chunk-YXPHJ2BQ.js +541 -0
- package/dist/chunk-YXPHJ2BQ.js.map +1 -0
- package/dist/index.d.mts +3 -47
- package/dist/index.d.ts +3 -47
- package/dist/index.js +765 -765
- package/dist/index.mjs +2 -2
- package/dist/navigation-BiWVffAN.d.mts +49 -0
- package/dist/navigation-BiWVffAN.d.ts +49 -0
- package/dist/platform/agents-workspace.d.mts +19 -0
- package/dist/platform/agents-workspace.d.ts +19 -0
- package/dist/platform/agents-workspace.js +26 -0
- package/dist/platform/agents-workspace.js.map +1 -0
- package/dist/platform/agents-workspace.mjs +17 -0
- package/dist/platform/agents-workspace.mjs.map +1 -0
- package/dist/platform/app-shell.d.mts +58 -0
- package/dist/platform/app-shell.d.ts +58 -0
- package/dist/platform/app-shell.js +17 -0
- package/dist/platform/app-shell.js.map +1 -0
- package/dist/platform/app-shell.mjs +8 -0
- package/dist/platform/app-shell.mjs.map +1 -0
- package/dist/platform/index.d.mts +100 -3
- package/dist/platform/index.d.ts +100 -3
- package/dist/platform/index.js +499 -28
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.mjs +472 -27
- package/dist/platform/index.mjs.map +1 -1
- package/dist/platform/pages/index.d.mts +243 -82
- package/dist/platform/pages/index.d.ts +243 -82
- package/dist/platform/pages/index.js +886 -614
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +756 -511
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/utils/index.js +18 -56
- package/dist/platform/utils/index.js.map +1 -1
- package/dist/platform/utils/index.mjs +3 -53
- package/dist/platform/utils/index.mjs.map +1 -1
- package/dist/platform/workflow-api-client.d.mts +6 -0
- package/dist/platform/workflow-api-client.d.ts +6 -0
- package/dist/platform/workflow-api-client.js +246 -0
- package/dist/platform/workflow-api-client.js.map +1 -0
- package/dist/platform/workflow-api-client.mjs +5 -0
- package/dist/platform/workflow-api-client.mjs.map +1 -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 +20 -0
- package/dist/platform/workflow-canvas-shell.js.map +1 -0
- package/dist/platform/workflow-canvas-shell.mjs +11 -0
- package/dist/platform/workflow-canvas-shell.mjs.map +1 -0
- package/dist/{rule-form-F5jBOeqk.d.mts → rule-form-BYJzyork.d.mts} +50 -1
- package/dist/{rule-form-F5jBOeqk.d.ts → rule-form-BYJzyork.d.ts} +50 -1
- package/dist/workflow-api-client-C8gPn_D1.d.mts +386 -0
- package/dist/workflow-api-client-Dy1Ph8W-.d.ts +386 -0
- package/package.json +21 -1
- package/dist/chunk-HAZP5J67.mjs.map +0 -1
- package/dist/chunk-K4QJV3GC.js.map +0 -1
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
type ExecutionTimelineStatus = 'completed' | 'running' | 'failed' | 'pending' | 'skipped';
|
|
4
|
+
type ExecutionTimelineMetrics = {
|
|
5
|
+
tokensIn?: number;
|
|
6
|
+
tokensOut?: number;
|
|
7
|
+
costUsd?: number;
|
|
8
|
+
provider?: string;
|
|
9
|
+
model?: string;
|
|
10
|
+
};
|
|
11
|
+
type ExecutionTimelineEntry = {
|
|
12
|
+
nodeId: string;
|
|
13
|
+
nodeType: string;
|
|
14
|
+
status: ExecutionTimelineStatus;
|
|
15
|
+
startedAt: string | null;
|
|
16
|
+
completedAt: string | null;
|
|
17
|
+
durationMs: number | null;
|
|
18
|
+
inputs?: Record<string, unknown>;
|
|
19
|
+
outputs?: Record<string, unknown>;
|
|
20
|
+
error?: string | null;
|
|
21
|
+
metrics?: ExecutionTimelineMetrics;
|
|
22
|
+
};
|
|
23
|
+
type ExecutionTimelineLabels = {
|
|
24
|
+
status: string;
|
|
25
|
+
duration: string;
|
|
26
|
+
inputs: string;
|
|
27
|
+
outputs: string;
|
|
28
|
+
error: string;
|
|
29
|
+
started: string;
|
|
30
|
+
completed: string;
|
|
31
|
+
pending: string;
|
|
32
|
+
running: string;
|
|
33
|
+
failed: string;
|
|
34
|
+
skipped: string;
|
|
35
|
+
selectNode: string;
|
|
36
|
+
model: string;
|
|
37
|
+
tokens: string;
|
|
38
|
+
cost: string;
|
|
39
|
+
/** Used as the empty-state heading when `entries` is empty. */
|
|
40
|
+
empty?: string;
|
|
41
|
+
};
|
|
42
|
+
type ExecutionTimelinePanelProps = {
|
|
43
|
+
entries: ExecutionTimelineEntry[];
|
|
44
|
+
labels: ExecutionTimelineLabels;
|
|
45
|
+
/** When set, drives selection from the parent. Useful when the page
|
|
46
|
+
* syncs the selection with a URL query param. */
|
|
47
|
+
selectedNodeId?: string;
|
|
48
|
+
onSelect?: (nodeId: string) => void;
|
|
49
|
+
};
|
|
50
|
+
declare function ExecutionTimelinePanel({ entries, labels, selectedNodeId, onSelect, }: ExecutionTimelinePanelProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
|
|
3
52
|
/**
|
|
4
53
|
* Rule editing types.
|
|
5
54
|
*
|
|
@@ -76,4 +125,4 @@ type Props = {
|
|
|
76
125
|
declare function RuleForm({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
|
|
77
126
|
declare function defaultRuleForm(): RuleFormValue;
|
|
78
127
|
|
|
79
|
-
export { type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b,
|
|
128
|
+
export { type ExecutionTimelineLabels as E, type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b, type ExecutionTimelineEntry as c, type ExecutionTimelineMetrics as d, ExecutionTimelinePanel as e, type ExecutionTimelinePanelProps as f, type ExecutionTimelineStatus as g, RULE_STATUS_OPTIONS as h, type RuleConditionOperator as i, RuleForm as j, type RuleStatus as k, type TimeWindow as l, defaultRuleForm as m };
|
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
type ExecutionTimelineStatus = 'completed' | 'running' | 'failed' | 'pending' | 'skipped';
|
|
4
|
+
type ExecutionTimelineMetrics = {
|
|
5
|
+
tokensIn?: number;
|
|
6
|
+
tokensOut?: number;
|
|
7
|
+
costUsd?: number;
|
|
8
|
+
provider?: string;
|
|
9
|
+
model?: string;
|
|
10
|
+
};
|
|
11
|
+
type ExecutionTimelineEntry = {
|
|
12
|
+
nodeId: string;
|
|
13
|
+
nodeType: string;
|
|
14
|
+
status: ExecutionTimelineStatus;
|
|
15
|
+
startedAt: string | null;
|
|
16
|
+
completedAt: string | null;
|
|
17
|
+
durationMs: number | null;
|
|
18
|
+
inputs?: Record<string, unknown>;
|
|
19
|
+
outputs?: Record<string, unknown>;
|
|
20
|
+
error?: string | null;
|
|
21
|
+
metrics?: ExecutionTimelineMetrics;
|
|
22
|
+
};
|
|
23
|
+
type ExecutionTimelineLabels = {
|
|
24
|
+
status: string;
|
|
25
|
+
duration: string;
|
|
26
|
+
inputs: string;
|
|
27
|
+
outputs: string;
|
|
28
|
+
error: string;
|
|
29
|
+
started: string;
|
|
30
|
+
completed: string;
|
|
31
|
+
pending: string;
|
|
32
|
+
running: string;
|
|
33
|
+
failed: string;
|
|
34
|
+
skipped: string;
|
|
35
|
+
selectNode: string;
|
|
36
|
+
model: string;
|
|
37
|
+
tokens: string;
|
|
38
|
+
cost: string;
|
|
39
|
+
/** Used as the empty-state heading when `entries` is empty. */
|
|
40
|
+
empty?: string;
|
|
41
|
+
};
|
|
42
|
+
type ExecutionTimelinePanelProps = {
|
|
43
|
+
entries: ExecutionTimelineEntry[];
|
|
44
|
+
labels: ExecutionTimelineLabels;
|
|
45
|
+
/** When set, drives selection from the parent. Useful when the page
|
|
46
|
+
* syncs the selection with a URL query param. */
|
|
47
|
+
selectedNodeId?: string;
|
|
48
|
+
onSelect?: (nodeId: string) => void;
|
|
49
|
+
};
|
|
50
|
+
declare function ExecutionTimelinePanel({ entries, labels, selectedNodeId, onSelect, }: ExecutionTimelinePanelProps): react_jsx_runtime.JSX.Element;
|
|
51
|
+
|
|
3
52
|
/**
|
|
4
53
|
* Rule editing types.
|
|
5
54
|
*
|
|
@@ -76,4 +125,4 @@ type Props = {
|
|
|
76
125
|
declare function RuleForm({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
|
|
77
126
|
declare function defaultRuleForm(): RuleFormValue;
|
|
78
127
|
|
|
79
|
-
export { type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b,
|
|
128
|
+
export { type ExecutionTimelineLabels as E, type RuleFormValue as R, TIMEZONE_OPTIONS as T, type RuleCondition as a, type RuleAction as b, type ExecutionTimelineEntry as c, type ExecutionTimelineMetrics as d, ExecutionTimelinePanel as e, type ExecutionTimelinePanelProps as f, type ExecutionTimelineStatus as g, RULE_STATUS_OPTIONS as h, type RuleConditionOperator as i, RuleForm as j, type RuleStatus as k, type TimeWindow as l, defaultRuleForm as m };
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { WorkflowGraph, WorkflowRun, AgentRule, WorkflowTool, AgentTool, Workflow, VariableValue, AgentModel } from './astrlabe/contracts.mjs';
|
|
2
|
+
import { A as AgentWithPrompts } from './index-AioB90qq.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
|
+
* Catalog of supported LLM providers. Previously hard-coded in the
|
|
188
|
+
* connections modal; now backed by `astrlabe.model_providers` so new
|
|
189
|
+
* providers can be added server-side without a frontend release.
|
|
190
|
+
*/
|
|
191
|
+
type ModelProviderCatalogEntry = {
|
|
192
|
+
id: string;
|
|
193
|
+
slug: string;
|
|
194
|
+
/** Slug normalized into the `ModelProviderType` enum the runtime uses. */
|
|
195
|
+
normalizedSlug: string;
|
|
196
|
+
name: string;
|
|
197
|
+
category?: string | null;
|
|
198
|
+
logoUrl?: string | null;
|
|
199
|
+
docsUrl?: string | null;
|
|
200
|
+
authType?: string | null;
|
|
201
|
+
supportedModelFamilies?: unknown;
|
|
202
|
+
regions?: unknown;
|
|
203
|
+
enabled: boolean;
|
|
204
|
+
};
|
|
205
|
+
declare function listModelProviderCatalog(): Promise<ModelProviderCatalogEntry[]>;
|
|
206
|
+
declare function createModelProviderConnection(body: {
|
|
207
|
+
providerSlug?: string;
|
|
208
|
+
providerId?: string;
|
|
209
|
+
name: string;
|
|
210
|
+
region?: string;
|
|
211
|
+
endpoint?: string;
|
|
212
|
+
credentialRef?: string;
|
|
213
|
+
apiKeyRef?: string;
|
|
214
|
+
modelFilter?: string[];
|
|
215
|
+
config?: Record<string, unknown>;
|
|
216
|
+
}): Promise<ModelProviderConnection>;
|
|
217
|
+
declare function updateModelProviderConnection(id: string, body: {
|
|
218
|
+
name?: string;
|
|
219
|
+
region?: string;
|
|
220
|
+
endpoint?: string;
|
|
221
|
+
credentialRef?: string;
|
|
222
|
+
apiKeyRef?: string;
|
|
223
|
+
modelFilter?: string[];
|
|
224
|
+
config?: Record<string, unknown>;
|
|
225
|
+
enabled?: boolean;
|
|
226
|
+
}): Promise<ModelProviderConnection>;
|
|
227
|
+
declare function deleteModelProviderConnection(id: string): Promise<{
|
|
228
|
+
deleted: boolean;
|
|
229
|
+
}>;
|
|
230
|
+
declare function getAgentPrompts(agentId: string): Promise<AgentPrompt[]>;
|
|
231
|
+
declare function getAgentModels(): Promise<AgentModel[]>;
|
|
232
|
+
declare function getAgentTools(agentId: string): Promise<WorkflowTool[]>;
|
|
233
|
+
declare function updateAgentTool(toolId: string, updates: Partial<WorkflowTool>): Promise<WorkflowTool>;
|
|
234
|
+
declare function createAgentTool(tool: Omit<WorkflowTool, 'organizationId' | 'createdAt' | 'updatedAt'>): Promise<WorkflowTool>;
|
|
235
|
+
declare function deleteAgentTool(toolId: string): Promise<{
|
|
236
|
+
deleted: boolean;
|
|
237
|
+
}>;
|
|
238
|
+
declare function getAgentToolDefinitions(): Promise<AgentTool[]>;
|
|
239
|
+
/**
|
|
240
|
+
* Create a custom agent tool definition. The backend (`POST
|
|
241
|
+
* /agents/tool-definitions`) requires:
|
|
242
|
+
* { name, description, toolType, inputSchema, handlerConfig }
|
|
243
|
+
* where `inputSchema` is a JSON-Schema object with `type` + `properties`.
|
|
244
|
+
*/
|
|
245
|
+
declare function createAgentToolDefinition(toolDef: {
|
|
246
|
+
name: string;
|
|
247
|
+
description?: string;
|
|
248
|
+
toolType: string;
|
|
249
|
+
inputSchema: Record<string, unknown>;
|
|
250
|
+
handlerConfig: Record<string, unknown>;
|
|
251
|
+
}): Promise<AgentTool>;
|
|
252
|
+
declare function getAgentRules(): Promise<AgentRule[]>;
|
|
253
|
+
declare function updateAgentRule(ruleId: string, updates: Partial<AgentRule> & Record<string, unknown>): Promise<AgentRule>;
|
|
254
|
+
declare function createAgentRule(rule: Partial<AgentRule> & Record<string, unknown>): Promise<AgentRule>;
|
|
255
|
+
declare function deleteAgentRule(ruleId: string): Promise<{
|
|
256
|
+
deleted: boolean;
|
|
257
|
+
}>;
|
|
258
|
+
declare function executeAgentRule(ruleId: string, input: Record<string, unknown>): Promise<unknown>;
|
|
259
|
+
declare function createAgentConfig(input: Partial<AgentConfigLike>): Promise<AgentConfigLike>;
|
|
260
|
+
declare function updateAgentConfig(agentId: string, updates: Partial<AgentConfigLike>): Promise<AgentConfigLike>;
|
|
261
|
+
declare function deleteAgentConfig(agentId: string): Promise<{
|
|
262
|
+
deleted: boolean;
|
|
263
|
+
}>;
|
|
264
|
+
declare function createAgentPrompt(input: Omit<AgentPrompt, 'promptId' | 'version' | 'createdAt'>): Promise<AgentPrompt>;
|
|
265
|
+
declare function updateAgentPrompt(promptId: string, updates: Partial<AgentPrompt>): Promise<AgentPrompt>;
|
|
266
|
+
declare function deleteAgentPrompt(promptId: string): Promise<{
|
|
267
|
+
deleted: boolean;
|
|
268
|
+
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Patch an existing tool definition. The Rust handler takes the id in
|
|
271
|
+
* the BODY (`toolId`) rather than the URL, and accepts a narrower set
|
|
272
|
+
* of fields than create: `{toolId, name?, description?, parameters?,
|
|
273
|
+
* implementationKey?}`. `implementationKey` is a JSON string that wraps
|
|
274
|
+
* `handlerConfig` — the page wrapper produces that shape before calling.
|
|
275
|
+
*/
|
|
276
|
+
declare function updateAgentToolDefinition(agentToolId: string, updates: {
|
|
277
|
+
name?: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
parameters?: Record<string, unknown>;
|
|
280
|
+
implementationKey?: string;
|
|
281
|
+
}): Promise<AgentTool>;
|
|
282
|
+
declare function deleteAgentToolDefinition(agentToolId: string): Promise<{
|
|
283
|
+
deleted: boolean;
|
|
284
|
+
}>;
|
|
285
|
+
type WorkflowRunListParams = {
|
|
286
|
+
workflowId?: string;
|
|
287
|
+
status?: string;
|
|
288
|
+
limit?: number;
|
|
289
|
+
offset?: number;
|
|
290
|
+
};
|
|
291
|
+
declare function listWorkflowRuns(params?: WorkflowRunListParams): Promise<{
|
|
292
|
+
items: WorkflowRun[];
|
|
293
|
+
total: number;
|
|
294
|
+
}>;
|
|
295
|
+
declare function getWorkflowRunById(runId: string): Promise<WorkflowRun>;
|
|
296
|
+
declare function cancelWorkflowRun(runId: string): Promise<WorkflowRun>;
|
|
297
|
+
declare function replayWorkflowRun(workflowId: string, runId: string, overrides?: Record<string, VariableValue>): Promise<WorkflowRun>;
|
|
298
|
+
type NodeMetrics = {
|
|
299
|
+
tokensIn?: number;
|
|
300
|
+
tokensOut?: number;
|
|
301
|
+
costUsd?: number;
|
|
302
|
+
provider?: string;
|
|
303
|
+
model?: string;
|
|
304
|
+
};
|
|
305
|
+
type RunTimelineEntry = {
|
|
306
|
+
nodeId: string;
|
|
307
|
+
nodeType: string;
|
|
308
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
|
|
309
|
+
startedAt: string | null;
|
|
310
|
+
completedAt: string | null;
|
|
311
|
+
durationMs: number | null;
|
|
312
|
+
inputs?: Record<string, unknown>;
|
|
313
|
+
outputs?: Record<string, unknown>;
|
|
314
|
+
error?: string;
|
|
315
|
+
metrics?: NodeMetrics;
|
|
316
|
+
};
|
|
317
|
+
declare function getRunTimeline(workflowId: string, runId: string): Promise<RunTimelineEntry[]>;
|
|
318
|
+
type AnalyticsSummary = {
|
|
319
|
+
totalRuns: number;
|
|
320
|
+
runsByStatus: Record<string, number>;
|
|
321
|
+
avgDurationMs: number;
|
|
322
|
+
successRate: number;
|
|
323
|
+
perWorkflow: Array<{
|
|
324
|
+
workflowId: string;
|
|
325
|
+
name: string;
|
|
326
|
+
runs: number;
|
|
327
|
+
successRate: number;
|
|
328
|
+
}>;
|
|
329
|
+
series?: Array<{
|
|
330
|
+
date: string;
|
|
331
|
+
runs: number;
|
|
332
|
+
successes: number;
|
|
333
|
+
failures: number;
|
|
334
|
+
}>;
|
|
335
|
+
};
|
|
336
|
+
declare function getAnalyticsSummary(params?: {
|
|
337
|
+
from?: string;
|
|
338
|
+
to?: string;
|
|
339
|
+
}): Promise<AnalyticsSummary>;
|
|
340
|
+
type PresignUploadInput = {
|
|
341
|
+
fileName: string;
|
|
342
|
+
contentType: string;
|
|
343
|
+
fileSize?: number;
|
|
344
|
+
folder?: string;
|
|
345
|
+
};
|
|
346
|
+
type PresignedUpload = {
|
|
347
|
+
uploadUrl: string;
|
|
348
|
+
downloadUrl: string;
|
|
349
|
+
objectKey: string;
|
|
350
|
+
expiresAt: string;
|
|
351
|
+
};
|
|
352
|
+
declare function presignUpload(input: PresignUploadInput): Promise<PresignedUpload>;
|
|
353
|
+
declare function getUploadDownloadUrl(objectKey: string): Promise<{
|
|
354
|
+
downloadUrl: string;
|
|
355
|
+
}>;
|
|
356
|
+
declare function deleteUpload(objectKey: string): Promise<{
|
|
357
|
+
deleted: boolean;
|
|
358
|
+
}>;
|
|
359
|
+
type RunEvent = {
|
|
360
|
+
type: 'run-started' | 'node-started' | 'node-completed' | 'node-failed' | 'run-completed' | 'run-failed' | 'log';
|
|
361
|
+
runId: string;
|
|
362
|
+
nodeId?: string;
|
|
363
|
+
data?: Record<string, unknown>;
|
|
364
|
+
timestamp: string;
|
|
365
|
+
};
|
|
366
|
+
type PublicSampleWorkflow = {
|
|
367
|
+
slug: string;
|
|
368
|
+
name: string | null;
|
|
369
|
+
description: string | null;
|
|
370
|
+
graph: WorkflowGraph;
|
|
371
|
+
version: number | null;
|
|
372
|
+
publishedAt: string | null;
|
|
373
|
+
};
|
|
374
|
+
declare function getPublicSampleWorkflow(slug: string): Promise<PublicSampleWorkflow>;
|
|
375
|
+
declare function subscribeToRunEvents(runId: string, onEvent: (event: RunEvent) => void, onError?: (error: Event) => void): () => void;
|
|
376
|
+
declare function getAgentConfigsWithPrompts(): Promise<AgentWithPrompts[]>;
|
|
377
|
+
declare function getDatasources(): Promise<DataSource[]>;
|
|
378
|
+
declare function createDatasource(data: DatasourceFormData): Promise<DataSource>;
|
|
379
|
+
declare function getDatasourceTables(datasourceId: string): Promise<string[]>;
|
|
380
|
+
declare function getDatasourceSchema(datasourceId: string, table: string): Promise<Array<{
|
|
381
|
+
name: string;
|
|
382
|
+
type: string;
|
|
383
|
+
nullable?: boolean;
|
|
384
|
+
}>>;
|
|
385
|
+
|
|
386
|
+
export { getDatasourceSchema as $, type AnalyticsSummary as A, createWorkflow as B, createWorkflowFromTemplate as C, type DatasourceFormData as D, deleteAgentConfig as E, deleteAgentPrompt as F, deleteAgentRule as G, deleteAgentTool as H, deleteAgentToolDefinition as I, deleteModelProviderConnection as J, deleteUpload as K, deleteWorkflow as L, type ModelProviderConnection as M, type NodeMetrics as N, executeAgentRule as O, type PresignUploadInput as P, executeWorkflow as Q, type RunTimelineEntry as R, getAgentConfigsWithPrompts as S, getAgentModels as T, getAgentPrompts as U, getAgentRules as V, type WorkflowRunListParams as W, getAgentToolDefinitions as X, getAgentTools as Y, getAnalyticsSummary as Z, getCurrentAccessToken as _, DIALECT_CATEGORIES as a, getDatasourceTables as a0, getDatasources as a1, getPublicSampleWorkflow as a2, getRunTimeline as a3, getUploadDownloadUrl as a4, getWorkflowById as a5, getWorkflowRunById as a6, getWorkflowRuns as a7, getWorkflows as a8, listModelProviderCatalog as a9, listModelProviderConnections as aa, listWorkflowRuns as ab, listWorkflowTemplates as ac, presignUpload as ad, publishWorkflow as ae, replayWorkflowRun as af, saveWorkflowDraft as ag, setAccessTokenProvider as ah, setAuthenticatedFetch as ai, subscribeToRunEvents as aj, updateAgentConfig as ak, updateAgentPrompt as al, updateAgentRule as am, updateAgentTool as an, updateAgentToolDefinition as ao, updateModelProviderConnection as ap, updateWorkflowSettings as aq, 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 ModelProviderCatalogEntry as j, type NodeValidationIssue as k, type PresignedUpload as l, type PublicSampleWorkflow as m, type RunEvent as n, type WorkflowTemplateSummary as o, aiGenerateWorkflow as p, aiValidateWorkflow as q, buildAuthenticatedApiUrl as r, cancelWorkflowRun as s, createAgentConfig as t, createAgentPrompt as u, createAgentRule as v, createAgentTool as w, createAgentToolDefinition as x, createDatasource as y, createModelProviderConnection as z };
|