@tokenfactory/acc-runner 0.25.0 → 0.27.0
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 +77 -4
- package/package.json +1 -1
- package/dist/anthropic-auth.d.ts +0 -53
- package/dist/anthropic-auth.d.ts.map +0 -1
- package/dist/anthropic-auth.js +0 -89
- package/dist/anthropic-auth.js.map +0 -1
- package/dist/bin-resolve.d.ts +0 -16
- package/dist/bin-resolve.d.ts.map +0 -1
- package/dist/bin-resolve.js +0 -35
- package/dist/bin-resolve.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -128
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts +0 -121
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -396
- package/dist/config.js.map +0 -1
- package/dist/cost-pricing.d.ts +0 -130
- package/dist/cost-pricing.d.ts.map +0 -1
- package/dist/cost-pricing.js +0 -191
- package/dist/cost-pricing.js.map +0 -1
- package/dist/doctor.d.ts +0 -37
- package/dist/doctor.d.ts.map +0 -1
- package/dist/doctor.js +0 -658
- package/dist/doctor.js.map +0 -1
- package/dist/failure-classifier.d.ts +0 -112
- package/dist/failure-classifier.d.ts.map +0 -1
- package/dist/failure-classifier.js +0 -353
- package/dist/failure-classifier.js.map +0 -1
- package/dist/gh.d.ts +0 -22
- package/dist/gh.d.ts.map +0 -1
- package/dist/gh.js +0 -48
- package/dist/gh.js.map +0 -1
- package/dist/git.d.ts +0 -50
- package/dist/git.d.ts.map +0 -1
- package/dist/git.js +0 -127
- package/dist/git.js.map +0 -1
- package/dist/github-client.d.ts +0 -133
- package/dist/github-client.d.ts.map +0 -1
- package/dist/github-client.js +0 -234
- package/dist/github-client.js.map +0 -1
- package/dist/keychain.d.ts +0 -21
- package/dist/keychain.d.ts.map +0 -1
- package/dist/keychain.js +0 -45
- package/dist/keychain.js.map +0 -1
- package/dist/login.d.ts +0 -12
- package/dist/login.d.ts.map +0 -1
- package/dist/login.js +0 -133
- package/dist/login.js.map +0 -1
- package/dist/logout.d.ts +0 -2
- package/dist/logout.d.ts.map +0 -1
- package/dist/logout.js +0 -31
- package/dist/logout.js.map +0 -1
- package/dist/mcp-spawn.d.ts +0 -30
- package/dist/mcp-spawn.d.ts.map +0 -1
- package/dist/mcp-spawn.js +0 -145
- package/dist/mcp-spawn.js.map +0 -1
- package/dist/messaging.d.ts +0 -49
- package/dist/messaging.d.ts.map +0 -1
- package/dist/messaging.js +0 -36
- package/dist/messaging.js.map +0 -1
- package/dist/pkg-version.d.ts +0 -3
- package/dist/pkg-version.d.ts.map +0 -1
- package/dist/pkg-version.js +0 -20
- package/dist/pkg-version.js.map +0 -1
- package/dist/profiles/designer-prompt.d.ts +0 -18
- package/dist/profiles/designer-prompt.d.ts.map +0 -1
- package/dist/profiles/designer-prompt.js +0 -172
- package/dist/profiles/designer-prompt.js.map +0 -1
- package/dist/profiles/developer-prompt.d.ts +0 -24
- package/dist/profiles/developer-prompt.d.ts.map +0 -1
- package/dist/profiles/developer-prompt.js +0 -24
- package/dist/profiles/developer-prompt.js.map +0 -1
- package/dist/profiles/manager-prompt.d.ts +0 -34
- package/dist/profiles/manager-prompt.d.ts.map +0 -1
- package/dist/profiles/manager-prompt.js +0 -93
- package/dist/profiles/manager-prompt.js.map +0 -1
- package/dist/profiles/tester-prompt.d.ts +0 -28
- package/dist/profiles/tester-prompt.d.ts.map +0 -1
- package/dist/profiles/tester-prompt.js +0 -165
- package/dist/profiles/tester-prompt.js.map +0 -1
- package/dist/prompt.d.ts +0 -38
- package/dist/prompt.d.ts.map +0 -1
- package/dist/prompt.js +0 -78
- package/dist/prompt.js.map +0 -1
- package/dist/runtime/cache-dir.d.ts +0 -2
- package/dist/runtime/cache-dir.d.ts.map +0 -1
- package/dist/runtime/cache-dir.js +0 -15
- package/dist/runtime/cache-dir.js.map +0 -1
- package/dist/runtime/conflict-resolver.d.ts +0 -65
- package/dist/runtime/conflict-resolver.d.ts.map +0 -1
- package/dist/runtime/conflict-resolver.js +0 -477
- package/dist/runtime/conflict-resolver.js.map +0 -1
- package/dist/runtime/expand-args.d.ts +0 -28
- package/dist/runtime/expand-args.d.ts.map +0 -1
- package/dist/runtime/expand-args.js +0 -50
- package/dist/runtime/expand-args.js.map +0 -1
- package/dist/runtime/locks.d.ts +0 -21
- package/dist/runtime/locks.d.ts.map +0 -1
- package/dist/runtime/locks.js +0 -97
- package/dist/runtime/locks.js.map +0 -1
- package/dist/runtime/provision-mutex.d.ts +0 -37
- package/dist/runtime/provision-mutex.d.ts.map +0 -1
- package/dist/runtime/provision-mutex.js +0 -67
- package/dist/runtime/provision-mutex.js.map +0 -1
- package/dist/runtime/quarantine.d.ts +0 -26
- package/dist/runtime/quarantine.d.ts.map +0 -1
- package/dist/runtime/quarantine.js +0 -50
- package/dist/runtime/quarantine.js.map +0 -1
- package/dist/runtime/resolution-integrity.d.ts +0 -86
- package/dist/runtime/resolution-integrity.d.ts.map +0 -1
- package/dist/runtime/resolution-integrity.js +0 -248
- package/dist/runtime/resolution-integrity.js.map +0 -1
- package/dist/runtime/reviewer.d.ts +0 -81
- package/dist/runtime/reviewer.d.ts.map +0 -1
- package/dist/runtime/reviewer.js +0 -374
- package/dist/runtime/reviewer.js.map +0 -1
- package/dist/runtime/rework.d.ts +0 -48
- package/dist/runtime/rework.d.ts.map +0 -1
- package/dist/runtime/rework.js +0 -136
- package/dist/runtime/rework.js.map +0 -1
- package/dist/runtime/singleton.d.ts +0 -47
- package/dist/runtime/singleton.d.ts.map +0 -1
- package/dist/runtime/singleton.js +0 -200
- package/dist/runtime/singleton.js.map +0 -1
- package/dist/runtime/version-drift.d.ts +0 -31
- package/dist/runtime/version-drift.d.ts.map +0 -1
- package/dist/runtime/version-drift.js +0 -114
- package/dist/runtime/version-drift.js.map +0 -1
- package/dist/runtime/worktree.d.ts +0 -74
- package/dist/runtime/worktree.d.ts.map +0 -1
- package/dist/runtime/worktree.js +0 -206
- package/dist/runtime/worktree.js.map +0 -1
- package/dist/secrets/inject.d.ts +0 -70
- package/dist/secrets/inject.d.ts.map +0 -1
- package/dist/secrets/inject.js +0 -102
- package/dist/secrets/inject.js.map +0 -1
- package/dist/supabase.d.ts +0 -4
- package/dist/supabase.d.ts.map +0 -1
- package/dist/supabase.js +0 -36
- package/dist/supabase.js.map +0 -1
- package/dist/task-runner.d.ts +0 -313
- package/dist/task-runner.d.ts.map +0 -1
- package/dist/task-runner.js +0 -1766
- package/dist/task-runner.js.map +0 -1
- package/dist/token-provider.d.ts +0 -50
- package/dist/token-provider.d.ts.map +0 -1
- package/dist/token-provider.js +0 -177
- package/dist/token-provider.js.map +0 -1
- package/dist/types.d.ts +0 -120
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -16
- package/dist/types.js.map +0 -1
- package/dist/version-check.d.ts +0 -17
- package/dist/version-check.d.ts.map +0 -1
- package/dist/version-check.js +0 -56
- package/dist/version-check.js.map +0 -1
- package/dist/watch.d.ts +0 -295
- package/dist/watch.d.ts.map +0 -1
- package/dist/watch.js +0 -1532
- package/dist/watch.js.map +0 -1
package/dist/cost-pricing.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
const SONNET = {
|
|
2
|
-
inputPer1M: 3,
|
|
3
|
-
outputPer1M: 15,
|
|
4
|
-
cacheWritePer1M: 3.75,
|
|
5
|
-
cacheReadPer1M: 0.3,
|
|
6
|
-
};
|
|
7
|
-
const OPUS = {
|
|
8
|
-
inputPer1M: 15,
|
|
9
|
-
outputPer1M: 75,
|
|
10
|
-
cacheWritePer1M: 18.75,
|
|
11
|
-
cacheReadPer1M: 1.5,
|
|
12
|
-
};
|
|
13
|
-
const HAIKU = {
|
|
14
|
-
inputPer1M: 1,
|
|
15
|
-
outputPer1M: 5,
|
|
16
|
-
cacheWritePer1M: 1.25,
|
|
17
|
-
cacheReadPer1M: 0.1,
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Embedded last-known-good snapshot, used as the cache's initial value
|
|
21
|
-
* and as the permanent fallback when `fetchPricing` can't reach the
|
|
22
|
-
* server. Kept in sync with `api/llm/pricing.ts` by hand.
|
|
23
|
-
*/
|
|
24
|
-
export const MODEL_PRICING = {
|
|
25
|
-
"claude-opus-4-7": OPUS,
|
|
26
|
-
"claude-opus-4-6": OPUS,
|
|
27
|
-
"claude-opus-4": OPUS,
|
|
28
|
-
"claude-sonnet-4-7": SONNET,
|
|
29
|
-
"claude-sonnet-4-6": SONNET,
|
|
30
|
-
"claude-sonnet-4": SONNET,
|
|
31
|
-
"claude-haiku-4-5": HAIKU,
|
|
32
|
-
"claude-haiku-4": HAIKU,
|
|
33
|
-
};
|
|
34
|
-
const FALLBACK_VERSION = "fallback-2026-02-01";
|
|
35
|
-
let currentPricing = MODEL_PRICING;
|
|
36
|
-
let currentVersion = FALLBACK_VERSION;
|
|
37
|
-
/**
|
|
38
|
-
* Fetch the server pricing table and atomically replace the in-memory
|
|
39
|
-
* cache. Subsequent `priceUsdCents` calls in this process use the
|
|
40
|
-
* fetched values. On failure leaves the existing cache untouched and
|
|
41
|
-
* logs one stderr line; the runner stays usable on the fallback.
|
|
42
|
-
*
|
|
43
|
-
* Intentionally NOT deduped across calls — operators can rewarm the
|
|
44
|
-
* cache mid-process by calling this again if pricing rolls over.
|
|
45
|
-
*/
|
|
46
|
-
export async function fetchPricing(baseUrl) {
|
|
47
|
-
const url = `${baseUrl.replace(/\/+$/, "")}/api/llm/pricing`;
|
|
48
|
-
try {
|
|
49
|
-
const res = await fetch(url, {
|
|
50
|
-
headers: { Accept: "application/json", "User-Agent": "acc-runner" },
|
|
51
|
-
});
|
|
52
|
-
if (!res.ok)
|
|
53
|
-
throw new Error(`status ${res.status}`);
|
|
54
|
-
const body = (await res.json());
|
|
55
|
-
const anthropic = body?.providers?.anthropic;
|
|
56
|
-
if (!anthropic || typeof anthropic !== "object") {
|
|
57
|
-
throw new Error("missing providers.anthropic");
|
|
58
|
-
}
|
|
59
|
-
const table = parseAnthropicTable(anthropic);
|
|
60
|
-
if (Object.keys(table).length === 0) {
|
|
61
|
-
throw new Error("empty providers.anthropic");
|
|
62
|
-
}
|
|
63
|
-
currentPricing = table;
|
|
64
|
-
currentVersion = typeof body.version === "string" ? body.version : "unknown";
|
|
65
|
-
return { ok: true, version: currentVersion };
|
|
66
|
-
}
|
|
67
|
-
catch (err) {
|
|
68
|
-
const reason = err.message;
|
|
69
|
-
process.stderr.write(`acc-runner: pricing fetch failed (${reason}); using embedded fallback\n`);
|
|
70
|
-
return { ok: false, version: currentVersion, reason };
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function parseAnthropicTable(wire) {
|
|
74
|
-
const out = {};
|
|
75
|
-
for (const [model, p] of Object.entries(wire)) {
|
|
76
|
-
if (typeof p?.input !== "number" ||
|
|
77
|
-
typeof p?.output !== "number" ||
|
|
78
|
-
typeof p?.cache_read !== "number" ||
|
|
79
|
-
typeof p?.cache_write !== "number")
|
|
80
|
-
continue;
|
|
81
|
-
out[model] = {
|
|
82
|
-
inputPer1M: p.input / 100,
|
|
83
|
-
outputPer1M: p.output / 100,
|
|
84
|
-
cacheReadPer1M: p.cache_read / 100,
|
|
85
|
-
cacheWritePer1M: p.cache_write / 100,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
return out;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Returns the pricing version currently in the cache. Useful for
|
|
92
|
-
* logging at task boundaries; not used in cost arithmetic.
|
|
93
|
-
*/
|
|
94
|
-
export function currentPricingVersion() {
|
|
95
|
-
return currentVersion;
|
|
96
|
-
}
|
|
97
|
-
/** Test hook: resets cache + version to the embedded fallback. */
|
|
98
|
-
export function _resetPricingForTests() {
|
|
99
|
-
currentPricing = MODEL_PRICING;
|
|
100
|
-
currentVersion = FALLBACK_VERSION;
|
|
101
|
-
}
|
|
102
|
-
export function pricingFor(model) {
|
|
103
|
-
// Exact match wins; otherwise pick the family by substring so a model
|
|
104
|
-
// string like "claude-sonnet-4-6-20251001" still routes to Sonnet.
|
|
105
|
-
// Substring fallback reads from `currentPricing` so a freshly fetched
|
|
106
|
-
// table immediately governs unknown model ids too.
|
|
107
|
-
if (currentPricing[model])
|
|
108
|
-
return currentPricing[model];
|
|
109
|
-
if (model.includes("opus"))
|
|
110
|
-
return currentPricing["claude-opus-4-7"] ?? OPUS;
|
|
111
|
-
if (model.includes("haiku"))
|
|
112
|
-
return currentPricing["claude-haiku-4-5"] ?? HAIKU;
|
|
113
|
-
return currentPricing["claude-sonnet-4-6"] ?? SONNET;
|
|
114
|
-
}
|
|
115
|
-
export function normalizeUsage(raw) {
|
|
116
|
-
return {
|
|
117
|
-
input_tokens: Math.max(0, Math.floor(raw?.input_tokens ?? 0)),
|
|
118
|
-
output_tokens: Math.max(0, Math.floor(raw?.output_tokens ?? 0)),
|
|
119
|
-
cache_read_tokens: Math.max(0, Math.floor(raw?.cache_read_input_tokens ?? 0)),
|
|
120
|
-
cache_write_tokens: Math.max(0, Math.floor(raw?.cache_creation_input_tokens ?? 0)),
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
export function priceUsdCents(model, usage) {
|
|
124
|
-
const p = pricingFor(model);
|
|
125
|
-
const usd = (usage.input_tokens * p.inputPer1M +
|
|
126
|
-
usage.output_tokens * p.outputPer1M +
|
|
127
|
-
usage.cache_read_tokens * p.cacheReadPer1M +
|
|
128
|
-
usage.cache_write_tokens * p.cacheWritePer1M) / 1_000_000;
|
|
129
|
-
return Math.round(usd * 100);
|
|
130
|
-
}
|
|
131
|
-
export function parseClaudeJson(stdout) {
|
|
132
|
-
const trimmed = stdout.trim();
|
|
133
|
-
if (!trimmed.startsWith("{"))
|
|
134
|
-
return null;
|
|
135
|
-
try {
|
|
136
|
-
const parsed = JSON.parse(trimmed);
|
|
137
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
138
|
-
return parsed;
|
|
139
|
-
}
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
catch {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export const MODEL_ALIASES = {
|
|
147
|
-
"claude-sonnet-4": { cli_alias: "sonnet", api_id: "claude-sonnet-4-6" },
|
|
148
|
-
"claude-opus-4": { cli_alias: "opus", api_id: "claude-opus-4-7" },
|
|
149
|
-
"claude-haiku-4": { cli_alias: "haiku", api_id: "claude-haiku-4-5" },
|
|
150
|
-
"claude-sonnet-4-6": { cli_alias: "claude-sonnet-4-6", api_id: "claude-sonnet-4-6" },
|
|
151
|
-
"claude-opus-4-7": { cli_alias: "claude-opus-4-7", api_id: "claude-opus-4-7" },
|
|
152
|
-
"claude-haiku-4-5": { cli_alias: "claude-haiku-4-5", api_id: "claude-haiku-4-5" },
|
|
153
|
-
};
|
|
154
|
-
let currentAliases = { ...MODEL_ALIASES };
|
|
155
|
-
/**
|
|
156
|
-
* Test hook: replace the in-memory alias table. Use this from tests
|
|
157
|
-
* that simulate a DB-fetched override; production code calls the
|
|
158
|
-
* embedded MODEL_ALIASES directly. Passing nothing resets to the
|
|
159
|
-
* embedded snapshot, mirroring `_resetPricingForTests`.
|
|
160
|
-
*/
|
|
161
|
-
export function registerAliases(table) {
|
|
162
|
-
currentAliases = table ? { ...table } : { ...MODEL_ALIASES };
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Map an `acc.models.id` to the string accepted by `claude --model`.
|
|
166
|
-
* Returns the input verbatim when unknown so unregistered model ids
|
|
167
|
-
* (a future v0.13 alias not yet in the embedded table; a CLI test
|
|
168
|
-
* fixture passing a literal `sonnet`) still spawn correctly.
|
|
169
|
-
*
|
|
170
|
-
* Empty / whitespace input passes through unchanged so callers that
|
|
171
|
-
* want the operator's CLI default (no `--model` flag at all) can
|
|
172
|
-
* detect it by trimming after this call. See task-runner.buildClaudeArgs.
|
|
173
|
-
*/
|
|
174
|
-
export function toCliAlias(modelId) {
|
|
175
|
-
const id = (modelId ?? "").trim();
|
|
176
|
-
if (!id)
|
|
177
|
-
return modelId ?? "";
|
|
178
|
-
return currentAliases[id]?.cli_alias ?? id;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Map an `acc.models.id` to the canonical Anthropic Messages API
|
|
182
|
-
* model ID. Used by the reviewer-agent before POSTing to
|
|
183
|
-
* api.anthropic.com. Same verbatim-fallback semantics as toCliAlias.
|
|
184
|
-
*/
|
|
185
|
-
export function toApiId(modelId) {
|
|
186
|
-
const id = (modelId ?? "").trim();
|
|
187
|
-
if (!id)
|
|
188
|
-
return modelId ?? "";
|
|
189
|
-
return currentAliases[id]?.api_id ?? id;
|
|
190
|
-
}
|
|
191
|
-
//# sourceMappingURL=cost-pricing.js.map
|
package/dist/cost-pricing.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cost-pricing.js","sourceRoot":"","sources":["../src/cost-pricing.ts"],"names":[],"mappings":"AAwCA,MAAM,MAAM,GAAiB;IAC3B,UAAU,EAAO,CAAC;IAClB,WAAW,EAAM,EAAE;IACnB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAG,GAAG;CACrB,CAAC;AAEF,MAAM,IAAI,GAAiB;IACzB,UAAU,EAAO,EAAE;IACnB,WAAW,EAAM,EAAE;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAG,GAAG;CACrB,CAAC;AAEF,MAAM,KAAK,GAAiB;IAC1B,UAAU,EAAO,CAAC;IAClB,WAAW,EAAM,CAAC;IAClB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAG,GAAG;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC;IACzD,iBAAiB,EAAI,IAAI;IACzB,iBAAiB,EAAI,IAAI;IACzB,eAAe,EAAM,IAAI;IACzB,mBAAmB,EAAE,MAAM;IAC3B,mBAAmB,EAAE,MAAM;IAC3B,iBAAiB,EAAI,MAAM;IAC3B,kBAAkB,EAAG,KAAK;IAC1B,gBAAgB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;IAChE,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,CAAC;AAC/D,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,OAAkC;IAC3D,MAAM,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClC,IAAI,CAAC,EAAE;QAAE,OAAO,OAAO,IAAI,EAAE,CAAC;IAC9B,OAAO,cAAc,CAAC,EAAE,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,OAAkC;IACxD,MAAM,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClC,IAAI,CAAC,EAAE;QAAE,OAAO,OAAO,IAAI,EAAE,CAAC;IAC9B,OAAO,cAAc,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;AAC1C,CAAC"}
|
package/dist/doctor.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type RunnerConfig } from "./config.js";
|
|
2
|
-
import { type NpmLatestDeps } from "./runtime/version-drift.js";
|
|
3
|
-
export declare const LAUNCHD_LABEL = "com.tokenfactory.acc-runner";
|
|
4
|
-
export declare function launchdPlistPath(): string;
|
|
5
|
-
export declare const ENV_NAMES: Record<keyof RunnerConfig, string>;
|
|
6
|
-
export declare const CONFIG_LABELS: Record<keyof RunnerConfig, string>;
|
|
7
|
-
interface CheckOutcome {
|
|
8
|
-
name: string;
|
|
9
|
-
ok: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* v0.14.0 (T-54-2): advisory severity. When true the outcome renders as
|
|
12
|
-
* [WARN] (yellow) and does NOT count toward the exit code — used for the
|
|
13
|
-
* version-drift checks where a stale binary is worth flagging but is not
|
|
14
|
-
* a hard environment failure. `ok` is false for a WARN.
|
|
15
|
-
*/
|
|
16
|
-
warn?: boolean;
|
|
17
|
-
detail: string;
|
|
18
|
-
fix?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface SingletonCheckDeps {
|
|
21
|
-
/** Injectable foreign-pid scanner for tests. Defaults to the real ps scan. */
|
|
22
|
-
scan?: (selfPid: number) => Promise<number[]>;
|
|
23
|
-
}
|
|
24
|
-
export declare function checkSingleton(cfg: RunnerConfig | null, deps?: SingletonCheckDeps): Promise<CheckOutcome>;
|
|
25
|
-
export declare function checkUpdateAvailable(deps?: NpmLatestDeps): Promise<CheckOutcome>;
|
|
26
|
-
export interface ClaudeDriftDeps {
|
|
27
|
-
/** Injectable current-version probe for tests. Defaults to the real CLI call. */
|
|
28
|
-
currentVersion?: () => Promise<string | null>;
|
|
29
|
-
}
|
|
30
|
-
export declare function checkClaudeDrift(deps?: ClaudeDriftDeps): Promise<CheckOutcome>;
|
|
31
|
-
export interface DoctorOptions {
|
|
32
|
-
/** Stub the checks for tests. */
|
|
33
|
-
checks?: Array<() => Promise<CheckOutcome>>;
|
|
34
|
-
}
|
|
35
|
-
export declare function doctorCommand(options?: DoctorOptions): Promise<number>;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=doctor.d.ts.map
|
package/dist/doctor.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAYA,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAajF,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AAIpC,eAAO,MAAM,aAAa,gCAAgC,CAAC;AAC3D,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,YAAY,EAAE,MAAM,CASxD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,M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