cruo-agent 0.1.13 → 0.1.14
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 +1 -1
- package/dist/VERSION +1 -1
- package/dist/cli.js +23 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ given up on work nobody abandoned.
|
|
|
110
110
|
| `--worktree` | a checkout per card |
|
|
111
111
|
| `--allow <tools>` | what the harness may use |
|
|
112
112
|
| `--push` | publish the branch after a run that commits |
|
|
113
|
-
| `--harness-timeout <seconds>` | kill a run that wedges (default
|
|
113
|
+
| `--harness-timeout <seconds>` | kill a run that wedges (default 3000 — 50 minutes; keep it under an hour, which is how long a run's board session lasts) |
|
|
114
114
|
| `--max-attempts <n>` | give up on a card after n unproductive runs (default 3) |
|
|
115
115
|
|
|
116
116
|
The full list, and what each is for: <https://cruo.space/docs#agents>
|
package/dist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.14
|
package/dist/cli.js
CHANGED
|
@@ -46711,10 +46711,21 @@ var init_pacing = __esm({
|
|
|
46711
46711
|
function blocksAgentPickup(state) {
|
|
46712
46712
|
return state.requires_human === true;
|
|
46713
46713
|
}
|
|
46714
|
+
function byPriority(a, b) {
|
|
46715
|
+
return (PRIORITY_RANK[a.issue.priority] ?? 9) - (PRIORITY_RANK[b.issue.priority] ?? 9);
|
|
46716
|
+
}
|
|
46717
|
+
var PRIORITY_RANK;
|
|
46714
46718
|
var init_queries = __esm({
|
|
46715
46719
|
"src/queries.ts"() {
|
|
46716
46720
|
"use strict";
|
|
46717
46721
|
init_dist();
|
|
46722
|
+
PRIORITY_RANK = {
|
|
46723
|
+
urgent: 0,
|
|
46724
|
+
high: 1,
|
|
46725
|
+
medium: 2,
|
|
46726
|
+
low: 3,
|
|
46727
|
+
none: 4
|
|
46728
|
+
};
|
|
46718
46729
|
}
|
|
46719
46730
|
});
|
|
46720
46731
|
|
|
@@ -46929,7 +46940,7 @@ async function pollAssigned(ctx) {
|
|
|
46929
46940
|
notificationIds: []
|
|
46930
46941
|
}
|
|
46931
46942
|
];
|
|
46932
|
-
});
|
|
46943
|
+
}).sort(byPriority);
|
|
46933
46944
|
}
|
|
46934
46945
|
async function poll(ctx, identity) {
|
|
46935
46946
|
const { data: states, error: stateErr } = await ctx.client.from("workflow_states").select("*").eq("workspace_id", ctx.workspaceId).eq("owner_function", identity.jobFunction);
|
|
@@ -46966,9 +46977,7 @@ async function poll(ctx, identity) {
|
|
|
46966
46977
|
notificationIds: []
|
|
46967
46978
|
}
|
|
46968
46979
|
];
|
|
46969
|
-
}).sort(
|
|
46970
|
-
(a, b) => (PRIORITY_RANK[a.issue.priority] ?? 9) - (PRIORITY_RANK[b.issue.priority] ?? 9)
|
|
46971
|
-
);
|
|
46980
|
+
}).sort(byPriority);
|
|
46972
46981
|
}
|
|
46973
46982
|
async function pollMentions(ctx, identity) {
|
|
46974
46983
|
const { data: notes, error: error51 } = await ctx.client.schema("public").from("notifications").select("id, issue_id").eq("user_id", ctx.userId).eq("kind", "mention").is("read_at", null).not("issue_id", "is", null).order("created_at", { ascending: true });
|
|
@@ -47011,9 +47020,7 @@ async function pollMentions(ctx, identity) {
|
|
|
47011
47020
|
notificationIds: byIssue.get(issue2.id) ?? []
|
|
47012
47021
|
}
|
|
47013
47022
|
];
|
|
47014
|
-
}).sort(
|
|
47015
|
-
(a, b) => (PRIORITY_RANK[a.issue.priority] ?? 9) - (PRIORITY_RANK[b.issue.priority] ?? 9)
|
|
47016
|
-
);
|
|
47023
|
+
}).sort(byPriority);
|
|
47017
47024
|
}
|
|
47018
47025
|
async function claim(ctx, hit) {
|
|
47019
47026
|
const ttlMs = options.harnessTimeoutMs + 3e4;
|
|
@@ -47885,7 +47892,7 @@ to catch: a second supervisor nothing could see or stop.
|
|
|
47885
47892
|
if (stopping) return;
|
|
47886
47893
|
}
|
|
47887
47894
|
}
|
|
47888
|
-
var argv, flag, opt, num2, ms, readOptions, options, log, worktreeConfig, lastRefusal,
|
|
47895
|
+
var argv, flag, opt, num2, ms, readOptions, options, log, worktreeConfig, lastRefusal, CONFIG_DIR_PREFIX, CRUO_OWNED_ENV, HEAD_STORED, lastHolding, warnedAboutSpendTable, stopping, paused, stopRequestedAt, currentRun, pendingWait;
|
|
47889
47896
|
var init_supervisor = __esm({
|
|
47890
47897
|
"src/supervisor.ts"() {
|
|
47891
47898
|
"use strict";
|
|
@@ -47952,7 +47959,11 @@ var init_supervisor = __esm({
|
|
|
47952
47959
|
* test file — was killed at it twice, having written real work both times
|
|
47953
47960
|
* and committed neither. Err long: the cheap failure is the slow one.
|
|
47954
47961
|
*/
|
|
47955
|
-
|
|
47962
|
+
// 50 minutes since CRA-122: roughly double the longest real run (26.3 min),
|
|
47963
|
+
// and deliberately short of an hour — the run's own board session lasts
|
|
47964
|
+
// exactly 60 minutes (see `writeMcpConfig`), so a longer limit lets a run
|
|
47965
|
+
// lose the board in the minutes it hands the card on.
|
|
47966
|
+
harnessTimeoutMs: ms("harness-timeout", 3e3),
|
|
47956
47967
|
/**
|
|
47957
47968
|
* Give up on an issue after this many unproductive runs. Persisted in
|
|
47958
47969
|
* `pm.issue_attempts` since CRA-7 — it was in-memory, which meant a restart
|
|
@@ -48052,13 +48063,6 @@ cruo-supervisor: ${error51.message}
|
|
|
48052
48063
|
log = (...parts) => console.log(`[${(/* @__PURE__ */ new Date()).toLocaleTimeString("en-GB", { hour12: false })}]`, ...parts);
|
|
48053
48064
|
worktreeConfig = null;
|
|
48054
48065
|
lastRefusal = null;
|
|
48055
|
-
PRIORITY_RANK = {
|
|
48056
|
-
urgent: 0,
|
|
48057
|
-
high: 1,
|
|
48058
|
-
medium: 2,
|
|
48059
|
-
low: 3,
|
|
48060
|
-
none: 4
|
|
48061
|
-
};
|
|
48062
48066
|
CONFIG_DIR_PREFIX = "cruo-sup-";
|
|
48063
48067
|
CRUO_OWNED_ENV = [
|
|
48064
48068
|
"SUPABASE_URL",
|
|
@@ -48497,8 +48501,9 @@ ${name} started (pid ${child.pid}).
|
|
|
48497
48501
|
check cruo ps
|
|
48498
48502
|
stop cruo stop ${name}
|
|
48499
48503
|
|
|
48500
|
-
It survives this terminal closing
|
|
48501
|
-
|
|
48504
|
+
It survives this terminal closing, and the machine sleeping \u2014 it pauses
|
|
48505
|
+
and carries on when you wake it. It does not survive a restart or a
|
|
48506
|
+
shutdown; for that, see "Surviving a reboot" at
|
|
48502
48507
|
https://cruo.space/docs#agents.
|
|
48503
48508
|
`
|
|
48504
48509
|
);
|
package/package.json
CHANGED