@molroo-io/sdk 0.9.0 → 0.10.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.
- package/dist/cjs/defaults/index.d.ts.map +1 -1
- package/dist/cjs/defaults/index.js +10 -5
- package/dist/cjs/events/types.d.ts +1 -1
- package/dist/cjs/events/types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/llm/resolve.d.ts.map +1 -1
- package/dist/cjs/llm/resolve.js +2 -1
- package/dist/cjs/llm/schema.d.ts +0 -114
- package/dist/cjs/llm/schema.d.ts.map +1 -1
- package/dist/cjs/llm/schema.js +1 -44
- package/dist/cjs/persona/chat-orchestrator.d.ts +18 -3
- package/dist/cjs/persona/chat-orchestrator.d.ts.map +1 -1
- package/dist/cjs/persona/chat-orchestrator.js +29 -109
- package/dist/cjs/persona/conversation.d.ts +22 -1
- package/dist/cjs/persona/conversation.d.ts.map +1 -1
- package/dist/cjs/persona/conversation.js +2 -0
- package/dist/cjs/persona/memory-pipeline.d.ts.map +1 -1
- package/dist/cjs/persona/memory-pipeline.js +30 -4
- package/dist/cjs/persona.d.ts +330 -36
- package/dist/cjs/persona.d.ts.map +1 -1
- package/dist/cjs/persona.js +302 -19
- package/dist/cjs/shared/errors.d.ts +5 -1
- package/dist/cjs/shared/errors.d.ts.map +1 -1
- package/dist/cjs/shared/errors.js +4 -0
- package/dist/cjs/types.d.ts +18 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/world/world-persona.d.ts +20 -5
- package/dist/cjs/world/world-persona.d.ts.map +1 -1
- package/dist/cjs/world/world-persona.js +21 -5
- package/dist/cjs/world/world.d.ts +23 -3
- package/dist/cjs/world/world.d.ts.map +1 -1
- package/dist/cjs/world/world.js +24 -1
- package/dist/esm/api-client.js +2 -2
- package/dist/esm/defaults/index.d.ts.map +1 -1
- package/dist/esm/defaults/index.js +10 -2
- package/dist/esm/errors.js +1 -1
- package/dist/esm/events/types.d.ts +1 -1
- package/dist/esm/events/types.d.ts.map +1 -1
- package/dist/esm/generate/persona.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/llm/resolve.d.ts.map +1 -1
- package/dist/esm/llm/resolve.js +3 -2
- package/dist/esm/llm/schema.d.ts +0 -114
- package/dist/esm/llm/schema.d.ts.map +1 -1
- package/dist/esm/llm/schema.js +0 -43
- package/dist/esm/llm/vercel-ai/index.js +2 -2
- package/dist/esm/package.json +1 -0
- package/dist/esm/persona/chat-orchestrator.d.ts +18 -3
- package/dist/esm/persona/chat-orchestrator.d.ts.map +1 -1
- package/dist/esm/persona/chat-orchestrator.js +32 -112
- package/dist/esm/persona/conversation.d.ts +22 -1
- package/dist/esm/persona/conversation.d.ts.map +1 -1
- package/dist/esm/persona/conversation.js +2 -0
- package/dist/esm/persona/memory-pipeline.d.ts.map +1 -1
- package/dist/esm/persona/memory-pipeline.js +31 -5
- package/dist/esm/persona.d.ts +330 -36
- package/dist/esm/persona.d.ts.map +1 -1
- package/dist/esm/persona.js +308 -26
- package/dist/esm/shared/errors.d.ts +5 -1
- package/dist/esm/shared/errors.d.ts.map +1 -1
- package/dist/esm/shared/errors.js +4 -0
- package/dist/esm/types.d.ts +18 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/world/client.js +2 -2
- package/dist/esm/world/errors.js +1 -1
- package/dist/esm/world/index.js +5 -5
- package/dist/esm/world/world-domain.js +3 -3
- package/dist/esm/world/world-persona.d.ts +20 -5
- package/dist/esm/world/world-persona.d.ts.map +1 -1
- package/dist/esm/world/world-persona.js +23 -7
- package/dist/esm/world/world.d.ts +23 -3
- package/dist/esm/world/world.d.ts.map +1 -1
- package/dist/esm/world/world.js +27 -4
- package/package.json +3 -3
- package/dist/cjs/defaults/persona.json +0 -17
- package/dist/esm/defaults/persona.json +0 -17
|
@@ -2,7 +2,7 @@ import { type ApiClient } from './client';
|
|
|
2
2
|
import { World } from './world-domain';
|
|
3
3
|
import { MolrooPersona } from '../persona';
|
|
4
4
|
import type { PersonaSummary } from '../persona';
|
|
5
|
-
import type {
|
|
5
|
+
import type { PersonaConfigData } from '../types';
|
|
6
6
|
import type { LLMInput } from '../llm/resolve';
|
|
7
7
|
import type { MemoryAdapter, RecallLimits } from '../memory/types';
|
|
8
8
|
import type { EventAdapter } from '../events/types';
|
|
@@ -18,8 +18,6 @@ export interface PersonaOptions {
|
|
|
18
18
|
memory?: MemoryAdapter;
|
|
19
19
|
recall?: RecallLimits;
|
|
20
20
|
events?: EventAdapter;
|
|
21
|
-
/** Appraisal generation mode for `chat()`. `'direct'` (default) generates raw appraisal vectors; `'event'` classifies into ontology events and converts server-side. */
|
|
22
|
-
appraisalMode?: AppraisalMode;
|
|
23
21
|
}
|
|
24
22
|
/**
|
|
25
23
|
* Unified entry point for the molroo SDK.
|
|
@@ -74,6 +72,28 @@ export declare class Molroo {
|
|
|
74
72
|
createPersona(personaConfig: PersonaConfigData, options?: PersonaOptions): Promise<MolrooPersona>;
|
|
75
73
|
/**
|
|
76
74
|
* Connect to an existing persona by ID.
|
|
75
|
+
*
|
|
76
|
+
* LLM adapter is optional. Without it, {@link MolrooPersona.chat | chat()} will throw,
|
|
77
|
+
* but emotion/state APIs ({@link MolrooPersona.hear | hear()},
|
|
78
|
+
* {@link MolrooPersona.getState | getState()},
|
|
79
|
+
* {@link MolrooPersona.getEngineState | getEngineState()},
|
|
80
|
+
* {@link MolrooPersona.perceive | perceive()},
|
|
81
|
+
* {@link MolrooPersona.tick | tick()}) work without LLM.
|
|
82
|
+
*
|
|
83
|
+
* This is the recommended pattern for hybrid apps that build their own prompts
|
|
84
|
+
* and only need SDK for emotion/psychological state computation.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* // Hybrid: emotion engine only (no LLM needed)
|
|
89
|
+
* const persona = await molroo.connectPersona('persona_abc123');
|
|
90
|
+
* const state = await persona.getEngineState(elapsed);
|
|
91
|
+
* const emotion = await persona.hear(userMessage, 'Alice');
|
|
92
|
+
*
|
|
93
|
+
* // Full: SDK handles everything (LLM required)
|
|
94
|
+
* const persona = await molroo.connectPersona('persona_abc123', { llm });
|
|
95
|
+
* const result = await persona.chat('Hello!');
|
|
96
|
+
* ```
|
|
77
97
|
*/
|
|
78
98
|
connectPersona(personaId: string, options?: PersonaOptions): Promise<MolrooPersona>;
|
|
79
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../../src/world/world.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../../src/world/world.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAiCjB,MAAM,WAAW,aAA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G;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC;IAwB9D;;OAEG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAmB1C;;;;;;OAMG;IACG,UAAU,CACd,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC;QAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CA6B/D"}
|
package/dist/cjs/world/world.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.Molroo = void 0;
|
|
|
5
5
|
const client_1 = require("./client");
|
|
6
6
|
const world_domain_1 = require("./world-domain");
|
|
7
7
|
const persona_1 = require("../persona");
|
|
8
|
+
const errors_1 = require("../shared/errors");
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
9
10
|
// Internal helper
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
@@ -56,7 +57,7 @@ class Molroo {
|
|
|
56
57
|
if (typeof input === 'string') {
|
|
57
58
|
// Description path - requires llm
|
|
58
59
|
if (!options?.llm) {
|
|
59
|
-
throw new
|
|
60
|
+
throw new errors_1.MolrooApiError('LLM adapter is required when using description string', errors_1.MolrooErrorCode.LLM_REQUIRED, 400);
|
|
60
61
|
}
|
|
61
62
|
return persona_1.MolrooPersona.create({ baseUrl: this._baseUrl, apiKey: this._apiKey, ...options, llm: options.llm }, input);
|
|
62
63
|
}
|
|
@@ -65,6 +66,28 @@ class Molroo {
|
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* Connect to an existing persona by ID.
|
|
69
|
+
*
|
|
70
|
+
* LLM adapter is optional. Without it, {@link MolrooPersona.chat | chat()} will throw,
|
|
71
|
+
* but emotion/state APIs ({@link MolrooPersona.hear | hear()},
|
|
72
|
+
* {@link MolrooPersona.getState | getState()},
|
|
73
|
+
* {@link MolrooPersona.getEngineState | getEngineState()},
|
|
74
|
+
* {@link MolrooPersona.perceive | perceive()},
|
|
75
|
+
* {@link MolrooPersona.tick | tick()}) work without LLM.
|
|
76
|
+
*
|
|
77
|
+
* This is the recommended pattern for hybrid apps that build their own prompts
|
|
78
|
+
* and only need SDK for emotion/psychological state computation.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* // Hybrid: emotion engine only (no LLM needed)
|
|
83
|
+
* const persona = await molroo.connectPersona('persona_abc123');
|
|
84
|
+
* const state = await persona.getEngineState(elapsed);
|
|
85
|
+
* const emotion = await persona.hear(userMessage, 'Alice');
|
|
86
|
+
*
|
|
87
|
+
* // Full: SDK handles everything (LLM required)
|
|
88
|
+
* const persona = await molroo.connectPersona('persona_abc123', { llm });
|
|
89
|
+
* const result = await persona.chat('Hello!');
|
|
90
|
+
* ```
|
|
68
91
|
*/
|
|
69
92
|
async connectPersona(personaId, options) {
|
|
70
93
|
return persona_1.MolrooPersona.connect({ baseUrl: this._baseUrl, apiKey: this._apiKey, ...options }, personaId);
|
package/dist/esm/api-client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MolrooApiError } from './errors';
|
|
2
|
-
import { createTypedClient, unwrap } from './shared/client-factory';
|
|
1
|
+
import { MolrooApiError } from './errors.js';
|
|
2
|
+
import { createTypedClient, unwrap } from './shared/client-factory.js';
|
|
3
3
|
/**
|
|
4
4
|
* Create a typed openapi-fetch client for the molroo API.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/defaults/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/defaults/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,eAAe,EAAE,iBAS7B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAenF"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export const DEFAULT_PERSONA = {
|
|
2
|
+
personality: { O: 0.5, C: 0.5, E: 0.5, A: 0.5, N: 0.5, H: 0.5 },
|
|
3
|
+
identity: {
|
|
4
|
+
name: 'Persona',
|
|
5
|
+
role: 'A person with a neutral, balanced personality.',
|
|
6
|
+
speakingStyle: 'Natural, conversational tone.',
|
|
7
|
+
coreValues: ['honesty', 'kindness'],
|
|
8
|
+
},
|
|
9
|
+
goals: [],
|
|
10
|
+
};
|
|
3
11
|
/**
|
|
4
12
|
* Merge user-provided persona config with defaults.
|
|
5
13
|
* User values take precedence; defaults fill missing fields.
|
package/dist/esm/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MolrooApiError, MolrooErrorCode } from './shared/errors';
|
|
1
|
+
export { MolrooApiError, MolrooErrorCode } from './shared/errors.js';
|
|
@@ -15,7 +15,7 @@ export interface SDKEvent {
|
|
|
15
15
|
payload?: Record<string, unknown>;
|
|
16
16
|
}
|
|
17
17
|
/** Event type categories. */
|
|
18
|
-
export type SDKEventType = 'emotion_changed' | 'memory_consolidated' | 'reflection_generated' | PersonaEventType;
|
|
18
|
+
export type SDKEventType = 'emotion_changed' | 'memory_consolidated' | 'reflection_generated' | 'pipeline_error' | PersonaEventType;
|
|
19
19
|
/** Persona-specific event types. */
|
|
20
20
|
export type PersonaEventType = 'chat' | 'perceive' | 'emotion_update' | 'state_change' | 'memory_created' | 'reflection_created';
|
|
21
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/events/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,KAAK,EAAE,QAAQ,GAA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-
import { GeneratePersonaSchema } from './schema';
|
|
2
|
-
import { buildSystemPrompt } from './prompt';
|
|
1
|
+
import { GeneratePersonaSchema } from './schema.js';
|
|
2
|
+
import { buildSystemPrompt } from './prompt.js';
|
|
3
3
|
/**
|
|
4
4
|
* Generate a structured persona from a natural language character description.
|
|
5
5
|
*
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -36,10 +36,10 @@ 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
|
-
export type { PersonaSummary, PersonaState, PersonaChatResult, } from './persona';
|
|
39
|
+
export type { PersonaSummary, PersonaState, PersonaChatResult, ReactInput, PersonaUpdate, } from './persona';
|
|
40
40
|
export { Conversation } from './persona/conversation';
|
|
41
41
|
export type { ConversationOptions } from './persona/conversation';
|
|
42
|
-
export type { AppraisalMode,
|
|
42
|
+
export type { AppraisalMode, InterlocutorContext, RelationshipContext, PerceiveOptions, PerceiveEvent, PerceiveContext, } from './types';
|
|
43
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';
|
|
44
44
|
export type { PersonaSnapshot, PersonaConfigData, PersonalityTraits, Identity, Goal, MotivationContext, } from './types';
|
|
45
45
|
export type { ApiResponse, ApiErrorResponse, PersonaDynamicState, } from './types';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;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EACrB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,GACd,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,aAAa,EACb,GAAG,EACH,QAAQ,EACR,eAAe,EACf,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACT,OAAO,EACP,YAAY,EACZ,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,IAAI,EACJ,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,SAAS,EACT,WAAW,GACZ,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
// ── Main exports ──
|
|
32
|
-
export { Molroo } from './world/world';
|
|
33
|
-
export { MolrooApiError, WorldApiError, MolrooErrorCode } from './shared/errors';
|
|
32
|
+
export { Molroo } from './world/world.js';
|
|
33
|
+
export { MolrooApiError, WorldApiError, MolrooErrorCode } from './shared/errors.js';
|
|
34
34
|
// ── Shared utilities ──
|
|
35
|
-
export { NEUTRAL_APPRAISAL, toWireAppraisal, fromWireAppraisal } from './shared/appraisal';
|
|
35
|
+
export { NEUTRAL_APPRAISAL, toWireAppraisal, fromWireAppraisal } from './shared/appraisal.js';
|
|
36
36
|
// ── Conversation ──
|
|
37
|
-
export { Conversation } from './persona/conversation';
|
|
37
|
+
export { Conversation } from './persona/conversation.js';
|
|
38
38
|
// ── Emotion labels (synced with engine/core) ──
|
|
39
|
-
export { EMOTION_LABELS } from './emotion';
|
|
39
|
+
export { EMOTION_LABELS } from './emotion.js';
|
|
40
40
|
// ── Defaults ──
|
|
41
|
-
export { DEFAULT_PERSONA, withDefaults } from './defaults';
|
|
41
|
+
export { DEFAULT_PERSONA, withDefaults } from './defaults/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/llm/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/llm/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAGxC,sDAAsD;AACtD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC;AAelD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAqBrE"}
|
package/dist/esm/llm/resolve.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { VercelAIAdapter } from './vercel-ai';
|
|
1
|
+
import { VercelAIAdapter } from './vercel-ai/index.js';
|
|
2
|
+
import { MolrooApiError, MolrooErrorCode } from '../shared/errors.js';
|
|
2
3
|
/**
|
|
3
4
|
* Check if input is a Vercel AI SDK provider instance.
|
|
4
5
|
* Provider instances have a `doGenerate` method.
|
|
@@ -25,5 +26,5 @@ export async function resolveLLM(input) {
|
|
|
25
26
|
if (isVercelProvider(input)) {
|
|
26
27
|
return new VercelAIAdapter({ provider: input });
|
|
27
28
|
}
|
|
28
|
-
throw new
|
|
29
|
+
throw new MolrooApiError('Invalid LLM input. Expected LLMAdapter or Vercel AI SDK provider instance.', MolrooErrorCode.API_ERROR, 400);
|
|
29
30
|
}
|
package/dist/esm/llm/schema.d.ts
CHANGED
|
@@ -18,43 +18,6 @@ export declare const AppraisalVectorSchema: z.ZodObject<{
|
|
|
18
18
|
adjustment_potential: z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>;
|
|
19
19
|
urgency: z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>;
|
|
20
20
|
}, z.core.$strip>;
|
|
21
|
-
export declare const EventAppraisalSchema: z.ZodObject<{
|
|
22
|
-
interaction_type: z.ZodEnum<{
|
|
23
|
-
chat: "chat";
|
|
24
|
-
inform: "inform";
|
|
25
|
-
humor: "humor";
|
|
26
|
-
express: "express";
|
|
27
|
-
goodbye: "goodbye";
|
|
28
|
-
}>;
|
|
29
|
-
event_type: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
praise: "praise";
|
|
31
|
-
criticism: "criticism";
|
|
32
|
-
support: "support";
|
|
33
|
-
rejection: "rejection";
|
|
34
|
-
apology: "apology";
|
|
35
|
-
request: "request";
|
|
36
|
-
betrayal: "betrayal";
|
|
37
|
-
neglect: "neglect";
|
|
38
|
-
}>>;
|
|
39
|
-
agent_role: z.ZodEnum<{
|
|
40
|
-
user: "user";
|
|
41
|
-
self: "self";
|
|
42
|
-
other: "other";
|
|
43
|
-
}>;
|
|
44
|
-
target_role: z.ZodEnum<{
|
|
45
|
-
user: "user";
|
|
46
|
-
self: "self";
|
|
47
|
-
other: "other";
|
|
48
|
-
}>;
|
|
49
|
-
relationship: z.ZodEnum<{
|
|
50
|
-
friend: "friend";
|
|
51
|
-
romantic: "romantic";
|
|
52
|
-
authority: "authority";
|
|
53
|
-
stranger: "stranger";
|
|
54
|
-
}>;
|
|
55
|
-
intensity: z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
export type EventAppraisalOutput = z.infer<typeof EventAppraisalSchema>;
|
|
58
21
|
/**
|
|
59
22
|
* Full LLM response schema — response text + appraisal vector.
|
|
60
23
|
*/
|
|
@@ -73,44 +36,6 @@ export declare const LLMResponseSchema: z.ZodObject<{
|
|
|
73
36
|
}, z.core.$strip>;
|
|
74
37
|
}, z.core.$strip>;
|
|
75
38
|
export type LLMResponseOutput = z.infer<typeof LLMResponseSchema>;
|
|
76
|
-
export declare const LLMEventResponseSchema: z.ZodObject<{
|
|
77
|
-
response: z.ZodString;
|
|
78
|
-
interaction_type: z.ZodEnum<{
|
|
79
|
-
chat: "chat";
|
|
80
|
-
inform: "inform";
|
|
81
|
-
humor: "humor";
|
|
82
|
-
express: "express";
|
|
83
|
-
goodbye: "goodbye";
|
|
84
|
-
}>;
|
|
85
|
-
event_type: z.ZodOptional<z.ZodEnum<{
|
|
86
|
-
praise: "praise";
|
|
87
|
-
criticism: "criticism";
|
|
88
|
-
support: "support";
|
|
89
|
-
rejection: "rejection";
|
|
90
|
-
apology: "apology";
|
|
91
|
-
request: "request";
|
|
92
|
-
betrayal: "betrayal";
|
|
93
|
-
neglect: "neglect";
|
|
94
|
-
}>>;
|
|
95
|
-
agent_role: z.ZodEnum<{
|
|
96
|
-
user: "user";
|
|
97
|
-
self: "self";
|
|
98
|
-
other: "other";
|
|
99
|
-
}>;
|
|
100
|
-
target_role: z.ZodEnum<{
|
|
101
|
-
user: "user";
|
|
102
|
-
self: "self";
|
|
103
|
-
other: "other";
|
|
104
|
-
}>;
|
|
105
|
-
relationship: z.ZodEnum<{
|
|
106
|
-
friend: "friend";
|
|
107
|
-
romantic: "romantic";
|
|
108
|
-
authority: "authority";
|
|
109
|
-
stranger: "stranger";
|
|
110
|
-
}>;
|
|
111
|
-
intensity: z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
export type LLMEventResponseOutput = z.infer<typeof LLMEventResponseSchema>;
|
|
114
39
|
/**
|
|
115
40
|
* Tool-use aware LLM response schema.
|
|
116
41
|
* The LLM can either produce a normal response or request a memory search.
|
|
@@ -132,43 +57,4 @@ export declare const LLMResponseWithToolsSchema: z.ZodObject<{
|
|
|
132
57
|
search_memory: z.ZodOptional<z.ZodString>;
|
|
133
58
|
}, z.core.$strip>;
|
|
134
59
|
export type LLMResponseWithToolsOutput = z.infer<typeof LLMResponseWithToolsSchema>;
|
|
135
|
-
export declare const LLMEventResponseWithToolsSchema: z.ZodObject<{
|
|
136
|
-
response: z.ZodString;
|
|
137
|
-
interaction_type: z.ZodEnum<{
|
|
138
|
-
chat: "chat";
|
|
139
|
-
inform: "inform";
|
|
140
|
-
humor: "humor";
|
|
141
|
-
express: "express";
|
|
142
|
-
goodbye: "goodbye";
|
|
143
|
-
}>;
|
|
144
|
-
event_type: z.ZodOptional<z.ZodEnum<{
|
|
145
|
-
praise: "praise";
|
|
146
|
-
criticism: "criticism";
|
|
147
|
-
support: "support";
|
|
148
|
-
rejection: "rejection";
|
|
149
|
-
apology: "apology";
|
|
150
|
-
request: "request";
|
|
151
|
-
betrayal: "betrayal";
|
|
152
|
-
neglect: "neglect";
|
|
153
|
-
}>>;
|
|
154
|
-
agent_role: z.ZodEnum<{
|
|
155
|
-
user: "user";
|
|
156
|
-
self: "self";
|
|
157
|
-
other: "other";
|
|
158
|
-
}>;
|
|
159
|
-
target_role: z.ZodEnum<{
|
|
160
|
-
user: "user";
|
|
161
|
-
self: "self";
|
|
162
|
-
other: "other";
|
|
163
|
-
}>;
|
|
164
|
-
relationship: z.ZodEnum<{
|
|
165
|
-
friend: "friend";
|
|
166
|
-
romantic: "romantic";
|
|
167
|
-
authority: "authority";
|
|
168
|
-
stranger: "stranger";
|
|
169
|
-
}>;
|
|
170
|
-
intensity: z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>;
|
|
171
|
-
search_memory: z.ZodOptional<z.ZodString>;
|
|
172
|
-
}, z.core.$strip>;
|
|
173
|
-
export type LLMEventResponseWithToolsOutput = z.infer<typeof LLMEventResponseWithToolsSchema>;
|
|
174
60
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/llm/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/llm/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAuDhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAK5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAarC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/esm/llm/schema.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
// Ontology constants inlined from @molroo-io/core (private package).
|
|
3
|
-
// These must stay in sync with engine/core/src/modules/ontology/types.ts.
|
|
4
|
-
const INTERACTION_TYPES = ['chat', 'inform', 'humor', 'express', 'goodbye'];
|
|
5
|
-
const EVENT_TYPES = [
|
|
6
|
-
'praise', 'criticism', 'support', 'rejection',
|
|
7
|
-
'apology', 'request', 'betrayal', 'neglect',
|
|
8
|
-
];
|
|
9
|
-
const AGENT_ROLES = ['user', 'self', 'other'];
|
|
10
|
-
const TARGET_ROLES = ['user', 'self', 'other'];
|
|
11
|
-
const RELATIONSHIP_TYPES = ['friend', 'romantic', 'authority', 'stranger'];
|
|
12
2
|
/** Clamp a number to [lo, hi]. */
|
|
13
3
|
const clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));
|
|
14
4
|
/**
|
|
@@ -57,17 +47,6 @@ export const AppraisalVectorSchema = z.object({
|
|
|
57
47
|
.describe('How much time pressure or immediate action is needed? 0: settled/past event/no rush, 0.5: moderate, 1: immediate action required/acute emergency. For past losses: low. For active threats: high. Use 0-1 range.')
|
|
58
48
|
.transform((v) => clamp(v, 0, 1)),
|
|
59
49
|
});
|
|
60
|
-
export const EventAppraisalSchema = z.object({
|
|
61
|
-
interaction_type: z.enum(INTERACTION_TYPES).describe('Conversation mode: chat (small talk), inform (sharing info/news), humor (jokes), express (emotional/relational event), goodbye (farewell).'),
|
|
62
|
-
event_type: z.enum(EVENT_TYPES).optional().describe('Relationship event type. Required when interaction_type is "express". Omit for chat/inform/humor/goodbye. One of: praise, criticism, support, rejection, apology, request, betrayal, neglect.'),
|
|
63
|
-
agent_role: z.enum(AGENT_ROLES).describe('Primary role responsible for the event from the persona perspective: user, self, or other.'),
|
|
64
|
-
target_role: z.enum(TARGET_ROLES).describe('Who is affected by or receives the event: self (persona), user (conversation partner), or other (third party).'),
|
|
65
|
-
relationship: z.enum(RELATIONSHIP_TYPES).describe('Relationship context for this event: friend, romantic, authority, or stranger.'),
|
|
66
|
-
intensity: z
|
|
67
|
-
.number()
|
|
68
|
-
.describe('Impact strength from 0 to 1.5. Use 1.0 for a normal event and >1.0 for unusually strong events.')
|
|
69
|
-
.transform((v) => clamp(v, 0, 1.5)),
|
|
70
|
-
});
|
|
71
50
|
/**
|
|
72
51
|
* Full LLM response schema — response text + appraisal vector.
|
|
73
52
|
*/
|
|
@@ -75,15 +54,6 @@ export const LLMResponseSchema = z.object({
|
|
|
75
54
|
response: z.string().describe('Response message from persona to user'),
|
|
76
55
|
appraisal: AppraisalVectorSchema.describe("Scherer 9-dimensional emotion appraisal of user input from persona's perspective"),
|
|
77
56
|
});
|
|
78
|
-
export const LLMEventResponseSchema = z.object({
|
|
79
|
-
response: z.string().describe('Response message from persona to user'),
|
|
80
|
-
interaction_type: EventAppraisalSchema.shape.interaction_type,
|
|
81
|
-
event_type: EventAppraisalSchema.shape.event_type,
|
|
82
|
-
agent_role: EventAppraisalSchema.shape.agent_role,
|
|
83
|
-
target_role: EventAppraisalSchema.shape.target_role,
|
|
84
|
-
relationship: EventAppraisalSchema.shape.relationship,
|
|
85
|
-
intensity: EventAppraisalSchema.shape.intensity,
|
|
86
|
-
});
|
|
87
57
|
/**
|
|
88
58
|
* Tool-use aware LLM response schema.
|
|
89
59
|
* The LLM can either produce a normal response or request a memory search.
|
|
@@ -97,16 +67,3 @@ export const LLMResponseWithToolsSchema = z.object({
|
|
|
97
67
|
.optional()
|
|
98
68
|
.describe('If you need to recall a specific memory before responding, set this to your search query. Leave empty/omit when you can respond without searching.'),
|
|
99
69
|
});
|
|
100
|
-
export const LLMEventResponseWithToolsSchema = z.object({
|
|
101
|
-
response: z.string().describe('Response message from persona to user. Set to empty string "" if you need to search memory first.'),
|
|
102
|
-
interaction_type: EventAppraisalSchema.shape.interaction_type,
|
|
103
|
-
event_type: EventAppraisalSchema.shape.event_type,
|
|
104
|
-
agent_role: EventAppraisalSchema.shape.agent_role,
|
|
105
|
-
target_role: EventAppraisalSchema.shape.target_role,
|
|
106
|
-
relationship: EventAppraisalSchema.shape.relationship,
|
|
107
|
-
intensity: EventAppraisalSchema.shape.intensity,
|
|
108
|
-
search_memory: z
|
|
109
|
-
.string()
|
|
110
|
-
.optional()
|
|
111
|
-
.describe('If you need to recall a specific memory before responding, set this to your search query. Leave empty/omit when you can respond without searching.'),
|
|
112
|
-
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* All external dependencies are injected via ChatOrchestratorDeps.
|
|
6
6
|
*/
|
|
7
7
|
import type { LLMAdapter, Message } from '../llm/adapter';
|
|
8
|
-
import type { AgentResponse,
|
|
8
|
+
import type { AgentResponse, InterlocutorContext, PerceiveOptions } from '../types';
|
|
9
9
|
import type { RecallLimits } from '../memory/types';
|
|
10
10
|
import type { MemoryAdapter } from '../memory/types';
|
|
11
11
|
import type { EventAdapter } from '../events/types';
|
|
@@ -21,14 +21,29 @@ export interface ChatOrchestratorDeps {
|
|
|
21
21
|
memoryAdapter: MemoryAdapter | null;
|
|
22
22
|
memoryRecallConfig: RecallLimits | undefined;
|
|
23
23
|
events: EventAdapter | null;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
getPromptContext: (options?: {
|
|
25
|
+
consumerSuffix?: string;
|
|
26
|
+
sourceEntity?: string;
|
|
27
|
+
consumerRules?: string;
|
|
28
|
+
consumerExamples?: string;
|
|
29
|
+
}) => Promise<PromptContextResult>;
|
|
26
30
|
perceive: (message: string, options?: PerceiveOptions) => Promise<AgentResponse>;
|
|
27
31
|
}
|
|
28
32
|
export interface ChatOptions {
|
|
29
33
|
from?: string | InterlocutorContext;
|
|
30
34
|
history?: Message[];
|
|
35
|
+
/** Free-form app-specific context appended to the system prompt as-is. */
|
|
31
36
|
consumerSuffix?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Behavioral constraints and absolute rules for this conversation.
|
|
39
|
+
* Examples: "Never break character", "Always respond in Korean".
|
|
40
|
+
*/
|
|
41
|
+
consumerRules?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Few-shot example messages that demonstrate the desired style or behavior.
|
|
44
|
+
* Used to guide the LLM's tone and response format.
|
|
45
|
+
*/
|
|
46
|
+
consumerExamples?: string;
|
|
32
47
|
onToolCall?: (call: {
|
|
33
48
|
name: string;
|
|
34
49
|
args: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/persona/chat-orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACV,aAAa,
|
|
1
|
+
{"version":3,"file":"chat-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/persona/chat-orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACV,aAAa,EAGb,mBAAmB,EACnB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4CpD,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,UAAU,CAAC;IAChB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,kBAAkB,EAAE,YAAY,G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