Feat/canonical model and tool formats
Summary
Standardizes two declarative formats in the gitagent spec so exported agents work correctly on downstream runtimes (notably gitagent, which silently dropped tools/models in the old formats):
- Model field is now canonical
provider:model(e.g.anthropic:claude-sonnet-4-6) - Tool
implementationnow usesscript:(withpath:kept as a deprecated alias)
1. Canonical provider:model model format
model.preferred / model.fallback must now be provider:model — bare names
(gpt-4o) are rejected. A shared parseModel() util (splits on the first colon)
replaces the per-adapter provider-guessing logic.
- New:
src/utils/model.ts—parseModel(),KNOWN_PROVIDERS,isKnownProvider() - Schema:
agent-yaml.schema.jsonenforces^[a-z0-9-]+:.+$on preferred/fallback - Validation: errors on bad format, warns on unknown provider
- Adapters/runners reformat to each target's needs (bare for claude/openai/kiro;
provider/modelfor opencode/github/nanobot/openclaw;{id, provider}for gemini; passthrough for gitclaw). Deleted the oldinferProvider/mapModelNameguessers. - import.ts now emits canonical
provider:model - Migrated all example
agent.yamlfiles + spec/docs examples
2. Tool implementation.script
type: script tools now use script: (the form gitagent's runtime reads).
path: is still accepted but deprecated.
- Schema:
tool.schema.jsonaddsscript, deprecatespath, requires one-of +runtime - Migrated example tools + spec doc
Breaking change
Agents with bare model names (gpt-4o) or no provider prefix will now fail
validation. Migrate to provider:model (e.g. openai:gpt-4o). Tool path:
remains valid but should migrate to script: for gitagent compatibility.