@graphrefly/graphrefly 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-HA6QMDKQ.js → chunk-2ZICUAUJ.js} +4 -4
  3. package/dist/{chunk-H4UFM6WD.js → chunk-4APC3AFN.js} +3 -3
  4. package/dist/{chunk-UQI4GAHD.js → chunk-CRACCCJY.js} +3 -3
  5. package/dist/{chunk-UPC5OEB5.js → chunk-GKRKDYNT.js} +3 -3
  6. package/dist/{chunk-6B2ZCCNN.js → chunk-H243FWYP.js} +12 -13
  7. package/dist/chunk-H243FWYP.js.map +1 -0
  8. package/dist/{chunk-KNGOJEYP.js → chunk-QVYZD65U.js} +2 -2
  9. package/dist/{chunk-PFMXKG4Y.js → chunk-XQ4UMAU7.js} +2 -2
  10. package/dist/{chunk-5RN7NBNG.js → chunk-YW6LFCFS.js} +3 -3
  11. package/dist/{chunk-QOGWU5K7.js → chunk-ZHTHUX5D.js} +3 -3
  12. package/dist/compat/nestjs/index.cjs +11 -12
  13. package/dist/compat/nestjs/index.cjs.map +1 -1
  14. package/dist/compat/nestjs/index.js +7 -7
  15. package/dist/core/index.cjs +11 -12
  16. package/dist/core/index.cjs.map +1 -1
  17. package/dist/core/index.js +3 -3
  18. package/dist/extra/index.cjs +11 -12
  19. package/dist/extra/index.cjs.map +1 -1
  20. package/dist/extra/index.js +3 -3
  21. package/dist/graph/index.cjs +3 -0
  22. package/dist/graph/index.cjs.map +1 -1
  23. package/dist/graph/index.js +4 -4
  24. package/dist/index.cjs +425 -12
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +368 -56
  27. package/dist/index.d.ts +368 -56
  28. package/dist/index.js +426 -13
  29. package/dist/index.js.map +1 -1
  30. package/dist/patterns/reactive-layout/index.cjs +3 -0
  31. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  32. package/dist/patterns/reactive-layout/index.js +4 -4
  33. package/package.json +5 -2
  34. package/dist/chunk-6B2ZCCNN.js.map +0 -1
  35. /package/dist/{chunk-HA6QMDKQ.js.map → chunk-2ZICUAUJ.js.map} +0 -0
  36. /package/dist/{chunk-H4UFM6WD.js.map → chunk-4APC3AFN.js.map} +0 -0
  37. /package/dist/{chunk-UQI4GAHD.js.map → chunk-CRACCCJY.js.map} +0 -0
  38. /package/dist/{chunk-UPC5OEB5.js.map → chunk-GKRKDYNT.js.map} +0 -0
  39. /package/dist/{chunk-KNGOJEYP.js.map → chunk-QVYZD65U.js.map} +0 -0
  40. /package/dist/{chunk-PFMXKG4Y.js.map → chunk-XQ4UMAU7.js.map} +0 -0
  41. /package/dist/{chunk-5RN7NBNG.js.map → chunk-YW6LFCFS.js.map} +0 -0
  42. /package/dist/{chunk-QOGWU5K7.js.map → chunk-ZHTHUX5D.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { N as Node, A as Actor, a as NodeOptions, b as NodeActions, c as NodeFn } from './meta-CrZUQAJ6.js';
2
2
  export { C as CLEANUP_RESULT, d as COMPLETE, e as CleanupResult, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DescribeDetail, i as DescribeField, j as DescribeNodeOutput, E as ERROR, G as GuardAction, k as GuardDenied, l as GuardDeniedDetails, H as HashFn, I as INVALIDATE, M as Message, m as Messages, n as NodeDescribeKind, o as NodeGuard, p as NodeSink, q as NodeStatus, r as NodeTransportOptions, s as NodeVersionInfo, O as OnMessageHandler, P as PAUSE, t as PolicyAllow, u as PolicyDeny, v as PolicyRuleData, R as RESOLVED, w as RESUME, S as SubscribeHints, T as TEARDOWN, V as V0, x as V1, y as VersioningLevel, z as VersioningOptions, B as accessHintForGuard, F as advanceVersion, J as cleanupResult, K as createVersioning, L as defaultHash, Q as describeNode, U as isKnownMessageType, W as isPhase2Message, X as isTerminalMessage, Y as isV1, Z as knownMessageTypes, _ as messageTier, $ as metaSnapshot, a0 as node, a1 as normalizeActor, a2 as policy, a3 as policyFromRules, a4 as propagatesToMeta, a5 as resolveDescribeFields } from './meta-CrZUQAJ6.js';
3
- import { i as index$a, c as cqrs } from './index-DSp5R3Xq.js';
3
+ import { i as index$b, c as cqrs } from './index-DSp5R3Xq.js';
4
4
  import { Ref, WatchSource } from 'vue';
5
5
  import { G as Graph, a as GraphOptions, b as GraphAutoCheckpointHandle, A as AutoCheckpointAdapter, c as GraphAutoCheckpointOptions } from './graph-BXIK5Dq5.js';
6
6
  export { D as DescribeFilter, d as GRAPH_META_SEGMENT, e as GraphActorOptions, f as GraphCheckpointRecord, g as GraphDescribeOptions, h as GraphDescribeOutput, i as GraphDiagramDirection, j as GraphDiagramOptions, k as GraphDiffChange, l as GraphDiffResult, m as GraphDumpOptions, n as GraphFactoryContext, o as GraphNodeFactory, p as GraphObserveAll, q as GraphObserveOne, r as GraphPersistSnapshot, s as GraphSpyHandle, t as GraphSpyOptions, u as GraphSpyTheme, v as GraphSpyThemeName, O as ObserveDetail, w as ObserveEvent, x as ObserveOptions, y as ObserveResult, R as ReachableDirection, z as ReachableOptions, T as TraceEntry, B as reachable } from './graph-BXIK5Dq5.js';
@@ -10,7 +10,7 @@ export { A as AdapterHandlers, b as AsyncSourceOpts, B as BackoffPreset, c as Ba
10
10
  export { D as DeltaCheckpoint, E as EvictedSubgraphInfo, a as EvictionPolicy, G as GraphCodec, J as JsonCodec, L as LazyGraphCodec, W as WALEntry, c as createDagCborCodec, b as createDagCborZstdCodec, i as graph, n as negotiateCodec, r as replayWAL } from './index-BkToATim.js';
11
11
  import { R as ReactiveLogSnapshot } from './reactive-log-DV--7BWd.js';
12
12
  export { a as ReactiveLogBundle, b as ReactiveLogOptions, l as logSlice, o as observeGraph$, c as observeNode$, r as reactiveLog, t as toMessages$, d as toObservable } from './reactive-log-DV--7BWd.js';
13
- import { M as MeasurementAdapter, i as index$b } from './index-fYObbpUw.js';
13
+ import { M as MeasurementAdapter, i as index$c } from './index-fYObbpUw.js';
14
14
  import '@nestjs/common';
15
15
  import '@nestjs/core';
16
16
  import 'rxjs';
@@ -86,15 +86,15 @@ declare function atom$1<T>(initial: T, options?: AtomOptions): WritableAtom<T>;
86
86
  declare function atom$1<T>(read: ReadFn<T>, options?: AtomOptions): ReadableAtom<T>;
87
87
  declare function atom$1<T>(read: ReadFn<T>, write: WriteFn<T>, options?: AtomOptions): WritableAtom<T>;
88
88
 
89
- type index$9_AtomOptions = AtomOptions;
90
- type index$9_GetFn = GetFn;
91
- type index$9_ReadFn<T> = ReadFn<T>;
92
- type index$9_ReadableAtom<T> = ReadableAtom<T>;
93
- type index$9_SetFn = SetFn;
94
- type index$9_WritableAtom<T> = WritableAtom<T>;
95
- type index$9_WriteFn<T> = WriteFn<T>;
96
- declare namespace index$9 {
97
- export { type index$9_AtomOptions as AtomOptions, type index$9_GetFn as GetFn, type index$9_ReadFn as ReadFn, type index$9_ReadableAtom as ReadableAtom, type index$9_SetFn as SetFn, type index$9_WritableAtom as WritableAtom, type index$9_WriteFn as WriteFn, atom$1 as atom };
89
+ type index$a_AtomOptions = AtomOptions;
90
+ type index$a_GetFn = GetFn;
91
+ type index$a_ReadFn<T> = ReadFn<T>;
92
+ type index$a_ReadableAtom<T> = ReadableAtom<T>;
93
+ type index$a_SetFn = SetFn;
94
+ type index$a_WritableAtom<T> = WritableAtom<T>;
95
+ type index$a_WriteFn<T> = WriteFn<T>;
96
+ declare namespace index$a {
97
+ export { type index$a_AtomOptions as AtomOptions, type index$a_GetFn as GetFn, type index$a_ReadFn as ReadFn, type index$a_ReadableAtom as ReadableAtom, type index$a_SetFn as SetFn, type index$a_WritableAtom as WritableAtom, type index$a_WriteFn as WriteFn, atom$1 as atom };
98
98
  }
99
99
 
100
100
  /**
@@ -206,19 +206,19 @@ declare function onMount(store: NanoAtom<any> | NanoComputed<any>, cb: () => (()
206
206
  */
207
207
  declare function action<Args extends any[], Return>(_store: NanoAtom<any> | NanoComputed<any>, _name: string, fn: (...args: Args) => Return): (...args: Args) => Return;
208
208
 
209
- type index$8_NanoAtom<T> = NanoAtom<T>;
210
- type index$8_NanoComputed<T> = NanoComputed<T>;
211
- type index$8_NanoMap<T extends Record<string, unknown>> = NanoMap<T>;
212
- declare const index$8_action: typeof action;
213
- declare const index$8_atom: typeof atom;
214
- declare const index$8_computed: typeof computed;
215
- declare const index$8_getValue: typeof getValue;
216
- declare const index$8_map: typeof map;
217
- declare const index$8_onMount: typeof onMount;
218
- declare const index$8_onStart: typeof onStart;
219
- declare const index$8_onStop: typeof onStop;
220
- declare namespace index$8 {
221
- export { type index$8_NanoAtom as NanoAtom, type index$8_NanoComputed as NanoComputed, type index$8_NanoMap as NanoMap, index$8_action as action, index$8_atom as atom, index$8_computed as computed, index$8_getValue as getValue, index$8_map as map, index$8_onMount as onMount, index$8_onStart as onStart, index$8_onStop as onStop };
209
+ type index$9_NanoAtom<T> = NanoAtom<T>;
210
+ type index$9_NanoComputed<T> = NanoComputed<T>;
211
+ type index$9_NanoMap<T extends Record<string, unknown>> = NanoMap<T>;
212
+ declare const index$9_action: typeof action;
213
+ declare const index$9_atom: typeof atom;
214
+ declare const index$9_computed: typeof computed;
215
+ declare const index$9_getValue: typeof getValue;
216
+ declare const index$9_map: typeof map;
217
+ declare const index$9_onMount: typeof onMount;
218
+ declare const index$9_onStart: typeof onStart;
219
+ declare const index$9_onStop: typeof onStop;
220
+ declare namespace index$9 {
221
+ export { type index$9_NanoAtom as NanoAtom, type index$9_NanoComputed as NanoComputed, type index$9_NanoMap as NanoMap, index$9_action as action, index$9_atom as atom, index$9_computed as computed, index$9_getValue as getValue, index$9_map as map, index$9_onMount as onMount, index$9_onStart as onStart, index$9_onStop as onStop };
222
222
  }
223
223
 
224
224
  /**
@@ -254,7 +254,7 @@ type NodeFactory$3<K, R extends Record<string, any>> = (key: K) => {
254
254
  */
255
255
  declare function useSubscribeRecord$3<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory$3<K, R>): Record<K, R>;
256
256
 
257
- declare namespace index$7 {
257
+ declare namespace index$8 {
258
258
  export { type NodeFactory$3 as NodeFactory, useStore$3 as useStore, useSubscribe$3 as useSubscribe, useSubscribeRecord$3 as useSubscribeRecord };
259
259
  }
260
260
 
@@ -343,15 +343,15 @@ declare const Signal: {
343
343
  }) => (() => void);
344
344
  };
345
345
 
346
- type index$6_AnySignal<T> = AnySignal<T>;
347
- declare const index$6_Signal: typeof Signal;
348
- type index$6_SignalComputed<T> = SignalComputed<T>;
349
- declare const index$6_SignalComputed: typeof SignalComputed;
350
- type index$6_SignalOptions = SignalOptions;
351
- type index$6_SignalState<T> = SignalState<T>;
352
- declare const index$6_SignalState: typeof SignalState;
353
- declare namespace index$6 {
354
- export { type index$6_AnySignal as AnySignal, index$6_Signal as Signal, index$6_SignalComputed as SignalComputed, type index$6_SignalOptions as SignalOptions, index$6_SignalState as SignalState };
346
+ type index$7_AnySignal<T> = AnySignal<T>;
347
+ declare const index$7_Signal: typeof Signal;
348
+ type index$7_SignalComputed<T> = SignalComputed<T>;
349
+ declare const index$7_SignalComputed: typeof SignalComputed;
350
+ type index$7_SignalOptions = SignalOptions;
351
+ type index$7_SignalState<T> = SignalState<T>;
352
+ declare const index$7_SignalState: typeof SignalState;
353
+ declare namespace index$7 {
354
+ export { type index$7_AnySignal as AnySignal, index$7_Signal as Signal, index$7_SignalComputed as SignalComputed, type index$7_SignalOptions as SignalOptions, index$7_SignalState as SignalState };
355
355
  }
356
356
 
357
357
  /** Solid accessor function — returns current value when called. */
@@ -378,9 +378,9 @@ type NodeFactory$2<K, R extends Record<string, any>> = (key: K) => {
378
378
  */
379
379
  declare function useSubscribeRecord$2<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory$2<K, R>): Accessor<Record<K, R>>;
380
380
 
381
- type index$5_Accessor<T> = Accessor<T>;
382
- declare namespace index$5 {
383
- export { type index$5_Accessor as Accessor, type NodeFactory$2 as NodeFactory, useStore$2 as useStore, useSubscribe$2 as useSubscribe, useSubscribeRecord$2 as useSubscribeRecord };
381
+ type index$6_Accessor<T> = Accessor<T>;
382
+ declare namespace index$6 {
383
+ export { type index$6_Accessor as Accessor, type NodeFactory$2 as NodeFactory, useStore$2 as useStore, useSubscribe$2 as useSubscribe, useSubscribeRecord$2 as useSubscribeRecord };
384
384
  }
385
385
 
386
386
  /** Svelte store contract — implements the minimal `subscribe` method. */
@@ -415,10 +415,10 @@ type NodeFactory$1<K, R extends Record<string, any>> = (key: K) => {
415
415
  */
416
416
  declare function useSubscribeRecord$1<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory$1<K, R>): SvelteReadable<Record<K, R>>;
417
417
 
418
- type index$4_SvelteReadable<T> = SvelteReadable<T>;
419
- type index$4_SvelteWritable<T> = SvelteWritable<T>;
420
- declare namespace index$4 {
421
- export { type NodeFactory$1 as NodeFactory, type index$4_SvelteReadable as SvelteReadable, type index$4_SvelteWritable as SvelteWritable, useStore$1 as useStore, useSubscribe$1 as useSubscribe, useSubscribeRecord$1 as useSubscribeRecord };
418
+ type index$5_SvelteReadable<T> = SvelteReadable<T>;
419
+ type index$5_SvelteWritable<T> = SvelteWritable<T>;
420
+ declare namespace index$5 {
421
+ export { type NodeFactory$1 as NodeFactory, type index$5_SvelteReadable as SvelteReadable, type index$5_SvelteWritable as SvelteWritable, useStore$1 as useStore, useSubscribe$1 as useSubscribe, useSubscribeRecord$1 as useSubscribeRecord };
422
422
  }
423
423
 
424
424
  /**
@@ -443,12 +443,12 @@ type NodeFactory<K, R extends Record<string, any>> = (key: K) => {
443
443
  */
444
444
  declare function useSubscribeRecord<K extends string, R extends Record<string, any>>(keys: WatchSource<K[] | undefined>, factory: NodeFactory<K, R>): Readonly<Ref<Record<K, R>>>;
445
445
 
446
- type index$3_NodeFactory<K, R extends Record<string, any>> = NodeFactory<K, R>;
447
- declare const index$3_useStore: typeof useStore;
448
- declare const index$3_useSubscribe: typeof useSubscribe;
449
- declare const index$3_useSubscribeRecord: typeof useSubscribeRecord;
450
- declare namespace index$3 {
451
- export { type index$3_NodeFactory as NodeFactory, index$3_useStore as useStore, index$3_useSubscribe as useSubscribe, index$3_useSubscribeRecord as useSubscribeRecord };
446
+ type index$4_NodeFactory<K, R extends Record<string, any>> = NodeFactory<K, R>;
447
+ declare const index$4_useStore: typeof useStore;
448
+ declare const index$4_useSubscribe: typeof useSubscribe;
449
+ declare const index$4_useSubscribeRecord: typeof useSubscribeRecord;
450
+ declare namespace index$4 {
451
+ export { type index$4_NodeFactory as NodeFactory, index$4_useStore as useStore, index$4_useSubscribe as useSubscribe, index$4_useSubscribeRecord as useSubscribeRecord };
452
452
  }
453
453
 
454
454
  /** Zustand-compatible Store API. */
@@ -478,11 +478,11 @@ type StateCreator<T> = (set: StoreApi<T>["setState"], get: StoreApi<T>["getState
478
478
  */
479
479
  declare function create<T extends object>(initializer: StateCreator<T>): Graph & StoreApi<T>;
480
480
 
481
- type index$2_StateCreator<T> = StateCreator<T>;
482
- type index$2_StoreApi<T> = StoreApi<T>;
483
- declare const index$2_create: typeof create;
484
- declare namespace index$2 {
485
- export { type index$2_StateCreator as StateCreator, type index$2_StoreApi as StoreApi, index$2_create as create };
481
+ type index$3_StateCreator<T> = StateCreator<T>;
482
+ type index$3_StoreApi<T> = StoreApi<T>;
483
+ declare const index$3_create: typeof create;
484
+ declare namespace index$3 {
485
+ export { type index$3_StateCreator as StateCreator, type index$3_StoreApi as StoreApi, index$3_create as create };
486
486
  }
487
487
 
488
488
  /**
@@ -495,8 +495,8 @@ declare namespace index$2 {
495
495
  * - `@graphrefly/graphrefly-ts/compat/solid` -> `solid-js`
496
496
  */
497
497
 
498
- declare namespace index$1 {
499
- export { index$9 as jotai, index$8 as nanostores, index$a as nestjs, index$7 as react, index$6 as signals, index$5 as solid, index$4 as svelte, index$3 as vue, index$2 as zustand };
498
+ declare namespace index$2 {
499
+ export { index$a as jotai, index$9 as nanostores, index$b as nestjs, index$8 as react, index$7 as signals, index$6 as solid, index$5 as svelte, index$4 as vue, index$3 as zustand };
500
500
  }
501
501
 
502
502
  /**
@@ -2052,6 +2052,184 @@ declare namespace messaging {
2052
2052
  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 };
2053
2053
  }
2054
2054
 
2055
+ /**
2056
+ * Harness wiring types (roadmap §9.0).
2057
+ *
2058
+ * Shared types for the reactive collaboration loop: intake, triage, queue,
2059
+ * gate, execute, verify, reflect. These types are intentionally domain-agnostic
2060
+ * — the harness loop is not specific to eval workflows.
2061
+ *
2062
+ * @module
2063
+ */
2064
+ /** Sources that can produce intake items. */
2065
+ type IntakeSource = "eval" | "test" | "human" | "code-change" | "hypothesis" | "parity";
2066
+ /** Severity levels for intake items. */
2067
+ type Severity = "critical" | "high" | "medium" | "low";
2068
+ /** Root cause categories for triage classification. */
2069
+ type RootCause = "composition" | "missing-fn" | "bad-docs" | "schema-gap" | "regression" | "unknown";
2070
+ /** Intervention types that address root causes. */
2071
+ type Intervention = "template" | "catalog-fn" | "docs" | "wrapper" | "schema-change" | "investigate";
2072
+ /** Routing destinations after triage. */
2073
+ type QueueRoute = "auto-fix" | "needs-decision" | "investigation" | "backlog";
2074
+ /**
2075
+ * An item entering the harness loop via the INTAKE stage.
2076
+ *
2077
+ * All intake sources produce this uniform shape — the intake topic
2078
+ * doesn't care where items came from.
2079
+ */
2080
+ interface IntakeItem {
2081
+ source: IntakeSource;
2082
+ summary: string;
2083
+ evidence: string;
2084
+ affectsAreas: string[];
2085
+ affectsEvalTasks?: string[];
2086
+ severity?: Severity;
2087
+ relatedTo?: string[];
2088
+ }
2089
+ /** Output of the TRIAGE stage — enriched intake item with classification. */
2090
+ interface TriagedItem extends IntakeItem {
2091
+ rootCause: RootCause;
2092
+ intervention: Intervention;
2093
+ route: QueueRoute;
2094
+ priority: number;
2095
+ triageReasoning?: string;
2096
+ }
2097
+ /** Effectiveness record for a rootCause→intervention pair. */
2098
+ interface StrategyEntry {
2099
+ rootCause: RootCause;
2100
+ intervention: Intervention;
2101
+ attempts: number;
2102
+ successes: number;
2103
+ successRate: number;
2104
+ }
2105
+ /** Key format: `${rootCause}→${intervention}`. */
2106
+ type StrategyKey = `${RootCause}→${Intervention}`;
2107
+ declare function strategyKey(rootCause: RootCause, intervention: Intervention): StrategyKey;
2108
+ /** LLM output shape from the EXECUTE stage (partial — lacks `item`). */
2109
+ type ExecuteOutput = {
2110
+ outcome: "success" | "failure" | "partial";
2111
+ detail: string;
2112
+ };
2113
+ /** Full execution result assembled downstream (LLM output + context). */
2114
+ interface ExecutionResult {
2115
+ item: TriagedItem;
2116
+ outcome: "success" | "failure" | "partial";
2117
+ detail: string;
2118
+ }
2119
+ /** Whether an error is self-correctable (fast-retry) or structural (full loop). */
2120
+ type ErrorClass = "self-correctable" | "structural";
2121
+ /** Classifier for fast-retry path. */
2122
+ type ErrorClassifier = (result: ExecutionResult) => ErrorClass;
2123
+ /** Default error classifier: parse/config errors are self-correctable. */
2124
+ declare function defaultErrorClassifier(result: ExecutionResult): ErrorClass;
2125
+ /** Result of the VERIFY stage. */
2126
+ interface VerifyResult {
2127
+ item: TriagedItem;
2128
+ execution: ExecutionResult;
2129
+ verified: boolean;
2130
+ findings: string[];
2131
+ errorClass?: ErrorClass;
2132
+ }
2133
+ /** Configurable signals for priority scoring. */
2134
+ interface PrioritySignals {
2135
+ /** Per-severity base weight (default: critical=100, high=70, medium=40, low=10). */
2136
+ severityWeights?: Partial<Record<Severity, number>>;
2137
+ /** Decay rate per second for attention decay (default ~1.15e-6 ≈ 7-day half-life). */
2138
+ decayRate?: number;
2139
+ /** Strategy model effectiveness boost threshold (default 0.7). */
2140
+ effectivenessThreshold?: number;
2141
+ /** Strategy model effectiveness boost amount (default 15). */
2142
+ effectivenessBoost?: number;
2143
+ }
2144
+ /** Default severity weights. */
2145
+ declare const DEFAULT_SEVERITY_WEIGHTS: Record<Severity, number>;
2146
+ /** Default decay rate: ~7-day half-life. */
2147
+ declare const DEFAULT_DECAY_RATE: number;
2148
+ /** Per-queue configuration in the harness loop. */
2149
+ interface QueueConfig {
2150
+ /** Whether this queue is gated (requires human approval). */
2151
+ gated: boolean;
2152
+ /** Maximum pending items in the gate (default Infinity). */
2153
+ maxPending?: number;
2154
+ /** Start the gate in open (auto-approve) mode? */
2155
+ startOpen?: boolean;
2156
+ }
2157
+ /** Default queue configurations. */
2158
+ declare const DEFAULT_QUEUE_CONFIGS: Record<QueueRoute, QueueConfig>;
2159
+ /** Options for {@link harnessLoop}. */
2160
+ interface HarnessLoopOptions {
2161
+ /** LLM adapter for promptNode-based stages (triage, execute, verify, reflect). */
2162
+ adapter: unknown;
2163
+ /** Custom triage prompt (receives IntakeItem + strategy model as context). */
2164
+ triagePrompt?: string | ((...args: unknown[]) => string);
2165
+ /** Custom execute prompt. */
2166
+ executePrompt?: string | ((...args: unknown[]) => string);
2167
+ /** Custom verify prompt. */
2168
+ verifyPrompt?: string | ((...args: unknown[]) => string);
2169
+ /** Per-queue configuration overrides. */
2170
+ queues?: Partial<Record<QueueRoute, QueueConfig>>;
2171
+ /** Priority scoring signals. */
2172
+ priority?: PrioritySignals;
2173
+ /** Error classifier for fast-retry path. */
2174
+ errorClassifier?: ErrorClassifier;
2175
+ /** Max fast-retries per item before routing to full intake (default 2). */
2176
+ maxRetries?: number;
2177
+ /** Max re-ingestions from verify→intake before giving up (default 1). */
2178
+ maxReingestions?: number;
2179
+ /** Retained limit for topic logs (default 1000). */
2180
+ retainedLimit?: number;
2181
+ }
2182
+
2183
+ /**
2184
+ * Eval→intake bridge (roadmap §9.0).
2185
+ *
2186
+ * Effect node that parses eval results into IntakeItem[] and publishes
2187
+ * to an intake TopicGraph. Produces per-criterion findings, not per-task scores.
2188
+ *
2189
+ * @module
2190
+ */
2191
+
2192
+ /**
2193
+ * Minimal eval result shape accepted by the bridge.
2194
+ *
2195
+ * TS eval runner uses `EvalRun` from `evals/lib/types.ts` which is a superset
2196
+ * of this shape. The bridge only reads what it needs.
2197
+ */
2198
+ interface EvalResult {
2199
+ run_id: string;
2200
+ model: string;
2201
+ tasks: EvalTaskResult[];
2202
+ }
2203
+ interface EvalTaskResult {
2204
+ task_id: string;
2205
+ valid: boolean;
2206
+ judge_scores?: EvalJudgeScore[];
2207
+ }
2208
+ interface EvalJudgeScore {
2209
+ claim: string;
2210
+ pass: boolean;
2211
+ reasoning: string;
2212
+ }
2213
+ interface EvalIntakeBridgeOptions {
2214
+ /** Name for the effect node (default "eval-intake-bridge"). */
2215
+ name?: string;
2216
+ /** Minimum severity for eval-sourced items (default "medium"). */
2217
+ defaultSeverity?: Severity;
2218
+ }
2219
+ /**
2220
+ * Create an effect node that watches an eval results source and publishes
2221
+ * per-criterion findings to an intake topic.
2222
+ *
2223
+ * Each failing judge criterion produces a separate IntakeItem — not one
2224
+ * item per task. This gives the triage stage granular findings to classify.
2225
+ *
2226
+ * @param evalSource - Node emitting EvalResult (or EvalResult[]).
2227
+ * @param intakeTopic - TopicGraph to publish IntakeItem entries to.
2228
+ * @param opts - Optional configuration.
2229
+ * @returns The effect node (for lifecycle management).
2230
+ */
2231
+ declare function evalIntakeBridge(evalSource: Node<EvalResult | EvalResult[]>, intakeTopic: TopicGraph<IntakeItem>, opts?: EvalIntakeBridgeOptions): Node<unknown>;
2232
+
2055
2233
  /**
2056
2234
  * Orchestration patterns (roadmap §4.1).
2057
2235
  *
@@ -2206,6 +2384,140 @@ declare namespace orchestration {
2206
2384
  export { type orchestration_ApprovalOptions as ApprovalOptions, type orchestration_BranchResult as BranchResult, type orchestration_GateController as GateController, type orchestration_GateOptions as GateOptions, type orchestration_LoopOptions as LoopOptions, type orchestration_OrchestrationStepOptions as OrchestrationStepOptions, type orchestration_SensorControls as SensorControls, type StepRef$1 as StepRef, type orchestration_SubPipelineBuilder as SubPipelineBuilder, type orchestration_WaitOptions as WaitOptions, orchestration_approval as approval, orchestration_branch as branch, orchestration_forEach as forEach, orchestration_gate as gate, orchestration_join as join, orchestration_loop as loop, orchestration_onFailure as onFailure, orchestration_pipeline as pipeline, orchestration_sensor as sensor, orchestration_subPipeline as subPipeline, orchestration_task as task, orchestration_valve as valve, orchestration_wait as wait };
2207
2385
  }
2208
2386
 
2387
+ /**
2388
+ * Strategy model and priority scoring (roadmap §9.0).
2389
+ *
2390
+ * Pure-computation derived nodes — no LLM, no async.
2391
+ *
2392
+ * @module
2393
+ */
2394
+
2395
+ /** Snapshot shape for the strategy model node. */
2396
+ type StrategySnapshot = ReadonlyMap<StrategyKey, StrategyEntry>;
2397
+ /** Bundle returned by {@link strategyModel}. */
2398
+ interface StrategyModelBundle {
2399
+ /** Reactive node — current strategy map. */
2400
+ readonly node: Node<StrategySnapshot>;
2401
+ /** Record a completed issue (success or failure). */
2402
+ record(rootCause: RootCause, intervention: Intervention, success: boolean): void;
2403
+ /** Look up effectiveness for a specific pair. */
2404
+ lookup(rootCause: RootCause, intervention: Intervention): StrategyEntry | undefined;
2405
+ }
2406
+ /**
2407
+ * Create a strategy model that tracks `rootCause × intervention → successRate`
2408
+ * over completed issues. Pure derived computation — no LLM.
2409
+ *
2410
+ * The model feeds back into TRIAGE for routing hints.
2411
+ */
2412
+ declare function strategyModel(): StrategyModelBundle;
2413
+ /**
2414
+ * Create a priority scoring derived node for a single triaged item.
2415
+ *
2416
+ * Combines severity weight, attention decay, strategy model effectiveness,
2417
+ * and an optional external urgency signal.
2418
+ *
2419
+ * @param item - Node holding the triaged item.
2420
+ * @param strategy - Strategy model node.
2421
+ * @param lastInteractionNs - Node holding the monotonic timestamp (ns) of last human interaction.
2422
+ * @param urgency - Optional external urgency signal node (0–1 scale).
2423
+ * @param signals - Configurable scoring parameters.
2424
+ */
2425
+ declare function priorityScore(item: Node<TriagedItem>, strategy: Node<StrategySnapshot>, lastInteractionNs: Node<number>, urgency?: Node<number>, signals?: PrioritySignals): Node<number>;
2426
+
2427
+ /**
2428
+ * harnessLoop() factory (roadmap §9.0).
2429
+ *
2430
+ * Wires the static 7-stage topology: INTAKE → TRIAGE → QUEUE → GATE →
2431
+ * EXECUTE → VERIFY → REFLECT. Static topology, flowing data — the Kafka
2432
+ * insight applied to human+LLM collaboration.
2433
+ *
2434
+ * @module
2435
+ */
2436
+
2437
+ /** The graph returned by {@link harnessLoop}. */
2438
+ declare class HarnessGraph extends Graph {
2439
+ /** Intake topic — publish items here to enter the loop. */
2440
+ readonly intake: TopicGraph<IntakeItem>;
2441
+ /** Per-route queue topics. */
2442
+ readonly queues: ReadonlyMap<QueueRoute, TopicGraph<TriagedItem>>;
2443
+ /** Per-route gate controllers (only for gated queues). */
2444
+ readonly gates: ReadonlyMap<QueueRoute, GateController<TriagedItem>>;
2445
+ /** Strategy model bundle — record outcomes, lookup effectiveness. */
2446
+ readonly strategy: StrategyModelBundle;
2447
+ /** Verify results topic — subscribe to see verification outcomes. */
2448
+ readonly verifyResults: TopicGraph<VerifyResult>;
2449
+ /** Per-item fast-retry counts (keyed by base summary). */
2450
+ readonly retryTracker: ReadonlyMap<string, number>;
2451
+ /** Per-item reingestion counts (keyed by base summary). */
2452
+ readonly reingestionTracker: ReadonlyMap<string, number>;
2453
+ constructor(name: string, intake: TopicGraph<IntakeItem>, queues: Map<QueueRoute, TopicGraph<TriagedItem>>, gates: Map<QueueRoute, GateController<TriagedItem>>, strategy: StrategyModelBundle, verifyResults: TopicGraph<VerifyResult>, retryTracker: Map<string, number>, reingestionTracker: Map<string, number>);
2454
+ }
2455
+ /**
2456
+ * Wire the reactive collaboration loop as a static-topology graph.
2457
+ *
2458
+ * The loop has 7 stages:
2459
+ * 1. **INTAKE** — items arrive from multiple sources via `intake.publish()`
2460
+ * 2. **TRIAGE** — promptNode classifies, routes, and prioritizes
2461
+ * 3. **QUEUE** — 4 priority-ordered TopicGraphs (auto-fix, needs-decision, investigation, backlog)
2462
+ * 4. **GATE** — human approval on configurable queues
2463
+ * 5. **EXECUTE** — promptNode or human implements the fix
2464
+ * 6. **VERIFY** — promptNode reviews + optional fast-retry
2465
+ * 7. **REFLECT** — strategy model records outcomes
2466
+ *
2467
+ * @param name - Graph name.
2468
+ * @param opts - Configuration.
2469
+ * @returns HarnessGraph with controller accessors.
2470
+ */
2471
+ declare function harnessLoop(name: string, opts: HarnessLoopOptions): HarnessGraph;
2472
+
2473
+ /**
2474
+ * Harness wiring (roadmap §9.0).
2475
+ *
2476
+ * Reactive collaboration loop: static-topology, flowing data.
2477
+ * Composes orchestration (gate), AI (promptNode), reduction (scorer/stratify),
2478
+ * and messaging (TopicGraph/bridge) into a 7-stage loop.
2479
+ *
2480
+ * @module
2481
+ */
2482
+
2483
+ declare const index$1_DEFAULT_DECAY_RATE: typeof DEFAULT_DECAY_RATE;
2484
+ declare const index$1_DEFAULT_QUEUE_CONFIGS: typeof DEFAULT_QUEUE_CONFIGS;
2485
+ declare const index$1_DEFAULT_SEVERITY_WEIGHTS: typeof DEFAULT_SEVERITY_WEIGHTS;
2486
+ type index$1_ErrorClass = ErrorClass;
2487
+ type index$1_ErrorClassifier = ErrorClassifier;
2488
+ type index$1_EvalIntakeBridgeOptions = EvalIntakeBridgeOptions;
2489
+ type index$1_EvalJudgeScore = EvalJudgeScore;
2490
+ type index$1_EvalResult = EvalResult;
2491
+ type index$1_EvalTaskResult = EvalTaskResult;
2492
+ type index$1_ExecuteOutput = ExecuteOutput;
2493
+ type index$1_ExecutionResult = ExecutionResult;
2494
+ type index$1_HarnessGraph = HarnessGraph;
2495
+ declare const index$1_HarnessGraph: typeof HarnessGraph;
2496
+ type index$1_HarnessLoopOptions = HarnessLoopOptions;
2497
+ type index$1_IntakeItem = IntakeItem;
2498
+ type index$1_IntakeSource = IntakeSource;
2499
+ type index$1_Intervention = Intervention;
2500
+ type index$1_PrioritySignals = PrioritySignals;
2501
+ type index$1_QueueConfig = QueueConfig;
2502
+ type index$1_QueueRoute = QueueRoute;
2503
+ type index$1_RootCause = RootCause;
2504
+ type index$1_Severity = Severity;
2505
+ type index$1_StrategyEntry = StrategyEntry;
2506
+ type index$1_StrategyKey = StrategyKey;
2507
+ type index$1_StrategyModelBundle = StrategyModelBundle;
2508
+ type index$1_StrategySnapshot = StrategySnapshot;
2509
+ type index$1_TriagedItem = TriagedItem;
2510
+ type index$1_VerifyResult = VerifyResult;
2511
+ declare const index$1_defaultErrorClassifier: typeof defaultErrorClassifier;
2512
+ declare const index$1_evalIntakeBridge: typeof evalIntakeBridge;
2513
+ declare const index$1_harnessLoop: typeof harnessLoop;
2514
+ declare const index$1_priorityScore: typeof priorityScore;
2515
+ declare const index$1_strategyKey: typeof strategyKey;
2516
+ declare const index$1_strategyModel: typeof strategyModel;
2517
+ declare namespace index$1 {
2518
+ 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 };
2519
+ }
2520
+
2209
2521
  /**
2210
2522
  * Reduction primitives (roadmap §8.1).
2211
2523
  *
@@ -2394,7 +2706,7 @@ declare const index_messaging: typeof messaging;
2394
2706
  declare const index_orchestration: typeof orchestration;
2395
2707
  declare const index_reduction: typeof reduction;
2396
2708
  declare namespace index {
2397
- export { index_ai as ai, index_cqrs as cqrs, demoShell$1 as demoShell, index_domainTemplates as domainTemplates, index_graphspec as graphspec, index$b as layout, index_memory as memory, index_messaging as messaging, index_orchestration as orchestration, index_reduction as reduction };
2709
+ export { index_ai as ai, index_cqrs as cqrs, demoShell$1 as demoShell, index_domainTemplates as domainTemplates, index_graphspec as graphspec, index$1 as harness, index$c as layout, index_memory as memory, index_messaging as messaging, index_orchestration as orchestration, index_reduction as reduction };
2398
2710
  }
2399
2711
 
2400
2712
  /**
@@ -2402,4 +2714,4 @@ declare namespace index {
2402
2714
  */
2403
2715
  declare const version = "0.0.0";
2404
2716
 
2405
- export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, Node, NodeActions, NodeFn, NodeInput, NodeOptions, ReactiveListSnapshot, ReactiveLogSnapshot, ReactiveMapSnapshot, ai, index$1 as compat, cqrs, demoShell$1 as demoShell, domainTemplates, graphspec, index$9 as jotai, index$b as layout, memory, messaging, index$8 as nanostores, index$a as nestjs, orchestration, index as patterns, index$7 as react, reduction, index$6 as signals, index$5 as solid, index$4 as svelte, version, index$3 as vue, index$2 as zustand };
2717
+ export { Actor, AutoCheckpointAdapter, DistillBundle, Extraction, Graph, GraphAutoCheckpointHandle, GraphAutoCheckpointOptions, GraphOptions, Node, NodeActions, NodeFn, NodeInput, NodeOptions, ReactiveListSnapshot, ReactiveLogSnapshot, ReactiveMapSnapshot, 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 };