-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] add copilot support #34
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,12 @@ | |
| * The registry is the single source of truth for valid harness names and target paths. | ||
| */ | ||
|
|
||
| export type HarnessName = "claude" | "gemini" | "opencode" | "codex"; | ||
| export type HarnessName = | ||
| | "claude" | ||
| | "gemini" | ||
| | "opencode" | ||
| | "codex" | ||
| | "copilot"; | ||
|
|
||
| type HarnessEntry = { | ||
| readonly target: string; | ||
|
|
@@ -16,6 +21,7 @@ export const HARNESS_REGISTRY: Record<HarnessName, HarnessEntry> = { | |
| gemini: { target: "~/.gemini/AGENTS.md" }, | ||
| opencode: { target: "~/.config/opencode/AGENTS.md" }, | ||
| codex: { target: "~/.codex/AGENTS.md" }, | ||
| copilot: { target: "~/.copilot/copilot-instructions.md" }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new Copilot harness hard-codes Useful? React with 👍 / 👎. |
||
| }; | ||
|
|
||
| export const HARNESS_NAMES = Object.keys(HARNESS_REGISTRY) as HarnessName[]; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,9 @@ describe("sync-global", () => { | |
| const paths = actionsArgument.map((action) => action.path); | ||
| expect(paths.some((p) => p.endsWith("/.claude/CLAUDE.md"))).toBe(true); | ||
| expect(paths.some((p) => p.endsWith("/.codex/AGENTS.md"))).toBe(true); | ||
| expect( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Info: Good addition. The test now verifies that all five harnesses (including copilot) receive write actions when |
||
| paths.some((p) => p.endsWith("/.copilot/copilot-instructions.md")), | ||
| ).toBe(true); | ||
| expect( | ||
| actionsArgument.every( | ||
| (action) => action.content === "# G1\nA\n\n# G2\nB", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,9 @@ describe("sync", () => { | |
|
|
||
| beforeEach(() => { | ||
| vi.clearAllMocks(); | ||
| vi.mocked(fsPromises.lstat).mockRejectedValue( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Info: This |
||
| Object.assign(new Error("ENOENT"), { code: "ENOENT" }), | ||
| ); | ||
| }); | ||
|
|
||
| it("writes AGENTS.md with concatenated rules", async () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Info: Verified that
~/.copilot/copilot-instructions.mdis the correct path for Copilot CLI user-level instructions per GitHub docs. Good.