feat(server): let idea mode file and refine Forgejo issues #244
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!244
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-243-idea-mode-forgejo-issues"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Idea (brainstorm) mode can now end in a filed issue.
Three Forgejo write tools stay registered in idea mode —
forgejo_create_issue,forgejo_create_issue_comment,forgejo_update_issue_description— and every other Forgejo write tool is still removed from the tool set.Enforcement does not rely on the tool set (that is only a visibility measure). The new
apps/server/src/bridge/idea-mode-policy.tsre-decides the wholeFORGEJO_MUTATING_TOOLSset per call insidePermissionFilter:forgejo_create_issue— unrestricted (no target, no authorship question).forgejo_create_issue_comment— issue numbers only; a pull-request number is denied.forgejo_update_issue_description— issue numbers only, and only for issues opened by the agent's own Forgejo account.The branch sits after the deny-rule check and before the allow-rule lookup, so an allow rule still silences the approval prompt for a permitted tool but cannot widen what idea mode permits, and a deny rule still wins.
IDEA_MODE_SYSTEM_PROMPTis unchanged: the agent discovers the tools from the tool list and the deny messages carry the rules. The filesystem stays read-only.DispatchApi.readIssuenow reports the issue'sauthor(user.login), which the authorship check needs; it is empty when the instance reports none, which denies safely.Verification
idea-mode-policy.test.ts(10 tests) covers every verdict incl. PR targets, foreign/empty author, 404/503 reads, missing repo or username, and non-numeric targets.idea-mode-bridge.test.tspins the resulting tool set via the extractedideaModeToolNameshelper (used by bothenter()andrestore()).describe("idea mode")inpermission-filter.test.tsproves prompt-on-create, allow-rule-silences-prompt, allow-rule-does-not-widen (denied unprompted), deny-rule-wins, non-permitted tool denied, and unchanged behaviour outside idea mode.bun testinapps/server: 1274 pass, 0 fail.bun run typecheckgreen at the repo root.Closes: #243