@x12i/memorix-scoper-contracts 1.0.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 (62) hide show
  1. package/README.md +9 -0
  2. package/dist/errors.d.ts +24 -0
  3. package/dist/errors.d.ts.map +1 -0
  4. package/dist/errors.js +70 -0
  5. package/dist/errors.js.map +1 -0
  6. package/dist/evidence.d.ts +2 -0
  7. package/dist/evidence.d.ts.map +1 -0
  8. package/dist/evidence.js +2 -0
  9. package/dist/evidence.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +3 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/schemas/catalog.d.ts +441 -0
  15. package/dist/schemas/catalog.d.ts.map +1 -0
  16. package/dist/schemas/catalog.js +55 -0
  17. package/dist/schemas/catalog.js.map +1 -0
  18. package/dist/schemas/evidence.d.ts +602 -0
  19. package/dist/schemas/evidence.d.ts.map +1 -0
  20. package/dist/schemas/evidence.js +83 -0
  21. package/dist/schemas/evidence.js.map +1 -0
  22. package/dist/schemas/index.d.ts +6 -0
  23. package/dist/schemas/index.d.ts.map +1 -0
  24. package/dist/schemas/index.js +6 -0
  25. package/dist/schemas/index.js.map +1 -0
  26. package/dist/schemas/nexum-persist.d.ts +47 -0
  27. package/dist/schemas/nexum-persist.d.ts.map +1 -0
  28. package/dist/schemas/nexum-persist.js +27 -0
  29. package/dist/schemas/nexum-persist.js.map +1 -0
  30. package/dist/schemas/profile.d.ts +69 -0
  31. package/dist/schemas/profile.d.ts.map +1 -0
  32. package/dist/schemas/profile.js +15 -0
  33. package/dist/schemas/profile.js.map +1 -0
  34. package/dist/schemas/request.d.ts +296 -0
  35. package/dist/schemas/request.d.ts.map +1 -0
  36. package/dist/schemas/request.js +98 -0
  37. package/dist/schemas/request.js.map +1 -0
  38. package/dist/schemas.d.ts +1077 -0
  39. package/dist/schemas.d.ts.map +1 -0
  40. package/dist/schemas.js +199 -0
  41. package/dist/schemas.js.map +1 -0
  42. package/dist/schemas.test.d.ts +2 -0
  43. package/dist/schemas.test.d.ts.map +1 -0
  44. package/dist/schemas.test.js +29 -0
  45. package/dist/schemas.test.js.map +1 -0
  46. package/package.json +53 -0
  47. package/schemas/CatalogEntry.json +17 -0
  48. package/schemas/CatalogEntry.schema.json +157 -0
  49. package/schemas/EvidenceBundle.json +15 -0
  50. package/schemas/EvidenceBundle.schema.json +469 -0
  51. package/schemas/EvidenceItem.json +15 -0
  52. package/schemas/EvidenceRef.json +9 -0
  53. package/schemas/EvidenceSelection.schema.json +83 -0
  54. package/schemas/RetrievalPlan.json +13 -0
  55. package/schemas/RetrievalPlan.schema.json +73 -0
  56. package/schemas/RetrievalStep.json +14 -0
  57. package/schemas/ScopeRequest.json +28 -0
  58. package/schemas/ScopeRequest.schema.json +108 -0
  59. package/schemas/ScoperBudgets.json +14 -0
  60. package/schemas/ScoperProfile.json +17 -0
  61. package/schemas/TrustedExecutionContext.json +22 -0
  62. package/schemas/TrustedExecutionContext.schema.json +129 -0
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/ScopeRequest",
4
+ "definitions": {
5
+ "ScopeRequest": {
6
+ "type": "object",
7
+ "properties": {
8
+ "profileId": { "type": "string", "minLength": 1 },
9
+ "question": { "type": "string", "minLength": 1, "maxLength": 16000 },
10
+ "focus": {
11
+ "type": "object",
12
+ "properties": {
13
+ "subjectIds": { "type": "array", "items": { "type": "string" } },
14
+ "objectTypes": { "type": "array", "items": { "type": "string" } },
15
+ "contentTypes": { "type": "array", "items": { "type": "string" } },
16
+ "tags": { "type": "array", "items": { "type": "string" } }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "budgets": { "type": "object", "additionalProperties": true },
21
+ "options": { "type": "object", "additionalProperties": true },
22
+ "hints": { "type": "object", "additionalProperties": true }
23
+ },
24
+ "required": ["profileId", "question"],
25
+ "additionalProperties": false
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "$ref": "#/definitions/ScopeRequest",
3
+ "definitions": {
4
+ "ScopeRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "objective": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "maxLength": 4000
11
+ },
12
+ "seeds": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "properties": {
17
+ "kind": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 128
21
+ },
22
+ "id": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 256
26
+ }
27
+ },
28
+ "required": [
29
+ "kind",
30
+ "id"
31
+ ],
32
+ "additionalProperties": false
33
+ },
34
+ "maxItems": 50
35
+ },
36
+ "domains": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 128
42
+ },
43
+ "maxItems": 20
44
+ },
45
+ "timeRange": {
46
+ "type": "object",
47
+ "properties": {
48
+ "from": {
49
+ "type": "string",
50
+ "format": "date-time"
51
+ },
52
+ "to": {
53
+ "type": "string",
54
+ "format": "date-time"
55
+ }
56
+ },
57
+ "required": [
58
+ "from",
59
+ "to"
60
+ ],
61
+ "additionalProperties": false
62
+ },
63
+ "freshness": {
64
+ "type": "object",
65
+ "properties": {
66
+ "includeStable": {
67
+ "type": "boolean"
68
+ },
69
+ "includeLive": {
70
+ "type": "boolean"
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ "requestedLimits": {
76
+ "type": "object",
77
+ "properties": {
78
+ "maxEvidenceItems": {
79
+ "type": "integer",
80
+ "exclusiveMinimum": 0,
81
+ "maximum": 10000
82
+ },
83
+ "maxRelationshipDepth": {
84
+ "type": "integer",
85
+ "minimum": 0,
86
+ "maximum": 32
87
+ },
88
+ "deadlineMs": {
89
+ "type": "integer",
90
+ "exclusiveMinimum": 0,
91
+ "maximum": 600000
92
+ }
93
+ },
94
+ "additionalProperties": false
95
+ },
96
+ "responseMode": {
97
+ "type": "string",
98
+ "const": "evidence-bundle"
99
+ }
100
+ },
101
+ "required": [
102
+ "objective"
103
+ ],
104
+ "additionalProperties": false
105
+ }
106
+ },
107
+ "$schema": "http://json-schema.org/draft-07/schema#"
108
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ScoperBudgets",
4
+ "type": "object",
5
+ "properties": {
6
+ "maxSubjects": { "type": "integer" },
7
+ "maxEvidenceItems": { "type": "integer" },
8
+ "maxParallelCalls": { "type": "integer" },
9
+ "maxTokens": { "type": "integer" },
10
+ "maxWallClockMs": { "type": "integer" },
11
+ "maxEstateSessions": { "type": "integer" }
12
+ },
13
+ "additionalProperties": false
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ScoperProfile",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": { "type": "string" },
7
+ "version": { "type": "string" },
8
+ "title": { "type": "string" },
9
+ "description": { "type": "string" },
10
+ "allowedCapabilities": { "type": "array", "items": { "type": "string" } },
11
+ "defaultBudgets": { "type": "object" },
12
+ "systemPrompt": { "type": "string" },
13
+ "epistemicRules": { "type": "array", "items": { "type": "string" } },
14
+ "tags": { "type": "array", "items": { "type": "string" } }
15
+ },
16
+ "required": ["id", "version", "title", "description", "allowedCapabilities", "systemPrompt"]
17
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "TrustedExecutionContext",
4
+ "type": "object",
5
+ "properties": {
6
+ "orgId": { "type": "string", "minLength": 1 },
7
+ "agentIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1 },
8
+ "caller": { "type": "string", "minLength": 1 },
9
+ "traceId": { "type": "string", "minLength": 1 },
10
+ "correlationId": { "type": "string", "minLength": 1 },
11
+ "identity": {
12
+ "type": "object",
13
+ "properties": {
14
+ "subject": { "type": "string" },
15
+ "roles": { "type": "array", "items": { "type": "string" } }
16
+ },
17
+ "additionalProperties": false
18
+ }
19
+ },
20
+ "required": ["orgId", "agentIds", "caller", "traceId"],
21
+ "additionalProperties": false
22
+ }
@@ -0,0 +1,129 @@
1
+ {
2
+ "$ref": "#/definitions/TrustedExecutionContext",
3
+ "definitions": {
4
+ "TrustedExecutionContext": {
5
+ "type": "object",
6
+ "properties": {
7
+ "orgId": {
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "agentIds": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "minItems": 1
18
+ },
19
+ "callerId": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "principalId": {
24
+ "type": "string"
25
+ },
26
+ "permissions": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "classificationCeiling": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "traceId": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "deadlineAt": {
41
+ "type": "string",
42
+ "format": "date-time"
43
+ },
44
+ "budgets": {
45
+ "type": "object",
46
+ "properties": {
47
+ "maxWallTimeMs": {
48
+ "type": "integer",
49
+ "exclusiveMinimum": 0
50
+ },
51
+ "maxSdkCalls": {
52
+ "type": "integer",
53
+ "exclusiveMinimum": 0
54
+ },
55
+ "maxPages": {
56
+ "type": "integer",
57
+ "exclusiveMinimum": 0
58
+ },
59
+ "maxRecords": {
60
+ "type": "integer",
61
+ "exclusiveMinimum": 0
62
+ },
63
+ "maxBytes": {
64
+ "type": "integer",
65
+ "exclusiveMinimum": 0
66
+ },
67
+ "maxEvidenceItems": {
68
+ "type": "integer",
69
+ "exclusiveMinimum": 0
70
+ },
71
+ "maxRelationshipDepth": {
72
+ "type": "integer",
73
+ "minimum": 0
74
+ },
75
+ "maxReasoningRounds": {
76
+ "type": "integer",
77
+ "exclusiveMinimum": 0
78
+ },
79
+ "maxParallelCalls": {
80
+ "type": "integer",
81
+ "exclusiveMinimum": 0
82
+ }
83
+ },
84
+ "required": [
85
+ "maxWallTimeMs",
86
+ "maxSdkCalls",
87
+ "maxPages",
88
+ "maxRecords",
89
+ "maxBytes",
90
+ "maxEvidenceItems",
91
+ "maxRelationshipDepth",
92
+ "maxReasoningRounds",
93
+ "maxParallelCalls"
94
+ ],
95
+ "additionalProperties": false
96
+ },
97
+ "flags": {
98
+ "type": "object",
99
+ "properties": {
100
+ "bagsOnly": {
101
+ "type": "boolean"
102
+ },
103
+ "nexumExploreEnabled": {
104
+ "type": "boolean"
105
+ }
106
+ },
107
+ "required": [
108
+ "bagsOnly",
109
+ "nexumExploreEnabled"
110
+ ],
111
+ "additionalProperties": false
112
+ }
113
+ },
114
+ "required": [
115
+ "orgId",
116
+ "agentIds",
117
+ "callerId",
118
+ "permissions",
119
+ "classificationCeiling",
120
+ "traceId",
121
+ "deadlineAt",
122
+ "budgets",
123
+ "flags"
124
+ ],
125
+ "additionalProperties": false
126
+ }
127
+ },
128
+ "$schema": "http://json-schema.org/draft-07/schema#"
129
+ }