mixdog 0.9.44 → 0.9.46

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.
Files changed (117) hide show
  1. package/package.json +5 -2
  2. package/scripts/agent-dispatch-abort-compose-test.mjs +31 -0
  3. package/scripts/agent-model-liveness-test.mjs +618 -0
  4. package/scripts/agent-trace-io-test.mjs +68 -4
  5. package/scripts/bench-run.mjs +30 -3
  6. package/scripts/compact-pressure-test.mjs +187 -4
  7. package/scripts/compact-prior-context-flatten-test.mjs +252 -0
  8. package/scripts/compact-trigger-migration-smoke.mjs +8 -6
  9. package/scripts/compacted-placeholder-scrub-test.mjs +20 -34
  10. package/scripts/context-mcp-metering-test.mjs +75 -0
  11. package/scripts/explore-prompt-policy-test.mjs +15 -16
  12. package/scripts/explore-timeout-cancel-test.mjs +345 -0
  13. package/scripts/headless-pristine-execution-test.mjs +614 -0
  14. package/scripts/internal-comms-smoke.mjs +15 -6
  15. package/scripts/live-worker-smoke.mjs +1 -1
  16. package/scripts/memory-core-input-test.mjs +137 -0
  17. package/scripts/memory-rule-contract-test.mjs +5 -5
  18. package/scripts/openai-oauth-refresh-race-test.mjs +120 -0
  19. package/scripts/openai-oauth-ws-1006-retry-test.mjs +26 -0
  20. package/scripts/parent-abort-link-test.mjs +22 -0
  21. package/scripts/provider-toolcall-test.mjs +22 -0
  22. package/scripts/reactive-compact-persist-smoke.mjs +8 -4
  23. package/scripts/session-bench.mjs +3 -70
  24. package/scripts/task-bench.mjs +0 -2
  25. package/scripts/terminal-bench-isolation-guards-test.mjs +102 -0
  26. package/scripts/tool-smoke.mjs +21 -21
  27. package/scripts/tool-tui-presentation-test.mjs +68 -0
  28. package/scripts/tui-transcript-jitter-harness-entry.jsx +91 -10
  29. package/src/app.mjs +28 -103
  30. package/src/cli.mjs +17 -13
  31. package/src/headless-command.mjs +139 -0
  32. package/src/headless-role.mjs +121 -10
  33. package/src/help.mjs +4 -1
  34. package/src/rules/agent/00-common.md +3 -3
  35. package/src/rules/agent/00-core.md +8 -9
  36. package/src/rules/agent/20-skip-protocol.md +2 -3
  37. package/src/rules/agent/30-explorer.md +50 -56
  38. package/src/rules/agent/40-cycle1-agent.md +10 -12
  39. package/src/rules/agent/41-cycle2-agent.md +12 -9
  40. package/src/rules/agent/42-cycle3-agent.md +4 -6
  41. package/src/rules/lead/01-general.md +5 -6
  42. package/src/rules/lead/02-channels.md +1 -1
  43. package/src/rules/lead/lead-brief.md +14 -17
  44. package/src/rules/lead/lead-tool.md +3 -3
  45. package/src/rules/shared/01-tool.md +41 -43
  46. package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +46 -10
  47. package/src/runtime/agent/orchestrator/agent-runtime/agent-progress-watchdog.mjs +44 -31
  48. package/src/runtime/agent/orchestrator/agent-trace-io.mjs +18 -3
  49. package/src/runtime/agent/orchestrator/config.mjs +96 -30
  50. package/src/runtime/agent/orchestrator/context/collect.mjs +9 -0
  51. package/src/runtime/agent/orchestrator/providers/anthropic-oauth-credentials.mjs +3 -0
  52. package/src/runtime/agent/orchestrator/providers/anthropic-sse.mjs +18 -5
  53. package/src/runtime/agent/orchestrator/providers/anthropic.mjs +6 -6
  54. package/src/runtime/agent/orchestrator/providers/gemini.mjs +6 -6
  55. package/src/runtime/agent/orchestrator/providers/grok-oauth.mjs +123 -3
  56. package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +12 -3
  57. package/src/runtime/agent/orchestrator/providers/openai-compat-stream.mjs +148 -30
  58. package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +5 -7
  59. package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +62 -14
  60. package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +141 -19
  61. package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +12 -4
  62. package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +19 -1
  63. package/src/runtime/agent/orchestrator/providers/openai-ws-stream.mjs +85 -17
  64. package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +6 -8
  65. package/src/runtime/agent/orchestrator/providers/registry.mjs +47 -17
  66. package/src/runtime/agent/orchestrator/session/compact/summary.mjs +159 -20
  67. package/src/runtime/agent/orchestrator/session/context-utils.mjs +83 -10
  68. package/src/runtime/agent/orchestrator/session/loop/compact-policy.mjs +75 -7
  69. package/src/runtime/agent/orchestrator/session/loop/steering-ladder.mjs +4 -374
  70. package/src/runtime/agent/orchestrator/session/loop/stored-tool-args.mjs +0 -75
  71. package/src/runtime/agent/orchestrator/session/loop/transcript-repair.mjs +0 -5
  72. package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +20 -3
  73. package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +32 -16
  74. package/src/runtime/agent/orchestrator/session/manager/context-meta.mjs +5 -2
  75. package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +86 -15
  76. package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +30 -27
  77. package/src/runtime/agent/orchestrator/session/tool-batch.mjs +1 -14
  78. package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +21 -27
  79. package/src/runtime/agent/orchestrator/tools/builtin/search-tool.mjs +1 -3
  80. package/src/runtime/agent/orchestrator/tools/builtin.mjs +1 -51
  81. package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +4 -4
  82. package/src/runtime/agent/orchestrator/tools/patch/orchestrator.mjs +1 -1
  83. package/src/runtime/agent/orchestrator/tools/patch-manifest.json +26 -0
  84. package/src/runtime/memory/index.mjs +0 -1
  85. package/src/runtime/memory/lib/core-memory-store.mjs +44 -24
  86. package/src/runtime/memory/lib/http-router.mjs +0 -193
  87. package/src/runtime/memory/lib/memory-action-handlers.mjs +37 -11
  88. package/src/runtime/memory/tool-defs.mjs +5 -6
  89. package/src/runtime/shared/config.mjs +11 -34
  90. package/src/runtime/shared/pristine-execution-contract.json +75 -0
  91. package/src/runtime/shared/pristine-execution.mjs +356 -0
  92. package/src/runtime/shared/provider-api-key.mjs +43 -0
  93. package/src/runtime/shared/provider-auth-binding.mjs +21 -0
  94. package/src/runtime/shared/update-checker.mjs +40 -10
  95. package/src/session-runtime/context-status.mjs +61 -13
  96. package/src/session-runtime/mcp-glue.mjs +29 -2
  97. package/src/session-runtime/plugin-mcp.mjs +7 -0
  98. package/src/session-runtime/resource-api.mjs +38 -5
  99. package/src/session-runtime/runtime-core.mjs +5 -1
  100. package/src/session-runtime/session-turn-api.mjs +14 -2
  101. package/src/session-runtime/settings-api.mjs +5 -0
  102. package/src/session-runtime/tool-catalog.mjs +13 -2
  103. package/src/session-runtime/tool-defs.mjs +1 -3
  104. package/src/standalone/agent-task-status.mjs +50 -11
  105. package/src/standalone/agent-tool/tool-def.mjs +1 -1
  106. package/src/standalone/explore-tool.mjs +257 -49
  107. package/src/standalone/seeds.mjs +1 -0
  108. package/src/tui/App.jsx +26 -16
  109. package/src/tui/app/use-transcript-scroll.mjs +4 -3
  110. package/src/tui/app/use-transcript-window.mjs +12 -21
  111. package/src/tui/components/ContextPanel.jsx +19 -25
  112. package/src/tui/dist/index.mjs +89 -78
  113. package/src/tui/engine/agent-envelope.mjs +16 -5
  114. package/src/tui/engine/labels.mjs +1 -1
  115. package/src/workflows/default/WORKFLOW.md +21 -51
  116. package/src/workflows/solo/WORKFLOW.md +12 -17
  117. package/src/workflows/solo-review/WORKFLOW.md +0 -47
@@ -7,57 +7,27 @@ agents: worker, heavy-worker, reviewer, debugger, maintainer
7
7
 
8
8
  # Default
9
9
 
10
- GATE: Before approval, only read-only investigation/planning while consulting.
11
- Approval is a later explicit user message after the latest plan ("do it",
12
- "proceed", "go ahead"). Initial/additional/changed requests reset planning;
13
- approval with a scope change needs a revised plan and fresh approval. Before
14
- approval: no edits, state mutation, or delegation.
10
+ Lead is the orchestrator: consult the user and build the plan together.
11
+ Before the user explicitly approves the latest plan, work is read-only
12
+ investigation and planning — no edits, no state mutation, no delegation.
13
+ A new or changed request resets planning; a scope change requires fresh
14
+ approval.
15
15
 
16
- Lead owns three duties, in order: plan set the direction of the work from its own
17
- understanding of the task; delegate hand execution to the matching agent; verify —
18
- judge what comes back. Understanding is never delegated: without its own plan a Lead
19
- can neither brief nor judge. Lead-direct work is allowed only for pure read/analysis,
20
- git/configuration, or when the user explicitly supplies both the exact target and exact
21
- replacement/output. Never infer an exemption from a task name, file count, or
22
- perceived difficulty. Every other implementation, reverse engineering, debugging
23
- application, or artifact generation delegates to the matching agent. Debugger is an
24
- escalation role reserved for explicitly requested debugging or a bug surviving 2+ fix
25
- cycles — not a default owner of analysis or reverse engineering, which route to
26
- Worker/Heavy Worker like any implementation. Worker applies an established bounded
27
- change or fully specified artifact; Heavy Worker owns implementation that must establish
28
- the change through investigation or staged delivery. Applying a Debugger result is
29
- implementation, not diagnosis.
16
+ On approval, fan out at maximum width: one agent per independent scope, all
17
+ spawned in one turn; only a scope that depends on another's output waits.
30
18
 
31
- 1. Plan: draft before any implementation; settle scope/plan, ask if ambiguous,
32
- then await the gate.
33
- 2. Delegate: one agent per ready independent scope; spawn all ready scopes in
34
- one turn, with no count cap. Serialize only a real dependency, overlapping
35
- write, or inseparable coupling. Briefs follow the Lead brief contract.
36
- After async spawn, end the turn.
37
- 3. Review: triage by the work performed, never by the size, form, or destination
38
- of its result — a one-line answer can carry non-trivial work, and a
39
- conversational reply is not automatically exempt. Trivial work — a routine
40
- lookup answered directly, routine git/configuration confirmed by its own
41
- mechanical check, a change whose correctness is test/build/diff-obvious, or
42
- applying an exact target and replacement the user supplied — ships on shell
43
- self-verification alone, and only after that check actually ran and passed.
44
- Non-trivial work — multi-step reasoning, interpretation, investigation, or
45
- anything whose correctness is not verifiable at a glance — gets a Reviewer
46
- cross-check (one reviewer per scope, kept across the fix loop; all ready
47
- reviewers spawn in one turn) and Lead integration/cross-scope verification
48
- in parallel, whoever performed it, Lead solo included. Debugger analysis
49
- cannot substitute for implementation review: applying a Debugger result triggers
50
- the same Reviewer + Lead verification. Reviewer independently judges risk,
51
- intent, boundaries; Lead checks acceptance/interactions, not duplicate
52
- same-scope work. High-risk scopes add distinct lenses. Synthesize one
53
- verdict; send merged fixes to the original live session; loop fix ->
54
- re-verify (same Reviewer + Lead re-check) until clean. Debugger first for
55
- requested debugging or a bug surviving 2+ fix cycles. Agent reports relay
56
- scope, verdict, next work as in-progress, never conclusions.
57
- 4. Report: final (not interim) report compares work to approved plan and gives
58
- verified result; never forward raw agent output. Ask about ship/deploy when
59
- relevant. Build/deploy/commit/push require an explicit user request after
60
- issue-free feedback; implementation approval alone is insufficient.
19
+ Route by complexity: simple, well-understood implementation goes to Worker;
20
+ complex or investigative implementation goes to Heavy Worker; Lead itself
21
+ edits only a local, one-turn configuration/git change. Debugger only on a
22
+ defect needing deep root-cause analysis or a bug surviving 2+ review/fix
23
+ cycles.
61
24
 
62
- On outcome/direction change, pause and re-consult; otherwise continue approved
63
- work without reapproval.
25
+ Every implementation gets its own Reviewer, attached per scope only the
26
+ local Lead-direct edits above are exempt. Keep the same reviewer through the
27
+ fix loop and repeat fix -> re-verify until clean; Lead cross-verifies in
28
+ parallel with the Reviewer.
29
+
30
+ Report the verified result against the approved plan. Build, deploy, commit,
31
+ and push happen only on an explicit user request.
32
+
33
+ On direction change, pause and re-consult the user.
@@ -7,22 +7,17 @@ agents:
7
7
 
8
8
  # Solo
9
9
 
10
- GATE: Before approval, only read-only investigation/planning while consulting.
11
- Approval is a later explicit user message after the latest plan ("do it",
12
- "proceed", "go ahead"). Initial/additional/changed requests reset planning;
13
- approval with a scope change needs a revised plan and fresh approval. Before
14
- approval: no edits or state mutation.
10
+ Lead handles everything directly: consult the user and build the plan
11
+ together. Before the user explicitly approves the latest plan, work is
12
+ read-only investigation and planning — no edits, no state mutation. A new or
13
+ changed request resets planning; a scope change requires fresh approval.
15
14
 
16
- 1. Plan: draft before any implementation; settle scope/plan, ask if ambiguous,
17
- then await the gate.
18
- 2. Execute: after approval, Lead does all work. Never spawn, send, delegate, or
19
- ask agents to work. Complete execution/in-scope fixes without reapproval;
20
- interim updates are in-progress, never conclusions.
21
- 3. Verify: Lead checks/fixes directly until clean or reports a blocker.
22
- 4. Report: final (not interim) report compares work to approved plan and gives
23
- verification, remaining risk/next step. Build/deploy/commit/push require an
24
- explicit user request after issue-free feedback; implementation approval
25
- alone is insufficient.
15
+ On approval, Lead executes all work itself — never spawn, send, or delegate
16
+ to agents. Complete in-scope fixes without reapproval.
26
17
 
27
- On outcome/direction change, pause and re-consult; otherwise continue approved
28
- work without reapproval.
18
+ Verify directly: check and fix until clean, or report the blocker.
19
+
20
+ Report the verified result against the approved plan. Build, deploy, commit,
21
+ and push happen only on an explicit user request.
22
+
23
+ On direction change, pause and re-consult the user.
@@ -1,47 +0,0 @@
1
- ---
2
- id: solo-review
3
- name: Solo Review
4
- description: "Lead implements directly; eligible low-risk single scopes receive one independent Reviewer."
5
- agents: reviewer
6
- ---
7
-
8
- # Solo Review
9
-
10
- GATE: Before approval, only read-only investigation/planning while consulting.
11
- Approval is a later explicit user message after the latest plan ("do it",
12
- "proceed", "go ahead"). Initial/additional/changed requests reset planning;
13
- approval with a scope change needs a revised plan and fresh approval. Before
14
- approval: no edits, state mutation, or delegation.
15
-
16
- 1. Plan: before implementation, Lead classifies the scope as eligible
17
- low-risk/single-scope or ineligible high-risk/multi-scope, drafts the plan,
18
- settles scope, asks if ambiguous, then awaits the gate. Ineligible work must
19
- switch to Default workflow with a revised Default plan and fresh approval
20
- before implementation. After that switch, Solo Review constraints are
21
- suspended: Default reviewer-per-scope fan-out and high-risk lenses override
22
- Solo Review's single-Reviewer and concurrency limits.
23
- 2. Execute: after approval, Lead performs all implementation and verification
24
- directly. Never delegate implementation, investigation, debugging, or
25
- maintenance to implementation helper roles (Worker, Heavy Worker, Explorer,
26
- Debugger, or Maintainer). Complete in-scope fixes without reapproval; interim
27
- updates are in-progress, never conclusions.
28
- 3. Review: only an eligible low-risk, single-scope final deliverable, once
29
- implemented and Lead-verified, receives exactly one Reviewer to critically
30
- and independently evaluate the approved intent, complete deliverable,
31
- affected boundaries, and verification. Lead evaluates the findings, applies
32
- every necessary fix directly, and re-verifies. Send the revised deliverable
33
- back to that same live Reviewer for every re-check. If that session is
34
- unavailable, one cold replacement Reviewer may re-review the original intent,
35
- current deliverable, and verification evidence; never run replacement or
36
- additional Reviewers concurrently. Repeat fix -> Lead verification -> Reviewer
37
- re-check until issue-free or blocked.
38
- 4. Report: only after the review loop is clean, the final (not interim) report
39
- compares the result to the approved plan and gives verification and material
40
- remaining risk/next step; never forward raw Reviewer output. Ask about
41
- ship/deploy when relevant. Verification builds/tests needed to evaluate the
42
- deliverable are permitted during execution and review. Release builds,
43
- deploy/commit/push require an explicit user request after issue-free feedback;
44
- implementation approval alone is insufficient.
45
-
46
- On outcome/direction change, pause and re-consult; otherwise continue approved
47
- work without reapproval.