@commonlyai/cli 0.1.191 → 0.1.193

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.191",
3
+ "version": "0.1.193",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -65,7 +65,7 @@ const ISOLATED_INSTANCE_PORT = 8766;
65
65
  const LOOPBACK_BRIDGE = fileURLToPath(new URL('../sandbox/opencode-loopback.mjs', import.meta.url));
66
66
  const TERMINATION_GRACE_MS = 5000;
67
67
  // Bump only with a passing real sandbox-exec smoke against the new version.
68
- const TESTED_OPENCODE_VERSIONS = Object.freeze(['1.18.35', '1.19.0']);
68
+ const TESTED_OPENCODE_VERSIONS = Object.freeze(['1.18.35', '1.19.0', '1.19.4']);
69
69
  const ALLOW_UNTESTED_OPENCODE_VERSION_ENV = 'COMMONLY_OPENCODE_ALLOW_UNTESTED_VERSION';
70
70
  const VERSION_CHECK_TIMEOUT_MS = 5000;
71
71
  const OPENCODE_CONFIG_GITIGNORE = [
@@ -1,4 +1,4 @@
1
- /** Qwen Code 0.25.1 wrapper. Public turns have fresh HOME, config and keys. */
1
+ /** Qwen Code 0.25.1 and 0.26.2 wrapper. Public turns have fresh HOME, config and keys. */
2
2
  import { requireSeatModel } from './seat-model.js';
3
3
  import { spawn as childSpawn, spawnSync } from 'child_process';
4
4
  import { lstatSync, realpathSync } from 'fs';
@@ -17,7 +17,7 @@ import { resolveProviderKeyFile, startProviderProxy } from '../provider-proxy.js
17
17
  import { adapterFailure, spawnCredentials } from '../upstream-refusal.js';
18
18
 
19
19
  // Add a version only with a passing real clean-box sandbox smoke that names it.
20
- const TESTED_QWEN_VERSIONS = Object.freeze(['0.25.1']);
20
+ const TESTED_QWEN_VERSIONS = Object.freeze(['0.25.1', '0.26.2']);
21
21
  const ALLOW_UNTESTED_QWEN_VERSION_ENV = 'COMMONLY_QWEN_ALLOW_UNTESTED_VERSION';
22
22
  const DEFAULT_TIMEOUT_MS = 15 * 60 * 1000;
23
23
  const TERMINATION_GRACE_MS = 5000;
@@ -70,13 +70,27 @@ const seatAddressId = (agentName, instanceId) => {
70
70
  return `sha256-${createHash('sha256').update(identity).digest('base64url')}`;
71
71
  };
72
72
 
73
+ // This probe runs before every turn and blocks the listener's event loop, so a
74
+ // git child that never exits (one waiting on an inherited stdin, or one whose
75
+ // open() the OS holds pending consent) must not stall the seat. On timeout
76
+ // spawnSync kills the child and sets result.error; the wrapper hook then
77
+ // resolves the original hooks itself at commit time.
78
+ const GIT_PROBE_TIMEOUT_MS = 5000;
79
+
73
80
  const resolveOriginalHooksPath = (cwd, env) => {
74
81
  const result = spawnSync(
75
82
  'git',
76
83
  ['rev-parse', '--path-format=absolute', '--git-path', 'hooks'],
77
- { cwd, env, encoding: 'utf8' },
84
+ {
85
+ cwd,
86
+ env,
87
+ encoding: 'utf8',
88
+ stdio: ['ignore', 'pipe', 'pipe'],
89
+ timeout: GIT_PROBE_TIMEOUT_MS,
90
+ killSignal: 'SIGKILL',
91
+ },
78
92
  );
79
- if (result.status !== 0 || !result.stdout.trim()) return null;
93
+ if (result.error || result.status !== 0 || !result.stdout?.trim()) return null;
80
94
  const hooksPath = resolve(result.stdout.trim());
81
95
  try {
82
96
  return statSync(hooksPath).isDirectory() ? hooksPath : null;