@ixo/editor 7.2.0 → 7.3.0
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/{BidConfig-ZH625SNZ.js → BidConfig-YZWE5HMW.js} +2 -2
- package/dist/{BidFlowDetail-SZMKY75S.js → BidFlowDetail-GGCQSJGT.js} +4 -4
- package/dist/{CalendarEventCreateConfig-F7EYC4VL.js → CalendarEventCreateConfig-MG5KEVT5.js} +2 -2
- package/dist/{CalendarEventCreateFlowDetail-JMYDUZRK.js → CalendarEventCreateFlowDetail-NJIVXYZE.js} +2 -2
- package/dist/{CalendarEventListConfig-RRIV7IZG.js → CalendarEventListConfig-47DCJ4JN.js} +2 -2
- package/dist/{CalendarEventUpdateConfig-SARWZZG4.js → CalendarEventUpdateConfig-JBSY4IQI.js} +2 -2
- package/dist/{CalendarEventUpdateFlowDetail-KZ2FG76Z.js → CalendarEventUpdateFlowDetail-RW2PQCVL.js} +2 -2
- package/dist/{ClaimConfig-PMRVROQ7.js → ClaimConfig-ASGZFCTD.js} +2 -2
- package/dist/{ClaimFlowDetail-3364FIDU.js → ClaimFlowDetail-LVHNKNPE.js} +4 -4
- package/dist/{CollectionLifecycleFlowDetail-OD7OZH6W.js → CollectionLifecycleFlowDetail-RP6BNX4F.js} +4 -4
- package/dist/{CollectionUsersConfig-ETJM2G23.js → CollectionUsersConfig-FHB7GXYE.js} +2 -2
- package/dist/{CollectionUsersFlowDetail-AMPT7UEV.js → CollectionUsersFlowDetail-EZE5ADLN.js} +5 -5
- package/dist/{CredentialStoreConfig-ZQFLCBDT.js → CredentialStoreConfig-A7P27LZ5.js} +2 -2
- package/dist/{EmailSendConfig-O3XDS5IE.js → EmailSendConfig-ZH5BS4AE.js} +2 -2
- package/dist/{EvalEngineConfig-5ZBXA3Q6.js → EvalEngineConfig-BJOMRKZE.js} +2 -2
- package/dist/{EvalEngineFlowDetail-YL3FFONH.js → EvalEngineFlowDetail-UFIMDVZY.js} +10 -10
- package/dist/EvalEngineFlowDetail-UFIMDVZY.js.map +1 -0
- package/dist/{EvaluateBidConfig-ZU7QUFXL.js → EvaluateBidConfig-I6OIVCXE.js} +2 -2
- package/dist/{EvaluateBidFlowDetail-IATWBOE5.js → EvaluateBidFlowDetail-YWCXV4OS.js} +4 -4
- package/dist/{EvaluateClaimConfig-HEYNWGSN.js → EvaluateClaimConfig-Q6CV2ZU4.js} +2 -2
- package/dist/{EvaluateClaimFlowDetail-TOX53BGP.js → EvaluateClaimFlowDetail-J3C3M4F2.js} +7 -7
- package/dist/EvaluateClaimFlowDetail-J3C3M4F2.js.map +1 -0
- package/dist/{HarvestConfig-FXZYEZRA.js → HarvestConfig-L37MMZE5.js} +2 -2
- package/dist/{HttpRequestConfig-A3UIM3K2.js → HttpRequestConfig-C74HRIO5.js} +2 -2
- package/dist/{IdentityCreateFlowDetail-DXUI6S4I.js → IdentityCreateFlowDetail-CGE66IXY.js} +3 -3
- package/dist/{IidCreateFlowDetail-INISHT4R.js → IidCreateFlowDetail-J4PKJMSA.js} +3 -3
- package/dist/{KycVerifyConfig-KSECQD2D.js → KycVerifyConfig-YPTVDVAM.js} +2 -2
- package/dist/{KycVerifyFlowDetail-ZLDIZ4HC.js → KycVerifyFlowDetail-CFWXA3AT.js} +3 -3
- package/dist/{OracleConfig-KUPPRFL2.js → OracleConfig-J3NN2EP4.js} +2 -2
- package/dist/{OracleConfigureOracleFlowDetail-L7GRKOSV.js → OracleConfigureOracleFlowDetail-3ER4XIAB.js} +3 -3
- package/dist/{OracleStoreSecretsAndConfigFlowDetail-D2YXIJ57.js → OracleStoreSecretsAndConfigFlowDetail-7U6RI2A2.js} +3 -3
- package/dist/{OracleStoreSecretsFlowDetail-DHNXG3CZ.js → OracleStoreSecretsFlowDetail-6HEZJZ3R.js} +3 -3
- package/dist/{ProposalCreateConfig-W3XNV7SH.js → ProposalCreateConfig-ZQIK6PZB.js} +2 -2
- package/dist/{ProposalCreateFlowDetail-2ZNJZMSY.js → ProposalCreateFlowDetail-3JNI7S6E.js} +3 -3
- package/dist/{ProposalVoteConfig-DDEF76CL.js → ProposalVoteConfig-TZ3FGE4A.js} +2 -2
- package/dist/{RetireConfig-PQPUZHIW.js → RetireConfig-YKFKGNOR.js} +2 -2
- package/dist/{XeroContactCreateConfig-TKJKZAC4.js → XeroContactCreateConfig-N6YU7YEX.js} +2 -2
- package/dist/{XeroContactCreateFlowDetail-O3ZITUCC.js → XeroContactCreateFlowDetail-NO65PRXE.js} +2 -2
- package/dist/{XeroInvoiceCreateConfig-LAMB7Q3J.js → XeroInvoiceCreateConfig-VHJMWKY2.js} +2 -2
- package/dist/{XeroInvoiceCreateFlowDetail-KIYWUT2B.js → XeroInvoiceCreateFlowDetail-UJDEUWH6.js} +4 -4
- package/dist/XeroInvoiceCreateFlowDetail-UJDEUWH6.js.map +1 -0
- package/dist/{XeroInvoiceListConfig-PUUQP4UP.js → XeroInvoiceListConfig-CEECA5U7.js} +2 -2
- package/dist/{XeroPaymentCreateConfig-XNMSDVG3.js → XeroPaymentCreateConfig-KULFUA66.js} +2 -2
- package/dist/{XeroPaymentCreateFlowDetail-CB55SP6X.js → XeroPaymentCreateFlowDetail-BRRQJ67R.js} +3 -3
- package/dist/{chunk-LSWKBCB3.js → chunk-76VIZL5D.js} +2 -2
- package/dist/{chunk-JSE2MTU7.js → chunk-A5ZITS4O.js} +2 -2
- package/dist/{chunk-IUC6B2NF.js → chunk-AAPXJGX7.js} +3 -3
- package/dist/{chunk-DHT5EFV6.js → chunk-H4SFPUJT.js} +7 -5
- package/dist/chunk-H4SFPUJT.js.map +1 -0
- package/dist/{chunk-5VMI7KA5.js → chunk-MSPUTDZC.js} +59 -59
- package/dist/chunk-MSPUTDZC.js.map +1 -0
- package/dist/{chunk-YMGLWNV5.js → chunk-SZRWCNGA.js} +2 -2
- package/dist/{chunk-DMXZIAAW.js → chunk-UW3DNXM7.js} +2 -2
- package/dist/{chunk-DVZU2FI6.js → chunk-ZGMXAWTQ.js} +1 -1
- package/dist/chunk-ZGMXAWTQ.js.map +1 -0
- package/dist/core/index.cjs +4 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +20 -0
- package/dist/core/index.js +4 -4
- package/dist/index.js +7 -7
- package/dist/mantine/index.js +6 -6
- package/package.json +1 -1
- package/dist/EvalEngineFlowDetail-YL3FFONH.js.map +0 -1
- package/dist/EvaluateClaimFlowDetail-TOX53BGP.js.map +0 -1
- package/dist/XeroInvoiceCreateFlowDetail-KIYWUT2B.js.map +0 -1
- package/dist/chunk-5VMI7KA5.js.map +0 -1
- package/dist/chunk-DHT5EFV6.js.map +0 -1
- package/dist/chunk-DVZU2FI6.js.map +0 -1
- /package/dist/{BidConfig-ZH625SNZ.js.map → BidConfig-YZWE5HMW.js.map} +0 -0
- /package/dist/{BidFlowDetail-SZMKY75S.js.map → BidFlowDetail-GGCQSJGT.js.map} +0 -0
- /package/dist/{CalendarEventCreateConfig-F7EYC4VL.js.map → CalendarEventCreateConfig-MG5KEVT5.js.map} +0 -0
- /package/dist/{CalendarEventCreateFlowDetail-JMYDUZRK.js.map → CalendarEventCreateFlowDetail-NJIVXYZE.js.map} +0 -0
- /package/dist/{CalendarEventListConfig-RRIV7IZG.js.map → CalendarEventListConfig-47DCJ4JN.js.map} +0 -0
- /package/dist/{CalendarEventUpdateConfig-SARWZZG4.js.map → CalendarEventUpdateConfig-JBSY4IQI.js.map} +0 -0
- /package/dist/{CalendarEventUpdateFlowDetail-KZ2FG76Z.js.map → CalendarEventUpdateFlowDetail-RW2PQCVL.js.map} +0 -0
- /package/dist/{ClaimConfig-PMRVROQ7.js.map → ClaimConfig-ASGZFCTD.js.map} +0 -0
- /package/dist/{ClaimFlowDetail-3364FIDU.js.map → ClaimFlowDetail-LVHNKNPE.js.map} +0 -0
- /package/dist/{CollectionLifecycleFlowDetail-OD7OZH6W.js.map → CollectionLifecycleFlowDetail-RP6BNX4F.js.map} +0 -0
- /package/dist/{CollectionUsersConfig-ETJM2G23.js.map → CollectionUsersConfig-FHB7GXYE.js.map} +0 -0
- /package/dist/{CollectionUsersFlowDetail-AMPT7UEV.js.map → CollectionUsersFlowDetail-EZE5ADLN.js.map} +0 -0
- /package/dist/{CredentialStoreConfig-ZQFLCBDT.js.map → CredentialStoreConfig-A7P27LZ5.js.map} +0 -0
- /package/dist/{EmailSendConfig-O3XDS5IE.js.map → EmailSendConfig-ZH5BS4AE.js.map} +0 -0
- /package/dist/{EvalEngineConfig-5ZBXA3Q6.js.map → EvalEngineConfig-BJOMRKZE.js.map} +0 -0
- /package/dist/{EvaluateBidConfig-ZU7QUFXL.js.map → EvaluateBidConfig-I6OIVCXE.js.map} +0 -0
- /package/dist/{EvaluateBidFlowDetail-IATWBOE5.js.map → EvaluateBidFlowDetail-YWCXV4OS.js.map} +0 -0
- /package/dist/{EvaluateClaimConfig-HEYNWGSN.js.map → EvaluateClaimConfig-Q6CV2ZU4.js.map} +0 -0
- /package/dist/{HarvestConfig-FXZYEZRA.js.map → HarvestConfig-L37MMZE5.js.map} +0 -0
- /package/dist/{HttpRequestConfig-A3UIM3K2.js.map → HttpRequestConfig-C74HRIO5.js.map} +0 -0
- /package/dist/{IdentityCreateFlowDetail-DXUI6S4I.js.map → IdentityCreateFlowDetail-CGE66IXY.js.map} +0 -0
- /package/dist/{IidCreateFlowDetail-INISHT4R.js.map → IidCreateFlowDetail-J4PKJMSA.js.map} +0 -0
- /package/dist/{KycVerifyConfig-KSECQD2D.js.map → KycVerifyConfig-YPTVDVAM.js.map} +0 -0
- /package/dist/{KycVerifyFlowDetail-ZLDIZ4HC.js.map → KycVerifyFlowDetail-CFWXA3AT.js.map} +0 -0
- /package/dist/{OracleConfig-KUPPRFL2.js.map → OracleConfig-J3NN2EP4.js.map} +0 -0
- /package/dist/{OracleConfigureOracleFlowDetail-L7GRKOSV.js.map → OracleConfigureOracleFlowDetail-3ER4XIAB.js.map} +0 -0
- /package/dist/{OracleStoreSecretsAndConfigFlowDetail-D2YXIJ57.js.map → OracleStoreSecretsAndConfigFlowDetail-7U6RI2A2.js.map} +0 -0
- /package/dist/{OracleStoreSecretsFlowDetail-DHNXG3CZ.js.map → OracleStoreSecretsFlowDetail-6HEZJZ3R.js.map} +0 -0
- /package/dist/{ProposalCreateConfig-W3XNV7SH.js.map → ProposalCreateConfig-ZQIK6PZB.js.map} +0 -0
- /package/dist/{ProposalCreateFlowDetail-2ZNJZMSY.js.map → ProposalCreateFlowDetail-3JNI7S6E.js.map} +0 -0
- /package/dist/{ProposalVoteConfig-DDEF76CL.js.map → ProposalVoteConfig-TZ3FGE4A.js.map} +0 -0
- /package/dist/{RetireConfig-PQPUZHIW.js.map → RetireConfig-YKFKGNOR.js.map} +0 -0
- /package/dist/{XeroContactCreateConfig-TKJKZAC4.js.map → XeroContactCreateConfig-N6YU7YEX.js.map} +0 -0
- /package/dist/{XeroContactCreateFlowDetail-O3ZITUCC.js.map → XeroContactCreateFlowDetail-NO65PRXE.js.map} +0 -0
- /package/dist/{XeroInvoiceCreateConfig-LAMB7Q3J.js.map → XeroInvoiceCreateConfig-VHJMWKY2.js.map} +0 -0
- /package/dist/{XeroInvoiceListConfig-PUUQP4UP.js.map → XeroInvoiceListConfig-CEECA5U7.js.map} +0 -0
- /package/dist/{XeroPaymentCreateConfig-XNMSDVG3.js.map → XeroPaymentCreateConfig-KULFUA66.js.map} +0 -0
- /package/dist/{XeroPaymentCreateFlowDetail-CB55SP6X.js.map → XeroPaymentCreateFlowDetail-BRRQJ67R.js.map} +0 -0
- /package/dist/{chunk-LSWKBCB3.js.map → chunk-76VIZL5D.js.map} +0 -0
- /package/dist/{chunk-JSE2MTU7.js.map → chunk-A5ZITS4O.js.map} +0 -0
- /package/dist/{chunk-IUC6B2NF.js.map → chunk-AAPXJGX7.js.map} +0 -0
- /package/dist/{chunk-YMGLWNV5.js.map → chunk-SZRWCNGA.js.map} +0 -0
- /package/dist/{chunk-DMXZIAAW.js.map → chunk-UW3DNXM7.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/lib/flowCompiler/stepListMigration.ts","../src/core/lib/flowCompiler/draftRepository.ts","../src/core/lib/flowCompiler/participants.ts","../src/core/lib/flowCompiler/publication.ts","../src/core/lib/flowCompiler/draftProposal.ts"],"sourcesContent":["import type { Doc as YDoc } from 'yjs';\nimport * as Y from 'yjs';\nimport type { CompiledFlowNode } from '../../types/baseUcan';\nimport { getAction } from '../actionRegistry';\nimport { COMPILED_BLOCK_TYPE } from './blockMapping';\nimport { createYMapFromNode, ensureFlowExecutionMetadata, legacyPropsByBlockId } from './hydrate';\n\n/**\n * A step on the page with no entry in the step list.\n *\n * Flows authored before the step list existed (`qi.flow.nodes`) kept their\n * steps only as blocks in the BlockNote document. Adoption fills in the props\n * of steps already in the list, but it never adds one. Everything that decides\n * what a flow may do reads the list alone: the Portal builds the flow\n * manager's grant from it, and the flow manager finds a step there before it\n * sends any work for it. A step missing from the list can still be run by hand\n * from the page, so the work it produces is real — and then nothing will send\n * it, and no grant ever covers it.\n */\nexport interface UnlistedActionBlock {\n blockId: string;\n actionType: string;\n /** Whether the registry knows the action. An unknown one cannot be listed. */\n known: boolean;\n}\n\n/**\n * Action blocks on the page, in document order, with the props adoption reads\n * for them. Nested blocks count: a step can sit inside another block's group.\n */\nfunction actionBlocksInOrder(yDoc: YDoc): Array<{ blockId: string; props: Record<string, string> }> {\n const propsByBlockId = legacyPropsByBlockId(yDoc);\n const blocks: Array<{ blockId: string; props: Record<string, string> }> = [];\n const walk = (parent: Y.XmlFragment | Y.XmlElement): void => {\n for (let index = 0; index < parent.length; index += 1) {\n const child = parent.get(index);\n if (!(child instanceof Y.XmlElement)) continue;\n if (child.nodeName === 'blockContainer') {\n const content = child.get(0);\n const attrs = child.getAttribute('attrs') as unknown as { id?: unknown } | undefined;\n const directId = child.getAttribute('id');\n const blockId = typeof directId === 'string' && directId ? directId : typeof attrs?.id === 'string' ? attrs.id : '';\n if (blockId && content instanceof Y.XmlElement && content.nodeName === COMPILED_BLOCK_TYPE) {\n blocks.push({ blockId, props: propsByBlockId.get(blockId) ?? {} });\n }\n }\n walk(child);\n }\n };\n walk(yDoc.getXmlFragment('document'));\n return blocks;\n}\n\nfunction listedBlockIds(yDoc: YDoc): Set<string> {\n const listed = new Set<string>();\n yDoc.getMap('qi.flow.nodes').forEach((value, nodeId) => {\n listed.add(nodeId);\n const blockId = value instanceof Y.Map ? value.get('blockId') : undefined;\n if (typeof blockId === 'string' && blockId) listed.add(blockId);\n });\n yDoc.getMap<string>('qi.flow.blockIndex').forEach((blockId) => listed.add(blockId));\n return listed;\n}\n\n/**\n * Whether this document is one the step list governs: typed (draft schema 1),\n * or with no step list at all.\n *\n * An untyped document that lists some steps is adopted on open\n * (`adoptLegacyFlowDocument`), which types it, and this check picks it up on\n * the next pass. An empty list is a different case: adoption skips it because\n * it has no nodes to fill, so nothing else would ever list its steps. Flows\n * made from templates authored before the step list existed look like that.\n */\nfunction governedByStepList(yDoc: YDoc): boolean {\n return yDoc.getMap('qi.flow.meta').get('draftSchemaVersion') === 1 || yDoc.getMap('qi.flow.nodes').size === 0;\n}\n\n/** Action blocks on the page that the step list does not have, in page order. */\nexport function findUnlistedActionBlocks(yDoc: YDoc): UnlistedActionBlock[] {\n if (!governedByStepList(yDoc)) return [];\n const listed = listedBlockIds(yDoc);\n return actionBlocksInOrder(yDoc)\n .filter((block) => !listed.has(block.blockId))\n .map((block) => {\n const actionType = block.props.actionType ?? '';\n return { blockId: block.blockId, actionType, known: Boolean(actionType && getAction(actionType)) };\n });\n}\n\nfunction flowSegment(yDoc: YDoc): string {\n const docId = yDoc.getMap('root').get('doc_id');\n if (typeof docId === 'string' && docId) return `ixo:flow:${docId}`;\n const flowId = yDoc.getMap('qi.flow.meta').get('flowId');\n return typeof flowId === 'string' && flowId ? `ixo:flow:${flowId}` : 'ixo:flow';\n}\n\n/**\n * Add a step-list entry for every action block that has none.\n *\n * Additive only: the page is not touched, listed steps are not changed, and a\n * block whose action the registry does not know is left out rather than given\n * an entry nothing can run. Each new step takes its block's id as its own, so\n * the resource it is addressed by — `ixo:flow:<doc_id>:<block id>` — is the one\n * the page already ran it under, and work that names the block finds it.\n *\n * Runs in one transaction. Called inside a caller's transaction it joins that\n * one, which is how the Portal writes the new steps and the grant that covers\n * them as a single change. Returns the ids it added; an empty list means the\n * document was already complete.\n */\nexport function addUnlistedSteps(yDoc: YDoc): string[] {\n const unlisted = findUnlistedActionBlocks(yDoc).filter((block) => block.known);\n if (unlisted.length === 0) return [];\n const blocks = actionBlocksInOrder(yDoc);\n const propsByBlockId = new Map(blocks.map((block) => [block.blockId, block.props]));\n const flowPrefix = flowSegment(yDoc);\n const added: string[] = [];\n\n yDoc.transact(() => {\n const nodes = yDoc.getMap('qi.flow.nodes');\n const blockIndex = yDoc.getMap<string>('qi.flow.blockIndex');\n for (const { blockId, actionType } of unlisted) {\n const action = getAction(actionType);\n if (!action) continue;\n const props = propsByBlockId.get(blockId) ?? {};\n const resource = `${flowPrefix}:${blockId}`;\n const node: CompiledFlowNode = {\n id: blockId,\n blockId,\n can: action.can ?? '',\n with: resource,\n registryType: action.type,\n title: props.title || action.can || action.type,\n description: props.description ?? '',\n props: { ...props, with: resource },\n };\n nodes.set(blockId, createYMapFromNode(node));\n blockIndex.set(blockId, blockId);\n added.push(blockId);\n }\n\n // A flow with an explicit order runs in it, so a new step goes after the\n // step that precedes it on the page. An empty order is left empty: such a\n // flow runs in page order already.\n const order = yDoc.getArray<string>('qi.flow.order');\n if (order.length > 0) {\n const nodeIdByBlock = new Map<string, string>();\n nodes.forEach((value, nodeId) => {\n const blockId = value instanceof Y.Map ? value.get('blockId') : undefined;\n nodeIdByBlock.set(typeof blockId === 'string' && blockId ? blockId : nodeId, nodeId);\n });\n for (const blockId of added) {\n const position = blocks.findIndex((block) => block.blockId === blockId);\n let insertAt = 0;\n for (let previous = position - 1; previous >= 0; previous -= 1) {\n const previousNode = nodeIdByBlock.get(blocks[previous].blockId);\n const index = previousNode ? order.toArray().indexOf(previousNode) : -1;\n if (index >= 0) {\n insertAt = index + 1;\n break;\n }\n }\n order.insert(insertAt, [blockId]);\n }\n }\n\n // The definition changed, so its digest must be recomputed. Clearing it is\n // what makes the stamp below write a fresh one; on its own the stamp sees\n // contracts that already match and leaves the stale digest in place. A flow\n // that had no list was never typed, and the stamp skips untyped documents.\n const meta = yDoc.getMap('qi.flow.meta');\n if (meta.get('draftSchemaVersion') !== 1) meta.set('draftSchemaVersion', 1);\n meta.delete('definitionDigest');\n ensureFlowExecutionMetadata(yDoc);\n }, 'step-list-migration');\n\n return added;\n}\n","import * as Y from 'yjs';\nimport type { Doc as YDoc } from 'yjs';\nimport { canonicalizeJson, type CanonicalJsonValue } from '../flowEngine/vnext/canonical';\nimport {\n addFlowNode,\n auditFlowProjections,\n readFlowDocument,\n removeFlowNode,\n reorderFlowNodes,\n repairFlowProjections,\n setBlockProps,\n type FlowDocumentRead,\n type FlowProjectionDrift,\n} from './authoring';\n\nexport type FlowDraftCommandOperation =\n | {\n kind: 'add-step';\n nodeId: string;\n blockId: string;\n actionType: string;\n afterNodeId?: string;\n title?: string;\n props?: Record<string, string>;\n }\n | { kind: 'update-step-props'; blockId: string; props: Record<string, string> }\n | { kind: 'remove-step'; nodeId: string }\n | { kind: 'reorder-steps'; order: string[] }\n | { kind: 'set-meta'; values: Record<string, string | number | boolean | null> };\n\nexport interface FlowDraftCommand {\n kind: 'qi.flow.draft-command';\n schemaVersion: '1.0';\n commandId: string;\n expectedRevision: number;\n actorDid: string;\n operation: FlowDraftCommandOperation;\n}\n\nexport interface FlowDraftCommandResult {\n outcome: 'applied' | 'duplicate';\n commandId: string;\n revision: number;\n nodeId?: string;\n blockId?: string;\n}\n\nexport interface FlowDraftSnapshot {\n revision: number;\n document: FlowDocumentRead | null;\n}\n\nexport interface FlowDefinitionDraftRepository {\n read(): FlowDraftSnapshot;\n apply(command: FlowDraftCommand): FlowDraftCommandResult;\n applyBatch(commands: readonly FlowDraftCommand[]): FlowDraftCommandResult[];\n auditProjections(): FlowProjectionDrift[];\n repairProjections(): FlowProjectionDrift[];\n}\n\ninterface StoredDraftCommand {\n fingerprint: string;\n result: FlowDraftCommandResult;\n}\n\nexport class FlowDraftCommandError extends Error {\n constructor(\n readonly code: 'REVISION_CONFLICT' | 'IDEMPOTENCY_CONFLICT' | 'INVALID_COMMAND' | 'REFERENCED_STEP',\n message: string,\n readonly details?: Record<string, unknown>\n ) {\n super(message);\n this.name = 'FlowDraftCommandError';\n }\n}\n\nconst COMMANDS_MAP = 'qi.flow.draftCommands';\nconst DRAFT_CONTROL_MAP = 'qi.flow.draftControl';\nconst LEGACY_COMMAND_REVISION_KEY = 'legacyCommandRevision';\nconst RESERVED_META_KEYS = new Set(['draftRevision', 'draftSchemaVersion', 'draftUpdatedAt']);\n\nfunction currentRevision(yDoc: YDoc): number {\n const meta = yDoc.getMap('qi.flow.meta');\n if (meta.get('draftSchemaVersion') === 1) return Number(meta.get('draftRevision') ?? 0);\n return Number(yDoc.getMap(DRAFT_CONTROL_MAP).get(LEGACY_COMMAND_REVISION_KEY) ?? 0);\n}\n\nfunction fingerprint(command: FlowDraftCommand): string {\n return canonicalizeJson(command as unknown as CanonicalJsonValue);\n}\n\nfunction advanceCommandRevision(yDoc: YDoc): number {\n const meta = yDoc.getMap('qi.flow.meta');\n const next = currentRevision(yDoc) + 1;\n if (meta.get('draftSchemaVersion') !== 1) {\n yDoc.getMap(DRAFT_CONTROL_MAP).set(LEGACY_COMMAND_REVISION_KEY, next);\n return next;\n }\n meta.set('draftRevision', next);\n meta.set('draftUpdatedAt', new Date().toISOString());\n return next;\n}\n\nfunction setMeta(yDoc: YDoc, values: Record<string, string | number | boolean | null>): void {\n const meta = yDoc.getMap('qi.flow.meta');\n for (const [key, value] of Object.entries(values)) {\n if (value === null) meta.delete(key);\n else meta.set(key, value);\n }\n advanceCommandRevision(yDoc);\n}\n\n/** One idempotent mutation waist for Portal, Oracles, and headless authoring. */\nexport function createYjsFlowDefinitionDraftRepository(yDoc: YDoc): FlowDefinitionDraftRepository {\n const repository: FlowDefinitionDraftRepository = {\n read: () => ({ revision: currentRevision(yDoc), document: readFlowDocument(yDoc) }),\n apply: (command) => {\n if (command.kind !== 'qi.flow.draft-command' || command.schemaVersion !== '1.0' || !command.commandId || !command.actorDid) {\n throw new FlowDraftCommandError('INVALID_COMMAND', 'A versioned command id and actor are required');\n }\n if (command.operation.kind === 'set-meta') {\n const reservedKeys = Object.keys(command.operation.values).filter((key) => RESERVED_META_KEYS.has(key));\n if (reservedKeys.length > 0) {\n throw new FlowDraftCommandError('INVALID_COMMAND', `Flow metadata keys are reserved for draft bookkeeping: ${reservedKeys.sort().join(', ')}`, {\n reservedKeys: reservedKeys.sort(),\n });\n }\n }\n const commands = yDoc.getMap<StoredDraftCommand>(COMMANDS_MAP);\n const commandFingerprint = fingerprint(command);\n const existing = commands.get(command.commandId);\n if (existing) {\n if (existing.fingerprint !== commandFingerprint) {\n throw new FlowDraftCommandError('IDEMPOTENCY_CONFLICT', `Draft command ${command.commandId} was reused with different content`);\n }\n return { ...existing.result, outcome: 'duplicate' };\n }\n\n const beforeRevision = currentRevision(yDoc);\n if (command.expectedRevision !== beforeRevision) {\n throw new FlowDraftCommandError('REVISION_CONFLICT', `Expected draft revision ${command.expectedRevision}, found ${beforeRevision}`);\n }\n\n let nodeId: string | undefined;\n let blockId: string | undefined;\n yDoc.transact(() => {\n const operation = command.operation;\n if (operation.kind === 'add-step') {\n const added = addFlowNode(yDoc, {\n type: operation.actionType,\n nodeId: operation.nodeId,\n blockId: operation.blockId,\n afterNodeId: operation.afterNodeId,\n title: operation.title,\n props: operation.props,\n });\n if (!added) throw new FlowDraftCommandError('INVALID_COMMAND', 'Action type or requested Flow step identity is unavailable');\n nodeId = added.nodeId;\n blockId = added.blockId;\n } else if (operation.kind === 'update-step-props') {\n if (!setBlockProps(yDoc, operation.blockId, operation.props)) {\n throw new FlowDraftCommandError('INVALID_COMMAND', `Unknown Flow block: ${operation.blockId}`);\n }\n blockId = operation.blockId;\n } else if (operation.kind === 'remove-step') {\n const removed = removeFlowNode(yDoc, operation.nodeId);\n if (!removed.ok) {\n throw new FlowDraftCommandError('REFERENCED_STEP', `Flow step ${operation.nodeId} is still referenced`, { referencedBy: removed.referencedBy });\n }\n nodeId = operation.nodeId;\n } else if (operation.kind === 'reorder-steps') {\n if (!reorderFlowNodes(yDoc, operation.order)) throw new FlowDraftCommandError('INVALID_COMMAND', 'Step order must be a complete permutation');\n } else {\n setMeta(yDoc, operation.values);\n }\n\n const afterOperationRevision = currentRevision(yDoc);\n if (afterOperationRevision === beforeRevision) advanceCommandRevision(yDoc);\n const result: FlowDraftCommandResult = {\n outcome: 'applied',\n commandId: command.commandId,\n revision: currentRevision(yDoc),\n ...(nodeId ? { nodeId } : {}),\n ...(blockId ? { blockId } : {}),\n };\n commands.set(command.commandId, { fingerprint: commandFingerprint, result });\n });\n\n const stored = commands.get(command.commandId);\n if (!stored) throw new FlowDraftCommandError('INVALID_COMMAND', 'Draft command did not commit');\n return { ...stored.result };\n },\n applyBatch: (commands) => {\n if (commands.length === 0) return [];\n const beforeVector = Y.encodeStateVector(yDoc);\n const stagedDoc = new Y.Doc();\n try {\n Y.applyUpdate(stagedDoc, Y.encodeStateAsUpdate(yDoc));\n const stagedRepository = createYjsFlowDefinitionDraftRepository(stagedDoc);\n const results = commands.map((command) => stagedRepository.apply(command));\n const update = Y.encodeStateAsUpdate(stagedDoc, beforeVector);\n yDoc.transact(() => Y.applyUpdate(yDoc, update), 'flow-draft-command-batch');\n return results;\n } finally {\n stagedDoc.destroy();\n }\n },\n auditProjections: () => auditFlowProjections(yDoc),\n repairProjections: () => repairFlowProjections(yDoc),\n };\n return repository;\n}\n","import * as Y from 'yjs';\nimport type { Doc as YDoc, Map as YMap } from 'yjs';\nimport { isYMapLike } from '../yjsTypes';\n\n/**\n * Top-level Y.Doc map holding the flow's **human** participant roster, keyed by\n * Matrix user id. Deliberately not called \"agents\": everything under\n * `lib/flowAgent/*` means an AI/oracle actor, and the two must not be conflated.\n *\n * This is template *configuration*, not execution state — the roster records who\n * a flow is meant to be run with, at what Matrix power level, and which of the\n * flow's connections (`connections.ts`) each of them needs access to, so that\n * instantiating a template into a room can invite exactly those users and ask\n * for exactly the right grants. It is therefore NOT cleared by\n * `clearRuntimeForTemplateClone` (`flowEngine/runtime.ts`), which only clears\n * observation/execution maps; a clone must carry the roster forward or the\n * instantiated room comes up empty.\n */\nexport const FLOW_PARTICIPANTS_MAP_KEY = 'qi.flow.participants';\n\nexport type FlowParticipant = {\n /** Matrix user id, e.g. `'@alice:matrix.example.org'`. */\n userId: string;\n /** Matrix power level; integer, `0` when unknown. */\n powerLevel: number;\n displayName?: string;\n /** `mxc://` url. */\n avatarUrl?: string;\n /**\n * Toolkit keys (`FlowConnection.toolkit`) this participant needs access to.\n * Absent when the participant needs none.\n */\n requires?: string[];\n /**\n * Block ids of the steps this participant may carry out. Absent when none\n * were chosen — being on the roster is not the same as being allowed to\n * execute: plenty of actors are only there to watch. A step id that no longer\n * exists in the document is ignored.\n */\n steps?: string[];\n /** Epoch ms. Supplied by the caller — this module never calls `Date.now()`. */\n addedAt?: number;\n};\n\n/**\n * Read the participant roster.\n *\n * Normalizes defensively rather than trusting the map: this is read against a\n * live, replicated doc, so an entry can be observed mid-sync, written by an older\n * client, or malformed outright. Anything that is not a `Y.Map` carrying a\n * non-empty `userId` is skipped, and a read never throws.\n *\n * Order is stable across peers — `addedAt` ascending with unstamped entries last,\n * tie-broken by `userId` — so a rendered roster does not reshuffle on every sync.\n */\nexport function readFlowParticipants(yDoc: YDoc): FlowParticipant[] {\n const participants: FlowParticipant[] = [];\n getParticipantsMap(yDoc).forEach((value) => {\n const participant = toParticipant(value);\n if (participant) participants.push(participant);\n });\n\n return participants.sort((a, b) => {\n const aAt = a.addedAt ?? Number.POSITIVE_INFINITY;\n const bAt = b.addedAt ?? Number.POSITIVE_INFINITY;\n if (aAt !== bAt) return aAt < bAt ? -1 : 1;\n return compareUserIds(a.userId, b.userId);\n });\n}\n\n/**\n * Add a participant, or merge into the existing entry for the same `userId`.\n *\n * `addedAt` is write-once: an existing stamp is preserved so a later edit\n * (a power-level bump, a display-name refresh) cannot reorder the roster.\n * Optional string fields are merged — omit one to leave it as it is, pass `''`\n * to clear it; `requires` follows the same rule with `[]` as the clearing value.\n */\nexport function upsertFlowParticipant(yDoc: YDoc, participant: FlowParticipant): void {\n const userId = participant.userId;\n if (typeof userId !== 'string' || userId.length === 0) return;\n\n yDoc.transact(() => {\n const entry = ensureEntry(getParticipantsMap(yDoc), userId);\n entry.set('userId', userId);\n entry.set('powerLevel', toPowerLevel(participant.powerLevel));\n mergeOptionalString(entry, 'displayName', participant.displayName);\n mergeOptionalString(entry, 'avatarUrl', participant.avatarUrl);\n mergeRequirements(entry, participant.requires);\n mergeSteps(entry, participant.steps);\n\n const addedAt = toTimestamp(entry.get('addedAt')) ?? toTimestamp(participant.addedAt);\n if (addedAt !== undefined) entry.set('addedAt', addedAt);\n });\n}\n\n/** Remove a participant. No-op when the roster has no entry for `userId`. */\nexport function removeFlowParticipant(yDoc: YDoc, userId: string): void {\n yDoc.transact(() => {\n const map = getParticipantsMap(yDoc);\n if (map.has(userId)) map.delete(userId);\n });\n}\n\n/**\n * Set an existing participant's power level. No-op when the participant is not on\n * the roster — a power level alone carries no identity, so creating an entry from\n * one would invent a participant nobody added.\n */\nexport function setFlowParticipantPowerLevel(yDoc: YDoc, userId: string, powerLevel: number): void {\n yDoc.transact(() => {\n const entry = getParticipantsMap(yDoc).get(userId);\n if (isYMapLike<unknown>(entry)) entry.set('powerLevel', toPowerLevel(powerLevel));\n });\n}\n\n/**\n * Replace the connections an existing participant needs access to. Pass `[]` to\n * clear them. No-op when the participant is not on the roster, for the same\n * reason as {@link setFlowParticipantPowerLevel}.\n */\nexport function setFlowParticipantRequirements(yDoc: YDoc, userId: string, requires: string[]): void {\n yDoc.transact(() => {\n const entry = getParticipantsMap(yDoc).get(userId);\n if (isYMapLike<unknown>(entry)) mergeRequirements(entry, requires ?? []);\n });\n}\n\n/**\n * Replace the steps an existing participant may carry out. Pass `[]` to take\n * every step away and leave them watching. No-op when the participant is not on\n * the roster, for the same reason as {@link setFlowParticipantPowerLevel}.\n */\nexport function setFlowParticipantSteps(yDoc: YDoc, userId: string, steps: string[]): void {\n yDoc.transact(() => {\n const entry = getParticipantsMap(yDoc).get(userId);\n if (isYMapLike<unknown>(entry)) mergeSteps(entry, steps ?? []);\n });\n}\n\n// ─── Internal helpers ──────────────────────────────────────────────────────────\n\nfunction getParticipantsMap(yDoc: YDoc): YMap<unknown> {\n return yDoc.getMap<unknown>(FLOW_PARTICIPANTS_MAP_KEY);\n}\n\n/** The entry for `userId`, replacing any malformed (non-`Y.Map`) value in place. */\nfunction ensureEntry(map: YMap<unknown>, userId: string): YMap<unknown> {\n const existing = map.get(userId);\n if (isYMapLike<unknown>(existing)) return existing;\n const created = new Y.Map<unknown>();\n map.set(userId, created);\n return created;\n}\n\nfunction toParticipant(value: unknown): FlowParticipant | undefined {\n if (!isYMapLike<unknown>(value)) return undefined;\n\n const userId = value.get('userId');\n if (typeof userId !== 'string' || userId.length === 0) return undefined;\n\n const participant: FlowParticipant = { userId, powerLevel: toPowerLevel(value.get('powerLevel')) };\n\n const displayName = toNonEmptyString(value.get('displayName'));\n if (displayName !== undefined) participant.displayName = displayName;\n\n const avatarUrl = toNonEmptyString(value.get('avatarUrl'));\n if (avatarUrl !== undefined) participant.avatarUrl = avatarUrl;\n\n const requires = toRequirements(value.get('requires'));\n if (requires.length > 0) participant.requires = requires;\n\n const steps = toRequirements(value.get('steps'));\n if (steps.length > 0) participant.steps = steps;\n\n const addedAt = toTimestamp(value.get('addedAt'));\n if (addedAt !== undefined) participant.addedAt = addedAt;\n\n return participant;\n}\n\n/** Absent, non-numeric, or NaN power levels read as `0` — Matrix's default. */\nfunction toPowerLevel(value: unknown): number {\n const numeric = typeof value === 'string' ? Number(value) : value;\n return typeof numeric === 'number' && Number.isFinite(numeric) ? Math.trunc(numeric) : 0;\n}\n\nfunction toTimestamp(value: unknown): number | undefined {\n const numeric = typeof value === 'string' ? Number(value) : value;\n return typeof numeric === 'number' && Number.isFinite(numeric) ? Math.trunc(numeric) : undefined;\n}\n\nfunction toNonEmptyString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\n/** Non-empty strings only, de-duplicated, in the order they were written. */\nfunction toRequirements(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n const requires: string[] = [];\n for (const entry of value) {\n if (typeof entry !== 'string' || entry.length === 0) continue;\n if (!requires.includes(entry)) requires.push(entry);\n }\n return requires;\n}\n\nfunction mergeOptionalString(entry: YMap<unknown>, key: string, value: string | undefined): void {\n if (value === undefined) return;\n if (value.length === 0) entry.delete(key);\n else entry.set(key, value);\n}\n\n/** Omit to leave the requirements as they are, pass `[]` to clear them. */\nfunction mergeRequirements(entry: YMap<unknown>, value: string[] | undefined): void {\n if (value === undefined) return;\n const requires = toRequirements(value);\n if (requires.length === 0) entry.delete('requires');\n else entry.set('requires', requires);\n}\n\n/** Omit to leave the steps as they are, pass `[]` to clear them. */\nfunction mergeSteps(entry: YMap<unknown>, value: string[] | undefined): void {\n if (value === undefined) return;\n const steps = toRequirements(value);\n if (steps.length === 0) entry.delete('steps');\n else entry.set('steps', steps);\n}\n\nfunction compareUserIds(a: string, b: string): number {\n if (a === b) return 0;\n return a < b ? -1 : 1;\n}\n","import type { Doc as YDoc } from 'yjs';\nimport { canonicalizeJson, deepFreezeJson, type CanonicalJsonValue } from '../flowEngine/vnext/canonical';\nimport {\n signFlowDefinitionRevision,\n type ActionContractRef,\n type DID,\n type FlowDefinitionRef,\n type FlowDefinitionRevisionRepository,\n type FlowDefinitionRevisionSigner,\n type FlowDefinitionRevisionV1,\n type FlowId,\n type FlowJsonObject,\n type FlowRevisionId,\n type FlowStepDefinitionV1,\n type FlowTriggerV1,\n type Sha256Digest,\n} from '../flowEngine/vnext/contracts';\nimport { readFlowDocument } from './authoring';\nimport { readFlowConnections, type FlowConnection } from './connections';\nimport { readFlowParticipants, type FlowParticipant } from './participants';\n\nexport interface PublishFlowDefinitionParams {\n yDoc: YDoc;\n flowId: FlowId;\n revision: FlowRevisionId;\n publishedAt: string;\n publishedBy: DID;\n signer: FlowDefinitionRevisionSigner;\n repository: FlowDefinitionRevisionRepository;\n actionManifestDigest: Sha256Digest;\n actionContracts: Readonly<Record<string, ActionContractRef>>;\n expectedParent?: FlowDefinitionRef;\n source?: { operation: 'republish-legacy' | 'instantiate-template' | 'fork'; ref: string };\n}\n\nexport interface PublishFlowDefinitionResult {\n outcome: 'published' | 'exists';\n ref: FlowDefinitionRef;\n revision: FlowDefinitionRevisionV1;\n}\n\nexport class FlowDefinitionPublicationError extends Error {\n constructor(\n readonly code: 'NOT_VNEXT_DRAFT' | 'EMPTY_FLOW' | 'MISSING_ACTION_CONTRACT' | 'INVALID_CONFIGURATION' | 'INVALID_TRIGGER' | 'PARENT_CONFLICT',\n message: string\n ) {\n super(message);\n this.name = 'FlowDefinitionPublicationError';\n }\n}\n\nfunction parseObject(value: string | undefined, field: string): FlowJsonObject {\n if (!value) return {};\n try {\n const parsed = JSON.parse(value) as unknown;\n if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) return parsed as FlowJsonObject;\n } catch (error) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', `Flow step ${field} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);\n }\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', `Flow step ${field} must be a JSON object`);\n}\n\nfunction parseConditions(value: string | undefined): FlowJsonObject[] {\n if (!value) return [];\n const parsed = parseObject(value, 'conditions');\n if (!Array.isArray(parsed.conditions)) throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', 'Flow step conditions must contain an array');\n if (parsed.conditions.some((condition) => !condition || typeof condition !== 'object' || Array.isArray(condition))) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', 'Every Flow step condition must be a JSON object');\n }\n return parsed.conditions as FlowJsonObject[];\n}\n\nfunction participantRequirement(participant: FlowParticipant): FlowJsonObject {\n return {\n userId: participant.userId,\n powerLevel: participant.powerLevel,\n ...(participant.displayName ? { displayName: participant.displayName } : {}),\n ...(participant.avatarUrl ? { avatarUrl: participant.avatarUrl } : {}),\n ...(participant.requires ? { requires: [...participant.requires] } : {}),\n ...(participant.addedAt !== undefined ? { addedAt: participant.addedAt } : {}),\n };\n}\n\nfunction connectionRequirement(connection: FlowConnection): FlowJsonObject {\n return {\n toolkit: connection.toolkit,\n ...(connection.label ? { label: connection.label } : {}),\n ...(connection.optional ? { optional: true } : {}),\n ...(connection.agent !== undefined ? { agent: connection.agent } : {}),\n requires: [...connection.requires],\n ...(connection.addedAt !== undefined ? { addedAt: connection.addedAt } : {}),\n };\n}\n\nfunction parseTrigger(value: string | undefined, triggerMode: string | undefined): FlowTriggerV1 {\n let trigger: Record<string, unknown> = {};\n if (value) {\n try {\n const parsed = JSON.parse(value) as unknown;\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'Flow trigger must be a JSON object');\n }\n trigger = parsed as Record<string, unknown>;\n } catch (error) {\n if (error instanceof FlowDefinitionPublicationError) throw error;\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'Flow trigger is not valid JSON');\n }\n }\n const type = String(trigger.type ?? triggerMode ?? 'manual');\n if (type === 'manual') return { kind: 'manual' };\n if (type === 'flow.start') return { kind: 'flow.start' };\n if (type === 'topic.request') {\n if (typeof trigger.requestKind !== 'string' || trigger.requestKind.trim().length === 0) {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'topic.request requires requestKind');\n }\n return { kind: 'topic.request', requestKind: trigger.requestKind };\n }\n if (type === 'block.event') {\n if (typeof trigger.sourceBlockId !== 'string' || typeof trigger.eventName !== 'string') {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'block.event requires sourceBlockId and eventName');\n }\n return { kind: 'step.event', sourceBlockId: trigger.sourceBlockId, eventName: trigger.eventName };\n }\n if (type === 'block.event.all') {\n if (!Array.isArray(trigger.sources)) throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'block.event.all requires sources');\n const sources = trigger.sources.map((source) => {\n if (!source || typeof source !== 'object') throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'Invalid block.event.all source');\n const candidate = source as Record<string, unknown>;\n if (typeof candidate.sourceBlockId !== 'string' || typeof candidate.eventName !== 'string' || typeof candidate.alias !== 'string') {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'Every block.event.all source requires sourceBlockId, eventName, and alias');\n }\n return {\n sourceBlockId: candidate.sourceBlockId,\n eventName: candidate.eventName,\n alias: candidate.alias,\n ...(candidate.optional === true ? { optional: true } : {}),\n };\n });\n return { kind: 'step.event.all', sources };\n }\n if (type === 'schedule') {\n if (typeof trigger.scheduleRef !== 'string' || trigger.scheduleRef.trim().length === 0) {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'schedule requires scheduleRef');\n }\n if (trigger.scheduleRevision !== undefined && (!Number.isInteger(trigger.scheduleRevision) || Number(trigger.scheduleRevision) < 1)) {\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', 'scheduleRevision must be an integer greater than zero');\n }\n return {\n kind: 'schedule',\n scheduleRef: trigger.scheduleRef,\n ...(typeof trigger.scheduleRevision === 'number' ? { scheduleRevision: trigger.scheduleRevision } : {}),\n };\n }\n throw new FlowDefinitionPublicationError('INVALID_TRIGGER', `Unsupported Flow trigger: ${type}`);\n}\n\nfunction actorFromProps(props: Record<string, string>): FlowJsonObject {\n const actor: FlowJsonObject = {};\n if (props.authorisedActors) {\n let actors: unknown;\n try {\n actors = JSON.parse(props.authorisedActors);\n } catch (error) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', `Flow step authorisedActors is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);\n }\n if (!Array.isArray(actors) || actors.some((actorDid) => typeof actorDid !== 'string')) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', 'Flow step authorisedActors must be an array of DID strings');\n }\n actor.authorisedActors = actors;\n }\n if (props.parentCapability) actor.parentCapability = props.parentCapability;\n return actor;\n}\n\nfunction ttlMsFromProps(props: Record<string, string>): number | undefined {\n const raw = props.ttlMs ?? props.ttl;\n if (!raw) return undefined;\n const numeric = Number(raw);\n if (!Number.isFinite(numeric) || numeric < 0) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', 'Flow step ttlMs must be a non-negative number');\n }\n return numeric;\n}\n\nfunction isPositiveDuration(value: string): boolean {\n const match = /^P(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?)?$/u.exec(value);\n return Boolean(match && match.slice(1).some((part) => Number(part ?? 0) > 0));\n}\n\nfunction ttlConstraintsFromProps(props: Record<string, string>): FlowStepDefinitionV1['ttl'] | undefined {\n const ttl: NonNullable<FlowStepDefinitionV1['ttl']> = {};\n if (props.ttlAbsoluteDueDate) {\n if (!Number.isFinite(Date.parse(props.ttlAbsoluteDueDate))) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', 'Flow step ttlAbsoluteDueDate must be a valid ISO 8601 date');\n }\n ttl.absoluteDueDate = props.ttlAbsoluteDueDate;\n }\n for (const [prop, field] of [\n ['ttlFromEnablement', 'fromEnablement'],\n ['ttlFromCommitment', 'fromCommitment'],\n ] as const) {\n const value = props[prop];\n if (!value) continue;\n if (!isPositiveDuration(value)) {\n throw new FlowDefinitionPublicationError('INVALID_CONFIGURATION', `Flow step ${prop} must be a positive ISO 8601 day/hour/minute duration`);\n }\n ttl[field] = value;\n }\n return Object.keys(ttl).length > 0 ? ttl : undefined;\n}\n\nfunction toStep(node: NonNullable<ReturnType<typeof readFlowDocument>>['nodes'][number], action: ActionContractRef): FlowStepDefinitionV1 {\n const ttlMs = ttlMsFromProps(node.props);\n const ttl = ttlConstraintsFromProps(node.props);\n return {\n stepId: node.nodeId,\n blockId: node.blockId,\n title: node.title,\n ...(node.description ? { description: node.description } : {}),\n action,\n resource: node.with,\n configuration: { ...node.props },\n inputs: parseObject(node.props.inputs, 'inputs'),\n trigger: parseTrigger(node.props.trigger, node.props.triggerMode),\n conditions: parseConditions(node.props.conditions),\n actor: actorFromProps(node.props),\n ...(ttlMs !== undefined ? { ttlMs } : {}),\n ...(ttl ? { ttl } : {}),\n };\n}\n\n/** Publish one immutable revision from the canonical typed draft. */\nexport async function publishFlowDefinitionRevision(params: PublishFlowDefinitionParams): Promise<PublishFlowDefinitionResult> {\n const expectedParent = params.expectedParent\n ? deepFreezeJson(JSON.parse(canonicalizeJson(params.expectedParent as unknown as CanonicalJsonValue)) as FlowDefinitionRef)\n : undefined;\n if (params.yDoc.getMap('qi.flow.meta').get('draftSchemaVersion') !== 1) {\n throw new FlowDefinitionPublicationError('NOT_VNEXT_DRAFT', 'Legacy Flow documents must be explicitly republished before vNext publication');\n }\n const document = readFlowDocument(params.yDoc);\n if (!document || document.nodes.length === 0) throw new FlowDefinitionPublicationError('EMPTY_FLOW', 'A Flow definition requires at least one step');\n\n const steps = document.nodes.map((node) => {\n const actionType = node.props.actionType;\n const action = actionType ? params.actionContracts[actionType] : undefined;\n if (!action) throw new FlowDefinitionPublicationError('MISSING_ACTION_CONTRACT', `No pinned Action contract for ${actionType || node.nodeId}`);\n if (action.type !== actionType || action.can !== node.can) {\n throw new FlowDefinitionPublicationError('MISSING_ACTION_CONTRACT', `Pinned Action contract does not match ${actionType} (${node.can})`);\n }\n if (action.manifestDigest !== params.actionManifestDigest) {\n throw new FlowDefinitionPublicationError('MISSING_ACTION_CONTRACT', `Action ${action.type} is not pinned to the publication manifest`);\n }\n return toStep(node, action);\n });\n\n const signed = await signFlowDefinitionRevision(\n {\n kind: 'qi.flow.definition-revision',\n schemaVersion: '1.0',\n ref: { flowId: params.flowId, revision: params.revision },\n ...(expectedParent ? { parent: expectedParent } : {}),\n publishedAt: params.publishedAt,\n publishedBy: params.publishedBy,\n actionManifestDigest: params.actionManifestDigest,\n title: document.meta.title,\n ...(document.meta.goal ? { goal: document.meta.goal } : {}),\n steps,\n participantRequirements: readFlowParticipants(params.yDoc).map(participantRequirement),\n connectionRequirements: readFlowConnections(params.yDoc).map(connectionRequirement),\n ...(params.source ? { source: params.source } : {}),\n },\n params.signer\n );\n const ref: FlowDefinitionRef = { ...signed.ref, digest: signed.integrity.digest.value };\n const outcome = await params.repository.publish(signed, expectedParent);\n if (outcome === 'parent_conflict') throw new FlowDefinitionPublicationError('PARENT_CONFLICT', 'Flow definition head changed before publication');\n return { outcome, ref, revision: signed };\n}\n","import { canonicalizeJson, deepFreezeJson, digestCanonicalJson, type CanonicalJsonValue } from '../flowEngine/vnext/canonical';\nimport type { Sha256Digest } from '../flowEngine/vnext/contracts';\nimport type { FlowDefinitionDraftRepository, FlowDraftCommandOperation, FlowDraftCommandResult } from './draftRepository';\n\nexport interface FlowDraftProposalPayloadV1 {\n kind: 'qi.flow.draft-proposal';\n schemaVersion: '1.0';\n proposalId: string;\n proposedBy: string;\n proposedAt: string;\n baseRevision: number;\n operations: readonly FlowDraftCommandOperation[];\n summary: string;\n}\n\nexport type FlowDraftProposalV1 = FlowDraftProposalPayloadV1 & { proposalDigest: Sha256Digest };\n\nexport interface FlowDraftProposalApprovalV1 {\n kind: 'qi.flow.draft-proposal-approval';\n schemaVersion: '1.0';\n proposalId: string;\n proposalDigest: Sha256Digest;\n approvedBy: string;\n approvedAt: string;\n approvalReference: string;\n}\n\nfunction canonicalSnapshot<T>(value: T): T {\n return deepFreezeJson(JSON.parse(canonicalizeJson(value as unknown as CanonicalJsonValue))) as T;\n}\n\nexport async function createFlowDraftProposal(payload: FlowDraftProposalPayloadV1): Promise<FlowDraftProposalV1> {\n const snapshot = canonicalSnapshot(payload);\n if (!snapshot.proposalId || !snapshot.proposedBy || snapshot.operations.length === 0) throw new Error('Flow draft proposal identity, proposer, and operations are required');\n return deepFreezeJson({ ...snapshot, proposalDigest: (await digestCanonicalJson(snapshot as unknown as CanonicalJsonValue)) as Sha256Digest });\n}\n\n/**\n * Apply a reviewed Oracle proposal only when an external approval binds the\n * exact proposal digest. The Oracle never receives direct Yjs access.\n */\nexport async function applyApprovedFlowDraftProposal(\n repository: FlowDefinitionDraftRepository,\n proposal: FlowDraftProposalV1,\n approval: FlowDraftProposalApprovalV1\n): Promise<FlowDraftCommandResult[]> {\n const proposalSnapshot = canonicalSnapshot(proposal);\n const approvalSnapshot = canonicalSnapshot(approval);\n const { proposalDigest, ...proposalPayload } = proposalSnapshot;\n const actualProposalDigest = (await digestCanonicalJson(proposalPayload as unknown as CanonicalJsonValue)) as Sha256Digest;\n if (\n approvalSnapshot.kind !== 'qi.flow.draft-proposal-approval' ||\n approvalSnapshot.schemaVersion !== '1.0' ||\n approvalSnapshot.proposalId !== proposalSnapshot.proposalId ||\n approvalSnapshot.proposalDigest !== proposalDigest ||\n actualProposalDigest !== proposalDigest ||\n !approvalSnapshot.approvedBy ||\n !approvalSnapshot.approvalReference\n ) {\n throw new Error('Flow draft proposal requires an approval for its exact digest');\n }\n const approvedRevision = repository.read().revision;\n if (approvedRevision !== proposalSnapshot.baseRevision) {\n throw new Error(`Flow draft proposal was approved for revision ${proposalSnapshot.baseRevision}, but the draft is now revision ${approvedRevision}`);\n }\n const commands = proposalSnapshot.operations.map(\n (operation, index) =>\n ({\n kind: 'qi.flow.draft-command',\n schemaVersion: '1.0',\n commandId: `${proposalSnapshot.proposalId}:${index}`,\n expectedRevision: proposalSnapshot.baseRevision + index,\n actorDid: approvalSnapshot.approvedBy,\n operation,\n }) as const\n );\n return repository.applyBatch(commands);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,YAAY,OAAO;AA6BnB,SAAS,oBAAoB,MAAuE;AAClG,QAAM,iBAAiB,qBAAqB,IAAI;AAChD,QAAM,SAAoE,CAAC;AAC3E,QAAM,OAAO,CAAC,WAA+C;AAC3D,aAAS,QAAQ,GA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A,MAC3B;AAAA,IACF;AAAA,EACJ;AACA,SAAO,WAAW,WAAW,QAAQ;AACvC;","names":["Y","Y"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useXeroOracleActivity
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SZRWCNGA.js";
|
|
4
4
|
import {
|
|
5
5
|
ActionDiffView,
|
|
6
6
|
SlideToSign,
|
|
7
7
|
useActionDiff
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UW3DNXM7.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseAlert,
|
|
11
11
|
BaseMultiSelect
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
setActiveEditor,
|
|
99
99
|
syncFlowNodePropsFromProjection,
|
|
100
100
|
writeFlowIdentity
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-AAPXJGX7.js";
|
|
102
102
|
import {
|
|
103
103
|
LATEST_VERSION,
|
|
104
104
|
buildActionRunInputs,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
startRun,
|
|
123
123
|
validateBlockConfig,
|
|
124
124
|
writeRunRecordAndReconcile
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-A5ZITS4O.js";
|
|
126
126
|
import {
|
|
127
127
|
EVAL_ENGINE_ACTION_TYPE,
|
|
128
128
|
GMAIL_SEND_SCHEMA,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
renderNumber,
|
|
147
147
|
retryPendingRunTimelineEvents,
|
|
148
148
|
serializeDelegatedToolInputs
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-ZGMXAWTQ.js";
|
|
150
150
|
import {
|
|
151
151
|
buildDomainCardLinkedResource,
|
|
152
152
|
buildGovernanceGroupLinkedEntities,
|
|
@@ -381,12 +381,12 @@ function useTrackBlockFocus(blockId, editor) {
|
|
|
381
381
|
// src/mantine/components/AuthorizationTab.tsx
|
|
382
382
|
import React2, { useMemo as useMemo3, useState as useState3, useEffect as useEffect4, useCallback as useCallback4 } from "react";
|
|
383
383
|
import { Stack as Stack2, Text as Text2, Badge as Badge2, Group as Group2, Paper as Paper2, Button as Button2, ActionIcon as ActionIcon2 } from "@mantine/core";
|
|
384
|
-
import { IconShieldPlus as IconShieldPlus2, IconShieldCheck, IconTrash, IconUser as IconUser2,
|
|
384
|
+
import { IconShieldPlus as IconShieldPlus2, IconShieldCheck, IconTrash, IconUser as IconUser2, IconInnerShadowBottomRight as IconInnerShadowBottomRight2, IconKey } from "@tabler/icons-react";
|
|
385
385
|
|
|
386
386
|
// src/mantine/components/GrantPermissionPanel.tsx
|
|
387
387
|
import React, { useState as useState2, useCallback as useCallback3 } from "react";
|
|
388
388
|
import { Stack, Text, TextInput, Button, Group, Radio, Checkbox, Alert, Paper, Loader, Badge, ActionIcon, Divider, NumberInput, Title } from "@mantine/core";
|
|
389
|
-
import { IconSearch, IconUser,
|
|
389
|
+
import { IconSearch, IconUser, IconInnerShadowBottomRight, IconX, IconShieldPlus, IconArrowLeft } from "@tabler/icons-react";
|
|
390
390
|
var MAX_GRANT_DAYS = 30;
|
|
391
391
|
var GrantPermissionPanel = ({
|
|
392
392
|
onBack,
|
|
@@ -541,7 +541,7 @@ var GrantPermissionPanel = ({
|
|
|
541
541
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
542
542
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
543
543
|
}
|
|
544
|
-
), selectedRecipient ? /* @__PURE__ */ React.createElement(Paper, { p: "sm", withBorder: true }, /* @__PURE__ */ React.createElement(Group, { justify: "space-between" }, /* @__PURE__ */ React.createElement(Group, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React.createElement(
|
|
544
|
+
), selectedRecipient ? /* @__PURE__ */ React.createElement(Paper, { p: "sm", withBorder: true }, /* @__PURE__ */ React.createElement(Group, { justify: "space-between" }, /* @__PURE__ */ React.createElement(Group, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React.createElement(IconInnerShadowBottomRight, { size: 16 }) : /* @__PURE__ */ React.createElement(IconUser, { size: 16 }), /* @__PURE__ */ React.createElement(Text, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React.createElement(Badge, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React.createElement(ActionIcon, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React.createElement(IconX, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React.createElement(Paper, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React.createElement(Stack, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React.createElement(Button, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React.createElement(TextInput, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(Stack, { gap: "xs" }, /* @__PURE__ */ React.createElement(Text, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock && !allowCustomCapabilities ? (
|
|
545
545
|
// Single block mode: show fixed block info
|
|
546
546
|
/* @__PURE__ */ React.createElement(Paper, { p: "sm", withBorder: true }, /* @__PURE__ */ React.createElement(Group, { gap: "xs" }, /* @__PURE__ */ React.createElement(Badge, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React.createElement(Text, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React.createElement(Text, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
547
547
|
) : (
|
|
@@ -829,7 +829,7 @@ var AuthorizationTab = ({ editor, block: initialBlock, flowUri = "", entityDid:
|
|
|
829
829
|
const audience = cap.audienceDid ?? cap.audience ?? "";
|
|
830
830
|
const issuer = normalizeActorDid(cap.issuerDid ?? cap.issuer);
|
|
831
831
|
const canRevoke = !!issuer && issuer === currentUserDid;
|
|
832
|
-
return /* @__PURE__ */ React2.createElement(Paper2, { key: cid, p: "xs", withBorder: true }, /* @__PURE__ */ React2.createElement(Group2, { justify: "space-between" }, /* @__PURE__ */ React2.createElement(Group2, { gap: "xs" }, /* @__PURE__ */ React2.createElement(IconShieldCheck, { size: 16, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React2.createElement(Stack2, { gap: 2 }, /* @__PURE__ */ React2.createElement(Group2, { gap: "xs" }, audience.includes(":oracle:") ? /* @__PURE__ */ React2.createElement(
|
|
832
|
+
return /* @__PURE__ */ React2.createElement(Paper2, { key: cid, p: "xs", withBorder: true }, /* @__PURE__ */ React2.createElement(Group2, { justify: "space-between" }, /* @__PURE__ */ React2.createElement(Group2, { gap: "xs" }, /* @__PURE__ */ React2.createElement(IconShieldCheck, { size: 16, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React2.createElement(Stack2, { gap: 2 }, /* @__PURE__ */ React2.createElement(Group2, { gap: "xs" }, audience.includes(":oracle:") ? /* @__PURE__ */ React2.createElement(IconInnerShadowBottomRight2, { size: 14 }) : /* @__PURE__ */ React2.createElement(IconUser2, { size: 14 }), /* @__PURE__ */ React2.createElement(Text2, { size: "sm", fw: 500 }, audience.slice(-16) || "(unknown audience)")), /* @__PURE__ */ React2.createElement(Group2, { gap: "xs" }, /* @__PURE__ */ React2.createElement(Text2, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(cap.expiration)), /* @__PURE__ */ React2.createElement(Badge2, { size: "xs", variant: "light" }, Array.isArray(cap.capabilities) ? cap.capabilities.map((c) => c.can).join(", ") : "")))), canRevoke && /* @__PURE__ */ React2.createElement(ActionIcon2, { size: "sm", variant: "subtle", color: "red", onClick: () => handleRevokeCapability(cid) }, /* @__PURE__ */ React2.createElement(IconTrash, { size: 14 }))));
|
|
833
833
|
}))));
|
|
834
834
|
};
|
|
835
835
|
|
|
@@ -6597,7 +6597,7 @@ import {
|
|
|
6597
6597
|
Select,
|
|
6598
6598
|
useComputedColorScheme
|
|
6599
6599
|
} from "@mantine/core";
|
|
6600
|
-
import { IconAlertCircle as IconAlertCircle6, IconArrowRight as IconArrowRight2, IconRefresh, IconArrowLeft as IconArrowLeft3, IconFileText as IconFileText4,
|
|
6600
|
+
import { IconAlertCircle as IconAlertCircle6, IconArrowRight as IconArrowRight2, IconRefresh, IconArrowLeft as IconArrowLeft3, IconFileText as IconFileText4, IconInnerShadowBottomRight as IconInnerShadowBottomRight3, IconChecklist as IconChecklist3 } from "@tabler/icons-react";
|
|
6601
6601
|
import { Survey as Survey5, SurveyModel as SurveyModel5 } from "@ixo/surveys";
|
|
6602
6602
|
|
|
6603
6603
|
// src/mantine/blocks/evaluator/flow/RubricEvaluationResults.tsx
|
|
@@ -7293,7 +7293,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
7293
7293
|
Tabs.Tab,
|
|
7294
7294
|
{
|
|
7295
7295
|
value: "evaluation",
|
|
7296
|
-
leftSection: /* @__PURE__ */ React66.createElement(
|
|
7296
|
+
leftSection: /* @__PURE__ */ React66.createElement(IconInnerShadowBottomRight3, { size: 16 }),
|
|
7297
7297
|
rightSection: evaluationLoading ? /* @__PURE__ */ React66.createElement(Loader11, { size: 12 }) : evaluationResult?.trace?.result?.outcome ? /* @__PURE__ */ React66.createElement(Badge8, { size: "xs", color: evaluationResult.trace.result.outcome === "pass" ? "green" : evaluationResult.trace.result.outcome === "fail" ? "red" : "orange" }, evaluationResult.trace.result.outcome) : null
|
|
7298
7298
|
},
|
|
7299
7299
|
"AI Evaluation"
|
|
@@ -20216,7 +20216,7 @@ registerActionTypeUI("qi/governance.custom-message", {
|
|
|
20216
20216
|
|
|
20217
20217
|
// src/mantine/blocks/action/actionTypes/httpRequest/index.ts
|
|
20218
20218
|
import { IconWorld as IconWorld2 } from "@tabler/icons-react";
|
|
20219
|
-
var HttpRequestConfig = lazyActionComponent(() => import("./HttpRequestConfig-
|
|
20219
|
+
var HttpRequestConfig = lazyActionComponent(() => import("./HttpRequestConfig-C74HRIO5.js").then((module) => ({ default: module.HttpRequestConfig })));
|
|
20220
20220
|
var HttpRequestFlowDetail = lazyActionComponent(() => import("./HttpRequestFlowDetail-VWD64O3P.js").then((module) => ({ default: module.HttpRequestFlowDetail })));
|
|
20221
20221
|
registerActionTypeUI("qi/http.request", {
|
|
20222
20222
|
label: "HTTP Request",
|
|
@@ -20228,7 +20228,7 @@ registerActionTypeUI("qi/http.request", {
|
|
|
20228
20228
|
|
|
20229
20229
|
// src/mantine/blocks/action/actionTypes/emailSend/index.ts
|
|
20230
20230
|
import { IconMail as IconMail6 } from "@tabler/icons-react";
|
|
20231
|
-
var EmailSendConfig = lazyActionComponent(() => import("./EmailSendConfig-
|
|
20231
|
+
var EmailSendConfig = lazyActionComponent(() => import("./EmailSendConfig-ZH5BS4AE.js").then((module) => ({ default: module.EmailSendConfig })));
|
|
20232
20232
|
registerActionTypeUI("qi/email.send", {
|
|
20233
20233
|
label: "Email",
|
|
20234
20234
|
description: "Send an email to a user",
|
|
@@ -20238,8 +20238,8 @@ registerActionTypeUI("qi/email.send", {
|
|
|
20238
20238
|
|
|
20239
20239
|
// src/mantine/blocks/action/actionTypes/bid/index.ts
|
|
20240
20240
|
import { IconBriefcase as IconBriefcase2 } from "@tabler/icons-react";
|
|
20241
|
-
var BidConfig = lazyActionComponent(() => import("./BidConfig-
|
|
20242
|
-
var BidFlowDetail = lazyActionComponent(() => import("./BidFlowDetail-
|
|
20241
|
+
var BidConfig = lazyActionComponent(() => import("./BidConfig-YZWE5HMW.js").then((module) => ({ default: module.BidConfig })));
|
|
20242
|
+
var BidFlowDetail = lazyActionComponent(() => import("./BidFlowDetail-GGCQSJGT.js").then((module) => ({ default: module.BidFlowDetail })));
|
|
20243
20243
|
registerActionTypeUI("qi/bid.submit", {
|
|
20244
20244
|
label: "Bid",
|
|
20245
20245
|
description: "Submit a bid application",
|
|
@@ -20251,8 +20251,8 @@ registerActionTypeUI("qi/bid.submit", {
|
|
|
20251
20251
|
|
|
20252
20252
|
// src/mantine/blocks/action/actionTypes/evaluateBid/index.ts
|
|
20253
20253
|
import { IconScale as IconScale2 } from "@tabler/icons-react";
|
|
20254
|
-
var EvaluateBidConfig = lazyActionComponent(() => import("./EvaluateBidConfig-
|
|
20255
|
-
var EvaluateBidFlowDetail = lazyActionComponent(() => import("./EvaluateBidFlowDetail-
|
|
20254
|
+
var EvaluateBidConfig = lazyActionComponent(() => import("./EvaluateBidConfig-I6OIVCXE.js").then((module) => ({ default: module.EvaluateBidConfig })));
|
|
20255
|
+
var EvaluateBidFlowDetail = lazyActionComponent(() => import("./EvaluateBidFlowDetail-YWCXV4OS.js").then((module) => ({ default: module.EvaluateBidFlowDetail })));
|
|
20256
20256
|
registerActionTypeUI("qi/bid.evaluate", {
|
|
20257
20257
|
label: "Evaluate Bid",
|
|
20258
20258
|
description: "Approve or reject a bid",
|
|
@@ -20264,8 +20264,8 @@ registerActionTypeUI("qi/bid.evaluate", {
|
|
|
20264
20264
|
|
|
20265
20265
|
// src/mantine/blocks/action/actionTypes/claim/index.ts
|
|
20266
20266
|
import { IconFileText as IconFileText5 } from "@tabler/icons-react";
|
|
20267
|
-
var ClaimConfig = lazyActionComponent(() => import("./ClaimConfig-
|
|
20268
|
-
var ClaimFlowDetail = lazyActionComponent(() => import("./ClaimFlowDetail-
|
|
20267
|
+
var ClaimConfig = lazyActionComponent(() => import("./ClaimConfig-ASGZFCTD.js").then((module) => ({ default: module.ClaimConfig })));
|
|
20268
|
+
var ClaimFlowDetail = lazyActionComponent(() => import("./ClaimFlowDetail-LVHNKNPE.js").then((module) => ({ default: module.ClaimFlowDetail })));
|
|
20269
20269
|
registerActionTypeUI("qi/claim.submit", {
|
|
20270
20270
|
label: "Claim",
|
|
20271
20271
|
description: "Submit a claim",
|
|
@@ -20278,7 +20278,7 @@ registerActionTypeUI("qi/claim.submit", {
|
|
|
20278
20278
|
// src/mantine/blocks/action/actionTypes/collection/index.ts
|
|
20279
20279
|
import { IconFolders } from "@tabler/icons-react";
|
|
20280
20280
|
var CollectionLifecycleConfig = lazyActionComponent(() => import("./CollectionLifecycleConfig-YPTZZJ3S.js").then((module) => ({ default: module.CollectionLifecycleConfig })));
|
|
20281
|
-
var CollectionLifecycleFlowDetail = lazyActionComponent(() => import("./CollectionLifecycleFlowDetail-
|
|
20281
|
+
var CollectionLifecycleFlowDetail = lazyActionComponent(() => import("./CollectionLifecycleFlowDetail-RP6BNX4F.js").then((module) => ({ default: module.CollectionLifecycleFlowDetail })));
|
|
20282
20282
|
registerActionTypeUI("qi/collection.lifecycle", {
|
|
20283
20283
|
label: "Claim Collection",
|
|
20284
20284
|
description: "Create and manage a claim collection lifecycle",
|
|
@@ -20290,8 +20290,8 @@ registerActionTypeUI("qi/collection.lifecycle", {
|
|
|
20290
20290
|
|
|
20291
20291
|
// src/mantine/blocks/action/actionTypes/collectionUsers/index.ts
|
|
20292
20292
|
import { IconUsers as IconUsers6 } from "@tabler/icons-react";
|
|
20293
|
-
var CollectionUsersConfig = lazyActionComponent(() => import("./CollectionUsersConfig-
|
|
20294
|
-
var CollectionUsersFlowDetail = lazyActionComponent(() => import("./CollectionUsersFlowDetail-
|
|
20293
|
+
var CollectionUsersConfig = lazyActionComponent(() => import("./CollectionUsersConfig-FHB7GXYE.js").then((module) => ({ default: module.CollectionUsersConfig })));
|
|
20294
|
+
var CollectionUsersFlowDetail = lazyActionComponent(() => import("./CollectionUsersFlowDetail-EZE5ADLN.js").then((module) => ({ default: module.CollectionUsersFlowDetail })));
|
|
20295
20295
|
registerActionTypeUI("qi/collection.users", {
|
|
20296
20296
|
label: "Collection Users",
|
|
20297
20297
|
description: "Add, list and revoke claim collection contributors & evaluators",
|
|
@@ -20313,8 +20313,8 @@ registerActionTypeUI("qi/collection.users", {
|
|
|
20313
20313
|
|
|
20314
20314
|
// src/mantine/blocks/action/actionTypes/evalEngine/index.ts
|
|
20315
20315
|
import { IconClipboardCheck as IconClipboardCheck2 } from "@tabler/icons-react";
|
|
20316
|
-
var EvalEngineConfig = lazyActionComponent(() => import("./EvalEngineConfig-
|
|
20317
|
-
var EvalEngineFlowDetail = lazyActionComponent(() => import("./EvalEngineFlowDetail-
|
|
20316
|
+
var EvalEngineConfig = lazyActionComponent(() => import("./EvalEngineConfig-BJOMRKZE.js").then((module) => ({ default: module.EvalEngineConfig })));
|
|
20317
|
+
var EvalEngineFlowDetail = lazyActionComponent(() => import("./EvalEngineFlowDetail-UFIMDVZY.js").then((module) => ({ default: module.EvalEngineFlowDetail })));
|
|
20318
20318
|
registerActionTypeUI(EVAL_ENGINE_ACTION_TYPE, {
|
|
20319
20319
|
label: "Evaluation Engine",
|
|
20320
20320
|
description: "Enroll a collection and publish its claim-approval rules in one step",
|
|
@@ -20328,8 +20328,8 @@ registerActionTypeUI(EVAL_ENGINE_ACTION_TYPE, {
|
|
|
20328
20328
|
|
|
20329
20329
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/index.ts
|
|
20330
20330
|
import { IconChecks as IconChecks4 } from "@tabler/icons-react";
|
|
20331
|
-
var EvaluateClaimConfig = lazyActionComponent(() => import("./EvaluateClaimConfig-
|
|
20332
|
-
var EvaluateClaimFlowDetail = lazyActionComponent(() => import("./EvaluateClaimFlowDetail-
|
|
20331
|
+
var EvaluateClaimConfig = lazyActionComponent(() => import("./EvaluateClaimConfig-Q6CV2ZU4.js").then((module) => ({ default: module.EvaluateClaimConfig })));
|
|
20332
|
+
var EvaluateClaimFlowDetail = lazyActionComponent(() => import("./EvaluateClaimFlowDetail-J3C3M4F2.js").then((module) => ({ default: module.EvaluateClaimFlowDetail })));
|
|
20333
20333
|
registerActionTypeUI("qi/claim.evaluate", {
|
|
20334
20334
|
label: "Evaluate Claim",
|
|
20335
20335
|
description: "Approve or reject a claim",
|
|
@@ -20341,8 +20341,8 @@ registerActionTypeUI("qi/claim.evaluate", {
|
|
|
20341
20341
|
|
|
20342
20342
|
// src/mantine/blocks/action/actionTypes/proposalCreate/index.ts
|
|
20343
20343
|
import { IconFileText as IconFileText6 } from "@tabler/icons-react";
|
|
20344
|
-
var ProposalCreateConfig = lazyActionComponent(() => import("./ProposalCreateConfig-
|
|
20345
|
-
var ProposalCreateFlowDetail = lazyActionComponent(() => import("./ProposalCreateFlowDetail-
|
|
20344
|
+
var ProposalCreateConfig = lazyActionComponent(() => import("./ProposalCreateConfig-ZQIK6PZB.js").then((module) => ({ default: module.ProposalCreateConfig })));
|
|
20345
|
+
var ProposalCreateFlowDetail = lazyActionComponent(() => import("./ProposalCreateFlowDetail-3JNI7S6E.js").then((module) => ({ default: module.ProposalCreateFlowDetail })));
|
|
20346
20346
|
registerActionTypeUI("qi/proposal.create", {
|
|
20347
20347
|
label: "Create Proposal",
|
|
20348
20348
|
description: "Create an on-chain governance proposal",
|
|
@@ -20353,7 +20353,7 @@ registerActionTypeUI("qi/proposal.create", {
|
|
|
20353
20353
|
|
|
20354
20354
|
// src/mantine/blocks/action/actionTypes/proposalVote/index.ts
|
|
20355
20355
|
import { IconThumbUp as IconThumbUp2 } from "@tabler/icons-react";
|
|
20356
|
-
var ProposalVoteConfig = lazyActionComponent(() => import("./ProposalVoteConfig-
|
|
20356
|
+
var ProposalVoteConfig = lazyActionComponent(() => import("./ProposalVoteConfig-TZ3FGE4A.js").then((module) => ({ default: module.ProposalVoteConfig })));
|
|
20357
20357
|
var ProposalVoteFlowDetail = lazyActionComponent(() => import("./ProposalVoteFlowDetail-6BOYU4XJ.js").then((module) => ({ default: module.ProposalVoteFlowDetail })));
|
|
20358
20358
|
registerActionTypeUI("qi/proposal.vote", {
|
|
20359
20359
|
label: "Vote on Proposal",
|
|
@@ -20401,7 +20401,7 @@ registerActionTypeUI("qi/domain.card-preview", {
|
|
|
20401
20401
|
|
|
20402
20402
|
// src/mantine/blocks/action/actionTypes/oracle/index.ts
|
|
20403
20403
|
import { IconSparkles as IconSparkles6 } from "@tabler/icons-react";
|
|
20404
|
-
var OracleConfig = lazyActionComponent(() => import("./OracleConfig-
|
|
20404
|
+
var OracleConfig = lazyActionComponent(() => import("./OracleConfig-J3NN2EP4.js").then((module) => ({ default: module.OracleConfig })));
|
|
20405
20405
|
var OracleFlowDetail = lazyActionComponent(() => import("./OracleFlowDetail-FEPE3YYU.js").then((module) => ({ default: module.OracleFlowDetail })));
|
|
20406
20406
|
registerActionTypeUI("oracle", {
|
|
20407
20407
|
label: "Ask your Agent",
|
|
@@ -20444,7 +20444,7 @@ registerActionTypeUI("qi/human.form.submit", {
|
|
|
20444
20444
|
|
|
20445
20445
|
// src/mantine/blocks/action/actionTypes/credentialStore/index.ts
|
|
20446
20446
|
import { IconShieldCheck as IconShieldCheck14 } from "@tabler/icons-react";
|
|
20447
|
-
var CredentialStoreConfig = lazyActionComponent(() => import("./CredentialStoreConfig-
|
|
20447
|
+
var CredentialStoreConfig = lazyActionComponent(() => import("./CredentialStoreConfig-A7P27LZ5.js").then((module) => ({ default: module.CredentialStoreConfig })));
|
|
20448
20448
|
var CredentialStoreFlowDetail = lazyActionComponent(() => import("./CredentialStoreFlowDetail-5LRH7NH5.js").then((module) => ({ default: module.CredentialStoreFlowDetail })));
|
|
20449
20449
|
registerActionTypeUI("qi/credential.store", {
|
|
20450
20450
|
label: "Store Credential",
|
|
@@ -20466,8 +20466,8 @@ registerActionTypeUI("qi/matrix.dm", {
|
|
|
20466
20466
|
|
|
20467
20467
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/index.ts
|
|
20468
20468
|
import { IconCalendarPlus } from "@tabler/icons-react";
|
|
20469
|
-
var CalendarEventCreateConfig = lazyActionComponent(() => import("./CalendarEventCreateConfig-
|
|
20470
|
-
var CalendarEventCreateFlowDetail = lazyActionComponent(() => import("./CalendarEventCreateFlowDetail-
|
|
20469
|
+
var CalendarEventCreateConfig = lazyActionComponent(() => import("./CalendarEventCreateConfig-MG5KEVT5.js").then((module) => ({ default: module.CalendarEventCreateConfig })));
|
|
20470
|
+
var CalendarEventCreateFlowDetail = lazyActionComponent(() => import("./CalendarEventCreateFlowDetail-NJIVXYZE.js").then((module) => ({ default: module.CalendarEventCreateFlowDetail })));
|
|
20471
20471
|
registerActionTypeUI("qi/googlecalendar.event.create-self", {
|
|
20472
20472
|
label: "Create Calendar event",
|
|
20473
20473
|
description: "Create an event on a connected Calendar",
|
|
@@ -20479,8 +20479,8 @@ registerActionTypeUI("qi/googlecalendar.event.create-self", {
|
|
|
20479
20479
|
|
|
20480
20480
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/index.ts
|
|
20481
20481
|
import { IconCalendarEvent } from "@tabler/icons-react";
|
|
20482
|
-
var CalendarEventUpdateConfig = lazyActionComponent(() => import("./CalendarEventUpdateConfig-
|
|
20483
|
-
var CalendarEventUpdateFlowDetail = lazyActionComponent(() => import("./CalendarEventUpdateFlowDetail-
|
|
20482
|
+
var CalendarEventUpdateConfig = lazyActionComponent(() => import("./CalendarEventUpdateConfig-JBSY4IQI.js").then((module) => ({ default: module.CalendarEventUpdateConfig })));
|
|
20483
|
+
var CalendarEventUpdateFlowDetail = lazyActionComponent(() => import("./CalendarEventUpdateFlowDetail-RW2PQCVL.js").then((module) => ({ default: module.CalendarEventUpdateFlowDetail })));
|
|
20484
20484
|
registerActionTypeUI("qi/googlecalendar.event.update-self", {
|
|
20485
20485
|
label: "Update Calendar event",
|
|
20486
20486
|
description: "Replace an existing Calendar event",
|
|
@@ -20492,7 +20492,7 @@ registerActionTypeUI("qi/googlecalendar.event.update-self", {
|
|
|
20492
20492
|
|
|
20493
20493
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/index.ts
|
|
20494
20494
|
import { IconCalendarStats } from "@tabler/icons-react";
|
|
20495
|
-
var CalendarEventListConfig = lazyActionComponent(() => import("./CalendarEventListConfig-
|
|
20495
|
+
var CalendarEventListConfig = lazyActionComponent(() => import("./CalendarEventListConfig-47DCJ4JN.js").then((module) => ({ default: module.CalendarEventListConfig })));
|
|
20496
20496
|
var CalendarEventListFlowDetail = lazyActionComponent(() => import("./CalendarEventListFlowDetail-6LN4I3SI.js").then((module) => ({ default: module.CalendarEventListFlowDetail })));
|
|
20497
20497
|
registerActionTypeUI("qi/googlecalendar.event.list-self", {
|
|
20498
20498
|
label: "List Calendar events",
|
|
@@ -20505,8 +20505,8 @@ registerActionTypeUI("qi/googlecalendar.event.list-self", {
|
|
|
20505
20505
|
|
|
20506
20506
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/index.ts
|
|
20507
20507
|
import { IconUserPlus as IconUserPlus3 } from "@tabler/icons-react";
|
|
20508
|
-
var XeroContactCreateConfig = lazyActionComponent(() => import("./XeroContactCreateConfig-
|
|
20509
|
-
var XeroContactCreateFlowDetail = lazyActionComponent(() => import("./XeroContactCreateFlowDetail-
|
|
20508
|
+
var XeroContactCreateConfig = lazyActionComponent(() => import("./XeroContactCreateConfig-N6YU7YEX.js").then((module) => ({ default: module.XeroContactCreateConfig })));
|
|
20509
|
+
var XeroContactCreateFlowDetail = lazyActionComponent(() => import("./XeroContactCreateFlowDetail-NO65PRXE.js").then((module) => ({ default: module.XeroContactCreateFlowDetail })));
|
|
20510
20510
|
registerActionTypeUI("qi/xero.contact.create", {
|
|
20511
20511
|
label: "Create Xero contact",
|
|
20512
20512
|
description: "Add a customer or supplier in Xero",
|
|
@@ -20518,8 +20518,8 @@ registerActionTypeUI("qi/xero.contact.create", {
|
|
|
20518
20518
|
|
|
20519
20519
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/index.ts
|
|
20520
20520
|
import { IconReceipt } from "@tabler/icons-react";
|
|
20521
|
-
var XeroInvoiceCreateConfig = lazyActionComponent(() => import("./XeroInvoiceCreateConfig-
|
|
20522
|
-
var XeroInvoiceCreateFlowDetail = lazyActionComponent(() => import("./XeroInvoiceCreateFlowDetail-
|
|
20521
|
+
var XeroInvoiceCreateConfig = lazyActionComponent(() => import("./XeroInvoiceCreateConfig-VHJMWKY2.js").then((module) => ({ default: module.XeroInvoiceCreateConfig })));
|
|
20522
|
+
var XeroInvoiceCreateFlowDetail = lazyActionComponent(() => import("./XeroInvoiceCreateFlowDetail-UJDEUWH6.js").then((module) => ({ default: module.XeroInvoiceCreateFlowDetail })));
|
|
20523
20523
|
registerActionTypeUI("qi/xero.invoice.create", {
|
|
20524
20524
|
label: "Create Xero invoice",
|
|
20525
20525
|
description: "Draft a new Xero invoice",
|
|
@@ -20531,7 +20531,7 @@ registerActionTypeUI("qi/xero.invoice.create", {
|
|
|
20531
20531
|
|
|
20532
20532
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/index.ts
|
|
20533
20533
|
import { IconListDetails } from "@tabler/icons-react";
|
|
20534
|
-
var XeroInvoiceListConfig = lazyActionComponent(() => import("./XeroInvoiceListConfig-
|
|
20534
|
+
var XeroInvoiceListConfig = lazyActionComponent(() => import("./XeroInvoiceListConfig-CEECA5U7.js").then((module) => ({ default: module.XeroInvoiceListConfig })));
|
|
20535
20535
|
var XeroInvoiceListFlowDetail = lazyActionComponent(() => import("./XeroInvoiceListFlowDetail-YPU6MFSX.js").then((module) => ({ default: module.XeroInvoiceListFlowDetail })));
|
|
20536
20536
|
registerActionTypeUI("qi/xero.invoice.list", {
|
|
20537
20537
|
label: "List Xero invoices",
|
|
@@ -20544,8 +20544,8 @@ registerActionTypeUI("qi/xero.invoice.list", {
|
|
|
20544
20544
|
|
|
20545
20545
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/index.ts
|
|
20546
20546
|
import { IconReceipt as IconReceipt2 } from "@tabler/icons-react";
|
|
20547
|
-
var XeroPaymentCreateConfig = lazyActionComponent(() => import("./XeroPaymentCreateConfig-
|
|
20548
|
-
var XeroPaymentCreateFlowDetail = lazyActionComponent(() => import("./XeroPaymentCreateFlowDetail-
|
|
20547
|
+
var XeroPaymentCreateConfig = lazyActionComponent(() => import("./XeroPaymentCreateConfig-KULFUA66.js").then((module) => ({ default: module.XeroPaymentCreateConfig })));
|
|
20548
|
+
var XeroPaymentCreateFlowDetail = lazyActionComponent(() => import("./XeroPaymentCreateFlowDetail-BRRQJ67R.js").then((module) => ({ default: module.XeroPaymentCreateFlowDetail })));
|
|
20549
20549
|
registerActionTypeUI("qi/xero.payment.create", {
|
|
20550
20550
|
label: "Record Xero payment",
|
|
20551
20551
|
description: "Settle a Xero bill \u2014 typically wired to capture an on-chain tx hash as the reference",
|
|
@@ -21011,7 +21011,7 @@ registerActionTypeUI("qi/carbon.loadBatches", {
|
|
|
21011
21011
|
|
|
21012
21012
|
// src/mantine/blocks/action/actionTypes/carbon/harvest/index.ts
|
|
21013
21013
|
import { IconLeaf as IconLeaf4 } from "@tabler/icons-react";
|
|
21014
|
-
var HarvestConfig = lazyActionComponent(() => import("./HarvestConfig-
|
|
21014
|
+
var HarvestConfig = lazyActionComponent(() => import("./HarvestConfig-L37MMZE5.js").then((module) => ({ default: module.HarvestConfig })));
|
|
21015
21015
|
var HarvestFlowDetail = lazyActionComponent(() => import("./HarvestFlowDetail-Y2AJWJKR.js").then((module) => ({ default: module.HarvestFlowDetail })));
|
|
21016
21016
|
registerActionTypeUI("qi/carbon.harvest", {
|
|
21017
21017
|
label: "Harvest Carbon",
|
|
@@ -21024,7 +21024,7 @@ registerActionTypeUI("qi/carbon.harvest", {
|
|
|
21024
21024
|
|
|
21025
21025
|
// src/mantine/blocks/action/actionTypes/carbon/retire/index.ts
|
|
21026
21026
|
import { IconFlame as IconFlame2 } from "@tabler/icons-react";
|
|
21027
|
-
var RetireConfig = lazyActionComponent(() => import("./RetireConfig-
|
|
21027
|
+
var RetireConfig = lazyActionComponent(() => import("./RetireConfig-YKFKGNOR.js").then((module) => ({ default: module.RetireConfig })));
|
|
21028
21028
|
var RetireFlowDetail = lazyActionComponent(() => import("./RetireFlowDetail-SP5GBJSA.js").then((module) => ({ default: module.RetireFlowDetail })));
|
|
21029
21029
|
registerActionTypeUI("qi/carbon.retire", {
|
|
21030
21030
|
label: "Retire Carbon",
|
|
@@ -21050,8 +21050,8 @@ registerActionTypeUI("qi/entity.transfer", {
|
|
|
21050
21050
|
|
|
21051
21051
|
// src/mantine/blocks/action/actionTypes/kycVerify/index.ts
|
|
21052
21052
|
import { IconId } from "@tabler/icons-react";
|
|
21053
|
-
var KycVerifyConfig = lazyActionComponent(() => import("./KycVerifyConfig-
|
|
21054
|
-
var KycVerifyFlowDetail = lazyActionComponent(() => import("./KycVerifyFlowDetail-
|
|
21053
|
+
var KycVerifyConfig = lazyActionComponent(() => import("./KycVerifyConfig-YPTVDVAM.js").then((module) => ({ default: module.KycVerifyConfig })));
|
|
21054
|
+
var KycVerifyFlowDetail = lazyActionComponent(() => import("./KycVerifyFlowDetail-CFWXA3AT.js").then((module) => ({ default: module.KycVerifyFlowDetail })));
|
|
21055
21055
|
registerActionTypeUI("qi/kyc.verify", {
|
|
21056
21056
|
label: "Identity Verification (KYC)",
|
|
21057
21057
|
description: "Verify your identity and save the issued credential to your Vault",
|
|
@@ -21103,7 +21103,7 @@ registerActionTypeUI("qi/wallet.generateAndFund", {
|
|
|
21103
21103
|
// src/mantine/blocks/action/actionTypes/iidCreate/index.ts
|
|
21104
21104
|
import { IconFingerprint } from "@tabler/icons-react";
|
|
21105
21105
|
var IidCreateConfig = lazyActionComponent(() => import("./IidCreateConfig-RRV2DYXI.js").then((module) => ({ default: module.IidCreateConfig })));
|
|
21106
|
-
var IidCreateFlowDetail = lazyActionComponent(() => import("./IidCreateFlowDetail-
|
|
21106
|
+
var IidCreateFlowDetail = lazyActionComponent(() => import("./IidCreateFlowDetail-J4PKJMSA.js").then((module) => ({ default: module.IidCreateFlowDetail })));
|
|
21107
21107
|
registerActionTypeUI("qi/iid.create", {
|
|
21108
21108
|
label: "Create IID",
|
|
21109
21109
|
description: "Create an IID document on-chain",
|
|
@@ -21127,7 +21127,7 @@ registerActionTypeUI("qi/matrix.register", {
|
|
|
21127
21127
|
// src/mantine/blocks/action/actionTypes/identityCreate/index.ts
|
|
21128
21128
|
import { IconId as IconId2 } from "@tabler/icons-react";
|
|
21129
21129
|
var IdentityCreateConfig = lazyActionComponent(() => import("./IdentityCreateConfig-ZBUOJ6AL.js").then((module) => ({ default: module.IdentityCreateConfig })));
|
|
21130
|
-
var IdentityCreateFlowDetail = lazyActionComponent(() => import("./IdentityCreateFlowDetail-
|
|
21130
|
+
var IdentityCreateFlowDetail = lazyActionComponent(() => import("./IdentityCreateFlowDetail-CGE66IXY.js").then((module) => ({ default: module.IdentityCreateFlowDetail })));
|
|
21131
21131
|
registerActionTypeUI("qi/identity.create", {
|
|
21132
21132
|
label: "Create Identity",
|
|
21133
21133
|
description: "Create an IID document and Matrix account for a user",
|
|
@@ -21137,13 +21137,13 @@ registerActionTypeUI("qi/identity.create", {
|
|
|
21137
21137
|
});
|
|
21138
21138
|
|
|
21139
21139
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/index.ts
|
|
21140
|
-
import {
|
|
21140
|
+
import { IconInnerShadowBottomRight as IconInnerShadowBottomRight4 } from "@tabler/icons-react";
|
|
21141
21141
|
var EntityCreateOracleConfig = lazyActionComponent(() => import("./EntityCreateOracleConfig-UZ6ZIMP5.js").then((module) => ({ default: module.EntityCreateOracleConfig })));
|
|
21142
21142
|
var EntityCreateOracleFlowDetail = lazyActionComponent(() => import("./EntityCreateOracleFlowDetail-6XJ4UEL5.js").then((module) => ({ default: module.EntityCreateOracleFlowDetail })));
|
|
21143
21143
|
registerActionTypeUI("qi/entity.createOracle", {
|
|
21144
21144
|
label: "Create Oracle Entity",
|
|
21145
21145
|
description: "Create the oracle entity on-chain",
|
|
21146
|
-
icon: icon(
|
|
21146
|
+
icon: icon(IconInnerShadowBottomRight4, 20),
|
|
21147
21147
|
configComponent: EntityCreateOracleConfig,
|
|
21148
21148
|
flowDetailComponent: EntityCreateOracleFlowDetail
|
|
21149
21149
|
});
|
|
@@ -21175,7 +21175,7 @@ registerActionTypeUI("qi/oracle.contract", {
|
|
|
21175
21175
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/index.ts
|
|
21176
21176
|
import { IconKey as IconKey3 } from "@tabler/icons-react";
|
|
21177
21177
|
var OracleStoreSecretsConfig = lazyActionComponent(() => import("./OracleStoreSecretsConfig-PQMF7LFT.js").then((module) => ({ default: module.OracleStoreSecretsConfig })));
|
|
21178
|
-
var OracleStoreSecretsFlowDetail = lazyActionComponent(() => import("./OracleStoreSecretsFlowDetail-
|
|
21178
|
+
var OracleStoreSecretsFlowDetail = lazyActionComponent(() => import("./OracleStoreSecretsFlowDetail-6HEZJZ3R.js").then((module) => ({ default: module.OracleStoreSecretsFlowDetail })));
|
|
21179
21179
|
registerActionTypeUI("qi/oracle.storeSecrets", {
|
|
21180
21180
|
label: "Store Oracle Secrets",
|
|
21181
21181
|
description: "Store oracle secrets in Matrix room state",
|
|
@@ -21202,7 +21202,7 @@ var OracleStoreSecretsAndConfigConfig = lazyActionComponent(
|
|
|
21202
21202
|
() => import("./OracleStoreSecretsAndConfigConfig-SZPYEK7U.js").then((module) => ({ default: module.OracleStoreSecretsAndConfigConfig }))
|
|
21203
21203
|
);
|
|
21204
21204
|
var OracleStoreSecretsAndConfigFlowDetail = lazyActionComponent(
|
|
21205
|
-
() => import("./OracleStoreSecretsAndConfigFlowDetail-
|
|
21205
|
+
() => import("./OracleStoreSecretsAndConfigFlowDetail-7U6RI2A2.js").then((module) => ({ default: module.OracleStoreSecretsAndConfigFlowDetail }))
|
|
21206
21206
|
);
|
|
21207
21207
|
registerActionTypeUI("qi/oracle.storeSecretsAndConfig", {
|
|
21208
21208
|
label: "Store Oracle Secrets & Config",
|
|
@@ -21216,7 +21216,7 @@ registerActionTypeUI("qi/oracle.storeSecretsAndConfig", {
|
|
|
21216
21216
|
import { IconAdjustments as IconAdjustments2 } from "@tabler/icons-react";
|
|
21217
21217
|
var OracleConfigureOracleConfig = lazyActionComponent(() => import("./OracleConfigureOracleConfig-QFF74X3N.js").then((module) => ({ default: module.OracleConfigureOracleConfig })));
|
|
21218
21218
|
var OracleConfigureOracleFlowDetail = lazyActionComponent(
|
|
21219
|
-
() => import("./OracleConfigureOracleFlowDetail-
|
|
21219
|
+
() => import("./OracleConfigureOracleFlowDetail-3ER4XIAB.js").then((module) => ({ default: module.OracleConfigureOracleFlowDetail }))
|
|
21220
21220
|
);
|
|
21221
21221
|
registerActionTypeUI("qi/oracle.configureOracle", {
|
|
21222
21222
|
label: "Configure Oracle",
|
|
@@ -27191,7 +27191,7 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
27191
27191
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
27192
27192
|
import React238, { useState as useState105, useEffect as useEffect91, useMemo as useMemo106 } from "react";
|
|
27193
27193
|
import { Stack as Stack143, Text as Text142, Paper as Paper19, Group as Group90, Badge as Badge41, Button as Button43, ActionIcon as ActionIcon36, Loader as Loader38, Alert as Alert30, Divider as Divider22 } from "@mantine/core";
|
|
27194
|
-
import { IconPlus as IconPlus10, IconTrash as IconTrash13, IconShieldCheck as IconShieldCheck15, IconUser as IconUser14,
|
|
27194
|
+
import { IconPlus as IconPlus10, IconTrash as IconTrash13, IconShieldCheck as IconShieldCheck15, IconUser as IconUser14, IconInnerShadowBottomRight as IconInnerShadowBottomRight5, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
27195
27195
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
27196
27196
|
const [delegations, setDelegations] = useState105([]);
|
|
27197
27197
|
const [loading, setLoading] = useState105(true);
|
|
@@ -27244,7 +27244,7 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
27244
27244
|
const getIcon2 = (type) => {
|
|
27245
27245
|
switch (type) {
|
|
27246
27246
|
case "oracle":
|
|
27247
|
-
return /* @__PURE__ */ React238.createElement(
|
|
27247
|
+
return /* @__PURE__ */ React238.createElement(IconInnerShadowBottomRight5, { size: 16 });
|
|
27248
27248
|
case "entity":
|
|
27249
27249
|
return /* @__PURE__ */ React238.createElement(IconBuilding2, { size: 16 });
|
|
27250
27250
|
default:
|
|
@@ -27278,7 +27278,7 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
27278
27278
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
27279
27279
|
import React239, { useState as useState106, useCallback as useCallback87 } from "react";
|
|
27280
27280
|
import { Modal as Modal5, Stack as Stack144, Text as Text143, TextInput as TextInput7, Button as Button44, Group as Group91, Radio as Radio2, Checkbox as Checkbox8, Alert as Alert31, Paper as Paper20, Loader as Loader39, Badge as Badge42, ActionIcon as ActionIcon37, Divider as Divider23, NumberInput as NumberInput2 } from "@mantine/core";
|
|
27281
|
-
import { IconSearch as IconSearch7, IconUser as IconUser15,
|
|
27281
|
+
import { IconSearch as IconSearch7, IconUser as IconUser15, IconInnerShadowBottomRight as IconInnerShadowBottomRight6, IconX as IconX14, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
|
|
27282
27282
|
var MAX_GRANT_DAYS2 = 30;
|
|
27283
27283
|
var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
27284
27284
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
@@ -27414,7 +27414,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
27414
27414
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
27415
27415
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
27416
27416
|
}
|
|
27417
|
-
), selectedRecipient ? /* @__PURE__ */ React239.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React239.createElement(Group91, { justify: "space-between" }, /* @__PURE__ */ React239.createElement(Group91, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React239.createElement(
|
|
27417
|
+
), selectedRecipient ? /* @__PURE__ */ React239.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React239.createElement(Group91, { justify: "space-between" }, /* @__PURE__ */ React239.createElement(Group91, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React239.createElement(IconInnerShadowBottomRight6, { size: 16 }) : /* @__PURE__ */ React239.createElement(IconUser15, { size: 16 }), /* @__PURE__ */ React239.createElement(Text143, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React239.createElement(Badge42, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React239.createElement(ActionIcon37, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React239.createElement(IconX14, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React239.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React239.createElement(Stack144, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React239.createElement(Button44, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React239.createElement(TextInput7, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React239.createElement(Divider23, null), /* @__PURE__ */ React239.createElement(Stack144, { gap: "xs" }, /* @__PURE__ */ React239.createElement(Text143, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
27418
27418
|
// Single block mode: show fixed block info
|
|
27419
27419
|
/* @__PURE__ */ React239.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React239.createElement(Group91, { gap: "xs" }, /* @__PURE__ */ React239.createElement(Badge42, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React239.createElement(Text143, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React239.createElement(Text143, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
27420
27420
|
) : (
|
|
@@ -27561,4 +27561,4 @@ export {
|
|
|
27561
27561
|
ixoGraphQLClient,
|
|
27562
27562
|
getEntity
|
|
27563
27563
|
};
|
|
27564
|
-
//# sourceMappingURL=chunk-
|
|
27564
|
+
//# sourceMappingURL=chunk-MSPUTDZC.js.map
|