@webannotates/runner 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/cli.js +12 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ function usage() {
6
6
  console.log(`WebAnnotate local coding-agent runner
7
7
 
8
8
  Commands:
9
- connect <code> <owner/repository> <local-path> [--url URL] [--provider codex|claude]
9
+ connect <code> <owner/repository> [local-path] [--url URL] [--provider codex|claude|opencode|copilot]
10
10
  pair <code> [--url URL] [--name NAME]
11
11
  map <owner/repository> <local-path>
12
12
  unmap <owner/repository>
@@ -22,15 +22,15 @@ async function main() {
22
22
  if (!command || ['help', '--help', '-h'].includes(command))
23
23
  return usage();
24
24
  if (command === 'connect') {
25
- const code = process.argv[3], repository = process.argv[4], localPath = process.argv[5];
26
- if (!code || !repository || !localPath)
27
- throw new Error('Usage: connect <code> <owner/repository> <local-path> [--url URL] [--provider codex|claude]');
25
+ const code = process.argv[3], repository = process.argv[4], localPath = process.argv[5] || '.';
26
+ if (!code || !repository)
27
+ throw new Error('Usage: connect <code> <owner/repository> [local-path] [--url URL] [--provider codex|claude|opencode|copilot]');
28
28
  const current = await loadConfig();
29
29
  const baseUrl = flag('--url') || current.baseUrl;
30
30
  const name = flag('--name') || defaultRunnerName();
31
31
  const provider = flag('--provider') || 'codex';
32
- if (!['codex', 'claude'].includes(provider))
33
- throw new Error('Provider must be codex or claude.');
32
+ if (!['codex', 'claude', 'opencode', 'copilot'].includes(provider))
33
+ throw new Error('Provider must be codex, claude, opencode, or copilot.');
34
34
  const resolved = path.resolve(localPath);
35
35
  await validateRepository(resolved, repository);
36
36
  const preflightConfig = { ...current, baseUrl, repositories: { ...current.repositories, [repository]: resolved } };
@@ -41,6 +41,12 @@ async function main() {
41
41
  if (provider === 'claude' && !capabilities.claude) {
42
42
  throw new Error(capabilities.claudeInstalled ? 'Claude Code is installed but not authenticated. Run: claude auth login' : 'Claude Code CLI was not found. Install it, then run this command again.');
43
43
  }
44
+ if (provider === 'opencode' && !capabilities.opencode) {
45
+ throw new Error(capabilities.opencodeInstalled ? 'OpenCode is installed but no authenticated provider is available. Run: opencode auth login' : 'OpenCode CLI was not found. Install it, then run this command again.');
46
+ }
47
+ if (provider === 'copilot' && !capabilities.copilot) {
48
+ throw new Error('GitHub Copilot CLI was not found. Install it or start a Copilot CLI session from VS Code, then run this command again.');
49
+ }
44
50
  const result = await new RunnerApiClient({ ...preflightConfig, token: undefined }).pair(code, name);
45
51
  const config = {
46
52
  ...preflightConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webannotates/runner",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "prepack": "npm run build"
16
16
  },
17
17
  "dependencies": {
18
- "@webannotates/code-agent-runner-core": "0.1.0"
18
+ "@webannotates/code-agent-runner-core": "0.2.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^25.1.0",