@wrongstack/core 0.6.4 → 0.6.6
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-eb7qnNrd.d.ts → agent-bridge-BBXK_ppx.d.ts} +1 -1
- package/dist/agent-subagent-runner-DsSm9lKN.d.ts +174 -0
- package/dist/{compactor-RIPuTtWK.d.ts → compactor-C8NhpSt5.d.ts} +1 -1
- package/dist/{config-BGGuP_Ar.d.ts → config-DfC6g6KV.d.ts} +1 -1
- package/dist/{context-CDRyrkKQ.d.ts → context-DN5v-uQX.d.ts} +11 -0
- package/dist/coordination/index.d.ts +10 -9
- package/dist/coordination/index.js +113 -20
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +22 -21
- package/dist/defaults/index.js +1359 -919
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-BHuIHekD.d.ts → events-CJqwQl8G.d.ts} +17 -1
- package/dist/execution/index.d.ts +116 -13
- package/dist/execution/index.js +1438 -131
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{goal-store-DVCfj7Ff.d.ts → goal-store-HHgaq5ue.d.ts} +3 -3
- package/dist/{index-CPcDqvZh.d.ts → index-CXnWsGBp.d.ts} +11 -175
- package/dist/{index-BOn9NK7D.d.ts → index-DcnXDPdY.d.ts} +6 -6
- package/dist/index.d.ts +29 -28
- package/dist/index.js +1105 -666
- 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/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-DBdh3cee.d.ts → mcp-servers-CevFHHM1.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +5 -16
- package/dist/models/index.js.map +1 -1
- package/dist/{multi-agent-CxSb-9dQ.d.ts → multi-agent-D5IbASk_.d.ts} +16 -4
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-CMGNadvq.d.ts → path-resolver-CBx_q1HA.d.ts} +2 -2
- package/dist/{plan-templates-BJflQY2i.d.ts → plan-templates-BEOllUJV.d.ts} +5 -4
- package/dist/{provider-runner-BFgNXpaP.d.ts → provider-runner-Byh5TcJs.d.ts} +3 -3
- package/dist/{retry-policy-LKS8MHsB.d.ts → retry-policy-BZSIMxrJ.d.ts} +1 -1
- package/dist/sdd/index.d.ts +9 -4
- package/dist/sdd/index.js +21 -0
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-scrubber-CfMdAJ_l.d.ts → secret-scrubber-CT7wefiO.d.ts} +1 -1
- package/dist/{secret-scrubber-BzQR5BiL.d.ts → secret-scrubber-I0QHY_ob.d.ts} +1 -1
- package/dist/security/index.d.ts +3 -3
- package/dist/{selector-C7HqnZJU.d.ts → selector-DDb_mq9X.d.ts} +1 -1
- package/dist/{session-reader-CzfRA6Vk.d.ts → session-reader-B9nVkziM.d.ts} +1 -1
- package/dist/storage/index.d.ts +6 -6
- package/dist/storage/index.js +29 -3
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-Dl2QY1_B.d.ts → system-prompt-gL06H9P4.d.ts} +1 -1
- package/dist/{task-graph-BITvWt4t.d.ts → task-graph-D1YQbpxF.d.ts} +1 -0
- package/dist/{tool-executor-FoxBjULX.d.ts → tool-executor-BF7QfYVE.d.ts} +4 -4
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.js +5 -16
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/skills/audit-log/SKILL.md +57 -28
- package/skills/bug-hunter/SKILL.md +85 -61
- package/skills/git-flow/SKILL.md +73 -18
- package/skills/multi-agent/SKILL.md +69 -40
- package/skills/node-modern/SKILL.md +111 -19
- package/skills/prompt-engineering/SKILL.md +97 -16
- package/skills/react-modern/SKILL.md +104 -18
- package/skills/refactor-planner/SKILL.md +73 -43
- package/skills/sdd/SKILL.md +123 -165
- package/skills/security-scanner/SKILL.md +95 -93
- package/skills/skill-creator/SKILL.md +58 -25
- package/skills/typescript-strict/SKILL.md +107 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Usage, a2 as Context, z as ToolProgressEvent, v as Tool } from './context-
|
|
1
|
+
import { U as Usage, a2 as Context, z as ToolProgressEvent, v as Tool } from './context-DN5v-uQX.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* EventBus — observe-only typed event bus.
|
|
@@ -298,6 +298,22 @@ interface EventMap {
|
|
|
298
298
|
input?: unknown;
|
|
299
299
|
outputBytes?: number;
|
|
300
300
|
};
|
|
301
|
+
/**
|
|
302
|
+
* Periodic progress snapshot emitted by the subagent runner every ~25
|
|
303
|
+
* iterations so the user can track what a subagent is doing without
|
|
304
|
+
* looking at the FleetPanel. The leader's TUI surfaces this as a
|
|
305
|
+
* chat history entry: "AGENT#2 💬 L25 · 47 tools · $0.023 · doing grep..."
|
|
306
|
+
* Fired on a best-effort basis — slow subagents may skip emissions if
|
|
307
|
+
* the 25-iteration window passes while the agent is between tool calls.
|
|
308
|
+
*/
|
|
309
|
+
'subagent.iteration_summary': {
|
|
310
|
+
subagentId: string;
|
|
311
|
+
iteration: number;
|
|
312
|
+
toolCalls: number;
|
|
313
|
+
costUsd: number;
|
|
314
|
+
currentTool?: string;
|
|
315
|
+
partialText?: string;
|
|
316
|
+
};
|
|
301
317
|
'subagent.task_completed': {
|
|
302
318
|
subagentId: string;
|
|
303
319
|
taskId: string;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-
|
|
2
|
-
import { g as Provider, a2 as Context } from '../context-
|
|
3
|
-
import { a as Compactor, C as CompactReport } from '../compactor-
|
|
4
|
-
import { M as MessageSelector } from '../selector-
|
|
5
|
-
import { E as EventBus } from '../events-
|
|
6
|
-
import { c as MiddlewareHandler } from '../system-prompt-
|
|
7
|
-
import { e as ContextWindowAggressiveOn, i as ContextWindowPolicy } from '../config-
|
|
8
|
-
import {
|
|
9
|
-
import { D as DoneCondition } from '../multi-agent-
|
|
10
|
-
import { J as JournalEntry } from '../goal-store-
|
|
1
|
+
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-BF7QfYVE.js';
|
|
2
|
+
import { g as Provider, a2 as Context } from '../context-DN5v-uQX.js';
|
|
3
|
+
import { a as Compactor, C as CompactReport } from '../compactor-C8NhpSt5.js';
|
|
4
|
+
import { M as MessageSelector } from '../selector-DDb_mq9X.js';
|
|
5
|
+
import { E as EventBus } from '../events-CJqwQl8G.js';
|
|
6
|
+
import { c as MiddlewareHandler } from '../system-prompt-gL06H9P4.js';
|
|
7
|
+
import { e as ContextWindowAggressiveOn, i as ContextWindowPolicy } from '../config-DfC6g6KV.js';
|
|
8
|
+
import { A as Agent, R as RunResult, j as SystemPromptContributor } from '../index-DcnXDPdY.js';
|
|
9
|
+
import { D as DoneCondition } from '../multi-agent-D5IbASk_.js';
|
|
10
|
+
import { J as JournalEntry } from '../goal-store-HHgaq5ue.js';
|
|
11
|
+
import { A as AgentFactory } from '../agent-subagent-runner-DsSm9lKN.js';
|
|
11
12
|
import { a as SkillLoader, b as SkillManifest, S as SkillEntry } from '../skill-CxuWrsKK.js';
|
|
12
13
|
import { W as WstackPaths } from '../wstack-paths-86YPFktR.js';
|
|
13
|
-
import '../retry-policy-
|
|
14
|
+
import '../retry-policy-BZSIMxrJ.js';
|
|
14
15
|
import '../models-registry-Y2xbog0E.js';
|
|
15
16
|
import '../logger-BMQgxvdy.js';
|
|
16
17
|
import '../observability-BhnVLBLS.js';
|
|
17
|
-
import '../secret-scrubber-
|
|
18
|
+
import '../secret-scrubber-CT7wefiO.js';
|
|
18
19
|
|
|
19
20
|
interface SkillLoaderOptions {
|
|
20
21
|
paths: WstackPaths;
|
|
@@ -333,6 +334,13 @@ interface EternalAutonomyOptions {
|
|
|
333
334
|
/** Side-channel notifications (logging, UI updates). */
|
|
334
335
|
onIteration?: (entry: JournalEntry) => void;
|
|
335
336
|
onError?: (err: Error, iteration: number) => void;
|
|
337
|
+
/**
|
|
338
|
+
* Per-iteration phase notifications for live UI updates (TUI status bar,
|
|
339
|
+
* etc.). Fires at each major stage transition: idle → decide → execute →
|
|
340
|
+
* reflect → (sleep | paused | stopped). Fire-and-forget — the engine
|
|
341
|
+
* does not await the callback.
|
|
342
|
+
*/
|
|
343
|
+
onStage?: (stage: IterationStage) => void;
|
|
336
344
|
/**
|
|
337
345
|
* Optional injected git status reader — production code uses git, tests
|
|
338
346
|
* stub this out so they don't shell out.
|
|
@@ -381,6 +389,33 @@ interface EternalAutonomyOptions {
|
|
|
381
389
|
transientBackoffMaxMs?: number;
|
|
382
390
|
}
|
|
383
391
|
type EternalEngineState = 'idle' | 'running' | 'stopped';
|
|
392
|
+
/**
|
|
393
|
+
* Per-iteration phase emitted via `onStage` so UIs can render the
|
|
394
|
+
* engine's live location in the sense-decide-execute-reflect loop.
|
|
395
|
+
*/
|
|
396
|
+
type IterationStage = {
|
|
397
|
+
phase: 'idle';
|
|
398
|
+
} | {
|
|
399
|
+
phase: 'decide';
|
|
400
|
+
reason: string;
|
|
401
|
+
} | {
|
|
402
|
+
phase: 'execute';
|
|
403
|
+
task: string;
|
|
404
|
+
} | {
|
|
405
|
+
phase: 'reflect';
|
|
406
|
+
status: 'success' | 'failure' | 'aborted' | 'skipped';
|
|
407
|
+
note?: string;
|
|
408
|
+
} | {
|
|
409
|
+
phase: 'sleep';
|
|
410
|
+
ms: number;
|
|
411
|
+
} | {
|
|
412
|
+
phase: 'paused';
|
|
413
|
+
} | {
|
|
414
|
+
phase: 'stopped';
|
|
415
|
+
} | {
|
|
416
|
+
phase: 'error';
|
|
417
|
+
message: string;
|
|
418
|
+
};
|
|
384
419
|
declare class EternalAutonomyEngine {
|
|
385
420
|
private readonly opts;
|
|
386
421
|
private state;
|
|
@@ -480,6 +515,74 @@ declare class EternalAutonomyEngine {
|
|
|
480
515
|
private persistEngineState;
|
|
481
516
|
}
|
|
482
517
|
|
|
518
|
+
type ParallelEngineState = 'idle' | 'running' | 'stopped';
|
|
519
|
+
interface ParallelEternalOptions {
|
|
520
|
+
/** The coordinating agent — NOT a subagent. Owns container/tools/providers. */
|
|
521
|
+
agent: Agent;
|
|
522
|
+
/** Project root (used for goal.json path). */
|
|
523
|
+
projectRoot: string;
|
|
524
|
+
/**
|
|
525
|
+
* Number of parallel subagent slots per tick.
|
|
526
|
+
* Default: 4. Range 1–16; values >8 are for high-throughput machines.
|
|
527
|
+
*/
|
|
528
|
+
parallelSlots?: number;
|
|
529
|
+
/** Per-subagent default timeout in ms. Default: 300_000 (5 min). */
|
|
530
|
+
iterationTimeoutMs?: number;
|
|
531
|
+
onIteration?: (entry: JournalEntry) => void;
|
|
532
|
+
onError?: (err: Error, iteration: number) => void;
|
|
533
|
+
gitStatusReader?: () => Promise<string>;
|
|
534
|
+
now?: () => Date;
|
|
535
|
+
compactor?: Compactor;
|
|
536
|
+
compactEveryNIterations?: number;
|
|
537
|
+
aggressiveCompactRatio?: number;
|
|
538
|
+
maxContextTokens?: number;
|
|
539
|
+
/** Override the default agent factory (uses main agent if not provided). */
|
|
540
|
+
subagentFactory?: AgentFactory;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Sense → Decide → Fan-out (4–8 parallel agents) → Aggregate → Loop.
|
|
544
|
+
*
|
|
545
|
+
* Each tick:
|
|
546
|
+
* 1. Sense — load goal, todos, git status
|
|
547
|
+
* 2. Decide — decompose goal into N parallel sub-tasks
|
|
548
|
+
* 3. Fan-out — spawn N subagents simultaneously, await all
|
|
549
|
+
* 4. Aggregate — write journal, update todos, check [GOAL_COMPLETE]
|
|
550
|
+
* 5. Loop — continue until stop() or mission complete
|
|
551
|
+
*
|
|
552
|
+
* Uses DefaultMultiAgentCoordinator + AgentSubagentRunner for subagent lifecycle.
|
|
553
|
+
*/
|
|
554
|
+
declare class ParallelEternalEngine {
|
|
555
|
+
private readonly opts;
|
|
556
|
+
private state;
|
|
557
|
+
private stopRequested;
|
|
558
|
+
private iterationsSinceCompact;
|
|
559
|
+
private iterations;
|
|
560
|
+
private consecutiveFailures;
|
|
561
|
+
private readonly goalPath;
|
|
562
|
+
private readonly slots;
|
|
563
|
+
private readonly timeoutMs;
|
|
564
|
+
private coordinator;
|
|
565
|
+
private agentFactory;
|
|
566
|
+
constructor(opts: ParallelEternalOptions);
|
|
567
|
+
get currentState(): ParallelEngineState;
|
|
568
|
+
stop(): void;
|
|
569
|
+
prime(): Promise<void>;
|
|
570
|
+
run(): Promise<void>;
|
|
571
|
+
/**
|
|
572
|
+
* Execute one tick: decompose → fan-out → aggregate → compact.
|
|
573
|
+
* Called by the REPL in its main loop (REPL drives, engine is stateless per tick).
|
|
574
|
+
*/
|
|
575
|
+
runOneIteration(): Promise<boolean>;
|
|
576
|
+
private fanOut;
|
|
577
|
+
private decomposeGoal;
|
|
578
|
+
private readGitStatus;
|
|
579
|
+
private brainstormSubtasks;
|
|
580
|
+
private maybeCompact;
|
|
581
|
+
private appendIterationEntry;
|
|
582
|
+
private appendFailure;
|
|
583
|
+
private persistState;
|
|
584
|
+
}
|
|
585
|
+
|
|
483
586
|
/**
|
|
484
587
|
* System-prompt contributor that surfaces eternal-autonomy state to the
|
|
485
588
|
* model on every turn.
|
|
@@ -549,4 +652,4 @@ declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOp
|
|
|
549
652
|
*/
|
|
550
653
|
declare function buildGoalPreamble(goal: string): string;
|
|
551
654
|
|
|
552
|
-
export { AutoCompactionMiddleware, AutonomousRunner, type AutonomousRunnerOptions, type AutonomyPromptContributorOptions, DefaultSkillLoader, type DoneCheckResult, DoneConditionChecker, EternalAutonomyEngine, type EternalAutonomyOptions, type EternalEngineState, IntelligentCompactor, type IntelligentCompactorOptions, SelectiveCompactor, type SelectiveCompactorOptions, type SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor };
|
|
655
|
+
export { AutoCompactionMiddleware, AutonomousRunner, type AutonomousRunnerOptions, type AutonomyPromptContributorOptions, DefaultSkillLoader, type DoneCheckResult, DoneConditionChecker, EternalAutonomyEngine, type EternalAutonomyOptions, type EternalEngineState, IntelligentCompactor, type IntelligentCompactorOptions, type IterationStage, type ParallelEngineState, ParallelEternalEngine, type ParallelEternalOptions, SelectiveCompactor, type SelectiveCompactorOptions, type SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor };
|