@ixo/editor 5.33.0 → 5.35.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.
@@ -357,6 +357,14 @@ registerAction({
357
357
  can: "pod/domain-indexer-lookup",
358
358
  sideEffect: false,
359
359
  defaultRequiresConfirmation: false,
360
+ inputSchema: {
361
+ type: "object",
362
+ required: [],
363
+ properties: {
364
+ userMessage: { type: "string", description: "The user-provided purpose text used to query the Domain Indexer." },
365
+ purposeDescription: { type: "string", description: "Fallback purpose text used when userMessage is absent." }
366
+ }
367
+ },
360
368
  outputSchema: [
361
369
  { path: "purposeDescription", displayName: "Purpose Description", type: "string", description: "The user-provided purpose text" },
362
370
  { path: "blueprintCandidates", displayName: "Blueprint Candidates", type: "array", description: "Ranked array of matching blueprint DIDs and metadata" }
@@ -388,6 +396,15 @@ registerAction({
388
396
  can: "pod/domain-single-selection",
389
397
  sideEffect: false,
390
398
  defaultRequiresConfirmation: false,
399
+ inputSchema: {
400
+ type: "object",
401
+ required: ["selectedBlueprintDid"],
402
+ properties: {
403
+ selectedBlueprintDid: { type: "string", description: "DID of the blueprint to select." },
404
+ selectedBlueprintName: { type: "string", description: "Display name of the selected blueprint." },
405
+ selectedBlueprintDescription: { type: "string", description: "Description of the selected blueprint." }
406
+ }
407
+ },
391
408
  outputSchema: [
392
409
  { path: "selectedBlueprintDid", displayName: "Selected Blueprint DID", type: "string", description: "DID of the selected blueprint" },
393
410
  { path: "selectedBlueprintName", displayName: "Selected Blueprint Name", type: "string", description: "Display name of the selected blueprint" },
@@ -433,6 +450,16 @@ registerAction({
433
450
  can: "pod/entity-single-selection",
434
451
  sideEffect: false,
435
452
  defaultRequiresConfirmation: false,
453
+ inputSchema: {
454
+ type: "object",
455
+ required: [],
456
+ properties: {
457
+ skipped: { type: "boolean", description: "True to skip selecting a parent entity, leaving parentDID null." },
458
+ selectedEntityDid: { type: "string", description: "DID of the selected parent entity; required when not skipping." },
459
+ selectedEntityName: { type: "string", description: "Display name of the selected parent entity." },
460
+ selectedEntityType: { type: "string", description: "Entity type of the selected parent entity." }
461
+ }
462
+ },
436
463
  outputSchema: [
437
464
  { path: "selectedEntityDid", displayName: "Selected Entity DID", type: "string", description: "DID of the selected parent entity, or null if skipped" },
438
465
  { path: "selectedEntityName", displayName: "Selected Entity Name", type: "string", description: "Display name of the selected parent entity" },
@@ -481,6 +508,17 @@ registerAction({
481
508
  can: "pod/member-multi-select",
482
509
  sideEffect: false,
483
510
  defaultRequiresConfirmation: false,
511
+ inputSchema: {
512
+ type: "object",
513
+ required: [],
514
+ properties: {
515
+ groupType: { type: "string", description: "Governance group type that determines which member fields apply; defaults to categorical." },
516
+ members: { type: "array", description: "Array of { did, role, votingPower } members; required for categorical and multisig groups." },
517
+ multisigThreshold: { type: "number", description: "Minimum number of signers required; used for multisig groups." },
518
+ nftContractAddress: { type: "string", description: "NFT staking contract address; required for nftStaking groups." },
519
+ tokenConfig: { type: "object", description: "Token configuration; required for tokenStaking groups." }
520
+ }
521
+ },
484
522
  outputSchema: [
485
523
  { path: "members", displayName: "Members", type: "array", description: "Array of { did, role, votingPower } \u2014 categorical/multisig only" },
486
524
  { path: "multisigThreshold", displayName: "Multisig Threshold", type: "number", description: "Minimum signers required \u2014 multisig only" },
@@ -563,6 +601,15 @@ registerAction({
563
601
  can: "pod/governance-config",
564
602
  sideEffect: false,
565
603
  defaultRequiresConfirmation: false,
604
+ inputSchema: {
605
+ type: "object",
606
+ required: ["groupName", "groupType", "governance"],
607
+ properties: {
608
+ groupName: { type: "string", description: "Human-readable name for the governance group." },
609
+ groupType: { type: "string", description: "Governance group type: categorical, multisig, nftStaking, or tokenStaking." },
610
+ governance: { type: "object", description: "Cosmos group decision policy parameters; must include votingPeriod." }
611
+ }
612
+ },
566
613
  outputSchema: [
567
614
  { path: "groupName", displayName: "Group Name", type: "string", description: "Human-readable name for the governance group" },
568
615
  { path: "groupType", displayName: "Group Type", type: "string", description: "Governance group type (categorical | multisig | nftStaking | tokenStaking)" },
@@ -638,6 +685,14 @@ registerAction({
638
685
  can: "pod/list-domain-flows",
639
686
  sideEffect: false,
640
687
  defaultRequiresConfirmation: false,
688
+ inputSchema: {
689
+ type: "object",
690
+ required: [],
691
+ properties: {
692
+ selectedProtocolTemplates: { type: "array", description: "Selected protocol templates, each with protocolDid and sourceRoomId; empty selection is valid." },
693
+ selectedFlowDids: { type: "array", description: "Source Matrix room IDs for selected templates; used as a fallback when no templates are selected." }
694
+ }
695
+ },
641
696
  outputSchema: [
642
697
  {
643
698
  path: "selectedProtocolTemplates",
@@ -939,6 +994,17 @@ registerAction({
939
994
  // to invoke it when the upstream event fires. See §3.6 of the
940
995
  // events-and-triggers plan.
941
996
  eligibleForEventTrigger: true,
997
+ inputSchema: {
998
+ type: "object",
999
+ required: ["endpoint"],
1000
+ properties: {
1001
+ endpoint: { type: "string", description: "The request URL. Either endpoint or its alias url must be provided." },
1002
+ url: { type: "string", description: "Alias for endpoint; the request URL. Either url or endpoint satisfies the URL requirement." },
1003
+ method: { type: "string", description: "HTTP method (GET, POST, etc.). Defaults to GET." },
1004
+ headers: { type: "object", description: "Request headers as a key/value map." },
1005
+ body: { type: "string", description: "Request body; sent for non-GET methods. Accepts a string or an object (serialized to JSON)." }
1006
+ }
1007
+ },
942
1008
  run: async (inputs, ctx) => {
943
1009
  const endpoint = inputs.endpoint ?? inputs.url;
944
1010
  const url = typeof endpoint === "string" ? endpoint : "";
@@ -989,6 +1055,21 @@ registerAction({
989
1055
  // When wired as a listener, the assignee on the email block is DM'd to
990
1056
  // invoke it for each pending event. See docs/events-and-triggers-plan.md §3.6.
991
1057
  eligibleForEventTrigger: true,
1058
+ inputSchema: {
1059
+ type: "object",
1060
+ required: ["to", "templateName"],
1061
+ properties: {
1062
+ to: { type: "string", description: "Recipient email address." },
1063
+ templateName: { type: "string", description: "The email template to send. A template is required \u2014 either templateName or its alias template must be provided." },
1064
+ template: { type: "string", description: "Alias for templateName; the template id to send. Either template or templateName satisfies the template requirement." },
1065
+ subject: { type: "string", description: "Email subject line." },
1066
+ templateVersion: { type: "string", description: "Optional specific version of the template to render." },
1067
+ variables: { type: "object", description: "Template variables to interpolate; may be passed as an object or a JSON string." },
1068
+ cc: { type: "string", description: "Carbon-copy recipient address." },
1069
+ bcc: { type: "string", description: "Blind-carbon-copy recipient address." },
1070
+ replyTo: { type: "string", description: "Reply-to address for the email." }
1071
+ }
1072
+ },
992
1073
  outputSchema: [
993
1074
  { path: "messageId", displayName: "Message ID", type: "string", description: "The unique ID of the sent email" },
994
1075
  { path: "sentAt", displayName: "Sent At", type: "string", description: "Timestamp when the email was sent" }
@@ -1035,6 +1116,13 @@ registerAction({
1035
1116
  sideEffect: true,
1036
1117
  defaultRequiresConfirmation: false,
1037
1118
  requiredCapability: "flow/execute",
1119
+ inputSchema: {
1120
+ type: "object",
1121
+ required: [],
1122
+ properties: {
1123
+ checked: { type: "boolean", description: "Whether the checkbox should be checked (defaults to true)." }
1124
+ }
1125
+ },
1038
1126
  run: async (inputs) => {
1039
1127
  const checked = inputs.checked !== void 0 ? !!inputs.checked : true;
1040
1128
  return { output: { checked } };
@@ -1069,6 +1157,13 @@ function registerFormSubmitAction(type, can) {
1069
1157
  sideEffect: true,
1070
1158
  defaultRequiresConfirmation: false,
1071
1159
  requiredCapability: "flow/execute",
1160
+ inputSchema: {
1161
+ type: "object",
1162
+ required: [],
1163
+ properties: {
1164
+ answers: { type: "object", description: "Form answers as an object or JSON-string object; also read from form.answers." }
1165
+ }
1166
+ },
1072
1167
  outputSchema: [
1073
1168
  { path: "form.answers", displayName: "Form Answers JSON", type: "string", description: "JSON stringified form answers, matching form block runtime output." },
1074
1169
  { path: "answers", displayName: "Form Answers", type: "object", description: "Parsed form answers object for convenience." }
@@ -1097,6 +1192,21 @@ registerAction({
1097
1192
  sideEffect: true,
1098
1193
  defaultRequiresConfirmation: true,
1099
1194
  requiredCapability: "notify/send",
1195
+ inputSchema: {
1196
+ type: "object",
1197
+ required: ["to"],
1198
+ properties: {
1199
+ channel: { type: "string", description: "Delivery channel for the notification." },
1200
+ to: { type: "array", description: "Recipient(s); a single value or array, at least one required." },
1201
+ cc: { type: "array", description: "CC recipients." },
1202
+ bcc: { type: "array", description: "BCC recipients." },
1203
+ subject: { type: "string", description: "Notification subject." },
1204
+ body: { type: "string", description: "Notification body content." },
1205
+ bodyType: { type: "string", description: "Body format: 'text' or 'html'." },
1206
+ from: { type: "string", description: "Sender address." },
1207
+ replyTo: { type: "string", description: "Reply-to address." }
1208
+ }
1209
+ },
1100
1210
  run: async (inputs, ctx) => {
1101
1211
  if (!ctx.services.notify) {
1102
1212
  throw new Error("Notification service not configured");
@@ -1138,6 +1248,16 @@ registerAction({
1138
1248
  sideEffect: true,
1139
1249
  defaultRequiresConfirmation: true,
1140
1250
  requiredCapability: "flow/block/execute",
1251
+ inputSchema: {
1252
+ type: "object",
1253
+ required: ["collectionId", "role", "surveyAnswers"],
1254
+ properties: {
1255
+ collectionId: { type: "string", description: "Claim collection identifier the bid is submitted against." },
1256
+ role: { type: "string", description: "Bid role: service_agent or evaluation_agent." },
1257
+ surveyAnswers: { type: "object", description: "Survey answers object (or a JSON string parsed to an object) attached to the bid." },
1258
+ deedDid: { type: "string", description: "Optional deed/entity DID associated with the bid." }
1259
+ }
1260
+ },
1141
1261
  outputSchema: [
1142
1262
  { path: "bidId", displayName: "Bid ID", type: "string", description: "The submitted bid identifier" },
1143
1263
  { path: "collectionId", displayName: "Collection ID", type: "string", description: "Claim collection identifier" },
@@ -1224,6 +1344,22 @@ registerAction({
1224
1344
  { path: "applicantDid", displayName: "Applicant DID", type: "string", description: "Applicant DID" },
1225
1345
  { path: "applicantAddress", displayName: "Applicant Address", type: "string", description: "Applicant wallet address" }
1226
1346
  ],
1347
+ inputSchema: {
1348
+ type: "object",
1349
+ required: ["decision", "bidId", "collectionId", "deedDid", "role", "applicantDid", "applicantAddress"],
1350
+ properties: {
1351
+ decision: { type: "string", description: "Evaluation decision: approve or reject." },
1352
+ bidId: { type: "string", description: "Identifier of the bid being evaluated." },
1353
+ collectionId: { type: "string", description: "Claim collection identifier." },
1354
+ deedDid: { type: "string", description: "Deed (entity) DID." },
1355
+ role: { type: "string", description: "Applicant role: service_agent (sa) or evaluation_agent (ea)." },
1356
+ applicantDid: { type: "string", description: "Applicant DID." },
1357
+ applicantAddress: { type: "string", description: "Applicant wallet address." },
1358
+ adminAddress: { type: "string", description: "Entity admin account address; required when decision is approve." },
1359
+ maxAmounts: { type: "string", description: "JSON-encoded per-claim max amounts for the evaluation_agent approval." },
1360
+ reason: { type: "string", description: "Rejection reason; required when decision is reject." }
1361
+ }
1362
+ },
1227
1363
  run: async (inputs, ctx) => {
1228
1364
  const service = ctx.services.bid;
1229
1365
  if (!service) {
@@ -1424,6 +1560,17 @@ registerAction({
1424
1560
  defaultRequiresConfirmation: true,
1425
1561
  requiredCapability: "flow/block/execute",
1426
1562
  eligibleForEventTrigger: true,
1563
+ inputSchema: {
1564
+ type: "object",
1565
+ required: ["deedDid", "collectionId", "adminAddress", "surveyAnswers"],
1566
+ properties: {
1567
+ deedDid: { type: "string", description: "The entity/deed DID that owns the claim collection." },
1568
+ collectionId: { type: "string", description: "The claim collection to submit into." },
1569
+ adminAddress: { type: "string", description: "The claim collection admin's chain address." },
1570
+ surveyAnswers: { type: "object", description: "The claim's answer data (the submitted form); may be passed as an object or a JSON string." },
1571
+ pin: { type: "string", description: "Verification PIN; requested at runtime if omitted." }
1572
+ }
1573
+ },
1427
1574
  // Static fallback — used until a collection is picked and the survey
1428
1575
  // schema is materialised. `getDynamicOutputSchema` takes over after that.
1429
1576
  outputSchema: BASELINE_OUTPUT,
@@ -2132,6 +2279,30 @@ registerAction({
2132
2279
  }
2133
2280
  ];
2134
2281
  },
2282
+ inputSchema: {
2283
+ type: "object",
2284
+ required: ["decision", "claimId", "collectionId", "deedDid", "adminAddress"],
2285
+ properties: {
2286
+ decision: { type: "string", description: "Evaluation decision: approve or reject." },
2287
+ claimId: { type: "string", description: "Identifier of the claim being evaluated." },
2288
+ collectionId: { type: "string", description: "Claim collection identifier." },
2289
+ deedDid: { type: "string", description: "Deed (entity) DID." },
2290
+ adminAddress: { type: "string", description: "Entity admin account address for the on-chain evaluation." },
2291
+ amount: { type: "object", description: "Payout coin (denom + amount); accepts a JSON string, object, or array." },
2292
+ createUdid: { type: "boolean", description: "Whether to generate and sign a verification UDID proof." },
2293
+ capabilityCid: { type: "string", description: "Capability CID used when creating the UDID; defaults to deedDid." },
2294
+ rubricAuthority: { type: "string", description: "Rubric authority used when creating the UDID; defaults to deedDid." },
2295
+ rubricId: { type: "string", description: "Rubric identifier used when creating the UDID; defaults to deedDid." },
2296
+ granteeAddress: { type: "string", description: "Evaluator address; resolves to the current user when omitted." },
2297
+ verificationProof: { type: "string", description: "Pre-existing verification proof URL; skips UDID creation when set." },
2298
+ traceCid: { type: "string", description: "Trace CID passed through to the UDID." },
2299
+ items: { type: "array", description: "Evaluation items passed through to the UDID." },
2300
+ patch: { type: "object", description: "Patch object passed through to the UDID." },
2301
+ xeroInvoiceBlockId: { type: "string", description: "Bound Xero invoice block id to queue invoice work on approval." },
2302
+ xeroPaymentBlockId: { type: "string", description: "Bound Xero payment block id used when resolving Xero bindings." },
2303
+ claimSnapshot: { type: "object", description: "Claim snapshot used to build the Xero invoice scope." }
2304
+ }
2305
+ },
2135
2306
  run: async (inputs, ctx) => {
2136
2307
  const service = ctx.services.claim;
2137
2308
  if (!service) {
@@ -2345,6 +2516,16 @@ registerAction({
2345
2516
  sideEffect: true,
2346
2517
  defaultRequiresConfirmation: true,
2347
2518
  requiredCapability: "flow/block/execute",
2519
+ inputSchema: {
2520
+ type: "object",
2521
+ required: ["coreAddress", "title", "description"],
2522
+ properties: {
2523
+ coreAddress: { type: "string", description: "The DAO core contract address." },
2524
+ title: { type: "string", description: "The proposal title." },
2525
+ description: { type: "string", description: "The proposal description." },
2526
+ actions: { type: "array", description: "Optional proposal actions (array or JSON string array)." }
2527
+ }
2528
+ },
2348
2529
  outputSchema: [
2349
2530
  { path: "proposalId", displayName: "Proposal ID", type: "string", description: "The on-chain proposal identifier" },
2350
2531
  { path: "status", displayName: "Proposal Status", type: "string", description: "Current proposal status (open, passed, rejected, executed, etc.)" },
@@ -2412,6 +2593,16 @@ registerAction({
2412
2593
  sideEffect: true,
2413
2594
  defaultRequiresConfirmation: true,
2414
2595
  requiredCapability: "flow/block/execute",
2596
+ inputSchema: {
2597
+ type: "object",
2598
+ required: ["proposalId", "vote", "proposalContractAddress"],
2599
+ properties: {
2600
+ proposalId: { type: "number", description: "The proposal number to vote on." },
2601
+ vote: { type: "string", description: "The vote to cast: yes, no, no_with_veto, or abstain." },
2602
+ proposalContractAddress: { type: "string", description: "The proposal module contract address." },
2603
+ rationale: { type: "string", description: "Optional rationale provided with the vote." }
2604
+ }
2605
+ },
2415
2606
  outputSchema: [
2416
2607
  { path: "vote", displayName: "Vote", type: "string", description: "The vote cast (yes, no, no_with_veto, abstain)" },
2417
2608
  { path: "rationale", displayName: "Rationale", type: "string", description: "Optional rationale provided with the vote" },
@@ -2457,6 +2648,15 @@ registerAction({
2457
2648
  can: "protocol/select",
2458
2649
  sideEffect: false,
2459
2650
  defaultRequiresConfirmation: false,
2651
+ inputSchema: {
2652
+ type: "object",
2653
+ required: ["selectedProtocolDid"],
2654
+ properties: {
2655
+ selectedProtocolDid: { type: "string", description: "DID of the protocol to select." },
2656
+ selectedProtocolName: { type: "string", description: "Display name of the selected protocol." },
2657
+ selectedProtocolType: { type: "string", description: "Type of the selected protocol." }
2658
+ }
2659
+ },
2460
2660
  outputSchema: [
2461
2661
  { path: "selectedProtocolDid", displayName: "Selected Protocol DID", type: "string", description: "DID of the selected protocol" },
2462
2662
  { path: "selectedProtocolName", displayName: "Selected Protocol Name", type: "string", description: "Display name of the selected protocol" },
@@ -3724,6 +3924,28 @@ registerAction({
3724
3924
  defaultRequiresConfirmation: true,
3725
3925
  requiredCapability: "flow/block/execute",
3726
3926
  eligibleForEventTrigger: true,
3927
+ inputSchema: {
3928
+ type: "object",
3929
+ required: ["domainCardData"],
3930
+ properties: {
3931
+ domainCardData: {
3932
+ type: "object",
3933
+ description: "Domain card envelope (object or JSON string) with credentialSubject.name; signed and used to create the domain."
3934
+ },
3935
+ entityType: { type: "string", description: "Optional on-chain entity type; defaults from the credential type or dao/pod." },
3936
+ governanceConfig: { type: "object", description: "Optional governance group config (object or JSON string) used to create a governance group." },
3937
+ memberConfig: { type: "object", description: "Optional member config (object or JSON string) for the governance group." },
3938
+ flowTemplateConfig: { type: "object", description: "Optional flow template config (object or JSON string) with selected protocol templates." },
3939
+ context: { type: "array", description: "Optional context entries (array of { key, val } or JSON string) attached to the domain." },
3940
+ selectedEntityDid: { type: "string", description: "Optional parent entity DID to link the new POD to." },
3941
+ parentDid: { type: "string", description: "Optional parent entity DID (alternate field)." },
3942
+ parentDID: { type: "string", description: "Optional parent entity DID (alternate field)." },
3943
+ skipped: { type: "boolean", description: "Optional flag that skips parent entity linking." },
3944
+ parentSkipped: { type: "boolean", description: "Optional flag that skips parent entity linking." },
3945
+ pendingInvocationId: { type: "string", description: "Optional invocation ID used as the checkpoint key for resumable runs." },
3946
+ invocationId: { type: "string", description: "Optional invocation ID used as the checkpoint key for resumable runs." }
3947
+ }
3948
+ },
3727
3949
  outputSchema: [
3728
3950
  { path: "entityDid", displayName: "Entity DID", type: "string", description: "The DID of the newly created domain entity" },
3729
3951
  {
@@ -4103,6 +4325,20 @@ registerAction({
4103
4325
  can: "domain/card-preview",
4104
4326
  sideEffect: false,
4105
4327
  defaultRequiresConfirmation: false,
4328
+ inputSchema: {
4329
+ type: "object",
4330
+ required: ["domainCardData"],
4331
+ properties: {
4332
+ domainCardData: {
4333
+ type: "object",
4334
+ description: "Domain card envelope (object or JSON string) with credentialSubject.name; echoed forward for signing."
4335
+ },
4336
+ domainPreviewData: {
4337
+ type: "object",
4338
+ description: "Oracle-enriched human-facing preview of the domain card (object or JSON string)."
4339
+ }
4340
+ }
4341
+ },
4106
4342
  outputSchema: [
4107
4343
  {
4108
4344
  path: "domainCardData",
@@ -4168,6 +4404,13 @@ registerAction({
4168
4404
  can: "oracle/query",
4169
4405
  sideEffect: false,
4170
4406
  defaultRequiresConfirmation: false,
4407
+ inputSchema: {
4408
+ type: "object",
4409
+ required: ["prompt"],
4410
+ properties: {
4411
+ prompt: { type: "string", description: "The prompt text sent to the companion." }
4412
+ }
4413
+ },
4171
4414
  outputSchema: [{ path: "prompt", displayName: "Prompt", type: "string", description: "The prompt sent to the companion" }],
4172
4415
  run: async (inputs, ctx) => {
4173
4416
  const prompt = String(inputs.prompt || "").trim();
@@ -4189,6 +4432,15 @@ registerAction({
4189
4432
  sideEffect: true,
4190
4433
  defaultRequiresConfirmation: true,
4191
4434
  requiredCapability: "flow/execute",
4435
+ inputSchema: {
4436
+ type: "object",
4437
+ required: ["credentialKey", "credential"],
4438
+ properties: {
4439
+ credentialKey: { type: "string", description: "Key under which to store the credential (e.g. kycamllevel1)." },
4440
+ credential: { type: "object", description: "The credential to store as a JSON object (also accepts a JSON string)." },
4441
+ roomId: { type: "string", description: "Matrix room ID to store the credential in; defaults to empty." }
4442
+ }
4443
+ },
4192
4444
  outputSchema: [
4193
4445
  { path: "credentialKey", displayName: "Credential Key", type: "string", description: "Key under which credential was stored (e.g. kycamllevel1)" },
4194
4446
  { path: "cid", displayName: "Content ID", type: "string", description: "IPFS-compatible CID of the credential (used for deduplication)" },
@@ -4241,6 +4493,17 @@ registerAction({
4241
4493
  sideEffect: true,
4242
4494
  defaultRequiresConfirmation: true,
4243
4495
  requiredCapability: "flow/block/execute",
4496
+ inputSchema: {
4497
+ type: "object",
4498
+ required: ["rowIds", "verb", "paymentBlockId"],
4499
+ properties: {
4500
+ rowIds: { type: "array", description: "IDs of the rows in the payment block to operate on (at least one)." },
4501
+ verb: { type: "string", description: 'Which worker route to hit: "propose", "execute", or "check".' },
4502
+ paymentBlockId: { type: "string", description: "The payment block ID so the oracle can edit_block back into the right place." },
4503
+ delegationCid: { type: "string", description: "Optional user's UCAN delegation CID to the oracle." },
4504
+ skill: { type: "object", description: "Optional skill context with cid and name." }
4505
+ }
4506
+ },
4244
4507
  outputSchema: [
4245
4508
  { path: "verb", displayName: "Action verb", type: "string" },
4246
4509
  { path: "rowCount", displayName: "Rows targeted", type: "number" },
@@ -4313,6 +4576,14 @@ registerAction({
4313
4576
  can: "matrix/dm",
4314
4577
  sideEffect: true,
4315
4578
  defaultRequiresConfirmation: false,
4579
+ inputSchema: {
4580
+ type: "object",
4581
+ required: ["targetDid", "message"],
4582
+ properties: {
4583
+ targetDid: { type: "string", description: "The recipient DID to direct-message." },
4584
+ message: { type: "string", description: "The message text to send." }
4585
+ }
4586
+ },
4316
4587
  outputSchema: [
4317
4588
  { path: "roomId", displayName: "Room ID", type: "string", description: "The Matrix room ID used for the DM" },
4318
4589
  { path: "sentAt", displayName: "Sent At", type: "string", description: "Timestamp when the message was sent" }
@@ -4342,6 +4613,11 @@ registerAction({
4342
4613
  can: "wallet/generate",
4343
4614
  sideEffect: false,
4344
4615
  defaultRequiresConfirmation: false,
4616
+ inputSchema: {
4617
+ type: "object",
4618
+ properties: {},
4619
+ required: []
4620
+ },
4345
4621
  outputSchema: [
4346
4622
  { path: "address", displayName: "Wallet Address", type: "string", description: "The generated IXO wallet address" },
4347
4623
  { path: "did", displayName: "DID", type: "string", description: "The DID derived from the wallet address" },
@@ -4363,6 +4639,14 @@ registerAction({
4363
4639
  can: "wallet/fund",
4364
4640
  sideEffect: true,
4365
4641
  defaultRequiresConfirmation: true,
4642
+ inputSchema: {
4643
+ type: "object",
4644
+ required: ["address"],
4645
+ properties: {
4646
+ address: { type: "string", description: "The IXO wallet address to fund." },
4647
+ amount: { type: "number", description: "Funding amount in base units (defaults to 250000)." }
4648
+ }
4649
+ },
4366
4650
  outputSchema: [{ path: "transactionHash", displayName: "Transaction Hash", type: "string", description: "The funding transaction hash" }],
4367
4651
  run: async (inputs, ctx) => {
4368
4652
  if (!ctx.services.oracle?.fundWallet) {
@@ -4383,6 +4667,13 @@ registerAction({
4383
4667
  can: "wallet/generateAndFund",
4384
4668
  sideEffect: true,
4385
4669
  defaultRequiresConfirmation: false,
4670
+ inputSchema: {
4671
+ type: "object",
4672
+ required: [],
4673
+ properties: {
4674
+ amount: { type: "number", description: "Funding amount in base units for the generated wallet (defaults to 250000)." }
4675
+ }
4676
+ },
4386
4677
  outputSchema: [
4387
4678
  { path: "address", displayName: "Wallet Address", type: "string", description: "The generated IXO wallet address" },
4388
4679
  { path: "did", displayName: "DID", type: "string", description: "The DID derived from the wallet address" },
@@ -4426,6 +4717,16 @@ registerAction({
4426
4717
  can: "iid/create",
4427
4718
  sideEffect: true,
4428
4719
  defaultRequiresConfirmation: false,
4720
+ inputSchema: {
4721
+ type: "object",
4722
+ required: ["mnemonic", "did", "address", "pubKey"],
4723
+ properties: {
4724
+ mnemonic: { type: "string", description: "Wallet mnemonic used to create the IID document." },
4725
+ did: { type: "string", description: "The DID for the IID document." },
4726
+ address: { type: "string", description: "The blockchain address." },
4727
+ pubKey: { type: "string", description: "The public key for the IID document." }
4728
+ }
4729
+ },
4429
4730
  outputSchema: [
4430
4731
  { path: "did", displayName: "DID", type: "string", description: "The IID document DID" },
4431
4732
  { path: "transactionHash", displayName: "Transaction Hash", type: "string", description: "The IID creation transaction hash" }
@@ -4454,6 +4755,18 @@ registerAction({
4454
4755
  can: "matrix/register",
4455
4756
  sideEffect: true,
4456
4757
  defaultRequiresConfirmation: false,
4758
+ inputSchema: {
4759
+ type: "object",
4760
+ required: ["mnemonic", "address", "did", "pin", "oracleName"],
4761
+ properties: {
4762
+ mnemonic: { type: "string", description: "Wallet mnemonic used to register the Matrix account." },
4763
+ address: { type: "string", description: "The blockchain address." },
4764
+ did: { type: "string", description: "The DID associated with the Matrix account." },
4765
+ pin: { type: "string", description: "PIN used to register the Matrix account." },
4766
+ oracleName: { type: "string", description: "Oracle name for the Matrix account." },
4767
+ avatarUrl: { type: "string", description: "Avatar URL for the Matrix account." }
4768
+ }
4769
+ },
4457
4770
  outputSchema: [
4458
4771
  { path: "matrixUserId", displayName: "Matrix User ID", type: "string", description: "The Matrix user ID" },
4459
4772
  { path: "matrixAccessToken", displayName: "Matrix Access Token", type: "string", description: "The Matrix access token" },
@@ -4491,6 +4804,20 @@ registerAction({
4491
4804
  can: "identity/create",
4492
4805
  sideEffect: true,
4493
4806
  defaultRequiresConfirmation: false,
4807
+ inputSchema: {
4808
+ type: "object",
4809
+ required: ["mnemonic", "did", "address", "pubKey", "pin", "oracleName"],
4810
+ properties: {
4811
+ mnemonic: { type: "string", description: "Wallet mnemonic used to create the IID document and Matrix account." },
4812
+ did: { type: "string", description: "The DID for the IID document." },
4813
+ address: { type: "string", description: "The blockchain address." },
4814
+ pubKey: { type: "string", description: "The public key for the IID document." },
4815
+ pin: { type: "string", description: "PIN used to register the Matrix account." },
4816
+ oracleName: { type: "string", description: "Oracle name for the Matrix account." },
4817
+ avatarUrl: { type: "string", description: "Avatar URL for the Matrix account (mapped from form logoUrl)." },
4818
+ formAnswers: { type: "string", description: "JSON string of runtime form answers merged into inputs." }
4819
+ }
4820
+ },
4494
4821
  outputSchema: [
4495
4822
  { path: "did", displayName: "DID", type: "string", description: "The IID document DID" },
4496
4823
  { path: "transactionHash", displayName: "Transaction Hash", type: "string", description: "The IID creation transaction hash" },
@@ -4577,6 +4904,34 @@ registerAction({
4577
4904
  can: "entity/createOracle",
4578
4905
  sideEffect: true,
4579
4906
  defaultRequiresConfirmation: false,
4907
+ inputSchema: {
4908
+ type: "object",
4909
+ required: ["mnemonic", "address", "did", "pubKey", "pin", "matrixAccessToken", "matrixRoomId", "oracleName", "apiUrl", "price"],
4910
+ properties: {
4911
+ mnemonic: { type: "string", description: "BIP39 mnemonic for the oracle wallet." },
4912
+ address: { type: "string", description: "The oracle wallet address." },
4913
+ did: { type: "string", description: "The oracle DID." },
4914
+ pubKey: { type: "string", description: "The oracle wallet public key." },
4915
+ pin: { type: "string", description: "PIN used to sign the oracle entity creation." },
4916
+ matrixAccessToken: { type: "string", description: "Matrix access token for the oracle." },
4917
+ matrixRoomId: { type: "string", description: "Matrix room ID for the oracle." },
4918
+ oracleName: { type: "string", description: "Display name of the oracle." },
4919
+ apiUrl: { type: "string", description: "The oracle API URL." },
4920
+ price: { type: "string", description: "The oracle subscription price." },
4921
+ orgName: { type: "string", description: "Optional organization name." },
4922
+ description: { type: "string", description: "Optional oracle description." },
4923
+ location: { type: "string", description: "Optional oracle location." },
4924
+ logoUrl: { type: "string", description: "Optional oracle logo URL." },
4925
+ coverImageUrl: { type: "string", description: "Optional oracle cover image URL." },
4926
+ llmModel: { type: "string", description: "Optional LLM model identifier." },
4927
+ opening: { type: "string", description: "Optional oracle opening message." },
4928
+ communicationStyle: { type: "string", description: "Optional oracle communication style." },
4929
+ capabilities: { type: "array", description: "Optional oracle capabilities." },
4930
+ mcpConfig: { type: "object", description: "Optional MCP configuration." },
4931
+ parentProtocol: { type: "string", description: "Optional parent protocol DID." },
4932
+ formAnswers: { type: "string", description: "Optional JSON string of form answers merged into inputs." }
4933
+ }
4934
+ },
4580
4935
  outputSchema: [
4581
4936
  { path: "entityDid", displayName: "Entity DID", type: "string", description: "The oracle entity DID" },
4582
4937
  { path: "transactionHash", displayName: "Transaction Hash", type: "string", description: "The entity creation transaction hash" },
@@ -4651,6 +5006,14 @@ registerAction({
4651
5006
  can: "sandbox/provision",
4652
5007
  sideEffect: true,
4653
5008
  defaultRequiresConfirmation: false,
5009
+ inputSchema: {
5010
+ type: "object",
5011
+ required: ["entityDid", "matrixRoomId"],
5012
+ properties: {
5013
+ entityDid: { type: "string", description: "Oracle entity DID to provision a sandbox for." },
5014
+ matrixRoomId: { type: "string", description: "Matrix room id associated with the oracle." }
5015
+ }
5016
+ },
4654
5017
  outputSchema: [
4655
5018
  { path: "sandboxUrl", displayName: "Sandbox URL", type: "string", description: "The provisioned sandbox URL" },
4656
5019
  { path: "status", displayName: "Status", type: "string", description: "Provisioning status" }
@@ -4675,6 +5038,13 @@ registerAction({
4675
5038
  can: "oracle/contract",
4676
5039
  sideEffect: true,
4677
5040
  defaultRequiresConfirmation: false,
5041
+ inputSchema: {
5042
+ type: "object",
5043
+ required: ["oracleEntityDid"],
5044
+ properties: {
5045
+ oracleEntityDid: { type: "string", description: "Oracle entity DID from the entity.createOracle output." }
5046
+ }
5047
+ },
4678
5048
  outputSchema: [
4679
5049
  { path: "userOracleRoomId", displayName: "User\u2194Oracle Room ID", type: "string", description: "Matrix room id of the user\u2194oracle DM room" },
4680
5050
  { path: "userOracleRoomAlias", displayName: "User\u2194Oracle Room Alias", type: "string", description: "Matrix alias of the user\u2194oracle DM room" }
@@ -4698,6 +5068,34 @@ registerAction({
4698
5068
  can: "oracle/storeSecrets",
4699
5069
  sideEffect: true,
4700
5070
  defaultRequiresConfirmation: false,
5071
+ inputSchema: {
5072
+ type: "object",
5073
+ required: [
5074
+ "matrixRoomId",
5075
+ "publicKeyMultibase",
5076
+ "verificationMethodId",
5077
+ "matrixHomeServerUrl",
5078
+ "matrixUsername",
5079
+ "matrixPassword",
5080
+ "mnemonic",
5081
+ "matrixRecoveryPhrase",
5082
+ "pin",
5083
+ "openRouterApiKeyJwe"
5084
+ ],
5085
+ properties: {
5086
+ matrixRoomId: { type: "string", description: "Matrix room id from the oracle.contract output." },
5087
+ publicKeyMultibase: { type: "string", description: "Oracle public key (multibase) from the entity.createOracle output." },
5088
+ verificationMethodId: { type: "string", description: "Verification method id from the entity.createOracle output." },
5089
+ matrixHomeServerUrl: { type: "string", description: "Matrix homeserver URL from the matrix.register output." },
5090
+ matrixUsername: { type: "string", description: "Matrix username from the matrix.register output." },
5091
+ matrixPassword: { type: "string", description: "Matrix password from the matrix.register output." },
5092
+ mnemonic: { type: "string", description: "Wallet mnemonic from the wallet.generate output." },
5093
+ matrixRecoveryPhrase: { type: "string", description: "Matrix recovery phrase from the matrix.register output." },
5094
+ pin: { type: "string", description: "PIN from the form output." },
5095
+ openRouterApiKeyJwe: { type: "string", description: "JWE-encrypted OpenRouter API key from the form." },
5096
+ mcpAuthSecrets: { type: "object", description: "Optional pre-encrypted MCP auth secrets (object or JSON string)." }
5097
+ }
5098
+ },
4701
5099
  outputSchema: [
4702
5100
  { path: "storedSecrets", displayName: "Stored Secrets", type: "array", description: "List of secret names stored" },
4703
5101
  { path: "roomId", displayName: "Room ID", type: "string", description: "Matrix room where secrets are stored" }
@@ -4760,6 +5158,31 @@ registerAction({
4760
5158
  can: "oracle/storeConfig",
4761
5159
  sideEffect: true,
4762
5160
  defaultRequiresConfirmation: false,
5161
+ inputSchema: {
5162
+ type: "object",
5163
+ required: ["matrixRoomId", "oracleName", "entityDid"],
5164
+ properties: {
5165
+ matrixRoomId: { type: "string", description: "Matrix room id from the oracle.contract output." },
5166
+ oracleName: { type: "string", description: "Oracle name." },
5167
+ entityDid: { type: "string", description: "Oracle entity DID." },
5168
+ orgName: { type: "string", description: "Organisation name." },
5169
+ description: { type: "string", description: "Oracle description." },
5170
+ location: { type: "string", description: "Oracle location." },
5171
+ price: { type: "number", description: "Oracle price; defaults to 0." },
5172
+ apiUrl: { type: "string", description: "Oracle API URL." },
5173
+ logoUrl: { type: "string", description: "Oracle logo URL." },
5174
+ llmModel: { type: "string", description: "LLM model identifier." },
5175
+ opening: { type: "string", description: "Oracle opening message." },
5176
+ communicationStyle: { type: "string", description: "Oracle communication style." },
5177
+ capabilities: { type: "string", description: "Oracle capabilities description." },
5178
+ skills: { type: "array", description: "List of oracle skills." },
5179
+ mcpServers: { type: "array", description: "List of configured MCP servers." },
5180
+ matrixUserId: { type: "string", description: "Oracle Matrix user id." },
5181
+ matrixAccountRoomId: { type: "string", description: "Oracle Matrix account room id." },
5182
+ oracleAddress: { type: "string", description: "Oracle wallet address." },
5183
+ oracleDid: { type: "string", description: "Oracle DID." }
5184
+ }
5185
+ },
4763
5186
  outputSchema: [
4764
5187
  { path: "configStored", displayName: "Config Stored", type: "boolean", description: "Whether the oracle config was stored successfully" },
4765
5188
  { path: "roomId", displayName: "Room ID", type: "string", description: "The Matrix room ID where config was stored" }
@@ -4805,6 +5228,54 @@ registerAction({
4805
5228
  can: "oracle/storeSecretsAndConfig",
4806
5229
  sideEffect: true,
4807
5230
  defaultRequiresConfirmation: false,
5231
+ inputSchema: {
5232
+ type: "object",
5233
+ required: [
5234
+ "matrixRoomId",
5235
+ "publicKeyMultibase",
5236
+ "verificationMethodId",
5237
+ "matrixHomeServerUrl",
5238
+ "matrixUsername",
5239
+ "matrixPassword",
5240
+ "mnemonic",
5241
+ "matrixRecoveryPhrase",
5242
+ "pin",
5243
+ "openRouterApiKeyJwe",
5244
+ "oracleName",
5245
+ "entityDid"
5246
+ ],
5247
+ properties: {
5248
+ matrixRoomId: { type: "string", description: "Matrix room id from the oracle.contract output." },
5249
+ publicKeyMultibase: { type: "string", description: "Oracle public key (multibase) from the entity.createOracle output." },
5250
+ verificationMethodId: { type: "string", description: "Verification method id from the entity.createOracle output." },
5251
+ matrixHomeServerUrl: { type: "string", description: "Matrix homeserver URL from the matrix.register output." },
5252
+ matrixUsername: { type: "string", description: "Matrix username from the matrix.register output." },
5253
+ matrixPassword: { type: "string", description: "Matrix password from the matrix.register output." },
5254
+ mnemonic: { type: "string", description: "Wallet mnemonic from the wallet.generate output." },
5255
+ matrixRecoveryPhrase: { type: "string", description: "Matrix recovery phrase from the matrix.register output." },
5256
+ pin: { type: "string", description: "PIN from the form output." },
5257
+ openRouterApiKeyJwe: { type: "string", description: "JWE-encrypted OpenRouter API key from the form." },
5258
+ mcpAuthSecrets: { type: "object", description: "Optional pre-encrypted MCP auth secrets (object or JSON string)." },
5259
+ oracleName: { type: "string", description: "Oracle name." },
5260
+ entityDid: { type: "string", description: "Oracle entity DID." },
5261
+ orgName: { type: "string", description: "Organisation name." },
5262
+ description: { type: "string", description: "Oracle description." },
5263
+ location: { type: "string", description: "Oracle location." },
5264
+ price: { type: "number", description: "Oracle price; defaults to 0." },
5265
+ apiUrl: { type: "string", description: "Oracle API URL." },
5266
+ logoUrl: { type: "string", description: "Oracle logo URL." },
5267
+ llmModel: { type: "string", description: "LLM model identifier." },
5268
+ opening: { type: "string", description: "Oracle opening message." },
5269
+ communicationStyle: { type: "string", description: "Oracle communication style." },
5270
+ capabilities: { type: "string", description: "Oracle capabilities description." },
5271
+ skills: { type: "array", description: "List of oracle skills." },
5272
+ mcpServers: { type: "array", description: "List of configured MCP servers." },
5273
+ matrixUserId: { type: "string", description: "Oracle Matrix user id." },
5274
+ matrixAccountRoomId: { type: "string", description: "Oracle Matrix account room id." },
5275
+ oracleAddress: { type: "string", description: "Oracle wallet address." },
5276
+ oracleDid: { type: "string", description: "Oracle DID." }
5277
+ }
5278
+ },
4808
5279
  outputSchema: [
4809
5280
  { path: "storedSecrets", displayName: "Stored Secrets", type: "array", description: "List of secret names stored" },
4810
5281
  { path: "roomId", displayName: "Room ID", type: "string", description: "Matrix room where data is stored" },
@@ -4908,6 +5379,56 @@ registerAction({
4908
5379
  can: "oracle/configureOracle",
4909
5380
  sideEffect: true,
4910
5381
  defaultRequiresConfirmation: false,
5382
+ inputSchema: {
5383
+ type: "object",
5384
+ required: [
5385
+ "oracleEntityDid",
5386
+ "publicKeyMultibase",
5387
+ "verificationMethodId",
5388
+ "matrixHomeServerUrl",
5389
+ "matrixUsername",
5390
+ "matrixPassword",
5391
+ "mnemonic",
5392
+ "matrixRecoveryPhrase",
5393
+ "pin",
5394
+ "openRouterApiKeyJwe",
5395
+ "oracleName",
5396
+ "entityDid"
5397
+ ],
5398
+ properties: {
5399
+ formAnswers: { type: "string", description: "Optional JSON string of form answers merged into the inputs." },
5400
+ oracleEntityDid: { type: "string", description: "Oracle entity DID from the entity.createOracle output." },
5401
+ publicKeyMultibase: { type: "string", description: "Oracle public key (multibase) from the entity.createOracle output." },
5402
+ verificationMethodId: { type: "string", description: "Verification method id from the entity.createOracle output." },
5403
+ matrixHomeServerUrl: { type: "string", description: "Matrix homeserver URL from the matrix.register output." },
5404
+ matrixUsername: { type: "string", description: "Matrix username from the matrix.register output." },
5405
+ matrixPassword: { type: "string", description: "Matrix password from the matrix.register output." },
5406
+ mnemonic: { type: "string", description: "Wallet mnemonic from the wallet.generate output." },
5407
+ matrixRecoveryPhrase: { type: "string", description: "Matrix recovery phrase from the matrix.register output." },
5408
+ pin: { type: "string", description: "PIN from the form output." },
5409
+ openRouterApiKeyJwe: { type: "string", description: "JWE-encrypted OpenRouter API key from the form." },
5410
+ openRouterApiKeyPlaintext: { type: "string", description: "Optional plaintext OpenRouter API key passed through to the deploy output." },
5411
+ mcpAuthSecrets: { type: "object", description: "Optional pre-encrypted MCP auth secrets (object or JSON string)." },
5412
+ oracleName: { type: "string", description: "Oracle name." },
5413
+ entityDid: { type: "string", description: "Oracle entity DID." },
5414
+ orgName: { type: "string", description: "Organisation name." },
5415
+ description: { type: "string", description: "Oracle description." },
5416
+ location: { type: "string", description: "Oracle location." },
5417
+ price: { type: "number", description: "Oracle price; defaults to 0." },
5418
+ apiUrl: { type: "string", description: "Oracle API URL." },
5419
+ logoUrl: { type: "string", description: "Oracle logo URL." },
5420
+ llmModel: { type: "string", description: "LLM model identifier." },
5421
+ opening: { type: "string", description: "Oracle opening message." },
5422
+ communicationStyle: { type: "string", description: "Oracle communication style." },
5423
+ capabilities: { type: "string", description: "Oracle capabilities description." },
5424
+ skills: { type: "array", description: "List of oracle skills." },
5425
+ mcpServers: { type: "array", description: "List of configured MCP servers." },
5426
+ matrixUserId: { type: "string", description: "Oracle Matrix user id." },
5427
+ matrixAccountRoomId: { type: "string", description: "Oracle Matrix account room id." },
5428
+ oracleAddress: { type: "string", description: "Oracle wallet address." },
5429
+ oracleDid: { type: "string", description: "Oracle DID." }
5430
+ }
5431
+ },
4911
5432
  outputSchema: [
4912
5433
  { path: "userOracleRoomId", displayName: "User-Oracle Room ID", type: "string", description: "Matrix room id from contract phase" },
4913
5434
  { path: "userOracleRoomAlias", displayName: "User-Oracle Room Alias", type: "string", description: "Matrix alias from contract phase" },
@@ -5038,6 +5559,16 @@ registerAction({
5038
5559
  can: "oracle/deploySetup",
5039
5560
  sideEffect: true,
5040
5561
  defaultRequiresConfirmation: false,
5562
+ inputSchema: {
5563
+ type: "object",
5564
+ required: ["name", "config", "roomId"],
5565
+ properties: {
5566
+ name: { type: "string", description: "Project name from the form." },
5567
+ config: { type: "object", description: "Oracle config object (or its JSON string)." },
5568
+ roomId: { type: "string", description: "Matrix room id from the oracle contract/configure output." },
5569
+ secrets: { type: "object", description: "Optional map of secret name to value passed to deploy setup." }
5570
+ }
5571
+ },
5041
5572
  outputSchema: [
5042
5573
  { path: "setupComplete", displayName: "Setup Complete", type: "boolean", description: "Whether the oracle setup completed successfully" },
5043
5574
  { path: "stdout", displayName: "Build Output", type: "string", description: "Build stdout output" }
@@ -5062,6 +5593,16 @@ registerAction({
5062
5593
  can: "oracle/deployStart",
5063
5594
  sideEffect: true,
5064
5595
  defaultRequiresConfirmation: false,
5596
+ inputSchema: {
5597
+ type: "object",
5598
+ required: ["name", "entityDid", "roomId"],
5599
+ properties: {
5600
+ name: { type: "string", description: "Project name from the form." },
5601
+ entityDid: { type: "string", description: "Oracle entity DID from the entity.createOracle output." },
5602
+ roomId: { type: "string", description: "Matrix room id from the oracle contract/configure output." },
5603
+ secrets: { type: "object", description: "Optional map of secret name to value passed to deploy start." }
5604
+ }
5605
+ },
5065
5606
  outputSchema: [
5066
5607
  { path: "processId", displayName: "Process ID", type: "string", description: "Running process identifier" },
5067
5608
  { path: "status", displayName: "Status", type: "string", description: "Oracle process status" }
@@ -5085,6 +5626,17 @@ registerAction({
5085
5626
  can: "oracle/deploy",
5086
5627
  sideEffect: true,
5087
5628
  defaultRequiresConfirmation: false,
5629
+ inputSchema: {
5630
+ type: "object",
5631
+ required: ["name", "entityDid", "roomId", "config"],
5632
+ properties: {
5633
+ name: { type: "string", description: "Project name from the form." },
5634
+ entityDid: { type: "string", description: "Oracle entity DID from the entity.createOracle output." },
5635
+ roomId: { type: "string", description: "Matrix room id from the oracle.configureOracle output." },
5636
+ config: { type: "object", description: "Oracle config object (or its JSON string)." },
5637
+ secrets: { type: "object", description: "Optional map of secret name to value passed to deploy." }
5638
+ }
5639
+ },
5088
5640
  outputSchema: [
5089
5641
  { path: "setupComplete", displayName: "Setup Complete", type: "boolean", description: "Whether the oracle setup completed successfully" },
5090
5642
  { path: "processId", displayName: "Process ID", type: "string", description: "Running process identifier" },
@@ -5218,6 +5770,22 @@ registerAction({
5218
5770
  // manage-mode block bound to an existing collection is hidden from the
5219
5771
  // trigger picker as a source (IXO-2595).
5220
5772
  getDynamicEvents: (inputs) => String(inputs?.collectionId || "").trim() ? [] : [COLLECTION_CREATED_EVENT],
5773
+ inputSchema: {
5774
+ type: "object",
5775
+ required: ["operation"],
5776
+ properties: {
5777
+ operation: { type: "string", description: "Lifecycle op to dispatch: create | updateState | updateDates | updateQuota | updatePayments | updateIntents | refresh." },
5778
+ collectionId: { type: "string", description: "Target collection id; required for every op except create." },
5779
+ entity: { type: "string", description: "create \u2014 entity (deed) DID the collection belongs to." },
5780
+ protocol: { type: "string", description: "create \u2014 protocol DID the collection follows (must be a bare did:)." },
5781
+ state: { type: "number", description: "create/updateState \u2014 lifecycle state (0=OPEN, 1=PAUSED, 2=CLOSED)." },
5782
+ startDate: { type: "string", description: "create/updateDates \u2014 ISO-8601 start date." },
5783
+ endDate: { type: "string", description: "create/updateDates \u2014 ISO-8601 end date." },
5784
+ quota: { type: "string", description: 'create/updateQuota \u2014 max claims; "0" = unlimited.' },
5785
+ payments: { type: "object", description: "create/updatePayments \u2014 payment legs." },
5786
+ intents: { type: "object", description: "create/updateIntents \u2014 intent configuration." }
5787
+ }
5788
+ },
5221
5789
  run: async (inputs, ctx) => {
5222
5790
  const service = ctx.services.collection;
5223
5791
  if (!service) {
@@ -5399,6 +5967,24 @@ registerAction({
5399
5967
  // resolves the entity admin account from the payload `entity` and passes it
5400
5968
  // as `adminAddress`.
5401
5969
  eligibleForEventTrigger: true,
5970
+ inputSchema: {
5971
+ type: "object",
5972
+ required: ["operation", "collectionId", "adminAddress"],
5973
+ properties: {
5974
+ operation: { type: "string", description: "Which user-management operation to run: add | revoke | list." },
5975
+ collectionId: { type: "string", description: "Target claim collection identifier." },
5976
+ adminAddress: { type: "string", description: "Granter entity admin account address (the authz granter)." },
5977
+ role: { type: "string", description: "Which authorization to act on for add/revoke: submit or evaluate." },
5978
+ deedDid: { type: "string", description: "Entity (deed) DID forwarded to the handler." },
5979
+ granteeAddress: { type: "string", description: "The single grantee bech32 address for add/revoke." },
5980
+ granteeDid: { type: "string", description: "Optional resolved grantee DID for display or audit." },
5981
+ granteeKind: { type: "string", description: "How to treat the add grantee: user, group-account, or group-members." },
5982
+ agentQuota: { type: "string", description: "Remaining agent quota for add; 0 means unlimited." },
5983
+ maxAmount: { type: "array", description: "Per-claim max amount cap for the add evaluate role." },
5984
+ intentDurationNs: { type: "string", description: "Intent duration in nanoseconds for add, carried as a string." },
5985
+ members: { type: "array", description: "Resolved members to fan the grant out to when granteeKind is group-members." }
5986
+ }
5987
+ },
5402
5988
  run: async (inputs, ctx) => {
5403
5989
  const service = ctx.services.collectionUsers;
5404
5990
  if (!service) {
@@ -5534,6 +6120,13 @@ registerAction({
5534
6120
  can: "carbon/load",
5535
6121
  sideEffect: false,
5536
6122
  defaultRequiresConfirmation: false,
6123
+ inputSchema: {
6124
+ type: "object",
6125
+ required: ["ownerAddress"],
6126
+ properties: {
6127
+ ownerAddress: { type: "string", description: "Wallet address whose owner-side and entity-admin-side CARBON batches are reconciled." }
6128
+ }
6129
+ },
5537
6130
  outputSchema: CARBON_LOAD_OUTPUT,
5538
6131
  run: async (inputs, ctx) => {
5539
6132
  if (!ctx.services.carbon?.loadBatches) {
@@ -5553,6 +6146,14 @@ registerAction({
5553
6146
  can: "carbon/harvest",
5554
6147
  sideEffect: true,
5555
6148
  defaultRequiresConfirmation: true,
6149
+ inputSchema: {
6150
+ type: "object",
6151
+ required: ["ownerAddress", "tokens"],
6152
+ properties: {
6153
+ ownerAddress: { type: "string", description: "Wallet address owning the entity admin accounts to harvest from." },
6154
+ tokens: { type: "array", description: "Batches to harvest; each requires id, entityDid, adminAddress and a claimable amount > 0." }
6155
+ }
6156
+ },
5556
6157
  outputSchema: CARBON_HARVEST_OUTPUT,
5557
6158
  run: async (inputs, ctx) => {
5558
6159
  if (!ctx.services.carbon?.harvest) {
@@ -5584,6 +6185,16 @@ registerAction({
5584
6185
  can: "carbon/retire",
5585
6186
  sideEffect: true,
5586
6187
  defaultRequiresConfirmation: true,
6188
+ inputSchema: {
6189
+ type: "object",
6190
+ required: ["owner", "tokens"],
6191
+ properties: {
6192
+ owner: { type: "string", description: "Wallet address holding the credits to retire." },
6193
+ tokens: { type: "array", description: "Batches to retire; each requires an id and an amount > 0." },
6194
+ reason: { type: "string", description: 'Retirement reason (defaults to "offset").' },
6195
+ jurisdiction: { type: "string", description: 'Retirement jurisdiction (defaults to "Global").' }
6196
+ }
6197
+ },
5587
6198
  outputSchema: CARBON_RETIRE_OUTPUT,
5588
6199
  run: async (inputs, ctx) => {
5589
6200
  if (!ctx.services.carbon?.retire) {
@@ -5636,6 +6247,16 @@ registerAction({
5636
6247
  sideEffect: true,
5637
6248
  defaultRequiresConfirmation: true,
5638
6249
  outputSchema: ENTITY_TRANSFER_OUTPUT,
6250
+ inputSchema: {
6251
+ type: "object",
6252
+ required: ["entityDid", "recipientDid"],
6253
+ properties: {
6254
+ entityDid: { type: "string", description: "Entity DID being transferred (did:ixo:entity:\u2026)." },
6255
+ recipientDid: { type: "string", description: "New owner DID (user or did:ixo:wasm: controller)." },
6256
+ ownerDid: { type: "string", description: "Current owner DID; host defaults to the connected user when omitted." },
6257
+ ownerAddress: { type: "string", description: "Current owner address; host defaults to the connected user when omitted." }
6258
+ }
6259
+ },
5639
6260
  run: async (inputs, ctx) => {
5640
6261
  if (!ctx.services.entity?.transfer) {
5641
6262
  throw new Error("entity.transfer handler not available");
@@ -5714,6 +6335,22 @@ registerAction({
5714
6335
  defaultRequiresConfirmation: true,
5715
6336
  requiredCapability: "flow/block/execute",
5716
6337
  eligibleForEventTrigger: true,
6338
+ inputSchema: {
6339
+ type: "object",
6340
+ required: ["connection", "start_datetime"],
6341
+ properties: {
6342
+ connection: { type: "object", description: "Pinned Calendar connection with a connectedAccountId." },
6343
+ start_datetime: { type: "string", description: "Event start time (ISO 8601)." },
6344
+ end_datetime: { type: "string", description: "Optional event end time (ISO 8601)." },
6345
+ calendar_id: { type: "string", description: 'Calendar to write to; defaults to "primary".' },
6346
+ summary: { type: "string", description: "Optional event title." },
6347
+ description: { type: "string", description: "Optional event description." },
6348
+ location: { type: "string", description: "Optional event location." },
6349
+ timezone: { type: "string", description: "Optional timezone for the event." },
6350
+ send_updates: { type: "string", description: "Optional attendee-notification mode passed through to Calendar." },
6351
+ attendees: { type: "string", description: "Optional attendees as a JSON array, newline-, or comma-separated emails." }
6352
+ }
6353
+ },
5717
6354
  outputSchema: [
5718
6355
  { path: "eventId", displayName: "Event ID", type: "string", description: "Opaque identifier of the created event" },
5719
6356
  { path: "htmlLink", displayName: "Event link", type: "string", description: "Web UI link to the created event" },
@@ -5805,6 +6442,23 @@ registerAction({
5805
6442
  defaultRequiresConfirmation: true,
5806
6443
  requiredCapability: "flow/block/execute",
5807
6444
  eligibleForEventTrigger: true,
6445
+ inputSchema: {
6446
+ type: "object",
6447
+ required: ["connection", "event_id", "start_datetime"],
6448
+ properties: {
6449
+ connection: { type: "object", description: "Pinned Calendar connection with a connectedAccountId." },
6450
+ event_id: { type: "string", description: "Identifier of the existing event to update." },
6451
+ start_datetime: { type: "string", description: "Event start time (ISO 8601)." },
6452
+ end_datetime: { type: "string", description: "Optional event end time (ISO 8601)." },
6453
+ calendar_id: { type: "string", description: 'Calendar containing the event; defaults to "primary".' },
6454
+ summary: { type: "string", description: "Optional event title." },
6455
+ description: { type: "string", description: "Optional event description." },
6456
+ location: { type: "string", description: "Optional event location." },
6457
+ timezone: { type: "string", description: "Optional timezone for the event." },
6458
+ send_updates: { type: "string", description: "Optional attendee-notification mode passed through to Calendar." },
6459
+ attendees: { type: "string", description: "Optional attendees as a JSON array, newline-, or comma-separated emails." }
6460
+ }
6461
+ },
5808
6462
  outputSchema: [
5809
6463
  { path: "eventId", displayName: "Event ID", type: "string" },
5810
6464
  { path: "htmlLink", displayName: "Event link", type: "string" },
@@ -5897,6 +6551,21 @@ registerAction({
5897
6551
  defaultRequiresConfirmation: false,
5898
6552
  requiredCapability: "flow/block/execute",
5899
6553
  eligibleForEventTrigger: false,
6554
+ inputSchema: {
6555
+ type: "object",
6556
+ required: ["connection"],
6557
+ properties: {
6558
+ connection: { type: "object", description: "Pinned Calendar connection with a connectedAccountId." },
6559
+ calendarId: { type: "string", description: 'Calendar to list from; defaults to "primary".' },
6560
+ q: { type: "string", description: "Optional free-text search query for events." },
6561
+ timeMin: { type: "string", description: "Optional lower bound for event start time (ISO 8601)." },
6562
+ timeMax: { type: "string", description: "Optional upper bound for event start time (ISO 8601)." },
6563
+ timeZone: { type: "string", description: "Optional timezone for the returned times." },
6564
+ orderBy: { type: "string", description: "Optional ordering of results (e.g. startTime)." },
6565
+ singleEvents: { type: "boolean", description: "Optional flag to expand recurring events into single instances." },
6566
+ maxResults: { type: "string", description: "Optional maximum number of events to return (parsed as an integer)." }
6567
+ }
6568
+ },
5900
6569
  outputSchema: [
5901
6570
  { path: "items", displayName: "Events", type: "array", description: "Raw event objects as returned by Calendar" },
5902
6571
  { path: "count", displayName: "Count", type: "number" },
@@ -5963,6 +6632,27 @@ registerAction({
5963
6632
  defaultRequiresConfirmation: true,
5964
6633
  requiredCapability: "flow/block/execute",
5965
6634
  eligibleForEventTrigger: true,
6635
+ inputSchema: {
6636
+ type: "object",
6637
+ required: ["connection", "Name"],
6638
+ properties: {
6639
+ connection: { type: "object", description: "Pinned Xero connection with connectedAccountId and entityDid." },
6640
+ tenant_id: { type: "string", description: "Xero org identifier; empty uses the connection default." },
6641
+ Name: { type: "string", description: "Contact display name." },
6642
+ FirstName: { type: "string", description: "Contact first name." },
6643
+ LastName: { type: "string", description: "Contact last name." },
6644
+ EmailAddress: { type: "string", description: "Contact email address." },
6645
+ phone_number: { type: "string", description: "Contact phone number." },
6646
+ mobile_number: { type: "string", description: "Contact mobile number." },
6647
+ Website: { type: "string", description: "Contact website URL." },
6648
+ TaxNumber: { type: "string", description: "Contact tax number." },
6649
+ AccountNumber: { type: "string", description: "Contact account number." },
6650
+ DefaultCurrency: { type: "string", description: "Default currency code for the contact." },
6651
+ BankAccountDetails: { type: "string", description: "Contact bank account details." },
6652
+ IsCustomer: { type: "boolean", description: "Whether the contact is a customer." },
6653
+ IsSupplier: { type: "boolean", description: "Whether the contact is a supplier." }
6654
+ }
6655
+ },
5966
6656
  outputSchema: [
5967
6657
  { path: "contactId", displayName: "Contact ID", type: "string" },
5968
6658
  { path: "name", displayName: "Name", type: "string" },
@@ -6040,6 +6730,24 @@ registerAction({
6040
6730
  defaultRequiresConfirmation: true,
6041
6731
  requiredCapability: "flow/block/execute",
6042
6732
  eligibleForEventTrigger: true,
6733
+ inputSchema: {
6734
+ type: "object",
6735
+ required: ["connection", "LineItems"],
6736
+ properties: {
6737
+ connection: { type: "object", description: "Pinned Xero connection with connectedAccountId and entityDid." },
6738
+ tenant_id: { type: "string", description: "Xero org identifier; empty uses the connection default." },
6739
+ Type: { type: "string", description: "Invoice type: 'ACCREC' (sale) or 'ACCPAY' (bill); defaults to ACCREC." },
6740
+ Status: { type: "string", description: "Invoice status (e.g. DRAFT, AUTHORISED)." },
6741
+ Date: { type: "string", description: "Invoice date." },
6742
+ DueDate: { type: "string", description: "Invoice due date." },
6743
+ ContactID: { type: "string", description: "Xero contact UUID; preferred over ContactName." },
6744
+ ContactName: { type: "string", description: "Contact name fallback when ContactID is absent." },
6745
+ Reference: { type: "string", description: "Invoice reference text." },
6746
+ InvoiceNumber: { type: "string", description: "Invoice number." },
6747
+ CurrencyCode: { type: "string", description: "Invoice currency code." },
6748
+ LineItems: { type: "array", description: "Finalised array of invoice line-item objects." }
6749
+ }
6750
+ },
6043
6751
  outputSchema: [
6044
6752
  { path: "invoiceId", displayName: "Invoice ID", type: "string" },
6045
6753
  { path: "invoiceNumber", displayName: "Invoice number", type: "string" },
@@ -6127,6 +6835,22 @@ registerAction({
6127
6835
  defaultRequiresConfirmation: false,
6128
6836
  requiredCapability: "flow/block/execute",
6129
6837
  eligibleForEventTrigger: false,
6838
+ inputSchema: {
6839
+ type: "object",
6840
+ required: ["connection"],
6841
+ properties: {
6842
+ connection: { type: "object", description: "Pinned Xero connection with connectedAccountId and entityDid." },
6843
+ tenantId: { type: "string", description: "Xero org identifier (camelCase for the list tool)." },
6844
+ page: { type: "string", description: "Page number; parsed to an integer >= 1." },
6845
+ order: { type: "string", description: "Sort order expression." },
6846
+ Statuses: { type: "string", description: "Filter by invoice statuses." },
6847
+ ContactIDs: { type: "string", description: "Filter by contact IDs." },
6848
+ InvoiceIDs: { type: "string", description: "Filter by invoice IDs." },
6849
+ where: { type: "string", description: "Xero where-clause filter." },
6850
+ createdByMyApp: { type: "boolean", description: "Limit to invoices created by this app." },
6851
+ includeArchived: { type: "boolean", description: "Include archived invoices." }
6852
+ }
6853
+ },
6130
6854
  outputSchema: [
6131
6855
  { path: "items", displayName: "Invoices", type: "array" },
6132
6856
  { path: "count", displayName: "Count", type: "number" },
@@ -6191,6 +6915,20 @@ registerAction({
6191
6915
  defaultRequiresConfirmation: true,
6192
6916
  requiredCapability: "flow/block/execute",
6193
6917
  eligibleForEventTrigger: true,
6918
+ inputSchema: {
6919
+ type: "object",
6920
+ required: ["connection", "InvoiceID", "AccountID", "Amount"],
6921
+ properties: {
6922
+ connection: { type: "object", description: "Pinned Xero connection with connectedAccountId and entityDid." },
6923
+ tenant_id: { type: "string", description: "Xero org identifier; empty uses the connection default." },
6924
+ InvoiceID: { type: "string", description: "UUID of the invoice being paid." },
6925
+ AccountID: { type: "string", description: "UUID of the Xero bank/treasury account the payment debits." },
6926
+ Date: { type: "string", description: "Payment date (YYYY-MM-DD); defaults to today if blank." },
6927
+ Amount: { type: "number", description: "Payment amount; must be a positive number." },
6928
+ Reference: { type: "string", description: "Free-text reference, typically the on-chain tx hash." },
6929
+ CurrencyRate: { type: "number", description: "Optional currency rate for multicurrency payments." }
6930
+ }
6931
+ },
6194
6932
  outputSchema: [
6195
6933
  { path: "paymentId", displayName: "Payment ID", type: "string" },
6196
6934
  { path: "invoiceId", displayName: "Invoice ID", type: "string" },
@@ -9754,6 +10492,55 @@ var migration_0_3_to_1_0_0 = {
9754
10492
  };
9755
10493
  registerMigration(migration_0_3_to_1_0_0);
9756
10494
 
10495
+ // src/core/lib/flowCompiler/conditions.ts
10496
+ var OPERATOR_MAP = {
10497
+ // BaseUcan ConditionRef vocabulary
10498
+ eq: "equals",
10499
+ neq: "not_equals",
10500
+ gt: "greater_than",
10501
+ lt: "less_than",
10502
+ in: "contains",
10503
+ exists: "is_not_empty",
10504
+ // Friendly camelCase (plugin FlowSpec `is`)
10505
+ equals: "equals",
10506
+ notEquals: "not_equals",
10507
+ greaterThan: "greater_than",
10508
+ lessThan: "less_than",
10509
+ isEmpty: "is_empty",
10510
+ isNotEmpty: "is_not_empty",
10511
+ // Evaluator vocabulary passthrough
10512
+ not_equals: "not_equals",
10513
+ greater_than: "greater_than",
10514
+ less_than: "less_than",
10515
+ contains: "contains",
10516
+ not_contains: "not_contains",
10517
+ notContains: "not_contains",
10518
+ is_empty: "is_empty",
10519
+ is_not_empty: "is_not_empty"
10520
+ };
10521
+ function toEvaluatorOperator(operator) {
10522
+ return OPERATOR_MAP[operator] ?? "equals";
10523
+ }
10524
+ function buildBlockConditionsProp(conditions, opts) {
10525
+ return JSON.stringify({
10526
+ enabled: opts?.enabled ?? true,
10527
+ mode: opts?.mode ?? "all_must_pass",
10528
+ conditions: conditions.map((c, i) => ({
10529
+ id: `cond_${c.sourceBlockId}_${c.property}_${i}`,
10530
+ name: c.name ?? `Condition from ${c.sourceBlockId}`,
10531
+ sourceBlockId: c.sourceBlockId,
10532
+ sourceBlockType: c.sourceBlockType ?? "action",
10533
+ rule: {
10534
+ type: "property_value",
10535
+ property: c.property,
10536
+ operator: toEvaluatorOperator(c.operator),
10537
+ value: c.value
10538
+ },
10539
+ effect: c.effect ?? { action: "enable" }
10540
+ }))
10541
+ });
10542
+ }
10543
+
9757
10544
  // src/core/lib/flowCompiler/blockMapping.ts
9758
10545
  var ICON_DEFAULTS = {
9759
10546
  "bid/submit": "gavel",
@@ -9980,7 +10767,10 @@ function compileCondition(condition, blockIndex) {
9980
10767
  rule: {
9981
10768
  type: "property_value",
9982
10769
  property: condition.field,
9983
- operator: condition.operator,
10770
+ // Map the BaseUcan ConditionRef operator (eq/neq/…) onto the FE evaluator's
10771
+ // vocabulary (equals/not_equals/…). Writing it verbatim is the historical bug
10772
+ // that made compiler-authored conditions silently never evaluate.
10773
+ operator: toEvaluatorOperator(condition.operator),
9984
10774
  value: condition.value
9985
10775
  },
9986
10776
  effect: condition.effect || { action: "enable" }
@@ -10053,14 +10843,143 @@ function detectTriggerCycles(triggerEdges) {
10053
10843
  }
10054
10844
  }
10055
10845
 
10056
- // src/core/lib/flowCompiler/readFlow.ts
10846
+ // src/core/lib/flowCompiler/documentFragment.ts
10057
10847
  import * as Y4 from "yjs";
10848
+ function writeCompiledBlocksToFragment(fragment, blocks) {
10849
+ const documentBlockGroup = getOrCreateDocumentBlockGroup(fragment);
10850
+ for (const block of blocks) {
10851
+ appendBlockToGroup(documentBlockGroup, block);
10852
+ }
10853
+ }
10854
+ function removeAllFlowBlocks(fragment) {
10855
+ const blockGroup = getExistingBlockGroup(fragment);
10856
+ if (!blockGroup) return;
10857
+ while (blockGroup.length > 0) {
10858
+ blockGroup.delete(0, 1);
10859
+ }
10860
+ }
10861
+ function removeBlockFromFragment(fragment, blockId) {
10862
+ const blockGroup = getExistingBlockGroup(fragment);
10863
+ if (!blockGroup) return false;
10864
+ for (let i = 0; i < blockGroup.length; i++) {
10865
+ const container = blockGroup.get(i);
10866
+ if (container instanceof Y4.XmlElement && container.getAttribute("id") === blockId) {
10867
+ blockGroup.delete(i, 1);
10868
+ return true;
10869
+ }
10870
+ }
10871
+ return false;
10872
+ }
10873
+ function replaceBlockInFragment(fragment, block) {
10874
+ const blockGroup = getExistingBlockGroup(fragment);
10875
+ if (!blockGroup) return false;
10876
+ for (let i = 0; i < blockGroup.length; i++) {
10877
+ const container = blockGroup.get(i);
10878
+ if (container instanceof Y4.XmlElement && container.getAttribute("id") === block.id) {
10879
+ blockGroup.delete(i, 1);
10880
+ const newContainer = createBlockContainer(block);
10881
+ blockGroup.insert(i, [newContainer]);
10882
+ return true;
10883
+ }
10884
+ }
10885
+ return false;
10886
+ }
10887
+ function applyMergeResultToFragment(fragment, mergeResult) {
10888
+ const documentBlockGroup = getOrCreateDocumentBlockGroup(fragment);
10889
+ const blockByNodeId = /* @__PURE__ */ new Map();
10890
+ for (const block of mergeResult.merged.blocks) {
10891
+ for (const [nodeId, blockId] of Object.entries(mergeResult.merged.blockIndex)) {
10892
+ if (blockId === block.id) {
10893
+ blockByNodeId.set(nodeId, block);
10894
+ break;
10895
+ }
10896
+ }
10897
+ }
10898
+ for (const nodeId of mergeResult.replaced) {
10899
+ const block = blockByNodeId.get(nodeId);
10900
+ if (block) {
10901
+ replaceBlockInFragment(fragment, block);
10902
+ }
10903
+ }
10904
+ for (const nodeId of mergeResult.added) {
10905
+ const block = blockByNodeId.get(nodeId);
10906
+ if (block) {
10907
+ appendBlockToGroup(documentBlockGroup, block);
10908
+ }
10909
+ }
10910
+ }
10911
+ function readBlocksFromFragment(fragment) {
10912
+ const blockGroup = getExistingBlockGroup(fragment);
10913
+ if (!blockGroup) return [];
10914
+ const blocks = [];
10915
+ for (let i = 0; i < blockGroup.length; i++) {
10916
+ const container = blockGroup.get(i);
10917
+ if (!(container instanceof Y4.XmlElement) || container.nodeName !== "blockContainer") continue;
10918
+ const id = container.getAttribute("id");
10919
+ if (typeof id !== "string" || id.length === 0) continue;
10920
+ const content = container.get(0);
10921
+ if (!(content instanceof Y4.XmlElement)) continue;
10922
+ const props = { ...content.getAttributes() };
10923
+ const textColor = container.getAttribute("textColor");
10924
+ if (typeof textColor === "string" && textColor !== "default") props.textColor = textColor;
10925
+ const backgroundColor = container.getAttribute("backgroundColor");
10926
+ if (typeof backgroundColor === "string" && backgroundColor !== "default") props.backgroundColor = backgroundColor;
10927
+ blocks.push({ id, type: content.nodeName, props });
10928
+ }
10929
+ return blocks;
10930
+ }
10931
+ function createBlockContainer(block) {
10932
+ const blockContainer = new Y4.XmlElement("blockContainer");
10933
+ const { backgroundColor: rawBackgroundColor, textColor: rawTextColor, ...contentProps } = block.props;
10934
+ blockContainer.setAttribute("id", block.id);
10935
+ blockContainer.setAttribute("textColor", rawTextColor || "default");
10936
+ blockContainer.setAttribute("backgroundColor", rawBackgroundColor || "default");
10937
+ const blockContent = new Y4.XmlElement(block.type);
10938
+ for (const [key, value] of Object.entries(contentProps)) {
10939
+ if (value !== "") {
10940
+ blockContent.setAttribute(key, value);
10941
+ }
10942
+ }
10943
+ blockContainer.insert(0, [blockContent]);
10944
+ return blockContainer;
10945
+ }
10946
+ function appendBlockToGroup(blockGroup, block) {
10947
+ const container = createBlockContainer(block);
10948
+ blockGroup.insert(blockGroup.length, [container]);
10949
+ }
10950
+ function getOrCreateDocumentBlockGroup(fragment) {
10951
+ if (fragment.length === 0) {
10952
+ const blockGroup = new Y4.XmlElement("blockGroup");
10953
+ fragment.insert(0, [blockGroup]);
10954
+ return blockGroup;
10955
+ }
10956
+ if (fragment.length === 1) {
10957
+ const rootNode = fragment.get(0);
10958
+ if (rootNode instanceof Y4.XmlElement && rootNode.nodeName === "blockGroup") {
10959
+ return rootNode;
10960
+ }
10961
+ }
10962
+ throw new Error("Unexpected BlockNote document shape in XmlFragment. Expected a single top-level blockGroup node.");
10963
+ }
10964
+ function getExistingBlockGroup(fragment) {
10965
+ if (fragment.length === 0) return null;
10966
+ if (fragment.length === 1) {
10967
+ const rootNode = fragment.get(0);
10968
+ if (rootNode instanceof Y4.XmlElement && rootNode.nodeName === "blockGroup") {
10969
+ return rootNode;
10970
+ }
10971
+ }
10972
+ return null;
10973
+ }
10974
+
10975
+ // src/core/lib/flowCompiler/readFlow.ts
10976
+ import * as Y5 from "yjs";
10058
10977
  function readCompiledFlowFromYDoc(yDoc) {
10059
10978
  const flowMeta = yDoc.getMap("qi.flow.meta");
10060
10979
  const flowNodes = yDoc.getMap("qi.flow.nodes");
10061
10980
  const nodes = {};
10062
10981
  flowNodes.forEach((value, nodeId) => {
10063
- if (value instanceof Y4.Map) {
10982
+ if (value instanceof Y5.Map) {
10064
10983
  nodes[nodeId] = yMapToFlowNode(value);
10065
10984
  }
10066
10985
  });
@@ -10080,7 +10999,7 @@ function readCompiledFlowFromYDoc(yDoc) {
10080
10999
  const flowEdges = yDoc.getMap("qi.flow.edges");
10081
11000
  const edges = [];
10082
11001
  flowEdges.forEach((value) => {
10083
- if (value instanceof Y4.Map) {
11002
+ if (value instanceof Y5.Map) {
10084
11003
  edges.push(yMapToEdge(value));
10085
11004
  }
10086
11005
  });
@@ -10265,7 +11184,7 @@ import * as Y7 from "yjs";
10265
11184
  import { MatrixProvider } from "@ixo/matrix-crdt";
10266
11185
 
10267
11186
  // src/core/lib/flowCompiler/hydrate.ts
10268
- import * as Y5 from "yjs";
11187
+ import * as Y6 from "yjs";
10269
11188
  function hydrateYDocFromCompiledFlow(yDoc, compiled) {
10270
11189
  yDoc.transact(() => {
10271
11190
  const flowMeta = yDoc.getMap("qi.flow.meta");
@@ -10280,7 +11199,7 @@ function hydrateYDocFromCompiledFlow(yDoc, compiled) {
10280
11199
  }
10281
11200
  const flowEdges = yDoc.getMap("qi.flow.edges");
10282
11201
  for (const edge of compiled.edges) {
10283
- const yEdge = new Y5.Map();
11202
+ const yEdge = new Y6.Map();
10284
11203
  yEdge.set("id", edge.id);
10285
11204
  yEdge.set("source", edge.source);
10286
11205
  yEdge.set("target", edge.target);
@@ -10334,7 +11253,7 @@ function hydrateYDocFromMergeResult(yDoc, mergeResult) {
10334
11253
  const flowEdges = yDoc.getMap("qi.flow.edges");
10335
11254
  flowEdges.forEach((_, key) => flowEdges.delete(key));
10336
11255
  for (const edge of merged.edges) {
10337
- const yEdge = new Y5.Map();
11256
+ const yEdge = new Y6.Map();
10338
11257
  yEdge.set("id", edge.id);
10339
11258
  yEdge.set("source", edge.source);
10340
11259
  yEdge.set("target", edge.target);
@@ -10369,7 +11288,7 @@ function initializeRuntimeForNodes(runtimeMap, compiled, nodeIds) {
10369
11288
  }
10370
11289
  }
10371
11290
  function createYMapFromNode(node) {
10372
- const yNode = new Y5.Map();
11291
+ const yNode = new Y6.Map();
10373
11292
  yNode.set("id", node.id);
10374
11293
  yNode.set("blockId", node.blockId);
10375
11294
  yNode.set("can", node.can);
@@ -10383,103 +11302,6 @@ function createYMapFromNode(node) {
10383
11302
  return yNode;
10384
11303
  }
10385
11304
 
10386
- // src/core/lib/flowCompiler/documentFragment.ts
10387
- import * as Y6 from "yjs";
10388
- function writeCompiledBlocksToFragment(fragment, blocks) {
10389
- const documentBlockGroup = getOrCreateDocumentBlockGroup(fragment);
10390
- for (const block of blocks) {
10391
- appendBlockToGroup(documentBlockGroup, block);
10392
- }
10393
- }
10394
- function removeAllFlowBlocks(fragment) {
10395
- const blockGroup = getExistingBlockGroup(fragment);
10396
- if (!blockGroup) return;
10397
- while (blockGroup.length > 0) {
10398
- blockGroup.delete(0, 1);
10399
- }
10400
- }
10401
- function replaceBlockInFragment(fragment, block) {
10402
- const blockGroup = getExistingBlockGroup(fragment);
10403
- if (!blockGroup) return false;
10404
- for (let i = 0; i < blockGroup.length; i++) {
10405
- const container = blockGroup.get(i);
10406
- if (container instanceof Y6.XmlElement && container.getAttribute("id") === block.id) {
10407
- blockGroup.delete(i, 1);
10408
- const newContainer = createBlockContainer(block);
10409
- blockGroup.insert(i, [newContainer]);
10410
- return true;
10411
- }
10412
- }
10413
- return false;
10414
- }
10415
- function applyMergeResultToFragment(fragment, mergeResult) {
10416
- const documentBlockGroup = getOrCreateDocumentBlockGroup(fragment);
10417
- const blockByNodeId = /* @__PURE__ */ new Map();
10418
- for (const block of mergeResult.merged.blocks) {
10419
- for (const [nodeId, blockId] of Object.entries(mergeResult.merged.blockIndex)) {
10420
- if (blockId === block.id) {
10421
- blockByNodeId.set(nodeId, block);
10422
- break;
10423
- }
10424
- }
10425
- }
10426
- for (const nodeId of mergeResult.replaced) {
10427
- const block = blockByNodeId.get(nodeId);
10428
- if (block) {
10429
- replaceBlockInFragment(fragment, block);
10430
- }
10431
- }
10432
- for (const nodeId of mergeResult.added) {
10433
- const block = blockByNodeId.get(nodeId);
10434
- if (block) {
10435
- appendBlockToGroup(documentBlockGroup, block);
10436
- }
10437
- }
10438
- }
10439
- function createBlockContainer(block) {
10440
- const blockContainer = new Y6.XmlElement("blockContainer");
10441
- const { backgroundColor: rawBackgroundColor, textColor: rawTextColor, ...contentProps } = block.props;
10442
- blockContainer.setAttribute("id", block.id);
10443
- blockContainer.setAttribute("textColor", rawTextColor || "default");
10444
- blockContainer.setAttribute("backgroundColor", rawBackgroundColor || "default");
10445
- const blockContent = new Y6.XmlElement(block.type);
10446
- for (const [key, value] of Object.entries(contentProps)) {
10447
- if (value !== "") {
10448
- blockContent.setAttribute(key, value);
10449
- }
10450
- }
10451
- blockContainer.insert(0, [blockContent]);
10452
- return blockContainer;
10453
- }
10454
- function appendBlockToGroup(blockGroup, block) {
10455
- const container = createBlockContainer(block);
10456
- blockGroup.insert(blockGroup.length, [container]);
10457
- }
10458
- function getOrCreateDocumentBlockGroup(fragment) {
10459
- if (fragment.length === 0) {
10460
- const blockGroup = new Y6.XmlElement("blockGroup");
10461
- fragment.insert(0, [blockGroup]);
10462
- return blockGroup;
10463
- }
10464
- if (fragment.length === 1) {
10465
- const rootNode = fragment.get(0);
10466
- if (rootNode instanceof Y6.XmlElement && rootNode.nodeName === "blockGroup") {
10467
- return rootNode;
10468
- }
10469
- }
10470
- throw new Error("Unexpected BlockNote document shape in XmlFragment. Expected a single top-level blockGroup node.");
10471
- }
10472
- function getExistingBlockGroup(fragment) {
10473
- if (fragment.length === 0) return null;
10474
- if (fragment.length === 1) {
10475
- const rootNode = fragment.get(0);
10476
- if (rootNode instanceof Y6.XmlElement && rootNode.nodeName === "blockGroup") {
10477
- return rootNode;
10478
- }
10479
- }
10480
- return null;
10481
- }
10482
-
10483
11305
  // src/core/lib/flowCompiler/setup.ts
10484
11306
  async function readFlowAsBaseUcan(options) {
10485
11307
  const { roomId, matrixClient } = options;
@@ -12029,7 +12851,14 @@ export {
12029
12851
  createInvocationStore,
12030
12852
  createMemoryInvocationStore,
12031
12853
  writeRunRecordAndReconcile,
12854
+ toEvaluatorOperator,
12855
+ buildBlockConditionsProp,
12032
12856
  compileBaseUcanFlow,
12857
+ writeCompiledBlocksToFragment,
12858
+ removeAllFlowBlocks,
12859
+ removeBlockFromFragment,
12860
+ replaceBlockInFragment,
12861
+ readBlocksFromFragment,
12033
12862
  readCompiledFlowFromYDoc,
12034
12863
  mergeCompiledFlows,
12035
12864
  decompileToBaseUcanFlow,
@@ -12069,4 +12898,4 @@ export {
12069
12898
  executeQueuedFlowAgentCoreCommands,
12070
12899
  FlowAgentService
12071
12900
  };
12072
- //# sourceMappingURL=chunk-NAR2R3YM.mjs.map
12901
+ //# sourceMappingURL=chunk-TK2RJ4KB.mjs.map