@w6w/embed 0.2.33 → 0.2.34
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/{DocumentFormModal-Cw85R4wk.js → DocumentFormModal-B3OkvI5v.js} +2 -2
- package/dist/{DocumentFormModal-Cw85R4wk.js.map → DocumentFormModal-B3OkvI5v.js.map} +1 -1
- package/dist/{ImportSpecModal-fU5RsVTa.js → ImportSpecModal-SQvTwtcX.js} +2 -2
- package/dist/{ImportSpecModal-fU5RsVTa.js.map → ImportSpecModal-SQvTwtcX.js.map} +1 -1
- package/dist/WorkflowEditor-D2EfEP-U.js +1201 -0
- package/dist/WorkflowEditor-D2EfEP-U.js.map +1 -0
- package/dist/apps-CFWdgGst.js +106 -0
- package/dist/apps-CFWdgGst.js.map +1 -0
- package/dist/chrome/HistoryView.d.ts +3 -0
- package/dist/editor-apps-ShwCmvLY.js +178 -0
- package/dist/editor-apps-ShwCmvLY.js.map +1 -0
- package/dist/{editor-tools-Dn7TgCP4.js → editor-tools-rY9nddqr.js} +49 -49
- package/dist/{editor-tools-Dn7TgCP4.js.map → editor-tools-rY9nddqr.js.map} +1 -1
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +8 -8
- package/dist/index.mjs +4 -4
- package/dist/lib/history-query.d.ts +22 -1
- package/dist/lib/run-log-nodes.d.ts +43 -0
- package/dist/lists.mjs +6 -6
- package/dist/rail.mjs +1 -1
- package/dist/repos/history.d.ts +5 -1
- package/dist/repos.mjs +304 -300
- package/dist/{spec-import-CGPqUUjN.js → spec-import-CPbDnnuv.js} +2 -2
- package/dist/{spec-import-CGPqUUjN.js.map → spec-import-CPbDnnuv.js.map} +1 -1
- package/dist/{workflows-Dz8LMjnt.js → workflows-RhR8kwt7.js} +255 -214
- package/dist/workflows-RhR8kwt7.js.map +1 -0
- package/package.json +2 -2
- package/dist/WorkflowEditor-C7oudiIb.js +0 -1169
- package/dist/WorkflowEditor-C7oudiIb.js.map +0 -1
- package/dist/apps-FMcQfyL2.js +0 -92
- package/dist/apps-FMcQfyL2.js.map +0 -1
- package/dist/editor-apps-HEOclsxL.js +0 -152
- package/dist/editor-apps-HEOclsxL.js.map +0 -1
- package/dist/workflows-Dz8LMjnt.js.map +0 -1
package/dist/editor.mjs
CHANGED
package/dist/editors.mjs
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
var tn = Object.defineProperty;
|
|
3
3
|
var an = (t, i, a) => i in t ? tn(t, i, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[i] = a;
|
|
4
4
|
var Se = (t, i, a) => an(t, typeof i != "symbol" ? i + "" : i, a);
|
|
5
|
-
import { H as sn, E as on, B as rn, a as Re, J as xe, b as De } from "./WorkflowEditor-
|
|
6
|
-
import { W as Wt } from "./WorkflowEditor-
|
|
5
|
+
import { H as sn, E as on, B as rn, a as Re, J as xe, b as De } from "./WorkflowEditor-D2EfEP-U.js";
|
|
6
|
+
import { W as Wt } from "./WorkflowEditor-D2EfEP-U.js";
|
|
7
7
|
import { jsx as e, jsxs as o, Fragment as D } from "react/jsx-runtime";
|
|
8
8
|
import { EditButton as ln, DeleteButton as dn, Copyable as Ke, CodeBlock as cn, IconButton as pe, AppIcon as un, ExpressionInput as hn, StepBuilderModal as mn, ExpressionOptionsProvider as Te } from "@w6w/ui";
|
|
9
9
|
import { useState as g, Component as fn, useRef as _, useEffect as se, useMemo as L, useCallback as he } from "react";
|
|
10
10
|
import { b as pn, C as yn } from "./ConfirmModal-WqBfWftD.js";
|
|
11
|
-
import { D as vn } from "./DocumentFormModal-
|
|
11
|
+
import { D as vn } from "./DocumentFormModal-B3OkvI5v.js";
|
|
12
12
|
import { u as ke } from "./project-context-Tvp-La7A.js";
|
|
13
|
-
import { j as bn, i as gn, r as Oe, m as kn, o as wn } from "./spec-import-
|
|
13
|
+
import { j as bn, i as gn, r as Oe, m as kn, o as wn } from "./spec-import-CPbDnnuv.js";
|
|
14
14
|
import { ApiError as ye } from "@w6w/sdk";
|
|
15
|
-
import {
|
|
16
|
-
import { C as Sn, c as Ae } from "./editor-tools-
|
|
15
|
+
import { l as Nn, j as Cn } from "./apps-CFWdgGst.js";
|
|
16
|
+
import { C as Sn, c as Ae } from "./editor-tools-rY9nddqr.js";
|
|
17
17
|
import { a as En, b as In } from "./use-callable-draft-w4tDTYcb.js";
|
|
18
18
|
import { E as Fn, F as Pn } from "./CreateFunctionModal-glk2zg1r.js";
|
|
19
19
|
import { j as je } from "./callables-B49tS2vv.js";
|
|
@@ -21,11 +21,11 @@ import { t as Bn, a as Me, c as Je, I as Rn, b as xn, p as ve, f as Dn, u as Ee,
|
|
|
21
21
|
import { e as me } from "./import-bindings-EUtxZ9Ti.js";
|
|
22
22
|
import { w as On, b as An, u as jn, s as Ue, r as qe, x as Mn } from "./endpoints-zOuwci2U.js";
|
|
23
23
|
import { useQueryClient as we } from "@tanstack/react-query";
|
|
24
|
-
import { o as $e,
|
|
24
|
+
import { o as $e, a3 as Jn, a2 as Ln } from "./workflows-RhR8kwt7.js";
|
|
25
25
|
import { SECRET_MASK as Wn } from "@w6w/sdk/console";
|
|
26
26
|
import { f as He, d as Qn } from "./setup-incomplete-BHs3Lpfy.js";
|
|
27
27
|
import { n as _e, d as Un } from "./connections-CzsCyIxY.js";
|
|
28
|
-
import { u as qn } from "./editor-apps-
|
|
28
|
+
import { u as qn } from "./editor-apps-ShwCmvLY.js";
|
|
29
29
|
import { s as $n } from "./slug-BVdgiP_L.js";
|
|
30
30
|
function Hn(t) {
|
|
31
31
|
switch (t) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l, jsxs as N } from "react/jsx-runtime";
|
|
3
3
|
import { QueryClientProvider as O, QueryClient as G, useQuery as z } from "@tanstack/react-query";
|
|
4
|
-
import { W6WProvider as
|
|
4
|
+
import { W6WProvider as H, useW6WClient as P, useW6WSession as J, createW6WUiAdapter as V } from "@w6w/react";
|
|
5
5
|
import { W6WUIProvider as X } from "@w6w/ui";
|
|
6
6
|
import { useState as v, useRef as x, useEffect as j, useCallback as F, useMemo as g, useContext as Y, createContext as Z } from "react";
|
|
7
7
|
import { E as _ } from "./client-context-CX61Bgw-.js";
|
|
@@ -14,7 +14,7 @@ import { e as ie, c as ue } from "./data-stores-UeQvwVCa.js";
|
|
|
14
14
|
import { r as ae, a as le } from "./fields-CXHRR5eK.js";
|
|
15
15
|
import { l as ce } from "./models-CI0vLJ6o.js";
|
|
16
16
|
import { path as T } from "@w6w/sdk";
|
|
17
|
-
import {
|
|
17
|
+
import { u as de, v as fe, L as pe } from "./workflows-RhR8kwt7.js";
|
|
18
18
|
import { E as me } from "./theme-context-E2ZhlXDX.js";
|
|
19
19
|
class ye extends Error {
|
|
20
20
|
constructor(n) {
|
|
@@ -89,7 +89,7 @@ function Ee({
|
|
|
89
89
|
onAcquire: e,
|
|
90
90
|
children: i
|
|
91
91
|
}) {
|
|
92
|
-
const { status: a, error: t, refresh: r } =
|
|
92
|
+
const { status: a, error: t, refresh: r } = J();
|
|
93
93
|
j(() => {
|
|
94
94
|
s && r();
|
|
95
95
|
}, [s, r]), j(() => {
|
|
@@ -167,7 +167,7 @@ function Qe({
|
|
|
167
167
|
};
|
|
168
168
|
}, [d.queryClient]), B = F(() => k(null), []), h = d.identityKey, m = w.project, W = typeof m == "object" && m !== null && !Array.isArray(m) && m.use === "default", A = g(() => typeof m == "string" ? { project: m, status: "ready" } : W ? C && C.key === h ? C.state : { project: null, status: "resolving" } : { project: null, status: "ready" }, [m, W, C, h]);
|
|
169
169
|
return h === null ? i : /* @__PURE__ */ l(te, { registry: y, children: /* @__PURE__ */ l(O, { client: E, children: /* @__PURE__ */ N(
|
|
170
|
-
|
|
170
|
+
H,
|
|
171
171
|
{
|
|
172
172
|
baseUrl: w.apiOrigin,
|
|
173
173
|
getSession: U,
|
|
@@ -48,9 +48,14 @@ export interface HistoryFilters {
|
|
|
48
48
|
from: string;
|
|
49
49
|
to: string;
|
|
50
50
|
q: string;
|
|
51
|
+
/** Which trigger started the run: `""` (any), `entry:<trigger node id>` or `kind:<run trigger
|
|
52
|
+
* kind>` (`kind:manual` — a manual run records no entry node). See `triggerFilterQuery`. */
|
|
53
|
+
trigger: string;
|
|
51
54
|
offset: number;
|
|
52
55
|
}
|
|
53
56
|
export declare const EMPTY_HISTORY_FILTERS: HistoryFilters;
|
|
57
|
+
/** A `HistoryFilters.trigger` value → the wire's own `entry` / `trigger` params. */
|
|
58
|
+
export declare function triggerFilterQuery(trigger: string): Record<string, string>;
|
|
54
59
|
export declare const HISTORY_PAGE_SIZE = 25;
|
|
55
60
|
/**
|
|
56
61
|
* URL search string → `HistoryFilters`. An unrecognised `status`/`kind`, a
|
|
@@ -63,7 +68,7 @@ export declare function filtersFromSearch(search: string): HistoryFilters;
|
|
|
63
68
|
/**
|
|
64
69
|
* `HistoryFilters` → URL search string. `""` when every field is at its
|
|
65
70
|
* default, else a leading-`?` string with only the non-default fields, in
|
|
66
|
-
* the pinned key order `status,kind,from,to,q,offset` (so two renders of the
|
|
71
|
+
* the pinned key order `status,kind,from,to,q,trigger,offset` (so two renders of the
|
|
67
72
|
* same filters always produce byte-identical URLs — stable for bookmarking
|
|
68
73
|
* and for `filtersFromSearch` round-tripping).
|
|
69
74
|
*/
|
|
@@ -96,6 +101,7 @@ export declare const historyKeys: {
|
|
|
96
101
|
stats(scope: HistoryScope, f: HistoryFilters): readonly unknown[];
|
|
97
102
|
exists(callableId: string): readonly ["history", "exists", string];
|
|
98
103
|
detail(kind: ExecutionKind, id: string): readonly ["history", "detail", ExecutionKind, string];
|
|
104
|
+
triggers(workflowId: string): readonly ["history", "triggers", string];
|
|
99
105
|
};
|
|
100
106
|
/** `GET /history` — paged. */
|
|
101
107
|
export declare function getHistory(client: W6WClient, scope: HistoryScope, f: HistoryFilters, limit?: number): Promise<{
|
|
@@ -148,6 +154,21 @@ export interface StepNode {
|
|
|
148
154
|
* that cannot be read yields an empty map, and an app that cannot be read keeps its raw ids.
|
|
149
155
|
*/
|
|
150
156
|
export declare function describeWorkflowNodes(client: W6WClient, workflowId: string): Promise<Map<string, StepNode>>;
|
|
157
|
+
/** One trigger a workflow run can enter through: its node id and display name. */
|
|
158
|
+
export interface WorkflowTrigger {
|
|
159
|
+
nodeId: string;
|
|
160
|
+
label: string;
|
|
161
|
+
/** The node's app — `@w6w/trigger` for the Manual trigger. */
|
|
162
|
+
app: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The workflow's trigger nodes (built-in triggers and app trigger nodes), in definition order,
|
|
166
|
+
* each named the way the canvas card names it — `Cohost · Channel Changed`, `Manual trigger`.
|
|
167
|
+
* A label two triggers share gets its node id appended so the filter can tell them apart.
|
|
168
|
+
*/
|
|
169
|
+
export declare function workflowTriggers(nodes: Map<string, StepNode>): WorkflowTrigger[];
|
|
170
|
+
/** A run's trigger display name: its entry node's label, else the run kind (`Manual`). */
|
|
171
|
+
export declare function runTriggerLabel(summary: Pick<ExecutionSummary, "trigger" | "triggerNodeId">, triggers: WorkflowTrigger[]): string | null;
|
|
151
172
|
/**
|
|
152
173
|
* Expand a list row into its full detail. Function/Endpoint invocations are
|
|
153
174
|
* synchronous calls recorded one row per call (`.claude/docs/invocations.md`)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** `@w6w/ui`'s `ExecutionLogNode`, restated locally (src/lib imports no package — lib-graph). */
|
|
2
|
+
export interface RunLogNode {
|
|
3
|
+
app: string;
|
|
4
|
+
action: string;
|
|
5
|
+
trigger?: boolean;
|
|
6
|
+
appName?: string;
|
|
7
|
+
actionName?: string;
|
|
8
|
+
iconSvg?: string;
|
|
9
|
+
iconSvgDark?: string;
|
|
10
|
+
brandColor?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The slice of `@w6w/ui`'s `ExecutionLogStep` this module reads and writes. */
|
|
13
|
+
export interface RunLogRow {
|
|
14
|
+
id: string;
|
|
15
|
+
node?: RunLogNode;
|
|
16
|
+
iterations?: Array<{
|
|
17
|
+
steps: RunLogRow[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
/** The slice of `@w6w/ui`'s `AppSummary` this module reads. */
|
|
21
|
+
export interface RunLogApp {
|
|
22
|
+
displayName?: string;
|
|
23
|
+
iconSvg?: string;
|
|
24
|
+
iconSvgDark?: string;
|
|
25
|
+
brandColor?: string;
|
|
26
|
+
}
|
|
27
|
+
/** The slice of a definition node this module reads. */
|
|
28
|
+
export interface RunLogDefinitionNode {
|
|
29
|
+
id?: unknown;
|
|
30
|
+
uses?: {
|
|
31
|
+
app?: unknown;
|
|
32
|
+
action?: unknown;
|
|
33
|
+
trigger?: unknown;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Each run-log row with the `node` it ran — app, action, trigger flag, and for a registered app its
|
|
38
|
+
* display name, action title and icon — so the log's step list shows the same mark and name the
|
|
39
|
+
* canvas does. Built from the editor's current definition and the apps the canvas already loaded;
|
|
40
|
+
* a row whose id the definition no longer has keeps no `node` (its label alone, as before). For
|
|
41
|
+
* each body rows (`iterations[].steps`) get theirs too. Never mutates its inputs.
|
|
42
|
+
*/
|
|
43
|
+
export declare function attachRunLogNodes<T extends RunLogRow>(steps: readonly T[], definition: readonly RunLogDefinitionNode[], appsById: ReadonlyMap<string, RunLogApp>, actionTitle?: (app: string, action: string) => string | undefined): T[];
|
package/dist/lists.mjs
CHANGED
|
@@ -6,20 +6,20 @@ import { p as Zt, r as Xt, t as en, c as tn, j as nn, n as Ke } from "./callable
|
|
|
6
6
|
import { u as se, b as Oe } from "./project-context-Tvp-La7A.js";
|
|
7
7
|
import { d as an, g as sn, b as ot, u as ln, l as ze } from "./endpoints-zOuwci2U.js";
|
|
8
8
|
import { RowActionsMenu as Fe, ConfirmModal as Ye, CallableListStatus as ct, CallableList as rn, ReliabilityList as on, EmptyState as je, DataTable as ke, ListItem as xe, HealthStatusPill as ve, HistoryTimeline as cn, useW6WApi as dt, connectionAppIdsToLookUp as ut, ConnectionList as dn, AddConnectionModal as un, EditConnectionModal as mt, Modal as mn, resolveConnectionAppMeta as Re, ConnectionHeader as hn, EditButton as pn, IconButton as wn, AuthGuide as fn, ConnectionKeepAlive as yn, AppIcon as ht, secretClipboard as gn, SecretJsonField as pt, AppPicker as bn, AppConnectionForm as vn, locateDataStoreError as Nn, tableSchemaOf as kn, draftFromEntry as ye, CsvPanel as Cn, DataTableGrid as In, NEW_ROW_ID as re, newRowDraft as Ge, kvValueTypeOf as An, DataEntryList as $n, DataEntryEditor as Sn, dirtyColumns as Dn, csvFilenameOf as Tn, csvImportMessage as Je, buildRowValue as En, rowWriteOf as Ln, remainingTtlSeconds as wt, isVersionConflict as ft, cellErrorsOf as Mn, parseDocText as xn, kvValueOf as Rn, serializeCell as Pn, DataStoreList as Kn, DATA_STORE_KINDS as On, DATA_STORE_KIND_LABEL as Fn, SCALAR_TYPES as jn, ColumnsEditor as Qn, errorPlacement as qn } from "@w6w/ui";
|
|
9
|
-
import { I as _n } from "./ImportSpecModal-
|
|
9
|
+
import { I as _n } from "./ImportSpecModal-SQvTwtcX.js";
|
|
10
10
|
import { i as Un } from "./import-bindings-EUtxZ9Ti.js";
|
|
11
|
-
import {
|
|
11
|
+
import { a6 as Vn, a3 as yt, V as Bn, E as Wn } from "./workflows-RhR8kwt7.js";
|
|
12
12
|
import { useQueryClient as ue, useQuery as Qe, useInfiniteQuery as gt } from "@tanstack/react-query";
|
|
13
|
-
import { o as Hn, r as zn, k as Yn, i as Gn } from "./spec-import-
|
|
13
|
+
import { o as Hn, r as zn, k as Yn, i as Gn } from "./spec-import-CPbDnnuv.js";
|
|
14
14
|
import { n as Jn, b as Zn } from "./workflow-blank-BJFLdGyE.js";
|
|
15
15
|
import { f as Xn, e as Ze, g as ea, b as ta, h as na, i as aa } from "./api-calls--JHyif6a.js";
|
|
16
16
|
import { a as sa, C as Ce, M as ia } from "./ConfirmModal-WqBfWftD.js";
|
|
17
|
-
import { D as la } from "./DocumentFormModal-
|
|
18
|
-
import { H as ra, a as qe } from "./editor-apps-
|
|
17
|
+
import { D as la } from "./DocumentFormModal-B3OkvI5v.js";
|
|
18
|
+
import { H as ra, a as qe } from "./editor-apps-ShwCmvLY.js";
|
|
19
19
|
import { ApiError as bt } from "@w6w/sdk";
|
|
20
20
|
import { u as _e, o as vt, k as Nt, c as de, b as Pe, m as oa, p as kt, e as Xe, q as ca } from "./connections-CzsCyIxY.js";
|
|
21
21
|
import { M as da } from "./ModelRoutesManager-DqeY1mdP.js";
|
|
22
|
-
import {
|
|
22
|
+
import { k as ua } from "./apps-CFWdgGst.js";
|
|
23
23
|
import { u as pe } from "./client-context-CX61Bgw-.js";
|
|
24
24
|
import { v as ma, A as ha, s as pa, E as wa, c as Ue } from "./models-CI0vLJ6o.js";
|
|
25
25
|
import { u as Ve, b as Ct, d as It, c as At } from "./ai-keys-D676ly41.js";
|
package/dist/rail.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as u } from "react";
|
|
4
|
-
import { W as d, R as p, P as m, u as f, a as v, e as b, b as h } from "./editor-tools-
|
|
4
|
+
import { W as d, R as p, P as m, u as f, a as v, e as b, b as h } from "./editor-tools-rY9nddqr.js";
|
|
5
5
|
import { r as P, a as j } from "./project-context-Tvp-La7A.js";
|
|
6
6
|
const R = () => {
|
|
7
7
|
};
|
package/dist/repos/history.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecutionSummary, HistoryFilters, HistoryScope } from '../lib/history-query.ts';
|
|
1
|
+
import { ExecutionSummary, HistoryFilters, HistoryScope, WorkflowTrigger } from '../lib/history-query.ts';
|
|
2
2
|
/** The project-wide or per-callable execution list, one page at a time.
|
|
3
3
|
* Disabled while `scope` is `null` (no project/callable selected yet).
|
|
4
4
|
* `placeholderData: keepPreviousData` keeps the previous page's rows on
|
|
@@ -31,3 +31,7 @@ export declare function useRerunExecutionMutation(): import('@tanstack/react-que
|
|
|
31
31
|
* re-run's "Re-run of <id>". A plain function over the embed client, not a query: it runs once per
|
|
32
32
|
* click, and the opened detail has its own query. */
|
|
33
33
|
export declare function useFindExecution(): (callableId: string, id: string) => Promise<ExecutionSummary | null>;
|
|
34
|
+
/** Each listed workflow's triggers (node id → display name), so a History row can say which
|
|
35
|
+
* trigger started it and a workflow's History can filter by one. Best-effort: a workflow whose
|
|
36
|
+
* definition cannot be read maps to `[]`, and its rows fall back to the run kind. */
|
|
37
|
+
export declare function useWorkflowTriggers(workflowIds: string[]): Map<string, WorkflowTrigger[]>;
|