@miller-tech/uap 2.16.7 → 2.19.5
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/config/capacity-policy.json +33 -0
- package/config/model-profiles/qwen38.json +32 -33
- package/dist/.tsbuildinfo +1 -1
- package/dist/bin/cli.js +57 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/capacity/policy.d.ts +32 -1
- package/dist/capacity/policy.d.ts.map +1 -1
- package/dist/capacity/policy.js +123 -4
- package/dist/capacity/policy.js.map +1 -1
- package/dist/capacity/probe.d.ts +26 -0
- package/dist/capacity/probe.d.ts.map +1 -1
- package/dist/capacity/probe.js +84 -3
- package/dist/capacity/probe.js.map +1 -1
- package/dist/cli/inference.d.ts +4 -0
- package/dist/cli/inference.d.ts.map +1 -1
- package/dist/cli/inference.js +74 -8
- package/dist/cli/inference.js.map +1 -1
- package/dist/cli/merge-gate.d.ts +59 -0
- package/dist/cli/merge-gate.d.ts.map +1 -0
- package/dist/cli/merge-gate.js +238 -0
- package/dist/cli/merge-gate.js.map +1 -0
- package/dist/cli/merge-queue.d.ts +13 -0
- package/dist/cli/merge-queue.d.ts.map +1 -1
- package/dist/cli/merge-queue.js +48 -2
- package/dist/cli/merge-queue.js.map +1 -1
- package/dist/cli/mission.d.ts +25 -0
- package/dist/cli/mission.d.ts.map +1 -0
- package/dist/cli/mission.js +225 -0
- package/dist/cli/mission.js.map +1 -0
- package/dist/cli/orch.d.ts +27 -0
- package/dist/cli/orch.d.ts.map +1 -0
- package/dist/cli/orch.js +70 -0
- package/dist/cli/orch.js.map +1 -0
- package/dist/cli/systemd-services.d.ts.map +1 -1
- package/dist/cli/systemd-services.js +44 -0
- package/dist/cli/systemd-services.js.map +1 -1
- package/dist/delivery/merge-gate.d.ts +168 -0
- package/dist/delivery/merge-gate.d.ts.map +1 -0
- package/dist/delivery/merge-gate.js +309 -0
- package/dist/delivery/merge-gate.js.map +1 -0
- package/dist/inference/analysis.d.ts +69 -3
- package/dist/inference/analysis.d.ts.map +1 -1
- package/dist/inference/analysis.js +123 -7
- package/dist/inference/analysis.js.map +1 -1
- package/dist/inference/probe.d.ts +38 -1
- package/dist/inference/probe.d.ts.map +1 -1
- package/dist/inference/probe.js +303 -30
- package/dist/inference/probe.js.map +1 -1
- package/dist/inference/strata.d.ts +95 -0
- package/dist/inference/strata.d.ts.map +1 -0
- package/dist/inference/strata.js +167 -0
- package/dist/inference/strata.js.map +1 -0
- package/dist/mission/database.d.ts +29 -0
- package/dist/mission/database.d.ts.map +1 -0
- package/dist/mission/database.js +131 -0
- package/dist/mission/database.js.map +1 -0
- package/dist/mission/ledger.d.ts +109 -0
- package/dist/mission/ledger.d.ts.map +1 -0
- package/dist/mission/ledger.js +294 -0
- package/dist/mission/ledger.js.map +1 -0
- package/dist/mission/poll-cycle.d.ts +73 -0
- package/dist/mission/poll-cycle.d.ts.map +1 -0
- package/dist/mission/poll-cycle.js +100 -0
- package/dist/mission/poll-cycle.js.map +1 -0
- package/dist/mission/poll-executor.d.ts +91 -0
- package/dist/mission/poll-executor.d.ts.map +1 -0
- package/dist/mission/poll-executor.js +328 -0
- package/dist/mission/poll-executor.js.map +1 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/models/types.js +33 -27
- package/dist/models/types.js.map +1 -1
- package/dist/self-tuning/profiles/qwen38.d.ts +13 -14
- package/dist/self-tuning/profiles/qwen38.d.ts.map +1 -1
- package/dist/self-tuning/profiles/qwen38.js +17 -18
- package/dist/self-tuning/profiles/qwen38.js.map +1 -1
- package/dist/types/mission.d.ts +80 -0
- package/dist/types/mission.d.ts.map +1 -0
- package/dist/types/mission.js +12 -0
- package/dist/types/mission.js.map +1 -0
- package/docs/architecture/adr/0003-mission-orchestrator.md +99 -0
- package/docs/architecture/adr/0004-deterministic-merge-gate.md +127 -0
- package/docs/guides/CAPACITY_POLICY.md +49 -0
- package/docs/guides/INFERENCE_HEALTH.md +65 -8
- package/docs/guides/MISSIONS.md +170 -0
- package/docs/guides/PROXY.md +2 -0
- package/docs/reports/2026-10-02-plane-admin-fail-closed.md +70 -0
- package/docs/reports/2026-10-02-plane-admin-protect-session.md +116 -0
- package/docs/visual/merge-gate.html +404 -0
- package/docs/visual/mission-orchestrator.html +472 -0
- package/package.json +2 -2
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/src/policies/enforcers/__pycache__/expert_review_required.cpython-312.pyc +0 -0
- package/src/policies/enforcers/__pycache__/quality_metrics_gate.cpython-312.pyc +0 -0
- package/src/policies/enforcers/plane_admin_protect.py +133 -0
- package/src/policies/schemas/policies/plane-admin-protect.md +55 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/templates/hooks/uap-policy-gate.sh +33 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +493 -40
- package/tools/agents/tests/test_anthropic_proxy_streaming.py +171 -0
- package/tools/agents/tests/test_gate_failclosed_plane_admin.py +248 -0
- package/tools/agents/tests/test_plane_admin_protect.py +124 -0
- package/tools/agents/tests/test_stream_heartbeat.py +77 -0
|
@@ -39,6 +39,39 @@
|
|
|
39
39
|
"knownRestarts": 0,
|
|
40
40
|
"allowedNew": 0
|
|
41
41
|
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "mission-orchestrator",
|
|
45
|
+
"systemd": {
|
|
46
|
+
"unit": "uap-orchestrator.service",
|
|
47
|
+
"scope": "user"
|
|
48
|
+
},
|
|
49
|
+
"budget": {
|
|
50
|
+
"rssMiB": 512,
|
|
51
|
+
"note": "uap orch poll loop clock over the mission ledger (added 2026-10-03). Polls every 300s; RSS covers node + better-sqlite3."
|
|
52
|
+
},
|
|
53
|
+
"restartBudget": {
|
|
54
|
+
"knownRestarts": 0,
|
|
55
|
+
"allowedNew": 3
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "strata-server",
|
|
60
|
+
"http": {
|
|
61
|
+
"url": "http://127.0.0.1:8080",
|
|
62
|
+
"kind": "strata",
|
|
63
|
+
"metricsMustMatch": {
|
|
64
|
+
"kv": "int8",
|
|
65
|
+
"max_context": 131072
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"budget": {
|
|
69
|
+
"note": "The local Qwen3.8 backend since 2026-10-04 (the gsq-rco llama-server above is its retired predecessor, unit kept for rotation). Unit-less: launched by /home/cogtek/dev/strata/run-iq3_xxs.sh (flash-next IQ3_XXS pack, --expert-cache auto, --vram-reserve-mib 1200, --spec 4, --kv int8, --max-context 131072, single rail). No restartBudget: with no unit, NRestarts does not exist; liveness IS the /metrics probe. metricsMustMatch pins the two load-bearing numbers the note mentions — kv kind and pool size — so a relaunch with different flags reads as RED, the execStartMustContain doctrine applied to a service with no ExecStart."
|
|
70
|
+
},
|
|
71
|
+
"headroom": {
|
|
72
|
+
"gpuMinFreeMiB": 200,
|
|
73
|
+
"_headroom_comment": "200, not the 600 the llama.cpp-era entries use: strata deliberately fills the card (--vram-reserve-mib 1200 is its OWN internal headroom, reported reserve-aware at /metrics), and the measured steady state with the desktop sharing the GPU is ~245 MiB free. A 600 floor would hold the doctor permanently RED at the operator's chosen operating point and train everyone to ignore it. 200 still alerts when something NEW eats the card or strata loses its reserve."
|
|
74
|
+
}
|
|
42
75
|
}
|
|
43
76
|
]
|
|
44
77
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_profile": "qwen38",
|
|
3
|
-
"_description": "Qwen3.8
|
|
4
|
-
"_engine": "
|
|
5
|
-
"_engine_history": "
|
|
6
|
-
"model": "
|
|
3
|
+
"_description": "Qwen3.8 Flash-Next — local Strata serve-layer deployment for agentic tool-calling workloads. Successor to qwen36 and to the 2026-09-20 GSQ-RCO llama.cpp deployment; the default local executor in UAP routing. Routes through the anthropic-proxy for the tool/finalize guardrails, NOT the inference server directly.",
|
|
4
|
+
"_engine": "strata serve layer 0.1.37 (python server + native engine binary) on :8080, no systemd unit — launched by /home/cogtek/dev/strata/run-iq3_xxs.sh. Serves llama.cpp-shaped /props, /slots and /v1, plus a JSON /metrics (engine/live/requests — NOT Prometheus text; `uap inference health` auto-detects it). Weights: strata-data pack iq3_xxs (Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS, native experts + PLE shard) with MTP speculative drafts (spec 4, spec-min-p 0.5, mtp_max 4) and an auto-sized expert cache (~14.5 GiB, 91% hit rate observed). Model id advertised at /v1/models: qwen3.8-flash-next-iq3_xxs; the server ignores requested model ids entirely, which is why stale client pins (e.g. a resumed session still naming qwen36 ids) keep working.",
|
|
5
|
+
"_engine_history": "SUPERSEDED 2026-10-04: this profile described buun-llama-cpp behind uap-gsq-rco-server.service (2 rails sharing a 229376-cell VBR pool, DFlash2 draft). That unit is now INACTIVE — the box serves the Strata layer on :8080 instead (tuned 2026-10-03: +15% over the llama.cpp fork on agent workloads). The old description was itself a 2026-09-20 correction of a ninfer-serve description. Verify against /metrics before trusting engine claims here; the dead unit's ExecStart still reports -c 229376 to systemctl, and on 2026-10-04 `uap inference health` printed that stale pool size for the live (131072) backend.",
|
|
6
|
+
"model": "qwen3.8-flash-next-iq3_xxs",
|
|
7
7
|
"max_tokens": 57344,
|
|
8
|
-
"_max_tokens_comment": "Deliberately generous: 50% of the 114688 window, the same ratio the previous 65536/131072 pairing used. The engine returns chain-of-thought in a SEPARATE reasoning_content field
|
|
8
|
+
"_max_tokens_comment": "Deliberately generous: 50% of the 114688 window, the same ratio the previous 65536/131072 pairing used. The engine returns chain-of-thought in a SEPARATE reasoning_content field, so reasoning spends completion budget without ever appearing in content. A tight cap therefore does not produce a short answer, it produces an EMPTY one with finish_reason=length — measured previously as ~90% first-turn decode failure that read as bad output format and was really budget truncation. Do not lower this without re-measuring decode compliance. (The proxy additionally clamps tool turns to PROXY_TOOL_TURN_MAX_TOKENS=32768 regardless.)",
|
|
9
9
|
"temperature": 0.3,
|
|
10
10
|
"top_p": 0.9,
|
|
11
11
|
"top_k": 20,
|
|
12
12
|
"min_p": 0.05,
|
|
13
13
|
"repetition_penalty": 1.0,
|
|
14
|
-
"_sampling_comment": "Carried over from qwen36 unchanged: these are UAP's tool-call-tuned values, not the vendor's chat defaults
|
|
14
|
+
"_sampling_comment": "Carried over from qwen36 unchanged: these are UAP's tool-call-tuned values, not the vendor's chat defaults. They were re-measured only against the llama.cpp GSQ-RCO engine, never against strata — strata's own defaults (spec 4, spec-min-p 0.5) affect drafting, not base sampling, so the values are carried as-is. Re-tune with `uap tune` before changing them.",
|
|
15
15
|
"stop_sequences": [
|
|
16
16
|
"<|im_end|>"
|
|
17
17
|
],
|
|
18
18
|
"timeout_ms": 300000,
|
|
19
19
|
"context_window": 114688,
|
|
20
|
-
"_context_window_comment": "THIS IS A PER-SESSION CAP, AND IT IS LOAD-BEARING
|
|
20
|
+
"_context_window_comment": "THIS IS A PER-SESSION CAP, AND IT IS LOAD-BEARING. Strata serves ONE rail with a 131072-cell pool (--max-context 131072, /slots reports n_ctx=131072); the proxy's detection reads slots[0].n_ctx and would otherwise tell every session it owns the whole pool. 114688 deliberately sits BELOW the pool (87.5%): the difference (~16k cells) is the engine's own working room (prompt scratch, conversation cache, expert-cache bookkeeping), so a session at the cap cannot crowd the engine out of its own pool. Consequence of the smaller backend: admission is now 1, not 2 — a second hot session at this cap would demand 229376 cells from a 131072-cell pool, the exact overcommit the per-session cap exists to prevent. In practice sessions sit far below it: the proxy prunes at 0.70 (~80k) toward 0.50 (~57k). IMPORTANT GAP (unchanged from the llama.cpp era): this cap is OPT-IN. A client that does not send the x-uap-model-profile header gets the whole pool. opencode, codex and claude-local send it; factory/droid custom models cannot, so keep factory to one local session at a time. /v1/models advertises the process-wide window (131072), not this cap.",
|
|
21
21
|
"optimize_for_tool_calls": true,
|
|
22
22
|
"mode_switch_buffer_tokens": 500,
|
|
23
23
|
"enable_thinking": true,
|
|
24
|
-
"_thinking_comment": "Top-level. The
|
|
24
|
+
"_thinking_comment": "Top-level. The proxy probes the backend once and adapts (PROXY_CHAT_TEMPLATE_KWARGS=auto|on|off), so the top-level enable_thinking form remains correct across both the llama.cpp and strata backends.",
|
|
25
25
|
"dynamic_temperature": {
|
|
26
26
|
"enabled": true,
|
|
27
27
|
"decay": 0.5,
|
|
@@ -34,45 +34,44 @@
|
|
|
34
34
|
"_comment": "Reduces round-trips by encouraging multi-tool emission in one turn."
|
|
35
35
|
},
|
|
36
36
|
"concurrency": {
|
|
37
|
-
"max_parallel_requests":
|
|
38
|
-
"_comment": "
|
|
37
|
+
"max_parallel_requests": 1,
|
|
38
|
+
"_comment": "Strata runs ONE rail with a 131072-cell pool (its predecessor ran two rails over 229376). One admitted hot session at the 114688 cap is all the pool can hold, so slots, proxy concurrency and session admission all drop to 1 together — exactly the move-together rule the 2-rail comment below codified, in the opposite direction. scripts/sync-local-agent-configs.sh installs the matching PROXY_CONCURRENCY_LIMIT=1, UAP_MODEL_SLOTS=1, PROXY_SESSION_ADMISSION_LIMIT=1. Cost: a mission-deliver run now queues behind opencode instead of overlapping; that is the accepted trade for the 114688 single-session window. NOTE the live proxy env is the authority until that script is run — a profile of 1 against a proxy still admitting 2 overcommits the 131072 pool.",
|
|
39
39
|
"kv_capacity_shared": true,
|
|
40
|
-
"_kv_shared_comment": "
|
|
40
|
+
"_kv_shared_comment": "One rail, one pool: trivially shared, and still true that a rail addresses the WHOLE pool rather than owning a slice. Kept true so consumers that branch on it keep treating the pool as a shared resource."
|
|
41
41
|
},
|
|
42
42
|
"server_optimization": {
|
|
43
|
-
"kv_dtype": "
|
|
44
|
-
"_kv_dtype_comment": "
|
|
43
|
+
"kv_dtype": "int8",
|
|
44
|
+
"_kv_dtype_comment": "Fixed-tier int8 KV (8 bpv) with --kv-resident 32768, NOT the old VBR dynamic degrade — there is no floor to pin at, and the kv-at-floor finding no longer applies. Strata manages pool pressure itself (conversation cache eviction); the profile's job is only to keep the per-session cap below the pool.",
|
|
45
45
|
"prefill_chunk": 1024,
|
|
46
|
-
"max_context":
|
|
47
|
-
"kv_capacity":
|
|
48
|
-
"_capacity_comment": "
|
|
49
|
-
"parallel_rails":
|
|
46
|
+
"max_context": 131072,
|
|
47
|
+
"kv_capacity": 131072,
|
|
48
|
+
"_capacity_comment": "Whole pool, one rail. Per-session allowance is context_window above (114688, deliberately under the pool).",
|
|
49
|
+
"parallel_rails": 1,
|
|
50
50
|
"speculative_decoding": {
|
|
51
51
|
"enabled": true,
|
|
52
|
-
"type": "
|
|
53
|
-
"draft_model": "
|
|
52
|
+
"type": "mtp",
|
|
53
|
+
"draft_model": "strata-data/mtp/rt (MTP head, not a separate draft model)",
|
|
54
54
|
"draft_max": 4,
|
|
55
|
-
"
|
|
56
|
-
"_comment": "
|
|
55
|
+
"draft_min_p": 0.5,
|
|
56
|
+
"_comment": "Strata's native MTP speculative path (--spec 4 --spec-min-p 0.5, mtp_max 4, plus a lookup-3 secondary). Replaces the DFlash2 draft model of the llama.cpp era: observed 2026-10-04 at 84-89% acceptance on agent workloads (vs 62% on one 311-token outlier), which is what carries decode to the observed 46-52 tok/s."
|
|
57
57
|
},
|
|
58
|
-
"_comment": "These are the flags
|
|
59
|
-
"_budget_tier_comment": "Budget arithmetic worth knowing: 5120 MiB / 229376 cells = 22.86 KiB/token, which is EXACTLY the t4 floor (4.125 bpv). The budget was sized so the full pool fits only at the WORST quality tier; at the t8 entry tier it covers roughly 107k tokens. Consequence of --kv-unified that did not exist at one rail: KV precision is now COUPLED ACROSS SESSIONS. A lone agent at 60k sits at t8; add a second agent at 60k and both degrade toward t4."
|
|
58
|
+
"_comment": "These are the flags run-iq3_xxs.sh actually runs strata with, recorded so a rebuild reproduces the measured behaviour. The load-bearing pair (kv int8, max-context 131072) is pinned in config/capacity-policy.json under the strata-server http entry, where `uap doctor` verifies them against /metrics."
|
|
60
59
|
},
|
|
61
60
|
"measured": {
|
|
62
|
-
"date": "2026-
|
|
61
|
+
"date": "2026-10-04",
|
|
63
62
|
"gpu": "NVIDIA GeForce RTX 3090, 24576 MiB",
|
|
64
|
-
"_gpu_comment": "
|
|
65
|
-
"decode_tokens_per_second":
|
|
66
|
-
"_decode_comment": "CODE GENERATION
|
|
67
|
-
"draft_acceptance": 0.
|
|
68
|
-
"_draft_acceptance_comment": "
|
|
69
|
-
"prefill_tokens_per_second":
|
|
70
|
-
"_prefill_comment": "
|
|
63
|
+
"_gpu_comment": "Strata's own reserve-aware /metrics reported ~950 MiB free under live load (--vram-reserve-mib 1200 already held out; arena 40925 MiB across host+device, expert cache ~14.5 GiB). Host-wide free via nvidia-smi is the doctor's number; engine.vram_free_mib is strata's view, and both are checked now.",
|
|
64
|
+
"decode_tokens_per_second": 47,
|
|
65
|
+
"_decode_comment": "CODE GENERATION on real agent traffic, observed 2026-10-04 over the live session: 41.5-51.6 tok/s at 19-20k prompt depth, 36.6 at 38.6k depth, 43.2-47.4 in the 11-12k range, one 45.9 sustained across a 7071-token generation. Depth matters as much as workload: 47 here is a mid-depth code-workload number, not a constant. Do not quote a decode number without saying which workload and what depth.",
|
|
66
|
+
"draft_acceptance": 0.84,
|
|
67
|
+
"_draft_acceptance_comment": "Agent-tool workloads observed 2026-10-04: 84-89% per request (80/93, 66/77, 91/110, 4535/5427 tokens) with one 62% outlier on a 311-token short generation. The prior engine's counting-prompt 0.90 remained dishonest; this figure is from real agent traffic only.",
|
|
68
|
+
"prefill_tokens_per_second": 950,
|
|
69
|
+
"_prefill_comment": "Observed 2026-10-04 on live traffic: 900-1025 tok/s reading 3.7-11.6k unique tokens per turn (with 15.5k+ reused from the conversation cache at 95-99% reuse). Strata reports read-rate only on non-reused tokens, same convention as the old profile.",
|
|
71
70
|
"concurrent_2_rail_throughput": null,
|
|
72
|
-
"_concurrency_comment": "
|
|
71
|
+
"_concurrency_comment": "Moot at one rail: there is no second rail to measure. Kept null so no concurrent-throughput claim survives from the 2-rail era."
|
|
73
72
|
},
|
|
74
73
|
"routing": {
|
|
75
74
|
"endpoint": "http://127.0.0.1:4000/v1",
|
|
76
|
-
"_comment": "Route through the anthropic-proxy, NOT the
|
|
75
|
+
"_comment": "Route through the anthropic-proxy, NOT the strata port directly — the proxy applies the tool/finalize guardrails and, via this profile, the per-session context window that clients size their history to. Clients select this profile with the header 'x-uap-model-profile: qwen38' (or a uap_model_profile body param)."
|
|
77
76
|
}
|
|
78
77
|
}
|