diff options
| author | t <t@tjp.lol> | 2026-10-16 20:13:59 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-10-16 20:42:57 -0600 |
| commit | d837f7a3357f2de2cd480aed418017471d319da5 (patch) | |
| tree | 621e12cf258934e7ca433020aa982594db303446 /README.md | |
initial commit; basically working
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8797919 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# panto-copilot + +GitHub Copilot defaults for panto. Mark named tables; the extension fills the boilerplate. + +## Setup + +Requires panto's `configure(config)` extension hook (before auth/provider validation). + +```toml +[extensions] +rocks = ["panto-copilot"] + +[auth.copilot] +panto_copilot_extension = true + +[providers.copilot] +auth = "copilot" +panto_copilot_extension = true +``` + +```sh +panto auth login copilot +panto models sync +panto models list copilot: +``` + +## Defaults + +| Setting | Value | +| --- | --- | +| Auth | GitHub device OAuth, then Copilot token exchange; panto owns credentials/refresh | +| APIs | Responses (default), Chat Completions, Anthropic Messages | +| Endpoint | `https://api.individual.githubcopilot.com`; exchange may supply the account endpoint | +| Catalog | `github-copilot` | +| Identity | Copilot Chat `0.35.0`, VS Code `1.107.0`; all headers are overridable | + +## Rules + +- Only `panto_copilot_extension = true` opts in; auth/provider names are arbitrary. +- Keep `providers.<name>.auth` explicit; the extension never guesses linkage. +- Explicit values win, including nested endpoints and case-insensitive headers. +- Defaults are independent per table/load; no config files are rewritten. +- No network or credentials in Lua; env/session placeholders stay raw for panto. +- Rigs must include this extension themselves; `--no-extensions` skips it. + +Existing flat `base_url` configurations stay flat; otherwise all three endpoints +are filled. Overrides must remain valid panto configuration. + +## Packaging / checks + +```sh +panto lua _selfcheck.lua +luarocks lint panto-copilot-scm-1.rockspec +``` + +The rockspec maps `require("panto-copilot")` to `init.lua`; no dependencies +beyond Lua. + +## References + +- [GitHub device authorization](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#device-flow) +- Defaults match the existing panto Copilot configuration; identity versions are not auto-updated. |
