deepadata-edm-sdk 0.8.10 → 0.8.11

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 CHANGED
@@ -1,278 +1,281 @@
1
- # DeepaData EDM SDK
2
-
3
- The significance layer for AI memory.
4
-
5
- > **Versioning:** SDK package semver is independent of the EDM schema
6
- > version. The schema version this SDK emits is declared by
7
- > `src/version.ts` (`EDM_SCHEMA_VERSION`) and stamped into every
8
- > artifact's `meta.version` — currently **EDM v0.8.0**. An SDK version
9
- > number never implies a schema version.
10
-
11
- EDM artifacts encode what mattered at capture time — emotional weight, recall triggers, identity thread, arc type — so every memory architecture gets a richer signal to retrieve against.
12
-
13
- ## Why EDM
14
-
15
- Most memory systems score relevance at retrieval time. EDM encodes significance at capture time.
16
-
17
- The difference: a raw conversation chunk tells your retrieval system what was said. An EDM artifact tells it what mattered — and why it might matter again.
18
-
19
- **What this enables:**
20
- - Retrieve by emotional significance, not just semantic similarity
21
- - Surface moments that keyword and vector search miss entirely
22
- - Give memory platforms five retrieval axes instead of one
23
- - Portable, governed artifacts that travel with the person across platforms
24
-
25
- In a controlled retrieval comparison, EDM field routing outperformed raw vector similarity by 55.6 percentage points on significance-typed queries — the class of queries that have zero lexical overlap between the question and the answer. These queries require significance structure. Raw text cannot answer them.
26
-
27
- The spec is MIT licensed and published on Zenodo. The SDK is the extraction layer.
28
-
29
- ## Installation
30
-
31
- ```bash
32
- npm install deepadata-edm-sdk
33
- ```
34
-
35
- ## Quick Start
36
-
37
- ```typescript
38
- import { extractFromContent, createStatelessArtifact, validateEDM } from 'deepadata-edm-sdk';
39
-
40
- // Set your Anthropic API key
41
- process.env.ANTHROPIC_API_KEY = 'your-api-key';
42
-
43
- // Extract EDM artifact from content
44
- const artifact = await extractFromContent({
45
- content: {
46
- text: "Looking at this old photograph brings back so many memories of summer afternoons at grandmother's house...",
47
- },
48
- metadata: {
49
- subjectId: "vp-01HZ3GKWP7XTJY9QN4RD",
50
- jurisdiction: "GDPR",
51
- consentBasis: "consent",
52
- },
53
- });
54
-
55
- // Validate the artifact
56
- const validation = validateEDM(artifact);
57
- if (!validation.valid) {
58
- console.error('Validation errors:', validation.errors);
59
- }
60
-
61
- // For session use: create privacy-preserving stateless version
62
- const stateless = createStatelessArtifact(artifact);
63
-
64
- // The artifact is now ready for sealing with ddna-tools
65
- console.log(JSON.stringify(artifact, null, 2));
66
- ```
67
-
68
- ## Features
69
-
70
- - **LLM-Assisted Extraction**: Uses Claude, OpenAI, or Kimi to extract emotional data from text and images
71
- - **EDM v0.7.0 Compliant**: Full support for all 10 EDM domains
72
- - **Profile Support**: Essential (~20 fields), Extended (~45 fields), or Full (all fields)
73
- - **Text + Image Fusion**: Combines text narrative with image context
74
- - **Stateless Mode**: Privacy-preserving mode for session use
75
- - **Schema Validation**: Comprehensive Zod-based validation
76
- - **Crosswalk Mapping**: Automatic mapping to Plutchik and HMD taxonomies
77
-
78
- ## Profiles
79
-
80
- EDM v0.7.0 introduces profile-aware extraction. Choose the profile that matches your use case:
81
-
82
- | Profile | Fields | Use Case |
83
- |---------|--------|----------|
84
- | **essential** | ~20 | Memory platforms, agent frameworks, AI assistants |
85
- | **extended** | ~45 | Journaling apps, companion AI, workplace wellness |
86
- | **full** | 96 | Therapy tools, clinical applications, research |
87
-
88
- ```typescript
89
- // Essential profile - minimal extraction
90
- const artifact = await extractFromContent({
91
- content: { text: "..." },
92
- metadata: { consentBasis: "consent" },
93
- profile: "essential",
94
- });
95
-
96
- // Extended profile - balanced extraction
97
- const artifact = await extractFromContent({
98
- content: { text: "..." },
99
- metadata: { consentBasis: "consent" },
100
- profile: "extended",
101
- });
102
-
103
- // Full profile - all fields (default)
104
- const artifact = await extractFromContent({
105
- content: { text: "..." },
106
- metadata: { consentBasis: "consent" },
107
- profile: "full",
108
- });
109
- ```
110
-
111
- See [examples/](examples/) for complete profile artifacts.
112
-
113
- ## API Reference
114
-
115
- ### Extraction
116
-
117
- #### `extractFromContent(options)`
118
-
119
- Extract a complete EDM artifact from content.
120
-
121
- ```typescript
122
- const artifact = await extractFromContent({
123
- content: {
124
- text: "User's narrative...",
125
- image: "base64-encoded-image", // optional
126
- imageMediaType: "image/jpeg", // optional
127
- },
128
- metadata: {
129
- subjectId: "vp-01HZ3GKWP7XTJY9QN4RD", // optional, null in stateless
130
- jurisdiction: "GDPR", // optional
131
- consentBasis: "consent", // required
132
- locale: "en-us", // optional
133
- visibility: "private", // optional
134
- piiTier: "moderate", // optional
135
- tags: ["family", "memory"], // optional
136
- },
137
- model: "claude-sonnet-4-20250514", // optional
138
- provider: "anthropic", // optional: "anthropic" | "openai" | "kimi"
139
- profile: "full", // optional: "essential" | "extended" | "full"
140
- });
141
- ```
142
-
143
- #### `extractFromContentWithClient(client, options)`
144
-
145
- Same as above but with a provided Anthropic client.
146
-
147
- ### Stateless Mode
148
-
149
- #### `createStatelessArtifact(artifact)`
150
-
151
- Create a privacy-preserving version for session use.
152
-
153
- ```typescript
154
- const stateless = createStatelessArtifact(artifact);
155
- // - owner_user_id: null
156
- // - associated_people: []
157
- // - location_context: null
158
- // - recall_triggers: []
159
- // - retrieval_keys: []
160
- // - exportability: "restricted"
161
- ```
162
-
163
- #### `isStateless(artifact)`
164
-
165
- Check if an artifact is in stateless mode.
166
-
167
- #### `validateStateless(artifact)`
168
-
169
- Validate stateless compliance with detailed violations.
170
-
171
- ### Validation
172
-
173
- #### `validateEDM(artifact)`
174
-
175
- Validate against the complete EDM v0.7.0 schema.
176
-
177
- ```typescript
178
- const result = validateEDM(artifact);
179
- // { valid: boolean, errors: ValidationError[] }
180
- ```
181
-
182
- #### `validateDomain(domain, data)`
183
-
184
- Validate a specific domain.
185
-
186
- ```typescript
187
- const result = validateDomain("constellation", artifact.constellation);
188
- ```
189
-
190
- #### `validateCompleteness(artifact)`
191
-
192
- Check field population and completeness.
193
-
194
- ```typescript
195
- const result = validateCompleteness(artifact);
196
- // { complete: boolean, missingFields: string[], populationRate: number }
197
- ```
198
-
199
- ### Helpers
200
-
201
- #### `createEmptyArtifact()`
202
-
203
- Create an empty artifact structure for manual population.
204
-
205
- #### `createAnthropicClient(apiKey?)`
206
-
207
- Create an Anthropic client (uses `ANTHROPIC_API_KEY` env var if not provided).
208
-
209
- ## EDM v0.7.0 Domains
210
-
211
- The SDK supports all 10 EDM domains:
212
-
213
- | Domain | Description | Extraction |
214
- |--------|-------------|------------|
215
- | **meta** | Identity, provenance, consent | From metadata |
216
- | **core** | Anchor, spark, wound, fuel, bridge, echo, narrative | LLM |
217
- | **constellation** | Emotional classification, archetypes | LLM |
218
- | **milky_way** | Contextual grounding (people, place, event) | LLM |
219
- | **gravity** | Salience, weight, retrieval keys | LLM |
220
- | **impulse** | Motivational state, drive, coping | LLM |
221
- | **governance** | Jurisdiction, retention, rights | From metadata |
222
- | **telemetry** | Extraction confidence, model ID | Auto-populated |
223
- | **system** | Embeddings, indices (downstream) | Empty |
224
- | **crosswalks** | External taxonomy mappings | Auto-mapped |
225
-
226
- ## Integration with ddna-tools
227
-
228
- After extraction, seal the artifact for portability:
229
-
230
- ```typescript
231
- import { seal } from 'deepadata-ddna-tools';
232
-
233
- const envelope = await seal(artifact, privateKey, did);
234
- // Result: signed .ddna envelope
235
- ```
236
-
237
- ## Interpretation Boundary
238
-
239
- This SDK performs **extraction, not inference**. The LLM extracts what is explicitly stated or clearly implied in the source content. It does not:
240
-
241
- - Infer psychological states beyond stated emotions
242
- - Diagnose conditions or suggest treatments
243
- - Make predictions about future behavior
244
- - Generate content not grounded in the input
245
-
246
- See [docs/EXTRACTION_VS_INFERENCE.md](docs/EXTRACTION_VS_INFERENCE.md) for details.
247
-
248
- ## EU AI Act Compliance
249
-
250
- This SDK is designed for compliance with the EU AI Act. Emotional data extraction with interpretation constraints is considered lower risk than emotion inference systems. See [docs/EU_AI_ACT_COMPLIANCE.md](docs/EU_AI_ACT_COMPLIANCE.md).
251
-
252
- ## Schema Version
253
-
254
- This SDK implements EDM v0.7.0. Key changes from v0.6:
255
-
256
- - Added `meta.profile` field for conformance level declaration
257
- - Profile-aware extraction with tailored system prompts
258
- - Profile-aware confidence scoring
259
- - Three conformance profiles: essential (24 fields), extended (50 fields), full (96 fields)
260
- - Added Kimi K2 extractor support via MoonshotAI API
261
-
262
- ## Works With Your Memory Stack
263
-
264
- EDM artifacts are format-agnostic episodic memory records. The structured fields integrate naturally with the retrieval infrastructure you already use:
265
-
266
- - **Embedding-based retrieval** — embed core.narrative for semantic similarity search against any vector store
267
- - **Temporal knowledge graphs** map associated_people and tether_type as graph nodes and edges; temporal_context and recurrence_pattern as edge properties
268
- - **Lexical search (BM25)** — recall_triggers and retrieval_keys are designed for activation-path matching against conversation fragments
269
- - **Hybrid retrieval** — combine any of the above; EDM fields give each axis a significance-weighted signal rather than raw text
270
- - **Significance activation** — the DeepaData activation API returns ranked artifact IDs for the current conversation moment (deepadata.com/docs/activation)
271
-
272
- EDM encodes the episodic layer. The retrieval architecture is yours.
273
-
274
- See deepadata.com/docs for integration guides.
275
-
276
- ## License
277
-
278
- MIT
1
+ # DeepaData EDM SDK
2
+
3
+ The significance layer for AI memory.
4
+
5
+ > **Versioning:** SDK package semver is independent of the EDM schema
6
+ > version. The schema version this SDK emits is DERIVED from the
7
+ > installed `edm-spec` package (`src/version.ts`, `EDM_SCHEMA_VERSION`)
8
+ > and stamped into every artifact's `meta.version` — bumping the
9
+ > `edm-spec` dependency updates the stamp. An SDK version number never
10
+ > implies a schema version.
11
+
12
+ EDM artifacts encode what mattered at capture time — emotional weight, recall triggers, identity thread, arc type — so every memory architecture gets a richer signal to retrieve against.
13
+
14
+ ## Why EDM
15
+
16
+ Most memory systems score relevance at retrieval time. EDM encodes significance at capture time.
17
+
18
+ The difference: a raw conversation chunk tells your retrieval system what was said. An EDM artifact tells it what mattered — and why it might matter again.
19
+
20
+ **What this enables:**
21
+ - Retrieve by emotional significance, not just semantic similarity
22
+ - Surface moments that keyword and vector search miss entirely
23
+ - Give memory platforms five retrieval axes instead of one
24
+ - Portable, governed artifacts that travel with the person across platforms
25
+
26
+ In a controlled retrieval comparison, EDM field routing outperformed raw vector similarity by 55.6 percentage points on significance-typed queries — the class of queries that have zero lexical overlap between the question and the answer. These queries require significance structure. Raw text cannot answer them.
27
+
28
+ The spec is MIT licensed and published on Zenodo. The SDK is the extraction layer.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ npm install deepadata-edm-sdk
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```typescript
39
+ import { extractFromContent, createStatelessArtifact, validateEDM } from 'deepadata-edm-sdk';
40
+
41
+ // Set your Anthropic API key
42
+ process.env.ANTHROPIC_API_KEY = 'your-api-key';
43
+
44
+ // Extract EDM artifact from content
45
+ const artifact = await extractFromContent({
46
+ content: {
47
+ text: "Looking at this old photograph brings back so many memories of summer afternoons at grandmother's house...",
48
+ },
49
+ metadata: {
50
+ subjectId: "vp-01HZ3GKWP7XTJY9QN4RD",
51
+ jurisdiction: "GDPR",
52
+ consentBasis: "consent",
53
+ },
54
+ });
55
+
56
+ // Validate the artifact
57
+ const validation = validateEDM(artifact);
58
+ if (!validation.valid) {
59
+ console.error('Validation errors:', validation.errors);
60
+ }
61
+
62
+ // For session use: create privacy-preserving stateless version
63
+ const stateless = createStatelessArtifact(artifact);
64
+
65
+ // The artifact is now ready for sealing with ddna-tools
66
+ console.log(JSON.stringify(artifact, null, 2));
67
+ ```
68
+
69
+ ## Features
70
+
71
+ - **LLM-Assisted Extraction**: Uses Claude, OpenAI, or Kimi to extract emotional data from text and images
72
+ - **EDM v0.7.0 Compliant**: Full support for all 10 EDM domains
73
+ - **Profile Support**: Essential (~20 fields), Extended (~45 fields), or Full (all fields)
74
+ - **Text + Image Fusion**: Combines text narrative with image context
75
+ - **Stateless Mode**: Privacy-preserving mode for session use
76
+ - **Schema Validation**: Comprehensive Zod-based validation
77
+ - **Crosswalk Mapping**: Automatic mapping to Plutchik and HMD taxonomies
78
+
79
+ ## Profiles
80
+
81
+ EDM v0.7.0 introduces profile-aware extraction. Choose the profile that matches your use case:
82
+
83
+ | Profile | Fields | Use Case |
84
+ |---------|--------|----------|
85
+ | **essential** | ~20 | Memory platforms, agent frameworks, AI assistants |
86
+ | **extended** | ~45 | Journaling apps, companion AI, workplace wellness |
87
+ | **full** | all | Therapy tools, clinical applications, research |
88
+
89
+ ```typescript
90
+ // Essential profile - minimal extraction
91
+ const artifact = await extractFromContent({
92
+ content: { text: "..." },
93
+ metadata: { consentBasis: "consent" },
94
+ profile: "essential",
95
+ });
96
+
97
+ // Extended profile - balanced extraction
98
+ const artifact = await extractFromContent({
99
+ content: { text: "..." },
100
+ metadata: { consentBasis: "consent" },
101
+ profile: "extended",
102
+ });
103
+
104
+ // Full profile - all fields (default)
105
+ const artifact = await extractFromContent({
106
+ content: { text: "..." },
107
+ metadata: { consentBasis: "consent" },
108
+ profile: "full",
109
+ });
110
+ ```
111
+
112
+ See [examples/](examples/) for complete profile artifacts.
113
+
114
+ ## API Reference
115
+
116
+ ### Extraction
117
+
118
+ #### `extractFromContent(options)`
119
+
120
+ Extract a complete EDM artifact from content.
121
+
122
+ ```typescript
123
+ const artifact = await extractFromContent({
124
+ content: {
125
+ text: "User's narrative...",
126
+ image: "base64-encoded-image", // optional
127
+ imageMediaType: "image/jpeg", // optional
128
+ },
129
+ metadata: {
130
+ subjectId: "vp-01HZ3GKWP7XTJY9QN4RD", // optional, null in stateless
131
+ jurisdiction: "GDPR", // optional
132
+ consentBasis: "consent", // required
133
+ locale: "en-us", // optional
134
+ visibility: "private", // optional
135
+ piiTier: "moderate", // optional
136
+ tags: ["family", "memory"], // optional
137
+ },
138
+ model: "claude-sonnet-4-20250514", // optional
139
+ provider: "anthropic", // optional: "anthropic" | "openai" | "kimi"
140
+ profile: "full", // optional: "essential" | "extended" | "full"
141
+ });
142
+ ```
143
+
144
+ #### `extractFromContentWithClient(client, options)`
145
+
146
+ Same as above but with a provided Anthropic client.
147
+
148
+ ### Stateless Mode
149
+
150
+ #### `createStatelessArtifact(artifact)`
151
+
152
+ Create a privacy-preserving version for session use.
153
+
154
+ ```typescript
155
+ const stateless = createStatelessArtifact(artifact);
156
+ // - owner_user_id: null
157
+ // - associated_people: []
158
+ // - location_context: null
159
+ // - recall_triggers: []
160
+ // - retrieval_keys: []
161
+ // - exportability: "restricted"
162
+ ```
163
+
164
+ #### `isStateless(artifact)`
165
+
166
+ Check if an artifact is in stateless mode.
167
+
168
+ #### `validateStateless(artifact)`
169
+
170
+ Validate stateless compliance with detailed violations.
171
+
172
+ ### Validation
173
+
174
+ #### `validateEDM(artifact)`
175
+
176
+ Validate against the complete EDM v0.7.0 schema.
177
+
178
+ ```typescript
179
+ const result = validateEDM(artifact);
180
+ // { valid: boolean, errors: ValidationError[] }
181
+ ```
182
+
183
+ #### `validateDomain(domain, data)`
184
+
185
+ Validate a specific domain.
186
+
187
+ ```typescript
188
+ const result = validateDomain("constellation", artifact.constellation);
189
+ ```
190
+
191
+ #### `validateCompleteness(artifact)`
192
+
193
+ Check field population and completeness.
194
+
195
+ ```typescript
196
+ const result = validateCompleteness(artifact);
197
+ // { complete: boolean, missingFields: string[], populationRate: number }
198
+ ```
199
+
200
+ ### Helpers
201
+
202
+ #### `createEmptyArtifact()`
203
+
204
+ Create an empty artifact structure for manual population.
205
+
206
+ #### `createAnthropicClient(apiKey?)`
207
+
208
+ Create an Anthropic client (uses `ANTHROPIC_API_KEY` env var if not provided).
209
+
210
+ ## EDM v0.7.0 Domains
211
+
212
+ The SDK supports all 10 EDM domains:
213
+
214
+ | Domain | Description | Extraction |
215
+ |--------|-------------|------------|
216
+ | **meta** | Identity, provenance, consent | From metadata |
217
+ | **core** | Anchor, spark, wound, fuel, bridge, echo, narrative | LLM |
218
+ | **constellation** | Emotional classification, archetypes | LLM |
219
+ | **milky_way** | Contextual grounding (people, place, event) | LLM |
220
+ | **gravity** | Salience, weight, retrieval keys | LLM |
221
+ | **impulse** | Motivational state, drive, coping | LLM |
222
+ | **governance** | Jurisdiction, retention, rights | From metadata |
223
+ | **telemetry** | Extraction confidence, model ID | Auto-populated |
224
+ | **system** | Embeddings, indices (downstream) | Empty |
225
+ | **crosswalks** | External taxonomy mappings | Auto-mapped |
226
+
227
+ ## Integration with ddna-tools
228
+
229
+ After extraction, seal the artifact for portability:
230
+
231
+ ```typescript
232
+ import { seal } from 'deepadata-ddna-tools';
233
+
234
+ const envelope = await seal(artifact, privateKey, did);
235
+ // Result: signed .ddna envelope
236
+ ```
237
+
238
+ ## Interpretation Boundary
239
+
240
+ This SDK performs **extraction, not inference**. The LLM extracts what is explicitly stated or clearly implied in the source content. It does not:
241
+
242
+ - Infer psychological states beyond stated emotions
243
+ - Diagnose conditions or suggest treatments
244
+ - Make predictions about future behavior
245
+ - Generate content not grounded in the input
246
+
247
+ See [docs/EXTRACTION_VS_INFERENCE.md](docs/EXTRACTION_VS_INFERENCE.md) for details.
248
+
249
+ ## EU AI Act Compliance
250
+
251
+ This SDK is designed for compliance with the EU AI Act. Emotional data extraction with interpretation constraints is considered lower risk than emotion inference systems. See [docs/EU_AI_ACT_COMPLIANCE.md](docs/EU_AI_ACT_COMPLIANCE.md).
252
+
253
+ ## Schema Version
254
+
255
+ The EDM schema version this SDK implements and stamps is the installed
256
+ `edm-spec` package version, derived at module load in `src/version.ts` —
257
+ never hardcoded. Historical: key changes introduced at EDM v0.7.0 from v0.6:
258
+
259
+ - Added `meta.profile` field for conformance level declaration
260
+ - Profile-aware extraction with tailored system prompts
261
+ - Profile-aware confidence scoring
262
+ - Three conformance profiles: essential (24 fields), extended (50 fields), full (96 fields)
263
+ - Added Kimi K2 extractor support via MoonshotAI API
264
+
265
+ ## Works With Your Memory Stack
266
+
267
+ EDM artifacts are format-agnostic episodic memory records. The structured fields integrate naturally with the retrieval infrastructure you already use:
268
+
269
+ - **Embedding-based retrieval** — embed core.narrative for semantic similarity search against any vector store
270
+ - **Temporal knowledge graphs** — map associated_people and tether_type as graph nodes and edges; temporal_context and recurrence_pattern as edge properties
271
+ - **Lexical search (BM25)** — recall_triggers and retrieval_keys are designed for activation-path matching against conversation fragments
272
+ - **Hybrid retrieval** — combine any of the above; EDM fields give each axis a significance-weighted signal rather than raw text
273
+ - **Significance activation** — the DeepaData activation API returns ranked artifact IDs for the current conversation moment (deepadata.com/docs/activation)
274
+
275
+ EDM encodes the episodic layer. The retrieval architecture is yours.
276
+
277
+ See deepadata.com/docs for integration guides.
278
+
279
+ ## License
280
+
281
+ MIT
@@ -8,24 +8,33 @@ import Anthropic from "@anthropic-ai/sdk";
8
8
  import type { EdmArtifact, ExtractionOptions, LlmExtractedFields, EdmProfile, PartnerProfileId } from "./schema/types.js";
9
9
  import { type ConversationMessage, type ChunkConversationOptions } from "./conversation.js";
10
10
  /**
11
- * Essential Profile: 5 domains, 24 fields
11
+ * PROFILE MANIFESTS GUARDED RESTATEMENT of the spec composites.
12
+ *
13
+ * Field membership per profile is defined by the edm-spec composite
14
+ * schemas (edm.v0.8.{essential,extended,full}.schema.json in the installed
15
+ * `edm-spec` package). These literal manifests restate the composites'
16
+ * property sets so the arrays keep literal-union TypeScript types and a
17
+ * stable filter order; tests/spec-drift-guard.test.ts asserts exact set
18
+ * equality with the composites in both directions and fails `npm test`
19
+ * loudly on any drift (tidy-the-house commitment, ADR-0030).
20
+ */
21
+ /**
22
+ * Essential Profile: 5 domains
12
23
  * Target: memory platforms, agent frameworks, AI assistants
24
+ * Field membership = the spec essential composite (drift-guarded).
13
25
  */
14
26
  export declare const ESSENTIAL_PROFILE_FIELDS: {
15
27
  readonly meta: readonly ["id", "version", "profile", "created_at", "updated_at", "locale", "owner_user_id", "parent_id", "visibility", "pii_tier", "consent_basis"];
16
28
  readonly core: readonly ["anchor", "spark", "wound", "fuel", "bridge", "echo"];
17
29
  readonly constellation: readonly ["emotion_primary", "emotion_subtone", "narrative_arc"];
18
- readonly governance: readonly ["jurisdiction", "retention_policy", "subject_rights"];
19
- readonly telemetry: readonly ["entry_confidence", "extraction_model"];
30
+ readonly governance: readonly ["jurisdiction", "retention_policy", "subject_rights", "exportability", "k_anonymity", "policy_labels", "masking_rules"];
31
+ readonly telemetry: readonly ["entry_confidence", "extraction_model", "extraction_provider", "extraction_notes"];
20
32
  };
21
33
  /**
22
- * Extended Profile: 8 domains, ~50 fields
23
- * Target: journaling apps, companion AI, workplace wellness
24
- */
25
- /**
26
- * Extended Profile: 7 domains, 50 fields
34
+ * Extended Profile: 7 domains
27
35
  * Target: journaling apps, companion AI, workplace wellness
28
36
  * Impulse domain is NOT included in Extended profile
37
+ * Field membership = the spec extended composite (drift-guarded).
29
38
  */
30
39
  export declare const EXTENDED_PROFILE_FIELDS: {
31
40
  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"];
@@ -33,15 +42,16 @@ export declare const EXTENDED_PROFILE_FIELDS: {
33
42
  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
43
  readonly milky_way: readonly ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"];
35
44
  readonly gravity: readonly ["emotional_weight", "valence", "tether_type", "recurrence_pattern", "strength_score"];
36
- readonly governance: readonly ["jurisdiction", "retention_policy", "subject_rights"];
37
- readonly telemetry: readonly ["entry_confidence", "extraction_model"];
45
+ readonly governance: readonly ["jurisdiction", "retention_policy", "subject_rights", "exportability", "k_anonymity", "policy_labels", "masking_rules"];
46
+ readonly telemetry: readonly ["entry_confidence", "extraction_model", "extraction_provider", "extraction_notes"];
38
47
  };
39
48
  /**
40
49
  * Full Profile: all 10 domains, all fields
41
50
  * Target: therapy platforms, clinical tools, regulated systems
51
+ * Field membership = the spec full composite (drift-guarded).
42
52
  */
43
53
  export declare const FULL_PROFILE_FIELDS: {
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"];
54
+ readonly meta: readonly ["id", "version", "profile", "created_at", "source_timestamp", "updated_at", "locale", "owner_user_id", "parent_id", "visibility", "pii_tier", "source_type", "source_context", "consent_basis", "consent_scope", "consent_revoked_at", "tags"];
45
55
  readonly core: readonly ["anchor", "spark", "wound", "fuel", "bridge", "echo", "narrative"];
46
56
  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
57
  readonly milky_way: readonly ["event_type", "location_context", "associated_people", "visibility_context", "tone_shift"];
@@ -111,7 +121,7 @@ export interface ConversationChunkArtifact {
111
121
  * extracted as a conversation input (framed, subject-anchored, stance-guarded),
112
122
  * and chunks after the first are threaded to the first chunk's artifact via
113
123
  * metadata.parentId. meta.parent_id is defined in ALL profile schemas
114
- * (essential, extended, full) per the published v0.8.0 schema set, so the
124
+ * (essential, extended, full) per the published v0.8-line schema set, so the
115
125
  * linkage appears in the artifact body for every profile — populated for
116
126
  * chunks past the first, explicit null otherwise (whitepaper §5.2 No
117
127
  * Omission). Short conversations produce exactly one artifact.