@x12i/memorix-scoper-contracts 2.0.0 → 2.1.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.
Files changed (45) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/project-record.d.ts +9 -0
  6. package/dist/project-record.d.ts.map +1 -1
  7. package/dist/project-record.js +13 -0
  8. package/dist/project-record.js.map +1 -1
  9. package/dist/schemas/index.d.ts +1 -1
  10. package/dist/schemas/index.d.ts.map +1 -1
  11. package/dist/schemas/index.js +1 -1
  12. package/dist/schemas/index.js.map +1 -1
  13. package/dist/schemas/profile.d.ts +2 -2
  14. package/dist/schemas/request.d.ts +258 -0
  15. package/dist/schemas/request.d.ts.map +1 -1
  16. package/dist/schemas/request.js +105 -0
  17. package/dist/schemas/request.js.map +1 -1
  18. package/package.json +4 -4
  19. package/schemas/CatalogEntry.json +67 -17
  20. package/schemas/CatalogEntry.schema.json +157 -157
  21. package/schemas/EvidenceBundle.json +315 -15
  22. package/schemas/EvidenceBundle.schema.json +469 -469
  23. package/schemas/EvidenceItem.json +156 -15
  24. package/schemas/EvidenceRef.json +113 -9
  25. package/schemas/EvidenceSelection.schema.json +83 -83
  26. package/schemas/IntentScopeRequest.json +24 -0
  27. package/schemas/IntentScopeResponse.json +119 -0
  28. package/schemas/RetrievalPlan.json +221 -13
  29. package/schemas/RetrievalPlan.schema.json +73 -73
  30. package/schemas/RetrievalStep.json +51 -14
  31. package/schemas/ScopeIntent.json +84 -0
  32. package/schemas/ScopeRequest.json +151 -28
  33. package/schemas/ScopeRequest.schema.json +108 -108
  34. package/schemas/ScoperBudgets.json +48 -14
  35. package/schemas/ScoperProfile.json +114 -17
  36. package/schemas/TrustedExecutionContext.json +57 -22
  37. package/schemas/TrustedExecutionContext.schema.json +129 -129
  38. package/dist/schemas.d.ts +0 -1077
  39. package/dist/schemas.d.ts.map +0 -1
  40. package/dist/schemas.js +0 -199
  41. package/dist/schemas.js.map +0 -1
  42. package/dist/schemas.test.d.ts +0 -2
  43. package/dist/schemas.test.d.ts.map +0 -1
  44. package/dist/schemas.test.js +0 -29
  45. package/dist/schemas.test.js.map +0 -1
@@ -1,15 +1,156 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "EvidenceItem",
4
- "type": "object",
5
- "properties": {
6
- "id": { "type": "string" },
7
- "ref": { "type": "object" },
8
- "summary": { "type": "string" },
9
- "epistemic": { "type": "string" },
10
- "confidence": { "type": "number" },
11
- "payload": {},
12
- "tags": { "type": "array", "items": { "type": "string" } }
13
- },
14
- "required": ["id", "ref", "summary", "epistemic"]
15
- }
1
+ {
2
+ "$ref": "#/definitions/EvidenceItem",
3
+ "definitions": {
4
+ "EvidenceItem": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "ref": {
12
+ "anyOf": [
13
+ {
14
+ "type": "object",
15
+ "properties": {
16
+ "kind": {
17
+ "type": "string",
18
+ "const": "subject"
19
+ },
20
+ "orgId": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "objectType": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "contentType": {
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "recordId": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "revision": {
37
+ "anyOf": [
38
+ {
39
+ "type": "integer"
40
+ },
41
+ {
42
+ "type": "string"
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "required": [
48
+ "kind",
49
+ "orgId",
50
+ "objectType",
51
+ "contentType",
52
+ "recordId"
53
+ ],
54
+ "additionalProperties": false
55
+ },
56
+ {
57
+ "type": "object",
58
+ "properties": {
59
+ "kind": {
60
+ "type": "string",
61
+ "const": "estate-bag"
62
+ },
63
+ "orgId": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "sessionId": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "bagId": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ },
75
+ "path": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "required": [
80
+ "kind",
81
+ "orgId",
82
+ "sessionId",
83
+ "bagId"
84
+ ],
85
+ "additionalProperties": false
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "kind": {
91
+ "type": "string",
92
+ "const": "knowledge-explore"
93
+ },
94
+ "orgId": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "exploreQueryId": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "nodeIds": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ },
109
+ "required": [
110
+ "kind",
111
+ "orgId",
112
+ "exploreQueryId"
113
+ ],
114
+ "additionalProperties": false
115
+ }
116
+ ]
117
+ },
118
+ "summary": {
119
+ "type": "string",
120
+ "minLength": 1
121
+ },
122
+ "epistemic": {
123
+ "type": "string",
124
+ "enum": [
125
+ "OBSERVED",
126
+ "INFERRED",
127
+ "POLICY_CANDIDATE",
128
+ "REACHABLE",
129
+ "UNKNOWN",
130
+ "CONFLICTING"
131
+ ]
132
+ },
133
+ "confidence": {
134
+ "type": "number",
135
+ "minimum": 0,
136
+ "maximum": 1
137
+ },
138
+ "payload": {},
139
+ "tags": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string"
143
+ }
144
+ }
145
+ },
146
+ "required": [
147
+ "id",
148
+ "ref",
149
+ "summary",
150
+ "epistemic"
151
+ ],
152
+ "additionalProperties": false
153
+ }
154
+ },
155
+ "$schema": "http://json-schema.org/draft-07/schema#"
156
+ }
@@ -1,9 +1,113 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "EvidenceRef",
4
- "oneOf": [
5
- { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "subject" } } },
6
- { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "estate-bag" } } },
7
- { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "knowledge-explore" } } }
8
- ]
9
- }
1
+ {
2
+ "$ref": "#/definitions/EvidenceRef",
3
+ "definitions": {
4
+ "EvidenceRef": {
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "kind": {
10
+ "type": "string",
11
+ "const": "subject"
12
+ },
13
+ "orgId": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "objectType": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "contentType": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "recordId": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "revision": {
30
+ "anyOf": [
31
+ {
32
+ "type": "integer"
33
+ },
34
+ {
35
+ "type": "string"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ "required": [
41
+ "kind",
42
+ "orgId",
43
+ "objectType",
44
+ "contentType",
45
+ "recordId"
46
+ ],
47
+ "additionalProperties": false
48
+ },
49
+ {
50
+ "type": "object",
51
+ "properties": {
52
+ "kind": {
53
+ "type": "string",
54
+ "const": "estate-bag"
55
+ },
56
+ "orgId": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "sessionId": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ },
64
+ "bagId": {
65
+ "type": "string",
66
+ "minLength": 1
67
+ },
68
+ "path": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "required": [
73
+ "kind",
74
+ "orgId",
75
+ "sessionId",
76
+ "bagId"
77
+ ],
78
+ "additionalProperties": false
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "kind": {
84
+ "type": "string",
85
+ "const": "knowledge-explore"
86
+ },
87
+ "orgId": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "exploreQueryId": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "nodeIds": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ }
100
+ }
101
+ },
102
+ "required": [
103
+ "kind",
104
+ "orgId",
105
+ "exploreQueryId"
106
+ ],
107
+ "additionalProperties": false
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "$schema": "http://json-schema.org/draft-07/schema#"
113
+ }
@@ -1,83 +1,83 @@
1
- {
2
- "$ref": "#/definitions/EvidenceSelection",
3
- "definitions": {
4
- "EvidenceSelection": {
5
- "type": "object",
6
- "properties": {
7
- "selectedEvidenceIds": {
8
- "type": "array",
9
- "items": {
10
- "type": "string"
11
- }
12
- },
13
- "conflicts": {
14
- "type": "array",
15
- "items": {
16
- "type": "object",
17
- "properties": {
18
- "description": {
19
- "type": "string"
20
- },
21
- "evidenceIds": {
22
- "type": "array",
23
- "items": {
24
- "type": "string"
25
- }
26
- },
27
- "resolution": {
28
- "type": "string",
29
- "enum": [
30
- "unresolved",
31
- "source-precedence",
32
- "different-context"
33
- ]
34
- }
35
- },
36
- "required": [
37
- "description",
38
- "evidenceIds",
39
- "resolution"
40
- ],
41
- "additionalProperties": false
42
- }
43
- },
44
- "unknowns": {
45
- "type": "array",
46
- "items": {
47
- "type": "object",
48
- "properties": {
49
- "question": {
50
- "type": "string"
51
- },
52
- "reason": {
53
- "type": "string"
54
- },
55
- "missingDatasets": {
56
- "type": "array",
57
- "items": {
58
- "type": "string"
59
- }
60
- }
61
- },
62
- "required": [
63
- "question",
64
- "reason"
65
- ],
66
- "additionalProperties": false
67
- }
68
- },
69
- "notes": {
70
- "type": "array",
71
- "items": {
72
- "type": "string"
73
- }
74
- }
75
- },
76
- "required": [
77
- "selectedEvidenceIds"
78
- ],
79
- "additionalProperties": false
80
- }
81
- },
82
- "$schema": "http://json-schema.org/draft-07/schema#"
83
- }
1
+ {
2
+ "$ref": "#/definitions/EvidenceSelection",
3
+ "definitions": {
4
+ "EvidenceSelection": {
5
+ "type": "object",
6
+ "properties": {
7
+ "selectedEvidenceIds": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "string"
11
+ }
12
+ },
13
+ "conflicts": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "description": {
19
+ "type": "string"
20
+ },
21
+ "evidenceIds": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "resolution": {
28
+ "type": "string",
29
+ "enum": [
30
+ "unresolved",
31
+ "source-precedence",
32
+ "different-context"
33
+ ]
34
+ }
35
+ },
36
+ "required": [
37
+ "description",
38
+ "evidenceIds",
39
+ "resolution"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "unknowns": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "properties": {
49
+ "question": {
50
+ "type": "string"
51
+ },
52
+ "reason": {
53
+ "type": "string"
54
+ },
55
+ "missingDatasets": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ }
61
+ },
62
+ "required": [
63
+ "question",
64
+ "reason"
65
+ ],
66
+ "additionalProperties": false
67
+ }
68
+ },
69
+ "notes": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string"
73
+ }
74
+ }
75
+ },
76
+ "required": [
77
+ "selectedEvidenceIds"
78
+ ],
79
+ "additionalProperties": false
80
+ }
81
+ },
82
+ "$schema": "http://json-schema.org/draft-07/schema#"
83
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$ref": "#/definitions/IntentScopeRequest",
3
+ "definitions": {
4
+ "IntentScopeRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "recordId": {
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "intent": {
12
+ "type": "string",
13
+ "minLength": 1
14
+ }
15
+ },
16
+ "required": [
17
+ "recordId",
18
+ "intent"
19
+ ],
20
+ "additionalProperties": false
21
+ }
22
+ },
23
+ "$schema": "http://json-schema.org/draft-07/schema#"
24
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "$ref": "#/definitions/IntentScopeResponse",
3
+ "definitions": {
4
+ "IntentScopeResponse": {
5
+ "type": "object",
6
+ "properties": {
7
+ "recordId": {
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "intent": {
12
+ "type": "string",
13
+ "minLength": 1
14
+ },
15
+ "anchor": {
16
+ "type": "object",
17
+ "properties": {
18
+ "objectType": {
19
+ "type": "string",
20
+ "minLength": 1
21
+ },
22
+ "objects": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "contentType": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "found": {
32
+ "type": "boolean"
33
+ },
34
+ "record": {
35
+ "anyOf": [
36
+ {
37
+ "type": "object",
38
+ "additionalProperties": {}
39
+ },
40
+ {
41
+ "type": "null"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ "required": [
47
+ "contentType",
48
+ "found",
49
+ "record"
50
+ ],
51
+ "additionalProperties": false
52
+ },
53
+ "minItems": 1
54
+ }
55
+ },
56
+ "required": [
57
+ "objectType",
58
+ "objects"
59
+ ],
60
+ "additionalProperties": false
61
+ },
62
+ "related": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "object",
66
+ "properties": {
67
+ "field": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "objectType": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ },
75
+ "records": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "properties": {
80
+ "recordId": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "objects": {
85
+ "type": "array",
86
+ "items": {
87
+ "$ref": "#/definitions/IntentScopeResponse/properties/anchor/properties/objects/items"
88
+ },
89
+ "minItems": 1
90
+ }
91
+ },
92
+ "required": [
93
+ "recordId",
94
+ "objects"
95
+ ],
96
+ "additionalProperties": false
97
+ }
98
+ }
99
+ },
100
+ "required": [
101
+ "field",
102
+ "objectType",
103
+ "records"
104
+ ],
105
+ "additionalProperties": false
106
+ }
107
+ }
108
+ },
109
+ "required": [
110
+ "recordId",
111
+ "intent",
112
+ "anchor",
113
+ "related"
114
+ ],
115
+ "additionalProperties": false
116
+ }
117
+ },
118
+ "$schema": "http://json-schema.org/draft-07/schema#"
119
+ }