@wrongstack/core 0.82.6 → 0.84.1
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/defaults/index.d.ts +1 -1
- package/dist/defaults/index.js +15 -15
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.js +6 -7
- package/dist/execution/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +84 -78
- package/dist/index.js.map +1 -1
- package/dist/{secret-scrubber-7rSC_emZ.d.ts → secret-scrubber-yGBFQYju.d.ts} +10 -2
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +8 -7
- package/dist/security/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +8 -7
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +12 -1
- package/dist/utils/index.js +23 -10
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1173,20 +1173,20 @@ var DefaultSecretVault = class {
|
|
|
1173
1173
|
return key;
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
|
-
function decryptConfigSecrets(cfg, vault) {
|
|
1176
|
+
function decryptConfigSecrets(cfg, vault, opts) {
|
|
1177
|
+
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
1177
1178
|
return walk(cfg, vault, (v, key) => {
|
|
1178
1179
|
try {
|
|
1179
1180
|
return vault.decrypt(v);
|
|
1180
1181
|
} catch (err) {
|
|
1181
|
-
|
|
1182
|
-
`[secret-vault] Failed to decrypt "${key}"
|
|
1183
|
-
err instanceof Error ? err.message : err
|
|
1182
|
+
warn(
|
|
1183
|
+
`[secret-vault] Failed to decrypt "${key}": ${err instanceof Error ? err.message : err}`
|
|
1184
1184
|
);
|
|
1185
1185
|
return "";
|
|
1186
1186
|
}
|
|
1187
1187
|
});
|
|
1188
1188
|
}
|
|
1189
|
-
function encryptConfigSecrets(cfg, vault) {
|
|
1189
|
+
function encryptConfigSecrets(cfg, vault, _opts) {
|
|
1190
1190
|
return walk(cfg, vault, (v) => vault.encrypt(v));
|
|
1191
1191
|
}
|
|
1192
1192
|
function walk(node, vault, transform) {
|
|
@@ -1247,7 +1247,8 @@ async function migratePlaintextSecrets(configPath, vault) {
|
|
|
1247
1247
|
await restrictFilePermissions(configPath);
|
|
1248
1248
|
return { migrated: counter.n, file: configPath };
|
|
1249
1249
|
}
|
|
1250
|
-
async function restrictFilePermissions(filePath) {
|
|
1250
|
+
async function restrictFilePermissions(filePath, opts) {
|
|
1251
|
+
const warn = ((msg) => console.warn(msg));
|
|
1251
1252
|
if (process.platform === "win32") {
|
|
1252
1253
|
try {
|
|
1253
1254
|
const { execFile: execFile2 } = await import('child_process');
|
|
@@ -1255,7 +1256,7 @@ async function restrictFilePermissions(filePath) {
|
|
|
1255
1256
|
const execFileAsync = promisify2(execFile2);
|
|
1256
1257
|
await execFileAsync("icacls", [filePath, "/inheritance:r", "/grant:r", `${process.env.USERNAME}:(F)`]);
|
|
1257
1258
|
} catch {
|
|
1258
|
-
|
|
1259
|
+
warn(`[secret-vault] Could not restrict permissions on ${filePath} \u2014 config file may be readable by other users on this system.`);
|
|
1259
1260
|
}
|
|
1260
1261
|
} else {
|
|
1261
1262
|
try {
|
|
@@ -4733,12 +4734,25 @@ function buildChildEnv(optsOrSessionId) {
|
|
|
4733
4734
|
if (opts.sessionId) out["WRONGSTACK_SESSION_ID"] = opts.sessionId;
|
|
4734
4735
|
return out;
|
|
4735
4736
|
}
|
|
4737
|
+
|
|
4738
|
+
// src/utils/sleep.ts
|
|
4739
|
+
function sleep(ms) {
|
|
4740
|
+
return new Promise((resolve13) => setTimeout(resolve13, ms));
|
|
4741
|
+
}
|
|
4742
|
+
|
|
4743
|
+
// src/utils/expect-defined.ts
|
|
4736
4744
|
function expectDefined7(value) {
|
|
4737
4745
|
if (value === null || value === void 0) {
|
|
4738
4746
|
throw new Error("Expected value to be defined");
|
|
4739
4747
|
}
|
|
4740
4748
|
return value;
|
|
4741
4749
|
}
|
|
4750
|
+
function expectDefined8(value) {
|
|
4751
|
+
if (value === null || value === void 0) {
|
|
4752
|
+
throw new Error("Expected value to be defined");
|
|
4753
|
+
}
|
|
4754
|
+
return value;
|
|
4755
|
+
}
|
|
4742
4756
|
var GLOB_CHARS = /* @__PURE__ */ new Set(["*", "?", "["]);
|
|
4743
4757
|
var IS_WINDOWS = process.platform === "win32";
|
|
4744
4758
|
var SEP = IS_WINDOWS ? "\\" : "/";
|
|
@@ -4752,7 +4766,7 @@ function globToRegex(pat) {
|
|
|
4752
4766
|
let i = 0;
|
|
4753
4767
|
let re = "^";
|
|
4754
4768
|
while (i < pat.length) {
|
|
4755
|
-
const c =
|
|
4769
|
+
const c = expectDefined8(pat[i]);
|
|
4756
4770
|
if (c === "*") {
|
|
4757
4771
|
if (pat[i + 1] === "*") {
|
|
4758
4772
|
re += ".*";
|
|
@@ -4791,7 +4805,7 @@ function globToRegex(pat) {
|
|
|
4791
4805
|
}
|
|
4792
4806
|
function baseDir(pat) {
|
|
4793
4807
|
let i = pat.length - 1;
|
|
4794
|
-
while (i >= 0 && !GLOB_CHARS.has(
|
|
4808
|
+
while (i >= 0 && !GLOB_CHARS.has(expectDefined8(pat[i])) && pat[i] !== SEP && pat[i] !== "/") i--;
|
|
4795
4809
|
const cut = i >= 0 ? pat.lastIndexOf(SEP, i) : pat.lastIndexOf("/", i);
|
|
4796
4810
|
return cut < 0 ? "." : pat.slice(0, cut);
|
|
4797
4811
|
}
|
|
@@ -4856,7 +4870,7 @@ async function expandGlob(pattern) {
|
|
|
4856
4870
|
}
|
|
4857
4871
|
|
|
4858
4872
|
// src/utils/json-repair.ts
|
|
4859
|
-
function
|
|
4873
|
+
function expectDefined9(value) {
|
|
4860
4874
|
if (value === null || value === void 0) {
|
|
4861
4875
|
throw new Error("Expected value to be defined");
|
|
4862
4876
|
}
|
|
@@ -4873,7 +4887,7 @@ function completePartialObject(s) {
|
|
|
4873
4887
|
let contentEnd = 0;
|
|
4874
4888
|
let stringBraceDepth = 0;
|
|
4875
4889
|
for (let i = 0; i < s.length; i++) {
|
|
4876
|
-
const ch =
|
|
4890
|
+
const ch = expectDefined9(s[i]);
|
|
4877
4891
|
if (inString) {
|
|
4878
4892
|
contentEnd = i + 1;
|
|
4879
4893
|
if (escaped) {
|
|
@@ -4969,7 +4983,7 @@ function mergeCustomModelDefs(providerCustomModels, configModels) {
|
|
|
4969
4983
|
|
|
4970
4984
|
// src/storage/session-store.ts
|
|
4971
4985
|
init_atomic_write();
|
|
4972
|
-
function
|
|
4986
|
+
function expectDefined10(value) {
|
|
4973
4987
|
if (value === null || value === void 0) {
|
|
4974
4988
|
throw new Error("Expected value to be defined");
|
|
4975
4989
|
}
|
|
@@ -5685,7 +5699,7 @@ var FileSessionWriter = class {
|
|
|
5685
5699
|
let targetCheckpointLine = -1;
|
|
5686
5700
|
let afterTarget = false;
|
|
5687
5701
|
for (let i = 0; i < lines.length; i++) {
|
|
5688
|
-
const line =
|
|
5702
|
+
const line = expectDefined10(lines[i]);
|
|
5689
5703
|
if (!line.trim()) continue;
|
|
5690
5704
|
let event;
|
|
5691
5705
|
try {
|
|
@@ -7940,8 +7954,6 @@ function parseDescription(raw) {
|
|
|
7940
7954
|
}
|
|
7941
7955
|
return { trigger, scope };
|
|
7942
7956
|
}
|
|
7943
|
-
|
|
7944
|
-
// src/core/streaming-response-builder.ts
|
|
7945
7957
|
function buildResponse(state) {
|
|
7946
7958
|
const content = [];
|
|
7947
7959
|
for (const b of state.blockOrder) {
|
|
@@ -8000,7 +8012,7 @@ function handleContentBlockStart(state, ev) {
|
|
|
8000
8012
|
state.textBuffers.push("");
|
|
8001
8013
|
state.blockOrder.push({ kind: "text", idx: state.currentTextIndex });
|
|
8002
8014
|
} else if (kind === "tool_use") {
|
|
8003
|
-
const id = ev.id ??
|
|
8015
|
+
const id = ev.id ?? randomUUID();
|
|
8004
8016
|
state.tools.set(id, { name: ev.name ?? "unknown", partial: "" });
|
|
8005
8017
|
state.blockOrder.push({ kind: "tool", id });
|
|
8006
8018
|
state.currentTextIndex = -1;
|
|
@@ -8493,7 +8505,7 @@ var IntelligentCompactor = class {
|
|
|
8493
8505
|
};
|
|
8494
8506
|
|
|
8495
8507
|
// src/models/llm-selector.ts
|
|
8496
|
-
function
|
|
8508
|
+
function expectDefined11(value) {
|
|
8497
8509
|
if (value === null || value === void 0) {
|
|
8498
8510
|
throw new Error("Expected value to be defined");
|
|
8499
8511
|
}
|
|
@@ -8539,7 +8551,7 @@ function formatMessages(messages, maxChars = 8e3) {
|
|
|
8539
8551
|
const lines = [];
|
|
8540
8552
|
let used = 0;
|
|
8541
8553
|
for (let i = 0; i < messages.length; i++) {
|
|
8542
|
-
const m =
|
|
8554
|
+
const m = expectDefined11(messages[i]);
|
|
8543
8555
|
const role = m.role.padEnd(10, " ");
|
|
8544
8556
|
let text;
|
|
8545
8557
|
if (typeof m.content === "string") {
|
|
@@ -8604,7 +8616,7 @@ IMPORTANT: Total conversation (${totalTokens} tokens) exceeds budget (${effectiv
|
|
|
8604
8616
|
let tokenCount = 0;
|
|
8605
8617
|
let startIdx = 0;
|
|
8606
8618
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
8607
|
-
const m =
|
|
8619
|
+
const m = expectDefined11(messages[i]);
|
|
8608
8620
|
const cost = typeof m.content === "string" ? Math.ceil(m.content.length / 4) : m.content.reduce(
|
|
8609
8621
|
(acc, b) => acc + (b.type === "text" ? Math.ceil(b.text.length / 4) : Math.ceil(JSON.stringify(b).length / 4)),
|
|
8610
8622
|
0
|
|
@@ -9914,9 +9926,6 @@ ${recentJournal}` : "No prior iterations.",
|
|
|
9914
9926
|
await saveGoal(this.goalPath, { ...current, engineState: state });
|
|
9915
9927
|
}
|
|
9916
9928
|
};
|
|
9917
|
-
function sleep(ms) {
|
|
9918
|
-
return new Promise((resolve13) => setTimeout(resolve13, ms));
|
|
9919
|
-
}
|
|
9920
9929
|
|
|
9921
9930
|
// src/coordination/subagent-budget.ts
|
|
9922
9931
|
var BudgetExceededError = class extends Error {
|
|
@@ -13868,15 +13877,12 @@ var DefaultMultiAgentCoordinator = class _DefaultMultiAgentCoordinator extends E
|
|
|
13868
13877
|
};
|
|
13869
13878
|
|
|
13870
13879
|
// src/execution/parallel-eternal-engine.ts
|
|
13871
|
-
function
|
|
13880
|
+
function expectDefined12(value) {
|
|
13872
13881
|
if (value === null || value === void 0) {
|
|
13873
13882
|
throw new Error("Expected value to be defined");
|
|
13874
13883
|
}
|
|
13875
13884
|
return value;
|
|
13876
13885
|
}
|
|
13877
|
-
function sleep2(ms) {
|
|
13878
|
-
return new Promise((resolve13) => setTimeout(resolve13, ms));
|
|
13879
|
-
}
|
|
13880
13886
|
var GOAL_COMPLETE_MARKER2 = /^\s*\[goal[_\s-]?complete\]\s*$/im;
|
|
13881
13887
|
var ParallelEternalEngine = class {
|
|
13882
13888
|
constructor(opts) {
|
|
@@ -13951,7 +13957,7 @@ var ParallelEternalEngine = class {
|
|
|
13951
13957
|
);
|
|
13952
13958
|
}
|
|
13953
13959
|
if (this.stopRequested) break;
|
|
13954
|
-
await
|
|
13960
|
+
await sleep(2e3);
|
|
13955
13961
|
}
|
|
13956
13962
|
} finally {
|
|
13957
13963
|
this.state = "stopped";
|
|
@@ -14032,7 +14038,7 @@ var ParallelEternalEngine = class {
|
|
|
14032
14038
|
// Fan-out
|
|
14033
14039
|
// -------------------------------------------------------------------------
|
|
14034
14040
|
async fanOut(goal, tasks) {
|
|
14035
|
-
const coordinator =
|
|
14041
|
+
const coordinator = expectDefined12(this.coordinator);
|
|
14036
14042
|
const slotCount = Math.min(this.slots, tasks.length);
|
|
14037
14043
|
const routes = this.dispatchEnabled ? await Promise.all(
|
|
14038
14044
|
tasks.slice(0, slotCount).map(
|
|
@@ -14064,7 +14070,7 @@ ${recentJournal}` : "No prior iterations.",
|
|
|
14064
14070
|
const routeInfo = [];
|
|
14065
14071
|
const spawnPromises = [];
|
|
14066
14072
|
for (let i = 0; i < slotCount; i++) {
|
|
14067
|
-
const task =
|
|
14073
|
+
const task = expectDefined12(tasks[i]);
|
|
14068
14074
|
const route = routes[i] ?? null;
|
|
14069
14075
|
const subagentId = `parallel-${this.iterations}-${i}`;
|
|
14070
14076
|
const taskId = randomUUID();
|
|
@@ -18566,7 +18572,7 @@ var TaskGraphStore = class {
|
|
|
18566
18572
|
};
|
|
18567
18573
|
|
|
18568
18574
|
// src/sdd/spec-builder.ts
|
|
18569
|
-
function
|
|
18575
|
+
function expectDefined13(value) {
|
|
18570
18576
|
if (value === null || value === void 0) {
|
|
18571
18577
|
throw new Error("Expected value to be defined");
|
|
18572
18578
|
}
|
|
@@ -18617,7 +18623,7 @@ function buildQuestioningPrompt(session, min, max) {
|
|
|
18617
18623
|
if (answered > 0) {
|
|
18618
18624
|
lines.push("", "**Conversation so far:**");
|
|
18619
18625
|
for (let i = 0; i < answered; i++) {
|
|
18620
|
-
const a =
|
|
18626
|
+
const a = expectDefined13(session.answers[i]);
|
|
18621
18627
|
lines.push(``, `Q${i + 1}: ${a.question}`, `A${i + 1}: ${a.answer}`);
|
|
18622
18628
|
}
|
|
18623
18629
|
}
|
|
@@ -19359,7 +19365,7 @@ function truncate2(str, maxLen) {
|
|
|
19359
19365
|
}
|
|
19360
19366
|
|
|
19361
19367
|
// src/sdd/critical-path.ts
|
|
19362
|
-
function
|
|
19368
|
+
function expectDefined14(value) {
|
|
19363
19369
|
if (value === null || value === void 0) {
|
|
19364
19370
|
throw new Error("Expected value to be defined");
|
|
19365
19371
|
}
|
|
@@ -19440,7 +19446,7 @@ function getTransitiveBlocked(_graph, taskId, blocksMap) {
|
|
|
19440
19446
|
const visited = /* @__PURE__ */ new Set();
|
|
19441
19447
|
const queue = [taskId];
|
|
19442
19448
|
while (queue.length > 0) {
|
|
19443
|
-
const current =
|
|
19449
|
+
const current = expectDefined14(queue.shift());
|
|
19444
19450
|
const blocked = blocksMap.get(current);
|
|
19445
19451
|
if (!blocked) continue;
|
|
19446
19452
|
for (const id of blocked) {
|
|
@@ -19486,7 +19492,7 @@ function computeCriticalPath(graph, _topoOrder, blockedByMap) {
|
|
|
19486
19492
|
if (!changed) break;
|
|
19487
19493
|
}
|
|
19488
19494
|
let maxDist = 0;
|
|
19489
|
-
let maxId =
|
|
19495
|
+
let maxId = expectDefined14(allIds[0]);
|
|
19490
19496
|
for (const id of allIds) {
|
|
19491
19497
|
const d = dist.get(id) ?? 0;
|
|
19492
19498
|
if (d > maxDist) {
|
|
@@ -19955,7 +19961,7 @@ var SddTaskDecomposer = class {
|
|
|
19955
19961
|
return nodes.some((n) => n.status === "blocked");
|
|
19956
19962
|
}
|
|
19957
19963
|
};
|
|
19958
|
-
function
|
|
19964
|
+
function expectDefined15(value) {
|
|
19959
19965
|
if (value === null || value === void 0) {
|
|
19960
19966
|
throw new Error("Expected value to be defined");
|
|
19961
19967
|
}
|
|
@@ -20109,8 +20115,8 @@ var SddParallelRun = class {
|
|
|
20109
20115
|
const successCount = results.filter((r) => r.status === "success").length;
|
|
20110
20116
|
const failCount = results.length - successCount;
|
|
20111
20117
|
for (let i = 0; i < results.length; i++) {
|
|
20112
|
-
const result =
|
|
20113
|
-
const taskId =
|
|
20118
|
+
const result = expectDefined15(results[i]);
|
|
20119
|
+
const taskId = expectDefined15(taskIds[i]);
|
|
20114
20120
|
if (result.status === "success") {
|
|
20115
20121
|
this.opts.tracker.updateNodeStatus(taskId, "completed");
|
|
20116
20122
|
} else {
|
|
@@ -21217,7 +21223,7 @@ var allServers = () => ({
|
|
|
21217
21223
|
"zai-vision": { ...zaiVisionServer(), enabled: false },
|
|
21218
21224
|
"minimax-vision": { ...miniMaxVisionServer(), enabled: false }
|
|
21219
21225
|
});
|
|
21220
|
-
function
|
|
21226
|
+
function expectDefined16(value) {
|
|
21221
21227
|
if (value === null || value === void 0) {
|
|
21222
21228
|
throw new Error("Expected value to be defined");
|
|
21223
21229
|
}
|
|
@@ -21239,7 +21245,7 @@ function parseSkillRef(input) {
|
|
|
21239
21245
|
if (parts.length < 2) {
|
|
21240
21246
|
throw new Error(`Invalid skill reference "${input}". Expected format: user/repo or user/repo@ref`);
|
|
21241
21247
|
}
|
|
21242
|
-
return { owner:
|
|
21248
|
+
return { owner: expectDefined16(parts[0]), repo: expectDefined16(parts[1]), ref };
|
|
21243
21249
|
}
|
|
21244
21250
|
var MAX_TARBALL_SIZE = 50 * 1024 * 1024;
|
|
21245
21251
|
async function downloadGitHubTarball(parsed) {
|
|
@@ -21408,7 +21414,7 @@ var SkillManifestStore = class {
|
|
|
21408
21414
|
};
|
|
21409
21415
|
|
|
21410
21416
|
// src/skills/skill-installer.ts
|
|
21411
|
-
function
|
|
21417
|
+
function expectDefined17(value) {
|
|
21412
21418
|
if (value === null || value === void 0) {
|
|
21413
21419
|
throw new Error("Expected value to be defined");
|
|
21414
21420
|
}
|
|
@@ -21538,7 +21544,7 @@ var SkillInstaller = class {
|
|
|
21538
21544
|
bySource.get(key)?.push(entry);
|
|
21539
21545
|
}
|
|
21540
21546
|
for (const [, entries] of bySource) {
|
|
21541
|
-
const first =
|
|
21547
|
+
const first = expectDefined17(entries[0]);
|
|
21542
21548
|
const scope = first.scope;
|
|
21543
21549
|
const isGlobal = scope === "user";
|
|
21544
21550
|
try {
|
|
@@ -21708,7 +21714,7 @@ async function collectFiles(dir, baseDir2) {
|
|
|
21708
21714
|
|
|
21709
21715
|
// src/storage/annotations-store.ts
|
|
21710
21716
|
init_atomic_write();
|
|
21711
|
-
function
|
|
21717
|
+
function expectDefined18(value) {
|
|
21712
21718
|
if (value === null || value === void 0) {
|
|
21713
21719
|
throw new Error("Expected value to be defined");
|
|
21714
21720
|
}
|
|
@@ -21805,7 +21811,7 @@ var AnnotationsStore = class {
|
|
|
21805
21811
|
return;
|
|
21806
21812
|
}
|
|
21807
21813
|
const next = {
|
|
21808
|
-
...
|
|
21814
|
+
...expectDefined18(all[idx]),
|
|
21809
21815
|
resolved: true,
|
|
21810
21816
|
resolvedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21811
21817
|
resolvedBy: input.resolvedBy
|
|
@@ -22041,7 +22047,7 @@ var ReplayLogStore = class {
|
|
|
22041
22047
|
return next;
|
|
22042
22048
|
}
|
|
22043
22049
|
};
|
|
22044
|
-
function
|
|
22050
|
+
function expectDefined19(value) {
|
|
22045
22051
|
if (value === null || value === void 0) {
|
|
22046
22052
|
throw new Error("Expected value to be defined");
|
|
22047
22053
|
}
|
|
@@ -22087,7 +22093,7 @@ var SessionRecovery = class {
|
|
|
22087
22093
|
const lines = raw.split("\n").filter((l) => l.trim());
|
|
22088
22094
|
for (let i = lines.length - 1; i >= 0; i--) {
|
|
22089
22095
|
try {
|
|
22090
|
-
const ev = JSON.parse(
|
|
22096
|
+
const ev = JSON.parse(expectDefined19(lines[i]));
|
|
22091
22097
|
if (ev.type === "in_flight_start") {
|
|
22092
22098
|
return {
|
|
22093
22099
|
sessionId,
|
|
@@ -22140,12 +22146,12 @@ var SessionRecovery = class {
|
|
|
22140
22146
|
let lastCheckpointIdx = -1;
|
|
22141
22147
|
for (let i = 0; i < events.length; i++) {
|
|
22142
22148
|
if (events[i]?.type === "checkpoint") {
|
|
22143
|
-
lastCheckpoint =
|
|
22149
|
+
lastCheckpoint = expectDefined19(events[i]);
|
|
22144
22150
|
lastCheckpointIdx = i;
|
|
22145
22151
|
}
|
|
22146
22152
|
}
|
|
22147
22153
|
const pendingEvents = lastCheckpointIdx >= 0 ? events.slice(lastCheckpointIdx + 1) : events;
|
|
22148
|
-
const lastEv =
|
|
22154
|
+
const lastEv = expectDefined19(events[events.length - 1]);
|
|
22149
22155
|
const inFlightStart = lastEv.type === "in_flight_start" ? lastEv : null;
|
|
22150
22156
|
const context = inFlightStart && inFlightStart.type === "in_flight_start" ? inFlightStart.context : null;
|
|
22151
22157
|
return {
|
|
@@ -22188,7 +22194,7 @@ var SessionRecovery = class {
|
|
|
22188
22194
|
return path6.join(this.dir, `${sessionId}.jsonl`);
|
|
22189
22195
|
}
|
|
22190
22196
|
};
|
|
22191
|
-
function
|
|
22197
|
+
function expectDefined20(value) {
|
|
22192
22198
|
if (value === null || value === void 0) {
|
|
22193
22199
|
throw new Error("Expected value to be defined");
|
|
22194
22200
|
}
|
|
@@ -22269,7 +22275,7 @@ var ToolAuditLog = class {
|
|
|
22269
22275
|
}
|
|
22270
22276
|
let prevHash = GENESIS_PREV;
|
|
22271
22277
|
for (let i = 0; i < entries.length; i++) {
|
|
22272
|
-
const e =
|
|
22278
|
+
const e = expectDefined20(entries[i]);
|
|
22273
22279
|
if (e.prevHash !== prevHash) {
|
|
22274
22280
|
return {
|
|
22275
22281
|
ok: false,
|
|
@@ -22388,7 +22394,7 @@ function sortKeys2(value) {
|
|
|
22388
22394
|
|
|
22389
22395
|
// src/storage/session-rewinder.ts
|
|
22390
22396
|
init_atomic_write();
|
|
22391
|
-
function
|
|
22397
|
+
function expectDefined21(value) {
|
|
22392
22398
|
if (value === null || value === void 0) {
|
|
22393
22399
|
throw new Error("Expected value to be defined");
|
|
22394
22400
|
}
|
|
@@ -22432,7 +22438,7 @@ var DefaultSessionRewinder = class {
|
|
|
22432
22438
|
const events = parseEvents(raw);
|
|
22433
22439
|
let targetIdx = -1;
|
|
22434
22440
|
for (let i = 0; i < events.length; i++) {
|
|
22435
|
-
const event =
|
|
22441
|
+
const event = expectDefined21(events[i]);
|
|
22436
22442
|
if (event.type === "checkpoint") {
|
|
22437
22443
|
const checkpointEvent = event;
|
|
22438
22444
|
if (checkpointEvent.promptIndex === checkpointIndex) {
|
|
@@ -22446,7 +22452,7 @@ var DefaultSessionRewinder = class {
|
|
|
22446
22452
|
}
|
|
22447
22453
|
const snapshotsToRevert = [];
|
|
22448
22454
|
for (let i = targetIdx + 1; i < events.length; i++) {
|
|
22449
|
-
const event =
|
|
22455
|
+
const event = expectDefined21(events[i]);
|
|
22450
22456
|
if (event.type === "checkpoint") {
|
|
22451
22457
|
break;
|
|
22452
22458
|
}
|
|
@@ -22628,7 +22634,7 @@ var DefaultPromptStore = class {
|
|
|
22628
22634
|
};
|
|
22629
22635
|
}
|
|
22630
22636
|
};
|
|
22631
|
-
function
|
|
22637
|
+
function expectDefined22(value) {
|
|
22632
22638
|
if (value === null || value === void 0) {
|
|
22633
22639
|
throw new Error("Expected value to be defined");
|
|
22634
22640
|
}
|
|
@@ -22676,8 +22682,8 @@ var CloudSync = class {
|
|
|
22676
22682
|
const cfg = this.getConfig();
|
|
22677
22683
|
if (!cfg?.enabled) return { ok: false, action: "push", categories: [], message: "Not enabled." };
|
|
22678
22684
|
const parts = cfg.repo.split("/");
|
|
22679
|
-
const owner =
|
|
22680
|
-
const repoName =
|
|
22685
|
+
const owner = expectDefined22(parts[0]);
|
|
22686
|
+
const repoName = expectDefined22(parts[1]);
|
|
22681
22687
|
const branch = "main";
|
|
22682
22688
|
const baseTreeSha = this.state?.sha;
|
|
22683
22689
|
const { treeEntries, rev } = await this.buildLocalTree(cfg.categories);
|
|
@@ -22729,8 +22735,8 @@ var CloudSync = class {
|
|
|
22729
22735
|
const cfg = this.getConfig();
|
|
22730
22736
|
if (!cfg?.enabled) return { ok: false, action: "pull", categories: [], message: "Not enabled." };
|
|
22731
22737
|
const pullParts = cfg.repo.split("/");
|
|
22732
|
-
const owner =
|
|
22733
|
-
const repoName =
|
|
22738
|
+
const owner = expectDefined22(pullParts[0]);
|
|
22739
|
+
const repoName = expectDefined22(pullParts[1]);
|
|
22734
22740
|
const branchData = await this.getRef(token, owner, repoName, "main");
|
|
22735
22741
|
const currentSha = branchData.object.sha;
|
|
22736
22742
|
const commitData = await this.getCommit(token, owner, repoName, currentSha);
|
|
@@ -24076,7 +24082,7 @@ var defaultGitignoreUpdater = new GitignoreUpdater();
|
|
|
24076
24082
|
|
|
24077
24083
|
// src/security-scanner/orchestrator.ts
|
|
24078
24084
|
init_atomic_write();
|
|
24079
|
-
function
|
|
24085
|
+
function expectDefined23(value) {
|
|
24080
24086
|
if (value === null || value === void 0) {
|
|
24081
24087
|
throw new Error("Expected value to be defined");
|
|
24082
24088
|
}
|
|
@@ -24131,7 +24137,7 @@ var SecurityScannerOrchestrator = class {
|
|
|
24131
24137
|
if (detectionResult.detectedStacks.length === 0) {
|
|
24132
24138
|
throw new Error(`No supported tech stack detected in ${projectRoot}`);
|
|
24133
24139
|
}
|
|
24134
|
-
const techStack =
|
|
24140
|
+
const techStack = expectDefined23(detectionResult.detectedStacks[0]);
|
|
24135
24141
|
const generatedSkill = await this.generateSkillLLM(provider, model, projectRoot, techStack);
|
|
24136
24142
|
const scanResult = await this.scanWithLLM(provider, model, projectRoot, generatedSkill, techStack, options);
|
|
24137
24143
|
const synthesizedReport = await this.synthesizeReportLLM(provider, model, projectRoot, techStack, scanResult);
|
|
@@ -24212,7 +24218,7 @@ Return ONLY the JSON object, no markdown, no explanation.`;
|
|
|
24212
24218
|
const text = response.content.filter((b) => b.type === "text").map((b) => b.text).join("");
|
|
24213
24219
|
const jsonMatch = text.match(/\{[\s\S]*\}/);
|
|
24214
24220
|
if (jsonMatch) {
|
|
24215
|
-
const sanitized = sanitizeJsonString(
|
|
24221
|
+
const sanitized = sanitizeJsonString(expectDefined23(jsonMatch[0])) || expectDefined23(jsonMatch[0]);
|
|
24216
24222
|
const skillData = JSON.parse(sanitized);
|
|
24217
24223
|
return {
|
|
24218
24224
|
name: skillData.name || `security-scanner-${techStack.stack}`,
|
|
@@ -24332,7 +24338,7 @@ Return ONLY the JSON array. If no issues found, return [].`;
|
|
|
24332
24338
|
const text = response.content.filter((b) => b.type === "text").map((b) => b.text).join("");
|
|
24333
24339
|
const jsonMatch = text.match(/\[[\s\S]*\]/);
|
|
24334
24340
|
if (jsonMatch) {
|
|
24335
|
-
const sanitized = sanitizeJsonString(
|
|
24341
|
+
const sanitized = sanitizeJsonString(expectDefined23(jsonMatch[0])) || expectDefined23(jsonMatch[0]);
|
|
24336
24342
|
const parsed = JSON.parse(sanitized);
|
|
24337
24343
|
return parsed.map((item, idx) => ({
|
|
24338
24344
|
id: `llm-finding-${idx}-${Date.now()}`,
|
|
@@ -24572,7 +24578,7 @@ ${dirs.join(", ")}`);
|
|
|
24572
24578
|
if (detectionResult.detectedStacks.length === 0) {
|
|
24573
24579
|
throw new Error(`No supported tech stack detected in ${projectRoot}`);
|
|
24574
24580
|
}
|
|
24575
|
-
const techStack =
|
|
24581
|
+
const techStack = expectDefined23(detectionResult.detectedStacks[0]);
|
|
24576
24582
|
return {
|
|
24577
24583
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
24578
24584
|
projectRoot,
|
|
@@ -25180,7 +25186,7 @@ var FleetManager = class {
|
|
|
25180
25186
|
this.usage.dispose();
|
|
25181
25187
|
}
|
|
25182
25188
|
};
|
|
25183
|
-
function
|
|
25189
|
+
function expectDefined24(value) {
|
|
25184
25190
|
if (value === null || value === void 0) {
|
|
25185
25191
|
throw new Error("Expected value to be defined");
|
|
25186
25192
|
}
|
|
@@ -25337,7 +25343,7 @@ async function runDisable(name, deps) {
|
|
|
25337
25343
|
const mcpServers = {
|
|
25338
25344
|
...full.mcpServers ?? {}
|
|
25339
25345
|
};
|
|
25340
|
-
const existing =
|
|
25346
|
+
const existing = expectDefined24(mcpServers[name]);
|
|
25341
25347
|
mcpServers[name] = { ...existing, enabled: false };
|
|
25342
25348
|
full.mcpServers = mcpServers;
|
|
25343
25349
|
await writeConfig(deps.configPath, full);
|
|
@@ -25408,7 +25414,7 @@ function badge(state) {
|
|
|
25408
25414
|
}
|
|
25409
25415
|
|
|
25410
25416
|
// src/extension/registry.ts
|
|
25411
|
-
function
|
|
25417
|
+
function expectDefined25(value) {
|
|
25412
25418
|
if (value === null || value === void 0) {
|
|
25413
25419
|
throw new Error("Expected value to be defined");
|
|
25414
25420
|
}
|
|
@@ -25579,7 +25585,7 @@ var ExtensionRegistry = class {
|
|
|
25579
25585
|
* default runner, each subsequent wrapper wraps the previous.
|
|
25580
25586
|
*/
|
|
25581
25587
|
wrapProviderRunner(inner) {
|
|
25582
|
-
const wrappers = this.extensions.filter((e) => e.wrapProviderRunner).map((e) => ({ name: e.name, wrap:
|
|
25588
|
+
const wrappers = this.extensions.filter((e) => e.wrapProviderRunner).map((e) => ({ name: e.name, wrap: expectDefined25(e.wrapProviderRunner) }));
|
|
25583
25589
|
if (wrappers.length === 0) return inner;
|
|
25584
25590
|
let composed = inner;
|
|
25585
25591
|
for (let i = wrappers.length - 1; i >= 0; i--) {
|
|
@@ -26045,7 +26051,7 @@ function createAgentLoopHandler(a, handlers) {
|
|
|
26045
26051
|
return { status: "aborted", iterations };
|
|
26046
26052
|
}
|
|
26047
26053
|
await a.ctx.session.writeInFlightMarker(`iteration ${i} / max ${a.maxIterations}`).catch((err) => {
|
|
26048
|
-
a.logger.debug?.(
|
|
26054
|
+
(a.logger.debug ?? a.logger.warn)?.(
|
|
26049
26055
|
`in-flight marker write failed: ${err instanceof Error ? err.message : String(err)}`
|
|
26050
26056
|
);
|
|
26051
26057
|
});
|
|
@@ -26176,7 +26182,7 @@ function createAgentLoopHandler(a, handlers) {
|
|
|
26176
26182
|
offSubagentDone();
|
|
26177
26183
|
const reason = controller.signal.aborted ? "aborted" : "clean";
|
|
26178
26184
|
await a.ctx.session.clearInFlightMarker(reason).catch((err) => {
|
|
26179
|
-
a.logger.debug?.(
|
|
26185
|
+
(a.logger.debug ?? a.logger.warn)?.(
|
|
26180
26186
|
`in-flight marker clear failed: ${err instanceof Error ? err.message : String(err)}`
|
|
26181
26187
|
);
|
|
26182
26188
|
});
|
|
@@ -30500,7 +30506,7 @@ var ReplayProviderRunner = class {
|
|
|
30500
30506
|
};
|
|
30501
30507
|
|
|
30502
30508
|
// src/plugins/prompts-plugin.ts
|
|
30503
|
-
function
|
|
30509
|
+
function expectDefined26(value) {
|
|
30504
30510
|
if (value === null || value === void 0) {
|
|
30505
30511
|
throw new Error("Expected value to be defined");
|
|
30506
30512
|
}
|
|
@@ -30559,7 +30565,7 @@ ${lines.join("\n")}
|
|
|
30559
30565
|
if (!restJoined) return { message: "Usage: /prompts view <title>" };
|
|
30560
30566
|
const matches = await store.find(restJoined);
|
|
30561
30567
|
if (matches.length === 0) return { message: `No prompt matching "${restJoined}".` };
|
|
30562
|
-
const entry = matches.find((m) => m.title.toLowerCase() === restJoined.toLowerCase()) ??
|
|
30568
|
+
const entry = matches.find((m) => m.title.toLowerCase() === restJoined.toLowerCase()) ?? expectDefined26(matches[0]);
|
|
30563
30569
|
const tags = entry.tags.length > 0 ? ` [${entry.tags.join(", ")}]` : "";
|
|
30564
30570
|
return {
|
|
30565
30571
|
message: `# ${entry.title}${tags}
|
|
@@ -30582,7 +30588,7 @@ ${dim2(`id: ${entry.id} | created: ${entry.createdAt}`)}`
|
|
|
30582
30588
|
if (!restJoined) return { message: "Usage: /prompts delete <title>" };
|
|
30583
30589
|
const matches = await store.find(restJoined);
|
|
30584
30590
|
if (matches.length === 0) return { message: `No prompt matching "${restJoined}".` };
|
|
30585
|
-
const exact = matches.find((m) => m.title.toLowerCase() === restJoined.toLowerCase()) ??
|
|
30591
|
+
const exact = matches.find((m) => m.title.toLowerCase() === restJoined.toLowerCase()) ?? expectDefined26(matches[0]);
|
|
30586
30592
|
const deleted = await store.delete(exact.id);
|
|
30587
30593
|
return { message: deleted ? `Deleted "${exact.title}".` : "Delete failed." };
|
|
30588
30594
|
}
|
|
@@ -30592,7 +30598,7 @@ ${dim2(`id: ${entry.id} | created: ${entry.createdAt}`)}`
|
|
|
30592
30598
|
if (!parsed.title) return { message: 'Usage: /prompts edit "title" "new content"' };
|
|
30593
30599
|
const matches = await store.find(parsed.title);
|
|
30594
30600
|
if (matches.length === 0) return { message: `No prompt matching "${parsed.title}".` };
|
|
30595
|
-
const exact = matches.find((m) => m.title.toLowerCase() === parsed.title?.toLowerCase()) ??
|
|
30601
|
+
const exact = matches.find((m) => m.title.toLowerCase() === parsed.title?.toLowerCase()) ?? expectDefined26(matches[0]);
|
|
30596
30602
|
exact.content = parsed.content;
|
|
30597
30603
|
exact.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
30598
30604
|
await store.save(exact);
|
|
@@ -30604,7 +30610,7 @@ ${dim2(`id: ${entry.id} | created: ${entry.createdAt}`)}`
|
|
|
30604
30610
|
if (!parsed.title) return { message: 'Usage: /prompts extend "title" <instructions>' };
|
|
30605
30611
|
const matches = await store.find(parsed.title);
|
|
30606
30612
|
if (matches.length === 0) return { message: `No prompt matching "${parsed.title}".` };
|
|
30607
|
-
const exact = matches.find((m) => m.title.toLowerCase() === parsed.title?.toLowerCase()) ??
|
|
30613
|
+
const exact = matches.find((m) => m.title.toLowerCase() === parsed.title?.toLowerCase()) ?? expectDefined26(matches[0]);
|
|
30608
30614
|
const prov = ctx.provider;
|
|
30609
30615
|
if (!prov?.complete) return { message: "LLM not available. Configure a provider first." };
|
|
30610
30616
|
const enhanced = await prov.complete(ctx.model, [
|
|
@@ -30639,9 +30645,9 @@ function parseTitleContent(args) {
|
|
|
30639
30645
|
const trimmed = args.trim();
|
|
30640
30646
|
if (!trimmed) return { title: "", content: "" };
|
|
30641
30647
|
const doubleMatch = /^"([^"]+)"\s+"([^"]+)"$/.exec(trimmed) || /^'([^']+)'\s+'([^']+)'$/.exec(trimmed);
|
|
30642
|
-
if (doubleMatch) return { title:
|
|
30648
|
+
if (doubleMatch) return { title: expectDefined26(doubleMatch[1]), content: expectDefined26(doubleMatch[2]) };
|
|
30643
30649
|
const singleMatch = /^'([^']+)'\s+(.+)$/.exec(trimmed);
|
|
30644
|
-
if (singleMatch) return { title:
|
|
30650
|
+
if (singleMatch) return { title: expectDefined26(singleMatch[1]), content: expectDefined26(singleMatch[2]) };
|
|
30645
30651
|
const firstSpace = trimmed.indexOf(" ");
|
|
30646
30652
|
if (firstSpace === -1) return { title: trimmed, content: "" };
|
|
30647
30653
|
return { title: trimmed.slice(0, firstSpace), content: trimmed.slice(firstSpace + 1) };
|
|
@@ -30652,7 +30658,7 @@ function dim2(s) {
|
|
|
30652
30658
|
|
|
30653
30659
|
// src/plugins/sync-plugin.ts
|
|
30654
30660
|
init_atomic_write();
|
|
30655
|
-
function
|
|
30661
|
+
function expectDefined27(value) {
|
|
30656
30662
|
if (value === null || value === void 0) {
|
|
30657
30663
|
throw new Error("Expected value to be defined");
|
|
30658
30664
|
}
|
|
@@ -30731,7 +30737,7 @@ function buildSyncCommand(cloud, configStore, vault, syncConfigPath) {
|
|
|
30731
30737
|
if (!repo || !repo.includes("/")) {
|
|
30732
30738
|
return { message: 'Invalid repo format. Expected "owner/repo".' };
|
|
30733
30739
|
}
|
|
30734
|
-
const storedToken = vault ? vault.encrypt(
|
|
30740
|
+
const storedToken = vault ? vault.encrypt(expectDefined27(token)) : expectDefined27(token);
|
|
30735
30741
|
const syncConfig = {
|
|
30736
30742
|
enabled: true,
|
|
30737
30743
|
repo,
|
|
@@ -31568,6 +31574,6 @@ ${formatPlan(updated)}`
|
|
|
31568
31574
|
};
|
|
31569
31575
|
}
|
|
31570
31576
|
|
|
31571
|
-
export { ACP_AGENTS, AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, ALL_SYNC_CATEGORIES, AUDIT_LOG_AGENT, Agent, AgentError, AnnotationsStore, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BrainDecisionQueue, BudgetExceededError, CONTEXT_WINDOW_MODES, CORE_RECONSTRUCT_EVENTS, CheckpointManager, CloudSync, CollaborationBus, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SESSION_LOGGING_CONFIG, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultBrainArbiter, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultPromptStore, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ENHANCER_SYSTEM_PROMPT, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FLEET_ROSTER_WITHACP, FleetBus, FleetCostCapError, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, HookRegistry, HookRunner, HumanEscalatingBrainArbiter, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MATRIX_PHASE_KEYS, MAX_JOURNAL_ENTRIES, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, ObservableBrainArbiter, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReplayLogStore, ReplayProviderRunner, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, STANDARD_AUDIT_EVENTS, ScopedEventBus, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SessionRecovery, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolAuditLog, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertSafePath, atomicWrite, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, bootConfig, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildRecoveryStrategies, classifyFamily, clearPlan, collabInjectMiddleware, collabPauseMiddleware, color, compileGlob, compileUserRegex, completePartialObject, composeDirectorPrompt, composeSubagentPrompt, computeTaskProgress, consumeBtwNotes, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createContextManagerTool, createDefaultPipelines, createDelegateTool, createGitPlugin, createMcpControlTool, createMessage, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSessionEventBridge, createSkillsPlugin, createSyncPlugin, createToolOutputSerializer, decryptConfigSecrets, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, dispatchAgent, downloadGitHubTarball, emptyGoal, emptyPlan, encryptConfigSecrets, enhanceUserPrompt, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, expandGlob, extractRunEnv, filesystemServer, findCriticalPath, flagsToConfigPatch, formatContextWindowModeList, formatGoal, formatHumanPrompt, formatPlan, formatPlanTemplates, formatTodosList, getAgentDefinition, getCalibrationState, getContextWindowMode, getPlanTemplate, getTemplate, getTermSize, githubServer, goalFilePath, googleMapsServer, hashRequest, hookMatcherMatches, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isInteractive, isPluginError, isSessionError, isStdinTTY, isStdoutTTY, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isValidMatrixKey, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAskTool, makeAssignTool, makeAutonomyPromptContributor, makeAwaitTasksTool, makeCollabDebugTool, makeContinueToNextIterationTool, makeDirectorSessionFactory, makeFleetEmitTool, makeFleetHealthTool, makeFleetSessionTool, makeFleetStatusTool, makeFleetUsageTool, makeLLMClassifier, makeRollUpTool, makeSpawnTool, makeTerminateTool, matchAny, matchGlob, matrixKeyKind, mergeCustomModelDefs, mergeModelsPayload, migratePlaintextSecrets, miniMaxVisionServer, normalizeToLf, normalizedEqual, onResize, parseContinueDirective, parseSkillRef, pendingBtwCount, phaseForRole, projectHash, projectSlug, recentTextTurns, recordActualUsage, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resetCalibration, resolveAuditLevel, resolveContextWindowPolicy, resolveModelMatrix, resolveSessionLoggingConfig, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, runProviderWithRetry, runShellHook, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTodosCheckpoint, scoreAgents, securitySlashCommand, sentinelServer, setBtwNote, setOutputLineGuard, setPlanItemStatus, setRawMode, shouldEnhance, slackServer, stableStringify, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, unifiedDiff, unloadPlugins, validateAgainstSchema, wireMetricsToEvents, wrapAsState, writeErr, writeOut, zaiVisionServer };
|
|
31577
|
+
export { ACP_AGENTS, AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, ALL_SYNC_CATEGORIES, AUDIT_LOG_AGENT, Agent, AgentError, AnnotationsStore, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BrainDecisionQueue, BudgetExceededError, CONTEXT_WINDOW_MODES, CORE_RECONSTRUCT_EVENTS, CheckpointManager, CloudSync, CollaborationBus, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SESSION_LOGGING_CONFIG, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultBrainArbiter, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultPromptStore, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ENHANCER_SYSTEM_PROMPT, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FLEET_ROSTER_WITHACP, FleetBus, FleetCostCapError, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, HookRegistry, HookRunner, HumanEscalatingBrainArbiter, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MATRIX_PHASE_KEYS, MAX_JOURNAL_ENTRIES, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, ObservableBrainArbiter, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReplayLogStore, ReplayProviderRunner, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, STANDARD_AUDIT_EVENTS, ScopedEventBus, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SessionRecovery, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolAuditLog, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertSafePath, atomicWrite, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, bootConfig, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildRecoveryStrategies, classifyFamily, clearPlan, collabInjectMiddleware, collabPauseMiddleware, color, compileGlob, compileUserRegex, completePartialObject, composeDirectorPrompt, composeSubagentPrompt, computeTaskProgress, consumeBtwNotes, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createContextManagerTool, createDefaultPipelines, createDelegateTool, createGitPlugin, createMcpControlTool, createMessage, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSessionEventBridge, createSkillsPlugin, createSyncPlugin, createToolOutputSerializer, decryptConfigSecrets, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, dispatchAgent, downloadGitHubTarball, emptyGoal, emptyPlan, encryptConfigSecrets, enhanceUserPrompt, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, expandGlob, expectDefined7 as expectDefined, extractRunEnv, filesystemServer, findCriticalPath, flagsToConfigPatch, formatContextWindowModeList, formatGoal, formatHumanPrompt, formatPlan, formatPlanTemplates, formatTodosList, getAgentDefinition, getCalibrationState, getContextWindowMode, getPlanTemplate, getTemplate, getTermSize, githubServer, goalFilePath, googleMapsServer, hashRequest, hookMatcherMatches, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isInteractive, isPluginError, isSessionError, isStdinTTY, isStdoutTTY, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isValidMatrixKey, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAskTool, makeAssignTool, makeAutonomyPromptContributor, makeAwaitTasksTool, makeCollabDebugTool, makeContinueToNextIterationTool, makeDirectorSessionFactory, makeFleetEmitTool, makeFleetHealthTool, makeFleetSessionTool, makeFleetStatusTool, makeFleetUsageTool, makeLLMClassifier, makeRollUpTool, makeSpawnTool, makeTerminateTool, matchAny, matchGlob, matrixKeyKind, mergeCustomModelDefs, mergeModelsPayload, migratePlaintextSecrets, miniMaxVisionServer, normalizeToLf, normalizedEqual, onResize, parseContinueDirective, parseSkillRef, pendingBtwCount, phaseForRole, projectHash, projectSlug, recentTextTurns, recordActualUsage, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resetCalibration, resolveAuditLevel, resolveContextWindowPolicy, resolveModelMatrix, resolveSessionLoggingConfig, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, runProviderWithRetry, runShellHook, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTodosCheckpoint, scoreAgents, securitySlashCommand, sentinelServer, setBtwNote, setOutputLineGuard, setPlanItemStatus, setRawMode, shouldEnhance, slackServer, sleep, stableStringify, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, unifiedDiff, unloadPlugins, validateAgainstSchema, wireMetricsToEvents, wrapAsState, writeErr, writeOut, zaiVisionServer };
|
|
31572
31578
|
//# sourceMappingURL=index.js.map
|
|
31573
31579
|
//# sourceMappingURL=index.js.map
|