@metaharness/copilot 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rUv
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # MetaHarness × VSCode/Copilot mcp.json
2
+
3
+ A minimal scaffold that wires up GitHub Copilot in VSCode with MCP (Model Context Protocol) servers via `mcp.json`. This is for developers who already use Copilot Chat in VSCode and want to extend it with custom tools, file-system context, and MCP-backed integrations without hand-rolling configuration files. It does NOT ship a custom Copilot model, agent runtime, or replacement for Copilot Chat — it just generates the config layer that VSCode's Copilot reads on startup.
4
+
5
+ ## Quickstart
6
+
7
+ ```bash
8
+ npx @metaharness/copilot@latest my-bot
9
+ cd my-bot && npm install && harness doctor
10
+ ```
11
+
12
+ Then open `my-bot/` in VSCode. Copilot Chat will detect `mcp.json` and offer to enable the configured servers on first launch.
13
+
14
+ ## What you get
15
+
16
+ - `.vscode/mcp.json` — Copilot-compatible MCP server registry with sensible defaults (filesystem, fetch, memory)
17
+ - `.github/copilot-instructions.md` — repo-scoped instructions Copilot Chat reads automatically
18
+ - `harness.config.json` — MetaHarness manifest declaring the host, template, and validation rules
19
+ - `package.json` with `harness` CLI wired up for doctor/validate/sync workflows
20
+ - `agents/` directory with one starter agent definition and a README on how to add more
21
+ - `.gitignore` and `.vscodeignore` tuned for MCP server logs and local secrets
22
+
23
+ ## Advanced
24
+
25
+ Run the built-in health check after scaffolding to confirm Copilot can see the config:
26
+
27
+ ```bash
28
+ $ harness doctor
29
+ [ok] VSCode detected (1.95.0+)
30
+ [ok] .vscode/mcp.json valid (3 servers declared)
31
+ [ok] copilot-instructions.md present
32
+ [ok] node >= 20
33
+ ```
34
+
35
+ Validate your `mcp.json` against the Copilot schema before committing:
36
+
37
+ ```bash
38
+ $ harness validate --strict
39
+ validating .vscode/mcp.json...
40
+ servers.filesystem ok
41
+ servers.fetch ok
42
+ servers.memory ok
43
+ all checks passed
44
+ ```
45
+
46
+ Inspect the resolved config that Copilot will actually load (useful when diagnosing why a server is silently disabled):
47
+
48
+ ```bash
49
+ $ harness sync --dry-run
50
+ would write: .vscode/mcp.json
51
+ would write: .github/copilot-instructions.md
52
+ no changes (config in sync)
53
+ ```
54
+
55
+ ## FAQ
56
+
57
+ **Q: Do I need a Copilot subscription for this?**
58
+ A: Yes — this scaffolds config for the Copilot Chat extension in VSCode, which requires an active GitHub Copilot subscription. The scaffold itself is free.
59
+
60
+ **Q: Will this work with Copilot in JetBrains or Neovim?**
61
+ A: Not directly. The `.vscode/mcp.json` format is VSCode-specific. JetBrains uses a different MCP integration path; pick a different host template for that.
62
+
63
+ **Q: Can I commit `.vscode/mcp.json` to a shared repo?**
64
+ A: Yes, and it's recommended for team consistency. Keep secrets out of it — use `${env:VAR}` substitution and document the required env vars in `copilot-instructions.md`.
65
+
66
+ ## License
67
+
68
+ MIT. Built on metaharness (https://www.npmjs.com/package/metaharness).
69
+
70
+ ## Deep-dive
71
+
72
+ Full explainer gist: https://gist.github.com/ruvnet/532201b1e66c528df87857002a1c0ad9
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import { execSync } from 'node:child_process';
3
+ import process from 'node:process';
4
+
5
+ const args = process.argv.slice(2);
6
+ const name = args[0] && !args[0].startsWith('--') ? args[0] : 'my-bot';
7
+ const extra = (args[0] === name ? args.slice(1) : args).join(' ');
8
+
9
+ const cmd = `npx --yes metaharness@latest ${name} --template minimal --host copilot --force${extra ? ' ' + extra : ''}`;
10
+
11
+ try {
12
+ execSync(cmd, { stdio: 'inherit' });
13
+ console.log('');
14
+ console.log(`Next steps:`);
15
+ console.log(` cd ${name} && npm install`);
16
+ console.log(` harness doctor # verify VSCode + mcp.json are wired up`);
17
+ console.log(` code . # open in VSCode and enable Copilot MCP servers`);
18
+ } catch (err) {
19
+ console.error(`metaharness scaffold failed: ${err.message}`);
20
+ process.exit(err.status || 1);
21
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@metaharness/copilot",
3
+ "version": "0.1.0",
4
+ "description": "MetaHarness example — VSCode/Copilot mcp.json scaffold for agentic workflows (npx @metaharness/copilot my-bot)",
5
+ "homepage": "https://github.com/ruvnet/agent-harness-generator/tree/main/examples-packages/copilot",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/ruvnet/agent-harness-generator.git",
9
+ "directory": "examples-packages/copilot"
10
+ },
11
+ "license": "MIT",
12
+ "author": "rUv <ruv@ruv.net>",
13
+ "type": "module",
14
+ "bin": "./bin/scaffold.mjs",
15
+ "files": [
16
+ "bin/**",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "scripts": {
21
+ "smoke": "node --check bin/scaffold.mjs"
22
+ },
23
+ "keywords": [
24
+ "metaharness",
25
+ "agent-harness",
26
+ "agent-harness-generator",
27
+ "copilot",
28
+ "host",
29
+ "ai-agent",
30
+ "mcp",
31
+ "npx",
32
+ "scaffold"
33
+ ],
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "engines": {
38
+ "node": ">=20.0.0"
39
+ }
40
+ }