@wrongstack/core 0.10.2 → 0.10.3
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-DBBGP5O4.d.ts → agent-bridge-D_XcS2HL.d.ts} +3 -1
- package/dist/{agent-subagent-runner-KwufTWwn.d.ts → agent-subagent-runner-DuRtZmhl.d.ts} +13 -3
- package/dist/coordination/index.d.ts +8 -8
- package/dist/coordination/index.js +83 -21
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +11 -11
- package/dist/defaults/index.js +89 -23
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-Bw1K5E6K.d.ts → events-BrQiweXN.d.ts} +1 -1
- package/dist/execution/index.d.ts +6 -6
- package/dist/execution/index.js +32 -10
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +2 -2
- package/dist/{index-DgQWnZxP.d.ts → index-DAHEM_II.d.ts} +1 -1
- package/dist/{index-DIt5TIaF.d.ts → index-DnBHrz2y.d.ts} +2 -2
- package/dist/index.d.ts +17 -17
- package/dist/index.js +226 -101
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +2 -2
- package/dist/kernel/index.d.ts +3 -3
- package/dist/kernel/index.js.map +1 -1
- package/dist/{multi-agent-C1O8EFzb.d.ts → multi-agent-C8Z1i__e.d.ts} +2 -2
- package/dist/{multi-agent-coordinator-DoVSBFNx.d.ts → multi-agent-coordinator-CjG-FZKj.d.ts} +8 -3
- package/dist/{null-fleet-bus-T-s3JaOt.d.ts → null-fleet-bus-B3WdVY9i.d.ts} +28 -23
- package/dist/observability/index.d.ts +1 -1
- package/dist/{path-resolver-BfyK-I7w.d.ts → path-resolver-DumKAi0n.d.ts} +1 -1
- package/dist/{plan-templates-BWs6Je7j.d.ts → plan-templates-BUP4o-ds.d.ts} +2 -2
- package/dist/{provider-runner-BmPe2RuU.d.ts → provider-runner-Dlv8Fvw9.d.ts} +1 -1
- package/dist/sdd/index.d.ts +4 -4
- package/dist/sdd/index.js +30 -8
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.js +3 -3
- package/dist/security/index.js.map +1 -1
- package/dist/{session-reader-CCSBfQmd.d.ts → session-reader-bfgsy2a0.d.ts} +7 -3
- package/dist/storage/index.d.ts +29 -10
- package/dist/storage/index.js +131 -65
- package/dist/storage/index.js.map +1 -1
- package/dist/{tool-executor-D7RxLtg4.d.ts → tool-executor-D87-_5Of.d.ts} +1 -1
- package/dist/types/index.d.ts +8 -8
- package/dist/types/index.js +25 -5
- package/dist/types/index.js.map +1 -1
- 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-D1RHFRmF.js';
|
|
3
3
|
import { R as RecoveryDecision, E as ErrorHandler, a as RetryPolicy } from './retry-policy-KF18W4dg.js';
|
|
4
4
|
import { b as ModelsRegistry } from './models-registry-BcYJDKLm.js';
|
|
5
|
-
import { y as ToolExecutorOptions, z as ToolExecutorStrategy, T as ToolBatchResult } from './index-
|
|
5
|
+
import { y as ToolExecutorOptions, z as ToolExecutorStrategy, T as ToolBatchResult } from './index-DAHEM_II.js';
|
|
6
6
|
|
|
7
7
|
interface CompactorOptions {
|
|
8
8
|
preserveK?: number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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-7u93AcGD.js';
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-Dlv8Fvw9.js';
|
|
3
3
|
export { A as AutonomyConfig, 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, S as SessionLoggingConfig, m as SyncCategory, n as SyncConfig, T as ToolsConfig, o as formatContextWindowModeList, p as getContextWindowMode, q as isContextWindowModeId, r as listContextWindowModes, s as resolveContextWindowPolicy } from '../config-CJXBka2r.js';
|
|
4
4
|
export { C as CompactReport, a as Compactor } from '../compactor-D1RHFRmF.js';
|
|
5
5
|
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-B6sldrSp.js';
|
|
6
6
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from '../session-rewinder-C9HnMkhP.js';
|
|
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-
|
|
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-bfgsy2a0.js';
|
|
8
8
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_TOOLS_CONFIG } from '../default-config-DEXI4jsl.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-7rSC_emZ.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-DumKAi0n.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-D87-_5Of.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-CM6zOhd2.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, F 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, F as ToolRegistryView } from '../index-DAHEM_II.js';
|
|
18
18
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-gwMAo6E3.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-D_XcS2HL.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-C8Z1i__e.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-BrQiweXN.js';
|
|
25
25
|
import '../logger-DDd5C--Z.js';
|
|
26
26
|
import '../retry-policy-KF18W4dg.js';
|
|
27
27
|
import '../models-registry-BcYJDKLm.js';
|
package/dist/types/index.js
CHANGED
|
@@ -2172,12 +2172,14 @@ var InMemoryAgentBridge = class {
|
|
|
2172
2172
|
timeoutMs;
|
|
2173
2173
|
/** Guards request() so concurrent calls on the same id can't silently overwrite. */
|
|
2174
2174
|
inflightGuards = /* @__PURE__ */ new Set();
|
|
2175
|
+
/** Stores the transport unsubscribe function so it can be called on stop(). */
|
|
2176
|
+
_transportUnsubscribe;
|
|
2175
2177
|
constructor(config, transport) {
|
|
2176
2178
|
this.agentId = config.agentId;
|
|
2177
2179
|
this.coordinatorId = config.coordinatorId;
|
|
2178
2180
|
this.transport = transport;
|
|
2179
2181
|
this.timeoutMs = config.timeoutMs ?? 3e4;
|
|
2180
|
-
this.transport.subscribe(this.agentId, (msg) => {
|
|
2182
|
+
this._transportUnsubscribe = this.transport.subscribe(this.agentId, (msg) => {
|
|
2181
2183
|
if (msg.type === "heartbeat") return;
|
|
2182
2184
|
const pending = this.pendingRequests.get(msg.id);
|
|
2183
2185
|
if (pending) {
|
|
@@ -2252,6 +2254,8 @@ var InMemoryAgentBridge = class {
|
|
|
2252
2254
|
this.pendingRequests.clear();
|
|
2253
2255
|
this.inflightGuards.clear();
|
|
2254
2256
|
this.subscriptions.clear();
|
|
2257
|
+
this._transportUnsubscribe?.();
|
|
2258
|
+
this._transportUnsubscribe = void 0;
|
|
2255
2259
|
await this.transport.close(this.agentId);
|
|
2256
2260
|
}
|
|
2257
2261
|
};
|
|
@@ -2403,13 +2407,13 @@ var DANGEROUS_FOR_SUBAGENTS = [
|
|
|
2403
2407
|
function hasDangerousCapabilityForSubagents(toolOrCaps) {
|
|
2404
2408
|
if (!toolOrCaps) return false;
|
|
2405
2409
|
const input = toolOrCaps;
|
|
2406
|
-
const caps = Array.isArray(
|
|
2410
|
+
const caps = Array.isArray(toolOrCaps) ? toolOrCaps : input.capabilities ?? [];
|
|
2407
2411
|
return caps.some((c) => DANGEROUS_FOR_SUBAGENTS.includes(c));
|
|
2408
2412
|
}
|
|
2409
2413
|
function getDangerousCapabilities(toolOrCaps) {
|
|
2410
2414
|
if (!toolOrCaps) return [];
|
|
2411
2415
|
const input = toolOrCaps;
|
|
2412
|
-
const caps = Array.isArray(
|
|
2416
|
+
const caps = Array.isArray(toolOrCaps) ? toolOrCaps : input.capabilities ?? [];
|
|
2413
2417
|
return caps.filter(
|
|
2414
2418
|
(c) => DANGEROUS_FOR_SUBAGENTS.includes(c)
|
|
2415
2419
|
);
|
|
@@ -2976,11 +2980,27 @@ var DefaultSessionReader = class {
|
|
|
2976
2980
|
const data = await this.store.load(sessionId);
|
|
2977
2981
|
for (const e of data.events) yield e;
|
|
2978
2982
|
}
|
|
2979
|
-
async search(q, sessionId) {
|
|
2983
|
+
async search(q, sessionId, sessionQuery) {
|
|
2980
2984
|
const limit = q.limit ?? 100;
|
|
2981
2985
|
const matcher = buildMatcher(q);
|
|
2982
2986
|
const allowedTypes = q.types ? new Set(q.types) : null;
|
|
2983
|
-
|
|
2987
|
+
let ids;
|
|
2988
|
+
if (sessionId) {
|
|
2989
|
+
ids = [sessionId];
|
|
2990
|
+
} else {
|
|
2991
|
+
const sessions = await this.store.list(1e3);
|
|
2992
|
+
const titleNeedle = sessionQuery?.titleContains?.toLowerCase();
|
|
2993
|
+
const filtered = sessions.filter((s) => {
|
|
2994
|
+
if (sessionQuery?.since && s.startedAt < sessionQuery.since) return false;
|
|
2995
|
+
if (sessionQuery?.until && s.startedAt > sessionQuery.until) return false;
|
|
2996
|
+
if (sessionQuery?.provider && s.provider !== sessionQuery.provider) return false;
|
|
2997
|
+
if (sessionQuery?.model && s.model !== sessionQuery.model) return false;
|
|
2998
|
+
if (sessionQuery?.minTokens !== void 0 && s.tokenTotal < sessionQuery.minTokens) return false;
|
|
2999
|
+
if (titleNeedle && !s.title.toLowerCase().includes(titleNeedle)) return false;
|
|
3000
|
+
return true;
|
|
3001
|
+
});
|
|
3002
|
+
ids = filtered.map((s) => s.id);
|
|
3003
|
+
}
|
|
2984
3004
|
const hits = [];
|
|
2985
3005
|
for (const id of ids) {
|
|
2986
3006
|
let data;
|