@gakim-digital/dexter-bridge 0.5.19 → 0.5.20

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": "@gakim-digital/dexter-bridge",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "description": "Local Companion bridge for the Dexter Framer plugin — runs Codex or Claude Code on your machine.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -269,7 +269,6 @@ function argsWithClaudeIsolation(args, definition) {
269
269
  const isolated = argsWithoutVariadicFlag(args, '--tools');
270
270
  isolated.push('--tools', '');
271
271
  if (!argsIncludeFlag(isolated, '--disable-slash-commands')) isolated.push('--disable-slash-commands');
272
- if (!argsIncludeFlag(isolated, '--safe-mode')) isolated.push('--safe-mode');
273
272
  if (!argsIncludeFlag(isolated, '--strict-mcp-config')) isolated.push('--strict-mcp-config');
274
273
  if (!argsIncludeFlag(isolated, '--no-chrome')) isolated.push('--no-chrome');
275
274
  return isolated;
package/src/cli.js CHANGED
@@ -107,6 +107,27 @@ function pollBackoffMs(failureCount, baseMs = 1000, maxMs = 30000) {
107
107
  return Math.min(maximum, base * (2 ** Math.min(10, failures - 1)));
108
108
  }
109
109
 
110
+ async function executeClaimedRun({
111
+ run,
112
+ execute = executeRun,
113
+ executeOptions,
114
+ once = false,
115
+ logger,
116
+ }) {
117
+ try {
118
+ await execute(run, executeOptions);
119
+ return true;
120
+ } catch (error) {
121
+ logger?.error?.('run_execution_failed', {
122
+ runId: run?.runId || null,
123
+ error: errorMeta(error),
124
+ });
125
+ if (once) throw error;
126
+ console.error(`Dexter run ${run?.runId || 'unknown'} failed; continuing to poll.`);
127
+ return false;
128
+ }
129
+ }
130
+
110
131
  function wait(delayMs) {
111
132
  return new Promise((resolve) => setTimeout(resolve, delayMs));
112
133
  }
@@ -340,14 +361,19 @@ async function startCommand({ apiBaseUrl, config, flags, configDir }) {
340
361
  if (poll.run) {
341
362
  console.log(`Claimed run ${poll.run.runId}.`);
342
363
  const runAgent = normalizeAgentName(poll.run?.companion?.agent || agent);
343
- await executeRun(poll.run, {
344
- apiBaseUrl,
345
- deviceToken,
346
- agent: runAgent,
347
- selectedModel: model,
348
- providerAdapter: providerAdapterForAgent(runAgent),
349
- env: bridgeEnv,
350
- maxSteps: flags['max-steps'],
364
+ await executeClaimedRun({
365
+ run: poll.run,
366
+ once,
367
+ logger: pollLogger,
368
+ executeOptions: {
369
+ apiBaseUrl,
370
+ deviceToken,
371
+ agent: runAgent,
372
+ selectedModel: model,
373
+ providerAdapter: providerAdapterForAgent(runAgent),
374
+ env: bridgeEnv,
375
+ maxSteps: flags['max-steps'],
376
+ },
351
377
  });
352
378
  if (once) return;
353
379
  continue;
@@ -424,6 +450,7 @@ export async function runCli(argv) {
424
450
  export const __private__ = {
425
451
  agentEnvironment,
426
452
  clearInvalidPairing,
453
+ executeClaimedRun,
427
454
  isInvalidPairingError,
428
455
  parseArgv,
429
456
  pollBackoffMs,
@@ -300,7 +300,6 @@ export function createClaudeAgentSdkAdapter({
300
300
  mcpServers: {},
301
301
  strictMcpConfig: true,
302
302
  skills: [],
303
- extraArgs: { 'safe-mode': null },
304
303
  settingSources: [],
305
304
  permissionMode: 'dontAsk',
306
305
  persistSession: false,