loki-mode 7.7.10 → 7.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,312 @@
1
+ # Loki Forge - autonomous build queue
2
+
3
+ This file is the single source of truth for what still needs to ship.
4
+ Tasks complete top-to-bottom. New items found during work go at the
5
+ bottom. Loop continues until status is "COMPLETE - APP DEPLOYED".
6
+
7
+ Format:
8
+ - [ ] open
9
+ - [~] in progress (only one at a time)
10
+ - [x] done (commit hash)
11
+ - [!] blocked (with reason)
12
+
13
+ Last updated: 2026-05-18
14
+
15
+ ---
16
+
17
+ ## Phase F-2: Auth + Storage + Functions + Gateway
18
+
19
+ - [x] F-2.01 Auth service skeleton (forge/services/auth/{providers,sessions,rbac}.py)
20
+ - [x] F-2.02 JWT signing + verification (HS256; RS256 deferred to F-3)
21
+ - [x] F-2.03 OAuth provider scaffolding (Google, GitHub, Apple, Microsoft, GitLab, Discord, Slack) with PKCE flow
22
+ - [~] F-2.04 Magic-link / passwordless auth (provider names registered; flow handler deferred)
23
+ - [x] F-2.05 Provisioner auto-creates users table when auth providers detected (operator-declared schema preserved)
24
+ - [x] F-2.06 Auth MCP tools (forge_auth_provider_add/remove/user_create/user_list/session_revoke)
25
+ - [x] F-2.07 Auth test suite (16 assertions)
26
+ - [x] F-2.08 Storage service skeleton (forge/services/storage/{buckets,cdn,transform}.py)
27
+ - [x] F-2.09 Local FS-backed buckets with sha256 content addressing
28
+ - [x] F-2.10 Signed URL minter (HMAC, expiry)
29
+ - [x] F-2.11 Image transform pipeline stub (resize/format/quality/rotate/grayscale/blur)
30
+ - [x] F-2.12 Storage MCP tools (6 forge_storage_* tools)
31
+ - [x] F-2.13 Storage test suite (14 assertions)
32
+ - [x] F-2.14 Functions service skeleton (forge/services/functions/{deploy,invoke,logs}.py)
33
+ - [x] F-2.15 Function manifest format + storage layout
34
+ - [~] F-2.16 Bun runtime invocation harness (subprocess in place; warm-pool deferred)
35
+ - [x] F-2.17 Function MCP tools (forge_function_deploy/list/invoke/logs/delete/rollback)
36
+ - [x] F-2.18 Functions test suite (12 assertions)
37
+ - [x] F-2.19 Gateway service skeleton (forge/services/gateway/{routing,rate_limit}.py)
38
+ - [~] F-2.20 OpenAI-compat HTTP front (routing logic in place; HTTP handler bundled with F-2.27)
39
+ - [x] F-2.21 Cost-aware routing (tier + p50 latency + cost-per-token sort)
40
+ - [x] F-2.22 Gateway MCP tools (forge_gateway_route_add/list/pick, _usage)
41
+ - [x] F-2.23 Gateway test suite (10 assertions)
42
+ - [x] F-2.24 Provisioner: auth+storage wired; functions+gateway require agent-supplied source so no detector path
43
+ - [x] F-2.25 Semantic layer: buckets, functions, gateway routes surfaced
44
+ - [x] F-2.26 Council review hook (migrate_apply emits review records to .loki/quality/forge-migrations/; council read-side consumes from that path)
45
+ - [x] F-2.27 Dashboard router /api/forge/* (state, db, storage, functions, gateway)
46
+ - [~] F-2.28 Dashboard UI: deferred to dedicated dashboard-ui work (router is in place; UI panes are CSS/TSX work that will land in a separate PR)
47
+ - [x] F-2.29 CHANGELOG entry for F-2
48
+ - [x] F-2.30 Commit + push F-2
49
+
50
+ ## Phase F-3: Realtime + Schedules + Secrets + Payments + Deploy(Railway)
51
+
52
+ - [x] F-3.01 Realtime service (bus, channels, presence)
53
+ - [~] F-3.02 WS endpoint /forge/realtime/v1 (bus.subscribe() ready; WS wiring is F-4 dashboard work)
54
+ - [x] F-3.03 Realtime channel RLS field + custom-predicate sanitization
55
+ - [x] F-3.04 Realtime MCP tools (forge_realtime_channel_create/list, _publish, _history)
56
+ - [x] F-3.05 Realtime test suite (8 assertions)
57
+ - [x] F-3.06 Schedules service (cron parser + persisted store)
58
+ - [x] F-3.07 Schedule runner with invoke-callback (dashboard-loop wiring in F-4)
59
+ - [x] F-3.08 Schedule trigger types (function/url/event)
60
+ - [x] F-3.09 Schedules MCP tools (forge_schedule_create/list/delete/logs)
61
+ - [x] F-3.10 Schedules test suite (10 assertions)
62
+ - [x] F-3.11 Secrets vault (AES-GCM when cryptography available; HMAC-XOR fallback)
63
+ - [x] F-3.12 Secret rotation policy + alert/function/manual actions
64
+ - [x] F-3.13 Secrets MCP tools (forge_secret_set/list/delete/rotate)
65
+ - [x] F-3.14 Secrets test suite (10 assertions; no plaintext on disk verified)
66
+ - [x] F-3.15 Stripe payments service + webhook signature verification
67
+ - [x] F-3.16 Stripe customer.subscription.* events upsert into a forge subscriptions table (auto-created on first event)
68
+ - [x] F-3.17 Payments MCP tools (forge_payments_provider_setup, _product_create/list, _webhook_register)
69
+ - [x] F-3.18 Payments test suite (9 assertions)
70
+ - [x] F-3.19 Railway deploy adapter + Fly + Vercel + Cloudflare + local plans
71
+ - [x] F-3.20 Deploy MCP tools (forge_deploy_provider_setup, _plan, _promote, _status, _rollback)
72
+ - [x] F-3.21 Deploy test suite (10 assertions)
73
+ - [~] F-3.22 Provisioner: wire F-3 (deferred; F-3 services are not auto-provisioned from PRD text since they need real secrets the agent supplies)
74
+ - [x] F-3.23 Semantic layer: realtime + schedules + secrets + payments + deploy surfaced via state dump
75
+ - [x] F-3.24 CHANGELOG entry for F-3
76
+ - [x] F-3.25 Commit + push F-3
77
+
78
+ ## Phase F-4: remaining deploys + Stripe Connect + external auth + Python runtime
79
+
80
+ - [x] F-4.01 Fly.io deploy adapter (shipped early with F-3 plan())
81
+ - [x] F-4.02 Vercel deploy adapter (shipped early with F-3 plan())
82
+ - [x] F-4.03 Cloudflare deploy adapter (shipped early with F-3 plan())
83
+ - [x] F-4.04 Local docker-compose adapter (shipped early with F-3 plan())
84
+ - [x] F-4.05 Stripe Connect multi-tenant flow (forge/services/payments/stripe_connect.py)
85
+ - [x] F-4.06 Lemon Squeezy adapter (forge/services/payments/lemon_squeezy.py)
86
+ - [x] F-4.07 Paddle adapter (forge/services/payments/paddle.py)
87
+ - [x] F-4.08 Auth0 adapter (via external.registry)
88
+ - [x] F-4.09 Clerk adapter (via external.registry)
89
+ - [x] F-4.10 Kinde adapter (via external.registry)
90
+ - [x] F-4.11 Stytch adapter (via external.registry)
91
+ - [x] F-4.12 WorkOS adapter (via external.registry)
92
+ - [x] F-4.13 Python runtime for forge functions (shipped early in F-2; tested end-to-end)
93
+ - [~] F-4.14 Deno runtime parity (deploy.py allows deno runtime; the binary just needs to be on PATH)
94
+ - [x] F-4.15 Migration tooling: loki migrate-from supabase
95
+ - [x] F-4.16 Migration tooling: loki migrate-from insforge
96
+ - [x] F-4.17 F-4 test suites (8 external-auth + 8 migrations + 9 payments-providers = 25 assertions)
97
+ - [x] F-4.18 CHANGELOG entry for F-4
98
+ - [x] F-4.19 Commit + push F-4
99
+
100
+ ## Phase F-5: SDK generation
101
+
102
+ - [x] F-5.01 SDK codegen scaffolding (forge/sdk/{__init__,codegen}.py)
103
+ - [x] F-5.02 TypeScript SDK generator (types + client + index + package.json)
104
+ - [x] F-5.03 Python SDK generator (types dataclasses + client + __init__)
105
+ - [~] F-5.04 Kotlin SDK generator (deferred; the shape is fixed and a follow-up adds the kotlin emit module)
106
+ - [~] F-5.05 Swift SDK generator (deferred; same shape)
107
+ - [~] F-5.06 Go SDK generator (deferred; same shape)
108
+ - [x] F-5.07 SDK test suite (11 assertions including deterministic-output)
109
+ - [~] F-5.08 Auto-regeneration hook (forge_sdk_generate exists as an MCP tool; agent calls after schema changes)
110
+ - [x] F-5.09 CHANGELOG entry for F-5
111
+ - [x] F-5.10 Commit + push F-5
112
+
113
+ ## Sandbox: Phase B (vault sidecar) - LAP-parity
114
+
115
+ - [ ] B-01 Vault sidecar TypeScript port (vault/src/server.ts)
116
+ - [ ] B-02 vault/Dockerfile + CA generation
117
+ - [ ] B-03 Stub minting + MITM proxy on 127.0.0.1:14322
118
+ - [ ] B-04 Per-host TLS leaf cert minting via tls.createSecureContext
119
+ - [ ] B-05 SNI leaf cache (60s TTL)
120
+ - [ ] B-06 swap() over headers + JSON/form/ndjson/XML bodies
121
+ - [ ] B-07 autonomy/sandbox.sh: bring up vault container before agent container via --network container:
122
+ - [ ] B-08 Egress allow/deny enforcement at vault layer
123
+ - [ ] B-09 Interception audit log -> dashboard/audit.py chain hasher
124
+ - [ ] B-10 Dashboard /api/sandbox/session/{id}/interceptions endpoint
125
+ - [ ] B-11 Vault sidecar test suite (>=15 assertions, mostly in vault/tests)
126
+ - [ ] B-12 CHANGELOG entry for B
127
+ - [ ] B-13 Commit + push B
128
+
129
+ ## Sandbox: Phase C (K8s session-per-pod)
130
+
131
+ - [ ] C-01 LokiSession CRD definition
132
+ - [ ] C-02 kopf reconciler colocated in controlplane container
133
+ - [ ] C-03 Per-session NetworkPolicy generated from .loki/config.yaml egress
134
+ - [ ] C-04 Warm pool with Postgres SELECT FOR UPDATE SKIP LOCKED
135
+ - [ ] C-05 Local SQLite flock fallback
136
+ - [ ] C-06 Public /api/v2/sessions REST surface
137
+ - [ ] C-07 Helm chart additions (sandbox-crd.yaml, RBAC, NetworkPolicy template)
138
+ - [ ] C-08 Phase C test suite
139
+ - [ ] C-09 CHANGELOG entry for C
140
+ - [ ] C-10 Commit + push C
141
+
142
+ ## Cross-cutting + polish
143
+
144
+ - [~] X-01 MCPMark-style benchmark vs InsForge (deferred; needs InsForge cluster + token quota to run authoritatively)
145
+ - [~] X-02 Loki Forge dashboard UI panes deferred (router and JSON endpoints shipped)
146
+ - [~] X-03 Dashboard migration diff viewer deferred (review records emitted to .loki/quality/forge-migrations/)
147
+ - [x] X-04 Memory: ForgeSchemaDecision + ForgeMigrationOutcome entry types
148
+ - [~] X-05 Healing-mode integration: forge_db_introspect already usable against legacy DBs via MCP; deeper integration is a follow-up
149
+ - [x] X-06 wiki/Loki-Forge.md
150
+ - [x] X-07 VERSION + package.json bumped to 7.6.0
151
+ - [~] X-08 scripts/local-ci.sh: two pre-existing env failures remain; my changes introduce no new failures
152
+ - [~] X-09 Cumulative-diff review by 3 agents: queued for the merge PR
153
+ - [x] X-10 VERSION bumped to 7.6.0
154
+
155
+ ## New tasks discovered during the run (appended per goal contract)
156
+
157
+ - [x] X-11 /api/forge/database/diff/{migration_id} + render_diff() in forge/services/database/diff.py
158
+ - [x] X-12 Wire schedules.runner.tick() into the dashboard background loop
159
+ - [x] X-13 OpenAI-compat /forge/gateway/v1/chat/completions HTTP handler (uses forge function `gateway_dispatch` for upstream calls; record_usage tracked)
160
+ - [x] X-14 Realtime WebSocket endpoint /forge/realtime/v1 mounted on the dashboard WS manager
161
+ - [x] X-15 Kotlin SDK emit module
162
+ - [x] X-16 Swift SDK emit module
163
+ - [x] X-17 Go SDK emit module
164
+ - [x] X-18 Auto-regen SDK after every forge_db_migrate (pin file at sdk/.last_target.json)
165
+ - [x] X-19 forge.memory_bridge feeds ForgeMigrationOutcome + ForgeSchemaDecision into .loki/memory/forge/. migrate_apply auto-records each migration.
166
+ - [x] X-20 Magic-link auth flow handler (issue + single-use redeem)
167
+ - [x] X-21 Add FRG001/FRG002/FRG003 diagnose codes + regression tests
168
+ - [x] X-22 Schedule runner watchdog. tick() pings; /api/forge/health raises FRG004 when stalled > 60s.
169
+
170
+ ## New tasks discovered during this round
171
+
172
+ - [ ] X-23 Email send adapters (Resend/SendGrid/Postmark) so magic-link
173
+ flow has a default email transport; agent currently has to deploy
174
+ a forge function that calls the upstream API
175
+ - [x] X-24 Payments webhook receivers /forge/payments/<provider>/webhook
176
+ - [x] X-25 OAuth callback handler /forge/auth/callback/<provider>
177
+ - [x] X-26 Forge backup + restore (path-traversal-safe; master key excluded by default)
178
+ - [ ] X-27 Schema diff visualization for the council review record
179
+ (currently raw SQL; rendering needs a diff-friendly representation)
180
+ - [x] X-28 Cron lint() with warnings for minute=*, DOM>28, next-3-fires
181
+ - [x] X-29 /api/forge/health endpoint flipping RED on the FRG* codes
182
+
183
+ ## More tasks discovered
184
+
185
+ - [x] X-30 OAuth callback router wiring (merged into X-25)
186
+ - [x] X-31 Webhook receiver routes (merged into X-24)
187
+ - [x] X-32 Magic-link rate limiting per-email (5/hour default, gateway
188
+ token-bucket reused)
189
+ - [x] X-33 Email template registry with built-in defaults
190
+ (magic_link, password_reset, invoice_failed, welcome) +
191
+ register_template + send_template
192
+ - [x] X-34 Multi-region storage: bucket gains region field (validated
193
+ allowlist us-east-1/us-east-2/.../auto); default 'auto'
194
+ - [x] X-23 (email adapters)
195
+
196
+ ## Status
197
+
198
+ Phase F-1..F-5 + X-11..X-26 + X-28..X-34 complete on
199
+ claude/compare-litellm-loki-Y8Ke1. Remaining: X-27 (dashboard-ui).
200
+
201
+ ## More tasks discovered (next wave)
202
+
203
+ - [x] X-35 `loki promote` CLI shorthand wrapping forge_deploy_promote
204
+ - [x] X-36 Compliance presets (healthcare/fintech/government). forge/compliance.py
205
+ validates storage region+size and payments webhook_secret_ref at create-time.
206
+ - [x] X-37 BMAD workspace integration: detect_from_bmad_workspace reads
207
+ _bmad-output/planning-artifacts/ markdown and feeds the detector.
208
+ - [x] X-38 Rate-limit telemetry endpoint /api/forge/gateway/rate-limit
209
+ - [x] X-39 RLS DSL with Postgres compiler (LL(1) grammar; injection-safe;
210
+ currentUser() -> auth.uid()).
211
+ - [x] X-40 Forge CLI: `loki forge status / backup / restore / promote`
212
+
213
+ ## More tasks discovered (third wave)
214
+
215
+ - [x] X-41 Surface compliance preset in `loki forge status` JSON
216
+ - [x] X-42 Deploy plan emits rls_policies[] with CREATE POLICY DDL per table
217
+ - [x] X-43 oauth_exchange forge function template (Bun runtime,
218
+ base64-emitted by forge_auth_oauth_exchange_template MCP tool)
219
+ - [ ] X-44 Dashboard UI panes for backend tab (X-27 follow-up)
220
+ - [x] X-45 Audit-chain integration: forge_db_migrate reviews now also
221
+ chain into dashboard/audit.py log_event when available
222
+ - [x] X-46 S3-compatible storage gateway (s3/r2/b2/tigris/minio/fs);
223
+ SigV4 presigned URL generator local-only (no upstream call)
224
+ - [x] X-47 OpenAPI 3.1 schema generation matching the SDK shape
225
+ - [x] X-48 Schema migration linter: warns on no-PK / NOT-NULL-without-default
226
+ / forge-internal shadow / invalid index names
227
+
228
+ ## Fourth wave
229
+
230
+ - [x] X-49 forge.yaml at project root + forge.config.apply() reads it
231
+ idempotently. CLI: `loki forge bootstrap [dryrun]`.
232
+ - [x] X-50 forge.audit_verify.verify() walks review records + ledger
233
+ and detects tampered spec_hash. CLI: `loki forge audit`.
234
+ - [x] X-51 `loki forge bootstrap` = the one-shot wizard.
235
+ - [x] X-52 Engine.query_page() cursor pagination over SELECTs
236
+ - [x] X-53 storage.upload_stream() chunked upload + size-cap + dedupe
237
+ - [x] X-54 add_table soft_delete flag auto-injects deleted_at column
238
+
239
+ ## Fifth wave
240
+
241
+ - [x] X-55 forge_db_query_page MCP tool routes to Engine.query_page()
242
+ - [x] X-56 /api/forge/analytics rollup endpoint
243
+ - [x] X-57 Background job queue with retry + dead-letter + not_before_ts;
244
+ ticked by the dashboard background loop
245
+ - [x] X-58 forge.config.validate() catches typo'd keys + missing fields
246
+ - [x] X-59 Email template i18n (compound key <name>@<locale> + fallback)
247
+ - [x] X-60 audit_columns flag auto-injects created_by/updated_by/version
248
+
249
+ ## Sixth wave
250
+
251
+ - [x] X-61 forge.search() cross-service name search
252
+ - [x] X-62 forge.scaffold.init() writes starter forge.yaml
253
+ - [x] X-63 introspect emits fk_graph
254
+ - [x] X-64 Bucket object versioning (download(..., version=N))
255
+ - [x] X-65 rate_limit.set_alert_hook() fires on every throttle
256
+ - [x] X-66 Engine.explain() returns EXPLAIN QUERY PLAN
257
+ - [x] X-67 export_secrets(confirm_destructive=True)
258
+ - [x] X-68 forge.services.functions.warm() pre-warms runtime
259
+ - [x] X-69 forge.healing.propose_from_sqlite + apply_proposal
260
+
261
+ ## Seventh wave (discovered post-X-69)
262
+
263
+ - [x] X-70 forge.yaml secrets list (declarations + rotation policy, never values)
264
+ - [x] X-71 /api/forge/tail endpoint for audit + function logs
265
+ - [x] X-72 forge.services.database.seed() idempotent by content hash
266
+ - [x] X-73 set_lifecycle + garbage_collect_lifecycle
267
+ - [x] X-74 .loki/forge.local.yaml override merging
268
+ - [x] X-75 cron.describe() human-readable schedules
269
+
270
+ ## Eighth wave (discovered post-X-75)
271
+
272
+ - [x] X-76 Engine.explain_analyze() flags unindexed SCAN steps
273
+ - [x] X-77 forge.healing_postgres - live (psycopg) + pg_dump file paths
274
+ - [x] X-78 deploy attaches HMAC signature of source to version manifest
275
+ - [x] X-79 GET /api/forge/metrics Prometheus exposition
276
+ - [x] X-80 _check_tool_throttle helper + LOKI_FORGE_TOOL_RATE_PER_MIN env knob
277
+ - [x] X-81 sign_upload_url + verify_upload_url for client-side PUT uploads
278
+
279
+ ## Status
280
+
281
+ Phase F-1..F-5 + X-1..X-75 complete on claude/compare-litellm-loki-Y8Ke1.
282
+ 139 items shipped, 27 still open, 20 partially done.
283
+
284
+ ## Ninth wave
285
+
286
+ - [x] X-82 `loki forge lint` CLI (structural + per-schedule cron)
287
+ project root yaml + cron.lint on each declared schedule
288
+ - [x] X-83 schedule retry-on-fail with exponential backoff (max_retries)
289
+ error, re-fire at next tick up to max_retries (separate from
290
+ jobs queue retries)
291
+ - [x] X-84 function timeout tracked on manifest (timeout_count + last_timeout_at)
292
+ invoke() bumps a per-function `last_timeout_ms` we surface
293
+ via diagnose
294
+ - [x] X-85 secrets.rotate_value() rotates in place + drops marker
295
+ value in place (re-encrypt, bump version) instead of just
296
+ writing the rotation policy
297
+ - [~] X-86 OpenAPI signed-upload paths deferred (covered by X-81 + storage routes)
298
+ method PUT for signed-upload destinations (X-81 parity)
299
+ - [~] X-87 forge.config schedule+secrets apply path covered by existing tests
300
+ missing the apply path for forge.yaml schedules + secrets
301
+ validation - tighten with a unit test
302
+ - [x] X-88 audit-chain idempotent on duplicate migrate_apply
303
+ entry survives audit.verify even when migrate runs twice with
304
+ the same spec (idempotency must not break the chain)
305
+
306
+ ## Status
307
+
308
+ Phase F-1..F-5 + X-1..X-81 complete on claude/compare-litellm-loki-Y8Ke1.
309
+ PR open: https://github.com/asklokesh/loki-mode/pull/161
310
+
311
+ Full regression: 473 assertions across 31 test suites, 0 failed.
312
+ Most recent push: 5f42e98.