@graphrefly/graphrefly 0.16.0 → 0.17.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/dist/{chunk-RLVFZDCE.js → chunk-2PORF4RP.js} +3 -3
- package/dist/{chunk-YX263TXI.js → chunk-646OG3PO.js} +2 -2
- package/dist/{chunk-VZY2B2LU.js → chunk-BV3TPSBK.js} +1 -2
- package/dist/chunk-BV3TPSBK.js.map +1 -0
- package/dist/chunk-EBNKJULL.js +231 -0
- package/dist/chunk-EBNKJULL.js.map +1 -0
- package/dist/{chunk-ITDVOCFO.js → chunk-F2ULI3Q3.js} +2 -2
- package/dist/{chunk-3BLRREFM.js → chunk-IHJHBADD.js} +3 -3
- package/dist/{chunk-LKP7IWRV.js → chunk-R6OHUUYB.js} +3 -3
- package/dist/{chunk-26A4E7J7.js → chunk-XJ6EMQ22.js} +4 -4
- package/dist/{chunk-RZSQ7P2C.js → chunk-YXROQFXZ.js} +3 -3
- package/dist/compat/nestjs/index.cjs +0 -1
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.js +7 -7
- package/dist/core/index.cjs +0 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +3 -3
- package/dist/extra/index.cjs +0 -1
- package/dist/extra/index.cjs.map +1 -1
- package/dist/extra/index.js +3 -3
- package/dist/graph/index.cjs +125 -3
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/graph/index.js +10 -6
- package/dist/{index-Db27z6Ki.d.cts → index-4OIX-q0C.d.cts} +88 -3
- package/dist/{index-BR19vQME.d.ts → index-D7y9Q8W4.d.ts} +88 -3
- package/dist/index.cjs +193 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -8
- package/dist/index.d.ts +51 -8
- package/dist/index.js +85 -57
- package/dist/index.js.map +1 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -1
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-SHRJH2DN.js +0 -107
- package/dist/chunk-SHRJH2DN.js.map +0 -1
- package/dist/chunk-VZY2B2LU.js.map +0 -1
- /package/dist/{chunk-RLVFZDCE.js.map → chunk-2PORF4RP.js.map} +0 -0
- /package/dist/{chunk-YX263TXI.js.map → chunk-646OG3PO.js.map} +0 -0
- /package/dist/{chunk-ITDVOCFO.js.map → chunk-F2ULI3Q3.js.map} +0 -0
- /package/dist/{chunk-3BLRREFM.js.map → chunk-IHJHBADD.js.map} +0 -0
- /package/dist/{chunk-LKP7IWRV.js.map → chunk-R6OHUUYB.js.map} +0 -0
- /package/dist/{chunk-26A4E7J7.js.map → chunk-XJ6EMQ22.js.map} +0 -0
- /package/dist/{chunk-RZSQ7P2C.js.map → chunk-YXROQFXZ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,8 @@ export { D as DescribeFilter, d as GRAPH_META_SEGMENT, e as GraphActorOptions, f
|
|
|
7
7
|
export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, i as core, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from './index-YlOH1Gw6.cjs';
|
|
8
8
|
import { N as NodeInput, D as DistillBundle, E as Extraction } from './index-ClaKZFPl.cjs';
|
|
9
9
|
export { A as AdapterHandlers, a as AsyncSourceOpts, B as BackoffPreset, b as BackoffStrategy, c as BatchMessage, d as BridgeMessage, e as BufferedSinkHandle, C as CSVRow, f as CacheEvictionPolicy, g as CacheTier, h as CascadingCache, i as CascadingCacheOptions, j as CheckpointAdapter, 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 DictCheckpointAdapter, v as DistillOptions, w as DrizzleQueryLike, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as FSEvent, G as FSEventType, H as FileCheckpointAdapter, I as FileWriterLike, J as FromCSVOptions, K as FromClickHouseWatchOptions, L as FromCronOptions, M as FromDrizzleOptions, O as FromFSWatchOptions, P as FromGitHookOptions, Q as FromHTTPOptions, R as FromKafkaOptions, S as FromKyselyOptions, T as FromMCPOptions, U as FromNATSOptions, V as FromNDJSONOptions, W as FromOTelOptions, X as FromPrismaOptions, Y as FromPrometheusOptions, Z as FromPulsarOptions, _ as FromRabbitMQOptions, $ as FromRedisStreamOptions, a0 as FromSqliteOptions, a1 as FromStatsDOptions, a2 as FromSyslogOptions, a3 as GitEvent, a4 as GitHookType, a5 as HTTPBundle, a6 as IndexRow, a7 as IndexedDbCheckpointSpec, a8 as InitMessage, a9 as JitterMode, aa as KafkaConsumerLike, ab as KafkaMessage, ac as KafkaProducerLike, ad as KyselyQueryLike, ae as LokiClientLike, af as LokiStream, ag as MCPClientLike, ah as MemoryCheckpointAdapter, ai as MergeMapOptions, aj as MongoCollectionLike, ak as NATSClientLike, al as NATSMessage, am as NATSSubscriptionLike, an as NS_PER_MS, ao as NS_PER_SEC, ap as OTelBundle, aq as OTelLog, ar as OTelMetric, as as OTelRegister, at as OTelSpan, au as PostgresClientLike, av as PrismaModelLike, aw as PrometheusMetric, ax as PubSubHub, ay as PulsarConsumerLike, az as PulsarMessage, aA as PulsarProducerLike, aB as RabbitMQChannelLike, aC as RabbitMQMessage, aD as ReactiveIndexBundle, aE as ReactiveIndexOptions, aF as ReactiveListBundle, aG as ReactiveListOptions, aH as ReactiveLogBundle, aI as ReactiveLogOptions, aJ as ReactiveMapBundle, aK as ReactiveMapOptions, aL as ReadyMessage, aM as RedisCheckpointClientLike, aN as RedisClientLike, aO as RedisStreamEntry, aP as RetryOptions, aQ as S3ClientLike, aR as SignalMessage, aS as SinkHandle, aT as SinkTransportError, aU as SqliteCheckpointAdapter, aV as SqliteDbLike, aW as StatsDMetric, aX as StatsDRegister, aY as StatusValue, aZ as SyslogMessage, a_ as SyslogRegister, a$ as TapObserver, b0 as TempoClientLike, b1 as ThrottleOptions, b2 as TieredStorage, b3 as TieredStorageOptions, b4 as TimeoutError, b5 as ToCSVOptions, b6 as ToClickHouseOptions, b7 as ToFileOptions, b8 as ToKafkaOptions, b9 as ToLokiOptions, ba as ToMongoOptions, bb as ToNATSOptions, bc as ToPostgresOptions, bd as ToPulsarOptions, be as ToRabbitMQOptions, bf as ToRedisStreamOptions, bg as ToS3Options, bh as ToSSEOptions, bi as ToSqliteOptions, bj as ToTempoOptions, bk as ToWebSocketOptions, bl as ToWebSocketTransportError, bm as TokenBucket, bn as ValueMessage, bo as VerifiableBundle, bp as VerifiableOptions, bq as VerifyValue, br as WatermarkController, bs as WatermarkOptions, bt as WebSocketLike, bu as WebSocketMessageEventLike, bv as WebSocketRegister, bw as WebhookRegister, bx as WithBreakerBundle, by as WithStatusBundle, bz as WorkerBridge, bA as WorkerBridgeOptions, bB as WorkerSelfHandle, bC as WorkerSelfOptions, bD as WorkerTransport, bE as audit, bF as buffer, bG as bufferCount, bH as bufferTime, bI as cache, bJ as cached, bK as cascadingCache, bL as catchError, bM as checkpointNodeValue, bN as checkpointToRedis, bO as checkpointToS3, bP as circuitBreaker, bQ as combine, bR as combineLatest, bS as concat, bT as concatMap, bU as constant, bV as createTransport, bW as createWatermarkController, bX as debounce, bY as debounceTime, bZ as decorrelatedJitter, b_ as delay, b$ as deserializeError, c0 as distill, c1 as distinctUntilChanged, c2 as elementAt, c3 as empty, c4 as escapeRegexChar, c5 as exhaustMap, c6 as exponential, c7 as extra, c8 as fallback, c9 as fibonacci, ca as filter, cb as find, cc as first, cd as firstValueFrom, ce as flatMap, cf as forEach, cg as fromAny, ch as fromAsyncIter, ci as fromCSV, cj as fromClickHouseWatch, ck as fromCron, cl as fromDrizzle, cm as fromEvent, cn as fromFSWatch, co as fromGitHook, cp as fromHTTP, cq as fromIDBRequest, cr as fromIDBTransaction, cs as fromIter, ct as fromKafka, cu as fromKysely, cv as fromMCP, cw as fromNATS, cx as fromNDJSON, cy as fromOTel, cz as fromPrisma, cA as fromPrometheus, cB as fromPromise, cC as fromPulsar, cD as fromRabbitMQ, cE as fromRedisStream, cF as fromSqlite, cG as fromStatsD, cH as fromSyslog, cI as fromTimer, cJ as fromWebSocket, cK as fromWebhook, cL as globToRegExp, cM as interval, cN as last, cO as linear, cP as logSlice, cQ as lru, cR as map, cS as matchesAnyPattern, cT as matchesCron, cU as merge, cV as mergeMap, cW as nameToSignal, cX as never, cY as of, cZ as pairwise, c_ as parseCron, c$ as parsePrometheusText, d0 as parseStatsD, d1 as parseSyslog, d2 as pausable, d3 as pubsub, d4 as race, d5 as rateLimiter, d6 as reactiveIndex, d7 as reactiveList, d8 as reactiveLog, d9 as reactiveMap, da as reduce, db as repeat, dc as replay, dd as rescue, de as resolveBackoffPreset, df as restoreGraphCheckpoint, dg as restoreGraphCheckpointIndexedDb, dh as retry, di as sample, dj as saveGraphCheckpoint, dk as saveGraphCheckpointIndexedDb, dl as scan, dm as serializeError, dn as share, dp as shareReplay, dq as signalToName, dr as skip, ds as startWith, dt as switchMap, du as take, dv as takeUntil, dw as takeWhile, dx as tap, dy as throttle, dz as throttleTime, dA as throwError, dB as tieredStorage, dC as timeout, dD as toArray, dE as toCSV, dF as toClickHouse, dG as toFile, dH as toKafka, dI as toLoki, dJ as toMongo, dK as toNATS, dL as toPostgres, dM as toPulsar, dN as toRabbitMQ, dO as toRedisStream, dP as toS3, dQ as toSSE, dR as toSqlite, dS as toTempo, dT as toWebSocket, dU as tokenBucket, dV as tokenTracker, dW as valve, dX as verifiable, dY as window, dZ as windowCount, d_ as windowTime, d$ as withBreaker, e0 as withLatestFrom, e1 as withMaxAttempts, e2 as withStatus, e3 as workerBridge, e4 as workerSelf, e5 as zip } from './index-ClaKZFPl.cjs';
|
|
10
|
-
|
|
10
|
+
import { G as GraphProfileResult, a as GraphProfileOptions } from './index-4OIX-q0C.cjs';
|
|
11
|
+
export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, b as EvictionPolicy, c as GraphCodec, J as JsonCodec, L as LazyGraphCodec, N as NodeProfile, W as WALEntry, d as createDagCborCodec, e as createDagCborZstdCodec, i as graph, g as graphProfile, n as negotiateCodec, r as replayWAL, s as sizeof } from './index-4OIX-q0C.cjs';
|
|
11
12
|
import { M as MeasurementAdapter, i as index$c } from './index-DlGMf_Qe.cjs';
|
|
12
13
|
export { o as observeGraph$, a as observeNode$, t as toMessages$, b as toObservable } from './observable-Cz-AWhwR.cjs';
|
|
13
14
|
import '@nestjs/common';
|
|
@@ -2056,6 +2057,8 @@ type RootCause = "composition" | "missing-fn" | "bad-docs" | "schema-gap" | "reg
|
|
|
2056
2057
|
type Intervention = "template" | "catalog-fn" | "docs" | "wrapper" | "schema-change" | "investigate";
|
|
2057
2058
|
/** Routing destinations after triage. */
|
|
2058
2059
|
type QueueRoute = "auto-fix" | "needs-decision" | "investigation" | "backlog";
|
|
2060
|
+
/** Ordered queue route names for iteration. */
|
|
2061
|
+
declare const QUEUE_NAMES: readonly QueueRoute[];
|
|
2059
2062
|
/**
|
|
2060
2063
|
* An item entering the harness loop via the INTAKE stage.
|
|
2061
2064
|
*
|
|
@@ -2070,6 +2073,8 @@ interface IntakeItem {
|
|
|
2070
2073
|
affectsEvalTasks?: string[];
|
|
2071
2074
|
severity?: Severity;
|
|
2072
2075
|
relatedTo?: string[];
|
|
2076
|
+
/** Item-carried reingestion count. Incremented on each full-loop reingestion. */
|
|
2077
|
+
_reingestions?: number;
|
|
2073
2078
|
}
|
|
2074
2079
|
/** Output of the TRIAGE stage — enriched intake item with classification. */
|
|
2075
2080
|
interface TriagedItem extends IntakeItem {
|
|
@@ -2078,6 +2083,8 @@ interface TriagedItem extends IntakeItem {
|
|
|
2078
2083
|
route: QueueRoute;
|
|
2079
2084
|
priority: number;
|
|
2080
2085
|
triageReasoning?: string;
|
|
2086
|
+
/** Item-carried retry count. Incremented on each fast-retry pass. */
|
|
2087
|
+
_retries?: number;
|
|
2081
2088
|
}
|
|
2082
2089
|
/** Effectiveness record for a rootCause→intervention pair. */
|
|
2083
2090
|
interface StrategyEntry {
|
|
@@ -2159,8 +2166,12 @@ interface HarnessLoopOptions {
|
|
|
2159
2166
|
errorClassifier?: ErrorClassifier;
|
|
2160
2167
|
/** Max fast-retries per item before routing to full intake (default 2). */
|
|
2161
2168
|
maxRetries?: number;
|
|
2169
|
+
/** Global retry cap across all items — circuit breaker (default maxRetries × 10). */
|
|
2170
|
+
maxTotalRetries?: number;
|
|
2162
2171
|
/** Max re-ingestions from verify→intake before giving up (default 1). */
|
|
2163
2172
|
maxReingestions?: number;
|
|
2173
|
+
/** Global reingestion cap across all items — circuit breaker (default maxReingestions × 10). */
|
|
2174
|
+
maxTotalReingestions?: number;
|
|
2164
2175
|
/** Retained limit for topic logs (default 1000). */
|
|
2165
2176
|
retainedLimit?: number;
|
|
2166
2177
|
}
|
|
@@ -2433,11 +2444,11 @@ declare class HarnessGraph extends Graph {
|
|
|
2433
2444
|
readonly strategy: StrategyModelBundle;
|
|
2434
2445
|
/** Verify results topic — subscribe to see verification outcomes. */
|
|
2435
2446
|
readonly verifyResults: TopicGraph<VerifyResult>;
|
|
2436
|
-
/**
|
|
2437
|
-
readonly
|
|
2438
|
-
/**
|
|
2439
|
-
readonly
|
|
2440
|
-
constructor(name: string, intake: TopicGraph<IntakeItem>, queues: Map<QueueRoute, TopicGraph<TriagedItem>>, gates: Map<QueueRoute, GateController<TriagedItem>>, strategy: StrategyModelBundle, verifyResults: TopicGraph<VerifyResult>,
|
|
2447
|
+
/** Global retry count across all items (circuit breaker). Reactive — subscribable. */
|
|
2448
|
+
readonly totalRetries: Node<number>;
|
|
2449
|
+
/** Global reingestion count across all items (circuit breaker). Reactive — subscribable. */
|
|
2450
|
+
readonly totalReingestions: Node<number>;
|
|
2451
|
+
constructor(name: string, intake: TopicGraph<IntakeItem>, queues: Map<QueueRoute, TopicGraph<TriagedItem>>, gates: Map<QueueRoute, GateController<TriagedItem>>, strategy: StrategyModelBundle, verifyResults: TopicGraph<VerifyResult>, totalRetries: Node<number>, totalReingestions: Node<number>);
|
|
2441
2452
|
}
|
|
2442
2453
|
/**
|
|
2443
2454
|
* Wire the reactive collaboration loop as a static-topology graph.
|
|
@@ -2457,6 +2468,35 @@ declare class HarnessGraph extends Graph {
|
|
|
2457
2468
|
*/
|
|
2458
2469
|
declare function harnessLoop(name: string, opts: HarnessLoopOptions): HarnessGraph;
|
|
2459
2470
|
|
|
2471
|
+
/**
|
|
2472
|
+
* Harness-specific graph profiling (roadmap §9.0).
|
|
2473
|
+
*
|
|
2474
|
+
* Extends {@link graphProfile} with harness domain counters:
|
|
2475
|
+
* queue depths, strategy entries, retry/reingestion tracker sizes.
|
|
2476
|
+
*
|
|
2477
|
+
* @module
|
|
2478
|
+
*/
|
|
2479
|
+
|
|
2480
|
+
/** Harness-specific profile extending the base graph profile. */
|
|
2481
|
+
interface HarnessProfileResult extends GraphProfileResult {
|
|
2482
|
+
/** Per-queue retained item counts. */
|
|
2483
|
+
queueDepths: Record<QueueRoute, number>;
|
|
2484
|
+
/** Number of rootCause→intervention entries in the strategy model. */
|
|
2485
|
+
strategyEntries: number;
|
|
2486
|
+
/** Global retry count across all items. */
|
|
2487
|
+
totalRetries: number;
|
|
2488
|
+
/** Global reingestion count across all items. */
|
|
2489
|
+
totalReingestions: number;
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* Profile a harness graph with domain-specific counters.
|
|
2493
|
+
*
|
|
2494
|
+
* @param harness - The HarnessGraph to profile.
|
|
2495
|
+
* @param opts - Optional base profile options.
|
|
2496
|
+
* @returns Harness profile with queue depths, strategy stats, and tracker sizes.
|
|
2497
|
+
*/
|
|
2498
|
+
declare function harnessProfile(harness: HarnessGraph, opts?: GraphProfileOptions): HarnessProfileResult;
|
|
2499
|
+
|
|
2460
2500
|
/**
|
|
2461
2501
|
* Harness wiring (roadmap §9.0).
|
|
2462
2502
|
*
|
|
@@ -2481,10 +2521,12 @@ type index$1_ExecutionResult = ExecutionResult;
|
|
|
2481
2521
|
type index$1_HarnessGraph = HarnessGraph;
|
|
2482
2522
|
declare const index$1_HarnessGraph: typeof HarnessGraph;
|
|
2483
2523
|
type index$1_HarnessLoopOptions = HarnessLoopOptions;
|
|
2524
|
+
type index$1_HarnessProfileResult = HarnessProfileResult;
|
|
2484
2525
|
type index$1_IntakeItem = IntakeItem;
|
|
2485
2526
|
type index$1_IntakeSource = IntakeSource;
|
|
2486
2527
|
type index$1_Intervention = Intervention;
|
|
2487
2528
|
type index$1_PrioritySignals = PrioritySignals;
|
|
2529
|
+
declare const index$1_QUEUE_NAMES: typeof QUEUE_NAMES;
|
|
2488
2530
|
type index$1_QueueConfig = QueueConfig;
|
|
2489
2531
|
type index$1_QueueRoute = QueueRoute;
|
|
2490
2532
|
type index$1_RootCause = RootCause;
|
|
@@ -2498,11 +2540,12 @@ type index$1_VerifyResult = VerifyResult;
|
|
|
2498
2540
|
declare const index$1_defaultErrorClassifier: typeof defaultErrorClassifier;
|
|
2499
2541
|
declare const index$1_evalIntakeBridge: typeof evalIntakeBridge;
|
|
2500
2542
|
declare const index$1_harnessLoop: typeof harnessLoop;
|
|
2543
|
+
declare const index$1_harnessProfile: typeof harnessProfile;
|
|
2501
2544
|
declare const index$1_priorityScore: typeof priorityScore;
|
|
2502
2545
|
declare const index$1_strategyKey: typeof strategyKey;
|
|
2503
2546
|
declare const index$1_strategyModel: typeof strategyModel;
|
|
2504
2547
|
declare namespace index$1 {
|
|
2505
|
-
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_IntakeItem as IntakeItem, type index$1_IntakeSource as IntakeSource, type index$1_Intervention as Intervention, type index$1_PrioritySignals as PrioritySignals, 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_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_harnessLoop as harnessLoop, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
2548
|
+
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_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_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_harnessLoop as harnessLoop, index$1_harnessProfile as harnessProfile, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
2506
2549
|
}
|
|
2507
2550
|
|
|
2508
2551
|
/**
|
|
@@ -2701,4 +2744,4 @@ declare namespace index {
|
|
|
2701
2744
|
*/
|
|
2702
2745
|
declare const version = "0.0.0";
|
|
2703
2746
|
|
|
2704
|
-
export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, Node, NodeActions, NodeFn, NodeInput, NodeOptions, 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 };
|
|
2747
|
+
export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, GraphProfileOptions, GraphProfileResult, Node, NodeActions, NodeFn, NodeInput, NodeOptions, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export { D as DescribeFilter, d as GRAPH_META_SEGMENT, e as GraphActorOptions, f
|
|
|
7
7
|
export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, i as core, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from './index-BmoUvOGN.js';
|
|
8
8
|
import { N as NodeInput, D as DistillBundle, E as Extraction } from './index-N704txAA.js';
|
|
9
9
|
export { A as AdapterHandlers, a as AsyncSourceOpts, B as BackoffPreset, b as BackoffStrategy, c as BatchMessage, d as BridgeMessage, e as BufferedSinkHandle, C as CSVRow, f as CacheEvictionPolicy, g as CacheTier, h as CascadingCache, i as CascadingCacheOptions, j as CheckpointAdapter, 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 DictCheckpointAdapter, v as DistillOptions, w as DrizzleQueryLike, x as ErrorMessage, y as EventTargetLike, z as ExponentialBackoffOptions, F as FSEvent, G as FSEventType, H as FileCheckpointAdapter, I as FileWriterLike, J as FromCSVOptions, K as FromClickHouseWatchOptions, L as FromCronOptions, M as FromDrizzleOptions, O as FromFSWatchOptions, P as FromGitHookOptions, Q as FromHTTPOptions, R as FromKafkaOptions, S as FromKyselyOptions, T as FromMCPOptions, U as FromNATSOptions, V as FromNDJSONOptions, W as FromOTelOptions, X as FromPrismaOptions, Y as FromPrometheusOptions, Z as FromPulsarOptions, _ as FromRabbitMQOptions, $ as FromRedisStreamOptions, a0 as FromSqliteOptions, a1 as FromStatsDOptions, a2 as FromSyslogOptions, a3 as GitEvent, a4 as GitHookType, a5 as HTTPBundle, a6 as IndexRow, a7 as IndexedDbCheckpointSpec, a8 as InitMessage, a9 as JitterMode, aa as KafkaConsumerLike, ab as KafkaMessage, ac as KafkaProducerLike, ad as KyselyQueryLike, ae as LokiClientLike, af as LokiStream, ag as MCPClientLike, ah as MemoryCheckpointAdapter, ai as MergeMapOptions, aj as MongoCollectionLike, ak as NATSClientLike, al as NATSMessage, am as NATSSubscriptionLike, an as NS_PER_MS, ao as NS_PER_SEC, ap as OTelBundle, aq as OTelLog, ar as OTelMetric, as as OTelRegister, at as OTelSpan, au as PostgresClientLike, av as PrismaModelLike, aw as PrometheusMetric, ax as PubSubHub, ay as PulsarConsumerLike, az as PulsarMessage, aA as PulsarProducerLike, aB as RabbitMQChannelLike, aC as RabbitMQMessage, aD as ReactiveIndexBundle, aE as ReactiveIndexOptions, aF as ReactiveListBundle, aG as ReactiveListOptions, aH as ReactiveLogBundle, aI as ReactiveLogOptions, aJ as ReactiveMapBundle, aK as ReactiveMapOptions, aL as ReadyMessage, aM as RedisCheckpointClientLike, aN as RedisClientLike, aO as RedisStreamEntry, aP as RetryOptions, aQ as S3ClientLike, aR as SignalMessage, aS as SinkHandle, aT as SinkTransportError, aU as SqliteCheckpointAdapter, aV as SqliteDbLike, aW as StatsDMetric, aX as StatsDRegister, aY as StatusValue, aZ as SyslogMessage, a_ as SyslogRegister, a$ as TapObserver, b0 as TempoClientLike, b1 as ThrottleOptions, b2 as TieredStorage, b3 as TieredStorageOptions, b4 as TimeoutError, b5 as ToCSVOptions, b6 as ToClickHouseOptions, b7 as ToFileOptions, b8 as ToKafkaOptions, b9 as ToLokiOptions, ba as ToMongoOptions, bb as ToNATSOptions, bc as ToPostgresOptions, bd as ToPulsarOptions, be as ToRabbitMQOptions, bf as ToRedisStreamOptions, bg as ToS3Options, bh as ToSSEOptions, bi as ToSqliteOptions, bj as ToTempoOptions, bk as ToWebSocketOptions, bl as ToWebSocketTransportError, bm as TokenBucket, bn as ValueMessage, bo as VerifiableBundle, bp as VerifiableOptions, bq as VerifyValue, br as WatermarkController, bs as WatermarkOptions, bt as WebSocketLike, bu as WebSocketMessageEventLike, bv as WebSocketRegister, bw as WebhookRegister, bx as WithBreakerBundle, by as WithStatusBundle, bz as WorkerBridge, bA as WorkerBridgeOptions, bB as WorkerSelfHandle, bC as WorkerSelfOptions, bD as WorkerTransport, bE as audit, bF as buffer, bG as bufferCount, bH as bufferTime, bI as cache, bJ as cached, bK as cascadingCache, bL as catchError, bM as checkpointNodeValue, bN as checkpointToRedis, bO as checkpointToS3, bP as circuitBreaker, bQ as combine, bR as combineLatest, bS as concat, bT as concatMap, bU as constant, bV as createTransport, bW as createWatermarkController, bX as debounce, bY as debounceTime, bZ as decorrelatedJitter, b_ as delay, b$ as deserializeError, c0 as distill, c1 as distinctUntilChanged, c2 as elementAt, c3 as empty, c4 as escapeRegexChar, c5 as exhaustMap, c6 as exponential, c7 as extra, c8 as fallback, c9 as fibonacci, ca as filter, cb as find, cc as first, cd as firstValueFrom, ce as flatMap, cf as forEach, cg as fromAny, ch as fromAsyncIter, ci as fromCSV, cj as fromClickHouseWatch, ck as fromCron, cl as fromDrizzle, cm as fromEvent, cn as fromFSWatch, co as fromGitHook, cp as fromHTTP, cq as fromIDBRequest, cr as fromIDBTransaction, cs as fromIter, ct as fromKafka, cu as fromKysely, cv as fromMCP, cw as fromNATS, cx as fromNDJSON, cy as fromOTel, cz as fromPrisma, cA as fromPrometheus, cB as fromPromise, cC as fromPulsar, cD as fromRabbitMQ, cE as fromRedisStream, cF as fromSqlite, cG as fromStatsD, cH as fromSyslog, cI as fromTimer, cJ as fromWebSocket, cK as fromWebhook, cL as globToRegExp, cM as interval, cN as last, cO as linear, cP as logSlice, cQ as lru, cR as map, cS as matchesAnyPattern, cT as matchesCron, cU as merge, cV as mergeMap, cW as nameToSignal, cX as never, cY as of, cZ as pairwise, c_ as parseCron, c$ as parsePrometheusText, d0 as parseStatsD, d1 as parseSyslog, d2 as pausable, d3 as pubsub, d4 as race, d5 as rateLimiter, d6 as reactiveIndex, d7 as reactiveList, d8 as reactiveLog, d9 as reactiveMap, da as reduce, db as repeat, dc as replay, dd as rescue, de as resolveBackoffPreset, df as restoreGraphCheckpoint, dg as restoreGraphCheckpointIndexedDb, dh as retry, di as sample, dj as saveGraphCheckpoint, dk as saveGraphCheckpointIndexedDb, dl as scan, dm as serializeError, dn as share, dp as shareReplay, dq as signalToName, dr as skip, ds as startWith, dt as switchMap, du as take, dv as takeUntil, dw as takeWhile, dx as tap, dy as throttle, dz as throttleTime, dA as throwError, dB as tieredStorage, dC as timeout, dD as toArray, dE as toCSV, dF as toClickHouse, dG as toFile, dH as toKafka, dI as toLoki, dJ as toMongo, dK as toNATS, dL as toPostgres, dM as toPulsar, dN as toRabbitMQ, dO as toRedisStream, dP as toS3, dQ as toSSE, dR as toSqlite, dS as toTempo, dT as toWebSocket, dU as tokenBucket, dV as tokenTracker, dW as valve, dX as verifiable, dY as window, dZ as windowCount, d_ as windowTime, d$ as withBreaker, e0 as withLatestFrom, e1 as withMaxAttempts, e2 as withStatus, e3 as workerBridge, e4 as workerSelf, e5 as zip } from './index-N704txAA.js';
|
|
10
|
-
|
|
10
|
+
import { G as GraphProfileResult, a as GraphProfileOptions } from './index-D7y9Q8W4.js';
|
|
11
|
+
export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, b as EvictionPolicy, c as GraphCodec, J as JsonCodec, L as LazyGraphCodec, N as NodeProfile, W as WALEntry, d as createDagCborCodec, e as createDagCborZstdCodec, i as graph, g as graphProfile, n as negotiateCodec, r as replayWAL, s as sizeof } from './index-D7y9Q8W4.js';
|
|
11
12
|
import { M as MeasurementAdapter, i as index$c } from './index-DhXznWyH.js';
|
|
12
13
|
export { o as observeGraph$, a as observeNode$, t as toMessages$, b as toObservable } from './observable-DCqlwGyl.js';
|
|
13
14
|
import '@nestjs/common';
|
|
@@ -2056,6 +2057,8 @@ type RootCause = "composition" | "missing-fn" | "bad-docs" | "schema-gap" | "reg
|
|
|
2056
2057
|
type Intervention = "template" | "catalog-fn" | "docs" | "wrapper" | "schema-change" | "investigate";
|
|
2057
2058
|
/** Routing destinations after triage. */
|
|
2058
2059
|
type QueueRoute = "auto-fix" | "needs-decision" | "investigation" | "backlog";
|
|
2060
|
+
/** Ordered queue route names for iteration. */
|
|
2061
|
+
declare const QUEUE_NAMES: readonly QueueRoute[];
|
|
2059
2062
|
/**
|
|
2060
2063
|
* An item entering the harness loop via the INTAKE stage.
|
|
2061
2064
|
*
|
|
@@ -2070,6 +2073,8 @@ interface IntakeItem {
|
|
|
2070
2073
|
affectsEvalTasks?: string[];
|
|
2071
2074
|
severity?: Severity;
|
|
2072
2075
|
relatedTo?: string[];
|
|
2076
|
+
/** Item-carried reingestion count. Incremented on each full-loop reingestion. */
|
|
2077
|
+
_reingestions?: number;
|
|
2073
2078
|
}
|
|
2074
2079
|
/** Output of the TRIAGE stage — enriched intake item with classification. */
|
|
2075
2080
|
interface TriagedItem extends IntakeItem {
|
|
@@ -2078,6 +2083,8 @@ interface TriagedItem extends IntakeItem {
|
|
|
2078
2083
|
route: QueueRoute;
|
|
2079
2084
|
priority: number;
|
|
2080
2085
|
triageReasoning?: string;
|
|
2086
|
+
/** Item-carried retry count. Incremented on each fast-retry pass. */
|
|
2087
|
+
_retries?: number;
|
|
2081
2088
|
}
|
|
2082
2089
|
/** Effectiveness record for a rootCause→intervention pair. */
|
|
2083
2090
|
interface StrategyEntry {
|
|
@@ -2159,8 +2166,12 @@ interface HarnessLoopOptions {
|
|
|
2159
2166
|
errorClassifier?: ErrorClassifier;
|
|
2160
2167
|
/** Max fast-retries per item before routing to full intake (default 2). */
|
|
2161
2168
|
maxRetries?: number;
|
|
2169
|
+
/** Global retry cap across all items — circuit breaker (default maxRetries × 10). */
|
|
2170
|
+
maxTotalRetries?: number;
|
|
2162
2171
|
/** Max re-ingestions from verify→intake before giving up (default 1). */
|
|
2163
2172
|
maxReingestions?: number;
|
|
2173
|
+
/** Global reingestion cap across all items — circuit breaker (default maxReingestions × 10). */
|
|
2174
|
+
maxTotalReingestions?: number;
|
|
2164
2175
|
/** Retained limit for topic logs (default 1000). */
|
|
2165
2176
|
retainedLimit?: number;
|
|
2166
2177
|
}
|
|
@@ -2433,11 +2444,11 @@ declare class HarnessGraph extends Graph {
|
|
|
2433
2444
|
readonly strategy: StrategyModelBundle;
|
|
2434
2445
|
/** Verify results topic — subscribe to see verification outcomes. */
|
|
2435
2446
|
readonly verifyResults: TopicGraph<VerifyResult>;
|
|
2436
|
-
/**
|
|
2437
|
-
readonly
|
|
2438
|
-
/**
|
|
2439
|
-
readonly
|
|
2440
|
-
constructor(name: string, intake: TopicGraph<IntakeItem>, queues: Map<QueueRoute, TopicGraph<TriagedItem>>, gates: Map<QueueRoute, GateController<TriagedItem>>, strategy: StrategyModelBundle, verifyResults: TopicGraph<VerifyResult>,
|
|
2447
|
+
/** Global retry count across all items (circuit breaker). Reactive — subscribable. */
|
|
2448
|
+
readonly totalRetries: Node<number>;
|
|
2449
|
+
/** Global reingestion count across all items (circuit breaker). Reactive — subscribable. */
|
|
2450
|
+
readonly totalReingestions: Node<number>;
|
|
2451
|
+
constructor(name: string, intake: TopicGraph<IntakeItem>, queues: Map<QueueRoute, TopicGraph<TriagedItem>>, gates: Map<QueueRoute, GateController<TriagedItem>>, strategy: StrategyModelBundle, verifyResults: TopicGraph<VerifyResult>, totalRetries: Node<number>, totalReingestions: Node<number>);
|
|
2441
2452
|
}
|
|
2442
2453
|
/**
|
|
2443
2454
|
* Wire the reactive collaboration loop as a static-topology graph.
|
|
@@ -2457,6 +2468,35 @@ declare class HarnessGraph extends Graph {
|
|
|
2457
2468
|
*/
|
|
2458
2469
|
declare function harnessLoop(name: string, opts: HarnessLoopOptions): HarnessGraph;
|
|
2459
2470
|
|
|
2471
|
+
/**
|
|
2472
|
+
* Harness-specific graph profiling (roadmap §9.0).
|
|
2473
|
+
*
|
|
2474
|
+
* Extends {@link graphProfile} with harness domain counters:
|
|
2475
|
+
* queue depths, strategy entries, retry/reingestion tracker sizes.
|
|
2476
|
+
*
|
|
2477
|
+
* @module
|
|
2478
|
+
*/
|
|
2479
|
+
|
|
2480
|
+
/** Harness-specific profile extending the base graph profile. */
|
|
2481
|
+
interface HarnessProfileResult extends GraphProfileResult {
|
|
2482
|
+
/** Per-queue retained item counts. */
|
|
2483
|
+
queueDepths: Record<QueueRoute, number>;
|
|
2484
|
+
/** Number of rootCause→intervention entries in the strategy model. */
|
|
2485
|
+
strategyEntries: number;
|
|
2486
|
+
/** Global retry count across all items. */
|
|
2487
|
+
totalRetries: number;
|
|
2488
|
+
/** Global reingestion count across all items. */
|
|
2489
|
+
totalReingestions: number;
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* Profile a harness graph with domain-specific counters.
|
|
2493
|
+
*
|
|
2494
|
+
* @param harness - The HarnessGraph to profile.
|
|
2495
|
+
* @param opts - Optional base profile options.
|
|
2496
|
+
* @returns Harness profile with queue depths, strategy stats, and tracker sizes.
|
|
2497
|
+
*/
|
|
2498
|
+
declare function harnessProfile(harness: HarnessGraph, opts?: GraphProfileOptions): HarnessProfileResult;
|
|
2499
|
+
|
|
2460
2500
|
/**
|
|
2461
2501
|
* Harness wiring (roadmap §9.0).
|
|
2462
2502
|
*
|
|
@@ -2481,10 +2521,12 @@ type index$1_ExecutionResult = ExecutionResult;
|
|
|
2481
2521
|
type index$1_HarnessGraph = HarnessGraph;
|
|
2482
2522
|
declare const index$1_HarnessGraph: typeof HarnessGraph;
|
|
2483
2523
|
type index$1_HarnessLoopOptions = HarnessLoopOptions;
|
|
2524
|
+
type index$1_HarnessProfileResult = HarnessProfileResult;
|
|
2484
2525
|
type index$1_IntakeItem = IntakeItem;
|
|
2485
2526
|
type index$1_IntakeSource = IntakeSource;
|
|
2486
2527
|
type index$1_Intervention = Intervention;
|
|
2487
2528
|
type index$1_PrioritySignals = PrioritySignals;
|
|
2529
|
+
declare const index$1_QUEUE_NAMES: typeof QUEUE_NAMES;
|
|
2488
2530
|
type index$1_QueueConfig = QueueConfig;
|
|
2489
2531
|
type index$1_QueueRoute = QueueRoute;
|
|
2490
2532
|
type index$1_RootCause = RootCause;
|
|
@@ -2498,11 +2540,12 @@ type index$1_VerifyResult = VerifyResult;
|
|
|
2498
2540
|
declare const index$1_defaultErrorClassifier: typeof defaultErrorClassifier;
|
|
2499
2541
|
declare const index$1_evalIntakeBridge: typeof evalIntakeBridge;
|
|
2500
2542
|
declare const index$1_harnessLoop: typeof harnessLoop;
|
|
2543
|
+
declare const index$1_harnessProfile: typeof harnessProfile;
|
|
2501
2544
|
declare const index$1_priorityScore: typeof priorityScore;
|
|
2502
2545
|
declare const index$1_strategyKey: typeof strategyKey;
|
|
2503
2546
|
declare const index$1_strategyModel: typeof strategyModel;
|
|
2504
2547
|
declare namespace index$1 {
|
|
2505
|
-
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_IntakeItem as IntakeItem, type index$1_IntakeSource as IntakeSource, type index$1_Intervention as Intervention, type index$1_PrioritySignals as PrioritySignals, 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_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_harnessLoop as harnessLoop, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
2548
|
+
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_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_TriagedItem as TriagedItem, type index$1_VerifyResult as VerifyResult, index$1_defaultErrorClassifier as defaultErrorClassifier, index$1_evalIntakeBridge as evalIntakeBridge, index$1_harnessLoop as harnessLoop, index$1_harnessProfile as harnessProfile, index$1_priorityScore as priorityScore, index$1_strategyKey as strategyKey, index$1_strategyModel as strategyModel };
|
|
2506
2549
|
}
|
|
2507
2550
|
|
|
2508
2551
|
/**
|
|
@@ -2701,4 +2744,4 @@ declare namespace index {
|
|
|
2701
2744
|
*/
|
|
2702
2745
|
declare const version = "0.0.0";
|
|
2703
2746
|
|
|
2704
|
-
export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, Node, NodeActions, NodeFn, NodeInput, NodeOptions, 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 };
|
|
2747
|
+
export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, GraphProfileOptions, GraphProfileResult, Node, NodeActions, NodeFn, NodeInput, NodeOptions, 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 };
|
package/dist/index.js
CHANGED
|
@@ -137,24 +137,26 @@ import {
|
|
|
137
137
|
workerBridge,
|
|
138
138
|
workerSelf,
|
|
139
139
|
zip
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-2PORF4RP.js";
|
|
141
141
|
import {
|
|
142
142
|
cqrs_exports,
|
|
143
143
|
nestjs_exports
|
|
144
|
-
} from "./chunk-
|
|
145
|
-
import {
|
|
146
|
-
DEFAULT_DOWN,
|
|
147
|
-
bridge,
|
|
148
|
-
core_exports
|
|
149
|
-
} from "./chunk-LKP7IWRV.js";
|
|
144
|
+
} from "./chunk-XJ6EMQ22.js";
|
|
150
145
|
import {
|
|
151
146
|
JsonCodec,
|
|
152
147
|
createDagCborCodec,
|
|
153
148
|
createDagCborZstdCodec,
|
|
149
|
+
graphProfile,
|
|
154
150
|
graph_exports,
|
|
155
151
|
negotiateCodec,
|
|
156
|
-
replayWAL
|
|
157
|
-
|
|
152
|
+
replayWAL,
|
|
153
|
+
sizeof
|
|
154
|
+
} from "./chunk-EBNKJULL.js";
|
|
155
|
+
import {
|
|
156
|
+
DEFAULT_DOWN,
|
|
157
|
+
bridge,
|
|
158
|
+
core_exports
|
|
159
|
+
} from "./chunk-R6OHUUYB.js";
|
|
158
160
|
import {
|
|
159
161
|
cached,
|
|
160
162
|
createWatermarkController,
|
|
@@ -187,7 +189,7 @@ import {
|
|
|
187
189
|
toArray,
|
|
188
190
|
toMessages$,
|
|
189
191
|
toObservable
|
|
190
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-646OG3PO.js";
|
|
191
193
|
import {
|
|
192
194
|
ResettableTimer
|
|
193
195
|
} from "./chunk-WZ2Z2CRV.js";
|
|
@@ -195,17 +197,17 @@ import {
|
|
|
195
197
|
analyzeAndMeasure,
|
|
196
198
|
computeLineBreaks,
|
|
197
199
|
reactive_layout_exports
|
|
198
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-YXROQFXZ.js";
|
|
199
201
|
import {
|
|
200
202
|
GRAPH_META_SEGMENT,
|
|
201
203
|
Graph,
|
|
202
204
|
reachable
|
|
203
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-IHJHBADD.js";
|
|
204
206
|
import {
|
|
205
207
|
describeNode,
|
|
206
208
|
metaSnapshot,
|
|
207
209
|
resolveDescribeFields
|
|
208
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-F2ULI3Q3.js";
|
|
209
211
|
import {
|
|
210
212
|
CLEANUP_RESULT,
|
|
211
213
|
COMPLETE,
|
|
@@ -249,7 +251,7 @@ import {
|
|
|
249
251
|
propagatesToMeta,
|
|
250
252
|
state,
|
|
251
253
|
wallClockNs
|
|
252
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-BV3TPSBK.js";
|
|
253
255
|
|
|
254
256
|
// src/compat/index.ts
|
|
255
257
|
var compat_exports = {};
|
|
@@ -1489,36 +1491,33 @@ function firstDataFromNode(resolved, opts) {
|
|
|
1489
1491
|
}
|
|
1490
1492
|
const timeoutMs = opts?.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
1491
1493
|
return new Promise((resolve, reject) => {
|
|
1492
|
-
|
|
1493
|
-
const cleanup = () => {
|
|
1494
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
1495
|
-
};
|
|
1494
|
+
const timer = new ResettableTimer();
|
|
1496
1495
|
const unsub = resolved.subscribe((messages) => {
|
|
1497
1496
|
for (const msg of messages) {
|
|
1498
1497
|
if (msg[0] === DATA) {
|
|
1499
|
-
|
|
1498
|
+
timer.cancel();
|
|
1500
1499
|
unsub();
|
|
1501
1500
|
resolve(msg[1]);
|
|
1502
1501
|
return;
|
|
1503
1502
|
}
|
|
1504
1503
|
if (msg[0] === ERROR) {
|
|
1505
|
-
|
|
1504
|
+
timer.cancel();
|
|
1506
1505
|
unsub();
|
|
1507
1506
|
reject(msg[1]);
|
|
1508
1507
|
return;
|
|
1509
1508
|
}
|
|
1510
1509
|
if (msg[0] === COMPLETE) {
|
|
1511
|
-
|
|
1510
|
+
timer.cancel();
|
|
1512
1511
|
unsub();
|
|
1513
1512
|
reject(new Error("firstDataFromNode: completed without producing a value"));
|
|
1514
1513
|
return;
|
|
1515
1514
|
}
|
|
1516
1515
|
}
|
|
1517
1516
|
});
|
|
1518
|
-
timer
|
|
1517
|
+
timer.start(timeoutMs, () => {
|
|
1519
1518
|
unsub();
|
|
1520
1519
|
reject(new Error(`firstDataFromNode: timed out after ${timeoutMs}ms`));
|
|
1521
|
-
}
|
|
1520
|
+
});
|
|
1522
1521
|
});
|
|
1523
1522
|
}
|
|
1524
1523
|
async function resolveToolHandlerResult(value) {
|
|
@@ -4884,9 +4883,11 @@ __export(harness_exports, {
|
|
|
4884
4883
|
DEFAULT_QUEUE_CONFIGS: () => DEFAULT_QUEUE_CONFIGS,
|
|
4885
4884
|
DEFAULT_SEVERITY_WEIGHTS: () => DEFAULT_SEVERITY_WEIGHTS,
|
|
4886
4885
|
HarnessGraph: () => HarnessGraph,
|
|
4886
|
+
QUEUE_NAMES: () => QUEUE_NAMES,
|
|
4887
4887
|
defaultErrorClassifier: () => defaultErrorClassifier,
|
|
4888
4888
|
evalIntakeBridge: () => evalIntakeBridge,
|
|
4889
4889
|
harnessLoop: () => harnessLoop,
|
|
4890
|
+
harnessProfile: () => harnessProfile,
|
|
4890
4891
|
priorityScore: () => priorityScore,
|
|
4891
4892
|
strategyKey: () => strategyKey,
|
|
4892
4893
|
strategyModel: () => strategyModel
|
|
@@ -5787,6 +5788,12 @@ function onFailure(graph, name, source, recover, opts) {
|
|
|
5787
5788
|
}
|
|
5788
5789
|
|
|
5789
5790
|
// src/patterns/harness/types.ts
|
|
5791
|
+
var QUEUE_NAMES = [
|
|
5792
|
+
"auto-fix",
|
|
5793
|
+
"needs-decision",
|
|
5794
|
+
"investigation",
|
|
5795
|
+
"backlog"
|
|
5796
|
+
];
|
|
5790
5797
|
function strategyKey(rootCause, intervention) {
|
|
5791
5798
|
return `${rootCause}\u2192${intervention}`;
|
|
5792
5799
|
}
|
|
@@ -5887,8 +5894,8 @@ function priorityScore(item, strategy, lastInteractionNs, urgency, signals) {
|
|
|
5887
5894
|
}
|
|
5888
5895
|
|
|
5889
5896
|
// src/patterns/harness/loop.ts
|
|
5890
|
-
function
|
|
5891
|
-
return
|
|
5897
|
+
function trackingKey(item) {
|
|
5898
|
+
return item.relatedTo?.[0] ?? item.summary;
|
|
5892
5899
|
}
|
|
5893
5900
|
var DEFAULT_TRIAGE_PROMPT = `You are a triage classifier for a reactive collaboration harness.
|
|
5894
5901
|
|
|
@@ -5934,12 +5941,6 @@ Output JSON:
|
|
|
5934
5941
|
"findings": ["<finding1>", ...],
|
|
5935
5942
|
"errorClass": "self-correctable" | "structural" // only if verified=false
|
|
5936
5943
|
}`;
|
|
5937
|
-
var QUEUE_NAMES = [
|
|
5938
|
-
"auto-fix",
|
|
5939
|
-
"needs-decision",
|
|
5940
|
-
"investigation",
|
|
5941
|
-
"backlog"
|
|
5942
|
-
];
|
|
5943
5944
|
var HarnessGraph = class extends Graph {
|
|
5944
5945
|
/** Intake topic — publish items here to enter the loop. */
|
|
5945
5946
|
intake;
|
|
@@ -5951,19 +5952,19 @@ var HarnessGraph = class extends Graph {
|
|
|
5951
5952
|
strategy;
|
|
5952
5953
|
/** Verify results topic — subscribe to see verification outcomes. */
|
|
5953
5954
|
verifyResults;
|
|
5954
|
-
/**
|
|
5955
|
-
|
|
5956
|
-
/**
|
|
5957
|
-
|
|
5958
|
-
constructor(name, intake, queues, gates, strategy, verifyResults,
|
|
5955
|
+
/** Global retry count across all items (circuit breaker). Reactive — subscribable. */
|
|
5956
|
+
totalRetries;
|
|
5957
|
+
/** Global reingestion count across all items (circuit breaker). Reactive — subscribable. */
|
|
5958
|
+
totalReingestions;
|
|
5959
|
+
constructor(name, intake, queues, gates, strategy, verifyResults, totalRetries, totalReingestions) {
|
|
5959
5960
|
super(name);
|
|
5960
5961
|
this.intake = intake;
|
|
5961
5962
|
this.queues = queues;
|
|
5962
5963
|
this.gates = gates;
|
|
5963
5964
|
this.strategy = strategy;
|
|
5964
5965
|
this.verifyResults = verifyResults;
|
|
5965
|
-
this.
|
|
5966
|
-
this.
|
|
5966
|
+
this.totalRetries = totalRetries;
|
|
5967
|
+
this.totalReingestions = totalReingestions;
|
|
5967
5968
|
}
|
|
5968
5969
|
};
|
|
5969
5970
|
function harnessLoop(name, opts) {
|
|
@@ -6005,11 +6006,14 @@ function harnessLoop(name, opts) {
|
|
|
6005
6006
|
for (const route of QUEUE_NAMES) {
|
|
6006
6007
|
queueTopics.set(route, new TopicGraph(`queue/${route}`, { retainedLimit }));
|
|
6007
6008
|
}
|
|
6008
|
-
const
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6009
|
+
const routerInput = withLatestFrom(triageNode, triageInput);
|
|
6010
|
+
const router = effect([routerInput], ([pair]) => {
|
|
6011
|
+
const [classification, triagePair] = pair;
|
|
6012
|
+
if (!classification || !classification.route) return;
|
|
6013
|
+
const intakeItem = triagePair?.[0];
|
|
6014
|
+
const merged = { ...intakeItem, ...classification };
|
|
6015
|
+
const topic2 = queueTopics.get(merged.route);
|
|
6016
|
+
if (topic2) topic2.publish(merged);
|
|
6013
6017
|
});
|
|
6014
6018
|
const routerUnsub = router.subscribe(() => {
|
|
6015
6019
|
});
|
|
@@ -6069,8 +6073,10 @@ function harnessLoop(name, opts) {
|
|
|
6069
6073
|
executeInput
|
|
6070
6074
|
);
|
|
6071
6075
|
const maxReingestions = opts.maxReingestions ?? 1;
|
|
6072
|
-
const
|
|
6073
|
-
const
|
|
6076
|
+
const maxTotalRetries = Math.min(opts.maxTotalRetries ?? maxRetries * 10, 100);
|
|
6077
|
+
const maxTotalReingestions = Math.min(opts.maxTotalReingestions ?? maxReingestions * 10, 100);
|
|
6078
|
+
const totalRetries = state(0);
|
|
6079
|
+
const totalReingestions = state(0);
|
|
6074
6080
|
const fastRetry = effect([verifyContext], ([ctx]) => {
|
|
6075
6081
|
const [[vo, execRaw], item] = ctx;
|
|
6076
6082
|
if (!vo || !item) return;
|
|
@@ -6096,29 +6102,33 @@ function harnessLoop(name, opts) {
|
|
|
6096
6102
|
outcome: "failure",
|
|
6097
6103
|
detail: vr.findings.join("; ")
|
|
6098
6104
|
});
|
|
6099
|
-
const
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6105
|
+
const itemRetries = item._retries ?? 0;
|
|
6106
|
+
if (errClass === "self-correctable" && itemRetries < maxRetries && (totalRetries.get() ?? 0) < maxTotalRetries) {
|
|
6107
|
+
totalRetries.down([[DATA, (totalRetries.get() ?? 0) + 1]]);
|
|
6108
|
+
const key = trackingKey(item);
|
|
6103
6109
|
const retryItem = {
|
|
6104
6110
|
...item,
|
|
6105
|
-
|
|
6111
|
+
_retries: itemRetries + 1,
|
|
6112
|
+
summary: `[RETRY ${itemRetries + 1}/${maxRetries}] ${key} \u2014 Previous attempt failed: ${vr.findings.join("; ")}`,
|
|
6113
|
+
relatedTo: [key]
|
|
6106
6114
|
};
|
|
6107
6115
|
retryTopic.publish(retryItem);
|
|
6108
6116
|
} else {
|
|
6109
6117
|
strategy.record(item.rootCause, item.intervention, false);
|
|
6110
6118
|
verifyResults.publish(vr);
|
|
6111
|
-
const
|
|
6112
|
-
|
|
6113
|
-
|
|
6119
|
+
const key = trackingKey(item);
|
|
6120
|
+
const itemReingestions = item._reingestions ?? 0;
|
|
6121
|
+
if (itemReingestions < maxReingestions && (totalReingestions.get() ?? 0) < maxTotalReingestions) {
|
|
6122
|
+
totalReingestions.down([[DATA, (totalReingestions.get() ?? 0) + 1]]);
|
|
6114
6123
|
intake.publish({
|
|
6115
6124
|
source: "eval",
|
|
6116
|
-
summary: `Verification failed for: ${
|
|
6125
|
+
summary: `Verification failed for: ${key}`,
|
|
6117
6126
|
evidence: vr.findings.join("\n"),
|
|
6118
6127
|
affectsAreas: item.affectsAreas,
|
|
6119
6128
|
affectsEvalTasks: item.affectsEvalTasks,
|
|
6120
6129
|
severity: "high",
|
|
6121
|
-
relatedTo: [
|
|
6130
|
+
relatedTo: [key],
|
|
6131
|
+
_reingestions: itemReingestions + 1
|
|
6122
6132
|
});
|
|
6123
6133
|
}
|
|
6124
6134
|
}
|
|
@@ -6132,8 +6142,8 @@ function harnessLoop(name, opts) {
|
|
|
6132
6142
|
gateControllers,
|
|
6133
6143
|
strategy,
|
|
6134
6144
|
verifyResults,
|
|
6135
|
-
|
|
6136
|
-
|
|
6145
|
+
totalRetries,
|
|
6146
|
+
totalReingestions
|
|
6137
6147
|
);
|
|
6138
6148
|
harness.addDisposer(routerUnsub);
|
|
6139
6149
|
harness.addDisposer(fastRetryUnsub);
|
|
@@ -6148,6 +6158,22 @@ function harnessLoop(name, opts) {
|
|
|
6148
6158
|
return harness;
|
|
6149
6159
|
}
|
|
6150
6160
|
|
|
6161
|
+
// src/patterns/harness/profile.ts
|
|
6162
|
+
function harnessProfile(harness, opts) {
|
|
6163
|
+
const base = graphProfile(harness, opts);
|
|
6164
|
+
const queueDepths = {};
|
|
6165
|
+
for (const [route, topic2] of harness.queues) {
|
|
6166
|
+
queueDepths[route] = topic2.retained().length;
|
|
6167
|
+
}
|
|
6168
|
+
return {
|
|
6169
|
+
...base,
|
|
6170
|
+
queueDepths,
|
|
6171
|
+
strategyEntries: harness.strategy.node.get()?.size ?? 0,
|
|
6172
|
+
totalRetries: harness.totalRetries.get() ?? 0,
|
|
6173
|
+
totalReingestions: harness.totalReingestions.get() ?? 0
|
|
6174
|
+
};
|
|
6175
|
+
}
|
|
6176
|
+
|
|
6151
6177
|
// src/index.ts
|
|
6152
6178
|
var version = "0.0.0";
|
|
6153
6179
|
export {
|
|
@@ -6270,6 +6296,7 @@ export {
|
|
|
6270
6296
|
fromWebhook,
|
|
6271
6297
|
globToRegExp,
|
|
6272
6298
|
graph_exports as graph,
|
|
6299
|
+
graphProfile,
|
|
6273
6300
|
graphspec_exports as graphspec,
|
|
6274
6301
|
harness_exports as harness,
|
|
6275
6302
|
interval,
|
|
@@ -6348,6 +6375,7 @@ export {
|
|
|
6348
6375
|
shareReplay,
|
|
6349
6376
|
signalToName,
|
|
6350
6377
|
signals_exports as signals,
|
|
6378
|
+
sizeof,
|
|
6351
6379
|
skip,
|
|
6352
6380
|
solid_exports as solid,
|
|
6353
6381
|
startWith,
|