kloudy 0.4.7 → 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 (52) hide show
  1. package/LICENSE +202 -202
  2. package/MCP-DEFAULT.md +12 -12
  3. package/README.md +317 -313
  4. package/bin/entry.mjs +23 -22
  5. package/bin/kloudy.mjs +74 -71
  6. package/package.json +3 -2
  7. package/schemas/SDF-LICENSE.txt +21 -21
  8. package/schemas/kloudy.deployable-bot.schema.json +80 -0
  9. package/schemas/sdf-document-0.2.schema.json +411 -411
  10. package/schemas/sdf-webpage-v1.schema.json +176 -176
  11. package/src/activity.mjs +23 -23
  12. package/src/approval-ui.mjs +2 -2
  13. package/src/approval.mjs +25 -25
  14. package/src/autoupdate.mjs +2 -2
  15. package/src/bots.mjs +144 -0
  16. package/src/chooser-link.mjs +17 -17
  17. package/src/client.mjs +96 -96
  18. package/src/connect-card.mjs +32 -32
  19. package/src/connect-ui.mjs +3 -3
  20. package/src/connection.mjs +25 -25
  21. package/src/conversation.mjs +53 -53
  22. package/src/deployable-bots.json.gz +0 -0
  23. package/src/editor-install.mjs +79 -79
  24. package/src/host-interface.mjs +10 -10
  25. package/src/hosted.mjs +42 -42
  26. package/src/httpk.mjs +66 -66
  27. package/src/install.mjs +35 -35
  28. package/src/introduce.mjs +33 -33
  29. package/src/mcp.mjs +74 -74
  30. package/src/modalities.mjs +27 -0
  31. package/src/models.mjs +55 -55
  32. package/src/preferences-card.mjs +21 -21
  33. package/src/preferences-ui.mjs +2 -2
  34. package/src/product-actions.mjs +22 -22
  35. package/src/public.mjs +41 -41
  36. package/src/query.mjs +28 -28
  37. package/src/remote.mjs +9 -2
  38. package/src/replies.mjs +7 -7
  39. package/src/reply-templates.json +12 -12
  40. package/src/sample-actions.mjs +31 -31
  41. package/src/sample-card.mjs +11 -11
  42. package/src/sample-cards.mjs +47 -47
  43. package/src/sample-ui.mjs +2 -2
  44. package/src/sdf-budget.mjs +23 -23
  45. package/src/sdf.mjs +12 -12
  46. package/src/starter.mjs +43 -43
  47. package/src/status-indicator.css +5 -5
  48. package/src/strings.mjs +51 -51
  49. package/src/terminal-status.mjs +6 -6
  50. package/src/website-return.mjs +18 -0
  51. package/src/welcome.mjs +8 -8
  52. package/src/wrap.mjs +58 -58
@@ -1,411 +1,411 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://sdfprotocol.org/schemas/sdf-document-0.2.schema.json",
4
- "title": "SDF Document v0.2",
5
- "description": "Structured Data Format v0.2.0 - Agent-readable content protocol with hierarchical type system",
6
- "type": "object",
7
- "required": [
8
- "sdf_version",
9
- "id",
10
- "parent_type",
11
- "type",
12
- "type_data",
13
- "source",
14
- "summary",
15
- "provenance"
16
- ],
17
- "additionalProperties": false,
18
- "properties": {
19
- "sdf_version": {
20
- "type": "string",
21
- "const": "0.2.0",
22
- "description": "SDF protocol version"
23
- },
24
- "id": {
25
- "type": "string",
26
- "pattern": "^sdf:[a-f0-9]{64}$",
27
- "description": "Unique document identifier (sdf:<sha256>)"
28
- },
29
- "canonical_url": {
30
- "type": "string",
31
- "format": "uri",
32
- "description": "Original source URL"
33
- },
34
- "parent_type": {
35
- "type": "string",
36
- "enum": [
37
- "article",
38
- "documentation",
39
- "commerce",
40
- "data",
41
- "reference",
42
- "discussion",
43
- "code",
44
- "media",
45
- "profile",
46
- "event"
47
- ],
48
- "description": "Top-level content category (like MIME type)"
49
- },
50
- "type": {
51
- "type": "string",
52
- "description": "Specific content subtype (like MIME subtype)"
53
- },
54
- "type_data": {
55
- "type": "object",
56
- "description": "Type-specific structured data (fields depend on parent_type + type)"
57
- },
58
- "aspects": {
59
- "type": "array",
60
- "description": "Additional type overlays for multi-type content",
61
- "items": {
62
- "type": "object",
63
- "required": ["aspect_type", "type_data"],
64
- "properties": {
65
- "aspect_type": {
66
- "type": "object",
67
- "required": ["parent_type", "type"],
68
- "properties": {
69
- "parent_type": {
70
- "type": "string",
71
- "enum": ["article", "documentation", "commerce", "data", "reference", "discussion", "code", "media", "profile", "event"]
72
- },
73
- "type": { "type": "string" },
74
- "schema": { "type": "string", "format": "uri" }
75
- }
76
- },
77
- "type_data": { "type": "object" },
78
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
79
- }
80
- }
81
- },
82
- "language": {
83
- "type": "string",
84
- "description": "BCP-47 language tag"
85
- },
86
- "created_at": {
87
- "type": "string",
88
- "format": "date-time"
89
- },
90
- "updated_at": {
91
- "type": "string",
92
- "format": "date-time"
93
- },
94
- "source": {
95
- "type": "object",
96
- "required": ["url", "fetched_at"],
97
- "properties": {
98
- "url": { "type": "string", "format": "uri" },
99
- "title": { "type": "string" },
100
- "author": { "type": "string" },
101
- "site_name": { "type": "string" },
102
- "published_at": { "type": "string", "format": "date-time" },
103
- "fetched_at": { "type": "string", "format": "date-time" }
104
- }
105
- },
106
- "summary": {
107
- "type": "object",
108
- "required": ["brief", "key_points"],
109
- "properties": {
110
- "brief": { "type": "string", "maxLength": 300 },
111
- "detailed": { "type": "string", "maxLength": 1000 },
112
- "key_points": { "type": "array", "items": { "type": "string" }, "maxItems": 10 }
113
- }
114
- },
115
- "entities": {
116
- "type": "array",
117
- "items": {
118
- "type": "object",
119
- "required": ["name", "type"],
120
- "properties": {
121
- "name": { "type": "string" },
122
- "type": {
123
- "type": "string",
124
- "enum": ["person", "organization", "concept", "technology", "location", "product", "event", "other"]
125
- },
126
- "description": { "type": "string" },
127
- "relevance": { "type": "number", "minimum": 0, "maximum": 1 },
128
- "identifiers": {
129
- "type": "array",
130
- "items": {
131
- "type": "object",
132
- "required": ["scheme", "value"],
133
- "properties": {
134
- "scheme": { "type": "string" },
135
- "value": { "type": "string" },
136
- "url": { "type": "string", "format": "uri" }
137
- }
138
- }
139
- }
140
- }
141
- }
142
- },
143
- "claims": {
144
- "type": "array",
145
- "items": {
146
- "type": "object",
147
- "required": ["statement", "type"],
148
- "properties": {
149
- "statement": { "type": "string" },
150
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
151
- "evidence": { "type": "string" },
152
- "type": {
153
- "type": "string",
154
- "enum": ["fact", "opinion", "prediction", "instruction", "definition"]
155
- },
156
- "verification": {
157
- "type": "object",
158
- "properties": {
159
- "status": {
160
- "type": "string",
161
- "enum": ["verified", "disputed", "unverified", "retracted"]
162
- },
163
- "priority": { "type": "string" },
164
- "check_queries": { "type": "array", "items": { "type": "string" } },
165
- "refs": { "type": "array", "items": { "type": "string" } }
166
- }
167
- },
168
- "temporal": {
169
- "type": "object",
170
- "properties": {
171
- "as_of": { "type": "string", "format": "date-time" },
172
- "valid_until": { "type": "string", "format": "date-time" },
173
- "time_sensitivity": { "type": "string" }
174
- }
175
- }
176
- }
177
- }
178
- },
179
- "topics": {
180
- "type": "array",
181
- "items": { "type": "string" }
182
- },
183
- "relationships": {
184
- "type": "array",
185
- "items": {
186
- "type": "object",
187
- "required": ["subject", "predicate", "object"],
188
- "properties": {
189
- "subject": { "type": "string" },
190
- "predicate": {
191
- "type": "string",
192
- "enum": ["relates_to", "depends_on", "contradicts", "supports", "part_of", "created_by", "used_by", "alternative_to"]
193
- },
194
- "object": { "type": "string" }
195
- }
196
- }
197
- },
198
- "sections": {
199
- "type": "array",
200
- "items": {
201
- "type": "object",
202
- "required": ["title", "summary"],
203
- "properties": {
204
- "title": { "type": "string" },
205
- "summary": { "type": "string" },
206
- "content_type": {
207
- "type": "string",
208
- "enum": ["text", "code", "data", "media", "mixed"]
209
- }
210
- }
211
- }
212
- },
213
- "metadata": {
214
- "type": "object",
215
- "properties": {
216
- "word_count": { "type": "integer", "minimum": 0 },
217
- "reading_level": {
218
- "type": "string",
219
- "enum": ["basic", "intermediate", "advanced", "expert"]
220
- },
221
- "content_quality": { "type": "number", "minimum": 0, "maximum": 1 },
222
- "freshness": {
223
- "type": "string",
224
- "enum": ["current", "recent", "dated", "evergreen"]
225
- }
226
- }
227
- },
228
- "provenance": {
229
- "type": "object",
230
- "required": ["converter", "content_hash"],
231
- "properties": {
232
- "converter": { "type": "string" },
233
- "model_used": { "type": "string" },
234
- "conversion_confidence": { "type": "number", "minimum": 0, "maximum": 1 },
235
- "content_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
236
- "signature": { "type": ["string", "null"] },
237
- "source": {
238
- "type": "object",
239
- "properties": {
240
- "type": { "type": "string" },
241
- "url": { "type": "string", "format": "uri" },
242
- "name": { "type": "string" }
243
- }
244
- },
245
- "chain": {
246
- "type": "array",
247
- "items": {
248
- "type": "object",
249
- "properties": {
250
- "step": { "type": "string" },
251
- "tool": { "type": "string" },
252
- "timestamp": { "type": "string", "format": "date-time" }
253
- }
254
- }
255
- },
256
- "attestations": {
257
- "type": "array",
258
- "items": {
259
- "type": "object",
260
- "properties": {
261
- "attester": { "type": "string" },
262
- "method": { "type": "string" },
263
- "value": { "type": "string" },
264
- "timestamp": { "type": "string", "format": "date-time" }
265
- }
266
- }
267
- },
268
- "consensus": {
269
- "type": "object",
270
- "properties": {
271
- "agreement_level": { "type": "number", "minimum": 0, "maximum": 1 },
272
- "sources_count": { "type": "integer", "minimum": 0 },
273
- "method": { "type": "string" }
274
- }
275
- }
276
- }
277
- },
278
- "profiles": {
279
- "type": "object",
280
- "properties": {
281
- "agent": {
282
- "type": "object",
283
- "properties": {
284
- "priority_claims": { "type": "array", "items": { "type": "string" } },
285
- "preferred_resolution": { "type": "string", "enum": ["brief", "detailed", "full"] },
286
- "allowed_actions": { "type": "array", "items": { "type": "string" } },
287
- "context_budget": { "type": "integer", "minimum": 0 },
288
- "tool_hints": { "type": "array", "items": { "type": "string" } }
289
- }
290
- },
291
- "search": {
292
- "type": "object",
293
- "properties": {
294
- "index_fields": { "type": "array", "items": { "type": "string" } },
295
- "boost_fields": { "type": "array", "items": { "type": "string" } },
296
- "facets": { "type": "array", "items": { "type": "string" } },
297
- "snippet_field": { "type": "string" }
298
- }
299
- },
300
- "analytics": {
301
- "type": "object",
302
- "properties": {
303
- "tracked_metrics": { "type": "array", "items": { "type": "string" } },
304
- "time_series_fields": { "type": "array", "items": { "type": "string" } },
305
- "aggregation_rules": { "type": "array", "items": { "type": "string" } }
306
- }
307
- },
308
- "compliance": {
309
- "type": "object",
310
- "properties": {
311
- "required_fields": { "type": "array", "items": { "type": "string" } },
312
- "retention_policy": { "type": "string" },
313
- "audit_fields": { "type": "array", "items": { "type": "string" } },
314
- "pii_flags": { "type": "array", "items": { "type": "string" } }
315
- }
316
- }
317
- }
318
- },
319
- "sdf": {
320
- "type": "object",
321
- "description": "SDF protocol header",
322
- "properties": {
323
- "version": { "type": "string" },
324
- "schema_uri": { "type": "string", "format": "uri" },
325
- "dialect": { "type": "string", "enum": ["core", "strict"] },
326
- "features": { "type": "array", "items": { "type": "string" } },
327
- "compatibility": {
328
- "type": "object",
329
- "properties": {
330
- "min_consumer_version": { "type": "string" },
331
- "deprecated_fields": { "type": "array", "items": { "type": "string" } }
332
- }
333
- }
334
- }
335
- },
336
- "temporal": {
337
- "type": "object",
338
- "required": ["retrieved_at"],
339
- "properties": {
340
- "published_at": { "type": "string", "format": "date-time" },
341
- "updated_at": { "type": "string", "format": "date-time" },
342
- "retrieved_at": { "type": "string", "format": "date-time" },
343
- "valid_from": { "type": "string", "format": "date-time" },
344
- "valid_until": { "type": "string", "format": "date-time" },
345
- "timezone": { "type": "string" },
346
- "freshness": {
347
- "type": "object",
348
- "properties": {
349
- "staleness_days": { "type": "number" },
350
- "volatility": {
351
- "type": "string",
352
- "enum": ["static", "slow", "moderate", "fast", "realtime"]
353
- },
354
- "recommended_recheck_after_days": { "type": "number" },
355
- "reason_codes": { "type": "array", "items": { "type": "string" } }
356
- }
357
- }
358
- }
359
- },
360
- "links": {
361
- "type": "array",
362
- "items": {
363
- "type": "object",
364
- "required": ["rel", "href"],
365
- "properties": {
366
- "rel": { "type": "string" },
367
- "href": { "type": "string", "format": "uri" },
368
- "type": { "type": "string" },
369
- "title": { "type": "string" },
370
- "target_id": { "type": "string" },
371
- "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
372
- "evidence": { "type": "object" }
373
- }
374
- }
375
- },
376
- "embeddings": {
377
- "type": "array",
378
- "items": {
379
- "type": "object",
380
- "required": ["id", "scope", "target_ref", "model"],
381
- "properties": {
382
- "id": { "type": "string" },
383
- "scope": { "type": "string" },
384
- "target_ref": { "type": "string" },
385
- "model": { "type": "string" },
386
- "vector": { "type": "array", "items": { "type": "number" } },
387
- "vector_uri": { "type": "string", "format": "uri" },
388
- "created_at": { "type": "string", "format": "date-time" },
389
- "input_hash": { "type": "string" },
390
- "normalize": { "type": "boolean" },
391
- "distance": { "type": "string" }
392
- }
393
- }
394
- },
395
- "omitted": {
396
- "type": "object",
397
- "properties": {
398
- "resolution": { "type": "string", "enum": ["compact", "standard", "full"] },
399
- "omitted_paths": { "type": "array", "items": { "type": "string" } },
400
- "available_at": { "type": "string", "format": "uri" }
401
- }
402
- },
403
- "extensions": {
404
- "type": "object",
405
- "description": "Vendor extensions: { vendor_name: { ... } }",
406
- "additionalProperties": {
407
- "type": "object"
408
- }
409
- }
410
- }
411
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sdfprotocol.org/schemas/sdf-document-0.2.schema.json",
4
+ "title": "SDF Document v0.2",
5
+ "description": "Structured Data Format v0.2.0 - Agent-readable content protocol with hierarchical type system",
6
+ "type": "object",
7
+ "required": [
8
+ "sdf_version",
9
+ "id",
10
+ "parent_type",
11
+ "type",
12
+ "type_data",
13
+ "source",
14
+ "summary",
15
+ "provenance"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "sdf_version": {
20
+ "type": "string",
21
+ "const": "0.2.0",
22
+ "description": "SDF protocol version"
23
+ },
24
+ "id": {
25
+ "type": "string",
26
+ "pattern": "^sdf:[a-f0-9]{64}$",
27
+ "description": "Unique document identifier (sdf:<sha256>)"
28
+ },
29
+ "canonical_url": {
30
+ "type": "string",
31
+ "format": "uri",
32
+ "description": "Original source URL"
33
+ },
34
+ "parent_type": {
35
+ "type": "string",
36
+ "enum": [
37
+ "article",
38
+ "documentation",
39
+ "commerce",
40
+ "data",
41
+ "reference",
42
+ "discussion",
43
+ "code",
44
+ "media",
45
+ "profile",
46
+ "event"
47
+ ],
48
+ "description": "Top-level content category (like MIME type)"
49
+ },
50
+ "type": {
51
+ "type": "string",
52
+ "description": "Specific content subtype (like MIME subtype)"
53
+ },
54
+ "type_data": {
55
+ "type": "object",
56
+ "description": "Type-specific structured data (fields depend on parent_type + type)"
57
+ },
58
+ "aspects": {
59
+ "type": "array",
60
+ "description": "Additional type overlays for multi-type content",
61
+ "items": {
62
+ "type": "object",
63
+ "required": ["aspect_type", "type_data"],
64
+ "properties": {
65
+ "aspect_type": {
66
+ "type": "object",
67
+ "required": ["parent_type", "type"],
68
+ "properties": {
69
+ "parent_type": {
70
+ "type": "string",
71
+ "enum": ["article", "documentation", "commerce", "data", "reference", "discussion", "code", "media", "profile", "event"]
72
+ },
73
+ "type": { "type": "string" },
74
+ "schema": { "type": "string", "format": "uri" }
75
+ }
76
+ },
77
+ "type_data": { "type": "object" },
78
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
79
+ }
80
+ }
81
+ },
82
+ "language": {
83
+ "type": "string",
84
+ "description": "BCP-47 language tag"
85
+ },
86
+ "created_at": {
87
+ "type": "string",
88
+ "format": "date-time"
89
+ },
90
+ "updated_at": {
91
+ "type": "string",
92
+ "format": "date-time"
93
+ },
94
+ "source": {
95
+ "type": "object",
96
+ "required": ["url", "fetched_at"],
97
+ "properties": {
98
+ "url": { "type": "string", "format": "uri" },
99
+ "title": { "type": "string" },
100
+ "author": { "type": "string" },
101
+ "site_name": { "type": "string" },
102
+ "published_at": { "type": "string", "format": "date-time" },
103
+ "fetched_at": { "type": "string", "format": "date-time" }
104
+ }
105
+ },
106
+ "summary": {
107
+ "type": "object",
108
+ "required": ["brief", "key_points"],
109
+ "properties": {
110
+ "brief": { "type": "string", "maxLength": 300 },
111
+ "detailed": { "type": "string", "maxLength": 1000 },
112
+ "key_points": { "type": "array", "items": { "type": "string" }, "maxItems": 10 }
113
+ }
114
+ },
115
+ "entities": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "object",
119
+ "required": ["name", "type"],
120
+ "properties": {
121
+ "name": { "type": "string" },
122
+ "type": {
123
+ "type": "string",
124
+ "enum": ["person", "organization", "concept", "technology", "location", "product", "event", "other"]
125
+ },
126
+ "description": { "type": "string" },
127
+ "relevance": { "type": "number", "minimum": 0, "maximum": 1 },
128
+ "identifiers": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "required": ["scheme", "value"],
133
+ "properties": {
134
+ "scheme": { "type": "string" },
135
+ "value": { "type": "string" },
136
+ "url": { "type": "string", "format": "uri" }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "claims": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "required": ["statement", "type"],
148
+ "properties": {
149
+ "statement": { "type": "string" },
150
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
151
+ "evidence": { "type": "string" },
152
+ "type": {
153
+ "type": "string",
154
+ "enum": ["fact", "opinion", "prediction", "instruction", "definition"]
155
+ },
156
+ "verification": {
157
+ "type": "object",
158
+ "properties": {
159
+ "status": {
160
+ "type": "string",
161
+ "enum": ["verified", "disputed", "unverified", "retracted"]
162
+ },
163
+ "priority": { "type": "string" },
164
+ "check_queries": { "type": "array", "items": { "type": "string" } },
165
+ "refs": { "type": "array", "items": { "type": "string" } }
166
+ }
167
+ },
168
+ "temporal": {
169
+ "type": "object",
170
+ "properties": {
171
+ "as_of": { "type": "string", "format": "date-time" },
172
+ "valid_until": { "type": "string", "format": "date-time" },
173
+ "time_sensitivity": { "type": "string" }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ },
179
+ "topics": {
180
+ "type": "array",
181
+ "items": { "type": "string" }
182
+ },
183
+ "relationships": {
184
+ "type": "array",
185
+ "items": {
186
+ "type": "object",
187
+ "required": ["subject", "predicate", "object"],
188
+ "properties": {
189
+ "subject": { "type": "string" },
190
+ "predicate": {
191
+ "type": "string",
192
+ "enum": ["relates_to", "depends_on", "contradicts", "supports", "part_of", "created_by", "used_by", "alternative_to"]
193
+ },
194
+ "object": { "type": "string" }
195
+ }
196
+ }
197
+ },
198
+ "sections": {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "object",
202
+ "required": ["title", "summary"],
203
+ "properties": {
204
+ "title": { "type": "string" },
205
+ "summary": { "type": "string" },
206
+ "content_type": {
207
+ "type": "string",
208
+ "enum": ["text", "code", "data", "media", "mixed"]
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "metadata": {
214
+ "type": "object",
215
+ "properties": {
216
+ "word_count": { "type": "integer", "minimum": 0 },
217
+ "reading_level": {
218
+ "type": "string",
219
+ "enum": ["basic", "intermediate", "advanced", "expert"]
220
+ },
221
+ "content_quality": { "type": "number", "minimum": 0, "maximum": 1 },
222
+ "freshness": {
223
+ "type": "string",
224
+ "enum": ["current", "recent", "dated", "evergreen"]
225
+ }
226
+ }
227
+ },
228
+ "provenance": {
229
+ "type": "object",
230
+ "required": ["converter", "content_hash"],
231
+ "properties": {
232
+ "converter": { "type": "string" },
233
+ "model_used": { "type": "string" },
234
+ "conversion_confidence": { "type": "number", "minimum": 0, "maximum": 1 },
235
+ "content_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
236
+ "signature": { "type": ["string", "null"] },
237
+ "source": {
238
+ "type": "object",
239
+ "properties": {
240
+ "type": { "type": "string" },
241
+ "url": { "type": "string", "format": "uri" },
242
+ "name": { "type": "string" }
243
+ }
244
+ },
245
+ "chain": {
246
+ "type": "array",
247
+ "items": {
248
+ "type": "object",
249
+ "properties": {
250
+ "step": { "type": "string" },
251
+ "tool": { "type": "string" },
252
+ "timestamp": { "type": "string", "format": "date-time" }
253
+ }
254
+ }
255
+ },
256
+ "attestations": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "object",
260
+ "properties": {
261
+ "attester": { "type": "string" },
262
+ "method": { "type": "string" },
263
+ "value": { "type": "string" },
264
+ "timestamp": { "type": "string", "format": "date-time" }
265
+ }
266
+ }
267
+ },
268
+ "consensus": {
269
+ "type": "object",
270
+ "properties": {
271
+ "agreement_level": { "type": "number", "minimum": 0, "maximum": 1 },
272
+ "sources_count": { "type": "integer", "minimum": 0 },
273
+ "method": { "type": "string" }
274
+ }
275
+ }
276
+ }
277
+ },
278
+ "profiles": {
279
+ "type": "object",
280
+ "properties": {
281
+ "agent": {
282
+ "type": "object",
283
+ "properties": {
284
+ "priority_claims": { "type": "array", "items": { "type": "string" } },
285
+ "preferred_resolution": { "type": "string", "enum": ["brief", "detailed", "full"] },
286
+ "allowed_actions": { "type": "array", "items": { "type": "string" } },
287
+ "context_budget": { "type": "integer", "minimum": 0 },
288
+ "tool_hints": { "type": "array", "items": { "type": "string" } }
289
+ }
290
+ },
291
+ "search": {
292
+ "type": "object",
293
+ "properties": {
294
+ "index_fields": { "type": "array", "items": { "type": "string" } },
295
+ "boost_fields": { "type": "array", "items": { "type": "string" } },
296
+ "facets": { "type": "array", "items": { "type": "string" } },
297
+ "snippet_field": { "type": "string" }
298
+ }
299
+ },
300
+ "analytics": {
301
+ "type": "object",
302
+ "properties": {
303
+ "tracked_metrics": { "type": "array", "items": { "type": "string" } },
304
+ "time_series_fields": { "type": "array", "items": { "type": "string" } },
305
+ "aggregation_rules": { "type": "array", "items": { "type": "string" } }
306
+ }
307
+ },
308
+ "compliance": {
309
+ "type": "object",
310
+ "properties": {
311
+ "required_fields": { "type": "array", "items": { "type": "string" } },
312
+ "retention_policy": { "type": "string" },
313
+ "audit_fields": { "type": "array", "items": { "type": "string" } },
314
+ "pii_flags": { "type": "array", "items": { "type": "string" } }
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "sdf": {
320
+ "type": "object",
321
+ "description": "SDF protocol header",
322
+ "properties": {
323
+ "version": { "type": "string" },
324
+ "schema_uri": { "type": "string", "format": "uri" },
325
+ "dialect": { "type": "string", "enum": ["core", "strict"] },
326
+ "features": { "type": "array", "items": { "type": "string" } },
327
+ "compatibility": {
328
+ "type": "object",
329
+ "properties": {
330
+ "min_consumer_version": { "type": "string" },
331
+ "deprecated_fields": { "type": "array", "items": { "type": "string" } }
332
+ }
333
+ }
334
+ }
335
+ },
336
+ "temporal": {
337
+ "type": "object",
338
+ "required": ["retrieved_at"],
339
+ "properties": {
340
+ "published_at": { "type": "string", "format": "date-time" },
341
+ "updated_at": { "type": "string", "format": "date-time" },
342
+ "retrieved_at": { "type": "string", "format": "date-time" },
343
+ "valid_from": { "type": "string", "format": "date-time" },
344
+ "valid_until": { "type": "string", "format": "date-time" },
345
+ "timezone": { "type": "string" },
346
+ "freshness": {
347
+ "type": "object",
348
+ "properties": {
349
+ "staleness_days": { "type": "number" },
350
+ "volatility": {
351
+ "type": "string",
352
+ "enum": ["static", "slow", "moderate", "fast", "realtime"]
353
+ },
354
+ "recommended_recheck_after_days": { "type": "number" },
355
+ "reason_codes": { "type": "array", "items": { "type": "string" } }
356
+ }
357
+ }
358
+ }
359
+ },
360
+ "links": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "object",
364
+ "required": ["rel", "href"],
365
+ "properties": {
366
+ "rel": { "type": "string" },
367
+ "href": { "type": "string", "format": "uri" },
368
+ "type": { "type": "string" },
369
+ "title": { "type": "string" },
370
+ "target_id": { "type": "string" },
371
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
372
+ "evidence": { "type": "object" }
373
+ }
374
+ }
375
+ },
376
+ "embeddings": {
377
+ "type": "array",
378
+ "items": {
379
+ "type": "object",
380
+ "required": ["id", "scope", "target_ref", "model"],
381
+ "properties": {
382
+ "id": { "type": "string" },
383
+ "scope": { "type": "string" },
384
+ "target_ref": { "type": "string" },
385
+ "model": { "type": "string" },
386
+ "vector": { "type": "array", "items": { "type": "number" } },
387
+ "vector_uri": { "type": "string", "format": "uri" },
388
+ "created_at": { "type": "string", "format": "date-time" },
389
+ "input_hash": { "type": "string" },
390
+ "normalize": { "type": "boolean" },
391
+ "distance": { "type": "string" }
392
+ }
393
+ }
394
+ },
395
+ "omitted": {
396
+ "type": "object",
397
+ "properties": {
398
+ "resolution": { "type": "string", "enum": ["compact", "standard", "full"] },
399
+ "omitted_paths": { "type": "array", "items": { "type": "string" } },
400
+ "available_at": { "type": "string", "format": "uri" }
401
+ }
402
+ },
403
+ "extensions": {
404
+ "type": "object",
405
+ "description": "Vendor extensions: { vendor_name: { ... } }",
406
+ "additionalProperties": {
407
+ "type": "object"
408
+ }
409
+ }
410
+ }
411
+ }