@taskless-app/swarm 0.6.97 → 0.6.99
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/cli.js +10 -6
- package/dist/overmind.js +10 -6
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2807,6 +2807,9 @@ function grokAbort(rec) {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
return void 0;
|
|
2809
2809
|
}
|
|
2810
|
+
function grokRecordShape(rec) {
|
|
2811
|
+
return typeof rec.text === "string" || typeof rec.stopReason === "string" || typeof rec.sessionId === "string" || rec.type === "error";
|
|
2812
|
+
}
|
|
2810
2813
|
function parseGrokResult(raw) {
|
|
2811
2814
|
const trimmed = raw.trim();
|
|
2812
2815
|
if (!trimmed) return null;
|
|
@@ -2818,8 +2821,7 @@ function parseGrokResult(raw) {
|
|
|
2818
2821
|
}
|
|
2819
2822
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
2820
2823
|
const rec = parsed;
|
|
2821
|
-
|
|
2822
|
-
if (!hasShape) return null;
|
|
2824
|
+
if (!grokRecordShape(rec)) return null;
|
|
2823
2825
|
const reported = typeof rec.total_cost_usd === "number" && Number.isFinite(rec.total_cost_usd);
|
|
2824
2826
|
const usage2 = rec.usage;
|
|
2825
2827
|
let tokensIn;
|
|
@@ -2872,7 +2874,7 @@ function readGrokProbeRecord(out) {
|
|
|
2872
2874
|
}
|
|
2873
2875
|
function grokProbeScanText(out) {
|
|
2874
2876
|
const located = locateGrokProbeJson(out);
|
|
2875
|
-
if (!located || grokAbort(located.rec)) return out;
|
|
2877
|
+
if (!located || grokAbort(located.rec) || !grokRecordShape(located.rec)) return out;
|
|
2876
2878
|
const at = out.indexOf(located.raw);
|
|
2877
2879
|
return out.slice(0, at) + out.slice(at + located.raw.length);
|
|
2878
2880
|
}
|
|
@@ -2973,7 +2975,9 @@ ${notice}` : spec.prompt;
|
|
|
2973
2975
|
probe: {
|
|
2974
2976
|
args: ["-p", "ok", "--output-format", "json", "--yolo", "--max-turns", "1", "--no-auto-update"],
|
|
2975
2977
|
// В бинаре 1.0.77 кроме «usage limit» есть weekly/rate limit и «run out of credits».
|
|
2976
|
-
|
|
2978
|
+
// TASWM-659: кончился баланс — «API error (status 402 Payment Required): Grok Build usage
|
|
2979
|
+
// balance exhausted». Код 402 — только рядом со словом ошибки, как 401 в authPattern.
|
|
2980
|
+
limitPattern: /usage limit|weekly limit|rate limit|run out of credits|balance exhausted|payment required|(?:error|api|http|status)[^\n]{0,60}\b402\b/i,
|
|
2977
2981
|
// Голый 401 ловил output_tokens и 0.401. Код — только рядом со словом
|
|
2978
2982
|
// ошибки, как у Claude. «401 Unauthorized» покрывает голое unauthorized.
|
|
2979
2983
|
authPattern: /not logged in|not signed in|unauthorized|(?:error|api|http|status)[^\n]{0,60}\b40[13]\b|(?:invalid|incorrect) api key|authentication required|auth required/i,
|
|
@@ -4486,7 +4490,7 @@ var init_package = __esm({
|
|
|
4486
4490
|
"package.json"() {
|
|
4487
4491
|
package_default = {
|
|
4488
4492
|
name: "@taskless-app/swarm",
|
|
4489
|
-
version: "0.6.
|
|
4493
|
+
version: "0.6.99",
|
|
4490
4494
|
type: "module",
|
|
4491
4495
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
4492
4496
|
keywords: [
|
|
@@ -4538,7 +4542,7 @@ var init_package = __esm({
|
|
|
4538
4542
|
undici: "^7.30.1",
|
|
4539
4543
|
zod: "3.25.76"
|
|
4540
4544
|
},
|
|
4541
|
-
gitHead: "
|
|
4545
|
+
gitHead: "c9fdf089ff8f593a9d14f77bb6be981355bf9749"
|
|
4542
4546
|
};
|
|
4543
4547
|
}
|
|
4544
4548
|
});
|
package/dist/overmind.js
CHANGED
|
@@ -3039,6 +3039,9 @@ function grokAbort(rec) {
|
|
|
3039
3039
|
}
|
|
3040
3040
|
return void 0;
|
|
3041
3041
|
}
|
|
3042
|
+
function grokRecordShape(rec) {
|
|
3043
|
+
return typeof rec.text === "string" || typeof rec.stopReason === "string" || typeof rec.sessionId === "string" || rec.type === "error";
|
|
3044
|
+
}
|
|
3042
3045
|
function parseGrokResult(raw) {
|
|
3043
3046
|
const trimmed = raw.trim();
|
|
3044
3047
|
if (!trimmed) return null;
|
|
@@ -3050,8 +3053,7 @@ function parseGrokResult(raw) {
|
|
|
3050
3053
|
}
|
|
3051
3054
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
3052
3055
|
const rec = parsed;
|
|
3053
|
-
|
|
3054
|
-
if (!hasShape) return null;
|
|
3056
|
+
if (!grokRecordShape(rec)) return null;
|
|
3055
3057
|
const reported = typeof rec.total_cost_usd === "number" && Number.isFinite(rec.total_cost_usd);
|
|
3056
3058
|
const usage = rec.usage;
|
|
3057
3059
|
let tokensIn;
|
|
@@ -3104,7 +3106,7 @@ function readGrokProbeRecord(out) {
|
|
|
3104
3106
|
}
|
|
3105
3107
|
function grokProbeScanText(out) {
|
|
3106
3108
|
const located = locateGrokProbeJson(out);
|
|
3107
|
-
if (!located || grokAbort(located.rec)) return out;
|
|
3109
|
+
if (!located || grokAbort(located.rec) || !grokRecordShape(located.rec)) return out;
|
|
3108
3110
|
const at = out.indexOf(located.raw);
|
|
3109
3111
|
return out.slice(0, at) + out.slice(at + located.raw.length);
|
|
3110
3112
|
}
|
|
@@ -3205,7 +3207,9 @@ ${notice}` : spec.prompt;
|
|
|
3205
3207
|
probe: {
|
|
3206
3208
|
args: ["-p", "ok", "--output-format", "json", "--yolo", "--max-turns", "1", "--no-auto-update"],
|
|
3207
3209
|
// В бинаре 1.0.77 кроме «usage limit» есть weekly/rate limit и «run out of credits».
|
|
3208
|
-
|
|
3210
|
+
// TASWM-659: кончился баланс — «API error (status 402 Payment Required): Grok Build usage
|
|
3211
|
+
// balance exhausted». Код 402 — только рядом со словом ошибки, как 401 в authPattern.
|
|
3212
|
+
limitPattern: /usage limit|weekly limit|rate limit|run out of credits|balance exhausted|payment required|(?:error|api|http|status)[^\n]{0,60}\b402\b/i,
|
|
3209
3213
|
// Голый 401 ловил output_tokens и 0.401. Код — только рядом со словом
|
|
3210
3214
|
// ошибки, как у Claude. «401 Unauthorized» покрывает голое unauthorized.
|
|
3211
3215
|
authPattern: /not logged in|not signed in|unauthorized|(?:error|api|http|status)[^\n]{0,60}\b40[13]\b|(?:invalid|incorrect) api key|authentication required|auth required/i,
|
|
@@ -14826,7 +14830,7 @@ function parkReasonUnretriable(reason) {
|
|
|
14826
14830
|
// package.json
|
|
14827
14831
|
var package_default = {
|
|
14828
14832
|
name: "@taskless-app/swarm",
|
|
14829
|
-
version: "0.6.
|
|
14833
|
+
version: "0.6.99",
|
|
14830
14834
|
type: "module",
|
|
14831
14835
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
14832
14836
|
keywords: [
|
|
@@ -14878,7 +14882,7 @@ var package_default = {
|
|
|
14878
14882
|
undici: "^7.30.1",
|
|
14879
14883
|
zod: "3.25.76"
|
|
14880
14884
|
},
|
|
14881
|
-
gitHead: "
|
|
14885
|
+
gitHead: "c9fdf089ff8f593a9d14f77bb6be981355bf9749"
|
|
14882
14886
|
};
|
|
14883
14887
|
|
|
14884
14888
|
// src/version.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskless-app/swarm",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"undici": "^7.30.1",
|
|
41
41
|
"zod": "3.25.76"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c9fdf089ff8f593a9d14f77bb6be981355bf9749",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"overmind": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=development\" tsx src/overmind.ts",
|
|
46
46
|
"swarm": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=development\" tsx src/cli.ts",
|