@w6w/embed 0.2.1 → 0.2.19
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/README.md +22 -5
- package/dist/ConfirmModal-Pv2-A_3U.js +186 -0
- package/dist/ConfirmModal-Pv2-A_3U.js.map +1 -0
- package/dist/{CreateFunctionModal-DRsFx-FB.js → CreateFunctionModal-DScxp_LN.js} +25 -25
- package/dist/{CreateFunctionModal-DRsFx-FB.js.map → CreateFunctionModal-DScxp_LN.js.map} +1 -1
- package/dist/{DocumentFormModal-BExK1V-B.js → DocumentFormModal-Br4s8wmi.js} +5 -5
- package/dist/{DocumentFormModal-BExK1V-B.js.map → DocumentFormModal-Br4s8wmi.js.map} +1 -1
- package/dist/ImportSpecModal-Cpzp8ndt.js +251 -0
- package/dist/ImportSpecModal-Cpzp8ndt.js.map +1 -0
- package/dist/ModelRoutesManager-1Ac5wcas.js +345 -0
- package/dist/ModelRoutesManager-1Ac5wcas.js.map +1 -0
- package/dist/WorkflowEditor-CmhXHRxi.js +1109 -0
- package/dist/WorkflowEditor-CmhXHRxi.js.map +1 -0
- package/dist/apps-ItBvnWX3.js +92 -0
- package/dist/apps-ItBvnWX3.js.map +1 -0
- package/dist/{callables-3mFrMVG_.js → callables-tOlflvbl.js} +11 -11
- package/dist/{callables-3mFrMVG_.js.map → callables-tOlflvbl.js.map} +1 -1
- package/dist/chrome/ConfirmModal.d.ts +4 -1
- package/dist/chrome/DangerZone.d.ts +4 -3
- package/dist/chrome/ExecutionProfileHeader.d.ts +3 -3
- package/dist/chrome/JsonToggle.d.ts +29 -20
- package/dist/chrome/Modal.d.ts +3 -1
- package/dist/chrome/RightRail.d.ts +6 -1
- package/dist/chrome/VersionHistoryModal.d.ts +2 -0
- package/dist/chrome/index.d.ts +1 -0
- package/dist/chrome/workspace.d.ts +36 -1
- package/dist/coerce-input-DFJ4n_wc.js +150 -0
- package/dist/coerce-input-DFJ4n_wc.js.map +1 -0
- package/dist/connections-CzsCyIxY.js +119 -0
- package/dist/connections-CzsCyIxY.js.map +1 -0
- package/dist/credentials-Cn92LGhJ.js +171 -0
- package/dist/credentials-Cn92LGhJ.js.map +1 -0
- package/dist/data-stores-UeQvwVCa.js +170 -0
- package/dist/data-stores-UeQvwVCa.js.map +1 -0
- package/dist/document-sources-DNmBojx6.js +169 -0
- package/dist/document-sources-DNmBojx6.js.map +1 -0
- package/dist/draft/use-workflow-draft.d.ts +2 -0
- package/dist/draft.mjs +2 -2
- package/dist/editor/BindingBanner.d.ts +13 -0
- package/dist/editor/CallableEditorFrame.d.ts +7 -0
- package/dist/editor/EndpointCards.d.ts +4 -1
- package/dist/editor/PublishControl.d.ts +19 -0
- package/dist/editor/PublishTooltip.d.ts +7 -0
- package/dist/editor/SetupIncompleteBanner.d.ts +12 -0
- package/dist/editor/StartingStateModal.d.ts +14 -0
- package/dist/editor/TargetSelector.d.ts +15 -0
- package/dist/editor/TargetSelector.types.d.ts +2 -0
- package/dist/editor/WorkflowSettingsModal.d.ts +6 -1
- package/dist/editor/WorkflowVariablesEditor.d.ts +6 -0
- package/dist/editor/definition.d.ts +6 -0
- package/dist/editor/json-apply.d.ts +29 -0
- package/dist/editor/step-problems-feed.d.ts +5 -0
- package/dist/editor/types.d.ts +2 -2
- package/dist/editor-apps-DkkC7wOQ.js +152 -0
- package/dist/editor-apps-DkkC7wOQ.js.map +1 -0
- package/dist/editor-tools-BR27RGto.js +1683 -0
- package/dist/editor-tools-BR27RGto.js.map +1 -0
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +855 -650
- package/dist/editors.mjs.map +1 -1
- package/dist/{endpoints-B2ynbZo-.js → endpoints-DSRo1Lc5.js} +113 -107
- package/dist/endpoints-DSRo1Lc5.js.map +1 -0
- package/dist/fields-DvS8XZFc.js +21 -0
- package/dist/fields-DvS8XZFc.js.map +1 -0
- package/dist/forms/ModelBudgetsManager.d.ts +9 -0
- package/dist/forms/ModelRoutesManager.d.ts +14 -0
- package/dist/forms.d.ts +4 -0
- package/dist/forms.mjs +611 -212
- package/dist/forms.mjs.map +1 -1
- package/dist/{rail-settings-XYGToh00.js → import-bindings-EUtxZ9Ti.js} +90 -24
- package/dist/import-bindings-EUtxZ9Ti.js.map +1 -0
- package/dist/index.mjs +154 -117
- package/dist/index.mjs.map +1 -1
- package/dist/lib/binding-problems.d.ts +42 -0
- package/dist/lib/code-rail.d.ts +4 -2
- package/dist/lib/history-query.d.ts +45 -0
- package/dist/lib/import-bindings.d.ts +89 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/invoke-error.d.ts +1 -0
- package/dist/lib/rail-settings.d.ts +1 -1
- package/dist/lib/sdk-snippets.d.ts +1 -1
- package/dist/lib/setup-incomplete.d.ts +22 -0
- package/dist/lib/starting-data.d.ts +31 -0
- package/dist/lib/state-panel.d.ts +29 -0
- package/dist/lib/target-fields.d.ts +11 -15
- package/dist/lib/trigger-preview.d.ts +1 -0
- package/dist/lib/workflow-live-run.d.ts +93 -8
- package/dist/lib/workflow-nodes.d.ts +5 -0
- package/dist/lib/workflow-validity.d.ts +65 -16
- package/dist/lib/workflow-variables.d.ts +1 -1
- package/dist/lib/workflow-version.d.ts +2 -0
- package/dist/lib.mjs +86 -69
- package/dist/lists/ConnectionDependents.d.ts +31 -0
- package/dist/lists/ConnectionDetail.d.ts +4 -1
- package/dist/lists/ConnectionList.d.ts +4 -1
- package/dist/lists/CredentialDetail.d.ts +15 -0
- package/dist/lists/CredentialList.d.ts +14 -0
- package/dist/lists/DataStoreList.d.ts +17 -0
- package/dist/lists/DataStoreView.d.ts +19 -0
- package/dist/lists/Logs.d.ts +19 -0
- package/dist/lists/ModelCatalog.d.ts +12 -0
- package/dist/lists/ModelUsage.d.ts +12 -0
- package/dist/lists.d.ts +14 -0
- package/dist/lists.mjs +1766 -609
- package/dist/lists.mjs.map +1 -1
- package/dist/models-bAayQPJ_.js +270 -0
- package/dist/models-bAayQPJ_.js.map +1 -0
- package/dist/{project-context-BiCjv_E3.js → project-context-Tvp-La7A.js} +3 -3
- package/dist/{project-context-BiCjv_E3.js.map → project-context-Tvp-La7A.js.map} +1 -1
- package/dist/rail/ConnectionsTool.d.ts +2 -0
- package/dist/rail/HistoryTool.d.ts +2 -0
- package/dist/rail/StartingStateTool.d.ts +2 -0
- package/dist/rail/settings-sections.d.ts +4 -1
- package/dist/rail.mjs +4 -4
- package/dist/repos/agents-studio-agents.d.ts +52 -0
- package/dist/repos/agents-studio-assets.d.ts +68 -0
- package/dist/repos/connections.d.ts +30 -12
- package/dist/repos/constants.d.ts +12 -0
- package/dist/repos/credentials.d.ts +83 -0
- package/dist/repos/data-stores.d.ts +84 -0
- package/dist/repos/endpoints.d.ts +9 -3
- package/dist/repos/fields.d.ts +34 -0
- package/dist/repos/functions.d.ts +7 -5
- package/dist/repos/history.d.ts +9 -0
- package/dist/repos/index.d.ts +7 -0
- package/dist/repos/models.d.ts +289 -0
- package/dist/repos/spec-export.d.ts +3 -3
- package/dist/repos/spec-import.d.ts +30 -1
- package/dist/repos/step-tests.d.ts +2 -0
- package/dist/repos/webhook-listen.d.ts +35 -0
- package/dist/repos/workflows.d.ts +105 -2
- package/dist/repos.mjs +655 -176
- package/dist/repos.mjs.map +1 -1
- package/dist/setup-incomplete-BHs3Lpfy.js +199 -0
- package/dist/setup-incomplete-BHs3Lpfy.js.map +1 -0
- package/dist/{slug-C4ktDPdy.js → slug-BVdgiP_L.js} +64 -60
- package/dist/slug-BVdgiP_L.js.map +1 -0
- package/dist/{spec-export-Cf3VQSQS.js → spec-export-DGy5ijps.js} +73 -60
- package/dist/spec-export-DGy5ijps.js.map +1 -0
- package/dist/spec-import-SWOonsNr.js +116 -0
- package/dist/spec-import-SWOonsNr.js.map +1 -0
- package/dist/{step-tests-CivICmTq.js → step-tests-B4E4W3ly.js} +8 -7
- package/dist/step-tests-B4E4W3ly.js.map +1 -0
- package/dist/theme-context-E2ZhlXDX.js +6 -0
- package/dist/theme-context-E2ZhlXDX.js.map +1 -0
- package/dist/theme-context.d.ts +2 -0
- package/dist/{use-callable-draft-zHLpcr-b.js → use-callable-draft-DCauHt5o.js} +23 -23
- package/dist/{use-callable-draft-zHLpcr-b.js.map → use-callable-draft-DCauHt5o.js.map} +1 -1
- package/dist/use-workflow-draft-l3P5KZzw.js +338 -0
- package/dist/use-workflow-draft-l3P5KZzw.js.map +1 -0
- package/dist/{workflow-blank-DyL3_RUA.js → workflow-blank-DFpGObrn.js} +6 -6
- package/dist/{workflow-blank-DyL3_RUA.js.map → workflow-blank-DFpGObrn.js.map} +1 -1
- package/dist/workflows-BZN4Hyz1.js +623 -0
- package/dist/workflows-BZN4Hyz1.js.map +1 -0
- package/package.json +3 -2
- package/src/styles.css +155 -7
- package/dist/ConfirmModal-RLbZT5_k.js +0 -181
- package/dist/ConfirmModal-RLbZT5_k.js.map +0 -1
- package/dist/ImportSpecModal-BDQIf6rg.js +0 -136
- package/dist/ImportSpecModal-BDQIf6rg.js.map +0 -1
- package/dist/WorkflowEditor-DlbVv6Fs.js +0 -854
- package/dist/WorkflowEditor-DlbVv6Fs.js.map +0 -1
- package/dist/apps-1FNUwbGv.js +0 -77
- package/dist/apps-1FNUwbGv.js.map +0 -1
- package/dist/coerce-input-BicYr7nc.js +0 -139
- package/dist/coerce-input-BicYr7nc.js.map +0 -1
- package/dist/connections-CjjYeRqb.js +0 -78
- package/dist/connections-CjjYeRqb.js.map +0 -1
- package/dist/document-sources-C0grrtdq.js +0 -86
- package/dist/document-sources-C0grrtdq.js.map +0 -1
- package/dist/editor-apps-BdenSV1o.js +0 -95
- package/dist/editor-apps-BdenSV1o.js.map +0 -1
- package/dist/editor-tools-RxmY5iyi.js +0 -1279
- package/dist/editor-tools-RxmY5iyi.js.map +0 -1
- package/dist/endpoints-B2ynbZo-.js.map +0 -1
- package/dist/rail-settings-XYGToh00.js.map +0 -1
- package/dist/slug-C4ktDPdy.js.map +0 -1
- package/dist/spec-export-Cf3VQSQS.js.map +0 -1
- package/dist/spec-import-CjmxyZDR.js +0 -465
- package/dist/spec-import-CjmxyZDR.js.map +0 -1
- package/dist/step-tests-CivICmTq.js.map +0 -1
- package/dist/trigger-preview-VPkrryDl.js +0 -120
- package/dist/trigger-preview-VPkrryDl.js.map +0 -1
- package/dist/use-workflow-draft-DzAyUeA6.js +0 -316
- package/dist/use-workflow-draft-DzAyUeA6.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { W6WClient } from '@w6w/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* "Listen for test event" on a `@w6w/webhook` subscription — `/subscriptions/:id/listen` over
|
|
4
|
+
* `client.request()`. Not in the SDK's stable contract (Studio reaches it the same way, its
|
|
5
|
+
* `repos/subscriptions.ts`), and `createW6WUiAdapter` carries none of it, so without these the
|
|
6
|
+
* embedded editor's webhook Test tab fell back to the paste-a-payload form.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Structural mirror of ui's `WebhookListenSession` (this barrel may not import `@w6w/ui`); the
|
|
10
|
+
* UiBridge assignment typechecks against W6WApi structurally.
|
|
11
|
+
*/
|
|
12
|
+
export interface WebhookListenSession {
|
|
13
|
+
id: string;
|
|
14
|
+
subscriptionId: string;
|
|
15
|
+
nodeId: string | null;
|
|
16
|
+
expiresAt: string;
|
|
17
|
+
status: "waiting" | "captured" | "expired";
|
|
18
|
+
request?: {
|
|
19
|
+
method: string;
|
|
20
|
+
path: string;
|
|
21
|
+
query: Record<string, string>;
|
|
22
|
+
headers: Record<string, string>;
|
|
23
|
+
body: unknown;
|
|
24
|
+
};
|
|
25
|
+
receivedAt?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function startWebhookListen(client: W6WClient, subscriptionId: string): Promise<{
|
|
28
|
+
session: WebhookListenSession;
|
|
29
|
+
webhookUrl: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function pollWebhookListen(client: W6WClient, subscriptionId: string, sessionId: string, opts?: {
|
|
32
|
+
waitSeconds?: number;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
}): Promise<WebhookListenSession>;
|
|
35
|
+
export declare function stopWebhookListen(client: W6WClient, subscriptionId: string, sessionId: string): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { StateLogRow } from '@w6w/expr';
|
|
3
|
+
import { RunStatus, W6WClient, WorkflowRunResult } from '@w6w/sdk';
|
|
3
4
|
import { RunState } from '@w6w/sdk/console';
|
|
4
5
|
export type { RunState, RunSummary } from '@w6w/sdk/console';
|
|
5
6
|
export type { WorkflowStatus, WorkflowSummary } from '@w6w/sdk';
|
|
@@ -51,7 +52,7 @@ export declare function useRunsQuery(workflowId: string): import('@tanstack/reac
|
|
|
51
52
|
* resolve in a real run. Omitted, that node outputs `{}` and every reference to
|
|
52
53
|
* a trigger field resolves to the empty string — the failure mode filed as
|
|
53
54
|
* `.ai/projects/backlog/26-07-29-01-trigger-run-payload.md`, where a step tests
|
|
54
|
-
* green and then does nothing in production. `variables` seeds `
|
|
55
|
+
* green and then does nothing in production. `variables` seeds `var.*` and
|
|
55
56
|
* reaches the trigger node not at all.
|
|
56
57
|
*
|
|
57
58
|
* Goes through the typed `client.workflows.run()` with
|
|
@@ -95,6 +96,87 @@ export declare function runWorkflowSync(client: W6WClient, id: string, variables
|
|
|
95
96
|
export declare function startWorkflowRun(client: W6WClient, id: string, variables: Record<string, unknown>, input?: Record<string, unknown>): Promise<{
|
|
96
97
|
runId: string;
|
|
97
98
|
}>;
|
|
99
|
+
/** What {@link startRunFromNode} sends: the paused nodes to stop before, and the start seed. */
|
|
100
|
+
export interface RunFromNodeBody {
|
|
101
|
+
/** Node ids the run stops BEFORE (they do not execute) — the editor's paused nodes. */
|
|
102
|
+
stopAt: string[];
|
|
103
|
+
/** Upstream outputs keyed by node id, seeded from saved step tests / the last run. */
|
|
104
|
+
nodes?: Record<string, {
|
|
105
|
+
output?: unknown;
|
|
106
|
+
meta?: unknown;
|
|
107
|
+
}>;
|
|
108
|
+
/** The trigger's filled values, when the run starts at a trigger node. */
|
|
109
|
+
input?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Run from a node — `POST /workflows/:id/nodes/:nodeId/run` with `continue: true`: a REAL run
|
|
113
|
+
* that executes `nodeId`, continues through every node downstream of it the way a run follows
|
|
114
|
+
* its edges, and stops before each `stopAt` node. Answers `202 { runId }` at once, like
|
|
115
|
+
* {@link startWorkflowRun}, so the caller polls it live ({@link useLiveRunQuery}). The run
|
|
116
|
+
* executes the STORED definition, so a caller flushes its draft first.
|
|
117
|
+
*
|
|
118
|
+
* The plain `client.request()` escape hatch, not a typed `@w6w/sdk` method: the route is a
|
|
119
|
+
* console authoring aid, and a typed method would pull `packages/wrappers` (every language, in
|
|
120
|
+
* lockstep) into an editor-only change.
|
|
121
|
+
*/
|
|
122
|
+
export declare function startRunFromNode(client: W6WClient, id: string, nodeId: string, body: RunFromNodeBody): Promise<{
|
|
123
|
+
runId: string;
|
|
124
|
+
}>;
|
|
125
|
+
/** A node output's structural shape, as the server records it (structural mirror of `@w6w/ui`'s). */
|
|
126
|
+
export type NodeSampleShape = {
|
|
127
|
+
type: "string" | "number" | "boolean" | "null" | "unknown";
|
|
128
|
+
} | {
|
|
129
|
+
type: "object";
|
|
130
|
+
fields: Record<string, NodeSampleShape>;
|
|
131
|
+
} | {
|
|
132
|
+
type: "array";
|
|
133
|
+
items?: NodeSampleShape;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* One persisted node sample — structural mirror of `@w6w/ui`'s `NodeSample` (this barrel may not
|
|
137
|
+
* import `@w6w/ui`; the facade/UiBridge assignment typechecks against `W6WApi` structurally).
|
|
138
|
+
*/
|
|
139
|
+
export interface NodeSample {
|
|
140
|
+
nodeId: string;
|
|
141
|
+
shape: NodeSampleShape;
|
|
142
|
+
sample?: unknown;
|
|
143
|
+
sampleOmitted?: true;
|
|
144
|
+
source: "step_test" | "node_run" | "run";
|
|
145
|
+
runId?: string;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The workflow's persisted node samples — `GET /workflows/:id/node-samples` → `{ nodeSamples }`:
|
|
150
|
+
* each node's last output shape (and value, when kept), written server-side on every Test, node
|
|
151
|
+
* run and run. Backs `W6WApi.loadNodeSamples`, so the editor's picker keeps upstream keys across a
|
|
152
|
+
* reload. The plain `client.request()` escape hatch, for the same reason as {@link startRunFromNode}.
|
|
153
|
+
*/
|
|
154
|
+
export declare function listNodeSamples(client: W6WClient, id: string): Promise<NodeSample[]>;
|
|
155
|
+
/** One remembered node test input — structural mirror of `@w6w/ui`'s `NodeTestInput`. */
|
|
156
|
+
export interface NodeTestInput {
|
|
157
|
+
nodeId: string;
|
|
158
|
+
input: Record<string, unknown>;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The test input each node of the workflow last ran with in the editor —
|
|
163
|
+
* `GET /workflows/:id/test-inputs` → `{ testInputs }` (`node_test_inputs`, 0160). Backs
|
|
164
|
+
* `W6WApi.loadTestInputs`, so the Run node modal, the Test tabs and the header Run reopen
|
|
165
|
+
* prefilled. The plain `client.request()` escape hatch, for the same reason as {@link startRunFromNode}.
|
|
166
|
+
*/
|
|
167
|
+
export declare function listTestInputs(client: W6WClient, id: string): Promise<NodeTestInput[]>;
|
|
168
|
+
/**
|
|
169
|
+
* Remember a node's test input (`{}` clears it) — `PUT /workflows/:id/nodes/:nodeId/test-input`.
|
|
170
|
+
* Backs `W6WApi.saveTestInput`; the server drops sealed envelopes before the write.
|
|
171
|
+
*/
|
|
172
|
+
export declare function saveTestInput(client: W6WClient, id: string, nodeId: string, input: Record<string, unknown>): Promise<void>;
|
|
173
|
+
export declare function useRunFromNodeMutation(): UseMutationResult<{
|
|
174
|
+
runId: string;
|
|
175
|
+
}, Error, {
|
|
176
|
+
id: string;
|
|
177
|
+
nodeId: string;
|
|
178
|
+
body: RunFromNodeBody;
|
|
179
|
+
}, unknown>;
|
|
98
180
|
export declare function useStartRunMutation(): UseMutationResult<{
|
|
99
181
|
runId: string;
|
|
100
182
|
}, Error, {
|
|
@@ -136,3 +218,24 @@ export declare const runStateKey: (runId: string) => readonly ["run", string];
|
|
|
136
218
|
* run started yet, or the page navigated to a different workflow).
|
|
137
219
|
*/
|
|
138
220
|
export declare function useLiveRunQuery(runId: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<RunState>, Error>;
|
|
221
|
+
/** `GET /runs/:id/state-writes` — the run's state-write log (plan §2.4). */
|
|
222
|
+
export interface RunStateWrites {
|
|
223
|
+
writes: StateLogRow[];
|
|
224
|
+
truncated: boolean;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* One run's state-write log, read for the run log's State block ("state after this
|
|
228
|
+
* step"). The plain `client.request()` escape hatch, for the same reason as
|
|
229
|
+
* {@link listNodeSamples}: the route has no typed `@w6w/sdk` method.
|
|
230
|
+
*/
|
|
231
|
+
export declare function getRunStateWrites(client: W6WClient, runId: string): Promise<RunStateWrites>;
|
|
232
|
+
/** Query key for one run's state-write log. The last segment flips from `"live"` to
|
|
233
|
+
* `"final"` when the run turns terminal, so the final log is fetched exactly once more. */
|
|
234
|
+
export declare function runStateWritesKey(runId: string, status: RunStatus | undefined): readonly ["run", string, "state-writes", "live" | "final"];
|
|
235
|
+
/**
|
|
236
|
+
* Poll one run's state-write log beside {@link useLiveRunQuery}: the same 500ms cadence
|
|
237
|
+
* while the run (as `status`, the live run query's answer) is in flight, no polling once
|
|
238
|
+
* terminal. `retry: false` — a failed read only leaves the run log without its State
|
|
239
|
+
* block; it never touches the run poll.
|
|
240
|
+
*/
|
|
241
|
+
export declare function useRunStateWritesQuery(runId: string | null, status: RunStatus | undefined): import('@tanstack/react-query').UseQueryResult<NoInfer<RunStateWrites>, Error>;
|