@1presence/bridge 0.1.19 → 0.2.0
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/claude.js +13 -0
- package/package.json +1 -1
package/dist/claude.js
CHANGED
|
@@ -122,10 +122,23 @@ function spawnClaude(params) {
|
|
|
122
122
|
if (syncedFolders?.length)
|
|
123
123
|
ctxParts.push(`synced_folders: ${syncedFolders.join(', ')}`);
|
|
124
124
|
const promptText = ctxParts.length > 0 ? `[${ctxParts.join(' | ')}]\n\n${text}` : text;
|
|
125
|
+
// Lockdown rationale:
|
|
126
|
+
// - `--tools ""` disables ALL built-in tools (Bash/Read/Write/Edit/Glob/Grep/
|
|
127
|
+
// WebFetch/etc.). MCP tools are not "built-in" so the 1Presence MCP surface
|
|
128
|
+
// remains available.
|
|
129
|
+
// - `--setting-sources ""` prevents claude CLI from loading the user's
|
|
130
|
+
// ~/.claude/settings.json (and project/.local equivalents). Without this,
|
|
131
|
+
// permissive `permissions.allow` rules in the user's personal Claude Code
|
|
132
|
+
// config would silently re-enable Bash/Edit/Write etc. inside the bridge.
|
|
133
|
+
// - `--strict-mcp-config` keeps the MCP surface to exactly what we wire in
|
|
134
|
+
// via --mcp-config. Together these guarantee the bridge can only call
|
|
135
|
+
// `mcp__1presence__*` — no filesystem, no shell, no arbitrary network.
|
|
125
136
|
const args = [
|
|
126
137
|
'-p', promptText,
|
|
127
138
|
'--output-format', 'stream-json',
|
|
128
139
|
'--verbose',
|
|
140
|
+
'--tools', '',
|
|
141
|
+
'--setting-sources', '',
|
|
129
142
|
'--allowedTools', 'mcp__1presence__*',
|
|
130
143
|
'--system-prompt', systemPromptPath,
|
|
131
144
|
'--mcp-config', mcpConfigPath,
|