@graphrefly/graphrefly 0.21.0 → 0.23.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.
- package/README.md +7 -5
- package/dist/chunk-263BEJJO.js +115 -0
- package/dist/chunk-263BEJJO.js.map +1 -0
- package/dist/chunk-2GQLMQVJ.js +47 -0
- package/dist/chunk-2GQLMQVJ.js.map +1 -0
- package/dist/chunk-32N5A454.js +36 -0
- package/dist/chunk-32N5A454.js.map +1 -0
- package/dist/chunk-7TAQJHQV.js +103 -0
- package/dist/chunk-7TAQJHQV.js.map +1 -0
- package/dist/{chunk-VOQFK7YN.js → chunk-CWYPA63G.js} +109 -259
- package/dist/chunk-CWYPA63G.js.map +1 -0
- package/dist/{chunk-7IGHIFTT.js → chunk-HVBX5KIW.js} +15 -26
- package/dist/chunk-HVBX5KIW.js.map +1 -0
- package/dist/chunk-JFONSPNF.js +391 -0
- package/dist/chunk-JFONSPNF.js.map +1 -0
- package/dist/chunk-NZMBRXQV.js +2330 -0
- package/dist/chunk-NZMBRXQV.js.map +1 -0
- package/dist/{chunk-XWBVAO2R.js → chunk-PNUZM7PC.js} +20 -30
- package/dist/chunk-PNUZM7PC.js.map +1 -0
- package/dist/{chunk-ZTCDY5NQ.js → chunk-PX6PDUJ5.js} +34 -50
- package/dist/chunk-PX6PDUJ5.js.map +1 -0
- package/dist/chunk-XRFJJ2IU.js +2417 -0
- package/dist/chunk-XRFJJ2IU.js.map +1 -0
- package/dist/chunk-XTLYW4FR.js +6829 -0
- package/dist/chunk-XTLYW4FR.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +3489 -2286
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +6 -4
- package/dist/compat/nestjs/index.d.ts +6 -4
- package/dist/compat/nestjs/index.js +10 -8
- package/dist/core/index.cjs +1706 -1217
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +3 -2
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +37 -34
- package/dist/extra/index.cjs +7519 -6125
- package/dist/extra/index.cjs.map +1 -1
- package/dist/extra/index.d.cts +4 -4
- package/dist/extra/index.d.ts +4 -4
- package/dist/extra/index.js +63 -34
- package/dist/graph/index.cjs +3199 -2212
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +5 -3
- package/dist/graph/index.d.ts +5 -3
- package/dist/graph/index.js +24 -11
- package/dist/graph-BtdSRHUc.d.cts +1128 -0
- package/dist/graph-CEO2FkLY.d.ts +1128 -0
- package/dist/{index-DuN3bhtm.d.ts → index-B0tfuXwV.d.cts} +1697 -586
- package/dist/index-BFGjXbiP.d.cts +315 -0
- package/dist/{index-CgSiUouz.d.ts → index-BPlWVAKY.d.cts} +4 -4
- package/dist/index-BUj3ASVe.d.cts +406 -0
- package/dist/{index-VHA43cGP.d.cts → index-C59uSJAH.d.cts} +2 -2
- package/dist/index-CkElcUY6.d.ts +315 -0
- package/dist/index-DSPc5rkv.d.ts +406 -0
- package/dist/{index-BjtlNirP.d.cts → index-DgscL7v0.d.ts} +4 -4
- package/dist/{index-SFzE_KTa.d.cts → index-RXN94sHK.d.ts} +1697 -586
- package/dist/{index-8a605sg9.d.ts → index-jEtF4N7L.d.ts} +2 -2
- package/dist/index.cjs +9947 -7949
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +214 -37
- package/dist/index.d.ts +214 -37
- package/dist/index.js +919 -648
- package/dist/index.js.map +1 -1
- package/dist/meta-3QjzotRv.d.ts +41 -0
- package/dist/meta-B-Lbs4-O.d.cts +41 -0
- package/dist/node-C7PD3sn9.d.cts +1188 -0
- package/dist/node-C7PD3sn9.d.ts +1188 -0
- package/dist/{observable-DcBwQY7t.d.ts → observable-EyO-moQY.d.ts} +1 -1
- package/dist/{observable-C8Kx_O6k.d.cts → observable-axpzv1K2.d.cts} +1 -1
- package/dist/patterns/reactive-layout/index.cjs +3205 -2138
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +5 -3
- package/dist/patterns/reactive-layout/index.d.ts +5 -3
- package/dist/patterns/reactive-layout/index.js +7 -4
- package/dist/storage-CHT5WE9m.d.ts +182 -0
- package/dist/storage-DIgAr7M_.d.cts +182 -0
- package/package.json +2 -1
- package/dist/chunk-2UDLYZHT.js +0 -2117
- package/dist/chunk-2UDLYZHT.js.map +0 -1
- package/dist/chunk-4MQ2J6IG.js +0 -1631
- package/dist/chunk-4MQ2J6IG.js.map +0 -1
- package/dist/chunk-7IGHIFTT.js.map +0 -1
- package/dist/chunk-DOSLSFKL.js +0 -162
- package/dist/chunk-DOSLSFKL.js.map +0 -1
- package/dist/chunk-ECN37NVS.js +0 -6227
- package/dist/chunk-ECN37NVS.js.map +0 -1
- package/dist/chunk-G66H6ZRK.js +0 -111
- package/dist/chunk-G66H6ZRK.js.map +0 -1
- package/dist/chunk-VOQFK7YN.js.map +0 -1
- package/dist/chunk-WZ2Z2CRV.js +0 -32
- package/dist/chunk-WZ2Z2CRV.js.map +0 -1
- package/dist/chunk-XWBVAO2R.js.map +0 -1
- package/dist/chunk-ZTCDY5NQ.js.map +0 -1
- package/dist/graph-KsTe57nI.d.cts +0 -750
- package/dist/graph-mILUUqW8.d.ts +0 -750
- package/dist/index-B2SvPEbc.d.ts +0 -257
- package/dist/index-BHfg_Ez3.d.ts +0 -629
- package/dist/index-Bc_diYYJ.d.cts +0 -629
- package/dist/index-UudxGnzc.d.cts +0 -257
- package/dist/meta-BnG7XAaE.d.cts +0 -778
- package/dist/meta-BnG7XAaE.d.ts +0 -778
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { N as Node, a as NodeOptions, b as NodeActions, A as Actor } from './
|
|
2
|
-
export { C as
|
|
3
|
-
import { i as index$b, c as cqrs } from './index-
|
|
1
|
+
import { N as Node, a as NodeOptions, b as NodeActions, A as Actor } from './node-C7PD3sn9.cjs';
|
|
2
|
+
export { C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, t as Messages, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, x as NodeFnCleanup, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from './node-C7PD3sn9.cjs';
|
|
3
|
+
import { i as index$b, c as cqrs } from './index-BPlWVAKY.cjs';
|
|
4
4
|
import { Ref, WatchSource } from 'vue';
|
|
5
|
-
import { G as Graph, a as GraphOptions, b as
|
|
6
|
-
export { D as DescribeFilter,
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
import { N as NodeInput, D as DistillBundle, E as Extraction } from './index-
|
|
10
|
-
export { A as
|
|
11
|
-
export {
|
|
12
|
-
import {
|
|
13
|
-
export {
|
|
5
|
+
import { G as Graph, a as GraphOptions, b as GraphAttachStorageOptions, c as GraphProfileResult, d as GraphProfileOptions } from './graph-BtdSRHUc.cjs';
|
|
6
|
+
export { D as DescribeFilter, e as GRAPH_META_SEGMENT, f as GraphActorOptions, g as GraphCheckpointRecord, h as GraphDescribeOptions, i as GraphDescribeOutput, j as GraphDiagramDirection, k as GraphDiagramOptions, l as GraphDiffChange, m as GraphDiffResult, n as GraphFactoryContext, o as GraphNodeFactory, p as GraphObserveAll, q as GraphObserveOne, r as GraphPersistSnapshot, s as GraphVersionChange, t as GraphWALDiff, N as NodeProfile, O as ObserveDetail, u as ObserveEvent, v as ObserveOptions, w as ObserveResult, x as ObserveTheme, y as ObserveThemeName, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, A as diffForWAL, B as graphProfile, C as reachable } from './graph-BtdSRHUc.cjs';
|
|
7
|
+
import { D as DerivedFn } from './index-BUj3ASVe.cjs';
|
|
8
|
+
export { A as AutoTrackOptions, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as batch, i as core, e as derived, f as downWithBatch, g as dynamicNode, h as effect, j as isBatching, m as monotonicNs, p as pipe, k as producer, s as state, w as wallClockNs } from './index-BUj3ASVe.cjs';
|
|
9
|
+
import { N as NodeInput, D as DistillBundle, E as Extraction } from './index-B0tfuXwV.cjs';
|
|
10
|
+
export { A as AckableMessage, a as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as BackoffStrategy, d as BatchMessage, e as BridgeMessage, f as BufferedSinkHandle, g as BundleTriad, C as CSVRow, h as CacheEvictionPolicy, i as CascadingCache, j as CascadingCacheOptions, k as CheckpointToRedisOptions, l as CheckpointToS3Options, m as CircuitBreaker, n as CircuitBreakerOptions, o as CircuitOpenError, p as CircuitState, q as ClickHouseClientLike, r as ClickHouseInsertClientLike, s as ClickHouseRow, t as CronSchedule, u as DistillOptions, v as DrizzleQueryLike, w as EmitTriad, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as ExternalBundleOptions, G as ExternalRegister, H as FSEvent, I as FSEventType, J as FallbackInput, K as FileWriterLike, L as FromCSVOptions, M as FromClickHouseWatchOptions, O as FromCronOptions, P as FromDrizzleOptions, Q as FromFSWatchOptions, R as FromGitHookOptions, S as FromHTTPOptions, T as FromHTTPPollOptions, U as FromHTTPStreamOptions, V as FromKafkaOptions, W as FromKyselyOptions, X as FromMCPOptions, Y as FromNATSOptions, Z as FromNDJSONOptions, _ as FromOTelOptions, $ as FromPrismaOptions, a0 as FromPrometheusOptions, a1 as FromPulsarOptions, a2 as FromRabbitMQOptions, a3 as FromRedisStreamOptions, a4 as FromSSEOptions, a5 as FromSqliteOptions, a6 as FromStatsDOptions, a7 as FromSyslogOptions, a8 as FromWebSocketReconnectOptions, a9 as GitEvent, aa as GitHookType, ab as HTTPBundle, ac as IndexBackend, ad as IndexRow, ae as InitMessage, af as JitterMode, ag as KafkaConsumerLike, ah as KafkaMessage, ai as KafkaProducerLike, aj as KyselyQueryLike, ak as ListBackend, al as LogBackend, am as LokiClientLike, an as LokiStream, ao as MCPClientLike, ap as MapBackend, aq as MergeMapOptions, ar as MongoCollectionLike, as as NATSClientLike, at as NATSMessage, au as NATSSubscriptionLike, av as NS_PER_MS, aw as NS_PER_SEC, ax as NativeIndexBackend, ay as NativeListBackend, az as NativeLogBackend, aA as NativeMapBackend, aB as NativeMapBackendOptions, aC as NativePubSubBackend, aD as OTelBundle, aE as OTelLog, aF as OTelMetric, aG as OTelRegister, aH as OTelSpan, aI as PostgresClientLike, aJ as PrismaModelLike, aK as PrometheusMetric, aL as PubSubBackend, aM as PubSubHub, aN as PubSubHubOptions, aO as PulsarConsumerLike, aP as PulsarMessage, aQ as PulsarProducerLike, aR as RabbitMQChannelLike, aS as RabbitMQMessage, aT as RateLimiterOptions, aU as RateLimiterOverflowError, aV as RateLimiterOverflowPolicy, aW as ReactiveCounterBundle, aX as ReactiveIndexBundle, aY as ReactiveIndexOptions, aZ as ReactiveListBundle, a_ as ReactiveListOptions, a$ as ReactiveLogBundle, b0 as ReactiveLogOptions, b1 as ReactiveMapBundle, b2 as ReactiveMapOptions, b3 as ReactiveSinkBackpressureOptions, b4 as ReactiveSinkConfig, b5 as ReactiveSinkHandle, b6 as ReactiveSinkOptions, b7 as ReactiveSinkRetryOptions, b8 as ReadyMessage, b9 as RedisCheckpointClientLike, ba as RedisClientLike, bb as RedisStreamEntry, bc as ResettableTimer, bd as RetryOptions, be as RetrySourceOptions, bf as S3ClientLike, bg as SSEEvent, bh as SignalMessage, bi as SinkFailure, bj as SinkHandle, bk as SinkTransportError, bl as SqliteDbLike, bm as SqliteIterableDbLike, bn as StatsDMetric, bo as StatsDRegister, bp as StatusValue, bq as SyslogMessage, br as SyslogRegister, bs as TapObserver, bt as TempoClientLike, bu as ThrottleOptions, bv as TimeoutError, bw as ToCSVOptions, bx as ToClickHouseOptions, by as ToFileOptions, bz as ToHTTPOptions, bA as ToKafkaOptions, bB as ToLokiOptions, bC as ToMongoOptions, bD as ToNATSOptions, bE as ToPostgresOptions, bF as ToPulsarOptions, bG as ToRabbitMQOptions, bH as ToRedisStreamOptions, bI as ToS3Options, bJ as ToSSEOptions, bK as ToSqliteOptions, bL as ToTempoOptions, bM as ToWebSocketOptions, bN as TokenBucket, bO as UpsertOptions, bP as ValueMessage, bQ as VerifiableBundle, bR as VerifiableOptions, bS as VerifyValue, bT as WatermarkController, bU as WatermarkOptions, bV as WebSocketLike, bW as WebSocketMessageEventLike, bX as WebSocketRegister, bY as WebhookRegister, bZ as WithBreakerBundle, b_ as WithStatusBundle, b$ as WorkerBridge, c0 as WorkerBridgeOptions, c1 as WorkerSelfHandle, c2 as WorkerSelfOptions, c3 as WorkerTransport, c4 as audit, c5 as buffer, c6 as bufferCount, c7 as bufferTime, c8 as cached, c9 as cascadingCache, ca as catchError, cb as checkpointToRedis, cc as checkpointToS3, cd as circuitBreaker, ce as combine, cf as combineLatest, cg as concat, ch as concatMap, ci as constant, cj as createTransport, ck as createWatermarkController, cl as csvRows, cm as debounce, cn as debounceTime, co as decorrelatedJitter, cp as delay, cq as deserializeError, cr as distill, cs as distinctUntilChanged, ct as elementAt, cu as empty, cv as escapeRegexChar, cw as exhaustMap, cx as exponential, cy as externalBundle, cz as externalProducer, cA as extra, cB as fallback, cC as fibonacci, cD as filter, cE as find, cF as first, cG as firstValueFrom, cH as firstWhere, cI as flatMap, cJ as forEach, cK as fromAny, cL as fromAsyncIter, cM as fromCSV, cN as fromClickHouseWatch, cO as fromCron, cP as fromDrizzle, cQ as fromEvent, cR as fromFSWatch, cS as fromGitHook, cT as fromHTTP, cU as fromHTTPPoll, cV as fromHTTPStream, cW as fromIter, cX as fromKafka, cY as fromKysely, cZ as fromMCP, c_ as fromNATS, c$ as fromNDJSON, d0 as fromOTel, d1 as fromPrisma, d2 as fromPrometheus, d3 as fromPromise, d4 as fromPulsar, d5 as fromRabbitMQ, d6 as fromRedisStream, d7 as fromSSE, d8 as fromSqlite, d9 as fromSqliteCursor, da as fromStatsD, db as fromSyslog, dc as fromTimer, dd as fromWebSocket, de as fromWebSocketReconnect, df as fromWebhook, dg as globToRegExp, dh as interval, di as keepalive, dj as last, dk as linear, dl as lru, dm as map, dn as matchesAnyPattern, dp as matchesCron, dq as merge, dr as mergeMap, ds as nameToSignal, dt as ndjsonRows, du as never, dv as of, dw as pairwise, dx as parseCron, dy as parsePrometheusText, dz as parseStatsD, dA as parseSyslog, dB as pausable, dC as pubsub, dD as race, dE as rateLimiter, dF as reactiveCounter, dG as reactiveIndex, dH as reactiveList, dI as reactiveLog, dJ as reactiveMap, dK as reactiveSink, dL as reduce, dM as repeat, dN as replay, dO as rescue, dP as resolveBackoffPreset, dQ as retry, dR as retrySource, dS as sample, dT as scan, dU as serializeError, dV as share, dW as shareReplay, dX as signalToName, dY as skip, dZ as switchMap, d_ as take, d$ as takeUntil, e0 as takeWhile, e1 as tap, e2 as throttle, e3 as throttleTime, e4 as throwError, e5 as timeout, e6 as toArray, e7 as toCSV, e8 as toClickHouse, e9 as toFile, ea as toHTTP, eb as toKafka, ec as toLoki, ed as toMongo, ee as toNATS, ef as toPostgres, eg as toPulsar, eh as toRabbitMQ, ei as toReadableStream, ej as toRedisStream, ek as toS3, el as toSSE, em as toSSEBytes, en as toSqlite, eo as toTempo, ep as toWebSocket, eq as tokenBucket, er as valve, es as verifiable, et as window, eu as windowCount, ev as windowTime, ew as withBreaker, ex as withLatestFrom, ey as withMaxAttempts, ez as withStatus, eA as workerBridge, eB as workerSelf, eC as zip } from './index-B0tfuXwV.cjs';
|
|
11
|
+
export { E as ENVELOPE_VERSION, a as EvictedSubgraphInfo, b as EvictionPolicy, G as GraphCodec, J as JsonCodec, L as LazyGraphCodec, O as SIZEOF_OVERHEAD, S as SIZEOF_SYMBOL, W as WALEntry, c as createDagCborCodec, d as createDagCborZstdCodec, e as decodeEnvelope, f as encodeEnvelope, i as graph, r as registerBuiltinCodecs, g as replayWAL, s as sizeof } from './index-BFGjXbiP.cjs';
|
|
12
|
+
import { S as StorageHandle, a as StorageTier } from './storage-DIgAr7M_.cjs';
|
|
13
|
+
export { I as IndexedDbStorageSpec, d as dictStorage, f as fileStorage, b as fromIDBRequest, c as fromIDBTransaction, i as indexedDbStorage, m as memoryStorage, s as sqliteStorage } from './storage-DIgAr7M_.cjs';
|
|
14
|
+
import { M as MeasurementAdapter, i as index$c } from './index-C59uSJAH.cjs';
|
|
15
|
+
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from './meta-B-Lbs4-O.cjs';
|
|
16
|
+
export { T as ToObservableOptions, t as toObservable } from './observable-axpzv1K2.cjs';
|
|
14
17
|
import '@nestjs/common';
|
|
15
18
|
import '@nestjs/core';
|
|
16
19
|
import 'rxjs';
|
|
@@ -228,7 +231,7 @@ declare namespace index$9 {
|
|
|
228
231
|
* @param node - Any `Node<T>`.
|
|
229
232
|
* @returns `T | undefined` — the current node value, kept in sync via `useSyncExternalStore`.
|
|
230
233
|
*/
|
|
231
|
-
declare function useSubscribe$3<T>(node: Node<T>): T | undefined;
|
|
234
|
+
declare function useSubscribe$3<T>(node: Node<T>): T | undefined | null;
|
|
232
235
|
/**
|
|
233
236
|
* Bind a writable `Node<T>` as a React `[value, setter]` tuple.
|
|
234
237
|
* Setting the value always pushes `[[DIRTY], [DATA, value]]`, including `value === undefined`.
|
|
@@ -237,7 +240,7 @@ declare function useSubscribe$3<T>(node: Node<T>): T | undefined;
|
|
|
237
240
|
* @param node - A `Node<T>` (e.g. state node).
|
|
238
241
|
* @returns `[T | undefined, (value: T) => void]` — current value and setter function.
|
|
239
242
|
*/
|
|
240
|
-
declare function useStore$3<T>(node: Node<T>): [T | undefined, (value: T) => void];
|
|
243
|
+
declare function useStore$3<T>(node: Node<T>): [T | undefined | null, (value: T) => void];
|
|
241
244
|
/** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
|
|
242
245
|
type NodeFactory$3<K, R extends Record<string, any>> = (key: K) => {
|
|
243
246
|
[P in keyof R]: Node<R[P]>;
|
|
@@ -360,13 +363,13 @@ type Accessor<T> = () => T;
|
|
|
360
363
|
* Subscribe to a `Node<T>` as a Solid signal. Auto-cleans up with the owning scope.
|
|
361
364
|
* Subscription lifecycle is tied to Solid scope cleanup (not node terminal messages).
|
|
362
365
|
*/
|
|
363
|
-
declare function useSubscribe$2<T>(node: Node<T>): Accessor<T | undefined>;
|
|
366
|
+
declare function useSubscribe$2<T>(node: Node<T>): Accessor<T | undefined | null>;
|
|
364
367
|
/**
|
|
365
368
|
* Bind a writable `Node<T>` as a Solid resource tuple `[accessor, setter]`.
|
|
366
369
|
* Setter always forwards `[[DIRTY], [DATA, value]]`, including `value === undefined`.
|
|
367
370
|
* Subscription lifecycle is tied to Solid scope cleanup (not node terminal messages).
|
|
368
371
|
*/
|
|
369
|
-
declare function useStore$2<T>(node: Node<T>): [Accessor<T | undefined>, (v: T) => void];
|
|
372
|
+
declare function useStore$2<T>(node: Node<T>): [Accessor<T | undefined | null>, (v: T) => void];
|
|
370
373
|
/** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
|
|
371
374
|
type NodeFactory$2<K, R extends Record<string, any>> = (key: K) => {
|
|
372
375
|
[P in keyof R]: Node<R[P]>;
|
|
@@ -396,14 +399,14 @@ interface SvelteWritable<T> extends SvelteReadable<T> {
|
|
|
396
399
|
* Subscribe to a `Node<T>` as a Svelte readable store (implements Svelte store contract).
|
|
397
400
|
* Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
|
|
398
401
|
*/
|
|
399
|
-
declare function useSubscribe$1<T>(node: Node<T>): SvelteReadable<T | undefined>;
|
|
402
|
+
declare function useSubscribe$1<T>(node: Node<T>): SvelteReadable<T | undefined | null>;
|
|
400
403
|
/**
|
|
401
404
|
* Bind a writable `Node<T>` as a Svelte writable store.
|
|
402
405
|
* Reads and writes adapt seamlessly.
|
|
403
406
|
* Setter/update always forward `[[DIRTY], [DATA, value]]`, including `value === undefined`.
|
|
404
407
|
* Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
|
|
405
408
|
*/
|
|
406
|
-
declare function useStore$1<T>(node: Node<T>): SvelteWritable<T | undefined>;
|
|
409
|
+
declare function useStore$1<T>(node: Node<T>): SvelteWritable<T | undefined | null>;
|
|
407
410
|
/** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
|
|
408
411
|
type NodeFactory$1<K, R extends Record<string, any>> = (key: K) => {
|
|
409
412
|
[P in keyof R]: Node<R[P]>;
|
|
@@ -425,13 +428,13 @@ declare namespace index$5 {
|
|
|
425
428
|
* Subscribe to a read-only `Node<T>` as a Vue `Ref<T>`. Auto-unsubscribes on scope disposal.
|
|
426
429
|
* Subscription lifecycle is tied to Vue scope disposal (not node terminal messages).
|
|
427
430
|
*/
|
|
428
|
-
declare function useSubscribe<T>(node: Node<T>): Readonly<Ref<T | undefined>>;
|
|
431
|
+
declare function useSubscribe<T>(node: Node<T>): Readonly<Ref<T | undefined | null>>;
|
|
429
432
|
/**
|
|
430
433
|
* Bind a writable `Node<T>` as a Vue `Ref<T>`. Reads and writes are bidirectional.
|
|
431
434
|
* Value sets always dispatch `[[DIRTY], [DATA, value]]`, including `value === undefined`.
|
|
432
435
|
* Subscription lifecycle is tied to Vue scope disposal (not node terminal messages).
|
|
433
436
|
*/
|
|
434
|
-
declare function useStore<T>(node: Node<T>): Ref<T | undefined>;
|
|
437
|
+
declare function useStore<T>(node: Node<T>): Ref<T | undefined | null>;
|
|
435
438
|
/** Maps a key to an object of nodes. Used by `useSubscribeRecord` factory. */
|
|
436
439
|
type NodeFactory<K, R extends Record<string, any>> = (key: K) => {
|
|
437
440
|
[P in keyof R]: Node<R[P]>;
|
|
@@ -650,7 +653,24 @@ type TopicOptions = {
|
|
|
650
653
|
declare class TopicGraph<T> extends Graph {
|
|
651
654
|
private readonly _log;
|
|
652
655
|
readonly events: Node<readonly T[]>;
|
|
653
|
-
|
|
656
|
+
/**
|
|
657
|
+
* Most recently published value, or `null` when the topic has no entries
|
|
658
|
+
* yet. Spec §5.12 reserves `undefined` as the protocol-internal "never
|
|
659
|
+
* sent DATA" sentinel — `null` is the idiomatic "empty / no value" signal
|
|
660
|
+
* for domain nodes. F7.
|
|
661
|
+
*
|
|
662
|
+
* **Caveat when `T` itself includes `null`** (e.g., `topic<number | null>`):
|
|
663
|
+
* `latest === null` is ambiguous — it could mean "no publish yet" OR "a
|
|
664
|
+
* `null` value was published". Use {@link hasLatest} to disambiguate, or
|
|
665
|
+
* observe {@link events} directly and track length yourself.
|
|
666
|
+
*/
|
|
667
|
+
readonly latest: Node<T | null>;
|
|
668
|
+
/**
|
|
669
|
+
* Reactive `true` once the topic has at least one published entry.
|
|
670
|
+
* Disambiguates "`null` never published" from "`null` was published" when
|
|
671
|
+
* `T` includes `null`.
|
|
672
|
+
*/
|
|
673
|
+
readonly hasLatest: Node<boolean>;
|
|
654
674
|
constructor(name: string, opts?: TopicOptions);
|
|
655
675
|
publish(value: T): void;
|
|
656
676
|
retained(): readonly T[];
|
|
@@ -663,6 +683,15 @@ declare class SubscriptionGraph<T> extends Graph {
|
|
|
663
683
|
readonly source: Node<readonly T[]>;
|
|
664
684
|
readonly cursor: Node<number>;
|
|
665
685
|
readonly available: Node<readonly T[]>;
|
|
686
|
+
/**
|
|
687
|
+
* Reference to the upstream topic graph. Intentionally NOT mounted
|
|
688
|
+
* under this subscription: a subscription is a VIEW over an
|
|
689
|
+
* externally-owned topic. Double-mounting (e.g. hub-owned topic +
|
|
690
|
+
* sub-mount here) would make either-side teardown leave the other
|
|
691
|
+
* holding a dead reference. Node-level `derived([topicEvents], …)`
|
|
692
|
+
* still wires the data dependency across graph boundaries. D1(e).
|
|
693
|
+
*/
|
|
694
|
+
readonly topic: TopicGraph<T>;
|
|
666
695
|
constructor(name: string, topicGraph: TopicGraph<T>, opts?: SubscriptionOptions);
|
|
667
696
|
ack(count?: number): number;
|
|
668
697
|
pull(limit?: number, opts?: {
|
|
@@ -730,10 +759,102 @@ declare class TopicBridgeGraph<TIn, TOut = TIn> extends Graph {
|
|
|
730
759
|
readonly bridgedCount: Node<number>;
|
|
731
760
|
constructor(name: string, sourceTopic: TopicGraph<TIn>, targetTopic: TopicGraph<TOut>, opts?: TopicBridgeOptions<TIn, TOut>);
|
|
732
761
|
}
|
|
762
|
+
type MessagingHubOptions = {
|
|
763
|
+
graph?: GraphOptions;
|
|
764
|
+
/**
|
|
765
|
+
* Default `TopicOptions` applied to every topic created via `topic(name)`
|
|
766
|
+
* without explicit options. Per-call opts override. Default: `{}`
|
|
767
|
+
* (unbounded retention per topic unless `retainedLimit` is set per call).
|
|
768
|
+
*/
|
|
769
|
+
defaultTopicOptions?: TopicOptions;
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* Lazy Pulsar-inspired topic registry. Manages a named set of {@link TopicGraph}
|
|
773
|
+
* instances with retention + cursor semantics. Topics are created on first
|
|
774
|
+
* access; `removeTopic(name)` unmounts and tears down via {@link Graph.remove}.
|
|
775
|
+
*
|
|
776
|
+
* **Relationship to `pubsub()` in `src/extra/pubsub.ts`:** `pubsub` is a
|
|
777
|
+
* lightweight last-value state hub (no retention, no cursors). `MessagingHubGraph`
|
|
778
|
+
* is the full messaging hub — retained message logs, cursor-based subscriptions,
|
|
779
|
+
* and pattern-layer lifecycle management.
|
|
780
|
+
*
|
|
781
|
+
* @category patterns
|
|
782
|
+
*/
|
|
783
|
+
declare class MessagingHubGraph extends Graph {
|
|
784
|
+
private readonly _topics;
|
|
785
|
+
private _version;
|
|
786
|
+
private readonly _defaultTopicOptions;
|
|
787
|
+
constructor(name: string, opts?: MessagingHubOptions);
|
|
788
|
+
/** Monotonic counter advancing on topic create/remove. */
|
|
789
|
+
get version(): number;
|
|
790
|
+
/** Number of topics currently in the hub. */
|
|
791
|
+
get size(): number;
|
|
792
|
+
/** Checks topic existence without creating. */
|
|
793
|
+
has(name: string): boolean;
|
|
794
|
+
/** Iterator over topic names. */
|
|
795
|
+
topicNames(): IterableIterator<string>;
|
|
796
|
+
/**
|
|
797
|
+
* Returns the {@link TopicGraph} for `name`, creating lazily on first call.
|
|
798
|
+
* Subsequent calls with the same name return the same instance (options on
|
|
799
|
+
* repeat calls are ignored — the topic is already configured).
|
|
800
|
+
*/
|
|
801
|
+
topic<T = unknown>(name: string, opts?: TopicOptions): TopicGraph<T>;
|
|
802
|
+
/**
|
|
803
|
+
* Publishes a value to the topic, lazily creating it on first publish.
|
|
804
|
+
*
|
|
805
|
+
* **Late-subscriber caveat:** the topic is created lazily, so subscribers
|
|
806
|
+
* that attach AFTER a publish only see the retained window (governed by
|
|
807
|
+
* `retainedLimit` on `TopicOptions` / `defaultTopicOptions`). If
|
|
808
|
+
* `retainedLimit === 0` is set explicitly, early publishes are
|
|
809
|
+
* effectively dropped — prefer an unset `retainedLimit` (unbounded
|
|
810
|
+
* retention) or subscribe before publishing when late-subscribers matter.
|
|
811
|
+
*/
|
|
812
|
+
publish<T = unknown>(name: string, value: T): void;
|
|
813
|
+
/**
|
|
814
|
+
* Bulk publish — issues all publishes inside one outer batch. New topics
|
|
815
|
+
* are created on demand. No-op if `entries` yields nothing.
|
|
816
|
+
*
|
|
817
|
+
* **Iterable consumption (F6):** `entries` is consumed once (single-pass)
|
|
818
|
+
* INSIDE the batch frame. If the iterator throws mid-way, the batch is
|
|
819
|
+
* discarded and NO publishes are visible to subscribers (all-or-nothing).
|
|
820
|
+
* Pass an array or `Set` for multi-shot callers.
|
|
821
|
+
*/
|
|
822
|
+
publishMany(entries: Iterable<[string, unknown]>): void;
|
|
823
|
+
/**
|
|
824
|
+
* Creates a {@link SubscriptionGraph} over a named topic. The topic is
|
|
825
|
+
* lazily created if missing. Subscription lifecycle is owned by the caller —
|
|
826
|
+
* the hub does NOT mount the subscription.
|
|
827
|
+
*
|
|
828
|
+
* @param subName - Local name for the subscription graph.
|
|
829
|
+
* @param topicName - Hub topic to subscribe to.
|
|
830
|
+
* @param opts - `SubscriptionOptions` (initial cursor, etc.).
|
|
831
|
+
*/
|
|
832
|
+
subscribe<T = unknown>(subName: string, topicName: string, opts?: SubscriptionOptions): SubscriptionGraph<T>;
|
|
833
|
+
/**
|
|
834
|
+
* Unmounts and tears down the topic's graph. Returns `true` if the topic
|
|
835
|
+
* existed. Subscribers receive `TEARDOWN` via {@link Graph.remove}.
|
|
836
|
+
*/
|
|
837
|
+
removeTopic(name: string): boolean;
|
|
838
|
+
}
|
|
733
839
|
/**
|
|
734
840
|
* Creates a Pulsar-inspired topic graph (append-only retained stream + latest value).
|
|
735
841
|
*/
|
|
736
842
|
declare function topic<T>(name: string, opts?: TopicOptions): TopicGraph<T>;
|
|
843
|
+
/**
|
|
844
|
+
* Creates a lazy Pulsar-inspired messaging hub. Topics are created on first access
|
|
845
|
+
* via `hub.topic(name)`; `hub.publish(name, value)` shortcuts through the registry.
|
|
846
|
+
*
|
|
847
|
+
* @example
|
|
848
|
+
* ```ts
|
|
849
|
+
* import { messagingHub } from "@graphrefly/graphrefly-ts";
|
|
850
|
+
*
|
|
851
|
+
* const hub = messagingHub("main", { defaultTopicOptions: { retainedLimit: 256 } });
|
|
852
|
+
* hub.publish("orders", { id: 1 });
|
|
853
|
+
* hub.publishMany([["shipments", { id: 1 }], ["orders", { id: 2 }]]);
|
|
854
|
+
* const sub = hub.subscribe("orders-worker", "orders", { cursor: 0 });
|
|
855
|
+
* ```
|
|
856
|
+
*/
|
|
857
|
+
declare function messagingHub(name: string, opts?: MessagingHubOptions): MessagingHubGraph;
|
|
737
858
|
/**
|
|
738
859
|
* Creates a cursor-based subscription graph over a topic.
|
|
739
860
|
*/
|
|
@@ -759,6 +880,9 @@ type messaging_JobQueueGraph<T> = JobQueueGraph<T>;
|
|
|
759
880
|
declare const messaging_JobQueueGraph: typeof JobQueueGraph;
|
|
760
881
|
type messaging_JobQueueOptions = JobQueueOptions;
|
|
761
882
|
type messaging_JobState = JobState;
|
|
883
|
+
type messaging_MessagingHubGraph = MessagingHubGraph;
|
|
884
|
+
declare const messaging_MessagingHubGraph: typeof MessagingHubGraph;
|
|
885
|
+
type messaging_MessagingHubOptions = MessagingHubOptions;
|
|
762
886
|
type messaging_SubscriptionGraph<T> = SubscriptionGraph<T>;
|
|
763
887
|
declare const messaging_SubscriptionGraph: typeof SubscriptionGraph;
|
|
764
888
|
type messaging_SubscriptionOptions = SubscriptionOptions;
|
|
@@ -770,11 +894,12 @@ declare const messaging_TopicGraph: typeof TopicGraph;
|
|
|
770
894
|
type messaging_TopicOptions = TopicOptions;
|
|
771
895
|
declare const messaging_jobFlow: typeof jobFlow;
|
|
772
896
|
declare const messaging_jobQueue: typeof jobQueue;
|
|
897
|
+
declare const messaging_messagingHub: typeof messagingHub;
|
|
773
898
|
declare const messaging_subscription: typeof subscription;
|
|
774
899
|
declare const messaging_topic: typeof topic;
|
|
775
900
|
declare const messaging_topicBridge: typeof topicBridge;
|
|
776
901
|
declare namespace messaging {
|
|
777
|
-
export { type messaging_JobEnvelope as JobEnvelope, messaging_JobFlowGraph as JobFlowGraph, type messaging_JobFlowOptions as JobFlowOptions, messaging_JobQueueGraph as JobQueueGraph, type messaging_JobQueueOptions as JobQueueOptions, type messaging_JobState as JobState, messaging_SubscriptionGraph as SubscriptionGraph, type messaging_SubscriptionOptions as SubscriptionOptions, messaging_TopicBridgeGraph as TopicBridgeGraph, type messaging_TopicBridgeOptions as TopicBridgeOptions, messaging_TopicGraph as TopicGraph, type messaging_TopicOptions as TopicOptions, messaging_jobFlow as jobFlow, messaging_jobQueue as jobQueue, messaging_subscription as subscription, messaging_topic as topic, messaging_topicBridge as topicBridge };
|
|
902
|
+
export { type messaging_JobEnvelope as JobEnvelope, messaging_JobFlowGraph as JobFlowGraph, type messaging_JobFlowOptions as JobFlowOptions, messaging_JobQueueGraph as JobQueueGraph, type messaging_JobQueueOptions as JobQueueOptions, type messaging_JobState as JobState, messaging_MessagingHubGraph as MessagingHubGraph, type messaging_MessagingHubOptions as MessagingHubOptions, messaging_SubscriptionGraph as SubscriptionGraph, type messaging_SubscriptionOptions as SubscriptionOptions, messaging_TopicBridgeGraph as TopicBridgeGraph, type messaging_TopicBridgeOptions as TopicBridgeOptions, messaging_TopicGraph as TopicGraph, type messaging_TopicOptions as TopicOptions, messaging_jobFlow as jobFlow, messaging_jobQueue as jobQueue, messaging_messagingHub as messagingHub, messaging_subscription as subscription, messaging_topic as topic, messaging_topicBridge as topicBridge };
|
|
778
903
|
}
|
|
779
904
|
|
|
780
905
|
/**
|
|
@@ -790,7 +915,7 @@ type OrchestrationMeta = {
|
|
|
790
915
|
orchestration?: true;
|
|
791
916
|
orchestration_type?: string;
|
|
792
917
|
};
|
|
793
|
-
type OrchestrationStepOptions = Omit<NodeOptions
|
|
918
|
+
type OrchestrationStepOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
794
919
|
deps?: ReadonlyArray<StepRef$1>;
|
|
795
920
|
meta?: Record<string, unknown> & OrchestrationMeta;
|
|
796
921
|
};
|
|
@@ -816,7 +941,7 @@ declare function pipeline(name: string, opts?: GraphOptions): Graph;
|
|
|
816
941
|
/**
|
|
817
942
|
* Registers a workflow task node.
|
|
818
943
|
*/
|
|
819
|
-
declare function task<T>(graph: Graph, name: string, run:
|
|
944
|
+
declare function task<T>(graph: Graph, name: string, run: DerivedFn<T>, opts?: OrchestrationStepOptions): Node<T>;
|
|
820
945
|
/**
|
|
821
946
|
* Emits tagged branch outcomes (`then` / `else`) for each source value.
|
|
822
947
|
*/
|
|
@@ -873,7 +998,14 @@ interface GateController<T> {
|
|
|
873
998
|
*/
|
|
874
999
|
declare function gate<T>(graph: Graph, name: string, source: StepRef$1, opts?: GateOptions): GateController<T>;
|
|
875
1000
|
/**
|
|
876
|
-
* Registers a workflow side-effect step
|
|
1001
|
+
* Registers a workflow side-effect step that runs `run` for each upstream
|
|
1002
|
+
* DATA value.
|
|
1003
|
+
*
|
|
1004
|
+
* `run` receives the full `NodeActions` and is the **sole emission point** —
|
|
1005
|
+
* call `actions.emit(v)` or `actions.down(msgs)` inside `run` to produce
|
|
1006
|
+
* downstream output. If `run` does not emit, this step acts as a pure
|
|
1007
|
+
* side-effect sink (graph-observable but no output). Throwing inside `run`
|
|
1008
|
+
* terminates the step with ERROR.
|
|
877
1009
|
*/
|
|
878
1010
|
declare function forEach<T>(graph: Graph, name: string, source: StepRef$1, run: (value: T, actions: NodeActions) => void, opts?: Omit<OrchestrationStepOptions, "deps">): Node<T>;
|
|
879
1011
|
/**
|
|
@@ -893,7 +1025,7 @@ declare function subPipeline(graph: Graph, name: string, childOrBuild?: Graph |
|
|
|
893
1025
|
/**
|
|
894
1026
|
* Registers a producer-style sensor source and returns imperative controls.
|
|
895
1027
|
*/
|
|
896
|
-
declare function sensor<T>(graph: Graph, name: string, initial?: T, opts?: Omit<NodeOptions
|
|
1028
|
+
declare function sensor<T>(graph: Graph, name: string, initial?: T, opts?: Omit<NodeOptions<unknown>, "name" | "describeKind" | "meta"> & {
|
|
897
1029
|
meta?: Record<string, unknown>;
|
|
898
1030
|
}): SensorControls<T>;
|
|
899
1031
|
/**
|
|
@@ -1070,6 +1202,15 @@ declare function streamingPromptNode<T = string>(adapter: LLMAdapter, deps: read
|
|
|
1070
1202
|
*/
|
|
1071
1203
|
declare function streamExtractor<T>(streamTopic: TopicGraph<StreamChunk>, extractFn: (accumulated: string) => T | null, opts?: {
|
|
1072
1204
|
name?: string;
|
|
1205
|
+
/**
|
|
1206
|
+
* Optional structural equals for the extractor output. When two
|
|
1207
|
+
* consecutive chunks produce structurally-equal outputs, the framework
|
|
1208
|
+
* emits `RESOLVED` instead of `DATA`, saving downstream work. Default:
|
|
1209
|
+
* reference equality (`Object.is`). The library cannot know your
|
|
1210
|
+
* output shape — supply this when your `extractFn` returns structured
|
|
1211
|
+
* objects or arrays.
|
|
1212
|
+
*/
|
|
1213
|
+
equals?: (a: T | null, b: T | null) => boolean;
|
|
1073
1214
|
}): Node<T | null>;
|
|
1074
1215
|
/** A keyword match detected in the stream. */
|
|
1075
1216
|
type KeywordFlag = {
|
|
@@ -1084,6 +1225,12 @@ type KeywordFlagExtractorOptions = {
|
|
|
1084
1225
|
label: string;
|
|
1085
1226
|
}[];
|
|
1086
1227
|
name?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* Maximum length of any pattern's literal text. Used as an overlap window
|
|
1230
|
+
* when cursoring through the accumulated stream so matches that span
|
|
1231
|
+
* chunk boundaries aren't missed. Default: 128.
|
|
1232
|
+
*/
|
|
1233
|
+
maxPatternLength?: number;
|
|
1087
1234
|
};
|
|
1088
1235
|
/**
|
|
1089
1236
|
* Mounts a keyword-flag extractor on a streaming topic. Scans accumulated text
|
|
@@ -1091,6 +1238,11 @@ type KeywordFlagExtractorOptions = {
|
|
|
1091
1238
|
*
|
|
1092
1239
|
* Use cases: design invariant violations (`setTimeout`, `EventEmitter`), PII
|
|
1093
1240
|
* detection (SSN, email, phone), toxicity keywords, off-track reasoning.
|
|
1241
|
+
*
|
|
1242
|
+
* **Streaming optimization.** Maintains a cursor across chunks in `ctx.store`
|
|
1243
|
+
* so each chunk scans only the delta region `accumulated.slice(scannedTo -
|
|
1244
|
+
* maxPatternLength)` — not the full string. Default structural equals
|
|
1245
|
+
* suppresses DATA emission when no new flags were found this chunk.
|
|
1094
1246
|
*/
|
|
1095
1247
|
declare function keywordFlagExtractor(streamTopic: TopicGraph<StreamChunk>, opts: KeywordFlagExtractorOptions): Node<readonly KeywordFlag[]>;
|
|
1096
1248
|
/** A tool call detected in the stream. */
|
|
@@ -1106,6 +1258,12 @@ type ExtractedToolCall = {
|
|
|
1106
1258
|
* standard tool_call shape). Partial JSON is ignored until the closing brace.
|
|
1107
1259
|
*
|
|
1108
1260
|
* Feeds into the tool interception chain for reactive tool gating mid-stream.
|
|
1261
|
+
*
|
|
1262
|
+
* **Streaming optimization.** Maintains a cursor (`scanFrom`) in `ctx.store`
|
|
1263
|
+
* so each chunk resumes brace-scanning from the position after the last
|
|
1264
|
+
* complete parse (or the last incomplete open brace). Already-parsed objects
|
|
1265
|
+
* are not re-parsed. Default structural equals suppresses DATA emission when
|
|
1266
|
+
* no new tool call completed this chunk.
|
|
1109
1267
|
*/
|
|
1110
1268
|
declare function toolCallExtractor(streamTopic: TopicGraph<StreamChunk>, opts?: {
|
|
1111
1269
|
name?: string;
|
|
@@ -1125,6 +1283,9 @@ type CostMeterOptions = {
|
|
|
1125
1283
|
* Mounts a cost meter on a streaming topic. Counts chunks, characters, and
|
|
1126
1284
|
* estimates token count. Compose with `budgetGate` for hard-stop when LLM
|
|
1127
1285
|
* output exceeds budget mid-generation.
|
|
1286
|
+
*
|
|
1287
|
+
* Default structural equals suppresses DATA emission when two consecutive
|
|
1288
|
+
* readings are identical (same chunk count + char count + token estimate).
|
|
1128
1289
|
*/
|
|
1129
1290
|
declare function costMeterExtractor(streamTopic: TopicGraph<StreamChunk>, opts?: CostMeterOptions): Node<CostMeterReading>;
|
|
1130
1291
|
/** Options for {@link redactor}. */
|
|
@@ -1239,7 +1400,7 @@ type ChatStreamOptions = {
|
|
|
1239
1400
|
declare class ChatStreamGraph extends Graph {
|
|
1240
1401
|
private readonly _log;
|
|
1241
1402
|
readonly messages: Node<readonly ChatMessage[]>;
|
|
1242
|
-
readonly latest: Node<ChatMessage |
|
|
1403
|
+
readonly latest: Node<ChatMessage | null>;
|
|
1243
1404
|
readonly messageCount: Node<number>;
|
|
1244
1405
|
constructor(name: string, opts?: ChatStreamOptions);
|
|
1245
1406
|
append(role: ChatMessage["role"], content: string, extra?: Partial<ChatMessage>): void;
|
|
@@ -1325,18 +1486,18 @@ type MemoryTiersOptions<TMem> = {
|
|
|
1325
1486
|
archiveThreshold?: number;
|
|
1326
1487
|
/** Predicate: true → entry belongs in permanent tier (default: never). */
|
|
1327
1488
|
permanentFilter?: (key: string, mem: TMem) => boolean;
|
|
1328
|
-
/**
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1331
|
-
|
|
1489
|
+
/** Storage tier for the archive. Omit to disable archiving. */
|
|
1490
|
+
archiveTier?: StorageTier;
|
|
1491
|
+
/** Options forwarded to `graph.attachStorage` for the archive tier. */
|
|
1492
|
+
archiveStorageOptions?: GraphAttachStorageOptions;
|
|
1332
1493
|
};
|
|
1333
1494
|
type MemoryTiersBundle<TMem> = {
|
|
1334
1495
|
/** Permanent tier: never evicted. */
|
|
1335
1496
|
readonly permanent: LightCollectionBundle<TMem>;
|
|
1336
1497
|
/** Active entries node (reactive, holds ReadonlyMap). */
|
|
1337
1498
|
readonly activeEntries: Node<unknown>;
|
|
1338
|
-
/** Archive
|
|
1339
|
-
readonly archiveHandle:
|
|
1499
|
+
/** Archive storage handle (null if no tier configured). */
|
|
1500
|
+
readonly archiveHandle: StorageHandle | null;
|
|
1340
1501
|
/** Classify a key into its current tier. */
|
|
1341
1502
|
tierOf: (key: string) => MemoryTier;
|
|
1342
1503
|
/** Move a key to the permanent tier. */
|
|
@@ -1451,7 +1612,23 @@ type AgentMemoryGraph<TMem = unknown> = Graph & {
|
|
|
1451
1612
|
readonly retrieval: Node<ReadonlyArray<RetrievalEntry<TMem>>> | null;
|
|
1452
1613
|
/** Latest retrieval trace for observability (null if no retrieval pipeline). */
|
|
1453
1614
|
readonly retrievalTrace: Node<RetrievalTrace<TMem> | null> | null;
|
|
1454
|
-
/**
|
|
1615
|
+
/**
|
|
1616
|
+
* Execute a retrieval query (null if no retrieval pipeline).
|
|
1617
|
+
*
|
|
1618
|
+
* **Synchronous consumer API** — returns the result immediately and batch-writes
|
|
1619
|
+
* `retrieval` and `retrievalTrace` state nodes for observers. Reads the store
|
|
1620
|
+
* snapshot and context value **at call time** (external-boundary read).
|
|
1621
|
+
*
|
|
1622
|
+
* **Do not call from inside a reactive fn body** (derived fn, subscribe callback,
|
|
1623
|
+
* effect body). The cache reads would become transitive protocol violations and
|
|
1624
|
+
* may observe wave-progressive rather than wave-final state.
|
|
1625
|
+
*
|
|
1626
|
+
* **Caller-batch caveat:** if invoked inside a caller's `batch(() => ...)` alongside
|
|
1627
|
+
* upstream store mutations, the store snapshot reflects what has been committed to
|
|
1628
|
+
* `store.entries.cache` at call time. State-backed stores update cache synchronously
|
|
1629
|
+
* so batched inserts are visible; derived-backed store transforms may defer. If you
|
|
1630
|
+
* need fresh state after batched mutations, call `retrieve` after the batch returns.
|
|
1631
|
+
*/
|
|
1455
1632
|
readonly retrieve: ((query: RetrievalQuery) => ReadonlyArray<RetrievalEntry<TMem>>) | null;
|
|
1456
1633
|
};
|
|
1457
1634
|
declare function agentMemory<TMem = unknown>(name: string, source: NodeInput<unknown>, opts: AgentMemoryOptions<TMem>): AgentMemoryGraph<TMem>;
|
|
@@ -3110,7 +3287,7 @@ type BudgetConstraint<T = unknown> = {
|
|
|
3110
3287
|
check: (value: T) => boolean;
|
|
3111
3288
|
};
|
|
3112
3289
|
/** Options for {@link budgetGate}. */
|
|
3113
|
-
type BudgetGateOptions = Omit<NodeOptions
|
|
3290
|
+
type BudgetGateOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
3114
3291
|
meta?: Record<string, unknown>;
|
|
3115
3292
|
};
|
|
3116
3293
|
/**
|
|
@@ -3138,7 +3315,7 @@ type ScoredItem<T = unknown> = {
|
|
|
3138
3315
|
breakdown: number[];
|
|
3139
3316
|
};
|
|
3140
3317
|
/** Options for {@link scorer}. */
|
|
3141
|
-
type ScorerOptions = Omit<NodeOptions
|
|
3318
|
+
type ScorerOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
3142
3319
|
meta?: Record<string, unknown>;
|
|
3143
3320
|
/** Custom scoring function per signal. Default: identity (signal value IS the score). */
|
|
3144
3321
|
scoreFns?: ReadonlyArray<(value: unknown) => number>;
|
|
@@ -3243,4 +3420,4 @@ declare namespace index {
|
|
|
3243
3420
|
*/
|
|
3244
3421
|
declare const version = "0.0.0";
|
|
3245
3422
|
|
|
3246
|
-
export { Actor,
|
|
3423
|
+
export { Actor, DerivedFn, DistillBundle, Extraction, Graph, GraphAttachStorageOptions, GraphOptions, GraphProfileOptions, GraphProfileResult, Node, NodeActions, NodeInput, NodeOptions, StorageHandle, StorageTier, ai, index$2 as compat, cqrs, demoShell$1 as demoShell, domainTemplates, graphspec, index$1 as harness, index$a as jotai, index$c as layout, memory, messaging, index$9 as nanostores, index$b as nestjs, orchestration, index as patterns, index$8 as react, reduction, index$7 as signals, index$6 as solid, index$5 as svelte, version, index$4 as vue, index$3 as zustand };
|