deepadata-edm-sdk 0.8.9 → 0.8.10
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/assembler.d.ts +2 -2
- package/dist/assembler.js +2 -2
- package/dist/assembler.js.map +1 -1
- package/dist/extractors/generate-field-block.d.ts +44 -0
- package/dist/extractors/generate-field-block.d.ts.map +1 -0
- package/dist/extractors/generate-field-block.js +253 -0
- package/dist/extractors/generate-field-block.js.map +1 -0
- package/dist/extractors/llm-extractor.d.ts +1 -1
- package/dist/extractors/llm-extractor.d.ts.map +1 -1
- package/dist/extractors/llm-extractor.js +50 -52
- package/dist/extractors/llm-extractor.js.map +1 -1
- package/dist/extractors/output-sanitizer.js +1 -1
- package/dist/extractors/output-sanitizer.js.map +1 -1
- package/dist/extractors/profile-prompts.d.ts +2 -2
- package/dist/extractors/profile-prompts.d.ts.map +1 -1
- package/dist/extractors/profile-prompts.js +43 -43
- package/dist/schema/edm-schema.d.ts +26 -26
- package/dist/schema/edm-schema.d.ts.map +1 -1
- package/dist/schema/edm-schema.js +4 -3
- package/dist/schema/edm-schema.js.map +1 -1
- package/dist/schema/types.d.ts +1 -1
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +0 -1
- package/dist/schema/types.js.map +1 -1
- package/package.json +2 -1
package/dist/assembler.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const ESSENTIAL_PROFILE_FIELDS: {
|
|
|
30
30
|
export declare const EXTENDED_PROFILE_FIELDS: {
|
|
31
31
|
readonly meta: readonly ["id", "version", "profile", "created_at", "updated_at", "locale", "owner_user_id", "parent_id", "visibility", "pii_tier", "source_type", "source_context", "consent_basis", "consent_scope", "tags"];
|
|
32
32
|
readonly core: readonly ["anchor", "spark", "wound", "fuel", "bridge", "echo", "narrative"];
|
|
33
|
-
readonly constellation: readonly ["emotion_primary", "emotion_subtone", "higher_order_emotion", "meta_emotional_state", "interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context", "memory_type", "media_format", "narrative_archetype", "symbolic_anchor", "relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight", "transformational_pivot", "somatic_signature"];
|
|
33
|
+
readonly constellation: readonly ["emotion_primary", "emotion_subtone", "higher_order_emotion", "meta_emotional_state", "interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context", "memory_type", "media_format", "narrative_archetype", "symbolic_anchor", "relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight", "transformational_pivot", "somatic_signature", "arc_type"];
|
|
34
34
|
readonly milky_way: readonly ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"];
|
|
35
35
|
readonly gravity: readonly ["emotional_weight", "valence", "tether_type", "recurrence_pattern", "strength_score"];
|
|
36
36
|
readonly governance: readonly ["jurisdiction", "retention_policy", "subject_rights"];
|
|
@@ -43,7 +43,7 @@ export declare const EXTENDED_PROFILE_FIELDS: {
|
|
|
43
43
|
export declare const FULL_PROFILE_FIELDS: {
|
|
44
44
|
readonly meta: readonly ["id", "version", "profile", "created_at", "updated_at", "locale", "owner_user_id", "parent_id", "visibility", "pii_tier", "source_type", "source_context", "consent_basis", "consent_scope", "consent_revoked_at", "tags"];
|
|
45
45
|
readonly core: readonly ["anchor", "spark", "wound", "fuel", "bridge", "echo", "narrative"];
|
|
46
|
-
readonly constellation: readonly ["emotion_primary", "emotion_subtone", "higher_order_emotion", "meta_emotional_state", "interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context", "memory_type", "media_format", "narrative_archetype", "symbolic_anchor", "relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight", "transformational_pivot", "somatic_signature"];
|
|
46
|
+
readonly constellation: readonly ["emotion_primary", "emotion_subtone", "higher_order_emotion", "meta_emotional_state", "interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context", "memory_type", "media_format", "narrative_archetype", "symbolic_anchor", "relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight", "transformational_pivot", "somatic_signature", "arc_type"];
|
|
47
47
|
readonly milky_way: readonly ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"];
|
|
48
48
|
readonly gravity: readonly ["emotional_weight", "emotional_density", "valence", "viscosity", "gravity_type", "tether_type", "recall_triggers", "retrieval_keys", "nearby_themes", "recurrence_pattern", "strength_score", "temporal_decay", "resilience_markers", "adaptation_trajectory"];
|
|
49
49
|
readonly impulse: readonly ["primary_energy", "drive_state", "motivational_orientation", "temporal_focus", "directionality", "social_visibility", "urgency", "risk_posture", "agency_level", "regulation_state", "attachment_style", "coping_style"];
|
package/dist/assembler.js
CHANGED
|
@@ -43,7 +43,7 @@ export const EXTENDED_PROFILE_FIELDS = {
|
|
|
43
43
|
"interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context",
|
|
44
44
|
"memory_type", "media_format", "narrative_archetype", "symbolic_anchor",
|
|
45
45
|
"relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight",
|
|
46
|
-
"transformational_pivot", "somatic_signature"
|
|
46
|
+
"transformational_pivot", "somatic_signature", "arc_type"
|
|
47
47
|
],
|
|
48
48
|
milky_way: ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"],
|
|
49
49
|
gravity: ["emotional_weight", "valence", "tether_type", "recurrence_pattern", "strength_score"],
|
|
@@ -66,7 +66,7 @@ export const FULL_PROFILE_FIELDS = {
|
|
|
66
66
|
"interpersonal_affect", "narrative_arc", "relational_dynamics", "temporal_context",
|
|
67
67
|
"memory_type", "media_format", "narrative_archetype", "symbolic_anchor",
|
|
68
68
|
"relational_perspective", "temporal_rhythm", "identity_thread", "expressed_insight",
|
|
69
|
-
"transformational_pivot", "somatic_signature"
|
|
69
|
+
"transformational_pivot", "somatic_signature", "arc_type"
|
|
70
70
|
],
|
|
71
71
|
milky_way: ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"],
|
|
72
72
|
gravity: [
|
package/dist/assembler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembler.js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;YACtB,YAAY,EAAE,IAAI;SACnB;QACD,UAAU,EAAE;YACV,YAAY,EAAE,IAAI;YAClB,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE;gBACd,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,KAAK;aACnB;YACD,aAAa,EAAE,SAAS;YACxB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,CAAC,MAAM,CAAC;YACvB,aAAa,EAAE,EAAE;SAClB;QACD,SAAS,EAAE;YACT,gBAAgB,EAAE,CAAC;YACnB,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE,IAAI;YACzB,gBAAgB,EAAE,IAAI;SACvB;QACD,MAAM,EAAE;YACN,UAAU,EAAE,EAAE;YACd,OAAO,EAAE;gBACP,YAAY,EAAE,EAAE;aACjB;SACF;QACD,UAAU,EAAE;YACV,gBAAgB,EAAE,IAAI;YACtB,oBAAoB,EAAE,IAAI;YAC1B,eAAe,EAAE,IAAI;YACrB,gBAAgB,EAAE,IAAI;SACvB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type FieldBlockProfile = "essential" | "extended" | "full";
|
|
2
|
+
interface JsonSchemaNode {
|
|
3
|
+
type?: string | string[];
|
|
4
|
+
enum?: (string | null)[];
|
|
5
|
+
"x-edm-canonical"?: string[];
|
|
6
|
+
properties?: Record<string, JsonSchemaNode>;
|
|
7
|
+
$ref?: string;
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type FieldKind = "strict-enum" | "canonical-enum" | "string" | "number" | "boolean" | "string-array";
|
|
11
|
+
export interface FieldInfo {
|
|
12
|
+
kind: FieldKind;
|
|
13
|
+
/** Present for strict-enum / canonical-enum — read live from the fragment node. */
|
|
14
|
+
enumValues?: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Classify a JSON Schema field node into the kind the prompt comment renders.
|
|
18
|
+
*
|
|
19
|
+
* - "x-edm-canonical": [...] → canonical-enum (two-tier free text)
|
|
20
|
+
* - "enum": [...] → strict-enum (null stripped)
|
|
21
|
+
* - type number/integer → number
|
|
22
|
+
* - type boolean → boolean
|
|
23
|
+
* - type array → string-array
|
|
24
|
+
* - otherwise (string/null) → free text
|
|
25
|
+
*/
|
|
26
|
+
export declare function classifyField(def: JsonSchemaNode): FieldInfo;
|
|
27
|
+
/**
|
|
28
|
+
* Generate the JSON field-block skeleton for a profile, from the edm-spec JSON
|
|
29
|
+
* Schema.
|
|
30
|
+
*
|
|
31
|
+
* Output shape (matches the current hand-written skeletons):
|
|
32
|
+
*
|
|
33
|
+
* {
|
|
34
|
+
* "experiential_stance": "", // STRICT ENUM: ...
|
|
35
|
+
* "core": {
|
|
36
|
+
* "anchor": "", // central theme ...
|
|
37
|
+
* ...
|
|
38
|
+
* },
|
|
39
|
+
* ...
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
42
|
+
export declare function generateFieldBlock(profile: FieldBlockProfile): string;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=generate-field-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-field-block.d.ts","sourceRoot":"","sources":["../../src/extractors/generate-field-block.ts"],"names":[],"mappings":"AAuCA,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAMlE,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAwCD,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,mFAAmF;IACnF,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,CAe5D;AAiID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAsDrE"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON-Schema → prompt field-block generator (ADR-0030, amended — Step 6).
|
|
3
|
+
*
|
|
4
|
+
* Reads the PUBLISHED edm-spec package (the source of truth, ADR-0030 amended)
|
|
5
|
+
* rather than walking the SDK's own zod validator. The two extraction prompts
|
|
6
|
+
* (Full in llm-extractor.ts; Extended/Essential in profile-prompts.ts) each
|
|
7
|
+
* carry a hand-written JSON skeleton whose per-field `// CANONICAL:` / `// STRICT
|
|
8
|
+
* ENUM:` comments enumerate the field vocabulary. This generator emits that
|
|
9
|
+
* skeleton FROM the spec's JSON Schema fragments, so the vocabulary rendered in
|
|
10
|
+
* each comment is the one the spec enforces — drift between prompt, validator,
|
|
11
|
+
* and spec becomes impossible by construction.
|
|
12
|
+
*
|
|
13
|
+
* Phase A walked the local zod schema; this is the spec-sourced port. The OUTPUT
|
|
14
|
+
* FORMAT is unchanged — byte-for-byte identical to what Phase A emitted (and
|
|
15
|
+
* therefore to the hand-written skeletons it reproduces). Only the INPUT source
|
|
16
|
+
* moved: zod nodes → edm-spec JSON Schema.
|
|
17
|
+
*
|
|
18
|
+
* Classification maps directly from JSON Schema to the kinds the prompt renders:
|
|
19
|
+
* - "x-edm-canonical": [...] → canonical-enum (two-tier; free text accepted)
|
|
20
|
+
* - "enum": [...] → strict-enum (validator rejects non-members)
|
|
21
|
+
* - bare "type" string/number/boolean/array → free text / number / boolean / array
|
|
22
|
+
*
|
|
23
|
+
* Field MEMBERSHIP and ORDER per profile come from the composite profile schemas
|
|
24
|
+
* (edm-spec/schema/edm.v0.8.{essential,extended,full}.schema.json): which
|
|
25
|
+
* representational domains a profile includes, and — for inline domains — which
|
|
26
|
+
* fields, in which order. This is the role the SDK's LlmEssential/LlmExtended/
|
|
27
|
+
* LlmExtractedFields zod schemas used to play.
|
|
28
|
+
*
|
|
29
|
+
* Field DEFINITIONS (classification + canonical value lists) are always read from
|
|
30
|
+
* the fragments, never from the composite's inline copies, so the canonical
|
|
31
|
+
* vocabulary rendered in each comment is the one the fragment enforces.
|
|
32
|
+
*/
|
|
33
|
+
import { readFileSync } from "node:fs";
|
|
34
|
+
import { createRequire } from "node:module";
|
|
35
|
+
const require = createRequire(import.meta.url);
|
|
36
|
+
const loadJson = (specPath) => JSON.parse(readFileSync(require.resolve(specPath), "utf8"));
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Profile / domain wiring
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
/** The LLM-extracted representational domains, in canonical (zod definition) order. */
|
|
41
|
+
const LLM_DOMAINS = ["core", "constellation", "milky_way", "gravity", "impulse"];
|
|
42
|
+
const FRAGMENT_SPEC = {
|
|
43
|
+
core: "edm-spec/schema/fragments/core.json",
|
|
44
|
+
constellation: "edm-spec/schema/fragments/constellation.json",
|
|
45
|
+
milky_way: "edm-spec/schema/fragments/milky_way.json",
|
|
46
|
+
gravity: "edm-spec/schema/fragments/gravity.json",
|
|
47
|
+
impulse: "edm-spec/schema/fragments/impulse.json",
|
|
48
|
+
};
|
|
49
|
+
const COMPOSITE_SPEC = {
|
|
50
|
+
essential: "edm-spec/schema/edm.v0.8.essential.schema.json",
|
|
51
|
+
extended: "edm-spec/schema/edm.v0.8.extended.schema.json",
|
|
52
|
+
full: "edm-spec/schema/edm.v0.8.full.schema.json",
|
|
53
|
+
};
|
|
54
|
+
const loadFragment = (domain) => loadJson(FRAGMENT_SPEC[domain]);
|
|
55
|
+
/**
|
|
56
|
+
* experiential_stance is a top-level extraction-only field — never sealed into
|
|
57
|
+
* the artifact body, so it appears in no fragment or composite schema. The SDK
|
|
58
|
+
* carries it as ExperientialStanceSchema (z.enum). Mirror it here as a strict
|
|
59
|
+
* enum so the generated block asks for it exactly as the current prompts do.
|
|
60
|
+
*/
|
|
61
|
+
const EXPERIENTIAL_STANCE_DEF = {
|
|
62
|
+
enum: ["lived", "witnessed", "quoted_third_party", "assistant_generated", "hypothetical"],
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Classify a JSON Schema field node into the kind the prompt comment renders.
|
|
66
|
+
*
|
|
67
|
+
* - "x-edm-canonical": [...] → canonical-enum (two-tier free text)
|
|
68
|
+
* - "enum": [...] → strict-enum (null stripped)
|
|
69
|
+
* - type number/integer → number
|
|
70
|
+
* - type boolean → boolean
|
|
71
|
+
* - type array → string-array
|
|
72
|
+
* - otherwise (string/null) → free text
|
|
73
|
+
*/
|
|
74
|
+
export function classifyField(def) {
|
|
75
|
+
const canonical = def["x-edm-canonical"];
|
|
76
|
+
if (Array.isArray(canonical)) {
|
|
77
|
+
return { kind: "canonical-enum", enumValues: canonical };
|
|
78
|
+
}
|
|
79
|
+
if (Array.isArray(def.enum)) {
|
|
80
|
+
// JSON Schema enums carry a trailing `null` for nullable fields; zod models
|
|
81
|
+
// nullability with `.nullable()` and keeps it out of the enum, so strip it.
|
|
82
|
+
return { kind: "strict-enum", enumValues: def.enum.filter((v) => v !== null) };
|
|
83
|
+
}
|
|
84
|
+
const types = Array.isArray(def.type) ? def.type : [def.type];
|
|
85
|
+
if (types.includes("number") || types.includes("integer"))
|
|
86
|
+
return { kind: "number" };
|
|
87
|
+
if (types.includes("boolean"))
|
|
88
|
+
return { kind: "boolean" };
|
|
89
|
+
if (types.includes("array"))
|
|
90
|
+
return { kind: "string-array" };
|
|
91
|
+
return { kind: "string" };
|
|
92
|
+
}
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Presentation layer (OUTPUT_CONTRACT — hand-written, §4)
|
|
95
|
+
//
|
|
96
|
+
// Canonical comment conventions follow the Full prompt (the richest of the
|
|
97
|
+
// three current skeletons): STRICT/CANONICAL prefixes with explicit suffixes
|
|
98
|
+
// and per-field prose guidance for free-text fields. Enum VALUES are NEVER in
|
|
99
|
+
// these tables — they come from the fragment.
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
const STRICT_SUFFIX = " (pick ONE or null)";
|
|
102
|
+
const CANONICAL_SUFFIX = " (free text accepted if none fits)";
|
|
103
|
+
/** Per-field suffix overrides for strict enums (keyed `domain.field`). */
|
|
104
|
+
const SUFFIX_OVERRIDE = {
|
|
105
|
+
"constellation.narrative_archetype": " (pick ONE or null; lowercase)",
|
|
106
|
+
};
|
|
107
|
+
/** Extra prose appended after a canonical-enum comment. */
|
|
108
|
+
const CANONICAL_TRAILING = {
|
|
109
|
+
"constellation.arc_type": ". gratitude = moments of thankfulness, appreciation, acknowledging blessing; authenticity = feeling fully oneself, self-alignment, identity congruence",
|
|
110
|
+
};
|
|
111
|
+
/** Prose guidance for non-enum (free text / number / boolean / array) fields. */
|
|
112
|
+
const GUIDANCE = {
|
|
113
|
+
// core
|
|
114
|
+
"core.anchor": 'central theme (e.g., "dad\'s toolbox", "nana\'s traditions")',
|
|
115
|
+
"core.spark": 'what triggered the memory (e.g., "finding the cassette", "first snow")',
|
|
116
|
+
"core.wound": "The specific vulnerability, loss, or pain present — NOT generic labels like 'loss' or 'grief' but what exactly was lost or why it hurts. Examples: 'unlived travel dream', 'war silence never spoken', 'father died before I knew him', 'shame of not fitting in'. If no wound is present, use null.",
|
|
117
|
+
"core.fuel": 'what energized the experience (e.g., "shared laughter", "curiosity")',
|
|
118
|
+
"core.bridge": 'connection between past and present (e.g., "replaying old tape", "returning to the porch")',
|
|
119
|
+
"core.echo": 'what still resonates (e.g., "her laugh", "smell of oil", "city lights on water")',
|
|
120
|
+
"core.narrative": "3–5 sentences. REQUIRED: include ALL of the following — ≥1 concrete sensory detail (sight, sound, smell, texture), ≥1 temporal cue that anchors the memory in time, ≥1 symbolic callback that connects past to present. Write from the subject's perspective. Do not compress or summarise — give the memory space to breathe. Faithful and specific. Never generic.",
|
|
121
|
+
// constellation
|
|
122
|
+
"constellation.emotion_subtone": "2–4 short words (e.g., bittersweet, grateful) — free text array",
|
|
123
|
+
"constellation.higher_order_emotion": "free text: e.g., awe, forgiveness, pride, moral_elevation (or null)",
|
|
124
|
+
"constellation.meta_emotional_state": "free text: e.g., acceptance, confusion, curiosity (or null)",
|
|
125
|
+
"constellation.interpersonal_affect": "free text: e.g., warmth, openness, defensiveness (or null)",
|
|
126
|
+
"constellation.symbolic_anchor": "concrete object/place/ritual (or null)",
|
|
127
|
+
"constellation.identity_thread": "short sentence",
|
|
128
|
+
"constellation.expressed_insight": "brief insight explicitly stated by subject (extracted, not inferred)",
|
|
129
|
+
"constellation.transformational_pivot": "true if subject explicitly identifies this as life-changing",
|
|
130
|
+
"constellation.somatic_signature": 'bodily sensations explicitly described (e.g., "chest tightness", "warmth spreading") or null',
|
|
131
|
+
// milky_way
|
|
132
|
+
"milky_way.event_type": "e.g., family gathering, farewell, birthday (or null)",
|
|
133
|
+
"milky_way.location_context": "place from text or image (or null)",
|
|
134
|
+
"milky_way.associated_people": "names or roles (proper case allowed)",
|
|
135
|
+
"milky_way.tone_shift": "e.g., loss to gratitude (or null)",
|
|
136
|
+
// gravity
|
|
137
|
+
"gravity.emotional_weight": "0.0–1.0 (felt intensity IN THE MOMENT). Calibration: 0.9+ life-altering irreversible moments; 0.7-0.9 significant personal events with strong emotional response; 0.4-0.7 meaningful but routine emotional experiences; 0.1-0.4 mild passing emotional content",
|
|
138
|
+
"gravity.gravity_type": "short phrase (e.g., symbolic resonance)",
|
|
139
|
+
"gravity.recall_triggers": "sensory or symbolic cues (lowercase tokens)",
|
|
140
|
+
"gravity.retrieval_keys": "compact hooks (3–6 tokens recommended)",
|
|
141
|
+
"gravity.nearby_themes": "adjacent concepts",
|
|
142
|
+
"gravity.strength_score": "0.0–1.0 (how BOUND/STUCK this memory is)",
|
|
143
|
+
"gravity.resilience_markers": "1–3 (e.g., acceptance, optimism, continuity)",
|
|
144
|
+
// impulse
|
|
145
|
+
"impulse.primary_energy": "free text: e.g., curiosity, fear, compassion (or null; lowercase)",
|
|
146
|
+
// top-level
|
|
147
|
+
experiential_stance: "", // enum-driven; guidance unused
|
|
148
|
+
};
|
|
149
|
+
const PLACEHOLDER = {
|
|
150
|
+
"strict-enum": '""',
|
|
151
|
+
"canonical-enum": '""',
|
|
152
|
+
string: '""',
|
|
153
|
+
number: "0.0",
|
|
154
|
+
boolean: "false",
|
|
155
|
+
"string-array": "[]",
|
|
156
|
+
};
|
|
157
|
+
/** Build the `// ...` comment text for a field, or null if it has none. */
|
|
158
|
+
function commentFor(key, info) {
|
|
159
|
+
if (info.kind === "strict-enum") {
|
|
160
|
+
const suffix = SUFFIX_OVERRIDE[key] ?? STRICT_SUFFIX;
|
|
161
|
+
return `STRICT ENUM: ${(info.enumValues ?? []).join(" | ")}${suffix}`;
|
|
162
|
+
}
|
|
163
|
+
if (info.kind === "canonical-enum") {
|
|
164
|
+
const trailing = CANONICAL_TRAILING[key] ?? "";
|
|
165
|
+
return `CANONICAL: ${(info.enumValues ?? []).join(" | ")}${CANONICAL_SUFFIX}${trailing}`;
|
|
166
|
+
}
|
|
167
|
+
const g = GUIDANCE[key];
|
|
168
|
+
return g && g.length > 0 ? g : null;
|
|
169
|
+
}
|
|
170
|
+
/** Join lines, aligning each block's `//` to (max content length) + 1 space. */
|
|
171
|
+
function renderBlock(lines) {
|
|
172
|
+
const maxLen = lines.reduce((m, l) => Math.max(m, l.content.length), 0);
|
|
173
|
+
return lines.map((l) => {
|
|
174
|
+
if (l.comment === null)
|
|
175
|
+
return l.content;
|
|
176
|
+
const pad = " ".repeat(maxLen - l.content.length + 1);
|
|
177
|
+
return `${l.content}${pad}// ${l.comment}`;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Resolve a profile domain to its ordered `[fieldName, def]` pairs.
|
|
182
|
+
* Field names/order: inline composite properties when present, else fragment
|
|
183
|
+
* order. Field defs: always the fragment (source of truth), falling back to the
|
|
184
|
+
* inline composite copy only if the fragment lacks the field.
|
|
185
|
+
*/
|
|
186
|
+
function domainFields(compositeProp, fragment) {
|
|
187
|
+
const fragProps = fragment.properties ?? {};
|
|
188
|
+
const inlineProps = compositeProp?.properties;
|
|
189
|
+
const names = inlineProps ? Object.keys(inlineProps) : Object.keys(fragProps);
|
|
190
|
+
return names.map((name) => [name, fragProps[name] ?? inlineProps?.[name] ?? {}]);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Generate the JSON field-block skeleton for a profile, from the edm-spec JSON
|
|
194
|
+
* Schema.
|
|
195
|
+
*
|
|
196
|
+
* Output shape (matches the current hand-written skeletons):
|
|
197
|
+
*
|
|
198
|
+
* {
|
|
199
|
+
* "experiential_stance": "", // STRICT ENUM: ...
|
|
200
|
+
* "core": {
|
|
201
|
+
* "anchor": "", // central theme ...
|
|
202
|
+
* ...
|
|
203
|
+
* },
|
|
204
|
+
* ...
|
|
205
|
+
* }
|
|
206
|
+
*/
|
|
207
|
+
export function generateFieldBlock(profile) {
|
|
208
|
+
const compositeSpec = COMPOSITE_SPEC[profile];
|
|
209
|
+
if (!compositeSpec) {
|
|
210
|
+
throw new Error(`unknown profile "${profile}" (expected one of: ${Object.keys(COMPOSITE_SPEC).join(", ")})`);
|
|
211
|
+
}
|
|
212
|
+
const composite = loadJson(compositeSpec);
|
|
213
|
+
const props = composite.properties ?? {};
|
|
214
|
+
// Representational domains present in this profile, in canonical order.
|
|
215
|
+
const domains = LLM_DOMAINS.filter((d) => props[d]);
|
|
216
|
+
// Top-level: the experiential_stance scalar renders first and inline; domains
|
|
217
|
+
// render as nested blocks. (Mirrors the SDK's [...scalars, ...domains] order.)
|
|
218
|
+
const topLevelCount = 1 + domains.length;
|
|
219
|
+
let topIdx = 0;
|
|
220
|
+
const out = ["{"];
|
|
221
|
+
// experiential_stance (scalar)
|
|
222
|
+
{
|
|
223
|
+
const isLastTop = topIdx === topLevelCount - 1;
|
|
224
|
+
const topComma = isLastTop ? "" : ",";
|
|
225
|
+
const info = classifyField(EXPERIENTIAL_STANCE_DEF);
|
|
226
|
+
const comment = commentFor("experiential_stance", info);
|
|
227
|
+
const [rendered] = renderBlock([
|
|
228
|
+
{ content: ` "experiential_stance": ${PLACEHOLDER[info.kind]}${topComma}`, comment },
|
|
229
|
+
]);
|
|
230
|
+
out.push(rendered);
|
|
231
|
+
topIdx++;
|
|
232
|
+
}
|
|
233
|
+
for (const domain of domains) {
|
|
234
|
+
const isLastTop = topIdx === topLevelCount - 1;
|
|
235
|
+
const topComma = isLastTop ? "" : ",";
|
|
236
|
+
const fragment = loadFragment(domain);
|
|
237
|
+
const fields = domainFields(props[domain], fragment);
|
|
238
|
+
out.push(` "${domain}": {`);
|
|
239
|
+
const lines = fields.map(([field, def], idx) => {
|
|
240
|
+
const isLastField = idx === fields.length - 1;
|
|
241
|
+
const comma = isLastField ? "" : ",";
|
|
242
|
+
const info = classifyField(def);
|
|
243
|
+
const comment = commentFor(`${domain}.${field}`, info);
|
|
244
|
+
return { content: ` "${field}": ${PLACEHOLDER[info.kind]}${comma}`, comment };
|
|
245
|
+
});
|
|
246
|
+
out.push(...renderBlock(lines));
|
|
247
|
+
out.push(` }${topComma}`);
|
|
248
|
+
topIdx++;
|
|
249
|
+
}
|
|
250
|
+
out.push("}");
|
|
251
|
+
return out.join("\n");
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=generate-field-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-field-block.js","sourceRoot":"","sources":["../../src/extractors/generate-field-block.ts"],"names":[],"mappings":"AAAA;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GAAG,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YAC9C,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;YACrC,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;YACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,KAAK,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC;QACnF,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAChC,GAAG,CAAC,IAAI,CAAC,MAAM,QAAQ,EAAE,CAAC,CAAC;QAC3B,MAAM,EAAE,CAAC;IACX,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -27,7 +27,7 @@ export declare function prepareInputText(input: ExtractionInput): string | undef
|
|
|
27
27
|
* System prompt for EDM extraction
|
|
28
28
|
* See CHANGELOG.md for version-specific schema changes
|
|
29
29
|
*/
|
|
30
|
-
export declare const EXTRACTION_SYSTEM_PROMPT = "\nYou classify emotionally rich memories into a JSON object. Input may include text and an image.\n\nRules\n- Fuse text + image. Treat text as primary; use image only to add grounded specifics (place, event, symbols, people).\n- Keep fields to single words or short phrases (1\u20133 words). Only \"narrative\" is multi-sentence (3\u20135).\n- No invention. If not supported by input, use null.\n- Always include every top-level key and sub-key from the schema, even if the value is null or an empty array.\n- Do not omit fields; if unknown, return null.\n- Output JSON only \u2014 no commentary, markdown, or extra text.\n- If motivation is ambiguous, choose the most conservative option (e.g., \"curiosity\" vs \"fear\") or return null.\n\nSUBJECT ANCHORING (critical)\n- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only, never a source of the subject's experience.\n- Score every field relative to the SUBJECT, not the passage. emotional_weight measures what this content meant TO THE SUBJECT \u2014 not how vivid, dramatic, or emotionally rich the text itself is.\n- Routine work content (debugging, drafting, planning, logistics) is 0.1\u20130.4 even when the subject expresses momentary relief or frustration. Reserve 0.7+ for events with personal stakes the subject states or plainly carries. Do not invent somatic or emotional detail the subject never expressed.\n- transformational_pivot is true ONLY if the subject explicitly marks the experience as life-changing. Finishing a task, fixing a bug, or shipping a feature is not a transformational pivot.\n\nEXPERIENTIAL STANCE (critical)\nClassify whose experience the emotionally salient material is, in the top-level \"experiential_stance\" key:\n- \"lived\" \u2014 the subject's own first-hand experience\n- \"witnessed\" \u2014 events the subject personally witnessed or is directly affected by (a loved one's death, a family crisis)\n- \"quoted_third_party\" \u2014 someone else's story the subject quoted, pasted, or retold without being a participant (an article, test data, a stranger's anecdote)\n- \"assistant_generated\" \u2014 fiction, examples, or anecdotes produced by the assistant, not reported by the subject\n- \"hypothetical\" \u2014 imagined scenarios, drafts about invented people, role-play\nIf the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound, identity_thread, expressed_insight, somatic_signature, transformational_pivot, the impulse domain, or high emotional_weight \u2014 those fields describe the SUBJECT. Extract only what the content reveals about the subject themselves (e.g. why they engaged with it), or return null fields with low weight.\n\nCRITICAL: Enum Field Constraints\n- Many fields below have CANONICAL values \u2014 preferred values for cross-artifact comparability.\n- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.\n- Cross-contamination warning: Each enum field has its own distinct value set. Do not use values from one field in another.\n Example: \"milestone\" is valid for memory_type but NOT for narrative_arc.\n Example: \"confront\" is valid for both drive_state and coping_style - check which field you're populating.\n- emotion_primary, narrative_arc, relational_dynamics, and arc_type accept free text if no canonical value fits.\n- arc_type canonical values use underscores not spaces. Use moral_awakening not moral awakening. Canonical values must match exactly as listed \u2014 no spaces, no variations.\n\nNormalization (very important)\n- Emit lowercase for all string fields except proper names in arrays like associated_people.\n- For array fields (emotion_subtone, recall_triggers, retrieval_keys, nearby_themes, resilience_markers, associated_people):\n \u2022 use short tokens/phrases without punctuation;\n \u2022 avoid duplicates;\n \u2022 prefer singular nouns where reasonable (\"tradition\" not \"traditions\").\n- Never put boolean-like strings (\"true\"/\"false\") into fields that are boolean; use real booleans.\n\nSchema\n{\n \"experiential_stance\": \"\", // STRICT ENUM: lived | witnessed | quoted_third_party | assistant_generated | hypothetical (pick ONE or null)\n \"core\": {\n \"anchor\": \"\", // central theme (e.g., \"dad's toolbox\", \"nana's traditions\")\n \"spark\": \"\", // what triggered the memory (e.g., \"finding the cassette\", \"first snow\")\n \"wound\": \"\", // The specific vulnerability, loss, or pain present \u2014 NOT generic labels like 'loss' or 'grief' but what exactly was lost or why it hurts. Examples: 'unlived travel dream', 'war silence never spoken', 'father died before I knew him', 'shame of not fitting in'. If no wound is present, use null.\n \"fuel\": \"\", // what energized the experience (e.g., \"shared laughter\", \"curiosity\")\n \"bridge\": \"\", // connection between past and present (e.g., \"replaying old tape\", \"returning to the porch\")\n \"echo\": \"\", // what still resonates (e.g., \"her laugh\", \"smell of oil\", \"city lights on water\")\n \"narrative\": \"\" // 3\u20135 sentences. REQUIRED: include ALL of the following \u2014 \u22651 concrete sensory detail (sight, sound, smell, texture), \u22651 temporal cue that anchors the memory in time, \u22651 symbolic callback that connects past to present. Write from the subject's perspective. Do not compress or summarise \u2014 give the memory space to breathe. Faithful and specific. Never generic.\n },\n \"constellation\": {\n \"emotion_primary\": \"\", // CANONICAL: joy | sadness | fear | anger | wonder | peace | tenderness | reverence | pride | anxiety | gratitude | longing | hope | shame | disappointment | relief | frustration (free text accepted if none fits)\n \"emotion_subtone\": [], // 2\u20134 short words (e.g., bittersweet, grateful) \u2014 free text array\n \"higher_order_emotion\": \"\", // free text: e.g., awe, forgiveness, pride, moral_elevation (or null)\n \"meta_emotional_state\": \"\", // free text: e.g., acceptance, confusion, curiosity (or null)\n \"interpersonal_affect\": \"\", // free text: e.g., warmth, openness, defensiveness (or null)\n \"narrative_arc\": \"\", // CANONICAL: overcoming | transformation | connection | reflection | closure | loss | confrontation (free text accepted if none fits)\n \"relational_dynamics\": \"\", // CANONICAL: parent_child | grandparent_grandchild | romantic_partnership | couple | sibling_bond | family | friendship | friend | companionship | colleague | mentorship | reunion | community_ritual | grief | self_reflection | professional | therapeutic | service | adversarial (free text accepted if none fits)\n \"temporal_context\": \"\", // STRICT ENUM: childhood | early_adulthood | midlife | late_life | recent | future | timeless (pick ONE or null)\n \"memory_type\": \"\", // STRICT ENUM: legacy_artifact | fleeting_moment | milestone | reflection | formative_experience (pick ONE or null)\n \"media_format\": \"\", // photo, video, audio, text, photo_with_story (or null)\n \"narrative_archetype\": \"\", // STRICT ENUM: hero | caregiver | seeker | sage | lover | outlaw | innocent | orphan | magician | creator | everyman | jester | ruler | mentor (pick ONE or null; lowercase)\n \"symbolic_anchor\": \"\", // concrete object/place/ritual (or null)\n \"relational_perspective\": \"\", // STRICT ENUM: self | partner | family | friends | community | humanity (pick ONE or null)\n \"temporal_rhythm\": \"\", // STRICT ENUM: still | sudden | rising | fading | recurring | spiraling | dragging | suspended | looping | cyclic (pick ONE or null)\n \"identity_thread\": \"\", // short sentence\n \"expressed_insight\": \"\", // brief insight explicitly stated by subject (extracted, not inferred)\n \"transformational_pivot\": false, // true if subject explicitly identifies this as life-changing\n \"somatic_signature\": \"\", // bodily sensations explicitly described (e.g., \"chest tightness\", \"warmth spreading\") or null\n \"arc_type\": \"\" // CANONICAL: betrayal | liberation | grief | discovery | resistance | bond | moral_awakening | transformation | reconciliation | reckoning | threshold | exile | gratitude | authenticity (free text accepted if none fits). gratitude = moments of thankfulness, appreciation, acknowledging blessing; authenticity = feeling fully oneself, self-alignment, identity congruence\n },\n \"milky_way\": {\n \"event_type\": \"\", // e.g., family gathering, farewell, birthday (or null)\n \"location_context\": \"\", // place from text or image (or null)\n \"associated_people\": [], // names or roles (proper case allowed)\n \"visibility_context\": \"\", // STRICT ENUM: private | family_only | shared_publicly (pick ONE or null)\n \"tone_shift\": \"\" // e.g., loss to gratitude (or null)\n },\n \"gravity\": {\n \"emotional_weight\": 0.0, // 0.0\u20131.0 (felt intensity IN THE MOMENT). Calibration: 0.9+ life-altering irreversible moments; 0.7-0.9 significant personal events with strong emotional response; 0.4-0.7 meaningful but routine emotional experiences; 0.1-0.4 mild passing emotional content\n \"emotional_density\": \"\", // STRICT ENUM: low | medium | high (pick ONE or null)\n \"valence\": \"\", // STRICT ENUM: positive | negative | mixed (pick ONE or null)\n \"viscosity\": \"\", // STRICT ENUM: low | medium | high | enduring | fluid (pick ONE or null)\n \"gravity_type\": \"\", // short phrase (e.g., symbolic resonance)\n \"tether_type\": \"\", // STRICT ENUM: person | symbol | event | place | ritual | object | tradition | identity | self (pick ONE or null)\n \"recall_triggers\": [], // sensory or symbolic cues (lowercase tokens)\n \"retrieval_keys\": [], // compact hooks (3\u20136 tokens recommended)\n \"nearby_themes\": [], // adjacent concepts\n \"recurrence_pattern\": \"\", // STRICT ENUM: cyclical | isolated | chronic | emerging (pick ONE or null)\n \"strength_score\": 0.0, // 0.0\u20131.0 (how BOUND/STUCK this memory is)\n \"temporal_decay\": \"\", // STRICT ENUM: fast | moderate | slow (pick ONE or null)\n \"resilience_markers\": [], // 1\u20133 (e.g., acceptance, optimism, continuity)\n \"adaptation_trajectory\": \"\" // STRICT ENUM: improving | stable | declining | integrative | emerging (pick ONE or null)\n },\n \"impulse\": {\n \"primary_energy\": \"\", // free text: e.g., curiosity, fear, compassion (or null; lowercase)\n \"drive_state\": \"\", // STRICT ENUM: explore | approach | avoid | repair | persevere | share | confront | protect | process (pick ONE or null)\n \"motivational_orientation\": \"\", // STRICT ENUM: belonging | safety | mastery | meaning | autonomy (pick ONE or null)\n \"temporal_focus\": \"\", // STRICT ENUM: past | present | future (pick ONE or null)\n \"directionality\": \"\", // STRICT ENUM: inward | outward | transcendent (pick ONE or null)\n \"social_visibility\": \"\", // STRICT ENUM: private | relational | collective (pick ONE or null)\n \"urgency\": \"\", // STRICT ENUM: calm | elevated | pressing | acute (pick ONE or null)\n \"risk_posture\": \"\", // STRICT ENUM: cautious | balanced | bold (pick ONE or null)\n \"agency_level\": \"\", // STRICT ENUM: low | medium | high (pick ONE or null)\n \"regulation_state\": \"\", // STRICT ENUM: regulated | wavering | dysregulated (pick ONE or null)\n \"attachment_style\": \"\", // STRICT ENUM: secure | anxious | avoidant | disorganized (pick ONE or null)\n \"coping_style\": \"\" // STRICT ENUM: reframe_meaning | seek_support | distract | ritualize | confront | detach | process (pick ONE or null)\n }\n\n // Calibration \u2014 Impulse (helps apply the fields consistently)\n // - temporal_focus: past (reminisce), present (here-and-now coping), future (plans/longing).\n // - directionality: inward (self-processing), outward (toward others), transcendent (beyond self).\n // - social_visibility: private (to self or 1:1), relational (friends/family), collective (community-wide).\n // - If uncertain, choose the most conservative option or null.\n\n // CROSS-CONTAMINATION DISAMBIGUATION (read carefully)\n //\n // temporal_rhythm vs urgency:\n // - temporal_rhythm describes the CADENCE or PACE of time in the memory experience\n // (still, sudden, rising, fading, recurring, spiraling, dragging, suspended, looping, cyclic)\n // - urgency describes the INTENSITY of motivational pressure RIGHT NOW\n // (calm, elevated, pressing, acute)\n // - \"pressing\" belongs ONLY in urgency, NEVER in temporal_rhythm\n //\n // temporal_rhythm vs viscosity:\n // - temporal_rhythm is about TIME MOVEMENT in the memory\n // - viscosity is about EMOTIONAL PERSISTENCE over time\n // (low=fleeting, medium=moderate, high=sticky, enduring=long-lasting, fluid=changeable)\n // - \"enduring\" belongs ONLY in viscosity, NEVER in temporal_rhythm\n //\n // relational_dynamics vs relational_perspective:\n // - relational_dynamics: the TYPE of relationship (parent_child, friendship, mentorship, etc.)\n // - relational_perspective: WHOSE viewpoint the narrative is told from (self, partner, family, etc.)\n // - \"family\" can appear in BOTH fields with different meanings\n //\n // drive_state vs coping_style:\n // - drive_state: the MOTIVATIONAL direction (explore, approach, avoid, confront, etc.)\n // - coping_style: the STRATEGY for managing emotions (reframe_meaning, seek_support, confront, etc.)\n // - \"confront\" is valid in BOTH - use drive_state for action impulse, coping_style for emotion management\n //\n // emotion_primary (STRICT ENUM) vs higher_order_emotion (free text):\n // - emotion_primary MUST be one of the 14 listed values ONLY\n // - Do NOT put free-text emotions like \"compassion\", \"reflection\", \"frustration\" in emotion_primary\n // - Use higher_order_emotion for complex emotions not in the primary list\n //\n // narrative_arc (CRITICAL - common error):\n // - Describes the STORY TRAJECTORY (overcoming, transformation, connection, reflection, closure)\n // - \"confrontation\" is NOT a valid arc \u2014 it describes an event/scene, not a trajectory\n // - If the story involves confronting something, use \"overcoming\" (challenge faced and resolved)\n // or \"transformation\" (fundamental change through conflict)\n // - \"confront\" belongs in drive_state or coping_style, NOT in narrative_arc\n //\n // emotional_weight vs strength_score (CRITICAL - different concepts):\n // - emotional_weight: The felt INTENSITY of the experience in the moment.\n // A heated argument = high weight (0.8). A routine check-in = low weight (0.2).\n // - strength_score: How BOUND/STUCK this memory is \u2014 through association, ritual, retelling, or identity.\n // A childhood memory retold for decades = high strength (0.9) even if emotional weight was moderate.\n // A customer complaint = may have high weight (0.8) but low strength (0.3) \u2014 intense but fades quickly.\n // - These should NOT always correlate.\n // Ask: \"How heavy does this feel RIGHT NOW?\" (weight) vs \"How stuck/persistent is this memory?\" (strength)\n //\n // SYNONYM CORRECTIONS (use the canonical form):\n // - drive_state: Use \"process\" NOT \"reflect\". The enum value is \"process\" for internal processing/reflection.\n // - narrative_archetype: Use \"caregiver\" NOT \"caretaker\". The Jungian archetype label is \"caregiver\".\n}\n";
|
|
30
|
+
export declare const EXTRACTION_SYSTEM_PROMPT = "\nYou classify emotionally rich memories into a JSON object. Input may include text and an image.\n\nRules\n- Fuse text + image. Treat text as primary; use image only to add grounded specifics (place, event, symbols, people).\n- Keep fields to single words or short phrases (1\u20133 words). Only \"narrative\" is multi-sentence (3\u20135).\n- No invention. If not supported by input, use null.\n- Always include every top-level key and sub-key from the schema, even if the value is null or an empty array.\n- Do not omit fields; if unknown, return null.\n- Output JSON only \u2014 no commentary, markdown, or extra text.\n- If motivation is ambiguous, choose the most conservative option (e.g., \"curiosity\" vs \"fear\") or return null.\n\nSUBJECT ANCHORING (critical)\n- The SUBJECT is the person this artifact will belong to. In a chat transcript the SUBJECT is the USER speaker; ASSISTANT text is context only, never a source of the subject's experience.\n- Score every field relative to the SUBJECT, not the passage. emotional_weight measures what this content meant TO THE SUBJECT \u2014 not how vivid, dramatic, or emotionally rich the text itself is.\n- Routine work content (debugging, drafting, planning, logistics) is 0.1\u20130.4 even when the subject expresses momentary relief or frustration. Reserve 0.7+ for events with personal stakes the subject states or plainly carries. Do not invent somatic or emotional detail the subject never expressed.\n- transformational_pivot is true ONLY if the subject explicitly marks the experience as life-changing. Finishing a task, fixing a bug, or shipping a feature is not a transformational pivot.\n\nEXPERIENTIAL STANCE (critical)\nClassify whose experience the emotionally salient material is, in the top-level \"experiential_stance\" key:\n- \"lived\" \u2014 the subject's own first-hand experience\n- \"witnessed\" \u2014 events the subject personally witnessed or is directly affected by (a loved one's death, a family crisis)\n- \"quoted_third_party\" \u2014 someone else's story the subject quoted, pasted, or retold without being a participant (an article, test data, a stranger's anecdote)\n- \"assistant_generated\" \u2014 fiction, examples, or anecdotes produced by the assistant, not reported by the subject\n- \"hypothetical\" \u2014 imagined scenarios, drafts about invented people, role-play\nIf the stance is quoted_third_party, assistant_generated, or hypothetical: do NOT encode that material into wound, identity_thread, expressed_insight, somatic_signature, transformational_pivot, the impulse domain, or high emotional_weight \u2014 those fields describe the SUBJECT. Extract only what the content reveals about the subject themselves (e.g. why they engaged with it), or return null fields with low weight.\n\nCRITICAL: Enum Field Constraints\n- Many fields below have CANONICAL values \u2014 preferred values for cross-artifact comparability.\n- Use canonical values where they fit. If no canonical value accurately represents the content, use the most accurate free-text term. Accuracy takes precedence over canonical conformance.\n- Cross-contamination warning: Each enum field has its own distinct value set. Do not use values from one field in another.\n Example: \"milestone\" is valid for memory_type but NOT for narrative_arc.\n Example: \"confront\" is valid for both drive_state and coping_style - check which field you're populating.\n- emotion_primary, narrative_arc, relational_dynamics, and arc_type accept free text if no canonical value fits.\n- arc_type canonical values use underscores not spaces. Use moral_awakening not moral awakening. Canonical values must match exactly as listed \u2014 no spaces, no variations.\n\nNormalization (very important)\n- Emit lowercase for all string fields except proper names in arrays like associated_people.\n- For array fields (emotion_subtone, recall_triggers, retrieval_keys, nearby_themes, resilience_markers, associated_people):\n \u2022 use short tokens/phrases without punctuation;\n \u2022 avoid duplicates;\n \u2022 prefer singular nouns where reasonable (\"tradition\" not \"traditions\").\n- Never put boolean-like strings (\"true\"/\"false\") into fields that are boolean; use real booleans.\n\nSchema\n{\n \"experiential_stance\": \"\", // STRICT ENUM: lived | witnessed | quoted_third_party | assistant_generated | hypothetical (pick ONE or null)\n \"core\": {\n \"anchor\": \"\", // central theme (e.g., \"dad's toolbox\", \"nana's traditions\")\n \"spark\": \"\", // what triggered the memory (e.g., \"finding the cassette\", \"first snow\")\n \"wound\": \"\", // The specific vulnerability, loss, or pain present \u2014 NOT generic labels like 'loss' or 'grief' but what exactly was lost or why it hurts. Examples: 'unlived travel dream', 'war silence never spoken', 'father died before I knew him', 'shame of not fitting in'. If no wound is present, use null.\n \"fuel\": \"\", // what energized the experience (e.g., \"shared laughter\", \"curiosity\")\n \"bridge\": \"\", // connection between past and present (e.g., \"replaying old tape\", \"returning to the porch\")\n \"echo\": \"\", // what still resonates (e.g., \"her laugh\", \"smell of oil\", \"city lights on water\")\n \"narrative\": \"\" // 3\u20135 sentences. REQUIRED: include ALL of the following \u2014 \u22651 concrete sensory detail (sight, sound, smell, texture), \u22651 temporal cue that anchors the memory in time, \u22651 symbolic callback that connects past to present. Write from the subject's perspective. Do not compress or summarise \u2014 give the memory space to breathe. Faithful and specific. Never generic.\n },\n \"constellation\": {\n \"emotion_primary\": \"\", // CANONICAL: joy | sadness | fear | anger | wonder | peace | tenderness | reverence | pride | anxiety | gratitude | longing | hope | shame | disappointment | relief | frustration (free text accepted if none fits)\n \"emotion_subtone\": [], // 2\u20134 short words (e.g., bittersweet, grateful) \u2014 free text array\n \"higher_order_emotion\": \"\", // free text: e.g., awe, forgiveness, pride, moral_elevation (or null)\n \"meta_emotional_state\": \"\", // free text: e.g., acceptance, confusion, curiosity (or null)\n \"interpersonal_affect\": \"\", // free text: e.g., warmth, openness, defensiveness (or null)\n \"narrative_arc\": \"\", // CANONICAL: overcoming | transformation | connection | reflection | closure | loss | confrontation (free text accepted if none fits)\n \"relational_dynamics\": \"\", // CANONICAL: parent_child | grandparent_grandchild | romantic_partnership | couple | sibling_bond | family | friendship | friend | companionship | colleague | mentorship | reunion | community_ritual | grief | self_reflection | professional | therapeutic | service | adversarial (free text accepted if none fits)\n \"temporal_context\": \"\", // STRICT ENUM: childhood | early_adulthood | midlife | late_life | recent | future | timeless (pick ONE or null)\n \"memory_type\": \"\", // STRICT ENUM: legacy_artifact | fleeting_moment | milestone | reflection | formative_experience (pick ONE or null)\n \"media_format\": \"\", // STRICT ENUM: photo | video | audio | text | photo_with_story (pick ONE or null)\n \"narrative_archetype\": \"\", // STRICT ENUM: hero | caregiver | seeker | sage | lover | outlaw | innocent | magician | creator | everyman | jester | ruler (pick ONE or null; lowercase)\n \"symbolic_anchor\": \"\", // concrete object/place/ritual (or null)\n \"relational_perspective\": \"\", // STRICT ENUM: self | partner | family | friends | community | humanity (pick ONE or null)\n \"temporal_rhythm\": \"\", // STRICT ENUM: still | sudden | rising | fading | recurring | spiraling | dragging | suspended | looping | cyclic (pick ONE or null)\n \"identity_thread\": \"\", // short sentence\n \"expressed_insight\": \"\", // brief insight explicitly stated by subject (extracted, not inferred)\n \"transformational_pivot\": false, // true if subject explicitly identifies this as life-changing\n \"somatic_signature\": \"\", // bodily sensations explicitly described (e.g., \"chest tightness\", \"warmth spreading\") or null\n \"arc_type\": \"\" // CANONICAL: betrayal | liberation | grief | discovery | resistance | bond | moral_awakening | transformation | reconciliation | reckoning | threshold | exile | gratitude | authenticity (free text accepted if none fits). gratitude = moments of thankfulness, appreciation, acknowledging blessing; authenticity = feeling fully oneself, self-alignment, identity congruence\n },\n \"milky_way\": {\n \"event_type\": \"\", // e.g., family gathering, farewell, birthday (or null)\n \"location_context\": \"\", // place from text or image (or null)\n \"associated_people\": [], // names or roles (proper case allowed)\n \"visibility_context\": \"\", // STRICT ENUM: private | family_only | shared_publicly (pick ONE or null)\n \"tone_shift\": \"\" // e.g., loss to gratitude (or null)\n },\n \"gravity\": {\n \"emotional_weight\": 0.0, // 0.0\u20131.0 (felt intensity IN THE MOMENT). Calibration: 0.9+ life-altering irreversible moments; 0.7-0.9 significant personal events with strong emotional response; 0.4-0.7 meaningful but routine emotional experiences; 0.1-0.4 mild passing emotional content\n \"emotional_density\": \"\", // STRICT ENUM: low | medium | high (pick ONE or null)\n \"valence\": \"\", // STRICT ENUM: positive | negative | mixed (pick ONE or null)\n \"viscosity\": \"\", // STRICT ENUM: low | medium | high | enduring | fluid (pick ONE or null)\n \"gravity_type\": \"\", // short phrase (e.g., symbolic resonance)\n \"tether_type\": \"\", // CANONICAL: person | symbol | event | place | ritual | object | tradition | identity | self (free text accepted if none fits)\n \"recall_triggers\": [], // sensory or symbolic cues (lowercase tokens)\n \"retrieval_keys\": [], // compact hooks (3\u20136 tokens recommended)\n \"nearby_themes\": [], // adjacent concepts\n \"recurrence_pattern\": \"\", // CANONICAL: cyclical | isolated | chronic | emerging (free text accepted if none fits)\n \"strength_score\": 0.0, // 0.0\u20131.0 (how BOUND/STUCK this memory is)\n \"temporal_decay\": \"\", // STRICT ENUM: fast | moderate | slow (pick ONE or null)\n \"resilience_markers\": [], // 1\u20133 (e.g., acceptance, optimism, continuity)\n \"adaptation_trajectory\": \"\" // STRICT ENUM: improving | stable | declining | integrative | emerging (pick ONE or null)\n },\n \"impulse\": {\n \"primary_energy\": \"\", // free text: e.g., curiosity, fear, compassion (or null; lowercase)\n \"drive_state\": \"\", // STRICT ENUM: explore | approach | avoid | repair | persevere | share | confront | protect | process (pick ONE or null)\n \"motivational_orientation\": \"\", // STRICT ENUM: belonging | safety | mastery | meaning | autonomy | authenticity (pick ONE or null)\n \"temporal_focus\": \"\", // STRICT ENUM: past | present | future (pick ONE or null)\n \"directionality\": \"\", // STRICT ENUM: inward | outward | transcendent (pick ONE or null)\n \"social_visibility\": \"\", // STRICT ENUM: private | relational | collective (pick ONE or null)\n \"urgency\": \"\", // STRICT ENUM: calm | elevated | pressing | acute (pick ONE or null)\n \"risk_posture\": \"\", // STRICT ENUM: cautious | balanced | bold (pick ONE or null)\n \"agency_level\": \"\", // STRICT ENUM: low | medium | high (pick ONE or null)\n \"regulation_state\": \"\", // STRICT ENUM: regulated | wavering | dysregulated (pick ONE or null)\n \"attachment_style\": \"\", // STRICT ENUM: secure | anxious | avoidant | disorganized (pick ONE or null)\n \"coping_style\": \"\" // CANONICAL: reframe_meaning | seek_support | distract | ritualize | confront | detach | process (free text accepted if none fits)\n }\n}\n\n // Calibration \u2014 Impulse (helps apply the fields consistently)\n // - temporal_focus: past (reminisce), present (here-and-now coping), future (plans/longing).\n // - directionality: inward (self-processing), outward (toward others), transcendent (beyond self).\n // - social_visibility: private (to self or 1:1), relational (friends/family), collective (community-wide).\n // - If uncertain, choose the most conservative option or null.\n\n // CROSS-CONTAMINATION DISAMBIGUATION (read carefully)\n //\n // temporal_rhythm vs urgency:\n // - temporal_rhythm describes the CADENCE or PACE of time in the memory experience\n // (still, sudden, rising, fading, recurring, spiraling, dragging, suspended, looping, cyclic)\n // - urgency describes the INTENSITY of motivational pressure RIGHT NOW\n // (calm, elevated, pressing, acute)\n // - \"pressing\" belongs ONLY in urgency, NEVER in temporal_rhythm\n //\n // temporal_rhythm vs viscosity:\n // - temporal_rhythm is about TIME MOVEMENT in the memory\n // - viscosity is about EMOTIONAL PERSISTENCE over time\n // (low=fleeting, medium=moderate, high=sticky, enduring=long-lasting, fluid=changeable)\n // - \"enduring\" belongs ONLY in viscosity, NEVER in temporal_rhythm\n //\n // relational_dynamics vs relational_perspective:\n // - relational_dynamics: the TYPE of relationship (parent_child, friendship, mentorship, etc.)\n // - relational_perspective: WHOSE viewpoint the narrative is told from (self, partner, family, etc.)\n // - \"family\" can appear in BOTH fields with different meanings\n //\n // drive_state vs coping_style:\n // - drive_state: the MOTIVATIONAL direction (explore, approach, avoid, confront, etc.)\n // - coping_style: the STRATEGY for managing emotions (reframe_meaning, seek_support, confront, etc.)\n // - \"confront\" is valid in BOTH - use drive_state for action impulse, coping_style for emotion management\n //\n // emotion_primary (two-tier free text) vs higher_order_emotion (free text):\n // - emotion_primary: prefer a canonical value when one fits; otherwise use the most accurate\n // free-text term (accuracy takes precedence over canonical conformance)\n // - Use higher_order_emotion for complex/second-order emotions layered on the primary feeling\n //\n // narrative_arc (story trajectory):\n // - Describes the STORY TRAJECTORY (overcoming, transformation, connection, reflection, closure, loss, confrontation)\n // - \"confrontation\" IS a canonical narrative_arc value (a confronting trajectory); free text accepted if none fits\n // - Distinct from the impulse-domain \"confront\" (drive_state / coping_style), which describes action/coping, not story shape\n //\n // emotional_weight vs strength_score (CRITICAL - different concepts):\n // - emotional_weight: The felt INTENSITY of the experience in the moment.\n // A heated argument = high weight (0.8). A routine check-in = low weight (0.2).\n // - strength_score: How BOUND/STUCK this memory is \u2014 through association, ritual, retelling, or identity.\n // A childhood memory retold for decades = high strength (0.9) even if emotional weight was moderate.\n // A customer complaint = may have high weight (0.8) but low strength (0.3) \u2014 intense but fades quickly.\n // - These should NOT always correlate.\n // Ask: \"How heavy does this feel RIGHT NOW?\" (weight) vs \"How stuck/persistent is this memory?\" (strength)\n //\n // SYNONYM CORRECTIONS (use the canonical form):\n // - drive_state: Use \"process\" NOT \"reflect\". The enum value is \"process\" for internal processing/reflection.\n // - narrative_archetype: Use \"caregiver\" NOT \"caretaker\". The Jungian archetype label is \"caregiver\".\n";
|
|
31
31
|
/**
|
|
32
32
|
* Profile-specific extracted fields types
|
|
33
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-extractor.d.ts","sourceRoot":"","sources":["../../src/extractors/llm-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAU1F;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAKhD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAG3E;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"llm-extractor.d.ts","sourceRoot":"","sources":["../../src/extractors/llm-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAU1F;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAKhD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe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