doppler-gpu 0.4.14 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +83 -52
- package/package.json +25 -2
- package/src/cli/doppler-cli.js +253 -94
- package/src/cli/runtime-profiles.js +3 -7
- package/src/client/doppler-api.d.ts +28 -0
- package/src/client/doppler-api.js +2 -0
- package/src/client/inspection.d.ts +122 -0
- package/src/client/inspection.js +343 -0
- package/src/client/runtime/index.d.ts +54 -0
- package/src/client/runtime/index.js +190 -18
- package/src/client/runtime/model-manager.d.ts +0 -4
- package/src/client/runtime/model-manager.js +0 -28
- package/src/client/runtime/model-session.d.ts +116 -1
- package/src/client/runtime/model-session.js +351 -1
- package/src/client/runtime/model-source.d.ts +10 -1
- package/src/client/runtime/scoped-session.d.ts +117 -0
- package/src/client/runtime/scoped-session.js +257 -0
- package/src/client/runtime/types.d.ts +0 -1
- package/src/client/runtime/types.js +0 -1
- package/src/config/evidence/boundary-evidence-policy.json +54 -0
- package/src/config/evidence/source-intake-policy.json +122 -0
- package/src/config/inspection/observation-policies.json +80 -0
- package/src/config/param-validator.js +21 -36
- package/src/config/runtime/compute/f16-activations.json +1 -0
- package/src/config/runtime/compute/f16-batched.json +1 -0
- package/src/config/runtime/default.json +1 -0
- package/src/config/runtime/diagnostics/debug-logits.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-alt.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k-batched.json +1 -0
- package/src/config/runtime/experiments/bench/gemma3-bench-q4k.json +1 -0
- package/src/config/runtime/experiments/bench/gemma4-bench-q4k.json +1 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-alt.json +1 -0
- package/src/config/runtime/experiments/bench/qwen3-bench-q4k-batched.json +1 -0
- package/src/config/runtime/experiments/debug/gemma3-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/debug/gemma3-debug-q4k.json +1 -3
- package/src/config/runtime/experiments/debug/gemma4-e2b-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/debug/qwen35-browser-diagnose-q4k.json +1 -1
- package/src/config/runtime/experiments/verify/gemma3-verify.json +1 -3
- package/src/config/runtime/experiments/verify/gemma4-e2b-verify.json +1 -3
- package/src/config/runtime/experiments/verify/lfm2-verify.json +1 -3
- package/src/config/runtime/experiments/verify/translategemma-verify.json +1 -3
- package/src/config/runtime/model/gemma2-debug.json +1 -0
- package/src/config/runtime/model/gemma2-pipeline-debug.json +1 -0
- package/src/config/runtime/model/gemma2-pipeline.json +1 -0
- package/src/config/runtime/model/gemma3-layer-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-layer-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-layer3-boundary-probe.json +1 -0
- package/src/config/runtime/model/qwen3-5-linear-attn-debug.json +1 -0
- package/src/config/runtime/optimization-candidates/registry.json +5 -0
- package/src/config/runtime/platform/metal-apple-q4k.json +1 -0
- package/src/config/runtime/profiles/default.json +1 -0
- package/src/config/runtime/profiles/diffusiongemma-26b-a4b-throughput.json +1 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-overlapped-probe.json +1 -0
- package/src/config/runtime/profiles/gemma3-270m-q4k-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-b4.json +1 -3
- package/src/config/runtime/profiles/gemma4-12b-rdrr-safe-single.json +1 -3
- package/src/config/runtime/profiles/gemma4-31b-f16-activations-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-baseline-probe.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-probe.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-fused-rmsnorm-test.json +1 -0
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-baseline-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-f16a-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-reference-export.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-int4ple-retain-q4k-probe.json +1 -5
- package/src/config/runtime/profiles/gemma4-e2b-low-memory.json +1 -0
- package/src/config/runtime/profiles/gemma4-e2b-prefill-profile.json +1 -3
- package/src/config/runtime/profiles/gemma4-e2b-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/low-memory.json +1 -0
- package/src/config/runtime/profiles/production.json +1 -3
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-attn128-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-maxbatch64-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-normed-ffn-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-overlap-ringtokens1-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-parity.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-sequential-candidate.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-0-8b-prefill-profile.json +1 -3
- package/src/config/runtime/profiles/qwen-3-5-0-8b-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-2b-f16-primary-throughput.json +1 -5
- package/src/config/runtime/profiles/qwen-3-5-2b-metal-parity.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-2b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-5-9b-metal-correctness.json +1 -0
- package/src/config/runtime/profiles/qwen-3-embedding-0-6b-metal-stability.json +1 -3
- package/src/config/runtime/profiles/qwen-3-embedding-0-6b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen-3-reranker-0-6b-metal-stability.json +1 -0
- package/src/config/runtime/profiles/qwen-3-reranker-0-6b-metal-throughput.json +1 -0
- package/src/config/runtime/profiles/qwen3-6-27b-f16-activations-probe.json +1 -5
- package/src/config/runtime/profiles/rerank-stability.json +1 -3
- package/src/config/runtime/profiles/rerank-throughput.json +1 -3
- package/src/config/runtime/profiles/simulation.json +1 -3
- package/src/config/runtime/profiles/throughput.json +1 -3
- package/src/config/runtime/profiles/trace-layers.json +1 -3
- package/src/config/runtime/profiles/translategemma-1b-nativekd2-q4k-rdna3-throughput-probe.json +1 -0
- package/src/config/runtime/profiles/turboquant-contiguous-prod.json +1 -0
- package/src/config/runtime/profiles/turboquant-contiguous.json +1 -0
- package/src/config/runtime/profiles/turboquant.json +1 -0
- package/src/config/runtime/profiles/vector-stability.json +1 -3
- package/src/config/runtime/profiles/vector-throughput.json +1 -0
- package/src/config/runtime/profiles/verbose-trace.json +1 -3
- package/src/config/runtime/tiers/gemma4-128gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-16gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-24gb.json +1 -0
- package/src/config/runtime/tiers/gemma4-32gb.json +1 -0
- package/src/config/schema/benchmark.schema.d.ts +7 -0
- package/src/config/schema/benchmark.schema.js +5 -0
- package/src/config/schema/index.d.ts +8 -16
- package/src/config/schema/index.js +5 -8
- package/src/config/schema/kernel-thresholds.schema.d.ts +0 -12
- package/src/config/schema/kernel-thresholds.schema.js +0 -12
- package/src/config/schema/kernel-warmup.schema.d.ts +1 -3
- package/src/config/schema/kernel-warmup.schema.js +0 -1
- package/src/config/schema/runtime-profile.schema.d.ts +24 -0
- package/src/config/schema/runtime-profile.schema.js +92 -0
- package/src/config/schema/shared-runtime.schema.d.ts +1 -4
- package/src/config/schema/shared-runtime.schema.js +0 -2
- package/src/config/schema/tooling.schema.d.ts +8 -5
- package/src/config/schema/tooling.schema.js +3 -2
- package/src/debug/tensor.d.ts +2 -0
- package/src/debug/tensor.js +21 -2
- package/src/gpu/command-recorder.d.ts +5 -0
- package/src/gpu/command-recorder.js +17 -0
- package/src/gpu/kernel-runtime.js +2 -10
- package/src/gpu/kernels/index.d.ts +0 -2
- package/src/gpu/kernels/index.js +0 -2
- package/src/gpu/kernels/kernel-prewarm.d.ts +3 -0
- package/src/gpu/kernels/kernel-prewarm.js +60 -0
- package/src/gpu/kernels/utils.d.ts +2 -4
- package/src/gpu/kernels/utils.js +2 -4
- package/src/index.d.ts +13 -1
- package/src/index.js +7 -1
- package/src/inference/browser-harness-model-helpers.js +4 -0
- package/src/inference/browser-harness-runtime-helpers.js +25 -10
- package/src/inference/browser-harness-text-helpers.js +4 -1
- package/src/inference/browser-harness.d.ts +4 -0
- package/src/inference/browser-harness.js +91 -4
- package/src/inference/observation-context.d.ts +22 -0
- package/src/inference/observation-context.js +41 -0
- package/src/inference/pipelines/text/attention/attn-config.js +1 -1
- package/src/inference/pipelines/text/attention/executor-immediate.js +42 -0
- package/src/inference/pipelines/text/attention/executor-recorded.js +29 -0
- package/src/inference/pipelines/text/attention/index.js +7 -0
- package/src/inference/pipelines/text/attention/interpreter.js +1334 -0
- package/src/inference/pipelines/text/attention/plan.d.ts +36 -0
- package/src/inference/pipelines/text/attention/plan.js +328 -0
- package/src/inference/pipelines/text/attention/receipt.js +60 -0
- package/src/inference/pipelines/text/attention/record.js +8 -1278
- package/src/inference/pipelines/text/attention/run.js +8 -1386
- package/src/inference/pipelines/text/generator-decode-policy.js +4 -1
- package/src/inference/pipelines/text/generator-helpers.js +2 -0
- package/src/inference/pipelines/text/generator-steps.js +32 -15
- package/src/inference/pipelines/text/generator.js +10 -5
- package/src/inference/pipelines/text/init.d.ts +3 -0
- package/src/inference/pipelines/text/layer-plan-gpu.js +2 -0
- package/src/inference/pipelines/text/layer.js +2 -0
- package/src/inference/pipelines/text/model-load.d.ts +0 -1
- package/src/inference/pipelines/text/model-load.js +2 -11
- package/src/inference/pipelines/text/probes.js +10 -0
- package/src/inference/pipelines/text/resolved-runtime-session.d.ts +56 -0
- package/src/inference/pipelines/text/resolved-runtime-session.js +175 -0
- package/src/inference/pipelines/text/state.d.ts +6 -0
- package/src/inference/pipelines/text/state.js +3 -0
- package/src/inference/pipelines/text/types.d.ts +6 -0
- package/src/inference/pipelines/text.js +16 -1
- package/src/inference/refactor-receipt.d.ts +49 -0
- package/src/inference/refactor-receipt.js +188 -0
- package/src/inference/resource-scope.d.ts +33 -0
- package/src/inference/resource-scope.js +168 -0
- package/src/inference/test-harness.d.ts +3 -0
- package/src/inference/test-harness.js +1 -0
- package/src/storage/model-cache.d.ts +53 -0
- package/src/storage/model-cache.js +550 -0
- package/src/tooling/boundary-evidence.d.ts +51 -0
- package/src/tooling/boundary-evidence.js +408 -0
- package/src/tooling/browser-command-runner.js +4 -4
- package/src/tooling/command-context.d.ts +25 -0
- package/src/tooling/command-context.js +53 -0
- package/src/tooling/command-runner-shared.js +22 -5
- package/src/tooling/demo-receipts.d.ts +56 -0
- package/src/tooling/demo-receipts.js +113 -0
- package/src/tooling/diagnose-runner.js +2 -2
- package/src/tooling/execution-cost-ledger.d.ts +21 -0
- package/src/tooling/execution-cost-ledger.js +199 -0
- package/src/tooling/node-command-runner.js +2 -2
- package/src/tooling/opfs-cache.d.ts +11 -49
- package/src/tooling/opfs-cache.js +4 -510
- package/src/tooling/precision-replay-math.d.ts +42 -0
- package/src/tooling/precision-replay-math.js +174 -0
- package/src/tooling/program-bundle-parity.d.ts +3 -0
- package/src/tooling/program-bundle-parity.js +8 -0
- package/src/tooling/program-bundle.d.ts +1 -52
- package/src/tooling/program-bundle.js +0 -139
- package/src/tooling/registered-variant-calibration.d.ts +24 -0
- package/src/tooling/registered-variant-calibration.js +286 -0
- package/src/tooling/runtime-input-composition.js +105 -53
- package/src/tooling/runtime-intent.js +41 -0
- package/src/tooling/runtime-optimization-index.d.ts +6 -0
- package/src/tooling/runtime-optimization-index.js +72 -0
- package/src/tooling/runtime-optimization.d.ts +47 -6
- package/src/tooling/runtime-optimization.js +559 -40
- package/src/tooling/source-intake.d.ts +49 -0
- package/src/tooling/source-intake.js +414 -0
- package/src/tooling-exports/evidence.d.ts +34 -0
- package/src/tooling-exports/evidence.js +34 -0
- package/src/tooling-exports/runtime.d.ts +7 -0
- package/src/tooling-exports/runtime.js +7 -0
- package/src/tooling-exports.d.ts +11 -0
- package/src/tooling-exports.js +6 -3
- package/src/tooling-exports.shared.d.ts +32 -0
- package/src/tooling-exports.shared.js +31 -0
- package/src/version.js +1 -1
- package/src/config/schema/tuner.schema.d.ts +0 -39
- package/src/config/schema/tuner.schema.js +0 -13
- package/src/gpu/kernel-tuner/benchmarks.js +0 -902
- package/src/gpu/kernel-tuner/cache.js +0 -145
- package/src/gpu/kernel-tuner/index.js +0 -38
- package/src/gpu/kernel-tuner/tuner.js +0 -247
- package/src/gpu/kernel-tuner.js +0 -12
- package/src/gpu/kernels/kernel-tuning.d.ts +0 -42
- package/src/gpu/kernels/kernel-tuning.js +0 -158
- package/src/gpu/profiler.js +0 -382
- package/src/inference/pipelines/text/attention/output-gate-fusion.js +0 -37
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-5-0-8b-throughput-probe",
|
|
4
4
|
"description": "Qwen 3.5 0.8B throughput probe with a longer-prompt override (~80 tokens) for apples-to-apples measurement. Model fast-path settings come from the converted manifest.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-04-18T00:00:00Z",
|
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
"name": "qwen-3-5-2b-f16-primary-throughput",
|
|
4
4
|
"description": "Qwen 3.5 2B throughput profile that explicitly requests the selective f16 primary projection lane. The compare harness still owns prompt, sampling, token budget, and decode cadence.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-07T00:00:00Z",
|
|
9
10
|
"extends": "profiles/throughput",
|
|
10
11
|
"model": "qwen-3-5-2b-q4k-ehaf16",
|
|
11
12
|
"runtime": {
|
|
12
|
-
"shared": {
|
|
13
|
-
"tooling": {
|
|
14
|
-
"intent": "calibrate"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
13
|
"inference": {
|
|
18
14
|
"compute": {
|
|
19
15
|
"activationDtype": "f16"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-5-2b-metal-parity",
|
|
4
4
|
"description": "Qwen 3.5 2B browser/Metal parity profile. Preserves the release 4x4 decode cadence while inheriting the exact Metal Q4 GEMV and decode fusions from the throughput profile.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-10T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-5-2b-metal-throughput",
|
|
4
4
|
"description": "Qwen 3.5 2B browser/Metal throughput profile. Uses 16-lane Q4_K decode projections, fused gate/up, and exact linear-attention fusions while preserving the manifest f32 compute lane.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-07T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-5-9b-metal-correctness",
|
|
4
4
|
"description": "Shared single-token decode contract for F16 and mixed-Q4_K correctness comparison on Apple Metal.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-12T00:00:00Z",
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "qwen-3-embedding-0-6b-metal-stability",
|
|
4
4
|
"description": "Qwen 3 Embedding 0.6B Metal validation profile preserving manifest compute precision.",
|
|
5
5
|
"intent": "verify",
|
|
6
|
+
"compatibleIntents": ["verify"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-09T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "verify"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logLevel": {
|
|
17
15
|
"defaultLogLevel": "silent"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-embedding-0-6b-metal-throughput",
|
|
4
4
|
"description": "Qwen 3 Embedding 0.6B Metal throughput profile preserving manifest compute precision.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-09T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-reranker-0-6b-metal-stability",
|
|
4
4
|
"description": "Qwen 3 Reranker 0.6B browser/Metal validation profile preserving manifest compute precision while exercising the fixed head_dim=128 f16-KV prefill attention path.",
|
|
5
5
|
"intent": "verify",
|
|
6
|
+
"compatibleIntents": ["verify"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-09T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "qwen-3-reranker-0-6b-metal-throughput",
|
|
4
4
|
"description": "Qwen 3 Reranker 0.6B browser/Metal throughput profile preserving manifest compute precision while using fixed head_dim=128 f16-KV prefill attention.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-09T00:00:00Z",
|
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
"name": "qwen3-6-27b-f16-activations-probe",
|
|
4
4
|
"description": "Experimental Qwen 3.6 27B profile that requests the additive execution-v1 f16 compute lane against the f16 manifest sibling sharing the existing Q4K weight pack.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-04-29T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"model": "qwen-3-6-27b-q4k-eaf16",
|
|
11
12
|
"runtime": {
|
|
12
|
-
"shared": {
|
|
13
|
-
"tooling": {
|
|
14
|
-
"intent": "investigate"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
13
|
"inference": {
|
|
18
14
|
"compute": {
|
|
19
15
|
"activationDtype": "f16"
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "rerank-stability",
|
|
4
4
|
"description": "Stable rerank validation profile with deterministic scoring and quiet tracing.",
|
|
5
5
|
"intent": "verify",
|
|
6
|
+
"compatibleIntents": ["verify"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-06T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "verify"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logLevel": {
|
|
17
15
|
"defaultLogLevel": "silent"
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "rerank-throughput",
|
|
4
4
|
"description": "Rerank benchmark profile for repeated yes/no-logit scoring throughput runs.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-06T00:00:00Z",
|
|
9
10
|
"extends": "profiles/rerank-stability",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "calibrate"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logOutput": {
|
|
17
15
|
"stdout": false
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "simulation",
|
|
4
4
|
"description": "Simulation profile for GH200/GB200 pod emulation",
|
|
5
5
|
"intent": "verify",
|
|
6
|
+
"compatibleIntents": ["verify"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-02-25T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "verify"
|
|
14
|
-
},
|
|
15
13
|
"harness": {
|
|
16
14
|
"mode": "simulation",
|
|
17
15
|
"workload": "inference",
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "throughput",
|
|
4
4
|
"description": "Calibration profile with quiet logging and throughput-oriented sampling defaults.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-20T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "calibrate"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logOutput": {
|
|
17
15
|
"stdout": true,
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "trace-layers",
|
|
4
4
|
"description": "Trace layer outputs for F16 vs Q4K comparison",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-02-25T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "investigate"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"trace": {
|
|
17
15
|
"enabled": true,
|
package/src/config/runtime/profiles/translategemma-1b-nativekd2-q4k-rdna3-throughput-probe.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "translategemma-1b-nativekd2-q4k-rdna3-throughput-probe",
|
|
4
4
|
"description": "Experimental TranslateGemma 1B NativeKD2 EN/ES calibration profile for AMD RDNA3/Vulkan evidence. Preserves the manifest 4x1 sequential decode cadence while retaining Q4K materialization, selecting wide-tile Q4K prefill, and enabling exact-safe packed-QKV and RMSNorm-pair fusions.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-07-11T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "turboquant-contiguous-prod",
|
|
4
4
|
"description": "Experimental contiguous TurboQuant prod profile with execution-v1-native session wiring and QJL residual buffers.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "inference",
|
|
8
9
|
"createdAtUtc": "2026-03-25T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "turboquant-contiguous",
|
|
4
4
|
"description": "Experimental contiguous TurboQuant profile for full-attention decode with execution-v1-native session wiring.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "inference",
|
|
8
9
|
"createdAtUtc": "2026-03-25T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "turboquant",
|
|
4
4
|
"description": "Experimental tiered TurboQuant profile with execution-v1-native session KV cache settings.",
|
|
5
5
|
"intent": "calibrate",
|
|
6
|
+
"compatibleIntents": ["calibrate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "inference",
|
|
8
9
|
"createdAtUtc": "2026-03-25T00:00:00Z",
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "vector-stability",
|
|
4
4
|
"description": "Numerically stable single-vector profile for embedding validation runs.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-20T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "investigate"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logLevel": {
|
|
17
15
|
"defaultLogLevel": "debug"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "vector-throughput",
|
|
4
4
|
"description": "Repeated embedding profile tuned for stable latency measurements.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-20T00:00:00Z",
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
"name": "verbose-trace",
|
|
4
4
|
"description": "Investigation profile with verbose logging and broad tracing enabled.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "canonical",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-20T00:00:00Z",
|
|
9
10
|
"extends": "profiles/default",
|
|
10
11
|
"runtime": {
|
|
11
12
|
"shared": {
|
|
12
|
-
"tooling": {
|
|
13
|
-
"intent": "investigate"
|
|
14
|
-
},
|
|
15
13
|
"debug": {
|
|
16
14
|
"logLevel": {
|
|
17
15
|
"defaultLogLevel": "verbose"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "Gemma 4 — 128 GB tier (unified memory APU)",
|
|
4
4
|
"description": "Gemma 4 MoE runtime tier for 128 GB unified memory systems (e.g., Ryzen AI MAX+ 395). Generous expert cache, contiguous KV, extended context. Budget leaves headroom for system and replay-prefill intermediates.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-04-04T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "Gemma 4 — 16 GB tier (constrained)",
|
|
4
4
|
"description": "Gemma 4 MoE runtime tier for 16 GB GPU memory. Aggressively constrained: short context, minimal expert cache, hard budget enforcement. Fail-closed if budget is not met.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-17T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "Gemma 4 — 24 GB tier",
|
|
4
4
|
"description": "Gemma 4 MoE runtime tier for 24 GB GPU memory. Moderate expert cache, contiguous KV, reduced context length.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-17T00:00:00Z",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"name": "Gemma 4 — 32 GB tier",
|
|
4
4
|
"description": "Gemma 4 MoE runtime tier for 32 GB GPU memory. Generous expert cache, contiguous KV, full-length context.",
|
|
5
5
|
"intent": "investigate",
|
|
6
|
+
"compatibleIntents": ["investigate"],
|
|
6
7
|
"stability": "experimental",
|
|
7
8
|
"owner": "doppler-core",
|
|
8
9
|
"createdAtUtc": "2026-03-17T00:00:00Z",
|
|
@@ -18,7 +18,14 @@ export interface BenchmarkRunConfig {
|
|
|
18
18
|
};
|
|
19
19
|
debug: boolean;
|
|
20
20
|
profile: boolean;
|
|
21
|
+
executionObserver: {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
includeDispatchGeometry: boolean;
|
|
24
|
+
estimateBytesMoved: boolean;
|
|
25
|
+
};
|
|
21
26
|
useChatTemplate?: boolean;
|
|
27
|
+
captureMemoryTimeSeries: boolean;
|
|
28
|
+
memoryTimeSeriesIntervalMs: number;
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
export interface BenchmarkStatsConfig {
|
|
@@ -25,6 +25,11 @@ export const DEFAULT_BENCHMARK_RUN_CONFIG = {
|
|
|
25
25
|
},
|
|
26
26
|
debug: false,
|
|
27
27
|
profile: false,
|
|
28
|
+
executionObserver: {
|
|
29
|
+
enabled: false,
|
|
30
|
+
includeDispatchGeometry: true,
|
|
31
|
+
estimateBytesMoved: false,
|
|
32
|
+
},
|
|
28
33
|
useChatTemplate: undefined,
|
|
29
34
|
// Memory time series capture (VRAM over time)
|
|
30
35
|
captureMemoryTimeSeries: false,
|
|
@@ -449,17 +449,6 @@ export {
|
|
|
449
449
|
DEFAULT_GPU_CACHE_CONFIG,
|
|
450
450
|
} from './gpu-cache.schema.js';
|
|
451
451
|
|
|
452
|
-
// =============================================================================
|
|
453
|
-
// Tuner Schema
|
|
454
|
-
// =============================================================================
|
|
455
|
-
export {
|
|
456
|
-
// Types
|
|
457
|
-
type TunerConfigSchema,
|
|
458
|
-
|
|
459
|
-
// Defaults
|
|
460
|
-
DEFAULT_TUNER_CONFIG,
|
|
461
|
-
} from './tuner.schema.js';
|
|
462
|
-
|
|
463
452
|
// =============================================================================
|
|
464
453
|
// Debug Schema
|
|
465
454
|
// =============================================================================
|
|
@@ -768,14 +757,22 @@ export {
|
|
|
768
757
|
type ToolingConfigSchema,
|
|
769
758
|
type ToolingIntent,
|
|
770
759
|
type ToolingDiagnosticsMode,
|
|
760
|
+
type RefactorReceiptPolicy,
|
|
771
761
|
|
|
772
762
|
// Constants
|
|
773
763
|
TOOLING_INTENTS,
|
|
774
764
|
TOOLING_DIAGNOSTICS,
|
|
765
|
+
REFACTOR_RECEIPT_POLICIES,
|
|
775
766
|
|
|
776
767
|
// Defaults
|
|
777
768
|
DEFAULT_TOOLING_CONFIG,
|
|
778
769
|
} from './tooling.schema.js';
|
|
770
|
+
export {
|
|
771
|
+
type RuntimeProfileMetadata,
|
|
772
|
+
type RuntimeProfileStability,
|
|
773
|
+
validateRuntimeProfileMetadata,
|
|
774
|
+
assertRuntimeProfileIntentCompatibility,
|
|
775
|
+
} from './runtime-profile.schema.js';
|
|
779
776
|
|
|
780
777
|
// =============================================================================
|
|
781
778
|
// Ecosystem Schema
|
|
@@ -901,11 +898,6 @@ export {
|
|
|
901
898
|
DEFAULT_ADAPTER_CONFIG,
|
|
902
899
|
} from './adapter.schema.js';
|
|
903
900
|
|
|
904
|
-
// =============================================================================
|
|
905
|
-
// Tuner Limits
|
|
906
|
-
// =============================================================================
|
|
907
|
-
export { DEFAULT_TUNER_LIMITS } from './kernel-thresholds.schema.js';
|
|
908
|
-
|
|
909
901
|
// =============================================================================
|
|
910
902
|
// Self-Speculation Schema
|
|
911
903
|
// =============================================================================
|
|
@@ -208,13 +208,6 @@ export {
|
|
|
208
208
|
DEFAULT_GPU_CACHE_CONFIG,
|
|
209
209
|
} from './gpu-cache.schema.js';
|
|
210
210
|
|
|
211
|
-
// =============================================================================
|
|
212
|
-
// Tuner Schema
|
|
213
|
-
// =============================================================================
|
|
214
|
-
export {
|
|
215
|
-
DEFAULT_TUNER_CONFIG,
|
|
216
|
-
} from './tuner.schema.js';
|
|
217
|
-
|
|
218
211
|
// =============================================================================
|
|
219
212
|
// Debug Schema
|
|
220
213
|
// =============================================================================
|
|
@@ -251,8 +244,13 @@ export {
|
|
|
251
244
|
export {
|
|
252
245
|
TOOLING_INTENTS,
|
|
253
246
|
TOOLING_DIAGNOSTICS,
|
|
247
|
+
REFACTOR_RECEIPT_POLICIES,
|
|
254
248
|
DEFAULT_TOOLING_CONFIG,
|
|
255
249
|
} from './tooling.schema.js';
|
|
250
|
+
export {
|
|
251
|
+
validateRuntimeProfileMetadata,
|
|
252
|
+
assertRuntimeProfileIntentCompatibility,
|
|
253
|
+
} from './runtime-profile.schema.js';
|
|
256
254
|
|
|
257
255
|
// =============================================================================
|
|
258
256
|
// Ecosystem Schema
|
|
@@ -439,7 +437,6 @@ export {
|
|
|
439
437
|
DEFAULT_ROPE_DEFAULTS,
|
|
440
438
|
DEFAULT_ATTENTION_THRESHOLDS,
|
|
441
439
|
DEFAULT_CAST_THRESHOLDS,
|
|
442
|
-
DEFAULT_TUNER_LIMITS,
|
|
443
440
|
DEFAULT_KERNEL_THRESHOLDS,
|
|
444
441
|
|
|
445
442
|
// Functions
|
|
@@ -117,17 +117,6 @@ export interface RopeDefaultsSchema {
|
|
|
117
117
|
|
|
118
118
|
export declare const DEFAULT_ROPE_DEFAULTS: RopeDefaultsSchema;
|
|
119
119
|
|
|
120
|
-
/**
|
|
121
|
-
* Defaults for kernel tuner limits when device limits are unavailable.
|
|
122
|
-
*/
|
|
123
|
-
export interface TunerLimitsSchema {
|
|
124
|
-
maxComputeWorkgroupSizeX: number;
|
|
125
|
-
maxComputeWorkgroupSizeY: number;
|
|
126
|
-
maxComputeInvocationsPerWorkgroup: number;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export declare const DEFAULT_TUNER_LIMITS: TunerLimitsSchema;
|
|
130
|
-
|
|
131
120
|
/**
|
|
132
121
|
* Thresholds for attention kernel variant selection.
|
|
133
122
|
*/
|
|
@@ -279,7 +268,6 @@ export interface KernelThresholdsConfigSchema {
|
|
|
279
268
|
attention: AttentionThresholdsSchema;
|
|
280
269
|
fusedMatmul: FusedMatmulThresholdsSchema;
|
|
281
270
|
cast: CastThresholdsSchema;
|
|
282
|
-
tuner: TunerLimitsSchema;
|
|
283
271
|
}
|
|
284
272
|
|
|
285
273
|
export declare const DEFAULT_KERNEL_THRESHOLDS: KernelThresholdsConfigSchema;
|
|
@@ -52,16 +52,6 @@ export const DEFAULT_ROPE_DEFAULTS = {
|
|
|
52
52
|
defaultStartPos: 0,
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// =============================================================================
|
|
56
|
-
// Kernel Tuning Defaults
|
|
57
|
-
// =============================================================================
|
|
58
|
-
|
|
59
|
-
export const DEFAULT_TUNER_LIMITS = {
|
|
60
|
-
maxComputeWorkgroupSizeX: 256,
|
|
61
|
-
maxComputeWorkgroupSizeY: 256,
|
|
62
|
-
maxComputeInvocationsPerWorkgroup: 256,
|
|
63
|
-
};
|
|
64
|
-
|
|
65
55
|
// =============================================================================
|
|
66
56
|
// Attention Thresholds
|
|
67
57
|
// =============================================================================
|
|
@@ -154,7 +144,6 @@ export const DEFAULT_KERNEL_THRESHOLDS = {
|
|
|
154
144
|
attention: DEFAULT_ATTENTION_THRESHOLDS,
|
|
155
145
|
fusedMatmul: DEFAULT_FUSED_MATMUL_THRESHOLDS,
|
|
156
146
|
cast: DEFAULT_CAST_THRESHOLDS,
|
|
157
|
-
tuner: DEFAULT_TUNER_LIMITS,
|
|
158
147
|
};
|
|
159
148
|
|
|
160
149
|
|
|
@@ -181,7 +170,6 @@ export function setKernelThresholds(overrides) {
|
|
|
181
170
|
attention: { ...currentThresholds.attention, ...overrides.attention },
|
|
182
171
|
fusedMatmul: { ...currentThresholds.fusedMatmul, ...overrides.fusedMatmul },
|
|
183
172
|
cast: { ...currentThresholds.cast, ...overrides.cast },
|
|
184
|
-
tuner: { ...currentThresholds.tuner, ...overrides.tuner },
|
|
185
173
|
};
|
|
186
174
|
currentThresholds = cloneThresholdTree(nextThresholds);
|
|
187
175
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kernel Warmup Config Schema
|
|
3
3
|
*
|
|
4
|
-
* Controls optional kernel prewarming
|
|
4
|
+
* Controls optional kernel prewarming.
|
|
5
5
|
*
|
|
6
6
|
* @module config/schema/kernel-warmup
|
|
7
7
|
*/
|
|
@@ -11,8 +11,6 @@ export interface KernelWarmupConfigSchema {
|
|
|
11
11
|
prewarm: boolean;
|
|
12
12
|
/** Prewarm scheduling mode (parallel or sequential). */
|
|
13
13
|
prewarmMode: 'parallel' | 'sequential';
|
|
14
|
-
/** Auto-tune kernel workgroup sizes for the active model config. */
|
|
15
|
-
autoTune: boolean;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
/** Default kernel warmup configuration */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToolingIntent } from './tooling.schema.js';
|
|
2
|
+
|
|
3
|
+
export type RuntimeProfileStability = 'canonical' | 'experimental' | 'deprecated';
|
|
4
|
+
|
|
5
|
+
export interface RuntimeProfileMetadata {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
intent: Exclude<ToolingIntent, null>;
|
|
9
|
+
compatibleIntents: Array<Exclude<ToolingIntent, null>>;
|
|
10
|
+
stability: RuntimeProfileStability;
|
|
11
|
+
owner: string;
|
|
12
|
+
createdAtUtc: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function validateRuntimeProfileMetadata(
|
|
16
|
+
profile: Record<string, unknown>,
|
|
17
|
+
label?: string
|
|
18
|
+
): Readonly<RuntimeProfileMetadata>;
|
|
19
|
+
|
|
20
|
+
export function assertRuntimeProfileIntentCompatibility(
|
|
21
|
+
profile: Record<string, unknown>,
|
|
22
|
+
requestIntent: ToolingIntent,
|
|
23
|
+
label?: string
|
|
24
|
+
): Readonly<RuntimeProfileMetadata>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { TOOLING_INTENTS } from './tooling.schema.js';
|
|
2
|
+
|
|
3
|
+
const RUNTIME_PROFILE_STABILITIES = Object.freeze([
|
|
4
|
+
'canonical',
|
|
5
|
+
'experimental',
|
|
6
|
+
'deprecated',
|
|
7
|
+
]);
|
|
8
|
+
|
|
9
|
+
function assertNonEmptyString(value, label) {
|
|
10
|
+
if (typeof value !== 'string' || value.trim().length === 0) {
|
|
11
|
+
throw new Error(`DopplerConfigError: ${label} must be a non-empty string.`);
|
|
12
|
+
}
|
|
13
|
+
return value.trim();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function normalizeCompatibleIntents(value, label) {
|
|
17
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
18
|
+
throw new Error(`DopplerConfigError: ${label} must be a non-empty array.`);
|
|
19
|
+
}
|
|
20
|
+
const compatibleIntents = value.map((intent, index) => {
|
|
21
|
+
const normalized = assertNonEmptyString(intent, `${label}[${index}]`);
|
|
22
|
+
if (!TOOLING_INTENTS.includes(normalized)) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`DopplerConfigError: ${label}[${index}] must be one of ${TOOLING_INTENTS.join(', ')}.`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return normalized;
|
|
28
|
+
});
|
|
29
|
+
if (new Set(compatibleIntents).size !== compatibleIntents.length) {
|
|
30
|
+
throw new Error(`DopplerConfigError: ${label} must not contain duplicates.`);
|
|
31
|
+
}
|
|
32
|
+
return compatibleIntents;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function validateRuntimeProfileMetadata(profile, label = 'runtime profile') {
|
|
36
|
+
if (!profile || typeof profile !== 'object' || Array.isArray(profile)) {
|
|
37
|
+
throw new Error(`DopplerConfigError: ${label} must be an object.`);
|
|
38
|
+
}
|
|
39
|
+
const id = assertNonEmptyString(profile.id, `${label}.id`);
|
|
40
|
+
const name = assertNonEmptyString(profile.name, `${label}.name`);
|
|
41
|
+
const intent = assertNonEmptyString(profile.intent, `${label}.intent`);
|
|
42
|
+
if (!TOOLING_INTENTS.includes(intent)) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`DopplerConfigError: ${label}.intent must be one of ${TOOLING_INTENTS.join(', ')}.`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const compatibleIntents = normalizeCompatibleIntents(
|
|
48
|
+
profile.compatibleIntents,
|
|
49
|
+
`${label}.compatibleIntents`
|
|
50
|
+
);
|
|
51
|
+
if (!compatibleIntents.includes(intent)) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
`DopplerConfigError: ${label}.compatibleIntents must include the profile intent "${intent}".`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const stability = assertNonEmptyString(profile.stability, `${label}.stability`);
|
|
57
|
+
if (!RUNTIME_PROFILE_STABILITIES.includes(stability)) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
`DopplerConfigError: ${label}.stability must be one of ${RUNTIME_PROFILE_STABILITIES.join(', ')}.`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const owner = assertNonEmptyString(profile.owner, `${label}.owner`);
|
|
63
|
+
const createdAtUtc = assertNonEmptyString(profile.createdAtUtc, `${label}.createdAtUtc`);
|
|
64
|
+
if (Number.isNaN(Date.parse(createdAtUtc))) {
|
|
65
|
+
throw new Error(`DopplerConfigError: ${label}.createdAtUtc must be an ISO-8601 timestamp.`);
|
|
66
|
+
}
|
|
67
|
+
return Object.freeze({
|
|
68
|
+
id,
|
|
69
|
+
name,
|
|
70
|
+
intent,
|
|
71
|
+
compatibleIntents: Object.freeze([...compatibleIntents]),
|
|
72
|
+
stability,
|
|
73
|
+
owner,
|
|
74
|
+
createdAtUtc,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function assertRuntimeProfileIntentCompatibility(profile, requestIntent, label = 'runtime profile') {
|
|
79
|
+
const metadata = validateRuntimeProfileMetadata(profile, label);
|
|
80
|
+
if (requestIntent === null || requestIntent === undefined) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`DopplerConfigError: ${label} "${metadata.id}" requires a harness command intent.`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
if (!metadata.compatibleIntents.includes(requestIntent)) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`DopplerConfigError: ${label} "${metadata.id}" is not compatible with intent "${requestIntent}". ` +
|
|
88
|
+
`Compatible intents: ${metadata.compatibleIntents.join(', ')}.`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return metadata;
|
|
92
|
+
}
|