@wrongstack/core 0.89.3 → 0.107.2
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-DbVe1dHT.d.ts → agent-bridge-mOxbpFcg.d.ts} +1 -1
- package/dist/{agent-subagent-runner-C6eqID1t.d.ts → agent-subagent-runner-DukQLUcS.d.ts} +5 -5
- package/dist/{brain-s9DyD_Vf.d.ts → brain-Dfv4Y82E.d.ts} +1 -1
- package/dist/{config-84VaZpH6.d.ts → config-BSU-6vah.d.ts} +1 -1
- package/dist/coordination/index.d.ts +9 -9
- package/dist/coordination/index.js +103 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +18 -17
- package/dist/defaults/index.js +276 -12
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +61 -365
- package/dist/execution/index.js +423 -8
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +4 -4
- package/dist/goal-preamble-CI8lxeY1.d.ts +378 -0
- package/dist/{goal-store-DvWLNu52.d.ts → goal-store-ht0VmR1A.d.ts} +63 -21
- package/dist/{index-CqrroYcU.d.ts → index-BWRN6wOb.d.ts} +5 -5
- package/dist/{index-D3Nax3YU.d.ts → index-DIKEcfgC.d.ts} +3 -3
- package/dist/index.d.ts +31 -29
- package/dist/index.js +530 -53
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +4 -4
- package/dist/kernel/index.d.ts +6 -6
- package/dist/{mcp-servers-D3E5ixAR.d.ts → mcp-servers-CXCsANdY.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-DHNrjPaA.d.ts → multi-agent-coordinator-51LvnXkD.d.ts} +1 -1
- package/dist/{null-fleet-bus-BzzciAc4.d.ts → null-fleet-bus-D09hMzFQ.d.ts} +5 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{parallel-eternal-engine-CTpcrb9O.d.ts → parallel-eternal-engine-CUtmM_0V.d.ts} +24 -5
- package/dist/{path-resolver-B7hgMAVe.d.ts → path-resolver-DDJiMAtX.d.ts} +1 -1
- package/dist/{pipeline-C1Ad9OjI.d.ts → pipeline-BqiA_UMr.d.ts} +2 -2
- package/dist/{plan-templates-CNphsz0n.d.ts → plan-templates-BdDxl9cI.d.ts} +2 -2
- package/dist/{provider-runner-cqvlB_oS.d.ts → provider-runner-BUunikwY.d.ts} +1 -1
- package/dist/sdd/index.d.ts +11 -6
- package/dist/sdd/index.js +124 -5
- package/dist/sdd/index.js.map +1 -1
- package/dist/{session-event-bridge-IVzs2GpE.d.ts → session-event-bridge-BpJ5trO9.d.ts} +1 -1
- package/dist/{skill-BJxzIyyN.d.ts → skill-Bj6Ezqb8.d.ts} +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/spec-TBi3Jr6T.d.ts +78 -0
- package/dist/storage/index.d.ts +21 -9
- package/dist/storage/index.js +157 -14
- package/dist/storage/index.js.map +1 -1
- package/dist/task-format-vGOIftmK.d.ts +23 -0
- package/dist/task-graph-u1q9Jkyk.d.ts +84 -0
- package/dist/types/index.d.ts +15 -14
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +110 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/tech-stack/SKILL.md +177 -0
- package/dist/task-graph-DJBqO0EY.d.ts +0 -161
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-B9J5puGM.js';
|
|
2
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
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-
|
|
2
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-DDJiMAtX.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-CXCsANdY.js';
|
|
4
4
|
import '../logger-B63L5bTg.js';
|
|
5
|
-
import '../brain-
|
|
5
|
+
import '../brain-Dfv4Y82E.js';
|
|
6
6
|
import '../context-CNRYfhUv.js';
|
|
7
7
|
import '../models-registry-B6_KfS65.js';
|
|
8
8
|
import '../path-resolver-CPRj4bFY.js';
|
|
9
9
|
import '../compactor-DXLxLcmU.js';
|
|
10
|
-
import '../config-
|
|
10
|
+
import '../config-BSU-6vah.js';
|
package/dist/kernel/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { E as EventBus, n as EventLogger, o as EventMap,
|
|
3
|
-
export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-
|
|
1
|
+
export { c as BindOptions, C as Container, D as Decorator, F as Factory, d as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, e as PipelineOptions, T as Token } from '../pipeline-BqiA_UMr.js';
|
|
2
|
+
export { E as EventBus, n as EventLogger, o as EventMap, c as EventName, L as Listener, w as ScopedEventBus } from '../brain-Dfv4Y82E.js';
|
|
3
|
+
export { R as RunController, b as RunControllerOptions, T as TOKENS } from '../index-BWRN6wOb.js';
|
|
4
4
|
import '../context-CNRYfhUv.js';
|
|
5
|
-
import '../config-
|
|
5
|
+
import '../config-BSU-6vah.js';
|
|
6
6
|
import '../models-registry-B6_KfS65.js';
|
|
7
7
|
import '../compactor-DXLxLcmU.js';
|
|
8
8
|
import '../retry-policy-BcmuT_V0.js';
|
|
@@ -11,6 +11,6 @@ import '../logger-B63L5bTg.js';
|
|
|
11
11
|
import '../mode-ARA3HrkY.js';
|
|
12
12
|
import '../path-resolver-CPRj4bFY.js';
|
|
13
13
|
import '../permission-BDv7z0mk.js';
|
|
14
|
-
import '../provider-runner-
|
|
14
|
+
import '../provider-runner-BUunikwY.js';
|
|
15
15
|
import '../observability-D-HZN_mF.js';
|
|
16
|
-
import '../skill-
|
|
16
|
+
import '../skill-Bj6Ezqb8.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as Compactor } from './compactor-DXLxLcmU.js';
|
|
2
2
|
import { M as Message, T as Tool } from './context-CNRYfhUv.js';
|
|
3
|
-
import { M as MCPServerConfig } from './config-
|
|
3
|
+
import { M as MCPServerConfig } from './config-BSU-6vah.js';
|
|
4
4
|
|
|
5
5
|
type ContextManagerAction = 'check' | 'summary' | 'prune' | 'add_note' | 'compact' | 'repair';
|
|
6
6
|
interface ContextManagerInput {
|
package/dist/{multi-agent-coordinator-DHNrjPaA.d.ts → multi-agent-coordinator-51LvnXkD.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SubagentConfig, M as MultiAgentCoordinator, c as MultiAgentConfig, d as SubagentRunner, F as FleetBus, e as SpawnResult, T as TaskSpec, a as BridgeMessage, A as AgentBridge, C as CoordinatorStatus, f as TaskResult } from './agent-subagent-runner-
|
|
1
|
+
import { S as SubagentConfig, M as MultiAgentCoordinator, c as MultiAgentConfig, d as SubagentRunner, F as FleetBus, e as SpawnResult, T as TaskSpec, a as BridgeMessage, A as AgentBridge, C as CoordinatorStatus, f as TaskResult } from './agent-subagent-runner-DukQLUcS.js';
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as AgentPhase, A as AgentDefinition, a as DefaultMultiAgentCoordinator, D as DispatchClassifier } from './multi-agent-coordinator-
|
|
2
|
-
import { F as FleetBus, u as FleetUsage, S as SubagentConfig, v as FleetUsageAggregator, f as TaskResult, C as CoordinatorStatus, T as TaskSpec, c as MultiAgentConfig, d as SubagentRunner } from './agent-subagent-runner-
|
|
1
|
+
import { d as AgentPhase, A as AgentDefinition, a as DefaultMultiAgentCoordinator, D as DispatchClassifier } from './multi-agent-coordinator-51LvnXkD.js';
|
|
2
|
+
import { F as FleetBus, u as FleetUsage, S as SubagentConfig, v as FleetUsageAggregator, f as TaskResult, C as CoordinatorStatus, T as TaskSpec, c as MultiAgentConfig, d as SubagentRunner } from './agent-subagent-runner-DukQLUcS.js';
|
|
3
3
|
import { a as SessionWriter, T as Tool, i as SessionStore } from './context-CNRYfhUv.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as BrainArbiter, E as EventBus } from './brain-Dfv4Y82E.js';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
6
6
|
import { D as DirectorStateSnapshot } from './director-state-BfeCUbmk.js';
|
|
7
|
-
import {
|
|
8
|
-
import { I as InMemoryAgentBridge } from './agent-bridge-
|
|
7
|
+
import { h as ModelMatrixEntry } from './config-BSU-6vah.js';
|
|
8
|
+
import { I as InMemoryAgentBridge } from './agent-bridge-mOxbpFcg.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Alert levels the Director can emit when a collab session needs attention.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as MetricsSink, d as MetricLabels, f as MetricsSnapshot, H as HealthRegistry, a as HealthCheck, A as AggregateHealth, T as Tracer, S as Span } from '../observability-D-HZN_mF.js';
|
|
2
|
-
import { E as EventBus } from '../brain-
|
|
2
|
+
import { E as EventBus } from '../brain-Dfv4Y82E.js';
|
|
3
3
|
import '../context-CNRYfhUv.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/{parallel-eternal-engine-CTpcrb9O.d.ts → parallel-eternal-engine-CUtmM_0V.d.ts}
RENAMED
|
@@ -2,10 +2,11 @@ import { e as ProviderError, C as Context, T as Tool, m as ToolUseBlock, n as To
|
|
|
2
2
|
import { R as RetryPolicy, E as ErrorHandler, a as RecoveryDecision } from './retry-policy-BcmuT_V0.js';
|
|
3
3
|
import { C as Compactor, a as CompactReport } from './compactor-DXLxLcmU.js';
|
|
4
4
|
import { M as ModelsRegistry } from './models-registry-B6_KfS65.js';
|
|
5
|
-
import { T as ToolExecutorOptions, a as ToolExecutorStrategy, b as ToolBatchResult } from './index-
|
|
6
|
-
import { g as Agent, h as AgentFactory } from './agent-subagent-runner-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { T as ToolExecutorOptions, a as ToolExecutorStrategy, b as ToolBatchResult } from './index-DIKEcfgC.js';
|
|
6
|
+
import { g as Agent, h as AgentFactory } from './agent-subagent-runner-DukQLUcS.js';
|
|
7
|
+
import { b as BrainArbiter } from './brain-Dfv4Y82E.js';
|
|
8
|
+
import { J as JournalEntry } from './goal-store-ht0VmR1A.js';
|
|
9
|
+
import { D as DispatchClassifier, a as DefaultMultiAgentCoordinator } from './multi-agent-coordinator-51LvnXkD.js';
|
|
9
10
|
|
|
10
11
|
declare class DefaultRetryPolicy implements RetryPolicy {
|
|
11
12
|
shouldRetry(err: Error | ProviderError, attempt: number): boolean;
|
|
@@ -227,6 +228,15 @@ interface EternalAutonomyOptions {
|
|
|
227
228
|
transientBackoffMaxMs?: number | undefined;
|
|
228
229
|
/** Called when the eternal loop stops for any reason (manual stop, goal complete, etc.). */
|
|
229
230
|
onEternalStop?: ((() => void)) | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* Optional brain arbiter for autonomous decision-making. When wired,
|
|
233
|
+
* the engine consults the brain instead of auto-stopping on:
|
|
234
|
+
* - Brainstorm DONE threshold reached
|
|
235
|
+
* - Consecutive failures exceeding failure budget
|
|
236
|
+
* - Goal completion verification
|
|
237
|
+
* Without a brain, the engine uses its built-in heuristics.
|
|
238
|
+
*/
|
|
239
|
+
brain?: BrainArbiter | undefined;
|
|
230
240
|
}
|
|
231
241
|
type EternalEngineState = 'idle' | 'running' | 'stopped';
|
|
232
242
|
/**
|
|
@@ -358,6 +368,15 @@ declare class EternalAutonomyEngine {
|
|
|
358
368
|
*/
|
|
359
369
|
private clearGoalManually;
|
|
360
370
|
private appendFailure;
|
|
371
|
+
/**
|
|
372
|
+
* Consult the brain on whether the goal is truly complete.
|
|
373
|
+
* Without a brain, always returns true (use heuristic: DONE threshold met = done).
|
|
374
|
+
*/
|
|
375
|
+
private consultBrainForDone;
|
|
376
|
+
/**
|
|
377
|
+
* Persist a progress update from the agent's [PROGRESS: N%] output.
|
|
378
|
+
*/
|
|
379
|
+
private updateProgress;
|
|
361
380
|
private persistEngineState;
|
|
362
381
|
}
|
|
363
382
|
|
|
@@ -481,4 +500,4 @@ declare class ParallelEternalEngine {
|
|
|
481
500
|
private persistState;
|
|
482
501
|
}
|
|
483
502
|
|
|
484
|
-
export { type CompactorOptions as C,
|
|
503
|
+
export { type CompactorOptions as C, DefaultErrorHandler as D, EternalAutonomyEngine as E, HybridCompactor as H, type IterationStage as I, type ParallelEngineState as P, type RecoveryStrategy as R, ToolExecutor as T, DefaultRetryPolicy as a, type EternalAutonomyOptions as b, type EternalEngineState as c, ParallelEternalEngine as d, type ParallelEternalOptions as e, type ParallelIterationStage as f, DEFAULT_RECOVERY_STRATEGIES as g, buildRecoveryStrategies as h };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EventBus } from './brain-
|
|
1
|
+
import { E as EventBus } from './brain-Dfv4Y82E.js';
|
|
2
2
|
import { M as ModelsRegistry, b as ResolvedModel } from './models-registry-B6_KfS65.js';
|
|
3
3
|
import { c as TokenCounter, U as Usage, d as CacheStats } from './context-CNRYfhUv.js';
|
|
4
4
|
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as Tool, l as TextBlock, g as ContentBlock } from './context-CNRYfhUv.js';
|
|
2
|
-
import { H as HookEvent, a as HookMatcher, I as InProcessHook, S as ShellHook, b as HookEntry } from './config-
|
|
2
|
+
import { H as HookEvent, a as HookMatcher, I as InProcessHook, S as ShellHook, b as HookEntry } from './config-BSU-6vah.js';
|
|
3
3
|
|
|
4
4
|
/** Model capabilities relevant to prompt composition. */
|
|
5
5
|
interface ModelCapabilities {
|
|
@@ -236,4 +236,4 @@ declare class Pipeline<T> {
|
|
|
236
236
|
private ensureUnique;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
export { type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type
|
|
239
|
+
export { type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type MiddlewareHandler as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type Renderer as a, type ModelCapabilities as b, type BindOptions as c, type Middleware as d, type PipelineOptions as e, hookMatcherMatches as h };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-
|
|
1
|
+
import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-Dfv4Y82E.js';
|
|
2
2
|
import { S as SecretScrubber } from './permission-BDv7z0mk.js';
|
|
3
3
|
import { i as SessionStore, h as SessionMetadata, a as SessionWriter, p as ResumedSession, q as SessionData, r as SessionSummary, g as ContentBlock, S as SessionEvent, s as TodoItem, t as ConversationState } from './context-CNRYfhUv.js';
|
|
4
4
|
import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-DDz1Ek4V.js';
|
|
5
5
|
import { W as WstackPaths } from './wstack-paths-_lqjzErq.js';
|
|
6
|
-
import {
|
|
6
|
+
import { e as ConfigStore, d as Config, f as ConfigLoader, g as SyncConfig } from './config-BSU-6vah.js';
|
|
7
7
|
import { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
8
8
|
|
|
9
9
|
interface SessionStoreOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EventBus } from './brain-
|
|
1
|
+
import { E as EventBus } from './brain-Dfv4Y82E.js';
|
|
2
2
|
import { L as Logger } from './logger-B63L5bTg.js';
|
|
3
3
|
import { T as Tracer } from './observability-D-HZN_mF.js';
|
|
4
4
|
import { P as Provider, R as Request, C as Context, b as Response } from './context-CNRYfhUv.js';
|
package/dist/sdd/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../spec-TBi3Jr6T.js';
|
|
2
|
+
import { d as TaskGraph, e as TaskNode, i as TaskFilter, j as TaskSort, c as TaskProgress, T as TaskType, a as TaskPriority } from '../task-graph-u1q9Jkyk.js';
|
|
3
|
+
import { E as EventBus } from '../brain-Dfv4Y82E.js';
|
|
4
|
+
import { D as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-DukQLUcS.js';
|
|
4
5
|
import '../context-CNRYfhUv.js';
|
|
5
|
-
import '../index-
|
|
6
|
+
import '../index-DIKEcfgC.js';
|
|
6
7
|
import '../logger-B63L5bTg.js';
|
|
7
|
-
import '../pipeline-
|
|
8
|
-
import '../config-
|
|
8
|
+
import '../pipeline-BqiA_UMr.js';
|
|
9
|
+
import '../config-BSU-6vah.js';
|
|
9
10
|
import '../models-registry-B6_KfS65.js';
|
|
10
11
|
import '../observability-D-HZN_mF.js';
|
|
11
12
|
import '../permission-BDv7z0mk.js';
|
|
@@ -720,6 +721,8 @@ interface SddParallelRunOptions {
|
|
|
720
721
|
parallelSlots?: number | undefined;
|
|
721
722
|
/** Per-task timeout in ms. Default: 300_000 (5 min). */
|
|
722
723
|
taskTimeoutMs?: number | undefined;
|
|
724
|
+
/** Maximum retry attempts for failed tasks. Default: 2. */
|
|
725
|
+
maxRetries?: number | undefined;
|
|
723
726
|
/** Override the default agent factory. */
|
|
724
727
|
subagentFactory?: AgentFactory | undefined;
|
|
725
728
|
/** Called after each wave completes. */
|
|
@@ -760,9 +763,11 @@ declare class SddParallelRun {
|
|
|
760
763
|
private readonly opts;
|
|
761
764
|
private readonly slots;
|
|
762
765
|
private readonly timeoutMs;
|
|
766
|
+
private readonly maxRetries;
|
|
763
767
|
private decomposer;
|
|
764
768
|
private coordinator;
|
|
765
769
|
private stopRequested;
|
|
770
|
+
private retryMap;
|
|
766
771
|
constructor(opts: SddParallelRunOptions);
|
|
767
772
|
/** Trigger stop — causes run() to abort after the current wave. */
|
|
768
773
|
stop(): void;
|
package/dist/sdd/index.js
CHANGED
|
@@ -761,7 +761,7 @@ var TaskTracker = class {
|
|
|
761
761
|
const blockers = this.getBlockers(taskId);
|
|
762
762
|
return blockers.every((id) => {
|
|
763
763
|
const node = this.graph?.nodes.get(id);
|
|
764
|
-
return node?.status === "completed";
|
|
764
|
+
return node?.status === "completed" || node?.status === "failed";
|
|
765
765
|
});
|
|
766
766
|
}
|
|
767
767
|
getProgress() {
|
|
@@ -793,7 +793,7 @@ var TaskTracker = class {
|
|
|
793
793
|
const remainingBlockers = this.getBlockers(depId);
|
|
794
794
|
const allUnblocked = remainingBlockers.every((id) => {
|
|
795
795
|
const blocker = this.graph?.nodes.get(id);
|
|
796
|
-
return blocker?.status === "completed";
|
|
796
|
+
return blocker?.status === "completed" || blocker?.status === "failed";
|
|
797
797
|
});
|
|
798
798
|
if (allUnblocked) {
|
|
799
799
|
dep.status = "pending";
|
|
@@ -807,7 +807,7 @@ var TaskTracker = class {
|
|
|
807
807
|
const blockers = this.getBlockers(taskId);
|
|
808
808
|
const someBlocked = blockers.some((id) => {
|
|
809
809
|
const blocker = this.graph?.nodes.get(id);
|
|
810
|
-
return blocker?.status !== "completed";
|
|
810
|
+
return blocker?.status !== "completed" && blocker?.status !== "failed";
|
|
811
811
|
});
|
|
812
812
|
if (someBlocked) {
|
|
813
813
|
const node = this.graph.nodes.get(taskId);
|
|
@@ -5450,6 +5450,109 @@ Working rules:
|
|
|
5450
5450
|
"cloud cost"
|
|
5451
5451
|
]
|
|
5452
5452
|
}
|
|
5453
|
+
},
|
|
5454
|
+
{
|
|
5455
|
+
config: {
|
|
5456
|
+
id: "tech-stack",
|
|
5457
|
+
name: "Tech Stack Validator",
|
|
5458
|
+
role: "tech-stack",
|
|
5459
|
+
tools: ["search", "fetch", "read", "grep", "glob", "outdated", "audit", "json"],
|
|
5460
|
+
prompt: `You are the Tech Stack Validator \u2014 a single-shot validation agent that fires
|
|
5461
|
+
before any package, library, or framework choice is committed.
|
|
5462
|
+
|
|
5463
|
+
Your ONLY job: verify that a technology choice is current, real, and not obsolete.
|
|
5464
|
+
You are the "this isn't code, this is 10-year-old technology" agent. Intervene
|
|
5465
|
+
hard when the LLM hallucinates a version number or suggests dead tech.
|
|
5466
|
+
|
|
5467
|
+
## Critical rules
|
|
5468
|
+
|
|
5469
|
+
1. **Verify existence.** Search npm registry (fetch https://registry.npmjs.org/<pkg>/latest)
|
|
5470
|
+
or web search. A package that doesn't exist = hallucination.
|
|
5471
|
+
|
|
5472
|
+
2. **Check latest version.** Never trust any version number from the model. Always
|
|
5473
|
+
fetch the actual latest stable version from npm or the project's release page.
|
|
5474
|
+
|
|
5475
|
+
3. **Reject dead packages.** No release in >2 years + unresolved critical issues =
|
|
5476
|
+
dead. Suggest a maintained replacement.
|
|
5477
|
+
|
|
5478
|
+
4. **Reject prehistoric tech.** Any package/pattern superseded \u22655 years ago is
|
|
5479
|
+
REJECTED. Key blocklist:
|
|
5480
|
+
- axios / node-fetch / got / request \u2192 native fetch (Node 18+)
|
|
5481
|
+
- moment \u2192 date-fns / luxon / Temporal
|
|
5482
|
+
- jQuery (new projects) \u2192 vanilla DOM / React
|
|
5483
|
+
- Gulp / Grunt \u2192 tsup / esbuild / vite
|
|
5484
|
+
- CoffeeScript / Flow \u2192 TypeScript
|
|
5485
|
+
- Bluebird \u2192 native Promises
|
|
5486
|
+
- crypto-js \u2192 node:crypto / Web Crypto
|
|
5487
|
+
- Bower \u2192 npm/pnpm
|
|
5488
|
+
- underscore \u2192 lodash or native ES2020+
|
|
5489
|
+
|
|
5490
|
+
5. **The intervention phrase.** When rejecting on age grounds, you MUST output
|
|
5491
|
+
exactly: "This isn't code, this is X-year-old technology." where X =
|
|
5492
|
+
current year \u2212 the year the technology was made obsolete. Follow with
|
|
5493
|
+
what replaced it and a one-step migration path.
|
|
5494
|
+
|
|
5495
|
+
6. **Prefer built-in over third-party.** Check Node 22+ native APIs first:
|
|
5496
|
+
node:test, node:sqlite, fetch, WebSocket, Web Crypto \u2014 all built-in.
|
|
5497
|
+
|
|
5498
|
+
## Workflow (single-shot \u2014 do NOT loop)
|
|
5499
|
+
|
|
5500
|
+
1. Receive the proposed package + version
|
|
5501
|
+
2. Search npm registry or web for the latest version
|
|
5502
|
+
3. Check age, maintenance status, deprecation
|
|
5503
|
+
4. Output verdict: APPROVED (with exact version) or REJECTED (with replacement)
|
|
5504
|
+
|
|
5505
|
+
## Output format
|
|
5506
|
+
|
|
5507
|
+
### Tech Stack Validation \u2014 <package>
|
|
5508
|
+
|
|
5509
|
+
**Status**: APPROVED | REJECTED
|
|
5510
|
+
|
|
5511
|
+
**Package**: <name>@<version>
|
|
5512
|
+
**Source**: <URL you checked \u2014 npm registry, GitHub, web search>
|
|
5513
|
+
**Age**: <first release> \u2014 <last release date>
|
|
5514
|
+
**Verdict**: 1\u20132 sentence explanation.
|
|
5515
|
+
|
|
5516
|
+
When REJECTED on age:
|
|
5517
|
+
**"This isn't code, this is X-year-old technology."**
|
|
5518
|
+
**Replaced by**: <modern alternative>
|
|
5519
|
+
**Migration**: <one concrete step>
|
|
5520
|
+
|
|
5521
|
+
When APPROVED:
|
|
5522
|
+
**Install**: pnpm add <name>@^<major>.<minor>.0`
|
|
5523
|
+
},
|
|
5524
|
+
budget: {
|
|
5525
|
+
timeoutMs: 6e4,
|
|
5526
|
+
maxIterations: 5,
|
|
5527
|
+
maxToolCalls: 20,
|
|
5528
|
+
maxTokens: 4e4,
|
|
5529
|
+
maxCostUsd: 0.1
|
|
5530
|
+
},
|
|
5531
|
+
capability: {
|
|
5532
|
+
phase: "meta",
|
|
5533
|
+
summary: "Single-shot tech stack validator: checks npm for latest versions, rejects dead/obsolete packages, enforces modern alternatives.",
|
|
5534
|
+
keywords: [
|
|
5535
|
+
"tech stack",
|
|
5536
|
+
"version",
|
|
5537
|
+
"package",
|
|
5538
|
+
"library",
|
|
5539
|
+
"framework",
|
|
5540
|
+
"dependency",
|
|
5541
|
+
"install",
|
|
5542
|
+
"upgrade",
|
|
5543
|
+
"latest",
|
|
5544
|
+
"npm",
|
|
5545
|
+
"pnpm add",
|
|
5546
|
+
"outdated",
|
|
5547
|
+
"obsolete",
|
|
5548
|
+
"deprecated",
|
|
5549
|
+
"what version",
|
|
5550
|
+
"which package",
|
|
5551
|
+
"check version",
|
|
5552
|
+
"verify version",
|
|
5553
|
+
"is this current"
|
|
5554
|
+
]
|
|
5555
|
+
}
|
|
5453
5556
|
}
|
|
5454
5557
|
];
|
|
5455
5558
|
|
|
@@ -6365,14 +6468,17 @@ var SddParallelRun = class {
|
|
|
6365
6468
|
this.opts = opts;
|
|
6366
6469
|
this.slots = Math.min(16, Math.max(1, opts.parallelSlots ?? 4));
|
|
6367
6470
|
this.timeoutMs = opts.taskTimeoutMs ?? 3e5;
|
|
6471
|
+
this.maxRetries = Math.max(0, opts.maxRetries ?? 2);
|
|
6368
6472
|
this.decomposer = new SddTaskDecomposer(opts.tracker, opts.graph, { parallelSlots: this.slots });
|
|
6369
6473
|
}
|
|
6370
6474
|
opts;
|
|
6371
6475
|
slots;
|
|
6372
6476
|
timeoutMs;
|
|
6477
|
+
maxRetries;
|
|
6373
6478
|
decomposer;
|
|
6374
6479
|
coordinator = null;
|
|
6375
6480
|
stopRequested = false;
|
|
6481
|
+
retryMap = /* @__PURE__ */ new Map();
|
|
6376
6482
|
// -------------------------------------------------------------------
|
|
6377
6483
|
// Public API
|
|
6378
6484
|
// -------------------------------------------------------------------
|
|
@@ -6384,6 +6490,7 @@ var SddParallelRun = class {
|
|
|
6384
6490
|
/** Execute all waves until completion or deadlock. Returns final summary. */
|
|
6385
6491
|
async run() {
|
|
6386
6492
|
this.stopRequested = false;
|
|
6493
|
+
this.retryMap.clear();
|
|
6387
6494
|
const startTime = Date.now();
|
|
6388
6495
|
let totalCompleted = 0;
|
|
6389
6496
|
let totalFailed = 0;
|
|
@@ -6512,9 +6619,20 @@ var SddParallelRun = class {
|
|
|
6512
6619
|
const taskId = expectDefined(taskIds[i]);
|
|
6513
6620
|
if (result.status === "success") {
|
|
6514
6621
|
this.opts.tracker.updateNodeStatus(taskId, "completed");
|
|
6622
|
+
this.retryMap.delete(taskId);
|
|
6515
6623
|
} else {
|
|
6516
6624
|
const errMsg = result.error?.kind ? `${result.error.kind}: ${result.error.message}` : result.error?.message ?? "unknown error";
|
|
6517
|
-
this.
|
|
6625
|
+
const currentRetries = this.retryMap.get(taskId) ?? 0;
|
|
6626
|
+
if (currentRetries < this.maxRetries) {
|
|
6627
|
+
this.retryMap.set(taskId, currentRetries + 1);
|
|
6628
|
+
this.opts.tracker.updateNodeStatus(
|
|
6629
|
+
taskId,
|
|
6630
|
+
"pending",
|
|
6631
|
+
`Retry ${currentRetries + 1}/${this.maxRetries}: ${errMsg}`
|
|
6632
|
+
);
|
|
6633
|
+
} else {
|
|
6634
|
+
this.opts.tracker.updateNodeStatus(taskId, "failed", errMsg);
|
|
6635
|
+
}
|
|
6518
6636
|
}
|
|
6519
6637
|
}
|
|
6520
6638
|
return {
|
|
@@ -6529,6 +6647,7 @@ var SddParallelRun = class {
|
|
|
6529
6647
|
}
|
|
6530
6648
|
buildProgress() {
|
|
6531
6649
|
const gp = this.opts.tracker.getProgress();
|
|
6650
|
+
const isDeadlocked = !this.decomposer.isDone() && this.decomposer.nextBatch().deadlocked;
|
|
6532
6651
|
return {
|
|
6533
6652
|
wave: this.decomposer.getWaveCount(),
|
|
6534
6653
|
total: gp.total,
|
|
@@ -6538,7 +6657,7 @@ var SddParallelRun = class {
|
|
|
6538
6657
|
blocked: gp.blocked,
|
|
6539
6658
|
pending: gp.pending,
|
|
6540
6659
|
percent: gp.percentComplete,
|
|
6541
|
-
deadlocked:
|
|
6660
|
+
deadlocked: isDeadlocked
|
|
6542
6661
|
};
|
|
6543
6662
|
}
|
|
6544
6663
|
};
|