@peakinfer/cli 1.0.133
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/.claude/settings.local.json +8 -0
- package/.env.example +6 -0
- package/.github/workflows/peakinfer.yml +64 -0
- package/CHANGELOG.md +31 -0
- package/LICENSE +190 -0
- package/README.md +335 -0
- package/data/inferencemax.json +274 -0
- package/dist/agent-analyzer.d.ts +45 -0
- package/dist/agent-analyzer.d.ts.map +1 -0
- package/dist/agent-analyzer.js +374 -0
- package/dist/agent-analyzer.js.map +1 -0
- package/dist/agent.d.ts +76 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +965 -0
- package/dist/agent.js.map +1 -0
- package/dist/agents/correlation-analyzer.d.ts +34 -0
- package/dist/agents/correlation-analyzer.d.ts.map +1 -0
- package/dist/agents/correlation-analyzer.js +261 -0
- package/dist/agents/correlation-analyzer.js.map +1 -0
- package/dist/agents/index.d.ts +91 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +111 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/runtime-analyzer.d.ts +38 -0
- package/dist/agents/runtime-analyzer.d.ts.map +1 -0
- package/dist/agents/runtime-analyzer.js +244 -0
- package/dist/agents/runtime-analyzer.js.map +1 -0
- package/dist/analysis-types.d.ts +500 -0
- package/dist/analysis-types.d.ts.map +1 -0
- package/dist/analysis-types.js +11 -0
- package/dist/analysis-types.js.map +1 -0
- package/dist/analytics.d.ts +25 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +94 -0
- package/dist/analytics.js.map +1 -0
- package/dist/analyzer.d.ts +48 -0
- package/dist/analyzer.d.ts.map +1 -0
- package/dist/analyzer.js +547 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/artifacts.d.ts +44 -0
- package/dist/artifacts.d.ts.map +1 -0
- package/dist/artifacts.js +165 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/benchmarks/index.d.ts +88 -0
- package/dist/benchmarks/index.d.ts.map +1 -0
- package/dist/benchmarks/index.js +205 -0
- package/dist/benchmarks/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +427 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/ci.d.ts +19 -0
- package/dist/commands/ci.d.ts.map +1 -0
- package/dist/commands/ci.js +253 -0
- package/dist/commands/ci.js.map +1 -0
- package/dist/commands/config.d.ts +16 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +249 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/demo.d.ts +15 -0
- package/dist/commands/demo.d.ts.map +1 -0
- package/dist/commands/demo.js +106 -0
- package/dist/commands/demo.js.map +1 -0
- package/dist/commands/export.d.ts +14 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +209 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/history.d.ts +15 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +389 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/template.d.ts +14 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +341 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/validate-map.d.ts +12 -0
- package/dist/commands/validate-map.d.ts.map +1 -0
- package/dist/commands/validate-map.js +274 -0
- package/dist/commands/validate-map.js.map +1 -0
- package/dist/commands/whatif.d.ts +17 -0
- package/dist/commands/whatif.d.ts.map +1 -0
- package/dist/commands/whatif.js +206 -0
- package/dist/commands/whatif.js.map +1 -0
- package/dist/comparison.d.ts +38 -0
- package/dist/comparison.d.ts.map +1 -0
- package/dist/comparison.js +223 -0
- package/dist/comparison.js.map +1 -0
- package/dist/config.d.ts +42 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +158 -0
- package/dist/config.js.map +1 -0
- package/dist/connectors/helicone.d.ts +9 -0
- package/dist/connectors/helicone.d.ts.map +1 -0
- package/dist/connectors/helicone.js +106 -0
- package/dist/connectors/helicone.js.map +1 -0
- package/dist/connectors/index.d.ts +37 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +65 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/langsmith.d.ts +9 -0
- package/dist/connectors/langsmith.d.ts.map +1 -0
- package/dist/connectors/langsmith.js +122 -0
- package/dist/connectors/langsmith.js.map +1 -0
- package/dist/connectors/types.d.ts +83 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +98 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/cost-estimator.d.ts +46 -0
- package/dist/cost-estimator.d.ts.map +1 -0
- package/dist/cost-estimator.js +104 -0
- package/dist/cost-estimator.js.map +1 -0
- package/dist/costs.d.ts +57 -0
- package/dist/costs.d.ts.map +1 -0
- package/dist/costs.js +251 -0
- package/dist/costs.js.map +1 -0
- package/dist/counterfactuals.d.ts +29 -0
- package/dist/counterfactuals.d.ts.map +1 -0
- package/dist/counterfactuals.js +448 -0
- package/dist/counterfactuals.js.map +1 -0
- package/dist/enhancement-prompts.d.ts +41 -0
- package/dist/enhancement-prompts.d.ts.map +1 -0
- package/dist/enhancement-prompts.js +88 -0
- package/dist/enhancement-prompts.js.map +1 -0
- package/dist/envelopes.d.ts +20 -0
- package/dist/envelopes.d.ts.map +1 -0
- package/dist/envelopes.js +790 -0
- package/dist/envelopes.js.map +1 -0
- package/dist/format-normalizer.d.ts +71 -0
- package/dist/format-normalizer.d.ts.map +1 -0
- package/dist/format-normalizer.js +1331 -0
- package/dist/format-normalizer.js.map +1 -0
- package/dist/history.d.ts +79 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +313 -0
- package/dist/history.js.map +1 -0
- package/dist/html.d.ts +11 -0
- package/dist/html.d.ts.map +1 -0
- package/dist/html.js +463 -0
- package/dist/html.js.map +1 -0
- package/dist/impact.d.ts +42 -0
- package/dist/impact.d.ts.map +1 -0
- package/dist/impact.js +443 -0
- package/dist/impact.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/insights.d.ts +5 -0
- package/dist/insights.d.ts.map +1 -0
- package/dist/insights.js +271 -0
- package/dist/insights.js.map +1 -0
- package/dist/joiner.d.ts +9 -0
- package/dist/joiner.d.ts.map +1 -0
- package/dist/joiner.js +247 -0
- package/dist/joiner.js.map +1 -0
- package/dist/orchestrator.d.ts +34 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +827 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/pdf.d.ts +26 -0
- package/dist/pdf.d.ts.map +1 -0
- package/dist/pdf.js +84 -0
- package/dist/pdf.js.map +1 -0
- package/dist/prediction.d.ts +33 -0
- package/dist/prediction.d.ts.map +1 -0
- package/dist/prediction.js +316 -0
- package/dist/prediction.js.map +1 -0
- package/dist/prompts/loader.d.ts +38 -0
- package/dist/prompts/loader.d.ts.map +1 -0
- package/dist/prompts/loader.js +60 -0
- package/dist/prompts/loader.js.map +1 -0
- package/dist/renderer.d.ts +64 -0
- package/dist/renderer.d.ts.map +1 -0
- package/dist/renderer.js +923 -0
- package/dist/renderer.js.map +1 -0
- package/dist/runid.d.ts +57 -0
- package/dist/runid.d.ts.map +1 -0
- package/dist/runid.js +199 -0
- package/dist/runid.js.map +1 -0
- package/dist/runtime.d.ts +29 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +366 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scanner.d.ts +11 -0
- package/dist/scanner.d.ts.map +1 -0
- package/dist/scanner.js +426 -0
- package/dist/scanner.js.map +1 -0
- package/dist/templates.d.ts +120 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +429 -0
- package/dist/templates.js.map +1 -0
- package/dist/tools/index.d.ts +153 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +177 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +3647 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +703 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +23 -0
- package/dist/version.js.map +1 -0
- package/docs/demo-guide.md +423 -0
- package/docs/events-format.md +295 -0
- package/docs/inferencemap-spec.md +344 -0
- package/docs/migration-v2.md +293 -0
- package/fixtures/demo/precomputed.json +142 -0
- package/fixtures/demo-project/README.md +52 -0
- package/fixtures/demo-project/ai-service.ts +65 -0
- package/fixtures/demo-project/sample-events.jsonl +15 -0
- package/fixtures/demo-project/src/ai-service.ts +128 -0
- package/fixtures/demo-project/src/llm-client.ts +155 -0
- package/package.json +65 -0
- package/prompts/agent-analyzer.yaml +47 -0
- package/prompts/ci-gate.yaml +98 -0
- package/prompts/correlation-analyzer.yaml +178 -0
- package/prompts/format-normalizer.yaml +46 -0
- package/prompts/peak-performance.yaml +180 -0
- package/prompts/pr-comment.yaml +111 -0
- package/prompts/runtime-analyzer.yaml +189 -0
- package/prompts/unified-analyzer.yaml +241 -0
- package/schemas/inference-map.v0.1.json +215 -0
- package/scripts/benchmark.ts +394 -0
- package/scripts/demo-v1.5.sh +158 -0
- package/scripts/sync-from-site.sh +197 -0
- package/scripts/validate-sync.sh +178 -0
- package/src/agent-analyzer.ts +481 -0
- package/src/agent.ts +1232 -0
- package/src/agents/correlation-analyzer.ts +353 -0
- package/src/agents/index.ts +235 -0
- package/src/agents/runtime-analyzer.ts +343 -0
- package/src/analysis-types.ts +558 -0
- package/src/analytics.ts +100 -0
- package/src/analyzer.ts +692 -0
- package/src/artifacts.ts +218 -0
- package/src/benchmarks/index.ts +309 -0
- package/src/cli.ts +503 -0
- package/src/commands/ci.ts +336 -0
- package/src/commands/config.ts +288 -0
- package/src/commands/demo.ts +175 -0
- package/src/commands/export.ts +297 -0
- package/src/commands/history.ts +425 -0
- package/src/commands/template.ts +385 -0
- package/src/commands/validate-map.ts +324 -0
- package/src/commands/whatif.ts +272 -0
- package/src/comparison.ts +283 -0
- package/src/config.ts +188 -0
- package/src/connectors/helicone.ts +164 -0
- package/src/connectors/index.ts +93 -0
- package/src/connectors/langsmith.ts +179 -0
- package/src/connectors/types.ts +180 -0
- package/src/cost-estimator.ts +146 -0
- package/src/costs.ts +347 -0
- package/src/counterfactuals.ts +516 -0
- package/src/enhancement-prompts.ts +118 -0
- package/src/envelopes.ts +814 -0
- package/src/format-normalizer.ts +1486 -0
- package/src/history.ts +400 -0
- package/src/html.ts +512 -0
- package/src/impact.ts +522 -0
- package/src/index.ts +83 -0
- package/src/insights.ts +341 -0
- package/src/joiner.ts +289 -0
- package/src/orchestrator.ts +1015 -0
- package/src/pdf.ts +110 -0
- package/src/prediction.ts +392 -0
- package/src/prompts/loader.ts +88 -0
- package/src/renderer.ts +1045 -0
- package/src/runid.ts +261 -0
- package/src/runtime.ts +450 -0
- package/src/scanner.ts +508 -0
- package/src/templates.ts +561 -0
- package/src/tools/index.ts +214 -0
- package/src/types.ts +873 -0
- package/src/version.ts +24 -0
- package/templates/context-accumulation.yaml +23 -0
- package/templates/cost-concentration.yaml +20 -0
- package/templates/dead-code.yaml +20 -0
- package/templates/latency-explainer.yaml +23 -0
- package/templates/optimizations/ab-testing-framework.yaml +74 -0
- package/templates/optimizations/api-gateway-optimization.yaml +81 -0
- package/templates/optimizations/api-model-routing-strategy.yaml +126 -0
- package/templates/optimizations/auto-scaling-optimization.yaml +85 -0
- package/templates/optimizations/batch-utilization-diagnostic.yaml +142 -0
- package/templates/optimizations/comprehensive-apm.yaml +76 -0
- package/templates/optimizations/context-window-optimization.yaml +91 -0
- package/templates/optimizations/cost-sensitive-batch-processing.yaml +77 -0
- package/templates/optimizations/distributed-training-optimization.yaml +77 -0
- package/templates/optimizations/document-analysis-edge.yaml +77 -0
- package/templates/optimizations/document-pipeline-optimization.yaml +78 -0
- package/templates/optimizations/domain-specific-distillation.yaml +78 -0
- package/templates/optimizations/error-handling-optimization.yaml +76 -0
- package/templates/optimizations/gptq-4bit-quantization.yaml +96 -0
- package/templates/optimizations/long-context-memory-management.yaml +78 -0
- package/templates/optimizations/max-tokens-optimization.yaml +76 -0
- package/templates/optimizations/memory-bandwidth-optimization.yaml +73 -0
- package/templates/optimizations/multi-framework-resilience.yaml +75 -0
- package/templates/optimizations/multi-tenant-optimization.yaml +75 -0
- package/templates/optimizations/prompt-caching-optimization.yaml +143 -0
- package/templates/optimizations/pytorch-to-onnx-migration.yaml +109 -0
- package/templates/optimizations/quality-monitoring.yaml +74 -0
- package/templates/optimizations/realtime-budget-controls.yaml +74 -0
- package/templates/optimizations/realtime-latency-optimization.yaml +74 -0
- package/templates/optimizations/sglang-concurrency-optimization.yaml +78 -0
- package/templates/optimizations/smart-model-routing.yaml +96 -0
- package/templates/optimizations/streaming-batch-selection.yaml +167 -0
- package/templates/optimizations/system-prompt-optimization.yaml +75 -0
- package/templates/optimizations/tensorrt-llm-performance.yaml +77 -0
- package/templates/optimizations/vllm-high-throughput-optimization.yaml +93 -0
- package/templates/optimizations/vllm-migration-memory-bound.yaml +78 -0
- package/templates/overpowered-extraction.yaml +32 -0
- package/templates/overpowered-model.yaml +31 -0
- package/templates/prompt-bloat.yaml +24 -0
- package/templates/retry-explosion.yaml +28 -0
- package/templates/schema/insight.schema.json +113 -0
- package/templates/schema/optimization.schema.json +180 -0
- package/templates/streaming-drift.yaml +30 -0
- package/templates/throughput-gap.yaml +21 -0
- package/templates/token-underutilization.yaml +28 -0
- package/templates/untested-fallback.yaml +21 -0
- package/tests/accuracy/drift-detection.test.ts +184 -0
- package/tests/accuracy/false-positives.test.ts +166 -0
- package/tests/accuracy/templates.test.ts +205 -0
- package/tests/action/commands.test.ts +125 -0
- package/tests/action/comments.test.ts +347 -0
- package/tests/cli.test.ts +203 -0
- package/tests/comparison.test.ts +309 -0
- package/tests/correlation-analyzer.test.ts +534 -0
- package/tests/counterfactuals.test.ts +347 -0
- package/tests/fixtures/events/missing-id.jsonl +1 -0
- package/tests/fixtures/events/missing-input.jsonl +1 -0
- package/tests/fixtures/events/missing-latency.jsonl +1 -0
- package/tests/fixtures/events/missing-model.jsonl +1 -0
- package/tests/fixtures/events/missing-output.jsonl +1 -0
- package/tests/fixtures/events/missing-provider.jsonl +1 -0
- package/tests/fixtures/events/missing-ts.jsonl +1 -0
- package/tests/fixtures/events/valid.csv +3 -0
- package/tests/fixtures/events/valid.json +1 -0
- package/tests/fixtures/events/valid.jsonl +2 -0
- package/tests/fixtures/events/with-callsite.jsonl +1 -0
- package/tests/fixtures/events/with-intent.jsonl +1 -0
- package/tests/fixtures/events/wrong-type.jsonl +1 -0
- package/tests/fixtures/repos/empty/.gitkeep +0 -0
- package/tests/fixtures/repos/hybrid-router/router.py +35 -0
- package/tests/fixtures/repos/saas-anthropic/agent.ts +27 -0
- package/tests/fixtures/repos/saas-openai/assistant.js +33 -0
- package/tests/fixtures/repos/saas-openai/client.py +26 -0
- package/tests/fixtures/repos/self-hosted-vllm/inference.py +22 -0
- package/tests/github-action.test.ts +292 -0
- package/tests/insights.test.ts +878 -0
- package/tests/joiner.test.ts +168 -0
- package/tests/performance/action-latency.test.ts +132 -0
- package/tests/performance/benchmark.test.ts +189 -0
- package/tests/performance/cli-latency.test.ts +102 -0
- package/tests/pr-comment.test.ts +313 -0
- package/tests/prediction.test.ts +296 -0
- package/tests/runtime-analyzer.test.ts +375 -0
- package/tests/runtime.test.ts +205 -0
- package/tests/scanner.test.ts +122 -0
- package/tests/template-conformance.test.ts +526 -0
- package/tests/unit/cost-calculator.test.ts +303 -0
- package/tests/unit/credits.test.ts +180 -0
- package/tests/unit/inference-map.test.ts +276 -0
- package/tests/unit/schema.test.ts +300 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +14 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,3647 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Provider: z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>;
|
|
3
|
+
export declare const Severity: z.ZodEnum<["critical", "warning", "info"]>;
|
|
4
|
+
export declare const Category: z.ZodEnum<["cost", "latency", "drift", "reliability", "waste", "throughput", "security", "best-practice"]>;
|
|
5
|
+
export declare const Patterns: z.ZodObject<{
|
|
6
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
streaming?: boolean | undefined;
|
|
13
|
+
batching?: boolean | undefined;
|
|
14
|
+
retries?: boolean | undefined;
|
|
15
|
+
caching?: boolean | undefined;
|
|
16
|
+
fallback?: boolean | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
streaming?: boolean | undefined;
|
|
19
|
+
batching?: boolean | undefined;
|
|
20
|
+
retries?: boolean | undefined;
|
|
21
|
+
caching?: boolean | undefined;
|
|
22
|
+
fallback?: boolean | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const Callsite: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
file: z.ZodString;
|
|
27
|
+
line: z.ZodNumber;
|
|
28
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
29
|
+
model: z.ZodNullable<z.ZodString>;
|
|
30
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
31
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
32
|
+
patterns: z.ZodObject<{
|
|
33
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
streaming?: boolean | undefined;
|
|
40
|
+
batching?: boolean | undefined;
|
|
41
|
+
retries?: boolean | undefined;
|
|
42
|
+
caching?: boolean | undefined;
|
|
43
|
+
fallback?: boolean | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
streaming?: boolean | undefined;
|
|
46
|
+
batching?: boolean | undefined;
|
|
47
|
+
retries?: boolean | undefined;
|
|
48
|
+
caching?: boolean | undefined;
|
|
49
|
+
fallback?: boolean | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
confidence: z.ZodNumber;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
id: string;
|
|
54
|
+
file: string;
|
|
55
|
+
line: number;
|
|
56
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
57
|
+
model: string | null;
|
|
58
|
+
framework: string | null;
|
|
59
|
+
runtime: string | null;
|
|
60
|
+
patterns: {
|
|
61
|
+
streaming?: boolean | undefined;
|
|
62
|
+
batching?: boolean | undefined;
|
|
63
|
+
retries?: boolean | undefined;
|
|
64
|
+
caching?: boolean | undefined;
|
|
65
|
+
fallback?: boolean | undefined;
|
|
66
|
+
};
|
|
67
|
+
confidence: number;
|
|
68
|
+
}, {
|
|
69
|
+
id: string;
|
|
70
|
+
file: string;
|
|
71
|
+
line: number;
|
|
72
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
73
|
+
model: string | null;
|
|
74
|
+
framework: string | null;
|
|
75
|
+
runtime: string | null;
|
|
76
|
+
patterns: {
|
|
77
|
+
streaming?: boolean | undefined;
|
|
78
|
+
batching?: boolean | undefined;
|
|
79
|
+
retries?: boolean | undefined;
|
|
80
|
+
caching?: boolean | undefined;
|
|
81
|
+
fallback?: boolean | undefined;
|
|
82
|
+
};
|
|
83
|
+
confidence: number;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const ScanCandidate: z.ZodObject<{
|
|
86
|
+
file: z.ZodString;
|
|
87
|
+
line: z.ZodNumber;
|
|
88
|
+
snippet: z.ZodString;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
file: string;
|
|
91
|
+
line: number;
|
|
92
|
+
snippet: string;
|
|
93
|
+
}, {
|
|
94
|
+
file: string;
|
|
95
|
+
line: number;
|
|
96
|
+
snippet: string;
|
|
97
|
+
}>;
|
|
98
|
+
export declare const ScannedFile: z.ZodObject<{
|
|
99
|
+
path: z.ZodString;
|
|
100
|
+
language: z.ZodString;
|
|
101
|
+
loc: z.ZodNumber;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
path: string;
|
|
104
|
+
language: string;
|
|
105
|
+
loc: number;
|
|
106
|
+
}, {
|
|
107
|
+
path: string;
|
|
108
|
+
language: string;
|
|
109
|
+
loc: number;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const ScanResult: z.ZodObject<{
|
|
112
|
+
root: z.ZodString;
|
|
113
|
+
files: z.ZodArray<z.ZodObject<{
|
|
114
|
+
path: z.ZodString;
|
|
115
|
+
language: z.ZodString;
|
|
116
|
+
loc: z.ZodNumber;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
path: string;
|
|
119
|
+
language: string;
|
|
120
|
+
loc: number;
|
|
121
|
+
}, {
|
|
122
|
+
path: string;
|
|
123
|
+
language: string;
|
|
124
|
+
loc: number;
|
|
125
|
+
}>, "many">;
|
|
126
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
127
|
+
file: z.ZodString;
|
|
128
|
+
line: z.ZodNumber;
|
|
129
|
+
snippet: z.ZodString;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
file: string;
|
|
132
|
+
line: number;
|
|
133
|
+
snippet: string;
|
|
134
|
+
}, {
|
|
135
|
+
file: string;
|
|
136
|
+
line: number;
|
|
137
|
+
snippet: string;
|
|
138
|
+
}>, "many">;
|
|
139
|
+
summary: z.ZodObject<{
|
|
140
|
+
totalFiles: z.ZodNumber;
|
|
141
|
+
totalLoc: z.ZodNumber;
|
|
142
|
+
languages: z.ZodArray<z.ZodString, "many">;
|
|
143
|
+
totalCandidates: z.ZodNumber;
|
|
144
|
+
skippedLargeFiles: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
skippedByPattern: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
totalFiles: number;
|
|
148
|
+
totalLoc: number;
|
|
149
|
+
languages: string[];
|
|
150
|
+
totalCandidates: number;
|
|
151
|
+
skippedLargeFiles?: number | undefined;
|
|
152
|
+
skippedByPattern?: number | undefined;
|
|
153
|
+
}, {
|
|
154
|
+
totalFiles: number;
|
|
155
|
+
totalLoc: number;
|
|
156
|
+
languages: string[];
|
|
157
|
+
totalCandidates: number;
|
|
158
|
+
skippedLargeFiles?: number | undefined;
|
|
159
|
+
skippedByPattern?: number | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
root: string;
|
|
163
|
+
files: {
|
|
164
|
+
path: string;
|
|
165
|
+
language: string;
|
|
166
|
+
loc: number;
|
|
167
|
+
}[];
|
|
168
|
+
candidates: {
|
|
169
|
+
file: string;
|
|
170
|
+
line: number;
|
|
171
|
+
snippet: string;
|
|
172
|
+
}[];
|
|
173
|
+
summary: {
|
|
174
|
+
totalFiles: number;
|
|
175
|
+
totalLoc: number;
|
|
176
|
+
languages: string[];
|
|
177
|
+
totalCandidates: number;
|
|
178
|
+
skippedLargeFiles?: number | undefined;
|
|
179
|
+
skippedByPattern?: number | undefined;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
root: string;
|
|
183
|
+
files: {
|
|
184
|
+
path: string;
|
|
185
|
+
language: string;
|
|
186
|
+
loc: number;
|
|
187
|
+
}[];
|
|
188
|
+
candidates: {
|
|
189
|
+
file: string;
|
|
190
|
+
line: number;
|
|
191
|
+
snippet: string;
|
|
192
|
+
}[];
|
|
193
|
+
summary: {
|
|
194
|
+
totalFiles: number;
|
|
195
|
+
totalLoc: number;
|
|
196
|
+
languages: string[];
|
|
197
|
+
totalCandidates: number;
|
|
198
|
+
skippedLargeFiles?: number | undefined;
|
|
199
|
+
skippedByPattern?: number | undefined;
|
|
200
|
+
};
|
|
201
|
+
}>;
|
|
202
|
+
export declare const InferenceMap: z.ZodObject<{
|
|
203
|
+
version: z.ZodString;
|
|
204
|
+
root: z.ZodString;
|
|
205
|
+
generatedAt: z.ZodString;
|
|
206
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
absolutePath: z.ZodString;
|
|
208
|
+
promptId: z.ZodOptional<z.ZodString>;
|
|
209
|
+
promptVersion: z.ZodOptional<z.ZodString>;
|
|
210
|
+
templatesVersion: z.ZodOptional<z.ZodString>;
|
|
211
|
+
llmProvider: z.ZodOptional<z.ZodString>;
|
|
212
|
+
llmModel: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
absolutePath: string;
|
|
215
|
+
promptId?: string | undefined;
|
|
216
|
+
promptVersion?: string | undefined;
|
|
217
|
+
templatesVersion?: string | undefined;
|
|
218
|
+
llmProvider?: string | undefined;
|
|
219
|
+
llmModel?: string | undefined;
|
|
220
|
+
}, {
|
|
221
|
+
absolutePath: string;
|
|
222
|
+
promptId?: string | undefined;
|
|
223
|
+
promptVersion?: string | undefined;
|
|
224
|
+
templatesVersion?: string | undefined;
|
|
225
|
+
llmProvider?: string | undefined;
|
|
226
|
+
llmModel?: string | undefined;
|
|
227
|
+
}>>;
|
|
228
|
+
summary: z.ZodObject<{
|
|
229
|
+
totalCallsites: z.ZodNumber;
|
|
230
|
+
providers: z.ZodArray<z.ZodString, "many">;
|
|
231
|
+
models: z.ZodArray<z.ZodString, "many">;
|
|
232
|
+
patterns: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
patterns: Record<string, number>;
|
|
235
|
+
totalCallsites: number;
|
|
236
|
+
providers: string[];
|
|
237
|
+
models: string[];
|
|
238
|
+
}, {
|
|
239
|
+
patterns: Record<string, number>;
|
|
240
|
+
totalCallsites: number;
|
|
241
|
+
providers: string[];
|
|
242
|
+
models: string[];
|
|
243
|
+
}>;
|
|
244
|
+
callsites: z.ZodArray<z.ZodObject<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
file: z.ZodString;
|
|
247
|
+
line: z.ZodNumber;
|
|
248
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
249
|
+
model: z.ZodNullable<z.ZodString>;
|
|
250
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
251
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
252
|
+
patterns: z.ZodObject<{
|
|
253
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
254
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
streaming?: boolean | undefined;
|
|
260
|
+
batching?: boolean | undefined;
|
|
261
|
+
retries?: boolean | undefined;
|
|
262
|
+
caching?: boolean | undefined;
|
|
263
|
+
fallback?: boolean | undefined;
|
|
264
|
+
}, {
|
|
265
|
+
streaming?: boolean | undefined;
|
|
266
|
+
batching?: boolean | undefined;
|
|
267
|
+
retries?: boolean | undefined;
|
|
268
|
+
caching?: boolean | undefined;
|
|
269
|
+
fallback?: boolean | undefined;
|
|
270
|
+
}>;
|
|
271
|
+
confidence: z.ZodNumber;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
id: string;
|
|
274
|
+
file: string;
|
|
275
|
+
line: number;
|
|
276
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
277
|
+
model: string | null;
|
|
278
|
+
framework: string | null;
|
|
279
|
+
runtime: string | null;
|
|
280
|
+
patterns: {
|
|
281
|
+
streaming?: boolean | undefined;
|
|
282
|
+
batching?: boolean | undefined;
|
|
283
|
+
retries?: boolean | undefined;
|
|
284
|
+
caching?: boolean | undefined;
|
|
285
|
+
fallback?: boolean | undefined;
|
|
286
|
+
};
|
|
287
|
+
confidence: number;
|
|
288
|
+
}, {
|
|
289
|
+
id: string;
|
|
290
|
+
file: string;
|
|
291
|
+
line: number;
|
|
292
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
293
|
+
model: string | null;
|
|
294
|
+
framework: string | null;
|
|
295
|
+
runtime: string | null;
|
|
296
|
+
patterns: {
|
|
297
|
+
streaming?: boolean | undefined;
|
|
298
|
+
batching?: boolean | undefined;
|
|
299
|
+
retries?: boolean | undefined;
|
|
300
|
+
caching?: boolean | undefined;
|
|
301
|
+
fallback?: boolean | undefined;
|
|
302
|
+
};
|
|
303
|
+
confidence: number;
|
|
304
|
+
}>, "many">;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
root: string;
|
|
307
|
+
summary: {
|
|
308
|
+
patterns: Record<string, number>;
|
|
309
|
+
totalCallsites: number;
|
|
310
|
+
providers: string[];
|
|
311
|
+
models: string[];
|
|
312
|
+
};
|
|
313
|
+
version: string;
|
|
314
|
+
generatedAt: string;
|
|
315
|
+
callsites: {
|
|
316
|
+
id: string;
|
|
317
|
+
file: string;
|
|
318
|
+
line: number;
|
|
319
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
320
|
+
model: string | null;
|
|
321
|
+
framework: string | null;
|
|
322
|
+
runtime: string | null;
|
|
323
|
+
patterns: {
|
|
324
|
+
streaming?: boolean | undefined;
|
|
325
|
+
batching?: boolean | undefined;
|
|
326
|
+
retries?: boolean | undefined;
|
|
327
|
+
caching?: boolean | undefined;
|
|
328
|
+
fallback?: boolean | undefined;
|
|
329
|
+
};
|
|
330
|
+
confidence: number;
|
|
331
|
+
}[];
|
|
332
|
+
metadata?: {
|
|
333
|
+
absolutePath: string;
|
|
334
|
+
promptId?: string | undefined;
|
|
335
|
+
promptVersion?: string | undefined;
|
|
336
|
+
templatesVersion?: string | undefined;
|
|
337
|
+
llmProvider?: string | undefined;
|
|
338
|
+
llmModel?: string | undefined;
|
|
339
|
+
} | undefined;
|
|
340
|
+
}, {
|
|
341
|
+
root: string;
|
|
342
|
+
summary: {
|
|
343
|
+
patterns: Record<string, number>;
|
|
344
|
+
totalCallsites: number;
|
|
345
|
+
providers: string[];
|
|
346
|
+
models: string[];
|
|
347
|
+
};
|
|
348
|
+
version: string;
|
|
349
|
+
generatedAt: string;
|
|
350
|
+
callsites: {
|
|
351
|
+
id: string;
|
|
352
|
+
file: string;
|
|
353
|
+
line: number;
|
|
354
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
355
|
+
model: string | null;
|
|
356
|
+
framework: string | null;
|
|
357
|
+
runtime: string | null;
|
|
358
|
+
patterns: {
|
|
359
|
+
streaming?: boolean | undefined;
|
|
360
|
+
batching?: boolean | undefined;
|
|
361
|
+
retries?: boolean | undefined;
|
|
362
|
+
caching?: boolean | undefined;
|
|
363
|
+
fallback?: boolean | undefined;
|
|
364
|
+
};
|
|
365
|
+
confidence: number;
|
|
366
|
+
}[];
|
|
367
|
+
metadata?: {
|
|
368
|
+
absolutePath: string;
|
|
369
|
+
promptId?: string | undefined;
|
|
370
|
+
promptVersion?: string | undefined;
|
|
371
|
+
templatesVersion?: string | undefined;
|
|
372
|
+
llmProvider?: string | undefined;
|
|
373
|
+
llmModel?: string | undefined;
|
|
374
|
+
} | undefined;
|
|
375
|
+
}>;
|
|
376
|
+
export declare const InferenceEvent: z.ZodObject<{
|
|
377
|
+
id: z.ZodString;
|
|
378
|
+
ts: z.ZodString;
|
|
379
|
+
provider: z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>;
|
|
380
|
+
model: z.ZodString;
|
|
381
|
+
input_tokens: z.ZodNumber;
|
|
382
|
+
output_tokens: z.ZodNumber;
|
|
383
|
+
latency_ms: z.ZodNumber;
|
|
384
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
385
|
+
callsite_id: z.ZodOptional<z.ZodString>;
|
|
386
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
387
|
+
ttft_ms: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
batch_size: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
batch_id: z.ZodOptional<z.ZodString>;
|
|
390
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
original_model: z.ZodOptional<z.ZodString>;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
395
|
+
id: string;
|
|
396
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
397
|
+
model: string;
|
|
398
|
+
ts: string;
|
|
399
|
+
input_tokens: number;
|
|
400
|
+
output_tokens: number;
|
|
401
|
+
latency_ms: number;
|
|
402
|
+
streaming?: boolean | undefined;
|
|
403
|
+
intent?: string | undefined;
|
|
404
|
+
callsite_id?: string | undefined;
|
|
405
|
+
ttft_ms?: number | undefined;
|
|
406
|
+
batch_size?: number | undefined;
|
|
407
|
+
batch_id?: string | undefined;
|
|
408
|
+
cached?: boolean | undefined;
|
|
409
|
+
retry_count?: number | undefined;
|
|
410
|
+
fallback_used?: boolean | undefined;
|
|
411
|
+
original_model?: string | undefined;
|
|
412
|
+
}, {
|
|
413
|
+
id: string;
|
|
414
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
415
|
+
model: string;
|
|
416
|
+
ts: string;
|
|
417
|
+
input_tokens: number;
|
|
418
|
+
output_tokens: number;
|
|
419
|
+
latency_ms: number;
|
|
420
|
+
streaming?: boolean | undefined;
|
|
421
|
+
intent?: string | undefined;
|
|
422
|
+
callsite_id?: string | undefined;
|
|
423
|
+
ttft_ms?: number | undefined;
|
|
424
|
+
batch_size?: number | undefined;
|
|
425
|
+
batch_id?: string | undefined;
|
|
426
|
+
cached?: boolean | undefined;
|
|
427
|
+
retry_count?: number | undefined;
|
|
428
|
+
fallback_used?: boolean | undefined;
|
|
429
|
+
original_model?: string | undefined;
|
|
430
|
+
}>;
|
|
431
|
+
export declare const ProviderStats: z.ZodObject<{
|
|
432
|
+
calls: z.ZodNumber;
|
|
433
|
+
tokens_in: z.ZodNumber;
|
|
434
|
+
tokens_out: z.ZodNumber;
|
|
435
|
+
latency_p50: z.ZodNumber;
|
|
436
|
+
latency_p95: z.ZodNumber;
|
|
437
|
+
latency_p99: z.ZodNumber;
|
|
438
|
+
}, "strip", z.ZodTypeAny, {
|
|
439
|
+
calls: number;
|
|
440
|
+
tokens_in: number;
|
|
441
|
+
tokens_out: number;
|
|
442
|
+
latency_p50: number;
|
|
443
|
+
latency_p95: number;
|
|
444
|
+
latency_p99: number;
|
|
445
|
+
}, {
|
|
446
|
+
calls: number;
|
|
447
|
+
tokens_in: number;
|
|
448
|
+
tokens_out: number;
|
|
449
|
+
latency_p50: number;
|
|
450
|
+
latency_p95: number;
|
|
451
|
+
latency_p99: number;
|
|
452
|
+
}>;
|
|
453
|
+
export declare const RuntimeSummary: z.ZodObject<{
|
|
454
|
+
totalEvents: z.ZodNumber;
|
|
455
|
+
byProvider: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
456
|
+
calls: z.ZodNumber;
|
|
457
|
+
tokens_in: z.ZodNumber;
|
|
458
|
+
tokens_out: z.ZodNumber;
|
|
459
|
+
latency_p50: z.ZodNumber;
|
|
460
|
+
latency_p95: z.ZodNumber;
|
|
461
|
+
latency_p99: z.ZodNumber;
|
|
462
|
+
}, "strip", z.ZodTypeAny, {
|
|
463
|
+
calls: number;
|
|
464
|
+
tokens_in: number;
|
|
465
|
+
tokens_out: number;
|
|
466
|
+
latency_p50: number;
|
|
467
|
+
latency_p95: number;
|
|
468
|
+
latency_p99: number;
|
|
469
|
+
}, {
|
|
470
|
+
calls: number;
|
|
471
|
+
tokens_in: number;
|
|
472
|
+
tokens_out: number;
|
|
473
|
+
latency_p50: number;
|
|
474
|
+
latency_p95: number;
|
|
475
|
+
latency_p99: number;
|
|
476
|
+
}>>;
|
|
477
|
+
byModel: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
478
|
+
calls: z.ZodNumber;
|
|
479
|
+
tokens_in: z.ZodNumber;
|
|
480
|
+
tokens_out: z.ZodNumber;
|
|
481
|
+
latency_p50: z.ZodNumber;
|
|
482
|
+
latency_p95: z.ZodNumber;
|
|
483
|
+
latency_p99: z.ZodNumber;
|
|
484
|
+
}, "strip", z.ZodTypeAny, {
|
|
485
|
+
calls: number;
|
|
486
|
+
tokens_in: number;
|
|
487
|
+
tokens_out: number;
|
|
488
|
+
latency_p50: number;
|
|
489
|
+
latency_p95: number;
|
|
490
|
+
latency_p99: number;
|
|
491
|
+
}, {
|
|
492
|
+
calls: number;
|
|
493
|
+
tokens_in: number;
|
|
494
|
+
tokens_out: number;
|
|
495
|
+
latency_p50: number;
|
|
496
|
+
latency_p95: number;
|
|
497
|
+
latency_p99: number;
|
|
498
|
+
}>>;
|
|
499
|
+
global: z.ZodObject<{
|
|
500
|
+
p50: z.ZodNumber;
|
|
501
|
+
p95: z.ZodNumber;
|
|
502
|
+
p99: z.ZodNumber;
|
|
503
|
+
}, "strip", z.ZodTypeAny, {
|
|
504
|
+
p50: number;
|
|
505
|
+
p95: number;
|
|
506
|
+
p99: number;
|
|
507
|
+
}, {
|
|
508
|
+
p50: number;
|
|
509
|
+
p95: number;
|
|
510
|
+
p99: number;
|
|
511
|
+
}>;
|
|
512
|
+
}, "strip", z.ZodTypeAny, {
|
|
513
|
+
totalEvents: number;
|
|
514
|
+
byProvider: Record<string, {
|
|
515
|
+
calls: number;
|
|
516
|
+
tokens_in: number;
|
|
517
|
+
tokens_out: number;
|
|
518
|
+
latency_p50: number;
|
|
519
|
+
latency_p95: number;
|
|
520
|
+
latency_p99: number;
|
|
521
|
+
}>;
|
|
522
|
+
byModel: Record<string, {
|
|
523
|
+
calls: number;
|
|
524
|
+
tokens_in: number;
|
|
525
|
+
tokens_out: number;
|
|
526
|
+
latency_p50: number;
|
|
527
|
+
latency_p95: number;
|
|
528
|
+
latency_p99: number;
|
|
529
|
+
}>;
|
|
530
|
+
global: {
|
|
531
|
+
p50: number;
|
|
532
|
+
p95: number;
|
|
533
|
+
p99: number;
|
|
534
|
+
};
|
|
535
|
+
}, {
|
|
536
|
+
totalEvents: number;
|
|
537
|
+
byProvider: Record<string, {
|
|
538
|
+
calls: number;
|
|
539
|
+
tokens_in: number;
|
|
540
|
+
tokens_out: number;
|
|
541
|
+
latency_p50: number;
|
|
542
|
+
latency_p95: number;
|
|
543
|
+
latency_p99: number;
|
|
544
|
+
}>;
|
|
545
|
+
byModel: Record<string, {
|
|
546
|
+
calls: number;
|
|
547
|
+
tokens_in: number;
|
|
548
|
+
tokens_out: number;
|
|
549
|
+
latency_p50: number;
|
|
550
|
+
latency_p95: number;
|
|
551
|
+
latency_p99: number;
|
|
552
|
+
}>;
|
|
553
|
+
global: {
|
|
554
|
+
p50: number;
|
|
555
|
+
p95: number;
|
|
556
|
+
p99: number;
|
|
557
|
+
};
|
|
558
|
+
}>;
|
|
559
|
+
export declare const UsageStats: z.ZodObject<{
|
|
560
|
+
calls: z.ZodNumber;
|
|
561
|
+
tokens_in: z.ZodNumber;
|
|
562
|
+
tokens_out: z.ZodNumber;
|
|
563
|
+
latency_p50: z.ZodNumber;
|
|
564
|
+
latency_p95: z.ZodNumber;
|
|
565
|
+
latency_p99: z.ZodNumber;
|
|
566
|
+
}, "strip", z.ZodTypeAny, {
|
|
567
|
+
calls: number;
|
|
568
|
+
tokens_in: number;
|
|
569
|
+
tokens_out: number;
|
|
570
|
+
latency_p50: number;
|
|
571
|
+
latency_p95: number;
|
|
572
|
+
latency_p99: number;
|
|
573
|
+
}, {
|
|
574
|
+
calls: number;
|
|
575
|
+
tokens_in: number;
|
|
576
|
+
tokens_out: number;
|
|
577
|
+
latency_p50: number;
|
|
578
|
+
latency_p95: number;
|
|
579
|
+
latency_p99: number;
|
|
580
|
+
}>;
|
|
581
|
+
export declare const DriftSignal: z.ZodObject<{
|
|
582
|
+
type: z.ZodEnum<["codeOnly", "runtimeOnly", "mismatch", "patternDrift"]>;
|
|
583
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
584
|
+
model: z.ZodOptional<z.ZodString>;
|
|
585
|
+
callsiteId: z.ZodOptional<z.ZodString>;
|
|
586
|
+
message: z.ZodString;
|
|
587
|
+
}, "strip", z.ZodTypeAny, {
|
|
588
|
+
message: string;
|
|
589
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
590
|
+
provider?: string | undefined;
|
|
591
|
+
model?: string | undefined;
|
|
592
|
+
callsiteId?: string | undefined;
|
|
593
|
+
}, {
|
|
594
|
+
message: string;
|
|
595
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
596
|
+
provider?: string | undefined;
|
|
597
|
+
model?: string | undefined;
|
|
598
|
+
callsiteId?: string | undefined;
|
|
599
|
+
}>;
|
|
600
|
+
export declare const EnrichedCallsite: z.ZodObject<{
|
|
601
|
+
id: z.ZodString;
|
|
602
|
+
file: z.ZodString;
|
|
603
|
+
line: z.ZodNumber;
|
|
604
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
605
|
+
model: z.ZodNullable<z.ZodString>;
|
|
606
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
607
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
608
|
+
patterns: z.ZodObject<{
|
|
609
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
610
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
611
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
612
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
613
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
614
|
+
}, "strip", z.ZodTypeAny, {
|
|
615
|
+
streaming?: boolean | undefined;
|
|
616
|
+
batching?: boolean | undefined;
|
|
617
|
+
retries?: boolean | undefined;
|
|
618
|
+
caching?: boolean | undefined;
|
|
619
|
+
fallback?: boolean | undefined;
|
|
620
|
+
}, {
|
|
621
|
+
streaming?: boolean | undefined;
|
|
622
|
+
batching?: boolean | undefined;
|
|
623
|
+
retries?: boolean | undefined;
|
|
624
|
+
caching?: boolean | undefined;
|
|
625
|
+
fallback?: boolean | undefined;
|
|
626
|
+
}>;
|
|
627
|
+
confidence: z.ZodNumber;
|
|
628
|
+
} & {
|
|
629
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
630
|
+
calls: z.ZodNumber;
|
|
631
|
+
tokens_in: z.ZodNumber;
|
|
632
|
+
tokens_out: z.ZodNumber;
|
|
633
|
+
latency_p50: z.ZodNumber;
|
|
634
|
+
latency_p95: z.ZodNumber;
|
|
635
|
+
latency_p99: z.ZodNumber;
|
|
636
|
+
}, "strip", z.ZodTypeAny, {
|
|
637
|
+
calls: number;
|
|
638
|
+
tokens_in: number;
|
|
639
|
+
tokens_out: number;
|
|
640
|
+
latency_p50: number;
|
|
641
|
+
latency_p95: number;
|
|
642
|
+
latency_p99: number;
|
|
643
|
+
}, {
|
|
644
|
+
calls: number;
|
|
645
|
+
tokens_in: number;
|
|
646
|
+
tokens_out: number;
|
|
647
|
+
latency_p50: number;
|
|
648
|
+
latency_p95: number;
|
|
649
|
+
latency_p99: number;
|
|
650
|
+
}>>;
|
|
651
|
+
}, "strip", z.ZodTypeAny, {
|
|
652
|
+
id: string;
|
|
653
|
+
file: string;
|
|
654
|
+
line: number;
|
|
655
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
656
|
+
model: string | null;
|
|
657
|
+
framework: string | null;
|
|
658
|
+
runtime: string | null;
|
|
659
|
+
patterns: {
|
|
660
|
+
streaming?: boolean | undefined;
|
|
661
|
+
batching?: boolean | undefined;
|
|
662
|
+
retries?: boolean | undefined;
|
|
663
|
+
caching?: boolean | undefined;
|
|
664
|
+
fallback?: boolean | undefined;
|
|
665
|
+
};
|
|
666
|
+
confidence: number;
|
|
667
|
+
usage?: {
|
|
668
|
+
calls: number;
|
|
669
|
+
tokens_in: number;
|
|
670
|
+
tokens_out: number;
|
|
671
|
+
latency_p50: number;
|
|
672
|
+
latency_p95: number;
|
|
673
|
+
latency_p99: number;
|
|
674
|
+
} | undefined;
|
|
675
|
+
}, {
|
|
676
|
+
id: string;
|
|
677
|
+
file: string;
|
|
678
|
+
line: number;
|
|
679
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
680
|
+
model: string | null;
|
|
681
|
+
framework: string | null;
|
|
682
|
+
runtime: string | null;
|
|
683
|
+
patterns: {
|
|
684
|
+
streaming?: boolean | undefined;
|
|
685
|
+
batching?: boolean | undefined;
|
|
686
|
+
retries?: boolean | undefined;
|
|
687
|
+
caching?: boolean | undefined;
|
|
688
|
+
fallback?: boolean | undefined;
|
|
689
|
+
};
|
|
690
|
+
confidence: number;
|
|
691
|
+
usage?: {
|
|
692
|
+
calls: number;
|
|
693
|
+
tokens_in: number;
|
|
694
|
+
tokens_out: number;
|
|
695
|
+
latency_p50: number;
|
|
696
|
+
latency_p95: number;
|
|
697
|
+
latency_p99: number;
|
|
698
|
+
} | undefined;
|
|
699
|
+
}>;
|
|
700
|
+
export declare const JoinedOutput: z.ZodObject<{
|
|
701
|
+
callsites: z.ZodArray<z.ZodObject<{
|
|
702
|
+
id: z.ZodString;
|
|
703
|
+
file: z.ZodString;
|
|
704
|
+
line: z.ZodNumber;
|
|
705
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
706
|
+
model: z.ZodNullable<z.ZodString>;
|
|
707
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
708
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
709
|
+
patterns: z.ZodObject<{
|
|
710
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
711
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
712
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
713
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
714
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
715
|
+
}, "strip", z.ZodTypeAny, {
|
|
716
|
+
streaming?: boolean | undefined;
|
|
717
|
+
batching?: boolean | undefined;
|
|
718
|
+
retries?: boolean | undefined;
|
|
719
|
+
caching?: boolean | undefined;
|
|
720
|
+
fallback?: boolean | undefined;
|
|
721
|
+
}, {
|
|
722
|
+
streaming?: boolean | undefined;
|
|
723
|
+
batching?: boolean | undefined;
|
|
724
|
+
retries?: boolean | undefined;
|
|
725
|
+
caching?: boolean | undefined;
|
|
726
|
+
fallback?: boolean | undefined;
|
|
727
|
+
}>;
|
|
728
|
+
confidence: z.ZodNumber;
|
|
729
|
+
} & {
|
|
730
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
calls: z.ZodNumber;
|
|
732
|
+
tokens_in: z.ZodNumber;
|
|
733
|
+
tokens_out: z.ZodNumber;
|
|
734
|
+
latency_p50: z.ZodNumber;
|
|
735
|
+
latency_p95: z.ZodNumber;
|
|
736
|
+
latency_p99: z.ZodNumber;
|
|
737
|
+
}, "strip", z.ZodTypeAny, {
|
|
738
|
+
calls: number;
|
|
739
|
+
tokens_in: number;
|
|
740
|
+
tokens_out: number;
|
|
741
|
+
latency_p50: number;
|
|
742
|
+
latency_p95: number;
|
|
743
|
+
latency_p99: number;
|
|
744
|
+
}, {
|
|
745
|
+
calls: number;
|
|
746
|
+
tokens_in: number;
|
|
747
|
+
tokens_out: number;
|
|
748
|
+
latency_p50: number;
|
|
749
|
+
latency_p95: number;
|
|
750
|
+
latency_p99: number;
|
|
751
|
+
}>>;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
id: string;
|
|
754
|
+
file: string;
|
|
755
|
+
line: number;
|
|
756
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
757
|
+
model: string | null;
|
|
758
|
+
framework: string | null;
|
|
759
|
+
runtime: string | null;
|
|
760
|
+
patterns: {
|
|
761
|
+
streaming?: boolean | undefined;
|
|
762
|
+
batching?: boolean | undefined;
|
|
763
|
+
retries?: boolean | undefined;
|
|
764
|
+
caching?: boolean | undefined;
|
|
765
|
+
fallback?: boolean | undefined;
|
|
766
|
+
};
|
|
767
|
+
confidence: number;
|
|
768
|
+
usage?: {
|
|
769
|
+
calls: number;
|
|
770
|
+
tokens_in: number;
|
|
771
|
+
tokens_out: number;
|
|
772
|
+
latency_p50: number;
|
|
773
|
+
latency_p95: number;
|
|
774
|
+
latency_p99: number;
|
|
775
|
+
} | undefined;
|
|
776
|
+
}, {
|
|
777
|
+
id: string;
|
|
778
|
+
file: string;
|
|
779
|
+
line: number;
|
|
780
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
781
|
+
model: string | null;
|
|
782
|
+
framework: string | null;
|
|
783
|
+
runtime: string | null;
|
|
784
|
+
patterns: {
|
|
785
|
+
streaming?: boolean | undefined;
|
|
786
|
+
batching?: boolean | undefined;
|
|
787
|
+
retries?: boolean | undefined;
|
|
788
|
+
caching?: boolean | undefined;
|
|
789
|
+
fallback?: boolean | undefined;
|
|
790
|
+
};
|
|
791
|
+
confidence: number;
|
|
792
|
+
usage?: {
|
|
793
|
+
calls: number;
|
|
794
|
+
tokens_in: number;
|
|
795
|
+
tokens_out: number;
|
|
796
|
+
latency_p50: number;
|
|
797
|
+
latency_p95: number;
|
|
798
|
+
latency_p99: number;
|
|
799
|
+
} | undefined;
|
|
800
|
+
}>, "many">;
|
|
801
|
+
codeOnly: z.ZodArray<z.ZodObject<{
|
|
802
|
+
id: z.ZodString;
|
|
803
|
+
file: z.ZodString;
|
|
804
|
+
line: z.ZodNumber;
|
|
805
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
806
|
+
model: z.ZodNullable<z.ZodString>;
|
|
807
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
808
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
809
|
+
patterns: z.ZodObject<{
|
|
810
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
811
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
812
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
813
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
814
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
815
|
+
}, "strip", z.ZodTypeAny, {
|
|
816
|
+
streaming?: boolean | undefined;
|
|
817
|
+
batching?: boolean | undefined;
|
|
818
|
+
retries?: boolean | undefined;
|
|
819
|
+
caching?: boolean | undefined;
|
|
820
|
+
fallback?: boolean | undefined;
|
|
821
|
+
}, {
|
|
822
|
+
streaming?: boolean | undefined;
|
|
823
|
+
batching?: boolean | undefined;
|
|
824
|
+
retries?: boolean | undefined;
|
|
825
|
+
caching?: boolean | undefined;
|
|
826
|
+
fallback?: boolean | undefined;
|
|
827
|
+
}>;
|
|
828
|
+
confidence: z.ZodNumber;
|
|
829
|
+
}, "strip", z.ZodTypeAny, {
|
|
830
|
+
id: string;
|
|
831
|
+
file: string;
|
|
832
|
+
line: number;
|
|
833
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
834
|
+
model: string | null;
|
|
835
|
+
framework: string | null;
|
|
836
|
+
runtime: string | null;
|
|
837
|
+
patterns: {
|
|
838
|
+
streaming?: boolean | undefined;
|
|
839
|
+
batching?: boolean | undefined;
|
|
840
|
+
retries?: boolean | undefined;
|
|
841
|
+
caching?: boolean | undefined;
|
|
842
|
+
fallback?: boolean | undefined;
|
|
843
|
+
};
|
|
844
|
+
confidence: number;
|
|
845
|
+
}, {
|
|
846
|
+
id: string;
|
|
847
|
+
file: string;
|
|
848
|
+
line: number;
|
|
849
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
850
|
+
model: string | null;
|
|
851
|
+
framework: string | null;
|
|
852
|
+
runtime: string | null;
|
|
853
|
+
patterns: {
|
|
854
|
+
streaming?: boolean | undefined;
|
|
855
|
+
batching?: boolean | undefined;
|
|
856
|
+
retries?: boolean | undefined;
|
|
857
|
+
caching?: boolean | undefined;
|
|
858
|
+
fallback?: boolean | undefined;
|
|
859
|
+
};
|
|
860
|
+
confidence: number;
|
|
861
|
+
}>, "many">;
|
|
862
|
+
runtimeOnly: z.ZodArray<z.ZodObject<{
|
|
863
|
+
id: z.ZodString;
|
|
864
|
+
ts: z.ZodString;
|
|
865
|
+
provider: z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>;
|
|
866
|
+
model: z.ZodString;
|
|
867
|
+
input_tokens: z.ZodNumber;
|
|
868
|
+
output_tokens: z.ZodNumber;
|
|
869
|
+
latency_ms: z.ZodNumber;
|
|
870
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
871
|
+
callsite_id: z.ZodOptional<z.ZodString>;
|
|
872
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
873
|
+
ttft_ms: z.ZodOptional<z.ZodNumber>;
|
|
874
|
+
batch_size: z.ZodOptional<z.ZodNumber>;
|
|
875
|
+
batch_id: z.ZodOptional<z.ZodString>;
|
|
876
|
+
cached: z.ZodOptional<z.ZodBoolean>;
|
|
877
|
+
retry_count: z.ZodOptional<z.ZodNumber>;
|
|
878
|
+
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
879
|
+
original_model: z.ZodOptional<z.ZodString>;
|
|
880
|
+
}, "strip", z.ZodTypeAny, {
|
|
881
|
+
id: string;
|
|
882
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
883
|
+
model: string;
|
|
884
|
+
ts: string;
|
|
885
|
+
input_tokens: number;
|
|
886
|
+
output_tokens: number;
|
|
887
|
+
latency_ms: number;
|
|
888
|
+
streaming?: boolean | undefined;
|
|
889
|
+
intent?: string | undefined;
|
|
890
|
+
callsite_id?: string | undefined;
|
|
891
|
+
ttft_ms?: number | undefined;
|
|
892
|
+
batch_size?: number | undefined;
|
|
893
|
+
batch_id?: string | undefined;
|
|
894
|
+
cached?: boolean | undefined;
|
|
895
|
+
retry_count?: number | undefined;
|
|
896
|
+
fallback_used?: boolean | undefined;
|
|
897
|
+
original_model?: string | undefined;
|
|
898
|
+
}, {
|
|
899
|
+
id: string;
|
|
900
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
901
|
+
model: string;
|
|
902
|
+
ts: string;
|
|
903
|
+
input_tokens: number;
|
|
904
|
+
output_tokens: number;
|
|
905
|
+
latency_ms: number;
|
|
906
|
+
streaming?: boolean | undefined;
|
|
907
|
+
intent?: string | undefined;
|
|
908
|
+
callsite_id?: string | undefined;
|
|
909
|
+
ttft_ms?: number | undefined;
|
|
910
|
+
batch_size?: number | undefined;
|
|
911
|
+
batch_id?: string | undefined;
|
|
912
|
+
cached?: boolean | undefined;
|
|
913
|
+
retry_count?: number | undefined;
|
|
914
|
+
fallback_used?: boolean | undefined;
|
|
915
|
+
original_model?: string | undefined;
|
|
916
|
+
}>, "many">;
|
|
917
|
+
drift: z.ZodArray<z.ZodObject<{
|
|
918
|
+
type: z.ZodEnum<["codeOnly", "runtimeOnly", "mismatch", "patternDrift"]>;
|
|
919
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
920
|
+
model: z.ZodOptional<z.ZodString>;
|
|
921
|
+
callsiteId: z.ZodOptional<z.ZodString>;
|
|
922
|
+
message: z.ZodString;
|
|
923
|
+
}, "strip", z.ZodTypeAny, {
|
|
924
|
+
message: string;
|
|
925
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
926
|
+
provider?: string | undefined;
|
|
927
|
+
model?: string | undefined;
|
|
928
|
+
callsiteId?: string | undefined;
|
|
929
|
+
}, {
|
|
930
|
+
message: string;
|
|
931
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
932
|
+
provider?: string | undefined;
|
|
933
|
+
model?: string | undefined;
|
|
934
|
+
callsiteId?: string | undefined;
|
|
935
|
+
}>, "many">;
|
|
936
|
+
}, "strip", z.ZodTypeAny, {
|
|
937
|
+
drift: {
|
|
938
|
+
message: string;
|
|
939
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
940
|
+
provider?: string | undefined;
|
|
941
|
+
model?: string | undefined;
|
|
942
|
+
callsiteId?: string | undefined;
|
|
943
|
+
}[];
|
|
944
|
+
callsites: {
|
|
945
|
+
id: string;
|
|
946
|
+
file: string;
|
|
947
|
+
line: number;
|
|
948
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
949
|
+
model: string | null;
|
|
950
|
+
framework: string | null;
|
|
951
|
+
runtime: string | null;
|
|
952
|
+
patterns: {
|
|
953
|
+
streaming?: boolean | undefined;
|
|
954
|
+
batching?: boolean | undefined;
|
|
955
|
+
retries?: boolean | undefined;
|
|
956
|
+
caching?: boolean | undefined;
|
|
957
|
+
fallback?: boolean | undefined;
|
|
958
|
+
};
|
|
959
|
+
confidence: number;
|
|
960
|
+
usage?: {
|
|
961
|
+
calls: number;
|
|
962
|
+
tokens_in: number;
|
|
963
|
+
tokens_out: number;
|
|
964
|
+
latency_p50: number;
|
|
965
|
+
latency_p95: number;
|
|
966
|
+
latency_p99: number;
|
|
967
|
+
} | undefined;
|
|
968
|
+
}[];
|
|
969
|
+
codeOnly: {
|
|
970
|
+
id: string;
|
|
971
|
+
file: string;
|
|
972
|
+
line: number;
|
|
973
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
974
|
+
model: string | null;
|
|
975
|
+
framework: string | null;
|
|
976
|
+
runtime: string | null;
|
|
977
|
+
patterns: {
|
|
978
|
+
streaming?: boolean | undefined;
|
|
979
|
+
batching?: boolean | undefined;
|
|
980
|
+
retries?: boolean | undefined;
|
|
981
|
+
caching?: boolean | undefined;
|
|
982
|
+
fallback?: boolean | undefined;
|
|
983
|
+
};
|
|
984
|
+
confidence: number;
|
|
985
|
+
}[];
|
|
986
|
+
runtimeOnly: {
|
|
987
|
+
id: string;
|
|
988
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
989
|
+
model: string;
|
|
990
|
+
ts: string;
|
|
991
|
+
input_tokens: number;
|
|
992
|
+
output_tokens: number;
|
|
993
|
+
latency_ms: number;
|
|
994
|
+
streaming?: boolean | undefined;
|
|
995
|
+
intent?: string | undefined;
|
|
996
|
+
callsite_id?: string | undefined;
|
|
997
|
+
ttft_ms?: number | undefined;
|
|
998
|
+
batch_size?: number | undefined;
|
|
999
|
+
batch_id?: string | undefined;
|
|
1000
|
+
cached?: boolean | undefined;
|
|
1001
|
+
retry_count?: number | undefined;
|
|
1002
|
+
fallback_used?: boolean | undefined;
|
|
1003
|
+
original_model?: string | undefined;
|
|
1004
|
+
}[];
|
|
1005
|
+
}, {
|
|
1006
|
+
drift: {
|
|
1007
|
+
message: string;
|
|
1008
|
+
type: "codeOnly" | "runtimeOnly" | "mismatch" | "patternDrift";
|
|
1009
|
+
provider?: string | undefined;
|
|
1010
|
+
model?: string | undefined;
|
|
1011
|
+
callsiteId?: string | undefined;
|
|
1012
|
+
}[];
|
|
1013
|
+
callsites: {
|
|
1014
|
+
id: string;
|
|
1015
|
+
file: string;
|
|
1016
|
+
line: number;
|
|
1017
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
1018
|
+
model: string | null;
|
|
1019
|
+
framework: string | null;
|
|
1020
|
+
runtime: string | null;
|
|
1021
|
+
patterns: {
|
|
1022
|
+
streaming?: boolean | undefined;
|
|
1023
|
+
batching?: boolean | undefined;
|
|
1024
|
+
retries?: boolean | undefined;
|
|
1025
|
+
caching?: boolean | undefined;
|
|
1026
|
+
fallback?: boolean | undefined;
|
|
1027
|
+
};
|
|
1028
|
+
confidence: number;
|
|
1029
|
+
usage?: {
|
|
1030
|
+
calls: number;
|
|
1031
|
+
tokens_in: number;
|
|
1032
|
+
tokens_out: number;
|
|
1033
|
+
latency_p50: number;
|
|
1034
|
+
latency_p95: number;
|
|
1035
|
+
latency_p99: number;
|
|
1036
|
+
} | undefined;
|
|
1037
|
+
}[];
|
|
1038
|
+
codeOnly: {
|
|
1039
|
+
id: string;
|
|
1040
|
+
file: string;
|
|
1041
|
+
line: number;
|
|
1042
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
1043
|
+
model: string | null;
|
|
1044
|
+
framework: string | null;
|
|
1045
|
+
runtime: string | null;
|
|
1046
|
+
patterns: {
|
|
1047
|
+
streaming?: boolean | undefined;
|
|
1048
|
+
batching?: boolean | undefined;
|
|
1049
|
+
retries?: boolean | undefined;
|
|
1050
|
+
caching?: boolean | undefined;
|
|
1051
|
+
fallback?: boolean | undefined;
|
|
1052
|
+
};
|
|
1053
|
+
confidence: number;
|
|
1054
|
+
}[];
|
|
1055
|
+
runtimeOnly: {
|
|
1056
|
+
id: string;
|
|
1057
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown";
|
|
1058
|
+
model: string;
|
|
1059
|
+
ts: string;
|
|
1060
|
+
input_tokens: number;
|
|
1061
|
+
output_tokens: number;
|
|
1062
|
+
latency_ms: number;
|
|
1063
|
+
streaming?: boolean | undefined;
|
|
1064
|
+
intent?: string | undefined;
|
|
1065
|
+
callsite_id?: string | undefined;
|
|
1066
|
+
ttft_ms?: number | undefined;
|
|
1067
|
+
batch_size?: number | undefined;
|
|
1068
|
+
batch_id?: string | undefined;
|
|
1069
|
+
cached?: boolean | undefined;
|
|
1070
|
+
retry_count?: number | undefined;
|
|
1071
|
+
fallback_used?: boolean | undefined;
|
|
1072
|
+
original_model?: string | undefined;
|
|
1073
|
+
}[];
|
|
1074
|
+
}>;
|
|
1075
|
+
export declare const TemplateCondition: z.ZodObject<{
|
|
1076
|
+
field: z.ZodString;
|
|
1077
|
+
op: z.ZodEnum<["eq", "neq", "gt", "lt", "gte", "lte", "exists", "in", "ratio_gt", "ratio_lt", "has_pattern"]>;
|
|
1078
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
1079
|
+
compare_to: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
count_gt: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
}, "strip", z.ZodTypeAny, {
|
|
1083
|
+
field: string;
|
|
1084
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1085
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1086
|
+
compare_to?: string | undefined;
|
|
1087
|
+
pattern?: string | undefined;
|
|
1088
|
+
count_gt?: number | undefined;
|
|
1089
|
+
}, {
|
|
1090
|
+
field: string;
|
|
1091
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1092
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1093
|
+
compare_to?: string | undefined;
|
|
1094
|
+
pattern?: string | undefined;
|
|
1095
|
+
count_gt?: number | undefined;
|
|
1096
|
+
}>;
|
|
1097
|
+
export declare const InsightTemplate: z.ZodObject<{
|
|
1098
|
+
id: z.ZodString;
|
|
1099
|
+
name: z.ZodString;
|
|
1100
|
+
version: z.ZodString;
|
|
1101
|
+
category: z.ZodEnum<["cost", "latency", "drift", "reliability", "waste", "throughput", "security", "best-practice"]>;
|
|
1102
|
+
severity: z.ZodEnum<["critical", "warning", "info"]>;
|
|
1103
|
+
layer: z.ZodOptional<z.ZodEnum<["application", "api", "gateway", "runtime", "model", "hardware"]>>;
|
|
1104
|
+
match: z.ZodObject<{
|
|
1105
|
+
scope: z.ZodEnum<["callsite", "joined", "global", "envelope"]>;
|
|
1106
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1107
|
+
field: z.ZodString;
|
|
1108
|
+
op: z.ZodEnum<["eq", "neq", "gt", "lt", "gte", "lte", "exists", "in", "ratio_gt", "ratio_lt", "has_pattern"]>;
|
|
1109
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
1110
|
+
compare_to: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
count_gt: z.ZodOptional<z.ZodNumber>;
|
|
1113
|
+
}, "strip", z.ZodTypeAny, {
|
|
1114
|
+
field: string;
|
|
1115
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1116
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1117
|
+
compare_to?: string | undefined;
|
|
1118
|
+
pattern?: string | undefined;
|
|
1119
|
+
count_gt?: number | undefined;
|
|
1120
|
+
}, {
|
|
1121
|
+
field: string;
|
|
1122
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1123
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1124
|
+
compare_to?: string | undefined;
|
|
1125
|
+
pattern?: string | undefined;
|
|
1126
|
+
count_gt?: number | undefined;
|
|
1127
|
+
}>, "many">;
|
|
1128
|
+
}, "strip", z.ZodTypeAny, {
|
|
1129
|
+
scope: "global" | "callsite" | "joined" | "envelope";
|
|
1130
|
+
conditions: {
|
|
1131
|
+
field: string;
|
|
1132
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1133
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1134
|
+
compare_to?: string | undefined;
|
|
1135
|
+
pattern?: string | undefined;
|
|
1136
|
+
count_gt?: number | undefined;
|
|
1137
|
+
}[];
|
|
1138
|
+
}, {
|
|
1139
|
+
scope: "global" | "callsite" | "joined" | "envelope";
|
|
1140
|
+
conditions: {
|
|
1141
|
+
field: string;
|
|
1142
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1143
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1144
|
+
compare_to?: string | undefined;
|
|
1145
|
+
pattern?: string | undefined;
|
|
1146
|
+
count_gt?: number | undefined;
|
|
1147
|
+
}[];
|
|
1148
|
+
}>;
|
|
1149
|
+
output: z.ZodObject<{
|
|
1150
|
+
headline: z.ZodString;
|
|
1151
|
+
evidence: z.ZodString;
|
|
1152
|
+
}, "strip", z.ZodTypeAny, {
|
|
1153
|
+
headline: string;
|
|
1154
|
+
evidence: string;
|
|
1155
|
+
}, {
|
|
1156
|
+
headline: string;
|
|
1157
|
+
evidence: string;
|
|
1158
|
+
}>;
|
|
1159
|
+
defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1160
|
+
}, "strip", z.ZodTypeAny, {
|
|
1161
|
+
id: string;
|
|
1162
|
+
version: string;
|
|
1163
|
+
name: string;
|
|
1164
|
+
category: "cost" | "latency" | "drift" | "reliability" | "waste" | "throughput" | "security" | "best-practice";
|
|
1165
|
+
severity: "critical" | "warning" | "info";
|
|
1166
|
+
match: {
|
|
1167
|
+
scope: "global" | "callsite" | "joined" | "envelope";
|
|
1168
|
+
conditions: {
|
|
1169
|
+
field: string;
|
|
1170
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1171
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1172
|
+
compare_to?: string | undefined;
|
|
1173
|
+
pattern?: string | undefined;
|
|
1174
|
+
count_gt?: number | undefined;
|
|
1175
|
+
}[];
|
|
1176
|
+
};
|
|
1177
|
+
output: {
|
|
1178
|
+
headline: string;
|
|
1179
|
+
evidence: string;
|
|
1180
|
+
};
|
|
1181
|
+
layer?: "model" | "runtime" | "application" | "api" | "gateway" | "hardware" | undefined;
|
|
1182
|
+
defaults?: Record<string, number> | undefined;
|
|
1183
|
+
}, {
|
|
1184
|
+
id: string;
|
|
1185
|
+
version: string;
|
|
1186
|
+
name: string;
|
|
1187
|
+
category: "cost" | "latency" | "drift" | "reliability" | "waste" | "throughput" | "security" | "best-practice";
|
|
1188
|
+
severity: "critical" | "warning" | "info";
|
|
1189
|
+
match: {
|
|
1190
|
+
scope: "global" | "callsite" | "joined" | "envelope";
|
|
1191
|
+
conditions: {
|
|
1192
|
+
field: string;
|
|
1193
|
+
op: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "exists" | "in" | "ratio_gt" | "ratio_lt" | "has_pattern";
|
|
1194
|
+
value?: string | number | boolean | string[] | undefined;
|
|
1195
|
+
compare_to?: string | undefined;
|
|
1196
|
+
pattern?: string | undefined;
|
|
1197
|
+
count_gt?: number | undefined;
|
|
1198
|
+
}[];
|
|
1199
|
+
};
|
|
1200
|
+
output: {
|
|
1201
|
+
headline: string;
|
|
1202
|
+
evidence: string;
|
|
1203
|
+
};
|
|
1204
|
+
layer?: "model" | "runtime" | "application" | "api" | "gateway" | "hardware" | undefined;
|
|
1205
|
+
defaults?: Record<string, number> | undefined;
|
|
1206
|
+
}>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Optimization template category - matches Inference Squeeze Guide structure
|
|
1209
|
+
*/
|
|
1210
|
+
export declare const OptimizationCategory: z.ZodEnum<["runtime_optimization", "batching_optimization", "memory_optimization", "application_optimization", "cost_optimization", "monitoring", "scaling"]>;
|
|
1211
|
+
/**
|
|
1212
|
+
* Risk level for optimization implementation
|
|
1213
|
+
*/
|
|
1214
|
+
export declare const OptimizationRiskLevel: z.ZodEnum<["low", "medium", "high"]>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Implementation step with validation and rollback
|
|
1217
|
+
*/
|
|
1218
|
+
export declare const ImplementationStep: z.ZodObject<{
|
|
1219
|
+
step_id: z.ZodString;
|
|
1220
|
+
name: z.ZodString;
|
|
1221
|
+
executable: z.ZodOptional<z.ZodBoolean>;
|
|
1222
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1223
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1224
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
success_criteria: z.ZodOptional<z.ZodString>;
|
|
1226
|
+
rollback_command: z.ZodOptional<z.ZodString>;
|
|
1227
|
+
}, "strip", z.ZodTypeAny, {
|
|
1228
|
+
command?: string | undefined;
|
|
1229
|
+
success_criteria?: string | undefined;
|
|
1230
|
+
rollback_command?: string | undefined;
|
|
1231
|
+
}, {
|
|
1232
|
+
command?: string | undefined;
|
|
1233
|
+
success_criteria?: string | undefined;
|
|
1234
|
+
rollback_command?: string | undefined;
|
|
1235
|
+
}>>;
|
|
1236
|
+
}, "strip", z.ZodTypeAny, {
|
|
1237
|
+
name: string;
|
|
1238
|
+
step_id: string;
|
|
1239
|
+
validation?: {
|
|
1240
|
+
command?: string | undefined;
|
|
1241
|
+
success_criteria?: string | undefined;
|
|
1242
|
+
rollback_command?: string | undefined;
|
|
1243
|
+
} | undefined;
|
|
1244
|
+
executable?: boolean | undefined;
|
|
1245
|
+
commands?: string[] | undefined;
|
|
1246
|
+
}, {
|
|
1247
|
+
name: string;
|
|
1248
|
+
step_id: string;
|
|
1249
|
+
validation?: {
|
|
1250
|
+
command?: string | undefined;
|
|
1251
|
+
success_criteria?: string | undefined;
|
|
1252
|
+
rollback_command?: string | undefined;
|
|
1253
|
+
} | undefined;
|
|
1254
|
+
executable?: boolean | undefined;
|
|
1255
|
+
commands?: string[] | undefined;
|
|
1256
|
+
}>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Monitoring metric configuration
|
|
1259
|
+
*/
|
|
1260
|
+
export declare const MonitoringMetric: z.ZodObject<{
|
|
1261
|
+
metric: z.ZodString;
|
|
1262
|
+
target: z.ZodString;
|
|
1263
|
+
alert_threshold: z.ZodString;
|
|
1264
|
+
}, "strip", z.ZodTypeAny, {
|
|
1265
|
+
metric: string;
|
|
1266
|
+
target: string;
|
|
1267
|
+
alert_threshold: string;
|
|
1268
|
+
}, {
|
|
1269
|
+
metric: string;
|
|
1270
|
+
target: string;
|
|
1271
|
+
alert_threshold: string;
|
|
1272
|
+
}>;
|
|
1273
|
+
/**
|
|
1274
|
+
* Rollback trigger configuration
|
|
1275
|
+
*/
|
|
1276
|
+
export declare const RollbackTrigger: z.ZodObject<{
|
|
1277
|
+
condition: z.ZodString;
|
|
1278
|
+
action: z.ZodString;
|
|
1279
|
+
}, "strip", z.ZodTypeAny, {
|
|
1280
|
+
condition: string;
|
|
1281
|
+
action: string;
|
|
1282
|
+
}, {
|
|
1283
|
+
condition: string;
|
|
1284
|
+
action: string;
|
|
1285
|
+
}>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Community Optimization Template - runbook-style templates from Inference Squeeze Guide
|
|
1288
|
+
* These templates provide step-by-step implementation guides with ROI estimates
|
|
1289
|
+
*/
|
|
1290
|
+
export declare const OptimizationTemplate: z.ZodObject<{
|
|
1291
|
+
id: z.ZodString;
|
|
1292
|
+
name: z.ZodString;
|
|
1293
|
+
description: z.ZodString;
|
|
1294
|
+
category: z.ZodEnum<["runtime_optimization", "batching_optimization", "memory_optimization", "application_optimization", "cost_optimization", "monitoring", "scaling"]>;
|
|
1295
|
+
confidence: z.ZodNumber;
|
|
1296
|
+
success_count: z.ZodOptional<z.ZodNumber>;
|
|
1297
|
+
verified_environments: z.ZodOptional<z.ZodNumber>;
|
|
1298
|
+
contributors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1299
|
+
last_updated: z.ZodOptional<z.ZodString>;
|
|
1300
|
+
environment_match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
|
|
1301
|
+
optimization: z.ZodObject<{
|
|
1302
|
+
technique: z.ZodString;
|
|
1303
|
+
expected_cost_reduction: z.ZodOptional<z.ZodString>;
|
|
1304
|
+
expected_latency_improvement: z.ZodOptional<z.ZodString>;
|
|
1305
|
+
expected_throughput_improvement: z.ZodOptional<z.ZodString>;
|
|
1306
|
+
expected_memory_reduction: z.ZodOptional<z.ZodString>;
|
|
1307
|
+
expected_quality_retention: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
effort_estimate: z.ZodString;
|
|
1309
|
+
risk_level: z.ZodEnum<["low", "medium", "high"]>;
|
|
1310
|
+
}, "strip", z.ZodTypeAny, {
|
|
1311
|
+
technique: string;
|
|
1312
|
+
effort_estimate: string;
|
|
1313
|
+
risk_level: "low" | "medium" | "high";
|
|
1314
|
+
expected_cost_reduction?: string | undefined;
|
|
1315
|
+
expected_latency_improvement?: string | undefined;
|
|
1316
|
+
expected_throughput_improvement?: string | undefined;
|
|
1317
|
+
expected_memory_reduction?: string | undefined;
|
|
1318
|
+
expected_quality_retention?: string | undefined;
|
|
1319
|
+
}, {
|
|
1320
|
+
technique: string;
|
|
1321
|
+
effort_estimate: string;
|
|
1322
|
+
risk_level: "low" | "medium" | "high";
|
|
1323
|
+
expected_cost_reduction?: string | undefined;
|
|
1324
|
+
expected_latency_improvement?: string | undefined;
|
|
1325
|
+
expected_throughput_improvement?: string | undefined;
|
|
1326
|
+
expected_memory_reduction?: string | undefined;
|
|
1327
|
+
expected_quality_retention?: string | undefined;
|
|
1328
|
+
}>;
|
|
1329
|
+
economics: z.ZodOptional<z.ZodObject<{
|
|
1330
|
+
baseline_calculation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
1331
|
+
projected_improvement: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
1332
|
+
projected_savings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
1333
|
+
implementation_cost: z.ZodOptional<z.ZodObject<{
|
|
1334
|
+
engineering_hours: z.ZodOptional<z.ZodNumber>;
|
|
1335
|
+
hourly_rate: z.ZodOptional<z.ZodNumber>;
|
|
1336
|
+
compute_hours: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
total_cost: z.ZodNumber;
|
|
1338
|
+
}, "strip", z.ZodTypeAny, {
|
|
1339
|
+
total_cost: number;
|
|
1340
|
+
engineering_hours?: number | undefined;
|
|
1341
|
+
hourly_rate?: number | undefined;
|
|
1342
|
+
compute_hours?: number | undefined;
|
|
1343
|
+
}, {
|
|
1344
|
+
total_cost: number;
|
|
1345
|
+
engineering_hours?: number | undefined;
|
|
1346
|
+
hourly_rate?: number | undefined;
|
|
1347
|
+
compute_hours?: number | undefined;
|
|
1348
|
+
}>>;
|
|
1349
|
+
roi_calculation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1350
|
+
}, "strip", z.ZodTypeAny, {
|
|
1351
|
+
baseline_calculation?: Record<string, string | number> | undefined;
|
|
1352
|
+
projected_improvement?: Record<string, string | number> | undefined;
|
|
1353
|
+
projected_savings?: Record<string, string | number> | undefined;
|
|
1354
|
+
implementation_cost?: {
|
|
1355
|
+
total_cost: number;
|
|
1356
|
+
engineering_hours?: number | undefined;
|
|
1357
|
+
hourly_rate?: number | undefined;
|
|
1358
|
+
compute_hours?: number | undefined;
|
|
1359
|
+
} | undefined;
|
|
1360
|
+
roi_calculation?: Record<string, string> | undefined;
|
|
1361
|
+
}, {
|
|
1362
|
+
baseline_calculation?: Record<string, string | number> | undefined;
|
|
1363
|
+
projected_improvement?: Record<string, string | number> | undefined;
|
|
1364
|
+
projected_savings?: Record<string, string | number> | undefined;
|
|
1365
|
+
implementation_cost?: {
|
|
1366
|
+
total_cost: number;
|
|
1367
|
+
engineering_hours?: number | undefined;
|
|
1368
|
+
hourly_rate?: number | undefined;
|
|
1369
|
+
compute_hours?: number | undefined;
|
|
1370
|
+
} | undefined;
|
|
1371
|
+
roi_calculation?: Record<string, string> | undefined;
|
|
1372
|
+
}>>;
|
|
1373
|
+
implementation: z.ZodOptional<z.ZodObject<{
|
|
1374
|
+
prerequisites: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1375
|
+
requirement: z.ZodString;
|
|
1376
|
+
validation_command: z.ZodOptional<z.ZodString>;
|
|
1377
|
+
}, "strip", z.ZodTypeAny, {
|
|
1378
|
+
requirement: string;
|
|
1379
|
+
validation_command?: string | undefined;
|
|
1380
|
+
}, {
|
|
1381
|
+
requirement: string;
|
|
1382
|
+
validation_command?: string | undefined;
|
|
1383
|
+
}>, "many">>;
|
|
1384
|
+
automated_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1385
|
+
step_id: z.ZodString;
|
|
1386
|
+
name: z.ZodString;
|
|
1387
|
+
executable: z.ZodOptional<z.ZodBoolean>;
|
|
1388
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1389
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1390
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
success_criteria: z.ZodOptional<z.ZodString>;
|
|
1392
|
+
rollback_command: z.ZodOptional<z.ZodString>;
|
|
1393
|
+
}, "strip", z.ZodTypeAny, {
|
|
1394
|
+
command?: string | undefined;
|
|
1395
|
+
success_criteria?: string | undefined;
|
|
1396
|
+
rollback_command?: string | undefined;
|
|
1397
|
+
}, {
|
|
1398
|
+
command?: string | undefined;
|
|
1399
|
+
success_criteria?: string | undefined;
|
|
1400
|
+
rollback_command?: string | undefined;
|
|
1401
|
+
}>>;
|
|
1402
|
+
}, "strip", z.ZodTypeAny, {
|
|
1403
|
+
name: string;
|
|
1404
|
+
step_id: string;
|
|
1405
|
+
validation?: {
|
|
1406
|
+
command?: string | undefined;
|
|
1407
|
+
success_criteria?: string | undefined;
|
|
1408
|
+
rollback_command?: string | undefined;
|
|
1409
|
+
} | undefined;
|
|
1410
|
+
executable?: boolean | undefined;
|
|
1411
|
+
commands?: string[] | undefined;
|
|
1412
|
+
}, {
|
|
1413
|
+
name: string;
|
|
1414
|
+
step_id: string;
|
|
1415
|
+
validation?: {
|
|
1416
|
+
command?: string | undefined;
|
|
1417
|
+
success_criteria?: string | undefined;
|
|
1418
|
+
rollback_command?: string | undefined;
|
|
1419
|
+
} | undefined;
|
|
1420
|
+
executable?: boolean | undefined;
|
|
1421
|
+
commands?: string[] | undefined;
|
|
1422
|
+
}>, "many">>;
|
|
1423
|
+
}, "strip", z.ZodTypeAny, {
|
|
1424
|
+
prerequisites?: {
|
|
1425
|
+
requirement: string;
|
|
1426
|
+
validation_command?: string | undefined;
|
|
1427
|
+
}[] | undefined;
|
|
1428
|
+
automated_steps?: {
|
|
1429
|
+
name: string;
|
|
1430
|
+
step_id: string;
|
|
1431
|
+
validation?: {
|
|
1432
|
+
command?: string | undefined;
|
|
1433
|
+
success_criteria?: string | undefined;
|
|
1434
|
+
rollback_command?: string | undefined;
|
|
1435
|
+
} | undefined;
|
|
1436
|
+
executable?: boolean | undefined;
|
|
1437
|
+
commands?: string[] | undefined;
|
|
1438
|
+
}[] | undefined;
|
|
1439
|
+
}, {
|
|
1440
|
+
prerequisites?: {
|
|
1441
|
+
requirement: string;
|
|
1442
|
+
validation_command?: string | undefined;
|
|
1443
|
+
}[] | undefined;
|
|
1444
|
+
automated_steps?: {
|
|
1445
|
+
name: string;
|
|
1446
|
+
step_id: string;
|
|
1447
|
+
validation?: {
|
|
1448
|
+
command?: string | undefined;
|
|
1449
|
+
success_criteria?: string | undefined;
|
|
1450
|
+
rollback_command?: string | undefined;
|
|
1451
|
+
} | undefined;
|
|
1452
|
+
executable?: boolean | undefined;
|
|
1453
|
+
commands?: string[] | undefined;
|
|
1454
|
+
}[] | undefined;
|
|
1455
|
+
}>>;
|
|
1456
|
+
monitoring: z.ZodOptional<z.ZodObject<{
|
|
1457
|
+
key_metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1458
|
+
metric: z.ZodString;
|
|
1459
|
+
target: z.ZodString;
|
|
1460
|
+
alert_threshold: z.ZodString;
|
|
1461
|
+
}, "strip", z.ZodTypeAny, {
|
|
1462
|
+
metric: string;
|
|
1463
|
+
target: string;
|
|
1464
|
+
alert_threshold: string;
|
|
1465
|
+
}, {
|
|
1466
|
+
metric: string;
|
|
1467
|
+
target: string;
|
|
1468
|
+
alert_threshold: string;
|
|
1469
|
+
}>, "many">>;
|
|
1470
|
+
rollback_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1471
|
+
condition: z.ZodString;
|
|
1472
|
+
action: z.ZodString;
|
|
1473
|
+
}, "strip", z.ZodTypeAny, {
|
|
1474
|
+
condition: string;
|
|
1475
|
+
action: string;
|
|
1476
|
+
}, {
|
|
1477
|
+
condition: string;
|
|
1478
|
+
action: string;
|
|
1479
|
+
}>, "many">>;
|
|
1480
|
+
}, "strip", z.ZodTypeAny, {
|
|
1481
|
+
key_metrics?: {
|
|
1482
|
+
metric: string;
|
|
1483
|
+
target: string;
|
|
1484
|
+
alert_threshold: string;
|
|
1485
|
+
}[] | undefined;
|
|
1486
|
+
rollback_triggers?: {
|
|
1487
|
+
condition: string;
|
|
1488
|
+
action: string;
|
|
1489
|
+
}[] | undefined;
|
|
1490
|
+
}, {
|
|
1491
|
+
key_metrics?: {
|
|
1492
|
+
metric: string;
|
|
1493
|
+
target: string;
|
|
1494
|
+
alert_threshold: string;
|
|
1495
|
+
}[] | undefined;
|
|
1496
|
+
rollback_triggers?: {
|
|
1497
|
+
condition: string;
|
|
1498
|
+
action: string;
|
|
1499
|
+
}[] | undefined;
|
|
1500
|
+
}>>;
|
|
1501
|
+
results: z.ZodOptional<z.ZodObject<{
|
|
1502
|
+
recent_implementations: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>, "many">>;
|
|
1503
|
+
}, "strip", z.ZodTypeAny, {
|
|
1504
|
+
recent_implementations?: Record<string, string | number>[] | undefined;
|
|
1505
|
+
}, {
|
|
1506
|
+
recent_implementations?: Record<string, string | number>[] | undefined;
|
|
1507
|
+
}>>;
|
|
1508
|
+
}, "strip", z.ZodTypeAny, {
|
|
1509
|
+
id: string;
|
|
1510
|
+
confidence: number;
|
|
1511
|
+
name: string;
|
|
1512
|
+
category: "runtime_optimization" | "batching_optimization" | "memory_optimization" | "application_optimization" | "cost_optimization" | "monitoring" | "scaling";
|
|
1513
|
+
description: string;
|
|
1514
|
+
optimization: {
|
|
1515
|
+
technique: string;
|
|
1516
|
+
effort_estimate: string;
|
|
1517
|
+
risk_level: "low" | "medium" | "high";
|
|
1518
|
+
expected_cost_reduction?: string | undefined;
|
|
1519
|
+
expected_latency_improvement?: string | undefined;
|
|
1520
|
+
expected_throughput_improvement?: string | undefined;
|
|
1521
|
+
expected_memory_reduction?: string | undefined;
|
|
1522
|
+
expected_quality_retention?: string | undefined;
|
|
1523
|
+
};
|
|
1524
|
+
monitoring?: {
|
|
1525
|
+
key_metrics?: {
|
|
1526
|
+
metric: string;
|
|
1527
|
+
target: string;
|
|
1528
|
+
alert_threshold: string;
|
|
1529
|
+
}[] | undefined;
|
|
1530
|
+
rollback_triggers?: {
|
|
1531
|
+
condition: string;
|
|
1532
|
+
action: string;
|
|
1533
|
+
}[] | undefined;
|
|
1534
|
+
} | undefined;
|
|
1535
|
+
success_count?: number | undefined;
|
|
1536
|
+
verified_environments?: number | undefined;
|
|
1537
|
+
contributors?: string[] | undefined;
|
|
1538
|
+
last_updated?: string | undefined;
|
|
1539
|
+
environment_match?: Record<string, string | boolean | string[]> | undefined;
|
|
1540
|
+
economics?: {
|
|
1541
|
+
baseline_calculation?: Record<string, string | number> | undefined;
|
|
1542
|
+
projected_improvement?: Record<string, string | number> | undefined;
|
|
1543
|
+
projected_savings?: Record<string, string | number> | undefined;
|
|
1544
|
+
implementation_cost?: {
|
|
1545
|
+
total_cost: number;
|
|
1546
|
+
engineering_hours?: number | undefined;
|
|
1547
|
+
hourly_rate?: number | undefined;
|
|
1548
|
+
compute_hours?: number | undefined;
|
|
1549
|
+
} | undefined;
|
|
1550
|
+
roi_calculation?: Record<string, string> | undefined;
|
|
1551
|
+
} | undefined;
|
|
1552
|
+
implementation?: {
|
|
1553
|
+
prerequisites?: {
|
|
1554
|
+
requirement: string;
|
|
1555
|
+
validation_command?: string | undefined;
|
|
1556
|
+
}[] | undefined;
|
|
1557
|
+
automated_steps?: {
|
|
1558
|
+
name: string;
|
|
1559
|
+
step_id: string;
|
|
1560
|
+
validation?: {
|
|
1561
|
+
command?: string | undefined;
|
|
1562
|
+
success_criteria?: string | undefined;
|
|
1563
|
+
rollback_command?: string | undefined;
|
|
1564
|
+
} | undefined;
|
|
1565
|
+
executable?: boolean | undefined;
|
|
1566
|
+
commands?: string[] | undefined;
|
|
1567
|
+
}[] | undefined;
|
|
1568
|
+
} | undefined;
|
|
1569
|
+
results?: {
|
|
1570
|
+
recent_implementations?: Record<string, string | number>[] | undefined;
|
|
1571
|
+
} | undefined;
|
|
1572
|
+
}, {
|
|
1573
|
+
id: string;
|
|
1574
|
+
confidence: number;
|
|
1575
|
+
name: string;
|
|
1576
|
+
category: "runtime_optimization" | "batching_optimization" | "memory_optimization" | "application_optimization" | "cost_optimization" | "monitoring" | "scaling";
|
|
1577
|
+
description: string;
|
|
1578
|
+
optimization: {
|
|
1579
|
+
technique: string;
|
|
1580
|
+
effort_estimate: string;
|
|
1581
|
+
risk_level: "low" | "medium" | "high";
|
|
1582
|
+
expected_cost_reduction?: string | undefined;
|
|
1583
|
+
expected_latency_improvement?: string | undefined;
|
|
1584
|
+
expected_throughput_improvement?: string | undefined;
|
|
1585
|
+
expected_memory_reduction?: string | undefined;
|
|
1586
|
+
expected_quality_retention?: string | undefined;
|
|
1587
|
+
};
|
|
1588
|
+
monitoring?: {
|
|
1589
|
+
key_metrics?: {
|
|
1590
|
+
metric: string;
|
|
1591
|
+
target: string;
|
|
1592
|
+
alert_threshold: string;
|
|
1593
|
+
}[] | undefined;
|
|
1594
|
+
rollback_triggers?: {
|
|
1595
|
+
condition: string;
|
|
1596
|
+
action: string;
|
|
1597
|
+
}[] | undefined;
|
|
1598
|
+
} | undefined;
|
|
1599
|
+
success_count?: number | undefined;
|
|
1600
|
+
verified_environments?: number | undefined;
|
|
1601
|
+
contributors?: string[] | undefined;
|
|
1602
|
+
last_updated?: string | undefined;
|
|
1603
|
+
environment_match?: Record<string, string | boolean | string[]> | undefined;
|
|
1604
|
+
economics?: {
|
|
1605
|
+
baseline_calculation?: Record<string, string | number> | undefined;
|
|
1606
|
+
projected_improvement?: Record<string, string | number> | undefined;
|
|
1607
|
+
projected_savings?: Record<string, string | number> | undefined;
|
|
1608
|
+
implementation_cost?: {
|
|
1609
|
+
total_cost: number;
|
|
1610
|
+
engineering_hours?: number | undefined;
|
|
1611
|
+
hourly_rate?: number | undefined;
|
|
1612
|
+
compute_hours?: number | undefined;
|
|
1613
|
+
} | undefined;
|
|
1614
|
+
roi_calculation?: Record<string, string> | undefined;
|
|
1615
|
+
} | undefined;
|
|
1616
|
+
implementation?: {
|
|
1617
|
+
prerequisites?: {
|
|
1618
|
+
requirement: string;
|
|
1619
|
+
validation_command?: string | undefined;
|
|
1620
|
+
}[] | undefined;
|
|
1621
|
+
automated_steps?: {
|
|
1622
|
+
name: string;
|
|
1623
|
+
step_id: string;
|
|
1624
|
+
validation?: {
|
|
1625
|
+
command?: string | undefined;
|
|
1626
|
+
success_criteria?: string | undefined;
|
|
1627
|
+
rollback_command?: string | undefined;
|
|
1628
|
+
} | undefined;
|
|
1629
|
+
executable?: boolean | undefined;
|
|
1630
|
+
commands?: string[] | undefined;
|
|
1631
|
+
}[] | undefined;
|
|
1632
|
+
} | undefined;
|
|
1633
|
+
results?: {
|
|
1634
|
+
recent_implementations?: Record<string, string | number>[] | undefined;
|
|
1635
|
+
} | undefined;
|
|
1636
|
+
}>;
|
|
1637
|
+
export declare const StackLayer: z.ZodEnum<["application", "api", "gateway", "runtime", "model", "hardware"]>;
|
|
1638
|
+
export declare const ImpactType: z.ZodEnum<["cost", "latency", "throughput"]>;
|
|
1639
|
+
export declare const EffortLevel: z.ZodEnum<["low", "medium", "high"]>;
|
|
1640
|
+
export declare const ImpactEstimate: z.ZodObject<{
|
|
1641
|
+
layer: z.ZodEnum<["application", "api", "gateway", "runtime", "model", "hardware"]>;
|
|
1642
|
+
impactType: z.ZodEnum<["cost", "latency", "throughput"]>;
|
|
1643
|
+
estimatedImpactPercent: z.ZodNumber;
|
|
1644
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
1645
|
+
annualSavingsUSD: z.ZodOptional<z.ZodNumber>;
|
|
1646
|
+
latencyReductionMs: z.ZodOptional<z.ZodNumber>;
|
|
1647
|
+
throughputGainPercent: z.ZodOptional<z.ZodNumber>;
|
|
1648
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1649
|
+
assumptions: z.ZodOptional<z.ZodString>;
|
|
1650
|
+
}, "strip", z.ZodTypeAny, {
|
|
1651
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1652
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1653
|
+
estimatedImpactPercent: number;
|
|
1654
|
+
effort: "low" | "medium" | "high";
|
|
1655
|
+
confidence?: number | undefined;
|
|
1656
|
+
annualSavingsUSD?: number | undefined;
|
|
1657
|
+
latencyReductionMs?: number | undefined;
|
|
1658
|
+
throughputGainPercent?: number | undefined;
|
|
1659
|
+
assumptions?: string | undefined;
|
|
1660
|
+
}, {
|
|
1661
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1662
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1663
|
+
estimatedImpactPercent: number;
|
|
1664
|
+
effort: "low" | "medium" | "high";
|
|
1665
|
+
confidence?: number | undefined;
|
|
1666
|
+
annualSavingsUSD?: number | undefined;
|
|
1667
|
+
latencyReductionMs?: number | undefined;
|
|
1668
|
+
throughputGainPercent?: number | undefined;
|
|
1669
|
+
assumptions?: string | undefined;
|
|
1670
|
+
}>;
|
|
1671
|
+
export declare const Insight: z.ZodObject<{
|
|
1672
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1673
|
+
severity: z.ZodEnum<["critical", "warning", "info"]>;
|
|
1674
|
+
category: z.ZodEnum<["cost", "latency", "drift", "reliability", "waste", "throughput", "security", "best-practice"]>;
|
|
1675
|
+
templateId: z.ZodOptional<z.ZodString>;
|
|
1676
|
+
headline: z.ZodString;
|
|
1677
|
+
evidence: z.ZodString;
|
|
1678
|
+
location: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
recommendation: z.ZodOptional<z.ZodString>;
|
|
1680
|
+
source: z.ZodOptional<z.ZodEnum<["template", "llm"]>>;
|
|
1681
|
+
impact: z.ZodOptional<z.ZodObject<{
|
|
1682
|
+
layer: z.ZodEnum<["application", "api", "gateway", "runtime", "model", "hardware"]>;
|
|
1683
|
+
impactType: z.ZodEnum<["cost", "latency", "throughput"]>;
|
|
1684
|
+
estimatedImpactPercent: z.ZodNumber;
|
|
1685
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
1686
|
+
annualSavingsUSD: z.ZodOptional<z.ZodNumber>;
|
|
1687
|
+
latencyReductionMs: z.ZodOptional<z.ZodNumber>;
|
|
1688
|
+
throughputGainPercent: z.ZodOptional<z.ZodNumber>;
|
|
1689
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1690
|
+
assumptions: z.ZodOptional<z.ZodString>;
|
|
1691
|
+
}, "strip", z.ZodTypeAny, {
|
|
1692
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1693
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1694
|
+
estimatedImpactPercent: number;
|
|
1695
|
+
effort: "low" | "medium" | "high";
|
|
1696
|
+
confidence?: number | undefined;
|
|
1697
|
+
annualSavingsUSD?: number | undefined;
|
|
1698
|
+
latencyReductionMs?: number | undefined;
|
|
1699
|
+
throughputGainPercent?: number | undefined;
|
|
1700
|
+
assumptions?: string | undefined;
|
|
1701
|
+
}, {
|
|
1702
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1703
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1704
|
+
estimatedImpactPercent: number;
|
|
1705
|
+
effort: "low" | "medium" | "high";
|
|
1706
|
+
confidence?: number | undefined;
|
|
1707
|
+
annualSavingsUSD?: number | undefined;
|
|
1708
|
+
latencyReductionMs?: number | undefined;
|
|
1709
|
+
throughputGainPercent?: number | undefined;
|
|
1710
|
+
assumptions?: string | undefined;
|
|
1711
|
+
}>>;
|
|
1712
|
+
originalCode: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
suggestedFix: z.ZodOptional<z.ZodString>;
|
|
1714
|
+
aiAgentPrompt: z.ZodOptional<z.ZodString>;
|
|
1715
|
+
fullLineFix: z.ZodOptional<z.ZodString>;
|
|
1716
|
+
}, "strip", z.ZodTypeAny, {
|
|
1717
|
+
category: "cost" | "latency" | "drift" | "reliability" | "waste" | "throughput" | "security" | "best-practice";
|
|
1718
|
+
severity: "critical" | "warning" | "info";
|
|
1719
|
+
headline: string;
|
|
1720
|
+
evidence: string;
|
|
1721
|
+
id?: string | undefined;
|
|
1722
|
+
templateId?: string | undefined;
|
|
1723
|
+
location?: string | undefined;
|
|
1724
|
+
recommendation?: string | undefined;
|
|
1725
|
+
source?: "template" | "llm" | undefined;
|
|
1726
|
+
impact?: {
|
|
1727
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1728
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1729
|
+
estimatedImpactPercent: number;
|
|
1730
|
+
effort: "low" | "medium" | "high";
|
|
1731
|
+
confidence?: number | undefined;
|
|
1732
|
+
annualSavingsUSD?: number | undefined;
|
|
1733
|
+
latencyReductionMs?: number | undefined;
|
|
1734
|
+
throughputGainPercent?: number | undefined;
|
|
1735
|
+
assumptions?: string | undefined;
|
|
1736
|
+
} | undefined;
|
|
1737
|
+
originalCode?: string | undefined;
|
|
1738
|
+
suggestedFix?: string | undefined;
|
|
1739
|
+
aiAgentPrompt?: string | undefined;
|
|
1740
|
+
fullLineFix?: string | undefined;
|
|
1741
|
+
}, {
|
|
1742
|
+
category: "cost" | "latency" | "drift" | "reliability" | "waste" | "throughput" | "security" | "best-practice";
|
|
1743
|
+
severity: "critical" | "warning" | "info";
|
|
1744
|
+
headline: string;
|
|
1745
|
+
evidence: string;
|
|
1746
|
+
id?: string | undefined;
|
|
1747
|
+
templateId?: string | undefined;
|
|
1748
|
+
location?: string | undefined;
|
|
1749
|
+
recommendation?: string | undefined;
|
|
1750
|
+
source?: "template" | "llm" | undefined;
|
|
1751
|
+
impact?: {
|
|
1752
|
+
layer: "model" | "runtime" | "application" | "api" | "gateway" | "hardware";
|
|
1753
|
+
impactType: "cost" | "latency" | "throughput";
|
|
1754
|
+
estimatedImpactPercent: number;
|
|
1755
|
+
effort: "low" | "medium" | "high";
|
|
1756
|
+
confidence?: number | undefined;
|
|
1757
|
+
annualSavingsUSD?: number | undefined;
|
|
1758
|
+
latencyReductionMs?: number | undefined;
|
|
1759
|
+
throughputGainPercent?: number | undefined;
|
|
1760
|
+
assumptions?: string | undefined;
|
|
1761
|
+
} | undefined;
|
|
1762
|
+
originalCode?: string | undefined;
|
|
1763
|
+
suggestedFix?: string | undefined;
|
|
1764
|
+
aiAgentPrompt?: string | undefined;
|
|
1765
|
+
fullLineFix?: string | undefined;
|
|
1766
|
+
}>;
|
|
1767
|
+
export declare const PerformanceEnvelope: z.ZodObject<{
|
|
1768
|
+
ttft_p50_ms: z.ZodNumber;
|
|
1769
|
+
ttft_p95_ms: z.ZodNumber;
|
|
1770
|
+
tps_median: z.ZodNumber;
|
|
1771
|
+
tps_peak: z.ZodNumber;
|
|
1772
|
+
}, "strip", z.ZodTypeAny, {
|
|
1773
|
+
ttft_p50_ms: number;
|
|
1774
|
+
ttft_p95_ms: number;
|
|
1775
|
+
tps_median: number;
|
|
1776
|
+
tps_peak: number;
|
|
1777
|
+
}, {
|
|
1778
|
+
ttft_p50_ms: number;
|
|
1779
|
+
ttft_p95_ms: number;
|
|
1780
|
+
tps_median: number;
|
|
1781
|
+
tps_peak: number;
|
|
1782
|
+
}>;
|
|
1783
|
+
export declare const TaskType: z.ZodEnum<["scan", "analyze", "parse_events", "join", "load_templates", "generate_insights", "render", "generate_html", "generate_pdf", "save_artifacts", "save_history", "compare", "predict", "counterfactuals"]>;
|
|
1784
|
+
export declare const PlannedTask: z.ZodObject<{
|
|
1785
|
+
id: z.ZodNumber;
|
|
1786
|
+
type: z.ZodEnum<["scan", "analyze", "parse_events", "join", "load_templates", "generate_insights", "render", "generate_html", "generate_pdf", "save_artifacts", "save_history", "compare", "predict", "counterfactuals"]>;
|
|
1787
|
+
description: z.ZodString;
|
|
1788
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1789
|
+
}, "strip", z.ZodTypeAny, {
|
|
1790
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1791
|
+
id: number;
|
|
1792
|
+
description: string;
|
|
1793
|
+
depends_on?: number[] | undefined;
|
|
1794
|
+
}, {
|
|
1795
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1796
|
+
id: number;
|
|
1797
|
+
description: string;
|
|
1798
|
+
depends_on?: number[] | undefined;
|
|
1799
|
+
}>;
|
|
1800
|
+
export declare const ExecutionPlan: z.ZodObject<{
|
|
1801
|
+
mode: z.ZodEnum<["static", "runtime", "combined"]>;
|
|
1802
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
1803
|
+
id: z.ZodNumber;
|
|
1804
|
+
type: z.ZodEnum<["scan", "analyze", "parse_events", "join", "load_templates", "generate_insights", "render", "generate_html", "generate_pdf", "save_artifacts", "save_history", "compare", "predict", "counterfactuals"]>;
|
|
1805
|
+
description: z.ZodString;
|
|
1806
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1807
|
+
}, "strip", z.ZodTypeAny, {
|
|
1808
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1809
|
+
id: number;
|
|
1810
|
+
description: string;
|
|
1811
|
+
depends_on?: number[] | undefined;
|
|
1812
|
+
}, {
|
|
1813
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1814
|
+
id: number;
|
|
1815
|
+
description: string;
|
|
1816
|
+
depends_on?: number[] | undefined;
|
|
1817
|
+
}>, "many">;
|
|
1818
|
+
}, "strip", z.ZodTypeAny, {
|
|
1819
|
+
mode: "runtime" | "static" | "combined";
|
|
1820
|
+
tasks: {
|
|
1821
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1822
|
+
id: number;
|
|
1823
|
+
description: string;
|
|
1824
|
+
depends_on?: number[] | undefined;
|
|
1825
|
+
}[];
|
|
1826
|
+
}, {
|
|
1827
|
+
mode: "runtime" | "static" | "combined";
|
|
1828
|
+
tasks: {
|
|
1829
|
+
type: "join" | "scan" | "analyze" | "parse_events" | "load_templates" | "generate_insights" | "render" | "generate_html" | "generate_pdf" | "save_artifacts" | "save_history" | "compare" | "predict" | "counterfactuals";
|
|
1830
|
+
id: number;
|
|
1831
|
+
description: string;
|
|
1832
|
+
depends_on?: number[] | undefined;
|
|
1833
|
+
}[];
|
|
1834
|
+
}>;
|
|
1835
|
+
export declare const TaskResult: z.ZodObject<{
|
|
1836
|
+
taskId: z.ZodNumber;
|
|
1837
|
+
status: z.ZodEnum<["success", "failed", "skipped"]>;
|
|
1838
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1839
|
+
durationMs: z.ZodNumber;
|
|
1840
|
+
}, "strip", z.ZodTypeAny, {
|
|
1841
|
+
status: "success" | "failed" | "skipped";
|
|
1842
|
+
taskId: number;
|
|
1843
|
+
durationMs: number;
|
|
1844
|
+
error?: string | undefined;
|
|
1845
|
+
}, {
|
|
1846
|
+
status: "success" | "failed" | "skipped";
|
|
1847
|
+
taskId: number;
|
|
1848
|
+
durationMs: number;
|
|
1849
|
+
error?: string | undefined;
|
|
1850
|
+
}>;
|
|
1851
|
+
export type Provider = z.infer<typeof Provider>;
|
|
1852
|
+
export type Severity = z.infer<typeof Severity>;
|
|
1853
|
+
export type Category = z.infer<typeof Category>;
|
|
1854
|
+
export type Patterns = z.infer<typeof Patterns>;
|
|
1855
|
+
export type CallsitePatterns = Patterns;
|
|
1856
|
+
export type Callsite = z.infer<typeof Callsite>;
|
|
1857
|
+
export type ScanCandidate = z.infer<typeof ScanCandidate>;
|
|
1858
|
+
export type ScannedFile = z.infer<typeof ScannedFile>;
|
|
1859
|
+
export type ScanResult = z.infer<typeof ScanResult>;
|
|
1860
|
+
export type InferenceMap = z.infer<typeof InferenceMap>;
|
|
1861
|
+
export type InferenceEvent = z.infer<typeof InferenceEvent>;
|
|
1862
|
+
export type ProviderStats = z.infer<typeof ProviderStats>;
|
|
1863
|
+
export type RuntimeSummary = z.infer<typeof RuntimeSummary>;
|
|
1864
|
+
export type UsageStats = z.infer<typeof UsageStats>;
|
|
1865
|
+
export type DriftSignal = z.infer<typeof DriftSignal>;
|
|
1866
|
+
export type EnrichedCallsite = z.infer<typeof EnrichedCallsite>;
|
|
1867
|
+
export type JoinedOutput = z.infer<typeof JoinedOutput>;
|
|
1868
|
+
export type TemplateCondition = z.infer<typeof TemplateCondition>;
|
|
1869
|
+
export type InsightTemplate = z.infer<typeof InsightTemplate>;
|
|
1870
|
+
export type OptimizationTemplate = z.infer<typeof OptimizationTemplate>;
|
|
1871
|
+
export type OptimizationCategory = z.infer<typeof OptimizationCategory>;
|
|
1872
|
+
export type OptimizationRiskLevel = z.infer<typeof OptimizationRiskLevel>;
|
|
1873
|
+
export type StackLayer = z.infer<typeof StackLayer>;
|
|
1874
|
+
export type ImpactType = z.infer<typeof ImpactType>;
|
|
1875
|
+
export type EffortLevel = z.infer<typeof EffortLevel>;
|
|
1876
|
+
export type ImpactEstimate = z.infer<typeof ImpactEstimate>;
|
|
1877
|
+
export type Insight = z.infer<typeof Insight>;
|
|
1878
|
+
export type PerformanceEnvelope = z.infer<typeof PerformanceEnvelope>;
|
|
1879
|
+
export type TaskType = z.infer<typeof TaskType>;
|
|
1880
|
+
export type PlannedTask = z.infer<typeof PlannedTask>;
|
|
1881
|
+
export type ExecutionPlan = z.infer<typeof ExecutionPlan>;
|
|
1882
|
+
export type TaskResult = z.infer<typeof TaskResult>;
|
|
1883
|
+
/**
|
|
1884
|
+
* Supported format types for runtime event files.
|
|
1885
|
+
* Direct-parse formats are handled without LLM, agent-normalized formats require semantic analysis.
|
|
1886
|
+
*/
|
|
1887
|
+
export declare const FormatType: z.ZodEnum<["jsonl", "json_array", "csv", "tsv", "otel", "jaeger", "zipkin", "langsmith", "helicone", "wandb", "litellm", "portkey", "custom_json", "custom_text", "unknown"]>;
|
|
1888
|
+
/**
|
|
1889
|
+
* Extraction strategy for a field mapping.
|
|
1890
|
+
*/
|
|
1891
|
+
export declare const ExtractionType: z.ZodEnum<["direct", "jsonpath", "column", "regex", "computed", "constant"]>;
|
|
1892
|
+
/**
|
|
1893
|
+
* Transformation to apply after extraction.
|
|
1894
|
+
*/
|
|
1895
|
+
export declare const TransformType: z.ZodEnum<["none", "unix_ms_to_iso", "unix_s_to_iso", "unix_nano_to_iso", "duration_to_ms", "parse_int", "parse_float", "lowercase", "provider_normalize"]>;
|
|
1896
|
+
/**
|
|
1897
|
+
* Field mapping from source format to InferenceEvent schema.
|
|
1898
|
+
*/
|
|
1899
|
+
export declare const FieldMapping: z.ZodObject<{
|
|
1900
|
+
target: z.ZodString;
|
|
1901
|
+
source_path: z.ZodString;
|
|
1902
|
+
extraction_type: z.ZodEnum<["direct", "jsonpath", "column", "regex", "computed", "constant"]>;
|
|
1903
|
+
transform: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "unix_ms_to_iso", "unix_s_to_iso", "unix_nano_to_iso", "duration_to_ms", "parse_int", "parse_float", "lowercase", "provider_normalize"]>>>;
|
|
1904
|
+
confidence: z.ZodNumber;
|
|
1905
|
+
evidence: z.ZodOptional<z.ZodString>;
|
|
1906
|
+
}, "strip", z.ZodTypeAny, {
|
|
1907
|
+
confidence: number;
|
|
1908
|
+
target: string;
|
|
1909
|
+
source_path: string;
|
|
1910
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
1911
|
+
transform: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize";
|
|
1912
|
+
evidence?: string | undefined;
|
|
1913
|
+
}, {
|
|
1914
|
+
confidence: number;
|
|
1915
|
+
target: string;
|
|
1916
|
+
source_path: string;
|
|
1917
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
1918
|
+
evidence?: string | undefined;
|
|
1919
|
+
transform?: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize" | undefined;
|
|
1920
|
+
}>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Result of format detection.
|
|
1923
|
+
*/
|
|
1924
|
+
export declare const FormatDetectionResult: z.ZodObject<{
|
|
1925
|
+
format_type: z.ZodEnum<["jsonl", "json_array", "csv", "tsv", "otel", "jaeger", "zipkin", "langsmith", "helicone", "wandb", "litellm", "portkey", "custom_json", "custom_text", "unknown"]>;
|
|
1926
|
+
confidence: z.ZodNumber;
|
|
1927
|
+
evidence: z.ZodString;
|
|
1928
|
+
sample_size: z.ZodNumber;
|
|
1929
|
+
requires_agent: z.ZodBoolean;
|
|
1930
|
+
}, "strip", z.ZodTypeAny, {
|
|
1931
|
+
confidence: number;
|
|
1932
|
+
evidence: string;
|
|
1933
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
1934
|
+
sample_size: number;
|
|
1935
|
+
requires_agent: boolean;
|
|
1936
|
+
}, {
|
|
1937
|
+
confidence: number;
|
|
1938
|
+
evidence: string;
|
|
1939
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
1940
|
+
sample_size: number;
|
|
1941
|
+
requires_agent: boolean;
|
|
1942
|
+
}>;
|
|
1943
|
+
/**
|
|
1944
|
+
* Complete normalization result with field mappings.
|
|
1945
|
+
*/
|
|
1946
|
+
export declare const NormalizationResult: z.ZodObject<{
|
|
1947
|
+
detection: z.ZodObject<{
|
|
1948
|
+
format_type: z.ZodEnum<["jsonl", "json_array", "csv", "tsv", "otel", "jaeger", "zipkin", "langsmith", "helicone", "wandb", "litellm", "portkey", "custom_json", "custom_text", "unknown"]>;
|
|
1949
|
+
confidence: z.ZodNumber;
|
|
1950
|
+
evidence: z.ZodString;
|
|
1951
|
+
sample_size: z.ZodNumber;
|
|
1952
|
+
requires_agent: z.ZodBoolean;
|
|
1953
|
+
}, "strip", z.ZodTypeAny, {
|
|
1954
|
+
confidence: number;
|
|
1955
|
+
evidence: string;
|
|
1956
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
1957
|
+
sample_size: number;
|
|
1958
|
+
requires_agent: boolean;
|
|
1959
|
+
}, {
|
|
1960
|
+
confidence: number;
|
|
1961
|
+
evidence: string;
|
|
1962
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
1963
|
+
sample_size: number;
|
|
1964
|
+
requires_agent: boolean;
|
|
1965
|
+
}>;
|
|
1966
|
+
mappings: z.ZodArray<z.ZodObject<{
|
|
1967
|
+
target: z.ZodString;
|
|
1968
|
+
source_path: z.ZodString;
|
|
1969
|
+
extraction_type: z.ZodEnum<["direct", "jsonpath", "column", "regex", "computed", "constant"]>;
|
|
1970
|
+
transform: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "unix_ms_to_iso", "unix_s_to_iso", "unix_nano_to_iso", "duration_to_ms", "parse_int", "parse_float", "lowercase", "provider_normalize"]>>>;
|
|
1971
|
+
confidence: z.ZodNumber;
|
|
1972
|
+
evidence: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
}, "strip", z.ZodTypeAny, {
|
|
1974
|
+
confidence: number;
|
|
1975
|
+
target: string;
|
|
1976
|
+
source_path: string;
|
|
1977
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
1978
|
+
transform: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize";
|
|
1979
|
+
evidence?: string | undefined;
|
|
1980
|
+
}, {
|
|
1981
|
+
confidence: number;
|
|
1982
|
+
target: string;
|
|
1983
|
+
source_path: string;
|
|
1984
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
1985
|
+
evidence?: string | undefined;
|
|
1986
|
+
transform?: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize" | undefined;
|
|
1987
|
+
}>, "many">;
|
|
1988
|
+
unmapped_fields: z.ZodArray<z.ZodString, "many">;
|
|
1989
|
+
warnings: z.ZodArray<z.ZodString, "many">;
|
|
1990
|
+
audit: z.ZodObject<{
|
|
1991
|
+
normalized_at: z.ZodString;
|
|
1992
|
+
agent_used: z.ZodBoolean;
|
|
1993
|
+
codebase_context_used: z.ZodBoolean;
|
|
1994
|
+
llm_model: z.ZodOptional<z.ZodString>;
|
|
1995
|
+
}, "strip", z.ZodTypeAny, {
|
|
1996
|
+
normalized_at: string;
|
|
1997
|
+
agent_used: boolean;
|
|
1998
|
+
codebase_context_used: boolean;
|
|
1999
|
+
llm_model?: string | undefined;
|
|
2000
|
+
}, {
|
|
2001
|
+
normalized_at: string;
|
|
2002
|
+
agent_used: boolean;
|
|
2003
|
+
codebase_context_used: boolean;
|
|
2004
|
+
llm_model?: string | undefined;
|
|
2005
|
+
}>;
|
|
2006
|
+
}, "strip", z.ZodTypeAny, {
|
|
2007
|
+
detection: {
|
|
2008
|
+
confidence: number;
|
|
2009
|
+
evidence: string;
|
|
2010
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
2011
|
+
sample_size: number;
|
|
2012
|
+
requires_agent: boolean;
|
|
2013
|
+
};
|
|
2014
|
+
mappings: {
|
|
2015
|
+
confidence: number;
|
|
2016
|
+
target: string;
|
|
2017
|
+
source_path: string;
|
|
2018
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
2019
|
+
transform: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize";
|
|
2020
|
+
evidence?: string | undefined;
|
|
2021
|
+
}[];
|
|
2022
|
+
unmapped_fields: string[];
|
|
2023
|
+
warnings: string[];
|
|
2024
|
+
audit: {
|
|
2025
|
+
normalized_at: string;
|
|
2026
|
+
agent_used: boolean;
|
|
2027
|
+
codebase_context_used: boolean;
|
|
2028
|
+
llm_model?: string | undefined;
|
|
2029
|
+
};
|
|
2030
|
+
}, {
|
|
2031
|
+
detection: {
|
|
2032
|
+
confidence: number;
|
|
2033
|
+
evidence: string;
|
|
2034
|
+
format_type: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text";
|
|
2035
|
+
sample_size: number;
|
|
2036
|
+
requires_agent: boolean;
|
|
2037
|
+
};
|
|
2038
|
+
mappings: {
|
|
2039
|
+
confidence: number;
|
|
2040
|
+
target: string;
|
|
2041
|
+
source_path: string;
|
|
2042
|
+
extraction_type: "direct" | "jsonpath" | "column" | "regex" | "computed" | "constant";
|
|
2043
|
+
evidence?: string | undefined;
|
|
2044
|
+
transform?: "none" | "unix_ms_to_iso" | "unix_s_to_iso" | "unix_nano_to_iso" | "duration_to_ms" | "parse_int" | "parse_float" | "lowercase" | "provider_normalize" | undefined;
|
|
2045
|
+
}[];
|
|
2046
|
+
unmapped_fields: string[];
|
|
2047
|
+
warnings: string[];
|
|
2048
|
+
audit: {
|
|
2049
|
+
normalized_at: string;
|
|
2050
|
+
agent_used: boolean;
|
|
2051
|
+
codebase_context_used: boolean;
|
|
2052
|
+
llm_model?: string | undefined;
|
|
2053
|
+
};
|
|
2054
|
+
}>;
|
|
2055
|
+
/**
|
|
2056
|
+
* Options for format normalization.
|
|
2057
|
+
*/
|
|
2058
|
+
export declare const NormalizationOptions: z.ZodObject<{
|
|
2059
|
+
format_hint: z.ZodOptional<z.ZodEnum<["jsonl", "json_array", "csv", "tsv", "otel", "jaeger", "zipkin", "langsmith", "helicone", "wandb", "litellm", "portkey", "custom_json", "custom_text", "unknown"]>>;
|
|
2060
|
+
field_hints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2061
|
+
lenient: z.ZodOptional<z.ZodBoolean>;
|
|
2062
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
2063
|
+
codebase_context: z.ZodOptional<z.ZodAny>;
|
|
2064
|
+
}, "strip", z.ZodTypeAny, {
|
|
2065
|
+
format_hint?: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text" | undefined;
|
|
2066
|
+
field_hints?: Record<string, string> | undefined;
|
|
2067
|
+
lenient?: boolean | undefined;
|
|
2068
|
+
strict?: boolean | undefined;
|
|
2069
|
+
codebase_context?: any;
|
|
2070
|
+
}, {
|
|
2071
|
+
format_hint?: "unknown" | "jsonl" | "json_array" | "csv" | "tsv" | "otel" | "jaeger" | "zipkin" | "langsmith" | "helicone" | "wandb" | "litellm" | "portkey" | "custom_json" | "custom_text" | undefined;
|
|
2072
|
+
field_hints?: Record<string, string> | undefined;
|
|
2073
|
+
lenient?: boolean | undefined;
|
|
2074
|
+
strict?: boolean | undefined;
|
|
2075
|
+
codebase_context?: any;
|
|
2076
|
+
}>;
|
|
2077
|
+
export type FormatType = z.infer<typeof FormatType>;
|
|
2078
|
+
export type ExtractionType = z.infer<typeof ExtractionType>;
|
|
2079
|
+
export type TransformType = z.infer<typeof TransformType>;
|
|
2080
|
+
export type FieldMapping = z.infer<typeof FieldMapping>;
|
|
2081
|
+
export type FormatDetectionResult = z.infer<typeof FormatDetectionResult>;
|
|
2082
|
+
export type NormalizationResult = z.infer<typeof NormalizationResult>;
|
|
2083
|
+
export type NormalizationOptions = z.infer<typeof NormalizationOptions>;
|
|
2084
|
+
/**
|
|
2085
|
+
* Analysis type for categorizing runs.
|
|
2086
|
+
*/
|
|
2087
|
+
export declare const AnalysisType: z.ZodEnum<["static", "runtime", "combined"]>;
|
|
2088
|
+
/**
|
|
2089
|
+
* History manifest for tracking analysis runs over time.
|
|
2090
|
+
* Distinct from runid.ts RunManifest which focuses on caching/resumability.
|
|
2091
|
+
* This schema enables historical comparison and deploy-time prediction features.
|
|
2092
|
+
*/
|
|
2093
|
+
export declare const HistoryManifest: z.ZodObject<{
|
|
2094
|
+
runId: z.ZodString;
|
|
2095
|
+
timestamp: z.ZodString;
|
|
2096
|
+
path: z.ZodString;
|
|
2097
|
+
pathHash: z.ZodString;
|
|
2098
|
+
analysisType: z.ZodEnum<["static", "runtime", "combined"]>;
|
|
2099
|
+
version: z.ZodString;
|
|
2100
|
+
inferencePointCount: z.ZodNumber;
|
|
2101
|
+
eventCount: z.ZodOptional<z.ZodNumber>;
|
|
2102
|
+
driftCount: z.ZodOptional<z.ZodNumber>;
|
|
2103
|
+
insightCount: z.ZodOptional<z.ZodNumber>;
|
|
2104
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2105
|
+
artifacts: z.ZodOptional<z.ZodObject<{
|
|
2106
|
+
inferenceMap: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
analysis: z.ZodOptional<z.ZodString>;
|
|
2108
|
+
html: z.ZodOptional<z.ZodString>;
|
|
2109
|
+
pdf: z.ZodOptional<z.ZodString>;
|
|
2110
|
+
}, "strip", z.ZodTypeAny, {
|
|
2111
|
+
inferenceMap?: string | undefined;
|
|
2112
|
+
analysis?: string | undefined;
|
|
2113
|
+
html?: string | undefined;
|
|
2114
|
+
pdf?: string | undefined;
|
|
2115
|
+
}, {
|
|
2116
|
+
inferenceMap?: string | undefined;
|
|
2117
|
+
analysis?: string | undefined;
|
|
2118
|
+
html?: string | undefined;
|
|
2119
|
+
pdf?: string | undefined;
|
|
2120
|
+
}>>;
|
|
2121
|
+
}, "strip", z.ZodTypeAny, {
|
|
2122
|
+
path: string;
|
|
2123
|
+
version: string;
|
|
2124
|
+
runId: string;
|
|
2125
|
+
timestamp: string;
|
|
2126
|
+
pathHash: string;
|
|
2127
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2128
|
+
inferencePointCount: number;
|
|
2129
|
+
durationMs?: number | undefined;
|
|
2130
|
+
eventCount?: number | undefined;
|
|
2131
|
+
driftCount?: number | undefined;
|
|
2132
|
+
insightCount?: number | undefined;
|
|
2133
|
+
artifacts?: {
|
|
2134
|
+
inferenceMap?: string | undefined;
|
|
2135
|
+
analysis?: string | undefined;
|
|
2136
|
+
html?: string | undefined;
|
|
2137
|
+
pdf?: string | undefined;
|
|
2138
|
+
} | undefined;
|
|
2139
|
+
}, {
|
|
2140
|
+
path: string;
|
|
2141
|
+
version: string;
|
|
2142
|
+
runId: string;
|
|
2143
|
+
timestamp: string;
|
|
2144
|
+
pathHash: string;
|
|
2145
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2146
|
+
inferencePointCount: number;
|
|
2147
|
+
durationMs?: number | undefined;
|
|
2148
|
+
eventCount?: number | undefined;
|
|
2149
|
+
driftCount?: number | undefined;
|
|
2150
|
+
insightCount?: number | undefined;
|
|
2151
|
+
artifacts?: {
|
|
2152
|
+
inferenceMap?: string | undefined;
|
|
2153
|
+
analysis?: string | undefined;
|
|
2154
|
+
html?: string | undefined;
|
|
2155
|
+
pdf?: string | undefined;
|
|
2156
|
+
} | undefined;
|
|
2157
|
+
}>;
|
|
2158
|
+
/**
|
|
2159
|
+
* Index of all historical runs for a project path.
|
|
2160
|
+
* Stored at .peakinfer/history/index.json
|
|
2161
|
+
*/
|
|
2162
|
+
export declare const HistoryIndex: z.ZodObject<{
|
|
2163
|
+
version: z.ZodString;
|
|
2164
|
+
lastUpdated: z.ZodString;
|
|
2165
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
2166
|
+
runId: z.ZodString;
|
|
2167
|
+
timestamp: z.ZodString;
|
|
2168
|
+
pathHash: z.ZodString;
|
|
2169
|
+
analysisType: z.ZodEnum<["static", "runtime", "combined"]>;
|
|
2170
|
+
inferencePointCount: z.ZodNumber;
|
|
2171
|
+
}, "strip", z.ZodTypeAny, {
|
|
2172
|
+
runId: string;
|
|
2173
|
+
timestamp: string;
|
|
2174
|
+
pathHash: string;
|
|
2175
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2176
|
+
inferencePointCount: number;
|
|
2177
|
+
}, {
|
|
2178
|
+
runId: string;
|
|
2179
|
+
timestamp: string;
|
|
2180
|
+
pathHash: string;
|
|
2181
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2182
|
+
inferencePointCount: number;
|
|
2183
|
+
}>, "many">;
|
|
2184
|
+
}, "strip", z.ZodTypeAny, {
|
|
2185
|
+
version: string;
|
|
2186
|
+
lastUpdated: string;
|
|
2187
|
+
runs: {
|
|
2188
|
+
runId: string;
|
|
2189
|
+
timestamp: string;
|
|
2190
|
+
pathHash: string;
|
|
2191
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2192
|
+
inferencePointCount: number;
|
|
2193
|
+
}[];
|
|
2194
|
+
}, {
|
|
2195
|
+
version: string;
|
|
2196
|
+
lastUpdated: string;
|
|
2197
|
+
runs: {
|
|
2198
|
+
runId: string;
|
|
2199
|
+
timestamp: string;
|
|
2200
|
+
pathHash: string;
|
|
2201
|
+
analysisType: "runtime" | "static" | "combined";
|
|
2202
|
+
inferencePointCount: number;
|
|
2203
|
+
}[];
|
|
2204
|
+
}>;
|
|
2205
|
+
export type AnalysisType = z.infer<typeof AnalysisType>;
|
|
2206
|
+
export type HistoryManifest = z.infer<typeof HistoryManifest>;
|
|
2207
|
+
export type HistoryIndex = z.infer<typeof HistoryIndex>;
|
|
2208
|
+
/**
|
|
2209
|
+
* Change type for tracking what changed between runs.
|
|
2210
|
+
*/
|
|
2211
|
+
export declare const ChangeType: z.ZodEnum<["added", "removed", "modified"]>;
|
|
2212
|
+
/**
|
|
2213
|
+
* A single field change within an inference point.
|
|
2214
|
+
*/
|
|
2215
|
+
export declare const FieldChange: z.ZodObject<{
|
|
2216
|
+
field: z.ZodString;
|
|
2217
|
+
before: z.ZodUnknown;
|
|
2218
|
+
after: z.ZodUnknown;
|
|
2219
|
+
}, "strip", z.ZodTypeAny, {
|
|
2220
|
+
field: string;
|
|
2221
|
+
before?: unknown;
|
|
2222
|
+
after?: unknown;
|
|
2223
|
+
}, {
|
|
2224
|
+
field: string;
|
|
2225
|
+
before?: unknown;
|
|
2226
|
+
after?: unknown;
|
|
2227
|
+
}>;
|
|
2228
|
+
/**
|
|
2229
|
+
* An inference point that changed between runs.
|
|
2230
|
+
*/
|
|
2231
|
+
export declare const ChangedInferencePoint: z.ZodObject<{
|
|
2232
|
+
point: z.ZodObject<{
|
|
2233
|
+
id: z.ZodString;
|
|
2234
|
+
file: z.ZodString;
|
|
2235
|
+
line: z.ZodNumber;
|
|
2236
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
2237
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2238
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
2239
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
2240
|
+
patterns: z.ZodObject<{
|
|
2241
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
2242
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
2243
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
2244
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
2245
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
2246
|
+
}, "strip", z.ZodTypeAny, {
|
|
2247
|
+
streaming?: boolean | undefined;
|
|
2248
|
+
batching?: boolean | undefined;
|
|
2249
|
+
retries?: boolean | undefined;
|
|
2250
|
+
caching?: boolean | undefined;
|
|
2251
|
+
fallback?: boolean | undefined;
|
|
2252
|
+
}, {
|
|
2253
|
+
streaming?: boolean | undefined;
|
|
2254
|
+
batching?: boolean | undefined;
|
|
2255
|
+
retries?: boolean | undefined;
|
|
2256
|
+
caching?: boolean | undefined;
|
|
2257
|
+
fallback?: boolean | undefined;
|
|
2258
|
+
}>;
|
|
2259
|
+
confidence: z.ZodNumber;
|
|
2260
|
+
}, "strip", z.ZodTypeAny, {
|
|
2261
|
+
id: string;
|
|
2262
|
+
file: string;
|
|
2263
|
+
line: number;
|
|
2264
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2265
|
+
model: string | null;
|
|
2266
|
+
framework: string | null;
|
|
2267
|
+
runtime: string | null;
|
|
2268
|
+
patterns: {
|
|
2269
|
+
streaming?: boolean | undefined;
|
|
2270
|
+
batching?: boolean | undefined;
|
|
2271
|
+
retries?: boolean | undefined;
|
|
2272
|
+
caching?: boolean | undefined;
|
|
2273
|
+
fallback?: boolean | undefined;
|
|
2274
|
+
};
|
|
2275
|
+
confidence: number;
|
|
2276
|
+
}, {
|
|
2277
|
+
id: string;
|
|
2278
|
+
file: string;
|
|
2279
|
+
line: number;
|
|
2280
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2281
|
+
model: string | null;
|
|
2282
|
+
framework: string | null;
|
|
2283
|
+
runtime: string | null;
|
|
2284
|
+
patterns: {
|
|
2285
|
+
streaming?: boolean | undefined;
|
|
2286
|
+
batching?: boolean | undefined;
|
|
2287
|
+
retries?: boolean | undefined;
|
|
2288
|
+
caching?: boolean | undefined;
|
|
2289
|
+
fallback?: boolean | undefined;
|
|
2290
|
+
};
|
|
2291
|
+
confidence: number;
|
|
2292
|
+
}>;
|
|
2293
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
2294
|
+
field: z.ZodString;
|
|
2295
|
+
before: z.ZodUnknown;
|
|
2296
|
+
after: z.ZodUnknown;
|
|
2297
|
+
}, "strip", z.ZodTypeAny, {
|
|
2298
|
+
field: string;
|
|
2299
|
+
before?: unknown;
|
|
2300
|
+
after?: unknown;
|
|
2301
|
+
}, {
|
|
2302
|
+
field: string;
|
|
2303
|
+
before?: unknown;
|
|
2304
|
+
after?: unknown;
|
|
2305
|
+
}>, "many">;
|
|
2306
|
+
}, "strip", z.ZodTypeAny, {
|
|
2307
|
+
point: {
|
|
2308
|
+
id: string;
|
|
2309
|
+
file: string;
|
|
2310
|
+
line: number;
|
|
2311
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2312
|
+
model: string | null;
|
|
2313
|
+
framework: string | null;
|
|
2314
|
+
runtime: string | null;
|
|
2315
|
+
patterns: {
|
|
2316
|
+
streaming?: boolean | undefined;
|
|
2317
|
+
batching?: boolean | undefined;
|
|
2318
|
+
retries?: boolean | undefined;
|
|
2319
|
+
caching?: boolean | undefined;
|
|
2320
|
+
fallback?: boolean | undefined;
|
|
2321
|
+
};
|
|
2322
|
+
confidence: number;
|
|
2323
|
+
};
|
|
2324
|
+
changes: {
|
|
2325
|
+
field: string;
|
|
2326
|
+
before?: unknown;
|
|
2327
|
+
after?: unknown;
|
|
2328
|
+
}[];
|
|
2329
|
+
}, {
|
|
2330
|
+
point: {
|
|
2331
|
+
id: string;
|
|
2332
|
+
file: string;
|
|
2333
|
+
line: number;
|
|
2334
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2335
|
+
model: string | null;
|
|
2336
|
+
framework: string | null;
|
|
2337
|
+
runtime: string | null;
|
|
2338
|
+
patterns: {
|
|
2339
|
+
streaming?: boolean | undefined;
|
|
2340
|
+
batching?: boolean | undefined;
|
|
2341
|
+
retries?: boolean | undefined;
|
|
2342
|
+
caching?: boolean | undefined;
|
|
2343
|
+
fallback?: boolean | undefined;
|
|
2344
|
+
};
|
|
2345
|
+
confidence: number;
|
|
2346
|
+
};
|
|
2347
|
+
changes: {
|
|
2348
|
+
field: string;
|
|
2349
|
+
before?: unknown;
|
|
2350
|
+
after?: unknown;
|
|
2351
|
+
}[];
|
|
2352
|
+
}>;
|
|
2353
|
+
/**
|
|
2354
|
+
* Result of comparing two analysis runs.
|
|
2355
|
+
* Enables "what changed" insights for pre-deploy validation.
|
|
2356
|
+
*/
|
|
2357
|
+
export declare const ComparisonResult: z.ZodObject<{
|
|
2358
|
+
baseRunId: z.ZodString;
|
|
2359
|
+
baseTimestamp: z.ZodString;
|
|
2360
|
+
currentRunId: z.ZodString;
|
|
2361
|
+
currentTimestamp: z.ZodString;
|
|
2362
|
+
added: z.ZodArray<z.ZodObject<{
|
|
2363
|
+
id: z.ZodString;
|
|
2364
|
+
file: z.ZodString;
|
|
2365
|
+
line: z.ZodNumber;
|
|
2366
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
2367
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2368
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
2369
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
2370
|
+
patterns: z.ZodObject<{
|
|
2371
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
2372
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
2373
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
2374
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
2375
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
2376
|
+
}, "strip", z.ZodTypeAny, {
|
|
2377
|
+
streaming?: boolean | undefined;
|
|
2378
|
+
batching?: boolean | undefined;
|
|
2379
|
+
retries?: boolean | undefined;
|
|
2380
|
+
caching?: boolean | undefined;
|
|
2381
|
+
fallback?: boolean | undefined;
|
|
2382
|
+
}, {
|
|
2383
|
+
streaming?: boolean | undefined;
|
|
2384
|
+
batching?: boolean | undefined;
|
|
2385
|
+
retries?: boolean | undefined;
|
|
2386
|
+
caching?: boolean | undefined;
|
|
2387
|
+
fallback?: boolean | undefined;
|
|
2388
|
+
}>;
|
|
2389
|
+
confidence: z.ZodNumber;
|
|
2390
|
+
}, "strip", z.ZodTypeAny, {
|
|
2391
|
+
id: string;
|
|
2392
|
+
file: string;
|
|
2393
|
+
line: number;
|
|
2394
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2395
|
+
model: string | null;
|
|
2396
|
+
framework: string | null;
|
|
2397
|
+
runtime: string | null;
|
|
2398
|
+
patterns: {
|
|
2399
|
+
streaming?: boolean | undefined;
|
|
2400
|
+
batching?: boolean | undefined;
|
|
2401
|
+
retries?: boolean | undefined;
|
|
2402
|
+
caching?: boolean | undefined;
|
|
2403
|
+
fallback?: boolean | undefined;
|
|
2404
|
+
};
|
|
2405
|
+
confidence: number;
|
|
2406
|
+
}, {
|
|
2407
|
+
id: string;
|
|
2408
|
+
file: string;
|
|
2409
|
+
line: number;
|
|
2410
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2411
|
+
model: string | null;
|
|
2412
|
+
framework: string | null;
|
|
2413
|
+
runtime: string | null;
|
|
2414
|
+
patterns: {
|
|
2415
|
+
streaming?: boolean | undefined;
|
|
2416
|
+
batching?: boolean | undefined;
|
|
2417
|
+
retries?: boolean | undefined;
|
|
2418
|
+
caching?: boolean | undefined;
|
|
2419
|
+
fallback?: boolean | undefined;
|
|
2420
|
+
};
|
|
2421
|
+
confidence: number;
|
|
2422
|
+
}>, "many">;
|
|
2423
|
+
removed: z.ZodArray<z.ZodObject<{
|
|
2424
|
+
id: z.ZodString;
|
|
2425
|
+
file: z.ZodString;
|
|
2426
|
+
line: z.ZodNumber;
|
|
2427
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
2428
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2429
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
2430
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
2431
|
+
patterns: z.ZodObject<{
|
|
2432
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
2433
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
2434
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
2435
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
2436
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
2437
|
+
}, "strip", z.ZodTypeAny, {
|
|
2438
|
+
streaming?: boolean | undefined;
|
|
2439
|
+
batching?: boolean | undefined;
|
|
2440
|
+
retries?: boolean | undefined;
|
|
2441
|
+
caching?: boolean | undefined;
|
|
2442
|
+
fallback?: boolean | undefined;
|
|
2443
|
+
}, {
|
|
2444
|
+
streaming?: boolean | undefined;
|
|
2445
|
+
batching?: boolean | undefined;
|
|
2446
|
+
retries?: boolean | undefined;
|
|
2447
|
+
caching?: boolean | undefined;
|
|
2448
|
+
fallback?: boolean | undefined;
|
|
2449
|
+
}>;
|
|
2450
|
+
confidence: z.ZodNumber;
|
|
2451
|
+
}, "strip", z.ZodTypeAny, {
|
|
2452
|
+
id: string;
|
|
2453
|
+
file: string;
|
|
2454
|
+
line: number;
|
|
2455
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2456
|
+
model: string | null;
|
|
2457
|
+
framework: string | null;
|
|
2458
|
+
runtime: string | null;
|
|
2459
|
+
patterns: {
|
|
2460
|
+
streaming?: boolean | undefined;
|
|
2461
|
+
batching?: boolean | undefined;
|
|
2462
|
+
retries?: boolean | undefined;
|
|
2463
|
+
caching?: boolean | undefined;
|
|
2464
|
+
fallback?: boolean | undefined;
|
|
2465
|
+
};
|
|
2466
|
+
confidence: number;
|
|
2467
|
+
}, {
|
|
2468
|
+
id: string;
|
|
2469
|
+
file: string;
|
|
2470
|
+
line: number;
|
|
2471
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2472
|
+
model: string | null;
|
|
2473
|
+
framework: string | null;
|
|
2474
|
+
runtime: string | null;
|
|
2475
|
+
patterns: {
|
|
2476
|
+
streaming?: boolean | undefined;
|
|
2477
|
+
batching?: boolean | undefined;
|
|
2478
|
+
retries?: boolean | undefined;
|
|
2479
|
+
caching?: boolean | undefined;
|
|
2480
|
+
fallback?: boolean | undefined;
|
|
2481
|
+
};
|
|
2482
|
+
confidence: number;
|
|
2483
|
+
}>, "many">;
|
|
2484
|
+
changed: z.ZodArray<z.ZodObject<{
|
|
2485
|
+
point: z.ZodObject<{
|
|
2486
|
+
id: z.ZodString;
|
|
2487
|
+
file: z.ZodString;
|
|
2488
|
+
line: z.ZodNumber;
|
|
2489
|
+
provider: z.ZodNullable<z.ZodEnum<["openai", "anthropic", "google", "cohere", "mistral", "bedrock", "azure_openai", "together", "fireworks", "groq", "replicate", "perplexity", "vllm", "sglang", "tgi", "ollama", "llamacpp", "unknown"]>>;
|
|
2490
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2491
|
+
framework: z.ZodNullable<z.ZodString>;
|
|
2492
|
+
runtime: z.ZodNullable<z.ZodString>;
|
|
2493
|
+
patterns: z.ZodObject<{
|
|
2494
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
2495
|
+
batching: z.ZodOptional<z.ZodBoolean>;
|
|
2496
|
+
retries: z.ZodOptional<z.ZodBoolean>;
|
|
2497
|
+
caching: z.ZodOptional<z.ZodBoolean>;
|
|
2498
|
+
fallback: z.ZodOptional<z.ZodBoolean>;
|
|
2499
|
+
}, "strip", z.ZodTypeAny, {
|
|
2500
|
+
streaming?: boolean | undefined;
|
|
2501
|
+
batching?: boolean | undefined;
|
|
2502
|
+
retries?: boolean | undefined;
|
|
2503
|
+
caching?: boolean | undefined;
|
|
2504
|
+
fallback?: boolean | undefined;
|
|
2505
|
+
}, {
|
|
2506
|
+
streaming?: boolean | undefined;
|
|
2507
|
+
batching?: boolean | undefined;
|
|
2508
|
+
retries?: boolean | undefined;
|
|
2509
|
+
caching?: boolean | undefined;
|
|
2510
|
+
fallback?: boolean | undefined;
|
|
2511
|
+
}>;
|
|
2512
|
+
confidence: z.ZodNumber;
|
|
2513
|
+
}, "strip", z.ZodTypeAny, {
|
|
2514
|
+
id: string;
|
|
2515
|
+
file: string;
|
|
2516
|
+
line: number;
|
|
2517
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2518
|
+
model: string | null;
|
|
2519
|
+
framework: string | null;
|
|
2520
|
+
runtime: string | null;
|
|
2521
|
+
patterns: {
|
|
2522
|
+
streaming?: boolean | undefined;
|
|
2523
|
+
batching?: boolean | undefined;
|
|
2524
|
+
retries?: boolean | undefined;
|
|
2525
|
+
caching?: boolean | undefined;
|
|
2526
|
+
fallback?: boolean | undefined;
|
|
2527
|
+
};
|
|
2528
|
+
confidence: number;
|
|
2529
|
+
}, {
|
|
2530
|
+
id: string;
|
|
2531
|
+
file: string;
|
|
2532
|
+
line: number;
|
|
2533
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2534
|
+
model: string | null;
|
|
2535
|
+
framework: string | null;
|
|
2536
|
+
runtime: string | null;
|
|
2537
|
+
patterns: {
|
|
2538
|
+
streaming?: boolean | undefined;
|
|
2539
|
+
batching?: boolean | undefined;
|
|
2540
|
+
retries?: boolean | undefined;
|
|
2541
|
+
caching?: boolean | undefined;
|
|
2542
|
+
fallback?: boolean | undefined;
|
|
2543
|
+
};
|
|
2544
|
+
confidence: number;
|
|
2545
|
+
}>;
|
|
2546
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
2547
|
+
field: z.ZodString;
|
|
2548
|
+
before: z.ZodUnknown;
|
|
2549
|
+
after: z.ZodUnknown;
|
|
2550
|
+
}, "strip", z.ZodTypeAny, {
|
|
2551
|
+
field: string;
|
|
2552
|
+
before?: unknown;
|
|
2553
|
+
after?: unknown;
|
|
2554
|
+
}, {
|
|
2555
|
+
field: string;
|
|
2556
|
+
before?: unknown;
|
|
2557
|
+
after?: unknown;
|
|
2558
|
+
}>, "many">;
|
|
2559
|
+
}, "strip", z.ZodTypeAny, {
|
|
2560
|
+
point: {
|
|
2561
|
+
id: string;
|
|
2562
|
+
file: string;
|
|
2563
|
+
line: number;
|
|
2564
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2565
|
+
model: string | null;
|
|
2566
|
+
framework: string | null;
|
|
2567
|
+
runtime: string | null;
|
|
2568
|
+
patterns: {
|
|
2569
|
+
streaming?: boolean | undefined;
|
|
2570
|
+
batching?: boolean | undefined;
|
|
2571
|
+
retries?: boolean | undefined;
|
|
2572
|
+
caching?: boolean | undefined;
|
|
2573
|
+
fallback?: boolean | undefined;
|
|
2574
|
+
};
|
|
2575
|
+
confidence: number;
|
|
2576
|
+
};
|
|
2577
|
+
changes: {
|
|
2578
|
+
field: string;
|
|
2579
|
+
before?: unknown;
|
|
2580
|
+
after?: unknown;
|
|
2581
|
+
}[];
|
|
2582
|
+
}, {
|
|
2583
|
+
point: {
|
|
2584
|
+
id: string;
|
|
2585
|
+
file: string;
|
|
2586
|
+
line: number;
|
|
2587
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2588
|
+
model: string | null;
|
|
2589
|
+
framework: string | null;
|
|
2590
|
+
runtime: string | null;
|
|
2591
|
+
patterns: {
|
|
2592
|
+
streaming?: boolean | undefined;
|
|
2593
|
+
batching?: boolean | undefined;
|
|
2594
|
+
retries?: boolean | undefined;
|
|
2595
|
+
caching?: boolean | undefined;
|
|
2596
|
+
fallback?: boolean | undefined;
|
|
2597
|
+
};
|
|
2598
|
+
confidence: number;
|
|
2599
|
+
};
|
|
2600
|
+
changes: {
|
|
2601
|
+
field: string;
|
|
2602
|
+
before?: unknown;
|
|
2603
|
+
after?: unknown;
|
|
2604
|
+
}[];
|
|
2605
|
+
}>, "many">;
|
|
2606
|
+
metrics: z.ZodObject<{
|
|
2607
|
+
totalBefore: z.ZodNumber;
|
|
2608
|
+
totalAfter: z.ZodNumber;
|
|
2609
|
+
addedCount: z.ZodNumber;
|
|
2610
|
+
removedCount: z.ZodNumber;
|
|
2611
|
+
changedCount: z.ZodNumber;
|
|
2612
|
+
netChange: z.ZodNumber;
|
|
2613
|
+
}, "strip", z.ZodTypeAny, {
|
|
2614
|
+
totalBefore: number;
|
|
2615
|
+
totalAfter: number;
|
|
2616
|
+
addedCount: number;
|
|
2617
|
+
removedCount: number;
|
|
2618
|
+
changedCount: number;
|
|
2619
|
+
netChange: number;
|
|
2620
|
+
}, {
|
|
2621
|
+
totalBefore: number;
|
|
2622
|
+
totalAfter: number;
|
|
2623
|
+
addedCount: number;
|
|
2624
|
+
removedCount: number;
|
|
2625
|
+
changedCount: number;
|
|
2626
|
+
netChange: number;
|
|
2627
|
+
}>;
|
|
2628
|
+
insightDeltas: z.ZodOptional<z.ZodObject<{
|
|
2629
|
+
newCritical: z.ZodNumber;
|
|
2630
|
+
resolvedCritical: z.ZodNumber;
|
|
2631
|
+
newWarnings: z.ZodNumber;
|
|
2632
|
+
resolvedWarnings: z.ZodNumber;
|
|
2633
|
+
}, "strip", z.ZodTypeAny, {
|
|
2634
|
+
newCritical: number;
|
|
2635
|
+
resolvedCritical: number;
|
|
2636
|
+
newWarnings: number;
|
|
2637
|
+
resolvedWarnings: number;
|
|
2638
|
+
}, {
|
|
2639
|
+
newCritical: number;
|
|
2640
|
+
resolvedCritical: number;
|
|
2641
|
+
newWarnings: number;
|
|
2642
|
+
resolvedWarnings: number;
|
|
2643
|
+
}>>;
|
|
2644
|
+
}, "strip", z.ZodTypeAny, {
|
|
2645
|
+
added: {
|
|
2646
|
+
id: string;
|
|
2647
|
+
file: string;
|
|
2648
|
+
line: number;
|
|
2649
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2650
|
+
model: string | null;
|
|
2651
|
+
framework: string | null;
|
|
2652
|
+
runtime: string | null;
|
|
2653
|
+
patterns: {
|
|
2654
|
+
streaming?: boolean | undefined;
|
|
2655
|
+
batching?: boolean | undefined;
|
|
2656
|
+
retries?: boolean | undefined;
|
|
2657
|
+
caching?: boolean | undefined;
|
|
2658
|
+
fallback?: boolean | undefined;
|
|
2659
|
+
};
|
|
2660
|
+
confidence: number;
|
|
2661
|
+
}[];
|
|
2662
|
+
removed: {
|
|
2663
|
+
id: string;
|
|
2664
|
+
file: string;
|
|
2665
|
+
line: number;
|
|
2666
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2667
|
+
model: string | null;
|
|
2668
|
+
framework: string | null;
|
|
2669
|
+
runtime: string | null;
|
|
2670
|
+
patterns: {
|
|
2671
|
+
streaming?: boolean | undefined;
|
|
2672
|
+
batching?: boolean | undefined;
|
|
2673
|
+
retries?: boolean | undefined;
|
|
2674
|
+
caching?: boolean | undefined;
|
|
2675
|
+
fallback?: boolean | undefined;
|
|
2676
|
+
};
|
|
2677
|
+
confidence: number;
|
|
2678
|
+
}[];
|
|
2679
|
+
baseRunId: string;
|
|
2680
|
+
baseTimestamp: string;
|
|
2681
|
+
currentRunId: string;
|
|
2682
|
+
currentTimestamp: string;
|
|
2683
|
+
changed: {
|
|
2684
|
+
point: {
|
|
2685
|
+
id: string;
|
|
2686
|
+
file: string;
|
|
2687
|
+
line: number;
|
|
2688
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2689
|
+
model: string | null;
|
|
2690
|
+
framework: string | null;
|
|
2691
|
+
runtime: string | null;
|
|
2692
|
+
patterns: {
|
|
2693
|
+
streaming?: boolean | undefined;
|
|
2694
|
+
batching?: boolean | undefined;
|
|
2695
|
+
retries?: boolean | undefined;
|
|
2696
|
+
caching?: boolean | undefined;
|
|
2697
|
+
fallback?: boolean | undefined;
|
|
2698
|
+
};
|
|
2699
|
+
confidence: number;
|
|
2700
|
+
};
|
|
2701
|
+
changes: {
|
|
2702
|
+
field: string;
|
|
2703
|
+
before?: unknown;
|
|
2704
|
+
after?: unknown;
|
|
2705
|
+
}[];
|
|
2706
|
+
}[];
|
|
2707
|
+
metrics: {
|
|
2708
|
+
totalBefore: number;
|
|
2709
|
+
totalAfter: number;
|
|
2710
|
+
addedCount: number;
|
|
2711
|
+
removedCount: number;
|
|
2712
|
+
changedCount: number;
|
|
2713
|
+
netChange: number;
|
|
2714
|
+
};
|
|
2715
|
+
insightDeltas?: {
|
|
2716
|
+
newCritical: number;
|
|
2717
|
+
resolvedCritical: number;
|
|
2718
|
+
newWarnings: number;
|
|
2719
|
+
resolvedWarnings: number;
|
|
2720
|
+
} | undefined;
|
|
2721
|
+
}, {
|
|
2722
|
+
added: {
|
|
2723
|
+
id: string;
|
|
2724
|
+
file: string;
|
|
2725
|
+
line: number;
|
|
2726
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2727
|
+
model: string | null;
|
|
2728
|
+
framework: string | null;
|
|
2729
|
+
runtime: string | null;
|
|
2730
|
+
patterns: {
|
|
2731
|
+
streaming?: boolean | undefined;
|
|
2732
|
+
batching?: boolean | undefined;
|
|
2733
|
+
retries?: boolean | undefined;
|
|
2734
|
+
caching?: boolean | undefined;
|
|
2735
|
+
fallback?: boolean | undefined;
|
|
2736
|
+
};
|
|
2737
|
+
confidence: number;
|
|
2738
|
+
}[];
|
|
2739
|
+
removed: {
|
|
2740
|
+
id: string;
|
|
2741
|
+
file: string;
|
|
2742
|
+
line: number;
|
|
2743
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2744
|
+
model: string | null;
|
|
2745
|
+
framework: string | null;
|
|
2746
|
+
runtime: string | null;
|
|
2747
|
+
patterns: {
|
|
2748
|
+
streaming?: boolean | undefined;
|
|
2749
|
+
batching?: boolean | undefined;
|
|
2750
|
+
retries?: boolean | undefined;
|
|
2751
|
+
caching?: boolean | undefined;
|
|
2752
|
+
fallback?: boolean | undefined;
|
|
2753
|
+
};
|
|
2754
|
+
confidence: number;
|
|
2755
|
+
}[];
|
|
2756
|
+
baseRunId: string;
|
|
2757
|
+
baseTimestamp: string;
|
|
2758
|
+
currentRunId: string;
|
|
2759
|
+
currentTimestamp: string;
|
|
2760
|
+
changed: {
|
|
2761
|
+
point: {
|
|
2762
|
+
id: string;
|
|
2763
|
+
file: string;
|
|
2764
|
+
line: number;
|
|
2765
|
+
provider: "openai" | "anthropic" | "google" | "cohere" | "mistral" | "bedrock" | "azure_openai" | "together" | "fireworks" | "groq" | "replicate" | "perplexity" | "vllm" | "sglang" | "tgi" | "ollama" | "llamacpp" | "unknown" | null;
|
|
2766
|
+
model: string | null;
|
|
2767
|
+
framework: string | null;
|
|
2768
|
+
runtime: string | null;
|
|
2769
|
+
patterns: {
|
|
2770
|
+
streaming?: boolean | undefined;
|
|
2771
|
+
batching?: boolean | undefined;
|
|
2772
|
+
retries?: boolean | undefined;
|
|
2773
|
+
caching?: boolean | undefined;
|
|
2774
|
+
fallback?: boolean | undefined;
|
|
2775
|
+
};
|
|
2776
|
+
confidence: number;
|
|
2777
|
+
};
|
|
2778
|
+
changes: {
|
|
2779
|
+
field: string;
|
|
2780
|
+
before?: unknown;
|
|
2781
|
+
after?: unknown;
|
|
2782
|
+
}[];
|
|
2783
|
+
}[];
|
|
2784
|
+
metrics: {
|
|
2785
|
+
totalBefore: number;
|
|
2786
|
+
totalAfter: number;
|
|
2787
|
+
addedCount: number;
|
|
2788
|
+
removedCount: number;
|
|
2789
|
+
changedCount: number;
|
|
2790
|
+
netChange: number;
|
|
2791
|
+
};
|
|
2792
|
+
insightDeltas?: {
|
|
2793
|
+
newCritical: number;
|
|
2794
|
+
resolvedCritical: number;
|
|
2795
|
+
newWarnings: number;
|
|
2796
|
+
resolvedWarnings: number;
|
|
2797
|
+
} | undefined;
|
|
2798
|
+
}>;
|
|
2799
|
+
export type ChangeType = z.infer<typeof ChangeType>;
|
|
2800
|
+
export type FieldChange = z.infer<typeof FieldChange>;
|
|
2801
|
+
export type ChangedInferencePoint = z.infer<typeof ChangedInferencePoint>;
|
|
2802
|
+
export type ComparisonResult = z.infer<typeof ComparisonResult>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Risk level for predictions.
|
|
2805
|
+
*/
|
|
2806
|
+
export declare const RiskLevel: z.ZodEnum<["high", "medium", "low", "neutral"]>;
|
|
2807
|
+
/**
|
|
2808
|
+
* Impact direction for a prediction factor.
|
|
2809
|
+
*/
|
|
2810
|
+
export declare const ImpactDirection: z.ZodEnum<["positive", "negative", "neutral"]>;
|
|
2811
|
+
/**
|
|
2812
|
+
* A factor contributing to a latency prediction.
|
|
2813
|
+
*/
|
|
2814
|
+
export declare const PredictionFactor: z.ZodObject<{
|
|
2815
|
+
name: z.ZodString;
|
|
2816
|
+
impact: z.ZodEnum<["positive", "negative", "neutral"]>;
|
|
2817
|
+
description: z.ZodString;
|
|
2818
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2819
|
+
}, "strip", z.ZodTypeAny, {
|
|
2820
|
+
name: string;
|
|
2821
|
+
description: string;
|
|
2822
|
+
impact: "neutral" | "positive" | "negative";
|
|
2823
|
+
weight?: number | undefined;
|
|
2824
|
+
}, {
|
|
2825
|
+
name: string;
|
|
2826
|
+
description: string;
|
|
2827
|
+
impact: "neutral" | "positive" | "negative";
|
|
2828
|
+
weight?: number | undefined;
|
|
2829
|
+
}>;
|
|
2830
|
+
/**
|
|
2831
|
+
* Latency percentile values.
|
|
2832
|
+
*/
|
|
2833
|
+
export declare const LatencyPercentiles: z.ZodObject<{
|
|
2834
|
+
p50: z.ZodNumber;
|
|
2835
|
+
p95: z.ZodNumber;
|
|
2836
|
+
p99: z.ZodNumber;
|
|
2837
|
+
}, "strip", z.ZodTypeAny, {
|
|
2838
|
+
p50: number;
|
|
2839
|
+
p95: number;
|
|
2840
|
+
p99: number;
|
|
2841
|
+
}, {
|
|
2842
|
+
p50: number;
|
|
2843
|
+
p95: number;
|
|
2844
|
+
p99: number;
|
|
2845
|
+
}>;
|
|
2846
|
+
/**
|
|
2847
|
+
* Prediction for a single inference point.
|
|
2848
|
+
* Surfaces potential performance risks before deployment.
|
|
2849
|
+
*/
|
|
2850
|
+
export declare const InferencePointPrediction: z.ZodObject<{
|
|
2851
|
+
inferencePointId: z.ZodString;
|
|
2852
|
+
location: z.ZodString;
|
|
2853
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2854
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2855
|
+
currentLatency: z.ZodOptional<z.ZodObject<{
|
|
2856
|
+
p50: z.ZodNumber;
|
|
2857
|
+
p95: z.ZodNumber;
|
|
2858
|
+
p99: z.ZodNumber;
|
|
2859
|
+
}, "strip", z.ZodTypeAny, {
|
|
2860
|
+
p50: number;
|
|
2861
|
+
p95: number;
|
|
2862
|
+
p99: number;
|
|
2863
|
+
}, {
|
|
2864
|
+
p50: number;
|
|
2865
|
+
p95: number;
|
|
2866
|
+
p99: number;
|
|
2867
|
+
}>>;
|
|
2868
|
+
predictedLatency: z.ZodObject<{
|
|
2869
|
+
p50: z.ZodNumber;
|
|
2870
|
+
p95: z.ZodNumber;
|
|
2871
|
+
p99: z.ZodNumber;
|
|
2872
|
+
}, "strip", z.ZodTypeAny, {
|
|
2873
|
+
p50: number;
|
|
2874
|
+
p95: number;
|
|
2875
|
+
p99: number;
|
|
2876
|
+
}, {
|
|
2877
|
+
p50: number;
|
|
2878
|
+
p95: number;
|
|
2879
|
+
p99: number;
|
|
2880
|
+
}>;
|
|
2881
|
+
risk: z.ZodEnum<["high", "medium", "low", "neutral"]>;
|
|
2882
|
+
riskScore: z.ZodNumber;
|
|
2883
|
+
factors: z.ZodArray<z.ZodObject<{
|
|
2884
|
+
name: z.ZodString;
|
|
2885
|
+
impact: z.ZodEnum<["positive", "negative", "neutral"]>;
|
|
2886
|
+
description: z.ZodString;
|
|
2887
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2888
|
+
}, "strip", z.ZodTypeAny, {
|
|
2889
|
+
name: string;
|
|
2890
|
+
description: string;
|
|
2891
|
+
impact: "neutral" | "positive" | "negative";
|
|
2892
|
+
weight?: number | undefined;
|
|
2893
|
+
}, {
|
|
2894
|
+
name: string;
|
|
2895
|
+
description: string;
|
|
2896
|
+
impact: "neutral" | "positive" | "negative";
|
|
2897
|
+
weight?: number | undefined;
|
|
2898
|
+
}>, "many">;
|
|
2899
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
2900
|
+
confidenceReason: z.ZodOptional<z.ZodString>;
|
|
2901
|
+
}, "strip", z.ZodTypeAny, {
|
|
2902
|
+
confidence: "low" | "medium" | "high";
|
|
2903
|
+
location: string;
|
|
2904
|
+
inferencePointId: string;
|
|
2905
|
+
predictedLatency: {
|
|
2906
|
+
p50: number;
|
|
2907
|
+
p95: number;
|
|
2908
|
+
p99: number;
|
|
2909
|
+
};
|
|
2910
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
2911
|
+
riskScore: number;
|
|
2912
|
+
factors: {
|
|
2913
|
+
name: string;
|
|
2914
|
+
description: string;
|
|
2915
|
+
impact: "neutral" | "positive" | "negative";
|
|
2916
|
+
weight?: number | undefined;
|
|
2917
|
+
}[];
|
|
2918
|
+
provider?: string | undefined;
|
|
2919
|
+
model?: string | undefined;
|
|
2920
|
+
currentLatency?: {
|
|
2921
|
+
p50: number;
|
|
2922
|
+
p95: number;
|
|
2923
|
+
p99: number;
|
|
2924
|
+
} | undefined;
|
|
2925
|
+
confidenceReason?: string | undefined;
|
|
2926
|
+
}, {
|
|
2927
|
+
confidence: "low" | "medium" | "high";
|
|
2928
|
+
location: string;
|
|
2929
|
+
inferencePointId: string;
|
|
2930
|
+
predictedLatency: {
|
|
2931
|
+
p50: number;
|
|
2932
|
+
p95: number;
|
|
2933
|
+
p99: number;
|
|
2934
|
+
};
|
|
2935
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
2936
|
+
riskScore: number;
|
|
2937
|
+
factors: {
|
|
2938
|
+
name: string;
|
|
2939
|
+
description: string;
|
|
2940
|
+
impact: "neutral" | "positive" | "negative";
|
|
2941
|
+
weight?: number | undefined;
|
|
2942
|
+
}[];
|
|
2943
|
+
provider?: string | undefined;
|
|
2944
|
+
model?: string | undefined;
|
|
2945
|
+
currentLatency?: {
|
|
2946
|
+
p50: number;
|
|
2947
|
+
p95: number;
|
|
2948
|
+
p99: number;
|
|
2949
|
+
} | undefined;
|
|
2950
|
+
confidenceReason?: string | undefined;
|
|
2951
|
+
}>;
|
|
2952
|
+
/**
|
|
2953
|
+
* Summary of all predictions.
|
|
2954
|
+
*/
|
|
2955
|
+
export declare const PredictionSummary: z.ZodObject<{
|
|
2956
|
+
totalPoints: z.ZodNumber;
|
|
2957
|
+
highRiskCount: z.ZodNumber;
|
|
2958
|
+
mediumRiskCount: z.ZodNumber;
|
|
2959
|
+
lowRiskCount: z.ZodNumber;
|
|
2960
|
+
averageP95: z.ZodNumber;
|
|
2961
|
+
worstP95: z.ZodNumber;
|
|
2962
|
+
budgetExceeded: z.ZodOptional<z.ZodBoolean>;
|
|
2963
|
+
}, "strip", z.ZodTypeAny, {
|
|
2964
|
+
totalPoints: number;
|
|
2965
|
+
highRiskCount: number;
|
|
2966
|
+
mediumRiskCount: number;
|
|
2967
|
+
lowRiskCount: number;
|
|
2968
|
+
averageP95: number;
|
|
2969
|
+
worstP95: number;
|
|
2970
|
+
budgetExceeded?: boolean | undefined;
|
|
2971
|
+
}, {
|
|
2972
|
+
totalPoints: number;
|
|
2973
|
+
highRiskCount: number;
|
|
2974
|
+
mediumRiskCount: number;
|
|
2975
|
+
lowRiskCount: number;
|
|
2976
|
+
averageP95: number;
|
|
2977
|
+
worstP95: number;
|
|
2978
|
+
budgetExceeded?: boolean | undefined;
|
|
2979
|
+
}>;
|
|
2980
|
+
/**
|
|
2981
|
+
* Full prediction result for deploy-time analysis.
|
|
2982
|
+
*/
|
|
2983
|
+
export declare const PredictionResult: z.ZodObject<{
|
|
2984
|
+
predictions: z.ZodArray<z.ZodObject<{
|
|
2985
|
+
inferencePointId: z.ZodString;
|
|
2986
|
+
location: z.ZodString;
|
|
2987
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2988
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2989
|
+
currentLatency: z.ZodOptional<z.ZodObject<{
|
|
2990
|
+
p50: z.ZodNumber;
|
|
2991
|
+
p95: z.ZodNumber;
|
|
2992
|
+
p99: z.ZodNumber;
|
|
2993
|
+
}, "strip", z.ZodTypeAny, {
|
|
2994
|
+
p50: number;
|
|
2995
|
+
p95: number;
|
|
2996
|
+
p99: number;
|
|
2997
|
+
}, {
|
|
2998
|
+
p50: number;
|
|
2999
|
+
p95: number;
|
|
3000
|
+
p99: number;
|
|
3001
|
+
}>>;
|
|
3002
|
+
predictedLatency: z.ZodObject<{
|
|
3003
|
+
p50: z.ZodNumber;
|
|
3004
|
+
p95: z.ZodNumber;
|
|
3005
|
+
p99: z.ZodNumber;
|
|
3006
|
+
}, "strip", z.ZodTypeAny, {
|
|
3007
|
+
p50: number;
|
|
3008
|
+
p95: number;
|
|
3009
|
+
p99: number;
|
|
3010
|
+
}, {
|
|
3011
|
+
p50: number;
|
|
3012
|
+
p95: number;
|
|
3013
|
+
p99: number;
|
|
3014
|
+
}>;
|
|
3015
|
+
risk: z.ZodEnum<["high", "medium", "low", "neutral"]>;
|
|
3016
|
+
riskScore: z.ZodNumber;
|
|
3017
|
+
factors: z.ZodArray<z.ZodObject<{
|
|
3018
|
+
name: z.ZodString;
|
|
3019
|
+
impact: z.ZodEnum<["positive", "negative", "neutral"]>;
|
|
3020
|
+
description: z.ZodString;
|
|
3021
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
3022
|
+
}, "strip", z.ZodTypeAny, {
|
|
3023
|
+
name: string;
|
|
3024
|
+
description: string;
|
|
3025
|
+
impact: "neutral" | "positive" | "negative";
|
|
3026
|
+
weight?: number | undefined;
|
|
3027
|
+
}, {
|
|
3028
|
+
name: string;
|
|
3029
|
+
description: string;
|
|
3030
|
+
impact: "neutral" | "positive" | "negative";
|
|
3031
|
+
weight?: number | undefined;
|
|
3032
|
+
}>, "many">;
|
|
3033
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
3034
|
+
confidenceReason: z.ZodOptional<z.ZodString>;
|
|
3035
|
+
}, "strip", z.ZodTypeAny, {
|
|
3036
|
+
confidence: "low" | "medium" | "high";
|
|
3037
|
+
location: string;
|
|
3038
|
+
inferencePointId: string;
|
|
3039
|
+
predictedLatency: {
|
|
3040
|
+
p50: number;
|
|
3041
|
+
p95: number;
|
|
3042
|
+
p99: number;
|
|
3043
|
+
};
|
|
3044
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
3045
|
+
riskScore: number;
|
|
3046
|
+
factors: {
|
|
3047
|
+
name: string;
|
|
3048
|
+
description: string;
|
|
3049
|
+
impact: "neutral" | "positive" | "negative";
|
|
3050
|
+
weight?: number | undefined;
|
|
3051
|
+
}[];
|
|
3052
|
+
provider?: string | undefined;
|
|
3053
|
+
model?: string | undefined;
|
|
3054
|
+
currentLatency?: {
|
|
3055
|
+
p50: number;
|
|
3056
|
+
p95: number;
|
|
3057
|
+
p99: number;
|
|
3058
|
+
} | undefined;
|
|
3059
|
+
confidenceReason?: string | undefined;
|
|
3060
|
+
}, {
|
|
3061
|
+
confidence: "low" | "medium" | "high";
|
|
3062
|
+
location: string;
|
|
3063
|
+
inferencePointId: string;
|
|
3064
|
+
predictedLatency: {
|
|
3065
|
+
p50: number;
|
|
3066
|
+
p95: number;
|
|
3067
|
+
p99: number;
|
|
3068
|
+
};
|
|
3069
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
3070
|
+
riskScore: number;
|
|
3071
|
+
factors: {
|
|
3072
|
+
name: string;
|
|
3073
|
+
description: string;
|
|
3074
|
+
impact: "neutral" | "positive" | "negative";
|
|
3075
|
+
weight?: number | undefined;
|
|
3076
|
+
}[];
|
|
3077
|
+
provider?: string | undefined;
|
|
3078
|
+
model?: string | undefined;
|
|
3079
|
+
currentLatency?: {
|
|
3080
|
+
p50: number;
|
|
3081
|
+
p95: number;
|
|
3082
|
+
p99: number;
|
|
3083
|
+
} | undefined;
|
|
3084
|
+
confidenceReason?: string | undefined;
|
|
3085
|
+
}>, "many">;
|
|
3086
|
+
summary: z.ZodObject<{
|
|
3087
|
+
totalPoints: z.ZodNumber;
|
|
3088
|
+
highRiskCount: z.ZodNumber;
|
|
3089
|
+
mediumRiskCount: z.ZodNumber;
|
|
3090
|
+
lowRiskCount: z.ZodNumber;
|
|
3091
|
+
averageP95: z.ZodNumber;
|
|
3092
|
+
worstP95: z.ZodNumber;
|
|
3093
|
+
budgetExceeded: z.ZodOptional<z.ZodBoolean>;
|
|
3094
|
+
}, "strip", z.ZodTypeAny, {
|
|
3095
|
+
totalPoints: number;
|
|
3096
|
+
highRiskCount: number;
|
|
3097
|
+
mediumRiskCount: number;
|
|
3098
|
+
lowRiskCount: number;
|
|
3099
|
+
averageP95: number;
|
|
3100
|
+
worstP95: number;
|
|
3101
|
+
budgetExceeded?: boolean | undefined;
|
|
3102
|
+
}, {
|
|
3103
|
+
totalPoints: number;
|
|
3104
|
+
highRiskCount: number;
|
|
3105
|
+
mediumRiskCount: number;
|
|
3106
|
+
lowRiskCount: number;
|
|
3107
|
+
averageP95: number;
|
|
3108
|
+
worstP95: number;
|
|
3109
|
+
budgetExceeded?: boolean | undefined;
|
|
3110
|
+
}>;
|
|
3111
|
+
targetP95: z.ZodOptional<z.ZodNumber>;
|
|
3112
|
+
generatedAt: z.ZodString;
|
|
3113
|
+
basedOnRuns: z.ZodNumber;
|
|
3114
|
+
}, "strip", z.ZodTypeAny, {
|
|
3115
|
+
summary: {
|
|
3116
|
+
totalPoints: number;
|
|
3117
|
+
highRiskCount: number;
|
|
3118
|
+
mediumRiskCount: number;
|
|
3119
|
+
lowRiskCount: number;
|
|
3120
|
+
averageP95: number;
|
|
3121
|
+
worstP95: number;
|
|
3122
|
+
budgetExceeded?: boolean | undefined;
|
|
3123
|
+
};
|
|
3124
|
+
generatedAt: string;
|
|
3125
|
+
predictions: {
|
|
3126
|
+
confidence: "low" | "medium" | "high";
|
|
3127
|
+
location: string;
|
|
3128
|
+
inferencePointId: string;
|
|
3129
|
+
predictedLatency: {
|
|
3130
|
+
p50: number;
|
|
3131
|
+
p95: number;
|
|
3132
|
+
p99: number;
|
|
3133
|
+
};
|
|
3134
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
3135
|
+
riskScore: number;
|
|
3136
|
+
factors: {
|
|
3137
|
+
name: string;
|
|
3138
|
+
description: string;
|
|
3139
|
+
impact: "neutral" | "positive" | "negative";
|
|
3140
|
+
weight?: number | undefined;
|
|
3141
|
+
}[];
|
|
3142
|
+
provider?: string | undefined;
|
|
3143
|
+
model?: string | undefined;
|
|
3144
|
+
currentLatency?: {
|
|
3145
|
+
p50: number;
|
|
3146
|
+
p95: number;
|
|
3147
|
+
p99: number;
|
|
3148
|
+
} | undefined;
|
|
3149
|
+
confidenceReason?: string | undefined;
|
|
3150
|
+
}[];
|
|
3151
|
+
basedOnRuns: number;
|
|
3152
|
+
targetP95?: number | undefined;
|
|
3153
|
+
}, {
|
|
3154
|
+
summary: {
|
|
3155
|
+
totalPoints: number;
|
|
3156
|
+
highRiskCount: number;
|
|
3157
|
+
mediumRiskCount: number;
|
|
3158
|
+
lowRiskCount: number;
|
|
3159
|
+
averageP95: number;
|
|
3160
|
+
worstP95: number;
|
|
3161
|
+
budgetExceeded?: boolean | undefined;
|
|
3162
|
+
};
|
|
3163
|
+
generatedAt: string;
|
|
3164
|
+
predictions: {
|
|
3165
|
+
confidence: "low" | "medium" | "high";
|
|
3166
|
+
location: string;
|
|
3167
|
+
inferencePointId: string;
|
|
3168
|
+
predictedLatency: {
|
|
3169
|
+
p50: number;
|
|
3170
|
+
p95: number;
|
|
3171
|
+
p99: number;
|
|
3172
|
+
};
|
|
3173
|
+
risk: "low" | "medium" | "high" | "neutral";
|
|
3174
|
+
riskScore: number;
|
|
3175
|
+
factors: {
|
|
3176
|
+
name: string;
|
|
3177
|
+
description: string;
|
|
3178
|
+
impact: "neutral" | "positive" | "negative";
|
|
3179
|
+
weight?: number | undefined;
|
|
3180
|
+
}[];
|
|
3181
|
+
provider?: string | undefined;
|
|
3182
|
+
model?: string | undefined;
|
|
3183
|
+
currentLatency?: {
|
|
3184
|
+
p50: number;
|
|
3185
|
+
p95: number;
|
|
3186
|
+
p99: number;
|
|
3187
|
+
} | undefined;
|
|
3188
|
+
confidenceReason?: string | undefined;
|
|
3189
|
+
}[];
|
|
3190
|
+
basedOnRuns: number;
|
|
3191
|
+
targetP95?: number | undefined;
|
|
3192
|
+
}>;
|
|
3193
|
+
export type RiskLevel = z.infer<typeof RiskLevel>;
|
|
3194
|
+
export type ImpactDirection = z.infer<typeof ImpactDirection>;
|
|
3195
|
+
export type PredictionFactor = z.infer<typeof PredictionFactor>;
|
|
3196
|
+
export type LatencyPercentiles = z.infer<typeof LatencyPercentiles>;
|
|
3197
|
+
export type InferencePointPrediction = z.infer<typeof InferencePointPrediction>;
|
|
3198
|
+
export type PredictionSummary = z.infer<typeof PredictionSummary>;
|
|
3199
|
+
export type PredictionResult = z.infer<typeof PredictionResult>;
|
|
3200
|
+
/**
|
|
3201
|
+
* Type of counterfactual optimization scenario.
|
|
3202
|
+
*/
|
|
3203
|
+
export declare const CounterfactualType: z.ZodEnum<["model_swap", "batch_optimization", "cache_addition", "provider_change", "streaming_enable"]>;
|
|
3204
|
+
/**
|
|
3205
|
+
* Current and proposed state for a counterfactual.
|
|
3206
|
+
*/
|
|
3207
|
+
export declare const CounterfactualState: z.ZodObject<{
|
|
3208
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3209
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3210
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3211
|
+
estimatedLatency: z.ZodNumber;
|
|
3212
|
+
estimatedCost: z.ZodNumber;
|
|
3213
|
+
}, "strip", z.ZodTypeAny, {
|
|
3214
|
+
estimatedLatency: number;
|
|
3215
|
+
estimatedCost: number;
|
|
3216
|
+
provider?: string | undefined;
|
|
3217
|
+
model?: string | undefined;
|
|
3218
|
+
pattern?: string | undefined;
|
|
3219
|
+
}, {
|
|
3220
|
+
estimatedLatency: number;
|
|
3221
|
+
estimatedCost: number;
|
|
3222
|
+
provider?: string | undefined;
|
|
3223
|
+
model?: string | undefined;
|
|
3224
|
+
pattern?: string | undefined;
|
|
3225
|
+
}>;
|
|
3226
|
+
/**
|
|
3227
|
+
* Impact assessment for a counterfactual.
|
|
3228
|
+
*/
|
|
3229
|
+
export declare const CounterfactualImpact: z.ZodObject<{
|
|
3230
|
+
latencyDelta: z.ZodNumber;
|
|
3231
|
+
latencyDeltaPercent: z.ZodNumber;
|
|
3232
|
+
costDelta: z.ZodNumber;
|
|
3233
|
+
costDeltaPercent: z.ZodNumber;
|
|
3234
|
+
tradeoffs: z.ZodArray<z.ZodString, "many">;
|
|
3235
|
+
}, "strip", z.ZodTypeAny, {
|
|
3236
|
+
latencyDelta: number;
|
|
3237
|
+
latencyDeltaPercent: number;
|
|
3238
|
+
costDelta: number;
|
|
3239
|
+
costDeltaPercent: number;
|
|
3240
|
+
tradeoffs: string[];
|
|
3241
|
+
}, {
|
|
3242
|
+
latencyDelta: number;
|
|
3243
|
+
latencyDeltaPercent: number;
|
|
3244
|
+
costDelta: number;
|
|
3245
|
+
costDeltaPercent: number;
|
|
3246
|
+
tradeoffs: string[];
|
|
3247
|
+
}>;
|
|
3248
|
+
/**
|
|
3249
|
+
* A single counterfactual "what if" scenario.
|
|
3250
|
+
* Shows the road not taken and its potential impact.
|
|
3251
|
+
*/
|
|
3252
|
+
export declare const Counterfactual: z.ZodObject<{
|
|
3253
|
+
id: z.ZodString;
|
|
3254
|
+
type: z.ZodEnum<["model_swap", "batch_optimization", "cache_addition", "provider_change", "streaming_enable"]>;
|
|
3255
|
+
headline: z.ZodString;
|
|
3256
|
+
description: z.ZodString;
|
|
3257
|
+
currentState: z.ZodObject<{
|
|
3258
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3259
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3260
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3261
|
+
estimatedLatency: z.ZodNumber;
|
|
3262
|
+
estimatedCost: z.ZodNumber;
|
|
3263
|
+
}, "strip", z.ZodTypeAny, {
|
|
3264
|
+
estimatedLatency: number;
|
|
3265
|
+
estimatedCost: number;
|
|
3266
|
+
provider?: string | undefined;
|
|
3267
|
+
model?: string | undefined;
|
|
3268
|
+
pattern?: string | undefined;
|
|
3269
|
+
}, {
|
|
3270
|
+
estimatedLatency: number;
|
|
3271
|
+
estimatedCost: number;
|
|
3272
|
+
provider?: string | undefined;
|
|
3273
|
+
model?: string | undefined;
|
|
3274
|
+
pattern?: string | undefined;
|
|
3275
|
+
}>;
|
|
3276
|
+
proposedState: z.ZodObject<{
|
|
3277
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3278
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3279
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3280
|
+
estimatedLatency: z.ZodNumber;
|
|
3281
|
+
estimatedCost: z.ZodNumber;
|
|
3282
|
+
}, "strip", z.ZodTypeAny, {
|
|
3283
|
+
estimatedLatency: number;
|
|
3284
|
+
estimatedCost: number;
|
|
3285
|
+
provider?: string | undefined;
|
|
3286
|
+
model?: string | undefined;
|
|
3287
|
+
pattern?: string | undefined;
|
|
3288
|
+
}, {
|
|
3289
|
+
estimatedLatency: number;
|
|
3290
|
+
estimatedCost: number;
|
|
3291
|
+
provider?: string | undefined;
|
|
3292
|
+
model?: string | undefined;
|
|
3293
|
+
pattern?: string | undefined;
|
|
3294
|
+
}>;
|
|
3295
|
+
impact: z.ZodObject<{
|
|
3296
|
+
latencyDelta: z.ZodNumber;
|
|
3297
|
+
latencyDeltaPercent: z.ZodNumber;
|
|
3298
|
+
costDelta: z.ZodNumber;
|
|
3299
|
+
costDeltaPercent: z.ZodNumber;
|
|
3300
|
+
tradeoffs: z.ZodArray<z.ZodString, "many">;
|
|
3301
|
+
}, "strip", z.ZodTypeAny, {
|
|
3302
|
+
latencyDelta: number;
|
|
3303
|
+
latencyDeltaPercent: number;
|
|
3304
|
+
costDelta: number;
|
|
3305
|
+
costDeltaPercent: number;
|
|
3306
|
+
tradeoffs: string[];
|
|
3307
|
+
}, {
|
|
3308
|
+
latencyDelta: number;
|
|
3309
|
+
latencyDeltaPercent: number;
|
|
3310
|
+
costDelta: number;
|
|
3311
|
+
costDeltaPercent: number;
|
|
3312
|
+
tradeoffs: string[];
|
|
3313
|
+
}>;
|
|
3314
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
3315
|
+
confidenceReason: z.ZodOptional<z.ZodString>;
|
|
3316
|
+
affectedPoints: z.ZodArray<z.ZodString, "many">;
|
|
3317
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
3318
|
+
}, "strip", z.ZodTypeAny, {
|
|
3319
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3320
|
+
id: string;
|
|
3321
|
+
confidence: "low" | "medium" | "high";
|
|
3322
|
+
headline: string;
|
|
3323
|
+
description: string;
|
|
3324
|
+
effort: "low" | "medium" | "high";
|
|
3325
|
+
impact: {
|
|
3326
|
+
latencyDelta: number;
|
|
3327
|
+
latencyDeltaPercent: number;
|
|
3328
|
+
costDelta: number;
|
|
3329
|
+
costDeltaPercent: number;
|
|
3330
|
+
tradeoffs: string[];
|
|
3331
|
+
};
|
|
3332
|
+
currentState: {
|
|
3333
|
+
estimatedLatency: number;
|
|
3334
|
+
estimatedCost: number;
|
|
3335
|
+
provider?: string | undefined;
|
|
3336
|
+
model?: string | undefined;
|
|
3337
|
+
pattern?: string | undefined;
|
|
3338
|
+
};
|
|
3339
|
+
proposedState: {
|
|
3340
|
+
estimatedLatency: number;
|
|
3341
|
+
estimatedCost: number;
|
|
3342
|
+
provider?: string | undefined;
|
|
3343
|
+
model?: string | undefined;
|
|
3344
|
+
pattern?: string | undefined;
|
|
3345
|
+
};
|
|
3346
|
+
affectedPoints: string[];
|
|
3347
|
+
confidenceReason?: string | undefined;
|
|
3348
|
+
}, {
|
|
3349
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3350
|
+
id: string;
|
|
3351
|
+
confidence: "low" | "medium" | "high";
|
|
3352
|
+
headline: string;
|
|
3353
|
+
description: string;
|
|
3354
|
+
effort: "low" | "medium" | "high";
|
|
3355
|
+
impact: {
|
|
3356
|
+
latencyDelta: number;
|
|
3357
|
+
latencyDeltaPercent: number;
|
|
3358
|
+
costDelta: number;
|
|
3359
|
+
costDeltaPercent: number;
|
|
3360
|
+
tradeoffs: string[];
|
|
3361
|
+
};
|
|
3362
|
+
currentState: {
|
|
3363
|
+
estimatedLatency: number;
|
|
3364
|
+
estimatedCost: number;
|
|
3365
|
+
provider?: string | undefined;
|
|
3366
|
+
model?: string | undefined;
|
|
3367
|
+
pattern?: string | undefined;
|
|
3368
|
+
};
|
|
3369
|
+
proposedState: {
|
|
3370
|
+
estimatedLatency: number;
|
|
3371
|
+
estimatedCost: number;
|
|
3372
|
+
provider?: string | undefined;
|
|
3373
|
+
model?: string | undefined;
|
|
3374
|
+
pattern?: string | undefined;
|
|
3375
|
+
};
|
|
3376
|
+
affectedPoints: string[];
|
|
3377
|
+
confidenceReason?: string | undefined;
|
|
3378
|
+
}>;
|
|
3379
|
+
/**
|
|
3380
|
+
* Summary of counterfactual opportunities.
|
|
3381
|
+
*/
|
|
3382
|
+
export declare const CounterfactualSummary: z.ZodObject<{
|
|
3383
|
+
totalOpportunities: z.ZodNumber;
|
|
3384
|
+
maxLatencySavingsMs: z.ZodNumber;
|
|
3385
|
+
maxLatencySavingsPercent: z.ZodNumber;
|
|
3386
|
+
maxCostSavings: z.ZodNumber;
|
|
3387
|
+
maxCostSavingsPercent: z.ZodNumber;
|
|
3388
|
+
byType: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3389
|
+
}, "strip", z.ZodTypeAny, {
|
|
3390
|
+
totalOpportunities: number;
|
|
3391
|
+
maxLatencySavingsMs: number;
|
|
3392
|
+
maxLatencySavingsPercent: number;
|
|
3393
|
+
maxCostSavings: number;
|
|
3394
|
+
maxCostSavingsPercent: number;
|
|
3395
|
+
byType: Record<string, number>;
|
|
3396
|
+
}, {
|
|
3397
|
+
totalOpportunities: number;
|
|
3398
|
+
maxLatencySavingsMs: number;
|
|
3399
|
+
maxLatencySavingsPercent: number;
|
|
3400
|
+
maxCostSavings: number;
|
|
3401
|
+
maxCostSavingsPercent: number;
|
|
3402
|
+
byType: Record<string, number>;
|
|
3403
|
+
}>;
|
|
3404
|
+
/**
|
|
3405
|
+
* Full counterfactual analysis result.
|
|
3406
|
+
*/
|
|
3407
|
+
export declare const CounterfactualResult: z.ZodObject<{
|
|
3408
|
+
counterfactuals: z.ZodArray<z.ZodObject<{
|
|
3409
|
+
id: z.ZodString;
|
|
3410
|
+
type: z.ZodEnum<["model_swap", "batch_optimization", "cache_addition", "provider_change", "streaming_enable"]>;
|
|
3411
|
+
headline: z.ZodString;
|
|
3412
|
+
description: z.ZodString;
|
|
3413
|
+
currentState: z.ZodObject<{
|
|
3414
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3415
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3416
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3417
|
+
estimatedLatency: z.ZodNumber;
|
|
3418
|
+
estimatedCost: z.ZodNumber;
|
|
3419
|
+
}, "strip", z.ZodTypeAny, {
|
|
3420
|
+
estimatedLatency: number;
|
|
3421
|
+
estimatedCost: number;
|
|
3422
|
+
provider?: string | undefined;
|
|
3423
|
+
model?: string | undefined;
|
|
3424
|
+
pattern?: string | undefined;
|
|
3425
|
+
}, {
|
|
3426
|
+
estimatedLatency: number;
|
|
3427
|
+
estimatedCost: number;
|
|
3428
|
+
provider?: string | undefined;
|
|
3429
|
+
model?: string | undefined;
|
|
3430
|
+
pattern?: string | undefined;
|
|
3431
|
+
}>;
|
|
3432
|
+
proposedState: z.ZodObject<{
|
|
3433
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3434
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3435
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3436
|
+
estimatedLatency: z.ZodNumber;
|
|
3437
|
+
estimatedCost: z.ZodNumber;
|
|
3438
|
+
}, "strip", z.ZodTypeAny, {
|
|
3439
|
+
estimatedLatency: number;
|
|
3440
|
+
estimatedCost: number;
|
|
3441
|
+
provider?: string | undefined;
|
|
3442
|
+
model?: string | undefined;
|
|
3443
|
+
pattern?: string | undefined;
|
|
3444
|
+
}, {
|
|
3445
|
+
estimatedLatency: number;
|
|
3446
|
+
estimatedCost: number;
|
|
3447
|
+
provider?: string | undefined;
|
|
3448
|
+
model?: string | undefined;
|
|
3449
|
+
pattern?: string | undefined;
|
|
3450
|
+
}>;
|
|
3451
|
+
impact: z.ZodObject<{
|
|
3452
|
+
latencyDelta: z.ZodNumber;
|
|
3453
|
+
latencyDeltaPercent: z.ZodNumber;
|
|
3454
|
+
costDelta: z.ZodNumber;
|
|
3455
|
+
costDeltaPercent: z.ZodNumber;
|
|
3456
|
+
tradeoffs: z.ZodArray<z.ZodString, "many">;
|
|
3457
|
+
}, "strip", z.ZodTypeAny, {
|
|
3458
|
+
latencyDelta: number;
|
|
3459
|
+
latencyDeltaPercent: number;
|
|
3460
|
+
costDelta: number;
|
|
3461
|
+
costDeltaPercent: number;
|
|
3462
|
+
tradeoffs: string[];
|
|
3463
|
+
}, {
|
|
3464
|
+
latencyDelta: number;
|
|
3465
|
+
latencyDeltaPercent: number;
|
|
3466
|
+
costDelta: number;
|
|
3467
|
+
costDeltaPercent: number;
|
|
3468
|
+
tradeoffs: string[];
|
|
3469
|
+
}>;
|
|
3470
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
3471
|
+
confidenceReason: z.ZodOptional<z.ZodString>;
|
|
3472
|
+
affectedPoints: z.ZodArray<z.ZodString, "many">;
|
|
3473
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
3474
|
+
}, "strip", z.ZodTypeAny, {
|
|
3475
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3476
|
+
id: string;
|
|
3477
|
+
confidence: "low" | "medium" | "high";
|
|
3478
|
+
headline: string;
|
|
3479
|
+
description: string;
|
|
3480
|
+
effort: "low" | "medium" | "high";
|
|
3481
|
+
impact: {
|
|
3482
|
+
latencyDelta: number;
|
|
3483
|
+
latencyDeltaPercent: number;
|
|
3484
|
+
costDelta: number;
|
|
3485
|
+
costDeltaPercent: number;
|
|
3486
|
+
tradeoffs: string[];
|
|
3487
|
+
};
|
|
3488
|
+
currentState: {
|
|
3489
|
+
estimatedLatency: number;
|
|
3490
|
+
estimatedCost: number;
|
|
3491
|
+
provider?: string | undefined;
|
|
3492
|
+
model?: string | undefined;
|
|
3493
|
+
pattern?: string | undefined;
|
|
3494
|
+
};
|
|
3495
|
+
proposedState: {
|
|
3496
|
+
estimatedLatency: number;
|
|
3497
|
+
estimatedCost: number;
|
|
3498
|
+
provider?: string | undefined;
|
|
3499
|
+
model?: string | undefined;
|
|
3500
|
+
pattern?: string | undefined;
|
|
3501
|
+
};
|
|
3502
|
+
affectedPoints: string[];
|
|
3503
|
+
confidenceReason?: string | undefined;
|
|
3504
|
+
}, {
|
|
3505
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3506
|
+
id: string;
|
|
3507
|
+
confidence: "low" | "medium" | "high";
|
|
3508
|
+
headline: string;
|
|
3509
|
+
description: string;
|
|
3510
|
+
effort: "low" | "medium" | "high";
|
|
3511
|
+
impact: {
|
|
3512
|
+
latencyDelta: number;
|
|
3513
|
+
latencyDeltaPercent: number;
|
|
3514
|
+
costDelta: number;
|
|
3515
|
+
costDeltaPercent: number;
|
|
3516
|
+
tradeoffs: string[];
|
|
3517
|
+
};
|
|
3518
|
+
currentState: {
|
|
3519
|
+
estimatedLatency: number;
|
|
3520
|
+
estimatedCost: number;
|
|
3521
|
+
provider?: string | undefined;
|
|
3522
|
+
model?: string | undefined;
|
|
3523
|
+
pattern?: string | undefined;
|
|
3524
|
+
};
|
|
3525
|
+
proposedState: {
|
|
3526
|
+
estimatedLatency: number;
|
|
3527
|
+
estimatedCost: number;
|
|
3528
|
+
provider?: string | undefined;
|
|
3529
|
+
model?: string | undefined;
|
|
3530
|
+
pattern?: string | undefined;
|
|
3531
|
+
};
|
|
3532
|
+
affectedPoints: string[];
|
|
3533
|
+
confidenceReason?: string | undefined;
|
|
3534
|
+
}>, "many">;
|
|
3535
|
+
summary: z.ZodObject<{
|
|
3536
|
+
totalOpportunities: z.ZodNumber;
|
|
3537
|
+
maxLatencySavingsMs: z.ZodNumber;
|
|
3538
|
+
maxLatencySavingsPercent: z.ZodNumber;
|
|
3539
|
+
maxCostSavings: z.ZodNumber;
|
|
3540
|
+
maxCostSavingsPercent: z.ZodNumber;
|
|
3541
|
+
byType: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3542
|
+
}, "strip", z.ZodTypeAny, {
|
|
3543
|
+
totalOpportunities: number;
|
|
3544
|
+
maxLatencySavingsMs: number;
|
|
3545
|
+
maxLatencySavingsPercent: number;
|
|
3546
|
+
maxCostSavings: number;
|
|
3547
|
+
maxCostSavingsPercent: number;
|
|
3548
|
+
byType: Record<string, number>;
|
|
3549
|
+
}, {
|
|
3550
|
+
totalOpportunities: number;
|
|
3551
|
+
maxLatencySavingsMs: number;
|
|
3552
|
+
maxLatencySavingsPercent: number;
|
|
3553
|
+
maxCostSavings: number;
|
|
3554
|
+
maxCostSavingsPercent: number;
|
|
3555
|
+
byType: Record<string, number>;
|
|
3556
|
+
}>;
|
|
3557
|
+
generatedAt: z.ZodString;
|
|
3558
|
+
}, "strip", z.ZodTypeAny, {
|
|
3559
|
+
summary: {
|
|
3560
|
+
totalOpportunities: number;
|
|
3561
|
+
maxLatencySavingsMs: number;
|
|
3562
|
+
maxLatencySavingsPercent: number;
|
|
3563
|
+
maxCostSavings: number;
|
|
3564
|
+
maxCostSavingsPercent: number;
|
|
3565
|
+
byType: Record<string, number>;
|
|
3566
|
+
};
|
|
3567
|
+
generatedAt: string;
|
|
3568
|
+
counterfactuals: {
|
|
3569
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3570
|
+
id: string;
|
|
3571
|
+
confidence: "low" | "medium" | "high";
|
|
3572
|
+
headline: string;
|
|
3573
|
+
description: string;
|
|
3574
|
+
effort: "low" | "medium" | "high";
|
|
3575
|
+
impact: {
|
|
3576
|
+
latencyDelta: number;
|
|
3577
|
+
latencyDeltaPercent: number;
|
|
3578
|
+
costDelta: number;
|
|
3579
|
+
costDeltaPercent: number;
|
|
3580
|
+
tradeoffs: string[];
|
|
3581
|
+
};
|
|
3582
|
+
currentState: {
|
|
3583
|
+
estimatedLatency: number;
|
|
3584
|
+
estimatedCost: number;
|
|
3585
|
+
provider?: string | undefined;
|
|
3586
|
+
model?: string | undefined;
|
|
3587
|
+
pattern?: string | undefined;
|
|
3588
|
+
};
|
|
3589
|
+
proposedState: {
|
|
3590
|
+
estimatedLatency: number;
|
|
3591
|
+
estimatedCost: number;
|
|
3592
|
+
provider?: string | undefined;
|
|
3593
|
+
model?: string | undefined;
|
|
3594
|
+
pattern?: string | undefined;
|
|
3595
|
+
};
|
|
3596
|
+
affectedPoints: string[];
|
|
3597
|
+
confidenceReason?: string | undefined;
|
|
3598
|
+
}[];
|
|
3599
|
+
}, {
|
|
3600
|
+
summary: {
|
|
3601
|
+
totalOpportunities: number;
|
|
3602
|
+
maxLatencySavingsMs: number;
|
|
3603
|
+
maxLatencySavingsPercent: number;
|
|
3604
|
+
maxCostSavings: number;
|
|
3605
|
+
maxCostSavingsPercent: number;
|
|
3606
|
+
byType: Record<string, number>;
|
|
3607
|
+
};
|
|
3608
|
+
generatedAt: string;
|
|
3609
|
+
counterfactuals: {
|
|
3610
|
+
type: "model_swap" | "batch_optimization" | "cache_addition" | "provider_change" | "streaming_enable";
|
|
3611
|
+
id: string;
|
|
3612
|
+
confidence: "low" | "medium" | "high";
|
|
3613
|
+
headline: string;
|
|
3614
|
+
description: string;
|
|
3615
|
+
effort: "low" | "medium" | "high";
|
|
3616
|
+
impact: {
|
|
3617
|
+
latencyDelta: number;
|
|
3618
|
+
latencyDeltaPercent: number;
|
|
3619
|
+
costDelta: number;
|
|
3620
|
+
costDeltaPercent: number;
|
|
3621
|
+
tradeoffs: string[];
|
|
3622
|
+
};
|
|
3623
|
+
currentState: {
|
|
3624
|
+
estimatedLatency: number;
|
|
3625
|
+
estimatedCost: number;
|
|
3626
|
+
provider?: string | undefined;
|
|
3627
|
+
model?: string | undefined;
|
|
3628
|
+
pattern?: string | undefined;
|
|
3629
|
+
};
|
|
3630
|
+
proposedState: {
|
|
3631
|
+
estimatedLatency: number;
|
|
3632
|
+
estimatedCost: number;
|
|
3633
|
+
provider?: string | undefined;
|
|
3634
|
+
model?: string | undefined;
|
|
3635
|
+
pattern?: string | undefined;
|
|
3636
|
+
};
|
|
3637
|
+
affectedPoints: string[];
|
|
3638
|
+
confidenceReason?: string | undefined;
|
|
3639
|
+
}[];
|
|
3640
|
+
}>;
|
|
3641
|
+
export type CounterfactualType = z.infer<typeof CounterfactualType>;
|
|
3642
|
+
export type CounterfactualState = z.infer<typeof CounterfactualState>;
|
|
3643
|
+
export type CounterfactualImpact = z.infer<typeof CounterfactualImpact>;
|
|
3644
|
+
export type Counterfactual = z.infer<typeof Counterfactual>;
|
|
3645
|
+
export type CounterfactualSummary = z.infer<typeof CounterfactualSummary>;
|
|
3646
|
+
export type CounterfactualResult = z.infer<typeof CounterfactualResult>;
|
|
3647
|
+
//# sourceMappingURL=types.d.ts.map
|