Roadmap: From TransactionContext → TypeScript SDK with MAP Commands via IntegrationHub #377
Replies: 1 comment
-
Progress TrackerLet’s use (and update) this comment to identify the specific GitHub Issues created for each milestone and track completion. v0 — DAHN-Unblocking SDKGoal: Deliver a minimal TypeScript SDK that supports single-space transactional staging and commit.
v0.1+ — Safety & ReliabilityGoal: Improve developer safety and correctness without expanding core scope.
v0.2+ — Power & ExperienceGoal: Enable richer human interaction patterns and advanced workflows.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Roadmap: From TransactionContext → Minimal TypeScript SDK → Expanded MAP Capabilities
(Revised to foreground v0 / v0.1+ / v0.2+ milestones)
This roadmap charts the remaining concrete steps required to deliver a TypeScript MAP SDK backed by the MAP Commands interface, following the introduction of TransactionContext and TransactionManager in MAP Core.
The roadmap is explicitly structured to enable earliest delivery of a minimal but functional TS SDK (v0) so that MAP DAHN development can proceed in parallel with continued SDK and core enhancements.
Milestone Summary
v0 — DAHN-Unblocking SDK
Deliver a minimal TypeScript SDK that supports single-space transactional staging and commit, providing a stable API foundation for MAP DAHN development.
v0.1+ — Safety & Reliability
Add transaction rollback and hardened error semantics to improve developer safety and correctness without expanding the SDK’s conceptual scope.
v0.2+ — Power & Experience
Introduce undo/redo and multi-space workflows to support richer human interaction patterns and advanced application use cases.
NOTE: Progress of this plan is tracked in "Comment" immediately following this discussion body.
Phase 0 — Baseline Assumption (Pre-v0)
This roadmap assumes the TransactionContext PR has landed with the following properties:
All phases below build on this foundation.
v0 Milestone — “DAHN-Unblocking SDK”
Deliverable:
A minimal, stable TypeScript SDK that supports transactional staging and commit in a single space.
DAHN can begin real development against this milestone.
Phase 1 — Core Stabilization (Rust Only, v0-critical)
Goal: Ensure MAP Core is transaction-correct and SDK-safe before any IPC surface is exposed.
1.1 Eliminate Residual “Context” Leakage
Tasks:
Outcome:
Pull Requests and Issues:
1.2 Reference Layer Transaction Awareness (v0-critical)
This step must precede any Commands or SDK work.
Tasks:
Outcome:
Pull Requests and Issues:
1.3 Minimal Transaction Lifecycle Semantics (Commit-only)
Scope is intentionally minimal for v0.
Tasks:
Explicitly deferred:
Outcome:
Pull Requests and Issues:
Phase 1.4 — Execution Surface Consolidation (Rust Only, v0-critical)
Goal:
Complete the transition from a context-routed execution model to a TransactionContext-centric execution model, in preparation for the MAP Commands layer.
This phase is intentionally sequenced after 1.2 (Reference Layer Transaction Awareness) and 1.3 (Minimal Transaction Lifecycle) so that the refactor is mechanical, not semantic.
1.4.1 Retire
HolonsContextBehavioras an Execution AbstractionBy the end of Phase 1.3:
ReadableHolon/WritableHolonno longer accept a context parameterTransactionContextAt this point,
HolonsContextBehaviorno longer represents a meaningful abstraction.Tasks:
HolonsContextBehaviorfrom all new call pathsOutcome:
TransactionContextis the only execution surface1.4.2 Migrate Holon Operations onto
TransactionContextThe existing standalone APIs (currently in
holon_operations_api.rs) are migrated as methods onTransactionContext, grouped into coherent façades.Examples (illustrative):
TransactionContext::commit()TransactionContext::new_transient_holon(...)TransactionContext::stage_new_version(...)TransactionContext::get_all_holons()Key rule:
Any operation that creates, resolves, stages, mutates, or commits holons is a method on
TransactionContext.Outcome:
1.4.3 Preserve Semantic Grouping via Facades (Not a Monolith)
To avoid a monolithic
impl TransactionContextblock, introduce internal façade structs that are owned byTransactionContextbut exposed ergonomically.Example pattern (conceptual):
TransactionContext::holons()→ read/write/query operationsTransactionContext::staging()→ staging/versioning operationsTransactionContext::transient()→ transient construction and lookupThese façades:
Outcome:
1.4.4 Introduce
TransactionContextFactory(Environment Boundary)Construction of a
TransactionContextis environment-specific (client, guest, test, integration hub).Introduce a factory abstraction to isolate that concern:
init_client_context(...)init_guest_context(...)init_fixture_context(...)Internally, these are unified behind a
TransactionContextFactory, but execution code never depends on the factory — only on the resultingTransactionContext.Outcome:
1.4.5 Hard Boundary Before Phase 2
Phase 1.4 must be complete before Phase 2 (MAP Commands Layer) begins.
Invariant enforced by this phase:
TransactionContext, not traitsDefinition of Done (Phase 1.4)
HolonsContextBehaviorremoved or reduced to a thin, non-executing compatibility shimTransactionContextTransactionContextFactoryisolates environment-specific constructionRationale:
This sequencing ensures that reference correctness (1.2) and lifecycle safety (1.3) land early, while deferring the noisier—but now purely mechanical—API consolidation until the system is ready to expose a stable Commands interface.
In other words: 1.4 removes scaffolding; it does not change behavior.
Phase 2 — MAP Commands Layer (Rust Side, v0-critical)
Goal: Introduce the privileged Commands interface used exclusively by the TypeScript SDK.
2.1 Define Command Model (Shared Types)
Introduce a new crate or module, for example: holons_commands/
Define:
Invariant:
2.2 Command Dispatch Layer (IntegrationHub)
Tasks:
Implement a single Rust ingress function:
fn dispatch_map_command(request: MapRequest) -> Result<MapResponse, CommandError>
Responsibilities:
Explicitly NOT in scope for v0:
Outcome:
Phase 3 — IntegrationHub Wiring (Rust ↔ Tauri, v0-critical)
Goal: Make MAP Commands callable from the TypeScript runtime.
3.1 Tauri Command Surface
Expose exactly one Tauri command:
Rules:
3.2 Serialization Contracts
Tasks:
Outcome:
Phase 4 — TypeScript Command Layer (Thin IPC, v0-critical)
Goal: Provide a minimal transport layer with zero policy.
4.1 TypeScript Commands Module
Implement exactly one function:
Responsibilities:
Outcome:
Phase 5 — TypeScript MAP SDK (v0 Delivery)
Goal: Deliver the minimal human-facing SDK required for DAHN development.
5.1 Minimal Transaction Handling (Single Space)
Capabilities:
API shape (illustrative):
Explicitly deferred:
5.2 SDK Facades (Minimal)
Implement:
Invariant:
Outcome:
v0.1+ Milestone — “Safety & Experience”
Focus: Improve developer ergonomics and safety without expanding core scope.
Phase 6 — Rollback & Failure Semantics (v0.1+)
6.1 Transaction Rollback
6.2 Error & Validation Hardening
v0.2+ Milestone — “Power Features”
Focus: Human experience and advanced workflows.
Phase 7 — Undo / Redo (SDK-driven)
Undo:
Redo:
Phase 8 — Multi-Space & Advanced Workflows
Final Note
This sequencing preserves a crucial principle:
Undo exists to serve human experience, not core mechanics.
By delivering a commit-capable TS SDK as early as possible, MAP DAHN development is unblocked while MAP Core and the SDK continue to evolve in parallel.
Beta Was this translation helpful? Give feedback.
All reactions