Exec: add deterministic gh/git guardrails#42
Conversation
|
Starting review — Tim |
|
Architecture pass complete. Guardrail direction is good; please verify edge-case command parsing behavior stays deterministic under shell quoting variations. — Tim |
8 seed alerts, 7 alert rules, master/detail, acknowledge/resolve actions Tabs: Alerts + Rules. Severity/status filters. Rule toggle switches. Sprint total: 42 views
2423cce to
45c7c0f
Compare
|
45c7c0f to
5631613
Compare
Motivation
git/ghactions from agents (push to protected branches, opening PRs against upstream) by enforcing deterministic, local guardrails before commands reach the host.Description
validateGhCommandGuardinsrc/agents/bash-tools.gh-guard.tsthat parses shell segments and enforces rules forgit pushandgh pr create(protected branches, required--repo/-R, allowed PR target repos).execpreflight by invoking it fromcreateExecToolinsrc/agents/bash-tools.exec.tsso checks run before host dispatch for sandbox/gateway/node hosts.tools.exec.ghGuardand thread it through runtime and tool construction by updatingsrc/config/types.tools.ts,src/config/zod-schema.agent-runtime.ts, andsrc/agents/pi-tools.tsso settings can be global or per-agent.ghGuardintocreateExecToolinsrc/auto-reply/reply/bash-command.tsand add unit tests validating behavior directly and via the exec tool insrc/agents/bash-tools.gh-guard.test.tsandsrc/agents/bash-tools.exec.script-preflight.test.ts.docs/tools/exec.mdand config/label/help mappings to document how to enable and configuretools.exec.ghGuard.Testing
pnpm vitest src/agents/bash-tools.gh-guard.test.ts src/agents/bash-tools.exec.script-preflight.test.ts; all tests passed (8/8).pnpm exec oxfmt --write ...and formatting completed successfully.pnpm tsgo(note: this failed due to an unrelated, pre-existing type error insrc/discord/send.components.test.ts, not introduced by these changes).Codex Task