@agent-receipts/schema 0.2.11 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
 
3
3
  declare const ReceiptStatus: z.ZodEnum<["pending", "completed", "failed", "timeout"]>;
4
4
  type ReceiptStatus = z.infer<typeof ReceiptStatus>;
5
- declare const ReceiptType: z.ZodEnum<["action", "verification", "judgment", "arbitration"]>;
5
+ declare const ReceiptType: z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>;
6
6
  type ReceiptType = z.infer<typeof ReceiptType>;
7
7
  declare const Environment: z.ZodEnum<["development", "production", "staging", "test"]>;
8
8
  type Environment = z.infer<typeof Environment>;
@@ -17,7 +17,7 @@ type ErrorCode = z.infer<typeof ErrorCode>;
17
17
  declare const SignablePayload: z.ZodObject<{
18
18
  receipt_id: z.ZodString;
19
19
  chain_id: z.ZodString;
20
- receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration"]>;
20
+ receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>;
21
21
  agent_id: z.ZodString;
22
22
  org_id: z.ZodString;
23
23
  action: z.ZodString;
@@ -32,7 +32,7 @@ declare const SignablePayload: z.ZodObject<{
32
32
  action: string;
33
33
  receipt_id: string;
34
34
  chain_id: string;
35
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
35
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
36
36
  agent_id: string;
37
37
  org_id: string;
38
38
  input_hash: string;
@@ -45,7 +45,7 @@ declare const SignablePayload: z.ZodObject<{
45
45
  action: string;
46
46
  receipt_id: string;
47
47
  chain_id: string;
48
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
48
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
49
49
  agent_id: string;
50
50
  org_id: string;
51
51
  input_hash: string;
@@ -62,7 +62,7 @@ declare const ActionReceipt: z.ZodObject<{
62
62
  receipt_id: z.ZodString;
63
63
  parent_receipt_id: z.ZodNullable<z.ZodString>;
64
64
  chain_id: z.ZodString;
65
- receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration"]>;
65
+ receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>;
66
66
  agent_id: z.ZodString;
67
67
  org_id: z.ZodString;
68
68
  action: z.ZodString;
@@ -93,7 +93,7 @@ declare const ActionReceipt: z.ZodObject<{
93
93
  action: string;
94
94
  receipt_id: string;
95
95
  chain_id: string;
96
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
96
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
97
97
  agent_id: string;
98
98
  org_id: string;
99
99
  input_hash: string;
@@ -123,7 +123,7 @@ declare const ActionReceipt: z.ZodObject<{
123
123
  action: string;
124
124
  receipt_id: string;
125
125
  chain_id: string;
126
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
126
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
127
127
  agent_id: string;
128
128
  org_id: string;
129
129
  input_hash: string;
@@ -429,7 +429,7 @@ declare const CreateReceiptInput: z.ZodObject<{
429
429
  agent_id: z.ZodString;
430
430
  action: z.ZodString;
431
431
  input_hash: z.ZodString;
432
- receipt_type: z.ZodDefault<z.ZodEnum<["action", "verification", "judgment", "arbitration"]>>;
432
+ receipt_type: z.ZodDefault<z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>>;
433
433
  status: z.ZodDefault<z.ZodEnum<["pending", "completed", "failed", "timeout"]>>;
434
434
  environment: z.ZodDefault<z.ZodEnum<["development", "production", "staging", "test"]>>;
435
435
  parent_receipt_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -448,7 +448,7 @@ declare const CreateReceiptInput: z.ZodObject<{
448
448
  }, "strip", z.ZodTypeAny, {
449
449
  status: "pending" | "completed" | "failed" | "timeout";
450
450
  action: string;
451
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
451
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
452
452
  agent_id: string;
453
453
  input_hash: string;
454
454
  environment: "development" | "production" | "staging" | "test";
@@ -470,7 +470,7 @@ declare const CreateReceiptInput: z.ZodObject<{
470
470
  agent_id: string;
471
471
  input_hash: string;
472
472
  status?: "pending" | "completed" | "failed" | "timeout" | undefined;
473
- receipt_type?: "action" | "verification" | "judgment" | "arbitration" | undefined;
473
+ receipt_type?: "action" | "verification" | "judgment" | "arbitration" | "memory" | undefined;
474
474
  output_hash?: string | null | undefined;
475
475
  environment?: "development" | "production" | "staging" | "test" | undefined;
476
476
  parent_receipt_id?: string | null | undefined;
@@ -540,7 +540,7 @@ declare const VerifyResponse: z.ZodObject<{
540
540
  receipt: z.ZodObject<{
541
541
  receipt_id: z.ZodString;
542
542
  chain_id: z.ZodString;
543
- receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration"]>;
543
+ receipt_type: z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>;
544
544
  agent_id: z.ZodString;
545
545
  action: z.ZodString;
546
546
  status: z.ZodEnum<["pending", "completed", "failed", "timeout"]>;
@@ -556,7 +556,7 @@ declare const VerifyResponse: z.ZodObject<{
556
556
  action: string;
557
557
  receipt_id: string;
558
558
  chain_id: string;
559
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
559
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
560
560
  agent_id: string;
561
561
  input_hash: string;
562
562
  output_hash: string | null;
@@ -570,7 +570,7 @@ declare const VerifyResponse: z.ZodObject<{
570
570
  action: string;
571
571
  receipt_id: string;
572
572
  chain_id: string;
573
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
573
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
574
574
  agent_id: string;
575
575
  input_hash: string;
576
576
  output_hash: string | null;
@@ -590,7 +590,7 @@ declare const VerifyResponse: z.ZodObject<{
590
590
  action: string;
591
591
  receipt_id: string;
592
592
  chain_id: string;
593
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
593
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
594
594
  agent_id: string;
595
595
  input_hash: string;
596
596
  output_hash: string | null;
@@ -610,7 +610,7 @@ declare const VerifyResponse: z.ZodObject<{
610
610
  action: string;
611
611
  receipt_id: string;
612
612
  chain_id: string;
613
- receipt_type: "action" | "verification" | "judgment" | "arbitration";
613
+ receipt_type: "action" | "verification" | "judgment" | "arbitration" | "memory";
614
614
  agent_id: string;
615
615
  input_hash: string;
616
616
  output_hash: string | null;
@@ -635,7 +635,7 @@ declare const ListReceiptsQuery: z.ZodObject<{
635
635
  action: z.ZodOptional<z.ZodString>;
636
636
  status: z.ZodOptional<z.ZodEnum<["pending", "completed", "failed", "timeout"]>>;
637
637
  environment: z.ZodOptional<z.ZodEnum<["development", "production", "staging", "test"]>>;
638
- receipt_type: z.ZodOptional<z.ZodEnum<["action", "verification", "judgment", "arbitration"]>>;
638
+ receipt_type: z.ZodOptional<z.ZodEnum<["action", "verification", "judgment", "arbitration", "memory"]>>;
639
639
  chain_id: z.ZodOptional<z.ZodString>;
640
640
  tag: z.ZodOptional<z.ZodString>;
641
641
  from: z.ZodOptional<z.ZodString>;
@@ -648,7 +648,7 @@ declare const ListReceiptsQuery: z.ZodObject<{
648
648
  status?: "pending" | "completed" | "failed" | "timeout" | undefined;
649
649
  action?: string | undefined;
650
650
  chain_id?: string | undefined;
651
- receipt_type?: "action" | "verification" | "judgment" | "arbitration" | undefined;
651
+ receipt_type?: "action" | "verification" | "judgment" | "arbitration" | "memory" | undefined;
652
652
  agent_id?: string | undefined;
653
653
  environment?: "development" | "production" | "staging" | "test" | undefined;
654
654
  tag?: string | undefined;
@@ -659,7 +659,7 @@ declare const ListReceiptsQuery: z.ZodObject<{
659
659
  status?: "pending" | "completed" | "failed" | "timeout" | undefined;
660
660
  action?: string | undefined;
661
661
  chain_id?: string | undefined;
662
- receipt_type?: "action" | "verification" | "judgment" | "arbitration" | undefined;
662
+ receipt_type?: "action" | "verification" | "judgment" | "arbitration" | "memory" | undefined;
663
663
  agent_id?: string | undefined;
664
664
  environment?: "development" | "production" | "staging" | "test" | undefined;
665
665
  page?: number | undefined;
@@ -727,6 +727,199 @@ declare const ErrorResponse: z.ZodObject<{
727
727
  }>;
728
728
  type ErrorResponse = z.infer<typeof ErrorResponse>;
729
729
 
730
+ declare const EntityType: z.ZodEnum<["person", "project", "organization", "preference", "fact", "context", "tool", "custom"]>;
731
+ type EntityType = z.infer<typeof EntityType>;
732
+ declare const MemoryOperation: z.ZodEnum<["observe", "create", "merge", "forget", "forget_entity", "recall", "update"]>;
733
+ type MemoryOperation = z.infer<typeof MemoryOperation>;
734
+ declare const MemoryScope: z.ZodEnum<["agent", "user", "team", "global"]>;
735
+ type MemoryScope = z.infer<typeof MemoryScope>;
736
+ declare const ConfidenceLevel: z.ZodEnum<["certain", "high", "medium", "low", "deprecated"]>;
737
+ type ConfidenceLevel = z.infer<typeof ConfidenceLevel>;
738
+ declare const Observation: z.ZodObject<{
739
+ observation_id: z.ZodString;
740
+ entity_id: z.ZodString;
741
+ content: z.ZodString;
742
+ confidence: z.ZodDefault<z.ZodEnum<["certain", "high", "medium", "low", "deprecated"]>>;
743
+ source_receipt_id: z.ZodString;
744
+ source_agent_id: z.ZodString;
745
+ source_context: z.ZodNullable<z.ZodString>;
746
+ observed_at: z.ZodString;
747
+ forgotten_at: z.ZodNullable<z.ZodString>;
748
+ forgotten_by: z.ZodNullable<z.ZodString>;
749
+ superseded_by: z.ZodNullable<z.ZodString>;
750
+ expires_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
751
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
752
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ tags: string[];
755
+ confidence: "certain" | "high" | "medium" | "low" | "deprecated";
756
+ metadata: Record<string, unknown>;
757
+ observation_id: string;
758
+ entity_id: string;
759
+ content: string;
760
+ source_receipt_id: string;
761
+ source_agent_id: string;
762
+ source_context: string | null;
763
+ observed_at: string;
764
+ forgotten_at: string | null;
765
+ forgotten_by: string | null;
766
+ superseded_by: string | null;
767
+ expires_at: string | null;
768
+ }, {
769
+ observation_id: string;
770
+ entity_id: string;
771
+ content: string;
772
+ source_receipt_id: string;
773
+ source_agent_id: string;
774
+ source_context: string | null;
775
+ observed_at: string;
776
+ forgotten_at: string | null;
777
+ forgotten_by: string | null;
778
+ superseded_by: string | null;
779
+ tags?: string[] | undefined;
780
+ confidence?: "certain" | "high" | "medium" | "low" | "deprecated" | undefined;
781
+ metadata?: Record<string, unknown> | undefined;
782
+ expires_at?: string | null | undefined;
783
+ }>;
784
+ type Observation = z.infer<typeof Observation>;
785
+ declare const Relationship: z.ZodObject<{
786
+ relationship_id: z.ZodString;
787
+ from_entity_id: z.ZodString;
788
+ to_entity_id: z.ZodString;
789
+ relationship_type: z.ZodString;
790
+ strength: z.ZodDefault<z.ZodEnum<["certain", "high", "medium", "low", "deprecated"]>>;
791
+ source_receipt_id: z.ZodString;
792
+ created_at: z.ZodString;
793
+ forgotten_at: z.ZodNullable<z.ZodString>;
794
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
795
+ }, "strip", z.ZodTypeAny, {
796
+ metadata: Record<string, unknown>;
797
+ source_receipt_id: string;
798
+ forgotten_at: string | null;
799
+ relationship_id: string;
800
+ from_entity_id: string;
801
+ to_entity_id: string;
802
+ relationship_type: string;
803
+ strength: "certain" | "high" | "medium" | "low" | "deprecated";
804
+ created_at: string;
805
+ }, {
806
+ source_receipt_id: string;
807
+ forgotten_at: string | null;
808
+ relationship_id: string;
809
+ from_entity_id: string;
810
+ to_entity_id: string;
811
+ relationship_type: string;
812
+ created_at: string;
813
+ metadata?: Record<string, unknown> | undefined;
814
+ strength?: "certain" | "high" | "medium" | "low" | "deprecated" | undefined;
815
+ }>;
816
+ type Relationship = z.infer<typeof Relationship>;
817
+ declare const Entity: z.ZodObject<{
818
+ entity_id: z.ZodString;
819
+ entity_type: z.ZodEnum<["person", "project", "organization", "preference", "fact", "context", "tool", "custom"]>;
820
+ name: z.ZodString;
821
+ aliases: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
822
+ scope: z.ZodDefault<z.ZodEnum<["agent", "user", "team", "global"]>>;
823
+ created_at: z.ZodString;
824
+ created_by_agent: z.ZodString;
825
+ created_by_receipt: z.ZodString;
826
+ forgotten_at: z.ZodNullable<z.ZodString>;
827
+ merged_into: z.ZodNullable<z.ZodString>;
828
+ attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
829
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ metadata: Record<string, unknown>;
832
+ name: string;
833
+ entity_id: string;
834
+ forgotten_at: string | null;
835
+ created_at: string;
836
+ entity_type: "custom" | "person" | "project" | "organization" | "preference" | "fact" | "context" | "tool";
837
+ aliases: string[];
838
+ scope: "agent" | "user" | "team" | "global";
839
+ created_by_agent: string;
840
+ created_by_receipt: string;
841
+ merged_into: string | null;
842
+ attributes: Record<string, unknown>;
843
+ }, {
844
+ name: string;
845
+ entity_id: string;
846
+ forgotten_at: string | null;
847
+ created_at: string;
848
+ entity_type: "custom" | "person" | "project" | "organization" | "preference" | "fact" | "context" | "tool";
849
+ created_by_agent: string;
850
+ created_by_receipt: string;
851
+ merged_into: string | null;
852
+ metadata?: Record<string, unknown> | undefined;
853
+ aliases?: string[] | undefined;
854
+ scope?: "agent" | "user" | "team" | "global" | undefined;
855
+ attributes?: Record<string, unknown> | undefined;
856
+ }>;
857
+ type Entity = z.infer<typeof Entity>;
858
+ declare const MemoryReceiptPayload: z.ZodObject<{
859
+ memory_operation: z.ZodEnum<["observe", "create", "merge", "forget", "forget_entity", "recall", "update"]>;
860
+ entity_id: z.ZodNullable<z.ZodString>;
861
+ observation_id: z.ZodNullable<z.ZodString>;
862
+ relationship_id: z.ZodNullable<z.ZodString>;
863
+ scope: z.ZodEnum<["agent", "user", "team", "global"]>;
864
+ query: z.ZodNullable<z.ZodString>;
865
+ results_count: z.ZodNullable<z.ZodNumber>;
866
+ confidence: z.ZodNullable<z.ZodEnum<["certain", "high", "medium", "low", "deprecated"]>>;
867
+ }, "strip", z.ZodTypeAny, {
868
+ confidence: "certain" | "high" | "medium" | "low" | "deprecated" | null;
869
+ observation_id: string | null;
870
+ entity_id: string | null;
871
+ relationship_id: string | null;
872
+ scope: "agent" | "user" | "team" | "global";
873
+ memory_operation: "create" | "observe" | "merge" | "forget" | "forget_entity" | "recall" | "update";
874
+ query: string | null;
875
+ results_count: number | null;
876
+ }, {
877
+ confidence: "certain" | "high" | "medium" | "low" | "deprecated" | null;
878
+ observation_id: string | null;
879
+ entity_id: string | null;
880
+ relationship_id: string | null;
881
+ scope: "agent" | "user" | "team" | "global";
882
+ memory_operation: "create" | "observe" | "merge" | "forget" | "forget_entity" | "recall" | "update";
883
+ query: string | null;
884
+ results_count: number | null;
885
+ }>;
886
+ type MemoryReceiptPayload = z.infer<typeof MemoryReceiptPayload>;
887
+ declare const MemoryQuery: z.ZodObject<{
888
+ query: z.ZodOptional<z.ZodString>;
889
+ entity_type: z.ZodOptional<z.ZodEnum<["person", "project", "organization", "preference", "fact", "context", "tool", "custom"]>>;
890
+ entity_id: z.ZodOptional<z.ZodString>;
891
+ scope: z.ZodOptional<z.ZodEnum<["agent", "user", "team", "global"]>>;
892
+ agent_id: z.ZodOptional<z.ZodString>;
893
+ confidence_min: z.ZodOptional<z.ZodEnum<["certain", "high", "medium", "low", "deprecated"]>>;
894
+ include_forgotten: z.ZodDefault<z.ZodBoolean>;
895
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
896
+ limit: z.ZodDefault<z.ZodNumber>;
897
+ page: z.ZodDefault<z.ZodNumber>;
898
+ }, "strip", z.ZodTypeAny, {
899
+ page: number;
900
+ limit: number;
901
+ include_forgotten: boolean;
902
+ agent_id?: string | undefined;
903
+ tags?: string[] | undefined;
904
+ entity_id?: string | undefined;
905
+ entity_type?: "custom" | "person" | "project" | "organization" | "preference" | "fact" | "context" | "tool" | undefined;
906
+ scope?: "agent" | "user" | "team" | "global" | undefined;
907
+ query?: string | undefined;
908
+ confidence_min?: "certain" | "high" | "medium" | "low" | "deprecated" | undefined;
909
+ }, {
910
+ agent_id?: string | undefined;
911
+ tags?: string[] | undefined;
912
+ page?: number | undefined;
913
+ limit?: number | undefined;
914
+ entity_id?: string | undefined;
915
+ entity_type?: "custom" | "person" | "project" | "organization" | "preference" | "fact" | "context" | "tool" | undefined;
916
+ scope?: "agent" | "user" | "team" | "global" | undefined;
917
+ query?: string | undefined;
918
+ confidence_min?: "certain" | "high" | "medium" | "low" | "deprecated" | undefined;
919
+ include_forgotten?: boolean | undefined;
920
+ }>;
921
+ type MemoryQuery = z.infer<typeof MemoryQuery>;
922
+
730
923
  /**
731
924
  * Validate data against a Zod schema.
732
925
  * Returns { success: true, data } or { success: false, error: ErrorResponse }
@@ -747,4 +940,4 @@ declare function formatZodError(error: z.ZodError): string;
747
940
  */
748
941
  declare function createErrorResponse(code: string, message: string, status: number): ErrorResponse;
749
942
 
750
- export { ActionReceipt, CompleteReceiptInput, ConstraintDefinition, ConstraintDefinitions, ConstraintResult, CreateReceiptInput, CriterionResult, Environment, Environment as EnvironmentType, ErrorCode, ErrorCode as ErrorCodeType, ErrorResponse, JudgmentResult, ListReceiptsQuery, PaginationMeta, ReceiptStatus, ReceiptStatus as ReceiptStatusType, ReceiptType, ReceiptType as ReceiptTypeType, Rubric, RubricCriterion, SignablePayload, SingleConstraintResult, VerifyResponse, createErrorResponse, formatZodError, validate };
943
+ export { ActionReceipt, CompleteReceiptInput, ConfidenceLevel, ConstraintDefinition, ConstraintDefinitions, ConstraintResult, CreateReceiptInput, CriterionResult, Entity, EntityType, Environment, Environment as EnvironmentType, ErrorCode, ErrorCode as ErrorCodeType, ErrorResponse, JudgmentResult, ListReceiptsQuery, MemoryOperation, MemoryQuery, MemoryReceiptPayload, MemoryScope, Observation, PaginationMeta, ReceiptStatus, ReceiptStatus as ReceiptStatusType, ReceiptType, ReceiptType as ReceiptTypeType, Relationship, Rubric, RubricCriterion, SignablePayload, SingleConstraintResult, VerifyResponse, createErrorResponse, formatZodError, validate };