@happyvertical/smrt-ingestion 0.57.29 → 0.57.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/PROPOSALS.md +115 -8
- package/README.md +12 -0
- package/REVIEW.md +9 -0
- package/dist/chunks/{execution-Dv3G0d62.js → execution-BxkUOtLf.js} +119 -3
- package/dist/chunks/execution-BxkUOtLf.js.map +1 -0
- package/dist/chunks/{feedback-PLOZth0a.js → feedback-D69e1hX5.js} +3 -3
- package/dist/chunks/{feedback-PLOZth0a.js.map → feedback-D69e1hX5.js.map} +1 -1
- package/dist/chunks/proposal-contracts-CqVVPvqq.js.map +1 -1
- package/dist/chunks/{reviewer-instruction-zn11aVA5.js → reviewer-instruction-Ip4W4f0j.js} +2 -2
- package/dist/chunks/{reviewer-instruction-zn11aVA5.js.map → reviewer-instruction-Ip4W4f0j.js.map} +1 -1
- package/dist/execution-internal.d.ts +4 -0
- package/dist/execution-internal.d.ts.map +1 -1
- package/dist/execution.d.ts +7 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/failure-capture.d.ts +73 -0
- package/dist/failure-capture.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/proposal-contracts.d.ts +8 -0
- package/dist/proposal-contracts.d.ts.map +1 -1
- package/dist/proposal-dto.d.ts +27 -0
- package/dist/proposal-dto.d.ts.map +1 -1
- package/dist/proposal-sdk.d.ts.map +1 -1
- package/dist/proposals.d.ts +2 -0
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +188 -11
- package/dist/proposals.js.map +1 -1
- package/dist/provider-failure.d.ts +15 -0
- package/dist/provider-failure.d.ts.map +1 -1
- package/dist/server.d.ts +15 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +39 -6
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +14 -14
- package/package.json +17 -17
- package/dist/chunks/execution-Dv3G0d62.js.map +0 -1
|
@@ -94,6 +94,14 @@ export interface ProposalConfiguration extends DecisionSettings {
|
|
|
94
94
|
identity: ProviderIdentity;
|
|
95
95
|
};
|
|
96
96
|
limits: GenerationLimits;
|
|
97
|
+
/**
|
|
98
|
+
* Opt-in, bounded, redacted capture of the model output on a failed
|
|
99
|
+
* interpretation attempt (#4285). Text requires a host redactor; absent or
|
|
100
|
+
* failed redaction retains no text. Off when absent. Not public read
|
|
101
|
+
* configuration: it never enters frozen configuration, digests or
|
|
102
|
+
* `proposalReadConfiguration`. See PROPOSALS.md.
|
|
103
|
+
*/
|
|
104
|
+
failureCapture?: import('./failure-capture.js').FailureCaptureConfiguration;
|
|
97
105
|
}
|
|
98
106
|
/** Credential-free configuration for validating persisted proposal snapshots. */
|
|
99
107
|
export interface ProposalReadConfiguration extends DecisionSettings {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposal-contracts.d.ts","sourceRoot":"","sources":["../src/proposal-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,kFAAkF;IAClF,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAC7D,2EAA2E;IAC3E,UAAU,CAAC,CACT,KAAK,EAAE,MAAM,EACb,OA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view = {
|
|
|
171
171
|
export interface GenerationAnalysisOutput {
|
|
172
172
|
proposals: GenerationOutput;
|
|
173
173
|
}
|
|
174
|
+
/** What a failed-attempt capture holds (#4285). */
|
|
175
|
+
export type FailedAttemptCaptureSource =
|
|
176
|
+
/** The provider's reply text, refused by the SDK adapter (e.g. invalid JSON). */
|
|
177
|
+
'raw_response'
|
|
178
|
+
/** The generator's parsed output that failed validation or a limit, as JSON. */
|
|
179
|
+
| 'generated_output';
|
|
180
|
+
export type FailedAttemptCaptureStatus = 'captured' | 'redaction_failed';
|
|
181
|
+
/**
|
|
182
|
+
* Opt-in diagnostic capture of a failed interpretation attempt. It contains
|
|
183
|
+
* document-derived model output: read it only through the reviewer-authorized
|
|
184
|
+
* `getFailedAttemptCapture`, and never put it in lists, logs or telemetry.
|
|
185
|
+
*/
|
|
186
|
+
export interface FailedAttemptCapture {
|
|
187
|
+
itemId: string;
|
|
188
|
+
attemptId: string;
|
|
189
|
+
source: FailedAttemptCaptureSource;
|
|
190
|
+
/** `redaction_failed`: the host hook was missing or failed; no text stored. */
|
|
191
|
+
status: FailedAttemptCaptureStatus;
|
|
192
|
+
/** Redacted, bounded text; present only when `status` is `captured`. */
|
|
193
|
+
text?: string;
|
|
194
|
+
/** The text was cut at `maxBytes` (or at the generation output bound). */
|
|
195
|
+
truncated: boolean;
|
|
196
|
+
/** A hook was configured; the host owns its semantic redaction policy. */
|
|
197
|
+
redacted: boolean;
|
|
198
|
+
maxBytes: number;
|
|
199
|
+
capturedAt: string;
|
|
200
|
+
}
|
|
174
201
|
//# sourceMappingURL=proposal-dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposal-dto.d.ts","sourceRoot":"","sources":["../src/proposal-dto.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UA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cAAc,CAYhB"}
|
package/dist/proposals.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { generationSnapshotRead, type TransactionRunner } from './execution-inte
|
|
|
3
3
|
import type { GenerationStageConfiguration, GenerativeProposalInput, ProposalConfiguration, ProposalReadConfiguration } from './proposal-contracts.js';
|
|
4
4
|
import type { CandidatePage, CompletedAnalysisSnapshot, GeneratedPreview, GenerationOutput, PreviewGeneratedInput, ProposalCatalogEntry } from './proposal-dto.js';
|
|
5
5
|
import type { AnalysisLease, IngestionOptions, IngestionService } from './server.js';
|
|
6
|
+
export { FAILURE_CAPTURE_DEFAULT_MAX_BYTES, FAILURE_CAPTURE_MAX_BYTES, type FailureCaptureConfiguration, } from './failure-capture.js';
|
|
6
7
|
export type * from './proposal-contracts.js';
|
|
7
8
|
export type { ProposalConfiguration, ProposalReadConfiguration, } from './proposal-contracts.js';
|
|
8
9
|
export { proposalReadConfiguration } from './proposal-contracts.js';
|
|
@@ -26,6 +27,7 @@ export declare class IngestionProposalService {
|
|
|
26
27
|
/** Frozen public decision settings; defaults are omitted so existing digests hold. */
|
|
27
28
|
private decisionSettings;
|
|
28
29
|
private readonly config;
|
|
30
|
+
private readonly failureCapture?;
|
|
29
31
|
private generation;
|
|
30
32
|
private handler;
|
|
31
33
|
private entry;
|
package/dist/proposals.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals.d.ts","sourceRoot":"","sources":["../src/proposals.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAa5D,OAAO,
|
|
1
|
+
{"version":3,"file":"proposals.d.ts","sourceRoot":"","sources":["../src/proposals.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAa5D,OAAO,EAKL,sBAAsB,EACtB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAWjC,OAAO,KAAK,EACV,4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,EAAE,iBAAiB,KAAK,OAAO,CAAC,yBAAyB,CAAC,EACnE,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,iBAAiB,EACrB,QAAQ,EAAE,yBAAyB,KAChC,OAAO,CAAC,IAAI,CAAC,EAClB,aAAa,UAAQ,GACpB,OAAO,CAAC,yBAAyB,CAAC;IAoCrC,oFAAoF;YACtE,0BAA0B;IA6DlC,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CA0IzE"}
|
package/dist/proposals.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as __toESM, D as generationSnapshotRead, E as discoveryTransaction, S as prepareFailureCapture, T as completeWithFailureCapture, _ as HandlerArgumentsInvalidError, b as FAILURE_CAPTURE_MAX_BYTES, d as schemaOwnedPath, f as require_ajv, h as GenerationSnapshotStaleError, i as intakeBindingDigest, n as IntakeExecutionService, u as describeArgumentRefusal, w as analysisLeaseRemaining, x as assertFailureCapture, y as FAILURE_CAPTURE_DEFAULT_MAX_BYTES } from "./chunks/execution-BxkUOtLf.js";
|
|
2
2
|
import { a as providerIdentity } from "./chunks/extraction-providers-C66ADDVe.js";
|
|
3
3
|
import { n as assertProposalLimits, o as proposeDocumentSplits, r as SplitGroupError, t as proposalReadConfiguration } from "./chunks/proposal-contracts-CqVVPvqq.js";
|
|
4
|
-
import { i as reviewerInstructionView } from "./chunks/reviewer-instruction-
|
|
5
|
-
import { n as IntakeFeedbackService, t as FeedbackRetrievalDeniedError } from "./chunks/feedback-
|
|
4
|
+
import { i as reviewerInstructionView } from "./chunks/reviewer-instruction-Ip4W4f0j.js";
|
|
5
|
+
import { n as IntakeFeedbackService, t as FeedbackRetrievalDeniedError } from "./chunks/feedback-D69e1hX5.js";
|
|
6
6
|
import { executeDecision, isEmbeddedDatabase, withEmbeddedWriteTransaction } from "@happyvertical/smrt-core";
|
|
7
7
|
import { AIError } from "@happyvertical/ai";
|
|
8
8
|
//#region src/proposal-validation.ts
|
|
@@ -372,6 +372,91 @@ function validateSuggestions(raw, offered, extraction, limits, revision) {
|
|
|
372
372
|
function assertEvidenceReference(reference, extraction, path) {
|
|
373
373
|
if (!extraction.find((entry) => entry.evidence.id === reference.evidenceId)?.segments.some((segment) => intakeBindingDigest(segment.location) === intakeBindingDigest(reference.location))) throw new ProposalValidationError("Unknown evidence location", path);
|
|
374
374
|
}
|
|
375
|
+
var FINISH_REASONS = /* @__PURE__ */ new Set([
|
|
376
|
+
"stop",
|
|
377
|
+
"length",
|
|
378
|
+
"tool_calls",
|
|
379
|
+
"content_filter"
|
|
380
|
+
]);
|
|
381
|
+
var RESPONSE_PROBLEMS = {
|
|
382
|
+
finish_reason: "provider response incomplete",
|
|
383
|
+
truncated: "provider response incomplete (truncated)",
|
|
384
|
+
tool_calls: "provider response contained tool calls",
|
|
385
|
+
unexpected_model: "provider response came from an unexpected model",
|
|
386
|
+
no_text_content: "provider response had no text content",
|
|
387
|
+
empty_content: "provider response was empty",
|
|
388
|
+
output_limit: "provider response exceeded the output limit",
|
|
389
|
+
invalid_json: "provider response was not valid JSON"
|
|
390
|
+
};
|
|
391
|
+
var ProposalResponseError = class extends Error {
|
|
392
|
+
constructor(problem, message, finishReason) {
|
|
393
|
+
super(message);
|
|
394
|
+
this.problem = problem;
|
|
395
|
+
if (problem === "finish_reason") this.finishReason = typeof finishReason === "string" && FINISH_REASONS.has(finishReason) ? finishReason : "other";
|
|
396
|
+
}
|
|
397
|
+
problem;
|
|
398
|
+
name = "ProposalResponseError";
|
|
399
|
+
finishReason;
|
|
400
|
+
};
|
|
401
|
+
var rawOutputs = /* @__PURE__ */ new WeakMap();
|
|
402
|
+
function attachRawProviderOutput(error, text) {
|
|
403
|
+
if (typeof text === "string") rawOutputs.set(error, text);
|
|
404
|
+
return error;
|
|
405
|
+
}
|
|
406
|
+
function rawProviderOutput(error) {
|
|
407
|
+
return error && typeof error === "object" ? rawOutputs.get(error) : void 0;
|
|
408
|
+
}
|
|
409
|
+
var NETWORK_CODES = /* @__PURE__ */ new Set([
|
|
410
|
+
"ECONNABORTED",
|
|
411
|
+
"ECONNREFUSED",
|
|
412
|
+
"ECONNRESET",
|
|
413
|
+
"EAI_AGAIN",
|
|
414
|
+
"EHOSTDOWN",
|
|
415
|
+
"EHOSTUNREACH",
|
|
416
|
+
"ENETDOWN",
|
|
417
|
+
"ENETRESET",
|
|
418
|
+
"ENETUNREACH",
|
|
419
|
+
"ENOTFOUND",
|
|
420
|
+
"EPIPE",
|
|
421
|
+
"EPROTO",
|
|
422
|
+
"ETIMEDOUT",
|
|
423
|
+
"ERR_SSL_WRONG_VERSION_NUMBER",
|
|
424
|
+
"ERR_STREAM_PREMATURE_CLOSE",
|
|
425
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
426
|
+
"CERT_HAS_EXPIRED",
|
|
427
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
428
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
429
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
430
|
+
"UND_ERR_ABORTED",
|
|
431
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
432
|
+
"UND_ERR_CLOSED",
|
|
433
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
434
|
+
"UND_ERR_DESTROYED",
|
|
435
|
+
"UND_ERR_HEADERS_OVERFLOW",
|
|
436
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
437
|
+
"UND_ERR_INFO",
|
|
438
|
+
"UND_ERR_INVALID_ARG",
|
|
439
|
+
"UND_ERR_INVALID_RETURN_VALUE",
|
|
440
|
+
"UND_ERR_NOT_SUPPORTED",
|
|
441
|
+
"UND_ERR_REQ_CONTENT_LENGTH_MISMATCH",
|
|
442
|
+
"UND_ERR_RES_CONTENT_LENGTH_MISMATCH",
|
|
443
|
+
"UND_ERR_RES_EXCEEDED_MAX_SIZE",
|
|
444
|
+
"UND_ERR_RESPONSE_STATUS_CODE",
|
|
445
|
+
"UND_ERR_SOCKET"
|
|
446
|
+
]);
|
|
447
|
+
var NETWORK_TIMEOUT_CODES = /* @__PURE__ */ new Set([
|
|
448
|
+
"ETIMEDOUT",
|
|
449
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
450
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
451
|
+
"UND_ERR_HEADERS_TIMEOUT"
|
|
452
|
+
]);
|
|
453
|
+
var ABORT_NAMES = /* @__PURE__ */ new Set(["AbortError", "TimeoutError"]);
|
|
454
|
+
var SDK_TRANSPORT_MESSAGES = {
|
|
455
|
+
"Connection error.": "connection error",
|
|
456
|
+
"Request timed out.": "timeout",
|
|
457
|
+
"Request was aborted.": "aborted",
|
|
458
|
+
"(no status code or body)": "no status or body"
|
|
459
|
+
};
|
|
375
460
|
var SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
|
|
376
461
|
"$anchor",
|
|
377
462
|
"$comment",
|
|
@@ -482,16 +567,65 @@ function rejectedKeywords(message) {
|
|
|
482
567
|
for (const [, token] of message.matchAll(/["'`]([$A-Za-z]{2,40})["'`]/g)) if (SCHEMA_KEYWORDS.has(token)) found.add(token);
|
|
483
568
|
return [...found].sort();
|
|
484
569
|
}
|
|
570
|
+
function className(error) {
|
|
571
|
+
if (!error || typeof error !== "object") return void 0;
|
|
572
|
+
const ctor = Object.getPrototypeOf(error)?.constructor;
|
|
573
|
+
const name = typeof ctor === "function" && Object.getOwnPropertyDescriptor(ctor, "name")?.value;
|
|
574
|
+
return typeof name === "string" && /^[A-Z][A-Za-z0-9]{0,63}$/.test(name) && /(?:Error|Exception)$/.test(name) ? name : void 0;
|
|
575
|
+
}
|
|
576
|
+
function networkCode(error) {
|
|
577
|
+
let current = error;
|
|
578
|
+
for (let depth = 0; depth < 4 && current; depth++) {
|
|
579
|
+
const code = field$1(current, "code");
|
|
580
|
+
if (typeof code === "string" && NETWORK_CODES.has(code)) return code;
|
|
581
|
+
const errors = field$1(current, "errors");
|
|
582
|
+
if (Array.isArray(errors)) for (const entry of errors.slice(0, 4)) {
|
|
583
|
+
const nested = field$1(entry, "code");
|
|
584
|
+
if (typeof nested === "string" && NETWORK_CODES.has(nested)) return nested;
|
|
585
|
+
}
|
|
586
|
+
current = field$1(current, "cause");
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
function abortName(error) {
|
|
590
|
+
let current = error;
|
|
591
|
+
for (let depth = 0; depth < 4 && current; depth++) {
|
|
592
|
+
const name = field$1(current, "name");
|
|
593
|
+
if (typeof name === "string" && ABORT_NAMES.has(name)) return name;
|
|
594
|
+
current = field$1(current, "cause");
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function responseReason(error) {
|
|
598
|
+
const phrase = RESPONSE_PROBLEMS[error.problem];
|
|
599
|
+
return error.problem === "finish_reason" ? `${phrase} (finish reason ${error.finishReason ?? "other"})` : phrase;
|
|
600
|
+
}
|
|
485
601
|
function providerFailureReason(error) {
|
|
486
|
-
|
|
602
|
+
if (error instanceof ProposalResponseError && Object.hasOwn(RESPONSE_PROBLEMS, error.problem)) return responseReason(error);
|
|
487
603
|
const sdk = error instanceof AIError && typeof error.code === "string" && SDK_ERROR_CODES.has(error.code) ? error : void 0;
|
|
488
|
-
if (name === "AbortError" || name === "TimeoutError" || sdk && SDK_ABORT_CODES.has(sdk.code)) return "provider call aborted or timed out";
|
|
489
604
|
const message = sdk && typeof sdk.message === "string" ? sdk.message : "";
|
|
605
|
+
const transport = sdk && Object.hasOwn(SDK_TRANSPORT_MESSAGES, message) ? SDK_TRANSPORT_MESSAGES[message] : void 0;
|
|
606
|
+
const foreign = !sdk;
|
|
607
|
+
const cls = foreign ? className(error) : void 0;
|
|
608
|
+
const network = networkCode(error);
|
|
609
|
+
const aborted = foreign ? abortName(error) : void 0;
|
|
610
|
+
const facts = [
|
|
611
|
+
...cls ? [`class ${cls}`] : [],
|
|
612
|
+
...aborted ? [`name ${aborted}`] : [],
|
|
613
|
+
...network ? [`network ${network}`] : [],
|
|
614
|
+
...transport ? [`transport ${transport}`] : []
|
|
615
|
+
];
|
|
490
616
|
const status = structuredStatus(error) ?? structuredStatus(field$1(error, "cause")) ?? (sdk ? sdkMessageStatus(sdk.code, message) : void 0);
|
|
617
|
+
if (sdk && SDK_ABORT_CODES.has(sdk.code) || transport === "timeout" || transport === "aborted" || status === void 0 && (aborted !== void 0 || network !== void 0 && NETWORK_TIMEOUT_CODES.has(network))) {
|
|
618
|
+
const details2 = [...sdk ? [`code ${sdk.code}`] : [], ...facts];
|
|
619
|
+
return `provider call aborted or timed out${details2.length ? ` (${details2.join(", ")})` : ""}`.slice(0, 500);
|
|
620
|
+
}
|
|
491
621
|
const code = sdk?.code;
|
|
492
622
|
const keywords = sdk ? rejectedKeywords(message) : [];
|
|
493
623
|
const category = keywords.length ? "rejected the response schema" : status !== void 0 && status >= 400 && status < 500 ? "rejected the request" : status !== void 0 && status >= 500 ? "returned a server error" : "call failed";
|
|
494
|
-
const details = [
|
|
624
|
+
const details = [
|
|
625
|
+
...status !== void 0 ? [`HTTP ${status}`] : [],
|
|
626
|
+
...code ? [`code ${code}`] : [],
|
|
627
|
+
...facts
|
|
628
|
+
];
|
|
495
629
|
let reason = `provider ${category}${details.length ? ` (${details.join(", ")})` : ""}`;
|
|
496
630
|
if (keywords.length) reason += `; unsupported response-schema keywords: ${keywords.join(", ")}`;
|
|
497
631
|
return reason.slice(0, 500);
|
|
@@ -831,10 +965,23 @@ function createSDKProposalGenerator(client, configuredIdentity, limits) {
|
|
|
831
965
|
responseSchema,
|
|
832
966
|
continueOnLength: false
|
|
833
967
|
});
|
|
834
|
-
|
|
835
|
-
|
|
968
|
+
const refusal = (problem, message, finishReason) => attachRawProviderOutput(new ProposalResponseError(problem, message, finishReason), response.content);
|
|
969
|
+
const incomplete = "Incomplete or unexpected proposal response";
|
|
970
|
+
if (response.finishReason !== "stop") throw refusal("finish_reason", incomplete, response.finishReason);
|
|
971
|
+
if (response.truncated) throw refusal("truncated", incomplete);
|
|
972
|
+
if (response.toolCalls?.length) throw refusal("tool_calls", incomplete);
|
|
973
|
+
if (!acceptsResponseModel(identity, response.model)) throw refusal("unexpected_model", incomplete);
|
|
974
|
+
if (typeof response.content !== "string") throw refusal("no_text_content", "Proposal output limit");
|
|
975
|
+
if (Buffer.byteLength(response.content) > options.maxOutputBytes) throw refusal("output_limit", "Proposal output limit");
|
|
976
|
+
if (!response.content.trim()) throw refusal("empty_content", "Proposal response was empty");
|
|
977
|
+
let output;
|
|
978
|
+
try {
|
|
979
|
+
output = JSON.parse(response.content);
|
|
980
|
+
} catch {
|
|
981
|
+
throw refusal("invalid_json", "Proposal response was not valid JSON");
|
|
982
|
+
}
|
|
836
983
|
return {
|
|
837
|
-
output
|
|
984
|
+
output,
|
|
838
985
|
completion: "unknown",
|
|
839
986
|
usage: safeUsage(response.usage),
|
|
840
987
|
...response.model && response.model !== identity.model ? { responseModel: response.model } : {}
|
|
@@ -915,6 +1062,15 @@ var IngestionProposalService = class {
|
|
|
915
1062
|
text(this.config.version);
|
|
916
1063
|
text(this.config.promptVersion);
|
|
917
1064
|
assertProposalLimits(this.config.limits);
|
|
1065
|
+
if ("failureCapture" in config) assertFailureCapture(config.failureCapture);
|
|
1066
|
+
if ("failureCapture" in config && config.failureCapture) {
|
|
1067
|
+
const capture = config.failureCapture;
|
|
1068
|
+
this.failureCapture = Object.freeze({
|
|
1069
|
+
enabled: capture.enabled,
|
|
1070
|
+
...capture.maxBytes === void 0 ? {} : { maxBytes: capture.maxBytes },
|
|
1071
|
+
...capture.redact ? { redact: capture.redact.bind(capture) } : {}
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
918
1074
|
if ("identity" in config.generator) this.generator = {
|
|
919
1075
|
identity: this.identity,
|
|
920
1076
|
generate: config.generator.generate.bind(config.generator)
|
|
@@ -944,6 +1100,7 @@ var IngestionProposalService = class {
|
|
|
944
1100
|
};
|
|
945
1101
|
}
|
|
946
1102
|
config;
|
|
1103
|
+
failureCapture;
|
|
947
1104
|
generation() {
|
|
948
1105
|
if (!this.generator) throw new Error("Intake proposal generation is not configured");
|
|
949
1106
|
return this.generator;
|
|
@@ -1206,6 +1363,8 @@ var IngestionProposalService = class {
|
|
|
1206
1363
|
automaticActionEligible: false
|
|
1207
1364
|
};
|
|
1208
1365
|
let failure;
|
|
1366
|
+
let captureCandidate;
|
|
1367
|
+
let capture;
|
|
1209
1368
|
const publication = () => ({
|
|
1210
1369
|
status: failure ? "partial" : "completed",
|
|
1211
1370
|
provider: "smrt-ingestion-proposals",
|
|
@@ -1313,10 +1472,19 @@ var IngestionProposalService = class {
|
|
|
1313
1472
|
maxOutputBytes: maxBytes
|
|
1314
1473
|
});
|
|
1315
1474
|
} catch (error) {
|
|
1475
|
+
const raw = rawProviderOutput(error);
|
|
1476
|
+
if (raw !== void 0) captureCandidate = {
|
|
1477
|
+
source: "raw_response",
|
|
1478
|
+
text: () => raw
|
|
1479
|
+
};
|
|
1316
1480
|
throw new StageFailure("unavailable", providerFailureReason(error));
|
|
1317
1481
|
}
|
|
1318
1482
|
});
|
|
1319
1483
|
await this.live(lease, expected.catalogDigest, output.offered, output.provenance.feedback);
|
|
1484
|
+
captureCandidate = {
|
|
1485
|
+
source: "generated_output",
|
|
1486
|
+
text: () => JSON.stringify(generated.output)
|
|
1487
|
+
};
|
|
1320
1488
|
if (!["complete", "unknown"].includes(generated.completion)) throw new StageFailure("malformed_output", "Generator declared no validated completion");
|
|
1321
1489
|
if (generated.completion === "unknown") output.warnings.push("generation_completion_unknown");
|
|
1322
1490
|
if (bytes(generated.output) > maxBytes) throw new StageFailure("limit");
|
|
@@ -1326,6 +1494,7 @@ var IngestionProposalService = class {
|
|
|
1326
1494
|
if (missingFieldsCorrection) output.provenance.missingFieldsCorrection = missingFieldsCorrection;
|
|
1327
1495
|
if (deduped.removed) output.provenance.duplicatesRemoved = deduped.removed;
|
|
1328
1496
|
if (splitsDropped) output.provenance.splitsDropped = splitsDropped;
|
|
1497
|
+
captureCandidate = void 0;
|
|
1329
1498
|
if (humanCorrection) {
|
|
1330
1499
|
const correction = record(humanCorrection);
|
|
1331
1500
|
if (correction.kind !== "logical_split" || !output.splits.some((split) => split.evidenceId === correction.evidenceId && intakeBindingDigest(split.groups) === intakeBindingDigest(correction.groups))) {
|
|
@@ -1346,7 +1515,14 @@ var IngestionProposalService = class {
|
|
|
1346
1515
|
}
|
|
1347
1516
|
}
|
|
1348
1517
|
} catch (error) {
|
|
1518
|
+
const candidate = captureCandidate;
|
|
1519
|
+
captureCandidate = void 0;
|
|
1349
1520
|
await this.live(lease, expected.catalogDigest);
|
|
1521
|
+
if (candidate && this.failureCapture?.enabled === true) capture = await prepareFailureCapture(this.failureCapture, candidate, {
|
|
1522
|
+
inputBytes: this.config.limits.maxOutputBytes,
|
|
1523
|
+
timeoutMs: this.failureCapture.redact ? Math.min(this.config.limits.timeoutMs, Math.floor(await this.service[analysisLeaseRemaining](lease).catch(() => 0) / 2)) : this.config.limits.timeoutMs,
|
|
1524
|
+
now: this.options.now?.() ?? /* @__PURE__ */ new Date()
|
|
1525
|
+
});
|
|
1350
1526
|
failure = error instanceof StageFailure ? error.category : "malformed_output";
|
|
1351
1527
|
const reason = error instanceof StageFailure || error instanceof ProposalValidationError ? error.reason : void 0;
|
|
1352
1528
|
if (reason) output.provenance.failure = {
|
|
@@ -1376,7 +1552,8 @@ var IngestionProposalService = class {
|
|
|
1376
1552
|
if (bytes(publication()) > maxBytes) return this.service.failAnalysis(lease, "limit");
|
|
1377
1553
|
}
|
|
1378
1554
|
await this.live(lease, expected.catalogDigest, output.offered, output.provenance.feedback);
|
|
1379
|
-
return this.service.completeAnalysis(lease, publication());
|
|
1555
|
+
if (!failure || !capture) return this.service.completeAnalysis(lease, publication());
|
|
1556
|
+
return this.service[completeWithFailureCapture](lease, publication(), capture);
|
|
1380
1557
|
}
|
|
1381
1558
|
async decide(lease, output, input) {
|
|
1382
1559
|
const configured = this.decision;
|
|
@@ -1682,6 +1859,6 @@ var IngestionProposalService = class {
|
|
|
1682
1859
|
}
|
|
1683
1860
|
};
|
|
1684
1861
|
//#endregion
|
|
1685
|
-
export { IngestionProposalService, createSDKProposalDecisionClient, createSDKProposalGenerator, proposalInstructions, proposalInstructionsFor, proposalReadConfiguration, reviewerGuidanceInstructions };
|
|
1862
|
+
export { FAILURE_CAPTURE_DEFAULT_MAX_BYTES, FAILURE_CAPTURE_MAX_BYTES, IngestionProposalService, createSDKProposalDecisionClient, createSDKProposalGenerator, proposalInstructions, proposalInstructionsFor, proposalReadConfiguration, reviewerGuidanceInstructions };
|
|
1686
1863
|
|
|
1687
1864
|
//# sourceMappingURL=proposals.js.map
|