@nick3/copilot-api 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Copilot API Proxy
2
2
 
3
+ English | [中文](./README_CN.md)
4
+
3
5
  > [!WARNING]
4
6
  > This is a reverse-engineered proxy of GitHub Copilot API. It is not supported by GitHub, and may break unexpectedly. Use at your own risk.
5
7
 
@@ -583,35 +585,29 @@ You can also read more about IDE integration here: [Add Claude Code to your IDE]
583
585
 
584
586
  ### Subagent Marker Integration (Optional)
585
587
 
586
- This project supports `X-Initiator: agent` for subagent-originated requests
588
+ This project supports `X-Initiator: agent` for subagent-originated requests.
587
589
 
588
- #### Claude Code hook producer
590
+ #### Claude Code plugin producer (marketplace-based)
589
591
 
590
- Use the included hook script to inject marker context on `SubagentStart`.
591
- If you place the script under your user Claude directory (`~/.claude/hooks`), use this cross-platform command in `.claude/settings.json`:
592
+ The marker producer is packaged as a Claude Code plugin named `claude-plugin`.
592
593
 
593
- - `.claude/hooks/subagent-start-marker.js`
594
+ - Marketplace catalog in this repository: `.claude-plugin/marketplace.json`
595
+ - Plugin source in this repository: `claude-plugin`
594
596
 
595
- And enable it from `.claude/settings.json`:
597
+ Add the marketplace remotely:
596
598
 
597
- ```json
598
- {
599
- "hooks": {
600
- "SubagentStart": [
601
- {
602
- "matcher": "*",
603
- "hooks": [
604
- {
605
- "type": "command",
606
- "command": "node --input-type=module -e \"import { homedir } from 'node:os'; import { join } from 'node:path'; import { readFile } from 'node:fs/promises'; const file = join(homedir(), '.claude', 'hooks', 'subagent-start-marker.js'); const source = await readFile(file, 'utf8'); const url = 'data:text/javascript;base64,' + Buffer.from(source).toString('base64'); await import(url);\""
607
- }
608
- ]
609
- }
610
- ]
611
- }
612
- }
599
+ ```sh
600
+ /plugin marketplace add https://github.com/nick3/copilot-api.git#all
601
+ ```
602
+
603
+ Install the plugin from the marketplace:
604
+
605
+ ```sh
606
+ /plugin install claude-plugin@copilot-api-marketplace
613
607
  ```
614
608
 
609
+ After installation, the plugin injects `__SUBAGENT_MARKER__...` on `SubagentStart`, and this proxy uses it to infer `X-Initiator: agent`.
610
+
615
611
  #### Opencode plugin producer
616
612
 
617
613
  For opencode, use the plugin implementation at:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nick3/copilot-api",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Turn GitHub Copilot into OpenAI/Anthropic API compatible server. Usable with Claude Code Or Codex Or Opencode!",
5
5
  "keywords": [
6
6
  "proxy",