-
Notifications
You must be signed in to change notification settings - Fork 0
[Phase 1] Define Link and LinkStore interfaces/traits (API Contract) #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #7
This commit implements the core interfaces and traits for the Link data model and LinkStore operations as defined in issue #7. TypeScript (js/src/): - types.ts: Full interface definitions with JSDoc documentation - index.d.ts: Type declarations for Link, LinkRef, LinkStore, LinkPattern - index.js: Runtime implementations (createLink, matchesPattern, etc.) Rust (rust/src/): - traits.rs: LinkType, Link, LinkRef, LinkPattern, LinkStore traits - lib.rs: Public re-exports of all traits Key features: - Generic ID types (number/bigint/string in TS, generic T: LinkType in Rust) - Nested/recursive link structures (LinkRef can be ID or Link) - Universal links with optional values array (beyond source/target) - Pattern matching with Any wildcard support - Full API parity between JavaScript and Rust Compatible with: - links-notation (supports recursive structures via values) - doublets-rs (source/target model with generic IDs) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Resolve conflicts, double check everything works fine against our ROADMAP, and make sure tests passing. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-11T04:10:55.665Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Merges main branch changes including: - Project renamed from links-mq to links-queue - Added ROADMAP.md, REQUIREMENTS.md, ARCHITECTURE.md, VISION.md - Updated package naming throughout codebase Fixes for new code: - Updated imports from links_mq to links_queue - Fixed deprecation warnings in main.rs with #[allow(deprecated)] - Added clippy allows in example for pedagogical code - Fixed doc string formatting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test code uses explicit clones for pedagogical clarity. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…on warnings - Update changeset to use 'links-queue-js' instead of 'links-mq-js' - Add #![allow(deprecated)] to main.rs for backward compatibility demo - Add #[allow(deprecated)] to integration test modules for backward compat tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix import ordering and code formatting to pass CI format check. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-13T21:10:10.936Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
🤖 Work Session CompleteVerification SummaryAll checks passing:
PR Review Against Issue #7 RequirementsThe PR implements all requirements from Issue #7: JavaScript:
Rust:
NotesThis PR establishes the API contract (interfaces/traits) as specified in Issue #7. The in-memory implementations are listed separately in the ROADMAP and will be addressed in follow-up work. PR is now marked as ready for review. |
|
Summary
Implements the core Link and LinkStore interfaces/traits as the API contract for both JavaScript and Rust implementations. This is the foundation for all subsequent implementations as specified in #7.
Key Features
id,source,target, and optionalvaluesarrayAnywildcard for flexible matchingnumber | bigint | stringT: LinkType(supports u8, u16, u32, u64, usize, i8-i64)Design Goals
valuesarrayvaluesarrayFiles Changed
JavaScript (js/src/):
types.ts- Full TypeScript interface definitions with comprehensive JSDocindex.d.ts- Type declarations for public APIindex.js- Runtime implementations (createLink,matchesPattern, utility functions)examples/basic-usage.js- Updated examples demonstrating new APItests/index.test.js- 36 tests covering all new functionalityRust (rust/src/):
traits.rs- Core traits:LinkType,Link,LinkRef,LinkPattern,LinkStore,Anylib.rs- Public re-exportsexamples/basic_usage.rs- Updated examplestests/integration_test.rs- 26 integration testsExample Usage
TypeScript:
Rust:
Test Plan
npm test)cargo test- 31 unit + 26 integration)npm run lint)cargo clippy)Enables Parallel Work
Once merged, the following can be worked on in parallel:
Fixes #7
🤖 Generated with Claude Code