Sprint 7 Phase 7a: API documentation, schemas, and new RPC methods (Steps 202-206)
- Step 202: docs/AGENT_API.md — comprehensive JSON-RPC API reference with 23 methods - Step 203: schemas/ — 20 JSON Schema files (8 types, 12 methods) for validation - Step 204: Expose ContextAPI (getInScopeSymbols, getCallHierarchy, getDependencyGraph) and BatchMutationAPI (applyBatch) via WebSocket RPC - Step 205: Expose Pipeline operations (runPipeline, parseSource, generateFromAST, projectLanguage) via WebSocket RPC - Step 206: API schema validation tests — 51/51 assertions pass - Updated PROGRESS.md with Sprint 5+6 completion, corrected summary table - Updated FEATURE_REQUESTS.md to reflect implemented items - Created sprint7_plan.md with 33 steps across 6 phases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
60
schemas/methods/applyMutation.schema.json
Normal file
60
schemas/methods/applyMutation.schema.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://whetstone-dsl.org/schemas/methods/applyMutation.schema.json",
|
||||
"title": "applyMutation",
|
||||
"description": "Apply a single mutation to the AST",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"request": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type of mutation operation"
|
||||
},
|
||||
"nodeId": {
|
||||
"type": "string",
|
||||
"description": "The unique identifier of the target node"
|
||||
},
|
||||
"property": {
|
||||
"type": "string",
|
||||
"description": "The property name to set"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "The value to set"
|
||||
},
|
||||
"parentId": {
|
||||
"type": "string",
|
||||
"description": "The parent node ID for insertions"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": "The role/relationship to the parent"
|
||||
},
|
||||
"node": {
|
||||
"type": "object",
|
||||
"description": "The node object to insert"
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"description": "Additional properties for the mutation"
|
||||
},
|
||||
"preferImports": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to prefer imports over inline definitions"
|
||||
},
|
||||
"strictMode": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to enforce strict validation"
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"response": {
|
||||
"$ref": "../types/MutationResult.schema.json"
|
||||
}
|
||||
},
|
||||
"required": ["request", "response"]
|
||||
}
|
||||
Reference in New Issue
Block a user