feat(spec): add options/options_from for dynamic config values
Add options field for static value lists and options_from for dynamic file-based options. options_from uses JSONPath to extract values from local JSON files (e.g., account names from config). Update schema with validation rules. Add --manifest flag as preferred discovery method (offline, version-matched). Reorder discovery priority: installed tool → well-known URL → HTML link → direct URL → local file. Update examples and documentation
This commit is contained in:
@@ -151,6 +151,27 @@
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"description": "Human-readable prompt for interactive setup"
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Static list of valid values. Clients SHOULD render as a dropdown."
|
||||
},
|
||||
"options_from": {
|
||||
"type": "object",
|
||||
"description": "Dynamically resolve available values from a local file.",
|
||||
"required": ["file", "path"],
|
||||
"properties": {
|
||||
"file": {
|
||||
"type": "string",
|
||||
"description": "Path to a local JSON file. ~ is expanded to the user's home directory."
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "JSONPath expression to extract values from the file."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
Reference in New Issue
Block a user