lightning-terminal/db/sqlc/migrations
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
..
000001_accounts.down.sql db/sqlc: only use named UNIQUE indices 2025-03-10 13:54:11 -05:00
000001_accounts.up.sql db/sqlc: only use named UNIQUE indices 2025-03-10 13:54:11 -05:00
000002_sessions.down.sql db/sqlc: add session schemas and queries 2025-03-11 11:37:41 -05:00
000002_sessions.up.sql db/sqlc: add session schemas and queries 2025-03-11 11:37:41 -05:00
000003_kvstores.down.sql db/sqlc: kvstores schemas & queries 2025-04-10 13:03:20 +02:00
000003_kvstores.up.sql multi: rename sql kvstores session_id to group_id 2025-07-21 14:45:45 +02:00
000004_privacy_pairs.down.sql db/sqlc: priv map schemas and crud 2025-04-22 06:10:48 +02:00
000004_privacy_pairs.up.sql db/sqlc: priv map schemas and crud 2025-04-22 06:10:48 +02:00
000005_actions.down.sql db: add actions schemas and queries 2025-05-29 07:04:40 +02:00
000005_actions.up.sql db: add actions schemas and queries 2025-05-29 07:04:40 +02:00
000006_scripts.down.sql scripting: add Starlark scripting system for LiT automation 2026-01-30 23:28:52 +01:00
000006_scripts.up.sql scripting: add Starlark scripting system for LiT automation 2026-01-30 23:28:52 +01:00