mlai-code 0.3.2 → 0.3.3

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 (53) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/cli.mjs +27 -7
  4. package/src/engine.mjs +1 -1
  5. package/src/home.mjs +1 -1
  6. package/src/parity.mjs +3 -1
  7. package/src/render.mjs +3 -1
  8. package/src/runtime.mjs +21 -1
  9. package/src/sandbox.mjs +19 -3
  10. package/src/session.mjs +22 -2
  11. package/src/shared-data.mjs +1 -1
  12. package/src/tui/app.mjs +22 -4
  13. package/src/tui/chat.mjs +8 -6
  14. package/src/tui/cmd-core.mjs +2 -2
  15. package/src/tui/cmd-extensibility.mjs +8 -2
  16. package/src/tui/commands.mjs +2 -1
  17. package/src/tui/statusline.mjs +2 -1
  18. package/src/wakeups.mjs +2 -2
  19. package/vendor/client-sdk/index.cjs +3 -3
  20. package/vendor/cloud-cli/mlai.mjs +169 -25
  21. package/worker/build_planner.py +75 -7
  22. package/worker/cloud_pty.py +91 -2
  23. package/worker/command_safety.py +25 -1
  24. package/worker/compaction_brief.py +186 -0
  25. package/worker/context_manager.py +6 -0
  26. package/worker/conversation.py +58 -1
  27. package/worker/deck_render.js +11 -0
  28. package/worker/deck_tools.py +825 -0
  29. package/worker/git_sync.py +38 -13
  30. package/worker/goals.py +4 -0
  31. package/worker/image_generation.py +102 -23
  32. package/worker/kimi_bridge.py +340 -32
  33. package/worker/kimi_gates.py +49 -0
  34. package/worker/kimi_hook.py +65 -12
  35. package/worker/media_tools.py +179 -0
  36. package/worker/memory.py +2 -2
  37. package/worker/mlai_hooks.py +93 -3
  38. package/worker/mlai_mcp.py +23 -5
  39. package/worker/model_stream.py +21 -7
  40. package/worker/offline_guard.py +1 -1
  41. package/worker/preview.py +47 -4
  42. package/worker/product_facts.py +18 -0
  43. package/worker/project_context.py +33 -7
  44. package/worker/reply_language.py +92 -10
  45. package/worker/roles.json +199 -37
  46. package/worker/roles.py +243 -8
  47. package/worker/runner.py +241 -36
  48. package/worker/site_check.py +279 -0
  49. package/worker/skill_library.py +15 -3
  50. package/worker/skill_pack.py +170 -16
  51. package/worker/tool_catalog.py +3 -2
  52. package/worker/verification.py +43 -11
  53. package/worker/wakeups.py +56 -4
package/worker/roles.json CHANGED
@@ -159,7 +159,7 @@
159
159
  "Composition: every screen has one focal point and a clear reading order. Use a consistent grid, generous whitespace and grouped controls, and vary section rhythm on long pages (full-bleed, split, grid, quote, stat band) so it never repeats one card layout.",
160
160
  "Typography does the work: confident headings with tight tracking, body lines of 60 to 75 characters at 1.5 line height, tabular numerals for data, no orphaned words in headings.",
161
161
  "Real content: write specific copy for this product (names, numbers, benefits). No lorem ipsum and no generic welcome lines.",
162
- "Imagery: where a real product would show pictures (hero, product, people, places, backgrounds), create them with the generate_image tool. It is included with the task at no extra credits, four images per run. Keep one art direction, no text inside images, set alt text and sizes. Use the icon library for icons, and CSS or SVG for charts, patterns and decoration. Never leave grey boxes, broken links or hotlinked stock photos. If the image tool is unavailable, use CSS or SVG art instead.",
162
+ "Imagery: where a real product would show pictures (hero, product, people, places, backgrounds), use stock_photo for real photographs (free) and generate_image for bespoke art (up to six per run, each uses a small amount of credits). Keep one art direction, no text inside images, set alt text and sizes. Use the icon library for icons, and CSS or SVG for charts, patterns and decoration. Never leave grey boxes, broken links or hotlinked images; both tools save files into the project. If the image tool is unavailable, use CSS or SVG art instead.",
163
163
  "Interaction states: hover, focus-visible, active and disabled on every control, 44 px touch targets, consistent icon sizes, and skeletons rather than layout shift.",
164
164
  "Motion with purpose: 120 to 400 ms, transform and opacity only, one signature moment per page at most, and a reduced-motion fallback.",
165
165
  "Responsive by design: phone first, no sideways scroll at 360 px, navigation that collapses properly, images that crop well, and light and dark themes when the product has both.",
@@ -213,9 +213,22 @@
213
213
  "dashboard ui": 3,
214
214
  "user interface": 4,
215
215
  "single page": 2,
216
- "beautiful": 2
216
+ "beautiful": 2,
217
+ "spacing": 2,
218
+ "cramped": 2,
219
+ "nav bar": 3,
220
+ "hamburger menu": 3,
221
+ "looks off": 2,
222
+ "mockup": 2,
223
+ "on phones": 1,
224
+ "pixel": 1,
225
+ "font": 1,
226
+ "fonts": 1
217
227
  },
218
- "files": []
228
+ "files": [],
229
+ "patterns": {
230
+ "\\b(?:fix|improve|redo|redesign) the (?:\\w+ )?(?:page|layout|header|footer|sidebar|modal|form)\\b": 2
231
+ }
219
232
  },
220
233
  "tools": [
221
234
  "React / Next.js or the repo framework",
@@ -358,7 +371,14 @@
358
371
  "sdk": 3,
359
372
  "rest api": 2,
360
373
  "background jobs": 3,
361
- "stripe webhook": 3
374
+ "stripe webhook": 3,
375
+ "payload": 2,
376
+ "validates": 1,
377
+ "rate limiting": 3,
378
+ "background job": 3,
379
+ "cron job": 3,
380
+ "idempotent": 2,
381
+ "service": 1
362
382
  },
363
383
  "files": [
364
384
  "prisma/schema.prisma",
@@ -366,7 +386,11 @@
366
386
  "go.mod",
367
387
  "**/migrations/**",
368
388
  "openapi.*"
369
- ]
389
+ ],
390
+ "patterns": {
391
+ "\\b(?:get|post|put|patch|delete) /[a-z{:]": 4,
392
+ "\\b(?:rest|grpc|http|api) (?:service|server)\\b": 3
393
+ }
370
394
  },
371
395
  "tools": [
372
396
  "FastAPI / Express / NestJS / Go or the repo stack",
@@ -426,7 +450,11 @@
426
450
  "kotlin": 3,
427
451
  "app store": 4,
428
452
  "play store": 4,
429
- "push notification": 3
453
+ "push notification": 3,
454
+ "swiftui": 4,
455
+ "jetpack compose": 4,
456
+ "testflight": 3,
457
+ "tablets": 1
430
458
  },
431
459
  "files": [
432
460
  "app.json",
@@ -617,7 +645,13 @@
617
645
  "azure": 2,
618
646
  "ecs": 3,
619
647
  "eks": 4,
620
- "argocd": 5
648
+ "argocd": 5,
649
+ "ci": 3,
650
+ "deploy pipeline": 3,
651
+ "staging environment": 2,
652
+ "oomkilled": 4,
653
+ "docker-compose": 4,
654
+ "docker compose": 4
621
655
  },
622
656
  "files": [
623
657
  "Dockerfile",
@@ -626,7 +660,10 @@
626
660
  ".github/workflows/**",
627
661
  "helm/**",
628
662
  "k8s/**"
629
- ]
663
+ ],
664
+ "patterns": {
665
+ "\\b(?:ci|builds?|pipeline)s? (?:takes?|are|is) (?:\\d+ \\w+|too slow|slow)\\b": 3
666
+ }
630
667
  },
631
668
  "tools": [
632
669
  "Docker and compose",
@@ -715,7 +752,12 @@
715
752
  "capacity": 3,
716
753
  "load test": 3,
717
754
  "chaos": 4,
718
- "platform engineering": 4
755
+ "platform engineering": 4,
756
+ "paged": 3,
757
+ "pager": 3,
758
+ "outage": 3,
759
+ "health checks": 2,
760
+ "alerts": 1
719
761
  },
720
762
  "files": [
721
763
  "prometheus.yml",
@@ -813,7 +855,12 @@
813
855
  "hardening": 4,
814
856
  "rbac": 3,
815
857
  "compliance": 2,
816
- "soc 2": 3
858
+ "soc 2": 3,
859
+ "security holes": 4,
860
+ "api keys are committed": 3,
861
+ "leaked": 2,
862
+ "exposed": 1,
863
+ "reentrancy": 1
817
864
  },
818
865
  "files": [
819
866
  "SECURITY.md",
@@ -898,7 +945,11 @@
898
945
  "flaky": 5,
899
946
  "test coverage": 5,
900
947
  "regression suite": 5,
901
- "test plan": 4
948
+ "test plan": 4,
949
+ "tests": 1,
950
+ "test suite": 3,
951
+ "fail randomly": 3,
952
+ "coverage": 2
902
953
  },
903
954
  "files": [
904
955
  "playwright.config.*",
@@ -1009,7 +1060,14 @@
1009
1060
  "lakehouse": 5,
1010
1061
  "delta lake": 5,
1011
1062
  "ingestion": 4,
1012
- "batch job": 3
1063
+ "batch job": 3,
1064
+ "dag": 3,
1065
+ "rows": 1,
1066
+ "quarantine": 2,
1067
+ "quarantined": 2,
1068
+ "ingest": 2,
1069
+ "clickstream": 2,
1070
+ "loads": 1
1013
1071
  },
1014
1072
  "files": [
1015
1073
  "dbt_project.yml",
@@ -1105,7 +1163,13 @@
1105
1163
  "jupyter": 4,
1106
1164
  "cohort": 3,
1107
1165
  "churn": 3,
1108
- "insights": 2
1166
+ "insights": 2,
1167
+ "csv": 2,
1168
+ "statistically significant": 4,
1169
+ "significance": 3,
1170
+ "declining": 1,
1171
+ "trend": 1,
1172
+ "trends": 1
1109
1173
  },
1110
1174
  "files": [
1111
1175
  "**/*.ipynb",
@@ -1214,7 +1278,15 @@
1214
1278
  "gpu": 3,
1215
1279
  "cuda": 4,
1216
1280
  "dataset": 2,
1217
- "benchmark": 2
1281
+ "benchmark": 2,
1282
+ "overfitting": 4,
1283
+ "overfit": 4,
1284
+ "underfitting": 4,
1285
+ "validation accuracy": 3,
1286
+ "scikit-learn": 3,
1287
+ "sklearn": 3,
1288
+ "prediction model": 3,
1289
+ "llama": 1
1218
1290
  },
1219
1291
  "files": [
1220
1292
  "**/train.py",
@@ -1335,7 +1407,9 @@
1335
1407
  "kubeflow": 5,
1336
1408
  "sagemaker": 5,
1337
1409
  "vertex ai": 5,
1338
- "retraining": 4
1410
+ "retraining": 4,
1411
+ "canary rollout": 1,
1412
+ "register the best model": 3
1339
1413
  },
1340
1414
  "files": [
1341
1415
  "MLproject",
@@ -1437,7 +1511,11 @@
1437
1511
  "tool calling": 4,
1438
1512
  "function calling": 4,
1439
1513
  "evals": 4,
1440
- "copilot": 3
1514
+ "copilot": 3,
1515
+ "tool calls": 3,
1516
+ "with an llm": 3,
1517
+ "summarize": 1,
1518
+ "answers questions": 2
1441
1519
  },
1442
1520
  "files": [
1443
1521
  "evals/**",
@@ -1542,7 +1620,11 @@
1542
1620
  "pagerduty": 4,
1543
1621
  "datadog": 4,
1544
1622
  "splunk": 4,
1545
- "elk": 3
1623
+ "elk": 3,
1624
+ "correlate": 3,
1625
+ "correlate alerts": 4,
1626
+ "group related alerts": 4,
1627
+ "root cause": 3
1546
1628
  },
1547
1629
  "files": []
1548
1630
  },
@@ -1619,7 +1701,12 @@
1619
1701
  "migration plan": 4,
1620
1702
  "monolith": 3,
1621
1703
  "tech lead": 5,
1622
- "technical strategy": 4
1704
+ "technical strategy": 4,
1705
+ "microservices": 2,
1706
+ "multi-tenant": 1,
1707
+ "event-driven": 2,
1708
+ "architect a": 3,
1709
+ "how should we": 1
1623
1710
  },
1624
1711
  "files": [
1625
1712
  "docs/adr/**",
@@ -1688,7 +1775,11 @@
1688
1775
  "theme": 2,
1689
1776
  "typography": 3,
1690
1777
  "brand refresh": 4,
1691
- "design engineer": 6
1778
+ "design engineer": 6,
1779
+ "delightful": 2,
1780
+ "page transitions": 3,
1781
+ "type scale": 3,
1782
+ "feel off": 2
1692
1783
  },
1693
1784
  "files": [
1694
1785
  ".storybook/**",
@@ -1791,7 +1882,15 @@
1791
1882
  "oauth app": 4,
1792
1883
  "zapier": 4,
1793
1884
  "slack app": 4,
1794
- "shopify app": 4
1885
+ "shopify app": 4,
1886
+ "sync contacts": 2,
1887
+ "pull orders": 2,
1888
+ "api keys": 1,
1889
+ "versioning": 2,
1890
+ "pagination": 2,
1891
+ "hubspot": 2,
1892
+ "shopify api": 3,
1893
+ "salesforce": 2
1795
1894
  },
1796
1895
  "files": [
1797
1896
  "openapi.*",
@@ -1872,7 +1971,11 @@
1872
1971
  "native desktop": 5,
1873
1972
  "installer": 3,
1874
1973
  "dmg": 3,
1875
- "msi": 3
1974
+ "msi": 3,
1975
+ "windows desktop app": 4,
1976
+ "watches a folder": 2,
1977
+ "signed installer": 3,
1978
+ "auto-update": 2
1876
1979
  },
1877
1980
  "files": [
1878
1981
  "src-tauri/**",
@@ -1946,7 +2049,9 @@
1946
2049
  "web extension": 6,
1947
2050
  "extension that": 3,
1948
2051
  "safari extension": 6,
1949
- "edge extension": 6
2052
+ "edge extension": 6,
2053
+ "add-on": 2,
2054
+ "addon": 2
1950
2055
  },
1951
2056
  "files": [
1952
2057
  "manifest.json",
@@ -2019,7 +2124,11 @@
2019
2124
  "roguelike": 7,
2020
2125
  "tower defense": 7,
2021
2126
  "shooter": 5,
2022
- "leaderboard": 2
2127
+ "leaderboard": 2,
2128
+ "levels": 2,
2129
+ "snake game": 4,
2130
+ "character": 1,
2131
+ "asteroids": 2
2023
2132
  },
2024
2133
  "files": [
2025
2134
  "project.godot",
@@ -2115,7 +2224,11 @@
2115
2224
  "shell script": 4,
2116
2225
  "bash script": 4,
2117
2226
  "scaffolding tool": 5,
2118
- "generator": 2
2227
+ "generator": 2,
2228
+ "renames": 1,
2229
+ "scaffolds": 3,
2230
+ "tail logs": 3,
2231
+ "flags": 1
2119
2232
  },
2120
2233
  "files": [
2121
2234
  "bin/**",
@@ -2204,7 +2317,12 @@
2204
2317
  "partitioning": 5,
2205
2318
  "replication": 4,
2206
2319
  "backfill": 5,
2207
- "data migration": 5
2320
+ "data migration": 5,
2321
+ "explain plan": 4,
2322
+ "query takes": 3,
2323
+ "postgres": 1,
2324
+ "column": 1,
2325
+ "deadlocks": 1
2208
2326
  },
2209
2327
  "files": [
2210
2328
  "alembic/**",
@@ -2277,13 +2395,23 @@
2277
2395
  "load time": 5,
2278
2396
  "memory leak": 5,
2279
2397
  "profiling": 5,
2280
- "profile the": 4
2398
+ "profile the": 4,
2399
+ "make it fast": 4,
2400
+ "seconds to load": 4,
2401
+ "p95": 3,
2402
+ "p99": 3,
2403
+ "profile": 2,
2404
+ "bundle": 2,
2405
+ "takes too long": 3
2281
2406
  },
2282
2407
  "files": [
2283
2408
  "lighthouserc.*",
2284
2409
  ".lighthouserc.*",
2285
2410
  "budget.json"
2286
- ]
2411
+ ],
2412
+ "patterns": {
2413
+ "\\btakes? \\d+(?:\\.\\d+)? ?(?:s|secs?|seconds|ms)\\b": 2
2414
+ }
2287
2415
  },
2288
2416
  "tools": [
2289
2417
  "Lighthouse and WebPageTest",
@@ -2366,7 +2494,11 @@
2366
2494
  "python 3": 3,
2367
2495
  "typescript migration": 7,
2368
2496
  "monorepo migration": 7,
2369
- "switch from": 5
2497
+ "switch from": 5,
2498
+ "pages router to the app router": 4,
2499
+ "create react app": 2,
2500
+ "replace": 1,
2501
+ "remove the old dependency": 3
2370
2502
  },
2371
2503
  "files": []
2372
2504
  },
@@ -2432,7 +2564,10 @@
2432
2564
  "voiceover": 6,
2433
2565
  "nvda": 6,
2434
2566
  "ada compliance": 7,
2435
- "section 508": 7
2567
+ "section 508": 7,
2568
+ "keyboard only": 4,
2569
+ "aria labels": 3,
2570
+ "focus states": 3
2436
2571
  },
2437
2572
  "files": []
2438
2573
  },
@@ -2512,7 +2647,12 @@
2512
2647
  "user manual": 6,
2513
2648
  "write a readme": 7,
2514
2649
  "readme for": 6,
2515
- "update the docs": 6
2650
+ "update the docs": 6,
2651
+ "guide": 2,
2652
+ "getting started": 4,
2653
+ "contributors": 2,
2654
+ "contributing": 3,
2655
+ "examples": 1
2516
2656
  },
2517
2657
  "files": [
2518
2658
  "mkdocs.yml",
@@ -2598,7 +2738,12 @@
2598
2738
  "analytics engineering": 7,
2599
2739
  "metric definitions": 6,
2600
2740
  "kpis": 3,
2601
- "reporting layer": 6
2741
+ "reporting layer": 6,
2742
+ "define the metrics": 4,
2743
+ "weekly active users": 2,
2744
+ "revenue kpis": 3,
2745
+ "mrr": 3,
2746
+ "recurring revenue": 3
2602
2747
  },
2603
2748
  "files": [
2604
2749
  "dbt_project.yml",
@@ -2681,7 +2826,10 @@
2681
2826
  "braintrust": 6,
2682
2827
  "langsmith": 5,
2683
2828
  "regression suite for the model": 7,
2684
- "benchmark the prompt": 7
2829
+ "benchmark the prompt": 7,
2830
+ "graded test set": 4,
2831
+ "hallucinates": 4,
2832
+ "prove it is better": 2
2685
2833
  },
2686
2834
  "files": [
2687
2835
  "promptfooconfig.*",
@@ -2770,7 +2918,9 @@
2770
2918
  "pgvector": 6,
2771
2919
  "algolia": 7,
2772
2920
  "autocomplete": 4,
2773
- "typeahead": 5
2921
+ "typeahead": 5,
2922
+ "typo tolerance": 4,
2923
+ "search results": 4
2774
2924
  },
2775
2925
  "files": [
2776
2926
  "**/meilisearch*",
@@ -2875,7 +3025,9 @@
2875
3025
  "socket.io": 7,
2876
3026
  "event stream": 6,
2877
3027
  "live chat": 6,
2878
- "chat app": 4
3028
+ "chat app": 4,
3029
+ "without refreshing": 3,
3030
+ "collaborative": 3
2879
3031
  },
2880
3032
  "files": [
2881
3033
  "**/socket.io*",
@@ -2951,7 +3103,10 @@
2951
3103
  "waitlist": 4,
2952
3104
  "growth hack": 6,
2953
3105
  "open graph": 6,
2954
- "sitemap": 5
3106
+ "sitemap": 5,
3107
+ "drop-off": 3,
3108
+ "meta tags": 3,
3109
+ "structured data": 3
2955
3110
  },
2956
3111
  "files": [
2957
3112
  "sitemap.xml",
@@ -3059,7 +3214,9 @@
3059
3214
  "token contract": 7,
3060
3215
  "solana": 6,
3061
3216
  "anchor program": 7,
3062
- "blockchain": 5
3217
+ "blockchain": 5,
3218
+ "mint page": 3,
3219
+ "staking": 3
3063
3220
  },
3064
3221
  "files": [
3065
3222
  "foundry.toml",
@@ -3145,7 +3302,12 @@
3145
3302
  "locales": 6,
3146
3303
  "spanish version": 5,
3147
3304
  "in spanish and english": 6,
3148
- "language switcher": 7
3305
+ "language switcher": 7,
3306
+ "spanish": 2,
3307
+ "german": 1,
3308
+ "arabic": 2,
3309
+ "plurals": 3,
3310
+ "localize": 4
3149
3311
  },
3150
3312
  "files": [
3151
3313
  "locales/**",