switchroom 0.18.33 → 0.19.1

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.
@@ -2120,7 +2120,7 @@ var init_esm = __esm(() => {
2120
2120
  });
2121
2121
 
2122
2122
  // src/build-info.ts
2123
- var VERSION = "0.18.33", COMMIT_SHA = "658ddf85";
2123
+ var VERSION = "0.19.1", COMMIT_SHA = "370b7c4b";
2124
2124
 
2125
2125
  // src/cli/resolve-version.ts
2126
2126
  import { existsSync, readFileSync } from "node:fs";
@@ -26663,7 +26663,7 @@ import { existsSync as existsSync9, readFileSync as readFileSync7 } from "node:f
26663
26663
  import { dirname as dirname4, join as join7 } from "node:path";
26664
26664
 
26665
26665
  // src/build-info.ts
26666
- var VERSION = "0.18.33";
26666
+ var VERSION = "0.19.1";
26667
26667
 
26668
26668
  // src/cli/resolve-version.ts
26669
26669
  function readPackageVersion() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "switchroom",
3
3
  "//version": "NOT the release version — source of truth is the git tag, resolved by scripts/build.mjs:resolveVersion() (see CLAUDE.md > Standard release process). This field is stale by design and only the Layer-4 dev/non-tag fallback for build.mjs + src/cli/resolve-version.ts; do NOT bump it expecting a release to pick it up. npm-pack tarball naming needs a real version — do that as an UNCOMMITTED pack-time bump (see release step 6), never a committed one.",
4
- "version": "0.18.33",
4
+ "version": "0.19.1",
5
5
  "description": "Run Claude Code 24/7 on your Claude Pro/Max subscription over Telegram. Open-source alternative to OpenClaw and NanoClaw — no API keys.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -42180,7 +42180,7 @@ function buildInboundEnvelope(p) {
42180
42180
  };
42181
42181
  return inboundMsg;
42182
42182
  }
42183
- var INBOUND_ROUTER_V2 = process.env.SWITCHROOM_INBOUND_ROUTER_V2 === "1";
42183
+ var INBOUND_ROUTER_V2 = process.env.SWITCHROOM_INBOUND_ROUTER_V2 !== "0";
42184
42184
  async function runPreTurnIntercepts(p, deps) {
42185
42185
  const stopOutcome = await interceptStopKeyword(p.stop, deps);
42186
42186
  if (stopOutcome.handled)
@@ -92377,10 +92377,10 @@ function effectiveTurnAgeMs(markerAgeMs, turnStartedAt, now) {
92377
92377
  }
92378
92378
 
92379
92379
  // ../src/build-info.ts
92380
- var VERSION = "0.18.33";
92381
- var COMMIT_SHA = "658ddf85";
92382
- var COMMIT_DATE = "2026-07-19T02:36:29Z";
92383
- var LATEST_PR = 3401;
92380
+ var VERSION = "0.19.1";
92381
+ var COMMIT_SHA = "370b7c4b";
92382
+ var COMMIT_DATE = "2026-07-19T03:50:00Z";
92383
+ var LATEST_PR = 3406;
92384
92384
  var COMMITS_AHEAD_OF_TAG = 0;
92385
92385
 
92386
92386
  // gateway/boot-version.ts
@@ -95714,7 +95714,7 @@ function gatewayTurnEndDeps() {
95714
95714
  obligationLedger
95715
95715
  };
95716
95716
  }
95717
- var TURN_END_FUNNEL_V2 = process.env.SWITCHROOM_TURN_END_FUNNEL_V2 === "1";
95717
+ var TURN_END_FUNNEL_V2 = process.env.SWITCHROOM_TURN_END_FUNNEL_V2 !== "0";
95718
95718
  var _turnEndFunnel;
95719
95719
  function turnEndFunnel() {
95720
95720
  return _turnEndFunnel ??= createTurnEndFunnel(gatewayTurnEndDeps());
@@ -4816,7 +4816,7 @@ export type TurnEndDeps = ReturnType<typeof gatewayTurnEndDeps>
4816
4816
  // paths verbatim. =1 routes every wrapper (and the two ghost-clear callsites)
4817
4817
  // through the single `endTurn` dispatcher — same code, one auditable entry
4818
4818
  // point. Module-load const: flipping requires an agent restart (P7 F2).
4819
- const TURN_END_FUNNEL_V2 = process.env.SWITCHROOM_TURN_END_FUNNEL_V2 === '1' // default OFF during bake
4819
+ const TURN_END_FUNNEL_V2 = process.env.SWITCHROOM_TURN_END_FUNNEL_V2 !== '0' // default ON (canary-validated v0.18.33); escape hatch =0
4820
4820
 
4821
4821
  let _turnEndFunnel: ReturnType<typeof createTurnEndFunnel> | undefined
4822
4822
  function turnEndFunnel(): ReturnType<typeof createTurnEndFunnel> {
@@ -335,18 +335,18 @@ export function buildInboundEnvelope(p: EnvelopeBuildParams): InboundMessage {
335
335
  /**
336
336
  * THE deterministic cutover switch (#2996 P7 PR-11, design §2). Read ONCE at
337
337
  * module load (F2: flags are const-captured — flipping requires an agent
338
- * restart, same as every other `_ENABLED` flag). Default OFF: the legacy
339
- * inline delegation sequence in gateway.ts `handleInbound` remains the
340
- * production control flow until the canary (flag `=1`) bakes clean. The v2
341
- * chain and the legacy sequence call the SAME extracted intercept functions
342
- * in the SAME order — the characterization harness is the parity oracle (F6;
343
- * the #3316-removed gate-parity probe is not relied on), and
344
- * tests/inbound-router-v2-chain.test.ts pins the v2 path with the flag set
345
- * env-before-import.
338
+ * restart, same as every other `_ENABLED` flag). Default ON (canary-validated
339
+ * on v0.18.33 5/5 UAT, DM + supergroup): the v2 consolidated intercept chain
340
+ * is the production control flow. The v2 chain and the legacy sequence call the
341
+ * SAME extracted intercept functions in the SAME order the characterization
342
+ * harness is the parity oracle (F6; the #3316-removed gate-parity probe is not
343
+ * relied on), and tests/inbound-router-v2-chain.test.ts pins the v2 path with
344
+ * the flag set env-before-import.
346
345
  *
347
- * Rollback: unset / `=0` + agent restart. No model involvement.
346
+ * Rollback (escape hatch): `SWITCHROOM_INBOUND_ROUTER_V2=0` + agent restart.
347
+ * No model involvement.
348
348
  */
349
- export const INBOUND_ROUTER_V2 = process.env.SWITCHROOM_INBOUND_ROUTER_V2 === '1'
349
+ export const INBOUND_ROUTER_V2 = process.env.SWITCHROOM_INBOUND_ROUTER_V2 !== '0'
350
350
 
351
351
  /** Outcome of the pre-turn chain: stop-keyword then interrupt-marker. */
352
352
  export type PreTurnChainOutcome = InterruptMarkerOutcome
@@ -28,8 +28,10 @@
28
28
  * Parameterized over the two kill-switch postures so a future eager-read
29
29
  * introduced on either the router-v2 or turn-end-funnel-v2 path is also
30
30
  * caught:
31
- * - both flags unset (production default today)
31
+ * - both flags unset (production default — now BOTH v2 ON after the flip)
32
32
  * - SWITCHROOM_INBOUND_ROUTER_V2=1 + SWITCHROOM_TURN_END_FUNNEL_V2=1
33
+ * - both flags =0 (the escape-hatch legacy v1 posture — kept so the legacy
34
+ * module-eval paths stay boot-smoked until the legacy delete)
33
35
  *
34
36
  * Bun is the prod + CI gateway runtime (`bun test` is a required check), so
35
37
  * spawning it here is CI-native, not CI-hostile.
@@ -125,11 +127,19 @@ function bootGateway(extraEnv: Record<string, string>): Promise<BootResult> {
125
127
  }
126
128
 
127
129
  const POSTURES: Array<{ name: string; env: Record<string, string> }> = [
128
- { name: 'both kill switches unset (prod default)', env: {} },
130
+ // Flags unset is now the DEFAULT-ON posture (both `!== '0'`) after the
131
+ // v0.18.33 canary flip — the v2 router + v2 turn-end funnel are live.
132
+ { name: 'both kill switches unset (prod default — now BOTH v2 ON)', env: {} },
129
133
  {
130
- name: 'router-v2 + turn-end-funnel-v2 enabled',
134
+ name: 'router-v2 + turn-end-funnel-v2 explicitly enabled',
131
135
  env: { SWITCHROOM_INBOUND_ROUTER_V2: '1', SWITCHROOM_TURN_END_FUNNEL_V2: '1' },
132
136
  },
137
+ {
138
+ // Explicit legacy posture: with both flags defaulting ON, the only way to
139
+ // boot-smoke the legacy (v1) module-eval paths is the `=0` escape hatch.
140
+ name: 'both kill switches disabled (=0 escape hatch — legacy v1 paths)',
141
+ env: { SWITCHROOM_INBOUND_ROUTER_V2: '0', SWITCHROOM_TURN_END_FUNNEL_V2: '0' },
142
+ },
133
143
  ]
134
144
 
135
145
  describe('gateway boot-smoke (M-1): real bun boot reaches post-module-eval marker with no TDZ ReferenceError', () => {