組み込みコマンドに関する注意
パッケージでは、コマンド、メソッド、要素にも同じ種類のメモを、その例の近くに追加します。パッケージのファイルでは、各項目の下にそれらが表示されます:
- `->push(items...): list` A new list with items added to the end.
- pitfall: Returns a new list and leaves the old one alone: write items = $items->push($x).
- e.g. `[1, 2]->push(3, 4)`
- `@api(url: string, options?: map): response` Makes an HTTP request and returns the response.
- `options.timeout: duration` Maximum wait for an outbound HTTP(S) request. Example `30s`.
- prefer: @api($url, as: Type) (the same as ->check()->convert(from: json, as: Type)) to fail fast and check the data's shape.
- pitfall: A 4xx or 5xx status doesn't throw: chain ->check() (throws Network) or test .is_ok.C#で書かれたパッケージは、p.AgentNotes(("list->push", new AgentNotes(pitfall: "...")))でそれらを追加します。キーはp.Examplesの形式です("@api"、"list->push"、または要素の場合は"<input>")。各メモは短い1行に収めてください。エージェントがすべて読むためです。