@semiont/make-meaning 0.4.22 → 0.5.1

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  **Making meaning from resources through actors, context assembly, and relationship reasoning.**
10
10
 
11
- This package implements the actor model from [ARCHITECTURE.md](../../docs/ARCHITECTURE.md). It owns the **Knowledge Base** and the actors that interface with it:
11
+ This package implements the actor model from [ACTOR-MODEL.md](../../docs/system/ACTOR-MODEL.md). It owns the **Knowledge Base** and the actors that interface with it:
12
12
 
13
13
  - **Stower** (write) — the single write gateway to the Knowledge Base; handles all resource and annotation mutations and job lifecycle events
14
14
  - **Browser** (read) — handles all KB read queries: resources, annotations, events, annotation history, referenced-by lookups, entity type listing, and directory browse (merging filesystem listings with KB metadata)
package/dist/index.d.ts CHANGED
@@ -464,7 +464,7 @@ declare function startMakeMeaning(project: SemiontProject, config: MakeMeaningCo
464
464
  /**
465
465
  * LocalTransport — `ITransport` for an in-process `KnowledgeSystem`.
466
466
  *
467
- * Bus-ownership pattern (see `packages/core/docs/TRANSPORT-CONTRACT.md`):
467
+ * Bus-ownership pattern (see `docs/protocol/TRANSPORT-CONTRACT.md`):
468
468
  * - The caller owns a make-meaning `EventBus` and passes it to both
469
469
  * `startMakeMeaning` and `LocalTransport` so the transport can publish
470
470
  * directly onto the bus the `KnowledgeSystem` actors are listening on.
package/dist/index.js CHANGED
@@ -12576,6 +12576,13 @@ var CloneTokenManager = class {
12576
12576
  }
12577
12577
  async handleCreateResource(event) {
12578
12578
  try {
12579
+ if (!event._userId) {
12580
+ this.eventBus.get("yield:clone-create-failed").next({
12581
+ correlationId: event.correlationId,
12582
+ message: "yield:clone-create missing _userId (gateway injection)"
12583
+ });
12584
+ return;
12585
+ }
12579
12586
  const token = makeCloneToken(event.token);
12580
12587
  const tokenData = this.tokens.get(token);
12581
12588
  if (!tokenData) {
@@ -12617,12 +12624,12 @@ var CloneTokenManager = class {
12617
12624
  entityTypes: getResourceEntityTypes6(sourceDoc),
12618
12625
  creationMethod: CREATION_METHODS2.CLONE
12619
12626
  },
12620
- makeUserId2(event.userId),
12627
+ makeUserId2(event._userId),
12621
12628
  this.eventBus
12622
12629
  );
12623
12630
  if (event.archiveOriginal && !sourceDoc.archived) {
12624
12631
  this.eventBus.get("mark:archive").next({
12625
- _userId: event.userId,
12632
+ _userId: event._userId,
12626
12633
  resourceId: tokenData.resourceId
12627
12634
  });
12628
12635
  }