@wrongstack/core 0.9.7 → 0.9.19

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.
Files changed (43) hide show
  1. package/dist/{agent-subagent-runner-DaF_EgRG.d.ts → agent-subagent-runner-C4qt9e5Y.d.ts} +1 -1
  2. package/dist/{config-SkMIDN9L.d.ts → config-CWva0qoL.d.ts} +4 -0
  3. package/dist/coordination/index.d.ts +8 -7
  4. package/dist/coordination/index.js +672 -46
  5. package/dist/coordination/index.js.map +1 -1
  6. package/dist/defaults/index.d.ts +12 -11
  7. package/dist/defaults/index.js +780 -23
  8. package/dist/defaults/index.js.map +1 -1
  9. package/dist/execution/index.d.ts +7 -6
  10. package/dist/execution/index.js +1 -0
  11. package/dist/execution/index.js.map +1 -1
  12. package/dist/extension/index.d.ts +4 -3
  13. package/dist/{index-CP8638Wm.d.ts → index-aizK8olO.d.ts} +3 -2
  14. package/dist/{index-Bsha5K4D.d.ts → index-p95HQ22A.d.ts} +3 -2
  15. package/dist/index.d.ts +22 -16
  16. package/dist/index.js +861 -35
  17. package/dist/index.js.map +1 -1
  18. package/dist/infrastructure/index.d.ts +2 -2
  19. package/dist/kernel/index.d.ts +4 -3
  20. package/dist/{mcp-servers-BouUWYW6.d.ts → mcp-servers-BkVEqkRe.d.ts} +1 -1
  21. package/dist/{multi-agent-coordinator-DTXF2aAl.d.ts → multi-agent-coordinator-bRaI_aD1.d.ts} +1 -1
  22. package/dist/{null-fleet-bus-Chrc_3Pp.d.ts → null-fleet-bus-DKM3Iy9d.d.ts} +183 -3
  23. package/dist/{secret-scrubber-DttNiGYA.d.ts → permission-bPuzAy4x.d.ts} +1 -6
  24. package/dist/{permission-policy-BpCGYBud.d.ts → permission-policy-BUQSutpl.d.ts} +8 -1
  25. package/dist/{plan-templates-envSmNlZ.d.ts → plan-templates-fkQTyz3U.d.ts} +25 -1
  26. package/dist/sdd/index.d.ts +5 -4
  27. package/dist/sdd/index.js +1 -0
  28. package/dist/sdd/index.js.map +1 -1
  29. package/dist/secret-scrubber-3MHDDAtm.d.ts +6 -0
  30. package/dist/{secret-scrubber-QSeI0ADi.d.ts → secret-scrubber-7rSC_emZ.d.ts} +1 -1
  31. package/dist/security/index.d.ts +4 -3
  32. package/dist/security/index.js +37 -6
  33. package/dist/security/index.js.map +1 -1
  34. package/dist/storage/index.d.ts +3 -2
  35. package/dist/storage/index.js +88 -5
  36. package/dist/storage/index.js.map +1 -1
  37. package/dist/{tool-executor-CsktM3h9.d.ts → tool-executor-Boo3dekH.d.ts} +1 -1
  38. package/dist/types/index.d.ts +6 -5
  39. package/dist/types/index.js.map +1 -1
  40. package/dist/utils/index.d.ts +12 -1
  41. package/dist/utils/index.js +85 -1
  42. package/dist/utils/index.js.map +1 -1
  43. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.js';
2
2
  export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-TcJfc29Y.js';
3
- export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-BouUWYW6.js';
3
+ export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-BkVEqkRe.js';
4
4
  import '../logger-DDd5C--Z.js';
5
5
  import '../events-CiG9qUM_.js';
6
6
  import '../context-BRNbHmRM.js';
7
7
  import '../models-registry-BcYJDKLm.js';
8
8
  import '../path-resolver-CPRj4bFY.js';
9
9
  import '../compactor-DVTKL7XD.js';
10
- import '../config-SkMIDN9L.js';
10
+ import '../config-CWva0qoL.js';
@@ -1,9 +1,9 @@
1
1
  export { B as BindOptions, C as Container, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, T as Token } from '../system-prompt-Bs-Wliab.js';
2
2
  export { E as EventBus, a as EventLogger, b as EventMap, c as EventName, L as Listener, S as ScopedEventBus } from '../events-CiG9qUM_.js';
3
- export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-Bsha5K4D.js';
3
+ export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-p95HQ22A.js';
4
4
  import '../context-BRNbHmRM.js';
5
5
  import '../compactor-DVTKL7XD.js';
6
- import '../config-SkMIDN9L.js';
6
+ import '../config-CWva0qoL.js';
7
7
  import '../models-registry-BcYJDKLm.js';
8
8
  import '../retry-policy-BYkq0ugs.js';
9
9
  import '../input-reader-E-ffP2ee.js';
@@ -11,7 +11,8 @@ import '../logger-DDd5C--Z.js';
11
11
  import '../memory-CEXuo7sz.js';
12
12
  import '../mode-CV077NjV.js';
13
13
  import '../path-resolver-CPRj4bFY.js';
14
- import '../secret-scrubber-DttNiGYA.js';
14
+ import '../permission-bPuzAy4x.js';
15
15
  import '../provider-runner-BEpikbbN.js';
16
16
  import '../observability-BhnVLBLS.js';
17
+ import '../secret-scrubber-3MHDDAtm.js';
17
18
  import '../skill-CxuWrsKK.js';
@@ -1,6 +1,6 @@
1
1
  import { a as Compactor } from './compactor-DVTKL7XD.js';
2
2
  import { M as Message, Q as Tool } from './context-BRNbHmRM.js';
3
- import { M as MCPServerConfig } from './config-SkMIDN9L.js';
3
+ import { M as MCPServerConfig } from './config-CWva0qoL.js';
4
4
 
5
5
  type ContextManagerAction = 'check' | 'summary' | 'prune' | 'add_note' | 'compact' | 'repair';
6
6
  interface ContextManagerInput {
@@ -1,5 +1,5 @@
1
1
  import { n as SubagentConfig, l as MultiAgentCoordinator, M as MultiAgentConfig, t as SubagentRunner, S as SpawnResult, v as TaskSpec, B as BridgeMessage, A as AgentBridge, k as CoordinatorStatus, u as TaskResult } from './multi-agent-3ZnTB1aT.js';
2
- import { F as FleetBus } from './agent-subagent-runner-DaF_EgRG.js';
2
+ import { F as FleetBus } from './agent-subagent-runner-C4qt9e5Y.js';
3
3
  import { EventEmitter } from 'node:events';
4
4
 
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-DTXF2aAl.js';
1
+ import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-bRaI_aD1.js';
2
2
  import { n as SubagentConfig, u as TaskResult, k as CoordinatorStatus, v as TaskSpec, M as MultiAgentConfig, t as SubagentRunner } from './multi-agent-3ZnTB1aT.js';
3
3
  import { B as SessionWriter, Q as Tool, y as SessionStore } from './context-BRNbHmRM.js';
4
4
  import { a as DirectorStateSnapshot } from './director-state-BmYi3DGA.js';
5
5
  import { I as InMemoryAgentBridge } from './agent-bridge-DMVOX0cF.js';
6
- import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './agent-subagent-runner-DaF_EgRG.js';
6
+ import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './agent-subagent-runner-C4qt9e5Y.js';
7
7
  import { E as EventBus } from './events-CiG9qUM_.js';
8
8
 
9
9
  /**
@@ -163,6 +163,25 @@ interface IFleetManager {
163
163
  limit: number;
164
164
  observed: number;
165
165
  } | null;
166
+ /**
167
+ * Assign a memorable nickname (e.g. "Einstein (Bug Hunter)"), mark it
168
+ * as used so it is never reused, then record the spawn. The nickname
169
+ * is written back to `config.name` so the coordinator and manifest both
170
+ * see the human-readable name.
171
+ *
172
+ * Returns the assigned nickname string.
173
+ */
174
+ assignNicknameAndRecord(subagentId: string, config: SubagentConfig, priceLookup?: {
175
+ input?: number;
176
+ output?: number;
177
+ cacheRead?: number;
178
+ cacheWrite?: number;
179
+ }): string;
180
+ /**
181
+ * Readonly view of already-assigned nickname keys. Used by `Director.spawn()`
182
+ * to avoid assigning the same nickname twice across the fleet.
183
+ */
184
+ readonly usedNicknames: ReadonlySet<string>;
166
185
  /**
167
186
  * Called after a spawn succeeds. Records metadata for the usage
168
187
  * aggregator and manifest.
@@ -314,6 +333,8 @@ declare class FleetManager implements IFleetManager {
314
333
  private readonly pendingTasks;
315
334
  private readonly subagentMeta;
316
335
  private readonly priceLookups;
336
+ /** Tracks which nickname keys are already assigned — prevents collisions. */
337
+ private readonly _usedNicknames;
317
338
  /** The coordinator (wired via setCoordinator by Director after construction). */
318
339
  private coordinator;
319
340
  constructor(opts?: FleetManagerOptions);
@@ -340,6 +361,25 @@ declare class FleetManager implements IFleetManager {
340
361
  limit: number;
341
362
  observed: number;
342
363
  } | null;
364
+ /**
365
+ * Assign a memorable nickname (e.g. "Einstein (Bug Hunter)") to the config,
366
+ * record it so the same name is never reused, then record the spawn.
367
+ *
368
+ * Call this INSTEAD of `recordSpawn` when you want automatic nicknames.
369
+ * The nickname is written back to `config.name` BEFORE the coordinator
370
+ * sees the config, so the manifest, logs, and fleet UI all show it.
371
+ */
372
+ assignNicknameAndRecord(subagentId: string, config: SubagentConfig, priceLookup?: {
373
+ input?: number;
374
+ output?: number;
375
+ cacheRead?: number;
376
+ cacheWrite?: number;
377
+ }): string;
378
+ /**
379
+ * Returns the set of already-assigned nickname keys — useful for debugging
380
+ * and testing.
381
+ */
382
+ get usedNicknames(): ReadonlySet<string>;
343
383
  /**
344
384
  * Records a spawn: increments counter, stores metadata, updates state checkpoint,
345
385
  * and schedules a debounced manifest write. Call AFTER the coordinator
@@ -405,6 +445,98 @@ declare class FleetManager implements IFleetManager {
405
445
  };
406
446
  }
407
447
 
448
+ /**
449
+ * Immutable snapshot of target files at the start of a collab session.
450
+ * All agents in the session read from this snapshot — they see the same baseline.
451
+ */
452
+ interface SharedFileSnapshot {
453
+ id: string;
454
+ createdAt: string;
455
+ files: SharedFileEntry[];
456
+ }
457
+ interface SharedFileEntry {
458
+ path: string;
459
+ content: string;
460
+ language?: string;
461
+ }
462
+ /**
463
+ * Bug finding emitted by BugHunter and consumed by RefactorPlanner + Critic.
464
+ */
465
+ interface BugFinding {
466
+ id: string;
467
+ type: string;
468
+ severity: 'critical' | 'high' | 'medium' | 'low';
469
+ location: {
470
+ file: string;
471
+ line: number;
472
+ };
473
+ description: string;
474
+ suggestedFix?: string;
475
+ }
476
+ /**
477
+ * Refactoring plan emitted by RefactorPlanner, consuming BugFinding(s).
478
+ */
479
+ interface RefactorPlan {
480
+ id: string;
481
+ basedOnBugIds: string[];
482
+ phases: RefactorPhase[];
483
+ riskScore: 'low' | 'medium' | 'high';
484
+ estimatedChangeCount: number;
485
+ rollbackStrategy: string;
486
+ }
487
+ /** One phase within a refactor plan. */
488
+ interface RefactorPhase {
489
+ number: number;
490
+ title: string;
491
+ tasks: string[];
492
+ risk: 'low' | 'medium' | 'high';
493
+ }
494
+ /**
495
+ * Critic evaluation of a bug finding or refactor plan.
496
+ */
497
+ interface CriticEvaluation {
498
+ id: string;
499
+ subjectType: 'bug_finding' | 'refactor_plan';
500
+ subjectId: string;
501
+ score: number;
502
+ verdict: 'approve' | 'needs_revision' | 'reject';
503
+ strengths: string[];
504
+ weaknesses: string[];
505
+ concerns: CriticConcern[];
506
+ }
507
+ interface CriticConcern {
508
+ description: string;
509
+ location?: {
510
+ file: string;
511
+ line: number;
512
+ };
513
+ severity: 'blocking' | 'advisory';
514
+ }
515
+ /**
516
+ * Full structured report produced when a CollabSession resolves.
517
+ */
518
+ interface CollabDebugReport {
519
+ sessionId: string;
520
+ startedAt: string;
521
+ completedAt: string;
522
+ targetPaths: string[];
523
+ bugs: BugFinding[];
524
+ refactorPlans: RefactorPlan[];
525
+ evaluations: CriticEvaluation[];
526
+ /** Overall verdict from the Critic across all evaluated subjects. */
527
+ overallVerdict: 'approve' | 'needs_revision' | 'reject';
528
+ /** Markdown-formatted summary for the director's context window. */
529
+ summary: string;
530
+ }
531
+ interface CollabSessionOptions {
532
+ /** Paths to scan — used to build the SharedFileSnapshot. */
533
+ targetPaths: string[];
534
+ /** Files already read and snapshot. When provided, snapshot is skipped. */
535
+ prebuiltSnapshot?: SharedFileSnapshot;
536
+ /** Max time to wait for the session to resolve (ms). Default: 10 min. */
537
+ timeoutMs?: number;
538
+ }
539
+
408
540
  /**
409
541
  * Director — high-level orchestrator that owns a `MultiAgentCoordinator`,
410
542
  * a `FleetBus`, and a `FleetUsageAggregator`. Exposes a small imperative
@@ -646,6 +778,8 @@ declare class Director implements ICoordinator {
646
778
  private readonly subagentBridges;
647
779
  /** Tracks per-spawn config + assigned task ids for manifest writing. */
648
780
  private readonly manifestEntries;
781
+ /** Tracks assigned nicknames so the same name is never reused in one fleet. */
782
+ private readonly _usedNicknames;
649
783
  private readonly manifestPath?;
650
784
  private readonly roster?;
651
785
  private readonly directorPreamble;
@@ -890,6 +1024,14 @@ declare class Director implements ICoordinator {
890
1024
  * false and the caller should not proceed with the resume.
891
1025
  */
892
1026
  acquireCheckpointLock(): Promise<boolean>;
1027
+ /**
1028
+ * Start a collaborative debugging session: BugHunter, RefactorPlanner,
1029
+ * and Critic run in parallel on the same target files, with findings
1030
+ * flowing through the FleetBus (bug.found → refactor.plan →
1031
+ * critic.evaluation). Returns a structured CollabDebugReport when all
1032
+ * three agents complete or the session times out.
1033
+ */
1034
+ spawnCollab(options: CollabSessionOptions): Promise<CollabDebugReport>;
893
1035
  /**
894
1036
  * Resume from a prior checkpoint snapshot (loaded via
895
1037
  * `loadDirectorState()`). Re-attach to the fleet mid-flight so
@@ -898,6 +1040,44 @@ declare class Director implements ICoordinator {
898
1040
  resumeFromCheckpoint(snapshot: DirectorStateSnapshot): void;
899
1041
  }
900
1042
 
1043
+ declare function makeSpawnTool(director: Director, roster?: Record<string, SubagentConfig>): Tool;
1044
+ declare function makeAssignTool(director: Director): Tool;
1045
+ declare function makeAwaitTasksTool(director: Director): Tool;
1046
+ declare function makeAskTool(director: Director): Tool;
1047
+ declare function makeRollUpTool(director: Director): Tool;
1048
+ declare function makeTerminateTool(director: Director): Tool;
1049
+ declare function makeFleetStatusTool(director: Director): Tool;
1050
+ declare function makeFleetUsageTool(director: Director): Tool;
1051
+ /**
1052
+ * Read a subagent's JSONL transcript and return the last assistant text,
1053
+ * stop reason, and tool-use count. The director can call this on a
1054
+ * running or timed-out subagent to see what it actually produced without
1055
+ * having to wait for natural completion.
1056
+ */
1057
+ declare function makeFleetSessionTool(director: Director): Tool;
1058
+ /**
1059
+ * Health snapshot per subagent — budget pressure (how close to limits),
1060
+ * last activity timestamp, and current status. Lets the director make
1061
+ * smarter routing decisions without having to call fleet_usage + fleet_status separately.
1062
+ */
1063
+ declare function makeFleetHealthTool(director: Director): Tool;
1064
+ /**
1065
+ * Collaborative debugging session: BugHunter, RefactorPlanner, and Critic
1066
+ * run in parallel on the same target files, with findings flowing through
1067
+ * the FleetBus (bug.found → refactor.plan → critic.evaluation).
1068
+ *
1069
+ * Returns a structured CollabDebugReport containing all bug findings,
1070
+ * refactor plans, critic evaluations, and an overall verdict.
1071
+ */
1072
+ declare function makeCollabDebugTool(director: Director): Tool;
1073
+ /**
1074
+ * Tool for subagents to emit structured events on the FleetBus.
1075
+ * Agents use this in collaborative debugging sessions: BugHunter emits bug.found,
1076
+ * RefactorPlanner emits refactor.plan, Critic emits critic.evaluation.
1077
+ * Events are routed to all other agents in the collab session automatically.
1078
+ */
1079
+ declare function makeFleetEmitTool(director: Director): Tool;
1080
+
901
1081
  /**
902
1082
  * Opaque host interface so this factory doesn't have to depend on the
903
1083
  * CLI's `MultiAgentHost`. Any caller that exposes the same three
@@ -1264,4 +1444,4 @@ declare function attachAutoExtend(events: EventBus, policy?: AutoExtendPolicy):
1264
1444
  */
1265
1445
  declare const NULL_FLEET_BUS: FleetBus;
1266
1446
 
1267
- export { ACP_AGENTS as A, BUG_HUNTER_AGENT as B, type CreateDelegateToolOptions as C, DEFAULT_DIRECTOR_PREAMBLE as D, createDelegateTool as E, FLEET_ROSTER as F, getAgentDefinition as G, makeDirectorSessionFactory as H, type ICoordinator as I, rosterSummaryFromConfigs as J, NULL_FLEET_BUS as N, REFACTOR_PLANNER_AGENT as R, SECURITY_SCANNER_AGENT as S, AGENTS_BY_PHASE as a, AGENT_CATALOG as b, ALL_AGENT_DEFINITIONS as c, ALL_FLEET_AGENTS as d, AUDIT_LOG_AGENT as e, type AutoExtendCeiling as f, type AutoExtendPolicy as g, DEFAULT_SUBAGENT_BASELINE as h, type DelegateHost as i, Director as j, type DirectorPromptParts as k, type DirectorSessionFactory as l, type DirectorSessionFactoryOptions as m, FLEET_ROSTER_BUDGETS as n, FLEET_ROSTER_WITHACP as o, FleetCostCapError as p, FleetManager as q, type FleetManagerOptions as r, type FleetRosterBudget as s, FleetSpawnBudgetError as t, type IFleetManager as u, type SubagentPromptParts as v, applyRosterBudget as w, attachAutoExtend as x, composeDirectorPrompt as y, composeSubagentPrompt as z };
1447
+ export { ACP_AGENTS as A, BUG_HUNTER_AGENT as B, type CreateDelegateToolOptions as C, DEFAULT_DIRECTOR_PREAMBLE as D, createDelegateTool as E, FLEET_ROSTER as F, getAgentDefinition as G, makeAskTool as H, type ICoordinator as I, makeAssignTool as J, makeAwaitTasksTool as K, makeCollabDebugTool as L, makeDirectorSessionFactory as M, NULL_FLEET_BUS as N, makeFleetEmitTool as O, makeFleetHealthTool as P, makeFleetSessionTool as Q, REFACTOR_PLANNER_AGENT as R, SECURITY_SCANNER_AGENT as S, makeFleetStatusTool as T, makeFleetUsageTool as U, makeRollUpTool as V, makeSpawnTool as W, makeTerminateTool as X, rosterSummaryFromConfigs as Y, AGENTS_BY_PHASE as a, AGENT_CATALOG as b, ALL_AGENT_DEFINITIONS as c, ALL_FLEET_AGENTS as d, AUDIT_LOG_AGENT as e, type AutoExtendCeiling as f, type AutoExtendPolicy as g, DEFAULT_SUBAGENT_BASELINE as h, type DelegateHost as i, Director as j, type DirectorPromptParts as k, type DirectorSessionFactory as l, type DirectorSessionFactoryOptions as m, FLEET_ROSTER_BUDGETS as n, FLEET_ROSTER_WITHACP as o, FleetCostCapError as p, FleetManager as q, type FleetManagerOptions as r, type FleetRosterBudget as s, FleetSpawnBudgetError as t, type IFleetManager as u, type SubagentPromptParts as v, applyRosterBudget as w, attachAutoExtend as x, composeDirectorPrompt as y, composeSubagentPrompt as z };
@@ -48,9 +48,4 @@ interface PermissionPolicy {
48
48
  reload(): Promise<void>;
49
49
  }
50
50
 
51
- interface SecretScrubber {
52
- scrub(text: string): string;
53
- scrubObject<T>(obj: T): T;
54
- }
55
-
56
- export type { PermissionDecision as P, SecretScrubber as S, TrustPolicy as T, PermissionPolicy as a };
51
+ export type { PermissionDecision as P, TrustPolicy as T, PermissionPolicy as a };
@@ -1,6 +1,6 @@
1
1
  import { Q as Tool, d as Context } from './context-BRNbHmRM.js';
2
2
  import { I as InputReader } from './input-reader-E-ffP2ee.js';
3
- import { a as PermissionPolicy, P as PermissionDecision } from './secret-scrubber-DttNiGYA.js';
3
+ import { a as PermissionPolicy, P as PermissionDecision } from './permission-bPuzAy4x.js';
4
4
 
5
5
  interface PermissionPolicyOptions {
6
6
  trustFile: string;
@@ -109,6 +109,13 @@ declare class AutoApprovePermissionPolicy implements PermissionPolicy {
109
109
  * level so the leader must explicitly allow them per-spawn.
110
110
  */
111
111
  private static readonly DENY;
112
+ /**
113
+ * Tools from MCP servers (`mcp__<server>__<tool>`) are external code of
114
+ * unknown capability — they may wrap a shell or filesystem. They are
115
+ * fail-closed here: not auto-approved for subagents by default, so the
116
+ * leader must allow them explicitly per-spawn.
117
+ */
118
+ private static isMcpTool;
112
119
  evaluate(tool: Tool): Promise<PermissionDecision>;
113
120
  trust(): Promise<void>;
114
121
  deny(): Promise<void>;
@@ -1,19 +1,30 @@
1
1
  import { E as EventBus } from './events-CiG9qUM_.js';
2
+ import { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
2
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-BRNbHmRM.js';
3
4
  import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-CSWcb5Ga.js';
4
5
  import { b as MemoryStore, a as MemoryScope } from './memory-CEXuo7sz.js';
5
6
  import { a as WstackPaths } from './wstack-paths-BCgmTNlG.js';
6
- import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-SkMIDN9L.js';
7
+ import { c as ConfigStore, a as Config, b as ConfigLoader, m as SyncConfig } from './config-CWva0qoL.js';
7
8
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
8
9
 
9
10
  interface SessionStoreOptions {
10
11
  dir: string;
11
12
  /** Optional EventBus for emitting session diagnostics. */
12
13
  events?: EventBus;
14
+ /**
15
+ * Optional secret scrubber. When set, `user_input` and `llm_response` event
16
+ * content is scrubbed before being persisted to the JSONL log and the
17
+ * summary sidecar — so a secret a user pastes or the model echoes does not
18
+ * sit in cleartext on disk (and does not ride along in history cloud-sync).
19
+ * Tool output is already scrubbed upstream by the executor; this closes the
20
+ * conversation-turn gap (finding F-06).
21
+ */
22
+ secretScrubber?: SecretScrubber;
13
23
  }
14
24
  declare class DefaultSessionStore implements SessionStore {
15
25
  private readonly dir;
16
26
  private readonly events?;
27
+ private readonly secretScrubber?;
17
28
  constructor(opts: SessionStoreOptions);
18
29
  /** Join session ID to its absolute path within the store directory. */
19
30
  private sessionPath;
@@ -185,6 +196,19 @@ declare class DefaultConfigLoader implements ConfigLoader {
185
196
  cliFlags?: Partial<Config>;
186
197
  cwd?: string;
187
198
  }): Promise<Config>;
199
+ /**
200
+ * Persist a sync config to ~/.wrongstack/sync.json, with the token encrypted
201
+ * by the vault (if provided). The file is isolated from the main config
202
+ * hierarchy to prevent accidental commits.
203
+ */
204
+ persistSyncConfig(cfg: SyncConfig): Promise<void>;
205
+ /**
206
+ * Read ~/.wrongstack/sync.json (encrypted GitHub token storage) and decrypt
207
+ * the token if a vault is available. Returns null if the file doesn't exist.
208
+ * This is separate from main config loading because sync.json is intentionally
209
+ * isolated — it should never be part of project-local or env-driven config.
210
+ */
211
+ loadSyncConfig(): Promise<SyncConfig | null>;
188
212
  private readJson;
189
213
  private validateBehavior;
190
214
  private validateIdentity;
@@ -1,14 +1,15 @@
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
2
  import { E as EventBus } from '../events-CiG9qUM_.js';
3
3
  import { D as DoneCondition, u as TaskResult } from '../multi-agent-3ZnTB1aT.js';
4
- import { c as Agent } from '../index-CP8638Wm.js';
5
- import { A as AgentFactory } from '../agent-subagent-runner-DaF_EgRG.js';
4
+ import { c as Agent } from '../index-aizK8olO.js';
5
+ import { A as AgentFactory } from '../agent-subagent-runner-C4qt9e5Y.js';
6
6
  import '../context-BRNbHmRM.js';
7
7
  import '../logger-DDd5C--Z.js';
8
8
  import '../system-prompt-Bs-Wliab.js';
9
9
  import '../observability-BhnVLBLS.js';
10
- import '../secret-scrubber-DttNiGYA.js';
11
- import '../config-SkMIDN9L.js';
10
+ import '../secret-scrubber-3MHDDAtm.js';
11
+ import '../permission-bPuzAy4x.js';
12
+ import '../config-CWva0qoL.js';
12
13
  import '../models-registry-BcYJDKLm.js';
13
14
 
14
15
  declare class SpecParser {
package/dist/sdd/index.js CHANGED
@@ -5287,6 +5287,7 @@ var FLEET_ROSTER_BUDGETS = {
5287
5287
  "bug-hunter": { timeoutMs: 10 * 60 * 60 * 1e3, maxIterations: 8e3, maxToolCalls: 2e4 },
5288
5288
  "refactor-planner": { timeoutMs: 7.5 * 60 * 60 * 1e3, maxIterations: 6e3, maxToolCalls: 18e3 },
5289
5289
  "security-scanner": { timeoutMs: 10 * 60 * 60 * 1e3, maxIterations: 8e3, maxToolCalls: 2e4 },
5290
+ "critic": { timeoutMs: 5 * 60 * 60 * 1e3, maxIterations: 4e3, maxToolCalls: 12e3 },
5290
5291
  ...Object.fromEntries(
5291
5292
  ALL_AGENT_DEFINITIONS.map((d) => [d.config.role, d.budget])
5292
5293
  )