fix(B03): preauthorize full access and replace composer with active approval
This commit is contained in:
1 parent
0bc9faa129
commit
adbbb3bd37
15 files changed
+627
-63
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { build } from 'esbuild'
|
||||
await build({
|
||||
entryPoints: ['src/main/agent/claude/claude-kernel.ts'], outfile: '.tmp/b03-real-kernel.mjs',
|
||||
bundle: true, platform: 'node', format: 'esm', external: ['@anthropic-ai/claude-agent-sdk'],
|
||||
logLevel: 'warning',
|
||||
banner: { js: `import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);` },
|
||||
plugins: [{ name: 'isolated-electron-paths-only', setup(plugin) {
|
||||
plugin.onResolve({ filter: /^electron$/ }, () => ({ path: 'electron', namespace: 'b03-test' }))
|
||||
plugin.onLoad({ filter: /.*/, namespace: 'b03-test' }, () => ({ loader: 'js', contents: `
|
||||
export const app = { getPath: name => { if (name !== 'userData') throw new Error('Unexpected Electron path request'); return process.env.CLAUDE_TEST_USER_DATA }, getAppPath: () => process.cwd() };
|
||||
export const safeStorage = { isEncryptionAvailable: () => false };
|
||||
` }))
|
||||
} }]
|
||||
})
|
||||
Reference in new issue
Block a user