@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,133 @@
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
+ * Unified debug logging utility for infrastructure-level logging.
10
+ *
11
+ * Provides consistent debug output across all layers (Adapter, Service, MCP, CLI)
12
+ * with zero overhead when disabled. All output goes to stderr to preserve
13
+ * stdout for JSON-RPC communication and command output.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * // Enable debug logging
18
+ * DebugLogger.setEnabled(true);
19
+ *
20
+ * // Log at different layers
21
+ * DebugLogger.log('MCP', 'cuneiform_org_details', 'params', '{ verbose: true }');
22
+ * DebugLogger.log('SERVICE', 'OrgInfoService.getOrgIdentity', 'called', '');
23
+ * DebugLogger.log('ADAPTER', 'SOQL', 'query', 'SELECT Id FROM Account');
24
+ * DebugLogger.logResult('MCP', 'cuneiform_org_details', true, 1234, 4300);
25
+ * ```
26
+ *
27
+ * Output format: `[DEBUG] [LAYER] context: phase → details`
28
+ */
29
+ export class DebugLogger {
30
+ static enabled = false;
31
+ /**
32
+ * Enable or disable debug logging globally.
33
+ *
34
+ * @param debug - Whether to enable debug logging
35
+ */
36
+ static setEnabled(debug) {
37
+ DebugLogger.enabled = debug;
38
+ }
39
+ /**
40
+ * Check if debug logging is currently enabled.
41
+ *
42
+ * @returns True if debug logging is enabled
43
+ */
44
+ static isEnabled() {
45
+ return DebugLogger.enabled;
46
+ }
47
+ /**
48
+ * Log a debug message with consistent formatting.
49
+ *
50
+ * Output format: `[DEBUG] [LAYER] context: phase → details`
51
+ *
52
+ * @param layer - The architectural layer (ADAPTER, SERVICE, MCP, CLI)
53
+ * @param context - The context identifier (tool name, service name, etc.)
54
+ * @param phase - The phase of operation (params, called, result, etc.)
55
+ * @param details - Additional details to log
56
+ */
57
+ static log(layer, context, phase, details) {
58
+ if (!DebugLogger.enabled) {
59
+ return;
60
+ }
61
+ // eslint-disable-next-line no-console
62
+ console.error(`[DEBUG] [${layer}] ${context}: ${phase} → ${details}`);
63
+ }
64
+ /**
65
+ * Log timing information for an operation.
66
+ *
67
+ * @param layer - The architectural layer
68
+ * @param context - The context identifier
69
+ * @param durationMs - Duration in milliseconds
70
+ */
71
+ static logTiming(layer, context, durationMs) {
72
+ if (!DebugLogger.enabled) {
73
+ return;
74
+ }
75
+ // eslint-disable-next-line no-console
76
+ console.error(`[DEBUG] [${layer}] ${context}: timing → ${durationMs}ms`);
77
+ }
78
+ /**
79
+ * Log a result with success status, duration, and optional response size.
80
+ *
81
+ * @param layer - The architectural layer
82
+ * @param context - The context identifier
83
+ * @param success - Whether the operation succeeded
84
+ * @param durationMs - Duration in milliseconds
85
+ * @param sizeBytes - Response size in bytes (omitted when debug is off and serialization is skipped)
86
+ */
87
+ static logResult(layer, context, success, durationMs, sizeBytes) {
88
+ if (!DebugLogger.enabled) {
89
+ return;
90
+ }
91
+ const sizeSuffix = sizeBytes !== undefined ? ` size=${DebugLogger.formatSize(sizeBytes)}` : '';
92
+ // eslint-disable-next-line no-console
93
+ console.error(`[DEBUG] [${layer}] ${context}: result → success=${success} duration=${durationMs}ms${sizeSuffix}`);
94
+ }
95
+ /**
96
+ * Format bytes as human-readable size (B, KB, MB).
97
+ *
98
+ * @param bytes - Size in bytes
99
+ * @returns Human-readable size string
100
+ */
101
+ static formatSize(bytes) {
102
+ if (bytes === 0) {
103
+ return '0B';
104
+ }
105
+ if (bytes < 1024) {
106
+ return `${bytes}B`;
107
+ }
108
+ if (bytes < 1_048_576) {
109
+ return `${(bytes / 1024).toFixed(1)}KB`;
110
+ }
111
+ return `${(bytes / 1_048_576).toFixed(1)}MB`;
112
+ }
113
+ /**
114
+ * Truncate a string to a maximum length, adding ellipsis if truncated.
115
+ *
116
+ * @param str - The string to truncate
117
+ * @param maxLen - Maximum length (including ellipsis)
118
+ * @returns Truncated string
119
+ */
120
+ static truncate(str, maxLen) {
121
+ if (maxLen <= 0) {
122
+ return '';
123
+ }
124
+ if (str.length <= maxLen) {
125
+ return str;
126
+ }
127
+ if (maxLen <= 3) {
128
+ return '...';
129
+ }
130
+ return str.slice(0, maxLen - 3) + '...';
131
+ }
132
+ }
133
+ //# sourceMappingURL=debug-logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-logger.js","sourceRoot":"","sources":["../../src/debug/debug-logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,WAAW;IACd,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;IAE/B;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,KAAc;QACrC,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS;QACrB,OAAO,WAAW,CAAC,OAAO,CAAC;IAC7B,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM,CAAC,GAAG,CAAC,KAAiB,EAAE,OAAe,EAAE,KAAa,EAAE,OAAe;QAClF,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QACD,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,KAAK,OAAO,KAAK,KAAK,MAAM,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,SAAS,CAAC,KAAiB,EAAE,OAAe,EAAE,UAAkB;QAC5E,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QACD,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,KAAK,OAAO,cAAc,UAAU,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,SAAS,CACrB,KAAiB,EACjB,OAAe,EACf,OAAgB,EAChB,UAAkB,EAClB,SAAkB;QAElB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QACD,MAAM,UAAU,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/F,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,KAAK,OAAO,sBAAsB,OAAO,aAAa,UAAU,KAAK,UAAU,EAAE,CAAC,CAAC;IACpH,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,KAAa;QACpC,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,KAAK,GAAG,IAAI,EAAE,CAAC;YACjB,OAAO,GAAG,KAAK,GAAG,CAAC;QACrB,CAAC;QACD,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;YACtB,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1C,CAAC;QACD,OAAO,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,QAAQ,CAAC,GAAW,EAAE,MAAc;QAChD,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;YAChB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;YACzB,OAAO,GAAG,CAAC;QACb,CAAC;QACD,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Debug infrastructure for infrastructure-level logging.
3
+ *
4
+ * This module provides unified debug logging that works across all layers
5
+ * (Adapter, Service, MCP, CLI) without requiring changes to individual
6
+ * services, adapters, or handlers.
7
+ *
8
+ * @module debug
9
+ */
10
+ export { DebugLogger, type DebugLayer } from './debug-logger.js';
11
+ export { withServiceDebugLogging } from './service-debug-proxy.js';
12
+ export { withCommandDebugLogging, executeWithDebugLogging, type DebugWrappableCommand, type CommandDebugResult, } from './command-debug-proxy.js';
@@ -0,0 +1,20 @@
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
+ * Debug infrastructure for infrastructure-level logging.
10
+ *
11
+ * This module provides unified debug logging that works across all layers
12
+ * (Adapter, Service, MCP, CLI) without requiring changes to individual
13
+ * services, adapters, or handlers.
14
+ *
15
+ * @module debug
16
+ */
17
+ export { DebugLogger } from './debug-logger.js';
18
+ export { withServiceDebugLogging } from './service-debug-proxy.js';
19
+ export { withCommandDebugLogging, executeWithDebugLogging, } from './command-debug-proxy.js';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAmB,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GAGxB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Wraps a service with debug logging for all method calls.
3
+ *
4
+ * When debug is enabled, creates a Proxy that intercepts all method calls and:
5
+ * - Logs method entry with arguments
6
+ * - Logs method exit with success status and timing
7
+ * - Logs errors when methods throw
8
+ *
9
+ * When debug is disabled (default), returns the original service unchanged
10
+ * with zero overhead.
11
+ *
12
+ * @template T - The service type (must be an object)
13
+ * @param service - The service instance to wrap
14
+ * @param serviceName - Name used in log output (e.g., 'OrgInfoService')
15
+ * @param debug - Whether to enable debug logging (default: false)
16
+ * @returns The service, wrapped with logging if debug=true
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * // Without logging (production)
21
+ * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService');
22
+ *
23
+ * // With logging (debug mode)
24
+ * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService', true);
25
+ * // Calls will log:
26
+ * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: called → []
27
+ * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: result → success=true duration=150ms
28
+ * ```
29
+ */
30
+ export declare function withServiceDebugLogging<T extends object>(service: T, serviceName: string, debug?: boolean): T;
@@ -0,0 +1,102 @@
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
+ * Type guard to check if a value looks like a ServiceResult.
11
+ * ServiceResult has { success: boolean, data: T } at minimum.
12
+ */
13
+ function isServiceResult(value) {
14
+ return (typeof value === 'object' &&
15
+ value !== null &&
16
+ 'success' in value &&
17
+ typeof value.success === 'boolean');
18
+ }
19
+ /**
20
+ * Wraps a service with debug logging for all method calls.
21
+ *
22
+ * When debug is enabled, creates a Proxy that intercepts all method calls and:
23
+ * - Logs method entry with arguments
24
+ * - Logs method exit with success status and timing
25
+ * - Logs errors when methods throw
26
+ *
27
+ * When debug is disabled (default), returns the original service unchanged
28
+ * with zero overhead.
29
+ *
30
+ * @template T - The service type (must be an object)
31
+ * @param service - The service instance to wrap
32
+ * @param serviceName - Name used in log output (e.g., 'OrgInfoService')
33
+ * @param debug - Whether to enable debug logging (default: false)
34
+ * @returns The service, wrapped with logging if debug=true
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * // Without logging (production)
39
+ * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService');
40
+ *
41
+ * // With logging (debug mode)
42
+ * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService', true);
43
+ * // Calls will log:
44
+ * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: called → []
45
+ * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: result → success=true duration=150ms
46
+ * ```
47
+ */
48
+ export function withServiceDebugLogging(service, serviceName, debug) {
49
+ // Early return for zero overhead when debug is disabled
50
+ if (!debug) {
51
+ return service;
52
+ }
53
+ // Enable debug logger
54
+ DebugLogger.setEnabled(true);
55
+ return new Proxy(service, {
56
+ get(target, prop, receiver) {
57
+ const value = Reflect.get(target, prop, receiver);
58
+ // Only wrap functions
59
+ if (typeof value !== 'function') {
60
+ return value;
61
+ }
62
+ // Return a wrapped function that logs
63
+ return (...args) => {
64
+ const methodName = String(prop);
65
+ const context = `${serviceName}.${methodName}`;
66
+ // Log method entry
67
+ DebugLogger.log('SERVICE', context, 'called', JSON.stringify(args));
68
+ const start = Date.now();
69
+ try {
70
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Proxy applies to unknown method signatures
71
+ const result = value.apply(target, args);
72
+ // Handle async methods (returns Promise)
73
+ if (result instanceof Promise) {
74
+ return result
75
+ .then((resolvedValue) => {
76
+ const duration = Date.now() - start;
77
+ const success = isServiceResult(resolvedValue) ? resolvedValue.success : true;
78
+ DebugLogger.log('SERVICE', context, 'result', `success=${success} duration=${duration}ms`);
79
+ return resolvedValue;
80
+ })
81
+ .catch((error) => {
82
+ const errorMessage = error instanceof Error ? error.message : String(error);
83
+ DebugLogger.log('SERVICE', context, 'error', errorMessage);
84
+ throw error;
85
+ });
86
+ }
87
+ // Handle sync methods
88
+ const duration = Date.now() - start;
89
+ const success = isServiceResult(result) ? result.success : true;
90
+ DebugLogger.log('SERVICE', context, 'result', `success=${success} duration=${duration}ms`);
91
+ return result;
92
+ }
93
+ catch (error) {
94
+ const errorMessage = error instanceof Error ? error.message : String(error);
95
+ DebugLogger.log('SERVICE', context, 'error', errorMessage);
96
+ throw error;
97
+ }
98
+ };
99
+ },
100
+ });
101
+ }
102
+ //# sourceMappingURL=service-debug-proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-debug-proxy.js","sourceRoot":"","sources":["../../src/debug/service-debug-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,SAAS,IAAI,KAAK;QAClB,OAAQ,KAA8B,CAAC,OAAO,KAAK,SAAS,CAC7D,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,uBAAuB,CAAmB,OAAU,EAAE,WAAmB,EAAE,KAAe;IACxG,wDAAwD;IACxD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,sBAAsB;IACtB,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7B,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;QACxB,GAAG,CAAC,MAAS,EAAE,IAAqB,EAAE,QAAiB;YACrD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAElD,sBAAsB;YACtB,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC;YACf,CAAC;YAED,sCAAsC;YACtC,OAAO,CAAC,GAAG,IAAe,EAAW,EAAE;gBACrC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;gBAChC,MAAM,OAAO,GAAG,GAAG,WAAW,IAAI,UAAU,EAAE,CAAC;gBAE/C,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBAEpE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBAEzB,IAAI,CAAC;oBACH,iHAAiH;oBACjH,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;oBAEzC,yCAAyC;oBACzC,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;wBAC9B,OAAO,MAAM;6BACV,IAAI,CAAC,CAAC,aAAsB,EAAE,EAAE;4BAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;4BACpC,MAAM,OAAO,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;4BAC9E,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,OAAO,aAAa,QAAQ,IAAI,CAAC,CAAC;4BAC3F,OAAO,aAAa,CAAC;wBACvB,CAAC,CAAC;6BACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;4BACxB,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4BAC5E,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;4BAC3D,MAAM,KAAK,CAAC;wBACd,CAAC,CAAC,CAAC;oBACP,CAAC;oBAED,sBAAsB;oBACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;oBACpC,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;oBAChE,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,OAAO,aAAa,QAAQ,IAAI,CAAC,CAAC;oBAC3F,OAAO,MAAM,CAAC;gBAChB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC5E,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;oBAC3D,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Hook } from '@oclif/core';
2
+ /**
3
+ * Prerun hook that enables debug logging when --debug flag is present.
4
+ *
5
+ * This hook runs after command resolution but before run() execution. Since
6
+ * oclif has already instantiated the command and will execute the original
7
+ * run() method, we enable the DebugLogger globally so that SERVICE and
8
+ * ADAPTER layers produce debug output.
9
+ *
10
+ * Architecture:
11
+ * - Checks for --debug flag in argv
12
+ * - Enables DebugLogger globally
13
+ * - SERVICE and ADAPTER layers check DebugLogger.isEnabled()
14
+ * - Zero overhead when --debug flag is not present
15
+ *
16
+ * Note: CLI-layer command logging (flags, timing) would require a base command
17
+ * class or command-level changes. This implementation focuses on enabling
18
+ * SERVICE → ADAPTER debug output which is the primary use case.
19
+ *
20
+ * @see src/debug/debug-logger.ts
21
+ * @see src/debug/service-debug-proxy.ts
22
+ * @see src/adapters/connection-facade.ts (createDebugConnectionFacade)
23
+ */
24
+ declare const hook: Hook.Prerun;
25
+ export default hook;
@@ -0,0 +1,47 @@
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/debug-logger.js';
9
+ /**
10
+ * Prerun hook that enables debug logging when --debug flag is present.
11
+ *
12
+ * This hook runs after command resolution but before run() execution. Since
13
+ * oclif has already instantiated the command and will execute the original
14
+ * run() method, we enable the DebugLogger globally so that SERVICE and
15
+ * ADAPTER layers produce debug output.
16
+ *
17
+ * Architecture:
18
+ * - Checks for --debug flag in argv
19
+ * - Enables DebugLogger globally
20
+ * - SERVICE and ADAPTER layers check DebugLogger.isEnabled()
21
+ * - Zero overhead when --debug flag is not present
22
+ *
23
+ * Note: CLI-layer command logging (flags, timing) would require a base command
24
+ * class or command-level changes. This implementation focuses on enabling
25
+ * SERVICE → ADAPTER debug output which is the primary use case.
26
+ *
27
+ * @see src/debug/debug-logger.ts
28
+ * @see src/debug/service-debug-proxy.ts
29
+ * @see src/adapters/connection-facade.ts (createDebugConnectionFacade)
30
+ */
31
+ // eslint-disable-next-line @typescript-eslint/require-await -- Hook.Prerun type requires async
32
+ const hook = async function (options) {
33
+ // Check if --debug flag is present in argv
34
+ const debugEnabled = options.argv?.includes('--debug') ?? false;
35
+ if (!debugEnabled) {
36
+ // No debug flag - return early (zero overhead)
37
+ return;
38
+ }
39
+ // Enable debug logger globally
40
+ DebugLogger.setEnabled(true);
41
+ // Get command name for logging
42
+ const commandName = options.Command.id ?? 'unknown';
43
+ // Log that debug mode is enabled
44
+ DebugLogger.log('CLI', commandName, 'debug', 'enabled via --debug flag');
45
+ };
46
+ export default hook;
47
+ //# sourceMappingURL=prerun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,+FAA+F;AAC/F,MAAM,IAAI,GAAgB,KAAK,WAAW,OAAO;IAC/C,2CAA2C;IAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC;IAEhE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,+CAA+C;QAC/C,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7B,+BAA+B;IAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,SAAS,CAAC;IAEpD,iCAAiC;IACjC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { Connection } from '@salesforce/core';
2
+ import { type IConnectionFacade } from '../../adapters/connection-facade.js';
3
+ import { type ISoqlQueryAdapter } from '../../adapters/soql/soql-query-adapter.js';
4
+ import { type IRestApiAdapter } from '../../adapters/rest/rest-api-adapter.js';
5
+ import { type IToolingApiAdapter } from '../../adapters/tooling/tooling-api-adapter.js';
6
+ /**
7
+ * Session-scoped adapter set shared across MCP tool invocations.
8
+ *
9
+ * Constructed once in `createMcpServer()` and closed over by all tool handlers.
10
+ * This allows LRU caches (e.g., RestApiAdapter's describe cache) to persist
11
+ * across paginated calls within a single MCP session.
12
+ */
13
+ export type McpAdapters = {
14
+ /** Raw Salesforce connection (for handlers that need direct access, e.g., SFDMUService) */
15
+ readonly connection: Connection;
16
+ /** Shared connection facade (for services that need identity, instanceUrl, etc.) */
17
+ readonly facade: IConnectionFacade;
18
+ readonly soql: ISoqlQueryAdapter;
19
+ readonly rest: IRestApiAdapter;
20
+ readonly tooling: IToolingApiAdapter;
21
+ };
22
+ /**
23
+ * MCP Server configuration.
24
+ */
25
+ export type McpServerConfig = {
26
+ /** Server name for identification */
27
+ readonly name: string;
28
+ /** Server version (matches plugin version) */
29
+ readonly version: string;
30
+ /** Target org connection string */
31
+ readonly targetOrg: string;
32
+ /** Optional API version override */
33
+ readonly apiVersion?: string;
34
+ /** Enable debug logging */
35
+ readonly debug?: boolean;
36
+ };
37
+ /**
38
+ * Creates default MCP server configuration.
39
+ *
40
+ * @param targetOrg - Target Salesforce org alias or username
41
+ * @param apiVersion - Optional API version override
42
+ * @param debug - Enable debug logging
43
+ * @returns MCP server configuration
44
+ */
45
+ export declare function createMcpConfig(targetOrg: string, apiVersion?: string, debug?: boolean): McpServerConfig;
46
+ /**
47
+ * Creates the MCP adapter stack from a Salesforce connection.
48
+ *
49
+ * Single source of truth for MCP adapter instantiation. Used by both
50
+ * `createMcpServer()` (session-scoped) and `invokeTool()` (per-call).
51
+ *
52
+ * @param connection - Raw Salesforce connection
53
+ * @returns MCP adapter set with connection, facade, and all three adapters
54
+ */
55
+ export declare function createMcpAdapters(connection: Connection): McpAdapters;
@@ -0,0 +1,51 @@
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 { createRequire } from 'node:module';
9
+ import { createConnectionFacade } from '../../adapters/connection-facade.js';
10
+ import { SoqlQueryAdapter } from '../../adapters/soql/soql-query-adapter.js';
11
+ import { RestApiAdapter } from '../../adapters/rest/rest-api-adapter.js';
12
+ import { ToolingApiAdapter } from '../../adapters/tooling/tooling-api-adapter.js';
13
+ const require = createRequire(import.meta.url);
14
+ const { version: PLUGIN_VERSION } = require('../../../package.json');
15
+ /**
16
+ * Creates default MCP server configuration.
17
+ *
18
+ * @param targetOrg - Target Salesforce org alias or username
19
+ * @param apiVersion - Optional API version override
20
+ * @param debug - Enable debug logging
21
+ * @returns MCP server configuration
22
+ */
23
+ export function createMcpConfig(targetOrg, apiVersion, debug) {
24
+ return {
25
+ name: 'cuneiform',
26
+ version: PLUGIN_VERSION,
27
+ targetOrg,
28
+ apiVersion,
29
+ debug: debug ?? false,
30
+ };
31
+ }
32
+ /**
33
+ * Creates the MCP adapter stack from a Salesforce connection.
34
+ *
35
+ * Single source of truth for MCP adapter instantiation. Used by both
36
+ * `createMcpServer()` (session-scoped) and `invokeTool()` (per-call).
37
+ *
38
+ * @param connection - Raw Salesforce connection
39
+ * @returns MCP adapter set with connection, facade, and all three adapters
40
+ */
41
+ export function createMcpAdapters(connection) {
42
+ const facade = createConnectionFacade(connection);
43
+ return {
44
+ connection,
45
+ facade,
46
+ soql: new SoqlQueryAdapter(facade),
47
+ rest: new RestApiAdapter(facade),
48
+ tooling: new ToolingApiAdapter(facade),
49
+ };
50
+ }
51
+ //# sourceMappingURL=mcp-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-config.js","sourceRoot":"","sources":["../../../src/mcp/config/mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAA0B,MAAM,qCAAqC,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAA0B,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,cAAc,EAAwB,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAA2B,MAAM,+CAA+C,CAAC;AAE3G,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAwB,CAAC;AAuC5F;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,UAAmB,EAAE,KAAe;IACrF,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;QACvB,SAAS;QACT,UAAU;QACV,KAAK,EAAE,KAAK,IAAI,KAAK;KACtB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,MAAM,MAAM,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAClD,OAAO;QACL,UAAU;QACV,MAAM;QACN,IAAI,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC;QAClC,IAAI,EAAE,IAAI,cAAc,CAAC,MAAM,CAAC;QAChC,OAAO,EAAE,IAAI,iBAAiB,CAAC,MAAM,CAAC;KACvC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Pagination infrastructure for MCP tool responses.
3
+ *
4
+ * Provides cursor-based pagination with server-side page size clamping
5
+ * to keep responses within LLM context budgets (~5 KB per response).
6
+ */
7
+ /**
8
+ * Page size defaults and maximums for each paginated resource type.
9
+ */
10
+ export declare const PAGE_SIZE_DEFAULTS: {
11
+ readonly OBJECT_LIST: {
12
+ readonly default: 25;
13
+ readonly max: 50;
14
+ };
15
+ readonly FIELD_LIST: {
16
+ readonly default: 25;
17
+ readonly max: 50;
18
+ };
19
+ readonly RELATIONSHIP_LIST: {
20
+ readonly default: 10;
21
+ readonly max: 25;
22
+ };
23
+ readonly NAMESPACE_LIST: {
24
+ readonly default: 10;
25
+ readonly max: 25;
26
+ };
27
+ readonly RECORD_TYPE_LIST: {
28
+ readonly default: 10;
29
+ readonly max: 25;
30
+ };
31
+ };
32
+ /**
33
+ * Metadata included in every paginated response envelope.
34
+ */
35
+ export type PaginationMetadata = {
36
+ /** Number of items returned in this page */
37
+ readonly returned: number;
38
+ /** Total number of items across all pages */
39
+ readonly total: number;
40
+ /** Whether more items are available */
41
+ readonly hasMore: boolean;
42
+ /** Opaque cursor to pass for the next page (undefined on last page) */
43
+ readonly nextCursor?: string;
44
+ /** Items per page used for this response */
45
+ readonly pageSize: number;
46
+ /** Human-readable pagination status message */
47
+ readonly message: string;
48
+ };
49
+ /**
50
+ * Encodes a numeric offset into an opaque base64 cursor string.
51
+ *
52
+ * @param offset - The zero-based offset to encode
53
+ * @returns Opaque cursor string
54
+ */
55
+ export declare function encodeCursor(offset: number): string;
56
+ /**
57
+ * Decodes an opaque cursor string back to a numeric offset.
58
+ *
59
+ * Returns 0 for undefined or empty cursors (start from beginning).
60
+ * Throws for malformed cursors to prevent silent pagination loops.
61
+ *
62
+ * @param cursor - Opaque cursor string from a previous response
63
+ * @returns The decoded offset, or 0 if cursor is undefined/empty
64
+ * @throws Error if the cursor is present but malformed
65
+ */
66
+ export declare function decodeCursor(cursor: string | undefined): number;
67
+ /**
68
+ * Clamps a requested page size to within [1, max], defaulting if undefined.
69
+ *
70
+ * @param requested - The page size requested by the client (may be undefined)
71
+ * @param defaultSize - Default page size when not specified
72
+ * @param maxSize - Maximum allowed page size
73
+ * @returns Clamped page size
74
+ */
75
+ export declare function clampPageSize(requested: number | undefined, defaultSize: number, maxSize: number): number;
76
+ /**
77
+ * Input parameters for creating pagination metadata.
78
+ */
79
+ type PaginationMetadataInput = {
80
+ /** Current offset (start of this page) */
81
+ readonly offset: number;
82
+ /** Page size used for this response */
83
+ readonly pageSize: number;
84
+ /** Total number of items across all pages */
85
+ readonly totalItems: number;
86
+ /** Actual number of items returned in this page */
87
+ readonly returnedItems: number;
88
+ };
89
+ /**
90
+ * Creates pagination metadata for a response envelope.
91
+ *
92
+ * @param input - Pagination parameters
93
+ * @returns Pagination metadata with cursor and status message
94
+ */
95
+ export declare function createPaginationMetadata(input: PaginationMetadataInput): PaginationMetadata;
96
+ export {};