Skip to content

feat(sdk): move client library into monorepo#231

Merged
retr0h merged 9 commits intomainfrom
feat/sdk-monorepo-migration
Mar 8, 2026
Merged

feat(sdk): move client library into monorepo#231
retr0h merged 9 commits intomainfrom
feat/sdk-monorepo-migration

Conversation

@retr0h
Copy link
Collaborator

@retr0h retr0h commented Mar 8, 2026

Summary

  • Copy SDK client library from osapi-io/osapi-sdk into pkg/sdk/osapi/
    with codegen pointing directly at internal/api/gen/api.yaml (no gilt)
  • Update all 18 Go import paths from osapi-io/osapi-sdk/pkg/osapi to
    retr0h/osapi/pkg/sdk/osapi and remove external SDK dependency
  • Flatten 9 per-directory examples into examples/sdk/osapi/*.go with
    //go:build ignore tags and a single go.mod
  • Add Docusaurus SDK section with client overview, 7 per-service pages,
    example links, and SDK navbar dropdown
  • Replace features _category_.json with compact table landing page
  • Simplify README (drop features table, slim docs links, remove osapi-sdk
    from sister projects)
  • Update CLAUDE.md and system-architecture.md for in-repo SDK paths

Test plan

  • go build ./... passes
  • go test ./... -count=1 -timeout 120s — all 37 packages pass
  • just go::vet — 0 lint issues
  • go generate ./pkg/sdk/osapi/gen/... — codegen pipeline works
  • All 9 examples compile individually
  • bun run build — Docusaurus builds successfully
  • No remaining references to osapi-io/osapi-sdk in Go files or go.mod

🤖 Generated with Claude Code

retr0h and others added 9 commits March 7, 2026 11:59
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>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

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>
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>
@retr0h retr0h merged commit 4018775 into main Mar 8, 2026
7 checks passed
@retr0h retr0h deleted the feat/sdk-monorepo-migration branch March 8, 2026 01:33
@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            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              
Files with missing lines Coverage Δ
internal/audit/export/file.go 100.00% <ø> (ø)
internal/cli/ui.go 100.00% <ø> (ø)
pkg/sdk/osapi/agent.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/agent_types.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/audit.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/audit_types.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/errors.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/file.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/file_types.go 100.00% <100.00%> (ø)
pkg/sdk/osapi/health.go 100.00% <100.00%> (ø)
... and 9 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9a9135...7e24590. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant