@engineeros/connector 0.6.1 → 0.6.2

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.
@@ -23,6 +23,7 @@ import {
23
23
  describeWebSocketError,
24
24
  startConnectionWatchdog,
25
25
  } from "../src/connection.mjs";
26
+ import { advertisedCapabilities } from "../src/capabilities.mjs";
26
27
 
27
28
  const { command, positional, flags } = parseArgs(process.argv.slice(2));
28
29
 
@@ -63,13 +64,7 @@ if (command === "pair") {
63
64
  type: "pair",
64
65
  pairing_code: pairingCode,
65
66
  name: config.name,
66
- capabilities: {
67
- agent_protocols: flags["agent-command"] ? ["acp"] : ["codex"],
68
- coding_agent: true,
69
- codex_cli: !flags["agent-command"],
70
- platform: process.platform,
71
- workspace_name: path.basename(config.workspace),
72
- },
67
+ capabilities: {},
73
68
  };
74
69
  } else if (command === "start") {
75
70
  config = await loadConfig(flags.workspace || process.cwd());
@@ -93,10 +88,8 @@ try {
93
88
  fail(error instanceof Error ? error.message : String(error));
94
89
  }
95
90
  console.log(`Using ${codingAgent.name} through ${codingAgent.protocol} (${codingAgent.version}).`);
96
- if (firstMessage.type === "pair") {
97
- firstMessage.capabilities.agent_name = codingAgent.name;
98
- firstMessage.capabilities.agent_version = codingAgent.version;
99
- }
91
+ const capabilities = advertisedCapabilities(config, codingAgent);
92
+ firstMessage.capabilities = capabilities;
100
93
 
101
94
  let stopped = false;
102
95
  let active = null;
@@ -153,6 +146,7 @@ async function connect() {
153
146
  type: "authenticate",
154
147
  connector_id: config.connector_id,
155
148
  token: config.token,
149
+ capabilities,
156
150
  };
157
151
  console.log(`Paired. Connector ${config.connector_id} is online.`);
158
152
  reconnectDelay = 1_000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineeros/connector",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Connect a local coding agent to EngineerOS, using ACP when supported.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "start": "node ./bin/engineeros-connector.mjs",
18
18
  "test": "node --test --test-concurrency=1",
19
- "type-check": "node --check ./bin/engineeros-connector.mjs && node --check ./src/connection.mjs && node --check ./src/runner.mjs"
19
+ "type-check": "node --check ./bin/engineeros-connector.mjs && node --check ./src/capabilities.mjs && node --check ./src/connection.mjs && node --check ./src/runner.mjs"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=22"
@@ -0,0 +1,13 @@
1
+ import path from "node:path";
2
+
3
+ export function advertisedCapabilities(config, codingAgent) {
4
+ return {
5
+ agent_protocols: [codingAgent.protocol],
6
+ coding_agent: true,
7
+ codex_cli: codingAgent.protocol === "codex",
8
+ platform: process.platform,
9
+ workspace_name: path.basename(config.workspace),
10
+ agent_name: codingAgent.name,
11
+ agent_version: codingAgent.version,
12
+ };
13
+ }