@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.10
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/LICENSE +81 -30
- package/README.md +168 -134
- package/lib/adapters/connection-facade.d.ts +458 -0
- package/lib/adapters/connection-facade.js +379 -0
- package/lib/adapters/connection-facade.js.map +1 -0
- package/lib/adapters/errors.d.ts +547 -0
- package/lib/adapters/errors.js +937 -0
- package/lib/adapters/errors.js.map +1 -0
- package/lib/adapters/lifecycle.d.ts +112 -0
- package/lib/adapters/lifecycle.js +94 -0
- package/lib/adapters/lifecycle.js.map +1 -0
- package/lib/adapters/rest/cache.d.ts +69 -0
- package/lib/adapters/rest/cache.js +133 -0
- package/lib/adapters/rest/cache.js.map +1 -0
- package/lib/adapters/rest/index.d.ts +11 -0
- package/lib/adapters/rest/index.js +18 -0
- package/lib/adapters/rest/index.js.map +1 -0
- package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
- package/lib/adapters/rest/profiling-rest-client.js +115 -0
- package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
- package/lib/adapters/rest/rest-api-adapter.d.ts +393 -0
- package/lib/adapters/rest/rest-api-adapter.js +764 -0
- package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
- package/lib/adapters/rest/types.d.ts +34 -0
- package/lib/adapters/rest/types.js +9 -0
- package/lib/adapters/rest/types.js.map +1 -0
- package/lib/adapters/retry.d.ts +91 -0
- package/lib/adapters/retry.js +215 -0
- package/lib/adapters/retry.js.map +1 -0
- package/lib/adapters/soql/cuneiform-query-builder.d.ts +418 -0
- package/lib/adapters/soql/cuneiform-query-builder.js +606 -0
- package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
- package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
- package/lib/adapters/soql/soql-query-adapter.js +259 -0
- package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
- package/lib/adapters/soql/types.d.ts +37 -0
- package/lib/adapters/soql/types.js +19 -0
- package/lib/adapters/soql/types.js.map +1 -0
- package/lib/adapters/testing/index.d.ts +37 -0
- package/lib/adapters/testing/index.js +20 -0
- package/lib/adapters/testing/index.js.map +1 -0
- package/lib/adapters/testing/mock-connection.d.ts +77 -0
- package/lib/adapters/testing/mock-connection.js +207 -0
- package/lib/adapters/testing/mock-connection.js.map +1 -0
- package/lib/adapters/testing/mock-logger.d.ts +29 -0
- package/lib/adapters/testing/mock-logger.js +57 -0
- package/lib/adapters/testing/mock-logger.js.map +1 -0
- package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
- package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
- package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
- package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
- package/lib/adapters/testing/mock-oclif-config.js +90 -0
- package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
- package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
- package/lib/adapters/testing/mock-rest-adapter.js +243 -0
- package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
- package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
- package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
- package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
- package/lib/adapters/testing/mock-soql-adapter.js +120 -0
- package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
- package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
- package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-connection.d.ts +93 -0
- package/lib/adapters/testing/stub-connection.js +97 -0
- package/lib/adapters/testing/stub-connection.js.map +1 -0
- package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
- package/lib/adapters/testing/stub-rest-adapter.js +58 -0
- package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
- package/lib/adapters/testing/stub-soql-adapter.js +50 -0
- package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/types.d.ts +71 -0
- package/lib/adapters/testing/types.js +9 -0
- package/lib/adapters/testing/types.js.map +1 -0
- package/lib/adapters/tooling/index.d.ts +10 -0
- package/lib/adapters/tooling/index.js +17 -0
- package/lib/adapters/tooling/index.js.map +1 -0
- package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
- package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
- package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
- package/lib/adapters/tooling/types.d.ts +81 -0
- package/lib/adapters/tooling/types.js +9 -0
- package/lib/adapters/tooling/types.js.map +1 -0
- package/lib/adapters/types.d.ts +112 -0
- package/lib/adapters/types.js +169 -0
- package/lib/adapters/types.js.map +1 -0
- package/lib/base/cuneiform-command.d.ts +175 -0
- package/lib/base/cuneiform-command.js +326 -0
- package/lib/base/cuneiform-command.js.map +1 -0
- package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
- package/lib/commands/cuneiform/compatibility/check.js +114 -0
- package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
- package/lib/commands/cuneiform/definition/create.d.ts +120 -0
- package/lib/commands/cuneiform/definition/create.js +737 -0
- package/lib/commands/cuneiform/definition/create.js.map +1 -0
- package/lib/commands/cuneiform/definition/export.d.ts +57 -0
- package/lib/commands/cuneiform/definition/export.js +133 -0
- package/lib/commands/cuneiform/definition/export.js.map +1 -0
- package/lib/commands/cuneiform/definition/get.d.ts +86 -0
- package/lib/commands/cuneiform/definition/get.js +277 -0
- package/lib/commands/cuneiform/definition/get.js.map +1 -0
- package/lib/commands/cuneiform/definition/import.d.ts +54 -0
- package/lib/commands/cuneiform/definition/import.js +118 -0
- package/lib/commands/cuneiform/definition/import.js.map +1 -0
- package/lib/commands/cuneiform/definition/list.d.ts +110 -0
- package/lib/commands/cuneiform/definition/list.js +351 -0
- package/lib/commands/cuneiform/definition/list.js.map +1 -0
- package/lib/commands/cuneiform/definition/purge.d.ts +109 -0
- package/lib/commands/cuneiform/definition/purge.js +578 -0
- package/lib/commands/cuneiform/definition/purge.js.map +1 -0
- package/lib/commands/cuneiform/definition/update.d.ts +58 -0
- package/lib/commands/cuneiform/definition/update.js +209 -0
- package/lib/commands/cuneiform/definition/update.js.map +1 -0
- package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
- package/lib/commands/cuneiform/mcp/serve.js +109 -0
- package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
- package/lib/commands/cuneiform/object/describe.d.ts +61 -0
- package/lib/commands/cuneiform/object/describe.js +461 -0
- package/lib/commands/cuneiform/object/describe.js.map +1 -0
- package/lib/commands/cuneiform/object/list.d.ts +123 -0
- package/lib/commands/cuneiform/object/list.js +264 -0
- package/lib/commands/cuneiform/object/list.js.map +1 -0
- package/lib/commands/cuneiform/org/details.d.ts +99 -0
- package/lib/commands/cuneiform/org/details.js +521 -0
- package/lib/commands/cuneiform/org/details.js.map +1 -0
- package/lib/commands/cuneiform/org/reset.d.ts +46 -0
- package/lib/commands/cuneiform/org/reset.js +135 -0
- package/lib/commands/cuneiform/org/reset.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
- package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/delete.js +223 -0
- package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
- package/lib/commands/cuneiform/profile/request/list.js +102 -0
- package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
- package/lib/commands/cuneiform/profile.d.ts +93 -0
- package/lib/commands/cuneiform/profile.js +353 -0
- package/lib/commands/cuneiform/profile.js.map +1 -0
- package/lib/commands/cuneiform/summary/purge.d.ts +80 -0
- package/lib/commands/cuneiform/summary/purge.js +467 -0
- package/lib/commands/cuneiform/summary/purge.js.map +1 -0
- package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
- package/lib/commands/cuneiform/summary/reprofile.js +236 -0
- package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
- package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
- package/lib/commands/cuneiform/summary/stop.js +234 -0
- package/lib/commands/cuneiform/summary/stop.js.map +1 -0
- package/lib/commands/cuneiform/user/details.d.ts +77 -0
- package/lib/commands/cuneiform/user/details.js +414 -0
- package/lib/commands/cuneiform/user/details.js.map +1 -0
- package/lib/constants/namespace-constants.d.ts +102 -0
- package/lib/constants/namespace-constants.js +225 -0
- package/lib/constants/namespace-constants.js.map +1 -0
- package/lib/debug/command-debug-proxy.d.ts +101 -0
- package/lib/debug/command-debug-proxy.js +171 -0
- package/lib/debug/command-debug-proxy.js.map +1 -0
- package/lib/debug/debug-logger.d.ts +85 -0
- package/lib/debug/debug-logger.js +133 -0
- package/lib/debug/debug-logger.js.map +1 -0
- package/lib/debug/service-debug-proxy.d.ts +30 -0
- package/lib/debug/service-debug-proxy.js +102 -0
- package/lib/debug/service-debug-proxy.js.map +1 -0
- package/lib/hooks/prerun.d.ts +25 -0
- package/lib/hooks/prerun.js +47 -0
- package/lib/hooks/prerun.js.map +1 -0
- package/lib/mcp/config/mcp-config.d.ts +55 -0
- package/lib/mcp/config/mcp-config.js +51 -0
- package/lib/mcp/config/mcp-config.js.map +1 -0
- package/lib/mcp/config/pagination.d.ts +96 -0
- package/lib/mcp/config/pagination.js +108 -0
- package/lib/mcp/config/pagination.js.map +1 -0
- package/lib/mcp/config/system-prompts.d.ts +18 -0
- package/lib/mcp/config/system-prompts.js +92 -0
- package/lib/mcp/config/system-prompts.js.map +1 -0
- package/lib/mcp/errors.d.ts +23 -0
- package/lib/mcp/errors.js +27 -0
- package/lib/mcp/errors.js.map +1 -0
- package/lib/mcp/schemas/input-schemas.d.ts +327 -0
- package/lib/mcp/schemas/input-schemas.js +310 -0
- package/lib/mcp/schemas/input-schemas.js.map +1 -0
- package/lib/mcp/server.d.ts +40 -0
- package/lib/mcp/server.js +316 -0
- package/lib/mcp/server.js.map +1 -0
- package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
- package/lib/mcp/tools/contactpoint-tools.js +34 -0
- package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
- package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
- package/lib/mcp/tools/definition-io-tools.js +152 -0
- package/lib/mcp/tools/definition-io-tools.js.map +1 -0
- package/lib/mcp/tools/definition-tools.d.ts +51 -0
- package/lib/mcp/tools/definition-tools.js +220 -0
- package/lib/mcp/tools/definition-tools.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +37 -0
- package/lib/mcp/tools/index.js +88 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/object-tools.d.ts +22 -0
- package/lib/mcp/tools/object-tools.js +327 -0
- package/lib/mcp/tools/object-tools.js.map +1 -0
- package/lib/mcp/tools/org-tools.d.ts +14 -0
- package/lib/mcp/tools/org-tools.js +177 -0
- package/lib/mcp/tools/org-tools.js.map +1 -0
- package/lib/mcp/tools/profile-tools.d.ts +59 -0
- package/lib/mcp/tools/profile-tools.js +213 -0
- package/lib/mcp/tools/profile-tools.js.map +1 -0
- package/lib/mcp/tools/summary-tools.d.ts +14 -0
- package/lib/mcp/tools/summary-tools.js +38 -0
- package/lib/mcp/tools/summary-tools.js.map +1 -0
- package/lib/mcp/tools/tool-factory.d.ts +63 -0
- package/lib/mcp/tools/tool-factory.js +146 -0
- package/lib/mcp/tools/tool-factory.js.map +1 -0
- package/lib/mcp/tools/user-tools.d.ts +25 -0
- package/lib/mcp/tools/user-tools.js +167 -0
- package/lib/mcp/tools/user-tools.js.map +1 -0
- package/lib/models/cascade-skip-accumulator.d.ts +25 -0
- package/lib/models/cascade-skip-accumulator.js +9 -0
- package/lib/models/cascade-skip-accumulator.js.map +1 -0
- package/lib/models/date-literal.d.ts +280 -0
- package/lib/models/date-literal.js +1164 -0
- package/lib/models/date-literal.js.map +1 -0
- package/lib/models/object-describe-types.d.ts +173 -0
- package/lib/models/object-describe-types.js +9 -0
- package/lib/models/object-describe-types.js.map +1 -0
- package/lib/models/portability-recipe.d.ts +35 -0
- package/lib/models/portability-recipe.js +113 -0
- package/lib/models/portability-recipe.js.map +1 -0
- package/lib/models/profile-request-types.d.ts +118 -0
- package/lib/models/profile-request-types.js +23 -0
- package/lib/models/profile-request-types.js.map +1 -0
- package/lib/models/profiling-execution-types.d.ts +154 -0
- package/lib/models/profiling-execution-types.js +14 -0
- package/lib/models/profiling-execution-types.js.map +1 -0
- package/lib/models/service-result.d.ts +114 -0
- package/lib/models/service-result.js +81 -0
- package/lib/models/service-result.js.map +1 -0
- package/lib/models/sfdmu-types.d.ts +49 -0
- package/lib/models/sfdmu-types.js +23 -0
- package/lib/models/sfdmu-types.js.map +1 -0
- package/lib/models/status-types.d.ts +38 -0
- package/lib/models/status-types.js +12 -0
- package/lib/models/status-types.js.map +1 -0
- package/lib/models/summary-bulk-types.d.ts +61 -0
- package/lib/models/summary-bulk-types.js +23 -0
- package/lib/models/summary-bulk-types.js.map +1 -0
- package/lib/models/user-details-types.d.ts +188 -0
- package/lib/models/user-details-types.js +9 -0
- package/lib/models/user-details-types.js.map +1 -0
- package/lib/models/year-range.d.ts +78 -0
- package/lib/models/year-range.js +153 -0
- package/lib/models/year-range.js.map +1 -0
- package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
- package/lib/operations/CompatibilityCheckOperation.js +102 -0
- package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
- package/lib/operations/DefinitionCreateOperation.d.ts +427 -0
- package/lib/operations/DefinitionCreateOperation.js +1270 -0
- package/lib/operations/DefinitionCreateOperation.js.map +1 -0
- package/lib/operations/DefinitionExportOperation.d.ts +155 -0
- package/lib/operations/DefinitionExportOperation.js +281 -0
- package/lib/operations/DefinitionExportOperation.js.map +1 -0
- package/lib/operations/DefinitionImportOperation.d.ts +144 -0
- package/lib/operations/DefinitionImportOperation.js +357 -0
- package/lib/operations/DefinitionImportOperation.js.map +1 -0
- package/lib/operations/DefinitionListOperation.d.ts +66 -0
- package/lib/operations/DefinitionListOperation.js +108 -0
- package/lib/operations/DefinitionListOperation.js.map +1 -0
- package/lib/operations/DefinitionPurgeOperation.d.ts +203 -0
- package/lib/operations/DefinitionPurgeOperation.js +465 -0
- package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
- package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
- package/lib/operations/DefinitionUpdateOperation.js +142 -0
- package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
- package/lib/operations/OrgDetailsOperation.d.ts +253 -0
- package/lib/operations/OrgDetailsOperation.js +456 -0
- package/lib/operations/OrgDetailsOperation.js.map +1 -0
- package/lib/operations/OrgResetOperation.d.ts +114 -0
- package/lib/operations/OrgResetOperation.js +209 -0
- package/lib/operations/OrgResetOperation.js.map +1 -0
- package/lib/operations/ProfileOperation.d.ts +192 -0
- package/lib/operations/ProfileOperation.js +371 -0
- package/lib/operations/ProfileOperation.js.map +1 -0
- package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
- package/lib/operations/ProfileRequestCancelOperation.js +137 -0
- package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
- package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
- package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
- package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
- package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
- package/lib/operations/ProfileRequestListOperation.js +61 -0
- package/lib/operations/ProfileRequestListOperation.js.map +1 -0
- package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
- package/lib/operations/SummaryPurgeOperation.js +257 -0
- package/lib/operations/SummaryPurgeOperation.js.map +1 -0
- package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
- package/lib/operations/SummaryReprofileOperation.js +174 -0
- package/lib/operations/SummaryReprofileOperation.js.map +1 -0
- package/lib/operations/SummaryStopOperation.d.ts +87 -0
- package/lib/operations/SummaryStopOperation.js +175 -0
- package/lib/operations/SummaryStopOperation.js.map +1 -0
- package/lib/services/BulkExecutionService.d.ts +120 -0
- package/lib/services/BulkExecutionService.js +535 -0
- package/lib/services/BulkExecutionService.js.map +1 -0
- package/lib/services/CompatibilityService.d.ts +81 -0
- package/lib/services/CompatibilityService.js +118 -0
- package/lib/services/CompatibilityService.js.map +1 -0
- package/lib/services/ConfigureMode.d.ts +98 -0
- package/lib/services/ConfigureMode.js +413 -0
- package/lib/services/ConfigureMode.js.map +1 -0
- package/lib/services/ContactPointService.d.ts +111 -0
- package/lib/services/ContactPointService.js +286 -0
- package/lib/services/ContactPointService.js.map +1 -0
- package/lib/services/DataAvailabilityService.d.ts +81 -0
- package/lib/services/DataAvailabilityService.js +128 -0
- package/lib/services/DataAvailabilityService.js.map +1 -0
- package/lib/services/DefinitionFieldGenerationService.d.ts +357 -0
- package/lib/services/DefinitionFieldGenerationService.js +899 -0
- package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
- package/lib/services/DefinitionQueryBuilder.d.ts +92 -0
- package/lib/services/DefinitionQueryBuilder.js +328 -0
- package/lib/services/DefinitionQueryBuilder.js.map +1 -0
- package/lib/services/ObjectDescribeService.d.ts +436 -0
- package/lib/services/ObjectDescribeService.js +881 -0
- package/lib/services/ObjectDescribeService.js.map +1 -0
- package/lib/services/ObjectFilteringService.d.ts +484 -0
- package/lib/services/ObjectFilteringService.js +1080 -0
- package/lib/services/ObjectFilteringService.js.map +1 -0
- package/lib/services/ObjectListCommandService.d.ts +467 -0
- package/lib/services/ObjectListCommandService.js +904 -0
- package/lib/services/ObjectListCommandService.js.map +1 -0
- package/lib/services/ObjectListService.d.ts +201 -0
- package/lib/services/ObjectListService.js +350 -0
- package/lib/services/ObjectListService.js.map +1 -0
- package/lib/services/OrgInfoService.d.ts +493 -0
- package/lib/services/OrgInfoService.js +1142 -0
- package/lib/services/OrgInfoService.js.map +1 -0
- package/lib/services/PollingService.d.ts +105 -0
- package/lib/services/PollingService.js +117 -0
- package/lib/services/PollingService.js.map +1 -0
- package/lib/services/ProfileRequestService.d.ts +186 -0
- package/lib/services/ProfileRequestService.js +555 -0
- package/lib/services/ProfileRequestService.js.map +1 -0
- package/lib/services/ProfilingDefinitionService.d.ts +575 -0
- package/lib/services/ProfilingDefinitionService.js +1029 -0
- package/lib/services/ProfilingDefinitionService.js.map +1 -0
- package/lib/services/ProfilingExecutionService.d.ts +122 -0
- package/lib/services/ProfilingExecutionService.js +320 -0
- package/lib/services/ProfilingExecutionService.js.map +1 -0
- package/lib/services/ProfilingSummaryService.d.ts +292 -0
- package/lib/services/ProfilingSummaryService.js +688 -0
- package/lib/services/ProfilingSummaryService.js.map +1 -0
- package/lib/services/RecordTypeService.d.ts +129 -0
- package/lib/services/RecordTypeService.js +284 -0
- package/lib/services/RecordTypeService.js.map +1 -0
- package/lib/services/SFDMUService.d.ts +146 -0
- package/lib/services/SFDMUService.js +323 -0
- package/lib/services/SFDMUService.js.map +1 -0
- package/lib/services/TabDetectionService.d.ts +105 -0
- package/lib/services/TabDetectionService.js +206 -0
- package/lib/services/TabDetectionService.js.map +1 -0
- package/lib/services/UnconfigureMode.d.ts +74 -0
- package/lib/services/UnconfigureMode.js +378 -0
- package/lib/services/UnconfigureMode.js.map +1 -0
- package/lib/services/UserConfigurationService.d.ts +158 -0
- package/lib/services/UserConfigurationService.js +574 -0
- package/lib/services/UserConfigurationService.js.map +1 -0
- package/lib/services/UserConfigurationTypes.d.ts +181 -0
- package/lib/services/UserConfigurationTypes.js +14 -0
- package/lib/services/UserConfigurationTypes.js.map +1 -0
- package/lib/services/UserReadinessService.d.ts +347 -0
- package/lib/services/UserReadinessService.js +891 -0
- package/lib/services/UserReadinessService.js.map +1 -0
- package/lib/services/constants.d.ts +54 -0
- package/lib/services/constants.js +71 -0
- package/lib/services/constants.js.map +1 -0
- package/lib/services/namespace-constants.d.ts +1 -0
- package/lib/services/namespace-constants.js +11 -0
- package/lib/services/namespace-constants.js.map +1 -0
- package/lib/services/namespace-filter.d.ts +36 -0
- package/lib/services/namespace-filter.js +109 -0
- package/lib/services/namespace-filter.js.map +1 -0
- package/lib/services/validation.d.ts +47 -0
- package/lib/services/validation.js +119 -0
- package/lib/services/validation.js.map +1 -0
- package/lib/utils/batch-processor.d.ts +13 -0
- package/lib/utils/batch-processor.js +39 -0
- package/lib/utils/batch-processor.js.map +1 -0
- package/lib/utils/formatting/availability-grid.d.ts +81 -0
- package/lib/utils/formatting/availability-grid.js +94 -0
- package/lib/utils/formatting/availability-grid.js.map +1 -0
- package/lib/utils/formatting/business-process-grid.d.ts +51 -0
- package/lib/utils/formatting/business-process-grid.js +58 -0
- package/lib/utils/formatting/business-process-grid.js.map +1 -0
- package/lib/utils/formatting/command-display.d.ts +154 -0
- package/lib/utils/formatting/command-display.js +154 -0
- package/lib/utils/formatting/command-display.js.map +1 -0
- package/lib/utils/formatting/definition-create-display.d.ts +118 -0
- package/lib/utils/formatting/definition-create-display.js +230 -0
- package/lib/utils/formatting/definition-create-display.js.map +1 -0
- package/lib/utils/formatting/empty-states.d.ts +35 -0
- package/lib/utils/formatting/empty-states.js +70 -0
- package/lib/utils/formatting/empty-states.js.map +1 -0
- package/lib/utils/formatting/errors.d.ts +33 -0
- package/lib/utils/formatting/errors.js +72 -0
- package/lib/utils/formatting/errors.js.map +1 -0
- package/lib/utils/formatting/field-types.d.ts +32 -0
- package/lib/utils/formatting/field-types.js +88 -0
- package/lib/utils/formatting/field-types.js.map +1 -0
- package/lib/utils/formatting/index.d.ts +29 -0
- package/lib/utils/formatting/index.js +28 -0
- package/lib/utils/formatting/index.js.map +1 -0
- package/lib/utils/formatting/indicators.d.ts +113 -0
- package/lib/utils/formatting/indicators.js +161 -0
- package/lib/utils/formatting/indicators.js.map +1 -0
- package/lib/utils/formatting/loading-messages.d.ts +37 -0
- package/lib/utils/formatting/loading-messages.js +50 -0
- package/lib/utils/formatting/loading-messages.js.map +1 -0
- package/lib/utils/formatting/namespace-display.d.ts +31 -0
- package/lib/utils/formatting/namespace-display.js +64 -0
- package/lib/utils/formatting/namespace-display.js.map +1 -0
- package/lib/utils/formatting/numbers.d.ts +73 -0
- package/lib/utils/formatting/numbers.js +187 -0
- package/lib/utils/formatting/numbers.js.map +1 -0
- package/lib/utils/formatting/object-describe-display.d.ts +117 -0
- package/lib/utils/formatting/object-describe-display.js +447 -0
- package/lib/utils/formatting/object-describe-display.js.map +1 -0
- package/lib/utils/formatting/object-list-display.d.ts +225 -0
- package/lib/utils/formatting/object-list-display.js +718 -0
- package/lib/utils/formatting/object-list-display.js.map +1 -0
- package/lib/utils/formatting/org-identity.d.ts +15 -0
- package/lib/utils/formatting/org-identity.js +28 -0
- package/lib/utils/formatting/org-identity.js.map +1 -0
- package/lib/utils/formatting/record-age-grid.d.ts +41 -0
- package/lib/utils/formatting/record-age-grid.js +56 -0
- package/lib/utils/formatting/record-age-grid.js.map +1 -0
- package/lib/utils/formatting/sections.d.ts +108 -0
- package/lib/utils/formatting/sections.js +150 -0
- package/lib/utils/formatting/sections.js.map +1 -0
- package/lib/utils/formatting/tables.d.ts +90 -0
- package/lib/utils/formatting/tables.js +113 -0
- package/lib/utils/formatting/tables.js.map +1 -0
- package/lib/utils/formatting/user-details-display.d.ts +101 -0
- package/lib/utils/formatting/user-details-display.js +425 -0
- package/lib/utils/formatting/user-details-display.js.map +1 -0
- package/lib/utils/pagination/keypress-reader.d.ts +20 -0
- package/lib/utils/pagination/keypress-reader.js +63 -0
- package/lib/utils/pagination/keypress-reader.js.map +1 -0
- package/lib/utils/pagination/paginate-output.d.ts +48 -0
- package/lib/utils/pagination/paginate-output.js +136 -0
- package/lib/utils/pagination/paginate-output.js.map +1 -0
- package/messages/compatibility.check.md +71 -0
- package/messages/cuneiform.access.md +138 -0
- package/messages/definition.create.md +525 -0
- package/messages/definition.export.md +84 -0
- package/messages/definition.get.md +147 -0
- package/messages/definition.import.md +65 -0
- package/messages/definition.list.md +264 -0
- package/messages/definition.purge.md +330 -0
- package/messages/definition.update.md +118 -0
- package/messages/mcp.serve.md +66 -0
- package/messages/object.describe.md +205 -0
- package/messages/object.list.md +463 -0
- package/messages/org.details.md +386 -0
- package/messages/org.reset.md +71 -0
- package/messages/profile.md +243 -0
- package/messages/profile.request.cancel.md +143 -0
- package/messages/profile.request.delete.md +139 -0
- package/messages/profile.request.list.md +89 -0
- package/messages/summary.purge.md +218 -0
- package/messages/summary.reprofile.md +150 -0
- package/messages/summary.stop.md +157 -0
- package/messages/user.details.md +501 -0
- package/oclif.lock +3267 -2148
- package/oclif.manifest.json +2829 -31
- package/package.json +104 -18
- package/lib/commands/cuneiform/about.d.ts +0 -13
- package/lib/commands/cuneiform/about.js +0 -26
- package/lib/commands/cuneiform/about.js.map +0 -1
- package/lib/commands/hello/world.d.ts +0 -14
- package/lib/commands/hello/world.js +0 -27
- package/lib/commands/hello/world.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/messages/cuneiform.about.md +0 -19
- package/messages/hello.world.md +0 -29
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, PeerNova, Inc. All Rights Reserved.
|
|
3
|
+
* PROPRIETARY AND CONFIDENTIAL. Unauthorized copying, modification,
|
|
4
|
+
* or distribution is strictly prohibited. Use is governed by the
|
|
5
|
+
* Master Subscription Agreement (MSA) between PeerNova, Inc. and the
|
|
6
|
+
* licensee. See LICENSE file in the repo root.
|
|
7
|
+
*/
|
|
8
|
+
import { ContactPointService } from '../../services/ContactPointService.js';
|
|
9
|
+
import { ObjectDescribeService } from '../../services/ObjectDescribeService.js';
|
|
10
|
+
import { ObjectFilteringService } from '../../services/ObjectFilteringService.js';
|
|
11
|
+
import { ObjectListService } from '../../services/ObjectListService.js';
|
|
12
|
+
import { RecordTypeService } from '../../services/RecordTypeService.js';
|
|
13
|
+
import { TabDetectionService } from '../../services/TabDetectionService.js';
|
|
14
|
+
import { parseNamespaceFilter } from '../../services/namespace-filter.js';
|
|
15
|
+
import { decodeCursor, clampPageSize, createPaginationMetadata, PAGE_SIZE_DEFAULTS } from '../config/pagination.js';
|
|
16
|
+
import { McpErrorCodes } from '../errors.js';
|
|
17
|
+
import { OBJECT_DESCRIBE_SECTIONS } from '../schemas/input-schemas.js';
|
|
18
|
+
import { serviceResultToMcp, serviceResultToMcpPaginated, createMcpError, extractErrorMessage, } from './tool-factory.js';
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes the MCP namespace input (string | string[]) into a single
|
|
21
|
+
* comma-separated string for the shared `parseNamespaceFilter` parser, then
|
|
22
|
+
* returns the resolved NamespaceFilter or undefined.
|
|
23
|
+
*
|
|
24
|
+
* @param raw - Raw MCP namespace input from the union schema
|
|
25
|
+
* @returns Parsed NamespaceFilter result (value or error)
|
|
26
|
+
*/
|
|
27
|
+
function normalizeMcpNamespace(raw) {
|
|
28
|
+
if (raw === undefined)
|
|
29
|
+
return { value: undefined };
|
|
30
|
+
const stringified = Array.isArray(raw) ? raw.join(',') : raw;
|
|
31
|
+
return parseNamespaceFilter(stringified);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Field type mapping from user-friendly categories to Salesforce field types.
|
|
35
|
+
*/
|
|
36
|
+
const FIELD_TYPE_MAP = {
|
|
37
|
+
text: ['string', 'textarea', 'url', 'email', 'phone'],
|
|
38
|
+
picklist: ['picklist', 'multipicklist'],
|
|
39
|
+
lookup: ['reference'],
|
|
40
|
+
number: ['double', 'currency', 'percent', 'int'],
|
|
41
|
+
date: ['date', 'datetime', 'time'],
|
|
42
|
+
formula: ['calculated'],
|
|
43
|
+
checkbox: ['boolean'],
|
|
44
|
+
id: ['id'],
|
|
45
|
+
address: ['address'],
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Handler for cuneiform_object_list tool invocation.
|
|
49
|
+
*
|
|
50
|
+
* @param adapters - Session-scoped MCP adapters
|
|
51
|
+
* @param params - Validated input from MCP SDK
|
|
52
|
+
* @returns MCP CallToolResult
|
|
53
|
+
*/
|
|
54
|
+
export async function handleObjectList(adapters, params) {
|
|
55
|
+
try {
|
|
56
|
+
// Parse namespace input shape (string | string[]) into the typed
|
|
57
|
+
// NamespaceFilter at the MCP boundary (CLI-3801).
|
|
58
|
+
const namespaceResult = normalizeMcpNamespace(params.namespace);
|
|
59
|
+
if (namespaceResult.error) {
|
|
60
|
+
return createMcpError(McpErrorCodes.INVALID_TOOL_INPUT, namespaceResult.error);
|
|
61
|
+
}
|
|
62
|
+
// Pagination: decode cursor and clamp page size
|
|
63
|
+
const offset = decodeCursor(params.cursor);
|
|
64
|
+
const pageSize = clampPageSize(params.limit, PAGE_SIZE_DEFAULTS.OBJECT_LIST.default, PAGE_SIZE_DEFAULTS.OBJECT_LIST.max);
|
|
65
|
+
const { soql: soqlAdapter, tooling: toolingAdapter, rest: restAdapter } = adapters;
|
|
66
|
+
const filteringService = new ObjectFilteringService({
|
|
67
|
+
restApiAdapter: restAdapter,
|
|
68
|
+
soqlAdapter,
|
|
69
|
+
});
|
|
70
|
+
const tabService = new TabDetectionService({
|
|
71
|
+
toolingAdapter,
|
|
72
|
+
});
|
|
73
|
+
const contactPointService = new ContactPointService({
|
|
74
|
+
restApiAdapter: restAdapter,
|
|
75
|
+
});
|
|
76
|
+
const objectListService = new ObjectListService({
|
|
77
|
+
objectFilteringService: filteringService,
|
|
78
|
+
tabDetectionService: tabService,
|
|
79
|
+
contactPointService,
|
|
80
|
+
});
|
|
81
|
+
// Build filter options with name pattern
|
|
82
|
+
const nameFilter = params.pattern
|
|
83
|
+
? {
|
|
84
|
+
value: params.pattern,
|
|
85
|
+
operator: 'contains',
|
|
86
|
+
}
|
|
87
|
+
: undefined;
|
|
88
|
+
// Execute object list query with pagination
|
|
89
|
+
const result = await objectListService.listObjects({
|
|
90
|
+
type: params.filter,
|
|
91
|
+
namespace: namespaceResult.value,
|
|
92
|
+
nameFilter,
|
|
93
|
+
withRecords: params.withRecords,
|
|
94
|
+
withoutRecords: params.withoutRecords,
|
|
95
|
+
limit: pageSize,
|
|
96
|
+
offset,
|
|
97
|
+
sort: params.sort
|
|
98
|
+
? {
|
|
99
|
+
field: params.sort,
|
|
100
|
+
direction: 'asc',
|
|
101
|
+
}
|
|
102
|
+
: undefined,
|
|
103
|
+
includeTabs: true,
|
|
104
|
+
withContactPoints: params.contactPoints ?? false,
|
|
105
|
+
});
|
|
106
|
+
if (!result.success) {
|
|
107
|
+
return serviceResultToMcp(result);
|
|
108
|
+
}
|
|
109
|
+
// Build pagination metadata from service result
|
|
110
|
+
const pagination = createPaginationMetadata({
|
|
111
|
+
offset,
|
|
112
|
+
pageSize,
|
|
113
|
+
totalItems: result.data.totalCount,
|
|
114
|
+
returnedItems: result.data.returnedCount,
|
|
115
|
+
});
|
|
116
|
+
return serviceResultToMcpPaginated(result, pagination);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
return createMcpError(McpErrorCodes.TOOL_INVOCATION_FAILED, `Failed to list objects: ${extractErrorMessage(error, 'handleObjectList')}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// ============================================================================
|
|
123
|
+
// Object describe section handlers
|
|
124
|
+
// ============================================================================
|
|
125
|
+
/**
|
|
126
|
+
* Applies field type and pattern filters, then sorts.
|
|
127
|
+
*/
|
|
128
|
+
function filterAndSortFields(fields, fieldType, fieldPattern, sort) {
|
|
129
|
+
let result = fields;
|
|
130
|
+
if (fieldType) {
|
|
131
|
+
const allowedTypes = FIELD_TYPE_MAP[fieldType] || [fieldType];
|
|
132
|
+
result = result.filter((f) => allowedTypes.includes(f.type.toLowerCase()));
|
|
133
|
+
}
|
|
134
|
+
if (fieldPattern) {
|
|
135
|
+
const pattern = fieldPattern.toLowerCase();
|
|
136
|
+
result = result.filter((f) => f.name.toLowerCase().includes(pattern));
|
|
137
|
+
}
|
|
138
|
+
if (sort) {
|
|
139
|
+
result = [...result].sort((a, b) => {
|
|
140
|
+
if (sort === 'type')
|
|
141
|
+
return a.type.localeCompare(b.type);
|
|
142
|
+
if (sort === 'label')
|
|
143
|
+
return a.label.localeCompare(b.label);
|
|
144
|
+
return a.name.localeCompare(b.name);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Handles the summary section — object metadata + field classification + availableSections.
|
|
151
|
+
*/
|
|
152
|
+
async function handleDescribeSummary(describeService, objectName) {
|
|
153
|
+
const result = await describeService.describeObject(objectName);
|
|
154
|
+
if (!result.success) {
|
|
155
|
+
return serviceResultToMcp(result);
|
|
156
|
+
}
|
|
157
|
+
const obj = result.data;
|
|
158
|
+
return serviceResultToMcp({
|
|
159
|
+
success: true,
|
|
160
|
+
data: {
|
|
161
|
+
objectName: obj.objectName,
|
|
162
|
+
label: obj.label,
|
|
163
|
+
labelPlural: obj.labelPlural,
|
|
164
|
+
isCustom: obj.isCustom,
|
|
165
|
+
isQueryable: obj.isQueryable,
|
|
166
|
+
isCreateable: obj.isCreateable,
|
|
167
|
+
isUpdateable: obj.isUpdateable,
|
|
168
|
+
isDeletable: obj.isDeletable,
|
|
169
|
+
isSearchable: obj.isSearchable,
|
|
170
|
+
fieldClassification: obj.fieldClassification,
|
|
171
|
+
availableSections: [...OBJECT_DESCRIBE_SECTIONS],
|
|
172
|
+
},
|
|
173
|
+
message: `Summary for ${obj.objectName} (${obj.fieldClassification.totalFields} fields)`,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Handles the fields section — paginated fields with filtering and sorting.
|
|
178
|
+
*/
|
|
179
|
+
async function handleDescribeFields(describeService, params) {
|
|
180
|
+
const result = await describeService.describeObject(params.objectName);
|
|
181
|
+
if (!result.success) {
|
|
182
|
+
return serviceResultToMcp(result);
|
|
183
|
+
}
|
|
184
|
+
const filtered = filterAndSortFields(result.data.fields, params.fieldType, params.fieldPattern, params.sort);
|
|
185
|
+
const offset = decodeCursor(params.cursor);
|
|
186
|
+
const pageSize = clampPageSize(params.limit, PAGE_SIZE_DEFAULTS.FIELD_LIST.default, PAGE_SIZE_DEFAULTS.FIELD_LIST.max);
|
|
187
|
+
const page = filtered.slice(offset, offset + pageSize);
|
|
188
|
+
const pagination = createPaginationMetadata({
|
|
189
|
+
offset,
|
|
190
|
+
pageSize,
|
|
191
|
+
totalItems: filtered.length,
|
|
192
|
+
returnedItems: page.length,
|
|
193
|
+
});
|
|
194
|
+
return serviceResultToMcpPaginated({
|
|
195
|
+
success: true,
|
|
196
|
+
data: page,
|
|
197
|
+
message: `Fields for ${params.objectName}`,
|
|
198
|
+
}, pagination);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Handles the fieldDistribution section — field type counts.
|
|
202
|
+
*/
|
|
203
|
+
async function handleDescribeFieldDistribution(describeService, objectName) {
|
|
204
|
+
const result = await describeService.describeObject(objectName);
|
|
205
|
+
if (!result.success) {
|
|
206
|
+
return serviceResultToMcp(result);
|
|
207
|
+
}
|
|
208
|
+
const distResult = ObjectDescribeService.getFieldTypeDistribution(result.data.fields);
|
|
209
|
+
if (!distResult.success) {
|
|
210
|
+
return serviceResultToMcp(distResult);
|
|
211
|
+
}
|
|
212
|
+
return serviceResultToMcp({
|
|
213
|
+
success: true,
|
|
214
|
+
data: {
|
|
215
|
+
objectName,
|
|
216
|
+
totalFields: result.data.fields.length,
|
|
217
|
+
distribution: distResult.data,
|
|
218
|
+
},
|
|
219
|
+
message: `Field distribution for ${objectName}`,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Handles the recordTypes section — record types with pagination.
|
|
224
|
+
*/
|
|
225
|
+
async function handleDescribeRecordTypes(soqlAdapter, params) {
|
|
226
|
+
const recordTypeService = new RecordTypeService({ soqlAdapter });
|
|
227
|
+
const result = await recordTypeService.getRecordTypes(params.objectName);
|
|
228
|
+
if (!result.success) {
|
|
229
|
+
return serviceResultToMcp(result);
|
|
230
|
+
}
|
|
231
|
+
const offset = decodeCursor(params.cursor);
|
|
232
|
+
const pageSize = clampPageSize(params.limit, PAGE_SIZE_DEFAULTS.RECORD_TYPE_LIST.default, PAGE_SIZE_DEFAULTS.RECORD_TYPE_LIST.max);
|
|
233
|
+
const page = result.data.slice(offset, offset + pageSize);
|
|
234
|
+
const pagination = createPaginationMetadata({
|
|
235
|
+
offset,
|
|
236
|
+
pageSize,
|
|
237
|
+
totalItems: result.data.length,
|
|
238
|
+
returnedItems: page.length,
|
|
239
|
+
});
|
|
240
|
+
return serviceResultToMcpPaginated({
|
|
241
|
+
success: true,
|
|
242
|
+
data: page,
|
|
243
|
+
message: `Record types for ${params.objectName}`,
|
|
244
|
+
}, pagination);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Handles the relationships section — lookup fields and external references with pagination.
|
|
248
|
+
*/
|
|
249
|
+
async function handleDescribeRelationships(describeService, params) {
|
|
250
|
+
const result = await describeService.describeObject(params.objectName);
|
|
251
|
+
if (!result.success) {
|
|
252
|
+
return serviceResultToMcp(result);
|
|
253
|
+
}
|
|
254
|
+
const relationships = result.data.relationships;
|
|
255
|
+
// If relationship data is unavailable, return success with explicit warning
|
|
256
|
+
// rather than silently synthesizing empty arrays (which masks API/permission issues)
|
|
257
|
+
if (!relationships) {
|
|
258
|
+
return serviceResultToMcpPaginated({
|
|
259
|
+
success: true,
|
|
260
|
+
data: { items: [] },
|
|
261
|
+
warnings: [
|
|
262
|
+
'Relationship metadata was not returned by the describe API. ' +
|
|
263
|
+
'This may indicate insufficient permissions or an API limitation.',
|
|
264
|
+
],
|
|
265
|
+
message: `Relationships for ${params.objectName} (data unavailable)`,
|
|
266
|
+
}, createPaginationMetadata({ offset: 0, pageSize: 1, totalItems: 0, returnedItems: 0 }));
|
|
267
|
+
}
|
|
268
|
+
const allItems = [
|
|
269
|
+
...relationships.lookupFields.map((lf) => ({ kind: 'lookup', ...lf })),
|
|
270
|
+
...relationships.referencedBy.map((rb) => ({ kind: 'referencedBy', ...rb })),
|
|
271
|
+
];
|
|
272
|
+
const offset = decodeCursor(params.cursor);
|
|
273
|
+
const pageSize = clampPageSize(params.limit, PAGE_SIZE_DEFAULTS.RELATIONSHIP_LIST.default, PAGE_SIZE_DEFAULTS.RELATIONSHIP_LIST.max);
|
|
274
|
+
const page = allItems.slice(offset, offset + pageSize);
|
|
275
|
+
const pagination = createPaginationMetadata({
|
|
276
|
+
offset,
|
|
277
|
+
pageSize,
|
|
278
|
+
totalItems: allItems.length,
|
|
279
|
+
returnedItems: page.length,
|
|
280
|
+
});
|
|
281
|
+
return serviceResultToMcpPaginated({
|
|
282
|
+
success: true,
|
|
283
|
+
data: {
|
|
284
|
+
referencedByCount: relationships.referencedByCount,
|
|
285
|
+
lookupFieldCount: relationships.lookupFields.length,
|
|
286
|
+
items: page,
|
|
287
|
+
},
|
|
288
|
+
message: `Relationships for ${params.objectName}`,
|
|
289
|
+
}, pagination);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Handler for cuneiform_object_describe tool invocation.
|
|
293
|
+
*
|
|
294
|
+
* Routes by section parameter to return one section per call,
|
|
295
|
+
* keeping responses within LLM context budgets (~3 KB max).
|
|
296
|
+
*
|
|
297
|
+
* @param adapters - Session-scoped MCP adapters
|
|
298
|
+
* @param params - Validated input from MCP SDK
|
|
299
|
+
* @returns MCP CallToolResult
|
|
300
|
+
*/
|
|
301
|
+
export async function handleObjectDescribe(adapters, params) {
|
|
302
|
+
try {
|
|
303
|
+
const { soql: soqlAdapter, rest: restAdapter } = adapters;
|
|
304
|
+
const describeService = new ObjectDescribeService({
|
|
305
|
+
restApiAdapter: restAdapter,
|
|
306
|
+
soqlAdapter,
|
|
307
|
+
});
|
|
308
|
+
switch (params.section) {
|
|
309
|
+
case 'summary':
|
|
310
|
+
return await handleDescribeSummary(describeService, params.objectName);
|
|
311
|
+
case 'fields':
|
|
312
|
+
return await handleDescribeFields(describeService, params);
|
|
313
|
+
case 'fieldDistribution':
|
|
314
|
+
return await handleDescribeFieldDistribution(describeService, params.objectName);
|
|
315
|
+
case 'recordTypes':
|
|
316
|
+
return await handleDescribeRecordTypes(soqlAdapter, params);
|
|
317
|
+
case 'relationships':
|
|
318
|
+
return await handleDescribeRelationships(describeService, params);
|
|
319
|
+
default:
|
|
320
|
+
return createMcpError(McpErrorCodes.INVALID_TOOL_INPUT, `Unknown section: ${String(params.section)}`);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
catch (error) {
|
|
324
|
+
return createMcpError(McpErrorCodes.TOOL_INVOCATION_FAILED, `Failed to describe object: ${extractErrorMessage(error, 'handleObjectDescribe')}`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=object-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/object-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO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;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAqB,EACrB,MAA2B;IAE3B,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;QAE1D,MAAM,eAAe,GAAG,IAAI,qBAAqB,CAAC;YAChD,cAAc,EAAE,WAAW;YAC3B,WAAW;SACZ,CAAC,CAAC;QAEH,QAAQ,MAAM,CAAC,OAAO,EAAE,CAAC;YACvB,KAAK,SAAS;gBACZ,OAAO,MAAM,qBAAqB,CAAC,eAAe,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;YACzE,KAAK,QAAQ;gBACX,OAAO,MAAM,oBAAoB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;YAC7D,KAAK,mBAAmB;gBACtB,OAAO,MAAM,+BAA+B,CAAC,eAAe,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;YACnF,KAAK,aAAa;gBAChB,OAAO,MAAM,yBAAyB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAC9D,KAAK,eAAe;gBAClB,OAAO,MAAM,2BAA2B,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;YACpE;gBACE,OAAO,cAAc,CAAC,aAAa,CAAC,kBAAkB,EAAE,oBAAoB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1G,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,cAAc,CACnB,aAAa,CAAC,sBAAsB,EACpC,8BAA8B,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,CAAC,EAAE,CACnF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { McpAdapters } from '../config/mcp-config.js';
|
|
3
|
+
import { type OrgDetailsInput } from '../schemas/input-schemas.js';
|
|
4
|
+
/**
|
|
5
|
+
* Handler for cuneiform_org_details tool invocation.
|
|
6
|
+
*
|
|
7
|
+
* Routes by section parameter to return one section per call,
|
|
8
|
+
* keeping responses within LLM context budgets (~3 KB max).
|
|
9
|
+
*
|
|
10
|
+
* @param adapters - Session-scoped MCP adapters
|
|
11
|
+
* @param params - Validated input from MCP SDK
|
|
12
|
+
* @returns MCP CallToolResult
|
|
13
|
+
*/
|
|
14
|
+
export declare function handleOrgDetails(adapters: McpAdapters, params: OrgDetailsInput): Promise<CallToolResult>;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, PeerNova, Inc. All Rights Reserved.
|
|
3
|
+
* PROPRIETARY AND CONFIDENTIAL. Unauthorized copying, modification,
|
|
4
|
+
* or distribution is strictly prohibited. Use is governed by the
|
|
5
|
+
* Master Subscription Agreement (MSA) between PeerNova, Inc. and the
|
|
6
|
+
* licensee. See LICENSE file in the repo root.
|
|
7
|
+
*/
|
|
8
|
+
import { OrgInfoService } from '../../services/OrgInfoService.js';
|
|
9
|
+
import { decodeCursor, clampPageSize, createPaginationMetadata, PAGE_SIZE_DEFAULTS } from '../config/pagination.js';
|
|
10
|
+
import { McpErrorCodes } from '../errors.js';
|
|
11
|
+
import { ORG_DETAILS_SECTIONS } from '../schemas/input-schemas.js';
|
|
12
|
+
import { serviceResultToMcp, serviceResultToMcpPaginated, createMcpError, extractErrorMessage, } from './tool-factory.js';
|
|
13
|
+
/**
|
|
14
|
+
* Handles the identity section — org identity with available sections list.
|
|
15
|
+
*/
|
|
16
|
+
async function handleIdentitySection(orgInfoService, facade) {
|
|
17
|
+
const result = await orgInfoService.getOrgIdentity();
|
|
18
|
+
if (!result.success) {
|
|
19
|
+
return serviceResultToMcp(result);
|
|
20
|
+
}
|
|
21
|
+
const identity = result.data;
|
|
22
|
+
const orgType = OrgInfoService.classifyOrgType(identity.isSandbox, identity.organizationType);
|
|
23
|
+
return serviceResultToMcp({
|
|
24
|
+
success: true,
|
|
25
|
+
data: {
|
|
26
|
+
orgId: identity.organizationId,
|
|
27
|
+
orgName: identity.organizationName ?? null,
|
|
28
|
+
orgType,
|
|
29
|
+
edition: identity.organizationType ?? null,
|
|
30
|
+
namespace: identity.namespacePrefix ?? null,
|
|
31
|
+
instanceUrl: facade.instanceUrl ?? null,
|
|
32
|
+
username: identity.username,
|
|
33
|
+
availableSections: [...ORG_DETAILS_SECTIONS],
|
|
34
|
+
},
|
|
35
|
+
message: `Org identity for ${identity.organizationName ?? identity.organizationId}`,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Handles the cuneiform section — package installation status.
|
|
40
|
+
*/
|
|
41
|
+
async function handleCuneiformSection(orgInfoService) {
|
|
42
|
+
const result = await orgInfoService.getCuneiformPackageInfo();
|
|
43
|
+
if (!result.success) {
|
|
44
|
+
return serviceResultToMcp(result);
|
|
45
|
+
}
|
|
46
|
+
return serviceResultToMcp({
|
|
47
|
+
success: true,
|
|
48
|
+
data: {
|
|
49
|
+
installed: result.data.installed,
|
|
50
|
+
version: result.data.version ?? null,
|
|
51
|
+
licenseStatus: result.data.licenseStatus,
|
|
52
|
+
},
|
|
53
|
+
message: 'Cuneiform package info retrieved',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Handles the features section — detected org features.
|
|
58
|
+
*/
|
|
59
|
+
async function handleFeaturesSection(orgInfoService) {
|
|
60
|
+
const result = await orgInfoService.getOrgFeatures();
|
|
61
|
+
if (!result.success) {
|
|
62
|
+
return serviceResultToMcp(result);
|
|
63
|
+
}
|
|
64
|
+
return serviceResultToMcp({
|
|
65
|
+
success: true,
|
|
66
|
+
data: result.data,
|
|
67
|
+
message: 'Org features retrieved',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Handles the clouds section — detected Salesforce clouds with pagination.
|
|
72
|
+
*/
|
|
73
|
+
async function handleCloudsSection(orgInfoService, cursor, limit) {
|
|
74
|
+
const offset = decodeCursor(cursor);
|
|
75
|
+
const pageSize = clampPageSize(limit, PAGE_SIZE_DEFAULTS.NAMESPACE_LIST.default, PAGE_SIZE_DEFAULTS.NAMESPACE_LIST.max);
|
|
76
|
+
const result = await orgInfoService.getDetectedClouds();
|
|
77
|
+
if (!result.success) {
|
|
78
|
+
return serviceResultToMcp(result);
|
|
79
|
+
}
|
|
80
|
+
const allClouds = result.data;
|
|
81
|
+
const page = allClouds.slice(offset, offset + pageSize);
|
|
82
|
+
const pagination = createPaginationMetadata({
|
|
83
|
+
offset,
|
|
84
|
+
pageSize,
|
|
85
|
+
totalItems: allClouds.length,
|
|
86
|
+
returnedItems: page.length,
|
|
87
|
+
});
|
|
88
|
+
return serviceResultToMcpPaginated({ success: true, data: page, message: 'Detected clouds retrieved' }, pagination);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Handles the namespaces section — installed namespaces with pagination.
|
|
92
|
+
*/
|
|
93
|
+
async function handleNamespacesSection(orgInfoService, cursor, limit) {
|
|
94
|
+
const offset = decodeCursor(cursor);
|
|
95
|
+
const pageSize = clampPageSize(limit, PAGE_SIZE_DEFAULTS.NAMESPACE_LIST.default, PAGE_SIZE_DEFAULTS.NAMESPACE_LIST.max);
|
|
96
|
+
const result = await orgInfoService.getInstalledNamespaces();
|
|
97
|
+
if (!result.success) {
|
|
98
|
+
return serviceResultToMcp(result);
|
|
99
|
+
}
|
|
100
|
+
const allNamespaces = result.data.namespaces;
|
|
101
|
+
const page = allNamespaces.slice(offset, offset + pageSize);
|
|
102
|
+
const pagination = createPaginationMetadata({
|
|
103
|
+
offset,
|
|
104
|
+
pageSize,
|
|
105
|
+
totalItems: allNamespaces.length,
|
|
106
|
+
returnedItems: page.length,
|
|
107
|
+
});
|
|
108
|
+
return serviceResultToMcpPaginated({
|
|
109
|
+
success: true,
|
|
110
|
+
data: { count: allNamespaces.length, namespaces: page },
|
|
111
|
+
message: `Installed namespaces retrieved (${allNamespaces.length} total)`,
|
|
112
|
+
}, pagination);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Handles the limits section — org API limits.
|
|
116
|
+
*/
|
|
117
|
+
async function handleLimitsSection(orgInfoService) {
|
|
118
|
+
const result = await orgInfoService.getOrgLimits();
|
|
119
|
+
if (!result.success) {
|
|
120
|
+
return serviceResultToMcp(result);
|
|
121
|
+
}
|
|
122
|
+
const limits = result.data;
|
|
123
|
+
return serviceResultToMcp({
|
|
124
|
+
success: true,
|
|
125
|
+
data: {
|
|
126
|
+
dailyApiRequests: limits.dailyApiRequests ?? null,
|
|
127
|
+
dataStorageMB: limits.dataStorageMB ?? null,
|
|
128
|
+
fileStorageMB: limits.fileStorageMB ?? null,
|
|
129
|
+
dailyBulkApiRequests: limits.dailyBulkApiRequests ?? null,
|
|
130
|
+
dailyBulkV2QueryJobs: limits.dailyBulkV2QueryJobs ?? null,
|
|
131
|
+
dailyAsyncApexExecutions: limits.dailyAsyncApexExecutions ?? null,
|
|
132
|
+
dailyStreamingApiEvents: limits.dailyStreamingApiEvents ?? null,
|
|
133
|
+
},
|
|
134
|
+
message: 'Org limits retrieved',
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Handler for cuneiform_org_details tool invocation.
|
|
139
|
+
*
|
|
140
|
+
* Routes by section parameter to return one section per call,
|
|
141
|
+
* keeping responses within LLM context budgets (~3 KB max).
|
|
142
|
+
*
|
|
143
|
+
* @param adapters - Session-scoped MCP adapters
|
|
144
|
+
* @param params - Validated input from MCP SDK
|
|
145
|
+
* @returns MCP CallToolResult
|
|
146
|
+
*/
|
|
147
|
+
export async function handleOrgDetails(adapters, params) {
|
|
148
|
+
try {
|
|
149
|
+
const { facade, soql: soqlAdapter, tooling: toolingAdapter, rest: restAdapter } = adapters;
|
|
150
|
+
const orgInfoService = new OrgInfoService({
|
|
151
|
+
connectionFacade: facade,
|
|
152
|
+
soqlAdapter,
|
|
153
|
+
toolingAdapter,
|
|
154
|
+
restAdapter,
|
|
155
|
+
});
|
|
156
|
+
switch (params.section) {
|
|
157
|
+
case 'identity':
|
|
158
|
+
return await handleIdentitySection(orgInfoService, facade);
|
|
159
|
+
case 'cuneiform':
|
|
160
|
+
return await handleCuneiformSection(orgInfoService);
|
|
161
|
+
case 'features':
|
|
162
|
+
return await handleFeaturesSection(orgInfoService);
|
|
163
|
+
case 'clouds':
|
|
164
|
+
return await handleCloudsSection(orgInfoService, params.cursor, params.limit);
|
|
165
|
+
case 'namespaces':
|
|
166
|
+
return await handleNamespacesSection(orgInfoService, params.cursor, params.limit);
|
|
167
|
+
case 'limits':
|
|
168
|
+
return await handleLimitsSection(orgInfoService);
|
|
169
|
+
default:
|
|
170
|
+
return createMcpError(McpErrorCodes.INVALID_TOOL_INPUT, `Unknown section: ${String(params.section)}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
return createMcpError(McpErrorCodes.TOOL_INVOCATION_FAILED, `Failed to get org details: ${extractErrorMessage(error, 'handleOrgDetails')}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=org-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/org-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAwB,MAAM,6BAA6B,CAAC;AACzF,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;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AqB,CAAC,cAAc,CAAC,CAAC;YACrD,KAAK,QAAQ;gBACX,OAAO,MAAM,mBAAmB,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAChF,KAAK,YAAY;gBACf,OAAO,MAAM,uBAAuB,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YACpF,KAAK,QAAQ;gBACX,OAAO,MAAM,mBAAmB,CAAC,cAAc,CAAC,CAAC;YACnD;gBACE,OAAO,cAAc,CAAC,aAAa,CAAC,kBAAkB,EAAE,oBAAoB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1G,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,cAAc,CACnB,aAAa,CAAC,sBAAsB,EACpC,8BAA8B,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAE,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { McpAdapters } from '../config/mcp-config.js';
|
|
3
|
+
import type { ProfileExecuteInput, ProfileStatusInput, ProfileCancelInput, ProfileDeleteInput, RequestListInput } from '../schemas/input-schemas.js';
|
|
4
|
+
/**
|
|
5
|
+
* Handler for cuneiform_request_list tool invocation.
|
|
6
|
+
*
|
|
7
|
+
* Lists profiling requests with optional status filtering and pagination.
|
|
8
|
+
*
|
|
9
|
+
* @param adapters - Session-scoped MCP adapters
|
|
10
|
+
* @param params - Validated input from MCP SDK
|
|
11
|
+
* @returns MCP CallToolResult
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleRequestList(adapters: McpAdapters, params: RequestListInput): Promise<CallToolResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Handler for cuneiform_profile_execute tool invocation.
|
|
16
|
+
*
|
|
17
|
+
* Executes profiling for a definition and optionally waits for completion.
|
|
18
|
+
*
|
|
19
|
+
* @param adapters - Session-scoped MCP adapters
|
|
20
|
+
* @param params - Validated input from MCP SDK
|
|
21
|
+
* @returns MCP CallToolResult
|
|
22
|
+
*/
|
|
23
|
+
export declare function handleProfileExecute(adapters: McpAdapters, params: ProfileExecuteInput): Promise<CallToolResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Handler for cuneiform_profile_status tool invocation.
|
|
26
|
+
*
|
|
27
|
+
* Retrieves status for one or more profiling requests in parallel.
|
|
28
|
+
* Not-found IDs are surfaced as a "Not Found" row — no hard error.
|
|
29
|
+
* Other service errors (e.g. SOQL failure) propagate as hard errors.
|
|
30
|
+
*
|
|
31
|
+
* @param adapters - Session-scoped MCP adapters
|
|
32
|
+
* @param params - Validated input from MCP SDK
|
|
33
|
+
* @returns MCP CallToolResult with statuses array and summary counts
|
|
34
|
+
*/
|
|
35
|
+
export declare function handleProfileStatus(adapters: McpAdapters, params: ProfileStatusInput): Promise<CallToolResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Handler for cuneiform_profile_cancel tool invocation.
|
|
38
|
+
*
|
|
39
|
+
* Cancels profiling jobs by request ID (single cancellation) or definition ID
|
|
40
|
+
* (bulk cancellation — queries active requests for the definition, then cancels them).
|
|
41
|
+
*
|
|
42
|
+
* Uses ProfileRequestService directly instead of the ProfilingExecutionService facade.
|
|
43
|
+
*
|
|
44
|
+
* @param adapters - Session-scoped MCP adapters
|
|
45
|
+
* @param params - Validated input from MCP SDK
|
|
46
|
+
* @returns MCP CallToolResult
|
|
47
|
+
*/
|
|
48
|
+
export declare function handleProfileCancel(adapters: McpAdapters, params: ProfileCancelInput): Promise<CallToolResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Handler for cuneiform_profile_delete tool invocation.
|
|
51
|
+
*
|
|
52
|
+
* Deletes terminal (Canceled) profiling requests by ID. This operation is irreversible.
|
|
53
|
+
* Only requests in the Canceled state can be deleted — the service enforces this constraint.
|
|
54
|
+
*
|
|
55
|
+
* @param adapters - Session-scoped MCP adapters
|
|
56
|
+
* @param params - Validated input from MCP SDK
|
|
57
|
+
* @returns MCP CallToolResult
|
|
58
|
+
*/
|
|
59
|
+
export declare function handleProfileDelete(adapters: McpAdapters, params: ProfileDeleteInput): Promise<CallToolResult>;
|