@engineeros/connector 0.8.1 → 0.8.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.
@@ -24,8 +24,9 @@ import {
24
24
  startConnectionWatchdog,
25
25
  } from "../src/connection.mjs";
26
26
  import { advertisedCapabilities } from "../src/capabilities.mjs";
27
+ import { parseConnectorArgs } from "../src/cli-args.mjs";
27
28
 
28
- const { command, positional, flags } = parseArgs(process.argv.slice(2));
29
+ const { command, positional, flags } = parseConnectorArgs(process.argv.slice(2));
29
30
 
30
31
  if (command === "status") {
31
32
  const config = await loadConfig(flags.workspace || process.cwd());
@@ -566,19 +567,6 @@ async function execute(assignment) {
566
567
  }
567
568
  }
568
569
 
569
- function parseArgs(args) {
570
- const command = args.shift();
571
- const positional = [];
572
- const flags = {};
573
- while (args.length) {
574
- const value = args.shift();
575
- if (!value.startsWith("--")) positional.push(value);
576
- else if (value === "--onboard") flags.onboard = true;
577
- else flags[value.slice(2)] = args.shift();
578
- }
579
- return { command, positional, flags };
580
- }
581
-
582
570
  function parseAgentArgs(value) {
583
571
  if (!value) return [];
584
572
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineeros/connector",
3
- "version": "0.8.1",
3
+ "version": "0.8.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/capabilities.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/cli-args.mjs && node --check ./src/connection.mjs && node --check ./src/runner.mjs"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=22"
@@ -0,0 +1,18 @@
1
+ const BOOLEAN_FLAGS = new Set(["onboard", "skip-git-repo-check"]);
2
+
3
+ export function parseConnectorArgs(argv) {
4
+ const args = [...argv];
5
+ const command = args.shift();
6
+ const positional = [];
7
+ const flags = {};
8
+ while (args.length) {
9
+ const value = args.shift();
10
+ if (!value.startsWith("--")) {
11
+ positional.push(value);
12
+ continue;
13
+ }
14
+ const name = value.slice(2);
15
+ flags[name] = BOOLEAN_FLAGS.has(name) ? true : args.shift();
16
+ }
17
+ return { command, positional, flags };
18
+ }