feat(sdk): move client library into monorepo#231
Merged
Conversation
Plan for moving osapi-sdk into pkg/sdk/ with two incremental PRs, flattened examples, Docusaurus SDK sidebar, and direct spec sharing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Copy the SDK client package from the external osapi-sdk repo into pkg/sdk/osapi/ as the first step of the monorepo migration. The generate directive reads the combined OpenAPI spec directly from internal/api/gen/api.yaml, eliminating the gilt overlay. Fix .gitignore to use /osapi (root-only) instead of osapi which was inadvertently ignoring any directory named osapi. Co-Authored-By: Claude <noreply@anthropic.com>
Replace all imports of github.com/osapi-io/osapi-sdk/pkg/osapi with github.com/retr0h/osapi/pkg/sdk/osapi, pointing consumers at the in-repo SDK client library. Remove the external osapi-sdk dependency from go.mod and go.sum. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add 9 SDK client examples (health, node, agent, audit, command, file, job, metrics, network) as standalone files in examples/sdk/osapi/ with their own go.mod. Each file uses //go:build ignore to allow individual execution via go run <file>.go without conflicting main() functions. Co-Authored-By: Claude <noreply@anthropic.com>
Add SDK section to docs site with landing page, client overview, and per-service reference pages (Agent, Audit, File, Health, Job, Metrics, Node). Update docusaurus.config.ts to add SDK navbar entry, point OpenAPI spec at internal api.yaml, and remove external SDK downloadUrl. Replace features _category_.json with a compact features.md table page. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Remove Features section from README (now in Docusaurus), simplify Documentation links, remove osapi-sdk from sister projects, and update system-architecture.md SDK references to pkg/sdk/osapi. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Prettier reformatted SDK client pages and plan docs. Docusaurus regenerated API docs from new specPath (internal/api/gen/api.yaml instead of external SDK). Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Thank you for contributing to this project! 😊🕹️ |
retr0h
added a commit
to osapi-io/osapi-sdk
that referenced
this pull request
Mar 8, 2026
SDK has been moved into osapi (osapi-io/osapi#231). Replace README with deprecation notice and archive the repo for now. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 task
retr0h
added a commit
to osapi-io/osapi-sdk
that referenced
this pull request
Mar 8, 2026
SDK has been moved into osapi (osapi-io/osapi#231). Replace README with deprecation notice and archive the repo for now. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #231 +/- ##
==========================================
+ Coverage 99.92% 99.93% +0.01%
==========================================
Files 183 200 +17
Lines 6523 7771 +1248
==========================================
+ Hits 6518 7766 +1248
Misses 3 3
Partials 2 2
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Summary
osapi-io/osapi-sdkintopkg/sdk/osapi/with codegen pointing directly at
internal/api/gen/api.yaml(no gilt)osapi-io/osapi-sdk/pkg/osapitoretr0h/osapi/pkg/sdk/osapiand remove external SDK dependencyexamples/sdk/osapi/*.gowith//go:build ignoretags and a singlego.modexample links, and SDK navbar dropdown
_category_.jsonwith compact table landing pagefrom sister projects)
Test plan
go build ./...passesgo test ./... -count=1 -timeout 120s— all 37 packages passjust go::vet— 0 lint issuesgo generate ./pkg/sdk/osapi/gen/...— codegen pipeline worksbun run build— Docusaurus builds successfullyosapi-io/osapi-sdkin Go files or go.mod🤖 Generated with Claude Code