@psiclawops/hypermem 0.5.0 → 0.5.2
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/ARCHITECTURE.md +12 -3
- package/README.md +30 -6
- package/bin/hypermem-status.mjs +166 -0
- package/dist/background-indexer.d.ts +132 -0
- package/dist/background-indexer.d.ts.map +1 -0
- package/dist/background-indexer.js +1044 -0
- package/dist/cache.d.ts +110 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +495 -0
- package/dist/compaction-fence.d.ts +89 -0
- package/dist/compaction-fence.d.ts.map +1 -0
- package/dist/compaction-fence.js +153 -0
- package/dist/compositor.d.ts +226 -0
- package/dist/compositor.d.ts.map +1 -0
- package/dist/compositor.js +2558 -0
- package/dist/content-type-classifier.d.ts +41 -0
- package/dist/content-type-classifier.d.ts.map +1 -0
- package/dist/content-type-classifier.js +181 -0
- package/dist/cross-agent.d.ts +62 -0
- package/dist/cross-agent.d.ts.map +1 -0
- package/dist/cross-agent.js +259 -0
- package/dist/db.d.ts +131 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +402 -0
- package/dist/desired-state-store.d.ts +100 -0
- package/dist/desired-state-store.d.ts.map +1 -0
- package/dist/desired-state-store.js +222 -0
- package/dist/doc-chunk-store.d.ts +140 -0
- package/dist/doc-chunk-store.d.ts.map +1 -0
- package/dist/doc-chunk-store.js +391 -0
- package/dist/doc-chunker.d.ts +99 -0
- package/dist/doc-chunker.d.ts.map +1 -0
- package/dist/doc-chunker.js +324 -0
- package/dist/dreaming-promoter.d.ts +86 -0
- package/dist/dreaming-promoter.d.ts.map +1 -0
- package/dist/dreaming-promoter.js +381 -0
- package/dist/episode-store.d.ts +49 -0
- package/dist/episode-store.d.ts.map +1 -0
- package/dist/episode-store.js +135 -0
- package/dist/fact-store.d.ts +75 -0
- package/dist/fact-store.d.ts.map +1 -0
- package/dist/fact-store.js +236 -0
- package/dist/fleet-store.d.ts +144 -0
- package/dist/fleet-store.d.ts.map +1 -0
- package/dist/fleet-store.js +276 -0
- package/dist/fos-mod.d.ts +178 -0
- package/dist/fos-mod.d.ts.map +1 -0
- package/dist/fos-mod.js +416 -0
- package/dist/hybrid-retrieval.d.ts +64 -0
- package/dist/hybrid-retrieval.d.ts.map +1 -0
- package/dist/hybrid-retrieval.js +344 -0
- package/dist/image-eviction.d.ts +49 -0
- package/dist/image-eviction.d.ts.map +1 -0
- package/dist/image-eviction.js +251 -0
- package/dist/index.d.ts +650 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1072 -0
- package/dist/keystone-scorer.d.ts +51 -0
- package/dist/keystone-scorer.d.ts.map +1 -0
- package/dist/keystone-scorer.js +52 -0
- package/dist/knowledge-graph.d.ts +110 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +305 -0
- package/dist/knowledge-lint.d.ts +29 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +116 -0
- package/dist/knowledge-store.d.ts +72 -0
- package/dist/knowledge-store.d.ts.map +1 -0
- package/dist/knowledge-store.js +247 -0
- package/dist/library-schema.d.ts +22 -0
- package/dist/library-schema.d.ts.map +1 -0
- package/dist/library-schema.js +1038 -0
- package/dist/message-store.d.ts +89 -0
- package/dist/message-store.d.ts.map +1 -0
- package/dist/message-store.js +323 -0
- package/dist/metrics-dashboard.d.ts +114 -0
- package/dist/metrics-dashboard.d.ts.map +1 -0
- package/dist/metrics-dashboard.js +260 -0
- package/dist/obsidian-exporter.d.ts +57 -0
- package/dist/obsidian-exporter.d.ts.map +1 -0
- package/dist/obsidian-exporter.js +274 -0
- package/dist/obsidian-watcher.d.ts +147 -0
- package/dist/obsidian-watcher.d.ts.map +1 -0
- package/dist/obsidian-watcher.js +403 -0
- package/dist/open-domain.d.ts +46 -0
- package/dist/open-domain.d.ts.map +1 -0
- package/dist/open-domain.js +125 -0
- package/dist/preference-store.d.ts +54 -0
- package/dist/preference-store.d.ts.map +1 -0
- package/dist/preference-store.js +109 -0
- package/dist/preservation-gate.d.ts +82 -0
- package/dist/preservation-gate.d.ts.map +1 -0
- package/dist/preservation-gate.js +150 -0
- package/dist/proactive-pass.d.ts +63 -0
- package/dist/proactive-pass.d.ts.map +1 -0
- package/dist/proactive-pass.js +239 -0
- package/dist/profiles.d.ts +44 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +227 -0
- package/dist/provider-translator.d.ts +50 -0
- package/dist/provider-translator.d.ts.map +1 -0
- package/dist/provider-translator.js +403 -0
- package/dist/rate-limiter.d.ts +76 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/rate-limiter.js +179 -0
- package/dist/repair-tool-pairs.d.ts +38 -0
- package/dist/repair-tool-pairs.d.ts.map +1 -0
- package/dist/repair-tool-pairs.js +138 -0
- package/dist/retrieval-policy.d.ts +51 -0
- package/dist/retrieval-policy.d.ts.map +1 -0
- package/dist/retrieval-policy.js +77 -0
- package/dist/schema.d.ts +15 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +229 -0
- package/dist/secret-scanner.d.ts +51 -0
- package/dist/secret-scanner.d.ts.map +1 -0
- package/dist/secret-scanner.js +248 -0
- package/dist/seed.d.ts +108 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +177 -0
- package/dist/session-flusher.d.ts +53 -0
- package/dist/session-flusher.d.ts.map +1 -0
- package/dist/session-flusher.js +69 -0
- package/dist/session-topic-map.d.ts +41 -0
- package/dist/session-topic-map.d.ts.map +1 -0
- package/dist/session-topic-map.js +77 -0
- package/dist/spawn-context.d.ts +54 -0
- package/dist/spawn-context.d.ts.map +1 -0
- package/dist/spawn-context.js +159 -0
- package/dist/system-store.d.ts +73 -0
- package/dist/system-store.d.ts.map +1 -0
- package/dist/system-store.js +182 -0
- package/dist/temporal-store.d.ts +80 -0
- package/dist/temporal-store.d.ts.map +1 -0
- package/dist/temporal-store.js +149 -0
- package/dist/topic-detector.d.ts +35 -0
- package/dist/topic-detector.d.ts.map +1 -0
- package/dist/topic-detector.js +249 -0
- package/dist/topic-store.d.ts +45 -0
- package/dist/topic-store.d.ts.map +1 -0
- package/dist/topic-store.js +136 -0
- package/dist/topic-synthesizer.d.ts +51 -0
- package/dist/topic-synthesizer.d.ts.map +1 -0
- package/dist/topic-synthesizer.js +315 -0
- package/dist/trigger-registry.d.ts +63 -0
- package/dist/trigger-registry.d.ts.map +1 -0
- package/dist/trigger-registry.js +163 -0
- package/dist/types.d.ts +537 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/vector-store.d.ts +170 -0
- package/dist/vector-store.d.ts.map +1 -0
- package/dist/vector-store.js +677 -0
- package/dist/version.d.ts +34 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +34 -0
- package/dist/wiki-page-emitter.d.ts +65 -0
- package/dist/wiki-page-emitter.d.ts.map +1 -0
- package/dist/wiki-page-emitter.js +258 -0
- package/dist/work-store.d.ts +112 -0
- package/dist/work-store.d.ts.map +1 -0
- package/dist/work-store.js +273 -0
- package/package.json +4 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hypermem Core Types
|
|
3
|
+
*
|
|
4
|
+
* Provider-neutral message format and compositor interfaces.
|
|
5
|
+
* These types are the internal representation — never sent directly to an LLM.
|
|
6
|
+
* Provider translators convert to/from provider-specific formats at the boundary.
|
|
7
|
+
*/
|
|
8
|
+
export type MessageRole = 'user' | 'assistant' | 'system';
|
|
9
|
+
/**
|
|
10
|
+
* Provider-neutral tool call representation.
|
|
11
|
+
* Stored as JSON in the tool_calls column.
|
|
12
|
+
*/
|
|
13
|
+
export interface NeutralToolCall {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
arguments: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Provider-neutral tool result representation.
|
|
20
|
+
* Stored as JSON in the tool_results column.
|
|
21
|
+
*/
|
|
22
|
+
export interface NeutralToolResult {
|
|
23
|
+
callId: string;
|
|
24
|
+
name: string;
|
|
25
|
+
content: string;
|
|
26
|
+
isError?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Provider-neutral message — the canonical storage format.
|
|
30
|
+
*/
|
|
31
|
+
export interface NeutralMessage {
|
|
32
|
+
role: MessageRole;
|
|
33
|
+
textContent: string | null;
|
|
34
|
+
toolCalls: NeutralToolCall[] | null;
|
|
35
|
+
toolResults: NeutralToolResult[] | null;
|
|
36
|
+
metadata?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Stored message with database fields.
|
|
40
|
+
*/
|
|
41
|
+
export interface StoredMessage extends NeutralMessage {
|
|
42
|
+
id: number;
|
|
43
|
+
conversationId: number;
|
|
44
|
+
agentId: string;
|
|
45
|
+
messageIndex: number;
|
|
46
|
+
tokenCount: number | null;
|
|
47
|
+
isHeartbeat: boolean;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
}
|
|
50
|
+
export type ChannelType = 'webchat' | 'discord' | 'telegram' | 'signal' | 'subagent' | 'heartbeat' | 'other';
|
|
51
|
+
export type ConversationStatus = 'active' | 'ended' | 'archived';
|
|
52
|
+
export interface Conversation {
|
|
53
|
+
id: number;
|
|
54
|
+
sessionKey: string;
|
|
55
|
+
sessionId: string | null;
|
|
56
|
+
agentId: string;
|
|
57
|
+
channelType: ChannelType;
|
|
58
|
+
channelId: string | null;
|
|
59
|
+
provider: string | null;
|
|
60
|
+
model: string | null;
|
|
61
|
+
status: ConversationStatus;
|
|
62
|
+
messageCount: number;
|
|
63
|
+
tokenCountIn: number;
|
|
64
|
+
tokenCountOut: number;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
endedAt: string | null;
|
|
68
|
+
}
|
|
69
|
+
export type FactScope = 'agent' | 'session' | 'user';
|
|
70
|
+
/**
|
|
71
|
+
* Memory visibility levels:
|
|
72
|
+
* - private: Only the owning agent can read. Identity, SOUL, personal reflections.
|
|
73
|
+
* - org: Agents in the same org (e.g., Forge's directors: Pylon, Vigil, Plane).
|
|
74
|
+
* - council: All council seats can read.
|
|
75
|
+
* - fleet: Any agent in the fleet can read.
|
|
76
|
+
*/
|
|
77
|
+
export type MemoryVisibility = 'private' | 'org' | 'council' | 'fleet';
|
|
78
|
+
/**
|
|
79
|
+
* Cross-agent query request. The requesting agent declares who they are;
|
|
80
|
+
* the access layer filters results by visibility.
|
|
81
|
+
*/
|
|
82
|
+
export interface CrossAgentQuery {
|
|
83
|
+
/** The agent making the request */
|
|
84
|
+
requesterId: string;
|
|
85
|
+
/** The agent whose memory is being queried */
|
|
86
|
+
targetAgentId: string;
|
|
87
|
+
/** What to search for */
|
|
88
|
+
query?: string;
|
|
89
|
+
/** Filter by domain */
|
|
90
|
+
domain?: string;
|
|
91
|
+
/** Filter by memory type */
|
|
92
|
+
memoryType?: 'facts' | 'knowledge' | 'topics' | 'episodes' | 'messages';
|
|
93
|
+
/** Max results */
|
|
94
|
+
limit?: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Defines an agent's org and tier for visibility resolution.
|
|
98
|
+
*/
|
|
99
|
+
export interface AgentIdentity {
|
|
100
|
+
agentId: string;
|
|
101
|
+
tier: 'council' | 'director' | 'specialist' | 'worker';
|
|
102
|
+
org?: string;
|
|
103
|
+
councilLead?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface Fact {
|
|
106
|
+
id: number;
|
|
107
|
+
agentId: string;
|
|
108
|
+
scope: FactScope;
|
|
109
|
+
domain: string | null;
|
|
110
|
+
content: string;
|
|
111
|
+
confidence: number;
|
|
112
|
+
visibility: string;
|
|
113
|
+
sourceType: string;
|
|
114
|
+
sourceSessionKey: string | null;
|
|
115
|
+
sourceRef: string | null;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
expiresAt: string | null;
|
|
119
|
+
supersededBy: number | null;
|
|
120
|
+
decayScore: number;
|
|
121
|
+
}
|
|
122
|
+
export type TopicStatus = 'active' | 'dormant' | 'closed';
|
|
123
|
+
export interface Topic {
|
|
124
|
+
id: number;
|
|
125
|
+
agentId: string;
|
|
126
|
+
name: string;
|
|
127
|
+
description: string | null;
|
|
128
|
+
status: TopicStatus;
|
|
129
|
+
visibility: string;
|
|
130
|
+
lastSessionKey: string | null;
|
|
131
|
+
messageCount: number;
|
|
132
|
+
createdAt: string;
|
|
133
|
+
updatedAt: string;
|
|
134
|
+
}
|
|
135
|
+
export interface Knowledge {
|
|
136
|
+
id: number;
|
|
137
|
+
agentId: string;
|
|
138
|
+
domain: string;
|
|
139
|
+
key: string;
|
|
140
|
+
content: string;
|
|
141
|
+
confidence: number;
|
|
142
|
+
sourceType: string;
|
|
143
|
+
sourceRef: string | null;
|
|
144
|
+
createdAt: string;
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
expiresAt: string | null;
|
|
147
|
+
supersededBy: number | null;
|
|
148
|
+
}
|
|
149
|
+
export type EpisodeType = 'decision' | 'incident' | 'discovery' | 'interaction' | 'milestone' | 'deployment' | 'config_change';
|
|
150
|
+
export interface Episode {
|
|
151
|
+
id: number;
|
|
152
|
+
agentId: string;
|
|
153
|
+
eventType: EpisodeType;
|
|
154
|
+
summary: string;
|
|
155
|
+
significance: number;
|
|
156
|
+
visibility: string;
|
|
157
|
+
participants: string[] | null;
|
|
158
|
+
sessionKey: string | null;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
decayScore: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A single turn from a parent session, stripped of tool call content.
|
|
164
|
+
* Used to build spawn context for subagents.
|
|
165
|
+
*/
|
|
166
|
+
export interface RecentTurn {
|
|
167
|
+
role: 'user' | 'assistant';
|
|
168
|
+
content: string;
|
|
169
|
+
timestamp: number;
|
|
170
|
+
seq: number;
|
|
171
|
+
}
|
|
172
|
+
export interface ComposeRequest {
|
|
173
|
+
agentId: string;
|
|
174
|
+
sessionKey: string;
|
|
175
|
+
tokenBudget: number;
|
|
176
|
+
provider?: string;
|
|
177
|
+
model?: string;
|
|
178
|
+
/** Agent tier (council/director/specialist) — used for tier-scoped doc chunk retrieval */
|
|
179
|
+
tier?: string;
|
|
180
|
+
includeHistory?: boolean;
|
|
181
|
+
/** Whether to include demand-loaded doc chunks based on conversation triggers */
|
|
182
|
+
includeDocChunks?: boolean;
|
|
183
|
+
historyDepth?: number;
|
|
184
|
+
includeFacts?: boolean;
|
|
185
|
+
includeContext?: boolean;
|
|
186
|
+
includeLibrary?: boolean;
|
|
187
|
+
/** When false, skip semantic recall (vector search + FTS hybrid). Default: true. */
|
|
188
|
+
includeSemanticRecall?: boolean;
|
|
189
|
+
/** When false, skip keystone history injection (within-session + cross-topic). Default: true. */
|
|
190
|
+
includeKeystones?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* The current-turn prompt text. Used as the retrieval query for semantic recall
|
|
193
|
+
* and doc chunk trigger matching. When provided, this is preferred over reading
|
|
194
|
+
* the last user message from the assembled history (which is one turn stale).
|
|
195
|
+
*
|
|
196
|
+
* Without this, retrieval fires against the previously-recorded user message,
|
|
197
|
+
* meaning first-turn retrieval is blind and all retrieval lags by one turn.
|
|
198
|
+
*/
|
|
199
|
+
prompt?: string;
|
|
200
|
+
/**
|
|
201
|
+
* When set, session-scoped doc chunks stored under this spawn session key
|
|
202
|
+
* are included in doc chunk retrieval at compose time.
|
|
203
|
+
* Used for subagent context inheritance: the parent buildSpawnContext() stores
|
|
204
|
+
* document chunks under a spawn sessionKey, and passes that key here so the
|
|
205
|
+
* compositor can surface them during composition.
|
|
206
|
+
*/
|
|
207
|
+
parentSessionKey?: string;
|
|
208
|
+
/**
|
|
209
|
+
* When true, skip provider-specific translation and return NeutralMessage[]
|
|
210
|
+
* instead of ProviderMessage[]. Used by the context engine plugin, which
|
|
211
|
+
* returns messages to the OpenClaw runtime for its own provider translation.
|
|
212
|
+
*/
|
|
213
|
+
skipProviderTranslation?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* When set, history fetching is scoped to this topic (Option B: also includes
|
|
216
|
+
* legacy messages with topic_id IS NULL for transition safety).
|
|
217
|
+
* If not provided, full session history is returned (no behavior change).
|
|
218
|
+
* P3.4: topic-aware compositor.
|
|
219
|
+
*/
|
|
220
|
+
topicId?: string;
|
|
221
|
+
}
|
|
222
|
+
export interface SlotTokenCounts {
|
|
223
|
+
system: number;
|
|
224
|
+
identity: number;
|
|
225
|
+
history: number;
|
|
226
|
+
facts: number;
|
|
227
|
+
context: number;
|
|
228
|
+
library: number;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Compose-level diagnostics — emitted on every compose() call.
|
|
232
|
+
* Useful for observability, tuning, and debugging retrieval quality.
|
|
233
|
+
*/
|
|
234
|
+
export interface ComposeDiagnostics {
|
|
235
|
+
/** Number of doc chunk trigger collections that matched the user message */
|
|
236
|
+
triggerHits: number;
|
|
237
|
+
/** True when trigger-miss fallback semantic retrieval was used */
|
|
238
|
+
triggerFallbackUsed: boolean;
|
|
239
|
+
/** Number of facts included after scope filtering */
|
|
240
|
+
factsIncluded: number;
|
|
241
|
+
/** Approximate number of lines returned by semantic recall */
|
|
242
|
+
semanticResultsIncluded: number;
|
|
243
|
+
/** Number of doc chunk collections that returned at least one chunk */
|
|
244
|
+
docChunksCollections: number;
|
|
245
|
+
/** Number of items rejected by scope policy during retrieval */
|
|
246
|
+
scopeFiltered: number;
|
|
247
|
+
/**
|
|
248
|
+
* Why contextParts was empty (only set when no context was assembled).
|
|
249
|
+
* Helps distinguish between "no triggers + no fallback", "empty corpus",
|
|
250
|
+
* "budget exhausted", and "all items filtered by scope".
|
|
251
|
+
*/
|
|
252
|
+
zeroResultReason?: 'no_trigger_no_fallback' | 'empty_corpus' | 'budget_exhausted' | 'scope_filtered_all' | 'unknown';
|
|
253
|
+
/** The retrieval path that was used for doc chunks */
|
|
254
|
+
retrievalMode: 'triggered' | 'fallback_knn' | 'fallback_fts' | 'none';
|
|
255
|
+
/** Number of cross-topic keystone messages injected (P3.5) */
|
|
256
|
+
crossTopicKeystones?: number;
|
|
257
|
+
/** Actual reserve fraction used this compose (base or dynamic) */
|
|
258
|
+
reserveFraction?: number;
|
|
259
|
+
/** Estimated average turn cost (tokens) used in dynamic reserve calc */
|
|
260
|
+
avgTurnCostTokens?: number;
|
|
261
|
+
/** True if dynamic reserve exceeded floor and is actively adjusting budget */
|
|
262
|
+
dynamicReserveActive?: boolean;
|
|
263
|
+
/** True if dynamic reserve was clamped at dynamicReserveMax and SESSION_PRESSURE_HIGH emitted */
|
|
264
|
+
sessionPressureHigh?: boolean;
|
|
265
|
+
}
|
|
266
|
+
export interface ComposeResult {
|
|
267
|
+
messages: ProviderMessage[];
|
|
268
|
+
tokenCount: number;
|
|
269
|
+
slots: SlotTokenCounts;
|
|
270
|
+
/** True only when token budget was exceeded (remaining < 0). */
|
|
271
|
+
truncated: boolean;
|
|
272
|
+
/** True when any non-fatal warnings were emitted (soft failures, truncated slots, etc.). */
|
|
273
|
+
hasWarnings: boolean;
|
|
274
|
+
warnings: string[];
|
|
275
|
+
/**
|
|
276
|
+
* The assembled context block (facts, recall, episodes) as a plain string.
|
|
277
|
+
* Used by the plugin to pass as systemPromptAddition to the OpenClaw runtime.
|
|
278
|
+
* Omitted when no context was assembled.
|
|
279
|
+
*/
|
|
280
|
+
contextBlock?: string;
|
|
281
|
+
/** Compose-level diagnostics for observability and tuning. */
|
|
282
|
+
diagnostics?: ComposeDiagnostics;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Provider-specific message format (output of compositor).
|
|
286
|
+
* This is what gets sent to the LLM API.
|
|
287
|
+
* The exact shape depends on the provider translator.
|
|
288
|
+
*/
|
|
289
|
+
export interface ProviderMessage {
|
|
290
|
+
role: string;
|
|
291
|
+
content: unknown;
|
|
292
|
+
[key: string]: unknown;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Tracks the most recently composed submission window boundary.
|
|
296
|
+
* Written by compose() after every assembly, read by the background indexer
|
|
297
|
+
* to identify high-signal unprocessed messages.
|
|
298
|
+
*
|
|
299
|
+
* Stored in Redis (hm:{a}:s:{s}:cursor) with dual-write to SQLite for
|
|
300
|
+
* durability across Redis eviction (Compass Gate 2).
|
|
301
|
+
*/
|
|
302
|
+
export interface SessionCursor {
|
|
303
|
+
/** StoredMessage.id of the newest message included in the last window */
|
|
304
|
+
lastSentId: number;
|
|
305
|
+
/** messageIndex of the newest message — for ordering guarantees */
|
|
306
|
+
lastSentIndex: number;
|
|
307
|
+
/** ISO timestamp of when the window was composed */
|
|
308
|
+
lastSentAt: string;
|
|
309
|
+
/** Number of messages in the composed window */
|
|
310
|
+
windowSize: number;
|
|
311
|
+
/** Token count of the composed window */
|
|
312
|
+
tokenCount: number;
|
|
313
|
+
}
|
|
314
|
+
export interface SessionSlots {
|
|
315
|
+
system: string | null;
|
|
316
|
+
identity: string | null;
|
|
317
|
+
history: StoredMessage[];
|
|
318
|
+
context: string | null;
|
|
319
|
+
facts: string | null;
|
|
320
|
+
tools: string | null;
|
|
321
|
+
meta: SessionMeta;
|
|
322
|
+
}
|
|
323
|
+
export interface SessionMeta {
|
|
324
|
+
agentId: string;
|
|
325
|
+
sessionKey: string;
|
|
326
|
+
provider: string | null;
|
|
327
|
+
model: string | null;
|
|
328
|
+
channelType: ChannelType;
|
|
329
|
+
tokenCount: number;
|
|
330
|
+
lastActive: string;
|
|
331
|
+
status: ConversationStatus;
|
|
332
|
+
}
|
|
333
|
+
export interface HyperMemConfig {
|
|
334
|
+
enabled: boolean;
|
|
335
|
+
dataDir: string;
|
|
336
|
+
cache: CacheConfig;
|
|
337
|
+
compositor: CompositorConfig;
|
|
338
|
+
indexer: IndexerConfig;
|
|
339
|
+
embedding: EmbeddingProviderConfig;
|
|
340
|
+
/** Optional dreaming/promotion config. Default: disabled. */
|
|
341
|
+
dreaming?: import('./dreaming-promoter.js').DreamerConfig;
|
|
342
|
+
/** Optional Obsidian vault integration. Default: disabled. */
|
|
343
|
+
obsidian?: import('./obsidian-watcher.js').ObsidianConfig;
|
|
344
|
+
/**
|
|
345
|
+
* Cache replay threshold (ms). When > 0, assemble() returns a cached
|
|
346
|
+
* contextBlock (systemPromptAddition) for sessions active within this
|
|
347
|
+
* window, producing byte-identical prompts and hitting provider prefix cache
|
|
348
|
+
* (Anthropic / OpenAI). Set to 0 to disable.
|
|
349
|
+
* Default: 900_000 (15 minutes).
|
|
350
|
+
*/
|
|
351
|
+
warmCacheReplayThresholdMs?: number;
|
|
352
|
+
}
|
|
353
|
+
export interface EmbeddingProviderConfig {
|
|
354
|
+
/**
|
|
355
|
+
* Embedding provider. Default: 'ollama'.
|
|
356
|
+
* - 'ollama': local Ollama (nomic-embed-text or any pulled model)
|
|
357
|
+
* - 'openai': OpenAI Embeddings API (text-embedding-3-small / 3-large)
|
|
358
|
+
*/
|
|
359
|
+
provider?: 'ollama' | 'openai';
|
|
360
|
+
/** Ollama base URL. Default: http://localhost:11434 */
|
|
361
|
+
ollamaUrl: string;
|
|
362
|
+
/** OpenAI API key. Required when provider is 'openai'. */
|
|
363
|
+
openaiApiKey?: string;
|
|
364
|
+
/** OpenAI base URL. Default: https://api.openai.com/v1 */
|
|
365
|
+
openaiBaseUrl?: string;
|
|
366
|
+
/**
|
|
367
|
+
* Embedding model name.
|
|
368
|
+
* - ollama default: nomic-embed-text (768d)
|
|
369
|
+
* - openai default: text-embedding-3-small (1536d)
|
|
370
|
+
*/
|
|
371
|
+
model: string;
|
|
372
|
+
/**
|
|
373
|
+
* Embedding dimensions. Must match the model.
|
|
374
|
+
* - nomic-embed-text: 768
|
|
375
|
+
* - text-embedding-3-small: 1536
|
|
376
|
+
* - text-embedding-3-large: 3072
|
|
377
|
+
* WARNING: changing providers requires a full re-index (dimensions are incompatible).
|
|
378
|
+
*/
|
|
379
|
+
dimensions: number;
|
|
380
|
+
/** Request timeout ms. Default: 10000 */
|
|
381
|
+
timeout: number;
|
|
382
|
+
/** Max texts per batch request. Default: 32 (ollama) or 128 (openai) */
|
|
383
|
+
batchSize: number;
|
|
384
|
+
}
|
|
385
|
+
export interface CacheConfig {
|
|
386
|
+
keyPrefix: string;
|
|
387
|
+
sessionTTL: number;
|
|
388
|
+
historyTTL: number;
|
|
389
|
+
}
|
|
390
|
+
/** @deprecated Use CacheConfig */
|
|
391
|
+
export type RedisConfig = CacheConfig;
|
|
392
|
+
export interface CompositorConfig {
|
|
393
|
+
defaultTokenBudget: number;
|
|
394
|
+
maxHistoryMessages: number;
|
|
395
|
+
maxFacts: number;
|
|
396
|
+
maxCrossSessionContext: number;
|
|
397
|
+
/**
|
|
398
|
+
* Aggregate token ceiling across all trigger-fired doc chunk collections in a
|
|
399
|
+
* single compose pass. When unset, hypermem uses a dynamic ceiling of 40% of
|
|
400
|
+
* the remaining budget at the start of trigger retrieval.
|
|
401
|
+
*
|
|
402
|
+
* This prevents pathological prompts from firing many trigger collections at
|
|
403
|
+
* once and starving the rest of the prompt budget.
|
|
404
|
+
*/
|
|
405
|
+
maxTotalTriggerTokens?: number;
|
|
406
|
+
/**
|
|
407
|
+
* How many recent tool call/result pairs to keep verbatim in history.
|
|
408
|
+
* Tool call/result content beyond this threshold gets prose-stub treatment.
|
|
409
|
+
* Default: 3
|
|
410
|
+
*/
|
|
411
|
+
maxRecentToolPairs: number;
|
|
412
|
+
/**
|
|
413
|
+
* How many tool pairs beyond the verbatim threshold to convert to heuristic
|
|
414
|
+
* prose stubs (e.g. "Read /src/foo.ts (1.2KB)"). Pairs beyond this are
|
|
415
|
+
* dropped entirely (text content preserved, tool payloads nulled).
|
|
416
|
+
* Default: 10
|
|
417
|
+
*/
|
|
418
|
+
maxProseToolPairs: number;
|
|
419
|
+
/**
|
|
420
|
+
* Fraction of defaultTokenBudget to allocate for history during warm bootstrap.
|
|
421
|
+
* Replaces the old WARM_BOOTSTRAP_CAP message-count constant.
|
|
422
|
+
* Default: 0.4 (40% of defaultTokenBudget)
|
|
423
|
+
*/
|
|
424
|
+
warmHistoryBudgetFraction: number;
|
|
425
|
+
/**
|
|
426
|
+
* Fraction of the model context window to reserve for output tokens and
|
|
427
|
+
* hypermem operational overhead. The compositor's effective input budget is
|
|
428
|
+
* (contextWindow × (1 - contextWindowReserve)).
|
|
429
|
+
*
|
|
430
|
+
* Higher values = more headroom for large operations, fewer turns before
|
|
431
|
+
* session break. Lower values = more context available, higher saturation risk.
|
|
432
|
+
*
|
|
433
|
+
* Default: 0.25 (25% reserve — leaves 75% for input context)
|
|
434
|
+
* Previous default was 0.10 (10% reserve).
|
|
435
|
+
*/
|
|
436
|
+
contextWindowReserve?: number;
|
|
437
|
+
/**
|
|
438
|
+
* Number of turns to project forward when computing dynamic reserve.
|
|
439
|
+
* safety_tokens = avg_turn_cost × dynamicReserveTurnHorizon
|
|
440
|
+
* Default: 5
|
|
441
|
+
*/
|
|
442
|
+
dynamicReserveTurnHorizon?: number;
|
|
443
|
+
/**
|
|
444
|
+
* Hard ceiling on the dynamic reserve fraction. When the projected safety
|
|
445
|
+
* tokens would push reserve above this, SESSION_PRESSURE_HIGH is emitted
|
|
446
|
+
* in diagnostics and reserve is clamped here.
|
|
447
|
+
* Default: 0.50
|
|
448
|
+
*/
|
|
449
|
+
dynamicReserveMax?: number;
|
|
450
|
+
/**
|
|
451
|
+
* Kill switch for dynamic reserve. Set false to use fixed contextWindowReserve only.
|
|
452
|
+
* Default: true
|
|
453
|
+
*/
|
|
454
|
+
dynamicReserveEnabled?: boolean;
|
|
455
|
+
/**
|
|
456
|
+
* Fraction of history token budget to allocate for keystone (recalled older) messages.
|
|
457
|
+
* Range: 0.0–0.5. Default: 0.2 (20% of history budget).
|
|
458
|
+
* Set to 0 to disable keystone injection.
|
|
459
|
+
*/
|
|
460
|
+
keystoneHistoryFraction?: number;
|
|
461
|
+
/**
|
|
462
|
+
* Maximum number of keystone messages to inject.
|
|
463
|
+
* Default: 15
|
|
464
|
+
*/
|
|
465
|
+
keystoneMaxMessages?: number;
|
|
466
|
+
/**
|
|
467
|
+
* Minimum episode significance for a message to be considered as a keystone.
|
|
468
|
+
* Only applies when episode significance is available (not null).
|
|
469
|
+
* Default: 0.5
|
|
470
|
+
*/
|
|
471
|
+
keystoneMinSignificance?: number;
|
|
472
|
+
/**
|
|
473
|
+
* Fraction of the effective token budget to target for context assembly.
|
|
474
|
+
* The compositor fills slots until this fraction is consumed, leaving the
|
|
475
|
+
* remainder for conversation history and response headroom.
|
|
476
|
+
*
|
|
477
|
+
* Lower values = lighter context, faster turns, less memory surfaced.
|
|
478
|
+
* Higher values = richer context, more memory, higher saturation risk.
|
|
479
|
+
*
|
|
480
|
+
* Range: 0.3–0.85. Default: 0.65
|
|
481
|
+
* Typical lightweight config: 0.45
|
|
482
|
+
* Typical fleet/multi-agent config: 0.65
|
|
483
|
+
*/
|
|
484
|
+
targetBudgetFraction?: number;
|
|
485
|
+
/**
|
|
486
|
+
* Enable Fleet Output Standard (FOS) injection.
|
|
487
|
+
* FOS injects shared output rules (no em dashes, lead with answer, etc.) into
|
|
488
|
+
* every composed context. Disable if the operator manages output standards
|
|
489
|
+
* externally (e.g. via system prompt) to avoid redundancy.
|
|
490
|
+
* Default: true
|
|
491
|
+
*/
|
|
492
|
+
enableFOS?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Enable Model Output Directive (MOD) injection.
|
|
495
|
+
* MOD injects per-model calibration corrections (verbosity, list length, etc.).
|
|
496
|
+
* Disable if you want raw model behavior without hypermem calibration.
|
|
497
|
+
* Default: true
|
|
498
|
+
*/
|
|
499
|
+
enableMOD?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Output profile tier. Controls what FOS content is injected.
|
|
502
|
+
*
|
|
503
|
+
* 'light' — ~100 token standalone directives. No MOD, no fleet concepts.
|
|
504
|
+
* Works on any single-agent 64k setup. No DB required.
|
|
505
|
+
* 'standard' — Full FOS: density targets, format rules, compression ratios,
|
|
506
|
+
* task-context scoping. No MOD.
|
|
507
|
+
* 'full' — FOS + MOD. Cross-agent coordination, full spec.
|
|
508
|
+
*
|
|
509
|
+
* Backward compat: 'starter' maps to 'light', 'fleet' maps to 'full'.
|
|
510
|
+
* Default: 'full' (backward-compatible). New install default: 'light'.
|
|
511
|
+
*/
|
|
512
|
+
outputProfile?: 'light' | 'standard' | 'full' | 'starter' | 'fleet';
|
|
513
|
+
/** @deprecated Use outputProfile */
|
|
514
|
+
outputStandard?: 'light' | 'standard' | 'full' | 'starter' | 'fleet';
|
|
515
|
+
/**
|
|
516
|
+
* Hard token ceiling for wiki page injection per compose pass.
|
|
517
|
+
* Limits how much synthesized topic knowledge is inserted into context.
|
|
518
|
+
* Lower values keep context lighter; higher values surface more topic depth.
|
|
519
|
+
*
|
|
520
|
+
* Default: 600 tokens
|
|
521
|
+
* Light preset: 300 tokens
|
|
522
|
+
* Extended preset: 800 tokens
|
|
523
|
+
*/
|
|
524
|
+
wikiTokenCap?: number;
|
|
525
|
+
}
|
|
526
|
+
export interface IndexerConfig {
|
|
527
|
+
enabled: boolean;
|
|
528
|
+
factExtractionMode: 'off' | 'pattern' | 'tiered';
|
|
529
|
+
topicDormantAfter: string;
|
|
530
|
+
topicClosedAfter: string;
|
|
531
|
+
factDecayRate: number;
|
|
532
|
+
episodeSignificanceThreshold: number;
|
|
533
|
+
periodicInterval: number;
|
|
534
|
+
batchSize: number;
|
|
535
|
+
maxMessagesPerTick: number;
|
|
536
|
+
}
|
|
537
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;A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AAE,MAAM,CAAC;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hypermem Core Types
|
|
3
|
+
*
|
|
4
|
+
* Provider-neutral message format and compositor interfaces.
|
|
5
|
+
* These types are the internal representation — never sent directly to an LLM.
|
|
6
|
+
* Provider translators convert to/from provider-specific formats at the boundary.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=types.js.map
|