@wrongstack/core 0.272.2 → 0.273.1
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-DFQYEeXf.d.ts → agent-bridge-DpKIxHhE.d.ts} +1 -1
- package/dist/{agent-subagent-runner-BZa_IEcd.d.ts → agent-subagent-runner-Dx7fZ1bE.d.ts} +14 -7
- package/dist/{brain-etbcbRwV.d.ts → brain-BDcQaku-.d.ts} +112 -5
- package/dist/{compactor-72ug-ZRB.d.ts → compactor-BuSdj3fq.d.ts} +1 -1
- package/dist/{config-rRS8yorV.d.ts → config-CR2yoG8c.d.ts} +61 -4
- package/dist/{context-Dw55zZ_Q.d.ts → context-DulAr8Zo.d.ts} +24 -0
- package/dist/coordination/index.d.ts +23 -16
- package/dist/coordination/index.js +192 -38
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-B0cj-Hry.d.ts → default-config-BbX4ojZs.d.ts} +1 -0
- package/dist/defaults/index.d.ts +29 -28
- package/dist/defaults/index.js +3238 -234
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +16 -16
- package/dist/execution/index.js +83 -3
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{global-mailbox-DJ4EoRr0.d.ts → global-mailbox-CwcubDkA.d.ts} +1 -1
- package/dist/{goal-preamble-hM8BH7TK.d.ts → goal-preamble-Bu0a2uCG.d.ts} +10 -10
- package/dist/{goal-store-CWlbT0TO.d.ts → goal-store-CTmFuZ8J.d.ts} +1 -1
- package/dist/hq/index.d.ts +5 -5
- package/dist/hq/index.js +1 -0
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-DWm_PE9L.d.ts → index-CTq5wU3m.d.ts} +14 -6
- package/dist/{index-2Lhk5v0o.d.ts → index-CxP-HBhX.d.ts} +8 -2
- package/dist/index.d.ts +230 -48
- package/dist/index.js +3731 -648
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +94 -14
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-BpWHTKlE.d.ts → mcp-servers-BQaOE71z.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/{models-registry-CXQFUn5t.d.ts → models-registry-BEcny4kP.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-jyimfo7D.d.ts → multi-agent-coordinator-Bx8EFkv2.d.ts} +1 -1
- package/dist/{null-fleet-bus-DOGQcvrY.d.ts → null-fleet-bus-BC5ZXCQw.d.ts} +16 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-rItJBYp9.d.ts → parallel-eternal-engine-C345TI3n.d.ts} +10 -9
- package/dist/{path-resolver-DrpF5MGK.d.ts → path-resolver-C-W_wzkF.d.ts} +3 -3
- package/dist/{permission-CC7XFYWG.d.ts → permission-CsBGZkxp.d.ts} +1 -1
- package/dist/{permission-policy-cYR4RJmw.d.ts → permission-policy-g3Sg0GdZ.d.ts} +2 -2
- package/dist/{pipeline-Ckkn3AOA.d.ts → pipeline-xnw_24Z8.d.ts} +2 -2
- package/dist/{plan-templates-BvHw5Znw.d.ts → plan-templates-DGaiYEcS.d.ts} +32 -6
- package/dist/{provider-model-resolve-nZqnCeaR.d.ts → provider-model-resolve-Cz6OlIOp.d.ts} +3 -3
- package/dist/{provider-runner-zVOn1p67.d.ts → provider-runner-7J0HqF6B.d.ts} +3 -3
- package/dist/{retry-policy-BV7nzeAd.d.ts → retry-policy-kqXJOVkX.d.ts} +1 -1
- package/dist/sdd/index.d.ts +1114 -14
- package/dist/sdd/index.js +5516 -2949
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-eMBKfheR.d.ts → secret-vault-CMQUr-eB.d.ts} +1 -1
- package/dist/security/index.d.ts +5 -5
- package/dist/security/index.js +6 -0
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-C4ORTOid.d.ts → selector-B4r34PWR.d.ts} +1 -1
- package/dist/{session-event-bridge-CeNpUL9w.d.ts → session-event-bridge-BD3LoyLC.d.ts} +1 -1
- package/dist/{session-reader-BepLSnGL.d.ts → session-reader-DjrKGD9c.d.ts} +1 -1
- package/dist/storage/index.d.ts +12 -12
- package/dist/storage/index.js +380 -13
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +20 -20
- package/dist/types/index.js +31 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +30 -4
- package/dist/utils/index.js +110 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{index-DqW4o62H.d.ts → worktree-manager-DHdrWQ_7.d.ts} +48 -90
- package/dist/{wstack-paths-hOpNLmvf.d.ts → wstack-paths-BqkDAkoh.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-
|
|
2
|
-
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, l as ContextWindowBudgetSnapshot, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-
|
|
3
|
-
import { P as Provider, a as ReasoningConfig, n as Capabilities, c as Request } from '../context-
|
|
4
|
-
import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../brain-
|
|
5
|
-
import {
|
|
6
|
-
import '../retry-policy-
|
|
7
|
-
import '../compactor-
|
|
8
|
-
import '../index-
|
|
1
|
+
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-C345TI3n.js';
|
|
2
|
+
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, l as ContextWindowBudgetSnapshot, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-Bu0a2uCG.js';
|
|
3
|
+
import { P as Provider, a as ReasoningConfig, n as Capabilities, c as Request } from '../context-DulAr8Zo.js';
|
|
4
|
+
import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../brain-BDcQaku-.js';
|
|
5
|
+
import { K as ModelRuntimeConfig } from '../config-CR2yoG8c.js';
|
|
6
|
+
import '../retry-policy-kqXJOVkX.js';
|
|
7
|
+
import '../compactor-BuSdj3fq.js';
|
|
8
|
+
import '../index-CTq5wU3m.js';
|
|
9
9
|
import '../logger-B63L5bTg.js';
|
|
10
|
-
import '../pipeline-
|
|
10
|
+
import '../pipeline-xnw_24Z8.js';
|
|
11
11
|
import '../mailbox-types-Ct2hJq0P.js';
|
|
12
12
|
import '../observability-D-HZN_mF.js';
|
|
13
|
-
import '../permission-
|
|
14
|
-
import '../agent-subagent-runner-
|
|
15
|
-
import '../goal-store-
|
|
16
|
-
import '../multi-agent-coordinator-
|
|
13
|
+
import '../permission-CsBGZkxp.js';
|
|
14
|
+
import '../agent-subagent-runner-Dx7fZ1bE.js';
|
|
15
|
+
import '../goal-store-CTmFuZ8J.js';
|
|
16
|
+
import '../multi-agent-coordinator-Bx8EFkv2.js';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '../skill-DGIXCtdv.js';
|
|
19
|
-
import '../wstack-paths-
|
|
20
|
-
import '../selector-
|
|
21
|
-
import '../session-event-bridge-
|
|
19
|
+
import '../wstack-paths-BqkDAkoh.js';
|
|
20
|
+
import '../selector-B4r34PWR.js';
|
|
21
|
+
import '../session-event-bridge-BD3LoyLC.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* AutonomyBrain — a self-driving decision layer for autonomous workflows.
|
package/dist/execution/index.js
CHANGED
|
@@ -2553,6 +2553,7 @@ function resolveWstackPaths(opts) {
|
|
|
2553
2553
|
projectSddSession: path3.join(projectDir, "sdd-session.json"),
|
|
2554
2554
|
projectPlan: path3.join(projectDir, "plan.json"),
|
|
2555
2555
|
projectAutophase: path3.join(projectDir, "autophase"),
|
|
2556
|
+
projectSddBoards: path3.join(projectDir, "sdd-boards"),
|
|
2556
2557
|
syncConfig: path3.join(globalRoot, "sync.json"),
|
|
2557
2558
|
projectStatus: (projectHash2) => path3.join(globalRoot, "projects", projectHash2, "status.json")
|
|
2558
2559
|
};
|
|
@@ -2567,14 +2568,53 @@ var ERROR_CODES = {
|
|
|
2567
2568
|
PROVIDER_INVALID_REQUEST: "PROVIDER_INVALID_REQUEST",
|
|
2568
2569
|
PROVIDER_SERVER_ERROR: "PROVIDER_SERVER_ERROR",
|
|
2569
2570
|
PROVIDER_NETWORK_ERROR: "PROVIDER_NETWORK_ERROR",
|
|
2571
|
+
PROVIDER_CONTEXT_OVERFLOW: "PROVIDER_CONTEXT_OVERFLOW",
|
|
2572
|
+
// Tool
|
|
2573
|
+
TOOL_NOT_FOUND: "TOOL_NOT_FOUND",
|
|
2574
|
+
TOOL_PERMISSION_DENIED: "TOOL_PERMISSION_DENIED",
|
|
2575
|
+
TOOL_EXECUTION_FAILED: "TOOL_EXECUTION_FAILED",
|
|
2576
|
+
TOOL_TIMEOUT: "TOOL_TIMEOUT",
|
|
2577
|
+
TOOL_INPUT_INVALID: "TOOL_INPUT_INVALID",
|
|
2578
|
+
// Config
|
|
2579
|
+
CONFIG_INVALID: "CONFIG_INVALID",
|
|
2580
|
+
CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND",
|
|
2581
|
+
CONFIG_PARSE_FAILED: "CONFIG_PARSE_FAILED",
|
|
2582
|
+
CONFIG_MIGRATION_NEEDED: "CONFIG_MIGRATION_NEEDED",
|
|
2583
|
+
// Plugin
|
|
2584
|
+
PLUGIN_LOAD_FAILED: "PLUGIN_LOAD_FAILED",
|
|
2585
|
+
PLUGIN_API_MISMATCH: "PLUGIN_API_MISMATCH",
|
|
2586
|
+
PLUGIN_MISSING_DEPENDENCY: "PLUGIN_MISSING_DEPENDENCY",
|
|
2570
2587
|
// Agent
|
|
2571
2588
|
AGENT_ITERATION_LIMIT: "AGENT_ITERATION_LIMIT",
|
|
2572
2589
|
AGENT_CONTEXT_OVERFLOW: "AGENT_CONTEXT_OVERFLOW",
|
|
2573
2590
|
AGENT_ABORTED: "AGENT_ABORTED",
|
|
2574
2591
|
AGENT_RUN_FAILED: "AGENT_RUN_FAILED",
|
|
2592
|
+
// Session
|
|
2593
|
+
SESSION_NOT_FOUND: "SESSION_NOT_FOUND",
|
|
2594
|
+
SESSION_CORRUPTED: "SESSION_CORRUPTED",
|
|
2595
|
+
SESSION_WRITE_FAILED: "SESSION_WRITE_FAILED",
|
|
2596
|
+
// Container / Registry
|
|
2597
|
+
CONTAINER_TOKEN_ALREADY_BOUND: "CONTAINER_TOKEN_ALREADY_BOUND",
|
|
2598
|
+
CONTAINER_TOKEN_NOT_BOUND: "CONTAINER_TOKEN_NOT_BOUND",
|
|
2599
|
+
CONTAINER_CIRCULAR_DEPENDENCY: "CONTAINER_CIRCULAR_DEPENDENCY",
|
|
2600
|
+
REGISTRY_DUPLICATE: "REGISTRY_DUPLICATE",
|
|
2601
|
+
REGISTRY_NOT_FOUND: "REGISTRY_NOT_FOUND",
|
|
2602
|
+
REGISTRY_INVALID: "REGISTRY_INVALID",
|
|
2575
2603
|
// File system
|
|
2576
2604
|
FS_READ_FAILED: "FS_READ_FAILED",
|
|
2577
|
-
|
|
2605
|
+
FS_WRITE_FAILED: "FS_WRITE_FAILED",
|
|
2606
|
+
FS_MKDIR_FAILED: "FS_MKDIR_FAILED",
|
|
2607
|
+
FS_DELETE_FAILED: "FS_DELETE_FAILED",
|
|
2608
|
+
FS_ATOMIC_WRITE_FAILED: "FS_ATOMIC_WRITE_FAILED",
|
|
2609
|
+
// SDD (Spec-Driven Development)
|
|
2610
|
+
SDD_VALIDATION_FAILED: "SDD_VALIDATION_FAILED",
|
|
2611
|
+
SDD_PARSE_FAILED: "SDD_PARSE_FAILED",
|
|
2612
|
+
SDD_INVALID_STATE: "SDD_INVALID_STATE",
|
|
2613
|
+
SDD_NOT_READY: "SDD_NOT_READY",
|
|
2614
|
+
// General
|
|
2615
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
2616
|
+
UNKNOWN: "UNKNOWN"
|
|
2617
|
+
};
|
|
2578
2618
|
var WrongStackError = class extends Error {
|
|
2579
2619
|
code;
|
|
2580
2620
|
subsystem;
|
|
@@ -2787,6 +2827,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2787
2827
|
level,
|
|
2788
2828
|
tokens,
|
|
2789
2829
|
load,
|
|
2830
|
+
hardThreshold: adaptiveThresholds.hard,
|
|
2790
2831
|
budget,
|
|
2791
2832
|
signals: { repeatedReadCount: repetition }
|
|
2792
2833
|
});
|
|
@@ -2834,6 +2875,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2834
2875
|
}
|
|
2835
2876
|
}
|
|
2836
2877
|
async compact(ctx, aggressive, pressure) {
|
|
2878
|
+
let postCompactionOverflow = null;
|
|
2837
2879
|
try {
|
|
2838
2880
|
const report = await this.compactor.compact(ctx, { aggressive });
|
|
2839
2881
|
this.recordAttempt(pressure.level, pressure.tokens, report);
|
|
@@ -2863,6 +2905,38 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2863
2905
|
...report.collapsedDigest ? { digest: truncateDigest(report.collapsedDigest) } : {}
|
|
2864
2906
|
});
|
|
2865
2907
|
ctx.clearFileTracking();
|
|
2908
|
+
const afterTokens = report.fullRequestTokensAfter ?? report.after;
|
|
2909
|
+
const afterLoad = this._maxContext > 0 ? afterTokens / this._maxContext : 0;
|
|
2910
|
+
const stillHard = afterLoad >= pressure.hardThreshold;
|
|
2911
|
+
const fatal = stillHard && (this.failureMode === "throw" || this.failureMode === "throw_on_hard" && pressure.level === "hard");
|
|
2912
|
+
if (stillHard) {
|
|
2913
|
+
const error = new Error(
|
|
2914
|
+
`Auto-compaction left context above the hard threshold after ${pressure.level} compaction`
|
|
2915
|
+
);
|
|
2916
|
+
this.events?.emit("compaction.failed", {
|
|
2917
|
+
err: error,
|
|
2918
|
+
aggressive,
|
|
2919
|
+
level: pressure.level,
|
|
2920
|
+
tokens: afterTokens,
|
|
2921
|
+
maxContext: this._maxContext,
|
|
2922
|
+
budget: computeContextWindowBudget(ctx, afterTokens, this._maxContext),
|
|
2923
|
+
signals: pressure.signals,
|
|
2924
|
+
load: afterLoad,
|
|
2925
|
+
fatal
|
|
2926
|
+
});
|
|
2927
|
+
if (fatal) {
|
|
2928
|
+
postCompactionOverflow = new AgentError({
|
|
2929
|
+
message: `Auto-compaction did not reduce context below hard threshold`,
|
|
2930
|
+
code: ERROR_CODES.AGENT_CONTEXT_OVERFLOW,
|
|
2931
|
+
recoverable: true,
|
|
2932
|
+
context: {
|
|
2933
|
+
level: pressure.level,
|
|
2934
|
+
tokens: afterTokens,
|
|
2935
|
+
maxContext: this._maxContext
|
|
2936
|
+
}
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2866
2940
|
} catch (err) {
|
|
2867
2941
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
2868
2942
|
const fatal = this.failureMode === "throw" || this.failureMode === "throw_on_hard" && pressure.level === "hard";
|
|
@@ -2891,6 +2965,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2891
2965
|
});
|
|
2892
2966
|
}
|
|
2893
2967
|
}
|
|
2968
|
+
if (postCompactionOverflow) throw postCompactionOverflow;
|
|
2894
2969
|
}
|
|
2895
2970
|
};
|
|
2896
2971
|
function computeContextWindowBudget(ctx, inputTokens, maxContext) {
|
|
@@ -8208,8 +8283,13 @@ var FLEET_ROSTER_BUDGETS = {
|
|
|
8208
8283
|
"refactor-planner": { timeoutMs: 7.5 * 60 * 60 * 1e3, maxIterations: 6e3, maxToolCalls: 18e3 },
|
|
8209
8284
|
"security-scanner": { timeoutMs: 10 * 60 * 60 * 1e3, maxIterations: 8e3, maxToolCalls: 2e4 },
|
|
8210
8285
|
"critic": { timeoutMs: 5 * 60 * 60 * 1e3, maxIterations: 4e3, maxToolCalls: 12e3 },
|
|
8211
|
-
"shadow-agent": {
|
|
8212
|
-
|
|
8286
|
+
"shadow-agent": {
|
|
8287
|
+
idleTimeoutMs: DEFAULT_IDLE_TIMEOUT_MS,
|
|
8288
|
+
maxIterations: 2e3,
|
|
8289
|
+
maxToolCalls: 5e3,
|
|
8290
|
+
maxTokens: 6e4,
|
|
8291
|
+
maxCostUsd: 1
|
|
8292
|
+
},
|
|
8213
8293
|
...Object.fromEntries(
|
|
8214
8294
|
ALL_AGENT_DEFINITIONS.map((d) => [d.config.role, d.budget])
|
|
8215
8295
|
)
|