mixdog 0.9.35 → 0.9.37
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 +3 -2
- package/scripts/abort-recovery-test.mjs +118 -0
- package/scripts/compact-smoke.mjs +7 -7
- package/scripts/explore-bench-tmp.mjs +19 -0
- package/scripts/explore-bench.mjs +36 -6
- package/scripts/explore-prompt-policy-test.mjs +27 -0
- package/scripts/ingest-pure-conversation-smoke.mjs +11 -11
- package/scripts/openai-ws-early-settle-test.mjs +176 -0
- package/scripts/output-style-smoke.mjs +17 -17
- package/scripts/provider-toolcall-test.mjs +333 -14
- package/scripts/recall-bench-cases.json +3 -3
- package/scripts/recall-bench.mjs +1 -1
- package/scripts/recall-quality-cases.json +4 -4
- package/scripts/recall-usecase-cases.json +2 -2
- package/scripts/session-bench.mjs +13 -13
- package/scripts/steering-drain-buckets-test.mjs +72 -11
- package/scripts/submit-commandbusy-race-test.mjs +114 -0
- package/scripts/tool-smoke.mjs +83 -10
- package/src/app.mjs +2 -1
- package/src/defaults/cycle3-review-prompt.md +9 -0
- package/src/defaults/skills/setup/SKILL.md +93 -293
- package/src/lib/rules-builder.cjs +3 -2
- package/src/output-styles/default.md +2 -2
- package/src/output-styles/extreme-minimal.md +1 -1
- package/src/output-styles/minimal.md +1 -1
- package/src/output-styles/simple.md +2 -3
- package/src/rules/agent/30-explorer.md +15 -7
- package/src/rules/lead/01-general.md +4 -0
- package/src/runtime/agent/orchestrator/agent-trace-format.mjs +15 -3
- package/src/runtime/agent/orchestrator/config.mjs +1 -1
- package/src/runtime/agent/orchestrator/mcp/client.mjs +7 -7
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +6 -6
- package/src/runtime/agent/orchestrator/providers/anthropic.mjs +6 -6
- package/src/runtime/agent/orchestrator/providers/oauth-credential-probes.mjs +35 -5
- package/src/runtime/agent/orchestrator/providers/openai-compat-stream.mjs +27 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-wire.mjs +36 -37
- package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +2 -2
- package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +72 -1
- package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +26 -3
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +12 -28
- package/src/runtime/agent/orchestrator/providers/openai-transport-policy.mjs +18 -15
- package/src/runtime/agent/orchestrator/providers/openai-ws-delta.mjs +4 -2
- package/src/runtime/agent/orchestrator/providers/openai-ws-stream.mjs +113 -2
- package/src/runtime/agent/orchestrator/providers/registry.mjs +44 -5
- package/src/runtime/agent/orchestrator/providers/tool-stream-state.mjs +78 -0
- package/src/runtime/agent/orchestrator/session/agent-loop.mjs +57 -31
- package/src/runtime/agent/orchestrator/session/cache/scoped-cache.mjs +8 -6
- package/src/runtime/agent/orchestrator/session/eager-dispatch.mjs +28 -2
- package/src/runtime/agent/orchestrator/session/loop/tool-classify.mjs +1 -3
- package/src/runtime/agent/orchestrator/session/loop/tool-helpers.mjs +15 -2
- package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +26 -17
- package/src/runtime/agent/orchestrator/session/manager/prompt-utils.mjs +2 -2
- package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +24 -16
- package/src/runtime/agent/orchestrator/session/result-classification.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/tool-batch.mjs +5 -2
- package/src/runtime/agent/orchestrator/stall-policy.mjs +18 -0
- package/src/runtime/agent/orchestrator/tools/builtin/bash-tool.mjs +35 -20
- package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +7 -7
- package/src/runtime/agent/orchestrator/tools/builtin/list-tool.mjs +77 -31
- package/src/runtime/agent/orchestrator/tools/builtin/read-tool.mjs +25 -3
- package/src/runtime/agent/orchestrator/tools/builtin/search-builders.mjs +9 -2
- package/src/runtime/agent/orchestrator/tools/builtin/search-tool.mjs +73 -25
- package/src/runtime/agent/orchestrator/tools/builtin.mjs +2 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/build.mjs +17 -7
- package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +14 -12
- package/src/runtime/agent/orchestrator/tools/code-graph/graph-model.mjs +5 -0
- package/src/runtime/agent/orchestrator/tools/code-graph/search.mjs +56 -6
- package/src/runtime/agent/orchestrator/tools/shell-command.mjs +9 -0
- package/src/runtime/channels/lib/worker-main.mjs +5 -0
- package/src/runtime/memory/lib/core-memory-store.mjs +104 -0
- package/src/runtime/memory/lib/ko-morph.mjs +1 -1
- package/src/runtime/memory/lib/memory-cycle3.mjs +64 -4
- package/src/runtime/memory/lib/memory-text-utils.mjs +4 -4
- package/src/runtime/memory/lib/recall-format.mjs +3 -3
- package/src/runtime/shared/child-spawn-gate.mjs +15 -0
- package/src/runtime/shared/config.mjs +98 -12
- package/src/runtime/shared/process-listener-headroom.mjs +12 -0
- package/src/session-runtime/cwd-plugins.mjs +6 -3
- package/src/session-runtime/model-route-api.mjs +50 -2
- package/src/session-runtime/provider-auth-api.mjs +8 -1
- package/src/session-runtime/resource-api.mjs +22 -0
- package/src/session-runtime/runtime-core.mjs +13 -2
- package/src/session-runtime/settings-api.mjs +11 -2
- package/src/standalone/agent-tool.mjs +15 -9
- package/src/standalone/explore-tool.mjs +4 -1
- package/src/tui/App.jsx +6 -5
- package/src/tui/app/transcript-window.mjs +60 -10
- package/src/tui/app/use-transcript-window.mjs +2 -1
- package/src/tui/components/ContextPanel.jsx +4 -1
- package/src/tui/components/ToolExecution.jsx +15 -12
- package/src/tui/components/TranscriptItem.jsx +1 -1
- package/src/tui/components/tool-execution/surface-detail.mjs +8 -8
- package/src/tui/dist/index.mjs +473 -155
- package/src/tui/engine/agent-job-feed.mjs +26 -6
- package/src/tui/engine/context-state.mjs +13 -4
- package/src/tui/engine/notification-plan.mjs +3 -3
- package/src/tui/engine/render-timing.mjs +104 -8
- package/src/tui/engine/session-api.mjs +58 -3
- package/src/tui/engine/session-flow.mjs +78 -28
- package/src/tui/engine/tool-card-results.mjs +28 -13
- package/src/tui/engine/turn.mjs +232 -156
- package/src/tui/engine.mjs +17 -8
- package/src/tui/index.jsx +10 -1
- package/src/workflows/default/WORKFLOW.md +8 -4
- package/src/workflows/solo/WORKFLOW.md +8 -4
package/src/tui/engine.mjs
CHANGED
|
@@ -109,14 +109,13 @@ const TOOL_APPROVAL_TIMEOUT_MS = (() => {
|
|
|
109
109
|
return Number.isFinite(value) && value > 0 ? Math.max(1000, Math.round(value)) : 120_000;
|
|
110
110
|
})();
|
|
111
111
|
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
// runTurn holding busy=true with no unwind,
|
|
115
|
-
// the UI is permanently input-dead. On trip we
|
|
116
|
-
// the SAME interrupt path Esc uses
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
// local experiments.
|
|
112
|
+
// Idle cap for a single lead TUI turn: the timer is reset by observable model,
|
|
113
|
+
// tool, usage, stage, compact, or steering progress. A provider call that stops
|
|
114
|
+
// producing progress otherwise leaves runTurn holding busy=true with no unwind,
|
|
115
|
+
// so submit() only ever queues and the UI is permanently input-dead. On trip we
|
|
116
|
+
// abort through the SAME interrupt path Esc uses; if that does not unwind, a
|
|
117
|
+
// short grace path force-releases busy=false and drains the queue. Default is
|
|
118
|
+
// intentionally finite (5min). Env-overridable for long local experiments.
|
|
120
119
|
const LEAD_TURN_TIMEOUT_MS = (() => {
|
|
121
120
|
const value = Number(process.env.MIXDOG_LEAD_TURN_TIMEOUT_MS);
|
|
122
121
|
return Number.isFinite(value) && value > 0 ? Math.max(10_000, Math.round(value)) : 5 * 60_000;
|
|
@@ -269,8 +268,16 @@ export async function createEngineSession({
|
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
270
|
if (!changed) return false;
|
|
271
|
+
// Detect commandBusy releasing (true -> false). Submits that arrived while a
|
|
272
|
+
// session command was in flight were queued and drain bailed on commandBusy;
|
|
273
|
+
// re-kick drain here — one central point covers every command releaser
|
|
274
|
+
// (setModel/newSession/resume/clear/...) so queued prompts are never stranded.
|
|
275
|
+
const commandBusyReleased = state.commandBusy === true
|
|
276
|
+
&& Object.prototype.hasOwnProperty.call(patch, 'commandBusy')
|
|
277
|
+
&& patch.commandBusy === false;
|
|
272
278
|
state = { ...state, ...patch };
|
|
273
279
|
emit();
|
|
280
|
+
if (commandBusyReleased) queueMicrotask(() => { void bag.drain?.(); });
|
|
274
281
|
return true;
|
|
275
282
|
};
|
|
276
283
|
|
|
@@ -518,6 +525,7 @@ export async function createEngineSession({
|
|
|
518
525
|
flushDeferredExecutionPendingResumeKick,
|
|
519
526
|
scheduleExecutionPendingResumeKick,
|
|
520
527
|
updateAgentJobCard,
|
|
528
|
+
buildAgentJobCardPatch,
|
|
521
529
|
subscribeRuntimeNotifications,
|
|
522
530
|
} = createAgentJobFeed({
|
|
523
531
|
runtime,
|
|
@@ -556,6 +564,7 @@ export async function createEngineSession({
|
|
|
556
564
|
patchItem,
|
|
557
565
|
markToolCallDone,
|
|
558
566
|
updateAgentJobCard,
|
|
567
|
+
buildAgentJobCardPatch,
|
|
559
568
|
agentStatusState,
|
|
560
569
|
});
|
|
561
570
|
|
package/src/tui/index.jsx
CHANGED
|
@@ -13,6 +13,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
13
13
|
import { format } from 'node:util';
|
|
14
14
|
import { App } from './App.jsx';
|
|
15
15
|
import { createEngineSession } from './engine.mjs';
|
|
16
|
+
import { scheduleRenderFrameAck } from './engine/render-timing.mjs';
|
|
16
17
|
import { installProcessSignalCleanup } from '../runtime/shared/process-shutdown.mjs';
|
|
17
18
|
import { emitTerminalBackground, loadThemeSettingFromConfig, theme } from './theme.mjs';
|
|
18
19
|
import { POP_KITTY, DISABLE_MODIFY_OTHER_KEYS } from './keyboard-protocol.mjs';
|
|
@@ -139,7 +140,14 @@ function installTuiPerfProbe() {
|
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
function makeRenderProfiler() {
|
|
142
|
-
|
|
143
|
+
// Always resolve pending yieldToRenderer() acks on each painted frame so
|
|
144
|
+
// split transcript commits (preamble frame → tool-card frame) wait for a
|
|
145
|
+
// real render instead of a fixed timeout. Ink calls onRender before its
|
|
146
|
+
// renderInteractiveFrame/stdout write, so defer the ack one macrotask: the
|
|
147
|
+
// split continuation then resumes after the frame has been emitted, not while
|
|
148
|
+
// it can still coalesce with the same write. Profiling stays gated on PERF.
|
|
149
|
+
const ackRenderedFrame = () => { scheduleRenderFrameAck(); };
|
|
150
|
+
if (!PERF_ENABLED) return ackRenderedFrame;
|
|
143
151
|
let count = 0;
|
|
144
152
|
let sum = 0;
|
|
145
153
|
let max = 0;
|
|
@@ -147,6 +155,7 @@ function makeRenderProfiler() {
|
|
|
147
155
|
let maxGap = 0;
|
|
148
156
|
let lastFrameAt = 0;
|
|
149
157
|
return ({ renderTime } = {}) => {
|
|
158
|
+
ackRenderedFrame();
|
|
150
159
|
const now = performance.now();
|
|
151
160
|
const ms = Number(renderTime) || 0;
|
|
152
161
|
const gap = lastFrameAt ? now - lastFrameAt : 0;
|
|
@@ -7,9 +7,12 @@ agents: worker, heavy-worker, reviewer, debugger, maintainer
|
|
|
7
7
|
|
|
8
8
|
# Default Workflow
|
|
9
9
|
|
|
10
|
-
HARD APPROVAL GATE —
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
HARD APPROVAL GATE — investigation/planning may proceed only as read-only
|
|
11
|
+
exploration while consulting with the user. After user consultation produces a
|
|
12
|
+
conclusion and plan, execution is still forbidden until explicit go-ahead
|
|
13
|
+
("do it", "proceed", "go ahead"). Diagnosis agreement, problem-pointing, or plan
|
|
14
|
+
agreement is NOT execution approval. No changes, state mutations, or delegation
|
|
15
|
+
before explicit go-ahead.
|
|
13
16
|
|
|
14
17
|
Lead supervises/delegates/coordinates/judges/decides. After approval route by
|
|
15
18
|
complexity: Lead directly only one-step single-turn fixes plus coordination,
|
|
@@ -19,7 +22,8 @@ implementation verification; Debugger = very high complexity or root-cause
|
|
|
19
22
|
after a failed fix.
|
|
20
23
|
|
|
21
24
|
1. Plan — present a draft before ANY implementation; revise/re-present until
|
|
22
|
-
|
|
25
|
+
user consultation is complete and a conclusion/plan is agreed. Then wait for
|
|
26
|
+
explicit go-ahead before executing. If ambiguous, restate the plan and ask.
|
|
23
27
|
2. Delegate — maximize parallel distribution: split independent implementation
|
|
24
28
|
scopes to separate worker/heavy-worker agents, all spawned in the SAME turn.
|
|
25
29
|
Sequential steps only inside one inseparable complex scope, gated
|
|
@@ -7,12 +7,16 @@ agents:
|
|
|
7
7
|
|
|
8
8
|
# Solo Workflow
|
|
9
9
|
|
|
10
|
-
HARD APPROVAL GATE —
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
HARD APPROVAL GATE — investigation/planning may proceed only as read-only
|
|
11
|
+
exploration while consulting with the user. After user consultation produces a
|
|
12
|
+
conclusion and plan, execution is still forbidden until explicit go-ahead
|
|
13
|
+
("do it", "proceed", "go ahead"). Diagnosis agreement, problem-pointing, or plan
|
|
14
|
+
agreement is NOT execution approval. No changes or state mutations before
|
|
15
|
+
explicit go-ahead.
|
|
13
16
|
|
|
14
17
|
1. Plan — present a draft before ANY implementation; revise/re-present until
|
|
15
|
-
|
|
18
|
+
user consultation is complete and a conclusion/plan is agreed. Then wait for
|
|
19
|
+
explicit go-ahead before executing. If ambiguous, restate the plan and ask.
|
|
16
20
|
2. Execute — Lead does all work directly; delegation forbidden. Interim updates
|
|
17
21
|
are in-progress, never conclusions.
|
|
18
22
|
3. Verify — check and fix directly until clean or a blocker is reported.
|