@ixo/editor 6.32.0 → 6.32.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.
@@ -1,15 +1,39 @@
1
- import { an as CompiledBlock, W as CompiledFlow, ao as CompiledEdge, af as FlowAgentCommand, ah as FlowAgentContext, ag as FlowAgentCommandResult, ai as FlowAgentExecutor, ak as FlowAgentNodeSnapshot, ap as FlowAgentBlockerCause, al as FlowAgentPublicNodeState, Q as FlowConnectionBinding } from '../store-CqvAkvIZ.js';
2
- export { aH as AcquireFlowAgentLeaseParams, as as ActionBlockLike, at as ActionExecutionCompletionState, aX as ActorConstraint, A as AuthorizationResult, U as BaseUcanFlow, au as BuildActionRunInputsParams, av as BuildActionRunInputsResult, ad as BuildFlowAgentContextParams, a_ as CompiledFlowNode, L as CompilerRegistry, aW as ConditionRef, aI as CreateAgentCommandParams, aJ as EvaluateFlowAgentPolicyParams, aw as ExecuteActionBlockParams, ax as ExecuteActionBlockResult, E as ExecuteNodeParams, d as ExecutionContext, c as ExecutionOutcome, G as FLOW_CONNECTIONS_MAP_KEY, H as FLOW_CONNECTION_BINDINGS_MAP_KEY, F as FLOW_PARTICIPANTS_MAP_KEY, ae as FlowAgentActor, aM as FlowAgentCommandBase, aN as FlowAgentCommandStatus, aO as FlowAgentCommandType, aj as FlowAgentLease, aP as FlowAgentLedgerEvent, aQ as FlowAgentLedgerEventType, aR as FlowAgentMaps, aK as FlowAgentOrchestratorOptions, aS as FlowAgentPolicyDecision, aT as FlowAgentRunPhase, Y as FlowAgentService, aL as FlowAgentServiceOptions, am as FlowAgentTickResult, V as FlowCapability, P as FlowConnection, T as FlowConnectionRequirementKey, O as FlowParticipant, X as FlowStrategy, M as MergeResult, N as NodeActionResult, R as ReadFlowOptions, J as ReadFlowResult, aZ as RuntimeRef, S as SetupFlowOptions, I as SetupFlowResult, aY as TTLConstraint, aV as TriggerResolutionContext, a$ as TriggerSpec, Z as acquireFlowAgentLease, _ as appendAgentLedgerEvent, aq as buildActionRunInputs, a as buildAuthzFromProps, $ as buildFlowAgentContext, b as buildFlowNodeFromBlock, ay as canMatches, a0 as cleanupExpiredFlowAgentLeases, k as compileBaseUcanFlow, az as computeAgentCommandId, a1 as createAgentCommand, n as decompileToBaseUcanFlow, a2 as evaluateFlowAgentPolicy, ar as executeActionBlock, e as executeNode, a3 as executeQueuedAgentCommands, j as getActiveEditor, a4 as getFlowAgentMaps, i as isAuthorized, aA as isCapabilityMatch, aB as isExternalMutation, b0 as isRuntimeRef, m as mergeCompiledFlows, a5 as planRalphLoopCommands, a6 as queueAgentCommand, aC as readAgentCommands, a7 as readAgentLedgerEvents, l as readCompiledFlowFromYDoc, g as readFlow, aD as readFlowAgentLeases, r as readFlowAsBaseUcan, B as readFlowConnectionBindings, v as readFlowConnections, f as readFlowFromEditor, o as readFlowParticipants, a8 as readQueuedAgentCommands, a9 as releaseFlowAgentLease, x as removeFlowConnection, D as removeFlowConnectionBinding, p as removeFlowParticipant, aE as requiredCapabilityForCommand, aU as resolveRuntimeRefs, aF as resourceMatches, h as setActiveEditor, y as setFlowConnectionOptional, z as setFlowConnectionRequires, q as setFlowParticipantPowerLevel, t as setFlowParticipantRequirements, s as setupFlowFromBaseUcan, aa as tickFlowAgent, aG as updateAgentCommand, w as upsertFlowConnection, C as upsertFlowConnectionBinding, u as upsertFlowParticipant, ab as validateAgentCommand, ac as validateFlowAgentLease } from '../store-CqvAkvIZ.js';
3
- import { af as ActionDefinition, ap as ActionDoneContract, aq as ActionEventDefinition, ar as OutputSchemaField, ab as ActionServices, ag as FlowNodeRuntimeState, ad as RunEventAppender, as as RunEventInput, F as FlowRuntimeStateManager, at as RunJsonValue, au as ActionRunContext, av as CompletionCheck, k as StoredInvocation, aa as PendingInvocation, aw as ActionReadBackMetadata, a9 as IxoEditorType, ax as ReadBackTerminalState, ae as ActionResult, ay as ActionProofDeclaration, az as RunRecordDetails, g as UcanService, ac as ActionHandlers, U as UcanDelegationStore, S as StoredDelegation, I as InvocationStore, aA as FlowMetadata, a6 as FlowNode } from '../index-Up8gA_E9.js';
4
- export { bV as ActionContext, bD as ActionRunEventInput, bZ as BidService, bB as CancelRunParams, c4 as CarbonService, co as ClaimCollectionURI, b_ as ClaimService, bC as CloseRunParams, b$ as CollectionService, c0 as CollectionUsersService, cy as CreateDelegationParams, cz as CreateInvocationParams, cx as CreateRootDelegationParams, cn as DID, D as DelegationChainValidationResult, l as DelegationGrant, bX as EmailService, c5 as EntityService, c6 as EvalRegisterService, a8 as EvaluationStatus, cv as ExecutionWithInvocationResult, ba as ExplicitRunRequiredError, cm as FailedListenerRun, cw as FindProofsResult, bE as FinishRunResult, a7 as FlowNodeAuthzExtension, cs as FlowNodeBase, bx as FlowNotMigratedError, c8 as FlowRunLifecycleService, bW as HttpService, c2 as IntegrationsService, ct as InvocationRequest, cu as InvocationResult, aD as LEGACY_RUN_STORAGE_VERSION, bH as LifecycleRunEventInput, cp as LinkedClaim, aE as MULTI_RUN_STORAGE_VERSION, c1 as MatrixCredentialService, bF as MigrateFlowParams, bG as MigrateFlowResult, be as MultiRunMigrationResult, cq as NodeServiceReport, cr as NodeState, bY as NotifyService, c3 as OracleService, aF as RUNS_TERMINAL_MAP_KEY, cl as RUN_RECORD_AUDIT_TYPE, aG as RUN_STORAGE_VERSION_KEY, c7 as RubricService, bI as RunDefinitionBlock, bJ as RunDefinitionDrift, bK as RunDefinitionSnapshot, bL as RunJsonObject, bN as RunLifecycleAuthorizationDecision, by as RunLifecycleAuthorizationError, bO as RunLifecycleAuthorizationRequest, bP as RunLifecycleAuthorizer, bQ as RunLifecycleCapability, bM as RunLogEventInput, bR as RunManifest, bd as RunMeta, bz as RunNotMigratedError, bA as RunNotReadyError, bS as RunSnapshot, bf as RunStorageVersion, bg as RunTerminalRecord, bT as StartRunParams, bU as StartRunResult, bb as TerminalRunExecutionError, j as UcanCapability, h as UcanServiceConfig, i as UcanServiceHandlers, bc as UnknownRunError, aH as adoptLegacyRuntime, c9 as appendRunRecord, a$ as assertRunActionExecutionAllowed, bh as buildRunDefinitionSnapshot, bi as cancelRun, aI as clearAllActionState, aC as clearRuntimeForTemplateClone, bj as closeRun, aJ as collectPhantomLegacyRun, ck as computePendingInvocationId, bk as computeRunDefinitionHash, bl as computeRunSummary, cc as countPendingInvocations, d as createInvocationStore, e as createMemoryInvocationStore, b as createMemoryUcanDelegationStore, bm as createRunId, aK as createRunRuntimeReader, aL as createRunRuntimeReaderWithDoc, aM as createRunScopedRuntimeManager, bn as createRunUlid, c as createRuntimeStateManager, a as createUcanDelegationStore, f as createUcanService, aB as createYDocRuntimeManager, aN as deleteActionState, bo as detectRunDefinitionDrift, aO as enableMultiRunStorage, aP as ensureRun, ch as findFailedListenersForSourceRun, cd as getOrCreateBlockPendingMap, cb as getPendingInvocationsMap, aQ as getRunActionsMap, aR as getRunMeta, aU as getRunStorageVersion, aS as getRunsMap, aT as getRunsTerminalMap, aV as hasLegacyRuntimeHistory, b0 as isBelowTheLineBlock, aW as isLegacyRuntimeAdoptionEnabled, aX as isRecordInRun, bp as listOpenRuns, bq as listRuns, br as migrateFlowToSessions, cf as queuePendingInvocation, aY as readActionState, aZ as readActionStates, ce as readPendingInvocations, bs as readRunActionStates, ca as readRunRecords, bt as recordRunDefinitionDrift, cg as removePendingInvocation, ci as replayFailedListenerRun, a_ as resetActionState, b1 as resolveActiveRunId, b2 as resolveRecordRunId, b3 as resolveRunIdForExecution, b4 as resolveRunIdForRead, b5 as seedRunFromLegacyRuntime, bu as setAdvisoryActiveRunId, b6 as setMultiRunStorage, cj as snapshotInputRefs, bv as startRun, b7 as subscribeToActionState, bw as toRunJsonValue, b8 as usesLegacyRuntimeCompatibility, b9 as writeActionState } from '../index-Up8gA_E9.js';
1
+ import { k as FlowAgentExecutor, h as FlowAgentCommand, j as FlowAgentContext, i as FlowAgentCommandResult, an as FlowAgentBlockerCause, n as FlowAgentPublicNodeState, m as FlowAgentNodeSnapshot, ao as CompiledBlock, C as CompiledFlow, ap as CompiledEdge, s as FlowConnectionBinding } from '../connections-1NtNQrsY.js';
2
+ export { aq as AcquireFlowAgentLeaseParams, ar as ActionBlockLike, as as ActionExecutionCompletionState, at as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, au as BuildActionRunInputsParams, av as BuildActionRunInputsResult, a as BuildFlowAgentContextParams, aw as CompiledFlowNode, b as CompilerRegistry, ax as ConditionRef, ay as CreateAgentCommandParams, az as EvaluateFlowAgentPolicyParams, aA as ExecuteActionBlockParams, aB as ExecuteActionBlockResult, E as ExecuteNodeParams, c as ExecutionContext, d as ExecutionOutcome, F as FLOW_CONNECTIONS_MAP_KEY, e as FLOW_CONNECTION_BINDINGS_MAP_KEY, f as FLOW_PARTICIPANTS_MAP_KEY, g as FlowAgentActor, aC as FlowAgentCommandBase, aD as FlowAgentCommandStatus, aE as FlowAgentCommandType, l as FlowAgentLease, aF as FlowAgentLedgerEvent, aG as FlowAgentLedgerEventType, aH as FlowAgentMaps, aI as FlowAgentOrchestratorOptions, aJ as FlowAgentPolicyDecision, aK as FlowAgentRunPhase, o as FlowAgentService, aL as FlowAgentServiceOptions, p as FlowAgentTickResult, q as FlowCapability, r as FlowConnection, t as FlowConnectionRequirementKey, u as FlowParticipant, v as FlowStrategy, M as MergeResult, N as NodeActionResult, R as ReadFlowOptions, w as ReadFlowResult, aM as RuntimeRef, S as SetupFlowOptions, y as SetupFlowResult, aN as TTLConstraint, aO as TriggerResolutionContext, aP as TriggerSpec, z as acquireFlowAgentLease, D as appendAgentLedgerEvent, aQ as buildActionRunInputs, G as buildAuthzFromProps, H as buildFlowAgentContext, I as buildFlowNodeFromBlock, aR as canMatches, J as cleanupExpiredFlowAgentLeases, K as compileBaseUcanFlow, aS as computeAgentCommandId, L as createAgentCommand, O as decompileToBaseUcanFlow, P as evaluateFlowAgentPolicy, aT as executeActionBlock, Q as executeNode, T as executeQueuedAgentCommands, U as getActiveEditor, V as getFlowAgentMaps, W as isAuthorized, aU as isCapabilityMatch, aV as isExternalMutation, aW as isRuntimeRef, X as mergeCompiledFlows, Y as planRalphLoopCommands, Z as queueAgentCommand, aX as readAgentCommands, _ as readAgentLedgerEvents, $ as readCompiledFlowFromYDoc, a0 as readFlow, aY as readFlowAgentLeases, a1 as readFlowAsBaseUcan, a2 as readFlowConnectionBindings, a3 as readFlowConnections, a4 as readFlowFromEditor, a5 as readFlowParticipants, a6 as readQueuedAgentCommands, a7 as releaseFlowAgentLease, a8 as removeFlowConnection, a9 as removeFlowConnectionBinding, aa as removeFlowParticipant, aZ as requiredCapabilityForCommand, a_ as resolveRuntimeRefs, a$ as resourceMatches, ab as setActiveEditor, ac as setFlowConnectionOptional, ad as setFlowConnectionRequires, ae as setFlowParticipantPowerLevel, af as setFlowParticipantRequirements, ag as setupFlowFromBaseUcan, ah as tickFlowAgent, b0 as updateAgentCommand, ai as upsertFlowConnection, aj as upsertFlowConnectionBinding, ak as upsertFlowParticipant, al as validateAgentCommand, am as validateFlowAgentLease } from '../connections-1NtNQrsY.js';
3
+ import { au as TopicSemanticRecordDefinition, av as TopicActionMetadata, aw as ActionEventDefinition, ax as ActionDoneContract, aj as ActionDefinition, ay as OutputSchemaField, az as ActionRiskTier, aA as ActionSchedulingContract, ab as ActionServices, aB as TopicActionInvocationV1, aC as TopicActionReceiptV2, aD as TopicActionRecord, aE as TopicActionRuntimeProvider, af as TopicActionBridge, ah as TopicActionWriteBackResult, ai as FlowNodeRuntimeState, aF as RunEventInput, ad as RunEventAppender, F as FlowRuntimeStateManager, aG as RunJsonValue, aH as ActionRunContext, aI as CompletionCheck, w as StoredInvocation, aJ as ReadBackTerminalState, ag as ActionResult, aK as ActionReadBackMetadata, a9 as IxoEditorType, aa as PendingInvocation, aL as ActionProofDeclaration, aM as RunRecordDetails, G as UcanService, ac as ActionHandlers, z as UcanDelegationStore, v as StoredDelegation, g as InvocationStore, aN as FlowMetadata, a7 as FlowNode } from '../runtime-BFwvCQDF.js';
4
+ export { aO as ActionContext, aP as ActionRunEventInput, aQ as AgentRuntimeService, aR as BidService, aS as CancelRunParams, aT as CarbonService, aU as ClaimCollectionURI, aV as ClaimService, aW as CloseRunParams, aX as CollectionService, aY as CollectionUsersService, aZ as CreateDelegationParams, a_ as CreateInvocationParams, a$ as CreateRootDelegationParams, b0 as DID, D as DelegationChainValidationResult, e as DelegationGrant, b1 as EmailService, b2 as EntityService, b3 as EvalRegisterService, b4 as EvaluationRuntimeService, a8 as EvaluationStatus, b5 as EvidenceService, b6 as ExecutionWithInvocationResult, b7 as ExplicitRunRequiredError, b8 as FailedListenerRun, b9 as FindProofsResult, ba as FinishRunResult, a6 as FlowNodeAuthzExtension, bb as FlowNodeBase, bc as FlowNotMigratedError, bd as FlowRunLifecycleService, be as HttpService, bf as InMemoryTopicActionOutboxStore, bg as IncidentService, bh as IntegrationsService, bi as InvocationRequest, bj as InvocationResult, bk as LEGACY_RUN_STORAGE_VERSION, bl as LifecycleRunEventInput, bm as LinkedClaim, bn as MULTI_RUN_STORAGE_VERSION, bo as MatrixCredentialService, bp as MigrateFlowParams, bq as MigrateFlowResult, br as MultiRunMigrationResult, bs as NodeServiceReport, bt as NodeState, bu as NotifyService, bv as OracleService, bw as RUNS_TERMINAL_MAP_KEY, bx as RUN_RECORD_AUDIT_TYPE, by as RUN_STORAGE_VERSION_KEY, bz as RecordFlowActionPhaseParams, bA as RubricService, bB as RunDefinitionBlock, bC as RunDefinitionDrift, bD as RunDefinitionSnapshot, bE as RunJsonObject, bF as RunLifecycleAuthorizationDecision, bG as RunLifecycleAuthorizationError, bH as RunLifecycleAuthorizationRequest, bI as RunLifecycleAuthorizer, bJ as RunLifecycleCapability, bK as RunLogEventInput, bL as RunManifest, bM as RunMeta, bN as RunNotMigratedError, bO as RunNotReadyError, bP as RunSnapshot, bQ as RunStorageVersion, bR as RunTerminalRecord, bS as SettlementService, bT as StartRunParams, bU as StartRunResult, bV as TerminalRunExecutionError, bW as TopicActionOutboxEntry, bX as TopicActionOutboxStore, bY as TopicActionReceiptSigner, bZ as TopicActionReceiptSink, b_ as TopicActionReceiptStatus, b$ as TopicActionReceiptVerifier, c0 as TopicActionTerminalStatus, c1 as TopicActionThreadUpdateV1, c2 as TopicActionWriteBackState, ae as TopicExecutionContext, c3 as TopicOperationAppendResult, c4 as TopicRevisionConflictError, c5 as TopicService, U as UcanCapability, H as UcanServiceConfig, J as UcanServiceHandlers, c6 as UnknownRunError, c7 as UnsignedTopicActionReceiptV2, c8 as YjsTopicActionOutboxStore, c9 as adoptLegacyRuntime, ca as appendRunRecord, cb as assertRunActionExecutionAllowed, cc as buildRunDefinitionSnapshot, cd as buildTopicActionThreadUpdate, ce as cancelRun, cf as clearAllActionState, cg as clearRuntimeForTemplateClone, ch as closeRun, ci as collectPhantomLegacyRun, cj as computePendingInvocationId, ck as computeRunDefinitionHash, cl as computeRunSummary, cm as countPendingInvocations, Y as createInvocationStore, Z as createMemoryInvocationStore, _ as createMemoryUcanDelegationStore, cn as createRunId, co as createRunRuntimeReader, cp as createRunRuntimeReaderWithDoc, cq as createRunScopedRuntimeManager, cr as createRunUlid, $ as createRuntimeStateManager, a0 as createUcanDelegationStore, a1 as createUcanService, cs as createYDocRuntimeManager, ct as deleteActionState, cu as detectRunDefinitionDrift, cv as enableMultiRunStorage, cw as ensureRun, cx as findFailedListenersForSourceRun, cy as getOrCreateBlockPendingMap, cz as getPendingInvocationsMap, cA as getRunActionsMap, cB as getRunMeta, cC as getRunStorageVersion, cD as getRunsMap, cE as getRunsTerminalMap, cF as hasLegacyRuntimeHistory, cG as isBelowTheLineBlock, cH as isLegacyRuntimeAdoptionEnabled, cI as isRecordInRun, cJ as listOpenRuns, cK as listRuns, cL as migrateFlowToSessions, cM as queuePendingInvocation, cN as readActionState, cO as readActionStates, cP as readPendingInvocations, cQ as readRunActionStates, cR as readRunRecords, cS as recordRunDefinitionDrift, cT as removePendingInvocation, cU as replayFailedListenerRun, cV as resetActionState, cW as resolveActiveRunId, cX as resolveRecordRunId, cY as resolveRunIdForExecution, cZ as resolveRunIdForRead, c_ as seedRunFromLegacyRuntime, c$ as setAdvisoryActiveRunId, d0 as setMultiRunStorage, d1 as snapshotInputRefs, d2 as startRun, d3 as subscribeToActionState, d4 as toRunJsonValue, d5 as topicActionReceiptSigningPayload, d6 as topicActionThreadUpdateBody, d7 as topicActionThreadUpdateId, d8 as topicActionThreadUpdateTransactionId, d9 as topicSemanticRecordsDigest, da as usesLegacyRuntimeCompatibility, db as writeActionState } from '../runtime-BFwvCQDF.js';
5
5
  import * as Y from 'yjs';
6
- import { Doc, Map } from 'yjs';
7
- export { b as NODE_CONTEXT_MAP_NAME, c as NODE_CONTEXT_OVERRIDES_MAP_NAME, a as NodeContextFieldProvenance, N as NodeContextRecord, i as isNodeContextRecord } from '../nodeContext-C-BsYuYi.js';
6
+ import { Map, Doc } from 'yjs';
7
+ import { ErrorObject } from 'ajv/dist/2020.js';
8
+ export { a as NODE_CONTEXT_MAP_NAME, b as NODE_CONTEXT_OVERRIDES_MAP_NAME, c as NodeContextFieldProvenance, N as NodeContextRecord, i as isNodeContextRecord } from '../nodeContext-CV9D4s3X.js';
8
9
  import 'matrix-js-sdk';
9
10
  import '@blocknote/core';
10
11
  import 'react';
11
12
  import '@ixo/ucan';
12
13
 
14
+ /** Keep the complete record batch comfortably below Matrix's event-size ceiling. */
15
+ declare const MAX_TOPIC_SEMANTIC_RECORDS_PER_RECEIPT = 25;
16
+ declare const MAX_TOPIC_SEMANTIC_RECORD_BATCH_BYTES: number;
17
+ type TopicSemanticRecordValidationResult = {
18
+ valid: true;
19
+ definition: TopicSemanticRecordDefinition;
20
+ } | {
21
+ valid: false;
22
+ code: string;
23
+ errors?: ErrorObject[];
24
+ };
25
+ type TopicSemanticRecordBatchValidationResult = {
26
+ valid: true;
27
+ } | {
28
+ valid: false;
29
+ code: string;
30
+ errors?: ErrorObject[];
31
+ };
32
+ /** Validate the complete safe envelope and its declared value contract. */
33
+ declare function validateTopicSemanticRecord(record: unknown, topic: TopicActionMetadata): TopicSemanticRecordValidationResult;
34
+ /** Validate every record and the bounded, JSON-portable batch written to Matrix. */
35
+ declare function validateTopicSemanticRecordBatch(records: readonly unknown[], topic: TopicActionMetadata): TopicSemanticRecordBatchValidationResult;
36
+
13
37
  /** Stable name of the universal completion event every step emits. */
14
38
  declare const STEP_COMPLETED_EVENT_NAME = "step.completed";
15
39
  /**
@@ -59,7 +83,8 @@ interface CapabilityPatternCoversCanOptions {
59
83
  }
60
84
  /** Return true when a capability pattern grants the requested `can` ability. */
61
85
  declare function capabilityPatternCoversCan(pattern: string, can: string, options?: CapabilityPatternCoversCanOptions): boolean;
62
- declare function registerAction<TInputs extends Record<string, any> = Record<string, any>>(definition: ActionDefinition<TInputs>): void;
86
+ type ActionRegistrationDefinition<TInputs extends Record<string, any>> = Omit<ActionDefinition<TInputs>, 'displayName' | 'description'> & Partial<Pick<ActionDefinition<TInputs>, 'displayName' | 'description'>>;
87
+ declare function registerAction<TInputs extends Record<string, any> = Record<string, any>>(definition: ActionRegistrationDefinition<TInputs>): void;
63
88
  declare function getAction(type: string): ActionDefinition | undefined;
64
89
  declare function getAllActions(): ActionDefinition[];
65
90
  /** All (alias → canonical type) pairs, for manifest generation and consistency checks. */
@@ -88,11 +113,9 @@ declare function getEventsForBlock(action: ActionDefinition | undefined, inputs:
88
113
  */
89
114
  declare function getOutputSchemaForBlock(action: ActionDefinition | undefined, inputs: unknown): OutputSchemaField[];
90
115
 
91
- /**
92
- * Serializable proof declaration: custom `validate` functions can't cross a
93
- * JSON boundary, so they are represented as `{ kind: 'custom' }` — consumers
94
- * know a proof exists and is enforced kernel-side, without its logic.
95
- */
116
+ declare const ACTION_MANIFEST_VERSION: "4";
117
+ declare const ACTION_REGISTRY_VERSION: "6.32.0-topic-actions.3";
118
+ /** Serializable declaration; custom functions remain kernel-enforced. */
96
119
  type ManifestProofDeclaration = {
97
120
  kind: 'none';
98
121
  } | {
@@ -102,61 +125,375 @@ type ManifestProofDeclaration = {
102
125
  kind: 'custom';
103
126
  };
104
127
  interface ManifestDoneDeclaration {
105
- /**
106
- * `default` = one of the two shared standard contracts — a one-shot action
107
- * is Done when its run reached `completed`, a repeatable one never latches
108
- * (read `cardinality` to tell which applies). `custom` = the action defines
109
- * its own predicate, which (like a custom proof) can't cross the JSON
110
- * boundary; ask for an external check or run in-process to evaluate it.
111
- */
112
128
  kind: 'default' | 'custom';
113
- /** Whether an external actor can request a side-effect-free truth check. */
114
129
  hasExternalCheck: boolean;
115
130
  cardinality: 'once' | 'many';
116
131
  }
117
132
  interface ActionManifestEntry {
118
133
  type: string;
119
- /** Legacy names that resolve to this canonical type. */
134
+ displayName: string;
135
+ description: string;
120
136
  aliases: string[];
121
- can?: string;
137
+ contractDigest: `sha256:${string}`;
138
+ can: string;
139
+ effectiveCapability: {
140
+ action: string;
141
+ flowExecution?: string;
142
+ topicWriteBack: string[];
143
+ };
122
144
  sideEffect: boolean;
123
145
  defaultRequiresConfirmation: boolean;
124
- requiredCapability?: string;
146
+ executionOwner: 'agent' | 'human';
147
+ riskTier: ActionRiskTier;
148
+ requiredServices: string[];
149
+ sensitiveInputPaths: string[];
150
+ sensitiveOutputPaths: string[];
151
+ hidden: boolean;
152
+ deprecated: boolean;
153
+ supersededBy?: string;
125
154
  proof: ManifestProofDeclaration;
126
155
  done: ManifestDoneDeclaration;
127
- /** JSON Schema for the action's inputs, when declared. */
128
- inputSchema?: object;
129
- /** Static output schema. Actions with dynamic schemas also set hasDynamicOutputSchema. */
130
- outputSchema?: OutputSchemaField[];
131
- /** Static event vocabulary. Actions with dynamic events also set hasDynamicEvents. */
132
- events?: Array<Pick<ActionEventDefinition, 'name' | 'displayName' | 'description' | 'payloadSchema'>>;
156
+ inputSchema: object;
157
+ outputSchema: OutputSchemaField[];
158
+ events: Array<Pick<ActionEventDefinition, 'name' | 'displayName' | 'description' | 'payloadSchema'>>;
133
159
  hasDynamicEvents: boolean;
134
160
  hasDynamicOutputSchema: boolean;
135
161
  eligibleForEventTrigger: boolean;
136
- /**
137
- * True when the action defines `getMissingInputs` — conditional requiredness
138
- * that `inputSchema.required` cannot express (like a custom proof, the
139
- * function itself can't cross the JSON boundary). Out-of-process consumers
140
- * should treat the schema's `required` as a lower bound for such actions;
141
- * in-process consumers get the full logic via `getMissingActionInputs`.
142
- */
162
+ /** Whether a time trigger may target this action (Sovereign Scheduling, IXO-4433). */
163
+ eligibleForTimeTrigger: boolean;
164
+ /** Present exactly when eligibleForTimeTrigger is true: the Timed Action contract. */
165
+ scheduling?: ActionSchedulingContract;
143
166
  hasCustomInputValidation: boolean;
167
+ topic: TopicActionMetadata;
144
168
  }
145
169
  interface ActionManifest {
146
- /** Schema version of the manifest format itself. */
147
- manifestVersion: '1';
170
+ manifestVersion: typeof ACTION_MANIFEST_VERSION;
171
+ registryVersion: string;
172
+ manifestDigest: `sha256:${string}`;
148
173
  actions: ActionManifestEntry[];
149
174
  }
150
175
  /**
151
- * Generate the machine-readable action contract from the live registry.
176
+ * Generate deterministic Action Manifest v4 from the one live registry.
177
+ *
178
+ * Memoized against the registry revision: building the manifest canonicalizes and
179
+ * SHA-256s every registered contract, and the validation paths (flow bindings,
180
+ * Action requests, receipts, external invocations) call this on every check —
181
+ * several of them from React render. The registry only changes when an Action
182
+ * registers, which bumps the revision and invalidates this.
152
183
  *
153
- * This is the single artifact external actors (the flow-manager oracle,
154
- * third-party agentic Oracle actors) implement against, replacing
155
- * hand-maintained copies of input contracts. It is emitted to
156
- * `dist/action-manifest.json` at build time and also callable at runtime
157
- * from `@ixo/editor/core`.
184
+ * The returned manifest is shared, so callers must treat it as read-only.
158
185
  */
159
186
  declare function generateActionManifest(): ActionManifest;
187
+ interface ActionManifestIssue {
188
+ actionType: string;
189
+ code: 'MISSING_CAN' | 'MISSING_PRESENTATION' | 'MISSING_INPUT_SCHEMA' | 'MISSING_OUTPUT_SCHEMA' | 'SIDE_EFFECT_WITHOUT_PROOF' | 'MISSING_TOPIC_POLICY' | 'INVALID_TOPIC_POLICY' | 'INVALID_SEMANTIC_RECORD_DEFINITION';
190
+ message: string;
191
+ }
192
+ /** CI/build gate for the public portable registry contract. */
193
+ declare function actionManifestIssues(manifest?: ActionManifest): ActionManifestIssue[];
194
+
195
+ declare function sha256Digest(value: unknown): `sha256:${string}`;
196
+
197
+ /** JSON values accepted by the Manifest v2 portable contract. */
198
+ type ManifestV2JsonValue = null | boolean | number | string | ManifestV2JsonValue[] | {
199
+ [key: string]: ManifestV2JsonValue;
200
+ };
201
+ interface ActionManifestV2Package {
202
+ name: string;
203
+ version: string;
204
+ sourceCommit: string;
205
+ buildId?: string;
206
+ distributionUrl?: string;
207
+ }
208
+ interface ActionManifestV2Issuer {
209
+ did: string;
210
+ verificationMethod: string;
211
+ }
212
+ interface ActionManifestV2Compatibility {
213
+ engine: {
214
+ versionRange: string;
215
+ };
216
+ flowSchemaVersions: string[];
217
+ features: string[];
218
+ }
219
+ /**
220
+ * The complete action and primitive groups are introduced by the registry
221
+ * migration. Keeping their extension fields JSON-only prevents executable
222
+ * functions or class instances from crossing this portable boundary.
223
+ */
224
+ type ActionManifestV2Action = {
225
+ type: string;
226
+ contractVersion: string;
227
+ aliases?: string[];
228
+ } & Record<string, ManifestV2JsonValue>;
229
+ type ActionManifestV2Primitive = {
230
+ type: string;
231
+ contractVersion: string;
232
+ aliases?: string[];
233
+ } & Record<string, ManifestV2JsonValue>;
234
+ /** The unsigned, portable portion of an Action Manifest v2 envelope. */
235
+ interface ActionManifestV2Payload {
236
+ manifestVersion: '2.0';
237
+ manifestId: string;
238
+ generatedAt: string;
239
+ package: ActionManifestV2Package;
240
+ issuer: ActionManifestV2Issuer;
241
+ compatibility: ActionManifestV2Compatibility;
242
+ actions: ActionManifestV2Action[];
243
+ primitives: ActionManifestV2Primitive[];
244
+ }
245
+ interface ActionManifestV2Integrity {
246
+ canonicalization: 'RFC8785';
247
+ digest: {
248
+ algorithm: 'SHA-256';
249
+ value: `sha256:${string}`;
250
+ };
251
+ signature: {
252
+ algorithm: string;
253
+ verificationMethod: string;
254
+ value: string;
255
+ };
256
+ }
257
+ type SignedActionManifestV2 = ActionManifestV2Payload & {
258
+ integrity: ActionManifestV2Integrity;
259
+ };
260
+ declare const verifiedActionManifestV2: unique symbol;
261
+ type DeepReadonly<T> = T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
262
+ readonly [Key in keyof T]: DeepReadonly<T[Key]>;
263
+ } : T;
264
+ /** A manifest that crossed the trust-policy boundary successfully. */
265
+ type VerifiedActionManifestV2 = DeepReadonly<SignedActionManifestV2> & {
266
+ readonly [verifiedActionManifestV2]: true;
267
+ };
268
+ interface ActionManifestV2Signer {
269
+ issuerDid: string;
270
+ verificationMethod: string;
271
+ algorithm: string;
272
+ sign(data: Uint8Array): Promise<string>;
273
+ }
274
+ interface ActionManifestV2SignatureVerificationInput {
275
+ issuerDid: string;
276
+ verificationMethod: string;
277
+ algorithm: string;
278
+ data: Uint8Array;
279
+ signature: string;
280
+ }
281
+ interface ActionManifestV2TrustPolicy {
282
+ trustedIssuerDids: readonly string[];
283
+ revokedIssuerDids?: readonly string[];
284
+ allowedSignatureAlgorithms: readonly string[];
285
+ verifySignature(input: ActionManifestV2SignatureVerificationInput): Promise<boolean>;
286
+ }
287
+ type ActionManifestV2VerificationErrorCode = 'INVALID_MANIFEST' | 'UNSUPPORTED_MANIFEST_VERSION' | 'UNSIGNED_MANIFEST' | 'SIGNER_MISMATCH' | 'DUPLICATE_CONTRACT_TYPE' | 'AMBIGUOUS_ALIAS' | 'UNSORTED_CONTRACTS' | 'UNTRUSTED_ISSUER' | 'REVOKED_ISSUER' | 'VERIFICATION_METHOD_MISMATCH' | 'DISALLOWED_SIGNATURE_ALGORITHM' | 'DIGEST_MISMATCH' | 'INVALID_SIGNATURE';
288
+ declare class ActionManifestV2VerificationError extends Error {
289
+ readonly code: ActionManifestV2VerificationErrorCode;
290
+ constructor(code: ActionManifestV2VerificationErrorCode, message: string);
291
+ }
292
+ /**
293
+ * Serialize a Manifest v2 payload using the RFC 8785 JSON Canonicalization
294
+ * Scheme. Invalid JSON-domain values are rejected rather than being silently
295
+ * omitted or coerced.
296
+ */
297
+ declare function canonicalizeManifestV2Payload(payload: ActionManifestV2Payload): string;
298
+ /** Compute the content address for the unsigned Manifest v2 payload. */
299
+ declare function computeActionManifestV2Digest(payload: ActionManifestV2Payload): Promise<string>;
300
+ /**
301
+ * Sign a portable Manifest v2 payload. The host owns key resolution and the
302
+ * concrete signature algorithm; this module owns canonical bytes and issuer
303
+ * binding.
304
+ */
305
+ declare function signActionManifestV2(payload: ActionManifestV2Payload, signer: ActionManifestV2Signer): Promise<SignedActionManifestV2>;
306
+ /**
307
+ * Load a signed manifest across the execution trust boundary. Every failure
308
+ * throws; this API never returns a partially trusted or downgraded contract.
309
+ */
310
+ declare function verifyActionManifestV2(candidate: unknown, trustPolicy: ActionManifestV2TrustPolicy): Promise<VerifiedActionManifestV2>;
311
+
312
+ /** JSON Schema 2020-12 for the signed Manifest v2 envelope. */
313
+ declare const ACTION_MANIFEST_V2_SCHEMA: {
314
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
315
+ readonly $id: "https://ixo.world/schemas/qi/action-manifest-v2.schema.json";
316
+ readonly type: "object";
317
+ readonly additionalProperties: false;
318
+ readonly required: readonly ["manifestVersion", "manifestId", "generatedAt", "package", "issuer", "compatibility", "actions", "primitives", "integrity"];
319
+ readonly properties: {
320
+ readonly manifestVersion: {
321
+ readonly const: "2.0";
322
+ };
323
+ readonly manifestId: {
324
+ readonly type: "string";
325
+ readonly minLength: 1;
326
+ };
327
+ readonly generatedAt: {
328
+ readonly type: "string";
329
+ readonly pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$";
330
+ };
331
+ readonly package: {
332
+ readonly type: "object";
333
+ readonly additionalProperties: false;
334
+ readonly required: readonly ["name", "version", "sourceCommit"];
335
+ readonly properties: {
336
+ readonly name: {
337
+ readonly type: "string";
338
+ readonly minLength: 1;
339
+ };
340
+ readonly version: {
341
+ readonly type: "string";
342
+ readonly minLength: 1;
343
+ };
344
+ readonly sourceCommit: {
345
+ readonly type: "string";
346
+ readonly minLength: 1;
347
+ };
348
+ readonly buildId: {
349
+ readonly type: "string";
350
+ readonly minLength: 1;
351
+ };
352
+ readonly distributionUrl: {
353
+ readonly type: "string";
354
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:";
355
+ };
356
+ };
357
+ };
358
+ readonly issuer: {
359
+ readonly type: "object";
360
+ readonly additionalProperties: false;
361
+ readonly required: readonly ["did", "verificationMethod"];
362
+ readonly properties: {
363
+ readonly did: {
364
+ readonly type: "string";
365
+ readonly pattern: "^did:[a-z0-9]+:.+";
366
+ };
367
+ readonly verificationMethod: {
368
+ readonly type: "string";
369
+ readonly pattern: "^did:[a-z0-9]+:.+#.+";
370
+ };
371
+ };
372
+ };
373
+ readonly compatibility: {
374
+ readonly type: "object";
375
+ readonly additionalProperties: false;
376
+ readonly required: readonly ["engine", "flowSchemaVersions", "features"];
377
+ readonly properties: {
378
+ readonly engine: {
379
+ readonly type: "object";
380
+ readonly additionalProperties: false;
381
+ readonly required: readonly ["versionRange"];
382
+ readonly properties: {
383
+ readonly versionRange: {
384
+ readonly type: "string";
385
+ readonly minLength: 1;
386
+ };
387
+ };
388
+ };
389
+ readonly flowSchemaVersions: {
390
+ readonly type: "array";
391
+ readonly minItems: 1;
392
+ readonly uniqueItems: true;
393
+ readonly items: {
394
+ readonly type: "string";
395
+ readonly minLength: 1;
396
+ };
397
+ };
398
+ readonly features: {
399
+ readonly type: "array";
400
+ readonly minItems: 1;
401
+ readonly uniqueItems: true;
402
+ readonly items: {
403
+ readonly type: "string";
404
+ readonly minLength: 1;
405
+ };
406
+ };
407
+ };
408
+ };
409
+ readonly actions: {
410
+ readonly type: "array";
411
+ readonly items: {
412
+ readonly $ref: "#/$defs/contract";
413
+ };
414
+ };
415
+ readonly primitives: {
416
+ readonly type: "array";
417
+ readonly items: {
418
+ readonly $ref: "#/$defs/contract";
419
+ };
420
+ };
421
+ readonly integrity: {
422
+ readonly type: "object";
423
+ readonly additionalProperties: false;
424
+ readonly required: readonly ["canonicalization", "digest", "signature"];
425
+ readonly properties: {
426
+ readonly canonicalization: {
427
+ readonly const: "RFC8785";
428
+ };
429
+ readonly digest: {
430
+ readonly type: "object";
431
+ readonly additionalProperties: false;
432
+ readonly required: readonly ["algorithm", "value"];
433
+ readonly properties: {
434
+ readonly algorithm: {
435
+ readonly const: "SHA-256";
436
+ };
437
+ readonly value: {
438
+ readonly type: "string";
439
+ readonly pattern: "^sha256:[0-9a-f]{64}$";
440
+ };
441
+ };
442
+ };
443
+ readonly signature: {
444
+ readonly type: "object";
445
+ readonly additionalProperties: false;
446
+ readonly required: readonly ["algorithm", "verificationMethod", "value"];
447
+ readonly properties: {
448
+ readonly algorithm: {
449
+ readonly type: "string";
450
+ readonly minLength: 1;
451
+ };
452
+ readonly verificationMethod: {
453
+ readonly type: "string";
454
+ readonly pattern: "^did:[a-z0-9]+:.+#.+";
455
+ };
456
+ readonly value: {
457
+ readonly type: "string";
458
+ readonly minLength: 1;
459
+ };
460
+ };
461
+ };
462
+ };
463
+ };
464
+ };
465
+ readonly $defs: {
466
+ readonly contract: {
467
+ readonly type: "object";
468
+ readonly required: readonly ["type", "contractVersion"];
469
+ readonly properties: {
470
+ readonly type: {
471
+ readonly type: "string";
472
+ readonly minLength: 1;
473
+ };
474
+ readonly contractVersion: {
475
+ readonly type: "string";
476
+ readonly minLength: 1;
477
+ };
478
+ readonly aliases: {
479
+ readonly type: "array";
480
+ readonly uniqueItems: true;
481
+ readonly items: {
482
+ readonly type: "string";
483
+ readonly minLength: 1;
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+
491
+ interface ActionPresentation {
492
+ displayName: string;
493
+ description: string;
494
+ }
495
+ /** Core-owned default used by built-ins and by legacy registrations during migration. */
496
+ declare function getActionPresentation(type: string): ActionPresentation;
160
497
 
161
498
  /**
162
499
  * Required-input evaluation for action types — the machine-readable mirror of
@@ -267,6 +604,26 @@ declare function parseServiceCan(value: string): {
267
604
 
268
605
  declare function buildServicesFromHandlers(handlers: any): ActionServices;
269
606
 
607
+ interface ExternalTopicExecutorResult {
608
+ receipt: TopicActionReceiptV2;
609
+ semanticRecords?: TopicActionRecord[];
610
+ }
611
+ interface ExternalTopicExecutorPort {
612
+ invoke(invocation: TopicActionInvocationV1): Promise<ExternalTopicExecutorResult>;
613
+ }
614
+ /** Shared manifest/invocation boundary for both QiForge and MCP providers. */
615
+ declare class ManifestBoundTopicExecutorAdapter {
616
+ readonly provider: Exclude<TopicActionRuntimeProvider, 'qi-flow'>;
617
+ private readonly executor;
618
+ private readonly bridge;
619
+ constructor(provider: Exclude<TopicActionRuntimeProvider, 'qi-flow'>, executor: ExternalTopicExecutorPort, bridge: TopicActionBridge);
620
+ execute(invocation: TopicActionInvocationV1): Promise<TopicActionWriteBackResult>;
621
+ private validateInvocation;
622
+ private validateResult;
623
+ }
624
+ declare const createQiForgeTopicExecutorAdapter: (executor: ExternalTopicExecutorPort, bridge: TopicActionBridge) => ManifestBoundTopicExecutorAdapter;
625
+ declare const createMcpTopicExecutorAdapter: (executor: ExternalTopicExecutorPort, bridge: TopicActionBridge) => ManifestBoundTopicExecutorAdapter;
626
+
270
627
  type ConditionOperator = 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty';
271
628
  interface BlockCondition {
272
629
  id: string;
@@ -813,212 +1170,6 @@ declare function getVersionPolicy(version: string): VersionPolicy;
813
1170
  */
814
1171
  declare function isVersionAtLeast(current: string, minimum: FlowVersionString): boolean;
815
1172
 
816
- /**
817
- * Writes compiled blocks into BlockNote's collaborative XmlFragment using the
818
- * ProseMirror/Yjs structure that BlockNote reads from collaboration.
819
- */
820
- declare function writeCompiledBlocksToFragment(fragment: Y.XmlFragment, blocks: CompiledBlock[]): void;
821
- /**
822
- * Remove a single block container by its block ID.
823
- * Returns `true` if the block was found and removed.
824
- */
825
- declare function removeBlockFromFragment(fragment: Y.XmlFragment, blockId: string): boolean;
826
- /**
827
- * Replace a block container in-place (same position) by its block ID.
828
- * Returns `true` if the block was found and replaced.
829
- */
830
- declare function replaceBlockInFragment(fragment: Y.XmlFragment, block: CompiledBlock): boolean;
831
- /**
832
- * Read all blocks (with their props) back out of the document fragment.
833
- *
834
- * The inverse of `writeCompiledBlocksToFragment` / `createBlockContainer`: walks the single
835
- * `blockGroup` and, for each `blockContainer`, returns `{ id, type, props }` where `props` is
836
- * the inner `blockContent` element's attributes — the **authoritative per-block prop store**
837
- * (the `qi.flow.nodes` map omits props, so this is the only place to recover them headlessly).
838
- *
839
- * `textColor`/`backgroundColor` are folded back into `props` only when non-`'default'`, so a
840
- * default-styled block round-trips to exactly its content props. Note: props written as `''`
841
- * are not persisted by `createBlockContainer`, so they do not reappear here.
842
- *
843
- * Returns `[]` when the fragment has no `blockGroup`.
844
- */
845
- declare function readBlocksFromFragment(fragment: Y.XmlFragment): CompiledBlock[];
846
-
847
- /**
848
- * A single flow node as read from a live Y.Doc, assembled from all three sources:
849
- * structure (`qi.flow.*`), per-block `props` (the `document` fragment), and per-block
850
- * `runtime` (the `runtime` map). `props` and `runtime` are what the graph map cannot provide.
851
- */
852
- interface FlowDocumentNode {
853
- nodeId: string;
854
- blockId: string;
855
- can: string;
856
- with: string;
857
- title: string;
858
- description: string;
859
- /** Authoritative per-block props, recovered from the document fragment. */
860
- props: Record<string, string>;
861
- /** Per-block runtime; `{}` for a fresh/never-run node (e.g. a template). */
862
- runtime: FlowNodeRuntimeState;
863
- }
864
- interface FlowDocumentRead {
865
- meta: CompiledFlow['meta'];
866
- order: string[];
867
- edges: CompiledEdge[];
868
- blockIndex: Record<string, string>;
869
- nodes: FlowDocumentNode[];
870
- }
871
- /**
872
- * Read a flow document **losslessly** from a headless Y.Doc, in one call.
873
- *
874
- * Why this exists: `readCompiledFlowFromYDoc` returns nodes with **empty `props`** (the
875
- * `qi.flow.nodes` map omits props — they live only in the `document` fragment), and
876
- * `decompileToBaseUcanFlow` is lossy for the same reason. `readFlowDocument` merges the three
877
- * sources so a consumer (e.g. an authoring agent) sees the *true* current flow:
878
- *
879
- * - structure ← `readCompiledFlowFromYDoc` (nodes, order, edges, `can`/`with`)
880
- * - per-block props ← `readBlocksFromFragment` (inputs/conditions/trigger/ttl/icon/…)
881
- * - per-block runtime ← the run's `actions` map, resolved against the flat `runtime` mirror
882
- *
883
- * Fragment props are authoritative for the denormalized fields (`title`/`description`); the
884
- * node-map copy is used only as a fallback when the fragment didn't persist them.
885
- *
886
- * Returns `null` when the doc has no flow at all (mirrors `readCompiledFlowFromYDoc`).
887
- */
888
- declare function readFlowDocument(yDoc: Doc, runId?: string): FlowDocumentRead | null;
889
- interface AddFlowNodeOptions {
890
- /** Registry action type, e.g. `'qi/form.submit'`. Must exist in the registry. */
891
- type: string;
892
- /** Insert into the logical order right after this node id; appended to the end if omitted. */
893
- afterNodeId?: string;
894
- /** Optional starting title (defaults to the action's `can` / type). */
895
- title?: string;
896
- /** Optional extra block props merged over the compiled defaults. */
897
- props?: Record<string, string>;
898
- }
899
- /**
900
- * Add a step to the flow document — the inverse of `removeFlowNode`. Inserts an
901
- * attr-only `action` block into the `document` fragment and registers the
902
- * matching `qi.flow.*` structure (`nodes`, `blockIndex`, `order`) in one
903
- * transaction, mirroring exactly what the compiler's `hydrate` writes for a
904
- * single node. No recompile, no runtime entry (a template node is never-run).
905
- *
906
- * Returns the new ids, or `null` if `type` is not a known registry action.
907
- */
908
- declare function addFlowNode(yDoc: Doc, opts: AddFlowNodeOptions): {
909
- nodeId: string;
910
- blockId: string;
911
- } | null;
912
- /**
913
- * Edit one block's config props in place, in the `document` fragment. Surgical: it touches
914
- * only the target block (siblings untouched), does **not** recompile, and does **not** touch
915
- * the `runtime` map. Pass `''` for a prop to clear it (the writer drops empty values).
916
- *
917
- * Keeps the denormalized node-map fields in sync — `title`/`description` and the `actor`
918
- * object (derived from `authorisedActors`/`parentCapability`) live in BOTH the fragment and
919
- * `qi.flow.nodes`, so a fragment-only write would desync structural readers.
920
- *
921
- * Returns `false` when no block with `blockId` exists.
922
- */
923
- declare function setBlockProps(yDoc: Doc, blockId: string, partial: Record<string, string>): boolean;
924
- /**
925
- * Remove one step from the flow document — fragment block + `qi.flow.*` entries + its
926
- * `runtime` entry + any edges touching it — in one transaction. Siblings untouched.
927
- *
928
- * Guards against orphaning references: if another node's trigger, condition, or a
929
- * `{{nodeId.output.*}}` input ref points at this node, removal is refused and the referring
930
- * node ids are returned so the caller can surface them.
931
- */
932
- declare function removeFlowNode(yDoc: Doc, nodeId: string, runId?: string): {
933
- ok: true;
934
- } | {
935
- ok: false;
936
- referencedBy: string[];
937
- };
938
- /**
939
- * Reorder the flow's steps. Always rewrites the logical order (`qi.flow.order`). Also
940
- * reorders the visual `document` fragment to match — but only when every block is an
941
- * attr-only compiled block; if the doc contains inline prose, the fragment is left untouched
942
- * (recreating it would lose content) and only the logical order changes.
943
- *
944
- * `order` must be a permutation of the current `qi.flow.order` (same ids, no dups); returns
945
- * `false` otherwise.
946
- */
947
- declare function reorderFlowNodes(yDoc: Doc, order: string[]): boolean;
948
- /**
949
- * Swap two step blocks by document position — the move-up/move-down primitive
950
- * for template authoring. Reorders the visual `document` fragment (so the change
951
- * is what the author sees), and keeps `qi.flow.order` consistent when BOTH
952
- * blocks are graph-registered nodes. Works for slash-menu ("legacy") blocks too,
953
- * since it operates on document position rather than the graph.
954
- *
955
- * Returns `false` if either block id is missing.
956
- */
957
- declare function swapFlowBlocks(yDoc: Doc, blockIdA: string, blockIdB: string): boolean;
958
- /**
959
- * Merge a partial into a node's action state — the headless twin of the React `updateRuntime`.
960
- *
961
- * Goes through `writeActionState`, so the run entry and the flat mirror are
962
- * written in one transaction from one resolved `prev`. A flat-only write here
963
- * would be invisible to run-scoped readers the moment they land.
964
- */
965
- declare function updateNodeRuntime(yDoc: Doc, blockId: string, partial: Partial<FlowNodeRuntimeState>, runId?: string): void;
966
- /**
967
- * Clear a failed step back to idle so the user can cleanly re-run it. The headless twin of
968
- * the editor's "Reset" recovery affordance — benign and non-executing.
969
- *
970
- * Resetting only the flat map is the failure this exists to avoid: a surviving
971
- * `completed`/`failed` run entry beats a fresh `idle` flat entry under
972
- * `resolveActionState` rule (a), so "Reset" would appear to do nothing at all
973
- * once readers go run-first.
974
- */
975
- declare function resetStepRuntime(yDoc: Doc, blockId: string, runId?: string): void;
976
- /**
977
- * Pre-fill a (live) form step's answers at `runtime.output.form.answers` (a JSON string,
978
- * matching `FormPanel`). Merges into existing `output`; **never** sets `state:'completed'` —
979
- * submission stays the user's action.
980
- */
981
- declare function setFormAnswers(yDoc: Doc, blockId: string, answers: Record<string, unknown>, runId?: string): void;
982
-
983
- /**
984
- * The operator vocabulary the FE condition evaluator actually understands
985
- * (`src/mantine/blocks/utils/conditionEvaluator.ts`). The compiler historically wrote the
986
- * BaseUcan `ConditionRef` vocabulary (`eq`/`neq`/…) verbatim, which the evaluator does NOT
987
- * recognise (and no normalizer bridged them) — so those conditions silently never fired.
988
- * This module is the single source of truth that maps every supported spelling onto the
989
- * evaluator's vocabulary, and assembles the `props.conditions` JSON.
990
- */
991
- type EvaluatorOperator = 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty';
992
- /** Normalize any supported operator spelling to the evaluator's vocabulary. Unknown → `equals`. */
993
- declare function toEvaluatorOperator(operator: string): EvaluatorOperator;
994
- interface BlockConditionInput {
995
- /** The BLOCK id of the source step (note: the stored shape keys on blockId, not nodeId). */
996
- sourceBlockId: string;
997
- /** Property on the source block to test. */
998
- property: string;
999
- /** Any supported operator spelling — normalized to the evaluator's vocabulary on write. */
1000
- operator: string;
1001
- value?: unknown;
1002
- effect?: {
1003
- action: 'enable' | 'disable' | 'show' | 'hide';
1004
- message?: string;
1005
- };
1006
- /** Source block type label; defaults to the compiled action type (`'action'`). */
1007
- sourceBlockType?: string;
1008
- name?: string;
1009
- }
1010
- /**
1011
- * Build the `props.conditions` JSON string in the exact shape the FE evaluator reads, with
1012
- * operators normalized to its vocabulary. Single source of truth for the conditions prop —
1013
- * used by both the flow compiler (`compileCondition`) and direct authoring writes
1014
- * (`setBlockProps('conditions', buildBlockConditionsProp(...))`), so a condition authored
1015
- * either way actually evaluates.
1016
- */
1017
- declare function buildBlockConditionsProp(conditions: BlockConditionInput[], opts?: {
1018
- mode?: 'all_must_pass' | 'any_can_pass';
1019
- enabled?: boolean;
1020
- }): string;
1021
-
1022
1173
  interface ExecuteFlowAgentCoreCommandOptions {
1023
1174
  ucanService: UcanService;
1024
1175
  pin: string;
@@ -1261,6 +1412,212 @@ declare function computeCID(content: Uint8Array): Promise<string>;
1261
1412
  */
1262
1413
  declare function computeJsonCID(obj: Record<string, any>): Promise<string>;
1263
1414
 
1415
+ /**
1416
+ * Writes compiled blocks into BlockNote's collaborative XmlFragment using the
1417
+ * ProseMirror/Yjs structure that BlockNote reads from collaboration.
1418
+ */
1419
+ declare function writeCompiledBlocksToFragment(fragment: Y.XmlFragment, blocks: CompiledBlock[]): void;
1420
+ /**
1421
+ * Remove a single block container by its block ID.
1422
+ * Returns `true` if the block was found and removed.
1423
+ */
1424
+ declare function removeBlockFromFragment(fragment: Y.XmlFragment, blockId: string): boolean;
1425
+ /**
1426
+ * Replace a block container in-place (same position) by its block ID.
1427
+ * Returns `true` if the block was found and replaced.
1428
+ */
1429
+ declare function replaceBlockInFragment(fragment: Y.XmlFragment, block: CompiledBlock): boolean;
1430
+ /**
1431
+ * Read all blocks (with their props) back out of the document fragment.
1432
+ *
1433
+ * The inverse of `writeCompiledBlocksToFragment` / `createBlockContainer`: walks the single
1434
+ * `blockGroup` and, for each `blockContainer`, returns `{ id, type, props }` where `props` is
1435
+ * the inner `blockContent` element's attributes — the **authoritative per-block prop store**
1436
+ * (the `qi.flow.nodes` map omits props, so this is the only place to recover them headlessly).
1437
+ *
1438
+ * `textColor`/`backgroundColor` are folded back into `props` only when non-`'default'`, so a
1439
+ * default-styled block round-trips to exactly its content props. Note: props written as `''`
1440
+ * are not persisted by `createBlockContainer`, so they do not reappear here.
1441
+ *
1442
+ * Returns `[]` when the fragment has no `blockGroup`.
1443
+ */
1444
+ declare function readBlocksFromFragment(fragment: Y.XmlFragment): CompiledBlock[];
1445
+
1446
+ /**
1447
+ * A single flow node as read from a live Y.Doc, assembled from all three sources:
1448
+ * structure (`qi.flow.*`), per-block `props` (the `document` fragment), and per-block
1449
+ * `runtime` (the `runtime` map). `props` and `runtime` are what the graph map cannot provide.
1450
+ */
1451
+ interface FlowDocumentNode {
1452
+ nodeId: string;
1453
+ blockId: string;
1454
+ can: string;
1455
+ with: string;
1456
+ title: string;
1457
+ description: string;
1458
+ /** Authoritative per-block props, recovered from the document fragment. */
1459
+ props: Record<string, string>;
1460
+ /** Per-block runtime; `{}` for a fresh/never-run node (e.g. a template). */
1461
+ runtime: FlowNodeRuntimeState;
1462
+ }
1463
+ interface FlowDocumentRead {
1464
+ meta: CompiledFlow['meta'];
1465
+ order: string[];
1466
+ edges: CompiledEdge[];
1467
+ blockIndex: Record<string, string>;
1468
+ nodes: FlowDocumentNode[];
1469
+ }
1470
+ /**
1471
+ * Read a flow document **losslessly** from a headless Y.Doc, in one call.
1472
+ *
1473
+ * Why this exists: `readCompiledFlowFromYDoc` returns nodes with **empty `props`** (the
1474
+ * `qi.flow.nodes` map omits props — they live only in the `document` fragment), and
1475
+ * `decompileToBaseUcanFlow` is lossy for the same reason. `readFlowDocument` merges the three
1476
+ * sources so a consumer (e.g. an authoring agent) sees the *true* current flow:
1477
+ *
1478
+ * - structure ← `readCompiledFlowFromYDoc` (nodes, order, edges, `can`/`with`)
1479
+ * - per-block props ← `readBlocksFromFragment` (inputs/conditions/trigger/ttl/icon/…)
1480
+ * - per-block runtime ← the run's `actions` map, resolved against the flat `runtime` mirror
1481
+ *
1482
+ * Fragment props are authoritative for the denormalized fields (`title`/`description`); the
1483
+ * node-map copy is used only as a fallback when the fragment didn't persist them.
1484
+ *
1485
+ * Returns `null` when the doc has no flow at all (mirrors `readCompiledFlowFromYDoc`).
1486
+ */
1487
+ declare function readFlowDocument(yDoc: Doc, runId?: string): FlowDocumentRead | null;
1488
+ interface AddFlowNodeOptions {
1489
+ /** Registry action type, e.g. `'qi/form.submit'`. Must exist in the registry. */
1490
+ type: string;
1491
+ /** Insert into the logical order right after this node id; appended to the end if omitted. */
1492
+ afterNodeId?: string;
1493
+ /** Optional starting title (defaults to the action's `can` / type). */
1494
+ title?: string;
1495
+ /** Optional extra block props merged over the compiled defaults. */
1496
+ props?: Record<string, string>;
1497
+ }
1498
+ /**
1499
+ * Add a step to the flow document — the inverse of `removeFlowNode`. Inserts an
1500
+ * attr-only `action` block into the `document` fragment and registers the
1501
+ * matching `qi.flow.*` structure (`nodes`, `blockIndex`, `order`) in one
1502
+ * transaction, mirroring exactly what the compiler's `hydrate` writes for a
1503
+ * single node. No recompile, no runtime entry (a template node is never-run).
1504
+ *
1505
+ * Returns the new ids, or `null` if `type` is not a known registry action.
1506
+ */
1507
+ declare function addFlowNode(yDoc: Doc, opts: AddFlowNodeOptions): {
1508
+ nodeId: string;
1509
+ blockId: string;
1510
+ } | null;
1511
+ /**
1512
+ * Edit one block's config props in place, in the `document` fragment. Surgical: it touches
1513
+ * only the target block (siblings untouched), does **not** recompile, and does **not** touch
1514
+ * the `runtime` map. Pass `''` for a prop to clear it (the writer drops empty values).
1515
+ *
1516
+ * Keeps the denormalized node-map fields in sync — `title`/`description` and the `actor`
1517
+ * object (derived from `authorisedActors`/`parentCapability`) live in BOTH the fragment and
1518
+ * `qi.flow.nodes`, so a fragment-only write would desync structural readers.
1519
+ *
1520
+ * Returns `false` when no block with `blockId` exists.
1521
+ */
1522
+ declare function setBlockProps(yDoc: Doc, blockId: string, partial: Record<string, string>): boolean;
1523
+ /**
1524
+ * Remove one step from the flow document — fragment block + `qi.flow.*` entries + its
1525
+ * `runtime` entry + any edges touching it — in one transaction. Siblings untouched.
1526
+ *
1527
+ * Guards against orphaning references: if another node's trigger, condition, or a
1528
+ * `{{nodeId.output.*}}` input ref points at this node, removal is refused and the referring
1529
+ * node ids are returned so the caller can surface them.
1530
+ */
1531
+ declare function removeFlowNode(yDoc: Doc, nodeId: string, runId?: string): {
1532
+ ok: true;
1533
+ } | {
1534
+ ok: false;
1535
+ referencedBy: string[];
1536
+ };
1537
+ /**
1538
+ * Reorder the flow's steps. Always rewrites the logical order (`qi.flow.order`). Also
1539
+ * reorders the visual `document` fragment to match — but only when every block is an
1540
+ * attr-only compiled block; if the doc contains inline prose, the fragment is left untouched
1541
+ * (recreating it would lose content) and only the logical order changes.
1542
+ *
1543
+ * `order` must be a permutation of the current `qi.flow.order` (same ids, no dups); returns
1544
+ * `false` otherwise.
1545
+ */
1546
+ declare function reorderFlowNodes(yDoc: Doc, order: string[]): boolean;
1547
+ /**
1548
+ * Swap two step blocks by document position — the move-up/move-down primitive
1549
+ * for template authoring. Reorders the visual `document` fragment (so the change
1550
+ * is what the author sees), and keeps `qi.flow.order` consistent when BOTH
1551
+ * blocks are graph-registered nodes. Works for slash-menu ("legacy") blocks too,
1552
+ * since it operates on document position rather than the graph.
1553
+ *
1554
+ * Returns `false` if either block id is missing.
1555
+ */
1556
+ declare function swapFlowBlocks(yDoc: Doc, blockIdA: string, blockIdB: string): boolean;
1557
+ /**
1558
+ * Merge a partial into a node's action state — the headless twin of the React `updateRuntime`.
1559
+ *
1560
+ * Goes through `writeActionState`, so the run entry and the flat mirror are
1561
+ * written in one transaction from one resolved `prev`. A flat-only write here
1562
+ * would be invisible to run-scoped readers the moment they land.
1563
+ */
1564
+ declare function updateNodeRuntime(yDoc: Doc, blockId: string, partial: Partial<FlowNodeRuntimeState>, runId?: string): void;
1565
+ /**
1566
+ * Clear a failed step back to idle so the user can cleanly re-run it. The headless twin of
1567
+ * the editor's "Reset" recovery affordance — benign and non-executing.
1568
+ *
1569
+ * Resetting only the flat map is the failure this exists to avoid: a surviving
1570
+ * `completed`/`failed` run entry beats a fresh `idle` flat entry under
1571
+ * `resolveActionState` rule (a), so "Reset" would appear to do nothing at all
1572
+ * once readers go run-first.
1573
+ */
1574
+ declare function resetStepRuntime(yDoc: Doc, blockId: string, runId?: string): void;
1575
+ /**
1576
+ * Pre-fill a (live) form step's answers at `runtime.output.form.answers` (a JSON string,
1577
+ * matching `FormPanel`). Merges into existing `output`; **never** sets `state:'completed'` —
1578
+ * submission stays the user's action.
1579
+ */
1580
+ declare function setFormAnswers(yDoc: Doc, blockId: string, answers: Record<string, unknown>, runId?: string): void;
1581
+
1582
+ /**
1583
+ * The operator vocabulary the FE condition evaluator actually understands
1584
+ * (`src/mantine/blocks/utils/conditionEvaluator.ts`). The compiler historically wrote the
1585
+ * BaseUcan `ConditionRef` vocabulary (`eq`/`neq`/…) verbatim, which the evaluator does NOT
1586
+ * recognise (and no normalizer bridged them) — so those conditions silently never fired.
1587
+ * This module is the single source of truth that maps every supported spelling onto the
1588
+ * evaluator's vocabulary, and assembles the `props.conditions` JSON.
1589
+ */
1590
+ type EvaluatorOperator = 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty';
1591
+ /** Normalize any supported operator spelling to the evaluator's vocabulary. Unknown → `equals`. */
1592
+ declare function toEvaluatorOperator(operator: string): EvaluatorOperator;
1593
+ interface BlockConditionInput {
1594
+ /** The BLOCK id of the source step (note: the stored shape keys on blockId, not nodeId). */
1595
+ sourceBlockId: string;
1596
+ /** Property on the source block to test. */
1597
+ property: string;
1598
+ /** Any supported operator spelling — normalized to the evaluator's vocabulary on write. */
1599
+ operator: string;
1600
+ value?: unknown;
1601
+ effect?: {
1602
+ action: 'enable' | 'disable' | 'show' | 'hide';
1603
+ message?: string;
1604
+ };
1605
+ /** Source block type label; defaults to the compiled action type (`'action'`). */
1606
+ sourceBlockType?: string;
1607
+ name?: string;
1608
+ }
1609
+ /**
1610
+ * Build the `props.conditions` JSON string in the exact shape the FE evaluator reads, with
1611
+ * operators normalized to its vocabulary. Single source of truth for the conditions prop —
1612
+ * used by both the flow compiler (`compileCondition`) and direct authoring writes
1613
+ * (`setBlockProps('conditions', buildBlockConditionsProp(...))`), so a condition authored
1614
+ * either way actually evaluates.
1615
+ */
1616
+ declare function buildBlockConditionsProp(conditions: BlockConditionInput[], opts?: {
1617
+ mode?: 'all_must_pass' | 'any_can_pass';
1618
+ enabled?: boolean;
1619
+ }): string;
1620
+
1264
1621
  declare const XERO_TOOLKIT = "xero";
1265
1622
  /**
1266
1623
  * The Xero account, organisation and bank account this flow acts through.
@@ -1395,4 +1752,4 @@ declare function createOracleInitFlowTemplate(): {
1395
1752
  nodes: FlowNode[];
1396
1753
  };
1397
1754
 
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 };
1755
+ export { ACTION_MANIFEST_V2_SCHEMA, ACTION_MANIFEST_VERSION, ACTION_REGISTRY_VERSION, ActionDefinition, ActionDoneContract, ActionHandlers, type ActionManifest, type ActionManifestEntry, type ActionManifestIssue, type ActionManifestV2Action, type ActionManifestV2Compatibility, type ActionManifestV2Integrity, type ActionManifestV2Issuer, type ActionManifestV2Package, type ActionManifestV2Payload, type ActionManifestV2Primitive, type ActionManifestV2SignatureVerificationInput, type ActionManifestV2Signer, type ActionManifestV2TrustPolicy, ActionManifestV2VerificationError, type ActionManifestV2VerificationErrorCode, 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, type ExternalTopicExecutorPort, type ExternalTopicExecutorResult, 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, MAX_TOPIC_SEMANTIC_RECORDS_PER_RECEIPT, MAX_TOPIC_SEMANTIC_RECORD_BATCH_BYTES, ManifestBoundTopicExecutorAdapter, type ManifestDoneDeclaration, type ManifestProofDeclaration, type ManifestV2JsonValue, 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, type SignedActionManifestV2, StoredDelegation, StoredInvocation, TopicActionBridge, TopicActionInvocationV1, TopicActionMetadata, TopicActionReceiptV2, TopicActionRecord, TopicActionWriteBackResult, TopicSemanticRecordDefinition, type TopicSemanticRecordValidationResult, UcanDelegationStore, UcanService, type UnresolvedReference, type UnresolvedReferenceReason, VERSION_MANIFEST, type VerifiedActionManifestV2, 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, actionManifestIssues, actionTypeToCan, addFlowNode, appendRunTimelineEvent, appendRunTimelineEvents, boundRunActionOutput, boundRunEventJson, buildBlockConditionsProp, buildServicesFromHandlers, buildXeroInvoiceWorkKey, buildXeroPaymentWorkKey, canToActionType, canToType, canonicalizeManifestV2Payload, capabilityPatternCoversCan, classifyBlockerCause, classifyNodeState, computeActionManifestV2Digest, computeCID, computeJsonCID, createMcpTopicExecutorAdapter, createOracleInitFlowTemplate, createQiForgeTopicExecutorAdapter, createReference, createRunEventIdempotencyKey, dispatchFlowStartTriggers, doneWhenCompleted, evaluateBlockConditions, evaluateBlockConditionsForRun, evaluateBlockExecutionEligibilityForRun, evaluateCondition, executeFlowAgentCoreCommand, executeQueuedFlowAgentCoreCommands, findXeroWorkItems, findXeroWorkItemsForEditor, generateActionManifest, getAction, getActionByCan, getActionForBlock, getActionPresentation, 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, sha256Digest, signActionManifestV2, snapshotNode, swapFlowBlocks, toEvaluatorOperator, typeToCan, updateNodeRuntime, updateXeroWorkReviewPayload, updateXeroWorkReviewPayloadForEditor, upsertXeroWorkItem, upsertXeroWorkItemForEditor, validateActionProof, validateTopicSemanticRecord, validateTopicSemanticRecordBatch, verifyActionManifestV2, verifyCompletion, writeCompiledBlocksToFragment, writeRunRecordAndReconcile, xeroOracleActivityForBlock, xeroOracleActivityForBlockForEditor };