@ixo/editor 3.8.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
- import { x as ActionDefinition, y as ActionServices } from '../decompile-BroSNv1q.mjs';
2
- export { D as ActionContext, G as ActionResult, I as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, K as CompiledBlock, L as CompiledEdge, v as CompiledFlow, P as CompiledFlowNode, C as CompilerRegistry, H as ConditionRef, E as ExecuteNodeParams, f as ExecutionContext, d as ExecutionOutcome, u as FlowCapability, F as FlowRuntimeStateManager, w as FlowStrategy, M as MergeResult, N as NodeActionResult, O as OutputSchemaField, R as ReadFlowOptions, q as ReadFlowResult, J as RuntimeRef, S as SetupFlowOptions, p as SetupFlowResult, T as TTLConstraint, a as buildAuthzFromProps, b as buildFlowNodeFromBlock, z as clearRuntimeForTemplateClone, l as compileBaseUcanFlow, c as createRuntimeStateManager, o as decompileToBaseUcanFlow, e as executeNode, k as getActiveEditor, i as isAuthorized, Q as isRuntimeRef, n as mergeCompiledFlows, m as readCompiledFlowFromYDoc, h as readFlow, r as readFlowAsBaseUcan, g as readFlowFromEditor, j as setActiveEditor, s as setupFlowFromBaseUcan } from '../decompile-BroSNv1q.mjs';
3
- export { C as ClaimCollectionURI, B as CreateDelegationParams, G as CreateInvocationParams, A as CreateRootDelegationParams, s as DID, D as DelegationChainValidationResult, k as DelegationGrant, E as EvaluationStatus, y as ExecutionWithInvocationResult, z as FindProofsResult, v as FlowNode, F as FlowNodeAuthzExtension, u as FlowNodeBase, t as FlowNodeRuntimeState, w as InvocationRequest, x as InvocationResult, I as InvocationStore, L as LinkedClaim, N as NodeState, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService } from '../index-BEoftwDZ.mjs';
4
- import 'yjs';
1
+ import { x as ActionDefinition, y as ActionServices } from '../decompile-BNprXLsA.mjs';
2
+ export { D as ActionContext, G as ActionResult, I as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, K as CompiledBlock, L as CompiledEdge, v as CompiledFlow, P as CompiledFlowNode, C as CompilerRegistry, H as ConditionRef, E as ExecuteNodeParams, f as ExecutionContext, d as ExecutionOutcome, u as FlowCapability, F as FlowRuntimeStateManager, w as FlowStrategy, M as MergeResult, N as NodeActionResult, O as OutputSchemaField, R as ReadFlowOptions, q as ReadFlowResult, J as RuntimeRef, S as SetupFlowOptions, p as SetupFlowResult, T as TTLConstraint, Q as TriggerSpec, a as buildAuthzFromProps, b as buildFlowNodeFromBlock, z as clearRuntimeForTemplateClone, l as compileBaseUcanFlow, c as createRuntimeStateManager, o as decompileToBaseUcanFlow, e as executeNode, k as getActiveEditor, i as isAuthorized, U as isRuntimeRef, n as mergeCompiledFlows, m as readCompiledFlowFromYDoc, h as readFlow, r as readFlowAsBaseUcan, g as readFlowFromEditor, j as setActiveEditor, s as setupFlowFromBaseUcan } from '../decompile-BNprXLsA.mjs';
3
+ import { s as IxoEditorType } from '../index-CNCZs4wP.mjs';
4
+ export { C as ClaimCollectionURI, G as CreateDelegationParams, H as CreateInvocationParams, B as CreateRootDelegationParams, t as DID, D as DelegationChainValidationResult, k as DelegationGrant, E as EvaluationStatus, z as ExecutionWithInvocationResult, A as FindProofsResult, w as FlowNode, F as FlowNodeAuthzExtension, v as FlowNodeBase, u as FlowNodeRuntimeState, x as InvocationRequest, y as InvocationResult, I as InvocationStore, L as LinkedClaim, N as NodeState, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService } from '../index-CNCZs4wP.mjs';
5
+ import * as Y from 'yjs';
5
6
  import 'matrix-js-sdk';
6
7
  import '@blocknote/core';
7
8
  import 'react';
@@ -37,6 +38,263 @@ declare function getAllCanMappings(): ReadonlyArray<{
37
38
  */
38
39
  declare function buildServicesFromHandlers(handlers: any): ActionServices;
39
40
 
41
+ /**
42
+ * Run record stored in the audit trail as `type: 'block.run'`.
43
+ *
44
+ * Per Phase 0 #2 (eng review pass 2), run records are NOT a parallel
45
+ * `_yRunHistory` structure — they ride on the existing `auditTrail` Y.Map
46
+ * via `useAuditTrail.addEvent`. The shape below is what goes into the
47
+ * audit trail event's `details` field.
48
+ *
49
+ * See `docs/events-and-triggers-plan.md` §3.4, §18, §19.
50
+ */
51
+ interface RunRecordDetails {
52
+ /** Stable identifier for this run, deterministic from invocation context. */
53
+ runId: string;
54
+ /** Action's output. */
55
+ output: Record<string, unknown>;
56
+ /**
57
+ * Events the action emitted on this run. Persisted as part of the run
58
+ * record so the reconciliation loop can process them idempotently — even
59
+ * across page refreshes and across multiple clients.
60
+ */
61
+ events: Array<{
62
+ name: string;
63
+ payload: Record<string, unknown>;
64
+ }>;
65
+ /** ISO timestamp when the action started. */
66
+ startedAt: string;
67
+ /** ISO timestamp when the action completed (success or failure). */
68
+ completedAt: string;
69
+ /** DID of the actor who signed the invocation that produced this run. */
70
+ actorDid: string;
71
+ /** Optional error if the run failed. */
72
+ error?: {
73
+ message: string;
74
+ code?: string;
75
+ };
76
+ /**
77
+ * If this run was triggered by a pending invocation (i.e. it's a listener
78
+ * run), the id of that pending invocation. Used to dedup replays and trace
79
+ * causality back through `triggeredBy`.
80
+ */
81
+ fromPendingInvocationId?: string;
82
+ /**
83
+ * If this run is a listener run, the (sourceBlockId, eventName) that
84
+ * caused it. Used by the failure visibility surface to attribute failures
85
+ * back to the source block (CP-1).
86
+ */
87
+ triggeredBy?: {
88
+ sourceBlockId: string;
89
+ eventName: string;
90
+ };
91
+ }
92
+ declare const RUN_RECORD_AUDIT_TYPE = "block.run";
93
+ /**
94
+ * Pending invocation queued on a listener block.
95
+ *
96
+ * Stored in `_yPendingInvocations: Y.Map<blockId, Y.Map<id, PendingInvocation>>`.
97
+ *
98
+ * The id is deterministic — derived from
99
+ * `(sourceBlockId, sourceRunId, listenerBlockId, eventName, eventIndex)` —
100
+ * so the reconciliation loop can run idempotently from multiple clients
101
+ * without producing duplicates.
102
+ *
103
+ * See `docs/events-and-triggers-plan.md` §3.4, §3.5.1, §18.
104
+ */
105
+ interface PendingInvocation {
106
+ /** Deterministic id, see `computePendingInvocationId`. */
107
+ id: string;
108
+ /** Block that emitted the event. */
109
+ triggeringBlockId: string;
110
+ /** Run id of the triggering source run, used for the deterministic id. */
111
+ sourceRunId: string;
112
+ /** Event name from the source action's vocabulary. */
113
+ eventName: string;
114
+ /** Event index within the source run's `events` array (a single run can emit multiple). */
115
+ eventIndex: number;
116
+ /**
117
+ * The frozen event payload, captured by value at emission time. The
118
+ * assignee invokes the listener against this payload, not against the
119
+ * source block's current state. This is the property that makes the
120
+ * Sally → Mike scenario produce 10 distinct emails even when Mike acts
121
+ * on them all hours later.
122
+ */
123
+ payload: Record<string, unknown>;
124
+ /**
125
+ * Snapshots of `nodeId.output.*` ref values that the listener's inputs
126
+ * reference, captured at queue time. Keyed by the full ref string.
127
+ *
128
+ * §3.5.1: ref snapshots are the load-bearing fix for the lag-time
129
+ * overwrite scenario. If a listener references a non-trigger block's
130
+ * output (e.g. `evaluateBlock.output.claimId`), that value is captured
131
+ * here at queue time. Resolution at invocation time prefers the snapshot
132
+ * over current state, so multiple queued invocations don't drift when
133
+ * the source re-runs.
134
+ */
135
+ refSnapshots: Record<string, unknown>;
136
+ /** DID of the assigned actor who must invoke this listener. Resolved from `props.assignment.assignedActor.did`. */
137
+ assigneeDid: string;
138
+ /** ISO timestamp when the source emission happened. */
139
+ emittedAt: string;
140
+ /** ISO timestamp after which this pending invocation is considered expired. Resolved from `FlowCapability.ttl` at queue time. */
141
+ expiresAt: string;
142
+ }
143
+ /**
144
+ * Compute a deterministic id for a pending invocation from its content.
145
+ *
146
+ * The same (sourceBlockId, sourceRunId, listenerBlockId, eventName,
147
+ * eventIndex) tuple always produces the same id. This is the property that
148
+ * makes the reconciliation loop idempotent — re-running it from a different
149
+ * client, or after a page refresh, produces the same `Y.Map.set` operation
150
+ * with the same key, which Yjs converges to a single entry.
151
+ *
152
+ * Implementation: simple deterministic string concatenation, hashed via a
153
+ * 32-bit FNV-1a. The id is short and stable; collision risk within a single
154
+ * flow is negligible because the inputs are scoped (block ids are unique
155
+ * within a flow, run ids are unique within a block).
156
+ */
157
+ declare function computePendingInvocationId(args: {
158
+ sourceBlockId: string;
159
+ sourceRunId: string;
160
+ listenerBlockId: string;
161
+ eventName: string;
162
+ eventIndex: number;
163
+ }): string;
164
+ /**
165
+ * Walk an inputs object and collect every RuntimeRef of the form
166
+ * `nodeId.output.fieldPath`. Returns a map of `{refString: resolvedValue}`
167
+ * suitable for storing as `PendingInvocation.refSnapshots`.
168
+ *
169
+ * The walker mirrors `resolveRuntimeRefs` in `flowCompiler/resolveRefs.ts`
170
+ * but reads instead of resolving — it captures the current value of each
171
+ * ref so the listener can later resolve against the snapshot rather than
172
+ * against current state.
173
+ *
174
+ * See `docs/events-and-triggers-plan.md` §3.5.1.
175
+ */
176
+ declare function snapshotInputRefs(inputs: unknown, getNodeOutput: (nodeId: string) => Record<string, unknown> | undefined): Record<string, unknown>;
177
+ /**
178
+ * Get the top-level pending invocations Y.Map from the editor's yDoc.
179
+ * Lazily creates it if missing.
180
+ *
181
+ * Shape: `Y.Map<blockId, Y.Map<pendingInvocationId, PendingInvocation>>`.
182
+ * The outer map is keyed by listener block id; the inner map is keyed by
183
+ * deterministic pending invocation id (see `computePendingInvocationId`).
184
+ */
185
+ declare function getPendingInvocationsMap(yDoc: Y.Doc): Y.Map<Y.Map<unknown>>;
186
+ /**
187
+ * Get the inner pending-invocations map for a specific listener block.
188
+ * Lazily creates it if missing. Caller is responsible for being inside a
189
+ * Yjs transaction if atomic creation matters.
190
+ */
191
+ declare function getOrCreateBlockPendingMap(yDoc: Y.Doc, blockId: string): Y.Map<unknown>;
192
+ /**
193
+ * Read all pending invocations for a block as plain JS objects.
194
+ * Returns an array sorted by `emittedAt` ascending (oldest first).
195
+ */
196
+ declare function readPendingInvocations(yDoc: Y.Doc, blockId: string): PendingInvocation[];
197
+ /**
198
+ * Idempotently write a pending invocation under its deterministic id.
199
+ *
200
+ * Returns true if a new entry was created, false if the id already
201
+ * existed (meaning another client or a previous reconciliation pass
202
+ * already queued this invocation). This is the property that makes
203
+ * `reconcilePendingInvocations` safe to run from multiple clients
204
+ * simultaneously and across page refreshes — see plan §18.
205
+ *
206
+ * Wraps the write in a Yjs transaction so the existence check and the
207
+ * subsequent set are atomic from the local client's perspective. Concurrent
208
+ * clients each computing the same id will all converge to a single entry
209
+ * because Y.Map.set with the same key is last-writer-wins on identical
210
+ * content.
211
+ */
212
+ declare function queuePendingInvocation(yDoc: Y.Doc, listenerBlockId: string, invocation: PendingInvocation): boolean;
213
+ /**
214
+ * Remove a pending invocation by id. Used when the assignee completes the
215
+ * invocation (transitioning to a `block.run` audit trail entry) or when
216
+ * the expiration sweep marks it as expired.
217
+ */
218
+ declare function removePendingInvocation(yDoc: Y.Doc, listenerBlockId: string, pendingInvocationId: string): boolean;
219
+ /**
220
+ * Append a run record to the audit trail for a block. Run records are
221
+ * stored as audit trail events with `type: 'block.run'` and the structured
222
+ * data in `details`. Per Phase 0 #2 of eng review pass 2, this avoids
223
+ * inventing a parallel `_yRunHistory` storage system.
224
+ *
225
+ * Y.Array.push from concurrent clients merges correctly — verified by the
226
+ * existing `useAuditTrail` shipping in production.
227
+ */
228
+ declare function appendRunRecord(yDoc: Y.Doc, blockId: string, details: RunRecordDetails, userId: string): void;
229
+ /**
230
+ * Read all run records for a block from the audit trail. Filters audit
231
+ * trail entries to only those with `type: 'block.run'`.
232
+ */
233
+ declare function readRunRecords(yDoc: Y.Doc, blockId: string): RunRecordDetails[];
234
+ /**
235
+ * A failed listener run, attributed to the source block emission that
236
+ * triggered it. Used by the failure visibility surface (CP-1) on source
237
+ * blocks: the source block can show "N listeners failed for your last run".
238
+ */
239
+ interface FailedListenerRun {
240
+ /** Block id of the listener whose run failed. */
241
+ listenerBlockId: string;
242
+ /** The full RunRecordDetails of the failed listener invocation. */
243
+ record: RunRecordDetails;
244
+ }
245
+ /**
246
+ * Find all failed listener runs that were triggered by a specific source
247
+ * block run. Walks every block's audit trail, filters to listener runs
248
+ * triggered by (sourceBlockId, sourceRunId), and returns the ones with an
249
+ * error set.
250
+ *
251
+ * Used by the source block UI to show a failure badge linked to a specific
252
+ * run — if Sally evaluates 10 claims and 2 of Mike's emails fail, Sally
253
+ * sees "2 failed listeners on claim-G" rather than discovering it days
254
+ * later in the email service logs.
255
+ */
256
+ declare function findFailedListenersForSourceRun(yDoc: Y.Doc, sourceBlockId: string, sourceRunId: string, listenerBlockIds: string[]): FailedListenerRun[];
257
+ /**
258
+ * Replay a previously failed listener run by re-queueing a pending
259
+ * invocation with the same content. Reuses the original frozen payload
260
+ * and ref snapshots from the failed run record's audit trail entry, so the
261
+ * replay sees exactly the same data the original invocation saw.
262
+ *
263
+ * CP-2 from the plan. Used by the replay button in the failure visibility
264
+ * surface. Returns true if a new pending invocation was queued.
265
+ *
266
+ * Note: replay does NOT re-derive the deterministic id from the original
267
+ * source emission, because the original pending invocation's id is already
268
+ * present (or removed) in the pendingInvocations Y.Map. Instead, replay
269
+ * generates a fresh id by appending a `:replay-N` suffix to the original.
270
+ * This means the replay creates a NEW pending invocation that the assignee
271
+ * can act on, separate from any history of the original.
272
+ */
273
+ declare function replayFailedListenerRun(yDoc: Y.Doc, failedRecord: RunRecordDetails, listenerBlockId: string, originalPayload: Record<string, unknown>, originalRefSnapshots: Record<string, unknown>, assigneeDid: string): boolean;
274
+
275
+ /**
276
+ * Reconciliation loop — turns persisted run records into pending invocations
277
+ * idempotently, so the trigger system survives page refreshes and works
278
+ * across multiple connected clients.
279
+ *
280
+ * See `docs/events-and-triggers-plan.md` §18 for the full design rationale.
281
+ *
282
+ * Called from:
283
+ * - The editor lifecycle on open (alongside performDMNotificationScan)
284
+ * - The yDoc observer when remote run records arrive
285
+ * - Immediately after a local action completes
286
+ *
287
+ * Idempotency comes from `computePendingInvocationId` producing the same id
288
+ * for the same (sourceBlockId, sourceRunId, listenerBlockId, eventName,
289
+ * eventIndex) tuple. Both ends of a sync compute the same id, both call
290
+ * `Y.Map.set` on the same key, Yjs converges to one entry.
291
+ *
292
+ * The loop is intentionally write-only-on-new — it never deletes pending
293
+ * invocations. Removal happens elsewhere (assignee invokes, expiration sweep).
294
+ */
295
+ declare function reconcilePendingInvocations(editor: IxoEditorType): void;
296
+ declare function getActionForBlock(block: any): ReturnType<typeof getAction>;
297
+
40
298
  /**
41
299
  * Context passed to resolveRuntimeRefs when resolving inputs for a triggered
42
300
  * listener block. The runtime constructs this from a PendingInvocation when
@@ -91,4 +349,4 @@ declare function computeCID(content: Uint8Array): Promise<string>;
91
349
  */
92
350
  declare function computeJsonCID(obj: Record<string, any>): Promise<string>;
93
351
 
94
- export { ActionDefinition, ActionServices, buildServicesFromHandlers, canToType, computeCID, computeJsonCID, getAction, getActionByCan, getAllActions, getAllCanMappings, hasAction, registerAction, resolveRuntimeRefs, typeToCan };
352
+ export { ActionDefinition, ActionServices, type FailedListenerRun, type PendingInvocation, RUN_RECORD_AUDIT_TYPE, type RunRecordDetails, type TriggerResolutionContext, appendRunRecord, buildServicesFromHandlers, canToType, computeCID, computeJsonCID, computePendingInvocationId, findFailedListenersForSourceRun, getAction, getActionByCan, getActionForBlock, getAllActions, getAllCanMappings, getOrCreateBlockPendingMap, getPendingInvocationsMap, hasAction, queuePendingInvocation, readPendingInvocations, readRunRecords, reconcilePendingInvocations, registerAction, removePendingInvocation, replayFailedListenerRun, resolveRuntimeRefs, snapshotInputRefs, typeToCan };
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  resolveRuntimeRefs
3
- } from "../chunk-FXFKKA6L.mjs";
3
+ } from "../chunk-VE3WI2J2.mjs";
4
4
  import {
5
+ RUN_RECORD_AUDIT_TYPE,
6
+ appendRunRecord,
5
7
  buildAuthzFromProps,
6
8
  buildFlowNodeFromBlock,
7
9
  buildServicesFromHandlers,
8
10
  canToType,
9
11
  clearRuntimeForTemplateClone,
10
12
  compileBaseUcanFlow,
13
+ computePendingInvocationId,
11
14
  createInvocationStore,
12
15
  createMemoryInvocationStore,
13
16
  createMemoryUcanDelegationStore,
@@ -16,29 +19,42 @@ import {
16
19
  createUcanService,
17
20
  decompileToBaseUcanFlow,
18
21
  executeNode,
22
+ findFailedListenersForSourceRun,
19
23
  getAction,
20
24
  getActionByCan,
25
+ getActionForBlock,
21
26
  getActiveEditor,
22
27
  getAllActions,
23
28
  getAllCanMappings,
29
+ getOrCreateBlockPendingMap,
30
+ getPendingInvocationsMap,
24
31
  hasAction,
25
32
  isAuthorized,
26
33
  isRuntimeRef,
27
34
  mergeCompiledFlows,
35
+ queuePendingInvocation,
28
36
  readCompiledFlowFromYDoc,
29
37
  readFlow,
30
38
  readFlowAsBaseUcan,
31
39
  readFlowFromEditor,
40
+ readPendingInvocations,
41
+ readRunRecords,
42
+ reconcilePendingInvocations,
32
43
  registerAction,
44
+ removePendingInvocation,
45
+ replayFailedListenerRun,
33
46
  setActiveEditor,
34
47
  setupFlowFromBaseUcan,
48
+ snapshotInputRefs,
35
49
  typeToCan
36
- } from "../chunk-QIJA3CMG.mjs";
50
+ } from "../chunk-4ETFMWQR.mjs";
37
51
  import {
38
52
  computeCID,
39
53
  computeJsonCID
40
54
  } from "../chunk-VU34HOXM.mjs";
41
55
  export {
56
+ RUN_RECORD_AUDIT_TYPE,
57
+ appendRunRecord,
42
58
  buildAuthzFromProps,
43
59
  buildFlowNodeFromBlock,
44
60
  buildServicesFromHandlers,
@@ -47,6 +63,7 @@ export {
47
63
  compileBaseUcanFlow,
48
64
  computeCID,
49
65
  computeJsonCID,
66
+ computePendingInvocationId,
50
67
  createInvocationStore,
51
68
  createMemoryInvocationStore,
52
69
  createMemoryUcanDelegationStore,
@@ -55,23 +72,34 @@ export {
55
72
  createUcanService,
56
73
  decompileToBaseUcanFlow,
57
74
  executeNode,
75
+ findFailedListenersForSourceRun,
58
76
  getAction,
59
77
  getActionByCan,
78
+ getActionForBlock,
60
79
  getActiveEditor,
61
80
  getAllActions,
62
81
  getAllCanMappings,
82
+ getOrCreateBlockPendingMap,
83
+ getPendingInvocationsMap,
63
84
  hasAction,
64
85
  isAuthorized,
65
86
  isRuntimeRef,
66
87
  mergeCompiledFlows,
88
+ queuePendingInvocation,
67
89
  readCompiledFlowFromYDoc,
68
90
  readFlow,
69
91
  readFlowAsBaseUcan,
70
92
  readFlowFromEditor,
93
+ readPendingInvocations,
94
+ readRunRecords,
95
+ reconcilePendingInvocations,
71
96
  registerAction,
97
+ removePendingInvocation,
98
+ replayFailedListenerRun,
72
99
  resolveRuntimeRefs,
73
100
  setActiveEditor,
74
101
  setupFlowFromBaseUcan,
102
+ snapshotInputRefs,
75
103
  typeToCan
76
104
  };
77
105
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- import { v as FlowNode, F as FlowNodeAuthzExtension, t as FlowNodeRuntimeState, H as IxoEditorType, f as UcanService, I as InvocationStore, E as EvaluationStatus } from './index-BEoftwDZ.mjs';
1
+ import { w as FlowNode, F as FlowNodeAuthzExtension, u as FlowNodeRuntimeState, s as IxoEditorType, f as UcanService, I as InvocationStore, E as EvaluationStatus } from './index-CNCZs4wP.mjs';
2
2
  import * as Y from 'yjs';
3
3
  import { Doc } from 'yjs';
4
4
  import { MatrixClient } from 'matrix-js-sdk';
@@ -685,4 +685,4 @@ declare function readCompiledFlowFromYDoc(yDoc: Doc): CompiledFlow | null;
685
685
  */
686
686
  declare function decompileToBaseUcanFlow(compiled: CompiledFlow): BaseUcanFlow;
687
687
 
688
- export { type AuthorizationResult as A, type BaseUcanFlow as B, type CompilerRegistry as C, type ActionContext as D, type ExecuteNodeParams as E, type FlowRuntimeStateManager as F, type ActionResult as G, type ConditionRef as H, type ActorConstraint as I, type RuntimeRef as J, type CompiledBlock as K, type CompiledEdge as L, type MergeResult as M, type NodeActionResult as N, type OutputSchemaField as O, type CompiledFlowNode as P, isRuntimeRef as Q, type ReadFlowOptions as R, type SetupFlowOptions as S, type TTLConstraint as T, buildAuthzFromProps as a, buildFlowNodeFromBlock as b, createRuntimeStateManager as c, type ExecutionOutcome as d, executeNode as e, type ExecutionContext as f, readFlowFromEditor as g, readFlow as h, isAuthorized as i, setActiveEditor as j, getActiveEditor as k, compileBaseUcanFlow as l, readCompiledFlowFromYDoc as m, mergeCompiledFlows as n, decompileToBaseUcanFlow as o, type SetupFlowResult as p, type ReadFlowResult as q, readFlowAsBaseUcan as r, setupFlowFromBaseUcan as s, type ReadableEditor as t, type FlowCapability as u, type CompiledFlow as v, type FlowStrategy as w, type ActionDefinition as x, type ActionServices as y, clearRuntimeForTemplateClone as z };
688
+ export { type AuthorizationResult as A, type BaseUcanFlow as B, type CompilerRegistry as C, type ActionContext as D, type ExecuteNodeParams as E, type FlowRuntimeStateManager as F, type ActionResult as G, type ConditionRef as H, type ActorConstraint as I, type RuntimeRef as J, type CompiledBlock as K, type CompiledEdge as L, type MergeResult as M, type NodeActionResult as N, type OutputSchemaField as O, type CompiledFlowNode as P, type TriggerSpec as Q, type ReadFlowOptions as R, type SetupFlowOptions as S, type TTLConstraint as T, isRuntimeRef as U, buildAuthzFromProps as a, buildFlowNodeFromBlock as b, createRuntimeStateManager as c, type ExecutionOutcome as d, executeNode as e, type ExecutionContext as f, readFlowFromEditor as g, readFlow as h, isAuthorized as i, setActiveEditor as j, getActiveEditor as k, compileBaseUcanFlow as l, readCompiledFlowFromYDoc as m, mergeCompiledFlows as n, decompileToBaseUcanFlow as o, type SetupFlowResult as p, type ReadFlowResult as q, readFlowAsBaseUcan as r, setupFlowFromBaseUcan as s, type ReadableEditor as t, type FlowCapability as u, type CompiledFlow as v, type FlowStrategy as w, type ActionDefinition as x, type ActionServices as y, clearRuntimeForTemplateClone as z };
@@ -1,5 +1,5 @@
1
1
  import * as _blocknote_core from '@blocknote/core';
2
- import { J as IxoBlockProps, H as IxoEditorType, l as IxoEditorOptions, p as IxoCollaborativeEditorOptions, k as DelegationGrant } from './index-BEoftwDZ.mjs';
2
+ import { J as IxoBlockProps, s as IxoEditorType, l as IxoEditorOptions, p as IxoCollaborativeEditorOptions, k as DelegationGrant } from './index-CNCZs4wP.mjs';
3
3
  import { Text, Doc, Map, Array as Array$1 } from 'yjs';
4
4
  import React__default from 'react';
5
5
  import { MatrixClient } from 'matrix-js-sdk';
@@ -2044,6 +2044,65 @@ interface BlocknoteHandlers {
2044
2044
  /** Transaction hash */
2045
2045
  transactionHash: string;
2046
2046
  }>;
2047
+ /**
2048
+ * List entities where a given DID holds a specified role (e.g. 'controller').
2049
+ * Used by the POD setup flow to list parent organisations the user can nest under.
2050
+ */
2051
+ getEntitiesByRole?: (params: {
2052
+ /** DID of the actor */
2053
+ did: string;
2054
+ /** Role to filter by (e.g. 'controller', 'admin') */
2055
+ role: string;
2056
+ }) => Promise<Array<{
2057
+ did: string;
2058
+ name?: string;
2059
+ /** IXO entity type string, e.g. 'dao/dao', 'dao/pod', 'protocol/deed' */
2060
+ type?: string;
2061
+ icon?: string;
2062
+ description?: string;
2063
+ }>>;
2064
+ /**
2065
+ * List flow templates available for a given blueprint entity.
2066
+ * Used by the POD setup flow to let the user select startup flows.
2067
+ */
2068
+ getFlowTemplates?: (params: {
2069
+ /** Entity DID of the blueprint/protocol */
2070
+ entityDid: string;
2071
+ }) => Promise<Array<{
2072
+ did: string;
2073
+ name?: string;
2074
+ description?: string;
2075
+ }>>;
2076
+ /**
2077
+ * Create a Cosmos governance group from explicit members and decision policy.
2078
+ * Used by the POD setup flow after domain entity creation.
2079
+ */
2080
+ createGroup?: (params: {
2081
+ /** The entity DID of the newly created domain (to associate the group) */
2082
+ entityDid: string;
2083
+ /** Members with roles and voting power */
2084
+ members: Array<{
2085
+ did: string;
2086
+ role: string;
2087
+ votingPower: number;
2088
+ }>;
2089
+ /** Decision policy parameters */
2090
+ decisionPolicy: {
2091
+ votingPeriod: string;
2092
+ quorum: string;
2093
+ threshold: string;
2094
+ vetoThreshold: string;
2095
+ minExecutionDelay: string;
2096
+ executor: string;
2097
+ };
2098
+ /** Optional group name (defaults to entity name) */
2099
+ name?: string;
2100
+ }) => Promise<{
2101
+ /** The group/DAO core contract address */
2102
+ groupAddress: string;
2103
+ /** Transaction hash */
2104
+ transactionHash: string;
2105
+ }>;
2047
2106
  /**
2048
2107
  * Navigate to a flow link URL
2049
2108
  * @param url - HTTP URL of the target flow or page
@@ -2185,6 +2244,10 @@ interface BlocknoteHandlers {
2185
2244
  hasMore: boolean;
2186
2245
  };
2187
2246
  }>;
2247
+ /**
2248
+ * Invoke a named skill with the given payload and return the result.
2249
+ */
2250
+ invokeSkill?: (skillName: string, payload: Record<string, unknown>) => Promise<unknown>;
2188
2251
  }
2189
2252
  type DocType = 'template' | 'flow';
2190
2253
  /**
@@ -2235,7 +2298,7 @@ interface DomainCardData {
2235
2298
  [key: string]: unknown;
2236
2299
  }
2237
2300
  /**
2238
- * Renderer for domain card previews in the domainCardViewer block.
2301
+ * Renderer for domain card previews in the qi/domain.card-preview action.
2239
2302
  * The web app provides this renderer to display domain card data with proper styling.
2240
2303
  */
2241
2304
  type DomainCardRenderer = (domainCardData: DomainCardData) => React__default.ReactNode;