@wrongstack/core 0.273.0 → 0.274.0
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-BZ2enORi.d.ts → agent-bridge-DFo21wmY.d.ts} +1 -1
- package/dist/{agent-subagent-runner-ehb4xGvd.d.ts → agent-subagent-runner-BwmkIDEd.d.ts} +7 -7
- package/dist/{brain-BxN2k2HP.d.ts → brain-gfZX3the.d.ts} +11 -5
- package/dist/{provider-model-resolve-DFd3IPpw.d.ts → codex-catalog-CooZ6mOl.d.ts} +47 -4
- package/dist/{compactor-72ug-ZRB.d.ts → compactor-riTOds0f.d.ts} +1 -1
- package/dist/{config-C8IYxlO8.d.ts → config-BxcrDzri.d.ts} +60 -4
- package/dist/{context-Dw55zZ_Q.d.ts → context-DERiLofu.d.ts} +60 -1
- package/dist/coordination/index.d.ts +27 -16
- package/dist/coordination/index.js +1641 -1398
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -26
- package/dist/defaults/index.js +2154 -1466
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +15 -15
- package/dist/execution/index.js +77 -9
- 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-C9dsc9Y_.d.ts → global-mailbox-Cr8TW4t_.d.ts} +1 -1
- package/dist/{goal-preamble-NhflDjYb.d.ts → goal-preamble-CEhROp1e.d.ts} +9 -9
- package/dist/{goal-store-Cx363x7Z.d.ts → goal-store-xNSVxmpV.d.ts} +1 -1
- package/dist/hq/index.d.ts +5 -5
- package/dist/{index-B7fHDt0B.d.ts → index-00KPKAlm.d.ts} +5 -5
- package/dist/{index-BbVprU-9.d.ts → index-pDBSBE1r.d.ts} +2 -2
- package/dist/index.d.ts +72 -45
- package/dist/index.js +2840 -1769
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +11 -11
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-B6fSRNC1.d.ts → mcp-servers-BIwRiOxe.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +40 -2
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-4C6Wr91w.d.ts → models-registry-8OorW51H.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-q1skFeNP.d.ts → multi-agent-coordinator-CNx48Zoz.d.ts} +1 -1
- package/dist/{null-fleet-bus-C9rrgQwc.d.ts → null-fleet-bus-B4ZUJYL6.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-CtXly2Sf.d.ts → parallel-eternal-engine-rsIclDqO.d.ts} +9 -9
- package/dist/{path-resolver-Bim6G5Jz.d.ts → path-resolver-BqU-fwzD.d.ts} +3 -3
- package/dist/{permission-CC7XFYWG.d.ts → permission-Dgs3v-Xq.d.ts} +1 -1
- package/dist/{permission-policy-cYR4RJmw.d.ts → permission-policy-Dtht2k0e.d.ts} +2 -2
- package/dist/{pipeline-CNVKuQDQ.d.ts → pipeline-B-dpCFYS.d.ts} +2 -2
- package/dist/{plan-templates-C4wXMmiM.d.ts → plan-templates-B7MxyY2o.d.ts} +58 -5
- package/dist/{provider-runner-BpM0mdBE.d.ts → provider-runner-DrmpBE5l.d.ts} +3 -3
- package/dist/{retry-policy-BV7nzeAd.d.ts → retry-policy-hYxsm10a.d.ts} +1 -1
- package/dist/sdd/index.d.ts +12 -10
- package/dist/sdd/index.js +7 -0
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-eMBKfheR.d.ts → secret-vault-DnqIFhPF.d.ts} +1 -1
- package/dist/security/index.d.ts +5 -5
- package/dist/{selector-C4ORTOid.d.ts → selector-D21RjDIg.d.ts} +1 -1
- package/dist/{session-event-bridge-CeNpUL9w.d.ts → session-event-bridge-Dt54CTvq.d.ts} +1 -1
- package/dist/{session-reader-BepLSnGL.d.ts → session-reader-CceH13Kq.d.ts} +5 -4
- package/dist/storage/index.d.ts +46 -12
- package/dist/storage/index.js +2281 -1476
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/types/index.d.ts +19 -19
- package/dist/types/index.js +162 -42
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/{worktree-manager-BDuXTaWL.d.ts → worktree-manager-DUfBbKzk.d.ts} +1 -1
- 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-rsIclDqO.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-CEhROp1e.js';
|
|
3
|
+
import { P as Provider, a as ReasoningConfig, n as Capabilities, c as Request } from '../context-DERiLofu.js';
|
|
4
|
+
import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../brain-gfZX3the.js';
|
|
5
|
+
import { K as ModelRuntimeConfig } from '../config-BxcrDzri.js';
|
|
6
|
+
import '../retry-policy-hYxsm10a.js';
|
|
7
|
+
import '../compactor-riTOds0f.js';
|
|
8
|
+
import '../index-00KPKAlm.js';
|
|
9
9
|
import '../logger-B63L5bTg.js';
|
|
10
|
-
import '../pipeline-
|
|
10
|
+
import '../pipeline-B-dpCFYS.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-Dgs3v-Xq.js';
|
|
14
|
+
import '../agent-subagent-runner-BwmkIDEd.js';
|
|
15
|
+
import '../goal-store-xNSVxmpV.js';
|
|
16
|
+
import '../multi-agent-coordinator-CNx48Zoz.js';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import '../skill-DGIXCtdv.js';
|
|
19
19
|
import '../wstack-paths-BqkDAkoh.js';
|
|
20
|
-
import '../selector-
|
|
21
|
-
import '../session-event-bridge-
|
|
20
|
+
import '../selector-D21RjDIg.js';
|
|
21
|
+
import '../session-event-bridge-Dt54CTvq.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* AutonomyBrain — a self-driving decision layer for autonomous workflows.
|
package/dist/execution/index.js
CHANGED
|
@@ -2568,14 +2568,53 @@ var ERROR_CODES = {
|
|
|
2568
2568
|
PROVIDER_INVALID_REQUEST: "PROVIDER_INVALID_REQUEST",
|
|
2569
2569
|
PROVIDER_SERVER_ERROR: "PROVIDER_SERVER_ERROR",
|
|
2570
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",
|
|
2571
2587
|
// Agent
|
|
2572
2588
|
AGENT_ITERATION_LIMIT: "AGENT_ITERATION_LIMIT",
|
|
2573
2589
|
AGENT_CONTEXT_OVERFLOW: "AGENT_CONTEXT_OVERFLOW",
|
|
2574
2590
|
AGENT_ABORTED: "AGENT_ABORTED",
|
|
2575
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",
|
|
2576
2603
|
// File system
|
|
2577
2604
|
FS_READ_FAILED: "FS_READ_FAILED",
|
|
2578
|
-
|
|
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
|
+
};
|
|
2579
2618
|
var WrongStackError = class extends Error {
|
|
2580
2619
|
code;
|
|
2581
2620
|
subsystem;
|
|
@@ -2788,6 +2827,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2788
2827
|
level,
|
|
2789
2828
|
tokens,
|
|
2790
2829
|
load,
|
|
2830
|
+
hardThreshold: adaptiveThresholds.hard,
|
|
2791
2831
|
budget,
|
|
2792
2832
|
signals: { repeatedReadCount: repetition }
|
|
2793
2833
|
});
|
|
@@ -2835,6 +2875,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2835
2875
|
}
|
|
2836
2876
|
}
|
|
2837
2877
|
async compact(ctx, aggressive, pressure) {
|
|
2878
|
+
let postCompactionOverflow = null;
|
|
2838
2879
|
try {
|
|
2839
2880
|
const report = await this.compactor.compact(ctx, { aggressive });
|
|
2840
2881
|
this.recordAttempt(pressure.level, pressure.tokens, report);
|
|
@@ -2864,6 +2905,38 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2864
2905
|
...report.collapsedDigest ? { digest: truncateDigest(report.collapsedDigest) } : {}
|
|
2865
2906
|
});
|
|
2866
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
|
+
}
|
|
2867
2940
|
} catch (err) {
|
|
2868
2941
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
2869
2942
|
const fatal = this.failureMode === "throw" || this.failureMode === "throw_on_hard" && pressure.level === "hard";
|
|
@@ -2892,6 +2965,7 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
2892
2965
|
});
|
|
2893
2966
|
}
|
|
2894
2967
|
}
|
|
2968
|
+
if (postCompactionOverflow) throw postCompactionOverflow;
|
|
2895
2969
|
}
|
|
2896
2970
|
};
|
|
2897
2971
|
function computeContextWindowBudget(ctx, inputTokens, maxContext) {
|
|
@@ -3106,7 +3180,7 @@ ${errorDetails}`,
|
|
|
3106
3180
|
"tool.name": tool.name,
|
|
3107
3181
|
"tool.mutating": tool.mutating,
|
|
3108
3182
|
"tool.permission": tool.permission,
|
|
3109
|
-
"tool.capabilities": JSON.stringify(tool.capabilities ?? []),
|
|
3183
|
+
"tool.capabilities": toolCapsForAudit.length > 0 ? JSON.stringify(tool.capabilities ?? []) : "[]",
|
|
3110
3184
|
"tool.has_dangerous_capabilities": toolCapsForAudit.length > 0
|
|
3111
3185
|
});
|
|
3112
3186
|
try {
|
|
@@ -10094,13 +10168,9 @@ function resolveReasoningForRequest(settings, rc, warnings) {
|
|
|
10094
10168
|
);
|
|
10095
10169
|
} else if (capKnown && rc && !rc.disableSupported) {
|
|
10096
10170
|
warnings.push('reasoning "off" requested, but this model does not support disabling thinking; the setting was omitted.');
|
|
10097
|
-
} else {
|
|
10098
|
-
warnings.push('reasoning "off" requested, but model capabilities are unknown; the setting was omitted.');
|
|
10099
10171
|
}
|
|
10100
10172
|
} else if (cfg.mode === "on") {
|
|
10101
|
-
if (!capKnown) {
|
|
10102
|
-
warnings.push('reasoning "on" requested, but model capabilities are unknown; the setting was omitted.');
|
|
10103
|
-
} else if (!supportsReasoning && rc?.default === "disabled") {
|
|
10173
|
+
if (!capKnown) ; else if (!supportsReasoning && rc?.default === "disabled") {
|
|
10104
10174
|
warnings.push('reasoning "on" requested, but this model has reasoning disabled by default and does not advertise support; the setting was omitted.');
|
|
10105
10175
|
} else {
|
|
10106
10176
|
out.enabled = true;
|
|
@@ -10116,8 +10186,6 @@ function resolveReasoningForRequest(settings, rc, warnings) {
|
|
|
10116
10186
|
);
|
|
10117
10187
|
} else if (capKnown) {
|
|
10118
10188
|
warnings.push(`reasoning effort "${effort}" requested, but this model does not support effort; the setting was omitted.`);
|
|
10119
|
-
} else {
|
|
10120
|
-
warnings.push(`reasoning effort "${effort}" requested, but model capabilities are unknown; the setting was omitted.`);
|
|
10121
10189
|
}
|
|
10122
10190
|
}
|
|
10123
10191
|
if (cfg.preserve !== void 0) {
|