@semiont/make-meaning 0.5.22 → 0.5.24

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/index.js CHANGED
@@ -1392,26 +1392,26 @@ var require_BehaviorSubject = __commonJS({
1392
1392
  Object.defineProperty(exports, "__esModule", { value: true });
1393
1393
  exports.BehaviorSubject = void 0;
1394
1394
  var Subject_1 = require_Subject();
1395
- var BehaviorSubject2 = (function(_super) {
1396
- __extends(BehaviorSubject3, _super);
1397
- function BehaviorSubject3(_value) {
1395
+ var BehaviorSubject3 = (function(_super) {
1396
+ __extends(BehaviorSubject4, _super);
1397
+ function BehaviorSubject4(_value) {
1398
1398
  var _this = _super.call(this) || this;
1399
1399
  _this._value = _value;
1400
1400
  return _this;
1401
1401
  }
1402
- Object.defineProperty(BehaviorSubject3.prototype, "value", {
1402
+ Object.defineProperty(BehaviorSubject4.prototype, "value", {
1403
1403
  get: function() {
1404
1404
  return this.getValue();
1405
1405
  },
1406
1406
  enumerable: false,
1407
1407
  configurable: true
1408
1408
  });
1409
- BehaviorSubject3.prototype._subscribe = function(subscriber) {
1409
+ BehaviorSubject4.prototype._subscribe = function(subscriber) {
1410
1410
  var subscription = _super.prototype._subscribe.call(this, subscriber);
1411
1411
  !subscription.closed && subscriber.next(this._value);
1412
1412
  return subscription;
1413
1413
  };
1414
- BehaviorSubject3.prototype.getValue = function() {
1414
+ BehaviorSubject4.prototype.getValue = function() {
1415
1415
  var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;
1416
1416
  if (hasError) {
1417
1417
  throw thrownError;
@@ -1419,12 +1419,12 @@ var require_BehaviorSubject = __commonJS({
1419
1419
  this._throwIfClosed();
1420
1420
  return _value;
1421
1421
  };
1422
- BehaviorSubject3.prototype.next = function(value) {
1422
+ BehaviorSubject4.prototype.next = function(value) {
1423
1423
  _super.prototype.next.call(this, this._value = value);
1424
1424
  };
1425
- return BehaviorSubject3;
1425
+ return BehaviorSubject4;
1426
1426
  })(Subject_1.Subject);
1427
- exports.BehaviorSubject = BehaviorSubject2;
1427
+ exports.BehaviorSubject = BehaviorSubject3;
1428
1428
  }
1429
1429
  });
1430
1430
 
@@ -9744,7 +9744,7 @@ function resolveWorkerInference(config, workerType) {
9744
9744
  }
9745
9745
 
9746
9746
  // src/service.ts
9747
- var import_rxjs6 = __toESM(require_cjs());
9747
+ var import_rxjs7 = __toESM(require_cjs());
9748
9748
  var import_operators6 = __toESM(require_operators());
9749
9749
 
9750
9750
  // src/weave-progress.ts
@@ -12148,10 +12148,11 @@ async function readAnnotationFromView(kb, resourceId10, annotationId5) {
12148
12148
  }
12149
12149
 
12150
12150
  // src/clone-token-manager.ts
12151
- var import_rxjs5 = __toESM(require_cjs());
12151
+ var import_rxjs6 = __toESM(require_cjs());
12152
12152
  var import_operators5 = __toESM(require_operators());
12153
12153
 
12154
12154
  // src/bus-request-local.ts
12155
+ var import_rxjs5 = __toESM(require_cjs());
12155
12156
  function asBusRequestPrimitive(eventBus) {
12156
12157
  return {
12157
12158
  emit(channel, payload) {
@@ -12160,7 +12161,12 @@ function asBusRequestPrimitive(eventBus) {
12160
12161
  },
12161
12162
  stream(channel) {
12162
12163
  return eventBus.get(channel).asObservable();
12163
- }
12164
+ },
12165
+ // In-process delivery is synchronous — no attach window, so `'open'` is
12166
+ // the true state (.plans/BUS-ATTACH-GATE.md). A destroyed bus throws at
12167
+ // `eventBus.get()` before the gate could matter. Published read-only
12168
+ // (X1): the subject's mutators must not leak to consumers.
12169
+ state$: new import_rxjs5.BehaviorSubject("open").asObservable()
12164
12170
  };
12165
12171
  }
12166
12172
 
@@ -12209,13 +12215,13 @@ var CloneTokenManager = class {
12209
12215
  this.logger.info("CloneTokenManager actor initialized");
12210
12216
  const errorHandler = (err) => this.logger.error("CloneTokenManager pipeline error", { error: err });
12211
12217
  const generateToken$ = this.eventBus.get("yield:clone-token-requested").pipe(
12212
- (0, import_operators5.mergeMap)((event) => (0, import_rxjs5.from)(this.handleGenerateToken(event)))
12218
+ (0, import_operators5.mergeMap)((event) => (0, import_rxjs6.from)(this.handleGenerateToken(event)))
12213
12219
  );
12214
12220
  const getResource$ = this.eventBus.get("yield:clone-resource-requested").pipe(
12215
- (0, import_operators5.mergeMap)((event) => (0, import_rxjs5.from)(this.handleGetResource(event)))
12221
+ (0, import_operators5.mergeMap)((event) => (0, import_rxjs6.from)(this.handleGetResource(event)))
12216
12222
  );
12217
12223
  const createResource$ = this.eventBus.get("yield:clone-create").pipe(
12218
- (0, import_operators5.mergeMap)((event) => (0, import_rxjs5.from)(this.handleCreateResource(event)))
12224
+ (0, import_operators5.mergeMap)((event) => (0, import_rxjs6.from)(this.handleCreateResource(event)))
12219
12225
  );
12220
12226
  this.subscriptions.push(
12221
12227
  generateToken$.subscribe({ error: errorHandler }),
@@ -12764,7 +12770,7 @@ async function createJobQueue(project, eventBus, logger) {
12764
12770
  await jobQueue.initialize();
12765
12771
  registerJobQueueProvider(() => jobQueue.getStats());
12766
12772
  const jobStatusSubscription = eventBus.get("job:status-requested").pipe(
12767
- (0, import_operators6.mergeMap)((event) => (0, import_rxjs6.from)((async () => {
12773
+ (0, import_operators6.mergeMap)((event) => (0, import_rxjs7.from)((async () => {
12768
12774
  try {
12769
12775
  const job = await jobQueue.getJob(jobId(event.jobId));
12770
12776
  if (!job) {
@@ -12920,11 +12926,11 @@ async function startMakeMeaning(project, config, eventBus, logger, options) {
12920
12926
  }
12921
12927
 
12922
12928
  // src/local-transport.ts
12923
- var import_rxjs7 = __toESM(require_cjs());
12929
+ var import_rxjs8 = __toESM(require_cjs());
12924
12930
  var LocalTransport = class {
12925
12931
  baseUrl;
12926
12932
  state$;
12927
- errorsSubject = new import_rxjs7.Subject();
12933
+ errorsSubject = new import_rxjs8.Subject();
12928
12934
  /**
12929
12935
  * Stream of `SemiontError` instances surfaced from transport-mediated
12930
12936
  * round-trips (typed-wire methods on this transport that fail). The
@@ -12945,7 +12951,7 @@ var LocalTransport = class {
12945
12951
  this.bus = cfg.eventBus;
12946
12952
  this.userId = cfg.userId;
12947
12953
  this.baseUrl = cfg.baseUrl ?? baseUrl("local://in-process");
12948
- this.state$ = new import_rxjs7.BehaviorSubject("open");
12954
+ this.state$ = new import_rxjs8.BehaviorSubject("open");
12949
12955
  }
12950
12956
  // ── Bus primitives ──────────────────────────────────────────────────────
12951
12957
  async emit(channel, payload, resourceScope) {
@@ -13078,7 +13084,7 @@ var LocalContentTransport = class {
13078
13084
  };
13079
13085
 
13080
13086
  // src/smelter.ts
13081
- var import_rxjs8 = __toESM(require_cjs());
13087
+ var import_rxjs9 = __toESM(require_cjs());
13082
13088
  var import_operators7 = __toESM(require_operators());
13083
13089
 
13084
13090
  // src/batch-utils.ts
@@ -13134,7 +13140,7 @@ var Smelter = class _Smelter {
13134
13140
  static RECONCILE_PAGE_SIZE = 200;
13135
13141
  /** Bound on concurrently in-flight reconcile work — a cold rebuild must not fan out unbounded embedding calls. */
13136
13142
  static RECONCILE_WAVE = 8;
13137
- eventSubject = new import_rxjs8.Subject();
13143
+ eventSubject = new import_rxjs9.Subject();
13138
13144
  sourceSubscription = null;
13139
13145
  pipelineSubscription = null;
13140
13146
  _eventsProcessed = 0;
@@ -13159,13 +13165,13 @@ var Smelter = class _Smelter {
13159
13165
  }),
13160
13166
  (0, import_operators7.concatMap)((inputOrBatch) => {
13161
13167
  if (Array.isArray(inputOrBatch)) {
13162
- return (0, import_rxjs8.from)(
13168
+ return (0, import_rxjs9.from)(
13163
13169
  withActorSpan("smelter", "batch", async () => {
13164
13170
  this._eventsProcessed += await this.processBatch(inputOrBatch);
13165
13171
  }, { "batch.size": inputOrBatch.length })
13166
13172
  );
13167
13173
  }
13168
- return (0, import_rxjs8.from)(
13174
+ return (0, import_rxjs9.from)(
13169
13175
  withActorSpan("smelter", inputOrBatch.type, async () => {
13170
13176
  const ok = await this.safeProcessEvent(inputOrBatch);
13171
13177
  if (isWorkItem(inputOrBatch)) this.noteWorkDone(1);
@@ -13678,7 +13684,7 @@ var Smelter = class _Smelter {
13678
13684
  };
13679
13685
 
13680
13686
  // src/smelter-actor-state-unit.ts
13681
- var import_rxjs9 = __toESM(require_cjs());
13687
+ var import_rxjs10 = __toESM(require_cjs());
13682
13688
  var import_operators8 = __toESM(require_operators());
13683
13689
  var SMELTER_CHANNELS = [
13684
13690
  "yield:created",
@@ -13694,7 +13700,7 @@ var SMELTER_CHANNELS = [
13694
13700
  function createSmelterActorStateUnit(options) {
13695
13701
  const { bus } = options;
13696
13702
  let started = false;
13697
- const events$ = (0, import_rxjs9.merge)(
13703
+ const events$ = (0, import_rxjs10.merge)(
13698
13704
  ...SMELTER_CHANNELS.map(
13699
13705
  (channel) => bus.on$(channel).pipe(
13700
13706
  (0, import_operators8.map)((payload) => ({
@@ -13901,24 +13907,24 @@ function collectContentRefs(streamData) {
13901
13907
  }
13902
13908
 
13903
13909
  // src/exchange/await-reply.ts
13904
- var import_rxjs10 = __toESM(require_cjs());
13910
+ var import_rxjs11 = __toESM(require_cjs());
13905
13911
  var import_operators9 = __toESM(require_operators());
13906
13912
  function awaitReply(eventBus, command, payload, okChannel, failedChannel, timeoutMs) {
13907
- const result$ = (0, import_rxjs10.race)(
13913
+ const result$ = (0, import_rxjs11.race)(
13908
13914
  eventBus.get(okChannel).pipe((0, import_operators9.map)(() => void 0)),
13909
13915
  eventBus.get(failedChannel).pipe(
13910
13916
  (0, import_operators9.map)((e) => {
13911
13917
  throw new Error(e.message ?? `${command} failed`);
13912
13918
  })
13913
13919
  ),
13914
- (0, import_rxjs10.timer)(timeoutMs).pipe(
13920
+ (0, import_rxjs11.timer)(timeoutMs).pipe(
13915
13921
  (0, import_operators9.map)(() => {
13916
13922
  throw new Error(`Timeout waiting for ${okChannel}`);
13917
13923
  })
13918
13924
  )
13919
13925
  );
13920
13926
  eventBus.get(command).next(payload);
13921
- return (0, import_rxjs10.firstValueFrom)(result$);
13927
+ return (0, import_rxjs11.firstValueFrom)(result$);
13922
13928
  }
13923
13929
  var REPLAY_TIMEOUT_MS = 3e4;
13924
13930
  async function replayEventStream(jsonl, eventBus, eventStore, resolveBlob, contentStore, logger) {