Files
MetaCrate/docs/grid-agent-script-delivery.md
Chili Palmer a749111657
Some checks failed
CI / rust-skia (Rust only) (push) Successful in 2m45s
CI / required (push) Failing after 1m0s
Implement safe public LSL delivery (#129)
2026-08-18 10:38:12 +02:00

41 lines
2.1 KiB
Markdown

# Grid-agent LSL script delivery
The public LSL exception is deliberately narrower than operator authority. An
explicit public-chat or one-to-one IM request may expose only
`deliver_generated_lsl`. Policy binds that call to the authenticated sender
UUID; neither conversation text nor tool arguments contain a destination UUID
or inventory folder.
The model must return exactly `name`, `description`, and `source`. Unknown
fields are rejected. All three values are bounded, and source is treated as
untrusted data. Native `metacrate-lsl-tools` lexical and structural parsing runs
before inventory mutation, followed by checks that reject capability URLs,
secret-like content, and public-workflow operations such as teleport, rez,
attach, money, estate, eject, and object-return calls. Validation establishes a
bounded syntax and policy gate, not simulator runtime safety.
Accepted source is uploaded as an LSL inventory item with copy, modify, and
transfer permissions in `MetaCrate Generated Scripts`, then offered once to the
original sender. This workflow never compiles, runs, attaches, rezzes, or
injects the script into an object. The generated-scripts folder doubles as the
recovery queue: a failed or ambiguous offer leaves the original item there and
the transfer is not blindly retried. Operators can inspect and reconcile that
folder using the audit correlation ID.
Per-resident and global windows limit accepted requests, and a semaphore bounds
simultaneous creates/transfers. The enclosing tool loop supplies its bounded
wall-clock deadline and cancellation token. Disconnect, timeout, shutdown, and
duplicate delivery IDs are handled by the session and interaction owners before
another inventory operation can be admitted. Default diagnostics report only
bounded outcomes and byte counts; generated source and conversation content are
not formatted into logs.
Focused verification:
```console
cargo test --locked -p metacrate-grid-agent --lib script_delivery_tests
cargo test --locked -p metacrate-grid-agent --lib interaction_tests
cargo test --locked -p metacrate-grid-agent --test llm_transport
cargo test --locked -p metacrate-lsl-tools
```