lightning-terminal/db/sqlc
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
..
migrations scripting: add Starlark scripting system for LiT automation 2026-01-30 23:28:52 +01:00
queries sqlc: add DeleteSession query 2025-11-25 19:35:42 +01:00
accounts.sql.go multi: add UpdateAccountAliasForTests query 2025-10-07 02:13:41 +02:00
actions.sql.go sqlc+firewalldb: add GetAction SQL query 2025-10-07 02:13:14 +02:00
actions_custom.go db: define manual action SQL queries 2025-05-30 10:54:34 +02:00
db.go db/sqlc: add account related tables and queries 2025-01-29 16:37:20 +02:00
db_custom.go db: define manual action SQL queries 2025-05-30 10:54:34 +02:00
kvstores.sql.go multi: rename sql kvstores session_id to group_id 2025-07-21 14:45:45 +02:00
models.go multi: rename sql kvstores session_id to group_id 2025-07-21 14:45:45 +02:00
privacy_paris.sql.go db/sqlc: priv map schemas and crud 2025-04-22 06:10:48 +02:00
querier.go sqlc: add DeleteSession query 2025-11-25 19:35:42 +01:00
sessions.sql.go sqlc: add DeleteSession query 2025-11-25 19:35:42 +01:00