@w6w/embed 0.2.29 → 0.2.31

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.
Files changed (76) hide show
  1. package/dist/{CreateFunctionModal-CCYi9deY.js → CreateFunctionModal-glk2zg1r.js} +28 -27
  2. package/dist/{CreateFunctionModal-CCYi9deY.js.map → CreateFunctionModal-glk2zg1r.js.map} +1 -1
  3. package/dist/{DocumentFormModal-CCIgA7pR.js → DocumentFormModal-Cw85R4wk.js} +2 -2
  4. package/dist/{DocumentFormModal-CCIgA7pR.js.map → DocumentFormModal-Cw85R4wk.js.map} +1 -1
  5. package/dist/{ImportSpecModal-DoxsVxru.js → ImportSpecModal-fU5RsVTa.js} +2 -2
  6. package/dist/{ImportSpecModal-DoxsVxru.js.map → ImportSpecModal-fU5RsVTa.js.map} +1 -1
  7. package/dist/WorkflowEditor-B-Wc_r4X.js +1140 -0
  8. package/dist/WorkflowEditor-B-Wc_r4X.js.map +1 -0
  9. package/dist/callable-record-Bhxim8C1.js +14 -0
  10. package/dist/callable-record-Bhxim8C1.js.map +1 -0
  11. package/dist/callables-B49tS2vv.js +297 -0
  12. package/dist/callables-B49tS2vv.js.map +1 -0
  13. package/dist/{document-sources-DNmBojx6.js → document-sources-Khcw2zB5.js} +16 -16
  14. package/dist/document-sources-Khcw2zB5.js.map +1 -0
  15. package/dist/draft.mjs +1 -1
  16. package/dist/editor/WorkflowInputsModal.d.ts +12 -0
  17. package/dist/editor/WorkflowVariablesEditor.d.ts +1 -1
  18. package/dist/{editor-tools--Y3wlBZE.js → editor-tools-Ch1cAE4F.js} +434 -377
  19. package/dist/editor-tools-Ch1cAE4F.js.map +1 -0
  20. package/dist/editor.mjs +1 -1
  21. package/dist/editors.mjs +85 -85
  22. package/dist/endpoints-zOuwci2U.js +136 -0
  23. package/dist/endpoints-zOuwci2U.js.map +1 -0
  24. package/dist/fields-CXHRR5eK.js +28 -0
  25. package/dist/fields-CXHRR5eK.js.map +1 -0
  26. package/dist/forms.mjs +1 -1
  27. package/dist/index.mjs +91 -91
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/lib/callable-duplicate.d.ts +26 -0
  30. package/dist/lib/recent-activity.d.ts +2 -2
  31. package/dist/lib/variable-preview.d.ts +6 -0
  32. package/dist/lib/workflow-version.d.ts +19 -2
  33. package/dist/lib.mjs +41 -40
  34. package/dist/lib.mjs.map +1 -1
  35. package/dist/lists/AiKeyCreate.d.ts +20 -0
  36. package/dist/lists/CallableKindList.d.ts +21 -2
  37. package/dist/lists/CallableRowParts.d.ts +38 -0
  38. package/dist/lists/CredentialCreate.d.ts +17 -17
  39. package/dist/lists/CredentialDetail.d.ts +2 -0
  40. package/dist/lists/CredentialFields.d.ts +18 -0
  41. package/dist/lists/CredentialList.d.ts +35 -3
  42. package/dist/lists/EndpointList.d.ts +2 -1
  43. package/dist/lists/WorkflowList.d.ts +2 -1
  44. package/dist/lists.d.ts +2 -0
  45. package/dist/lists.mjs +2185 -1615
  46. package/dist/lists.mjs.map +1 -1
  47. package/dist/rail.mjs +1 -1
  48. package/dist/repos/callables.d.ts +23 -0
  49. package/dist/repos/fields.d.ts +4 -1
  50. package/dist/repos.mjs +287 -284
  51. package/dist/settings-rail-BjsTjg2u.js +22 -0
  52. package/dist/settings-rail-BjsTjg2u.js.map +1 -0
  53. package/dist/spec-export-BtnoV0ex.js +33 -0
  54. package/dist/spec-export-BtnoV0ex.js.map +1 -0
  55. package/dist/spec-import-CGPqUUjN.js +272 -0
  56. package/dist/spec-import-CGPqUUjN.js.map +1 -0
  57. package/dist/{use-callable-draft-DCauHt5o.js → use-callable-draft-DjW7_9qb.js} +8 -7
  58. package/dist/{use-callable-draft-DCauHt5o.js.map → use-callable-draft-DjW7_9qb.js.map} +1 -1
  59. package/package.json +5 -5
  60. package/src/styles.css +221 -10
  61. package/dist/WorkflowEditor-CBUwh85L.js +0 -1117
  62. package/dist/WorkflowEditor-CBUwh85L.js.map +0 -1
  63. package/dist/callables-tOlflvbl.js +0 -151
  64. package/dist/callables-tOlflvbl.js.map +0 -1
  65. package/dist/document-sources-DNmBojx6.js.map +0 -1
  66. package/dist/editor-tools--Y3wlBZE.js.map +0 -1
  67. package/dist/endpoints-DArAqoLT.js +0 -233
  68. package/dist/endpoints-DArAqoLT.js.map +0 -1
  69. package/dist/fields-DvS8XZFc.js +0 -21
  70. package/dist/fields-DvS8XZFc.js.map +0 -1
  71. package/dist/settings-rail--GdRMusb.js +0 -33
  72. package/dist/settings-rail--GdRMusb.js.map +0 -1
  73. package/dist/spec-export-DMMET5VM.js +0 -189
  74. package/dist/spec-export-DMMET5VM.js.map +0 -1
  75. package/dist/spec-import-0B6oUewa.js +0 -116
  76. package/dist/spec-import-0B6oUewa.js.map +0 -1
@@ -1,2 +1,19 @@
1
- /** Compare JSON definitions independent of object property order. Array order is meaningful. */
2
- export declare function sameWorkflowDefinition(a: unknown, b: unknown): boolean;
1
+ /**
2
+ * Whether two workflow definitions are the SAME for publishing: equal JSON, independent of object
3
+ * property order (array order is meaningful), once the authoring presentation is set aside. Moving
4
+ * nodes on the canvas changes nothing a run does, so it must not make a published workflow read as
5
+ * Draft or offer Republish.
6
+ *
7
+ * Presentation is what `rfcs/workflow.md` declares the engine ignores, removed STRUCTURALLY (never
8
+ * a `position` key at any depth: an action's params may have a field of that name):
9
+ * - each node's `position` in the top-level `nodes` (or legacy `steps`) array. Loop bodies and
10
+ * branches only list node ids, so every node is in that one array;
11
+ * - `settings.viewport`, `settings.autoSave` and `settings.savePosition` (2026-07-29 amendment);
12
+ * - the `position` and `size` of each `canvas.notes[]` and `canvas.sections[]` entry (2026-10-22).
13
+ * A note's text, a section's title, colour and members still count.
14
+ *
15
+ * Pass `{ presentation: true }` to compare everything, layout included.
16
+ */
17
+ export declare function sameWorkflowDefinition(a: unknown, b: unknown, opts?: {
18
+ presentation?: boolean;
19
+ }): boolean;
package/dist/lib.mjs CHANGED
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { d as l, f as d, a as c, i as p, p as u, b as m, r as f, c as g, s as S, t as b, e as w, w as R, g as v } from "./setup-incomplete-BHs3Lpfy.js";
3
- import { d as h, a as y, e as I, i as x, b as D, p as C, r as P, c as U, f as A, s as E, g as K, t as T, v as k, h as L } from "./document-sources-DNmBojx6.js";
3
+ import { d as h, a as x, e as y, i as I, b as D, p as C, r as P, c as U, f as A, s as E, g as K, t as T, v as k, h as L } from "./document-sources-Khcw2zB5.js";
4
4
  import { a as W, b as N, e as _, h as B, c as O, d as j, i as H, m as q, p as G, r as M, f as Y, g as $, s as z, j as J, k as Q, l as X, t as Z, v as aa, w as ea, n as sa } from "./import-bindings-EUtxZ9Ti.js";
5
- import { c as ra, d as ia, i as oa, p as na } from "./settings-rail--GdRMusb.js";
6
- import { A as da, b as ca, f as pa, i as ua, a as ma, c as fa, s as ga, u as Sa } from "./slug-BVdgiP_L.js";
7
- import { i as wa, s as Ra } from "./spec-import-invalidation-D3retX4Q.js";
8
- import { U as Fa, b as ha, n as ya } from "./workflow-blank-BJFLdGyE.js";
9
- import { I as xa, c as Da, f as Ca, i as Pa, a as Ua, m as Aa, p as Ea, s as Ka, t as Ta, b as ka, d as La, u as Va, e as Wa, g as Na } from "./coerce-input-DFJ4n_wc.js";
5
+ import { d as ra, i as ia, p as oa } from "./settings-rail-BjsTjg2u.js";
6
+ import { A as la, b as da, f as ca, i as pa, a as ua, c as ma, s as fa, u as ga } from "./slug-BVdgiP_L.js";
7
+ import { i as ba, s as wa } from "./spec-import-invalidation-D3retX4Q.js";
8
+ import { U as va, b as Fa, n as ha } from "./workflow-blank-BJFLdGyE.js";
9
+ import { I as ya, c as Ia, f as Da, i as Ca, a as Pa, m as Ua, p as Aa, s as Ea, t as Ka, b as Ta, d as ka, u as La, e as Va, g as Wa } from "./coerce-input-DFJ4n_wc.js";
10
+ import { c as _a } from "./callable-record-Bhxim8C1.js";
10
11
  function r(s) {
11
12
  const e = new URLSearchParams(s), a = e.get("edit");
12
13
  if (a === null || a === "") return null;
@@ -19,46 +20,46 @@ function i(s) {
19
20
  return a != null && a.startsWith("run_") ? a : null;
20
21
  }
21
22
  export {
22
- da as ACCOUNT_SLUG_RE,
23
- xa as INPUT_TYPES,
24
- Fa as UNTITLED_WORKFLOW,
23
+ la as ACCOUNT_SLUG_RE,
24
+ ya as INPUT_TYPES,
25
+ va as UNTITLED_WORKFLOW,
25
26
  W as allowedModes,
26
- ha as blankDefinition,
27
+ Fa as blankDefinition,
27
28
  N as buildRows,
28
- ca as buildSnippet,
29
- ra as callableRecord,
30
- Da as coerceInput,
31
- ia as definitionWithPolicy,
29
+ da as buildSnippet,
30
+ _a as callableRecord,
31
+ Ia as coerceInput,
32
+ ra as definitionWithPolicy,
32
33
  l as disabledBannerState,
33
34
  h as documentSampleValues,
34
- y as duplicateKeyIndexes,
35
- I as errorHandlerSelfDecision,
35
+ x as duplicateKeyIndexes,
36
+ y as errorHandlerSelfDecision,
36
37
  _ as evaluateEdit,
37
- Ca as fieldsFromWorkflow,
38
- pa as filterKeyInput,
38
+ Da as fieldsFromWorkflow,
39
+ ca as filterKeyInput,
39
40
  d as findBindingProblems,
40
41
  c as findSetupIncomplete,
41
42
  B as hasDefinitionActions,
42
43
  O as hasDelete,
43
44
  j as hasVersionHistory,
44
- Pa as implToTarget,
45
- Ua as inputsForSave,
45
+ Ca as implToTarget,
46
+ Pa as inputsForSave,
46
47
  p as invalidReason,
47
- wa as invalidateImportedCallable,
48
- x as isCodeRailAvailable,
49
- ua as isEndpointKey,
48
+ ba as invalidateImportedCallable,
49
+ I as isCodeRailAvailable,
50
+ pa as isEndpointKey,
50
51
  D as isExprDefault,
51
52
  H as isRowArchived,
52
- oa as isSettingsRailAvailable,
53
- ma as isUrnAddressable,
54
- fa as isValidAccountSlug,
53
+ ia as isSettingsRailAvailable,
54
+ ua as isUrnAddressable,
55
+ ma as isValidAccountSlug,
55
56
  r as legacyEditRedirect,
56
- Aa as mergeSeed,
57
+ Ua as mergeSeed,
57
58
  q as metadataFieldsForKind,
58
- ya as nextUntitledName,
59
- Ea as paramsToFields,
59
+ ha as nextUntitledName,
60
+ Aa as paramsToFields,
60
61
  G as parseImportPaste,
61
- na as policyFromDefinition,
62
+ oa as policyFromDefinition,
62
63
  C as projectDocumentSources,
63
64
  u as publishDisabledReason,
64
65
  m as publishProblems,
@@ -74,24 +75,24 @@ export {
74
75
  z as setBind,
75
76
  J as setCreateName,
76
77
  Q as setUnconfigured,
77
- Ka as shouldSeed,
78
- ga as slugify,
78
+ Ea as shouldSeed,
79
+ fa as slugify,
79
80
  X as specCollectionForKind,
80
- Ra as specImportListKey,
81
+ wa as specImportListKey,
81
82
  E as startingDataCollisions,
82
83
  K as startingDataForSave,
83
84
  S as stepValid,
84
- Ta as targetIsBound,
85
- ka as targetRef,
86
- La as targetToImpl,
85
+ Ka as targetIsBound,
86
+ Ta as targetRef,
87
+ ka as targetToImpl,
87
88
  Z as toSelections,
88
89
  T as toSnippetCallable,
89
90
  b as triggerInputSeed,
90
91
  w as triggerPreviews,
91
- Sa as unavailableReason,
92
- Va as uncoveredForEndpoint,
93
- Wa as uncoveredForFunction,
94
- Na as uncoveredRequiredKeys,
92
+ ga as unavailableReason,
93
+ La as uncoveredForEndpoint,
94
+ Va as uncoveredForFunction,
95
+ Wa as uncoveredRequiredKeys,
95
96
  k as variablesForSave,
96
97
  L as varsRailFor,
97
98
  aa as visibleRows,
package/dist/lib.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","sources":["../src/lib/workflow-route.ts"],"sourcesContent":["// T4.1.1 (R-3): `/<account>/<project>/workflows/:id` is the workflow visual\n// editor's canonical URL; the older `workflows?edit=<id>` form survives only as\n// an alias. Parsing that alias is a pure URL question with no React and no\n// router in it, so it lives here — `.ts`, zero imports — rather than inline in\n// `WorkflowsPage.tsx`, which `node --test` cannot load (JSX).\n\n/**\n * Read the legacy `edit` parameter off a location's search string.\n *\n * Returns `null` when there is nothing to redirect: no `edit` key at all, or\n * one that is empty (`?edit=` is not an id). Otherwise `id` is the `edit`\n * value and `search` is the rest of the query — `edit` removed, every other\n * parameter kept in its original order — as a leading-`?` search string, or\n * `\"\"` when nothing is left.\n *\n * legacyEditRedirect(\"?edit=wf_a\") // { id: \"wf_a\", search: \"\" }\n * legacyEditRedirect(\"?edit=wf_a&tab=steps\") // { id: \"wf_a\", search: \"?tab=steps\" }\n */\nexport function legacyEditRedirect(search: string): { id: string; search: string } | null {\n const params = new URLSearchParams(search);\n const id = params.get(\"edit\");\n if (id === null || id === \"\") return null;\n params.delete(\"edit\");\n const rest = params.toString();\n return { id, search: rest === \"\" ? \"\" : `?${rest}` };\n}\n\n// T2.4.2 — the History page's \"open in visual view\" link lands on\n// `workflows/:id?run=<runId>`; `WorkflowsPage` reads the `run` param on mount\n// and seeds `activeRunId` from it (EXTEND, not rebuild — the live-run\n// overlay machinery already handles a terminal run identically to a live\n// one). Guarded to `run_`-prefixed values only, so an unrelated/garbled\n// param (or this file's OWN `edit` alias from a stale link) never gets\n// treated as a run id.\n\n/**\n * Read the `run` query param off a location's search string, honouring it\n * only when it looks like a real run id.\n *\n * runParamFromSearch(\"?run=run_1&x=1\") // \"run_1\"\n * runParamFromSearch(\"?run=\") // null\n * runParamFromSearch(\"?run=wf_1\") // null — not a run id\n * runParamFromSearch(\"\") // null\n */\nexport function runParamFromSearch(search: string): string | null {\n const params = new URLSearchParams(search);\n const run = params.get(\"run\");\n return run?.startsWith(\"run_\") ? run : null;\n}\n"],"names":["legacyEditRedirect","search","params","id","rest","runParamFromSearch","run"],"mappings":";;;;;;;;;AAkBO,SAASA,EAAmBC,GAAuD;AACxF,QAAMC,IAAS,IAAI,gBAAgBD,CAAM,GACnCE,IAAKD,EAAO,IAAI,MAAM;AAC5B,MAAIC,MAAO,QAAQA,MAAO,GAAI,QAAO;AACrC,EAAAD,EAAO,OAAO,MAAM;AACpB,QAAME,IAAOF,EAAO,SAAA;AACpB,SAAO,EAAE,IAAAC,GAAI,QAAQC,MAAS,KAAK,KAAK,IAAIA,CAAI,GAAA;AAClD;AAmBO,SAASC,EAAmBJ,GAA+B;AAEhE,QAAMK,IADS,IAAI,gBAAgBL,CAAM,EACtB,IAAI,KAAK;AAC5B,SAAOK,KAAA,QAAAA,EAAK,WAAW,UAAUA,IAAM;AACzC;"}
1
+ {"version":3,"file":"lib.mjs","sources":["../src/lib/workflow-route.ts"],"sourcesContent":["// T4.1.1 (R-3): `/<account>/<project>/workflows/:id` is the workflow visual\n// editor's canonical URL; the older `workflows?edit=<id>` form survives only as\n// an alias. Parsing that alias is a pure URL question with no React and no\n// router in it, so it lives here — `.ts`, zero imports — rather than inline in\n// `WorkflowsPage.tsx`, which `node --test` cannot load (JSX).\n\n/**\n * Read the legacy `edit` parameter off a location's search string.\n *\n * Returns `null` when there is nothing to redirect: no `edit` key at all, or\n * one that is empty (`?edit=` is not an id). Otherwise `id` is the `edit`\n * value and `search` is the rest of the query — `edit` removed, every other\n * parameter kept in its original order — as a leading-`?` search string, or\n * `\"\"` when nothing is left.\n *\n * legacyEditRedirect(\"?edit=wf_a\") // { id: \"wf_a\", search: \"\" }\n * legacyEditRedirect(\"?edit=wf_a&tab=steps\") // { id: \"wf_a\", search: \"?tab=steps\" }\n */\nexport function legacyEditRedirect(search: string): { id: string; search: string } | null {\n const params = new URLSearchParams(search);\n const id = params.get(\"edit\");\n if (id === null || id === \"\") return null;\n params.delete(\"edit\");\n const rest = params.toString();\n return { id, search: rest === \"\" ? \"\" : `?${rest}` };\n}\n\n// T2.4.2 — the History page's \"open in visual view\" link lands on\n// `workflows/:id?run=<runId>`; `WorkflowsPage` reads the `run` param on mount\n// and seeds `activeRunId` from it (EXTEND, not rebuild — the live-run\n// overlay machinery already handles a terminal run identically to a live\n// one). Guarded to `run_`-prefixed values only, so an unrelated/garbled\n// param (or this file's OWN `edit` alias from a stale link) never gets\n// treated as a run id.\n\n/**\n * Read the `run` query param off a location's search string, honouring it\n * only when it looks like a real run id.\n *\n * runParamFromSearch(\"?run=run_1&x=1\") // \"run_1\"\n * runParamFromSearch(\"?run=\") // null\n * runParamFromSearch(\"?run=wf_1\") // null — not a run id\n * runParamFromSearch(\"\") // null\n */\nexport function runParamFromSearch(search: string): string | null {\n const params = new URLSearchParams(search);\n const run = params.get(\"run\");\n return run?.startsWith(\"run_\") ? run : null;\n}\n"],"names":["legacyEditRedirect","search","params","id","rest","runParamFromSearch","run"],"mappings":";;;;;;;;;;AAkBO,SAASA,EAAmBC,GAAuD;AACxF,QAAMC,IAAS,IAAI,gBAAgBD,CAAM,GACnCE,IAAKD,EAAO,IAAI,MAAM;AAC5B,MAAIC,MAAO,QAAQA,MAAO,GAAI,QAAO;AACrC,EAAAD,EAAO,OAAO,MAAM;AACpB,QAAME,IAAOF,EAAO,SAAA;AACpB,SAAO,EAAE,IAAAC,GAAI,QAAQC,MAAS,KAAK,KAAK,IAAIA,CAAI,GAAA;AAClD;AAmBO,SAASC,EAAmBJ,GAA+B;AAEhE,QAAMK,IADS,IAAI,gBAAgBL,CAAM,EACtB,IAAI,KAAK;AAC5B,SAAOK,KAAA,QAAAA,EAAK,WAAW,UAAUA,IAAM;AACzC;"}
@@ -0,0 +1,20 @@
1
+ import { CredentialTypeDescriptor, CredentialTypeField } from '../repos/credentials.ts';
2
+ import { ModelProviderRow } from '../repos/models.ts';
3
+ export interface AiKeyCreateProps {
4
+ /** The AI providers to offer (rows with a designation). */
5
+ providers: readonly ModelProviderRow[];
6
+ /** Preselects a provider by app id. */
7
+ initial?: string;
8
+ types: readonly CredentialTypeDescriptor[];
9
+ /** Called once the key is saved. */
10
+ onCreated?: () => void;
11
+ /** Leaves out the form's own "Add a key" heading (the host already has one). */
12
+ hideHeading?: boolean;
13
+ }
14
+ /**
15
+ * A key auth the server marked `userScope` (this caller may connect it "Only me") with no stored
16
+ * credential contract: the key is typed into the auth's own fields and held by the connection.
17
+ */
18
+ export declare function inlineFieldsOf(auth: unknown): CredentialTypeField[] | null;
19
+ export declare const providerLabel: (p: ModelProviderRow) => string;
20
+ export declare function AiKeyCreate({ providers, initial, types, onCreated, hideHeading, }: AiKeyCreateProps): import("react").JSX.Element;
@@ -1,7 +1,21 @@
1
- import { CallableListProps, CallableListRow } from '@w6w/ui';
1
+ import { CallableListGroup, CallableListProps, CallableListRow } from '@w6w/ui';
2
2
  import { ReactNode } from 'react';
3
3
  import { CallableKind } from '../lib/callable-descriptors.ts';
4
4
  import { ArchivableRow } from '../lib/rail-settings.ts';
5
+ import { CopyItem } from './CallableRowParts.tsx';
6
+ /** What the frame needs to draw a row's status, meta line and menu. */
7
+ export interface CallableRowFacts {
8
+ /** Plain-text name, for the menu's accessible name and the confirm copy. */
9
+ name: string;
10
+ keyText?: string | null;
11
+ updatedAt?: string | null;
12
+ /** The kind's own state beside the title (e.g. a workflow's draft/active); "disabled" wins. */
13
+ status?: ReactNode;
14
+ /** Extra meta (e.g. "224 runs"), between the publish state and the update time. */
15
+ metaExtra?: ReactNode;
16
+ /** "Copy …" menu items. */
17
+ copy?: readonly CopyItem[];
18
+ }
5
19
  /**
6
20
  * The internal frame the three kind lists (`FunctionList`, `EndpointList`, `WorkflowList`) share:
7
21
  * ui's presentational `CallableList` filled with one kind's copy and test ids, the archived
@@ -20,7 +34,12 @@ export declare function CallableKindList<Row extends {
20
34
  rows: readonly Row[] | undefined;
21
35
  loading: boolean;
22
36
  /** Everything about a row except the id and the archived flag, which the frame owns. */
23
- toRow: (row: Row) => Omit<CallableListRow, "id" | "archived">;
37
+ toRow: (row: Row) => Omit<CallableListRow, "id" | "archived" | "status" | "meta" | "menu">;
38
+ /** The row's name, key, update time, state and copy items: status, meta line and menu. */
39
+ facts: (row: Row) => CallableRowFacts;
40
+ /** Status tabs between All and Archived (e.g. Active, Draft), and which one a row sits in. */
41
+ groups?: readonly CallableListGroup[];
42
+ group?: (row: Row) => string | undefined;
24
43
  /** Only the Import flow reads it (the workflow list key); `null` means no project. */
25
44
  project: string | null;
26
45
  onOpen?: (id: string, event?: React.MouseEvent<Element>) => void;
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { CallableKind } from '../lib/callable-descriptors.ts';
3
+ import { DuplicateSiblings } from '../lib/callable-duplicate.ts';
4
+ /** "3m ago", "5h ago", "2d ago", else the date. */
5
+ export declare function updatedAgo(iso: string | null | undefined, now?: number): string | null;
6
+ /** The state beside a row's title: "disabled" wins over the kind's own state (`base`). */
7
+ export declare function CallableRowStatus(props: {
8
+ kind: CallableKind;
9
+ id: string;
10
+ archived: boolean;
11
+ base?: ReactNode;
12
+ }): import("react").JSX.Element;
13
+ /** The muted line under a row: its key, publish state, extras, last update. */
14
+ export declare function CallableRowMeta(props: {
15
+ kind: CallableKind;
16
+ id: string;
17
+ archived: boolean;
18
+ keyText?: string | null;
19
+ updatedAt?: string | null;
20
+ extra?: ReactNode;
21
+ }): import("react").JSX.Element;
22
+ /** One "Copy …" menu item. */
23
+ export interface CopyItem {
24
+ label: string;
25
+ value: string;
26
+ }
27
+ /** The row's three-dots menu, with its own confirm dialogs for Archive and Delete. */
28
+ export declare function CallableRowMenu(props: {
29
+ kind: CallableKind;
30
+ id: string;
31
+ name: string;
32
+ archived: boolean;
33
+ copy?: readonly CopyItem[];
34
+ /** The list's keys and names, so Duplicate picks ones no sibling holds. Read at click time. */
35
+ siblings?: () => DuplicateSiblings;
36
+ /** Where Duplicate creates the copy — a Workflow is project-scoped, the others ignore it. */
37
+ project?: string | null;
38
+ }): import("react").JSX.Element;
@@ -1,25 +1,25 @@
1
- import { CredentialTypeField } from '../repos/credentials.ts';
1
+ export { CredentialFieldInputs, type CredentialFieldValues, allFieldsFilled, sourceFromValues, } from './CredentialFields.tsx';
2
2
  export interface CredentialCreateProps {
3
3
  /** Called with the new credential's id after the server accepted it. */
4
4
  onCreated?: (id: string) => void;
5
5
  /** The Cancel button renders only when given. */
6
6
  onCancel?: () => void;
7
+ /**
8
+ * Opens on the "AI provider key" type with this provider preselected (an AI provider's app id),
9
+ * the deep link a "set up your key" prompt points at.
10
+ */
11
+ aiProvider?: string;
12
+ /** Called after an AI provider key is saved (it has no single credential id to open). */
13
+ onAiKeyCreated?: () => void;
14
+ /**
15
+ * Called after a "One app" credential is saved, with the connection that holds it
16
+ * (`zerocred:<appId>` for an app that needs no credential).
17
+ */
18
+ onAppCredentialCreated?: (connectionId: string) => void;
7
19
  }
8
- /** `field.key -> typed text`. */
9
- export type CredentialFieldValues = Record<string, string>;
10
20
  /**
11
- * One input per descriptor field, controlled by `values`. Secret fields are masked (CSS, never
12
- * `type="password"`, which would trigger the browser's save-password prompt), `multiline` ones are
13
- * textareas. Shared with `CredentialDetail`'s rotate box so both render a type the same way.
21
+ * The type picker's value for a personal AI-provider key. It is not a credential contract: the
22
+ * provider's own auth decides the contract, and some providers hold the key in the connection.
14
23
  */
15
- export declare function CredentialFieldInputs({ fields, values, onChange, idPrefix, }: {
16
- fields: readonly CredentialTypeField[];
17
- values: CredentialFieldValues;
18
- onChange: (key: string, value: string) => void;
19
- idPrefix: string;
20
- }): import("react").JSX.Element;
21
- /** True when every descriptor field has some text. */
22
- export declare const allFieldsFilled: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => boolean;
23
- /** `{ [field.key]: typed text }` — the `source` body, values exactly as typed. */
24
- export declare const sourceFromValues: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => Record<string, string>;
25
- export declare function CredentialCreate({ onCreated, onCancel }: CredentialCreateProps): import("react").JSX.Element;
24
+ export declare const AI_KEY_TYPE = "ai-provider-key";
25
+ export declare function CredentialCreate({ onCreated, onCancel, aiProvider, onAiKeyCreated, onAppCredentialCreated, }: CredentialCreateProps): import("react").JSX.Element;
@@ -12,6 +12,8 @@ export interface CredentialDetailProps {
12
12
  empty?: ReactNode;
13
13
  };
14
14
  }
15
+ /** `client_email` → "Client email", `project_id` → "Project ID": a display key as a label. */
16
+ export declare function factLabel(key: string): string;
15
17
  /**
16
18
  * Keyed by `credentialId`, so switching credentials remounts the body: a value typed for one
17
19
  * credential is never carried to (and posted to) the next.
@@ -0,0 +1,18 @@
1
+ import { CredentialTypeField } from '../repos/credentials.ts';
2
+ /** `field.key -> typed text`. */
3
+ export type CredentialFieldValues = Record<string, string>;
4
+ /**
5
+ * One input per descriptor field, controlled by `values`. Secret fields are masked (CSS, never
6
+ * `type="password"`, which would trigger the browser's save-password prompt), `multiline` ones are
7
+ * textareas — except a multiline SECRET (a key file), which is pasted unmasked and then previewed. Shared with `CredentialDetail`'s rotate box so both render a type the same way.
8
+ */
9
+ export declare function CredentialFieldInputs({ fields, values, onChange, idPrefix, }: {
10
+ fields: readonly CredentialTypeField[];
11
+ values: CredentialFieldValues;
12
+ onChange: (key: string, value: string) => void;
13
+ idPrefix: string;
14
+ }): import("react").JSX.Element;
15
+ /** True when every descriptor field has some text. */
16
+ export declare const allFieldsFilled: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => boolean;
17
+ /** `{ [field.key]: typed text }` — the `source` body, values exactly as typed. */
18
+ export declare const sourceFromValues: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => Record<string, string>;
@@ -1,9 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
+ import { ConnectionSummary } from '../repos/connections.ts';
3
+ import { CredentialSummary } from '../repos/credentials.ts';
2
4
  export interface CredentialListProps {
3
- /** Narrow the list to one credential contract. */
5
+ /** Narrow the list to one credential contract (stored credentials only). */
4
6
  contract?: string;
5
- /** Row click. */
7
+ /** A shared credential's row click. */
6
8
  onOpen?: (id: string) => void;
9
+ /** An app's own credential's row click, with the connection that owns it. */
10
+ onOpenConnection?: (connectionId: string) => void;
7
11
  /** Renders an `Add credential` action in the header and the empty state; the host opens its create form. */
8
12
  onCreate?: () => void;
9
13
  slots?: {
@@ -13,4 +17,32 @@ export interface CredentialListProps {
13
17
  empty?: ReactNode;
14
18
  };
15
19
  }
16
- export declare function CredentialList({ contract, onOpen, onCreate, slots }: CredentialListProps): import("react").JSX.Element;
20
+ /** One connection that uses a credential. */
21
+ export interface CredentialUse {
22
+ connectionId: string;
23
+ appId: string;
24
+ connectionName: string;
25
+ /** The connection's auth method key, e.g. `apiKey`. */
26
+ authKey?: string;
27
+ accessScope?: "account" | "user";
28
+ }
29
+ /** A readable name for an app auth method key: `apiKey` → "API key". */
30
+ export declare function authMethodLabel(authKey: string | undefined): string;
31
+ /** One row of the list: a credential, once, with every connection that uses it. */
32
+ export interface CredentialRow {
33
+ id: string;
34
+ name: string;
35
+ /** `shared` came from `GET /credentials`; `app` is a connection's own credential. */
36
+ source: "shared" | "app";
37
+ /** The summary, for a shared row. */
38
+ summary?: CredentialSummary;
39
+ uses: CredentialUse[];
40
+ }
41
+ /**
42
+ * The list's rows: shared credentials first-class, plus one row per credential a connection uses
43
+ * that is not among them. A credential several connections point at is still one row.
44
+ */
45
+ export declare function credentialRows(shared: readonly CredentialSummary[], connections: readonly Pick<ConnectionSummary, "id" | "appId" | "displayName" | "credentialId" | "authKey" | "accessScope">[], opts: {
46
+ includeAppCredentials: boolean;
47
+ }): CredentialRow[];
48
+ export declare function CredentialList({ contract, onOpen, onOpenConnection, onCreate, slots, }: CredentialListProps): import("react").JSX.Element;
@@ -11,7 +11,8 @@ export interface EndpointListProps {
11
11
  slots?: CallableListProps["slots"];
12
12
  }
13
13
  /**
14
- * The account's Endpoints: rows from `GET /endpoints`, archived ones behind a Show-archived toggle,
14
+ * The account's Endpoints: rows from `GET /endpoints`, filtered by status tabs (All, Ready, Unfinished,
15
+ * Archived) and a search box,
15
16
  * an "Unfinished" tag on drafts (no target yet), a New button that creates an Endpoint
16
17
  * (create-first: the row is POSTed before any editor exists), and Import. Never navigates — the
17
18
  * host wires `onOpen` / `getHref` / `onCreated`.
@@ -11,7 +11,8 @@ export interface WorkflowListProps {
11
11
  slots?: CallableListProps["slots"];
12
12
  }
13
13
  /**
14
- * A project's Workflows: rows from `GET /workflows`, archived ones behind a Show-archived toggle,
14
+ * A project's Workflows: rows from `GET /workflows`, filtered by status tabs (All, Active, Draft,
15
+ * Archived) and a search box,
15
16
  * a New button that creates a blank Workflow (the row is POSTed before any editor exists), and
16
17
  * Import. With no project there is nothing to list and New refuses. Never navigates — the host
17
18
  * wires `onOpen` / `getHref` / `onCreated`.
package/dist/lists.d.ts CHANGED
@@ -32,6 +32,8 @@ export { CredentialDetail } from './lists/CredentialDetail.tsx';
32
32
  export type { CredentialDetailProps } from './lists/CredentialDetail.tsx';
33
33
  export { MyAiKeys } from './lists/MyAiKeys.tsx';
34
34
  export type { MyAiKeysProps } from './lists/MyAiKeys.tsx';
35
+ export { AiKeyCreate } from './lists/AiKeyCreate.tsx';
36
+ export type { AiKeyCreateProps } from './lists/AiKeyCreate.tsx';
35
37
  export { DataStoreList } from './lists/DataStoreList.tsx';
36
38
  export type { DataStoreListProps, DataStoreListSlots } from './lists/DataStoreList.tsx';
37
39
  export { DataStoreView } from './lists/DataStoreView.tsx';