@ixo/editor 6.23.0 → 6.24.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/{chunk-VFYF2B5E.js → chunk-BTMC55BR.js} +141 -95
- package/dist/chunk-BTMC55BR.js.map +1 -0
- package/dist/{chunk-UIZV4YAW.js → chunk-DBH72SPW.js} +2 -2
- package/dist/{chunk-LBFFAKSN.js → chunk-R3H7TDTG.js} +2 -2
- package/dist/core/index.d.ts +20 -3
- package/dist/core/index.js +12 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/mantine/index.js +2 -2
- package/dist/{store-B60v3oba.d.ts → store-wmrw3T5K.d.ts} +13 -0
- package/package.json +1 -1
- package/dist/chunk-VFYF2B5E.js.map +0 -1
- /package/dist/{chunk-UIZV4YAW.js.map → chunk-DBH72SPW.js.map} +0 -0
- /package/dist/{chunk-LBFFAKSN.js.map → chunk-R3H7TDTG.js.map} +0 -0
|
@@ -495,6 +495,87 @@ async function sendDirectMessage(matrixClient, targetDid, message) {
|
|
|
495
495
|
return { roomId };
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
+
// src/core/lib/actionRegistry/canMapping.ts
|
|
499
|
+
var CAN_TO_TYPE = {
|
|
500
|
+
"flow/run.start": "qi/flow.run.start",
|
|
501
|
+
"flow/run.close": "qi/flow.run.close",
|
|
502
|
+
"bid/submit": "qi/bid.submit",
|
|
503
|
+
"bid/evaluate": "qi/bid.evaluate",
|
|
504
|
+
"claim/submit": "qi/claim.submit",
|
|
505
|
+
"claim/evaluate": "qi/claim.evaluate",
|
|
506
|
+
"collection/lifecycle": "qi/collection.lifecycle",
|
|
507
|
+
"collection/users": "qi/collection.users",
|
|
508
|
+
"email/send": "qi/email.send",
|
|
509
|
+
"notification/push": "qi/notification.push",
|
|
510
|
+
"matrix/dm": "qi/matrix.dm",
|
|
511
|
+
"proposal/create": "qi/proposal.create",
|
|
512
|
+
"proposal/vote": "qi/proposal.vote",
|
|
513
|
+
"governance/member-proposal": "qi/governance.member-proposal",
|
|
514
|
+
"governance/settings-proposal": "qi/governance.settings-proposal",
|
|
515
|
+
"governance.transaction/send-funds": "qi/governance.transaction.send-funds",
|
|
516
|
+
"domain/card-preview": "qi/domain.card-preview",
|
|
517
|
+
"domain/sign": "qi/domain.sign",
|
|
518
|
+
"credential/store": "qi/credential.store",
|
|
519
|
+
"http/request": "qi/http.request",
|
|
520
|
+
"protocol/select": "qi/protocol.select",
|
|
521
|
+
"human/checkbox": "qi/human.checkbox.set",
|
|
522
|
+
"human/form": "qi/human.form.submit",
|
|
523
|
+
"oracle/query": "oracle",
|
|
524
|
+
"pod/domain-indexer-lookup": "qi/pod.domain-indexer-lookup",
|
|
525
|
+
"pod/domain-single-selection": "qi/pod.domain-single-selection",
|
|
526
|
+
"pod/entity-single-selection": "qi/pod.entity-single-selection",
|
|
527
|
+
"pod/governance-config": "qi/pod.governance-config",
|
|
528
|
+
"pod/member-multi-select": "qi/pod.member-multi-select",
|
|
529
|
+
"pod/list-domain-flows": "qi/pod.list-domain-flows",
|
|
530
|
+
"blueprint/workspace-start": "qi/blueprint.workspace-start",
|
|
531
|
+
"blueprint/journey-resume": "qi/blueprint.journey-resume",
|
|
532
|
+
"blueprint/guided-authoring": "qi/blueprint.guided-authoring",
|
|
533
|
+
"blueprint/artifact-preview": "qi/blueprint.artifact-preview",
|
|
534
|
+
"blueprint/artifact-save": "qi/blueprint.artifact-save",
|
|
535
|
+
"blueprint/checklist-update": "qi/blueprint.checklist-update",
|
|
536
|
+
"blueprint/phase-confirm": "qi/blueprint.phase-confirm",
|
|
537
|
+
"blueprint/reviewer-assign": "qi/blueprint.reviewer-assign",
|
|
538
|
+
"blueprint/review-submit": "qi/blueprint.review-submit",
|
|
539
|
+
"blueprint/review-respond": "qi/blueprint.review-respond",
|
|
540
|
+
"blueprint/release-compile": "qi/blueprint.release-compile",
|
|
541
|
+
"blueprint/publish": "qi/blueprint.publish",
|
|
542
|
+
// Delegated integrations (author connects once, runners execute on their behalf)
|
|
543
|
+
"gmail.email/send": "qi/gmail.email.send",
|
|
544
|
+
"outlook.email/send": "qi/outlook.email.send",
|
|
545
|
+
"slack.message/send": "qi/slack.message.send",
|
|
546
|
+
"googlecalendar.event/create": "qi/googlecalendar.event.create",
|
|
547
|
+
// Calendar integration (self-connected)
|
|
548
|
+
"calendar.event/create": "qi/calendar.event.create",
|
|
549
|
+
"calendar.event/update": "qi/calendar.event.update",
|
|
550
|
+
"calendar.event/list": "qi/calendar.event.list",
|
|
551
|
+
// Xero integration
|
|
552
|
+
"xero.contact/create": "qi/xero.contact.create",
|
|
553
|
+
"xero.invoice/create": "qi/xero.invoice.create",
|
|
554
|
+
"xero.invoice/list": "qi/xero.invoice.list",
|
|
555
|
+
"xero.payment/create": "qi/xero.payment.create",
|
|
556
|
+
// Oracle / wallet / matrix lifecycle
|
|
557
|
+
"wallet/generate": "qi/wallet.generate",
|
|
558
|
+
"wallet/fund": "qi/wallet.fund",
|
|
559
|
+
"iid/create": "qi/iid.create",
|
|
560
|
+
"matrix/register": "qi/matrix.register",
|
|
561
|
+
"entity/createOracle": "qi/entity.createOracle",
|
|
562
|
+
"sandbox/provision": "qi/sandbox.provision",
|
|
563
|
+
"oracle/contract": "qi/oracle.contract",
|
|
564
|
+
"oracle/storeSecrets": "qi/oracle.storeSecrets",
|
|
565
|
+
"oracle/storeConfig": "qi/oracle.storeConfig",
|
|
566
|
+
"oracle/configureOracle": "qi/oracle.configureOracle"
|
|
567
|
+
};
|
|
568
|
+
var TYPE_TO_CAN = Object.fromEntries(Object.entries(CAN_TO_TYPE).map(([can, type]) => [type, can]));
|
|
569
|
+
function canToType(can) {
|
|
570
|
+
return CAN_TO_TYPE[can];
|
|
571
|
+
}
|
|
572
|
+
function typeToCan(type) {
|
|
573
|
+
return TYPE_TO_CAN[type];
|
|
574
|
+
}
|
|
575
|
+
function getAllCanMappings() {
|
|
576
|
+
return Object.entries(CAN_TO_TYPE).map(([can, type]) => ({ can, type }));
|
|
577
|
+
}
|
|
578
|
+
|
|
498
579
|
// src/core/lib/warnOnce.ts
|
|
499
580
|
var seen = /* @__PURE__ */ new Set();
|
|
500
581
|
function warnOnce(key, message) {
|
|
@@ -548,13 +629,58 @@ var aliases = new Map(Object.entries(ACTION_TYPE_ALIASES));
|
|
|
548
629
|
function resolveActionType(type) {
|
|
549
630
|
return aliases.get(type) ?? type;
|
|
550
631
|
}
|
|
632
|
+
function normalizeCan(can) {
|
|
633
|
+
const trimmed = can.trim();
|
|
634
|
+
const lastDot = trimmed.lastIndexOf(".");
|
|
635
|
+
if (!trimmed.includes("/") && lastDot > 0) {
|
|
636
|
+
return `${trimmed.slice(0, lastDot)}/${trimmed.slice(lastDot + 1)}`;
|
|
637
|
+
}
|
|
638
|
+
return trimmed;
|
|
639
|
+
}
|
|
640
|
+
function normalizeCapabilityPattern(pattern) {
|
|
641
|
+
return normalizeCan(pattern);
|
|
642
|
+
}
|
|
643
|
+
function actionTypeToCan(type) {
|
|
644
|
+
const resolvedType = resolveActionType(type.trim());
|
|
645
|
+
const registered = actions.get(resolvedType);
|
|
646
|
+
if (registered?.can) return normalizeCan(registered.can);
|
|
647
|
+
const mapped = typeToCan(resolvedType);
|
|
648
|
+
if (mapped) return normalizeCan(mapped);
|
|
649
|
+
if (!resolvedType.startsWith("qi/")) return void 0;
|
|
650
|
+
return normalizeCan(resolvedType.slice("qi/".length));
|
|
651
|
+
}
|
|
652
|
+
function canToActionType(can) {
|
|
653
|
+
const normalizedCan = normalizeCan(can);
|
|
654
|
+
for (const action of actions.values()) {
|
|
655
|
+
if (action.can && normalizeCan(action.can) === normalizedCan) return action.type;
|
|
656
|
+
}
|
|
657
|
+
const mapped = canToType(normalizedCan);
|
|
658
|
+
if (mapped) return resolveActionType(mapped);
|
|
659
|
+
const segments = normalizedCan.split("/");
|
|
660
|
+
if (segments.length !== 2) return void 0;
|
|
661
|
+
const [namespace, verb] = segments;
|
|
662
|
+
if (namespace.length === 0 || verb.length === 0) return void 0;
|
|
663
|
+
return `qi/${namespace}.${verb}`;
|
|
664
|
+
}
|
|
665
|
+
function capabilityPatternCoversCan(pattern, can, options = {}) {
|
|
666
|
+
const normalizedPattern = normalizeCapabilityPattern(pattern);
|
|
667
|
+
const normalizedCan = normalizeCan(can);
|
|
668
|
+
if (normalizedPattern === "*") return options.allowGlobalWildcard === true;
|
|
669
|
+
if (normalizedPattern === normalizedCan) return true;
|
|
670
|
+
if (normalizedPattern.endsWith("/*")) {
|
|
671
|
+
const prefix = normalizedPattern.slice(0, -1);
|
|
672
|
+
return normalizedCan.startsWith(prefix);
|
|
673
|
+
}
|
|
674
|
+
return false;
|
|
675
|
+
}
|
|
551
676
|
function registerAction(definition) {
|
|
552
|
-
|
|
677
|
+
const normalized = definition.can ? { ...definition, can: normalizeCan(definition.can) } : definition;
|
|
678
|
+
if (!normalized.done) {
|
|
553
679
|
warnOnce(`missing-done-contract:${definition.type}`, `[flow-config] action ${definition.type}: no done contract declared; defaulting to state === 'completed'`);
|
|
554
|
-
actions.set(definition.type, { ...
|
|
680
|
+
actions.set(definition.type, { ...normalized, done: doneWhenCompleted });
|
|
555
681
|
return;
|
|
556
682
|
}
|
|
557
|
-
actions.set(definition.type,
|
|
683
|
+
actions.set(definition.type, normalized);
|
|
558
684
|
}
|
|
559
685
|
function getAction(type) {
|
|
560
686
|
return actions.get(resolveActionType(type));
|
|
@@ -573,8 +699,9 @@ function hasAction(type) {
|
|
|
573
699
|
return actions.has(resolveActionType(type));
|
|
574
700
|
}
|
|
575
701
|
function getActionByCan(can) {
|
|
702
|
+
const normalizedCan = normalizeCan(can);
|
|
576
703
|
for (const action of actions.values()) {
|
|
577
|
-
if (action.can
|
|
704
|
+
if (action.can && normalizeCan(action.can) === normalizedCan) return action;
|
|
578
705
|
}
|
|
579
706
|
return void 0;
|
|
580
707
|
}
|
|
@@ -734,87 +861,6 @@ function getMissingActionInputs(actionType, inputs) {
|
|
|
734
861
|
return dedupe(required.filter((name) => isBlankInputValue(merged[name])));
|
|
735
862
|
}
|
|
736
863
|
|
|
737
|
-
// src/core/lib/actionRegistry/canMapping.ts
|
|
738
|
-
var CAN_TO_TYPE = {
|
|
739
|
-
"flow/run.start": "qi/flow.run.start",
|
|
740
|
-
"flow/run.close": "qi/flow.run.close",
|
|
741
|
-
"bid/submit": "qi/bid.submit",
|
|
742
|
-
"bid/evaluate": "qi/bid.evaluate",
|
|
743
|
-
"claim/submit": "qi/claim.submit",
|
|
744
|
-
"claim/evaluate": "qi/claim.evaluate",
|
|
745
|
-
"collection/lifecycle": "qi/collection.lifecycle",
|
|
746
|
-
"collection/users": "qi/collection.users",
|
|
747
|
-
"email/send": "qi/email.send",
|
|
748
|
-
"notification/push": "qi/notification.push",
|
|
749
|
-
"matrix/dm": "qi/matrix.dm",
|
|
750
|
-
"proposal/create": "qi/proposal.create",
|
|
751
|
-
"proposal/vote": "qi/proposal.vote",
|
|
752
|
-
"governance/member-proposal": "qi/governance.member-proposal",
|
|
753
|
-
"governance/settings-proposal": "qi/governance.settings-proposal",
|
|
754
|
-
"governance.transaction/send-funds": "qi/governance.transaction.send-funds",
|
|
755
|
-
"domain/card-preview": "qi/domain.card-preview",
|
|
756
|
-
"domain/sign": "qi/domain.sign",
|
|
757
|
-
"credential/store": "qi/credential.store",
|
|
758
|
-
"http/request": "qi/http.request",
|
|
759
|
-
"protocol/select": "qi/protocol.select",
|
|
760
|
-
"human/checkbox": "qi/human.checkbox.set",
|
|
761
|
-
"human/form": "qi/human.form.submit",
|
|
762
|
-
"oracle/query": "oracle",
|
|
763
|
-
"pod/domain-indexer-lookup": "qi/pod.domain-indexer-lookup",
|
|
764
|
-
"pod/domain-single-selection": "qi/pod.domain-single-selection",
|
|
765
|
-
"pod/entity-single-selection": "qi/pod.entity-single-selection",
|
|
766
|
-
"pod/governance-config": "qi/pod.governance-config",
|
|
767
|
-
"pod/member-multi-select": "qi/pod.member-multi-select",
|
|
768
|
-
"pod/list-domain-flows": "qi/pod.list-domain-flows",
|
|
769
|
-
"blueprint/workspace-start": "qi/blueprint.workspace-start",
|
|
770
|
-
"blueprint/journey-resume": "qi/blueprint.journey-resume",
|
|
771
|
-
"blueprint/guided-authoring": "qi/blueprint.guided-authoring",
|
|
772
|
-
"blueprint/artifact-preview": "qi/blueprint.artifact-preview",
|
|
773
|
-
"blueprint/artifact-save": "qi/blueprint.artifact-save",
|
|
774
|
-
"blueprint/checklist-update": "qi/blueprint.checklist-update",
|
|
775
|
-
"blueprint/phase-confirm": "qi/blueprint.phase-confirm",
|
|
776
|
-
"blueprint/reviewer-assign": "qi/blueprint.reviewer-assign",
|
|
777
|
-
"blueprint/review-submit": "qi/blueprint.review-submit",
|
|
778
|
-
"blueprint/review-respond": "qi/blueprint.review-respond",
|
|
779
|
-
"blueprint/release-compile": "qi/blueprint.release-compile",
|
|
780
|
-
"blueprint/publish": "qi/blueprint.publish",
|
|
781
|
-
// Delegated integrations (author connects once, runners execute on their behalf)
|
|
782
|
-
"gmail.email/send": "qi/gmail.email.send",
|
|
783
|
-
"outlook.email/send": "qi/outlook.email.send",
|
|
784
|
-
"slack.message/send": "qi/slack.message.send",
|
|
785
|
-
"googlecalendar.event/create": "qi/googlecalendar.event.create",
|
|
786
|
-
// Calendar integration (self-connected)
|
|
787
|
-
"calendar.event/create": "qi/calendar.event.create",
|
|
788
|
-
"calendar.event/update": "qi/calendar.event.update",
|
|
789
|
-
"calendar.event/list": "qi/calendar.event.list",
|
|
790
|
-
// Xero integration
|
|
791
|
-
"xero.contact/create": "qi/xero.contact.create",
|
|
792
|
-
"xero.invoice/create": "qi/xero.invoice.create",
|
|
793
|
-
"xero.invoice/list": "qi/xero.invoice.list",
|
|
794
|
-
"xero.payment/create": "qi/xero.payment.create",
|
|
795
|
-
// Oracle / wallet / matrix lifecycle
|
|
796
|
-
"wallet/generate": "qi/wallet.generate",
|
|
797
|
-
"wallet/fund": "qi/wallet.fund",
|
|
798
|
-
"iid/create": "qi/iid.create",
|
|
799
|
-
"matrix/register": "qi/matrix.register",
|
|
800
|
-
"entity/createOracle": "qi/entity.createOracle",
|
|
801
|
-
"sandbox/provision": "qi/sandbox.provision",
|
|
802
|
-
"oracle/contract": "qi/oracle.contract",
|
|
803
|
-
"oracle/storeSecrets": "qi/oracle.storeSecrets",
|
|
804
|
-
"oracle/storeConfig": "qi/oracle.storeConfig",
|
|
805
|
-
"oracle/configureOracle": "qi/oracle.configureOracle"
|
|
806
|
-
};
|
|
807
|
-
var TYPE_TO_CAN = Object.fromEntries(Object.entries(CAN_TO_TYPE).map(([can, type]) => [type, can]));
|
|
808
|
-
function canToType(can) {
|
|
809
|
-
return CAN_TO_TYPE[can];
|
|
810
|
-
}
|
|
811
|
-
function typeToCan(type) {
|
|
812
|
-
return TYPE_TO_CAN[type];
|
|
813
|
-
}
|
|
814
|
-
function getAllCanMappings() {
|
|
815
|
-
return Object.entries(CAN_TO_TYPE).map(([can, type]) => ({ can, type }));
|
|
816
|
-
}
|
|
817
|
-
|
|
818
864
|
// src/core/lib/actionRegistry/serviceCan.ts
|
|
819
865
|
var SERVICE_VERBS = ["report", "format", "advise"];
|
|
820
866
|
function isActionCanShape(can) {
|
|
@@ -17024,12 +17070,7 @@ function isCapabilityMatch(granted, required) {
|
|
|
17024
17070
|
return canMatches(granted.can, required.can) && resourceMatches(granted.with, required.with);
|
|
17025
17071
|
}
|
|
17026
17072
|
function canMatches(granted, required) {
|
|
17027
|
-
|
|
17028
|
-
if (granted.endsWith("/*")) {
|
|
17029
|
-
const prefix = granted.slice(0, -1);
|
|
17030
|
-
return required.startsWith(prefix);
|
|
17031
|
-
}
|
|
17032
|
-
return false;
|
|
17073
|
+
return capabilityPatternCoversCan(granted, required, { allowGlobalWildcard: true });
|
|
17033
17074
|
}
|
|
17034
17075
|
function resourceMatches(granted, required) {
|
|
17035
17076
|
if (granted === "*" || granted === required) return true;
|
|
@@ -18210,12 +18251,20 @@ export {
|
|
|
18210
18251
|
didToMatrixUserId,
|
|
18211
18252
|
findOrCreateDMRoom,
|
|
18212
18253
|
sendDirectMessage,
|
|
18254
|
+
canToType,
|
|
18255
|
+
typeToCan,
|
|
18256
|
+
getAllCanMappings,
|
|
18213
18257
|
warnOnce,
|
|
18214
18258
|
STEP_COMPLETED_EVENT_NAME,
|
|
18215
18259
|
STEP_COMPLETED_EVENT,
|
|
18216
18260
|
doneWhenCompleted,
|
|
18217
18261
|
neverDone,
|
|
18218
18262
|
resolveActionType,
|
|
18263
|
+
normalizeCan,
|
|
18264
|
+
normalizeCapabilityPattern,
|
|
18265
|
+
actionTypeToCan,
|
|
18266
|
+
canToActionType,
|
|
18267
|
+
capabilityPatternCoversCan,
|
|
18219
18268
|
registerAction,
|
|
18220
18269
|
getAction,
|
|
18221
18270
|
getAllActions,
|
|
@@ -18227,9 +18276,6 @@ export {
|
|
|
18227
18276
|
generateActionManifest,
|
|
18228
18277
|
isBlankInputValue,
|
|
18229
18278
|
getMissingActionInputs,
|
|
18230
|
-
canToType,
|
|
18231
|
-
typeToCan,
|
|
18232
|
-
getAllCanMappings,
|
|
18233
18279
|
SERVICE_VERBS,
|
|
18234
18280
|
serviceCan,
|
|
18235
18281
|
parseServiceCan,
|
|
@@ -18495,4 +18541,4 @@ export {
|
|
|
18495
18541
|
executeQueuedFlowAgentCoreCommands,
|
|
18496
18542
|
FlowAgentService
|
|
18497
18543
|
};
|
|
18498
|
-
//# sourceMappingURL=chunk-
|
|
18544
|
+
//# sourceMappingURL=chunk-BTMC55BR.js.map
|