@remnic/core 10.0.39 → 10.0.40
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/access-admin-ops-surface.js +12 -12
- package/dist/access-authorization-probe.js +13 -13
- package/dist/access-boundary.js +12 -12
- package/dist/access-cli.js +50 -50
- package/dist/access-extraction-force-flush.js +12 -12
- package/dist/access-http-briefing.js +13 -13
- package/dist/access-http-query.js +14 -14
- package/dist/access-http.js +28 -28
- package/dist/access-identity-continuity-surface.js +12 -12
- package/dist/access-lcm-surface.js +12 -12
- package/dist/access-mcp.js +21 -21
- package/dist/access-namespace-preflight.js +12 -12
- package/dist/access-observe-write-surface.js +12 -12
- package/dist/access-operations-batch.js +13 -13
- package/dist/access-operations.js +20 -20
- package/dist/access-recall-concurrency.js +12 -12
- package/dist/access-recall-response.js +12 -12
- package/dist/access-recall-surface.js +12 -12
- package/dist/access-service.d.ts +2 -2
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +12 -12
- package/dist/access-surface-catalog.js +14 -14
- package/dist/active-recall.js +2 -2
- package/dist/briefing.js +3 -3
- package/dist/causal-consolidation.js +4 -4
- package/dist/{chunk-NJ2DZYEK.js → chunk-2T6KEOUL.js} +2 -2
- package/dist/{chunk-BUKZ7MTN.js → chunk-5TRU6QQC.js} +2 -2
- package/dist/{chunk-SRPGA6WN.js → chunk-7BCYAJKP.js} +2 -2
- package/dist/{chunk-JRTKYFFY.js → chunk-AY6LO7GD.js} +2 -2
- package/dist/{chunk-5KZNWERU.js → chunk-BIYVUPC6.js} +19 -3
- package/dist/{chunk-5KZNWERU.js.map → chunk-BIYVUPC6.js.map} +1 -1
- package/dist/{chunk-V2XMG7GM.js → chunk-CHNZPOWX.js} +3 -2
- package/dist/{chunk-V2XMG7GM.js.map → chunk-CHNZPOWX.js.map} +1 -1
- package/dist/{chunk-GPVGAHXL.js → chunk-CNAL35D5.js} +2 -2
- package/dist/{chunk-CR72WZ3M.js → chunk-EPEDMEHO.js} +4 -4
- package/dist/{chunk-CR72WZ3M.js.map → chunk-EPEDMEHO.js.map} +1 -1
- package/dist/{chunk-U66CTIF5.js → chunk-F2RDRE7M.js} +2 -2
- package/dist/{chunk-B7VKRCAG.js → chunk-FNEYSTB6.js} +2 -2
- package/dist/{chunk-GSBSGT43.js → chunk-FPHU6KVI.js} +2 -2
- package/dist/{chunk-RO2NNWR5.js → chunk-GAUS4XGN.js} +3 -3
- package/dist/{chunk-4HJ2QK32.js → chunk-GDOI4U4D.js} +2 -2
- package/dist/{chunk-IZRNMXZC.js → chunk-GRN4BVPM.js} +2 -2
- package/dist/{chunk-VCOCOBUS.js → chunk-GZMHBRIR.js} +3 -3
- package/dist/{chunk-TTQYX7VU.js → chunk-HN35OH2C.js} +2 -2
- package/dist/{chunk-F2IU6A2L.js → chunk-HSNV4CSW.js} +16 -16
- package/dist/{chunk-EKR6OO4P.js → chunk-I7CWAJHX.js} +2 -2
- package/dist/{chunk-LJXBFVI2.js → chunk-ICTJOOWZ.js} +2 -2
- package/dist/{chunk-SJHFU52W.js → chunk-IF6EG22P.js} +5 -5
- package/dist/chunk-IF6EG22P.js.map +1 -0
- package/dist/{chunk-IAOW2L6K.js → chunk-IJJWM2ZA.js} +2 -2
- package/dist/{chunk-6Z2ZWBOV.js → chunk-IWDFHVPJ.js} +2 -2
- package/dist/{chunk-GCW7UT5I.js → chunk-JJSMSS45.js} +2 -2
- package/dist/{chunk-O2O4FDAH.js → chunk-JXQTECMU.js} +2 -2
- package/dist/{chunk-PJRKLB4Z.js → chunk-L5PM7B3I.js} +16 -2
- package/dist/{chunk-PJRKLB4Z.js.map → chunk-L5PM7B3I.js.map} +1 -1
- package/dist/{chunk-ZXFKG7VZ.js → chunk-LB6HIXQC.js} +2 -2
- package/dist/{chunk-B3I2QQU7.js → chunk-LWIU5BMA.js} +3 -3
- package/dist/{chunk-WQYS47G4.js → chunk-N3PUGD7E.js} +2 -2
- package/dist/{chunk-JORSMFL6.js → chunk-NBEM5QEH.js} +5 -5
- package/dist/{chunk-VIS23B6O.js → chunk-NFJWB27H.js} +14 -12
- package/dist/chunk-NFJWB27H.js.map +1 -0
- package/dist/{chunk-JQCP5QW3.js → chunk-O67H7OXJ.js} +2 -2
- package/dist/{chunk-4LLV2N3R.js → chunk-ONIVKGNC.js} +2 -2
- package/dist/{chunk-WT2VVYBM.js → chunk-PJXSBXEC.js} +2 -2
- package/dist/{chunk-ANV373S5.js → chunk-PW63SXFM.js} +2 -2
- package/dist/{chunk-RIAKNXZB.js → chunk-Q77SLBWT.js} +3 -3
- package/dist/{chunk-7IANFJ24.js → chunk-QFD7OANX.js} +15 -15
- package/dist/chunk-QFD7OANX.js.map +1 -0
- package/dist/{chunk-22YJQTPN.js → chunk-QGNZ5QPV.js} +2 -2
- package/dist/{chunk-GE5ZNDLE.js → chunk-R42VUN5V.js} +3 -3
- package/dist/{chunk-MD3W2H3G.js → chunk-RPHCSMTQ.js} +31 -31
- package/dist/{chunk-MD3W2H3G.js.map → chunk-RPHCSMTQ.js.map} +1 -1
- package/dist/{chunk-LPD6I2U6.js → chunk-SLVR3U4E.js} +2 -2
- package/dist/{chunk-JZFJZLJY.js → chunk-UGV256H3.js} +2 -2
- package/dist/{chunk-L74NWAD4.js → chunk-UKIIAEJF.js} +2 -2
- package/dist/{chunk-5Q6CR65T.js → chunk-VTZSIG6O.js} +2 -2
- package/dist/{chunk-4UT2NUAC.js → chunk-WJMAWDAU.js} +2 -2
- package/dist/{chunk-JT3IXJIL.js → chunk-XBHUMPIQ.js} +7 -7
- package/dist/{chunk-JM6U3SAE.js → chunk-XJ77IOAD.js} +2 -2
- package/dist/{chunk-RWW5KPIY.js → chunk-XLUMO5H2.js} +12 -12
- package/dist/chunk-XLUMO5H2.js.map +1 -0
- package/dist/{chunk-ODJ2HRFW.js → chunk-XXBCUIYQ.js} +7 -7
- package/dist/{chunk-JOOGPZJE.js → chunk-XXW3P3RX.js} +2 -2
- package/dist/{chunk-P3YUEPSQ.js → chunk-Y473XFTD.js} +2 -2
- package/dist/cli.js +38 -38
- package/dist/coding/export-okf-codegraph.js +2 -2
- package/dist/compounding/engine.js +4 -4
- package/dist/config.js +2 -2
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/index.js +3 -3
- package/dist/convergence-refresh.js +5 -5
- package/dist/corpus-watermark.js +5 -5
- package/dist/entity-retrieval.js +3 -3
- package/dist/external-wiki-access.js +13 -13
- package/dist/extraction-error-classification.d.ts +15 -0
- package/dist/extraction-error-classification.d.ts.map +1 -1
- package/dist/extraction-error-classification.js +7 -3
- package/dist/extraction.js +5 -5
- package/dist/harmonic-retrieval.js +3 -3
- package/dist/index.js +50 -50
- package/dist/location/index.js +5 -5
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection-runner.js +5 -5
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/memory-browse-operations.js +13 -13
- package/dist/namespaces/migrate.js +4 -4
- package/dist/namespaces/search.d.ts +1 -0
- package/dist/namespaces/search.d.ts.map +1 -1
- package/dist/namespaces/search.js +5 -3
- package/dist/namespaces/storage.js +3 -3
- package/dist/operator-doctor-corpus.js +6 -6
- package/dist/operator-toolkit.js +11 -11
- package/dist/orchestration/maintenance.js +13 -13
- package/dist/orchestration/qmd-result-resolver.d.ts +5 -0
- package/dist/orchestration/qmd-result-resolver.d.ts.map +1 -1
- package/dist/orchestration/recall-search-pipeline.d.ts.map +1 -1
- package/dist/orchestrator.js +50 -50
- package/dist/recall-navigation-operations.js +13 -13
- package/dist/recall-navigation.js +12 -12
- package/dist/resume-bundles.js +2 -2
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/source-agent-qualifier.js +3 -3
- package/dist/standup/build.js +3 -3
- package/dist/storage.js +2 -2
- package/dist/support-passport/index.js +15 -15
- package/dist/transfer/export-okf.js +3 -3
- package/dist/verified-recall.js +3 -3
- package/dist/who-knows-cli.js +4 -4
- package/dist/who-knows.js +3 -3
- package/package.json +2 -2
- package/src/access-entity-principal.test.ts +190 -0
- package/src/access-http.ts +2 -2
- package/src/access-operations-batch.ts +2 -2
- package/src/access-service.ts +7 -6
- package/src/chat/chat-executor.ts +1 -1
- package/src/extraction-error-classification.ts +23 -0
- package/src/extraction-local-failure-class.test.ts +55 -0
- package/src/extraction.ts +9 -9
- package/src/namespaces/search.ts +1 -1
- package/src/orchestration/extraction-run.test.ts +83 -2
- package/src/orchestration/qmd-result-resolver.ts +26 -1
- package/src/orchestration/recall-search-pipeline.ts +11 -12
- package/dist/chunk-7IANFJ24.js.map +0 -1
- package/dist/chunk-RWW5KPIY.js.map +0 -1
- package/dist/chunk-SJHFU52W.js.map +0 -1
- package/dist/chunk-VIS23B6O.js.map +0 -1
- /package/dist/{chunk-NJ2DZYEK.js.map → chunk-2T6KEOUL.js.map} +0 -0
- /package/dist/{chunk-BUKZ7MTN.js.map → chunk-5TRU6QQC.js.map} +0 -0
- /package/dist/{chunk-SRPGA6WN.js.map → chunk-7BCYAJKP.js.map} +0 -0
- /package/dist/{chunk-JRTKYFFY.js.map → chunk-AY6LO7GD.js.map} +0 -0
- /package/dist/{chunk-GPVGAHXL.js.map → chunk-CNAL35D5.js.map} +0 -0
- /package/dist/{chunk-U66CTIF5.js.map → chunk-F2RDRE7M.js.map} +0 -0
- /package/dist/{chunk-B7VKRCAG.js.map → chunk-FNEYSTB6.js.map} +0 -0
- /package/dist/{chunk-GSBSGT43.js.map → chunk-FPHU6KVI.js.map} +0 -0
- /package/dist/{chunk-RO2NNWR5.js.map → chunk-GAUS4XGN.js.map} +0 -0
- /package/dist/{chunk-4HJ2QK32.js.map → chunk-GDOI4U4D.js.map} +0 -0
- /package/dist/{chunk-IZRNMXZC.js.map → chunk-GRN4BVPM.js.map} +0 -0
- /package/dist/{chunk-VCOCOBUS.js.map → chunk-GZMHBRIR.js.map} +0 -0
- /package/dist/{chunk-TTQYX7VU.js.map → chunk-HN35OH2C.js.map} +0 -0
- /package/dist/{chunk-F2IU6A2L.js.map → chunk-HSNV4CSW.js.map} +0 -0
- /package/dist/{chunk-EKR6OO4P.js.map → chunk-I7CWAJHX.js.map} +0 -0
- /package/dist/{chunk-LJXBFVI2.js.map → chunk-ICTJOOWZ.js.map} +0 -0
- /package/dist/{chunk-IAOW2L6K.js.map → chunk-IJJWM2ZA.js.map} +0 -0
- /package/dist/{chunk-6Z2ZWBOV.js.map → chunk-IWDFHVPJ.js.map} +0 -0
- /package/dist/{chunk-GCW7UT5I.js.map → chunk-JJSMSS45.js.map} +0 -0
- /package/dist/{chunk-O2O4FDAH.js.map → chunk-JXQTECMU.js.map} +0 -0
- /package/dist/{chunk-ZXFKG7VZ.js.map → chunk-LB6HIXQC.js.map} +0 -0
- /package/dist/{chunk-B3I2QQU7.js.map → chunk-LWIU5BMA.js.map} +0 -0
- /package/dist/{chunk-WQYS47G4.js.map → chunk-N3PUGD7E.js.map} +0 -0
- /package/dist/{chunk-JORSMFL6.js.map → chunk-NBEM5QEH.js.map} +0 -0
- /package/dist/{chunk-JQCP5QW3.js.map → chunk-O67H7OXJ.js.map} +0 -0
- /package/dist/{chunk-4LLV2N3R.js.map → chunk-ONIVKGNC.js.map} +0 -0
- /package/dist/{chunk-WT2VVYBM.js.map → chunk-PJXSBXEC.js.map} +0 -0
- /package/dist/{chunk-ANV373S5.js.map → chunk-PW63SXFM.js.map} +0 -0
- /package/dist/{chunk-RIAKNXZB.js.map → chunk-Q77SLBWT.js.map} +0 -0
- /package/dist/{chunk-22YJQTPN.js.map → chunk-QGNZ5QPV.js.map} +0 -0
- /package/dist/{chunk-GE5ZNDLE.js.map → chunk-R42VUN5V.js.map} +0 -0
- /package/dist/{chunk-LPD6I2U6.js.map → chunk-SLVR3U4E.js.map} +0 -0
- /package/dist/{chunk-JZFJZLJY.js.map → chunk-UGV256H3.js.map} +0 -0
- /package/dist/{chunk-L74NWAD4.js.map → chunk-UKIIAEJF.js.map} +0 -0
- /package/dist/{chunk-5Q6CR65T.js.map → chunk-VTZSIG6O.js.map} +0 -0
- /package/dist/{chunk-4UT2NUAC.js.map → chunk-WJMAWDAU.js.map} +0 -0
- /package/dist/{chunk-JT3IXJIL.js.map → chunk-XBHUMPIQ.js.map} +0 -0
- /package/dist/{chunk-JM6U3SAE.js.map → chunk-XJ77IOAD.js.map} +0 -0
- /package/dist/{chunk-ODJ2HRFW.js.map → chunk-XXBCUIYQ.js.map} +0 -0
- /package/dist/{chunk-JOOGPZJE.js.map → chunk-XXW3P3RX.js.map} +0 -0
- /package/dist/{chunk-P3YUEPSQ.js.map → chunk-Y473XFTD.js.map} +0 -0
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./chunk-NVKO5YKP.js";
|
|
35
35
|
import {
|
|
36
36
|
compareEntityTimestamps
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BIYVUPC6.js";
|
|
38
38
|
import {
|
|
39
39
|
normalizeEntityText,
|
|
40
40
|
resolveRequestedEntitySectionKeys
|
|
@@ -927,4 +927,4 @@ export {
|
|
|
927
927
|
entityIndexVersion,
|
|
928
928
|
entityRecentTranscriptLookbackHours
|
|
929
929
|
};
|
|
930
|
-
//# sourceMappingURL=chunk-
|
|
930
|
+
//# sourceMappingURL=chunk-IWDFHVPJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFrontmatter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BIYVUPC6.js";
|
|
4
4
|
import {
|
|
5
5
|
activityDigestPath,
|
|
6
6
|
isValidActivityDate
|
|
@@ -199,4 +199,4 @@ export {
|
|
|
199
199
|
buildStandup,
|
|
200
200
|
standupHelp
|
|
201
201
|
};
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-JJSMSS45.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveCorpusNamespaceRoots
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VTZSIG6O.js";
|
|
4
4
|
import {
|
|
5
5
|
capabilityAllowsNamespace
|
|
6
6
|
} from "./chunk-IG747LRN.js";
|
|
@@ -200,4 +200,4 @@ async function readAggregateExtractionWatermark(options) {
|
|
|
200
200
|
export {
|
|
201
201
|
readAggregateExtractionWatermark
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=chunk-
|
|
203
|
+
//# sourceMappingURL=chunk-JXQTECMU.js.map
|
|
@@ -46,10 +46,24 @@ function formatExtractionParseFailureLog(input) {
|
|
|
46
46
|
`traceId=${input.traceId}`
|
|
47
47
|
].join(" ");
|
|
48
48
|
}
|
|
49
|
+
var LocalLlmRejectedError = class extends Error {
|
|
50
|
+
constructor(httpStatus) {
|
|
51
|
+
super(httpStatus === void 0 ? "local LLM answered with unusable content" : `local LLM rejected the input (HTTP ${httpStatus})`);
|
|
52
|
+
this.httpStatus = httpStatus;
|
|
53
|
+
this.name = "LocalLlmRejectedError";
|
|
54
|
+
}
|
|
55
|
+
httpStatus;
|
|
56
|
+
};
|
|
57
|
+
function localRejectionStatus(diag) {
|
|
58
|
+
const status = httpStatusFromError(diag.lastError);
|
|
59
|
+
return status !== void 0 && [400, 413, 422].includes(status) ? status : void 0;
|
|
60
|
+
}
|
|
49
61
|
|
|
50
62
|
export {
|
|
51
63
|
classifyExtractionThrownError,
|
|
52
64
|
classifyFallbackParseFailure,
|
|
53
|
-
formatExtractionParseFailureLog
|
|
65
|
+
formatExtractionParseFailureLog,
|
|
66
|
+
LocalLlmRejectedError,
|
|
67
|
+
localRejectionStatus
|
|
54
68
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-L5PM7B3I.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/extraction-error-classification.ts"],"sourcesContent":["import type { ExtractionFailureClass } from \"./types.js\";\nimport { isTransientHttpError } from \"./connectors/live/transient-errors.js\";\n\n/**\n * Read a numeric HTTP status off a thrown error without re-implementing the\n * shared transient classifier. Uses `in`/typeof narrowing (no inline casts).\n */\nfunction httpStatusFromError(err: unknown): number | undefined {\n if (!err || typeof err !== \"object\") return undefined;\n if (\"status\" in err && typeof err.status === \"number\" && Number.isFinite(err.status)) return err.status;\n if (\"statusCode\" in err && typeof err.statusCode === \"number\" && Number.isFinite(err.statusCode)) {\n return err.statusCode;\n }\n return undefined;\n}\n\n/**\n * Map a thrown extraction error to a coarse failure class for the retry/breaker\n * layer. 401/403 → `auth_config` (misconfigured provider, open the breaker);\n * transient (429/5xx/network, per the shared `isTransientHttpError`) → back off;\n * anything else defaults to `provider_retryable` (fail-open toward retry, but\n * capped by the per-fingerprint attempt budget). Never throws.\n */\nexport function classifyExtractionThrownError(err: unknown): ExtractionFailureClass {\n try {\n const status = httpStatusFromError(err);\n if (status === 401 || status === 403) return \"auth_config\";\n if (isTransientHttpError(err)) return \"provider_retryable\";\n return \"provider_retryable\";\n } catch {\n return \"provider_retryable\";\n }\n}\n\n/**\n * Map the gateway fallback's discriminated parse-failure reason to a coarse\n * extraction failure class. \"no models configured\" is an auth/config problem;\n * an HTTP/transport failure backs off; an unparseable-but-present response is a\n * genuine empty-parse.\n */\nexport function classifyFallbackParseFailure(\n reason: \"no_models\" | \"empty\" | \"http_error\" | \"schema_rejection\" | \"timeout\",\n): ExtractionFailureClass {\n switch (reason) {\n case \"no_models\":\n return \"auth_config\";\n case \"http_error\":\n case \"timeout\":\n return \"provider_retryable\";\n case \"empty\":\n case \"schema_rejection\":\n return \"parse_empty\";\n }\n}\n\n/**\n * Operator-visible extraction parse-failure line. Keeps the historical\n * greppable prefix and appends the fields that used to live only at debug.\n */\nexport function formatExtractionParseFailureLog(input: {\n failureReason: string;\n attemptedModel?: string;\n httpStatus?: number;\n errorClass?: string;\n traceId: string;\n}): string {\n const modelUsed =\n typeof input.attemptedModel === \"string\" && input.attemptedModel.length > 0\n ? input.attemptedModel\n : \"unknown\";\n const errorClass =\n typeof input.errorClass === \"string\" && input.errorClass.length > 0\n ? input.errorClass\n : \"none\";\n const httpStatus =\n typeof input.httpStatus === \"number\" && Number.isFinite(input.httpStatus)\n ? String(input.httpStatus)\n : \"none\";\n return [\n \"extraction fallback returned no parsed output\",\n `failureReason=${input.failureReason}`,\n `modelUsed=${modelUsed}`,\n `errorClass=${errorClass}`,\n `httpStatus=${httpStatus}`,\n `traceId=${input.traceId}`,\n ].join(\" \");\n}\n"],"mappings":";;;;;AAOA,SAAS,oBAAoB,KAAkC;AAC7D,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,MAAI,YAAY,OAAO,OAAO,IAAI,WAAW,YAAY,OAAO,SAAS,IAAI,MAAM,EAAG,QAAO,IAAI;AACjG,MAAI,gBAAgB,OAAO,OAAO,IAAI,eAAe,YAAY,OAAO,SAAS,IAAI,UAAU,GAAG;AAChG,WAAO,IAAI;AAAA,EACb;AACA,SAAO;AACT;AASO,SAAS,8BAA8B,KAAsC;AAClF,MAAI;AACF,UAAM,SAAS,oBAAoB,GAAG;AACtC,QAAI,WAAW,OAAO,WAAW,IAAK,QAAO;AAC7C,QAAI,qBAAqB,GAAG,EAAG,QAAO;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAQO,SAAS,6BACd,QACwB;AACxB,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,EACX;AACF;AAMO,SAAS,gCAAgC,OAMrC;AACT,QAAM,YACJ,OAAO,MAAM,mBAAmB,YAAY,MAAM,eAAe,SAAS,IACtE,MAAM,iBACN;AACN,QAAM,aACJ,OAAO,MAAM,eAAe,YAAY,MAAM,WAAW,SAAS,IAC9D,MAAM,aACN;AACN,QAAM,aACJ,OAAO,MAAM,eAAe,YAAY,OAAO,SAAS,MAAM,UAAU,IACpE,OAAO,MAAM,UAAU,IACvB;AACN,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB,MAAM,aAAa;AAAA,IACpC,aAAa,SAAS;AAAA,IACtB,cAAc,UAAU;AAAA,IACxB,cAAc,UAAU;AAAA,IACxB,WAAW,MAAM,OAAO;AAAA,EAC1B,EAAE,KAAK,GAAG;AACZ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/extraction-error-classification.ts"],"sourcesContent":["import type { ExtractionFailureClass } from \"./types.js\";\nimport { isTransientHttpError } from \"./connectors/live/transient-errors.js\";\n\n/**\n * Read a numeric HTTP status off a thrown error without re-implementing the\n * shared transient classifier. Uses `in`/typeof narrowing (no inline casts).\n */\nfunction httpStatusFromError(err: unknown): number | undefined {\n if (!err || typeof err !== \"object\") return undefined;\n if (\"status\" in err && typeof err.status === \"number\" && Number.isFinite(err.status)) return err.status;\n if (\"statusCode\" in err && typeof err.statusCode === \"number\" && Number.isFinite(err.statusCode)) {\n return err.statusCode;\n }\n return undefined;\n}\n\n/**\n * Map a thrown extraction error to a coarse failure class for the retry/breaker\n * layer. 401/403 → `auth_config` (misconfigured provider, open the breaker);\n * transient (429/5xx/network, per the shared `isTransientHttpError`) → back off;\n * anything else defaults to `provider_retryable` (fail-open toward retry, but\n * capped by the per-fingerprint attempt budget). Never throws.\n */\nexport function classifyExtractionThrownError(err: unknown): ExtractionFailureClass {\n try {\n const status = httpStatusFromError(err);\n if (status === 401 || status === 403) return \"auth_config\";\n if (isTransientHttpError(err)) return \"provider_retryable\";\n return \"provider_retryable\";\n } catch {\n return \"provider_retryable\";\n }\n}\n\n/**\n * Map the gateway fallback's discriminated parse-failure reason to a coarse\n * extraction failure class. \"no models configured\" is an auth/config problem;\n * an HTTP/transport failure backs off; an unparseable-but-present response is a\n * genuine empty-parse.\n */\nexport function classifyFallbackParseFailure(\n reason: \"no_models\" | \"empty\" | \"http_error\" | \"schema_rejection\" | \"timeout\",\n): ExtractionFailureClass {\n switch (reason) {\n case \"no_models\":\n return \"auth_config\";\n case \"http_error\":\n case \"timeout\":\n return \"provider_retryable\";\n case \"empty\":\n case \"schema_rejection\":\n return \"parse_empty\";\n }\n}\n\n/**\n * Operator-visible extraction parse-failure line. Keeps the historical\n * greppable prefix and appends the fields that used to live only at debug.\n */\nexport function formatExtractionParseFailureLog(input: {\n failureReason: string;\n attemptedModel?: string;\n httpStatus?: number;\n errorClass?: string;\n traceId: string;\n}): string {\n const modelUsed =\n typeof input.attemptedModel === \"string\" && input.attemptedModel.length > 0\n ? input.attemptedModel\n : \"unknown\";\n const errorClass =\n typeof input.errorClass === \"string\" && input.errorClass.length > 0\n ? input.errorClass\n : \"none\";\n const httpStatus =\n typeof input.httpStatus === \"number\" && Number.isFinite(input.httpStatus)\n ? String(input.httpStatus)\n : \"none\";\n return [\n \"extraction fallback returned no parsed output\",\n `failureReason=${input.failureReason}`,\n `modelUsed=${modelUsed}`,\n `errorClass=${errorClass}`,\n `httpStatus=${httpStatus}`,\n `traceId=${input.traceId}`,\n ].join(\" \");\n}\n\n/**\n * The local endpoint answered, and what it said rejects this input (unusable content, or a client error that is not\n * auth, timeout or rate limiting): the chunk's problem, not an outage. Retried like an empty parse, and a trigger-drain\n * chunk that keeps drawing it is dropped after its recovery copy is saved.\n */\nexport class LocalLlmRejectedError extends Error {\n constructor(readonly httpStatus?: number) {\n super(httpStatus === undefined ? \"local LLM answered with unusable content\" : `local LLM rejected the input (HTTP ${httpStatus})`);\n this.name = \"LocalLlmRejectedError\";\n }\n}\n\n/** What the local client recorded about a failed call (`failureDiag`). */\nexport interface LocalFailureDiag {\n lastError?: unknown;\n}\n\n/** The HTTP status when the local endpoint answered and refuses this input (400, 413, 422); else undefined. A wrong model name or route (404, 405, 410), auth, timeout and rate limiting are the setup's problem, not the chunk's. */\nexport function localRejectionStatus(diag: LocalFailureDiag): number | undefined {\n const status = httpStatusFromError(diag.lastError);\n return status !== undefined && [400, 413, 422].includes(status) ? status : undefined;\n}\n"],"mappings":";;;;;AAOA,SAAS,oBAAoB,KAAkC;AAC7D,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,MAAI,YAAY,OAAO,OAAO,IAAI,WAAW,YAAY,OAAO,SAAS,IAAI,MAAM,EAAG,QAAO,IAAI;AACjG,MAAI,gBAAgB,OAAO,OAAO,IAAI,eAAe,YAAY,OAAO,SAAS,IAAI,UAAU,GAAG;AAChG,WAAO,IAAI;AAAA,EACb;AACA,SAAO;AACT;AASO,SAAS,8BAA8B,KAAsC;AAClF,MAAI;AACF,UAAM,SAAS,oBAAoB,GAAG;AACtC,QAAI,WAAW,OAAO,WAAW,IAAK,QAAO;AAC7C,QAAI,qBAAqB,GAAG,EAAG,QAAO;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAQO,SAAS,6BACd,QACwB;AACxB,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,EACX;AACF;AAMO,SAAS,gCAAgC,OAMrC;AACT,QAAM,YACJ,OAAO,MAAM,mBAAmB,YAAY,MAAM,eAAe,SAAS,IACtE,MAAM,iBACN;AACN,QAAM,aACJ,OAAO,MAAM,eAAe,YAAY,MAAM,WAAW,SAAS,IAC9D,MAAM,aACN;AACN,QAAM,aACJ,OAAO,MAAM,eAAe,YAAY,OAAO,SAAS,MAAM,UAAU,IACpE,OAAO,MAAM,UAAU,IACvB;AACN,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB,MAAM,aAAa;AAAA,IACpC,aAAa,SAAS;AAAA,IACtB,cAAc,UAAU;AAAA,IACxB,cAAc,UAAU;AAAA,IACxB,WAAW,MAAM,OAAO;AAAA,EAC1B,EAAE,KAAK,GAAG;AACZ;AAOO,IAAM,wBAAN,cAAoC,MAAM;AAAA,EAC/C,YAAqB,YAAqB;AACxC,UAAM,eAAe,SAAY,6CAA6C,sCAAsC,UAAU,GAAG;AAD9G;AAEnB,SAAK,OAAO;AAAA,EACd;AAAA,EAHqB;AAIvB;AAQO,SAAS,qBAAqB,MAA4C;AAC/E,QAAM,SAAS,oBAAoB,KAAK,SAAS;AACjD,SAAO,WAAW,UAAa,CAAC,KAAK,KAAK,GAAG,EAAE,SAAS,MAAM,IAAI,SAAS;AAC7E;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SupportPassportError,
|
|
3
3
|
getOperation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QFD7OANX.js";
|
|
5
5
|
import {
|
|
6
6
|
abortError,
|
|
7
7
|
isAbortError
|
|
@@ -499,4 +499,4 @@ export {
|
|
|
499
499
|
buildSupportPassportPublicRequestHandler,
|
|
500
500
|
composeSupportPassportExternalRequestHandlers
|
|
501
501
|
};
|
|
502
|
-
//# sourceMappingURL=chunk-
|
|
502
|
+
//# sourceMappingURL=chunk-LB6HIXQC.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasMemoryData
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7BCYAJKP.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNamespaceStorageRoot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GDOI4U4D.js";
|
|
7
7
|
import {
|
|
8
8
|
getConfiguredNamespaces
|
|
9
9
|
} from "./chunk-I6QGI65T.js";
|
|
@@ -724,4 +724,4 @@ export {
|
|
|
724
724
|
runNamespaceMaintenancePlan,
|
|
725
725
|
runNamespaceMaintenanceBatchPlan
|
|
726
726
|
};
|
|
727
|
-
//# sourceMappingURL=chunk-
|
|
727
|
+
//# sourceMappingURL=chunk-LWIU5BMA.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNamespaceKind
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7BCYAJKP.js";
|
|
4
4
|
import {
|
|
5
5
|
EngramAccessInputError
|
|
6
6
|
} from "./chunk-3MUKQQ7A.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
positiveIntQueryParam,
|
|
41
41
|
optionalNamespaceKindQueryParam
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-N3PUGD7E.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildStandup,
|
|
3
3
|
parseStandupDate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JJSMSS45.js";
|
|
5
5
|
import {
|
|
6
6
|
backfillMemoryStorage,
|
|
7
7
|
runLocationBackfill,
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
runLocationDay,
|
|
10
10
|
runLocationStatus,
|
|
11
11
|
runLocationSync
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R42VUN5V.js";
|
|
13
13
|
import {
|
|
14
14
|
externalWikiSearchOperation
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GRN4BVPM.js";
|
|
16
16
|
import {
|
|
17
17
|
DECISION_SUBCOMMANDS,
|
|
18
18
|
DELTA_SUBCOMMANDS,
|
|
19
19
|
defineOperation,
|
|
20
20
|
isCodegraphToolName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QFD7OANX.js";
|
|
22
22
|
import {
|
|
23
23
|
CorrectionContractError
|
|
24
24
|
} from "./chunk-ETSJD5IV.js";
|
|
@@ -1916,4 +1916,4 @@ export {
|
|
|
1916
1916
|
codegraphIngestTracesOperation,
|
|
1917
1917
|
REGISTERED_OPERATIONS
|
|
1918
1918
|
};
|
|
1919
|
-
//# sourceMappingURL=chunk-
|
|
1919
|
+
//# sourceMappingURL=chunk-NBEM5QEH.js.map
|
|
@@ -41,10 +41,12 @@ import {
|
|
|
41
41
|
isPlainRecord
|
|
42
42
|
} from "./chunk-BVRZSI7Q.js";
|
|
43
43
|
import {
|
|
44
|
+
LocalLlmRejectedError,
|
|
44
45
|
classifyExtractionThrownError,
|
|
45
46
|
classifyFallbackParseFailure,
|
|
46
|
-
formatExtractionParseFailureLog
|
|
47
|
-
|
|
47
|
+
formatExtractionParseFailureLog,
|
|
48
|
+
localRejectionStatus
|
|
49
|
+
} from "./chunk-L5PM7B3I.js";
|
|
48
50
|
import {
|
|
49
51
|
delinearize
|
|
50
52
|
} from "./chunk-VEWZZM3H.js";
|
|
@@ -1023,7 +1025,7 @@ var ExtractionEngine = class {
|
|
|
1023
1025
|
entities: [],
|
|
1024
1026
|
questions: [],
|
|
1025
1027
|
extractionFailure: "local_llm_error",
|
|
1026
|
-
extractionFailureClass: "
|
|
1028
|
+
extractionFailureClass: err instanceof LocalLlmRejectedError ? "parse_empty" : classifyExtractionThrownError(err)
|
|
1027
1029
|
};
|
|
1028
1030
|
}
|
|
1029
1031
|
log.info("extraction: local LLM error, falling back to gateway default AI:", err);
|
|
@@ -1268,9 +1270,8 @@ ${extractionResponseShape(this.config.extraction?.spanMode ?? "off")}
|
|
|
1268
1270
|
|
|
1269
1271
|
Conversation:
|
|
1270
1272
|
${truncatedConversation}`;
|
|
1271
|
-
log.debug(
|
|
1272
|
-
|
|
1273
|
-
);
|
|
1273
|
+
log.debug(`extractWithLocalLlm: calling localLlm.chatCompletion with prompt length ${localPrompt.length}...`);
|
|
1274
|
+
const failureDiag = {};
|
|
1274
1275
|
const response = await this.localLlm.chatCompletion(
|
|
1275
1276
|
[
|
|
1276
1277
|
{ role: "system", content: "You are a memory extraction system. Output valid JSON only." },
|
|
@@ -1283,10 +1284,13 @@ ${truncatedConversation}`;
|
|
|
1283
1284
|
responseFormat: extractionProviderResponseFormat(this.config.extraction?.spanMode ?? "off"),
|
|
1284
1285
|
disableThinking: shouldEnableLocalExtractionThinking(this.config, conversation.length) ? false : void 0,
|
|
1285
1286
|
priority: "background",
|
|
1286
|
-
signal
|
|
1287
|
+
signal,
|
|
1288
|
+
failureDiag
|
|
1287
1289
|
}
|
|
1288
1290
|
);
|
|
1289
1291
|
if (!response?.content) {
|
|
1292
|
+
const rejected = localRejectionStatus(failureDiag);
|
|
1293
|
+
if (rejected !== void 0) throw new LocalLlmRejectedError(rejected);
|
|
1290
1294
|
log.debug("extractWithLocalLlm: chatCompletion returned null or empty content");
|
|
1291
1295
|
return null;
|
|
1292
1296
|
}
|
|
@@ -1310,12 +1314,10 @@ ${truncatedConversation}`;
|
|
|
1310
1314
|
log.debug("extractWithLocalLlm: JSON parse failed, attempting partial extraction...");
|
|
1311
1315
|
const partial = this.extractPartialFacts(content);
|
|
1312
1316
|
if (partial.facts.length > 0 || partial.entities.length > 0) {
|
|
1313
|
-
log.debug(
|
|
1314
|
-
`extractWithLocalLlm: extracted ${partial.facts.length} partial facts from truncated JSON`
|
|
1315
|
-
);
|
|
1317
|
+
log.debug(`extractWithLocalLlm: extracted ${partial.facts.length} partial facts from truncated JSON`);
|
|
1316
1318
|
return partial;
|
|
1317
1319
|
}
|
|
1318
|
-
|
|
1320
|
+
throw new LocalLlmRejectedError();
|
|
1319
1321
|
}
|
|
1320
1322
|
/**
|
|
1321
1323
|
* Extract memories using direct OpenAI-compatible client (Chat Completions API).
|
|
@@ -2439,4 +2441,4 @@ export {
|
|
|
2439
2441
|
shouldEnableLocalExtractionThinking,
|
|
2440
2442
|
ExtractionEngine
|
|
2441
2443
|
};
|
|
2442
|
-
//# sourceMappingURL=chunk-
|
|
2444
|
+
//# sourceMappingURL=chunk-NFJWB27H.js.map
|