@molroo-io/sdk 0.6.2 → 0.7.1
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/README.md +100 -194
- package/dist/cjs/api-client.d.ts +2 -12
- package/dist/cjs/api-client.d.ts.map +1 -1
- package/dist/cjs/api-client.js +4 -42
- package/dist/cjs/errors.d.ts +1 -16
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/errors.js +2 -18
- package/dist/cjs/events/types.d.ts +14 -21
- package/dist/cjs/events/types.d.ts.map +1 -1
- package/dist/cjs/events/types.js +0 -11
- package/dist/cjs/index.d.ts +26 -48
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +29 -52
- package/dist/cjs/llm/resolve.d.ts +4 -22
- package/dist/cjs/llm/resolve.d.ts.map +1 -1
- package/dist/cjs/llm/resolve.js +19 -7
- package/dist/cjs/llm/vercel-ai/adapter.d.ts +4 -10
- package/dist/cjs/llm/vercel-ai/adapter.d.ts.map +1 -1
- package/dist/cjs/llm/vercel-ai/adapter.js +6 -152
- package/dist/cjs/llm/vercel-ai/config.d.ts +8 -5
- package/dist/cjs/llm/vercel-ai/config.d.ts.map +1 -1
- package/dist/cjs/memory/in-memory.d.ts +14 -37
- package/dist/cjs/memory/in-memory.d.ts.map +1 -1
- package/dist/cjs/memory/in-memory.js +22 -85
- package/dist/cjs/memory/recall.d.ts +10 -21
- package/dist/cjs/memory/recall.d.ts.map +1 -1
- package/dist/cjs/memory/recall.js +12 -91
- package/dist/cjs/memory/types.d.ts +46 -186
- package/dist/cjs/memory/types.d.ts.map +1 -1
- package/dist/cjs/memory/types.js +0 -10
- package/dist/cjs/persona/chat-orchestrator.d.ts +46 -0
- package/dist/cjs/persona/chat-orchestrator.d.ts.map +1 -0
- package/dist/cjs/persona/chat-orchestrator.js +240 -0
- package/dist/cjs/persona/event-emitter.d.ts +7 -0
- package/dist/cjs/persona/event-emitter.d.ts.map +1 -0
- package/dist/cjs/persona/event-emitter.js +53 -0
- package/dist/cjs/persona/memory-pipeline.d.ts +26 -0
- package/dist/cjs/persona/memory-pipeline.d.ts.map +1 -0
- package/dist/cjs/persona/memory-pipeline.js +69 -0
- package/dist/cjs/persona.d.ts +56 -187
- package/dist/cjs/persona.d.ts.map +1 -1
- package/dist/cjs/persona.js +62 -638
- package/dist/cjs/shared/appraisal.d.ts +26 -0
- package/dist/cjs/shared/appraisal.d.ts.map +1 -0
- package/dist/cjs/shared/appraisal.js +45 -0
- package/dist/cjs/shared/client-factory.d.ts +23 -0
- package/dist/cjs/shared/client-factory.d.ts.map +1 -0
- package/dist/cjs/shared/client-factory.js +48 -0
- package/dist/cjs/shared/errors.d.ts +21 -0
- package/dist/cjs/shared/errors.d.ts.map +1 -0
- package/dist/cjs/shared/errors.js +29 -0
- package/dist/cjs/world/client.d.ts +2 -9
- package/dist/cjs/world/client.d.ts.map +1 -1
- package/dist/cjs/world/client.js +7 -34
- package/dist/cjs/world/errors.d.ts +1 -8
- package/dist/cjs/world/errors.d.ts.map +1 -1
- package/dist/cjs/world/errors.js +2 -12
- package/dist/cjs/world/index.d.ts +2 -2
- package/dist/cjs/world/index.d.ts.map +1 -1
- package/dist/cjs/world/types.d.ts +32 -5
- package/dist/cjs/world/types.d.ts.map +1 -1
- package/dist/cjs/world/world-domain.d.ts.map +1 -1
- package/dist/cjs/world/world-domain.js +4 -32
- package/dist/cjs/world/world-persona.d.ts +17 -12
- package/dist/cjs/world/world-persona.d.ts.map +1 -1
- package/dist/cjs/world/world-persona.js +6 -18
- package/dist/cjs/world/world.d.ts +28 -5
- package/dist/cjs/world/world.d.ts.map +1 -1
- package/dist/cjs/world/world.js +13 -11
- package/dist/esm/api-client.d.ts +2 -12
- package/dist/esm/api-client.d.ts.map +1 -1
- package/dist/esm/api-client.js +3 -38
- package/dist/esm/errors.d.ts +1 -16
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/errors.js +1 -17
- package/dist/esm/events/types.d.ts +14 -21
- package/dist/esm/events/types.d.ts.map +1 -1
- package/dist/esm/events/types.js +0 -11
- package/dist/esm/index.d.ts +26 -48
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +25 -38
- package/dist/esm/llm/resolve.d.ts +4 -22
- package/dist/esm/llm/resolve.d.ts.map +1 -1
- package/dist/esm/llm/resolve.js +20 -8
- package/dist/esm/llm/vercel-ai/adapter.d.ts +4 -10
- package/dist/esm/llm/vercel-ai/adapter.d.ts.map +1 -1
- package/dist/esm/llm/vercel-ai/adapter.js +6 -119
- package/dist/esm/llm/vercel-ai/config.d.ts +8 -5
- package/dist/esm/llm/vercel-ai/config.d.ts.map +1 -1
- package/dist/esm/memory/in-memory.d.ts +14 -37
- package/dist/esm/memory/in-memory.d.ts.map +1 -1
- package/dist/esm/memory/in-memory.js +20 -83
- package/dist/esm/memory/recall.d.ts +10 -21
- package/dist/esm/memory/recall.d.ts.map +1 -1
- package/dist/esm/memory/recall.js +12 -91
- package/dist/esm/memory/types.d.ts +46 -186
- package/dist/esm/memory/types.d.ts.map +1 -1
- package/dist/esm/memory/types.js +1 -9
- package/dist/esm/persona/chat-orchestrator.d.ts +46 -0
- package/dist/esm/persona/chat-orchestrator.d.ts.map +1 -0
- package/dist/esm/persona/chat-orchestrator.js +204 -0
- package/dist/esm/persona/event-emitter.d.ts +7 -0
- package/dist/esm/persona/event-emitter.d.ts.map +1 -0
- package/dist/esm/persona/event-emitter.js +50 -0
- package/dist/esm/persona/memory-pipeline.d.ts +26 -0
- package/dist/esm/persona/memory-pipeline.d.ts.map +1 -0
- package/dist/esm/persona/memory-pipeline.js +65 -0
- package/dist/esm/persona.d.ts +56 -187
- package/dist/esm/persona.d.ts.map +1 -1
- package/dist/esm/persona.js +62 -638
- package/dist/esm/shared/appraisal.d.ts +26 -0
- package/dist/esm/shared/appraisal.d.ts.map +1 -0
- package/dist/esm/shared/appraisal.js +40 -0
- package/dist/esm/shared/client-factory.d.ts +23 -0
- package/dist/esm/shared/client-factory.d.ts.map +1 -0
- package/dist/esm/shared/client-factory.js +41 -0
- package/dist/esm/shared/errors.d.ts +21 -0
- package/dist/esm/shared/errors.d.ts.map +1 -0
- package/dist/esm/shared/errors.js +24 -0
- package/dist/esm/world/client.d.ts +2 -9
- package/dist/esm/world/client.d.ts.map +1 -1
- package/dist/esm/world/client.js +6 -30
- package/dist/esm/world/errors.d.ts +1 -8
- package/dist/esm/world/errors.d.ts.map +1 -1
- package/dist/esm/world/errors.js +1 -11
- package/dist/esm/world/index.d.ts +2 -2
- package/dist/esm/world/index.d.ts.map +1 -1
- package/dist/esm/world/types.d.ts +32 -5
- package/dist/esm/world/types.d.ts.map +1 -1
- package/dist/esm/world/world-domain.d.ts.map +1 -1
- package/dist/esm/world/world-domain.js +4 -32
- package/dist/esm/world/world-persona.d.ts +17 -12
- package/dist/esm/world/world-persona.d.ts.map +1 -1
- package/dist/esm/world/world-persona.js +6 -18
- package/dist/esm/world/world.d.ts +28 -5
- package/dist/esm/world/world.d.ts.map +1 -1
- package/dist/esm/world/world.js +13 -11
- package/package.json +4 -101
- package/dist/cjs/embedding/cloudflare.d.ts +0 -15
- package/dist/cjs/embedding/cloudflare.d.ts.map +0 -1
- package/dist/cjs/embedding/cloudflare.js +0 -16
- package/dist/cjs/embedding/cohere.d.ts +0 -8
- package/dist/cjs/embedding/cohere.d.ts.map +0 -1
- package/dist/cjs/embedding/cohere.js +0 -31
- package/dist/cjs/embedding/index.d.ts +0 -9
- package/dist/cjs/embedding/index.d.ts.map +0 -1
- package/dist/cjs/embedding/index.js +0 -11
- package/dist/cjs/embedding/local.d.ts +0 -6
- package/dist/cjs/embedding/local.d.ts.map +0 -1
- package/dist/cjs/embedding/local.js +0 -28
- package/dist/cjs/embedding/openai.d.ts +0 -9
- package/dist/cjs/embedding/openai.d.ts.map +0 -1
- package/dist/cjs/embedding/openai.js +0 -26
- package/dist/cjs/events/console.d.ts +0 -25
- package/dist/cjs/events/console.d.ts.map +0 -1
- package/dist/cjs/events/console.js +0 -41
- package/dist/cjs/events/webhook.d.ts +0 -30
- package/dist/cjs/events/webhook.d.ts.map +0 -1
- package/dist/cjs/events/webhook.js +0 -79
- package/dist/cjs/memory/cloudflare/index.d.ts +0 -3
- package/dist/cjs/memory/cloudflare/index.d.ts.map +0 -1
- package/dist/cjs/memory/cloudflare/index.js +0 -5
- package/dist/cjs/memory/cloudflare/vectorize.d.ts +0 -62
- package/dist/cjs/memory/cloudflare/vectorize.d.ts.map +0 -1
- package/dist/cjs/memory/cloudflare/vectorize.js +0 -55
- package/dist/cjs/memory/in-memory-semantic.d.ts +0 -16
- package/dist/cjs/memory/in-memory-semantic.d.ts.map +0 -1
- package/dist/cjs/memory/in-memory-semantic.js +0 -57
- package/dist/cjs/memory/pinecone/index.d.ts +0 -7
- package/dist/cjs/memory/pinecone/index.d.ts.map +0 -1
- package/dist/cjs/memory/pinecone/index.js +0 -8
- package/dist/cjs/memory/pinecone/memory-adapter.d.ts +0 -62
- package/dist/cjs/memory/pinecone/memory-adapter.d.ts.map +0 -1
- package/dist/cjs/memory/pinecone/memory-adapter.js +0 -220
- package/dist/cjs/memory/pinecone/semantic.d.ts +0 -44
- package/dist/cjs/memory/pinecone/semantic.d.ts.map +0 -1
- package/dist/cjs/memory/pinecone/semantic.js +0 -90
- package/dist/cjs/memory/sqlite/index.d.ts +0 -3
- package/dist/cjs/memory/sqlite/index.d.ts.map +0 -1
- package/dist/cjs/memory/sqlite/index.js +0 -5
- package/dist/cjs/memory/sqlite/memory-adapter.d.ts +0 -58
- package/dist/cjs/memory/sqlite/memory-adapter.d.ts.map +0 -1
- package/dist/cjs/memory/sqlite/memory-adapter.js +0 -336
- package/dist/cjs/memory/sqlite/schema.d.ts +0 -4
- package/dist/cjs/memory/sqlite/schema.d.ts.map +0 -1
- package/dist/cjs/memory/sqlite/schema.js +0 -91
- package/dist/cjs/memory/supabase/index.d.ts +0 -7
- package/dist/cjs/memory/supabase/index.d.ts.map +0 -1
- package/dist/cjs/memory/supabase/index.js +0 -8
- package/dist/cjs/memory/supabase/memory-adapter.d.ts +0 -67
- package/dist/cjs/memory/supabase/memory-adapter.d.ts.map +0 -1
- package/dist/cjs/memory/supabase/memory-adapter.js +0 -335
- package/dist/cjs/memory/supabase/semantic.d.ts +0 -44
- package/dist/cjs/memory/supabase/semantic.d.ts.map +0 -1
- package/dist/cjs/memory/supabase/semantic.js +0 -72
- package/dist/esm/embedding/cloudflare.d.ts +0 -15
- package/dist/esm/embedding/cloudflare.d.ts.map +0 -1
- package/dist/esm/embedding/cloudflare.js +0 -13
- package/dist/esm/embedding/cohere.d.ts +0 -8
- package/dist/esm/embedding/cohere.d.ts.map +0 -1
- package/dist/esm/embedding/cohere.js +0 -28
- package/dist/esm/embedding/index.d.ts +0 -9
- package/dist/esm/embedding/index.d.ts.map +0 -1
- package/dist/esm/embedding/index.js +0 -4
- package/dist/esm/embedding/local.d.ts +0 -6
- package/dist/esm/embedding/local.d.ts.map +0 -1
- package/dist/esm/embedding/local.js +0 -25
- package/dist/esm/embedding/openai.d.ts +0 -9
- package/dist/esm/embedding/openai.d.ts.map +0 -1
- package/dist/esm/embedding/openai.js +0 -23
- package/dist/esm/events/console.d.ts +0 -25
- package/dist/esm/events/console.d.ts.map +0 -1
- package/dist/esm/events/console.js +0 -37
- package/dist/esm/events/webhook.d.ts +0 -30
- package/dist/esm/events/webhook.d.ts.map +0 -1
- package/dist/esm/events/webhook.js +0 -75
- package/dist/esm/memory/cloudflare/index.d.ts +0 -3
- package/dist/esm/memory/cloudflare/index.d.ts.map +0 -1
- package/dist/esm/memory/cloudflare/index.js +0 -1
- package/dist/esm/memory/cloudflare/vectorize.d.ts +0 -62
- package/dist/esm/memory/cloudflare/vectorize.d.ts.map +0 -1
- package/dist/esm/memory/cloudflare/vectorize.js +0 -51
- package/dist/esm/memory/in-memory-semantic.d.ts +0 -16
- package/dist/esm/memory/in-memory-semantic.d.ts.map +0 -1
- package/dist/esm/memory/in-memory-semantic.js +0 -53
- package/dist/esm/memory/pinecone/index.d.ts +0 -7
- package/dist/esm/memory/pinecone/index.d.ts.map +0 -1
- package/dist/esm/memory/pinecone/index.js +0 -3
- package/dist/esm/memory/pinecone/memory-adapter.d.ts +0 -62
- package/dist/esm/memory/pinecone/memory-adapter.d.ts.map +0 -1
- package/dist/esm/memory/pinecone/memory-adapter.js +0 -216
- package/dist/esm/memory/pinecone/semantic.d.ts +0 -44
- package/dist/esm/memory/pinecone/semantic.d.ts.map +0 -1
- package/dist/esm/memory/pinecone/semantic.js +0 -86
- package/dist/esm/memory/sqlite/index.d.ts +0 -3
- package/dist/esm/memory/sqlite/index.d.ts.map +0 -1
- package/dist/esm/memory/sqlite/index.js +0 -1
- package/dist/esm/memory/sqlite/memory-adapter.d.ts +0 -58
- package/dist/esm/memory/sqlite/memory-adapter.d.ts.map +0 -1
- package/dist/esm/memory/sqlite/memory-adapter.js +0 -296
- package/dist/esm/memory/sqlite/schema.d.ts +0 -4
- package/dist/esm/memory/sqlite/schema.d.ts.map +0 -1
- package/dist/esm/memory/sqlite/schema.js +0 -86
- package/dist/esm/memory/supabase/index.d.ts +0 -7
- package/dist/esm/memory/supabase/index.d.ts.map +0 -1
- package/dist/esm/memory/supabase/index.js +0 -3
- package/dist/esm/memory/supabase/memory-adapter.d.ts +0 -67
- package/dist/esm/memory/supabase/memory-adapter.d.ts.map +0 -1
- package/dist/esm/memory/supabase/memory-adapter.js +0 -331
- package/dist/esm/memory/supabase/semantic.d.ts +0 -44
- package/dist/esm/memory/supabase/semantic.d.ts.map +0 -1
- package/dist/esm/memory/supabase/semantic.js +0 -68
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared appraisal conversion utilities.
|
|
3
|
+
*
|
|
4
|
+
* The World SDK uses camelCase AppraisalVector (now called Appraisal),
|
|
5
|
+
* while the API wire format uses snake_case. These helpers convert between them.
|
|
6
|
+
*/
|
|
7
|
+
import type { AppraisalVector as WireAppraisal } from '../types';
|
|
8
|
+
/** camelCase appraisal shape used by World SDK. */
|
|
9
|
+
export interface Appraisal {
|
|
10
|
+
goalRelevance: number;
|
|
11
|
+
goalCongruence: number;
|
|
12
|
+
expectedness: number;
|
|
13
|
+
controllability: number;
|
|
14
|
+
agency: number;
|
|
15
|
+
normCompatibility: number;
|
|
16
|
+
internalStandards: number;
|
|
17
|
+
adjustmentPotential: number;
|
|
18
|
+
urgency: number;
|
|
19
|
+
}
|
|
20
|
+
/** Convert camelCase Appraisal → snake_case wire format. */
|
|
21
|
+
export declare function toWireAppraisal(v: Appraisal): WireAppraisal;
|
|
22
|
+
/** Convert snake_case wire format → camelCase Appraisal. */
|
|
23
|
+
export declare function fromWireAppraisal(raw: Record<string, number>): Appraisal;
|
|
24
|
+
/** Neutral appraisal vector (all dimensions at baseline). */
|
|
25
|
+
export declare const NEUTRAL_APPRAISAL: WireAppraisal;
|
|
26
|
+
//# sourceMappingURL=appraisal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appraisal.d.ts","sourceRoot":"","sources":["../../../src/shared/appraisal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,eAAe,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjE,mDAAmD;AACnD,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,GAAG,aAAa,CAY3D;AAED,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAYxE;AAED,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,EAAE,aAU9B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NEUTRAL_APPRAISAL = void 0;
|
|
4
|
+
exports.toWireAppraisal = toWireAppraisal;
|
|
5
|
+
exports.fromWireAppraisal = fromWireAppraisal;
|
|
6
|
+
/** Convert camelCase Appraisal → snake_case wire format. */
|
|
7
|
+
function toWireAppraisal(v) {
|
|
8
|
+
return {
|
|
9
|
+
goal_relevance: v.goalRelevance,
|
|
10
|
+
goal_congruence: v.goalCongruence,
|
|
11
|
+
expectedness: v.expectedness,
|
|
12
|
+
controllability: v.controllability,
|
|
13
|
+
agency: v.agency,
|
|
14
|
+
norm_compatibility: v.normCompatibility,
|
|
15
|
+
internal_standards: v.internalStandards,
|
|
16
|
+
adjustment_potential: v.adjustmentPotential,
|
|
17
|
+
urgency: v.urgency,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Convert snake_case wire format → camelCase Appraisal. */
|
|
21
|
+
function fromWireAppraisal(raw) {
|
|
22
|
+
return {
|
|
23
|
+
goalRelevance: raw.goal_relevance,
|
|
24
|
+
goalCongruence: raw.goal_congruence,
|
|
25
|
+
expectedness: raw.expectedness,
|
|
26
|
+
controllability: raw.controllability,
|
|
27
|
+
agency: raw.agency,
|
|
28
|
+
normCompatibility: raw.norm_compatibility,
|
|
29
|
+
internalStandards: raw.internal_standards,
|
|
30
|
+
adjustmentPotential: raw.adjustment_potential,
|
|
31
|
+
urgency: raw.urgency,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Neutral appraisal vector (all dimensions at baseline). */
|
|
35
|
+
exports.NEUTRAL_APPRAISAL = Object.freeze({
|
|
36
|
+
goal_relevance: 0,
|
|
37
|
+
goal_congruence: 0,
|
|
38
|
+
expectedness: 0.5,
|
|
39
|
+
controllability: 0.5,
|
|
40
|
+
agency: 0,
|
|
41
|
+
norm_compatibility: 0,
|
|
42
|
+
internal_standards: 0,
|
|
43
|
+
adjustment_potential: 0.5,
|
|
44
|
+
urgency: 0.5,
|
|
45
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MolrooApiError } from './errors';
|
|
2
|
+
type ErrorConstructor = new (message: string, code: string, status: number) => MolrooApiError;
|
|
3
|
+
/**
|
|
4
|
+
* Create a typed openapi-fetch client with error middleware.
|
|
5
|
+
*
|
|
6
|
+
* @param opts.baseUrl - API base URL (trailing slash is stripped).
|
|
7
|
+
* @param opts.apiKey - API key for authentication.
|
|
8
|
+
* @param opts.ErrorClass - Error class to throw on non-OK responses.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createTypedClient<Paths extends {}>(opts: {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
apiKey: string;
|
|
13
|
+
ErrorClass: ErrorConstructor;
|
|
14
|
+
}): import("openapi-fetch").Client<Paths, `${string}/${string}`>;
|
|
15
|
+
/**
|
|
16
|
+
* Unwrap the `{ result: T }` envelope from API responses.
|
|
17
|
+
* Returns an empty object cast to T when result is undefined.
|
|
18
|
+
*/
|
|
19
|
+
export declare function unwrap<T>(data: {
|
|
20
|
+
result?: unknown;
|
|
21
|
+
} | undefined): T;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=client-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/shared/client-factory.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,gBAAgB,GAAG,KAAK,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,cAAc,CAAC;AAE9F;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,EAAE,EAAE,IAAI,EAAE;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,gBAAgB,CAAC;CAC9B,gEAwBA;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAAG,CAAC,CAEnE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createTypedClient = createTypedClient;
|
|
7
|
+
exports.unwrap = unwrap;
|
|
8
|
+
/**
|
|
9
|
+
* Shared client factory for creating typed openapi-fetch clients.
|
|
10
|
+
*
|
|
11
|
+
* Both the Persona SDK and World SDK delegate to this module,
|
|
12
|
+
* eliminating duplicated error middleware and unwrap logic.
|
|
13
|
+
*/
|
|
14
|
+
const openapi_fetch_1 = __importDefault(require("openapi-fetch"));
|
|
15
|
+
/**
|
|
16
|
+
* Create a typed openapi-fetch client with error middleware.
|
|
17
|
+
*
|
|
18
|
+
* @param opts.baseUrl - API base URL (trailing slash is stripped).
|
|
19
|
+
* @param opts.apiKey - API key for authentication.
|
|
20
|
+
* @param opts.ErrorClass - Error class to throw on non-OK responses.
|
|
21
|
+
*/
|
|
22
|
+
function createTypedClient(opts) {
|
|
23
|
+
const errorMiddleware = {
|
|
24
|
+
async onResponse({ response }) {
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
const body = await response.clone().json().catch(() => ({}));
|
|
27
|
+
const err = body;
|
|
28
|
+
throw new opts.ErrorClass(err.error?.message ?? `API error ${response.status}`, err.error?.code ?? 'UNKNOWN', response.status);
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const client = (0, openapi_fetch_1.default)({
|
|
33
|
+
baseUrl: opts.baseUrl.replace(/\/$/, ''),
|
|
34
|
+
headers: {
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
|
+
'X-API-Key': opts.apiKey,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
client.use(errorMiddleware);
|
|
40
|
+
return client;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Unwrap the `{ result: T }` envelope from API responses.
|
|
44
|
+
* Returns an empty object cast to T when result is undefined.
|
|
45
|
+
*/
|
|
46
|
+
function unwrap(data) {
|
|
47
|
+
return (data?.result ?? {});
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified error hierarchy for the molroo SDK.
|
|
3
|
+
*
|
|
4
|
+
* `instanceof MolrooApiError` catches ALL API errors (persona + world).
|
|
5
|
+
* `instanceof WorldApiError` catches world-only errors.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MolrooApiError extends Error {
|
|
8
|
+
/** Machine-readable error code (e.g., 'ENTITY_NOT_FOUND', 'UNAUTHORIZED'). */
|
|
9
|
+
readonly code: string;
|
|
10
|
+
/** HTTP status code. */
|
|
11
|
+
readonly status: number;
|
|
12
|
+
constructor(message: string,
|
|
13
|
+
/** Machine-readable error code (e.g., 'ENTITY_NOT_FOUND', 'UNAUTHORIZED'). */
|
|
14
|
+
code: string,
|
|
15
|
+
/** HTTP status code. */
|
|
16
|
+
status: number);
|
|
17
|
+
}
|
|
18
|
+
export declare class WorldApiError extends MolrooApiError {
|
|
19
|
+
constructor(message: string, code: string, status: number);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/shared/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,cAAe,SAAQ,KAAK;IAGrC,8EAA8E;aAC9D,IAAI,EAAE,MAAM;IAC5B,wBAAwB;aACR,MAAM,EAAE,MAAM;gBAJ9B,OAAO,EAAE,MAAM;IACf,8EAA8E;IAC9D,IAAI,EAAE,MAAM;IAC5B,wBAAwB;IACR,MAAM,EAAE,MAAM;CAKjC;AAED,qBAAa,aAAc,SAAQ,cAAc;gBACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI1D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Unified error hierarchy for the molroo SDK.
|
|
4
|
+
*
|
|
5
|
+
* `instanceof MolrooApiError` catches ALL API errors (persona + world).
|
|
6
|
+
* `instanceof WorldApiError` catches world-only errors.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WorldApiError = exports.MolrooApiError = void 0;
|
|
10
|
+
class MolrooApiError extends Error {
|
|
11
|
+
constructor(message,
|
|
12
|
+
/** Machine-readable error code (e.g., 'ENTITY_NOT_FOUND', 'UNAUTHORIZED'). */
|
|
13
|
+
code,
|
|
14
|
+
/** HTTP status code. */
|
|
15
|
+
status) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.code = code;
|
|
18
|
+
this.status = status;
|
|
19
|
+
this.name = 'MolrooApiError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MolrooApiError = MolrooApiError;
|
|
23
|
+
class WorldApiError extends MolrooApiError {
|
|
24
|
+
constructor(message, code, status) {
|
|
25
|
+
super(message, code, status);
|
|
26
|
+
this.name = 'WorldApiError';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.WorldApiError = WorldApiError;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { paths } from '../generated/world-api';
|
|
2
|
+
import { unwrap } from '../shared/client-factory';
|
|
2
3
|
export interface WorldClientOptions {
|
|
3
4
|
baseUrl: string;
|
|
4
5
|
apiKey: string;
|
|
@@ -24,13 +25,5 @@ export interface WorldClientOptions {
|
|
|
24
25
|
export declare function createWorldClient(options: WorldClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
|
|
25
26
|
/** Type alias for the openapi-fetch client instance returned by createWorldClient. */
|
|
26
27
|
export type ApiClient = ReturnType<typeof createWorldClient>;
|
|
27
|
-
|
|
28
|
-
* Unwrap the `{ result: T }` envelope used by the World API.
|
|
29
|
-
* Returns an empty object cast to T when result is undefined.
|
|
30
|
-
*
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export declare function unwrap<T>(data: {
|
|
34
|
-
result?: unknown;
|
|
35
|
-
} | undefined): T;
|
|
28
|
+
export { unwrap };
|
|
36
29
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/world/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/world/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAqB,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,gEAM5D;AAED,sFAAsF;AACtF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/cjs/world/client.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unwrap = void 0;
|
|
6
4
|
exports.createWorldClient = createWorldClient;
|
|
7
|
-
exports.unwrap = unwrap;
|
|
8
|
-
const openapi_fetch_1 = __importDefault(require("openapi-fetch"));
|
|
9
5
|
const errors_1 = require("./errors");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
const errorMiddleware = {
|
|
14
|
-
async onResponse({ response }) {
|
|
15
|
-
if (!response.ok) {
|
|
16
|
-
const body = await response.clone().json().catch(() => ({}));
|
|
17
|
-
const err = body;
|
|
18
|
-
throw new errors_1.WorldApiError(err.error?.message ?? `API error ${response.status}`, err.error?.code ?? 'UNKNOWN', response.status);
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
};
|
|
6
|
+
const client_factory_1 = require("../shared/client-factory");
|
|
7
|
+
Object.defineProperty(exports, "unwrap", { enumerable: true, get: function () { return client_factory_1.unwrap; } });
|
|
22
8
|
/**
|
|
23
9
|
* Create a typed API client for the molroo World API.
|
|
24
10
|
*
|
|
@@ -38,22 +24,9 @@ const errorMiddleware = {
|
|
|
38
24
|
* ```
|
|
39
25
|
*/
|
|
40
26
|
function createWorldClient(options) {
|
|
41
|
-
|
|
42
|
-
baseUrl: options.baseUrl
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'X-API-Key': options.apiKey,
|
|
46
|
-
},
|
|
27
|
+
return (0, client_factory_1.createTypedClient)({
|
|
28
|
+
baseUrl: options.baseUrl,
|
|
29
|
+
apiKey: options.apiKey,
|
|
30
|
+
ErrorClass: errors_1.WorldApiError,
|
|
47
31
|
});
|
|
48
|
-
client.use(errorMiddleware);
|
|
49
|
-
return client;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Unwrap the `{ result: T }` envelope used by the World API.
|
|
53
|
-
* Returns an empty object cast to T when result is undefined.
|
|
54
|
-
*
|
|
55
|
-
* @internal
|
|
56
|
-
*/
|
|
57
|
-
function unwrap(data) {
|
|
58
|
-
return (data?.result ?? {});
|
|
59
32
|
}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Typed API error thrown by the World SDK client.
|
|
3
|
-
*/
|
|
4
|
-
export declare class WorldApiError extends Error {
|
|
5
|
-
readonly code: string;
|
|
6
|
-
readonly status: number;
|
|
7
|
-
constructor(message: string, code: string, status: number);
|
|
8
|
-
}
|
|
1
|
+
export { WorldApiError } from '../shared/errors';
|
|
9
2
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/world/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/world/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/cjs/world/errors.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WorldApiError = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
class WorldApiError extends Error {
|
|
8
|
-
constructor(message, code, status) {
|
|
9
|
-
super(message);
|
|
10
|
-
this.code = code;
|
|
11
|
-
this.status = status;
|
|
12
|
-
this.name = 'WorldApiError';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.WorldApiError = WorldApiError;
|
|
4
|
+
var errors_1 = require("../shared/errors");
|
|
5
|
+
Object.defineProperty(exports, "WorldApiError", { enumerable: true, get: function () { return errors_1.WorldApiError; } });
|
|
@@ -2,8 +2,8 @@ export { Molroo } from './world';
|
|
|
2
2
|
export type { MolrooOptions, PersonaOptions } from './world';
|
|
3
3
|
export { World } from './world-domain';
|
|
4
4
|
export { WorldPersona } from './world-persona';
|
|
5
|
-
export type { WorldPersonaOptions, WorldLLM, LLMMessage, ReactOptions, ReactResult, PersonaState, PersonaEmotion, PromptContext, PersonaDetail, } from './world-persona';
|
|
6
|
-
export type { WorldData, CreateWorldOptions, UpdateWorldOptions, PaginationOptions, AddPersonaOptions, WorldPersonaRef, AppraisalVector, CreateActionOptions, ActionData, ActionRef, EntityType, RelationshipEndpoint, SetRelationshipOptions, InteractOptions, InteractResult, EventEntry, } from './types';
|
|
5
|
+
export type { WorldPersonaOptions, WorldLLM, LLMMessage, ReactOptions, ReactResult, WorldPersonaState, PersonaState, PersonaEmotion, PromptContext, PersonaDetail, } from './world-persona';
|
|
6
|
+
export type { WorldData, CreateWorldOptions, UpdateWorldOptions, PaginationOptions, AddPersonaOptions, WorldPersonaRef, Appraisal, AppraisalVector, CreateActionOptions, ActionData, ActionRef, EntityType, RelationshipEndpoint, SetRelationshipOptions, InteractOptions, InteractResult, EventEntry, } from './types';
|
|
7
7
|
export { WorldApiError } from './errors';
|
|
8
8
|
export { createWorldClient } from './client';
|
|
9
9
|
export type { WorldClientOptions } from './client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/world/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EACV,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/world/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EACV,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -44,7 +44,7 @@ export interface WorldPersonaRef {
|
|
|
44
44
|
personaConfigId: string;
|
|
45
45
|
createdAt: number;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface Appraisal {
|
|
48
48
|
goalRelevance: number;
|
|
49
49
|
goalCongruence: number;
|
|
50
50
|
expectedness: number;
|
|
@@ -55,15 +55,17 @@ export interface AppraisalVector {
|
|
|
55
55
|
adjustmentPotential: number;
|
|
56
56
|
urgency: number;
|
|
57
57
|
}
|
|
58
|
+
/** @deprecated Use {@link Appraisal} instead. */
|
|
59
|
+
export type AppraisalVector = Appraisal;
|
|
58
60
|
export interface CreateActionOptions {
|
|
59
61
|
name: string;
|
|
60
62
|
description?: string;
|
|
61
|
-
appraisalVector:
|
|
63
|
+
appraisalVector: Appraisal;
|
|
62
64
|
}
|
|
63
65
|
export interface ActionData {
|
|
64
66
|
name: string;
|
|
65
67
|
description: string;
|
|
66
|
-
appraisalVector:
|
|
68
|
+
appraisalVector: Appraisal;
|
|
67
69
|
isDefault: boolean;
|
|
68
70
|
}
|
|
69
71
|
export interface ActionRef {
|
|
@@ -88,12 +90,37 @@ export interface InteractOptions {
|
|
|
88
90
|
action?: string;
|
|
89
91
|
actionLabel?: string;
|
|
90
92
|
stimulusDescription?: string;
|
|
91
|
-
appraisal?:
|
|
93
|
+
appraisal?: Appraisal;
|
|
92
94
|
actor?: string;
|
|
93
95
|
actorType?: 'user' | 'persona';
|
|
94
96
|
}
|
|
95
97
|
export interface InteractResult {
|
|
96
|
-
|
|
98
|
+
action: string;
|
|
99
|
+
target: string;
|
|
100
|
+
emotion: {
|
|
101
|
+
vad: {
|
|
102
|
+
V: number;
|
|
103
|
+
A: number;
|
|
104
|
+
D: number;
|
|
105
|
+
};
|
|
106
|
+
delta?: {
|
|
107
|
+
V: number;
|
|
108
|
+
A: number;
|
|
109
|
+
D: number;
|
|
110
|
+
};
|
|
111
|
+
label: string;
|
|
112
|
+
secondary_label: string | null;
|
|
113
|
+
intensity: number;
|
|
114
|
+
};
|
|
115
|
+
mood?: {
|
|
116
|
+
vad: {
|
|
117
|
+
V: number;
|
|
118
|
+
A: number;
|
|
119
|
+
D: number;
|
|
120
|
+
};
|
|
121
|
+
label: string;
|
|
122
|
+
};
|
|
123
|
+
somatic: string[];
|
|
97
124
|
}
|
|
98
125
|
export interface EventEntry {
|
|
99
126
|
[key: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/world/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,MAAM,MAAM,iBAAiB,GACzB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,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E,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-domain.d.ts","sourceRoot":"","sources":["../../../src/world/world-domain.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"world-domain.d.ts","sourceRoot":"","sources":["../../../src/world/world-domain.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAMjB;;;;;GAKG;AACH,qBAAa,KAAK;IAChB,gBAAgB;IAChB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,KAAK,CAAY;IAEzB,oEAAoE;gBACxD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS;IAO9C,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,IAAI,CAE/B;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,q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AC,cAAc,CAAC;IAmBjE,6CAA6C;IACvC,SAAS,CACb,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC;QAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAiBhE"}
|
|
@@ -4,35 +4,7 @@ exports.World = void 0;
|
|
|
4
4
|
// INFO: @F001 Domain class wrapping World API — see plan step 3
|
|
5
5
|
const client_1 = require("./client");
|
|
6
6
|
const world_persona_1 = require("./world-persona");
|
|
7
|
-
|
|
8
|
-
// Internal helpers (not exported)
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
function toApiAppraisal(v) {
|
|
11
|
-
return {
|
|
12
|
-
goal_relevance: v.goalRelevance,
|
|
13
|
-
goal_congruence: v.goalCongruence,
|
|
14
|
-
expectedness: v.expectedness,
|
|
15
|
-
controllability: v.controllability,
|
|
16
|
-
agency: v.agency,
|
|
17
|
-
norm_compatibility: v.normCompatibility,
|
|
18
|
-
internal_standards: v.internalStandards,
|
|
19
|
-
adjustment_potential: v.adjustmentPotential,
|
|
20
|
-
urgency: v.urgency,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function fromApiAppraisal(raw) {
|
|
24
|
-
return {
|
|
25
|
-
goalRelevance: raw.goal_relevance,
|
|
26
|
-
goalCongruence: raw.goal_congruence,
|
|
27
|
-
expectedness: raw.expectedness,
|
|
28
|
-
controllability: raw.controllability,
|
|
29
|
-
agency: raw.agency,
|
|
30
|
-
normCompatibility: raw.norm_compatibility,
|
|
31
|
-
internalStandards: raw.internal_standards,
|
|
32
|
-
adjustmentPotential: raw.adjustment_potential,
|
|
33
|
-
urgency: raw.urgency,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
7
|
+
const appraisal_1 = require("../shared/appraisal");
|
|
36
8
|
// ---------------------------------------------------------------------------
|
|
37
9
|
// World class (domain)
|
|
38
10
|
// ---------------------------------------------------------------------------
|
|
@@ -183,7 +155,7 @@ class World {
|
|
|
183
155
|
body: {
|
|
184
156
|
name: options.name,
|
|
185
157
|
description: options.description,
|
|
186
|
-
appraisal_vector:
|
|
158
|
+
appraisal_vector: (0, appraisal_1.toWireAppraisal)(options.appraisalVector),
|
|
187
159
|
},
|
|
188
160
|
});
|
|
189
161
|
const raw = (0, client_1.unwrap)(data);
|
|
@@ -198,7 +170,7 @@ class World {
|
|
|
198
170
|
return (raw.actions ?? []).map((a) => ({
|
|
199
171
|
name: a.name,
|
|
200
172
|
description: a.description,
|
|
201
|
-
appraisalVector:
|
|
173
|
+
appraisalVector: (0, appraisal_1.fromWireAppraisal)(a.appraisal_vector),
|
|
202
174
|
isDefault: a.is_default,
|
|
203
175
|
}));
|
|
204
176
|
}
|
|
@@ -249,7 +221,7 @@ class World {
|
|
|
249
221
|
action_name: options.action,
|
|
250
222
|
action_label: options.actionLabel,
|
|
251
223
|
stimulus_description: options.stimulusDescription,
|
|
252
|
-
appraisal_vector: options.appraisal ?
|
|
224
|
+
appraisal_vector: options.appraisal ? (0, appraisal_1.toWireAppraisal)(options.appraisal) : undefined,
|
|
253
225
|
actor_id: options.actor,
|
|
254
226
|
actor_type: options.actorType,
|
|
255
227
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* 제공하되, 내부적으로 World API 엔드포인트를 사용한다.
|
|
9
9
|
*/
|
|
10
10
|
import { type ApiClient } from './client';
|
|
11
|
-
import type {
|
|
11
|
+
import type { Appraisal } from './types';
|
|
12
12
|
import type { LLMAdapter } from '../llm/adapter';
|
|
13
13
|
export type LLMMessage = {
|
|
14
14
|
role: 'user' | 'assistant' | 'system';
|
|
@@ -24,18 +24,16 @@ export interface PersonaEmotion {
|
|
|
24
24
|
A: number;
|
|
25
25
|
D: number;
|
|
26
26
|
};
|
|
27
|
-
discrete?: {
|
|
28
|
-
primary: string;
|
|
29
|
-
secondary?: string;
|
|
30
|
-
intensity: number;
|
|
31
|
-
};
|
|
32
27
|
delta?: {
|
|
33
28
|
V: number;
|
|
34
29
|
A: number;
|
|
35
30
|
D: number;
|
|
36
31
|
};
|
|
32
|
+
label: string;
|
|
33
|
+
secondary_label: string | null;
|
|
34
|
+
intensity: number;
|
|
37
35
|
}
|
|
38
|
-
export interface
|
|
36
|
+
export interface WorldPersonaState {
|
|
39
37
|
emotion: PersonaEmotion;
|
|
40
38
|
mood?: {
|
|
41
39
|
vad: {
|
|
@@ -43,9 +41,12 @@ export interface PersonaState {
|
|
|
43
41
|
A: number;
|
|
44
42
|
D: number;
|
|
45
43
|
};
|
|
44
|
+
label: string;
|
|
46
45
|
};
|
|
47
46
|
somatic?: string[];
|
|
48
47
|
}
|
|
48
|
+
/** @deprecated Use {@link WorldPersonaState} instead. */
|
|
49
|
+
export type PersonaState = WorldPersonaState;
|
|
49
50
|
export interface PromptContext {
|
|
50
51
|
systemPrompt: string;
|
|
51
52
|
promptContext: Record<string, string>;
|
|
@@ -67,7 +68,7 @@ export interface PersonaDetail {
|
|
|
67
68
|
goals?: unknown[];
|
|
68
69
|
[key: string]: unknown;
|
|
69
70
|
};
|
|
70
|
-
state:
|
|
71
|
+
state: WorldPersonaState | null;
|
|
71
72
|
}
|
|
72
73
|
export interface ReactOptions {
|
|
73
74
|
/** Who is performing the action (e.g. 'yongjun'). */
|
|
@@ -90,8 +91,9 @@ export interface ReactResult<T = string> {
|
|
|
90
91
|
A: number;
|
|
91
92
|
D: number;
|
|
92
93
|
};
|
|
94
|
+
label: string;
|
|
93
95
|
};
|
|
94
|
-
somatic
|
|
96
|
+
somatic: string[];
|
|
95
97
|
/** LLM-generated narrative — typed T if schema provided, string otherwise. */
|
|
96
98
|
narrative: T;
|
|
97
99
|
}
|
|
@@ -111,7 +113,7 @@ export declare class WorldPersona {
|
|
|
111
113
|
/** Fetch full persona detail (config + state). Cached per-instance. */
|
|
112
114
|
getDetail(): Promise<PersonaDetail>;
|
|
113
115
|
/** Get current emotion/mood/somatic state. */
|
|
114
|
-
getState(): Promise<
|
|
116
|
+
getState(): Promise<WorldPersonaState>;
|
|
115
117
|
/** Get speaking style from persona config (identity.speakingStyle). */
|
|
116
118
|
getSpeakingStyle(): Promise<string | undefined>;
|
|
117
119
|
/** Get LLM system prompt assembled from all persona subsystems + world context. */
|
|
@@ -123,9 +125,11 @@ export declare class WorldPersona {
|
|
|
123
125
|
interact(action: string, options?: {
|
|
124
126
|
actor?: string;
|
|
125
127
|
actorType?: 'user' | 'persona';
|
|
126
|
-
appraisal?:
|
|
128
|
+
appraisal?: Appraisal;
|
|
127
129
|
stimulusDescription?: string;
|
|
128
130
|
}): Promise<{
|
|
131
|
+
action: string;
|
|
132
|
+
target: string;
|
|
129
133
|
emotion: PersonaEmotion;
|
|
130
134
|
mood?: {
|
|
131
135
|
vad: {
|
|
@@ -133,8 +137,9 @@ export declare class WorldPersona {
|
|
|
133
137
|
A: number;
|
|
134
138
|
D: number;
|
|
135
139
|
};
|
|
140
|
+
label: string;
|
|
136
141
|
};
|
|
137
|
-
somatic
|
|
142
|
+
somatic: string[];
|
|
138
143
|
}>;
|
|
139
144
|
/**
|
|
140
145
|
* Advance persona simulation time by the specified number of seconds.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-persona.d.ts","sourceRoot":"","sources":["../../../src/world/world-persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"world-persona.d.ts","sourceRoot":"","sources":["../../../src/world/world-persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,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