fix(kugetsu): add kugetsu post-comment helper for PM agent #86

Closed
shoko wants to merge 1 commits from fix/issue-45-post-comment-helper into main
Owner

Summary

Fix for #45 - PM agent cannot write to /tmp for comment posting.

Problem

PM agent tried to use write_file to create temp files in /tmp, but opencode blocks /tmp/* access in headless mode.

Solution

Add kugetsu post-comment command that posts Gitea comments directly without needing temp files.

Usage

kugetsu post-comment <repo-url> <issue-or-pr-number> <body>

# Example
kugetsu post-comment https://git.fbrns.co/shoko/kugetsu 81 "Comment text"

The command:

  • Reads GITEA_TOKEN from environment or pm-agent.env
  • Constructs the API URL from repo URL
  • Posts comment directly without temp files

Benefits

  • No temp file writes needed
  • Works within opencode permission restrictions
  • Uses existing GITEA_TOKEN config

Fixes #45

## Summary Fix for #45 - PM agent cannot write to /tmp for comment posting. ## Problem PM agent tried to use `write_file` to create temp files in /tmp, but opencode blocks `/tmp/*` access in headless mode. ## Solution Add `kugetsu post-comment` command that posts Gitea comments directly without needing temp files. ## Usage ```bash kugetsu post-comment <repo-url> <issue-or-pr-number> <body> # Example kugetsu post-comment https://git.fbrns.co/shoko/kugetsu 81 "Comment text" ``` The command: - Reads GITEA_TOKEN from environment or pm-agent.env - Constructs the API URL from repo URL - Posts comment directly without temp files ## Benefits - No temp file writes needed - Works within opencode permission restrictions - Uses existing GITEA_TOKEN config Fixes #45
shoko added 1 commit 2026-04-02 01:17:00 +02:00
Add 'kugetsu post-comment' command for posting Gitea comments without
needing to write temp files. This solves the /tmp permission issue
where PM agent was blocked from writing to /tmp.

Usage:
  kugetsu post-comment <repo-url> <issue-or-pr-number> <body>

Example:
  kugetsu post-comment https://git.fbrns.co/shoko/kugetsu 81 "Comment text"

The command:
- Reads GITEA_TOKEN from environment or pm-agent.env
- Constructs the API URL from repo URL
- Posts comment directly without temp files

Fixes #45
shoko closed this pull request 2026-04-02 02:57:40 +02:00

Pull request closed

Sign in to join this conversation.