@wrongstack/core 0.306.3 → 0.307.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 (114) hide show
  1. package/dist/chronicle/index.js +957 -953
  2. package/dist/chronicle/metrics-ingest.d.ts +55 -0
  3. package/dist/chronicle/metrics-schema.d.ts +86 -0
  4. package/dist/chronicle/metrics-store.d.ts +5 -120
  5. package/dist/chronicle/project-server.js +1083 -1084
  6. package/dist/chronicle/sqlite-journal-quota.d.ts +39 -0
  7. package/dist/chronicle/sqlite-journal-schema.d.ts +25 -0
  8. package/dist/chronicle/sqlite-journal.d.ts +12 -177
  9. package/dist/coordination/agents/index.js +1738 -1690
  10. package/dist/coordination/agents/project-agent-capture.d.ts +48 -0
  11. package/dist/coordination/agents/project-agent-identity.d.ts +3 -129
  12. package/dist/coordination/agents/project-agent-roster.d.ts +17 -0
  13. package/dist/coordination/index.js +6103 -5890
  14. package/dist/coordination/mailbox-http-actor-query.d.ts +16 -0
  15. package/dist/coordination/mailbox-http-router.d.ts +0 -48
  16. package/dist/coordination/mailbox-http-sse.d.ts +12 -0
  17. package/dist/coordination/mailbox-message-types.d.ts +71 -0
  18. package/dist/coordination/mailbox-predicates.d.ts +13 -0
  19. package/dist/coordination/mailbox-project-server.js +1 -1
  20. package/dist/coordination/mailbox-session-sync.d.ts +8 -0
  21. package/dist/coordination/mailbox-types.d.ts +6 -793
  22. package/dist/core/agent-loop-context.d.ts +28 -0
  23. package/dist/core/agent-loop-detector.d.ts +25 -0
  24. package/dist/core/conversation-state.d.ts +1 -2
  25. package/dist/core/fallback-doctor.d.ts +72 -0
  26. package/dist/core/fallback-model.d.ts +19 -1
  27. package/dist/core/fallback-profile-manager.d.ts +21 -3
  28. package/dist/core/index.d.ts +2 -1
  29. package/dist/core/index.js +1143 -766
  30. package/dist/defaults/index.js +3833 -3595
  31. package/dist/execution/auto-compaction-middleware.d.ts +64 -0
  32. package/dist/execution/autonomy-brain-llm.d.ts +55 -0
  33. package/dist/execution/autonomy-brain.d.ts +3 -156
  34. package/dist/execution/compaction-budget.d.ts +38 -0
  35. package/dist/execution/compaction-core.d.ts +3 -166
  36. package/dist/execution/compaction-elision.d.ts +58 -0
  37. package/dist/execution/council-orchestrator-helpers.d.ts +39 -0
  38. package/dist/execution/council-orchestrator.d.ts +3 -42
  39. package/dist/execution/council-response-parser.d.ts +56 -0
  40. package/dist/execution/index.d.ts +1 -1
  41. package/dist/execution/index.js +10016 -9903
  42. package/dist/execution/prompt-enhancer.js +11 -3
  43. package/dist/execution/retry-policy.d.ts +27 -0
  44. package/dist/execution/tool-executor-guard.d.ts +18 -0
  45. package/dist/execution/tool-executor-runner.d.ts +12 -0
  46. package/dist/execution/tool-executor.d.ts +0 -75
  47. package/dist/goal/index.js +19 -6
  48. package/dist/hq/index.js +58 -17
  49. package/dist/index.d.ts +2 -1
  50. package/dist/index.js +8731 -7756
  51. package/dist/infrastructure/index.js +24 -1
  52. package/dist/kernel/events/agent-events.d.ts +2 -0
  53. package/dist/kernel/events/provider-events.d.ts +13 -0
  54. package/dist/plugin/index.js +2123 -1918
  55. package/dist/plugins/auto-review-config.d.ts +53 -0
  56. package/dist/plugins/auto-review-git.d.ts +19 -0
  57. package/dist/plugins/auto-review-plugin.d.ts +2 -140
  58. package/dist/plugins/review-finding-verification.d.ts +7 -0
  59. package/dist/prompts/index.d.ts +1 -0
  60. package/dist/prompts/prompt-journal.d.ts +94 -0
  61. package/dist/security/index.js +677 -667
  62. package/dist/security/permission-explain.d.ts +19 -0
  63. package/dist/security/permission-policy.d.ts +0 -101
  64. package/dist/security/yolo-risk.d.ts +5 -4
  65. package/dist/session-catalog/index.js +270 -227
  66. package/dist/session-catalog/project-server.js +277 -234
  67. package/dist/session-catalog/store-rebuild.d.ts +9 -0
  68. package/dist/session-catalog/store-schema.d.ts +48 -0
  69. package/dist/session-catalog/store.d.ts +0 -17
  70. package/dist/storage/cloud-config-sync/sanitize.d.ts +18 -0
  71. package/dist/storage/cloud-config-sync.d.ts +1 -1
  72. package/dist/storage/director-state.d.ts +6 -0
  73. package/dist/storage/file-session-writer.d.ts +2 -58
  74. package/dist/storage/index.d.ts +2 -1
  75. package/dist/storage/index.js +2121 -1736
  76. package/dist/storage/orphan-lock-cleaner.d.ts +15 -0
  77. package/dist/storage/provider-config-watcher.d.ts +9 -0
  78. package/dist/storage/session-recovery.d.ts +9 -0
  79. package/dist/storage/session-store/rename-session.d.ts +16 -0
  80. package/dist/storage/session-store/resume-session.d.ts +26 -0
  81. package/dist/storage/session-store/session-store-clear.d.ts +11 -0
  82. package/dist/storage/session-store/session-store-index.d.ts +13 -0
  83. package/dist/storage/session-store/strict-empty-check.d.ts +7 -0
  84. package/dist/storage/session-store.d.ts +2 -129
  85. package/dist/storage/session-summary-tracker.d.ts +39 -0
  86. package/dist/storage/session-write-buffer.d.ts +43 -0
  87. package/dist/storage/session-writer/session-writer-flush.d.ts +4 -0
  88. package/dist/storage/session-writer/session-writer-summary-tracker.d.ts +28 -0
  89. package/dist/tools/fallback-agent-model-assign-tool.d.ts +18 -0
  90. package/dist/tools/fallback-leader-model-set-tool.d.ts +18 -0
  91. package/dist/tools/fallback-manage-tools.d.ts +8 -45
  92. package/dist/tools/fallback-profile-manage-tool.d.ts +16 -0
  93. package/dist/tools/fallback-provider-key-set-tool.d.ts +17 -0
  94. package/dist/tools/fallback-provider-manage-tool.d.ts +26 -0
  95. package/dist/tools/index.d.ts +1 -1
  96. package/dist/tools/index.js +5150 -5090
  97. package/dist/types/config/root.d.ts +21 -2
  98. package/dist/types/default-config.d.ts +1 -1
  99. package/dist/types/index.d.ts +54 -55
  100. package/dist/types/index.js +953 -932
  101. package/dist/types/runtime-capability-manifest.d.ts +5 -5
  102. package/dist/types/session-markers.d.ts +12 -0
  103. package/dist/types/session-markers.js +19 -0
  104. package/dist/types/session.d.ts +7 -0
  105. package/dist/worktree/worktree-manager.d.ts +1 -1
  106. package/instructions/coordination/subagent-baseline.md +2 -2
  107. package/instructions/llm/prompt-enhancer.md +2 -1
  108. package/instructions/sections/tool/common-patterns.md +21 -0
  109. package/instructions/sections/tool/delegation-compact.md +3 -1
  110. package/instructions/sections/tool/delegation-full.md +5 -1
  111. package/instructions/system-lite.md +28 -3
  112. package/instructions/system-pro.md +37 -8
  113. package/instructions/system.md +4 -2
  114. package/package.json +5 -5
@@ -0,0 +1,53 @@
1
+ import type { ProviderModelStatusTracker } from '../coordination/provider-status-tracker.js';
2
+ import type { Config } from '../types/config.js';
3
+ import type { CascadeAgentKind } from './chimera-plugin.js';
4
+ import type { ChimeraFinding } from './review-finding-types.js';
5
+ export interface AutoReviewConfig {
6
+ enabled?: boolean | undefined;
7
+ provider?: string | undefined;
8
+ model?: string | undefined;
9
+ fallbackProfile?: string | undefined;
10
+ modelSelection?: 'round-robin' | 'random' | undefined;
11
+ debounceMs?: number | undefined;
12
+ maxFilesPerBatch?: number | undefined;
13
+ maxConcurrentReviews?: number | undefined;
14
+ cascadeOn?: 'off' | 'critical' | 'high' | undefined;
15
+ maxCascadeDepth?: number | undefined;
16
+ }
17
+ export interface ResolvedAutoReviewConfig {
18
+ enabled: boolean;
19
+ provider: string;
20
+ model: string;
21
+ fallbackModels: string[];
22
+ modelSelection: 'round-robin' | 'random';
23
+ debounceMs: number;
24
+ maxFilesPerBatch: number;
25
+ maxConcurrentReviews: number;
26
+ cascadeOn: 'off' | 'critical' | 'high';
27
+ maxCascadeDepth: number;
28
+ }
29
+ export declare const DEFAULT_DEBOUNCE_MS = 15000;
30
+ export declare const DEFAULT_MAX_FILES_PER_BATCH = 15;
31
+ export declare const DEFAULT_MAX_CONCURRENT_REVIEWS = 2;
32
+ export declare const DEFAULT_MAX_CASCADE_DEPTH = 2;
33
+ export declare const MAX_KNOWN_FINGERPRINTS = 5000;
34
+ export declare function trimKnownFingerprints(map: Map<string, string>, max: number): void;
35
+ export interface ReviewerModelAssignment {
36
+ provider: string;
37
+ model: string;
38
+ fallbackModels: string[];
39
+ nextCursor: number;
40
+ }
41
+ export declare function buildReviewerModelPool(provider: string, model: string, fallbackModels?: readonly string[], statusTracker?: ProviderModelStatusTracker | undefined): string[];
42
+ export declare function selectRoundRobinReviewerAssignment(pool: readonly string[], cursor: number, fallbackProvider?: string, fallbackModel?: string, statusTracker?: ProviderModelStatusTracker | undefined): ReviewerModelAssignment;
43
+ export declare function resolveAutoReviewConfig(cfg: AutoReviewConfig, sessionConfig: Config): ResolvedAutoReviewConfig;
44
+ export interface ParsedSeverities {
45
+ critical: number;
46
+ high: number;
47
+ medium: number;
48
+ }
49
+ export declare function severitiesFromFindings(findings: readonly ChimeraFinding[]): ParsedSeverities;
50
+ export declare function parseReviewSeverity(text: string): ParsedSeverities;
51
+ export declare function decideCascadeAgents(text: string, severities: ParsedSeverities, findings?: readonly ChimeraFinding[] | undefined): CascadeAgentKind[];
52
+ export declare function shouldCascade(cascadeOn: 'off' | 'critical' | 'high', severities: ParsedSeverities): 'high' | 'critical' | null;
53
+ //# sourceMappingURL=auto-review-config.d.ts.map
@@ -0,0 +1,19 @@
1
+ export interface ChangedFile {
2
+ path: string;
3
+ status: 'added' | 'modified';
4
+ }
5
+ export interface ChangedFileSnapshot extends ChangedFile {
6
+ content: string;
7
+ fingerprint: string;
8
+ }
9
+ export declare const MAX_SNAPSHOT_FILE_BYTES: number;
10
+ export declare const MAX_SNAPSHOT_TOTAL_BYTES: number;
11
+ export declare function runGit(args: string[], cwd: string): Promise<{
12
+ stdout: string;
13
+ stderr: string;
14
+ code: number;
15
+ }>;
16
+ export declare function isGitRepo(cwd: string): Promise<boolean>;
17
+ export declare function getChangedFiles(cwd: string): Promise<ChangedFile[]>;
18
+ export declare function snapshotChangedFiles(cwd: string): Promise<ChangedFileSnapshot[]>;
19
+ //# sourceMappingURL=auto-review-git.d.ts.map
@@ -1,143 +1,5 @@
1
- import type { ProviderModelStatusTracker } from '../coordination/provider-status-tracker.js';
2
- import type { Config } from '../types/config.js';
3
1
  import type { Plugin } from '../types/plugin.js';
4
- import type { CascadeAgentKind } from './chimera-plugin.js';
5
- import type { ChimeraFinding } from './review-finding-types.js';
6
- export interface AutoReviewConfig {
7
- enabled?: boolean | undefined;
8
- /** Provider for review subagents. Falls back to session provider. */
9
- provider?: string | undefined;
10
- /** Model for review subagents. Falls back to session model. */
11
- model?: string | undefined;
12
- /**
13
- * Named fallback profile from config.fallbackProfiles.
14
- * Resolved via FallbackProfileManager. The first valid entry
15
- * becomes the primary provider/model (when provider/model are
16
- * omitted), and the remaining entries form the fallback chain.
17
- */
18
- fallbackProfile?: string | undefined;
19
- /** How each review chooses its starting model from the resolved profile pool. */
20
- modelSelection?: 'round-robin' | 'random' | undefined;
21
- /** Debounce window in ms — wait for quiet before firing review (default 15000). */
22
- debounceMs?: number | undefined;
23
- /** Max files per review batch (default 15). */
24
- maxFilesPerBatch?: number | undefined;
25
- /** Max concurrent in-flight reviews (default 2). */
26
- maxConcurrentReviews?: number | undefined;
27
- /**
28
- * Cascade severity threshold: when a review finds findings at or above this
29
- * level, spawn follow-up agents automatically. "off" disables cascading,
30
- * "high" cascades on High+, "critical" cascades only on Critical.
31
- * Default: "off".
32
- */
33
- cascadeOn?: 'off' | 'critical' | 'high' | undefined;
34
- /**
35
- * Maximum cascade iterations (fix → re-review cycles) before the
36
- * self-correcting loop stops. Prevents infinite cycles. Default: 2.
37
- * 0 disables re-review (cascade agents investigate/fix once, no re-check).
38
- */
39
- maxCascadeDepth?: number | undefined;
40
- }
41
- export interface ResolvedAutoReviewConfig {
42
- enabled: boolean;
43
- provider: string;
44
- model: string;
45
- fallbackModels: string[];
46
- modelSelection: 'round-robin' | 'random';
47
- debounceMs: number;
48
- maxFilesPerBatch: number;
49
- maxConcurrentReviews: number;
50
- cascadeOn: 'off' | 'critical' | 'high';
51
- maxCascadeDepth: number;
52
- }
53
- /**
54
- * Evict the oldest fingerprint entries past the cap (Map insertion order =
55
- * oldest first). Exported as a pure helper so the cap is unit-testable; the
56
- * plugin applies it on every `knownFingerprints` write.
57
- */
58
- export declare function trimKnownFingerprints(map: Map<string, string>, max: number): void;
59
- /**
60
- * Primary + fallback assignment for a single Chimera reviewer spawn.
61
- * Produced by {@link selectRoundRobinReviewerAssignment} so concurrent
62
- * reviewers start on different models and only share a provider after
63
- * their own in-place retries are exhausted.
64
- */
65
- export interface ReviewerModelAssignment {
66
- provider: string;
67
- model: string;
68
- /** Remaining pool entries after the selected primary, wrap-around order. */
69
- fallbackModels: string[];
70
- /** Cursor to pass on the next spawn (`cursor + 1`). */
71
- nextCursor: number;
72
- }
73
- /**
74
- * Build the deduped provider/model pool a reviewer can start on.
75
- *
76
- * Order is stable: configured primary first, then the fallback chain.
77
- * Entries must be `provider/model` (or parseable refs); bare blanks are dropped.
78
- *
79
- * When a {@link ProviderModelStatusTracker} is supplied, every entry that is
80
- * currently `state: 'blocked'` (waiting-room / token-reset-limit room) is
81
- * filtered out before the pool is returned. Without this filter, concurrent
82
- * Chimera reviewers would re-spawn on a 429-stricken model on every round-
83
- * robin turn and burn the entire chain instead of leaving the doomed model
84
- * quarantined until the tracker re-admits it.
85
- */
86
- export declare function buildReviewerModelPool(provider: string, model: string, fallbackModels?: readonly string[], statusTracker?: ProviderModelStatusTracker | undefined): string[];
87
- /**
88
- * Pick primary + fallback chain for the Nth concurrent reviewer via round-robin.
89
- *
90
- * Index `cursor % pool.length` becomes the primary; the rest of the pool is
91
- * rotated so the former primary lands last (still available after rate limits).
92
- * The pool must be pre-filtered by {@link buildReviewerModelPool} so every
93
- * non-empty entry contains both a provider and a model.
94
- *
95
- * When a {@link ProviderModelStatusTracker} is supplied, the cursor advances
96
- * over blocked entries too — a doomed entry is never picked as the primary,
97
- * but the cursor saturates against the live pool so the next-after-blocked
98
- * round inherits the rest of the unwalked chain instead of looping back to
99
- * the head. Without the tracker, the cursor advances mod `pool.length`,
100
- * which is the pre-waiting-room behavior.
101
- * Pure: the caller owns the cursor (typically a process-local counter).
102
- */
103
- export declare function selectRoundRobinReviewerAssignment(pool: readonly string[], cursor: number,
104
- /** Used only when the selected ref is somehow unparseable — defensive. */
105
- fallbackProvider?: string, fallbackModel?: string, statusTracker?: ProviderModelStatusTracker | undefined): ReviewerModelAssignment;
106
- export declare function resolveAutoReviewConfig(cfg: AutoReviewConfig, sessionConfig: Config): ResolvedAutoReviewConfig;
107
- export interface ParsedSeverities {
108
- critical: number;
109
- high: number;
110
- medium: number;
111
- }
112
- /**
113
- * Count verified findings into the severity shape `shouldCascade` expects.
114
- * Used by the P0-2 cascade gate: only disk-verified findings count toward
115
- * the cascade threshold when a parsed report is available.
116
- */
117
- export declare function severitiesFromFindings(findings: readonly ChimeraFinding[]): ParsedSeverities;
118
- /** Parse report counts for clean-vs-actionable classification. */
119
- export declare function parseReviewSeverity(text: string): ParsedSeverities;
120
- /**
121
- * Decide which follow-up cascade agents to spawn based on the review.
122
- *
123
- * When structured, disk-verified findings are supplied (P0-1/P0-2), routing
124
- * uses the finding's `category` tag: `security` selects security-scanner,
125
- * and any High+ finding selects bug-hunter. The legacy keyword scan on the
126
- * report text remains the fallback for reports without structured findings.
127
- *
128
- * Both agents may be returned in parallel when a finding is both severe and
129
- * security-related.
130
- */
131
- export declare function decideCascadeAgents(text: string, severities: ParsedSeverities, findings?: readonly ChimeraFinding[] | undefined): CascadeAgentKind[];
132
- /**
133
- * Determine whether a review result should trigger a cascade, given the
134
- * configured threshold and parsed severities. Returns the crossed
135
- * threshold, or `null` when the cascade should not fire.
136
- *
137
- * - `'high'` → fires on any High OR Critical finding
138
- * - `'critical'` → fires only on Critical findings
139
- * - `'off'` → never fires
140
- */
141
- export declare function shouldCascade(cascadeOn: 'off' | 'critical' | 'high', severities: ParsedSeverities): 'high' | 'critical' | null;
2
+ import { type AutoReviewConfig, buildReviewerModelPool, decideCascadeAgents, parseReviewSeverity, resolveAutoReviewConfig, type ResolvedAutoReviewConfig, type ReviewerModelAssignment, selectRoundRobinReviewerAssignment, severitiesFromFindings, shouldCascade, trimKnownFingerprints } from './auto-review-config.js';
3
+ export { buildReviewerModelPool, decideCascadeAgents, parseReviewSeverity, resolveAutoReviewConfig, selectRoundRobinReviewerAssignment, severitiesFromFindings, shouldCascade, trimKnownFingerprints, type AutoReviewConfig, type ResolvedAutoReviewConfig, type ReviewerModelAssignment, };
142
4
  export declare function createAutoReviewPlugin(): Plugin;
143
5
  //# sourceMappingURL=auto-review-plugin.d.ts.map
@@ -27,6 +27,13 @@ export interface VerifyFindingsOptions {
27
27
  */
28
28
  anchorWindow?: number | undefined;
29
29
  }
30
+ /**
31
+ * Extract all candidate code identifiers from finding text, prioritizing:
32
+ * 1. Identifiers inside backticks (explicit code mentions: `foo.bar()`, `varName`)
33
+ * 2. Code-like identifiers (camelCase, snake_case, $-suffixed)
34
+ * 3. Other meaningful non-stopword tokens (>= 3 chars)
35
+ */
36
+ export declare function extractFindingAnchors(title: string, description: string, suggestedFix?: string): string[];
30
37
  /**
31
38
  * Extract the most distinctive code identifier from a finding's
32
39
  * title + description. Prefers camelCase / snake_case / `$`-suffixed
@@ -1,3 +1,4 @@
1
1
  export { type JsonFetcher, PromptInstaller, type PromptInstallerOptions, type PromptPullResult, } from './prompt-installer.js';
2
2
  export { PromptManifestStore } from './prompt-manifest-store.js';
3
+ export { ensureGitignore, getPromptJournalEntries, recordPromptJournalEntry, type PromptCategory, type PromptJournalEntry, type PromptJournalFilter, type RecordPromptOptions, } from './prompt-journal.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Hierarchical Prompt Journal & Detailed Interaction Trace Logger.
3
+ *
4
+ * Persists comprehensive prompt history within a clean date & session folder hierarchy
5
+ * at `<projectRoot>/.wrongstack/prompts/`:
6
+ *
7
+ * ├── index.json <-- High-level catalog of dates, sessions & stats
8
+ * ├── index.md <-- Visual navigation board linking to daily journals
9
+ * └── YYYY-MM/ <-- Month folder (e.g. 2026-08)
10
+ * └── YYYY-MM-DD/ <-- Day folder (e.g. 2026-08-15)
11
+ * ├── daily-summary.md <-- Day's overview & interaction breakdown
12
+ * ├── session-<id>.md <-- Rich Markdown journal for that session
13
+ * └── session-<id>.jsonl <-- Machine-readable JSONL for that session
14
+ *
15
+ * Automatically ensures `.wrongstack/` is in `.gitignore` so traces are never
16
+ * accidentally committed to version control.
17
+ */
18
+ export type PromptCategory = 'raw_user' | 'refined_user' | 'system_prompt' | 'autonomous_next_step' | 'self_healing_retry' | 'clarify_interaction' | 'subagent_delegation';
19
+ export interface PromptJournalEntry {
20
+ id: string;
21
+ timestamp: string;
22
+ sessionId: string;
23
+ projectRoot: string;
24
+ role: 'user' | 'system' | 'assistant' | 'tool';
25
+ category: PromptCategory;
26
+ content: string;
27
+ rawContent?: string | undefined;
28
+ metadata: {
29
+ model?: string | undefined;
30
+ provider?: string | undefined;
31
+ iterationIndex?: number | undefined;
32
+ tokenEstimate: number;
33
+ characterCount: number;
34
+ lineCount: number;
35
+ activeTools?: string[] | undefined;
36
+ contextFiles?: string[] | undefined;
37
+ durationMs?: number | undefined;
38
+ decisionReason?: string | undefined;
39
+ tags?: string[] | undefined;
40
+ };
41
+ }
42
+ export interface RecordPromptOptions {
43
+ projectRoot: string;
44
+ sessionId?: string | undefined;
45
+ role?: 'user' | 'system' | 'assistant' | 'tool' | undefined;
46
+ category: PromptCategory;
47
+ content: string;
48
+ rawContent?: string | undefined;
49
+ model?: string | undefined;
50
+ provider?: string | undefined;
51
+ iterationIndex?: number | undefined;
52
+ activeTools?: string[] | undefined;
53
+ contextFiles?: string[] | undefined;
54
+ durationMs?: number | undefined;
55
+ decisionReason?: string | undefined;
56
+ tags?: string[] | undefined;
57
+ }
58
+ export interface PromptJournalFilter {
59
+ sessionId?: string | undefined;
60
+ category?: PromptCategory | undefined;
61
+ date?: string | undefined;
62
+ month?: string | undefined;
63
+ since?: string | undefined;
64
+ limit?: number | undefined;
65
+ }
66
+ export interface PromptJournalIndex {
67
+ updatedAt: string;
68
+ totalPrompts: number;
69
+ totalTokensEstimated: number;
70
+ months: Record<string, {
71
+ days: Record<string, {
72
+ sessions: Record<string, {
73
+ promptCount: number;
74
+ tokenEstimate: number;
75
+ lastTimestamp: string;
76
+ categories: Record<string, number>;
77
+ }>;
78
+ }>;
79
+ }>;
80
+ }
81
+ /**
82
+ * Ensures `<projectRoot>/.gitignore` contains `.wrongstack/` to keep all
83
+ * prompt logs, telemetry, and indexes out of version control.
84
+ */
85
+ export declare function ensureGitignore(projectRoot: string): Promise<void>;
86
+ /**
87
+ * Record a comprehensive prompt entry into the hierarchical date-based prompt journal.
88
+ */
89
+ export declare function recordPromptJournalEntry(opts: RecordPromptOptions): Promise<PromptJournalEntry>;
90
+ /**
91
+ * Read prompt journal entries hierarchically across all date directories.
92
+ */
93
+ export declare function getPromptJournalEntries(projectRoot: string, filter?: PromptJournalFilter): Promise<PromptJournalEntry[]>;
94
+ //# sourceMappingURL=prompt-journal.d.ts.map