opencode-memory-plugin 0.1.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 (102) hide show
  1. package/README.md +73 -0
  2. package/dist/compression/compressor.d.ts +86 -0
  3. package/dist/compression/compressor.d.ts.map +1 -0
  4. package/dist/compression/compressor.js +142 -0
  5. package/dist/compression/compressor.js.map +1 -0
  6. package/dist/compression/parser.d.ts +73 -0
  7. package/dist/compression/parser.d.ts.map +1 -0
  8. package/dist/compression/parser.js +139 -0
  9. package/dist/compression/parser.js.map +1 -0
  10. package/dist/compression/pipeline.d.ts +73 -0
  11. package/dist/compression/pipeline.d.ts.map +1 -0
  12. package/dist/compression/pipeline.js +205 -0
  13. package/dist/compression/pipeline.js.map +1 -0
  14. package/dist/compression/privacy.d.ts +8 -0
  15. package/dist/compression/privacy.d.ts.map +1 -0
  16. package/dist/compression/privacy.js +30 -0
  17. package/dist/compression/privacy.js.map +1 -0
  18. package/dist/compression/prompts.d.ts +24 -0
  19. package/dist/compression/prompts.d.ts.map +1 -0
  20. package/dist/compression/prompts.js +106 -0
  21. package/dist/compression/prompts.js.map +1 -0
  22. package/dist/compression/quality.d.ts +48 -0
  23. package/dist/compression/quality.d.ts.map +1 -0
  24. package/dist/compression/quality.js +159 -0
  25. package/dist/compression/quality.js.map +1 -0
  26. package/dist/config.d.ts +114 -0
  27. package/dist/config.d.ts.map +1 -0
  28. package/dist/config.js +265 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/context/generator.d.ts +28 -0
  31. package/dist/context/generator.d.ts.map +1 -0
  32. package/dist/context/generator.js +80 -0
  33. package/dist/context/generator.js.map +1 -0
  34. package/dist/hooks/chat-message.d.ts +14 -0
  35. package/dist/hooks/chat-message.d.ts.map +1 -0
  36. package/dist/hooks/chat-message.js +35 -0
  37. package/dist/hooks/chat-message.js.map +1 -0
  38. package/dist/hooks/compaction.d.ts +13 -0
  39. package/dist/hooks/compaction.d.ts.map +1 -0
  40. package/dist/hooks/compaction.js +22 -0
  41. package/dist/hooks/compaction.js.map +1 -0
  42. package/dist/hooks/events.d.ts +52 -0
  43. package/dist/hooks/events.d.ts.map +1 -0
  44. package/dist/hooks/events.js +138 -0
  45. package/dist/hooks/events.js.map +1 -0
  46. package/dist/hooks/system-transform.d.ts +14 -0
  47. package/dist/hooks/system-transform.d.ts.map +1 -0
  48. package/dist/hooks/system-transform.js +26 -0
  49. package/dist/hooks/system-transform.js.map +1 -0
  50. package/dist/hooks/tool-after.d.ts +26 -0
  51. package/dist/hooks/tool-after.d.ts.map +1 -0
  52. package/dist/hooks/tool-after.js +88 -0
  53. package/dist/hooks/tool-after.js.map +1 -0
  54. package/dist/index.d.ts +11 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +79 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/logger.d.ts +60 -0
  59. package/dist/logger.d.ts.map +1 -0
  60. package/dist/logger.js +91 -0
  61. package/dist/logger.js.map +1 -0
  62. package/dist/storage/db.d.ts +22 -0
  63. package/dist/storage/db.d.ts.map +1 -0
  64. package/dist/storage/db.js +198 -0
  65. package/dist/storage/db.js.map +1 -0
  66. package/dist/storage/schema.d.ts +2473 -0
  67. package/dist/storage/schema.d.ts.map +1 -0
  68. package/dist/storage/schema.js +100 -0
  69. package/dist/storage/schema.js.map +1 -0
  70. package/dist/storage/store.d.ts +376 -0
  71. package/dist/storage/store.d.ts.map +1 -0
  72. package/dist/storage/store.js +1025 -0
  73. package/dist/storage/store.js.map +1 -0
  74. package/dist/tools/memory-forget.d.ts +11 -0
  75. package/dist/tools/memory-forget.d.ts.map +1 -0
  76. package/dist/tools/memory-forget.js +249 -0
  77. package/dist/tools/memory-forget.js.map +1 -0
  78. package/dist/tools/memory-get.d.ts +10 -0
  79. package/dist/tools/memory-get.d.ts.map +1 -0
  80. package/dist/tools/memory-get.js +50 -0
  81. package/dist/tools/memory-get.js.map +1 -0
  82. package/dist/tools/memory-search.d.ts +11 -0
  83. package/dist/tools/memory-search.d.ts.map +1 -0
  84. package/dist/tools/memory-search.js +38 -0
  85. package/dist/tools/memory-search.js.map +1 -0
  86. package/dist/tools/memory-stats.d.ts +39 -0
  87. package/dist/tools/memory-stats.d.ts.map +1 -0
  88. package/dist/tools/memory-stats.js +121 -0
  89. package/dist/tools/memory-stats.js.map +1 -0
  90. package/dist/tools/memory-timeline.d.ts +10 -0
  91. package/dist/tools/memory-timeline.d.ts.map +1 -0
  92. package/dist/tools/memory-timeline.js +49 -0
  93. package/dist/tools/memory-timeline.js.map +1 -0
  94. package/dist/types.d.ts +178 -0
  95. package/dist/types.d.ts.map +1 -0
  96. package/dist/types.js +4 -0
  97. package/dist/types.js.map +1 -0
  98. package/dist/utils.d.ts +130 -0
  99. package/dist/utils.d.ts.map +1 -0
  100. package/dist/utils.js +308 -0
  101. package/dist/utils.js.map +1 -0
  102. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # opencode-memory-plugin
2
+
3
+ Persistent cross-session memory plugin for OpenCode, designed as a port of claude-mem to OpenCode according to the DAQ in this repository.
4
+
5
+ ## MVP Scope
6
+
7
+ - Local persistence in SQLite with FTS5 index
8
+ - Crash-safe pending queue for tool outputs
9
+ - Async AI compression pipeline (in-process)
10
+ - Session summaries
11
+ - Retrieval tools: `memory_search`, `memory_timeline`, `memory_get`
12
+ - System context injection via `experimental.chat.system.transform`
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ bun add opencode-memory-plugin
18
+ ```
19
+
20
+ Add in `opencode.json`:
21
+
22
+ ```json
23
+ {
24
+ "$schema": "https://opencode.ai/config.json",
25
+ "plugin": ["opencode-memory-plugin"]
26
+ }
27
+ ```
28
+
29
+ ## Optional Memory Config
30
+
31
+ You can provide plugin-specific config files in any of these paths:
32
+
33
+ - `~/.config/opencode/memory/config.json`
34
+ - `~/.config/opencode/memory/config.jsonc`
35
+ - `.opencode/memory.json`
36
+ - `.opencode/memory.jsonc`
37
+ - `opencode-memory.json`
38
+ - `opencode-memory.jsonc`
39
+
40
+ Or set `OPENCODE_MEMORY_CONFIG=/absolute/path/to/config.json`.
41
+
42
+ Example:
43
+
44
+ ```json
45
+ {
46
+ "dbPath": "~/.config/opencode/memory/memory.db",
47
+ "indexSize": 50,
48
+ "sampleSize": 5,
49
+ "maxPendingRetries": 3,
50
+ "compressionModel": null,
51
+ "maxRawContentSize": 50000,
52
+ "privacyStrip": true,
53
+ "compressionBatchSize": 10,
54
+ "retentionDays": 90,
55
+ "logLevel": "info"
56
+ }
57
+ ```
58
+
59
+ ## Development
60
+
61
+ ```bash
62
+ bun install
63
+ bun run typecheck
64
+ bun test
65
+ bun run build
66
+ ```
67
+
68
+ ## Notes
69
+
70
+ - This package targets OpenCode plugin APIs currently exposed by `@opencode-ai/plugin@1.2.x`.
71
+ - DAQ legacy naming (`beforePrompt`, `afterResponse`) is mapped in this implementation to:
72
+ - `tool.execute.after` for capture
73
+ - `experimental.chat.system.transform` for injection
@@ -0,0 +1,86 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { ObservationCompressor, ModelSelection, RuntimeState } from "../types";
3
+ /**
4
+ * Uses an injected AI SDK language model for compression.
5
+ */
6
+ export declare class LanguageModelObservationCompressor implements ObservationCompressor {
7
+ private readonly model;
8
+ constructor(model: import("ai").LanguageModel);
9
+ /**
10
+ * Compresses a pending tool output using the injected model.
11
+ *
12
+ * @param input - Compression input.
13
+ * @returns Raw text from the model.
14
+ */
15
+ compressObservation(input: {
16
+ pendingMessage: import("../types").PendingMessage;
17
+ prompt: string;
18
+ model: ModelSelection | null;
19
+ abortSignal?: AbortSignal;
20
+ }): Promise<{
21
+ text: string;
22
+ modelUsed: string | null;
23
+ }>;
24
+ /**
25
+ * Summarizes a session using the injected model.
26
+ *
27
+ * @param input - Summary input.
28
+ * @returns Raw text from the model.
29
+ */
30
+ summarizeSession(input: {
31
+ sessionId: string;
32
+ prompt: string;
33
+ model: ModelSelection | null;
34
+ abortSignal?: AbortSignal;
35
+ }): Promise<{
36
+ text: string;
37
+ modelUsed: string | null;
38
+ }>;
39
+ }
40
+ /**
41
+ * Uses ephemeral hidden OpenCode sessions to access the currently configured provider.
42
+ */
43
+ export declare class SessionPromptObservationCompressor implements ObservationCompressor {
44
+ private readonly input;
45
+ private readonly state;
46
+ constructor(input: PluginInput, state: RuntimeState);
47
+ /**
48
+ * Compresses a pending tool output in an ephemeral hidden session.
49
+ *
50
+ * @param input - Compression input.
51
+ * @returns Raw text from the model.
52
+ */
53
+ compressObservation(input: {
54
+ pendingMessage: import("../types").PendingMessage;
55
+ prompt: string;
56
+ model: ModelSelection | null;
57
+ abortSignal?: AbortSignal;
58
+ }): Promise<{
59
+ text: string;
60
+ modelUsed: string | null;
61
+ }>;
62
+ /**
63
+ * Summarizes a session in an ephemeral hidden session.
64
+ *
65
+ * @param input - Summary input.
66
+ * @returns Raw text from the model.
67
+ */
68
+ summarizeSession(input: {
69
+ sessionId: string;
70
+ prompt: string;
71
+ model: ModelSelection | null;
72
+ abortSignal?: AbortSignal;
73
+ }): Promise<{
74
+ text: string;
75
+ modelUsed: string | null;
76
+ }>;
77
+ /**
78
+ * Creates an internal session, prompts the model, and deletes the session afterwards.
79
+ *
80
+ * @param prompt - Prompt text.
81
+ * @param model - Optional model override.
82
+ * @returns Raw text and the model identifier.
83
+ */
84
+ private runPrompt;
85
+ }
86
+ //# sourceMappingURL=compressor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compressor.d.ts","sourceRoot":"","sources":["../../src/compression/compressor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AASnF;;GAEG;AACH,qBAAa,kCAAmC,YAAW,qBAAqB;IAClE,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,OAAO,IAAI,EAAE,aAAa;IAE9D;;;;;OAKG;IACG,mBAAmB,CAAC,KAAK,EAAE;QAC/B,cAAc,EAAE,OAAO,UAAU,EAAE,cAAc,CAAA;QACjD,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;QAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;KAC1B;;;;IAgBD;;;;;OAKG;IACG,gBAAgB,CAAC,KAAK,EAAE;QAC5B,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;QAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;KAC1B;;;;CAeF;AAED;;GAEG;AACH,qBAAa,kCAAmC,YAAW,qBAAqB;IAE5E,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBADL,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,YAAY;IAGtC;;;;;OAKG;IACG,mBAAmB,CAAC,KAAK,EAAE;QAC/B,cAAc,EAAE,OAAO,UAAU,EAAE,cAAc,CAAA;QACjD,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;QAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;KAC1B;;;;IAID;;;;;OAKG;IACG,gBAAgB,CAAC,KAAK,EAAE;QAC5B,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;QAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;KAC1B;;;;IAID;;;;;;OAMG;YACW,SAAS;CAuDxB"}
@@ -0,0 +1,142 @@
1
+ import { generateText } from "ai";
2
+ const INTERNAL_SESSION_TITLE = "[plugin-memory] background compression";
3
+ const COMPRESSOR_SYSTEM_PROMPT = `You are a background memory compressor.
4
+ Return raw JSON only.
5
+ Do not use tools.
6
+ Do not include markdown fences.
7
+ Be concise and deterministic.`;
8
+ /**
9
+ * Uses an injected AI SDK language model for compression.
10
+ */
11
+ export class LanguageModelObservationCompressor {
12
+ model;
13
+ constructor(model) {
14
+ this.model = model;
15
+ }
16
+ /**
17
+ * Compresses a pending tool output using the injected model.
18
+ *
19
+ * @param input - Compression input.
20
+ * @returns Raw text from the model.
21
+ */
22
+ async compressObservation(input) {
23
+ const result = await generateText({
24
+ model: this.model,
25
+ system: COMPRESSOR_SYSTEM_PROMPT,
26
+ prompt: input.prompt,
27
+ temperature: 0,
28
+ maxOutputTokens: 1_000,
29
+ abortSignal: input.abortSignal,
30
+ });
31
+ return {
32
+ text: result.text,
33
+ modelUsed: input.model?.raw ?? null,
34
+ };
35
+ }
36
+ /**
37
+ * Summarizes a session using the injected model.
38
+ *
39
+ * @param input - Summary input.
40
+ * @returns Raw text from the model.
41
+ */
42
+ async summarizeSession(input) {
43
+ const result = await generateText({
44
+ model: this.model,
45
+ system: COMPRESSOR_SYSTEM_PROMPT,
46
+ prompt: input.prompt,
47
+ temperature: 0,
48
+ maxOutputTokens: 1_000,
49
+ abortSignal: input.abortSignal,
50
+ });
51
+ return {
52
+ text: result.text,
53
+ modelUsed: input.model?.raw ?? null,
54
+ };
55
+ }
56
+ }
57
+ /**
58
+ * Uses ephemeral hidden OpenCode sessions to access the currently configured provider.
59
+ */
60
+ export class SessionPromptObservationCompressor {
61
+ input;
62
+ state;
63
+ constructor(input, state) {
64
+ this.input = input;
65
+ this.state = state;
66
+ }
67
+ /**
68
+ * Compresses a pending tool output in an ephemeral hidden session.
69
+ *
70
+ * @param input - Compression input.
71
+ * @returns Raw text from the model.
72
+ */
73
+ async compressObservation(input) {
74
+ return this.runPrompt(input.prompt, input.model);
75
+ }
76
+ /**
77
+ * Summarizes a session in an ephemeral hidden session.
78
+ *
79
+ * @param input - Summary input.
80
+ * @returns Raw text from the model.
81
+ */
82
+ async summarizeSession(input) {
83
+ return this.runPrompt(input.prompt, input.model);
84
+ }
85
+ /**
86
+ * Creates an internal session, prompts the model, and deletes the session afterwards.
87
+ *
88
+ * @param prompt - Prompt text.
89
+ * @param model - Optional model override.
90
+ * @returns Raw text and the model identifier.
91
+ */
92
+ async runPrompt(prompt, model) {
93
+ const created = await this.input.client.session.create({
94
+ query: { directory: this.input.directory },
95
+ body: { title: INTERNAL_SESSION_TITLE },
96
+ });
97
+ if (created.error || !created.data) {
98
+ throw new Error("Failed to create internal compression session");
99
+ }
100
+ const sessionId = created.data.id;
101
+ this.state.internalSessionIds.add(sessionId);
102
+ try {
103
+ const response = await this.input.client.session.prompt({
104
+ query: { directory: this.input.directory },
105
+ path: { id: sessionId },
106
+ body: {
107
+ model: model
108
+ ? {
109
+ providerID: model.providerID,
110
+ modelID: model.modelID,
111
+ }
112
+ : undefined,
113
+ system: COMPRESSOR_SYSTEM_PROMPT,
114
+ parts: [{ type: "text", text: prompt }],
115
+ },
116
+ });
117
+ if (response.error || !response.data) {
118
+ throw new Error("Failed to execute internal compression prompt");
119
+ }
120
+ const text = response.data.parts
121
+ .filter((part) => part.type === "text")
122
+ .map((part) => part.text)
123
+ .join("\n")
124
+ .trim();
125
+ if (!text) {
126
+ throw new Error("Compression prompt returned no text output");
127
+ }
128
+ return {
129
+ text,
130
+ modelUsed: model?.raw ?? null,
131
+ };
132
+ }
133
+ finally {
134
+ await this.input.client.session.delete({
135
+ query: { directory: this.input.directory },
136
+ path: { id: sessionId },
137
+ });
138
+ this.state.internalSessionIds.delete(sessionId);
139
+ }
140
+ }
141
+ }
142
+ //# sourceMappingURL=compressor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compressor.js","sourceRoot":"","sources":["../../src/compression/compressor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AAIjC,MAAM,sBAAsB,GAAG,wCAAwC,CAAA;AACvE,MAAM,wBAAwB,GAAG;;;;8BAIH,CAAA;AAE9B;;GAEG;AACH,MAAM,OAAO,kCAAkC;IAChB;IAA7B,Y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BACxC;aACF,CAAC,CAAA;YAEF,IAAI,QAAQ,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACrC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;YAClE,CAAC;YAED,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK;iBAC7B,MAAM,CAAC,CAAC,IAAI,EAA+C,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;iBACnF,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;iBACxB,IAAI,CAAC,IAAI,CAAC;iBACV,IAAI,EAAE,CAAA;YAET,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;YAC/D,CAAC;YAED,OAAO;gBACL,IAAI;gBACJ,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,IAAI;aAC9B,CAAA;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;gBACrC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;gBAC1C,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;aACxB,CAAC,CAAA;YACF,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACjD,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,73 @@
1
+ import type { Observation, ObservationType, PendingMessage, SessionSummary } from "../types";
2
+ /**
3
+ * Parses the compressor output into a normalized observation.
4
+ *
5
+ * @param llmOutput - Raw model output.
6
+ * @param pendingMessage - Source pending message.
7
+ * @param modelUsed - Model identifier used for the compression.
8
+ * @returns A normalized observation.
9
+ */
10
+ export declare function parseObservation(llmOutput: string, pendingMessage: PendingMessage, modelUsed: string | null): Observation;
11
+ /**
12
+ * Parses the summarizer output into a normalized session summary.
13
+ *
14
+ * @param llmOutput - Raw model output.
15
+ * @param input - Summary metadata.
16
+ * @returns A normalized session summary.
17
+ */
18
+ export declare function parseSessionSummary(llmOutput: string, input: {
19
+ id: string;
20
+ projectId: string;
21
+ projectRoot: string;
22
+ sessionId: string;
23
+ observationCount: number;
24
+ createdAt: number;
25
+ modelUsed: string | null;
26
+ }): SessionSummary;
27
+ /**
28
+ * Extracts a JSON object from model output.
29
+ *
30
+ * @param value - Raw model output.
31
+ * @returns A parsed object or null.
32
+ */
33
+ export declare function parseObject<T>(value: string): T | null;
34
+ /**
35
+ * Normalizes an arbitrary value into a supported observation type.
36
+ *
37
+ * @param value - Candidate observation type.
38
+ * @returns A supported observation type.
39
+ */
40
+ export declare function normalizeObservationType(value: unknown): ObservationType;
41
+ /**
42
+ * Sanitizes a value into a compact string.
43
+ *
44
+ * @param value - Candidate input value.
45
+ * @param maxLength - Maximum output length.
46
+ * @returns A sanitized string or an empty string.
47
+ */
48
+ export declare function sanitizeText(value: unknown, maxLength: number): string;
49
+ /**
50
+ * Sanitizes a nullable text field.
51
+ *
52
+ * @param value - Candidate input value.
53
+ * @param maxLength - Maximum output length.
54
+ * @returns The sanitized string or null.
55
+ */
56
+ export declare function sanitizeNullableText(value: unknown, maxLength: number): string | null;
57
+ /**
58
+ * Sanitizes an array-like input into a list of compact strings.
59
+ *
60
+ * @param value - Candidate array value.
61
+ * @param maxItems - Maximum number of items to keep.
62
+ * @param maxLength - Maximum length per item.
63
+ * @returns A normalized list of strings.
64
+ */
65
+ export declare function sanitizeStringArray(value: unknown, maxItems: number, maxLength: number): string[];
66
+ /**
67
+ * Creates a fallback title when parsing fails.
68
+ *
69
+ * @param pendingMessage - Pending tool output.
70
+ * @returns A descriptive fallback title.
71
+ */
72
+ export declare function fallbackTitle(pendingMessage: PendingMessage): string;
73
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.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EpE"}
@@ -0,0 +1,139 @@
1
+ import { OBSERVATION_TYPES } from "../types";
2
+ import { estimateTokenCount, normalizeWhitespace, parseJsonValue, stripMarkdownFences } from "../utils";
3
+ /**
4
+ * Parses the compressor output into a normalized observation.
5
+ *
6
+ * @param llmOutput - Raw model output.
7
+ * @param pendingMessage - Source pending message.
8
+ * @param modelUsed - Model identifier used for the compression.
9
+ * @returns A normalized observation.
10
+ */
11
+ export function parseObservation(llmOutput, pendingMessage, modelUsed) {
12
+ const payload = parseObject(llmOutput);
13
+ const title = sanitizeText(payload?.title, 100) || fallbackTitle(pendingMessage);
14
+ const narrative = sanitizeText(payload?.narrative, 2_000) || normalizeWhitespace(pendingMessage.rawContent).slice(0, 500);
15
+ return {
16
+ id: pendingMessage.id,
17
+ projectId: pendingMessage.projectId,
18
+ projectRoot: pendingMessage.projectRoot,
19
+ sessionId: pendingMessage.sessionId,
20
+ type: normalizeObservationType(payload?.type),
21
+ title,
22
+ subtitle: sanitizeNullableText(payload?.subtitle, 160),
23
+ narrative,
24
+ facts: sanitizeStringArray(payload?.facts, 20, 200),
25
+ concepts: sanitizeStringArray(payload?.concepts, 20, 80),
26
+ filesInvolved: sanitizeStringArray(payload?.filesInvolved, 20, 260),
27
+ rawTokenCount: estimateTokenCount(pendingMessage.rawContent),
28
+ compressedTokenCount: estimateTokenCount(JSON.stringify(payload ?? { title, narrative })),
29
+ toolName: pendingMessage.toolName,
30
+ modelUsed,
31
+ quality: "high",
32
+ rawFallback: null,
33
+ createdAt: pendingMessage.createdAt,
34
+ };
35
+ }
36
+ /**
37
+ * Parses the summarizer output into a normalized session summary.
38
+ *
39
+ * @param llmOutput - Raw model output.
40
+ * @param input - Summary metadata.
41
+ * @returns A normalized session summary.
42
+ */
43
+ export function parseSessionSummary(llmOutput, input) {
44
+ const payload = parseObject(llmOutput);
45
+ return {
46
+ id: input.id,
47
+ projectId: input.projectId,
48
+ projectRoot: input.projectRoot,
49
+ sessionId: input.sessionId,
50
+ requested: sanitizeNullableText(payload?.requested, 600),
51
+ investigated: sanitizeNullableText(payload?.investigated, 600),
52
+ learned: sanitizeNullableText(payload?.learned, 600),
53
+ completed: sanitizeNullableText(payload?.completed, 600),
54
+ nextSteps: sanitizeNullableText(payload?.nextSteps, 600),
55
+ observationCount: input.observationCount,
56
+ modelUsed: input.modelUsed,
57
+ createdAt: input.createdAt,
58
+ };
59
+ }
60
+ /**
61
+ * Extracts a JSON object from model output.
62
+ *
63
+ * @param value - Raw model output.
64
+ * @returns A parsed object or null.
65
+ */
66
+ export function parseObject(value) {
67
+ const unfenced = stripMarkdownFences(value);
68
+ const firstBrace = unfenced.indexOf("{");
69
+ const lastBrace = unfenced.lastIndexOf("}");
70
+ const candidate = firstBrace >= 0 && lastBrace >= 0 ? unfenced.slice(firstBrace, lastBrace + 1) : unfenced;
71
+ return parseJsonValue(candidate, null);
72
+ }
73
+ /**
74
+ * Normalizes an arbitrary value into a supported observation type.
75
+ *
76
+ * @param value - Candidate observation type.
77
+ * @returns A supported observation type.
78
+ */
79
+ export function normalizeObservationType(value) {
80
+ if (typeof value !== "string") {
81
+ return "tool_output";
82
+ }
83
+ const normalized = value.trim().toLowerCase();
84
+ return OBSERVATION_TYPES.includes(normalized)
85
+ ? normalized
86
+ : "tool_output";
87
+ }
88
+ /**
89
+ * Sanitizes a value into a compact string.
90
+ *
91
+ * @param value - Candidate input value.
92
+ * @param maxLength - Maximum output length.
93
+ * @returns A sanitized string or an empty string.
94
+ */
95
+ export function sanitizeText(value, maxLength) {
96
+ if (typeof value !== "string") {
97
+ return "";
98
+ }
99
+ return normalizeWhitespace(value).slice(0, maxLength);
100
+ }
101
+ /**
102
+ * Sanitizes a nullable text field.
103
+ *
104
+ * @param value - Candidate input value.
105
+ * @param maxLength - Maximum output length.
106
+ * @returns The sanitized string or null.
107
+ */
108
+ export function sanitizeNullableText(value, maxLength) {
109
+ const result = sanitizeText(value, maxLength);
110
+ return result || null;
111
+ }
112
+ /**
113
+ * Sanitizes an array-like input into a list of compact strings.
114
+ *
115
+ * @param value - Candidate array value.
116
+ * @param maxItems - Maximum number of items to keep.
117
+ * @param maxLength - Maximum length per item.
118
+ * @returns A normalized list of strings.
119
+ */
120
+ export function sanitizeStringArray(value, maxItems, maxLength) {
121
+ if (!Array.isArray(value)) {
122
+ return [];
123
+ }
124
+ return value
125
+ .filter((item) => typeof item === "string")
126
+ .map((item) => normalizeWhitespace(item).slice(0, maxLength))
127
+ .filter(Boolean)
128
+ .slice(0, maxItems);
129
+ }
130
+ /**
131
+ * Creates a fallback title when parsing fails.
132
+ *
133
+ * @param pendingMessage - Pending tool output.
134
+ * @returns A descriptive fallback title.
135
+ */
136
+ export function fallbackTitle(pendingMessage) {
137
+ return pendingMessage.title?.slice(0, 100) || `${pendingMessage.toolName} output`;
138
+ }
139
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/compression/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAoBvG;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAiB,EACjB,cAA8B,EAC9B,SAAwB;IAExB,MAAM,OAAO,GAAG,WAAW,CAAqB,SAAS,CAAC,CAAA;IAC1D,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,aAAa,CAAC,cAAc,CAAC,CAAA;IAChF,MAAM,SAAS,GACb,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAEzG,OAAO;QACL,EAAE,EAAE,cAAc,CAAC,EAAE;QACrB,SAAS,EAAE,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IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,CAAA;IACX,CAAC;IAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AACvD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc,EAAE,SAAiB;IACpE,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IAC7C,OAAO,MAAM,IAAI,IAAI,CAAA;AACvB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc,EAAE,QAAgB,EAAE,SAAiB;IACrF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAA;IACX,CAAC;IAED,OAAO,KAAK;SACT,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;SAC1D,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SAC5D,MAAM,CAAC,OAAO,CAAC;SACf,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;AACvB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,cAA8B;IAC1D,OAAO,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,SAAS,CAAA;AACnF,CAAC"}
@@ -0,0 +1,73 @@
1
+ import type { PendingMessage, PluginConfig, SessionSummary } from "../types";
2
+ import { MemoryStore } from "../storage/store";
3
+ import { MemoryLogger } from "../logger";
4
+ import type { OpencodeClient } from "@opencode-ai/sdk";
5
+ import type { ObservationCompressor } from "../types";
6
+ /**
7
+ * Processes queued tool outputs and turns them into persistent observations.
8
+ */
9
+ export declare class CompressionPipeline {
10
+ private readonly store;
11
+ private readonly compressor;
12
+ private readonly client;
13
+ private readonly directory;
14
+ private readonly pluginConfig;
15
+ private readonly logger;
16
+ private readonly now;
17
+ private activeRun;
18
+ constructor(store: MemoryStore, compressor: ObservationCompressor, client: OpencodeClient, directory: string, pluginConfig: PluginConfig, logger: MemoryLogger, now: () => number);
19
+ /**
20
+ * Resets orphaned queue rows back to pending.
21
+ *
22
+ * @returns A promise that resolves after recovery.
23
+ */
24
+ recoverOrphans(): Promise<void>;
25
+ /**
26
+ * Processes the queue until no pending messages remain.
27
+ *
28
+ * @returns A promise that resolves when the queue is drained.
29
+ */
30
+ processQueue(): Promise<void>;
31
+ /**
32
+ * Generates and persists a session summary when there is new activity.
33
+ *
34
+ * @param sessionId - OpenCode session identifier.
35
+ * @returns The saved summary or null.
36
+ */
37
+ generateSessionSummary(sessionId: string): Promise<SessionSummary | null>;
38
+ /**
39
+ * Waits until the queue is empty for a session or the timeout is reached.
40
+ *
41
+ * @param sessionId - OpenCode session identifier.
42
+ * @param timeoutMs - Maximum wait duration.
43
+ * @returns True when the queue was flushed.
44
+ */
45
+ flushSession(sessionId: string, timeoutMs: number): Promise<boolean>;
46
+ /**
47
+ * Processes a single queued tool output.
48
+ *
49
+ * @param pendingMessage - Queue item to process.
50
+ * @returns A promise that resolves when processing finishes.
51
+ */
52
+ processSingle(pendingMessage: PendingMessage): Promise<void>;
53
+ /**
54
+ * Loads the current merged OpenCode config.
55
+ *
56
+ * @returns Runtime config.
57
+ */
58
+ private loadRuntimeConfig;
59
+ /**
60
+ * Drains pending work in batches.
61
+ *
62
+ * @returns A promise that resolves when the queue is empty.
63
+ */
64
+ private processLoop;
65
+ }
66
+ /**
67
+ * Computes exponential backoff for queue retries.
68
+ *
69
+ * @param attempt - Retry attempt number.
70
+ * @returns Delay in milliseconds.
71
+ */
72
+ export declare function backoffForAttempt(attempt: number): number;
73
+ //# sour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