interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / spec / schemas / common.schema.json

257 lines · 6786 bytes Raw Blame History
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://interplane.dev/schemas/0.1/common.schema.json",
4 "title": "INTERPLANE common definitions",
5 "$defs": {
6 "ProtocolVersion": {
7 "type": "string",
8 "pattern": "^[0-9]+\\.[0-9]+$",
9 "description": "MAJOR.MINOR. Receivers reject any MAJOR they do not implement."
10 },
11 "Id": {
12 "type": "string",
13 "pattern": "^[A-Za-z0-9._:-]{1,128}$",
14 "description": "Opaque identifier. Uniqueness scope is stated per field."
15 },
16 "Timestamp": {
17 "type": "string",
18 "format": "date-time",
19 "description": "RFC 3339 timestamp, UTC recommended."
20 },
21 "Digest": {
22 "type": "string",
23 "pattern": "^sha256:[0-9a-f]{64}$",
24 "description": "Lower-case hex SHA-256 with an algorithm prefix."
25 },
26 "Party": {
27 "type": "object",
28 "required": [
29 "kind",
30 "id"
31 ],
32 "properties": {
33 "kind": {
34 "type": "string",
35 "enum": [
36 "model",
37 "runtime",
38 "adapter",
39 "operator",
40 "other"
41 ]
42 },
43 "id": {
44 "type": "string",
45 "minLength": 1,
46 "maxLength": 256
47 },
48 "trust": {
49 "oneOf": [
50 {
51 "$ref": "#/$defs/TrustLevel"
52 },
53 {
54 "type": "null"
55 }
56 ]
57 },
58 "content_kind": {
59 "oneOf": [
60 {
61 "$ref": "#/$defs/ContentKind"
62 },
63 {
64 "type": "null"
65 }
66 ]
67 }
68 },
69 "additionalProperties": true
70 },
71 "ToolRef": {
72 "type": "object",
73 "required": [
74 "name"
75 ],
76 "properties": {
77 "namespace": {
78 "type": [
79 "string",
80 "null"
81 ],
82 "pattern": "^[a-z][a-z0-9_]*$",
83 "description": "Canonical namespace when the model used one (e.g. filesystem). null when the model emitted a bare runtime-native name."
84 },
85 "name": {
86 "type": "string",
87 "pattern": "^[A-Za-z0-9_.:-]{1,128}$"
88 }
89 },
90 "additionalProperties": false
91 },
92 "ErrorCode": {
93 "type": "string",
94 "enum": [
95 "unsupported_version",
96 "unsupported_dialect",
97 "malformed_envelope",
98 "malformed_tool_call",
99 "invalid_arguments",
100 "oversized_arguments",
101 "duplicate_request_id",
102 "replayed_message",
103 "unknown_capability",
104 "capability_not_found",
105 "policy_denied",
106 "approval_required",
107 "execution_error",
108 "execution_timeout",
109 "unknown_decision",
110 "runtime_unavailable",
111 "stale_capability",
112 "session_limit_exceeded",
113 "session_closed"
114 ]
115 },
116 "Error": {
117 "type": "object",
118 "required": [
119 "code",
120 "message"
121 ],
122 "properties": {
123 "code": {
124 "$ref": "#/$defs/ErrorCode"
125 },
126 "message": {
127 "type": "string",
128 "maxLength": 4096
129 },
130 "retryable": {
131 "type": "boolean",
132 "default": false
133 },
134 "details": {
135 "type": "object",
136 "additionalProperties": true
137 }
138 },
139 "additionalProperties": true
140 },
141 "RuntimeExtension": {
142 "type": "object",
143 "description": "Typed runtime-specific metadata. The vocabulary names the runtime's own meaning; INTERPLANE never interprets the values.",
144 "required": [
145 "vocabulary",
146 "values"
147 ],
148 "properties": {
149 "vocabulary": {
150 "type": "string",
151 "minLength": 1,
152 "maxLength": 128
153 },
154 "values": {
155 "type": "array",
156 "items": {
157 "type": "string"
158 }
159 }
160 },
161 "additionalProperties": true
162 },
163 "CapabilityDescriptor": {
164 "type": "object",
165 "required": [
166 "name",
167 "description",
168 "parameters"
169 ],
170 "properties": {
171 "name": {
172 "type": "string",
173 "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
174 "description": "Runtime-native capability name."
175 },
176 "canonical": {
177 "oneOf": [
178 {
179 "$ref": "#/$defs/ToolRef"
180 },
181 {
182 "type": "null"
183 }
184 ],
185 "description": "Canonical INTERPLANE tool this capability realizes, if the runtime declares one."
186 },
187 "description": {
188 "type": "string",
189 "maxLength": 4096
190 },
191 "parameters": {
192 "type": "object",
193 "description": "JSON Schema (2020-12 or draft-07 subset) for arguments.",
194 "additionalProperties": true
195 },
196 "domains": {
197 "type": "array",
198 "items": {
199 "type": "string",
200 "pattern": "^[a-z][a-z0-9_.]*$"
201 },
202 "description": "Coarse selection tags such as filesystem, code, email, calendar, web, image, admin."
203 },
204 "runtime_effects": {
205 "oneOf": [
206 {
207 "$ref": "#/$defs/RuntimeExtension"
208 },
209 {
210 "type": "null"
211 }
212 ]
213 },
214 "schema_digest": {
215 "oneOf": [
216 {
217 "$ref": "#/$defs/Digest"
218 },
219 {
220 "type": "null"
221 }
222 ]
223 }
224 },
225 "additionalProperties": true
226 },
227 "ContentKind": {
228 "type": "string",
229 "enum": [
230 "runtime_instruction",
231 "user_request",
232 "model_generated",
233 "tool_result",
234 "workspace_content",
235 "memory",
236 "web_content",
237 "document",
238 "email",
239 "skill",
240 "external_provider",
241 "unknown"
242 ],
243 "description": "What a piece of model-visible material is. On an executed result an absent or null kind is tool_result. A value the receiver does not recognize (or a non-string) is treated as unknown."
244 },
245 "TrustLevel": {
246 "type": "string",
247 "enum": [
248 "trusted_runtime",
249 "user_supplied",
250 "workspace_untrusted",
251 "external_untrusted",
252 "unknown"
253 ],
254 "description": "How much the runtime trusts the material. Only the runtime assigns it; a model cannot raise it. Inability to determine trust (absent or null) is `unknown`, never silently trusted. A value the receiver does not recognize (or a non-string) is treated as external_untrusted. `trusted` is derived from this level and is never true for unknown or unrecognized values."
255 }
256 }
257}