@powerhousedao/workflow 6.2.3-dev.27 → 6.2.3-dev.29
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-COZm6-ev.mjs → browser/BlockSelector-D24DIiSX.js} +45 -12
- package/dist/browser/{BlockSelector-QQgOCVH3.js.map → BlockSelector-D24DIiSX.js.map} +1 -1
- package/dist/browser/{PieceMarkdown-C8Gv88TV.js → PieceMarkdown-B8EEaQgT.js} +2 -2
- package/dist/browser/{PieceMarkdown-C8Gv88TV.js.map → PieceMarkdown-B8EEaQgT.js.map} +1 -1
- package/dist/browser/{connection-form-XKR4zQgQ.js → connection-form-D-NETdDQ.js} +3 -3
- package/dist/browser/{connection-form-XKR4zQgQ.js.map → connection-form-D-NETdDQ.js.map} +1 -1
- package/dist/browser/{data-tree-DKrDFeQg.js → data-tree-DA4sc7B7.js} +2 -2
- package/dist/browser/{data-tree-DKrDFeQg.js.map → data-tree-DA4sc7B7.js.map} +1 -1
- package/dist/browser/{document-models-C6ebrsd9.js → document-models-BohsduV4.js} +2 -2
- package/dist/browser/{document-models-C6ebrsd9.js.map → document-models-BohsduV4.js.map} +1 -1
- package/dist/browser/{editor-YZw296bf.js → editor-B6N0PCuZ.js} +754 -417
- package/dist/browser/editor-B6N0PCuZ.js.map +1 -0
- package/dist/browser/{editor-C_E_JTp6.js → editor-BkdwuOC-.js} +4 -4
- package/dist/browser/{editor-C_E_JTp6.js.map → editor-BkdwuOC-.js.map} +1 -1
- package/dist/browser/{editor-fjwq-8Yq.js → editor-CZ5NvCyv.js} +4 -4
- package/dist/browser/{editor-fjwq-8Yq.js.map → editor-CZ5NvCyv.js.map} +1 -1
- package/dist/browser/editors/connection-editor/module.js +1 -1
- package/dist/browser/editors/workflow-editor/module.js +1 -1
- package/dist/browser/editors/workflow-studio/module.js +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/browser/reactor/index.js +1 -1
- package/dist/browser/{runtime-api-xwvg5PzA.js → runtime-api-DDMQc4PB.js} +136 -40
- package/dist/browser/runtime-api-DDMQc4PB.js.map +1 -0
- package/dist/browser/{trigger-text-CdNxQOHw.js → trigger-text-CUv5Z2Uk.js} +4 -4
- package/dist/browser/{trigger-text-CdNxQOHw.js.map → trigger-text-CUv5Z2Uk.js.map} +1 -1
- package/dist/{browser/BlockSelector-QQgOCVH3.js → node/BlockSelector-CTmmpYxu.mjs} +45 -12
- package/dist/node/{BlockSelector-COZm6-ev.mjs.map → BlockSelector-CTmmpYxu.mjs.map} +1 -1
- package/dist/node/{PieceMarkdown-DIxZY5aG.mjs → PieceMarkdown-BMhBGa4t.mjs} +2 -2
- package/dist/node/{PieceMarkdown-DIxZY5aG.mjs.map → PieceMarkdown-BMhBGa4t.mjs.map} +1 -1
- package/dist/node/{connection-form-BLduFusc.mjs → connection-form-C9vbfSnA.mjs} +3 -3
- package/dist/node/{connection-form-BLduFusc.mjs.map → connection-form-C9vbfSnA.mjs.map} +1 -1
- package/dist/node/{data-tree-CmiGqG7C.mjs → data-tree-CbqpF3lC.mjs} +2 -2
- package/dist/node/{data-tree-CmiGqG7C.mjs.map → data-tree-CbqpF3lC.mjs.map} +1 -1
- package/dist/node/{editor-CN4PEGrW.mjs → editor-By9BHI8e.mjs} +4 -4
- package/dist/node/{editor-CN4PEGrW.mjs.map → editor-By9BHI8e.mjs.map} +1 -1
- package/dist/node/{editor-B2ZoeGue.mjs → editor-DP36YDk5.mjs} +754 -417
- package/dist/node/editor-DP36YDk5.mjs.map +1 -0
- package/dist/node/{editor-CyNBEKoj.mjs → editor-StBssjcQ.mjs} +4 -4
- package/dist/node/{editor-CyNBEKoj.mjs.map → editor-StBssjcQ.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/index.mjs +2 -2
- package/dist/node/pieces/reactor/descriptor.json +72 -16
- package/dist/node/pieces/reactor/index.mjs +317 -22
- package/dist/node/pieces/reactor/index.mjs.map +1 -1
- package/dist/node/{runtime-api-xwvg5PzA.mjs → runtime-api-DDMQc4PB.mjs} +136 -40
- package/dist/node/runtime-api-DDMQc4PB.mjs.map +1 -0
- package/dist/node/{trigger-text-qj_U3Qzd.mjs → trigger-text-Bzq6VfOQ.mjs} +4 -4
- package/dist/node/{trigger-text-qj_U3Qzd.mjs.map → trigger-text-Bzq6VfOQ.mjs.map} +1 -1
- package/dist/powerhouse.manifest.json +1 -1
- package/dist/style.css +59 -3
- package/dist/types/editors/shared/controls.d.ts +8 -0
- package/dist/types/editors/shared/controls.d.ts.map +1 -1
- package/dist/types/editors/shared/icons.d.ts +2 -0
- package/dist/types/editors/shared/icons.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-api.d.ts +2 -1
- package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +3 -2
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/forms.d.ts +42 -5
- package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts +1 -0
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts +61 -0
- package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/prop-layout.d.ts +12 -0
- package/dist/types/editors/workflow-editor/ui/prop-layout.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +3 -1
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +2 -1
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/input-props.d.ts +5 -0
- package/dist/types/pieces/reactor/lib/input-props.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/input-props.test.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/input-props.test.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/input-schema.d.ts +22 -0
- package/dist/types/pieces/reactor/lib/input-schema.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/input-schema.test.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/input-schema.test.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/reactor.d.ts +13 -1
- package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
- package/dist/types/pieces/reactor/lib/schema-text.d.ts +7 -0
- package/dist/types/pieces/reactor/lib/schema-text.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/schema-text.test.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/schema-text.test.d.ts.map +1 -0
- package/dist/types/scripts/ui-stack.d.ts +22 -0
- package/dist/types/scripts/ui-stack.d.ts.map +1 -1
- package/dist/types/test/ui/harness/prop-controls.d.ts +6 -0
- package/dist/types/test/ui/harness/prop-controls.d.ts.map +1 -0
- package/dist/types/test/ui/prop-controls.spec.d.ts +2 -0
- package/dist/types/test/ui/prop-controls.spec.d.ts.map +1 -0
- package/dist/types/test/ui/reactor-steps.spec.d.ts +2 -0
- package/dist/types/test/ui/reactor-steps.spec.d.ts.map +1 -0
- package/package.json +8 -8
- package/dist/browser/editor-YZw296bf.js.map +0 -1
- package/dist/browser/runtime-api-xwvg5PzA.js.map +0 -1
- package/dist/node/editor-B2ZoeGue.mjs.map +0 -1
- package/dist/node/runtime-api-xwvg5PzA.mjs.map +0 -1
- package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts +0 -6
- package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts +0 -20
- package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/ui/action-template.d.ts +0 -2
- package/dist/types/editors/workflow-editor/ui/action-template.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/ui/action-template.test.d.ts +0 -2
- package/dist/types/editors/workflow-editor/ui/action-template.test.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.d.ts +0 -5
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.d.ts.map +0 -1
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.test.d.ts +0 -2
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.test.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-api-xwvg5PzA.js","names":[],"sources":["../../editors/workflow-editor/ui/reactor-piece-form.ts","../../editors/workflow-editor/ui/forms.ts","../../editors/workflow-editor/runtime-api.ts"],"sourcesContent":["// How this editor renders the reactor piece's props.\n\n// The piece declares what any host could serve: DROPDOWNs with options() and\n// a JSON list of actions. This editor has richer controls for both — an\n// autocomplete that also takes an expression, and a per-action editor — so it\n// substitutes them by prop name. The piece stays portable; the mapping is the\n// one place that knows this editor can do better.\nimport type { BlockFormProp } from \"./forms.js\";\n\n// The piece this package ships, named as pieces/index.ts declares it.\nexport const REACTOR_PIECE = \"@powerhousedao/piece-reactor\";\n\n// Values that name a document or a model: a step is as likely to feed one\n// from an upstream expression as to pick it, which a select cannot express.\nconst AUTOCOMPLETE_PROPS = new Set([\n \"documentType\",\n \"documentId\",\n \"actionType\",\n \"parentId\",\n \"driveId\",\n]);\n\nexport function isReactorPieceBlock(blockType: string): boolean {\n return (\n blockType.startsWith(`${REACTOR_PIECE}#`) ||\n blockType.startsWith(`${REACTOR_PIECE}@`)\n );\n}\n\nexport function adaptReactorProps(props: BlockFormProp[]): BlockFormProp[] {\n const hasActionList = props.some((prop) => prop.name === \"actions\");\n return props.flatMap((prop): BlockFormProp[] => {\n if (prop.name === \"actions\") {\n return [{ ...prop, type: \"PH_ACTIONS\", hasDynamicResolver: true }];\n }\n // Beside an action list this prop is not a field of its own: it is where\n // the list's action types come from.\n if (prop.name === \"actionType\" && hasActionList) return [];\n if (AUTOCOMPLETE_PROPS.has(prop.name)) {\n return [{ ...prop, type: \"PH_AUTOCOMPLETE\", hasDynamicResolver: true }];\n }\n return [prop];\n });\n}\n","// Form descriptors driving property panels; pure data, mirrors the\n// ConnectorPropDescriptor shape from the workflow runtime.\n\nexport interface BlockFormProp {\n name: string;\n displayName: string;\n type: string;\n required: boolean;\n defaultValue?: unknown;\n staticOptions?: { label: string; value: unknown }[];\n hasDynamicResolver?: boolean;\n description?: string;\n placeholder?: string;\n // Sibling prop names whose values feed the resolver; a change re-runs it.\n refreshers?: string[];\n // Nested shape: ARRAY item fields, or what a DYNAMIC resolver produced.\n properties?: BlockFormProp[];\n // Folded behind \"Advanced\": fields with a working default, so the common\n // case is short. Opens expanded when set, else live config would be hidden.\n advanced?: boolean;\n // Shown only while a sibling prop holds one of these values; data, not a\n // predicate, so a piece form arriving as JSON can express it too.\n // Hidden also when `unlessSet` has a value (a mode the runtime infers).\n showWhen?: { prop: string; oneOf: unknown[]; unlessSet?: string };\n}\n\nexport interface BlockForm {\n title: string;\n requireAuth: boolean;\n // Whether the block takes a connection: none hides the field entirely.\n auth?: \"none\" | \"optional\" | \"required\";\n props: BlockFormProp[];\n // Piece triggers only: POLLING | WEBHOOK | APP_WEBHOOK. WEBHOOK triggers\n // are fed by a request, so the panel shows their endpoint URL.\n triggerStrategy?: string;\n}\n\nexport interface ConnectionSummary {\n id: string;\n name: string;\n connectorId: string;\n authType: string;\n status: string;\n accountLabel: string | null;\n}\n\nexport interface SecretStat {\n ref: string;\n label: string | null;\n version: number;\n status: string;\n createdAt: string;\n updatedAt: string;\n}\n\n// Minting seam for PH_SECRET_REF props: the field takes a value and the\n// document only ever receives the ref that comes back.\nexport interface SecretFormService {\n save: (input: {\n ref?: string;\n value: string;\n label: string;\n }) => Promise<SecretStat>;\n stat: (ref: string) => Promise<SecretStat | null>;\n}\n\nexport interface WebhookEndpoint {\n workflowId: string;\n url: string;\n // False when `url` is a bare path because the reactor has no public origin.\n absoluteUrl: boolean;\n armed: boolean;\n createdAt: string;\n}\n\nexport interface DesignTimeService {\n getBlockForm: (blockType: string) => Promise<BlockForm | null>;\n loadOptions: (\n blockType: string,\n propName: string,\n input: Record<string, unknown>,\n connectionId?: string,\n ) => Promise<unknown>;\n // Runs the current workflow's piece trigger test hook; sample items back.\n testTrigger?: () => Promise<unknown>;\n // The current workflow's webhook endpoint, for core#webhook triggers.\n webhookEndpoint?: () => Promise<WebhookEndpoint | null>;\n // Backs PH_SECRET_REF props; absent when the runtime refuses secret writes.\n secrets?: SecretFormService;\n // powerhouse/connection documents for the connection picker.\n listConnections?: () => Promise<ConnectionSummary[]>;\n // Drops the cached listing after the picker creates a connection.\n refreshConnections?: () => void;\n // The current workflow's most recent run, for a step's \"Last run\" preview.\n latestRun?: () => Promise<LatestRun | null>;\n}\n\nexport interface LatestRun {\n status: string;\n startedAt: string;\n triggerPayload: unknown;\n steps: {\n stepKey: string;\n status: string;\n input: unknown;\n output: unknown;\n error: string | null;\n }[];\n}\n\n// Ours, not the piece's: the reactor's poll cadence for a piece trigger.\n// Appended to every piece trigger's form; see splitPollInterval in the runtime.\nexport const POLL_INTERVAL_PROP: BlockFormProp = {\n name: \"pollEverySeconds\",\n displayName: \"Poll every (seconds)\",\n type: \"NUMBER\",\n required: false,\n description:\n \"How often the reactor checks this trigger; 60 at the least. Omit to follow the piece's own cadence.\",\n};\n\nconst text = (\n name: string,\n displayName: string,\n required = false,\n description?: string,\n): BlockFormProp => ({\n name,\n displayName,\n type: \"SHORT_TEXT\",\n required,\n description,\n});\n\n// Takes a secret VALUE and commits only the minted ref, the way the\n// connection editor's SecretField does; the document never holds the value.\nconst secretRef = (\n name: string,\n displayName: string,\n required = false,\n description?: string,\n): BlockFormProp => ({\n name,\n displayName,\n type: \"PH_SECRET_REF\",\n required,\n description,\n});\n\nconst number = (\n name: string,\n displayName: string,\n required = false,\n description?: string,\n): BlockFormProp => ({\n name,\n displayName,\n type: \"NUMBER\",\n required,\n description,\n});\n\n// Marks a prop for the \"Advanced\" section without repeating the builders.\nconst advanced = (prop: BlockFormProp): BlockFormProp => ({\n ...prop,\n advanced: true,\n});\n\n// Hides a prop until a sibling holds one of `oneOf`.\nconst shownWhen = (\n prop: BlockFormProp,\n sibling: string,\n oneOf: unknown[],\n): BlockFormProp => ({ ...prop, showWhen: { prop: sibling, oneOf } });\n\nconst dropdown = (\n name: string,\n displayName: string,\n options: { label: string; value: unknown }[],\n required = false,\n description?: string,\n): BlockFormProp => ({\n name,\n displayName,\n type: \"STATIC_DROPDOWN\",\n required,\n description,\n staticOptions: options,\n});\n\n// Every scheme that verifies a signature, and so needs a secret.\nconst SIGNED_SCHEMES = [\"token\", \"hmac\", \"hmac-prefixed\", \"hmac-timestamped\"];\n\n// Schemes that compute a digest, and so take a hash and an encoding. `token`\n// presents the secret verbatim, so none of that applies to it.\nconst HMAC_SCHEMES = [\"hmac\", \"hmac-prefixed\", \"hmac-timestamped\"];\n\n// Hand-written forms for core blocks and triggers.\nexport const CORE_FORMS: Record<string, BlockForm> = {\n \"core#manual\": {\n title: \"Manual trigger\",\n requireAuth: false,\n auth: \"none\",\n props: [],\n },\n \"core#schedule\": {\n title: \"Schedule\",\n requireAuth: false,\n auth: \"none\",\n props: [\n // Optional at run time: an omitted mode follows whichever of cron or\n // every is set, so the form defaults to cron rather than demanding one.\n {\n ...dropdown(\"mode\", \"Runs\", [\n { label: \"On a cron schedule\", value: \"cron\" },\n { label: \"At a fixed interval\", value: \"interval\" },\n ]),\n defaultValue: \"cron\",\n },\n // No mode but an `every` is interval mode to the runtime, so no cron.\n {\n ...text(\n \"cron\",\n \"Cron expression\",\n true,\n \"Five fields, e.g. 0 9 * * 1-5 runs at 09:00 on weekdays.\",\n ),\n showWhen: {\n prop: \"mode\",\n oneOf: [\"cron\", undefined],\n unlessSet: \"every\",\n },\n },\n shownWhen(\n number(\"every\", \"Every\", true, \"At least one minute.\"),\n \"mode\",\n [\"interval\"],\n ),\n shownWhen(\n {\n ...dropdown(\"unit\", \"Unit\", [\n { label: \"Minutes\", value: \"minutes\" },\n { label: \"Hours\", value: \"hours\" },\n { label: \"Days\", value: \"days\" },\n ]),\n defaultValue: \"minutes\",\n },\n \"mode\",\n [\"interval\"],\n ),\n text(\n \"timezone\",\n \"Timezone\",\n false,\n \"An IANA name such as Europe/Lisbon. Defaults to UTC.\",\n ),\n ],\n },\n \"core#webhook\": {\n title: \"Webhook\",\n requireAuth: false,\n auth: \"none\",\n props: [\n dropdown(\n \"methods\",\n \"Method\",\n [\n { label: \"POST\", value: \"POST\" },\n { label: \"Any\", value: \"ANY\" },\n { label: \"GET\", value: \"GET\" },\n { label: \"PUT\", value: \"PUT\" },\n { label: \"PATCH\", value: \"PATCH\" },\n { label: \"DELETE\", value: \"DELETE\" },\n ],\n true,\n ),\n // Named by wire format, not by sender: authors match these against their\n // sender's docs, and one brand name would mislead about every other.\n dropdown(\n \"scheme\",\n \"Verification\",\n [\n { label: \"None — the URL's token only\", value: \"none\" },\n { label: \"Shared token in a header\", value: \"token\" },\n { label: \"HMAC digest\", value: \"hmac\" },\n {\n label: \"HMAC digest with a label (sha256=…)\",\n value: \"hmac-prefixed\",\n },\n {\n label: \"HMAC digest, timestamped (t=…,v1=…)\",\n value: \"hmac-timestamped\",\n },\n ],\n true,\n ),\n // Hidden while the scheme is None: a visible secret field on an\n // unverified endpoint invites a secret that is never checked.\n shownWhen(\n secretRef(\n \"secretRef\",\n \"Secret\",\n true,\n \"The shared secret: the value the header must equal, or the key the sender signs with\",\n ),\n \"scheme\",\n SIGNED_SCHEMES,\n ),\n advanced(\n shownWhen(\n text(\n \"header\",\n \"Header\",\n false,\n \"Where the token or signature is read from. Defaults to the header the chosen scheme conventionally uses; set it only if the sender differs\",\n ),\n \"scheme\",\n SIGNED_SCHEMES,\n ),\n ),\n advanced(\n shownWhen(\n number(\n \"toleranceSeconds\",\n \"Replay window (seconds)\",\n false,\n \"Rejects a delivery signed longer ago than this, so a captured request expires. Default 300\",\n ),\n \"scheme\",\n [\"hmac-timestamped\"],\n ),\n ),\n // The layout frames the signature; these say how its digest was computed.\n // Senders pick them independently, so they are fields, not scheme names.\n advanced(\n shownWhen(\n dropdown(\"algorithm\", \"Hash\", [\n { label: \"SHA-256 (default)\", value: \"sha256\" },\n { label: \"SHA-1\", value: \"sha1\" },\n { label: \"SHA-512\", value: \"sha512\" },\n ]),\n \"scheme\",\n HMAC_SCHEMES,\n ),\n ),\n advanced(\n shownWhen(\n dropdown(\"encoding\", \"Digest encoding\", [\n { label: \"Hexadecimal (default)\", value: \"hex\" },\n { label: \"Base64\", value: \"base64\" },\n ]),\n \"scheme\",\n HMAC_SCHEMES,\n ),\n ),\n advanced(\n shownWhen(\n text(\n \"prefix\",\n \"Signature label\",\n false,\n \"The literal before the digest. Defaults to the hash and an equals sign, e.g. sha256=. Leave blank for a sender that sends the digest with no label\",\n ),\n \"scheme\",\n [\"hmac-prefixed\"],\n ),\n ),\n advanced(\n text(\n \"dedupeField\",\n \"Event id field\",\n false,\n \"Where the sender puts its own event id, so a redelivery is accepted without a second run. A bare name reads a query param or a top-level body field; prefix with header: or body: to read a header or a nested path (header:x-delivery-id, body:data.object.id)\",\n ),\n ),\n advanced(\n number(\n \"dedupeTtlSeconds\",\n \"Dedupe window (seconds)\",\n false,\n \"How long an event id is remembered. Default 300\",\n ),\n ),\n advanced(\n text(\n \"challengeField\",\n \"Challenge field\",\n false,\n \"Echo this field back instead of running, for senders that verify the endpoint before registering it. Same header:/body: prefixes as the event id field\",\n ),\n ),\n advanced(\n dropdown(\n \"responseMode\",\n \"Response\",\n [\n { label: \"Answer immediately (202)\", value: \"async\" },\n { label: \"Wait for the run (200)\", value: \"sync\" },\n ],\n false,\n \"Waiting holds the sender's socket open for the whole run\",\n ),\n ),\n advanced(\n number(\n \"responseStatus\",\n \"Success status\",\n false,\n \"Status returned on acceptance. Default 202 async, 200 sync\",\n ),\n ),\n ],\n },\n \"core#branch\": {\n title: \"Branch\",\n requireAuth: false,\n auth: \"none\",\n props: [\n text(\n \"condition\",\n \"Condition\",\n true,\n \"e.g. {{steps.fetch.output.body.ok}}\",\n ),\n text(\n \"equals\",\n \"Equals\",\n false,\n \"Take the true port only when the condition matches this; omit for truthiness\",\n ),\n ],\n },\n \"core#assert\": {\n title: \"Assert\",\n requireAuth: false,\n auth: \"none\",\n props: [\n text(\n \"value\",\n \"Value\",\n true,\n \"e.g. {{steps.describe.output}} - the run fails when it is blank\",\n ),\n {\n name: \"rejectValues\",\n displayName: \"Rejected values\",\n type: \"ARRAY\",\n required: false,\n description:\n \"One per line; the run fails when the value matches any of them\",\n },\n {\n name: \"allowValues\",\n displayName: \"Allowed values\",\n type: \"ARRAY\",\n required: false,\n description:\n \"One per line; when set, anything else fails. Safer than a reject list for model output\",\n },\n {\n name: \"allowEmpty\",\n displayName: \"Allow empty\",\n type: \"CHECKBOX\",\n required: false,\n description: \"Accept a blank value instead of failing\",\n },\n text(\"message\", \"Failure message\", false, \"Replaces the default error\"),\n ],\n },\n};\n","// Design-time channel to the workflow-runtime subgraph: piece descriptors\n// and dynamic option resolution. Not document-model coupled.\nimport { ambientRenownTokenProvider } from \"@powerhousedao/reactor-browser/graphql-client\";\nimport {\n adaptReactorProps,\n isReactorPieceBlock,\n} from \"./ui/reactor-piece-form.js\";\nimport {\n CORE_FORMS,\n POLL_INTERVAL_PROP,\n type BlockForm,\n type BlockFormProp,\n} from \"./ui/forms.js\";\n\nexport const DEFAULT_RUNTIME_URL =\n \"http://localhost:4001/graphql/workflow-runtime\";\n\nlet currentRuntimeUrl: string | undefined;\n\n// Set by useSyncWorkflowRuntimeUrl from the drive's resolved switchboard URL.\nexport function setRuntimeUrl(url: string): void {\n if (url === currentRuntimeUrl) return;\n currentRuntimeUrl = url;\n // Cached design-time results belong to the previous switchboard.\n formCache.clear();\n outputTreeCache.clear();\n catalogCache = undefined;\n}\n\nfunction runtimeUrl(): string {\n return currentRuntimeUrl ?? DEFAULT_RUNTIME_URL;\n}\n\nasync function gql<T>(\n query: string,\n variables: Record<string, unknown>,\n): Promise<T> {\n // Mirrors the reactor-browser switchboard AI tool's auth: attach the\n // Renown bearer token when one is available, else go out anonymously.\n const token = await ambientRenownTokenProvider();\n const response = await fetch(runtimeUrl(), {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n ...(token ? { authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify({ query, variables }),\n });\n const body = (await response.json()) as {\n data?: T;\n errors?: { message: string }[];\n };\n if (body.errors?.length) throw new Error(body.errors[0].message);\n if (!body.data) throw new Error(\"Empty GraphQL response\");\n return body.data;\n}\n\ninterface BlockEntryDescriptor {\n displayName: string;\n requireAuth: boolean;\n props: BlockFormProp[];\n // Triggers only: POLLING | WEBHOOK | APP_WEBHOOK.\n strategy?: string;\n}\n\ninterface BlockDescriptorResult {\n workflowRuntime: {\n blockDescriptor: {\n displayName: string;\n auth?: unknown;\n action?: BlockEntryDescriptor;\n trigger?: BlockEntryDescriptor;\n } | null;\n };\n}\n\nconst formCache = new Map<string, Promise<BlockForm | null>>();\n\nexport function getBlockForm(blockType: string): Promise<BlockForm | null> {\n const core = CORE_FORMS[blockType] as BlockForm | undefined;\n if (core) return Promise.resolve(core);\n let cached = formCache.get(blockType);\n if (!cached) {\n cached = gql<BlockDescriptorResult>(\n `query Descriptor($blockType: String!) {\n workflowRuntime { blockDescriptor(blockType: $blockType) }\n }`,\n { blockType },\n ).then((data) => {\n const descriptor = data.workflowRuntime.blockDescriptor;\n const entry = descriptor?.action ?? descriptor?.trigger;\n if (!descriptor || !entry) return null;\n const isTrigger = !descriptor.action && Boolean(descriptor.trigger);\n // A poll cadence is meaningless for a trigger the provider pushes to,\n // or for one this reactor fires itself, so the prop is only offered\n // where it actually applies.\n const reactorPiece = isReactorPieceBlock(blockType);\n const polled = isTrigger && entry.strategy !== \"WEBHOOK\" && !reactorPiece;\n const props = reactorPiece ? adaptReactorProps(entry.props) : entry.props;\n return {\n title: `${descriptor.displayName} · ${entry.displayName}`,\n requireAuth: entry.requireAuth,\n auth: !descriptor.auth\n ? (\"none\" as const)\n : entry.requireAuth\n ? (\"required\" as const)\n : (\"optional\" as const),\n props: polled ? [...props, POLL_INTERVAL_PROP] : props,\n triggerStrategy: isTrigger ? entry.strategy : undefined,\n };\n });\n formCache.set(blockType, cached);\n cached.catch(() => formCache.delete(blockType));\n }\n return cached;\n}\n\nexport interface PieceSummary {\n name: string;\n displayName: string;\n description: string;\n logoUrl: string;\n version: string;\n actionCount: number;\n triggerCount: number;\n // Activepieces category ids, e.g. ARTIFICIAL_INTELLIGENCE, SALES_AND_CRM.\n categories: string[];\n // PieceAuth descriptor, verbatim from the piece; null when authless.\n auth?: unknown;\n // Why none of the piece's blocks can run on this reactor.\n unsupported?: string | null;\n}\n\nexport interface PieceActionEntry {\n name: string;\n displayName: string;\n description: string;\n blockType: string;\n unsupported?: string | null;\n}\n\nlet catalogCache: Promise<PieceSummary[]> | undefined;\n\nexport function fetchPieceCatalog(): Promise<PieceSummary[]> {\n catalogCache ??= gql<{ workflowRuntime: { pieceCatalog: PieceSummary[] } }>(\n `query Catalog { workflowRuntime { pieceCatalog } }`,\n {},\n ).then((data) => data.workflowRuntime.pieceCatalog);\n catalogCache.catch(() => (catalogCache = undefined));\n return catalogCache;\n}\n\nexport async function fetchPieceActions(\n packageName: string,\n): Promise<PieceActionEntry[]> {\n const data = await gql<{\n workflowRuntime: { pieceActions: { actions: PieceActionEntry[] } };\n }>(\n `query Actions($packageName: String!) {\n workflowRuntime { pieceActions(packageName: $packageName) }\n }`,\n { packageName },\n );\n return data.workflowRuntime.pieceActions.actions;\n}\n\nexport interface PieceTriggerEntry {\n name: string;\n displayName: string;\n description: string;\n strategy: string;\n blockType: string;\n unsupported?: string | null;\n}\n\nexport async function fetchPieceTriggers(\n packageName: string,\n): Promise<PieceTriggerEntry[]> {\n const data = await gql<{\n workflowRuntime: { pieceTriggers: { triggers: PieceTriggerEntry[] } };\n }>(\n `query Triggers($packageName: String!) {\n workflowRuntime { pieceTriggers(packageName: $packageName) }\n }`,\n { packageName },\n );\n return data.workflowRuntime.pieceTriggers.triggers;\n}\n\nexport interface BlockSearchHit {\n blockType: string;\n pieceName: string;\n pieceDisplayName: string;\n logoUrl: string;\n displayName: string;\n description: string;\n kind: \"action\" | \"trigger\";\n strategy: string | null;\n unsupported: string | null;\n}\n\nexport interface BlockSearchResult {\n status: \"ready\" | \"indexing\" | \"error\";\n hits: BlockSearchHit[];\n indexedPieces: number;\n error: string | null;\n}\n\n// Catalog-wide action/trigger search; \"indexing\" on the very first calls.\nexport async function searchBlocks(\n query: string,\n limit = 30,\n): Promise<BlockSearchResult> {\n const data = await gql<{\n workflowRuntime: { searchBlocks: BlockSearchResult };\n }>(\n `query SearchBlocks($query: String!, $limit: Int) {\n workflowRuntime { searchBlocks(query: $query, limit: $limit) {\n status indexedPieces error\n hits { blockType pieceName pieceDisplayName logoUrl displayName description kind strategy unsupported }\n } }\n }`,\n { query, limit },\n );\n return data.workflowRuntime.searchBlocks;\n}\n\nexport interface OutputTreeNode {\n name: string;\n type: string;\n description?: string;\n children?: OutputTreeNode[];\n}\n\nexport interface OutputTree {\n source: \"schema\" | \"sample\" | \"static\" | \"none\";\n nodes: OutputTreeNode[];\n}\n\nconst outputTreeCache = new Map<string, Promise<OutputTree>>();\n\nexport function fetchBlockOutputTree(\n blockType: string,\n config: unknown,\n): Promise<OutputTree> {\n const key = `${blockType}:${JSON.stringify(config ?? {})}`;\n let cached = outputTreeCache.get(key);\n if (!cached) {\n cached = gql<{ workflowRuntime: { blockOutputTree: OutputTree } }>(\n `query OutputTree($blockType: String!, $config: Unknown) {\n workflowRuntime { blockOutputTree(blockType: $blockType, config: $config) }\n }`,\n { blockType, config: config ?? {} },\n ).then((data) => data.workflowRuntime.blockOutputTree);\n outputTreeCache.set(key, cached);\n cached.catch(() => outputTreeCache.delete(key));\n }\n return cached;\n}\n\nexport interface ConnectionSummary {\n id: string;\n name: string;\n connectorId: string;\n authType: string;\n status: string;\n accountLabel: string | null;\n}\n\n// Deliberately uncached. The server scopes this list to the caller's read\n// access, and nothing here identifies the caller to key a cache on.\nexport function fetchConnections(): Promise<ConnectionSummary[]> {\n return gql<{\n workflowRuntime: { connections: ConnectionSummary[] };\n }>(\n `query Connections { workflowRuntime { connections { id name connectorId authType status accountLabel } } }`,\n {},\n ).then((data) => data.workflowRuntime.connections);\n}\n\n// Kept for the picker, which creates connections and then refreshes; there is\n// no longer a cache for it to drop.\nexport function invalidateConnections(): void {}\n\nexport interface ConnectionCheckResult {\n ok: boolean;\n detail: string;\n accountLabel: string | null;\n}\n\n// Runs the piece's own connection check against a document's stored credentials.\n// No secrets cross this boundary: the subgraph resolves refs server-side.\nexport function checkConnection(\n connectionId: string,\n): Promise<ConnectionCheckResult> {\n return gql<{\n workflowRuntime: { checkConnection: ConnectionCheckResult };\n }>(\n `mutation CheckConnection($connectionId: String!) {\n workflowRuntime {\n checkConnection(connectionId: $connectionId) {\n ok\n detail\n accountLabel\n }\n }\n }`,\n { connectionId },\n ).then((data) => data.workflowRuntime.checkConnection);\n}\n\nexport interface SecretStat {\n ref: string;\n label: string | null;\n version: number;\n status: \"ACTIVE\" | \"DELETED\";\n createdAt: string;\n updatedAt: string;\n}\n\nconst SECRET_FIELDS = \"ref label version status createdAt updatedAt\";\n\n// Mints a managed secret; only the returned ref ever enters a document.\nexport async function createSecret(\n value: string,\n label?: string,\n): Promise<SecretStat> {\n const data = await gql<{ workflowRuntime: { createSecret: SecretStat } }>(\n `mutation CreateSecret($value: String!, $label: String) {\n workflowRuntime { createSecret(value: $value, label: $label) { ${SECRET_FIELDS} } }\n }`,\n { value, label: label ?? null },\n );\n return data.workflowRuntime.createSecret;\n}\n\n// Same ref, version+1; referencing documents stay untouched.\nexport async function rotateSecret(\n ref: string,\n value: string,\n): Promise<SecretStat> {\n const data = await gql<{ workflowRuntime: { rotateSecret: SecretStat } }>(\n `mutation RotateSecret($ref: String!, $value: String!) {\n workflowRuntime { rotateSecret(ref: $ref, value: $value) { ${SECRET_FIELDS} } }\n }`,\n { ref, value },\n );\n return data.workflowRuntime.rotateSecret;\n}\n\n// Metadata only; null for unknown or legacy refs.\nexport async function fetchSecretStat(ref: string): Promise<SecretStat | null> {\n const data = await gql<{ workflowRuntime: { secret: SecretStat | null } }>(\n `query Secret($ref: String!) {\n workflowRuntime { secret(ref: $ref) { ${SECRET_FIELDS} } }\n }`,\n { ref },\n );\n return data.workflowRuntime.secret;\n}\n\nexport interface WebhookEndpointRecord {\n workflowId: string;\n url: string;\n // False when `url` is a bare path because the reactor has no public origin.\n absoluteUrl: boolean;\n armed: boolean;\n createdAt: string;\n}\n\n// Never cached: the runtime mints the endpoint on the first call and `armed`\n// tracks the workflow's status.\nexport async function fetchWebhookEndpoint(\n workflowId: string,\n): Promise<WebhookEndpointRecord | null> {\n const data = await gql<{\n workflowRuntime: { webhookEndpoint: WebhookEndpointRecord | null };\n }>(\n `query WebhookEndpoint($workflowId: String!) {\n workflowRuntime {\n webhookEndpoint(workflowId: $workflowId) {\n workflowId url absoluteUrl armed createdAt\n }\n }\n }`,\n { workflowId },\n );\n return data.workflowRuntime.webhookEndpoint;\n}\n\nexport async function testTrigger(workflowId: string): Promise<unknown> {\n const data = await gql<{ workflowRuntime: { testTrigger: unknown } }>(\n `mutation TestTrigger($workflowId: String!) {\n workflowRuntime { testTrigger(workflowId: $workflowId) }\n }`,\n { workflowId },\n );\n return data.workflowRuntime.testTrigger;\n}\n\nexport interface RunStepRecord {\n stepId: string;\n stepKey: string;\n blockType: string;\n status: string;\n input: unknown;\n output: unknown;\n port: string | null;\n error: string | null;\n // Null for skipped and replayed steps, and for runs journaled before timings.\n startedAt: string | null;\n endedAt: string | null;\n}\n\nexport interface RunRecord {\n id: string;\n workflowId: string;\n workflowName: string;\n workflowVersion: number;\n triggerKind: string;\n triggerPayload: unknown;\n status: string;\n error: string | null;\n startedAt: string;\n endedAt: string | null;\n rerunOf: string | null;\n steps: RunStepRecord[];\n}\n\nconst RUN_FIELDS = `id workflowId workflowName workflowVersion triggerKind\n triggerPayload status error startedAt endedAt rerunOf\n steps { stepId stepKey blockType status input output port error startedAt endedAt }`;\n\nexport interface RunsScope {\n workflowId?: string;\n // Scopes runs to the workflows the drive holds; ignored alongside workflowId.\n driveId?: string;\n limit?: number;\n}\n\nexport async function fetchRuns(scope: RunsScope = {}): Promise<RunRecord[]> {\n const data = await gql<{ workflowRuntime: { runs: RunRecord[] } }>(\n `query Runs($workflowId: String, $driveId: String, $limit: Int) {\n workflowRuntime { runs(workflowId: $workflowId, driveId: $driveId, limit: $limit) { ${RUN_FIELDS} } }\n }`,\n {\n workflowId: scope.workflowId ?? null,\n driveId: scope.driveId ?? null,\n limit: scope.limit ?? 30,\n },\n );\n return data.workflowRuntime.runs;\n}\n\nexport interface FireResult {\n runId: string | null;\n status: string;\n error: string | null;\n}\n\nexport async function fireWorkflow(\n workflowId: string,\n payload?: unknown,\n): Promise<FireResult> {\n const data = await gql<{ workflowRuntime: { fire: FireResult } }>(\n `mutation Fire($workflowId: String!, $payload: Unknown) {\n workflowRuntime { fire(workflowId: $workflowId, payload: $payload) { runId status error } }\n }`,\n { workflowId, payload: payload ?? {} },\n );\n return data.workflowRuntime.fire;\n}\n\n// Resume a FAILED run: succeeded steps replay, execution restarts at the\n// failure. Returns the new run.\nexport async function rerunRun(runId: string): Promise<FireResult> {\n const data = await gql<{ workflowRuntime: { rerun: FireResult } }>(\n `mutation Rerun($runId: String!) {\n workflowRuntime { rerun(runId: $runId) { runId status error } }\n }`,\n { runId },\n );\n return data.workflowRuntime.rerun;\n}\n\ninterface BlockOptionsResult {\n workflowRuntime: { blockOptions: unknown };\n}\n\nexport async function loadBlockOptions(\n blockType: string,\n propName: string,\n input: Record<string, unknown>,\n connectionId?: string,\n): Promise<unknown> {\n const data = await gql<BlockOptionsResult>(\n `query Options($blockType: String!, $propName: String!, $input: Unknown, $connectionId: String) {\n workflowRuntime { blockOptions(blockType: $blockType, propName: $propName, input: $input, connectionId: $connectionId) }\n }`,\n { blockType, propName, input, connectionId: connectionId ?? null },\n );\n return data.workflowRuntime.blockOptions;\n}\n"],"mappings":";;AAUA,MAAa,gBAAgB;AAI7B,MAAM,qCAAqB,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAgB,oBAAoB,WAA4B;CAC9D,OACE,UAAU,WAAW,+BAAmB,KACxC,UAAU,WAAW,+BAAmB;AAE5C;AAEA,SAAgB,kBAAkB,OAAyC;CACzE,MAAM,gBAAgB,MAAM,MAAM,SAAS,KAAK,SAAS,SAAS;CAClE,OAAO,MAAM,SAAS,SAA0B;EAC9C,IAAI,KAAK,SAAS,WAChB,OAAO,CAAC;GAAE,GAAG;GAAM,MAAM;GAAc,oBAAoB;EAAK,CAAC;EAInE,IAAI,KAAK,SAAS,gBAAgB,eAAe,OAAO,CAAC;EACzD,IAAI,mBAAmB,IAAI,KAAK,IAAI,GAClC,OAAO,CAAC;GAAE,GAAG;GAAM,MAAM;GAAmB,oBAAoB;EAAK,CAAC;EAExE,OAAO,CAAC,IAAI;CACd,CAAC;AACH;;;ACqEA,MAAa,qBAAoC;CAC/C,MAAM;CACN,aAAa;CACb,MAAM;CACN,UAAU;CACV,aACE;AACJ;AAEA,MAAM,QACJ,MACA,aACA,WAAW,OACX,iBACmB;CACnB;CACA;CACA,MAAM;CACN;CACA;AACF;AAIA,MAAM,aACJ,MACA,aACA,WAAW,OACX,iBACmB;CACnB;CACA;CACA,MAAM;CACN;CACA;AACF;AAEA,MAAM,UACJ,MACA,aACA,WAAW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AC/B;KAAE,OAAO;KAAO,OAAO;IAAM;IAC7B;KAAE,OAAO;KAAO,OAAO;IAAM;IAC7B;KAAE,OAAO;KAAO,OAAO;IAAM;IAC7B;KAAE,OAAO;KAAS,OAAO;IAAQ;IACjC;KAAE,OAAO;KAAU,OAAO;IAAS;GACrC,GACA,IACF;GAGA,SACE,UACA,gBACA;IACE;KAAE,OAAO;KAA+B,OAAO;IAAO;IACtD;KAAE,OAAO;KAA4B,OAAO;IAAQ;IACpD;KAAE,OAAO;KAAe,OAAO;IAAO;IACtC;KACE,OAAO;KACP,OAAO;IACT;IACA;KACE,OAAO;KACP,OAAO;IACT;GACF,GACA,IACF;GAGA,UACE,UACE,aACA,UACA,MACA,sFACF,GACA,UACA,cACF;GACA,SACE,UACE,KACE,UACA,UACA,OACA,4IACF,GACA,UACA,cACF,CACF;GACA,SACE,UACE,OACE,oBACA,2BACA,OACA,4FACF,GACA,UACA,CAAC,kBAAkB,CACrB,CACF;GAGA,SACE,UACE,SAAS,aAAa,QAAQ;IAC5B;KAAE,OAAO;KAAqB,OAAO;IAAS;IAC9C;KAAE,OAAO;KAAS,OAAO;IAAO;IAChC;KAAE,OAAO;KAAW,OAAO;IAAS;GACtC,CAAC,GACD,UACA,YACF,CACF;GACA,SACE,UACE,SAAS,YAAY,mBAAmB,CACtC;IAAE,OAAO;IAAyB,OAAO;GAAM,GAC/C;IAAE,OAAO;IAAU,OAAO;GAAS,CACrC,CAAC,GACD,UACA,YACF,CACF;GACA,SACE,UACE,KACE,UACA,mBACA,OACA,oJACF,GACA,UACA,CAAC,eAAe,CAClB,CACF;GACA,SACE,KACE,eACA,kBACA,OACA,iQACF,CACF;GACA,SACE,OACE,oBACA,2BACA,OACA,iDACF,CACF;GACA,SACE,KACE,kBACA,mBACA,OACA,wJACF,CACF;GACA,SACE,SACE,gBACA,YACA,CACE;IAAE,OAAO;IAA4B,OAAO;GAAQ,GACpD;IAAE,OAAO;IAA0B,OAAO;GAAO,CACnD,GACA,OACA,0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