@taskless-app/swarm 0.6.1 → 0.6.2
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 +12 -3
- package/dist/overmind.js +20 -5
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1837,7 +1837,7 @@ var init_package = __esm({
|
|
|
1837
1837
|
"package.json"() {
|
|
1838
1838
|
package_default = {
|
|
1839
1839
|
name: "@taskless-app/swarm",
|
|
1840
|
-
version: "0.6.
|
|
1840
|
+
version: "0.6.2",
|
|
1841
1841
|
type: "module",
|
|
1842
1842
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
1843
1843
|
keywords: [
|
|
@@ -1887,7 +1887,7 @@ var init_package = __esm({
|
|
|
1887
1887
|
execa: "^10.0.0",
|
|
1888
1888
|
zod: "3.25.76"
|
|
1889
1889
|
},
|
|
1890
|
-
gitHead: "
|
|
1890
|
+
gitHead: "e812f35a996b00111f3f535b6b0a45b379e7afb2"
|
|
1891
1891
|
};
|
|
1892
1892
|
}
|
|
1893
1893
|
});
|
|
@@ -5408,7 +5408,16 @@ var SwarmClient = class _SwarmClient {
|
|
|
5408
5408
|
const data = res?.structuredContent ?? {};
|
|
5409
5409
|
return {
|
|
5410
5410
|
commands: Array.isArray(data.commands) ? data.commands.filter(isHostCommandShape) : [],
|
|
5411
|
-
logRequests: parseLogRequests(data.logRequests)
|
|
5411
|
+
logRequests: parseLogRequests(data.logRequests),
|
|
5412
|
+
// Предел человека (TASWM-363). Различаем ТРИ случая, и разница не косметическая:
|
|
5413
|
+
// • ключа нет вовсе (старый прод, пульс без hostId) → undefined: прежнее число
|
|
5414
|
+
// не трогаем, иначе обновление прода молча снимало бы предел;
|
|
5415
|
+
// • число >0 → предел назван;
|
|
5416
|
+
// • всё прочее (null, ноль, мусор) → null: предела нет. Выдуманный потолок хуже
|
|
5417
|
+
// отсутствующего — под ним рой встанет молча.
|
|
5418
|
+
...data.maxDrones === void 0 ? {} : {
|
|
5419
|
+
maxDrones: typeof data.maxDrones === "number" && Number.isFinite(data.maxDrones) && data.maxDrones > 0 ? Math.trunc(data.maxDrones) : null
|
|
5420
|
+
}
|
|
5412
5421
|
};
|
|
5413
5422
|
} catch {
|
|
5414
5423
|
return EMPTY_HEARTBEAT_REPLY;
|
package/dist/overmind.js
CHANGED
|
@@ -6710,7 +6710,16 @@ var SwarmClient = class _SwarmClient {
|
|
|
6710
6710
|
const data = res?.structuredContent ?? {};
|
|
6711
6711
|
return {
|
|
6712
6712
|
commands: Array.isArray(data.commands) ? data.commands.filter(isHostCommandShape) : [],
|
|
6713
|
-
logRequests: parseLogRequests(data.logRequests)
|
|
6713
|
+
logRequests: parseLogRequests(data.logRequests),
|
|
6714
|
+
// Предел человека (TASWM-363). Различаем ТРИ случая, и разница не косметическая:
|
|
6715
|
+
// • ключа нет вовсе (старый прод, пульс без hostId) → undefined: прежнее число
|
|
6716
|
+
// не трогаем, иначе обновление прода молча снимало бы предел;
|
|
6717
|
+
// • число >0 → предел назван;
|
|
6718
|
+
// • всё прочее (null, ноль, мусор) → null: предела нет. Выдуманный потолок хуже
|
|
6719
|
+
// отсутствующего — под ним рой встанет молча.
|
|
6720
|
+
...data.maxDrones === void 0 ? {} : {
|
|
6721
|
+
maxDrones: typeof data.maxDrones === "number" && Number.isFinite(data.maxDrones) && data.maxDrones > 0 ? Math.trunc(data.maxDrones) : null
|
|
6722
|
+
}
|
|
6714
6723
|
};
|
|
6715
6724
|
} catch {
|
|
6716
6725
|
return EMPTY_HEARTBEAT_REPLY;
|
|
@@ -10757,7 +10766,7 @@ async function changedPaths(worktree, opts = {}) {
|
|
|
10757
10766
|
// package.json
|
|
10758
10767
|
var package_default = {
|
|
10759
10768
|
name: "@taskless-app/swarm",
|
|
10760
|
-
version: "0.6.
|
|
10769
|
+
version: "0.6.2",
|
|
10761
10770
|
type: "module",
|
|
10762
10771
|
description: "Local control plane for a fleet of AI coding agents (drones), coordinating through Taskless. The overmind runs the swarm.",
|
|
10763
10772
|
keywords: [
|
|
@@ -10807,7 +10816,7 @@ var package_default = {
|
|
|
10807
10816
|
execa: "^10.0.0",
|
|
10808
10817
|
zod: "3.25.76"
|
|
10809
10818
|
},
|
|
10810
|
-
gitHead: "
|
|
10819
|
+
gitHead: "e812f35a996b00111f3f535b6b0a45b379e7afb2"
|
|
10811
10820
|
};
|
|
10812
10821
|
|
|
10813
10822
|
// src/version.ts
|
|
@@ -15787,8 +15796,10 @@ async function runDaemon(opts) {
|
|
|
15787
15796
|
}
|
|
15788
15797
|
} : void 0;
|
|
15789
15798
|
let lastDroneCap = null;
|
|
15799
|
+
let lastOwnCapacity = null;
|
|
15790
15800
|
const hostCommandState = hostCommandStatePath(SWARM_HOME);
|
|
15791
15801
|
let hostMaxDrones = loadMaxDronesOverride(hostCommandState);
|
|
15802
|
+
let operatorMaxDrones = null;
|
|
15792
15803
|
const launch = makeLauncher({
|
|
15793
15804
|
overmindEntry: THIS_FILE,
|
|
15794
15805
|
dbPath: DB_PATH,
|
|
@@ -15843,7 +15854,8 @@ async function runDaemon(opts) {
|
|
|
15843
15854
|
const client = db;
|
|
15844
15855
|
heartbeat = {
|
|
15845
15856
|
push: async () => {
|
|
15846
|
-
const reply = await client.heartbeat(daemonVersion?.get() ?? null, control.state ?? null,
|
|
15857
|
+
const reply = await client.heartbeat(daemonVersion?.get() ?? null, control.state ?? null, lastOwnCapacity);
|
|
15858
|
+
if (reply.maxDrones !== void 0) operatorMaxDrones = reply.maxDrones;
|
|
15847
15859
|
if (reply.commands.length) onHostCommands(reply.commands);
|
|
15848
15860
|
if (reply.logRequests.length) {
|
|
15849
15861
|
await serveLogRequests(
|
|
@@ -15936,7 +15948,10 @@ async function runDaemon(opts) {
|
|
|
15936
15948
|
fallback: SWARM_MAX_IN_FLIGHT > 0 ? SWARM_MAX_IN_FLIGHT : 3,
|
|
15937
15949
|
ttlMs: 1e4
|
|
15938
15950
|
});
|
|
15939
|
-
maxDrones = async () =>
|
|
15951
|
+
maxDrones = async () => {
|
|
15952
|
+
const own = lastOwnCapacity = hostMaxDrones ?? await readMaxDrones();
|
|
15953
|
+
return lastDroneCap = operatorMaxDrones != null ? Math.min(own, operatorMaxDrones) : own;
|
|
15954
|
+
};
|
|
15940
15955
|
}
|
|
15941
15956
|
let verifyModeReader;
|
|
15942
15957
|
let baseBranchReader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskless-app/swarm",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
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": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"execa": "^10.0.0",
|
|
39
39
|
"zod": "3.25.76"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e812f35a996b00111f3f535b6b0a45b379e7afb2",
|
|
42
42
|
"scripts": {
|
|
43
43
|
"overmind": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=development\" tsx src/overmind.ts",
|
|
44
44
|
"swarm": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --conditions=development\" tsx src/cli.ts",
|