@wrongstack/core 0.257.0 → 0.257.2
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/coordination/index.js +6 -5
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +1 -1
- package/dist/defaults/index.js +27 -9
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +1 -1
- package/dist/execution/index.js +26 -9
- package/dist/execution/index.js.map +1 -1
- package/dist/{goal-preamble-UiEkbNmW.d.ts → goal-preamble-CznHTZqP.d.ts} +2 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +119 -10
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +99 -1
- package/dist/utils/index.js +92 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/defaults/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as Director
|
|
|
6
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-vault-gxtFZYBt.js';
|
|
7
7
|
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-B8rSu908.js';
|
|
8
8
|
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-C0juOszP.js';
|
|
9
|
-
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-
|
|
9
|
+
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-CznHTZqP.js';
|
|
10
10
|
import { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-hM7EXlLI.js';
|
|
11
11
|
import { b as Response } from '../context-CGdgA0q6.js';
|
|
12
12
|
export { a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, n as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, w as DirectorPromptParts, x as DirectorSessionFactory, y as DirectorSessionFactoryOptions, F as FLEET_ROSTER, z as FLEET_ROSTER_BUDGETS, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-B5mfTJXT.js';
|
package/dist/defaults/index.js
CHANGED
|
@@ -5227,6 +5227,8 @@ function compactSkillBody(body) {
|
|
|
5227
5227
|
var DefaultSkillLoader = class {
|
|
5228
5228
|
dirs;
|
|
5229
5229
|
cache;
|
|
5230
|
+
entriesCache;
|
|
5231
|
+
bodyCache = /* @__PURE__ */ new Map();
|
|
5230
5232
|
constructor(opts) {
|
|
5231
5233
|
this.dirs = [
|
|
5232
5234
|
{ dir: opts.paths.inProjectSkills, source: "project" },
|
|
@@ -5285,6 +5287,7 @@ var DefaultSkillLoader = class {
|
|
|
5285
5287
|
return lines.join("\n");
|
|
5286
5288
|
}
|
|
5287
5289
|
async listEntries() {
|
|
5290
|
+
if (this.entriesCache) return this.entriesCache;
|
|
5288
5291
|
const skills = await this.list();
|
|
5289
5292
|
const entries = [];
|
|
5290
5293
|
for (const s of skills) {
|
|
@@ -5295,33 +5298,47 @@ var DefaultSkillLoader = class {
|
|
|
5295
5298
|
} catch {
|
|
5296
5299
|
}
|
|
5297
5300
|
}
|
|
5301
|
+
this.entriesCache = entries;
|
|
5298
5302
|
return entries;
|
|
5299
5303
|
}
|
|
5300
5304
|
invalidateCache() {
|
|
5301
5305
|
this.cache = void 0;
|
|
5306
|
+
this.entriesCache = void 0;
|
|
5307
|
+
this.bodyCache.clear();
|
|
5302
5308
|
}
|
|
5303
5309
|
async readBody(name) {
|
|
5310
|
+
const cached = this.bodyCache.get(name);
|
|
5311
|
+
if (cached !== void 0) return cached;
|
|
5304
5312
|
const m = await this.find(name);
|
|
5305
5313
|
if (!m) throw new Error(`Skill "${name}" not found`);
|
|
5306
|
-
|
|
5314
|
+
const body = await fsp.readFile(m.path, "utf8");
|
|
5315
|
+
this.bodyCache.set(name, body);
|
|
5316
|
+
return body;
|
|
5307
5317
|
}
|
|
5308
5318
|
async readSaveBody(name) {
|
|
5319
|
+
const key = `save:${name}`;
|
|
5320
|
+
const cached = this.bodyCache.get(key);
|
|
5321
|
+
if (cached !== void 0) return cached;
|
|
5309
5322
|
const m = await this.find(name);
|
|
5310
5323
|
if (!m) throw new Error(`Skill "${name}" not found`);
|
|
5311
5324
|
const savePath = path11.join(path11.dirname(m.path), "SKILL.save.md");
|
|
5325
|
+
let result;
|
|
5312
5326
|
try {
|
|
5313
|
-
|
|
5327
|
+
result = await fsp.readFile(savePath, "utf8");
|
|
5314
5328
|
} catch {
|
|
5315
5329
|
const full = await fsp.readFile(m.path, "utf8");
|
|
5316
5330
|
const body = stripFrontmatter(full);
|
|
5317
5331
|
const compact = compactSkillBody(body);
|
|
5318
5332
|
if (compact) {
|
|
5319
|
-
|
|
5333
|
+
result = `## Overview
|
|
5320
5334
|
|
|
5321
5335
|
${compact}`;
|
|
5336
|
+
} else {
|
|
5337
|
+
result = body.trim().slice(0, 300);
|
|
5322
5338
|
}
|
|
5323
|
-
return body.trim().slice(0, 300);
|
|
5324
5339
|
}
|
|
5340
|
+
this.bodyCache.set(key, result);
|
|
5341
|
+
return result;
|
|
5325
5342
|
}
|
|
5326
5343
|
};
|
|
5327
5344
|
function parseFrontmatter(raw) {
|
|
@@ -12006,17 +12023,17 @@ function normalize(text) {
|
|
|
12006
12023
|
return ` ${text.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim()} `;
|
|
12007
12024
|
}
|
|
12008
12025
|
function scoreAgents(task, catalog = AGENT_CATALOG) {
|
|
12009
|
-
const
|
|
12026
|
+
const haySet = new Set(normalize(task).split(/\s+/).filter(Boolean));
|
|
12010
12027
|
const out = [];
|
|
12011
12028
|
for (const def of Object.values(catalog)) {
|
|
12012
12029
|
if (!def?.config?.role) continue;
|
|
12013
12030
|
let score = 0;
|
|
12014
12031
|
const matched = [];
|
|
12015
12032
|
for (const kw of def.capability.keywords) {
|
|
12016
|
-
const
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
score +=
|
|
12033
|
+
const needleWords = normalize(kw).split(/\s+/).filter(Boolean);
|
|
12034
|
+
const allPresent = needleWords.every((w) => haySet.has(w));
|
|
12035
|
+
if (allPresent) {
|
|
12036
|
+
score += needleWords.length;
|
|
12020
12037
|
matched.push(kw);
|
|
12021
12038
|
}
|
|
12022
12039
|
}
|
|
@@ -14707,6 +14724,7 @@ Emit each evaluation immediately. Do not wait until you have read all reports.`;
|
|
|
14707
14724
|
}
|
|
14708
14725
|
for (const dispose of this.disposers) dispose();
|
|
14709
14726
|
this.disposers.length = 0;
|
|
14727
|
+
this.snapshot.files.length = 0;
|
|
14710
14728
|
}
|
|
14711
14729
|
};
|
|
14712
14730
|
|