@wrongstack/core 0.6.0 → 0.6.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-BKNiE1VH.d.ts → agent-bridge-DaCvA_uK.d.ts} +1 -1
- package/dist/coordination/index.d.ts +5 -5
- package/dist/coordination/index.js +178 -54
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +10 -10
- package/dist/defaults/index.js +534 -75
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-DPQKFX7W.d.ts → events-CzkeaVVl.d.ts} +8 -2
- package/dist/execution/index.d.ts +149 -6
- package/dist/execution/index.js +345 -16
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +2 -2
- package/dist/{goal-store-BQ3YX1h1.d.ts → goal-store-DVCfj7Ff.d.ts} +20 -0
- package/dist/{index-B0qTujQW.d.ts → index-BkKLQjea.d.ts} +1 -1
- package/dist/{index-DkdRz6yK.d.ts → index-i9rPR53g.d.ts} +11 -4
- package/dist/index.d.ts +50 -16
- package/dist/index.js +769 -86
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +2 -2
- package/dist/kernel/index.d.ts +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/{multi-agent-Cpp7FXUl.d.ts → multi-agent-MfI6dmv-.d.ts} +30 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{path-resolver--g_hKJ7V.d.ts → path-resolver-CWINz5XR.d.ts} +1 -1
- package/dist/{plan-templates-CKJs_sYh.d.ts → plan-templates-Bne1pB4d.d.ts} +1 -1
- package/dist/{provider-runner-hl4Il3xS.d.ts → provider-runner-CZYIzeBp.d.ts} +1 -1
- package/dist/sdd/index.d.ts +2 -2
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +3 -0
- package/dist/storage/index.js.map +1 -1
- package/dist/{tool-executor-B03CRwu-.d.ts → tool-executor-40Q6shR-.d.ts} +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +16 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +5 -1
|
@@ -2,7 +2,7 @@ import { a2 as Context, h as ProviderError, v as Tool, G as ToolUseBlock, B as T
|
|
|
2
2
|
import { a as Compactor, C as CompactReport } from './compactor-RIPuTtWK.js';
|
|
3
3
|
import { a as RecoveryDecision, E as ErrorHandler, R as RetryPolicy } from './retry-policy-LKS8MHsB.js';
|
|
4
4
|
import { M as ModelsRegistry } from './models-registry-Y2xbog0E.js';
|
|
5
|
-
import { k as ToolExecutorOptions, l as ToolExecutorStrategy, m as ToolBatchResult } from './index-
|
|
5
|
+
import { k as ToolExecutorOptions, l as ToolExecutorStrategy, m as ToolBatchResult } from './index-BkKLQjea.js';
|
|
6
6
|
|
|
7
7
|
interface CompactorOptions {
|
|
8
8
|
preserveK?: number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AgentError, C as Capabilities, a as ConfigError, b as ContentBlock, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, F as FileSnapshot, I as ImageBlock, J as JSONSchema, M as Message, e as MessageRole, P as Permission, f as PluginError, g as Provider, h as ProviderError, i as ProviderErrorBody, R as Request, j as Response, k as ResumedSession, l as RiskTier, S as SessionData, m as SessionError, n as SessionEvent, o as SessionMetadata, p as SessionStore, q as SessionSummary, r as SessionWriter, s as StopReason, t as StreamEvent, T as TextBlock, u as ThinkingBlock, v as Tool, w as ToolCallContext, x as ToolError, y as ToolFinalEvent, z as ToolProgressEvent, B as ToolResultBlock, D as ToolStreamEvent, G as ToolUseBlock, U as Usage, W as WrongStackError, H as asBlocks, K as asText, L as isAgentError, N as isConfigError, O as isImageBlock, Q as isPluginError, V as isSessionError, X as isTextBlock, Y as isThinkingBlock, Z as isToolError, _ as isToolResultBlock, $ as isToolUseBlock, a0 as isWrongStackError, a1 as toWrongStackError } from '../context-CDRyrkKQ.js';
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-CZYIzeBp.js';
|
|
3
3
|
export { C as CONTEXT_WINDOW_MODES, a as Config, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from '../config-BGGuP_Ar.js';
|
|
4
4
|
export { C as CompactReport, a as Compactor } from '../compactor-RIPuTtWK.js';
|
|
5
5
|
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../secret-scrubber-CfMdAJ_l.js';
|
|
@@ -7,20 +7,20 @@ export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as
|
|
|
7
7
|
export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as AttachmentMeta, d as AttachmentRef, e as AttachmentStore, D as DefaultSessionReader } from '../session-reader-CzfRA6Vk.js';
|
|
8
8
|
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-BzQR5BiL.js';
|
|
9
9
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-BH6AE0W9.js';
|
|
10
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver
|
|
10
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-CWINz5XR.js';
|
|
11
11
|
export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
|
|
12
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from '../tool-executor-
|
|
12
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from '../tool-executor-40Q6shR-.js';
|
|
13
13
|
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-CxuWrsKK.js';
|
|
14
14
|
export { B as BuildContext, M as ModelCapabilities, R as Renderer, S as SystemPromptBuilder } from '../system-prompt-Dl2QY1_B.js';
|
|
15
15
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
16
|
-
export { M as MCPRegistryView, a as MetricsSinkView, P as Plugin, b as PluginAPI, c as PluginCapabilities, d as PluginDependency, e as PluginPipelines, f as ProviderFactory, g as ProviderRegistryView, S as SessionWriterView, h as SlashCommand, i as SlashCommandRegistryView, j as SystemPromptContributor, T as ToolRegistryView } from '../index-
|
|
16
|
+
export { M as MCPRegistryView, a as MetricsSinkView, P as Plugin, b as PluginAPI, c as PluginCapabilities, d as PluginDependency, e as PluginPipelines, f as ProviderFactory, g as ProviderRegistryView, S as SessionWriterView, h as SlashCommand, i as SlashCommandRegistryView, j as SystemPromptContributor, T as ToolRegistryView } from '../index-BkKLQjea.js';
|
|
17
17
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-DqzwpBQy.js';
|
|
18
18
|
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-CV077NjV.js';
|
|
19
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
20
|
-
export { C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from '../multi-agent-
|
|
19
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-DaCvA_uK.js';
|
|
20
|
+
export { C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from '../multi-agent-MfI6dmv-.js';
|
|
21
21
|
export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from '../task-graph-BITvWt4t.js';
|
|
22
22
|
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-BhnVLBLS.js';
|
|
23
|
-
import '../events-
|
|
23
|
+
import '../events-CzkeaVVl.js';
|
|
24
24
|
import '../logger-BMQgxvdy.js';
|
|
25
25
|
import '../retry-policy-LKS8MHsB.js';
|
|
26
26
|
import '../models-registry-Y2xbog0E.js';
|
package/dist/types/index.js
CHANGED
|
@@ -2264,13 +2264,17 @@ var ToolExecutor = class {
|
|
|
2264
2264
|
const ctrl = new AbortController();
|
|
2265
2265
|
const timer = setTimeout(() => ctrl.abort(new Error("tool timeout")), timeoutMs);
|
|
2266
2266
|
const combined = AbortSignal.any([parentSignal, ctrl.signal]);
|
|
2267
|
+
let cleanupCalled = false;
|
|
2268
|
+
let caught = false;
|
|
2267
2269
|
try {
|
|
2268
2270
|
if (typeof tool.executeStream === "function") {
|
|
2269
2271
|
return await this.runStreamedTool(tool, input, ctx, combined, toolUseId);
|
|
2270
2272
|
}
|
|
2271
2273
|
return await tool.execute(input, ctx, { signal: combined });
|
|
2272
2274
|
} catch (err) {
|
|
2275
|
+
caught = true;
|
|
2273
2276
|
if (combined.aborted && typeof tool.cleanup === "function") {
|
|
2277
|
+
cleanupCalled = true;
|
|
2274
2278
|
try {
|
|
2275
2279
|
await tool.cleanup(input, ctx);
|
|
2276
2280
|
} catch {
|
|
@@ -2279,6 +2283,16 @@ var ToolExecutor = class {
|
|
|
2279
2283
|
throw err;
|
|
2280
2284
|
} finally {
|
|
2281
2285
|
clearTimeout(timer);
|
|
2286
|
+
if (combined.aborted && !caught) {
|
|
2287
|
+
if (!cleanupCalled && typeof tool.cleanup === "function") {
|
|
2288
|
+
try {
|
|
2289
|
+
await tool.cleanup(input, ctx);
|
|
2290
|
+
} catch {
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
const reason = combined.reason instanceof Error ? combined.reason : new Error(typeof combined.reason === "string" ? combined.reason : "aborted");
|
|
2294
|
+
throw reason;
|
|
2295
|
+
}
|
|
2282
2296
|
}
|
|
2283
2297
|
}
|
|
2284
2298
|
async runStreamedTool(tool, input, ctx, signal, toolUseId) {
|
|
@@ -2336,7 +2350,8 @@ var ToolExecutor = class {
|
|
|
2336
2350
|
if (subjectKey) {
|
|
2337
2351
|
const v = obj[subjectKey];
|
|
2338
2352
|
if (typeof v === "string") {
|
|
2339
|
-
|
|
2353
|
+
const isPathKey = subjectKey === "path" || subjectKey === "file" || subjectKey === "files";
|
|
2354
|
+
return isPathKey ? normalizePath(v) : escapeGlob(v);
|
|
2340
2355
|
}
|
|
2341
2356
|
}
|
|
2342
2357
|
if (toolName === "bash" && typeof obj.command === "string") {
|