mixdog 0.9.175 → 1.0.1
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 +1 -1
- package/scripts/context-renewal-live-check.mjs +2 -1
- package/scripts/plan-runtime-release-tag.mjs +57 -0
- package/src/defaults/skills/computer-use/SKILL.md +13 -12
- package/src/defaults/skills/setup/SKILL.md +1 -4
- package/src/defaults/skills/setup/references/actions.md +0 -2
- package/src/defaults/skills/setup/references/surfaces.md +2 -3
- package/src/defaults/skills/xlsx/SKILL.md +1 -0
- package/src/rules/shared/70-delivery.md +3 -0
- package/src/runtime/agent/orchestrator/agent-trace-format.mjs +12 -12
- package/src/runtime/agent/orchestrator/config.mjs +8 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-api-transport.mjs +6 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-request.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/cursor.mjs +20 -2
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +3 -0
- package/src/runtime/agent/orchestrator/providers/openai-ws.mjs +2 -0
- package/src/runtime/agent/orchestrator/providers/registry-errors.mjs +9 -0
- package/src/runtime/agent/orchestrator/providers/registry.mjs +3 -2
- package/src/runtime/agent/orchestrator/runtime-core/goal-tasks.mjs +25 -6
- package/src/runtime/agent/orchestrator/runtime-core/goal-text.mjs +3 -2
- package/src/runtime/agent/orchestrator/runtime-core/goal-tool-defs.mjs +1 -1
- package/src/runtime/agent/orchestrator/runtime-core/goal-tool-exec.mjs +1 -0
- package/src/runtime/agent/orchestrator/session/result-classification.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/transcript-restore/tool-result-status.mjs +7 -3
- package/src/runtime/agent/orchestrator/tools/builtin/arg-guard.mjs +27 -4
- package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/benign-exit.mjs +7 -3
- package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +1 -0
- package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +39 -3
- package/src/runtime/agent/orchestrator/tools/builtin/read-batch.mjs +3 -1
- package/src/runtime/agent/orchestrator/tools/builtin/read-tool/batch-dispatch.mjs +2 -1
- package/src/runtime/agent/orchestrator/tools/code-graph/build.mjs +13 -5
- package/src/runtime/computer-bridge/error-recovery.mjs +1 -1
- package/src/runtime/memory/lib/runtime-fetcher.mjs +94 -23
- package/src/runtime/office/capabilities-catalog.mjs +2 -0
- package/src/runtime/office/capabilities-signatures.mjs +12 -6
- package/src/runtime/office/capabilities.mjs +30 -10
- package/src/runtime/office/core/office-actions-open.mjs +1 -6
- package/src/runtime/office/core/office-sessions.mjs +9 -0
- package/src/runtime/office/portable/portable-xlsx-operations.mjs +2 -49
- package/src/runtime/office/portable/xlsx-contract.mjs +37 -3
- package/src/runtime/office/tool-defs.mjs +2 -2
- package/src/runtime/shared/config-patch.mjs +2 -0
- package/src/runtime/shared/llm/cost.mjs +16 -4
- package/src/runtime/shared/llm/model-catalog-projection.mjs +3 -2
- package/src/runtime/shared/llm/model-catalog.mjs +48 -0
- package/src/runtime/shared/llm/model-pricing-rates.mjs +11 -4
- package/src/runtime/shared/llm/usage-accounting.mjs +12 -11
- package/src/runtime/shared/llm/usage-context.mjs +7 -0
- package/src/runtime/shared/llm/usage-ledger-repair.mjs +3 -1
- package/src/runtime/shared/llm/usage-ledger.mjs +1 -1
- package/src/runtime/shared/tool-card-model/card-status.mjs +7 -5
- package/src/runtime/shared/tool-card-model/git-result.mjs +10 -0
- package/src/runtime/shared/tool-card-model/terminal-status.mjs +6 -2
- package/src/runtime/shared/tool-card-model.golden-cases.mjs +2 -1
- package/src/runtime/shared/tool-result-summary.mjs +1 -0
- package/src/runtime/shared/tool-status.mjs +35 -2
- package/src/runtime/shared/user-data-guard.mjs +1 -1
- package/src/runtime/tidy/report.mjs +2 -2
- package/src/runtime/tidy/tool.mjs +6 -1
- package/src/session-runtime/config-lifecycle.mjs +11 -1
- package/src/session-runtime/cwd-plugins/core-memory-context.mjs +1 -1
- package/src/session-runtime/native-web-search/tool-shape.mjs +16 -4
- package/src/session-runtime/provider-models/catalog-load.mjs +18 -3
- package/src/session-runtime/setup-tool/executor.mjs +0 -1
- package/src/session-runtime/setup-tool/settings-contract.mjs +2 -13
- package/src/tui/dist/index.mjs +89 -38
- package/src/tui/session/session-api/settings.mjs +16 -10
- package/src/vendor/statusline/src/gateway/route-meta.mjs +7 -2
- package/src/workflows/default/WORKFLOW.md +0 -2
- package/src/workflows/headless/WORKFLOW.md +0 -2
|
@@ -17,6 +17,18 @@ export function normalizeWebSearchAllowedDomain(site) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
// A site filter may name several domains the way a search box takes them
|
|
21
|
+
// ("a.com OR b.com", "a.com, b.com", "site:a.com site:b.com"); each becomes its
|
|
22
|
+
// own allowed domain instead of one invalid combined entry.
|
|
23
|
+
export function normalizeWebSearchAllowedDomains(site) {
|
|
24
|
+
const domains = clean(site)
|
|
25
|
+
.split(/[\s,|]+/)
|
|
26
|
+
.filter((part) => part && part.toUpperCase() !== 'OR')
|
|
27
|
+
.map((part) => normalizeWebSearchAllowedDomain(part.replace(/^site:/i, '')))
|
|
28
|
+
.filter(Boolean);
|
|
29
|
+
return [...new Set(domains)];
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
export function nativeWebSearchUserLocation(locale) {
|
|
21
33
|
if (!locale || typeof locale !== 'object' || Array.isArray(locale)) return null;
|
|
22
34
|
const location = { type: 'approximate' };
|
|
@@ -28,7 +40,7 @@ export function nativeWebSearchUserLocation(locale) {
|
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
export function nativeWebSearchTool(args = {}, toolType = 'web_search', providerName = '') {
|
|
31
|
-
const
|
|
43
|
+
const domains = normalizeWebSearchAllowedDomains(args.site);
|
|
32
44
|
const type = clean(toolType) || 'web_search';
|
|
33
45
|
const location = nativeWebSearchUserLocation(args.locale);
|
|
34
46
|
if (providerName === 'gemini') {
|
|
@@ -40,19 +52,19 @@ export function nativeWebSearchTool(args = {}, toolType = 'web_search', provider
|
|
|
40
52
|
name: 'web_search',
|
|
41
53
|
max_uses: Math.max(1, Math.min(10, Number(args.maxResults) || 5)),
|
|
42
54
|
};
|
|
43
|
-
if (
|
|
55
|
+
if (domains.length) tool.allowed_domains = domains;
|
|
44
56
|
if (location) tool.user_location = location;
|
|
45
57
|
return tool;
|
|
46
58
|
}
|
|
47
59
|
if (providerName === 'grok-oauth' || providerName === 'xai') {
|
|
48
60
|
const tool = { type };
|
|
49
|
-
if (
|
|
61
|
+
if (domains.length) tool.filters = { allowed_domains: domains };
|
|
50
62
|
return tool;
|
|
51
63
|
}
|
|
52
64
|
const tool = { type };
|
|
53
65
|
if (type === 'web_search') {
|
|
54
66
|
tool.search_context_size = clean(args.contextSize) || 'low';
|
|
55
|
-
if (
|
|
67
|
+
if (domains.length) tool.filters = { allowed_domains: domains };
|
|
56
68
|
if (location) tool.user_location = location;
|
|
57
69
|
}
|
|
58
70
|
return tool;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// catalog flattened into deduplicated rows with per-provider profiling.
|
|
5
5
|
import { isSelectableLlmModel } from '../model-recency.mjs';
|
|
6
6
|
import { sharedProviderCatalog } from '../provider-catalog-cache.mjs';
|
|
7
|
+
import { NO_ENABLED_PROVIDERS } from '../../runtime/agent/orchestrator/providers/registry-errors.mjs';
|
|
7
8
|
|
|
8
9
|
export function createCatalogLoader({
|
|
9
10
|
caches,
|
|
@@ -36,7 +37,9 @@ export function createCatalogLoader({
|
|
|
36
37
|
* for. ensureProvidersReady starts the daemon-wide force refresh without
|
|
37
38
|
* blocking boot; a foreground full picker load must join that refresh,
|
|
38
39
|
* otherwise it can snapshot yesterday's provider cache moments before the
|
|
39
|
-
* refresh invalidates it, leaving the UI on the stale first-open rows.
|
|
40
|
+
* refresh invalidates it, leaving the UI on the stale first-open rows.
|
|
41
|
+
* Resolves false when no provider is enabled: a fresh install has nothing
|
|
42
|
+
* to load, and the registry refuses an all-disabled init by design. */
|
|
40
43
|
async function prepare({ forceRefresh, loadSecrets }) {
|
|
41
44
|
if (loadSecrets) {
|
|
42
45
|
const secretsStartedAt = performance.now();
|
|
@@ -45,7 +48,12 @@ export function createCatalogLoader({
|
|
|
45
48
|
profile('secrets-ready', { ms: (performance.now() - secretsStartedAt).toFixed(1) });
|
|
46
49
|
}
|
|
47
50
|
const providersStartedAt = performance.now();
|
|
48
|
-
|
|
51
|
+
try {
|
|
52
|
+
await ensureProvidersReady(config().providers || {});
|
|
53
|
+
} catch (error) {
|
|
54
|
+
if (error?.code === NO_ENABLED_PROVIDERS) return false;
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
49
57
|
profile('providers-ready', { ms: (performance.now() - providersStartedAt).toFixed(1) });
|
|
50
58
|
const refreshStartedAt = performance.now();
|
|
51
59
|
if (!forceRefresh && typeof reg().refreshProviderCatalogsOnStartup === 'function') {
|
|
@@ -55,6 +63,7 @@ export function createCatalogLoader({
|
|
|
55
63
|
await reg().refreshCatalogs({ force: true });
|
|
56
64
|
}
|
|
57
65
|
profile('catalog-refresh-ready', { ms: (performance.now() - refreshStartedAt).toFixed(1) });
|
|
66
|
+
return true;
|
|
58
67
|
}
|
|
59
68
|
|
|
60
69
|
/** `request` ({ seq }) identifies the caller's load; `request.complete`
|
|
@@ -62,7 +71,13 @@ export function createCatalogLoader({
|
|
|
62
71
|
return async function loadProviderModelsFresh({ forceRefresh = false, loadSecrets = true, request = null } = {}) {
|
|
63
72
|
const startedAt = performance.now();
|
|
64
73
|
profile('load:start', { forceRefresh, loadSecrets });
|
|
65
|
-
|
|
74
|
+
// No enabled provider is an empty catalog, not a failure. The request
|
|
75
|
+
// stays incomplete so this answer is never cached: connecting a provider
|
|
76
|
+
// is picked up by the next read.
|
|
77
|
+
if (!(await prepare({ forceRefresh, loadSecrets }))) {
|
|
78
|
+
profile('load:done', { ms: (performance.now() - startedAt).toFixed(1), providers: 0, rows: 0 });
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
66
81
|
const ownsLoad = request !== null && request.seq === caches.providerModelsLoadSeq;
|
|
67
82
|
const revision = meta.syncCatalogRevision();
|
|
68
83
|
// Preparation may legitimately refresh the catalog. Carry that revision
|
|
@@ -30,8 +30,6 @@ export const SETUP_EXTENDED_ACTION_FIELDS = Object.freeze({
|
|
|
30
30
|
set_appearance: 'appearance',
|
|
31
31
|
save_project: 'project',
|
|
32
32
|
remove_project: 'projectPath',
|
|
33
|
-
get_instructions: 'projectPath',
|
|
34
|
-
set_instructions: 'projectPath content expectedContent',
|
|
35
33
|
revoke_linked_device: 'name',
|
|
36
34
|
});
|
|
37
35
|
|
|
@@ -50,8 +48,6 @@ export const SETUP_DESKTOP_ACTIONS = Object.freeze([
|
|
|
50
48
|
'set_appearance',
|
|
51
49
|
'save_project',
|
|
52
50
|
'remove_project',
|
|
53
|
-
'get_instructions',
|
|
54
|
-
'set_instructions',
|
|
55
51
|
'revoke_linked_device',
|
|
56
52
|
]);
|
|
57
53
|
export const SETUP_DESKTOP_DOMAINS = Object.freeze(['desktop', 'appearance', 'projects', 'connection']);
|
|
@@ -166,6 +162,7 @@ export const SETUP_EXTENDED_PROPERTIES = Object.freeze({
|
|
|
166
162
|
}),
|
|
167
163
|
desktop: object({
|
|
168
164
|
keepAwake: boolean,
|
|
165
|
+
runInBackground: boolean,
|
|
169
166
|
usagePinned: boolean,
|
|
170
167
|
computerObserveOnly: boolean,
|
|
171
168
|
}),
|
|
@@ -179,15 +176,7 @@ export const SETUP_EXTENDED_PROPERTIES = Object.freeze({
|
|
|
179
176
|
zoom: { type: 'number', minimum: 0.5, maximum: 2 },
|
|
180
177
|
}),
|
|
181
178
|
project: object({ path: text, alias: text }, ['path']),
|
|
182
|
-
projectPath: {
|
|
183
|
-
type: ['string', 'null'],
|
|
184
|
-
description: 'Exact registered Project root; null means Common Instructions (instruction actions only).',
|
|
185
|
-
},
|
|
186
|
-
content: { ...text, description: 'Complete new Instructions content. Preserve unrelated instructions.' },
|
|
187
|
-
expectedContent: {
|
|
188
|
-
...text,
|
|
189
|
-
description: 'Unchanged content returned by get_instructions; prevents overwriting a concurrent edit.',
|
|
190
|
-
},
|
|
179
|
+
projectPath: { ...text, description: 'Exact registered Project root.' },
|
|
191
180
|
});
|
|
192
181
|
|
|
193
182
|
export const SETUP_HANDOFFS = Object.freeze({
|
package/src/tui/dist/index.mjs
CHANGED
|
@@ -37476,6 +37476,58 @@ function parseTaskNotification(text) {
|
|
|
37476
37476
|
};
|
|
37477
37477
|
}
|
|
37478
37478
|
|
|
37479
|
+
// src/runtime/shared/tool-status.mjs
|
|
37480
|
+
function normalizeToolTerminalStatus(value) {
|
|
37481
|
+
const raw = String(value || "").trim().toLowerCase();
|
|
37482
|
+
if (!raw) return "";
|
|
37483
|
+
if (/^(running|pending|queued|in_progress|in-progress)$/.test(raw)) return "running";
|
|
37484
|
+
if (/^(completed|complete|done|success|succeeded|ok)$/.test(raw)) return "completed";
|
|
37485
|
+
if (/^(failed|fail|error|errored|timeout|timed_out|killed)$/.test(raw)) return "failed";
|
|
37486
|
+
if (/^(cancelled|canceled|cancel|cancel[-_ ]unconfirmed|cancel[-_ ]pending|cancelling|canceling)$/.test(raw))
|
|
37487
|
+
return "cancelled";
|
|
37488
|
+
if (/^(denied|deny|refused|rejected)$/.test(raw)) return "denied";
|
|
37489
|
+
return "";
|
|
37490
|
+
}
|
|
37491
|
+
function leadingResultBlock(text) {
|
|
37492
|
+
const lines = String(text || "").split("\n");
|
|
37493
|
+
let index = 0;
|
|
37494
|
+
if (/^\[tool output offloaded:/i.test(String(lines[0] || "").trim())) {
|
|
37495
|
+
index = 1;
|
|
37496
|
+
while (index < lines.length && !lines[index].trim()) index += 1;
|
|
37497
|
+
}
|
|
37498
|
+
const block = [];
|
|
37499
|
+
for (; index < lines.length && lines[index].trim(); index += 1) block.push(lines[index]);
|
|
37500
|
+
return block.join("\n");
|
|
37501
|
+
}
|
|
37502
|
+
var USER_CONTROL_CANCELLATION_RE = /^(?:Error:\s*)?(?:Browser command interrupted by local user input\.|computer_session_aborted:|computer_user_control_active:)/i;
|
|
37503
|
+
function isUserControlCancellation(text) {
|
|
37504
|
+
return USER_CONTROL_CANCELLATION_RE.test(String(text || "").trimStart());
|
|
37505
|
+
}
|
|
37506
|
+
function hasBenignExitOutcome(text) {
|
|
37507
|
+
return /^\[outcome:\s*(?:no-match|no-change)\]\s*$/im.test(String(text || ""));
|
|
37508
|
+
}
|
|
37509
|
+
function toolResultTerminalStatus(text) {
|
|
37510
|
+
const body = String(text || "");
|
|
37511
|
+
const tagged = body.match(/<status[^>]*>([\s\S]*?)<\/status>/i)?.[1]?.trim();
|
|
37512
|
+
if (tagged) return normalizeToolTerminalStatus(tagged);
|
|
37513
|
+
const head = leadingResultBlock(body);
|
|
37514
|
+
const bracketed = head.match(/^\[status:\s*([^\]]*)\]/im)?.[1]?.trim();
|
|
37515
|
+
if (bracketed) return normalizeToolTerminalStatus(bracketed);
|
|
37516
|
+
const inline = head.match(/^(?:status|state):\s*([^\s·,;]+)/im)?.[1]?.trim();
|
|
37517
|
+
const fromInline = normalizeToolTerminalStatus(inline);
|
|
37518
|
+
if (fromInline) return fromInline;
|
|
37519
|
+
if (isUserControlCancellation(body)) return "cancelled";
|
|
37520
|
+
const trimmed = body.trim();
|
|
37521
|
+
if (/^(?:cancelled|canceled)$/i.test(trimmed)) return "cancelled";
|
|
37522
|
+
if (/^(?:interrupted by (?:user|process restart)|tool execution aborted|\[tool execution was interrupted\])$/i.test(
|
|
37523
|
+
trimmed
|
|
37524
|
+
)) {
|
|
37525
|
+
return "cancelled";
|
|
37526
|
+
}
|
|
37527
|
+
if (/^the user doesn't want to proceed with this tool use\b/i.test(trimmed)) return "cancelled";
|
|
37528
|
+
return "";
|
|
37529
|
+
}
|
|
37530
|
+
|
|
37479
37531
|
// src/runtime/shared/tool-card-model/git-result.mjs
|
|
37480
37532
|
function gitResultExitCode(text) {
|
|
37481
37533
|
const match = /(?:^(?:## [^\n]+\n)?|\n## [^\n]+\n)exit ([1-9]\d*)\r?(?:\n|$)/.exec(String(text ?? ""));
|
|
@@ -37484,6 +37536,11 @@ function gitResultExitCode(text) {
|
|
|
37484
37536
|
function gitResultError(text) {
|
|
37485
37537
|
return /(?:^|\n)error: command failed: [^\n]+|^error: [^\n]+/.exec(String(text ?? ""))?.[0].trim() || "";
|
|
37486
37538
|
}
|
|
37539
|
+
function gitTerminalStatus(text) {
|
|
37540
|
+
if (gitResultError(text)) return "failed";
|
|
37541
|
+
if (gitResultExitCode(text) !== null && !hasBenignExitOutcome(text)) return "exit";
|
|
37542
|
+
return "";
|
|
37543
|
+
}
|
|
37487
37544
|
|
|
37488
37545
|
// src/runtime/shared/tool-result-summary.mjs
|
|
37489
37546
|
function countNonEmptyLines(text) {
|
|
@@ -37686,6 +37743,7 @@ function summarizeLineCount({ text, trimmed }, { zero, singular, plural }) {
|
|
|
37686
37743
|
function summarizeReadResult({ text, trimmed }) {
|
|
37687
37744
|
if (/^\[image:/i.test(trimmed)) return "Image";
|
|
37688
37745
|
if (!trimmed) return null;
|
|
37746
|
+
if (trimmed.startsWith("(no lines in range")) return "0 lines";
|
|
37689
37747
|
const n = text.split("\n").length;
|
|
37690
37748
|
return `${n} ${pluralize(n, "line")}`;
|
|
37691
37749
|
}
|
|
@@ -39661,41 +39719,9 @@ function normalizeCountMap(value = {}) {
|
|
|
39661
39719
|
return out;
|
|
39662
39720
|
}
|
|
39663
39721
|
|
|
39664
|
-
// src/runtime/shared/tool-status.mjs
|
|
39665
|
-
function normalizeToolTerminalStatus(value) {
|
|
39666
|
-
const raw = String(value || "").trim().toLowerCase();
|
|
39667
|
-
if (!raw) return "";
|
|
39668
|
-
if (/^(running|pending|queued|in_progress|in-progress)$/.test(raw)) return "running";
|
|
39669
|
-
if (/^(completed|complete|done|success|succeeded|ok)$/.test(raw)) return "completed";
|
|
39670
|
-
if (/^(failed|fail|error|errored|timeout|timed_out|killed)$/.test(raw)) return "failed";
|
|
39671
|
-
if (/^(cancelled|canceled|cancel|cancel[-_ ]unconfirmed|cancel[-_ ]pending|cancelling|canceling)$/.test(raw))
|
|
39672
|
-
return "cancelled";
|
|
39673
|
-
if (/^(denied|deny|refused|rejected)$/.test(raw)) return "denied";
|
|
39674
|
-
return "";
|
|
39675
|
-
}
|
|
39676
|
-
function toolResultTerminalStatus(text) {
|
|
39677
|
-
const body = String(text || "");
|
|
39678
|
-
const tagged = body.match(/<status[^>]*>([\s\S]*?)<\/status>/i)?.[1]?.trim();
|
|
39679
|
-
if (tagged) return normalizeToolTerminalStatus(tagged);
|
|
39680
|
-
const bracketed = body.match(/^\[status:\s*([^\]]*)\]/im)?.[1]?.trim();
|
|
39681
|
-
if (bracketed) return normalizeToolTerminalStatus(bracketed);
|
|
39682
|
-
const inline = body.match(/^(?:status|state):\s*([^\s·,;]+)/im)?.[1]?.trim();
|
|
39683
|
-
const fromInline = normalizeToolTerminalStatus(inline);
|
|
39684
|
-
if (fromInline) return fromInline;
|
|
39685
|
-
const trimmed = body.trim();
|
|
39686
|
-
if (/^(?:cancelled|canceled)$/i.test(trimmed)) return "cancelled";
|
|
39687
|
-
if (/^(?:interrupted by (?:user|process restart)|tool execution aborted|\[tool execution was interrupted\])$/i.test(
|
|
39688
|
-
trimmed
|
|
39689
|
-
)) {
|
|
39690
|
-
return "cancelled";
|
|
39691
|
-
}
|
|
39692
|
-
if (/^the user doesn't want to proceed with this tool use\b/i.test(trimmed)) return "cancelled";
|
|
39693
|
-
return "";
|
|
39694
|
-
}
|
|
39695
|
-
|
|
39696
39722
|
// src/runtime/shared/tool-card-model/terminal-status.mjs
|
|
39697
39723
|
function shellResultStatus(value) {
|
|
39698
|
-
const match =
|
|
39724
|
+
const match = leadingResultBlock(value).match(
|
|
39699
39725
|
/(?:^|\b)status:\s*(running|pending|queued|completed|failed|cancelled|canceled)\b/im
|
|
39700
39726
|
);
|
|
39701
39727
|
return match ? String(match[1] || "").toLowerCase() : "";
|
|
@@ -39730,6 +39756,7 @@ var TERMINAL_STATUS_LABELS = /* @__PURE__ */ new Map([
|
|
|
39730
39756
|
["cancelled", "Cancelled"],
|
|
39731
39757
|
["denied", "Denied"]
|
|
39732
39758
|
]);
|
|
39759
|
+
var BARE_STATUS_WORDS = new Set([...TERMINAL_STATUS_LABELS.values()].map((label) => label.toLowerCase()));
|
|
39733
39760
|
function displayTerminalStatus(value) {
|
|
39734
39761
|
if (String(value || "").trim().toLowerCase() === "exit")
|
|
39735
39762
|
return "Exited";
|
|
@@ -39772,6 +39799,7 @@ function mergeTerminalDetail(status, detail = "") {
|
|
|
39772
39799
|
if (label === "Finished" && text) return text;
|
|
39773
39800
|
if (!text) return label;
|
|
39774
39801
|
if (text.toLowerCase().startsWith(label.toLowerCase())) return text;
|
|
39802
|
+
if (BARE_STATUS_WORDS.has(text.toLowerCase())) return label;
|
|
39775
39803
|
return `${label} \xB7 ${text}`;
|
|
39776
39804
|
}
|
|
39777
39805
|
|
|
@@ -40275,9 +40303,10 @@ function deriveCardStatus(base, { normalizedName, parsedArgs, isShellSurface },
|
|
|
40275
40303
|
parsedArgs
|
|
40276
40304
|
);
|
|
40277
40305
|
const agentCompletionDetail = !pending && isAgentTool(normalizedName) && !agentHeaderFailure ? agentTerminalDetail(parsedArgs?.status, isError, elapsed, parsedArgs?.error) : "";
|
|
40278
|
-
const
|
|
40279
|
-
const failedOrCompleted = isError || failedCount > 0
|
|
40280
|
-
const terminalStatus = pending ? "running" : shellStatus || normalizeTerminalStatus(display.backgroundMeta?.status) || normalizeTerminalStatus(parsedArgs?.status) || resultTerminalStatus(display.displayedResultText) ||
|
|
40306
|
+
const gitStatus = normalizedName === "git" ? gitTerminalStatus(display.displayedResultText) : "";
|
|
40307
|
+
const failedOrCompleted = isError || failedCount > 0 ? "failed" : "completed";
|
|
40308
|
+
const terminalStatus = pending ? "running" : shellStatus || gitStatus || normalizeTerminalStatus(display.backgroundMeta?.status) || normalizeTerminalStatus(parsedArgs?.status) || resultTerminalStatus(display.displayedResultText) || // A one-line error body is hidden from display, so read the raw result.
|
|
40309
|
+
(isUserControlCancellation(base.rt) ? "cancelled" : "") || failedOrCompleted;
|
|
40281
40310
|
return {
|
|
40282
40311
|
shellStatus,
|
|
40283
40312
|
shellElapsed,
|
|
@@ -47659,7 +47688,7 @@ function projectLitellmRow(row) {
|
|
|
47659
47688
|
if (typeof value === "number" && Number.isFinite(value)) out[field] = value;
|
|
47660
47689
|
}
|
|
47661
47690
|
for (const [field, value] of Object.entries(row)) {
|
|
47662
|
-
if (/^(?:input_cost_per_token|output_cost_per_token|cache_read_input_token_cost|cache_creation_input_token_cost)_above_\d+k_tokens
|
|
47691
|
+
if (/^(?:input_cost_per_token|output_cost_per_token|cache_read_input_token_cost|cache_creation_input_token_cost)(?:_above_\d+k_tokens)?(?:_priority)?$/.test(
|
|
47663
47692
|
field
|
|
47664
47693
|
) && typeof value === "number" && Number.isFinite(value))
|
|
47665
47694
|
out[field] = value;
|
|
@@ -47803,6 +47832,28 @@ var PRICED_VARIANTS = Object.freeze({
|
|
|
47803
47832
|
"grok-4.7-build-fast": Object.freeze({ base: "grok-4.7", rateMultiplier: 2 })
|
|
47804
47833
|
})
|
|
47805
47834
|
});
|
|
47835
|
+
var CURSOR_PRICING = Object.freeze({
|
|
47836
|
+
"composer-2.5": {
|
|
47837
|
+
inputCostPerM: 0.5,
|
|
47838
|
+
cacheReadCostPerM: 0.2,
|
|
47839
|
+
outputCostPerM: 2.5,
|
|
47840
|
+
fast: { inputCostPerM: 3, cacheReadCostPerM: 0.5, outputCostPerM: 15 }
|
|
47841
|
+
},
|
|
47842
|
+
"grok-4.7": {
|
|
47843
|
+
fast: {
|
|
47844
|
+
inputCostPerM: 4,
|
|
47845
|
+
cacheReadCostPerM: 1,
|
|
47846
|
+
outputCostPerM: 12,
|
|
47847
|
+
// Fast long context (>256k input) bills at 3x the standard rates.
|
|
47848
|
+
pricingTiers: [{ aboveInputTokens: 256e3, inputCostPerM: 6, cacheReadCostPerM: 1.5, outputCostPerM: 18 }]
|
|
47849
|
+
}
|
|
47850
|
+
},
|
|
47851
|
+
"grok-4.6": { fast: { inputCostPerM: 4, cacheReadCostPerM: 1, outputCostPerM: 12 } },
|
|
47852
|
+
"grok-4.5": { fast: { inputCostPerM: 4, cacheReadCostPerM: 1, outputCostPerM: 18 } },
|
|
47853
|
+
"claude-opus-4-7": {
|
|
47854
|
+
fast: { inputCostPerM: 30, cacheWriteCostPerM: 37.5, cacheReadCostPerM: 3, outputCostPerM: 150 }
|
|
47855
|
+
}
|
|
47856
|
+
});
|
|
47806
47857
|
|
|
47807
47858
|
// src/runtime/shared/statusline/statusline-format.mjs
|
|
47808
47859
|
var statusText = rgb(198, 198, 198);
|
|
@@ -57331,7 +57382,7 @@ function mixdogConfigBaseDir() {
|
|
|
57331
57382
|
function getBackupRoot() {
|
|
57332
57383
|
return process.env.MIXDOG_USER_DATA_BACKUP_ROOT || join10(mixdogConfigBaseDir(), "backups", "user-data");
|
|
57333
57384
|
}
|
|
57334
|
-
var USER_DATA_FILES = ["mixdog-config.json"
|
|
57385
|
+
var USER_DATA_FILES = ["mixdog-config.json"];
|
|
57335
57386
|
var USER_DATA_DIRS = ["schedules", "webhooks", "workflows"];
|
|
57336
57387
|
function stamp() {
|
|
57337
57388
|
return (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
@@ -49,16 +49,22 @@ export function createSessionSettingsApi(bag) {
|
|
|
49
49
|
},
|
|
50
50
|
{ busyResult: false, onRelease: flushEmitImmediate }
|
|
51
51
|
),
|
|
52
|
-
setFast: withCommandLock(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
setFast: withCommandLock(
|
|
53
|
+
async (value) => {
|
|
54
|
+
const enabled = await runtime.setFast(value);
|
|
55
|
+
set({ ...routeState() });
|
|
56
|
+
return enabled;
|
|
57
|
+
},
|
|
58
|
+
{ onRelease: flushEmitImmediate }
|
|
59
|
+
),
|
|
60
|
+
toggleFast: withCommandLock(
|
|
61
|
+
async () => {
|
|
62
|
+
const enabled = await runtime.toggleFast();
|
|
63
|
+
set({ ...routeState() });
|
|
64
|
+
return enabled;
|
|
65
|
+
},
|
|
66
|
+
{ onRelease: flushEmitImmediate }
|
|
67
|
+
),
|
|
62
68
|
setToolMode: (m) => {
|
|
63
69
|
void runtime
|
|
64
70
|
.setToolMode(m)
|
|
@@ -478,11 +478,16 @@ function promptFootprintTokens(provider, usage) {
|
|
|
478
478
|
return isInclusiveProvider(provider) ? input : input + cacheRead + cacheWrite;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
function usageCostUsd(routeInfo,
|
|
481
|
+
function usageCostUsd(routeInfo, providerOut) {
|
|
482
|
+
const usage = providerOut?.usage || {};
|
|
482
483
|
if (Number.isFinite(Number(usage?.costUsd))) return round(Number(usage.costUsd), 6);
|
|
483
484
|
return computeCostUsd({
|
|
484
485
|
provider: routeInfo?.provider,
|
|
485
486
|
model: routeInfo?.model,
|
|
487
|
+
pricingModel: providerOut?.pricingModel,
|
|
488
|
+
kind: routeInfo?.providerKind || providerKind(routeInfo?.provider),
|
|
489
|
+
requestServiceTier: providerOut?.requestServiceTier,
|
|
490
|
+
serviceTier: cleanString(providerOut?.serviceTier) || cleanString(usage?.raw?.service_tier) || undefined,
|
|
486
491
|
inputTokens: num(usage?.inputTokens, 0),
|
|
487
492
|
outputTokens: num(usage?.outputTokens, 0),
|
|
488
493
|
cacheReadTokens: num(usage?.cachedTokens ?? usage?.cacheReadTokens, 0),
|
|
@@ -516,7 +521,7 @@ export function summarizeGatewayUsage(routeInfo, providerOut, compact = null, du
|
|
|
516
521
|
contextUsedPct = Math.min(100, round(promptTokens * 100 / boundaryTokens, 2));
|
|
517
522
|
}
|
|
518
523
|
}
|
|
519
|
-
const costUsd = usageCostUsd(routeInfo,
|
|
524
|
+
const costUsd = usageCostUsd(routeInfo, providerOut);
|
|
520
525
|
const usageCompact = compact && typeof compact === 'object' ? { ...compact } : compact;
|
|
521
526
|
return {
|
|
522
527
|
at: Date.now(),
|
|
@@ -4,8 +4,6 @@ name: Default
|
|
|
4
4
|
description: "Handle tasks as requested."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Default
|
|
8
|
-
|
|
9
7
|
Consult the user and build the work plan together. Explicit read-only requests
|
|
10
8
|
proceed immediately. When file edits, state mutation, or delegation are
|
|
11
9
|
required, investigate and plan only until the user approves the latest plan.
|