mixdog 0.9.68 → 0.9.70
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 +8 -4
- package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +1 -6
- package/src/runtime/agent/orchestrator/context/collect.mjs +42 -27
- package/src/runtime/agent/orchestrator/providers/gemini-stream.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/gemini.mjs +0 -6
- package/src/runtime/agent/orchestrator/providers/openai-codex-metadata.mjs +161 -0
- package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +8 -204
- package/src/runtime/agent/orchestrator/session/cache/prefetch-cache.mjs +26 -0
- package/src/runtime/agent/orchestrator/session/loop/stored-tool-args.mjs +25 -13
- package/src/runtime/agent/orchestrator/session/manager.mjs +0 -11
- package/src/runtime/agent/orchestrator/session/store/listing.mjs +613 -0
- package/src/runtime/agent/orchestrator/session/store.mjs +9 -575
- package/src/runtime/agent/orchestrator/session/tool-result-offload.mjs +41 -0
- package/src/runtime/agent/orchestrator/tools/builtin/lib/grep-output.mjs +154 -0
- package/src/runtime/agent/orchestrator/tools/builtin/read-tool.mjs +78 -18
- package/src/runtime/agent/orchestrator/tools/builtin/search-tool.mjs +9 -144
- package/src/runtime/agent/orchestrator/tools/builtin/shell-job-paths.mjs +7 -3
- package/src/runtime/agent/orchestrator/tools/patch/matcher.mjs +40 -3
- package/src/runtime/agent/orchestrator/tools/patch/v4a-convert.mjs +24 -8
- package/src/runtime/channels/lib/owned-runtime.mjs +8 -1
- package/src/runtime/channels/lib/webhook/relay-tunnel.mjs +6 -2
- package/src/runtime/channels/lib/webhook.mjs +13 -1
- package/src/runtime/media/adapters/codex-image.mjs +109 -0
- package/src/runtime/media/adapters/gemini-image.mjs +68 -0
- package/src/runtime/media/adapters/gemini-video.mjs +119 -0
- package/src/runtime/media/adapters/xai-media.mjs +116 -0
- package/src/runtime/media/auth.mjs +51 -0
- package/src/runtime/media/index.mjs +17 -0
- package/src/runtime/media/jobs.mjs +174 -0
- package/src/runtime/media/lanes.mjs +230 -0
- package/src/runtime/media/store.mjs +164 -0
- package/src/runtime/media/upstream-error.mjs +39 -0
- package/src/session-runtime/channel-config-api.mjs +12 -1
- package/src/session-runtime/media-api.mjs +47 -0
- package/src/session-runtime/memory-daemon-probe.mjs +61 -0
- package/src/session-runtime/model-capabilities.mjs +6 -4
- package/src/session-runtime/model-route-api.mjs +4 -1
- package/src/session-runtime/notification-bus.mjs +82 -0
- package/src/session-runtime/provider-auth-api.mjs +16 -1
- package/src/session-runtime/provider-usage.mjs +3 -0
- package/src/session-runtime/remote-control.mjs +166 -0
- package/src/session-runtime/remote-transcript.mjs +126 -0
- package/src/session-runtime/remote-transition-queue.mjs +14 -0
- package/src/session-runtime/runtime-core.mjs +160 -706
- package/src/session-runtime/runtime-tunables.mjs +57 -0
- package/src/session-runtime/self-update.mjs +129 -0
- package/src/session-runtime/skills-api.mjs +77 -0
- package/src/session-runtime/tool-surface.mjs +83 -0
- package/src/session-runtime/warmup-schedulers.mjs +14 -1
- package/src/session-runtime/workflow-agents-api.mjs +235 -7
- package/src/session-runtime/workflow.mjs +84 -17
- package/src/standalone/agent-tool/worker-index.mjs +287 -0
- package/src/standalone/agent-tool.mjs +22 -346
- package/src/standalone/agent-watchdog-registry.mjs +101 -0
- package/src/standalone/channel-worker.mjs +7 -13
- package/src/tui/components/StatusLine.jsx +6 -5
- package/src/tui/dist/index.mjs +144 -95
- package/src/tui/engine/labels.mjs +0 -8
- package/src/tui/engine/session-api-ext.mjs +31 -8
- package/src/tui/engine/turn-watchdog.mjs +92 -0
- package/src/tui/engine/turn.mjs +18 -70
- package/src/tui/engine.mjs +39 -1
- package/src/workflows/default/WORKFLOW.md +1 -1
- package/src/workflows/solo/WORKFLOW.md +1 -1
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
// Stored tool-call argument compaction/restoration, extracted from loop.mjs.
|
|
2
2
|
// Long body/command args are truncated with a sha256-tagged head/tail preview
|
|
3
|
-
// when persisted into assistant history.
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// when persisted into assistant history. A FAILED call restores its full text
|
|
4
|
+
// (command/script AND mutation bodies): the failed mutation rolled back, so its
|
|
5
|
+
// patch text is the model's own draft, and leaving only the marker made models
|
|
6
|
+
// copy `[mixdog compacted …]` back as literal patch input. Bodies of calls that
|
|
7
|
+
// did NOT fail stay compacted so an already-applied patch cannot be replayed.
|
|
6
8
|
import { createHash } from 'crypto';
|
|
7
9
|
|
|
8
10
|
const STORED_TOOL_ARG_BODY_KEY_RE = /^(?:content|old_string|new_string|patch|rewrite)$/i;
|
|
9
11
|
const STORED_TOOL_ARG_LONG_KEY_RE = /^(?:command|script)$/i;
|
|
12
|
+
// Marker-alone value produced by compactStoredToolArgString for body keys.
|
|
13
|
+
const STORED_TOOL_ARG_MARKER_RE = /^\[mixdog compacted\b[^\]\n]*\]$/;
|
|
10
14
|
const STORED_TOOL_ARG_BODY_LIMIT = 2_000;
|
|
11
15
|
const STORED_TOOL_ARG_LONG_LIMIT = 8_000;
|
|
12
16
|
const STORED_TOOL_ARG_PREVIEW_HEAD = 360;
|
|
@@ -60,13 +64,15 @@ export function compactToolCallsForHistory(calls) {
|
|
|
60
64
|
|
|
61
65
|
// Restore retry-safe long command/script text for ONE failed tool call inside a
|
|
62
66
|
// history assistant message whose toolCalls were compacted at push time.
|
|
63
|
-
// Mutation bodies (patch, old_string, new_string, content, rewrite)
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
+
// Mutation bodies (patch, old_string, new_string, content, rewrite) are restored
|
|
68
|
+
// too: this call failed, so nothing it described is on disk (sections roll back)
|
|
69
|
+
// and the body is the model's own draft to correct. Only a value that is still
|
|
70
|
+
// the marker is replaced, so a body already carrying real text is never
|
|
71
|
+
// overwritten. Must run BEFORE the message is first transmitted so it never
|
|
72
|
+
// mutates an already-cached prefix.
|
|
67
73
|
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
74
|
+
// Restoration reaches command/script and body keys at ANY depth. Every other
|
|
75
|
+
// field is taken from the compacted snapshot captured at push time.
|
|
70
76
|
export function restoreToolCallBodyForId(assistantMsg, originalCalls, callId) {
|
|
71
77
|
if (!assistantMsg || !Array.isArray(assistantMsg.toolCalls) || !callId) return;
|
|
72
78
|
if (!Array.isArray(originalCalls)) return;
|
|
@@ -78,11 +84,17 @@ export function restoreToolCallBodyForId(assistantMsg, originalCalls, callId) {
|
|
|
78
84
|
tc.arguments = _restoreCompactedBodies(tc.arguments, orig.arguments, '');
|
|
79
85
|
}
|
|
80
86
|
|
|
81
|
-
// Recursively rebuild a compacted args tree: replace
|
|
82
|
-
// command/script fields
|
|
83
|
-
// every other field
|
|
87
|
+
// Recursively rebuild a compacted args tree: replace retry-safe long
|
|
88
|
+
// command/script fields and still-compacted mutation bodies with their full
|
|
89
|
+
// originals; every other field stays as captured in the compacted snapshot.
|
|
84
90
|
function _restoreCompactedBodies(tcVal, origVal, key) {
|
|
85
|
-
if (STORED_TOOL_ARG_BODY_KEY_RE.test(key))
|
|
91
|
+
if (STORED_TOOL_ARG_BODY_KEY_RE.test(key)) {
|
|
92
|
+
if (typeof tcVal === 'string' && typeof origVal === 'string'
|
|
93
|
+
&& STORED_TOOL_ARG_MARKER_RE.test(tcVal.trim())) {
|
|
94
|
+
return origVal;
|
|
95
|
+
}
|
|
96
|
+
return tcVal;
|
|
97
|
+
}
|
|
86
98
|
if (STORED_TOOL_ARG_LONG_KEY_RE.test(key) && typeof origVal === 'string') {
|
|
87
99
|
return origVal;
|
|
88
100
|
}
|
|
@@ -98,17 +98,6 @@ export {
|
|
|
98
98
|
_buildAgentSpecific,
|
|
99
99
|
} from './manager/rules-cache.mjs';
|
|
100
100
|
|
|
101
|
-
// ── Test-only aliases for the legacy auto-compact-limit migration +
|
|
102
|
-
// buffer-config preservation (scripts/compact-trigger-migration-smoke.mjs). ─
|
|
103
|
-
import {
|
|
104
|
-
resolveSessionContextMeta,
|
|
105
|
-
compactTriggerForSession,
|
|
106
|
-
preserveBufferConfigFields,
|
|
107
|
-
} from './manager/context-meta.mjs';
|
|
108
|
-
export const _resolveSessionContextMeta = resolveSessionContextMeta;
|
|
109
|
-
export const _compactTriggerForSession = compactTriggerForSession;
|
|
110
|
-
export const _preserveBufferConfigFields = preserveBufferConfigFields;
|
|
111
|
-
|
|
112
101
|
// ── Session lifecycle / ask / crud / close / cleanup ──────────────────────
|
|
113
102
|
export { SessionClosedError } from './manager/session-errors.mjs';
|
|
114
103
|
export { setAgentRuntime } from './manager/agent-runtime-singleton.mjs';
|