@jeffreycao/copilot-api 1.1.6 → 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.
- package/README.md +16 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,35 +377,29 @@ You can also read more about IDE integration here: [Add Claude Code to your IDE]
|
|
|
377
377
|
|
|
378
378
|
### Subagent Marker Integration (Optional)
|
|
379
379
|
|
|
380
|
-
This project supports `X-Initiator: agent` for subagent-originated requests
|
|
380
|
+
This project supports `X-Initiator: agent` for subagent-originated requests.
|
|
381
381
|
|
|
382
|
-
#### Claude Code
|
|
382
|
+
#### Claude Code plugin producer (marketplace-based)
|
|
383
383
|
|
|
384
|
-
|
|
385
|
-
If you place the script under your user Claude directory (`~/.claude/hooks`), use this cross-platform command in `.claude/settings.json`:
|
|
384
|
+
The marker producer is packaged as a Claude Code plugin named `claude-plugin`.
|
|
386
385
|
|
|
387
|
-
- `.claude/
|
|
386
|
+
- Marketplace catalog in this repository: `.claude-plugin/marketplace.json`
|
|
387
|
+
- Plugin source in this repository: `claude-plugin`
|
|
388
388
|
|
|
389
|
-
|
|
389
|
+
Add the marketplace remotely:
|
|
390
390
|
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
"hooks": {
|
|
394
|
-
"SubagentStart": [
|
|
395
|
-
{
|
|
396
|
-
"matcher": "*",
|
|
397
|
-
"hooks": [
|
|
398
|
-
{
|
|
399
|
-
"type": "command",
|
|
400
|
-
"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);\""
|
|
401
|
-
}
|
|
402
|
-
]
|
|
403
|
-
}
|
|
404
|
-
]
|
|
405
|
-
}
|
|
406
|
-
}
|
|
391
|
+
```sh
|
|
392
|
+
/plugin marketplace add https://github.com/caozhiyuan/copilot-api.git#all
|
|
407
393
|
```
|
|
408
394
|
|
|
395
|
+
Install the plugin from the marketplace:
|
|
396
|
+
|
|
397
|
+
```sh
|
|
398
|
+
/plugin install claude-plugin@copilot-api-marketplace
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
After installation, the plugin injects `__SUBAGENT_MARKER__...` on `SubagentStart`, and this proxy uses it to infer `X-Initiator: agent`.
|
|
402
|
+
|
|
409
403
|
#### Opencode plugin producer
|
|
410
404
|
|
|
411
405
|
For opencode, use the plugin implementation at:
|
package/package.json
CHANGED