docs: design command execution for tabletop scripts

Add bgm-commands.md covering async commands with ok/cancel/error
results, per-invocation run contexts, fire-and-forget vs self-managed
waiting, and tap interaction with part-local trigger points. Link it
from the tabletop design and plan docs, and record the decisions in
decisions.md.
This commit is contained in:
2026-08-10 15:41:43 +08:00
parent 9b5223686e
commit 634a99dd25
4 changed files with 203 additions and 2 deletions
+8
View File
@@ -172,6 +172,14 @@ consumers share them (see Open decisions).
- `pnpm --filter @tts/web build` — the part inspection route renders `PartView`
from the library (work item 2), proving it end-to-end.
## Commands (not yet implemented)
Scripted interaction is designed in [`bgm-commands.md`](./bgm-commands.md):
async commands with `ok`/`cancel`/`error` results, per-invocation run
contexts, fire-and-forget vs self-managed waiting, and tap interaction with
part-local trigger points. Implementation order: types + run-context manager,
tap detection, then the first commands (`wait: tap`, `focus`).
## Open decisions (defaults in bold)
- **Where the trace/sprite helpers live** — **lift into `@tts/mesh`** (shared