@powerhousedao/workflow 6.2.3-dev.77 → 6.2.3-dev.78
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/node/{BlockSelector-CK8kpn9j.mjs → BlockSelector-DPkwGBjU.mjs} +2 -2
- package/dist/node/BlockSelector-DPkwGBjU.mjs.map +1 -0
- package/dist/node/{connection-form-BGtl3cZO.mjs → connection-form-BbZWaCDq.mjs} +2 -2
- package/dist/node/{connection-form-BGtl3cZO.mjs.map → connection-form-BbZWaCDq.mjs.map} +1 -1
- package/dist/node/{data-tree-Cwsne4gp.mjs → data-tree-D1JRJF6n.mjs} +2 -2
- package/dist/node/{data-tree-Cwsne4gp.mjs.map → data-tree-D1JRJF6n.mjs.map} +1 -1
- package/dist/node/{editor-C0IpiDwS.mjs → editor-Cn6gMioc.mjs} +3 -3
- package/dist/node/{editor-C0IpiDwS.mjs.map → editor-Cn6gMioc.mjs.map} +1 -1
- package/dist/node/{editor-CTcQV6Zl.mjs → editor-DuVFY-uh.mjs} +4 -4
- package/dist/node/{editor-CTcQV6Zl.mjs.map → editor-DuVFY-uh.mjs.map} +1 -1
- package/dist/node/{editor-CjjWhzhk.mjs → editor-_658x5Mq.mjs} +3 -3
- package/dist/node/{editor-CjjWhzhk.mjs.map → editor-_658x5Mq.mjs.map} +1 -1
- package/dist/node/editors/connection-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-studio/module.mjs +1 -1
- package/dist/node/pieces/reactor/descriptor.json +1 -1
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/{trigger-text-i_YVLKp8.mjs → trigger-text-ByepkzE2.mjs} +3 -3
- package/dist/node/{trigger-text-i_YVLKp8.mjs.map → trigger-text-ByepkzE2.mjs.map} +1 -1
- package/dist/powerhouse.manifest.json +1 -1
- package/package.json +8 -8
- package/dist/node/BlockSelector-CK8kpn9j.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as packageFromConnectorId } from "./piece-auth-BS5CtQOG.mjs";
|
|
2
2
|
import { ct as triggerBlock, h as blockRefKey, ot as stepBlock } from "./runtime-queries-CJSpbsBq.mjs";
|
|
3
|
-
import { B as useBlockForms, Bt as Icon, Et as Button, Ht as DocumentErrorBoundary, L as DesignTimeProvider, bt as useRuntime, gt as usePieceCatalog, k as formatWhen, pt as WorkflowRuntimeProvider, t as BlockLogo, xt as useRuntimeActions } from "./BlockSelector-
|
|
3
|
+
import { B as useBlockForms, Bt as Icon, Et as Button, Ht as DocumentErrorBoundary, L as DesignTimeProvider, bt as useRuntime, gt as usePieceCatalog, k as formatWhen, pt as WorkflowRuntimeProvider, t as BlockLogo, xt as useRuntimeActions } from "./BlockSelector-DPkwGBjU.mjs";
|
|
4
4
|
import { F as isReactorConnectorId, I as parseReactorConnectionConfig } from "./module-weVJEMpP.mjs";
|
|
5
5
|
import { i as useSelectedConnectionDocument } from "./connection-i6ISRY0F.mjs";
|
|
6
6
|
import { r as useWorkflowDocumentsInSelectedDrive } from "./workflow-BS5m4jtr.mjs";
|
|
7
|
-
import { a as useSignInGate, c as accessMismatch, d as CONNECTION_STATUS_STYLES, f as connectionCallbacks, m as UndoRedo, n as SignInPrompt, p as BackButton, t as ConnectionForm, u as CONNECTION_STATUS_LABEL } from "./connection-form-
|
|
7
|
+
import { a as useSignInGate, c as accessMismatch, d as CONNECTION_STATUS_STYLES, f as connectionCallbacks, m as UndoRedo, n as SignInPrompt, p as BackButton, t as ConnectionForm, u as CONNECTION_STATUS_LABEL } from "./connection-form-BbZWaCDq.mjs";
|
|
8
8
|
import { showDeleteNodeModal, useSetSelectedNode } from "@powerhousedao/reactor-browser";
|
|
9
9
|
import { useMemo, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -367,4 +367,4 @@ function Editor({ document }) {
|
|
|
367
367
|
//#endregion
|
|
368
368
|
export { Editor as default };
|
|
369
369
|
|
|
370
|
-
//# sourceMappingURL=editor-
|
|
370
|
+
//# sourceMappingURL=editor-_658x5Mq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-CjjWhzhk.mjs","names":[],"sources":["../../editors/connection-editor/connection-usage.ts","../../editors/connection-editor/ConnectionToolbar.tsx","../../editors/connection-editor/ReactorBindings.tsx","../../editors/connection-editor/UsedBy.tsx","../../editors/connection-editor/editor.tsx"],"sourcesContent":["// Which workflows depend on a connection, and where. Answers the question a\n// connection page has to answer before anyone dares revoke or delete it.\n\nexport interface UsageStep {\n id: string;\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n}\n\nexport interface UsageTrigger {\n id?: string;\n pieceName?: string;\n pieceVersion?: string;\n triggerName?: string;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n}\n\nexport interface UsageWorkflow {\n id: string;\n name: string;\n status: string;\n trigger?: UsageTrigger | null;\n steps: readonly UsageStep[];\n}\n\nexport interface ConnectionUsage {\n workflow: UsageWorkflow;\n // The trigger binds this connection, as its connection or reactor connection.\n trigger: boolean;\n steps: UsageStep[];\n // The subset bound as a reactor connection.\n reactorTrigger: boolean;\n reactorSteps: UsageStep[];\n}\n\nfunction binds(\n block: { connectionId?: string | null; reactorConnectionId?: string | null },\n connectionId: string,\n): boolean {\n return (\n block.connectionId === connectionId ||\n block.reactorConnectionId === connectionId\n );\n}\n\nexport function connectionUsage(\n connectionId: string,\n workflows: readonly UsageWorkflow[],\n): ConnectionUsage[] {\n const usage: ConnectionUsage[] = [];\n for (const workflow of workflows) {\n const trigger = Boolean(\n workflow.trigger && binds(workflow.trigger, connectionId),\n );\n const steps = workflow.steps.filter((step) => binds(step, connectionId));\n if (!trigger && steps.length === 0) continue;\n usage.push({\n workflow,\n trigger,\n steps,\n reactorTrigger: workflow.trigger?.reactorConnectionId === connectionId,\n reactorSteps: steps.filter(\n (step) => step.reactorConnectionId === connectionId,\n ),\n });\n }\n return usage.sort((a, b) => a.workflow.name.localeCompare(b.workflow.name));\n}\n\n// An enabled workflow that depends on this connection breaks the moment it is\n// revoked, so the UI warns before that happens.\nexport function enabledDependents(usage: ConnectionUsage[]): number {\n return usage.filter((entry) => entry.workflow.status === \"ENABLED\").length;\n}\n","// Connection identity and state, in the same shape as the workflow editor's\n// toolbar: name, connector, status, and the one destructive action.\nimport { useState } from \"react\";\nimport {\n isReactorConnectorId,\n type ConnectionState,\n} from \"document-models/connection\";\nimport { useSignInGate } from \"../workflow-editor/reactor-hooks.js\";\nimport { SignInPrompt } from \"../workflow-editor/ui/SignInPrompt.js\";\nimport type { ConnectionCheckResult } from \"../workflow-editor/runtime-client.js\";\nimport {\n usePieceCatalog,\n useRuntimeActions,\n} from \"../workflow-editor/runtime-context.js\";\nimport { packageFromConnectorId } from \"./piece-auth.js\";\nimport { Button } from \"../shared/controls.js\";\nimport { Icon } from \"../shared/icons.js\";\nimport { formatWhen } from \"../workflow-studio/components/run-format.js\";\nimport { CONNECTION_STATUS_LABEL, CONNECTION_STATUS_STYLES } from \"./status.js\";\n\n// Runs the piece's own check server-side; the outcome lands on the document.\nfunction useConnectionTest(connectionId: string) {\n const [testing, setTesting] = useState(false);\n const [result, setResult] = useState<ConnectionCheckResult | null>(null);\n const { checkConnection } = useRuntimeActions();\n const test = () => {\n setTesting(true);\n setResult(null);\n checkConnection(connectionId)\n .then(setResult)\n .catch((error: unknown) =>\n setResult({\n ok: false,\n detail: error instanceof Error ? error.message : String(error),\n accountLabel: null,\n }),\n )\n .finally(() => setTesting(false));\n };\n return { testing, result, test };\n}\n\nexport function ConnectionToolbar(props: {\n connectionId: string;\n // Enabled workflows that stop working if this is revoked.\n enabledDependents: number;\n state: ConnectionState;\n onRename: (name: string) => void;\n onSetStatus: (status: \"OK\" | \"REVOKED\") => void;\n onDelete: () => void;\n}) {\n const { state } = props;\n // Shared with the form below through the editor's query cache.\n const catalog = usePieceCatalog().data;\n\n const packageName = packageFromConnectorId(state.connectorId);\n const piece = catalog?.find((entry) => entry.name === packageName);\n const revoked = state.status === \"REVOKED\";\n const { testing, result, test } = useConnectionTest(props.connectionId);\n const reactor = isReactorConnectorId(state.connectorId);\n const gate = useSignInGate();\n const signInFirst = reactor && gate.required;\n\n return (\n <header className=\"mb-8 flex flex-wrap items-start gap-4\">\n <div className=\"flex h-14 w-14 shrink-0 items-center justify-center rounded-xl border border-solid border-foreground/10 bg-white\">\n {piece?.logoUrl ? (\n <img src={piece.logoUrl} alt=\"\" className=\"h-8 w-8 object-contain\" />\n ) : (\n <Icon name=\"link\" className=\"h-6 w-6 text-neutral-500\" />\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <input\n key={state.name}\n className=\"-mx-1.5 w-full max-w-md rounded-md border border-solid border-transparent bg-transparent px-1.5 text-xl font-semibold tracking-tight text-foreground hover:border-foreground/15 focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/25\"\n defaultValue={state.name}\n placeholder=\"Untitled connection\"\n spellCheck={false}\n aria-label=\"Connection name\"\n onKeyDown={(event) => {\n if (event.key === \"Enter\") event.currentTarget.blur();\n }}\n onBlur={(event) => {\n const name = event.target.value.trim();\n if (name && name !== state.name) props.onRename(name);\n }}\n />\n <p className=\"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] text-muted-foreground\">\n <span\n className={`rounded-full px-2 py-0.5 text-xs font-medium ${CONNECTION_STATUS_STYLES[state.status]}`}\n >\n {reactor && state.status === \"OK\"\n ? \"Checked\"\n : CONNECTION_STATUS_LABEL[state.status]}\n </span>\n <span>\n {reactor\n ? \"Powerhouse documents\"\n : (piece?.displayName ?? (packageName || \"No service picked\"))}\n {state.accountLabel ? (\n <>\n {\" \"}\n as{\" \"}\n <span className=\"font-medium text-foreground\">\n {state.accountLabel}\n </span>\n </>\n ) : null}\n </span>\n </p>\n <p\n className=\"mt-1 text-xs text-muted-foreground\"\n title={\n state.lastCheckedAt\n ? new Date(state.lastCheckedAt).toLocaleString()\n : undefined\n }\n >\n {state.lastCheckedAt\n ? `Last checked ${formatWhen(state.lastCheckedAt)}`\n : \"Never checked\"}\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" variant=\"danger\" onClick={props.onDelete}>\n Delete\n </Button>\n <Button\n size=\"sm\"\n title={\n !revoked && props.enabledDependents > 0\n ? `${props.enabledDependents} enabled ${props.enabledDependents === 1 ? \"workflow stops\" : \"workflows stop\"} working while it's revoked`\n : undefined\n }\n onClick={() => props.onSetStatus(revoked ? \"OK\" : \"REVOKED\")}\n >\n {revoked ? \"Reactivate\" : \"Revoke\"}\n </Button>\n <Button\n size=\"sm\"\n variant=\"primary\"\n disabled={testing || revoked || !packageName || signInFirst}\n onClick={test}\n >\n <Icon name=\"check\" className=\"h-3.5 w-3.5\" />\n {reactor\n ? testing\n ? \"Checking…\"\n : \"Check connection\"\n : testing\n ? \"Testing…\"\n : \"Test connection\"}\n </Button>\n </div>\n {signInFirst ? (\n <div className=\"w-full\">\n <SignInPrompt\n gate={gate}\n reason=\"Sign in to check this connection.\"\n />\n </div>\n ) : null}\n {result ? (\n <p\n role=\"status\"\n className={`flex w-full items-start gap-2 rounded-md px-3 py-2 text-xs ${\n result.ok ? \"bg-wf-ok/10 text-wf-ok\" : \"bg-wf-fail/10 text-wf-fail\"\n }`}\n >\n <Icon\n name={result.ok ? \"check\" : \"alert\"}\n className=\"mt-px h-3.5 w-3.5\"\n />\n <span className=\"min-w-0 break-words\">\n {result.ok\n ? reactor\n ? result.detail\n : `It works${result.accountLabel ? `, signed in as ${result.accountLabel}` : \"\"}.`\n : result.detail}\n </span>\n </p>\n ) : null}\n </header>\n );\n}\n","// The steps and triggers that bind a reactor connection, and what each declares.\nimport { parseReactorConnectionConfig } from \"document-models/connection\";\nimport { BlockLogo } from \"../workflow-editor/ui/BlockSelector.js\";\nimport {\n stepBlock,\n triggerBlock,\n type BlockRef,\n} from \"../workflow-editor/ui/blocks.js\";\nimport { useBlockForms } from \"../workflow-editor/ui/design-time.js\";\nimport { blockRefKey } from \"../workflow-editor/ui/query-keys.js\";\nimport { accessMismatch } from \"../workflow-editor/ui/reactor-access.js\";\nimport type { ConnectionUsage } from \"./connection-usage.js\";\n\ninterface Binding {\n workflowId: string;\n workflowName: string;\n stepId: string;\n label: string;\n block: BlockRef;\n}\n\nfunction bindingsOf(usage: readonly ConnectionUsage[]): Binding[] {\n return usage.flatMap((entry) => {\n const { workflow } = entry;\n const trigger = workflow.trigger;\n const triggerBinding: Binding[] =\n entry.reactorTrigger &&\n trigger?.id &&\n trigger.pieceName &&\n trigger.pieceVersion &&\n trigger.triggerName\n ? [\n {\n workflowId: workflow.id,\n workflowName: workflow.name,\n stepId: trigger.id,\n label: \"Trigger\",\n block: triggerBlock({\n pieceName: trigger.pieceName,\n pieceVersion: trigger.pieceVersion,\n triggerName: trigger.triggerName,\n }),\n },\n ]\n : [];\n return [\n ...triggerBinding,\n ...entry.reactorSteps.map((step) => ({\n workflowId: workflow.id,\n workflowName: workflow.name,\n stepId: step.id,\n label: step.name || step.key,\n block: stepBlock(step),\n })),\n ];\n });\n}\n\nconst DECLARED_LABEL = {\n read: \"Reads\",\n write: \"Reads and writes\",\n} as const;\n\nfunction BindingRow(props: {\n binding: Binding;\n declared: \"read\" | \"write\" | null | undefined;\n access: \"read\" | undefined;\n}) {\n const { binding } = props;\n const mismatch = accessMismatch(props.declared, props.access);\n return (\n <li className=\"flex flex-col gap-2 py-2.5\">\n <div className=\"flex items-center gap-2.5 text-[13px]\">\n <BlockLogo block={binding.block} size={16} bare />\n <span className=\"min-w-0 flex-1 truncate\">\n <span className=\"font-medium text-foreground\">\n {binding.workflowName}\n </span>\n <span className=\"text-muted-foreground\"> · {binding.label}</span>\n </span>\n <span\n className=\"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground\"\n aria-label={`${binding.label} declares`}\n >\n {props.declared === undefined\n ? \"…\"\n : props.declared\n ? DECLARED_LABEL[props.declared]\n : \"Declares no access\"}\n </span>\n </div>\n {mismatch ? <p className=\"text-xs text-wf-warn\">{mismatch}</p> : null}\n </li>\n );\n}\n\nexport function ReactorBindings(props: {\n config: unknown;\n usage: readonly ConnectionUsage[];\n}) {\n const bindings = bindingsOf(props.usage);\n const forms = useBlockForms(bindings.map((binding) => binding.block));\n const parsed = parseReactorConnectionConfig(props.config);\n const access = parsed.ok ? parsed.config.access : undefined;\n return (\n <section\n aria-label=\"Steps that use this connection\"\n className=\"mt-8 border-t border-solid border-foreground/10 pt-5\"\n >\n <h3 className=\"text-[13px] font-semibold text-foreground\">\n What the steps declare\n </h3>\n {bindings.length === 0 ? (\n <p className=\"mt-1 text-xs text-muted-foreground\">\n No step binds this connection yet. Pick it as a step's reactor\n connection in a workflow's editor.\n </p>\n ) : (\n <ul className=\"mt-1 divide-y divide-solid divide-foreground/10\">\n {bindings.map((binding) => {\n const form = forms.get(blockRefKey(binding.block));\n return (\n <BindingRow\n key={`${binding.workflowId}:${binding.stepId}`}\n binding={binding}\n declared={\n form === \"loading\"\n ? undefined\n : (form?.requireReactor ?? null)\n }\n access={access}\n />\n );\n })}\n </ul>\n )}\n </section>\n );\n}\n","// The workflows that depend on this connection, and through which steps, so\n// nobody revokes or deletes it blind.\nimport { useSetSelectedNode } from \"@powerhousedao/reactor-browser\";\nimport { useWorkflowDocumentsInSelectedDrive } from \"document-models/workflow\";\nimport { BlockLogo } from \"../workflow-editor/ui/BlockSelector.js\";\nimport { stepBlock } from \"../workflow-editor/ui/blocks.js\";\nimport {\n connectionUsage,\n type ConnectionUsage,\n type UsageWorkflow,\n} from \"./connection-usage.js\";\n\nexport function useConnectionUsage(connectionId: string) {\n const workflows = useWorkflowDocumentsInSelectedDrive() ?? [];\n return connectionUsage(\n connectionId,\n workflows.map((workflow): UsageWorkflow => ({\n id: workflow.header.id,\n name: workflow.state.global.name || workflow.header.name || \"Untitled\",\n status: workflow.state.global.status,\n trigger: workflow.state.global.trigger,\n steps: workflow.state.global.steps,\n })),\n );\n}\n\nexport function UsedBy(props: { usage: ConnectionUsage[] }) {\n const { usage } = props;\n const setSelectedNode = useSetSelectedNode();\n return (\n <section className=\"mt-8 border-t border-solid border-foreground/10 pt-5\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Used by</h3>\n {usage.length === 0 ? (\n <p className=\"mt-1 text-xs text-muted-foreground\">\n No workflow uses this connection yet. Pick it on a step in a\n workflow's editor.\n </p>\n ) : (\n <ul className=\"-mx-2 mt-2 flex flex-col\">\n {usage.map((entry) => (\n <li key={entry.workflow.id}>\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-3 rounded-md px-2 py-2 text-left text-[13px] hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n onClick={() => setSelectedNode(entry.workflow.id)}\n >\n <span className=\"shrink-0 font-medium text-foreground\">\n {entry.workflow.name}\n </span>\n {entry.workflow.status !== \"ENABLED\" ? (\n <span className=\"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground\">\n {entry.workflow.status.charAt(0) +\n entry.workflow.status.slice(1).toLowerCase()}\n </span>\n ) : null}\n <span className=\"flex min-w-0 items-center gap-1.5 truncate text-xs text-muted-foreground\">\n {entry.steps.map((step) => (\n <span\n key={step.id}\n className=\"inline-flex items-center gap-1\"\n >\n <BlockLogo block={stepBlock(step)} size={14} bare />\n {step.name || step.key}\n </span>\n ))}\n {entry.trigger ? <span>Trigger</span> : null}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n}\n","import { showDeleteNodeModal } from \"@powerhousedao/reactor-browser\";\nimport type { EditorProps } from \"document-model\";\nimport type {\n ConnectionAction,\n ConnectionDocument,\n} from \"document-models/connection\";\nimport {\n isReactorConnectorId,\n useSelectedConnectionDocument,\n} from \"document-models/connection\";\nimport { useMemo } from \"react\";\nimport { DocumentErrorBoundary } from \"../shared/DocumentErrorBoundary.js\";\nimport { BackButton, UndoRedo } from \"../shared/editor-chrome.js\";\nimport {\n useRuntime,\n WorkflowRuntimeProvider,\n} from \"../workflow-editor/runtime-context.js\";\nimport { DesignTimeProvider } from \"../workflow-editor/ui/design-time.js\";\nimport type { DesignTimeService } from \"../workflow-editor/ui/forms.js\";\nimport { connectionCallbacks } from \"./connection-callbacks.js\";\nimport { ConnectionForm } from \"./connection-form.js\";\nimport { enabledDependents } from \"./connection-usage.js\";\nimport { ConnectionToolbar } from \"./ConnectionToolbar.js\";\nimport { ReactorBindings } from \"./ReactorBindings.js\";\nimport { UsedBy, useConnectionUsage } from \"./UsedBy.js\";\n\nfunction ConnectionEditor() {\n const [document, dispatch] = useSelectedConnectionDocument();\n const state = document.state.global;\n const { client, queryClient } = useRuntime();\n // Block forms, for what each step that binds a reactor connection declares.\n const designTime = useMemo<DesignTimeService>(\n () => ({\n getBlockForm: (block) => client.getBlockForm(block),\n loadOptions: (...args) => client.loadBlockOptions(...args),\n }),\n [client],\n );\n\n const callbacks = connectionCallbacks(state, dispatch);\n const usage = useConnectionUsage(document.header.id);\n const reactor = isReactorConnectorId(state.connectorId);\n\n return (\n <DesignTimeProvider\n service={designTime}\n queryClient={queryClient}\n scope={client.url}\n >\n <div className=\"flex h-full min-h-0 flex-col bg-background\">\n <div className=\"flex items-center justify-between border-b border-solid border-foreground/10 px-4 py-2\">\n <BackButton documentId={document.header.id} />\n <UndoRedo documentId={document.header.id} />\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto\">\n <div className=\"mx-auto w-full max-w-2xl px-6 py-10\">\n <ConnectionToolbar\n connectionId={document.header.id}\n enabledDependents={enabledDependents(usage)}\n state={state}\n onRename={callbacks.setName}\n onSetStatus={callbacks.setStatus}\n onDelete={() => showDeleteNodeModal(document.header.id)}\n />\n <ConnectionForm\n state={state}\n callbacks={callbacks}\n connectionId={document.header.id}\n />\n {reactor ? (\n <ReactorBindings config={state.config} usage={usage} />\n ) : null}\n <UsedBy usage={usage} />\n </div>\n </div>\n </div>\n </DesignTimeProvider>\n );\n}\n\n// A drive node can point at a document the reactor cannot serve; the document\n// hooks throw for it. The boundary keeps that failure inside the editor pane.\nexport default function Editor({\n document,\n}: EditorProps<ConnectionDocument, ConnectionAction>) {\n return (\n <DocumentErrorBoundary documentId={document.header.id}>\n <WorkflowRuntimeProvider>\n <ConnectionEditor />\n </WorkflowRuntimeProvider>\n </DocumentErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyCA,SAAS,MACP,OACA,cACS;CACT,OACE,MAAM,iBAAiB,gBACvB,MAAM,wBAAwB;AAElC;AAEA,SAAgB,gBACd,cACA,WACmB;CACnB,MAAM,QAA2B,CAAC;CAClC,KAAK,MAAM,YAAY,WAAW;EAChC,MAAM,UAAU,QACd,SAAS,WAAW,MAAM,SAAS,SAAS,YAAY,CAC1D;EACA,MAAM,QAAQ,SAAS,MAAM,QAAQ,SAAS,MAAM,MAAM,YAAY,CAAC;EACvE,IAAI,CAAC,WAAW,MAAM,WAAW,GAAG;EACpC,MAAM,KAAK;GACT;GACA;GACA;GACA,gBAAgB,SAAS,SAAS,wBAAwB;GAC1D,cAAc,MAAM,QACjB,SAAS,KAAK,wBAAwB,YACzC;EACF,CAAC;CACH;CACA,OAAO,MAAM,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,cAAc,EAAE,SAAS,IAAI,CAAC;AAC5E;AAIA,SAAgB,kBAAkB,OAAkC;CAClE,OAAO,MAAM,QAAQ,UAAU,MAAM,SAAS,WAAW,SAAS,CAAC,CAAC;AACtE;;;AC1DA,SAAS,kBAAkB,cAAsB;CAC/C,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,CAAC,QAAQ,aAAa,SAAuC,IAAI;CACvE,MAAM,EAAE,oBAAoB,kBAAkB;CAC9C,MAAM,aAAa;EACjB,WAAW,IAAI;EACf,UAAU,IAAI;EACd,gBAAgB,YAAY,CAAC,CAC1B,KAAK,SAAS,CAAC,CACf,OAAO,UACN,UAAU;GACR,IAAI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_658x5Mq.mjs","names":[],"sources":["../../editors/connection-editor/connection-usage.ts","../../editors/connection-editor/ConnectionToolbar.tsx","../../editors/connection-editor/ReactorBindings.tsx","../../editors/connection-editor/UsedBy.tsx","../../editors/connection-editor/editor.tsx"],"sourcesContent":["// Which workflows depend on a connection, and where. Answers the question a\n// connection page has to answer before anyone dares revoke or delete it.\n\nexport interface UsageStep {\n id: string;\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n}\n\nexport interface UsageTrigger {\n id?: string;\n pieceName?: string;\n pieceVersion?: string;\n triggerName?: string;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n}\n\nexport interface UsageWorkflow {\n id: string;\n name: string;\n status: string;\n trigger?: UsageTrigger | null;\n steps: readonly UsageStep[];\n}\n\nexport interface ConnectionUsage {\n workflow: UsageWorkflow;\n // The trigger binds this connection, as its connection or reactor connection.\n trigger: boolean;\n steps: UsageStep[];\n // The subset bound as a reactor connection.\n reactorTrigger: boolean;\n reactorSteps: UsageStep[];\n}\n\nfunction binds(\n block: { connectionId?: string | null; reactorConnectionId?: string | null },\n connectionId: string,\n): boolean {\n return (\n block.connectionId === connectionId ||\n block.reactorConnectionId === connectionId\n );\n}\n\nexport function connectionUsage(\n connectionId: string,\n workflows: readonly UsageWorkflow[],\n): ConnectionUsage[] {\n const usage: ConnectionUsage[] = [];\n for (const workflow of workflows) {\n const trigger = Boolean(\n workflow.trigger && binds(workflow.trigger, connectionId),\n );\n const steps = workflow.steps.filter((step) => binds(step, connectionId));\n if (!trigger && steps.length === 0) continue;\n usage.push({\n workflow,\n trigger,\n steps,\n reactorTrigger: workflow.trigger?.reactorConnectionId === connectionId,\n reactorSteps: steps.filter(\n (step) => step.reactorConnectionId === connectionId,\n ),\n });\n }\n return usage.sort((a, b) => a.workflow.name.localeCompare(b.workflow.name));\n}\n\n// An enabled workflow that depends on this connection breaks the moment it is\n// revoked, so the UI warns before that happens.\nexport function enabledDependents(usage: ConnectionUsage[]): number {\n return usage.filter((entry) => entry.workflow.status === \"ENABLED\").length;\n}\n","// Connection identity and state, in the same shape as the workflow editor's\n// toolbar: name, connector, status, and the one destructive action.\nimport { useState } from \"react\";\nimport {\n isReactorConnectorId,\n type ConnectionState,\n} from \"document-models/connection\";\nimport { useSignInGate } from \"../workflow-editor/reactor-hooks.js\";\nimport { SignInPrompt } from \"../workflow-editor/ui/SignInPrompt.js\";\nimport type { ConnectionCheckResult } from \"../workflow-editor/runtime-client.js\";\nimport {\n usePieceCatalog,\n useRuntimeActions,\n} from \"../workflow-editor/runtime-context.js\";\nimport { packageFromConnectorId } from \"./piece-auth.js\";\nimport { Button } from \"../shared/controls.js\";\nimport { Icon } from \"../shared/icons.js\";\nimport { formatWhen } from \"../workflow-studio/components/run-format.js\";\nimport { CONNECTION_STATUS_LABEL, CONNECTION_STATUS_STYLES } from \"./status.js\";\n\n// Runs the piece's own check server-side; the outcome lands on the document.\nfunction useConnectionTest(connectionId: string) {\n const [testing, setTesting] = useState(false);\n const [result, setResult] = useState<ConnectionCheckResult | null>(null);\n const { checkConnection } = useRuntimeActions();\n const test = () => {\n setTesting(true);\n setResult(null);\n checkConnection(connectionId)\n .then(setResult)\n .catch((error: unknown) =>\n setResult({\n ok: false,\n detail: error instanceof Error ? error.message : String(error),\n accountLabel: null,\n }),\n )\n .finally(() => setTesting(false));\n };\n return { testing, result, test };\n}\n\nexport function ConnectionToolbar(props: {\n connectionId: string;\n // Enabled workflows that stop working if this is revoked.\n enabledDependents: number;\n state: ConnectionState;\n onRename: (name: string) => void;\n onSetStatus: (status: \"OK\" | \"REVOKED\") => void;\n onDelete: () => void;\n}) {\n const { state } = props;\n // Shared with the form below through the editor's query cache.\n const catalog = usePieceCatalog().data;\n\n const packageName = packageFromConnectorId(state.connectorId);\n const piece = catalog?.find((entry) => entry.name === packageName);\n const revoked = state.status === \"REVOKED\";\n const { testing, result, test } = useConnectionTest(props.connectionId);\n const reactor = isReactorConnectorId(state.connectorId);\n const gate = useSignInGate();\n const signInFirst = reactor && gate.required;\n\n return (\n <header className=\"mb-8 flex flex-wrap items-start gap-4\">\n <div className=\"flex h-14 w-14 shrink-0 items-center justify-center rounded-xl border border-solid border-foreground/10 bg-white\">\n {piece?.logoUrl ? (\n <img src={piece.logoUrl} alt=\"\" className=\"h-8 w-8 object-contain\" />\n ) : (\n <Icon name=\"link\" className=\"h-6 w-6 text-neutral-500\" />\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <input\n key={state.name}\n className=\"-mx-1.5 w-full max-w-md rounded-md border border-solid border-transparent bg-transparent px-1.5 text-xl font-semibold tracking-tight text-foreground hover:border-foreground/15 focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/25\"\n defaultValue={state.name}\n placeholder=\"Untitled connection\"\n spellCheck={false}\n aria-label=\"Connection name\"\n onKeyDown={(event) => {\n if (event.key === \"Enter\") event.currentTarget.blur();\n }}\n onBlur={(event) => {\n const name = event.target.value.trim();\n if (name && name !== state.name) props.onRename(name);\n }}\n />\n <p className=\"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] text-muted-foreground\">\n <span\n className={`rounded-full px-2 py-0.5 text-xs font-medium ${CONNECTION_STATUS_STYLES[state.status]}`}\n >\n {reactor && state.status === \"OK\"\n ? \"Checked\"\n : CONNECTION_STATUS_LABEL[state.status]}\n </span>\n <span>\n {reactor\n ? \"Powerhouse documents\"\n : (piece?.displayName ?? (packageName || \"No service picked\"))}\n {state.accountLabel ? (\n <>\n {\" \"}\n as{\" \"}\n <span className=\"font-medium text-foreground\">\n {state.accountLabel}\n </span>\n </>\n ) : null}\n </span>\n </p>\n <p\n className=\"mt-1 text-xs text-muted-foreground\"\n title={\n state.lastCheckedAt\n ? new Date(state.lastCheckedAt).toLocaleString()\n : undefined\n }\n >\n {state.lastCheckedAt\n ? `Last checked ${formatWhen(state.lastCheckedAt)}`\n : \"Never checked\"}\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" variant=\"danger\" onClick={props.onDelete}>\n Delete\n </Button>\n <Button\n size=\"sm\"\n title={\n !revoked && props.enabledDependents > 0\n ? `${props.enabledDependents} enabled ${props.enabledDependents === 1 ? \"workflow stops\" : \"workflows stop\"} working while it's revoked`\n : undefined\n }\n onClick={() => props.onSetStatus(revoked ? \"OK\" : \"REVOKED\")}\n >\n {revoked ? \"Reactivate\" : \"Revoke\"}\n </Button>\n <Button\n size=\"sm\"\n variant=\"primary\"\n disabled={testing || revoked || !packageName || signInFirst}\n onClick={test}\n >\n <Icon name=\"check\" className=\"h-3.5 w-3.5\" />\n {reactor\n ? testing\n ? \"Checking…\"\n : \"Check connection\"\n : testing\n ? \"Testing…\"\n : \"Test connection\"}\n </Button>\n </div>\n {signInFirst ? (\n <div className=\"w-full\">\n <SignInPrompt\n gate={gate}\n reason=\"Sign in to check this connection.\"\n />\n </div>\n ) : null}\n {result ? (\n <p\n role=\"status\"\n className={`flex w-full items-start gap-2 rounded-md px-3 py-2 text-xs ${\n result.ok ? \"bg-wf-ok/10 text-wf-ok\" : \"bg-wf-fail/10 text-wf-fail\"\n }`}\n >\n <Icon\n name={result.ok ? \"check\" : \"alert\"}\n className=\"mt-px h-3.5 w-3.5\"\n />\n <span className=\"min-w-0 break-words\">\n {result.ok\n ? reactor\n ? result.detail\n : `It works${result.accountLabel ? `, signed in as ${result.accountLabel}` : \"\"}.`\n : result.detail}\n </span>\n </p>\n ) : null}\n </header>\n );\n}\n","// The steps and triggers that bind a reactor connection, and what each declares.\nimport { parseReactorConnectionConfig } from \"document-models/connection\";\nimport { BlockLogo } from \"../workflow-editor/ui/BlockSelector.js\";\nimport {\n stepBlock,\n triggerBlock,\n type BlockRef,\n} from \"../workflow-editor/ui/blocks.js\";\nimport { useBlockForms } from \"../workflow-editor/ui/design-time.js\";\nimport { blockRefKey } from \"../workflow-editor/ui/query-keys.js\";\nimport { accessMismatch } from \"../workflow-editor/ui/reactor-access.js\";\nimport type { ConnectionUsage } from \"./connection-usage.js\";\n\ninterface Binding {\n workflowId: string;\n workflowName: string;\n stepId: string;\n label: string;\n block: BlockRef;\n}\n\nfunction bindingsOf(usage: readonly ConnectionUsage[]): Binding[] {\n return usage.flatMap((entry) => {\n const { workflow } = entry;\n const trigger = workflow.trigger;\n const triggerBinding: Binding[] =\n entry.reactorTrigger &&\n trigger?.id &&\n trigger.pieceName &&\n trigger.pieceVersion &&\n trigger.triggerName\n ? [\n {\n workflowId: workflow.id,\n workflowName: workflow.name,\n stepId: trigger.id,\n label: \"Trigger\",\n block: triggerBlock({\n pieceName: trigger.pieceName,\n pieceVersion: trigger.pieceVersion,\n triggerName: trigger.triggerName,\n }),\n },\n ]\n : [];\n return [\n ...triggerBinding,\n ...entry.reactorSteps.map((step) => ({\n workflowId: workflow.id,\n workflowName: workflow.name,\n stepId: step.id,\n label: step.name || step.key,\n block: stepBlock(step),\n })),\n ];\n });\n}\n\nconst DECLARED_LABEL = {\n read: \"Reads\",\n write: \"Reads and writes\",\n} as const;\n\nfunction BindingRow(props: {\n binding: Binding;\n declared: \"read\" | \"write\" | null | undefined;\n access: \"read\" | undefined;\n}) {\n const { binding } = props;\n const mismatch = accessMismatch(props.declared, props.access);\n return (\n <li className=\"flex flex-col gap-2 py-2.5\">\n <div className=\"flex items-center gap-2.5 text-[13px]\">\n <BlockLogo block={binding.block} size={16} bare />\n <span className=\"min-w-0 flex-1 truncate\">\n <span className=\"font-medium text-foreground\">\n {binding.workflowName}\n </span>\n <span className=\"text-muted-foreground\"> · {binding.label}</span>\n </span>\n <span\n className=\"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground\"\n aria-label={`${binding.label} declares`}\n >\n {props.declared === undefined\n ? \"…\"\n : props.declared\n ? DECLARED_LABEL[props.declared]\n : \"Declares no access\"}\n </span>\n </div>\n {mismatch ? <p className=\"text-xs text-wf-warn\">{mismatch}</p> : null}\n </li>\n );\n}\n\nexport function ReactorBindings(props: {\n config: unknown;\n usage: readonly ConnectionUsage[];\n}) {\n const bindings = bindingsOf(props.usage);\n const forms = useBlockForms(bindings.map((binding) => binding.block));\n const parsed = parseReactorConnectionConfig(props.config);\n const access = parsed.ok ? parsed.config.access : undefined;\n return (\n <section\n aria-label=\"Steps that use this connection\"\n className=\"mt-8 border-t border-solid border-foreground/10 pt-5\"\n >\n <h3 className=\"text-[13px] font-semibold text-foreground\">\n What the steps declare\n </h3>\n {bindings.length === 0 ? (\n <p className=\"mt-1 text-xs text-muted-foreground\">\n No step binds this connection yet. Pick it as a step's reactor\n connection in a workflow's editor.\n </p>\n ) : (\n <ul className=\"mt-1 divide-y divide-solid divide-foreground/10\">\n {bindings.map((binding) => {\n const form = forms.get(blockRefKey(binding.block));\n return (\n <BindingRow\n key={`${binding.workflowId}:${binding.stepId}`}\n binding={binding}\n declared={\n form === \"loading\"\n ? undefined\n : (form?.requireReactor ?? null)\n }\n access={access}\n />\n );\n })}\n </ul>\n )}\n </section>\n );\n}\n","// The workflows that depend on this connection, and through which steps, so\n// nobody revokes or deletes it blind.\nimport { useSetSelectedNode } from \"@powerhousedao/reactor-browser\";\nimport { useWorkflowDocumentsInSelectedDrive } from \"document-models/workflow\";\nimport { BlockLogo } from \"../workflow-editor/ui/BlockSelector.js\";\nimport { stepBlock } from \"../workflow-editor/ui/blocks.js\";\nimport {\n connectionUsage,\n type ConnectionUsage,\n type UsageWorkflow,\n} from \"./connection-usage.js\";\n\nexport function useConnectionUsage(connectionId: string) {\n const workflows = useWorkflowDocumentsInSelectedDrive() ?? [];\n return connectionUsage(\n connectionId,\n workflows.map((workflow): UsageWorkflow => ({\n id: workflow.header.id,\n name: workflow.state.global.name || workflow.header.name || \"Untitled\",\n status: workflow.state.global.status,\n trigger: workflow.state.global.trigger,\n steps: workflow.state.global.steps,\n })),\n );\n}\n\nexport function UsedBy(props: { usage: ConnectionUsage[] }) {\n const { usage } = props;\n const setSelectedNode = useSetSelectedNode();\n return (\n <section className=\"mt-8 border-t border-solid border-foreground/10 pt-5\">\n <h3 className=\"text-[13px] font-semibold text-foreground\">Used by</h3>\n {usage.length === 0 ? (\n <p className=\"mt-1 text-xs text-muted-foreground\">\n No workflow uses this connection yet. Pick it on a step in a\n workflow's editor.\n </p>\n ) : (\n <ul className=\"-mx-2 mt-2 flex flex-col\">\n {usage.map((entry) => (\n <li key={entry.workflow.id}>\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-3 rounded-md px-2 py-2 text-left text-[13px] hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n onClick={() => setSelectedNode(entry.workflow.id)}\n >\n <span className=\"shrink-0 font-medium text-foreground\">\n {entry.workflow.name}\n </span>\n {entry.workflow.status !== \"ENABLED\" ? (\n <span className=\"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground\">\n {entry.workflow.status.charAt(0) +\n entry.workflow.status.slice(1).toLowerCase()}\n </span>\n ) : null}\n <span className=\"flex min-w-0 items-center gap-1.5 truncate text-xs text-muted-foreground\">\n {entry.steps.map((step) => (\n <span\n key={step.id}\n className=\"inline-flex items-center gap-1\"\n >\n <BlockLogo block={stepBlock(step)} size={14} bare />\n {step.name || step.key}\n </span>\n ))}\n {entry.trigger ? <span>Trigger</span> : null}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n}\n","import { showDeleteNodeModal } from \"@powerhousedao/reactor-browser\";\nimport type { EditorProps } from \"document-model\";\nimport type {\n ConnectionAction,\n ConnectionDocument,\n} from \"document-models/connection\";\nimport {\n isReactorConnectorId,\n useSelectedConnectionDocument,\n} from \"document-models/connection\";\nimport { useMemo } from \"react\";\nimport { DocumentErrorBoundary } from \"../shared/DocumentErrorBoundary.js\";\nimport { BackButton, UndoRedo } from \"../shared/editor-chrome.js\";\nimport {\n useRuntime,\n WorkflowRuntimeProvider,\n} from \"../workflow-editor/runtime-context.js\";\nimport { DesignTimeProvider } from \"../workflow-editor/ui/design-time.js\";\nimport type { DesignTimeService } from \"../workflow-editor/ui/forms.js\";\nimport { connectionCallbacks } from \"./connection-callbacks.js\";\nimport { ConnectionForm } from \"./connection-form.js\";\nimport { enabledDependents } from \"./connection-usage.js\";\nimport { ConnectionToolbar } from \"./ConnectionToolbar.js\";\nimport { ReactorBindings } from \"./ReactorBindings.js\";\nimport { UsedBy, useConnectionUsage } from \"./UsedBy.js\";\n\nfunction ConnectionEditor() {\n const [document, dispatch] = useSelectedConnectionDocument();\n const state = document.state.global;\n const { client, queryClient } = useRuntime();\n // Block forms, for what each step that binds a reactor connection declares.\n const designTime = useMemo<DesignTimeService>(\n () => ({\n getBlockForm: (block) => client.getBlockForm(block),\n loadOptions: (...args) => client.loadBlockOptions(...args),\n }),\n [client],\n );\n\n const callbacks = connectionCallbacks(state, dispatch);\n const usage = useConnectionUsage(document.header.id);\n const reactor = isReactorConnectorId(state.connectorId);\n\n return (\n <DesignTimeProvider\n service={designTime}\n queryClient={queryClient}\n scope={client.url}\n >\n <div className=\"flex h-full min-h-0 flex-col bg-background\">\n <div className=\"flex items-center justify-between border-b border-solid border-foreground/10 px-4 py-2\">\n <BackButton documentId={document.header.id} />\n <UndoRedo documentId={document.header.id} />\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto\">\n <div className=\"mx-auto w-full max-w-2xl px-6 py-10\">\n <ConnectionToolbar\n connectionId={document.header.id}\n enabledDependents={enabledDependents(usage)}\n state={state}\n onRename={callbacks.setName}\n onSetStatus={callbacks.setStatus}\n onDelete={() => showDeleteNodeModal(document.header.id)}\n />\n <ConnectionForm\n state={state}\n callbacks={callbacks}\n connectionId={document.header.id}\n />\n {reactor ? (\n <ReactorBindings config={state.config} usage={usage} />\n ) : null}\n <UsedBy usage={usage} />\n </div>\n </div>\n </div>\n </DesignTimeProvider>\n );\n}\n\n// A drive node can point at a document the reactor cannot serve; the document\n// hooks throw for it. The boundary keeps that failure inside the editor pane.\nexport default function Editor({\n document,\n}: EditorProps<ConnectionDocument, ConnectionAction>) {\n return (\n <DocumentErrorBoundary documentId={document.header.id}>\n <WorkflowRuntimeProvider>\n <ConnectionEditor />\n </WorkflowRuntimeProvider>\n </DocumentErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyCA,SAAS,MACP,OACA,cACS;CACT,OACE,MAAM,iBAAiB,gBACvB,MAAM,wBAAwB;AAElC;AAEA,SAAgB,gBACd,cACA,WACmB;CACnB,MAAM,QAA2B,CAAC;CAClC,KAAK,MAAM,YAAY,WAAW;EAChC,MAAM,UAAU,QACd,SAAS,WAAW,MAAM,SAAS,SAAS,YAAY,CAC1D;EACA,MAAM,QAAQ,SAAS,MAAM,QAAQ,SAAS,MAAM,MAAM,YAAY,CAAC;EACvE,IAAI,CAAC,WAAW,MAAM,WAAW,GAAG;EACpC,MAAM,KAAK;GACT;GACA;GACA;GACA,gBAAgB,SAAS,SAAS,wBAAwB;GAC1D,cAAc,MAAM,QACjB,SAAS,KAAK,wBAAwB,YACzC;EACF,CAAC;CACH;CACA,OAAO,MAAM,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,cAAc,EAAE,SAAS,IAAI,CAAC;AAC5E;AAIA,SAAgB,kBAAkB,OAAkC;CAClE,OAAO,MAAM,QAAQ,UAAU,MAAM,SAAS,WAAW,SAAS,CAAC,CAAC;AACtE;;;AC1DA,SAAS,kBAAkB,cAAsB;CAC/C,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,CAAC,QAAQ,aAAa,SAAuC,IAAI;CACvE,MAAM,EAAE,oBAAoB,kBAAkB;CAC9C,MAAM,aAAa;EACjB,WAAW,IAAI;EACf,UAAU,IAAI;EACd,gBAAgB,YAAY,CAAC,CAC1B,KAAK,SAAS,CAAC,CACf,OAAO,UACN,UAAU;GACR,IAAI;GACJ,QAAQ,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC7D,cAAc;EAChB,CAAC,CACH,CAAC,CACA,cAAc,WAAW,KAAK,CAAC;CACpC;CACA,OAAO;EAAE;EAA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CAAC,MAAM,CACT;CAEA,MAAM,YAAY,oBAAoB,OAAO,QAAQ;CACrD,MAAM,QAAQ,mBAAmB,SAAS,OAAO,EAAE;CACnD,MAAM,UAAU,qBAAqB,MAAM,WAAW;CAEtD,OACE,oBAAC,oBAAD;EACE,SAAS;EACI;EACb,OAAO,OAAO;EAEd,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,oBAAC,YAAD,EAAY,YAAY,SAAS,OAAO,GAAK,CAAA,GAC7C,oBAAC,UAAD,EAAU,YAAY,SAAS,OAAO,GAAK,CAAA,CACxC;GACL,CAAA,GAAA,oBAAC,OAAD;IAAK,WAAU;IACb,UAAA,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACE,oBAAC,mBAAD;OACE,cAAc,SAAS,OAAO;OAC9B,mBAAmB,kBAAkB,KAAK;OACnC;OACP,UAAU,UAAU;OACpB,aAAa,UAAU;OACvB,gBAAgB,oBAAoB,SAAS,OAAO,EAAE;MACvD,CAAA;MACD,oBAAC,gBAAD;OACS;OACI;OACX,cAAc,SAAS,OAAO;MAC/B,CAAA;MACA,UACC,oBAAC,iBAAD;OAAiB,QAAQ,MAAM;OAAe;MAAQ,CAAA,IACpD;MACJ,oBAAC,QAAD,EAAe,MAAQ,CAAA;KACpB;;GACF,CAAA,CACF;;CACa,CAAA;AAExB;AAIA,SAAwB,OAAO,EAC7B,YACoD;CACpD,OACE,oBAAC,uBAAD;EAAuB,YAAY,SAAS,OAAO;EACjD,UAAA,oBAAC,yBAAD,EAAA,UACE,oBAAC,kBAAD,CAAmB,CAAA,EACI,CAAA;CACJ,CAAA;AAE3B"}
|
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/connection-editor/module.ts
|
|
3
3
|
/** Document editor module for the "powerhouse/connection" document type */
|
|
4
4
|
const ConnectionEditor = {
|
|
5
|
-
Component: lazy(() => import("../../editor-
|
|
5
|
+
Component: lazy(() => import("../../editor-_658x5Mq.mjs")),
|
|
6
6
|
documentTypes: ["powerhouse/connection"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "connection-editor",
|
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/workflow-editor/module.ts
|
|
3
3
|
/** Document editor module for the "powerhouse/workflow" document type */
|
|
4
4
|
const WorkflowEditor = {
|
|
5
|
-
Component: lazy(() => import("../../editor-
|
|
5
|
+
Component: lazy(() => import("../../editor-DuVFY-uh.mjs")),
|
|
6
6
|
documentTypes: ["powerhouse/workflow"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "workflow-editor",
|
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/workflow-studio/module.ts
|
|
3
3
|
/** Document editor module for the "powerhouse/document-drive" document type */
|
|
4
4
|
const WorkflowStudio = {
|
|
5
|
-
Component: lazy(() => import("../../editor-
|
|
5
|
+
Component: lazy(() => import("../../editor-Cn6gMioc.mjs")),
|
|
6
6
|
documentTypes: ["powerhouse/document-drive"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "workflow-studio",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/piece-reactor",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.78",
|
|
4
4
|
"displayName": "Powerhouse Reactor",
|
|
5
5
|
"logoUrl": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTQgMTE0IiBmaWxsPSJub25lIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzE2MTYxNiIgZD0iTTcxLjI5MTkgMEwyNC4zNDE1IDM4Ljg3NzJDMTcuNDU0OCA0NC41Nzk4IDE2Ljk1MzkgNTQuOTY1OSAyMy4yNiA2MS4zMDQ3TDM5LjUwMjggNzcuNjMxOEM0NC4yNjg0IDgyLjQyMjEgNDUuMjk5NiA4OS43ODM0IDQyLjAzMzUgOTUuNjk4OEwzMS45MjkgMTE0SDE1LjJDNi44MDUyNyAxMTQgMCAxMDcuMTk1IDAgOTguOFYxNS4yQzAgNi44MDUyNyA2LjgwNTI3IDAgMTUuMiAwSDcxLjI5MTlaTTgwLjExMSAwTDcxLjM0MTIgMTUuOTc1OEM2OC4xMDc4IDIxLjg2NiA2OS4xMjU1IDI5LjE4MDQgNzMuODQ0MSAzMy45NjQxTDkxLjA3NTEgNTEuNDMzMUM5Ny4zNjc0IDU3LjgxMjQgOTYuODA0NCA2OC4yMjI3IDg5Ljg2MDcgNzMuODg2MUw0MC42NzgyIDExNEg5OC44QzEwNy4xOTUgMTE0IDExNCAxMDcuMTk1IDExNCA5OC44VjE1LjJDMTE0IDYuODA1MjcgMTA3LjE5NSAwIDk4LjggMEg4MC4xMTFaIi8+PC9zdmc+",
|
|
6
6
|
"actions": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/piece-reactor",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.78",
|
|
4
4
|
"description": "Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state and schemas, and fire on document events.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as SCHEDULE_TRIGGER, Z as MANUAL_TRIGGER, _t as isDocumentRefMarker, dt as DOCUMENT_REF_KEY, mt as documentRefsIn, nt as WEBHOOK_TRIGGER, yt as parseScheduleConfig } from "./runtime-queries-CJSpbsBq.mjs";
|
|
2
2
|
import { t as blockKey } from "./block-type-kX-27vVt.mjs";
|
|
3
|
-
import { At as IconButton, Et as Button, Ft as Toggle, It as Tooltip, f as blockMeta } from "./BlockSelector-
|
|
3
|
+
import { At as IconButton, Et as Button, Ft as Toggle, It as Tooltip, f as blockMeta } from "./BlockSelector-DPkwGBjU.mjs";
|
|
4
4
|
import { useSetSelectedNode } from "@powerhousedao/reactor-browser";
|
|
5
5
|
import { Suspense, lazy, useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -270,7 +270,7 @@ function DocumentRefs(props) {
|
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region editors/shared/data-viewer.tsx
|
|
273
|
-
const DataTree = lazy(() => import("./data-tree-
|
|
273
|
+
const DataTree = lazy(() => import("./data-tree-D1JRJF6n.mjs"));
|
|
274
274
|
function stringify(value) {
|
|
275
275
|
try {
|
|
276
276
|
return JSON.stringify(value, null, 2) ?? "";
|
|
@@ -489,4 +489,4 @@ function describeTrigger(trigger) {
|
|
|
489
489
|
//#endregion
|
|
490
490
|
export { StepError as a, PublishState as c, StatusToggle as d, usePublish as f, uniqueStepKey as g, hasDraftChanges as h, DataViewer as i, PublishedMissingNote as l, VARIABLES_VIEW as m, describeSchedule as n, DraftBanner as o, STEP_PARAM as p, describeTrigger as r, PublishButton as s, describeCron as t, ReactorDenialNote as u };
|
|
491
491
|
|
|
492
|
-
//# sourceMappingURL=trigger-text-
|
|
492
|
+
//# sourceMappingURL=trigger-text-ByepkzE2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-text-i_YVLKp8.mjs","names":[],"sources":["../../editors/workflow-editor/ui/model.ts","../../editors/workflow-editor/ui/PublishControls.tsx","../../editors/workflow-editor/ui/StepError.tsx","../../editors/shared/document-ref.tsx","../../editors/shared/data-viewer.tsx","../../editors/workflow-editor/ui/trigger-text.ts"],"sourcesContent":["// Plain view model + callbacks; no document-model imports so the UI layer\n// stays independent of Powerhouse document plumbing.\nimport type { AddedBlock } from \"./add-follow-up.js\";\nimport type { BlockForm } from \"./forms.js\";\n\nexport type WorkflowStatusValue = \"DRAFT\" | \"ENABLED\" | \"DISABLED\" | \"ARCHIVED\";\n\nexport interface PointModel {\n x: number;\n y: number;\n}\n\nexport type PropertyModeValue = \"MANUAL\" | \"EXPRESSION\";\n\nexport interface PropertySettingModel {\n prop: string;\n mode: PropertyModeValue;\n // A DYNAMIC prop's resolved children, options stripped.\n schema?: unknown;\n}\n\nexport interface TestRecordModel {\n runId: string;\n testedAt: string;\n}\n\n// Editor bookkeeping on a step or the trigger; absent on older documents.\nexport interface BlockStateModel {\n propertySettings?: PropertySettingModel[] | null;\n lastTest?: TestRecordModel | null;\n updatedAt?: string | null;\n}\n\nexport interface TriggerModel extends BlockStateModel {\n id: string;\n pieceName: string;\n pieceVersion: string;\n triggerName: string;\n config: unknown;\n connectionId: string | null;\n // A REACTOR connection, for a trigger that declares requireReactor.\n reactorConnectionId?: string | null;\n}\n\nexport type BackoffKindValue = \"FIXED\" | \"EXPONENTIAL\";\n\nexport interface RetryPolicyModel {\n maxAttempts: number;\n backoff: BackoffKindValue;\n initialDelaySeconds: number;\n maxDelaySeconds: number;\n retryOn: string[];\n}\n\nexport interface StepModel extends BlockStateModel {\n id: string;\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n connectionId: string | null;\n // A REACTOR connection, for an action that declares requireReactor.\n reactorConnectionId?: string | null;\n config: unknown;\n retry: RetryPolicyModel | null;\n timeoutSeconds: number | null;\n idempotencyKeyExpression: string | null;\n position: PointModel | null;\n skip?: boolean;\n}\n\nexport interface EdgeModel {\n id: string;\n from: string;\n to: string;\n port: string;\n condition: string | null;\n}\n\nexport type VariableTypeValue =\n | \"TEXT\"\n | \"NUMBER\"\n | \"BOOLEAN\"\n | \"JSON\"\n | \"SECRET\";\n\nexport interface VariableModel {\n id: string;\n key: string;\n value: unknown;\n description: string | null;\n // Null means untyped: the type is inferred from the value.\n type?: VariableTypeValue | null;\n}\n\nexport interface PublishedBlockModel {\n id: string;\n // The step's name, or \"Trigger\".\n label: string;\n pieceName: string;\n pieceVersion: string;\n kind: \"action\" | \"trigger\";\n name: string;\n reactorConnectionId: string | null;\n}\n\nexport interface PublishedModel {\n version: number;\n publishedAt: string;\n // The snapshot's blocks, trigger first; what actually runs.\n blocks?: PublishedBlockModel[];\n}\n\nexport interface WorkflowModel {\n name: string;\n description?: string | null;\n status: WorkflowStatusValue;\n version: number;\n trigger: TriggerModel | null;\n steps: StepModel[];\n edges: EdgeModel[];\n variables: VariableModel[];\n published?: PublishedModel | null;\n // Writes nothing, bookkeeping included.\n readOnly?: boolean;\n}\n\n// The side panel's id for the variables editor, beside step and trigger ids.\nexport const VARIABLES_VIEW = \"__variables\";\n\n/** Query params of the editor's view: the open panel and its tab. */\nexport const STEP_PARAM = \"step\";\nexport const TAB_PARAM = \"tab\";\n\n// Unpublished changes: never published, or edited since.\nexport function hasDraftChanges(\n model: Pick<WorkflowModel, \"version\" | \"published\">,\n): boolean {\n return !model.published || model.published.version !== model.version;\n}\n\nexport interface AddStepInputModel {\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n config: unknown;\n position?: PointModel;\n}\n\nexport interface UpdateStepInputModel {\n id: string;\n key?: string;\n name?: string;\n // \"Update to vZ\" edits only pieceVersion.\n pieceName?: string;\n pieceVersion?: string;\n actionName?: string;\n // null clears the step's connection.\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n config?: unknown;\n // null clears each of these; undefined leaves them unchanged.\n retry?: RetryPolicyModel | null;\n timeoutSeconds?: number | null;\n idempotencyKeyExpression?: string | null;\n position?: PointModel;\n skip?: boolean;\n}\n\n// Field modes and DYNAMIC schemas ride along with the config edit they\n// belong to; undefined leaves them as they are.\nexport interface ConfigExtras {\n propertySettings?: PropertySettingModel[];\n}\n\nexport interface WorkflowEditorCallbacks {\n setName: (name: string) => void;\n setDescription: (description: string) => void;\n setStatus: (status: WorkflowStatusValue) => void;\n setTrigger: (\n input: {\n pieceName: string;\n pieceVersion: string;\n triggerName: string;\n config: unknown;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n } & ConfigExtras,\n ) => AddedBlock;\n // Field-level trigger edits: each leaves the trigger's other fields alone.\n setTriggerConfig: (config: unknown, extras?: ConfigExtras) => void;\n // null clears a connection; undefined leaves it unchanged.\n setTriggerConnection: (input: {\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n }) => void;\n setTriggerPieceVersion: (pieceVersion: string) => void;\n clearTrigger: () => void;\n addStep: (input: AddStepInputModel) => AddedBlock;\n updateStep: (input: UpdateStepInputModel) => void;\n setStepConfig: (id: string, config: unknown, extras?: ConfigExtras) => void;\n // Snapshots the draft and turns the workflow on; resolves once applied.\n publish: () => Promise<void>;\n discardChanges: () => void;\n removeStep: (id: string) => void;\n addEdge: (input: {\n from: string;\n to: string;\n port: string;\n condition?: string;\n }) => void;\n removeEdge: (id: string) => void;\n // Upserts by id; no id adds a variable. Keys are unique.\n setVariable: (input: {\n id?: string;\n key: string;\n value: unknown;\n description?: string;\n // Undefined leaves the type as is; null clears it.\n type?: VariableTypeValue | null;\n }) => void;\n removeVariable: (id: string) => void;\n // Composite operations backing the canvas add buttons.\n // `port` is the inserted block's own port the old edge's target hangs off.\n insertStepOnEdge: (\n edgeId: string,\n input: AddStepInputModel,\n port: string,\n ) => AddedBlock | undefined;\n appendStep: (\n fromId: string,\n port: string,\n input: AddStepInputModel,\n ) => AddedBlock;\n // Completes a block added before its form loaded: the defaults still unset\n // and the port it continues on. Nothing when the block is gone.\n completeBlock: (added: AddedBlock, form: BlockForm) => void;\n // Copies a step with its config and advanced settings, detached from the\n // graph so no port ends up with two edges.\n duplicateStep: (id: string) => void;\n // Re-parents a step onto a port, keeping whatever follows it.\n moveStep: (move: {\n stepId: string;\n toParentId: string;\n port: string;\n }) => void;\n}\n\n// Slugified step key derived from a label, suffixed until it is free.\nexport function uniqueStepKey(taken: string[], label: string): string {\n const base =\n label\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, \"_\")\n .replaceAll(/^_+|_+$/g, \"\") || \"step\";\n const keys = new Set(taken);\n let key = base;\n let suffix = 2;\n while (keys.has(key)) key = `${base}_${suffix++}`;\n return key;\n}\n","// Publishing, the Activepieces way: a draft that is always editable, a\n// Publish that snapshots it, and an on/off switch for the published flow.\nimport { useState } from \"react\";\nimport { Button, Toggle, Tooltip } from \"../../shared/controls.js\";\nimport {\n hasDraftChanges,\n type WorkflowEditorCallbacks,\n type WorkflowModel,\n type WorkflowStatusValue,\n} from \"./model.js\";\nimport type { WorkflowReadiness } from \"./validation.js\";\n\n// Under enforcement a publish must be signed, or its runs reach no documents.\nexport interface PublishSignIn {\n required: boolean;\n pending: boolean;\n login: () => void;\n}\n\nfunction blockedReason(readiness: WorkflowReadiness): string {\n if (!readiness.hasTrigger) return \"Add a trigger first\";\n if (readiness.firstIncomplete) return \"You have incomplete steps\";\n return \"Checking the steps…\";\n}\n\nexport function usePublish(callbacks: WorkflowEditorCallbacks) {\n const [publishing, setPublishing] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const publish = () => {\n if (publishing) return;\n setPublishing(true);\n setError(null);\n callbacks\n .publish()\n .catch((cause: unknown) =>\n setError(cause instanceof Error ? cause.message : String(cause)),\n )\n .finally(() => setPublishing(false));\n };\n return { publishing, error, publish };\n}\n\nexport function PublishButton(props: {\n model: WorkflowModel;\n readiness: WorkflowReadiness;\n publishing: boolean;\n onPublish: () => void;\n onSelect: (id: string) => void;\n size?: \"sm\" | \"md\";\n signIn?: PublishSignIn;\n}) {\n const { model, readiness } = props;\n if (props.signIn?.required) {\n return (\n <Tooltip content=\"This Switchboard enforces document permissions, so a publish must be signed\">\n <Button\n size={props.size ?? \"sm\"}\n variant=\"primary\"\n disabled={props.signIn.pending}\n onClick={props.signIn.login}\n >\n Sign in to publish\n </Button>\n </Tooltip>\n );\n }\n const incomplete = !readiness.ready;\n const changes = hasDraftChanges(model);\n const target = readiness.firstIncomplete;\n const select = () => {\n if (target) props.onSelect(target);\n };\n return (\n <Tooltip\n enabled={incomplete}\n content={\n <button\n type=\"button\"\n className=\"font-medium text-wf-warn hover:underline\"\n onClick={select}\n >\n {blockedReason(readiness)}\n </button>\n }\n >\n {/* The disabled button passes clicks through to this wrapper. */}\n <span className=\"inline-flex\" onClick={incomplete ? select : undefined}>\n <Button\n size={props.size ?? \"sm\"}\n variant=\"primary\"\n disabled={incomplete || !changes || props.publishing}\n title={!changes && !incomplete ? \"No unpublished changes\" : undefined}\n onClick={props.onPublish}\n >\n {props.publishing ? \"Publishing…\" : \"Publish\"}\n </Button>\n </span>\n </Tooltip>\n );\n}\n\n// A dot and a word: Draft until first published, then Published, or\n// Unpublished changes once the draft moves on.\nexport function PublishState(props: {\n model: Pick<WorkflowModel, \"version\" | \"published\">;\n}) {\n const draft = hasDraftChanges(props.model);\n return (\n <span\n className=\"flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground\"\n title={\n props.model.published\n ? `Published ${new Date(props.model.published.publishedAt).toLocaleString()}`\n : \"Never published\"\n }\n >\n <span\n aria-hidden\n className={`h-2 w-2 rounded-full ${draft ? \"bg-wf-warn\" : \"bg-wf-ok\"}`}\n />\n <span>\n {!props.model.published\n ? \"Draft\"\n : draft\n ? \"Unpublished changes\"\n : \"Published\"}\n </span>\n {props.model.published && draft ? (\n <span className=\"text-muted-foreground/80\">\n · v{props.model.published.version} live\n </span>\n ) : null}\n </span>\n );\n}\n\nexport function StatusToggle(props: {\n published: boolean;\n status: WorkflowStatusValue;\n onChange: (status: WorkflowStatusValue) => void;\n tooltipSide?: \"below\" | \"left\";\n}) {\n // Nothing runs until the first publish.\n const allowed = props.published;\n const on = props.status === \"ENABLED\";\n return (\n <Tooltip\n enabled={!allowed}\n content=\"Publish the workflow first\"\n align=\"end\"\n side={props.tooltipSide}\n >\n <span className=\"flex items-center gap-2 text-xs text-muted-foreground\">\n <Toggle\n checked={on}\n disabled={!allowed}\n label={on ? \"Turn the workflow off\" : \"Turn the workflow on\"}\n onChange={(checked) =>\n props.onChange(checked ? \"ENABLED\" : \"DISABLED\")\n }\n />\n <span className=\"w-6\">{on ? \"On\" : \"Off\"}</span>\n </span>\n </Tooltip>\n );\n}\n\n// The live snapshot's blocks that need a reactor connection and bind none.\nexport function PublishedMissingNote(props: { missing: readonly string[] }) {\n if (props.missing.length === 0) return null;\n return (\n <span\n role=\"alert\"\n aria-label=\"Published version incomplete\"\n className=\"shrink-0 whitespace-nowrap rounded-full bg-wf-warn/12 px-2 py-0.5 text-xs text-wf-warn\"\n title={`The published version is missing a reactor connection on: ${props.missing.join(\", \")}`}\n >\n Live version incomplete\n </span>\n );\n}\n\n// Why the runtime won't give the published workflow reactor access.\nexport function ReactorDenialNote(props: { denial: string | null }) {\n if (!props.denial) return null;\n return (\n <span\n role=\"alert\"\n aria-label=\"Reactor access denied\"\n className=\"max-w-80 truncate rounded-full bg-wf-warn/12 px-2 py-0.5 text-xs text-wf-warn\"\n title={props.denial}\n >\n No reactor access: {props.denial}\n </span>\n );\n}\n\nexport function DraftBanner(props: {\n model: WorkflowModel;\n readiness: WorkflowReadiness;\n publishing: boolean;\n error: string | null;\n onPublish: () => void;\n onDiscard: () => void;\n onSelect: (id: string) => void;\n signIn?: PublishSignIn;\n}) {\n if (!hasDraftChanges(props.model)) return null;\n const { readiness } = props;\n const target = readiness.firstIncomplete;\n return (\n <div\n role=\"status\"\n className=\"pointer-events-auto flex items-center gap-3 rounded-lg border border-solid border-foreground/10 bg-card py-1.5 pl-3 pr-1.5 text-[13px] shadow-sm\"\n >\n <span className=\"h-2 w-2 shrink-0 rounded-full bg-wf-warn\" aria-hidden />\n <span className=\"text-foreground\">You have unpublished changes</span>\n {props.error ? (\n <span className=\"text-xs text-wf-fail\">{props.error}</span>\n ) : null}\n {!readiness.hasTrigger || target ? (\n <span className=\"flex items-center gap-1.5 text-xs text-wf-warn\">\n <span>{target ? \"Incomplete steps\" : \"No trigger yet\"}</span>\n {target ? (\n <button\n type=\"button\"\n className=\"font-medium underline underline-offset-2 hover:no-underline\"\n onClick={() => props.onSelect(target)}\n >\n Show\n </button>\n ) : null}\n </span>\n ) : null}\n <span className=\"flex items-center gap-1\">\n {props.model.published ? (\n <Button size=\"sm\" variant=\"ghost\" onClick={props.onDiscard}>\n Discard changes\n </Button>\n ) : null}\n <PublishButton\n model={props.model}\n readiness={readiness}\n publishing={props.publishing}\n onPublish={props.onPublish}\n onSelect={props.onSelect}\n signIn={props.signIn}\n />\n </span>\n </div>\n );\n}\n","// A step's error from a run.\nexport function StepError(props: { error: string }) {\n return (\n <pre className=\"overflow-auto whitespace-pre-wrap rounded-md bg-wf-fail/10 p-2.5 text-xs text-wf-fail\">\n {props.error}\n </pre>\n );\n}\n","// The documents a run's data references: the run journal keeps a reference\n// (id, type, branch, revision) in place of a document's state.\nimport type { DocumentReference } from \"@powerhousedao/pieces-framework/workflow\";\nimport { useSetSelectedNode } from \"@powerhousedao/reactor-browser\";\nimport { Button } from \"./controls.js\";\n\n// Beyond this many, the rest are counted.\nconst SHOWN = 3;\n\nfunction shortId(id: string): string {\n return id.length > 16 ? `${id.slice(0, 6)}…${id.slice(-6)}` : id;\n}\n\nfunction revisionText(reference: DocumentReference): string {\n const scopes = Object.entries(reference.revision)\n .map(([scope, count]) => `${scope} ${count}`)\n .join(\" · \");\n return reference.branch === \"main\"\n ? scopes\n : `${reference.branch}: ${scopes}`;\n}\n\nfunction DocumentRefRow(props: { reference: DocumentReference }) {\n const { reference } = props;\n const setSelectedNode = useSetSelectedNode();\n return (\n <li\n aria-label={`Document ${reference.documentId}`}\n className=\"flex items-center gap-2\"\n >\n <div className=\"min-w-0 flex-1 text-xs\">\n <div className=\"flex min-w-0 items-baseline gap-1.5\">\n <span className=\"truncate font-medium text-foreground\">\n {reference.documentType}\n </span>\n <span\n className=\"shrink-0 font-mono text-[11px] text-muted-foreground\"\n title={reference.documentId}\n >\n {shortId(reference.documentId)}\n </span>\n </div>\n <div className=\"truncate text-[11px] text-muted-foreground\">\n Revision {revisionText(reference)}\n </div>\n </div>\n <Button\n size=\"sm\"\n onClick={() => setSelectedNode(reference.documentId)}\n aria-label={`Open document ${reference.documentId}`}\n >\n Open document\n </Button>\n </li>\n );\n}\n\nexport function DocumentRefs(props: { references: DocumentReference[] }) {\n const { references } = props;\n const hidden = references.length - SHOWN;\n return (\n <div\n role=\"group\"\n aria-label=\"Document references\"\n className=\"flex flex-col gap-1.5\"\n >\n <ul className=\"m-0 flex list-none flex-col gap-1.5 p-0\">\n {references.slice(0, SHOWN).map((reference, index) => (\n <DocumentRefRow\n key={`${reference.documentId}-${index}`}\n reference={reference}\n />\n ))}\n </ul>\n {hidden > 0 ? (\n <p className=\"text-[11px] text-muted-foreground\">\n and {hidden} more in the data below\n </p>\n ) : null}\n <p className=\"text-[11px] text-muted-foreground\">\n The run kept a reference, not the state. Opening shows the document as\n it is now: past revisions can't be read yet (#3179).\n </p>\n </div>\n );\n}\n","// A run's data (a step's input or output, a trigger payload) as a foldable\n// tree, with a raw JSON view and, given a root, per-key {{references}}.\nimport {\n DOCUMENT_REF_KEY,\n documentRefsIn,\n isDocumentRefMarker,\n} from \"@powerhousedao/pieces-framework/workflow\";\nimport { lazy, Suspense, useState } from \"react\";\nimport { IconButton } from \"./controls.js\";\nimport { DocumentRefs } from \"./document-ref.js\";\n\nconst DataTree = lazy(() => import(\"./data-tree.js\"));\n\nfunction stringify(value: unknown): string {\n try {\n // undefined for functions and symbols, despite the typing.\n return (JSON.stringify(value, null, 2) as string | undefined) ?? \"\";\n } catch {\n return String(value as string);\n }\n}\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null) return true;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\n}\n\nfunction RawJson(props: { text: string }) {\n return (\n <pre className=\"max-h-72 overflow-auto whitespace-pre-wrap break-words font-mono text-xs text-foreground\">\n {props.text}\n </pre>\n );\n}\n\n// Stands in while the tree's chunk loads.\nfunction TreeSkeleton() {\n return (\n <div\n role=\"status\"\n aria-label=\"Loading data\"\n className=\"flex animate-pulse flex-col gap-2 py-1\"\n >\n {[\"w-2/5\", \"w-3/5\", \"w-1/2\", \"w-1/3\"].map((width, index) => (\n <span\n key={width}\n className={`h-2.5 rounded bg-muted ${width}`}\n style={{ marginLeft: index === 0 ? 0 : 16 }}\n />\n ))}\n </div>\n );\n}\n\nexport function DataViewer(props: {\n label: string;\n value: unknown;\n // Expression prefix for this value, e.g. \"steps.fetch.output\".\n root?: string;\n emptyText?: string;\n}) {\n const [raw, setRaw] = useState(false);\n const [copied, setCopied] = useState(false);\n const empty = isEmpty(props.value);\n const text = stringify(props.value);\n const tree = typeof props.value === \"object\" && props.value !== null;\n const references = tree ? documentRefsIn(props.value) : [];\n // A whole value that is a reference shows as one; its other keys stay a tree.\n const treeValue = isDocumentRefMarker(props.value)\n ? Object.fromEntries(\n Object.entries(props.value).filter(([key]) => key !== DOCUMENT_REF_KEY),\n )\n : props.value;\n\n return (\n <section\n aria-label={props.label}\n className=\"min-w-0 rounded-md border border-solid border-border bg-card\"\n >\n <header className=\"flex h-8 items-center gap-1 border-b border-solid border-border pl-3 pr-1\">\n <h4 className=\"mr-auto text-xs font-medium text-foreground\">\n {props.label}\n </h4>\n {!empty && tree ? (\n <button\n type=\"button\"\n aria-pressed={raw}\n className=\"rounded px-1.5 py-0.5 text-[11px] text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40\"\n onClick={() => setRaw((value) => !value)}\n >\n {raw ? \"Tree\" : \"JSON\"}\n </button>\n ) : null}\n {!empty ? (\n <IconButton\n icon={copied ? \"check\" : \"copy\"}\n label={`Copy ${props.label.toLowerCase()} as JSON`}\n onClick={() => {\n void navigator.clipboard.writeText(text).then(() => {\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n });\n }}\n />\n ) : null}\n </header>\n <div className=\"px-3 py-2\">\n {empty ? (\n <p className=\"text-xs text-muted-foreground\">\n {props.emptyText ?? \"Nothing\"}\n </p>\n ) : !tree ? (\n <p className=\"break-words font-mono text-xs text-foreground\">\n {text}\n </p>\n ) : raw ? (\n <RawJson text={text} />\n ) : (\n <div className=\"flex flex-col gap-2\">\n {references.length > 0 ? (\n <DocumentRefs references={references} />\n ) : null}\n {isEmpty(treeValue) ? null : (\n <div className=\"max-h-72 overflow-auto\">\n <Suspense fallback={<TreeSkeleton />}>\n <DataTree value={treeValue as object} root={props.root} />\n </Suspense>\n </div>\n )}\n </div>\n )}\n </div>\n </section>\n );\n}\n","// Plain-language descriptions of when a workflow starts: \"Every day at\n// 08:00 UTC\" rather than \"0 8 * * *\". Unknown shapes fall back to the raw text.\nimport { blockKey } from \"@powerhousedao/pieces-framework/block-type\";\nimport { blockMeta } from \"./block-meta.js\";\nimport {\n MANUAL_TRIGGER,\n REACTOR_PIECE,\n SCHEDULE_TRIGGER,\n WEBHOOK_TRIGGER,\n} from \"./blocks.js\";\nimport { parseScheduleConfig } from \"@powerhousedao/pieces-framework/workflow\";\n\nconst WEEKDAYS = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n];\n\nconst UNIT_LABEL: Record<string, [string, string]> = {\n minutes: [\"minute\", \"minutes\"],\n hours: [\"hour\", \"hours\"],\n days: [\"day\", \"days\"],\n};\n\nfunction isInt(field: string): boolean {\n return /^\\d+$/.test(field);\n}\n\nfunction clock(hour: string, minute: string): string {\n return `${hour.padStart(2, \"0\")}:${minute.padStart(2, \"0\")}`;\n}\n\nfunction dayList(field: string): string | undefined {\n if (field === \"1-5\") return \"on weekdays\";\n if (field === \"0,6\" || field === \"6,0\") return \"at weekends\";\n const days = field.split(\",\");\n if (!days.every((day) => isInt(day) && Number(day) <= 7)) return undefined;\n const names = days.map((day) => WEEKDAYS[Number(day) % 7]);\n if (names.length === 1) return `every ${names[0]}`;\n return `on ${names.slice(0, -1).join(\", \")} and ${names[names.length - 1]}`;\n}\n\n/** Describes a five-field cron expression, or returns undefined. */\nexport function describeCron(cron: string): string | undefined {\n const fields = cron.trim().split(/\\s+/);\n if (fields.length !== 5) return undefined;\n const [minute, hour, dayOfMonth, month, dayOfWeek] = fields;\n if (month !== \"*\") return undefined;\n\n const everyMinutes = /^\\*\\/(\\d+)$/.exec(minute);\n if (everyMinutes && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\") {\n const n = Number(everyMinutes[1]);\n return n === 1 ? \"Every minute\" : `Every ${n} minutes`;\n }\n if (minute === \"*\" && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\")\n return \"Every minute\";\n if (isInt(minute) && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\")\n return minute === \"0\"\n ? \"Every hour, on the hour\"\n : `Every hour at ${minute.padStart(2, \"0\")} past`;\n\n const everyHours = /^\\*\\/(\\d+)$/.exec(hour);\n if (isInt(minute) && everyHours && dayOfMonth === \"*\" && dayOfWeek === \"*\") {\n return `Every ${everyHours[1]} hours`;\n }\n if (!isInt(minute) || !isInt(hour)) return undefined;\n const at = clock(hour, minute);\n\n if (dayOfMonth === \"*\" && dayOfWeek === \"*\") return `Every day at ${at}`;\n if (dayOfMonth === \"*\") {\n const days = dayList(dayOfWeek);\n return days\n ? `${days.charAt(0).toUpperCase()}${days.slice(1)} at ${at}`\n : undefined;\n }\n if (isInt(dayOfMonth) && dayOfWeek === \"*\") {\n return `Every month on day ${dayOfMonth} at ${at}`;\n }\n return undefined;\n}\n\nexport function describeSchedule(config: unknown): string {\n let schedule;\n try {\n schedule = parseScheduleConfig(config);\n } catch {\n return \"On a schedule that does not parse\";\n }\n if (schedule.mode === \"interval\") {\n const unit = UNIT_LABEL[schedule.unit];\n return schedule.every === 1\n ? `Every ${unit[0]}`\n : `Every ${schedule.every} ${unit[1]}`;\n }\n const described = describeCron(schedule.cron);\n return described\n ? `${described} ${schedule.timezone}`\n : `On schedule ${schedule.cron}`;\n}\n\n// A literal config value; an expression or a blank says nothing to show.\nfunction literal(config: unknown, key: string): string | undefined {\n if (!config || typeof config !== \"object\") return undefined;\n const value = (config as Record<string, unknown>)[key];\n if (typeof value !== \"string\") return undefined;\n const text = value.trim();\n return text && !text.includes(\"{{\") ? text : undefined;\n}\n\n// \"umh/production-ledger\" reads as \"Production Ledger\".\nfunction documentTypeLabel(documentType: string): string {\n const name = documentType.split(\"/\").pop() ?? documentType;\n return name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n\n// \"APPROVE_ORDER\" reads as \"Approve order\".\nfunction actionTypeLabel(actionType: string): string {\n const words = actionType\n .toLowerCase()\n .split(/[_\\s]+/)\n .filter(Boolean);\n const text = words.join(\" \");\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\n/** Describes a reactor document trigger by what it filters on. */\nexport function describeDocumentTrigger(\n triggerName: string,\n config: unknown,\n): string | undefined {\n const documentType = literal(config, \"documentType\");\n const label = documentType ? documentTypeLabel(documentType) : \"\";\n const subject = label\n ? `${/^[AEIOU]/.test(label) ? \"an\" : \"a\"} ${label}`\n : literal(config, \"documentId\")\n ? \"its document\"\n : \"a document\";\n switch (triggerName) {\n case \"document-event\": {\n const actionType = literal(config, \"actionType\");\n return actionType\n ? `When ${actionTypeLabel(actionType)} runs on ${subject}`\n : `When ${subject} changes`;\n }\n case \"document-created\":\n return `When ${subject} is created`;\n case \"document-deleted\":\n return `When ${subject} is deleted`;\n default:\n return undefined;\n }\n}\n\n/** When a workflow starts, from its trigger. */\nexport function describeTrigger(\n trigger:\n | { pieceName: string; triggerName: string; config: unknown }\n | null\n | undefined,\n): string {\n if (!trigger) return \"Never starts: no trigger\";\n const block = {\n pieceName: trigger.pieceName,\n kind: \"trigger\" as const,\n name: trigger.triggerName,\n };\n switch (blockKey(block)) {\n case blockKey(MANUAL_TRIGGER):\n return \"Manual\";\n case blockKey(WEBHOOK_TRIGGER):\n return \"When its webhook is called\";\n case blockKey(SCHEDULE_TRIGGER):\n return describeSchedule(trigger.config);\n default: {\n if (trigger.pieceName === REACTOR_PIECE) {\n const described = describeDocumentTrigger(\n trigger.triggerName,\n trigger.config,\n );\n if (described) return described;\n }\n const meta = blockMeta(block);\n const piece = meta.subtitle.replace(/ · Trigger$/, \"\");\n return `${meta.displayName} in ${piece}`;\n }\n }\n}\n"],"mappings":";;;;;;;AAiIA,MAAa,iBAAiB;;AAG9B,MAAa,aAAa;AAI1B,SAAgB,gBACd,OACS;CACT,OAAO,CAAC,MAAM,aAAa,MAAM,UAAU,YAAY,MAAM;AAC/D;AAgHA,SAAgB,cAAc,OAAiB,OAAuB;CACpE,MAAM,OACJ,MACG,YAAY,CAAC,CACb,WAAW,eAAe,GAAG,CAAC,CAC9B,WAAW,YAAY,EAAE,KAAK;CACnC,MAAM,OAAO,IAAI,IAAI,KAAK;CAC1B,IAAI,MAAM;CACV,IAAI,SAAS;CACb,OAAO,KAAK,IAAI,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG;CACvC,OAAO;AACT;;;ACpPA,SAAS,cAAc,WAAsC;CAC3D,IAAI,CAAC,UAAU,YAAY,OAAO;CAClC,IAAI,UAAU,iBAAiB,OAAO;CACtC,OAAO;AACT;AAEA,SAAgB,WAAW,WAAoC;CAC7D,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,MAAM,CAAC,OAAO,YAAY,SAAwB,IAAI;CACtD,MAAM,gBAAgB;EACpB,IAAI,YAAY;EAChB,cAAc,IAAI;EAClB,SAAS,IAAI;EACb,UACG,QAAQ,CAAC,CACT,OAAO,UACN,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,CACjE,CAAC,CACA,cAAc,cAAc,KAAK,CAAC;CACvC;CACA,OAAO;EAAE;EAAY;EAAO;CAAQ;AACtC;AAEA,SAAgB,cAAc,OAQ3B;CACD,MAAM,EAAE,OAAO,cAAc;CAC7B,IAAI,MAAM,QAAQ,UAChB,OACE,oBAAC,SAAD;EAAS,SAAQ;EACf,UAAA,oBAAC,QAAD;GACE,MAAM,MAA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,QAAQ,QAAQ,cAAc;CACnD,MAAM,QAAQ,eAAe,kBAAkB,YAAY,IAAI;CAC/D,MAAM,UAAU,QACZ,GAAG,WAAW,KAAK,KAAK,IAAI,OAAO,IAAI,GAAG,UAC1C,QAAQ,QAAQ,YAAY,IAC1B,iBACA;CACN,QAAQ,aAAR;EACE,KAAK,kBAAkB;GACrB,MAAM,aAAa,QAAQ,QAAQ,YAAY;GAC/C,OAAO,aACH,QAAQ,gBAAgB,UAAU,EAAE,WAAW,YAC/C,QAAQ,QAAQ;EACtB;EACA,KAAK,oBACH,OAAO,QAAQ,QAAQ;EACzB,KAAK,oBACH,OAAO,QAAQ,QAAQ;EACzB,SACE;CACJ;AACF;;AAGA,SAAgB,gBACd,SAIQ;CACR,IAAI,CAAC,SAAS,OAAO;CACrB,MAAM,QAAQ;EACZ,WAAW,QAAQ;EACnB,MAAM;EACN,MAAM,QAAQ;CAChB;CACA,QAAQ,SAAS,KAAK,GAAtB;EACE,KAAK,SAAS,cAAc,GAC1B,OAAO;EACT,KAAK,SAAS,eAAe,GAC3B,OAAO;EACT,KAAK,SAAS,gBAAgB,GAC5B,OAAO,iBAAiB,QAAQ,MAAM;EACxC,SAAS;GACP,IAAI,QAAQ,cAAA,gCAA6B;IACvC,MAAM,YAAY,wBAChB,QAAQ,aACR,QAAQ,MACV;IACA,IAAI,WAAW,OAAO;GACxB;GACA,MAAM,OAAO,UAAU,KAAK;GAC5B,MAAM,QAAQ,KAAK,SAAS,QAAQ,eAAe,EAAE;GACrD,OAAO,GAAG,KAAK,YAAY,MAAM;EACnC;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"trigger-text-ByepkzE2.mjs","names":[],"sources":["../../editors/workflow-editor/ui/model.ts","../../editors/workflow-editor/ui/PublishControls.tsx","../../editors/workflow-editor/ui/StepError.tsx","../../editors/shared/document-ref.tsx","../../editors/shared/data-viewer.tsx","../../editors/workflow-editor/ui/trigger-text.ts"],"sourcesContent":["// Plain view model + callbacks; no document-model imports so the UI layer\n// stays independent of Powerhouse document plumbing.\nimport type { AddedBlock } from \"./add-follow-up.js\";\nimport type { BlockForm } from \"./forms.js\";\n\nexport type WorkflowStatusValue = \"DRAFT\" | \"ENABLED\" | \"DISABLED\" | \"ARCHIVED\";\n\nexport interface PointModel {\n x: number;\n y: number;\n}\n\nexport type PropertyModeValue = \"MANUAL\" | \"EXPRESSION\";\n\nexport interface PropertySettingModel {\n prop: string;\n mode: PropertyModeValue;\n // A DYNAMIC prop's resolved children, options stripped.\n schema?: unknown;\n}\n\nexport interface TestRecordModel {\n runId: string;\n testedAt: string;\n}\n\n// Editor bookkeeping on a step or the trigger; absent on older documents.\nexport interface BlockStateModel {\n propertySettings?: PropertySettingModel[] | null;\n lastTest?: TestRecordModel | null;\n updatedAt?: string | null;\n}\n\nexport interface TriggerModel extends BlockStateModel {\n id: string;\n pieceName: string;\n pieceVersion: string;\n triggerName: string;\n config: unknown;\n connectionId: string | null;\n // A REACTOR connection, for a trigger that declares requireReactor.\n reactorConnectionId?: string | null;\n}\n\nexport type BackoffKindValue = \"FIXED\" | \"EXPONENTIAL\";\n\nexport interface RetryPolicyModel {\n maxAttempts: number;\n backoff: BackoffKindValue;\n initialDelaySeconds: number;\n maxDelaySeconds: number;\n retryOn: string[];\n}\n\nexport interface StepModel extends BlockStateModel {\n id: string;\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n connectionId: string | null;\n // A REACTOR connection, for an action that declares requireReactor.\n reactorConnectionId?: string | null;\n config: unknown;\n retry: RetryPolicyModel | null;\n timeoutSeconds: number | null;\n idempotencyKeyExpression: string | null;\n position: PointModel | null;\n skip?: boolean;\n}\n\nexport interface EdgeModel {\n id: string;\n from: string;\n to: string;\n port: string;\n condition: string | null;\n}\n\nexport type VariableTypeValue =\n | \"TEXT\"\n | \"NUMBER\"\n | \"BOOLEAN\"\n | \"JSON\"\n | \"SECRET\";\n\nexport interface VariableModel {\n id: string;\n key: string;\n value: unknown;\n description: string | null;\n // Null means untyped: the type is inferred from the value.\n type?: VariableTypeValue | null;\n}\n\nexport interface PublishedBlockModel {\n id: string;\n // The step's name, or \"Trigger\".\n label: string;\n pieceName: string;\n pieceVersion: string;\n kind: \"action\" | \"trigger\";\n name: string;\n reactorConnectionId: string | null;\n}\n\nexport interface PublishedModel {\n version: number;\n publishedAt: string;\n // The snapshot's blocks, trigger first; what actually runs.\n blocks?: PublishedBlockModel[];\n}\n\nexport interface WorkflowModel {\n name: string;\n description?: string | null;\n status: WorkflowStatusValue;\n version: number;\n trigger: TriggerModel | null;\n steps: StepModel[];\n edges: EdgeModel[];\n variables: VariableModel[];\n published?: PublishedModel | null;\n // Writes nothing, bookkeeping included.\n readOnly?: boolean;\n}\n\n// The side panel's id for the variables editor, beside step and trigger ids.\nexport const VARIABLES_VIEW = \"__variables\";\n\n/** Query params of the editor's view: the open panel and its tab. */\nexport const STEP_PARAM = \"step\";\nexport const TAB_PARAM = \"tab\";\n\n// Unpublished changes: never published, or edited since.\nexport function hasDraftChanges(\n model: Pick<WorkflowModel, \"version\" | \"published\">,\n): boolean {\n return !model.published || model.published.version !== model.version;\n}\n\nexport interface AddStepInputModel {\n key: string;\n name: string;\n pieceName: string;\n pieceVersion: string;\n actionName: string;\n config: unknown;\n position?: PointModel;\n}\n\nexport interface UpdateStepInputModel {\n id: string;\n key?: string;\n name?: string;\n // \"Update to vZ\" edits only pieceVersion.\n pieceName?: string;\n pieceVersion?: string;\n actionName?: string;\n // null clears the step's connection.\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n config?: unknown;\n // null clears each of these; undefined leaves them unchanged.\n retry?: RetryPolicyModel | null;\n timeoutSeconds?: number | null;\n idempotencyKeyExpression?: string | null;\n position?: PointModel;\n skip?: boolean;\n}\n\n// Field modes and DYNAMIC schemas ride along with the config edit they\n// belong to; undefined leaves them as they are.\nexport interface ConfigExtras {\n propertySettings?: PropertySettingModel[];\n}\n\nexport interface WorkflowEditorCallbacks {\n setName: (name: string) => void;\n setDescription: (description: string) => void;\n setStatus: (status: WorkflowStatusValue) => void;\n setTrigger: (\n input: {\n pieceName: string;\n pieceVersion: string;\n triggerName: string;\n config: unknown;\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n } & ConfigExtras,\n ) => AddedBlock;\n // Field-level trigger edits: each leaves the trigger's other fields alone.\n setTriggerConfig: (config: unknown, extras?: ConfigExtras) => void;\n // null clears a connection; undefined leaves it unchanged.\n setTriggerConnection: (input: {\n connectionId?: string | null;\n reactorConnectionId?: string | null;\n }) => void;\n setTriggerPieceVersion: (pieceVersion: string) => void;\n clearTrigger: () => void;\n addStep: (input: AddStepInputModel) => AddedBlock;\n updateStep: (input: UpdateStepInputModel) => void;\n setStepConfig: (id: string, config: unknown, extras?: ConfigExtras) => void;\n // Snapshots the draft and turns the workflow on; resolves once applied.\n publish: () => Promise<void>;\n discardChanges: () => void;\n removeStep: (id: string) => void;\n addEdge: (input: {\n from: string;\n to: string;\n port: string;\n condition?: string;\n }) => void;\n removeEdge: (id: string) => void;\n // Upserts by id; no id adds a variable. Keys are unique.\n setVariable: (input: {\n id?: string;\n key: string;\n value: unknown;\n description?: string;\n // Undefined leaves the type as is; null clears it.\n type?: VariableTypeValue | null;\n }) => void;\n removeVariable: (id: string) => void;\n // Composite operations backing the canvas add buttons.\n // `port` is the inserted block's own port the old edge's target hangs off.\n insertStepOnEdge: (\n edgeId: string,\n input: AddStepInputModel,\n port: string,\n ) => AddedBlock | undefined;\n appendStep: (\n fromId: string,\n port: string,\n input: AddStepInputModel,\n ) => AddedBlock;\n // Completes a block added before its form loaded: the defaults still unset\n // and the port it continues on. Nothing when the block is gone.\n completeBlock: (added: AddedBlock, form: BlockForm) => void;\n // Copies a step with its config and advanced settings, detached from the\n // graph so no port ends up with two edges.\n duplicateStep: (id: string) => void;\n // Re-parents a step onto a port, keeping whatever follows it.\n moveStep: (move: {\n stepId: string;\n toParentId: string;\n port: string;\n }) => void;\n}\n\n// Slugified step key derived from a label, suffixed until it is free.\nexport function uniqueStepKey(taken: string[], label: string): string {\n const base =\n label\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, \"_\")\n .replaceAll(/^_+|_+$/g, \"\") || \"step\";\n const keys = new Set(taken);\n let key = base;\n let suffix = 2;\n while (keys.has(key)) key = `${base}_${suffix++}`;\n return key;\n}\n","// Publishing, the Activepieces way: a draft that is always editable, a\n// Publish that snapshots it, and an on/off switch for the published flow.\nimport { useState } from \"react\";\nimport { Button, Toggle, Tooltip } from \"../../shared/controls.js\";\nimport {\n hasDraftChanges,\n type WorkflowEditorCallbacks,\n type WorkflowModel,\n type WorkflowStatusValue,\n} from \"./model.js\";\nimport type { WorkflowReadiness } from \"./validation.js\";\n\n// Under enforcement a publish must be signed, or its runs reach no documents.\nexport interface PublishSignIn {\n required: boolean;\n pending: boolean;\n login: () => void;\n}\n\nfunction blockedReason(readiness: WorkflowReadiness): string {\n if (!readiness.hasTrigger) return \"Add a trigger first\";\n if (readiness.firstIncomplete) return \"You have incomplete steps\";\n return \"Checking the steps…\";\n}\n\nexport function usePublish(callbacks: WorkflowEditorCallbacks) {\n const [publishing, setPublishing] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const publish = () => {\n if (publishing) return;\n setPublishing(true);\n setError(null);\n callbacks\n .publish()\n .catch((cause: unknown) =>\n setError(cause instanceof Error ? cause.message : String(cause)),\n )\n .finally(() => setPublishing(false));\n };\n return { publishing, error, publish };\n}\n\nexport function PublishButton(props: {\n model: WorkflowModel;\n readiness: WorkflowReadiness;\n publishing: boolean;\n onPublish: () => void;\n onSelect: (id: string) => void;\n size?: \"sm\" | \"md\";\n signIn?: PublishSignIn;\n}) {\n const { model, readiness } = props;\n if (props.signIn?.required) {\n return (\n <Tooltip content=\"This Switchboard enforces document permissions, so a publish must be signed\">\n <Button\n size={props.size ?? \"sm\"}\n variant=\"primary\"\n disabled={props.signIn.pending}\n onClick={props.signIn.login}\n >\n Sign in to publish\n </Button>\n </Tooltip>\n );\n }\n const incomplete = !readiness.ready;\n const changes = hasDraftChanges(model);\n const target = readiness.firstIncomplete;\n const select = () => {\n if (target) props.onSelect(target);\n };\n return (\n <Tooltip\n enabled={incomplete}\n content={\n <button\n type=\"button\"\n className=\"font-medium text-wf-warn hover:underline\"\n onClick={select}\n >\n {blockedReason(readiness)}\n </button>\n }\n >\n {/* The disabled button passes clicks through to this wrapper. */}\n <span className=\"inline-flex\" onClick={incomplete ? select : undefined}>\n <Button\n size={props.size ?? \"sm\"}\n variant=\"primary\"\n disabled={incomplete || !changes || props.publishing}\n title={!changes && !incomplete ? \"No unpublished changes\" : undefined}\n onClick={props.onPublish}\n >\n {props.publishing ? \"Publishing…\" : \"Publish\"}\n </Button>\n </span>\n </Tooltip>\n );\n}\n\n// A dot and a word: Draft until first published, then Published, or\n// Unpublished changes once the draft moves on.\nexport function PublishState(props: {\n model: Pick<WorkflowModel, \"version\" | \"published\">;\n}) {\n const draft = hasDraftChanges(props.model);\n return (\n <span\n className=\"flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground\"\n title={\n props.model.published\n ? `Published ${new Date(props.model.published.publishedAt).toLocaleString()}`\n : \"Never published\"\n }\n >\n <span\n aria-hidden\n className={`h-2 w-2 rounded-full ${draft ? \"bg-wf-warn\" : \"bg-wf-ok\"}`}\n />\n <span>\n {!props.model.published\n ? \"Draft\"\n : draft\n ? \"Unpublished changes\"\n : \"Published\"}\n </span>\n {props.model.published && draft ? (\n <span className=\"text-muted-foreground/80\">\n · v{props.model.published.version} live\n </span>\n ) : null}\n </span>\n );\n}\n\nexport function StatusToggle(props: {\n published: boolean;\n status: WorkflowStatusValue;\n onChange: (status: WorkflowStatusValue) => void;\n tooltipSide?: \"below\" | \"left\";\n}) {\n // Nothing runs until the first publish.\n const allowed = props.published;\n const on = props.status === \"ENABLED\";\n return (\n <Tooltip\n enabled={!allowed}\n content=\"Publish the workflow first\"\n align=\"end\"\n side={props.tooltipSide}\n >\n <span className=\"flex items-center gap-2 text-xs text-muted-foreground\">\n <Toggle\n checked={on}\n disabled={!allowed}\n label={on ? \"Turn the workflow off\" : \"Turn the workflow on\"}\n onChange={(checked) =>\n props.onChange(checked ? \"ENABLED\" : \"DISABLED\")\n }\n />\n <span className=\"w-6\">{on ? \"On\" : \"Off\"}</span>\n </span>\n </Tooltip>\n );\n}\n\n// The live snapshot's blocks that need a reactor connection and bind none.\nexport function PublishedMissingNote(props: { missing: readonly string[] }) {\n if (props.missing.length === 0) return null;\n return (\n <span\n role=\"alert\"\n aria-label=\"Published version incomplete\"\n className=\"shrink-0 whitespace-nowrap rounded-full bg-wf-warn/12 px-2 py-0.5 text-xs text-wf-warn\"\n title={`The published version is missing a reactor connection on: ${props.missing.join(\", \")}`}\n >\n Live version incomplete\n </span>\n );\n}\n\n// Why the runtime won't give the published workflow reactor access.\nexport function ReactorDenialNote(props: { denial: string | null }) {\n if (!props.denial) return null;\n return (\n <span\n role=\"alert\"\n aria-label=\"Reactor access denied\"\n className=\"max-w-80 truncate rounded-full bg-wf-warn/12 px-2 py-0.5 text-xs text-wf-warn\"\n title={props.denial}\n >\n No reactor access: {props.denial}\n </span>\n );\n}\n\nexport function DraftBanner(props: {\n model: WorkflowModel;\n readiness: WorkflowReadiness;\n publishing: boolean;\n error: string | null;\n onPublish: () => void;\n onDiscard: () => void;\n onSelect: (id: string) => void;\n signIn?: PublishSignIn;\n}) {\n if (!hasDraftChanges(props.model)) return null;\n const { readiness } = props;\n const target = readiness.firstIncomplete;\n return (\n <div\n role=\"status\"\n className=\"pointer-events-auto flex items-center gap-3 rounded-lg border border-solid border-foreground/10 bg-card py-1.5 pl-3 pr-1.5 text-[13px] shadow-sm\"\n >\n <span className=\"h-2 w-2 shrink-0 rounded-full bg-wf-warn\" aria-hidden />\n <span className=\"text-foreground\">You have unpublished changes</span>\n {props.error ? (\n <span className=\"text-xs text-wf-fail\">{props.error}</span>\n ) : null}\n {!readiness.hasTrigger || target ? (\n <span className=\"flex items-center gap-1.5 text-xs text-wf-warn\">\n <span>{target ? \"Incomplete steps\" : \"No trigger yet\"}</span>\n {target ? (\n <button\n type=\"button\"\n className=\"font-medium underline underline-offset-2 hover:no-underline\"\n onClick={() => props.onSelect(target)}\n >\n Show\n </button>\n ) : null}\n </span>\n ) : null}\n <span className=\"flex items-center gap-1\">\n {props.model.published ? (\n <Button size=\"sm\" variant=\"ghost\" onClick={props.onDiscard}>\n Discard changes\n </Button>\n ) : null}\n <PublishButton\n model={props.model}\n readiness={readiness}\n publishing={props.publishing}\n onPublish={props.onPublish}\n onSelect={props.onSelect}\n signIn={props.signIn}\n />\n </span>\n </div>\n );\n}\n","// A step's error from a run.\nexport function StepError(props: { error: string }) {\n return (\n <pre className=\"overflow-auto whitespace-pre-wrap rounded-md bg-wf-fail/10 p-2.5 text-xs text-wf-fail\">\n {props.error}\n </pre>\n );\n}\n","// The documents a run's data references: the run journal keeps a reference\n// (id, type, branch, revision) in place of a document's state.\nimport type { DocumentReference } from \"@powerhousedao/pieces-framework/workflow\";\nimport { useSetSelectedNode } from \"@powerhousedao/reactor-browser\";\nimport { Button } from \"./controls.js\";\n\n// Beyond this many, the rest are counted.\nconst SHOWN = 3;\n\nfunction shortId(id: string): string {\n return id.length > 16 ? `${id.slice(0, 6)}…${id.slice(-6)}` : id;\n}\n\nfunction revisionText(reference: DocumentReference): string {\n const scopes = Object.entries(reference.revision)\n .map(([scope, count]) => `${scope} ${count}`)\n .join(\" · \");\n return reference.branch === \"main\"\n ? scopes\n : `${reference.branch}: ${scopes}`;\n}\n\nfunction DocumentRefRow(props: { reference: DocumentReference }) {\n const { reference } = props;\n const setSelectedNode = useSetSelectedNode();\n return (\n <li\n aria-label={`Document ${reference.documentId}`}\n className=\"flex items-center gap-2\"\n >\n <div className=\"min-w-0 flex-1 text-xs\">\n <div className=\"flex min-w-0 items-baseline gap-1.5\">\n <span className=\"truncate font-medium text-foreground\">\n {reference.documentType}\n </span>\n <span\n className=\"shrink-0 font-mono text-[11px] text-muted-foreground\"\n title={reference.documentId}\n >\n {shortId(reference.documentId)}\n </span>\n </div>\n <div className=\"truncate text-[11px] text-muted-foreground\">\n Revision {revisionText(reference)}\n </div>\n </div>\n <Button\n size=\"sm\"\n onClick={() => setSelectedNode(reference.documentId)}\n aria-label={`Open document ${reference.documentId}`}\n >\n Open document\n </Button>\n </li>\n );\n}\n\nexport function DocumentRefs(props: { references: DocumentReference[] }) {\n const { references } = props;\n const hidden = references.length - SHOWN;\n return (\n <div\n role=\"group\"\n aria-label=\"Document references\"\n className=\"flex flex-col gap-1.5\"\n >\n <ul className=\"m-0 flex list-none flex-col gap-1.5 p-0\">\n {references.slice(0, SHOWN).map((reference, index) => (\n <DocumentRefRow\n key={`${reference.documentId}-${index}`}\n reference={reference}\n />\n ))}\n </ul>\n {hidden > 0 ? (\n <p className=\"text-[11px] text-muted-foreground\">\n and {hidden} more in the data below\n </p>\n ) : null}\n <p className=\"text-[11px] text-muted-foreground\">\n The run kept a reference, not the state. Opening shows the document as\n it is now: past revisions can't be read yet (#3179).\n </p>\n </div>\n );\n}\n","// A run's data (a step's input or output, a trigger payload) as a foldable\n// tree, with a raw JSON view and, given a root, per-key {{references}}.\nimport {\n DOCUMENT_REF_KEY,\n documentRefsIn,\n isDocumentRefMarker,\n} from \"@powerhousedao/pieces-framework/workflow\";\nimport { lazy, Suspense, useState } from \"react\";\nimport { IconButton } from \"./controls.js\";\nimport { DocumentRefs } from \"./document-ref.js\";\n\nconst DataTree = lazy(() => import(\"./data-tree.js\"));\n\nfunction stringify(value: unknown): string {\n try {\n // undefined for functions and symbols, despite the typing.\n return (JSON.stringify(value, null, 2) as string | undefined) ?? \"\";\n } catch {\n return String(value as string);\n }\n}\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null) return true;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\n}\n\nfunction RawJson(props: { text: string }) {\n return (\n <pre className=\"max-h-72 overflow-auto whitespace-pre-wrap break-words font-mono text-xs text-foreground\">\n {props.text}\n </pre>\n );\n}\n\n// Stands in while the tree's chunk loads.\nfunction TreeSkeleton() {\n return (\n <div\n role=\"status\"\n aria-label=\"Loading data\"\n className=\"flex animate-pulse flex-col gap-2 py-1\"\n >\n {[\"w-2/5\", \"w-3/5\", \"w-1/2\", \"w-1/3\"].map((width, index) => (\n <span\n key={width}\n className={`h-2.5 rounded bg-muted ${width}`}\n style={{ marginLeft: index === 0 ? 0 : 16 }}\n />\n ))}\n </div>\n );\n}\n\nexport function DataViewer(props: {\n label: string;\n value: unknown;\n // Expression prefix for this value, e.g. \"steps.fetch.output\".\n root?: string;\n emptyText?: string;\n}) {\n const [raw, setRaw] = useState(false);\n const [copied, setCopied] = useState(false);\n const empty = isEmpty(props.value);\n const text = stringify(props.value);\n const tree = typeof props.value === \"object\" && props.value !== null;\n const references = tree ? documentRefsIn(props.value) : [];\n // A whole value that is a reference shows as one; its other keys stay a tree.\n const treeValue = isDocumentRefMarker(props.value)\n ? Object.fromEntries(\n Object.entries(props.value).filter(([key]) => key !== DOCUMENT_REF_KEY),\n )\n : props.value;\n\n return (\n <section\n aria-label={props.label}\n className=\"min-w-0 rounded-md border border-solid border-border bg-card\"\n >\n <header className=\"flex h-8 items-center gap-1 border-b border-solid border-border pl-3 pr-1\">\n <h4 className=\"mr-auto text-xs font-medium text-foreground\">\n {props.label}\n </h4>\n {!empty && tree ? (\n <button\n type=\"button\"\n aria-pressed={raw}\n className=\"rounded px-1.5 py-0.5 text-[11px] text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40\"\n onClick={() => setRaw((value) => !value)}\n >\n {raw ? \"Tree\" : \"JSON\"}\n </button>\n ) : null}\n {!empty ? (\n <IconButton\n icon={copied ? \"check\" : \"copy\"}\n label={`Copy ${props.label.toLowerCase()} as JSON`}\n onClick={() => {\n void navigator.clipboard.writeText(text).then(() => {\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n });\n }}\n />\n ) : null}\n </header>\n <div className=\"px-3 py-2\">\n {empty ? (\n <p className=\"text-xs text-muted-foreground\">\n {props.emptyText ?? \"Nothing\"}\n </p>\n ) : !tree ? (\n <p className=\"break-words font-mono text-xs text-foreground\">\n {text}\n </p>\n ) : raw ? (\n <RawJson text={text} />\n ) : (\n <div className=\"flex flex-col gap-2\">\n {references.length > 0 ? (\n <DocumentRefs references={references} />\n ) : null}\n {isEmpty(treeValue) ? null : (\n <div className=\"max-h-72 overflow-auto\">\n <Suspense fallback={<TreeSkeleton />}>\n <DataTree value={treeValue as object} root={props.root} />\n </Suspense>\n </div>\n )}\n </div>\n )}\n </div>\n </section>\n );\n}\n","// Plain-language descriptions of when a workflow starts: \"Every day at\n// 08:00 UTC\" rather than \"0 8 * * *\". Unknown shapes fall back to the raw text.\nimport { blockKey } from \"@powerhousedao/pieces-framework/block-type\";\nimport { blockMeta } from \"./block-meta.js\";\nimport {\n MANUAL_TRIGGER,\n REACTOR_PIECE,\n SCHEDULE_TRIGGER,\n WEBHOOK_TRIGGER,\n} from \"./blocks.js\";\nimport { parseScheduleConfig } from \"@powerhousedao/pieces-framework/workflow\";\n\nconst WEEKDAYS = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n];\n\nconst UNIT_LABEL: Record<string, [string, string]> = {\n minutes: [\"minute\", \"minutes\"],\n hours: [\"hour\", \"hours\"],\n days: [\"day\", \"days\"],\n};\n\nfunction isInt(field: string): boolean {\n return /^\\d+$/.test(field);\n}\n\nfunction clock(hour: string, minute: string): string {\n return `${hour.padStart(2, \"0\")}:${minute.padStart(2, \"0\")}`;\n}\n\nfunction dayList(field: string): string | undefined {\n if (field === \"1-5\") return \"on weekdays\";\n if (field === \"0,6\" || field === \"6,0\") return \"at weekends\";\n const days = field.split(\",\");\n if (!days.every((day) => isInt(day) && Number(day) <= 7)) return undefined;\n const names = days.map((day) => WEEKDAYS[Number(day) % 7]);\n if (names.length === 1) return `every ${names[0]}`;\n return `on ${names.slice(0, -1).join(\", \")} and ${names[names.length - 1]}`;\n}\n\n/** Describes a five-field cron expression, or returns undefined. */\nexport function describeCron(cron: string): string | undefined {\n const fields = cron.trim().split(/\\s+/);\n if (fields.length !== 5) return undefined;\n const [minute, hour, dayOfMonth, month, dayOfWeek] = fields;\n if (month !== \"*\") return undefined;\n\n const everyMinutes = /^\\*\\/(\\d+)$/.exec(minute);\n if (everyMinutes && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\") {\n const n = Number(everyMinutes[1]);\n return n === 1 ? \"Every minute\" : `Every ${n} minutes`;\n }\n if (minute === \"*\" && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\")\n return \"Every minute\";\n if (isInt(minute) && hour === \"*\" && dayOfMonth === \"*\" && dayOfWeek === \"*\")\n return minute === \"0\"\n ? \"Every hour, on the hour\"\n : `Every hour at ${minute.padStart(2, \"0\")} past`;\n\n const everyHours = /^\\*\\/(\\d+)$/.exec(hour);\n if (isInt(minute) && everyHours && dayOfMonth === \"*\" && dayOfWeek === \"*\") {\n return `Every ${everyHours[1]} hours`;\n }\n if (!isInt(minute) || !isInt(hour)) return undefined;\n const at = clock(hour, minute);\n\n if (dayOfMonth === \"*\" && dayOfWeek === \"*\") return `Every day at ${at}`;\n if (dayOfMonth === \"*\") {\n const days = dayList(dayOfWeek);\n return days\n ? `${days.charAt(0).toUpperCase()}${days.slice(1)} at ${at}`\n : undefined;\n }\n if (isInt(dayOfMonth) && dayOfWeek === \"*\") {\n return `Every month on day ${dayOfMonth} at ${at}`;\n }\n return undefined;\n}\n\nexport function describeSchedule(config: unknown): string {\n let schedule;\n try {\n schedule = parseScheduleConfig(config);\n } catch {\n return \"On a schedule that does not parse\";\n }\n if (schedule.mode === \"interval\") {\n const unit = UNIT_LABEL[schedule.unit];\n return schedule.every === 1\n ? `Every ${unit[0]}`\n : `Every ${schedule.every} ${unit[1]}`;\n }\n const described = describeCron(schedule.cron);\n return described\n ? `${described} ${schedule.timezone}`\n : `On schedule ${schedule.cron}`;\n}\n\n// A literal config value; an expression or a blank says nothing to show.\nfunction literal(config: unknown, key: string): string | undefined {\n if (!config || typeof config !== \"object\") return undefined;\n const value = (config as Record<string, unknown>)[key];\n if (typeof value !== \"string\") return undefined;\n const text = value.trim();\n return text && !text.includes(\"{{\") ? text : undefined;\n}\n\n// \"umh/production-ledger\" reads as \"Production Ledger\".\nfunction documentTypeLabel(documentType: string): string {\n const name = documentType.split(\"/\").pop() ?? documentType;\n return name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n\n// \"APPROVE_ORDER\" reads as \"Approve order\".\nfunction actionTypeLabel(actionType: string): string {\n const words = actionType\n .toLowerCase()\n .split(/[_\\s]+/)\n .filter(Boolean);\n const text = words.join(\" \");\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\n/** Describes a reactor document trigger by what it filters on. */\nexport function describeDocumentTrigger(\n triggerName: string,\n config: unknown,\n): string | undefined {\n const documentType = literal(config, \"documentType\");\n const label = documentType ? documentTypeLabel(documentType) : \"\";\n const subject = label\n ? `${/^[AEIOU]/.test(label) ? \"an\" : \"a\"} ${label}`\n : literal(config, \"documentId\")\n ? \"its document\"\n : \"a document\";\n switch (triggerName) {\n case \"document-event\": {\n const actionType = literal(config, \"actionType\");\n return actionType\n ? `When ${actionTypeLabel(actionType)} runs on ${subject}`\n : `When ${subject} changes`;\n }\n case \"document-created\":\n return `When ${subject} is created`;\n case \"document-deleted\":\n return `When ${subject} is deleted`;\n default:\n return undefined;\n }\n}\n\n/** When a workflow starts, from its trigger. */\nexport function describeTrigger(\n trigger:\n | { pieceName: string; triggerName: string; config: unknown }\n | null\n | undefined,\n): string {\n if (!trigger) return \"Never starts: no trigger\";\n const block = {\n pieceName: trigger.pieceName,\n kind: \"trigger\" as const,\n name: trigger.triggerName,\n };\n switch (blockKey(block)) {\n case blockKey(MANUAL_TRIGGER):\n return \"Manual\";\n case blockKey(WEBHOOK_TRIGGER):\n return \"When its webhook is called\";\n case blockKey(SCHEDULE_TRIGGER):\n return describeSchedule(trigger.config);\n default: {\n if (trigger.pieceName === REACTOR_PIECE) {\n const described = describeDocumentTrigger(\n trigger.triggerName,\n trigger.config,\n );\n if (described) return described;\n }\n const meta = blockMeta(block);\n const piece = meta.subtitle.replace(/ · Trigger$/, \"\");\n return `${meta.displayName} in ${piece}`;\n }\n }\n}\n"],"mappings":";;;;;;;AAiIA,MAAa,iBAAiB;;AAG9B,MAAa,aAAa;AAI1B,SAAgB,gBACd,OACS;CACT,OAAO,CAAC,MAAM,aAAa,MAAM,UAAU,YAAY,MAAM;AAC/D;AAgHA,SAAgB,cAAc,OAAiB,OAAuB;CACpE,MAAM,OACJ,MACG,YAAY,CAAC,CACb,WAAW,eAAe,GAAG,CAAC,CAC9B,WAAW,YAAY,EAAE,KAAK;CACnC,MAAM,OAAO,IAAI,IAAI,KAAK;CAC1B,IAAI,MAAM;CACV,IAAI,SAAS;CACb,OAAO,KAAK,IAAI,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG;CACvC,OAAO;AACT;;;ACpPA,SAAS,cAAc,WAAsC;CAC3D,IAAI,CAAC,UAAU,YAAY,OAAO;CAClC,IAAI,UAAU,iBAAiB,OAAO;CACtC,OAAO;AACT;AAEA,SAAgB,WAAW,WAAoC;CAC7D,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,MAAM,CAAC,OAAO,YAAY,SAAwB,IAAI;CACtD,MAAM,gBAAgB;EACpB,IAAI,YAAY;EAChB,cAAc,IAAI;EAClB,SAAS,IAAI;EACb,UACG,QAAQ,CAAC,CACT,OAAO,UACN,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,CACjE,CAAC,CACA,cAAc,cAAc,KAAK,CAAC;CACvC;CACA,OAAO;EAAE;EAAY;EAAO;CAAQ;AACtC;AAEA,SAAgB,cAAc,OAQ3B;CACD,MAAM,EAAE,OAAO,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|
|
48
|
+
"version": "6.2.3-dev.78",
|
|
49
49
|
"description": "Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state and schemas, and fire on document events.",
|
|
50
50
|
"bundle": "dist/node/pieces/reactor",
|
|
51
51
|
"descriptor": "dist/node/pieces/reactor/descriptor.json"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/workflow",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.78",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
"./package.json": "./package.json"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@powerhousedao/design-system": "6.2.3-dev.
|
|
74
|
-
"@powerhousedao/pieces-framework": "6.2.3-dev.
|
|
75
|
-
"@powerhousedao/reactor": "6.2.3-dev.
|
|
76
|
-
"@powerhousedao/reactor-browser": "6.2.3-dev.
|
|
77
|
-
"@powerhousedao/shared": "6.2.3-dev.
|
|
73
|
+
"@powerhousedao/design-system": "6.2.3-dev.78",
|
|
74
|
+
"@powerhousedao/pieces-framework": "6.2.3-dev.78",
|
|
75
|
+
"@powerhousedao/reactor": "6.2.3-dev.78",
|
|
76
|
+
"@powerhousedao/reactor-browser": "6.2.3-dev.78",
|
|
77
|
+
"@powerhousedao/shared": "6.2.3-dev.78",
|
|
78
78
|
"@tanstack/react-query": "^5.49.2",
|
|
79
79
|
"@uiw/react-json-view": "2.0.0-alpha.42",
|
|
80
80
|
"@xyflow/react": "12.11.6",
|
|
81
|
-
"document-model": "6.2.3-dev.
|
|
81
|
+
"document-model": "6.2.3-dev.78",
|
|
82
82
|
"graphql": "^16",
|
|
83
83
|
"react": "19.2.6",
|
|
84
84
|
"react-dom": "19.2.6",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@playwright/test": "^1.60.0",
|
|
91
|
-
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.
|
|
91
|
+
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.78",
|
|
92
92
|
"@tailwindcss/cli": "4.2.2",
|
|
93
93
|
"@testing-library/react": "^16.0.1",
|
|
94
94
|
"@types/node": "25.2.3",
|