Commit Graph
20 Commits
Author SHA1 Message Date
oc 7d20f6b817 Merge pull request 'feat: token-authenticated approval API + structured webhook payload' (!4) from feat/approve-api into main
Reviewed-on: #4
2026-08-21 10:12:10 -07:00
claude 90ff337f7c fix: satisfy clippy -D warnings so CI can pass
CI runs `cargo clippy -- -D warnings`, which already failed on main with
four errors predating this branch:

  duplicated attribute            src/models.rs, src/config.rs
  literal with an empty format    src/cli_main.rs (x2)

Both structs carried #[allow(dead_code)] twice; dropped the duplicate.
The println! calls moved the literal into the format string as clippy
suggested. No behaviour change -- output is byte-identical.

Kept separate from the feature commit so it can be dropped or landed on
its own.
2026-08-13 03:07:34 -07:00
claude bfb10b9ab2 feat: token-authenticated approval API + structured webhook payload
Adds POST /api/actions/:id/approve and /reject so a notifier (desktop
popup, chat bot, phone) can resolve an action without driving the web UI
or holding a login session.

Auth is the per-action approve_token already minted at submit time: a
UUIDv4 scoped to exactly one action and delivered only in the approval
notification. The agent API key is deliberately NOT accepted on these
routes -- the agent submits actions, so letting it approve them would
defeat the human-in-the-loop guarantee. The token may be supplied in the
JSON body or as ?token=, matching the existing approve link.

Both endpoints return 401 for an unknown id/token and 409 (with the
current status) if the action is no longer pending, so a notifier can
tell "someone else already handled this" from "this failed".

The notification webhook gains a structured "action" object alongside the
existing "text" field, which is unchanged so current consumers keep
working. Previously the id, command and approve URL were only available
by regexing the human-readable blob.

Also collapses three copies of the actions SELECT and its row mapping
onto ACTION_COLUMNS/row_to_action, and extracts the execute and
reject-chain logic into helpers now shared by the web and API handlers.
Those helpers no longer .unwrap() DB errors while holding the connection
mutex, which would poison it for the life of the process.
2026-08-13 03:03:19 -07:00
oc f6fb18318e Merge pull request 'feat: add /health endpoint for monitoring' (#3) from feat/health-endpoint into main
Reviewed-on: #3
2026-03-21 15:34:24 -07:00
pi-bot-01 a0a9a1024d feat: add /health endpoint for monitoring and reverse proxy checks
Returns {"ok":true,"status":"live"} with HTTP 200 when the service
is running and the database is accessible. Returns HTTP 503 if the
database check fails. No authentication required.
2026-03-21 14:04:22 -07:00
clawbot 8e3dcb735e ci: source cargo env and add rustfmt+clippy 2026-03-09 23:38:03 -07:00
clawbot 18b7a8f5de ci: replace setup-rust-toolchain action with direct rustup install 2026-03-09 20:50:35 -07:00
clawbot ab52ede69a style: apply cargo fmt to all source files 2026-03-09 20:42:18 -07:00
clawbot e539dff62f ci: explicitly install rustfmt and clippy via rustup component add 2026-03-09 20:41:46 -07:00
clawbot c94735ff70 ci: trigger build with rustfmt+clippy components installed 2026-03-09 20:10:53 -07:00
clawbot aa7fae8d28 ci: add rustfmt and clippy components to setup-rust-toolchain 2026-03-09 19:58:20 -07:00
clawbot 94a4398e66 fix: remove unused imports and add #[allow(dead_code)] to fix clippy -D warnings
Action Gateway CI/CD / Build & Test (push) Failing after 1m49s
Action Gateway CI/CD / Publish Release (push) Has been skipped
2026-03-09 19:55:02 -07:00
clawbot 216f0f0299 fix: add #[allow(dead_code)] to Config struct for gateway-cli binary
Action Gateway CI/CD / Build & Test (push) Failing after 1m31s
Action Gateway CI/CD / Publish Release (push) Has been skipped
2026-03-09 02:44:50 -07:00
clawbot 8621cb7be2 fix: add #[allow(dead_code)] to ActionResult in models.rs
Action Gateway CI/CD / Build & Test (push) Has been cancelled
Action Gateway CI/CD / Publish Release (push) Has been cancelled
2026-03-09 02:44:39 -07:00
clawbot 06ae7c0a66 fix: remove unused Response import in routes.rs
Action Gateway CI/CD / Build & Test (push) Has been cancelled
Action Gateway CI/CD / Publish Release (push) Has been cancelled
2026-03-09 02:44:30 -07:00
clawbot 4ccc7f8249 fix: remove unused Router and middleware imports in main.rs
Action Gateway CI/CD / Build & Test (push) Has been cancelled
Action Gateway CI/CD / Publish Release (push) Has been cancelled
2026-03-09 02:44:21 -07:00
clawbot 225a681eb1 fix: remove unused imports params and Path in db.rs
Action Gateway CI/CD / Publish Release (push) Has been cancelled
Action Gateway CI/CD / Build & Test (push) Has been cancelled
2026-03-09 02:44:11 -07:00
clawbot 071a862152 fix: workflow YAML — remove duplicate push key, use BOT_TOKEN secret
Action Gateway CI/CD / Build & Test (push) Failing after 1m53s
Action Gateway CI/CD / Publish Release (push) Has been skipped
2026-03-09 01:26:07 -07:00
clawbot b7bb24fb70 ci: add Gitea Actions workflow (.gitea/workflows/ci.yml)
Action Gateway CI/CD / Build & Test (push) Failing after 1s
Action Gateway CI/CD / Publish Release (push) Has been skipped
- Build + test on push/PR
- Release pipeline on release/* tags
- Failure issue creation via Gitea API
2026-03-09 00:10:56 -07:00
clawbot ffddbc2e5e feat: initial source commit release/2026-03-08 2026-03-08 23:33:41 -07:00