dsh-remote-vs 0.9.2 → 0.10.0

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/src/index.ts CHANGED
@@ -69,6 +69,11 @@ export interface Config {
69
69
  /**
70
70
  * P2 transparent-routing kill-switch: off = pure local passthrough;
71
71
  * shadow = log remote decisions but execute locally; enforce = route.
72
+ *
73
+ * The DEFAULT is `enforce`: the plugin exists to execute remote workspaces
74
+ * remotely, and a fresh profile that silently kept executing locally was the
75
+ * most common "why is nothing remote" report. `off`/`shadow` stay available as
76
+ * explicit opt-outs for debugging and for hosts that must stay local.
72
77
  */
73
78
  routingMode?: RoutingMode
74
79
  /** Per-command timeout for git work on a remote host (ms). */
@@ -107,7 +112,7 @@ export interface ResolvedConfig {
107
112
  export const Config = z.object({
108
113
  announceToAgent: z.boolean().default(false).volatile(),
109
114
  enabled: z.boolean().default(true).volatile(),
110
- routingMode: z.union(['off', 'shadow', 'enforce'] as const).default('off').volatile(),
115
+ routingMode: z.union(['off', 'shadow', 'enforce'] as const).default('enforce').volatile(),
111
116
  gitTimeoutMs: z.number().step(1).min(MIN_TIMEOUT_MS).max(MAX_TIMEOUT_MS)
112
117
  .default(DEFAULT_GIT_TIMEOUT_MS).volatile(),
113
118
  readTimeoutMs: z.number().step(1).min(MIN_TIMEOUT_MS).max(MAX_TIMEOUT_MS)
@@ -171,7 +176,10 @@ export function apply(ctx: Context, config?: ResolvedConfig): void {
171
176
  const worlds = new RemoteWorlds(ctx, {
172
177
  store,
173
178
  pool,
174
- mode: () => readField(config?.routingMode, 'off' as RoutingMode),
179
+ // Keep the runtime fallback equal to the schema default: a Host that hands
180
+ // the plugin a config object without this field must behave like a fresh
181
+ // profile, not like the old opt-in (`off`) behaviour.
182
+ mode: () => readField(config?.routingMode, 'enforce' as RoutingMode),
175
183
  })
176
184
  ctx.provide('remoteWorlds', worlds)
177
185
  ctx.effect(() => () => { pool.dispose() }, 'dsh-remote-vs: pool')