@wrongstack/core 0.257.2 → 0.260.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-BrxWHEOm.d.ts → agent-bridge-BbskZ7HH.d.ts} +1 -1
- package/dist/{agent-subagent-runner-US741uBH.d.ts → agent-subagent-runner-BNIGZx18.d.ts} +28 -8
- package/dist/{brain-TjEEwSpw.d.ts → brain-C2yDd7Lw.d.ts} +58 -1
- package/dist/{compactor-C5sT4U7I.d.ts → compactor-t0R_AIt_.d.ts} +1 -1
- package/dist/{config-DuAu23zm.d.ts → config-FG6As4H5.d.ts} +1 -1
- package/dist/{context-CGdgA0q6.d.ts → context-JFOVvu6z.d.ts} +22 -0
- package/dist/coordination/index.d.ts +14 -14
- package/dist/coordination/index.js +189 -28
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +25 -25
- package/dist/defaults/index.js +881 -83
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +15 -15
- package/dist/execution/index.js +108 -26
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{goal-preamble-CznHTZqP.d.ts → goal-preamble-B1IXJtLX.d.ts} +9 -9
- package/dist/{goal-store-CV9Yz2X_.d.ts → goal-store-CPXz6Mml.d.ts} +4 -2
- package/dist/{index-CitPrI3a.d.ts → index-BPcg4N3M.d.ts} +5 -5
- package/dist/{index-CC0Mcm05.d.ts → index-CebbJB94.d.ts} +8 -8
- package/dist/index.d.ts +44 -42
- package/dist/index.js +1452 -274
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js.map +1 -1
- package/dist/{llm-selector-CJ4SyAFE.d.ts → llm-selector-DXxI2tlu.d.ts} +2 -2
- package/dist/{mcp-servers-D8YnLaEp.d.ts → mcp-servers-OwNHo43-.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/{models-registry-ByZCdFuQ.d.ts → models-registry-Djlmq4uB.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-DqTUEAeC.d.ts → multi-agent-coordinator-CEmrSCMJ.d.ts} +1 -1
- package/dist/{null-fleet-bus-B5mfTJXT.d.ts → null-fleet-bus-DT92xqgJ.d.ts} +13 -8
- package/dist/observability/index.d.ts +2 -2
- package/dist/{package-outdated-watcher-BSgR_kK-.d.ts → package-outdated-watcher-C70ag2G9.d.ts} +3 -3
- package/dist/{parallel-eternal-engine-C0juOszP.d.ts → parallel-eternal-engine-0SItuq5r.d.ts} +13 -9
- package/dist/{path-resolver-CbkT-RMU.d.ts → path-resolver-DKBh6Jlo.d.ts} +3 -3
- package/dist/{permission-CwBBpCoF.d.ts → permission-BJ7eO9Vl.d.ts} +1 -1
- package/dist/{permission-policy-B8rSu908.d.ts → permission-policy-DEXOfnpm.d.ts} +3 -2
- package/dist/{pipeline-JG8XoudC.d.ts → pipeline-zflkI2dp.d.ts} +2 -2
- package/dist/{plan-templates-DPiQMkBz.d.ts → plan-templates-BFXyRkEK.d.ts} +32 -11
- package/dist/{provider-runner-hM7EXlLI.d.ts → provider-runner-BC-uywtT.d.ts} +3 -3
- package/dist/{retry-policy-Tg7LXkoK.d.ts → retry-policy-Cavrzmtk.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +20 -2
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-gxtFZYBt.d.ts → secret-vault-CDvDYXWX.d.ts} +1 -1
- package/dist/security/index.d.ts +4 -4
- package/dist/security/index.js +30 -1
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-DWsqVjGf.d.ts → selector-B7AivHsu.d.ts} +1 -1
- package/dist/{session-event-bridge-BAFWdgQ3.d.ts → session-event-bridge-BmIDxdJd.d.ts} +1 -1
- package/dist/{session-reader-CqRvaL5v.d.ts → session-reader-DtofsB-2.d.ts} +1 -1
- package/dist/storage/index.d.ts +30 -21
- package/dist/storage/index.js +1264 -216
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/package.json +1 -1
- package/skills/output-standards/SKILL.md +14 -9
- package/skills/output-standards/SKILL.save.md +3 -2
|
@@ -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-JFOVvu6z.js';
|
|
2
2
|
|
|
3
3
|
type AttachmentKind = 'text' | 'image' | 'file';
|
|
4
4
|
interface AttachmentMeta {
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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 mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../plan-templates-
|
|
3
|
-
import { M as MemoryScope, k as MemoryEntry, l as MemoryStore, E as EventBus } 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-BFXyRkEK.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 mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../plan-templates-BFXyRkEK.js';
|
|
3
|
+
import { M as MemoryScope, k as MemoryEntry, l as MemoryStore, E as EventBus } from '../brain-C2yDd7Lw.js';
|
|
4
|
+
import { l as AgentExtension, j as AfterRunHook } from '../index-BPcg4N3M.js';
|
|
5
|
+
import { P as Provider, R as Request, b as Response, S as SessionEvent } from '../context-JFOVvu6z.js';
|
|
6
|
+
export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-DtofsB-2.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
|
-
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-
|
|
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-CPXz6Mml.js';
|
|
11
11
|
import { W as WstackPaths } from '../wstack-paths-CJjEwPXn.js';
|
|
12
|
-
import { E as SyncCategory, k as SyncConfig } from '../config-
|
|
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-
|
|
12
|
+
import { E as SyncCategory, k as SyncConfig } from '../config-FG6As4H5.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-BmIDxdJd.js';
|
|
14
|
+
import '../permission-BJ7eO9Vl.js';
|
|
15
15
|
import '../secret-vault-BJDY28ev.js';
|
|
16
16
|
import '../logger-B63L5bTg.js';
|
|
17
|
-
import '../pipeline-
|
|
17
|
+
import '../pipeline-zflkI2dp.js';
|
|
18
18
|
import '../observability-D-HZN_mF.js';
|
|
19
19
|
import '../task-graph-u1q9Jkyk.js';
|
|
20
20
|
|
|
@@ -186,16 +186,23 @@ interface Annotation {
|
|
|
186
186
|
interface AnnotationsStoreOptions {
|
|
187
187
|
/** Directory where `<sessionId>.annotations.json` files live. */
|
|
188
188
|
dir: string;
|
|
189
|
+
events?: EventBus;
|
|
190
|
+
traceId?: string;
|
|
189
191
|
}
|
|
190
192
|
declare class AnnotationsStore {
|
|
191
193
|
private readonly dir;
|
|
194
|
+
private readonly events;
|
|
195
|
+
private readonly traceId;
|
|
192
196
|
/** Per-session write queue. Created lazily on first add. */
|
|
193
197
|
private readonly writeChains;
|
|
194
198
|
constructor(opts: AnnotationsStoreOptions);
|
|
195
199
|
/**
|
|
196
200
|
* Return all annotations for `sessionId` in insertion order
|
|
197
201
|
* (oldest first). Returns an empty array when no file exists
|
|
198
|
-
* yet (the normal case for a fresh session)
|
|
202
|
+
* yet (the normal case for a fresh session) and also degrades
|
|
203
|
+
* gracefully to `[]` on a read error (permissions, corruption) —
|
|
204
|
+
* the failure is still surfaced via a `storage.read` event so it
|
|
205
|
+
* never silently hides I/O problems from observers.
|
|
199
206
|
*/
|
|
200
207
|
list(sessionId: string): Promise<Annotation[]>;
|
|
201
208
|
/**
|
|
@@ -279,9 +286,13 @@ interface ReplayLogStoreOptions {
|
|
|
279
286
|
* session which is a reasonable upper bound.
|
|
280
287
|
*/
|
|
281
288
|
maxEntries?: number | undefined;
|
|
289
|
+
events?: EventBus;
|
|
290
|
+
traceId?: string;
|
|
282
291
|
}
|
|
283
292
|
declare class ReplayLogStore {
|
|
284
293
|
private readonly dir;
|
|
294
|
+
private readonly events;
|
|
295
|
+
private readonly traceId;
|
|
285
296
|
private readonly writeChains;
|
|
286
297
|
/** Per-session hash → entry index, kept in memory after the first load. */
|
|
287
298
|
private readonly cache;
|
|
@@ -299,12 +310,6 @@ declare class ReplayLogStore {
|
|
|
299
310
|
request: Request;
|
|
300
311
|
response: Response;
|
|
301
312
|
}): Promise<string>;
|
|
302
|
-
/**
|
|
303
|
-
* Compact the replay log to keep only the most recent maxEntries.
|
|
304
|
-
* Called when entry count exceeds the cap. Rewrites the entire file
|
|
305
|
-
* but only happens O(n / maxEntries) times per session.
|
|
306
|
-
*/
|
|
307
|
-
private rewriteCache;
|
|
308
313
|
/**
|
|
309
314
|
* Look up an entry by hash. Returns `null` when the request has
|
|
310
315
|
* not been recorded for this session. O(1) after the first call
|
|
@@ -491,9 +496,13 @@ interface ToolAuditLogOptions {
|
|
|
491
496
|
* Set to `Infinity` to disable periodic fsync (fastest, but highest data-loss risk).
|
|
492
497
|
*/
|
|
493
498
|
fsyncEvery?: number | undefined;
|
|
499
|
+
events?: EventBus;
|
|
500
|
+
traceId?: string;
|
|
494
501
|
}
|
|
495
502
|
declare class ToolAuditLog {
|
|
496
503
|
private readonly dir;
|
|
504
|
+
private readonly events;
|
|
505
|
+
private readonly traceId;
|
|
497
506
|
/** In-memory cache of the last entry's hash (per session), to compute chains efficiently. */
|
|
498
507
|
private readonly tailHash;
|
|
499
508
|
/** In-memory counter for entry indices — avoids re-reading the file on every write. */
|
|
@@ -687,12 +696,12 @@ interface TaskFile {
|
|
|
687
696
|
}
|
|
688
697
|
declare function emptyTaskFile(sessionId: string): TaskFile;
|
|
689
698
|
/** Read the task file. Returns null when the file doesn't exist. */
|
|
690
|
-
declare function loadTasks(filePath: string): Promise<TaskFile | null>;
|
|
699
|
+
declare function loadTasks(filePath: string, events?: EventBus, traceId?: string): Promise<TaskFile | null>;
|
|
691
700
|
/**
|
|
692
701
|
* Write the task file atomically. Prefer `mutateTasks` for read-modify-write
|
|
693
702
|
* cycles — this low-level function does NOT acquire a lock.
|
|
694
703
|
*/
|
|
695
|
-
declare function saveTasks(filePath: string, tasks: TaskFile): Promise<void>;
|
|
704
|
+
declare function saveTasks(filePath: string, tasks: TaskFile, events?: EventBus, traceId?: string): Promise<void>;
|
|
696
705
|
/**
|
|
697
706
|
* Load, modify, and save the task file under a file-level lock.
|
|
698
707
|
* `fn` receives the current TaskFile (or a fresh empty one) and must
|
|
@@ -702,7 +711,7 @@ declare function saveTasks(filePath: string, tasks: TaskFile): Promise<void>;
|
|
|
702
711
|
* This is the primary API for any code path that reads *and then writes*
|
|
703
712
|
* the task file — it prevents races from parallel `batch_tool_use` calls.
|
|
704
713
|
*/
|
|
705
|
-
declare function mutateTasks(filePath: string, sessionId: string, fn: (file: TaskFile) => TaskFile | Promise<TaskFile
|
|
714
|
+
declare function mutateTasks(filePath: string, sessionId: string, fn: (file: TaskFile) => TaskFile | Promise<TaskFile>, events?: EventBus, traceId?: string): Promise<TaskFile>;
|
|
706
715
|
|
|
707
716
|
interface PromptEntry {
|
|
708
717
|
id: string;
|