mixdog 0.9.33 → 0.9.34
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/package.json +4 -2
- package/scripts/compact-trigger-migration-smoke.mjs +37 -31
- package/scripts/provider-toolcall-test.mjs +535 -36
- package/src/agents/heavy-worker/AGENT.md +3 -4
- package/src/agents/worker/AGENT.md +2 -3
- package/src/repl.mjs +9 -1
- package/src/rules/shared/01-tool.md +4 -2
- package/src/runtime/agent/orchestrator/providers/codex-client-meta.mjs +22 -0
- package/src/runtime/agent/orchestrator/providers/gemini-cache.mjs +21 -2
- package/src/runtime/agent/orchestrator/providers/gemini.mjs +2 -1
- package/src/runtime/agent/orchestrator/providers/grok-oauth.mjs +15 -9
- package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +35 -4
- package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +130 -18
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +22 -12
- package/src/runtime/agent/orchestrator/providers/openai-transport-policy.mjs +131 -0
- package/src/runtime/agent/orchestrator/providers/openai-ws-delta.mjs +102 -26
- package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +194 -9
- package/src/runtime/agent/orchestrator/providers/openai-ws-stream.mjs +13 -2
- package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +18 -1
- package/src/runtime/agent/orchestrator/session/compact/constants.mjs +3 -0
- package/src/runtime/agent/orchestrator/session/compact.mjs +3 -0
- package/src/runtime/agent/orchestrator/session/context-utils.mjs +39 -6
- package/src/runtime/agent/orchestrator/session/loop/compact-policy.mjs +15 -23
- package/src/runtime/agent/orchestrator/session/loop/context-overflow.mjs +28 -0
- package/src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs +5 -0
- package/src/runtime/agent/orchestrator/session/loop/tool-classify.mjs +25 -0
- package/src/runtime/agent/orchestrator/session/manager/context-meta.mjs +16 -8
- package/src/runtime/agent/orchestrator/session/pre-send-compact.mjs +50 -4
- package/src/runtime/agent/orchestrator/session/tool-batch.mjs +53 -1
- package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +12 -2
- package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +270 -47
- package/src/runtime/agent/orchestrator/tools/patch-tool-defs.mjs +4 -2
- package/src/runtime/channels/lib/output-forwarder.mjs +7 -1
- package/src/runtime/channels/lib/owned-runtime.mjs +5 -2
- package/src/runtime/memory/lib/embedding-worker.mjs +18 -3
- package/src/runtime/memory/lib/memory-embed.mjs +89 -8
- package/src/session-runtime/context-status.mjs +7 -6
- package/src/session-runtime/runtime-core.mjs +0 -10
- package/src/tui/app/use-transcript-window.mjs +13 -1
- package/src/tui/components/StatusLine.jsx +5 -5
- package/src/tui/dist/index.mjs +5 -3
- package/src/ui/statusline.mjs +4 -10
- package/src/vendor/statusline/bin/statusline-route.mjs +4 -5
- package/src/vendor/statusline/src/gateway/route-meta.mjs +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mixdog",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.34",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Standalone mixdog coding-agent CLI/TUI workspace.",
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
"prepublishOnly": "node -e \"if(!process.env.CI){console.error('local npm publish is disabled — run the Release workflow: gh workflow run release -f bump=patch');process.exit(1)}\"",
|
|
38
38
|
"start": "node src/cli.mjs",
|
|
39
39
|
"smoke": "node scripts/smoke.mjs",
|
|
40
|
-
"smoke:all": "npm run smoke && npm run smoke:boot && npm run smoke:tools && npm run smoke:output && npm run smoke:tui && npm run smoke:freevars && npm run smoke:logguard",
|
|
40
|
+
"smoke:all": "npm run smoke && npm run smoke:boot && npm run smoke:tools && npm run smoke:patch && npm run smoke:output && npm run smoke:tui && npm run smoke:freevars && npm run smoke:logguard",
|
|
41
41
|
"smoke:boot": "node scripts/boot-smoke.mjs",
|
|
42
42
|
"smoke:compact": "node scripts/compact-smoke.mjs",
|
|
43
43
|
"smoke:loop": "node scripts/smoke-loop.mjs",
|
|
44
44
|
"smoke:loop:final": "node scripts/smoke-loop-report.mjs --require-complete --min-elapsed 5h --min-iterations 400 --max-gap 60s --max-smoke-ms 10000 --max-avg-smoke-ms 8500 --max-step-ms boot-smoke.mjs=8000 --max-step-ms tool-smoke.mjs=4000 --max-rss-mb 140 --max-rss-growth-mb 50",
|
|
45
45
|
"smoke:loop:report": "node scripts/smoke-loop-report.mjs",
|
|
46
46
|
"smoke:tools": "node scripts/tool-smoke.mjs",
|
|
47
|
+
"smoke:patch": "node scripts/apply-patch-edit-smoke.mjs",
|
|
47
48
|
"smoke:output": "node scripts/output-style-smoke.mjs",
|
|
48
49
|
"smoke:tui": "node scripts/tui-render-smoke.mjs",
|
|
49
50
|
"smoke:freevars": "node scripts/freevar-smoke.mjs",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"test:placeholder": "node --test scripts/compacted-placeholder-scrub-test.mjs",
|
|
53
54
|
"test:providers": "node --test scripts/provider-toolcall-test.mjs",
|
|
54
55
|
"test:atomiclock": "node --test scripts/atomic-lock-tryonce-test.mjs",
|
|
56
|
+
"test:rebindtail": "node --test scripts/forwarder-rebind-tail-test.mjs",
|
|
55
57
|
"failures": "node scripts/tool-failures.mjs",
|
|
56
58
|
"trace:llm": "node scripts/llm-trace-summary.mjs",
|
|
57
59
|
"diag:sessions": "node scripts/session-diag.mjs",
|
|
@@ -55,52 +55,58 @@ function assert(condition, message) {
|
|
|
55
55
|
`sub-boundary explicit limit should be preserved, got ${meta.autoCompactTokenLimit}`);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
// 3) compactTriggerForSession
|
|
59
|
-
//
|
|
58
|
+
// 3) compactTriggerForSession: main/user (non-agent) recall-fasttrack compacts
|
|
59
|
+
// on the boundary itself (100%, no early-trigger buffer); a truly-explicit
|
|
60
|
+
// sub-boundary autoCompactTokenLimit still wins. Agent-owned semantic
|
|
61
|
+
// sessions keep the default 10% buffer (90%).
|
|
60
62
|
{
|
|
61
63
|
const boundary = 200000;
|
|
62
64
|
const legacy = compactTriggerForSession({ autoCompactTokenLimit: boundary, compaction: {} }, boundary);
|
|
63
|
-
assert(legacy ===
|
|
65
|
+
assert(legacy === 200000, `main/user boundary-equal limit should yield 100% trigger 200000, got ${legacy}`);
|
|
64
66
|
const explicit = compactTriggerForSession({ autoCompactTokenLimit: 150000, compaction: {} }, boundary);
|
|
65
67
|
assert(explicit === 150000, `sub-boundary explicit limit should be the trigger, got ${explicit}`);
|
|
68
|
+
const agent = compactTriggerForSession({ owner: 'agent', autoCompactTokenLimit: boundary, compaction: {} }, boundary);
|
|
69
|
+
assert(agent === 180000, `agent boundary-equal limit should yield default 10% trigger 180000, got ${agent}`);
|
|
70
|
+
const agentExplicit = compactTriggerForSession({ owner: 'agent', autoCompactTokenLimit: 150000, compaction: {} }, boundary);
|
|
71
|
+
assert(agentExplicit === 150000, `agent sub-boundary explicit limit should be the trigger, got ${agentExplicit}`);
|
|
66
72
|
}
|
|
67
73
|
|
|
68
|
-
// 4) A configured bufferPercent flows into the trigger
|
|
74
|
+
// 4) A configured bufferPercent flows into the trigger for agent-owned sessions;
|
|
75
|
+
// main/user sessions ignore the buffer and stay on the boundary (100%).
|
|
69
76
|
{
|
|
70
77
|
const boundary = 200000;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
const agentTrigger = compactTriggerForSession({ owner: 'agent', compaction: { bufferPercent: 5 } }, boundary);
|
|
79
|
+
assert(agentTrigger === 190000, `agent bufferPercent 5 should yield trigger 190000, got ${agentTrigger}`);
|
|
80
|
+
const userTrigger = compactTriggerForSession({ compaction: { bufferPercent: 5 } }, boundary);
|
|
81
|
+
assert(userTrigger === 200000, `main/user should ignore bufferPercent and stay at 100% 200000, got ${userTrigger}`);
|
|
74
82
|
}
|
|
75
83
|
|
|
76
|
-
// 5) Legacy telemetry
|
|
77
|
-
//
|
|
78
|
-
//
|
|
84
|
+
// 5) Legacy/zero buffer telemetry migration is an agent-path concern (the
|
|
85
|
+
// default-buffer sanitizer). Agent-owned sessions reapply the current 10%
|
|
86
|
+
// default (trigger 180000); explicit bufferTokens still lowers the agent
|
|
87
|
+
// trigger. Main/user sessions ignore all of it and compact at 100%.
|
|
79
88
|
{
|
|
80
89
|
const boundary = 200000;
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
triggerTokens: 180000,
|
|
85
|
-
bufferTokens: 20000,
|
|
86
|
-
bufferRatio: 0.1,
|
|
87
|
-
},
|
|
90
|
+
const agentLegacy = compactTriggerForSession({
|
|
91
|
+
owner: 'agent',
|
|
92
|
+
compaction: { boundaryTokens: boundary, triggerTokens: 180000, bufferTokens: 20000, bufferRatio: 0.1 },
|
|
88
93
|
}, boundary);
|
|
89
|
-
assert(
|
|
90
|
-
`legacy default buffer telemetry should yield 10% headroom trigger 180000, got ${
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
triggerTokens: boundary,
|
|
95
|
-
bufferTokens: 0,
|
|
96
|
-
bufferRatio: 0,
|
|
97
|
-
},
|
|
94
|
+
assert(agentLegacy === 180000,
|
|
95
|
+
`agent legacy default buffer telemetry should yield 10% headroom trigger 180000, got ${agentLegacy}`);
|
|
96
|
+
const agentZero = compactTriggerForSession({
|
|
97
|
+
owner: 'agent',
|
|
98
|
+
compaction: { boundaryTokens: boundary, triggerTokens: boundary, bufferTokens: 0, bufferRatio: 0 },
|
|
98
99
|
}, boundary);
|
|
99
|
-
assert(
|
|
100
|
-
`persisted zero-buffer telemetry should restore default 10% trigger 180000, got ${
|
|
101
|
-
const
|
|
102
|
-
assert(
|
|
103
|
-
`explicit bufferTokens should
|
|
100
|
+
assert(agentZero === 180000,
|
|
101
|
+
`agent persisted zero-buffer telemetry should restore default 10% trigger 180000, got ${agentZero}`);
|
|
102
|
+
const agentExplicitTokens = compactTriggerForSession({ owner: 'agent', compaction: { bufferTokens: 10000 } }, boundary);
|
|
103
|
+
assert(agentExplicitTokens === 190000,
|
|
104
|
+
`agent explicit bufferTokens should lower trigger to 190000, got ${agentExplicitTokens}`);
|
|
105
|
+
const userTelemetry = compactTriggerForSession({
|
|
106
|
+
compaction: { boundaryTokens: boundary, triggerTokens: 180000, bufferTokens: 20000, bufferRatio: 0.1 },
|
|
107
|
+
}, boundary);
|
|
108
|
+
assert(userTelemetry === 200000,
|
|
109
|
+
`main/user should ignore buffer telemetry and stay at 100% 200000, got ${userTelemetry}`);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
// 6) preserveBufferConfigFields copies only finite-positive percent/ratio fields.
|