aws / aws/amazon-q-developer-cli

docs: Mismatch between agent documentation and current functionality. The name field is no longer optional.

Aperta
#3,231 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Documentation file [agent-format.md](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md) specifies the agent field "name" to be optional.

The "name" field for an agent has become mandatory since this commit:
https://github.com/aws/amazon-q-developer-cli/commit/dc0974fad9c5da624c77311d536069f082698a94#diff-61df6179f46d679df0c7da318067babd72d265d8958e1b94e3a990de0bfba45fL123-L124

The "/agent generate" command also requires providing a name:
https://github.com/aws/amazon-q-developer-cli/commit/a8afb479f8cbb9390e28560ccc198943316ad2c1#diff-f6d402f6ca61a5601d188759a5d5246ceb57016fa6744f5bbbdec85180ff7a2cR1606

Attempting to use an agent json file with no "name" field results in the following on Q startup:
```bash
mainuser@mainpc:~$ q
Error: Json supplied at /home/mainuser/.aws/amazonq/cli-agents/santas-little-helper.json is invalid: missing field `name` at line 7 column 1
```

Similarly, for "/agent generate":
```bash
> /agent generate

✔ Enter agent name: ·
✔ Enter agent description: · example
✔ Agent scope · Global (all workspaces)

Agent name and description cannot be empty.
```

Then in [other documentation which gives examples](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-file-locations.md#example-usage) of agent usage, it lacks the "name" field. Following these examples will give the same error:
```bash
mainuser@mainpc:~/example_project$ mkdir -p .amazonq/cli-agents
cat > .amazonq/cli-agents/project-helper.json << 'EOF'
{
"description": "Helper agent for this specific project",
"tools": ["fs_read", "fs_write", "execute_bash"],
"resources": [
"file://README.md",
"file://docs/**/*.md"
]
}
EOF
mainuser@mainpc:~/example_project$ q
Error: Json supplied at /home/mainuser/example_project/.amazonq/cli-agents/project-helper.json is invalid: missing field `name` at line 8 column 1
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Leggi docs/agent-format.md e l’esempio in docs/agent-file-locations.md, quindi confrontali entrambi con il comportamento attuale dell’agent descritto nell’issue. Aggiorna la documentazione in modo che il campo name sia mostrato come obbligatorio e incluso negli esempi; il lavoro è completato quando gli esempi documentati non producono più l’errore segnalato relativo al campo mancante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
cli, documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.