@wrongstack/core 0.63.4 → 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-B5rxWrg3.d.ts → agent-bridge-D-j6OOBT.d.ts} +1 -1
- package/dist/agent-subagent-runner-DRZ9-NnR.d.ts +1042 -0
- package/dist/{compactor-0vjZ8KTk.d.ts → compactor-D_ExJajC.d.ts} +1 -1
- package/dist/{config-BdDuaZmB.d.ts → config--86aHSln.d.ts} +1 -1
- package/dist/{context-iFMEO2rN.d.ts → context-y87Jc5ei.d.ts} +3 -3
- 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 +113 -84
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-k8CHjcrN.d.ts → events-CIplI98R.d.ts} +1 -1
- package/dist/execution/index.d.ts +16 -385
- package/dist/execution/index.js +59 -51
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/goal-store-C7jcumEh.d.ts +96 -0
- package/dist/{index-Bc6BiP5q.d.ts → index-DKUvyTvV.d.ts} +28 -442
- package/dist/{index-CWdW_CJt.d.ts → index-b5uhfTSl.d.ts} +8 -8
- package/dist/index.d.ts +34 -32
- package/dist/index.js +647 -677
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/{mcp-servers-CwqQDMYy.d.ts → mcp-servers-DwoNBf6r.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-coordinator-CNUJYq7U.d.ts → multi-agent-coordinator-CWnH-CiX.d.ts} +10 -2
- package/dist/{null-fleet-bus-DRoJ0uOY.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-C5sPVne8.d.ts → path-resolver-DVkEcIw8.d.ts} +2 -2
- package/dist/{permission-Ld-i5ugf.d.ts → permission-C1A5whY5.d.ts} +5 -1
- package/dist/{permission-policy-CL-mPufp.d.ts → permission-policy-B2dK-T5N.d.ts} +19 -5
- package/dist/{plan-templates-ThBHOjaM.d.ts → plan-templates-Bprrzhbu.d.ts} +4 -4
- package/dist/{provider-runner-DJQa211J.d.ts → provider-runner-mXvXGSIw.d.ts} +3 -3
- package/dist/{retry-policy-BfBScewS.d.ts → retry-policy-CG3qvH_e.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +58 -51
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +3 -3
- package/dist/security/index.js +31 -22
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-DxhW7ML3.d.ts → selector-RvBR_YRW.d.ts} +1 -1
- package/dist/session-event-bridge-CDHxcmQU.d.ts +93 -0
- package/dist/{session-reader-q2ThszgG.d.ts → session-reader-BIpwM60D.d.ts} +1 -1
- package/dist/storage/index.d.ts +7 -6
- package/dist/{system-prompt-7LHyBbIf.d.ts → system-prompt-b61lOd49.d.ts} +2 -2
- package/dist/types/index.d.ts +23 -14
- 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-Zc3f37Sg.d.ts +0 -182
- package/dist/goal-store-iHltMi5n.d.ts +0 -188
- package/dist/multi-agent-SASYOrWA.d.ts +0 -554
- package/dist/tool-executor-CIjpGaRA.d.ts +0 -111
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { Q as Tool, d as Context } from './context-
|
|
1
|
+
import { Q as Tool, d as Context } from './context-y87Jc5ei.js';
|
|
2
2
|
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
3
|
-
import { a as PermissionPolicy, P as PermissionDecision } from './permission-
|
|
3
|
+
import { a as PermissionPolicy, P as PermissionDecision } from './permission-C1A5whY5.js';
|
|
4
4
|
|
|
5
5
|
interface PermissionPolicyOptions {
|
|
6
6
|
trustFile: string;
|
|
7
7
|
yolo?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* When true, YOLO mode
|
|
10
|
-
*
|
|
9
|
+
* When true, YOLO mode auto-approves even destructive calls without confirm.
|
|
10
|
+
* @deprecated YOLO now auto-approves everything by default. Use `confirmDestructive`
|
|
11
|
+
* to opt back into destructive-operation confirmation prompts.
|
|
11
12
|
*/
|
|
12
13
|
yoloDestructive?: boolean;
|
|
13
|
-
/** @deprecated Use `yoloDestructive`.
|
|
14
|
+
/** @deprecated Use `yoloDestructive`. */
|
|
14
15
|
forceAllYolo?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true AND yolo is true, destructive operations still require confirmation.
|
|
18
|
+
* This is the opt-in safety net: set this if you want YOLO for normal work but
|
|
19
|
+
* explicit approval for `rm -rf`, project-escaping writes, etc.
|
|
20
|
+
* Has no effect when yolo is false (normal permission flow applies).
|
|
21
|
+
*/
|
|
22
|
+
confirmDestructive?: boolean;
|
|
15
23
|
promptDelegate?: (tool: Tool, input: unknown, suggestedPattern: string) => Promise<'yes' | 'no' | 'always' | 'deny'>;
|
|
16
24
|
inputReader?: InputReader;
|
|
17
25
|
}
|
|
@@ -21,6 +29,8 @@ declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
21
29
|
private readonly trustFile;
|
|
22
30
|
private yolo;
|
|
23
31
|
private yoloDestructive;
|
|
32
|
+
/** When true, destructive ops still require confirmation even in YOLO mode. */
|
|
33
|
+
private confirmDestructive;
|
|
24
34
|
/**
|
|
25
35
|
* Session-scoped "soft deny" map. When the user presses 'n' (block once),
|
|
26
36
|
* the tool+pattern is added here. If the LLM retries in the same session,
|
|
@@ -66,6 +76,10 @@ declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
66
76
|
setYoloDestructive(enabled: boolean): void;
|
|
67
77
|
/** Check whether the destructive YOLO override is active. */
|
|
68
78
|
getYoloDestructive(): boolean;
|
|
79
|
+
/** Toggle destructive confirmation gate (only meaningful when yolo is active). */
|
|
80
|
+
setConfirmDestructive(enabled: boolean): void;
|
|
81
|
+
/** Check whether destructive confirmation gate is active. */
|
|
82
|
+
getConfirmDestructive(): boolean;
|
|
69
83
|
/** @deprecated Use `setYoloDestructive`. */
|
|
70
84
|
setForceAllYolo(enabled: boolean): void;
|
|
71
85
|
/** @deprecated Use `getYoloDestructive`. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { E as EventBus } from './events-
|
|
1
|
+
import { E as EventBus } from './events-CIplI98R.js';
|
|
2
2
|
import { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
|
|
3
|
-
import { y as SessionStore, x as SessionMetadata, B as SessionWriter, r as ResumedSession, S as SessionData, z as SessionSummary, c as ContentBlock, w as SessionEvent, N as TodoItem, f as ConversationState } from './context-
|
|
4
|
-
import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-
|
|
3
|
+
import { y as SessionStore, x as SessionMetadata, B as SessionWriter, r as ResumedSession, S as SessionData, z as SessionSummary, c as ContentBlock, w as SessionEvent, N as TodoItem, f as ConversationState } from './context-y87Jc5ei.js';
|
|
4
|
+
import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-BIpwM60D.js';
|
|
5
5
|
import { b as MemoryStore, a as MemoryScope } from './memory-CEXuo7sz.js';
|
|
6
6
|
import { a as WstackPaths } from './wstack-paths-eMXnY1_X.js';
|
|
7
|
-
import { c as ConfigStore, a as Config, b as ConfigLoader, u as SyncConfig } from './config
|
|
7
|
+
import { c as ConfigStore, a as Config, b as ConfigLoader, u as SyncConfig } from './config--86aHSln.js';
|
|
8
8
|
import { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
9
9
|
|
|
10
10
|
interface SessionStoreOptions {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as EventBus } from './events-
|
|
1
|
+
import { E as EventBus } from './events-CIplI98R.js';
|
|
2
2
|
import { a as Logger } from './logger-DDd5C--Z.js';
|
|
3
3
|
import { T as Tracer } from './observability-BhnVLBLS.js';
|
|
4
|
-
import { m as Provider, p as Request, d as Context, q as Response } from './context-
|
|
5
|
-
import { a as RetryPolicy } from './retry-policy-
|
|
4
|
+
import { m as Provider, p as Request, d as Context, q as Response } from './context-y87Jc5ei.js';
|
|
5
|
+
import { a as RetryPolicy } from './retry-policy-CG3qvH_e.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options passed to a ProviderRunner when calling the provider.
|
package/dist/sdd/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, l as TaskGraph, m as TaskNode, k as TaskFilter, p as TaskSort, o as TaskProgress, r as TaskType, n as TaskPriority, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../task-graph-D1YQbpxF.js';
|
|
2
|
-
import { E as EventBus } from '../events-
|
|
3
|
-
import { D as DoneCondition,
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '../context-iFMEO2rN.js';
|
|
2
|
+
import { E as EventBus } from '../events-CIplI98R.js';
|
|
3
|
+
import { D as DoneCondition, A as Agent, c as AgentFactory, X as TaskResult } from '../agent-subagent-runner-DRZ9-NnR.js';
|
|
4
|
+
import '../context-y87Jc5ei.js';
|
|
5
|
+
import '../index-DKUvyTvV.js';
|
|
7
6
|
import '../logger-DDd5C--Z.js';
|
|
8
|
-
import '../system-prompt-
|
|
9
|
-
import '../config
|
|
7
|
+
import '../system-prompt-b61lOd49.js';
|
|
8
|
+
import '../config--86aHSln.js';
|
|
10
9
|
import '../models-registry-BcYJDKLm.js';
|
|
11
10
|
import '../observability-BhnVLBLS.js';
|
|
12
11
|
import '../secret-scrubber-3MHDDAtm.js';
|
|
13
|
-
import '../permission-
|
|
12
|
+
import '../permission-C1A5whY5.js';
|
|
13
|
+
import '../retry-policy-CG3qvH_e.js';
|
|
14
14
|
|
|
15
15
|
declare class SpecParser {
|
|
16
16
|
parse(content: string): Specification;
|
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,
|