@warmdrift/kgauto-compiler 2.0.0-alpha.29 → 2.0.0-alpha.30

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/index.js CHANGED
@@ -2971,6 +2971,9 @@ function registerCompile(appId, archetype, ir, result) {
2971
2971
  learningKey: learningKey(archetype, result.target, shape),
2972
2972
  estimatedTokensIn: tokens,
2973
2973
  mutationsApplied: result.mutationsApplied.map((m) => m.id),
2974
+ // alpha.30: cache the in-memory advisories so record() can auto-persist
2975
+ // to `compile_outcome_advisories` without consumer-side threading.
2976
+ advisoriesFromCompile: result.advisories ?? [],
2974
2977
  startedAt: Date.now(),
2975
2978
  historyCacheableTokens: result.diagnostics.historyCacheableTokens,
2976
2979
  historyTokensTotal: result.diagnostics.historyTokensTotal,
@@ -3036,7 +3039,7 @@ async function record(input) {
3036
3039
  (config.onError ?? defaultOnError2)(err);
3037
3040
  return;
3038
3041
  }
3039
- const advisories = input.advisories;
3042
+ const advisories = input.advisories ?? reg?.advisoriesFromCompile;
3040
3043
  if (!advisories || advisories.length === 0) return;
3041
3044
  if (outcomeId === void 0) return;
3042
3045
  try {
package/dist/index.mjs CHANGED
@@ -1397,6 +1397,9 @@ function registerCompile(appId, archetype, ir, result) {
1397
1397
  learningKey: learningKey(archetype, result.target, shape),
1398
1398
  estimatedTokensIn: tokens,
1399
1399
  mutationsApplied: result.mutationsApplied.map((m) => m.id),
1400
+ // alpha.30: cache the in-memory advisories so record() can auto-persist
1401
+ // to `compile_outcome_advisories` without consumer-side threading.
1402
+ advisoriesFromCompile: result.advisories ?? [],
1400
1403
  startedAt: Date.now(),
1401
1404
  historyCacheableTokens: result.diagnostics.historyCacheableTokens,
1402
1405
  historyTokensTotal: result.diagnostics.historyTokensTotal,
@@ -1462,7 +1465,7 @@ async function record(input) {
1462
1465
  (config.onError ?? defaultOnError)(err);
1463
1466
  return;
1464
1467
  }
1465
- const advisories = input.advisories;
1468
+ const advisories = input.advisories ?? reg?.advisoriesFromCompile;
1466
1469
  if (!advisories || advisories.length === 0) return;
1467
1470
  if (outcomeId === void 0) return;
1468
1471
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmdrift/kgauto-compiler",
3
- "version": "2.0.0-alpha.29",
3
+ "version": "2.0.0-alpha.30",
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",