@siduri-x/core 2.0.0 → 2.0.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/dist/runtime.js CHANGED
@@ -1,420 +1,86 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SiduriRuntime = void 0;
4
- const index_1 = require("./index");
5
- const input_normalizer_1 = require("./input-normalizer");
6
- const intent_classifier_1 = require("./intent-classifier");
7
- const context_retriever_1 = require("./context-retriever");
8
- const prompt_compiler_1 = require("./prompt-compiler");
9
- const cognition_planner_1 = require("./cognition-planner");
10
- const memory_settler_1 = require("./memory-settler");
11
- const action_executor_1 = require("./action-executor");
12
- const experience_emitter_1 = require("./experience-emitter");
13
- const response_envelope_1 = require("./response-envelope");
14
- const session_history_1 = require("./session-history");
4
+ const perception_pipeline_1 = require("./perception-pipeline");
5
+ const container_1 = require("./container");
15
6
  /**
16
- * SiduriRuntime coordinates companion lifecycle, sensory perception,
17
- * context retrieval, cognition planning, safety gating, action execution,
18
- * and experience emission across decoupled organs.
7
+ * SiduriRuntime coordinates companion perception and cognition execution.
8
+ * Lifecycle management and organ storage are handled by CompanionContainer.
9
+ * The 12-stage perception cycle is executed via PerceptionPipeline.
19
10
  */
20
11
  class SiduriRuntime {
21
12
  id;
22
13
  config;
23
- brain;
24
- memory;
25
- voice;
26
- knowledge;
27
- vision;
28
- behavior;
29
- body;
30
- hands;
31
- ear;
32
- observation;
33
- mouth;
34
- self;
35
- externalKnowledge;
36
- gating;
37
- actionPolicy;
38
- dispatcher;
39
- sessionHistory = new session_history_1.SessionHistoryManager();
40
- // Backward-compatible getter/setter for conversation history
14
+ container;
15
+ pipeline;
16
+ constructor(id, config, containerOrOrgans = {}, pipeline) {
17
+ this.id = id;
18
+ this.config = config;
19
+ if (containerOrOrgans instanceof container_1.CompanionContainer) {
20
+ this.container = containerOrOrgans;
21
+ }
22
+ else {
23
+ this.container = new container_1.CompanionContainer(id, config, containerOrOrgans);
24
+ }
25
+ this.pipeline = pipeline || (0, perception_pipeline_1.createDefaultPerceptionPipeline)();
26
+ }
27
+ // Direct organ accessors through container
28
+ get organs() { return this.container.organs; }
29
+ get brain() { return this.container.brain; }
30
+ get memory() { return this.container.memory; }
31
+ get voice() { return this.container.voice; }
32
+ get knowledge() { return this.container.knowledge; }
33
+ get vision() { return this.container.vision; }
34
+ get behavior() { return this.container.behavior; }
35
+ get body() { return this.container.body; }
36
+ get hands() { return this.container.hands; }
37
+ get ear() { return this.container.ear; }
38
+ get observation() { return this.container.observation; }
39
+ set observation(org) { this.container.observation = org; }
40
+ get mouth() { return this.container.mouth; }
41
+ get self() { return this.container.self; }
42
+ get externalKnowledge() { return this.container.externalKnowledge; }
43
+ get gating() { return this.container.gating; }
44
+ get actionPolicy() { return this.container.actionPolicy; }
45
+ get dispatcher() { return this.container.dispatcher; }
46
+ get sessionHistory() { return this.container.sessionHistory; }
47
+ // Conversation history accessors
41
48
  get conversationHistory() {
42
- return this.sessionHistory.getHistory('default');
49
+ return this.container.sessionHistory.getHistory('default');
43
50
  }
44
51
  set conversationHistory(messages) {
45
- this.sessionHistory.setHistory('default', messages);
46
- }
47
- constructor(id, config, organs = {}) {
48
- this.id = id;
49
- this.config = config;
50
- this.brain = organs.brain;
51
- this.memory = organs.memory;
52
- this.voice = organs.voice;
53
- this.knowledge = organs.knowledge;
54
- this.vision = organs.vision;
55
- this.behavior = organs.behavior;
56
- this.body = organs.body;
57
- this.hands = organs.hands;
58
- this.ear = organs.ear;
59
- this.observation = organs.observation;
60
- this.mouth = organs.mouth;
61
- this.self = organs.self;
62
- this.externalKnowledge = organs.externalKnowledge;
63
- this.gating = new index_1.ResponseGatingEngine();
64
- let actionStore = organs.actionStore;
65
- if (!actionStore) {
66
- const storeOpt = config.actionStore;
67
- const storePath = config.actionStorePath || (typeof storeOpt === 'object' ? storeOpt.dbPath : undefined);
68
- if (storeOpt === 'sqlite' || (typeof storeOpt === 'object' && storeOpt.type === 'sqlite') || storePath) {
69
- actionStore = new index_1.SqliteActionStore({ dbPath: storePath });
70
- }
71
- }
72
- this.actionPolicy = organs.actionPolicy || new index_1.ActionPolicyEngine({
73
- store: actionStore,
74
- });
75
- this.dispatcher = new index_1.ExperienceDispatcher();
76
- if (this.voice && typeof this.voice.handleEvent === 'function') {
77
- this.dispatcher.registerAdapter(this.voice);
78
- }
79
- if (this.body && typeof this.body.handleEvent === 'function') {
80
- this.dispatcher.registerAdapter(this.body);
81
- }
82
- if (this.mouth && typeof this.mouth.handleEvent === 'function') {
83
- this.dispatcher.registerAdapter(this.mouth);
84
- }
52
+ this.container.sessionHistory.setHistory('default', messages);
85
53
  }
86
54
  async initialize() {
87
- if (this.memory && typeof this.memory.initialize === 'function') {
88
- await this.memory.initialize(this.id);
89
- }
90
- if (this.hands && typeof this.hands.listTools === 'function') {
91
- const tools = await this.hands.listTools();
92
- for (const tool of tools) {
93
- this.actionPolicy.registerToolDefinition(tool);
94
- }
95
- }
55
+ return this.container.initialize();
96
56
  }
97
- // --- Session History Accessors ---
98
57
  getSessionHistory(sessionKey) {
99
- return this.sessionHistory.getHistory(sessionKey);
58
+ return this.container.sessionHistory.getHistory(sessionKey);
100
59
  }
101
60
  clearHistory(sessionKey) {
102
- this.sessionHistory.clear(sessionKey);
103
- }
104
- // --- Observation & Vision Facades ---
105
- async analyzeVision(imageUrl, prompt) {
106
- if (!this.vision || typeof this.vision.analyze !== 'function') {
107
- throw new Error('Vision organ is not configured on this runtime');
108
- }
109
- return this.vision.analyze(imageUrl, prompt);
110
- }
111
- async ingestObservation(frame, sourceName, providerId) {
112
- if (!this.observation || typeof this.observation.ingest !== 'function') {
113
- return { duplicate: false, reason: 'provider_failure' };
114
- }
115
- return this.observation.ingest(frame, sourceName, providerId);
116
- }
117
- getCurrentObservations(now) {
118
- if (!this.observation || typeof this.observation.current !== 'function') {
119
- return [];
120
- }
121
- return this.observation.current(now);
122
- }
123
- clearExpiredObservations(now) {
124
- if (!this.observation || typeof this.observation.clearExpired !== 'function') {
125
- return 0;
126
- }
127
- return this.observation.clearExpired(now);
128
- }
129
- // --- Memory Facades ---
130
- async getClaims(limit) {
131
- if (!this.memory || typeof this.memory.getClaims !== 'function') {
132
- return [];
133
- }
134
- return this.memory.getClaims(limit);
135
- }
136
- async getPendingClaims(limit) {
137
- if (!this.memory || typeof this.memory.getPendingClaims !== 'function') {
138
- return [];
139
- }
140
- return this.memory.getPendingClaims(limit);
141
- }
142
- async getDirectives() {
143
- if (!this.memory || typeof this.memory.getDirectives !== 'function') {
144
- return [];
145
- }
146
- return this.memory.getDirectives();
147
- }
148
- async approveClaim(id) {
149
- if (!this.memory || typeof this.memory.approveClaim !== 'function') {
150
- throw new Error('Memory organ not configured');
151
- }
152
- return this.memory.approveClaim(id);
153
- }
154
- async rejectClaim(id) {
155
- if (!this.memory || typeof this.memory.rejectClaim !== 'function') {
156
- throw new Error('Memory organ not configured');
157
- }
158
- return this.memory.rejectClaim(id);
159
- }
160
- async updateClaim(id, updates) {
161
- if (!this.memory || typeof this.memory.updateClaim !== 'function') {
162
- throw new Error('Memory organ updateClaim not supported');
163
- }
164
- return this.memory.updateClaim(id, updates);
165
- }
166
- async approveDirective(id) {
167
- if (!this.memory || typeof this.memory.approveDirective !== 'function') {
168
- throw new Error('Memory organ not configured');
169
- }
170
- return this.memory.approveDirective(id);
171
- }
172
- async rejectDirective(id) {
173
- if (!this.memory || typeof this.memory.rejectDirective !== 'function') {
174
- throw new Error('Memory organ not configured');
175
- }
176
- return this.memory.rejectDirective(id);
177
- }
178
- async revokeDirective(id) {
179
- if (!this.memory || typeof this.memory.revokeDirective !== 'function') {
180
- throw new Error('Memory organ not configured');
181
- }
182
- return this.memory.revokeDirective(id);
61
+ this.container.sessionHistory.clear(sessionKey);
183
62
  }
184
- async disableDirective(id) {
185
- if (!this.memory || typeof this.memory.disableDirective !== 'function') {
186
- throw new Error('Memory organ not configured');
187
- }
188
- return this.memory.disableDirective(id);
189
- }
190
- async resetMemory() {
191
- if (!this.memory || typeof this.memory.resetMemory !== 'function') {
192
- throw new Error('Memory organ does not support reset');
193
- }
194
- return this.memory.resetMemory();
195
- }
196
- // --- Response Gating Facades ---
197
- stageResponse(options) {
198
- return this.gating.stageResponse(options);
199
- }
200
- evaluateGate(plan, evidenceRecords) {
201
- return this.gating.evaluateGate(plan, evidenceRecords);
202
- }
203
- approveResponse(options) {
204
- return this.gating.approveResponse(options);
205
- }
206
- rejectResponse(options) {
207
- return this.gating.rejectResponse(options);
208
- }
209
- getStagedPlan(responseId) {
210
- return this.gating.getStagedPlan(responseId);
211
- }
212
- findStagedPlanByCorrelation(companionId, correlationId) {
213
- return this.gating.findStagedPlanByCorrelation(companionId, correlationId);
214
- }
215
- // --- Universal Perception & Cognition Cycle ---
216
63
  /**
217
64
  * Processes an incoming perception (sensory audio, text, platform event, or observation alert)
218
- * through the perception -> retrieval -> cognition -> gating -> action -> experience cycle.
65
+ * through the decoupled PerceptionPipeline.
219
66
  */
220
67
  async processPerception(perception) {
221
- let rawText = perception.text || '';
222
- // If audio buffer is provided and Ear supports transcription, transcribe it
223
- if (!rawText && perception.audioBuffer && this.ear && typeof this.ear.transcribeAudio === 'function') {
224
- rawText = await this.ear.transcribeAudio(perception.audioBuffer);
225
- }
226
- const roleOrContext = perception.context || perception.roleOrContext || 'OWNER';
227
- const history = perception.history || [];
228
- // 1. Input validation, RequestContext synthesis, and Ear perception routing
229
- const input = await (0, input_normalizer_1.normalizeUserInput)(rawText, roleOrContext, history, this.id, this.ear);
230
- const sessionKey = input.requestContext.actor.sessionId ||
231
- input.requestContext.conversation.correlationId ||
232
- 'default';
233
- const currentMessage = { role: 'user', content: input.perceivedText };
234
- const boundedSessionHistory = [...input.boundedHistory, currentMessage].slice(-20);
235
- this.sessionHistory.setHistory(sessionKey, boundedSessionHistory);
236
- this.sessionHistory.setHistory('default', boundedSessionHistory);
237
- // 2. Intent classification (delegating to Ear if available, else heuristics)
238
- const intent = await (0, intent_classifier_1.classifyInputIntentAsync)(input.perceivedText, input.requestContext, this.ear?.classifyIntent
239
- ? (t, c) => this.ear.classifyIntent(t, c)
240
- : undefined);
241
- // 3. Concurrent Knowledge & Memory retrieval with diagnostics & evidence handling
242
- const contextRetrieval = await (0, context_retriever_1.retrieveRuntimeContext)({
68
+ const context = {
243
69
  companionId: this.id,
244
- perceivedText: input.perceivedText,
245
- requestContext: input.requestContext,
246
- role: input.role,
247
- isContextObject: input.isContextObject,
248
- shouldQueryKnowledge: intent.shouldQueryKnowledge,
249
- knowledge: this.knowledge,
250
- memory: this.memory,
251
- self: this.self,
252
- externalKnowledge: this.externalKnowledge,
253
- });
254
- // 4. Neutral system prompt and contextual prompt compilation
255
- const prompts = await (0, prompt_compiler_1.compilePrompts)({
256
- companionName: this.config.name,
257
- companionId: this.id,
258
- role: input.role,
259
- requestContext: input.requestContext,
260
- behavior: this.behavior,
261
- activeDirectives: contextRetrieval.activeDirectives,
262
- subsystemDiagnostics: contextRetrieval.subsystemDiagnostics,
263
- knowledgeData: contextRetrieval.knowledgeData,
264
- memoryData: contextRetrieval.memoryData,
265
- lifeContext: contextRetrieval.lifeContext,
266
- });
267
- // 5. Cognition planning via BrainOrgan
268
- const plan = await (0, cognition_planner_1.generateCognitionPlan)({
269
70
  companionName: this.config.name,
270
- brain: this.brain,
271
- systemPrompt: prompts.systemPrompt,
272
- contextPrompt: prompts.contextPrompt,
273
- recentMessages: this.sessionHistory.getHistory(sessionKey).slice(-10),
274
- recipient: input.role,
275
- perceivedText: input.perceivedText,
276
- });
277
- // 6. Stage response and evaluate safety gating boundary
278
- const stagedPlan = this.gating.stageResponse({
279
- requestContext: input.requestContext,
280
- candidateSpeech: plan.speech,
281
- candidateLanguage: plan.language || 'ja',
282
- internalMonologue: plan.internalMonologue,
283
- memoryProposals: plan.memoryProposals,
284
- behaviorProposals: plan.behaviorProposals,
285
- evidenceRecords: contextRetrieval.collectedEvidence,
286
- citations: contextRetrieval.citations,
287
- });
288
- const gateEval = this.gating.evaluateGate(stagedPlan, contextRetrieval.collectedEvidence);
289
- if (!gateEval.admissible) {
290
- return (0, response_envelope_1.createGateRejectionEnvelope)(stagedPlan, gateEval);
291
- }
292
- this.sessionHistory.append(sessionKey, { role: 'assistant', content: plan.speech });
293
- this.sessionHistory.append('default', { role: 'assistant', content: plan.speech });
294
- // 7. Settle memory proposals and persist source events
295
- const memorySettlement = await (0, memory_settler_1.settleMemoryProposals)({
296
- companionId: this.id,
297
- perceivedText: input.perceivedText,
298
- role: input.role,
299
- requestContext: input.requestContext,
300
- memory: this.memory,
301
- explicitTeaching: intent.explicitTeaching,
302
- plan,
303
- });
304
- // 8. Authorize and execute action intents under Primary Security Invariant
305
- const actionResults = await (0, action_executor_1.executeActionIntents)({
306
- actionIntents: plan.actionIntents,
307
- requestContext: input.requestContext,
308
- actionPolicy: this.actionPolicy,
309
- hands: this.hands,
310
- });
311
- // 9. Dispatch ExperienceEvents to registered adapters
312
- const experienceEmission = await (0, experience_emitter_1.emitExperienceEvents)({
313
- companionId: this.id,
314
- requestContext: input.requestContext,
315
- stagedPlan,
316
- gateEval,
317
- speech: plan.speech,
318
- language: plan.language || 'ja',
319
- dispatcher: this.dispatcher,
320
- voice: this.voice,
321
- body: this.body,
322
- });
323
- // 10. Deliver utterance via Mouth organ (UI / Output Channel Decoupling)
324
- let mouthDelivery;
325
- if (this.mouth && typeof this.mouth.speak === 'function') {
326
- try {
327
- const avatarEvent = experienceEmission.experienceEvents.find((e) => e.kind === 'avatar');
328
- mouthDelivery = await this.mouth.speak({
329
- utteranceId: stagedPlan.responseId,
330
- companionId: this.id,
331
- responseId: stagedPlan.responseId,
332
- correlationId: stagedPlan.correlationId,
333
- text: plan.speech,
334
- language: plan.language || 'ja',
335
- subtitleJa: plan.speech,
336
- subtitleEn: plan.speech,
337
- spokenJa: plan.speech,
338
- expression: avatarEvent?.expression,
339
- medium: perception.medium,
340
- signal: perception.signal,
341
- audioUrl: experienceEmission.speechId
342
- ? `/voice/stream?id=${experienceEmission.speechId}`
343
- : undefined,
344
- metadata: {
345
- subsystemDiagnostics: contextRetrieval.subsystemDiagnostics,
346
- internalMonologue: plan.internalMonologue,
347
- },
348
- citations: gateEval.filteredCitations,
349
- evidenceIds: gateEval.filteredEvidenceIds,
350
- });
351
- }
352
- catch (e) {
353
- console.error('[SiduriRuntime] Mouth delivery failed:', e?.message || e);
354
- }
355
- }
356
- // 11. Assemble and return response envelope
357
- return (0, response_envelope_1.assembleResponseEnvelope)({
358
- stagedPlan,
359
- speech: plan.speech,
360
- language: plan.language,
361
- speechId: experienceEmission.speechId,
362
- createdMemoryProposals: memorySettlement.createdMemoryProposals,
363
- memoryProposalReceipts: memorySettlement.memoryProposalReceipts,
364
- actionResults,
365
- filteredEvidenceIds: gateEval.filteredEvidenceIds,
366
- filteredCitations: gateEval.filteredCitations,
367
- subsystemDiagnostics: contextRetrieval.subsystemDiagnostics,
368
- experienceEvents: experienceEmission.experienceEvents,
369
- mouthDelivery,
370
- });
371
- }
372
- // --- Mouth Facades ---
373
- async speakMouth(utterance) {
374
- if (!this.mouth || typeof this.mouth.speak !== 'function')
375
- return undefined;
376
- return this.mouth.speak(utterance);
377
- }
378
- formatMouth(utterance, medium) {
379
- if (!this.mouth || typeof this.mouth.format !== 'function')
380
- return undefined;
381
- return this.mouth.format(utterance, medium);
382
- }
383
- registerMouthChannel(channel) {
384
- if (this.mouth && typeof this.mouth.registerChannel === 'function') {
385
- this.mouth.registerChannel(channel);
386
- }
71
+ perception,
72
+ organs: this.container.organs,
73
+ gating: this.container.gating,
74
+ actionPolicy: this.container.actionPolicy,
75
+ dispatcher: this.container.dispatcher,
76
+ sessionHistory: this.container.sessionHistory,
77
+ rawText: perception.text || '',
78
+ };
79
+ return this.pipeline.execute(context);
387
80
  }
388
- unregisterMouthChannel(channelId) {
389
- if (this.mouth && typeof this.mouth.unregisterChannel === 'function') {
390
- this.mouth.unregisterChannel(channelId);
391
- }
392
- }
393
- async broadcastMouth(utterance) {
394
- if (!this.mouth || typeof this.mouth.broadcast !== 'function')
395
- return [];
396
- return this.mouth.broadcast(utterance);
397
- }
398
- interruptMouth(reason) {
399
- if (this.mouth && typeof this.mouth.interrupt === 'function') {
400
- this.mouth.interrupt(reason);
401
- }
402
- }
403
- streamMouth(utterance) {
404
- if (!this.mouth || typeof this.mouth.stream !== 'function') {
405
- return (async function* () {
406
- yield {
407
- utteranceId: utterance.utteranceId,
408
- index: 0,
409
- deltaText: utterance.text,
410
- isComplete: true,
411
- medium: 'web',
412
- };
413
- })();
414
- }
415
- return this.mouth.stream(utterance);
416
- }
417
- // --- Backward-Compatible Chat Adapter ---
81
+ /**
82
+ * Primary entrypoint for text chat messages.
83
+ */
418
84
  async handleUserMessage(message, roleOrContext = 'OWNER', history = [], medium, signal) {
419
85
  return this.processPerception({
420
86
  source: 'text_chat',
@@ -31,7 +31,7 @@ describe('validateCompanionConfig', () => {
31
31
  properties: {
32
32
  provider: {
33
33
  type: 'string',
34
- enum: ['postgres', 'in-memory', 'none'],
34
+ enum: ['sqlite', 'in-memory', 'none'],
35
35
  },
36
36
  maxConnections: { type: 'number' },
37
37
  },
@@ -107,7 +107,7 @@ describe('validateCompanionConfig', () => {
107
107
  name: 'Test',
108
108
  organs: {
109
109
  memory: {
110
- provider: 'postgres',
110
+ provider: 'sqlite',
111
111
  maxConnections: 'ten', // should be number
112
112
  },
113
113
  },
@@ -17,10 +17,10 @@ export interface SelfDirective {
17
17
  companionId: string;
18
18
  priority: number;
19
19
  directive: string;
20
- status: 'ACTIVE' | 'DISABLED' | 'SUPERSEDED';
21
- category: 'behavioral' | 'guardrail' | 'relational';
20
+ status: 'PENDING' | 'ACTIVE' | 'DISABLED' | 'SUPERSEDED' | 'REJECTED' | 'REVOKED' | 'EXPIRED';
21
+ category: 'behavioral' | 'guardrail' | 'relational' | string;
22
22
  supersedesId?: string;
23
- createdAt: string;
23
+ createdAt?: string;
24
24
  }
25
25
  export interface SelfRelationship {
26
26
  companionId: string;
@@ -77,12 +77,14 @@ export interface MemoryClaim {
77
77
  subject: string;
78
78
  predicate: string;
79
79
  value: string;
80
- status: 'PENDING' | 'APPROVED' | 'REJECTED';
80
+ status: 'PENDING' | 'APPROVED' | 'REJECTED' | 'SESSION_ONLY' | 'SUPERSEDED' | 'REVOKED' | 'EXPIRED';
81
81
  confidence: number;
82
82
  validFrom?: string;
83
83
  validUntil?: string;
84
84
  evidence?: string[];
85
85
  assertedAt: string;
86
+ supersedes?: string;
87
+ sourceEventId?: string;
86
88
  }
87
89
  export interface SiduriDatabaseOptions {
88
90
  dbPath?: string;
@@ -98,7 +100,12 @@ export declare class SiduriDatabase {
98
100
  setPersonality(companionId: string, traits: PersonalityTraits): void;
99
101
  getActiveDirectives(companionId: string): SelfDirective[];
100
102
  commitDirective(directive: SelfDirective): void;
101
- disableDirective(id: string): void;
103
+ getDirective(id: string, companionId?: string): SelfDirective | undefined;
104
+ approveDirective(id: string, companionId?: string): void;
105
+ rejectDirective(id: string, companionId?: string): void;
106
+ revokeDirective(id: string, companionId?: string): void;
107
+ expireDirective(id: string, companionId?: string): void;
108
+ disableDirective(id: string, companionId?: string): void;
102
109
  getRelationship(companionId: string, entityId: string): SelfRelationship | undefined;
103
110
  upsertRelationship(rel: SelfRelationship): void;
104
111
  getInventory(companionId: string, domain?: string): LifeInventoryItem[];
@@ -111,9 +118,21 @@ export declare class SiduriDatabase {
111
118
  upsertPreference(pref: LifePreference): void;
112
119
  recordEvent(event: EpisodicEvent): void;
113
120
  getRecentEvents(companionId: string, limit?: number): EpisodicEvent[];
114
- proposeClaim(claim: Omit<MemoryClaim, 'status'>): MemoryClaim;
115
- approveClaim(id: string): void;
116
- rejectClaim(id: string): void;
121
+ getEvent(id: string): EpisodicEvent | undefined;
122
+ proposeClaim(claim: Omit<MemoryClaim, 'status' | 'confidence' | 'assertedAt'> & {
123
+ confidence?: number;
124
+ assertedAt?: string;
125
+ supersedes?: string;
126
+ sourceEventId?: string;
127
+ }): MemoryClaim;
128
+ approveClaim(id: string, companionId?: string): void;
129
+ rejectClaim(id: string, companionId?: string): void;
130
+ revokeClaim(id: string, companionId?: string): void;
131
+ expireClaim(id: string, companionId?: string): void;
132
+ markClaimSessionOnly(id: string, companionId?: string): void;
117
133
  searchClaims(companionId: string, query: string, limit?: number): MemoryClaim[];
134
+ getPendingClaims(companionId: string, limit?: number): MemoryClaim[];
118
135
  getApprovedClaims(companionId: string, limit?: number): MemoryClaim[];
136
+ getClaim(id: string): MemoryClaim | undefined;
137
+ resetMemory(companionId: string): void;
119
138
  }