feat: sidecar binary support (#170)#186
Conversation
Adds .joggr/ to .gitignore so gg-task planning files (spec.md, plan.md, codebase docs) stay local and out of version control. Refs #170 Co-Authored-By: Claude <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Merging this PR will not alter performance
Comparing Footnotes
|
Add SidecarConfig types and Zod schema for declaring binary sidecars (GitHub release source, platform mappings, checksums), plus retry (fp) and platform (node) utilities used to fetch and install them. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Draft PR tracking issue #170 — sidecar binary support for kidd-powered CLIs.
This PR currently contains only a
.gitignoreupdate. Implementation will land in subsequent commits following the plan tracked locally in.joggr/.gg/tasks/sidecar-binary-support/.Approach
Clean-slate redesign with config-as-code (selected over the agent-recommended Hybrid). Key design points:
sidecarsschema in@kidd-cli/config; type-inference flows into runtimeplatforms/{os-arch}/(nodist/vendors/indirection)kidd-sidecars.jsonmanifest emitted alongside platform binaries —sidecar()runtime and lazy-download share one typed source of truthsidecar()(Shape B):{ exec(name, args), path(name) }— bare-verb export matchingcommand(),cli(),middleware()node:child_process); TS-native extraction (tar+extract-zip); noexeca, no bash scripts@cli-{platform}optional-dep packages generated for non-compiled distributionlazy: truedefers download to first runtime use, with retry-with-backoffxattr -cr+ ad-hoc codesign on darwin-* outputs (graceful skip when host is non-darwin)Plan
5 phases, 19 tasks:
sidecar()factory, lazy runtime, core export wiring@cli-{platform}staging, wire intokidd buildexamples/sidecar-demo, integration test, concept/guide/reference docsAcceptance criteria (from #170)
sidecarsconfig validates via Zod; existing configs unchanged@kidd-cli/utilswith explicit return types + tests.tar.gz/.zipvia TS-native libs (no bash); writes toplatforms/{os-arch}/executableFileson platform packages@cli-{platform}npm optional-dep packages generatedsidecar()exported from@kidd-cli/core;exec()returns{ stdout, stderr, exitCode }via stdlibexamples/sidecar-demoend-to-end workingbun build --compilesucceeds for all 7 targets with sidecarsdocs/concepts/sidecars.md+docs/guides/add-a-sidecar.md+docs/reference/sidecar.mdpnpm checkandpnpm testgreen;isolatedDeclarationspassesTest plan
pnpm test)pnpm check)rgv14.1.1 and verifies end-to-end on host platformexamples/sidecar-demobuilds and runs locallyCloses #170