patchwork-os 0.2.0-alpha.32 → 0.2.0-alpha.33

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": "patchwork-os",
3
- "version": "0.2.0-alpha.32",
3
+ "version": "0.2.0-alpha.33",
4
4
  "description": "Patchwork OS — proactive, multi-model AI teammate built on the Claude IDE Bridge. One agent, any model, works while you're away.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,6 +56,13 @@ function findLockFile() {
56
56
  const data = JSON.parse(fs.readFileSync(fullPath, "utf8"));
57
57
  isBridge = data.isBridge === true;
58
58
  isOrchestrator = data.orchestrator === true;
59
+ // Skip locks that don't match the requested workspace
60
+ if (
61
+ workspaceFilter &&
62
+ data.workspace &&
63
+ data.workspace !== workspaceFilter
64
+ )
65
+ continue;
59
66
  } catch {
60
67
  // unparseable — treat as non-bridge
61
68
  }
@@ -189,9 +196,18 @@ function scheduleBackoffReconnect(errorType) {
189
196
  }
190
197
 
191
198
  // --- Explicit args (bypass auto-discover and watcher) ---
192
- const explicitPort =
193
- process.argv[2] && process.argv[3] ? Number(process.argv[2]) : null;
194
- const explicitToken = process.argv[3] ?? null;
199
+ // Parse named flags first so they don't pollute positional port/token detection.
200
+ const args = process.argv.slice(2);
201
+ let workspaceFilter = null;
202
+ for (let i = 0; i < args.length; i++) {
203
+ if (args[i] === "--workspace" && args[i + 1]) {
204
+ workspaceFilter = args[i + 1];
205
+ args.splice(i, 2);
206
+ break;
207
+ }
208
+ }
209
+ const explicitPort = args[0] && args[1] ? Number(args[0]) : null;
210
+ const explicitToken = args[1] ?? null;
195
211
 
196
212
  function flushPending() {
197
213
  while (pendingLines.length > 0 && ws && ws.readyState === WebSocket.OPEN) {