@ffschrattenecker/tm1-mcp-server 7.0.2 → 8.1.0

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 (116) hide show
  1. package/CHANGELOG.md +101 -1
  2. package/README.md +9 -6
  3. package/dist/config.d.ts +10 -1
  4. package/dist/config.js +40 -22
  5. package/dist/connections.d.ts +30 -2
  6. package/dist/connections.js +94 -21
  7. package/dist/http-transport.js +51 -4
  8. package/dist/index.js +6 -0
  9. package/dist/lib/callgraph/referenceIndex.js +2 -1
  10. package/dist/lib/callgraph/rulesLinter.d.ts +0 -19
  11. package/dist/lib/callgraph/rulesLinter.js +0 -590
  12. package/dist/lib/callgraph/tiParser.js +10 -5
  13. package/dist/lib/callgraph/tm1-adapter.d.ts +5 -1
  14. package/dist/lib/callgraph/tm1-adapter.js +41 -9
  15. package/dist/lib/callgraph/variableEnv.js +3 -2
  16. package/dist/lib/cell-address.d.ts +1 -1
  17. package/dist/lib/cell-address.js +2 -2
  18. package/dist/lib/complexity/antipatterns.js +3 -1
  19. package/dist/lib/complexity/comment-classifier.js +2 -1
  20. package/dist/lib/feeders/element-type-cache.js +4 -6
  21. package/dist/lib/naming/odata-filter.js +2 -1
  22. package/dist/lib/pro-parser.js +13 -4
  23. package/dist/lib/safe-regex.d.ts +0 -13
  24. package/dist/lib/safe-regex.js +40 -13
  25. package/dist/lib/sample-cells.js +1 -1
  26. package/dist/lib/ti-identifier.d.ts +11 -0
  27. package/dist/lib/ti-identifier.js +11 -0
  28. package/dist/lib/tm1-name.d.ts +9 -0
  29. package/dist/lib/tm1-name.js +9 -0
  30. package/dist/lib/v12-compat/deprecated-ti.js +2 -2
  31. package/dist/secrets-cli.d.ts +10 -0
  32. package/dist/secrets-cli.js +218 -0
  33. package/dist/secrets.d.ts +39 -0
  34. package/dist/secrets.js +128 -0
  35. package/dist/session-manager.d.ts +1 -0
  36. package/dist/session-manager.js +24 -0
  37. package/dist/tm1-client/connection/profile.js +2 -4
  38. package/dist/tm1-client/dispatcher.d.ts +1 -1
  39. package/dist/tm1-client/dispatcher.js +18 -6
  40. package/dist/tm1-client/http.d.ts +21 -0
  41. package/dist/tm1-client/http.js +39 -30
  42. package/dist/tm1-client/services/cell-service.d.ts +9 -7
  43. package/dist/tm1-client/services/cell-service.js +51 -25
  44. package/dist/tm1-client/services/chore-service.js +8 -9
  45. package/dist/tm1-client/services/cube-service.d.ts +14 -18
  46. package/dist/tm1-client/services/cube-service.js +51 -45
  47. package/dist/tm1-client/services/dimension-order.d.ts +13 -0
  48. package/dist/tm1-client/services/dimension-order.js +42 -0
  49. package/dist/tm1-client/services/dimension-service.js +4 -6
  50. package/dist/tm1-client/services/element-service.d.ts +35 -11
  51. package/dist/tm1-client/services/element-service.js +124 -60
  52. package/dist/tm1-client/services/file-service.d.ts +42 -6
  53. package/dist/tm1-client/services/file-service.js +225 -28
  54. package/dist/tm1-client/services/hierarchy-service.d.ts +19 -9
  55. package/dist/tm1-client/services/hierarchy-service.js +118 -12
  56. package/dist/tm1-client/services/monitoring-service.js +2 -5
  57. package/dist/tm1-client/services/odata-page.d.ts +6 -0
  58. package/dist/tm1-client/services/odata-page.js +8 -0
  59. package/dist/tm1-client/services/process-service.d.ts +1 -1
  60. package/dist/tm1-client/services/process-service.js +26 -26
  61. package/dist/tm1-client/services/security-service.js +8 -9
  62. package/dist/tm1-client/services/server-service.js +14 -15
  63. package/dist/tm1-client/services/subset-service.d.ts +23 -10
  64. package/dist/tm1-client/services/subset-service.js +82 -26
  65. package/dist/tm1-client/services/view-service.js +12 -13
  66. package/dist/tm1-client.js +5 -2
  67. package/dist/tools/analysis/check-v12-readiness.js +3 -3
  68. package/dist/tools/celldata/check-feeders.js +6 -6
  69. package/dist/tools/celldata/check-writable-coords.js +33 -22
  70. package/dist/tools/celldata/execute-mdx.js +10 -9
  71. package/dist/tools/celldata/get-view.js +10 -9
  72. package/dist/tools/celldata/member-ref.d.ts +15 -0
  73. package/dist/tools/celldata/member-ref.js +67 -0
  74. package/dist/tools/celldata/trace-cell-calculation.js +6 -6
  75. package/dist/tools/celldata/trace-feeders.js +6 -6
  76. package/dist/tools/celldata/write-cells.js +62 -12
  77. package/dist/tools/dimension-management/create-element-attribute.js +1 -1
  78. package/dist/tools/dimension-management/delete-hierarchy.js +3 -4
  79. package/dist/tools/dimension-management/get-element-attribute-values.js +7 -2
  80. package/dist/tools/dimension-management/list-element-attributes.js +1 -1
  81. package/dist/tools/dimension-management/update-element-attribute-value.js +8 -3
  82. package/dist/tools/dimension-management/update-element.js +14 -7
  83. package/dist/tools/fileops/container.d.ts +8 -0
  84. package/dist/tools/fileops/container.js +11 -0
  85. package/dist/tools/fileops/delete-file.js +4 -2
  86. package/dist/tools/fileops/get-file-content.js +45 -7
  87. package/dist/tools/fileops/list-files.js +5 -2
  88. package/dist/tools/fileops/search-files.js +4 -1
  89. package/dist/tools/fileops/upload-file.js +5 -2
  90. package/dist/tools/index.js +0 -2
  91. package/dist/tools/model-building/check-cube-rule.js +3 -2
  92. package/dist/tools/model-building/clear-cube.js +16 -27
  93. package/dist/tools/model-building/set-cube-rules.js +13 -20
  94. package/dist/tools/model-building/unload-cube.js +1 -1
  95. package/dist/tools/operations/get-cube-stats.js +1 -1
  96. package/dist/tools/operations/get-transaction-log.js +1 -1
  97. package/dist/tools/operations/list-error-logs.js +27 -2
  98. package/dist/tools/schemas/items-fileops.d.ts +4 -0
  99. package/dist/tools/schemas/items-fileops.js +1 -0
  100. package/dist/tools/security/list-clients.js +5 -5
  101. package/dist/tools/security/list-groups.js +1 -1
  102. package/dist/tools/subsets/create-subset.js +9 -5
  103. package/dist/tools/subsets/delete-subset.js +8 -3
  104. package/dist/tools/subsets/update-subset.js +9 -9
  105. package/dist/tools/ti-development/diff-process-with-file.js +4 -29
  106. package/dist/tools/ti-development/diff-processes.js +9 -0
  107. package/dist/tools/ti-development/export-process-to-git.js +9 -7
  108. package/dist/tools/ti-development/export-process-to-pro.js +15 -8
  109. package/dist/tools/ti-development/import-pro-file.js +10 -21
  110. package/dist/tools/ti-development/import-process-from-git.js +8 -18
  111. package/dist/tools/ti-development/install-pro-bundle.js +2 -2
  112. package/dist/tools/ti-development/upsert-process.js +26 -5
  113. package/npm-shrinkwrap.json +245 -9
  114. package/package.json +10 -5
  115. package/dist/tools/dimension-management/move-element.d.ts +0 -2
  116. package/dist/tools/dimension-management/move-element.js +0 -28
@@ -5,7 +5,7 @@ import { TM1Error, TM1ErrorCode } from "../../types.js";
5
5
  import { compileUserRegex } from "../../lib/safe-regex.js";
6
6
  import { parseProFile } from "../../lib/pro-parser.js";
7
7
  import { resolveLocalPath } from "../local-file.js";
8
- import { IDEMPOTENT_DESTRUCTIVE, withVersion } from "../annotations.js";
8
+ import { IDEMPOTENT_DESTRUCTIVE } from "../annotations.js";
9
9
  import { InstallProBundleResultSchema } from "../schemas/items.js";
10
10
  import { defineTool } from "../define-tool.js";
11
11
  import { runPreflight } from "./preflight.js";
@@ -13,7 +13,7 @@ import { backupProcess } from "./process-backup.js";
13
13
  export const registerInstallProBundle = defineTool({
14
14
  name: "tm1_install_pro_bundle",
15
15
  description: "Install all .pro files from a directory in one call. Iterates the directory (non-recursive by default), applies tm1_import_pro_file logic per file, and reports per-file outcome. Stops on first failure unless continueOnError=true. Useful for Bedrock or library deployments.",
16
- annotations: withVersion(IDEMPOTENT_DESTRUCTIVE, "v11"),
16
+ annotations: IDEMPOTENT_DESTRUCTIVE,
17
17
  output: InstallProBundleResultSchema,
18
18
  input: {
19
19
  directory: z
@@ -42,7 +42,14 @@ export const registerUpsertProcess = defineTool({
42
42
  data: z.string().optional(),
43
43
  epilog: z.string().optional(),
44
44
  parameters: z.array(parameterSchema).optional(),
45
- variables: z.array(variableSchema).optional(),
45
+ variables: z
46
+ .array(variableSchema)
47
+ .optional()
48
+ .describe("Replaces the complete variable list; [] removes every variable."),
49
+ variablesUIData: z
50
+ .array(z.string())
51
+ .optional()
52
+ .describe("Raw per-column layout (VariablesUIData), one entry per source column including ignored ones, sent verbatim. Take it from tm1_get_process_variables or an export; do not construct entries. Omitted: the server keeps its current layout."),
46
53
  dataSource: dataSourceSchema.optional(),
47
54
  hasSecurityAccess: z
48
55
  .boolean()
@@ -66,7 +73,7 @@ export const registerUpsertProcess = defineTool({
66
73
  .default(false)
67
74
  .describe("Write nothing. Run the syntax AND reference check on the process as it would be after this call (both reported, neither stops the other) and diff it against the installed version (credentials masked). Needs no confirm and is not one: the real call still needs it. Replaces a separate check_process_code + validate_process_refs + diff before the risk assessment."),
68
75
  },
69
- handler: async ({ processName, prolog, metadata, data, epilog, parameters, variables, dataSource, hasSecurityAccess, mode, preflight, autoCompile, dryRun, confirm, }, tm1Client) => {
76
+ handler: async ({ processName, prolog, metadata, data, epilog, parameters, variables, variablesUIData, dataSource, hasSecurityAccess, mode, preflight, autoCompile, dryRun, confirm, }, tm1Client) => {
70
77
  const trail = [];
71
78
  const exists = await tm1Client.processes.exists(processName);
72
79
  if (mode === "create" && exists) {
@@ -199,8 +206,21 @@ export const registerUpsertProcess = defineTool({
199
206
  await tm1Client.processes.updateParameters(processName, parameters);
200
207
  trail.push("updateProcessParameters");
201
208
  }
202
- if (variables !== undefined && variables.length > 0) {
203
- await tm1Client.processes.updateVariables(processName, variables);
209
+ let warning;
210
+ if (variables !== undefined || variablesUIData !== undefined) {
211
+ // A Variables PATCH alone leaves the server's VariablesUIData in place
212
+ // (measured on 11.8 and 12.5). When the new variable count no longer
213
+ // matches the kept layout's non-ignored columns, the ignore markers
214
+ // point at the wrong columns — say so rather than guess a layout.
215
+ if (exists && variables !== undefined && variablesUIData === undefined) {
216
+ const layout = await tm1Client.processes.getVariableLayout(processName);
217
+ const kept = layout.variablesUIData?.length ?? 0;
218
+ const used = kept - layout.ignoredColumns.length;
219
+ if (kept > 0 && used !== variables.length) {
220
+ warning = `VariablesUIData left as on the server: it describes ${used} used and ${layout.ignoredColumns.length} ignored column(s), but ${variables.length} variable(s) were written. Pass variablesUIData to replace the column layout.`;
221
+ }
222
+ }
223
+ await tm1Client.processes.updateVariables(processName, variables, variablesUIData);
204
224
  trail.push("updateProcessVariables");
205
225
  }
206
226
  if (dataSource !== undefined) {
@@ -213,7 +233,7 @@ export const registerUpsertProcess = defineTool({
213
233
  }
214
234
  // Process body/parameters/datasource may have changed call sites — drop the
215
235
  // 60s callgraph TTL so the next analysis sees fresh references instead of stale graph.
216
- const { cleared: callgraphEntriesCleared } = invalidateCallgraphCache();
236
+ const { cleared: callgraphEntriesCleared } = invalidateCallgraphCache(tm1Client.connectionId);
217
237
  // Read the code back: TM1 stores what REST sent, so a mismatch means the
218
238
  // write did not land as sent. Saves the caller a get_process turn.
219
239
  const sent = { prolog, metadata, data, epilog };
@@ -247,6 +267,7 @@ export const registerUpsertProcess = defineTool({
247
267
  ...(backup ? { backup } : {}),
248
268
  ...(verified !== undefined ? { verified } : {}),
249
269
  ...(compile !== undefined ? { compile } : {}),
270
+ ...(warning !== undefined ? { warning } : {}),
250
271
  }, null, 2),
251
272
  },
252
273
  ],
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "@ffschrattenecker/tm1-mcp-server",
3
- "version": "7.0.2",
3
+ "version": "8.1.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ffschrattenecker/tm1-mcp-server",
9
- "version": "7.0.2",
9
+ "version": "8.1.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@modelcontextprotocol/sdk": "1.30.0",
12
+ "@modelcontextprotocol/sdk": "1.30.1",
13
+ "@napi-rs/keyring": "^2.1.0",
13
14
  "dotenv": "^18.0.0",
14
15
  "pino": "^10.3.1",
16
+ "regexp-tree": "^0.1.27",
15
17
  "safe-regex": "^2.1.1",
16
18
  "undici": "^8.10.2",
17
19
  "zod": "4.6.5"
@@ -822,9 +824,9 @@
822
824
  "license": "MIT"
823
825
  },
824
826
  "node_modules/@modelcontextprotocol/sdk": {
825
- "version": "1.30.0",
826
- "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz",
827
- "integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==",
827
+ "version": "1.30.1",
828
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.1.tgz",
829
+ "integrity": "sha512-H2HxLvC3HDNybePJaLdSrU1hhUK5iQw+WvV1b01myFyI7sdVGe1u/IPTE5D9fGCiJDVtgMV/lmFkQXLmQyIFYA==",
828
830
  "license": "MIT",
829
831
  "dependencies": {
830
832
  "@hono/node-server": "^1.19.9 || ^2.0.5",
@@ -861,6 +863,240 @@
861
863
  }
862
864
  }
863
865
  },
866
+ "node_modules/@napi-rs/keyring": {
867
+ "version": "2.1.0",
868
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring/-/keyring-2.1.0.tgz",
869
+ "integrity": "sha512-km9J3fomkGSLpImpelq0cMvLBrJ5eVlTzuWdG3Iy0laP6gU90MmHYjqhUhG32aYq0/0++r2TLuAA9xlnh4XU1g==",
870
+ "license": "MIT",
871
+ "engines": {
872
+ "node": ">= 10"
873
+ },
874
+ "funding": {
875
+ "type": "github",
876
+ "url": "https://github.com/sponsors/Brooooooklyn"
877
+ },
878
+ "optionalDependencies": {
879
+ "@napi-rs/keyring-darwin-arm64": "2.1.0",
880
+ "@napi-rs/keyring-darwin-x64": "2.1.0",
881
+ "@napi-rs/keyring-freebsd-x64": "2.1.0",
882
+ "@napi-rs/keyring-linux-arm-gnueabihf": "2.1.0",
883
+ "@napi-rs/keyring-linux-arm64-gnu": "2.1.0",
884
+ "@napi-rs/keyring-linux-arm64-musl": "2.1.0",
885
+ "@napi-rs/keyring-linux-riscv64-gnu": "2.1.0",
886
+ "@napi-rs/keyring-linux-x64-gnu": "2.1.0",
887
+ "@napi-rs/keyring-linux-x64-musl": "2.1.0",
888
+ "@napi-rs/keyring-win32-arm64-msvc": "2.1.0",
889
+ "@napi-rs/keyring-win32-ia32-msvc": "2.1.0",
890
+ "@napi-rs/keyring-win32-x64-msvc": "2.1.0"
891
+ }
892
+ },
893
+ "node_modules/@napi-rs/keyring-darwin-arm64": {
894
+ "version": "2.1.0",
895
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-darwin-arm64/-/keyring-darwin-arm64-2.1.0.tgz",
896
+ "integrity": "sha512-j6ATTOhmPW+N5EKwi8Yzn6P4Bz/uqnxzyYvqOL73/dgzDSYG5pS5eprqpVmOLse68WUTf79ZMqz97HnfvirJ9g==",
897
+ "cpu": [
898
+ "arm64"
899
+ ],
900
+ "license": "MIT",
901
+ "optional": true,
902
+ "os": [
903
+ "darwin"
904
+ ],
905
+ "engines": {
906
+ "node": ">= 10"
907
+ }
908
+ },
909
+ "node_modules/@napi-rs/keyring-darwin-x64": {
910
+ "version": "2.1.0",
911
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-darwin-x64/-/keyring-darwin-x64-2.1.0.tgz",
912
+ "integrity": "sha512-54Q803nguiOaQzBG2h4uIkacI0eLGAlzzdpxPNi6IZtXbjqbPI4AQ86GrQy25tw3czBqRPBoGu0lHP2U+/f5iA==",
913
+ "cpu": [
914
+ "x64"
915
+ ],
916
+ "license": "MIT",
917
+ "optional": true,
918
+ "os": [
919
+ "darwin"
920
+ ],
921
+ "engines": {
922
+ "node": ">= 10"
923
+ }
924
+ },
925
+ "node_modules/@napi-rs/keyring-freebsd-x64": {
926
+ "version": "2.1.0",
927
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-freebsd-x64/-/keyring-freebsd-x64-2.1.0.tgz",
928
+ "integrity": "sha512-BL7ngJAYQBrUp1PTF8enOXOIVfxN51RbwVOEQ+8eAjWypF/5Ipqs8oQoMqkuc0wAbk+vatnNVjdKCIFa/HPglg==",
929
+ "cpu": [
930
+ "x64"
931
+ ],
932
+ "license": "MIT",
933
+ "optional": true,
934
+ "os": [
935
+ "freebsd"
936
+ ],
937
+ "engines": {
938
+ "node": ">= 10"
939
+ }
940
+ },
941
+ "node_modules/@napi-rs/keyring-linux-arm-gnueabihf": {
942
+ "version": "2.1.0",
943
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm-gnueabihf/-/keyring-linux-arm-gnueabihf-2.1.0.tgz",
944
+ "integrity": "sha512-JYgbCDk+giss7lKla8NTXhM/fLj+Hrfgr3xwKQ8jKn8qMD6vXLwYcfK8HJ9VoAcjIeYEUpCL6dRszJC5M4zFNg==",
945
+ "cpu": [
946
+ "arm"
947
+ ],
948
+ "license": "MIT",
949
+ "optional": true,
950
+ "os": [
951
+ "linux"
952
+ ],
953
+ "engines": {
954
+ "node": ">= 10"
955
+ }
956
+ },
957
+ "node_modules/@napi-rs/keyring-linux-arm64-gnu": {
958
+ "version": "2.1.0",
959
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm64-gnu/-/keyring-linux-arm64-gnu-2.1.0.tgz",
960
+ "integrity": "sha512-+PMONFQ+2GkBXG7vRG2spgR73bNCMeVpNopHoSmhj2E+5Gu6zJooRBjoaIZKj6hCyrOU8pXAhoZ22EEFQ/4YeQ==",
961
+ "cpu": [
962
+ "arm64"
963
+ ],
964
+ "libc": [
965
+ "glibc"
966
+ ],
967
+ "license": "MIT",
968
+ "optional": true,
969
+ "os": [
970
+ "linux"
971
+ ],
972
+ "engines": {
973
+ "node": ">= 10"
974
+ }
975
+ },
976
+ "node_modules/@napi-rs/keyring-linux-arm64-musl": {
977
+ "version": "2.1.0",
978
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm64-musl/-/keyring-linux-arm64-musl-2.1.0.tgz",
979
+ "integrity": "sha512-dKjiXKTHQjAS57hL0HVzLpW9XYNGFpfYkr/51FzIIvbZR08PAnzIDYKwShoNYGvjQP6+rDFf1a5Utl0aWwcFrA==",
980
+ "cpu": [
981
+ "arm64"
982
+ ],
983
+ "libc": [
984
+ "musl"
985
+ ],
986
+ "license": "MIT",
987
+ "optional": true,
988
+ "os": [
989
+ "linux"
990
+ ],
991
+ "engines": {
992
+ "node": ">= 10"
993
+ }
994
+ },
995
+ "node_modules/@napi-rs/keyring-linux-riscv64-gnu": {
996
+ "version": "2.1.0",
997
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-riscv64-gnu/-/keyring-linux-riscv64-gnu-2.1.0.tgz",
998
+ "integrity": "sha512-tqhb0ofhtEJ2+ZfmlKTDHbmIoNSz+SSTPWRgMfSVCgI4JVkqDdfcmIOcThZfRffJ3QI9C3Tng+rZL24acmD+GA==",
999
+ "cpu": [
1000
+ "riscv64"
1001
+ ],
1002
+ "libc": [
1003
+ "glibc"
1004
+ ],
1005
+ "license": "MIT",
1006
+ "optional": true,
1007
+ "os": [
1008
+ "linux"
1009
+ ],
1010
+ "engines": {
1011
+ "node": ">= 10"
1012
+ }
1013
+ },
1014
+ "node_modules/@napi-rs/keyring-linux-x64-gnu": {
1015
+ "version": "2.1.0",
1016
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-x64-gnu/-/keyring-linux-x64-gnu-2.1.0.tgz",
1017
+ "integrity": "sha512-7ZA0ssxfpuGXV8S5Ct1ZJoEL3sKg/8u7mIL4SK9/PwKBhxIq7K+FVcjnggNsuFnEhHTX+HYl9hHDrlX0odZnHg==",
1018
+ "cpu": [
1019
+ "x64"
1020
+ ],
1021
+ "libc": [
1022
+ "glibc"
1023
+ ],
1024
+ "license": "MIT",
1025
+ "optional": true,
1026
+ "os": [
1027
+ "linux"
1028
+ ],
1029
+ "engines": {
1030
+ "node": ">= 10"
1031
+ }
1032
+ },
1033
+ "node_modules/@napi-rs/keyring-linux-x64-musl": {
1034
+ "version": "2.1.0",
1035
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-x64-musl/-/keyring-linux-x64-musl-2.1.0.tgz",
1036
+ "integrity": "sha512-dI74Fzl03CrN2TEP7YVBtUBFgyRTRPyK1LMcIgAUfgW3o6f5SD1a8EsfT82+brpFOltjOhacIlFiYOkYtSI5Fg==",
1037
+ "cpu": [
1038
+ "x64"
1039
+ ],
1040
+ "libc": [
1041
+ "musl"
1042
+ ],
1043
+ "license": "MIT",
1044
+ "optional": true,
1045
+ "os": [
1046
+ "linux"
1047
+ ],
1048
+ "engines": {
1049
+ "node": ">= 10"
1050
+ }
1051
+ },
1052
+ "node_modules/@napi-rs/keyring-win32-arm64-msvc": {
1053
+ "version": "2.1.0",
1054
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-arm64-msvc/-/keyring-win32-arm64-msvc-2.1.0.tgz",
1055
+ "integrity": "sha512-SltrXXkEe9a+Jv8ConDkZW2Mdr0srpWurS7oYkYP1Mp07DNBpFyqawRnyo4p7ZvQU3e+R6irj/Fq0epCCvVUXA==",
1056
+ "cpu": [
1057
+ "arm64"
1058
+ ],
1059
+ "license": "MIT",
1060
+ "optional": true,
1061
+ "os": [
1062
+ "win32"
1063
+ ],
1064
+ "engines": {
1065
+ "node": ">= 10"
1066
+ }
1067
+ },
1068
+ "node_modules/@napi-rs/keyring-win32-ia32-msvc": {
1069
+ "version": "2.1.0",
1070
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-ia32-msvc/-/keyring-win32-ia32-msvc-2.1.0.tgz",
1071
+ "integrity": "sha512-l5wJQhqXkAfQ4FGxoRh0wMpL9VxVmfiYI5TTeOGNupuVsQvbHmysh8gfDQBBWVhyMENHJS2OqOSYIuqVjumAtA==",
1072
+ "cpu": [
1073
+ "ia32"
1074
+ ],
1075
+ "license": "MIT",
1076
+ "optional": true,
1077
+ "os": [
1078
+ "win32"
1079
+ ],
1080
+ "engines": {
1081
+ "node": ">= 10"
1082
+ }
1083
+ },
1084
+ "node_modules/@napi-rs/keyring-win32-x64-msvc": {
1085
+ "version": "2.1.0",
1086
+ "resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-x64-msvc/-/keyring-win32-x64-msvc-2.1.0.tgz",
1087
+ "integrity": "sha512-3zYwO7dhJiUNyv2te81ujXm2vGxHwgx+z2eBm0dTYe3aWpvKQVzpfxCp/7cViJs8duVYE04wVOgXiRhRCMEq2w==",
1088
+ "cpu": [
1089
+ "x64"
1090
+ ],
1091
+ "license": "MIT",
1092
+ "optional": true,
1093
+ "os": [
1094
+ "win32"
1095
+ ],
1096
+ "engines": {
1097
+ "node": ">= 10"
1098
+ }
1099
+ },
864
1100
  "node_modules/@oxc-project/types": {
865
1101
  "version": "0.150.0",
866
1102
  "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.150.0.tgz",
@@ -2404,9 +2640,9 @@
2404
2640
  "license": "MIT"
2405
2641
  },
2406
2642
  "node_modules/fast-uri": {
2407
- "version": "3.1.8",
2408
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz",
2409
- "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==",
2643
+ "version": "4.2.1",
2644
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-4.2.1.tgz",
2645
+ "integrity": "sha512-TmHQgewjHtMq1E5QKA0tOE0yeYGQs25KZC/ziJpubRtWI15W92e6vPFydWOeZBVROSHBYw/QhD9d5OefdD6LDg==",
2410
2646
  "funding": [
2411
2647
  {
2412
2648
  "type": "github",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ffschrattenecker/tm1-mcp-server",
3
- "version": "7.0.2",
3
+ "version": "8.1.0",
4
4
  "description": "MCP server for IBM Planning Analytics / TM1 — full model lifecycle via REST API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  "test:unit": "vitest run tests/unit",
44
44
  "test:property": "vitest run tests/property",
45
45
  "test:live": "vitest run --config vitest.live.config.ts",
46
+ "test:live:for": "tsx scripts/run-live-for.ts",
46
47
  "test:live:nightly": "node scripts/run-live-nightly.mjs",
47
48
  "contracts:record": "node scripts/record-wire-contracts.mjs",
48
49
  "contracts:verify": "node scripts/record-wire-contracts.mjs tm1-test --verify",
@@ -58,14 +59,16 @@
58
59
  "lint:tool-registration": "node scripts/check-tool-registration.mjs",
59
60
  "lint:input-naming": "node scripts/check-no-bare-name-input.mjs",
60
61
  "lint:mutation-envelope": "node scripts/check-mutation-envelope.mjs",
62
+ "lint:no-local-enc": "node scripts/check-no-local-enc.mjs",
61
63
  "lint:format": "prettier --check .",
62
64
  "format": "prettier --write .",
63
- "verify": "npm run typecheck && npm run typecheck:tests && npm run lint:no-flat-api && npm run lint:output-schema-budget && npm run lint:tool-surface-budget && npm run lint:tool-registration && npm run lint:input-naming && npm run lint:mutation-envelope && npm run lint:format && npm run lint:eslint && npm run coverage:check",
65
+ "audit:prod": "npm audit --omit=dev --audit-level=high",
66
+ "verify": "npm run audit:prod && npm run typecheck && npm run typecheck:tests && npm run lint:no-flat-api && npm run lint:output-schema-budget && npm run lint:tool-surface-budget && npm run lint:tool-registration && npm run lint:input-naming && npm run lint:mutation-envelope && npm run lint:no-local-enc && npm run lint:format && npm run lint:eslint && npm run coverage:check",
64
67
  "tools:list": "node scripts/gen-tool-list.mjs",
65
68
  "tools:update-readme": "node scripts/gen-tool-list.mjs --write-readme",
66
69
  "lint:eslint": "eslint .",
67
70
  "measure:tools": "node scripts/measure-tool-surface.mjs",
68
- "lint:tool-surface-budget": "node scripts/measure-tool-surface.mjs --top 0 --budget 133000"
71
+ "lint:tool-surface-budget": "node scripts/measure-tool-surface.mjs --top 0 --budget 140000"
69
72
  },
70
73
  "keywords": [
71
74
  "mcp",
@@ -78,13 +81,15 @@
78
81
  "node": ">=22.19.0"
79
82
  },
80
83
  "overrides": {
81
- "fast-uri": "^3.1.5",
84
+ "fast-uri": "^4.2.1",
82
85
  "ip-address": "^10.4.0"
83
86
  },
84
87
  "dependencies": {
85
- "@modelcontextprotocol/sdk": "1.30.0",
88
+ "@modelcontextprotocol/sdk": "1.30.1",
89
+ "@napi-rs/keyring": "^2.1.0",
86
90
  "dotenv": "^18.0.0",
87
91
  "pino": "^10.3.1",
92
+ "regexp-tree": "^0.1.27",
88
93
  "safe-regex": "^2.1.1",
89
94
  "undici": "^8.10.2",
90
95
  "zod": "4.6.5"
@@ -1,2 +0,0 @@
1
- export declare const registerMoveElement: import("../define-tool.js").ToolRegistrar;
2
- //# sourceMappingURL=move-element.d.ts.map
@@ -1,28 +0,0 @@
1
- import { z } from "zod";
2
- import { actionResponse } from "../format.js";
3
- import { MutationResultSchema } from "../schemas/items.js";
4
- import { WRITE } from "../annotations.js";
5
- import { defineTool } from "../define-tool.js";
6
- import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
7
- export const registerMoveElement = defineTool({
8
- name: "tm1_move_element",
9
- description: "Move an element to a new parent within a TM1 dimension hierarchy",
10
- annotations: WRITE,
11
- output: MutationResultSchema,
12
- input: {
13
- dimensionName: z.string().describe("Name of the dimension"),
14
- ...HIERARCHY_NAME_OPTIONAL,
15
- elementName: z.string().describe("Name of the element to move"),
16
- newParent: z.string().describe("Name of the new parent element"),
17
- weight: z
18
- .number()
19
- .optional()
20
- .describe("Weight for the parent-child relationship (default: 1)"),
21
- },
22
- handler: async ({ dimensionName, hierarchyName, elementName, newParent, weight }, tm1Client) => {
23
- const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
24
- await tm1Client.elements.move(dimensionName, hierarchy, elementName, newParent, weight);
25
- return actionResponse({ success: true, elementName, newParent });
26
- },
27
- });
28
- //# sourceMappingURL=move-element.js.map