Proposal: Evolution of MAP Interface Boundaries and TypeScript Client API #359
Replies: 2 comments 1 reply
-
|
Thanks so much for writing this up @evomimic — this evolution feels super important and clarifying, and I really appreciate you laying it out so explicitly. A few focused questions / clarifications as I digest this:
What do you all think? Overall, this direction makes a ton of sense to me — these questions are mostly about tightening definitions so we’re all using the same mental model as we implement against it. |
Beta Was this translation helpful? Give feedback.
-
|
I'm also wondering if this shift might affect how we think about where local file system access should take place. During implementation of the loader client we had decided to isolate file system access to receptors, but how we're thinking about receptors seems to have changed and there may not be something that is considered a local receptor moving forward. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal: Evolution of MAP Interface Boundaries and TypeScript Client API
Audience: MAP Core Development Team
Status: Proposal for discussion and alignment
Motivation: Clarify and formalize the evolution of MAP interface boundaries in light of architectural realities that have emerged during implementation.
1. Background and Context
The MAP interface design originally treated the Dance interface as the primary external integration boundary. This made sense when:
As implementation has progressed, several architectural facts have become clear that invalidate these assumptions and call for a refinement of the interface model.
2. Key Architectural Realizations
2.1 The Guest Is Not a Service Boundary
Implication:
The guest is an execution environment, not an integration boundary.
2.2 The Rust Client Is the True Integration Point
Implication:
Any mapping from internal semantics (e.g. errors) to protocol-specific representations must happen in receptors, not in the core API.
2.3 The TypeScript Client Is Privileged
Implication:
The TypeScript client should not be constrained by assumptions appropriate only to remote or untrusted callers.
3. Consequences for Error and Status Handling
3.1 HTTP Status Codes Are No Longer Appropriate in Core APIs
HolonErrortype:HolonError → HTTP status code:Proposal:
DanceResponse.HolonErrorvalues directly.4. Rethinking the Role of the Dance Interface
4.1 Dance Is Not the Canonical MAP API
The Dance interface is well-suited for:
It is not well-suited for:
Forcing all MAP interactions through
DanceRequest/DanceResponsecreates unnecessary complexity and leads to awkward indirection.4.2 MAP Core APIs Already Exist Conceptually
MAP already defines a clear core surface:
ReadableHolonWritableHolonHolonCollectionHolonOperationsAPI (staging, querying, committing, etc.)These APIs:
5. Proposal: Command-Oriented Client Interface
5.1 Commands as the Transport Unit (TypeScript-Only Interface)
Instead of treating Dance as the universal interface, expose MAP core functionality via commands — but only to the privileged TypeScript client.
The Command interface is not a general MAP integration surface. It is a local, privileged transport mechanism used exclusively for communication between the TypeScript client and the Rust client within the same Tauri process.
Key clarifications:
Within this constrained context:
Examples of TypeScript-only commands include:
This distinction ensures that:
5.2 Dance as One Command Type
Commandmodel.DanceCommand:DanceRequest.5.3 Undo / Redo Alignment
6. TypeScript API Implications
6.1 Direct Exposure of MAP Core Surface
The TypeScript client should interact with:
All via:
6.2 Error Semantics
7. Summary of the Proposed Model
8. Next Steps for the Core Team
Suggested follow-up discussions:
Commandenum / hierarchy.This proposal reflects the architecture MAP has already grown into.
The goal is to let the interfaces catch up with reality.
Beta Was this translation helpful? Give feedback.
All reactions