@cloop/runner 0.3.43 → 0.3.46
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/dist/{box-NHY2X4ZU.js → box-LSZRJRRB.js} +371 -50
- package/dist/{chunk-NR6STR7Q.js → chunk-2YAX6QVI.js} +1 -1
- package/dist/{chunk-ZYNYUDRR.js → chunk-42ABTDLJ.js} +302 -136
- package/dist/{chunk-OQWYXCLI.js → chunk-A3YMWMAP.js} +1 -1
- package/dist/{chunk-CVVYCLZ6.js → chunk-BI2Y5ZCL.js} +2 -1
- package/dist/{chunk-IBDQB2LI.js → chunk-KG2RA3FJ.js} +1 -1
- package/dist/{chunk-3G3DFLOP.js → chunk-NTUUR5CD.js} +1 -1
- package/dist/{chunk-XHUV7QKK.js → chunk-PUDWLT5C.js} +3 -3
- package/dist/{chunk-ABVM7DFO.js → chunk-RRRV64ZB.js} +26 -6
- package/dist/{chunk-KFMO7ASY.js → chunk-UXMDNJ3O.js} +1 -1
- package/dist/{connect-G6KCIXAZ.js → connect-RB6AE2BT.js} +7 -7
- package/dist/{disconnect-Y6YWU3GK.js → disconnect-CMPHFSPV.js} +7 -7
- package/dist/{existing-runner-R5OAGMNB.js → existing-runner-R3U2RIRS.js} +7 -7
- package/dist/index.js +15 -14
- package/dist/{login-7RUFMJDP.js → login-LX3UQGJA.js} +2 -2
- package/dist/{mcp-server-KWU23FKU.js → mcp-server-MFHKJ7WR.js} +2 -2
- package/dist/{runner-4NWFDNHU.js → runner-VTJH554V.js} +3 -3
- package/dist/{runs-SUTQQYRZ.js → runs-4M5B26MP.js} +2 -2
- package/dist/{statusline-TLEJTE4B.js → statusline-LK3NK4AN.js} +1 -1
- package/dist/{takeover-ULKBCUED.js → takeover-RKTFGMQY.js} +4 -4
- package/dist/{use-W2JTPJKF.js → use-TKCUBBUO.js} +7 -7
- package/package.json +1 -1
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findRun,
|
|
4
4
|
ownHarness
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KG2RA3FJ.js";
|
|
6
6
|
import {
|
|
7
7
|
lockThreadsFile,
|
|
8
8
|
threadsFilePath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UXMDNJ3O.js";
|
|
10
10
|
import {
|
|
11
11
|
localRunsFilePath,
|
|
12
12
|
readRunRecords,
|
|
13
13
|
runHarness,
|
|
14
14
|
takeoverSummary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RRRV64ZB.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeLabel
|
|
18
18
|
} from "./chunk-VK6GV757.js";
|
|
@@ -1136,6 +1136,24 @@ function limitedModel(said) {
|
|
|
1136
1136
|
function refusedModel(said) {
|
|
1137
1137
|
return /The '([^']+)' model is not supported/i.exec(said ?? "")?.[1] ?? null;
|
|
1138
1138
|
}
|
|
1139
|
+
function nextModel(listed, tried) {
|
|
1140
|
+
return listed.find((m) => !tried.includes(m)) ?? null;
|
|
1141
|
+
}
|
|
1142
|
+
var MODEL_REFUSAL_MS = 24 * 36e5;
|
|
1143
|
+
function refusedRecently(refusals, now) {
|
|
1144
|
+
return refusals.filter((r) => now - Date.parse(r.at) < MODEL_REFUSAL_MS).map((r) => r.model);
|
|
1145
|
+
}
|
|
1146
|
+
function refusedModelLine(harness, refused, next) {
|
|
1147
|
+
return `${harness} cannot use ${refused} on this account, so this ran on ${next}.`;
|
|
1148
|
+
}
|
|
1149
|
+
function apiErrorWords(said) {
|
|
1150
|
+
try {
|
|
1151
|
+
const inner = JSON.parse(said)?.error?.message;
|
|
1152
|
+
return typeof inner === "string" && inner.trim() ? inner.trim() : said;
|
|
1153
|
+
} catch {
|
|
1154
|
+
return said;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1139
1157
|
var HARNESS_SIGNED_OUT = /^\s*(Failed to authenticate:\s*OAuth session expired and could not be refreshed\b|Your access token could not be refreshed\b|Your authentication session could not be refreshed\b|Not signed in\. Please run 'codex login'|unexpected status 401\b)/i;
|
|
1140
1158
|
var LIMIT_HOLD_MS = 60 * 6e4;
|
|
1141
1159
|
var HARNESS_STATE = {
|
|
@@ -2667,7 +2685,7 @@ var switchedLine = (move, from, to) => movedLine(move.reason, harnessName(from),
|
|
|
2667
2685
|
function failedEnd(harness, run2) {
|
|
2668
2686
|
const said = run2.result?.text?.trim() || run2.lastText;
|
|
2669
2687
|
const limited = HARNESS_LIMIT.test(run2.result?.text ?? "");
|
|
2670
|
-
const words = said
|
|
2688
|
+
const words = said && apiErrorWords(said.trim()).replace(/\s+/g, " ").trim();
|
|
2671
2689
|
const error = limited ? { error: "harness_limit" } : {};
|
|
2672
2690
|
const opening = run2.switched ? `${run2.switched} ` : "";
|
|
2673
2691
|
if (!words)
|
|
@@ -3404,7 +3422,7 @@ ${MACHINE_RESULT_INSTRUCTION}`, images));
|
|
|
3404
3422
|
} finally {
|
|
3405
3423
|
this.recovering.delete(r.work_id);
|
|
3406
3424
|
}
|
|
3407
|
-
const next = listed
|
|
3425
|
+
const next = nextModel(listed, tried);
|
|
3408
3426
|
if (!next)
|
|
3409
3427
|
this.log(`model work=${r.work_id} refused=${refused} next=none catalog=${listed.length}`);
|
|
3410
3428
|
if (!next || this.stopping || r.end) return false;
|
|
@@ -3412,10 +3430,7 @@ ${MACHINE_RESULT_INSTRUCTION}`, images));
|
|
|
3412
3430
|
r.refused = tried;
|
|
3413
3431
|
r.model = next;
|
|
3414
3432
|
r.session_id = null;
|
|
3415
|
-
r.switched = [
|
|
3416
|
-
moved,
|
|
3417
|
-
`${harnessName(dialect.name)} cannot use ${tried[0]} on this account, so this ran on ${next}.`
|
|
3418
|
-
].filter(Boolean).join(" ");
|
|
3433
|
+
r.switched = [moved, refusedModelLine(harnessName(dialect.name), tried[0] ?? refused, next)].filter(Boolean).join(" ");
|
|
3419
3434
|
this.save();
|
|
3420
3435
|
this.log(`model work=${r.work_id} refused=${refused} next=${next}`);
|
|
3421
3436
|
this.spawnRun(
|
|
@@ -3557,6 +3572,11 @@ export {
|
|
|
3557
3572
|
nextProgress,
|
|
3558
3573
|
isYes,
|
|
3559
3574
|
HARNESS_LIMIT,
|
|
3575
|
+
refusedModel,
|
|
3576
|
+
nextModel,
|
|
3577
|
+
refusedRecently,
|
|
3578
|
+
refusedModelLine,
|
|
3579
|
+
apiErrorWords,
|
|
3560
3580
|
HARNESS_SIGNED_OUT,
|
|
3561
3581
|
ENVIRONMENTS,
|
|
3562
3582
|
environmentOf,
|
|
@@ -53,17 +53,17 @@ import {
|
|
|
53
53
|
which,
|
|
54
54
|
workFolder,
|
|
55
55
|
workFolderLine
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-42ABTDLJ.js";
|
|
57
|
+
import "./chunk-BI2Y5ZCL.js";
|
|
58
|
+
import "./chunk-UXMDNJ3O.js";
|
|
59
|
+
import "./chunk-RRRV64ZB.js";
|
|
60
60
|
import "./chunk-VK6GV757.js";
|
|
61
61
|
import "./chunk-365HFCQQ.js";
|
|
62
62
|
import "./chunk-PKIEWBR7.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-NTUUR5CD.js";
|
|
64
|
+
import "./chunk-A3YMWMAP.js";
|
|
65
65
|
import "./chunk-SBYSVZ7J.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-2YAX6QVI.js";
|
|
67
67
|
import "./chunk-D5UZW42X.js";
|
|
68
68
|
export {
|
|
69
69
|
DEFAULT_T3_URL,
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
runnerOrigin,
|
|
8
8
|
stopService,
|
|
9
9
|
unitOrigin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-42ABTDLJ.js";
|
|
11
|
+
import "./chunk-BI2Y5ZCL.js";
|
|
12
|
+
import "./chunk-UXMDNJ3O.js";
|
|
13
|
+
import "./chunk-RRRV64ZB.js";
|
|
14
14
|
import "./chunk-VK6GV757.js";
|
|
15
15
|
import "./chunk-365HFCQQ.js";
|
|
16
16
|
import "./chunk-PKIEWBR7.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NTUUR5CD.js";
|
|
18
|
+
import "./chunk-A3YMWMAP.js";
|
|
19
19
|
import "./chunk-SBYSVZ7J.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-2YAX6QVI.js";
|
|
21
21
|
import "./chunk-D5UZW42X.js";
|
|
22
22
|
export {
|
|
23
23
|
disconnect,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
existingRunnerEnvironment,
|
|
4
4
|
pinExistingRunner
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-42ABTDLJ.js";
|
|
6
|
+
import "./chunk-BI2Y5ZCL.js";
|
|
7
|
+
import "./chunk-UXMDNJ3O.js";
|
|
8
|
+
import "./chunk-RRRV64ZB.js";
|
|
9
9
|
import "./chunk-VK6GV757.js";
|
|
10
10
|
import "./chunk-365HFCQQ.js";
|
|
11
11
|
import "./chunk-PKIEWBR7.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NTUUR5CD.js";
|
|
13
|
+
import "./chunk-A3YMWMAP.js";
|
|
14
14
|
import "./chunk-SBYSVZ7J.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-2YAX6QVI.js";
|
|
16
16
|
import "./chunk-D5UZW42X.js";
|
|
17
17
|
export {
|
|
18
18
|
existingRunnerEnvironment,
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-365HFCQQ.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2YAX6QVI.js";
|
|
8
8
|
import {
|
|
9
9
|
applyEnvironmentFlag
|
|
10
10
|
} from "./chunk-D5UZW42X.js";
|
|
@@ -50,6 +50,7 @@ Usage:
|
|
|
50
50
|
this computer on Cloop, remove its service and machine files
|
|
51
51
|
cloop box connect cloop connect with T3 Code forced
|
|
52
52
|
cloop box run Answer the Cloop Agent's machine calls (daemon)
|
|
53
|
+
cloop box model --harness codex Print the model a Cloop Box Codex run starts on now
|
|
53
54
|
cloop runs List this machine's runs: open ones, and the last 24 hours
|
|
54
55
|
cloop watch [id] Follow a run as it works. No id: the newest open run.
|
|
55
56
|
Stop it from Threads.
|
|
@@ -68,7 +69,7 @@ Add --staging to any command to use Cloop staging instead of production.
|
|
|
68
69
|
A production machine and a staging machine can run side by side on one computer.
|
|
69
70
|
`;
|
|
70
71
|
async function pinExistingRunner() {
|
|
71
|
-
const { pinExistingRunner: pin } = await import("./existing-runner-
|
|
72
|
+
const { pinExistingRunner: pin } = await import("./existing-runner-R3U2RIRS.js");
|
|
72
73
|
const { note } = pin();
|
|
73
74
|
if (note) console.error(note);
|
|
74
75
|
}
|
|
@@ -76,7 +77,7 @@ async function main() {
|
|
|
76
77
|
switch (command) {
|
|
77
78
|
case "login":
|
|
78
79
|
case "auth": {
|
|
79
|
-
const { loginCommand } = await import("./login-
|
|
80
|
+
const { loginCommand } = await import("./login-LX3UQGJA.js");
|
|
80
81
|
await loginCommand(argv);
|
|
81
82
|
break;
|
|
82
83
|
}
|
|
@@ -86,61 +87,61 @@ async function main() {
|
|
|
86
87
|
break;
|
|
87
88
|
}
|
|
88
89
|
case "serve": {
|
|
89
|
-
const { startMcpServer } = await import("./mcp-server-
|
|
90
|
+
const { startMcpServer } = await import("./mcp-server-MFHKJ7WR.js");
|
|
90
91
|
await startMcpServer();
|
|
91
92
|
break;
|
|
92
93
|
}
|
|
93
94
|
case "statusline": {
|
|
94
|
-
const { statuslineCommand } = await import("./statusline-
|
|
95
|
+
const { statuslineCommand } = await import("./statusline-LK3NK4AN.js");
|
|
95
96
|
statuslineCommand();
|
|
96
97
|
break;
|
|
97
98
|
}
|
|
98
99
|
case "connect": {
|
|
99
|
-
const { connectCommand } = await import("./connect-
|
|
100
|
+
const { connectCommand } = await import("./connect-RB6AE2BT.js");
|
|
100
101
|
await connectCommand(argv.slice(1));
|
|
101
102
|
break;
|
|
102
103
|
}
|
|
103
104
|
case "use": {
|
|
104
|
-
const { useCommand } = await import("./use-
|
|
105
|
+
const { useCommand } = await import("./use-TKCUBBUO.js");
|
|
105
106
|
process.exitCode = await useCommand(argv.slice(1));
|
|
106
107
|
break;
|
|
107
108
|
}
|
|
108
109
|
case "disconnect": {
|
|
109
|
-
const { disconnectCommand } = await import("./disconnect-
|
|
110
|
+
const { disconnectCommand } = await import("./disconnect-CMPHFSPV.js");
|
|
110
111
|
await disconnectCommand(argv.slice(1));
|
|
111
112
|
break;
|
|
112
113
|
}
|
|
113
114
|
case "box": {
|
|
114
|
-
const { boxCommand } = await import("./box-
|
|
115
|
+
const { boxCommand } = await import("./box-LSZRJRRB.js");
|
|
115
116
|
await boxCommand(argv.slice(1));
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
119
|
case "runs": {
|
|
119
120
|
await pinExistingRunner();
|
|
120
|
-
const { runsCommand } = await import("./runs-
|
|
121
|
+
const { runsCommand } = await import("./runs-4M5B26MP.js");
|
|
121
122
|
process.exitCode = runsCommand();
|
|
122
123
|
break;
|
|
123
124
|
}
|
|
124
125
|
case "watch": {
|
|
125
126
|
await pinExistingRunner();
|
|
126
|
-
const { watchCommand } = await import("./runs-
|
|
127
|
+
const { watchCommand } = await import("./runs-4M5B26MP.js");
|
|
127
128
|
process.exitCode = await watchCommand(argv.slice(1));
|
|
128
129
|
break;
|
|
129
130
|
}
|
|
130
131
|
case "takeover": {
|
|
131
132
|
await pinExistingRunner();
|
|
132
|
-
const { takeoverCommand } = await import("./takeover-
|
|
133
|
+
const { takeoverCommand } = await import("./takeover-RKTFGMQY.js");
|
|
133
134
|
process.exitCode = await takeoverCommand(argv.slice(1));
|
|
134
135
|
break;
|
|
135
136
|
}
|
|
136
137
|
case "resume": {
|
|
137
138
|
await pinExistingRunner();
|
|
138
|
-
const { resumeCommand } = await import("./runs-
|
|
139
|
+
const { resumeCommand } = await import("./runs-4M5B26MP.js");
|
|
139
140
|
process.exitCode = await resumeCommand(argv.slice(1));
|
|
140
141
|
break;
|
|
141
142
|
}
|
|
142
143
|
case "runner": {
|
|
143
|
-
const { runnerCommand } = await import("./runner-
|
|
144
|
+
const { runnerCommand } = await import("./runner-VTJH554V.js");
|
|
144
145
|
await runnerCommand(argv.slice(1));
|
|
145
146
|
break;
|
|
146
147
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
deviceLogin,
|
|
4
4
|
loginCommand,
|
|
5
5
|
refusalSentence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A3YMWMAP.js";
|
|
7
7
|
import "./chunk-SBYSVZ7J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2YAX6QVI.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
deviceLogin,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
MeshSocket,
|
|
16
16
|
defaultSocketFactory
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BI2Y5ZCL.js";
|
|
18
18
|
import {
|
|
19
19
|
sanitizeLabel,
|
|
20
20
|
sanitizeUntrusted
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-SBYSVZ7J.js";
|
|
32
32
|
import {
|
|
33
33
|
VERSION
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2YAX6QVI.js";
|
|
35
35
|
import {
|
|
36
36
|
getMeshUrl,
|
|
37
37
|
getToken
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
connectWebhook,
|
|
4
4
|
runnerCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NTUUR5CD.js";
|
|
6
|
+
import "./chunk-A3YMWMAP.js";
|
|
7
7
|
import "./chunk-SBYSVZ7J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2YAX6QVI.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
connectWebhook,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
runsCommand,
|
|
10
10
|
sessionFolder,
|
|
11
11
|
watchCommand
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KG2RA3FJ.js";
|
|
13
|
+
import "./chunk-RRRV64ZB.js";
|
|
14
14
|
import "./chunk-VK6GV757.js";
|
|
15
15
|
import "./chunk-D5UZW42X.js";
|
|
16
16
|
export {
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
takeoverDir,
|
|
10
10
|
writeTakeoverReply,
|
|
11
11
|
writeTakeoverRequest
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-PUDWLT5C.js";
|
|
13
|
+
import "./chunk-KG2RA3FJ.js";
|
|
14
|
+
import "./chunk-UXMDNJ3O.js";
|
|
15
|
+
import "./chunk-RRRV64ZB.js";
|
|
16
16
|
import "./chunk-VK6GV757.js";
|
|
17
17
|
import "./chunk-SBYSVZ7J.js";
|
|
18
18
|
import "./chunk-D5UZW42X.js";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
DRIVER_NAME,
|
|
4
4
|
pinExistingRunner,
|
|
5
5
|
runConnect
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-42ABTDLJ.js";
|
|
7
|
+
import "./chunk-BI2Y5ZCL.js";
|
|
8
|
+
import "./chunk-UXMDNJ3O.js";
|
|
9
9
|
import {
|
|
10
10
|
isLocal,
|
|
11
11
|
readRunnerConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RRRV64ZB.js";
|
|
13
13
|
import "./chunk-VK6GV757.js";
|
|
14
14
|
import "./chunk-365HFCQQ.js";
|
|
15
15
|
import "./chunk-PKIEWBR7.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-NTUUR5CD.js";
|
|
17
|
+
import "./chunk-A3YMWMAP.js";
|
|
18
18
|
import "./chunk-SBYSVZ7J.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-2YAX6QVI.js";
|
|
20
20
|
import "./chunk-D5UZW42X.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/use.ts
|
package/package.json
CHANGED