mixdog 1.0.9 → 1.0.11
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 -3
- package/src/rules/agent/40-cycle1-agent.md +19 -23
- package/src/rules/lead/LEAD.md +5 -5
- package/src/rules/shared/05-tool-calls.md +6 -5
- package/src/rules/shared/60-verification.md +2 -2
- package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +37 -13
- package/src/runtime/agent/orchestrator/agent-runtime/title-completion.mjs +3 -0
- package/src/runtime/agent/orchestrator/cache-break-trace.mjs +6 -0
- package/src/runtime/agent/orchestrator/config-providers-merge.mjs +8 -0
- package/src/runtime/agent/orchestrator/mcp/client.mjs +234 -12
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-request/initial-status.mjs +22 -5
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth.mjs +7 -8
- package/src/runtime/agent/orchestrator/providers/anthropic.mjs +6 -0
- package/src/runtime/agent/orchestrator/providers/antigravity-oauth-login.mjs +9 -7
- package/src/runtime/agent/orchestrator/providers/antigravity-oauth.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/antigravity-request.mjs +3 -2
- package/src/runtime/agent/orchestrator/providers/auto-effort.mjs +77 -0
- package/src/runtime/agent/orchestrator/providers/cursor.mjs +11 -5
- package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +165 -0
- package/src/runtime/agent/orchestrator/providers/effort-configuration.mjs +4 -2
- package/src/runtime/agent/orchestrator/providers/gemini-request-body.mjs +4 -6
- package/src/runtime/agent/orchestrator/providers/gemini-schema.mjs +7 -0
- package/src/runtime/agent/orchestrator/providers/gemini.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/grok-oauth-login.mjs +3 -2
- package/src/runtime/agent/orchestrator/providers/grok-oauth.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/lib/anthropic-image-input.mjs +34 -13
- package/src/runtime/agent/orchestrator/providers/lib/oauth-page.mjs +94 -0
- package/src/runtime/agent/orchestrator/providers/media-normalization.mjs +670 -198
- package/src/runtime/agent/orchestrator/providers/mixdog-local.mjs +9 -3
- package/src/runtime/agent/orchestrator/providers/model-list-sanitize.mjs +23 -4
- package/src/runtime/agent/orchestrator/providers/openai-compat-chat-send.mjs +3 -1
- package/src/runtime/agent/orchestrator/providers/openai-compat-models.mjs +4 -3
- package/src/runtime/agent/orchestrator/providers/openai-compat-responses.mjs +4 -0
- package/src/runtime/agent/orchestrator/providers/openai-compat-wire.mjs +14 -8
- package/src/runtime/agent/orchestrator/providers/openai-compat-xai-send.mjs +7 -4
- package/src/runtime/agent/orchestrator/providers/openai-compat-xai.mjs +24 -9
- package/src/runtime/agent/orchestrator/providers/openai-compat.mjs +3 -28
- package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +3 -2
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/opencode-go.mjs +4 -0
- package/src/runtime/agent/orchestrator/providers/provider-base-url.mjs +24 -0
- package/src/runtime/agent/orchestrator/providers/registry.mjs +24 -4
- package/src/runtime/agent/orchestrator/runtime-core/builtin-features.mjs +9 -1
- package/src/runtime/agent/orchestrator/runtime-core/config-helpers.mjs +3 -2
- package/src/runtime/agent/orchestrator/runtime-core/model-capabilities.mjs +13 -11
- package/src/runtime/agent/orchestrator/runtime-core/workflow.mjs +17 -9
- package/src/runtime/agent/orchestrator/session/cache/scoped-cache-outcome.mjs +23 -1
- package/src/runtime/agent/orchestrator/session/cache/scoped-cache.mjs +40 -71
- package/src/runtime/agent/orchestrator/session/cache/tool-result-reuse.mjs +27 -0
- package/src/runtime/agent/orchestrator/session/compact/runner.mjs +8 -7
- package/src/runtime/agent/orchestrator/session/compact/text-utils.mjs +54 -12
- package/src/runtime/agent/orchestrator/session/context-utils.mjs +27 -5
- package/src/runtime/agent/orchestrator/session/eager-dispatch/admission.mjs +8 -51
- package/src/runtime/agent/orchestrator/session/image-strip-recovery.mjs +55 -2
- package/src/runtime/agent/orchestrator/session/loop/compact-policy.mjs +23 -5
- package/src/runtime/agent/orchestrator/session/loop/request-boundary.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/loop/send-phase.mjs +62 -0
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-auto-effort.mjs +79 -0
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-execute.mjs +10 -2
- package/src/runtime/agent/orchestrator/session/manager/ask-turn-settle.mjs +8 -1
- package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +6 -3
- package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +10 -3
- package/src/runtime/agent/orchestrator/session/manager/session-prompt-composition.mjs +5 -1
- package/src/runtime/agent/orchestrator/session/pre-send-compact.mjs +21 -5
- package/src/runtime/agent/orchestrator/session/send-with-recovery.mjs +20 -4
- package/src/runtime/agent/orchestrator/session/store/live-state.mjs +7 -6
- package/src/runtime/agent/orchestrator/session/store/serialize.mjs +6 -3
- package/src/runtime/agent/orchestrator/session/task-wait-control.mjs +13 -0
- package/src/runtime/agent/orchestrator/session/tool-batch/execute-call.mjs +9 -19
- package/src/runtime/agent/orchestrator/session/tool-batch/finalize.mjs +85 -2
- package/src/runtime/agent/orchestrator/session/tool-batch/pre-dispatch.mjs +10 -6
- package/src/runtime/agent/orchestrator/session/transcript-restore/restore.mjs +3 -0
- package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +12 -1
- package/src/runtime/agent/orchestrator/tools/builtin/find-files-tool.mjs +3 -3
- package/src/runtime/agent/orchestrator/tools/builtin/lib/grep-path-fanout.mjs +2 -1
- package/src/runtime/agent/orchestrator/tools/builtin/lib/grep-pattern-fanout.mjs +2 -1
- package/src/runtime/agent/orchestrator/tools/builtin/lib/scoped-search-flight.mjs +20 -0
- package/src/runtime/agent/orchestrator/tools/builtin/list-tool.mjs +51 -28
- package/src/runtime/agent/orchestrator/tools/builtin/path-utils.mjs +3 -2
- package/src/runtime/agent/orchestrator/tools/builtin/pdf-test-fixtures.mjs +47 -0
- package/src/runtime/agent/orchestrator/tools/builtin/read-single-media.mjs +1 -1
- package/src/runtime/agent/orchestrator/tools/builtin/read-special-files.mjs +34 -30
- package/src/runtime/agent/orchestrator/tools/builtin/search-glob-tool.mjs +10 -5
- package/src/runtime/agent/orchestrator/tools/builtin/search-grep-tool.mjs +18 -7
- package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +1 -1
- package/src/runtime/agent/orchestrator/tools/builtin.mjs +9 -2
- package/src/runtime/agent/orchestrator/tools/code-graph/aggregate-roots.mjs +3 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/dispatch/federation.mjs +3 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/dispatch/work.mjs +11 -6
- package/src/runtime/agent/orchestrator/tools/code-graph/dispatch.mjs +13 -1
- package/src/runtime/agent/orchestrator/tools/patch/native-server.mjs +15 -1
- package/src/runtime/attachments/limits.mjs +20 -0
- package/src/runtime/{agent/orchestrator/tools/builtin/read-office-files.mjs → attachments/office-extract.mjs} +356 -125
- package/src/runtime/attachments/pdf-extract.mjs +2 -2
- package/src/runtime/attachments/store.mjs +232 -72
- package/src/runtime/browser-bridge/client.mjs +3 -3
- package/src/runtime/effort-judge/compact-tokenizer.mjs +282 -0
- package/src/runtime/effort-judge/judge-client.mjs +194 -0
- package/src/runtime/effort-judge/judge-worker.mjs +106 -0
- package/src/runtime/local-provider/input-capabilities.mjs +30 -12
- package/src/runtime/media/jobs.mjs +0 -1
- package/src/runtime/media/media-usage.mjs +2 -1
- package/src/runtime/memory/lib/embedding-model-config.mjs +6 -6
- package/src/runtime/memory/lib/embedding-model-files.mjs +44 -0
- package/src/runtime/memory/lib/embedding-tokenizer.mjs +253 -0
- package/src/runtime/memory/lib/embedding-worker.mjs +97 -103
- package/src/runtime/memory/lib/memory-chunk-quality.mjs +40 -218
- package/src/runtime/memory/lib/memory-embed.mjs +0 -9
- package/src/runtime/memory/lib/memory.mjs +34 -23
- package/src/runtime/memory/tool-defs.mjs +2 -1
- package/src/runtime/shared/automation-attachments.mjs +9 -7
- package/src/runtime/shared/environment-error.mjs +14 -0
- package/src/runtime/shared/error-presentation.mjs +10 -2
- package/src/runtime/shared/inline-file-kind.mjs +28 -2
- package/src/runtime/shared/llm/model-catalog.mjs +17 -3
- package/src/runtime/shared/llm/quota-value-estimate.mjs +33 -18
- package/src/runtime/shared/llm/usage-accounting.mjs +8 -5
- package/src/runtime/shared/llm/usage-ledger-quota.mjs +29 -10
- package/src/runtime/shared/llm/usage-ledger-rollup.mjs +47 -4
- package/src/runtime/shared/model-alias.mjs +5 -0
- package/src/runtime/shared/read-image-resize.mjs +56 -0
- package/src/runtime/shared/tool-card-model/displayed-result.mjs +7 -5
- package/src/runtime/shared/tool-card-model.mjs +2 -1
- package/src/runtime/shared/tool-result-summary.mjs +120 -59
- package/src/runtime/shared/turn-review-reply.mjs +63 -0
- package/src/runtime/shared/turn-snapshot.mjs +8 -5
- package/src/runtime/shared/turn-worktree-snapshot.mjs +56 -19
- package/src/session-runtime/boot/apis.mjs +11 -0
- package/src/session-runtime/boot/providers.mjs +2 -0
- package/src/session-runtime/boot/session.mjs +5 -0
- package/src/session-runtime/boot/shared.mjs +2 -3
- package/src/session-runtime/native-web-search/tool-shape.mjs +8 -8
- package/src/session-runtime/native-web-search.mjs +6 -8
- package/src/session-runtime/provider-auth/login.mjs +26 -1
- package/src/session-runtime/provider-models/row-hydration.mjs +9 -0
- package/src/session-runtime/quick-model-rows/provider-rows.mjs +17 -2
- package/src/session-runtime/services/provider-admin.mjs +215 -3
- package/src/session-runtime/services/usage-stats-model.mjs +37 -2
- package/src/session-runtime/settings-builtin-tools-api.mjs +29 -4
- package/src/session-runtime/setup-tool/executor.mjs +10 -1
- package/src/session-runtime/webhook-session-run.mjs +0 -9
- package/src/standalone/daemon-stored-session-views.mjs +15 -0
- package/src/standalone/session-protocol.mjs +4 -0
- package/src/standalone/session-service/entries/session-loads.mjs +11 -3
- package/src/standalone/session-service/entries.mjs +1 -0
- package/src/standalone/session-service/session-calls/session-action.mjs +31 -3
- package/src/standalone/session-service/session-calls/session-turns.mjs +2 -1
- package/src/standalone/session-service.mjs +2 -0
- package/src/tui/app/model-options.mjs +10 -1
- package/src/tui/app/usage-context-panels/context-model.mjs +4 -1
- package/src/tui/app/usage-context-panels.mjs +3 -1
- package/src/tui/app/use-prompt-queue-history/restore-to-prompt.mjs +1 -0
- package/src/tui/components/ContextPanel.jsx +2 -0
- package/src/tui/dist/index.mjs +144 -70
- package/src/tui/paste-attachments.mjs +2 -1
- package/src/tui/session/session-api/intake/abort.mjs +35 -3
- package/src/tui/session/session-api/integrations.mjs +14 -59
- package/src/tui/session/session-api/media.mjs +1 -1
- package/src/tui/session/session-flow/queue/take-entries.mjs +21 -11
- package/src/tui/session/session-flow/steering.mjs +17 -3
- package/src/tui/session/session-flow.mjs +1 -0
- package/src/tui/session/turn.mjs +18 -4
- package/src/vendor/statusline/src/gateway/route-meta.mjs +2 -0
- package/scripts/memory-layer2-check.mjs +0 -186
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Shared browser pages for the loopback OAuth callbacks (success / failure).
|
|
2
|
+
|
|
3
|
+
const LOGO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="44 44 168 168" aria-hidden="true">
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="titanium-a" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
6
|
+
<stop offset="0%" stop-color="#ffffff"/><stop offset="50%" stop-color="#94a3b8"/><stop offset="100%" stop-color="#ffffff"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="titanium-b" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
9
|
+
<stop offset="0%" stop-color="#cbd5e1"/><stop offset="50%" stop-color="#475569"/><stop offset="100%" stop-color="#cbd5e1"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="titanium-c" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
12
|
+
<stop offset="0%" stop-color="#94a3b8"/><stop offset="50%" stop-color="#334155"/><stop offset="100%" stop-color="#94a3b8"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
</defs>
|
|
15
|
+
<g fill="none" stroke-width="22" stroke-linecap="round">
|
|
16
|
+
<path d="M116.2 61A68 68 0 0 1 191.9 104.7" stroke="url(#titanium-a)"/>
|
|
17
|
+
<path d="M116.2 61A68 68 0 0 1 191.9 104.7" transform="rotate(120 128 128)" stroke="url(#titanium-b)"/>
|
|
18
|
+
<path d="M116.2 61A68 68 0 0 1 191.9 104.7" transform="rotate(240 128 128)" stroke="url(#titanium-c)"/>
|
|
19
|
+
</g>
|
|
20
|
+
<polygon points="128,112 133,123 144,128 133,133 128,144 123,133 112,128 123,123" fill="#cbd5e1"/>
|
|
21
|
+
<circle cx="128" cy="128" r="3.5" fill="#07080b"/>
|
|
22
|
+
<circle cx="128" cy="128" r="1.5" fill="#ffffff"/>
|
|
23
|
+
</svg>`;
|
|
24
|
+
|
|
25
|
+
function escapeHtml(value) {
|
|
26
|
+
return String(value)
|
|
27
|
+
.replaceAll('&', '&')
|
|
28
|
+
.replaceAll('<', '<')
|
|
29
|
+
.replaceAll('>', '>')
|
|
30
|
+
.replaceAll('"', '"')
|
|
31
|
+
.replaceAll("'", ''');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function renderPage({ heading, message, details }) {
|
|
35
|
+
const title = escapeHtml(heading);
|
|
36
|
+
return `<!doctype html>
|
|
37
|
+
<html lang="en">
|
|
38
|
+
<head>
|
|
39
|
+
<meta charset="utf-8" />
|
|
40
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
41
|
+
<title>${title} · Mixdog</title>
|
|
42
|
+
<style>
|
|
43
|
+
* { box-sizing: border-box; }
|
|
44
|
+
html { color-scheme: dark; }
|
|
45
|
+
body {
|
|
46
|
+
margin: 0;
|
|
47
|
+
min-height: 100vh;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
padding: 24px;
|
|
52
|
+
background: #07080b;
|
|
53
|
+
color: #f8fafc;
|
|
54
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
main { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; }
|
|
58
|
+
.logo { width: 72px; height: 72px; margin-bottom: 24px; }
|
|
59
|
+
.logo svg { width: 100%; height: 100%; display: block; }
|
|
60
|
+
h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.15; font-weight: 650; }
|
|
61
|
+
p { margin: 0; line-height: 1.7; color: #94a3b8; font-size: 15px; }
|
|
62
|
+
.details {
|
|
63
|
+
margin-top: 16px;
|
|
64
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
65
|
+
font-size: 13px;
|
|
66
|
+
color: #94a3b8;
|
|
67
|
+
white-space: pre-wrap;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
</head>
|
|
72
|
+
<body>
|
|
73
|
+
<main>
|
|
74
|
+
<div class="logo">${LOGO_SVG}</div>
|
|
75
|
+
<h1>${title}</h1>
|
|
76
|
+
<p>${escapeHtml(message)}</p>
|
|
77
|
+
${details ? `<div class="details">${escapeHtml(details)}</div>` : ''}
|
|
78
|
+
</main>
|
|
79
|
+
</body>
|
|
80
|
+
</html>`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const OAUTH_PAGE_CONTENT_TYPE = 'text/html; charset=utf-8';
|
|
84
|
+
|
|
85
|
+
export function oauthSuccessHtml(providerName) {
|
|
86
|
+
return renderPage({
|
|
87
|
+
heading: 'Authentication successful',
|
|
88
|
+
message: `Signed in to ${providerName}. You can close this tab and return to Mixdog.`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function oauthErrorHtml(message, details) {
|
|
93
|
+
return renderPage({ heading: 'Authentication failed', message, details });
|
|
94
|
+
}
|