@taskless-app/swarm 0.6.84 → 0.6.85
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 +55 -3
- package/dist/overmind.js +58 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2834,6 +2834,57 @@ function parseGrokResult(raw) {
|
|
|
2834
2834
|
if (aborted) result.aborted = aborted;
|
|
2835
2835
|
return result;
|
|
2836
2836
|
}
|
|
2837
|
+
function grokProbeOkFromOutput(out) {
|
|
2838
|
+
const rec = readGrokProbeRecord(out);
|
|
2839
|
+
if (!rec) return false;
|
|
2840
|
+
return typeof rec.text === "string" && rec.text.trim().length > 0 && (rec.stopReason === "max_turn_requests" || rec.stopReason === "end_turn");
|
|
2841
|
+
}
|
|
2842
|
+
function readGrokProbeRecord(out) {
|
|
2843
|
+
const line = out.split(/\r?\n/).find((item) => item.trimStart().startsWith("{"));
|
|
2844
|
+
if (line) {
|
|
2845
|
+
const parsed = parseJsonObject(line.trim());
|
|
2846
|
+
if (parsed) return parsed;
|
|
2847
|
+
}
|
|
2848
|
+
const whole = parseJsonObject(out.trim());
|
|
2849
|
+
if (whole) return whole;
|
|
2850
|
+
const sliced = extractJsonObject(out);
|
|
2851
|
+
return sliced ? parseJsonObject(sliced) : null;
|
|
2852
|
+
}
|
|
2853
|
+
function parseJsonObject(raw) {
|
|
2854
|
+
try {
|
|
2855
|
+
const parsed = JSON.parse(raw);
|
|
2856
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
2857
|
+
return parsed;
|
|
2858
|
+
} catch {
|
|
2859
|
+
return null;
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
function extractJsonObject(raw) {
|
|
2863
|
+
const start = raw.indexOf("{");
|
|
2864
|
+
if (start < 0) return null;
|
|
2865
|
+
let depth = 0;
|
|
2866
|
+
let inString = false;
|
|
2867
|
+
let escape = false;
|
|
2868
|
+
for (let i = start; i < raw.length; i++) {
|
|
2869
|
+
const ch = raw[i];
|
|
2870
|
+
if (inString) {
|
|
2871
|
+
if (escape) escape = false;
|
|
2872
|
+
else if (ch === "\\") escape = true;
|
|
2873
|
+
else if (ch === '"') inString = false;
|
|
2874
|
+
continue;
|
|
2875
|
+
}
|
|
2876
|
+
if (ch === '"') {
|
|
2877
|
+
inString = true;
|
|
2878
|
+
continue;
|
|
2879
|
+
}
|
|
2880
|
+
if (ch === "{") depth++;
|
|
2881
|
+
else if (ch === "}") {
|
|
2882
|
+
depth--;
|
|
2883
|
+
if (depth === 0) return raw.slice(start, i + 1);
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
return null;
|
|
2887
|
+
}
|
|
2837
2888
|
var grokExecutor;
|
|
2838
2889
|
var init_grok = __esm({
|
|
2839
2890
|
"src/executors/grok.ts"() {
|
|
@@ -2896,7 +2947,8 @@ ${notice}` : spec.prompt;
|
|
|
2896
2947
|
probe: {
|
|
2897
2948
|
args: ["-p", "ok", "--output-format", "json", "--yolo", "--max-turns", "1", "--no-auto-update"],
|
|
2898
2949
|
limitPattern: /usage limit/i,
|
|
2899
|
-
authPattern: /not logged in|unauthorized|\b401\b|authentication required|auth required/i
|
|
2950
|
+
authPattern: /not logged in|unauthorized|\b401\b|authentication required|auth required/i,
|
|
2951
|
+
okFromOutput: grokProbeOkFromOutput
|
|
2900
2952
|
}
|
|
2901
2953
|
};
|
|
2902
2954
|
}
|
|
@@ -4152,7 +4204,7 @@ var init_package = __esm({
|
|
|
4152
4204
|
"package.json"() {
|
|
4153
4205
|
package_default = {
|
|
4154
4206
|
name: "@taskless-app/swarm",
|
|
4155
|
-
version: "0.6.
|
|
4207
|
+
version: "0.6.85",
|
|
4156
4208
|
type: "module",
|
|
4157
4209
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
4158
4210
|
keywords: [
|
|
@@ -4204,7 +4256,7 @@ var init_package = __esm({
|
|
|
4204
4256
|
undici: "^7.30.1",
|
|
4205
4257
|
zod: "3.25.76"
|
|
4206
4258
|
},
|
|
4207
|
-
gitHead: "
|
|
4259
|
+
gitHead: "71965d722ad5cdcb80cd4053710c1097c65e7352"
|
|
4208
4260
|
};
|
|
4209
4261
|
}
|
|
4210
4262
|
});
|
package/dist/overmind.js
CHANGED
|
@@ -3074,6 +3074,57 @@ function parseGrokResult(raw) {
|
|
|
3074
3074
|
if (aborted) result.aborted = aborted;
|
|
3075
3075
|
return result;
|
|
3076
3076
|
}
|
|
3077
|
+
function grokProbeOkFromOutput(out) {
|
|
3078
|
+
const rec = readGrokProbeRecord(out);
|
|
3079
|
+
if (!rec) return false;
|
|
3080
|
+
return typeof rec.text === "string" && rec.text.trim().length > 0 && (rec.stopReason === "max_turn_requests" || rec.stopReason === "end_turn");
|
|
3081
|
+
}
|
|
3082
|
+
function readGrokProbeRecord(out) {
|
|
3083
|
+
const line = out.split(/\r?\n/).find((item) => item.trimStart().startsWith("{"));
|
|
3084
|
+
if (line) {
|
|
3085
|
+
const parsed = parseJsonObject(line.trim());
|
|
3086
|
+
if (parsed) return parsed;
|
|
3087
|
+
}
|
|
3088
|
+
const whole = parseJsonObject(out.trim());
|
|
3089
|
+
if (whole) return whole;
|
|
3090
|
+
const sliced = extractJsonObject(out);
|
|
3091
|
+
return sliced ? parseJsonObject(sliced) : null;
|
|
3092
|
+
}
|
|
3093
|
+
function parseJsonObject(raw) {
|
|
3094
|
+
try {
|
|
3095
|
+
const parsed = JSON.parse(raw);
|
|
3096
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
3097
|
+
return parsed;
|
|
3098
|
+
} catch {
|
|
3099
|
+
return null;
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
function extractJsonObject(raw) {
|
|
3103
|
+
const start = raw.indexOf("{");
|
|
3104
|
+
if (start < 0) return null;
|
|
3105
|
+
let depth = 0;
|
|
3106
|
+
let inString = false;
|
|
3107
|
+
let escape = false;
|
|
3108
|
+
for (let i = start; i < raw.length; i++) {
|
|
3109
|
+
const ch = raw[i];
|
|
3110
|
+
if (inString) {
|
|
3111
|
+
if (escape) escape = false;
|
|
3112
|
+
else if (ch === "\\") escape = true;
|
|
3113
|
+
else if (ch === '"') inString = false;
|
|
3114
|
+
continue;
|
|
3115
|
+
}
|
|
3116
|
+
if (ch === '"') {
|
|
3117
|
+
inString = true;
|
|
3118
|
+
continue;
|
|
3119
|
+
}
|
|
3120
|
+
if (ch === "{") depth++;
|
|
3121
|
+
else if (ch === "}") {
|
|
3122
|
+
depth--;
|
|
3123
|
+
if (depth === 0) return raw.slice(start, i + 1);
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
return null;
|
|
3127
|
+
}
|
|
3077
3128
|
var grokExecutor;
|
|
3078
3129
|
var init_grok = __esm({
|
|
3079
3130
|
"src/executors/grok.ts"() {
|
|
@@ -3136,7 +3187,8 @@ ${notice}` : spec.prompt;
|
|
|
3136
3187
|
probe: {
|
|
3137
3188
|
args: ["-p", "ok", "--output-format", "json", "--yolo", "--max-turns", "1", "--no-auto-update"],
|
|
3138
3189
|
limitPattern: /usage limit/i,
|
|
3139
|
-
authPattern: /not logged in|unauthorized|\b401\b|authentication required|auth required/i
|
|
3190
|
+
authPattern: /not logged in|unauthorized|\b401\b|authentication required|auth required/i,
|
|
3191
|
+
okFromOutput: grokProbeOkFromOutput
|
|
3140
3192
|
}
|
|
3141
3193
|
};
|
|
3142
3194
|
}
|
|
@@ -13915,7 +13967,7 @@ function parkReasonUnretriable(reason) {
|
|
|
13915
13967
|
// package.json
|
|
13916
13968
|
var package_default = {
|
|
13917
13969
|
name: "@taskless-app/swarm",
|
|
13918
|
-
version: "0.6.
|
|
13970
|
+
version: "0.6.85",
|
|
13919
13971
|
type: "module",
|
|
13920
13972
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
13921
13973
|
keywords: [
|
|
@@ -13967,7 +14019,7 @@ var package_default = {
|
|
|
13967
14019
|
undici: "^7.30.1",
|
|
13968
14020
|
zod: "3.25.76"
|
|
13969
14021
|
},
|
|
13970
|
-
gitHead: "
|
|
14022
|
+
gitHead: "71965d722ad5cdcb80cd4053710c1097c65e7352"
|
|
13971
14023
|
};
|
|
13972
14024
|
|
|
13973
14025
|
// src/version.ts
|
|
@@ -19710,6 +19762,9 @@ function executorHealthy(opts = {}) {
|
|
|
19710
19762
|
if (executor.probe.authPattern?.test(out)) {
|
|
19711
19763
|
return finish({ ok: false, reason: "auth", resetHint: null });
|
|
19712
19764
|
}
|
|
19765
|
+
if (executor.probe.okFromOutput?.(out, code) === true) {
|
|
19766
|
+
return finish({ ok: true, reason: "ok", resetHint: null });
|
|
19767
|
+
}
|
|
19713
19768
|
finish({ ok: false, reason: "provider", resetHint: null });
|
|
19714
19769
|
});
|
|
19715
19770
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskless-app/swarm",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.85",
|
|
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": "71965d722ad5cdcb80cd4053710c1097c65e7352",
|
|
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",
|