feat(wiki): add direct REST wiki support #379
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp!379
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/wiki-support-direct-rest"
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?
Closes #32.
Summary
list,get,revisions,create,update,delete)forgejo://repo/{owner}/{repo}/wiki/{pageName}with JSON metadata and a bounded Markdown sidecar%2Fin resource URIs)content_base64or author email addressestitle; document duplicate-create overwrite and last-writer-wins behaviorPagination finding
Live verification falsified the initially proposed
limit+1strategy: because Forgejo computes the offset from the requested page size, page 2 skipped an item after page 1 had been fetched withlimit+1.The implementation therefore fetches the current page with exactly the caller's
limit. When that page is full, it probespage+1with the same limit to computehas_next. This preserves stable page boundaries for pages and revisions.Output-bounding checklist
list_wiki_pages: entity list bounded by caller-controlledpage/limitget_wiki_revisions: entity list bounded by caller-controlledpage/limithas_nextand echopagefor continuationget_wiki_page: text bounded by caller-controlledstart_line/end_line; always returnstotal_linesresource.Boundedwith a sentinel namingget_wiki_revisionsget_wiki_pagetoolVerification
Live-tested against Forgejo
15.0.4+gitea-1.22.0; the complete MCP demo was replayed against16.0.0+gitea-1.22.0.resources/readround tripsIf-Matchare ignored by the tested server, so updates are documented as last-writer-winsQuality gates:
make buildgo vet ./...go mod tidydrift checksgo test -race -shuffle=on -count=1 ./...golangci-lint v2.12.2: 0 findingsgovulncheckwith Go 1.26.5: 0 reachable vulnerabilitiesopenspec validate --all --strict: 21 passed, 0 failedFollow-ups
Two non-blocking hardening ideas remain documented for separate work: distinguish a disabled wiki from a missing page, and add an API-drift guard for unexpectedly empty decoded content.
op1st Pipelines as Code is skipping this commit.
User woozar is not allowed to trigger CI via pull_request in this repo.
op1st Pipelines as Code is skipping this commit.
User woozar is not allowed to trigger CI via pull_request in this repo.
/ok-to-test
op1st Pipelines as Code/forgejo-mcp-code-scans-5g9b4 is running.
Starting Pipelinerun forgejo-mcp-code-scans-5g9b4 in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-code-scans-5g9b4 -fop1st Pipelines as Code/forgejo-mcp-on-pull-request-qk96c is running.
Starting Pipelinerun forgejo-mcp-on-pull-request-qk96c in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-on-pull-request-qk96c -fop1st Pipelines as Code/forgejo-mcp-openspec-validate-pr- has failed.
There was an error creating the PipelineRun: forgejo-mcp-openspec-validate-pr-
cannot use the API on the provider platform to create a in_progress status:
op1st Pipelines as Code/forgejo-mcp-code-scans-5g9b4 has successfully validated your commit.
Task Statuses:
fetch-source
gitleaks-version
gitleaks
op1st Pipelines as Code/forgejo-mcp-on-pull-request-qk96c has successfully validated your commit.
Task Statuses:
fetch-source
build-and-test
commit-title-check
/retest forgejo-mcp-openspec-validate-pr
op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-6nswn is running.
Starting Pipelinerun forgejo-mcp-openspec-validate-pr-6nswn in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-openspec-validate-pr-6nswn -fop1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-6nswn has successfully validated your commit.
Task Statuses:
fetch-source
validate
op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-m9d9x is running.
Starting Pipelinerun forgejo-mcp-openspec-validate-pr-m9d9x in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-openspec-validate-pr-m9d9x -fop1st Pipelines as Code/forgejo-mcp-on-pull-request-5wwhw is running.
Starting Pipelinerun forgejo-mcp-on-pull-request-5wwhw in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-on-pull-request-5wwhw -fop1st Pipelines as Code/forgejo-mcp-code-scans-94gsz is running.
Starting Pipelinerun forgejo-mcp-code-scans-94gsz in namespace op1st-pipelines
You can monitor the execution using the op1st Pipelines as Code PipelineRun viewer or through the command line by
using the tkn CLI with the following command:
tkn pr logs -n op1st-pipelines forgejo-mcp-code-scans-94gsz -fop1st Pipelines as Code/forgejo-mcp-code-scans-94gsz has successfully validated your commit.
Task Statuses:
fetch-source
gitleaks-version
gitleaks
op1st Pipelines as Code/forgejo-mcp-openspec-validate-pr-m9d9x has successfully validated your commit.
Task Statuses:
fetch-source
validate
op1st Pipelines as Code/forgejo-mcp-on-pull-request-5wwhw has failed.
Task Statuses:
fetch-source
commit-title-check
build-and-test
Failure snippet:
task commit-title-check has the status "Failed":