Script receivers 5/6: forward-only file contract for hosts without a file system #516

Open
opened 2026-10-26 21:47:22 +00:00 by orion · 2 comments
Collaborator

Slice 6 of Design: docs/design/SCRIPT-RECEIVERS.md (branch docs/script-receivers). Part of the script-receivers epic.

Forward-only file contract for hosts without a file system (section 8). Client side (Forgejo view) is orion/infra#2329 on git.dmb.zone, not this repo.

Scope

  • Client capability experimental.files: the server reads no disk.
  • torbscript/wantFiles (server -> client notification): {files, directories}, only forward from held text.
  • torbscript/files (client -> server notification): {files: [{path, text} | {path, missing}], directories: [{path, entries}]}, treated as a file change.
  • A run that misses a file answers what it has and marks it incomplete.

Acceptance

  • A tests/lsp/ session with no disk opens config.trb of config-dsl (mapped), answers the wants and gets typed hover; an unmapped script opened the same way stays untyped (notMatched).
  • The server never asks for a file that no held text names (asserted in the session).
  • Contract documented in LANGUAGE-SERVER.md and docs/tooling/torb-lsp.md.

Amended 2026-10-26 (owner): the scripts mapping is optional; unmapped scripts stay valid and are typed by inference from literal Sandbox.load calls, else untyped (SCRIPT-RECEIVERS.md sections 1, 5, 6).

Slice 6 of Design: `docs/design/SCRIPT-RECEIVERS.md` (branch `docs/script-receivers`). Part of the script-receivers epic. Forward-only file contract for hosts without a file system (section 8). Client side (Forgejo view) is orion/infra#2329 on git.dmb.zone, not this repo. Scope - Client capability `experimental.files`: the server reads no disk. - `torbscript/wantFiles` (server -> client notification): `{files, directories}`, only forward from held text. - `torbscript/files` (client -> server notification): `{files: [{path, text} | {path, missing}], directories: [{path, entries}]}`, treated as a file change. - A run that misses a file answers what it has and marks it incomplete. Acceptance - [ ] A `tests/lsp/` session with no disk opens `config.trb` of config-dsl (mapped), answers the wants and gets typed hover; an unmapped script opened the same way stays untyped (`notMatched`). - [ ] The server never asks for a file that no held text names (asserted in the session). - [ ] Contract documented in LANGUAGE-SERVER.md and `docs/tooling/torb-lsp.md`. Amended 2026-10-26 (owner): the `scripts` mapping is optional; unmapped scripts stay valid and are typed by inference from literal `Sandbox.load` calls, else untyped (SCRIPT-RECEIVERS.md sections 1, 5, 6).
Author
Collaborator

Design PR: #519 · Epic: #518

Design PR: https://git.torb.dev/torbscript/language/pulls/519 · Epic: https://git.torb.dev/torbscript/language/issues/518
Author
Collaborator

[loop:torbscript] intake: in scope (author orion, label loop), no duplicate, no collision with a design record (SCRIPT-RECEIVERS.md section 8 landed via #519), no owner question. Part of epic #518; builds on the slices 2-4 (#513 in review). next: refine

[loop:torbscript] intake: in scope (author orion, label loop), no duplicate, no collision with a design record (SCRIPT-RECEIVERS.md section 8 landed via #519), no owner question. Part of epic #518; builds on the slices 2-4 (#513 in review). next: refine
Sign in to join this conversation.
No labels
loop
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language#516
No description provided.