@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (494) hide show
  1. package/LICENSE +81 -30
  2. package/README.md +59 -95
  3. package/lib/adapters/connection-facade.d.ts +458 -0
  4. package/lib/adapters/connection-facade.js +379 -0
  5. package/lib/adapters/connection-facade.js.map +1 -0
  6. package/lib/adapters/errors.d.ts +547 -0
  7. package/lib/adapters/errors.js +937 -0
  8. package/lib/adapters/errors.js.map +1 -0
  9. package/lib/adapters/index.d.ts +33 -0
  10. package/lib/adapters/index.js +50 -0
  11. package/lib/adapters/index.js.map +1 -0
  12. package/lib/adapters/lifecycle.d.ts +119 -0
  13. package/lib/adapters/lifecycle.js +94 -0
  14. package/lib/adapters/lifecycle.js.map +1 -0
  15. package/lib/adapters/rest/cache.d.ts +69 -0
  16. package/lib/adapters/rest/cache.js +133 -0
  17. package/lib/adapters/rest/cache.js.map +1 -0
  18. package/lib/adapters/rest/index.d.ts +11 -0
  19. package/lib/adapters/rest/index.js +18 -0
  20. package/lib/adapters/rest/index.js.map +1 -0
  21. package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
  22. package/lib/adapters/rest/profiling-rest-client.js +115 -0
  23. package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
  24. package/lib/adapters/rest/rest-api-adapter.d.ts +389 -0
  25. package/lib/adapters/rest/rest-api-adapter.js +747 -0
  26. package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
  27. package/lib/adapters/rest/types.d.ts +34 -0
  28. package/lib/adapters/rest/types.js +9 -0
  29. package/lib/adapters/rest/types.js.map +1 -0
  30. package/lib/adapters/retry.d.ts +91 -0
  31. package/lib/adapters/retry.js +215 -0
  32. package/lib/adapters/retry.js.map +1 -0
  33. package/lib/adapters/soql/cuneiform-query-builder.d.ts +391 -0
  34. package/lib/adapters/soql/cuneiform-query-builder.js +559 -0
  35. package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
  36. package/lib/adapters/soql/index.d.ts +13 -0
  37. package/lib/adapters/soql/index.js +21 -0
  38. package/lib/adapters/soql/index.js.map +1 -0
  39. package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
  40. package/lib/adapters/soql/soql-query-adapter.js +259 -0
  41. package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
  42. package/lib/adapters/soql/types.d.ts +37 -0
  43. package/lib/adapters/soql/types.js +19 -0
  44. package/lib/adapters/soql/types.js.map +1 -0
  45. package/lib/adapters/testing/index.d.ts +37 -0
  46. package/lib/adapters/testing/index.js +20 -0
  47. package/lib/adapters/testing/index.js.map +1 -0
  48. package/lib/adapters/testing/mock-connection.d.ts +77 -0
  49. package/lib/adapters/testing/mock-connection.js +207 -0
  50. package/lib/adapters/testing/mock-connection.js.map +1 -0
  51. package/lib/adapters/testing/mock-logger.d.ts +29 -0
  52. package/lib/adapters/testing/mock-logger.js +57 -0
  53. package/lib/adapters/testing/mock-logger.js.map +1 -0
  54. package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
  55. package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
  56. package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
  57. package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
  58. package/lib/adapters/testing/mock-oclif-config.js +90 -0
  59. package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
  60. package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
  61. package/lib/adapters/testing/mock-rest-adapter.js +243 -0
  62. package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
  63. package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
  64. package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
  65. package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
  66. package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
  67. package/lib/adapters/testing/mock-soql-adapter.js +120 -0
  68. package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
  69. package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
  70. package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
  71. package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
  72. package/lib/adapters/testing/stub-connection.d.ts +93 -0
  73. package/lib/adapters/testing/stub-connection.js +97 -0
  74. package/lib/adapters/testing/stub-connection.js.map +1 -0
  75. package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
  76. package/lib/adapters/testing/stub-rest-adapter.js +58 -0
  77. package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
  78. package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
  79. package/lib/adapters/testing/stub-soql-adapter.js +50 -0
  80. package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
  81. package/lib/adapters/testing/types.d.ts +71 -0
  82. package/lib/adapters/testing/types.js +9 -0
  83. package/lib/adapters/testing/types.js.map +1 -0
  84. package/lib/adapters/tooling/index.d.ts +10 -0
  85. package/lib/adapters/tooling/index.js +17 -0
  86. package/lib/adapters/tooling/index.js.map +1 -0
  87. package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
  88. package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
  89. package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
  90. package/lib/adapters/tooling/types.d.ts +81 -0
  91. package/lib/adapters/tooling/types.js +9 -0
  92. package/lib/adapters/tooling/types.js.map +1 -0
  93. package/lib/adapters/types.d.ts +112 -0
  94. package/lib/adapters/types.js +169 -0
  95. package/lib/adapters/types.js.map +1 -0
  96. package/lib/base/cuneiform-command.d.ts +152 -0
  97. package/lib/base/cuneiform-command.js +243 -0
  98. package/lib/base/cuneiform-command.js.map +1 -0
  99. package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
  100. package/lib/commands/cuneiform/compatibility/check.js +114 -0
  101. package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
  102. package/lib/commands/cuneiform/definition/create.d.ts +119 -0
  103. package/lib/commands/cuneiform/definition/create.js +693 -0
  104. package/lib/commands/cuneiform/definition/create.js.map +1 -0
  105. package/lib/commands/cuneiform/definition/export.d.ts +57 -0
  106. package/lib/commands/cuneiform/definition/export.js +133 -0
  107. package/lib/commands/cuneiform/definition/export.js.map +1 -0
  108. package/lib/commands/cuneiform/definition/get.d.ts +86 -0
  109. package/lib/commands/cuneiform/definition/get.js +270 -0
  110. package/lib/commands/cuneiform/definition/get.js.map +1 -0
  111. package/lib/commands/cuneiform/definition/import.d.ts +54 -0
  112. package/lib/commands/cuneiform/definition/import.js +118 -0
  113. package/lib/commands/cuneiform/definition/import.js.map +1 -0
  114. package/lib/commands/cuneiform/definition/list.d.ts +110 -0
  115. package/lib/commands/cuneiform/definition/list.js +344 -0
  116. package/lib/commands/cuneiform/definition/list.js.map +1 -0
  117. package/lib/commands/cuneiform/definition/purge.d.ts +105 -0
  118. package/lib/commands/cuneiform/definition/purge.js +533 -0
  119. package/lib/commands/cuneiform/definition/purge.js.map +1 -0
  120. package/lib/commands/cuneiform/definition/update.d.ts +58 -0
  121. package/lib/commands/cuneiform/definition/update.js +206 -0
  122. package/lib/commands/cuneiform/definition/update.js.map +1 -0
  123. package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
  124. package/lib/commands/cuneiform/mcp/serve.js +109 -0
  125. package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
  126. package/lib/commands/cuneiform/object/describe.d.ts +61 -0
  127. package/lib/commands/cuneiform/object/describe.js +461 -0
  128. package/lib/commands/cuneiform/object/describe.js.map +1 -0
  129. package/lib/commands/cuneiform/object/list.d.ts +111 -0
  130. package/lib/commands/cuneiform/object/list.js +239 -0
  131. package/lib/commands/cuneiform/object/list.js.map +1 -0
  132. package/lib/commands/cuneiform/org/details.d.ts +99 -0
  133. package/lib/commands/cuneiform/org/details.js +521 -0
  134. package/lib/commands/cuneiform/org/details.js.map +1 -0
  135. package/lib/commands/cuneiform/org/reset.d.ts +46 -0
  136. package/lib/commands/cuneiform/org/reset.js +135 -0
  137. package/lib/commands/cuneiform/org/reset.js.map +1 -0
  138. package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
  139. package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
  140. package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
  141. package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
  142. package/lib/commands/cuneiform/profile/request/delete.js +223 -0
  143. package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
  144. package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
  145. package/lib/commands/cuneiform/profile/request/list.js +102 -0
  146. package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
  147. package/lib/commands/cuneiform/profile.d.ts +90 -0
  148. package/lib/commands/cuneiform/profile.js +322 -0
  149. package/lib/commands/cuneiform/profile.js.map +1 -0
  150. package/lib/commands/cuneiform/summary/purge.d.ts +77 -0
  151. package/lib/commands/cuneiform/summary/purge.js +429 -0
  152. package/lib/commands/cuneiform/summary/purge.js.map +1 -0
  153. package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
  154. package/lib/commands/cuneiform/summary/reprofile.js +236 -0
  155. package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
  156. package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
  157. package/lib/commands/cuneiform/summary/stop.js +234 -0
  158. package/lib/commands/cuneiform/summary/stop.js.map +1 -0
  159. package/lib/commands/cuneiform/user/details.d.ts +73 -0
  160. package/lib/commands/cuneiform/user/details.js +391 -0
  161. package/lib/commands/cuneiform/user/details.js.map +1 -0
  162. package/lib/constants/index.d.ts +8 -0
  163. package/lib/constants/index.js +16 -0
  164. package/lib/constants/index.js.map +1 -0
  165. package/lib/constants/namespace-constants.d.ts +91 -0
  166. package/lib/constants/namespace-constants.js +211 -0
  167. package/lib/constants/namespace-constants.js.map +1 -0
  168. package/lib/debug/command-debug-proxy.d.ts +101 -0
  169. package/lib/debug/command-debug-proxy.js +171 -0
  170. package/lib/debug/command-debug-proxy.js.map +1 -0
  171. package/lib/debug/debug-logger.d.ts +85 -0
  172. package/lib/debug/debug-logger.js +133 -0
  173. package/lib/debug/debug-logger.js.map +1 -0
  174. package/lib/debug/index.d.ts +12 -0
  175. package/lib/debug/index.js +20 -0
  176. package/lib/debug/index.js.map +1 -0
  177. package/lib/debug/service-debug-proxy.d.ts +30 -0
  178. package/lib/debug/service-debug-proxy.js +102 -0
  179. package/lib/debug/service-debug-proxy.js.map +1 -0
  180. package/lib/hooks/prerun.d.ts +25 -0
  181. package/lib/hooks/prerun.js +47 -0
  182. package/lib/hooks/prerun.js.map +1 -0
  183. package/lib/mcp/config/mcp-config.d.ts +55 -0
  184. package/lib/mcp/config/mcp-config.js +51 -0
  185. package/lib/mcp/config/mcp-config.js.map +1 -0
  186. package/lib/mcp/config/pagination.d.ts +96 -0
  187. package/lib/mcp/config/pagination.js +108 -0
  188. package/lib/mcp/config/pagination.js.map +1 -0
  189. package/lib/mcp/config/system-prompts.d.ts +18 -0
  190. package/lib/mcp/config/system-prompts.js +92 -0
  191. package/lib/mcp/config/system-prompts.js.map +1 -0
  192. package/lib/mcp/errors.d.ts +23 -0
  193. package/lib/mcp/errors.js +27 -0
  194. package/lib/mcp/errors.js.map +1 -0
  195. package/lib/mcp/schemas/input-schemas.d.ts +327 -0
  196. package/lib/mcp/schemas/input-schemas.js +302 -0
  197. package/lib/mcp/schemas/input-schemas.js.map +1 -0
  198. package/lib/mcp/server.d.ts +40 -0
  199. package/lib/mcp/server.js +316 -0
  200. package/lib/mcp/server.js.map +1 -0
  201. package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
  202. package/lib/mcp/tools/contactpoint-tools.js +34 -0
  203. package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
  204. package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
  205. package/lib/mcp/tools/definition-io-tools.js +152 -0
  206. package/lib/mcp/tools/definition-io-tools.js.map +1 -0
  207. package/lib/mcp/tools/definition-tools.d.ts +51 -0
  208. package/lib/mcp/tools/definition-tools.js +199 -0
  209. package/lib/mcp/tools/definition-tools.js.map +1 -0
  210. package/lib/mcp/tools/index.d.ts +37 -0
  211. package/lib/mcp/tools/index.js +88 -0
  212. package/lib/mcp/tools/index.js.map +1 -0
  213. package/lib/mcp/tools/object-tools.d.ts +22 -0
  214. package/lib/mcp/tools/object-tools.js +306 -0
  215. package/lib/mcp/tools/object-tools.js.map +1 -0
  216. package/lib/mcp/tools/org-tools.d.ts +14 -0
  217. package/lib/mcp/tools/org-tools.js +177 -0
  218. package/lib/mcp/tools/org-tools.js.map +1 -0
  219. package/lib/mcp/tools/profile-tools.d.ts +59 -0
  220. package/lib/mcp/tools/profile-tools.js +213 -0
  221. package/lib/mcp/tools/profile-tools.js.map +1 -0
  222. package/lib/mcp/tools/summary-tools.d.ts +14 -0
  223. package/lib/mcp/tools/summary-tools.js +38 -0
  224. package/lib/mcp/tools/summary-tools.js.map +1 -0
  225. package/lib/mcp/tools/tool-factory.d.ts +63 -0
  226. package/lib/mcp/tools/tool-factory.js +146 -0
  227. package/lib/mcp/tools/tool-factory.js.map +1 -0
  228. package/lib/mcp/tools/user-tools.d.ts +25 -0
  229. package/lib/mcp/tools/user-tools.js +167 -0
  230. package/lib/mcp/tools/user-tools.js.map +1 -0
  231. package/lib/models/date-literal.d.ts +211 -0
  232. package/lib/models/date-literal.js +615 -0
  233. package/lib/models/date-literal.js.map +1 -0
  234. package/lib/models/object-describe-types.d.ts +173 -0
  235. package/lib/models/object-describe-types.js +9 -0
  236. package/lib/models/object-describe-types.js.map +1 -0
  237. package/lib/models/profile-request-types.d.ts +118 -0
  238. package/lib/models/profile-request-types.js +23 -0
  239. package/lib/models/profile-request-types.js.map +1 -0
  240. package/lib/models/profiling-execution-types.d.ts +154 -0
  241. package/lib/models/profiling-execution-types.js +14 -0
  242. package/lib/models/profiling-execution-types.js.map +1 -0
  243. package/lib/models/service-result.d.ts +114 -0
  244. package/lib/models/service-result.js +81 -0
  245. package/lib/models/service-result.js.map +1 -0
  246. package/lib/models/sfdmu-types.d.ts +53 -0
  247. package/lib/models/sfdmu-types.js +23 -0
  248. package/lib/models/sfdmu-types.js.map +1 -0
  249. package/lib/models/status-types.d.ts +38 -0
  250. package/lib/models/status-types.js +12 -0
  251. package/lib/models/status-types.js.map +1 -0
  252. package/lib/models/summary-bulk-types.d.ts +61 -0
  253. package/lib/models/summary-bulk-types.js +23 -0
  254. package/lib/models/summary-bulk-types.js.map +1 -0
  255. package/lib/models/user-details-types.d.ts +163 -0
  256. package/lib/models/user-details-types.js +9 -0
  257. package/lib/models/user-details-types.js.map +1 -0
  258. package/lib/models/year-range.d.ts +78 -0
  259. package/lib/models/year-range.js +153 -0
  260. package/lib/models/year-range.js.map +1 -0
  261. package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
  262. package/lib/operations/CompatibilityCheckOperation.js +102 -0
  263. package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
  264. package/lib/operations/DefinitionCreateOperation.d.ts +411 -0
  265. package/lib/operations/DefinitionCreateOperation.js +1121 -0
  266. package/lib/operations/DefinitionCreateOperation.js.map +1 -0
  267. package/lib/operations/DefinitionExportOperation.d.ts +155 -0
  268. package/lib/operations/DefinitionExportOperation.js +281 -0
  269. package/lib/operations/DefinitionExportOperation.js.map +1 -0
  270. package/lib/operations/DefinitionImportOperation.d.ts +144 -0
  271. package/lib/operations/DefinitionImportOperation.js +357 -0
  272. package/lib/operations/DefinitionImportOperation.js.map +1 -0
  273. package/lib/operations/DefinitionListOperation.d.ts +66 -0
  274. package/lib/operations/DefinitionListOperation.js +108 -0
  275. package/lib/operations/DefinitionListOperation.js.map +1 -0
  276. package/lib/operations/DefinitionPurgeOperation.d.ts +199 -0
  277. package/lib/operations/DefinitionPurgeOperation.js +465 -0
  278. package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
  279. package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
  280. package/lib/operations/DefinitionUpdateOperation.js +142 -0
  281. package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
  282. package/lib/operations/OrgDetailsOperation.d.ts +253 -0
  283. package/lib/operations/OrgDetailsOperation.js +456 -0
  284. package/lib/operations/OrgDetailsOperation.js.map +1 -0
  285. package/lib/operations/OrgResetOperation.d.ts +114 -0
  286. package/lib/operations/OrgResetOperation.js +209 -0
  287. package/lib/operations/OrgResetOperation.js.map +1 -0
  288. package/lib/operations/ProfileOperation.d.ts +187 -0
  289. package/lib/operations/ProfileOperation.js +373 -0
  290. package/lib/operations/ProfileOperation.js.map +1 -0
  291. package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
  292. package/lib/operations/ProfileRequestCancelOperation.js +137 -0
  293. package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
  294. package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
  295. package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
  296. package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
  297. package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
  298. package/lib/operations/ProfileRequestListOperation.js +61 -0
  299. package/lib/operations/ProfileRequestListOperation.js.map +1 -0
  300. package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
  301. package/lib/operations/SummaryPurgeOperation.js +257 -0
  302. package/lib/operations/SummaryPurgeOperation.js.map +1 -0
  303. package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
  304. package/lib/operations/SummaryReprofileOperation.js +174 -0
  305. package/lib/operations/SummaryReprofileOperation.js.map +1 -0
  306. package/lib/operations/SummaryStopOperation.d.ts +87 -0
  307. package/lib/operations/SummaryStopOperation.js +175 -0
  308. package/lib/operations/SummaryStopOperation.js.map +1 -0
  309. package/lib/services/BulkExecutionService.d.ts +120 -0
  310. package/lib/services/BulkExecutionService.js +535 -0
  311. package/lib/services/BulkExecutionService.js.map +1 -0
  312. package/lib/services/CompatibilityService.d.ts +81 -0
  313. package/lib/services/CompatibilityService.js +118 -0
  314. package/lib/services/CompatibilityService.js.map +1 -0
  315. package/lib/services/ConfigureMode.d.ts +85 -0
  316. package/lib/services/ConfigureMode.js +390 -0
  317. package/lib/services/ConfigureMode.js.map +1 -0
  318. package/lib/services/ContactPointService.d.ts +111 -0
  319. package/lib/services/ContactPointService.js +286 -0
  320. package/lib/services/ContactPointService.js.map +1 -0
  321. package/lib/services/DataAvailabilityService.d.ts +81 -0
  322. package/lib/services/DataAvailabilityService.js +128 -0
  323. package/lib/services/DataAvailabilityService.js.map +1 -0
  324. package/lib/services/DefinitionFieldGenerationService.d.ts +309 -0
  325. package/lib/services/DefinitionFieldGenerationService.js +795 -0
  326. package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
  327. package/lib/services/DefinitionQueryBuilder.d.ts +59 -0
  328. package/lib/services/DefinitionQueryBuilder.js +234 -0
  329. package/lib/services/DefinitionQueryBuilder.js.map +1 -0
  330. package/lib/services/ObjectDescribeService.d.ts +436 -0
  331. package/lib/services/ObjectDescribeService.js +869 -0
  332. package/lib/services/ObjectDescribeService.js.map +1 -0
  333. package/lib/services/ObjectFilteringService.d.ts +400 -0
  334. package/lib/services/ObjectFilteringService.js +878 -0
  335. package/lib/services/ObjectFilteringService.js.map +1 -0
  336. package/lib/services/ObjectListCommandService.d.ts +429 -0
  337. package/lib/services/ObjectListCommandService.js +873 -0
  338. package/lib/services/ObjectListCommandService.js.map +1 -0
  339. package/lib/services/ObjectListService.d.ts +201 -0
  340. package/lib/services/ObjectListService.js +345 -0
  341. package/lib/services/ObjectListService.js.map +1 -0
  342. package/lib/services/OrgInfoService.d.ts +485 -0
  343. package/lib/services/OrgInfoService.js +1122 -0
  344. package/lib/services/OrgInfoService.js.map +1 -0
  345. package/lib/services/PollingService.d.ts +105 -0
  346. package/lib/services/PollingService.js +117 -0
  347. package/lib/services/PollingService.js.map +1 -0
  348. package/lib/services/ProfileRequestService.d.ts +186 -0
  349. package/lib/services/ProfileRequestService.js +555 -0
  350. package/lib/services/ProfileRequestService.js.map +1 -0
  351. package/lib/services/ProfilingDefinitionService.d.ts +535 -0
  352. package/lib/services/ProfilingDefinitionService.js +981 -0
  353. package/lib/services/ProfilingDefinitionService.js.map +1 -0
  354. package/lib/services/ProfilingExecutionService.d.ts +122 -0
  355. package/lib/services/ProfilingExecutionService.js +320 -0
  356. package/lib/services/ProfilingExecutionService.js.map +1 -0
  357. package/lib/services/ProfilingSummaryService.d.ts +292 -0
  358. package/lib/services/ProfilingSummaryService.js +685 -0
  359. package/lib/services/ProfilingSummaryService.js.map +1 -0
  360. package/lib/services/RecordTypeService.d.ts +129 -0
  361. package/lib/services/RecordTypeService.js +284 -0
  362. package/lib/services/RecordTypeService.js.map +1 -0
  363. package/lib/services/SFDMUService.d.ts +133 -0
  364. package/lib/services/SFDMUService.js +295 -0
  365. package/lib/services/SFDMUService.js.map +1 -0
  366. package/lib/services/TabDetectionService.d.ts +105 -0
  367. package/lib/services/TabDetectionService.js +206 -0
  368. package/lib/services/TabDetectionService.js.map +1 -0
  369. package/lib/services/UnconfigureMode.d.ts +74 -0
  370. package/lib/services/UnconfigureMode.js +378 -0
  371. package/lib/services/UnconfigureMode.js.map +1 -0
  372. package/lib/services/UserConfigurationService.d.ts +155 -0
  373. package/lib/services/UserConfigurationService.js +573 -0
  374. package/lib/services/UserConfigurationService.js.map +1 -0
  375. package/lib/services/UserConfigurationTypes.d.ts +181 -0
  376. package/lib/services/UserConfigurationTypes.js +14 -0
  377. package/lib/services/UserConfigurationTypes.js.map +1 -0
  378. package/lib/services/UserReadinessService.d.ts +330 -0
  379. package/lib/services/UserReadinessService.js +831 -0
  380. package/lib/services/UserReadinessService.js.map +1 -0
  381. package/lib/services/constants.d.ts +53 -0
  382. package/lib/services/constants.js +71 -0
  383. package/lib/services/constants.js.map +1 -0
  384. package/lib/services/namespace-constants.d.ts +1 -0
  385. package/lib/services/namespace-constants.js +11 -0
  386. package/lib/services/namespace-constants.js.map +1 -0
  387. package/lib/services/validation.d.ts +47 -0
  388. package/lib/services/validation.js +119 -0
  389. package/lib/services/validation.js.map +1 -0
  390. package/lib/utils/batch-processor.d.ts +13 -0
  391. package/lib/utils/batch-processor.js +39 -0
  392. package/lib/utils/batch-processor.js.map +1 -0
  393. package/lib/utils/formatting/availability-grid.d.ts +81 -0
  394. package/lib/utils/formatting/availability-grid.js +94 -0
  395. package/lib/utils/formatting/availability-grid.js.map +1 -0
  396. package/lib/utils/formatting/business-process-grid.d.ts +51 -0
  397. package/lib/utils/formatting/business-process-grid.js +58 -0
  398. package/lib/utils/formatting/business-process-grid.js.map +1 -0
  399. package/lib/utils/formatting/command-display.d.ts +154 -0
  400. package/lib/utils/formatting/command-display.js +154 -0
  401. package/lib/utils/formatting/command-display.js.map +1 -0
  402. package/lib/utils/formatting/definition-create-display.d.ts +118 -0
  403. package/lib/utils/formatting/definition-create-display.js +231 -0
  404. package/lib/utils/formatting/definition-create-display.js.map +1 -0
  405. package/lib/utils/formatting/empty-states.d.ts +35 -0
  406. package/lib/utils/formatting/empty-states.js +70 -0
  407. package/lib/utils/formatting/empty-states.js.map +1 -0
  408. package/lib/utils/formatting/errors.d.ts +33 -0
  409. package/lib/utils/formatting/errors.js +72 -0
  410. package/lib/utils/formatting/errors.js.map +1 -0
  411. package/lib/utils/formatting/field-types.d.ts +32 -0
  412. package/lib/utils/formatting/field-types.js +88 -0
  413. package/lib/utils/formatting/field-types.js.map +1 -0
  414. package/lib/utils/formatting/index.d.ts +29 -0
  415. package/lib/utils/formatting/index.js +28 -0
  416. package/lib/utils/formatting/index.js.map +1 -0
  417. package/lib/utils/formatting/indicators.d.ts +113 -0
  418. package/lib/utils/formatting/indicators.js +161 -0
  419. package/lib/utils/formatting/indicators.js.map +1 -0
  420. package/lib/utils/formatting/loading-messages.d.ts +37 -0
  421. package/lib/utils/formatting/loading-messages.js +50 -0
  422. package/lib/utils/formatting/loading-messages.js.map +1 -0
  423. package/lib/utils/formatting/namespace-display.d.ts +31 -0
  424. package/lib/utils/formatting/namespace-display.js +64 -0
  425. package/lib/utils/formatting/namespace-display.js.map +1 -0
  426. package/lib/utils/formatting/numbers.d.ts +73 -0
  427. package/lib/utils/formatting/numbers.js +187 -0
  428. package/lib/utils/formatting/numbers.js.map +1 -0
  429. package/lib/utils/formatting/object-describe-display.d.ts +114 -0
  430. package/lib/utils/formatting/object-describe-display.js +440 -0
  431. package/lib/utils/formatting/object-describe-display.js.map +1 -0
  432. package/lib/utils/formatting/object-list-display.d.ts +213 -0
  433. package/lib/utils/formatting/object-list-display.js +672 -0
  434. package/lib/utils/formatting/object-list-display.js.map +1 -0
  435. package/lib/utils/formatting/org-identity.d.ts +15 -0
  436. package/lib/utils/formatting/org-identity.js +28 -0
  437. package/lib/utils/formatting/org-identity.js.map +1 -0
  438. package/lib/utils/formatting/record-age-grid.d.ts +41 -0
  439. package/lib/utils/formatting/record-age-grid.js +56 -0
  440. package/lib/utils/formatting/record-age-grid.js.map +1 -0
  441. package/lib/utils/formatting/sections.d.ts +108 -0
  442. package/lib/utils/formatting/sections.js +150 -0
  443. package/lib/utils/formatting/sections.js.map +1 -0
  444. package/lib/utils/formatting/tables.d.ts +90 -0
  445. package/lib/utils/formatting/tables.js +113 -0
  446. package/lib/utils/formatting/tables.js.map +1 -0
  447. package/lib/utils/formatting/user-details-display.d.ts +101 -0
  448. package/lib/utils/formatting/user-details-display.js +425 -0
  449. package/lib/utils/formatting/user-details-display.js.map +1 -0
  450. package/lib/utils/pagination/index.d.ts +11 -0
  451. package/lib/utils/pagination/index.js +18 -0
  452. package/lib/utils/pagination/index.js.map +1 -0
  453. package/lib/utils/pagination/keypress-reader.d.ts +20 -0
  454. package/lib/utils/pagination/keypress-reader.js +63 -0
  455. package/lib/utils/pagination/keypress-reader.js.map +1 -0
  456. package/lib/utils/pagination/paginate-output.d.ts +48 -0
  457. package/lib/utils/pagination/paginate-output.js +136 -0
  458. package/lib/utils/pagination/paginate-output.js.map +1 -0
  459. package/messages/compatibility.check.md +71 -0
  460. package/messages/cuneiform.access.md +138 -0
  461. package/messages/definition.create.md +511 -0
  462. package/messages/definition.export.md +84 -0
  463. package/messages/definition.get.md +147 -0
  464. package/messages/definition.import.md +65 -0
  465. package/messages/definition.list.md +264 -0
  466. package/messages/definition.purge.md +318 -0
  467. package/messages/definition.update.md +118 -0
  468. package/messages/mcp.serve.md +66 -0
  469. package/messages/object.describe.md +201 -0
  470. package/messages/object.list.md +443 -0
  471. package/messages/org.details.md +386 -0
  472. package/messages/org.reset.md +71 -0
  473. package/messages/profile.md +231 -0
  474. package/messages/profile.request.cancel.md +143 -0
  475. package/messages/profile.request.delete.md +139 -0
  476. package/messages/profile.request.list.md +89 -0
  477. package/messages/summary.purge.md +218 -0
  478. package/messages/summary.reprofile.md +150 -0
  479. package/messages/summary.stop.md +157 -0
  480. package/messages/user.details.md +501 -0
  481. package/oclif.lock +2887 -2149
  482. package/oclif.manifest.json +2813 -31
  483. package/package.json +94 -19
  484. package/lib/commands/cuneiform/about.d.ts +0 -13
  485. package/lib/commands/cuneiform/about.js +0 -26
  486. package/lib/commands/cuneiform/about.js.map +0 -1
  487. package/lib/commands/hello/world.d.ts +0 -14
  488. package/lib/commands/hello/world.js +0 -27
  489. package/lib/commands/hello/world.js.map +0 -1
  490. package/lib/index.d.ts +0 -2
  491. package/lib/index.js +0 -2
  492. package/lib/index.js.map +0 -1
  493. package/messages/cuneiform.about.md +0 -19
  494. package/messages/hello.world.md +0 -29
@@ -0,0 +1,211 @@
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
+ /**
9
+ * Mapping of Salesforce namespace prefixes to product names.
10
+ *
11
+ * This map enables identification of installed Salesforce products by their
12
+ * namespace prefix. Managed packages use namespace prefixes on custom objects
13
+ * (e.g., `SBQQ__Quote__c` indicates Salesforce CPQ is installed).
14
+ *
15
+ * @see docs/knowledge/salesforce/namespaces.md for comprehensive documentation
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const namespace = 'SBQQ__';
20
+ * const product = NAMESPACE_PRODUCT_MAP[namespace];
21
+ * console.log(product); // 'Salesforce CPQ'
22
+ * ```
23
+ */
24
+ /* eslint-disable camelcase -- Salesforce namespace prefixes use underscores */
25
+ export const NAMESPACE_PRODUCT_MAP = {
26
+ // Industry Clouds (Managed Packages)
27
+ HealthCloudGA__: 'Health Cloud',
28
+ FinServ__: 'Financial Services Cloud',
29
+ industriespersonalizedfinance: 'FSC Personalized Finance',
30
+ CGCloud__: 'Consumer Goods Cloud',
31
+ vlocity_cmt__: 'Vlocity CMT (Communications/Media/Energy)',
32
+ vlocity_ins__: 'Vlocity Insurance',
33
+ omnistudio: 'OmniStudio',
34
+ // Salesforce Add-on Products
35
+ SBQQ__: 'Salesforce CPQ',
36
+ FSL__: 'Field Service',
37
+ et4ae5__: 'Marketing Cloud Connect',
38
+ pi__: 'Pardot (legacy)',
39
+ b2bma: 'Pardot B2B Marketing',
40
+ maps__: 'Salesforce Maps',
41
+ blng__: 'Salesforce Billing',
42
+ ccrz: 'B2B Commerce (CloudCraze)',
43
+ wkcc__: 'Work.com',
44
+ // Nonprofit Ecosystem
45
+ npsp__: 'Nonprofit Success Pack',
46
+ npe01__: 'NPSP Contacts & Organizations',
47
+ npo02__: 'NPSP Households',
48
+ npe03__: 'NPSP Recurring Donations',
49
+ npe4__: 'NPSP Relationships',
50
+ npe5__: 'NPSP Affiliations',
51
+ hed__: 'Education Data Architecture',
52
+ pmdm__: 'Program Management Module',
53
+ sfdobase__: 'SFDO Base',
54
+ scm__: 'Nonprofit Case Management',
55
+ outfunds__: 'Outbound Funds Module',
56
+ GW_Volunteers__: 'Volunteers for Salesforce',
57
+ // Data Cloud / CDP
58
+ ssot__: 'Data Cloud SSOT',
59
+ // Salesforce Labs
60
+ agf__: 'Agile Accelerator',
61
+ dlrs: 'DLRS (Rollup Summaries)',
62
+ MPM4_BASE: 'Milestones PM+',
63
+ LABSMPM: 'Milestones PM',
64
+ // Cuneiform
65
+ // Both forms supported: 'pnova' (identifier) and 'pnova__' (object/field references)
66
+ pnova: 'Cuneiform for CRM',
67
+ pnova__: 'Cuneiform for CRM',
68
+ };
69
+ /**
70
+ * Namespace-to-cloud name mapping for package-based cloud detection.
71
+ * Keys are namespace prefixes without trailing underscores.
72
+ */
73
+ export const CLOUD_NAMESPACE_MAP = {
74
+ FinServ: 'Financial Services Cloud',
75
+ HealthCloudGA: 'Health Cloud',
76
+ CGCloud: 'Consumer Goods Cloud',
77
+ vlocity_cmt: 'Communications/Media/Energy Cloud',
78
+ vlocity_ins: 'Insurance Cloud',
79
+ omnistudio: 'OmniStudio',
80
+ };
81
+ /* eslint-enable camelcase */
82
+ /**
83
+ * The namespace prefix used by Cuneiform for CRM.
84
+ */
85
+ export const CUNEIFORM_NAMESPACE = 'pnova';
86
+ /**
87
+ * The namespace prefix with trailing underscores (for object/field references).
88
+ */
89
+ export const CUNEIFORM_NAMESPACE_PREFIX = 'pnova__';
90
+ /**
91
+ * Gets the product name for a given namespace prefix.
92
+ *
93
+ * @param namespace - The namespace prefix (with or without trailing underscores)
94
+ * @returns The product name or undefined if not found
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * getProductName('SBQQ__'); // 'Salesforce CPQ'
99
+ * getProductName('SBQQ'); // 'Salesforce CPQ' (normalizes input)
100
+ * getProductName('Unknown__'); // undefined
101
+ * ```
102
+ */
103
+ export function getProductName(namespace) {
104
+ // Try exact match first
105
+ if (NAMESPACE_PRODUCT_MAP[namespace]) {
106
+ return NAMESPACE_PRODUCT_MAP[namespace];
107
+ }
108
+ // Try with trailing underscores if not present
109
+ const withUnderscores = namespace.endsWith('__') ? namespace : `${namespace}__`;
110
+ if (NAMESPACE_PRODUCT_MAP[withUnderscores]) {
111
+ return NAMESPACE_PRODUCT_MAP[withUnderscores];
112
+ }
113
+ // Try without trailing underscores
114
+ const withoutUnderscores = namespace.replace(/__$/, '');
115
+ return NAMESPACE_PRODUCT_MAP[withoutUnderscores];
116
+ }
117
+ /**
118
+ * Checks if a namespace belongs to Cuneiform.
119
+ *
120
+ * @param namespace - The namespace to check
121
+ * @returns True if the namespace is Cuneiform's namespace
122
+ */
123
+ export function isCuneiformNamespace(namespace) {
124
+ const normalized = namespace.replace(/__$/, '');
125
+ return normalized === CUNEIFORM_NAMESPACE;
126
+ }
127
+ /**
128
+ * Extracts unique namespaces from a list of object API names.
129
+ *
130
+ * @param objectNames - Array of Salesforce object API names
131
+ * @returns Array of unique namespace prefixes found
132
+ *
133
+ * @example
134
+ * ```typescript
135
+ * extractNamespaces(['SBQQ__Quote__c', 'Account', 'npsp__Donation__c']);
136
+ * // Returns: ['SBQQ__', 'npsp__']
137
+ * ```
138
+ */
139
+ export function extractNamespaces(objectNames) {
140
+ const namespaces = new Set();
141
+ for (const name of objectNames) {
142
+ // Custom objects with namespaces follow pattern: Namespace__ObjectName__c
143
+ // Standard objects and unmanaged custom objects don't have namespace prefix
144
+ // The negative lookahead (?!c$|mdt$|e$|b$|x$|r$) ensures we don't match
145
+ // standard suffixes (__c, __mdt, __e, __b, __x, __r) as namespaces
146
+ const match = name.match(/^([A-Za-z0-9]+__)(?!c$|mdt$|e$|b$|x$|r$)/);
147
+ if (match) {
148
+ namespaces.add(match[1]);
149
+ }
150
+ }
151
+ return Array.from(namespaces).sort();
152
+ }
153
+ /**
154
+ * Industry Cloud namespace identifiers (without trailing underscores).
155
+ *
156
+ * These are a subset of NAMESPACE_PRODUCT_MAP that represent Salesforce
157
+ * Industry Cloud products rather than add-on managed packages.
158
+ */
159
+ const INDUSTRY_NAMESPACES = new Set([
160
+ 'HealthCloudGA',
161
+ 'FinServ',
162
+ 'industriespersonalizedfinance',
163
+ 'CGCloud',
164
+ 'vlocity_cmt',
165
+ 'vlocity_ins',
166
+ 'omnistudio',
167
+ ]);
168
+ /**
169
+ * Normalizes a namespace prefix by removing trailing underscores.
170
+ *
171
+ * @param namespace - The namespace to normalize
172
+ * @returns The namespace without trailing underscores
173
+ */
174
+ function normalizeNamespace(namespace) {
175
+ return namespace.replace(/__$/, '');
176
+ }
177
+ /**
178
+ * Categorizes a Salesforce namespace prefix into one of four categories:
179
+ * standard, industry, managed, or custom.
180
+ *
181
+ * @param namespace - The namespace prefix (with or without trailing underscores).
182
+ * Null, undefined, or empty string indicates a standard (platform-native) object.
183
+ * @returns The category classification for the namespace
184
+ *
185
+ * @example
186
+ * ```typescript
187
+ * categorizeNamespace(null); // 'standard'
188
+ * categorizeNamespace(''); // 'standard'
189
+ * categorizeNamespace('FinServ__'); // 'industry'
190
+ * categorizeNamespace('SBQQ__'); // 'managed'
191
+ * categorizeNamespace('MyCustomPkg__'); // 'custom'
192
+ * ```
193
+ */
194
+ export function categorizeNamespace(namespace) {
195
+ // Null, undefined, or empty/whitespace-only → standard (platform-native)
196
+ if (namespace == null || namespace.trim() === '') {
197
+ return 'standard';
198
+ }
199
+ const normalized = normalizeNamespace(namespace.trim());
200
+ // Check industry namespaces first (subset of known namespaces)
201
+ if (INDUSTRY_NAMESPACES.has(normalized)) {
202
+ return 'industry';
203
+ }
204
+ // Check if it's a known namespace in the product map (either form)
205
+ if (NAMESPACE_PRODUCT_MAP[normalized] ?? NAMESPACE_PRODUCT_MAP[`${normalized}__`]) {
206
+ return 'managed';
207
+ }
208
+ // Unknown namespace → custom
209
+ return 'custom';
210
+ }
211
+ //# sourceMappingURL=namespace-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace-constants.js","sourceRoot":"","sources":["../../src/constants/namespace-constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,qBAAqB,GAAqC;IACrE,qCAAqC;IACrC,eAAe,EAAE,cAAc;IAC/B,SAAS,EAAE,0BAA0B;IACrC,6BAA6B,EAAE,0BAA0B;I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AAC;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;AACvC,CAAC;AAYD;;;;;GAKG;AACH,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC;IACvD,eAAe;IACf,SAAS;IACT,+BAA+B;IAC/B,SAAS;IACT,aAAa;IACb,aAAa;IACb,YAAY;CACb,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,SAAiB;IAC3C,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAoC;IACtE,yEAAyE;IACzE,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAExD,+DAA+D;IAC/D,IAAI,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QACxC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,mEAAmE;IACnE,IAAI,qBAAqB,CAAC,UAAU,CAAC,IAAI,qBAAqB,CAAC,GAAG,UAAU,IAAI,CAAC,EAAE,CAAC;QAClF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,6BAA6B;IAC7B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Parsed flags from a command's parse() call.
3
+ * The exact structure depends on the command's flag definitions.
4
+ */
5
+ type ParsedFlags = Record<string, unknown>;
6
+ /**
7
+ * Minimal interface for commands that can be wrapped with debug logging.
8
+ *
9
+ * This interface represents the essential shape of an SfCommand that the
10
+ * debug proxy needs to intercept. Commands must have a run() method that
11
+ * returns a Promise.
12
+ *
13
+ * @template T - The result type returned by the command's run() method
14
+ */
15
+ export type DebugWrappableCommand<T> = {
16
+ /** Executes the command and returns a result */
17
+ run(): Promise<T>;
18
+ };
19
+ /**
20
+ * Result of wrapping a command with debug logging.
21
+ *
22
+ * Contains the wrapped command and a cleanup function that should be
23
+ * called after command execution completes (success or failure).
24
+ *
25
+ * @template T - The result type returned by the command's run() method
26
+ */
27
+ export type CommandDebugResult<T> = {
28
+ /** The command instance, wrapped with debug logging if debug=true */
29
+ command: DebugWrappableCommand<T>;
30
+ /** Cleanup function to restore debug state after execution */
31
+ cleanup: () => void;
32
+ };
33
+ /**
34
+ * Wraps a command's run() method with debug logging for CLI layer visibility.
35
+ *
36
+ * When debug is enabled, creates a Proxy that intercepts the run() method and:
37
+ * - Logs command start with flags: `[DEBUG] [CLI] commandName: flags → {...}`
38
+ * - Logs command completion with timing: `[DEBUG] [CLI] commandName: complete → duration=Xms`
39
+ * - Logs errors: `[DEBUG] [CLI] commandName: error → message`
40
+ *
41
+ * When debug is disabled (default), returns the original command unchanged
42
+ * with zero overhead.
43
+ *
44
+ * @template T - The result type returned by the command's run() method
45
+ * @param command - The command instance to wrap
46
+ * @param commandName - Name used in log output (e.g., 'cuneiform:org:details')
47
+ * @param debug - Whether to enable debug logging (default: false)
48
+ * @param flags - Optional parsed flags to log at command start
49
+ * @returns Object containing the wrapped command and cleanup function
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * // In a hook or command infrastructure
54
+ * const { command: wrapped, cleanup } = withCommandDebugLogging(
55
+ * commandInstance,
56
+ * 'cuneiform:org:details',
57
+ * flags.debug,
58
+ * flags
59
+ * );
60
+ *
61
+ * try {
62
+ * const result = await wrapped.run();
63
+ * return result;
64
+ * } finally {
65
+ * cleanup();
66
+ * }
67
+ *
68
+ * // Output when debug=true:
69
+ * // [DEBUG] [CLI] cuneiform:org:details: flags → {"target-org":"myOrg","verbose":true}
70
+ * // [DEBUG] [CLI] cuneiform:org:details: complete → duration=150ms
71
+ * ```
72
+ */
73
+ export declare function withCommandDebugLogging<T>(command: DebugWrappableCommand<T>, commandName: string, debug?: boolean, flags?: ParsedFlags): CommandDebugResult<T>;
74
+ /**
75
+ * Convenience function to execute a command with debug logging.
76
+ *
77
+ * This is a higher-level wrapper that handles the full lifecycle:
78
+ * 1. Wraps the command with debug logging
79
+ * 2. Executes the command
80
+ * 3. Cleans up debug state
81
+ *
82
+ * @template T - The result type returned by the command's run() method
83
+ * @param command - The command instance to execute
84
+ * @param commandName - Name used in log output
85
+ * @param debug - Whether to enable debug logging
86
+ * @param flags - Optional parsed flags to log
87
+ * @returns Promise resolving to the command result
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * // Instead of managing wrap/cleanup manually:
92
+ * const result = await executeWithDebugLogging(
93
+ * commandInstance,
94
+ * 'cuneiform:org:details',
95
+ * flags.debug,
96
+ * flags
97
+ * );
98
+ * ```
99
+ */
100
+ export declare function executeWithDebugLogging<T>(command: DebugWrappableCommand<T>, commandName: string, debug?: boolean, flags?: ParsedFlags): Promise<T>;
101
+ export {};
@@ -0,0 +1,171 @@
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 { DebugLogger } from './debug-logger.js';
9
+ /**
10
+ * Wraps a command's run() method with debug logging for CLI layer visibility.
11
+ *
12
+ * When debug is enabled, creates a Proxy that intercepts the run() method and:
13
+ * - Logs command start with flags: `[DEBUG] [CLI] commandName: flags → {...}`
14
+ * - Logs command completion with timing: `[DEBUG] [CLI] commandName: complete → duration=Xms`
15
+ * - Logs errors: `[DEBUG] [CLI] commandName: error → message`
16
+ *
17
+ * When debug is disabled (default), returns the original command unchanged
18
+ * with zero overhead.
19
+ *
20
+ * @template T - The result type returned by the command's run() method
21
+ * @param command - The command instance to wrap
22
+ * @param commandName - Name used in log output (e.g., 'cuneiform:org:details')
23
+ * @param debug - Whether to enable debug logging (default: false)
24
+ * @param flags - Optional parsed flags to log at command start
25
+ * @returns Object containing the wrapped command and cleanup function
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * // In a hook or command infrastructure
30
+ * const { command: wrapped, cleanup } = withCommandDebugLogging(
31
+ * commandInstance,
32
+ * 'cuneiform:org:details',
33
+ * flags.debug,
34
+ * flags
35
+ * );
36
+ *
37
+ * try {
38
+ * const result = await wrapped.run();
39
+ * return result;
40
+ * } finally {
41
+ * cleanup();
42
+ * }
43
+ *
44
+ * // Output when debug=true:
45
+ * // [DEBUG] [CLI] cuneiform:org:details: flags → {"target-org":"myOrg","verbose":true}
46
+ * // [DEBUG] [CLI] cuneiform:org:details: complete → duration=150ms
47
+ * ```
48
+ */
49
+ export function withCommandDebugLogging(command, commandName, debug, flags) {
50
+ // Early return for zero overhead when debug is disabled
51
+ if (!debug) {
52
+ return {
53
+ command,
54
+ cleanup: () => {
55
+ /* no-op */
56
+ },
57
+ };
58
+ }
59
+ // Enable debug logger
60
+ DebugLogger.setEnabled(true);
61
+ // Log command start with flags
62
+ if (flags) {
63
+ const sanitizedFlags = sanitizeFlags(flags);
64
+ DebugLogger.log('CLI', commandName, 'flags', JSON.stringify(sanitizedFlags));
65
+ }
66
+ const start = Date.now();
67
+ const wrappedCommand = new Proxy(command, {
68
+ get(target, prop, receiver) {
69
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Reflect.get returns unknown at runtime
70
+ const value = Reflect.get(target, prop, receiver);
71
+ // Only wrap the run() method
72
+ if (prop === 'run' && typeof value === 'function') {
73
+ return async () => {
74
+ try {
75
+ // The run method is typed as () => Promise<T> from DebugWrappableCommand
76
+ const runFn = value;
77
+ const result = await runFn.call(target);
78
+ const duration = Date.now() - start;
79
+ DebugLogger.log('CLI', commandName, 'complete', `duration=${duration}ms`);
80
+ return result;
81
+ }
82
+ catch (error) {
83
+ const errorMessage = error instanceof Error ? error.message : String(error);
84
+ DebugLogger.log('CLI', commandName, 'error', errorMessage);
85
+ throw error;
86
+ }
87
+ };
88
+ }
89
+ return value;
90
+ },
91
+ });
92
+ return {
93
+ command: wrappedCommand,
94
+ cleanup: () => {
95
+ // Reset debug logger if needed
96
+ // Note: We don't disable here because other layers may still be logging
97
+ },
98
+ };
99
+ }
100
+ /**
101
+ * Sanitizes flags for logging by removing sensitive values.
102
+ *
103
+ * Removes or redacts:
104
+ * - access tokens
105
+ * - passwords
106
+ * - connection objects (replaced with type indicator)
107
+ *
108
+ * @param flags - The raw parsed flags
109
+ * @returns Sanitized flags safe for logging
110
+ */
111
+ function sanitizeFlags(flags) {
112
+ const sanitized = {};
113
+ for (const [key, value] of Object.entries(flags)) {
114
+ // Skip sensitive keys
115
+ if (key.toLowerCase().includes('token') || key.toLowerCase().includes('password')) {
116
+ sanitized[key] = '[REDACTED]';
117
+ continue;
118
+ }
119
+ // Handle connection/org objects (don't log entire object)
120
+ if (value && typeof value === 'object') {
121
+ // Check for Salesforce Org objects
122
+ if ('getConnection' in value || 'getUsername' in value) {
123
+ sanitized[key] = '[Org]';
124
+ continue;
125
+ }
126
+ // Check for Connection objects
127
+ if ('accessToken' in value || 'instanceUrl' in value) {
128
+ sanitized[key] = '[Connection]';
129
+ continue;
130
+ }
131
+ }
132
+ sanitized[key] = value;
133
+ }
134
+ return sanitized;
135
+ }
136
+ /**
137
+ * Convenience function to execute a command with debug logging.
138
+ *
139
+ * This is a higher-level wrapper that handles the full lifecycle:
140
+ * 1. Wraps the command with debug logging
141
+ * 2. Executes the command
142
+ * 3. Cleans up debug state
143
+ *
144
+ * @template T - The result type returned by the command's run() method
145
+ * @param command - The command instance to execute
146
+ * @param commandName - Name used in log output
147
+ * @param debug - Whether to enable debug logging
148
+ * @param flags - Optional parsed flags to log
149
+ * @returns Promise resolving to the command result
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * // Instead of managing wrap/cleanup manually:
154
+ * const result = await executeWithDebugLogging(
155
+ * commandInstance,
156
+ * 'cuneiform:org:details',
157
+ * flags.debug,
158
+ * flags
159
+ * );
160
+ * ```
161
+ */
162
+ export async function executeWithDebugLogging(command, commandName, debug, flags) {
163
+ const { command: wrapped, cleanup } = withCommandDebugLogging(command, commandName, debug, flags);
164
+ try {
165
+ return await wrapped.run();
166
+ }
167
+ finally {
168
+ cleanup();
169
+ }
170
+ }
171
+ //# sourceMappingURL=command-debug-proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-debug-proxy.js","sourceRoot":"","sources":["../../src/debug/command-debug-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAiC,EACjC,WAAmB,EACnB,KAAe,EACf,KAAmB;IAEnB,wDAAwD;IACxD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;YACL,OAAO;YACP,OAAO,EAAE,GAAS,EAAE;gBAClB,WAAW;YACb,CAAC;SACF,CAAC;IACJ,CAAC;IAED,sBAAsB;IACtB,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7B,+BAA+B;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEzB,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE;QACxC,GAAG,CAAC,MAAgC,EAAE,IAAqB,EAAE,QAAiB;YAC5E,6GAA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KAAK,CAAC,EAAE,CAAC;QACjD,sBAAsB;QACtB,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAClF,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC;YAC9B,SAAS;QACX,CAAC;QAED,0DAA0D;QAC1D,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,mCAAmC;YACnC,IAAI,eAAe,IAAI,KAAK,IAAI,aAAa,IAAI,KAAK,EAAE,CAAC;gBACvD,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;gBACzB,SAAS;YACX,CAAC;YACD,+BAA+B;YAC/B,IAAI,aAAa,IAAI,KAAK,IAAI,aAAa,IAAI,KAAK,EAAE,CAAC;gBACrD,SAAS,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC;gBAChC,SAAS;YACX,CAAC;QACH,CAAC;QAED,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAiC,EACjC,WAAmB,EACnB,KAAe,EACf,KAAmB;IAEnB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAElG,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC;IAC7B,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Debug logging layer identifiers.
3
+ * Each layer represents a distinct architectural boundary in the application.
4
+ */
5
+ export type DebugLayer = 'ADAPTER' | 'SERVICE' | 'MCP' | 'CLI';
6
+ /**
7
+ * Unified debug logging utility for infrastructure-level logging.
8
+ *
9
+ * Provides consistent debug output across all layers (Adapter, Service, MCP, CLI)
10
+ * with zero overhead when disabled. All output goes to stderr to preserve
11
+ * stdout for JSON-RPC communication and command output.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // Enable debug logging
16
+ * DebugLogger.setEnabled(true);
17
+ *
18
+ * // Log at different layers
19
+ * DebugLogger.log('MCP', 'cuneiform_org_details', 'params', '{ verbose: true }');
20
+ * DebugLogger.log('SERVICE', 'OrgInfoService.getOrgIdentity', 'called', '');
21
+ * DebugLogger.log('ADAPTER', 'SOQL', 'query', 'SELECT Id FROM Account');
22
+ * DebugLogger.logResult('MCP', 'cuneiform_org_details', true, 1234, 4300);
23
+ * ```
24
+ *
25
+ * Output format: `[DEBUG] [LAYER] context: phase → details`
26
+ */
27
+ export declare class DebugLogger {
28
+ private static enabled;
29
+ /**
30
+ * Enable or disable debug logging globally.
31
+ *
32
+ * @param debug - Whether to enable debug logging
33
+ */
34
+ static setEnabled(debug: boolean): void;
35
+ /**
36
+ * Check if debug logging is currently enabled.
37
+ *
38
+ * @returns True if debug logging is enabled
39
+ */
40
+ static isEnabled(): boolean;
41
+ /**
42
+ * Log a debug message with consistent formatting.
43
+ *
44
+ * Output format: `[DEBUG] [LAYER] context: phase → details`
45
+ *
46
+ * @param layer - The architectural layer (ADAPTER, SERVICE, MCP, CLI)
47
+ * @param context - The context identifier (tool name, service name, etc.)
48
+ * @param phase - The phase of operation (params, called, result, etc.)
49
+ * @param details - Additional details to log
50
+ */
51
+ static log(layer: DebugLayer, context: string, phase: string, details: string): void;
52
+ /**
53
+ * Log timing information for an operation.
54
+ *
55
+ * @param layer - The architectural layer
56
+ * @param context - The context identifier
57
+ * @param durationMs - Duration in milliseconds
58
+ */
59
+ static logTiming(layer: DebugLayer, context: string, durationMs: number): void;
60
+ /**
61
+ * Log a result with success status, duration, and optional response size.
62
+ *
63
+ * @param layer - The architectural layer
64
+ * @param context - The context identifier
65
+ * @param success - Whether the operation succeeded
66
+ * @param durationMs - Duration in milliseconds
67
+ * @param sizeBytes - Response size in bytes (omitted when debug is off and serialization is skipped)
68
+ */
69
+ static logResult(layer: DebugLayer, context: string, success: boolean, durationMs: number, sizeBytes?: number): void;
70
+ /**
71
+ * Format bytes as human-readable size (B, KB, MB).
72
+ *
73
+ * @param bytes - Size in bytes
74
+ * @returns Human-readable size string
75
+ */
76
+ static formatSize(bytes: number): string;
77
+ /**
78
+ * Truncate a string to a maximum length, adding ellipsis if truncated.
79
+ *
80
+ * @param str - The string to truncate
81
+ * @param maxLen - Maximum length (including ellipsis)
82
+ * @returns Truncated string
83
+ */
84
+ static truncate(str: string, maxLen: number): string;
85
+ }