-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsip-intent-envelope.schema.json
More file actions
448 lines (448 loc) · 14.3 KB
/
Copy pathsip-intent-envelope.schema.json
File metadata and controls
448 lines (448 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/ansharma0923/semantic-intent-protocol/schema/sip-intent-envelope.schema.json",
"title": "SIP IntentEnvelope",
"description": "Root protocol object for the Semantic Intent Protocol (SIP) v0.1. Carries a semantic intent from an actor to a target, along with trust, provenance, constraints, and binding preferences.",
"type": "object",
"required": [
"sip_version",
"message_type",
"intent_id",
"actor",
"target",
"intent",
"desired_outcome"
],
"properties": {
"sip_version": {
"type": "string",
"description": "SIP protocol version. Must be '0.1' for v0.1 implementations.",
"enum": ["0.1"]
},
"message_type": {
"type": "string",
"description": "Message type discriminator.",
"enum": ["intent_request", "intent_response", "intent_error", "intent_cancel"]
},
"intent_id": {
"type": "string",
"description": "Unique identifier for this intent envelope (UUID v4 recommended).",
"examples": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]
},
"trace_id": {
"type": ["string", "null"],
"description": "Distributed tracing trace ID. Shared across all intents in a logical operation.",
"default": null
},
"span_id": {
"type": ["string", "null"],
"description": "Distributed tracing span ID. Unique to this envelope.",
"default": null
},
"timestamp": {
"type": ["string", "null"],
"description": "ISO 8601 UTC timestamp when the envelope was created.",
"examples": ["2024-01-15T10:00:00Z"],
"default": null
},
"actor": {
"$ref": "#/$defs/ActorDescriptor"
},
"target": {
"$ref": "#/$defs/TargetDescriptor"
},
"intent": {
"$ref": "#/$defs/IntentPayload"
},
"desired_outcome": {
"$ref": "#/$defs/DesiredOutcome"
},
"constraints": {
"$ref": "#/$defs/IntentConstraints"
},
"context": {
"$ref": "#/$defs/IntentContext"
},
"capability_requirements": {
"type": "array",
"description": "Explicit capability requirements. If empty, the broker performs capability matching automatically.",
"items": {
"$ref": "#/$defs/CapabilityRequirement"
},
"default": []
},
"trust": {
"$ref": "#/$defs/TrustBlock"
},
"protocol_bindings": {
"type": "array",
"description": "Preferred protocol bindings in priority order.",
"items": {
"$ref": "#/$defs/ProtocolBinding"
},
"default": []
},
"negotiation": {
"$ref": "#/$defs/NegotiationHints"
},
"integrity": {
"$ref": "#/$defs/IntegrityBlock"
},
"provenance": {
"oneOf": [
{ "$ref": "#/$defs/ProvenanceBlock" },
{ "type": "null" }
],
"description": "Provenance block recording originator, delegation chain, and authority scope. Null if no delegation.",
"default": null
},
"extensions": {
"type": "object",
"description": "Vendor or application extension metadata. Keys should be namespaced (e.g., 'x-acme.priority'). Keys starting with 'x-sip.' are reserved for official protocol use.",
"additionalProperties": true,
"default": {}
}
},
"additionalProperties": false,
"$defs": {
"ActorDescriptor": {
"type": "object",
"description": "Describes the actor submitting the intent.",
"required": ["actor_id", "actor_type", "name", "trust_level", "scopes"],
"properties": {
"actor_id": {
"type": "string",
"description": "Unique identifier for the actor."
},
"actor_type": {
"type": "string",
"description": "Type of actor.",
"enum": ["ai_agent", "service", "human", "system"]
},
"name": {
"type": "string",
"description": "Human-readable actor name."
},
"trust_level": {
"type": "string",
"description": "Trust tier declared by the actor.",
"enum": ["public", "internal", "privileged", "admin"]
},
"scopes": {
"type": "array",
"description": "Permission scopes held by the actor.",
"items": { "type": "string" }
}
},
"additionalProperties": false
},
"TargetDescriptor": {
"type": "object",
"description": "Identifies the target of the intent.",
"required": ["target_type"],
"properties": {
"target_type": {
"type": "string",
"description": "Type of target.",
"enum": ["capability", "agent", "service", "resource", "system"]
},
"target_id": {
"type": ["string", "null"],
"description": "Optional explicit target ID. If null, the broker resolves the target via capability matching.",
"default": null
},
"namespace": {
"type": ["string", "null"],
"description": "Optional namespace or domain hint for target resolution.",
"default": null
}
},
"additionalProperties": false
},
"IntentPayload": {
"type": "object",
"description": "The semantic intent being expressed.",
"required": ["intent_name", "intent_domain", "operation_class"],
"properties": {
"intent_name": {
"type": "string",
"description": "Machine-readable intent name (e.g., 'retrieve_document', 'reserve_table')."
},
"intent_domain": {
"type": "string",
"description": "Domain or category of the intent (e.g., 'knowledge_management', 'booking')."
},
"operation_class": {
"type": "string",
"description": "Broad operation class for policy and risk evaluation.",
"enum": ["retrieve", "create", "update", "delete", "analyze", "notify", "execute", "query"]
},
"natural_language_hint": {
"type": ["string", "null"],
"description": "Optional natural language description. Audit annotation only — no operational effect.",
"default": null
},
"parameters": {
"type": "object",
"description": "Intent-specific parameters passed to the matched capability.",
"additionalProperties": true,
"default": {}
}
},
"additionalProperties": false
},
"DesiredOutcome": {
"type": "object",
"description": "Describes the desired outcome of this intent.",
"required": ["summary"],
"properties": {
"summary": {
"type": "string",
"description": "Human-readable description of the desired result."
},
"output_format": {
"type": ["string", "null"],
"description": "Preferred output format (e.g., 'json', 'text', 'csv').",
"default": null
},
"success_criteria": {
"type": "array",
"description": "Optional list of success criteria.",
"items": { "type": "string" },
"default": []
}
},
"additionalProperties": false
},
"IntentConstraints": {
"type": "object",
"description": "Operational constraints on intent execution.",
"properties": {
"time_budget_ms": {
"type": ["integer", "null"],
"description": "Maximum allowed execution time in milliseconds.",
"default": null
},
"cost_budget": {
"type": ["number", "null"],
"description": "Maximum allowed cost (arbitrary unit).",
"default": null
},
"allowed_actions": {
"type": "array",
"description": "Explicit list of allowed action verbs.",
"items": { "type": "string" },
"default": []
},
"forbidden_actions": {
"type": "array",
"description": "Explicit list of forbidden action verbs.",
"items": { "type": "string" },
"default": []
},
"data_sensitivity": {
"type": ["string", "null"],
"description": "Data sensitivity classification.",
"enum": ["public", "internal", "confidential", "restricted", null],
"default": null
},
"determinism_required": {
"type": ["string", "null"],
"description": "Determinism requirement level.",
"enum": ["strict", "best_effort", null],
"default": null
},
"priority": {
"type": ["string", "null"],
"description": "Execution priority hint.",
"enum": ["low", "normal", "high", "critical", null],
"default": null
}
},
"additionalProperties": false
},
"IntentContext": {
"type": "object",
"description": "Ambient context metadata for tracing and routing.",
"properties": {
"session_id": {
"type": ["string", "null"],
"default": null
},
"user_locale": {
"type": ["string", "null"],
"default": null
},
"environment": {
"type": ["string", "null"],
"enum": ["production", "staging", "development", "test", null],
"default": null
},
"additional": {
"type": "object",
"additionalProperties": true,
"default": {}
}
},
"additionalProperties": false
},
"CapabilityRequirement": {
"type": "object",
"description": "An explicit capability requirement hint.",
"required": ["capability_name"],
"properties": {
"capability_name": {
"type": "string",
"description": "Capability ID or name being requested."
},
"required_scopes": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"preferred_binding": {
"type": ["string", "null"],
"default": null
},
"minimum_trust_tier": {
"type": ["string", "null"],
"enum": ["public", "internal", "privileged", "admin", null],
"default": null
}
},
"additionalProperties": false
},
"TrustBlock": {
"type": "object",
"description": "Trust and delegation metadata.",
"properties": {
"declared_trust_level": {
"type": ["string", "null"],
"enum": ["public", "internal", "privileged", "admin", null],
"default": null
},
"delegation_chain": {
"type": "array",
"description": "Ordered list of actor IDs in the delegation chain.",
"items": { "type": "string" },
"default": []
},
"token_reference": {
"type": ["string", "null"],
"description": "Reference to an external bearer token or credential.",
"default": null
}
},
"additionalProperties": false
},
"ProtocolBinding": {
"type": "object",
"description": "A preferred execution protocol binding.",
"required": ["binding_type"],
"properties": {
"binding_type": {
"type": "string",
"description": "Execution protocol.",
"enum": ["rest", "grpc", "mcp", "a2a", "rag"]
},
"endpoint": {
"type": ["string", "null"],
"description": "Optional explicit endpoint URI.",
"default": null
},
"metadata": {
"type": "object",
"additionalProperties": true,
"default": {}
}
},
"additionalProperties": false
},
"NegotiationHints": {
"type": "object",
"description": "Hints to guide capability negotiation.",
"properties": {
"candidate_capabilities": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"allow_fallback": {
"type": "boolean",
"description": "Whether to allow fallback to lower-scored capabilities.",
"default": true
},
"max_candidates": {
"type": "integer",
"description": "Maximum number of candidates to consider.",
"default": 5
}
},
"additionalProperties": false
},
"IntegrityBlock": {
"type": "object",
"description": "Envelope integrity metadata.",
"properties": {
"schema_version": {
"type": ["string", "null"],
"default": null
},
"signed": {
"type": "boolean",
"description": "Whether the envelope has been cryptographically signed.",
"default": false
},
"signature_reference": {
"type": ["string", "null"],
"description": "Reference to an external signature or signing key.",
"default": null
}
},
"additionalProperties": false
},
"ProvenanceBlock": {
"type": "object",
"description": "Records the originator, submitting actor, delegation chain, and authority scope for auditing and trust validation.",
"required": ["originator", "submitted_by"],
"properties": {
"originator": {
"type": "string",
"description": "ID of the original human or system that originated the intent."
},
"submitted_by": {
"type": "string",
"description": "ID of the actor that submitted this envelope to the broker."
},
"on_behalf_of": {
"type": ["string", "null"],
"description": "Actor ID on whose behalf this intent is submitted.",
"default": null
},
"delegation_chain": {
"type": "array",
"description": "Ordered list of actor IDs in the delegation chain from originator to submitter.",
"items": { "type": "string" },
"default": []
},
"delegation_purpose": {
"type": ["string", "null"],
"description": "Human-readable reason for delegation.",
"default": null
},
"delegation_expiry": {
"type": ["string", "null"],
"description": "ISO 8601 UTC timestamp when the delegation expires.",
"default": null
},
"authority_scope": {
"type": "array",
"description": "Scopes granted to the submitting actor by the originator.",
"items": { "type": "string" },
"default": []
}
},
"additionalProperties": false
}
}
}