lightning-terminal/cmd/litcli
sputn1ck 5cf25ca624 scripting: add Starlark scripting system for LiT automation
This commit introduces a comprehensive Starlark scripting system that
enables custom automation with access to all subdaemon RPCs (lnd, loop,
pool, faraday, taproot-assets). Scripts use native LND macaroons for
permission enforcement.

Key features:
- Starlark execution engine with sandboxed resource limits
- Standard builtins: print, log, sleep, now, json_encode/decode
- HTTP GET requests with URL allowlisting
- Persistent KV store with bucket-based permissions
- LND event subscriptions for long-running daemon scripts
- Script CRUD operations with macaroon baking
- Execution history and running script tracking
- Complete CLI commands (litcli scripts ...)

Database schema:
- scripts: Store script definitions with macaroon permissions
- script_executions: Audit trail for script runs
- script_kv_store: Persistent key-value storage for scripts
- running_scripts: Track currently running scripts

Security model:
- Each script has an LND macaroon baked with specific permissions
- RPC calls from scripts include this macaroon in the header
- LND/subdaemons validate permissions natively
- URL and bucket allowlists validated at runtime
2026-01-30 23:28:52 +01:00
..
accounts.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
actions.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
autopilot.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
helpers.go multi: move macaroon helpers to macaroons dir 2025-02-09 10:37:40 +02:00
ln.go litcli: update payinvoice for multirfq 2025-10-30 10:52:45 +01:00
main.go scripting: add Starlark scripting system for LiT automation 2026-01-30 23:28:52 +01:00
privacy_map.go litcli: use cancellable contexts 2025-01-13 09:29:53 +02:00
proxy.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
scripts.go scripting: add Starlark scripting system for LiT automation 2026-01-30 23:28:52 +01:00
sessions.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
status.go litcli: use cancellable contexts 2025-01-13 09:29:53 +02:00