@ffschrattenecker/tm1-mcp-server 6.0.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.
- package/CHANGELOG.md +1211 -0
- package/LICENSE +21 -0
- package/NOTICE +34 -0
- package/README.md +276 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.js +238 -0
- package/dist/http-transport.d.ts +8 -0
- package/dist/http-transport.js +132 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +164 -0
- package/dist/lib/callgraph/callGraph.d.ts +124 -0
- package/dist/lib/callgraph/callGraph.js +334 -0
- package/dist/lib/callgraph/choreGraph.d.ts +23 -0
- package/dist/lib/callgraph/choreGraph.js +102 -0
- package/dist/lib/callgraph/dataFlow.d.ts +74 -0
- package/dist/lib/callgraph/dataFlow.js +271 -0
- package/dist/lib/callgraph/datasourceMembership.d.ts +31 -0
- package/dist/lib/callgraph/datasourceMembership.js +142 -0
- package/dist/lib/callgraph/lintTypes.d.ts +28 -0
- package/dist/lib/callgraph/lintTypes.js +2 -0
- package/dist/lib/callgraph/mdxMembers.d.ts +29 -0
- package/dist/lib/callgraph/mdxMembers.js +97 -0
- package/dist/lib/callgraph/referenceIndex.d.ts +179 -0
- package/dist/lib/callgraph/referenceIndex.js +584 -0
- package/dist/lib/callgraph/rulesLinter.d.ts +55 -0
- package/dist/lib/callgraph/rulesLinter.js +776 -0
- package/dist/lib/callgraph/rulesParser.d.ts +26 -0
- package/dist/lib/callgraph/rulesParser.js +71 -0
- package/dist/lib/callgraph/subsetUsage.d.ts +16 -0
- package/dist/lib/callgraph/subsetUsage.js +134 -0
- package/dist/lib/callgraph/tiParser.d.ts +21 -0
- package/dist/lib/callgraph/tiParser.js +672 -0
- package/dist/lib/callgraph/tiSignatures.d.ts +32 -0
- package/dist/lib/callgraph/tiSignatures.js +6185 -0
- package/dist/lib/callgraph/tm1-adapter.d.ts +32 -0
- package/dist/lib/callgraph/tm1-adapter.js +159 -0
- package/dist/lib/callgraph/types.d.ts +53 -0
- package/dist/lib/callgraph/types.js +2 -0
- package/dist/lib/callgraph/variableEnv.d.ts +86 -0
- package/dist/lib/callgraph/variableEnv.js +214 -0
- package/dist/lib/cell-address.d.ts +12 -0
- package/dist/lib/cell-address.js +71 -0
- package/dist/lib/complexity/antipatterns.d.ts +22 -0
- package/dist/lib/complexity/antipatterns.js +302 -0
- package/dist/lib/complexity/comment-classifier.d.ts +24 -0
- package/dist/lib/complexity/comment-classifier.js +43 -0
- package/dist/lib/complexity/cross-process.d.ts +78 -0
- package/dist/lib/complexity/cross-process.js +114 -0
- package/dist/lib/complexity/process-metrics.d.ts +78 -0
- package/dist/lib/complexity/process-metrics.js +278 -0
- package/dist/lib/complexity/rules-metrics.d.ts +31 -0
- package/dist/lib/complexity/rules-metrics.js +99 -0
- package/dist/lib/concurrency.d.ts +11 -0
- package/dist/lib/concurrency.js +27 -0
- package/dist/lib/control-name.d.ts +10 -0
- package/dist/lib/control-name.js +10 -0
- package/dist/lib/coordinate-error.d.ts +3 -0
- package/dist/lib/coordinate-error.js +29 -0
- package/dist/lib/credential-format.d.ts +23 -0
- package/dist/lib/credential-format.js +25 -0
- package/dist/lib/cube-stats/fetcher.d.ts +106 -0
- package/dist/lib/cube-stats/fetcher.js +194 -0
- package/dist/lib/feeders/brackets.d.ts +47 -0
- package/dist/lib/feeders/brackets.js +195 -0
- package/dist/lib/feeders/element-type-cache.d.ts +42 -0
- package/dist/lib/feeders/element-type-cache.js +86 -0
- package/dist/lib/feeders/static-heuristics.d.ts +101 -0
- package/dist/lib/feeders/static-heuristics.js +202 -0
- package/dist/lib/git-process.d.ts +67 -0
- package/dist/lib/git-process.js +243 -0
- package/dist/lib/mask-secrets.d.ts +10 -0
- package/dist/lib/mask-secrets.js +99 -0
- package/dist/lib/mdx.d.ts +3 -0
- package/dist/lib/mdx.js +13 -0
- package/dist/lib/naming/odata-filter.d.ts +15 -0
- package/dist/lib/naming/odata-filter.js +81 -0
- package/dist/lib/naming/rules.d.ts +34 -0
- package/dist/lib/naming/rules.js +215 -0
- package/dist/lib/pro-parser.d.ts +19 -0
- package/dist/lib/pro-parser.js +260 -0
- package/dist/lib/pro-serializer.d.ts +19 -0
- package/dist/lib/pro-serializer.js +170 -0
- package/dist/lib/process-parts-schema.d.ts +45 -0
- package/dist/lib/process-parts-schema.js +46 -0
- package/dist/lib/process-refs.d.ts +88 -0
- package/dist/lib/process-refs.js +441 -0
- package/dist/lib/rules-outline.d.ts +29 -0
- package/dist/lib/rules-outline.js +68 -0
- package/dist/lib/rules-patch.d.ts +6 -0
- package/dist/lib/rules-patch.js +59 -0
- package/dist/lib/safe-regex.d.ts +15 -0
- package/dist/lib/safe-regex.js +37 -0
- package/dist/lib/sample-cells.d.ts +48 -0
- package/dist/lib/sample-cells.js +146 -0
- package/dist/lib/slim-json-schema.d.ts +20 -0
- package/dist/lib/slim-json-schema.js +68 -0
- package/dist/lib/strip-comments.d.ts +23 -0
- package/dist/lib/strip-comments.js +61 -0
- package/dist/lib/tm1-events.d.ts +16 -0
- package/dist/lib/tm1-events.js +29 -0
- package/dist/lib/v12-compat/deprecated-ti.d.ts +17 -0
- package/dist/lib/v12-compat/deprecated-ti.js +257 -0
- package/dist/lib/v12-compat/scanner.d.ts +10 -0
- package/dist/lib/v12-compat/scanner.js +43 -0
- package/dist/lib/variables-ui-data.d.ts +26 -0
- package/dist/lib/variables-ui-data.js +77 -0
- package/dist/load-env.d.ts +2 -0
- package/dist/load-env.js +29 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.js +60 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.js +141 -0
- package/dist/resources/index.d.ts +5 -0
- package/dist/resources/index.js +237 -0
- package/dist/resources/list-handler.d.ts +40 -0
- package/dist/resources/list-handler.js +86 -0
- package/dist/resources/subscriptions.d.ts +19 -0
- package/dist/resources/subscriptions.js +80 -0
- package/dist/schemas/cells.d.ts +17 -0
- package/dist/schemas/cells.js +13 -0
- package/dist/schemas/common.d.ts +16 -0
- package/dist/schemas/common.js +14 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +23 -0
- package/dist/schemas/metadata.d.ts +70 -0
- package/dist/schemas/metadata.js +47 -0
- package/dist/schemas/monitoring.d.ts +95 -0
- package/dist/schemas/monitoring.js +69 -0
- package/dist/schemas/processes.d.ts +74 -0
- package/dist/schemas/processes.js +66 -0
- package/dist/schemas/scheduling.d.ts +13 -0
- package/dist/schemas/scheduling.js +13 -0
- package/dist/schemas/security.d.ts +19 -0
- package/dist/schemas/security.js +16 -0
- package/dist/schemas/subsets.d.ts +12 -0
- package/dist/schemas/subsets.js +12 -0
- package/dist/schemas/views.d.ts +9 -0
- package/dist/schemas/views.js +9 -0
- package/dist/session-manager.d.ts +79 -0
- package/dist/session-manager.js +281 -0
- package/dist/tm1-client/connection/profile.d.ts +13 -0
- package/dist/tm1-client/connection/profile.js +99 -0
- package/dist/tm1-client/dispatcher.d.ts +5 -0
- package/dist/tm1-client/dispatcher.js +31 -0
- package/dist/tm1-client/http.d.ts +81 -0
- package/dist/tm1-client/http.js +547 -0
- package/dist/tm1-client/services/batch-service.d.ts +123 -0
- package/dist/tm1-client/services/batch-service.js +455 -0
- package/dist/tm1-client/services/cell-service.d.ts +71 -0
- package/dist/tm1-client/services/cell-service.js +333 -0
- package/dist/tm1-client/services/cellset-transform.d.ts +26 -0
- package/dist/tm1-client/services/cellset-transform.js +80 -0
- package/dist/tm1-client/services/chore-service.d.ts +68 -0
- package/dist/tm1-client/services/chore-service.js +179 -0
- package/dist/tm1-client/services/chore-status.d.ts +11 -0
- package/dist/tm1-client/services/chore-status.js +127 -0
- package/dist/tm1-client/services/cube-service.d.ts +134 -0
- package/dist/tm1-client/services/cube-service.js +294 -0
- package/dist/tm1-client/services/dimension-service.d.ts +118 -0
- package/dist/tm1-client/services/dimension-service.js +249 -0
- package/dist/tm1-client/services/element-service.d.ts +245 -0
- package/dist/tm1-client/services/element-service.js +809 -0
- package/dist/tm1-client/services/fallback.d.ts +44 -0
- package/dist/tm1-client/services/fallback.js +72 -0
- package/dist/tm1-client/services/file-service.d.ts +53 -0
- package/dist/tm1-client/services/file-service.js +218 -0
- package/dist/tm1-client/services/hierarchy-service.d.ts +129 -0
- package/dist/tm1-client/services/hierarchy-service.js +332 -0
- package/dist/tm1-client/services/monitoring-service.d.ts +34 -0
- package/dist/tm1-client/services/monitoring-service.js +123 -0
- package/dist/tm1-client/services/odata-page.d.ts +71 -0
- package/dist/tm1-client/services/odata-page.js +87 -0
- package/dist/tm1-client/services/process-service.d.ts +278 -0
- package/dist/tm1-client/services/process-service.js +874 -0
- package/dist/tm1-client/services/process-status.d.ts +21 -0
- package/dist/tm1-client/services/process-status.js +89 -0
- package/dist/tm1-client/services/security-service.d.ts +50 -0
- package/dist/tm1-client/services/security-service.js +93 -0
- package/dist/tm1-client/services/server-service.d.ts +116 -0
- package/dist/tm1-client/services/server-service.js +504 -0
- package/dist/tm1-client/services/subset-service.d.ts +37 -0
- package/dist/tm1-client/services/subset-service.js +122 -0
- package/dist/tm1-client/services/view-service.d.ts +46 -0
- package/dist/tm1-client/services/view-service.js +287 -0
- package/dist/tm1-client.d.ts +56 -0
- package/dist/tm1-client.js +126 -0
- package/dist/tools/analysis/analyze-callgraph.d.ts +28 -0
- package/dist/tools/analysis/analyze-callgraph.js +350 -0
- package/dist/tools/analysis/analyze-chore-graph.d.ts +2 -0
- package/dist/tools/analysis/analyze-chore-graph.js +148 -0
- package/dist/tools/analysis/analyze-object-usage.d.ts +2 -0
- package/dist/tools/analysis/analyze-object-usage.js +143 -0
- package/dist/tools/analysis/audit-complexity.d.ts +2 -0
- package/dist/tools/analysis/audit-complexity.js +255 -0
- package/dist/tools/analysis/audit-feeders.d.ts +2 -0
- package/dist/tools/analysis/audit-feeders.js +417 -0
- package/dist/tools/analysis/audit-naming.d.ts +2 -0
- package/dist/tools/analysis/audit-naming.js +379 -0
- package/dist/tools/analysis/check-v12-readiness.d.ts +2 -0
- package/dist/tools/analysis/check-v12-readiness.js +136 -0
- package/dist/tools/analysis/find-orphan-dimensions.d.ts +2 -0
- package/dist/tools/analysis/find-orphan-dimensions.js +55 -0
- package/dist/tools/analysis/invalidate-callgraph-cache.d.ts +2 -0
- package/dist/tools/analysis/invalidate-callgraph-cache.js +40 -0
- package/dist/tools/analysis/trace-data-flow.d.ts +2 -0
- package/dist/tools/analysis/trace-data-flow.js +138 -0
- package/dist/tools/annotations.d.ts +12 -0
- package/dist/tools/annotations.js +61 -0
- package/dist/tools/celldata/check-feeders.d.ts +2 -0
- package/dist/tools/celldata/check-feeders.js +48 -0
- package/dist/tools/celldata/check-writable-coords.d.ts +2 -0
- package/dist/tools/celldata/check-writable-coords.js +126 -0
- package/dist/tools/celldata/execute-mdx.d.ts +17 -0
- package/dist/tools/celldata/execute-mdx.js +126 -0
- package/dist/tools/celldata/get-cell-value.d.ts +2 -0
- package/dist/tools/celldata/get-cell-value.js +30 -0
- package/dist/tools/celldata/get-view-definition.d.ts +2 -0
- package/dist/tools/celldata/get-view-definition.js +29 -0
- package/dist/tools/celldata/get-view.d.ts +2 -0
- package/dist/tools/celldata/get-view.js +55 -0
- package/dist/tools/celldata/sample-cells.d.ts +2 -0
- package/dist/tools/celldata/sample-cells.js +101 -0
- package/dist/tools/celldata/trace-cell-calculation.d.ts +2 -0
- package/dist/tools/celldata/trace-cell-calculation.js +53 -0
- package/dist/tools/celldata/trace-feeders.d.ts +2 -0
- package/dist/tools/celldata/trace-feeders.js +44 -0
- package/dist/tools/celldata/write-cells.d.ts +2 -0
- package/dist/tools/celldata/write-cells.js +65 -0
- package/dist/tools/confirm.d.ts +10 -0
- package/dist/tools/confirm.js +64 -0
- package/dist/tools/define-tool.d.ts +51 -0
- package/dist/tools/define-tool.js +49 -0
- package/dist/tools/dimension-management/bulk-upsert-elements.d.ts +2 -0
- package/dist/tools/dimension-management/bulk-upsert-elements.js +103 -0
- package/dist/tools/dimension-management/create-dimension.d.ts +2 -0
- package/dist/tools/dimension-management/create-dimension.js +22 -0
- package/dist/tools/dimension-management/create-element-attribute.d.ts +2 -0
- package/dist/tools/dimension-management/create-element-attribute.js +26 -0
- package/dist/tools/dimension-management/create-element.d.ts +2 -0
- package/dist/tools/dimension-management/create-element.js +31 -0
- package/dist/tools/dimension-management/create-hierarchy.d.ts +2 -0
- package/dist/tools/dimension-management/create-hierarchy.js +22 -0
- package/dist/tools/dimension-management/delete-dimension.d.ts +2 -0
- package/dist/tools/dimension-management/delete-dimension.js +25 -0
- package/dist/tools/dimension-management/delete-element.d.ts +2 -0
- package/dist/tools/dimension-management/delete-element.js +26 -0
- package/dist/tools/dimension-management/delete-elements.d.ts +2 -0
- package/dist/tools/dimension-management/delete-elements.js +44 -0
- package/dist/tools/dimension-management/delete-hierarchy.d.ts +2 -0
- package/dist/tools/dimension-management/delete-hierarchy.js +35 -0
- package/dist/tools/dimension-management/get-element-attribute-values.d.ts +2 -0
- package/dist/tools/dimension-management/get-element-attribute-values.js +77 -0
- package/dist/tools/dimension-management/list-element-attributes.d.ts +2 -0
- package/dist/tools/dimension-management/list-element-attributes.js +31 -0
- package/dist/tools/dimension-management/move-element.d.ts +2 -0
- package/dist/tools/dimension-management/move-element.js +28 -0
- package/dist/tools/dimension-management/update-element-attribute-value.d.ts +2 -0
- package/dist/tools/dimension-management/update-element-attribute-value.js +80 -0
- package/dist/tools/dimension-management/update-element.d.ts +2 -0
- package/dist/tools/dimension-management/update-element.js +35 -0
- package/dist/tools/error-format.d.ts +22 -0
- package/dist/tools/error-format.js +130 -0
- package/dist/tools/fileops/delete-file.d.ts +2 -0
- package/dist/tools/fileops/delete-file.js +32 -0
- package/dist/tools/fileops/get-file-content.d.ts +2 -0
- package/dist/tools/fileops/get-file-content.js +76 -0
- package/dist/tools/fileops/list-files.d.ts +2 -0
- package/dist/tools/fileops/list-files.js +43 -0
- package/dist/tools/fileops/search-files.d.ts +2 -0
- package/dist/tools/fileops/search-files.js +76 -0
- package/dist/tools/fileops/upload-file.d.ts +2 -0
- package/dist/tools/fileops/upload-file.js +69 -0
- package/dist/tools/format.d.ts +57 -0
- package/dist/tools/format.js +157 -0
- package/dist/tools/hierarchy.d.ts +6 -0
- package/dist/tools/hierarchy.js +27 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +263 -0
- package/dist/tools/local-file.d.ts +16 -0
- package/dist/tools/local-file.js +88 -0
- package/dist/tools/metadata/get-ancestors.d.ts +2 -0
- package/dist/tools/metadata/get-ancestors.js +36 -0
- package/dist/tools/metadata/get-descendants.d.ts +2 -0
- package/dist/tools/metadata/get-descendants.js +64 -0
- package/dist/tools/metadata/get-hierarchy.d.ts +2 -0
- package/dist/tools/metadata/get-hierarchy.js +130 -0
- package/dist/tools/metadata/list-chores.d.ts +2 -0
- package/dist/tools/metadata/list-chores.js +62 -0
- package/dist/tools/metadata/list-cubes.d.ts +2 -0
- package/dist/tools/metadata/list-cubes.js +128 -0
- package/dist/tools/metadata/list-dimensions.d.ts +2 -0
- package/dist/tools/metadata/list-dimensions.js +131 -0
- package/dist/tools/metadata/list-processes-grouped.d.ts +2 -0
- package/dist/tools/metadata/list-processes-grouped.js +96 -0
- package/dist/tools/metadata/list-processes.d.ts +2 -0
- package/dist/tools/metadata/list-processes.js +108 -0
- package/dist/tools/metadata/resolve-default-members.d.ts +2 -0
- package/dist/tools/metadata/resolve-default-members.js +46 -0
- package/dist/tools/model-building/check-cube-rule.d.ts +2 -0
- package/dist/tools/model-building/check-cube-rule.js +51 -0
- package/dist/tools/model-building/clear-cube.d.ts +2 -0
- package/dist/tools/model-building/clear-cube.js +46 -0
- package/dist/tools/model-building/create-cube.d.ts +2 -0
- package/dist/tools/model-building/create-cube.js +34 -0
- package/dist/tools/model-building/delete-cube.d.ts +2 -0
- package/dist/tools/model-building/delete-cube.js +27 -0
- package/dist/tools/model-building/get-all-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/get-all-cube-rules.js +149 -0
- package/dist/tools/model-building/get-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/get-cube-rules.js +69 -0
- package/dist/tools/model-building/rules-source.d.ts +21 -0
- package/dist/tools/model-building/rules-source.js +49 -0
- package/dist/tools/model-building/search-rules.d.ts +2 -0
- package/dist/tools/model-building/search-rules.js +132 -0
- package/dist/tools/model-building/set-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/set-cube-rules.js +81 -0
- package/dist/tools/model-building/unload-cube.d.ts +2 -0
- package/dist/tools/model-building/unload-cube.js +23 -0
- package/dist/tools/operations/diagnose-process-error.d.ts +2 -0
- package/dist/tools/operations/diagnose-process-error.js +178 -0
- package/dist/tools/operations/error-log-helpers.d.ts +25 -0
- package/dist/tools/operations/error-log-helpers.js +57 -0
- package/dist/tools/operations/get-audit-log.d.ts +2 -0
- package/dist/tools/operations/get-audit-log.js +70 -0
- package/dist/tools/operations/get-cube-stats.d.ts +2 -0
- package/dist/tools/operations/get-cube-stats.js +107 -0
- package/dist/tools/operations/get-error-log-content.d.ts +2 -0
- package/dist/tools/operations/get-error-log-content.js +164 -0
- package/dist/tools/operations/get-jobs.d.ts +3 -0
- package/dist/tools/operations/get-jobs.js +51 -0
- package/dist/tools/operations/get-message-log.d.ts +2 -0
- package/dist/tools/operations/get-message-log.js +63 -0
- package/dist/tools/operations/get-server-info.d.ts +2 -0
- package/dist/tools/operations/get-server-info.js +180 -0
- package/dist/tools/operations/get-server-state.d.ts +2 -0
- package/dist/tools/operations/get-server-state.js +129 -0
- package/dist/tools/operations/get-sessions.d.ts +2 -0
- package/dist/tools/operations/get-sessions.js +76 -0
- package/dist/tools/operations/get-threads.d.ts +3 -0
- package/dist/tools/operations/get-threads.js +50 -0
- package/dist/tools/operations/get-transaction-log.d.ts +2 -0
- package/dist/tools/operations/get-transaction-log.js +63 -0
- package/dist/tools/operations/list-error-logs.d.ts +8 -0
- package/dist/tools/operations/list-error-logs.js +157 -0
- package/dist/tools/operations/save-data.d.ts +2 -0
- package/dist/tools/operations/save-data.js +50 -0
- package/dist/tools/pagination.d.ts +32 -0
- package/dist/tools/pagination.js +116 -0
- package/dist/tools/scheduling/create-chore.d.ts +2 -0
- package/dist/tools/scheduling/create-chore.js +93 -0
- package/dist/tools/scheduling/delete-chore.d.ts +2 -0
- package/dist/tools/scheduling/delete-chore.js +22 -0
- package/dist/tools/scheduling/execute-chore.d.ts +2 -0
- package/dist/tools/scheduling/execute-chore.js +52 -0
- package/dist/tools/scheduling/toggle-chore.d.ts +2 -0
- package/dist/tools/scheduling/toggle-chore.js +22 -0
- package/dist/tools/scheduling/update-chore.d.ts +2 -0
- package/dist/tools/scheduling/update-chore.js +71 -0
- package/dist/tools/schemas/common.d.ts +10 -0
- package/dist/tools/schemas/common.js +23 -0
- package/dist/tools/schemas/items-analysis.d.ts +394 -0
- package/dist/tools/schemas/items-analysis.js +419 -0
- package/dist/tools/schemas/items-cells.d.ts +70 -0
- package/dist/tools/schemas/items-cells.js +65 -0
- package/dist/tools/schemas/items-common.d.ts +18 -0
- package/dist/tools/schemas/items-common.js +39 -0
- package/dist/tools/schemas/items-fileops.d.ts +11 -0
- package/dist/tools/schemas/items-fileops.js +13 -0
- package/dist/tools/schemas/items-metadata.d.ts +262 -0
- package/dist/tools/schemas/items-metadata.js +184 -0
- package/dist/tools/schemas/items-monitoring.d.ts +79 -0
- package/dist/tools/schemas/items-monitoring.js +78 -0
- package/dist/tools/schemas/items-processes.d.ts +279 -0
- package/dist/tools/schemas/items-processes.js +235 -0
- package/dist/tools/schemas/items-scheduling.d.ts +25 -0
- package/dist/tools/schemas/items-scheduling.js +26 -0
- package/dist/tools/schemas/items-security.d.ts +19 -0
- package/dist/tools/schemas/items-security.js +12 -0
- package/dist/tools/schemas/items-subsets.d.ts +2 -0
- package/dist/tools/schemas/items-subsets.js +4 -0
- package/dist/tools/schemas/items-views.d.ts +38 -0
- package/dist/tools/schemas/items-views.js +26 -0
- package/dist/tools/schemas/items.d.ts +12 -0
- package/dist/tools/schemas/items.js +23 -0
- package/dist/tools/schemas/markdown-capable.d.ts +21 -0
- package/dist/tools/schemas/markdown-capable.js +58 -0
- package/dist/tools/schemas/output-schema.d.ts +24 -0
- package/dist/tools/schemas/output-schema.js +25 -0
- package/dist/tools/security/assign-client-group.d.ts +2 -0
- package/dist/tools/security/assign-client-group.js +20 -0
- package/dist/tools/security/create-client.d.ts +2 -0
- package/dist/tools/security/create-client.js +28 -0
- package/dist/tools/security/delete-client.d.ts +2 -0
- package/dist/tools/security/delete-client.js +22 -0
- package/dist/tools/security/get-client.d.ts +2 -0
- package/dist/tools/security/get-client.js +20 -0
- package/dist/tools/security/list-clients.d.ts +2 -0
- package/dist/tools/security/list-clients.js +86 -0
- package/dist/tools/security/list-groups.d.ts +2 -0
- package/dist/tools/security/list-groups.js +43 -0
- package/dist/tools/security/remove-client-group.d.ts +2 -0
- package/dist/tools/security/remove-client-group.js +27 -0
- package/dist/tools/security/update-client.d.ts +2 -0
- package/dist/tools/security/update-client.js +22 -0
- package/dist/tools/subsets/create-subset.d.ts +2 -0
- package/dist/tools/subsets/create-subset.js +44 -0
- package/dist/tools/subsets/delete-subset.d.ts +2 -0
- package/dist/tools/subsets/delete-subset.js +26 -0
- package/dist/tools/subsets/get-subset.d.ts +2 -0
- package/dist/tools/subsets/get-subset.js +29 -0
- package/dist/tools/subsets/list-subsets.d.ts +2 -0
- package/dist/tools/subsets/list-subsets.js +36 -0
- package/dist/tools/subsets/update-subset.d.ts +2 -0
- package/dist/tools/subsets/update-subset.js +33 -0
- package/dist/tools/ti-development/check-process-code.d.ts +2 -0
- package/dist/tools/ti-development/check-process-code.js +96 -0
- package/dist/tools/ti-development/compile-process.d.ts +2 -0
- package/dist/tools/ti-development/compile-process.js +32 -0
- package/dist/tools/ti-development/copy-process.d.ts +2 -0
- package/dist/tools/ti-development/copy-process.js +32 -0
- package/dist/tools/ti-development/delete-process.d.ts +2 -0
- package/dist/tools/ti-development/delete-process.js +26 -0
- package/dist/tools/ti-development/diff-process-with-file.d.ts +2 -0
- package/dist/tools/ti-development/diff-process-with-file.js +208 -0
- package/dist/tools/ti-development/diff-processes.d.ts +2 -0
- package/dist/tools/ti-development/diff-processes.js +312 -0
- package/dist/tools/ti-development/execute-process.d.ts +8 -0
- package/dist/tools/ti-development/execute-process.js +109 -0
- package/dist/tools/ti-development/export-process-to-git.d.ts +2 -0
- package/dist/tools/ti-development/export-process-to-git.js +113 -0
- package/dist/tools/ti-development/export-process-to-pro.d.ts +2 -0
- package/dist/tools/ti-development/export-process-to-pro.js +117 -0
- package/dist/tools/ti-development/get-all-processes-code.d.ts +2 -0
- package/dist/tools/ti-development/get-all-processes-code.js +131 -0
- package/dist/tools/ti-development/get-process-code.d.ts +2 -0
- package/dist/tools/ti-development/get-process-code.js +100 -0
- package/dist/tools/ti-development/get-process-datasource.d.ts +2 -0
- package/dist/tools/ti-development/get-process-datasource.js +20 -0
- package/dist/tools/ti-development/get-process-parameters.d.ts +2 -0
- package/dist/tools/ti-development/get-process-parameters.js +25 -0
- package/dist/tools/ti-development/get-process-variables.d.ts +2 -0
- package/dist/tools/ti-development/get-process-variables.js +38 -0
- package/dist/tools/ti-development/get-process.d.ts +2 -0
- package/dist/tools/ti-development/get-process.js +163 -0
- package/dist/tools/ti-development/import-pro-file.d.ts +2 -0
- package/dist/tools/ti-development/import-pro-file.js +153 -0
- package/dist/tools/ti-development/import-process-from-git.d.ts +2 -0
- package/dist/tools/ti-development/import-process-from-git.js +198 -0
- package/dist/tools/ti-development/install-pro-bundle.d.ts +2 -0
- package/dist/tools/ti-development/install-pro-bundle.js +288 -0
- package/dist/tools/ti-development/preflight.d.ts +39 -0
- package/dist/tools/ti-development/preflight.js +56 -0
- package/dist/tools/ti-development/process-backup.d.ts +29 -0
- package/dist/tools/ti-development/process-backup.js +118 -0
- package/dist/tools/ti-development/search-code.d.ts +2 -0
- package/dist/tools/ti-development/search-code.js +208 -0
- package/dist/tools/ti-development/upsert-process.d.ts +2 -0
- package/dist/tools/ti-development/upsert-process.js +167 -0
- package/dist/tools/ti-development/validate-process-refs.d.ts +2 -0
- package/dist/tools/ti-development/validate-process-refs.js +73 -0
- package/dist/tools/views/create-mdx-view.d.ts +2 -0
- package/dist/tools/views/create-mdx-view.js +21 -0
- package/dist/tools/views/create-native-view.d.ts +2 -0
- package/dist/tools/views/create-native-view.js +81 -0
- package/dist/tools/views/delete-view.d.ts +2 -0
- package/dist/tools/views/delete-view.js +23 -0
- package/dist/tools/views/list-views.d.ts +2 -0
- package/dist/tools/views/list-views.js +32 -0
- package/dist/tools/with-annotations.d.ts +6 -0
- package/dist/tools/with-annotations.js +339 -0
- package/dist/types.d.ts +409 -0
- package/dist/types.js +91 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +18 -0
- package/package.json +107 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Optional `hierarchyName` that defaults to the dimension's same-named
|
|
2
|
+
// hierarchy. Every TM1 dimension has one, and it is what callers mean in the
|
|
3
|
+
// overwhelming majority of calls — omitting the field was the single most
|
|
4
|
+
// common schema error (-32602) in recorded usage.
|
|
5
|
+
//
|
|
6
|
+
// Pattern in a tool registration:
|
|
7
|
+
//
|
|
8
|
+
// input: { dimensionName: z.string(), ...HIERARCHY_NAME_OPTIONAL, ... },
|
|
9
|
+
// handler: async ({ dimensionName, hierarchyName }) => {
|
|
10
|
+
// const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
11
|
+
// ...
|
|
12
|
+
// }
|
|
13
|
+
//
|
|
14
|
+
// Resolve before any confirm check or service call so both see the effective
|
|
15
|
+
// name. Tools whose hierarchy is the subject of a create/delete keep the field
|
|
16
|
+
// required: the default hierarchy cannot be created or deleted on its own.
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
export const HIERARCHY_NAME_OPTIONAL = {
|
|
19
|
+
hierarchyName: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Hierarchy within the dimension. Defaults to the dimension's same-named hierarchy."),
|
|
23
|
+
};
|
|
24
|
+
export function resolveHierarchy(dimensionName, hierarchyName) {
|
|
25
|
+
return hierarchyName ?? dimensionName;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=hierarchy.js.map
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// Metadata tools
|
|
2
|
+
import { registerListCubes } from "./metadata/list-cubes.js";
|
|
3
|
+
import { registerListDimensions } from "./metadata/list-dimensions.js";
|
|
4
|
+
import { registerGetHierarchy } from "./metadata/get-hierarchy.js";
|
|
5
|
+
import { registerGetDescendants } from "./metadata/get-descendants.js";
|
|
6
|
+
import { registerGetAncestors } from "./metadata/get-ancestors.js";
|
|
7
|
+
import { registerResolveDefaultMembers } from "./metadata/resolve-default-members.js";
|
|
8
|
+
import { registerListProcesses } from "./metadata/list-processes.js";
|
|
9
|
+
import { registerListProcessesGrouped } from "./metadata/list-processes-grouped.js";
|
|
10
|
+
import { registerListChores } from "./metadata/list-chores.js";
|
|
11
|
+
// Cell data tools
|
|
12
|
+
import { registerGetCellValue } from "./celldata/get-cell-value.js";
|
|
13
|
+
import { registerExecuteMdx } from "./celldata/execute-mdx.js";
|
|
14
|
+
import { registerGetView } from "./celldata/get-view.js";
|
|
15
|
+
import { registerGetViewDefinition } from "./celldata/get-view-definition.js";
|
|
16
|
+
import { registerSampleCells } from "./celldata/sample-cells.js";
|
|
17
|
+
import { registerWriteCells } from "./celldata/write-cells.js";
|
|
18
|
+
import { registerCheckFeeders } from "./celldata/check-feeders.js";
|
|
19
|
+
import { registerTraceFeeders } from "./celldata/trace-feeders.js";
|
|
20
|
+
import { registerTraceCellCalculation } from "./celldata/trace-cell-calculation.js";
|
|
21
|
+
// TI development tools (process CRUD, execution, code, params, datasource)
|
|
22
|
+
import { registerExecuteProcess } from "./ti-development/execute-process.js";
|
|
23
|
+
import { registerGetProcessParameters } from "./ti-development/get-process-parameters.js";
|
|
24
|
+
import { registerGetProcessCode } from "./ti-development/get-process-code.js";
|
|
25
|
+
import { registerGetProcess } from "./ti-development/get-process.js";
|
|
26
|
+
import { registerGetProcessDatasource } from "./ti-development/get-process-datasource.js";
|
|
27
|
+
import { registerGetProcessVariables } from "./ti-development/get-process-variables.js";
|
|
28
|
+
import { registerDeleteProcess } from "./ti-development/delete-process.js";
|
|
29
|
+
import { registerCopyProcess } from "./ti-development/copy-process.js";
|
|
30
|
+
import { registerCompileProcess } from "./ti-development/compile-process.js";
|
|
31
|
+
import { registerCheckProcessCode } from "./ti-development/check-process-code.js";
|
|
32
|
+
import { registerGetAllProcessesCode } from "./ti-development/get-all-processes-code.js";
|
|
33
|
+
import { registerSearchCode } from "./ti-development/search-code.js";
|
|
34
|
+
import { registerImportProFile } from "./ti-development/import-pro-file.js";
|
|
35
|
+
import { registerExportProcessToPro } from "./ti-development/export-process-to-pro.js";
|
|
36
|
+
import { registerDiffProcessWithFile } from "./ti-development/diff-process-with-file.js";
|
|
37
|
+
import { registerDiffProcesses } from "./ti-development/diff-processes.js";
|
|
38
|
+
import { registerValidateProcessRefs } from "./ti-development/validate-process-refs.js";
|
|
39
|
+
import { registerUpsertProcess } from "./ti-development/upsert-process.js";
|
|
40
|
+
import { registerInstallProBundle } from "./ti-development/install-pro-bundle.js";
|
|
41
|
+
import { registerExportProcessToGit } from "./ti-development/export-process-to-git.js";
|
|
42
|
+
import { registerImportProcessFromGit } from "./ti-development/import-process-from-git.js";
|
|
43
|
+
import { registerCheckWritableCoords } from "./celldata/check-writable-coords.js";
|
|
44
|
+
// Dimension management tools
|
|
45
|
+
import { registerCreateElement } from "./dimension-management/create-element.js";
|
|
46
|
+
import { registerUpdateElement } from "./dimension-management/update-element.js";
|
|
47
|
+
import { registerDeleteElement } from "./dimension-management/delete-element.js";
|
|
48
|
+
import { registerDeleteElements } from "./dimension-management/delete-elements.js";
|
|
49
|
+
import { registerMoveElement } from "./dimension-management/move-element.js";
|
|
50
|
+
import { registerCreateDimension } from "./dimension-management/create-dimension.js";
|
|
51
|
+
import { registerDeleteDimension } from "./dimension-management/delete-dimension.js";
|
|
52
|
+
import { registerBulkUpsertElements } from "./dimension-management/bulk-upsert-elements.js";
|
|
53
|
+
import { registerListElementAttributes } from "./dimension-management/list-element-attributes.js";
|
|
54
|
+
import { registerCreateElementAttribute } from "./dimension-management/create-element-attribute.js";
|
|
55
|
+
import { registerGetElementAttributeValues } from "./dimension-management/get-element-attribute-values.js";
|
|
56
|
+
import { registerUpdateElementAttributeValue } from "./dimension-management/update-element-attribute-value.js";
|
|
57
|
+
import { registerCreateHierarchy } from "./dimension-management/create-hierarchy.js";
|
|
58
|
+
import { registerDeleteHierarchy } from "./dimension-management/delete-hierarchy.js";
|
|
59
|
+
// Subset tools
|
|
60
|
+
import { registerListSubsets } from "./subsets/list-subsets.js";
|
|
61
|
+
import { registerGetSubset } from "./subsets/get-subset.js";
|
|
62
|
+
import { registerCreateSubset } from "./subsets/create-subset.js";
|
|
63
|
+
import { registerUpdateSubset } from "./subsets/update-subset.js";
|
|
64
|
+
import { registerDeleteSubset } from "./subsets/delete-subset.js";
|
|
65
|
+
// Model building tools
|
|
66
|
+
import { registerCreateCube } from "./model-building/create-cube.js";
|
|
67
|
+
import { registerDeleteCube } from "./model-building/delete-cube.js";
|
|
68
|
+
import { registerGetCubeRules } from "./model-building/get-cube-rules.js";
|
|
69
|
+
import { registerSetCubeRules } from "./model-building/set-cube-rules.js";
|
|
70
|
+
import { registerClearCube } from "./model-building/clear-cube.js";
|
|
71
|
+
import { registerUnloadCube } from "./model-building/unload-cube.js";
|
|
72
|
+
import { registerGetAllCubeRules } from "./model-building/get-all-cube-rules.js";
|
|
73
|
+
import { registerCheckCubeRule } from "./model-building/check-cube-rule.js";
|
|
74
|
+
import { registerSearchRules } from "./model-building/search-rules.js";
|
|
75
|
+
// View tools
|
|
76
|
+
import { registerListViews } from "./views/list-views.js";
|
|
77
|
+
import { registerCreateMdxView } from "./views/create-mdx-view.js";
|
|
78
|
+
import { registerCreateNativeView } from "./views/create-native-view.js";
|
|
79
|
+
import { registerDeleteView } from "./views/delete-view.js";
|
|
80
|
+
// Scheduling tools
|
|
81
|
+
import { registerToggleChore } from "./scheduling/toggle-chore.js";
|
|
82
|
+
import { registerExecuteChore } from "./scheduling/execute-chore.js";
|
|
83
|
+
import { registerCreateChore } from "./scheduling/create-chore.js";
|
|
84
|
+
import { registerUpdateChore } from "./scheduling/update-chore.js";
|
|
85
|
+
import { registerDeleteChore } from "./scheduling/delete-chore.js";
|
|
86
|
+
// Operations tools
|
|
87
|
+
import { registerGetMessageLog } from "./operations/get-message-log.js";
|
|
88
|
+
import { registerGetThreads } from "./operations/get-threads.js";
|
|
89
|
+
import { registerGetJobs } from "./operations/get-jobs.js";
|
|
90
|
+
import { registerGetServerInfo } from "./operations/get-server-info.js";
|
|
91
|
+
import { registerGetServerState } from "./operations/get-server-state.js";
|
|
92
|
+
import { registerGetTransactionLog } from "./operations/get-transaction-log.js";
|
|
93
|
+
import { registerGetAuditLog } from "./operations/get-audit-log.js";
|
|
94
|
+
import { registerGetSessions } from "./operations/get-sessions.js";
|
|
95
|
+
import { registerListErrorLogs } from "./operations/list-error-logs.js";
|
|
96
|
+
import { registerGetErrorLogContent } from "./operations/get-error-log-content.js";
|
|
97
|
+
import { registerDiagnoseProcessError } from "./operations/diagnose-process-error.js";
|
|
98
|
+
import { registerGetCubeStats } from "./operations/get-cube-stats.js";
|
|
99
|
+
import { registerSaveData } from "./operations/save-data.js";
|
|
100
|
+
// File operations tools
|
|
101
|
+
import { registerListFiles } from "./fileops/list-files.js";
|
|
102
|
+
import { registerGetFileContent } from "./fileops/get-file-content.js";
|
|
103
|
+
import { registerUploadFile } from "./fileops/upload-file.js";
|
|
104
|
+
import { registerDeleteFile } from "./fileops/delete-file.js";
|
|
105
|
+
import { registerSearchFiles } from "./fileops/search-files.js";
|
|
106
|
+
// Analysis tools
|
|
107
|
+
import { registerAnalyzeCallgraph } from "./analysis/analyze-callgraph.js";
|
|
108
|
+
import { registerAnalyzeObjectUsage } from "./analysis/analyze-object-usage.js";
|
|
109
|
+
import { registerTraceDataFlow } from "./analysis/trace-data-flow.js";
|
|
110
|
+
import { registerAnalyzeChoreGraph } from "./analysis/analyze-chore-graph.js";
|
|
111
|
+
import { registerInvalidateCallgraphCache } from "./analysis/invalidate-callgraph-cache.js";
|
|
112
|
+
import { registerFindOrphanDimensions } from "./analysis/find-orphan-dimensions.js";
|
|
113
|
+
import { registerCheckV12Readiness } from "./analysis/check-v12-readiness.js";
|
|
114
|
+
import { registerAuditNaming } from "./analysis/audit-naming.js";
|
|
115
|
+
import { registerAuditComplexity } from "./analysis/audit-complexity.js";
|
|
116
|
+
import { registerAuditFeeders } from "./analysis/audit-feeders.js";
|
|
117
|
+
// Security tools
|
|
118
|
+
import { registerListClients } from "./security/list-clients.js";
|
|
119
|
+
import { registerGetClient } from "./security/get-client.js";
|
|
120
|
+
import { registerCreateClient } from "./security/create-client.js";
|
|
121
|
+
import { registerUpdateClient } from "./security/update-client.js";
|
|
122
|
+
import { registerDeleteClient } from "./security/delete-client.js";
|
|
123
|
+
import { registerListGroups } from "./security/list-groups.js";
|
|
124
|
+
import { registerAssignClientGroup } from "./security/assign-client-group.js";
|
|
125
|
+
import { registerRemoveClientGroup } from "./security/remove-client-group.js";
|
|
126
|
+
// Single registry of every tool registrar, grouped by category. Adding a tool
|
|
127
|
+
// = add its import above and one entry here (adjacent edit, one PR hunk). The
|
|
128
|
+
// previous design kept a second hand-ordered call block that drifted from the
|
|
129
|
+
// import order; this array is the only call site. check-tool-registration.mjs
|
|
130
|
+
// fails the build if a `register*` export under src/tools/ is missing here.
|
|
131
|
+
const REGISTRARS = [
|
|
132
|
+
// Metadata
|
|
133
|
+
registerListCubes,
|
|
134
|
+
registerListDimensions,
|
|
135
|
+
registerGetHierarchy,
|
|
136
|
+
registerGetDescendants,
|
|
137
|
+
registerGetAncestors,
|
|
138
|
+
registerResolveDefaultMembers,
|
|
139
|
+
registerListProcesses,
|
|
140
|
+
registerListProcessesGrouped,
|
|
141
|
+
registerListChores,
|
|
142
|
+
// Cell data
|
|
143
|
+
registerGetCellValue,
|
|
144
|
+
registerExecuteMdx,
|
|
145
|
+
registerGetView,
|
|
146
|
+
registerGetViewDefinition,
|
|
147
|
+
registerSampleCells,
|
|
148
|
+
registerWriteCells,
|
|
149
|
+
registerCheckFeeders,
|
|
150
|
+
registerTraceFeeders,
|
|
151
|
+
registerTraceCellCalculation,
|
|
152
|
+
registerCheckWritableCoords,
|
|
153
|
+
// TI development — writes go through registerUpsertProcess (bundled),
|
|
154
|
+
// reads remain atomic for inspection without pulling full process code.
|
|
155
|
+
registerExecuteProcess,
|
|
156
|
+
registerGetProcessParameters,
|
|
157
|
+
registerGetProcessCode,
|
|
158
|
+
registerGetProcess,
|
|
159
|
+
registerGetProcessDatasource,
|
|
160
|
+
registerGetProcessVariables,
|
|
161
|
+
registerDeleteProcess,
|
|
162
|
+
registerCopyProcess,
|
|
163
|
+
registerCompileProcess,
|
|
164
|
+
registerCheckProcessCode,
|
|
165
|
+
registerGetAllProcessesCode,
|
|
166
|
+
registerSearchCode,
|
|
167
|
+
registerImportProFile,
|
|
168
|
+
registerExportProcessToPro,
|
|
169
|
+
registerDiffProcessWithFile,
|
|
170
|
+
registerDiffProcesses,
|
|
171
|
+
registerValidateProcessRefs,
|
|
172
|
+
registerUpsertProcess,
|
|
173
|
+
registerInstallProBundle,
|
|
174
|
+
registerExportProcessToGit,
|
|
175
|
+
registerImportProcessFromGit,
|
|
176
|
+
// Dimension management
|
|
177
|
+
registerCreateDimension,
|
|
178
|
+
registerDeleteDimension,
|
|
179
|
+
registerBulkUpsertElements,
|
|
180
|
+
registerCreateElement,
|
|
181
|
+
registerUpdateElement,
|
|
182
|
+
registerDeleteElement,
|
|
183
|
+
registerDeleteElements,
|
|
184
|
+
registerMoveElement,
|
|
185
|
+
registerListElementAttributes,
|
|
186
|
+
registerCreateElementAttribute,
|
|
187
|
+
registerGetElementAttributeValues,
|
|
188
|
+
registerUpdateElementAttributeValue,
|
|
189
|
+
registerCreateHierarchy,
|
|
190
|
+
registerDeleteHierarchy,
|
|
191
|
+
// Subsets
|
|
192
|
+
registerListSubsets,
|
|
193
|
+
registerGetSubset,
|
|
194
|
+
registerCreateSubset,
|
|
195
|
+
registerUpdateSubset,
|
|
196
|
+
registerDeleteSubset,
|
|
197
|
+
// Model building
|
|
198
|
+
registerCreateCube,
|
|
199
|
+
registerDeleteCube,
|
|
200
|
+
registerGetCubeRules,
|
|
201
|
+
registerSetCubeRules,
|
|
202
|
+
registerClearCube,
|
|
203
|
+
registerUnloadCube,
|
|
204
|
+
registerGetAllCubeRules,
|
|
205
|
+
registerCheckCubeRule,
|
|
206
|
+
registerSearchRules,
|
|
207
|
+
// Views
|
|
208
|
+
registerListViews,
|
|
209
|
+
registerCreateMdxView,
|
|
210
|
+
registerCreateNativeView,
|
|
211
|
+
registerDeleteView,
|
|
212
|
+
// Scheduling
|
|
213
|
+
registerToggleChore,
|
|
214
|
+
registerExecuteChore,
|
|
215
|
+
registerCreateChore,
|
|
216
|
+
registerUpdateChore,
|
|
217
|
+
registerDeleteChore,
|
|
218
|
+
// Operations
|
|
219
|
+
registerGetMessageLog,
|
|
220
|
+
registerGetThreads,
|
|
221
|
+
registerGetJobs,
|
|
222
|
+
registerGetServerInfo,
|
|
223
|
+
registerGetServerState,
|
|
224
|
+
registerGetTransactionLog,
|
|
225
|
+
registerGetAuditLog,
|
|
226
|
+
registerGetSessions,
|
|
227
|
+
registerListErrorLogs,
|
|
228
|
+
registerGetErrorLogContent,
|
|
229
|
+
registerDiagnoseProcessError,
|
|
230
|
+
registerGetCubeStats,
|
|
231
|
+
registerSaveData,
|
|
232
|
+
// File operations
|
|
233
|
+
registerListFiles,
|
|
234
|
+
registerGetFileContent,
|
|
235
|
+
registerUploadFile,
|
|
236
|
+
registerDeleteFile,
|
|
237
|
+
registerSearchFiles,
|
|
238
|
+
// Analysis
|
|
239
|
+
registerAnalyzeCallgraph,
|
|
240
|
+
registerAnalyzeObjectUsage,
|
|
241
|
+
registerTraceDataFlow,
|
|
242
|
+
registerAnalyzeChoreGraph,
|
|
243
|
+
registerInvalidateCallgraphCache,
|
|
244
|
+
registerFindOrphanDimensions,
|
|
245
|
+
registerCheckV12Readiness,
|
|
246
|
+
registerAuditNaming,
|
|
247
|
+
registerAuditComplexity,
|
|
248
|
+
registerAuditFeeders,
|
|
249
|
+
// Security
|
|
250
|
+
registerListClients,
|
|
251
|
+
registerGetClient,
|
|
252
|
+
registerCreateClient,
|
|
253
|
+
registerUpdateClient,
|
|
254
|
+
registerDeleteClient,
|
|
255
|
+
registerListGroups,
|
|
256
|
+
registerAssignClientGroup,
|
|
257
|
+
registerRemoveClientGroup,
|
|
258
|
+
];
|
|
259
|
+
export function registerAllTools(server, tm1Client) {
|
|
260
|
+
for (const register of REGISTRARS)
|
|
261
|
+
register(server, tm1Client);
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confine a caller-supplied host filesystem path to the directory configured via
|
|
3
|
+
* `TM1_LOCAL_FILE_ROOT`.
|
|
4
|
+
*
|
|
5
|
+
* Host-file access (the `filePath` / `writeToFile` / `directory` parameters on the
|
|
6
|
+
* `.pro` round-trip tools) is DISABLED by default: without the env var set, those
|
|
7
|
+
* tools only accept inline `content`. This keeps arbitrary host file read/write off
|
|
8
|
+
* the default (readonly) tool surface — a prompt-injected agent cannot coerce the
|
|
9
|
+
* server into reading `/proc/self/environ` (which would leak TM1 credentials),
|
|
10
|
+
* `~/.ssh/id_rsa`, or writing to arbitrary locations.
|
|
11
|
+
*
|
|
12
|
+
* When the root IS configured, the resolved absolute path must stay within it; any
|
|
13
|
+
* `..` traversal or absolute escape is rejected. Returns the resolved absolute path.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveLocalPath(inputPath: string, paramName?: string): string;
|
|
16
|
+
//# sourceMappingURL=local-file.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { TM1Error, TM1ErrorCode } from "../types.js";
|
|
4
|
+
const ROOT_ENV = "TM1_LOCAL_FILE_ROOT";
|
|
5
|
+
/**
|
|
6
|
+
* Resolve symlinks as deeply as the filesystem allows: realpath the nearest
|
|
7
|
+
* EXISTING ancestor (the target itself may not exist yet — write paths are
|
|
8
|
+
* confined before the file is created), then re-append the not-yet-existing
|
|
9
|
+
* tail lexically. Walks up one component at a time until realpathSync stops
|
|
10
|
+
* throwing; at worst it terminates at the filesystem root.
|
|
11
|
+
*/
|
|
12
|
+
function realpathNearestExisting(p) {
|
|
13
|
+
let current = p;
|
|
14
|
+
const tail = [];
|
|
15
|
+
for (;;) {
|
|
16
|
+
try {
|
|
17
|
+
const real = realpathSync(current);
|
|
18
|
+
return tail.length === 0 ? real : path.join(real, ...tail);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
const parent = path.dirname(current);
|
|
22
|
+
if (parent === current) {
|
|
23
|
+
// Nothing on the path exists (not even "/", practically unreachable);
|
|
24
|
+
// fall back to the lexical path so the caller's check still runs.
|
|
25
|
+
return path.join(current, ...tail);
|
|
26
|
+
}
|
|
27
|
+
tail.unshift(path.basename(current));
|
|
28
|
+
current = parent;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Confine a caller-supplied host filesystem path to the directory configured via
|
|
34
|
+
* `TM1_LOCAL_FILE_ROOT`.
|
|
35
|
+
*
|
|
36
|
+
* Host-file access (the `filePath` / `writeToFile` / `directory` parameters on the
|
|
37
|
+
* `.pro` round-trip tools) is DISABLED by default: without the env var set, those
|
|
38
|
+
* tools only accept inline `content`. This keeps arbitrary host file read/write off
|
|
39
|
+
* the default (readonly) tool surface — a prompt-injected agent cannot coerce the
|
|
40
|
+
* server into reading `/proc/self/environ` (which would leak TM1 credentials),
|
|
41
|
+
* `~/.ssh/id_rsa`, or writing to arbitrary locations.
|
|
42
|
+
*
|
|
43
|
+
* When the root IS configured, the resolved absolute path must stay within it; any
|
|
44
|
+
* `..` traversal or absolute escape is rejected. Returns the resolved absolute path.
|
|
45
|
+
*/
|
|
46
|
+
export function resolveLocalPath(inputPath, paramName = "filePath") {
|
|
47
|
+
const root = process.env[ROOT_ENV]?.trim();
|
|
48
|
+
if (!root) {
|
|
49
|
+
throw new TM1Error({
|
|
50
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
51
|
+
message: `Host-file access is disabled. Set ${ROOT_ENV} to an allowed directory to enable ` +
|
|
52
|
+
`'${paramName}', or pass the .pro content inline via the 'content' parameter instead.`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (!path.isAbsolute(inputPath)) {
|
|
56
|
+
throw new TM1Error({
|
|
57
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
58
|
+
message: `${paramName} must be absolute: ${inputPath}`,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const resolvedRoot = path.resolve(root);
|
|
62
|
+
const resolved = path.resolve(inputPath);
|
|
63
|
+
const rel = path.relative(resolvedRoot, resolved);
|
|
64
|
+
if (rel === ".." || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel)) {
|
|
65
|
+
throw new TM1Error({
|
|
66
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
67
|
+
message: `${paramName} escapes the allowed ${ROOT_ENV} directory (${resolvedRoot}): ${inputPath}`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// Symlink-safe second check: the lexical check above is bypassable by a
|
|
71
|
+
// symlink placed INSIDE the root that points outside it. Compare real paths
|
|
72
|
+
// instead — and realpath the root too, since the root itself may
|
|
73
|
+
// legitimately be a symlink (e.g. /tmp on some systems).
|
|
74
|
+
const realRoot = realpathNearestExisting(resolvedRoot);
|
|
75
|
+
const realResolved = realpathNearestExisting(resolved);
|
|
76
|
+
const relReal = path.relative(realRoot, realResolved);
|
|
77
|
+
if (relReal === ".." ||
|
|
78
|
+
relReal.startsWith(`..${path.sep}`) ||
|
|
79
|
+
path.isAbsolute(relReal)) {
|
|
80
|
+
throw new TM1Error({
|
|
81
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
82
|
+
message: `${paramName} escapes the allowed ${ROOT_ENV} directory (${resolvedRoot}) ` +
|
|
83
|
+
`after resolving symlinks: ${inputPath}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return resolved;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=local-file.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineTool } from "../define-tool.js";
|
|
3
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
4
|
+
import { READ_ONLY } from "../annotations.js";
|
|
5
|
+
import { AncestorsResultSchema } from "../schemas/items.js";
|
|
6
|
+
import { FORMAT_SCHEMA, payloadResponse, renderTable, columnsOf, } from "../format.js";
|
|
7
|
+
export const registerGetAncestors = defineTool({
|
|
8
|
+
name: "tm1_get_ancestors",
|
|
9
|
+
description: [
|
|
10
|
+
"Get all ancestors of an element via parent-walk. Multi-parent safe: returns the unique flat ancestor set AND every distinct root-to-element path.",
|
|
11
|
+
"Use to find roll-up paths or detect that an element rolls up to multiple consolidations (alternate hierarchies).",
|
|
12
|
+
"Output: { element, ancestors: [{ name, level }], paths: [[ root, ..., element ]] }.",
|
|
13
|
+
],
|
|
14
|
+
annotations: READ_ONLY,
|
|
15
|
+
output: AncestorsResultSchema,
|
|
16
|
+
input: {
|
|
17
|
+
dimensionName: z.string().describe("Name of the TM1 dimension"),
|
|
18
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
19
|
+
elementName: z
|
|
20
|
+
.string()
|
|
21
|
+
.describe("Element whose ancestors are requested. Root elements return empty ancestors and a single self-only path."),
|
|
22
|
+
...FORMAT_SCHEMA,
|
|
23
|
+
},
|
|
24
|
+
handler: async ({ dimensionName, hierarchyName, elementName, format }, tm1Client) => {
|
|
25
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
26
|
+
const result = await tm1Client.hierarchies.getAncestors(dimensionName, hierarchy, elementName);
|
|
27
|
+
const columns = columnsOf(["name", "level"]);
|
|
28
|
+
return payloadResponse(result, format, (r) => {
|
|
29
|
+
const pathLines = r.paths
|
|
30
|
+
.map((p, i) => `${i + 1}. ${p.join(" → ")}`)
|
|
31
|
+
.join("\n");
|
|
32
|
+
return `## Ancestors of ${r.element}\n\n${renderTable(r.ancestors, columns)}\n\n### Paths\n\n${pathLines || "_(no paths)_"}`;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=get-ancestors.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FORMAT_SCHEMA, payloadResponse, renderTable, columnsOf, } from "../format.js";
|
|
3
|
+
import { DescendantsResultSchema } from "../schemas/items.js";
|
|
4
|
+
import { READ_ONLY } from "../annotations.js";
|
|
5
|
+
import { defineTool } from "../define-tool.js";
|
|
6
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
7
|
+
export const registerGetDescendants = defineTool({
|
|
8
|
+
name: "tm1_get_descendants",
|
|
9
|
+
description: [
|
|
10
|
+
"Get descendants of a consolidation element. Token-efficient alternative to tm1_get_hierarchy when you only need a subtree.",
|
|
11
|
+
"depth caps how many levels below the start element are returned (depth=1 = direct children).",
|
|
12
|
+
"leavesOnly=true keeps only N-elements (no consolidations). Multi-parent hierarchies: each unique element appears once.",
|
|
13
|
+
"Result capped to topN (default 1000) with truncated=true when the cap clips — raise topN for more.",
|
|
14
|
+
"Output: { element, descendants: [{ name, type, level, depth }], truncated }.",
|
|
15
|
+
],
|
|
16
|
+
annotations: READ_ONLY,
|
|
17
|
+
output: DescendantsResultSchema,
|
|
18
|
+
input: {
|
|
19
|
+
dimensionName: z.string().describe("Name of the TM1 dimension"),
|
|
20
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
21
|
+
elementName: z
|
|
22
|
+
.string()
|
|
23
|
+
.describe("Start element (typically a consolidation). Numeric/leaf elements return empty descendants."),
|
|
24
|
+
depth: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.positive()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe("Max depth below the start element. Omit for unlimited."),
|
|
30
|
+
leavesOnly: z
|
|
31
|
+
.boolean()
|
|
32
|
+
.optional()
|
|
33
|
+
.default(false)
|
|
34
|
+
.describe("Return only leaf elements (no consolidations)."),
|
|
35
|
+
topN: z
|
|
36
|
+
.number()
|
|
37
|
+
.int()
|
|
38
|
+
.positive()
|
|
39
|
+
.optional()
|
|
40
|
+
.default(1000)
|
|
41
|
+
.describe("Max descendants returned (default 1000). Caps large subtrees; result sets truncated=true when the cap clipped the set. Raise to fetch more."),
|
|
42
|
+
...FORMAT_SCHEMA,
|
|
43
|
+
},
|
|
44
|
+
handler: async ({ dimensionName, hierarchyName, elementName, depth, leavesOnly, topN, format, }, tm1Client) => {
|
|
45
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
46
|
+
const full = await tm1Client.hierarchies.getDescendants(dimensionName, hierarchy, elementName, {
|
|
47
|
+
...(depth !== undefined ? { depth } : {}),
|
|
48
|
+
...(leavesOnly !== undefined ? { leavesOnly } : {}),
|
|
49
|
+
});
|
|
50
|
+
// The traversal is client-side (BFS over the fetched hierarchy), so the
|
|
51
|
+
// full descendant set is known here — truncated is exact, not a heuristic.
|
|
52
|
+
const truncated = full.descendants.length > topN;
|
|
53
|
+
const result = {
|
|
54
|
+
element: full.element,
|
|
55
|
+
descendants: truncated
|
|
56
|
+
? full.descendants.slice(0, topN)
|
|
57
|
+
: full.descendants,
|
|
58
|
+
truncated,
|
|
59
|
+
};
|
|
60
|
+
const columns = columnsOf(["name", "type", "level", "depth"]);
|
|
61
|
+
return payloadResponse(result, format, (r) => `## Descendants of ${r.element}\n\n${r.descendants.length} elements\n\n${renderTable(r.descendants, columns)}`);
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=get-descendants.js.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { HierarchySchema } from "../schemas/items.js";
|
|
3
|
+
import { READ_ONLY } from "../annotations.js";
|
|
4
|
+
import { defineTool } from "../define-tool.js";
|
|
5
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
6
|
+
export const registerGetHierarchy = defineTool({
|
|
7
|
+
name: "tm1_get_hierarchy",
|
|
8
|
+
description: [
|
|
9
|
+
"Get hierarchy elements with parent-child relationships for a dimension.",
|
|
10
|
+
"To size a dimension, pass countOnly=true (totals by type and level, no elements) or narrow with nameContains/nameStartsWith before paging — don't probe with growing topN.",
|
|
11
|
+
"Filters (level/levelMax/elementType, name filters, compact) reduce payload; capped to topN (default 1000) with truncated=true when the cap clips.",
|
|
12
|
+
"Elements are ordered by name; walk large dimensions with offset (total/has_more count the filtered element set) rather than raising topN.",
|
|
13
|
+
"Filtered-out parents/children are pruned from remaining elements to avoid dangling references.",
|
|
14
|
+
],
|
|
15
|
+
annotations: READ_ONLY,
|
|
16
|
+
output: HierarchySchema,
|
|
17
|
+
input: {
|
|
18
|
+
dimensionName: z.string().describe("Name of the TM1 dimension"),
|
|
19
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
20
|
+
level: z
|
|
21
|
+
.number()
|
|
22
|
+
.int()
|
|
23
|
+
.nonnegative()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Exact level filter (0 = leaves, 1+ = consolidations). Combinable with levelMax."),
|
|
26
|
+
levelMax: z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.nonnegative()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Keep elements with Level ≤ levelMax. Caps deep hierarchies."),
|
|
32
|
+
elementType: z
|
|
33
|
+
.enum(["Numeric", "String", "Consolidated", "All"])
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Filter by element type. Default: All."),
|
|
36
|
+
nameContains: z
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("Server-side OData substring filter (contains). Case-sensitive. Combine with other filters via AND."),
|
|
40
|
+
nameStartsWith: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Server-side OData prefix filter (startswith). Case-sensitive."),
|
|
44
|
+
nameRegex: z
|
|
45
|
+
.string()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Client-side regex filter on element name (JS RegExp). Use for patterns OData cannot express. Invalid regex throws VALIDATION_ERROR."),
|
|
48
|
+
topN: z
|
|
49
|
+
.number()
|
|
50
|
+
.int()
|
|
51
|
+
.positive()
|
|
52
|
+
// Ceiling, not a page size: without it a caller can ask for a whole
|
|
53
|
+
// 200k-element dimension in one response. `offset` exists precisely so
|
|
54
|
+
// large dimensions get walked rather than swallowed.
|
|
55
|
+
.max(10000)
|
|
56
|
+
.optional()
|
|
57
|
+
.default(1000)
|
|
58
|
+
.describe("Page size — max elements returned after filter (default 1000, max 10000). Combine with offset to walk past it; truncated/has_more say whether more remain."),
|
|
59
|
+
offset: z
|
|
60
|
+
.number()
|
|
61
|
+
.int()
|
|
62
|
+
.nonnegative()
|
|
63
|
+
.optional()
|
|
64
|
+
.default(0)
|
|
65
|
+
.describe("Elements to skip before topN (default 0). Use next page = offset + topN while has_more is true."),
|
|
66
|
+
countOnly: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.optional()
|
|
69
|
+
.default(false)
|
|
70
|
+
.describe("Return only totals of the filtered set (counts.byType, counts.byLevel, counts.maxLevel) with an empty elements array. Filters apply; topN/offset/compact are ignored."),
|
|
71
|
+
compact: z
|
|
72
|
+
.boolean()
|
|
73
|
+
.optional()
|
|
74
|
+
.default(false)
|
|
75
|
+
.describe("Drop parents[] and children[] arrays from each element. Use for hierarchy overviews."),
|
|
76
|
+
},
|
|
77
|
+
handler: async ({ dimensionName, hierarchyName, level, levelMax, elementType, nameContains, nameStartsWith, nameRegex, topN, offset, countOnly, compact, }, tm1Client) => {
|
|
78
|
+
const hierName = resolveHierarchy(dimensionName, hierarchyName);
|
|
79
|
+
const filterOpts = {
|
|
80
|
+
...(level !== undefined ? { level } : {}),
|
|
81
|
+
...(levelMax !== undefined ? { levelMax } : {}),
|
|
82
|
+
...(elementType !== undefined ? { elementType } : {}),
|
|
83
|
+
...(nameContains !== undefined ? { nameContains } : {}),
|
|
84
|
+
...(nameStartsWith !== undefined ? { nameStartsWith } : {}),
|
|
85
|
+
...(nameRegex !== undefined ? { nameRegex } : {}),
|
|
86
|
+
};
|
|
87
|
+
if (countOnly) {
|
|
88
|
+
const { total, ...counts } = await tm1Client.hierarchies.getCounts(dimensionName, hierName, filterOpts);
|
|
89
|
+
const output = {
|
|
90
|
+
name: hierName,
|
|
91
|
+
dimensionName,
|
|
92
|
+
elements: [],
|
|
93
|
+
truncated: false,
|
|
94
|
+
total,
|
|
95
|
+
offset: 0,
|
|
96
|
+
has_more: false,
|
|
97
|
+
counts,
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
content: [{ type: "text", text: JSON.stringify(output) }],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const { totalElements, ...hierarchy } = await tm1Client.hierarchies.get(dimensionName, hierName, { ...filterOpts, topN, skip: offset });
|
|
104
|
+
// `totalElements` counts the whole filtered set, so this is exact — the
|
|
105
|
+
// old `elements.length === topN` test cried truncation whenever the last
|
|
106
|
+
// page happened to be exactly topN long.
|
|
107
|
+
const has_more = offset + hierarchy.elements.length < totalElements;
|
|
108
|
+
const elements = compact
|
|
109
|
+
? hierarchy.elements.map((e) => ({
|
|
110
|
+
name: e.name,
|
|
111
|
+
type: e.type,
|
|
112
|
+
level: e.level,
|
|
113
|
+
}))
|
|
114
|
+
: hierarchy.elements;
|
|
115
|
+
const output = {
|
|
116
|
+
...hierarchy,
|
|
117
|
+
elements,
|
|
118
|
+
// Kept as the pre-paging name for `has_more`; both mean "elements the
|
|
119
|
+
// cap left behind".
|
|
120
|
+
truncated: has_more,
|
|
121
|
+
total: totalElements,
|
|
122
|
+
offset,
|
|
123
|
+
has_more,
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
content: [{ type: "text", text: JSON.stringify(output) }],
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
//# sourceMappingURL=get-hierarchy.js.map
|