@graphrefly/graphrefly 0.46.0 → 0.47.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 (68) hide show
  1. package/dist/base/composition/index.cjs +69 -15
  2. package/dist/base/composition/index.cjs.map +1 -1
  3. package/dist/base/composition/index.d.cts +1 -2
  4. package/dist/base/composition/index.d.ts +1 -2
  5. package/dist/base/composition/index.js +1 -1
  6. package/dist/base/index.cjs +69 -15
  7. package/dist/base/index.cjs.map +1 -1
  8. package/dist/base/index.d.cts +1 -2
  9. package/dist/base/index.d.ts +1 -2
  10. package/dist/base/index.js +1 -1
  11. package/dist/{chunk-WKSWLSCX.js → chunk-22SG74BD.js} +2 -2
  12. package/dist/{chunk-OO5BM6CJ.js → chunk-5IMMNARC.js} +2 -2
  13. package/dist/{chunk-KIIXR252.js → chunk-EHRRQ4IC.js} +2 -2
  14. package/dist/{chunk-HULCUY35.js → chunk-GWRNLJNW.js} +2 -2
  15. package/dist/{chunk-5THCXDWY.js → chunk-JKTC747G.js} +2 -2
  16. package/dist/{chunk-RGL53X5G.js → chunk-TNX5ZGDJ.js} +3 -3
  17. package/dist/{chunk-LBAJK24K.js → chunk-VLAGJZSL.js} +11 -3
  18. package/dist/chunk-VLAGJZSL.js.map +1 -0
  19. package/dist/chunk-Z65DVDEQ.js +146 -0
  20. package/dist/chunk-Z65DVDEQ.js.map +1 -0
  21. package/dist/{chunk-GBCENOLN.js → chunk-ZT4WMQW4.js} +3 -3
  22. package/dist/{chunk-FR6RGA3B.js → chunk-ZVXXDWIB.js} +19 -14
  23. package/dist/{chunk-FR6RGA3B.js.map → chunk-ZVXXDWIB.js.map} +1 -1
  24. package/dist/compat/index.cjs +156 -93
  25. package/dist/compat/index.cjs.map +1 -1
  26. package/dist/compat/index.d.cts +3 -3
  27. package/dist/compat/index.d.ts +3 -3
  28. package/dist/compat/index.js +2 -2
  29. package/dist/compat/nestjs/index.cjs +156 -93
  30. package/dist/compat/nestjs/index.cjs.map +1 -1
  31. package/dist/compat/nestjs/index.d.cts +4 -4
  32. package/dist/compat/nestjs/index.d.ts +4 -4
  33. package/dist/compat/nestjs/index.js +4 -5
  34. package/dist/{index-5SU_O78r.d.cts → index-B_p8tnvf.d.cts} +19 -3
  35. package/dist/{index-CEXCtYYJ.d.ts → index-_HDSmPyp.d.ts} +19 -3
  36. package/dist/index.cjs +77 -18
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +1 -2
  39. package/dist/index.d.ts +1 -2
  40. package/dist/index.js +9 -9
  41. package/dist/observable-B25XqCbZ.d.cts +59 -0
  42. package/dist/observable-B25XqCbZ.d.ts +59 -0
  43. package/dist/presets/ai/index.js +5 -5
  44. package/dist/presets/harness/index.js +7 -7
  45. package/dist/presets/index.js +8 -8
  46. package/dist/solutions/index.js +6 -6
  47. package/dist/utils/ai/index.js +3 -3
  48. package/dist/utils/index.cjs +8 -3
  49. package/dist/utils/index.cjs.map +1 -1
  50. package/dist/utils/index.js +3 -3
  51. package/dist/utils/memory/index.cjs +8 -3
  52. package/dist/utils/memory/index.cjs.map +1 -1
  53. package/dist/utils/memory/index.d.cts +78 -0
  54. package/dist/utils/memory/index.d.ts +78 -0
  55. package/dist/utils/memory/index.js +1 -1
  56. package/package.json +1 -5
  57. package/dist/chunk-3QZY5BI7.js +0 -92
  58. package/dist/chunk-3QZY5BI7.js.map +0 -1
  59. package/dist/chunk-LBAJK24K.js.map +0 -1
  60. package/dist/observable-BXQoW1P-.d.cts +0 -36
  61. package/dist/observable-BXQoW1P-.d.ts +0 -36
  62. /package/dist/{chunk-WKSWLSCX.js.map → chunk-22SG74BD.js.map} +0 -0
  63. /package/dist/{chunk-OO5BM6CJ.js.map → chunk-5IMMNARC.js.map} +0 -0
  64. /package/dist/{chunk-KIIXR252.js.map → chunk-EHRRQ4IC.js.map} +0 -0
  65. /package/dist/{chunk-HULCUY35.js.map → chunk-GWRNLJNW.js.map} +0 -0
  66. /package/dist/{chunk-5THCXDWY.js.map → chunk-JKTC747G.js.map} +0 -0
  67. /package/dist/{chunk-RGL53X5G.js.map → chunk-TNX5ZGDJ.js.map} +0 -0
  68. /package/dist/{chunk-GBCENOLN.js.map → chunk-ZT4WMQW4.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -2,7 +2,7 @@ export * from '@graphrefly/pure-ts';
2
2
  export { ExtraOpts, GraphFactory, MaterializeOpts, NativePubSubBackend, PubSubBackend, PubSubHub, PubSubHubOptions, SelectorOpts, SingleFromAnyOptions, VerifiableBundle, VerifiableOptions, VerifyValue, WatermarkController, WatermarkOptions, createWatermarkController, materialize, pubsub, selector, singleFromAny, singleNodeFromAny, verifiable } from './base/composition/index.cjs';
3
3
  export { D as DistillBundle, a as DistillOptions, E as Extraction, d as distill } from './distill-De6Rnn15.cjs';
4
4
  export { B as BundleTriad, E as EmitTriad, a as ExternalBundleOptions, b as ExternalRegister, e as externalBundle, c as externalProducer } from './external-register-CWyroXb_.cjs';
5
- export { T as ToObservableOptions, t as toObservable } from './observable-BXQoW1P-.cjs';
5
+ export { I as InteropObservable, a as InteropObserver, b as InteropSubscription, T as ToObservableOptions, t as toObservable } from './observable-B25XqCbZ.cjs';
6
6
  export { AckableMessage, AdapterHandlers, BufferedSinkHandle, CSVRow, CheckpointToRedisOptions, CheckpointToS3Options, ClickHouseClientLike, ClickHouseInsertClientLike, ClickHouseRow, DrizzleQueryLike, FileWriterLike, FromCSVOptions, FromClickHouseWatchOptions, FromDrizzleOptions, FromHTTPOptions, FromHTTPPollOptions, FromHTTPStreamOptions, FromKafkaOptions, FromKyselyOptions, FromMCPOptions, FromNATSOptions, FromNDJSONOptions, FromOTelOptions, FromPrismaOptions, FromPrometheusOptions, FromPulsarOptions, FromRabbitMQOptions, FromRedisStreamOptions, FromSSEOptions, FromSqliteOptions, FromStatsDOptions, FromSyslogOptions, FromWebSocketReconnectOptions, HTTPBundle, KafkaConsumerLike, KafkaMessage, KafkaProducerLike, KyselyQueryLike, LokiClientLike, LokiStream, MCPClientLike, MongoCollectionLike, NATSClientLike, NATSMessage, NATSSubscriptionLike, OTelBundle, OTelLog, OTelMetric, OTelRegister, OTelSpan, ParseSSEStreamOptions, PostgresClientLike, PrismaModelLike, PrometheusMetric, PulsarConsumerLike, PulsarMessage, PulsarProducerLike, RabbitMQChannelLike, RabbitMQMessage, RedisCheckpointClientLike, RedisClientLike, RedisStreamEntry, S3ClientLike, SSEEvent, SinkHandle, SinkTransportError, SqliteDbLike, SqliteIterableDbLike, StatsDMetric, StatsDRegister, SyslogMessage, SyslogRegister, TempoClientLike, ToCSVOptions, ToClickHouseOptions, ToFileOptions, ToHTTPOptions, ToKafkaOptions, ToLokiOptions, ToMongoOptions, ToNATSOptions, ToPostgresOptions, ToPulsarOptions, ToRabbitMQOptions, ToRedisStreamOptions, ToS3Options, ToSSEOptions, ToSqliteOptions, ToTempoOptions, ToWebSocketOptions, WebSocketLike, WebSocketMessageEventLike, WebSocketRegister, WebhookRegister, checkpointToRedis, checkpointToS3, csvRows, fromCSV, fromClickHouseWatch, fromDrizzle, fromHTTP, fromHTTPPoll, fromHTTPStream, fromKafka, fromKysely, fromMCP, fromNATS, fromNDJSON, fromOTel, fromPrisma, fromPrometheus, fromPulsar, fromRabbitMQ, fromRedisStream, fromSSE, fromSqlite, fromSqliteCursor, fromStatsD, fromSyslog, fromWebSocket, fromWebSocketReconnect, fromWebhook, ndjsonRows, parsePrometheusText, parseSSEStream, parseStatsD, parseSyslog, toCSV, toClickHouse, toFile, toHTTP, toKafka, toLoki, toMongo, toNATS, toPostgres, toPulsar, toRabbitMQ, toReadableStream, toRedisStream, toS3, toSSE, toSSEBytes, toSqlite, toTempo, toWebSocket } from './base/io/index.cjs';
7
7
  export { domainMeta, emitToMeta } from './base/meta/index.cjs';
8
8
  export { AuditLogOpts, BaseAuditRecord, DEFAULT_AUDIT_GUARD, FailureMeta, MutateOpts, MutationAct, MutationFrame, SuccessMeta, appendAudit, bumpCursor, createAuditLog, mutate, registerCursor, registerCursorMap, tryIncrementBounded } from './base/mutation/index.cjs';
@@ -55,5 +55,4 @@ export { L as LayoutBox, a as LayoutEdge, b as LayoutFn, c as LayoutFrame } from
55
55
  export { N as NS_PER_SEC } from './backoff-Bnb9OoPh.cjs';
56
56
  import '@graphrefly/pure-ts/core';
57
57
  import '@graphrefly/pure-ts/extra';
58
- import 'rxjs';
59
58
  import '@graphrefly/pure-ts/extra/storage';
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export * from '@graphrefly/pure-ts';
2
2
  export { ExtraOpts, GraphFactory, MaterializeOpts, NativePubSubBackend, PubSubBackend, PubSubHub, PubSubHubOptions, SelectorOpts, SingleFromAnyOptions, VerifiableBundle, VerifiableOptions, VerifyValue, WatermarkController, WatermarkOptions, createWatermarkController, materialize, pubsub, selector, singleFromAny, singleNodeFromAny, verifiable } from './base/composition/index.js';
3
3
  export { D as DistillBundle, a as DistillOptions, E as Extraction, d as distill } from './distill-De6Rnn15.js';
4
4
  export { B as BundleTriad, E as EmitTriad, a as ExternalBundleOptions, b as ExternalRegister, e as externalBundle, c as externalProducer } from './external-register-CWyroXb_.js';
5
- export { T as ToObservableOptions, t as toObservable } from './observable-BXQoW1P-.js';
5
+ export { I as InteropObservable, a as InteropObserver, b as InteropSubscription, T as ToObservableOptions, t as toObservable } from './observable-B25XqCbZ.js';
6
6
  export { AckableMessage, AdapterHandlers, BufferedSinkHandle, CSVRow, CheckpointToRedisOptions, CheckpointToS3Options, ClickHouseClientLike, ClickHouseInsertClientLike, ClickHouseRow, DrizzleQueryLike, FileWriterLike, FromCSVOptions, FromClickHouseWatchOptions, FromDrizzleOptions, FromHTTPOptions, FromHTTPPollOptions, FromHTTPStreamOptions, FromKafkaOptions, FromKyselyOptions, FromMCPOptions, FromNATSOptions, FromNDJSONOptions, FromOTelOptions, FromPrismaOptions, FromPrometheusOptions, FromPulsarOptions, FromRabbitMQOptions, FromRedisStreamOptions, FromSSEOptions, FromSqliteOptions, FromStatsDOptions, FromSyslogOptions, FromWebSocketReconnectOptions, HTTPBundle, KafkaConsumerLike, KafkaMessage, KafkaProducerLike, KyselyQueryLike, LokiClientLike, LokiStream, MCPClientLike, MongoCollectionLike, NATSClientLike, NATSMessage, NATSSubscriptionLike, OTelBundle, OTelLog, OTelMetric, OTelRegister, OTelSpan, ParseSSEStreamOptions, PostgresClientLike, PrismaModelLike, PrometheusMetric, PulsarConsumerLike, PulsarMessage, PulsarProducerLike, RabbitMQChannelLike, RabbitMQMessage, RedisCheckpointClientLike, RedisClientLike, RedisStreamEntry, S3ClientLike, SSEEvent, SinkHandle, SinkTransportError, SqliteDbLike, SqliteIterableDbLike, StatsDMetric, StatsDRegister, SyslogMessage, SyslogRegister, TempoClientLike, ToCSVOptions, ToClickHouseOptions, ToFileOptions, ToHTTPOptions, ToKafkaOptions, ToLokiOptions, ToMongoOptions, ToNATSOptions, ToPostgresOptions, ToPulsarOptions, ToRabbitMQOptions, ToRedisStreamOptions, ToS3Options, ToSSEOptions, ToSqliteOptions, ToTempoOptions, ToWebSocketOptions, WebSocketLike, WebSocketMessageEventLike, WebSocketRegister, WebhookRegister, checkpointToRedis, checkpointToS3, csvRows, fromCSV, fromClickHouseWatch, fromDrizzle, fromHTTP, fromHTTPPoll, fromHTTPStream, fromKafka, fromKysely, fromMCP, fromNATS, fromNDJSON, fromOTel, fromPrisma, fromPrometheus, fromPulsar, fromRabbitMQ, fromRedisStream, fromSSE, fromSqlite, fromSqliteCursor, fromStatsD, fromSyslog, fromWebSocket, fromWebSocketReconnect, fromWebhook, ndjsonRows, parsePrometheusText, parseSSEStream, parseStatsD, parseSyslog, toCSV, toClickHouse, toFile, toHTTP, toKafka, toLoki, toMongo, toNATS, toPostgres, toPulsar, toRabbitMQ, toReadableStream, toRedisStream, toS3, toSSE, toSSEBytes, toSqlite, toTempo, toWebSocket } from './base/io/index.js';
7
7
  export { domainMeta, emitToMeta } from './base/meta/index.js';
8
8
  export { AuditLogOpts, BaseAuditRecord, DEFAULT_AUDIT_GUARD, FailureMeta, MutateOpts, MutationAct, MutationFrame, SuccessMeta, appendAudit, bumpCursor, createAuditLog, mutate, registerCursor, registerCursorMap, tryIncrementBounded } from './base/mutation/index.js';
@@ -55,5 +55,4 @@ export { L as LayoutBox, a as LayoutEdge, b as LayoutFn, c as LayoutFrame } from
55
55
  export { N as NS_PER_SEC } from './backoff-Bnb9OoPh.js';
56
56
  import '@graphrefly/pure-ts/core';
57
57
  import '@graphrefly/pure-ts/extra';
58
- import 'rxjs';
59
58
  import '@graphrefly/pure-ts/extra/storage';
package/dist/index.js CHANGED
@@ -36,13 +36,13 @@ import {
36
36
  harnessTrace,
37
37
  ownershipController,
38
38
  refineExecutor
39
- } from "./chunk-RGL53X5G.js";
39
+ } from "./chunk-TNX5ZGDJ.js";
40
40
  import {
41
41
  CompressionCache,
42
42
  renderContextView,
43
43
  taggedContextPool,
44
44
  tierCompress
45
- } from "./chunk-KIIXR252.js";
45
+ } from "./chunk-EHRRQ4IC.js";
46
46
  import "./chunk-3CEXCBN6.js";
47
47
  import {
48
48
  GuardedExecutionGraph,
@@ -55,7 +55,7 @@ import {
55
55
  import {
56
56
  AgentMemoryGraph,
57
57
  agentMemory
58
- } from "./chunk-WKSWLSCX.js";
58
+ } from "./chunk-22SG74BD.js";
59
59
  import {
60
60
  HarnessGraph,
61
61
  RefineLoopGraph,
@@ -67,7 +67,7 @@ import {
67
67
  harnessLoop,
68
68
  refineLoop,
69
69
  spawnable
70
- } from "./chunk-GBCENOLN.js";
70
+ } from "./chunk-ZT4WMQW4.js";
71
71
  import {
72
72
  AgentGraph,
73
73
  AgentLoopGraph,
@@ -76,7 +76,7 @@ import {
76
76
  agent,
77
77
  agentLoop,
78
78
  presetRegistry
79
- } from "./chunk-5THCXDWY.js";
79
+ } from "./chunk-JKTC747G.js";
80
80
  import "./chunk-HL7HUJIX.js";
81
81
  import {
82
82
  CanvasMeasureAdapter,
@@ -250,7 +250,7 @@ import {
250
250
  withRateLimiter,
251
251
  withRetry,
252
252
  zeroPrice
253
- } from "./chunk-HULCUY35.js";
253
+ } from "./chunk-GWRNLJNW.js";
254
254
  import {
255
255
  compileSpec,
256
256
  decompileSpec,
@@ -327,14 +327,14 @@ import {
327
327
  promptNode,
328
328
  toolExecution,
329
329
  toolRegistry
330
- } from "./chunk-OO5BM6CJ.js";
330
+ } from "./chunk-5IMMNARC.js";
331
331
  import {
332
332
  collection,
333
333
  cosineSimilarity,
334
334
  knowledgeGraph,
335
335
  reactiveFactStore,
336
336
  vectorIndex
337
- } from "./chunk-FR6RGA3B.js";
337
+ } from "./chunk-ZVXXDWIB.js";
338
338
  import {
339
339
  CONTEXT_TOPIC,
340
340
  DEFERRED_TOPIC,
@@ -385,7 +385,7 @@ import {
385
385
  import {
386
386
  createWatermarkController,
387
387
  toObservable
388
- } from "./chunk-3QZY5BI7.js";
388
+ } from "./chunk-Z65DVDEQ.js";
389
389
  import {
390
390
  singleFromAny,
391
391
  singleNodeFromAny
@@ -0,0 +1,59 @@
1
+ import { Node, Messages } from '@graphrefly/pure-ts/core';
2
+
3
+ /** Observer passed to {@link InteropObservable.subscribe}. */
4
+ interface InteropObserver<T> {
5
+ next?(value: T): void;
6
+ error?(err: unknown): void;
7
+ complete?(): void;
8
+ /** rxjs `Subscriber` sets this; we short-circuit delivery when closed. */
9
+ closed?: boolean;
10
+ }
11
+ /** Teardown handle returned by {@link InteropObservable.subscribe}. */
12
+ interface InteropSubscription {
13
+ unsubscribe(): void;
14
+ }
15
+ /**
16
+ * Minimal TC39 Observable. rxjs `from()` (and any `Symbol.observable`
17
+ * consumer) adopts it at runtime via the well-known interop method attached
18
+ * by {@link toObservable}. Pass the result through `from(...)` to get a
19
+ * pipeable rxjs `Observable`.
20
+ */
21
+ interface InteropObservable<T> {
22
+ subscribe(observer: InteropObserver<T> | ((value: T) => void)): InteropSubscription;
23
+ }
24
+ /** Options for {@link toObservable}. */
25
+ type ToObservableOptions = {
26
+ /**
27
+ * When `true`, emit raw `Messages` batches instead of extracted `DATA`
28
+ * values. Terminal batches are still emitted as the final `next()` before
29
+ * the error/complete signal.
30
+ */
31
+ raw?: boolean;
32
+ };
33
+ /**
34
+ * Bridge a `Node<T>` to a TC39 interop observable (no rxjs dependency).
35
+ *
36
+ * Default mode emits the node's value on each `DATA` message. Maps `ERROR` to
37
+ * `observer.error()` and `COMPLETE` to `observer.complete()`.
38
+ * Protocol-internal signals (DIRTY, RESOLVED, PAUSE, etc.) are skipped.
39
+ *
40
+ * With `{ raw: true }`, emits full `[[Type, Data?], ...]` message batches.
41
+ * The stream terminates on ERROR or COMPLETE (the terminal batch is still
42
+ * emitted as the final `next()` before the error/complete signal).
43
+ *
44
+ * The returned value is a spec-interop observable, **not** a concrete rxjs
45
+ * `Observable`. Wrap with `from(toObservable(node))` for rxjs operators, or
46
+ * use the NestJS compat layer's `toObservable` which returns a real rxjs
47
+ * `Observable`. For graph-level observation, use
48
+ * `toObservable(graph.resolve(path))` or subscribe to `graph.observe()`.
49
+ *
50
+ * Unsubscribing unsubscribes the node.
51
+ */
52
+ declare function toObservable<T>(node: Node<T>, options?: ToObservableOptions & {
53
+ raw?: false;
54
+ }): InteropObservable<T>;
55
+ declare function toObservable<T>(node: Node<T>, options: ToObservableOptions & {
56
+ raw: true;
57
+ }): InteropObservable<Messages>;
58
+
59
+ export { type InteropObservable as I, type ToObservableOptions as T, type InteropObserver as a, type InteropSubscription as b, toObservable as t };
@@ -0,0 +1,59 @@
1
+ import { Node, Messages } from '@graphrefly/pure-ts/core';
2
+
3
+ /** Observer passed to {@link InteropObservable.subscribe}. */
4
+ interface InteropObserver<T> {
5
+ next?(value: T): void;
6
+ error?(err: unknown): void;
7
+ complete?(): void;
8
+ /** rxjs `Subscriber` sets this; we short-circuit delivery when closed. */
9
+ closed?: boolean;
10
+ }
11
+ /** Teardown handle returned by {@link InteropObservable.subscribe}. */
12
+ interface InteropSubscription {
13
+ unsubscribe(): void;
14
+ }
15
+ /**
16
+ * Minimal TC39 Observable. rxjs `from()` (and any `Symbol.observable`
17
+ * consumer) adopts it at runtime via the well-known interop method attached
18
+ * by {@link toObservable}. Pass the result through `from(...)` to get a
19
+ * pipeable rxjs `Observable`.
20
+ */
21
+ interface InteropObservable<T> {
22
+ subscribe(observer: InteropObserver<T> | ((value: T) => void)): InteropSubscription;
23
+ }
24
+ /** Options for {@link toObservable}. */
25
+ type ToObservableOptions = {
26
+ /**
27
+ * When `true`, emit raw `Messages` batches instead of extracted `DATA`
28
+ * values. Terminal batches are still emitted as the final `next()` before
29
+ * the error/complete signal.
30
+ */
31
+ raw?: boolean;
32
+ };
33
+ /**
34
+ * Bridge a `Node<T>` to a TC39 interop observable (no rxjs dependency).
35
+ *
36
+ * Default mode emits the node's value on each `DATA` message. Maps `ERROR` to
37
+ * `observer.error()` and `COMPLETE` to `observer.complete()`.
38
+ * Protocol-internal signals (DIRTY, RESOLVED, PAUSE, etc.) are skipped.
39
+ *
40
+ * With `{ raw: true }`, emits full `[[Type, Data?], ...]` message batches.
41
+ * The stream terminates on ERROR or COMPLETE (the terminal batch is still
42
+ * emitted as the final `next()` before the error/complete signal).
43
+ *
44
+ * The returned value is a spec-interop observable, **not** a concrete rxjs
45
+ * `Observable`. Wrap with `from(toObservable(node))` for rxjs operators, or
46
+ * use the NestJS compat layer's `toObservable` which returns a real rxjs
47
+ * `Observable`. For graph-level observation, use
48
+ * `toObservable(graph.resolve(path))` or subscribe to `graph.observe()`.
49
+ *
50
+ * Unsubscribing unsubscribes the node.
51
+ */
52
+ declare function toObservable<T>(node: Node<T>, options?: ToObservableOptions & {
53
+ raw?: false;
54
+ }): InteropObservable<T>;
55
+ declare function toObservable<T>(node: Node<T>, options: ToObservableOptions & {
56
+ raw: true;
57
+ }): InteropObservable<Messages>;
58
+
59
+ export { type InteropObservable as I, type ToObservableOptions as T, type InteropObserver as a, type InteropSubscription as b, toObservable as t };
@@ -7,11 +7,11 @@ import {
7
7
  renderContextView,
8
8
  taggedContextPool,
9
9
  tierCompress
10
- } from "../../chunk-KIIXR252.js";
10
+ } from "../../chunk-EHRRQ4IC.js";
11
11
  import {
12
12
  AgentMemoryGraph,
13
13
  agentMemory
14
- } from "../../chunk-WKSWLSCX.js";
14
+ } from "../../chunk-22SG74BD.js";
15
15
  import {
16
16
  AgentGraph,
17
17
  AgentLoopGraph,
@@ -20,9 +20,9 @@ import {
20
20
  agent,
21
21
  agentLoop,
22
22
  presetRegistry
23
- } from "../../chunk-5THCXDWY.js";
24
- import "../../chunk-OO5BM6CJ.js";
25
- import "../../chunk-FR6RGA3B.js";
23
+ } from "../../chunk-JKTC747G.js";
24
+ import "../../chunk-5IMMNARC.js";
25
+ import "../../chunk-ZVXXDWIB.js";
26
26
  import "../../chunk-Q3EYOCZB.js";
27
27
  import "../../chunk-QMBYUVRL.js";
28
28
  import "../../chunk-FMPF42Q4.js";
@@ -7,8 +7,8 @@ import {
7
7
  harnessTrace,
8
8
  ownershipController,
9
9
  refineExecutor
10
- } from "../../chunk-RGL53X5G.js";
11
- import "../../chunk-KIIXR252.js";
10
+ } from "../../chunk-TNX5ZGDJ.js";
11
+ import "../../chunk-EHRRQ4IC.js";
12
12
  import {
13
13
  HarnessGraph,
14
14
  RefineLoopGraph,
@@ -20,11 +20,11 @@ import {
20
20
  harnessLoop,
21
21
  refineLoop,
22
22
  spawnable
23
- } from "../../chunk-GBCENOLN.js";
24
- import "../../chunk-5THCXDWY.js";
23
+ } from "../../chunk-ZT4WMQW4.js";
24
+ import "../../chunk-JKTC747G.js";
25
25
  import "../../chunk-OIWU3NYV.js";
26
26
  import "../../chunk-PKPO3JTZ.js";
27
- import "../../chunk-HULCUY35.js";
27
+ import "../../chunk-GWRNLJNW.js";
28
28
  import "../../chunk-2OB3CEJS.js";
29
29
  import "../../chunk-CGHORL6G.js";
30
30
  import "../../chunk-4GYMCUDZ.js";
@@ -32,8 +32,8 @@ import "../../chunk-RJOG4IJU.js";
32
32
  import "../../chunk-RAGGHLCV.js";
33
33
  import "../../chunk-CXANAIZU.js";
34
34
  import "../../chunk-IHTWQEDR.js";
35
- import "../../chunk-OO5BM6CJ.js";
36
- import "../../chunk-FR6RGA3B.js";
35
+ import "../../chunk-5IMMNARC.js";
36
+ import "../../chunk-ZVXXDWIB.js";
37
37
  import "../../chunk-Q3EYOCZB.js";
38
38
  import "../../chunk-QMBYUVRL.js";
39
39
  import "../../chunk-FMPF42Q4.js";
@@ -17,13 +17,13 @@ import {
17
17
  harnessTrace,
18
18
  ownershipController,
19
19
  refineExecutor
20
- } from "../chunk-RGL53X5G.js";
20
+ } from "../chunk-TNX5ZGDJ.js";
21
21
  import {
22
22
  CompressionCache,
23
23
  renderContextView,
24
24
  taggedContextPool,
25
25
  tierCompress
26
- } from "../chunk-KIIXR252.js";
26
+ } from "../chunk-EHRRQ4IC.js";
27
27
  import {
28
28
  GuardedExecutionGraph,
29
29
  guardedExecution
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  AgentMemoryGraph,
37
37
  agentMemory
38
- } from "../chunk-WKSWLSCX.js";
38
+ } from "../chunk-22SG74BD.js";
39
39
  import {
40
40
  HarnessGraph,
41
41
  RefineLoopGraph,
@@ -47,7 +47,7 @@ import {
47
47
  harnessLoop,
48
48
  refineLoop,
49
49
  spawnable
50
- } from "../chunk-GBCENOLN.js";
50
+ } from "../chunk-ZT4WMQW4.js";
51
51
  import {
52
52
  AgentGraph,
53
53
  AgentLoopGraph,
@@ -56,12 +56,12 @@ import {
56
56
  agent,
57
57
  agentLoop,
58
58
  presetRegistry
59
- } from "../chunk-5THCXDWY.js";
59
+ } from "../chunk-JKTC747G.js";
60
60
  import "../chunk-4XCHZRUJ.js";
61
61
  import "../chunk-FW23JYNQ.js";
62
62
  import "../chunk-OIWU3NYV.js";
63
63
  import "../chunk-PKPO3JTZ.js";
64
- import "../chunk-HULCUY35.js";
64
+ import "../chunk-GWRNLJNW.js";
65
65
  import "../chunk-2OB3CEJS.js";
66
66
  import "../chunk-CGHORL6G.js";
67
67
  import "../chunk-4GYMCUDZ.js";
@@ -69,8 +69,8 @@ import "../chunk-RJOG4IJU.js";
69
69
  import "../chunk-RAGGHLCV.js";
70
70
  import "../chunk-CXANAIZU.js";
71
71
  import "../chunk-IHTWQEDR.js";
72
- import "../chunk-OO5BM6CJ.js";
73
- import "../chunk-FR6RGA3B.js";
72
+ import "../chunk-5IMMNARC.js";
73
+ import "../chunk-ZVXXDWIB.js";
74
74
  import "../chunk-Q3EYOCZB.js";
75
75
  import "../chunk-QMBYUVRL.js";
76
76
  import "../chunk-FMPF42Q4.js";
@@ -7,19 +7,19 @@ import {
7
7
  } from "../chunk-6XZYT4SW.js";
8
8
  import {
9
9
  agentMemory
10
- } from "../chunk-WKSWLSCX.js";
10
+ } from "../chunk-22SG74BD.js";
11
11
  import {
12
12
  harnessLoop,
13
13
  refineLoop,
14
14
  spawnable
15
- } from "../chunk-GBCENOLN.js";
15
+ } from "../chunk-ZT4WMQW4.js";
16
16
  import {
17
17
  agentLoop
18
- } from "../chunk-5THCXDWY.js";
18
+ } from "../chunk-JKTC747G.js";
19
19
  import "../chunk-FW23JYNQ.js";
20
20
  import "../chunk-OIWU3NYV.js";
21
21
  import "../chunk-PKPO3JTZ.js";
22
- import "../chunk-HULCUY35.js";
22
+ import "../chunk-GWRNLJNW.js";
23
23
  import "../chunk-2OB3CEJS.js";
24
24
  import "../chunk-CGHORL6G.js";
25
25
  import "../chunk-4GYMCUDZ.js";
@@ -27,8 +27,8 @@ import "../chunk-RJOG4IJU.js";
27
27
  import "../chunk-RAGGHLCV.js";
28
28
  import "../chunk-CXANAIZU.js";
29
29
  import "../chunk-IHTWQEDR.js";
30
- import "../chunk-OO5BM6CJ.js";
31
- import "../chunk-FR6RGA3B.js";
30
+ import "../chunk-5IMMNARC.js";
31
+ import "../chunk-ZVXXDWIB.js";
32
32
  import "../chunk-Q3EYOCZB.js";
33
33
  import "../chunk-QMBYUVRL.js";
34
34
  import "../chunk-FMPF42Q4.js";
@@ -38,7 +38,7 @@ import {
38
38
  withRateLimiter,
39
39
  withRetry,
40
40
  zeroPrice
41
- } from "../../chunk-HULCUY35.js";
41
+ } from "../../chunk-GWRNLJNW.js";
42
42
  import "../../chunk-2OB3CEJS.js";
43
43
  import "../../chunk-CGHORL6G.js";
44
44
  import {
@@ -80,8 +80,8 @@ import {
80
80
  promptNode,
81
81
  toolExecution,
82
82
  toolRegistry
83
- } from "../../chunk-OO5BM6CJ.js";
84
- import "../../chunk-FR6RGA3B.js";
83
+ } from "../../chunk-5IMMNARC.js";
84
+ import "../../chunk-ZVXXDWIB.js";
85
85
  import "../../chunk-Q3EYOCZB.js";
86
86
  import {
87
87
  DEFAULT_DECAY_RATE
@@ -7835,6 +7835,8 @@ function reactiveFactStore(config) {
7835
7835
  graph
7836
7836
  });
7837
7837
  const seqCursor = registerCursor(graph, "seq", 0);
7838
+ const ingestLog = config.recordIngest ? (0, import_extra33.reactiveLog)([], { name: "ingest_log" }) : void 0;
7839
+ if (ingestLog) graph.addDisposer(() => ingestLog.dispose());
7838
7840
  const emptyStore = () => ({ byId: /* @__PURE__ */ new Map() });
7839
7841
  const shards = [];
7840
7842
  for (let s = 0; s < shardCount; s += 1) {
@@ -7990,6 +7992,8 @@ function reactiveFactStore(config) {
7990
7992
  factId: dep,
7991
7993
  rootFactId: f.id,
7992
7994
  reason: "obsolete",
7995
+ // `obsolete` guard above guarantees `f.validTo` is set.
7996
+ rootValidTo: f.validTo,
7993
7997
  iteration: cascadeIteration + 1,
7994
7998
  causalReason: `dependentsIndex[${f.id}] \u2192 ${dep} (obsolete: validTo set)`
7995
7999
  });
@@ -8062,11 +8066,10 @@ function reactiveFactStore(config) {
8062
8066
  actions.emit([]);
8063
8067
  return;
8064
8068
  }
8065
- const now = (0, import_core48.monotonicNs)();
8066
- for (const [id] of byId) {
8069
+ for (const [id, e] of byId) {
8067
8070
  replaceFragment(
8068
8071
  id,
8069
- (prev) => prev.validTo !== void 0 ? prev : { ...prev, validTo: BigInt(now) }
8072
+ (prev) => prev.validTo !== void 0 ? prev : { ...prev, validTo: e.rootValidTo }
8070
8073
  );
8071
8074
  }
8072
8075
  actions.emit([...byId.values()]);
@@ -8224,6 +8227,7 @@ function reactiveFactStore(config) {
8224
8227
  t_ns: (0, import_core48.wallClockNs)(),
8225
8228
  seq: bumpCursor(seqCursor)
8226
8229
  });
8230
+ ingestLog?.append(f);
8227
8231
  }
8228
8232
  actions.emit(f ?? null);
8229
8233
  },
@@ -8260,6 +8264,7 @@ function reactiveFactStore(config) {
8260
8264
  review,
8261
8265
  consolidated,
8262
8266
  events,
8267
+ ...ingestLog ? { ingestLog } : {},
8263
8268
  itemNode
8264
8269
  });
8265
8270
  return out;