@graphrefly/graphrefly 0.20.0 → 0.22.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 +27 -8
- package/dist/chunk-44HD4BTA.js +47 -0
- package/dist/chunk-44HD4BTA.js.map +1 -0
- package/dist/chunk-7TAQJHQV.js +103 -0
- package/dist/chunk-7TAQJHQV.js.map +1 -0
- package/dist/chunk-BLD3IFYF.js +6827 -0
- package/dist/chunk-BLD3IFYF.js.map +1 -0
- package/dist/{chunk-IAPLC4NR.js → chunk-EQUZ5NLD.js} +34 -45
- package/dist/chunk-EQUZ5NLD.js.map +1 -0
- package/dist/{chunk-OOA2UTXF.js → chunk-IR3KMOLX.js} +358 -128
- package/dist/chunk-IR3KMOLX.js.map +1 -0
- package/dist/{chunk-5PSVTDNZ.js → chunk-MQBQOFDS.js} +20 -11
- package/dist/chunk-MQBQOFDS.js.map +1 -0
- package/dist/chunk-NXC35KC5.js +2417 -0
- package/dist/chunk-NXC35KC5.js.map +1 -0
- package/dist/chunk-QA3RP5NH.js +2234 -0
- package/dist/chunk-QA3RP5NH.js.map +1 -0
- package/dist/chunk-RHI3GHZW.js +115 -0
- package/dist/chunk-RHI3GHZW.js.map +1 -0
- package/dist/{chunk-2L5J6RPM.js → chunk-TH6COGOP.js} +15 -26
- package/dist/chunk-TH6COGOP.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +3366 -2259
- 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 +8 -8
- package/dist/core/index.cjs +1611 -1218
- 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 +7726 -6470
- 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 +57 -30
- package/dist/graph/index.cjs +3107 -2216
- 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-DFr0diXB.d.ts +1128 -0
- package/dist/graph-ab1yPwIB.d.cts +1128 -0
- package/dist/{index-8a605sg9.d.ts → index-BHm3Ba5q.d.ts} +2 -2
- package/dist/{index-SFzE_KTa.d.cts → index-BbYZma8G.d.ts} +1697 -586
- package/dist/{index-DuN3bhtm.d.ts → index-BvWfZCTt.d.cts} +1697 -586
- package/dist/index-C9z6rU9P.d.cts +388 -0
- package/dist/{index-BjtlNirP.d.cts → index-D36MAQ3f.d.ts} +4 -4
- package/dist/{index-VHA43cGP.d.cts → index-DLE1Sp-L.d.cts} +2 -2
- package/dist/{index-CgSiUouz.d.ts → index-DrJq9B1T.d.cts} +4 -4
- package/dist/index-DsGxLfwL.d.ts +315 -0
- package/dist/index-Dy04P4W3.d.cts +315 -0
- package/dist/index-HdJx_BjO.d.ts +388 -0
- package/dist/index.cjs +9919 -7900
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +415 -42
- package/dist/index.d.ts +415 -42
- package/dist/index.js +1064 -639
- package/dist/index.js.map +1 -1
- package/dist/meta--fr9sxRM.d.cts +41 -0
- package/dist/meta-n3FoVWML.d.ts +41 -0
- package/dist/node-C5UD5MGq.d.cts +1146 -0
- package/dist/node-C5UD5MGq.d.ts +1146 -0
- package/dist/{observable-DcBwQY7t.d.ts → observable-CQRBtEbq.d.ts} +1 -1
- package/dist/{observable-C8Kx_O6k.d.cts → observable-DWydVy5b.d.cts} +1 -1
- package/dist/patterns/reactive-layout/index.cjs +3102 -2132
- 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 +5 -4
- package/dist/storage-Bew05Xy6.d.cts +182 -0
- package/dist/storage-C9fZfMfM.d.ts +182 -0
- package/package.json +2 -1
- package/dist/chunk-2L5J6RPM.js.map +0 -1
- package/dist/chunk-3N2Y6PCR.js +0 -2117
- package/dist/chunk-3N2Y6PCR.js.map +0 -1
- package/dist/chunk-5PSVTDNZ.js.map +0 -1
- package/dist/chunk-BJAOEU4D.js +0 -6269
- package/dist/chunk-BJAOEU4D.js.map +0 -1
- package/dist/chunk-IAPLC4NR.js.map +0 -1
- package/dist/chunk-OOA2UTXF.js.map +0 -1
- package/dist/chunk-PGEU5MEH.js +0 -162
- package/dist/chunk-PGEU5MEH.js.map +0 -1
- package/dist/chunk-R2LPZIY2.js +0 -111
- package/dist/chunk-R2LPZIY2.js.map +0 -1
- package/dist/chunk-WZ2Z2CRV.js +0 -32
- package/dist/chunk-WZ2Z2CRV.js.map +0 -1
- package/dist/chunk-XYL3GLB3.js +0 -1631
- package/dist/chunk-XYL3GLB3.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.ts
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-C5UD5MGq.js';
|
|
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-C5UD5MGq.js';
|
|
3
|
+
import { i as index$b, c as cqrs } from './index-D36MAQ3f.js';
|
|
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-DFr0diXB.js';
|
|
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-DFr0diXB.js';
|
|
7
|
+
import { D as DerivedFn } from './index-HdJx_BjO.js';
|
|
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-HdJx_BjO.js';
|
|
9
|
+
import { N as NodeInput, D as DistillBundle, E as Extraction } from './index-BbYZma8G.js';
|
|
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-BbYZma8G.js';
|
|
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-DsGxLfwL.js';
|
|
12
|
+
import { S as StorageHandle, a as StorageTier } from './storage-C9fZfMfM.js';
|
|
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-C9fZfMfM.js';
|
|
14
|
+
import { M as MeasurementAdapter, i as index$c } from './index-BHm3Ba5q.js';
|
|
15
|
+
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from './meta-n3FoVWML.js';
|
|
16
|
+
export { T as ToObservableOptions, t as toObservable } from './observable-CQRBtEbq.js';
|
|
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,8 +1283,59 @@ 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>;
|
|
1291
|
+
/** Options for {@link redactor}. */
|
|
1292
|
+
type RedactorOptions = {
|
|
1293
|
+
name?: string;
|
|
1294
|
+
};
|
|
1295
|
+
/**
|
|
1296
|
+
* Stream extractor that replaces matched patterns in the accumulated text.
|
|
1297
|
+
*
|
|
1298
|
+
* Returns a derived node emitting a sanitized `StreamChunk` on every chunk:
|
|
1299
|
+
* `accumulated` and `token` have matched substrings replaced by `replaceFn`.
|
|
1300
|
+
* The default `replaceFn` replaces with `"[REDACTED]"`.
|
|
1301
|
+
*
|
|
1302
|
+
* Compose with `contentGate` for in-flight safety pipelines.
|
|
1303
|
+
*
|
|
1304
|
+
* @param streamTopic - Streaming topic to monitor.
|
|
1305
|
+
* @param patterns - Array of RegExps to match against accumulated text.
|
|
1306
|
+
* @param replaceFn - Replacement producer (default: always `"[REDACTED]"`).
|
|
1307
|
+
*/
|
|
1308
|
+
declare function redactor(streamTopic: TopicGraph<StreamChunk>, patterns: RegExp[], replaceFn?: (match: string, pattern: RegExp) => string, opts?: RedactorOptions): Node<StreamChunk>;
|
|
1309
|
+
/** Content safety decision. */
|
|
1310
|
+
type ContentDecision = "allow" | "block" | "review";
|
|
1311
|
+
/** Options for {@link contentGate}. */
|
|
1312
|
+
type ContentGateOptions = {
|
|
1313
|
+
/**
|
|
1314
|
+
* Hard-block threshold multiplier (default 1.5).
|
|
1315
|
+
* Scores above `threshold * hardMultiplier` emit `"block"`.
|
|
1316
|
+
* Scores between `threshold` and that emit `"review"`.
|
|
1317
|
+
*/
|
|
1318
|
+
hardMultiplier?: number;
|
|
1319
|
+
name?: string;
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* Derived node that classifies accumulated stream text as `"allow"`,
|
|
1323
|
+
* `"review"`, or `"block"` based on a classifier score.
|
|
1324
|
+
*
|
|
1325
|
+
* Emits a three-way decision on every new chunk:
|
|
1326
|
+
* - `"allow"` — score below `threshold`
|
|
1327
|
+
* - `"review"` — score in `[threshold, threshold × hardMultiplier)`
|
|
1328
|
+
* - `"block"` — score at or above `threshold × hardMultiplier`
|
|
1329
|
+
*
|
|
1330
|
+
* Wire the output into a `valve` (automatic) or `gate` (human approval).
|
|
1331
|
+
* This node does not itself control flow — it just classifies.
|
|
1332
|
+
*
|
|
1333
|
+
* @param streamTopic - Streaming topic to classify.
|
|
1334
|
+
* @param classifier - `(accumulated: string) => number` scoring function, or
|
|
1335
|
+
* a `Node<number>` for live scores.
|
|
1336
|
+
* @param threshold - Score at which output becomes "review" or "block".
|
|
1337
|
+
*/
|
|
1338
|
+
declare function contentGate(streamTopic: TopicGraph<StreamChunk>, classifier: ((accumulated: string) => number) | Node<number>, threshold: number, opts?: ContentGateOptions): Node<ContentDecision>;
|
|
1130
1339
|
type GatedStreamOptions = StreamingPromptNodeOptions & {
|
|
1131
1340
|
/** Gate options (maxPending, startOpen). */
|
|
1132
1341
|
gate?: Omit<GateOptions, "meta">;
|
|
@@ -1191,7 +1400,7 @@ type ChatStreamOptions = {
|
|
|
1191
1400
|
declare class ChatStreamGraph extends Graph {
|
|
1192
1401
|
private readonly _log;
|
|
1193
1402
|
readonly messages: Node<readonly ChatMessage[]>;
|
|
1194
|
-
readonly latest: Node<ChatMessage |
|
|
1403
|
+
readonly latest: Node<ChatMessage | null>;
|
|
1195
1404
|
readonly messageCount: Node<number>;
|
|
1196
1405
|
constructor(name: string, opts?: ChatStreamOptions);
|
|
1197
1406
|
append(role: ChatMessage["role"], content: string, extra?: Partial<ChatMessage>): void;
|
|
@@ -1277,18 +1486,18 @@ type MemoryTiersOptions<TMem> = {
|
|
|
1277
1486
|
archiveThreshold?: number;
|
|
1278
1487
|
/** Predicate: true → entry belongs in permanent tier (default: never). */
|
|
1279
1488
|
permanentFilter?: (key: string, mem: TMem) => boolean;
|
|
1280
|
-
/**
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
|
|
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;
|
|
1284
1493
|
};
|
|
1285
1494
|
type MemoryTiersBundle<TMem> = {
|
|
1286
1495
|
/** Permanent tier: never evicted. */
|
|
1287
1496
|
readonly permanent: LightCollectionBundle<TMem>;
|
|
1288
1497
|
/** Active entries node (reactive, holds ReadonlyMap). */
|
|
1289
1498
|
readonly activeEntries: Node<unknown>;
|
|
1290
|
-
/** Archive
|
|
1291
|
-
readonly archiveHandle:
|
|
1499
|
+
/** Archive storage handle (null if no tier configured). */
|
|
1500
|
+
readonly archiveHandle: StorageHandle | null;
|
|
1292
1501
|
/** Classify a key into its current tier. */
|
|
1293
1502
|
tierOf: (key: string) => MemoryTier;
|
|
1294
1503
|
/** Move a key to the permanent tier. */
|
|
@@ -1403,7 +1612,23 @@ type AgentMemoryGraph<TMem = unknown> = Graph & {
|
|
|
1403
1612
|
readonly retrieval: Node<ReadonlyArray<RetrievalEntry<TMem>>> | null;
|
|
1404
1613
|
/** Latest retrieval trace for observability (null if no retrieval pipeline). */
|
|
1405
1614
|
readonly retrievalTrace: Node<RetrievalTrace<TMem> | null> | null;
|
|
1406
|
-
/**
|
|
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
|
+
*/
|
|
1407
1632
|
readonly retrieve: ((query: RetrievalQuery) => ReadonlyArray<RetrievalEntry<TMem>>) | null;
|
|
1408
1633
|
};
|
|
1409
1634
|
declare function agentMemory<TMem = unknown>(name: string, source: NodeInput<unknown>, opts: AgentMemoryOptions<TMem>): AgentMemoryGraph<TMem>;
|
|
@@ -1630,6 +1855,8 @@ type ai_ChatMessage = ChatMessage;
|
|
|
1630
1855
|
type ai_ChatStreamGraph = ChatStreamGraph;
|
|
1631
1856
|
declare const ai_ChatStreamGraph: typeof ChatStreamGraph;
|
|
1632
1857
|
type ai_ChatStreamOptions = ChatStreamOptions;
|
|
1858
|
+
type ai_ContentDecision = ContentDecision;
|
|
1859
|
+
type ai_ContentGateOptions = ContentGateOptions;
|
|
1633
1860
|
type ai_CostMeterOptions = CostMeterOptions;
|
|
1634
1861
|
type ai_CostMeterReading = CostMeterReading;
|
|
1635
1862
|
type ai_ExtractedToolCall = ExtractedToolCall;
|
|
@@ -1653,6 +1880,7 @@ type ai_MemoryTiersBundle<TMem> = MemoryTiersBundle<TMem>;
|
|
|
1653
1880
|
type ai_MemoryTiersOptions<TMem> = MemoryTiersOptions<TMem>;
|
|
1654
1881
|
type ai_OpenAIToolSchema = OpenAIToolSchema;
|
|
1655
1882
|
type ai_PromptNodeOptions = PromptNodeOptions;
|
|
1883
|
+
type ai_RedactorOptions = RedactorOptions;
|
|
1656
1884
|
type ai_RetrievalEntry<TMem> = RetrievalEntry<TMem>;
|
|
1657
1885
|
type ai_RetrievalPipelineOptions<TMem> = RetrievalPipelineOptions<TMem>;
|
|
1658
1886
|
type ai_RetrievalQuery = RetrievalQuery;
|
|
@@ -1673,6 +1901,7 @@ declare const ai_admissionFilter3D: typeof admissionFilter3D;
|
|
|
1673
1901
|
declare const ai_agentLoop: typeof agentLoop;
|
|
1674
1902
|
declare const ai_agentMemory: typeof agentMemory;
|
|
1675
1903
|
declare const ai_chatStream: typeof chatStream;
|
|
1904
|
+
declare const ai_contentGate: typeof contentGate;
|
|
1676
1905
|
declare const ai_costMeterExtractor: typeof costMeterExtractor;
|
|
1677
1906
|
declare const ai_fromLLM: typeof fromLLM;
|
|
1678
1907
|
declare const ai_gatedStream: typeof gatedStream;
|
|
@@ -1683,6 +1912,7 @@ declare const ai_knobsAsTools: typeof knobsAsTools;
|
|
|
1683
1912
|
declare const ai_llmConsolidator: typeof llmConsolidator;
|
|
1684
1913
|
declare const ai_llmExtractor: typeof llmExtractor;
|
|
1685
1914
|
declare const ai_promptNode: typeof promptNode;
|
|
1915
|
+
declare const ai_redactor: typeof redactor;
|
|
1686
1916
|
declare const ai_streamExtractor: typeof streamExtractor;
|
|
1687
1917
|
declare const ai_streamingPromptNode: typeof streamingPromptNode;
|
|
1688
1918
|
declare const ai_suggestStrategy: typeof suggestStrategy;
|
|
@@ -1691,7 +1921,7 @@ declare const ai_toolCallExtractor: typeof toolCallExtractor;
|
|
|
1691
1921
|
declare const ai_toolRegistry: typeof toolRegistry;
|
|
1692
1922
|
declare const ai_validateGraphDef: typeof validateGraphDef;
|
|
1693
1923
|
declare namespace ai {
|
|
1694
|
-
export { type ai_AdmissionScore3DOptions as AdmissionScore3DOptions, type ai_AdmissionScores as AdmissionScores, ai_AgentLoopGraph as AgentLoopGraph, type ai_AgentLoopOptions as AgentLoopOptions, type ai_AgentLoopStatus as AgentLoopStatus, type ai_AgentMemoryGraph as AgentMemoryGraph, type ai_AgentMemoryOptions as AgentMemoryOptions, type ai_ChatMessage as ChatMessage, ai_ChatStreamGraph as ChatStreamGraph, type ai_ChatStreamOptions as ChatStreamOptions, type ai_CostMeterOptions as CostMeterOptions, type ai_CostMeterReading as CostMeterReading, type ai_ExtractedToolCall as ExtractedToolCall, type ai_FromLLMOptions as FromLLMOptions, type ai_GatedStreamHandle as GatedStreamHandle, type ai_GatedStreamOptions as GatedStreamOptions, type ai_GaugesAsContextOptions as GaugesAsContextOptions, type ai_GraphDefValidation as GraphDefValidation, type ai_GraphFromSpecOptions as GraphFromSpecOptions, type ai_KeywordFlag as KeywordFlag, type ai_KeywordFlagExtractorOptions as KeywordFlagExtractorOptions, type ai_KnobsAsToolsResult as KnobsAsToolsResult, type ai_LLMAdapter as LLMAdapter, type ai_LLMConsolidatorOptions as LLMConsolidatorOptions, type ai_LLMExtractorOptions as LLMExtractorOptions, type ai_LLMInvokeOptions as LLMInvokeOptions, type ai_LLMResponse as LLMResponse, type ai_McpToolSchema as McpToolSchema, type ai_MemoryTier as MemoryTier, type ai_MemoryTiersBundle as MemoryTiersBundle, type ai_MemoryTiersOptions as MemoryTiersOptions, type ai_OpenAIToolSchema as OpenAIToolSchema, type ai_PromptNodeOptions as PromptNodeOptions, type ai_RetrievalEntry as RetrievalEntry, type ai_RetrievalPipelineOptions as RetrievalPipelineOptions, type ai_RetrievalQuery as RetrievalQuery, type ai_RetrievalTrace as RetrievalTrace, type ai_StrategyOperation as StrategyOperation, type ai_StrategyPlan as StrategyPlan, type ai_StreamChunk as StreamChunk, type ai_StreamingPromptNodeHandle as StreamingPromptNodeHandle, type ai_StreamingPromptNodeOptions as StreamingPromptNodeOptions, type ai_SuggestStrategyOptions as SuggestStrategyOptions, type ai_SystemPromptHandle as SystemPromptHandle, type ai_ToolCall as ToolCall, type ai_ToolDefinition as ToolDefinition, ai_ToolRegistryGraph as ToolRegistryGraph, type ai_ToolRegistryOptions as ToolRegistryOptions, ai_admissionFilter3D as admissionFilter3D, ai_agentLoop as agentLoop, ai_agentMemory as agentMemory, ai_chatStream as chatStream, ai_costMeterExtractor as costMeterExtractor, ai_fromLLM as fromLLM, ai_gatedStream as gatedStream, ai_gaugesAsContext as gaugesAsContext, ai_graphFromSpec as graphFromSpec, ai_keywordFlagExtractor as keywordFlagExtractor, ai_knobsAsTools as knobsAsTools, ai_llmConsolidator as llmConsolidator, ai_llmExtractor as llmExtractor, ai_promptNode as promptNode, ai_streamExtractor as streamExtractor, ai_streamingPromptNode as streamingPromptNode, ai_suggestStrategy as suggestStrategy, ai_systemPromptBuilder as systemPromptBuilder, ai_toolCallExtractor as toolCallExtractor, ai_toolRegistry as toolRegistry, ai_validateGraphDef as validateGraphDef };
|
|
1924
|
+
export { type ai_AdmissionScore3DOptions as AdmissionScore3DOptions, type ai_AdmissionScores as AdmissionScores, ai_AgentLoopGraph as AgentLoopGraph, type ai_AgentLoopOptions as AgentLoopOptions, type ai_AgentLoopStatus as AgentLoopStatus, type ai_AgentMemoryGraph as AgentMemoryGraph, type ai_AgentMemoryOptions as AgentMemoryOptions, type ai_ChatMessage as ChatMessage, ai_ChatStreamGraph as ChatStreamGraph, type ai_ChatStreamOptions as ChatStreamOptions, type ai_ContentDecision as ContentDecision, type ai_ContentGateOptions as ContentGateOptions, type ai_CostMeterOptions as CostMeterOptions, type ai_CostMeterReading as CostMeterReading, type ai_ExtractedToolCall as ExtractedToolCall, type ai_FromLLMOptions as FromLLMOptions, type ai_GatedStreamHandle as GatedStreamHandle, type ai_GatedStreamOptions as GatedStreamOptions, type ai_GaugesAsContextOptions as GaugesAsContextOptions, type ai_GraphDefValidation as GraphDefValidation, type ai_GraphFromSpecOptions as GraphFromSpecOptions, type ai_KeywordFlag as KeywordFlag, type ai_KeywordFlagExtractorOptions as KeywordFlagExtractorOptions, type ai_KnobsAsToolsResult as KnobsAsToolsResult, type ai_LLMAdapter as LLMAdapter, type ai_LLMConsolidatorOptions as LLMConsolidatorOptions, type ai_LLMExtractorOptions as LLMExtractorOptions, type ai_LLMInvokeOptions as LLMInvokeOptions, type ai_LLMResponse as LLMResponse, type ai_McpToolSchema as McpToolSchema, type ai_MemoryTier as MemoryTier, type ai_MemoryTiersBundle as MemoryTiersBundle, type ai_MemoryTiersOptions as MemoryTiersOptions, type ai_OpenAIToolSchema as OpenAIToolSchema, type ai_PromptNodeOptions as PromptNodeOptions, type ai_RedactorOptions as RedactorOptions, type ai_RetrievalEntry as RetrievalEntry, type ai_RetrievalPipelineOptions as RetrievalPipelineOptions, type ai_RetrievalQuery as RetrievalQuery, type ai_RetrievalTrace as RetrievalTrace, type ai_StrategyOperation as StrategyOperation, type ai_StrategyPlan as StrategyPlan, type ai_StreamChunk as StreamChunk, type ai_StreamingPromptNodeHandle as StreamingPromptNodeHandle, type ai_StreamingPromptNodeOptions as StreamingPromptNodeOptions, type ai_SuggestStrategyOptions as SuggestStrategyOptions, type ai_SystemPromptHandle as SystemPromptHandle, type ai_ToolCall as ToolCall, type ai_ToolDefinition as ToolDefinition, ai_ToolRegistryGraph as ToolRegistryGraph, type ai_ToolRegistryOptions as ToolRegistryOptions, ai_admissionFilter3D as admissionFilter3D, ai_agentLoop as agentLoop, ai_agentMemory as agentMemory, ai_chatStream as chatStream, ai_contentGate as contentGate, ai_costMeterExtractor as costMeterExtractor, ai_fromLLM as fromLLM, ai_gatedStream as gatedStream, ai_gaugesAsContext as gaugesAsContext, ai_graphFromSpec as graphFromSpec, ai_keywordFlagExtractor as keywordFlagExtractor, ai_knobsAsTools as knobsAsTools, ai_llmConsolidator as llmConsolidator, ai_llmExtractor as llmExtractor, ai_promptNode as promptNode, ai_redactor as redactor, ai_streamExtractor as streamExtractor, ai_streamingPromptNode as streamingPromptNode, ai_suggestStrategy as suggestStrategy, ai_systemPromptBuilder as systemPromptBuilder, ai_toolCallExtractor as toolCallExtractor, ai_toolRegistry as toolRegistry, ai_validateGraphDef as validateGraphDef };
|
|
1695
1925
|
}
|
|
1696
1926
|
|
|
1697
1927
|
/**
|
|
@@ -2474,10 +2704,11 @@ interface HarnessLoopOptions {
|
|
|
2474
2704
|
}
|
|
2475
2705
|
|
|
2476
2706
|
/**
|
|
2477
|
-
*
|
|
2707
|
+
* Harness bridge factories (roadmap §9.0).
|
|
2478
2708
|
*
|
|
2479
|
-
*
|
|
2480
|
-
*
|
|
2709
|
+
* Intake bridges, eval source wrapper, before/after comparison,
|
|
2710
|
+
* affected-task filter, code-change bridge, and notification effect.
|
|
2711
|
+
* All are compositions of existing primitives — no new abstractions.
|
|
2481
2712
|
*
|
|
2482
2713
|
* @module
|
|
2483
2714
|
*/
|
|
@@ -2545,6 +2776,135 @@ interface EvalIntakeBridgeOptions {
|
|
|
2545
2776
|
* @returns The effect node (for lifecycle management).
|
|
2546
2777
|
*/
|
|
2547
2778
|
declare function evalIntakeBridge(evalSource: Node<EvalResult | EvalResult[]>, intakeTopic: TopicGraph<IntakeItem>, opts?: EvalIntakeBridgeOptions): Node<unknown>;
|
|
2779
|
+
/**
|
|
2780
|
+
* Wrap any eval runner as a reactive producer node.
|
|
2781
|
+
*
|
|
2782
|
+
* When `trigger` emits, calls `runner()` and emits the result downstream.
|
|
2783
|
+
* Uses `switchMap` + `fromAny` — the async boundary stays in the source
|
|
2784
|
+
* layer (spec §5.10). A new trigger cancels any in-flight run.
|
|
2785
|
+
*
|
|
2786
|
+
* ```ts
|
|
2787
|
+
* const trigger = state(0); // bump to trigger a new run
|
|
2788
|
+
* const results = evalSource(trigger, () => runEvals(config));
|
|
2789
|
+
* results.subscribe(msgs => { ... });
|
|
2790
|
+
* trigger.down([[DATA, 1]]); // fires the runner
|
|
2791
|
+
* ```
|
|
2792
|
+
*
|
|
2793
|
+
* @param trigger - Any node; each new DATA emission fires the runner.
|
|
2794
|
+
* @param runner - Returns an EvalResult (or promise of one).
|
|
2795
|
+
*/
|
|
2796
|
+
declare function evalSource<T extends EvalResult>(trigger: Node<unknown>, runner: () => T | Promise<T>): Node<T>;
|
|
2797
|
+
/** Per-task delta produced by {@link beforeAfterCompare}. */
|
|
2798
|
+
interface EvalTaskDelta {
|
|
2799
|
+
taskId: string;
|
|
2800
|
+
before: boolean;
|
|
2801
|
+
after: boolean;
|
|
2802
|
+
/** Score-level diff (after − before), undefined if no scores present. */
|
|
2803
|
+
scoreDiff?: number;
|
|
2804
|
+
}
|
|
2805
|
+
/** Output of {@link beforeAfterCompare}. */
|
|
2806
|
+
interface EvalDelta {
|
|
2807
|
+
/** Task IDs that newly fail in `after` (were passing in `before`). */
|
|
2808
|
+
newFailures: string[];
|
|
2809
|
+
/** Task IDs that now pass in `after` (were failing in `before`). */
|
|
2810
|
+
resolved: string[];
|
|
2811
|
+
/** Full per-task breakdown. */
|
|
2812
|
+
taskDeltas: EvalTaskDelta[];
|
|
2813
|
+
/** True when net resolutions > net failures. */
|
|
2814
|
+
overallImproved: boolean;
|
|
2815
|
+
}
|
|
2816
|
+
/**
|
|
2817
|
+
* Derived node that computes before/after eval deltas.
|
|
2818
|
+
*
|
|
2819
|
+
* Pure computation: no LLM, no async. Compares per-task validity and
|
|
2820
|
+
* pass counts between two `EvalResult` snapshots.
|
|
2821
|
+
*
|
|
2822
|
+
* @param before - Node holding the baseline eval result.
|
|
2823
|
+
* @param after - Node holding the new eval result.
|
|
2824
|
+
*/
|
|
2825
|
+
declare function beforeAfterCompare(before: Node<EvalResult>, after: Node<EvalResult>): Node<EvalDelta>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Derived node that selects which eval task IDs to re-run.
|
|
2828
|
+
*
|
|
2829
|
+
* Collects `affectsEvalTasks` from all triaged items, deduplicates, then
|
|
2830
|
+
* optionally intersects with `fullTaskSet`. Returns a sorted array of IDs.
|
|
2831
|
+
*
|
|
2832
|
+
* Use this to avoid re-running the full eval suite after each fix: only the
|
|
2833
|
+
* tasks that the triaged items claim to affect are returned.
|
|
2834
|
+
*
|
|
2835
|
+
* @param issues - Node holding the current list of triaged items.
|
|
2836
|
+
* @param fullTaskSet - Optional node (or plain array) of all known task IDs.
|
|
2837
|
+
* When provided, output is the intersection.
|
|
2838
|
+
*/
|
|
2839
|
+
declare function affectedTaskFilter(issues: Node<readonly TriagedItem[]>, fullTaskSet?: Node<readonly string[]> | readonly string[]): Node<string[]>;
|
|
2840
|
+
/** A single lint error emitted by a CI tool. */
|
|
2841
|
+
interface LintError {
|
|
2842
|
+
file: string;
|
|
2843
|
+
line: number;
|
|
2844
|
+
col: number;
|
|
2845
|
+
rule: string;
|
|
2846
|
+
message: string;
|
|
2847
|
+
}
|
|
2848
|
+
/** A single test failure emitted by a test runner. */
|
|
2849
|
+
interface TestFailure {
|
|
2850
|
+
testId: string;
|
|
2851
|
+
file: string;
|
|
2852
|
+
message: string;
|
|
2853
|
+
}
|
|
2854
|
+
/** Structured code-change / CI event. */
|
|
2855
|
+
interface CodeChange {
|
|
2856
|
+
/** Files touched by the change. */
|
|
2857
|
+
files: string[];
|
|
2858
|
+
lintErrors?: LintError[];
|
|
2859
|
+
testFailures?: TestFailure[];
|
|
2860
|
+
}
|
|
2861
|
+
/** Options for {@link codeChangeBridge}. */
|
|
2862
|
+
interface CodeChangeBridgeOptions {
|
|
2863
|
+
/** Name for the effect node (default "code-change-bridge"). */
|
|
2864
|
+
name?: string;
|
|
2865
|
+
/** Default severity for generated IntakeItems (default "high"). */
|
|
2866
|
+
defaultSeverity?: Severity;
|
|
2867
|
+
}
|
|
2868
|
+
/**
|
|
2869
|
+
* Intake bridge for code-change / CI events.
|
|
2870
|
+
*
|
|
2871
|
+
* Watches a source node for `CodeChange` events and publishes one
|
|
2872
|
+
* `IntakeItem` per lint error and per test failure to the intake topic.
|
|
2873
|
+
* Pass a custom `parser` to override the default mapping.
|
|
2874
|
+
*
|
|
2875
|
+
* @param source - Node emitting CodeChange events.
|
|
2876
|
+
* @param intakeTopic - TopicGraph to publish IntakeItem entries to.
|
|
2877
|
+
* @param parser - Optional custom parser (overrides default).
|
|
2878
|
+
* @param opts - Optional configuration.
|
|
2879
|
+
*/
|
|
2880
|
+
declare function codeChangeBridge(source: Node<CodeChange>, intakeTopic: TopicGraph<IntakeItem>, parser?: (change: CodeChange) => IntakeItem[], opts?: CodeChangeBridgeOptions): Node<unknown>;
|
|
2881
|
+
/** Transport function for {@link notifyEffect}. Sync or async. */
|
|
2882
|
+
type NotifyTransport<T> = (item: T) => void | Promise<void>;
|
|
2883
|
+
/** Options for {@link notifyEffect}. */
|
|
2884
|
+
interface NotifyEffectOptions {
|
|
2885
|
+
/** Name for the effect node (default "notify-effect"). */
|
|
2886
|
+
name?: string;
|
|
2887
|
+
}
|
|
2888
|
+
/**
|
|
2889
|
+
* Effect node that sends each new topic entry to an external channel.
|
|
2890
|
+
*
|
|
2891
|
+
* The `transport` function is called for every item published to `topic`.
|
|
2892
|
+
* Async transports are bridged via `fromAny` (spec §5.10 compliant).
|
|
2893
|
+
*
|
|
2894
|
+
* Typical use: Slack webhook, GitHub PR comment, email notification, etc.
|
|
2895
|
+
* The factory provides reactive wiring; the transport supplies domain logic.
|
|
2896
|
+
*
|
|
2897
|
+
* ```ts
|
|
2898
|
+
* notifyEffect(alertQueue, async (item) => {
|
|
2899
|
+
* await fetch(SLACK_WEBHOOK, { method: 'POST', body: JSON.stringify({ text: item.summary }) });
|
|
2900
|
+
* });
|
|
2901
|
+
* ```
|
|
2902
|
+
*
|
|
2903
|
+
* @param topic - TopicGraph whose latest entry triggers the notification.
|
|
2904
|
+
* @param transport - Called with each new item. May return a Promise.
|
|
2905
|
+
* @param opts - Optional configuration.
|
|
2906
|
+
*/
|
|
2907
|
+
declare function notifyEffect<T>(topic: TopicGraph<T>, transport: NotifyTransport<T>, opts?: NotifyEffectOptions): Node<unknown>;
|
|
2548
2908
|
|
|
2549
2909
|
/**
|
|
2550
2910
|
* Strategy model and priority scoring (roadmap §9.0).
|
|
@@ -2758,14 +3118,18 @@ declare function harnessTrace(harness: HarnessGraph, opts?: HarnessTraceOptions)
|
|
|
2758
3118
|
* @module
|
|
2759
3119
|
*/
|
|
2760
3120
|
|
|
3121
|
+
type index$1_CodeChange = CodeChange;
|
|
3122
|
+
type index$1_CodeChangeBridgeOptions = CodeChangeBridgeOptions;
|
|
2761
3123
|
declare const index$1_DEFAULT_DECAY_RATE: typeof DEFAULT_DECAY_RATE;
|
|
2762
3124
|
declare const index$1_DEFAULT_QUEUE_CONFIGS: typeof DEFAULT_QUEUE_CONFIGS;
|
|
2763
3125
|
declare const index$1_DEFAULT_SEVERITY_WEIGHTS: typeof DEFAULT_SEVERITY_WEIGHTS;
|
|
2764
3126
|
type index$1_ErrorClass = ErrorClass;
|
|
2765
3127
|
type index$1_ErrorClassifier = ErrorClassifier;
|
|
3128
|
+
type index$1_EvalDelta = EvalDelta;
|
|
2766
3129
|
type index$1_EvalIntakeBridgeOptions = EvalIntakeBridgeOptions;
|
|
2767
3130
|
type index$1_EvalJudgeScore = EvalJudgeScore;
|
|
2768
3131
|
type index$1_EvalResult = EvalResult;
|
|
3132
|
+
type index$1_EvalTaskDelta = EvalTaskDelta;
|
|
2769
3133
|
type index$1_EvalTaskResult = EvalTaskResult;
|
|
2770
3134
|
type index$1_ExecuteOutput = ExecuteOutput;
|
|
2771
3135
|
type index$1_ExecutionResult = ExecutionResult;
|
|
@@ -2779,6 +3143,9 @@ type index$1_IntakeBridgeOptions = IntakeBridgeOptions;
|
|
|
2779
3143
|
type index$1_IntakeItem = IntakeItem;
|
|
2780
3144
|
type index$1_IntakeSource = IntakeSource;
|
|
2781
3145
|
type index$1_Intervention = Intervention;
|
|
3146
|
+
type index$1_LintError = LintError;
|
|
3147
|
+
type index$1_NotifyEffectOptions = NotifyEffectOptions;
|
|
3148
|
+
type index$1_NotifyTransport<T> = NotifyTransport<T>;
|
|
2782
3149
|
type index$1_PrioritySignals = PrioritySignals;
|
|
2783
3150
|
declare const index$1_QUEUE_NAMES: typeof QUEUE_NAMES;
|
|
2784
3151
|
type index$1_QueueConfig = QueueConfig;
|
|
@@ -2789,22 +3156,28 @@ type index$1_StrategyEntry = StrategyEntry;
|
|
|
2789
3156
|
type index$1_StrategyKey = StrategyKey;
|
|
2790
3157
|
type index$1_StrategyModelBundle = StrategyModelBundle;
|
|
2791
3158
|
type index$1_StrategySnapshot = StrategySnapshot;
|
|
3159
|
+
type index$1_TestFailure = TestFailure;
|
|
2792
3160
|
type index$1_TraceDetail = TraceDetail;
|
|
2793
3161
|
type index$1_TraceEvent = TraceEvent;
|
|
2794
3162
|
type index$1_TraceEventType = TraceEventType;
|
|
2795
3163
|
type index$1_TriagedItem = TriagedItem;
|
|
2796
3164
|
type index$1_VerifyResult = VerifyResult;
|
|
3165
|
+
declare const index$1_affectedTaskFilter: typeof affectedTaskFilter;
|
|
3166
|
+
declare const index$1_beforeAfterCompare: typeof beforeAfterCompare;
|
|
3167
|
+
declare const index$1_codeChangeBridge: typeof codeChangeBridge;
|
|
2797
3168
|
declare const index$1_createIntakeBridge: typeof createIntakeBridge;
|
|
2798
3169
|
declare const index$1_defaultErrorClassifier: typeof defaultErrorClassifier;
|
|
2799
3170
|
declare const index$1_evalIntakeBridge: typeof evalIntakeBridge;
|
|
3171
|
+
declare const index$1_evalSource: typeof evalSource;
|
|
2800
3172
|
declare const index$1_harnessLoop: typeof harnessLoop;
|
|
2801
3173
|
declare const index$1_harnessProfile: typeof harnessProfile;
|
|
2802
3174
|
declare const index$1_harnessTrace: typeof harnessTrace;
|
|
3175
|
+
declare const index$1_notifyEffect: typeof notifyEffect;
|
|
2803
3176
|
declare const index$1_priorityScore: typeof priorityScore;
|
|
2804
3177
|
declare const index$1_strategyKey: typeof strategyKey;
|
|
2805
3178
|
declare const index$1_strategyModel: typeof strategyModel;
|
|
2806
3179
|
declare namespace index$1 {
|
|
2807
|
-
export { index$1_DEFAULT_DECAY_RATE as DEFAULT_DECAY_RATE, index$1_DEFAULT_QUEUE_CONFIGS as DEFAULT_QUEUE_CONFIGS, index$1_DEFAULT_SEVERITY_WEIGHTS as DEFAULT_SEVERITY_WEIGHTS, type index$1_ErrorClass as ErrorClass, type index$1_ErrorClassifier as ErrorClassifier, type index$1_EvalIntakeBridgeOptions as EvalIntakeBridgeOptions, type index$1_EvalJudgeScore as EvalJudgeScore, type index$1_EvalResult as EvalResult, type index$1_EvalTaskResult as EvalTaskResult, type index$1_ExecuteOutput as ExecuteOutput, type index$1_ExecutionResult as ExecutionResult, index$1_HarnessGraph as HarnessGraph, type index$1_HarnessLoopOptions as HarnessLoopOptions, type index$1_HarnessProfileResult as HarnessProfileResult, type index$1_HarnessTraceHandle as HarnessTraceHandle, type index$1_HarnessTraceOptions as HarnessTraceOptions, type index$1_IntakeBridgeOptions as IntakeBridgeOptions, type index$1_IntakeItem as IntakeItem, type index$1_IntakeSource as IntakeSource, type index$1_Intervention as Intervention, type index$1_PrioritySignals as PrioritySignals, index$1_QUEUE_NAMES as QUEUE_NAMES, type index$1_QueueConfig as QueueConfig, type index$1_QueueRoute as QueueRoute, type index$1_RootCause as RootCause, type index$1_Severity as Severity, type index$1_StrategyEntry as StrategyEntry, type index$1_StrategyKey as StrategyKey, type index$1_StrategyModelBundle as StrategyModelBundle, type index$1_StrategySnapshot as StrategySnapshot, type index$1_TraceDetail as TraceDetail, type index$1_TraceEvent as TraceEvent, type index$1_TraceEventType as TraceEventType, type index$1_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_createIntakeBridge as createIntakeBridge, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_harnessLoop as harnessLoop, index$1_harnessProfile as harnessProfile, index$1_harnessTrace as harnessTrace, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
3180
|
+
export { type index$1_CodeChange as CodeChange, type index$1_CodeChangeBridgeOptions as CodeChangeBridgeOptions, index$1_DEFAULT_DECAY_RATE as DEFAULT_DECAY_RATE, index$1_DEFAULT_QUEUE_CONFIGS as DEFAULT_QUEUE_CONFIGS, index$1_DEFAULT_SEVERITY_WEIGHTS as DEFAULT_SEVERITY_WEIGHTS, type index$1_ErrorClass as ErrorClass, type index$1_ErrorClassifier as ErrorClassifier, type index$1_EvalDelta as EvalDelta, type index$1_EvalIntakeBridgeOptions as EvalIntakeBridgeOptions, type index$1_EvalJudgeScore as EvalJudgeScore, type index$1_EvalResult as EvalResult, type index$1_EvalTaskDelta as EvalTaskDelta, type index$1_EvalTaskResult as EvalTaskResult, type index$1_ExecuteOutput as ExecuteOutput, type index$1_ExecutionResult as ExecutionResult, index$1_HarnessGraph as HarnessGraph, type index$1_HarnessLoopOptions as HarnessLoopOptions, type index$1_HarnessProfileResult as HarnessProfileResult, type index$1_HarnessTraceHandle as HarnessTraceHandle, type index$1_HarnessTraceOptions as HarnessTraceOptions, type index$1_IntakeBridgeOptions as IntakeBridgeOptions, type index$1_IntakeItem as IntakeItem, type index$1_IntakeSource as IntakeSource, type index$1_Intervention as Intervention, type index$1_LintError as LintError, type index$1_NotifyEffectOptions as NotifyEffectOptions, type index$1_NotifyTransport as NotifyTransport, type index$1_PrioritySignals as PrioritySignals, index$1_QUEUE_NAMES as QUEUE_NAMES, type index$1_QueueConfig as QueueConfig, type index$1_QueueRoute as QueueRoute, type index$1_RootCause as RootCause, type index$1_Severity as Severity, type index$1_StrategyEntry as StrategyEntry, type index$1_StrategyKey as StrategyKey, type index$1_StrategyModelBundle as StrategyModelBundle, type index$1_StrategySnapshot as StrategySnapshot, type index$1_TestFailure as TestFailure, type index$1_TraceDetail as TraceDetail, type index$1_TraceEvent as TraceEvent, type index$1_TraceEventType as TraceEventType, type index$1_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_affectedTaskFilter as affectedTaskFilter, index$1_beforeAfterCompare as beforeAfterCompare, index$1_codeChangeBridge as codeChangeBridge, index$1_createIntakeBridge as createIntakeBridge, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_evalSource as evalSource, index$1_harnessLoop as harnessLoop, index$1_harnessProfile as harnessProfile, index$1_harnessTrace as harnessTrace, index$1_notifyEffect as notifyEffect, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
2808
3181
|
}
|
|
2809
3182
|
|
|
2810
3183
|
/**
|
|
@@ -2914,7 +3287,7 @@ type BudgetConstraint<T = unknown> = {
|
|
|
2914
3287
|
check: (value: T) => boolean;
|
|
2915
3288
|
};
|
|
2916
3289
|
/** Options for {@link budgetGate}. */
|
|
2917
|
-
type BudgetGateOptions = Omit<NodeOptions
|
|
3290
|
+
type BudgetGateOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
2918
3291
|
meta?: Record<string, unknown>;
|
|
2919
3292
|
};
|
|
2920
3293
|
/**
|
|
@@ -2942,7 +3315,7 @@ type ScoredItem<T = unknown> = {
|
|
|
2942
3315
|
breakdown: number[];
|
|
2943
3316
|
};
|
|
2944
3317
|
/** Options for {@link scorer}. */
|
|
2945
|
-
type ScorerOptions = Omit<NodeOptions
|
|
3318
|
+
type ScorerOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
2946
3319
|
meta?: Record<string, unknown>;
|
|
2947
3320
|
/** Custom scoring function per signal. Default: identity (signal value IS the score). */
|
|
2948
3321
|
scoreFns?: ReadonlyArray<(value: unknown) => number>;
|
|
@@ -3047,4 +3420,4 @@ declare namespace index {
|
|
|
3047
3420
|
*/
|
|
3048
3421
|
declare const version = "0.0.0";
|
|
3049
3422
|
|
|
3050
|
-
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 };
|