@wrongstack/core 0.109.1 → 0.141.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-mOxbpFcg.d.ts → agent-bridge-r9y6gdn4.d.ts} +1 -1
- package/dist/{agent-subagent-runner-DukQLUcS.d.ts → agent-subagent-runner-1GeQE_L0.d.ts} +7 -8
- package/dist/{brain-Dfv4Y82E.d.ts → brain-Cp_3GIS2.d.ts} +14 -3
- package/dist/{compactor-DXLxLcmU.d.ts → compactor-BueGt7LG.d.ts} +9 -1
- package/dist/{config-BSU-6vah.d.ts → config-BaVThgnT.d.ts} +104 -3
- package/dist/{context-CNRYfhUv.d.ts → context-C7G_MtLV.d.ts} +38 -1
- package/dist/coordination/index.d.ts +12 -13
- package/dist/coordination/index.js +229 -17
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -27
- package/dist/defaults/index.js +886 -721
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +15 -16
- package/dist/execution/index.js +535 -322
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -7
- package/dist/{goal-preamble-CI8lxeY1.d.ts → goal-preamble-iuIUTQwk.d.ts} +48 -18
- package/dist/{index-BWRN6wOb.d.ts → index-BZdezm3g.d.ts} +9 -10
- package/dist/{index-DIKEcfgC.d.ts → index-CPweVoFM.d.ts} +7 -6
- package/dist/index.d.ts +51 -52
- package/dist/index.js +752 -545
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -7
- package/dist/infrastructure/index.js +64 -19
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +10 -11
- package/dist/kernel/index.js.map +1 -1
- package/dist/llm-selector-CP72f1lC.d.ts +58 -0
- package/dist/{mcp-servers-CXCsANdY.d.ts → mcp-servers-Bl5LTvQg.d.ts} +3 -3
- package/dist/{mode-ARA3HrkY.d.ts → mode-CZlO9iU1.d.ts} +1 -1
- package/dist/models/index.d.ts +157 -53
- package/dist/models/index.js +475 -20
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-DU64QxQa.d.ts → models-registry-D90K9UnM.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-51LvnXkD.d.ts → multi-agent-coordinator-QWEzJDlm.d.ts} +1 -1
- package/dist/{null-fleet-bus-D09hMzFQ.d.ts → null-fleet-bus-BUyfqh23.d.ts} +13 -10
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-B2CbsKpc.d.ts → parallel-eternal-engine-Dj2SYzha.d.ts} +24 -11
- package/dist/{path-resolver-DDJiMAtX.d.ts → path-resolver-DRjQBkoO.d.ts} +3 -3
- package/dist/{permission-BDv7z0mk.d.ts → permission-B7nKnEvQ.d.ts} +1 -1
- package/dist/{permission-policy-dF74EpDp.d.ts → permission-policy-8-6zBmfA.d.ts} +2 -13
- package/dist/{pipeline-BqiA_UMr.d.ts → pipeline-BG7UgbDc.d.ts} +2 -2
- package/dist/{plan-templates-BdDxl9cI.d.ts → plan-templates-CkKNPU3I.d.ts} +6 -6
- package/dist/{provider-runner-BUunikwY.d.ts → provider-runner-BNpuIyOL.d.ts} +3 -3
- package/dist/{retry-policy-BcmuT_V0.d.ts → retry-policy-rutAfVeR.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -9
- package/dist/sdd/index.js +208 -1
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-DrOhc2i5.d.ts → secret-vault-BTcC_T5v.d.ts} +3 -2
- package/dist/security/index.d.ts +5 -7
- package/dist/security/index.js +4 -35
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-C7wcdqMA.d.ts → selector-4vDFZKt3.d.ts} +1 -1
- package/dist/{session-event-bridge-BpJ5trO9.d.ts → session-event-bridge-DWlvglC2.d.ts} +2 -2
- package/dist/{session-reader-DDz1Ek4V.d.ts → session-reader-BAtCxdaw.d.ts} +1 -1
- package/dist/storage/index.d.ts +14 -15
- package/dist/storage/index.js +140 -134
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -20
- package/dist/types/index.js +186 -102
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +38 -15
- package/dist/utils/index.js +62 -33
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-_lqjzErq.d.ts → wstack-paths-DD50Omgn.d.ts} +3 -0
- package/package.json +2 -2
- package/dist/models-registry-B6_KfS65.d.ts +0 -95
package/dist/models/index.d.ts
CHANGED
|
@@ -1,60 +1,164 @@
|
|
|
1
|
-
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import '../
|
|
1
|
+
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-D90K9UnM.js';
|
|
2
|
+
export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from '../llm-selector-CP72f1lC.js';
|
|
3
|
+
import { d as ModelMatrixEntry, P as ProviderConfig } from '../config-BaVThgnT.js';
|
|
4
|
+
import '../mode-CZlO9iU1.js';
|
|
5
|
+
import '../context-C7G_MtLV.js';
|
|
6
|
+
import '../selector-4vDFZKt3.js';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Model Intelligence — knowledge base of model capabilities, strengths,
|
|
10
|
+
* and task-type suitability. Powers automatic agent → model routing.
|
|
11
|
+
*
|
|
12
|
+
* Each entry records:
|
|
13
|
+
* - Known strengths (what this model family excels at)
|
|
14
|
+
* - Known weaknesses (what it struggles with)
|
|
15
|
+
* - Best-for task types (coding, planning, security, docs, etc.)
|
|
16
|
+
* - Cost tier (budget / standard / premium)
|
|
17
|
+
*
|
|
18
|
+
* This is a curated dataset updated as new models release. Falls back
|
|
19
|
+
* gracefully for unknown models.
|
|
20
|
+
*/
|
|
21
|
+
interface ModelProfile {
|
|
22
|
+
/** Provider id (e.g. "anthropic", "openai"). */
|
|
23
|
+
provider: string;
|
|
24
|
+
/** Model id regex — matches partial ids (e.g. "claude-sonnet" matches "claude-sonnet-4-20250514"). */
|
|
25
|
+
pattern: RegExp;
|
|
26
|
+
/** Human-readable model family name. */
|
|
27
|
+
family: string;
|
|
28
|
+
/** What this model is particularly good at. */
|
|
29
|
+
strengths: string[];
|
|
30
|
+
/** Known limitations. */
|
|
31
|
+
weaknesses?: string[];
|
|
32
|
+
/** Task types this model is the best choice for. Ordered by preference. */
|
|
33
|
+
bestFor: TaskType[];
|
|
34
|
+
/** Task types to avoid with this model (use a different one). */
|
|
35
|
+
avoidFor?: TaskType[];
|
|
36
|
+
/** Approximate cost tier. */
|
|
37
|
+
costTier: 'budget' | 'standard' | 'premium';
|
|
38
|
+
/** Approximate speed tier (relative to other models). */
|
|
39
|
+
speedTier: 'fast' | 'normal' | 'slow';
|
|
40
|
+
/** Minimum recommended context window. */
|
|
41
|
+
minContext?: number;
|
|
24
42
|
}
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
/** Task categories that map to agent roles. */
|
|
44
|
+
type TaskType = 'coding' | 'planning' | 'security' | 'docs' | 'testing' | 'refactoring' | 'debugging' | 'data' | 'frontend' | 'backend' | 'review' | 'lightweight' | 'general';
|
|
45
|
+
/** Known model profiles. Patterns are tried in order; first match wins. */
|
|
46
|
+
declare const MODEL_PROFILES: ModelProfile[];
|
|
47
|
+
/** Map task types to the agent roles that handle them. */
|
|
48
|
+
declare const TASK_TO_ROLE: Record<TaskType, string[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Infer the most likely task type from a task description and target role.
|
|
51
|
+
* Uses keyword matching; falls back to the role's primary task type.
|
|
52
|
+
*/
|
|
53
|
+
declare function inferTaskType(description: string, role?: string): TaskType;
|
|
54
|
+
/**
|
|
55
|
+
* Find the best matching model profile for a given provider + model id.
|
|
56
|
+
*/
|
|
57
|
+
declare function findModelProfile(provider: string, modelId: string): ModelProfile | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Score a model for a given task type. Higher = better fit.
|
|
60
|
+
* Returns 0-100.
|
|
61
|
+
*/
|
|
62
|
+
declare function scoreModelForTask(profile: ModelProfile | undefined, taskType: TaskType): number;
|
|
27
63
|
|
|
28
|
-
interface LLMSelectorOptions {
|
|
29
|
-
/** Provider used for the selector LLM call. Required. */
|
|
30
|
-
provider: Provider;
|
|
31
|
-
/** Model for the selector. Defaults to the provider's default model. */
|
|
32
|
-
model?: string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Maximum tokens to keep in context (target budget).
|
|
35
|
-
* Selector will aim to keep total content below this.
|
|
36
|
-
*/
|
|
37
|
-
maxContextTokens?: number | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Prompt instructing the selector how to behave.
|
|
40
|
-
* Should guide the LLM on importance tiers and output format.
|
|
41
|
-
*/
|
|
42
|
-
systemPrompt?: string | undefined;
|
|
43
|
-
}
|
|
44
64
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
65
|
+
* ModelRouter — intelligent model selection for subagent delegation.
|
|
66
|
+
*
|
|
67
|
+
* Combines:
|
|
68
|
+
* 1. User-configured model matrix (/setmodel overrides)
|
|
69
|
+
* 2. Model intelligence profiles (strengths/weaknesses per model family)
|
|
70
|
+
* 3. Provider availability (which models have API keys configured)
|
|
71
|
+
* 4. Per-model cost tracking
|
|
72
|
+
*
|
|
73
|
+
* Usage:
|
|
74
|
+
* const router = new ModelRouter({ matrix, config, profiles: MODEL_PROFILES });
|
|
75
|
+
* const pick = router.pickForTask('security-scanner', 'Audit the auth module');
|
|
76
|
+
* // → { provider: 'anthropic', model: 'claude-sonnet-...', reason: 'best-for security' }
|
|
48
77
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
|
|
79
|
+
interface ModelIntelligenceEntry {
|
|
80
|
+
provider: string;
|
|
81
|
+
pattern: RegExp;
|
|
82
|
+
family: string;
|
|
83
|
+
strengths: string[];
|
|
84
|
+
weaknesses?: string[];
|
|
85
|
+
bestFor: string[];
|
|
86
|
+
avoidFor?: string[];
|
|
87
|
+
costTier: 'budget' | 'standard' | 'premium';
|
|
88
|
+
speedTier: 'fast' | 'normal' | 'slow';
|
|
89
|
+
minContext?: number;
|
|
90
|
+
}
|
|
91
|
+
interface RouterConfig {
|
|
92
|
+
/** User-configured model matrix (from /setmodel). */
|
|
93
|
+
matrix?: Record<string, ModelMatrixEntry> | undefined;
|
|
94
|
+
/** Provider configurations (to check API key availability). */
|
|
95
|
+
config: {
|
|
96
|
+
provider: string;
|
|
97
|
+
model: string;
|
|
98
|
+
providers?: Record<string, ProviderConfig>;
|
|
99
|
+
};
|
|
100
|
+
/** Known model intelligence profiles. */
|
|
101
|
+
profiles?: ModelIntelligenceEntry[] | undefined;
|
|
102
|
+
}
|
|
103
|
+
interface ModelPick {
|
|
104
|
+
provider: string;
|
|
105
|
+
model: string;
|
|
106
|
+
/** Why this model was chosen. */
|
|
107
|
+
reason: string;
|
|
108
|
+
/** Whether this came from the user's matrix (true) or auto-detected (false). */
|
|
109
|
+
fromMatrix: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface RouterCosts {
|
|
112
|
+
/** Cumulative cost per provider/model key. */
|
|
113
|
+
byModel: Record<string, {
|
|
114
|
+
cost: number;
|
|
115
|
+
tokens: {
|
|
116
|
+
input: number;
|
|
117
|
+
output: number;
|
|
118
|
+
};
|
|
119
|
+
calls: number;
|
|
120
|
+
}>;
|
|
121
|
+
/** Grand total. */
|
|
122
|
+
totalCost: number;
|
|
123
|
+
}
|
|
124
|
+
declare class ModelRouter {
|
|
125
|
+
private profiles;
|
|
126
|
+
private matrix;
|
|
127
|
+
private config;
|
|
128
|
+
private costs;
|
|
129
|
+
constructor(opts: RouterConfig);
|
|
130
|
+
/** Look up the model matrix resolution for a role (role → phase → * → leader). */
|
|
131
|
+
private resolveMatrix;
|
|
132
|
+
/** Simplified phase lookup for common roles. */
|
|
133
|
+
private roleToPhase;
|
|
134
|
+
/**
|
|
135
|
+
* Pick the best model for a task.
|
|
136
|
+
*
|
|
137
|
+
* Priority:
|
|
138
|
+
* 1. User's /setmodel matrix entry for this role (explicit override)
|
|
139
|
+
* 2. Best-matching model from intelligence profiles
|
|
140
|
+
* 3. Leader model (fallback)
|
|
141
|
+
*/
|
|
142
|
+
pickForTask(role: string, description: string): ModelPick;
|
|
143
|
+
/** Infer task category from description keywords + role. */
|
|
144
|
+
private inferCategory;
|
|
145
|
+
/** Find the best available model for a task category. */
|
|
146
|
+
private findBestModel;
|
|
147
|
+
/** Check if a provider has an API key configured. */
|
|
148
|
+
private hasKey;
|
|
149
|
+
/** Get the configured model list for a provider. */
|
|
150
|
+
private getProviderModels;
|
|
151
|
+
/** Record cost for a model. */
|
|
152
|
+
recordCost(provider: string, model: string, cost: number, tokens?: {
|
|
153
|
+
input: number;
|
|
154
|
+
output: number;
|
|
155
|
+
}): void;
|
|
156
|
+
/** Get cumulative costs. */
|
|
157
|
+
getCosts(): RouterCosts;
|
|
158
|
+
/** Reset cost tracking. */
|
|
159
|
+
resetCosts(): void;
|
|
160
|
+
/** List all available providers with their best model for each task category. */
|
|
161
|
+
suggestMatrix(): Record<string, ModelPick>;
|
|
58
162
|
}
|
|
59
163
|
|
|
60
|
-
export {
|
|
164
|
+
export { MODEL_PROFILES, type ModelIntelligenceEntry, type ModelPick, type ModelProfile, ModelRouter, type RouterConfig, type RouterCosts, TASK_TO_ROLE, type TaskType, findModelProfile, inferTaskType, scoreModelForTask };
|