@w6w/ui 0.2.58 → 0.2.60

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.60
4
+
5
+ - **Run agent** node: pick an agent and write the message it runs on (`@w6w/model` · agent).
6
+ - Clicking a For each iteration in the execution log shows that iteration's input and output.
7
+ - `StepBuilderModal` takes `setupOnly`: the picker finishes once an action and its connection are chosen, for hosts that configure the rest themselves (e.g. an agent's tools).
8
+
9
+ ## 0.2.59
10
+
11
+ - The add-node dialog's Settings tab offers **Write to state** and **Run next nodes**, and a choice lands on the node as soon as it is added.
12
+ - A step whose app needs a connection shows "Connect <App> to choose an action" with a **Connect <App>** button that opens the app's connection form, instead of an action list it can't run.
13
+ - The add-node search covers every tab (built-in nodes, apps, workflows, functions), grouped under headings; clicking a tab narrows it.
14
+ - Connect dialog: an auth's `setup` steps show as a collapsed "Where do I get this?" with a link per step. The credential is named for you (a service-account key by its client email), so there is no Credential name field. A pasted service-account key shows its client email, client ID, project and key ID with only the private key masked, and the scopes come comma-separated with a **Copy** button.
15
+ - Callable lists (workflows, functions, endpoints) draw one frame, and the badge column fits its badges.
16
+ - `Combobox` options can carry a leading icon and extra search keywords.
17
+ - References accept brackets — `messages[0].id`, `user["name"]` — and save in dot form (`@w6w/expr` 0.1.3).
18
+
3
19
  ## 0.2.58
4
20
 
5
21
  - A trigger tested in the add-step dialog saves its test, so the next step can read its fields (`{{ nodes.<trigger>.output.* }}`) without re-running it from the step editor.
@@ -22,3 +22,9 @@ export interface AddConnectionModalProps {
22
22
  * in. Data + IO come from `useW6WApi()`.
23
23
  */
24
24
  export declare function AddConnectionModal(props: AddConnectionModalProps): import("react").JSX.Element;
25
+ /**
26
+ * The saved key's label, so nobody has to invent one: the service account's own email when the
27
+ * pasted key carries one (what Google Cloud calls it too), else "<App> key". Connections point at
28
+ * the key by id; the label only tells saved keys apart in the "Use existing" list.
29
+ */
30
+ export declare function credentialName(source: Record<string, unknown>, appName: string): string;
@@ -1,12 +1,18 @@
1
1
  import { NodeConfig } from './NodeConfigForm.tsx';
2
2
  import { ExpressionLoopSource, ExpressionStepSource } from './components/ExpressionOptions.tsx';
3
- import { InternalNodeDef } from './flow-types.ts';
3
+ import { InternalNodeDef, FlowStep } from './flow-types.ts';
4
4
  import { StepStartState, W6WApi } from './provider.tsx';
5
5
  import { ActionDef, ActionParam, AppSummary, FunctionSummary, ThemeMode, WorkflowSummary } from './types.ts';
6
6
  /** The step the builder emits — the editor assigns the final `id` unless `id` carries a
7
7
  * name the user chose in the add flow. `NodeConfig` carries the base settings (retry /
8
8
  * onError / notes) set on the Config view. */
9
- export interface BuiltStep extends NodeConfig {
9
+ /**
10
+ * What the add dialog's Settings collect: the node editor's settings (retry, on error, notes) plus
11
+ * "Run next nodes" and "Write to state", so the node is created with them instead of gaining them
12
+ * only once it is reopened.
13
+ */
14
+ export type DraftConfig = NodeConfig & Pick<FlowStep, "state" | "fanOut">;
15
+ export interface BuiltStep extends DraftConfig {
10
16
  /** The node name chosen in the add flow; on `onDraftChange` it renames the minted node. */
11
17
  id?: string;
12
18
  uses: {
@@ -150,6 +156,16 @@ export interface StepBuilderModalProps {
150
156
  * (e.g. binding a repository), not a runnable step.
151
157
  */
152
158
  connectionOnly?: boolean;
159
+ /**
160
+ * Stop at "an action and its connection are chosen" — no Configure, no Test. The Setup tab's
161
+ * footer commits the pick through `onAdd`, labelled {@link StepBuilderModalProps.addLabel}. For a
162
+ * caller that binds an action as a capability rather than a configured step (an agent's tools:
163
+ * the model supplies the parameters at call time). A picked Function or Workflow is committed
164
+ * at once, without its inputs form.
165
+ */
166
+ setupOnly?: boolean;
167
+ /** The commit button's label with {@link StepBuilderModalProps.setupOnly}. Defaults to "Add". */
168
+ addLabel?: string;
153
169
  /**
154
170
  * Fired once, on {@link AppConnectionOnlyConfig}'s footer button — never on
155
171
  * selection alone. Only meaningful with {@link StepBuilderModalProps.connectionOnly}.
@@ -198,7 +214,7 @@ export declare function ConfigViewToggle({ view, onChange, disabled, views, cust
198
214
  *
199
215
  * Data + IO come from `useW6WApi()`, so mount it under `<W6WUIProvider>`.
200
216
  */
201
- export declare function StepBuilderModal({ onClose, onDone, onAdd, onDraftChange, theme, appsOnly, callables, initialTab, title, workflowId, stepId, upstreamSteps, loop, initialApp, initialAction, initialConnection, initialWith, appsFilter, appsIds, connectionOnly, onConnected, excludeCallableIds, onOpenStep, stepIds, }: StepBuilderModalProps): import("react").JSX.Element;
217
+ export declare function StepBuilderModal({ onClose, onDone, onAdd, onDraftChange, theme, appsOnly, callables, initialTab, title, workflowId, stepId, upstreamSteps, loop, initialApp, initialAction, initialConnection, initialWith, appsFilter, appsIds, connectionOnly, setupOnly, addLabel, onConnected, excludeCallableIds, onOpenStep, stepIds, }: StepBuilderModalProps): import("react").JSX.Element;
202
218
  /**
203
219
  * Config form for a chosen internal node — its schema rendered through the same
204
220
  * `ParamsForm` as app actions, seeded with the node's defaults. Emits the built
@@ -413,7 +429,7 @@ export declare function AppTriggerTestNote({ title, app }: {
413
429
  title: string;
414
430
  app: string;
415
431
  }): import("react").JSX.Element;
416
- export declare function AppStepConfig({ kind, onOpenStep, appId, app, onAdd, onClose, onDone, onDraftChange, onChangeApp, theme, workflowId, stepId, upstreamSteps, loop, initialAction, initialConnection, initialWith, }: {
432
+ export declare function AppStepConfig({ kind, onOpenStep, appId, app, onAdd, onClose, onDone, onDraftChange, onChangeApp, theme, workflowId, stepId, upstreamSteps, loop, initialAction, initialConnection, initialWith, setupOnly, addLabel, }: {
417
433
  /**
418
434
  * What the Setup tab picks: one of the app's actions, or (`"trigger"`, the
419
435
  * Triggers tab) one of its triggers. Same account step, same picker, same
@@ -446,6 +462,10 @@ export declare function AppStepConfig({ kind, onOpenStep, appId, app, onAdd, onC
446
462
  initialConnection?: string;
447
463
  /** Pre-filled parameter values */
448
464
  initialWith?: Record<string, unknown>;
465
+ /** See {@link StepBuilderModalProps.setupOnly}. */
466
+ setupOnly?: boolean;
467
+ /** See {@link StepBuilderModalProps.addLabel}. */
468
+ addLabel?: string;
449
469
  }): import("react").JSX.Element;
450
470
  /**
451
471
  * {@link AppStepConfig}'s Setup tab, minus the Action and Configure/Test
@@ -15,7 +15,7 @@ export declare function useWorkflowConnections(): {
15
15
  setConnections: (connections: FlowConnections) => void;
16
16
  } | null;
17
17
  /** One account menu for both adding and editing workflow nodes. */
18
- export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly, open, onOpenChange, anchorRef, onChangeConnection, onChangeConnectionRef, onConnectionCreated, }: {
18
+ export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly, open, onOpenChange, anchorRef, onChangeConnection, onChangeConnectionRef, onConnectionCreated, createSignal, }: {
19
19
  step: FlowStep;
20
20
  conns: ConnectionSummary[] | null;
21
21
  failed?: boolean;
@@ -26,4 +26,10 @@ export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly
26
26
  onChangeConnection: (id: string) => void;
27
27
  onChangeConnectionRef: (ref: string) => void;
28
28
  onConnectionCreated: () => void;
29
+ /**
30
+ * Open the new-connection dialog straight away, skipping the menu: each INCREASE of this
31
+ * number opens it once (a host's "Connect <app>" button bumps it). The value on mount never
32
+ * opens it.
33
+ */
34
+ createSignal?: number;
29
35
  }): import("react").JSX.Element;
@@ -8,7 +8,7 @@ export interface CanvasMenuTarget {
8
8
  /** Node ids Duplicate / Delete act on. Empty on a bare-canvas right-click. */
9
9
  nodeIds: string[];
10
10
  }
11
- export type CanvasMenuAction = "duplicate" | "delete" | "add-node" | "add-trigger";
11
+ export type CanvasMenuAction = "duplicate" | "delete" | "replace-trigger" | "add-node" | "add-trigger";
12
12
  export interface CanvasMenuItem {
13
13
  action: CanvasMenuAction;
14
14
  label: string;
@@ -23,5 +23,10 @@ export interface CanvasMenuItem {
23
23
  * The bare canvas acts on whatever is selected.
24
24
  */
25
25
  export declare function contextMenuTargets(selectedIds: readonly string[], nodeId?: string): string[];
26
- /** Duplicate + Delete when nodes are targeted, then Add node + Add trigger. All greyed when read-only. */
27
- export declare function canvasMenuItems(nodeIds: readonly string[], readOnly: boolean): CanvasMenuItem[];
26
+ /**
27
+ * Duplicate + Delete when nodes are targeted (plus Replace trigger when the one target is a
28
+ * trigger), then Add node + Add trigger. All greyed when read-only.
29
+ */
30
+ export declare function canvasMenuItems(nodeIds: readonly string[], readOnly: boolean, opts?: {
31
+ replaceableTrigger?: boolean;
32
+ }): CanvasMenuItem[];
@@ -37,4 +37,10 @@ export declare function parseJsonFields(fields: AuthField[], values: Record<stri
37
37
  * comes from the app's manifest so no app-specific knowledge is needed here.
38
38
  */
39
39
  export declare function AuthFieldsForm({ fields, values, onChange, enterSubmitProps, mode, }: Props): import("react").JSX.Element;
40
+ export declare function keyFilePreview(raw: string): {
41
+ key: string;
42
+ label: string;
43
+ value: string;
44
+ secret: boolean;
45
+ }[] | null;
40
46
  export {};
@@ -1,8 +1,16 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface ComboboxOption {
2
3
  value: string;
3
4
  label: string;
4
5
  /** A muted second line under the label (e.g. a value preview); never matched by the filter. */
5
6
  detail?: string;
7
+ /**
8
+ * A small leading glyph (e.g. a provider's logo), drawn before the label in the list and
9
+ * inside the input while this option is the selected one. Combobox mode only.
10
+ */
11
+ icon?: ReactNode;
12
+ /** Extra text the filter also matches (e.g. a provider name that is not in the label). */
13
+ keywords?: string;
6
14
  }
7
15
  export interface ComboboxProps {
8
16
  options: ComboboxOption[];
@@ -36,7 +44,7 @@ export interface ComboboxProps {
36
44
  }
37
45
  /** Combobox is chosen when the list would take more than 60% of the viewport. */
38
46
  export declare function shouldUseCombobox(count: number, optionHeight: number, viewportHeight: number): boolean;
39
- /** Case-insensitive substring match on label and value. */
47
+ /** Case-insensitive substring match on label, value and keywords. */
40
48
  export declare function filterOptions(options: ComboboxOption[], query: string): ComboboxOption[];
41
49
  export declare const DEFAULT_LIST_MAX_HEIGHT = 240;
42
50
  export declare function Combobox({ options, value, onChange, placeholder, disabled, "aria-label": ariaLabel, mode, forceSelection, optionHeight, listMaxHeight, className, onInputChange, emptyText, footer, }: ComboboxProps): import("react").JSX.Element;
@@ -22,7 +22,7 @@ export interface CredentialPickerProps {
22
22
  export declare function CredentialPicker({ credentials, mode, onModeChange, selectedId, onSelect, canUseExisting, contract, }: CredentialPickerProps): import("react").JSX.Element;
23
23
  /**
24
24
  * The binding fields a `serviceAccount` auth asks for on a connection. `delegatedUser` is always
25
- * labelled "Impersonated user" (the person the credential acts as, never the connection's owner),
25
+ * labelled "Workspace user to act as" (the person the credential acts as, never the connection's owner),
26
26
  * is absent when impersonation is `"none"` even if declared, and is synthesised when impersonation
27
27
  * is allowed but the auth declares no such field.
28
28
  */