feat(runtime): default to passthrough and persist execution permissions

This commit is contained in:
Agent Workbench Dev
2026-11-06 04:58:57 +08:00
parent 67c034f4b6
commit 2fa220735d
113 changed files with 1866 additions and 631 deletions
+4 -2
View File
@@ -102,10 +102,12 @@ try {
assert.equal(current.approvals[0].command, 'node --version');
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
await api('/sessions/' + session.id + '/approvals/' + current.approvals[0].id, { allow: true });
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'needs_review'; });
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'completed'; });
const command = current.events.find(event => event.tool === 'run_command');
assert.equal(command.phase, 'completed'); assert.match(command.output, new RegExp(manifest.nodeVersion.replaceAll('.', '\\.')));
for (const proposal of current.changes.filter(change => change.status === 'pending')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/reject', {});
assert.equal(current.changes.filter(change => change.status === 'pending').length, 0);
for (const proposal of current.changes.filter(change => change.status === 'applied')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/rollback', {});
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
const planned = await api('/sessions/' + session.id + '/check-plans', { names: ['test'] });
const plan = planned.execution.plans.at(-1); assert.ok(plan.checks.some(check => check.name === 'test'));
const accepted = await api('/sessions/' + session.id + '/check-jobs', { planId: plan.id }); const jobId = accepted.execution.checks.at(-1).id;