@wrongstack/core 0.1.10 → 0.3.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-6KPqsFx6.d.ts → agent-bridge-C3DUGjSb.d.ts} +1 -1
- package/dist/{compactor-B4mQZXf2.d.ts → compactor-BUU6Zm_3.d.ts} +1 -1
- package/dist/{config-BU9f_5yH.d.ts → config-CKLYPkCi.d.ts} +1 -1
- package/dist/{context-BmM2xGUZ.d.ts → context-IovtuTf8.d.ts} +10 -0
- package/dist/coordination/index.d.ts +211 -13
- package/dist/coordination/index.js +964 -67
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +33 -18
- package/dist/defaults/index.js +1273 -42
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-BMNaEFZl.d.ts → events-CNB9PALO.d.ts} +99 -1
- package/dist/execution/index.d.ts +12 -12
- package/dist/extension/index.d.ts +9 -0
- package/dist/extension/index.js +234 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/index-BDb0cAMP.d.ts +806 -0
- package/dist/index.d.ts +112 -29
- package/dist/index.js +2036 -490
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +12 -9
- package/dist/kernel/index.js +73 -7
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-Dzgg4x1w.d.ts → mcp-servers-DR35ojJZ.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +24 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{multi-agent-fmkRHtof.d.ts → multi-agent-B9a6sflH.d.ts} +71 -3
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-DBjaoXFq.d.ts → path-resolver-Cl_q0u-R.d.ts} +2 -2
- package/dist/provider-runner-BXuADQqQ.d.ts +36 -0
- package/dist/sdd/index.d.ts +3 -3
- package/dist/{secret-scrubber-CicHLN4G.d.ts → secret-scrubber-CgG2tV2B.d.ts} +1 -1
- package/dist/{secret-scrubber-DF88luOe.d.ts → secret-scrubber-Cuy5afaQ.d.ts} +1 -1
- package/dist/security/index.d.ts +20 -4
- package/dist/security/index.js +37 -2
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-BbJqiEP4.d.ts → selector-wT2fv9Fg.d.ts} +1 -1
- package/dist/{session-reader-Drq8RvJu.d.ts → session-reader-CcPi4BQ8.d.ts} +1 -1
- package/dist/{skill-DhfSizKv.d.ts → skill-C_7znCIC.d.ts} +2 -2
- package/dist/storage/index.d.ts +164 -6
- package/dist/storage/index.js +297 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/{renderer-rk_1Swwc.d.ts → system-prompt-Dk1qm8ey.d.ts} +30 -2
- package/dist/{tool-executor-CpuJPYm9.d.ts → tool-executor-DKu4A6nB.d.ts} +5 -5
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.js +24 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +24 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/plugin-DJk6LL8B.d.ts +0 -434
- package/dist/system-prompt-BC_8ypCG.d.ts +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TextBlock, b as ContentBlock } from './context-
|
|
1
|
+
import { T as TextBlock, b as ContentBlock, u as Tool } from './context-IovtuTf8.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Container — dependency injection with explicit bind / override / decorate.
|
|
@@ -155,4 +155,32 @@ interface Renderer {
|
|
|
155
155
|
clear(): void;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
/** Model capabilities relevant to prompt composition. */
|
|
159
|
+
interface ModelCapabilities {
|
|
160
|
+
maxContextTokens: number;
|
|
161
|
+
supportsTools: boolean;
|
|
162
|
+
supportsVision: boolean;
|
|
163
|
+
supportsReasoning: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface BuildContext {
|
|
166
|
+
cwd: string;
|
|
167
|
+
projectRoot: string;
|
|
168
|
+
tools: Tool[];
|
|
169
|
+
/** Provider id (e.g. "anthropic", "minimax-coding-plan"). */
|
|
170
|
+
provider?: string;
|
|
171
|
+
/** Model id (e.g. "claude-sonnet-4-6", "MiniMax-M2.7"). */
|
|
172
|
+
model?: string;
|
|
173
|
+
/**
|
|
174
|
+
* True when the prompt is being built for a SUBAGENT, not the host
|
|
175
|
+
* agent. Subagents are scoped to a single task — they should NOT see
|
|
176
|
+
* the host's strategic plan board (which is anchoring the host across
|
|
177
|
+
* turns, not steering individual subtasks). The plan-injection
|
|
178
|
+
* layer short-circuits when this flag is set.
|
|
179
|
+
*/
|
|
180
|
+
subagent?: boolean;
|
|
181
|
+
}
|
|
182
|
+
interface SystemPromptBuilder {
|
|
183
|
+
build(ctx: BuildContext): Promise<TextBlock[]>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export { type BuildContext as B, Container as C, type Decorator as D, type Factory as F, type ModelCapabilities as M, type NextFn as N, Pipeline as P, type Renderer as R, type SystemPromptBuilder as S, type Token as T, type BindOptions as a, type Middleware as b, type MiddlewareHandler as c, type PipelineOptions as d, type ReadonlyPipeline as e };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a0 as Context, h as ProviderError, u as Tool, D as ToolUseBlock, z as ToolResultBlock } from './context-
|
|
2
|
-
import { C as Compactor, a as CompactReport } from './compactor-
|
|
3
|
-
import {
|
|
1
|
+
import { a0 as Context, h as ProviderError, u as Tool, D as ToolUseBlock, z as ToolResultBlock } from './context-IovtuTf8.js';
|
|
2
|
+
import { C as Compactor, a as CompactReport } from './compactor-BUU6Zm_3.js';
|
|
3
|
+
import { c as RecoveryDecision, E as ErrorHandler, R as RetryPolicy } from './skill-C_7znCIC.js';
|
|
4
4
|
import { M as ModelsRegistry } from './models-registry-Y2xbog0E.js';
|
|
5
|
-
import {
|
|
5
|
+
import { k as ToolExecutorOptions, l as ToolExecutorStrategy, m as ToolBatchResult } from './index-BDb0cAMP.js';
|
|
6
6
|
|
|
7
7
|
interface CompactorOptions {
|
|
8
8
|
preserveK?: number;
|
|
@@ -94,4 +94,4 @@ declare class ToolExecutor {
|
|
|
94
94
|
private subjectFor;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export { type CompactorOptions as C,
|
|
97
|
+
export { type CompactorOptions as C, DEFAULT_RECOVERY_STRATEGIES as D, HybridCompactor as H, type RecoveryStrategy as R, ToolExecutor as T, DefaultErrorHandler as a, DefaultRetryPolicy as b, buildRecoveryStrategies as c };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export { A as AgentError, C as Capabilities, a as ConfigError, b as ContentBlock, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, 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, S as SessionData, l as SessionError, m as SessionEvent, n as SessionMetadata, o as SessionStore, p as SessionSummary, q as SessionWriter, r as StopReason, s as StreamEvent, T as TextBlock, t as ThinkingBlock, u as Tool, v as ToolCallContext, w as ToolError, x as ToolFinalEvent, y as ToolProgressEvent, z as ToolResultBlock, B as ToolStreamEvent, D as ToolUseBlock, U as Usage, W as WrongStackError, F as asBlocks, G as asText, H as isAgentError, K as isConfigError, L as isImageBlock, N as isPluginError, O as isSessionError, Q as isTextBlock, V as isThinkingBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError } from '../context-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
export { A as AgentError, C as Capabilities, a as ConfigError, b as ContentBlock, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, 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, S as SessionData, l as SessionError, m as SessionEvent, n as SessionMetadata, o as SessionStore, p as SessionSummary, q as SessionWriter, r as StopReason, s as StreamEvent, T as TextBlock, t as ThinkingBlock, u as Tool, v as ToolCallContext, w as ToolError, x as ToolFinalEvent, y as ToolProgressEvent, z as ToolResultBlock, B as ToolStreamEvent, D as ToolUseBlock, U as Usage, W as WrongStackError, F as asBlocks, G as asText, H as isAgentError, K as isConfigError, L as isImageBlock, N as isPluginError, O as isSessionError, Q as isTextBlock, V as isThinkingBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError } from '../context-IovtuTf8.js';
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-BXuADQqQ.js';
|
|
3
|
+
export { C as Config, a as ConfigLoader, b as ConfigStore, c as ContextConfig, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, d as ProviderApiKey, e as ProviderConfig, T as ToolsConfig } from '../config-CKLYPkCi.js';
|
|
4
|
+
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../secret-scrubber-CgG2tV2B.js';
|
|
5
|
+
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-CcPi4BQ8.js';
|
|
6
|
+
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-Cuy5afaQ.js';
|
|
6
7
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-BH6AE0W9.js';
|
|
7
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
8
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-Cl_q0u-R.js';
|
|
8
9
|
export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
|
|
9
|
-
export { C as CompactorOptions,
|
|
10
|
-
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-
|
|
11
|
-
export { B as BuildContext, M as ModelCapabilities, S as SystemPromptBuilder } from '../system-prompt-
|
|
12
|
-
export { R as Renderer } from '../renderer-rk_1Swwc.js';
|
|
10
|
+
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-DKu4A6nB.js';
|
|
11
|
+
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-C_7znCIC.js';
|
|
12
|
+
export { B as BuildContext, M as ModelCapabilities, R as Renderer, S as SystemPromptBuilder } from '../system-prompt-Dk1qm8ey.js';
|
|
13
13
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
14
|
-
export { M as MCPRegistryView, P as Plugin,
|
|
14
|
+
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-BDb0cAMP.js';
|
|
15
15
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-DqzwpBQy.js';
|
|
16
16
|
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-CV077NjV.js';
|
|
17
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
18
|
-
export { C as CoordinatorEvents,
|
|
17
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-C3DUGjSb.js';
|
|
18
|
+
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-B9a6sflH.js';
|
|
19
19
|
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';
|
|
20
20
|
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';
|
|
21
|
+
import '../events-CNB9PALO.js';
|
|
22
|
+
import '../logger-BMQgxvdy.js';
|
|
21
23
|
import '../models-registry-Y2xbog0E.js';
|
|
22
24
|
import '../secret-vault-DoISxaKO.js';
|
|
23
|
-
import '../logger-BMQgxvdy.js';
|
|
24
|
-
import '../events-BMNaEFZl.js';
|
|
25
25
|
import '../path-resolver-CPRj4bFY.js';
|
|
26
|
-
import '../compactor-
|
|
26
|
+
import '../compactor-BUU6Zm_3.js';
|
package/dist/types/index.js
CHANGED
|
@@ -1121,7 +1121,7 @@ async function atomicWrite(targetPath, content, opts = {}) {
|
|
|
1121
1121
|
if (mode !== void 0) {
|
|
1122
1122
|
await fs4.chmod(tmp, mode);
|
|
1123
1123
|
}
|
|
1124
|
-
await
|
|
1124
|
+
await renameWithRetry(tmp, targetPath);
|
|
1125
1125
|
} catch (err) {
|
|
1126
1126
|
try {
|
|
1127
1127
|
await fs4.unlink(tmp);
|
|
@@ -1130,6 +1130,29 @@ async function atomicWrite(targetPath, content, opts = {}) {
|
|
|
1130
1130
|
throw err;
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
|
+
var TRANSIENT_RENAME_CODES = /* @__PURE__ */ new Set(["EPERM", "EBUSY", "EACCES", "ENOTEMPTY"]);
|
|
1134
|
+
async function renameWithRetry(from, to) {
|
|
1135
|
+
if (process.platform !== "win32") {
|
|
1136
|
+
await fs4.rename(from, to);
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
const delays = [10, 25, 60, 120, 250];
|
|
1140
|
+
let lastErr;
|
|
1141
|
+
for (let i = 0; i <= delays.length; i++) {
|
|
1142
|
+
try {
|
|
1143
|
+
await fs4.rename(from, to);
|
|
1144
|
+
return;
|
|
1145
|
+
} catch (err) {
|
|
1146
|
+
lastErr = err;
|
|
1147
|
+
const code = err?.code;
|
|
1148
|
+
if (!code || !TRANSIENT_RENAME_CODES.has(code) || i === delays.length) {
|
|
1149
|
+
throw err;
|
|
1150
|
+
}
|
|
1151
|
+
await new Promise((resolve3) => setTimeout(resolve3, delays[i]));
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
throw lastErr;
|
|
1155
|
+
}
|
|
1133
1156
|
|
|
1134
1157
|
// src/models/models-registry.ts
|
|
1135
1158
|
var DEFAULT_URL = "https://models.dev/api.json";
|