@popmelt.com/core 0.8.17 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.d.mts CHANGED
@@ -5,6 +5,11 @@ type ImprintScope = {
5
5
  kind: ImprintScopeKind;
6
6
  values: string[];
7
7
  };
8
+ /** A store-qualified address; abstraction level is intentionally not encoded. */
9
+ type ImprintExplanationRef = {
10
+ storeId: string;
11
+ explanationId: string;
12
+ };
8
13
  type ImprintEvidence = {
9
14
  id: string;
10
15
  kind: 'observation' | 'application' | 'confirmation' | 'correction' | 'exception' | 'rejection';
@@ -48,6 +53,10 @@ type ImprintRelation = {
48
53
  rationale: string;
49
54
  createdAt: string;
50
55
  };
56
+ type QualifiedImprintRelation = Omit<ImprintRelation, 'fromId' | 'toId'> & {
57
+ from: ImprintExplanationRef;
58
+ to: ImprintExplanationRef;
59
+ };
51
60
  type ImprintGraph = {
52
61
  version: 1;
53
62
  projectId: string;
@@ -140,6 +149,16 @@ type ImprintContext = {
140
149
  pendingGroundingExplanationIds?: string[];
141
150
  correctionExplanationIds?: string[];
142
151
  relations?: Array<Pick<ImprintRelation, 'id' | 'type' | 'fromId' | 'toId' | 'rationale'>>;
152
+ /** Explicit target/reference language detected in the current request. */
153
+ retrievalIntent?: {
154
+ target: string;
155
+ reference: string;
156
+ };
157
+ /**
158
+ * Directly relevant rejected history. These are warnings, not active
159
+ * explanations, and therefore cannot be cited as Imprint usage.
160
+ */
161
+ historicalCaveats?: Array<Pick<ImprintExplanation, 'id' | 'kind' | 'statement' | 'rationale' | 'scope' | 'state'>>;
143
162
  };
144
163
 
145
164
  type Provider = 'claude' | 'codex' | 'copilot';
@@ -163,6 +182,7 @@ type PopmeltOptions = {
163
182
  type PopmeltHandle = {
164
183
  port: number;
165
184
  projectId: string;
185
+ storeId?: string;
166
186
  close: () => Promise<void>;
167
187
  };
168
188
 
@@ -254,6 +274,7 @@ type ImprintMutationDraft = {
254
274
  title: string;
255
275
  detail: string;
256
276
  };
277
+ usedExplanationIds?: string[];
257
278
  appliedExplanationIds: string[];
258
279
  mutations: ProposedMutation[];
259
280
  grounding?: {
@@ -267,6 +288,7 @@ type ImprintApplicationDraft = {
267
288
  title: string;
268
289
  detail: string;
269
290
  };
291
+ usedExplanationIds?: string[];
270
292
  appliedExplanationIds: string[];
271
293
  grounding?: {
272
294
  explanationId: string;
@@ -284,6 +306,8 @@ type ImprintRecognitionDraft = {
284
306
  type ImprintDraft = ImprintMutationDraft | ImprintApplicationDraft | ImprintRecognitionDraft | {
285
307
  decision: 'none';
286
308
  reason: ImprintNoopReason;
309
+ usedExplanationIds?: string[];
310
+ appliedExplanationIds?: string[];
287
311
  duplicateOfExplanationId?: string;
288
312
  scopeComparison?: 'equivalent' | 'existing_broader';
289
313
  };
@@ -336,6 +360,9 @@ declare class ImprintService {
336
360
  }): Promise<'applied' | 'pending_correction'>;
337
361
  }
338
362
 
363
+ declare function imprintExplanationRef(storeId: string, explanationId: string): ImprintExplanationRef;
364
+ declare function qualifyImprintRelation(storeId: string, relation: ImprintRelation): QualifiedImprintRelation;
365
+
339
366
  type StartPopmeltOptions = PopmeltOptions & {
340
367
  force?: boolean;
341
368
  detached?: boolean;
@@ -344,4 +371,4 @@ type StartPopmeltOptions = PopmeltOptions & {
344
371
  };
345
372
  declare function startPopmelt(options?: StartPopmeltOptions): Promise<PopmeltHandle>;
346
373
 
347
- export { type ImprintConcrete, type ImprintContext, type ImprintEvidence, type ImprintExplanation, type ImprintExplanationKind, type ImprintExplanationState, type ImprintGraph, type ImprintGroundingAction, type ImprintMutation, type ImprintRelation, type ImprintRelationType, type ImprintScope, ImprintService, ImprintStore, type ImprintThreadSummary, type ImprintTransaction, type PopmeltHandle, type PopmeltOptions, type StartPopmeltOptions, formatImprintPrompt, parseImprintDraft, startPopmelt };
374
+ export { type ImprintConcrete, type ImprintContext, type ImprintEvidence, type ImprintExplanation, type ImprintExplanationKind, type ImprintExplanationRef, type ImprintExplanationState, type ImprintGraph, type ImprintGroundingAction, type ImprintMutation, type ImprintRelation, type ImprintRelationType, type ImprintScope, ImprintService, ImprintStore, type ImprintThreadSummary, type ImprintTransaction, type PopmeltHandle, type PopmeltOptions, type QualifiedImprintRelation, type StartPopmeltOptions, formatImprintPrompt, imprintExplanationRef, parseImprintDraft, qualifyImprintRelation, startPopmelt };