Contracts 1.0.0: generated JSON Schema for every contract
- schemas/: JSON Schema (draft 2020-12) generated from the zod schemas by npm run build (scripts/json-schemas.cjs), exported as @crosscode/contracts/schemas/* - Test: files match the zod schemas, every sample passes them (Ajv) - Version 1.0.0, CHANGELOG and README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$id": "https://c-git.crosscode.co.za/joshua/crosscode-platform/raw/branch/main/packages/contracts/schemas/hub-ai-complete-request.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"protocolVersion": {
|
||||
"type": "number",
|
||||
"const": 2
|
||||
},
|
||||
"helper": {
|
||||
"type": "string",
|
||||
"maxLength": 60,
|
||||
"pattern": "^[a-z][a-z0-9_]*$"
|
||||
},
|
||||
"system": {
|
||||
"type": "string"
|
||||
},
|
||||
"input": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"maxTokens": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 8000
|
||||
},
|
||||
"effort": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"protocolVersion",
|
||||
"helper",
|
||||
"system",
|
||||
"input",
|
||||
"maxTokens"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user