fix(B03): preauthorize full access and replace composer with active approval

This commit is contained in:
Codex committed 2026-10-21 14:44:11 +09:00
1 parent 0bc9faa129
commit adbbb3bd37
15 files changed
+627 -63

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { build } from 'esbuild'
await build({
entryPoints: ['scripts/b03-policy-regression.ts'], outfile: '.tmp/b03-policy-regression.mjs',
bundle: true, platform: 'node', format: 'esm', logLevel: 'warning',
banner: { js: `import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);` },
plugins: [{ name: 'b03-offline-stubs', setup(plugin) {
plugin.onResolve({ filter: /^(electron|@anthropic-ai\/claude-agent-sdk)$/ }, args => ({ path: args.path, namespace: 'b03-stub' }))
plugin.onLoad({ filter: /.*/, namespace: 'b03-stub' }, args => ({ loader: 'js', contents: args.path === 'electron'
? `export const app={getPath:()=>process.env.CLAUDE_TEST_USER_DATA,getAppPath:()=>process.cwd()};export const safeStorage={isEncryptionAvailable:()=>false};`
: `export const query = args => globalThis.__b03Query(args); export const createSdkMcpServer = x => x; export const tool = (...args) => args;` }))
} }]
})