@wrongstack/core 0.54.1 → 0.66.13
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/{agent-bridge-Dnhw4tnM.d.ts → agent-bridge-D-j6OOBT.d.ts} +1 -1
- package/dist/agent-subagent-runner-DRZ9-NnR.d.ts +1042 -0
- package/dist/{compactor-Duhsf0ge.d.ts → compactor-D_ExJajC.d.ts} +1 -1
- package/dist/{config-bht0txXS.d.ts → config--86aHSln.d.ts} +112 -2
- package/dist/{context-DtPKqKYV.d.ts → context-y87Jc5ei.d.ts} +8 -8
- package/dist/coordination/index.d.ts +12 -12
- package/dist/coordination/index.js +87 -69
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +22 -22
- package/dist/defaults/index.js +365 -174
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-CbHTS4ZZ.d.ts → events-CIplI98R.d.ts} +20 -1
- package/dist/execution/index.d.ts +16 -385
- package/dist/execution/index.js +129 -61
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +7 -7
- package/dist/goal-store-C7jcumEh.d.ts +96 -0
- package/dist/index-DKUvyTvV.d.ts +560 -0
- package/dist/{index-ge5F2dnc.d.ts → index-b5uhfTSl.d.ts} +10 -8
- package/dist/index.d.ts +59 -33
- package/dist/index.js +1138 -733
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +1 -1
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js +3 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-DE6gzBry.d.ts → mcp-servers-DwoNBf6r.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-coordinator-CjNX4uBD.d.ts → multi-agent-coordinator-CWnH-CiX.d.ts} +10 -2
- package/dist/{null-fleet-bus-BNiSlTna.d.ts → null-fleet-bus-VApKRxcp.d.ts} +6 -7
- package/dist/observability/index.d.ts +2 -2
- package/dist/parallel-eternal-engine-0UwotoSx.d.ts +483 -0
- package/dist/{path-resolver-Bax85amb.d.ts → path-resolver-DVkEcIw8.d.ts} +2 -2
- package/dist/{permission-Drm7LpPo.d.ts → permission-C1A5whY5.d.ts} +17 -1
- package/dist/{permission-policy-CU6sqWxF.d.ts → permission-policy-B2dK-T5N.d.ts} +28 -7
- package/dist/{plan-templates-CLRcurWN.d.ts → plan-templates-Bprrzhbu.d.ts} +4 -4
- package/dist/{provider-runner-BikCxGCx.d.ts → provider-runner-mXvXGSIw.d.ts} +3 -3
- package/dist/{retry-policy-Chtlvr5b.d.ts → retry-policy-CG3qvH_e.d.ts} +1 -1
- package/dist/sdd/index.d.ts +9 -9
- package/dist/sdd/index.js +59 -52
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +3 -3
- package/dist/security/index.js +144 -33
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-BvSPdJj6.d.ts → selector-RvBR_YRW.d.ts} +1 -1
- package/dist/session-event-bridge-CDHxcmQU.d.ts +93 -0
- package/dist/{session-reader-BGhzMir4.d.ts → session-reader-BIpwM60D.d.ts} +1 -1
- package/dist/storage/index.d.ts +7 -6
- package/dist/{system-prompt-dtzV_mLm.d.ts → system-prompt-b61lOd49.d.ts} +32 -2
- package/dist/types/index.d.ts +23 -14
- package/dist/types/index.js +62 -6
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/multi-agent/SKILL.md +0 -2
- package/dist/agent-subagent-runner-By7jruZ_.d.ts +0 -182
- package/dist/goal-store-DwcTDDiX.d.ts +0 -188
- package/dist/index-CI271MjL.d.ts +0 -903
- package/dist/multi-agent-BmC_xiog.d.ts +0 -554
- package/dist/tool-executor-CgU0yWpB.d.ts +0 -110
package/dist/sdd/index.js
CHANGED
|
@@ -2867,15 +2867,22 @@ var SubagentBudget = class _SubagentBudget {
|
|
|
2867
2867
|
void this.checkLimits();
|
|
2868
2868
|
}
|
|
2869
2869
|
/**
|
|
2870
|
-
* Wall-clock budget check.
|
|
2871
|
-
*
|
|
2872
|
-
*
|
|
2870
|
+
* Wall-clock / idle budget check. Delegates to `checkLimits(elapsed)`, so
|
|
2871
|
+
* `timeout` and `idle_timeout` follow the SAME negotiation path as the other
|
|
2872
|
+
* kinds — they are NOT a special-cased hard stop. This is deliberate: a
|
|
2873
|
+
* heartbeat-aware policy (see `attachAutoExtend` and `CollabSession`) grants
|
|
2874
|
+
* a timeout extension only while the agent is making progress and denies it
|
|
2875
|
+
* once the agent is genuinely stuck, which is safer than an unconditional
|
|
2876
|
+
* hard kill of a long-but-working agent. The runner translates the resulting
|
|
2877
|
+
* `BudgetThresholdSignal` decision (`extend` → patch limits in place,
|
|
2878
|
+
* `stop` → abort) just like every other kind.
|
|
2873
2879
|
*
|
|
2874
|
-
* Decision table:
|
|
2875
|
-
* - no `onThreshold` handler
|
|
2876
|
-
* - `mode === 'sync'` → throw `BudgetExceededError`
|
|
2877
|
-
* - `mode === 'auto'` + no listener
|
|
2878
|
-
* - `mode === 'auto'` + listener
|
|
2880
|
+
* Decision table (same as `checkLimits`):
|
|
2881
|
+
* - no `onThreshold` handler → throw `BudgetExceededError` (hard stop)
|
|
2882
|
+
* - `mode === 'sync'` → throw `BudgetExceededError` (hard stop)
|
|
2883
|
+
* - `mode === 'auto'` + no listener → throw `BudgetExceededError` (no one to ask)
|
|
2884
|
+
* - `mode === 'auto'` + listener → throw `BudgetThresholdSignal` (negotiated;
|
|
2885
|
+
* a heartbeat-aware policy may extend the timeout)
|
|
2879
2886
|
*/
|
|
2880
2887
|
checkTimeout() {
|
|
2881
2888
|
if (this.startTime === null) return;
|
|
@@ -5507,7 +5514,10 @@ var NICKNAME_POOL = {
|
|
|
5507
5514
|
"lavoisier": { name: "Lavoisier", domain: "chemistry" },
|
|
5508
5515
|
"mendeleev": { name: "Mendeleev", domain: "chemistry" }
|
|
5509
5516
|
};
|
|
5510
|
-
var ALL_NICKNAMES = Object.
|
|
5517
|
+
var ALL_NICKNAMES = Object.entries(NICKNAME_POOL);
|
|
5518
|
+
Object.fromEntries(
|
|
5519
|
+
ALL_NICKNAMES.map(([key, entry]) => [entry.name, key])
|
|
5520
|
+
);
|
|
5511
5521
|
var DOMAIN_PREFERENCES = {
|
|
5512
5522
|
"security": ["shannon", "turing", "lamarr", "stallman"],
|
|
5513
5523
|
"bug-hunter": ["darwin", "curie", "feynman", "fermi"],
|
|
@@ -5540,17 +5550,16 @@ function assignNickname(role, used) {
|
|
|
5540
5550
|
for (const key of preferences) {
|
|
5541
5551
|
const entry = NICKNAME_POOL[key];
|
|
5542
5552
|
if (entry && !used.has(key)) {
|
|
5543
|
-
return `${entry.name} (${formatRole(role)})
|
|
5553
|
+
return { key, display: `${entry.name} (${formatRole(role)})` };
|
|
5544
5554
|
}
|
|
5545
5555
|
}
|
|
5546
|
-
for (const entry of ALL_NICKNAMES) {
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
return `${entry.name} (${formatRole(role)})`;
|
|
5556
|
+
for (const [key, entry] of ALL_NICKNAMES) {
|
|
5557
|
+
if (!used.has(key)) {
|
|
5558
|
+
return { key, display: `${entry.name} (${formatRole(role)})` };
|
|
5550
5559
|
}
|
|
5551
5560
|
}
|
|
5552
5561
|
const counter = used.size + 1;
|
|
5553
|
-
return `Scientist #${counter} (${formatRole(role)})
|
|
5562
|
+
return { key: `scientist-${counter}`, display: `Scientist #${counter} (${formatRole(role)})` };
|
|
5554
5563
|
}
|
|
5555
5564
|
function formatRole(role) {
|
|
5556
5565
|
return role.split(/[-_]/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
@@ -5637,11 +5646,10 @@ var DefaultMultiAgentCoordinator = class _DefaultMultiAgentCoordinator extends E
|
|
|
5637
5646
|
const name = subagent.name?.trim() ?? "";
|
|
5638
5647
|
const isPlaceholder = name === "" || name.toLowerCase() === role.toLowerCase() || name === "subagent" || name === "adhoc" || name === "generic" || /^slot-/.test(name);
|
|
5639
5648
|
if (!isPlaceholder) return subagent;
|
|
5640
|
-
const
|
|
5641
|
-
|
|
5642
|
-
this.
|
|
5643
|
-
|
|
5644
|
-
return { ...subagent, name: nickname };
|
|
5649
|
+
const { key, display } = assignNickname(role, this.usedNicknames);
|
|
5650
|
+
this.usedNicknames.add(key);
|
|
5651
|
+
this.subagentNicknames.set(subagentId, key);
|
|
5652
|
+
return { ...subagent, name: display };
|
|
5645
5653
|
}
|
|
5646
5654
|
async spawn(subagent) {
|
|
5647
5655
|
const id = subagent.id || randomUUID();
|
|
@@ -5893,23 +5901,32 @@ var DefaultMultiAgentCoordinator = class _DefaultMultiAgentCoordinator extends E
|
|
|
5893
5901
|
*/
|
|
5894
5902
|
drainPendingAsAborted(message) {
|
|
5895
5903
|
const dropped = this.pendingTasks.splice(0, this.pendingTasks.length);
|
|
5896
|
-
for (const t of dropped)
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5904
|
+
for (const t of dropped) this.emitPendingAborted(t, message);
|
|
5905
|
+
}
|
|
5906
|
+
/**
|
|
5907
|
+
* Emit a synthetic `stopped`/`aborted_by_parent` completion for a single
|
|
5908
|
+
* PENDING task — one that was never counted in `inFlight`. This MUST bypass
|
|
5909
|
+
* `recordCompletion`: that path does `inFlight--`, which for a pending task
|
|
5910
|
+
* steals a decrement from a genuinely in-flight task and trips the underflow
|
|
5911
|
+
* guard — suppressing that real task's `task.completed` and hanging its
|
|
5912
|
+
* `awaitTasks()` caller. Pushes the result and fires the event directly.
|
|
5913
|
+
*/
|
|
5914
|
+
emitPendingAborted(task, message) {
|
|
5915
|
+
const synthetic = {
|
|
5916
|
+
subagentId: task.subagentId ?? "unassigned",
|
|
5917
|
+
taskId: task.id,
|
|
5918
|
+
status: "stopped",
|
|
5919
|
+
error: {
|
|
5920
|
+
kind: "aborted_by_parent",
|
|
5921
|
+
message,
|
|
5922
|
+
retryable: false
|
|
5923
|
+
},
|
|
5924
|
+
iterations: 0,
|
|
5925
|
+
toolCalls: 0,
|
|
5926
|
+
durationMs: 0
|
|
5927
|
+
};
|
|
5928
|
+
this.completedResults.push(synthetic);
|
|
5929
|
+
this.emit("task.completed", { task, result: synthetic });
|
|
5913
5930
|
}
|
|
5914
5931
|
async runDispatched(subagentId, task) {
|
|
5915
5932
|
const subagent = this.subagents.get(subagentId);
|
|
@@ -6170,20 +6187,10 @@ var DefaultMultiAgentCoordinator = class _DefaultMultiAgentCoordinator extends E
|
|
|
6170
6187
|
const orphaned = this.pendingTasks.filter((t) => t.subagentId === subagentId);
|
|
6171
6188
|
this.pendingTasks = this.pendingTasks.filter((t) => t.subagentId !== subagentId);
|
|
6172
6189
|
for (const t of orphaned) {
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
error: {
|
|
6178
|
-
kind: "aborted_by_parent",
|
|
6179
|
-
message: `Subagent "${subagentId}" was removed while task "${t.id}" was pending`,
|
|
6180
|
-
retryable: false
|
|
6181
|
-
},
|
|
6182
|
-
iterations: 0,
|
|
6183
|
-
toolCalls: 0,
|
|
6184
|
-
durationMs: 0
|
|
6185
|
-
};
|
|
6186
|
-
this.recordCompletion(synthetic);
|
|
6190
|
+
this.emitPendingAborted(
|
|
6191
|
+
t,
|
|
6192
|
+
`Subagent "${subagentId}" was removed while task "${t.id}" was pending`
|
|
6193
|
+
);
|
|
6187
6194
|
}
|
|
6188
6195
|
this.fleetBus?.emit({
|
|
6189
6196
|
subagentId,
|
|
@@ -6397,7 +6404,7 @@ var SddParallelRun = class {
|
|
|
6397
6404
|
"\u2500\u2500 EXECUTION PROTOCOL \u2500\u2500",
|
|
6398
6405
|
"\u2022 Execute the assigned SDD task end-to-end using multiple tool calls.",
|
|
6399
6406
|
"\u2022 Mark the task [done] in the tracker when complete.",
|
|
6400
|
-
"\u2022 Do not ask for
|
|
6407
|
+
"\u2022 Do not ask before routine in-project tool use; if a permission gate appears, wait for that flow.",
|
|
6401
6408
|
"\u2022 Keep output concise \u2014 summarize changes, do not transcribe files."
|
|
6402
6409
|
].join("\n");
|
|
6403
6410
|
const spawns = subagentIds.map(
|