12 Commits

Author SHA1 Message Date
Austin Horstman
8cfa9c9514 github-copilot-cli: reuse empty settings evaluation
The MCP-only case already evaluates an empty settings configuration.
Check its activation output there instead of repeating the evaluation,
while retaining the separate mutable-empty and file ownership cases.
2026-10-04 09:16:29 -05:00
Austin Horstman
d2f65d77f7 github-copilot-cli: clarify mutable transitions and cover ownership
Check effective file overrides, trust-state parsing, and custom paths without changing the opt-in default. Describe byte-identical relinking accurately during the filename migration.
2026-10-04 09:16:29 -05:00
Austin Horstman
2547d39701 github-copilot-cli: add trustedFolders option
Copilot CLI ignores trusted folders in settings.json and keeps them in
config.json, its own state file that also holds login and plugin
state. The module therefore left them out of settings.json, which left
no declarative way to trust folders.

Add a trustedFolders option that merges the declared folders into
config.json's trustedFolders list at activation. Only that key is
changed: folders trusted from inside Copilot CLI are kept, and removing
a folder from Nix does not untrust it. config.json is read as JSON5
because Copilot CLI starts it with a comment header, and a new file is
created with mode 600 as Copilot CLI does. The warning for the old
settings keys now points to the new option.
2026-10-04 09:16:29 -05:00
Austin Horstman
fafaa4d767 github-copilot-cli: add mutableSettings option
Copilot CLI replaces settings.json when it saves a setting, for example
after changing the model or theme from inside the CLI. With a linked
file that replaces the link, and the next activation reports a
collision.

Add an opt-in mutableSettings option that merges the declared settings
into a writable settings.json after linkGeneration with
mkImpureConfigMerger instead of linking it. Existing files are read as
JSON5, since Copilot CLI accepts comments there. Declared values take
precedence, keys later removed from the settings stay in the file, and
comments and formatting are not preserved. The default still links the
file.

Turning the option off links the file again. mkImpureConfigCleanup
removes a merged copy Copilot CLI has not changed so the link can
replace it; a changed one is reported as a collision.

Mention the option in the news entry and release note as the way to
keep a settings.json Copilot CLI already wrote.
2026-10-04 09:16:29 -05:00
Austin Horstman
5d3e8eea68 github-copilot-cli: write settings to settings.json
Since Copilot CLI 1.0.35, user settings live in settings.json and
config.json holds internal state. On startup, 1.0.88 moves user keys
out of a Home Manager config.json into settings.json and rewrites
config.json as a regular file, replacing the link, so the next switch
collides on config.json.

Link the declared settings as settings.json instead and stop managing
config.json, including the firstLaunchAt workaround that only existed
for it. A read-only settings.json link survives startup; Copilot CLI
replaces it only when it saves a setting.

Copilot CLI drops trusted_folders from settings.json and moves
trustedFolders into its own state in config.json, rewriting
settings.json and so replacing a linked file. Leave both keys out of
the file, warn when either is set, and do not manage the file when
they are the only settings. Document the canonical allowedUrls and
deniedUrls names.

The old config.json link is removed by linkGeneration when it still
points into a generation; a regular file left by Copilot CLI stays for
it to manage. The news entry and release note tell users whose Copilot
CLI already wrote a regular settings.json to remove it before
switching, since the new link would collide with it.
2026-10-04 09:16:29 -05:00
Austin Horstman
dca466f132 github-copilot-cli: avoid IFD for path inputs
Validate derived agent and skill directories during builds and normalize derived skill files without evaluation-time filesystem reads.
2026-08-16 19:46:12 -05:00
Josef Hofer
085e92b04a github-copilot-cli: preserve args for local-type MCP servers
forCopilotFormat only checked for type == "stdio" to add back args,
missing the case where a server already has type = "local" (e.g. set
directly by a third-party module). This caused args to be absent in the
generated mcp-config.json, failing validation.

Also, running forCopilotFormat as an extraTransform meant it ran inside
transformMcpServer, which then filtered out args = [] in its cleanup
pass. Move forCopilotFormat to run after transformMcpServer so the
empty args list is preserved in the output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-25 14:16:07 -05:00
Malik
ebc55fd103 claude-code, codex, antigravity-cli, github-copilot-cli, opencode, vscode, zed-editor: use mcp lib
- use lib.hm.mcp.transformMcpServer for MCP integration
- Update tests to reflect new merged server configuration
2026-06-09 23:03:52 -05:00
Austin Horstman
edf3f59954 github-copilot-cli: add lsp server support 2026-05-01 12:40:55 -05:00
Austin Horstman
feda41500e github-copilot-cli: add context, agents, and skills
Add support for managing Copilot CLI global instructions via programs.github-copilot-cli.context, written to copilot-instructions.md under COPILOT_HOME.

Also manage custom agents and skills from inline definitions, file paths, and directories, with focused tests and a news entry covering the new options.
2026-05-01 12:06:19 -05:00
Austin Horstman
899c08a15b github-copilot-cli: fix mcp integration
MCP servers require the args in json, even if not configured.
2026-04-30 19:17:57 -05:00
Josef Hofer
503480e513 github-copilot-cli: add module 2026-04-29 16:37:13 -05:00