@molroo-io/sdk 0.8.3 → 0.9.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 (43) hide show
  1. package/dist/cjs/errors.d.ts +1 -1
  2. package/dist/cjs/errors.d.ts.map +1 -1
  3. package/dist/cjs/errors.js +2 -1
  4. package/dist/cjs/index.d.ts +4 -2
  5. package/dist/cjs/index.d.ts.map +1 -1
  6. package/dist/cjs/index.js +5 -1
  7. package/dist/cjs/persona/conversation.d.ts +63 -0
  8. package/dist/cjs/persona/conversation.d.ts.map +1 -0
  9. package/dist/cjs/persona/conversation.js +70 -0
  10. package/dist/cjs/persona.d.ts +197 -2
  11. package/dist/cjs/persona.d.ts.map +1 -1
  12. package/dist/cjs/persona.js +215 -2
  13. package/dist/cjs/shared/errors.d.ts +28 -2
  14. package/dist/cjs/shared/errors.d.ts.map +1 -1
  15. package/dist/cjs/shared/errors.js +29 -2
  16. package/dist/cjs/types.d.ts +52 -5
  17. package/dist/cjs/types.d.ts.map +1 -1
  18. package/dist/cjs/types.js +2 -1
  19. package/dist/cjs/world/world.d.ts +5 -2
  20. package/dist/cjs/world/world.d.ts.map +1 -1
  21. package/dist/cjs/world/world.js +5 -2
  22. package/dist/esm/errors.d.ts +1 -1
  23. package/dist/esm/errors.d.ts.map +1 -1
  24. package/dist/esm/errors.js +1 -1
  25. package/dist/esm/index.d.ts +4 -2
  26. package/dist/esm/index.d.ts.map +1 -1
  27. package/dist/esm/index.js +3 -1
  28. package/dist/esm/persona/conversation.d.ts +63 -0
  29. package/dist/esm/persona/conversation.d.ts.map +1 -0
  30. package/dist/esm/persona/conversation.js +66 -0
  31. package/dist/esm/persona.d.ts +197 -2
  32. package/dist/esm/persona.d.ts.map +1 -1
  33. package/dist/esm/persona.js +216 -3
  34. package/dist/esm/shared/errors.d.ts +28 -2
  35. package/dist/esm/shared/errors.d.ts.map +1 -1
  36. package/dist/esm/shared/errors.js +28 -1
  37. package/dist/esm/types.d.ts +52 -5
  38. package/dist/esm/types.d.ts.map +1 -1
  39. package/dist/esm/types.js +1 -1
  40. package/dist/esm/world/world.d.ts +5 -2
  41. package/dist/esm/world/world.d.ts.map +1 -1
  42. package/dist/esm/world/world.js +5 -2
  43. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- export { MolrooApiError } from './shared/errors';
1
+ export { MolrooApiError, MolrooErrorCode } from './shared/errors';
2
2
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MolrooApiError = void 0;
3
+ exports.MolrooErrorCode = exports.MolrooApiError = void 0;
4
4
  var errors_1 = require("./shared/errors");
5
5
  Object.defineProperty(exports, "MolrooApiError", { enumerable: true, get: function () { return errors_1.MolrooApiError; } });
6
+ Object.defineProperty(exports, "MolrooErrorCode", { enumerable: true, get: function () { return errors_1.MolrooErrorCode; } });
@@ -30,14 +30,16 @@
30
30
  */
31
31
  export { Molroo } from './world/world';
32
32
  export type { MolrooOptions, PersonaOptions } from './world/world';
33
- export { MolrooApiError, WorldApiError } from './shared/errors';
33
+ export { MolrooApiError, WorldApiError, MolrooErrorCode } from './shared/errors';
34
34
  export { NEUTRAL_APPRAISAL, toWireAppraisal, fromWireAppraisal } from './shared/appraisal';
35
35
  export type { Appraisal } from './shared/appraisal';
36
36
  export type { LLMAdapter, Message, GenerateTextOptions, GenerateObjectOptions, } from './llm/adapter';
37
37
  export type { LLMInput } from './llm/resolve';
38
38
  export type { MemoryAdapter, RecallQuery, SemanticRecallOptions, RecallLimits, Reflection, } from './memory/types';
39
39
  export type { PersonaSummary, PersonaState, PersonaChatResult, } from './persona';
40
- export type { AppraisalMode, EventAppraisal, InterlocutorContext, PerceiveOptions, PerceiveEvent, PerceiveContext, } from './types';
40
+ export { Conversation } from './persona/conversation';
41
+ export type { ConversationOptions } from './persona/conversation';
42
+ export type { AppraisalMode, EventAppraisal, InterlocutorContext, RelationshipContext, PerceiveOptions, PerceiveEvent, PerceiveContext, } from './types';
41
43
  export type { AgentResponse, VAD, Velocity, AppraisalVector, State, SoulStage, CatastropheState, MetacogState, AffectDynamicsState, InterpersonalState, RegulationState, RegulationStrategy, RegulationPhase, ActiveRegulation, RegulationRecord, EffectivenessRecord, NeedState, Episode, SocialUpdate, ReflectionPrompt, } from './types';
42
44
  export type { PersonaSnapshot, PersonaConfigData, PersonalityTraits, Identity, Goal, MotivationContext, } from './types';
43
45
  export type { ApiResponse, ApiErrorResponse, PersonaDynamicState, } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3F,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,YAAY,EACV,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,YAAY,EACV,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,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AC3C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -30,18 +30,22 @@
30
30
  * ```
31
31
  */
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.withDefaults = exports.DEFAULT_PERSONA = exports.EMOTION_LABELS = exports.fromWireAppraisal = exports.toWireAppraisal = exports.NEUTRAL_APPRAISAL = exports.WorldApiError = exports.MolrooApiError = exports.Molroo = void 0;
33
+ exports.withDefaults = exports.DEFAULT_PERSONA = exports.EMOTION_LABELS = exports.Conversation = exports.fromWireAppraisal = exports.toWireAppraisal = exports.NEUTRAL_APPRAISAL = exports.MolrooErrorCode = exports.WorldApiError = exports.MolrooApiError = exports.Molroo = void 0;
34
34
  // ── Main exports ──
35
35
  var world_1 = require("./world/world");
36
36
  Object.defineProperty(exports, "Molroo", { enumerable: true, get: function () { return world_1.Molroo; } });
37
37
  var errors_1 = require("./shared/errors");
38
38
  Object.defineProperty(exports, "MolrooApiError", { enumerable: true, get: function () { return errors_1.MolrooApiError; } });
39
39
  Object.defineProperty(exports, "WorldApiError", { enumerable: true, get: function () { return errors_1.WorldApiError; } });
40
+ Object.defineProperty(exports, "MolrooErrorCode", { enumerable: true, get: function () { return errors_1.MolrooErrorCode; } });
40
41
  // ── Shared utilities ──
41
42
  var appraisal_1 = require("./shared/appraisal");
42
43
  Object.defineProperty(exports, "NEUTRAL_APPRAISAL", { enumerable: true, get: function () { return appraisal_1.NEUTRAL_APPRAISAL; } });
43
44
  Object.defineProperty(exports, "toWireAppraisal", { enumerable: true, get: function () { return appraisal_1.toWireAppraisal; } });
44
45
  Object.defineProperty(exports, "fromWireAppraisal", { enumerable: true, get: function () { return appraisal_1.fromWireAppraisal; } });
46
+ // ── Conversation ──
47
+ var conversation_1 = require("./persona/conversation");
48
+ Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return conversation_1.Conversation; } });
45
49
  // ── Emotion labels (synced with engine/core) ──
46
50
  var emotion_1 = require("./emotion");
47
51
  Object.defineProperty(exports, "EMOTION_LABELS", { enumerable: true, get: function () { return emotion_1.EMOTION_LABELS; } });
@@ -0,0 +1,63 @@
1
+ import type { Message } from '../llm/adapter';
2
+ import type { InterlocutorContext } from '../types';
3
+ import type { MolrooPersona, PersonaChatResult } from '../persona';
4
+ /** Options for creating a {@link Conversation} session. */
5
+ export interface ConversationOptions {
6
+ /** Maximum number of messages to retain in history. Oldest messages are trimmed first. Default: unlimited. */
7
+ maxMessages?: number;
8
+ /** Default source entity for all messages in this conversation. */
9
+ from?: string | InterlocutorContext;
10
+ /** App-specific context appended to every system prompt in this conversation. */
11
+ consumerSuffix?: string;
12
+ }
13
+ /**
14
+ * Auto-managed conversation session that tracks message history.
15
+ *
16
+ * Instead of manually passing `history` to every `chat()` call,
17
+ * create a Conversation and use `send()` — history is managed automatically.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const conv = persona.conversation({ maxMessages: 30 });
22
+ *
23
+ * const r1 = await conv.send('Hello!');
24
+ * console.log(r1.text); // persona's response
25
+ *
26
+ * const r2 = await conv.send('Tell me more');
27
+ * // r2 includes full conversation context automatically
28
+ *
29
+ * console.log(conv.messages.length); // 4 (2 user + 2 assistant)
30
+ * conv.clear(); // reset history
31
+ * ```
32
+ */
33
+ export declare class Conversation {
34
+ private _history;
35
+ private readonly _persona;
36
+ private readonly _options;
37
+ constructor(persona: MolrooPersona, options?: ConversationOptions);
38
+ /**
39
+ * Send a message and get a response. History is updated automatically.
40
+ *
41
+ * @param message - User message to send.
42
+ * @param options - Per-message overrides (from, consumerSuffix, onToolCall).
43
+ * @returns Chat result with text, emotion data, and updated history.
44
+ */
45
+ send(message: string, options?: {
46
+ from?: string | InterlocutorContext;
47
+ consumerSuffix?: string;
48
+ onToolCall?: (call: {
49
+ name: string;
50
+ args: Record<string, unknown>;
51
+ result: unknown;
52
+ }) => void;
53
+ }): Promise<PersonaChatResult>;
54
+ /** Read-only view of the conversation history. */
55
+ get messages(): readonly Message[];
56
+ /** Number of messages in the conversation. */
57
+ get length(): number;
58
+ /** Clear all conversation history. */
59
+ clear(): void;
60
+ /** Trim history to maxMessages if configured. */
61
+ private trimHistory;
62
+ }
63
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/persona/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,8GAA8G;IAC9G,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACpC,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;gBAEnC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAKjE;;;;;;OAMG;IACG,IAAI,CACR,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;QACpC,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAAC,MAAM,EAAE,OAAO,CAAA;SAAE,KAAK,IAAI,CAAC;KAC/F,GACA,OAAO,CAAC,iBAAiB,CAAC;IAgB7B,kDAAkD;IAClD,IAAI,QAAQ,IAAI,SAAS,OAAO,EAAE,CAEjC;IAED,8CAA8C;IAC9C,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,sCAAsC;IACtC,KAAK,IAAI,IAAI;IAIb,iDAAiD;IACjD,OAAO,CAAC,WAAW;CAMpB"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Conversation = void 0;
4
+ /**
5
+ * Auto-managed conversation session that tracks message history.
6
+ *
7
+ * Instead of manually passing `history` to every `chat()` call,
8
+ * create a Conversation and use `send()` — history is managed automatically.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const conv = persona.conversation({ maxMessages: 30 });
13
+ *
14
+ * const r1 = await conv.send('Hello!');
15
+ * console.log(r1.text); // persona's response
16
+ *
17
+ * const r2 = await conv.send('Tell me more');
18
+ * // r2 includes full conversation context automatically
19
+ *
20
+ * console.log(conv.messages.length); // 4 (2 user + 2 assistant)
21
+ * conv.clear(); // reset history
22
+ * ```
23
+ */
24
+ class Conversation {
25
+ constructor(persona, options) {
26
+ this._history = [];
27
+ this._persona = persona;
28
+ this._options = options ?? {};
29
+ }
30
+ /**
31
+ * Send a message and get a response. History is updated automatically.
32
+ *
33
+ * @param message - User message to send.
34
+ * @param options - Per-message overrides (from, consumerSuffix, onToolCall).
35
+ * @returns Chat result with text, emotion data, and updated history.
36
+ */
37
+ async send(message, options) {
38
+ const result = await this._persona.chat(message, {
39
+ from: options?.from ?? this._options.from,
40
+ consumerSuffix: options?.consumerSuffix ?? this._options.consumerSuffix,
41
+ history: this._history,
42
+ onToolCall: options?.onToolCall,
43
+ });
44
+ // Append this turn to history
45
+ this._history.push({ role: 'user', content: message });
46
+ this._history.push({ role: 'assistant', content: result.text });
47
+ this.trimHistory();
48
+ return result;
49
+ }
50
+ /** Read-only view of the conversation history. */
51
+ get messages() {
52
+ return this._history;
53
+ }
54
+ /** Number of messages in the conversation. */
55
+ get length() {
56
+ return this._history.length;
57
+ }
58
+ /** Clear all conversation history. */
59
+ clear() {
60
+ this._history = [];
61
+ }
62
+ /** Trim history to maxMessages if configured. */
63
+ trimHistory() {
64
+ if (this._options.maxMessages && this._history.length > this._options.maxMessages) {
65
+ // Trim from the front, keep the most recent messages
66
+ this._history = this._history.slice(-this._options.maxMessages);
67
+ }
68
+ }
69
+ }
70
+ exports.Conversation = Conversation;
@@ -2,7 +2,9 @@ import type { LLMAdapter, Message } from './llm/adapter';
2
2
  import { type LLMInput } from './llm/resolve';
3
3
  import type { MemoryAdapter, RecallLimits } from './memory/types';
4
4
  import type { EventAdapter } from './events/types';
5
- import type { AgentResponse, AppraisalMode, AppraisalVector, InterlocutorContext, PersonaSnapshot, PersonaConfigData, PerceiveOptions } from './types';
5
+ import type { AgentResponse, AppraisalMode, AppraisalVector, InterlocutorContext, RelationshipContext, PersonaSnapshot, PersonaConfigData, PerceiveOptions } from './types';
6
+ import type { StyleProfile } from './expression';
7
+ import { Conversation, type ConversationOptions } from './persona/conversation';
6
8
  /** Configuration for connecting to a standalone persona instance. */
7
9
  export interface MolrooPersonaConfig {
8
10
  /** Base URL of the molroo API. Defaults to 'https://api.molroo.io'. */
@@ -102,7 +104,9 @@ export declare class MolrooPersona {
102
104
  llm?: LLMAdapter;
103
105
  engineLlm?: LLMAdapter;
104
106
  });
107
+ /** Unique persona instance ID. */
105
108
  get id(): string;
109
+ /** @deprecated Use {@link id} instead. */
106
110
  get personaId(): string;
107
111
  /**
108
112
  * Create a new persona from a natural language description.
@@ -166,6 +170,23 @@ export declare class MolrooPersona {
166
170
  events?: EventAdapter;
167
171
  appraisalMode?: AppraisalMode;
168
172
  }, description: string): Promise<MolrooPersona>;
173
+ /**
174
+ * Connect to an existing persona by ID.
175
+ *
176
+ * @param config - Connection configuration (apiKey required).
177
+ * @param personaId - The persona instance ID to connect to.
178
+ * @returns A connected MolrooPersona instance.
179
+ *
180
+ * @deprecated Use {@link Molroo.connectPersona} instead.
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * const sera = await MolrooPersona.connect(
185
+ * { apiKey: 'mk_...', llm: openaiAdapter },
186
+ * 'persona_abc123'
187
+ * );
188
+ * ```
189
+ */
169
190
  static connect(config: {
170
191
  baseUrl?: string;
171
192
  apiKey: string;
@@ -176,6 +197,12 @@ export declare class MolrooPersona {
176
197
  events?: EventAdapter;
177
198
  appraisalMode?: AppraisalMode;
178
199
  }, personaId: string): Promise<MolrooPersona>;
200
+ /**
201
+ * List all personas for the authenticated tenant.
202
+ *
203
+ * @param config - API connection config.
204
+ * @returns Paginated list of persona summaries.
205
+ */
179
206
  static listPersonas(config: {
180
207
  baseUrl?: string;
181
208
  apiKey: string;
@@ -183,10 +210,95 @@ export declare class MolrooPersona {
183
210
  personas: PersonaSummary[];
184
211
  nextCursor?: string;
185
212
  }>;
213
+ /**
214
+ * Send a stimulus to the persona's emotion engine and get the updated emotional response.
215
+ * This is the low-level API — for common cases, prefer {@link hear}, {@link experience}, or {@link chat}.
216
+ *
217
+ * @param message - The stimulus text (user message, event description, etc.).
218
+ * @param options - Appraisal, source, relationship context, and other options.
219
+ * @returns Emotion engine response with VAD, discrete emotion, and side effects.
220
+ */
186
221
  perceive(message: string, options?: PerceiveOptions): Promise<AgentResponse>;
222
+ /**
223
+ * Send a custom event with a required appraisal vector.
224
+ *
225
+ * @param type - Custom event type (e.g., 'gift_received', 'argument').
226
+ * @param description - Human-readable event description.
227
+ * @param options - Must include a pre-computed appraisal vector.
228
+ * @returns Emotion engine response.
229
+ */
187
230
  event(type: string, description: string, options: Omit<PerceiveOptions, 'type'> & {
188
231
  appraisal: AppraisalVector;
189
232
  }): Promise<AgentResponse>;
233
+ /**
234
+ * Perceive a chat message from another entity. Simplest wrapper over {@link perceive}.
235
+ *
236
+ * @param message - The incoming message text.
237
+ * @param from - Who sent the message (name string or structured context).
238
+ * @returns Emotion engine response.
239
+ *
240
+ * @example
241
+ * ```typescript
242
+ * const response = await persona.hear('How are you?', 'Alice');
243
+ * ```
244
+ */
245
+ hear(message: string, from?: string | InterlocutorContext): Promise<AgentResponse>;
246
+ /**
247
+ * Perceive an environmental or narrative event with a pre-computed appraisal.
248
+ *
249
+ * @param description - What happened (e.g., 'The sun set over the ocean').
250
+ * @param appraisal - 9-dimensional Scherer CPM appraisal vector.
251
+ * @returns Emotion engine response.
252
+ *
253
+ * @example
254
+ * ```typescript
255
+ * const response = await persona.experience('Received a surprise gift', {
256
+ * goal_relevance: 0.8, goal_congruence: 0.9, expectedness: 0.2,
257
+ * controllability: 0.5, agency: 0.3, norm_compatibility: 0.8,
258
+ * internal_standards: 0.7, adjustment_potential: 0.6, urgency: 0.3,
259
+ * });
260
+ * ```
261
+ */
262
+ experience(description: string, appraisal: AppraisalVector): Promise<AgentResponse>;
263
+ /**
264
+ * Perceive a social interaction with relationship context for trust/intimacy computation.
265
+ *
266
+ * @param message - The interaction message.
267
+ * @param from - Who the interaction is from.
268
+ * @param relationship - Current relationship state (closeness, trust, familiarity).
269
+ * @returns Emotion engine response including socialUpdates.
270
+ *
271
+ * @example
272
+ * ```typescript
273
+ * const response = await persona.socialize('I missed you!', 'Bob', {
274
+ * closeness: 0.7, trust: 0.8, familiarity: 0.9, type: 'friend',
275
+ * });
276
+ * console.log(response.socialUpdates); // trust/intimacy deltas
277
+ * ```
278
+ */
279
+ socialize(message: string, from: string | InterlocutorContext, relationship: RelationshipContext): Promise<AgentResponse>;
280
+ /**
281
+ * Send a message and get an LLM-generated response with emotion processing.
282
+ * This is the primary method for conversational interactions.
283
+ *
284
+ * The system prompt is assembled server-side via {@link getPromptContext} and includes:
285
+ * identity, behavioral instructions, current psychological state, expression style,
286
+ * and consumerSuffix. Do NOT duplicate these in consumerSuffix.
287
+ *
288
+ * @param message - User message to respond to.
289
+ * @param options - Conversation history, source entity, and app-specific suffix.
290
+ * @returns LLM response text, emotion data, and updated conversation history.
291
+ *
292
+ * @example
293
+ * ```typescript
294
+ * const result = await persona.chat('Tell me about yourself', {
295
+ * from: 'Alice',
296
+ * history: previousMessages,
297
+ * });
298
+ * console.log(result.text); // LLM response
299
+ * console.log(result.response.emotion); // updated VAD
300
+ * ```
301
+ */
190
302
  chat(message: string, options?: {
191
303
  from?: string | InterlocutorContext;
192
304
  history?: Message[];
@@ -197,20 +309,50 @@ export declare class MolrooPersona {
197
309
  result: unknown;
198
310
  }) => void;
199
311
  }): Promise<PersonaChatResult>;
312
+ /**
313
+ * Advance persona simulation time. Triggers idle decay, body budget recovery,
314
+ * need regression, and timeline advancement.
315
+ *
316
+ * @param seconds - Number of seconds to advance (must be >= 1).
317
+ * @returns Any pending internal events generated by threshold checks.
318
+ */
200
319
  tick(seconds: number): Promise<{
201
320
  pendingEvents?: unknown[];
202
321
  }>;
322
+ /**
323
+ * Override the persona's current emotion to a specific VAD point.
324
+ * Useful for testing or narrative-driven emotion control.
325
+ *
326
+ * @param vad - Partial VAD values to set (V: valence, A: arousal, D: dominance).
327
+ */
203
328
  setEmotion(vad: Partial<{
204
329
  V: number;
205
330
  A: number;
206
331
  D: number;
207
332
  }>): Promise<void>;
333
+ /**
334
+ * Append text to the next system prompt. One-shot: cleared after the next
335
+ * `getPromptContext()` / `chat()` call.
336
+ */
337
+ annotate(text: string): Promise<void>;
338
+ /**
339
+ * Force the next response text. The persona will use this exact text
340
+ * instead of generating via LLM on the next `chat()` call.
341
+ */
342
+ setNextResponse(text: string): Promise<void>;
208
343
  /**
209
344
  * Set StyleProfile extracted from a text corpus.
210
345
  * Once set, expression constraints (promptText) are automatically
211
346
  * included in getPromptContext() and modulated by current emotion.
212
347
  */
213
- setStyleProfile(profile: Record<string, unknown>): Promise<void>;
348
+ /**
349
+ * Set a StyleProfile for expression-aware prompt generation.
350
+ * Once set, expression constraints are automatically included in
351
+ * {@link getPromptContext} and modulated by current emotion.
352
+ *
353
+ * @param profile - StyleProfile object (lexical, structural, register features, etc.).
354
+ */
355
+ setStyleProfile(profile: StyleProfile): Promise<void>;
214
356
  /**
215
357
  * Extract a StyleProfile from a text corpus and save it to this persona.
216
358
  * Delegates extraction to the API server (keeps expression logic server-side).
@@ -223,19 +365,72 @@ export declare class MolrooPersona {
223
365
  timestamps?: number[];
224
366
  otherMessages?: string[];
225
367
  }): Promise<Record<string, unknown>>;
368
+ /**
369
+ * Get the persona's current emotional and psychological state.
370
+ *
371
+ * @returns Current emotion (VAD + discrete), mood, somatic sensations, and narrative.
372
+ */
226
373
  getState(): Promise<PersonaState>;
374
+ /**
375
+ * Get a full snapshot of the persona (config + engine state).
376
+ * Useful for backup, migration, or debugging.
377
+ *
378
+ * @returns Full persona snapshot including config and internal state.
379
+ */
227
380
  getSnapshot(): Promise<PersonaSnapshot>;
381
+ /**
382
+ * Restore a persona from a snapshot. Overwrites current state entirely.
383
+ *
384
+ * @param snapshot - Full persona snapshot to restore.
385
+ */
228
386
  putSnapshot(snapshot: PersonaSnapshot): Promise<void>;
387
+ /**
388
+ * Partially update persona configuration (identity, personality, goals, etc.).
389
+ *
390
+ * @param updates - Fields to update. Only provided fields are changed.
391
+ */
229
392
  patch(updates: {
230
393
  config?: PersonaConfigData;
231
394
  }): Promise<void>;
395
+ /**
396
+ * Soft-delete this persona. Can be restored within retention period via {@link restore}.
397
+ */
232
398
  destroy(): Promise<void>;
399
+ /** Restore a soft-deleted persona. */
233
400
  restore(): Promise<void>;
401
+ /**
402
+ * Fetch the server-assembled system prompt for this persona.
403
+ * Includes identity, behavioral instructions, psychological state,
404
+ * expression style (if StyleProfile set), and consumerSuffix.
405
+ *
406
+ * Called internally by {@link chat}. Use directly when building custom LLM pipelines.
407
+ *
408
+ * @param consumerSuffix - App-specific context appended to the system prompt.
409
+ * Do NOT include identity, personality, or emotion — these are already in the prompt.
410
+ * @param sourceEntity - Name of the conversation partner (for interlocutor-aware prompts).
411
+ * @returns System prompt string and structured persona prompt data.
412
+ */
234
413
  getPromptContext(consumerSuffix?: string, sourceEntity?: string): Promise<{
235
414
  systemPrompt: string;
236
415
  personaPrompt: Record<string, unknown>;
237
416
  tools?: Array<Record<string, unknown>>;
238
417
  }>;
418
+ /**
419
+ * Create a conversation session that auto-manages message history.
420
+ * Each `.send()` call automatically appends to the history.
421
+ *
422
+ * @param options - Max messages or custom chat options.
423
+ * @returns A new Conversation instance bound to this persona.
424
+ *
425
+ * @example
426
+ * ```typescript
427
+ * const conv = persona.conversation({ maxMessages: 20 });
428
+ * const r1 = await conv.send('Hello!');
429
+ * const r2 = await conv.send('Tell me more'); // history auto-managed
430
+ * console.log(conv.messages); // full conversation
431
+ * ```
432
+ */
433
+ conversation(options?: ConversationOptions): Conversation;
239
434
  private get memoryPipelineDeps();
240
435
  private requireLLM;
241
436
  }
@@ -1 +1 @@
1
- {"version":3,"file":"persona.d.ts","sourceRoot":"","sources":["../../src/persona.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAejB,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,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