@tenphi/akno-protocol 0.4.0 → 0.5.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/common.d.ts +298 -20
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +44 -0
- package/dist/common.js.map +1 -1
- package/dist/ops/answer.d.ts +108 -0
- package/dist/ops/answer.d.ts.map +1 -1
- package/dist/ops/context.d.ts +119 -11
- package/dist/ops/context.d.ts.map +1 -1
- package/dist/ops/folder.d.ts +2 -0
- package/dist/ops/folder.d.ts.map +1 -1
- package/dist/ops/graph.d.ts +5 -3
- package/dist/ops/graph.d.ts.map +1 -1
- package/dist/ops/list.d.ts +2 -0
- package/dist/ops/list.d.ts.map +1 -1
- package/dist/ops/mutate.d.ts +15 -3
- package/dist/ops/mutate.d.ts.map +1 -1
- package/dist/ops/read.d.ts +108 -0
- package/dist/ops/read.d.ts.map +1 -1
- package/dist/ops/recall.d.ts +61 -6
- package/dist/ops/recall.d.ts.map +1 -1
- package/dist/ops/retain.d.ts +253 -37
- package/dist/ops/retain.d.ts.map +1 -1
- package/dist/ops/retain.js +71 -14
- package/dist/ops/retain.js.map +1 -1
- package/dist/ops/timeline.d.ts +3 -1
- package/dist/ops/timeline.d.ts.map +1 -1
- package/dist/ops/write.d.ts +2 -0
- package/dist/ops/write.d.ts.map +1 -1
- package/dist/registry.d.ts +420 -35
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +6 -5
- package/dist/registry.js.map +1 -1
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -65,6 +65,68 @@ export declare const ResultStatus: z.ZodEnum<{
|
|
|
65
65
|
unavailable: "unavailable";
|
|
66
66
|
}>;
|
|
67
67
|
export type ResultStatus = z.infer<typeof ResultStatus>;
|
|
68
|
+
/**
|
|
69
|
+
* Semantic qualification for an Akno-managed level-one memory item.
|
|
70
|
+
*
|
|
71
|
+
* The payload stays searchable even when it is a report, proposal, hypothesis,
|
|
72
|
+
* or rejection. `answer_eligible` is the deterministic boundary that prevents
|
|
73
|
+
* those useful-but-noncanonical memories from becoming ordinary factual answer
|
|
74
|
+
* evidence.
|
|
75
|
+
*/
|
|
76
|
+
export declare const MemoryQualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
status: z.ZodLiteral<"qualified">;
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
level: z.ZodLiteral<1>;
|
|
80
|
+
kind: z.ZodEnum<{
|
|
81
|
+
question: "question";
|
|
82
|
+
claim: "claim";
|
|
83
|
+
decision: "decision";
|
|
84
|
+
preference: "preference";
|
|
85
|
+
plan: "plan";
|
|
86
|
+
event: "event";
|
|
87
|
+
}>;
|
|
88
|
+
subject: z.ZodString;
|
|
89
|
+
source_role: z.ZodEnum<{
|
|
90
|
+
unknown: "unknown";
|
|
91
|
+
user: "user";
|
|
92
|
+
assistant: "assistant";
|
|
93
|
+
external: "external";
|
|
94
|
+
}>;
|
|
95
|
+
source_speaker: z.ZodOptional<z.ZodString>;
|
|
96
|
+
commitment: z.ZodEnum<{
|
|
97
|
+
none: "none";
|
|
98
|
+
asserted: "asserted";
|
|
99
|
+
tentative: "tentative";
|
|
100
|
+
hypothetical: "hypothetical";
|
|
101
|
+
counterfactual: "counterfactual";
|
|
102
|
+
}>;
|
|
103
|
+
disposition: z.ZodEnum<{
|
|
104
|
+
active: "active";
|
|
105
|
+
proposed: "proposed";
|
|
106
|
+
accepted: "accepted";
|
|
107
|
+
rejected: "rejected";
|
|
108
|
+
resolved: "resolved";
|
|
109
|
+
cancelled: "cancelled";
|
|
110
|
+
completed: "completed";
|
|
111
|
+
superseded: "superseded";
|
|
112
|
+
}>;
|
|
113
|
+
polarity: z.ZodEnum<{
|
|
114
|
+
affirmed: "affirmed";
|
|
115
|
+
negated: "negated";
|
|
116
|
+
}>;
|
|
117
|
+
basis: z.ZodEnum<{
|
|
118
|
+
self_attested: "self_attested";
|
|
119
|
+
source_report: "source_report";
|
|
120
|
+
cited_evidence: "cited_evidence";
|
|
121
|
+
system_record: "system_record";
|
|
122
|
+
}>;
|
|
123
|
+
answer_eligible: z.ZodBoolean;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
status: z.ZodLiteral<"unavailable">;
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
answer_eligible: z.ZodLiteral<false>;
|
|
128
|
+
}, z.core.$strip>], "status">;
|
|
129
|
+
export type MemoryQualification = z.infer<typeof MemoryQualification>;
|
|
68
130
|
/**
|
|
69
131
|
* Every line Akno returns carries the file and line it came from. `confidence`
|
|
70
132
|
* is present when a fact was derived from this line — how sure the deriver is
|
|
@@ -75,6 +137,59 @@ export declare const Line: z.ZodObject<{
|
|
|
75
137
|
n: z.ZodNumber;
|
|
76
138
|
text: z.ZodString;
|
|
77
139
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
memory: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
141
|
+
status: z.ZodLiteral<"qualified">;
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
level: z.ZodLiteral<1>;
|
|
144
|
+
kind: z.ZodEnum<{
|
|
145
|
+
question: "question";
|
|
146
|
+
claim: "claim";
|
|
147
|
+
decision: "decision";
|
|
148
|
+
preference: "preference";
|
|
149
|
+
plan: "plan";
|
|
150
|
+
event: "event";
|
|
151
|
+
}>;
|
|
152
|
+
subject: z.ZodString;
|
|
153
|
+
source_role: z.ZodEnum<{
|
|
154
|
+
unknown: "unknown";
|
|
155
|
+
user: "user";
|
|
156
|
+
assistant: "assistant";
|
|
157
|
+
external: "external";
|
|
158
|
+
}>;
|
|
159
|
+
source_speaker: z.ZodOptional<z.ZodString>;
|
|
160
|
+
commitment: z.ZodEnum<{
|
|
161
|
+
none: "none";
|
|
162
|
+
asserted: "asserted";
|
|
163
|
+
tentative: "tentative";
|
|
164
|
+
hypothetical: "hypothetical";
|
|
165
|
+
counterfactual: "counterfactual";
|
|
166
|
+
}>;
|
|
167
|
+
disposition: z.ZodEnum<{
|
|
168
|
+
active: "active";
|
|
169
|
+
proposed: "proposed";
|
|
170
|
+
accepted: "accepted";
|
|
171
|
+
rejected: "rejected";
|
|
172
|
+
resolved: "resolved";
|
|
173
|
+
cancelled: "cancelled";
|
|
174
|
+
completed: "completed";
|
|
175
|
+
superseded: "superseded";
|
|
176
|
+
}>;
|
|
177
|
+
polarity: z.ZodEnum<{
|
|
178
|
+
affirmed: "affirmed";
|
|
179
|
+
negated: "negated";
|
|
180
|
+
}>;
|
|
181
|
+
basis: z.ZodEnum<{
|
|
182
|
+
self_attested: "self_attested";
|
|
183
|
+
source_report: "source_report";
|
|
184
|
+
cited_evidence: "cited_evidence";
|
|
185
|
+
system_record: "system_record";
|
|
186
|
+
}>;
|
|
187
|
+
answer_eligible: z.ZodBoolean;
|
|
188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
189
|
+
status: z.ZodLiteral<"unavailable">;
|
|
190
|
+
id: z.ZodString;
|
|
191
|
+
answer_eligible: z.ZodLiteral<false>;
|
|
192
|
+
}, z.core.$strip>], "status">>;
|
|
78
193
|
fact: z.ZodOptional<z.ZodString>;
|
|
79
194
|
}, z.core.$strip>;
|
|
80
195
|
export type Line = z.infer<typeof Line>;
|
|
@@ -123,22 +238,22 @@ export declare const GraphRelation: z.ZodEnum<{
|
|
|
123
238
|
}>;
|
|
124
239
|
export type GraphRelation = z.infer<typeof GraphRelation>;
|
|
125
240
|
export declare const GraphNodeKind: z.ZodEnum<{
|
|
241
|
+
event: "event";
|
|
126
242
|
fact: "fact";
|
|
127
243
|
entity: "entity";
|
|
128
244
|
page: "page";
|
|
129
245
|
document: "document";
|
|
130
|
-
event: "event";
|
|
131
246
|
}>;
|
|
132
247
|
export type GraphNodeKind = z.infer<typeof GraphNodeKind>;
|
|
133
248
|
/** Compact identity only. Read the referenced page or document for content. */
|
|
134
249
|
export declare const GraphNodeRef: z.ZodObject<{
|
|
135
250
|
id: z.ZodString;
|
|
136
251
|
kind: z.ZodEnum<{
|
|
252
|
+
event: "event";
|
|
137
253
|
fact: "fact";
|
|
138
254
|
entity: "entity";
|
|
139
255
|
page: "page";
|
|
140
256
|
document: "document";
|
|
141
|
-
event: "event";
|
|
142
257
|
}>;
|
|
143
258
|
slug: z.ZodOptional<z.ZodString>;
|
|
144
259
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -200,11 +315,11 @@ export declare const RecallGraphPath: z.ZodObject<{
|
|
|
200
315
|
seed: z.ZodObject<{
|
|
201
316
|
id: z.ZodString;
|
|
202
317
|
kind: z.ZodEnum<{
|
|
318
|
+
event: "event";
|
|
203
319
|
fact: "fact";
|
|
204
320
|
entity: "entity";
|
|
205
321
|
page: "page";
|
|
206
322
|
document: "document";
|
|
207
|
-
event: "event";
|
|
208
323
|
}>;
|
|
209
324
|
slug: z.ZodOptional<z.ZodString>;
|
|
210
325
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -239,11 +354,11 @@ export declare const RecallGraphPath: z.ZodObject<{
|
|
|
239
354
|
target: z.ZodObject<{
|
|
240
355
|
id: z.ZodString;
|
|
241
356
|
kind: z.ZodEnum<{
|
|
357
|
+
event: "event";
|
|
242
358
|
fact: "fact";
|
|
243
359
|
entity: "entity";
|
|
244
360
|
page: "page";
|
|
245
361
|
document: "document";
|
|
246
|
-
event: "event";
|
|
247
362
|
}>;
|
|
248
363
|
slug: z.ZodOptional<z.ZodString>;
|
|
249
364
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -278,11 +393,11 @@ export declare const RecallGraphPath: z.ZodObject<{
|
|
|
278
393
|
nodes: z.ZodArray<z.ZodObject<{
|
|
279
394
|
id: z.ZodString;
|
|
280
395
|
kind: z.ZodEnum<{
|
|
396
|
+
event: "event";
|
|
281
397
|
fact: "fact";
|
|
282
398
|
entity: "entity";
|
|
283
399
|
page: "page";
|
|
284
400
|
document: "document";
|
|
285
|
-
event: "event";
|
|
286
401
|
}>;
|
|
287
402
|
slug: z.ZodOptional<z.ZodString>;
|
|
288
403
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -419,6 +534,59 @@ export declare const Card: z.ZodObject<{
|
|
|
419
534
|
n: z.ZodNumber;
|
|
420
535
|
text: z.ZodString;
|
|
421
536
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
537
|
+
memory: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
538
|
+
status: z.ZodLiteral<"qualified">;
|
|
539
|
+
id: z.ZodString;
|
|
540
|
+
level: z.ZodLiteral<1>;
|
|
541
|
+
kind: z.ZodEnum<{
|
|
542
|
+
question: "question";
|
|
543
|
+
claim: "claim";
|
|
544
|
+
decision: "decision";
|
|
545
|
+
preference: "preference";
|
|
546
|
+
plan: "plan";
|
|
547
|
+
event: "event";
|
|
548
|
+
}>;
|
|
549
|
+
subject: z.ZodString;
|
|
550
|
+
source_role: z.ZodEnum<{
|
|
551
|
+
unknown: "unknown";
|
|
552
|
+
user: "user";
|
|
553
|
+
assistant: "assistant";
|
|
554
|
+
external: "external";
|
|
555
|
+
}>;
|
|
556
|
+
source_speaker: z.ZodOptional<z.ZodString>;
|
|
557
|
+
commitment: z.ZodEnum<{
|
|
558
|
+
none: "none";
|
|
559
|
+
asserted: "asserted";
|
|
560
|
+
tentative: "tentative";
|
|
561
|
+
hypothetical: "hypothetical";
|
|
562
|
+
counterfactual: "counterfactual";
|
|
563
|
+
}>;
|
|
564
|
+
disposition: z.ZodEnum<{
|
|
565
|
+
active: "active";
|
|
566
|
+
proposed: "proposed";
|
|
567
|
+
accepted: "accepted";
|
|
568
|
+
rejected: "rejected";
|
|
569
|
+
resolved: "resolved";
|
|
570
|
+
cancelled: "cancelled";
|
|
571
|
+
completed: "completed";
|
|
572
|
+
superseded: "superseded";
|
|
573
|
+
}>;
|
|
574
|
+
polarity: z.ZodEnum<{
|
|
575
|
+
affirmed: "affirmed";
|
|
576
|
+
negated: "negated";
|
|
577
|
+
}>;
|
|
578
|
+
basis: z.ZodEnum<{
|
|
579
|
+
self_attested: "self_attested";
|
|
580
|
+
source_report: "source_report";
|
|
581
|
+
cited_evidence: "cited_evidence";
|
|
582
|
+
system_record: "system_record";
|
|
583
|
+
}>;
|
|
584
|
+
answer_eligible: z.ZodBoolean;
|
|
585
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
586
|
+
status: z.ZodLiteral<"unavailable">;
|
|
587
|
+
id: z.ZodString;
|
|
588
|
+
answer_eligible: z.ZodLiteral<false>;
|
|
589
|
+
}, z.core.$strip>], "status">>;
|
|
422
590
|
fact: z.ZodOptional<z.ZodString>;
|
|
423
591
|
}, z.core.$strip>>;
|
|
424
592
|
superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -462,11 +630,11 @@ export declare const Card: z.ZodObject<{
|
|
|
462
630
|
seed: z.ZodObject<{
|
|
463
631
|
id: z.ZodString;
|
|
464
632
|
kind: z.ZodEnum<{
|
|
633
|
+
event: "event";
|
|
465
634
|
fact: "fact";
|
|
466
635
|
entity: "entity";
|
|
467
636
|
page: "page";
|
|
468
637
|
document: "document";
|
|
469
|
-
event: "event";
|
|
470
638
|
}>;
|
|
471
639
|
slug: z.ZodOptional<z.ZodString>;
|
|
472
640
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -501,11 +669,11 @@ export declare const Card: z.ZodObject<{
|
|
|
501
669
|
target: z.ZodObject<{
|
|
502
670
|
id: z.ZodString;
|
|
503
671
|
kind: z.ZodEnum<{
|
|
672
|
+
event: "event";
|
|
504
673
|
fact: "fact";
|
|
505
674
|
entity: "entity";
|
|
506
675
|
page: "page";
|
|
507
676
|
document: "document";
|
|
508
|
-
event: "event";
|
|
509
677
|
}>;
|
|
510
678
|
slug: z.ZodOptional<z.ZodString>;
|
|
511
679
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -540,11 +708,11 @@ export declare const Card: z.ZodObject<{
|
|
|
540
708
|
nodes: z.ZodArray<z.ZodObject<{
|
|
541
709
|
id: z.ZodString;
|
|
542
710
|
kind: z.ZodEnum<{
|
|
711
|
+
event: "event";
|
|
543
712
|
fact: "fact";
|
|
544
713
|
entity: "entity";
|
|
545
714
|
page: "page";
|
|
546
715
|
document: "document";
|
|
547
|
-
event: "event";
|
|
548
716
|
}>;
|
|
549
717
|
slug: z.ZodOptional<z.ZodString>;
|
|
550
718
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -625,6 +793,59 @@ export declare const PageCard: z.ZodObject<{
|
|
|
625
793
|
n: z.ZodNumber;
|
|
626
794
|
text: z.ZodString;
|
|
627
795
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
796
|
+
memory: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
797
|
+
status: z.ZodLiteral<"qualified">;
|
|
798
|
+
id: z.ZodString;
|
|
799
|
+
level: z.ZodLiteral<1>;
|
|
800
|
+
kind: z.ZodEnum<{
|
|
801
|
+
question: "question";
|
|
802
|
+
claim: "claim";
|
|
803
|
+
decision: "decision";
|
|
804
|
+
preference: "preference";
|
|
805
|
+
plan: "plan";
|
|
806
|
+
event: "event";
|
|
807
|
+
}>;
|
|
808
|
+
subject: z.ZodString;
|
|
809
|
+
source_role: z.ZodEnum<{
|
|
810
|
+
unknown: "unknown";
|
|
811
|
+
user: "user";
|
|
812
|
+
assistant: "assistant";
|
|
813
|
+
external: "external";
|
|
814
|
+
}>;
|
|
815
|
+
source_speaker: z.ZodOptional<z.ZodString>;
|
|
816
|
+
commitment: z.ZodEnum<{
|
|
817
|
+
none: "none";
|
|
818
|
+
asserted: "asserted";
|
|
819
|
+
tentative: "tentative";
|
|
820
|
+
hypothetical: "hypothetical";
|
|
821
|
+
counterfactual: "counterfactual";
|
|
822
|
+
}>;
|
|
823
|
+
disposition: z.ZodEnum<{
|
|
824
|
+
active: "active";
|
|
825
|
+
proposed: "proposed";
|
|
826
|
+
accepted: "accepted";
|
|
827
|
+
rejected: "rejected";
|
|
828
|
+
resolved: "resolved";
|
|
829
|
+
cancelled: "cancelled";
|
|
830
|
+
completed: "completed";
|
|
831
|
+
superseded: "superseded";
|
|
832
|
+
}>;
|
|
833
|
+
polarity: z.ZodEnum<{
|
|
834
|
+
affirmed: "affirmed";
|
|
835
|
+
negated: "negated";
|
|
836
|
+
}>;
|
|
837
|
+
basis: z.ZodEnum<{
|
|
838
|
+
self_attested: "self_attested";
|
|
839
|
+
source_report: "source_report";
|
|
840
|
+
cited_evidence: "cited_evidence";
|
|
841
|
+
system_record: "system_record";
|
|
842
|
+
}>;
|
|
843
|
+
answer_eligible: z.ZodBoolean;
|
|
844
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
845
|
+
status: z.ZodLiteral<"unavailable">;
|
|
846
|
+
id: z.ZodString;
|
|
847
|
+
answer_eligible: z.ZodLiteral<false>;
|
|
848
|
+
}, z.core.$strip>], "status">>;
|
|
628
849
|
fact: z.ZodOptional<z.ZodString>;
|
|
629
850
|
}, z.core.$strip>>;
|
|
630
851
|
superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -668,11 +889,11 @@ export declare const PageCard: z.ZodObject<{
|
|
|
668
889
|
seed: z.ZodObject<{
|
|
669
890
|
id: z.ZodString;
|
|
670
891
|
kind: z.ZodEnum<{
|
|
892
|
+
event: "event";
|
|
671
893
|
fact: "fact";
|
|
672
894
|
entity: "entity";
|
|
673
895
|
page: "page";
|
|
674
896
|
document: "document";
|
|
675
|
-
event: "event";
|
|
676
897
|
}>;
|
|
677
898
|
slug: z.ZodOptional<z.ZodString>;
|
|
678
899
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -707,11 +928,11 @@ export declare const PageCard: z.ZodObject<{
|
|
|
707
928
|
target: z.ZodObject<{
|
|
708
929
|
id: z.ZodString;
|
|
709
930
|
kind: z.ZodEnum<{
|
|
931
|
+
event: "event";
|
|
710
932
|
fact: "fact";
|
|
711
933
|
entity: "entity";
|
|
712
934
|
page: "page";
|
|
713
935
|
document: "document";
|
|
714
|
-
event: "event";
|
|
715
936
|
}>;
|
|
716
937
|
slug: z.ZodOptional<z.ZodString>;
|
|
717
938
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -746,11 +967,11 @@ export declare const PageCard: z.ZodObject<{
|
|
|
746
967
|
nodes: z.ZodArray<z.ZodObject<{
|
|
747
968
|
id: z.ZodString;
|
|
748
969
|
kind: z.ZodEnum<{
|
|
970
|
+
event: "event";
|
|
749
971
|
fact: "fact";
|
|
750
972
|
entity: "entity";
|
|
751
973
|
page: "page";
|
|
752
974
|
document: "document";
|
|
753
|
-
event: "event";
|
|
754
975
|
}>;
|
|
755
976
|
slug: z.ZodOptional<z.ZodString>;
|
|
756
977
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -881,11 +1102,11 @@ export declare const DocumentCard: z.ZodObject<{
|
|
|
881
1102
|
seed: z.ZodObject<{
|
|
882
1103
|
id: z.ZodString;
|
|
883
1104
|
kind: z.ZodEnum<{
|
|
1105
|
+
event: "event";
|
|
884
1106
|
fact: "fact";
|
|
885
1107
|
entity: "entity";
|
|
886
1108
|
page: "page";
|
|
887
1109
|
document: "document";
|
|
888
|
-
event: "event";
|
|
889
1110
|
}>;
|
|
890
1111
|
slug: z.ZodOptional<z.ZodString>;
|
|
891
1112
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -920,11 +1141,11 @@ export declare const DocumentCard: z.ZodObject<{
|
|
|
920
1141
|
target: z.ZodObject<{
|
|
921
1142
|
id: z.ZodString;
|
|
922
1143
|
kind: z.ZodEnum<{
|
|
1144
|
+
event: "event";
|
|
923
1145
|
fact: "fact";
|
|
924
1146
|
entity: "entity";
|
|
925
1147
|
page: "page";
|
|
926
1148
|
document: "document";
|
|
927
|
-
event: "event";
|
|
928
1149
|
}>;
|
|
929
1150
|
slug: z.ZodOptional<z.ZodString>;
|
|
930
1151
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -959,11 +1180,11 @@ export declare const DocumentCard: z.ZodObject<{
|
|
|
959
1180
|
nodes: z.ZodArray<z.ZodObject<{
|
|
960
1181
|
id: z.ZodString;
|
|
961
1182
|
kind: z.ZodEnum<{
|
|
1183
|
+
event: "event";
|
|
962
1184
|
fact: "fact";
|
|
963
1185
|
entity: "entity";
|
|
964
1186
|
page: "page";
|
|
965
1187
|
document: "document";
|
|
966
|
-
event: "event";
|
|
967
1188
|
}>;
|
|
968
1189
|
slug: z.ZodOptional<z.ZodString>;
|
|
969
1190
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1043,6 +1264,59 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1043
1264
|
n: z.ZodNumber;
|
|
1044
1265
|
text: z.ZodString;
|
|
1045
1266
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1267
|
+
memory: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1268
|
+
status: z.ZodLiteral<"qualified">;
|
|
1269
|
+
id: z.ZodString;
|
|
1270
|
+
level: z.ZodLiteral<1>;
|
|
1271
|
+
kind: z.ZodEnum<{
|
|
1272
|
+
question: "question";
|
|
1273
|
+
claim: "claim";
|
|
1274
|
+
decision: "decision";
|
|
1275
|
+
preference: "preference";
|
|
1276
|
+
plan: "plan";
|
|
1277
|
+
event: "event";
|
|
1278
|
+
}>;
|
|
1279
|
+
subject: z.ZodString;
|
|
1280
|
+
source_role: z.ZodEnum<{
|
|
1281
|
+
unknown: "unknown";
|
|
1282
|
+
user: "user";
|
|
1283
|
+
assistant: "assistant";
|
|
1284
|
+
external: "external";
|
|
1285
|
+
}>;
|
|
1286
|
+
source_speaker: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
commitment: z.ZodEnum<{
|
|
1288
|
+
none: "none";
|
|
1289
|
+
asserted: "asserted";
|
|
1290
|
+
tentative: "tentative";
|
|
1291
|
+
hypothetical: "hypothetical";
|
|
1292
|
+
counterfactual: "counterfactual";
|
|
1293
|
+
}>;
|
|
1294
|
+
disposition: z.ZodEnum<{
|
|
1295
|
+
active: "active";
|
|
1296
|
+
proposed: "proposed";
|
|
1297
|
+
accepted: "accepted";
|
|
1298
|
+
rejected: "rejected";
|
|
1299
|
+
resolved: "resolved";
|
|
1300
|
+
cancelled: "cancelled";
|
|
1301
|
+
completed: "completed";
|
|
1302
|
+
superseded: "superseded";
|
|
1303
|
+
}>;
|
|
1304
|
+
polarity: z.ZodEnum<{
|
|
1305
|
+
affirmed: "affirmed";
|
|
1306
|
+
negated: "negated";
|
|
1307
|
+
}>;
|
|
1308
|
+
basis: z.ZodEnum<{
|
|
1309
|
+
self_attested: "self_attested";
|
|
1310
|
+
source_report: "source_report";
|
|
1311
|
+
cited_evidence: "cited_evidence";
|
|
1312
|
+
system_record: "system_record";
|
|
1313
|
+
}>;
|
|
1314
|
+
answer_eligible: z.ZodBoolean;
|
|
1315
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1316
|
+
status: z.ZodLiteral<"unavailable">;
|
|
1317
|
+
id: z.ZodString;
|
|
1318
|
+
answer_eligible: z.ZodLiteral<false>;
|
|
1319
|
+
}, z.core.$strip>], "status">>;
|
|
1046
1320
|
fact: z.ZodOptional<z.ZodString>;
|
|
1047
1321
|
}, z.core.$strip>>;
|
|
1048
1322
|
superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1086,11 +1360,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1086
1360
|
seed: z.ZodObject<{
|
|
1087
1361
|
id: z.ZodString;
|
|
1088
1362
|
kind: z.ZodEnum<{
|
|
1363
|
+
event: "event";
|
|
1089
1364
|
fact: "fact";
|
|
1090
1365
|
entity: "entity";
|
|
1091
1366
|
page: "page";
|
|
1092
1367
|
document: "document";
|
|
1093
|
-
event: "event";
|
|
1094
1368
|
}>;
|
|
1095
1369
|
slug: z.ZodOptional<z.ZodString>;
|
|
1096
1370
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1125,11 +1399,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1125
1399
|
target: z.ZodObject<{
|
|
1126
1400
|
id: z.ZodString;
|
|
1127
1401
|
kind: z.ZodEnum<{
|
|
1402
|
+
event: "event";
|
|
1128
1403
|
fact: "fact";
|
|
1129
1404
|
entity: "entity";
|
|
1130
1405
|
page: "page";
|
|
1131
1406
|
document: "document";
|
|
1132
|
-
event: "event";
|
|
1133
1407
|
}>;
|
|
1134
1408
|
slug: z.ZodOptional<z.ZodString>;
|
|
1135
1409
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1164,11 +1438,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1164
1438
|
nodes: z.ZodArray<z.ZodObject<{
|
|
1165
1439
|
id: z.ZodString;
|
|
1166
1440
|
kind: z.ZodEnum<{
|
|
1441
|
+
event: "event";
|
|
1167
1442
|
fact: "fact";
|
|
1168
1443
|
entity: "entity";
|
|
1169
1444
|
page: "page";
|
|
1170
1445
|
document: "document";
|
|
1171
|
-
event: "event";
|
|
1172
1446
|
}>;
|
|
1173
1447
|
slug: z.ZodOptional<z.ZodString>;
|
|
1174
1448
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1296,11 +1570,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1296
1570
|
seed: z.ZodObject<{
|
|
1297
1571
|
id: z.ZodString;
|
|
1298
1572
|
kind: z.ZodEnum<{
|
|
1573
|
+
event: "event";
|
|
1299
1574
|
fact: "fact";
|
|
1300
1575
|
entity: "entity";
|
|
1301
1576
|
page: "page";
|
|
1302
1577
|
document: "document";
|
|
1303
|
-
event: "event";
|
|
1304
1578
|
}>;
|
|
1305
1579
|
slug: z.ZodOptional<z.ZodString>;
|
|
1306
1580
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1335,11 +1609,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1335
1609
|
target: z.ZodObject<{
|
|
1336
1610
|
id: z.ZodString;
|
|
1337
1611
|
kind: z.ZodEnum<{
|
|
1612
|
+
event: "event";
|
|
1338
1613
|
fact: "fact";
|
|
1339
1614
|
entity: "entity";
|
|
1340
1615
|
page: "page";
|
|
1341
1616
|
document: "document";
|
|
1342
|
-
event: "event";
|
|
1343
1617
|
}>;
|
|
1344
1618
|
slug: z.ZodOptional<z.ZodString>;
|
|
1345
1619
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1374,11 +1648,11 @@ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1374
1648
|
nodes: z.ZodArray<z.ZodObject<{
|
|
1375
1649
|
id: z.ZodString;
|
|
1376
1650
|
kind: z.ZodEnum<{
|
|
1651
|
+
event: "event";
|
|
1377
1652
|
fact: "fact";
|
|
1378
1653
|
entity: "entity";
|
|
1379
1654
|
page: "page";
|
|
1380
1655
|
document: "document";
|
|
1381
|
-
event: "event";
|
|
1382
1656
|
}>;
|
|
1383
1657
|
slug: z.ZodOptional<z.ZodString>;
|
|
1384
1658
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -1454,6 +1728,8 @@ export declare const DegradedReason: z.ZodEnum<{
|
|
|
1454
1728
|
embedding_failed: "embedding_failed";
|
|
1455
1729
|
rerank_failed: "rerank_failed";
|
|
1456
1730
|
derive_failed: "derive_failed";
|
|
1731
|
+
retain_verification_failed: "retain_verification_failed";
|
|
1732
|
+
retain_apply_failed: "retain_apply_failed";
|
|
1457
1733
|
expansion_failed: "expansion_failed";
|
|
1458
1734
|
no_vector_index: "no_vector_index";
|
|
1459
1735
|
partial_index: "partial_index";
|
|
@@ -1486,6 +1762,8 @@ export declare const ResultEnvelope: z.ZodObject<{
|
|
|
1486
1762
|
embedding_failed: "embedding_failed";
|
|
1487
1763
|
rerank_failed: "rerank_failed";
|
|
1488
1764
|
derive_failed: "derive_failed";
|
|
1765
|
+
retain_verification_failed: "retain_verification_failed";
|
|
1766
|
+
retain_apply_failed: "retain_apply_failed";
|
|
1489
1767
|
expansion_failed: "expansion_failed";
|
|
1490
1768
|
no_vector_index: "no_vector_index";
|
|
1491
1769
|
partial_index: "partial_index";
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;EAA0D,CAAC;AAChF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB;;;EAAgC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,eAAO,MAAM,eAAe;;;;EAA4C,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;;iBAGzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;EAA4C,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,mDAAmD;AACnD,eAAO,MAAM,KAAK;;;;EAAuC,CAAC;AAC1D,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;EAAqD,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAyD,CAAC;AACnF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,QAAQ,CAEnE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,YAAY,CAE3E;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAqCzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,2EAA2E;AAC3E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,qGAAqG;AACrG,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;iBAgB9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;iBASrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,qFAAqF;AACrF,eAAO,MAAM,UAAU,aAEsD,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -26,6 +26,44 @@ export const Depth = z.enum(['summary', 'lines', 'full']);
|
|
|
26
26
|
* and the search was weaker, `unavailable` means the index could not be read.
|
|
27
27
|
*/
|
|
28
28
|
export const ResultStatus = z.enum(['ok', 'empty', 'degraded', 'unavailable']);
|
|
29
|
+
/**
|
|
30
|
+
* Semantic qualification for an Akno-managed level-one memory item.
|
|
31
|
+
*
|
|
32
|
+
* The payload stays searchable even when it is a report, proposal, hypothesis,
|
|
33
|
+
* or rejection. `answer_eligible` is the deterministic boundary that prevents
|
|
34
|
+
* those useful-but-noncanonical memories from becoming ordinary factual answer
|
|
35
|
+
* evidence.
|
|
36
|
+
*/
|
|
37
|
+
export const MemoryQualification = z.discriminatedUnion('status', [
|
|
38
|
+
z.object({
|
|
39
|
+
status: z.literal('qualified'),
|
|
40
|
+
id: z.string(),
|
|
41
|
+
level: z.literal(1),
|
|
42
|
+
kind: z.enum(['claim', 'decision', 'preference', 'plan', 'event', 'question']),
|
|
43
|
+
subject: z.string(),
|
|
44
|
+
source_role: z.enum(['user', 'assistant', 'external', 'unknown']),
|
|
45
|
+
source_speaker: z.string().optional(),
|
|
46
|
+
commitment: z.enum(['asserted', 'tentative', 'hypothetical', 'counterfactual', 'none']),
|
|
47
|
+
disposition: z.enum([
|
|
48
|
+
'active',
|
|
49
|
+
'proposed',
|
|
50
|
+
'accepted',
|
|
51
|
+
'rejected',
|
|
52
|
+
'resolved',
|
|
53
|
+
'cancelled',
|
|
54
|
+
'completed',
|
|
55
|
+
'superseded',
|
|
56
|
+
]),
|
|
57
|
+
polarity: z.enum(['affirmed', 'negated']),
|
|
58
|
+
basis: z.enum(['self_attested', 'source_report', 'cited_evidence', 'system_record']),
|
|
59
|
+
answer_eligible: z.boolean(),
|
|
60
|
+
}),
|
|
61
|
+
z.object({
|
|
62
|
+
status: z.literal('unavailable'),
|
|
63
|
+
id: z.string(),
|
|
64
|
+
answer_eligible: z.literal(false),
|
|
65
|
+
}),
|
|
66
|
+
]);
|
|
29
67
|
/**
|
|
30
68
|
* Every line Akno returns carries the file and line it came from. `confidence`
|
|
31
69
|
* is present when a fact was derived from this line — how sure the deriver is
|
|
@@ -36,6 +74,8 @@ export const Line = z.object({
|
|
|
36
74
|
n: z.number().int().positive(),
|
|
37
75
|
text: z.string(),
|
|
38
76
|
confidence: z.number().min(0).max(1).optional(),
|
|
77
|
+
/** Present when this line is the visible payload of an Akno-managed memory item. */
|
|
78
|
+
memory: MemoryQualification.optional(),
|
|
39
79
|
/**
|
|
40
80
|
* The live fact this line produced, when it produced one — the handle `forget`
|
|
41
81
|
* takes to retract it.
|
|
@@ -241,6 +281,10 @@ export const DegradedReason = z.enum([
|
|
|
241
281
|
'embedding_failed',
|
|
242
282
|
'rerank_failed',
|
|
243
283
|
'derive_failed',
|
|
284
|
+
/** Automatic retention could not independently verify extracted semantics. */
|
|
285
|
+
'retain_verification_failed',
|
|
286
|
+
/** A retained source could not complete its validated write/reconciliation path. */
|
|
287
|
+
'retain_apply_failed',
|
|
244
288
|
'expansion_failed',
|
|
245
289
|
'no_vector_index',
|
|
246
290
|
'partial_index',
|