@warmdrift/kgauto-compiler 2.0.0-alpha.35 → 2.0.0-alpha.37

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.
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-BoqPXoUb.mjs';
2
- export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-BoqPXoUb.mjs';
3
- import '../ir-BAAHLfFL.mjs';
1
+ import { G as GlassboxEvent } from '../types-f7idIVsm.mjs';
2
+ export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-f7idIVsm.mjs';
3
+ import '../ir-BiZSAVCJ.mjs';
4
4
  import '../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-CXyKj6-K.js';
2
- export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-CXyKj6-K.js';
3
- import '../ir-B_ygNURd.js';
1
+ import { G as GlassboxEvent } from '../types-CsFP-H-U.js';
2
+ export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-CsFP-H-U.js';
3
+ import '../ir-CZ9Ng96k.js';
4
4
  import '../dialect.js';
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-DDX6K2-p.mjs';
2
- import '../ir-BAAHLfFL.mjs';
1
+ import { T as TraceHealth } from '../types-kzYpX7wB.mjs';
2
+ import '../ir-BiZSAVCJ.mjs';
3
3
  import '../dialect.mjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-CJz1Ebvb.js';
2
- import '../ir-B_ygNURd.js';
1
+ import { T as TraceHealth } from '../types-HEl2tS4P.js';
2
+ import '../ir-CZ9Ng96k.js';
3
3
  import '../dialect.js';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-BoqPXoUb.mjs';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-DDX6K2-p.mjs';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-DDX6K2-p.mjs';
4
- import '../ir-BAAHLfFL.mjs';
1
+ import { G as GlassboxEvent } from '../types-f7idIVsm.mjs';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-kzYpX7wB.mjs';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-kzYpX7wB.mjs';
4
+ import '../ir-BiZSAVCJ.mjs';
5
5
  import '../dialect.mjs';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-CXyKj6-K.js';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-CJz1Ebvb.js';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-CJz1Ebvb.js';
4
- import '../ir-B_ygNURd.js';
1
+ import { G as GlassboxEvent } from '../types-CsFP-H-U.js';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-HEl2tS4P.js';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-HEl2tS4P.js';
4
+ import '../ir-CZ9Ng96k.js';
5
5
  import '../dialect.js';
6
6
 
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-DDX6K2-p.mjs';
3
- import '../../ir-BAAHLfFL.mjs';
2
+ import { a as TraceDetail } from '../../types-kzYpX7wB.mjs';
3
+ import '../../ir-BiZSAVCJ.mjs';
4
4
  import '../../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-CJz1Ebvb.js';
3
- import '../../ir-B_ygNURd.js';
2
+ import { a as TraceDetail } from '../../types-HEl2tS4P.js';
3
+ import '../../ir-CZ9Ng96k.js';
4
4
  import '../../dialect.js';
5
5
 
6
6
  /**
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, B as BestPracticeAdvisory, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-BAAHLfFL.mjs';
2
- export { m as CallAttempt, n as CallError, o as ChainWithGrounding, p as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, q as MutationApplied, r as NormalizedTokens, s as OutcomeKind, t as PerAxisMetricsByModel, u as PromptSection, v as SectionKind, T as ToolCall, w as ToolDefinition } from './ir-BAAHLfFL.mjs';
1
+ import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, B as BestPracticeAdvisory, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-BiZSAVCJ.mjs';
2
+ export { m as CallAttempt, n as CallError, o as ChainWithGrounding, p as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, q as MutationApplied, r as NormalizedTokens, s as OutcomeKind, t as PerAxisMetricsByModel, u as PromptSection, v as SectionKind, T as ToolCall, w as ToolDefinition } from './ir-BiZSAVCJ.mjs';
3
3
  import { ModelProfile } from './profiles.mjs';
4
4
  export { ALIASES, CacheStrategy, CliffRule, LoweringSpec, RecoveryRule, StructuredOutputCapability, SystemPromptMode, allProfiles, getProfile, profilesByProvider, tryGetProfile } from './profiles.mjs';
5
5
  import { IntentArchetypeName } from './dialect.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, B as BestPracticeAdvisory, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-B_ygNURd.js';
2
- export { m as CallAttempt, n as CallError, o as ChainWithGrounding, p as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, q as MutationApplied, r as NormalizedTokens, s as OutcomeKind, t as PerAxisMetricsByModel, u as PromptSection, v as SectionKind, T as ToolCall, w as ToolDefinition } from './ir-B_ygNURd.js';
1
+ import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, B as BestPracticeAdvisory, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-CZ9Ng96k.js';
2
+ export { m as CallAttempt, n as CallError, o as ChainWithGrounding, p as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, q as MutationApplied, r as NormalizedTokens, s as OutcomeKind, t as PerAxisMetricsByModel, u as PromptSection, v as SectionKind, T as ToolCall, w as ToolDefinition } from './ir-CZ9Ng96k.js';
3
3
  import { ModelProfile } from './profiles.js';
4
4
  export { ALIASES, CacheStrategy, CliffRule, LoweringSpec, RecoveryRule, StructuredOutputCapability, SystemPromptMode, allProfiles, getProfile, profilesByProvider, tryGetProfile } from './profiles.js';
5
5
  import { IntentArchetypeName } from './dialect.js';
@@ -398,6 +398,26 @@ interface BestPracticeAdvisory {
398
398
  * - `'architecture-change'` — the issue isn't fixable at the kgauto layer
399
399
  */
400
400
  recommendationType?: 'model-swap' | 'prompt-fix' | 'caching-fix' | 'no-ai-needed' | 'tier-down' | 'architecture-change';
401
+ /**
402
+ * alpha.36 — architectural recommendation when the call shouldn't be an
403
+ * AI call at all, or should be a cheaper non-AI substitute. Optional and
404
+ * orthogonal to {@link recommendationType}: when set, narrows the
405
+ * `no-ai-needed` / `architecture-change` rec-type into an actionable
406
+ * pattern the consumer can implement.
407
+ *
408
+ * - `'lookup-table'` — deterministic input → output mapping (≥95% agreement at high N). Build a domain table; fall back to AI for novel inputs.
409
+ * - `'memoization-cache'` — same canonical input recurs across sessions with equivalent output. Add an edge/KV cache keyed on canonical input.
410
+ * - `'tier-down'` — cheaper model tier delivers equal-or-better oracle score on this shape. Move primary to the cheaper tier.
411
+ * - `'deterministic-parser'` — `constraints.structuredOutput: true` calls where the schema is regex/JSON-extractable from the input.
412
+ * - `'precompute'` — input is derivable at build / cron / batch time; eliminate the per-request call entirely.
413
+ *
414
+ * Operator-side detection lives in `v2/scripts/no-ai-needed-detector.mjs`
415
+ * (alpha.36); a compile-time advisor rule that consumes the brain-side
416
+ * findings cache follows in a later alpha. Today populated only by the
417
+ * operator-side detector + the brain RPC `get_no_ai_needed_candidates`
418
+ * (migration 021).
419
+ */
420
+ recommendedArchitecture?: 'lookup-table' | 'memoization-cache' | 'tier-down' | 'deterministic-parser' | 'precompute';
401
421
  /**
402
422
  * alpha.28 — when a rule wants to surface a specific structural adaptation
403
423
  * (not just a swap or a prompt fix), it attaches the adapter shape here.
@@ -398,6 +398,26 @@ interface BestPracticeAdvisory {
398
398
  * - `'architecture-change'` — the issue isn't fixable at the kgauto layer
399
399
  */
400
400
  recommendationType?: 'model-swap' | 'prompt-fix' | 'caching-fix' | 'no-ai-needed' | 'tier-down' | 'architecture-change';
401
+ /**
402
+ * alpha.36 — architectural recommendation when the call shouldn't be an
403
+ * AI call at all, or should be a cheaper non-AI substitute. Optional and
404
+ * orthogonal to {@link recommendationType}: when set, narrows the
405
+ * `no-ai-needed` / `architecture-change` rec-type into an actionable
406
+ * pattern the consumer can implement.
407
+ *
408
+ * - `'lookup-table'` — deterministic input → output mapping (≥95% agreement at high N). Build a domain table; fall back to AI for novel inputs.
409
+ * - `'memoization-cache'` — same canonical input recurs across sessions with equivalent output. Add an edge/KV cache keyed on canonical input.
410
+ * - `'tier-down'` — cheaper model tier delivers equal-or-better oracle score on this shape. Move primary to the cheaper tier.
411
+ * - `'deterministic-parser'` — `constraints.structuredOutput: true` calls where the schema is regex/JSON-extractable from the input.
412
+ * - `'precompute'` — input is derivable at build / cron / batch time; eliminate the per-request call entirely.
413
+ *
414
+ * Operator-side detection lives in `v2/scripts/no-ai-needed-detector.mjs`
415
+ * (alpha.36); a compile-time advisor rule that consumes the brain-side
416
+ * findings cache follows in a later alpha. Today populated only by the
417
+ * operator-side detector + the brain RPC `get_no_ai_needed_candidates`
418
+ * (migration 021).
419
+ */
420
+ recommendedArchitecture?: 'lookup-table' | 'memoization-cache' | 'tier-down' | 'deterministic-parser' | 'precompute';
401
421
  /**
402
422
  * alpha.28 — when a rule wants to surface a specific structural adaptation
403
423
  * (not just a swap or a prompt fix), it attaches the adapter shape here.
@@ -1,4 +1,4 @@
1
- import { k as Provider } from './ir-BAAHLfFL.mjs';
1
+ import { k as Provider } from './ir-BiZSAVCJ.mjs';
2
2
  import { IntentArchetypeName } from './dialect.mjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { k as Provider } from './ir-B_ygNURd.js';
1
+ import { k as Provider } from './ir-CZ9Ng96k.js';
2
2
  import { IntentArchetypeName } from './dialect.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { q as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-B_ygNURd.js';
1
+ import { q as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-CZ9Ng96k.js';
2
2
 
3
3
  /**
4
4
  * Glass-Box observability types (alpha.17).
@@ -1,4 +1,4 @@
1
- import { i as Adapter, v as SectionKind } from './ir-B_ygNURd.js';
1
+ import { i as Adapter, v as SectionKind } from './ir-CZ9Ng96k.js';
2
2
 
3
3
  /**
4
4
  * Internal config + hook types for createGlassboxRoutes().
@@ -1,4 +1,4 @@
1
- import { q as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-BAAHLfFL.mjs';
1
+ import { q as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-BiZSAVCJ.mjs';
2
2
 
3
3
  /**
4
4
  * Glass-Box observability types (alpha.17).
@@ -1,4 +1,4 @@
1
- import { i as Adapter, v as SectionKind } from './ir-BAAHLfFL.mjs';
1
+ import { i as Adapter, v as SectionKind } from './ir-BiZSAVCJ.mjs';
2
2
 
3
3
  /**
4
4
  * Internal config + hook types for createGlassboxRoutes().
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmdrift/kgauto-compiler",
3
- "version": "2.0.0-alpha.35",
3
+ "version": "2.0.0-alpha.37",
4
4
  "description": "Prompt compiler + central learning brain for multi-model AI apps. Swap models without rewriting prompts.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",