@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,12 @@
|
|
|
1
|
+
export * from "./items-common.js";
|
|
2
|
+
export * from "./items-metadata.js";
|
|
3
|
+
export * from "./items-processes.js";
|
|
4
|
+
export * from "./items-cells.js";
|
|
5
|
+
export * from "./items-views.js";
|
|
6
|
+
export * from "./items-subsets.js";
|
|
7
|
+
export * from "./items-scheduling.js";
|
|
8
|
+
export * from "./items-security.js";
|
|
9
|
+
export * from "./items-monitoring.js";
|
|
10
|
+
export * from "./items-fileops.js";
|
|
11
|
+
export * from "./items-analysis.js";
|
|
12
|
+
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Zod schemas for the per-item types returned by the paginated list_* tools and
|
|
2
|
+
// the result payloads of the other tools. Mirrors the TypeScript interfaces in
|
|
3
|
+
// src/types.ts so the runtime outputSchema and the static type cannot drift.
|
|
4
|
+
//
|
|
5
|
+
// Schemas are intentionally permissive (`.passthrough()` where the upstream
|
|
6
|
+
// REST surface is loose) — TM1 occasionally returns extra fields and we don't
|
|
7
|
+
// want validation to break an otherwise useful payload.
|
|
8
|
+
//
|
|
9
|
+
// This module is a RE-EXPORT BARREL. The schema definitions live in the
|
|
10
|
+
// per-category `items-<domain>.ts` files so no single file grows unwieldy;
|
|
11
|
+
// every existing importer keeps importing from `./schemas/items.js` unchanged.
|
|
12
|
+
export * from "./items-common.js";
|
|
13
|
+
export * from "./items-metadata.js";
|
|
14
|
+
export * from "./items-processes.js";
|
|
15
|
+
export * from "./items-cells.js";
|
|
16
|
+
export * from "./items-views.js";
|
|
17
|
+
export * from "./items-subsets.js";
|
|
18
|
+
export * from "./items-scheduling.js";
|
|
19
|
+
export * from "./items-security.js";
|
|
20
|
+
export * from "./items-monitoring.js";
|
|
21
|
+
export * from "./items-fileops.js";
|
|
22
|
+
export * from "./items-analysis.js";
|
|
23
|
+
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z, type ZodRawShape, type ZodTypeAny } from "zod";
|
|
2
|
+
export interface StrictVariants {
|
|
3
|
+
/** Full payload shape, exactly as before the loosening. */
|
|
4
|
+
json: ZodTypeAny;
|
|
5
|
+
/** The only shape a markdown response may take. */
|
|
6
|
+
markdown: ZodTypeAny;
|
|
7
|
+
}
|
|
8
|
+
export declare const MARKDOWN_ONLY_SCHEMA: z.ZodObject<{
|
|
9
|
+
markdown: z.ZodString;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
/**
|
|
12
|
+
* Widen an outputSchema so the tool may answer with either its full JSON
|
|
13
|
+
* payload or `{ markdown }`. Use for every tool that accepts FORMAT_SCHEMA.
|
|
14
|
+
*/
|
|
15
|
+
export declare function markdownCapable(entry: ZodRawShape | ZodTypeAny): ZodTypeAny;
|
|
16
|
+
/**
|
|
17
|
+
* Strict counterparts for a schema produced by `markdownCapable`, or undefined
|
|
18
|
+
* for any other schema.
|
|
19
|
+
*/
|
|
20
|
+
export declare function strictVariants(entry: ZodRawShape | ZodTypeAny | object | undefined): StrictVariants | undefined;
|
|
21
|
+
//# sourceMappingURL=markdown-capable.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Output-schema wrapper for tools that offer `format: "markdown"`.
|
|
2
|
+
//
|
|
3
|
+
// Why this exists: clients that read `structuredContent` (Claude Code) discard
|
|
4
|
+
// the `content` array entirely, so a rendered Markdown table shipped only in
|
|
5
|
+
// `content` never reaches the model — `format:"markdown"` was a silent no-op
|
|
6
|
+
// there. The table therefore has to travel inside `structuredContent`, as
|
|
7
|
+
// `{ markdown: "<table>" }`.
|
|
8
|
+
//
|
|
9
|
+
// That collides with the declared outputSchema three ways, all measured
|
|
10
|
+
// against @modelcontextprotocol/sdk 1.30.0:
|
|
11
|
+
// 1. Omitting structuredContent is not allowed once an outputSchema exists —
|
|
12
|
+
// the SDK answers `-32602 ... has an output schema but no structured
|
|
13
|
+
// content was provided` (server/mcp.js, validateToolOutput).
|
|
14
|
+
// 2. Adding `markdown` alongside a strict payload is rejected client-side
|
|
15
|
+
// with "must NOT have additional properties".
|
|
16
|
+
// 3. A `z.union` / `z.discriminatedUnion` outputSchema cannot express
|
|
17
|
+
// "either shape": the SDK's zod-compat throws on the non-object schema
|
|
18
|
+
// and then publishes NO outputSchema for the tool at all.
|
|
19
|
+
//
|
|
20
|
+
// So the schema handed to the SDK is `Payload.partial()` plus an optional
|
|
21
|
+
// `markdown`, which accepts both shapes. `.partial()` only relaxes TOP-LEVEL
|
|
22
|
+
// keys — nested objects and array items stay strict, which is where drift
|
|
23
|
+
// usually appears. The top-level strictness that is lost here is restored by
|
|
24
|
+
// the guard in ../with-annotations.ts, which picks the matching strict variant
|
|
25
|
+
// per response via `strictVariants()`.
|
|
26
|
+
import { z } from "zod";
|
|
27
|
+
// Keyed by the loosened schema object we hand to the SDK. A WeakMap keeps the
|
|
28
|
+
// pairing out of the wire format — the SDK only ever sees plain Zod.
|
|
29
|
+
const VARIANTS = new WeakMap();
|
|
30
|
+
// Strict on purpose: a markdown response that also carries payload fields
|
|
31
|
+
// means a handler mixed the two paths, and the client the markdown was meant
|
|
32
|
+
// for would render the leaked JSON.
|
|
33
|
+
export const MARKDOWN_ONLY_SCHEMA = z.strictObject({
|
|
34
|
+
markdown: z.string(),
|
|
35
|
+
});
|
|
36
|
+
function isZodSchema(entry) {
|
|
37
|
+
return "_def" in entry;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Widen an outputSchema so the tool may answer with either its full JSON
|
|
41
|
+
* payload or `{ markdown }`. Use for every tool that accepts FORMAT_SCHEMA.
|
|
42
|
+
*/
|
|
43
|
+
export function markdownCapable(entry) {
|
|
44
|
+
const strict = (isZodSchema(entry) ? entry : z.object(entry));
|
|
45
|
+
const loose = strict.partial().extend({ markdown: z.string().optional() });
|
|
46
|
+
VARIANTS.set(loose, { json: strict, markdown: MARKDOWN_ONLY_SCHEMA });
|
|
47
|
+
return loose;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Strict counterparts for a schema produced by `markdownCapable`, or undefined
|
|
51
|
+
* for any other schema.
|
|
52
|
+
*/
|
|
53
|
+
export function strictVariants(entry) {
|
|
54
|
+
if (entry === null || typeof entry !== "object")
|
|
55
|
+
return undefined;
|
|
56
|
+
return VARIANTS.get(entry);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=markdown-capable.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ZodObject, ZodRawShape, ZodTypeAny } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Return the correct MCP outputSchema representation for a Zod object.
|
|
4
|
+
*
|
|
5
|
+
* Schemas built with `.passthrough()` / `.catchall(...)` MUST be published
|
|
6
|
+
* as full ZodTypeAny so the SDK preserves `additionalProperties: true` in
|
|
7
|
+
* the generated JSON Schema. Extracting `.shape` from such a schema silently
|
|
8
|
+
* loses the flag and makes the SDK reject legitimate per-tool extras with
|
|
9
|
+
* "data must NOT have additional properties".
|
|
10
|
+
*
|
|
11
|
+
* Plain object schemas are passed as ZodRawShape (`.shape`) per SDK convention.
|
|
12
|
+
*
|
|
13
|
+
* Detection: zod 4 stores the catchall/passthrough fallback under
|
|
14
|
+
* `def.catchall`. For plain `z.object({...})` it is undefined; for a
|
|
15
|
+
* `.passthrough()` / `.catchall(...)` schema it is a Zod type.
|
|
16
|
+
*
|
|
17
|
+
* `.def` is zod 4's public, typed accessor for the schema definition (the
|
|
18
|
+
* classic `ZodObject` types `.def` identically to the internal `._def`), so
|
|
19
|
+
* no `_def` reach-in or `as unknown as` cast is needed. The exact-pinned zod
|
|
20
|
+
* version (see package.json) plus the co-located regression test guard against
|
|
21
|
+
* a point release changing this shape. Bump zod manually and re-run tests.
|
|
22
|
+
*/
|
|
23
|
+
export declare function asOutputSchema<T extends ZodObject<ZodRawShape>>(schema: T): ZodTypeAny | ZodRawShape;
|
|
24
|
+
//# sourceMappingURL=output-schema.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the correct MCP outputSchema representation for a Zod object.
|
|
3
|
+
*
|
|
4
|
+
* Schemas built with `.passthrough()` / `.catchall(...)` MUST be published
|
|
5
|
+
* as full ZodTypeAny so the SDK preserves `additionalProperties: true` in
|
|
6
|
+
* the generated JSON Schema. Extracting `.shape` from such a schema silently
|
|
7
|
+
* loses the flag and makes the SDK reject legitimate per-tool extras with
|
|
8
|
+
* "data must NOT have additional properties".
|
|
9
|
+
*
|
|
10
|
+
* Plain object schemas are passed as ZodRawShape (`.shape`) per SDK convention.
|
|
11
|
+
*
|
|
12
|
+
* Detection: zod 4 stores the catchall/passthrough fallback under
|
|
13
|
+
* `def.catchall`. For plain `z.object({...})` it is undefined; for a
|
|
14
|
+
* `.passthrough()` / `.catchall(...)` schema it is a Zod type.
|
|
15
|
+
*
|
|
16
|
+
* `.def` is zod 4's public, typed accessor for the schema definition (the
|
|
17
|
+
* classic `ZodObject` types `.def` identically to the internal `._def`), so
|
|
18
|
+
* no `_def` reach-in or `as unknown as` cast is needed. The exact-pinned zod
|
|
19
|
+
* version (see package.json) plus the co-located regression test guard against
|
|
20
|
+
* a point release changing this shape. Bump zod manually and re-run tests.
|
|
21
|
+
*/
|
|
22
|
+
export function asOutputSchema(schema) {
|
|
23
|
+
return schema.def.catchall != null ? schema : schema.shape;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=output-schema.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { actionResponse } from "../format.js";
|
|
3
|
+
import { IDEMPOTENT_WRITE } from "../annotations.js";
|
|
4
|
+
import { MutationResultSchema } from "../schemas/items.js";
|
|
5
|
+
import { defineTool } from "../define-tool.js";
|
|
6
|
+
export const registerAssignClientGroup = defineTool({
|
|
7
|
+
name: "tm1_assign_client_group",
|
|
8
|
+
description: "Assign a TM1 client to a group. Idempotent - assigning twice is a no-op.",
|
|
9
|
+
annotations: IDEMPOTENT_WRITE,
|
|
10
|
+
output: MutationResultSchema,
|
|
11
|
+
input: {
|
|
12
|
+
clientName: z.string().describe("Client (user) name"),
|
|
13
|
+
groupName: z.string().describe("Group name"),
|
|
14
|
+
},
|
|
15
|
+
handler: async ({ clientName, groupName }, tm1Client) => {
|
|
16
|
+
await tm1Client.security.assignClientGroup(clientName, groupName);
|
|
17
|
+
return actionResponse({ success: true, clientName, groupName });
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=assign-client-group.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
export const registerCreateClient = defineTool({
|
|
7
|
+
name: "tm1_create_client",
|
|
8
|
+
description: "Create a new TM1 client (user). Optionally set initial password, friendly name, and group memberships.",
|
|
9
|
+
annotations: WRITE,
|
|
10
|
+
output: MutationResultSchema,
|
|
11
|
+
input: {
|
|
12
|
+
clientName: z.string().describe("Client (user) name"),
|
|
13
|
+
password: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("Initial password (omit if external auth)"),
|
|
17
|
+
friendlyName: z.string().optional().describe("Display name"),
|
|
18
|
+
groups: z
|
|
19
|
+
.array(z.string())
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Group names to assign on creation"),
|
|
22
|
+
},
|
|
23
|
+
handler: async ({ clientName, ...rest }, tm1Client) => {
|
|
24
|
+
await tm1Client.security.createClient({ name: clientName, ...rest });
|
|
25
|
+
return actionResponse({ success: true, name: clientName });
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=create-client.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONFIRM_SCHEMA, requireConfirm } from "../confirm.js";
|
|
3
|
+
import { actionResponse } from "../format.js";
|
|
4
|
+
import { DESTRUCTIVE } from "../annotations.js";
|
|
5
|
+
import { MutationResultSchema } from "../schemas/items.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
export const registerDeleteClient = defineTool({
|
|
8
|
+
name: "tm1_delete_client",
|
|
9
|
+
description: "Delete a TM1 client (user). Irreversible - the client must not have active sessions. Pass confirm=<client name verbatim>.",
|
|
10
|
+
annotations: DESTRUCTIVE,
|
|
11
|
+
output: MutationResultSchema,
|
|
12
|
+
input: {
|
|
13
|
+
clientName: z.string().describe("Client (user) name"),
|
|
14
|
+
...CONFIRM_SCHEMA,
|
|
15
|
+
},
|
|
16
|
+
handler: async ({ clientName, confirm }, tm1Client) => {
|
|
17
|
+
requireConfirm(confirm, clientName, "client");
|
|
18
|
+
await tm1Client.security.deleteClient(clientName);
|
|
19
|
+
return actionResponse({ success: true, clientName });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=delete-client.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FORMAT_SCHEMA, payloadResponse, renderKV } from "../format.js";
|
|
3
|
+
import { ClientItemSchema } from "../schemas/items.js";
|
|
4
|
+
import { READ_ONLY } from "../annotations.js";
|
|
5
|
+
import { defineTool } from "../define-tool.js";
|
|
6
|
+
export const registerGetClient = defineTool({
|
|
7
|
+
name: "tm1_get_client",
|
|
8
|
+
description: "Get details for a single TM1 client (user) including group memberships.",
|
|
9
|
+
annotations: READ_ONLY,
|
|
10
|
+
output: ClientItemSchema,
|
|
11
|
+
input: {
|
|
12
|
+
clientName: z.string().describe("Client (user) name"),
|
|
13
|
+
...FORMAT_SCHEMA,
|
|
14
|
+
},
|
|
15
|
+
handler: async ({ clientName, format }, tm1Client) => {
|
|
16
|
+
const client = await tm1Client.security.getClient(clientName);
|
|
17
|
+
return payloadResponse(client, format, (c) => renderKV(c, `Client ${clientName}`));
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=get-client.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PAGINATION_SCHEMA, paginate } from "../pagination.js";
|
|
3
|
+
import { FORMAT_SCHEMA, pageResponse, columnsOf } from "../format.js";
|
|
4
|
+
import { ClientItemSchema } from "../schemas/items.js";
|
|
5
|
+
import { READ_ONLY } from "../annotations.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
import { pageShapeFor } from "../schemas/common.js";
|
|
8
|
+
const FIELD_KEYS = [
|
|
9
|
+
"name",
|
|
10
|
+
"friendlyName",
|
|
11
|
+
"type",
|
|
12
|
+
"enabled",
|
|
13
|
+
"groups",
|
|
14
|
+
"groupCount",
|
|
15
|
+
];
|
|
16
|
+
function project(clients, fields, groupCount) {
|
|
17
|
+
// No projection requested -> keep current shape, optionally swap Groups for groupCount.
|
|
18
|
+
if (!fields || fields.length === 0) {
|
|
19
|
+
if (!groupCount)
|
|
20
|
+
return clients;
|
|
21
|
+
return clients.map((c) => {
|
|
22
|
+
const { Groups, ...rest } = c;
|
|
23
|
+
return { ...rest, groupCount: Groups?.length ?? 0 };
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const want = new Set(fields);
|
|
27
|
+
// groupCount=true wins over fields=['groups'] — explicit flag drops the array.
|
|
28
|
+
if (groupCount) {
|
|
29
|
+
want.add("groupCount");
|
|
30
|
+
want.delete("groups");
|
|
31
|
+
}
|
|
32
|
+
return clients.map((c) => {
|
|
33
|
+
const out = {};
|
|
34
|
+
if (want.has("name"))
|
|
35
|
+
out.Name = c.Name;
|
|
36
|
+
if (want.has("friendlyName") && c.FriendlyName !== undefined)
|
|
37
|
+
out.FriendlyName = c.FriendlyName;
|
|
38
|
+
if (want.has("type") && c.Type !== undefined)
|
|
39
|
+
out.Type = c.Type;
|
|
40
|
+
if (want.has("enabled") && c.Enabled !== undefined)
|
|
41
|
+
out.Enabled = c.Enabled;
|
|
42
|
+
if (want.has("groups") && c.Groups !== undefined)
|
|
43
|
+
out.Groups = c.Groups;
|
|
44
|
+
if (want.has("groupCount"))
|
|
45
|
+
out.groupCount = c.Groups?.length ?? 0;
|
|
46
|
+
return out;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export const registerListClients = defineTool({
|
|
50
|
+
name: "tm1_list_clients",
|
|
51
|
+
description: "List TM1 clients (users). Defaults return name, friendly name, enabled state, and full Groups[]. Use fields=['name','type'] for a lean projection or groupCount=true to replace the Groups[] array with an integer count (large savings when groups>>10).",
|
|
52
|
+
annotations: READ_ONLY,
|
|
53
|
+
output: pageShapeFor(ClientItemSchema),
|
|
54
|
+
input: {
|
|
55
|
+
...PAGINATION_SCHEMA,
|
|
56
|
+
...FORMAT_SCHEMA,
|
|
57
|
+
fields: z
|
|
58
|
+
.array(z.enum(FIELD_KEYS))
|
|
59
|
+
.optional()
|
|
60
|
+
.describe("Projection: subset of ['name','friendlyName','type','enabled','groups','groupCount']. Omit for full default payload."),
|
|
61
|
+
groupCount: z
|
|
62
|
+
.boolean()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe("If true, replace the per-client Groups[] array with an integer groupCount. Combine with fields=['name','groupCount'] for the smallest payload."),
|
|
65
|
+
},
|
|
66
|
+
handler: async ({ limit, offset, fetchAll, format, fields, groupCount }, tm1Client) => {
|
|
67
|
+
const clients = await tm1Client.security.listClients();
|
|
68
|
+
const page = paginate(clients, limit, offset, fetchAll);
|
|
69
|
+
const projectedItems = project(page.items, fields, groupCount === true);
|
|
70
|
+
const projectedPage = { ...page, items: projectedItems };
|
|
71
|
+
const columns = columnsOf([
|
|
72
|
+
"Name",
|
|
73
|
+
"FriendlyName",
|
|
74
|
+
"Type",
|
|
75
|
+
"Enabled",
|
|
76
|
+
{
|
|
77
|
+
header: "Groups",
|
|
78
|
+
get: (c) => c.groupCount !== undefined
|
|
79
|
+
? `${c.groupCount} (count)`
|
|
80
|
+
: (c.Groups ?? []).join(", "),
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
return pageResponse(projectedPage, format, { title: "Clients", columns });
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=list-clients.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PAGINATION_SCHEMA, paginate } from "../pagination.js";
|
|
3
|
+
import { FORMAT_SCHEMA, pageResponse, columnsOf } from "../format.js";
|
|
4
|
+
import { GroupItemSchema } from "../schemas/items.js";
|
|
5
|
+
import { READ_ONLY } from "../annotations.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
import { pageShapeFor } from "../schemas/common.js";
|
|
8
|
+
export const registerListGroups = defineTool({
|
|
9
|
+
name: "tm1_list_groups",
|
|
10
|
+
description: "List TM1 groups. Defaults return Name + Clients[] (member usernames). Use compact=true to replace Clients[] with an integer clientCount — large savings when groups have many members.",
|
|
11
|
+
annotations: READ_ONLY,
|
|
12
|
+
output: pageShapeFor(GroupItemSchema),
|
|
13
|
+
input: {
|
|
14
|
+
...PAGINATION_SCHEMA,
|
|
15
|
+
...FORMAT_SCHEMA,
|
|
16
|
+
compact: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("If true, replace Clients[] with clientCount: number on each group. Use for audits where membership names aren't needed."),
|
|
20
|
+
},
|
|
21
|
+
handler: async ({ limit, offset, fetchAll, format, compact }, tm1Client) => {
|
|
22
|
+
const groups = await tm1Client.security.listGroups();
|
|
23
|
+
const page = paginate(groups, limit, offset, fetchAll);
|
|
24
|
+
const items = compact
|
|
25
|
+
? page.items.map(({ Clients, ...rest }) => ({
|
|
26
|
+
...rest,
|
|
27
|
+
clientCount: Clients?.length ?? 0,
|
|
28
|
+
}))
|
|
29
|
+
: page.items;
|
|
30
|
+
const projectedPage = { ...page, items };
|
|
31
|
+
const columns = columnsOf([
|
|
32
|
+
"Name",
|
|
33
|
+
{
|
|
34
|
+
header: "Clients",
|
|
35
|
+
get: (g) => "clientCount" in g
|
|
36
|
+
? `${g.clientCount} (count)`
|
|
37
|
+
: (g.Clients ?? []).join(", "),
|
|
38
|
+
},
|
|
39
|
+
]);
|
|
40
|
+
return pageResponse(projectedPage, format, { title: "Groups", columns });
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=list-groups.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONFIRM_SCHEMA, requireConfirm } from "../confirm.js";
|
|
3
|
+
import { actionResponse } from "../format.js";
|
|
4
|
+
import { DESTRUCTIVE } from "../annotations.js";
|
|
5
|
+
import { MutationResultSchema } from "../schemas/items.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
export const registerRemoveClientGroup = defineTool({
|
|
8
|
+
name: "tm1_remove_client_group",
|
|
9
|
+
description: [
|
|
10
|
+
"Remove a TM1 client from a group.",
|
|
11
|
+
"Inverse of tm1_assign_client_group. Before: tm1_get_client to inspect current group memberships.",
|
|
12
|
+
"Safety: pass confirm=<client name verbatim>.",
|
|
13
|
+
],
|
|
14
|
+
annotations: DESTRUCTIVE,
|
|
15
|
+
output: MutationResultSchema,
|
|
16
|
+
input: {
|
|
17
|
+
clientName: z.string().describe("Client (user) name"),
|
|
18
|
+
groupName: z.string().describe("Group name"),
|
|
19
|
+
...CONFIRM_SCHEMA,
|
|
20
|
+
},
|
|
21
|
+
handler: async ({ clientName, groupName, confirm }, tm1Client) => {
|
|
22
|
+
requireConfirm(confirm, clientName, "client");
|
|
23
|
+
await tm1Client.security.removeClientGroup(clientName, groupName);
|
|
24
|
+
return actionResponse({ success: true, clientName, groupName });
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=remove-client-group.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { actionResponse } from "../format.js";
|
|
3
|
+
import { IDEMPOTENT_WRITE } from "../annotations.js";
|
|
4
|
+
import { MutationResultSchema } from "../schemas/items.js";
|
|
5
|
+
import { defineTool } from "../define-tool.js";
|
|
6
|
+
export const registerUpdateClient = defineTool({
|
|
7
|
+
name: "tm1_update_client",
|
|
8
|
+
description: "Update a TM1 client. Allowed fields: password, friendlyName, enabled (true=active, false=disabled).",
|
|
9
|
+
annotations: IDEMPOTENT_WRITE,
|
|
10
|
+
output: MutationResultSchema,
|
|
11
|
+
input: {
|
|
12
|
+
clientName: z.string().describe("Client (user) name"),
|
|
13
|
+
password: z.string().optional().describe("New password"),
|
|
14
|
+
friendlyName: z.string().optional().describe("New display name"),
|
|
15
|
+
enabled: z.boolean().optional().describe("Enable/disable the client"),
|
|
16
|
+
},
|
|
17
|
+
handler: async ({ clientName, ...payload }, tm1Client) => {
|
|
18
|
+
await tm1Client.security.updateClient(clientName, payload);
|
|
19
|
+
return actionResponse({ success: true, clientName });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=update-client.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
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 registerCreateSubset = defineTool({
|
|
8
|
+
name: "tm1_create_subset",
|
|
9
|
+
description: "Create a public TM1 subset. Provide either expression (MDX-based, dynamic) OR elements (static list) — not both. Optional alias attribute name controls the displayed alias.",
|
|
10
|
+
annotations: WRITE,
|
|
11
|
+
output: MutationResultSchema,
|
|
12
|
+
input: {
|
|
13
|
+
dimensionName: z.string().describe("Dimension name"),
|
|
14
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
15
|
+
subsetName: z.string().describe("New subset name"),
|
|
16
|
+
expression: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("MDX expression (e.g. '{TM1FILTERBYLEVEL({TM1SUBSETALL([Dim])}, 0)}'). Mutually exclusive with elements."),
|
|
20
|
+
elements: z
|
|
21
|
+
.array(z.string())
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("Static element name list. Mutually exclusive with expression."),
|
|
24
|
+
alias: z
|
|
25
|
+
.string()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Alias attribute used as display name in the subset"),
|
|
28
|
+
},
|
|
29
|
+
handler: async ({ dimensionName, hierarchyName, subsetName, expression, elements, alias }, tm1Client) => {
|
|
30
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
31
|
+
await tm1Client.subsets.create(dimensionName, hierarchy, {
|
|
32
|
+
name: subsetName,
|
|
33
|
+
expression,
|
|
34
|
+
elements,
|
|
35
|
+
alias,
|
|
36
|
+
});
|
|
37
|
+
return actionResponse({
|
|
38
|
+
success: true,
|
|
39
|
+
subsetName,
|
|
40
|
+
kind: expression ? "mdx" : "static",
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=create-subset.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONFIRM_SCHEMA, requireConfirm } from "../confirm.js";
|
|
3
|
+
import { actionResponse } from "../format.js";
|
|
4
|
+
import { DESTRUCTIVE } from "../annotations.js";
|
|
5
|
+
import { MutationResultSchema } from "../schemas/items.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
8
|
+
export const registerDeleteSubset = defineTool({
|
|
9
|
+
name: "tm1_delete_subset",
|
|
10
|
+
description: "Delete a public TM1 subset. Fails if the subset is referenced by views/processes (404 if not found). Irreversible — pass confirm=<subset name verbatim>.",
|
|
11
|
+
annotations: DESTRUCTIVE,
|
|
12
|
+
output: MutationResultSchema,
|
|
13
|
+
input: {
|
|
14
|
+
dimensionName: z.string().describe("Dimension name"),
|
|
15
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
16
|
+
subsetName: z.string().describe("Subset to delete"),
|
|
17
|
+
...CONFIRM_SCHEMA,
|
|
18
|
+
},
|
|
19
|
+
handler: async ({ dimensionName, hierarchyName, subsetName, confirm }, tm1Client) => {
|
|
20
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
21
|
+
requireConfirm(confirm, subsetName, "subset");
|
|
22
|
+
await tm1Client.subsets.delete(dimensionName, hierarchy, subsetName);
|
|
23
|
+
return actionResponse({ success: true, subsetName });
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=delete-subset.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { READ_ONLY } from "../annotations.js";
|
|
3
|
+
import { SubsetSchema } from "../schemas/items.js";
|
|
4
|
+
import { defineTool } from "../define-tool.js";
|
|
5
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
6
|
+
export const registerGetSubset = defineTool({
|
|
7
|
+
name: "tm1_get_subset",
|
|
8
|
+
description: "Get a single TM1 subset with its MDX expression (if any) and resolved element list. Use isPrivate=true for private subsets.",
|
|
9
|
+
annotations: READ_ONLY,
|
|
10
|
+
output: SubsetSchema,
|
|
11
|
+
input: {
|
|
12
|
+
dimensionName: z.string().describe("Dimension name"),
|
|
13
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
14
|
+
subsetName: z.string().describe("Subset name"),
|
|
15
|
+
isPrivate: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.optional()
|
|
18
|
+
.default(false)
|
|
19
|
+
.describe("Look up the subset in PrivateSubsets instead of public Subsets"),
|
|
20
|
+
},
|
|
21
|
+
handler: async ({ dimensionName, hierarchyName, subsetName, isPrivate }, tm1Client) => {
|
|
22
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
23
|
+
const subset = await tm1Client.subsets.get(dimensionName, hierarchy, subsetName, isPrivate ?? false);
|
|
24
|
+
return {
|
|
25
|
+
content: [{ type: "text", text: JSON.stringify(subset) }],
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=get-subset.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PAGINATION_SCHEMA, paginate } from "../pagination.js";
|
|
3
|
+
import { FORMAT_SCHEMA, pageResponse, columnsOf } from "../format.js";
|
|
4
|
+
import { READ_ONLY } from "../annotations.js";
|
|
5
|
+
import { SubsetSchema } from "../schemas/items.js";
|
|
6
|
+
import { defineTool } from "../define-tool.js";
|
|
7
|
+
import { HIERARCHY_NAME_OPTIONAL, resolveHierarchy } from "../hierarchy.js";
|
|
8
|
+
import { pageShapeFor } from "../schemas/common.js";
|
|
9
|
+
export const registerListSubsets = defineTool({
|
|
10
|
+
name: "tm1_list_subsets",
|
|
11
|
+
description: "List public + private subsets of a TM1 hierarchy. Returns names, scope (public/private), MDX expression preview, and alias. Paginated (default 50/page).",
|
|
12
|
+
annotations: READ_ONLY,
|
|
13
|
+
output: pageShapeFor(SubsetSchema),
|
|
14
|
+
input: {
|
|
15
|
+
dimensionName: z.string().describe("Dimension name"),
|
|
16
|
+
...HIERARCHY_NAME_OPTIONAL,
|
|
17
|
+
...PAGINATION_SCHEMA,
|
|
18
|
+
...FORMAT_SCHEMA,
|
|
19
|
+
},
|
|
20
|
+
handler: async ({ dimensionName, hierarchyName, limit, offset, fetchAll, format }, tm1Client) => {
|
|
21
|
+
const hierarchy = resolveHierarchy(dimensionName, hierarchyName);
|
|
22
|
+
const subsets = await tm1Client.subsets.list(dimensionName, hierarchy);
|
|
23
|
+
const page = paginate(subsets, limit, offset, fetchAll);
|
|
24
|
+
const columns = columnsOf([
|
|
25
|
+
"name",
|
|
26
|
+
{ header: "scope", get: (s) => (s.private ? "private" : "public") },
|
|
27
|
+
"alias",
|
|
28
|
+
"expression",
|
|
29
|
+
]);
|
|
30
|
+
return pageResponse(page, format, {
|
|
31
|
+
title: `Subsets of ${dimensionName}/${hierarchy}`,
|
|
32
|
+
columns,
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=list-subsets.js.map
|