@transcend-io/cli 8.0.6 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +74 -1
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-NAGRUVXK.cjs → chunk-2STE3YIZ.cjs} +2 -2
  6. package/dist/{chunk-NAGRUVXK.cjs.map → chunk-2STE3YIZ.cjs.map} +1 -1
  7. package/dist/{chunk-DCBE53LG.cjs → chunk-4B22XVLO.cjs} +3 -3
  8. package/dist/{chunk-DCBE53LG.cjs.map → chunk-4B22XVLO.cjs.map} +1 -1
  9. package/dist/{chunk-LPUZGMB6.cjs → chunk-63GGJ2XI.cjs} +4 -4
  10. package/dist/{chunk-LPUZGMB6.cjs.map → chunk-63GGJ2XI.cjs.map} +1 -1
  11. package/dist/{chunk-DTGC4M5U.cjs → chunk-AMP7MT7M.cjs} +2 -2
  12. package/dist/{chunk-DTGC4M5U.cjs.map → chunk-AMP7MT7M.cjs.map} +1 -1
  13. package/dist/{chunk-YMH24XQT.cjs → chunk-FM3LX7FQ.cjs} +22 -20
  14. package/dist/chunk-FM3LX7FQ.cjs.map +1 -0
  15. package/dist/{chunk-MFIMY5RY.cjs → chunk-GRBF73LS.cjs} +2 -2
  16. package/dist/{chunk-MFIMY5RY.cjs.map → chunk-GRBF73LS.cjs.map} +1 -1
  17. package/dist/{chunk-JZEDU4GZ.cjs → chunk-MKLPDKJQ.cjs} +2 -2
  18. package/dist/{chunk-JZEDU4GZ.cjs.map → chunk-MKLPDKJQ.cjs.map} +1 -1
  19. package/dist/{chunk-KU3UCRAF.cjs → chunk-MRJ2BRU4.cjs} +2 -2
  20. package/dist/{chunk-KU3UCRAF.cjs.map → chunk-MRJ2BRU4.cjs.map} +1 -1
  21. package/dist/{chunk-OKLX7XKW.cjs → chunk-PVQIV735.cjs} +2 -2
  22. package/dist/{chunk-OKLX7XKW.cjs.map → chunk-PVQIV735.cjs.map} +1 -1
  23. package/dist/{chunk-IU4E6MQW.cjs → chunk-QRBSG22E.cjs} +2 -2
  24. package/dist/{chunk-IU4E6MQW.cjs.map → chunk-QRBSG22E.cjs.map} +1 -1
  25. package/dist/{chunk-5Y7FIOUT.cjs → chunk-YCB6J5EJ.cjs} +2 -2
  26. package/dist/{chunk-5Y7FIOUT.cjs.map → chunk-YCB6J5EJ.cjs.map} +1 -1
  27. package/dist/chunk-ZVE6Y6D3.cjs +2920 -0
  28. package/dist/{chunk-7O5DWH3M.cjs.map → chunk-ZVE6Y6D3.cjs.map} +1 -1
  29. package/dist/{impl-LAYRDHOS.cjs → impl-2QMFSSRH.cjs} +2 -2
  30. package/dist/{impl-LAYRDHOS.cjs.map → impl-2QMFSSRH.cjs.map} +1 -1
  31. package/dist/{impl-5VNZMRQP.cjs → impl-47CZEYNP.cjs} +2 -2
  32. package/dist/{impl-5VNZMRQP.cjs.map → impl-47CZEYNP.cjs.map} +1 -1
  33. package/dist/{impl-DUKSVNOM.cjs → impl-4VTKQJRY.cjs} +2 -2
  34. package/dist/{impl-DUKSVNOM.cjs.map → impl-4VTKQJRY.cjs.map} +1 -1
  35. package/dist/{impl-3JDGUUXS.cjs → impl-6RBT5EJC.cjs} +2 -2
  36. package/dist/{impl-3JDGUUXS.cjs.map → impl-6RBT5EJC.cjs.map} +1 -1
  37. package/dist/{impl-ZZL5FMCH.cjs → impl-76NYSLL3.cjs} +3 -3
  38. package/dist/{impl-ZZL5FMCH.cjs.map → impl-76NYSLL3.cjs.map} +1 -1
  39. package/dist/{impl-LWPYKGCZ.cjs → impl-7SHEZUAI.cjs} +2 -2
  40. package/dist/{impl-LWPYKGCZ.cjs.map → impl-7SHEZUAI.cjs.map} +1 -1
  41. package/dist/{impl-WCRE3QMZ.cjs → impl-AKBOHO2I.cjs} +2 -2
  42. package/dist/{impl-WCRE3QMZ.cjs.map → impl-AKBOHO2I.cjs.map} +1 -1
  43. package/dist/{impl-EJMVBV6T.cjs → impl-AOB56N6K.cjs} +2 -2
  44. package/dist/{impl-EJMVBV6T.cjs.map → impl-AOB56N6K.cjs.map} +1 -1
  45. package/dist/{impl-JA34WWJ5.cjs → impl-BCEZUJCK.cjs} +2 -2
  46. package/dist/{impl-JA34WWJ5.cjs.map → impl-BCEZUJCK.cjs.map} +1 -1
  47. package/dist/{impl-OMOQK2HQ.cjs → impl-BJU7SNUT.cjs} +6 -6
  48. package/dist/{impl-OMOQK2HQ.cjs.map → impl-BJU7SNUT.cjs.map} +1 -1
  49. package/dist/{impl-VZDR2CDX.cjs → impl-C3ZNAX3B.cjs} +2 -2
  50. package/dist/{impl-VZDR2CDX.cjs.map → impl-C3ZNAX3B.cjs.map} +1 -1
  51. package/dist/{impl-7U3M4RGF.cjs → impl-DZDGMNPH.cjs} +2 -2
  52. package/dist/{impl-7U3M4RGF.cjs.map → impl-DZDGMNPH.cjs.map} +1 -1
  53. package/dist/{impl-SZM2IXSY.cjs → impl-FGUGKHTG.cjs} +3 -3
  54. package/dist/{impl-SZM2IXSY.cjs.map → impl-FGUGKHTG.cjs.map} +1 -1
  55. package/dist/{impl-5IVCXXAL.cjs → impl-G2TM3DQW.cjs} +2 -2
  56. package/dist/{impl-5IVCXXAL.cjs.map → impl-G2TM3DQW.cjs.map} +1 -1
  57. package/dist/{impl-B3OMYCGQ.cjs → impl-GGV7EW55.cjs} +2 -2
  58. package/dist/{impl-B3OMYCGQ.cjs.map → impl-GGV7EW55.cjs.map} +1 -1
  59. package/dist/{impl-IN2PQA3H.cjs → impl-GTZ6RYJB.cjs} +2 -2
  60. package/dist/{impl-IN2PQA3H.cjs.map → impl-GTZ6RYJB.cjs.map} +1 -1
  61. package/dist/{impl-7JEVVESR.cjs → impl-IEDZ4YTQ.cjs} +2 -2
  62. package/dist/{impl-7JEVVESR.cjs.map → impl-IEDZ4YTQ.cjs.map} +1 -1
  63. package/dist/{impl-SVLQQPHG.cjs → impl-IHKKGU4K.cjs} +2 -2
  64. package/dist/{impl-SVLQQPHG.cjs.map → impl-IHKKGU4K.cjs.map} +1 -1
  65. package/dist/{impl-TVRDO556.cjs → impl-ITID6Y4N.cjs} +2 -2
  66. package/dist/{impl-TVRDO556.cjs.map → impl-ITID6Y4N.cjs.map} +1 -1
  67. package/dist/{impl-LO7NADSE.cjs → impl-K2ZOFSCD.cjs} +2 -2
  68. package/dist/{impl-LO7NADSE.cjs.map → impl-K2ZOFSCD.cjs.map} +1 -1
  69. package/dist/{impl-4WFQNFXM.cjs → impl-K4D7ATKB.cjs} +2 -2
  70. package/dist/{impl-4WFQNFXM.cjs.map → impl-K4D7ATKB.cjs.map} +1 -1
  71. package/dist/{impl-TEADN2ZL.cjs → impl-KGA7YWGV.cjs} +5 -5
  72. package/dist/{impl-TEADN2ZL.cjs.map → impl-KGA7YWGV.cjs.map} +1 -1
  73. package/dist/{impl-ZXCX5CQQ.cjs → impl-KQET2XDP.cjs} +2 -2
  74. package/dist/{impl-ZXCX5CQQ.cjs.map → impl-KQET2XDP.cjs.map} +1 -1
  75. package/dist/impl-LLM4EEIP.cjs +2 -0
  76. package/dist/{impl-IKL2VVT5.cjs.map → impl-LLM4EEIP.cjs.map} +1 -1
  77. package/dist/{impl-VRTPR7ZC.cjs → impl-MZWGXBZH.cjs} +2 -2
  78. package/dist/{impl-VRTPR7ZC.cjs.map → impl-MZWGXBZH.cjs.map} +1 -1
  79. package/dist/impl-NZIDPNPS.cjs +2 -0
  80. package/dist/{impl-Z3TEIP7I.cjs.map → impl-NZIDPNPS.cjs.map} +1 -1
  81. package/dist/{impl-MLVIXJWF.cjs → impl-OK6NKAWI.cjs} +2 -2
  82. package/dist/{impl-MLVIXJWF.cjs.map → impl-OK6NKAWI.cjs.map} +1 -1
  83. package/dist/{impl-2XFKDVXC.cjs → impl-PFVHMRSW.cjs} +2 -2
  84. package/dist/{impl-2XFKDVXC.cjs.map → impl-PFVHMRSW.cjs.map} +1 -1
  85. package/dist/{impl-OZ6XHZRW.cjs → impl-QF3LYRIM.cjs} +2 -2
  86. package/dist/{impl-OZ6XHZRW.cjs.map → impl-QF3LYRIM.cjs.map} +1 -1
  87. package/dist/{impl-S3QSYERT.cjs → impl-RTPMOLO6.cjs} +2 -2
  88. package/dist/{impl-S3QSYERT.cjs.map → impl-RTPMOLO6.cjs.map} +1 -1
  89. package/dist/{impl-YYLZH24L.cjs → impl-SKFVDXWS.cjs} +4 -4
  90. package/dist/{impl-YYLZH24L.cjs.map → impl-SKFVDXWS.cjs.map} +1 -1
  91. package/dist/{impl-DGMMPU6J.cjs → impl-T3BWUKPN.cjs} +2 -2
  92. package/dist/{impl-DGMMPU6J.cjs.map → impl-T3BWUKPN.cjs.map} +1 -1
  93. package/dist/{impl-22FRQBKA.cjs → impl-U6S7JMJK.cjs} +2 -2
  94. package/dist/{impl-22FRQBKA.cjs.map → impl-U6S7JMJK.cjs.map} +1 -1
  95. package/dist/impl-UKSTSUL7.cjs +2 -0
  96. package/dist/{impl-XXGHYIS2.cjs.map → impl-UKSTSUL7.cjs.map} +1 -1
  97. package/dist/impl-WQDLUVZ6.cjs +38 -0
  98. package/dist/impl-WQDLUVZ6.cjs.map +1 -0
  99. package/dist/{impl-ZY3HLGMV.cjs → impl-XZOJGVZ7.cjs} +2 -2
  100. package/dist/{impl-ZY3HLGMV.cjs.map → impl-XZOJGVZ7.cjs.map} +1 -1
  101. package/dist/{impl-GNNZ6ISS.cjs → impl-Y7C42SDM.cjs} +2 -2
  102. package/dist/{impl-GNNZ6ISS.cjs.map → impl-Y7C42SDM.cjs.map} +1 -1
  103. package/dist/{impl-I6ETF7X7.cjs → impl-YVMZ7QMB.cjs} +2 -2
  104. package/dist/{impl-I6ETF7X7.cjs.map → impl-YVMZ7QMB.cjs.map} +1 -1
  105. package/dist/{impl-2WH2UTIZ.cjs → impl-ZA25XTRE.cjs} +2 -2
  106. package/dist/{impl-2WH2UTIZ.cjs.map → impl-ZA25XTRE.cjs.map} +1 -1
  107. package/dist/{impl-X7QVQTTU.cjs → impl-ZH4AWDRT.cjs} +2 -2
  108. package/dist/{impl-X7QVQTTU.cjs.map → impl-ZH4AWDRT.cjs.map} +1 -1
  109. package/dist/index.cjs +3 -3
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.d.cts +447 -429
  112. package/package.json +1 -1
  113. package/dist/chunk-7O5DWH3M.cjs +0 -2920
  114. package/dist/chunk-YMH24XQT.cjs.map +0 -1
  115. package/dist/impl-IKL2VVT5.cjs +0 -2
  116. package/dist/impl-XXGHYIS2.cjs +0 -2
  117. package/dist/impl-Z3TEIP7I.cjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-I6ETF7X7.cjs","../src/commands/request/approve/impl.ts"],"names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","doneInputValidation","approvePrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBL,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,cAAA,CAAgBE,CAAAA,CAChB,WAAA,CAAAK,CAAAA,CACA,gBAAA,CAAAJ,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-I6ETF7X7.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YVMZ7QMB.cjs","../src/commands/request/approve/impl.ts"],"names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","doneInputValidation","approvePrivacyRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCiBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,YAAA,CAAAH,CAAAA,CACA,cAAA,CAAgBL,CAAAA,CAChB,IAAA,CAAAD,CAAAA,CACA,cAAA,CAAgBE,CAAAA,CAChB,WAAA,CAAAK,CAAAA,CACA,gBAAA,CAAAJ,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-YVMZ7QMB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkKU3UCRAFcjs = require('./chunk-KU3UCRAF.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-7O5DWH3M.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMFIMY5RYcjs = require('./chunk-MFIMY5RY.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function A({file:u,transcendUrl:c,auth:g,sombraAuth:v,dataSiloId:b,actions:C,pageLimit:r,skipRequestCount:n,chunkSize:e}){n&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(e)||e<=0||e%r!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${e}". Must be a positive integer that is a multiple of ${r}.`)),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{baseName:h,extension:I}=_chunkLR3CPNDMcjs.d.call(void 0, u),a=0;await _chunkKU3UCRAFcjs.g.call(void 0, {transcendUrl:c,apiPageSize:r,savePageSize:e,onSave:i=>{let s=`${h}-${a}${I}`;_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Saving ${i.length} identifiers to file "${s}"`));let $=_chunkMFIMY5RYcjs.j.call(void 0, i.map(x=>Object.keys(x)).flat());return _chunkLR3CPNDMcjs.c.call(void 0, s,i,$),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} identifiers to file "${s}"`)),a+=1,Promise.resolve()},actions:C,auth:g,sombraAuth:v,dataSiloId:b,skipRequestCount:n})}exports.pullIdentifiers = A;
2
- //# sourceMappingURL=impl-2WH2UTIZ.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMRJ2BRU4cjs = require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function A({file:u,transcendUrl:c,auth:g,sombraAuth:v,dataSiloId:b,actions:C,pageLimit:r,skipRequestCount:n,chunkSize:e}){n&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(e)||e<=0||e%r!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${e}". Must be a positive integer that is a multiple of ${r}.`)),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{baseName:h,extension:I}=_chunkLR3CPNDMcjs.d.call(void 0, u),a=0;await _chunkMRJ2BRU4cjs.g.call(void 0, {transcendUrl:c,apiPageSize:r,savePageSize:e,onSave:i=>{let s=`${h}-${a}${I}`;_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Saving ${i.length} identifiers to file "${s}"`));let $=_chunkGRBF73LScjs.j.call(void 0, i.map(x=>Object.keys(x)).flat());return _chunkLR3CPNDMcjs.c.call(void 0, s,i,$),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} identifiers to file "${s}"`)),a+=1,Promise.resolve()},actions:C,auth:g,sombraAuth:v,dataSiloId:b,skipRequestCount:n})}exports.pullIdentifiers = A;
2
+ //# sourceMappingURL=impl-ZA25XTRE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-2WH2UTIZ.cjs","../src/commands/request/cron/pull-identifiers/impl.ts"],"names":["pullIdentifiers","file","transcendUrl","auth","sombraAuth","dataSiloId","actions","pageLimit","skipRequestCount","chunkSize","logger","colors","doneInputValidation","baseName","extension","parseFilePath","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","numberedFileName"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCCvR,MAyBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXD,CAAAA,EACFE,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYF,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BG,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDF,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBK,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAM,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC9CC,CAAAA,CAAY,CAAA,CAsBhB,MAAMC,iCAAAA,CACJ,YAAA,CAAAf,CAAAA,CACA,WAAA,CAAaK,CAAAA,CACb,YAAA,CAAcE,CAAAA,CACd,MAAA,CAxBcS,CAAAA,EAAmD,CACjE,IAAMC,CAAAA,CAAmB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-2WH2UTIZ.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../../logger';\nimport { uniq } from 'lodash-es';\nimport {\n CsvFormattedIdentifier,\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n} from '../../../../lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullIdentifiersCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n actions: RequestAction[];\n pageLimit: number;\n skipRequestCount: boolean;\n chunkSize: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n actions,\n pageLimit,\n skipRequestCount,\n chunkSize,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n logger.info(\n colors.blue(\n `Saving ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n fileCount += 1;\n return Promise.resolve();\n };\n\n // Pull down outstanding identifiers\n await pullChunkedCustomSiloOutstandingIdentifiers({\n transcendUrl,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n actions,\n auth,\n sombraAuth,\n dataSiloId,\n skipRequestCount,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ZA25XTRE.cjs","../src/commands/request/cron/pull-identifiers/impl.ts"],"names":["pullIdentifiers","file","transcendUrl","auth","sombraAuth","dataSiloId","actions","pageLimit","skipRequestCount","chunkSize","logger","colors","doneInputValidation","baseName","extension","parseFilePath","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","numberedFileName"],"mappings":"AAAA,iOAAwC,wDAAgD,wDAAyC,gCAA6B,gCAA6B,wDAAyC,wDAAyC,gCAA6B,gFCCvR,MAyBnB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXD,CAAAA,EACFE,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYF,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BG,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDF,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBK,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,GAAM,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC9CC,CAAAA,CAAY,CAAA,CAsBhB,MAAMC,iCAAAA,CACJ,YAAA,CAAAf,CAAAA,CACA,WAAA,CAAaK,CAAAA,CACb,YAAA,CAAcE,CAAAA,CACd,MAAA,CAxBcS,CAAAA,EAAmD,CACjE,IAAMC,CAAAA,CAAmB,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/impl-ZA25XTRE.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\n\nimport { logger } from '../../../../logger';\nimport { uniq } from 'lodash-es';\nimport {\n CsvFormattedIdentifier,\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n} from '../../../../lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullIdentifiersCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n actions: RequestAction[];\n pageLimit: number;\n skipRequestCount: boolean;\n chunkSize: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n actions,\n pageLimit,\n skipRequestCount,\n chunkSize,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n logger.info(\n colors.blue(\n `Saving ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n fileCount += 1;\n return Promise.resolve();\n };\n\n // Pull down outstanding identifiers\n await pullChunkedCustomSiloOutstandingIdentifiers({\n transcendUrl,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n actions,\n auth,\n sombraAuth,\n dataSiloId,\n skipRequestCount,\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk7O5DWH3Mcjs = require('./chunk-7O5DWH3M.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-MFIMY5RY.cjs');require('./chunk-Q7I37FJV.cjs');async function c({auth:o,dataSiloId:a,actions:r,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk7O5DWH3Mcjs.Gf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
- //# sourceMappingURL=impl-X7QVQTTU.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-GRBF73LS.cjs');require('./chunk-Q7I37FJV.cjs');async function c({auth:o,dataSiloId:a,actions:r,transcendUrl:s}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkZVE6Y6D3cjs.Hf.call(void 0, {requestActions:r,transcendUrl:s,auth:o,dataSiloId:a})}exports.retryRequestDataSilos = c;
2
+ //# sourceMappingURL=impl-ZH4AWDRT.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-X7QVQTTU.cjs","../src/commands/request/system/retry-request-data-silos/impl.ts"],"names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAML,kCAAAA,CACJ,cAAA,CAAgBG,CAAAA,CAChB,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,kCAAA","file":"/home/runner/work/cli/cli/dist/impl-X7QVQTTU.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ZH4AWDRT.cjs","../src/commands/request/system/retry-request-data-silos/impl.ts"],"names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCYtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAML,kCAAAA,CACJ,cAAA,CAAgBG,CAAAA,CAChB,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,kCAAA","file":"/home/runner/work/cli/cli/dist/impl-ZH4AWDRT.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunkNAGRUVXKcjs = require('./chunk-NAGRUVXK.cjs');var _chunkLPUZGMB6cjs = require('./chunk-LPUZGMB6.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkOKLX7XKWcjs = require('./chunk-OKLX7XKW.cjs');var _chunkKU3UCRAFcjs = require('./chunk-KU3UCRAF.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkDCBE53LGcjs = require('./chunk-DCBE53LG.cjs');var _chunkJZEDU4GZcjs = require('./chunk-JZEDU4GZ.cjs');var _chunkQEM6S2W7cjs = require('./chunk-QEM6S2W7.cjs');var _chunk7O5DWH3Mcjs = require('./chunk-7O5DWH3M.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkMFIMY5RYcjs = require('./chunk-MFIMY5RY.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunk7O5DWH3Mcjs.Wf.call(void 0, a,_chunk7O5DWH3Mcjs.Fb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Sm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkMFIMY5RYcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunk7O5DWH3Mcjs.vc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkMFIMY5RYcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunk7O5DWH3Mcjs.yd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunk7O5DWH3Mcjs.Fc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkMFIMY5RYcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkMFIMY5RYcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkMFIMY5RYcjs.e.call(void 0, o.prompts,"title"),c=_chunkMFIMY5RYcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunk7O5DWH3Mcjs.Fc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunk7O5DWH3Mcjs.zd.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkMFIMY5RYcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkMFIMY5RYcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunk7O5DWH3Mcjs.Fc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunk7O5DWH3Mcjs.Dc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunk7O5DWH3Mcjs.ae.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunk7O5DWH3Mcjs.ae.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunk7O5DWH3Mcjs.ae.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Bm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Qm(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function Vm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk2STE3YIZcjs = require('./chunk-2STE3YIZ.cjs');var _chunk63GGJ2XIcjs = require('./chunk-63GGJ2XI.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkMRJ2BRU4cjs = require('./chunk-MRJ2BRU4.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunk4B22XVLOcjs = require('./chunk-4B22XVLO.cjs');var _chunkMKLPDKJQcjs = require('./chunk-MKLPDKJQ.cjs');var _chunkPVQIV735cjs = require('./chunk-PVQIV735.cjs');var _chunkQEM6S2W7cjs = require('./chunk-QEM6S2W7.cjs');var _chunkZVE6Y6D3cjs = require('./chunk-ZVE6Y6D3.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkGRBF73LScjs = require('./chunk-GRBF73LS.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkZVE6Y6D3cjs.Xf.call(void 0, a,_chunkZVE6Y6D3cjs.Fb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Bm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkGRBF73LScjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkZVE6Y6D3cjs.vc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkGRBF73LScjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkZVE6Y6D3cjs.zd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunkZVE6Y6D3cjs.Fc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkGRBF73LScjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkGRBF73LScjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkGRBF73LScjs.e.call(void 0, o.prompts,"title"),c=_chunkGRBF73LScjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkZVE6Y6D3cjs.Fc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkZVE6Y6D3cjs.Ad.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkGRBF73LScjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkGRBF73LScjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunkZVE6Y6D3cjs.Fc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkZVE6Y6D3cjs.Dc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkZVE6Y6D3cjs.be.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkZVE6Y6D3cjs.be.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkZVE6Y6D3cjs.be.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Qm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Um(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function vm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
2
2
  `)[0],i=_child_process.execSync.call(void 0, "git rev-parse HEAD",{encoding:"utf-8"}).split(`
3
- `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkMFIMY5RYcjs.c.call(void 0, p.split(`
4
- `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunk7O5DWH3Mcjs.tb; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunk7O5DWH3Mcjs.Ga; exports.ADD_SILO_DISCOVERY_RESULTS = _chunk7O5DWH3Mcjs.G; exports.ADMIN_DASH = _chunkMFIMY5RYcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkMFIMY5RYcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkMFIMY5RYcjs.p; exports.AGENTS = _chunk7O5DWH3Mcjs.Gb; exports.AGENT_FILES = _chunk7O5DWH3Mcjs.Jb; exports.AGENT_FUNCTIONS = _chunk7O5DWH3Mcjs.Mb; exports.API_KEYS = _chunk7O5DWH3Mcjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunk7O5DWH3Mcjs.W; exports.ASSESSMENTS = _chunk7O5DWH3Mcjs.ea; exports.ASSESSMENT_SECTION_FIELDS = _chunk7O5DWH3Mcjs.da; exports.ASSESSMENT_TEMPLATES = _chunk7O5DWH3Mcjs.ia; exports.ASSUME_ROLE = _chunk7O5DWH3Mcjs.Eb; exports.ATTRIBUTES = _chunk7O5DWH3Mcjs.Ka; exports.ATTRIBUTE_KEYS_REQUESTS = _chunk7O5DWH3Mcjs.L; exports.ATTRIBUTE_VALUES = _chunk7O5DWH3Mcjs.Oa; exports.ActionInput = _chunkQEM6S2W7cjs.G; exports.ActionItemCollectionInput = _chunkQEM6S2W7cjs.R; exports.ActionItemInput = _chunkQEM6S2W7cjs.S; exports.AgentFileInput = _chunkQEM6S2W7cjs.o; exports.AgentFunctionInput = _chunkQEM6S2W7cjs.n; exports.AgentInput = _chunkQEM6S2W7cjs.m; exports.ApiKeyInput = _chunkQEM6S2W7cjs.c; exports.AssessmentAction = _chunk7O5DWH3Mcjs.Kd; exports.AssessmentAnswerOptionInput = _chunkQEM6S2W7cjs.Y; exports.AssessmentDisplayLogicInput = _chunkQEM6S2W7cjs.V; exports.AssessmentInput = _chunkQEM6S2W7cjs.ca; exports.AssessmentNestedRule = _chunk7O5DWH3Mcjs.Jd; exports.AssessmentNestedRuleInput = _chunkQEM6S2W7cjs.U; exports.AssessmentResourceInput = _chunkQEM6S2W7cjs.ba; exports.AssessmentRetentionScheduleInput = _chunkQEM6S2W7cjs.$; exports.AssessmentRiskLogic = _chunk7O5DWH3Mcjs.Md; exports.AssessmentRule = _chunk7O5DWH3Mcjs.Id; exports.AssessmentRuleInput = _chunkQEM6S2W7cjs.T; exports.AssessmentSectionInput = _chunkQEM6S2W7cjs._; exports.AssessmentSectionQuestionInput = _chunkQEM6S2W7cjs.Z; exports.AssessmentTemplateInput = _chunkQEM6S2W7cjs.aa; exports.AttestedExtraIdentifiers = _chunk7O5DWH3Mcjs.jf; exports.AttributeInput = _chunkQEM6S2W7cjs.k; exports.AttributePreview = _chunkQEM6S2W7cjs.l; exports.AttributeValueInput = _chunkQEM6S2W7cjs.j; exports.BLANK = _chunk7O5DWH3Mcjs.cc; exports.BULK_APPLY = _chunk7O5DWH3Mcjs.bc; exports.BULK_REQUEST_FILES = _chunk7O5DWH3Mcjs.Ea; exports.BUSINESS_ENTITIES = _chunk7O5DWH3Mcjs.qb; exports.BusinessEntityInput = _chunkQEM6S2W7cjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunk7O5DWH3Mcjs.X; exports.CAN_APPLY_IN_BULK = _chunk7O5DWH3Mcjs.gc; exports.CATALOGS = _chunk7O5DWH3Mcjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunk7O5DWH3Mcjs.ua; exports.CODE_PACKAGES = _chunk7O5DWH3Mcjs.P; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunk7O5DWH3Mcjs.pb; exports.CONSENT_PARTITIONS = _chunk7O5DWH3Mcjs.Ta; exports.COOKIES = _chunk7O5DWH3Mcjs.Ya; exports.CREATE_ACTION_ITEMS = _chunk7O5DWH3Mcjs.xb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunk7O5DWH3Mcjs.Ia; exports.CREATE_AGENT = _chunk7O5DWH3Mcjs.Hb; exports.CREATE_AGENT_FILE = _chunk7O5DWH3Mcjs.Kb; exports.CREATE_AGENT_FUNCTION = _chunk7O5DWH3Mcjs.Nb; exports.CREATE_API_KEY = _chunk7O5DWH3Mcjs.E; exports.CREATE_ATTRIBUTE = _chunk7O5DWH3Mcjs.Pa; exports.CREATE_ATTRIBUTE_VALUES = _chunk7O5DWH3Mcjs.La; exports.CREATE_BUSINESS_ENTITY = _chunk7O5DWH3Mcjs.rb; exports.CREATE_CODE_PACKAGE = _chunk7O5DWH3Mcjs.R; exports.CREATE_CONSENT_EXPERIENCE = _chunk7O5DWH3Mcjs.nb; exports.CREATE_CONSENT_MANAGER = _chunk7O5DWH3Mcjs.ab; exports.CREATE_CONSENT_PARTITION = _chunk7O5DWH3Mcjs.ob; exports.CREATE_DATA_FLOWS = _chunk7O5DWH3Mcjs.Ua; exports.CREATE_DATA_SILOS = _chunk7O5DWH3Mcjs.m; exports.CREATE_DATA_SUBJECT = _chunk7O5DWH3Mcjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunk7O5DWH3Mcjs.Tb; exports.CREATE_ENRICHER = _chunk7O5DWH3Mcjs.p; exports.CREATE_IDENTIFIER = _chunk7O5DWH3Mcjs.u; exports.CREATE_PROCESSING_ACTIVITY = _chunk7O5DWH3Mcjs.Zb; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunk7O5DWH3Mcjs.Wb; exports.CREATE_PROMPT = _chunk7O5DWH3Mcjs.oa; exports.CREATE_PROMPT_GROUP = _chunk7O5DWH3Mcjs.sa; exports.CREATE_PROMPT_PARTIAL = _chunk7O5DWH3Mcjs.qa; exports.CREATE_REPOSITORY = _chunk7O5DWH3Mcjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunk7O5DWH3Mcjs.O; exports.CREATE_TEAM = _chunk7O5DWH3Mcjs.ya; exports.CREATE_TEMPLATE = _chunk7O5DWH3Mcjs.J; exports.CREATE_VENDOR = _chunk7O5DWH3Mcjs.Qb; exports.CachedFileState = _chunk7O5DWH3Mcjs.hc; exports.CachedRequestState = _chunk7O5DWH3Mcjs.jc; exports.CodePackageInput = _chunkQEM6S2W7cjs.D; exports.CodePackageSdk = _chunkQEM6S2W7cjs.C; exports.ColumnName = _chunk7O5DWH3Mcjs.ec; exports.ConsentManageExperienceInput = _chunkQEM6S2W7cjs.K; exports.ConsentManagerInput = _chunkQEM6S2W7cjs.M; exports.ConsentManagerMetricBin = _chunk7O5DWH3Mcjs.Qc; exports.ConsentManagerServiceMetadata = _chunkQEM6S2W7cjs.ka; exports.ConsentPreferenceResponse = _chunkDCBE53LGcjs.i; exports.ConsentPreferenceTopic = _chunkQEM6S2W7cjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkQEM6S2W7cjs.da; exports.ConsentPurpose = _chunkQEM6S2W7cjs.fa; exports.CookieCsvInput = _chunkQEM6S2W7cjs.ja; exports.CookieInput = _chunkQEM6S2W7cjs.J; exports.CronIdentifier = _chunkKU3UCRAFcjs.a; exports.CronIdentifierPush = _chunkKU3UCRAFcjs.c; exports.DATAPOINT_EXPORT = _chunk7O5DWH3Mcjs.g; exports.DATA_FLOWS = _chunk7O5DWH3Mcjs.Xa; exports.DATA_POINTS = _chunk7O5DWH3Mcjs.a; exports.DATA_POINT_COUNT = _chunk7O5DWH3Mcjs.b; exports.DATA_SILOS = _chunk7O5DWH3Mcjs.i; exports.DATA_SILOS_ENRICHED = _chunk7O5DWH3Mcjs.k; exports.DATA_SILO_EXPORT = _chunk7O5DWH3Mcjs.j; exports.DATA_SUBJECTS = _chunk7O5DWH3Mcjs.w; exports.DATA_SUB_CATEGORIES = _chunk7O5DWH3Mcjs.Sb; exports.DEFAULT_TRANSCEND_API = _chunkMFIMY5RYcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkMFIMY5RYcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunk7O5DWH3Mcjs._d; exports.DELETE_API_KEY = _chunk7O5DWH3Mcjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunk7O5DWH3Mcjs.Na; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunk7O5DWH3Mcjs.zb; exports.DEPLOY_CONSENT_MANAGER = _chunk7O5DWH3Mcjs.db; exports.DETERMINE_LOGIN_METHOD = _chunk7O5DWH3Mcjs.Cb; exports.DataCategoryGuessInput = _chunkQEM6S2W7cjs.h; exports.DataCategoryInput = _chunkQEM6S2W7cjs.q; exports.DataCategoryPreviewInput = _chunkQEM6S2W7cjs.g; exports.DataCategoryRecommendationInput = _chunkQEM6S2W7cjs.i; exports.DataFlowCsvInput = _chunkQEM6S2W7cjs.ia; exports.DataFlowInput = _chunkQEM6S2W7cjs.I; exports.DataSiloInput = _chunkQEM6S2W7cjs.Q; exports.DataSubjectInput = _chunkQEM6S2W7cjs.F; exports.DatapointInput = _chunkQEM6S2W7cjs.w; exports.ENABLED_PLUGINS = _chunk7O5DWH3Mcjs.H; exports.ENRICHERS = _chunk7O5DWH3Mcjs.n; exports.ENTRY_COUNT = _chunk7O5DWH3Mcjs.h; exports.EXPERIENCES = _chunk7O5DWH3Mcjs.Sa; exports.EnrichPrivacyRequest = _chunkNAGRUVXKcjs.b; exports.EnricherInput = _chunkQEM6S2W7cjs.e; exports.FETCH_CONSENT_MANAGER = _chunk7O5DWH3Mcjs._a; exports.FETCH_CONSENT_MANAGER_ID = _chunk7O5DWH3Mcjs.Za; exports.FETCH_CONSENT_MANAGER_THEME = _chunk7O5DWH3Mcjs.$a; exports.FETCH_PRIVACY_CENTER_ID = _chunk7O5DWH3Mcjs.yb; exports.FieldInput = _chunkQEM6S2W7cjs.v; exports.GLOBAL_ACTION_ITEMS = _chunk7O5DWH3Mcjs.vb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunk7O5DWH3Mcjs.Ha; exports.IDENTIFIERS = _chunk7O5DWH3Mcjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunk7O5DWH3Mcjs.dc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunk7O5DWH3Mcjs.fa; exports.INITIALIZER = _chunk7O5DWH3Mcjs.o; exports.IP_ADDRESS_REGEX = _chunkDCBE53LGcjs.f; exports.IS_REQUIRED = _chunk7O5DWH3Mcjs.fc; exports.IdentifierInput = _chunkQEM6S2W7cjs.H; exports.ImportOnetrustAssessmentsInput = _chunkQEM6S2W7cjs.ra; exports.IntlMessage = _chunk7O5DWH3Mcjs.nf; exports.IntlMessageInput = _chunkQEM6S2W7cjs.P; exports.LARGE_LANGUAGE_MODELS = _chunk7O5DWH3Mcjs.Fb; exports.LOGIN = _chunk7O5DWH3Mcjs.Db; exports.MESSAGES = _chunk7O5DWH3Mcjs._; exports.NEW_IDENTIFIER_TYPES = _chunk7O5DWH3Mcjs.t; exports.NONE = _chunk7O5DWH3Mcjs.ac; exports.NOTIFY_ADDITIONAL_TIME = _chunk7O5DWH3Mcjs.Z; exports.ORGANIZATION = _chunk7O5DWH3Mcjs.K; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunkQEM6S2W7cjs.ma; exports.OpenAIEnabledRoutes = _chunkQEM6S2W7cjs.na; exports.OpenAIIntegration = _chunkQEM6S2W7cjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunk7O5DWH3Mcjs.T; exports.PREFERENCE_TOPICS = _chunk7O5DWH3Mcjs.ha; exports.PRIVACY_CENTER = _chunk7O5DWH3Mcjs.Ab; exports.PROCESSING_ACTIVITIES = _chunk7O5DWH3Mcjs.Yb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk7O5DWH3Mcjs.Vb; exports.PROMPTS = _chunk7O5DWH3Mcjs.ja; exports.PROMPTS_WITH_VARIABLES = _chunk7O5DWH3Mcjs.ma; exports.PROMPT_GROUPS = _chunk7O5DWH3Mcjs.la; exports.PROMPT_PARTIALS = _chunk7O5DWH3Mcjs.ka; exports.PROMPT_THREADS = _chunk7O5DWH3Mcjs.S; exports.PURPOSES = _chunk7O5DWH3Mcjs.ga; exports.ParsedAttributeInput = _chunk7O5DWH3Mcjs.oc; exports.PartitionInput = _chunkQEM6S2W7cjs.L; exports.PathfinderPolicy = _chunkQEM6S2W7cjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunkQEM6S2W7cjs.la; exports.PathfinderPromptRunMetadata = _chunkQEM6S2W7cjs.qa; exports.PolicyInput = _chunkQEM6S2W7cjs.O; exports.PrivacyCenterInput = _chunkQEM6S2W7cjs.N; exports.PrivacyRequest = _chunk7O5DWH3Mcjs.id; exports.PrivacyRequestInput = _chunk7O5DWH3Mcjs.kf; exports.PrivacyRequestResponse = _chunk7O5DWH3Mcjs.tf; exports.ProcessingActivityInput = _chunkQEM6S2W7cjs.A; exports.ProcessingPurposeInput = _chunkQEM6S2W7cjs.r; exports.ProcessingPurposePreviewInput = _chunkQEM6S2W7cjs.f; exports.PromptAVendorEmailSettings = _chunkQEM6S2W7cjs.x; exports.PromptGroupInput = _chunkQEM6S2W7cjs.u; exports.PromptInput = _chunkQEM6S2W7cjs.s; exports.PromptPartialInput = _chunkQEM6S2W7cjs.t; exports.PurposeMap = _chunkJZEDU4GZcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunk7O5DWH3Mcjs.wa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunk7O5DWH3Mcjs.Aa; exports.REPORT_PROMPT_RUN = _chunk7O5DWH3Mcjs.Fa; exports.REPOSITORIES = _chunk7O5DWH3Mcjs.A; exports.REQUESTS = _chunk7O5DWH3Mcjs.V; exports.REQUEST_DATA_SILOS = _chunk7O5DWH3Mcjs.ta; exports.REQUEST_ENRICHERS = _chunk7O5DWH3Mcjs.aa; exports.REQUEST_FILES = _chunk7O5DWH3Mcjs.Da; exports.REQUEST_IDENTIFIERS = _chunk7O5DWH3Mcjs.Ba; exports.RETRYABLE_BATCH_STATUSES = _chunkMFIMY5RYcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunk7O5DWH3Mcjs.va; exports.RETRY_REQUEST_ENRICHER = _chunk7O5DWH3Mcjs.ba; exports.RateCounter = _chunk7O5DWH3Mcjs.Uf; exports.RegionInput = _chunkQEM6S2W7cjs.z; exports.RepositoryInput = _chunkQEM6S2W7cjs.E; exports.RequestFileMetadata = _chunk7O5DWH3Mcjs.of; exports.RequestFileMetadataResponse = _chunk7O5DWH3Mcjs.pf; exports.RequestIdentifiersResponse = _chunk7O5DWH3Mcjs.gd; exports.RiskAssignmentInput = _chunkQEM6S2W7cjs.W; exports.RiskLogicInput = _chunkQEM6S2W7cjs.X; exports.SCOPES_BY_TITLE = _chunkMFIMY5RYcjs.w; exports.SCOPE_TITLES = _chunkMFIMY5RYcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunk7O5DWH3Mcjs.Ra; exports.SKIP_REQUEST_ENRICHER = _chunk7O5DWH3Mcjs.ca; exports.SOFTWARE_DEVELOPMENT_KITS = _chunk7O5DWH3Mcjs.M; exports.SOMBRA_VERSION = _chunk7O5DWH3Mcjs.$b; exports.SUB_DATA_POINTS = _chunk7O5DWH3Mcjs.c; exports.SUB_DATA_POINTS_COUNT = _chunk7O5DWH3Mcjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunk7O5DWH3Mcjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunk7O5DWH3Mcjs.Kc; exports.SoftwareDevelopmentKitInput = _chunkQEM6S2W7cjs.B; exports.StoredApiKey = _chunkQEM6S2W7cjs.ha; exports.SuccessfulRequest = _chunk7O5DWH3Mcjs.ic; exports.TEAMS = _chunk7O5DWH3Mcjs.xa; exports.TEMPLATES = _chunk7O5DWH3Mcjs.I; exports.TOGGLE_CONSENT_PRECEDENCE = _chunk7O5DWH3Mcjs.kb; exports.TOGGLE_DATA_SUBJECT = _chunk7O5DWH3Mcjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunk7O5DWH3Mcjs.jb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunk7O5DWH3Mcjs.ib; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunk7O5DWH3Mcjs.hb; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkMFIMY5RYcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkMFIMY5RYcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkMFIMY5RYcjs.v; exports.TeamInput = _chunkQEM6S2W7cjs.d; exports.TemplateInput = _chunkQEM6S2W7cjs.a; exports.TranscendInput = _chunkQEM6S2W7cjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunk7O5DWH3Mcjs.ub; exports.UPDATE_ACTION_ITEMS = _chunk7O5DWH3Mcjs.wb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunk7O5DWH3Mcjs.Ja; exports.UPDATE_AGENTS = _chunk7O5DWH3Mcjs.Ib; exports.UPDATE_AGENT_FILES = _chunk7O5DWH3Mcjs.Lb; exports.UPDATE_AGENT_FUNCTIONS = _chunk7O5DWH3Mcjs.Ob; exports.UPDATE_ATTRIBUTE = _chunk7O5DWH3Mcjs.Qa; exports.UPDATE_ATTRIBUTE_VALUES = _chunk7O5DWH3Mcjs.Ma; exports.UPDATE_BUSINESS_ENTITIES = _chunk7O5DWH3Mcjs.sb; exports.UPDATE_CODE_PACKAGES = _chunk7O5DWH3Mcjs.Q; exports.UPDATE_CONSENT_EXPERIENCE = _chunk7O5DWH3Mcjs.mb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunk7O5DWH3Mcjs.eb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunk7O5DWH3Mcjs.fb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunk7O5DWH3Mcjs.lb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunk7O5DWH3Mcjs.cb; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunk7O5DWH3Mcjs.bb; exports.UPDATE_DATA_FLOWS = _chunk7O5DWH3Mcjs.Va; exports.UPDATE_DATA_SILOS = _chunk7O5DWH3Mcjs.l; exports.UPDATE_DATA_SUBJECT = _chunk7O5DWH3Mcjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunk7O5DWH3Mcjs.Ub; exports.UPDATE_ENRICHER = _chunk7O5DWH3Mcjs.q; exports.UPDATE_IDENTIFIER = _chunk7O5DWH3Mcjs.v; exports.UPDATE_INTL_MESSAGES = _chunk7O5DWH3Mcjs.$; exports.UPDATE_LOAD_OPTIONS = _chunk7O5DWH3Mcjs.gb; exports.UPDATE_OR_CREATE_COOKIES = _chunk7O5DWH3Mcjs.Wa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunk7O5DWH3Mcjs.f; exports.UPDATE_POLICIES = _chunk7O5DWH3Mcjs.U; exports.UPDATE_PRIVACY_CENTER = _chunk7O5DWH3Mcjs.Bb; exports.UPDATE_PRIVACY_REQUEST = _chunk7O5DWH3Mcjs.Y; exports.UPDATE_PROCESSING_ACTIVITIES = _chunk7O5DWH3Mcjs._b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk7O5DWH3Mcjs.Xb; exports.UPDATE_PROMPTS = _chunk7O5DWH3Mcjs.na; exports.UPDATE_PROMPT_GROUPS = _chunk7O5DWH3Mcjs.ra; exports.UPDATE_PROMPT_PARTIALS = _chunk7O5DWH3Mcjs.pa; exports.UPDATE_REPOSITORIES = _chunk7O5DWH3Mcjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunk7O5DWH3Mcjs.N; exports.UPDATE_TEAM = _chunk7O5DWH3Mcjs.za; exports.UPDATE_VENDORS = _chunk7O5DWH3Mcjs.Rb; exports.USERS = _chunk7O5DWH3Mcjs.Ca; exports.USP_STRING_REGEX = _chunkJZEDU4GZcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkSW5CIF5Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkSW5CIF5Dcjs.a; exports.VENDORS = _chunk7O5DWH3Mcjs.Pb; exports.VendorInput = _chunkQEM6S2W7cjs.p; exports.WebhookHeader = _chunkQEM6S2W7cjs.b; exports.addMessagesToPromptRun = _chunk7O5DWH3Mcjs.tc; exports.appendCsvSync = _chunkLR3CPNDMcjs.b; exports.approvePrivacyRequests = _chunk7O5DWH3Mcjs.vf; exports.assumeRole = _chunk7O5DWH3Mcjs.Fd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunk7O5DWH3Mcjs.vc; exports.buildTranscendGraphQLClientGeneric = _chunk7O5DWH3Mcjs.uc; exports.buildXdiSyncEndpoint = _chunkDCBE53LGcjs.g; exports.bulkRestartRequests = _chunk7O5DWH3Mcjs.Df; exports.bulkRetryEnrichers = _chunk7O5DWH3Mcjs.Ff; exports.cancelPrivacyRequests = _chunk7O5DWH3Mcjs.yf; exports.consentManagersToBusinessEntities = _chunkDCBE53LGcjs.h; exports.convertToDataSubjectAllowlist = _chunk7O5DWH3Mcjs.ud; exports.convertToDataSubjectBlockList = _chunk7O5DWH3Mcjs.td; exports.createActionItemCollection = _chunk7O5DWH3Mcjs.ee; exports.createActionItems = _chunk7O5DWH3Mcjs.he; exports.createAgent = _chunk7O5DWH3Mcjs.qe; exports.createAgentFile = _chunk7O5DWH3Mcjs.ke; exports.createAgentFunction = _chunk7O5DWH3Mcjs.ne; exports.createApiKey = _chunk7O5DWH3Mcjs.Gd; exports.createBusinessEntity = _chunk7O5DWH3Mcjs.ue; exports.createCodePackage = _chunk7O5DWH3Mcjs.De; exports.createConsentToken = _chunkJZEDU4GZcjs.a; exports.createDataCategory = _chunk7O5DWH3Mcjs.Ke; exports.createDataFlows = _chunk7O5DWH3Mcjs.Oe; exports.createProcessingPurpose = _chunk7O5DWH3Mcjs.Ye; exports.createPrompt = _chunk7O5DWH3Mcjs.$e; exports.createRegexForTag = j; exports.createRepository = _chunk7O5DWH3Mcjs.Ae; exports.createSoftwareDevelopmentKit = _chunk7O5DWH3Mcjs.xe; exports.createSombraGotInstance = _chunk7O5DWH3Mcjs.wc; exports.createTranscendConsentGotInstance = _chunk7O5DWH3Mcjs.xc; exports.createVendor = _chunk7O5DWH3Mcjs.cf; exports.defineTranscendPrompts = Sm; exports.deleteApiKey = _chunk7O5DWH3Mcjs.Hd; exports.deployConsentManager = _chunk7O5DWH3Mcjs.yc; exports.description = _chunkMFIMY5RYcjs.l; exports.domainToHost = _chunkDCBE53LGcjs.e; exports.downloadPrivacyRequestFiles = _chunk7O5DWH3Mcjs.sf; exports.enrichPrivacyRequest = _chunkNAGRUVXKcjs.c; exports.ensureAllDataSubjectsExist = _chunk7O5DWH3Mcjs.sd; exports.extractClientError = _chunk7O5DWH3Mcjs.Af; exports.extractErrorMessage = _chunk7O5DWH3Mcjs.Pf; exports.fetchActiveSiloDiscoPlugin = _chunk7O5DWH3Mcjs.Ac; exports.fetchAllActionItems = _chunk7O5DWH3Mcjs.Bc; exports.fetchAllActions = _chunk7O5DWH3Mcjs.Cc; exports.fetchAllAgentFiles = _chunk7O5DWH3Mcjs.Dc; exports.fetchAllAgentFunctions = _chunk7O5DWH3Mcjs.Ec; exports.fetchAllAgents = _chunk7O5DWH3Mcjs.Fc; exports.fetchAllApiKeys = _chunk7O5DWH3Mcjs.nd; exports.fetchAllAssessmentTemplates = _chunk7O5DWH3Mcjs.Hc; exports.fetchAllAssessments = _chunk7O5DWH3Mcjs.Gc; exports.fetchAllAttributeValues = _chunk7O5DWH3Mcjs.Jc; exports.fetchAllAttributes = _chunk7O5DWH3Mcjs.Lc; exports.fetchAllBusinessEntities = _chunk7O5DWH3Mcjs.Mc; exports.fetchAllCatalogs = _chunk7O5DWH3Mcjs.pd; exports.fetchAllCookies = _chunk7O5DWH3Mcjs.Tc; exports.fetchAllDataCategories = _chunk7O5DWH3Mcjs.Uc; exports.fetchAllDataFlows = _chunk7O5DWH3Mcjs.Vc; exports.fetchAllDataPoints = _chunk7O5DWH3Mcjs.Qd; exports.fetchAllDataSilos = _chunk7O5DWH3Mcjs.Od; exports.fetchAllDataSubjects = _chunk7O5DWH3Mcjs.rd; exports.fetchAllEnrichers = _chunk7O5DWH3Mcjs.Ud; exports.fetchAllIdentifiers = _chunk7O5DWH3Mcjs.Xf; exports.fetchAllMessages = _chunk7O5DWH3Mcjs.Wc; exports.fetchAllPolicies = _chunk7O5DWH3Mcjs.Zc; exports.fetchAllPreferenceTopics = _chunk7O5DWH3Mcjs._c; exports.fetchAllPrivacyCenters = _chunk7O5DWH3Mcjs.$c; exports.fetchAllProcessingActivities = _chunk7O5DWH3Mcjs.ad; exports.fetchAllProcessingPurposes = _chunk7O5DWH3Mcjs.bd; exports.fetchAllPromptGroups = _chunk7O5DWH3Mcjs.vd; exports.fetchAllPromptPartials = _chunk7O5DWH3Mcjs.wd; exports.fetchAllPromptThreads = _chunk7O5DWH3Mcjs.zd; exports.fetchAllPrompts = _chunk7O5DWH3Mcjs.xd; exports.fetchAllPurposes = _chunk7O5DWH3Mcjs.cd; exports.fetchAllPurposesAndPreferences = _chunk7O5DWH3Mcjs.dd; exports.fetchAllRequestAttributeKeys = _chunk7O5DWH3Mcjs.Ic; exports.fetchAllRequestEnrichers = _chunk7O5DWH3Mcjs.ed; exports.fetchAllRequestIdentifierMetadata = _chunk7O5DWH3Mcjs.fd; exports.fetchAllRequestIdentifiers = _chunk7O5DWH3Mcjs.hd; exports.fetchAllRequests = _chunk7O5DWH3Mcjs.jd; exports.fetchAllSubDataPoints = _chunk7O5DWH3Mcjs.Pd; exports.fetchAllTeams = _chunk7O5DWH3Mcjs.kd; exports.fetchAllTemplates = _chunk7O5DWH3Mcjs.Wd; exports.fetchAllUsers = _chunk7O5DWH3Mcjs.ld; exports.fetchAllVendors = _chunk7O5DWH3Mcjs.md; exports.fetchAndIndexCatalogs = _chunk7O5DWH3Mcjs.qd; exports.fetchApiKeys = _chunk7O5DWH3Mcjs.od; exports.fetchConsentManager = _chunk7O5DWH3Mcjs.Nc; exports.fetchConsentManagerAnalyticsData = _chunk7O5DWH3Mcjs.Rc; exports.fetchConsentManagerExperiences = _chunk7O5DWH3Mcjs.Pc; exports.fetchConsentManagerId = _chunk7O5DWH3Mcjs.Oc; exports.fetchConsentManagerTheme = _chunk7O5DWH3Mcjs.Sc; exports.fetchConsentPreferences = _chunkDCBE53LGcjs.j; exports.fetchEnrichedDataSilos = _chunk7O5DWH3Mcjs.Rd; exports.fetchIdentifiersAndCreateMissing = _chunk7O5DWH3Mcjs.Yf; exports.fetchPartitions = _chunk7O5DWH3Mcjs.Yd; exports.fetchPrivacyCenterId = _chunk7O5DWH3Mcjs.Yc; exports.fetchPrivacyCenterUrl = _chunk7O5DWH3Mcjs.Xc; exports.fetchPromptsWithVariables = _chunk7O5DWH3Mcjs.yd; exports.fetchRequestDataSilo = _chunk7O5DWH3Mcjs.Bd; exports.fetchRequestDataSiloActiveCount = _chunk7O5DWH3Mcjs.Cd; exports.fetchRequestDataSilos = _chunk7O5DWH3Mcjs.Ad; exports.fetchRequestFilesForRequest = _chunk7O5DWH3Mcjs.Dd; exports.filterNullishValuesFromObject = Qm; exports.filterRows = _chunk7O5DWH3Mcjs.sc; exports.fuzzyMatchColumns = _chunk7O5DWH3Mcjs.lc; exports.fuzzySearch = _chunk7O5DWH3Mcjs.kc; exports.generateCrossAccountApiKeys = _chunkOKLX7XKWcjs.a; exports.getErrorStatus = _chunk7O5DWH3Mcjs.Of; exports.getFileMetadataForPrivacyRequests = _chunk7O5DWH3Mcjs.qf; exports.getGitFilesThatChanged = Vm; exports.getUniqueValuesForColumn = _chunk7O5DWH3Mcjs.rc; exports.inquirerAutoComplete = _chunk7O5DWH3Mcjs.Mf; exports.inquirerConfirmBoolean = _chunk7O5DWH3Mcjs.Kf; exports.inquirerConfirmText = _chunk7O5DWH3Mcjs.Lf; exports.limitRecords = _chunk7O5DWH3Mcjs.Tf; exports.listDirectories = _chunkOKLX7XKWcjs.d; exports.listFiles = _chunkOKLX7XKWcjs.c; exports.loginUser = _chunk7O5DWH3Mcjs.Ed; exports.makeGraphQLRequest = _chunk7O5DWH3Mcjs.Wf; exports.mapColumnsToAttributes = _chunk7O5DWH3Mcjs.zf; exports.mapColumnsToIdentifiers = _chunk7O5DWH3Mcjs.xf; exports.mapCsvColumnsToApi = _chunk7O5DWH3Mcjs.hf; exports.mapCsvRowsToRequestInputs = _chunk7O5DWH3Mcjs.mf; exports.mapEnumValues = _chunk7O5DWH3Mcjs.mc; exports.mapRequestEnumValues = _chunk7O5DWH3Mcjs.if; exports.markCronIdentifierCompleted = _chunkKU3UCRAFcjs.d; exports.markRequestDataSiloIdsCompleted = _chunkKU3UCRAFcjs.f; exports.markSilentPrivacyRequests = _chunk7O5DWH3Mcjs.gf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkMFIMY5RYcjs.n; exports.normalizeIdentifierValue = _chunk7O5DWH3Mcjs.lf; exports.notifyPrivacyRequestsAdditionalTime = _chunk7O5DWH3Mcjs.wf; exports.parseAssessmentDisplayLogic = _chunk7O5DWH3Mcjs.Ld; exports.parseAssessmentRiskLogic = _chunk7O5DWH3Mcjs.Nd; exports.parseAttributesFromString = _chunk7O5DWH3Mcjs.pc; exports.parseFilePath = _chunkLR3CPNDMcjs.d; exports.parseVariablesFromString = _chunk7O5DWH3Mcjs.Nf; exports.pullAllDatapoints = _chunkLPUZGMB6cjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkKU3UCRAFcjs.g; exports.pullConsentManagerMetrics = _chunkDCBE53LGcjs.d; exports.pullCronPageOfIdentifiers = _chunkKU3UCRAFcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunkNAGRUVXKcjs.a; exports.pullPrivacyRequests = _chunk7O5DWH3Mcjs.Hf; exports.pullTranscendConfiguration = _chunk7O5DWH3Mcjs.$d; exports.pullUnstructuredSubDataPointRecommendations = _chunkLPUZGMB6cjs.b; exports.pushCronIdentifiersFromCsv = _chunkKU3UCRAFcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunkNAGRUVXKcjs.d; exports.readCsv = _chunk7O5DWH3Mcjs.qc; exports.readSafe = _chunk7O5DWH3Mcjs.Vf; exports.readTranscendYaml = _chunkSW5CIF5Dcjs.d; exports.removeLinks = Bm; exports.removeUnverifiedRequestIdentifiers = _chunk7O5DWH3Mcjs.Jf; exports.replaceVariablesInYaml = _chunkSW5CIF5Dcjs.c; exports.reportPromptRun = _chunk7O5DWH3Mcjs.ae; exports.restartPrivacyRequest = _chunk7O5DWH3Mcjs.Cf; exports.retryRequestDataSilos = _chunk7O5DWH3Mcjs.Gf; exports.retryRequestEnricher = _chunk7O5DWH3Mcjs.be; exports.retrySamePromise = _chunk7O5DWH3Mcjs.Sf; exports.setResourceAttributes = _chunk7O5DWH3Mcjs.ce; exports.skipPreflightJobs = _chunk7O5DWH3Mcjs.Ef; exports.skipRequestDataSilos = _chunk7O5DWH3Mcjs.If; exports.sleepPromise = _chunk7O5DWH3Mcjs.Qf; exports.splitCsvToList = _chunk7O5DWH3Mcjs.nc; exports.splitInHalf = _chunk7O5DWH3Mcjs.Rf; exports.streamPrivacyRequestFiles = _chunk7O5DWH3Mcjs.rf; exports.submitPrivacyRequest = _chunk7O5DWH3Mcjs.uf; exports.syncAction = _chunk7O5DWH3Mcjs.de; exports.syncActionItemCollections = _chunk7O5DWH3Mcjs.ge; exports.syncActionItems = _chunk7O5DWH3Mcjs.je; exports.syncAgentFiles = _chunk7O5DWH3Mcjs.me; exports.syncAgentFunctions = _chunk7O5DWH3Mcjs.pe; exports.syncAgents = _chunk7O5DWH3Mcjs.se; exports.syncAttribute = _chunk7O5DWH3Mcjs.te; exports.syncBusinessEntities = _chunk7O5DWH3Mcjs.we; exports.syncCodePackages = _chunk7O5DWH3Mcjs.Fe; exports.syncConfigurationToTranscend = _chunk7O5DWH3Mcjs.Zf; exports.syncConsentManager = _chunk7O5DWH3Mcjs.He; exports.syncConsentManagerExperiences = _chunk7O5DWH3Mcjs.Ge; exports.syncCookies = _chunk7O5DWH3Mcjs.Je; exports.syncDataCategories = _chunk7O5DWH3Mcjs.Me; exports.syncDataFlows = _chunk7O5DWH3Mcjs.Pe; exports.syncDataSiloDependencies = _chunk7O5DWH3Mcjs.Td; exports.syncDataSilos = _chunk7O5DWH3Mcjs.Sd; exports.syncDataSubject = _chunk7O5DWH3Mcjs.Qe; exports.syncEnricher = _chunk7O5DWH3Mcjs.Vd; exports.syncIdentifier = _chunk7O5DWH3Mcjs.Re; exports.syncIntlMessages = _chunk7O5DWH3Mcjs.Te; exports.syncPartitions = _chunk7O5DWH3Mcjs.Zd; exports.syncPolicies = _chunk7O5DWH3Mcjs.Ve; exports.syncPrivacyCenter = _chunk7O5DWH3Mcjs.We; exports.syncProcessingActivities = _chunk7O5DWH3Mcjs.Xe; exports.syncProcessingPurposes = _chunk7O5DWH3Mcjs._e; exports.syncPrompts = _chunk7O5DWH3Mcjs.bf; exports.syncRepositories = _chunk7O5DWH3Mcjs.Ce; exports.syncSoftwareDevelopmentKits = _chunk7O5DWH3Mcjs.ze; exports.syncTemplate = _chunk7O5DWH3Mcjs.Xd; exports.syncVendors = _chunk7O5DWH3Mcjs.ef; exports.updateActionItem = _chunk7O5DWH3Mcjs.ie; exports.updateActionItemCollection = _chunk7O5DWH3Mcjs.fe; exports.updateAgentFiles = _chunk7O5DWH3Mcjs.le; exports.updateAgentFunctions = _chunk7O5DWH3Mcjs.oe; exports.updateAgents = _chunk7O5DWH3Mcjs.re; exports.updateBusinessEntities = _chunk7O5DWH3Mcjs.ve; exports.updateCodePackages = _chunk7O5DWH3Mcjs.Ee; exports.updateConsentManagerToLatest = _chunk7O5DWH3Mcjs.zc; exports.updateConsentManagerVersionToLatest = _chunkDCBE53LGcjs.a; exports.updateDataCategories = _chunk7O5DWH3Mcjs.Le; exports.updateDataFlows = _chunk7O5DWH3Mcjs.Ne; exports.updateIntlMessages = _chunk7O5DWH3Mcjs.Se; exports.updateOrCreateCookies = _chunk7O5DWH3Mcjs.Ie; exports.updatePolicies = _chunk7O5DWH3Mcjs.Ue; exports.updateProcessingPurposes = _chunk7O5DWH3Mcjs.Ze; exports.updatePrompts = _chunk7O5DWH3Mcjs.af; exports.updateRepositories = _chunk7O5DWH3Mcjs.Be; exports.updateSoftwareDevelopmentKits = _chunk7O5DWH3Mcjs.ye; exports.updateVendors = _chunk7O5DWH3Mcjs.df; exports.uploadConsents = _chunkJZEDU4GZcjs.f; exports.uploadCookiesFromCsv = _chunkDCBE53LGcjs.c; exports.uploadDataFlowsFromCsv = _chunkDCBE53LGcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunk7O5DWH3Mcjs.Bf; exports.uploadSiloDiscoveryResults = _chunk7O5DWH3Mcjs.ff; exports.validateTranscendAuth = _chunkOKLX7XKWcjs.b; exports.version = _chunkMFIMY5RYcjs.m; exports.writeCsv = _chunkLR3CPNDMcjs.c; exports.writeCsvSync = _chunkLR3CPNDMcjs.a; exports.writeLargeCsv = _chunkLR3CPNDMcjs.e; exports.writeTranscendYaml = _chunkSW5CIF5Dcjs.e;
3
+ `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkGRBF73LScjs.c.call(void 0, p.split(`
4
+ `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkZVE6Y6D3cjs.tb; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkZVE6Y6D3cjs.Ga; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkZVE6Y6D3cjs.G; exports.ADMIN_DASH = _chunkGRBF73LScjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkGRBF73LScjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkGRBF73LScjs.p; exports.AGENTS = _chunkZVE6Y6D3cjs.Gb; exports.AGENT_FILES = _chunkZVE6Y6D3cjs.Jb; exports.AGENT_FUNCTIONS = _chunkZVE6Y6D3cjs.Mb; exports.API_KEYS = _chunkZVE6Y6D3cjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunkZVE6Y6D3cjs.W; exports.ASSESSMENTS = _chunkZVE6Y6D3cjs.ea; exports.ASSESSMENT_SECTION_FIELDS = _chunkZVE6Y6D3cjs.da; exports.ASSESSMENT_TEMPLATES = _chunkZVE6Y6D3cjs.ia; exports.ASSUME_ROLE = _chunkZVE6Y6D3cjs.Eb; exports.ATTRIBUTES = _chunkZVE6Y6D3cjs.Ka; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkZVE6Y6D3cjs.L; exports.ATTRIBUTE_VALUES = _chunkZVE6Y6D3cjs.Oa; exports.ActionInput = _chunkQEM6S2W7cjs.G; exports.ActionItemCollectionInput = _chunkQEM6S2W7cjs.R; exports.ActionItemInput = _chunkQEM6S2W7cjs.S; exports.AgentFileInput = _chunkQEM6S2W7cjs.o; exports.AgentFunctionInput = _chunkQEM6S2W7cjs.n; exports.AgentInput = _chunkQEM6S2W7cjs.m; exports.ApiKeyInput = _chunkQEM6S2W7cjs.c; exports.AssessmentAction = _chunkZVE6Y6D3cjs.Ld; exports.AssessmentAnswerOptionInput = _chunkQEM6S2W7cjs.Y; exports.AssessmentDisplayLogicInput = _chunkQEM6S2W7cjs.V; exports.AssessmentInput = _chunkQEM6S2W7cjs.ca; exports.AssessmentNestedRule = _chunkZVE6Y6D3cjs.Kd; exports.AssessmentNestedRuleInput = _chunkQEM6S2W7cjs.U; exports.AssessmentResourceInput = _chunkQEM6S2W7cjs.ba; exports.AssessmentRetentionScheduleInput = _chunkQEM6S2W7cjs.$; exports.AssessmentRiskLogic = _chunkZVE6Y6D3cjs.Nd; exports.AssessmentRule = _chunkZVE6Y6D3cjs.Jd; exports.AssessmentRuleInput = _chunkQEM6S2W7cjs.T; exports.AssessmentSectionInput = _chunkQEM6S2W7cjs._; exports.AssessmentSectionQuestionInput = _chunkQEM6S2W7cjs.Z; exports.AssessmentTemplateInput = _chunkQEM6S2W7cjs.aa; exports.AttestedExtraIdentifiers = _chunkZVE6Y6D3cjs.kf; exports.AttributeInput = _chunkQEM6S2W7cjs.k; exports.AttributePreview = _chunkQEM6S2W7cjs.l; exports.AttributeValueInput = _chunkQEM6S2W7cjs.j; exports.BLANK = _chunkZVE6Y6D3cjs.cc; exports.BULK_APPLY = _chunkZVE6Y6D3cjs.bc; exports.BULK_REQUEST_FILES = _chunkZVE6Y6D3cjs.Ea; exports.BUSINESS_ENTITIES = _chunkZVE6Y6D3cjs.qb; exports.BusinessEntityInput = _chunkQEM6S2W7cjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkZVE6Y6D3cjs.X; exports.CAN_APPLY_IN_BULK = _chunkZVE6Y6D3cjs.gc; exports.CATALOGS = _chunkZVE6Y6D3cjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkZVE6Y6D3cjs.ua; exports.CODE_PACKAGES = _chunkZVE6Y6D3cjs.P; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkZVE6Y6D3cjs.pb; exports.CONSENT_PARTITIONS = _chunkZVE6Y6D3cjs.Ta; exports.COOKIES = _chunkZVE6Y6D3cjs.Ya; exports.CREATE_ACTION_ITEMS = _chunkZVE6Y6D3cjs.xb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkZVE6Y6D3cjs.Ia; exports.CREATE_AGENT = _chunkZVE6Y6D3cjs.Hb; exports.CREATE_AGENT_FILE = _chunkZVE6Y6D3cjs.Kb; exports.CREATE_AGENT_FUNCTION = _chunkZVE6Y6D3cjs.Nb; exports.CREATE_API_KEY = _chunkZVE6Y6D3cjs.E; exports.CREATE_ATTRIBUTE = _chunkZVE6Y6D3cjs.Pa; exports.CREATE_ATTRIBUTE_VALUES = _chunkZVE6Y6D3cjs.La; exports.CREATE_BUSINESS_ENTITY = _chunkZVE6Y6D3cjs.rb; exports.CREATE_CODE_PACKAGE = _chunkZVE6Y6D3cjs.R; exports.CREATE_CONSENT_EXPERIENCE = _chunkZVE6Y6D3cjs.nb; exports.CREATE_CONSENT_MANAGER = _chunkZVE6Y6D3cjs.ab; exports.CREATE_CONSENT_PARTITION = _chunkZVE6Y6D3cjs.ob; exports.CREATE_DATA_FLOWS = _chunkZVE6Y6D3cjs.Ua; exports.CREATE_DATA_SILOS = _chunkZVE6Y6D3cjs.m; exports.CREATE_DATA_SUBJECT = _chunkZVE6Y6D3cjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunkZVE6Y6D3cjs.Tb; exports.CREATE_ENRICHER = _chunkZVE6Y6D3cjs.p; exports.CREATE_IDENTIFIER = _chunkZVE6Y6D3cjs.u; exports.CREATE_PROCESSING_ACTIVITY = _chunkZVE6Y6D3cjs.Zb; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkZVE6Y6D3cjs.Wb; exports.CREATE_PROMPT = _chunkZVE6Y6D3cjs.oa; exports.CREATE_PROMPT_GROUP = _chunkZVE6Y6D3cjs.sa; exports.CREATE_PROMPT_PARTIAL = _chunkZVE6Y6D3cjs.qa; exports.CREATE_REPOSITORY = _chunkZVE6Y6D3cjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkZVE6Y6D3cjs.O; exports.CREATE_TEAM = _chunkZVE6Y6D3cjs.ya; exports.CREATE_TEMPLATE = _chunkZVE6Y6D3cjs.J; exports.CREATE_VENDOR = _chunkZVE6Y6D3cjs.Qb; exports.CachedFileState = _chunkZVE6Y6D3cjs.hc; exports.CachedRequestState = _chunkZVE6Y6D3cjs.jc; exports.CodePackageInput = _chunkQEM6S2W7cjs.D; exports.CodePackageSdk = _chunkQEM6S2W7cjs.C; exports.ColumnName = _chunkZVE6Y6D3cjs.ec; exports.ConsentManageExperienceInput = _chunkQEM6S2W7cjs.K; exports.ConsentManagerInput = _chunkQEM6S2W7cjs.M; exports.ConsentManagerMetricBin = _chunkZVE6Y6D3cjs.Qc; exports.ConsentManagerServiceMetadata = _chunkQEM6S2W7cjs.ka; exports.ConsentPreferenceResponse = _chunk4B22XVLOcjs.i; exports.ConsentPreferenceTopic = _chunkQEM6S2W7cjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkQEM6S2W7cjs.da; exports.ConsentPurpose = _chunkQEM6S2W7cjs.fa; exports.CookieCsvInput = _chunkQEM6S2W7cjs.ja; exports.CookieInput = _chunkQEM6S2W7cjs.J; exports.CronIdentifier = _chunkMRJ2BRU4cjs.a; exports.CronIdentifierPush = _chunkMRJ2BRU4cjs.c; exports.DATAPOINT_EXPORT = _chunkZVE6Y6D3cjs.g; exports.DATA_FLOWS = _chunkZVE6Y6D3cjs.Xa; exports.DATA_POINTS = _chunkZVE6Y6D3cjs.a; exports.DATA_POINT_COUNT = _chunkZVE6Y6D3cjs.b; exports.DATA_SILOS = _chunkZVE6Y6D3cjs.i; exports.DATA_SILOS_ENRICHED = _chunkZVE6Y6D3cjs.k; exports.DATA_SILO_EXPORT = _chunkZVE6Y6D3cjs.j; exports.DATA_SUBJECTS = _chunkZVE6Y6D3cjs.w; exports.DATA_SUB_CATEGORIES = _chunkZVE6Y6D3cjs.Sb; exports.DEBUG = _chunkGRBF73LScjs.z; exports.DEFAULT_TRANSCEND_API = _chunkGRBF73LScjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkGRBF73LScjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkZVE6Y6D3cjs.$d; exports.DELETE_API_KEY = _chunkZVE6Y6D3cjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunkZVE6Y6D3cjs.Na; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkZVE6Y6D3cjs.zb; exports.DEPLOY_CONSENT_MANAGER = _chunkZVE6Y6D3cjs.db; exports.DETERMINE_LOGIN_METHOD = _chunkZVE6Y6D3cjs.Cb; exports.DataCategoryGuessInput = _chunkQEM6S2W7cjs.h; exports.DataCategoryInput = _chunkQEM6S2W7cjs.q; exports.DataCategoryPreviewInput = _chunkQEM6S2W7cjs.g; exports.DataCategoryRecommendationInput = _chunkQEM6S2W7cjs.i; exports.DataFlowCsvInput = _chunkQEM6S2W7cjs.ia; exports.DataFlowInput = _chunkQEM6S2W7cjs.I; exports.DataSiloInput = _chunkQEM6S2W7cjs.Q; exports.DataSubjectInput = _chunkQEM6S2W7cjs.F; exports.DatapointInput = _chunkQEM6S2W7cjs.w; exports.ENABLED_PLUGINS = _chunkZVE6Y6D3cjs.H; exports.ENRICHERS = _chunkZVE6Y6D3cjs.n; exports.ENTRY_COUNT = _chunkZVE6Y6D3cjs.h; exports.EXPERIENCES = _chunkZVE6Y6D3cjs.Sa; exports.EnrichPrivacyRequest = _chunk2STE3YIZcjs.b; exports.EnricherInput = _chunkQEM6S2W7cjs.e; exports.FETCH_CONSENT_MANAGER = _chunkZVE6Y6D3cjs._a; exports.FETCH_CONSENT_MANAGER_ID = _chunkZVE6Y6D3cjs.Za; exports.FETCH_CONSENT_MANAGER_THEME = _chunkZVE6Y6D3cjs.$a; exports.FETCH_PRIVACY_CENTER_ID = _chunkZVE6Y6D3cjs.yb; exports.FieldInput = _chunkQEM6S2W7cjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkZVE6Y6D3cjs.vb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkZVE6Y6D3cjs.Ha; exports.IDENTIFIERS = _chunkZVE6Y6D3cjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunkZVE6Y6D3cjs.dc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkZVE6Y6D3cjs.fa; exports.INITIALIZER = _chunkZVE6Y6D3cjs.o; exports.IP_ADDRESS_REGEX = _chunk4B22XVLOcjs.f; exports.IS_REQUIRED = _chunkZVE6Y6D3cjs.fc; exports.IdentifierInput = _chunkQEM6S2W7cjs.H; exports.ImportOnetrustAssessmentsInput = _chunkQEM6S2W7cjs.ra; exports.IntlMessage = _chunkZVE6Y6D3cjs.of; exports.IntlMessageInput = _chunkQEM6S2W7cjs.P; exports.LARGE_LANGUAGE_MODELS = _chunkZVE6Y6D3cjs.Fb; exports.LOGIN = _chunkZVE6Y6D3cjs.Db; exports.MESSAGES = _chunkZVE6Y6D3cjs._; exports.NEW_IDENTIFIER_TYPES = _chunkZVE6Y6D3cjs.t; exports.NONE = _chunkZVE6Y6D3cjs.ac; exports.NOTIFY_ADDITIONAL_TIME = _chunkZVE6Y6D3cjs.Z; exports.ORGANIZATION = _chunkZVE6Y6D3cjs.K; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunkQEM6S2W7cjs.ma; exports.OpenAIEnabledRoutes = _chunkQEM6S2W7cjs.na; exports.OpenAIIntegration = _chunkQEM6S2W7cjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunkZVE6Y6D3cjs.T; exports.PREFERENCE_TOPICS = _chunkZVE6Y6D3cjs.ha; exports.PRIVACY_CENTER = _chunkZVE6Y6D3cjs.Ab; exports.PROCESSING_ACTIVITIES = _chunkZVE6Y6D3cjs.Yb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkZVE6Y6D3cjs.Vb; exports.PROMPTS = _chunkZVE6Y6D3cjs.ja; exports.PROMPTS_WITH_VARIABLES = _chunkZVE6Y6D3cjs.ma; exports.PROMPT_GROUPS = _chunkZVE6Y6D3cjs.la; exports.PROMPT_PARTIALS = _chunkZVE6Y6D3cjs.ka; exports.PROMPT_THREADS = _chunkZVE6Y6D3cjs.S; exports.PURPOSES = _chunkZVE6Y6D3cjs.ga; exports.ParsedAttributeInput = _chunkZVE6Y6D3cjs.oc; exports.PartitionInput = _chunkQEM6S2W7cjs.L; exports.PathfinderPolicy = _chunkQEM6S2W7cjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunkQEM6S2W7cjs.la; exports.PathfinderPromptRunMetadata = _chunkQEM6S2W7cjs.qa; exports.PolicyInput = _chunkQEM6S2W7cjs.O; exports.PrivacyCenterInput = _chunkQEM6S2W7cjs.N; exports.PrivacyRequest = _chunkZVE6Y6D3cjs.jd; exports.PrivacyRequestInput = _chunkZVE6Y6D3cjs.lf; exports.PrivacyRequestResponse = _chunkZVE6Y6D3cjs.uf; exports.ProcessingActivityInput = _chunkQEM6S2W7cjs.A; exports.ProcessingPurposeInput = _chunkQEM6S2W7cjs.r; exports.ProcessingPurposePreviewInput = _chunkQEM6S2W7cjs.f; exports.PromptAVendorEmailSettings = _chunkQEM6S2W7cjs.x; exports.PromptGroupInput = _chunkQEM6S2W7cjs.u; exports.PromptInput = _chunkQEM6S2W7cjs.s; exports.PromptPartialInput = _chunkQEM6S2W7cjs.t; exports.PurposeMap = _chunkMKLPDKJQcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkZVE6Y6D3cjs.wa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkZVE6Y6D3cjs.Aa; exports.REPORT_PROMPT_RUN = _chunkZVE6Y6D3cjs.Fa; exports.REPOSITORIES = _chunkZVE6Y6D3cjs.A; exports.REQUESTS = _chunkZVE6Y6D3cjs.V; exports.REQUEST_DATA_SILOS = _chunkZVE6Y6D3cjs.ta; exports.REQUEST_ENRICHERS = _chunkZVE6Y6D3cjs.aa; exports.REQUEST_FILES = _chunkZVE6Y6D3cjs.Da; exports.REQUEST_IDENTIFIERS = _chunkZVE6Y6D3cjs.Ba; exports.RETRYABLE_BATCH_STATUSES = _chunkGRBF73LScjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunkZVE6Y6D3cjs.va; exports.RETRY_REQUEST_ENRICHER = _chunkZVE6Y6D3cjs.ba; exports.RateCounter = _chunkZVE6Y6D3cjs.Vf; exports.RegionInput = _chunkQEM6S2W7cjs.z; exports.RepositoryInput = _chunkQEM6S2W7cjs.E; exports.RequestFileMetadata = _chunkZVE6Y6D3cjs.pf; exports.RequestFileMetadataResponse = _chunkZVE6Y6D3cjs.qf; exports.RequestIdentifiersResponse = _chunkZVE6Y6D3cjs.hd; exports.RiskAssignmentInput = _chunkQEM6S2W7cjs.W; exports.RiskLogicInput = _chunkQEM6S2W7cjs.X; exports.SCOPES_BY_TITLE = _chunkGRBF73LScjs.w; exports.SCOPE_TITLES = _chunkGRBF73LScjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunkZVE6Y6D3cjs.Ra; exports.SKIP_REQUEST_ENRICHER = _chunkZVE6Y6D3cjs.ca; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkZVE6Y6D3cjs.M; exports.SOMBRA_VERSION = _chunkZVE6Y6D3cjs.$b; exports.SUB_DATA_POINTS = _chunkZVE6Y6D3cjs.c; exports.SUB_DATA_POINTS_COUNT = _chunkZVE6Y6D3cjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkZVE6Y6D3cjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunkZVE6Y6D3cjs.Kc; exports.SoftwareDevelopmentKitInput = _chunkQEM6S2W7cjs.B; exports.StoredApiKey = _chunkQEM6S2W7cjs.ha; exports.SuccessfulRequest = _chunkZVE6Y6D3cjs.ic; exports.TEAMS = _chunkZVE6Y6D3cjs.xa; exports.TEMPLATES = _chunkZVE6Y6D3cjs.I; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkZVE6Y6D3cjs.kb; exports.TOGGLE_DATA_SUBJECT = _chunkZVE6Y6D3cjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkZVE6Y6D3cjs.jb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkZVE6Y6D3cjs.ib; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkZVE6Y6D3cjs.hb; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkGRBF73LScjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkGRBF73LScjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkGRBF73LScjs.v; exports.TeamInput = _chunkQEM6S2W7cjs.d; exports.TemplateInput = _chunkQEM6S2W7cjs.a; exports.TranscendInput = _chunkQEM6S2W7cjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunkZVE6Y6D3cjs.ub; exports.UPDATE_ACTION_ITEMS = _chunkZVE6Y6D3cjs.wb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkZVE6Y6D3cjs.Ja; exports.UPDATE_AGENTS = _chunkZVE6Y6D3cjs.Ib; exports.UPDATE_AGENT_FILES = _chunkZVE6Y6D3cjs.Lb; exports.UPDATE_AGENT_FUNCTIONS = _chunkZVE6Y6D3cjs.Ob; exports.UPDATE_ATTRIBUTE = _chunkZVE6Y6D3cjs.Qa; exports.UPDATE_ATTRIBUTE_VALUES = _chunkZVE6Y6D3cjs.Ma; exports.UPDATE_BUSINESS_ENTITIES = _chunkZVE6Y6D3cjs.sb; exports.UPDATE_CODE_PACKAGES = _chunkZVE6Y6D3cjs.Q; exports.UPDATE_CONSENT_EXPERIENCE = _chunkZVE6Y6D3cjs.mb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkZVE6Y6D3cjs.eb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkZVE6Y6D3cjs.fb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkZVE6Y6D3cjs.lb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkZVE6Y6D3cjs.cb; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkZVE6Y6D3cjs.bb; exports.UPDATE_DATA_FLOWS = _chunkZVE6Y6D3cjs.Va; exports.UPDATE_DATA_SILOS = _chunkZVE6Y6D3cjs.l; exports.UPDATE_DATA_SUBJECT = _chunkZVE6Y6D3cjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkZVE6Y6D3cjs.Ub; exports.UPDATE_ENRICHER = _chunkZVE6Y6D3cjs.q; exports.UPDATE_IDENTIFIER = _chunkZVE6Y6D3cjs.v; exports.UPDATE_INTL_MESSAGES = _chunkZVE6Y6D3cjs.$; exports.UPDATE_LOAD_OPTIONS = _chunkZVE6Y6D3cjs.gb; exports.UPDATE_OR_CREATE_COOKIES = _chunkZVE6Y6D3cjs.Wa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkZVE6Y6D3cjs.f; exports.UPDATE_POLICIES = _chunkZVE6Y6D3cjs.U; exports.UPDATE_PRIVACY_CENTER = _chunkZVE6Y6D3cjs.Bb; exports.UPDATE_PRIVACY_REQUEST = _chunkZVE6Y6D3cjs.Y; exports.UPDATE_PROCESSING_ACTIVITIES = _chunkZVE6Y6D3cjs._b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkZVE6Y6D3cjs.Xb; exports.UPDATE_PROMPTS = _chunkZVE6Y6D3cjs.na; exports.UPDATE_PROMPT_GROUPS = _chunkZVE6Y6D3cjs.ra; exports.UPDATE_PROMPT_PARTIALS = _chunkZVE6Y6D3cjs.pa; exports.UPDATE_REPOSITORIES = _chunkZVE6Y6D3cjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkZVE6Y6D3cjs.N; exports.UPDATE_TEAM = _chunkZVE6Y6D3cjs.za; exports.UPDATE_VENDORS = _chunkZVE6Y6D3cjs.Rb; exports.USERS = _chunkZVE6Y6D3cjs.Ca; exports.USP_STRING_REGEX = _chunkMKLPDKJQcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkSW5CIF5Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkSW5CIF5Dcjs.a; exports.VENDORS = _chunkZVE6Y6D3cjs.Pb; exports.VendorInput = _chunkQEM6S2W7cjs.p; exports.WebhookHeader = _chunkQEM6S2W7cjs.b; exports.addMessagesToPromptRun = _chunkZVE6Y6D3cjs.tc; exports.appendCsvSync = _chunkLR3CPNDMcjs.b; exports.approvePrivacyRequests = _chunkZVE6Y6D3cjs.wf; exports.assumeRole = _chunkZVE6Y6D3cjs.Gd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunkZVE6Y6D3cjs.vc; exports.buildTranscendGraphQLClientGeneric = _chunkZVE6Y6D3cjs.uc; exports.buildXdiSyncEndpoint = _chunk4B22XVLOcjs.g; exports.bulkRestartRequests = _chunkZVE6Y6D3cjs.Ef; exports.bulkRetryEnrichers = _chunkZVE6Y6D3cjs.Gf; exports.cancelPrivacyRequests = _chunkZVE6Y6D3cjs.zf; exports.consentManagersToBusinessEntities = _chunk4B22XVLOcjs.h; exports.convertToDataSubjectAllowlist = _chunkZVE6Y6D3cjs.vd; exports.convertToDataSubjectBlockList = _chunkZVE6Y6D3cjs.ud; exports.createActionItemCollection = _chunkZVE6Y6D3cjs.fe; exports.createActionItems = _chunkZVE6Y6D3cjs.ie; exports.createAgent = _chunkZVE6Y6D3cjs.re; exports.createAgentFile = _chunkZVE6Y6D3cjs.le; exports.createAgentFunction = _chunkZVE6Y6D3cjs.oe; exports.createApiKey = _chunkZVE6Y6D3cjs.Hd; exports.createBusinessEntity = _chunkZVE6Y6D3cjs.ve; exports.createCodePackage = _chunkZVE6Y6D3cjs.Ee; exports.createConsentToken = _chunkMKLPDKJQcjs.a; exports.createDataCategory = _chunkZVE6Y6D3cjs.Le; exports.createDataFlows = _chunkZVE6Y6D3cjs.Pe; exports.createProcessingPurpose = _chunkZVE6Y6D3cjs.Ze; exports.createPrompt = _chunkZVE6Y6D3cjs.af; exports.createRegexForTag = j; exports.createRepository = _chunkZVE6Y6D3cjs.Be; exports.createSoftwareDevelopmentKit = _chunkZVE6Y6D3cjs.ye; exports.createSombraGotInstance = _chunkZVE6Y6D3cjs.wc; exports.createTranscendConsentGotInstance = _chunkZVE6Y6D3cjs.xc; exports.createVendor = _chunkZVE6Y6D3cjs.df; exports.defineTranscendPrompts = Bm; exports.deleteApiKey = _chunkZVE6Y6D3cjs.Id; exports.deployConsentManager = _chunkZVE6Y6D3cjs.yc; exports.description = _chunkGRBF73LScjs.l; exports.domainToHost = _chunk4B22XVLOcjs.e; exports.downloadPrivacyRequestFiles = _chunkZVE6Y6D3cjs.tf; exports.enrichPrivacyRequest = _chunk2STE3YIZcjs.c; exports.ensureAllDataSubjectsExist = _chunkZVE6Y6D3cjs.td; exports.extractClientError = _chunkZVE6Y6D3cjs.Bf; exports.extractErrorMessage = _chunkZVE6Y6D3cjs.Qf; exports.fetchActiveSiloDiscoPlugin = _chunkZVE6Y6D3cjs.Ac; exports.fetchAllActionItems = _chunkZVE6Y6D3cjs.Bc; exports.fetchAllActions = _chunkZVE6Y6D3cjs.Cc; exports.fetchAllAgentFiles = _chunkZVE6Y6D3cjs.Dc; exports.fetchAllAgentFunctions = _chunkZVE6Y6D3cjs.Ec; exports.fetchAllAgents = _chunkZVE6Y6D3cjs.Fc; exports.fetchAllApiKeys = _chunkZVE6Y6D3cjs.od; exports.fetchAllAssessmentTemplates = _chunkZVE6Y6D3cjs.Hc; exports.fetchAllAssessments = _chunkZVE6Y6D3cjs.Gc; exports.fetchAllAttributeValues = _chunkZVE6Y6D3cjs.Jc; exports.fetchAllAttributes = _chunkZVE6Y6D3cjs.Lc; exports.fetchAllBusinessEntities = _chunkZVE6Y6D3cjs.Mc; exports.fetchAllCatalogs = _chunkZVE6Y6D3cjs.qd; exports.fetchAllCookies = _chunkZVE6Y6D3cjs.Tc; exports.fetchAllDataCategories = _chunkZVE6Y6D3cjs.Uc; exports.fetchAllDataFlows = _chunkZVE6Y6D3cjs.Vc; exports.fetchAllDataPoints = _chunkZVE6Y6D3cjs.Rd; exports.fetchAllDataSilos = _chunkZVE6Y6D3cjs.Pd; exports.fetchAllDataSubjects = _chunkZVE6Y6D3cjs.sd; exports.fetchAllEnrichers = _chunkZVE6Y6D3cjs.Vd; exports.fetchAllIdentifiers = _chunkZVE6Y6D3cjs.Yf; exports.fetchAllMessages = _chunkZVE6Y6D3cjs.Wc; exports.fetchAllPolicies = _chunkZVE6Y6D3cjs.Zc; exports.fetchAllPreferenceTopics = _chunkZVE6Y6D3cjs.$c; exports.fetchAllPrivacyCenters = _chunkZVE6Y6D3cjs.ad; exports.fetchAllProcessingActivities = _chunkZVE6Y6D3cjs.bd; exports.fetchAllProcessingPurposes = _chunkZVE6Y6D3cjs.cd; exports.fetchAllPromptGroups = _chunkZVE6Y6D3cjs.wd; exports.fetchAllPromptPartials = _chunkZVE6Y6D3cjs.xd; exports.fetchAllPromptThreads = _chunkZVE6Y6D3cjs.Ad; exports.fetchAllPrompts = _chunkZVE6Y6D3cjs.yd; exports.fetchAllPurposes = _chunkZVE6Y6D3cjs.dd; exports.fetchAllPurposesAndPreferences = _chunkZVE6Y6D3cjs.ed; exports.fetchAllRequestAttributeKeys = _chunkZVE6Y6D3cjs.Ic; exports.fetchAllRequestEnrichers = _chunkZVE6Y6D3cjs.fd; exports.fetchAllRequestIdentifierMetadata = _chunkZVE6Y6D3cjs.gd; exports.fetchAllRequestIdentifiers = _chunkZVE6Y6D3cjs.id; exports.fetchAllRequests = _chunkZVE6Y6D3cjs.kd; exports.fetchAllSubDataPoints = _chunkZVE6Y6D3cjs.Qd; exports.fetchAllTeams = _chunkZVE6Y6D3cjs.ld; exports.fetchAllTemplates = _chunkZVE6Y6D3cjs.Xd; exports.fetchAllUsers = _chunkZVE6Y6D3cjs.md; exports.fetchAllVendors = _chunkZVE6Y6D3cjs.nd; exports.fetchAndIndexCatalogs = _chunkZVE6Y6D3cjs.rd; exports.fetchApiKeys = _chunkZVE6Y6D3cjs.pd; exports.fetchConsentManager = _chunkZVE6Y6D3cjs.Nc; exports.fetchConsentManagerAnalyticsData = _chunkZVE6Y6D3cjs.Rc; exports.fetchConsentManagerExperiences = _chunkZVE6Y6D3cjs.Pc; exports.fetchConsentManagerId = _chunkZVE6Y6D3cjs.Oc; exports.fetchConsentManagerTheme = _chunkZVE6Y6D3cjs.Sc; exports.fetchConsentPreferences = _chunk4B22XVLOcjs.j; exports.fetchEnrichedDataSilos = _chunkZVE6Y6D3cjs.Sd; exports.fetchIdentifiersAndCreateMissing = _chunkZVE6Y6D3cjs.Zf; exports.fetchPartitions = _chunkZVE6Y6D3cjs.Zd; exports.fetchPrivacyCenterId = _chunkZVE6Y6D3cjs.Yc; exports.fetchPrivacyCenterUrl = _chunkZVE6Y6D3cjs.Xc; exports.fetchPromptsWithVariables = _chunkZVE6Y6D3cjs.zd; exports.fetchRequestDataSilo = _chunkZVE6Y6D3cjs.Cd; exports.fetchRequestDataSiloActiveCount = _chunkZVE6Y6D3cjs.Dd; exports.fetchRequestDataSilos = _chunkZVE6Y6D3cjs.Bd; exports.fetchRequestFilesForRequest = _chunkZVE6Y6D3cjs.Ed; exports.filterNullishValuesFromObject = Um; exports.filterRows = _chunkZVE6Y6D3cjs.sc; exports.formatAttributeValues = _chunkZVE6Y6D3cjs._c; exports.fuzzyMatchColumns = _chunkZVE6Y6D3cjs.lc; exports.fuzzySearch = _chunkZVE6Y6D3cjs.kc; exports.generateCrossAccountApiKeys = _chunkPVQIV735cjs.a; exports.getErrorStatus = _chunkZVE6Y6D3cjs.Pf; exports.getFileMetadataForPrivacyRequests = _chunkZVE6Y6D3cjs.rf; exports.getGitFilesThatChanged = vm; exports.getUniqueValuesForColumn = _chunkZVE6Y6D3cjs.rc; exports.inquirerAutoComplete = _chunkZVE6Y6D3cjs.Nf; exports.inquirerConfirmBoolean = _chunkZVE6Y6D3cjs.Lf; exports.inquirerConfirmText = _chunkZVE6Y6D3cjs.Mf; exports.limitRecords = _chunkZVE6Y6D3cjs.Uf; exports.listDirectories = _chunkPVQIV735cjs.d; exports.listFiles = _chunkPVQIV735cjs.c; exports.loginUser = _chunkZVE6Y6D3cjs.Fd; exports.makeGraphQLRequest = _chunkZVE6Y6D3cjs.Xf; exports.mapColumnsToAttributes = _chunkZVE6Y6D3cjs.Af; exports.mapColumnsToIdentifiers = _chunkZVE6Y6D3cjs.yf; exports.mapCsvColumnsToApi = _chunkZVE6Y6D3cjs.if; exports.mapCsvRowsToRequestInputs = _chunkZVE6Y6D3cjs.nf; exports.mapEnumValues = _chunkZVE6Y6D3cjs.mc; exports.mapRequestEnumValues = _chunkZVE6Y6D3cjs.jf; exports.markCronIdentifierCompleted = _chunkMRJ2BRU4cjs.d; exports.markRequestDataSiloIdsCompleted = _chunkMRJ2BRU4cjs.f; exports.markSilentPrivacyRequests = _chunkZVE6Y6D3cjs.hf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkGRBF73LScjs.n; exports.normalizeIdentifierValue = _chunkZVE6Y6D3cjs.mf; exports.notifyPrivacyRequestsAdditionalTime = _chunkZVE6Y6D3cjs.xf; exports.parseAssessmentDisplayLogic = _chunkZVE6Y6D3cjs.Md; exports.parseAssessmentRiskLogic = _chunkZVE6Y6D3cjs.Od; exports.parseAttributesFromString = _chunkZVE6Y6D3cjs.pc; exports.parseFilePath = _chunkLR3CPNDMcjs.d; exports.parseVariablesFromString = _chunkZVE6Y6D3cjs.Of; exports.pullAllDatapoints = _chunk63GGJ2XIcjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkMRJ2BRU4cjs.g; exports.pullConsentManagerMetrics = _chunk4B22XVLOcjs.d; exports.pullCronPageOfIdentifiers = _chunkMRJ2BRU4cjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk2STE3YIZcjs.a; exports.pullPrivacyRequests = _chunkZVE6Y6D3cjs.If; exports.pullTranscendConfiguration = _chunkZVE6Y6D3cjs.ae; exports.pullUnstructuredSubDataPointRecommendations = _chunk63GGJ2XIcjs.b; exports.pushCronIdentifiersFromCsv = _chunkMRJ2BRU4cjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk2STE3YIZcjs.d; exports.readCsv = _chunkZVE6Y6D3cjs.qc; exports.readSafe = _chunkZVE6Y6D3cjs.Wf; exports.readTranscendYaml = _chunkSW5CIF5Dcjs.d; exports.removeLinks = Qm; exports.removeUnverifiedRequestIdentifiers = _chunkZVE6Y6D3cjs.Kf; exports.replaceVariablesInYaml = _chunkSW5CIF5Dcjs.c; exports.reportPromptRun = _chunkZVE6Y6D3cjs.be; exports.restartPrivacyRequest = _chunkZVE6Y6D3cjs.Df; exports.retryRequestDataSilos = _chunkZVE6Y6D3cjs.Hf; exports.retryRequestEnricher = _chunkZVE6Y6D3cjs.ce; exports.retrySamePromise = _chunkZVE6Y6D3cjs.Tf; exports.setResourceAttributes = _chunkZVE6Y6D3cjs.de; exports.skipPreflightJobs = _chunkZVE6Y6D3cjs.Ff; exports.skipRequestDataSilos = _chunkZVE6Y6D3cjs.Jf; exports.sleepPromise = _chunkZVE6Y6D3cjs.Rf; exports.splitCsvToList = _chunkZVE6Y6D3cjs.nc; exports.splitInHalf = _chunkZVE6Y6D3cjs.Sf; exports.streamPrivacyRequestFiles = _chunkZVE6Y6D3cjs.sf; exports.submitPrivacyRequest = _chunkZVE6Y6D3cjs.vf; exports.syncAction = _chunkZVE6Y6D3cjs.ee; exports.syncActionItemCollections = _chunkZVE6Y6D3cjs.he; exports.syncActionItems = _chunkZVE6Y6D3cjs.ke; exports.syncAgentFiles = _chunkZVE6Y6D3cjs.ne; exports.syncAgentFunctions = _chunkZVE6Y6D3cjs.qe; exports.syncAgents = _chunkZVE6Y6D3cjs.te; exports.syncAttribute = _chunkZVE6Y6D3cjs.ue; exports.syncBusinessEntities = _chunkZVE6Y6D3cjs.xe; exports.syncCodePackages = _chunkZVE6Y6D3cjs.Ge; exports.syncConfigurationToTranscend = _chunkZVE6Y6D3cjs._f; exports.syncConsentManager = _chunkZVE6Y6D3cjs.Ie; exports.syncConsentManagerExperiences = _chunkZVE6Y6D3cjs.He; exports.syncCookies = _chunkZVE6Y6D3cjs.Ke; exports.syncDataCategories = _chunkZVE6Y6D3cjs.Ne; exports.syncDataFlows = _chunkZVE6Y6D3cjs.Qe; exports.syncDataSiloDependencies = _chunkZVE6Y6D3cjs.Ud; exports.syncDataSilos = _chunkZVE6Y6D3cjs.Td; exports.syncDataSubject = _chunkZVE6Y6D3cjs.Re; exports.syncEnricher = _chunkZVE6Y6D3cjs.Wd; exports.syncIdentifier = _chunkZVE6Y6D3cjs.Se; exports.syncIntlMessages = _chunkZVE6Y6D3cjs.Ue; exports.syncPartitions = _chunkZVE6Y6D3cjs._d; exports.syncPolicies = _chunkZVE6Y6D3cjs.We; exports.syncPrivacyCenter = _chunkZVE6Y6D3cjs.Xe; exports.syncProcessingActivities = _chunkZVE6Y6D3cjs.Ye; exports.syncProcessingPurposes = _chunkZVE6Y6D3cjs.$e; exports.syncPrompts = _chunkZVE6Y6D3cjs.cf; exports.syncRepositories = _chunkZVE6Y6D3cjs.De; exports.syncSoftwareDevelopmentKits = _chunkZVE6Y6D3cjs.Ae; exports.syncTemplate = _chunkZVE6Y6D3cjs.Yd; exports.syncVendors = _chunkZVE6Y6D3cjs.ff; exports.updateActionItem = _chunkZVE6Y6D3cjs.je; exports.updateActionItemCollection = _chunkZVE6Y6D3cjs.ge; exports.updateAgentFiles = _chunkZVE6Y6D3cjs.me; exports.updateAgentFunctions = _chunkZVE6Y6D3cjs.pe; exports.updateAgents = _chunkZVE6Y6D3cjs.se; exports.updateBusinessEntities = _chunkZVE6Y6D3cjs.we; exports.updateCodePackages = _chunkZVE6Y6D3cjs.Fe; exports.updateConsentManagerToLatest = _chunkZVE6Y6D3cjs.zc; exports.updateConsentManagerVersionToLatest = _chunk4B22XVLOcjs.a; exports.updateDataCategories = _chunkZVE6Y6D3cjs.Me; exports.updateDataFlows = _chunkZVE6Y6D3cjs.Oe; exports.updateIntlMessages = _chunkZVE6Y6D3cjs.Te; exports.updateOrCreateCookies = _chunkZVE6Y6D3cjs.Je; exports.updatePolicies = _chunkZVE6Y6D3cjs.Ve; exports.updateProcessingPurposes = _chunkZVE6Y6D3cjs._e; exports.updatePrompts = _chunkZVE6Y6D3cjs.bf; exports.updateRepositories = _chunkZVE6Y6D3cjs.Ce; exports.updateSoftwareDevelopmentKits = _chunkZVE6Y6D3cjs.ze; exports.updateVendors = _chunkZVE6Y6D3cjs.ef; exports.uploadConsents = _chunkMKLPDKJQcjs.f; exports.uploadCookiesFromCsv = _chunk4B22XVLOcjs.c; exports.uploadDataFlowsFromCsv = _chunk4B22XVLOcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkZVE6Y6D3cjs.Cf; exports.uploadSiloDiscoveryResults = _chunkZVE6Y6D3cjs.gf; exports.validateTranscendAuth = _chunkPVQIV735cjs.b; exports.version = _chunkGRBF73LScjs.m; exports.writeCsv = _chunkLR3CPNDMcjs.c; exports.writeCsvSync = _chunkLR3CPNDMcjs.a; exports.writeLargeCsv = _chunkLR3CPNDMcjs.e; exports.writeTranscendYaml = _chunkSW5CIF5Dcjs.e;
5
5
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"AAAA,6OAAiE,wDAAkD,wDAA0C,wDAA0E,wDAAkE,wDAA0F,wDAA0E,wDAAkH,wDAAkE,wDAAknB,wDAA4xG,wDAAgD,gCAA6B,wDAA+K,wDAA4E,qDCOh1J,iEAkBA,2DAaA,ICtBDA,CAAAA,CAAY,EAAA,CAQlB,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CAC+B,CAC/B,IAAMC,CAAAA,CAA4C,CAAC,CAAA,CAC/CC,CAAAA,CAAS,CAAA,CAGTC,CAAAA,CAAiB,CAAA,CAAA,CACrB,EAAG,CACD,GAAM,CACJ,mBAAA,CAAqB,CAAE,KAAA,CAAAC,CAAM,CAC/B,CAAA,CAAI,MAAMC,kCAAAA,CAMPL,CAAQM,oBAAAA,CAAuB,CAChC,KAAA,CAAOR,CAAAA,CACP,MAAA,CAAAI,CACF,CAAC,CAAA,CACDD,CAAAA,CAAoB,IAAA,CAAK,GAAGG,CAAK,CAAA,CACjCF,CAAAA,EAAUJ,CAAAA,CACVK,CAAAA,CAAiBC,CAAAA,CAAM,MAAA,GAAWN,CACpC,CAAA,KAAA,CAASK,CAAAA,CAAAA,CAET,OAAOF,CAAAA,CAAoB,IAAA,CAAK,CAACM,CAAAA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A,CACR,CAAA,+BAAA,EACE,OAAOD,CAAAA,EAAuB,QAAA,CAC1BA,CAAAA,CACA,IAAA,CAAK,SAAA,CAAUA,CAAkB,CACvC,CAAA,CAAA;AE1ZG;AAiBI;AA4Bf","file":"/home/runner/work/cli/cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from 'bluebird';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"AAAA,6OAAiE,wDAAkD,wDAA0C,wDAA0E,wDAA0F,wDAA0E,wDAAkH,wDAAkE,wDAAkE,wDAAknB,wDAAqyG,wDAAg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C,IAAA,CAAK,eAAA,CAAgBA,CAAAA,CAAM,OAAO,CAAA,CAAIA,CACxC,CAAC,CAAA,CACDY,CAAAA,CAAa,IAAA,CAAK,GAAGG,CAAY,CACnC,CAAC,CAAA,CACM,CAAC,GAAGN,CAAAA,CAAc,GAAGG,CAAY,CAC1C,CAQA,aAAA,CAAcI,CAAAA,CAAmD,CAC/D,OAAOC,kCAAAA,IAAmB,CAAK,aAAA,CAAeD,CAAQ,CACxD,CAQA,qBAAA,CACEE,CAAAA,CACoB,CACpB,IAAMC,CAAAA,CAAW,IAAA,CAAK,mBAAA,CAAoB,IAAA,CAAM5B,CAAAA,EAC9C,OAAO2B,CAAAA,EAAuB,QAAA,CAC1B3B,CAAAA,CAAM,EAAA,GAAO2B,CAAAA,CACb3B,CAAAA,CAAM,IAAA,GAAS2B,CAAAA,CAAmB,IAAA,EAClC3B,CAAAA,CAAM,MAAA,GAAW2B,CAAAA,CAAmB,MAC1C,CAAA,CACA,EAAA,CAAI,CAACC,CAAAA,CACH,MAAM,IAAI,KAAA,CACR,CAAA,+BAAA,EACE,OAAOD,CAAAA,EAAuB,QAAA,CAC1BA,CAAAA,CACA,IAAA,CAAK,SAAA,CAAUA,CAAkB,CACvC,CAAA,CAAA;AE1ZG;AAiBI;AA4Bf","file":"/home/runner/work/cli/cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from 'bluebird';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}