@tangle-network/agent-eval 0.136.0 → 0.137.0
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/CHANGELOG.md +38 -1
- package/README.md +4 -2
- package/dist/{agent-profile-cell-OhuTee9n.js → agent-profile-cell-CbfBm2g6.js} +2 -2
- package/dist/{agent-profile-cell-OhuTee9n.js.map → agent-profile-cell-CbfBm2g6.js.map} +1 -1
- package/dist/{agent-profile-cell-CCm3l2v2.d.ts → agent-profile-cell-Cw0PVwDr.d.ts} +2 -2
- package/dist/{agent-profile-cell-CCm3l2v2.d.ts.map → agent-profile-cell-Cw0PVwDr.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +139 -17
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +606 -4
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-jjCmF8pU.js → analyze-runs-BScZvqMV.js} +6 -6
- package/dist/{analyze-runs-jjCmF8pU.js.map → analyze-runs-BScZvqMV.js.map} +1 -1
- package/dist/{analyze-runs-Cda5Xkj1.d.ts → analyze-runs-PVtnfjvA.d.ts} +6 -6
- package/dist/{analyze-runs-Cda5Xkj1.d.ts.map → analyze-runs-PVtnfjvA.d.ts.map} +1 -1
- package/dist/{baseline-BUeFcgrn.js → baseline-C-GocmIW.js} +2 -2
- package/dist/{baseline-BUeFcgrn.js.map → baseline-C-GocmIW.js.map} +1 -1
- package/dist/benchmark-CHX4orG7.d.ts +184 -0
- package/dist/benchmark-CHX4orG7.d.ts.map +1 -0
- package/dist/benchmark-YDrpumqB.js +414 -0
- package/dist/benchmark-YDrpumqB.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-Dfgm9ts5.js → benchmarks-DCLkQOmc.js} +3 -3
- package/dist/{benchmarks-Dfgm9ts5.js.map → benchmarks-DCLkQOmc.js.map} +1 -1
- package/dist/builder-eval/index.js +2 -2
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +3 -3
- package/dist/{campaign-Dz8uQnhC.js → campaign-lgObcHFC.js} +212 -78
- package/dist/campaign-lgObcHFC.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/client-C8L6h6Wf.d.ts +202 -0
- package/dist/client-C8L6h6Wf.d.ts.map +1 -0
- package/dist/completion-verifier-DSyRNVzU.d.ts +240 -0
- package/dist/completion-verifier-DSyRNVzU.d.ts.map +1 -0
- package/dist/contract/index.d.ts +10 -9
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +10 -10
- package/dist/control.d.ts +2 -2
- package/dist/control.js +1 -1
- package/dist/{cost-ledger-DHAjwNj7.js → cost-ledger-D-5_-dhi.js} +2 -2
- package/dist/{cost-ledger-DHAjwNj7.js.map → cost-ledger-D-5_-dhi.js.map} +1 -1
- package/dist/{cost-ledger-fGS_u_O1.d.ts → cost-ledger-D2o6JOrL.d.ts} +2 -2
- package/dist/{cost-ledger-fGS_u_O1.d.ts.map → cost-ledger-D2o6JOrL.d.ts.map} +1 -1
- package/dist/{dataset-BvtnC8Dc.d.ts → dataset-v_Y5902-.d.ts} +2 -2
- package/dist/{dataset-BvtnC8Dc.d.ts.map → dataset-v_Y5902-.d.ts.map} +1 -1
- package/dist/{default-registry-CHmdy2An.js → default-registry-CLXbRt0f.js} +119 -38
- package/dist/default-registry-CLXbRt0f.js.map +1 -0
- package/dist/{default-registry-Brxr728w.d.ts → default-registry-Dc5D_Loc.d.ts} +63 -137
- package/dist/default-registry-Dc5D_Loc.d.ts.map +1 -0
- package/dist/{errors-8YnH8WlF.js → errors-D-LKuDhb.js} +8 -2
- package/dist/errors-D-LKuDhb.js.map +1 -0
- package/dist/{errors-CEk209JS.d.ts → errors-DkfjIDvD.d.ts} +9 -3
- package/dist/errors-DkfjIDvD.d.ts.map +1 -0
- package/dist/{eval-campaign-Cc8WZJ6b.js → eval-campaign-CHqfLnff.js} +6 -6
- package/dist/{eval-campaign-Cc8WZJ6b.js.map → eval-campaign-CHqfLnff.js.map} +1 -1
- package/dist/{extract-usage-DIQpN-ww.js → extract-usage-p-56bh8q.js} +3 -3
- package/dist/{extract-usage-DIQpN-ww.js.map → extract-usage-p-56bh8q.js.map} +1 -1
- package/dist/{feedback-trajectory-CVaeREXV.d.ts → feedback-trajectory-N_F0PwHz.d.ts} +90 -3
- package/dist/feedback-trajectory-N_F0PwHz.d.ts.map +1 -0
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +2 -2
- package/dist/hosted/index.d.ts +3 -2
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/index-BipJlj-C.d.ts +316 -0
- package/dist/index-BipJlj-C.d.ts.map +1 -0
- package/dist/{index-CQsJcqch.d.ts → index-BnP1QJUv.d.ts} +5 -5
- package/dist/{index-CQsJcqch.d.ts.map → index-BnP1QJUv.d.ts.map} +1 -1
- package/dist/{index-B4Fjfo5U.d.ts → index-C-Pr4OWg.d.ts} +88 -317
- package/dist/index-C-Pr4OWg.d.ts.map +1 -0
- package/dist/{index-DuhJaaiH.d.ts → index-DEb46kc6.d.ts} +2 -2
- package/dist/{index-DuhJaaiH.d.ts.map → index-DEb46kc6.d.ts.map} +1 -1
- package/dist/{index-C2fkZhv_.d.ts → index-DRNl6g_N.d.ts} +3 -3
- package/dist/{index-C2fkZhv_.d.ts.map → index-DRNl6g_N.d.ts.map} +1 -1
- package/dist/{index-AbhwHp0V.d.ts → index-U3RHOShi.d.ts} +2 -2
- package/dist/{index-AbhwHp0V.d.ts.map → index-U3RHOShi.d.ts.map} +1 -1
- package/dist/index.d.ts +29 -70
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +507 -33
- package/dist/index.js.map +1 -1
- package/dist/{client-DcvgkaZi.d.ts → insight-report-B9ooYH_g.d.ts} +5 -203
- package/dist/insight-report-B9ooYH_g.d.ts.map +1 -0
- package/dist/integrity-CCXTftiL.js +1360 -0
- package/dist/integrity-CCXTftiL.js.map +1 -0
- package/dist/{integrity-rmVhXWA7.d.ts → integrity-CKxosZ5Z.d.ts} +3 -3
- package/dist/{integrity-rmVhXWA7.d.ts.map → integrity-CKxosZ5Z.d.ts.map} +1 -1
- package/dist/{integrity-BzRbCHzi.js → integrity-fdt8XPAv.js} +2 -2
- package/dist/{integrity-BzRbCHzi.js.map → integrity-fdt8XPAv.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/ledger-core/index.js +1 -1
- package/dist/{ledger-core-DAKFKRzi.js → ledger-core-t6sItivm.js} +85 -85
- package/dist/{ledger-core-DAKFKRzi.js.map → ledger-core-t6sItivm.js.map} +1 -1
- package/dist/{llm-client-DHx8pzyJ.js → llm-client-DKB25jV8.js} +3 -3
- package/dist/{llm-client-DHx8pzyJ.js.map → llm-client-DKB25jV8.js.map} +1 -1
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/meta-eval/index.js +3 -3
- package/dist/{mint-DyRUc9k6.js → mint-Ctwk079K.js} +4 -4
- package/dist/{mint-DyRUc9k6.js.map → mint-Ctwk079K.js.map} +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{paired-arms-BbFKrAU-.js → paired-arms-iZ08VFMN.js} +3 -3
- package/dist/{paired-arms-BbFKrAU-.js.map → paired-arms-iZ08VFMN.js.map} +1 -1
- package/dist/pipelines/index.js +2 -2
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/{propose-review-control-SQ-n9-We.js → propose-review-control-DLXz4FCX.js} +2 -2
- package/dist/{propose-review-control-SQ-n9-We.js.map → propose-review-control-DLXz4FCX.js.map} +1 -1
- package/dist/registry-BdM7SuTr.d.ts +124 -0
- package/dist/registry-BdM7SuTr.d.ts.map +1 -0
- package/dist/{release-report-DooPguBc.js → release-report-B5XPBvAU.js} +4 -4
- package/dist/{release-report-DooPguBc.js.map → release-report-B5XPBvAU.js.map} +1 -1
- package/dist/{release-report-DpBxGGI1.d.ts → release-report-CofgVNZt.d.ts} +4 -4
- package/dist/{release-report-DpBxGGI1.d.ts.map → release-report-CofgVNZt.d.ts.map} +1 -1
- package/dist/{replay-C6wRg47C.js → replay-Bju0T8Ls.js} +248 -8
- package/dist/replay-Bju0T8Ls.js.map +1 -0
- package/dist/{replay-BRfMIs81.d.ts → replay-K8FaC0CB.d.ts} +227 -52
- package/dist/replay-K8FaC0CB.d.ts.map +1 -0
- package/dist/reporting.d.ts +4 -4
- package/dist/reporting.js +4 -4
- package/dist/{researcher-Doo95b50.d.ts → researcher-Da0Wj-bt.d.ts} +6 -7
- package/dist/researcher-Da0Wj-bt.d.ts.map +1 -0
- package/dist/{reward-hacking-D-QqXvg-.d.ts → reward-hacking-CQ3hTCO3.d.ts} +2 -2
- package/dist/{reward-hacking-D-QqXvg-.d.ts.map → reward-hacking-CQ3hTCO3.d.ts.map} +1 -1
- package/dist/{reward-hacking-a-kYs0-i.js → reward-hacking-GyN0kMd8.js} +3 -3
- package/dist/{reward-hacking-a-kYs0-i.js.map → reward-hacking-GyN0kMd8.js.map} +1 -1
- package/dist/rl.d.ts +6 -6
- package/dist/rl.js +9 -9
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +3 -3
- package/dist/{rollout-DLSUIWLu.js → rollout-DQFl0UXA.js} +2 -2
- package/dist/{rollout-DLSUIWLu.js.map → rollout-DQFl0UXA.js.map} +1 -1
- package/dist/{rubric-predictive-validity-BJf-8ejY.js → rubric-predictive-validity-BRR632r1.js} +2 -2
- package/dist/{rubric-predictive-validity-BJf-8ejY.js.map → rubric-predictive-validity-BRR632r1.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C1dCLcvb.d.ts → rubric-predictive-validity-C4sztLR3.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C1dCLcvb.d.ts.map → rubric-predictive-validity-C4sztLR3.d.ts.map} +1 -1
- package/dist/{run-evidence-DokQtX0-.d.ts → run-evidence-BDIircdA.d.ts} +3 -3
- package/dist/{run-evidence-DokQtX0-.d.ts.map → run-evidence-BDIircdA.d.ts.map} +1 -1
- package/dist/{run-record-DcObtIGh.d.ts → run-record-BPCa2rQ8.d.ts} +4 -4
- package/dist/{run-record-DcObtIGh.d.ts.map → run-record-BPCa2rQ8.d.ts.map} +1 -1
- package/dist/{run-record-BIwU2wdV.js → run-record-vRgqWmJw.js} +3 -3
- package/dist/{run-record-BIwU2wdV.js.map → run-record-vRgqWmJw.js.map} +1 -1
- package/dist/{semantic-concept-judge-Btozx3Vc.js → semantic-concept-judge-Bz64IckK.js} +4 -4
- package/dist/{semantic-concept-judge-Btozx3Vc.js.map → semantic-concept-judge-Bz64IckK.js.map} +1 -1
- package/dist/{server-Bz3WQJs6.js → server-KjXZZUDX.js} +3 -3
- package/dist/{server-Bz3WQJs6.js.map → server-KjXZZUDX.js.map} +1 -1
- package/dist/{skill-usage-BDQVPIG1.d.ts → skill-usage-CFDLLlhF.d.ts} +25 -47
- package/dist/skill-usage-CFDLLlhF.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-CwSYkv35.d.ts → skillopt-optimization-method-BpbnlvAZ.d.ts} +11 -12
- package/dist/skillopt-optimization-method-BpbnlvAZ.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-0UmPD6aP.js → skillopt-optimization-method-f4o9sUT4.js} +7 -7
- package/dist/{skillopt-optimization-method-0UmPD6aP.js.map → skillopt-optimization-method-f4o9sUT4.js.map} +1 -1
- package/dist/{statistics-CnGCLLqc.js → statistics-ByxzSiOM.js} +2 -2
- package/dist/{statistics-CnGCLLqc.js.map → statistics-ByxzSiOM.js.map} +1 -1
- package/dist/{statistics-CKOqre5S.d.ts → statistics-_7P642CN.d.ts} +2 -2
- package/dist/{statistics-CKOqre5S.d.ts.map → statistics-_7P642CN.d.ts.map} +1 -1
- package/dist/{summary-report-BEk8OFLs.js → summary-report-9A5y7EsK.js} +4 -4
- package/dist/{summary-report-BEk8OFLs.js.map → summary-report-9A5y7EsK.js.map} +1 -1
- package/dist/{summary-report-CPMINBqs.d.ts → summary-report-DHipz9Kx.d.ts} +3 -3
- package/dist/{summary-report-CPMINBqs.d.ts.map → summary-report-DHipz9Kx.d.ts.map} +1 -1
- package/dist/supervisor-run/index.d.ts +3 -2
- package/dist/supervisor-run/index.js +3 -2
- package/dist/{supervisor-run-Dr5HnTup.js → supervisor-run-B2EWUmQY.js} +28 -454
- package/dist/supervisor-run-B2EWUmQY.js.map +1 -0
- package/dist/{test-graded-scenario-BsqWLmPt.js → test-graded-scenario-JHcKQNpq.js} +2 -2
- package/dist/{test-graded-scenario-BsqWLmPt.js.map → test-graded-scenario-JHcKQNpq.js.map} +1 -1
- package/dist/tools-DZk2Jn64.js +1876 -0
- package/dist/tools-DZk2Jn64.js.map +1 -0
- package/dist/traces.d.ts +6 -7
- package/dist/traces.js +5 -6
- package/dist/{types-DVjczBM9.d.ts → types-CKswbJGO.d.ts} +260 -6
- package/dist/types-CKswbJGO.d.ts.map +1 -0
- package/dist/{types-DiWLru6Z.d.ts → types-CTGbIm57.d.ts} +5 -5
- package/dist/{types-DiWLru6Z.d.ts.map → types-CTGbIm57.d.ts.map} +1 -1
- package/dist/types-CTvKfr5F.d.ts +804 -0
- package/dist/types-CTvKfr5F.d.ts.map +1 -0
- package/dist/{index-CyC1BTmn.d.ts → types-Dea6tiVI.d.ts} +16 -238
- package/dist/types-Dea6tiVI.d.ts.map +1 -0
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/feedback-trajectories.md +100 -1
- package/docs/trace-analysis.md +374 -58
- package/package.json +5 -1
- package/dist/analyst-BkTS3C58.d.ts +0 -89
- package/dist/analyst-BkTS3C58.d.ts.map +0 -1
- package/dist/analyst-j5je5J7c.js +0 -152
- package/dist/analyst-j5je5J7c.js.map +0 -1
- package/dist/campaign-Dz8uQnhC.js.map +0 -1
- package/dist/client-DcvgkaZi.d.ts.map +0 -1
- package/dist/default-registry-Brxr728w.d.ts.map +0 -1
- package/dist/default-registry-CHmdy2An.js.map +0 -1
- package/dist/errors-8YnH8WlF.js.map +0 -1
- package/dist/errors-CEk209JS.d.ts.map +0 -1
- package/dist/feedback-trajectory-CVaeREXV.d.ts.map +0 -1
- package/dist/index-B4Fjfo5U.d.ts.map +0 -1
- package/dist/index-CyC1BTmn.d.ts.map +0 -1
- package/dist/llm-client-BiK4HW0u.d.ts +0 -290
- package/dist/llm-client-BiK4HW0u.d.ts.map +0 -1
- package/dist/raw-provider-sink-BU29Sh8h.d.ts +0 -134
- package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +0 -1
- package/dist/replay-BRfMIs81.d.ts.map +0 -1
- package/dist/replay-C6wRg47C.js.map +0 -1
- package/dist/researcher-Doo95b50.d.ts.map +0 -1
- package/dist/skill-usage-BDQVPIG1.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-CwSYkv35.d.ts.map +0 -1
- package/dist/store-CxJry_cs.d.ts +0 -229
- package/dist/store-CxJry_cs.d.ts.map +0 -1
- package/dist/supervisor-run-Dr5HnTup.js.map +0 -1
- package/dist/tools-D8yTtNSN.js +0 -1190
- package/dist/tools-D8yTtNSN.js.map +0 -1
- package/dist/types-Cc3qbqzj.d.ts +0 -387
- package/dist/types-Cc3qbqzj.d.ts.map +0 -1
- package/dist/types-DVjczBM9.d.ts.map +0 -1
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { r as CaptureIntegrityError, t as AgentEvalError } from "./errors-CEk209JS.js";
|
|
2
|
-
import { b as CustomTokenPricing, g as CostReceiptInput, x as MaximumCharge } from "./cost-ledger-fGS_u_O1.js";
|
|
3
|
-
import { l as RawProviderSink, o as ProviderRedactor } from "./raw-provider-sink-BU29Sh8h.js";
|
|
4
|
-
//#region src/llm-client.d.ts
|
|
5
|
-
interface LlmMessage {
|
|
6
|
-
role: 'system' | 'user' | 'assistant';
|
|
7
|
-
/**
|
|
8
|
-
* Either a plain text content string OR a multimodal content array
|
|
9
|
-
* (text + image_url parts) for vision-capable models.
|
|
10
|
-
*/
|
|
11
|
-
content: string | Array<{
|
|
12
|
-
type: 'text';
|
|
13
|
-
text: string;
|
|
14
|
-
} | {
|
|
15
|
-
type: 'image_url';
|
|
16
|
-
image_url: {
|
|
17
|
-
url: string;
|
|
18
|
-
detail?: 'auto' | 'low' | 'high';
|
|
19
|
-
};
|
|
20
|
-
}>;
|
|
21
|
-
}
|
|
22
|
-
type LlmThinkingMode = 'enabled' | 'disabled';
|
|
23
|
-
interface LlmCallRequest {
|
|
24
|
-
model: string;
|
|
25
|
-
messages: LlmMessage[];
|
|
26
|
-
/** Optional JSON-mode response format (response_format: json_object). */
|
|
27
|
-
jsonMode?: boolean;
|
|
28
|
-
/** Optional structured output via JSON Schema. Falls back to json_object on 400. */
|
|
29
|
-
jsonSchema?: {
|
|
30
|
-
name: string;
|
|
31
|
-
schema: Record<string, unknown>;
|
|
32
|
-
};
|
|
33
|
-
temperature?: number;
|
|
34
|
-
maxTokens?: number;
|
|
35
|
-
/** OpenAI-compatible reasoning mode. Omitted when the provider default should apply. */
|
|
36
|
-
thinking?: LlmThinkingMode;
|
|
37
|
-
/** Per-call timeout, default 300s. */
|
|
38
|
-
timeoutMs?: number;
|
|
39
|
-
}
|
|
40
|
-
/** Conservative priced bound for the exact text request sent to a provider.
|
|
41
|
-
* Returns undefined when output or multimodal input is not bounded, causing a
|
|
42
|
-
* capped CostLedger to reject the call before execution. Pass
|
|
43
|
-
* `customTokenPricing` when package pricing does not cover the model or endpoint. */
|
|
44
|
-
declare function maximumChargeForLlmRequest(request: Pick<LlmCallRequest, 'model' | 'messages' | 'jsonSchema' | 'maxTokens' | 'thinking'>, options?: LlmClientOptions): MaximumCharge | undefined;
|
|
45
|
-
interface LlmUsage {
|
|
46
|
-
promptTokens: number;
|
|
47
|
-
completionTokens: number;
|
|
48
|
-
totalTokens: number;
|
|
49
|
-
/** False when the provider omitted or malformed prompt/completion usage. */
|
|
50
|
-
captured?: boolean;
|
|
51
|
-
/** Reasoning-token subset of completionTokens, when reported. */
|
|
52
|
-
reasoningTokens?: number;
|
|
53
|
-
/** Proxies populate this when prompt caching is on. */
|
|
54
|
-
cachedPromptTokens?: number;
|
|
55
|
-
}
|
|
56
|
-
interface LlmCallResult {
|
|
57
|
-
/** The text content of the first choice. Empty string if none. */
|
|
58
|
-
content: string;
|
|
59
|
-
usage: LlmUsage;
|
|
60
|
-
/**
|
|
61
|
-
* Cost in USD. Uses the provider's reported cost when present, otherwise
|
|
62
|
-
* caller-supplied token pricing. `null` when neither is available.
|
|
63
|
-
*/
|
|
64
|
-
costUsd: number | null;
|
|
65
|
-
/** Model name actually used (echoed from response). */
|
|
66
|
-
model: string;
|
|
67
|
-
/** Wall-clock duration of the HTTP call (last attempt, if retried). */
|
|
68
|
-
durationMs: number;
|
|
69
|
-
/**
|
|
70
|
-
* `finish_reason` echoed from the first choice (`stop`, `length`,
|
|
71
|
-
* `content_filter`, `tool_calls`, ...). `null` when the provider omits it.
|
|
72
|
-
* Exposed so a free-form `callLlm` caller CAN detect a truncated answer
|
|
73
|
-
* (`length`) instead of treating a cut-off completion as complete. Note:
|
|
74
|
-
* `callLlm` does not itself reject on it — acting on this signal is the
|
|
75
|
-
* caller's responsibility (in-repo free-form drivers do not yet enforce it).
|
|
76
|
-
*/
|
|
77
|
-
finishReason?: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* True when `content.trim()` is empty. An empty completion is a silent zero
|
|
80
|
-
* for free-form `callLlm` callers; this flag is the signal a caller can
|
|
81
|
-
* inspect to fail loud rather than proceed on an empty string. `callLlm`
|
|
82
|
-
* surfaces it but does not throw on it.
|
|
83
|
-
*/
|
|
84
|
-
contentEmpty?: boolean;
|
|
85
|
-
/** Raw response body. */
|
|
86
|
-
raw: Record<string, unknown>;
|
|
87
|
-
}
|
|
88
|
-
type LlmCallMetadata = Pick<LlmCallResult, 'usage' | 'costUsd' | 'model' | 'durationMs'>;
|
|
89
|
-
/** Convert a provider result into the canonical paid-call receipt input. */
|
|
90
|
-
declare function costReceiptFromLlm(result: LlmCallResult, customTokenPricing?: CustomTokenPricing): CostReceiptInput;
|
|
91
|
-
/** Structured-response failures retain their completed provider receipt. */
|
|
92
|
-
declare function costReceiptFromLlmError(error: Error, customTokenPricing?: CustomTokenPricing): CostReceiptInput | undefined;
|
|
93
|
-
declare class LlmCallError extends AgentEvalError {
|
|
94
|
-
readonly status: number;
|
|
95
|
-
readonly body: string;
|
|
96
|
-
readonly model: string;
|
|
97
|
-
constructor(message: string, status: number, body: string, model: string);
|
|
98
|
-
}
|
|
99
|
-
/** A provider response completed and incurred measurable usage, but its content
|
|
100
|
-
* could not satisfy the caller's response contract. The response envelope is
|
|
101
|
-
* retained so accounting can commit the receipt before the error propagates. */
|
|
102
|
-
declare class LlmResponseError extends AgentEvalError {
|
|
103
|
-
readonly result: LlmCallResult;
|
|
104
|
-
constructor(message: string, result: LlmCallResult, options?: {
|
|
105
|
-
cause?: unknown;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
interface LlmClientOptions {
|
|
109
|
-
/** Base URL (without trailing slash). Must end at the `/v1` prefix. */
|
|
110
|
-
baseUrl?: string;
|
|
111
|
-
/** Bearer token — either `apiKey` or `bearer` populates `Authorization: Bearer ...`. */
|
|
112
|
-
apiKey?: string;
|
|
113
|
-
bearer?: string;
|
|
114
|
-
/** Override for the `Authorization` header (e.g. `X-Auth: ...`). Takes precedence over apiKey/bearer. */
|
|
115
|
-
authHeader?: {
|
|
116
|
-
name: string;
|
|
117
|
-
value: string;
|
|
118
|
-
};
|
|
119
|
-
/** Stable provider idempotency key, reused across retries of this logical call. */
|
|
120
|
-
idempotencyKey?: string;
|
|
121
|
-
/** Default timeout in ms. Per-call can override. */
|
|
122
|
-
defaultTimeoutMs?: number;
|
|
123
|
-
/**
|
|
124
|
-
* Caller-supplied abort signal — e.g. a campaign-wide cancel. Linked to
|
|
125
|
-
* each attempt's per-attempt timeout controller, so aborting it cancels
|
|
126
|
-
* the in-flight fetch. A caller abort is FATAL: it is not retried even
|
|
127
|
-
* though an AbortError otherwise matches the transient patterns.
|
|
128
|
-
*/
|
|
129
|
-
signal?: AbortSignal;
|
|
130
|
-
/**
|
|
131
|
-
* Cross-attempt wall-clock budget in ms, measured from the first attempt.
|
|
132
|
-
* Before launching each attempt the loop checks the remaining budget and
|
|
133
|
-
* stops retrying once it is exhausted, rather than waiting the full
|
|
134
|
-
* per-attempt timeout on every retry. Bounds total time independent of
|
|
135
|
-
* total attempts × `timeoutMs`.
|
|
136
|
-
*/
|
|
137
|
-
deadlineMs?: number;
|
|
138
|
-
/** Total provider attempts. Default 3. */
|
|
139
|
-
maximumAttempts?: number;
|
|
140
|
-
/** Token rates used when the provider omits cost or package pricing does not cover the model. */
|
|
141
|
-
customTokenPricing?: CustomTokenPricing;
|
|
142
|
-
/**
|
|
143
|
-
* Transport for requests that declare `jsonSchema`. `native` sends
|
|
144
|
-
* `response_format: json_schema`; `json-object` sends the broadly supported
|
|
145
|
-
* JSON mode and relies on the caller to include the schema in model-visible
|
|
146
|
-
* instructions. Default: `native`.
|
|
147
|
-
*/
|
|
148
|
-
jsonSchemaTransport?: 'native' | 'json-object';
|
|
149
|
-
/**
|
|
150
|
-
* JSON payload parsing policy. `extract` accepts fenced or prose-prefixed JSON.
|
|
151
|
-
* `exact` requires the complete response content to be one JSON value.
|
|
152
|
-
* Default: `extract`.
|
|
153
|
-
*/
|
|
154
|
-
jsonPayloadMode?: 'extract' | 'exact';
|
|
155
|
-
/** Default provider reasoning mode. A per-call request value takes precedence. */
|
|
156
|
-
thinking?: LlmThinkingMode;
|
|
157
|
-
/** Fetch implementation — defaults to global `fetch`. Override for custom transport (e.g. tests). */
|
|
158
|
-
fetch?: typeof fetch;
|
|
159
|
-
/**
|
|
160
|
-
* Optional raw HTTP capture sink. When provided, every request, response,
|
|
161
|
-
* and error (across all retry attempts) is recorded to the sink, with auth
|
|
162
|
-
* headers and credential-shaped body fields redacted by default. This is
|
|
163
|
-
* the layer-1 forensics primitive: structured `LlmSpan`s record intent,
|
|
164
|
-
* raw events record what actually crossed the wire.
|
|
165
|
-
*/
|
|
166
|
-
rawSink?: RawProviderSink;
|
|
167
|
-
/**
|
|
168
|
-
* Logical provider id attached to raw events. When omitted, derived from
|
|
169
|
-
* `baseUrl` via `providerFromBaseUrl`.
|
|
170
|
-
*/
|
|
171
|
-
provider?: string;
|
|
172
|
-
/** Trace context attached to raw events; populated by emitter-aware callers. */
|
|
173
|
-
traceContext?: {
|
|
174
|
-
runId?: string;
|
|
175
|
-
spanId?: string;
|
|
176
|
-
};
|
|
177
|
-
/** Override the redaction strategy for this call. Defaults to `defaultProviderRedactor`. */
|
|
178
|
-
redactor?: ProviderRedactor;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* True when an error is a transient transport/network fault worth retrying,
|
|
182
|
-
* as opposed to a deterministic failure (4xx schema reject, JSON parse) that
|
|
183
|
-
* a retry cannot fix. Inspects `LlmCallError.status`, then the error's
|
|
184
|
-
* name/message/code, then recurses into `error.cause` — undici nests the
|
|
185
|
-
* real socket fault one or more levels under `.cause`.
|
|
186
|
-
*
|
|
187
|
-
* This is the retry classifier for the package: `callLlm` and
|
|
188
|
-
* `withJudgeRetry` both route through it, so connection failures are treated
|
|
189
|
-
* consistently across transports.
|
|
190
|
-
*/
|
|
191
|
-
declare function isTransientLlmError(err: unknown): boolean;
|
|
192
|
-
/** Exponential backoff: 500ms, 1s, 2s, 4s, ... capped at 16s. Attempt is 0-indexed. */
|
|
193
|
-
declare function backoffMs(attempt: number): number;
|
|
194
|
-
/**
|
|
195
|
-
* Strip a ```json / ``` code fence if the model emitted one.
|
|
196
|
-
* Idempotent for naked JSON. Some models (claude-code via router, certain
|
|
197
|
-
* deepseek models) wrap output even under json_object.
|
|
198
|
-
*/
|
|
199
|
-
declare function stripFencedJson(raw: string): string;
|
|
200
|
-
/**
|
|
201
|
-
* Low-level call. Returns raw content + usage + cost. Retries on transient
|
|
202
|
-
* failures; does NOT degrade schema here — callers that want graceful
|
|
203
|
-
* degrade use `callLlmJson`.
|
|
204
|
-
*/
|
|
205
|
-
declare function callLlm(req: LlmCallRequest, opts?: LlmClientOptions): Promise<LlmCallResult>;
|
|
206
|
-
/**
|
|
207
|
-
* Structured-output call. Returns parsed JSON plus the raw result envelope.
|
|
208
|
-
* Degrades `jsonSchema` → `jsonMode` on a 400 that names the schema param —
|
|
209
|
-
* critical for deepseek-v3/v4, kimi-k2.6, and other models that don't accept
|
|
210
|
-
* the `response_format.json_schema` shape but DO accept `json_object`.
|
|
211
|
-
*/
|
|
212
|
-
declare function callLlmJson<T = unknown>(req: LlmCallRequest, opts?: LlmClientOptions): Promise<{
|
|
213
|
-
value: T;
|
|
214
|
-
result: LlmCallResult;
|
|
215
|
-
}>;
|
|
216
|
-
type LlmRouteAssertionReason = 'no_explicit_base_url' | 'base_url_blocked' | 'base_url_not_allowed' | 'no_auth' | 'wrong_provider';
|
|
217
|
-
declare class LlmRouteAssertionError extends CaptureIntegrityError {
|
|
218
|
-
readonly reason: LlmRouteAssertionReason;
|
|
219
|
-
readonly baseUrl: string;
|
|
220
|
-
constructor(message: string, reason: LlmRouteAssertionReason, baseUrl: string);
|
|
221
|
-
}
|
|
222
|
-
interface LlmRouteRequirements {
|
|
223
|
-
/**
|
|
224
|
-
* Throw if `opts.baseUrl` is undefined, i.e. the call would fall back to
|
|
225
|
-
* `DEFAULT_BASE_URL`. Set this for evaluation runs where silently using
|
|
226
|
-
* the public/free-tier router is a defect — the launch reviewer needs to
|
|
227
|
-
* know exactly which provider answered.
|
|
228
|
-
*/
|
|
229
|
-
requireExplicitBaseUrl?: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Allowlist of acceptable base URLs. Strings match by prefix
|
|
232
|
-
* (case-insensitive); RegExps test against the full base URL.
|
|
233
|
-
*/
|
|
234
|
-
allowedBaseUrls?: Array<string | RegExp>;
|
|
235
|
-
/** Blocklist that takes precedence over `allowedBaseUrls`. */
|
|
236
|
-
blockedBaseUrls?: Array<string | RegExp>;
|
|
237
|
-
/** Throw if no auth header / api key is configured. */
|
|
238
|
-
requireAuth?: boolean;
|
|
239
|
-
/**
|
|
240
|
-
* Logical provider id the configured `baseUrl` is expected to match (via
|
|
241
|
-
* `providerFromBaseUrl`). Mainly useful when paired with `requireExplicitBaseUrl`.
|
|
242
|
-
*/
|
|
243
|
-
expectedProvider?: string;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Fail-loud assertion that the configured LLM client points at the route
|
|
247
|
-
* the caller intends. Designed for the matrix-runner preflight: invoke
|
|
248
|
-
* once before any LLM call to catch misconfiguration before a sweep burns
|
|
249
|
-
* dollars on the wrong provider.
|
|
250
|
-
*
|
|
251
|
-
* Throws `LlmRouteAssertionError`. Pure — no I/O — so it's safe to call
|
|
252
|
-
* from constructors and CI gates.
|
|
253
|
-
*/
|
|
254
|
-
declare function assertLlmRoute(opts: LlmClientOptions, req?: LlmRouteRequirements): void;
|
|
255
|
-
/**
|
|
256
|
-
* Probe whether a model is reachable. Returns latency + null error on
|
|
257
|
-
* success; `ok=false` + error message on any failure (HTTP, timeout,
|
|
258
|
-
* network, parse). Designed for sweep preflights — fail loud at the
|
|
259
|
-
* boundary before burning a 30-leaf run on a misconfigured router.
|
|
260
|
-
*
|
|
261
|
-
* Sends a tiny `ping` message with `maxTokens=64`. Reasoning models
|
|
262
|
-
* (glm-5.1, deepseek-v4) can burn the entire budget on internal reasoning
|
|
263
|
-
* for short prompts, so don't tighten this further. We don't validate
|
|
264
|
-
* content; HTTP 200 means reachable.
|
|
265
|
-
*/
|
|
266
|
-
declare function probeLlm(model: string, opts?: LlmClientOptions & {
|
|
267
|
-
timeoutMs?: number;
|
|
268
|
-
}): Promise<{
|
|
269
|
-
ok: boolean;
|
|
270
|
-
latencyMs: number;
|
|
271
|
-
error: string | null;
|
|
272
|
-
}>;
|
|
273
|
-
/**
|
|
274
|
-
* Stateful client — construct once with defaults, call many times.
|
|
275
|
-
* Thin wrapper around the free functions; exists for callers that want
|
|
276
|
-
* to inject a single configured instance into multiple primitives.
|
|
277
|
-
*/
|
|
278
|
-
declare class LlmClient {
|
|
279
|
-
readonly maximumAttempts: number;
|
|
280
|
-
private readonly opts;
|
|
281
|
-
constructor(opts?: LlmClientOptions);
|
|
282
|
-
call(req: LlmCallRequest, per?: LlmClientOptions): Promise<LlmCallResult>;
|
|
283
|
-
callJson<T = unknown>(req: LlmCallRequest, per?: LlmClientOptions): Promise<{
|
|
284
|
-
value: T;
|
|
285
|
-
result: LlmCallResult;
|
|
286
|
-
}>;
|
|
287
|
-
}
|
|
288
|
-
//#endregion
|
|
289
|
-
export { costReceiptFromLlmError as _, LlmClient as a, probeLlm as b, LlmResponseError as c, LlmUsage as d, assertLlmRoute as f, costReceiptFromLlm as g, callLlmJson as h, LlmCallResult as i, LlmRouteAssertionError as l, callLlm as m, LlmCallMetadata as n, LlmClientOptions as o, backoffMs as p, LlmCallRequest as r, LlmMessage as s, LlmCallError as t, LlmRouteRequirements as u, isTransientLlmError as v, stripFencedJson as x, maximumChargeForLlmRequest as y };
|
|
290
|
-
//# sourceMappingURL=llm-client-BiK4HW0u.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"llm-client-BiK4HW0u.d.ts","names":[],"sources":["../src/llm-client.ts"],"mappings":";;;;UAuCiB;EACf;;;;;EAKA,kBAEI;IACM;IAAc;;IACd;IAAmB;MAAa;MAAa;;;;KAI7C;UAEK;EACf;EACA,UAAU;;EAEV;;EAEA;IAAe;IAAc,QAAQ;;EACrC;EACA;;EAEA,WAAW;;EAEX;;;;;;iBAOc,2BACd,SAAS,KAAK,iFACd,UAAS,mBACR;UAgCc;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;EACA,OAAO;;;;;EAKP;;EAEA;;EAEA;;;;;;;;;EASA;;;;;;;EAOA;;EAEA,KAAK;;KAGK,kBAAkB,KAAK;;iBAGnB,mBACd,QAAQ,eACR,qBAAqB,qBACpB;;iBAuBa,wBACd,OAAO,OACP,qBAAqB,qBACpB;cAMU,qBAAqB;WAGd;WACA;WACA;EAJlB,YACE,iBACgB,gBACA,cACA;;;;;cASP,yBAAyB;WAGlB,QAAQ;EAF1B,YACE,iBACgB,QAAQ,eACxB;IAAY;;;UAMC;;EAEf;;EAEA;EACA;;EAEA;IAAe;IAAc;;;EAE7B;;EAEA;;;;;;;EAOA,SAAS;;;;;;;;EAQT;;EAEA;;EAEA,qBAAqB;;;;;;;EAOrB;;;;;;EAMA;;EAEA,WAAW;;EAEX,eAAe;;;;;;;;EAQf,UAAU;;;;;EAKV;;EAEA;IAAiB;IAAgB;;;EAEjC,WAAW;;;;;;;;;;;;;iBAsEG,oBAAoB;;iBAgCpB,UAAU;;;;;;iBA6GV,gBAAgB;;;;;;iBA6EV,QACpB,KAAK,gBACL,OAAM,mBACL,QAAQ;;;;;;;iBAuUW,YAAY,aAChC,KAAK,gBACL,OAAM,mBACL;EAAU,OAAO;EAAG,QAAQ;;KAgEnB;cAOC,+BAA+B;WAGxB,QAAQ;WACR;EAHlB,YACE,iBACgB,QAAQ,yBACR;;UAMH;;;;;;;EAOf;;;;;EAKA,kBAAkB,eAAe;;EAEjC,kBAAkB,eAAe;;EAEjC;;;;;EAKA;;;;;;;;;;;iBAYc,eAAe,MAAM,kBAAkB,MAAK;;;;;;;;;;;;iBAuEtC,SACpB,eACA,OAAM;EAAqB;IAC1B;EAAU;EAAa;EAAmB;;;;;;;cA2BhC;WACF;mBACQ;EAEjB,YAAY,OAAM;EAKlB,KAAK,KAAK,gBAAgB,MAAM,mBAAmB,QAAQ;EAK3D,SAAS,aACP,KAAK,gBACL,MAAM,mBACL;IAAU,OAAO;IAAG,QAAQ"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
//#region src/trace/raw-provider-sink.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* RawProviderSink — first-class persistence for the actual HTTP-level
|
|
4
|
-
* request/response bodies of every LLM provider call.
|
|
5
|
-
*
|
|
6
|
-
* Why this is a separate sink from the structured `LlmSpan`:
|
|
7
|
-
*
|
|
8
|
-
* - `LlmSpan` records the *intent* — model name, messages, output text,
|
|
9
|
-
* usage. It's what dashboards read; it's NOT enough for forensics.
|
|
10
|
-
* - When a downstream consumer reports "the verifier used the wrong route"
|
|
11
|
-
* or "tokens look right but reasoning was missing," the only way to
|
|
12
|
-
* answer is the raw HTTP body. Span fields can lie (a proxy can echo
|
|
13
|
-
* a different `model` value than what actually answered); the raw
|
|
14
|
-
* response is ground truth.
|
|
15
|
-
*
|
|
16
|
-
* Default behaviour: opt-in. Pass `rawSink` to `LlmClientOptions` (or the
|
|
17
|
-
* matrix runner / BuilderSession sets it up automatically) and every
|
|
18
|
-
* request, response, and error is recorded — including retries, with the
|
|
19
|
-
* attempt index attached so a flaky call's full event chain is recoverable.
|
|
20
|
-
*
|
|
21
|
-
* Redaction is enforced at sink time. The default redactor strips
|
|
22
|
-
* `Authorization`, `X-Api-Key`, `X-Auth-Token`, `Cookie` headers and any
|
|
23
|
-
* payload field whose key matches `apiKey | api_key | bearer | password |
|
|
24
|
-
* secret | token` (case-insensitive). Override via the sink constructor or
|
|
25
|
-
* the per-call `redactor`. The `redactedFields` array on the persisted
|
|
26
|
-
* event lets a reviewer see what was stripped without exposing the values.
|
|
27
|
-
*/
|
|
28
|
-
type RawProviderDirection = 'request' | 'response' | 'error';
|
|
29
|
-
interface RawProviderEvent {
|
|
30
|
-
/** Stable id. Generated by the sink if omitted. */
|
|
31
|
-
eventId: string;
|
|
32
|
-
/** Trace context populated by `LlmClient` when the call is wrapped in a span. */
|
|
33
|
-
runId?: string;
|
|
34
|
-
spanId?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Logical provider name. Free-form so callers can use whatever id matches
|
|
37
|
-
* their topology (`'openai'`, `'anthropic'`, `'tangle-router'`, …). When
|
|
38
|
-
* omitted, derived from `baseUrl` in `LlmClientOptions`.
|
|
39
|
-
*/
|
|
40
|
-
provider: string;
|
|
41
|
-
model: string;
|
|
42
|
-
/** Endpoint path, e.g. `'/v1/chat/completions'`. */
|
|
43
|
-
endpoint: string;
|
|
44
|
-
/** Base URL used for the call (already-normalised — no trailing slash). */
|
|
45
|
-
baseUrl: string;
|
|
46
|
-
/** 0-indexed retry attempt. The first attempt is 0; a retried call gets 1, 2, … */
|
|
47
|
-
attemptIndex: number;
|
|
48
|
-
direction: RawProviderDirection;
|
|
49
|
-
/** Unix ms. */
|
|
50
|
-
timestamp: number;
|
|
51
|
-
/** Wall-clock duration of the call leg. Set on `response` and `error` events; null on `request`. */
|
|
52
|
-
durationMs?: number;
|
|
53
|
-
statusCode?: number;
|
|
54
|
-
requestHeaders?: Record<string, string>;
|
|
55
|
-
requestBody?: unknown;
|
|
56
|
-
responseHeaders?: Record<string, string>;
|
|
57
|
-
responseBody?: unknown;
|
|
58
|
-
/** Set on `direction: 'error'` events. */
|
|
59
|
-
errorMessage?: string;
|
|
60
|
-
/** Field paths the redactor stripped from this event ('header:Authorization', 'body.apiKey', …). */
|
|
61
|
-
redactedFields: string[];
|
|
62
|
-
}
|
|
63
|
-
interface RawProviderSinkFilter {
|
|
64
|
-
runId?: string;
|
|
65
|
-
spanId?: string;
|
|
66
|
-
direction?: RawProviderDirection;
|
|
67
|
-
attemptIndex?: number;
|
|
68
|
-
}
|
|
69
|
-
interface RawProviderSink {
|
|
70
|
-
record(event: RawProviderEvent): Promise<void>;
|
|
71
|
-
/** Optional listing — implementations that durably persist (file, db) should support this. */
|
|
72
|
-
list?(filter?: RawProviderSinkFilter): Promise<RawProviderEvent[]>;
|
|
73
|
-
/** Optional teardown for backed implementations. */
|
|
74
|
-
close?(): Promise<void>;
|
|
75
|
-
}
|
|
76
|
-
type ProviderRedactor = (event: RawProviderEvent) => RawProviderEvent;
|
|
77
|
-
/**
|
|
78
|
-
* Default redactor — strips well-known auth headers and any body field whose
|
|
79
|
-
* key matches the credential pattern. Records every redacted path on
|
|
80
|
-
* `event.redactedFields` so a downstream reviewer can see what was removed.
|
|
81
|
-
*/
|
|
82
|
-
declare function defaultProviderRedactor(event: RawProviderEvent): RawProviderEvent;
|
|
83
|
-
interface InMemoryRawProviderSinkOptions {
|
|
84
|
-
redactor?: ProviderRedactor;
|
|
85
|
-
}
|
|
86
|
-
declare class InMemoryRawProviderSink implements RawProviderSink {
|
|
87
|
-
private events;
|
|
88
|
-
private redactor;
|
|
89
|
-
constructor(opts?: InMemoryRawProviderSinkOptions);
|
|
90
|
-
record(event: RawProviderEvent): Promise<void>;
|
|
91
|
-
list(filter?: RawProviderSinkFilter): Promise<RawProviderEvent[]>;
|
|
92
|
-
size(): number;
|
|
93
|
-
}
|
|
94
|
-
declare class NoopRawProviderSink implements RawProviderSink {
|
|
95
|
-
record(): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Returns an empty array. Implemented so `assertRunCaptured` does not
|
|
98
|
-
* trip the `no_raw_sink` issue when a caller explicitly opts out of
|
|
99
|
-
* capture by passing this sink — opt-out is a deliberate choice, not a
|
|
100
|
-
* misconfiguration.
|
|
101
|
-
*/
|
|
102
|
-
list(): Promise<RawProviderEvent[]>;
|
|
103
|
-
}
|
|
104
|
-
interface FileSystemRawProviderSinkOptions {
|
|
105
|
-
/** Directory the NDJSON file is written into. Created if missing. */
|
|
106
|
-
dir: string;
|
|
107
|
-
/** File name; default `'raw-provider-events.ndjson'`. */
|
|
108
|
-
fileName?: string;
|
|
109
|
-
/** Bytes after which the writer rolls over to a new file (default 32 MiB). */
|
|
110
|
-
rollAtBytes?: number;
|
|
111
|
-
redactor?: ProviderRedactor;
|
|
112
|
-
}
|
|
113
|
-
declare class FileSystemRawProviderSink implements RawProviderSink {
|
|
114
|
-
private dir;
|
|
115
|
-
private fileName;
|
|
116
|
-
private rollAtBytes;
|
|
117
|
-
private redactor;
|
|
118
|
-
private bytesWritten;
|
|
119
|
-
private rollIndex;
|
|
120
|
-
private initPromise;
|
|
121
|
-
constructor(opts: FileSystemRawProviderSinkOptions);
|
|
122
|
-
private ensureInit;
|
|
123
|
-
private currentPath;
|
|
124
|
-
record(event: RawProviderEvent): Promise<void>;
|
|
125
|
-
list(filter?: RawProviderSinkFilter): Promise<RawProviderEvent[]>;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Best-effort provider id from a base URL. Falls back to the URL host when
|
|
129
|
-
* none of the well-known patterns match.
|
|
130
|
-
*/
|
|
131
|
-
declare function providerFromBaseUrl(baseUrl: string): string;
|
|
132
|
-
//#endregion
|
|
133
|
-
export { NoopRawProviderSink as a, RawProviderEvent as c, defaultProviderRedactor as d, providerFromBaseUrl as f, InMemoryRawProviderSinkOptions as i, RawProviderSink as l, FileSystemRawProviderSinkOptions as n, ProviderRedactor as o, InMemoryRawProviderSink as r, RawProviderDirection as s, FileSystemRawProviderSink as t, RawProviderSinkFilter as u };
|
|
134
|
-
//# sourceMappingURL=raw-provider-sink-BU29Sh8h.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raw-provider-sink-BU29Sh8h.d.ts","names":[],"sources":["../src/trace/raw-provider-sink.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BY;UAEK;;EAEf;;EAEA;EACA;;;;;;EAMA;EACA;;EAEA;;EAEA;;EAEA;EACA,WAAW;;EAEX;;EAEA;EACA;EACA,iBAAiB;EACjB;EACA,kBAAkB;EAClB;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA,YAAY;EACZ;;UAGe;EACf,OAAO,OAAO,mBAAmB;;EAEjC,MAAM,SAAS,wBAAwB,QAAQ;;EAE/C,UAAU;;KAGA,oBAAoB,OAAO,qBAAqB;;;;;;iBAmB5C,wBAAwB,OAAO,mBAAmB;UA8CjD;EACf,WAAW;;cAGA,mCAAmC;UACtC;UACA;EAER,YAAY,OAAM;EAIZ,OAAO,OAAO,mBAAmB;EAIjC,KAAK,SAAQ,wBAA6B,QAAQ;EAUxD;;cAKW,+BAA+B;EACpC,UAAU;;;;;;;EASV,QAAQ,QAAQ;;UAOP;;EAEf;;EAEA;;EAEA;EACA,WAAW;;cAGA,qCAAqC;UACxC;UACA;UACA;UACA;UACA;UACA;UACA;EAER,YAAY,MAAM;UAOJ;UAON;EAKF,OAAO,OAAO,mBAAmB;EAYjC,KAAK,SAAQ,wBAA6B,QAAQ;;;;;;iBAkC1C,oBAAoB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-BRfMIs81.d.ts","names":[],"sources":["../src/trace/otel.ts","../src/trace/otlp-attributes.ts","../src/trace/otel-export.ts","../src/trace/otel-bridge.ts","../src/trace/redact.ts","../src/trace/store-to-otlp.ts","../src/trace-analyst/hook.ts","../src/trace-analyst/insights.ts","../src/trace/otlp-flat.ts","../src/trace-analyst/otlp-flatten.ts","../src/trace-analyst/otlp-span.ts","../src/trace-analyst/otlp-to-run-records.ts","../src/trace-analyst/prompts.ts","../src/trace-analyst/store-otlp.ts","../src/trace-analyst/tools.ts","../src/replay.ts"],"mappings":";;;;;;;;;;cAoBa;EAA0B;EAAoC;;UAE1D;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;IACV;IACA;MAAS;MAAsB;MAAmB;MAAsB;;;EAE1E,SAAS;IAAQ;IAAsB;IAAc,aAAa;;EAClE;IAAW;IAAc;;;UAGV;EACf;IAAY,YAAY;;EACxB,YAAY;IAAQ,cAAc;IAAuB,OAAO;;;UAGjD;EACf,eAAe;;;iBAIK,gBACpB,OAAO,YACP,eACA,gBAAe,4CACd,QAAQ;;;KC5BC,oBAAoB,KAC9B;KAIU;UAUK;EACf;EACA,YAAY;EACZ;;;;;;;iBAkBc,qBAAqB,OAAO,oBAAoB;iBA2BhD,gBAAgB,OAAO;iBAkBvB,4BACd,YAAY,yBACZ,MAAM;iBAMQ,iCAAiC;;;UC/FhC;;EAEf;;EAEA,UAAU;;EAEV;;EAEA;;EAEA,qBAAqB;;EAErB;;UAGe;;EAEf,WAAW,MAAM;;EAEjB,SAAS;;EAET,YAAY;;UAGG;EACf;EACA;EACA;EACA;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