Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
814a032
docs(sessionmethods): add the SessionMethods owner contract
eric8810 Nov 24, 2026
1f5c891
docs(sessionmethods): read the registering row through a host port
eric8810 Nov 24, 2026
3a0bb96
docs(sessionmethods): answer the first pre-review
eric8810 Nov 24, 2026
49d1420
docs(sessionmethods): answer the second pre-review
eric8810 Nov 24, 2026
f94f559
docs(sessionmethods): answer the third pre-review
eric8810 Nov 24, 2026
9f3a726
docs(sessionmethods): answer the fourth pre-review
eric8810 Nov 24, 2026
62e8392
docs(sessionmethods): answer the fifth pre-review
eric8810 Nov 24, 2026
55191f7
docs(sessionmethods): answer the sixth pre-review
eric8810 Nov 24, 2026
7454d29
docs(sessionmethods): answer the seventh pre-review
eric8810 Nov 24, 2026
f4e3160
docs(sessionmethods): answer the eighth pre-review
eric8810 Nov 24, 2026
40575eb
docs(sessionmethods): answer the ninth pre-review
eric8810 Nov 24, 2026
b29e68b
docs(sessionmethods): answer the tenth pre-review
eric8810 Nov 24, 2026
e1f61b7
docs(sessionmethods): answer the eleventh pre-review
eric8810 Nov 24, 2026
55fd999
docs(sessionmethods): answer the twelfth pre-review
eric8810 Nov 24, 2026
2dedbaf
docs(sessionmethods): answer the thirteenth pre-review
eric8810 Nov 24, 2026
2477554
docs(sessionmethods): answer the fourteenth pre-review
eric8810 Nov 24, 2026
8f61052
docs(sessionmethods): answer the fifteenth pre-review
eric8810 Nov 24, 2026
c215e0a
docs(sessionmethods): answer the sixteenth pre-review
eric8810 Nov 24, 2026
e873bb9
docs(sessionmethods): answer the seventeenth pre-review
eric8810 Nov 24, 2026
86628bd
docs(sessionmethods): answer the eighteenth pre-review
eric8810 Nov 24, 2026
245c925
docs(sessionmethods): answer the nineteenth pre-review
eric8810 Nov 24, 2026
42c0273
docs(sessionmethods): answer the twentieth pre-review
eric8810 Nov 24, 2026
56ecee9
docs(sessionmethods): answer the twenty-first pre-review
eric8810 Nov 24, 2026
4788969
docs(sessionmethods): answer the twenty-second pre-review
eric8810 Nov 24, 2026
44fc7c2
docs(sessionmethods): answer the twenty-third pre-review
eric8810 Nov 24, 2026
19099a9
docs(sessionmethods): answer the twenty-fourth pre-review
eric8810 Nov 24, 2026
a6f4ee6
docs(sessionmethods): answer the twenty-fifth pre-review
eric8810 Nov 24, 2026
02d8643
docs(sessionmethods): answer the twenty-sixth pre-review
eric8810 Nov 25, 2026
3b8804f
docs(sessionmethods): answer the twenty-seventh pre-review
eric8810 Nov 25, 2026
bb78cf4
docs(sessionmethods): answer the twenty-eighth pre-review
eric8810 Nov 25, 2026
0600634
docs(sessionmethods): answer the twenty-ninth pre-review
eric8810 Nov 25, 2026
ec48688
docs(sessionmethods): answer the thirtieth pre-review
eric8810 Nov 25, 2026
6ac0401
docs(sessionmethods): answer the thirty-first pre-review
eric8810 Nov 25, 2026
1eb71ac
docs(sessionmethods): answer the thirty-second pre-review
eric8810 Nov 25, 2026
35d8f84
docs(sessionmethods): answer the thirty-third pre-review
eric8810 Nov 25, 2026
86a909a
docs(sessionmethods): answer the thirty-fourth pre-review
eric8810 Nov 25, 2026
501486a
docs(sessionmethods): answer the mock-zb review
eric8810 Nov 25, 2026
baa113e
docs(sessionmethods): answer the mock-yy review
eric8810 Nov 25, 2026
c86233a
docs(sessionmethods): answer the mock-zb delta
eric8810 Nov 25, 2026
409bb35
docs(sessionmethods): answer both mock deltas
eric8810 Nov 25, 2026
8b07db1
docs(sessionmethods): answer the final mock deltas
eric8810 Nov 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions docs/architecture/rust-agent/plugins/SessionMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Owner: [methods.rs](../../../../crates/dim-agent-capabilities/src/methods.rs).
Keeps the Session's method table, `sessionMethods`: the method namespaces the
Session's parts register with it, which Rpc reads on each call to dispatch a
Session method through the Session. Contract:
[methods contract A.1](../../../design/contracts/session-boundary.md#a1-method-contributions).
[SessionMethods](../../../design/plugins/SessionMethods.md).

## Dependencies

Expand All @@ -17,24 +17,33 @@ accepted. The value is also the data face `reservedMethods`: a row of another
language asks `check {namespace, declarations}` the same question
([service faces §4.9](../../../design/service-faces.md#49-旧主机端口credentialvariableshost-等六个)).

The contract also answers a withdrawn namespace from the row that registered it.
Rpc reads that row today (`session_provider` in
[dim-app-server/src/methods.rs](../../../../crates/dim-app-server/src/methods.rs));
the table itself has no readable face for it, and the read is raised in the
contract ([SessionMethods §4 rule 8](../../../design/plugins/SessionMethods.md#requirements-raised-to-mechanism-owners)).

## Events and lifetime

No Timeline events, worker tasks or I/O. A part depends on `sessionMethods` and
calls `register(ctx, namespace, declarations, handler)` from its own `apply`;
the registration is withdrawn when that part unloads, and a namespace registered
already fails
No Timeline events or I/O. Each registration tracks the calls it accepted, so
its unload can interrupt them and wait. A part depends on `sessionMethods` and
calls `register(ctx, namespace, declarations, call)` from its own `apply`, with
the part's own function as `call`; the registration is withdrawn when that part
unloads, and a namespace registered already fails
([rutis usage R6](../../../design/rutis-usage.md#r6-contributions-register-with-their-owner)).
A refused registration fails the part. A part of another language calls
`sessionMethods.register(namespace, declarations, call)` through the bridge;
the registration belongs to the calling row, and `call` is the row's function,
called back through the bridge. The table provides that entry itself, at its
dispatcher key, with the native service.
called back through the bridge. Today `ForeignMethods` provides that entry;
the target removes it, and the table serves the entry itself at its dispatcher
key.

A name belongs to the longest namespace that holds it. When a namespace is
withdrawn, the table keeps the row that registered it, so Rpc answers a call
into it from that row's status (`service_reloading` or `service_unavailable`)
rather than `unknown_method`. Each registration owns the calls it admitted: its
part's unload interrupts `report` calls and waits for every admitted call.
withdrawn, the table keeps the row that registered it, so a call into it answers
`service_reloading` or `service_unavailable` from that row's status. Today a
withdrawn namespace whose row is absent from the loader answers
`service_reloading`; the target contract answers `unknown_method` there, as it
already does for a disabled row and for a name no namespace ever held.
`session.methods` lists the methods of the namespaces registered now that no
management namespace holds.

Expand Down
Loading