Repository navigation
feat(api): agent effector admin - #625
Open
ccf-lisa[bot] wants to merge 1 commit into
Open
ccf-lisa[bot] wants to merge 1 commit into
ccf-lisa[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ccf-lisa
Bot
force-pushed
the
effectors/25-agent-effector-admin
branch
from
December 2, 2026 12:07
ab2577e to
13169d2
Compare
This was referenced Dec 2, 2026
GET/PUT /api/admin/agents/{id}/effector and POST .../effector/resync:
the base URL (https unless insecure webhooks are allowed; a change
resets verification), instances, actions, rules using the agent and
recent deliveries. Deleting an agent that rules use answers 409 with
those rules unless confirm=delete-rules, then deletes them and clears
their effects on other agents.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
effectors/25-agent-effector-admin
branch
from
December 2, 2026 14:45
13169d2 to
fddef8d
Compare
This was referenced Dec 2, 2026
This was referenced Dec 2, 2026
gusfcarvalho
approved these changes
Dec 2, 2026
gusfcarvalho
left a comment
Contributor
There was a problem hiding this comment.
ccf-review: APPROVE
no findings.
Stack (gh stack 604): #592 → #593 → #594 → #595 → #596 → #597 → #598 → #599 → #600 → #601 → #602 → #603 → #605 → #606 → #607 → #608 → #609 → #610 → #611 → #612 → #613 → #614 → #615 → #616 → #617 → #618 → #619 → #620 → #621 → #622 → #623 → #624 → #625 → #626 → #627 → #628 → #629 → #630
This was referenced Dec 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An agent's effector side for admins (user interface, turning an agent into an effector); reads need
agent:read, changesadmin:manage, user sessions only:GET /api/admin/agents/{id}/effector: base URL, webhook URL, status, verification, resync flag, instances (fresh/stale), actions (freshest instance), rule actions using the agent, the last 24h of deliveries and the delivery keys (effector.Service.View).PUT /api/admin/agents/{id}/effector:SetBaseURL(CheckBaseURL: normalized, https unlessCCF_EFFECTOR_ALLOW_INSECURE_WEBHOOKS); a new or changed URL resets the effector topending-verifyand enqueues verification; the same URL is a no-op.POST /api/admin/agents/{id}/effector/resync:RequestResync, answered on the next heartbeat (202).DELETE /api/admin/agents/{id}): while rules use it, 409 with those rules (errors.rules,RulesUsingAgent) unless?confirm=delete-rules; then, in one transaction, the rules are locked, the agent's effector side is dropped (DeleteAgentEffector: its own effects, actions, instances, base URL), its rules are deleted and their effects on other agents cleared as removed. A failed delete answers a generic 500 instead of the database error.Why
Plan: stack 3, PR 23 (agent effector admin); left for stack 3 by stack 2 (#613).
Test evidence
effector_admin_integration_test.go: view when not set, http rejected and allowed with insecure webhooks, a query string rejected, 404, normalization, pending-verify and verification enqueued, unchanged URL keeps ready, changed URL resets verification, resync, instances/actions/rules in the view; delete with rules (409 with the rules, confirm deletes the shared rule, drops the agent's effects and base URL, clears the other agent's effect as removed with its delivery, keeps an unrelated rule's effect, deactivates the agent; an unused agent deletes without confirmation); 401 without a session, 400/404.Gate on this branch:
go build ./...pass;go vet -tags integration ./...pass; golangci-lint v2.15.0 (shared CI config, incl.unconvert) 0 new issues;make testpass;make swagno diff (regenerateddocs/committed here);go mod tidyno diff;go test -tags integration -p 1on./internal/api/handler/...,./internal/service/effector/...pass.Size
Counted: 786 lines (added + removed, tests included;
docs/docs.goanddocs/swagger.*excluded).🤖 Generated with Claude Code