@adaptabletools/adaptable-mcp 0.1.0-canary.1 → 0.1.0-canary.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 (271) hide show
  1. package/README.md +3 -1
  2. package/data/changes/21-22.json +542 -0
  3. package/data/changes/22-23.json +639 -0
  4. package/data/changes/23-24.json +1874 -0
  5. package/data/manifest.snapshot.json +28 -10
  6. package/data/templates/angular/src/app/adaptableOptions.ts +40 -0
  7. package/data/templates/angular/src/app/agGridModules.ts +7 -0
  8. package/data/templates/angular/src/app/app.component.ts +66 -0
  9. package/data/templates/angular/src/app/app.module.ts +14 -0
  10. package/data/templates/angular/src/app/columnDefs.ts +121 -0
  11. package/data/templates/angular/src/app/gridOptions.ts +32 -0
  12. package/data/templates/angular/src/app/onAdaptableReady.ts +11 -0
  13. package/data/templates/angular/src/app/rowData.ts +851 -0
  14. package/data/templates/angular/src/app/styles.css +50 -0
  15. package/data/templates/angular/src/index.html +17 -0
  16. package/data/templates/angular/src/main.ts +18 -0
  17. package/data/templates/angular/src/polyfills.ts +1 -0
  18. package/data/templates/angular/tsconfig.json +16 -0
  19. package/data/templates/manifest.json +406 -0
  20. package/data/templates/react/src/App.tsx +71 -0
  21. package/data/templates/react/src/adaptableOptions.ts +40 -0
  22. package/data/templates/react/src/agGridModules.ts +7 -0
  23. package/data/templates/react/src/columnDefs.ts +121 -0
  24. package/data/templates/react/src/gridOptions.ts +32 -0
  25. package/data/templates/react/src/index.tsx +8 -0
  26. package/data/templates/react/src/onAdaptableReady.ts +11 -0
  27. package/data/templates/react/src/rowData.ts +851 -0
  28. package/data/templates/react/src/styles.css +50 -0
  29. package/data/templates/react/tsconfig.json +9 -0
  30. package/data/templates/vanilla/index.html +18 -0
  31. package/data/templates/vanilla/src/adaptableOptions.ts +40 -0
  32. package/data/templates/vanilla/src/agGridModules.ts +7 -0
  33. package/data/templates/vanilla/src/columnDefs.ts +121 -0
  34. package/data/templates/vanilla/src/gridOptions.ts +32 -0
  35. package/data/templates/vanilla/src/index.ts +41 -0
  36. package/data/templates/vanilla/src/onAdaptableReady.ts +11 -0
  37. package/data/templates/vanilla/src/rowData.ts +851 -0
  38. package/data/templates/vanilla/src/styles.css +50 -0
  39. package/data/templates/vanilla/tsconfig.json +14 -0
  40. package/data/templates/vue/.babelrc +3 -0
  41. package/data/templates/vue/public/index.html +19 -0
  42. package/data/templates/vue/src/App.vue +35 -0
  43. package/data/templates/vue/src/adaptableOptions.ts +40 -0
  44. package/data/templates/vue/src/agGridModules.ts +7 -0
  45. package/data/templates/vue/src/columnDefs.ts +121 -0
  46. package/data/templates/vue/src/gridOptions.ts +32 -0
  47. package/data/templates/vue/src/main.ts +6 -0
  48. package/data/templates/vue/src/onAdaptableReady.ts +11 -0
  49. package/data/templates/vue/src/rowData.ts +851 -0
  50. package/data/templates/vue/src/shims-vue.d.ts +6 -0
  51. package/data/templates/vue/src/styles.css +50 -0
  52. package/data/templates/vue/tsconfig.json +30 -0
  53. package/dist/bin.js +7 -0
  54. package/dist/bin.js.map +1 -1
  55. package/dist/cli/index.js +8 -0
  56. package/dist/cli/index.js.map +1 -1
  57. package/dist/core/anonymise/anonymise.js +315 -0
  58. package/dist/core/anonymise/anonymise.js.map +1 -0
  59. package/dist/core/anonymise/capabilities.js +94 -0
  60. package/dist/core/anonymise/capabilities.js.map +1 -0
  61. package/dist/core/aql/capabilities.js +339 -0
  62. package/dist/core/aql/capabilities.js.map +1 -0
  63. package/dist/core/aql/check.js +204 -0
  64. package/dist/core/aql/check.js.map +1 -0
  65. package/dist/core/aql/engine.js +92 -0
  66. package/dist/core/aql/engine.js.map +1 -0
  67. package/dist/core/aql/functions.js +108 -0
  68. package/dist/core/aql/functions.js.map +1 -0
  69. package/dist/core/aql/migrate.js +62 -0
  70. package/dist/core/aql/migrate.js.map +1 -0
  71. package/dist/core/capabilities.js +9 -3
  72. package/dist/core/capabilities.js.map +1 -1
  73. package/dist/core/changes/capabilities.js +92 -0
  74. package/dist/core/changes/capabilities.js.map +1 -0
  75. package/dist/core/changes/changes.js +101 -0
  76. package/dist/core/changes/changes.js.map +1 -0
  77. package/dist/core/changes/grep.js +183 -0
  78. package/dist/core/changes/grep.js.map +1 -0
  79. package/dist/core/changes/records.js +172 -0
  80. package/dist/core/changes/records.js.map +1 -0
  81. package/dist/core/changes/render-md.js +101 -0
  82. package/dist/core/changes/render-md.js.map +1 -0
  83. package/dist/core/changes/with-docs.js +86 -0
  84. package/dist/core/changes/with-docs.js.map +1 -0
  85. package/dist/core/compat/capabilities.js +1 -1
  86. package/dist/core/compat/capabilities.js.map +1 -1
  87. package/dist/core/context/capabilities.js +1 -1
  88. package/dist/core/context/capabilities.js.map +1 -1
  89. package/dist/core/convert/capabilities.js +86 -0
  90. package/dist/core/convert/capabilities.js.map +1 -0
  91. package/dist/core/convert/coldefs.js +313 -0
  92. package/dist/core/convert/coldefs.js.map +1 -0
  93. package/dist/core/docs/cache.js +1 -1
  94. package/dist/core/docs/capabilities.js +1 -5
  95. package/dist/core/docs/capabilities.js.map +1 -1
  96. package/dist/core/docs/hosts.js +2 -2
  97. package/dist/core/docs/hosts.js.map +1 -1
  98. package/dist/core/extract/imports.js +163 -0
  99. package/dist/core/extract/imports.js.map +1 -0
  100. package/dist/core/extract/input.js +140 -0
  101. package/dist/core/extract/input.js.map +1 -0
  102. package/dist/core/extract/line-map.js +90 -0
  103. package/dist/core/extract/line-map.js.map +1 -0
  104. package/dist/core/extract/ts-literal.js +963 -0
  105. package/dist/core/extract/ts-literal.js.map +1 -0
  106. package/dist/core/migrate/capabilities.js +143 -0
  107. package/dist/core/migrate/capabilities.js.map +1 -0
  108. package/dist/core/migrate/leftovers.js +119 -0
  109. package/dist/core/migrate/leftovers.js.map +1 -0
  110. package/dist/core/migrate/state.js +295 -0
  111. package/dist/core/migrate/state.js.map +1 -0
  112. package/dist/core/packages/cache.js +2 -1
  113. package/dist/core/packages/cache.js.map +1 -1
  114. package/dist/core/register.js +8 -0
  115. package/dist/core/register.js.map +1 -1
  116. package/dist/core/scaffold/capabilities.js +434 -0
  117. package/dist/core/scaffold/capabilities.js.map +1 -0
  118. package/dist/core/scaffold/generate.js +409 -0
  119. package/dist/core/scaffold/generate.js.map +1 -0
  120. package/dist/core/scaffold/infer.js +441 -0
  121. package/dist/core/scaffold/infer.js.map +1 -0
  122. package/dist/core/scaffold/overlay.js +290 -0
  123. package/dist/core/scaffold/overlay.js.map +1 -0
  124. package/dist/core/scaffold/readers/csv.js +146 -0
  125. package/dist/core/scaffold/readers/csv.js.map +1 -0
  126. package/dist/core/scaffold/readers/dataset.js +53 -0
  127. package/dist/core/scaffold/readers/dataset.js.map +1 -0
  128. package/dist/core/scaffold/readers/index.js +62 -0
  129. package/dist/core/scaffold/readers/index.js.map +1 -0
  130. package/dist/core/scaffold/readers/json.js +101 -0
  131. package/dist/core/scaffold/readers/json.js.map +1 -0
  132. package/dist/core/scaffold/readers/xlsx.js +81 -0
  133. package/dist/core/scaffold/readers/xlsx.js.map +1 -0
  134. package/dist/core/scaffold/suggestions.js +57 -0
  135. package/dist/core/scaffold/suggestions.js.map +1 -0
  136. package/dist/core/scaffold/templates.js +59 -0
  137. package/dist/core/scaffold/templates.js.map +1 -0
  138. package/dist/core/setup/audit.js +91 -0
  139. package/dist/core/setup/audit.js.map +1 -0
  140. package/dist/core/setup/capabilities.js +80 -0
  141. package/dist/core/setup/capabilities.js.map +1 -0
  142. package/dist/core/setup/context.js +118 -0
  143. package/dist/core/setup/context.js.map +1 -0
  144. package/dist/core/setup/rules/cell-data-type.js +40 -0
  145. package/dist/core/setup/rules/cell-data-type.js.map +1 -0
  146. package/dist/core/setup/rules/coldef-ownership.js +67 -0
  147. package/dist/core/setup/rules/coldef-ownership.js.map +1 -0
  148. package/dist/core/setup/rules/css-import.js +34 -0
  149. package/dist/core/setup/rules/css-import.js.map +1 -0
  150. package/dist/core/setup/rules/direct-grid.js +42 -0
  151. package/dist/core/setup/rules/direct-grid.js.map +1 -0
  152. package/dist/core/setup/rules/index.js +53 -0
  153. package/dist/core/setup/rules/index.js.map +1 -0
  154. package/dist/core/setup/rules/licence-literal.js +23 -0
  155. package/dist/core/setup/rules/licence-literal.js.map +1 -0
  156. package/dist/core/setup/rules/modules.js +86 -0
  157. package/dist/core/setup/rules/modules.js.map +1 -0
  158. package/dist/core/setup/rules/react-stable-refs.js +20 -0
  159. package/dist/core/setup/rules/react-stable-refs.js.map +1 -0
  160. package/dist/core/setup/rules/ready-hook.js +33 -0
  161. package/dist/core/setup/rules/ready-hook.js.map +1 -0
  162. package/dist/core/setup/rules/required-options.js +43 -0
  163. package/dist/core/setup/rules/required-options.js.map +1 -0
  164. package/dist/core/setup/rules/rule.js +10 -0
  165. package/dist/core/setup/rules/rule.js.map +1 -0
  166. package/dist/core/setup/rules/version-skew.js +65 -0
  167. package/dist/core/setup/rules/version-skew.js.map +1 -0
  168. package/dist/core/state/capabilities.js +78 -0
  169. package/dist/core/state/capabilities.js.map +1 -0
  170. package/dist/core/state/check.js +216 -0
  171. package/dist/core/state/check.js.map +1 -0
  172. package/dist/core/state/columns.js +130 -0
  173. package/dist/core/state/columns.js.map +1 -0
  174. package/dist/core/state/did-you-mean.js +83 -0
  175. package/dist/core/state/did-you-mean.js.map +1 -0
  176. package/dist/core/state/expressions.js +170 -0
  177. package/dist/core/state/expressions.js.map +1 -0
  178. package/dist/core/state/known-names.js +96 -0
  179. package/dist/core/state/known-names.js.map +1 -0
  180. package/dist/core/state/rules/aql-legacy-shape.js +42 -0
  181. package/dist/core/state/rules/aql-legacy-shape.js.map +1 -0
  182. package/dist/core/state/rules/aql-missing.js +21 -0
  183. package/dist/core/state/rules/aql-missing.js.map +1 -0
  184. package/dist/core/state/rules/aql-syntax.js +77 -0
  185. package/dist/core/state/rules/aql-syntax.js.map +1 -0
  186. package/dist/core/state/rules/calculated-settings.js +23 -0
  187. package/dist/core/state/rules/calculated-settings.js.map +1 -0
  188. package/dist/core/state/rules/column-id-exists.js +29 -0
  189. package/dist/core/state/rules/column-id-exists.js.map +1 -0
  190. package/dist/core/state/rules/dashboard-module-names.js +31 -0
  191. package/dist/core/state/rules/dashboard-module-names.js.map +1 -0
  192. package/dist/core/state/rules/dashboard-toolbar-names.js +48 -0
  193. package/dist/core/state/rules/dashboard-toolbar-names.js.map +1 -0
  194. package/dist/core/state/rules/format-column-pivot-display-format.js +43 -0
  195. package/dist/core/state/rules/format-column-pivot-display-format.js.map +1 -0
  196. package/dist/core/state/rules/helpers.js +39 -0
  197. package/dist/core/state/rules/helpers.js.map +1 -0
  198. package/dist/core/state/rules/index.js +80 -0
  199. package/dist/core/state/rules/index.js.map +1 -0
  200. package/dist/core/state/rules/layout-column-refs.js +60 -0
  201. package/dist/core/state/rules/layout-column-refs.js.map +1 -0
  202. package/dist/core/state/rules/layout-current-exists.js +27 -0
  203. package/dist/core/state/rules/layout-current-exists.js.map +1 -0
  204. package/dist/core/state/rules/layout-non-empty.js +32 -0
  205. package/dist/core/state/rules/layout-non-empty.js.map +1 -0
  206. package/dist/core/state/rules/rule.js +2 -0
  207. package/dist/core/state/rules/rule.js.map +1 -0
  208. package/dist/core/state/rules/scope-column-refs.js +32 -0
  209. package/dist/core/state/rules/scope-column-refs.js.map +1 -0
  210. package/dist/core/state/rules/scope-shape.js +61 -0
  211. package/dist/core/state/rules/scope-shape.js.map +1 -0
  212. package/dist/core/state/rules/state-unique-name.js +40 -0
  213. package/dist/core/state/rules/state-unique-name.js.map +1 -0
  214. package/dist/core/state/rules/state-unknown-section.js +30 -0
  215. package/dist/core/state/rules/state-unknown-section.js.map +1 -0
  216. package/dist/core/state/rules/type-discriminator.js +70 -0
  217. package/dist/core/state/rules/type-discriminator.js.map +1 -0
  218. package/dist/core/state/type-check.js +349 -83
  219. package/dist/core/state/type-check.js.map +1 -1
  220. package/dist/mcp/index.js +104 -16
  221. package/dist/mcp/index.js.map +1 -1
  222. package/dist/mcp/server.js +110 -0
  223. package/dist/mcp/server.js.map +1 -0
  224. package/dist/skills/adaptable-debug/SKILL.md +145 -0
  225. package/dist/skills/adaptable-debug/VERSION.md +1 -0
  226. package/dist/skills/adaptable-debug/references/_shared/agents-snippet.md +3 -0
  227. package/dist/skills/adaptable-debug/references/_shared/capabilities.md +35 -0
  228. package/dist/skills/adaptable-debug/references/_shared/conversation.md +20 -0
  229. package/dist/skills/adaptable-debug/references/_shared/docs-protocol.md +36 -0
  230. package/dist/skills/adaptable-debug/references/_shared/grounding.md +54 -0
  231. package/dist/skills/adaptable-debug/references/_shared/guards.md +20 -0
  232. package/dist/skills/adaptable-debug/references/_shared/validation-loop.md +42 -0
  233. package/dist/skills/adaptable-debug/references/devtools-api.md +36 -0
  234. package/dist/skills/adaptable-debug/references/feedback-template.md +36 -0
  235. package/dist/skills/adaptable-debug/references/symptoms.md +37 -0
  236. package/dist/skills/adaptable-debug/references/ticket-template.md +50 -0
  237. package/dist/skills/adaptable-dev/SKILL.md +97 -0
  238. package/dist/skills/adaptable-dev/VERSION.md +1 -0
  239. package/dist/skills/adaptable-dev/references/_shared/agents-snippet.md +3 -0
  240. package/dist/skills/adaptable-dev/references/_shared/capabilities.md +35 -0
  241. package/dist/skills/adaptable-dev/references/_shared/conversation.md +20 -0
  242. package/dist/skills/adaptable-dev/references/_shared/docs-protocol.md +36 -0
  243. package/dist/skills/adaptable-dev/references/_shared/grounding.md +54 -0
  244. package/dist/skills/adaptable-dev/references/_shared/guards.md +20 -0
  245. package/dist/skills/adaptable-dev/references/_shared/validation-loop.md +42 -0
  246. package/dist/skills/adaptable-dev/references/recommendations.md +93 -0
  247. package/dist/skills/adaptable-setup/SKILL.md +158 -0
  248. package/dist/skills/adaptable-setup/VERSION.md +1 -0
  249. package/dist/skills/adaptable-setup/references/_shared/agents-snippet.md +3 -0
  250. package/dist/skills/adaptable-setup/references/_shared/capabilities.md +35 -0
  251. package/dist/skills/adaptable-setup/references/_shared/conversation.md +20 -0
  252. package/dist/skills/adaptable-setup/references/_shared/docs-protocol.md +36 -0
  253. package/dist/skills/adaptable-setup/references/_shared/grounding.md +54 -0
  254. package/dist/skills/adaptable-setup/references/_shared/guards.md +20 -0
  255. package/dist/skills/adaptable-setup/references/_shared/validation-loop.md +42 -0
  256. package/dist/skills/adaptable-setup/references/paths.md +45 -0
  257. package/dist/skills/adaptable-upgrade/SKILL.md +269 -0
  258. package/dist/skills/adaptable-upgrade/VERSION.md +1 -0
  259. package/dist/skills/adaptable-upgrade/references/_shared/agents-snippet.md +3 -0
  260. package/dist/skills/adaptable-upgrade/references/_shared/capabilities.md +35 -0
  261. package/dist/skills/adaptable-upgrade/references/_shared/conversation.md +20 -0
  262. package/dist/skills/adaptable-upgrade/references/_shared/docs-protocol.md +36 -0
  263. package/dist/skills/adaptable-upgrade/references/_shared/grounding.md +54 -0
  264. package/dist/skills/adaptable-upgrade/references/_shared/guards.md +20 -0
  265. package/dist/skills/adaptable-upgrade/references/_shared/validation-loop.md +42 -0
  266. package/dist/skills/adaptable-upgrade/references/apply-order.md +171 -0
  267. package/dist/skills/adaptable-upgrade/references/plan-preamble.md +151 -0
  268. package/dist/skills/adaptable-upgrade/scripts/adaptable.mjs +24 -0
  269. package/package.json +11 -5
  270. package/dist/core/state/rules.js +0 -417
  271. package/dist/core/state/rules.js.map +0 -1
@@ -0,0 +1,171 @@
1
+ ---
2
+ sources:
3
+ docs: [version-240-release-note, dev-guide-adaptable-state-migrating-state, dev-guide-adaptable-state-persistence, handbook-team-sharing-configuring, getting-started-installation]
4
+ paths: [packages/adaptable-mcp/src/core/migrate/state.ts, packages/adaptable-mcp/src/core/aql/migrate.ts, packages/adaptable/src/setupDevTools.ts]
5
+ ---
6
+
7
+ # Apply order
8
+
9
+ Apply mode runs in a fresh session from `ADAPTABLE_UPGRADE_SCOPE.md` and
10
+ `ADAPTABLE_UPGRADE_CHANGES.md`. The order matters: packages first so the
11
+ types and the engine are the target's; State before Options because Options
12
+ records reference State shapes; validation after every rewrite, not at the
13
+ end. Record progress in the conversation as each step closes — the plan
14
+ files are not edited in apply mode.
15
+
16
+ ## 1. Packages
17
+
18
+ 1. **AG Grid**, per SCOPE's `## AG Grid plan`:
19
+ - *ag-update*: apply `AG_UPDATE_*.md` first, with that skill. AdapTable
20
+ work waits until AG Grid builds.
21
+ - *bump only*: set every `ag-grid-*` package (and `ag-charts-*` when
22
+ present) to the version SCOPE names, same version for all of them.
23
+ AG Grid's own breaking changes are the user's; name the guide, do not
24
+ run AG Grid's codemod from here.
25
+ - *already handled*: check `package.json` carries the pairing; if it does
26
+ not, stop and tell the user — nothing below works against a mismatched
27
+ AG Grid.
28
+ 2. **AdapTable**: every `@adaptabletools/*` package in each project to the
29
+ same target version — the core package and the framework wrapper
30
+ (`compat --adaptable <target> --framework <fw>` names it) and any plugin
31
+ package. A pre-release target is installed by dist-tag (`@canary`); a
32
+ released target by its `<major>.x` range. One version for all of them;
33
+ version skew between the core and a wrapper is a `check setup` finding.
34
+ 3. Install with the project's package manager; read the peer-dependency
35
+ output. A missing-peer report is the only reason to add a package the
36
+ plan does not name.
37
+ 4. Where the target's Packages & CSS records say so: the stylesheet import
38
+ path, the Angular wrapper's version, bundler or sandbox resolver settings.
39
+
40
+ Do not type-check yet — the source still speaks the former major.
41
+
42
+ ## 2. `BREAKING` records, file by file
43
+
44
+ Work the plan top to bottom: transition by transition, area by area,
45
+ record by record, match by match. For each match read the matched line
46
+ (and only what is needed around it), apply the record's `after` form with
47
+ its note, and move to the next. A match that is a comment, a string in a
48
+ test fixture or an unrelated identifier is a false positive: skip it and
49
+ say so in the report.
50
+
51
+ **State records** are applied through `ADAPTABLE_UPGRADE_STATE/`:
52
+
53
+ 1. Replace the `initialState` literal in the source file with the contents
54
+ of its `.json`. Keep the surrounding code (the variable, the type
55
+ annotation, the export) and the file's formatting conventions.
56
+ 2. Re-attach every `unverifiable` entry from the `.md` report at its path:
57
+ the functions, imported constants and computed values the extractor
58
+ stubbed to `null`. The migrated State is only complete when that list is
59
+ empty in the source.
60
+ 3. Re-author every leftover. A leftover is a key the target major's types do
61
+ not know, left in place by the engine; the record whose `before` column
62
+ names it says what replaced it (a removed section, a renamed key, a
63
+ Predicate that is now an Expression). Delete it only when the record says
64
+ "removed, nothing converted".
65
+ 4. State that was not extractable (a `loadState` call, a fetched file) is
66
+ migrated at run time by `autoMigrateState`; nothing to rewrite, but the
67
+ run in step 5 shows what it could not convert.
68
+
69
+ **AdapTableQL strings outside State** — in code, configuration, a server
70
+ payload, a test — are not reached by State migration. Rewrite each one:
71
+
72
+ ```bash
73
+ npx -y @adaptabletools/adaptable-mcp@canary migrate expression "<expression>" --from <n> --to <m> --module <Module> --columns <columnDefs file>
74
+ ```
75
+
76
+ The output carries `original`, `migrated`, `changed` and, for targets 24
77
+ and later, the validation of the result. `--module` picks the kinds tried;
78
+ pass it whenever the string's owner is known (an Alert rule, a Calculated
79
+ Column expression, a Grid Filter).
80
+
81
+ **Options, API and Objects records** are plain source edits at the matched
82
+ lines: renamed options, moved keys, changed signatures, union members. The
83
+ inlined release-note section under the record shows the full table when the
84
+ `before → after` rows need context.
85
+
86
+ ## 3. Kept `BEHAVIOUR` / `DEPRECATED` records
87
+
88
+ These are the records the user chose to mitigate in plan mode: restore the
89
+ former result (an option set back, a default made explicit) or update the
90
+ deprecated form now. Apply each note as written. Then perform the
91
+ `# Validation` double-check the plan ends with: for every such record,
92
+ confirm the mitigation is in the source — compile and tests do not catch a
93
+ missed one, because both forms are valid on the target.
94
+
95
+ ## 4. Validate
96
+
97
+ The validation loop applies (three rounds at most, then the remaining
98
+ issues verbatim):
99
+
100
+ ```bash
101
+ npx -y @adaptabletools/adaptable-mcp@canary check state <file with the literal> --major <target> --columns <columnDefs file>
102
+ npx -y @adaptabletools/adaptable-mcp@canary check expression "<rewritten string>" --module <Module> --columns <columnDefs file>
103
+ npx -y @adaptabletools/adaptable-mcp@canary check setup
104
+ ```
105
+
106
+ - `check state` on every rewritten literal — the shape against the target
107
+ major's own types, the semantic rules, the column references and the
108
+ AdapTableQL inside it. After the package bump the detected major is the
109
+ target; `--major` makes that explicit when a project is still mid-way.
110
+ - `check expression` on every string `migrate expression` produced, and on
111
+ any the user authored by hand, for targets 24 and later.
112
+ - `check setup` once per project: stylesheet, options, version skew between
113
+ the packages, AG Grid modules, wrapper wiring, ColDef ownership.
114
+ - Then the project's own type-check and build. Type errors at this point are
115
+ usually a record applied to one match and not another: search the plan
116
+ for the identifier before reading the codebase.
117
+
118
+ ## 5. Run and read the console
119
+
120
+ Start the application with a persisted State written by the former version
121
+ when one exists (a developer's own `localStorage` is usually enough). On the
122
+ first load AdapTable migrates persisted State, `initialState` and Team
123
+ Sharing entities and logs each step. Read:
124
+
125
+ - with a browser tool: `__ADAPTABLE_DEVTOOLS__.listInstances()`, then
126
+ `getLogs(id, { level: ['warn', 'error'] })`;
127
+ - without one: tell the user to paste
128
+ `__ADAPTABLE_DEVTOOLS__.getLogs(undefined, { level: ['warn', 'error'] })`
129
+ into the console and paste the result back.
130
+
131
+ Objects the runtime could not convert carry the suffix `(needs migration)`
132
+ in their `Name`, and the Settings Panel shows them suspended. List every one
133
+ in the report as a manual leftover with its Module and Name; they are fixed
134
+ in the Settings Panel or in `initialState`, not by the tooling.
135
+
136
+ ## 6. Persisted State — the team's decision
137
+
138
+ Say this plainly; do not act on it. Nothing in storage is touched without
139
+ explicit confirmation (guards).
140
+
141
+ - **Automatic migration.** With `stateOptions.autoMigrateState` left `true`
142
+ (the default) every entry point migrates State on load: start-up,
143
+ state-key change, Initial State re-apply, DevTools restore, Team Sharing
144
+ load. An application that sets it `false` must call
145
+ `AdaptableUpgradeHelper.migrateAdaptableState` itself inside
146
+ `stateOptions.applyState`.
147
+ - **State keys and remote persistence.** Every state key in use (per user,
148
+ per `adaptableId`) migrates on that user's first load; a remote
149
+ persistence store receives the migrated payload on the next save. Decide
150
+ whether to migrate stored payloads ahead of the release (`migrate state`
151
+ on an export, `--kind persistent`) or let first-load migration do it.
152
+ - **Team Sharing.** Every client that reads a shared store moves together;
153
+ a client on the former major cannot import entities written in the
154
+ target's shape. `teamSharingOptions.persistMigratedSharedEntities`
155
+ (default `true`) decides whether migrated entities are written back.
156
+ - **Duplicate `Name`s.** Objects of one Module that share a `Name` in
157
+ persisted or shared State are renamed on the first load of a major that
158
+ converts Tags to Layout Extensions; rename them in the store beforehand
159
+ where it can be reached.
160
+ - **Preview.** A real persisted State can be previewed through
161
+ `migrate state <export.json> --from <n> --to <m> --kind persistent` before
162
+ any user loads the new build; the report's leftovers are what the console
163
+ will say.
164
+
165
+ ## 7. Final report
166
+
167
+ Prose, in this order: the packages moved (from → to, per project); the files
168
+ changed, grouped by record; what was validated and the result of each check;
169
+ the manual leftovers from step 5; the persisted-State decisions still open
170
+ from step 6; and the plan's `Deployment` records verbatim as the release
171
+ gotchas. Close with what remains manual — nothing is silently done.
@@ -0,0 +1,151 @@
1
+ ---
2
+ sources:
3
+ docs: [version-240-release-note, release-schedule, dev-guide-adaptable-state-migrating-state, handbook-team-sharing-configuring]
4
+ paths: [packages/adaptable-mcp/src/core/changes/render-md.ts, packages/adaptable-mcp/src/core/migrate/state.ts]
5
+ ---
6
+
7
+ # Plan files — what each starts with
8
+
9
+ Three artefacts, all at the repository root, all written by plan mode and
10
+ read by apply mode. Copy the templates as written; the `<…>` fields come
11
+ from the phase that writes the file.
12
+
13
+ ## `ADAPTABLE_UPGRADE_SCOPE.md` (phase 3, appended in phase 4)
14
+
15
+ ```markdown
16
+ # AdapTable upgrade scope
17
+
18
+ Target: AdapTable <target major> (<exact version or dist-tag, e.g. 24.x / canary>)
19
+ Written: <date> by adaptable-upgrade <skill VERSION.md>
20
+ Repository root: <absolute path>
21
+
22
+ ## Projects
23
+
24
+ | Project | Framework | Wrapper package | AdapTable (declared → installed) | AG Grid (package, version, edition) | Package manager | Initial State literals | columnDefs files |
25
+ | --- | --- | --- | --- | --- | --- | --- | --- |
26
+ | <relative path> | <vanilla / react / angular / vue> | <@adaptabletools/… or —> | <range → version> | <ag-grid-enterprise 34.0.0, Enterprise> | <npm / pnpm / yarn> | <files or —> | <files or —> |
27
+
28
+ Projects found by `detect --all-projects` and left out of scope: <list or none>.
29
+
30
+ ## Target requirements (from `compat --adaptable <target>`)
31
+
32
+ - AG Grid pairing: <e.g. 36 (documented with 36.2.0)>
33
+ - Environment: <node …, typescript …, framework …>
34
+ - Release note: <URL>
35
+ - Change records cover: <majors>
36
+
37
+ ## Decisions
38
+
39
+ - Projects in scope: confirmed by the user on <date>.
40
+ - Current versions: <confirmed as detected / corrected to …>.
41
+ - Target: <user's choice / latest>.
42
+ ```
43
+
44
+ Phase 4 appends exactly one of:
45
+
46
+ ```markdown
47
+ ## AG Grid plan
48
+
49
+ No AG Grid change: <installed> satisfies the pairing <required>.
50
+ ```
51
+
52
+ ```markdown
53
+ ## AG Grid plan
54
+
55
+ Installed <installed>, required <required>. Decision: <one of>
56
+ - ag-update: plan written to AG_UPDATE_*.md in this repository; apply it before the AdapTable bump.
57
+ - bump only: install AG Grid <exact version>; AG Grid's upgrade guide for <installed major> → <required major> is the user's own checklist.
58
+ - already handled: AG Grid <required> is assumed present when apply mode starts.
59
+ ```
60
+
61
+ ## `ADAPTABLE_UPGRADE_CHANGES.md` (phase 5, trimmed in phase 6)
62
+
63
+ The file opens with this preamble, then the `changes` Markdown verbatim,
64
+ then `## State literals`, then — when the trim keeps any `BEHAVIOUR` /
65
+ `DEPRECATED` record — `# Validation`.
66
+
67
+ ```markdown
68
+ # AdapTable upgrade plan
69
+
70
+ This file lists the changes to apply to the project(s) in this repository
71
+ to move them to the target AdapTable version recorded in
72
+ ADAPTABLE_UPGRADE_SCOPE.md. Combine it with the project's own conventions
73
+ and verification tools: bump AG Grid per the scope file, then every
74
+ `@adaptabletools/*` package to the same target version, install, apply the
75
+ records below, then validate with `check state`, `check expression` and
76
+ `check setup`, type-check, build and a run of the application with its
77
+ browser console open.
78
+
79
+ Records are grouped per transition (21 → 22, 22 → 23, 23 → 24) and, inside
80
+ each, ordered Packages & CSS → State → Options → API → Objects → AdapTableQL
81
+ → Deployment. Each record has a type — `BREAKING` (must change),
82
+ `BEHAVIOUR` (same code, different result; kept here only if the user chose
83
+ to restore the former result) or `DEPRECATED` (still works on the target,
84
+ removed later; kept here only if the user chose to update now) — whether
85
+ State migration handles it, its `before → after` rows, a note with the
86
+ remedy, the release-note anchor and the `file:line` matches in this
87
+ repository. Matches come from a plain text search and can include false
88
+ positives (comments, unrelated identifiers); read the matched line before
89
+ changing it. "Applies to every project" records have no matches to read.
90
+
91
+ Release-note sections follow each record (`--with-docs`); a section longer
92
+ than 60 lines is collapsed to its heading with the `docs get` command that
93
+ reads it.
94
+
95
+ State records say what AdapTable migrates on its own when State loads and
96
+ what it leaves `(needs migration)`. `initialState` literals run as they are;
97
+ the migrated copies under ADAPTABLE_UPGRADE_STATE/ bring the source up to
98
+ date and silence the migration log.
99
+
100
+ See ADAPTABLE_UPGRADE_SCOPE.md for the projects, target and AG Grid plan.
101
+ ```
102
+
103
+ When `--with-docs` was skipped (offline), add under the preamble:
104
+
105
+ ```markdown
106
+ > Release-note sections are not inlined (the docs host was not reachable
107
+ > when this plan was written). Apply mode reads each record's anchor with
108
+ > `adaptable docs get <release note slug> --section "<area heading>"`.
109
+ ```
110
+
111
+ ### `## State literals`
112
+
113
+ One line per `initialState` literal the CLI could extract, and one per file
114
+ it could not:
115
+
116
+ ```markdown
117
+ ## State literals
118
+
119
+ - `<project>/<file>` → `ADAPTABLE_UPGRADE_STATE/<project>--<file>.json` (report: `….md`) — leftovers: <n>, unverifiable: <n>, check state --major <target>: <issues>
120
+ - `<project>/<file>` — not extractable (<reason from the CLI>); migrate at run time or export the built State and migrate the export.
121
+ ```
122
+
123
+ ### `# Validation` (phase 6, only when kept records exist)
124
+
125
+ ```markdown
126
+ # Validation
127
+
128
+ All records marked BEHAVIOUR or DEPRECATED above are optional changes the
129
+ user decided to apply. Double-check, with a sub-agent when one is
130
+ available, that each has been applied: type-checking, the build and the
131
+ tests may all pass when one is missed, because the former behaviour and
132
+ the deprecated form both still compile.
133
+ ```
134
+
135
+ ## `ADAPTABLE_UPGRADE_STATE/` (phase 5)
136
+
137
+ Per extractable literal, two files named `<project>--<file>` with the
138
+ project's and file's path separators replaced by `-`:
139
+
140
+ - `.json` — `migrate state --out`: the migrated State for the target major,
141
+ functions and imports replaced by `null` stubs and listed as
142
+ `unverifiable` in the report.
143
+ - `.md` — the CLI's Markdown report: migration log, `leftovers` with their
144
+ source positions (keys the target major's types do not know, left in place
145
+ by the engine and ignored by the runtime), the `unverifiable` list, and
146
+ the `check state --major <target>` result the engine's output was given.
147
+
148
+ Apply mode replaces the literal with the `.json`, re-attaches every
149
+ `unverifiable` entry at its path, and re-authors every leftover from the
150
+ record that owns it. A leftover is never deleted blindly: the release-note
151
+ row names what replaced it.
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ // Argument forwarder (plan §10): runs the `adaptable` CLI pinned to the package and
3
+ // range this skill was built for, passing every argument through unchanged. No logic
4
+ // lives here; `build-skills.ts` fills in the package/range string.
5
+ //
6
+ // node adaptable.mjs changes --from 23 --to 24 --json
7
+ //
8
+ // `ADAPTABLE_CLI` (plan §7.1) replaces the `npx` invocation for local development and
9
+ // evaluation runs, e.g. ADAPTABLE_CLI="node /path/to/dist/bin.js".
10
+ import { spawnSync } from 'node:child_process';
11
+
12
+ const windows = process.platform === 'win32';
13
+ const override = process.env.ADAPTABLE_CLI?.trim();
14
+ const [command, ...lead] = override ? override.split(/\s+/) : [windows ? 'npx.cmd' : 'npx', '-y', '@adaptabletools/adaptable-mcp@canary'];
15
+ const result = spawnSync(command, [...lead, ...process.argv.slice(2)], {
16
+ stdio: 'inherit',
17
+ shell: windows,
18
+ });
19
+
20
+ if (result.error) {
21
+ console.error(`Could not start ${command}: ${result.error.message}`);
22
+ process.exit(3);
23
+ }
24
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-mcp",
3
- "version": "0.1.0-canary.1",
3
+ "version": "0.1.0-canary.2",
4
4
  "description": "AdapTable CLI and MCP server for coding agents: version-matched docs, State and AdapTableQL checks, migration, scaffolding",
5
5
  "homepage": "https://www.adaptabletools.com/",
6
6
  "license": "contact sales@adaptabletools.com for details",
@@ -25,17 +25,22 @@
25
25
  "skills"
26
26
  ],
27
27
  "scripts": {
28
- "build": "rimraf dist && tsc --project tsconfig.json",
28
+ "build": "rimraf dist && tsc --project tsconfig.json && tsx scripts/build-skills.ts",
29
+ "build:skills": "tsx scripts/build-skills.ts",
30
+ "generate": "tsx scripts/build-records.ts && tsx scripts/sync-templates.ts && tsx scripts/generate-bindings.ts",
29
31
  "snapshot:manifest": "tsx scripts/snapshot-manifest.ts",
30
- "lint": "eslint .",
32
+ "lint": "eslint . && tsx scripts/lint-skills.ts",
33
+ "check:reference-sources": "tsx scripts/check-reference-sources.ts",
31
34
  "test": "vitest run",
32
- "inspect": "npx @modelcontextprotocol/inspector node ./dist/bin.js mcp"
35
+ "inspect": "npx @modelcontextprotocol/inspector node ./dist/bin.js mcp",
36
+ "eval": "tsx evals/run.ts"
33
37
  },
34
38
  "dependencies": {
35
39
  "@modelcontextprotocol/sdk": "1.32.2",
36
40
  "commander": "14.0.3",
37
41
  "esbuild": "0.28.2",
38
42
  "json5": "2.2.3",
43
+ "read-excel-file": "9.3.13",
39
44
  "typescript": "5.8.3",
40
45
  "zod": "4.6.7"
41
46
  },
@@ -47,6 +52,7 @@
47
52
  "rimraf": "6.1.3",
48
53
  "tsx": "4.23.15",
49
54
  "typescript-eslint": "8.72.1",
50
- "vitest": "5.0.5"
55
+ "vitest": "5.0.5",
56
+ "yaml": "2.8.1"
51
57
  }
52
58
  }