@geravant/sinain 1.18.2 → 1.18.3

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/onboard.js CHANGED
@@ -180,7 +180,11 @@ export async function runOnboard(args = {}) {
180
180
 
181
181
  agentsPatch = {
182
182
  default: base.SINAIN_AGENT || "claude",
183
- escalationMode: "off",
183
+ // No `escalationMode` written — lane (default agent) is the single
184
+ // source of truth for whether escalation runs. If the user picks a
185
+ // local agent (claude), the runtime's default mode ("rich" from
186
+ // config.ts) takes effect and registerBareAgent ensures lane and
187
+ // mode stay reconciled at boot.
184
188
  };
185
189
 
186
190
  if (enableGateway) {
@@ -397,9 +401,9 @@ if (flags.nonInteractive) {
397
401
  }
398
402
 
399
403
  writeEnv(vars);
400
- // Default agent + escalation off + openclaw explicitly disabled. Gateway is
401
- // opt-in via the interactive wizard (`sinain onboard`) or `sinain config`.
402
- writeAgentsConfig({ default: "claude", escalationMode: "off", openclawProfile: null });
404
+ // Default agent + openclaw explicitly disabled. No escalation mode written
405
+ // lane is the source of truth, registerBareAgent reconciles at boot.
406
+ writeAgentsConfig({ default: "claude", openclawProfile: null });
403
407
  console.log(c.green(` Config written to ${ENV_PATH} + ~/.sinain/agents.json`));
404
408
  process.exit(0);
405
409
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geravant/sinain",
3
- "version": "1.18.2",
3
+ "version": "1.18.3",
4
4
  "description": "Ambient intelligence that sees what you see, hears what you hear, and acts on your behalf",
5
5
  "type": "module",
6
6
  "bin": {
@@ -64,7 +64,7 @@
64
64
  },
65
65
 
66
66
  "escalation": {
67
- "mode": "off",
67
+ "_comment": "Lane (the agent picked for escalation in agents.json `default` or via the overlay chip) is the source of truth for whether escalation runs. `mode` is intentionally omitted here — the runtime default (rich) applies, and registerBareAgent reconciles mode with lane at boot. Override `mode` only if you want to force selective/focus/off semantics.",
68
68
  "cooldownMs": 30000,
69
69
  "staleMs": 90000
70
70
  },
@@ -734,6 +734,16 @@ async function main() {
734
734
  }
735
735
  wsHandler.updateState({ agents: { ...bareAgentState } });
736
736
  log(TAG, `bareagent register: available=[${clean.join(",")}] current=${current} → lanes esc=${bareAgentState.escalationAgent} spawn=${bareAgentState.spawnAgent}`);
737
+
738
+ // Lane is the source of truth for "is escalation active?". If a lane is
739
+ // set but mode is still "off" (e.g. an old wizard run wrote mode=off and
740
+ // the user has since picked an agent in the chip selector — or we just
741
+ // booted from agents.json with that combination), reconcile by promoting
742
+ // mode to match. Mirrors the existing set_agent → resumeEscalation flow,
743
+ // applied at register time so the boot-from-disk case isn't an exception.
744
+ if (bareAgentState.escalationAgent && config.escalationConfig.mode === "off") {
745
+ resumeEscalationInternal();
746
+ }
737
747
  }
738
748
 
739
749
  // ── Create HTTP + WS server ──