@listen-fire/engine 0.12.12 → 0.13.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.
Files changed (81) hide show
  1. package/dist/public/adapter-config.d.ts +1 -1
  2. package/dist/public/adapter-config.js +2 -3
  3. package/dist/public/adapter.d.ts +1 -1
  4. package/dist/public/adapter.js +3 -2
  5. package/dist/public/embed.d.ts +0 -1
  6. package/dist/public/embed.js +2 -5
  7. package/dist/public/inbound.d.ts +1 -1
  8. package/dist/public/inbound.js +6 -4
  9. package/dist/public/movement-engine.d.ts +1 -1
  10. package/dist/public/movement-engine.js +1 -2
  11. package/dist/public/run-host.d.ts +0 -1
  12. package/dist/public/run-host.js +3 -4
  13. package/dist/public/testing.d.ts +1 -0
  14. package/dist/public/testing.js +2 -1
  15. package/dist/services/embed/in_process_host.d.ts +1 -1
  16. package/dist/services/embed/in_process_host.js +1 -1
  17. package/dist/services/embed/introspect.d.ts +1 -1
  18. package/dist/services/embed/introspect.js +38 -1
  19. package/dist/services/inbound/contract.d.ts +10 -7
  20. package/dist/services/inbound/contract.js +105 -112
  21. package/dist/services/inbound/deliver.d.ts +49 -25
  22. package/dist/services/inbound/deliver.js +73 -80
  23. package/dist/services/inbound/push.d.ts +17 -32
  24. package/dist/services/inbound/push.js +22 -51
  25. package/dist/services/inbound/verify.d.ts +3 -0
  26. package/dist/services/inbound/verify.js +15 -2
  27. package/dist/services/limiter/contract.js +3 -3
  28. package/dist/services/limiter/limiter.js +1 -1
  29. package/dist/services/limiter/rpc_limiter.js +1 -1
  30. package/dist/services/loop_guard/contract.js +3 -3
  31. package/dist/services/loop_guard/loop_guard.js +1 -1
  32. package/dist/services/loop_guard/rpc_loop_guard.js +2 -2
  33. package/dist/services/movement_engine/binding.d.ts +1 -17
  34. package/dist/services/movement_engine/host.d.ts +20 -43
  35. package/dist/services/movement_engine/host_adapter.js +1 -2
  36. package/dist/services/movement_engine/host_kit.d.ts +3 -3
  37. package/dist/services/movement_engine/run_types.d.ts +12 -15
  38. package/dist/services/movement_engine/rust_engine.d.ts +1 -6
  39. package/dist/services/movement_engine/rust_engine.js +3 -16
  40. package/dist/services/movement_engine/rust_host.js +60 -53
  41. package/dist/services/movement_engine/rust_run.d.ts +1 -9
  42. package/dist/services/movement_engine/rust_run.js +1 -14
  43. package/dist/services/movement_engine/rust_wire.d.ts +1 -2
  44. package/dist/services/movement_engine/rust_wire.js +3 -20
  45. package/dist/services/movement_engine/segment_context.d.ts +1 -2
  46. package/dist/services/movement_engine/segment_context.js +1 -9
  47. package/dist/services/movement_engine/segment_limits.js +1 -1
  48. package/dist/services/movement_engine/test_host.d.ts +2 -1
  49. package/dist/services/movement_engine/test_host.js +4 -4
  50. package/dist/services/run_host/contract.d.ts +4 -14
  51. package/dist/services/run_host/contract.js +314 -324
  52. package/dist/services/run_host/drain.d.ts +38 -31
  53. package/dist/services/run_host/drain.js +94 -65
  54. package/dist/services/run_host/memory_store.d.ts +6 -4
  55. package/dist/services/run_host/memory_store.js +469 -69
  56. package/dist/services/run_host/rpc_store.d.ts +33 -37
  57. package/dist/services/run_host/rpc_store.js +106 -60
  58. package/dist/services/run_host/rules.d.ts +97 -41
  59. package/dist/services/run_host/rules.js +193 -69
  60. package/dist/services/run_host/store.d.ts +420 -144
  61. package/dist/services/run_host/store.js +33 -4
  62. package/dist/services/run_host/store_waits.d.ts +14 -0
  63. package/dist/services/run_host/store_waits.js +385 -0
  64. package/dist/services/secrets/contract.js +1 -1
  65. package/dist/services/translation_graph/adapters/remote/index.d.ts +12 -20
  66. package/dist/services/translation_graph/adapters/remote/index.js +12 -26
  67. package/dist/services/translation_graph/engine/adapter_table.js +10 -7
  68. package/dist/services/translation_graph/engine/files/document_store.js +1 -1
  69. package/dist/services/translation_graph/movement/catalog_snapshot.d.ts +2 -20
  70. package/dist/services/translation_graph/movement/catalog_snapshot.js +7 -76
  71. package/dist/services/translation_graph/movement/schema_projection.d.ts +10 -7
  72. package/dist/services/translation_graph/movement/schema_projection.js +99 -53
  73. package/dist/services/translation_graph/triggers/listen_config.d.ts +1 -55
  74. package/dist/services/translation_graph/triggers/listen_config.js +2 -105
  75. package/dist/services/translation_graph/triggers/listen_plans.d.ts +168 -0
  76. package/dist/services/translation_graph/triggers/listen_plans.js +280 -0
  77. package/package.json +4 -4
  78. package/dist/services/run_host/callbacks.d.ts +0 -156
  79. package/dist/services/run_host/callbacks.js +0 -266
  80. package/dist/services/translation_graph/movement/file_listeners.d.ts +0 -27
  81. package/dist/services/translation_graph/movement/file_listeners.js +0 -113
@@ -1 +1 @@
1
- export * from '@listen-fire/engine-contracts/trigger_config';
1
+ export * from '@listen-fire/engine-contracts/config_blocks';
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  // How an adapter's configuration is declared and validated: the config blocks
3
- // a trigger or an install form is built from (and the zod schema derived from
4
- // them).
3
+ // a construction form is built from (and the zod schema derived from them).
5
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
5
  if (k2 === undefined) k2 = k;
7
6
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -17,4 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
17
  };
19
18
  Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("@listen-fire/engine-contracts/trigger_config"), exports);
19
+ __exportStar(require("@listen-fire/engine-contracts/config_blocks"), exports);
@@ -1,6 +1,6 @@
1
1
  export * from '../services/translation_graph/adapter';
2
2
  export { normalizeAdapterType } from '../services/translation_graph/adapter_type';
3
- export * from '@listen-fire/engine-contracts/awaitable';
3
+ export * from '@listen-fire/engine-contracts/arrivals';
4
4
  export { newDryRunRehearsal, wrapAdapterForDryRun, type CapturedWrite, type DryRunRehearsal, type DryRunWriteSink, } from '../services/translation_graph/engine/dry_run_adapter';
5
5
  export * from '@listen-fire/engine-contracts/mutation_context';
6
6
  export { ADAPTER_TEAM_HEADER, RemoteProtocolError, RemoteResponseShapeError, RemoteTransportError, authHeader, parseWireResult, postRpc, type AuthStrategy, } from '../services/translation_graph/protocol/client';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  // What an adapter is: its manifest, the live instance a run calls, the
3
- // awaitable capability, the dry-run wrapper, and the type name rules.
3
+ // arrivals capability (adapter protocol 2.5), the dry-run wrapper, and the
4
+ // type name rules.
4
5
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
6
  if (k2 === undefined) k2 = k;
6
7
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -20,7 +21,7 @@ exports.postRpc = exports.parseWireResult = exports.authHeader = exports.RemoteT
20
21
  __exportStar(require("../services/translation_graph/adapter"), exports);
21
22
  var adapter_type_1 = require("../services/translation_graph/adapter_type");
22
23
  Object.defineProperty(exports, "normalizeAdapterType", { enumerable: true, get: function () { return adapter_type_1.normalizeAdapterType; } });
23
- __exportStar(require("@listen-fire/engine-contracts/awaitable"), exports);
24
+ __exportStar(require("@listen-fire/engine-contracts/arrivals"), exports);
24
25
  var dry_run_adapter_1 = require("../services/translation_graph/engine/dry_run_adapter");
25
26
  Object.defineProperty(exports, "newDryRunRehearsal", { enumerable: true, get: function () { return dry_run_adapter_1.newDryRunRehearsal; } });
26
27
  Object.defineProperty(exports, "wrapAdapterForDryRun", { enumerable: true, get: function () { return dry_run_adapter_1.wrapAdapterForDryRun; } });
@@ -3,7 +3,6 @@ export { CredentialNotTenants, type CredentialOwnership } from '../services/tran
3
3
  export { introspectAdapter } from '../services/embed/introspect';
4
4
  export { memoryRunHostStore } from '../services/run_host/memory_store';
5
5
  export { InMemoryWriteLocks, type WriteLocks } from '../services/write_locks/write_locks';
6
- export { collectFileListeners, type FileListener } from '../services/translation_graph/movement/file_listeners';
7
6
  export { MovementEngineError, isCheckFailure, type MovementEngineErrorCode } from '../services/movement_engine/errors';
8
7
  export { pricedModels, type ExtractCallModelClient, type ModelClient } from '../services/embed/models';
9
8
  export type { LlmCallInput, LlmCallResult } from '../services/translation_graph/engine/batched_extraction/llm_call';
@@ -2,11 +2,10 @@
2
2
  // Embedding the engine in another product's own process: the in-process host
3
3
  // to fill with the embedder's own parts (its adapters, models, files, parks),
4
4
  // the write locks it starts from, the instance schema it reads off each
5
- // adapter it loaded, the routing table it reads off a customer's movement
6
- // (its `listen` statements), and an in-memory store for runs that `await` or
5
+ // adapter it loaded, and an in-memory store for runs that `await` or
7
6
  // `sleep`. docs/embedding.md walks through it.
8
7
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.pricedModels = exports.isCheckFailure = exports.MovementEngineError = exports.collectFileListeners = exports.InMemoryWriteLocks = exports.memoryRunHostStore = exports.introspectAdapter = exports.CredentialNotTenants = exports.inProcessHost = void 0;
8
+ exports.pricedModels = exports.isCheckFailure = exports.MovementEngineError = exports.InMemoryWriteLocks = exports.memoryRunHostStore = exports.introspectAdapter = exports.CredentialNotTenants = exports.inProcessHost = void 0;
10
9
  var in_process_host_1 = require("../services/embed/in_process_host");
11
10
  Object.defineProperty(exports, "inProcessHost", { enumerable: true, get: function () { return in_process_host_1.inProcessHost; } });
12
11
  var adapter_table_1 = require("../services/translation_graph/engine/adapter_table");
@@ -17,8 +16,6 @@ var memory_store_1 = require("../services/run_host/memory_store");
17
16
  Object.defineProperty(exports, "memoryRunHostStore", { enumerable: true, get: function () { return memory_store_1.memoryRunHostStore; } });
18
17
  var write_locks_1 = require("../services/write_locks/write_locks");
19
18
  Object.defineProperty(exports, "InMemoryWriteLocks", { enumerable: true, get: function () { return write_locks_1.InMemoryWriteLocks; } });
20
- var file_listeners_1 = require("../services/translation_graph/movement/file_listeners");
21
- Object.defineProperty(exports, "collectFileListeners", { enumerable: true, get: function () { return file_listeners_1.collectFileListeners; } });
22
19
  var errors_1 = require("../services/movement_engine/errors");
23
20
  Object.defineProperty(exports, "MovementEngineError", { enumerable: true, get: function () { return errors_1.MovementEngineError; } });
24
21
  Object.defineProperty(exports, "isCheckFailure", { enumerable: true, get: function () { return errors_1.isCheckFailure; } });
@@ -1,6 +1,7 @@
1
1
  export * from '../services/translation_graph/triggers/types';
2
2
  export * from '../services/translation_graph/triggers/trigger_event';
3
3
  export * from '../services/translation_graph/triggers/listen_config';
4
+ export * from '../services/translation_graph/triggers/listen_plans';
4
5
  export * from '../services/translation_graph/engine/inbound/discriminate';
5
6
  export * from '../services/webhook_sync/remote_inbound';
6
7
  export * from '../services/inbound/verify';
@@ -8,4 +9,3 @@ export * from '../services/inbound/deliver';
8
9
  export * from '../services/inbound/push';
9
10
  export * from '../services/inbound/shared';
10
11
  export * from '../services/inbound/contract';
11
- export * from '../services/translation_graph/movement/file_listeners';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
- // Inbound events: the trigger event a run starts from, the listeners a
3
- // program declares, the trigger scope rules, discrimination, the remote
4
- // delivery signature, and the doors a module pushes through.
2
+ // Inbound events: the trigger event a run starts from, the connection each
3
+ // listen is on, the plans its check answers for its listens and the judge of
4
+ // whether an arrival fires one, which connection's deliveries a listen hears,
5
+ // discrimination, the remote delivery signature, and the doors a module
6
+ // pushes through.
5
7
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
8
  if (k2 === undefined) k2 = k;
7
9
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -20,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
20
22
  __exportStar(require("../services/translation_graph/triggers/types"), exports);
21
23
  __exportStar(require("../services/translation_graph/triggers/trigger_event"), exports);
22
24
  __exportStar(require("../services/translation_graph/triggers/listen_config"), exports);
25
+ __exportStar(require("../services/translation_graph/triggers/listen_plans"), exports);
23
26
  __exportStar(require("../services/translation_graph/engine/inbound/discriminate"), exports);
24
27
  __exportStar(require("../services/webhook_sync/remote_inbound"), exports);
25
28
  __exportStar(require("../services/inbound/verify"), exports);
@@ -27,4 +30,3 @@ __exportStar(require("../services/inbound/deliver"), exports);
27
30
  __exportStar(require("../services/inbound/push"), exports);
28
31
  __exportStar(require("../services/inbound/shared"), exports);
29
32
  __exportStar(require("../services/inbound/contract"), exports);
30
- __exportStar(require("../services/translation_graph/movement/file_listeners"), exports);
@@ -1,4 +1,4 @@
1
- export { fireCallbackBody, resumeMovement, runMovement, settleRaceFrame } from '../services/movement_engine/rust_run';
1
+ export { resumeMovement, runMovement, settleRaceFrame } from '../services/movement_engine/rust_run';
2
2
  export { MovementRunFailed, RunCancelledSignal, runFailureCause } from '../services/movement_engine/errors';
3
3
  export type { CancelGate, MovementRunResult, MovementWriteRecord, ParkSink, ResumeMovementInput, RunLimitPause, RunMovementInput, } from '../services/movement_engine/run_types';
4
4
  export { assertEngineConfigured } from '../services/movement_engine/rust_engine';
@@ -29,10 +29,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  return result;
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.ENGINE_VERSION = exports.checkInputOf = exports.throwIfBlocking = exports.parsePinned = exports.checkPinnedInRust = exports.checkAnswerInRust = exports.programCheck = exports.assertEngineConfigured = exports.runFailureCause = exports.RunCancelledSignal = exports.MovementRunFailed = exports.settleRaceFrame = exports.runMovement = exports.resumeMovement = exports.fireCallbackBody = void 0;
32
+ exports.ENGINE_VERSION = exports.checkInputOf = exports.throwIfBlocking = exports.parsePinned = exports.checkPinnedInRust = exports.checkAnswerInRust = exports.programCheck = exports.assertEngineConfigured = exports.runFailureCause = exports.RunCancelledSignal = exports.MovementRunFailed = exports.settleRaceFrame = exports.runMovement = exports.resumeMovement = void 0;
33
33
  const movement_lang_1 = require("@listen-fire/movement-lang");
34
34
  var rust_run_1 = require("../services/movement_engine/rust_run");
35
- Object.defineProperty(exports, "fireCallbackBody", { enumerable: true, get: function () { return rust_run_1.fireCallbackBody; } });
36
35
  Object.defineProperty(exports, "resumeMovement", { enumerable: true, get: function () { return rust_run_1.resumeMovement; } });
37
36
  Object.defineProperty(exports, "runMovement", { enumerable: true, get: function () { return rust_run_1.runMovement; } });
38
37
  Object.defineProperty(exports, "settleRaceFrame", { enumerable: true, get: function () { return rust_run_1.settleRaceFrame; } });
@@ -3,4 +3,3 @@ export * from '../services/run_host/memory_store';
3
3
  export * from '../services/run_host/rules';
4
4
  export * from '../services/run_host/lease';
5
5
  export * from '../services/run_host/drain';
6
- export * from '../services/run_host/callbacks';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- // The run host: the store a shell keeps for parked runs, joins, awaits and
3
- // work, the rules and drain loop that advance a run over it, and the callback
4
- // family (ids, value rules, the sink, the keeper, recording a call, running a body).
2
+ // The run host: the store a shell keeps for parked runs, joins, the waits
3
+ // their awaits read and the arrivals logged for them, and work; the rules and
4
+ // drain loop that advance a run over it.
5
5
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
6
  if (k2 === undefined) k2 = k;
7
7
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -22,4 +22,3 @@ __exportStar(require("../services/run_host/memory_store"), exports);
22
22
  __exportStar(require("../services/run_host/rules"), exports);
23
23
  __exportStar(require("../services/run_host/lease"), exports);
24
24
  __exportStar(require("../services/run_host/drain"), exports);
25
- __exportStar(require("../services/run_host/callbacks"), exports);
@@ -1,5 +1,6 @@
1
1
  export * from '../services/movement_engine/test_host';
2
2
  export * from '../services/run_host/contract';
3
+ export * from '../services/run_host/store_waits';
3
4
  export * from '../services/browser/contract';
4
5
  export * from '../services/browser/fake_browser';
5
6
  export * from '../services/limiter/contract';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  // For test files only: a ready test host, its fakes, the run host's contract
3
- // cases a store implementation must pass, and the browser slot's contract
3
+ // cases and the waits cases a store implementation must pass, and the browser slot's contract
4
4
  // cases with a scripted page to hold a module to them without a browser, and
5
5
  // the limiter slot's contract cases a limiter implementation must pass.
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.RpcStoreBackend = void 0;
22
22
  __exportStar(require("../services/movement_engine/test_host"), exports);
23
23
  __exportStar(require("../services/run_host/contract"), exports);
24
+ __exportStar(require("../services/run_host/store_waits"), exports);
24
25
  __exportStar(require("../services/browser/contract"), exports);
25
26
  __exportStar(require("../services/browser/fake_browser"), exports);
26
27
  __exportStar(require("../services/limiter/contract"), exports);
@@ -17,7 +17,7 @@ export interface InProcessHostOptions {
17
17
  credentials?: CredentialOwnership;
18
18
  /** The models slot: the model calls a run makes. Absent ⇒ refused by name. */
19
19
  llm?: Partial<EngineHost['llm']>;
20
- /** The store slot's run half: where parks, callbacks and pinned texts go.
20
+ /** The store slot's run half: where parks, waits and pinned texts go.
21
21
  * Absent ⇒ a run that parks fails (it has no durable substrate). */
22
22
  park?: Partial<EngineHost['park']>;
23
23
  control?: Partial<EngineHost['control']>;
@@ -58,7 +58,7 @@ function inProcessHost(options = {}) {
58
58
  },
59
59
  park: {
60
60
  ...(park.sink !== undefined ? { sink: park.sink } : {}),
61
- ...(park.callbacks !== undefined ? { callbacks: park.callbacks } : {}),
61
+ ...(park.waits !== undefined ? { waits: park.waits } : {}),
62
62
  ...(park.sources !== undefined ? { sources: park.sources } : {}),
63
63
  wake: park.wake ?? refused('park.wake'),
64
64
  bindings: park.bindings ?? {
@@ -2,7 +2,7 @@ import type { InstanceSchema } from '@listen-fire/movement-lang';
2
2
  import type { Adapter, AdapterManifest } from '../translation_graph/adapter';
3
3
  /** The instance schema `adapter` answers today, with the projection's notes
4
4
  * (a name two entries share, a type it could not describe). */
5
- export declare function introspectAdapter(adapter: Adapter, manifest: Pick<AdapterManifest, 'adapterType' | 'methods'>): Promise<{
5
+ export declare function introspectAdapter(adapter: Adapter, manifest: Pick<AdapterManifest, 'adapterType' | 'methods' | 'listenSettingsBecome'>): Promise<{
6
6
  schema: InstanceSchema;
7
7
  notes: string[];
8
8
  }>;
@@ -1,18 +1,55 @@
1
1
  "use strict";
2
2
  // What an embedder's catalog reads of a live adapter: its entry points and
3
3
  // each one's descriptor, projected into the checker's instance schema. The
4
- // hosted product caches this per install (instance_cache.ts) and lf asks each
4
+ // hosted product caches this per install (instance_cache.ts) and listen-fire asks each
5
5
  // external the same two questions (crates/lf check.rs); an embedder asks
6
6
  // them of the adapter it loaded in process.
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.introspectAdapter = introspectAdapter;
9
+ const catalog_1 = require("@listen-fire/engine-contracts/catalog");
9
10
  const schema_projection_1 = require("../translation_graph/movement/schema_projection");
10
11
  /** The instance schema `adapter` answers today, with the projection's notes
11
12
  * (a name two entries share, a type it could not describe). */
12
13
  async function introspectAdapter(adapter, manifest) {
14
+ const retiredInManifest = (0, catalog_1.retiredEntryKey)(manifest.adapterType, manifest, catalog_1.RETIRED_MANIFEST_KEYS);
15
+ if (retiredInManifest !== undefined)
16
+ throw new Error(`${manifest.adapterType}: ${retiredInManifest}`);
13
17
  const entries = await adapter.listEntryPoints();
18
+ for (const entry of entries) {
19
+ const refusal = (0, catalog_1.retiredEntryKey)(entry.typeId, entry, catalog_1.RETIRED_ENTRY_KEYS);
20
+ if (refusal !== undefined)
21
+ throw new Error(`${manifest.adapterType}: ${refusal}`);
22
+ }
14
23
  const described = await Promise.all(entries.map(async (entry) => [entry.typeId, await adapter.describe(entry.typeId)]));
15
24
  const descriptors = new Map(described.flatMap(([typeId, descriptor]) => (descriptor ? [[typeId, descriptor]] : [])));
25
+ for (const [typeId, descriptor] of descriptors) {
26
+ for (const field of descriptor.fields) {
27
+ const refusal = (0, catalog_1.unreadableOwnedField)(field) ?? (0, catalog_1.unreadableRecordField)(field);
28
+ if (refusal !== undefined)
29
+ throw new Error(`${manifest.adapterType} describes '${typeId}': ${refusal}`);
30
+ }
31
+ for (const reference of descriptor.references) {
32
+ const refusal = (0, catalog_1.undeclaredArrivalField)(reference, descriptors) ??
33
+ (0, catalog_1.unreadableLiteralsFrom)(reference, descriptors) ??
34
+ (0, catalog_1.unreadableAnswerShapeFrom)(reference, descriptor, descriptors) ??
35
+ (0, catalog_1.unreadableListening)({ reference, owner: typeId }, entries, descriptors);
36
+ if (refusal !== undefined)
37
+ throw new Error(`${manifest.adapterType} describes '${typeId}': ${refusal}`);
38
+ }
39
+ }
40
+ for (const entry of entries) {
41
+ const refusal = (0, catalog_1.unreadableListening)({ entry }, entries, descriptors);
42
+ if (refusal !== undefined)
43
+ throw new Error(`${manifest.adapterType} lists '${entry.typeId}': ${refusal}`);
44
+ }
45
+ const ambiguous = (0, catalog_1.ambiguousArrivals)(entries, descriptors);
46
+ if (ambiguous !== undefined)
47
+ throw new Error(`${manifest.adapterType} declares ${ambiguous}`);
48
+ if (manifest.listenSettingsBecome !== undefined) {
49
+ const refusal = (0, catalog_1.unreadableSettingsBecome)(manifest.listenSettingsBecome, entries, descriptors);
50
+ if (refusal !== undefined)
51
+ throw new Error(`${manifest.adapterType} declares ${refusal}`);
52
+ }
16
53
  return (0, schema_projection_1.instanceSchemaFromDescriptors)({
17
54
  adapterType: manifest.adapterType,
18
55
  entries,
@@ -1,3 +1,4 @@
1
+ import type { Arrival } from '@listen-fire/engine-contracts';
1
2
  import type { DiscriminableEvent } from '../translation_graph/adapter';
2
3
  import type { DeliveryHost, InboundIntercept, InboundStore } from './deliver';
3
4
  import type { PushStore } from './push';
@@ -33,12 +34,13 @@ export interface ContractWorld {
33
34
  faults: {
34
35
  /** Capturing the event whose payload has `fail: true` throws. */
35
36
  captureMarked?: boolean;
36
- /** Queueing any captured event throws. */
37
+ /** Keeping a delivery with any captured event throws. */
37
38
  enqueue?: boolean;
38
- /** The adapter's wakeKeys throws. */
39
- wakeKeys?: boolean;
40
- /** Queueing the wakes throws. */
41
- enqueueWakes?: boolean;
39
+ /** Keeping the delivery that captured the event whose payload has
40
+ * `fail: true` throws, the first time only: the sender's retry is kept. */
41
+ enqueueMarkedOnce?: boolean;
42
+ /** Keeping a delivery's arrivals throws. */
43
+ logArrivals?: boolean;
42
44
  };
43
45
  /** The subscription's deliveries are synthetic: no signature check, drained before the ack. */
44
46
  synthetic?: boolean;
@@ -47,7 +49,8 @@ export interface ContractWorld {
47
49
  export interface ContractObservations {
48
50
  captured: number;
49
51
  enqueued: number;
50
- wakes: string[];
52
+ /** Every arrival logged, in order. */
53
+ arrivals: Arrival[];
51
54
  checkpoints: unknown[];
52
55
  notified: number;
53
56
  }
@@ -83,6 +86,6 @@ export declare const DELIVERY_RECEIPT_CONTRACT_CASES: DeliveryReceiptContractCas
83
86
  export declare function memoryInboundStores(arranged: ContractWorld): {
84
87
  store: InboundStore<DiscriminableEvent>;
85
88
  host: DeliveryHost<DiscriminableEvent>;
86
- push: PushStore<DiscriminableEvent>;
89
+ push: PushStore;
87
90
  observed(): ContractObservations;
88
91
  };