@pulsehub/runner 0.1.10 → 0.1.11
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/package.json +1 -1
- package/src/process.js +9 -4
- package/test/process.test.js +6 -0
package/package.json
CHANGED
package/src/process.js
CHANGED
|
@@ -83,10 +83,15 @@ async function mcpConfig(dir, credential, endpoint) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function providerInvocation(kind, worktree, additionalDirs, config, mcp, prompt, mode = 'task') {
|
|
86
|
-
if (kind === 'codex')
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
if (kind === 'codex') {
|
|
87
|
+
const reviewArgs = mode === 'review'
|
|
88
|
+
? ['--skip-git-repo-check', '-c', 'mcp_servers.pulse.default_tools_approval_mode="approve"']
|
|
89
|
+
: [];
|
|
90
|
+
return {
|
|
91
|
+
executable: resolveExecutable('codex'),
|
|
92
|
+
args: ['exec', '--ephemeral', ...agentPermissionArgs(kind, mode), ...reviewArgs, '--cd', worktree, ...additionalDirs, '-c', `mcp_servers.pulse.url=${JSON.stringify(mcpEndpoint(config.endpoint))}`, '-c', 'mcp_servers.pulse.env_http_headers={Authorization="PULSE_RUNNER_MCP_CREDENTIAL"}', prompt],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
90
95
|
if (kind === 'claude') return {
|
|
91
96
|
executable: resolveExecutable('claude'),
|
|
92
97
|
args: ['--print', '--no-session-persistence', ...agentPermissionArgs(kind, mode), ...additionalDirs, '--strict-mcp-config', '--mcp-config', mcp, prompt],
|
package/test/process.test.js
CHANGED
|
@@ -11,9 +11,15 @@ test('Codex QA starts outside the snapshots without trusting the repository or w
|
|
|
11
11
|
const invocation = providerInvocation('codex', '/tmp/pulse-review', ['/tmp/snapshot'], { endpoint: 'https://example.cloudfunctions.net/pulseRunnerPoll' }, '/tmp/pulse-mcp.json', 'Review', 'review');
|
|
12
12
|
assert(invocation.args.includes('--skip-git-repo-check'));
|
|
13
13
|
assert.deepEqual(agentPermissionArgs('codex', 'review'), ['--sandbox', 'read-only']);
|
|
14
|
+
assert(invocation.args.includes('mcp_servers.pulse.default_tools_approval_mode="approve"'));
|
|
14
15
|
assert(!invocation.args.includes('--ask-for-approval'));
|
|
15
16
|
});
|
|
16
17
|
|
|
18
|
+
test('Codex development jobs do not auto-approve MCP tools', () => {
|
|
19
|
+
const invocation = providerInvocation('codex', '/tmp/pulse-task', [], { endpoint: 'https://example.cloudfunctions.net' }, '/tmp/pulse-mcp.json', 'Task', 'task');
|
|
20
|
+
assert(!invocation.args.some((arg) => arg.includes('default_tools_approval_mode')));
|
|
21
|
+
});
|
|
22
|
+
|
|
17
23
|
test('development jobs retain their configured write permissions', () => {
|
|
18
24
|
assert.deepEqual(agentPermissionArgs('codex', 'task'), ['--approve-for-me']);
|
|
19
25
|
assert.deepEqual(agentPermissionArgs('claude', 'task'), ['--permission-mode', 'bypassPermissions', '--dangerously-skip-permissions']);
|