Skip to content

feat(server): add label CRUD http endpoints - #23

Open
jahuang24 wants to merge 4 commits into
ccao2/label-searchfrom
jarretth/label-http-api
Open

jahuang24 wants to merge 4 commits into
ccao2/label-searchfrom
jarretth/label-http-api

Conversation

@jahuang24

Copy link
Copy Markdown

Issue for this PR

Closes #17

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Built on top of #20, this PR creates 5 API endpoints to reach the Label Service: GET /api/label (list), GET /api/label/:labelID (get), POST /api/label (create), PATCH /api/label/:labelID (rename or move) and DELETE /api/label/:labelID (remove). Appropriate label logic is implemented, such as deleting a parent label deletes all nested labels. The endpoints are defined in packages/protocol and handled in packages/server. Valid HTTP responses are returned for different requests.

How did you verify your code works?

Started a temporary server at a throaway database (OPENCODE_DB=/tmp/labels-demo.db bun dev serve --port 4096) and tested curl commands against it, verifying correct http responses for different requests.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

jahuang24 and others added 2 commits September 27, 2026 17:51
Expose the Label service over /api/label (list, get, create, update,
remove). Label schemas move to @opencode-ai/schema so Protocol can
reference them without depending on Core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jahuang24 jahuang24 changed the title Jarretth/label http api feat(server): add label CRUD http endpoints Sep 27, 2026
@tsuarez16 tsuarez16 mentioned this pull request Sep 27, 2026
3 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant