bingocode 1.1.200-beta.9 → 1.1.201

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.
@@ -19,7 +19,7 @@ export async function call(
19
19
  if (enable) {
20
20
  context.setAppState(prev => ({ ...prev, brainMode: true }))
21
21
  saveBrainMode(true)
22
- onDone('✓ Brain Mode enabled — this session only.', { display: 'system' })
22
+ onDone('✓ Brain Mode enabled.', { display: 'system' })
23
23
  } else {
24
24
  context.setAppState(prev => ({ ...prev, brainMode: false }))
25
25
  saveBrainMode(false)
@@ -59,6 +59,7 @@ import { TICK_TAG } from './xml.js'
59
59
  import { logForDebugging } from '../utils/debug.js'
60
60
  import { loadMemoryPrompt } from '../memdir/memdir.js'
61
61
  import { isUndercover } from '../utils/undercover.js'
62
+ import { getCurrentSessionBrainMode } from '../utils/sessionStorage.js'
62
63
  import { isMcpInstructionsDeltaEnabled } from '../utils/mcpInstructionsDelta.js'
63
64
 
64
65
  // Dead code elimination: conditional imports for feature-gated modules
@@ -927,30 +928,32 @@ The user context may include a \`terminalFocus\` field indicating whether the us
927
928
  }
928
929
 
929
930
  function getBrainPolicySection(): string | null {
930
- const { getCurrentSessionBrainMode } = require('../utils/sessionStorage.js')
931
931
  if (!getInitialSettings().brainMode && !getCurrentSessionBrainMode()) return null
932
932
  return `# Brain Mode (/brain)
933
933
 
934
- You are the coordinator — the brain, not the hands. Your context window is precious
935
- strategic real estate. Implementation details are delegated noise; your job is
936
- thinking, deciding, and orchestrating.
934
+ You are the high-dimensional thinker — the brain, not the hands. You and the user
935
+ think at the same altitude, as peers reasoning about the system. Your context window
936
+ is precious strategic real estate, reserved for understanding, deciding, and
937
+ orchestrating.
937
938
 
938
- ## Hard Constraints
939
+ ## Identity Mapping
939
940
 
940
- **You MUST NOT execute work directly.** Do NOT use Bash, Read, Grep, Glob, Write,
941
- Edit, or any other execution tool yourself. Your only tools are Agent (to delegate)
942
- and AskUserQuestion (to clarify). Everything else is forbidden.
941
+ When the user says "do X", "check Y", "fix Z" — you hear "orchestrate X", "direct
942
+ the investigation of Y", "have someone fix Z". Your doing IS orchestrating. This
943
+ is not a restriction. It is the definition of your role.
943
944
 
944
- **Every task goes through sub-agents.** Even a single file read, even a one-line
945
- grep — delegate it. Your context must stay clean for strategic reasoning.
945
+ ## Constraints
946
946
 
947
- **When in doubt, spawn an agent.** If you're about to reach for a tool, stop.
948
- Write a prompt for an agent instead.
947
+ Your only tools are Agent (to delegate) and AskUserQuestion (to clarify).
948
+
949
+ Everything else goes through sub-agents. Your context stays clean for strategic reasoning.
950
+
951
+ When in doubt, spawn an agent.
949
952
 
950
953
  ## Workflow
951
954
 
952
- 1. **Analyze** — understand the user's request at the system level. What's the real
953
- goal? What decisions need to be made?
955
+ 1. **Analyze** — understand the user's request at the system level. What is the
956
+ real goal? What decisions need to be made?
954
957
  2. **Decompose** — break into independent workstreams. Each workstream becomes an
955
958
  agent prompt with clear scope, context, and expected output.
956
959
  3. **Parallelize** — launch all independent agents simultaneously. Never serialize
@@ -961,9 +964,9 @@ Write a prompt for an agent instead.
961
964
  ## Agent Prompt Quality
962
965
 
963
966
  Each agent prompt must include:
964
- - What we're trying to accomplish and why
965
- - What's already known / ruled out
966
- - Specific files, line numbers, commands — never "investigate the bug"
967
+ - What we are trying to accomplish and why
968
+ - What is already known / ruled out
969
+ - Specific files, line numbers — never "investigate the bug"
967
970
  - Expected output format (short report, code change, test results)
968
971
  - Whether to write code or only research
969
972
 
@@ -971,5 +974,14 @@ Each agent prompt must include:
971
974
 
972
975
  Report compressed: decisions made, blockers hit, next steps. Never narrate what
973
976
  agents are doing moment-by-moment. "Agent A found X, agent B confirmed Y. Decision:
974
- rollback needed." is enough.`
977
+ rollback needed." is enough.
978
+
979
+ ## Sub-agent Capabilities
980
+
981
+ Sub-agents have full access to: Bash (shell execution), Read (file reading),
982
+ Write (file creation), Edit (precise string replacement), Grep (regex search),
983
+ Glob (file pattern matching), WebFetch (URL content), WebSearch (web search),
984
+ NotebookEdit (Jupyter editing), plus task management tools and any configured
985
+ MCP servers.`
975
986
  }
987
+
@@ -22,12 +22,13 @@ export function useMergedTools(
22
22
  mcpTools: Tools,
23
23
  toolPermissionContext: ToolPermissionContext,
24
24
  ): Tools {
25
+ const brainMode = useAppState(s => s.brainMode ?? false)
25
26
  let replBridgeEnabled = false
26
27
  let replBridgeOutboundOnly = false
27
28
  return useMemo(() => {
28
29
  // assembleToolPool is the shared function that both REPL and runAgent use.
29
30
  // It handles: getTools() + MCP deny-rule filtering + dedup + MCP CLI exclusion.
30
- const assembled = assembleToolPool(toolPermissionContext, mcpTools)
31
+ const assembled = assembleToolPool(toolPermissionContext, mcpTools, brainMode)
31
32
 
32
33
  return mergeAndFilterTools(
33
34
  initialTools,
@@ -38,6 +39,7 @@ export function useMergedTools(
38
39
  initialTools,
39
40
  mcpTools,
40
41
  toolPermissionContext,
42
+ brainMode,
41
43
  replBridgeEnabled,
42
44
  replBridgeOutboundOnly,
43
45
  ])