@chude/memory 4.0.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/README.md +294 -0
- package/dist/application/index.d.ts +6 -0
- package/dist/application/services/ambient-context-service.d.ts +90 -0
- package/dist/application/services/backfill-service.d.ts +71 -0
- package/dist/application/services/budget-allocator.d.ts +57 -0
- package/dist/application/services/embedding-service.d.ts +131 -0
- package/dist/application/services/export-service.d.ts +225 -0
- package/dist/application/services/extraction-pipeline.d.ts +50 -0
- package/dist/application/services/friction-service.d.ts +148 -0
- package/dist/application/services/fts-sanitizer.d.ts +25 -0
- package/dist/application/services/index.d.ts +34 -0
- package/dist/application/services/llm-extractor.d.ts +96 -0
- package/dist/application/services/memory-file-sync-service.d.ts +58 -0
- package/dist/application/services/pattern-extractor.d.ts +95 -0
- package/dist/application/services/recovery-service.d.ts +81 -0
- package/dist/application/services/rrf-fusion.d.ts +53 -0
- package/dist/application/services/smart-context-service.d.ts +126 -0
- package/dist/application/services/sync-service.d.ts +157 -0
- package/dist/application/services/temporal-decay.d.ts +62 -0
- package/dist/domain/entities/backfill-state.d.ts +56 -0
- package/dist/domain/entities/entity.d.ts +131 -0
- package/dist/domain/entities/extraction-state.d.ts +128 -0
- package/dist/domain/entities/fact.d.ts +59 -0
- package/dist/domain/entities/friction-entry.d.ts +84 -0
- package/dist/domain/entities/index.d.ts +15 -0
- package/dist/domain/entities/link.d.ts +74 -0
- package/dist/domain/entities/memory-file.d.ts +78 -0
- package/dist/domain/entities/message.d.ts +70 -0
- package/dist/domain/entities/session.d.ts +93 -0
- package/dist/domain/entities/tool-use.d.ts +85 -0
- package/dist/domain/errors/error-codes.d.ts +37 -0
- package/dist/domain/errors/index.d.ts +8 -0
- package/dist/domain/errors/memory-error.d.ts +52 -0
- package/dist/domain/errors/unknown-error.d.ts +9 -0
- package/dist/domain/index.d.ts +11 -0
- package/dist/domain/ports/embedding.d.ts +96 -0
- package/dist/domain/ports/extraction.d.ts +13 -0
- package/dist/domain/ports/index.d.ts +14 -0
- package/dist/domain/ports/redactor.d.ts +17 -0
- package/dist/domain/ports/repositories.d.ts +658 -0
- package/dist/domain/ports/services.d.ts +180 -0
- package/dist/domain/ports/signals.d.ts +82 -0
- package/dist/domain/ports/sources.d.ts +122 -0
- package/dist/domain/ports/types.d.ts +150 -0
- package/dist/domain/services/content-extractor.d.ts +61 -0
- package/dist/domain/services/index.d.ts +8 -0
- package/dist/domain/services/path-decoder.d.ts +56 -0
- package/dist/domain/services/query-parser.d.ts +47 -0
- package/dist/domain/value-objects/embedding-config.d.ts +56 -0
- package/dist/domain/value-objects/embedding-result.d.ts +46 -0
- package/dist/domain/value-objects/index.d.ts +10 -0
- package/dist/domain/value-objects/project-path.d.ts +92 -0
- package/dist/domain/value-objects/search-query.d.ts +30 -0
- package/dist/domain/value-objects/search-result.d.ts +92 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1548 -0
- package/dist/infrastructure/database/connection.d.ts +161 -0
- package/dist/infrastructure/database/event-log.d.ts +22 -0
- package/dist/infrastructure/database/health-checker.d.ts +248 -0
- package/dist/infrastructure/database/index.d.ts +11 -0
- package/dist/infrastructure/database/repositories/backfill-state-repository.d.ts +19 -0
- package/dist/infrastructure/database/repositories/embedding-repository.d.ts +121 -0
- package/dist/infrastructure/database/repositories/entity-repository.d.ts +73 -0
- package/dist/infrastructure/database/repositories/extraction-log-repository.d.ts +17 -0
- package/dist/infrastructure/database/repositories/extraction-state-repository.d.ts +52 -0
- package/dist/infrastructure/database/repositories/fact-repository.d.ts +25 -0
- package/dist/infrastructure/database/repositories/friction-repository.d.ts +41 -0
- package/dist/infrastructure/database/repositories/index.d.ts +17 -0
- package/dist/infrastructure/database/repositories/link-repository.d.ts +64 -0
- package/dist/infrastructure/database/repositories/memory-file-repository.d.ts +28 -0
- package/dist/infrastructure/database/repositories/message-repository.d.ts +87 -0
- package/dist/infrastructure/database/repositories/session-repository.d.ts +125 -0
- package/dist/infrastructure/database/repositories/tool-use-repository.d.ts +72 -0
- package/dist/infrastructure/database/schema.d.ts +203 -0
- package/dist/infrastructure/database/services/context-service.d.ts +93 -0
- package/dist/infrastructure/database/services/hybrid-search-service.d.ts +156 -0
- package/dist/infrastructure/database/services/index.d.ts +10 -0
- package/dist/infrastructure/database/services/search-service.d.ts +57 -0
- package/dist/infrastructure/database/services/stats-service.d.ts +36 -0
- package/dist/infrastructure/embedding/background-embedder.d.ts +125 -0
- package/dist/infrastructure/embedding/embedding-provider-factory.d.ts +44 -0
- package/dist/infrastructure/embedding/index.d.ts +5 -0
- package/dist/infrastructure/embedding/ollama-provider.d.ts +41 -0
- package/dist/infrastructure/embedding/openai-provider.d.ts +38 -0
- package/dist/infrastructure/embedding/transformers-js-provider.d.ts +34 -0
- package/dist/infrastructure/external/index.d.ts +7 -0
- package/dist/infrastructure/external/qmd-runner.d.ts +36 -0
- package/dist/infrastructure/hooks/auto-memory-writer.d.ts +52 -0
- package/dist/infrastructure/hooks/config-manager.d.ts +237 -0
- package/dist/infrastructure/hooks/git-syncer.d.ts +44 -0
- package/dist/infrastructure/hooks/hook-runner.d.ts +126 -0
- package/dist/infrastructure/hooks/index.d.ts +12 -0
- package/dist/infrastructure/hooks/log-writer.d.ts +106 -0
- package/dist/infrastructure/hooks/settings-manager.d.ts +163 -0
- package/dist/infrastructure/hooks/sync-hook-script.d.ts +83 -0
- package/dist/infrastructure/hooks/sync-logger-adapter.d.ts +17 -0
- package/dist/infrastructure/index.d.ts +11 -0
- package/dist/infrastructure/llm/anthropic-extractor.d.ts +20 -0
- package/dist/infrastructure/llm/claude-cli-extractor.d.ts +14 -0
- package/dist/infrastructure/llm/claude-summary-generator.d.ts +14 -0
- package/dist/infrastructure/llm/extraction-helper.d.ts +16 -0
- package/dist/infrastructure/llm/ollama-extractor.d.ts +20 -0
- package/dist/infrastructure/llm/openai-extractor.d.ts +23 -0
- package/dist/infrastructure/migration.d.ts +103 -0
- package/dist/infrastructure/parsers/event-classifier.d.ts +111 -0
- package/dist/infrastructure/parsers/index.d.ts +8 -0
- package/dist/infrastructure/parsers/jsonl-parser.d.ts +25 -0
- package/dist/infrastructure/parsers/timestamp.d.ts +18 -0
- package/dist/infrastructure/paths.d.ts +129 -0
- package/dist/infrastructure/providers/provider-defaults.d.ts +11 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +28 -0
- package/dist/infrastructure/security/pattern-redactor.d.ts +6 -0
- package/dist/infrastructure/signals/adapters.d.ts +27 -0
- package/dist/infrastructure/signals/checkpoint-manager.d.ts +83 -0
- package/dist/infrastructure/signals/index.d.ts +8 -0
- package/dist/infrastructure/signals/signal-handler.d.ts +113 -0
- package/dist/infrastructure/sources/index.d.ts +8 -0
- package/dist/infrastructure/sources/memory-file-scanner.d.ts +23 -0
- package/dist/infrastructure/sources/project-name-resolver.d.ts +67 -0
- package/dist/infrastructure/sources/session-source.d.ts +70 -0
- package/dist/presentation/cli/command-result.d.ts +10 -0
- package/dist/presentation/cli/commands/_helpers/capture-json.d.ts +36 -0
- package/dist/presentation/cli/commands/_helpers/deprecation-warning.d.ts +41 -0
- package/dist/presentation/cli/commands/backfill.d.ts +56 -0
- package/dist/presentation/cli/commands/browse.d.ts +55 -0
- package/dist/presentation/cli/commands/completion.d.ts +61 -0
- package/dist/presentation/cli/commands/context.d.ts +53 -0
- package/dist/presentation/cli/commands/doctor.d.ts +55 -0
- package/dist/presentation/cli/commands/export.d.ts +36 -0
- package/dist/presentation/cli/commands/extract.d.ts +40 -0
- package/dist/presentation/cli/commands/facts.d.ts +17 -0
- package/dist/presentation/cli/commands/friction/dashboard.d.ts +18 -0
- package/dist/presentation/cli/commands/friction/index.d.ts +12 -0
- package/dist/presentation/cli/commands/friction/list.d.ts +12 -0
- package/dist/presentation/cli/commands/friction/log.d.ts +12 -0
- package/dist/presentation/cli/commands/friction/purge.d.ts +12 -0
- package/dist/presentation/cli/commands/friction/resolve.d.ts +12 -0
- package/dist/presentation/cli/commands/friction/types.d.ts +86 -0
- package/dist/presentation/cli/commands/friction/wontfix.d.ts +12 -0
- package/dist/presentation/cli/commands/import.d.ts +38 -0
- package/dist/presentation/cli/commands/index.d.ts +51 -0
- package/dist/presentation/cli/commands/install.d.ts +67 -0
- package/dist/presentation/cli/commands/list.d.ts +61 -0
- package/dist/presentation/cli/commands/migrate.d.ts +36 -0
- package/dist/presentation/cli/commands/purge.d.ts +100 -0
- package/dist/presentation/cli/commands/query.d.ts +51 -0
- package/dist/presentation/cli/commands/related.d.ts +47 -0
- package/dist/presentation/cli/commands/remote.d.ts +36 -0
- package/dist/presentation/cli/commands/search.d.ts +100 -0
- package/dist/presentation/cli/commands/show.d.ts +51 -0
- package/dist/presentation/cli/commands/stats.d.ts +38 -0
- package/dist/presentation/cli/commands/status.d.ts +152 -0
- package/dist/presentation/cli/commands/sync/ambient.d.ts +22 -0
- package/dist/presentation/cli/commands/sync/background.d.ts +23 -0
- package/dist/presentation/cli/commands/sync/embedding-pass.d.ts +32 -0
- package/dist/presentation/cli/commands/sync/helpers.d.ts +25 -0
- package/dist/presentation/cli/commands/sync/index.d.ts +17 -0
- package/dist/presentation/cli/commands/sync/memory-files.d.ts +26 -0
- package/dist/presentation/cli/commands/sync/types.d.ts +163 -0
- package/dist/presentation/cli/commands/uninstall.d.ts +44 -0
- package/dist/presentation/cli/db-startup.d.ts +61 -0
- package/dist/presentation/cli/formatters/ai-formatter.d.ts +38 -0
- package/dist/presentation/cli/formatters/color.d.ts +82 -0
- package/dist/presentation/cli/formatters/context-formatter.d.ts +55 -0
- package/dist/presentation/cli/formatters/dto-helpers.d.ts +176 -0
- package/dist/presentation/cli/formatters/envelope.d.ts +136 -0
- package/dist/presentation/cli/formatters/error-formatter.d.ts +41 -0
- package/dist/presentation/cli/formatters/friction-dashboard.d.ts +46 -0
- package/dist/presentation/cli/formatters/index.d.ts +17 -0
- package/dist/presentation/cli/formatters/list-formatter.d.ts +48 -0
- package/dist/presentation/cli/formatters/output-formatter.d.ts +98 -0
- package/dist/presentation/cli/formatters/related-formatter.d.ts +57 -0
- package/dist/presentation/cli/formatters/show-formatter.d.ts +63 -0
- package/dist/presentation/cli/formatters/stats-formatter.d.ts +54 -0
- package/dist/presentation/cli/formatters/text-width.d.ts +37 -0
- package/dist/presentation/cli/formatters/timestamp-formatter.d.ts +38 -0
- package/dist/presentation/cli/index.d.ts +10 -0
- package/dist/presentation/cli/index.js +1664 -0
- package/dist/presentation/cli/parsers/date-parser.d.ts +28 -0
- package/dist/presentation/cli/parsers/index.d.ts +6 -0
- package/dist/presentation/cli/pickers/index.d.ts +6 -0
- package/dist/presentation/cli/pickers/session-picker.d.ts +59 -0
- package/dist/presentation/cli/progress-reporter.d.ts +199 -0
- package/package.json +94 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemoryFileScanner
|
|
3
|
+
*
|
|
4
|
+
* Scans the legacy memory-file directory for markdown files.
|
|
5
|
+
*
|
|
6
|
+
* Discovers .md files, classifies their type from path patterns,
|
|
7
|
+
* extracts project encoded names, and computes content hashes.
|
|
8
|
+
* Returns empty array when the directory does not exist (graceful no-op).
|
|
9
|
+
*
|
|
10
|
+
* Implements the IMemoryFileScanner domain port.
|
|
11
|
+
*/
|
|
12
|
+
import type { IMemoryFileScanner, MemoryFileInfo } from "../../domain/ports/sources.js";
|
|
13
|
+
export declare class MemoryFileScanner implements IMemoryFileScanner {
|
|
14
|
+
/**
|
|
15
|
+
* Discover all legacy memory files.
|
|
16
|
+
*
|
|
17
|
+
* @returns Array of discovered file info, empty if directory missing
|
|
18
|
+
*/
|
|
19
|
+
discoverFiles(): Promise<MemoryFileInfo[]>;
|
|
20
|
+
private scanDirectory;
|
|
21
|
+
private classifyFileType;
|
|
22
|
+
private extractProjectEncoded;
|
|
23
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProjectNameResolver
|
|
3
|
+
*
|
|
4
|
+
* Resolves correct project names from Claude Code's lossy encoded paths
|
|
5
|
+
* by walking the actual filesystem. Claude Code encodes backslashes,
|
|
6
|
+
* forward slashes, spaces, and hyphens all as single dashes, making
|
|
7
|
+
* reverse decoding ambiguous. This resolver uses the filesystem as
|
|
8
|
+
* source of truth to disambiguate.
|
|
9
|
+
*
|
|
10
|
+
* Algorithm:
|
|
11
|
+
* 1. Starting from the root directory, list actual subdirectories
|
|
12
|
+
* 2. For each subdirectory, encode its name (spaces/hyphens -> dashes)
|
|
13
|
+
* 3. Check if any encoded name is a prefix of the remaining encoded string
|
|
14
|
+
* 4. Consume the matched portion, descend into that directory
|
|
15
|
+
* 5. The last matched directory name is the project name
|
|
16
|
+
*
|
|
17
|
+
* Caches resolved prefixes to avoid redundant readdir calls.
|
|
18
|
+
*/
|
|
19
|
+
import type { IProjectNameResolver } from "../../domain/ports/sources.js";
|
|
20
|
+
export declare class ProjectNameResolver implements IProjectNameResolver {
|
|
21
|
+
private readonly rootDir;
|
|
22
|
+
private readonly cache;
|
|
23
|
+
private readonly dirCache;
|
|
24
|
+
constructor(rootDir: string);
|
|
25
|
+
/**
|
|
26
|
+
* Resolve project name from a full encoded path including drive prefix.
|
|
27
|
+
* Strips Windows drive prefix (e.g., "C--") or Unix leading dash before resolving.
|
|
28
|
+
*/
|
|
29
|
+
resolveFromEncodedPath(encodedPath: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the project name from an encoded path (without drive prefix).
|
|
32
|
+
* Walks the filesystem matching encoded segments against real directory names.
|
|
33
|
+
*
|
|
34
|
+
* @param encodedSegments - The encoded path without drive prefix (e.g., "Users-Destiny-Projects-memory-nexus")
|
|
35
|
+
* @returns The actual name of the last matched directory
|
|
36
|
+
*/
|
|
37
|
+
resolveProjectName(encodedSegments: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Walk the filesystem recursively, matching encoded segments against
|
|
40
|
+
* actual directory names at each level.
|
|
41
|
+
*/
|
|
42
|
+
private walkAndResolve;
|
|
43
|
+
/**
|
|
44
|
+
* Probe for hidden/virtual directories that readdirSync does not enumerate.
|
|
45
|
+
*
|
|
46
|
+
* Some directories (e.g., iCloudDrive on Windows) are valid and traversable
|
|
47
|
+
* but invisible to readdirSync. This method tries progressively longer
|
|
48
|
+
* dash-separated prefixes of the remaining encoded string as candidate
|
|
49
|
+
* directory names, checking each via statSync.
|
|
50
|
+
*
|
|
51
|
+
* @returns Resolved project name, or undefined if no hidden dir was found
|
|
52
|
+
*/
|
|
53
|
+
private probeHiddenDirectories;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a path is a directory. Handles virtual/hidden dirs that
|
|
56
|
+
* exist on disk but are not returned by readdirSync.
|
|
57
|
+
*/
|
|
58
|
+
private isDirectory;
|
|
59
|
+
/**
|
|
60
|
+
* List subdirectories of a given path. Results are cached.
|
|
61
|
+
*/
|
|
62
|
+
private listSubdirectories;
|
|
63
|
+
/**
|
|
64
|
+
* Fallback: extract last dash-separated segment (lossy behavior).
|
|
65
|
+
*/
|
|
66
|
+
private fallbackLastSegment;
|
|
67
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileSystemSessionSource
|
|
3
|
+
*
|
|
4
|
+
* Discovers Claude Code session files from the filesystem.
|
|
5
|
+
* Sessions are stored in ~/.claude/projects/<encoded-path>/<session-uuid>.jsonl
|
|
6
|
+
*
|
|
7
|
+
* Implements ISessionSource port for the infrastructure layer.
|
|
8
|
+
*/
|
|
9
|
+
import type { ISessionSource, SessionFileInfo } from "../../domain/ports/sources.js";
|
|
10
|
+
import type { ProjectNameResolver } from "./project-name-resolver.js";
|
|
11
|
+
/**
|
|
12
|
+
* Configuration options for FileSystemSessionSource
|
|
13
|
+
*/
|
|
14
|
+
export interface SessionSourceOptions {
|
|
15
|
+
/** Custom path to the Claude projects directory */
|
|
16
|
+
claudeDir?: string;
|
|
17
|
+
/** Resolver for fixing lossy project names via filesystem lookup */
|
|
18
|
+
projectNameResolver?: ProjectNameResolver;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Filesystem-based session source for Claude Code sessions.
|
|
22
|
+
*
|
|
23
|
+
* Scans the Claude Code projects directory structure to discover
|
|
24
|
+
* session JSONL files, including subagent sessions.
|
|
25
|
+
*
|
|
26
|
+
* Directory structure:
|
|
27
|
+
* ```
|
|
28
|
+
* ~/.claude/projects/
|
|
29
|
+
* <encoded-path>/
|
|
30
|
+
* <session-uuid>.jsonl # Main session
|
|
31
|
+
* <session-uuid>/
|
|
32
|
+
* subagents/
|
|
33
|
+
* <subagent-uuid>.jsonl # Subagent session
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class FileSystemSessionSource implements ISessionSource {
|
|
37
|
+
private readonly claudeProjectsDir;
|
|
38
|
+
private readonly resolver;
|
|
39
|
+
constructor(options?: SessionSourceOptions);
|
|
40
|
+
/**
|
|
41
|
+
* Discover all available session files.
|
|
42
|
+
*
|
|
43
|
+
* Scans the Claude Code projects directory recursively to find
|
|
44
|
+
* all JSONL session files, including subagent sessions.
|
|
45
|
+
*
|
|
46
|
+
* @returns Array of session file information
|
|
47
|
+
*/
|
|
48
|
+
discoverSessions(): Promise<SessionFileInfo[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Get the full path to a session file by ID.
|
|
51
|
+
*
|
|
52
|
+
* Searches all project directories for a session with the given ID.
|
|
53
|
+
*
|
|
54
|
+
* @param sessionId The session UUID
|
|
55
|
+
* @returns Full path to the JSONL file, or null if not found
|
|
56
|
+
*/
|
|
57
|
+
getSessionFile(sessionId: string): Promise<string | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Scan a project directory for session files.
|
|
60
|
+
*
|
|
61
|
+
* Finds both main session files and subagent sessions in subdirectories.
|
|
62
|
+
*/
|
|
63
|
+
private scanProjectDirectory;
|
|
64
|
+
/**
|
|
65
|
+
* Scan a session directory for subagent session files.
|
|
66
|
+
*
|
|
67
|
+
* Looks for subagents/ subdirectory containing JSONL files.
|
|
68
|
+
*/
|
|
69
|
+
private scanSubagentsDirectory;
|
|
70
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommandResult
|
|
3
|
+
*
|
|
4
|
+
* Return type for CLI command handlers. Commands return exit codes
|
|
5
|
+
* instead of mutating process.exitCode directly, keeping handlers
|
|
6
|
+
* pure and testable without global state.
|
|
7
|
+
*/
|
|
8
|
+
export interface CommandResult {
|
|
9
|
+
exitCode: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test helpers for .json.test.ts files (Plan 32-02).
|
|
3
|
+
*
|
|
4
|
+
* Captures stdout/stderr around a command invocation so envelope-shape
|
|
5
|
+
* assertions can be made deterministically. Used by all 6 query commands'
|
|
6
|
+
* .json.test.ts files (search/context/show/list/related/stats).
|
|
7
|
+
*
|
|
8
|
+
* Per Codex MEDIUM-3: no shell-specific assumptions; pure JS.
|
|
9
|
+
*/
|
|
10
|
+
export interface CapturedStreams {
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
exitCode?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Capture stdout and stderr emitted by `fn` while it runs.
|
|
17
|
+
*
|
|
18
|
+
* Monkey-patches `console.log` and `console.error` for the duration
|
|
19
|
+
* of `fn`, then restores them. Returns concatenated output and the
|
|
20
|
+
* function's `exitCode` (if returned).
|
|
21
|
+
*
|
|
22
|
+
* Single-line outputs are concatenated with newlines.
|
|
23
|
+
*/
|
|
24
|
+
export declare function captureStreams<R extends {
|
|
25
|
+
exitCode?: number;
|
|
26
|
+
} | undefined>(fn: () => Promise<R>): Promise<CapturedStreams>;
|
|
27
|
+
/**
|
|
28
|
+
* Per-test temp DB path tracker. Returns a path + a cleanup hook.
|
|
29
|
+
*
|
|
30
|
+
* Pattern:
|
|
31
|
+
* const tempPaths: string[] = [];
|
|
32
|
+
* const dbPath = makeTempDbPath("search", tempPaths);
|
|
33
|
+
* afterEach(() => cleanupTempPaths(tempPaths));
|
|
34
|
+
*/
|
|
35
|
+
export declare function makeTempDbPath(cmd: string, tracker: string[]): string;
|
|
36
|
+
export declare function cleanupTempPaths(tracker: string[]): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 32 (CLI-03) deprecation-warning helper.
|
|
3
|
+
*
|
|
4
|
+
* Emits a one-shot stderr warning when a deprecated `--format` alias
|
|
5
|
+
* value is passed. Suppressed in `--json` mode so the JSON-on-stdout
|
|
6
|
+
* contract isn't polluted by advisory stderr.
|
|
7
|
+
*
|
|
8
|
+
* Module-scoped Set tracks emissions per process to prevent log
|
|
9
|
+
* floods if a CLI invocation calls into a command multiple times
|
|
10
|
+
* (e.g. tests that share the module). The Set key is the command
|
|
11
|
+
* + alias pair, so each unique deprecated alias warns once per
|
|
12
|
+
* process.
|
|
13
|
+
*
|
|
14
|
+
* Precedence rule (matches Plan 32-02 Codex HIGH-5 contract):
|
|
15
|
+
* --quiet ≥ brief; --json suppresses warning (already on stdout).
|
|
16
|
+
*
|
|
17
|
+
* Removal: aliases `default` (search/list/show/stats) and `detailed`
|
|
18
|
+
* (context/related) are scheduled for removal in the next minor
|
|
19
|
+
* release. CHANGELOG.md documents the cadence.
|
|
20
|
+
*/
|
|
21
|
+
export interface EmitDeprecationOptions {
|
|
22
|
+
/** Command name (e.g. "search"). Used as part of the once-key. */
|
|
23
|
+
command: string;
|
|
24
|
+
/** The deprecated alias value seen (e.g. "default" or "detailed"). */
|
|
25
|
+
alias: string;
|
|
26
|
+
/** Suggested replacement message (e.g. "Use --format brief or --format ai."). */
|
|
27
|
+
replacement: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether --json is set; if true, warning is suppressed.
|
|
30
|
+
* Explicit `undefined` allowed because callers commonly pass the
|
|
31
|
+
* `options.json` value directly (project uses
|
|
32
|
+
* `exactOptionalPropertyTypes: true`).
|
|
33
|
+
*/
|
|
34
|
+
json?: boolean | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare function emitFormatDeprecationWarning(options: EmitDeprecationOptions): void;
|
|
37
|
+
/**
|
|
38
|
+
* Reset emitted-keys tracker. Test-only — production code does not
|
|
39
|
+
* call this. Allows per-test isolation of one-shot semantics.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resetFormatDeprecationWarningsForTesting(): void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backfill Command Handler
|
|
3
|
+
*
|
|
4
|
+
* CLI command for generating daily log entries from historical sessions
|
|
5
|
+
* via claude -p. Provides dry-run preview, confirmation prompt, progress bar,
|
|
6
|
+
* and project/batch filtering.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
import type { CommandResult } from "../command-result.js";
|
|
10
|
+
import type { BackfillOptions, BackfillResult, DryRunResult, IDailyLogWriter } from "../../../application/services/backfill-service.js";
|
|
11
|
+
/**
|
|
12
|
+
* Options parsed from the CLI.
|
|
13
|
+
*/
|
|
14
|
+
export interface BackfillCommandOptions {
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
project?: string;
|
|
17
|
+
batch: string;
|
|
18
|
+
force?: boolean;
|
|
19
|
+
writeMemoryFiles?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Service interface for dependency injection in tests.
|
|
23
|
+
*/
|
|
24
|
+
export interface BackfillServiceDeps {
|
|
25
|
+
dryRun(options?: {
|
|
26
|
+
project?: string | undefined;
|
|
27
|
+
}): Promise<DryRunResult>;
|
|
28
|
+
backfill(options?: BackfillOptions): Promise<BackfillResult>;
|
|
29
|
+
}
|
|
30
|
+
export interface BackfillExecutionDeps {
|
|
31
|
+
confirm?: (message: string) => Promise<boolean>;
|
|
32
|
+
createProgressBar?: (total: number) => Promise<{
|
|
33
|
+
start: Function;
|
|
34
|
+
update: Function;
|
|
35
|
+
stop: Function;
|
|
36
|
+
} | null>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Daily log writer implementation.
|
|
40
|
+
*
|
|
41
|
+
* Writes or appends legacy daily log entries to the memory-file root.
|
|
42
|
+
* Creates parent directories if needed.
|
|
43
|
+
*/
|
|
44
|
+
export declare class FileDailyLogWriter implements IDailyLogWriter {
|
|
45
|
+
private readonly memoryDir;
|
|
46
|
+
constructor(memoryDir: string);
|
|
47
|
+
writeOrAppend(datePath: string, content: string): Promise<boolean>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Execute the backfill command programmatically.
|
|
51
|
+
*
|
|
52
|
+
* Separated from createBackfillCommand for testability.
|
|
53
|
+
* Tests inject mock BackfillServiceDeps; CLI injects real ones.
|
|
54
|
+
*/
|
|
55
|
+
export declare function executeBackfillCommand(options: BackfillCommandOptions, service: BackfillServiceDeps, deps?: BackfillExecutionDeps): Promise<CommandResult>;
|
|
56
|
+
export declare function createBackfillCommand(): Command;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browse Command Handler
|
|
3
|
+
*
|
|
4
|
+
* CLI command for interactive session browsing.
|
|
5
|
+
* Launches picker UI and dispatches to appropriate command based on action.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import type { CommandResult } from "../command-result.js";
|
|
9
|
+
import { executeShowCommand } from "./show.js";
|
|
10
|
+
import { executeSearchCommand } from "./search.js";
|
|
11
|
+
import { executeContextCommand } from "./context.js";
|
|
12
|
+
import { executeRelatedCommand } from "./related.js";
|
|
13
|
+
/**
|
|
14
|
+
* Options for the browse command.
|
|
15
|
+
*/
|
|
16
|
+
export interface BrowseCommandOptions {
|
|
17
|
+
/** Maximum sessions to show in the picker (as string, parsed to integer) */
|
|
18
|
+
limit?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Runtime dependencies for executeBrowseCommand.
|
|
22
|
+
*
|
|
23
|
+
* Operational dependencies that tests substitute for isolation. Keeps
|
|
24
|
+
* dispatch targets injectable without `mock.module()` (which is
|
|
25
|
+
* process-wide in Bun and leaks across test files).
|
|
26
|
+
*/
|
|
27
|
+
export interface BrowseCommandDeps {
|
|
28
|
+
/** Database path. Defaults to getDefaultDbPath(). */
|
|
29
|
+
dbPath?: string;
|
|
30
|
+
/** Show command dispatcher. Defaults to the real implementation. */
|
|
31
|
+
show?: typeof executeShowCommand;
|
|
32
|
+
/** Search command dispatcher. Defaults to the real implementation. */
|
|
33
|
+
search?: typeof executeSearchCommand;
|
|
34
|
+
/** Context command dispatcher. Defaults to the real implementation. */
|
|
35
|
+
context?: typeof executeContextCommand;
|
|
36
|
+
/** Related command dispatcher. Defaults to the real implementation. */
|
|
37
|
+
related?: typeof executeRelatedCommand;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create the browse command for Commander.js.
|
|
41
|
+
*
|
|
42
|
+
* @returns Configured Command instance
|
|
43
|
+
*/
|
|
44
|
+
export declare function createBrowseCommand(): Command;
|
|
45
|
+
/**
|
|
46
|
+
* Execute the browse command programmatically.
|
|
47
|
+
*
|
|
48
|
+
* Interactively browse sessions using fuzzy search. Requires an
|
|
49
|
+
* interactive TTY; will return exitCode 1 in non-interactive environments.
|
|
50
|
+
* Handles its own database initialization and teardown.
|
|
51
|
+
*
|
|
52
|
+
* @param options - Browse command options
|
|
53
|
+
* @returns CommandResult with exitCode 0 (success) or 1 (not available/error)
|
|
54
|
+
*/
|
|
55
|
+
export declare function executeBrowseCommand(options: BrowseCommandOptions, deps?: BrowseCommandDeps): Promise<CommandResult>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion Command Handler
|
|
3
|
+
*
|
|
4
|
+
* CLI command for generating shell completion scripts for bash, zsh, and fish.
|
|
5
|
+
* Users can eval or source these scripts to enable tab-completion for the CLI.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import type { CommandResult } from "../command-result.js";
|
|
9
|
+
/**
|
|
10
|
+
* Supported shell types for completion generation.
|
|
11
|
+
*/
|
|
12
|
+
export type ShellType = "bash" | "zsh" | "fish";
|
|
13
|
+
/**
|
|
14
|
+
* Check if a string is a valid shell type.
|
|
15
|
+
*
|
|
16
|
+
* @param shell String to check
|
|
17
|
+
* @returns True if shell is a valid ShellType
|
|
18
|
+
*/
|
|
19
|
+
export declare function isValidShell(shell: string): shell is ShellType;
|
|
20
|
+
/**
|
|
21
|
+
* Generate bash completion script.
|
|
22
|
+
*
|
|
23
|
+
* @returns Bash completion script string
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateBashCompletion(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generate zsh completion script.
|
|
28
|
+
*
|
|
29
|
+
* @returns Zsh completion script string
|
|
30
|
+
*/
|
|
31
|
+
export declare function generateZshCompletion(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Generate fish completion script.
|
|
34
|
+
*
|
|
35
|
+
* @returns Fish completion script string
|
|
36
|
+
*/
|
|
37
|
+
export declare function generateFishCompletion(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Generate completion script for the specified shell.
|
|
40
|
+
*
|
|
41
|
+
* @param shell Shell type (bash, zsh, or fish)
|
|
42
|
+
* @returns Completion script string
|
|
43
|
+
* @throws Error if shell type is invalid
|
|
44
|
+
*/
|
|
45
|
+
export declare function generateCompletion(shell: ShellType): string;
|
|
46
|
+
/**
|
|
47
|
+
* Create the completion command for Commander.js.
|
|
48
|
+
*
|
|
49
|
+
* @returns Configured Command instance
|
|
50
|
+
*/
|
|
51
|
+
export declare function createCompletionCommand(): Command;
|
|
52
|
+
/**
|
|
53
|
+
* Execute the completion command programmatically.
|
|
54
|
+
*
|
|
55
|
+
* Outputs a shell completion script for the specified shell type.
|
|
56
|
+
* Supported shells: bash, zsh, fish.
|
|
57
|
+
*
|
|
58
|
+
* @param shell - Shell type (bash, zsh, or fish)
|
|
59
|
+
* @returns CommandResult with exitCode 0 (success) or 1 (invalid shell)
|
|
60
|
+
*/
|
|
61
|
+
export declare function executeCompletionCommand(shell: string): CommandResult;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Command Handler
|
|
3
|
+
*
|
|
4
|
+
* CLI command for showing aggregated context for a project.
|
|
5
|
+
* Supports filtering by days, token budgets, cross-project mode,
|
|
6
|
+
* and multiple output formats including AI-optimized output.
|
|
7
|
+
*
|
|
8
|
+
* When --format ai, --budget, or --cross-project is set, uses
|
|
9
|
+
* SmartContextService for structured briefings from memory files.
|
|
10
|
+
* Otherwise falls back to legacy SqliteContextService for backward
|
|
11
|
+
* compatibility.
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from "commander";
|
|
14
|
+
import type { CommandResult } from "../command-result.js";
|
|
15
|
+
/**
|
|
16
|
+
* Options for the context command.
|
|
17
|
+
*/
|
|
18
|
+
export interface ContextCommandOptions {
|
|
19
|
+
/** Sessions from last N days (includes today) */
|
|
20
|
+
days?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Output format. Phase 32 (CLI-03) normalized choices: `brief`,
|
|
23
|
+
* `ai`. `detailed` retained as deprecated alias (one-minor cadence;
|
|
24
|
+
* CHANGELOG documents removal). Undefined = no-flag default
|
|
25
|
+
* (existing brief behavior preserved for backward compatibility).
|
|
26
|
+
*/
|
|
27
|
+
format?: "brief" | "ai" | "detailed";
|
|
28
|
+
/** Maximum token budget for smart context */
|
|
29
|
+
budget?: number;
|
|
30
|
+
/** Include cross-project learnings and decisions */
|
|
31
|
+
crossProject?: boolean;
|
|
32
|
+
/** Output as JSON */
|
|
33
|
+
json?: boolean;
|
|
34
|
+
/** Show detailed output with timing */
|
|
35
|
+
verbose?: boolean;
|
|
36
|
+
/** Minimal output */
|
|
37
|
+
quiet?: boolean;
|
|
38
|
+
/** Override database path (for testing) */
|
|
39
|
+
dbPath?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create the context command for Commander.js.
|
|
43
|
+
*
|
|
44
|
+
* @returns Configured Command instance
|
|
45
|
+
*/
|
|
46
|
+
export declare function createContextCommand(): Command;
|
|
47
|
+
export declare function executeContextCommand(project: string, options: ContextCommandOptions): Promise<CommandResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Internal implementation of the context query execution.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runContextInternal(project: string, options: ContextCommandOptions, deps?: {
|
|
52
|
+
dbPath?: string;
|
|
53
|
+
}): Promise<CommandResult>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor Command Handler (Wrapper)
|
|
3
|
+
*
|
|
4
|
+
* Thin view that delegates health checks and diagnostics to executeStatusCommand.
|
|
5
|
+
* Maintained for backwards compatibility.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import type { CommandResult } from "../command-result.js";
|
|
9
|
+
import type { GatherStatusOptions, StatusInfo } from "./status.js";
|
|
10
|
+
import type { HealthCheckResult } from "../../../infrastructure/database/health-checker.js";
|
|
11
|
+
/**
|
|
12
|
+
* Options for the doctor command.
|
|
13
|
+
*/
|
|
14
|
+
export interface DoctorOptions {
|
|
15
|
+
/** Output health check results as JSON */
|
|
16
|
+
json?: boolean;
|
|
17
|
+
/** Attempt to fix common issues automatically */
|
|
18
|
+
fix?: boolean;
|
|
19
|
+
/** Perform portability diagnostics */
|
|
20
|
+
portability?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Runtime dependencies for executeDoctorCommand.
|
|
24
|
+
*/
|
|
25
|
+
export interface DoctorCommandDeps {
|
|
26
|
+
healthOverrides?: {
|
|
27
|
+
dbPath?: string;
|
|
28
|
+
configDir?: string;
|
|
29
|
+
logsDir?: string;
|
|
30
|
+
sourceDir?: string;
|
|
31
|
+
hookOverrides?: import("../../../infrastructure/hooks/settings-manager.js").PathOverrides;
|
|
32
|
+
};
|
|
33
|
+
gatherStatus?: (options: GatherStatusOptions) => Promise<StatusInfo>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Format health check result as readable output.
|
|
37
|
+
*/
|
|
38
|
+
export declare function formatHealthResult(result: HealthCheckResult, useColor: boolean): string;
|
|
39
|
+
/**
|
|
40
|
+
* Attempt automatic fixes for common issues.
|
|
41
|
+
*/
|
|
42
|
+
export declare function attemptFixes(result: HealthCheckResult, useColor: boolean): string[];
|
|
43
|
+
/**
|
|
44
|
+
* Create the doctor command for Commander.js.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createDoctorCommand(): Command;
|
|
47
|
+
/**
|
|
48
|
+
* Execute the doctor command programmatically by wrapping executeStatusCommand.
|
|
49
|
+
*/
|
|
50
|
+
export declare function executeDoctorCommand(options: DoctorOptions, deps?: DoctorCommandDeps): Promise<CommandResult>;
|
|
51
|
+
export declare function isMixedPathDialect(decoded: string, platform?: NodeJS.Platform): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Execute portability diagnostics for environment transitions.
|
|
54
|
+
*/
|
|
55
|
+
export declare function runPortabilityDiagnostics(options: DoctorOptions, deps?: DoctorCommandDeps): Promise<CommandResult>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export Command Handler
|
|
3
|
+
*
|
|
4
|
+
* CLI command for exporting the database to a JSON backup file.
|
|
5
|
+
* Supports quiet mode and JSON output for scripting.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import type { CommandResult } from "../command-result.js";
|
|
9
|
+
/**
|
|
10
|
+
* Options for the export command.
|
|
11
|
+
*/
|
|
12
|
+
export interface ExportOptions {
|
|
13
|
+
/** Suppress output except the file path */
|
|
14
|
+
quiet?: boolean;
|
|
15
|
+
/** Output stats as JSON */
|
|
16
|
+
json?: boolean;
|
|
17
|
+
/** Export raw sensitive values instead of redacting known secret patterns */
|
|
18
|
+
includeSensitive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create the export command for Commander.js.
|
|
22
|
+
*
|
|
23
|
+
* @returns Configured Command instance
|
|
24
|
+
*/
|
|
25
|
+
export declare function createExportCommand(): Command;
|
|
26
|
+
/**
|
|
27
|
+
* Execute the export command programmatically.
|
|
28
|
+
*
|
|
29
|
+
* Exports the database to a JSON backup file. Handles its own database
|
|
30
|
+
* initialization and teardown.
|
|
31
|
+
*
|
|
32
|
+
* @param outputFile - Destination file path for the JSON backup
|
|
33
|
+
* @param options - Export command options
|
|
34
|
+
* @returns CommandResult with exitCode 0 (success) or 1 (error)
|
|
35
|
+
*/
|
|
36
|
+
export declare function executeExportCommand(outputFile: string, options?: ExportOptions): Promise<CommandResult>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract CLI Command Handler
|
|
3
|
+
*
|
|
4
|
+
* Runs the comparative LLM fact extraction pipeline on session history.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
import type { CommandResult } from "../command-result.js";
|
|
8
|
+
import { type MemoryConfig } from "../../../infrastructure/hooks/config-manager.js";
|
|
9
|
+
import type { IExtractionProvider } from "../../../domain/ports/extraction.js";
|
|
10
|
+
import type { IEmbeddingProvider } from "../../../domain/ports/embedding.js";
|
|
11
|
+
export interface ExtractCommandOptions {
|
|
12
|
+
project: string;
|
|
13
|
+
all?: boolean;
|
|
14
|
+
since?: string;
|
|
15
|
+
force?: boolean;
|
|
16
|
+
json?: boolean;
|
|
17
|
+
quiet?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ExtractCommandDeps {
|
|
20
|
+
dbPath?: string;
|
|
21
|
+
mockExtractor?: IExtractionProvider;
|
|
22
|
+
mockEmbedder?: IEmbeddingProvider;
|
|
23
|
+
createEmbedder?: (config: MemoryConfig) => Promise<IEmbeddingProvider | undefined>;
|
|
24
|
+
eventLogPath?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Custom Progress indicator for fact extraction.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ExtractProgress {
|
|
30
|
+
private current;
|
|
31
|
+
private total;
|
|
32
|
+
private isTty;
|
|
33
|
+
private quiet;
|
|
34
|
+
constructor(total: number, quiet?: boolean);
|
|
35
|
+
update(sessionName: string): void;
|
|
36
|
+
stop(): void;
|
|
37
|
+
}
|
|
38
|
+
export declare function createDefaultEmbedder(config: MemoryConfig): Promise<IEmbeddingProvider | undefined>;
|
|
39
|
+
export declare function createExtractCommand(): Command;
|
|
40
|
+
export declare function executeExtractCommand(options: ExtractCommandOptions, deps?: ExtractCommandDeps): Promise<CommandResult>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Facts CLI Command Handler
|
|
3
|
+
*
|
|
4
|
+
* Displays active project facts or full historical lineages including superseded updates.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
import type { CommandResult } from "../command-result.js";
|
|
8
|
+
export interface FactsCommandOptions {
|
|
9
|
+
project: string;
|
|
10
|
+
superseded?: boolean;
|
|
11
|
+
json?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FactsCommandDeps {
|
|
14
|
+
dbPath?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function createFactsCommand(): Command;
|
|
17
|
+
export declare function executeFactsCommand(options: FactsCommandOptions, deps?: FactsCommandDeps): Promise<CommandResult>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction Dashboard Handler
|
|
3
|
+
*
|
|
4
|
+
* Handles the friction dashboard subcommand.
|
|
5
|
+
* Supports terminal, HTML, and JSON output modes.
|
|
6
|
+
*/
|
|
7
|
+
import type { CommandResult } from "../../command-result.js";
|
|
8
|
+
import type { FrictionExecuteOptions, BrowserOpener } from "./types.js";
|
|
9
|
+
import type { FrictionService } from "../../../../application/services/friction-service.js";
|
|
10
|
+
/**
|
|
11
|
+
* Handle the dashboard action.
|
|
12
|
+
*
|
|
13
|
+
* Three modes:
|
|
14
|
+
* - Default: Rich terminal output via formatFrictionDashboard
|
|
15
|
+
* - --html: Generate self-contained HTML file and open in browser
|
|
16
|
+
* - --json: Output stats and trends as JSON
|
|
17
|
+
*/
|
|
18
|
+
export declare function handleDashboard(service: FrictionService, options: FrictionExecuteOptions, openFn?: BrowserOpener): Promise<CommandResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction command group: log, list, resolve, wont-fix, dashboard, purge.
|
|
3
|
+
* Each subcommand defines --json independently (Commander.js does not inherit parent options).
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
import type { CommandResult } from "../../command-result.js";
|
|
7
|
+
import type { FrictionExecuteOptions, FrictionCommandDeps } from "./types.js";
|
|
8
|
+
/** Create the friction command group for Commander.js. */
|
|
9
|
+
export declare function createFrictionCommand(): Command;
|
|
10
|
+
/** Execute a friction command programmatically. Manages DB lifecycle, dispatches to handlers. */
|
|
11
|
+
export declare function executeFrictionCommand(options: FrictionExecuteOptions, deps?: FrictionCommandDeps): Promise<CommandResult>;
|
|
12
|
+
export type { BrowserOpener, FrictionCommandDeps, FrictionCommandOptions, FrictionLogOptions, FrictionListOptions, FrictionResolveOptions, FrictionPurgeOptions, FrictionExecuteOptions, } from "./types.js";
|