@teammates/cli 0.3.3 → 0.3.4

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/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@teammates/cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Agent-agnostic CLI for teammates. Routes tasks, manages handoffs, and plugs into any coding agent backend.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist",
10
- "template"
10
+ "template",
11
+ "scripts"
11
12
  ],
12
13
  "bin": {
13
14
  "teammates": "dist/cli.js"
@@ -18,7 +19,8 @@
18
19
  "test": "vitest run",
19
20
  "test:coverage": "vitest run --coverage",
20
21
  "test:watch": "vitest",
21
- "typecheck": "tsc --noEmit"
22
+ "typecheck": "tsc --noEmit",
23
+ "postinstall": "node scripts/patch-copilot-sdk.cjs"
22
24
  },
23
25
  "keywords": [
24
26
  "teammates",
@@ -31,8 +33,8 @@
31
33
  "license": "MIT",
32
34
  "dependencies": {
33
35
  "@github/copilot-sdk": "^0.1.32",
34
- "@teammates/consolonia": "0.3.3",
35
- "@teammates/recall": "0.3.3",
36
+ "@teammates/consolonia": "0.3.4",
37
+ "@teammates/recall": "0.3.4",
36
38
  "chalk": "^5.6.2",
37
39
  "ora": "^9.3.0"
38
40
  },
@@ -42,9 +44,6 @@
42
44
  "typescript": "^5.5.0",
43
45
  "vitest": "^4.1.0"
44
46
  },
45
- "overrides": {
46
- "vscode-jsonrpc": "9.0.0-next.11"
47
- },
48
47
  "engines": {
49
48
  "node": ">=20.0.0"
50
49
  }
@@ -0,0 +1,30 @@
1
+ // Patches @github/copilot-sdk to fix ESM subpath import for vscode-jsonrpc.
2
+ // The SDK imports "vscode-jsonrpc/node" but vscode-jsonrpc@8.x has no exports
3
+ // map, so Node's ESM resolver fails. This adds the ".js" extension.
4
+ // Remove this patch once copilot-sdk ships a fix upstream.
5
+
6
+ const fs = require("fs");
7
+ const path = require("path");
8
+
9
+ const target = path.join(
10
+ __dirname,
11
+ "..",
12
+ "node_modules",
13
+ "@github",
14
+ "copilot-sdk",
15
+ "dist",
16
+ "session.js"
17
+ );
18
+
19
+ if (!fs.existsSync(target)) {
20
+ // copilot-sdk not installed yet (e.g. during workspace linking) — skip
21
+ process.exit(0);
22
+ }
23
+
24
+ let src = fs.readFileSync(target, "utf8");
25
+
26
+ if (src.includes('vscode-jsonrpc/node"') && !src.includes('vscode-jsonrpc/node.js"')) {
27
+ src = src.replace(/vscode-jsonrpc\/node"/g, 'vscode-jsonrpc/node.js"');
28
+ fs.writeFileSync(target, src, "utf8");
29
+ console.log("Patched @github/copilot-sdk: vscode-jsonrpc/node -> vscode-jsonrpc/node.js");
30
+ }