@ephemushroom/opencode-claude-mem 0.6.2 → 0.7.1
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 +145 -562
- package/dist/capture-status.d.ts +26 -0
- package/dist/cli.js +370 -352
- package/dist/official-sync.d.ts +29 -0
- package/dist/server.d.ts +70 -0
- package/dist/server.js +1299 -0
- package/dist/sidebar-model.d.ts +33 -5
- package/dist/tui.js +280 -352
- package/dist/worker-client.d.ts +52 -90
- package/dist/worker-start.d.ts +46 -0
- package/dist/worker-tools.d.ts +33 -0
- package/package.json +10 -23
- package/dist/file-context.d.ts +0 -17
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -13844
- package/dist/memory-options.d.ts +0 -12
- package/dist/memory-session.d.ts +0 -22
- package/dist/memory-turn.d.ts +0 -10
- package/dist/memory-worker.d.ts +0 -21
- package/dist/package-server.d.ts +0 -7
- package/dist/package-server.js +0 -10
- package/dist/shared.d.ts +0 -14
- package/dist/tui-registration.d.ts +0 -16
- package/dist/v2.d.ts +0 -22
- package/dist/v2.js +0 -5133
package/dist/sidebar-model.d.ts
CHANGED
|
@@ -1,23 +1,36 @@
|
|
|
1
|
+
import { type CaptureStatus } from './capture-status';
|
|
1
2
|
export declare const POLL_INTERVAL_MS = 5000;
|
|
2
3
|
export declare const OBSERVATION_TYPE_ICONS: Record<string, string>;
|
|
3
4
|
export interface MemSidebarView {
|
|
4
5
|
readonly healthy: boolean;
|
|
6
|
+
/** What this package's server part reported; null when it is not loaded. */
|
|
7
|
+
readonly capture: CaptureStatus | null;
|
|
5
8
|
readonly project: string;
|
|
9
|
+
/** `project` when counts come from the Worker database; `all` for the global fallback. */
|
|
10
|
+
readonly scope: 'project' | 'all';
|
|
11
|
+
readonly totalObservations: number | null;
|
|
6
12
|
readonly observations: number | null;
|
|
7
13
|
readonly sessions: number | null;
|
|
8
14
|
readonly summaries: number | null;
|
|
9
15
|
readonly queueDepth: number | null;
|
|
10
16
|
readonly isProcessing: boolean;
|
|
17
|
+
/** Start of the minute the ages are measured from; ticks once a minute. */
|
|
18
|
+
readonly asOf: number;
|
|
11
19
|
readonly recentSummaries: readonly {
|
|
12
20
|
id: number;
|
|
13
21
|
request: string;
|
|
22
|
+
at: number | null;
|
|
14
23
|
}[];
|
|
15
24
|
readonly recentObservations: readonly {
|
|
16
25
|
id: number;
|
|
17
26
|
type: string;
|
|
18
27
|
title: string;
|
|
28
|
+
at: number | null;
|
|
19
29
|
}[];
|
|
20
30
|
}
|
|
31
|
+
export type RecentItemKind = 'summary' | 'observation';
|
|
32
|
+
/** Receives a click on a recent row; ids address the Worker's detail endpoints. */
|
|
33
|
+
export type RecentItemHandler = (kind: RecentItemKind, id: number) => void;
|
|
21
34
|
export interface ViewNode {
|
|
22
35
|
readonly kind: 'box' | 'text';
|
|
23
36
|
readonly props: Record<string, unknown>;
|
|
@@ -36,15 +49,30 @@ export interface Theme {
|
|
|
36
49
|
export declare function box(props: Record<string, unknown>, children: readonly ViewNode[]): ViewNode;
|
|
37
50
|
export declare function text(props: Record<string, unknown>, value: string): ViewNode;
|
|
38
51
|
export declare function decodeEntities(value: string): string;
|
|
39
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Drops the current project's name from a title: every row in this sidebar already belongs
|
|
54
|
+
* to that project, so repeating it costs the space the rest of the title needs. Whole-token
|
|
55
|
+
* matches only, so a name inside a longer word survives. Returns the input when nothing else
|
|
56
|
+
* is left.
|
|
57
|
+
*/
|
|
58
|
+
export declare function stripProjectName(value: string, project: string): string;
|
|
59
|
+
/** Short age such as `just now`, `12m ago`, `3h ago`, `2d ago`, then a calendar date. */
|
|
60
|
+
export declare function formatAge(at: number | null, now: number): string;
|
|
40
61
|
export declare function formatCount(value: number | null): string;
|
|
41
62
|
export declare function summaryLine(view: MemSidebarView): {
|
|
42
63
|
label: string;
|
|
43
64
|
tone: 'ok' | 'warn' | 'err';
|
|
44
65
|
};
|
|
45
66
|
export declare function toneColor(tone: 'ok' | 'warn' | 'err', theme: Theme): unknown;
|
|
46
|
-
export declare function bulletRow(icon: string, iconColor: unknown,
|
|
47
|
-
export declare function expandedRows(view: MemSidebarView, theme: Theme): ViewNode[];
|
|
48
|
-
export declare function buildMemNodes(view: MemSidebarView, theme: Theme, collapsed: boolean, onToggle: () => void): ViewNode[];
|
|
67
|
+
export declare function bulletRow(icon: string, iconColor: unknown, value: string, theme: Theme, labelColor?: unknown): ViewNode;
|
|
68
|
+
export declare function expandedRows(view: MemSidebarView, theme: Theme, onSelect?: RecentItemHandler): ViewNode[];
|
|
69
|
+
export declare function buildMemNodes(view: MemSidebarView, theme: Theme, collapsed: boolean, onToggle: () => void, onSelect?: RecentItemHandler): ViewNode[];
|
|
49
70
|
export declare function viewKey(view: MemSidebarView): string;
|
|
50
|
-
export declare function readMemView(project: string, collapsed: boolean): Promise<MemSidebarView>;
|
|
71
|
+
export declare function readMemView(project: string, collapsed: boolean, directory?: string): Promise<MemSidebarView>;
|
|
72
|
+
export interface MemDetail {
|
|
73
|
+
readonly title: string;
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}
|
|
76
|
+
/** Dialog text for one observation or session summary; null when the Worker has none. */
|
|
77
|
+
export declare function describeDetail(kind: RecentItemKind, id: number, record: Record<string, unknown> | null): MemDetail | null;
|
|
78
|
+
export declare function readDetail(kind: RecentItemKind, id: number): Promise<MemDetail | null>;
|