@ixo/editor 3.0.0-beta.13 → 3.0.0-beta.15
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/{capabilityValidation-BrYCMvBB.d.ts → capabilityValidation-Bnn8B_8a.d.ts} +1 -1
- package/dist/{chunk-MVIGR7ZU.mjs → chunk-UHF7YDII.mjs} +74 -1
- package/dist/chunk-UHF7YDII.mjs.map +1 -0
- package/dist/chunk-VU34HOXM.mjs +36 -0
- package/dist/chunk-VU34HOXM.mjs.map +1 -0
- package/dist/{chunk-255WVXBP.mjs → chunk-XSMXAAJC.mjs} +5552 -5276
- package/dist/chunk-XSMXAAJC.mjs.map +1 -0
- package/dist/cid-6O646X2I.mjs +9 -0
- package/dist/cid-6O646X2I.mjs.map +1 -0
- package/dist/core/index.d.ts +27 -3
- package/dist/core/index.mjs +7 -1
- package/dist/{graphql-client-DSJ3fRVn.d.ts → graphql-client-B5bA19FP.d.ts} +14 -1
- package/dist/{index-BE746hd_.d.ts → index-tyLe-Ge8.d.ts} +2 -122
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/mantine/index.d.ts +9 -5
- package/dist/mantine/index.mjs +4 -2
- package/package.json +4 -1
- package/dist/chunk-255WVXBP.mjs.map +0 -1
- package/dist/chunk-MVIGR7ZU.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as FlowNode, F as FlowNodeAuthzExtension, p as FlowNodeRuntimeState, J as IxoEditorType, S as SignedCapability, B as CreateRootDelegationParams, t as StoredDelegation, G as CreateDelegationParams, H as CreateInvocationParams, w as InvocationResult, x as ExecutionWithInvocationResult, s as UcanCapability, y as DelegationChainValidationResult, z as FindProofsResult, M as MigrationReport, U as UcanDelegationStore, l as InvocationStore, E as EvaluationStatus, C as Capability, a as CapabilityValidationResult } from './index-
|
|
1
|
+
import { r as FlowNode, F as FlowNodeAuthzExtension, p as FlowNodeRuntimeState, J as IxoEditorType, S as SignedCapability, B as CreateRootDelegationParams, t as StoredDelegation, G as CreateDelegationParams, H as CreateInvocationParams, w as InvocationResult, x as ExecutionWithInvocationResult, s as UcanCapability, y as DelegationChainValidationResult, z as FindProofsResult, M as MigrationReport, U as UcanDelegationStore, l as InvocationStore, E as EvaluationStatus, C as Capability, a as CapabilityValidationResult } from './index-tyLe-Ge8.mjs';
|
|
2
2
|
import { Delegation } from '@ixo/ucan';
|
|
3
3
|
import { Doc, Map } from 'yjs';
|
|
4
4
|
|
|
@@ -69,6 +69,9 @@ function buildServicesFromHandlers(handlers) {
|
|
|
69
69
|
evaluateClaim: async (granteeAddress, did, payload) => handlers.evaluateClaim(granteeAddress, did, payload),
|
|
70
70
|
getCurrentUser: () => handlers.getCurrentUser(),
|
|
71
71
|
createUdid: handlers?.createUdid ? async (params) => handlers.createUdid(params) : void 0
|
|
72
|
+
} : void 0,
|
|
73
|
+
matrix: handlers?.storeMatrixCredential ? {
|
|
74
|
+
storeCredential: async (params) => handlers.storeMatrixCredential(params)
|
|
72
75
|
} : void 0
|
|
73
76
|
};
|
|
74
77
|
}
|
|
@@ -1345,6 +1348,76 @@ registerAction({
|
|
|
1345
1348
|
}
|
|
1346
1349
|
});
|
|
1347
1350
|
|
|
1351
|
+
// src/core/lib/actionRegistry/actions/oracle.ts
|
|
1352
|
+
registerAction({
|
|
1353
|
+
type: "oracle",
|
|
1354
|
+
sideEffect: false,
|
|
1355
|
+
defaultRequiresConfirmation: false,
|
|
1356
|
+
outputSchema: [{ path: "prompt", displayName: "Prompt", type: "string", description: "The prompt sent to the companion" }],
|
|
1357
|
+
run: async (inputs, ctx) => {
|
|
1358
|
+
const prompt = String(inputs.prompt || "").trim();
|
|
1359
|
+
if (!prompt) throw new Error("prompt is required");
|
|
1360
|
+
if (!ctx.handlers?.askCompanion) {
|
|
1361
|
+
throw new Error("askCompanion handler is not available");
|
|
1362
|
+
}
|
|
1363
|
+
await ctx.handlers.askCompanion(prompt);
|
|
1364
|
+
return {
|
|
1365
|
+
output: { prompt }
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
});
|
|
1369
|
+
|
|
1370
|
+
// src/core/lib/actionRegistry/actions/credentialStore.ts
|
|
1371
|
+
registerAction({
|
|
1372
|
+
type: "credential.store",
|
|
1373
|
+
sideEffect: true,
|
|
1374
|
+
defaultRequiresConfirmation: true,
|
|
1375
|
+
requiredCapability: "flow/execute",
|
|
1376
|
+
outputSchema: [
|
|
1377
|
+
{ path: "credentialKey", displayName: "Credential Key", type: "string", description: "Key under which credential was stored (e.g. kycamllevel1)" },
|
|
1378
|
+
{ path: "cid", displayName: "Content ID", type: "string", description: "IPFS-compatible CID of the credential (used for deduplication)" },
|
|
1379
|
+
{ path: "storedAt", displayName: "Stored At", type: "string", description: "ISO timestamp of when the credential was stored" },
|
|
1380
|
+
{ path: "duplicate", displayName: "Duplicate", type: "boolean", description: "Whether this credential was already stored (matched by CID)" }
|
|
1381
|
+
],
|
|
1382
|
+
run: async (inputs, ctx) => {
|
|
1383
|
+
const { credential, credentialKey, roomId } = inputs;
|
|
1384
|
+
if (!credentialKey) throw new Error("credentialKey is required");
|
|
1385
|
+
if (!credential) throw new Error("credential is required");
|
|
1386
|
+
let parsedCredential = credential;
|
|
1387
|
+
if (typeof parsedCredential === "string") {
|
|
1388
|
+
for (let i = 0; i < 3 && typeof parsedCredential === "string"; i++) {
|
|
1389
|
+
try {
|
|
1390
|
+
parsedCredential = JSON.parse(parsedCredential);
|
|
1391
|
+
} catch {
|
|
1392
|
+
throw new Error("credential must be a valid JSON object or JSON string");
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
if (typeof parsedCredential !== "object" || parsedCredential === null || Array.isArray(parsedCredential)) {
|
|
1397
|
+
throw new Error("credential must be a JSON object");
|
|
1398
|
+
}
|
|
1399
|
+
if (!ctx.services.matrix?.storeCredential) {
|
|
1400
|
+
throw new Error("Matrix credential storage service not configured");
|
|
1401
|
+
}
|
|
1402
|
+
const { computeJsonCID } = await import("./cid-6O646X2I.mjs");
|
|
1403
|
+
const cid = await computeJsonCID(parsedCredential);
|
|
1404
|
+
const result = await ctx.services.matrix.storeCredential({
|
|
1405
|
+
roomId: roomId || "",
|
|
1406
|
+
credentialKey: String(credentialKey),
|
|
1407
|
+
credential: parsedCredential,
|
|
1408
|
+
cid
|
|
1409
|
+
});
|
|
1410
|
+
return {
|
|
1411
|
+
output: {
|
|
1412
|
+
credentialKey: String(credentialKey),
|
|
1413
|
+
cid,
|
|
1414
|
+
storedAt: result.storedAt,
|
|
1415
|
+
duplicate: result.duplicate
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
|
|
1348
1421
|
// src/core/lib/ucanDelegationStore.ts
|
|
1349
1422
|
var ROOT_DELEGATION_KEY = "__root__";
|
|
1350
1423
|
var MIGRATION_VERSION_KEY = "__version__";
|
|
@@ -2904,4 +2977,4 @@ export {
|
|
|
2904
2977
|
createUcanService,
|
|
2905
2978
|
SimpleUCANManager
|
|
2906
2979
|
};
|
|
2907
|
-
//# sourceMappingURL=chunk-
|
|
2980
|
+
//# sourceMappingURL=chunk-UHF7YDII.mjs.map
|