@wrongstack/core 0.109.1 → 0.119.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-mOxbpFcg.d.ts → agent-bridge-PRAbEX-9.d.ts} +1 -1
- package/dist/{agent-subagent-runner-DukQLUcS.d.ts → agent-subagent-runner-DXWImnNV.d.ts} +7 -8
- package/dist/{brain-Dfv4Y82E.d.ts → brain-NZZqL8sn.d.ts} +1 -1
- package/dist/{compactor-DXLxLcmU.d.ts → compactor-C3stu664.d.ts} +1 -1
- package/dist/{config-BSU-6vah.d.ts → config-DZV9VK9n.d.ts} +104 -3
- package/dist/{context-CNRYfhUv.d.ts → context-hvXINa6a.d.ts} +31 -1
- package/dist/coordination/index.d.ts +12 -13
- package/dist/coordination/index.js +198 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +26 -27
- package/dist/defaults/index.js +243 -35
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +15 -16
- package/dist/execution/index.js +209 -5
- 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-COpt55W8.d.ts} +10 -10
- package/dist/{index-DIKEcfgC.d.ts → index-4VVHuTZF.d.ts} +7 -6
- package/dist/{index-BWRN6wOb.d.ts → index-Cj3le7TI.d.ts} +9 -10
- package/dist/index.d.ts +40 -41
- package/dist/index.js +298 -43
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -7
- package/dist/kernel/index.d.ts +10 -11
- package/dist/llm-selector-Bmx4PsVM.d.ts +58 -0
- package/dist/{mcp-servers-CXCsANdY.d.ts → mcp-servers-CofNHOqn.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 +423 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-DU64QxQa.d.ts → models-registry-BzlsjKcy.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-51LvnXkD.d.ts → multi-agent-coordinator-CmDmUgq2.d.ts} +1 -1
- package/dist/{null-fleet-bus-D09hMzFQ.d.ts → null-fleet-bus-CyH2YqP4.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-B2CbsKpc.d.ts → parallel-eternal-engine-uxVm4y4V.d.ts} +8 -8
- package/dist/{path-resolver-DDJiMAtX.d.ts → path-resolver-gfoGxpdd.d.ts} +3 -3
- package/dist/{permission-BDv7z0mk.d.ts → permission-DhLrgA30.d.ts} +1 -1
- package/dist/{permission-policy-dF74EpDp.d.ts → permission-policy-DGOvne7i.d.ts} +2 -2
- package/dist/{pipeline-BqiA_UMr.d.ts → pipeline-CqF7uju2.d.ts} +2 -2
- package/dist/{plan-templates-BdDxl9cI.d.ts → plan-templates-DoKhzenv.d.ts} +6 -6
- package/dist/{provider-runner-BUunikwY.d.ts → provider-runner-BPlI5sPZ.d.ts} +3 -3
- package/dist/{retry-policy-BcmuT_V0.d.ts → retry-policy-B4Q-FZgE.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -9
- package/dist/sdd/index.js +198 -0
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-DrOhc2i5.d.ts → secret-vault-B7GnL6o9.d.ts} +1 -1
- package/dist/security/index.d.ts +4 -4
- package/dist/{selector-C7wcdqMA.d.ts → selector-BakeMnWR.d.ts} +1 -1
- package/dist/{session-event-bridge-BpJ5trO9.d.ts → session-event-bridge-DE5Oekwx.d.ts} +1 -1
- package/dist/{session-reader-DDz1Ek4V.d.ts → session-reader-DFC81-4p.d.ts} +1 -1
- package/dist/storage/index.d.ts +11 -12
- package/dist/storage/index.js +43 -34
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -20
- package/dist/types/index.js +35 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +3 -4
- package/dist/utils/index.js +2 -1
- 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 +1 -1
- package/dist/models-registry-B6_KfS65.d.ts +0 -95
package/dist/security/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
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-
|
|
2
|
-
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-
|
|
3
|
-
import '../permission-
|
|
4
|
-
import '../context-
|
|
1
|
+
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-B7GnL6o9.js';
|
|
2
|
+
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-DGOvne7i.js';
|
|
3
|
+
import '../permission-DhLrgA30.js';
|
|
4
|
+
import '../context-hvXINa6a.js';
|
|
5
5
|
import '../secret-vault-DoISxaKO.js';
|
|
6
6
|
import '../input-reader-E-ffP2ee.js';
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ContentBlock, S as SessionEvent, h as SessionMetadata, i as SessionStore } from './context-
|
|
1
|
+
import { g as ContentBlock, S as SessionEvent, h as SessionMetadata, i as SessionStore } from './context-hvXINa6a.js';
|
|
2
2
|
|
|
3
3
|
type AttachmentKind = 'text' | 'image' | 'file';
|
|
4
4
|
interface AttachmentMeta {
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-
|
|
2
|
-
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as parseEntries, J as removePlanItem, K as runConfigMigrations, L as savePlan, N as saveTodosCheckpoint, O as setPlanItemStatus } from '../plan-templates-
|
|
3
|
-
import { M as MemoryScope, k as MemoryEntry, l as MemoryStore } from '../brain-
|
|
4
|
-
import { l as AgentExtension, j as AfterRunHook } from '../index-
|
|
5
|
-
import { P as Provider, R as Request, b as Response, S as SessionEvent } from '../context-
|
|
6
|
-
export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-
|
|
1
|
+
import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-DoKhzenv.js';
|
|
2
|
+
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as parseEntries, J as removePlanItem, K as runConfigMigrations, L as savePlan, N as saveTodosCheckpoint, O as setPlanItemStatus } from '../plan-templates-DoKhzenv.js';
|
|
3
|
+
import { M as MemoryScope, k as MemoryEntry, l as MemoryStore } from '../brain-NZZqL8sn.js';
|
|
4
|
+
import { l as AgentExtension, j as AfterRunHook } from '../index-4VVHuTZF.js';
|
|
5
|
+
import { P as Provider, R as Request, b as Response, S as SessionEvent } from '../context-hvXINa6a.js';
|
|
6
|
+
export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-DFC81-4p.js';
|
|
7
7
|
import { S as SessionRewinder, C as CheckpointInfo, a as RewindResultExtended } from '../session-rewinder-C9HnMkhP.js';
|
|
8
8
|
import { T as TaskItem } from '../task-format-vGOIftmK.js';
|
|
9
9
|
export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-BfeCUbmk.js';
|
|
10
10
|
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from '../goal-store-CV9Yz2X_.js';
|
|
11
|
-
import { W as WstackPaths } from '../wstack-paths-
|
|
12
|
-
import {
|
|
13
|
-
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-
|
|
14
|
-
import '../permission-
|
|
11
|
+
import { W as WstackPaths } from '../wstack-paths-DD50Omgn.js';
|
|
12
|
+
import { B as SyncCategory, k as SyncConfig } from '../config-DZV9VK9n.js';
|
|
13
|
+
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-DE5Oekwx.js';
|
|
14
|
+
import '../permission-DhLrgA30.js';
|
|
15
15
|
import '../secret-vault-DoISxaKO.js';
|
|
16
16
|
import '../logger-B63L5bTg.js';
|
|
17
|
-
import '../pipeline-
|
|
17
|
+
import '../pipeline-CqF7uju2.js';
|
|
18
18
|
import '../observability-D-HZN_mF.js';
|
|
19
|
-
import '../models-registry-B6_KfS65.js';
|
|
20
19
|
import '../task-graph-u1q9Jkyk.js';
|
|
21
20
|
|
|
22
21
|
interface GraphNode {
|
package/dist/storage/index.js
CHANGED
|
@@ -1322,39 +1322,41 @@ ${line}`;
|
|
|
1322
1322
|
}
|
|
1323
1323
|
async forget(scope, query, filePath) {
|
|
1324
1324
|
const file = this.resolveFile(filePath, scope);
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1325
|
+
return withFileLock(file, async () => {
|
|
1326
|
+
let existing;
|
|
1327
|
+
try {
|
|
1328
|
+
existing = await fsp.readFile(file, "utf8");
|
|
1329
|
+
} catch {
|
|
1330
|
+
return 0;
|
|
1331
|
+
}
|
|
1332
|
+
const needle = query.toLowerCase();
|
|
1333
|
+
const idMatcher = /mem_\d+_\w+/;
|
|
1334
|
+
let removed = 0;
|
|
1335
|
+
const lines = existing.split("\n").filter((line) => {
|
|
1336
|
+
const trimmed = line.trim();
|
|
1337
|
+
if (!trimmed.startsWith("- ")) return true;
|
|
1338
|
+
if (idMatcher.test(query)) {
|
|
1339
|
+
const entryIdMatch = /mem_\d+_\w+/.exec(trimmed);
|
|
1340
|
+
if (entryIdMatch && entryIdMatch[0] === query) {
|
|
1341
|
+
removed++;
|
|
1342
|
+
return false;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
if (trimmed.toLowerCase().includes(needle)) {
|
|
1340
1346
|
removed++;
|
|
1341
1347
|
return false;
|
|
1342
1348
|
}
|
|
1349
|
+
return true;
|
|
1350
|
+
});
|
|
1351
|
+
if (removed > 0) {
|
|
1352
|
+
if (lines.length === 0 || lines.length === 1 && !lines[0]?.trim()) {
|
|
1353
|
+
await atomicWrite(file, "");
|
|
1354
|
+
} else {
|
|
1355
|
+
await atomicWrite(file, lines.join("\n"));
|
|
1356
|
+
}
|
|
1343
1357
|
}
|
|
1344
|
-
|
|
1345
|
-
removed++;
|
|
1346
|
-
return false;
|
|
1347
|
-
}
|
|
1348
|
-
return true;
|
|
1358
|
+
return removed;
|
|
1349
1359
|
});
|
|
1350
|
-
if (removed > 0) {
|
|
1351
|
-
if (lines.length === 0 || lines.length === 1 && !lines[0]?.trim()) {
|
|
1352
|
-
await atomicWrite(file, "");
|
|
1353
|
-
} else {
|
|
1354
|
-
await atomicWrite(file, lines.join("\n"));
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
return removed;
|
|
1358
1360
|
}
|
|
1359
1361
|
async readAll(scope, filePath) {
|
|
1360
1362
|
const file = this.resolveFile(filePath, scope);
|
|
@@ -2067,7 +2069,7 @@ var SessionMemoryConsolidator = class {
|
|
|
2067
2069
|
for (const op of parsed.operations) {
|
|
2068
2070
|
switch (op.action) {
|
|
2069
2071
|
case "add": {
|
|
2070
|
-
if (op.text
|
|
2072
|
+
if (op.text?.trim()) {
|
|
2071
2073
|
await this.memoryStore.remember(op.text.trim(), void 0, {
|
|
2072
2074
|
type: op.type,
|
|
2073
2075
|
tags: op.tags,
|
|
@@ -2439,12 +2441,14 @@ var DefaultConfigLoader = class {
|
|
|
2439
2441
|
}
|
|
2440
2442
|
async load(opts = {}) {
|
|
2441
2443
|
let cfg = { ...BEHAVIOR_DEFAULTS };
|
|
2442
|
-
const [global, local] = await Promise.all([
|
|
2444
|
+
const [global, local, inProject] = await Promise.all([
|
|
2443
2445
|
this.readJson(this.paths.globalConfig),
|
|
2444
|
-
this.readJson(this.paths.projectLocalConfig)
|
|
2446
|
+
this.readJson(this.paths.projectLocalConfig),
|
|
2447
|
+
this.readJson(this.paths.inProjectConfig)
|
|
2445
2448
|
]);
|
|
2446
2449
|
cfg = deepMerge(cfg, global);
|
|
2447
2450
|
cfg = deepMerge(cfg, local);
|
|
2451
|
+
cfg = deepMerge(cfg, inProject);
|
|
2448
2452
|
for (const [key, fn] of Object.entries(ENV_MAP)) {
|
|
2449
2453
|
const v = process.env[key];
|
|
2450
2454
|
if (v) fn(cfg, v);
|
|
@@ -4597,6 +4601,7 @@ function resolveWstackPaths(opts) {
|
|
|
4597
4601
|
projectTrust: path12.join(projectDir, "trust.json"),
|
|
4598
4602
|
projectMeta: path12.join(projectDir, "meta.json"),
|
|
4599
4603
|
projectLocalConfig: path12.join(projectDir, "config.local.json"),
|
|
4604
|
+
inProjectConfig: path12.join(opts.projectRoot, ".wrongstack", "config.json"),
|
|
4600
4605
|
inProjectAgentsFile: path12.join(opts.projectRoot, ".wrongstack", "AGENTS.md"),
|
|
4601
4606
|
inProjectSkills: path12.join(opts.projectRoot, ".wrongstack", "skills"),
|
|
4602
4607
|
inProjectWorktrees: path12.join(opts.projectRoot, ".wrongstack", "worktrees"),
|
|
@@ -4671,16 +4676,20 @@ async function loadGoal(filePath) {
|
|
|
4671
4676
|
let raw;
|
|
4672
4677
|
try {
|
|
4673
4678
|
raw = await fsp.readFile(filePath, "utf8");
|
|
4674
|
-
} catch {
|
|
4675
|
-
|
|
4679
|
+
} catch (err) {
|
|
4680
|
+
const code = err.code;
|
|
4681
|
+
if (code === "ENOENT") return null;
|
|
4682
|
+
throw err;
|
|
4676
4683
|
}
|
|
4677
4684
|
try {
|
|
4678
4685
|
const parsed = JSON.parse(raw);
|
|
4679
4686
|
if (parsed?.version !== 1 || typeof parsed.goal !== "string" || !Array.isArray(parsed.journal)) {
|
|
4687
|
+
console.warn(`[goal-store] Corrupt goal.json at ${filePath} \u2014 invalid schema. Consider deleting it and re-creating.`);
|
|
4680
4688
|
return null;
|
|
4681
4689
|
}
|
|
4682
4690
|
return parsed;
|
|
4683
4691
|
} catch {
|
|
4692
|
+
console.warn(`[goal-store] Corrupt goal.json at ${filePath} \u2014 JSON parse failed. Consider deleting it and re-creating.`);
|
|
4684
4693
|
return null;
|
|
4685
4694
|
}
|
|
4686
4695
|
}
|
|
@@ -4829,7 +4838,7 @@ function computeTrend(history) {
|
|
|
4829
4838
|
const recent = history.slice(-5);
|
|
4830
4839
|
const deltas = [];
|
|
4831
4840
|
for (let i = 1; i < recent.length; i++) {
|
|
4832
|
-
deltas.push(recent[i]
|
|
4841
|
+
deltas.push((recent[i]?.progress ?? 0) - (recent[i - 1]?.progress ?? 0));
|
|
4833
4842
|
}
|
|
4834
4843
|
if (deltas.length < 2) return void 0;
|
|
4835
4844
|
const avgDelta = deltas.reduce((a, b) => a + b, 0) / deltas.length;
|