Repository navigation
add Nim SDK - #29
add Nim SDK#29jasagiri wants to merge 1 commit into
Conversation
|
Hey @jasagiri, thanks for the contribution. |
|
Hey @jasagiri, would you be up for maintaining this if it's merged? |
|
I've never collaborated with VSC before, so I'm still feeling my way around, but I can do it. |
tylerslaton
left a comment
There was a problem hiding this comment.
Hi @jasagiri! This looks great. Left a small comment about the documentation. Outside of that, a few asks.
- Since this is older, can you look through the existing protocol spec and make sure this is fully compatible?
- Can you run the tests in CI? We'd happily accept a contribution for that.
- How would we go about packaging this for Nim's consumption?
There was a problem hiding this comment.
Can we please add documentation to the docs folder and get rid of this? We don't necessarily want to keep these files.
There was a problem hiding this comment.
Can you please remove this? Also in the root would you mind adding a gitignore for this?
There was a problem hiding this comment.
Same thing here, can we remove this?
There was a problem hiding this comment.
Lets make sure to remove all of these please!
There was a problem hiding this comment.
Looks like these AI generated files also go in. Can we remove them? CLAUDE.md is good to keep but let's remove the progress ones.
|
Hello @jasagiri, it's unclear to us where you stand on this incomplete work. Are you interested in taking it over the finish line? Especially with Agents now, maybe it's easier for you? Or is it superseded by something else? Please let us know in the next 2 weeks, otherwise we will close this as stale. Thanks for the time & effort this far! 🙏 |
|
Someone is attempting to deploy a commit to the CopilotKit Team on Vercel. A member of the Team first needs to authorize it. |
|
I sincerely apologize for the delay in responding to the feedback. I am aware that I sometimes have difficulties with communication, so I would greatly appreciate your patience and understanding as we work through this. I have addressed the requested changes and synchronized the Nim SDK with the latest protocol specification:
Thank you for your review and support. |
|
@jasagiri Thank you so much for coming back to this and for the continued effort — we really appreciate you taking the time to work on a Nim SDK for the project. 🙏 I took a close look at the current state of the PR and wanted to share some notes to help get this across the finish line. You've clearly put a lot of work in, and the core is solid — the event type enum covers all 34 protocol event types correctly, the test suite is substantive (not just stubs), and the overall architecture looks well thought out. There are a few things that would need to be addressed before we can merge: Build artifactsIt looks like AI-generated working filesA few files that look like internal working notes are still present in the tree:
I believe these were part of Tyler's earlier feedback as well. No worries if they slipped through — easy to miss when there are a lot of files. Protocol completenessThe event types themselves are all accounted for, which is great. I did notice a few gaps in the event struct fields and message types when comparing against the current Python SDK: Missing optional fields:
Missing message types:
Since these are all optional fields, the SDK would still function for basic use cases without them — but it would be wonderful to have them included for full protocol coverage. If adding them all at once is too much, it might be worth adding the fields with a TODO comment so future contributors know what's left. CI workflowThe workflow looks good structurally! Two small suggestions:
Test suiteThe tests themselves are well-written and cover real behavior. I did notice that Again, thank you for your dedication to this contribution — a Nim SDK would be a fantastic addition to the ecosystem. Please don't hesitate to reach out if any of the above is unclear or if there's anything we can help with. We're happy to work through any of these items together. |
|
One more small note on the build artifacts — since those binaries (~15 MB) are already in the commit history, simply deleting them in a new commit would still leave them in the git objects. To keep the repo history clean, it would be best to do an interactive rebase or squash so that the If you're not sure how to approach that, here's one way: # From your branch, interactive rebase against main
git rebase -i main
# In the editor, mark the commits for 'edit' or squash them together,
# then remove the sdks/build/ directory before re-committing:
git rm -r sdks/build/
git commit --amend
git rebase --continueAlternatively, squashing everything into a single clean commit works great too — whatever feels most comfortable for you. Happy to help walk through it if needed! |
PR #29 (Nim SDK) accidentally committed ~15 MB of compiled binaries and .dSYM debug symbols. This adds three layers of defense: - .gitignore: block common binary extensions and build directories - CI workflow: check all PRs for binary files, build dirs, and files >500KB - lefthook pre-push: catch binary artifacts before push (opt-in)
|
Thank you for the review. I have addressed all the feedback and updated the Nim SDK to version 2.2.8. Changes:
Verified that all tests pass successfully in the Nim 2.2.8 environment. Thank you for your patience! |
Add a Nim SDK under sdks/community/nim, built against spec/1.0/schema.json: - Types and a JSON codec for every schema definition: the 31 events (THINKING_* removed), the seven message roles, content parts and sources, RunAgentInput, run and subagent outcomes, interrupts, resume entries, token usage, AgentCapabilities and JSON Patch operations. - Strict decoding (the schema exactly) and receiver decoding (unknown fields stripped and the deprecated whole-field nulls of DEPRECATIONS.md read as absent, with warnings). Errors name the schema keyword and the JSON Pointer. Encoding omits absent fields. - RFC 6902 JSON Patch application and a reducer that folds events into messages and state, following the TypeScript client. - SSE framing, an incremental SSE parser and an HTTP agent. The tests run every document in spec/1.0/fixtures and the shared sdks/fixtures cases, RFC 6902 Appendix A, and the HTTP agent against a local server. `nimble test` runs every test file and fails on a compiler warning. The unit-nim-sdk workflow installs the pinned Nim 2.2.12 release tarball, verified by SHA-256, and runs the suite when the SDK, the 1.0 schema or the shared fixtures change. Not implemented, as the README states: the protobuf transport, chunk event expansion, event-sequence verification, parts of the TypeScript reducer and the spec/1.0/conformance lanes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@jpr5 @tylerslaton — I am sorry for the long silence. After your notes in March I went quiet for more than seven months, well past the two weeks you asked for, and thank you for leaving the PR open. I also owe you a correction: my March reply said the binaries had been cleared from the history, but they had only been deleted in a later commit and were still in the branch. That is fixed now. I would like to take it over the finish line, and I have reworked the PR rather than patching it further: Layout. The SDK now lives in History. The branch is now a single commit on top of current Protocol 1.0. The types and the JSON codec were rewritten against
Tests in CI. Packaging. It is a Nimble package ( (or Out of scope, stated in the README: the protobuf transport, expansion of chunk events, event-sequence verification ( On the documentation comment: the SDK's documentation is its README for now. If you would like reference pages under And yes, I am happy to maintain it. |
add Nim SDK