@wrongstack/core 0.236.0 → 0.255.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-Cimv7bK7.d.ts → agent-bridge-l_DsFEbr.d.ts} +1 -1
- package/dist/{agent-subagent-runner-C658wj_c.d.ts → agent-subagent-runner-DhYLgAJo.d.ts} +4 -4
- package/dist/{brain-sCZ3lCjq.d.ts → brain-BaQsRNka.d.ts} +17 -0
- package/dist/{config-Koq6f3fs.d.ts → config-eSsrto5d.d.ts} +6 -0
- package/dist/coordination/index.d.ts +11 -11
- package/dist/coordination/index.js +137 -3
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +14 -14
- package/dist/defaults/index.js +8 -10
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +8 -8
- package/dist/execution/index.js +5 -3
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +4 -4
- package/dist/{goal-preamble-CnbzyVvl.d.ts → goal-preamble-BgoPmZ8l.d.ts} +5 -5
- package/dist/{index-BlMqh5GO.d.ts → index-BilZMsOK.d.ts} +4 -4
- package/dist/{index-C2eSNPsB.d.ts → index-Csoc_bKs.d.ts} +3 -3
- package/dist/index.d.ts +26 -26
- package/dist/index.js +168 -19
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +4 -4
- package/dist/infrastructure/index.js +12 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +5 -5
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-DFbirBv6.d.ts → mcp-servers-DfXxCASH.d.ts} +1 -1
- package/dist/models/index.d.ts +2 -2
- package/dist/{models-registry-CnJRjTXc.d.ts → models-registry-DpanBg8D.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-60weDZoA.d.ts → multi-agent-coordinator-Bs-M0Mo6.d.ts} +1 -1
- package/dist/{null-fleet-bus-1068dEnr.d.ts → null-fleet-bus-CWdU1_cO.d.ts} +5 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{package-outdated-watcher-pzJ5w7y8.d.ts → package-outdated-watcher-Dz-eNZlQ.d.ts} +23 -2
- package/dist/{parallel-eternal-engine-DtG1fjc9.d.ts → parallel-eternal-engine-CAMabk-X.d.ts} +5 -5
- package/dist/{path-resolver-CA1ULU0J.d.ts → path-resolver-B7VjhUHq.d.ts} +2 -2
- package/dist/{pipeline-DsmlwTXu.d.ts → pipeline-Bxa3wDcy.d.ts} +42 -2
- package/dist/{plan-templates-DPABrDvy.d.ts → plan-templates-D3guWwTi.d.ts} +2 -2
- package/dist/{provider-runner-D0HgUqwV.d.ts → provider-runner-C8_e4Lo1.d.ts} +1 -1
- package/dist/sdd/index.d.ts +5 -5
- package/dist/sdd/index.js +6 -8
- package/dist/sdd/index.js.map +1 -1
- package/dist/storage/index.d.ts +6 -6
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +12 -12
- package/dist/types/index.js +17 -3
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +11 -2
- package/dist/utils/index.js +8 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as AgentError, k as Capabilities, u as ConfigError, g as ContentBlock, C as Context, v as ContextInit, E as ERROR_CODES, w as ErrorCode, x as ErrorSeverity, y as ErrorSubsystem, F as FileSnapshot, z as FsError, I as ImageBlock, J as JSONSchema, M as Message, B as MessageRole, f as Permission, D as PluginError, P as Provider, e as ProviderError, G as ProviderErrorBody, R as Request, b as Response, p as ResumedSession, K as RiskTier, o as RunOptions, N as SddError, q as SessionData, O as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, W as StopReason, X as StreamEvent, Y as StreamHangError, n as TextBlock, Z as ThinkingBlock, s as TodoItem, T as Tool, _ as ToolCallContext, $ as ToolError, a0 as ToolFinalEvent, j as ToolProgressEvent, m as ToolResultBlock, a1 as ToolStreamEvent, l as ToolUseBlock, U as Usage, a2 as WrongStackError, a3 as asBlocks, a4 as asText, a6 as isAgentError, a7 as isConfigError, a8 as isFsError, a9 as isImageBlock, aa as isPluginError, ab as isSddError, ac as isSessionError, ad as isTextBlock, ae as isThinkingBlock, af as isToolError, ag as isToolResultBlock, ah as isToolUseBlock, ai as isWrongStackError, aj as toWrongStackError } from '../context-CLz3z_E8.js';
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
3
|
-
export { A as AutonomyConfig, n as CONTEXT_WINDOW_MODES, h as Config, j as ConfigLoader, i as ConfigStore, o as ContextConfig, C as ContextWindowAggressiveOn, p as ContextWindowConfigLike, q as ContextWindowMode, r as ContextWindowModeId, g as ContextWindowPolicy, s as ContextWindowThresholds, t as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, f as HookEntry, H as HookEvent, l as HookInput, e as HookMatcher, m as HookOutcome, I as InProcessHook, u as IndexingConfig, L as LaunchConfig, v as LogConfig, c as MCPServerConfig, d as ModelMatrixEntry, w as ModelsDevModel, a as ModelsDevPayload, x as ModelsDevProvider, M as ModelsRegistry, y as PluginConfig, z as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, B as SessionLoggingConfig, S as ShellHook, E as SyncCategory, k as SyncConfig, T as ToolsConfig, W as WireFamily, G as formatContextWindowModeList, J as getContextWindowMode, K as isContextWindowModeId, N as listContextWindowModes, O as resolveContextWindowPolicy } from '../config-
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-C8_e4Lo1.js';
|
|
3
|
+
export { A as AutonomyConfig, n as CONTEXT_WINDOW_MODES, h as Config, j as ConfigLoader, i as ConfigStore, o as ContextConfig, C as ContextWindowAggressiveOn, p as ContextWindowConfigLike, q as ContextWindowMode, r as ContextWindowModeId, g as ContextWindowPolicy, s as ContextWindowThresholds, t as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, f as HookEntry, H as HookEvent, l as HookInput, e as HookMatcher, m as HookOutcome, I as InProcessHook, u as IndexingConfig, L as LaunchConfig, v as LogConfig, c as MCPServerConfig, d as ModelMatrixEntry, w as ModelsDevModel, a as ModelsDevPayload, x as ModelsDevProvider, M as ModelsRegistry, y as PluginConfig, z as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, B as SessionLoggingConfig, S as ShellHook, E as SyncCategory, k as SyncConfig, T as ToolsConfig, W as WireFamily, G as formatContextWindowModeList, J as getContextWindowMode, K as isContextWindowModeId, N as listContextWindowModes, O as resolveContextWindowPolicy } from '../config-eSsrto5d.js';
|
|
4
4
|
export { a as CompactReport, C as Compactor } from '../compactor-BRfg3QPd.js';
|
|
5
5
|
export { a as PermissionDecision, P as PermissionPolicy, T as TrustPolicy } from '../permission-DbWPbuoA.js';
|
|
6
6
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from '../session-rewinder-C9HnMkhP.js';
|
|
@@ -8,27 +8,27 @@ export { a as AddAttachmentInput, c as Attachment, d as AttachmentKind, e as Att
|
|
|
8
8
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_SESSION_PRUNE_DAYS, d as DEFAULT_TOOLS_CONFIG } from '../default-config-CXsDvOmP.js';
|
|
9
9
|
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-vault-CeVNiy_f.js';
|
|
10
10
|
export { D as DefaultLogger, a as DefaultLoggerOptions, L as LogFormat, n as noOpLogger } from '../logger-DmmQhf4P.js';
|
|
11
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
12
|
-
export { p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, l as MemoryStore, v as MemoryType, S as ScoredEntry } from '../brain-
|
|
13
|
-
import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-
|
|
14
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-
|
|
11
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-B7VjhUHq.js';
|
|
12
|
+
export { p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, l as MemoryStore, v as MemoryType, S as ScoredEntry } from '../brain-BaQsRNka.js';
|
|
13
|
+
import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-CAMabk-X.js';
|
|
14
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-CAMabk-X.js';
|
|
15
15
|
export { b as SkillEntry, S as SkillLoader, a as SkillManifest } from '../skill-Bj6Ezqb8.js';
|
|
16
|
-
export { B as BuildContext,
|
|
16
|
+
export { B as BuildContext, q as ModelCapabilities, a as Renderer, S as SystemPromptBuilder } from '../pipeline-Bxa3wDcy.js';
|
|
17
17
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
18
|
-
export { O as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, I as MCPRegistryView, L as MetricsSinkView, c as MultiAgentConfig, M as MultiAgentCoordinator, N as Plugin, P as PluginAPI, Q as PluginCapabilities, R as PluginDependency, E as PluginPipelines, _ as ProviderFactory, H as ProviderRegistryView, K as SessionWriterView, z as SlashCommand, J as SlashCommandRegistryView, e as SpawnResult, S as SubagentConfig, U as SubagentContext, V as SubagentError, W as SubagentErrorKind, X as SubagentRunContext, Y as SubagentRunOutcome, d as SubagentRunner, Z as TaskDelegation, f as TaskResult, T as TaskSpec, G as ToolRegistryView } from '../agent-subagent-runner-
|
|
19
|
-
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-
|
|
18
|
+
export { O as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, I as MCPRegistryView, L as MetricsSinkView, c as MultiAgentConfig, M as MultiAgentCoordinator, N as Plugin, P as PluginAPI, Q as PluginCapabilities, R as PluginDependency, E as PluginPipelines, _ as ProviderFactory, H as ProviderRegistryView, K as SessionWriterView, z as SlashCommand, J as SlashCommandRegistryView, e as SpawnResult, S as SubagentConfig, U as SubagentContext, V as SubagentError, W as SubagentErrorKind, X as SubagentRunContext, Y as SubagentRunOutcome, d as SubagentRunner, Z as TaskDelegation, f as TaskResult, T as TaskSpec, G as ToolRegistryView } from '../agent-subagent-runner-DhYLgAJo.js';
|
|
19
|
+
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-DpanBg8D.js';
|
|
20
20
|
export { D as DEFAULT_MODES, b as Mode, a as ModeConfig, c as ModeManifest, M as ModeStore } from '../mode-CZlO9iU1.js';
|
|
21
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
21
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-l_DsFEbr.js';
|
|
22
22
|
export { 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 } from '../spec-TBi3Jr6T.js';
|
|
23
23
|
export { C as CriticalPathResult, f as TaskAssignment, g as TaskDependency, h as TaskEdge, i as TaskFilter, d as TaskGraph, e as TaskNode, a as TaskPriority, c as TaskProgress, j as TaskSort, b as TaskStatus, T as TaskType, k as computeTaskProgress, l as findCriticalPath, t as topologicalSort } from '../task-graph-u1q9Jkyk.js';
|
|
24
24
|
export { A as AggregateHealth, a as HealthCheck, b as HealthCheckResult, H as HealthRegistry, c as HealthStatus, d as MetricLabels, e as MetricSeries, M as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-D-HZN_mF.js';
|
|
25
|
-
export { S as SystemPromptContributor } from '../index-
|
|
25
|
+
export { S as SystemPromptContributor } from '../index-Csoc_bKs.js';
|
|
26
26
|
import '../logger-B63L5bTg.js';
|
|
27
27
|
import '../retry-policy-BVnkbMET.js';
|
|
28
28
|
import '../secret-vault-BJDY28ev.js';
|
|
29
29
|
import '../path-resolver-CPRj4bFY.js';
|
|
30
30
|
import '../goal-store-CV9Yz2X_.js';
|
|
31
|
-
import '../multi-agent-coordinator-
|
|
31
|
+
import '../multi-agent-coordinator-Bs-M0Mo6.js';
|
|
32
32
|
import 'node:events';
|
|
33
33
|
|
|
34
34
|
/** Union of serial and parallel autonomy engine stage types (from EternalAutonomyEngine / ParallelEternalEngine). */
|
package/dist/types/index.js
CHANGED
|
@@ -253,6 +253,11 @@ function isSddError(err) {
|
|
|
253
253
|
return err instanceof SddError;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
// src/utils/string.ts
|
|
257
|
+
function truncate(s, max) {
|
|
258
|
+
return s.length <= max ? s : `${s.slice(0, max - 1)}\u2026`;
|
|
259
|
+
}
|
|
260
|
+
|
|
256
261
|
// src/types/provider.ts
|
|
257
262
|
var ProviderError = class extends WrongStackError {
|
|
258
263
|
status;
|
|
@@ -311,9 +316,6 @@ function describeStatus(status, type) {
|
|
|
311
316
|
if (type) return `${type} (${status})`;
|
|
312
317
|
return `HTTP ${status}`;
|
|
313
318
|
}
|
|
314
|
-
function truncate(s, n) {
|
|
315
|
-
return s.length <= n ? s : `${s.slice(0, n - 1)}\u2026`;
|
|
316
|
-
}
|
|
317
319
|
var StreamHangError = class extends ProviderError {
|
|
318
320
|
/** Name of the provider that hung, e.g. "zai", "anthropic". */
|
|
319
321
|
hungProviderId;
|
|
@@ -979,6 +981,10 @@ var DefaultTokenCounter = class {
|
|
|
979
981
|
const price = model ? this.priceCache.get(model) : void 0;
|
|
980
982
|
if (price) {
|
|
981
983
|
this.applyPrice(usage, price);
|
|
984
|
+
this.events?.emit("token.accounted", {
|
|
985
|
+
usage: this.total(),
|
|
986
|
+
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
987
|
+
});
|
|
982
988
|
} else if (this.registry && this.providerId && model) {
|
|
983
989
|
if (this.priceCache.size >= PRICE_CACHE_MAX_SIZE) {
|
|
984
990
|
const keys = [...this.priceCache.keys()];
|
|
@@ -989,6 +995,10 @@ var DefaultTokenCounter = class {
|
|
|
989
995
|
const p = priceFromModel(m);
|
|
990
996
|
this.priceCache.set(model, p);
|
|
991
997
|
this.applyPrice(usage, p);
|
|
998
|
+
this.events?.emit("token.accounted", {
|
|
999
|
+
usage: this.total(),
|
|
1000
|
+
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
1001
|
+
});
|
|
992
1002
|
}
|
|
993
1003
|
}).catch(() => {
|
|
994
1004
|
this.events?.emit("token.cost_estimate_unavailable", { model: model ?? "<unknown>" });
|
|
@@ -1011,6 +1021,10 @@ var DefaultTokenCounter = class {
|
|
|
1011
1021
|
}
|
|
1012
1022
|
this.priceCache.set(resolved.modelId, price);
|
|
1013
1023
|
this.applyPrice(usage, price);
|
|
1024
|
+
this.events?.emit("token.accounted", {
|
|
1025
|
+
usage: this.total(),
|
|
1026
|
+
cost: { input: this.costInput, output: this.costOutput, total: this.costInput + this.costOutput }
|
|
1027
|
+
});
|
|
1014
1028
|
}
|
|
1015
1029
|
total() {
|
|
1016
1030
|
return {
|