38 remote access foundation#40
Merged
Merged
Conversation
Closed
23 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the AimX v1 remote access protocol, enabling introspection and control of AimDB instances over Unix domain sockets using NDJSON. The implementation adds read/write capabilities with fine-grained security controls, real-time subscription streaming, and comprehensive metadata tracking.
Key Changes:
- Complete AimX v1 protocol implementation with five methods:
record.list,record.get,record.set,record.subscribe,record.unsubscribe - Security model with read-only default, optional write permissions, and producer protection rules
- Event funnel architecture for clean subscription management and NDJSON streaming
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
docs/design/008-M3-remote-access.md |
Complete AimX v1 protocol specification with security model and implementation architecture |
aimdb-core/src/remote/ |
Core remote access module with protocol, config, metadata, supervisor, and handler implementations |
aimdb-core/src/typed_record.rs |
Extended with JSON serialization, RecordValue wrapper, metadata tracking, and latest() API |
aimdb-core/src/builder.rs |
Added remote access configuration, list_records(), set_record_from_json(), and subscribe_record_updates() |
examples/remote-access-demo/ |
Complete client/server demonstration with 5 record types and all protocol methods |
aimdb-core/Cargo.toml |
Added tokio dependency for Unix socket support |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rotocol and documentation
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.
Added
Remote Access Foundation (AimX v1 Protocol)
Complete implementation of Unix domain socket-based remote access protocol for introspection and control of AimDB instances.
Core Remote Access Module (
aimdb-core/src/remote/)AimxConfig) with security policiesRemoteSupervisor) for managing client lifecycleConnectionHandler) for protocol executionProtocol Methods Implemented
Hello→Welcomewith version negotiation and capability exchangerecord.list: List all registered records with full metadata (type, buffer config, producer/consumer counts, timestamps)record.get: Retrieve current value of any record with JSON serializationrecord.set: Update record values remotely (with safety checks - only records without producers can be modified)record.subscribe: Real-time streaming of record updates via event messagesrecord.unsubscribe: Stop streaming for active subscriptionsSecurity & Safety
ReadOnly,ReadWrite, custom per-record permissionsType System Extensions
TypedRecordStoragetrait for serialization supportget_typed_record<T>()helper for type-safe record lookups byTypeIdset_record_from_json()for remote updates with validationlast_value_json()andlast_produced_json()for serialized accessExamples & Documentation
examples/remote-access-demo/- Complete server/client demonstrationdocs/design/008-M3-remote-access.mdwith full specificationBuilder Integration
AimDbBuilder::with_remote_access()for easy configurationDependencies
serdeandserde_jsonfor serialization (optionalserdefeature)std::os::unix::netChanged
DbErrorwithSerializationError,RemoteAccessError, andNotFoundvariantsAimDbBuildernow supports remote access configuration