mixdog 0.9.4 → 0.9.6
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/README.md +112 -38
- package/package.json +4 -1
- package/scripts/bench/r5-orchestrated-task.json +7 -0
- package/scripts/bench/round-r13-clientmeta.json +464 -0
- package/scripts/bench/round-r14-betafeatures.json +466 -0
- package/scripts/bench/round-r15-fulldefault.json +462 -0
- package/scripts/bench/round-r16-sessionid.json +466 -0
- package/scripts/bench/round-r17-wirebytes.json +456 -0
- package/scripts/bench/round-r18-prewarm.json +468 -0
- package/scripts/bench/round-r19-clean.json +472 -0
- package/scripts/bench/round-r20-prewarm-clean.json +475 -0
- package/scripts/bench/round-r21-delta-retry.json +473 -0
- package/scripts/bench/round-r22-full-probe.json +693 -0
- package/scripts/bench/round-r23-itemprobe.json +701 -0
- package/scripts/bench/round-r24-shapefix.json +677 -0
- package/scripts/bench/round-r25-serial.json +464 -0
- package/scripts/bench/round-r26-parallel3.json +671 -0
- package/scripts/bench/round-r27-parallel10.json +894 -0
- package/scripts/bench/round-r28-parallel10-stagger.json +882 -0
- package/scripts/bench/round-r29-parallel10-stagger166.json +886 -0
- package/scripts/bench/round-r30-instid.json +253 -0
- package/scripts/bench/round-r31-upgradeprobe.json +256 -0
- package/scripts/bench/round-r32-vs-codex-lead.json +254 -0
- package/scripts/bench/round-r33-vs-codex-codex.json +115 -0
- package/scripts/bench/round-r34-orchestrated.json +120 -0
- package/scripts/bench/round-r35-orchestrated-codex.json +61 -0
- package/scripts/bench/round-r36-orchestrated-capped.json +128 -0
- package/scripts/bench-run.mjs +40 -7
- package/scripts/internal-comms-bench.mjs +2 -4
- package/scripts/model-catalog-audit.mjs +209 -0
- package/scripts/model-list-sanitize-test.mjs +37 -0
- package/scripts/recall-bench.mjs +76 -13
- package/scripts/recall-quality-cases.json +12 -0
- package/scripts/tool-smoke.mjs +2 -2
- package/src/agents/heavy-worker/AGENT.md +7 -7
- package/src/agents/scheduler-task/AGENT.md +2 -3
- package/src/agents/webhook-handler/AGENT.md +2 -3
- package/src/agents/worker/AGENT.md +9 -10
- package/src/app.mjs +12 -1
- package/src/headless-role.mjs +7 -1
- package/src/mixdog-session-runtime.mjs +15 -14
- package/src/output-styles/default.md +14 -18
- package/src/output-styles/minimal.md +4 -5
- package/src/output-styles/simple.md +7 -8
- package/src/rules/agent/00-common.md +6 -5
- package/src/rules/agent/30-explorer.md +16 -5
- package/src/rules/lead/01-general.md +5 -5
- package/src/rules/lead/lead-brief.md +6 -3
- package/src/rules/lead/lead-tool.md +6 -4
- package/src/rules/shared/01-tool.md +17 -21
- package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +8 -3
- package/src/runtime/agent/orchestrator/providers/model-catalog.mjs +19 -0
- package/src/runtime/agent/orchestrator/providers/model-list-sanitize.mjs +11 -3
- package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +9 -1
- package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +53 -9
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +23 -10
- package/src/runtime/agent/orchestrator/providers/openai-ws-delta.mjs +11 -9
- package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +33 -4
- package/src/runtime/agent/orchestrator/providers/provider-catalog-cache.mjs +80 -0
- package/src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs +93 -0
- package/src/runtime/agent/orchestrator/session/loop.mjs +27 -5
- package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +1 -1
- package/src/runtime/agent/orchestrator/stall-policy.mjs +20 -1
- package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +7 -7
- package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +1 -1
- package/src/runtime/channels/backends/discord-gateway.mjs +2 -2
- package/src/runtime/channels/backends/discord.mjs +15 -26
- package/src/runtime/channels/backends/telegram.mjs +8 -12
- package/src/runtime/channels/index.mjs +23 -43
- package/src/runtime/channels/lib/backend-dispatch.mjs +5 -3
- package/src/runtime/channels/lib/config.mjs +37 -149
- package/src/runtime/channels/lib/event-pipeline.mjs +4 -4
- package/src/runtime/channels/lib/event-queue.mjs +15 -9
- package/src/runtime/channels/lib/inbound-routing.mjs +2 -39
- package/src/runtime/channels/lib/interaction-workflows.mjs +5 -113
- package/src/runtime/channels/lib/scheduler.mjs +27 -113
- package/src/runtime/channels/lib/webhook/deliveries.mjs +3 -2
- package/src/runtime/channels/lib/webhook.mjs +8 -47
- package/src/runtime/memory/index.mjs +9 -0
- package/src/runtime/memory/lib/core-memory-store.mjs +5 -1
- package/src/runtime/memory/lib/ko-morph.mjs +195 -0
- package/src/runtime/memory/lib/memory-recall-store.mjs +47 -10
- package/src/runtime/memory/lib/memory-text-utils.mjs +46 -0
- package/src/runtime/memory/lib/query-handlers.mjs +27 -5
- package/src/runtime/memory/tool-defs.mjs +2 -2
- package/src/runtime/shared/config.mjs +14 -4
- package/src/runtime/shared/markdown-frontmatter.mjs +19 -0
- package/src/runtime/shared/schedules-store.mjs +13 -3
- package/src/runtime/shared/tool-execution-contract.mjs +2 -2
- package/src/session-runtime/config-helpers.mjs +45 -10
- package/src/session-runtime/quick-model-rows.mjs +46 -11
- package/src/session-runtime/quick-search-models.mjs +28 -27
- package/src/session-runtime/settings-api.mjs +34 -1
- package/src/session-runtime/tool-defs.mjs +1 -1
- package/src/session-runtime/workflow.mjs +1 -1
- package/src/standalone/agent-tool/tool-def.mjs +1 -1
- package/src/standalone/agent-tool.mjs +30 -0
- package/src/standalone/channel-admin.mjs +102 -90
- package/src/standalone/explore-tool.mjs +39 -10
- package/src/tui/App.jsx +131 -28
- package/src/tui/app/app-format.mjs +11 -4
- package/src/tui/app/channel-pickers.mjs +2 -4
- package/src/tui/app/maintenance-pickers.mjs +60 -28
- package/src/tui/app/model-options.mjs +5 -1
- package/src/tui/app/settings-picker.mjs +0 -1
- package/src/tui/app/transcript-window.mjs +8 -2
- package/src/tui/app/use-transcript-scroll.mjs +3 -1
- package/src/tui/app/use-transcript-window.mjs +19 -1
- package/src/tui/components/ConfirmBar.jsx +10 -7
- package/src/tui/components/Picker.jsx +32 -11
- package/src/tui/components/PromptInput.jsx +10 -1
- package/src/tui/components/StatusLine.jsx +6 -3
- package/src/tui/dist/index.mjs +441 -293
- package/src/tui/engine.mjs +48 -12
- package/src/tui/index.jsx +11 -52
- package/src/ui/statusline.mjs +10 -0
- package/src/workflows/default/WORKFLOW.md +15 -17
- package/src/workflows/sequential/WORKFLOW.md +15 -17
- package/vendor/ink/build/ink.js +9 -1
- package/scripts/recall-usecase-probe.json +0 -6
- package/src/runtime/channels/lib/holidays.mjs +0 -138
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Escape — back/cancel
|
|
14
14
|
* Ctrl+C — handled globally for selection copy
|
|
15
15
|
*/
|
|
16
|
-
import React, { useState, useCallback, useEffect } from 'react';
|
|
16
|
+
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
|
17
17
|
import { Box, Text, useInput } from 'ink';
|
|
18
18
|
import stringWidth from 'string-width';
|
|
19
19
|
import { theme } from '../theme.mjs';
|
|
@@ -109,6 +109,7 @@ export function Picker({
|
|
|
109
109
|
const hasConfirm = confirmButtons.length > 0;
|
|
110
110
|
// -1 = list focus; 0..n-1 = confirm-bar button focus.
|
|
111
111
|
const [confirmFocus, setConfirmFocus] = useState(-1);
|
|
112
|
+
const lastTabAtRef = useRef(0);
|
|
112
113
|
useEffect(() => {
|
|
113
114
|
// Reset to list focus whenever the bar identity/shape changes (step switch).
|
|
114
115
|
setConfirmFocus(-1);
|
|
@@ -161,10 +162,13 @@ export function Picker({
|
|
|
161
162
|
}, [onHighlight, items, selectedIndex]);
|
|
162
163
|
|
|
163
164
|
const activeFooter = typeof footer === 'function' ? footer(items[selectedIndex], selectedIndex) : footer;
|
|
164
|
-
const
|
|
165
|
+
const confirmInlineWidth = hasConfirm
|
|
166
|
+
? confirmButtons.reduce((sum, button, index) => sum + (index > 0 ? 1 : 0) + stringWidth(`[ ${button?.label || ''} ]`) + 2, 0)
|
|
167
|
+
: 0;
|
|
168
|
+
const footerLines = normalizeFooterLines(activeFooter, Math.max(0, columns - (hasConfirm ? confirmInlineWidth + 1 : 0)));
|
|
165
169
|
const footerGap = footerLines.length > 0 ? Math.max(0, Math.floor(Number(footerGapRows) || 0)) : 0;
|
|
166
170
|
const footerReserveRows = footerLines.length > 0 ? footerLines.length + footerGap : 0;
|
|
167
|
-
const confirmReserveRows = hasConfirm ? 2 : 0;
|
|
171
|
+
const confirmReserveRows = hasConfirm && footerLines.length === 0 ? 2 : 0;
|
|
168
172
|
const effectiveVisibleLimit = Math.max(1, visibleLimit - footerReserveRows - confirmReserveRows);
|
|
169
173
|
const helpText = help || (hasConfirm ? CONFIRM_HELP : (onLeft || onRight || onTab ? ADJUST_HELP : SELECT_HELP));
|
|
170
174
|
|
|
@@ -241,6 +245,9 @@ export function Picker({
|
|
|
241
245
|
return;
|
|
242
246
|
}
|
|
243
247
|
if (key.tab || input === '\t') {
|
|
248
|
+
const now = Date.now();
|
|
249
|
+
if (now - lastTabAtRef.current < 120) return;
|
|
250
|
+
lastTabAtRef.current = now;
|
|
244
251
|
if (hasConfirm) {
|
|
245
252
|
setConfirmFocus((f) => (f < 0 ? 0 : (f + 1 > confirmButtons.length - 1 ? -1 : f + 1)));
|
|
246
253
|
return;
|
|
@@ -387,17 +394,31 @@ export function Picker({
|
|
|
387
394
|
{footerLines.length > 0 ? (
|
|
388
395
|
<>
|
|
389
396
|
<Box flexGrow={1} />
|
|
390
|
-
{footerLines.map((line, index) =>
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
<
|
|
394
|
-
|
|
395
|
-
|
|
397
|
+
{footerLines.map((line, index) => {
|
|
398
|
+
const attachConfirm = hasConfirm && index === footerLines.length - 1;
|
|
399
|
+
return (
|
|
400
|
+
<Box
|
|
401
|
+
key={`footer-${index}`}
|
|
402
|
+
flexDirection="row"
|
|
403
|
+
width="100%"
|
|
404
|
+
justifyContent={attachConfirm ? 'space-between' : 'flex-start'}
|
|
405
|
+
alignItems="center"
|
|
406
|
+
>
|
|
407
|
+
<Text>
|
|
408
|
+
{line.glyph ? <Text color={line.color}>{line.glyph} </Text> : null}
|
|
409
|
+
<Text color={theme.text}>{line.text}</Text>
|
|
410
|
+
</Text>
|
|
411
|
+
{attachConfirm ? (
|
|
412
|
+
<ConfirmBar buttons={confirmButtons} focusedIndex={clampConfirmFocus(confirmFocus, confirmButtons.length)} />
|
|
413
|
+
) : null}
|
|
414
|
+
</Box>
|
|
415
|
+
);
|
|
416
|
+
})}
|
|
396
417
|
</>
|
|
397
418
|
) : null}
|
|
398
|
-
{hasConfirm ? (
|
|
419
|
+
{hasConfirm && footerLines.length === 0 ? (
|
|
399
420
|
<>
|
|
400
|
-
|
|
421
|
+
<Box flexGrow={1} />
|
|
401
422
|
<Text> </Text>
|
|
402
423
|
<ConfirmBar buttons={confirmButtons} focusedIndex={clampConfirmFocus(confirmFocus, confirmButtons.length)} />
|
|
403
424
|
</>
|
|
@@ -524,6 +524,15 @@ export function PromptInput({
|
|
|
524
524
|
|
|
525
525
|
const rawInput = String(input ?? '');
|
|
526
526
|
const inputKey = rawInput.toLowerCase();
|
|
527
|
+
const rawShiftArrowForGrid =
|
|
528
|
+
rawInput === '\x1b[1;2A' || rawInput === '\x1b[a' || rawInput === '[1;2A'
|
|
529
|
+
|| rawInput === '\x1b[1;2B' || rawInput === '\x1b[b' || rawInput === '[1;2B'
|
|
530
|
+
|| rawInput === '\x1b[1;2C' || rawInput === '\x1b[c' || rawInput === '[1;2C'
|
|
531
|
+
|| rawInput === '\x1b[1;2D' || rawInput === '\x1b[d' || rawInput === '[1;2D'
|
|
532
|
+
|| rawInput === '\x1b[1;6A' || rawInput === '[1;6A'
|
|
533
|
+
|| rawInput === '\x1b[1;6B' || rawInput === '[1;6B'
|
|
534
|
+
|| rawInput === '\x1b[1;6C' || rawInput === '[1;6C'
|
|
535
|
+
|| rawInput === '\x1b[1;6D' || rawInput === '[1;6D';
|
|
527
536
|
|
|
528
537
|
// App owns Shift+Arrow when a transcript/status ink-grid selection is live.
|
|
529
538
|
// Because the parent (App) useInput handler fires AFTER this child handler
|
|
@@ -537,7 +546,7 @@ export function PromptInput({
|
|
|
537
546
|
if (gridSelectionActive) {
|
|
538
547
|
const isShiftArrow = key.shift
|
|
539
548
|
&& (key.leftArrow || key.rightArrow || key.upArrow || key.downArrow || key.home || key.end);
|
|
540
|
-
if (isShiftArrow) return;
|
|
549
|
+
if (isShiftArrow || rawShiftArrowForGrid) return;
|
|
541
550
|
}
|
|
542
551
|
|
|
543
552
|
// Drop SGR mouse-tracking sequences (wheel/click). When app mouse tracking
|
|
@@ -52,7 +52,7 @@ const STATUSLINE_BOOT_FULL_DELAY_ACTIVE_MS = 2200;
|
|
|
52
52
|
const STATUSLINE_BOOT_FULL_RETRY_MS = 2000;
|
|
53
53
|
const STATUSLINE_BOOT_FULL_RETRY_MAX_MS = 30000;
|
|
54
54
|
const STATUSLINE_REFRESH_MS = 2000;
|
|
55
|
-
const STATUSLINE_ACTIVE_REFRESH_MS =
|
|
55
|
+
const STATUSLINE_ACTIVE_REFRESH_MS = 500;
|
|
56
56
|
|
|
57
57
|
function isTerminalStatus(statusText) {
|
|
58
58
|
return /idle|done|complete|success|closed|error|fail|cancel|killed|timeout/.test(String(statusText || '').toLowerCase());
|
|
@@ -157,8 +157,11 @@ function localContextPct({
|
|
|
157
157
|
: (localNum(contextWindow) > 0
|
|
158
158
|
? localNum(contextWindow)
|
|
159
159
|
: (localNum(rawContextWindow) > 0 ? localNum(rawContextWindow) : 200_000)));
|
|
160
|
-
//
|
|
161
|
-
|
|
160
|
+
// Trigger-as-denominator (mirrors ui/statusline.mjs resolveContextUsedPct):
|
|
161
|
+
// a sub-boundary compaction trigger is the display denominator so the gauge
|
|
162
|
+
// reads 100% exactly when auto-compact fires, instead of stalling at ~90%.
|
|
163
|
+
const trigger = localNum(autoCompactTokenLimit);
|
|
164
|
+
const window = trigger > 0 && trigger < baseWindow ? trigger : baseWindow;
|
|
162
165
|
const s = stats && typeof stats === 'object' ? stats : {};
|
|
163
166
|
const source = String(s.currentContextSource || '').toLowerCase();
|
|
164
167
|
const estimated = localNum(s.currentEstimatedContextTokens);
|