@warmdrift/kgauto-compiler 2.0.0-alpha.41 → 2.0.0-alpha.43
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-XJZRDGHF.mjs → chunk-6MSJQCAP.mjs} +12 -1
- package/dist/{chunk-JQGRWJZO.mjs → chunk-ZHUD3I52.mjs} +60 -2
- package/dist/glassbox/index.d.mts +3 -3
- package/dist/glassbox/index.d.ts +3 -3
- package/dist/glassbox-routes/format.d.mts +2 -2
- package/dist/glassbox-routes/format.d.ts +2 -2
- package/dist/glassbox-routes/index.d.mts +4 -4
- package/dist/glassbox-routes/index.d.ts +4 -4
- package/dist/glassbox-routes/index.js +60 -2
- package/dist/glassbox-routes/index.mjs +2 -2
- package/dist/glassbox-routes/react/index.d.mts +2 -2
- package/dist/glassbox-routes/react/index.d.ts +2 -2
- package/dist/index.d.mts +191 -4
- package/dist/index.d.ts +191 -4
- package/dist/index.js +3303 -2950
- package/dist/index.mjs +1379 -1100
- package/dist/{ir-D_kgJcaV.d.mts → ir-CSgyol5D.d.mts} +46 -0
- package/dist/{ir-DYpvUSEw.d.ts → ir-MN9bGclm.d.ts} +46 -0
- package/dist/profiles.d.mts +92 -2
- package/dist/profiles.d.ts +92 -2
- package/dist/profiles.js +60 -2
- package/dist/profiles.mjs +1 -1
- package/dist/{types-CYY769Ls.d.mts → types-M48csxKK.d.mts} +1 -1
- package/dist/{types-DigtHnEt.d.ts → types-_1tcDEqa.d.ts} +1 -1
- package/dist/{types-MkiWUPM8.d.mts → types-acFM2-iZ.d.mts} +1 -1
- package/dist/{types-C8gOJ7hV.d.ts → types-uRIiYY_y.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -471,6 +471,38 @@ interface BestPracticeAdvisory {
|
|
|
471
471
|
* MUST type to the same union. Phase 2 integration verifies.
|
|
472
472
|
*/
|
|
473
473
|
suggestedAdaptation?: Adapter;
|
|
474
|
+
/**
|
|
475
|
+
* alpha.42 — the kgauto request handle that produced this advisory. Stamped
|
|
476
|
+
* by `compile()` after `runAdvisor()` returns, sourced from
|
|
477
|
+
* `CompileResult.handle`. Lets a consumer's admin UI pivot from advisory
|
|
478
|
+
* row → original trace (Glass-Box card, brain `compile_outcomes` lookup).
|
|
479
|
+
*
|
|
480
|
+
* Absent when the advisory was constructed outside the full `compile()`
|
|
481
|
+
* pipeline (e.g., a direct `runAdvisor()` call in tests). Always present
|
|
482
|
+
* on advisories returned from `compile().advisories`.
|
|
483
|
+
*/
|
|
484
|
+
kgautoRequestId?: string;
|
|
485
|
+
/**
|
|
486
|
+
* alpha.42 — who is positioned to act on this advisory.
|
|
487
|
+
*
|
|
488
|
+
* - `'consumer-actionable'` (Class A): the consumer can fix this by
|
|
489
|
+
* changing their wire-up — add `cacheable: true` markers, swap their
|
|
490
|
+
* model literal, declare a section, etc. The admin UI should surface
|
|
491
|
+
* a one-click apply or a "fix it" CTA.
|
|
492
|
+
* - `'producer-owned'` (Class B): kgauto needs to ship a code or data
|
|
493
|
+
* change — update a profile, promote a model in the chain, fix a
|
|
494
|
+
* wire contract. The admin UI should surface this as informational
|
|
495
|
+
* ("kgauto is on it") and not present a consumer-side action.
|
|
496
|
+
*
|
|
497
|
+
* Stamped by `compile()` after `runAdvisor()` returns. Rules can self-
|
|
498
|
+
* declare via the matching field on their return; otherwise the stamp
|
|
499
|
+
* consults the static `PRODUCER_OWNED_RULE_CODES` set in `advisor.ts`,
|
|
500
|
+
* defaulting to `'consumer-actionable'` when the code isn't listed.
|
|
501
|
+
*
|
|
502
|
+
* Closes the s47 dogfood gap where the tt-intel admin UI conflated the
|
|
503
|
+
* two classes — consumers couldn't tell whether they should act or wait.
|
|
504
|
+
*/
|
|
505
|
+
ownership?: 'consumer-actionable' | 'producer-owned';
|
|
474
506
|
}
|
|
475
507
|
/**
|
|
476
508
|
* alpha.28 — adapter shape attached to advisories and returned by
|
|
@@ -648,6 +680,20 @@ interface CompileResult {
|
|
|
648
680
|
* empty. Matches `historyCacheMarkIndex` semantics on the history axis.
|
|
649
681
|
*/
|
|
650
682
|
systemCacheMarkIndex?: number;
|
|
683
|
+
/**
|
|
684
|
+
* alpha.43. Cliff-style warnings surfaced by the convention pass
|
|
685
|
+
* (`passApplyConventions`) when the selected profile + archetype carry
|
|
686
|
+
* a `cliffWarning` whose preconditions are met. These are informational
|
|
687
|
+
* — they describe a structural mismatch between the call's shape and
|
|
688
|
+
* the chosen family (e.g. "reasoner family is wrong for parallel-tool
|
|
689
|
+
* hunt") so consumers can route differently next time.
|
|
690
|
+
*
|
|
691
|
+
* Empty array when no convention fired or no warnings surfaced.
|
|
692
|
+
* Separate from `cliff_guard` mutations in `mutationsApplied` — those
|
|
693
|
+
* are profile.cliffs[] runtime triggers; these are convention-level
|
|
694
|
+
* advisory text. Both can fire on the same call.
|
|
695
|
+
*/
|
|
696
|
+
cliffWarnings: string[];
|
|
651
697
|
};
|
|
652
698
|
/**
|
|
653
699
|
* alpha.33. Structured `system` for AI-SDK `streamText({ system })`
|
|
@@ -471,6 +471,38 @@ interface BestPracticeAdvisory {
|
|
|
471
471
|
* MUST type to the same union. Phase 2 integration verifies.
|
|
472
472
|
*/
|
|
473
473
|
suggestedAdaptation?: Adapter;
|
|
474
|
+
/**
|
|
475
|
+
* alpha.42 — the kgauto request handle that produced this advisory. Stamped
|
|
476
|
+
* by `compile()` after `runAdvisor()` returns, sourced from
|
|
477
|
+
* `CompileResult.handle`. Lets a consumer's admin UI pivot from advisory
|
|
478
|
+
* row → original trace (Glass-Box card, brain `compile_outcomes` lookup).
|
|
479
|
+
*
|
|
480
|
+
* Absent when the advisory was constructed outside the full `compile()`
|
|
481
|
+
* pipeline (e.g., a direct `runAdvisor()` call in tests). Always present
|
|
482
|
+
* on advisories returned from `compile().advisories`.
|
|
483
|
+
*/
|
|
484
|
+
kgautoRequestId?: string;
|
|
485
|
+
/**
|
|
486
|
+
* alpha.42 — who is positioned to act on this advisory.
|
|
487
|
+
*
|
|
488
|
+
* - `'consumer-actionable'` (Class A): the consumer can fix this by
|
|
489
|
+
* changing their wire-up — add `cacheable: true` markers, swap their
|
|
490
|
+
* model literal, declare a section, etc. The admin UI should surface
|
|
491
|
+
* a one-click apply or a "fix it" CTA.
|
|
492
|
+
* - `'producer-owned'` (Class B): kgauto needs to ship a code or data
|
|
493
|
+
* change — update a profile, promote a model in the chain, fix a
|
|
494
|
+
* wire contract. The admin UI should surface this as informational
|
|
495
|
+
* ("kgauto is on it") and not present a consumer-side action.
|
|
496
|
+
*
|
|
497
|
+
* Stamped by `compile()` after `runAdvisor()` returns. Rules can self-
|
|
498
|
+
* declare via the matching field on their return; otherwise the stamp
|
|
499
|
+
* consults the static `PRODUCER_OWNED_RULE_CODES` set in `advisor.ts`,
|
|
500
|
+
* defaulting to `'consumer-actionable'` when the code isn't listed.
|
|
501
|
+
*
|
|
502
|
+
* Closes the s47 dogfood gap where the tt-intel admin UI conflated the
|
|
503
|
+
* two classes — consumers couldn't tell whether they should act or wait.
|
|
504
|
+
*/
|
|
505
|
+
ownership?: 'consumer-actionable' | 'producer-owned';
|
|
474
506
|
}
|
|
475
507
|
/**
|
|
476
508
|
* alpha.28 — adapter shape attached to advisories and returned by
|
|
@@ -648,6 +680,20 @@ interface CompileResult {
|
|
|
648
680
|
* empty. Matches `historyCacheMarkIndex` semantics on the history axis.
|
|
649
681
|
*/
|
|
650
682
|
systemCacheMarkIndex?: number;
|
|
683
|
+
/**
|
|
684
|
+
* alpha.43. Cliff-style warnings surfaced by the convention pass
|
|
685
|
+
* (`passApplyConventions`) when the selected profile + archetype carry
|
|
686
|
+
* a `cliffWarning` whose preconditions are met. These are informational
|
|
687
|
+
* — they describe a structural mismatch between the call's shape and
|
|
688
|
+
* the chosen family (e.g. "reasoner family is wrong for parallel-tool
|
|
689
|
+
* hunt") so consumers can route differently next time.
|
|
690
|
+
*
|
|
691
|
+
* Empty array when no convention fired or no warnings surfaced.
|
|
692
|
+
* Separate from `cliff_guard` mutations in `mutationsApplied` — those
|
|
693
|
+
* are profile.cliffs[] runtime triggers; these are convention-level
|
|
694
|
+
* advisory text. Both can fire on the same call.
|
|
695
|
+
*/
|
|
696
|
+
cliffWarnings: string[];
|
|
651
697
|
};
|
|
652
698
|
/**
|
|
653
699
|
* alpha.33. Structured `system` for AI-SDK `streamText({ system })`
|
package/dist/profiles.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Provider } from './ir-
|
|
1
|
+
import { k as Provider } from './ir-CSgyol5D.mjs';
|
|
2
2
|
import { IntentArchetypeName } from './dialect.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -32,6 +32,79 @@ interface CliffRule {
|
|
|
32
32
|
/** Human-readable reason for digest reporting. */
|
|
33
33
|
reason: string;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* alpha.43 — per-family-per-archetype prompt-shape convention.
|
|
37
|
+
*
|
|
38
|
+
* Cliffs are runtime warnings about model failure modes; conventions are
|
|
39
|
+
* compile-time prompt rewrites that head off those failure modes BEFORE the
|
|
40
|
+
* call leaves kgauto. The split: "this model hedges on classify" is a fact
|
|
41
|
+
* about the model (a convention); "this prompt is 80k tokens on a Flash
|
|
42
|
+
* profile" is a fact about the call (a cliff).
|
|
43
|
+
*
|
|
44
|
+
* Conventions live as data on profiles (NOT hardcoded in passes). The
|
|
45
|
+
* `passApplyConventions` pass walks each matching convention and applies
|
|
46
|
+
* its prefix/suffix/structured-output hint at compile time. Idempotent: if
|
|
47
|
+
* the prefix/suffix is already at the head/tail, the pass no-ops.
|
|
48
|
+
*
|
|
49
|
+
* Defaulting rule: set conventions on the FAMILY REPRESENTATIVE profile
|
|
50
|
+
* (e.g. deepseek-v4-pro is the family rep for the `deepseek-reasoner`
|
|
51
|
+
* family). Other family members inherit at compile time via the
|
|
52
|
+
* `family-resolution.deriveFamilyFromModelId` lookup. Model-specific
|
|
53
|
+
* overrides are rare; use them only when one model in a family genuinely
|
|
54
|
+
* diverges from the family default.
|
|
55
|
+
*
|
|
56
|
+
* Trigger that justified the substrate (2026-05-28): V4-Pro probe on
|
|
57
|
+
* tt-intel/classify (exclusion-finding ID 20) showed 8/10 judge rationales
|
|
58
|
+
* citing "candidate hedges and fails to commit to a single classification."
|
|
59
|
+
* Without a forcing-function suffix, every reasoner probe on a decisive
|
|
60
|
+
* archetype verdicts stay-excluded for reasoner-behavior reasons, not
|
|
61
|
+
* quality reasons. The convention substrate is the kgauto-side fix.
|
|
62
|
+
*/
|
|
63
|
+
interface ArchetypeConvention {
|
|
64
|
+
/** Intent archetype this convention applies to. */
|
|
65
|
+
archetype: IntentArchetypeName;
|
|
66
|
+
/**
|
|
67
|
+
* String prepended to the system prompt (after any existing system
|
|
68
|
+
* content). Use for forcing-functions, output-shape directives,
|
|
69
|
+
* anti-hedge framing. Omit if no prefix needed.
|
|
70
|
+
*/
|
|
71
|
+
promptPrefix?: string;
|
|
72
|
+
/**
|
|
73
|
+
* String appended to the LAST user message in history (or to
|
|
74
|
+
* `currentTurn` when history is empty). Use for tail-anchored
|
|
75
|
+
* forcing-functions ("Output exactly one of: [...]"). Omit if no suffix
|
|
76
|
+
* needed.
|
|
77
|
+
*/
|
|
78
|
+
promptSuffix?: string;
|
|
79
|
+
/**
|
|
80
|
+
* If 'enforce', kgauto warns (but does not block) when structuredOutput
|
|
81
|
+
* is NOT set and the model wants it. If 'avoid', kgauto warns when
|
|
82
|
+
* structuredOutput IS set and the model struggles with schema
|
|
83
|
+
* compliance. If omitted, no structured-output guidance.
|
|
84
|
+
*/
|
|
85
|
+
structuredOutputHint?: 'enforce' | 'avoid';
|
|
86
|
+
/**
|
|
87
|
+
* Free-form cliff-style warning surfaced in
|
|
88
|
+
* `CompileResult.diagnostics.cliffWarnings` when the convention's
|
|
89
|
+
* preconditions are met but the consumer opted out of the convention
|
|
90
|
+
* (e.g. provided their own conflicting prompt-shape) — or when the
|
|
91
|
+
* convention can't be applied automatically (cliffWarning-only entries
|
|
92
|
+
* are pure diagnostics).
|
|
93
|
+
*/
|
|
94
|
+
cliffWarning?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Optional: only fire this convention's cliffWarning when the tool count
|
|
97
|
+
* is at least this threshold. Used for parallel-tool advisories on
|
|
98
|
+
* archetypes that don't otherwise carry a hard tool cap.
|
|
99
|
+
*/
|
|
100
|
+
whenToolCountAtLeast?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Brain-evidence-linked justification. Appears in mutations_applied
|
|
103
|
+
* trail + advisor rule messages. Same format as existing cliff.reason
|
|
104
|
+
* strings.
|
|
105
|
+
*/
|
|
106
|
+
reason: string;
|
|
107
|
+
}
|
|
35
108
|
interface RecoveryRule {
|
|
36
109
|
/** What signal triggers recovery. */
|
|
37
110
|
signal: 'empty_response_after_tool' | 'empty_response' | 'malformed_function_call' | 'rate_limit' | 'model_not_found' | 'context_overflow';
|
|
@@ -145,6 +218,23 @@ interface ModelProfile {
|
|
|
145
218
|
* is by definition the active source of truth at bundle time).
|
|
146
219
|
*/
|
|
147
220
|
active?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* alpha.43 — per-archetype prompt-shape conventions. Applied at compile
|
|
223
|
+
* time by `passApplyConventions` (after model selection, before lower).
|
|
224
|
+
* When a convention's archetype matches the request's intent_archetype,
|
|
225
|
+
* the prefix + suffix are applied (idempotent if already present) and
|
|
226
|
+
* the structured-output / cliff-warning diagnostics surface.
|
|
227
|
+
*
|
|
228
|
+
* Conventions are FAMILY-LEVEL by default — set them on the family
|
|
229
|
+
* representative profile (e.g. `deepseek-v4-pro` for the
|
|
230
|
+
* `deepseek-reasoner` family) and other members inherit at compile time
|
|
231
|
+
* via the `family-resolution.deriveFamilyFromModelId` lookup. Model-
|
|
232
|
+
* specific overrides on a member profile take precedence over the
|
|
233
|
+
* family default for the same archetype.
|
|
234
|
+
*
|
|
235
|
+
* See `ArchetypeConvention` for field semantics.
|
|
236
|
+
*/
|
|
237
|
+
archetypeConventions?: ArchetypeConvention[];
|
|
148
238
|
}
|
|
149
239
|
declare const ALIASES: Record<string, string>;
|
|
150
240
|
interface ProfileBrainHook {
|
|
@@ -161,4 +251,4 @@ declare function allProfiles(): readonly ModelProfile[];
|
|
|
161
251
|
declare function allProfilesRaw(): readonly ModelProfile[];
|
|
162
252
|
declare function profilesByProvider(provider: Provider): readonly ModelProfile[];
|
|
163
253
|
|
|
164
|
-
export { ALIASES, type CacheStrategy, type CliffRule, type LoweringSpec, type ModelProfile, type RecoveryRule, type StructuredOutputCapability, type SystemPromptMode, _setProfileBrainHook, allProfiles, allProfilesRaw, getProfile, profilesByProvider, tryGetProfile };
|
|
254
|
+
export { ALIASES, type ArchetypeConvention, type CacheStrategy, type CliffRule, type LoweringSpec, type ModelProfile, type RecoveryRule, type StructuredOutputCapability, type SystemPromptMode, _setProfileBrainHook, allProfiles, allProfilesRaw, getProfile, profilesByProvider, tryGetProfile };
|
package/dist/profiles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Provider } from './ir-
|
|
1
|
+
import { k as Provider } from './ir-MN9bGclm.js';
|
|
2
2
|
import { IntentArchetypeName } from './dialect.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -32,6 +32,79 @@ interface CliffRule {
|
|
|
32
32
|
/** Human-readable reason for digest reporting. */
|
|
33
33
|
reason: string;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* alpha.43 — per-family-per-archetype prompt-shape convention.
|
|
37
|
+
*
|
|
38
|
+
* Cliffs are runtime warnings about model failure modes; conventions are
|
|
39
|
+
* compile-time prompt rewrites that head off those failure modes BEFORE the
|
|
40
|
+
* call leaves kgauto. The split: "this model hedges on classify" is a fact
|
|
41
|
+
* about the model (a convention); "this prompt is 80k tokens on a Flash
|
|
42
|
+
* profile" is a fact about the call (a cliff).
|
|
43
|
+
*
|
|
44
|
+
* Conventions live as data on profiles (NOT hardcoded in passes). The
|
|
45
|
+
* `passApplyConventions` pass walks each matching convention and applies
|
|
46
|
+
* its prefix/suffix/structured-output hint at compile time. Idempotent: if
|
|
47
|
+
* the prefix/suffix is already at the head/tail, the pass no-ops.
|
|
48
|
+
*
|
|
49
|
+
* Defaulting rule: set conventions on the FAMILY REPRESENTATIVE profile
|
|
50
|
+
* (e.g. deepseek-v4-pro is the family rep for the `deepseek-reasoner`
|
|
51
|
+
* family). Other family members inherit at compile time via the
|
|
52
|
+
* `family-resolution.deriveFamilyFromModelId` lookup. Model-specific
|
|
53
|
+
* overrides are rare; use them only when one model in a family genuinely
|
|
54
|
+
* diverges from the family default.
|
|
55
|
+
*
|
|
56
|
+
* Trigger that justified the substrate (2026-05-28): V4-Pro probe on
|
|
57
|
+
* tt-intel/classify (exclusion-finding ID 20) showed 8/10 judge rationales
|
|
58
|
+
* citing "candidate hedges and fails to commit to a single classification."
|
|
59
|
+
* Without a forcing-function suffix, every reasoner probe on a decisive
|
|
60
|
+
* archetype verdicts stay-excluded for reasoner-behavior reasons, not
|
|
61
|
+
* quality reasons. The convention substrate is the kgauto-side fix.
|
|
62
|
+
*/
|
|
63
|
+
interface ArchetypeConvention {
|
|
64
|
+
/** Intent archetype this convention applies to. */
|
|
65
|
+
archetype: IntentArchetypeName;
|
|
66
|
+
/**
|
|
67
|
+
* String prepended to the system prompt (after any existing system
|
|
68
|
+
* content). Use for forcing-functions, output-shape directives,
|
|
69
|
+
* anti-hedge framing. Omit if no prefix needed.
|
|
70
|
+
*/
|
|
71
|
+
promptPrefix?: string;
|
|
72
|
+
/**
|
|
73
|
+
* String appended to the LAST user message in history (or to
|
|
74
|
+
* `currentTurn` when history is empty). Use for tail-anchored
|
|
75
|
+
* forcing-functions ("Output exactly one of: [...]"). Omit if no suffix
|
|
76
|
+
* needed.
|
|
77
|
+
*/
|
|
78
|
+
promptSuffix?: string;
|
|
79
|
+
/**
|
|
80
|
+
* If 'enforce', kgauto warns (but does not block) when structuredOutput
|
|
81
|
+
* is NOT set and the model wants it. If 'avoid', kgauto warns when
|
|
82
|
+
* structuredOutput IS set and the model struggles with schema
|
|
83
|
+
* compliance. If omitted, no structured-output guidance.
|
|
84
|
+
*/
|
|
85
|
+
structuredOutputHint?: 'enforce' | 'avoid';
|
|
86
|
+
/**
|
|
87
|
+
* Free-form cliff-style warning surfaced in
|
|
88
|
+
* `CompileResult.diagnostics.cliffWarnings` when the convention's
|
|
89
|
+
* preconditions are met but the consumer opted out of the convention
|
|
90
|
+
* (e.g. provided their own conflicting prompt-shape) — or when the
|
|
91
|
+
* convention can't be applied automatically (cliffWarning-only entries
|
|
92
|
+
* are pure diagnostics).
|
|
93
|
+
*/
|
|
94
|
+
cliffWarning?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Optional: only fire this convention's cliffWarning when the tool count
|
|
97
|
+
* is at least this threshold. Used for parallel-tool advisories on
|
|
98
|
+
* archetypes that don't otherwise carry a hard tool cap.
|
|
99
|
+
*/
|
|
100
|
+
whenToolCountAtLeast?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Brain-evidence-linked justification. Appears in mutations_applied
|
|
103
|
+
* trail + advisor rule messages. Same format as existing cliff.reason
|
|
104
|
+
* strings.
|
|
105
|
+
*/
|
|
106
|
+
reason: string;
|
|
107
|
+
}
|
|
35
108
|
interface RecoveryRule {
|
|
36
109
|
/** What signal triggers recovery. */
|
|
37
110
|
signal: 'empty_response_after_tool' | 'empty_response' | 'malformed_function_call' | 'rate_limit' | 'model_not_found' | 'context_overflow';
|
|
@@ -145,6 +218,23 @@ interface ModelProfile {
|
|
|
145
218
|
* is by definition the active source of truth at bundle time).
|
|
146
219
|
*/
|
|
147
220
|
active?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* alpha.43 — per-archetype prompt-shape conventions. Applied at compile
|
|
223
|
+
* time by `passApplyConventions` (after model selection, before lower).
|
|
224
|
+
* When a convention's archetype matches the request's intent_archetype,
|
|
225
|
+
* the prefix + suffix are applied (idempotent if already present) and
|
|
226
|
+
* the structured-output / cliff-warning diagnostics surface.
|
|
227
|
+
*
|
|
228
|
+
* Conventions are FAMILY-LEVEL by default — set them on the family
|
|
229
|
+
* representative profile (e.g. `deepseek-v4-pro` for the
|
|
230
|
+
* `deepseek-reasoner` family) and other members inherit at compile time
|
|
231
|
+
* via the `family-resolution.deriveFamilyFromModelId` lookup. Model-
|
|
232
|
+
* specific overrides on a member profile take precedence over the
|
|
233
|
+
* family default for the same archetype.
|
|
234
|
+
*
|
|
235
|
+
* See `ArchetypeConvention` for field semantics.
|
|
236
|
+
*/
|
|
237
|
+
archetypeConventions?: ArchetypeConvention[];
|
|
148
238
|
}
|
|
149
239
|
declare const ALIASES: Record<string, string>;
|
|
150
240
|
interface ProfileBrainHook {
|
|
@@ -161,4 +251,4 @@ declare function allProfiles(): readonly ModelProfile[];
|
|
|
161
251
|
declare function allProfilesRaw(): readonly ModelProfile[];
|
|
162
252
|
declare function profilesByProvider(provider: Provider): readonly ModelProfile[];
|
|
163
253
|
|
|
164
|
-
export { ALIASES, type CacheStrategy, type CliffRule, type LoweringSpec, type ModelProfile, type RecoveryRule, type StructuredOutputCapability, type SystemPromptMode, _setProfileBrainHook, allProfiles, allProfilesRaw, getProfile, profilesByProvider, tryGetProfile };
|
|
254
|
+
export { ALIASES, type ArchetypeConvention, type CacheStrategy, type CliffRule, type LoweringSpec, type ModelProfile, type RecoveryRule, type StructuredOutputCapability, type SystemPromptMode, _setProfileBrainHook, allProfiles, allProfilesRaw, getProfile, profilesByProvider, tryGetProfile };
|
package/dist/profiles.js
CHANGED
|
@@ -592,7 +592,21 @@ var PROFILES_RAW = [
|
|
|
592
592
|
critique: 4,
|
|
593
593
|
hunt: 4
|
|
594
594
|
// sequential tool calls only — L-040
|
|
595
|
-
}
|
|
595
|
+
},
|
|
596
|
+
// alpha.43 — family-level conventions for the `deepseek-chat` family
|
|
597
|
+
// (V4-Flash + future non-thinking-mode members). V4-Flash struggles
|
|
598
|
+
// with summarize-archetype + structured-output: 3 of 4 schema-attempted
|
|
599
|
+
// PB calls (2026-05-18 + 2026-05-22) hit `structured_output_parse_failed`.
|
|
600
|
+
// Surface the friction at compile time so consumers either drop the
|
|
601
|
+
// schema or route to a more schema-reliable family.
|
|
602
|
+
archetypeConventions: [
|
|
603
|
+
{
|
|
604
|
+
archetype: "summarize",
|
|
605
|
+
structuredOutputHint: "avoid",
|
|
606
|
+
cliffWarning: "deepseek-chat family schema compliance on summarize is weak (3 of 4 schema-attempted PB calls hit structured_output_parse_failed). Consider routing summarize+structured-output to a different family (claude-sonnet, gemini-pro, openai-gpt-5.4) or dropping the schema for free-text summaries.",
|
|
607
|
+
reason: "Brain evidence: PB compile_outcomes 2026-05-18 + 2026-05-22, error_type=structured_output_parse_failed on deepseek-v4-flash + summarize archetype."
|
|
608
|
+
}
|
|
609
|
+
]
|
|
596
610
|
},
|
|
597
611
|
{
|
|
598
612
|
id: "deepseek-v4-pro",
|
|
@@ -643,7 +657,51 @@ var PROFILES_RAW = [
|
|
|
643
657
|
transform: 6,
|
|
644
658
|
hunt: 4
|
|
645
659
|
// sequential tools — same as V4-Flash
|
|
646
|
-
}
|
|
660
|
+
},
|
|
661
|
+
// alpha.43 — family-level conventions for the `deepseek-reasoner` family
|
|
662
|
+
// (V4-Pro is the family rep; future thinking-mode members inherit).
|
|
663
|
+
//
|
|
664
|
+
// The decisive-archetype suffix is the load-bearing piece: 2026-05-28
|
|
665
|
+
// first real V4-Pro probe on tt-intel/classify (exclusion-finding ID 20)
|
|
666
|
+
// showed 8/10 judge rationales citing "candidate hedges and fails to
|
|
667
|
+
// commit to a single classification" or "candidate refuses to pick
|
|
668
|
+
// among the labels." Without the forcing-function suffix, every
|
|
669
|
+
// reasoner probe on classify/extract/ask verdicts stay-excluded for
|
|
670
|
+
// model-behavior reasons (epistemic humility is reasoner-shaped),
|
|
671
|
+
// NOT quality reasons. The suffix re-shapes the contract so the model
|
|
672
|
+
// is asked for what it's actually being measured on.
|
|
673
|
+
//
|
|
674
|
+
// The hunt-archetype cliffWarning is the L-040 architectural reading
|
|
675
|
+
// surfaced at compile time. Reasoners produce sequential reasoning
|
|
676
|
+
// chains by design; hunt archetypes with 3+ parallel tools lose
|
|
677
|
+
// substantial throughput (L-040 + L-041). The L-040 cliff in the
|
|
678
|
+
// `cliffs` array already trims to top-relevant tools; this warning
|
|
679
|
+
// tells the consumer the family is wrong for the shape so they can
|
|
680
|
+
// route to gemini-flash (parallel-strong) instead of accepting trimmed
|
|
681
|
+
// throughput silently.
|
|
682
|
+
archetypeConventions: [
|
|
683
|
+
{
|
|
684
|
+
archetype: "classify",
|
|
685
|
+
promptSuffix: "\n\nOutput exactly one classification label. Do not hedge, do not add preamble, do not explain your reasoning. If uncertain, pick the most likely label and commit to it.",
|
|
686
|
+
reason: "Reasoners (deepseek-reasoner family) hedge on decisive-output archetypes by design. Evidence: 2026-05-28 V4-Pro probe on tt-intel/classify (exclusion-finding ID 20, brain probe_outcomes); 8 of 10 judge rationales cited hedging or refusal-to-commit. Forcing-function suffix converts reasoner output to decisive labels."
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
archetype: "extract",
|
|
690
|
+
promptSuffix: "\n\nOutput exactly the requested structured fields. Do not hedge, do not add preamble, do not explain your reasoning. If a field is unknown, emit the field with a null/empty value and commit to that \u2014 do not refuse to extract.",
|
|
691
|
+
reason: "Reasoners (deepseek-reasoner family) hedge on decisive-output archetypes by design. Evidence: same family failure shape as classify (exclusion-finding ID 20, 2026-05-28). Forcing-function suffix asks for commitment instead of epistemic-humility hedging."
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
archetype: "ask",
|
|
695
|
+
promptSuffix: "\n\nAnswer the question directly. Do not hedge, do not add preamble, do not explain your reasoning unless explicitly asked. If uncertain, give your best answer and commit to it.",
|
|
696
|
+
reason: "Reasoners (deepseek-reasoner family) hedge on decisive-output archetypes by design. Evidence: same family failure shape as classify (exclusion-finding ID 20, 2026-05-28). Forcing-function suffix asks for commitment instead of epistemic-humility hedging."
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
archetype: "hunt",
|
|
700
|
+
whenToolCountAtLeast: 3,
|
|
701
|
+
cliffWarning: "Reasoners (deepseek-reasoner family) produce sequential reasoning chains by design; hunt archetypes with 3+ parallel tools lose substantial throughput. Consider gemini-flash family (parallel-strong) instead \u2014 see L-040 / L-041.",
|
|
702
|
+
reason: "L-040 + L-041 architectural reading; 2026-05-28 V4-Pro probe evidence (exclusion-finding ID 20) confirms reasoner-family hunt fit is structurally weak."
|
|
703
|
+
}
|
|
704
|
+
]
|
|
647
705
|
},
|
|
648
706
|
// ── OpenAI ──
|
|
649
707
|
// alpha.16 (2026-05-17): close the half-supported provider gap. env.ts
|
package/dist/profiles.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { r as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-MN9bGclm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { r as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-CSgyol5D.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmdrift/kgauto-compiler",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.43",
|
|
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",
|