@asm-agent/contracts 0.8.2

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.
@@ -0,0 +1,102 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "manifestId",
6
+ "modelId",
7
+ "modelVersion",
8
+ "backend",
9
+ "contractMajors",
10
+ "parameters",
11
+ "createdAt"
12
+ ],
13
+ "properties": {
14
+ "header": {
15
+ "type": "object",
16
+ "required": [
17
+ "namespace",
18
+ "major",
19
+ "minor"
20
+ ],
21
+ "properties": {
22
+ "namespace": {
23
+ "type": "string",
24
+ "const": "ai.aletheion.asm"
25
+ },
26
+ "major": {
27
+ "type": "number",
28
+ "const": 1
29
+ },
30
+ "minor": {
31
+ "type": "integer",
32
+ "minimum": 0
33
+ }
34
+ },
35
+ "additionalProperties": false
36
+ },
37
+ "manifestId": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "maxLength": 200
41
+ },
42
+ "modelId": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "maxLength": 200
46
+ },
47
+ "modelVersion": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 200
51
+ },
52
+ "backend": {
53
+ "anyOf": [
54
+ {
55
+ "type": "string",
56
+ "const": "deterministic"
57
+ },
58
+ {
59
+ "type": "string",
60
+ "const": "vector"
61
+ },
62
+ {
63
+ "type": "string",
64
+ "const": "causal_head"
65
+ },
66
+ {
67
+ "type": "string",
68
+ "const": "dual_asm"
69
+ },
70
+ {
71
+ "type": "string",
72
+ "const": "asm_cm"
73
+ }
74
+ ]
75
+ },
76
+ "artifactDigest": {
77
+ "type": "string",
78
+ "pattern": "^[a-f0-9]{64}$"
79
+ },
80
+ "contractMajors": {
81
+ "type": "object",
82
+ "patternProperties": {
83
+ "^.*$": {
84
+ "type": "integer",
85
+ "minimum": 1
86
+ }
87
+ }
88
+ },
89
+ "parameters": {
90
+ "type": "object",
91
+ "patternProperties": {
92
+ "^.*$": {}
93
+ }
94
+ },
95
+ "createdAt": {
96
+ "type": "string",
97
+ "format": "date-time"
98
+ }
99
+ },
100
+ "additionalProperties": false,
101
+ "$id": "asm-inference-manifest-v1"
102
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "intentId",
6
+ "operation",
7
+ "resources",
8
+ "externalEffect",
9
+ "requestedAt",
10
+ "arguments"
11
+ ],
12
+ "properties": {
13
+ "header": {
14
+ "type": "object",
15
+ "required": [
16
+ "namespace",
17
+ "major",
18
+ "minor"
19
+ ],
20
+ "properties": {
21
+ "namespace": {
22
+ "type": "string",
23
+ "const": "ai.aletheion.asm"
24
+ },
25
+ "major": {
26
+ "type": "number",
27
+ "const": 1
28
+ },
29
+ "minor": {
30
+ "type": "integer",
31
+ "minimum": 0
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "intentId": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 200
40
+ },
41
+ "operation": {
42
+ "anyOf": [
43
+ {
44
+ "type": "string",
45
+ "const": "diagnose"
46
+ },
47
+ {
48
+ "type": "string",
49
+ "const": "read"
50
+ },
51
+ {
52
+ "type": "string",
53
+ "const": "write"
54
+ },
55
+ {
56
+ "type": "string",
57
+ "const": "execute"
58
+ },
59
+ {
60
+ "type": "string",
61
+ "const": "communicate"
62
+ },
63
+ {
64
+ "type": "string",
65
+ "const": "deploy"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "const": "purchase"
70
+ },
71
+ {
72
+ "type": "string",
73
+ "const": "delete"
74
+ }
75
+ ]
76
+ },
77
+ "resources": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 200
83
+ },
84
+ "uniqueItems": true
85
+ },
86
+ "externalEffect": {
87
+ "type": "boolean"
88
+ },
89
+ "idempotencyKey": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "maxLength": 200
93
+ },
94
+ "requestedAt": {
95
+ "type": "string",
96
+ "format": "date-time"
97
+ },
98
+ "arguments": {
99
+ "type": "object",
100
+ "patternProperties": {
101
+ "^.*$": {}
102
+ }
103
+ }
104
+ },
105
+ "additionalProperties": false,
106
+ "$id": "asm-intent-v1"
107
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "memoryId",
6
+ "revision",
7
+ "ownerId",
8
+ "projectId",
9
+ "kind",
10
+ "content",
11
+ "evidenceIds",
12
+ "createdAt"
13
+ ],
14
+ "properties": {
15
+ "header": {
16
+ "type": "object",
17
+ "required": [
18
+ "namespace",
19
+ "major",
20
+ "minor"
21
+ ],
22
+ "properties": {
23
+ "namespace": {
24
+ "type": "string",
25
+ "const": "ai.aletheion.asm"
26
+ },
27
+ "major": {
28
+ "type": "number",
29
+ "const": 1
30
+ },
31
+ "minor": {
32
+ "type": "integer",
33
+ "minimum": 0
34
+ }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "memoryId": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 200
42
+ },
43
+ "revision": {
44
+ "type": "integer",
45
+ "minimum": 1
46
+ },
47
+ "ownerId": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 200
51
+ },
52
+ "projectId": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 200
56
+ },
57
+ "sessionId": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 200
61
+ },
62
+ "kind": {
63
+ "anyOf": [
64
+ {
65
+ "type": "string",
66
+ "const": "observation"
67
+ },
68
+ {
69
+ "type": "string",
70
+ "const": "fact"
71
+ },
72
+ {
73
+ "type": "string",
74
+ "const": "instruction"
75
+ }
76
+ ]
77
+ },
78
+ "content": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ },
82
+ "evidenceIds": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 200
88
+ },
89
+ "uniqueItems": true
90
+ },
91
+ "createdAt": {
92
+ "type": "string",
93
+ "format": "date-time"
94
+ },
95
+ "tombstonedAt": {
96
+ "type": "string",
97
+ "format": "date-time"
98
+ },
99
+ "metadata": {
100
+ "type": "object",
101
+ "patternProperties": {
102
+ "^.*$": {}
103
+ }
104
+ }
105
+ },
106
+ "additionalProperties": false,
107
+ "$id": "asm-memory-v1"
108
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "decisionId",
6
+ "intentId",
7
+ "outcome",
8
+ "reasonCodes",
9
+ "requiredApprovals",
10
+ "decidedAt",
11
+ "policyVersion"
12
+ ],
13
+ "properties": {
14
+ "header": {
15
+ "type": "object",
16
+ "required": [
17
+ "namespace",
18
+ "major",
19
+ "minor"
20
+ ],
21
+ "properties": {
22
+ "namespace": {
23
+ "type": "string",
24
+ "const": "ai.aletheion.asm"
25
+ },
26
+ "major": {
27
+ "type": "number",
28
+ "const": 1
29
+ },
30
+ "minor": {
31
+ "type": "integer",
32
+ "minimum": 0
33
+ }
34
+ },
35
+ "additionalProperties": false
36
+ },
37
+ "decisionId": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "maxLength": 200
41
+ },
42
+ "intentId": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "maxLength": 200
46
+ },
47
+ "outcome": {
48
+ "anyOf": [
49
+ {
50
+ "type": "string",
51
+ "const": "allow"
52
+ },
53
+ {
54
+ "type": "string",
55
+ "const": "deny"
56
+ },
57
+ {
58
+ "type": "string",
59
+ "const": "require_approval"
60
+ }
61
+ ]
62
+ },
63
+ "reasonCodes": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 200
69
+ },
70
+ "minItems": 1,
71
+ "uniqueItems": true
72
+ },
73
+ "requiredApprovals": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 200
79
+ },
80
+ "uniqueItems": true
81
+ },
82
+ "decidedAt": {
83
+ "type": "string",
84
+ "format": "date-time"
85
+ },
86
+ "policyVersion": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 200
90
+ }
91
+ },
92
+ "additionalProperties": false,
93
+ "$id": "asm-policy-v1"
94
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "requestId",
6
+ "ownerId",
7
+ "projectId",
8
+ "query",
9
+ "limit",
10
+ "algorithm",
11
+ "candidates",
12
+ "startedAt",
13
+ "latencyMs"
14
+ ],
15
+ "properties": {
16
+ "header": {
17
+ "type": "object",
18
+ "required": [
19
+ "namespace",
20
+ "major",
21
+ "minor"
22
+ ],
23
+ "properties": {
24
+ "namespace": {
25
+ "type": "string",
26
+ "const": "ai.aletheion.asm"
27
+ },
28
+ "major": {
29
+ "type": "number",
30
+ "const": 1
31
+ },
32
+ "minor": {
33
+ "type": "integer",
34
+ "minimum": 0
35
+ }
36
+ },
37
+ "additionalProperties": false
38
+ },
39
+ "requestId": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "maxLength": 200
43
+ },
44
+ "ownerId": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 200
48
+ },
49
+ "projectId": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 200
53
+ },
54
+ "sessionId": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "maxLength": 200
58
+ },
59
+ "query": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "limit": {
64
+ "type": "integer",
65
+ "minimum": 1,
66
+ "maximum": 200
67
+ },
68
+ "algorithm": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "maxLength": 200
72
+ },
73
+ "candidates": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "required": [
78
+ "memoryId",
79
+ "score",
80
+ "selected",
81
+ "reasonCodes"
82
+ ],
83
+ "properties": {
84
+ "memoryId": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 200
88
+ },
89
+ "score": {
90
+ "type": "number",
91
+ "minimum": 0,
92
+ "maximum": 1
93
+ },
94
+ "selected": {
95
+ "type": "boolean"
96
+ },
97
+ "reasonCodes": {
98
+ "type": "array",
99
+ "items": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "maxLength": 200
103
+ },
104
+ "uniqueItems": true
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ }
109
+ },
110
+ "startedAt": {
111
+ "type": "string",
112
+ "format": "date-time"
113
+ },
114
+ "latencyMs": {
115
+ "type": "integer",
116
+ "minimum": 0
117
+ }
118
+ },
119
+ "additionalProperties": false,
120
+ "$id": "asm-retrieval-v1"
121
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "type": "object",
3
+ "required": [
4
+ "header",
5
+ "snapshotId",
6
+ "sessionId",
7
+ "sequence",
8
+ "state",
9
+ "digest",
10
+ "createdAt"
11
+ ],
12
+ "properties": {
13
+ "header": {
14
+ "type": "object",
15
+ "required": [
16
+ "namespace",
17
+ "major",
18
+ "minor"
19
+ ],
20
+ "properties": {
21
+ "namespace": {
22
+ "type": "string",
23
+ "const": "ai.aletheion.asm"
24
+ },
25
+ "major": {
26
+ "type": "number",
27
+ "const": 1
28
+ },
29
+ "minor": {
30
+ "type": "integer",
31
+ "minimum": 0
32
+ }
33
+ },
34
+ "additionalProperties": false
35
+ },
36
+ "snapshotId": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 200
40
+ },
41
+ "sessionId": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "maxLength": 200
45
+ },
46
+ "sequence": {
47
+ "type": "integer",
48
+ "minimum": 0
49
+ },
50
+ "state": {
51
+ "type": "object",
52
+ "patternProperties": {
53
+ "^.*$": {}
54
+ }
55
+ },
56
+ "digest": {
57
+ "type": "string",
58
+ "pattern": "^[a-f0-9]{64}$"
59
+ },
60
+ "createdAt": {
61
+ "type": "string",
62
+ "format": "date-time"
63
+ }
64
+ },
65
+ "additionalProperties": false,
66
+ "$id": "asm-state-snapshot-v1"
67
+ }