openfox 2.0.134 → 2.0.136
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/CHANGELOG.md +45 -0
- package/dist/CHANGELOG.md +45 -0
- package/dist/agent-defaults/builder.agent.md +1 -0
- package/dist/agent-defaults/planner.agent.md +1 -0
- package/dist/{ask-UBIRH3SO.js → ask-46J5WYRL.js} +2 -2
- package/dist/{auto-config-5VSNLVNI.js → auto-config-2A7Y2WOK.js} +25 -6
- package/dist/{backend-NDBY3DAQ.js → backend-24FTDSHF.js} +4 -2
- package/dist/{chat-handler-YCZE2XEJ.js → chat-handler-SYU4HJMI.js} +30 -26
- package/dist/{chunk-CSYOWFPU.js → chunk-342BKOTE.js} +29 -5
- package/dist/{chunk-7QMWYNVF.js → chunk-4LLGI372.js} +2 -2
- package/dist/chunk-4SBVW4UH.js +24 -0
- package/dist/{chunk-FAQDLL2X.js → chunk-5YPHN5NC.js} +8 -8
- package/dist/{chunk-ZMK4VX7V.js → chunk-64YDOCQR.js} +53 -21
- package/dist/{chunk-UV6IH6HK.js → chunk-AKWJMMEJ.js} +15 -1
- package/dist/{chunk-ORCQ3EXQ.js → chunk-BHVR2YS5.js} +2 -2
- package/dist/{chunk-7HGBJFIJ.js → chunk-CPVEONNS.js} +12 -10
- package/dist/{chunk-QDARWVQ2.js → chunk-DG2YSWMC.js} +40 -6
- package/dist/{chunk-J5HOUEPE.js → chunk-EXLCFEML.js} +86 -1010
- package/dist/chunk-FSSUPWYO.js +336 -0
- package/dist/{chunk-5UQ4CKOA.js → chunk-G5GUQKLS.js} +27 -6
- package/dist/{chunk-M4J2L4VH.js → chunk-GP5BYQMF.js} +23 -23
- package/dist/{chunk-7ET46SNE.js → chunk-HEYU7FAY.js} +3 -3
- package/dist/{chunk-MRE4OYKI.js → chunk-MILEZY2J.js} +4 -4
- package/dist/{chunk-O3RCSKUH.js → chunk-MOYWDP73.js} +2 -2
- package/dist/{chunk-J3NMNYGM.js → chunk-N5JKVNLH.js} +2 -2
- package/dist/{chunk-YLVOU7T7.js → chunk-PQKLOLGC.js} +162 -6
- package/dist/{chunk-DWA4IE65.js → chunk-Q33DL67W.js} +2 -2
- package/dist/{chunk-OZWHRBDY.js → chunk-QBWJCO5K.js} +12 -29
- package/dist/{chunk-EUOWCVU6.js → chunk-QMU3ZY2C.js} +37 -341
- package/dist/{chunk-5IXCCMFU.js → chunk-QQQBNL7A.js} +350 -157
- package/dist/{chunk-CTWZPN7G.js → chunk-QUAEH3MP.js} +29 -1
- package/dist/{chunk-5UMXFLET.js → chunk-SAGDTQXD.js} +3 -3
- package/dist/chunk-U6FHHT2B.js +1155 -0
- package/dist/{chunk-YOPXAI2W.js → chunk-UL7776XB.js} +21 -21
- package/dist/{chunk-JURM3RPZ.js → chunk-V5AC2TV7.js} +8 -13
- package/dist/{chunk-BZND27IB.js → chunk-VA2TYWQR.js} +4 -4
- package/dist/{chunk-JE7LW7Y6.js → chunk-VIJVLLPT.js} +12 -3
- package/dist/{chunk-2AI7VYPN.js → chunk-VKMPR25F.js} +9 -3
- package/dist/chunk-VWBPQZLO.js +7 -0
- package/dist/{chunk-ZTBKMVV6.js → chunk-X4PVR6AW.js} +15 -2
- package/dist/chunk-XG3AUMPI.js +72 -0
- package/dist/{chunk-MEEUXRFL.js → chunk-XGG4XCKP.js} +2 -2
- package/dist/{chunk-QICVOQNX.js → chunk-YDPC4FLR.js} +17 -11
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/client-MVI3J7SN.js +18 -0
- package/dist/{client-pure-FLKP6PTI.js → client-pure-YZ4IGCU4.js} +4 -2
- package/dist/{compactor-PD6DQ4NY.js → compactor-LBK53WAK.js} +14 -12
- package/dist/describe-image-4XDLSKAB.js +30 -0
- package/dist/{dynamic-context-WKEXQCTK.js → dynamic-context-RDBNQPPA.js} +12 -10
- package/dist/{events-3WSNI7XC.js → events-YTYYT3PR.js} +6 -6
- package/dist/export-import-GHRCOQHF.js +137 -0
- package/dist/{folding-H7JTX6KI.js → folding-3MMOPS4W.js} +4 -4
- package/dist/{http-client-A445WYZU.js → http-client-C6UYWVWZ.js} +3 -3
- package/dist/launch-YZ46OEFP.js +58 -0
- package/dist/{manager-ZACEUL5P.js → manager-FSPRJCYT.js} +4 -4
- package/dist/{model-catalog-2PCKTYGW.js → model-catalog-Y5MA5OZP.js} +2 -2
- package/dist/{orchestrator-OT66EDXO.js → orchestrator-6QGQ55NT.js} +29 -25
- package/dist/package.json +1 -1
- package/dist/{path-security-5CFMMULR.js → path-security-EC4Z2ZZG.js} +8 -8
- package/dist/{platform-XPMZKAUB.js → platform-KPKYBU54.js} +3 -3
- package/dist/{processor-CHMHMMIE.js → processor-B2RV7MVC.js} +29 -25
- package/dist/{provider-JWUNG2TD.js → provider-SOC6Z25R.js} +10 -8
- package/dist/{provider-manager-2KKZ37XJ.js → provider-manager-Y53SVVQ3.js} +10 -8
- package/dist/{registry-BEIR7Y5G.js → registry-FMDMGIUB.js} +3 -3
- package/dist/{serve-HSDVY37K.js → serve-EWA5HXC7.js} +41 -32
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +34 -30
- package/dist/server-ZAPAB3FS.js +61 -0
- package/dist/{service-XIUNS5XV.js → service-NKLQH647.js} +12 -9
- package/dist/{session-overrides-Y5B4XQPU.js → session-overrides-ANQBKV74.js} +11 -7
- package/dist/{sessions-IGINPPBP.js → sessions-GLYACE5R.js} +6 -4
- package/dist/{settings-ZJPM6PQV.js → settings-WH6BVQCP.js} +4 -2
- package/dist/{tasks-3JJWJJ3X.js → tasks-GPM3JAE6.js} +14 -10
- package/dist/tool-adapter-ZY4FC4C4.js +9 -0
- package/dist/{tools-WWIWD3O7.js → tools-EJOABHVO.js} +27 -23
- package/dist/{update-Q6SH7UP2.js → update-IPHJMRQZ.js} +2 -2
- package/dist/web/assets/index-CfFwerN2.js +313 -0
- package/dist/web/assets/{index-Y300llHY.css → index-ChJjYovg.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-QTLYD2FF.js +0 -7
- package/dist/client-VVYOWXRR.js +0 -16
- package/dist/launch-FJ65HRV4.js +0 -54
- package/dist/server-3UVLECD5.js +0 -57
- package/dist/tool-adapter-FJAFLDZA.js +0 -8
- package/dist/web/assets/index-C48qmBAI.js +0 -313
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-342BKOTE.js";
|
|
4
4
|
import {
|
|
5
5
|
createChatPathConfirmationMessage
|
|
6
6
|
} from "./chunk-AATMPL7S.js";
|
|
7
7
|
import {
|
|
8
8
|
getPlatformShell
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MOYWDP73.js";
|
|
10
10
|
|
|
11
11
|
// src/server/tools/path-security.ts
|
|
12
12
|
import { realpath } from "fs/promises";
|
|
@@ -138,7 +138,7 @@ function normalizeExtracted(path) {
|
|
|
138
138
|
return posix.normalize(path);
|
|
139
139
|
}
|
|
140
140
|
function isPlaceholderToken(str) {
|
|
141
|
-
return str.includes("__URL__") || str.includes("__FILEURL__") || str.includes("__SED__") || str.includes("__COMMIT_MSG__");
|
|
141
|
+
return str.includes("__URL__") || str.includes("__FILEURL__") || str.includes("__SED__") || str.includes("__COMMIT_MSG__") || str.includes("__PATTERN__");
|
|
142
142
|
}
|
|
143
143
|
var REGEX_TOOL_RE = /\b(?:sed|awk|gawk|mawk|perl|ruby|raku)\b/;
|
|
144
144
|
var SHELL_TOKEN_END_RE = /[\s'"`|&;,<>()]/;
|
|
@@ -157,6 +157,159 @@ function isRegexAddress(command, start, end, hasRegexTool, quote) {
|
|
|
157
157
|
}
|
|
158
158
|
return hasRegexTool && quote !== null && !/\s/.test(content);
|
|
159
159
|
}
|
|
160
|
+
var SEARCH_TOOL_RE = /^(?:grep|egrep|fgrep|rg|ag|ack)$/;
|
|
161
|
+
var SEARCH_OPTS_WITH_VALUE = /* @__PURE__ */ new Set([
|
|
162
|
+
"-e",
|
|
163
|
+
"--regexp",
|
|
164
|
+
"-f",
|
|
165
|
+
"--file",
|
|
166
|
+
"-m",
|
|
167
|
+
"--max-count",
|
|
168
|
+
"-A",
|
|
169
|
+
"--after-context",
|
|
170
|
+
"-B",
|
|
171
|
+
"--before-context",
|
|
172
|
+
"-C",
|
|
173
|
+
"--context",
|
|
174
|
+
"-d",
|
|
175
|
+
"--directories",
|
|
176
|
+
"-D",
|
|
177
|
+
"--devices",
|
|
178
|
+
"--include",
|
|
179
|
+
"--exclude",
|
|
180
|
+
"--exclude-dir",
|
|
181
|
+
"--binary-files",
|
|
182
|
+
"--color",
|
|
183
|
+
"--colour",
|
|
184
|
+
"--label",
|
|
185
|
+
"-g",
|
|
186
|
+
"--glob",
|
|
187
|
+
"-t",
|
|
188
|
+
"--type"
|
|
189
|
+
]);
|
|
190
|
+
var PATTERN_VALUE_OPTS = /* @__PURE__ */ new Set(["-e", "--regexp"]);
|
|
191
|
+
var PATTERN_FILE_OPTS = /* @__PURE__ */ new Set(["-f", "--file"]);
|
|
192
|
+
function tokenizeShell(command) {
|
|
193
|
+
const out = [];
|
|
194
|
+
const n = command.length;
|
|
195
|
+
let i = 0;
|
|
196
|
+
while (i < n) {
|
|
197
|
+
const ch = command[i];
|
|
198
|
+
if (/\s/.test(ch)) {
|
|
199
|
+
i += 1;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (/[|&;()<>]/.test(ch)) {
|
|
203
|
+
let j = i + 1;
|
|
204
|
+
if (ch === "|" && command[j] === "|" || ch === "&" && command[j] === "&") j += 1;
|
|
205
|
+
out.push({ text: command.slice(i, j), start: i, end: j, isOperator: true });
|
|
206
|
+
i = j;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const start = i;
|
|
210
|
+
let quote = null;
|
|
211
|
+
while (i < n) {
|
|
212
|
+
const c = command[i];
|
|
213
|
+
if (quote !== null) {
|
|
214
|
+
if (c === "\\" && quote !== "'") {
|
|
215
|
+
i += 2;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
if (c === quote) {
|
|
219
|
+
quote = null;
|
|
220
|
+
i += 1;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
i += 1;
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if (c === "'" || c === '"' || c === "`") {
|
|
227
|
+
quote = c;
|
|
228
|
+
i += 1;
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (/[\s|&;()<>]/.test(c)) break;
|
|
232
|
+
if (c === "\\") {
|
|
233
|
+
i += 2;
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
i += 1;
|
|
237
|
+
}
|
|
238
|
+
out.push({ text: command.slice(start, i), start, end: i, isOperator: false });
|
|
239
|
+
}
|
|
240
|
+
return out;
|
|
241
|
+
}
|
|
242
|
+
function commandBasename(token) {
|
|
243
|
+
const bare = token.replace(/^["'`]|["'`]$/g, "");
|
|
244
|
+
const slash = bare.lastIndexOf("/");
|
|
245
|
+
return slash >= 0 ? bare.slice(slash + 1) : bare;
|
|
246
|
+
}
|
|
247
|
+
function maskSearchToolPatterns(command) {
|
|
248
|
+
if (!command.includes("/")) return command;
|
|
249
|
+
const tokens = tokenizeShell(command);
|
|
250
|
+
const spans = [];
|
|
251
|
+
let atCommandStart = true;
|
|
252
|
+
let i = 0;
|
|
253
|
+
while (i < tokens.length) {
|
|
254
|
+
const tok = tokens[i];
|
|
255
|
+
if (tok.isOperator) {
|
|
256
|
+
atCommandStart = true;
|
|
257
|
+
i += 1;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (!atCommandStart || !SEARCH_TOOL_RE.test(commandBasename(tok.text))) {
|
|
261
|
+
atCommandStart = atCommandStart && /^[A-Za-z_][A-Za-z0-9_]*=/.test(tok.text);
|
|
262
|
+
i += 1;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
let patternSupplied = false;
|
|
266
|
+
let patternSpan = null;
|
|
267
|
+
let j = i + 1;
|
|
268
|
+
while (j < tokens.length && !tokens[j].isOperator) {
|
|
269
|
+
const arg = tokens[j];
|
|
270
|
+
if (arg.text.startsWith("-") && arg.text !== "-" && arg.text !== "--") {
|
|
271
|
+
const eq = arg.text.indexOf("=");
|
|
272
|
+
if (eq > 0) {
|
|
273
|
+
const name = arg.text.slice(0, eq);
|
|
274
|
+
if (PATTERN_VALUE_OPTS.has(name)) {
|
|
275
|
+
patternSupplied = true;
|
|
276
|
+
spans.push([arg.start + eq + 1, arg.end]);
|
|
277
|
+
} else if (PATTERN_FILE_OPTS.has(name)) {
|
|
278
|
+
patternSupplied = true;
|
|
279
|
+
}
|
|
280
|
+
j += 1;
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
if (SEARCH_OPTS_WITH_VALUE.has(arg.text)) {
|
|
284
|
+
const value = tokens[j + 1];
|
|
285
|
+
if (value && !value.isOperator) {
|
|
286
|
+
if (PATTERN_VALUE_OPTS.has(arg.text)) {
|
|
287
|
+
patternSupplied = true;
|
|
288
|
+
spans.push([value.start, value.end]);
|
|
289
|
+
} else if (PATTERN_FILE_OPTS.has(arg.text)) {
|
|
290
|
+
patternSupplied = true;
|
|
291
|
+
}
|
|
292
|
+
j += 2;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
j += 1;
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (!patternSupplied) patternSpan = [arg.start, arg.end];
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
if (patternSpan) spans.push(patternSpan);
|
|
303
|
+
atCommandStart = false;
|
|
304
|
+
i = j;
|
|
305
|
+
}
|
|
306
|
+
if (spans.length === 0) return command;
|
|
307
|
+
let out = command;
|
|
308
|
+
for (const [start, end] of spans.sort((a, b) => b[0] - a[0])) {
|
|
309
|
+
out = `${out.slice(0, start)} __PATTERN__ ${out.slice(end)}`;
|
|
310
|
+
}
|
|
311
|
+
return out;
|
|
312
|
+
}
|
|
160
313
|
function maskRegexAddresses(command) {
|
|
161
314
|
const work = command.replace(/(?:=|!)~\s+/g, " __SED__ ");
|
|
162
315
|
if (!work.includes("/")) return work;
|
|
@@ -387,6 +540,7 @@ function maskCommandForPathScan(command) {
|
|
|
387
540
|
sanitized = sanitized.replace(/(?<!\w)s\/[^/]*\/[^/]*\/[gip]*/g, " __SED__ ");
|
|
388
541
|
sanitized = sanitized.replace(/(?<!\w)s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
|
|
389
542
|
sanitized = sanitized.replace(/(?<!\w)s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
|
|
543
|
+
sanitized = maskSearchToolPatterns(sanitized);
|
|
390
544
|
sanitized = maskRegexAddresses(sanitized);
|
|
391
545
|
sanitized = sanitized.replace(
|
|
392
546
|
/git\s+commit\b.*?(?:-(?:[a-zA-Z]*m)(?=\s)|--message)\s+(["'])(?:(?!\1).)*\1/g,
|
|
@@ -445,7 +599,7 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
445
599
|
}
|
|
446
600
|
}
|
|
447
601
|
if (posixShell) {
|
|
448
|
-
const absolutePattern = /(?:^|[\s=(])(\/[^\s"'|&;<>`()]+)/g;
|
|
602
|
+
const absolutePattern = /(?:^|([\s=('"]))(\/[^\s"'|&;<>`()]+)/g;
|
|
449
603
|
const rootPattern = /(?:^|[\s=(])\/(?=$|[\s'"`|&;,<()])/g;
|
|
450
604
|
let isRoot = false;
|
|
451
605
|
for (const match2 of scanCommand.matchAll(rootPattern)) {
|
|
@@ -460,7 +614,9 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
460
614
|
paths.push("/");
|
|
461
615
|
}
|
|
462
616
|
while ((match = absolutePattern.exec(scanCommand)) !== null) {
|
|
463
|
-
const
|
|
617
|
+
const opener = match[1] ?? "";
|
|
618
|
+
const candidate = match[2];
|
|
619
|
+
if ((opener === "'" || opener === '"') && candidate.endsWith("/")) continue;
|
|
464
620
|
if (isPlaceholderToken(candidate)) continue;
|
|
465
621
|
if (looksLikeRegex(candidate)) continue;
|
|
466
622
|
const resolved = normalizeExtracted(candidate);
|
|
@@ -782,4 +938,4 @@ export {
|
|
|
782
938
|
getConfirmationSessionId,
|
|
783
939
|
getPendingConfirmationsBySession
|
|
784
940
|
};
|
|
785
|
-
//# sourceMappingURL=chunk-
|
|
941
|
+
//# sourceMappingURL=chunk-PQKLOLGC.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
deleteSetting,
|
|
12
12
|
getSetting,
|
|
13
13
|
setSetting
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QUAEH3MP.js";
|
|
15
15
|
|
|
16
16
|
// src/server/context/instructions.ts
|
|
17
17
|
import { readFile, access } from "fs/promises";
|
|
@@ -452,4 +452,4 @@ export {
|
|
|
452
452
|
deleteSkill,
|
|
453
453
|
deleteProjectSkill
|
|
454
454
|
};
|
|
455
|
-
//# sourceMappingURL=chunk-
|
|
455
|
+
//# sourceMappingURL=chunk-Q33DL67W.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serverT
|
|
3
|
+
} from "./chunk-4SBVW4UH.js";
|
|
1
4
|
import {
|
|
2
5
|
deleteItemFromDir,
|
|
3
6
|
getDefaultIds,
|
|
@@ -8,25 +11,16 @@ import {
|
|
|
8
11
|
} from "./chunk-OSXPQSLW.js";
|
|
9
12
|
import {
|
|
10
13
|
parseDefaultModelSelection
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G5GUQKLS.js";
|
|
12
15
|
import {
|
|
13
16
|
getProject
|
|
14
17
|
} from "./chunk-DPFET73G.js";
|
|
15
|
-
import {
|
|
16
|
-
SETTINGS_KEYS,
|
|
17
|
-
getSetting
|
|
18
|
-
} from "./chunk-CTWZPN7G.js";
|
|
19
18
|
import {
|
|
20
19
|
getDatabase
|
|
21
20
|
} from "./chunk-JU757HVI.js";
|
|
22
21
|
import {
|
|
23
22
|
logger
|
|
24
23
|
} from "./chunk-K44MW7JJ.js";
|
|
25
|
-
import {
|
|
26
|
-
getLocale,
|
|
27
|
-
setLocale,
|
|
28
|
-
t
|
|
29
|
-
} from "./chunk-24YKXKCG.js";
|
|
30
24
|
|
|
31
25
|
// src/server/commands/registry.ts
|
|
32
26
|
import { writeFile, mkdir, unlink } from "fs/promises";
|
|
@@ -663,16 +657,6 @@ function safeParseAttachments(raw) {
|
|
|
663
657
|
}
|
|
664
658
|
}
|
|
665
659
|
|
|
666
|
-
// src/server/i18n.ts
|
|
667
|
-
function resolveLocale() {
|
|
668
|
-
return getSetting(SETTINGS_KEYS.DISPLAY_LOCALE) === "fr" ? "fr" : "en";
|
|
669
|
-
}
|
|
670
|
-
function serverT(tx, vars) {
|
|
671
|
-
const locale = resolveLocale();
|
|
672
|
-
if (getLocale() !== locale) setLocale(locale);
|
|
673
|
-
return t(tx, vars);
|
|
674
|
-
}
|
|
675
|
-
|
|
676
660
|
// src/server/tasks/service.ts
|
|
677
661
|
function isTaskConflictError(err) {
|
|
678
662
|
return err instanceof Error && err.code === "CONFLICT";
|
|
@@ -946,11 +930,11 @@ function createTasksService(deps) {
|
|
|
946
930
|
return computeCounts(listTasks(projectId));
|
|
947
931
|
}
|
|
948
932
|
function computeCounts(tasks) {
|
|
949
|
-
const todo = tasks.filter((
|
|
950
|
-
const inProgress = tasks.filter((
|
|
951
|
-
const running = tasks.filter((
|
|
952
|
-
const queued = tasks.filter((
|
|
953
|
-
const done = tasks.filter((
|
|
933
|
+
const todo = tasks.filter((t) => t.status === "todo").length;
|
|
934
|
+
const inProgress = tasks.filter((t) => t.status === "in_progress").length;
|
|
935
|
+
const running = tasks.filter((t) => t.status === "in_progress" && t.runState === "running").length;
|
|
936
|
+
const queued = tasks.filter((t) => t.status === "in_progress" && t.runState === "queued").length;
|
|
937
|
+
const done = tasks.filter((t) => t.status === "done").length;
|
|
954
938
|
return { open: todo + inProgress, todo, inProgress, running, queued, done };
|
|
955
939
|
}
|
|
956
940
|
function requiredGates(projectId, variant) {
|
|
@@ -976,7 +960,7 @@ function createTasksService(deps) {
|
|
|
976
960
|
return err;
|
|
977
961
|
}
|
|
978
962
|
function activeCount(projectId) {
|
|
979
|
-
return listTasks(projectId).filter((
|
|
963
|
+
return listTasks(projectId).filter((t) => t.status === "in_progress" && t.runState === "running").length;
|
|
980
964
|
}
|
|
981
965
|
async function seedSession(projectId, task, from, targetSessionId) {
|
|
982
966
|
let session;
|
|
@@ -1035,7 +1019,7 @@ function createTasksService(deps) {
|
|
|
1035
1019
|
const settings = getTaskSettings(projectId);
|
|
1036
1020
|
if (settings.queuePaused) return void 0;
|
|
1037
1021
|
if (activeCount(projectId) >= settings.slotLimit) return void 0;
|
|
1038
|
-
const queued = listTasks(projectId).filter((
|
|
1022
|
+
const queued = listTasks(projectId).filter((t) => t.status === "in_progress" && t.runState === "queued").sort((a, b) => a.position - b.position);
|
|
1039
1023
|
const next = queued[0];
|
|
1040
1024
|
if (!next) return void 0;
|
|
1041
1025
|
setTaskRunState(next.id, "running");
|
|
@@ -1133,7 +1117,6 @@ function promptLabel(prompt) {
|
|
|
1133
1117
|
}
|
|
1134
1118
|
|
|
1135
1119
|
export {
|
|
1136
|
-
serverT,
|
|
1137
1120
|
loadDefaultCommands,
|
|
1138
1121
|
loadUserCommands,
|
|
1139
1122
|
loadProjectCommands,
|
|
@@ -1166,4 +1149,4 @@ export {
|
|
|
1166
1149
|
isTaskGateError,
|
|
1167
1150
|
createTasksService
|
|
1168
1151
|
};
|
|
1169
|
-
//# sourceMappingURL=chunk-
|
|
1152
|
+
//# sourceMappingURL=chunk-QBWJCO5K.js.map
|