@ixo/editor 6.32.0 → 6.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-manifest-v2.schema.json +214 -0
- package/dist/action-manifest.json +16657 -3125
- package/dist/{chunk-S7CAGFE3.js → chunk-A4CWC4AG.js} +15 -14
- package/dist/chunk-A4CWC4AG.js.map +1 -0
- package/dist/{chunk-ZXNBOVAA.js → chunk-NEOPTPDF.js} +3024 -478
- package/dist/chunk-NEOPTPDF.js.map +1 -0
- package/dist/{chunk-37OKRZEK.js → chunk-VRCRDKN5.js} +1508 -743
- package/dist/chunk-VRCRDKN5.js.map +1 -0
- package/dist/{store-CqvAkvIZ.d.ts → connections-1NtNQrsY.d.ts} +340 -323
- package/dist/core/index.cjs +23307 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.ts +608 -251
- package/dist/core/index.js +467 -2
- package/dist/core/index.js.map +1 -1
- package/dist/{graphql-client-ZY4Iw0jB.d.ts → graphql-client-Bn0tN049.d.ts} +6 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mantine/index.d.ts +5 -5
- package/dist/mantine/index.js +2 -2
- package/dist/mantine/index.js.map +1 -1
- package/dist/{nodeContext-C-BsYuYi.d.ts → nodeContext-CV9D4s3X.d.ts} +1 -1
- package/dist/{index-Up8gA_E9.d.ts → runtime-BFwvCQDF.d.ts} +9393 -8728
- package/package.json +9 -5
- package/style.css.d.ts +5 -5
- package/dist/chunk-37OKRZEK.js.map +0 -1
- package/dist/chunk-S7CAGFE3.js.map +0 -1
- package/dist/chunk-ZXNBOVAA.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
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 {
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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
|
-
|
|
134
|
+
displayName: string;
|
|
135
|
+
description: string;
|
|
120
136
|
aliases: string[];
|
|
121
|
-
|
|
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
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
147
|
-
|
|
170
|
+
manifestVersion: typeof ACTION_MANIFEST_VERSION;
|
|
171
|
+
registryVersion: string;
|
|
172
|
+
manifestDigest: `sha256:${string}`;
|
|
148
173
|
actions: ActionManifestEntry[];
|
|
149
174
|
}
|
|
150
175
|
/**
|
|
151
|
-
* Generate
|
|
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
|
-
*
|
|
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 };
|