switchroom 0.13.21 → 0.13.22
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/dist/cli/switchroom.js
CHANGED
|
@@ -47331,8 +47331,8 @@ var {
|
|
|
47331
47331
|
} = import__.default;
|
|
47332
47332
|
|
|
47333
47333
|
// src/build-info.ts
|
|
47334
|
-
var VERSION = "0.13.
|
|
47335
|
-
var COMMIT_SHA = "
|
|
47334
|
+
var VERSION = "0.13.22";
|
|
47335
|
+
var COMMIT_SHA = "1706f857";
|
|
47336
47336
|
|
|
47337
47337
|
// src/cli/agent.ts
|
|
47338
47338
|
init_source();
|
|
@@ -48699,6 +48699,8 @@ function applyHindsightSettingsOverrides(pluginDestPath) {
|
|
|
48699
48699
|
return;
|
|
48700
48700
|
}
|
|
48701
48701
|
settings.retainEveryNTurns = 1;
|
|
48702
|
+
settings.recallMaxMemories = 8;
|
|
48703
|
+
settings.recallMinOverlap = 0.1;
|
|
48702
48704
|
writeFileSync5(settingsPath, JSON.stringify(settings, null, 2) + `
|
|
48703
48705
|
`, "utf-8");
|
|
48704
48706
|
}
|
|
@@ -62230,6 +62232,14 @@ var HINDSIGHT_IMAGE = "ghcr.io/switchroom/switchroom-hindsight:latest";
|
|
|
62230
62232
|
var HINDSIGHT_DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
62231
62233
|
var HINDSIGHT_DEFAULT_MCP_STATELESS = true;
|
|
62232
62234
|
var HINDSIGHT_BROKER_SOCK_VOLUME = `auth-broker-${HINDSIGHT_CONSUMER_NAME}-sock`;
|
|
62235
|
+
var HINDSIGHT_DEFAULT_RERANKER_BUCKET_BATCHING = "true";
|
|
62236
|
+
var HINDSIGHT_DEFAULT_RERANKER_MAX_CANDIDATES = 150;
|
|
62237
|
+
var HINDSIGHT_DEFAULT_RERANKER_LOCAL_MAX_CONCURRENT = 2;
|
|
62238
|
+
var HINDSIGHT_DEFAULT_RECALL_MAX_CONCURRENT = 8;
|
|
62239
|
+
var HINDSIGHT_DEFAULT_MEM_LIMIT = "4g";
|
|
62240
|
+
var HINDSIGHT_DEFAULT_MEM_RESERVATION = "2g";
|
|
62241
|
+
var HINDSIGHT_DEFAULT_CPUS = "2.0";
|
|
62242
|
+
var HINDSIGHT_DEFAULT_PIDS_LIMIT = 1000;
|
|
62233
62243
|
function isPortFree(port) {
|
|
62234
62244
|
return new Promise((resolve25) => {
|
|
62235
62245
|
const server = createServer3();
|
|
@@ -62300,7 +62310,15 @@ function startHindsight(ports) {
|
|
|
62300
62310
|
"-e",
|
|
62301
62311
|
`HINDSIGHT_API_LLM_MODEL=${HINDSIGHT_DEFAULT_MODEL}`,
|
|
62302
62312
|
"-e",
|
|
62303
|
-
`HINDSIGHT_API_MCP_STATELESS=${HINDSIGHT_DEFAULT_MCP_STATELESS}
|
|
62313
|
+
`HINDSIGHT_API_MCP_STATELESS=${HINDSIGHT_DEFAULT_MCP_STATELESS}`,
|
|
62314
|
+
"-e",
|
|
62315
|
+
`HINDSIGHT_API_RERANKER_LOCAL_BUCKET_BATCHING=${HINDSIGHT_DEFAULT_RERANKER_BUCKET_BATCHING}`,
|
|
62316
|
+
"-e",
|
|
62317
|
+
`HINDSIGHT_API_RERANKER_MAX_CANDIDATES=${HINDSIGHT_DEFAULT_RERANKER_MAX_CANDIDATES}`,
|
|
62318
|
+
"-e",
|
|
62319
|
+
`HINDSIGHT_API_RERANKER_LOCAL_MAX_CONCURRENT=${HINDSIGHT_DEFAULT_RERANKER_LOCAL_MAX_CONCURRENT}`,
|
|
62320
|
+
"-e",
|
|
62321
|
+
`HINDSIGHT_API_RECALL_MAX_CONCURRENT=${HINDSIGHT_DEFAULT_RECALL_MAX_CONCURRENT}`
|
|
62304
62322
|
];
|
|
62305
62323
|
const args = [
|
|
62306
62324
|
"run",
|
|
@@ -62309,6 +62327,10 @@ function startHindsight(ports) {
|
|
|
62309
62327
|
"switchroom-hindsight",
|
|
62310
62328
|
"--restart",
|
|
62311
62329
|
"unless-stopped",
|
|
62330
|
+
`--memory=${HINDSIGHT_DEFAULT_MEM_LIMIT}`,
|
|
62331
|
+
`--memory-reservation=${HINDSIGHT_DEFAULT_MEM_RESERVATION}`,
|
|
62332
|
+
`--cpus=${HINDSIGHT_DEFAULT_CPUS}`,
|
|
62333
|
+
`--pids-limit=${HINDSIGHT_DEFAULT_PIDS_LIMIT}`,
|
|
62312
62334
|
"-p",
|
|
62313
62335
|
`127.0.0.1:${apiPort}:8888`,
|
|
62314
62336
|
"-p",
|
|
@@ -62355,6 +62377,14 @@ function generateHindsightComposeSnippet() {
|
|
|
62355
62377
|
" - HINDSIGHT_API_LLM_PROVIDER=claude-code",
|
|
62356
62378
|
` - HINDSIGHT_API_LLM_MODEL=${HINDSIGHT_DEFAULT_MODEL}`,
|
|
62357
62379
|
` - HINDSIGHT_API_MCP_STATELESS=${HINDSIGHT_DEFAULT_MCP_STATELESS}`,
|
|
62380
|
+
` - HINDSIGHT_API_RERANKER_LOCAL_BUCKET_BATCHING=${HINDSIGHT_DEFAULT_RERANKER_BUCKET_BATCHING}`,
|
|
62381
|
+
` - HINDSIGHT_API_RERANKER_MAX_CANDIDATES=${HINDSIGHT_DEFAULT_RERANKER_MAX_CANDIDATES}`,
|
|
62382
|
+
` - HINDSIGHT_API_RERANKER_LOCAL_MAX_CONCURRENT=${HINDSIGHT_DEFAULT_RERANKER_LOCAL_MAX_CONCURRENT}`,
|
|
62383
|
+
` - HINDSIGHT_API_RECALL_MAX_CONCURRENT=${HINDSIGHT_DEFAULT_RECALL_MAX_CONCURRENT}`,
|
|
62384
|
+
` mem_limit: ${HINDSIGHT_DEFAULT_MEM_LIMIT}`,
|
|
62385
|
+
` mem_reservation: ${HINDSIGHT_DEFAULT_MEM_RESERVATION}`,
|
|
62386
|
+
` cpus: ${HINDSIGHT_DEFAULT_CPUS}`,
|
|
62387
|
+
` pids_limit: ${HINDSIGHT_DEFAULT_PIDS_LIMIT}`,
|
|
62358
62388
|
" volumes:",
|
|
62359
62389
|
" - switchroom-hindsight-data:/home/hindsight/.pg0",
|
|
62360
62390
|
` - ${HINDSIGHT_BROKER_SOCK_VOLUME}:/run/switchroom/auth-broker`,
|
package/package.json
CHANGED
|
@@ -207,14 +207,15 @@ export HINDSIGHT_AGENT_NAME="{{name}}"
|
|
|
207
207
|
export HINDSIGHT_RECALL_MAX_MEMORIES={{hindsightRecallMaxMemories}}
|
|
208
208
|
{{/if}}
|
|
209
209
|
# Per-session recall cache (#424 phase 4.1). Identical (prompt, bank)
|
|
210
|
-
# within a session reuses the prior recall result
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
210
|
+
# within a session reuses the prior recall result. v0.13.22: the
|
|
211
|
+
# unconditional default-600s export was dropped — the 2026-05-24
|
|
212
|
+
# audit measured 0% hit rate across 430+ Telegram turns (cache key
|
|
213
|
+
# is `(session_id, prompt, bank, extra_banks)`; each Telegram inbound
|
|
214
|
+
# is unique). Operators who run Claude Code interactively (where
|
|
215
|
+
# prompt-repeat happens) can still opt in via memory.recall.cache_ttl_secs
|
|
216
|
+
# in switchroom.yaml. Setting it to 0 disables caching for that agent.
|
|
214
217
|
{{#if (isNumber hindsightRecallCacheTtlSecs)}}
|
|
215
218
|
export HINDSIGHT_RECALL_CACHE_TTL_SECS={{hindsightRecallCacheTtlSecs}}
|
|
216
|
-
{{else}}
|
|
217
|
-
export HINDSIGHT_RECALL_CACHE_TTL_SECS=600
|
|
218
219
|
{{/if}}
|
|
219
220
|
# Lexical-overlap relevance gate (#475). Drops memories whose Jaccard
|
|
220
221
|
# overlap with the user's query is below this threshold (range 0.0–1.0).
|
|
@@ -48315,10 +48315,10 @@ function sweepStaleTurnActiveMarker(stateDir, opts) {
|
|
|
48315
48315
|
}
|
|
48316
48316
|
|
|
48317
48317
|
// ../src/build-info.ts
|
|
48318
|
-
var VERSION = "0.13.
|
|
48319
|
-
var COMMIT_SHA = "
|
|
48320
|
-
var COMMIT_DATE = "2026-05-
|
|
48321
|
-
var LATEST_PR =
|
|
48318
|
+
var VERSION = "0.13.22";
|
|
48319
|
+
var COMMIT_SHA = "1706f857";
|
|
48320
|
+
var COMMIT_DATE = "2026-05-23T23:20:14Z";
|
|
48321
|
+
var LATEST_PR = 1700;
|
|
48322
48322
|
var COMMITS_AHEAD_OF_TAG = 0;
|
|
48323
48323
|
|
|
48324
48324
|
// gateway/boot-version.ts
|
|
@@ -556,7 +556,15 @@ def main():
|
|
|
556
556
|
max_tokens=config.get("recallMaxTokens", 1024),
|
|
557
557
|
budget=config.get("recallBudget", "mid"),
|
|
558
558
|
types=config.get("recallTypes"),
|
|
559
|
-
timeout
|
|
559
|
+
# 8s in-script timeout leaves 4s headroom inside the 12s
|
|
560
|
+
# UserPromptSubmit hook ceiling (see hooks.json:20) for cache
|
|
561
|
+
# write + block formatting. Tightened from 10s in switchroom
|
|
562
|
+
# v0.13.22: the 2026-05-24 audit showed 17-26% of turns
|
|
563
|
+
# breaching the 12s hook timeout on heavy agents (finn /
|
|
564
|
+
# gymbro / klanker), which dropped the recall entirely; an
|
|
565
|
+
# earlier-hard-timeout failure returns cleanly with no
|
|
566
|
+
# memories instead of blowing past the hook ceiling.
|
|
567
|
+
timeout=8,
|
|
560
568
|
)
|
|
561
569
|
results = response.get("results", [])
|
|
562
570
|
except Exception as e:
|
|
@@ -577,7 +585,15 @@ def main():
|
|
|
577
585
|
max_tokens=config.get("recallMaxTokens", 1024),
|
|
578
586
|
budget=config.get("recallBudget", "mid"),
|
|
579
587
|
types=config.get("recallTypes"),
|
|
580
|
-
timeout
|
|
588
|
+
# 8s in-script timeout leaves 4s headroom inside the 12s
|
|
589
|
+
# UserPromptSubmit hook ceiling (see hooks.json:20) for cache
|
|
590
|
+
# write + block formatting. Tightened from 10s in switchroom
|
|
591
|
+
# v0.13.22: the 2026-05-24 audit showed 17-26% of turns
|
|
592
|
+
# breaching the 12s hook timeout on heavy agents (finn /
|
|
593
|
+
# gymbro / klanker), which dropped the recall entirely; an
|
|
594
|
+
# earlier-hard-timeout failure returns cleanly with no
|
|
595
|
+
# memories instead of blowing past the hook ceiling.
|
|
596
|
+
timeout=8,
|
|
581
597
|
)
|
|
582
598
|
extra_results = extra_response.get("results", [])
|
|
583
599
|
if extra_results:
|