chompyy 0.5.0 → 0.7.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 +14 -1
- package/dist/advice.js +98 -1
- package/dist/agentlimits.js +77 -0
- package/dist/agentusage.js +96 -0
- package/dist/approvals.js +129 -0
- package/dist/appstate.js +73 -3
- package/dist/away.js +48 -5
- package/dist/blueprint.js +3 -7
- package/dist/board.js +1 -0
- package/dist/cli.js +343 -18
- package/dist/codexquota.js +106 -0
- package/dist/codexusage.js +10 -0
- package/dist/config.js +2 -0
- package/dist/context.js +30 -0
- package/dist/costs.js +41 -2
- package/dist/demon.js +20 -0
- package/dist/detect.js +38 -6
- package/dist/didwork.js +26 -0
- package/dist/label.js +33 -0
- package/dist/menu.js +17 -0
- package/dist/nightcap.js +72 -0
- package/dist/nudge.js +70 -24
- package/dist/pacing.js +16 -1
- package/dist/punchcard.js +39 -0
- package/dist/questions.js +71 -0
- package/dist/recap.js +74 -0
- package/dist/receipt.js +48 -0
- package/dist/recipe.js +79 -0
- package/dist/savings.js +111 -0
- package/dist/stamps.js +14 -0
- package/dist/suggest.js +15 -5
- package/dist/triggers.js +5 -0
- package/dist/usage.js +21 -1
- package/dist/vendor/codeburn/antigravity.js +309 -0
- package/dist/vendor/codeburn/codex.js +429 -0
- package/dist/vendor/codeburn/copilot.js +292 -0
- package/dist/vendor/codeburn/gemini.js +195 -0
- package/dist/vendor/codeburn/grokbot.js +182 -0
- package/dist/vendor/codeburn/kimi.js +178 -0
- package/dist/vendor/codeburn/shims/chalk.js +14 -0
- package/dist/vendor/codeburn/shims/strip-ansi.js +6 -0
- package/dist/vendor/codeburn/src/act/backup.js +83 -0
- package/dist/vendor/codeburn/src/act/model-defaults.js +151 -0
- package/dist/vendor/codeburn/src/act/types.js +37 -0
- package/dist/vendor/codeburn/src/bash-utils.js +204 -0
- package/dist/vendor/codeburn/src/behavioral-weight.js +47 -0
- package/dist/vendor/codeburn/src/cache-dir.js +26 -0
- package/dist/vendor/codeburn/src/cache-refresh-lock.js +543 -0
- package/dist/vendor/codeburn/src/cache-sweep.js +67 -0
- package/dist/vendor/codeburn/src/classifier.js +209 -0
- package/dist/vendor/codeburn/src/claude-identity.js +223 -0
- package/dist/vendor/codeburn/src/codex-cache.js +377 -0
- package/dist/vendor/codeburn/src/codex-fork-replay.js +232 -0
- package/dist/vendor/codeburn/src/codex-jsonl-fields.js +99 -0
- package/dist/vendor/codeburn/src/codex-session-index.js +113 -0
- package/dist/vendor/codeburn/src/codex-throughput.js +544 -0
- package/dist/vendor/codeburn/src/compare-stats.js +405 -0
- package/dist/vendor/codeburn/src/config.js +145 -0
- package/dist/vendor/codeburn/src/content-utils.js +56 -0
- package/dist/vendor/codeburn/src/context-tree-codex.js +329 -0
- package/dist/vendor/codeburn/src/context-tree.js +664 -0
- package/dist/vendor/codeburn/src/copilot-aiu.js +16 -0
- package/dist/vendor/codeburn/src/currency.js +189 -0
- package/dist/vendor/codeburn/src/cursor-cache.js +238 -0
- package/dist/vendor/codeburn/src/cursor-import.js +402 -0
- package/dist/vendor/codeburn/src/cursor-sync.js +256 -0
- package/dist/vendor/codeburn/src/daily-cache.js +2036 -0
- package/dist/vendor/codeburn/src/data/litellm-snapshot.json +1 -0
- package/dist/vendor/codeburn/src/data/pricing-fallback.json +1 -0
- package/dist/vendor/codeburn/src/day-aggregator.js +327 -0
- package/dist/vendor/codeburn/src/editor-data-dir.js +11 -0
- package/dist/vendor/codeburn/src/fetch-utils.js +18 -0
- package/dist/vendor/codeburn/src/format.js +118 -0
- package/dist/vendor/codeburn/src/fs-utils.js +270 -0
- package/dist/vendor/codeburn/src/git-origin.js +334 -0
- package/dist/vendor/codeburn/src/granular-history.js +328 -0
- package/dist/vendor/codeburn/src/hermes-session-ledger.js +512 -0
- package/dist/vendor/codeburn/src/launcher-homes.js +142 -0
- package/dist/vendor/codeburn/src/live-sessions.js +358 -0
- package/dist/vendor/codeburn/src/math-utils.js +8 -0
- package/dist/vendor/codeburn/src/menubar-json.js +294 -0
- package/dist/vendor/codeburn/src/models.js +1879 -0
- package/dist/vendor/codeburn/src/optimize-one-hour-cache.js +92 -0
- package/dist/vendor/codeburn/src/optimize.js +4110 -0
- package/dist/vendor/codeburn/src/parse-workers.js +219 -0
- package/dist/vendor/codeburn/src/parser.js +6955 -0
- package/dist/vendor/codeburn/src/path-privacy.js +26 -0
- package/dist/vendor/codeburn/src/plans.js +135 -0
- package/dist/vendor/codeburn/src/pr-signals.js +132 -0
- package/dist/vendor/codeburn/src/project-filter-warnings.js +33 -0
- package/dist/vendor/codeburn/src/provider-issues.js +30 -0
- package/dist/vendor/codeburn/src/providers/amp.js +286 -0
- package/dist/vendor/codeburn/src/providers/antigravity.js +1731 -0
- package/dist/vendor/codeburn/src/providers/claude.js +551 -0
- package/dist/vendor/codeburn/src/providers/cline-cli.js +401 -0
- package/dist/vendor/codeburn/src/providers/cline.js +63 -0
- package/dist/vendor/codeburn/src/providers/codebuff.js +336 -0
- package/dist/vendor/codeburn/src/providers/codewhale.js +442 -0
- package/dist/vendor/codeburn/src/providers/codex.js +1720 -0
- package/dist/vendor/codeburn/src/providers/command-code.js +196 -0
- package/dist/vendor/codeburn/src/providers/copilot.js +3278 -0
- package/dist/vendor/codeburn/src/providers/crush.js +226 -0
- package/dist/vendor/codeburn/src/providers/cursor-agent.js +837 -0
- package/dist/vendor/codeburn/src/providers/cursor.js +1163 -0
- package/dist/vendor/codeburn/src/providers/devin.js +569 -0
- package/dist/vendor/codeburn/src/providers/droid.js +324 -0
- package/dist/vendor/codeburn/src/providers/dsh.js +690 -0
- package/dist/vendor/codeburn/src/providers/forge.js +245 -0
- package/dist/vendor/codeburn/src/providers/gemini.js +230 -0
- package/dist/vendor/codeburn/src/providers/goose.js +252 -0
- package/dist/vendor/codeburn/src/providers/grok.js +581 -0
- package/dist/vendor/codeburn/src/providers/grokbot.js +290 -0
- package/dist/vendor/codeburn/src/providers/hermes.js +771 -0
- package/dist/vendor/codeburn/src/providers/ibm-bob.js +53 -0
- package/dist/vendor/codeburn/src/providers/index.js +360 -0
- package/dist/vendor/codeburn/src/providers/kilo-code.js +50 -0
- package/dist/vendor/codeburn/src/providers/kimi.js +363 -0
- package/dist/vendor/codeburn/src/providers/kimicode.js +402 -0
- package/dist/vendor/codeburn/src/providers/kiro.js +1174 -0
- package/dist/vendor/codeburn/src/providers/lingtai-tui.js +372 -0
- package/dist/vendor/codeburn/src/providers/mistral-vibe-unified.js +236 -0
- package/dist/vendor/codeburn/src/providers/mistral-vibe.js +405 -0
- package/dist/vendor/codeburn/src/providers/mux.js +242 -0
- package/dist/vendor/codeburn/src/providers/open-design.js +217 -0
- package/dist/vendor/codeburn/src/providers/openclaude.js +309 -0
- package/dist/vendor/codeburn/src/providers/openclaw.js +442 -0
- package/dist/vendor/codeburn/src/providers/opencode-file-parser.js +131 -0
- package/dist/vendor/codeburn/src/providers/opencode.js +91 -0
- package/dist/vendor/codeburn/src/providers/pi.js +429 -0
- package/dist/vendor/codeburn/src/providers/quickdesk.js +491 -0
- package/dist/vendor/codeburn/src/providers/qwen.js +193 -0
- package/dist/vendor/codeburn/src/providers/session-message.js +118 -0
- package/dist/vendor/codeburn/src/providers/sqlite-session-parser.js +457 -0
- package/dist/vendor/codeburn/src/providers/types.js +5 -0
- package/dist/vendor/codeburn/src/providers/vercel-gateway.js +135 -0
- package/dist/vendor/codeburn/src/providers/vscode-cline-parser.js +212 -0
- package/dist/vendor/codeburn/src/providers/warp.js +575 -0
- package/dist/vendor/codeburn/src/providers/zcode.js +249 -0
- package/dist/vendor/codeburn/src/providers/zed.js +187 -0
- package/dist/vendor/codeburn/src/providers/zerostack.js +139 -0
- package/dist/vendor/codeburn/src/quota/antigravity.js +310 -0
- package/dist/vendor/codeburn/src/quota/claude.js +244 -0
- package/dist/vendor/codeburn/src/quota/cursor.js +301 -0
- package/dist/vendor/codeburn/src/quota/security.js +299 -0
- package/dist/vendor/codeburn/src/quota/types.js +1 -0
- package/dist/vendor/codeburn/src/scan-facts.js +99 -0
- package/dist/vendor/codeburn/src/session-cache.js +3040 -0
- package/dist/vendor/codeburn/src/session-count-label.js +14 -0
- package/dist/vendor/codeburn/src/session-output.js +139 -0
- package/dist/vendor/codeburn/src/session-population.js +30 -0
- package/dist/vendor/codeburn/src/sessions-report.js +1342 -0
- package/dist/vendor/codeburn/src/sqlite.js +528 -0
- package/dist/vendor/codeburn/src/sync/otlp.js +420 -0
- package/dist/vendor/codeburn/src/telemetry-snapshot.js +244 -0
- package/dist/vendor/codeburn/src/token-estimate.js +5 -0
- package/dist/vendor/codeburn/src/types.js +16 -0
- package/dist/vendor/codeburn/src/work-units.js +126 -0
- package/dist/vendor/codeburn/src/workflow-insights.js +228 -0
- package/dist/vendor/codeburn/src/wsl.js +198 -0
- package/dist/vendor/codeburn/src/yield.js +666 -0
- package/dist/wastechecks.js +233 -0
- package/package.json +1 -1
package/dist/away.js
CHANGED
|
@@ -7,7 +7,7 @@ import { formatDuration } from './duration.js';
|
|
|
7
7
|
import { budgetGate } from './gate.js';
|
|
8
8
|
import { homePath } from './home.js';
|
|
9
9
|
import { windowView } from './quota.js';
|
|
10
|
-
import { recordRun, usedBetween } from './costs.js';
|
|
10
|
+
import { costRange, hitRate, readRuns, recordRun, usedBetween } from './costs.js';
|
|
11
11
|
import { applyPermissions } from './permissions.js';
|
|
12
12
|
import { tasteForPrompt } from './taste.js';
|
|
13
13
|
import { boxTempDirs } from './verify.js';
|
|
@@ -22,7 +22,9 @@ export function safetyRules(workdir) {
|
|
|
22
22
|
2. Nothing outward: no git push, merge, rebase or pull request; no sending email or messages, no posting,
|
|
23
23
|
no publishing packages, no purchases, no changes to remote services.
|
|
24
24
|
3. If you need a decision only the user can make, stop and write the question(s) to QUESTIONS.md in this
|
|
25
|
-
directory
|
|
25
|
+
directory. Don't guess on anything irreversible. The user picks an answer from a list, so for each question:
|
|
26
|
+
a "## " heading that asks it, one or two lines of why, then a line "Options:" and a numbered list of 2-4
|
|
27
|
+
options. Start each option with a short sentence saying what you'd do, and put "(Recommended)" on yours.
|
|
26
28
|
4. Stay inside the blueprint's scope. Don't commit: leave your changes as files in this directory. Chompyy
|
|
27
29
|
commits them to this folder's branch when you finish (the branch is how the user reviews and undoes it), and
|
|
28
30
|
the repo's .git is read-only to you. git status, git diff and git log work.
|
|
@@ -30,8 +32,9 @@ export function safetyRules(workdir) {
|
|
|
30
32
|
sandbox, so local commands like tests and scripts are fine. The sandbox has no network: don't install or
|
|
31
33
|
download anything (no npm install/ci, pip install, brew, curl). Dependencies the repo already has installed
|
|
32
34
|
are in place. If a check can't run without a download, don't retry it: say so in the CHECKS line.
|
|
33
|
-
6. End with a short summary: what you made, where it is, and how to check it.
|
|
34
|
-
|
|
35
|
+
6. End with a short summary: what you made, where it is, and how to check it. Then a line "RECIPE:" and under
|
|
36
|
+
it 2-3 lines starting with "- ", each saying what changed for the user in plain words: 12 words or fewer,
|
|
37
|
+
no file paths, line numbers or code. The very last line must be exactly one of:
|
|
35
38
|
CHECKS: passed — <what you ran>
|
|
36
39
|
CHECKS: failed — <what fails, and whether it failed before your change>
|
|
37
40
|
CHECKS: not run — <why you couldn't check>`;
|
|
@@ -130,6 +133,32 @@ export function parseChecks(output) {
|
|
|
130
133
|
return undefined;
|
|
131
134
|
return { result: last[1].toLowerCase(), why: last[2].trim() };
|
|
132
135
|
}
|
|
136
|
+
/** The plain steps under the agent's last "RECIPE:" line: what changed for the user, for the recipe card. At most 3. */
|
|
137
|
+
export function parseRecipe(output) {
|
|
138
|
+
const all = output.split('\n');
|
|
139
|
+
let at = -1;
|
|
140
|
+
all.forEach((l, i) => { if (/^\s*\**RECIPE:\**\s*$/i.test(l))
|
|
141
|
+
at = i; });
|
|
142
|
+
if (at < 0)
|
|
143
|
+
return [];
|
|
144
|
+
const steps = [];
|
|
145
|
+
for (const l of all.slice(at + 1)) {
|
|
146
|
+
const m = /^\s*(?:[-*]|\d+\.)\s+(.*)$/.exec(l);
|
|
147
|
+
if (!m) {
|
|
148
|
+
if (l.trim() === '' && steps.length === 0)
|
|
149
|
+
continue;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
const step = m[1].replace(/\*\*|`/g, '').trim();
|
|
153
|
+
if (step)
|
|
154
|
+
steps.push(step);
|
|
155
|
+
}
|
|
156
|
+
return steps.slice(0, 3);
|
|
157
|
+
}
|
|
158
|
+
/** The output without its RECIPE block, so the summary keeps to what was made and how to check it. */
|
|
159
|
+
function withoutRecipe(output) {
|
|
160
|
+
return output.replace(/^\s*\**RECIPE:\**\s*\n(?:\s*\n)?(?:\s*(?:[-*]|\d+\.)\s+.*(?:\n|$))*/gim, '');
|
|
161
|
+
}
|
|
133
162
|
function firstLines(text, n = 5) {
|
|
134
163
|
return text
|
|
135
164
|
.split('\n')
|
|
@@ -251,6 +280,16 @@ export async function runCard(id, timeoutMs, deps, trigger) {
|
|
|
251
280
|
const c = getCard(b, id);
|
|
252
281
|
c.column = 'running';
|
|
253
282
|
c.updatedAt = new Date(startedMs).toISOString();
|
|
283
|
+
const past = readRuns();
|
|
284
|
+
const est = costRange(c, past);
|
|
285
|
+
const right = hitRate(past);
|
|
286
|
+
c.oven = {
|
|
287
|
+
since: c.updatedAt,
|
|
288
|
+
until: new Date(startedMs + timeoutMs).toISOString(),
|
|
289
|
+
...(est ? { expect: new Date(startedMs + Math.min(est.durationMidMs, timeoutMs)).toISOString(), from: est.n } : {}),
|
|
290
|
+
// How often these ranges were right (a backtest over past runs): the timer's hover says it.
|
|
291
|
+
...(est && right && right.time.of >= 3 ? { right: right.time } : {}),
|
|
292
|
+
};
|
|
254
293
|
return { ...c };
|
|
255
294
|
});
|
|
256
295
|
out(`▶ #${card.id} ${card.title} (up to ${formatDuration(timeoutMs)})`);
|
|
@@ -260,6 +299,7 @@ export async function runCard(id, timeoutMs, deps, trigger) {
|
|
|
260
299
|
let status;
|
|
261
300
|
let exitCode = null;
|
|
262
301
|
let summaryText = '';
|
|
302
|
+
let recipe = [];
|
|
263
303
|
let checks;
|
|
264
304
|
let verified;
|
|
265
305
|
let tokens;
|
|
@@ -339,7 +379,8 @@ export async function runCard(id, timeoutMs, deps, trigger) {
|
|
|
339
379
|
? `Stopped by Chompyy: it was going in circles (${result.stuck}).`
|
|
340
380
|
: result.stalled
|
|
341
381
|
? `Stopped by Chompyy: ${result.stalled} (a hung command or a stalled agent), so the next card could run.`
|
|
342
|
-
: firstLines(result.output.replace(/^\s*CHECKS:.*$/gim, '')) || firstLines(result.stderr);
|
|
382
|
+
: firstLines(withoutRecipe(result.output).replace(/^\s*CHECKS:.*$/gim, '')) || firstLines(result.stderr);
|
|
383
|
+
recipe = parseRecipe(result.output);
|
|
343
384
|
log = `# prompt\n\n${prompt}\n\n# output\n\n${result.output}\n\n# stderr\n\n${result.stderr}\n`;
|
|
344
385
|
}
|
|
345
386
|
catch (err) {
|
|
@@ -363,6 +404,7 @@ export async function runCard(id, timeoutMs, deps, trigger) {
|
|
|
363
404
|
updateBoard((b) => {
|
|
364
405
|
const c = getCard(b, id);
|
|
365
406
|
c.column = 'review';
|
|
407
|
+
delete c.oven;
|
|
366
408
|
c.updatedAt = new Date(finishedMs).toISOString();
|
|
367
409
|
c.logPath = logPath;
|
|
368
410
|
c.run = {
|
|
@@ -376,6 +418,7 @@ export async function runCard(id, timeoutMs, deps, trigger) {
|
|
|
376
418
|
...(ws?.base ? { base: ws.base } : {}),
|
|
377
419
|
summary: summaryText,
|
|
378
420
|
...(checks ? { checks } : {}),
|
|
421
|
+
...(recipe.length ? { recipe } : {}),
|
|
379
422
|
cost,
|
|
380
423
|
...(verified ? { verified } : {}),
|
|
381
424
|
...(tokens ? { tokens } : {}),
|
package/dist/blueprint.js
CHANGED
|
@@ -128,9 +128,8 @@ export async function draftBlueprint(card, runner, opts) {
|
|
|
128
128
|
throw new Error(`claude exited with ${result.exitCode}: ${(result.stderr.trim() || result.output.trim()).slice(0, 300)}`);
|
|
129
129
|
return cleanBlueprint(result.output);
|
|
130
130
|
}
|
|
131
|
-
/** Most words
|
|
131
|
+
/** Most words a card title may have. Never cut by characters: a word cut in half reads as broken, and the board wraps titles. */
|
|
132
132
|
export const TITLE_MAX_WORDS = 10;
|
|
133
|
-
export const TITLE_MAX_CHARS = 60;
|
|
134
133
|
export function titlePrompt(idea) {
|
|
135
134
|
return `Write a short title for this task card on a kanban board. Reply with ONLY the title: at most ${TITLE_MAX_WORDS} words,
|
|
136
135
|
no quotes, no ending period, no preamble. Say what the task is about, e.g. "Retitle parked cards with a model summary".
|
|
@@ -139,7 +138,7 @@ Task: ${idea}`;
|
|
|
139
138
|
}
|
|
140
139
|
/**
|
|
141
140
|
* The model's reply as a card title: first non-empty line, without quotes, bullets, a "Title:" label or an
|
|
142
|
-
* ending period, cut to 10 words
|
|
141
|
+
* ending period, cut to 10 whole words. Empty when nothing usable is left.
|
|
143
142
|
*/
|
|
144
143
|
export function cleanTitle(output) {
|
|
145
144
|
const line = output.split('\n').map((l) => l.trim()).find((l) => l.length > 0) ?? '';
|
|
@@ -150,10 +149,7 @@ export function cleanTitle(output) {
|
|
|
150
149
|
.replace(/[.。]+$/, '')
|
|
151
150
|
.replace(/\s+/g, ' ')
|
|
152
151
|
.trim();
|
|
153
|
-
|
|
154
|
-
if (t.length > TITLE_MAX_CHARS)
|
|
155
|
-
t = t.slice(0, TITLE_MAX_CHARS - 1).trimEnd() + '…';
|
|
156
|
-
return t;
|
|
152
|
+
return t.split(' ').slice(0, TITLE_MAX_WORDS).join(' ');
|
|
157
153
|
}
|
|
158
154
|
/**
|
|
159
155
|
* A short title for the card, written by the same cheap model as the blueprint (no tools, one short call).
|
package/dist/board.js
CHANGED
|
@@ -251,6 +251,7 @@ export function recoverRunning(board, now, where = () => ({ dir: '' }), why = 'T
|
|
|
251
251
|
const ws = where(c);
|
|
252
252
|
const startedAt = c.updatedAt || now.toISOString();
|
|
253
253
|
c.column = 'review';
|
|
254
|
+
delete c.oven;
|
|
254
255
|
c.updatedAt = now.toISOString();
|
|
255
256
|
c.run = {
|
|
256
257
|
status: 'error',
|