@ixo/editor 5.27.0 → 5.28.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.
@@ -269,6 +269,13 @@ function buildServicesFromHandlers(handlers) {
269
269
  loadBatches: async (params) => handlers.carbon.loadBatches(params),
270
270
  harvest: async (params) => handlers.carbon.harvest(params),
271
271
  retire: async (params) => handlers.carbon.retire(params)
272
+ } : void 0,
273
+ // Entity (domain) ownership service (IXO-2696). The consumer exposes a
274
+ // fully-formed `handlers.entity` service group; the transfer is user-signed
275
+ // inside the consumer handler (resolve recipient + IID guard + broadcast) —
276
+ // we only forward the call here.
277
+ entity: handlers?.entity?.transfer ? {
278
+ transfer: async (params) => handlers.entity.transfer(params)
272
279
  } : void 0
273
280
  };
274
281
  }
@@ -5373,6 +5380,50 @@ registerAction({
5373
5380
  }
5374
5381
  });
5375
5382
 
5383
+ // src/core/lib/actionRegistry/actions/entityTransfer/schemas.ts
5384
+ var ENTITY_TRANSFER_OUTPUT = [
5385
+ { path: "transactionHash", displayName: "Transaction Hash", type: "string", description: "The entity transfer transaction hash" },
5386
+ { path: "recipientDid", displayName: "Recipient DID", type: "string", description: "The new owner DID the entity was transferred to" },
5387
+ {
5388
+ path: "recipientResolved",
5389
+ displayName: "Resolved Recipient",
5390
+ type: "string",
5391
+ description: "The resolved recipient when a group entity was mapped to its DAO controller"
5392
+ },
5393
+ {
5394
+ path: "createdRecipientIid",
5395
+ displayName: "Created Recipient IID",
5396
+ type: "boolean",
5397
+ description: "True when the host created the recipient's IID document before transferring"
5398
+ }
5399
+ ];
5400
+
5401
+ // src/core/lib/actionRegistry/actions/entityTransfer/entityTransfer.ts
5402
+ registerAction({
5403
+ type: "qi/entity.transfer",
5404
+ can: "entity/transfer",
5405
+ sideEffect: true,
5406
+ defaultRequiresConfirmation: true,
5407
+ outputSchema: ENTITY_TRANSFER_OUTPUT,
5408
+ run: async (inputs, ctx) => {
5409
+ if (!ctx.services.entity?.transfer) {
5410
+ throw new Error("entity.transfer handler not available");
5411
+ }
5412
+ if (!inputs.entityDid) throw new Error("entityDid is required");
5413
+ if (!inputs.recipientDid) throw new Error("recipientDid is required");
5414
+ const result = await ctx.services.entity.transfer({
5415
+ entityDid: inputs.entityDid,
5416
+ recipientDid: inputs.recipientDid,
5417
+ ...inputs.ownerDid ? { ownerDid: inputs.ownerDid } : {},
5418
+ ...inputs.ownerAddress ? { ownerAddress: inputs.ownerAddress } : {}
5419
+ });
5420
+ if (!result?.transactionHash) {
5421
+ throw new Error("entity.transfer returned no transaction hash. Check the [entity:transfer] handler logs.");
5422
+ }
5423
+ return { output: { ...result, recipientDid: inputs.recipientDid } };
5424
+ }
5425
+ });
5426
+
5376
5427
  // src/core/lib/actionRegistry/actions/calendar/eventCreate.types.ts
5377
5428
  var EMPTY = {
5378
5429
  connection: null,
@@ -7107,6 +7158,37 @@ registerDiffResolver("qi/carbon.retire", {
7107
7158
  }
7108
7159
  });
7109
7160
 
7161
+ // src/core/lib/actionRegistry/actions/entityTransfer/entityTransfer.diff.ts
7162
+ registerDiffResolver("qi/entity.transfer", {
7163
+ resolver: async (inputs, ctx) => {
7164
+ const recipient = String(inputs.recipientDid || "").trim();
7165
+ if (!recipient) return [];
7166
+ const entityDid = String(inputs.entityDid || "").trim();
7167
+ const currentOwner = String(inputs.ownerDid || "").trim() || ctx.actorDid || "current owner";
7168
+ const rows = [
7169
+ {
7170
+ key: "owner",
7171
+ label: "Owner",
7172
+ before: currentOwner,
7173
+ after: recipient,
7174
+ changeType: "replace",
7175
+ severity: "critical"
7176
+ }
7177
+ ];
7178
+ if (entityDid) {
7179
+ rows.push({
7180
+ key: "entity",
7181
+ label: "Entity",
7182
+ before: entityDid,
7183
+ after: entityDid,
7184
+ changeType: "unchanged",
7185
+ severity: "info"
7186
+ });
7187
+ }
7188
+ return rows;
7189
+ }
7190
+ });
7191
+
7110
7192
  // src/core/services/ucanService.ts
7111
7193
  import {
7112
7194
  createDelegation as ucanCreateDelegation,
@@ -11728,4 +11810,4 @@ export {
11728
11810
  executeQueuedFlowAgentCoreCommands,
11729
11811
  FlowAgentService
11730
11812
  };
11731
- //# sourceMappingURL=chunk-W5M4NLHK.mjs.map
11813
+ //# sourceMappingURL=chunk-KWN34HVF.mjs.map