@rfc0/patty 0.0.0-stage → 1.0.2

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.
Files changed (465) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +214 -2
  3. package/dist/adapters/access-tokens.js +7 -0
  4. package/dist/adapters/accounts.js +37 -0
  5. package/dist/adapters/auth.js +11 -0
  6. package/dist/adapters/bills.js +32 -0
  7. package/dist/adapters/budgets.js +29 -0
  8. package/dist/adapters/categories.js +32 -0
  9. package/dist/adapters/client-grants.js +7 -0
  10. package/dist/adapters/credit-cards.js +33 -0
  11. package/dist/adapters/currencies.js +2 -0
  12. package/dist/adapters/currency-rates.js +18 -0
  13. package/dist/adapters/dashboards.js +43 -0
  14. package/dist/adapters/demo.js +13 -0
  15. package/dist/adapters/instance-settings.js +7 -0
  16. package/dist/adapters/invites.js +7 -0
  17. package/dist/adapters/recurring.js +55 -0
  18. package/dist/adapters/sessions.js +7 -0
  19. package/dist/adapters/settings.js +4 -0
  20. package/dist/adapters/setup-codes.js +7 -0
  21. package/dist/adapters/tags.js +9 -0
  22. package/dist/adapters/transactions.js +95 -0
  23. package/dist/adapters/users.js +7 -0
  24. package/dist/common/build-version.js +5 -0
  25. package/dist/common/errors.js +118 -0
  26. package/dist/common/net.js +71 -0
  27. package/dist/common/result.js +7 -0
  28. package/dist/composition/auth.js +106 -0
  29. package/dist/composition/boot.js +27 -0
  30. package/dist/composition/cli.js +86 -0
  31. package/dist/composition/demo/seed.js +92 -0
  32. package/dist/composition/demo/shell.js +107 -0
  33. package/dist/composition/export.js +89 -0
  34. package/dist/composition/http.js +110 -0
  35. package/dist/composition/import.js +55 -0
  36. package/dist/composition/lazy-modules.js +2 -0
  37. package/dist/composition/runtime.js +115 -0
  38. package/dist/composition/sign-in/interpreter.js +154 -0
  39. package/dist/composition/sign-in/server.js +36 -0
  40. package/dist/composition/sign-in/wiring.js +23 -0
  41. package/dist/composition/stdio.js +69 -0
  42. package/dist/config.js +136 -0
  43. package/dist/controllers/account/account.js +88 -0
  44. package/dist/controllers/account/transaction.js +119 -0
  45. package/dist/controllers/account/transfer.js +34 -0
  46. package/dist/controllers/aggregate.js +40 -0
  47. package/dist/controllers/auth/access-tokens.js +61 -0
  48. package/dist/controllers/auth/grants.js +136 -0
  49. package/dist/controllers/auth/key-export.js +20 -0
  50. package/dist/controllers/auth/owner.js +80 -0
  51. package/dist/controllers/auth/password.js +35 -0
  52. package/dist/controllers/auth/session.js +50 -0
  53. package/dist/controllers/auth/step-up.js +8 -0
  54. package/dist/controllers/auth/users.js +183 -0
  55. package/dist/controllers/budgets.js +87 -0
  56. package/dist/controllers/categories.js +67 -0
  57. package/dist/controllers/correlations.js +112 -0
  58. package/dist/controllers/credit-card/bill.js +105 -0
  59. package/dist/controllers/credit-card/credit-card.js +129 -0
  60. package/dist/controllers/credit-card/transaction.js +181 -0
  61. package/dist/controllers/currencies.js +1 -0
  62. package/dist/controllers/currency-rates.js +40 -0
  63. package/dist/controllers/dashboards.js +68 -0
  64. package/dist/controllers/demo/seed.js +31 -0
  65. package/dist/controllers/demo/tour.js +12 -0
  66. package/dist/controllers/deps.js +6 -0
  67. package/dist/controllers/instance.js +6 -0
  68. package/dist/controllers/merchants.js +12 -0
  69. package/dist/controllers/recurring.js +70 -0
  70. package/dist/controllers/resolve.js +37 -0
  71. package/dist/controllers/settings.js +47 -0
  72. package/dist/controllers/status.js +19 -0
  73. package/dist/controllers/summary.js +21 -0
  74. package/dist/controllers/tags.js +19 -0
  75. package/dist/controllers/transaction/bulk.js +6 -0
  76. package/dist/controllers/transaction/core.js +49 -0
  77. package/dist/controllers/transaction/read.js +28 -0
  78. package/dist/diplomat/auth/credentials.js +58 -0
  79. package/dist/diplomat/auth/sign-in-store.js +18 -0
  80. package/dist/diplomat/cli/commands/auth.js +100 -0
  81. package/dist/diplomat/cli/commands/db.js +72 -0
  82. package/dist/diplomat/cli/commands/demo.js +68 -0
  83. package/dist/diplomat/cli/commands/key.js +119 -0
  84. package/dist/diplomat/cli/commands/login.js +151 -0
  85. package/dist/diplomat/cli/commands/setup.js +132 -0
  86. package/dist/diplomat/cli/commands/users.js +123 -0
  87. package/dist/diplomat/cli/commands.js +61 -0
  88. package/dist/diplomat/cli/export-file.js +37 -0
  89. package/dist/diplomat/cli/import-file.js +44 -0
  90. package/dist/diplomat/cli/io.js +61 -0
  91. package/dist/diplomat/cli/key-export-approval.js +37 -0
  92. package/dist/diplomat/cli/messages.js +96 -0
  93. package/dist/diplomat/cli/prompt.js +74 -0
  94. package/dist/diplomat/cli/terminal.js +81 -0
  95. package/dist/diplomat/client-config/clients.js +150 -0
  96. package/dist/diplomat/client-config/merge.js +41 -0
  97. package/dist/diplomat/db/bootstrap.js +98 -0
  98. package/dist/diplomat/db/database-files.js +147 -0
  99. package/dist/diplomat/db/driver.js +167 -0
  100. package/dist/diplomat/db/effects.js +101 -0
  101. package/dist/diplomat/db/engine.js +9 -0
  102. package/dist/diplomat/db/export.js +22 -0
  103. package/dist/diplomat/db/file-lock.js +82 -0
  104. package/dist/diplomat/db/key-lock.js +14 -0
  105. package/dist/diplomat/db/locale-cache.js +23 -0
  106. package/dist/diplomat/db/migration-barrier.js +57 -0
  107. package/dist/diplomat/db/migration-journal.js +18 -0
  108. package/dist/diplomat/db/migration-lock.js +15 -0
  109. package/dist/diplomat/db/migrations.js +11 -0
  110. package/dist/diplomat/db/present.js +17 -0
  111. package/dist/diplomat/db/queries/aggregate-whitelist.js +35 -0
  112. package/dist/diplomat/db/queries/filters.js +59 -0
  113. package/dist/diplomat/db/queries/fts.js +18 -0
  114. package/dist/diplomat/db/queries/scope.js +8 -0
  115. package/dist/diplomat/db/queries/transaction-select.js +26 -0
  116. package/dist/diplomat/db/queries/tx-predicates.js +13 -0
  117. package/dist/diplomat/db/repos/access-tokens.js +27 -0
  118. package/dist/diplomat/db/repos/accounts.js +91 -0
  119. package/dist/diplomat/db/repos/bills.js +93 -0
  120. package/dist/diplomat/db/repos/budgets.js +72 -0
  121. package/dist/diplomat/db/repos/categories.js +53 -0
  122. package/dist/diplomat/db/repos/client-grants.js +67 -0
  123. package/dist/diplomat/db/repos/correlations.js +66 -0
  124. package/dist/diplomat/db/repos/credit-cards.js +67 -0
  125. package/dist/diplomat/db/repos/currencies.js +8 -0
  126. package/dist/diplomat/db/repos/currency-rates.js +40 -0
  127. package/dist/diplomat/db/repos/dashboards.js +123 -0
  128. package/dist/diplomat/db/repos/health.js +12 -0
  129. package/dist/diplomat/db/repos/instance-settings.js +14 -0
  130. package/dist/diplomat/db/repos/instance.js +58 -0
  131. package/dist/diplomat/db/repos/invites.js +43 -0
  132. package/dist/diplomat/db/repos/merchants.js +121 -0
  133. package/dist/diplomat/db/repos/recurring.js +29 -0
  134. package/dist/diplomat/db/repos/sessions.js +19 -0
  135. package/dist/diplomat/db/repos/settings.js +41 -0
  136. package/dist/diplomat/db/repos/setup-codes.js +28 -0
  137. package/dist/diplomat/db/repos/sub-categories.js +67 -0
  138. package/dist/diplomat/db/repos/tags.js +51 -0
  139. package/dist/diplomat/db/repos/transaction-tags.js +57 -0
  140. package/dist/diplomat/db/repos/transactions.js +163 -0
  141. package/dist/diplomat/db/repos/users.js +47 -0
  142. package/dist/diplomat/db/safety-copy.js +87 -0
  143. package/dist/diplomat/db/schema.js +348 -0
  144. package/dist/diplomat/db/seed/categories.js +112 -0
  145. package/dist/diplomat/db/seed/currencies.js +9 -0
  146. package/dist/diplomat/db/seed/demo/br.js +98 -0
  147. package/dist/diplomat/db/seed/demo/co.js +89 -0
  148. package/dist/diplomat/db/seed/demo/index.js +12 -0
  149. package/dist/diplomat/db/seed/demo/mx.js +90 -0
  150. package/dist/diplomat/db/seed/demo/shared.js +39 -0
  151. package/dist/diplomat/db/seed/demo/us.js +90 -0
  152. package/dist/diplomat/db/seed/merchant-rules.js +188 -0
  153. package/dist/diplomat/db/sqlite-errors.js +40 -0
  154. package/dist/diplomat/db/tenancy-integrity.js +45 -0
  155. package/dist/diplomat/db/version-guard.js +16 -0
  156. package/dist/diplomat/http/auth-pages.js +41 -0
  157. package/dist/diplomat/http/auth-paths.js +46 -0
  158. package/dist/diplomat/http/bearer.js +15 -0
  159. package/dist/diplomat/http/connect-pages.js +51 -0
  160. package/dist/diplomat/http/context.js +17 -0
  161. package/dist/diplomat/http/cookies.js +27 -0
  162. package/dist/diplomat/http/form-pages.js +38 -0
  163. package/dist/diplomat/http/hooks/auth.js +106 -0
  164. package/dist/diplomat/http/hooks/demo-marker.js +59 -0
  165. package/dist/diplomat/http/openapi.js +73 -0
  166. package/dist/diplomat/http/principal.js +1 -0
  167. package/dist/diplomat/http/rate-limiter.js +78 -0
  168. package/dist/diplomat/http/remedy.js +26 -0
  169. package/dist/diplomat/http/respond.js +50 -0
  170. package/dist/diplomat/http/routes/account.js +226 -0
  171. package/dist/diplomat/http/routes/aggregate.js +28 -0
  172. package/dist/diplomat/http/routes/auth.js +105 -0
  173. package/dist/diplomat/http/routes/budget.js +34 -0
  174. package/dist/diplomat/http/routes/category.js +109 -0
  175. package/dist/diplomat/http/routes/connect.js +124 -0
  176. package/dist/diplomat/http/routes/credit-card.js +263 -0
  177. package/dist/diplomat/http/routes/currency-rates.js +60 -0
  178. package/dist/diplomat/http/routes/currency.js +16 -0
  179. package/dist/diplomat/http/routes/dashboard.js +93 -0
  180. package/dist/diplomat/http/routes/invite.js +63 -0
  181. package/dist/diplomat/http/routes/recurring.js +65 -0
  182. package/dist/diplomat/http/routes/settings.js +38 -0
  183. package/dist/diplomat/http/routes/summary.js +23 -0
  184. package/dist/diplomat/http/routes/system.js +29 -0
  185. package/dist/diplomat/http/routes/tag.js +51 -0
  186. package/dist/diplomat/http/routes/tokens.js +72 -0
  187. package/dist/diplomat/http/routes/transaction.js +55 -0
  188. package/dist/diplomat/http/routes/transfer.js +35 -0
  189. package/dist/diplomat/http/routes/ui.js +110 -0
  190. package/dist/diplomat/http/routes/users.js +156 -0
  191. package/dist/diplomat/http/routes/well-known.js +26 -0
  192. package/dist/diplomat/http/routes.js +85 -0
  193. package/dist/diplomat/http/session.js +34 -0
  194. package/dist/diplomat/http/token-pages.js +75 -0
  195. package/dist/diplomat/http/ui-files.js +21 -0
  196. package/dist/diplomat/http/user-pages.js +93 -0
  197. package/dist/diplomat/mcp/annotations.js +8 -0
  198. package/dist/diplomat/mcp/auth-info.js +20 -0
  199. package/dist/diplomat/mcp/context.js +14 -0
  200. package/dist/diplomat/mcp/definition.js +3 -0
  201. package/dist/diplomat/mcp/gate.js +15 -0
  202. package/dist/diplomat/mcp/instructions.js +19 -0
  203. package/dist/diplomat/mcp/prompts.js +125 -0
  204. package/dist/diplomat/mcp/register.js +12 -0
  205. package/dist/diplomat/mcp/remedy.js +17 -0
  206. package/dist/diplomat/mcp/resources.js +93 -0
  207. package/dist/diplomat/mcp/respond.js +20 -0
  208. package/dist/diplomat/mcp/route.js +62 -0
  209. package/dist/diplomat/mcp/scopes.js +53 -0
  210. package/dist/diplomat/mcp/server.js +26 -0
  211. package/dist/diplomat/mcp/shared.js +5 -0
  212. package/dist/diplomat/mcp/stdio-session.js +94 -0
  213. package/dist/diplomat/mcp/stdio.js +23 -0
  214. package/dist/diplomat/mcp/tool-name.js +59 -0
  215. package/dist/diplomat/mcp/tools/account.js +218 -0
  216. package/dist/diplomat/mcp/tools/aggregate.js +32 -0
  217. package/dist/diplomat/mcp/tools/budget.js +99 -0
  218. package/dist/diplomat/mcp/tools/category.js +103 -0
  219. package/dist/diplomat/mcp/tools/correlations.js +70 -0
  220. package/dist/diplomat/mcp/tools/credit-card.js +239 -0
  221. package/dist/diplomat/mcp/tools/currency-rates.js +62 -0
  222. package/dist/diplomat/mcp/tools/dashboard.js +75 -0
  223. package/dist/diplomat/mcp/tools/index.js +31 -0
  224. package/dist/diplomat/mcp/tools/recurring.js +62 -0
  225. package/dist/diplomat/mcp/tools/summary.js +30 -0
  226. package/dist/diplomat/mcp/tools/system.js +83 -0
  227. package/dist/diplomat/mcp/tools/tag.js +48 -0
  228. package/dist/diplomat/mcp/tools/transaction.js +53 -0
  229. package/dist/diplomat/mcp/tools/transfer.js +28 -0
  230. package/dist/diplomat/mcp/tour.js +87 -0
  231. package/dist/logic/account.js +79 -0
  232. package/dist/logic/aggregate.js +37 -0
  233. package/dist/logic/auth/bearer.js +35 -0
  234. package/dist/logic/auth/grant.js +126 -0
  235. package/dist/logic/auth/key-export.js +10 -0
  236. package/dist/logic/auth/keychain.js +3 -0
  237. package/dist/logic/auth/message.js +22 -0
  238. package/dist/logic/auth/origin.js +57 -0
  239. package/dist/logic/auth/owner.js +22 -0
  240. package/dist/logic/auth/password.js +3 -0
  241. package/dist/logic/auth/redact.js +25 -0
  242. package/dist/logic/auth/revoke.js +28 -0
  243. package/dist/logic/auth/scope.js +17 -0
  244. package/dist/logic/auth/session.js +30 -0
  245. package/dist/logic/auth/sign-in-flow.js +305 -0
  246. package/dist/logic/auth/time.js +2 -0
  247. package/dist/logic/auth/token.js +74 -0
  248. package/dist/logic/auth/user-plans.js +84 -0
  249. package/dist/logic/auth/users.js +78 -0
  250. package/dist/logic/balance.js +2 -0
  251. package/dist/logic/bill.js +74 -0
  252. package/dist/logic/budget.js +78 -0
  253. package/dist/logic/category.js +37 -0
  254. package/dist/logic/classify.js +21 -0
  255. package/dist/logic/correlations.js +147 -0
  256. package/dist/logic/credit-card.js +2 -0
  257. package/dist/logic/currency-rate.js +69 -0
  258. package/dist/logic/dashboard.js +40 -0
  259. package/dist/logic/demo/database.js +30 -0
  260. package/dist/logic/demo/plan.js +308 -0
  261. package/dist/logic/demo/tour.js +33 -0
  262. package/dist/logic/export-destination.js +12 -0
  263. package/dist/logic/key-import.js +15 -0
  264. package/dist/logic/locale.js +5 -0
  265. package/dist/logic/localize.js +12 -0
  266. package/dist/logic/merchant.js +31 -0
  267. package/dist/logic/migration.js +1 -0
  268. package/dist/logic/money.js +12 -0
  269. package/dist/logic/period.js +45 -0
  270. package/dist/logic/persistence.js +48 -0
  271. package/dist/logic/recurring.js +51 -0
  272. package/dist/logic/resolve.js +44 -0
  273. package/dist/logic/summary.js +29 -0
  274. package/dist/logic/tag.js +13 -0
  275. package/dist/logic/transaction.js +197 -0
  276. package/dist/main.js +42 -0
  277. package/dist/models/account.js +197 -0
  278. package/dist/models/aggregate.js +61 -0
  279. package/dist/models/auth/bearer.js +11 -0
  280. package/dist/models/auth/entity.js +17 -0
  281. package/dist/models/auth/errors.js +42 -0
  282. package/dist/models/auth/grant.js +58 -0
  283. package/dist/models/auth/key-export.js +11 -0
  284. package/dist/models/auth/message.js +50 -0
  285. package/dist/models/auth/mode.js +7 -0
  286. package/dist/models/auth/origin.js +16 -0
  287. package/dist/models/auth/owner.js +36 -0
  288. package/dist/models/auth/password.js +24 -0
  289. package/dist/models/auth/principal.js +26 -0
  290. package/dist/models/auth/redact.js +4 -0
  291. package/dist/models/auth/scope.js +9 -0
  292. package/dist/models/auth/session.js +19 -0
  293. package/dist/models/auth/sign-in-flow.js +102 -0
  294. package/dist/models/auth/sign-in.js +41 -0
  295. package/dist/models/auth/time.js +5 -0
  296. package/dist/models/auth/token.js +50 -0
  297. package/dist/models/auth/users.js +52 -0
  298. package/dist/models/bill.js +55 -0
  299. package/dist/models/budget.js +106 -0
  300. package/dist/models/category.js +52 -0
  301. package/dist/models/client-config.js +18 -0
  302. package/dist/models/correlations.js +215 -0
  303. package/dist/models/credit-card.js +156 -0
  304. package/dist/models/currency-rate.js +83 -0
  305. package/dist/models/dashboard.js +54 -0
  306. package/dist/models/database.js +16 -0
  307. package/dist/models/date.js +8 -0
  308. package/dist/models/demo/core.js +58 -0
  309. package/dist/models/demo/tour.js +41 -0
  310. package/dist/models/encryption-key.js +2 -0
  311. package/dist/models/error.js +13 -0
  312. package/dist/models/export.js +9 -0
  313. package/dist/models/id.js +2 -0
  314. package/dist/models/instance.js +7 -0
  315. package/dist/models/key-import.js +6 -0
  316. package/dist/models/locale.js +25 -0
  317. package/dist/models/merchant.js +12 -0
  318. package/dist/models/money.js +14 -0
  319. package/dist/models/package.js +12 -0
  320. package/dist/models/page.js +56 -0
  321. package/dist/models/persistence.js +1 -0
  322. package/dist/models/prompts.js +5 -0
  323. package/dist/models/recurring.js +54 -0
  324. package/dist/models/remedy.js +17 -0
  325. package/dist/models/resolution.js +1 -0
  326. package/dist/models/startup.js +7 -0
  327. package/dist/models/summary.js +24 -0
  328. package/dist/models/tag.js +14 -0
  329. package/dist/models/tenancy.js +10 -0
  330. package/dist/models/transaction-tag.js +6 -0
  331. package/dist/models/transaction.js +275 -0
  332. package/dist/wire/db/access-tokens.js +1 -0
  333. package/dist/wire/db/accounts.js +7 -0
  334. package/dist/wire/db/aggregate.js +16 -0
  335. package/dist/wire/db/bills.js +14 -0
  336. package/dist/wire/db/budgets.js +33 -0
  337. package/dist/wire/db/categories.js +14 -0
  338. package/dist/wire/db/client-grants.js +1 -0
  339. package/dist/wire/db/correlations.js +49 -0
  340. package/dist/wire/db/credit-cards.js +1 -0
  341. package/dist/wire/db/currencies.js +1 -0
  342. package/dist/wire/db/currency-rates.js +1 -0
  343. package/dist/wire/db/dashboards.js +1 -0
  344. package/dist/wire/db/instance-settings.js +1 -0
  345. package/dist/wire/db/invites.js +1 -0
  346. package/dist/wire/db/merchants.js +18 -0
  347. package/dist/wire/db/recurring.js +19 -0
  348. package/dist/wire/db/sessions.js +1 -0
  349. package/dist/wire/db/settings.js +1 -0
  350. package/dist/wire/db/setup-codes.js +1 -0
  351. package/dist/wire/db/tags.js +1 -0
  352. package/dist/wire/db/tenancy.js +1 -0
  353. package/dist/wire/db/transactions.js +89 -0
  354. package/dist/wire/db/users.js +1 -0
  355. package/dist/wire/in/accounts.js +26 -0
  356. package/dist/wire/in/aggregate.js +10 -0
  357. package/dist/wire/in/auth.js +107 -0
  358. package/dist/wire/in/bills.js +11 -0
  359. package/dist/wire/in/budgets.js +11 -0
  360. package/dist/wire/in/categories.js +9 -0
  361. package/dist/wire/in/cli.js +106 -0
  362. package/dist/wire/in/coerce.js +6 -0
  363. package/dist/wire/in/common.js +17 -0
  364. package/dist/wire/in/credit-cards.js +16 -0
  365. package/dist/wire/in/currency-rates.js +8 -0
  366. package/dist/wire/in/period.js +7 -0
  367. package/dist/wire/in/recurring.js +6 -0
  368. package/dist/wire/in/settings.js +5 -0
  369. package/dist/wire/in/summary.js +5 -0
  370. package/dist/wire/in/tags.js +2 -0
  371. package/dist/wire/in/transactions.js +31 -0
  372. package/dist/wire/out/bills.js +9 -0
  373. package/dist/wire/out/budgets.js +10 -0
  374. package/dist/wire/out/client-config.js +2 -0
  375. package/dist/wire/out/common.js +4 -0
  376. package/dist/wire/out/credit-cards.js +15 -0
  377. package/dist/wire/out/currency-rates.js +11 -0
  378. package/dist/wire/out/errors.js +58 -0
  379. package/dist/wire/out/recurring.js +6 -0
  380. package/dist/wire/out/status.js +10 -0
  381. package/dist/wire/out/summary.js +9 -0
  382. package/dist/wire/out/transactions.js +52 -0
  383. package/drizzle/0000_futuristic_umar.sql +124 -0
  384. package/drizzle/0001_fts5_search.sql +23 -0
  385. package/drizzle/0002_rename_graph_to_history.sql +7 -0
  386. package/drizzle/0003_lyrical_hairball.sql +2 -0
  387. package/drizzle/0004_misty_ikaris.sql +7 -0
  388. package/drizzle/0005_credit-liability-accounts.sql +14 -0
  389. package/drizzle/0006_smart_aqueduct.sql +1 -0
  390. package/drizzle/0007_add_dashboards.sql +5 -0
  391. package/drizzle/0008_yummy_madripoor.sql +1 -0
  392. package/drizzle/0009_version_groundwork.sql +9 -0
  393. package/drizzle/0010_category_merchant_association_cascade.sql +16 -0
  394. package/drizzle/0011_dashboard_id_normalization.sql +16 -0
  395. package/drizzle/0012_hot_the_spike.sql +12 -0
  396. package/drizzle/0013_recurring_rules_merchant.sql +1 -0
  397. package/drizzle/0014_dashboard_source_discriminator.sql +17 -0
  398. package/drizzle/0015_currencies_decimals.sql +1 -0
  399. package/drizzle/0016_unusual_zaran.sql +13 -0
  400. package/drizzle/0017_premium_blur.sql +1 -0
  401. package/drizzle/0018_auth_identity.sql +39 -0
  402. package/drizzle/0019_access_tokens.sql +16 -0
  403. package/drizzle/0020_stdio_sign_in.sql +27 -0
  404. package/drizzle/0021_tenancy_data.sql +289 -0
  405. package/drizzle/0022_user_management.sql +17 -0
  406. package/drizzle/0023_instance_settings_row.sql +2 -0
  407. package/drizzle/0024_credentials_changed_at.sql +2 -0
  408. package/drizzle/0025_instance_kind.sql +2 -0
  409. package/drizzle/0026_demo_seeded_at.sql +2 -0
  410. package/drizzle/0027_demo_country.sql +2 -0
  411. package/drizzle/0028_reset_sign_ins.sql +2 -0
  412. package/drizzle/meta/0000_snapshot.json +894 -0
  413. package/drizzle/meta/0003_snapshot.json +910 -0
  414. package/drizzle/meta/0004_snapshot.json +951 -0
  415. package/drizzle/meta/0005_snapshot.json +991 -0
  416. package/drizzle/meta/0006_snapshot.json +998 -0
  417. package/drizzle/meta/0007_snapshot.json +1029 -0
  418. package/drizzle/meta/0008_snapshot.json +1049 -0
  419. package/drizzle/meta/0009_snapshot.json +1121 -0
  420. package/drizzle/meta/0010_snapshot.json +1121 -0
  421. package/drizzle/meta/0011_snapshot.json +1136 -0
  422. package/drizzle/meta/0012_snapshot.json +1227 -0
  423. package/drizzle/meta/0013_snapshot.json +1247 -0
  424. package/drizzle/meta/0014_snapshot.json +1267 -0
  425. package/drizzle/meta/0015_snapshot.json +1275 -0
  426. package/drizzle/meta/0016_snapshot.json +1371 -0
  427. package/drizzle/meta/0017_snapshot.json +1392 -0
  428. package/drizzle/meta/0018_snapshot.json +1603 -0
  429. package/drizzle/meta/0019_snapshot.json +1713 -0
  430. package/drizzle/meta/0020_snapshot.json +1904 -0
  431. package/drizzle/meta/0021_snapshot.json +2186 -0
  432. package/drizzle/meta/0022_snapshot.json +2311 -0
  433. package/drizzle/meta/0023_snapshot.json +2311 -0
  434. package/drizzle/meta/0024_snapshot.json +2318 -0
  435. package/drizzle/meta/0025_snapshot.json +2326 -0
  436. package/drizzle/meta/0026_snapshot.json +2333 -0
  437. package/drizzle/meta/0027_snapshot.json +2340 -0
  438. package/drizzle/meta/0028_snapshot.json +2340 -0
  439. package/drizzle/meta/_journal.json +209 -0
  440. package/package.json +106 -4
  441. package/skills/dashboard-building/SKILL.md +201 -0
  442. package/skills/patty-tour/SKILL.md +34 -0
  443. package/ui/app.css +758 -0
  444. package/ui/app.js +543 -0
  445. package/ui/connect-result.html +16 -0
  446. package/ui/connect.html +53 -0
  447. package/ui/dashboards/accounts.html +3189 -0
  448. package/ui/dashboards/budget.html +1734 -0
  449. package/ui/dashboards/cards.html +4032 -0
  450. package/ui/dashboards/categories.html +4694 -0
  451. package/ui/dashboards/comparative.html +2475 -0
  452. package/ui/dashboards/dashboards.html +839 -0
  453. package/ui/dashboards/overview.html +2405 -0
  454. package/ui/dashboards/pending.html +2973 -0
  455. package/ui/dashboards/projections.html +2528 -0
  456. package/ui/dashboards/tags.html +1365 -0
  457. package/ui/invite.html +44 -0
  458. package/ui/login.html +26 -0
  459. package/ui/money.js +175 -0
  460. package/ui/setup.html +29 -0
  461. package/ui/shell.html +96 -0
  462. package/ui/token-created.html +24 -0
  463. package/ui/tokens.html +58 -0
  464. package/ui/user-invited.html +27 -0
  465. package/ui/users.html +60 -0
package/ui/app.css ADDED
@@ -0,0 +1,758 @@
1
+ /* Premium sidebar & layout overrides */
2
+ :root {
3
+ --bg-color: #0c0e17;
4
+ --panel-bg: rgba(20, 24, 43, 0.6);
5
+ --panel-border: rgba(255, 255, 255, 0.06);
6
+ --accent-primary: #8b5cf6;
7
+ --accent-primary-glow: rgba(139, 92, 246, 0.35);
8
+ --income-color: #10b981;
9
+ --income-glow: rgba(16, 185, 129, 0.25);
10
+ --expense-color: #f43f5e;
11
+ --expense-glow: rgba(244, 63, 94, 0.25);
12
+ --warning-color: #f59e0b;
13
+ --text-main: #f3f4f6;
14
+ --text-muted: #9ca3af;
15
+ --text-dark: #6b7280;
16
+ --font-family: 'Plus Jakarta Sans', sans-serif;
17
+ --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
18
+ --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
19
+
20
+ /* Fallbacks for older routes */
21
+ --bg: #0c0e17;
22
+ --surface: rgba(20, 24, 43, 0.6);
23
+ --surface-alt: rgba(255, 255, 255, 0.03);
24
+ --border: rgba(255, 255, 255, 0.06);
25
+ --text: #f3f4f6;
26
+ --muted: #9ca3af;
27
+ --accent: #8b5cf6;
28
+ --positive: #10b981;
29
+ --negative: #f43f5e;
30
+ --radius: 16px;
31
+ }
32
+
33
+ body {
34
+ background-color: var(--bg-color);
35
+ background-image:
36
+ radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
37
+ radial-gradient(circle at 90% 80%, rgba(244, 63, 94, 0.06) 0%, transparent 40%);
38
+ background-attachment: fixed;
39
+ color: var(--text-main);
40
+ font-family: var(--font-family);
41
+ min-height: 100vh;
42
+ display: flex;
43
+ margin: 0;
44
+ }
45
+
46
+ /* Scrollbar customization */
47
+ ::-webkit-scrollbar {
48
+ width: 8px;
49
+ height: 8px;
50
+ }
51
+ ::-webkit-scrollbar-track {
52
+ background: rgba(255, 255, 255, 0.01);
53
+ }
54
+ ::-webkit-scrollbar-thumb {
55
+ background: rgba(255, 255, 255, 0.08);
56
+ border-radius: 4px;
57
+ }
58
+ ::-webkit-scrollbar-thumb:hover {
59
+ background: rgba(139, 92, 246, 0.3);
60
+ }
61
+
62
+ /* Sidebar structure styling */
63
+ .sidebar {
64
+ position: fixed;
65
+ top: 0; left: 0; bottom: 0;
66
+ width: 70px;
67
+ background: #090a12;
68
+ border-right: 1px solid var(--panel-border);
69
+ padding: 2rem 0.5rem;
70
+ display: flex;
71
+ flex-direction: column;
72
+ align-items: center;
73
+ justify-content: space-between; /* Space out brand/menu from the ellipsis bottom container */
74
+ z-index: 100;
75
+ }
76
+
77
+ .sidebar-brand {
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ font-size: 1.4rem;
82
+ font-weight: 800;
83
+ color: #fff;
84
+ margin-bottom: 1.5rem;
85
+ }
86
+
87
+ .sidebar-menu {
88
+ display: flex;
89
+ flex-direction: column;
90
+ gap: 0.75rem;
91
+ width: 100%;
92
+ align-items: center;
93
+ }
94
+
95
+ .sidebar-menu a {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ width: 44px;
100
+ height: 44px;
101
+ color: var(--text-muted);
102
+ text-decoration: none;
103
+ font-size: 1.2rem;
104
+ border-radius: 12px;
105
+ transition: var(--transition-smooth);
106
+ border: 1px solid transparent;
107
+ }
108
+
109
+ .sidebar-menu a:hover {
110
+ color: #fff;
111
+ background: rgba(255, 255, 255, 0.03);
112
+ border-color: rgba(255, 255, 255, 0.05);
113
+ }
114
+
115
+ .sidebar-menu a.active {
116
+ color: #fff;
117
+ background: var(--accent-primary);
118
+ box-shadow: 0 0 15px var(--accent-primary-glow);
119
+ border-color: rgba(255, 255, 255, 0.1);
120
+ }
121
+
122
+ .sidebar-divider {
123
+ width: 70%;
124
+ border: 0;
125
+ border-top: 1px solid var(--panel-border);
126
+ margin: 0.5rem 0;
127
+ }
128
+
129
+ main#content {
130
+ flex: 1;
131
+ margin-left: 70px;
132
+ padding: 2rem;
133
+ max-width: 1400px;
134
+ margin-right: auto;
135
+ min-height: 100vh;
136
+ display: flex;
137
+ flex-direction: column;
138
+ gap: 1.5rem;
139
+ width: calc(100% - 70px);
140
+ }
141
+
142
+ .dashboard-container {
143
+ max-width: 100% !important;
144
+ margin: 0 !important;
145
+ }
146
+
147
+ /* Sidebar More Button & Dropdown Menu */
148
+ .sidebar-more-container {
149
+ position: relative;
150
+ width: 100%;
151
+ display: flex;
152
+ justify-content: center;
153
+ margin-top: auto;
154
+ }
155
+
156
+ .sidebar-more-btn {
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ width: 44px;
161
+ height: 44px;
162
+ background: transparent;
163
+ border: 1px solid transparent;
164
+ border-radius: 12px;
165
+ color: var(--text-muted);
166
+ font-size: 1.2rem;
167
+ cursor: pointer;
168
+ transition: var(--transition-smooth);
169
+ }
170
+
171
+ .sidebar-more-btn:hover {
172
+ color: #fff;
173
+ background: rgba(255, 255, 255, 0.03);
174
+ }
175
+
176
+ .sidebar-more-container.open .sidebar-more-btn {
177
+ color: var(--accent-primary);
178
+ background: rgba(139, 92, 246, 0.1);
179
+ border-color: rgba(139, 92, 246, 0.2);
180
+ }
181
+
182
+ .sidebar-more-dropdown {
183
+ position: absolute;
184
+ bottom: 0px;
185
+ left: 60px;
186
+ background: #0f111a;
187
+ border: 1px solid var(--panel-border);
188
+ border-radius: 16px;
189
+ padding: 0.5rem;
190
+ display: none;
191
+ flex-direction: column;
192
+ gap: 0.25rem;
193
+ box-shadow: var(--card-shadow);
194
+ min-width: 180px;
195
+ z-index: 1000;
196
+ }
197
+
198
+ .sidebar-more-container.open .sidebar-more-dropdown {
199
+ display: flex;
200
+ }
201
+
202
+ .sidebar-more-dropdown a {
203
+ display: flex;
204
+ align-items: center;
205
+ gap: 0.75rem;
206
+ padding: 0.6rem 1rem;
207
+ color: var(--text-muted);
208
+ text-decoration: none;
209
+ font-size: 0.9rem;
210
+ border-radius: 10px;
211
+ transition: var(--transition-smooth);
212
+ }
213
+
214
+ .sidebar-more-dropdown a:hover {
215
+ color: #fff;
216
+ background: rgba(255, 255, 255, 0.03);
217
+ }
218
+
219
+ .sidebar-more-dropdown a.active {
220
+ color: #fff;
221
+ background: var(--accent-primary);
222
+ }
223
+
224
+
225
+ /* --- CONSOLIDATED HEADER LAYOUT --- */
226
+ header, .dashboard-header {
227
+ display: flex;
228
+ justify-content: space-between;
229
+ align-items: center;
230
+ flex-wrap: wrap;
231
+ gap: 1.5rem;
232
+ padding-bottom: 0.60rem;
233
+ border-bottom: 1px solid var(--panel-border);
234
+ position: relative !important;
235
+ z-index: 110 !important;
236
+ }
237
+
238
+ .header-title-area {
239
+ display: flex;
240
+ flex-direction: column;
241
+ }
242
+
243
+ .header-title-area h1 {
244
+ font-size: 2rem;
245
+ font-weight: 700;
246
+ background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
247
+ -webkit-background-clip: text;
248
+ -webkit-text-fill-color: transparent;
249
+ display: flex;
250
+ align-items: center;
251
+ gap: 0.75rem;
252
+ }
253
+
254
+ .header-title-area h1 i {
255
+ color: var(--accent-primary);
256
+ font-size: 1.8rem;
257
+ }
258
+
259
+ .header-title-area p {
260
+ color: var(--text-muted);
261
+ font-size: 0.95rem;
262
+ margin-top: 0.25rem;
263
+ }
264
+
265
+ .header-actions {
266
+ display: flex;
267
+ align-items: center;
268
+ gap: 0.75rem;
269
+ }
270
+
271
+ /* ============================================================
272
+ Shared dashboard-fragment components (ADR-027, issue #164)
273
+ ============================================================
274
+ Every property below is either identical across every fragment that uses
275
+ the class, or present in every one of them with a majority value — the
276
+ outliers keep a small local override for just that property in their own
277
+ fragment <style> block, which (injected into #content after this
278
+ stylesheet, per DOM order) wins the cascade for anything it declares. A
279
+ property that isn't declared by every fragment using a class is never
280
+ centralized here, even when most of them agree on it: a fragment that
281
+ never asked for that property would otherwise silently inherit it. See
282
+ docs/ui.md's "Shared component classes" section. */
283
+
284
+ .spinner {
285
+ width: 40px;
286
+ height: 40px;
287
+ border: 3px solid rgba(255, 255, 255, 0.1);
288
+ border-radius: 50%;
289
+ border-top-color: var(--accent-primary);
290
+ animation: spin 1s ease-in-out infinite;
291
+ }
292
+
293
+ @keyframes spin {
294
+ to { transform: rotate(360deg); }
295
+ }
296
+
297
+ .loading-overlay {
298
+ position: absolute;
299
+ top: 0;
300
+ left: 0;
301
+ align-items: center;
302
+ justify-content: center;
303
+ display: flex;
304
+ background: rgba(12, 14, 23, 0.8);
305
+ backdrop-filter: blur(4px);
306
+ z-index: 10;
307
+ }
308
+
309
+ .toast-container {
310
+ display: flex;
311
+ flex-direction: column;
312
+ position: fixed;
313
+ bottom: 2rem;
314
+ right: 2rem;
315
+ gap: 0.75rem;
316
+ z-index: 2000;
317
+ }
318
+
319
+ .toast {
320
+ align-items: center;
321
+ border: 1px solid var(--panel-border);
322
+ border-radius: 12px;
323
+ display: flex;
324
+ gap: 0.75rem;
325
+ background: rgba(20, 24, 43, 0.95);
326
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
327
+ color: #fff;
328
+ padding: 1rem 1.5rem;
329
+ }
330
+
331
+ .modal-overlay {
332
+ align-items: center;
333
+ backdrop-filter: blur(8px);
334
+ justify-content: center;
335
+ left: 0;
336
+ opacity: 0;
337
+ position: fixed;
338
+ top: 0;
339
+ background: rgba(0, 0, 0, 0.75);
340
+ display: none;
341
+ transition: opacity 0.3s ease;
342
+ z-index: 1000;
343
+ }
344
+
345
+ .modal-overlay.open {
346
+ opacity: 1;
347
+ }
348
+
349
+ .modal-box {
350
+ background: #111322;
351
+ border: 1px solid var(--panel-border);
352
+ border-radius: 20px;
353
+ box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
354
+ padding: 2rem;
355
+ position: relative;
356
+ transform: translateY(-30px);
357
+ transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
358
+ width: 100%;
359
+ max-width: 500px;
360
+ }
361
+
362
+ .modal-overlay.open .modal-box {
363
+ transform: translateY(0);
364
+ }
365
+
366
+ .modal-title {
367
+ align-items: center;
368
+ display: flex;
369
+ font-weight: 700;
370
+ gap: 0.5rem;
371
+ font-size: 1.3rem;
372
+ }
373
+
374
+ .modal-title i {
375
+ color: var(--accent-primary);
376
+ }
377
+
378
+ .panel {
379
+ background: var(--panel-bg);
380
+ border: 1px solid var(--panel-border);
381
+ box-shadow: var(--card-shadow);
382
+ backdrop-filter: blur(16px);
383
+ border-radius: 24px;
384
+ }
385
+
386
+ .form-group label {
387
+ color: var(--text-muted);
388
+ font-size: 0.8rem;
389
+ font-weight: 600;
390
+ letter-spacing: 0.05em;
391
+ text-transform: uppercase;
392
+ }
393
+
394
+ .form-control {
395
+ border: 1px solid var(--panel-border);
396
+ transition: var(--transition-smooth);
397
+ width: 100%;
398
+ background: rgba(255, 255, 255, 0.04);
399
+ border-radius: 8px;
400
+ color: var(--text-main);
401
+ font-family: var(--font-family);
402
+ padding: 0.75rem;
403
+ }
404
+
405
+ .form-control:focus {
406
+ border-color: var(--accent-primary);
407
+ box-shadow: 0 0 0 2px var(--accent-primary-glow);
408
+ }
409
+
410
+ .kpi-card {
411
+ background: var(--panel-bg);
412
+ border: 1px solid var(--panel-border);
413
+ border-radius: 20px;
414
+ box-shadow: var(--card-shadow);
415
+ display: flex;
416
+ backdrop-filter: blur(16px);
417
+ padding: 1.5rem;
418
+ }
419
+
420
+ .kpi-card::before {
421
+ content: "";
422
+ height: 100%;
423
+ left: 0;
424
+ position: absolute;
425
+ top: 0;
426
+ width: 4px;
427
+ }
428
+
429
+ /* display is left out of this base even though every consuming fragment declares it: fragments
430
+ disagree between `flex` and `inline-flex`, and every fragment below declares its own value
431
+ explicitly rather than relying on 3 of the 6 matching the base default — one line of harmless
432
+ redundancy beats a property whose effective value depends on reading the base rule to know
433
+ whether a given fragment needed to override it. */
434
+ .btn-action-primary {
435
+ align-items: center;
436
+ background: var(--accent-primary);
437
+ border: none;
438
+ color: #fff;
439
+ cursor: pointer;
440
+ transition: var(--transition-smooth);
441
+ border-radius: 10px;
442
+ font-weight: 600;
443
+ gap: 0.5rem;
444
+ padding: 0.6rem 1.25rem;
445
+ }
446
+
447
+ /* Consolidated net worth badge (ADR-026 Phase 3) — accounts.html and overview.html declare
448
+ identical values for every property below; overview.html's own "n.a." fallback modifier
449
+ (.nw-total.na) is a property accounts.html never declared, so it stays local there. */
450
+ .net-worth-summary {
451
+ background: rgba(255, 255, 255, 0.03);
452
+ border: 1px solid var(--panel-border);
453
+ border-radius: 12px;
454
+ padding: 0.75rem 1rem;
455
+ }
456
+ .net-worth-summary .nw-label {
457
+ font-size: 0.7rem;
458
+ font-weight: 600;
459
+ color: var(--text-muted);
460
+ text-transform: uppercase;
461
+ letter-spacing: 0.05em;
462
+ }
463
+ .net-worth-summary .nw-total {
464
+ font-size: 1.15rem;
465
+ font-weight: 800;
466
+ color: #fff;
467
+ }
468
+ .net-worth-summary .nw-excluded {
469
+ font-size: 0.65rem;
470
+ color: var(--warning-color);
471
+ margin-top: 0.15rem;
472
+ }
473
+
474
+ /* --- Sign-in pages (ADR-033): /ui/login and /ui/setup share the shell's palette, no framework --- */
475
+ .auth-card {
476
+ margin: auto;
477
+ box-sizing: border-box; /* the 2rem padding and border count inside the width, or a 320px screen clips it */
478
+ width: min(26rem, calc(100vw - 2rem));
479
+ padding: 2rem;
480
+ background: var(--panel-bg);
481
+ border: 1px solid var(--panel-border);
482
+ border-radius: var(--radius);
483
+ box-shadow: var(--card-shadow);
484
+ }
485
+
486
+ .auth-card h1 {
487
+ margin: 0 0 0.25rem;
488
+ font-size: 1.5rem;
489
+ }
490
+
491
+ .auth-lede {
492
+ margin: 0 0 1.5rem;
493
+ color: var(--text-muted);
494
+ font-size: 0.9rem;
495
+ }
496
+
497
+ .auth-form {
498
+ display: flex;
499
+ flex-direction: column;
500
+ gap: 1rem;
501
+ }
502
+
503
+ .auth-form label {
504
+ display: flex;
505
+ flex-direction: column;
506
+ gap: 0.35rem;
507
+ color: var(--text-muted);
508
+ font-size: 0.85rem;
509
+ }
510
+
511
+ .auth-form input {
512
+ padding: 0.7rem 0.9rem;
513
+ color: var(--text-main);
514
+ font: inherit;
515
+ background: rgba(255, 255, 255, 0.04);
516
+ border: 1px solid var(--panel-border);
517
+ border-radius: 10px;
518
+ }
519
+
520
+ .auth-form input:focus {
521
+ outline: 2px solid var(--accent-primary);
522
+ outline-offset: 1px;
523
+ }
524
+
525
+ .auth-form button {
526
+ padding: 0.75rem 1rem;
527
+ color: #fff;
528
+ font: inherit;
529
+ font-weight: 600;
530
+ background: var(--accent-primary);
531
+ border: 0;
532
+ border-radius: 10px;
533
+ cursor: pointer;
534
+ }
535
+
536
+ .auth-error {
537
+ margin: 0 0 1rem;
538
+ padding: 0.7rem 0.9rem;
539
+ color: var(--expense-color);
540
+ font-size: 0.9rem;
541
+ background: var(--expense-glow);
542
+ border-radius: 10px;
543
+ }
544
+
545
+ .auth-hint {
546
+ color: var(--text-muted); /* --text-dark is 3.8:1 on the card; this states the password rule, so meet AA 4.5:1 */
547
+ font-size: 0.8rem;
548
+ }
549
+
550
+ .sidebar-logout {
551
+ margin: 0;
552
+ }
553
+
554
+ /* --- Access tokens (ADR-033): /ui/access/tokens reuses the sign-in card, widened for its table --- */
555
+ .tokens-card {
556
+ width: min(60rem, calc(100vw - 2rem));
557
+ margin-block: 2rem;
558
+ }
559
+
560
+ .tokens-card h2 {
561
+ margin: 2rem 0 1rem;
562
+ font-size: 1.1rem;
563
+ }
564
+
565
+ .tokens-card a {
566
+ color: var(--accent-primary);
567
+ }
568
+
569
+ .tokens-card code {
570
+ font-size: 0.85em;
571
+ }
572
+
573
+ .tokens-scroll {
574
+ overflow-x: auto;
575
+ }
576
+
577
+ .tokens-table {
578
+ width: 100%;
579
+ border-collapse: collapse;
580
+ font-size: 0.85rem;
581
+ }
582
+
583
+ .tokens-table th,
584
+ .tokens-table td {
585
+ padding: 0.5rem 0.6rem;
586
+ text-align: left;
587
+ vertical-align: middle;
588
+ border-bottom: 1px solid var(--panel-border);
589
+ }
590
+
591
+ .tokens-table th {
592
+ color: var(--text-muted);
593
+ font-weight: 600;
594
+ }
595
+
596
+ .tokens-table form {
597
+ margin: 0;
598
+ }
599
+
600
+ .token-status-active {
601
+ color: var(--income-color);
602
+ }
603
+
604
+ .token-status-expired,
605
+ .token-status-revoked {
606
+ color: var(--text-muted);
607
+ }
608
+
609
+ .token-revoke {
610
+ padding: 0.3rem 0.7rem;
611
+ color: var(--expense-color);
612
+ font: inherit;
613
+ background: transparent;
614
+ border: 1px solid var(--expense-color);
615
+ border-radius: 8px;
616
+ cursor: pointer;
617
+ }
618
+
619
+ .auth-form select {
620
+ padding: 0.7rem 0.9rem;
621
+ color: var(--text-main);
622
+ font: inherit;
623
+ background: rgba(255, 255, 255, 0.04);
624
+ border: 1px solid var(--panel-border);
625
+ border-radius: 10px;
626
+ }
627
+
628
+ .auth-form select option {
629
+ color: #111;
630
+ }
631
+
632
+ .auth-warning {
633
+ margin: 0 0 1rem;
634
+ padding: 0.7rem 0.9rem;
635
+ color: var(--warning-color);
636
+ font-size: 0.9rem;
637
+ background: rgba(245, 158, 11, 0.12);
638
+ border-radius: 10px;
639
+ }
640
+
641
+ .token-secret {
642
+ margin: 0 0 1rem;
643
+ padding: 0.8rem 0.9rem;
644
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
645
+ font-size: 0.9rem;
646
+ overflow-wrap: anywhere; /* 47 unbreakable characters must not overflow a phone-width card */
647
+ user-select: all; /* a triple-click selects the whole token */
648
+ background: rgba(255, 255, 255, 0.04);
649
+ border: 1px dashed var(--accent-primary);
650
+ border-radius: 10px;
651
+ }
652
+
653
+ .sidebar-tokens {
654
+ color: var(--text-muted);
655
+ }
656
+
657
+ /* --- Connect a client (ADR-034): /ui/connect, the consent page for a stdio / `patty login` sign-in --- */
658
+ .connect-facts {
659
+ display: grid;
660
+ grid-template-columns: max-content 1fr;
661
+ gap: 0.4rem 1rem;
662
+ margin: 0 0 1.25rem;
663
+ font-size: 0.9rem;
664
+ }
665
+
666
+ .connect-facts dt {
667
+ color: var(--text-muted);
668
+ }
669
+
670
+ .connect-facts dd {
671
+ margin: 0;
672
+ overflow-wrap: anywhere; /* a client may report a long name */
673
+ }
674
+
675
+ .connect-note {
676
+ color: var(--text-muted);
677
+ font-size: 0.8rem;
678
+ }
679
+
680
+ .connect-code {
681
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
682
+ font-size: 1.15rem;
683
+ letter-spacing: 0.08em;
684
+ }
685
+
686
+ .connect-form fieldset {
687
+ display: flex;
688
+ flex-direction: column;
689
+ gap: 0.5rem;
690
+ margin: 0;
691
+ padding: 0.8rem 0.9rem;
692
+ border: 1px solid var(--panel-border);
693
+ border-radius: 10px;
694
+ }
695
+
696
+ .connect-form legend {
697
+ padding: 0 0.3rem;
698
+ color: var(--text-muted);
699
+ font-size: 0.85rem;
700
+ }
701
+
702
+ .connect-form fieldset label {
703
+ flex-direction: row;
704
+ align-items: center;
705
+ gap: 0.6rem;
706
+ color: var(--text-main);
707
+ }
708
+
709
+ .connect-form fieldset input {
710
+ padding: 0;
711
+ }
712
+
713
+ .auth-form button.connect-deny {
714
+ color: var(--text-main);
715
+ background: transparent;
716
+ border: 1px solid var(--panel-border);
717
+ }
718
+
719
+ /* --- User management: /ui/access/users; each row's actions are small forms --- */
720
+ .user-actions { min-width: 21rem; }
721
+ .user-actions form { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.4rem; }
722
+ .user-actions input,
723
+ .user-actions select {
724
+ padding: 0.3rem 0.5rem;
725
+ color: var(--text-main);
726
+ font: inherit;
727
+ background: rgba(255, 255, 255, 0.04);
728
+ border: 1px solid var(--panel-border);
729
+ border-radius: 8px;
730
+ }
731
+ .user-actions select option { color: #111; }
732
+ .user-status-active { color: var(--income-color); }
733
+ .user-status-invited { color: var(--warning-color); }
734
+ .user-status-disabled { color: var(--text-muted); }
735
+
736
+ /* Demo marker (Feature Design 022 §5): injected on every page when the database is a demo. */
737
+ .demo-banner {
738
+ position: fixed;
739
+ top: 0; left: 0; right: 0;
740
+ /* Above every modal overlay in the dashboards (up to 10000), so entering data never hides the warning. */
741
+ z-index: 2147483647;
742
+ padding: 0.5rem 1rem;
743
+ text-align: center;
744
+ font-size: 0.85rem;
745
+ font-weight: 600;
746
+ color: #1a1204;
747
+ background: var(--warning-color);
748
+ }
749
+ .demo-banner a {
750
+ color: inherit;
751
+ text-decoration: underline;
752
+ }
753
+ body[data-instance-kind="demo"] {
754
+ padding-top: 2.25rem;
755
+ }
756
+ body[data-instance-kind="demo"] .sidebar {
757
+ top: 2.25rem;
758
+ }