switchroom 0.21.13 → 0.21.15
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/agent-scheduler/index.js +6 -2
- package/dist/auth-broker/index.js +6 -2
- package/dist/cli/notion-write-pretool.mjs +6 -2
- package/dist/cli/switchroom.js +1608 -699
- package/dist/host-control/main.js +22 -16
- package/dist/vault/approvals/kernel-server.js +6 -2
- package/dist/vault/broker/server.js +132 -11
- package/package.json +1 -1
- package/profiles/_base/start.sh.hbs +9 -0
- package/profiles/_shared/agent-self-service.md.hbs +32 -86
- package/profiles/_shared/vault-protocol.md.hbs +17 -62
- package/profiles/default/CLAUDE.md.hbs +76 -74
- package/skills/switchroom-runtime/SKILL.md +32 -0
- package/telegram-plugin/dist/gateway/gateway.js +10 -6
- package/vendor/hindsight-memory/scripts/lib/client.py +14 -0
- package/vendor/hindsight-memory/scripts/lib/config.py +22 -0
- package/vendor/hindsight-memory/scripts/lib/directives.py +63 -7
- package/vendor/hindsight-memory/scripts/lib/watermark.py +27 -0
- package/vendor/hindsight-memory/scripts/recall.py +349 -5
- package/vendor/hindsight-memory/scripts/reconcile_tail.py +4 -12
- package/vendor/hindsight-memory/scripts/retain.py +59 -3
- package/vendor/hindsight-memory/scripts/tests/test_config_retain_tool_calls_env.py +98 -0
- package/vendor/hindsight-memory/scripts/tests/test_directives.py +98 -0
- package/vendor/hindsight-memory/scripts/tests/test_incremental_sweep.py +293 -0
- package/vendor/hindsight-memory/scripts/tests/test_profile_capture_nudge.py +335 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_integration.py +53 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_query_timestamp.py +376 -0
|
@@ -11124,6 +11124,7 @@ var AgentMemorySchema = exports_external.object({
|
|
|
11124
11124
|
empathy: exports_external.number().int().min(1).max(5).optional().describe("How much the bank weights emotional/relational context (1-5; engine default 3).")
|
|
11125
11125
|
}).optional().describe("Personality traits (1-5 each) steering how this bank frames recall, " + "reflect, and observation synthesis — a coach leans empathy-high, a " + "lawyer/analyst leans skepticism/literalism-high. Maps to the engine's " + "flat `disposition_skepticism`/`_literalism`/`_empathy` fields. " + "Cascade: per-key merge (an agent overrides individual traits and " + "inherits the rest, matching `recall`)."),
|
|
11126
11126
|
directive_capture_nudge: exports_external.boolean().optional().describe("Deterministic directive-capture nudge (issue #2848 Stage B). When " + "on (switchroom default true — Stage A measured a ~55% miss rate on " + "durable corrections), the auto-recall hook regex-detects correction " + '/ standing-rule-shaped inbound ("always/never …", "from now on …", ' + `"stop doing …", a stated preference, "that's wrong, it's …") and ` + "appends a terse advisory to the turn's context telling the model to " + "persist the rule with mcp__hindsight__create_directive if it IS " + "durable. Detection is pure regex — the model does the judgment " + "in-session and calls create_directive itself (no model callsite, no " + "silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11127
|
+
profile_capture_nudge: exports_external.boolean().optional().describe("Deterministic operator-profile capture nudge (RFC phase4 P3, serves " + 'the "save memories about him" want). When on (switchroom default ' + "true), the auto-recall hook regex-detects a first-person durable " + 'self-statement by the operator ("I prefer …", "my … is …", "I ' + 'always …", "remind me that I …") and appends a terse advisory to ' + "the turn's context telling the model to persist it with an explicit " + "mcp__hindsight__retain tagged `profile:ken` into the agent's OWN bank " + "(not a shared/cross-agent person bank). Detection is pure regex — the " + "model does the judgment in-session and calls retain itself (no model " + "callsite, no silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11127
11128
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
11128
11129
|
observation_scopes: ObservationScopesSchema,
|
|
11129
11130
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -11172,7 +11173,8 @@ var AgentMemorySchema = exports_external.object({
|
|
|
11172
11173
|
}).optional().describe("Auto-recall tuning knobs"),
|
|
11173
11174
|
retain: exports_external.object({
|
|
11174
11175
|
every_n_turns: exports_external.number().int().min(1).optional().describe("How often the Stop hook fires auto-retention, in turns. The " + "vendor plugin default is 10 (a short session can end before " + "retention ever fires); switchroom's scaffold default is 3. " + "Lower = more frequent, smaller retains + tighter crash " + "durability (at 1, every turn is retained before a restart can " + "lose it); higher = fewer, larger retains + less LLM churn. " + "Raised from the historical 1 to 3 because the local reasoning " + "consolidation model (Ollama gpt-oss-20b) ran away on the large " + "overlapping every-turn payloads. Set to 1 for the old " + "every-turn crash-durability guarantee. Min 1. Cascade: " + "per-field merge (agent wins over default)."),
|
|
11175
|
-
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge.")
|
|
11176
|
+
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge."),
|
|
11177
|
+
tool_calls: exports_external.boolean().optional().describe("Whether auto-retain stores assistant tool_use blocks (with their " + "entire input dict) and tool_result content (up to 2000 chars) " + "alongside the human/assistant turns. Vendor + switchroom default " + "is true — the fleet behaves byte-identically until an operator " + "sets this false. Tool inputs/results are a large fraction of " + "retained volume (RFC memory-redesign P4) but also where evidence " + "lives (a commit SHA, a failing test's output, the diff that " + "fixed something), so the tradeoff is real and per-agent. false is " + "not a new mode: sidechains already force it off " + "(subagent_retain.py). Set false to drop tool exhaust from an " + "agent's retains. Cascade: per-field merge (agent wins over " + "default).")
|
|
11176
11178
|
}).optional().describe("Auto-retain (Stop-hook consolidation) cadence knobs")
|
|
11177
11179
|
}).optional();
|
|
11178
11180
|
var HookEntrySchema = exports_external.object({
|
|
@@ -11560,6 +11562,7 @@ var profileFields = {
|
|
|
11560
11562
|
isolation: exports_external.enum(["default", "strict"]).optional(),
|
|
11561
11563
|
profile: exports_external.string().optional(),
|
|
11562
11564
|
directive_capture_nudge: exports_external.boolean().optional(),
|
|
11565
|
+
profile_capture_nudge: exports_external.boolean().optional(),
|
|
11563
11566
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
11564
11567
|
observation_scopes: ObservationScopesSchema,
|
|
11565
11568
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -11608,7 +11611,8 @@ var profileFields = {
|
|
|
11608
11611
|
}).optional(),
|
|
11609
11612
|
retain: exports_external.object({
|
|
11610
11613
|
every_n_turns: exports_external.number().int().min(1).optional(),
|
|
11611
|
-
overlap_turns: exports_external.number().int().min(0).optional()
|
|
11614
|
+
overlap_turns: exports_external.number().int().min(0).optional(),
|
|
11615
|
+
tool_calls: exports_external.boolean().optional()
|
|
11612
11616
|
}).optional(),
|
|
11613
11617
|
bank_mission: exports_external.string().optional(),
|
|
11614
11618
|
reflect_mission: exports_external.string().optional(),
|
|
@@ -11149,6 +11149,7 @@ var init_schema = __esm(() => {
|
|
|
11149
11149
|
empathy: exports_external.number().int().min(1).max(5).optional().describe("How much the bank weights emotional/relational context (1-5; engine default 3).")
|
|
11150
11150
|
}).optional().describe("Personality traits (1-5 each) steering how this bank frames recall, " + "reflect, and observation synthesis — a coach leans empathy-high, a " + "lawyer/analyst leans skepticism/literalism-high. Maps to the engine's " + "flat `disposition_skepticism`/`_literalism`/`_empathy` fields. " + "Cascade: per-key merge (an agent overrides individual traits and " + "inherits the rest, matching `recall`)."),
|
|
11151
11151
|
directive_capture_nudge: exports_external.boolean().optional().describe("Deterministic directive-capture nudge (issue #2848 Stage B). When " + "on (switchroom default true — Stage A measured a ~55% miss rate on " + "durable corrections), the auto-recall hook regex-detects correction " + '/ standing-rule-shaped inbound ("always/never …", "from now on …", ' + `"stop doing …", a stated preference, "that's wrong, it's …") and ` + "appends a terse advisory to the turn's context telling the model to " + "persist the rule with mcp__hindsight__create_directive if it IS " + "durable. Detection is pure regex — the model does the judgment " + "in-session and calls create_directive itself (no model callsite, no " + "silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11152
|
+
profile_capture_nudge: exports_external.boolean().optional().describe("Deterministic operator-profile capture nudge (RFC phase4 P3, serves " + 'the "save memories about him" want). When on (switchroom default ' + "true), the auto-recall hook regex-detects a first-person durable " + 'self-statement by the operator ("I prefer …", "my … is …", "I ' + 'always …", "remind me that I …") and appends a terse advisory to ' + "the turn's context telling the model to persist it with an explicit " + "mcp__hindsight__retain tagged `profile:ken` into the agent's OWN bank " + "(not a shared/cross-agent person bank). Detection is pure regex — the " + "model does the judgment in-session and calls retain itself (no model " + "callsite, no silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11152
11153
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
11153
11154
|
observation_scopes: ObservationScopesSchema,
|
|
11154
11155
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -11197,7 +11198,8 @@ var init_schema = __esm(() => {
|
|
|
11197
11198
|
}).optional().describe("Auto-recall tuning knobs"),
|
|
11198
11199
|
retain: exports_external.object({
|
|
11199
11200
|
every_n_turns: exports_external.number().int().min(1).optional().describe("How often the Stop hook fires auto-retention, in turns. The " + "vendor plugin default is 10 (a short session can end before " + "retention ever fires); switchroom's scaffold default is 3. " + "Lower = more frequent, smaller retains + tighter crash " + "durability (at 1, every turn is retained before a restart can " + "lose it); higher = fewer, larger retains + less LLM churn. " + "Raised from the historical 1 to 3 because the local reasoning " + "consolidation model (Ollama gpt-oss-20b) ran away on the large " + "overlapping every-turn payloads. Set to 1 for the old " + "every-turn crash-durability guarantee. Min 1. Cascade: " + "per-field merge (agent wins over default)."),
|
|
11200
|
-
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge.")
|
|
11201
|
+
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge."),
|
|
11202
|
+
tool_calls: exports_external.boolean().optional().describe("Whether auto-retain stores assistant tool_use blocks (with their " + "entire input dict) and tool_result content (up to 2000 chars) " + "alongside the human/assistant turns. Vendor + switchroom default " + "is true — the fleet behaves byte-identically until an operator " + "sets this false. Tool inputs/results are a large fraction of " + "retained volume (RFC memory-redesign P4) but also where evidence " + "lives (a commit SHA, a failing test's output, the diff that " + "fixed something), so the tradeoff is real and per-agent. false is " + "not a new mode: sidechains already force it off " + "(subagent_retain.py). Set false to drop tool exhaust from an " + "agent's retains. Cascade: per-field merge (agent wins over " + "default).")
|
|
11201
11203
|
}).optional().describe("Auto-retain (Stop-hook consolidation) cadence knobs")
|
|
11202
11204
|
}).optional();
|
|
11203
11205
|
HookEntrySchema = exports_external.object({
|
|
@@ -11585,6 +11587,7 @@ var init_schema = __esm(() => {
|
|
|
11585
11587
|
isolation: exports_external.enum(["default", "strict"]).optional(),
|
|
11586
11588
|
profile: exports_external.string().optional(),
|
|
11587
11589
|
directive_capture_nudge: exports_external.boolean().optional(),
|
|
11590
|
+
profile_capture_nudge: exports_external.boolean().optional(),
|
|
11588
11591
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
11589
11592
|
observation_scopes: ObservationScopesSchema,
|
|
11590
11593
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -11633,7 +11636,8 @@ var init_schema = __esm(() => {
|
|
|
11633
11636
|
}).optional(),
|
|
11634
11637
|
retain: exports_external.object({
|
|
11635
11638
|
every_n_turns: exports_external.number().int().min(1).optional(),
|
|
11636
|
-
overlap_turns: exports_external.number().int().min(0).optional()
|
|
11639
|
+
overlap_turns: exports_external.number().int().min(0).optional(),
|
|
11640
|
+
tool_calls: exports_external.boolean().optional()
|
|
11637
11641
|
}).optional(),
|
|
11638
11642
|
bank_mission: exports_external.string().optional(),
|
|
11639
11643
|
reflect_mission: exports_external.string().optional(),
|
|
@@ -11885,6 +11885,7 @@ var AgentMemorySchema = exports_external.object({
|
|
|
11885
11885
|
empathy: exports_external.number().int().min(1).max(5).optional().describe("How much the bank weights emotional/relational context (1-5; engine default 3).")
|
|
11886
11886
|
}).optional().describe("Personality traits (1-5 each) steering how this bank frames recall, " + "reflect, and observation synthesis \u2014 a coach leans empathy-high, a " + "lawyer/analyst leans skepticism/literalism-high. Maps to the engine's " + "flat `disposition_skepticism`/`_literalism`/`_empathy` fields. " + "Cascade: per-key merge (an agent overrides individual traits and " + "inherits the rest, matching `recall`)."),
|
|
11887
11887
|
directive_capture_nudge: exports_external.boolean().optional().describe("Deterministic directive-capture nudge (issue #2848 Stage B). When " + "on (switchroom default true \u2014 Stage A measured a ~55% miss rate on " + "durable corrections), the auto-recall hook regex-detects correction " + '/ standing-rule-shaped inbound ("always/never \u2026", "from now on \u2026", ' + `"stop doing \u2026", a stated preference, "that's wrong, it's \u2026") and ` + "appends a terse advisory to the turn's context telling the model to " + "persist the rule with mcp__hindsight__create_directive if it IS " + "durable. Detection is pure regex \u2014 the model does the judgment " + "in-session and calls create_directive itself (no model callsite, no " + "silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11888
|
+
profile_capture_nudge: exports_external.boolean().optional().describe("Deterministic operator-profile capture nudge (RFC phase4 P3, serves " + 'the "save memories about him" want). When on (switchroom default ' + "true), the auto-recall hook regex-detects a first-person durable " + 'self-statement by the operator ("I prefer \u2026", "my \u2026 is \u2026", "I ' + 'always \u2026", "remind me that I \u2026") and appends a terse advisory to ' + "the turn's context telling the model to persist it with an explicit " + "mcp__hindsight__retain tagged `profile:ken` into the agent's OWN bank " + "(not a shared/cross-agent person bank). Detection is pure regex \u2014 the " + "model does the judgment in-session and calls retain itself (no model " + "callsite, no silent hook-side write). Set false to disable per-agent. " + "Cascade: override (per-agent wins over default)."),
|
|
11888
11889
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
11889
11890
|
observation_scopes: ObservationScopesSchema,
|
|
11890
11891
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -11933,7 +11934,8 @@ var AgentMemorySchema = exports_external.object({
|
|
|
11933
11934
|
}).optional().describe("Auto-recall tuning knobs"),
|
|
11934
11935
|
retain: exports_external.object({
|
|
11935
11936
|
every_n_turns: exports_external.number().int().min(1).optional().describe("How often the Stop hook fires auto-retention, in turns. The " + "vendor plugin default is 10 (a short session can end before " + "retention ever fires); switchroom's scaffold default is 3. " + "Lower = more frequent, smaller retains + tighter crash " + "durability (at 1, every turn is retained before a restart can " + "lose it); higher = fewer, larger retains + less LLM churn. " + "Raised from the historical 1 to 3 because the local reasoning " + "consolidation model (Ollama gpt-oss-20b) ran away on the large " + "overlapping every-turn payloads. Set to 1 for the old " + "every-turn crash-durability guarantee. Min 1. Cascade: " + "per-field merge (agent wins over default)."),
|
|
11936
|
-
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge.")
|
|
11937
|
+
overlap_turns: exports_external.number().int().min(0).optional().describe("Extra recent turns included in each chunked retain window on " + "top of `every_n_turns`, so window = overlap_turns + " + "every_n_turns recent turns. Vendor default is 2; switchroom's " + "scaffold default is 1 (smaller payloads for the local " + "reasoning consolidation model). Higher = more redundant " + "context re-sent per fire. Min 0. Cascade: per-field merge."),
|
|
11938
|
+
tool_calls: exports_external.boolean().optional().describe("Whether auto-retain stores assistant tool_use blocks (with their " + "entire input dict) and tool_result content (up to 2000 chars) " + "alongside the human/assistant turns. Vendor + switchroom default " + "is true \u2014 the fleet behaves byte-identically until an operator " + "sets this false. Tool inputs/results are a large fraction of " + "retained volume (RFC memory-redesign P4) but also where evidence " + "lives (a commit SHA, a failing test's output, the diff that " + "fixed something), so the tradeoff is real and per-agent. false is " + "not a new mode: sidechains already force it off " + "(subagent_retain.py). Set false to drop tool exhaust from an " + "agent's retains. Cascade: per-field merge (agent wins over " + "default).")
|
|
11937
11939
|
}).optional().describe("Auto-retain (Stop-hook consolidation) cadence knobs")
|
|
11938
11940
|
}).optional();
|
|
11939
11941
|
var HookEntrySchema = exports_external.object({
|
|
@@ -12321,6 +12323,7 @@ var profileFields = {
|
|
|
12321
12323
|
isolation: exports_external.enum(["default", "strict"]).optional(),
|
|
12322
12324
|
profile: exports_external.string().optional(),
|
|
12323
12325
|
directive_capture_nudge: exports_external.boolean().optional(),
|
|
12326
|
+
profile_capture_nudge: exports_external.boolean().optional(),
|
|
12324
12327
|
anti_confabulation_directive: AntiConfabulationDirectiveSchema,
|
|
12325
12328
|
observation_scopes: ObservationScopesSchema,
|
|
12326
12329
|
observation_scope_strategy: ObservationScopeStrategySchema,
|
|
@@ -12369,7 +12372,8 @@ var profileFields = {
|
|
|
12369
12372
|
}).optional(),
|
|
12370
12373
|
retain: exports_external.object({
|
|
12371
12374
|
every_n_turns: exports_external.number().int().min(1).optional(),
|
|
12372
|
-
overlap_turns: exports_external.number().int().min(0).optional()
|
|
12375
|
+
overlap_turns: exports_external.number().int().min(0).optional(),
|
|
12376
|
+
tool_calls: exports_external.boolean().optional()
|
|
12373
12377
|
}).optional(),
|
|
12374
12378
|
bank_mission: exports_external.string().optional(),
|
|
12375
12379
|
reflect_mission: exports_external.string().optional(),
|