@ixo/editor 6.26.1 → 6.27.1
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/{chunk-YC6GPQZG.js → chunk-WGCOGBWG.js} +33 -2
- package/dist/chunk-WGCOGBWG.js.map +1 -0
- package/dist/{chunk-H4OFDRA7.js → chunk-XLGG4VDV.js} +2130 -1894
- package/dist/chunk-XLGG4VDV.js.map +1 -0
- package/dist/{chunk-PW5J4EAV.js → chunk-ZGFQSAL7.js} +2 -2
- package/dist/core/index.d.ts +29 -1
- package/dist/core/index.js +12 -4
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mantine/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-H4OFDRA7.js.map +0 -1
- package/dist/chunk-YC6GPQZG.js.map +0 -1
- /package/dist/{chunk-PW5J4EAV.js.map → chunk-ZGFQSAL7.js.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
swapBlocksInFragment,
|
|
15
15
|
writeActionState,
|
|
16
16
|
writeCompiledBlocksToFragment
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WGCOGBWG.js";
|
|
18
18
|
|
|
19
19
|
// src/core/lib/flowCompiler/authoring.ts
|
|
20
20
|
import * as Y from "yjs";
|
|
@@ -370,4 +370,4 @@ export {
|
|
|
370
370
|
setFlowParticipantPowerLevel,
|
|
371
371
|
setFlowParticipantRequirements
|
|
372
372
|
};
|
|
373
|
-
//# sourceMappingURL=chunk-
|
|
373
|
+
//# sourceMappingURL=chunk-ZGFQSAL7.js.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1138,6 +1138,30 @@ type XeroWorkItemFilter = {
|
|
|
1138
1138
|
assignedBlockId?: string;
|
|
1139
1139
|
statuses?: XeroWorkStatus[];
|
|
1140
1140
|
};
|
|
1141
|
+
/**
|
|
1142
|
+
* Statuses meaning "the oracle lane is actively working this item", per kind —
|
|
1143
|
+
* the contract behind every settlement indicator. Invoice drafting has no
|
|
1144
|
+
* human gate: the flow-manager contracts `pending` invoice items directly, so
|
|
1145
|
+
* a pending invoice is already queued oracle work. A `pending` payment item is
|
|
1146
|
+
* only a review card awaiting the flow owner; approval is what moves it into
|
|
1147
|
+
* the oracle lane.
|
|
1148
|
+
*/
|
|
1149
|
+
declare const XERO_ORACLE_WORKING_STATUSES: Record<XeroWorkKind, XeroWorkStatus[]>;
|
|
1150
|
+
declare const XERO_PAYMENT_CREATE_ACTION_TYPE = "qi/xero.payment.create";
|
|
1151
|
+
/**
|
|
1152
|
+
* The oracle-working indicator for the whole Xero settlement chain anchors on
|
|
1153
|
+
* the `qi/xero.payment.create` action block — the one user-facing settlement
|
|
1154
|
+
* surface (its detail page is where drafts are reviewed and approved). Any
|
|
1155
|
+
* other block resolves to null. Invoice work items are assigned to the
|
|
1156
|
+
* evaluation block that minted them, so they are matched doc-wide here rather
|
|
1157
|
+
* than by `assignedBlockId`; payment items belong to the block itself. The
|
|
1158
|
+
* invoice stage outranks the payment stage: while an invoice is still being
|
|
1159
|
+
* drafted, that is the activity to show.
|
|
1160
|
+
*/
|
|
1161
|
+
declare function xeroOracleActivityForBlock(map: Map<XeroWorkItem> | null | undefined, params: {
|
|
1162
|
+
blockId: string;
|
|
1163
|
+
actionType?: string;
|
|
1164
|
+
}): XeroWorkKind | null;
|
|
1141
1165
|
/**
|
|
1142
1166
|
* Resolve the work-items map from a raw Y.Doc. Flow-manager (and any other
|
|
1143
1167
|
* consumer holding the doc rather than an editor instance) goes through this.
|
|
@@ -1201,6 +1225,10 @@ declare function markXeroWorkCompleted(map: Map<XeroWorkItem> | null | undefined
|
|
|
1201
1225
|
at?: number;
|
|
1202
1226
|
}): XeroWorkItem | null;
|
|
1203
1227
|
declare function findXeroWorkItemsForEditor(editor: any, filter: XeroWorkItemFilter): XeroWorkItem[];
|
|
1228
|
+
declare function xeroOracleActivityForBlockForEditor(editor: any, params: {
|
|
1229
|
+
blockId: string;
|
|
1230
|
+
actionType?: string;
|
|
1231
|
+
}): XeroWorkKind | null;
|
|
1204
1232
|
declare function upsertXeroWorkItemForEditor(editor: any, next: XeroWorkItem): XeroWorkItem;
|
|
1205
1233
|
declare function updateXeroWorkReviewPayloadForEditor(editor: any, itemId: string, reviewPayload: Record<string, any>): XeroWorkItem | null;
|
|
1206
1234
|
declare function markXeroWorkApprovedForEditor(editor: any, itemId: string, params: {
|
|
@@ -1367,4 +1395,4 @@ declare function createOracleInitFlowTemplate(): {
|
|
|
1367
1395
|
nodes: FlowNode[];
|
|
1368
1396
|
};
|
|
1369
1397
|
|
|
1370
|
-
export { ActionDefinition, ActionDoneContract, ActionHandlers, type ActionManifest, type ActionManifestEntry, ActionReadBackMetadata, type ActionReadBackResolution, type ActionReadBackResolver, type ActionReadBackResolverInput, ActionResult, ActionRunContext, ActionServices, type AddFlowNodeOptions, type BlockCondition, type BlockConditionInput, type BlockConditionsResult, type BlockExecutionEligibility, type BoundedRunOutput, type CapabilityPatternCoversCanOptions, type ClassifyNodeStateInput, CompiledBlock, CompiledEdge, CompiledFlow, CompletionCheck, type CompletionReconciliationTransition, type CompletionVerification, type CompletionVerificationStatus, type ConditionActionResult, type ConditionConfig, type ConditionEvaluationOptions, type ConditionEvaluationResult, type ConditionOperator, type DetailedResolution, type EvaluatorOperator, type ExecuteFlowAgentCoreCommandOptions, type ExecuteQueuedFlowAgentCoreCommandsOptions, FlowAgentBlockerCause, FlowAgentCommand, FlowAgentCommandResult, FlowAgentContext, FlowAgentExecutor, FlowAgentNodeSnapshot, FlowAgentPublicNodeState, FlowConnectionBinding, type FlowDocumentNode, type FlowDocumentRead, FlowNode, FlowNodeRuntimeState, FlowRuntimeStateManager, type FlowVersionString, INVOCATIONS_MAP_KEY, InvalidConditionConfigError, InvocationStore, LATEST_VERSION, MAX_RUN_ACTION_OUTPUT_BYTES, type ManifestDoneDeclaration, type ManifestProofDeclaration, OutputSchemaField, PROOF_MISSING_CODE, type ParsedReference, PendingInvocation, type PendingRunTimelineEvent, type ProofValidationResult, ReadBackTerminalState, type ReconcileActionReadBackParams, type ReconcileActionReadBackResult, type ReconcileCompletionParams, type ReconcileCompletionResult, type ResolveReferencesOptions, RunEventAppender, RunEventInput, RunJsonValue, RunRecordDetails, type RunTimelineAppendResult, SERVICE_VERBS, STEP_COMPLETED_EVENT, STEP_COMPLETED_EVENT_NAME, type ServiceVerb, StoredDelegation, StoredInvocation, UcanDelegationStore, UcanService, type UnresolvedReference, type UnresolvedReferenceReason, VERSION_MANIFEST, type VersionPolicy, XERO_TOOLKIT, XERO_WORK_ITEMS_MAP_NAME, XERO_WORK_TERMINAL_MAP_NAME, type XeroWorkAttempt, type XeroWorkItem, type XeroWorkItemFilter, type XeroWorkKind, type XeroWorkProvenance, type XeroWorkSource, type XeroWorkStatus, type XeroWorkTerminalRecord, actionTypeToCan, addFlowNode, appendRunTimelineEvent, appendRunTimelineEvents, boundRunActionOutput, boundRunEventJson, buildBlockConditionsProp, buildServicesFromHandlers, buildXeroInvoiceWorkKey, buildXeroPaymentWorkKey, canToActionType, canToType, capabilityPatternCoversCan, classifyBlockerCause, classifyNodeState, computeCID, computeJsonCID, createOracleInitFlowTemplate, createReference, createRunEventIdempotencyKey, dispatchFlowStartTriggers, doneWhenCompleted, evaluateBlockConditions, evaluateBlockConditionsForRun, evaluateBlockExecutionEligibilityForRun, evaluateCondition, executeFlowAgentCoreCommand, executeQueuedFlowAgentCoreCommands, findXeroWorkItems, findXeroWorkItemsForEditor, generateActionManifest, getAction, getActionByCan, getActionForBlock, getAliasEntries, getAllActions, getAllCanMappings, getEventsForBlock, getMissingActionInputs, getNestedValue, getOutputSchemaForBlock, getVersionPolicy, getXeroWorkItemsMap, getXeroWorkTerminalMap, hasAction, hasReferences, isActionDone, isActionTypeDone, isBlankInputValue, isTempUcanEnforcementDisabled, isVerifiedCompletion, isVersionAtLeast, markXeroWorkApproved, markXeroWorkApprovedForEditor, markXeroWorkCompleted, markXeroWorkCompletedForEditor, markXeroWorkFailed, markXeroWorkFailedForEditor, neverDone, normalizeActionReadBackMetadata, normalizeCan, normalizeCapabilityPattern, normalizeCondition, normalizeConditions, oracleInitSurveySchema, parseConditionConfig, parseConditionConfigStrict, parseReferences, parseServiceCan, readBlocksFromFragment, readFlowDocument, readFlowXeroBinding, readFlowXeroBindingFromEditor, readInvocationsForRun, readPendingRunTimelineEvents, reconcileActionReadBack, reconcileCompletion, reconcilePendingInvocations, registerAction, removeBlockFromFragment, removeFlowNode, reorderFlowNodes, replaceBlockInFragment, resetStepRuntime, resolveConditionSourceValue, resolveObjectReferences, resolveReferences, resolveReferencesDetailed, resolveSingleReference, retryPendingRunTimelineEvents, serviceCan, setBlockProps, setFormAnswers, setTempUcanEnforcementDisabled, snapshotNode, swapFlowBlocks, toEvaluatorOperator, typeToCan, updateNodeRuntime, updateXeroWorkReviewPayload, updateXeroWorkReviewPayloadForEditor, upsertXeroWorkItem, upsertXeroWorkItemForEditor, validateActionProof, verifyCompletion, writeCompiledBlocksToFragment, writeRunRecordAndReconcile };
|
|
1398
|
+
export { ActionDefinition, ActionDoneContract, ActionHandlers, type ActionManifest, type ActionManifestEntry, ActionReadBackMetadata, type ActionReadBackResolution, type ActionReadBackResolver, type ActionReadBackResolverInput, ActionResult, ActionRunContext, ActionServices, type AddFlowNodeOptions, type BlockCondition, type BlockConditionInput, type BlockConditionsResult, type BlockExecutionEligibility, type BoundedRunOutput, type CapabilityPatternCoversCanOptions, type ClassifyNodeStateInput, CompiledBlock, CompiledEdge, CompiledFlow, CompletionCheck, type CompletionReconciliationTransition, type CompletionVerification, type CompletionVerificationStatus, type ConditionActionResult, type ConditionConfig, type ConditionEvaluationOptions, type ConditionEvaluationResult, type ConditionOperator, type DetailedResolution, type EvaluatorOperator, type ExecuteFlowAgentCoreCommandOptions, type ExecuteQueuedFlowAgentCoreCommandsOptions, FlowAgentBlockerCause, FlowAgentCommand, FlowAgentCommandResult, FlowAgentContext, FlowAgentExecutor, FlowAgentNodeSnapshot, FlowAgentPublicNodeState, FlowConnectionBinding, type FlowDocumentNode, type FlowDocumentRead, FlowNode, FlowNodeRuntimeState, FlowRuntimeStateManager, type FlowVersionString, INVOCATIONS_MAP_KEY, InvalidConditionConfigError, InvocationStore, LATEST_VERSION, MAX_RUN_ACTION_OUTPUT_BYTES, type ManifestDoneDeclaration, type ManifestProofDeclaration, OutputSchemaField, PROOF_MISSING_CODE, type ParsedReference, PendingInvocation, type PendingRunTimelineEvent, type ProofValidationResult, ReadBackTerminalState, type ReconcileActionReadBackParams, type ReconcileActionReadBackResult, type ReconcileCompletionParams, type ReconcileCompletionResult, type ResolveReferencesOptions, RunEventAppender, RunEventInput, RunJsonValue, RunRecordDetails, type RunTimelineAppendResult, SERVICE_VERBS, STEP_COMPLETED_EVENT, STEP_COMPLETED_EVENT_NAME, type ServiceVerb, StoredDelegation, StoredInvocation, UcanDelegationStore, UcanService, type UnresolvedReference, type UnresolvedReferenceReason, VERSION_MANIFEST, type VersionPolicy, XERO_ORACLE_WORKING_STATUSES, XERO_PAYMENT_CREATE_ACTION_TYPE, XERO_TOOLKIT, XERO_WORK_ITEMS_MAP_NAME, XERO_WORK_TERMINAL_MAP_NAME, type XeroWorkAttempt, type XeroWorkItem, type XeroWorkItemFilter, type XeroWorkKind, type XeroWorkProvenance, type XeroWorkSource, type XeroWorkStatus, type XeroWorkTerminalRecord, actionTypeToCan, addFlowNode, appendRunTimelineEvent, appendRunTimelineEvents, boundRunActionOutput, boundRunEventJson, buildBlockConditionsProp, buildServicesFromHandlers, buildXeroInvoiceWorkKey, buildXeroPaymentWorkKey, canToActionType, canToType, capabilityPatternCoversCan, classifyBlockerCause, classifyNodeState, computeCID, computeJsonCID, createOracleInitFlowTemplate, createReference, createRunEventIdempotencyKey, dispatchFlowStartTriggers, doneWhenCompleted, evaluateBlockConditions, evaluateBlockConditionsForRun, evaluateBlockExecutionEligibilityForRun, evaluateCondition, executeFlowAgentCoreCommand, executeQueuedFlowAgentCoreCommands, findXeroWorkItems, findXeroWorkItemsForEditor, generateActionManifest, getAction, getActionByCan, getActionForBlock, getAliasEntries, getAllActions, getAllCanMappings, getEventsForBlock, getMissingActionInputs, getNestedValue, getOutputSchemaForBlock, getVersionPolicy, getXeroWorkItemsMap, getXeroWorkTerminalMap, hasAction, hasReferences, isActionDone, isActionTypeDone, isBlankInputValue, isTempUcanEnforcementDisabled, isVerifiedCompletion, isVersionAtLeast, markXeroWorkApproved, markXeroWorkApprovedForEditor, markXeroWorkCompleted, markXeroWorkCompletedForEditor, markXeroWorkFailed, markXeroWorkFailedForEditor, neverDone, normalizeActionReadBackMetadata, normalizeCan, normalizeCapabilityPattern, normalizeCondition, normalizeConditions, oracleInitSurveySchema, parseConditionConfig, parseConditionConfigStrict, parseReferences, parseServiceCan, readBlocksFromFragment, readFlowDocument, readFlowXeroBinding, readFlowXeroBindingFromEditor, readInvocationsForRun, readPendingRunTimelineEvents, reconcileActionReadBack, reconcileCompletion, reconcilePendingInvocations, registerAction, removeBlockFromFragment, removeFlowNode, reorderFlowNodes, replaceBlockInFragment, resetStepRuntime, resolveConditionSourceValue, resolveObjectReferences, resolveReferences, resolveReferencesDetailed, resolveSingleReference, retryPendingRunTimelineEvents, serviceCan, setBlockProps, setFormAnswers, setTempUcanEnforcementDisabled, snapshotNode, swapFlowBlocks, toEvaluatorOperator, typeToCan, updateNodeRuntime, updateXeroWorkReviewPayload, updateXeroWorkReviewPayloadForEditor, upsertXeroWorkItem, upsertXeroWorkItemForEditor, validateActionProof, verifyCompletion, writeCompiledBlocksToFragment, writeRunRecordAndReconcile, xeroOracleActivityForBlock, xeroOracleActivityForBlockForEditor };
|
package/dist/core/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
swapFlowBlocks,
|
|
15
15
|
updateNodeRuntime,
|
|
16
16
|
upsertFlowParticipant
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ZGFQSAL7.js";
|
|
18
18
|
import {
|
|
19
19
|
ExplicitRunRequiredError,
|
|
20
20
|
FLOW_CONNECTIONS_MAP_KEY,
|
|
@@ -42,6 +42,8 @@ import {
|
|
|
42
42
|
TerminalRunExecutionError,
|
|
43
43
|
UnknownRunError,
|
|
44
44
|
VERSION_MANIFEST,
|
|
45
|
+
XERO_ORACLE_WORKING_STATUSES,
|
|
46
|
+
XERO_PAYMENT_CREATE_ACTION_TYPE,
|
|
45
47
|
XERO_TOOLKIT,
|
|
46
48
|
XERO_WORK_ITEMS_MAP_NAME,
|
|
47
49
|
XERO_WORK_TERMINAL_MAP_NAME,
|
|
@@ -257,8 +259,10 @@ import {
|
|
|
257
259
|
verifyCompletion,
|
|
258
260
|
writeActionState,
|
|
259
261
|
writeCompiledBlocksToFragment,
|
|
260
|
-
writeRunRecordAndReconcile
|
|
261
|
-
|
|
262
|
+
writeRunRecordAndReconcile,
|
|
263
|
+
xeroOracleActivityForBlock,
|
|
264
|
+
xeroOracleActivityForBlockForEditor
|
|
265
|
+
} from "../chunk-WGCOGBWG.js";
|
|
262
266
|
import {
|
|
263
267
|
computeCID,
|
|
264
268
|
computeJsonCID
|
|
@@ -671,6 +675,8 @@ export {
|
|
|
671
675
|
TerminalRunExecutionError,
|
|
672
676
|
UnknownRunError,
|
|
673
677
|
VERSION_MANIFEST,
|
|
678
|
+
XERO_ORACLE_WORKING_STATUSES,
|
|
679
|
+
XERO_PAYMENT_CREATE_ACTION_TYPE,
|
|
674
680
|
XERO_TOOLKIT,
|
|
675
681
|
XERO_WORK_ITEMS_MAP_NAME,
|
|
676
682
|
XERO_WORK_TERMINAL_MAP_NAME,
|
|
@@ -904,6 +910,8 @@ export {
|
|
|
904
910
|
verifyCompletion,
|
|
905
911
|
writeActionState,
|
|
906
912
|
writeCompiledBlocksToFragment,
|
|
907
|
-
writeRunRecordAndReconcile
|
|
913
|
+
writeRunRecordAndReconcile,
|
|
914
|
+
xeroOracleActivityForBlock,
|
|
915
|
+
xeroOracleActivityForBlockForEditor
|
|
908
916
|
};
|
|
909
917
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/templates/oracleInitFlow.ts"],"sourcesContent":["import type { FlowMetadata } from '../types/editor';\nimport type { FlowNode } from '../types/authorization';\n\n// ---------------------------------------------------------------------------\n// SurveyJS schema for the oracle configuration form\n// ---------------------------------------------------------------------------\n\nexport const oracleInitSurveySchema = {\n title: 'Oracle Configuration',\n description: 'Provide the details needed to initialise a new oracle on the IXO network.',\n logoPosition: 'right',\n pages: [\n {\n name: 'basicInfo',\n title: 'Basic Information',\n elements: [\n {\n type: 'text',\n name: 'projectName',\n title: 'Project Name',\n description: 'Used as the folder name — no spaces or special characters.',\n isRequired: true,\n validators: [\n {\n type: 'regex',\n text: 'Only lowercase letters, numbers, and hyphens are allowed (no spaces or special characters).',\n regex: '^[a-z0-9]+(-[a-z0-9]+)*$',\n },\n ],\n },\n {\n type: 'text',\n name: 'pin',\n title: 'PIN',\n description: 'A 6-digit PIN used to secure wallet operations.',\n isRequired: true,\n inputType: 'password',\n maxLength: 6,\n validators: [\n {\n type: 'regex',\n text: 'PIN must be exactly 6 digits.',\n regex: '^\\\\d{6}$',\n },\n ],\n },\n ],\n },\n {\n name: 'oracleDetails',\n title: 'Oracle Details',\n elements: [\n {\n type: 'text',\n name: 'oracleName',\n title: 'Oracle Name',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'orgName',\n title: 'Organisation Name',\n isRequired: true,\n },\n {\n type: 'comment',\n name: 'description',\n title: 'Description',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'location',\n title: 'Location',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'logoUrl',\n title: 'Logo URL',\n isRequired: true,\n inputType: 'url',\n validators: [{ type: 'url' }],\n },\n {\n type: 'text',\n name: 'coverImageUrl',\n title: 'Cover Image URL',\n isRequired: true,\n inputType: 'url',\n validators: [{ type: 'url' }],\n },\n ],\n },\n {\n name: 'serviceConfig',\n title: 'Service Configuration',\n elements: [\n {\n type: 'text',\n name: 'apiUrl',\n title: 'API URL',\n isRequired: true,\n inputType: 'url',\n defaultValue: 'http://localhost:4000',\n validators: [{ type: 'url' }],\n },\n {\n type: 'text',\n name: 'price',\n title: 'Price',\n description: 'Service price in IXO tokens (minimum 1).',\n isRequired: true,\n inputType: 'number',\n defaultValue: 100,\n validators: [\n {\n type: 'numeric',\n text: 'Price must be at least 1.',\n minValue: 1,\n },\n ],\n },\n {\n type: 'dropdown',\n name: 'llmModel',\n title: 'LLM Model',\n isRequired: true,\n choices: [\n { value: 'kimi-k2.5', text: 'Kimi K2.5' },\n { value: 'claude-sonnet', text: 'Claude Sonnet' },\n { value: 'gpt-4o', text: 'GPT-4o' },\n { value: 'gemini-2.5', text: 'Gemini 2.5' },\n { value: 'llama-4', text: 'Llama 4' },\n { value: 'custom', text: 'Custom' },\n ],\n },\n {\n type: 'comment',\n name: 'opening',\n title: 'Opening Message',\n description: 'The greeting or introduction the agent uses when starting a conversation.',\n isRequired: false,\n },\n {\n type: 'comment',\n name: 'communicationStyle',\n title: 'Communication Style',\n description: 'How the agent should communicate (e.g. formal, friendly, concise).',\n isRequired: false,\n },\n {\n type: 'comment',\n name: 'capabilities',\n title: 'What can the agent do?',\n description: 'Describe what this agent is capable of doing for users.',\n isRequired: false,\n },\n ],\n },\n ],\n};\n\n// ---------------------------------------------------------------------------\n// Template generator\n// ---------------------------------------------------------------------------\n\nexport function createOracleInitFlowTemplate(): {\n metadata: FlowMetadata;\n nodes: FlowNode[];\n} {\n const metadata: FlowMetadata = {\n '@context': 'https://schema.ixo.world/flow/v1',\n _type: 'flow/oracle-init',\n schema_version: '1.0.0',\n doc_id: '',\n title: 'Oracle Init Flow',\n createdAt: new Date().toISOString(),\n createdBy: '',\n flowOwnerDid: '',\n };\n\n const nodes: FlowNode[] = [\n // ------------------------------------------------------------------\n // [1] Form — collects all oracle configuration\n // ------------------------------------------------------------------\n {\n id: 'oracle-form',\n type: 'form',\n props: {\n title: 'Oracle Configuration',\n description: 'Enter the details for your new oracle.',\n icon: 'checklist',\n surveySchema: JSON.stringify(oracleInitSurveySchema),\n },\n },\n\n // ------------------------------------------------------------------\n // [2] Skills — skill/MCP configuration\n // ------------------------------------------------------------------\n {\n id: 'oracle-skills',\n type: 'skills',\n props: {\n title: 'Oracle Skills & MCP Servers',\n description: 'Configure skills and MCP servers for the oracle.',\n icon: 'tools',\n skills: '[]',\n entityDid: '',\n mcpServers: '[]',\n status: 'pending',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-form',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [3] Action — Generate & Fund Wallet\n // Generates a new wallet and funds it in one step.\n // ------------------------------------------------------------------\n {\n id: 'oracle-wallet',\n type: 'action',\n props: {\n title: 'Generate & Fund Wallet',\n description: 'Generate a new IXO wallet and fund it with tokens.',\n icon: 'bolt',\n actionType: 'qi/wallet.generateAndFund',\n inputs: JSON.stringify({}),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-skills',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [4] Action — Create Identity (IID + Matrix)\n // Creates the on-chain IID document, then registers the Matrix account.\n // ------------------------------------------------------------------\n {\n id: 'oracle-identity',\n type: 'action',\n props: {\n title: 'Create Identity',\n description: 'Create on-chain DID document and register Matrix account.',\n icon: 'bolt',\n actionType: 'qi/identity.create',\n inputs: JSON.stringify({\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n did: '{{oracle-wallet.output.did}}',\n address: '{{oracle-wallet.output.address}}',\n pubKey: '{{oracle-wallet.output.pubKey}}',\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-wallet',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [5] Action — Create Oracle Entity\n // On-chain entity creation with P-256 encryption key.\n // ------------------------------------------------------------------\n {\n id: 'oracle-entity-create',\n type: 'action',\n props: {\n title: 'Create Oracle Entity',\n description: 'Create the oracle entity on the IXO network.',\n icon: 'bolt',\n actionType: 'qi/entity.createOracle',\n inputs: JSON.stringify({\n // Wallet outputs\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n address: '{{oracle-wallet.output.address}}',\n did: '{{oracle-wallet.output.did}}',\n pubKey: '{{oracle-wallet.output.pubKey}}',\n // Matrix outputs (from identity block)\n matrixAccessToken: '{{oracle-identity.output.matrixAccessToken}}',\n matrixRoomId: '{{oracle-identity.output.matrixRoomId}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-identity',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [6] Action — Configure Oracle (contract + secrets + config)\n // Creates the user↔oracle DM room, encrypts secrets, stores config.\n // ------------------------------------------------------------------\n {\n id: 'oracle-configure',\n type: 'action',\n props: {\n title: 'Configure Oracle',\n description: 'Contract oracle, encrypt secrets, and store configuration.',\n icon: 'bolt',\n actionType: 'qi/oracle.configureOracle',\n inputs: JSON.stringify({\n // Contract input\n oracleEntityDid: '{{oracle-entity-create.output.entityDid}}',\n // Secrets routing (matrixRoomId comes from contract phase, not inputs)\n publicKeyMultibase: '{{oracle-entity-create.output.encryptionPublicKeyMultibase}}',\n verificationMethodId: '{{oracle-entity-create.output.encryptionVerificationMethodId}}',\n // Fresh mxLogin params\n matrixHomeServerUrl: '{{oracle-identity.output.matrixHomeServerUrl}}',\n matrixUsername: '{{oracle-identity.output.matrixUserId}}',\n // Sensitive plaintext values\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n matrixPassword: '{{oracle-identity.output.matrixPassword}}',\n matrixRecoveryPhrase: '{{oracle-identity.output.matrixRecoveryPhrase}}',\n // MCP auth secrets (already JWE-encrypted by skills block FlowDetail)\n mcpAuthSecrets: '{{oracle-skills.output.mcpAuthSecrets}}',\n // Skills outputs\n skills: '{{oracle-skills.output.skills}}',\n mcpServers: '{{oracle-skills.output.mcpServers}}',\n // Identifiers\n matrixUserId: '{{oracle-identity.output.matrixUserId}}',\n matrixAccountRoomId: '{{oracle-identity.output.matrixRoomId}}',\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n oracleAddress: '{{oracle-wallet.output.address}}',\n oracleDid: '{{oracle-wallet.output.did}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-entity-create',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [7] Action — Deploy Oracle (setup + start)\n // Clones repo, writes config, builds, then starts the process.\n // ------------------------------------------------------------------\n {\n id: 'oracle-deploy',\n type: 'action',\n props: {\n title: 'Deploy Oracle',\n description: 'Set up environment and start the oracle process.',\n icon: 'bolt',\n actionType: 'qi/oracle.deploy',\n inputs: JSON.stringify({\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n roomId: '{{oracle-configure.output.userOracleRoomId}}',\n skills: '{{oracle-skills.output.skills}}',\n mcpServers: '{{oracle-skills.output.mcpServers}}',\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n matrixPassword: '{{oracle-identity.output.matrixPassword}}',\n matrixRecoveryPhrase: '{{oracle-identity.output.matrixRecoveryPhrase}}',\n matrixUsername: '{{oracle-identity.output.matrixUserId}}',\n matrixAccountRoomId: '{{oracle-identity.output.matrixRoomId}}',\n freshAccessToken: '{{oracle-configure.output.freshAccessToken}}',\n openRouterApiKey: '{{oracle-configure.output.openRouterApiKeyPlaintext}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-configure',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [8] Secrets — display credentials and download\n // ------------------------------------------------------------------\n {\n id: 'oracle-secrets',\n type: 'secrets',\n props: {\n title: 'Oracle Credentials',\n description: 'Download your oracle credentials after setup is complete.',\n icon: 'key',\n downloadEndpoint: '',\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-deploy',\n requiredStatus: 'approved',\n },\n },\n ];\n\n return { metadata, nodes };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAAA,EACd,OAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU;AAAA,QACR;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,UACP,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,YAAY;AAAA,YACV;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,QACA;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,UACP,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,WAAW;AAAA,UACX,YAAY;AAAA,YACV;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,MAAM;AAAA,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AAAA;AAAA,UAElB,aAAa;AAAA,QACf,CAAC;AAAA,QACD,sBAAsB;AAAA,MACxB;AAAA,MACA,qBAAqB;AAAA,QACnB,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,QACL,OAAO;AAAA,QACP,aAAa;AAAA,QACb,MAAM;AAAA,QACN,kBAAkB;AAAA,QAClB,WAAW;AAAA,MACb;AAAA,MACA,qBAAqB;AAAA,QACnB,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,UAAU,MAAM;AAC3B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/core/templates/oracleInitFlow.ts"],"sourcesContent":["import type { FlowMetadata } from '../types/editor';\nimport type { FlowNode } from '../types/authorization';\n\n// ---------------------------------------------------------------------------\n// SurveyJS schema for the oracle configuration form\n// ---------------------------------------------------------------------------\n\nexport const oracleInitSurveySchema = {\n title: 'Oracle Configuration',\n description: 'Provide the details needed to initialise a new oracle on the IXO network.',\n logoPosition: 'right',\n pages: [\n {\n name: 'basicInfo',\n title: 'Basic Information',\n elements: [\n {\n type: 'text',\n name: 'projectName',\n title: 'Project Name',\n description: 'Used as the folder name — no spaces or special characters.',\n isRequired: true,\n validators: [\n {\n type: 'regex',\n text: 'Only lowercase letters, numbers, and hyphens are allowed (no spaces or special characters).',\n regex: '^[a-z0-9]+(-[a-z0-9]+)*$',\n },\n ],\n },\n {\n type: 'text',\n name: 'pin',\n title: 'PIN',\n description: 'A 6-digit PIN used to secure wallet operations.',\n isRequired: true,\n inputType: 'password',\n maxLength: 6,\n validators: [\n {\n type: 'regex',\n text: 'PIN must be exactly 6 digits.',\n regex: '^\\\\d{6}$',\n },\n ],\n },\n ],\n },\n {\n name: 'oracleDetails',\n title: 'Oracle Details',\n elements: [\n {\n type: 'text',\n name: 'oracleName',\n title: 'Oracle Name',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'orgName',\n title: 'Organisation Name',\n isRequired: true,\n },\n {\n type: 'comment',\n name: 'description',\n title: 'Description',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'location',\n title: 'Location',\n isRequired: true,\n },\n {\n type: 'text',\n name: 'logoUrl',\n title: 'Logo URL',\n isRequired: true,\n inputType: 'url',\n validators: [{ type: 'url' }],\n },\n {\n type: 'text',\n name: 'coverImageUrl',\n title: 'Cover Image URL',\n isRequired: true,\n inputType: 'url',\n validators: [{ type: 'url' }],\n },\n ],\n },\n {\n name: 'serviceConfig',\n title: 'Service Configuration',\n elements: [\n {\n type: 'text',\n name: 'apiUrl',\n title: 'API URL',\n isRequired: true,\n inputType: 'url',\n defaultValue: 'http://localhost:4000',\n validators: [{ type: 'url' }],\n },\n {\n type: 'text',\n name: 'price',\n title: 'Price',\n description: 'Service price in IXO tokens (minimum 1).',\n isRequired: true,\n inputType: 'number',\n defaultValue: 100,\n validators: [\n {\n type: 'numeric',\n text: 'Price must be at least 1.',\n minValue: 1,\n },\n ],\n },\n {\n type: 'dropdown',\n name: 'llmModel',\n title: 'LLM Model',\n isRequired: true,\n choices: [\n { value: 'kimi-k2.5', text: 'Kimi K2.5' },\n { value: 'claude-sonnet', text: 'Claude Sonnet' },\n { value: 'gpt-4o', text: 'GPT-4o' },\n { value: 'gemini-2.5', text: 'Gemini 2.5' },\n { value: 'llama-4', text: 'Llama 4' },\n { value: 'custom', text: 'Custom' },\n ],\n },\n {\n type: 'comment',\n name: 'opening',\n title: 'Opening Message',\n description: 'The greeting or introduction the agent uses when starting a conversation.',\n isRequired: false,\n },\n {\n type: 'comment',\n name: 'communicationStyle',\n title: 'Communication Style',\n description: 'How the agent should communicate (e.g. formal, friendly, concise).',\n isRequired: false,\n },\n {\n type: 'comment',\n name: 'capabilities',\n title: 'What can the agent do?',\n description: 'Describe what this agent is capable of doing for users.',\n isRequired: false,\n },\n ],\n },\n ],\n};\n\n// ---------------------------------------------------------------------------\n// Template generator\n// ---------------------------------------------------------------------------\n\nexport function createOracleInitFlowTemplate(): {\n metadata: FlowMetadata;\n nodes: FlowNode[];\n} {\n const metadata: FlowMetadata = {\n '@context': 'https://schema.ixo.world/flow/v1',\n _type: 'flow/oracle-init',\n schema_version: '1.0.0',\n doc_id: '',\n title: 'Oracle Init Flow',\n createdAt: new Date().toISOString(),\n createdBy: '',\n flowOwnerDid: '',\n };\n\n const nodes: FlowNode[] = [\n // ------------------------------------------------------------------\n // [1] Form — collects all oracle configuration\n // ------------------------------------------------------------------\n {\n id: 'oracle-form',\n type: 'form',\n props: {\n title: 'Oracle Configuration',\n description: 'Enter the details for your new oracle.',\n icon: 'checklist',\n surveySchema: JSON.stringify(oracleInitSurveySchema),\n },\n },\n\n // ------------------------------------------------------------------\n // [2] Skills — skill/MCP configuration\n // ------------------------------------------------------------------\n {\n id: 'oracle-skills',\n type: 'skills',\n props: {\n title: 'Oracle Skills & MCP Servers',\n description: 'Configure skills and MCP servers for the oracle.',\n icon: 'tools',\n skills: '[]',\n entityDid: '',\n mcpServers: '[]',\n status: 'pending',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-form',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [3] Action — Generate & Fund Wallet\n // Generates a new wallet and funds it in one step.\n // ------------------------------------------------------------------\n {\n id: 'oracle-wallet',\n type: 'action',\n props: {\n title: 'Generate & Fund Wallet',\n description: 'Generate a new IXO wallet and fund it with tokens.',\n icon: 'bolt',\n actionType: 'qi/wallet.generateAndFund',\n inputs: JSON.stringify({}),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-skills',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [4] Action — Create Identity (IID + Matrix)\n // Creates the on-chain IID document, then registers the Matrix account.\n // ------------------------------------------------------------------\n {\n id: 'oracle-identity',\n type: 'action',\n props: {\n title: 'Create Identity',\n description: 'Create on-chain DID document and register Matrix account.',\n icon: 'bolt',\n actionType: 'qi/identity.create',\n inputs: JSON.stringify({\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n did: '{{oracle-wallet.output.did}}',\n address: '{{oracle-wallet.output.address}}',\n pubKey: '{{oracle-wallet.output.pubKey}}',\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-wallet',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [5] Action — Create Oracle Entity\n // On-chain entity creation with P-256 encryption key.\n // ------------------------------------------------------------------\n {\n id: 'oracle-entity-create',\n type: 'action',\n props: {\n title: 'Create Oracle Entity',\n description: 'Create the oracle entity on the IXO network.',\n icon: 'bolt',\n actionType: 'qi/entity.createOracle',\n inputs: JSON.stringify({\n // Wallet outputs\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n address: '{{oracle-wallet.output.address}}',\n did: '{{oracle-wallet.output.did}}',\n pubKey: '{{oracle-wallet.output.pubKey}}',\n // Matrix outputs (from identity block)\n matrixAccessToken: '{{oracle-identity.output.matrixAccessToken}}',\n matrixRoomId: '{{oracle-identity.output.matrixRoomId}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-identity',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [6] Action — Configure Oracle (contract + secrets + config)\n // Creates the user↔oracle DM room, encrypts secrets, stores config.\n // ------------------------------------------------------------------\n {\n id: 'oracle-configure',\n type: 'action',\n props: {\n title: 'Configure Oracle',\n description: 'Contract oracle, encrypt secrets, and store configuration.',\n icon: 'bolt',\n actionType: 'qi/oracle.configureOracle',\n inputs: JSON.stringify({\n // Contract input\n oracleEntityDid: '{{oracle-entity-create.output.entityDid}}',\n // Secrets routing (matrixRoomId comes from contract phase, not inputs)\n publicKeyMultibase: '{{oracle-entity-create.output.encryptionPublicKeyMultibase}}',\n verificationMethodId: '{{oracle-entity-create.output.encryptionVerificationMethodId}}',\n // Fresh mxLogin params\n matrixHomeServerUrl: '{{oracle-identity.output.matrixHomeServerUrl}}',\n matrixUsername: '{{oracle-identity.output.matrixUserId}}',\n // Sensitive plaintext values\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n matrixPassword: '{{oracle-identity.output.matrixPassword}}',\n matrixRecoveryPhrase: '{{oracle-identity.output.matrixRecoveryPhrase}}',\n // MCP auth secrets (already JWE-encrypted by skills block FlowDetail)\n mcpAuthSecrets: '{{oracle-skills.output.mcpAuthSecrets}}',\n // Skills outputs\n skills: '{{oracle-skills.output.skills}}',\n mcpServers: '{{oracle-skills.output.mcpServers}}',\n // Identifiers\n matrixUserId: '{{oracle-identity.output.matrixUserId}}',\n matrixAccountRoomId: '{{oracle-identity.output.matrixRoomId}}',\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n oracleAddress: '{{oracle-wallet.output.address}}',\n oracleDid: '{{oracle-wallet.output.did}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-entity-create',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [7] Action — Deploy Oracle (setup + start)\n // Clones repo, writes config, builds, then starts the process.\n // ------------------------------------------------------------------\n {\n id: 'oracle-deploy',\n type: 'action',\n props: {\n title: 'Deploy Oracle',\n description: 'Set up environment and start the oracle process.',\n icon: 'bolt',\n actionType: 'qi/oracle.deploy',\n inputs: JSON.stringify({\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n roomId: '{{oracle-configure.output.userOracleRoomId}}',\n skills: '{{oracle-skills.output.skills}}',\n mcpServers: '{{oracle-skills.output.mcpServers}}',\n mnemonic: '{{oracle-wallet.output.mnemonic}}',\n matrixPassword: '{{oracle-identity.output.matrixPassword}}',\n matrixRecoveryPhrase: '{{oracle-identity.output.matrixRecoveryPhrase}}',\n matrixUsername: '{{oracle-identity.output.matrixUserId}}',\n matrixAccountRoomId: '{{oracle-identity.output.matrixRoomId}}',\n freshAccessToken: '{{oracle-configure.output.freshAccessToken}}',\n openRouterApiKey: '{{oracle-configure.output.openRouterApiKeyPlaintext}}',\n // Form outputs — whole blob, action parses & destructures\n formAnswers: '{{oracle-form.output.form.answers}}',\n }),\n requiresConfirmation: '',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-configure',\n requiredStatus: 'approved',\n },\n },\n\n // ------------------------------------------------------------------\n // [8] Secrets — display credentials and download\n // ------------------------------------------------------------------\n {\n id: 'oracle-secrets',\n type: 'secrets',\n props: {\n title: 'Oracle Credentials',\n description: 'Download your oracle credentials after setup is complete.',\n icon: 'key',\n downloadEndpoint: '',\n entityDid: '{{oracle-entity-create.output.entityDid}}',\n },\n activationCondition: {\n upstreamNodeId: 'oracle-deploy',\n requiredStatus: 'approved',\n },\n },\n ];\n\n return { metadata, nodes };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAAA,EACd,OAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU;AAAA,QACR;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,UACP,aAAa;AAAA,UACb,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MAClB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,QACL,OAAO;AAAA,QACP,aAAa;AAAA,QACb,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,QAAQ,KAAK,UAAU;AAAA,UACrB,WAAW;AAAA,UACX,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,UAAU;AAAA,UACV,gBAAgB;AAAA,UAChB,sBAAsB;AAAA,UACtB,gBAAgB;AAAA,UAChB,qBAAqB;AAAA,UACrB,kBAAkB;AAAA,UAClB,kBAAkB;AAAA;AAAA,UAElB,aAAa;AAAA,QACf,CAAC;AAAA,QACD,sBAAsB;AAAA,MACxB;AAAA,MACA,qBAAqB;AAAA,QACnB,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,QACL,OAAO;AAAA,QACP,aAAa;AAAA,QACb,MAAM;AAAA,QACN,kBAAkB;AAAA,QAClB,WAAW;AAAA,MACb;AAAA,MACA,qBAAqB;AAAA,QACnB,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,UAAU,MAAM;AAC3B;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
useCreateIxoEditor,
|
|
31
31
|
useTrackBlockFocus,
|
|
32
32
|
useTranslate
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XLGG4VDV.js";
|
|
34
34
|
import {
|
|
35
35
|
FLOW_PARTICIPANTS_MAP_KEY,
|
|
36
36
|
readFlowParticipants,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
setFlowParticipantPowerLevel,
|
|
39
39
|
setFlowParticipantRequirements,
|
|
40
40
|
upsertFlowParticipant
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ZGFQSAL7.js";
|
|
42
42
|
import {
|
|
43
43
|
FLOW_CONNECTIONS_MAP_KEY,
|
|
44
44
|
FLOW_CONNECTION_BINDINGS_MAP_KEY,
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
upsertFlowConnectionBinding,
|
|
88
88
|
validateAgentCommand,
|
|
89
89
|
validateFlowAgentLease
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-WGCOGBWG.js";
|
|
91
91
|
|
|
92
92
|
// src/index.ts
|
|
93
93
|
import { cloneDocument } from "@ixo/matrix-crdt";
|
package/dist/mantine/index.js
CHANGED
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
useRunSessionId,
|
|
87
87
|
useRunSessionPreview,
|
|
88
88
|
useTrackBlockFocus
|
|
89
|
-
} from "../chunk-
|
|
89
|
+
} from "../chunk-XLGG4VDV.js";
|
|
90
90
|
import {
|
|
91
91
|
DM_NOTIFICATIONS_MAP_KEY,
|
|
92
92
|
RUNS_MAP_KEY,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
sendDirectMessage,
|
|
99
99
|
setDMNotificationRecord,
|
|
100
100
|
shouldNotify
|
|
101
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-WGCOGBWG.js";
|
|
102
102
|
|
|
103
103
|
// src/mantine/components/DebugButton.tsx
|
|
104
104
|
import React, { useEffect, useRef, useState } from "react";
|