@wrongstack/core 0.8.4 → 0.8.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-DPxcUVkn.d.ts → agent-bridge-Bad3ZGQ7.d.ts} +1 -1
- package/dist/{agent-subagent-runner-Cav3yEJM.d.ts → agent-subagent-runner-Cc8sRJOF.d.ts} +3 -3
- package/dist/coordination/index.d.ts +8 -8
- package/dist/coordination/index.js +8 -1
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +11 -11
- package/dist/defaults/index.js +41 -21
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-DyhxkstG.d.ts → events-yCpJD4wa.d.ts} +49 -0
- package/dist/execution/index.d.ts +7 -7
- package/dist/execution/index.js +22 -3
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +2 -2
- package/dist/index-BvZld4Dr.d.ts +200 -0
- package/dist/{index-oYZeWsuJ.d.ts → index-SxpnwRlJ.d.ts} +1 -1
- package/dist/index.d.ts +132 -21
- package/dist/index.js +862 -146
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +2 -2
- package/dist/kernel/index.d.ts +16 -88
- package/dist/kernel/index.js +3 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/{multi-agent-CRMznZmf.d.ts → multi-agent-C8uY45AY.d.ts} +9 -1
- package/dist/{multi-agent-coordinator-IQKrMfXz.d.ts → multi-agent-coordinator-C7YbZUY8.d.ts} +2 -2
- package/dist/{null-fleet-bus-sKnVwEd8.d.ts → null-fleet-bus-Bb2jVLKr.d.ts} +5 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{path-resolver-1CIYbH2Q.d.ts → path-resolver-DnC1nOjb.d.ts} +1 -1
- package/dist/{plan-templates-BnlpEkX8.d.ts → plan-templates-Cqdy6rtM.d.ts} +2 -2
- package/dist/{provider-runner-BrA0XR-l.d.ts → provider-runner-C4ouU7--.d.ts} +1 -1
- package/dist/sdd/index.d.ts +11 -11
- package/dist/sdd/index.js +10 -14
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/skills/index.js +7 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +1 -3
- package/dist/storage/index.js.map +1 -1
- package/dist/{tool-executor-QwfWnQZ8.d.ts → tool-executor-Ch25BDwa.d.ts} +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +22 -3
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +41 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-gCrJ631C.d.ts → wstack-paths-CJYrjQU8.d.ts} +4 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { d as Context, n as ProviderError, Q as Tool, _ as ToolUseBlock, Y as To
|
|
|
2
2
|
import { a as Compactor, C as CompactReport } from './compactor-Mw7-rNyb.js';
|
|
3
3
|
import { R as RecoveryDecision, E as ErrorHandler, a as RetryPolicy } from './retry-policy-OwtKNxo8.js';
|
|
4
4
|
import { b as ModelsRegistry } from './models-registry-BcYJDKLm.js';
|
|
5
|
-
import { x as ToolExecutorOptions, y as ToolExecutorStrategy, T as ToolBatchResult } from './index-
|
|
5
|
+
import { x as ToolExecutorOptions, y as ToolExecutorStrategy, T as ToolBatchResult } from './index-SxpnwRlJ.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, a as Capabilities, b as ConfigError, c as ContentBlock, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, M as Message, k as MessageRole, P as Permission, l as PluginError, m as Provider, n as ProviderError, o as ProviderErrorBody, p as Request, q as Response, r as ResumedSession, s as RiskTier, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, H as StopReason, K as StreamEvent, T as TextBlock, L as ThinkingBlock, Q as Tool, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError } from '../context-z2x5gv_V.js';
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-C4ouU7--.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-Bi4Q0fnz.js';
|
|
4
4
|
export { C as CompactReport, a as Compactor } from '../compactor-Mw7-rNyb.js';
|
|
5
5
|
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../secret-scrubber-CyE1-EMG.js';
|
|
@@ -8,20 +8,20 @@ export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as Att
|
|
|
8
8
|
export { D as DEFAULT_CONTEXT_CONFIG, a as DEFAULT_TOOLS_CONFIG } from '../default-config-DvRSTELf.js';
|
|
9
9
|
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-C0n1EqrC.js';
|
|
10
10
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.js';
|
|
11
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
11
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-DnC1nOjb.js';
|
|
12
12
|
export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
|
|
13
|
-
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-
|
|
13
|
+
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-Ch25BDwa.js';
|
|
14
14
|
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-CxuWrsKK.js';
|
|
15
15
|
export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-CWA6ml-d.js';
|
|
16
16
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
17
|
-
export { M as MCPRegistryView, j as MetricsSinkView, P as Plugin, k as PluginAPI, l as PluginCapabilities, m as PluginDependency, n as PluginPipelines, o as ProviderFactory, r as ProviderRegistryView, S as SessionWriterView, u as SlashCommand, v as SlashCommandRegistryView, w as SystemPromptContributor, C as ToolRegistryView } from '../index-
|
|
17
|
+
export { M as MCPRegistryView, j as MetricsSinkView, P as Plugin, k as PluginAPI, l as PluginCapabilities, m as PluginDependency, n as PluginPipelines, o as ProviderFactory, r as ProviderRegistryView, S as SessionWriterView, u as SlashCommand, v as SlashCommandRegistryView, w as SystemPromptContributor, C as ToolRegistryView } from '../index-SxpnwRlJ.js';
|
|
18
18
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-OG_30xqZ.js';
|
|
19
19
|
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-CV077NjV.js';
|
|
20
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
21
|
-
export { C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, n as SubagentConfig, o as SubagentContext, p as SubagentError, q as SubagentErrorKind, r as SubagentRunContext, s as SubagentRunOutcome, t as SubagentRunner, T as TaskDelegation, u as TaskResult, v as TaskSpec } from '../multi-agent-
|
|
20
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-Bad3ZGQ7.js';
|
|
21
|
+
export { C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, n as SubagentConfig, o as SubagentContext, p as SubagentError, q as SubagentErrorKind, r as SubagentRunContext, s as SubagentRunOutcome, t as SubagentRunner, T as TaskDelegation, u as TaskResult, v as TaskSpec } from '../multi-agent-C8uY45AY.js';
|
|
22
22
|
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-D1YQbpxF.js';
|
|
23
23
|
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';
|
|
24
|
-
import '../events-
|
|
24
|
+
import '../events-yCpJD4wa.js';
|
|
25
25
|
import '../logger-DDd5C--Z.js';
|
|
26
26
|
import '../retry-policy-OwtKNxo8.js';
|
|
27
27
|
import '../models-registry-BcYJDKLm.js';
|
package/dist/types/index.js
CHANGED
|
@@ -2225,7 +2225,7 @@ var ToolExecutor = class {
|
|
|
2225
2225
|
return { result, tool, durationMs: Date.now() - start };
|
|
2226
2226
|
}
|
|
2227
2227
|
if (hasMalformedArguments(use.input)) {
|
|
2228
|
-
const result = this.malformedInputResult(use);
|
|
2228
|
+
const result = this.malformedInputResult(use, extractMalformedRaw(use.input));
|
|
2229
2229
|
budget = this.decrementBudget(result, budget);
|
|
2230
2230
|
return { result, tool, durationMs: Date.now() - start };
|
|
2231
2231
|
}
|
|
@@ -2432,11 +2432,18 @@ var ToolExecutor = class {
|
|
|
2432
2432
|
is_error: true
|
|
2433
2433
|
};
|
|
2434
2434
|
}
|
|
2435
|
-
malformedInputResult(use) {
|
|
2435
|
+
malformedInputResult(use, raw) {
|
|
2436
|
+
let content = `Tool "${use.name}" received arguments that were not a valid JSON object, so they could not be parsed. Re-issue the call with the arguments encoded as a single well-formed JSON object matching the tool's input schema.`;
|
|
2437
|
+
if (raw) {
|
|
2438
|
+
const max = 800;
|
|
2439
|
+
const excerpt = raw.length > max ? `${raw.slice(0, max)}\u2026 (truncated, ${raw.length} chars total)` : raw;
|
|
2440
|
+
content += ` Common cause: a string field (e.g. code in old_string/new_string) contains literal newlines, quotes, or backslashes that must be JSON-escaped, or the payload was cut off mid-stream. The raw arguments received were:
|
|
2441
|
+
${excerpt}`;
|
|
2442
|
+
}
|
|
2436
2443
|
return {
|
|
2437
2444
|
type: "tool_result",
|
|
2438
2445
|
tool_use_id: use.id,
|
|
2439
|
-
content
|
|
2446
|
+
content,
|
|
2440
2447
|
is_error: true
|
|
2441
2448
|
};
|
|
2442
2449
|
}
|
|
@@ -2492,6 +2499,18 @@ function hasMalformedArguments(input) {
|
|
|
2492
2499
|
const keys = Object.keys(obj);
|
|
2493
2500
|
return keys.length === 1 && MALFORMED_ARG_MARKERS.includes(keys[0]);
|
|
2494
2501
|
}
|
|
2502
|
+
function extractMalformedRaw(input) {
|
|
2503
|
+
if (!hasMalformedArguments(input)) return void 0;
|
|
2504
|
+
const obj = input;
|
|
2505
|
+
const value = obj[Object.keys(obj)[0]];
|
|
2506
|
+
if (value === void 0 || value === null) return void 0;
|
|
2507
|
+
if (typeof value === "string") return value;
|
|
2508
|
+
try {
|
|
2509
|
+
return JSON.stringify(value);
|
|
2510
|
+
} catch {
|
|
2511
|
+
return String(value);
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2495
2514
|
|
|
2496
2515
|
// src/utils/regex-guard.ts
|
|
2497
2516
|
var MAX_PATTERN_LEN = 512;
|