@wrongstack/core 0.269.0 → 0.272.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.
Files changed (76) hide show
  1. package/dist/{agent-bridge-PcHQl_UQ.d.ts → agent-bridge-jVSZiygR.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-SHJW7t8q.d.ts → agent-subagent-runner-DOLIwBRo.d.ts} +7 -7
  3. package/dist/{brain-BYcK__Ym.d.ts → brain-CdbbJWi3.d.ts} +71 -1
  4. package/dist/{compactor-C2RKEBtC.d.ts → compactor-72ug-ZRB.d.ts} +1 -1
  5. package/dist/{config-C_ae2k86.d.ts → config-D2DGoGSQ.d.ts} +29 -2
  6. package/dist/{context-Dp87Bcaq.d.ts → context-Dw55zZ_Q.d.ts} +110 -1
  7. package/dist/coordination/index.d.ts +121 -17
  8. package/dist/coordination/index.js +738 -74
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +25 -25
  11. package/dist/defaults/index.js +599 -86
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/execution/index.d.ts +23 -18
  14. package/dist/execution/index.js +136 -41
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/execution/prompt-enhancer.d.ts +36 -6
  17. package/dist/execution/prompt-enhancer.js +35 -9
  18. package/dist/execution/prompt-enhancer.js.map +1 -1
  19. package/dist/extension/index.d.ts +6 -6
  20. package/dist/{global-mailbox-Bvrz1P3f.d.ts → global-mailbox-CQj_C9Dp.d.ts} +139 -3
  21. package/dist/{goal-preamble-CA_4yiGQ.d.ts → goal-preamble-ZXDjjR1y.d.ts} +9 -9
  22. package/dist/{goal-store-DhuJoUNG.d.ts → goal-store-CcJBd-g1.d.ts} +1 -1
  23. package/dist/hq/index.d.ts +93 -6
  24. package/dist/hq/index.js +619 -49
  25. package/dist/hq/index.js.map +1 -1
  26. package/dist/{index-whDfTANu.d.ts → index-2Lhk5v0o.d.ts} +2 -2
  27. package/dist/{index-CZQ6Pwbs.d.ts → index-BL7BAx0p.d.ts} +8 -8
  28. package/dist/{index-W4VJCzHa.d.ts → index-Qo4kTzgw.d.ts} +5 -5
  29. package/dist/index.d.ts +96 -56
  30. package/dist/index.js +1941 -352
  31. package/dist/index.js.map +1 -1
  32. package/dist/infrastructure/index.d.ts +6 -6
  33. package/dist/infrastructure/index.js +5 -3
  34. package/dist/infrastructure/index.js.map +1 -1
  35. package/dist/kernel/index.d.ts +9 -9
  36. package/dist/kernel/index.js.map +1 -1
  37. package/dist/{mcp-servers-DJdZiRcv.d.ts → mcp-servers-DS-YUXvF.d.ts} +3 -3
  38. package/dist/models/index.d.ts +5 -5
  39. package/dist/models/index.js +28 -5
  40. package/dist/models/index.js.map +1 -1
  41. package/dist/{models-registry-C3a-2-Yd.d.ts → models-registry-DP6pGHet.d.ts} +1 -1
  42. package/dist/{multi-agent-coordinator-CJSpTe5O.d.ts → multi-agent-coordinator-BvbdNQ14.d.ts} +1 -1
  43. package/dist/{null-fleet-bus-QVshIsDx.d.ts → null-fleet-bus-BxTfXBKo.d.ts} +6 -6
  44. package/dist/observability/index.d.ts +2 -2
  45. package/dist/{parallel-eternal-engine-D9y5Pkcc.d.ts → parallel-eternal-engine-Cf-GTegR.d.ts} +9 -9
  46. package/dist/{path-resolver-CnQ8SIfh.d.ts → path-resolver-DztfnFcv.d.ts} +3 -3
  47. package/dist/{permission-CvYQNUqZ.d.ts → permission-CC7XFYWG.d.ts} +1 -1
  48. package/dist/{permission-policy-D5Ss8j4B.d.ts → permission-policy-cYR4RJmw.d.ts} +2 -2
  49. package/dist/{pipeline-l_zzFRh3.d.ts → pipeline-sNIkhXeB.d.ts} +2 -2
  50. package/dist/{plan-templates-NtPgyeJA.d.ts → plan-templates-DYiKFmEb.d.ts} +11 -5
  51. package/dist/{provider-model-resolve-d5poT5y0.d.ts → provider-model-resolve-dYAbTs_i.d.ts} +3 -3
  52. package/dist/{provider-runner-gkctlQV_.d.ts → provider-runner-Dw8x0F7u.d.ts} +3 -3
  53. package/dist/{retry-policy-CtFhfwa8.d.ts → retry-policy-BV7nzeAd.d.ts} +1 -1
  54. package/dist/sdd/index.d.ts +8 -8
  55. package/dist/sdd/index.js +2 -0
  56. package/dist/sdd/index.js.map +1 -1
  57. package/dist/{secret-vault-BLsVmTIK.d.ts → secret-vault-eMBKfheR.d.ts} +9 -1
  58. package/dist/security/index.d.ts +5 -5
  59. package/dist/security/index.js +137 -10
  60. package/dist/security/index.js.map +1 -1
  61. package/dist/{selector-CXl2_y9W.d.ts → selector-C4ORTOid.d.ts} +1 -1
  62. package/dist/{session-event-bridge-Ccud20CC.d.ts → session-event-bridge-CeNpUL9w.d.ts} +1 -1
  63. package/dist/{session-reader-ZeXQmsmE.d.ts → session-reader-BepLSnGL.d.ts} +1 -1
  64. package/dist/storage/index.d.ts +45 -13
  65. package/dist/storage/index.js +374 -113
  66. package/dist/storage/index.js.map +1 -1
  67. package/dist/tools/index.d.ts +2 -2
  68. package/dist/tools/index.js +9 -2
  69. package/dist/tools/index.js.map +1 -1
  70. package/dist/types/index.d.ts +19 -19
  71. package/dist/types/index.js +202 -41
  72. package/dist/types/index.js.map +1 -1
  73. package/dist/utils/index.d.ts +17 -4
  74. package/dist/utils/index.js +48 -9
  75. package/dist/utils/index.js.map +1 -1
  76. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as Message } from './context-Dp87Bcaq.js';
1
+ import { M as Message } from './context-Dw55zZ_Q.js';
2
2
 
3
3
  /**
4
4
  * Result of LLM-driven message importance analysis.
@@ -1,4 +1,4 @@
1
- import { S as SessionEvent, a as SessionWriter } from './context-Dp87Bcaq.js';
1
+ import { S as SessionEvent, b as SessionWriter } from './context-Dw55zZ_Q.js';
2
2
 
3
3
  type AuditLevel = 'minimal' | 'standard' | 'full';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { g as ContentBlock, S as SessionEvent, h as SessionMetadata, i as SessionStore } from './context-Dp87Bcaq.js';
1
+ import { i as ContentBlock, S as SessionEvent, j as SessionMetadata, k as SessionStore } from './context-Dw55zZ_Q.js';
2
2
 
3
3
  type AttachmentKind = 'text' | 'image' | 'file';
4
4
  interface AttachmentMeta {
@@ -1,24 +1,41 @@
1
- import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-NtPgyeJA.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-NtPgyeJA.js';
3
- import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../brain-BYcK__Ym.js';
4
- import { l as AgentExtension, j as AfterRunHook } from '../index-W4VJCzHa.js';
5
- import { P as Provider, R as Request, b as Response, S as SessionEvent } from '../context-Dp87Bcaq.js';
6
- export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-ZeXQmsmE.js';
1
+ import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-DYiKFmEb.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-DYiKFmEb.js';
3
+ import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../brain-CdbbJWi3.js';
4
+ import { l as AgentExtension, j as AfterRunHook } from '../index-Qo4kTzgw.js';
5
+ import { P as Provider, c as Request, d as Response, S as SessionEvent } from '../context-Dw55zZ_Q.js';
6
+ export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-BepLSnGL.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-DhuJoUNG.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-CcJBd-g1.js';
11
11
  import { W as WstackPaths } from '../wstack-paths-hOpNLmvf.js';
12
- import { U as SyncCategory, l as SyncConfig } from '../config-C_ae2k86.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-Ccud20CC.js';
14
- import '../permission-CvYQNUqZ.js';
12
+ import { V as SyncCategory, l as SyncConfig } from '../config-D2DGoGSQ.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-CeNpUL9w.js';
14
+ import '../permission-CC7XFYWG.js';
15
15
  import '../secret-vault-BAKpgFw_.js';
16
16
  import '../logger-B63L5bTg.js';
17
- import '../pipeline-l_zzFRh3.js';
17
+ import '../pipeline-sNIkhXeB.js';
18
18
  import '../mailbox-types-Ct2hJq0P.js';
19
19
  import '../observability-D-HZN_mF.js';
20
20
  import '../task-graph-u1q9Jkyk.js';
21
21
 
22
+ /** Sanitize a model name for use in filenames: alphanumeric + dash + underscore. */
23
+ declare function sanitizeModel(model: string): string;
24
+ /**
25
+ * Generate a session ID in the format:
26
+ * `YYYY-MM-DD/HH-MM-SSZ[_model]_xxxx.jsonl`
27
+ *
28
+ * Examples:
29
+ * `2026-06-06/12-30-45Z_claude-sonnet_a1b2.jsonl`
30
+ * `2026-06-06/14-22-10Z_a1b2.jsonl` (no model)
31
+ *
32
+ * The date prefix becomes a subdirectory so sessions group naturally by day.
33
+ * The model name (when available) lets you see at a glance which provider was
34
+ * used, without opening the file. The 4-byte random suffix prevents collisions
35
+ * within the same second.
36
+ */
37
+ declare function generateSessionId(startedAt: string, model?: string): string;
38
+
22
39
  interface GraphNode {
23
40
  id: string;
24
41
  entry: MemoryEntry;
@@ -64,6 +81,12 @@ declare class GraphMemoryBackend implements MemoryBackend {
64
81
  private edges;
65
82
  private loadedScope;
66
83
  private loaded;
84
+ /**
85
+ * Promise that resolves when the current in-flight _saveGraph completes.
86
+ * Tests call flush() to await this before deleting the backend or its temp dir.
87
+ * Each save operation chains onto the previous one so concurrent saves are serialised.
88
+ */
89
+ private _saveDone;
67
90
  constructor(opts: GraphMemoryBackendOptions);
68
91
  remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
69
92
  forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
@@ -85,7 +108,13 @@ declare class GraphMemoryBackend implements MemoryBackend {
85
108
  };
86
109
  private nodeId;
87
110
  private loadGraph;
88
- private saveGraph;
111
+ /** Fire-and-forget graph persistence. Named _saveGraph to signal it must not be awaited. */
112
+ private _saveGraph;
113
+ /**
114
+ * Wait for all in-flight _saveGraph operations to complete.
115
+ * Call this before deleting the backend or its temp directory.
116
+ */
117
+ flush(): Promise<void>;
89
118
  }
90
119
 
91
120
  interface ConsolidationOp {
@@ -723,6 +752,7 @@ declare class AgentStatusTracker {
723
752
  private readonly registry;
724
753
  private readonly leaderName;
725
754
  private agents;
755
+ private lastAgents;
726
756
  private leaderStatus;
727
757
  private leaderCurrentTool;
728
758
  private leaderIterations;
@@ -738,6 +768,8 @@ declare class AgentStatusTracker {
738
768
  private sweepTimer;
739
769
  private partialTimer;
740
770
  constructor(opts: AgentStatusTrackerOptions);
771
+ /** Current full agent list (leader + subagents) as of the last flush. */
772
+ getAgents(): AgentEntry[];
741
773
  start(): void;
742
774
  stop(): void;
743
775
  /**
@@ -902,4 +934,4 @@ declare class CloudSync {
902
934
  private walkDir;
903
935
  }
904
936
 
905
- export { ALL_SYNC_CATEGORIES, type AgentEntry, type AgentLiveStatus, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, CloudSync, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, MemoryBackend, type MemoryConsolidatorOptions, type PromptEntry, type PromptStore, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, type SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRegistryEntry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, emptyTaskFile, getSessionRegistry, hasSessionRegistry, loadTasks, mutateTasks, saveTasks };
937
+ export { ALL_SYNC_CATEGORIES, type AgentEntry, type AgentLiveStatus, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, CloudSync, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, MemoryBackend, type MemoryConsolidatorOptions, type PromptEntry, type PromptStore, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, type SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRegistryEntry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, emptyTaskFile, generateSessionId, getSessionRegistry, hasSessionRegistry, loadTasks, mutateTasks, sanitizeModel, saveTasks };