@wrongstack/core 0.273.1 → 0.274.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 (63) hide show
  1. package/dist/{agent-bridge-DpKIxHhE.d.ts → agent-bridge-DFo21wmY.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-Dx7fZ1bE.d.ts → agent-subagent-runner-BwmkIDEd.d.ts} +7 -7
  3. package/dist/{brain-BDcQaku-.d.ts → brain-gfZX3the.d.ts} +1 -1
  4. package/dist/{provider-model-resolve-Cz6OlIOp.d.ts → codex-catalog-CooZ6mOl.d.ts} +47 -4
  5. package/dist/{compactor-BuSdj3fq.d.ts → compactor-riTOds0f.d.ts} +1 -1
  6. package/dist/{config-CR2yoG8c.d.ts → config-BxcrDzri.d.ts} +7 -1
  7. package/dist/{context-DulAr8Zo.d.ts → context-DERiLofu.d.ts} +36 -1
  8. package/dist/coordination/index.d.ts +20 -16
  9. package/dist/coordination/index.js +1622 -1479
  10. package/dist/coordination/index.js.map +1 -1
  11. package/dist/defaults/index.d.ts +26 -26
  12. package/dist/defaults/index.js +1832 -1541
  13. package/dist/defaults/index.js.map +1 -1
  14. package/dist/execution/index.d.ts +15 -15
  15. package/dist/execution/index.js +2 -8
  16. package/dist/execution/index.js.map +1 -1
  17. package/dist/execution/prompt-enhancer.d.ts +1 -1
  18. package/dist/extension/index.d.ts +6 -6
  19. package/dist/{global-mailbox-CwcubDkA.d.ts → global-mailbox-Cr8TW4t_.d.ts} +1 -1
  20. package/dist/{goal-preamble-Bu0a2uCG.d.ts → goal-preamble-CEhROp1e.d.ts} +9 -9
  21. package/dist/{goal-store-CTmFuZ8J.d.ts → goal-store-xNSVxmpV.d.ts} +1 -1
  22. package/dist/hq/index.d.ts +5 -5
  23. package/dist/{index-CTq5wU3m.d.ts → index-00KPKAlm.d.ts} +5 -5
  24. package/dist/{index-CxP-HBhX.d.ts → index-pDBSBE1r.d.ts} +2 -2
  25. package/dist/index.d.ts +49 -43
  26. package/dist/index.js +1973 -1444
  27. package/dist/index.js.map +1 -1
  28. package/dist/infrastructure/index.d.ts +6 -6
  29. package/dist/kernel/index.d.ts +11 -11
  30. package/dist/{mcp-servers-BQaOE71z.d.ts → mcp-servers-BIwRiOxe.d.ts} +3 -3
  31. package/dist/models/index.d.ts +5 -5
  32. package/dist/models/index.js +40 -2
  33. package/dist/models/index.js.map +1 -1
  34. package/dist/{models-registry-BEcny4kP.d.ts → models-registry-8OorW51H.d.ts} +1 -1
  35. package/dist/{multi-agent-coordinator-Bx8EFkv2.d.ts → multi-agent-coordinator-CNx48Zoz.d.ts} +1 -1
  36. package/dist/{null-fleet-bus-BC5ZXCQw.d.ts → null-fleet-bus-B4ZUJYL6.d.ts} +6 -6
  37. package/dist/observability/index.d.ts +2 -2
  38. package/dist/{parallel-eternal-engine-C345TI3n.d.ts → parallel-eternal-engine-rsIclDqO.d.ts} +9 -9
  39. package/dist/{path-resolver-C-W_wzkF.d.ts → path-resolver-BqU-fwzD.d.ts} +3 -3
  40. package/dist/{permission-CsBGZkxp.d.ts → permission-Dgs3v-Xq.d.ts} +1 -1
  41. package/dist/{permission-policy-g3Sg0GdZ.d.ts → permission-policy-Dtht2k0e.d.ts} +2 -2
  42. package/dist/{pipeline-xnw_24Z8.d.ts → pipeline-B-dpCFYS.d.ts} +2 -2
  43. package/dist/{plan-templates-DGaiYEcS.d.ts → plan-templates-B7MxyY2o.d.ts} +32 -5
  44. package/dist/{provider-runner-7J0HqF6B.d.ts → provider-runner-DrmpBE5l.d.ts} +3 -3
  45. package/dist/{retry-policy-kqXJOVkX.d.ts → retry-policy-hYxsm10a.d.ts} +1 -1
  46. package/dist/sdd/index.d.ts +12 -10
  47. package/dist/sdd/index.js +7 -0
  48. package/dist/sdd/index.js.map +1 -1
  49. package/dist/{secret-vault-CMQUr-eB.d.ts → secret-vault-DnqIFhPF.d.ts} +1 -1
  50. package/dist/security/index.d.ts +5 -5
  51. package/dist/{selector-B4r34PWR.d.ts → selector-D21RjDIg.d.ts} +1 -1
  52. package/dist/{session-event-bridge-BD3LoyLC.d.ts → session-event-bridge-Dt54CTvq.d.ts} +1 -1
  53. package/dist/{session-reader-DjrKGD9c.d.ts → session-reader-CceH13Kq.d.ts} +5 -4
  54. package/dist/storage/index.d.ts +46 -12
  55. package/dist/storage/index.js +1987 -1548
  56. package/dist/storage/index.js.map +1 -1
  57. package/dist/tools/index.d.ts +2 -2
  58. package/dist/types/index.d.ts +19 -19
  59. package/dist/types/index.js +134 -42
  60. package/dist/types/index.js.map +1 -1
  61. package/dist/utils/index.d.ts +2 -2
  62. package/dist/{worktree-manager-DHdrWQ_7.d.ts → worktree-manager-DUfBbKzk.d.ts} +1 -1
  63. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { S as SecretScrubber } from './permission-CsBGZkxp.js';
1
+ import { S as SecretScrubber } from './permission-Dgs3v-Xq.js';
2
2
  import { L as Logger } from './logger-B63L5bTg.js';
3
3
  import { R as RotatableSecretVault, S as SecretVault } from './secret-vault-BAKpgFw_.js';
4
4
 
@@ -1,8 +1,8 @@
1
- export { a as DefaultSecretScrubber, D as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted, b as rotateConfigKeys } from '../secret-vault-CMQUr-eB.js';
2
- export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-g3Sg0GdZ.js';
3
- export { D as DANGEROUS_FOR_SUBAGENTS, T as ToolCapabilities, a as ToolCapability, g as getDangerousCapabilities, h as hasCapability, b as hasDangerousCapabilityForSubagents } from '../index-CxP-HBhX.js';
4
- import '../permission-CsBGZkxp.js';
5
- import '../context-DulAr8Zo.js';
1
+ export { a as DefaultSecretScrubber, D as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted, b as rotateConfigKeys } from '../secret-vault-DnqIFhPF.js';
2
+ export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-Dtht2k0e.js';
3
+ export { D as DANGEROUS_FOR_SUBAGENTS, T as ToolCapabilities, a as ToolCapability, g as getDangerousCapabilities, h as hasCapability, b as hasDangerousCapabilityForSubagents } from '../index-pDBSBE1r.js';
4
+ import '../permission-Dgs3v-Xq.js';
5
+ import '../context-DERiLofu.js';
6
6
  import '../logger-B63L5bTg.js';
7
7
  import '../secret-vault-BAKpgFw_.js';
8
8
  import '../input-reader-E-ffP2ee.js';
@@ -1,4 +1,4 @@
1
- import { M as Message } from './context-DulAr8Zo.js';
1
+ import { M as Message } from './context-DERiLofu.js';
2
2
 
3
3
  /**
4
4
  * Result of LLM-driven message importance analysis.
@@ -1,4 +1,4 @@
1
- import { S as SessionEvent, b as SessionWriter } from './context-DulAr8Zo.js';
1
+ import { S as SessionEvent, b as SessionWriter } from './context-DERiLofu.js';
2
2
 
3
3
  type AuditLevel = 'minimal' | 'standard' | 'full';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { i as ContentBlock, S as SessionEvent, j as SessionMetadata, k as SessionStore } from './context-DulAr8Zo.js';
1
+ import { i as ContentBlock, S as SessionEvent, j as SessionMetadata, k as SessionStore } from './context-DERiLofu.js';
2
2
 
3
3
  type AttachmentKind = 'text' | 'image' | 'file';
4
4
  interface AttachmentMeta {
@@ -137,13 +137,14 @@ interface DefaultSessionReaderOptions {
137
137
  * L2-A: read-only view over a `SessionStore` with query, replay, search,
138
138
  * and export helpers. Implemented on top of the public `SessionStore`
139
139
  * surface so any concrete store can be inspected without re-implementation.
140
- *
141
- * The heavy operations re-parse the JSONL stream on every call — fine for
142
- * /resume and one-off analytics. Wrap with a memoizing decorator if needed.
143
140
  */
144
141
  declare class DefaultSessionReader implements SessionReader {
145
142
  private readonly store;
143
+ private readonly eventCache;
144
+ private readonly eventCacheMtimes;
145
+ private static readonly EVENT_CACHE_MAX_ENTRIES;
146
146
  constructor(opts: DefaultSessionReaderOptions);
147
+ private loadCachedSessionData;
147
148
  query(q?: SessionQuery): Promise<SessionSummaryLite[]>;
148
149
  replay(sessionId: string): AsyncIterable<SessionEvent>;
149
150
  search(q: SessionSearchQuery, sessionId?: string | undefined, sessionQuery?: SessionQuery): Promise<SessionSearchHit[]>;
@@ -1,20 +1,20 @@
1
- import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-DGaiYEcS.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-DGaiYEcS.js';
3
- import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../brain-BDcQaku-.js';
4
- import { i as AgentExtension, k as AfterRunHook } from '../index-CTq5wU3m.js';
5
- import { P as Provider, c as Request, d as Response, S as SessionEvent } from '../context-DulAr8Zo.js';
6
- export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-DjrKGD9c.js';
1
+ import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../plan-templates-B7MxyY2o.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-B7MxyY2o.js';
3
+ import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../brain-gfZX3the.js';
4
+ import { i as AgentExtension, k as AfterRunHook } from '../index-00KPKAlm.js';
5
+ import { P as Provider, c as Request, d as Response, S as SessionEvent } from '../context-DERiLofu.js';
6
+ export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-CceH13Kq.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-CTmFuZ8J.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-xNSVxmpV.js';
11
11
  import { W as WstackPaths } from '../wstack-paths-BqkDAkoh.js';
12
- import { Y as SyncCategory, l as SyncConfig } from '../config-CR2yoG8c.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-BD3LoyLC.js';
14
- import '../permission-CsBGZkxp.js';
12
+ import { Y as SyncCategory, l as SyncConfig } from '../config-BxcrDzri.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-Dt54CTvq.js';
14
+ import '../permission-Dgs3v-Xq.js';
15
15
  import '../secret-vault-BAKpgFw_.js';
16
16
  import '../logger-B63L5bTg.js';
17
- import '../pipeline-xnw_24Z8.js';
17
+ import '../pipeline-B-dpCFYS.js';
18
18
  import '../mailbox-types-Ct2hJq0P.js';
19
19
  import '../observability-D-HZN_mF.js';
20
20
  import '../task-graph-u1q9Jkyk.js';
@@ -81,6 +81,14 @@ declare class GraphMemoryBackend implements MemoryBackend {
81
81
  private edges;
82
82
  private loadedScope;
83
83
  private loaded;
84
+ /**
85
+ * Inverted index for O(1) term → node lookup during search.
86
+ * Built incrementally on remember/forget, rebuilt on loadGraph if absent.
87
+ * Maps lowercase term (min 3 chars) → Set of node IDs containing that term.
88
+ */
89
+ private invertedIndex;
90
+ /** Minimum term length to index — avoids noise from 1-2 char fragments. */
91
+ private static readonly MIN_TERM_LEN;
84
92
  /**
85
93
  * Promise that resolves when the current in-flight _saveGraph completes.
86
94
  * Tests call flush() to await this before deleting the backend or its temp dir.
@@ -115,6 +123,30 @@ declare class GraphMemoryBackend implements MemoryBackend {
115
123
  * Call this before deleting the backend or its temp directory.
116
124
  */
117
125
  flush(): Promise<void>;
126
+ /**
127
+ * Build the inverted index from all currently loaded nodes.
128
+ * Called on loadGraph() to reconstruct the index after loading from disk.
129
+ */
130
+ private buildInvertedIndex;
131
+ /**
132
+ * Index a node in the inverted index. Adds the node's ID to all term entries.
133
+ */
134
+ private indexNode;
135
+ /**
136
+ * Remove a node's terms from the inverted index before deleting it.
137
+ * Used in forget() and when updating existing nodes.
138
+ */
139
+ private removeNodeFromIndex;
140
+ /**
141
+ * Update an existing node's entries in the inverted index.
142
+ * Removes old terms and adds new ones.
143
+ */
144
+ private updateNodeIndex;
145
+ /**
146
+ * Extract searchable terms from a memory entry.
147
+ * Returns lowercase words from text (min length) and full tag strings.
148
+ */
149
+ private extractTerms;
118
150
  }
119
151
 
120
152
  interface ConsolidationOp {
@@ -324,7 +356,7 @@ declare class ReplayLogStore {
324
356
  private readonly events;
325
357
  private readonly traceId;
326
358
  private readonly writeChains;
327
- /** Per-session hash → entry index, kept in memory after the first load. */
359
+ /** Per-session hash → on-disk location, with lazy entry hydration. */
328
360
  private readonly cache;
329
361
  /** Per-session entry count on disk, to detect when compaction is needed. */
330
362
  private readonly diskCount;
@@ -360,9 +392,11 @@ declare class ReplayLogStore {
360
392
  }>>;
361
393
  private filePath;
362
394
  private countEntries;
395
+ private parseReplayLine;
363
396
  private readAll;
364
397
  private writeAll;
365
398
  private ensureCache;
399
+ private hydrateEntry;
366
400
  private enqueue;
367
401
  }
368
402