@cleocode/lafs 1.8.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.
- package/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/schemas/v1/conformance-profiles.json +39 -0
- package/dist/schemas/v1/envelope.schema.json +306 -0
- package/dist/schemas/v1/error-registry.json +162 -0
- package/dist/src/a2a/bindings/grpc.d.ts +67 -0
- package/dist/src/a2a/bindings/grpc.js +148 -0
- package/dist/src/a2a/bindings/http.d.ts +102 -0
- package/dist/src/a2a/bindings/http.js +120 -0
- package/dist/src/a2a/bindings/index.d.ts +35 -0
- package/dist/src/a2a/bindings/index.js +79 -0
- package/dist/src/a2a/bindings/jsonrpc.d.ts +77 -0
- package/dist/src/a2a/bindings/jsonrpc.js +114 -0
- package/dist/src/a2a/bridge.d.ts +175 -0
- package/dist/src/a2a/bridge.js +286 -0
- package/dist/src/a2a/extensions.d.ts +121 -0
- package/dist/src/a2a/extensions.js +205 -0
- package/dist/src/a2a/index.d.ts +40 -0
- package/dist/src/a2a/index.js +76 -0
- package/dist/src/a2a/streaming.d.ts +74 -0
- package/dist/src/a2a/streaming.js +265 -0
- package/dist/src/a2a/task-lifecycle.d.ts +109 -0
- package/dist/src/a2a/task-lifecycle.js +313 -0
- package/dist/src/budgetEnforcement.d.ts +84 -0
- package/dist/src/budgetEnforcement.js +328 -0
- package/dist/src/circuit-breaker/index.d.ts +121 -0
- package/dist/src/circuit-breaker/index.js +249 -0
- package/dist/src/cli.d.ts +16 -0
- package/dist/src/cli.js +63 -0
- package/dist/src/compliance.d.ts +31 -0
- package/dist/src/compliance.js +89 -0
- package/dist/src/conformance.d.ts +7 -0
- package/dist/src/conformance.js +248 -0
- package/dist/src/conformanceProfiles.d.ts +11 -0
- package/dist/src/conformanceProfiles.js +34 -0
- package/dist/src/deprecationRegistry.d.ts +13 -0
- package/dist/src/deprecationRegistry.js +39 -0
- package/dist/src/discovery.d.ts +286 -0
- package/dist/src/discovery.js +350 -0
- package/dist/src/envelope.d.ts +60 -0
- package/dist/src/envelope.js +136 -0
- package/dist/src/errorRegistry.d.ts +28 -0
- package/dist/src/errorRegistry.js +36 -0
- package/dist/src/fieldExtraction.d.ts +67 -0
- package/dist/src/fieldExtraction.js +133 -0
- package/dist/src/flagResolver.d.ts +46 -0
- package/dist/src/flagResolver.js +47 -0
- package/dist/src/flagSemantics.d.ts +16 -0
- package/dist/src/flagSemantics.js +45 -0
- package/dist/src/health/index.d.ts +105 -0
- package/dist/src/health/index.js +220 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.js +34 -0
- package/dist/src/mcpAdapter.d.ts +28 -0
- package/dist/src/mcpAdapter.js +281 -0
- package/dist/src/mviProjection.d.ts +19 -0
- package/dist/src/mviProjection.js +116 -0
- package/dist/src/problemDetails.d.ts +34 -0
- package/dist/src/problemDetails.js +45 -0
- package/dist/src/shutdown/index.d.ts +69 -0
- package/dist/src/shutdown/index.js +160 -0
- package/dist/src/tokenEstimator.d.ts +87 -0
- package/dist/src/tokenEstimator.js +238 -0
- package/dist/src/types.d.ts +135 -0
- package/dist/src/types.js +12 -0
- package/dist/src/validateEnvelope.d.ts +15 -0
- package/dist/src/validateEnvelope.js +31 -0
- package/lafs.md +819 -0
- package/package.json +88 -0
- package/schemas/v1/agent-card.schema.json +230 -0
- package/schemas/v1/conformance-profiles.json +39 -0
- package/schemas/v1/context-ledger.schema.json +70 -0
- package/schemas/v1/discovery.schema.json +132 -0
- package/schemas/v1/envelope.schema.json +306 -0
- package/schemas/v1/error-registry.json +162 -0
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cleocode/lafs",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "LLM-Agent-First Specification schemas and conformance tooling",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/src/index.js",
|
|
12
|
+
"types": "./dist/src/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./discovery": {
|
|
15
|
+
"import": "./dist/src/discovery.js",
|
|
16
|
+
"types": "./dist/src/discovery.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./a2a": {
|
|
19
|
+
"import": "./dist/src/a2a/index.js",
|
|
20
|
+
"types": "./dist/src/a2a/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./a2a/bindings": {
|
|
23
|
+
"import": "./dist/src/a2a/bindings/index.js",
|
|
24
|
+
"types": "./dist/src/a2a/bindings/index.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./schemas/v1/envelope.schema.json": "./schemas/v1/envelope.schema.json",
|
|
27
|
+
"./schemas/v1/error-registry.json": "./schemas/v1/error-registry.json",
|
|
28
|
+
"./schemas/v1/context-ledger.schema.json": "./schemas/v1/context-ledger.schema.json",
|
|
29
|
+
"./schemas/v1/discovery.schema.json": "./schemas/v1/discovery.schema.json",
|
|
30
|
+
"./schemas/v1/conformance-profiles.json": "./schemas/v1/conformance-profiles.json"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"schemas",
|
|
35
|
+
"lafs.md",
|
|
36
|
+
"README.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/kryptobaseddev/cleo",
|
|
42
|
+
"directory": "packages/lafs"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://codluv.gitbook.io/lafs/",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/kryptobaseddev/cleo/issues"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"bin": {
|
|
52
|
+
"lafs-conformance": "dist/src/cli.js"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"version": "node scripts/sync-version.mjs",
|
|
56
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
57
|
+
"prepack": "npm run build",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"conformance": "tsx src/cli.ts"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"lafs",
|
|
64
|
+
"llm",
|
|
65
|
+
"agent",
|
|
66
|
+
"protocol",
|
|
67
|
+
"schema",
|
|
68
|
+
"conformance"
|
|
69
|
+
],
|
|
70
|
+
"author": "CLEO Code <hello@cleo.co> (https://cleo.co)",
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
74
|
+
"@types/express": "^5.0.6",
|
|
75
|
+
"@types/node": "^24.3.0",
|
|
76
|
+
"@types/supertest": "^6.0.3",
|
|
77
|
+
"supertest": "^7.2.2",
|
|
78
|
+
"tsx": "^4.20.5",
|
|
79
|
+
"typescript": "^5.9.2",
|
|
80
|
+
"vitest": "^2.1.9"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@a2a-js/sdk": "^0.3.10",
|
|
84
|
+
"ajv": "^8.18.0",
|
|
85
|
+
"ajv-formats": "^3.0.1",
|
|
86
|
+
"express": "^5.2.1"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://lafs.dev/schemas/v1/agent-card.schema.json",
|
|
4
|
+
"title": "A2A Agent Card v1.0",
|
|
5
|
+
"description": "A2A-compliant Agent Card schema for agent discovery. Reference: specs/external/specification.md",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"name",
|
|
9
|
+
"description",
|
|
10
|
+
"version",
|
|
11
|
+
"url",
|
|
12
|
+
"capabilities",
|
|
13
|
+
"defaultInputModes",
|
|
14
|
+
"defaultOutputModes",
|
|
15
|
+
"skills"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"$schema": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "uri",
|
|
21
|
+
"description": "JSON Schema URL"
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 128,
|
|
27
|
+
"description": "Human-readable agent name"
|
|
28
|
+
},
|
|
29
|
+
"description": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 2048,
|
|
33
|
+
"description": "Detailed description of agent capabilities"
|
|
34
|
+
},
|
|
35
|
+
"version": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
38
|
+
"description": "Agent version (SemVer)"
|
|
39
|
+
},
|
|
40
|
+
"url": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "uri",
|
|
43
|
+
"description": "Base URL for A2A endpoints"
|
|
44
|
+
},
|
|
45
|
+
"provider": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["organization", "url"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"organization": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"description": "Organization name"
|
|
53
|
+
},
|
|
54
|
+
"url": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"format": "uri",
|
|
57
|
+
"description": "Organization URL"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"capabilities": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": [],
|
|
64
|
+
"properties": {
|
|
65
|
+
"streaming": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Supports streaming responses"
|
|
68
|
+
},
|
|
69
|
+
"pushNotifications": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"description": "Supports push notifications"
|
|
72
|
+
},
|
|
73
|
+
"extendedAgentCard": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"description": "Supports extended agent card"
|
|
76
|
+
},
|
|
77
|
+
"extensions": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "Supported extensions",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["uri", "description", "required"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"uri": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": "uri",
|
|
87
|
+
"description": "Extension URI (unique identifier)"
|
|
88
|
+
},
|
|
89
|
+
"description": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Human-readable description"
|
|
92
|
+
},
|
|
93
|
+
"required": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "Whether the extension is required"
|
|
96
|
+
},
|
|
97
|
+
"params": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"description": "Extension-specific parameters"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"defaultInputModes": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"minItems": 1,
|
|
109
|
+
"description": "Supported input content types",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "MIME type"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"defaultOutputModes": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"minItems": 1,
|
|
118
|
+
"description": "Supported output content types",
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "MIME type"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"skills": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"minItems": 1,
|
|
127
|
+
"description": "Agent skills/capabilities",
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": ["id", "name", "description", "tags"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"id": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"description": "Skill unique identifier"
|
|
136
|
+
},
|
|
137
|
+
"name": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1,
|
|
140
|
+
"description": "Human-readable name"
|
|
141
|
+
},
|
|
142
|
+
"description": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"description": "Detailed description"
|
|
146
|
+
},
|
|
147
|
+
"tags": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"minItems": 1,
|
|
150
|
+
"description": "Keywords/tags",
|
|
151
|
+
"items": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"examples": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"description": "Example prompts",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"inputModes": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"description": "Supported input modes (overrides agent defaults)",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"outputModes": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"description": "Supported output modes (overrides agent defaults)",
|
|
172
|
+
"items": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"securitySchemes": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"description": "Security authentication schemes (OpenAPI 3.0 style)",
|
|
182
|
+
"additionalProperties": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"required": ["type"],
|
|
185
|
+
"properties": {
|
|
186
|
+
"type": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": ["http", "apiKey", "oauth2", "openIdConnect"],
|
|
189
|
+
"description": "Security scheme type"
|
|
190
|
+
},
|
|
191
|
+
"description": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "Description"
|
|
194
|
+
},
|
|
195
|
+
"scheme": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "HTTP scheme (e.g., bearer)"
|
|
198
|
+
},
|
|
199
|
+
"bearerFormat": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "Bearer token format (e.g., JWT)"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"security": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"description": "Required security schemes",
|
|
209
|
+
"items": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"documentationUrl": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"format": "uri",
|
|
222
|
+
"description": "Documentation URL"
|
|
223
|
+
},
|
|
224
|
+
"iconUrl": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"format": "uri",
|
|
227
|
+
"description": "Icon URL"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"tiers": {
|
|
5
|
+
"core": [
|
|
6
|
+
"envelope_schema_valid",
|
|
7
|
+
"envelope_invariants",
|
|
8
|
+
"error_code_registered"
|
|
9
|
+
],
|
|
10
|
+
"standard": [
|
|
11
|
+
"envelope_schema_valid",
|
|
12
|
+
"envelope_invariants",
|
|
13
|
+
"error_code_registered",
|
|
14
|
+
"agent_action_valid",
|
|
15
|
+
"error_registry_agent_action",
|
|
16
|
+
"transport_mapping_consistent",
|
|
17
|
+
"meta_mvi_present",
|
|
18
|
+
"meta_strict_present",
|
|
19
|
+
"strict_mode_behavior",
|
|
20
|
+
"pagination_mode_consistent",
|
|
21
|
+
"strict_mode_enforced"
|
|
22
|
+
],
|
|
23
|
+
"complete": [
|
|
24
|
+
"envelope_schema_valid",
|
|
25
|
+
"envelope_invariants",
|
|
26
|
+
"error_code_registered",
|
|
27
|
+
"agent_action_valid",
|
|
28
|
+
"error_registry_agent_action",
|
|
29
|
+
"transport_mapping_consistent",
|
|
30
|
+
"context_mutation_failure",
|
|
31
|
+
"context_preservation_valid",
|
|
32
|
+
"meta_mvi_present",
|
|
33
|
+
"meta_strict_present",
|
|
34
|
+
"strict_mode_behavior",
|
|
35
|
+
"pagination_mode_consistent",
|
|
36
|
+
"strict_mode_enforced"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://lafs.dev/schemas/v1/context-ledger.schema.json",
|
|
4
|
+
"title": "LAFS Context Ledger",
|
|
5
|
+
"description": "Tracks state across request/response cycles for context preservation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["ledgerId", "version", "createdAt", "updatedAt", "entries", "checksum", "maxEntries"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ledgerId": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Unique identifier for this context ledger instance"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "integer",
|
|
15
|
+
"minimum": 0,
|
|
16
|
+
"description": "Monotonically increasing version number matching _meta.contextVersion"
|
|
17
|
+
},
|
|
18
|
+
"createdAt": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "date-time",
|
|
21
|
+
"description": "ISO 8601 timestamp when the ledger was created"
|
|
22
|
+
},
|
|
23
|
+
"updatedAt": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "date-time",
|
|
26
|
+
"description": "ISO 8601 timestamp of the last ledger update"
|
|
27
|
+
},
|
|
28
|
+
"entries": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["entryId", "timestamp", "operation", "contextDelta"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"entryId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Unique identifier for this ledger entry"
|
|
37
|
+
},
|
|
38
|
+
"timestamp": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "date-time"
|
|
41
|
+
},
|
|
42
|
+
"operation": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The operation that generated this entry"
|
|
45
|
+
},
|
|
46
|
+
"contextDelta": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"description": "The context changes introduced by this operation",
|
|
49
|
+
"additionalProperties": true
|
|
50
|
+
},
|
|
51
|
+
"requestId": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Correlation with the request that produced this entry"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"description": "Ordered array of context entries (append-only)"
|
|
58
|
+
},
|
|
59
|
+
"checksum": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Integrity checksum of the ledger contents"
|
|
62
|
+
},
|
|
63
|
+
"maxEntries": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 1,
|
|
66
|
+
"description": "Maximum number of entries before truncation/compaction"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://lafs.dev/schemas/v1/discovery.schema.json",
|
|
4
|
+
"title": "LAFS Discovery Document",
|
|
5
|
+
"description": "Schema for LAFS agent discovery documents served at /.well-known/lafs.json",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"$schema",
|
|
9
|
+
"lafs_version",
|
|
10
|
+
"service",
|
|
11
|
+
"capabilities",
|
|
12
|
+
"endpoints"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"$schema": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uri",
|
|
18
|
+
"description": "URL of the schema this document conforms to"
|
|
19
|
+
},
|
|
20
|
+
"lafs_version": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
23
|
+
"description": "LAFS protocol version (semantic versioning)"
|
|
24
|
+
},
|
|
25
|
+
"service": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"description": "Service identification and metadata",
|
|
28
|
+
"required": [
|
|
29
|
+
"name",
|
|
30
|
+
"version"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 100,
|
|
37
|
+
"description": "Unique service name (kebab-case recommended)"
|
|
38
|
+
},
|
|
39
|
+
"version": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
42
|
+
"description": "Service version (semantic versioning)"
|
|
43
|
+
},
|
|
44
|
+
"description": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"maxLength": 500,
|
|
47
|
+
"description": "Human-readable service description"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
},
|
|
52
|
+
"capabilities": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"description": "List of LAFS capabilities this service provides",
|
|
55
|
+
"minItems": 1,
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": [
|
|
59
|
+
"name",
|
|
60
|
+
"version",
|
|
61
|
+
"operations"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"name": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"maxLength": 100,
|
|
68
|
+
"description": "Capability identifier (kebab-case recommended)"
|
|
69
|
+
},
|
|
70
|
+
"version": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
73
|
+
"description": "Capability version (semantic versioning)"
|
|
74
|
+
},
|
|
75
|
+
"description": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"maxLength": 500,
|
|
78
|
+
"description": "Human-readable capability description"
|
|
79
|
+
},
|
|
80
|
+
"operations": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"description": "List of operations this capability supports",
|
|
83
|
+
"minItems": 1,
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"maxLength": 50
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"optional": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": false,
|
|
93
|
+
"description": "Whether this capability is optional for clients"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"endpoints": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "URL endpoints for LAFS operations",
|
|
102
|
+
"required": [
|
|
103
|
+
"envelope",
|
|
104
|
+
"discovery"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"envelope": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"description": "URL for envelope submission (POST)"
|
|
111
|
+
},
|
|
112
|
+
"context": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1,
|
|
115
|
+
"description": "URL for context ledger operations"
|
|
116
|
+
},
|
|
117
|
+
"discovery": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"minLength": 1,
|
|
120
|
+
"description": "URL of this discovery document"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
},
|
|
125
|
+
"extensions": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"description": "Extension fields for vendor-specific metadata",
|
|
128
|
+
"additionalProperties": true
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|