@keystrokehq/platform 0.1.137 → 0.1.139

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 (313) hide show
  1. package/dist/{awk2-LA3USKJP-Dkvv5jY7.mjs → awk2-LA3USKJP-C7HIqG-Y.mjs} +2 -2
  2. package/dist/{awk2-LA3USKJP-Dkvv5jY7.mjs.map → awk2-LA3USKJP-C7HIqG-Y.mjs.map} +1 -1
  3. package/dist/{awk2-LA3USKJP-C0P-iA2d.cjs → awk2-LA3USKJP-CBRDMAan.cjs} +2 -2
  4. package/dist/{awk2-LA3USKJP-C0P-iA2d.cjs.map → awk2-LA3USKJP-CBRDMAan.cjs.map} +1 -1
  5. package/dist/{base64-C2AIWVNC-ANQosZZO.mjs → base64-C2AIWVNC-BOfHbhLV.mjs} +2 -2
  6. package/dist/{base64-C2AIWVNC-ANQosZZO.mjs.map → base64-C2AIWVNC-BOfHbhLV.mjs.map} +1 -1
  7. package/dist/{base64-C2AIWVNC-Ce_NpX53.cjs → base64-C2AIWVNC-DFdQ4Wy4.cjs} +2 -2
  8. package/dist/{base64-C2AIWVNC-Ce_NpX53.cjs.map → base64-C2AIWVNC-DFdQ4Wy4.cjs.map} +1 -1
  9. package/dist/{bash-YZ33HQZQ-Y_wB6zeO.mjs → bash-YZ33HQZQ-B-gs_y9T.mjs} +2 -2
  10. package/dist/{bash-YZ33HQZQ-Y_wB6zeO.mjs.map → bash-YZ33HQZQ-B-gs_y9T.mjs.map} +1 -1
  11. package/dist/{bash-YZ33HQZQ-Cp-9nNQH.cjs → bash-YZ33HQZQ-Dctq21H_.cjs} +2 -2
  12. package/dist/{bash-YZ33HQZQ-Cp-9nNQH.cjs.map → bash-YZ33HQZQ-Dctq21H_.cjs.map} +1 -1
  13. package/dist/{cat-TSFMZVYS-B3-upLd-.mjs → cat-TSFMZVYS-Bguvdwng.mjs} +3 -3
  14. package/dist/{cat-TSFMZVYS-B3-upLd-.mjs.map → cat-TSFMZVYS-Bguvdwng.mjs.map} +1 -1
  15. package/dist/{cat-TSFMZVYS-CIM-EFa_.cjs → cat-TSFMZVYS-Nhsy_7eJ.cjs} +3 -3
  16. package/dist/{cat-TSFMZVYS-CIM-EFa_.cjs.map → cat-TSFMZVYS-Nhsy_7eJ.cjs.map} +1 -1
  17. package/dist/{chunk-5H5SCKJM-CDJ5filS.cjs → chunk-5H5SCKJM-JU-o3yyn.cjs} +2 -2
  18. package/dist/{chunk-5H5SCKJM-CDJ5filS.cjs.map → chunk-5H5SCKJM-JU-o3yyn.cjs.map} +1 -1
  19. package/dist/{chunk-5H5SCKJM-BEu8n83k.mjs → chunk-5H5SCKJM-wWlXvPet.mjs} +2 -2
  20. package/dist/{chunk-5H5SCKJM-BEu8n83k.mjs.map → chunk-5H5SCKJM-wWlXvPet.mjs.map} +1 -1
  21. package/dist/{chunk-AQ6FYS2X-DgLOXmv9.mjs → chunk-AQ6FYS2X-CiJEKxZx.mjs} +2 -2
  22. package/dist/{chunk-AQ6FYS2X-DgLOXmv9.mjs.map → chunk-AQ6FYS2X-CiJEKxZx.mjs.map} +1 -1
  23. package/dist/{chunk-AQ6FYS2X-B1rjI3DZ.cjs → chunk-AQ6FYS2X-DX1_O--e.cjs} +2 -2
  24. package/dist/{chunk-AQ6FYS2X-B1rjI3DZ.cjs.map → chunk-AQ6FYS2X-DX1_O--e.cjs.map} +1 -1
  25. package/dist/{chunk-CHFEPBH4-BDwXeEhO.mjs → chunk-CHFEPBH4-D6eAoaH3.mjs} +2 -2
  26. package/dist/{chunk-CHFEPBH4-BDwXeEhO.mjs.map → chunk-CHFEPBH4-D6eAoaH3.mjs.map} +1 -1
  27. package/dist/{chunk-CHFEPBH4-BAcmtLxI.cjs → chunk-CHFEPBH4-Dl_4Ve2o.cjs} +2 -2
  28. package/dist/{chunk-CHFEPBH4-BAcmtLxI.cjs.map → chunk-CHFEPBH4-Dl_4Ve2o.cjs.map} +1 -1
  29. package/dist/{chunk-EBAPSGAO-CaiNEJxm.cjs → chunk-EBAPSGAO-BptaP6Es.cjs} +2 -2
  30. package/dist/{chunk-EBAPSGAO-CaiNEJxm.cjs.map → chunk-EBAPSGAO-BptaP6Es.cjs.map} +1 -1
  31. package/dist/{chunk-EBAPSGAO-BghSCFBD.mjs → chunk-EBAPSGAO-DjaFpKa0.mjs} +2 -2
  32. package/dist/{chunk-EBAPSGAO-BghSCFBD.mjs.map → chunk-EBAPSGAO-DjaFpKa0.mjs.map} +1 -1
  33. package/dist/{chunk-LEKBROJD-NYGnuQ_E.mjs → chunk-LEKBROJD-3dFGZEaP.mjs} +2 -2
  34. package/dist/{chunk-LEKBROJD-NYGnuQ_E.mjs.map → chunk-LEKBROJD-3dFGZEaP.mjs.map} +1 -1
  35. package/dist/{chunk-LEKBROJD-B7L7Pf77.cjs → chunk-LEKBROJD-TDLioftI.cjs} +2 -2
  36. package/dist/{chunk-LEKBROJD-B7L7Pf77.cjs.map → chunk-LEKBROJD-TDLioftI.cjs.map} +1 -1
  37. package/dist/{chunk-VPADYNBD-C5CHTOea.cjs → chunk-VPADYNBD-LO6r6CFp.cjs} +2 -2
  38. package/dist/{chunk-VPADYNBD-C5CHTOea.cjs.map → chunk-VPADYNBD-LO6r6CFp.cjs.map} +1 -1
  39. package/dist/{chunk-VPADYNBD-CX4n3daA.mjs → chunk-VPADYNBD-jt60EXEo.mjs} +2 -2
  40. package/dist/{chunk-VPADYNBD-CX4n3daA.mjs.map → chunk-VPADYNBD-jt60EXEo.mjs.map} +1 -1
  41. package/dist/{chunk-YCLFEX4T-CECLXj_F.cjs → chunk-YCLFEX4T-BvMlCByz.cjs} +2 -2
  42. package/dist/{chunk-YCLFEX4T-CECLXj_F.cjs.map → chunk-YCLFEX4T-BvMlCByz.cjs.map} +1 -1
  43. package/dist/{chunk-YCLFEX4T-BeiOBg74.mjs → chunk-YCLFEX4T-D_N6ACyW.mjs} +2 -2
  44. package/dist/{chunk-YCLFEX4T-BeiOBg74.mjs.map → chunk-YCLFEX4T-D_N6ACyW.mjs.map} +1 -1
  45. package/dist/{column-XT6UFXNQ-CybsJSs-.mjs → column-XT6UFXNQ-3mtxBkZ-.mjs} +2 -2
  46. package/dist/{column-XT6UFXNQ-CybsJSs-.mjs.map → column-XT6UFXNQ-3mtxBkZ-.mjs.map} +1 -1
  47. package/dist/{column-XT6UFXNQ-QbgqUj7G.cjs → column-XT6UFXNQ-Brgdarf5.cjs} +2 -2
  48. package/dist/{column-XT6UFXNQ-QbgqUj7G.cjs.map → column-XT6UFXNQ-Brgdarf5.cjs.map} +1 -1
  49. package/dist/{comm-VV2LDX2J-Bz4-yfow.mjs → comm-VV2LDX2J-Dda-s_pB.mjs} +2 -2
  50. package/dist/{comm-VV2LDX2J-Bz4-yfow.mjs.map → comm-VV2LDX2J-Dda-s_pB.mjs.map} +1 -1
  51. package/dist/{comm-VV2LDX2J-DBXTD5CT.cjs → comm-VV2LDX2J-poqDMPQN.cjs} +2 -2
  52. package/dist/{comm-VV2LDX2J-DBXTD5CT.cjs.map → comm-VV2LDX2J-poqDMPQN.cjs.map} +1 -1
  53. package/dist/{config-id_0M71M.mjs → config-CIlTh0FG.mjs} +3 -3
  54. package/dist/{config-id_0M71M.mjs.map → config-CIlTh0FG.mjs.map} +1 -1
  55. package/dist/{config-Both4IFf.cjs → config-Cz6PI5HC.cjs} +3 -3
  56. package/dist/{config-Both4IFf.cjs.map → config-Cz6PI5HC.cjs.map} +1 -1
  57. package/dist/config.cjs +2 -2
  58. package/dist/config.mjs +2 -2
  59. package/dist/{cp-BISAAS7A-DOYnjg5q.mjs → cp-BISAAS7A-Cdj_g_EI.mjs} +2 -2
  60. package/dist/{cp-BISAAS7A-DOYnjg5q.mjs.map → cp-BISAAS7A-Cdj_g_EI.mjs.map} +1 -1
  61. package/dist/{cp-BISAAS7A-CPChJE0l.cjs → cp-BISAAS7A-CpsET9N2.cjs} +2 -2
  62. package/dist/{cp-BISAAS7A-CPChJE0l.cjs.map → cp-BISAAS7A-CpsET9N2.cjs.map} +1 -1
  63. package/dist/{cut-OKARJCCV-DapYln0r.cjs → cut-OKARJCCV-D3zl9qlm.cjs} +3 -3
  64. package/dist/{cut-OKARJCCV-DapYln0r.cjs.map → cut-OKARJCCV-D3zl9qlm.cjs.map} +1 -1
  65. package/dist/{cut-OKARJCCV-CI4G2RYw.mjs → cut-OKARJCCV-svOh9K0k.mjs} +3 -3
  66. package/dist/{cut-OKARJCCV-CI4G2RYw.mjs.map → cut-OKARJCCV-svOh9K0k.mjs.map} +1 -1
  67. package/dist/{diff-MWJFIG7X-DYJBnkBt.mjs → diff-MWJFIG7X-BlRlnTas.mjs} +2 -2
  68. package/dist/{diff-MWJFIG7X-DYJBnkBt.mjs.map → diff-MWJFIG7X-BlRlnTas.mjs.map} +1 -1
  69. package/dist/{diff-MWJFIG7X-DttEpEZ1.cjs → diff-MWJFIG7X-DiujN7nb.cjs} +2 -2
  70. package/dist/{diff-MWJFIG7X-DttEpEZ1.cjs.map → diff-MWJFIG7X-DiujN7nb.cjs.map} +1 -1
  71. package/dist/{dist-BjSWZPQE.cjs → dist-Bn6FqOjo.cjs} +2 -2
  72. package/dist/{dist-BjSWZPQE.cjs.map → dist-Bn6FqOjo.cjs.map} +1 -1
  73. package/dist/{dist-Be1qf5oG.mjs → dist-C6UOLCe7.mjs} +2 -2
  74. package/dist/{dist-Be1qf5oG.mjs.map → dist-C6UOLCe7.mjs.map} +1 -1
  75. package/dist/{du-572XNP42-CXcMD4tL.cjs → du-572XNP42-DsDf9B_u.cjs} +2 -2
  76. package/dist/{du-572XNP42-CXcMD4tL.cjs.map → du-572XNP42-DsDf9B_u.cjs.map} +1 -1
  77. package/dist/{du-572XNP42-D8XFyLjc.mjs → du-572XNP42-MGUILTga.mjs} +2 -2
  78. package/dist/{du-572XNP42-D8XFyLjc.mjs.map → du-572XNP42-MGUILTga.mjs.map} +1 -1
  79. package/dist/{env-36M5BO7M-i9W9apKw.cjs → env-36M5BO7M-B1Ig8dv2.cjs} +2 -2
  80. package/dist/{env-36M5BO7M-i9W9apKw.cjs.map → env-36M5BO7M-B1Ig8dv2.cjs.map} +1 -1
  81. package/dist/{env-36M5BO7M-CuVMr8CV.mjs → env-36M5BO7M-BFB8T1Xv.mjs} +2 -2
  82. package/dist/{env-36M5BO7M-CuVMr8CV.mjs.map → env-36M5BO7M-BFB8T1Xv.mjs.map} +1 -1
  83. package/dist/{expand-JSPG6VOP-CTg6IfXP.mjs → expand-JSPG6VOP-CbqHu_iG.mjs} +2 -2
  84. package/dist/{expand-JSPG6VOP-CTg6IfXP.mjs.map → expand-JSPG6VOP-CbqHu_iG.mjs.map} +1 -1
  85. package/dist/{expand-JSPG6VOP-Dc30wW6j.cjs → expand-JSPG6VOP-iCztQuOm.cjs} +2 -2
  86. package/dist/{expand-JSPG6VOP-Dc30wW6j.cjs.map → expand-JSPG6VOP-iCztQuOm.cjs.map} +1 -1
  87. package/dist/{expr-5JAACS4X-CaaFtmLU.mjs → expr-5JAACS4X-DzKdQa_T.mjs} +2 -2
  88. package/dist/{expr-5JAACS4X-CaaFtmLU.mjs.map → expr-5JAACS4X-DzKdQa_T.mjs.map} +1 -1
  89. package/dist/{expr-5JAACS4X-CI41LWK3.cjs → expr-5JAACS4X-dfZDCIo4.cjs} +2 -2
  90. package/dist/{expr-5JAACS4X-CI41LWK3.cjs.map → expr-5JAACS4X-dfZDCIo4.cjs.map} +1 -1
  91. package/dist/{find-INTH3OLC-ClREHvVG.cjs → find-INTH3OLC-B9OnuI2z.cjs} +3 -3
  92. package/dist/{find-INTH3OLC-ClREHvVG.cjs.map → find-INTH3OLC-B9OnuI2z.cjs.map} +1 -1
  93. package/dist/{find-INTH3OLC-DX67SADv.mjs → find-INTH3OLC-DfzbkIc8.mjs} +3 -3
  94. package/dist/{find-INTH3OLC-DX67SADv.mjs.map → find-INTH3OLC-DfzbkIc8.mjs.map} +1 -1
  95. package/dist/{fold-4TQNYMSW-7VjWQ4QI.mjs → fold-4TQNYMSW-C9ZeWW9X.mjs} +2 -2
  96. package/dist/{fold-4TQNYMSW-7VjWQ4QI.mjs.map → fold-4TQNYMSW-C9ZeWW9X.mjs.map} +1 -1
  97. package/dist/{fold-4TQNYMSW-CiI-09Bg.cjs → fold-4TQNYMSW-Z5rNofkJ.cjs} +2 -2
  98. package/dist/{fold-4TQNYMSW-CiI-09Bg.cjs.map → fold-4TQNYMSW-Z5rNofkJ.cjs.map} +1 -1
  99. package/dist/{grep-V3LQVMRQ-Bpvr0Mpn.mjs → grep-V3LQVMRQ-TUKvGjZZ.mjs} +4 -4
  100. package/dist/{grep-V3LQVMRQ-Bpvr0Mpn.mjs.map → grep-V3LQVMRQ-TUKvGjZZ.mjs.map} +1 -1
  101. package/dist/{grep-V3LQVMRQ-B-yQCyTj.cjs → grep-V3LQVMRQ-mcCG7AzI.cjs} +4 -4
  102. package/dist/{grep-V3LQVMRQ-B-yQCyTj.cjs.map → grep-V3LQVMRQ-mcCG7AzI.cjs.map} +1 -1
  103. package/dist/{gzip-O5ASJAFY-BmEOcfE-.mjs → gzip-O5ASJAFY-BNu1ENax.mjs} +2 -2
  104. package/dist/{gzip-O5ASJAFY-BmEOcfE-.mjs.map → gzip-O5ASJAFY-BNu1ENax.mjs.map} +1 -1
  105. package/dist/{gzip-O5ASJAFY-DN2O8hU4.cjs → gzip-O5ASJAFY-D3jOhkoj.cjs} +2 -2
  106. package/dist/{gzip-O5ASJAFY-DN2O8hU4.cjs.map → gzip-O5ASJAFY-D3jOhkoj.cjs.map} +1 -1
  107. package/dist/{head-442HYESI-D2cqOY9x.cjs → head-442HYESI-6SdfBcuE.cjs} +2 -2
  108. package/dist/{head-442HYESI-D2cqOY9x.cjs.map → head-442HYESI-6SdfBcuE.cjs.map} +1 -1
  109. package/dist/{head-442HYESI-B67GXSno.mjs → head-442HYESI-B7eu8_gu.mjs} +2 -2
  110. package/dist/{head-442HYESI-B67GXSno.mjs.map → head-442HYESI-B7eu8_gu.mjs.map} +1 -1
  111. package/dist/{help-HZ6M2CKN-CnDImHHN.mjs → help-HZ6M2CKN-Cqa3cgev.mjs} +2 -2
  112. package/dist/{help-HZ6M2CKN-CnDImHHN.mjs.map → help-HZ6M2CKN-Cqa3cgev.mjs.map} +1 -1
  113. package/dist/{help-HZ6M2CKN-COppZEBO.cjs → help-HZ6M2CKN-CwhwnQRo.cjs} +2 -2
  114. package/dist/{help-HZ6M2CKN-COppZEBO.cjs.map → help-HZ6M2CKN-CwhwnQRo.cjs.map} +1 -1
  115. package/dist/{html-to-markdown-JW4MSQZO-uRL4Uhwv.cjs → html-to-markdown-JW4MSQZO-5Z0eACHg.cjs} +3 -3
  116. package/dist/{html-to-markdown-JW4MSQZO-uRL4Uhwv.cjs.map → html-to-markdown-JW4MSQZO-5Z0eACHg.cjs.map} +1 -1
  117. package/dist/{html-to-markdown-JW4MSQZO-um7QN7nh.mjs → html-to-markdown-JW4MSQZO-CCnMRxG-.mjs} +3 -3
  118. package/dist/{html-to-markdown-JW4MSQZO-um7QN7nh.mjs.map → html-to-markdown-JW4MSQZO-CCnMRxG-.mjs.map} +1 -1
  119. package/dist/internal.cjs +2 -2
  120. package/dist/internal.d.cts +1 -1
  121. package/dist/internal.d.mts +1 -1
  122. package/dist/internal.mjs +2 -2
  123. package/dist/{join-TBRGI3LQ-B0toqAJi.mjs → join-TBRGI3LQ-CzfDzaoD.mjs} +2 -2
  124. package/dist/{join-TBRGI3LQ-B0toqAJi.mjs.map → join-TBRGI3LQ-CzfDzaoD.mjs.map} +1 -1
  125. package/dist/{join-TBRGI3LQ-BDsfWv79.cjs → join-TBRGI3LQ-DKvnahEp.cjs} +2 -2
  126. package/dist/{join-TBRGI3LQ-BDsfWv79.cjs.map → join-TBRGI3LQ-DKvnahEp.cjs.map} +1 -1
  127. package/dist/{jq-4XLYLOS5-BGlA-L3p.cjs → jq-4XLYLOS5-CQhuKeQf.cjs} +4 -4
  128. package/dist/{jq-4XLYLOS5-BGlA-L3p.cjs.map → jq-4XLYLOS5-CQhuKeQf.cjs.map} +1 -1
  129. package/dist/{jq-4XLYLOS5-dDTWKaUu.mjs → jq-4XLYLOS5-DItVqDnp.mjs} +4 -4
  130. package/dist/{jq-4XLYLOS5-dDTWKaUu.mjs.map → jq-4XLYLOS5-DItVqDnp.mjs.map} +1 -1
  131. package/dist/{js-exec-N5KEZBH7-DM89ODUx.mjs → js-exec-N5KEZBH7-DUPt_Z7O.mjs} +3 -3
  132. package/dist/{js-exec-N5KEZBH7-DM89ODUx.mjs.map → js-exec-N5KEZBH7-DUPt_Z7O.mjs.map} +1 -1
  133. package/dist/{js-exec-N5KEZBH7-D7caAUad.cjs → js-exec-N5KEZBH7-xabCsliy.cjs} +3 -3
  134. package/dist/{js-exec-N5KEZBH7-D7caAUad.cjs.map → js-exec-N5KEZBH7-xabCsliy.cjs.map} +1 -1
  135. package/dist/{lib-ph6W4ya5.mjs → lib-BRZqh95j.mjs} +2 -2
  136. package/dist/{lib-ph6W4ya5.mjs.map → lib-BRZqh95j.mjs.map} +1 -1
  137. package/dist/{lib-Bpb87tt3.cjs → lib-BVh0zqgv.cjs} +2 -2
  138. package/dist/{lib-Bpb87tt3.cjs.map → lib-BVh0zqgv.cjs.map} +1 -1
  139. package/dist/{ln-4LGSXXGD-DxTIbKoO.cjs → ln-4LGSXXGD-BV368N4L.cjs} +2 -2
  140. package/dist/{ln-4LGSXXGD-DxTIbKoO.cjs.map → ln-4LGSXXGD-BV368N4L.cjs.map} +1 -1
  141. package/dist/{ln-4LGSXXGD-D8g-wlxV.mjs → ln-4LGSXXGD-ukhDXFka.mjs} +2 -2
  142. package/dist/{ln-4LGSXXGD-D8g-wlxV.mjs.map → ln-4LGSXXGD-ukhDXFka.mjs.map} +1 -1
  143. package/dist/{ls-ZJGQER7M-B7za06BY.mjs → ls-ZJGQER7M-BIvrJOW0.mjs} +2 -2
  144. package/dist/{ls-ZJGQER7M-B7za06BY.mjs.map → ls-ZJGQER7M-BIvrJOW0.mjs.map} +1 -1
  145. package/dist/{ls-ZJGQER7M-CObDZFTk.cjs → ls-ZJGQER7M-DyZfpoXQ.cjs} +2 -2
  146. package/dist/{ls-ZJGQER7M-CObDZFTk.cjs.map → ls-ZJGQER7M-DyZfpoXQ.cjs.map} +1 -1
  147. package/dist/{lzma-BSQDlIQN.cjs → lzma--Pv2Xgt8.cjs} +2 -2
  148. package/dist/{lzma-BSQDlIQN.cjs.map → lzma--Pv2Xgt8.cjs.map} +1 -1
  149. package/dist/{md5sum-SPU24VSG-Bh-AOXLv.mjs → md5sum-SPU24VSG-C-oTPc3D.mjs} +3 -3
  150. package/dist/{md5sum-SPU24VSG-Bh-AOXLv.mjs.map → md5sum-SPU24VSG-C-oTPc3D.mjs.map} +1 -1
  151. package/dist/{md5sum-SPU24VSG-BCD3Vvog.cjs → md5sum-SPU24VSG-DW-Yn5Ea.cjs} +3 -3
  152. package/dist/{md5sum-SPU24VSG-BCD3Vvog.cjs.map → md5sum-SPU24VSG-DW-Yn5Ea.cjs.map} +1 -1
  153. package/dist/{mkdir-MEPGZOB6-ClFzI5ot.cjs → mkdir-MEPGZOB6-CDmkCE7T.cjs} +2 -2
  154. package/dist/{mkdir-MEPGZOB6-ClFzI5ot.cjs.map → mkdir-MEPGZOB6-CDmkCE7T.cjs.map} +1 -1
  155. package/dist/{mkdir-MEPGZOB6-DmGfAjV8.mjs → mkdir-MEPGZOB6-CW9J0ZoC.mjs} +2 -2
  156. package/dist/{mkdir-MEPGZOB6-DmGfAjV8.mjs.map → mkdir-MEPGZOB6-CW9J0ZoC.mjs.map} +1 -1
  157. package/dist/{mv-W5BIQ646-Bis62MoP.mjs → mv-W5BIQ646-CLyvWwPi.mjs} +2 -2
  158. package/dist/{mv-W5BIQ646-Bis62MoP.mjs.map → mv-W5BIQ646-CLyvWwPi.mjs.map} +1 -1
  159. package/dist/{mv-W5BIQ646-Cx1Tjfrw.cjs → mv-W5BIQ646-wsQRa08r.cjs} +2 -2
  160. package/dist/{mv-W5BIQ646-Cx1Tjfrw.cjs.map → mv-W5BIQ646-wsQRa08r.cjs.map} +1 -1
  161. package/dist/{nl-WSDW7I4O-BwD8F366.cjs → nl-WSDW7I4O-B3xICQca.cjs} +2 -2
  162. package/dist/{nl-WSDW7I4O-BwD8F366.cjs.map → nl-WSDW7I4O-B3xICQca.cjs.map} +1 -1
  163. package/dist/{nl-WSDW7I4O-CWws_khy.mjs → nl-WSDW7I4O-CAKElj1v.mjs} +2 -2
  164. package/dist/{nl-WSDW7I4O-CWws_khy.mjs.map → nl-WSDW7I4O-CAKElj1v.mjs.map} +1 -1
  165. package/dist/{od-WOKFDJTP-B6QFCo_T.mjs → od-WOKFDJTP-DN2NbNt9.mjs} +2 -2
  166. package/dist/{od-WOKFDJTP-B6QFCo_T.mjs.map → od-WOKFDJTP-DN2NbNt9.mjs.map} +1 -1
  167. package/dist/{od-WOKFDJTP-Bd_dgbLX.cjs → od-WOKFDJTP-lGGteT5o.cjs} +2 -2
  168. package/dist/{od-WOKFDJTP-Bd_dgbLX.cjs.map → od-WOKFDJTP-lGGteT5o.cjs.map} +1 -1
  169. package/dist/{paste-7JC6S4DX-y0vGpAq3.cjs → paste-7JC6S4DX-3HRUhme7.cjs} +2 -2
  170. package/dist/{paste-7JC6S4DX-y0vGpAq3.cjs.map → paste-7JC6S4DX-3HRUhme7.cjs.map} +1 -1
  171. package/dist/{paste-7JC6S4DX-QJ1I5rKR.mjs → paste-7JC6S4DX-CxD9ipno.mjs} +2 -2
  172. package/dist/{paste-7JC6S4DX-QJ1I5rKR.mjs.map → paste-7JC6S4DX-CxD9ipno.mjs.map} +1 -1
  173. package/dist/{printf-TWGXF445-tSik9xL5.mjs → printf-TWGXF445-B973bM8O.mjs} +3 -3
  174. package/dist/{printf-TWGXF445-tSik9xL5.mjs.map → printf-TWGXF445-B973bM8O.mjs.map} +1 -1
  175. package/dist/{printf-TWGXF445-DCipNfuO.cjs → printf-TWGXF445-BQQbCafB.cjs} +3 -3
  176. package/dist/{printf-TWGXF445-DCipNfuO.cjs.map → printf-TWGXF445-BQQbCafB.cjs.map} +1 -1
  177. package/dist/{project-draft-notifier-CcWjsCtB.cjs → project-draft-notifier-P63mxlNb.cjs} +15 -6
  178. package/dist/project-draft-notifier-P63mxlNb.cjs.map +1 -0
  179. package/dist/{project-draft-notifier-Hm1hmAse.mjs → project-draft-notifier-SRvWkppn.mjs} +15 -6
  180. package/dist/project-draft-notifier-SRvWkppn.mjs.map +1 -0
  181. package/dist/{python3-POMOR4OA-CUDU5PiQ.cjs → python3-POMOR4OA-BO86N2vc.cjs} +3 -3
  182. package/dist/{python3-POMOR4OA-CUDU5PiQ.cjs.map → python3-POMOR4OA-BO86N2vc.cjs.map} +1 -1
  183. package/dist/{python3-POMOR4OA-BgAR3yY8.mjs → python3-POMOR4OA-C7BSBjey.mjs} +3 -3
  184. package/dist/{python3-POMOR4OA-BgAR3yY8.mjs.map → python3-POMOR4OA-C7BSBjey.mjs.map} +1 -1
  185. package/dist/{rev-5EHFX4EJ-DnSzHnZp.mjs → rev-5EHFX4EJ-BjIxmM3b.mjs} +2 -2
  186. package/dist/{rev-5EHFX4EJ-DnSzHnZp.mjs.map → rev-5EHFX4EJ-BjIxmM3b.mjs.map} +1 -1
  187. package/dist/{rev-5EHFX4EJ-CiEh7g65.cjs → rev-5EHFX4EJ-JzWduX26.cjs} +2 -2
  188. package/dist/{rev-5EHFX4EJ-CiEh7g65.cjs.map → rev-5EHFX4EJ-JzWduX26.cjs.map} +1 -1
  189. package/dist/{rg-S4FXYXWB-BPu_jljB.cjs → rg-S4FXYXWB-D4HAUjZI.cjs} +3 -3
  190. package/dist/{rg-S4FXYXWB-BPu_jljB.cjs.map → rg-S4FXYXWB-D4HAUjZI.cjs.map} +1 -1
  191. package/dist/{rg-S4FXYXWB-CRVcN5oi.mjs → rg-S4FXYXWB-oJLYDaoJ.mjs} +3 -3
  192. package/dist/{rg-S4FXYXWB-CRVcN5oi.mjs.map → rg-S4FXYXWB-oJLYDaoJ.mjs.map} +1 -1
  193. package/dist/{rm-SSGETQVQ-CkevViOH.mjs → rm-SSGETQVQ-BHaxXFFY.mjs} +2 -2
  194. package/dist/{rm-SSGETQVQ-CkevViOH.mjs.map → rm-SSGETQVQ-BHaxXFFY.mjs.map} +1 -1
  195. package/dist/{rm-SSGETQVQ-BXJ2RwVW.cjs → rm-SSGETQVQ-FgXF1nxi.cjs} +2 -2
  196. package/dist/{rm-SSGETQVQ-BXJ2RwVW.cjs.map → rm-SSGETQVQ-FgXF1nxi.cjs.map} +1 -1
  197. package/dist/{rmdir-OC4ZLPYA-DTgH5hat.cjs → rmdir-OC4ZLPYA-DWHu7TK2.cjs} +2 -2
  198. package/dist/{rmdir-OC4ZLPYA-DTgH5hat.cjs.map → rmdir-OC4ZLPYA-DWHu7TK2.cjs.map} +1 -1
  199. package/dist/{rmdir-OC4ZLPYA-DlHQtSFw.mjs → rmdir-OC4ZLPYA-DxSDciTb.mjs} +2 -2
  200. package/dist/{rmdir-OC4ZLPYA-DlHQtSFw.mjs.map → rmdir-OC4ZLPYA-DxSDciTb.mjs.map} +1 -1
  201. package/dist/run.cjs +4 -4
  202. package/dist/run.mjs +4 -4
  203. package/dist/{sed-S5UIK574-VOdEgpv6.cjs → sed-S5UIK574-CHzZAY93.cjs} +2 -2
  204. package/dist/{sed-S5UIK574-VOdEgpv6.cjs.map → sed-S5UIK574-CHzZAY93.cjs.map} +1 -1
  205. package/dist/{sed-S5UIK574-ku3PkJrl.mjs → sed-S5UIK574-Ckxru1uk.mjs} +2 -2
  206. package/dist/{sed-S5UIK574-ku3PkJrl.mjs.map → sed-S5UIK574-Ckxru1uk.mjs.map} +1 -1
  207. package/dist/{sha1sum-2PTOAFR6-Cm_HHAVE.mjs → sha1sum-2PTOAFR6-D1-BgHM-.mjs} +3 -3
  208. package/dist/{sha1sum-2PTOAFR6-Cm_HHAVE.mjs.map → sha1sum-2PTOAFR6-D1-BgHM-.mjs.map} +1 -1
  209. package/dist/{sha1sum-2PTOAFR6-CXNqP6e6.cjs → sha1sum-2PTOAFR6-DWKBYKEK.cjs} +3 -3
  210. package/dist/{sha1sum-2PTOAFR6-CXNqP6e6.cjs.map → sha1sum-2PTOAFR6-DWKBYKEK.cjs.map} +1 -1
  211. package/dist/{sha256sum-NS7D3IXX-BwgL3VYU.cjs → sha256sum-NS7D3IXX-7MQxTeNh.cjs} +3 -3
  212. package/dist/{sha256sum-NS7D3IXX-BwgL3VYU.cjs.map → sha256sum-NS7D3IXX-7MQxTeNh.cjs.map} +1 -1
  213. package/dist/{sha256sum-NS7D3IXX-B59SaJAG.mjs → sha256sum-NS7D3IXX-C59F6mnb.mjs} +3 -3
  214. package/dist/{sha256sum-NS7D3IXX-B59SaJAG.mjs.map → sha256sum-NS7D3IXX-C59F6mnb.mjs.map} +1 -1
  215. package/dist/{sleep-X22JJINO-BqHcqP5Q.mjs → sleep-X22JJINO-DOElk_0p.mjs} +2 -2
  216. package/dist/{sleep-X22JJINO-BqHcqP5Q.mjs.map → sleep-X22JJINO-DOElk_0p.mjs.map} +1 -1
  217. package/dist/{sleep-X22JJINO-Belx8MDQ.cjs → sleep-X22JJINO-iZT9cz90.cjs} +2 -2
  218. package/dist/{sleep-X22JJINO-Belx8MDQ.cjs.map → sleep-X22JJINO-iZT9cz90.cjs.map} +1 -1
  219. package/dist/{sort-SW2YEO5B-CoaU3roV.cjs → sort-SW2YEO5B-B6tWxaN4.cjs} +3 -3
  220. package/dist/{sort-SW2YEO5B-CoaU3roV.cjs.map → sort-SW2YEO5B-B6tWxaN4.cjs.map} +1 -1
  221. package/dist/{sort-SW2YEO5B-BWnQyOei.mjs → sort-SW2YEO5B-BQDa3k0A.mjs} +3 -3
  222. package/dist/{sort-SW2YEO5B-BWnQyOei.mjs.map → sort-SW2YEO5B-BQDa3k0A.mjs.map} +1 -1
  223. package/dist/{split-4KKZZXXE-D2oykJly.cjs → split-4KKZZXXE-BbfcW9dF.cjs} +2 -2
  224. package/dist/{split-4KKZZXXE-D2oykJly.cjs.map → split-4KKZZXXE-BbfcW9dF.cjs.map} +1 -1
  225. package/dist/{split-4KKZZXXE-DL4QdUN5.mjs → split-4KKZZXXE-D2nOvuJu.mjs} +2 -2
  226. package/dist/{split-4KKZZXXE-DL4QdUN5.mjs.map → split-4KKZZXXE-D2nOvuJu.mjs.map} +1 -1
  227. package/dist/{sqlite3-CGOEFJAO-CFcfQ6ax.cjs → sqlite3-CGOEFJAO-CpeqcmAd.cjs} +3 -3
  228. package/dist/{sqlite3-CGOEFJAO-CFcfQ6ax.cjs.map → sqlite3-CGOEFJAO-CpeqcmAd.cjs.map} +1 -1
  229. package/dist/{sqlite3-CGOEFJAO-1bMdLZ5D.mjs → sqlite3-CGOEFJAO-DkJlvkmP.mjs} +3 -3
  230. package/dist/{sqlite3-CGOEFJAO-1bMdLZ5D.mjs.map → sqlite3-CGOEFJAO-DkJlvkmP.mjs.map} +1 -1
  231. package/dist/{start-DgTMrX6P.cjs → start-VJumUs_h.cjs} +73 -72
  232. package/dist/{start-DgTMrX6P.cjs.map → start-VJumUs_h.cjs.map} +1 -1
  233. package/dist/{start-CH9eh0Og.mjs → start-nLP0Cb2L.mjs} +73 -72
  234. package/dist/{start-CH9eh0Og.mjs.map → start-nLP0Cb2L.mjs.map} +1 -1
  235. package/dist/start.cjs +1 -1
  236. package/dist/start.mjs +1 -1
  237. package/dist/{strings-6WDHLGMX-6PIUZCCm.mjs → strings-6WDHLGMX-CsYLxo27.mjs} +2 -2
  238. package/dist/{strings-6WDHLGMX-6PIUZCCm.mjs.map → strings-6WDHLGMX-CsYLxo27.mjs.map} +1 -1
  239. package/dist/{strings-6WDHLGMX-6FOVBSwy.cjs → strings-6WDHLGMX-Cszd06io.cjs} +2 -2
  240. package/dist/{strings-6WDHLGMX-6FOVBSwy.cjs.map → strings-6WDHLGMX-Cszd06io.cjs.map} +1 -1
  241. package/dist/{tac-2STMMJYW-C_prjiB-.mjs → tac-2STMMJYW-BhnEvrdd.mjs} +2 -2
  242. package/dist/{tac-2STMMJYW-C_prjiB-.mjs.map → tac-2STMMJYW-BhnEvrdd.mjs.map} +1 -1
  243. package/dist/{tac-2STMMJYW-BiBMHvuY.cjs → tac-2STMMJYW-FmuNfqcg.cjs} +2 -2
  244. package/dist/{tac-2STMMJYW-BiBMHvuY.cjs.map → tac-2STMMJYW-FmuNfqcg.cjs.map} +1 -1
  245. package/dist/{tail-R4PCA2C4-BerimWUH.mjs → tail-R4PCA2C4-BCYiVFF0.mjs} +2 -2
  246. package/dist/{tail-R4PCA2C4-BerimWUH.mjs.map → tail-R4PCA2C4-BCYiVFF0.mjs.map} +1 -1
  247. package/dist/{tail-R4PCA2C4-C0SIyReR.cjs → tail-R4PCA2C4-BjbPaOcT.cjs} +2 -2
  248. package/dist/{tail-R4PCA2C4-C0SIyReR.cjs.map → tail-R4PCA2C4-BjbPaOcT.cjs.map} +1 -1
  249. package/dist/{tar-STHHZTZ6-BfIvKIoE.mjs → tar-STHHZTZ6-Dy9Q90Re.mjs} +4 -4
  250. package/dist/{tar-STHHZTZ6-BfIvKIoE.mjs.map → tar-STHHZTZ6-Dy9Q90Re.mjs.map} +1 -1
  251. package/dist/{tar-STHHZTZ6-CSN9O1aT.cjs → tar-STHHZTZ6-x82B5-e9.cjs} +5 -5
  252. package/dist/{tar-STHHZTZ6-CSN9O1aT.cjs.map → tar-STHHZTZ6-x82B5-e9.cjs.map} +1 -1
  253. package/dist/{tee-YUZ2FKCJ-DcdHAScM.cjs → tee-YUZ2FKCJ-BSBb35Zh.cjs} +2 -2
  254. package/dist/{tee-YUZ2FKCJ-DcdHAScM.cjs.map → tee-YUZ2FKCJ-BSBb35Zh.cjs.map} +1 -1
  255. package/dist/{tee-YUZ2FKCJ-B2gimzwj.mjs → tee-YUZ2FKCJ-Dr3QKqsL.mjs} +2 -2
  256. package/dist/{tee-YUZ2FKCJ-B2gimzwj.mjs.map → tee-YUZ2FKCJ-Dr3QKqsL.mjs.map} +1 -1
  257. package/dist/{time-D4LNBSWX-CBmRksNY.mjs → time-D4LNBSWX-CPiGP1zA.mjs} +2 -2
  258. package/dist/{time-D4LNBSWX-CBmRksNY.mjs.map → time-D4LNBSWX-CPiGP1zA.mjs.map} +1 -1
  259. package/dist/{time-D4LNBSWX-B5CtQG2F.cjs → time-D4LNBSWX-DYyg7Ymb.cjs} +2 -2
  260. package/dist/{time-D4LNBSWX-B5CtQG2F.cjs.map → time-D4LNBSWX-DYyg7Ymb.cjs.map} +1 -1
  261. package/dist/{timeout-YDCRSLPQ-BBCGYxsX.cjs → timeout-YDCRSLPQ-COZOqT5X.cjs} +2 -2
  262. package/dist/{timeout-YDCRSLPQ-BBCGYxsX.cjs.map → timeout-YDCRSLPQ-COZOqT5X.cjs.map} +1 -1
  263. package/dist/{timeout-YDCRSLPQ-DOmxVEXa.mjs → timeout-YDCRSLPQ-N9JiocO5.mjs} +2 -2
  264. package/dist/{timeout-YDCRSLPQ-DOmxVEXa.mjs.map → timeout-YDCRSLPQ-N9JiocO5.mjs.map} +1 -1
  265. package/dist/{touch-UA33VN3N-DyU5dVco.mjs → touch-UA33VN3N-CF5xOHyw.mjs} +2 -2
  266. package/dist/{touch-UA33VN3N-DyU5dVco.mjs.map → touch-UA33VN3N-CF5xOHyw.mjs.map} +1 -1
  267. package/dist/{touch-UA33VN3N-BH3GLD7g.cjs → touch-UA33VN3N-D_M2oO-H.cjs} +2 -2
  268. package/dist/{touch-UA33VN3N-BH3GLD7g.cjs.map → touch-UA33VN3N-D_M2oO-H.cjs.map} +1 -1
  269. package/dist/{tr-36LHWFRQ-CWcKhpct.cjs → tr-36LHWFRQ-BxxGqLR6.cjs} +2 -2
  270. package/dist/{tr-36LHWFRQ-CWcKhpct.cjs.map → tr-36LHWFRQ-BxxGqLR6.cjs.map} +1 -1
  271. package/dist/{tr-36LHWFRQ-Cd4kOgDG.mjs → tr-36LHWFRQ-pM5o0YiB.mjs} +2 -2
  272. package/dist/{tr-36LHWFRQ-Cd4kOgDG.mjs.map → tr-36LHWFRQ-pM5o0YiB.mjs.map} +1 -1
  273. package/dist/{tree-YLD52CNT-32MG92hX.cjs → tree-YLD52CNT-E-_CIj_N.cjs} +2 -2
  274. package/dist/{tree-YLD52CNT-32MG92hX.cjs.map → tree-YLD52CNT-E-_CIj_N.cjs.map} +1 -1
  275. package/dist/{tree-YLD52CNT-B5Tdj4qC.mjs → tree-YLD52CNT-eouNCE63.mjs} +2 -2
  276. package/dist/{tree-YLD52CNT-B5Tdj4qC.mjs.map → tree-YLD52CNT-eouNCE63.mjs.map} +1 -1
  277. package/dist/{unexpand-CADSA4VO-Bs5IzkQ1.cjs → unexpand-CADSA4VO-Ck222Aii.cjs} +2 -2
  278. package/dist/{unexpand-CADSA4VO-Bs5IzkQ1.cjs.map → unexpand-CADSA4VO-Ck222Aii.cjs.map} +1 -1
  279. package/dist/{unexpand-CADSA4VO-CzMCV8fX.mjs → unexpand-CADSA4VO-QQL2PgJ3.mjs} +2 -2
  280. package/dist/{unexpand-CADSA4VO-CzMCV8fX.mjs.map → unexpand-CADSA4VO-QQL2PgJ3.mjs.map} +1 -1
  281. package/dist/{uniq-XSIZR6PB-NJ0zS_La.mjs → uniq-XSIZR6PB-BjvNsA8y.mjs} +3 -3
  282. package/dist/{uniq-XSIZR6PB-NJ0zS_La.mjs.map → uniq-XSIZR6PB-BjvNsA8y.mjs.map} +1 -1
  283. package/dist/{uniq-XSIZR6PB-BAIG4fSa.cjs → uniq-XSIZR6PB-ClvdMhCw.cjs} +3 -3
  284. package/dist/{uniq-XSIZR6PB-BAIG4fSa.cjs.map → uniq-XSIZR6PB-ClvdMhCw.cjs.map} +1 -1
  285. package/dist/{wc-LF7NU4LA-qOi_ppdx.mjs → wc-LF7NU4LA-DBkbZYFa.mjs} +3 -3
  286. package/dist/{wc-LF7NU4LA-qOi_ppdx.mjs.map → wc-LF7NU4LA-DBkbZYFa.mjs.map} +1 -1
  287. package/dist/{wc-LF7NU4LA-Bqi-qGtw.cjs → wc-LF7NU4LA-xMXUuJ5J.cjs} +3 -3
  288. package/dist/{wc-LF7NU4LA-Bqi-qGtw.cjs.map → wc-LF7NU4LA-xMXUuJ5J.cjs.map} +1 -1
  289. package/dist/{with-project-scope-C0Mn7qJB.cjs → with-project-scope-C2rPW7fc.cjs} +42 -11
  290. package/dist/with-project-scope-C2rPW7fc.cjs.map +1 -0
  291. package/dist/{with-project-scope-BTnv-zZ0.mjs → with-project-scope-Dzld2MEt.mjs} +42 -11
  292. package/dist/with-project-scope-Dzld2MEt.mjs.map +1 -0
  293. package/dist/{xan-Y6WF3IRG-lGgmWSqd.mjs → xan-Y6WF3IRG-BHefjmAQ.mjs} +6 -6
  294. package/dist/{xan-Y6WF3IRG-lGgmWSqd.mjs.map → xan-Y6WF3IRG-BHefjmAQ.mjs.map} +1 -1
  295. package/dist/{xan-Y6WF3IRG-N7bDwWEu.cjs → xan-Y6WF3IRG-BeA1kJsj.cjs} +6 -6
  296. package/dist/{xan-Y6WF3IRG-N7bDwWEu.cjs.map → xan-Y6WF3IRG-BeA1kJsj.cjs.map} +1 -1
  297. package/dist/{xan-view-HDVKHFC2-B_l3sB3A.mjs → xan-view-HDVKHFC2-BoNBJrEz.mjs} +3 -3
  298. package/dist/{xan-view-HDVKHFC2-B_l3sB3A.mjs.map → xan-view-HDVKHFC2-BoNBJrEz.mjs.map} +1 -1
  299. package/dist/{xan-view-HDVKHFC2-DjY8HjH2.cjs → xan-view-HDVKHFC2-ztOfZkM4.cjs} +3 -3
  300. package/dist/{xan-view-HDVKHFC2-DjY8HjH2.cjs.map → xan-view-HDVKHFC2-ztOfZkM4.cjs.map} +1 -1
  301. package/dist/{xargs-MGZPH7AX-DFD-Xtu9.cjs → xargs-MGZPH7AX-DsME19CM.cjs} +2 -2
  302. package/dist/{xargs-MGZPH7AX-DFD-Xtu9.cjs.map → xargs-MGZPH7AX-DsME19CM.cjs.map} +1 -1
  303. package/dist/{xargs-MGZPH7AX-KGS0BlQR.mjs → xargs-MGZPH7AX-v72pnbjC.mjs} +2 -2
  304. package/dist/{xargs-MGZPH7AX-KGS0BlQR.mjs.map → xargs-MGZPH7AX-v72pnbjC.mjs.map} +1 -1
  305. package/dist/{yq-4QJW3EQG-Dv364v5l.mjs → yq-4QJW3EQG-5FYBZGV9.mjs} +3 -3
  306. package/dist/{yq-4QJW3EQG-Dv364v5l.mjs.map → yq-4QJW3EQG-5FYBZGV9.mjs.map} +1 -1
  307. package/dist/{yq-4QJW3EQG-DJQfCq2O.cjs → yq-4QJW3EQG-949T7XyY.cjs} +3 -3
  308. package/dist/{yq-4QJW3EQG-DJQfCq2O.cjs.map → yq-4QJW3EQG-949T7XyY.cjs.map} +1 -1
  309. package/package.json +1 -1
  310. package/dist/project-draft-notifier-CcWjsCtB.cjs.map +0 -1
  311. package/dist/project-draft-notifier-Hm1hmAse.mjs.map +0 -1
  312. package/dist/with-project-scope-BTnv-zZ0.mjs.map +0 -1
  313. package/dist/with-project-scope-C0Mn7qJB.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-draft-notifier-Hm1hmAse.mjs","names":["isoDateTime","sha256Hex"],"sources":["../../../packages/hosting/dist/runtime-BmfsHLrk.mjs","../../../packages/shared/dist/platform-origin.mjs","../../../packages/hosting/dist/wait-for-health-B4-AM1NR.mjs","../../../packages/shared/dist/credential-spec-B-iwg8Oc.mjs","../../../packages/shared/dist/billing-Ig0pw49a.mjs","../../../packages/shared/dist/credential-runtime-Cbm2X9rK.mjs","../../../packages/shared/dist/index.mjs","../../../packages/storage/dist/pack-artifact-BV6-Z1x9.mjs","../../../packages/storage/dist/index.mjs","../src/services/project-draft-notifier.ts"],"sourcesContent":["//#region src/runtime.ts\n/** Builds base64 `KEYSTROKE_ORG_ARTIFACTS` payload for org worker containers. */\nfunction encodeOrgArtifacts(artifacts) {\n\treturn Buffer.from(JSON.stringify(artifacts)).toString(\"base64\");\n}\nfunction parseOrgArtifactsFromEnv(env = process.env) {\n\tconst raw = env.KEYSTROKE_ORG_ARTIFACTS?.trim();\n\tif (!raw) return;\n\tconst parsed = JSON.parse(Buffer.from(raw, \"base64\").toString(\"utf8\"));\n\tif (!Array.isArray(parsed)) throw new Error(\"KEYSTROKE_ORG_ARTIFACTS must decode to a JSON array\");\n\treturn parsed.map((entry) => {\n\t\tif (!entry || typeof entry !== \"object\" || typeof entry.projectId !== \"string\" || typeof entry.artifactStorageKey !== \"string\" || typeof entry.artifactId !== \"string\" || typeof entry.artifactVersion !== \"number\") throw new Error(\"KEYSTROKE_ORG_ARTIFACTS entries require projectId, artifactStorageKey, artifactId, and artifactVersion\");\n\t\treturn entry;\n\t});\n}\n//#endregion\nexport { parseOrgArtifactsFromEnv as n, encodeOrgArtifacts as t };\n\n//# sourceMappingURL=runtime-BmfsHLrk.mjs.map","//#region src/platform-origin.ts\nconst LOCAL_PLATFORM_ORIGIN = \"http://localhost:3002\";\n/** Default production platform origin when no env override is set. */\nconst DEFAULT_CLOUD_PLATFORM_ORIGIN = \"https://api.keystroke.ai\";\n/** Reads `PUBLIC_PLATFORM_URL` when explicitly set. */\nfunction resolveExplicitPublicPlatformOrigin(env = process.env) {\n\treturn env.PUBLIC_PLATFORM_URL?.replace(/\\/$/, \"\") || void 0;\n}\n/** `PUBLIC_PLATFORM_URL` origin; falls back to {@link LOCAL_PLATFORM_ORIGIN} when unset. */\nfunction resolvePublicPlatformOrigin(env = process.env) {\n\treturn resolveExplicitPublicPlatformOrigin(env) ?? \"http://localhost:3002\";\n}\n/**\n* Provider-facing platform origin (OAuth redirect URIs, webhook intake URLs).\n*\n* When the platform runs on localhost but is exposed through an HTTPS tunnel\n* (e.g. cloudflared), set `PUBLIC_PLATFORM_PROXY_URL` to the tunnel origin so external\n* providers get reachable HTTPS URLs while `PUBLIC_PLATFORM_URL` stays on localhost\n* for browser auth/CORS. Requires an explicit platform URL (no localhost fallback).\n*/\nfunction resolveExternalPlatformOrigin(env = process.env) {\n\tconst proxy = env.PUBLIC_PLATFORM_PROXY_URL?.replace(/\\/$/, \"\");\n\tif (proxy) return proxy;\n\treturn resolveExplicitPublicPlatformOrigin(env);\n}\n/** Platform API origin: `<platform>/api`. */\nfunction resolvePublicPlatformApiOrigin(env = process.env) {\n\tconst platform = resolveExternalPlatformOrigin(env);\n\tif (!platform) return;\n\treturn `${platform}/api`;\n}\n/** Webhook intake origin for a project: `<platform>/api/projects/<id>`. */\nfunction resolvePlatformWebhookOrigin(projectId, env = process.env) {\n\tconst platform = resolveExternalPlatformOrigin(env);\n\tif (!platform) return;\n\treturn `${platform}/api/projects/${encodeURIComponent(projectId)}`;\n}\n/**\n* Platform origin injected into MCP workspace CLI environments (`KEYSTROKE_PLATFORM_URL`).\n* Prefers the tunnel/proxy URL so remote workspaces can reach a local dev platform.\n*/\nfunction resolveMcpPlatformUrl(env = process.env) {\n\tconst external = resolveExternalPlatformOrigin(env);\n\tif (external) return external;\n\tconst platform = env.PLATFORM_URL?.trim().replace(/\\/+$/, \"\");\n\tif (platform) return platform;\n\treturn DEFAULT_CLOUD_PLATFORM_ORIGIN;\n}\n//#endregion\nexport { DEFAULT_CLOUD_PLATFORM_ORIGIN, LOCAL_PLATFORM_ORIGIN, resolveExplicitPublicPlatformOrigin, resolveExternalPlatformOrigin, resolveMcpPlatformUrl, resolvePlatformWebhookOrigin, resolvePublicPlatformApiOrigin, resolvePublicPlatformOrigin };\n\n//# sourceMappingURL=platform-origin.mjs.map","import { t as encodeOrgArtifacts } from \"./runtime-BmfsHLrk.mjs\";\nimport { LOCAL_PLATFORM_ORIGIN, resolveExplicitPublicPlatformOrigin } from \"@keystrokehq/shared/platform-origin\";\nimport { createHmac, timingSafeEqual } from \"node:crypto\";\n//#region src/constants.ts\nconst PROJECT_SERVER_IMAGE = \"keystroke/project-server:local\";\nconst PROJECT_SERVER_PORT = 3e3;\nconst PROJECT_SERVER_ROOT = \"/app\";\nconst PROJECT_SERVER_FRAMEWORK_ROOT = \"/opt/keystroke\";\nconst PROJECT_SERVER_FRAMEWORK_NODE_MODULES = `${PROJECT_SERVER_FRAMEWORK_ROOT}/node_modules`;\nconst PROJECT_SERVER_HEALTH = {\n\tpath: \"/health\",\n\tport: PROJECT_SERVER_PORT\n};\nconst PROJECT_SERVER_DEPLOY_STATUS = {\n\tpath: \"/deploy-status\",\n\tport: PROJECT_SERVER_PORT\n};\n//#endregion\n//#region src/worker-runtime-config.ts\nvar WorkerRuntimeConfigError = class extends Error {\n\tmissing;\n\tconstructor(missing) {\n\t\tsuper(`Worker runtime config incomplete (missing: ${missing.join(\", \")}). In production set PLATFORM_WORKER_TOKEN and PUBLIC_PLATFORM_URL (or PLATFORM_URL).`);\n\t\tthis.name = \"WorkerRuntimeConfigError\";\n\t\tthis.missing = missing;\n\t}\n};\n/** Fail fast when the platform cannot start worker-mode project servers. */\nfunction resolveWorkerRuntimeConfig(source = process.env) {\n\tconst platformUrl = resolveWorkerPlatformUrl(source);\n\tconst workerToken = resolvePlatformWorkerToken(source);\n\tconst missing = [];\n\tif (!platformUrl) missing.push(\"PUBLIC_PLATFORM_URL or PLATFORM_URL\");\n\tif (!workerToken) missing.push(\"PLATFORM_WORKER_TOKEN\");\n\tif (missing.length > 0) throw new WorkerRuntimeConfigError(missing);\n\treturn {\n\t\tplatformUrl,\n\t\tworkerToken\n\t};\n}\n//#endregion\n//#region src/org-worker-token.ts\nfunction sign(secret, organizationId) {\n\treturn createHmac(\"sha256\", secret).update(`org-worker:${organizationId}`).digest(\"base64url\");\n}\n/**\n* Per-org worker token: `{organizationId}.{hmac}`. Self-describing so the\n* platform can tell which org a machine is calling as, and stateless — verified\n* by re-signing with the shared `PLATFORM_WORKER_TOKEN` secret.\n*/\nfunction mintOrgWorkerToken(secret, organizationId) {\n\treturn `${organizationId}.${sign(secret, organizationId)}`;\n}\nfunction verifyOrgWorkerToken(secret, token) {\n\tif (!secret || !token) return;\n\tconst separator = token.lastIndexOf(\".\");\n\tif (separator <= 0) return;\n\tconst organizationId = token.slice(0, separator);\n\tconst signature = Buffer.from(token.slice(separator + 1));\n\tconst expected = Buffer.from(sign(secret, organizationId));\n\tif (signature.length !== expected.length || !timingSafeEqual(signature, expected)) return;\n\treturn { organizationId };\n}\n//#endregion\n//#region src/runtime-env.ts\n/** Non-secret runtime config forwarded into org workers. Never include platform secrets. */\nconst RUNTIME_ENV_KEYS = [\n\t\"PUBLIC_PLATFORM_URL\",\n\t\"PUBLIC_PLATFORM_PROXY_URL\",\n\t\"PUBLIC_WEB_URL\",\n\t\"UPSTASH_REDIS_URL\",\n\t\"REDIS_URL\",\n\t\"KEYSTROKE_QUEUE_PREFIX\"\n];\n/**\n* Observability ingest config for org workers (PostHog error tracking + crash reports).\n* Ingest tokens only — never forward `POSTHOG_API_KEY` (management) into workers.\n*/\nconst OBSERVABILITY_ENV_KEYS = [\n\t\"POSTHOG_PROJECT_TOKEN\",\n\t\"POSTHOG_HOST\",\n\t\"POSTHOG_FLUSH_MODE\",\n\t\"KEYSTROKE_ENVIRONMENT\",\n\t\"KEYSTROKE_RELEASE\"\n];\n/** Env keys that must never be forwarded into untrusted org workers. */\nconst FORBIDDEN_WORKER_ENV_KEYS = [\n\t\"BETTER_AUTH_SECRET\",\n\t\"DATABASE_URL\",\n\t\"POSTHOG_API_KEY\",\n\t\"POSTGRES_PASSWORD\",\n\t\"PLATFORM_WORKER_TOKEN\",\n\t\"STRIPE_SECRET_KEY\",\n\t\"CREDENTIAL_ENCRYPTION_KEY\",\n\t\"TURNSTILE_SECRET\"\n];\n/** Provider and gateway env forwarded from the platform into project servers. */\nconst PROVIDER_ENV_KEYS = [\n\t\"ANTHROPIC_API_KEY\",\n\t\"OPENAI_API_KEY\",\n\t\"AI_GATEWAY_API_KEY\",\n\t\"AI_GATEWAY_BASE_URL\"\n];\n/** Shared dev token when `PLATFORM_WORKER_TOKEN` is unset (non-production only). */\nconst DEV_PLATFORM_WORKER_TOKEN = \"dev-platform-worker-token\";\n/**\n* Builds the launch spec for an org worker. Each deploy artifact is encoded in\n* `KEYSTROKE_ORG_ARTIFACTS` — there is no base image, so at least one artifact is required.\n*/\nfunction resolveRuntimeLaunch(options, artifacts, database, extraEnv) {\n\tif (artifacts.length === 0) throw new Error(\"Cannot start an org worker without at least one artifact\");\n\tconst env = options.env ?? process.env;\n\treturn {\n\t\timage: resolveProjectServerImage(env, options.image),\n\t\tenv: buildRuntimeEnv(env, artifacts, database, extraEnv),\n\t\tport: PROJECT_SERVER_PORT,\n\t\thealth: PROJECT_SERVER_HEALTH\n\t};\n}\n/** Env vars passed into the org worker container/machine. */\nfunction buildRuntimeEnv(source, artifacts, database, extraEnv) {\n\tconst entries = new Map([\n\t\t[\"PORT\", String(PROJECT_SERVER_PORT)],\n\t\t[\"KEYSTROKE_ROOT\", PROJECT_SERVER_ROOT],\n\t\t[\"KEYSTROKE_RUNTIME_NODE_MODULES\", PROJECT_SERVER_FRAMEWORK_NODE_MODULES],\n\t\t[\"KEYSTROKE_ORG_ARTIFACTS\", encodeOrgArtifacts(artifacts)],\n\t\t[\"ORGANIZATION_ID\", database.organizationId],\n\t\t[\"TENANT_ID\", database.organizationId]\n\t]);\n\tfor (const key of RUNTIME_ENV_KEYS) {\n\t\tconst value = source[key]?.trim();\n\t\tif (!value) continue;\n\t\tentries.set(key, value);\n\t}\n\tfor (const key of OBSERVABILITY_ENV_KEYS) {\n\t\tconst value = source[key]?.trim();\n\t\tif (!value) continue;\n\t\tentries.set(key, value);\n\t}\n\tif (!extraEnv) for (const key of PROVIDER_ENV_KEYS) {\n\t\tconst value = source[key]?.trim();\n\t\tif (value) entries.set(key, value);\n\t}\n\tconst worker = resolveWorkerRuntimeConfig(source);\n\tentries.set(\"PLATFORM_URL\", worker.platformUrl);\n\tentries.set(\"WORKER_INTERNAL_TOKEN\", mintOrgWorkerToken(worker.workerToken, database.organizationId));\n\tif (extraEnv) for (const [key, value] of Object.entries(extraEnv)) entries.set(key, value);\n\tfor (const key of FORBIDDEN_WORKER_ENV_KEYS) entries.delete(key);\n\treturn Object.fromEntries(entries);\n}\nfunction resolvePlatformWorkerToken(source = process.env) {\n\tconst explicit = source.PLATFORM_WORKER_TOKEN?.trim() ?? source.WORKER_INTERNAL_TOKEN?.trim();\n\tif (explicit) return explicit;\n\tif (source.NODE_ENV === \"production\") return;\n\treturn DEV_PLATFORM_WORKER_TOKEN;\n}\n/** Platform API URL reachable from a project-server container. */\nfunction resolveWorkerPlatformUrl(source = process.env) {\n\tconst raw = source.PLATFORM_URL?.trim() ?? resolveExplicitPublicPlatformOrigin(source) ?? (source.NODE_ENV === \"production\" ? void 0 : LOCAL_PLATFORM_ORIGIN);\n\tif (!raw) return;\n\treturn rewriteLoopbackUrl(raw);\n}\n/** Rewrite loopback hosts so containers can reach Postgres and other host services. */\nfunction rewriteLoopbackHost(host) {\n\tif (host === \"localhost\" || host === \"127.0.0.1\") return \"host.docker.internal\";\n\treturn host;\n}\nfunction rewriteLoopbackUrl(url) {\n\ttry {\n\t\tconst parsed = new URL(url);\n\t\tparsed.hostname = rewriteLoopbackHost(parsed.hostname);\n\t\treturn parsed.toString().replace(/\\/$/, \"\");\n\t} catch {\n\t\treturn url;\n\t}\n}\n/** dockerode expects `KEY=value` strings. */\nfunction formatDockerEnv(env) {\n\treturn Object.entries(env).map(([key, value]) => `${key}=${value}`);\n}\nfunction resolveProjectServerImage(env = process.env, override) {\n\treturn override ?? env.PROJECT_DOCKER_IMAGE ?? env.TENANT_DOCKER_IMAGE ?? \"keystroke/project-server:local\";\n}\n//#endregion\n//#region src/wait-for-health.ts\nconst DEFAULT_TIMEOUT_MS = 12e4;\nconst DEFAULT_INTERVAL_MS = 500;\nasync function waitForHealth(baseUrl, options = {}) {\n\tconst fetchImpl = options.fetchImpl ?? fetch;\n\tconst timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n\tconst intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS;\n\tconst deadline = Date.now() + timeoutMs;\n\tconst url = new URL(PROJECT_SERVER_HEALTH.path, baseUrl);\n\twhile (Date.now() < deadline) {\n\t\ttry {\n\t\t\tif ((await fetchImpl(url, { signal: AbortSignal.timeout(2e3) })).ok) return;\n\t\t} catch {}\n\t\tawait sleep(intervalMs);\n\t}\n\tthrow new Error(`Project server health check timed out after ${timeoutMs}ms (${url})`);\n}\nfunction sleep(ms) {\n\treturn new Promise((resolve) => {\n\t\tsetTimeout(resolve, ms);\n\t});\n}\n//#endregion\nexport { PROJECT_SERVER_ROOT as S, PROJECT_SERVER_FRAMEWORK_NODE_MODULES as _, formatDockerEnv as a, PROJECT_SERVER_IMAGE as b, resolveRuntimeLaunch as c, rewriteLoopbackUrl as d, mintOrgWorkerToken as f, PROJECT_SERVER_DEPLOY_STATUS as g, resolveWorkerRuntimeConfig as h, buildRuntimeEnv as i, resolveWorkerPlatformUrl as l, WorkerRuntimeConfigError as m, DEV_PLATFORM_WORKER_TOKEN as n, resolvePlatformWorkerToken as o, verifyOrgWorkerToken as p, FORBIDDEN_WORKER_ENV_KEYS as r, resolveProjectServerImage as s, waitForHealth as t, rewriteLoopbackHost as u, PROJECT_SERVER_FRAMEWORK_ROOT as v, PROJECT_SERVER_PORT as x, PROJECT_SERVER_HEALTH as y };\n\n//# sourceMappingURL=wait-for-health-B4-AM1NR.mjs.map","import { z } from \"zod\";\n//#region src/schema-from-json.ts\n/** Draft 2020-12 JSON Schema for LLM tool parameters (AI SDK / Anthropic). */\nconst TOOL_JSON_SCHEMA = Symbol.for(\"keystroke.toolJsonSchema\");\n/** OpenAPI 3.0 JSON Schema for manifests and route discovery. */\nconst OPENAPI_JSON_SCHEMA = Symbol.for(\"keystroke.openapiJsonSchema\");\n/** Read draft-2020-12 JSON stored on a {@link schemaFromJson} result. */\nfunction getToolJsonSchema(schema) {\n\treturn schema[TOOL_JSON_SCHEMA];\n}\n/** Read OpenAPI 3.0 JSON stored on a {@link schemaFromJson} result. */\nfunction getOpenApiJsonSchema(schema) {\n\treturn schema[OPENAPI_JSON_SCHEMA];\n}\n/**\n* Zod schema that keeps JSON Schema at rest and materializes classic Zod only\n* on first parse. Use for generated integration actions so importing 50 tools\n* does not allocate thousands of Zod object graphs.\n*/\nfunction schemaFromJson(options) {\n\tconst toolJsonSchema = options.toolJsonSchema;\n\tlet materialized;\n\tconst materialize = () => {\n\t\tif (!materialized) {\n\t\t\tif (typeof z.fromJSONSchema !== \"function\") throw new Error(\"z.fromJSONSchema is required (zod >= 4.4.3)\");\n\t\t\tmaterialized = z.fromJSONSchema(toolJsonSchema);\n\t\t}\n\t\treturn materialized;\n\t};\n\tconst lazy = z.lazy(materialize);\n\tObject.defineProperty(lazy, TOOL_JSON_SCHEMA, {\n\t\tvalue: toolJsonSchema,\n\t\tenumerable: false\n\t});\n\tif (options.openApiJsonSchema) Object.defineProperty(lazy, OPENAPI_JSON_SCHEMA, {\n\t\tvalue: options.openApiJsonSchema,\n\t\tenumerable: false\n\t});\n\treturn lazy;\n}\n//#endregion\n//#region src/tool-parameters.ts\n/**\n* JSON Schema draft 2020-12 for LLM tool inputs (not OpenAPI 3.0).\n*\n* Enforces an object root: Anthropic (and the AI SDK gateway path) reject any\n* tool whose `input_schema` is a bare union/array at the root with\n* `input_schema.type: Field required`, which silently kills the whole turn. A\n* top-level `z.discriminatedUnion`/`z.union` is the usual culprit — flatten it\n* into a single object (discriminator field + optional fields). Unions nested\n* under a property are fine.\n*/\nfunction toolParameters(schema) {\n\tconst json = getToolJsonSchema(schema) ?? z.toJSONSchema(schema, { target: \"draft-2020-12\" });\n\tif (json.type !== \"object\") {\n\t\tconst root = json.type ?? Object.keys(json).find((key) => key === \"anyOf\" || key === \"oneOf\");\n\t\tthrow new Error(`Tool input schema root must be type:\"object\" (got ${JSON.stringify(root)}). Flatten top-level unions into one object with a discriminator field.`);\n\t}\n\treturn json;\n}\n//#endregion\n//#region src/define-tool.ts\n/** Attached by {@link defineTool} for optional introspection (not on wire). */\nconst AGENT_TOOL_INPUT = Symbol.for(\"keystroke.agentTool.inputSchema\");\nfunction getAgentToolInputSchema(tool) {\n\treturn tool[AGENT_TOOL_INPUT];\n}\n/** Author an agent tool from Zod; converts to JSON Schema and validates input on every `execute`. */\nfunction defineTool(tool) {\n\tconst { parameters: inputSchema, execute, prepareArguments, ...rest } = tool;\n\treturn {\n\t\t...rest,\n\t\tparameters: toolParameters(inputSchema),\n\t\tasync execute(toolCallId, params, signal, onUpdate) {\n\t\t\tconst parsed = inputSchema.parse(params);\n\t\t\treturn execute(toolCallId, prepareArguments ? prepareArguments(parsed) : parsed, signal, onUpdate);\n\t\t},\n\t\t[AGENT_TOOL_INPUT]: inputSchema\n\t};\n}\n//#endregion\n//#region src/schemas/credentials.ts\n/** How a credential instance is stored (`credential_instances.auth_kind`). */\nconst CredentialAuthKindSchema = z.enum([\n\t\"api_key\",\n\t\"oauth_managed\",\n\t\"keystroke\"\n]);\n/**\n* Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an\n* action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the\n* resolver tries the project default, then the org default, then throws.\n*/\nconst CredentialScopeTypeSchema = z.enum([\n\t\"organization\",\n\t\"project\",\n\t\"user\"\n]);\nconst CREDENTIAL_AUTH_KINDS = CredentialAuthKindSchema.options;\nconst CREDENTIAL_SCOPE_TYPES = CredentialScopeTypeSchema.options;\n//#endregion\n//#region src/schemas/display-text.ts\n/** Non-empty human-readable label or description (trimmed). */\nconst requiredDisplayTextSchema = z.string().trim().min(1);\n//#endregion\n//#region src/schemas/credential-assignments.ts\nconst CREDENTIAL_ASSIGNMENT_WILDCARD = \"*\";\nconst CredentialAssignmentTargetTypeSchema = z.enum([\n\t\"workflow\",\n\t\"agent\",\n\t\"poll\"\n]);\nconst CredentialAssignmentRecordSchema = z.object({\n\tid: z.string(),\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string(),\n\tconsumerId: z.string(),\n\tcredentialSlug: z.string(),\n\tinstanceId: z.string(),\n\tcredential: z.string().optional(),\n\tscopeType: z.enum([\n\t\t\"organization\",\n\t\t\"project\",\n\t\t\"user\"\n\t]).optional(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst CredentialAssignmentListResponseSchema = z.object({ assignments: z.array(CredentialAssignmentRecordSchema) });\nconst AssignCredentialBodySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1),\n\t/** Omit or '*' for wildcard assignment. */\n\tconsumerId: z.string().optional(),\n\tcredential: z.string().min(1)\n});\nconst CredentialAssignmentListQuerySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1)\n});\nconst CredentialConsumerListQuerySchema = z.object({\n\ttargetType: CredentialAssignmentTargetTypeSchema,\n\ttargetKey: z.string().min(1)\n});\nconst CredentialConsumerSummarySchema = z.object({\n\tconsumerId: z.string(),\n\tlabel: z.string(),\n\tappSlugs: z.array(z.string())\n});\nconst CredentialConsumerListResponseSchema = z.object({ consumers: z.array(CredentialConsumerSummarySchema) });\n//#endregion\n//#region src/schemas/mcp.ts\nconst McpConnectionStatusSchema = z.enum([\n\t\"INITIATED\",\n\t\"ACTIVE\",\n\t\"EXPIRED\",\n\t\"FAILED\",\n\t\"INACTIVE\",\n\t\"REVOKED\"\n]);\nconst McpAppSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tconnected: z.boolean(),\n\tconnectionId: z.string().optional(),\n\tstatus: McpConnectionStatusSchema.optional()\n});\nconst ListMcpAppsResponseSchema = z.array(McpAppSchema);\nconst MCP_ENTITY_PREFIX = {\n\tuser: \"user\",\n\torganization: \"org\",\n\tproject: \"proj\"\n};\n/** MCP provider entity id for a credential scope subject (`user_<id>` / `org_<id>` / `proj_<id>`). */\nfunction mcpEntityId(scopeType, scopeId) {\n\treturn `${MCP_ENTITY_PREFIX[scopeType]}_${scopeId}`;\n}\nconst MCP_ENTITY_SCOPE_BY_PREFIX = {\n\tuser: \"user\",\n\torg: \"organization\",\n\tproj: \"project\"\n};\n/** Parse an MCP entity id back into Keystroke scope type + id. */\nfunction parseMcpEntityId(entityId) {\n\tconst trimmed = entityId.trim();\n\tconst separator = trimmed.indexOf(\"_\");\n\tif (separator <= 0) return;\n\tconst prefix = trimmed.slice(0, separator);\n\tconst scopeId = trimmed.slice(separator + 1);\n\tconst scopeType = MCP_ENTITY_SCOPE_BY_PREFIX[prefix];\n\tif (!scopeType || !scopeId) return;\n\treturn {\n\t\tscopeType,\n\t\tscopeId\n\t};\n}\nconst KeystrokeCredentialSchema = z.object({\n\tconnectionId: z.string(),\n\tentityId: z.string(),\n\tinstanceId: z.string()\n});\nconst McpCredentialAssignmentTargetSchema = z.object({\n\ttype: CredentialAssignmentTargetTypeSchema,\n\tkey: z.string().trim().min(1)\n});\nconst ExecuteKeystrokeToolRequestSchema = z.object({\n\tapp: z.string().trim().min(1),\n\ttool: z.string().trim().min(1),\n\targuments: z.record(z.string(), z.unknown()).default({}),\n\t/** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */\n\tversion: z.string().trim().min(1),\n\t/** When set, platform MCP resolve checks credential assignments before scope defaults. */\n\tassignmentTarget: McpCredentialAssignmentTargetSchema.optional(),\n\t/** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */\n\tconsumerId: z.string().trim().min(1).optional(),\n\t/** Explicit credential instance slug; overrides default resolution to pick that instance. */\n\tcredentialSlug: z.string().trim().min(1).optional(),\n\t/** Project slug (CLI --project); the platform resolves it to a project and binds that scope. */\n\tprojectSlug: z.string().trim().min(1).optional()\n});\nconst ExecuteKeystrokeToolErrorCodeSchema = z.enum([\n\t\"not_found\",\n\t\"forbidden\",\n\t\"mcp_execute_failed\"\n]);\n/** Platform MCP execute error body (422 for upstream tool failures, 404/403 for resolve/access). */\nconst ExecuteKeystrokeToolErrorResponseSchema = z.object({\n\terror: ExecuteKeystrokeToolErrorCodeSchema,\n\tmessage: z.string()\n});\n/** HTTP status for upstream provider / tool argument failures (not platform bugs). */\nconst MCP_TOOL_EXECUTE_FAILED_STATUS = 422;\n/** Turn upstream provider JSON error strings into LLM-readable text. */\nfunction formatMcpToolErrorMessage(raw) {\n\tconst trimmed = raw.trim();\n\tif (!trimmed) return trimmed;\n\ttry {\n\t\tconst parsed = JSON.parse(trimmed);\n\t\tif (typeof parsed.detail === \"string\" && parsed.detail.trim()) return typeof parsed.code === \"string\" && parsed.code.trim() ? `${parsed.code}: ${parsed.detail.trim()}` : parsed.detail.trim();\n\t\tif (typeof parsed.message === \"string\" && parsed.message.trim()) return typeof parsed.code === \"string\" && parsed.code.trim() ? `${parsed.code}: ${parsed.message.trim()}` : parsed.message.trim();\n\t} catch {}\n\treturn trimmed;\n}\n//#endregion\n//#region src/schemas/credential-spec.ts\n/** Default sandbox materialization for OAuth / managed Keystroke OAuth apps. */\nconst SandboxAccessTokenSchema = z.object({ accessToken: z.string() });\nfunction isCredentialInput(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn typeof candidate.key === \"string\" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof z.ZodType && (candidate.materializedSchema === void 0 || candidate.materializedSchema instanceof z.ZodType);\n}\nconst credentialInputSchema = z.custom((value) => isCredentialInput(value), \"must be a credential requirement\");\nfunction createRef(kind, key, schema, options) {\n\tconst tokenField = options?.tokenField;\n\tconst materializedSchema = options?.materializedSchema ?? schema;\n\treturn {\n\t\tkind,\n\t\tkey,\n\t\tschema,\n\t\tmaterializedSchema,\n\t\t...tokenField !== void 0 ? { tokenField } : {},\n\t\tscope(scope) {\n\t\t\treturn {\n\t\t\t\tkey,\n\t\t\t\tkind,\n\t\t\t\tschema,\n\t\t\t\tmaterializedSchema,\n\t\t\t\tscope,\n\t\t\t\t...tokenField !== void 0 ? { tokenField } : {}\n\t\t\t};\n\t\t}\n\t};\n}\nfunction staticCredential(key, schema) {\n\treturn createRef(\"api_key\", key, schema instanceof z.ZodType ? schema : z.object(schema));\n}\nfunction oauthCredential(key, options) {\n\tconst tokenField = options?.tokenField ?? \"accessToken\";\n\treturn createRef(\"oauth_managed\", key, tokenField === \"accessToken\" ? z.object({ accessToken: z.string() }) : z.object({ [tokenField]: z.string() }), { tokenField });\n}\nfunction keystrokeCredential(key, materializedSchema) {\n\treturn createRef(\"keystroke\", key, KeystrokeCredentialSchema, { materializedSchema: materializedSchema ?? SandboxAccessTokenSchema });\n}\nconst credential = {\n\tstatic: staticCredential,\n\toauth: oauthCredential,\n\tkeystroke: keystrokeCredential\n};\nfunction defineCredential(input) {\n\tif (input.kind === \"oauth\") return input.tokenField !== void 0 ? credential.oauth(input.key, { tokenField: input.tokenField }) : credential.oauth(input.key);\n\tif (input.kind === \"keystroke\") {\n\t\tif (input.fields !== void 0) return credential.keystroke(input.key, z.object(input.fields));\n\t\treturn credential.keystroke(input.key);\n\t}\n\tif (\"schema\" in input) return credential.static(input.key, input.schema);\n\treturn credential.static(input.key, input.fields);\n}\nfunction normalizeCredentialList(list) {\n\treturn list.map((item) => toCredentialRequirement(item));\n}\nfunction isCredentialRequirement(item) {\n\treturn typeof item.scope !== \"function\";\n}\nfunction toCredentialRequirement(item) {\n\tif (isCredentialRequirement(item)) return {\n\t\tkey: item.key,\n\t\tkind: item.kind,\n\t\tschema: item.schema,\n\t\tmaterializedSchema: item.materializedSchema ?? item.schema,\n\t\t...item.scope !== void 0 ? { scope: item.scope } : {},\n\t\t...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}\n\t};\n\treturn {\n\t\tkey: item.key,\n\t\tkind: item.kind,\n\t\tschema: item.schema,\n\t\tmaterializedSchema: item.materializedSchema,\n\t\t...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}\n\t};\n}\n//#endregion\nexport { CREDENTIAL_AUTH_KINDS as A, getOpenApiJsonSchema as B, CredentialAssignmentListResponseSchema as C, CredentialConsumerListResponseSchema as D, CredentialConsumerListQuerySchema as E, defineTool as F, schemaFromJson as H, getAgentToolInputSchema as I, toolParameters as L, CredentialAuthKindSchema as M, CredentialScopeTypeSchema as N, CredentialConsumerSummarySchema as O, AGENT_TOOL_INPUT as P, OPENAPI_JSON_SCHEMA as R, CredentialAssignmentListQuerySchema as S, CredentialAssignmentTargetTypeSchema as T, getToolJsonSchema as V, formatMcpToolErrorMessage as _, isCredentialInput as a, AssignCredentialBodySchema as b, ExecuteKeystrokeToolErrorCodeSchema as c, KeystrokeCredentialSchema as d, ListMcpAppsResponseSchema as f, McpCredentialAssignmentTargetSchema as g, McpConnectionStatusSchema as h, defineCredential as i, CREDENTIAL_SCOPE_TYPES as j, requiredDisplayTextSchema as k, ExecuteKeystrokeToolErrorResponseSchema as l, McpAppSchema as m, credential as n, normalizeCredentialList as o, MCP_TOOL_EXECUTE_FAILED_STATUS as p, credentialInputSchema as r, toCredentialRequirement as s, SandboxAccessTokenSchema as t, ExecuteKeystrokeToolRequestSchema as u, mcpEntityId as v, CredentialAssignmentRecordSchema as w, CREDENTIAL_ASSIGNMENT_WILDCARD as x, parseMcpEntityId as y, TOOL_JSON_SCHEMA as z };\n\n//# sourceMappingURL=credential-spec-B-iwg8Oc.mjs.map","import { z } from \"zod\";\n//#region src/constants/billing.ts\n/**\n* Money is integer micro-credits (µc). 1 credit = $1 = 1,000,000 µc.\n* Shared so the web dashboard and the cloud billing packages agree on the\n* conversion without duplicating the value.\n*/\nconst MICRO_CREDITS_PER_CREDIT = 1e6;\nconst DEFAULT_PLAN_KEY = \"free\";\n//#endregion\n//#region src/schemas/billing.ts\nconst isoDateTime = z.string().datetime();\nconst subscriptionStatusSchema = z.enum([\n\t\"none\",\n\t\"trialing\",\n\t\"active\",\n\t\"past_due\",\n\t\"canceled\"\n]);\nconst CreditPackSchema = z.object({\n\tid: z.string(),\n\tusd: z.number(),\n\tmicroCredits: z.number(),\n\tlabel: z.string()\n});\nconst AutoTopupSummarySchema = z.object({\n\tenabled: z.boolean(),\n\tthresholdMicroCredits: z.number().nullable(),\n\tamountMicroCredits: z.number().nullable(),\n\t/** A saved payment method exists to charge off-session. */\n\thasPaymentMethod: z.boolean(),\n\t/** A top-up invoice payment is in flight. */\n\tpending: z.boolean()\n});\n/**\n* The plan's resolved limits. Storage overage is billed from the wallet's\n* pushed-down `includedStorageGb`; concurrency, per-pass run timeouts, and\n* API/MCP rate limits are enforced from the wallet (timeouts/concurrency) or\n* plan preset (rate limits). Log retention is configured but not pruned yet.\n*/\nconst PlanLimitsSchema = z.object({\n\tincludedStorageGb: z.number(),\n\tconcurrencyLimit: z.number(),\n\t/** Max non-deleted projects; enforced on create only. */\n\tmaxProjects: z.number(),\n\tagentTimeoutMs: z.number(),\n\tworkflowTimeoutMs: z.number(),\n\tpollTimeoutMs: z.number(),\n\t/** Configured retention window; pruning not implemented yet. */\n\tlogRetentionDays: z.number(),\n\tapiRateLimitCapacity: z.number(),\n\tapiRateLimitRefillPerSec: z.number(),\n\tmcpRateLimitCapacity: z.number(),\n\tmcpRateLimitRefillPerSec: z.number()\n});\nconst BillingSummaryResponseSchema = z.object({\n\tplanKey: z.string(),\n\tsubscriptionStatus: subscriptionStatusSchema,\n\t/** Remaining plan-bucket balance this period (µc). */\n\tplanCreditMicroCredits: z.number(),\n\t/** Remaining prepaid balance (µc). Never expires. */\n\tprepaidCreditMicroCredits: z.number(),\n\t/**\n\t* Resolved monthly plan allotment (µc) — override ?? preset. Powers the\n\t* credit-usage progress denominator (`used = allotment − remaining`).\n\t*/\n\tmonthlyCreditMicroCredits: z.number(),\n\tperiodStart: isoDateTime.nullable(),\n\tperiodEnd: isoDateTime.nullable(),\n\tautoTopup: AutoTopupSummarySchema,\n\tcreditPacks: z.array(CreditPackSchema),\n\tlimits: PlanLimitsSchema\n});\nconst BillingUsageMeterSchema = z.object({\n\t/** Meter key (`llm`, `vm_second`, …); null groups uncategorized rows. */\n\tmeterKey: z.string().nullable(),\n\t/** Charged this period, µc. */\n\tmicroCredits: z.number(),\n\t/** Tracked-but-not-charged usage (e.g. BYOK LLM calls), display USD. */\n\tunchargedUsd: z.number()\n});\nconst BillingUsageResponseSchema = z.object({\n\tperiodStart: isoDateTime.nullable(),\n\tperiodEnd: isoDateTime.nullable(),\n\ttotalMicroCredits: z.number(),\n\tbyMeter: z.array(BillingUsageMeterSchema)\n});\nconst billingLedgerEntryTypeSchema = z.enum([\n\t\"grant_plan\",\n\t\"grant_prepaid\",\n\t\"expire_plan\",\n\t\"adjustment\"\n]);\nconst BillingActivityEntrySchema = z.object({\n\tid: z.string(),\n\tentryType: billingLedgerEntryTypeSchema,\n\tlabel: z.string(),\n\t/** Signed: positive grants, negative expirations/adjustments. */\n\tmicroCredits: z.number(),\n\tbucket: z.enum([\"plan\", \"prepaid\"]).nullable(),\n\t/** Stripe invoice behind the entry, when there is one — powers \"View invoice\". */\n\tstripeInvoiceId: z.string().nullable(),\n\tcreatedAt: isoDateTime\n});\nconst BillingActivityResponseSchema = z.object({\n\tentries: z.array(BillingActivityEntrySchema),\n\t/** Set only when the latest payment failure is newer than the latest successful payment. */\n\tlastPaymentFailureAt: isoDateTime.nullable()\n});\nconst CreateSubscriptionCheckoutRequestSchema = z.object({ \n/** Web-app path to land on after Checkout (must be a path, not a URL). */\nreturnPath: z.string().startsWith(\"/\").max(512).optional() });\nconst CreateCreditsCheckoutRequestSchema = z.object({\n\tpackId: z.string(),\n\treturnPath: z.string().startsWith(\"/\").max(512).optional()\n});\nconst CreateBillingPortalRequestSchema = z.object({ returnPath: z.string().startsWith(\"/\").max(512).optional() });\n/** Checkout + Portal both respond with a Stripe-hosted URL to redirect to. */\nconst BillingRedirectResponseSchema = z.object({ url: z.string().url() });\n/** Fresh Stripe-hosted links for one invoice, resolved on click (never stored). */\nconst BillingInvoiceUrlResponseSchema = z.object({\n\t/** Hosted invoice page (view, download, receipt). */\n\turl: z.string().url(),\n\t/** Direct PDF download when Stripe provides one. */\n\tpdf: z.string().url().nullable()\n});\nconst ConfirmCheckoutRequestSchema = z.object({ \n/** Stripe Checkout Session id from the `session_id` success-URL param. */\nsessionId: z.string().min(1).max(255) });\nconst ConfirmCheckoutResponseSchema = z.object({\n\t/**\n\t* `granted` — credits are in the wallet now; `processing` — payment not\n\t* complete yet, the webhook will finish it; `ignored` — not a confirmable\n\t* session for this org.\n\t*/\n\tstatus: z.enum([\n\t\t\"granted\",\n\t\t\"processing\",\n\t\t\"ignored\"\n\t]),\n\treason: z.string().optional()\n});\nconst UpdateAutoTopupRequestSchema = z.object({\n\tenabled: z.boolean(),\n\tthresholdMicroCredits: z.number().int().positive().optional(),\n\tpackId: z.string().optional()\n});\nconst BillingUsageEventSourceSchema = z.enum([\n\t\"ai_gateway\",\n\t\"sandbox\",\n\t\"web_proxy\",\n\t\"storage\",\n\t\"dispatch\",\n\t\"poll\"\n]);\nconst BillingUsageMeterKeySchema = z.enum([\n\t\"llm\",\n\t\"vm_second\",\n\t\"web_search\",\n\t\"web_fetch\",\n\t\"workflow_run\",\n\t\"agent_run\",\n\t\"poll_trigger\",\n\t\"tigris_storage\"\n]);\nconst BillingUsageKeySourceSchema = z.enum([\"platform\", \"byok\"]);\nconst BillingUsageRunKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"platform_agent\"\n]);\nconst SubmitBillingUsageEventSchema = z.object({\n\tprojectId: z.string().min(1).max(255).nullable().optional(),\n\trunId: z.string().min(1).max(255).nullable().optional(),\n\trunKind: BillingUsageRunKindSchema.nullable().optional(),\n\tsource: BillingUsageEventSourceSchema,\n\tsourceEventId: z.string().min(1).max(512),\n\tmeterKey: BillingUsageMeterKeySchema,\n\tquantity: z.number().finite().nonnegative(),\n\tunit: z.string().min(1).max(64),\n\tproviderCostUsd: z.number().finite().nonnegative().nullable().optional(),\n\tkeySource: BillingUsageKeySourceSchema.nullable().optional(),\n\toccurredAt: isoDateTime,\n\tmetadata: z.record(z.string(), z.unknown()).nullable().optional()\n}).strict();\nconst SubmitBillingUsageRequestSchema = z.object({ events: z.array(SubmitBillingUsageEventSchema).min(1).max(100) }).strict();\nconst SubmitBillingUsageResponseSchema = z.object({\n\taccepted: z.number().int().nonnegative(),\n\tinserted: z.number().int().nonnegative(),\n\tduplicate: z.number().int().nonnegative(),\n\tsettledLedgerId: z.string().nullable(),\n\tchargeMicroCredits: z.number().int().nonnegative()\n});\n//#endregion\nexport { UpdateAutoTopupRequestSchema as C, MICRO_CREDITS_PER_CREDIT as D, DEFAULT_PLAN_KEY as E, SubmitBillingUsageResponseSchema as S, subscriptionStatusSchema as T, CreateSubscriptionCheckoutRequestSchema as _, BillingRedirectResponseSchema as a, SubmitBillingUsageEventSchema as b, BillingUsageKeySourceSchema as c, BillingUsageResponseSchema as d, BillingUsageRunKindSchema as f, CreateCreditsCheckoutRequestSchema as g, CreateBillingPortalRequestSchema as h, BillingInvoiceUrlResponseSchema as i, BillingUsageMeterKeySchema as l, ConfirmCheckoutResponseSchema as m, BillingActivityEntrySchema as n, BillingSummaryResponseSchema as o, ConfirmCheckoutRequestSchema as p, BillingActivityResponseSchema as r, BillingUsageEventSourceSchema as s, AutoTopupSummarySchema as t, BillingUsageMeterSchema as u, CreditPackSchema as v, billingLedgerEntryTypeSchema as w, SubmitBillingUsageRequestSchema as x, PlanLimitsSchema as y };\n\n//# sourceMappingURL=billing-Ig0pw49a.mjs.map","import { z } from \"zod\";\n//#region src/constants/http.ts\nconst ACTIVE_ORG_COOKIE = \"keystroke-active-org-id\";\nconst ACTIVE_ORG_HEADER = \"x-keystroke-org-id\";\n/** Untrusted analytics context from the hosted web app (cross-signal correlation only). */\nconst ANALYTICS_ID_HEADER = \"x-keystroke-analytics-id\";\nconst ANALYTICS_SESSION_HEADER = \"x-keystroke-session-id\";\n/**\n* Client surface that originated the request. The hosted web app and CLI set this\n* explicitly; missing values are treated as `api` (programmatic / unknown).\n*/\nconst CLIENT_CHANNEL_HEADER = \"x-keystroke-client\";\n/**\n* Set by the platform LLM proxy on inference responses: `byok` when the\n* request was served with the customer's own provider key, else `platform`.\n* The worker-side usage recorder reads it to bill (or not bill) the tokens.\n*/\nconst LLM_KEY_SOURCE_HEADER = \"x-keystroke-llm-key-source\";\n/**\n* Best-effort run attribution the worker sets on LLM proxy requests so the\n* platform can tag gateway-recorded usage to a run for the history UI. Billing\n* never depends on these — a missing or forged value only loses attribution.\n*/\nconst LLM_RUN_ID_HEADER = \"x-keystroke-run-id\";\nconst LLM_RUN_KIND_HEADER = \"x-keystroke-run-kind\";\n/**\n* Marks internal, best-effort model calls (such as chat title generation) that\n* must not create a billable platform usage event.\n*/\nconst LLM_SKIP_USAGE_HEADER = \"x-keystroke-skip-usage\";\n//#endregion\n//#region src/agent-timestamp.ts\nfunction isValidIanaTimezone(value) {\n\ttry {\n\t\tIntl.DateTimeFormat(void 0, { timeZone: value });\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction formatAgentTimestampContext(now, timezone) {\n\tconst lines = [`Current date and time (UTC): ${now.toISOString()}`];\n\tif (timezone && isValidIanaTimezone(timezone)) {\n\t\tconst local = new Intl.DateTimeFormat(\"en-US\", {\n\t\t\ttimeZone: timezone,\n\t\t\tdateStyle: \"full\",\n\t\t\ttimeStyle: \"long\"\n\t\t}).format(now);\n\t\tlines.push(`Current date and time (${timezone}): ${local}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n//#endregion\n//#region src/prompt-context.ts\nconst AGENT_CONTEXT_OPEN = \"<keystroke-context>\";\nconst AGENT_CONTEXT_CLOSE = \"</keystroke-context>\";\n/** Wrap injected prompt context so the UI can strip it while the agent still reads it. */\nfunction wrapPromptContext(context) {\n\treturn `${AGENT_CONTEXT_OPEN}\\n${context}\\n${AGENT_CONTEXT_CLOSE}`;\n}\n/** Remove sentinel tag strings from user-controlled values before embedding them. */\nfunction sanitizePromptContextContent(text) {\n\treturn text.replaceAll(AGENT_CONTEXT_OPEN, \"\").replaceAll(AGENT_CONTEXT_CLOSE, \"\");\n}\nconst CONTEXT_BLOCK = /<keystroke-context>[\\s\\S]*?<\\/keystroke-context>\\s*/g;\n/** Remove any wrapped context block(s) from a text string. */\nfunction stripPromptContext(text) {\n\treturn text.replace(CONTEXT_BLOCK, \"\").trimStart();\n}\n/** True when a message already carries the injected current-time context block. */\nfunction hasAgentTimestampContext(message) {\n\treturn message.match(/^<keystroke-context>\\n([\\s\\S]*?)\\n<\\/keystroke-context>/)?.[1]?.includes(\"Current date and time (UTC):\") ?? false;\n}\n/**\n* Prepend From + current time into one `<keystroke-context>` block so the UI can\n* strip it while the model still sees it. Keeps the system prompt cache-stable.\n*/\nfunction prependAgentUserContext(message, options = {}) {\n\tconst lines = [];\n\tconst name = sanitizePromptContextContent(options.user?.name?.trim() ?? \"\");\n\tconst email = sanitizePromptContextContent(options.user?.email?.trim() ?? \"\");\n\tconst label = name && email ? `${name} <${email}>` : name || email;\n\tif (label) lines.push(`[From: ${label}]`);\n\tlines.push(formatAgentTimestampContext(options.now ?? /* @__PURE__ */ new Date(), options.timezone));\n\treturn `${wrapPromptContext(lines.join(\"\\n\"))}\\n\\n${message}`;\n}\n//#endregion\n//#region src/mcp/tool-result-content.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsedJsonRecord(value) {\n\ttry {\n\t\tconst parsed = JSON.parse(value);\n\t\treturn isRecord(parsed) ? parsed : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction mimeTypeFromBlock(part) {\n\tif (typeof part.mimeType === \"string\" && part.mimeType.length > 0) return part.mimeType;\n\tif (typeof part.mediaType === \"string\" && part.mediaType.length > 0) return part.mediaType;\n}\nfunction mediaDataUrl(data, mediaType) {\n\treturn data.startsWith(\"data:\") ? data : `data:${mediaType};base64,${data}`;\n}\nfunction filenameFromUri(uri) {\n\tconst segment = uri.split(\"/\").at(-1)?.split(\"?\")[0]?.trim();\n\treturn segment && segment.length > 0 ? segment : void 0;\n}\nfunction looksLikeBase64ImageData(data) {\n\tif (data.startsWith(\"data:image/\")) return true;\n\treturn data.startsWith(\"iVBORw0KGgo\") || data.startsWith(\"/9j/\") || data.startsWith(\"R0lGOD\") || data.startsWith(\"UklGR\");\n}\nfunction imageMediaTypeFromData(data, explicit) {\n\tif (explicit?.startsWith(\"image/\")) return explicit;\n\tif (data.startsWith(\"data:image/\")) return /^data:(image\\/[^;]+);/i.exec(data)?.[1] ?? \"image/png\";\n\tif (data.startsWith(\"/9j/\")) return \"image/jpeg\";\n\tif (data.startsWith(\"R0lGOD\")) return \"image/gif\";\n\tif (data.startsWith(\"UklGR\")) return \"image/webp\";\n\treturn \"image/png\";\n}\nfunction isProbablyBase64Payload(value) {\n\treturn value.length > 64 && /^[A-Za-z0-9+/=\\r\\n]+$/.test(value.slice(0, 256));\n}\nfunction isMcpImageBlock(part) {\n\tconst blockType = typeof part.type === \"string\" ? part.type : void 0;\n\tif (blockType === \"text\" || blockType === \"resource\" || blockType === \"resource_link\" || blockType === \"audio\") return false;\n\tif (typeof part.data !== \"string\" || part.data.length === 0) return false;\n\tif (blockType === \"image\" || blockType === \"image-data\") return true;\n\tconst mimeType = mimeTypeFromBlock(part);\n\tif (mimeType?.startsWith(\"image/\")) return true;\n\tif (looksLikeBase64ImageData(part.data)) return true;\n\tif (!blockType && !mimeType && isProbablyBase64Payload(part.data)) return true;\n\treturn false;\n}\nfunction imageFromBlock(part) {\n\tif (!isMcpImageBlock(part) || typeof part.data !== \"string\" || part.data.length === 0) return null;\n\tconst mediaType = imageMediaTypeFromData(part.data, mimeTypeFromBlock(part));\n\treturn {\n\t\tdataUrl: mediaDataUrl(part.data, mediaType),\n\t\tmediaType\n\t};\n}\nfunction fileFromBlock(part) {\n\tconst blockType = typeof part.type === \"string\" ? part.type : void 0;\n\tif (blockType === \"file-data\" && typeof part.data === \"string\" && part.data.length > 0) {\n\t\tconst mediaType = mimeTypeFromBlock(part);\n\t\tif (!mediaType || mediaType.startsWith(\"image/\")) return null;\n\t\treturn {\n\t\t\tdataUrl: mediaDataUrl(part.data, mediaType),\n\t\t\tmediaType,\n\t\t\t...typeof part.filename === \"string\" ? { filename: part.filename } : {}\n\t\t};\n\t}\n\tif (blockType !== \"resource\" || !isRecord(part.resource)) return null;\n\tconst resource = part.resource;\n\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\tconst mediaType = mimeTypeFromBlock(resource);\n\tif (!blob || !mediaType || mediaType.startsWith(\"image/\")) return null;\n\tconst uri = typeof resource.uri === \"string\" ? resource.uri : void 0;\n\treturn {\n\t\tdataUrl: mediaDataUrl(blob, mediaType),\n\t\tmediaType,\n\t\t...uri ? {\n\t\t\turi,\n\t\t\tfilename: filenameFromUri(uri)\n\t\t} : {}\n\t};\n}\nfunction imageFromEmbeddedResource(part) {\n\tif (part.type !== \"resource\" || !isRecord(part.resource)) return null;\n\tconst resource = part.resource;\n\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\tconst mediaType = mimeTypeFromBlock(resource);\n\tif (!blob || !mediaType?.startsWith(\"image/\")) return null;\n\treturn {\n\t\tdataUrl: mediaDataUrl(blob, mediaType),\n\t\tmediaType\n\t};\n}\n/** Extract MCP `content` blocks from persisted tool output envelopes. */\nfunction mcpContentBlocksFromToolOutput(output) {\n\tif (typeof output === \"string\") {\n\t\tconst parsed = parsedJsonRecord(output.trim());\n\t\treturn parsed ? mcpContentBlocksFromRecord(parsed) : [];\n\t}\n\tif (!isRecord(output)) return [];\n\tif (output.type === \"text\" && typeof output.value === \"string\") return mcpContentBlocksFromToolOutput(output.value);\n\treturn mcpContentBlocksFromRecord(output);\n}\nfunction mcpContentBlocksFromRecord(record) {\n\tif (record.type === \"content\" && Array.isArray(record.value)) return record.value;\n\tif (record.type === \"json\" && isRecord(record.value) && Array.isArray(record.value.content)) return record.value.content;\n\tif (isRecord(record.details) && Array.isArray(record.details.content)) return record.details.content;\n\tif (Array.isArray(record.content)) return record.content;\n\treturn [];\n}\nfunction textFromBlocks(blocks) {\n\tconst texts = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord(block)) continue;\n\t\tif (block.type === \"text\" && typeof block.text === \"string\") {\n\t\t\tconst text = block.text.trim();\n\t\t\tif (text.length > 0) texts.push(text);\n\t\t}\n\t}\n\treturn texts.join(\"\\n\");\n}\nfunction imagesFromBlocks(blocks) {\n\tconst images = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord(block)) continue;\n\t\tconst image = imageFromBlock(block) ?? imageFromEmbeddedResource(block);\n\t\tif (image) images.push(image);\n\t}\n\treturn images;\n}\nfunction filesFromBlocks(blocks) {\n\tconst files = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord(block)) continue;\n\t\tconst file = fileFromBlock(block);\n\t\tif (file) files.push(file);\n\t}\n\treturn files;\n}\nfunction imageFromRawData(data) {\n\tconst trimmed = data.trim();\n\tif (!looksLikeBase64ImageData(trimmed) && !isProbablyBase64Payload(trimmed)) return null;\n\tconst mediaType = imageMediaTypeFromData(trimmed);\n\treturn {\n\t\tdataUrl: mediaDataUrl(trimmed, mediaType),\n\t\tmediaType\n\t};\n}\nfunction hasMcpContentEnvelope(output) {\n\tif (!isRecord(output)) return false;\n\tif (Array.isArray(output.content)) return true;\n\treturn isRecord(output.details) && Array.isArray(output.details.content);\n}\n/** Parse MCP content blocks for chat/history display. */\nfunction parseMcpToolResultDisplay(output) {\n\tconst blocks = mcpContentBlocksFromToolOutput(output);\n\tconst text = textFromBlocks(blocks);\n\tconst images = imagesFromBlocks(blocks);\n\tconst files = filesFromBlocks(blocks);\n\tif (images.length > 0 || files.length > 0) return {\n\t\ttext,\n\t\timages,\n\t\tfiles\n\t};\n\tif (typeof output === \"string\") {\n\t\tconst trimmed = output.trim();\n\t\tconst parsed = parsedJsonRecord(trimmed);\n\t\tif (parsed) {\n\t\t\tconst parsedDisplay = parseMcpToolResultDisplay(parsed);\n\t\t\tif (parsedDisplay.images.length > 0 || parsedDisplay.files.length > 0) return parsedDisplay;\n\t\t}\n\t\tconst image = imageFromRawData(trimmed);\n\t\tif (image) return {\n\t\t\ttext: \"\",\n\t\t\timages: [image],\n\t\t\tfiles: []\n\t\t};\n\t\treturn {\n\t\t\ttext: trimmed,\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n\tif (!isRecord(output)) return {\n\t\ttext: \"\",\n\t\timages: [],\n\t\tfiles: []\n\t};\n\tconst stdout = output.stdout;\n\tif (typeof stdout === \"string\" && stdout.trim().length > 0) return {\n\t\ttext: stdout.trim(),\n\t\timages: [],\n\t\tfiles: []\n\t};\n\tif (output.type === \"text\" && typeof output.value === \"string\") {\n\t\tconst value = output.value.trim();\n\t\tconst image = imageFromRawData(value);\n\t\tif (image) return {\n\t\t\ttext: \"\",\n\t\t\timages: [image],\n\t\t\tfiles: []\n\t\t};\n\t\treturn {\n\t\t\ttext: value,\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n\tif (text.length > 0) return {\n\t\ttext,\n\t\timages,\n\t\tfiles\n\t};\n\tif (blocks.length > 0 || hasMcpContentEnvelope(output)) return {\n\t\ttext: \"\",\n\t\timages: [],\n\t\tfiles: []\n\t};\n\ttry {\n\t\treturn {\n\t\t\ttext: JSON.stringify(output),\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t} catch {\n\t\treturn {\n\t\t\ttext: \"\",\n\t\t\timages: [],\n\t\t\tfiles: []\n\t\t};\n\t}\n}\n/** Map MCP content blocks to AI SDK tool result parts for model consumption. */\nfunction mcpContentBlocksToAiSdkParts(blocks) {\n\tconst parts = [];\n\tfor (const block of blocks) {\n\t\tif (!isRecord(block)) continue;\n\t\tif (block.type === \"text\" && typeof block.text === \"string\") {\n\t\t\tparts.push({\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: block.text\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (isMcpImageBlock(block) && typeof block.data === \"string\") {\n\t\t\tparts.push({\n\t\t\t\ttype: \"image-data\",\n\t\t\t\tdata: block.data,\n\t\t\t\tmediaType: imageMediaTypeFromData(block.data, mimeTypeFromBlock(block))\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (block.type === \"resource\" && isRecord(block.resource)) {\n\t\t\tconst resource = block.resource;\n\t\t\tconst blob = typeof resource.blob === \"string\" ? resource.blob : void 0;\n\t\t\tconst mediaType = mimeTypeFromBlock(resource);\n\t\t\tif (!blob || !mediaType) continue;\n\t\t\tconst uri = typeof resource.uri === \"string\" ? resource.uri : void 0;\n\t\t\tif (mediaType.startsWith(\"image/\")) parts.push({\n\t\t\t\ttype: \"image-data\",\n\t\t\t\tdata: blob,\n\t\t\t\tmediaType\n\t\t\t});\n\t\t\telse parts.push({\n\t\t\t\ttype: \"file-data\",\n\t\t\t\tdata: blob,\n\t\t\t\tmediaType,\n\t\t\t\t...uri ? { filename: filenameFromUri(uri) } : {}\n\t\t\t});\n\t\t}\n\t}\n\treturn parts;\n}\nfunction isRedundantMcpJsonText(text, details) {\n\tif (text.length === 0 || details == null) return false;\n\ttry {\n\t\treturn text === JSON.stringify(details);\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/schemas/public-models.ts\nconst PublicModelsResponseSchema = z.object({ models: z.array(z.string()) });\n//#endregion\n//#region src/schemas/chat-attachments.ts\nconst CHAT_ATTACHMENT_MAX_COUNT = 5;\nconst CHAT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;\n/** Single source of truth for supported chat attachment types and their file extension. */\nconst CHAT_ATTACHMENT_TYPES = [\n\t{\n\t\tmediaType: \"image/png\",\n\t\text: \"png\"\n\t},\n\t{\n\t\tmediaType: \"image/jpeg\",\n\t\text: \"jpg\"\n\t},\n\t{\n\t\tmediaType: \"image/webp\",\n\t\text: \"webp\"\n\t},\n\t{\n\t\tmediaType: \"image/gif\",\n\t\text: \"gif\"\n\t},\n\t{\n\t\tmediaType: \"application/pdf\",\n\t\text: \"pdf\"\n\t}\n];\nconst CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES = CHAT_ATTACHMENT_TYPES.map((type) => type.mediaType);\n/** Canonical file extension for an allowed attachment media type. */\nfunction chatAttachmentExtension(mediaType) {\n\treturn CHAT_ATTACHMENT_TYPES.find((type) => type.mediaType === mediaType)?.ext;\n}\nconst ChatAttachmentInputSchema = z.object({\n\tstorageKey: z.string().min(1),\n\tmediaType: z.string().min(1),\n\tfilename: z.string().optional()\n});\n/** JSON-safe file ref for workflow inputs, step outputs, and `agent.prompt({ files })`. */\nconst FilePartSchema = z.object({\n\ttype: z.literal(\"file\"),\n\tmediaType: z.string().min(1),\n\turl: z.string().min(1),\n\tfilename: z.string().optional()\n});\nconst PresignChatAttachmentRequestSchema = z.object({\n\tcontentType: z.string().min(1),\n\tfilename: z.string().min(1),\n\tsize: z.number().int().positive().max(CHAT_ATTACHMENT_MAX_BYTES)\n});\nconst PresignChatAttachmentResponseSchema = z.object({\n\tuploadUrl: z.string().url(),\n\tstorageKey: z.string().min(1)\n});\nfunction isAllowedChatAttachmentMediaType(mediaType) {\n\treturn chatAttachmentExtension(mediaType) !== void 0;\n}\nfunction modelSupportsMediaType(capabilities, mediaType) {\n\tif (mediaType.startsWith(\"image/\")) return capabilities.images;\n\treturn capabilities.files;\n}\n/** Canonical serve path for a chat attachment (stored in `FileUIPart.url`). */\nfunction chatAttachmentServePath(projectId, agentSlug, storageKey) {\n\tconst encodedKey = storageKey.split(\"/\").map((segment) => encodeURIComponent(segment)).join(\"/\");\n\treturn `/api/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentSlug)}/attachments/${encodedKey}`;\n}\n/** Parse a serve URL or path back to project, agent slug, and storage key. */\nfunction parseChatAttachmentServePath(url) {\n\tlet pathname;\n\ttry {\n\t\tpathname = url instanceof URL ? url.pathname : new URL(url, \"http://local\").pathname;\n\t} catch {\n\t\treturn null;\n\t}\n\tif (!pathname.startsWith(\"/api/projects/\")) return null;\n\tconst match = pathname.slice(14).match(/^([^/]+)\\/agents\\/([^/]+)\\/attachments\\/(.+)$/);\n\tif (!match) return null;\n\tconst [, projectId, agentSlug, encodedKey] = match;\n\tif (!projectId || !agentSlug || !encodedKey) return null;\n\ttry {\n\t\tconst storageKey = encodedKey.split(\"/\").map((segment) => decodeURIComponent(segment)).join(\"/\");\n\t\treturn {\n\t\t\tprojectId: decodeURIComponent(projectId),\n\t\t\tagentSlug: decodeURIComponent(agentSlug),\n\t\t\tstorageKey\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n/** Canonical serve path for a platform-agent chat attachment. */\nfunction platformAgentAttachmentServePath(projectId, storageKey) {\n\tconst encodedKey = storageKey.split(\"/\").map((segment) => encodeURIComponent(segment)).join(\"/\");\n\treturn `/api/platform-agent/attachments/${encodeURIComponent(projectId)}/${encodedKey}`;\n}\n/** Parse a platform-agent attachment serve URL or path. */\nfunction parsePlatformAgentAttachmentServePath(url) {\n\tlet pathname;\n\ttry {\n\t\tpathname = url instanceof URL ? url.pathname : new URL(url, \"http://local\").pathname;\n\t} catch {\n\t\treturn null;\n\t}\n\tif (!pathname.startsWith(\"/api/platform-agent/attachments/\")) return null;\n\tconst rest = pathname.slice(32);\n\tconst slash = rest.indexOf(\"/\");\n\tif (slash <= 0 || slash === rest.length - 1) return null;\n\ttry {\n\t\tconst projectId = decodeURIComponent(rest.slice(0, slash));\n\t\tconst storageKey = rest.slice(slash + 1).split(\"/\").map((segment) => decodeURIComponent(segment)).join(\"/\");\n\t\tif (!projectId || !storageKey) return null;\n\t\treturn {\n\t\t\tprojectId,\n\t\t\tstorageKey\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n//#endregion\n//#region src/types/credential-runtime.ts\nfunction hasEntries(value) {\n\treturn value !== void 0 && Object.keys(value).length > 0;\n}\n/** Omit scope/actor fields that are reconstructed from the workflow run and worker. */\nfunction credentialRunOverrideFromContext(context) {\n\tconst selection = context?.selection;\n\tconst userIds = context?.userIds;\n\tif (!hasEntries(selection) && !hasEntries(userIds)) return;\n\treturn {\n\t\t...hasEntries(selection) ? { selection } : {},\n\t\t...hasEntries(userIds) ? { userIds } : {}\n\t};\n}\n/** Stable assignment consumer id for agent sandbox credential requirements. */\nconst SANDBOX_CREDENTIAL_CONSUMER_ID = \"sandbox\";\n//#endregion\nexport { wrapPromptContext as A, LLM_RUN_KIND_HEADER as B, parseMcpToolResultDisplay as C, prependAgentUserContext as D, hasAgentTimestampContext as E, ANALYTICS_ID_HEADER as F, ANALYTICS_SESSION_HEADER as I, CLIENT_CHANNEL_HEADER as L, isValidIanaTimezone as M, ACTIVE_ORG_COOKIE as N, sanitizePromptContextContent as O, ACTIVE_ORG_HEADER as P, LLM_KEY_SOURCE_HEADER as R, mediaDataUrl as S, AGENT_CONTEXT_OPEN as T, LLM_SKIP_USAGE_HEADER as V, platformAgentAttachmentServePath as _, CHAT_ATTACHMENT_MAX_COUNT as a, mcpContentBlocksFromToolOutput as b, FilePartSchema as c, chatAttachmentExtension as d, chatAttachmentServePath as f, parsePlatformAgentAttachmentServePath as g, parseChatAttachmentServePath as h, CHAT_ATTACHMENT_MAX_BYTES as i, formatAgentTimestampContext as j, stripPromptContext as k, PresignChatAttachmentRequestSchema as l, modelSupportsMediaType as m, credentialRunOverrideFromContext as n, CHAT_ATTACHMENT_TYPES as o, isAllowedChatAttachmentMediaType as p, CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES as r, ChatAttachmentInputSchema as s, SANDBOX_CREDENTIAL_CONSUMER_ID as t, PresignChatAttachmentResponseSchema as u, PublicModelsResponseSchema as v, AGENT_CONTEXT_CLOSE as w, mcpContentBlocksToAiSdkParts as x, isRedundantMcpJsonText as y, LLM_RUN_ID_HEADER as z };\n\n//# sourceMappingURL=credential-runtime-Cbm2X9rK.mjs.map","import { C as UpdateAutoTopupRequestSchema, D as MICRO_CREDITS_PER_CREDIT, E as DEFAULT_PLAN_KEY, S as SubmitBillingUsageResponseSchema, T as subscriptionStatusSchema, _ as CreateSubscriptionCheckoutRequestSchema, a as BillingRedirectResponseSchema, b as SubmitBillingUsageEventSchema, c as BillingUsageKeySourceSchema, d as BillingUsageResponseSchema, f as BillingUsageRunKindSchema, g as CreateCreditsCheckoutRequestSchema, h as CreateBillingPortalRequestSchema, i as BillingInvoiceUrlResponseSchema, l as BillingUsageMeterKeySchema, m as ConfirmCheckoutResponseSchema, n as BillingActivityEntrySchema, o as BillingSummaryResponseSchema, p as ConfirmCheckoutRequestSchema, r as BillingActivityResponseSchema, s as BillingUsageEventSourceSchema, t as AutoTopupSummarySchema, u as BillingUsageMeterSchema, v as CreditPackSchema, w as billingLedgerEntryTypeSchema, x as SubmitBillingUsageRequestSchema, y as PlanLimitsSchema } from \"./billing-Ig0pw49a.mjs\";\nimport { A as wrapPromptContext, B as LLM_RUN_KIND_HEADER, C as parseMcpToolResultDisplay, D as prependAgentUserContext, E as hasAgentTimestampContext, F as ANALYTICS_ID_HEADER, I as ANALYTICS_SESSION_HEADER, L as CLIENT_CHANNEL_HEADER, M as isValidIanaTimezone, N as ACTIVE_ORG_COOKIE, O as sanitizePromptContextContent, P as ACTIVE_ORG_HEADER, R as LLM_KEY_SOURCE_HEADER, S as mediaDataUrl, T as AGENT_CONTEXT_OPEN, V as LLM_SKIP_USAGE_HEADER, _ as platformAgentAttachmentServePath, a as CHAT_ATTACHMENT_MAX_COUNT, b as mcpContentBlocksFromToolOutput, c as FilePartSchema, d as chatAttachmentExtension, f as chatAttachmentServePath, g as parsePlatformAgentAttachmentServePath, h as parseChatAttachmentServePath, i as CHAT_ATTACHMENT_MAX_BYTES, j as formatAgentTimestampContext, k as stripPromptContext, l as PresignChatAttachmentRequestSchema, m as modelSupportsMediaType, n as credentialRunOverrideFromContext, o as CHAT_ATTACHMENT_TYPES, p as isAllowedChatAttachmentMediaType, r as CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES, s as ChatAttachmentInputSchema, t as SANDBOX_CREDENTIAL_CONSUMER_ID, u as PresignChatAttachmentResponseSchema, v as PublicModelsResponseSchema, w as AGENT_CONTEXT_CLOSE, x as mcpContentBlocksToAiSdkParts, y as isRedundantMcpJsonText, z as LLM_RUN_ID_HEADER } from \"./credential-runtime-Cbm2X9rK.mjs\";\nimport { DEFAULT_CLOUD_PLATFORM_ORIGIN, LOCAL_PLATFORM_ORIGIN, resolveExplicitPublicPlatformOrigin, resolveExternalPlatformOrigin, resolveMcpPlatformUrl, resolvePlatformWebhookOrigin, resolvePublicPlatformApiOrigin, resolvePublicPlatformOrigin } from \"./platform-origin.mjs\";\nimport { A as CREDENTIAL_AUTH_KINDS, B as getOpenApiJsonSchema, C as CredentialAssignmentListResponseSchema, D as CredentialConsumerListResponseSchema, E as CredentialConsumerListQuerySchema, F as defineTool, H as schemaFromJson, I as getAgentToolInputSchema, L as toolParameters, M as CredentialAuthKindSchema, N as CredentialScopeTypeSchema, O as CredentialConsumerSummarySchema, P as AGENT_TOOL_INPUT, R as OPENAPI_JSON_SCHEMA, S as CredentialAssignmentListQuerySchema, T as CredentialAssignmentTargetTypeSchema, V as getToolJsonSchema, _ as formatMcpToolErrorMessage, a as isCredentialInput, b as AssignCredentialBodySchema, c as ExecuteKeystrokeToolErrorCodeSchema, d as KeystrokeCredentialSchema, f as ListMcpAppsResponseSchema, g as McpCredentialAssignmentTargetSchema, h as McpConnectionStatusSchema, i as defineCredential, j as CREDENTIAL_SCOPE_TYPES, k as requiredDisplayTextSchema, l as ExecuteKeystrokeToolErrorResponseSchema, m as McpAppSchema, n as credential, o as normalizeCredentialList, p as MCP_TOOL_EXECUTE_FAILED_STATUS, r as credentialInputSchema, s as toCredentialRequirement, t as SandboxAccessTokenSchema, u as ExecuteKeystrokeToolRequestSchema, v as mcpEntityId, w as CredentialAssignmentRecordSchema, x as CREDENTIAL_ASSIGNMENT_WILDCARD, y as parseMcpEntityId, z as TOOL_JSON_SCHEMA } from \"./credential-spec-B-iwg8Oc.mjs\";\nimport { z } from \"zod\";\n//#region src/constants/conventions.ts\n/** File-layout rules shared by agents, workflows, triggers, and OpenAPI `x-keystroke`. */\nconst DISCOVERY_CONVENTIONS = {\n\tagents: {\n\t\tflat: \"{name}.ts → POST /agents/{name}\",\n\t\tnested: \"{path}/agent.ts or {path}/index.ts → POST /agents/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\tworkflows: {\n\t\tflat: \"{name}.ts → POST /workflows/{name}\",\n\t\tnested: \"{path}/workflow.ts or {path}/index.ts → POST /workflows/{path}\",\n\t\thelpers: \"Other .ts files under nested folders are not mounted.\"\n\t},\n\ttriggers: {\n\t\tflat: \"{name}.ts → trigger slug {name}, attachment slug {triggerSlug}:{targetSlug}\",\n\t\tnested: \"{path}/trigger.ts or {path}/index.ts → trigger slug {path}\",\n\t\thelpers: \"Reusable sources live under triggers/sources/ and are not discovered.\"\n\t},\n\topenapi: \"GET /openapi.json lists invoke-route paths derived from the stored registry manifest; x-keystroke.manifest carries the full v2 manifest.\"\n};\n//#endregion\n//#region src/constants/template-slugs.ts\n/**\n* Hello-world template resource slugs. Used to detect first custom (non-template)\n* deploys and runs for activation metrics.\n*/\nconst HELLO_WORLD_TEMPLATE_SLUGS = [\n\t\"hello\",\n\t\"greeting\",\n\t\"greet\"\n];\nconst HELLO_WORLD_TEMPLATE_SLUG_SET = new Set(HELLO_WORLD_TEMPLATE_SLUGS);\nfunction isHelloWorldTemplateSlug(slug) {\n\treturn HELLO_WORLD_TEMPLATE_SLUG_SET.has(slug);\n}\n//#endregion\n//#region src/organization-slug.ts\n/** Auth, session, and account-entry URL segments. */\nconst AUTH_ACCOUNT_SLUGS = [\n\t\"2fa\",\n\t\"accept-invite\",\n\t\"auth\",\n\t\"authorize\",\n\t\"callback\",\n\t\"callbacks\",\n\t\"confirm-email\",\n\t\"confirmation\",\n\t\"connect\",\n\t\"device\",\n\t\"email-verification\",\n\t\"forgot-password\",\n\t\"invite\",\n\t\"invites\",\n\t\"login\",\n\t\"logout\",\n\t\"magic-link\",\n\t\"mfa\",\n\t\"oauth\",\n\t\"onboarding\",\n\t\"password\",\n\t\"recovery\",\n\t\"register\",\n\t\"reset-password\",\n\t\"saml\",\n\t\"session\",\n\t\"sessions\",\n\t\"sign-in\",\n\t\"sign-up\",\n\t\"signin\",\n\t\"signout\",\n\t\"signup\",\n\t\"sso\",\n\t\"token\",\n\t\"tokens\",\n\t\"unlink\",\n\t\"verify\",\n\t\"verify-email\"\n];\n/** Org, workspace, billing, and account-management URL segments. */\nconst ORG_ACCOUNT_SLUGS = [\n\t\"account\",\n\t\"accounts\",\n\t\"billing\",\n\t\"console\",\n\t\"invoice\",\n\t\"invoices\",\n\t\"member\",\n\t\"members\",\n\t\"me\",\n\t\"org\",\n\t\"organization\",\n\t\"organizations\",\n\t\"orgs\",\n\t\"payment\",\n\t\"payments\",\n\t\"plan\",\n\t\"plans\",\n\t\"portal\",\n\t\"preferences\",\n\t\"profile\",\n\t\"settings\",\n\t\"subscription\",\n\t\"subscriptions\",\n\t\"team\",\n\t\"teams\",\n\t\"upgrade\",\n\t\"usage\",\n\t\"user\",\n\t\"users\",\n\t\"workspace\",\n\t\"workspaces\"\n];\n/** Product surfaces, resource types, and in-app navigation segments. */\nconst PRODUCT_SLUGS = [\n\t\"action\",\n\t\"actions\",\n\t\"activity\",\n\t\"agent\",\n\t\"agents\",\n\t\"analytics\",\n\t\"app\",\n\t\"apps\",\n\t\"artifact\",\n\t\"artifacts\",\n\t\"assistant\",\n\t\"assistants\",\n\t\"audit\",\n\t\"audit-log\",\n\t\"automation\",\n\t\"automations\",\n\t\"branch\",\n\t\"branches\",\n\t\"canvas\",\n\t\"chat\",\n\t\"chats\",\n\t\"connection\",\n\t\"connections\",\n\t\"create\",\n\t\"credential\",\n\t\"credentials\",\n\t\"dashboard\",\n\t\"deployment\",\n\t\"deployments\",\n\t\"examples\",\n\t\"execute\",\n\t\"execution\",\n\t\"executions\",\n\t\"explore\",\n\t\"forms\",\n\t\"get-started\",\n\t\"history\",\n\t\"inbox\",\n\t\"inspector\",\n\t\"integration\",\n\t\"integrations\",\n\t\"library\",\n\t\"logs\",\n\t\"marketplace\",\n\t\"mcp\",\n\t\"mcps\",\n\t\"new\",\n\t\"notifications\",\n\t\"observe\",\n\t\"plugin\",\n\t\"plugins\",\n\t\"primitive\",\n\t\"primitives\",\n\t\"project\",\n\t\"projects\",\n\t\"recents\",\n\t\"registry\",\n\t\"reports\",\n\t\"run\",\n\t\"runs\",\n\t\"runtime\",\n\t\"runtimes\",\n\t\"sandbox\",\n\t\"sandboxes\",\n\t\"search\",\n\t\"skill\",\n\t\"skills\",\n\t\"templates\",\n\t\"thread\",\n\t\"threads\",\n\t\"trigger\",\n\t\"triggers\",\n\t\"version\",\n\t\"versions\",\n\t\"workflow\",\n\t\"workflows\"\n];\n/** Marketing, docs, company, and go-to-market URL segments. */\nconst MARKETING_SITE_SLUGS = [\n\t\"about\",\n\t\"affiliates\",\n\t\"ai\",\n\t\"announcements\",\n\t\"anthropic\",\n\t\"blog\",\n\t\"book-demo\",\n\t\"brand\",\n\t\"campaigns\",\n\t\"career\",\n\t\"careers\",\n\t\"case-studies\",\n\t\"casestudies\",\n\t\"changelog\",\n\t\"chatgpt\",\n\t\"chrome-extension\",\n\t\"claude\",\n\t\"codex\",\n\t\"community\",\n\t\"company\",\n\t\"compare\",\n\t\"contact\",\n\t\"contribute\",\n\t\"creators\",\n\t\"customers\",\n\t\"demo\",\n\t\"demos\",\n\t\"discord\",\n\t\"docs\",\n\t\"documentation\",\n\t\"download\",\n\t\"downloads\",\n\t\"dust\",\n\t\"emerging-talent\",\n\t\"engineering-blog\",\n\t\"enterprise\",\n\t\"events\",\n\t\"experts\",\n\t\"extension\",\n\t\"faq\",\n\t\"faqs\",\n\t\"features\",\n\t\"forum\",\n\t\"glean\",\n\t\"grok\",\n\t\"guide\",\n\t\"guides\",\n\t\"gumloop\",\n\t\"handbook\",\n\t\"help\",\n\t\"help-center\",\n\t\"home\",\n\t\"how-it-works\",\n\t\"howitworks\",\n\t\"inspo\",\n\t\"intern\",\n\t\"investors\",\n\t\"jobs\",\n\t\"legal\",\n\t\"lindy\",\n\t\"llm\",\n\t\"llms\",\n\t\"love\",\n\t\"make\",\n\t\"manifesto\",\n\t\"media\",\n\t\"merch\",\n\t\"mission\",\n\t\"mobile\",\n\t\"models\",\n\t\"n8n\",\n\t\"news\",\n\t\"newsroom\",\n\t\"open\",\n\t\"open-claw\",\n\t\"open-source\",\n\t\"openai\",\n\t\"our-story\",\n\t\"overview\",\n\t\"partners\",\n\t\"pi\",\n\t\"pipedream\",\n\t\"platform\",\n\t\"press\",\n\t\"press-kit\",\n\t\"pricing\",\n\t\"privacy\",\n\t\"product\",\n\t\"products\",\n\t\"provider\",\n\t\"providers\",\n\t\"quick-start\",\n\t\"quickstart\",\n\t\"refer\",\n\t\"relay\",\n\t\"relay-app\",\n\t\"reporting\",\n\t\"request-demo\",\n\t\"resources\",\n\t\"roadmap\",\n\t\"schedule-demo\",\n\t\"security\",\n\t\"solutions\",\n\t\"stack-ai\",\n\t\"stackai\",\n\t\"startup\",\n\t\"startups\",\n\t\"status\",\n\t\"stories\",\n\t\"story\",\n\t\"students\",\n\t\"support\",\n\t\"swag\",\n\t\"switch\",\n\t\"talent\",\n\t\"terms\",\n\t\"testimonials\",\n\t\"thesis\",\n\t\"tines\",\n\t\"trust\",\n\t\"tutorials\",\n\t\"university\",\n\t\"use-case\",\n\t\"use-cases\",\n\t\"usecases\",\n\t\"versus\",\n\t\"vellum\",\n\t\"vs\",\n\t\"webinars\",\n\t\"workato\",\n\t\"xai\",\n\t\"yc\",\n\t\"zapier\"\n];\n/** Integrations, competitors, and partner brand slugs (marketing / integration pages). */\nconst INTEGRATION_BRAND_SLUGS = [\n\t\"airtable\",\n\t\"asana\",\n\t\"aws\",\n\t\"azure\",\n\t\"bun\",\n\t\"confluence\",\n\t\"copilot\",\n\t\"cursor\",\n\t\"databricks\",\n\t\"figma\",\n\t\"firebase\",\n\t\"fly\",\n\t\"gcp\",\n\t\"gemini\",\n\t\"github\",\n\t\"gitlab\",\n\t\"gmail\",\n\t\"heroku\",\n\t\"hubspot\",\n\t\"huggingface\",\n\t\"jira\",\n\t\"linear\",\n\t\"mailchimp\",\n\t\"meta\",\n\t\"mistral\",\n\t\"mixmax\",\n\t\"monday\",\n\t\"netlify\",\n\t\"neon\",\n\t\"notion\",\n\t\"npm\",\n\t\"outlook\",\n\t\"outreach\",\n\t\"perplexity\",\n\t\"planetscale\",\n\t\"pnpm\",\n\t\"postmark\",\n\t\"ramp\",\n\t\"railway\",\n\t\"render\",\n\t\"resend\",\n\t\"salesforce\",\n\t\"segment\",\n\t\"sendgrid\",\n\t\"shopify\",\n\t\"slack\",\n\t\"snowflake\",\n\t\"stripe\",\n\t\"supabase\",\n\t\"terraform\",\n\t\"trello\",\n\t\"turso\",\n\t\"twilio\",\n\t\"typeform\",\n\t\"vercel\",\n\t\"vscode\",\n\t\"windsurf\",\n\t\"yarn\"\n];\n/** Company, team, and department landing-page segments. */\nconst COMPANY_TEAM_SLUGS = [\n\t\"engineers\",\n\t\"engineering\",\n\t\"executives\",\n\t\"hc\",\n\t\"intern\",\n\t\"it\",\n\t\"leadership\",\n\t\"marketing\",\n\t\"ops\",\n\t\"revops\",\n\t\"sales\",\n\t\"services\",\n\t\"tech\"\n];\n/** Legal, trust, compliance, and policy URL segments. */\nconst LEGAL_TRUST_SLUGS = [\n\t\"accessibility\",\n\t\"agreement\",\n\t\"a11y\",\n\t\"bug-bounty\",\n\t\"compliance\",\n\t\"cookie-policy\",\n\t\"cookies\",\n\t\"data-use\",\n\t\"disclose\",\n\t\"dpa\",\n\t\"eula\",\n\t\"gdpr\",\n\t\"hipaa\",\n\t\"iso\",\n\t\"msa\",\n\t\"pci\",\n\t\"responsible-disclosure\",\n\t\"sla\",\n\t\"soc2\",\n\t\"tos\",\n\t\"trust-center\",\n\t\"trustcenter\",\n\t\"vulnerability\"\n];\n/** Developer, API, CLI, and technical URL segments. */\nconst DEVELOPER_TECH_SLUGS = [\n\t\"api\",\n\t\"api-docs\",\n\t\"cli\",\n\t\"code\",\n\t\"config\",\n\t\"developer\",\n\t\"developer-tools\",\n\t\"developers\",\n\t\"dev-tools\",\n\t\"devtools\",\n\t\"dev\",\n\t\"dev-states\",\n\t\"graphql\",\n\t\"graphql-playground\",\n\t\"mcp-server\",\n\t\"mcp-servers\",\n\t\"openapi\",\n\t\"sdk\",\n\t\"swagger\"\n];\n/** Infra, ops, static assets, and system URL segments. */\nconst INFRA_SYSTEM_SLUGS = [\n\t\"acme-challenge\",\n\t\"admin\",\n\t\"apple-app-site-association\",\n\t\"assets\",\n\t\"batch\",\n\t\"cache\",\n\t\"cdn\",\n\t\"cron\",\n\t\"debug\",\n\t\"error\",\n\t\"errors\",\n\t\"favicon\",\n\t\"feed\",\n\t\"files\",\n\t\"health\",\n\t\"healthcheck\",\n\t\"healthz\",\n\t\"hook-resume\",\n\t\"hooks\",\n\t\"internal\",\n\t\"item\",\n\t\"manifest\",\n\t\"metrics\",\n\t\"null\",\n\t\"ping\",\n\t\"prod\",\n\t\"public\",\n\t\"redirect\",\n\t\"robots\",\n\t\"rpc\",\n\t\"rss\",\n\t\"sharer\",\n\t\"sitemap\",\n\t\"staging\",\n\t\"static\",\n\t\"storage\",\n\t\"test\",\n\t\"undefined\",\n\t\"universal\",\n\t\"webhooks\",\n\t\"well-known\",\n\t\"www\"\n];\n/** Reserved slugs that are valid org names in theory but blocked for routing safety. */\nconst ROUTING_SAFETY_SLUGS = [\n\t\"alpha\",\n\t\"anonymous\",\n\t\"archive\",\n\t\"archived\",\n\t\"beta\",\n\t\"clone\",\n\t\"copy\",\n\t\"default\",\n\t\"deleted\",\n\t\"demo-org\",\n\t\"draft\",\n\t\"drafts\",\n\t\"duplicate\",\n\t\"early-access\",\n\t\"embed\",\n\t\"embedded\",\n\t\"export\",\n\t\"fork\",\n\t\"free\",\n\t\"guest\",\n\t\"import\",\n\t\"index\",\n\t\"list\",\n\t\"manage\",\n\t\"moderator\",\n\t\"newsletter\",\n\t\"owner\",\n\t\"preview\",\n\t\"previews\",\n\t\"private\",\n\t\"pro\",\n\t\"public-api\",\n\t\"publish\",\n\t\"published\",\n\t\"queue\",\n\t\"remove\",\n\t\"root\",\n\t\"sample\",\n\t\"samples\",\n\t\"selection\",\n\t\"share\",\n\t\"shared\",\n\t\"sponsor\",\n\t\"sponsors\",\n\t\"sponsorship\",\n\t\"subscribe\",\n\t\"super\",\n\t\"superuser\",\n\t\"system\",\n\t\"sys\",\n\t\"test-org\",\n\t\"trash\",\n\t\"unpublish\",\n\t\"unsubscribe\",\n\t\"upload\",\n\t\"uploads\",\n\t\"waitlist\",\n\t\"widget\",\n\t\"widgets\",\n\t\"worker\",\n\t\"workers\"\n];\n/**\n* URL segments reserved for global (non-org) routes — cannot be used as an org slug.\n* Prefer adding new entries to the category arrays above; the Set is the enforcement surface.\n*/\nconst RESERVED_ORGANIZATION_SLUGS = new Set([\n\t...AUTH_ACCOUNT_SLUGS,\n\t...ORG_ACCOUNT_SLUGS,\n\t...PRODUCT_SLUGS,\n\t...MARKETING_SITE_SLUGS,\n\t...INTEGRATION_BRAND_SLUGS,\n\t...COMPANY_TEAM_SLUGS,\n\t...LEGAL_TRUST_SLUGS,\n\t...DEVELOPER_TECH_SLUGS,\n\t...INFRA_SYSTEM_SLUGS,\n\t...ROUTING_SAFETY_SLUGS\n]);\n/**\n* Base slug format: lowercase, 2-64 chars, alphanumeric + dashes.\n*\n* IMPORTANT: this is the schema for *reading* slugs (persisted rows, API\n* responses). It intentionally does NOT enforce the reserved-name list — an org\n* created before a name became reserved must still parse on read. Use\n* `ClaimableOrganizationSlugSchema` to validate slugs a user is trying to claim.\n*/\nconst OrganizationSlugSchema = z.string().trim().toLowerCase().min(2, \"Slug must be at least 2 characters\").max(64, \"Slug must be at most 64 characters\").regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, \"Use lowercase letters, numbers, and dashes only\");\n/**\n* Slug validation for *claiming* a slug (organization create/rename). Adds the\n* reserved-name check on top of the base format. Never use this to parse\n* existing org data, or pre-existing orgs whose slug later became reserved would\n* fail to load.\n*/\nconst ClaimableOrganizationSlugSchema = OrganizationSlugSchema.refine((slug) => !RESERVED_ORGANIZATION_SLUGS.has(slug), \"This slug is reserved\");\nconst ORGANIZATION_NAME_APOSTROPHE_PATTERN = /[''\\u2018\\u2019]/g;\n/** Normalize a display name into slug-shaped text (may be empty or too short to claim). */\nfunction normalizeOrganizationNameToSlugBase(name) {\n\treturn name.trim().toLowerCase().replace(ORGANIZATION_NAME_APOSTROPHE_PATTERN, \"\").replace(/[^a-z0-9]+/g, \"-\").replace(/-+/g, \"-\").replace(/^-|-$/g, \"\");\n}\n/**\n* Live slug preview while typing an org name. Returns normalized text only —\n* no server-side `\"org\"` fallback when the preview is empty or under min length.\n*/\nfunction previewOrganizationSlugFromName(name) {\n\treturn normalizeOrganizationNameToSlugBase(name);\n}\n/** Derive a URL slug from a display name (not guaranteed unique). */\nfunction slugifyOrganizationName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"org\";\n\tconst parsed = OrganizationSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"org\";\n}\nfunction parseOrganizationSlug(input) {\n\treturn OrganizationSlugSchema.parse(input);\n}\n//#endregion\n//#region src/project-slug.ts\n/** Same format as organization slugs — org-scoped, no global reserved list. */\nconst ProjectSlugSchema = OrganizationSlugSchema;\n/** Derive a URL slug from a project display name (not guaranteed unique within the org). */\nfunction slugifyProjectName(name) {\n\tconst base = normalizeOrganizationNameToSlugBase(name);\n\tif (!base) return \"project\";\n\tconst parsed = ProjectSlugSchema.safeParse(base);\n\treturn parsed.success ? parsed.data : \"project\";\n}\nfunction parseProjectSlug(input) {\n\treturn ProjectSlugSchema.parse(input);\n}\n//#endregion\n//#region src/schemas/organizations.ts\n/** Canonical copy for slug collision errors (API + UI). */\nconst ORGANIZATION_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst PROJECT_SLUG_TAKEN_MESSAGE = \"That slug is already taken.\";\nconst OrganizationSlugErrorCodeSchema = z.enum([\n\t\"slug_taken\",\n\t\"slug_reserved\",\n\t\"slug_invalid\"\n]);\nconst SlugAvailabilityReasonSchema = z.enum([\n\t\"taken\",\n\t\"reserved\",\n\t\"invalid\"\n]);\nconst SlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: SlugAvailabilityReasonSchema.optional(),\n\tsuggestion: OrganizationSlugSchema.optional()\n});\nconst SlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeOrganizationId: z.string().min(1).optional()\n});\nconst ProjectSlugAvailabilityReasonSchema = z.enum([\"taken\", \"invalid\"]);\nconst ProjectSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: ProjectSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: ProjectSlugSchema.optional()\n});\nconst ProjectSlugAvailabilityQuerySchema = z.object({\n\tslug: z.string().trim().min(1),\n\texcludeProjectId: z.string().min(1).optional()\n});\n/** Client-side instant validation before hitting the project slug availability endpoint. */\nfunction validateProjectSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst parsed = ProjectSlugSchema.safeParse(normalized);\n\tif (!parsed.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: parsed.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\treturn { valid: true };\n}\n/** Client-side instant validation before hitting the availability endpoint. */\nfunction validateClaimableOrganizationSlug(slug) {\n\tconst normalized = slug.trim().toLowerCase();\n\tif (!normalized) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: \"Slug is required\"\n\t};\n\tconst format = OrganizationSlugSchema.safeParse(normalized);\n\tif (!format.success) return {\n\t\tvalid: false,\n\t\treason: \"invalid\",\n\t\tmessage: format.error.issues[0]?.message ?? \"Invalid slug\"\n\t};\n\tif (RESERVED_ORGANIZATION_SLUGS.has(format.data)) return {\n\t\tvalid: false,\n\t\treason: \"reserved\",\n\t\tmessage: \"This slug is reserved\"\n\t};\n\treturn { valid: true };\n}\nfunction organizationSlugErrorCodeFromMessage(message) {\n\tif (message === \"That slug is already taken.\" || /already taken/i.test(message)) return \"slug_taken\";\n\tif (/reserved/i.test(message)) return \"slug_reserved\";\n\treturn \"slug_invalid\";\n}\nconst ProjectStatusSchema = z.enum([\n\t\"inactive\",\n\t\"starting\",\n\t\"active\",\n\t\"failed\"\n]);\nconst OrganizationUserRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst isoDateTime$6 = z.string().datetime();\nconst OrganizationSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tslug: OrganizationSlugSchema,\n\tverified: z.boolean(),\n\tcreatedAt: isoDateTime$6,\n\tupdatedAt: isoDateTime$6\n});\nconst ProjectSchema = z.object({\n\tid: z.string(),\n\torganizationId: z.string(),\n\tname: z.string(),\n\tslug: ProjectSlugSchema,\n\tdescription: z.string().nullable(),\n\tstatus: ProjectStatusSchema,\n\tbaseUrl: z.string().nullable(),\n\truntimeId: z.string().nullable(),\n\tlastError: z.string().nullable(),\n\tactiveArtifactId: z.string().nullable(),\n\tcreatedAt: isoDateTime$6,\n\tupdatedAt: isoDateTime$6\n});\nconst UserOrganizationSchema = z.object({\n\torganization: OrganizationSchema,\n\trole: OrganizationUserRoleSchema\n});\nconst CurrentOrganizationResponseSchema = UserOrganizationSchema.nullable();\nconst ActiveOrganizationResponseSchema = CurrentOrganizationResponseSchema;\nconst ListOrganizationsResponseSchema = z.array(UserOrganizationSchema);\nconst CreateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\t/** Format-only at the wire boundary; reserved-name checks run in platform-database. */\n\tslug: OrganizationSlugSchema.optional()\n});\nconst UpdateOrganizationRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tslug: ClaimableOrganizationSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateOrganizationResponseSchema = UserOrganizationSchema;\nconst ListProjectsResponseSchema = z.array(ProjectSchema);\nconst ProjectListMetricsSchema = z.object({\n\tagentCount: z.number(),\n\tworkflowCount: z.number(),\n\tskillCount: z.number(),\n\tcredentialCount: z.number(),\n\tlastDeploymentAt: isoDateTime$6.nullable()\n});\nconst ListProjectMetricsResponseSchema = z.record(z.string(), ProjectListMetricsSchema);\nconst CreateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1),\n\tdescription: z.string().trim().min(1).optional()\n});\nconst UpdateProjectRequestSchema = z.object({\n\tname: z.string().trim().min(1).optional(),\n\tdescription: z.string().trim().optional(),\n\tslug: ProjectSlugSchema.optional()\n}).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: \"At least one field is required\" });\nconst CreateProjectResponseSchema = ProjectSchema;\nconst ProjectResponseSchema = ProjectSchema;\nconst ProjectReachabilityResponseSchema = z.object({ reachable: z.boolean() });\nfunction parseCreateOrganizationRequest(input) {\n\treturn CreateOrganizationRequestSchema.parse(input);\n}\n//#endregion\n//#region src/app-slug.ts\n/** Org-custom app slug segment (the part after `{orgSlug}/`). Same format as project slugs. */\nconst AppSlugSchema = ProjectSlugSchema;\nconst APP_SLUG_TAKEN_MESSAGE = PROJECT_SLUG_TAKEN_MESSAGE;\n/** Derive a slug segment from a display name (not guaranteed unique). */\nfunction slugifyAppName(name) {\n\treturn slugifyProjectName(name);\n}\nconst validateAppSlug = validateProjectSlug;\n//#endregion\n//#region src/constants/projects.ts\n/** Platform wait for project /health before declaring unreachable. */\nconst PROJECT_PING_TIMEOUT_MS = 15e3;\n/** Browser→platform request budget (ping + small platform overhead). */\nconst PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS = 17e3;\n/** Pause between reachability checks after the previous check finishes. */\nconst PROJECT_REACHABILITY_RETRY_MS = 5e3;\n/**\n* SDK HTTP budget for managed deploy transaction requests. Completion may\n* download and validate a near-limit artifact, so it must not inherit ky's 10s\n* default. Local analysis/build runs outside the HTTP request.\n*/\nconst MANAGED_DEPLOY_REQUEST_TIMEOUT_MS = 15 * 6e4;\n/**\n* SDK HTTP budget for draft `commit` / `commitFromDiff`. First uploads can be\n* multi-MB binary patches applied on Code.Storage; ky’s default 10s aborts those.\n*/\nconst PROJECT_DRAFT_COMMIT_REQUEST_TIMEOUT_MS = 5 * 6e4;\n//#endregion\n//#region src/docs-url.ts\n/** Path of the public Mintlify-hosted docs search MCP server, relative to the web origin. */\nconst DOCS_MCP_PATH = \"/docs/mcp\";\n/**\n* Tool names exposed by the public Mintlify-hosted docs MCP server. These are the\n* upstream tool identifiers we proxy to; our CLI and MCP server present stable\n* `docs search`/`query` and `search_docs`/`query_docs` surfaces on top of them.\n*/\nconst DOCS_SEARCH_TOOL = \"search_keystroke\";\nconst DOCS_QUERY_TOOL = \"query_docs_filesystem_keystroke\";\n/** Mintlify search emits extensionless `Page:` routes; the query filesystem uses `.mdx`. */\nconst DOCS_SEARCH_PAGE_LINE = /^(Page:\\s+)(.+)$/gm;\n/** Only skip appending `.mdx` when the path already has a docs-filesystem suffix. */\nconst DOCS_PATH_HAS_EXTENSION = /\\.(mdx|md|ya?ml|json)$/i;\n/**\n* Rewrite docs-search `Page:` lines so returned paths are query-readable.\n* Leaves already-suffixed paths and non-`Page:` text unchanged.\n*/\nfunction normalizeDocsSearchPaths(text) {\n\treturn text.replace(DOCS_SEARCH_PAGE_LINE, (_match, prefix, path) => {\n\t\tconst trimmed = path.trimEnd();\n\t\tif (DOCS_PATH_HAS_EXTENSION.test(trimmed)) return `${prefix}${trimmed}`;\n\t\treturn `${prefix}${trimmed}.mdx`;\n\t});\n}\n/**\n* Resolve the public Keystroke docs MCP URL. Defaults to `{webUrl}/docs/mcp`;\n* an explicit `override` (e.g. `KEYSTROKE_DOCS_MCP_URL`) wins for dev/testing.\n*/\nfunction resolveDocsMcpUrl(options) {\n\tconst override = options.override?.trim();\n\tif (override) return override.replace(/\\/+$/, \"\");\n\treturn `${options.webUrl.replace(/\\/+$/, \"\")}${DOCS_MCP_PATH}`;\n}\n//#endregion\n//#region src/public-url.ts\n/** Normalize a public origin URL (no trailing slash). */\nfunction originFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback.replace(/\\/+$/, \"\");\n\treturn trimmed.replace(/\\/+$/, \"\");\n}\n/** TCP port to bind for a local server, derived from a public URL. */\nfunction listenPortFromUrl(url, fallback) {\n\tconst parsed = new URL(url);\n\tif (parsed.port) {\n\t\tconst port = Number(parsed.port);\n\t\tif (Number.isFinite(port) && port > 0) return port;\n\t}\n\tif (parsed.protocol === \"https:\") return 443;\n\tif (parsed.protocol === \"http:\") return 80;\n\treturn fallback;\n}\n/** Shorthand: listen port from `PUBLIC_*_URL` or fallback. */\nfunction listenPortFromPublicUrl(value, fallback) {\n\tconst trimmed = value?.trim();\n\tif (!trimmed) return fallback;\n\ttry {\n\t\treturn listenPortFromUrl(trimmed, fallback);\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n//#endregion\n//#region src/json-schema.ts\n/**\n* Target for Zod ↔ JSON Schema round-trips of persisted Keystroke schemas\n* (workflow inputs, webhook payloads, hook resume schemas, agent output schemas).\n*\n* OpenAPI 3.0 emits `#/definitions/...` refs without a `$schema` field. Zod's\n* `fromJSONSchema` defaults to draft-2020-12 (`#/$defs/...`) when `$schema` is\n* absent, so callers must pass this same target on the way back.\n*\n* LLM tool parameters use draft-2020-12 via {@link toolParameters} instead —\n* those are not round-tripped through `jsonSchemaToZod`.\n*/\nconst STORED_JSON_SCHEMA_TARGET = \"openapi-3.0\";\n/** Serialize a Zod schema for persistence / later {@link jsonSchemaToZod}. */\nfunction zodToStoredJsonSchema(schema, options = {}) {\n\treturn z.toJSONSchema(schema, {\n\t\ttarget: STORED_JSON_SCHEMA_TARGET,\n\t\t...options.allowAdditionalProperties ? { override(ctx) {\n\t\t\tif (ctx.jsonSchema.type === \"object\") ctx.jsonSchema.additionalProperties = true;\n\t\t} } : {}\n\t});\n}\n/** Rebuild a Zod schema from JSON produced by {@link zodToStoredJsonSchema} / `schemaToJson`. */\nfunction jsonSchemaToZod(schema) {\n\tif (typeof z.fromJSONSchema !== \"function\") throw new Error(\"z.fromJSONSchema is required; upgrade zod to >=4.4.3\");\n\treturn z.fromJSONSchema(schema, { defaultTarget: STORED_JSON_SCHEMA_TARGET });\n}\n//#endregion\n//#region src/constants/route-manifest.ts\n/** Legacy flat catalog — kept during dual-write so runtime/storage stay unchanged. */\nconst ROUTE_MANIFEST_REL_PATH = \"dist/.keystroke/route-manifest.json\";\n/** Thin modular project index (source of truth for emit hashes + shard paths). */\nconst PROJECT_MANIFEST_REL_PATH = \"dist/.keystroke/manifest.json\";\n/** Directory under `dist/.keystroke/` for per-primitive shards. */\nconst PROJECT_MANIFEST_MODULES_DIR = \"modules\";\n/** Actions catalog shard (integration + project action schemas). */\nconst PROJECT_MANIFEST_ACTIONS_CATALOG_REL = \"dist/.keystroke/catalogs/actions.json\";\n//#endregion\n//#region src/schemas/workflow-canvas.ts\n/**\n* Structural workflow-canvas graph contract.\n*\n* This is the deterministic skeleton the deploy-time AST producer emits for a\n* workflow (nodes + edges), plus the manifest-derived trigger-source nodes. It\n* is the single source of truth shared by:\n* - the AST producer (emits it at deploy, stored with the manifest),\n* - the platform route that serves the canvas, and\n* - the SDK / web client that renders it (React Flow).\n*\n* Only the structural skeleton lives here. The LLM enrichment + run-overlay\n* envelope types live in `workflow-canvas-envelope.ts`; the SDK re-exports them.\n* See WORKFLOW.md (§4 grammar, §8 node ids, §9 caching).\n*/\n/**\n* Canvas node taxonomy — the single discriminator for every canvas node. The\n* client derives the React Flow component, icon, and per-node treatment from it\n* (no parallel `type` / `data.kind` fields), and the producer + fixtures emit it\n* directly, so the structural contract can never silently diverge across the\n* deploy → render boundary.\n* - Boundaries: `entry` (Start, owns input) · `exit` (Output, owns output) ·\n* `error` (a terminal `throw` — an error output that ends the run on a branch)\n* - Callable: `step` (action / agent / llm / hook / child-workflow invocation) —\n* the invocation flavor lives in {@link WorkflowCanvasCallKind}\n* - Structural control flow: `code-block` · `decision` · `merge` · `loop` ·\n* `parallel` (group containers) · `loop-start` (the group body's entry marker,\n* shared by loop + parallel)\n* - Upstream of entry: `trigger-source` (one per manifest trigger attachment)\n*\n* `Promise.all([...])` is modeled as a `parallel` group container: the branches\n* are stacked inside and the container itself is the single prong leaving the\n* wrapper (there is no separate fork/join pair).\n*\n* `exit` and `error` are both terminals: a `return` flows to the shared `exit`\n* (the workflow output), while a `throw` gets its own `error` terminal off the\n* branch so guard clauses (`if (bad) throw …`) read as a visible dead-end.\n*/\nconst WorkflowCanvasNodeTypeSchema = z.enum([\n\t\"entry\",\n\t\"exit\",\n\t\"error\",\n\t\"step\",\n\t\"code-block\",\n\t\"decision\",\n\t\"merge\",\n\t\"loop\",\n\t\"parallel\",\n\t\"loop-start\",\n\t\"trigger-source\"\n]);\n/**\n* How a `step` node is invoked in source (drives the step icon). The structural\n* flavor (agent vs. plain action vs. LLM vs. sleep/hook) lives here so `nodeType`\n* stays `\"step\"` for every durable step.\n*\n* The AST producer emits `workflow-step` · `agent` · `llm` · `wait` · `hook`\n* today. `tool` and `child-workflow` are reserved for the deploy-time join to\n* classify a step against its resolved definition (the client already renders\n* both); they are part of the contract even though the producer doesn't emit\n* them yet.\n*/\nconst WorkflowCanvasCallKindSchema = z.enum([\n\t\"workflow-step\",\n\t\"agent\",\n\t\"llm\",\n\t\"wait\",\n\t\"hook\",\n\t\"tool\",\n\t\"child-workflow\"\n]);\n/** A labeled branch output on a decision-style node. */\nconst WorkflowCanvasNodeOutputSchema = z.object({\n\tid: z.string(),\n\tlabel: z.string()\n});\n/**\n* One token of a step's call-site argument value as captured by the producer.\n*\n* Raw form, one per source-expression shape so the inspector can render each\n* distinctly instead of dumping raw text:\n* - `text` — a literal value (string/number/boolean) or inert template chunk.\n* - `reference` — an upstream node output; carries only the structural\n* `sourceNodeId` + `field` (the human `sourceLabel` is filled by the platform\n* metadata join).\n* - `variable` — a code identifier / property access that isn't an upstream\n* reference (e.g. a `const`, a loop variable, `job.id`). `text` is the source\n* name; the platform may attach a `resolvedValue` for known top-level consts.\n* - `call` — a function call; carries only the callee `name` (e.g.\n* `buildPrompt`), never the full argument list.\n*/\nconst WorkflowCanvasRawValueTokenSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"text\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"reference\"),\n\t\t/** Upstream node id this value flows from; absent only for unresolved refs. */\n\t\tsourceNodeId: z.string().optional(),\n\t\t/** Output field of the source (dotted path); omitted = the whole output. */\n\t\tfield: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"variable\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"call\"),\n\t\tname: z.string()\n\t})\n]);\n/**\n* A step input's configured value at its call site, captured deterministically\n* by the producer from the call's argument object. The platform join turns this\n* into the inspector's {@link WorkflowNodeInputBinding} (filling display labels).\n*/\nconst WorkflowCanvasRawBindingSchema = z.object({\n\ttokens: z.array(WorkflowCanvasRawValueTokenSchema),\n\t/** Render as a tall multi-line box (object/array/multiline template values). */\n\tmultiline: z.boolean().optional()\n});\n/**\n* Statically-captured `promptLlm` options for an `llm` step node. Literal-only:\n* dynamic/expression values (a computed model, a `system` built by a function) are\n* not captured; `system`/`outputSchema` record presence so the inspector can note\n* \"a system prompt is configured\" / \"structured output\" without their values.\n*/\nconst WorkflowCanvasLlmOptionsSchema = z.object({\n\tmodel: z.string().optional(),\n\tmaxTokens: z.number().optional(),\n\ttemperature: z.number().optional(),\n\tthinkingLevel: z.string().optional(),\n\thasSystemPrompt: z.boolean().optional(),\n\thasOutputSchema: z.boolean().optional()\n});\nconst WorkflowCanvasNodeDataSchema = z.object({\n\tlabel: z.string(),\n\t/** Set on group nodes (loop / parallel section containers). */\n\tgroupKind: z.enum([\n\t\t\"loop\",\n\t\t\"parallel\",\n\t\t\"conditional\"\n\t]).optional(),\n\tdescription: z.string().optional(),\n\t/** {@link WorkflowCanvasCallKind} or a looser raw call-site label. */\n\tcallKind: z.string().optional(),\n\t/**\n\t* App/integration slug for a `step` whose action/agent is imported directly\n\t* from a `@keystrokehq/<app>` package (e.g. \"slack\", \"apollo\"). Lets the client\n\t* badge the node with that app's logo; absent for custom (project-local)\n\t* actions, which fall back to the call-kind icon.\n\t*/\n\tappSlug: z.string().optional(),\n\t/** Cron/webhook/poll discriminator on trigger-source nodes. */\n\ttriggerType: z.string().optional(),\n\t/** Branch outputs (decision nodes). */\n\toutputs: z.array(WorkflowCanvasNodeOutputSchema).optional(),\n\t/**\n\t* Action/agent/workflow slug resolved at deploy time (via import → definition).\n\t* Optional when the deploy build cannot resolve source (dist-only artifacts).\n\t*/\n\tslug: z.string().optional(),\n\t/**\n\t* Durable call-site ids nested inside an off-grammar `code-block` (same-file only).\n\t* Used by the run overlay to light the block when any contained step executes.\n\t*/\n\tcontainedCallSiteIds: z.array(z.string()).optional(),\n\t/**\n\t* Per-input call-site value bindings for `step` nodes, keyed by input field name.\n\t* Deterministically captured from the call's argument object; reference tokens point\n\t* at the upstream node that produced the value. The platform join fills display labels.\n\t*/\n\tinputBindings: z.record(z.string(), WorkflowCanvasRawBindingSchema).optional(),\n\t/**\n\t* Static `promptLlm(prompt, options)` configuration captured at the call site for\n\t* `llm` step nodes. Only literal values are captured (model/maxTokens/temperature/\n\t* thinkingLevel); `system`/`outputSchema` are usually expressions, so only their\n\t* presence is recorded. Absent when no options are statically resolvable.\n\t*/\n\tllmOptions: WorkflowCanvasLlmOptionsSchema.optional()\n});\n/**\n* A single structural node. This is the deploy artifact's shape: identity\n* (`id`), the canonical discriminator (`nodeType`), display `data`, and group\n* nesting (`parentId`). All layout/rendering — React Flow component key,\n* positions, sizes, `extent`, group box dimensions — is derived entirely\n* client-side from this structure, so it never leaks into the wire contract.\n*/\nconst WorkflowCanvasGraphNodeSchema = z.object({\n\tid: z.string(),\n\tnodeType: WorkflowCanvasNodeTypeSchema,\n\tdata: WorkflowCanvasNodeDataSchema,\n\t/** Set on children nested inside a group (loop / parallel) container. */\n\tparentId: z.string().optional()\n});\nconst WorkflowCanvasEdgeSchema = z.object({\n\tid: z.string(),\n\tsource: z.string(),\n\ttarget: z.string(),\n\ttype: z.string().optional(),\n\tlabel: z.string().optional(),\n\tsourceHandle: z.string().optional(),\n\ttargetHandle: z.string().optional(),\n\tdata: z.object({ branchKind: z.enum([\n\t\t\"then\",\n\t\t\"else\",\n\t\t\"parallel-branch\",\n\t\t\"error\"\n\t]).optional() }).optional()\n});\n/** A statically-evaluable top-level `const` value (literal scalars only). */\nconst WorkflowCanvasConstantValueSchema = z.union([\n\tz.string(),\n\tz.number(),\n\tz.boolean()\n]);\n/**\n* Top-level `const NAME = <literal>` declarations in the workflow source, captured\n* at deploy. Lets the platform resolve `variable` value tokens (e.g. a `model` set\n* to a named const) to their concrete value for display. Scalars only — computed,\n* function-local, or non-literal consts are intentionally omitted.\n*/\nconst WorkflowCanvasConstantsSchema = z.record(z.string(), WorkflowCanvasConstantValueSchema);\nconst WorkflowCanvasGraphSchema = z.object({\n\tnodes: z.array(WorkflowCanvasGraphNodeSchema),\n\tedges: z.array(WorkflowCanvasEdgeSchema),\n\t/** Top-level literal constants from the workflow source (for value-token resolution). */\n\tconstants: WorkflowCanvasConstantsSchema.optional()\n});\n//#endregion\n//#region src/schemas/route-manifest.ts\n/**\n* Deploy-time summary of one credential a step requires, derived from the\n* action/agent-tool definition's `.credentials`. The workflow-canvas credential\n* overlay joins a step node's `slug` to these to resolve the bound instance.\n* `key` doubles as the app slug (matches `credential_instances.app_slug`).\n*/\nconst CredentialRequirementSummarySchema = z.object({\n\tkey: z.string(),\n\tkind: CredentialAuthKindSchema,\n\t/** Scope pinned via `.scope(...)`; absent means project-default → org-default. */\n\tscope: CredentialScopeTypeSchema.optional()\n});\nconst StoredRouteManifestSkillSchema = z.object({\n\tslug: z.string(),\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema,\n\tmoduleFile: z.string()\n});\nconst attachmentSchemasSchema = z.record(z.string(), z.object({\n\trequestSchema: z.record(z.string(), z.unknown()),\n\tfilterSchema: z.record(z.string(), z.unknown()).optional()\n}));\nconst attachmentMetaSchema = z.record(z.string(), z.object({\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema\n}));\nconst storedRouteManifestEntryV2Schema = z.discriminatedUnion(\"kind\", [\n\tz.object({ kind: z.literal(\"health\") }),\n\tz.object({\n\t\tkind: z.literal(\"agent\"),\n\t\tslug: z.string(),\n\t\tmoduleFile: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tmodel: z.string(),\n\t\tcompactionModel: z.string().optional(),\n\t\tsystemPrompt: z.string(),\n\t\ttoolCount: z.number().int().nonnegative(),\n\t\tcredentialCount: z.number().int().nonnegative(),\n\t\tappSlugs: z.array(z.string()).default([]),\n\t\ttoolSlugs: z.array(z.string()).default([]),\n\t\t/** Credential requirements per tool slug (the agent's credential consumer key). */\n\t\ttoolRequirements: z.record(z.string(), z.array(CredentialRequirementSummarySchema)).optional(),\n\t\t/** Credential requirements for the agent's VM sandbox env / git bootstrap. */\n\t\tsandboxRequirements: z.array(CredentialRequirementSummarySchema).optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"action\"),\n\t\tslug: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tmoduleFile: z.string(),\n\t\t/** App slug for actions imported from an integration package (`@keystrokehq/<app>/actions`). */\n\t\tappSlug: z.string().optional(),\n\t\tinputSchema: z.record(z.string(), z.unknown()),\n\t\toutputSchema: z.record(z.string(), z.unknown()),\n\t\t/** Credentials this action requires (for the canvas credential overlay). */\n\t\trequirements: z.array(CredentialRequirementSummarySchema).optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"workflow\"),\n\t\tslug: z.string(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema,\n\t\tsubscribable: z.boolean(),\n\t\tmoduleFile: z.string(),\n\t\trequestSchema: z.record(z.string(), z.unknown()),\n\t\tresponseSchema: z.record(z.string(), z.unknown()).optional(),\n\t\t/** Deterministic AST control-flow skeleton (deploy-time producer). */\n\t\tflowGraph: WorkflowCanvasGraphSchema.optional(),\n\t\t/** sha256 of the workflow source the `flowGraph` was produced from (staleness). */\n\t\tflowGraphSourceHash: z.string().optional(),\n\t\t/** sha256 of `JSON.stringify(flowGraph)` — baked at build so canvas polls skip re-hashing. */\n\t\tflowGraphHash: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-webhook\"),\n\t\tendpoint: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\t/** sha256 of the trigger source file, baked at build time for overview change-detection. */\n\t\tsourceHash: z.string().optional(),\n\t\tattachmentSchemas: attachmentSchemasSchema,\n\t\tattachmentMeta: attachmentMetaSchema.optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\t/** IANA timezone for schedule wall-clock fields. When omitted, UTC. */\n\t\ttimezone: z.string().optional(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll-group\"),\n\t\tpollId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string(),\n\t\t/** IANA timezone for schedule wall-clock fields. When omitted, UTC. */\n\t\ttimezone: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"cron-schedule\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\t/** IANA timezone for schedule wall-clock fields. When omitted, UTC. */\n\t\ttimezone: z.string().optional(),\n\t\t/** Static cron payload from `defineCronSource({ payload })` — omitted when the source has none. */\n\t\tpayload: z.unknown().optional(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t})\n]);\nconst storedRouteManifestV2Schema = z.object({\n\tversion: z.literal(2),\n\tentries: z.array(storedRouteManifestEntryV2Schema),\n\tskills: z.array(StoredRouteManifestSkillSchema).default([]),\n\tintegrations: z.array(z.string()).optional()\n});\nconst StoredRouteManifestSchema = storedRouteManifestV2Schema;\n/**\n* Parse a stored route manifest. Only the strict v2 schema is supported: the\n* builder always emits v2 and every deploy regenerates the manifest, so there is\n* no legacy upcasting. (The pre-v2 `normalizeEntryToV2` path was removed once the\n* data tables were truncated and all artifacts redeployed.)\n*/\nfunction parseStoredRouteManifest(value) {\n\treturn storedRouteManifestV2Schema.parse(value);\n}\nconst ProjectManifestModuleKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"trigger\"\n]);\nconst ProjectManifestModuleRefSchema = z.object({\n\tkind: ProjectManifestModuleKindSchema,\n\tid: z.string(),\n\t/** Path relative to `dist/.keystroke/`. */\n\tpath: z.string(),\n\t/** Input-closure / source hash that produced the meta shard. */\n\tcontentHash: z.string(),\n\t/** Workflows only — path of the flow-graph shard relative to `dist/.keystroke/`. */\n\tflowPath: z.string().optional(),\n\t/** Workflows only — hash of the workflow source used for the flow producer. */\n\tflowHash: z.string().optional()\n});\nconst ProjectManifestSchema = z.object({\n\tversion: z.literal(3),\n\tmodules: z.array(ProjectManifestModuleRefSchema),\n\tskills: z.array(StoredRouteManifestSkillSchema).default([]),\n\tintegrations: z.array(z.string()).optional(),\n\tactionsCatalogPath: z.string(),\n\tactionsCatalogHash: z.string()\n});\nfunction parseProjectManifest(value) {\n\treturn ProjectManifestSchema.parse(value);\n}\n/** Agent shard body — same fields as a v2 agent entry. */\nconst AgentManifestShardSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\tslug: z.string(),\n\tmoduleFile: z.string(),\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema,\n\tmodel: z.string(),\n\tcompactionModel: z.string().optional(),\n\tsystemPrompt: z.string(),\n\ttoolCount: z.number().int().nonnegative(),\n\tcredentialCount: z.number().int().nonnegative(),\n\tappSlugs: z.array(z.string()).default([]),\n\ttoolSlugs: z.array(z.string()).default([]),\n\ttoolRequirements: z.record(z.string(), z.array(CredentialRequirementSummarySchema)).optional(),\n\tsandboxRequirements: z.array(CredentialRequirementSummarySchema).optional()\n});\nconst WorkflowManifestMetaShardSchema = z.object({\n\tkind: z.literal(\"workflow\"),\n\tslug: z.string(),\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema,\n\tsubscribable: z.boolean(),\n\tmoduleFile: z.string(),\n\trequestSchema: z.record(z.string(), z.unknown()),\n\tresponseSchema: z.record(z.string(), z.unknown()).optional()\n});\nconst WorkflowManifestFlowShardSchema = z.object({\n\tflowGraph: WorkflowCanvasGraphSchema,\n\tflowGraphSourceHash: z.string(),\n\tflowGraphHash: z.string()\n});\nconst triggerShardEntrySchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"trigger-webhook\"),\n\t\tendpoint: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tattachmentSchemas: attachmentSchemasSchema,\n\t\tattachmentMeta: attachmentMetaSchema.optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\ttimezone: z.string().optional(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"trigger-poll-group\"),\n\t\tpollId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tschedule: z.string(),\n\t\ttimezone: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"cron-schedule\"),\n\t\tattachmentId: z.string(),\n\t\tattachmentIds: z.array(z.string()),\n\t\tmoduleFile: z.string(),\n\t\tsourceHash: z.string().optional(),\n\t\tschedule: z.string(),\n\t\ttimezone: z.string().optional(),\n\t\tpayload: z.unknown().optional(),\n\t\tname: requiredDisplayTextSchema,\n\t\tdescription: requiredDisplayTextSchema\n\t})\n]);\n/** One trigger module file may contribute multiple schedule/webhook rows. */\nconst TriggerManifestShardSchema = z.object({ entries: z.array(triggerShardEntrySchema).min(1) });\nconst ActionsCatalogShardSchema = z.object({ entries: z.array(z.object({\n\tkind: z.literal(\"action\"),\n\tslug: z.string(),\n\tname: requiredDisplayTextSchema,\n\tdescription: requiredDisplayTextSchema,\n\tmoduleFile: z.string(),\n\tappSlug: z.string().optional(),\n\tinputSchema: z.record(z.string(), z.unknown()),\n\toutputSchema: z.record(z.string(), z.unknown()),\n\trequirements: z.array(CredentialRequirementSummarySchema).optional()\n})) });\n//#endregion\n//#region src/schemas/channels.ts\n/** Messaging platforms that support agent gateway bindings. */\nconst ChannelPlatformKeySchema = z.enum([\"slack\"]);\nconst ChannelReactionSupportSchema = z.enum([\n\t\"full\",\n\t\"read-only\",\n\t\"none\"\n]);\nconst ChannelCardSupportSchema = z.enum([\n\t\"full\",\n\t\"partial\",\n\t\"none\"\n]);\nconst ChannelStreamingSupportSchema = z.enum([\n\t\"native\",\n\t\"post-edit\",\n\t\"buffered\",\n\t\"drafts\",\n\t\"none\"\n]);\nconst ChannelCapabilitiesSchema = z.object({\n\tmentions: z.boolean(),\n\treactions: ChannelReactionSupportSchema,\n\tcards: ChannelCardSupportSchema,\n\tmodals: z.boolean(),\n\tstreaming: ChannelStreamingSupportSchema,\n\tdms: z.boolean()\n});\nconst ChannelListenModeSchema = z.enum([\n\t\"mention\",\n\t\"all\",\n\t\"dm\"\n]);\nconst ChannelBindingKindSchema = z.enum([\n\t\"public\",\n\t\"private\",\n\t\"dm\",\n\t\"group\",\n\t\"space\"\n]);\nconst AppGatewaySchema = z.object({\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\tsupportsChannelDirectory: z.boolean(),\n\twebhookPathHint: z.string().min(1),\n\t/** Composio/keystroke app slug for Connect when it differs from the gateway platform key (e.g. slack → slackbot). */\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional(),\n\ttagline: z.string().min(1).optional()\n});\n/** Projected catalog row for the agent channels panel (derived from apps with `gateway`). */\nconst ChannelPlatformSchema = z.object({\n\tkey: ChannelPlatformKeySchema,\n\tname: z.string().min(1),\n\tappLogoId: z.string().min(1),\n\tfallbackDomain: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttagline: z.string().min(1),\n\tauthKind: z.enum([\n\t\t\"oauth\",\n\t\t\"api_key\",\n\t\t\"keystroke\"\n\t]),\n\tcredentialFields: z.array(z.object({\n\t\tkey: z.string().min(1),\n\t\tlabel: z.string().min(1),\n\t\tplaceholder: z.string().optional(),\n\t\thelpText: z.string().optional(),\n\t\ttype: z.enum([\n\t\t\t\"text\",\n\t\t\t\"password\",\n\t\t\t\"textarea\"\n\t\t]),\n\t\trequired: z.boolean(),\n\t\tprefix: z.string().optional()\n\t})),\n\tcapabilities: ChannelCapabilitiesSchema,\n\tsupportedModes: z.array(ChannelListenModeSchema).min(1),\n\tresourceNoun: z.object({\n\t\tsingular: z.string().min(1),\n\t\tplural: z.string().min(1)\n\t}),\n\twebhookPathHint: z.string().min(1),\n\tsupportsChannelDirectory: z.boolean(),\n\tconnectAppId: z.string().min(1).optional(),\n\tdocsUrl: z.string().url().optional()\n});\n/** Whether a binding targets a single Slack channel or an entire custom Slack app. */\nconst ChannelBindingTargetKindSchema = z.enum([\"channel\", \"app\"]);\nconst ChannelBindingSchema = z.object({\n\tid: z.string().min(1),\n\tchannelId: z.string().min(1),\n\tchannelName: z.string().min(1),\n\tchannelKind: ChannelBindingKindSchema,\n\tmode: ChannelListenModeSchema,\n\tsubscribeOnMention: z.boolean(),\n\t/** Defaults to `\"channel\"` for existing per-channel bindings. */\n\tbindingKind: ChannelBindingTargetKindSchema.optional(),\n\t/** Present for app-level bindings — Slack bot handle without `@`. */\n\tslackAppHandle: z.string().min(1).optional(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst ChannelConnectionSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tagentId: z.string().min(1),\n\taccountLabel: z.string().min(1),\n\taccountId: z.string().min(1),\n\tconnectedAt: z.string(),\n\tbindings: z.array(ChannelBindingSchema)\n});\nconst ChannelDirectoryEntrySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tkind: ChannelBindingKindSchema,\n\tmemberCount: z.number().int().nonnegative().optional(),\n\tisArchived: z.boolean().optional(),\n\t/** Whether the workspace bot is a member (when the directory source provides it). */\n\tisMember: z.boolean().optional()\n});\n/** Custom Slack app membership listing for an agent. */\nconst SlackAgentMembershipsResponseSchema = z.object({\n\thandle: z.string().min(1),\n\tslackAppSlug: z.string().min(1),\n\taccountId: z.string().min(1),\n\t/** False when join/leave isn't available (missing scopes, Composio proxy, etc.). */\n\tcanManage: z.boolean(),\n\tchannels: z.array(ChannelDirectoryEntrySchema.extend({ isMember: z.boolean() }))\n});\nconst SlackMembershipChannelBodySchema = z.object({ channelId: z.string().min(1) });\n/** Create-channel response: directory entry plus optional Slack deep link. */\nconst CreateSlackChannelResponseSchema = ChannelDirectoryEntrySchema.extend({\n\t/** `https://slack.com/app_redirect?channel=…&team=…` — open after create. */\n\topenUrl: z.string().url(),\n\t/** True when the acting user was invited into the new channel. */\n\tinvitedUser: z.boolean().optional()\n});\nconst ChannelConnectionListResponseSchema = z.array(ChannelConnectionSchema);\nconst ChannelDirectoryListResponseSchema = z.array(ChannelDirectoryEntrySchema);\n/** Channel-relevant fields parsed from an OAuth connection's metadata blob. */\nconst ChannelAccountMetadataSchema = z.object({ teamName: z.string().min(1).optional() });\n/** OAuth workspace available for channel bindings (e.g. Slack team). */\nconst ChannelAccountSchema = z.object({\n\tid: z.string().min(1),\n\tplatform: ChannelPlatformKeySchema,\n\tlabel: z.string().min(1),\n\tconnectedAt: z.string()\n});\nconst ChannelAccountListResponseSchema = z.array(ChannelAccountSchema);\nconst NewChannelBindingInputSchema = z.object({\n\tchannelId: z.string().min(1),\n\t/** Display name. When omitted or equal to `channelId`, the server resolves it from Slack. */\n\tchannelName: z.string().min(1).optional(),\n\tchannelKind: ChannelBindingKindSchema.optional(),\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst BindChannelBodySchema = z.object({\n\tplatform: ChannelPlatformKeySchema,\n\taccountId: z.string().min(1),\n\tbinding: NewChannelBindingInputSchema\n});\n/** Create a Slack channel via the workspace bot token, then optionally bind. */\nconst CreateSlackChannelBodySchema = z.object({\n\taccountId: z.string().min(1),\n\tname: z.string().trim().min(1).max(80).regex(/^#?[a-z0-9][a-z0-9_-]*$/, \"Channel name must be lowercase alphanumeric with _ or -\"),\n\tisPrivate: z.boolean().optional().default(false)\n});\n/** Bind an agent to a custom Slack app (app-level — mentions/DMs anywhere the app is). */\nconst BindAgentSlackAppBodySchema = z.object({ slackAppSlug: z.string().min(1) });\nconst UpdateChannelBindingBodySchema = z.object({ patch: z.object({\n\tmode: ChannelListenModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n}) });\n/** Gateway platforms for the agent channels panel (not the full apps catalog). */\nconst ListChannelPlatformsResponseSchema = z.array(ChannelPlatformSchema);\n//#endregion\n//#region src/schemas/mcp-credentials.ts\n/**\n* Where a manual MCP API key is injected on each request. MCP servers don't\n* advertise API-key support in a discoverable way, so the user picks the\n* placement: a request header (optionally prefixed, e.g. `Bearer `) or a query\n* param (e.g. Exa's `exaApiKey`).\n*/\nconst McpApiKeyPlacementSchema = z.discriminatedUnion(\"kind\", [z.object({\n\tkind: z.literal(\"header\"),\n\tname: z.string().trim().min(1),\n\t/** Prepended to the token, e.g. `\"Bearer \"` for `Authorization: Bearer <token>`. */\n\tprefix: z.string().optional()\n}), z.object({\n\tkind: z.literal(\"query\"),\n\tname: z.string().trim().min(1)\n})]);\nconst DEFAULT_MCP_API_KEY_PLACEMENT = {\n\tkind: \"header\",\n\tname: \"Authorization\",\n\tprefix: \"Bearer \"\n};\nconst McpApiKeyCredentialValueSchema = z.object({\n\ttoken: z.string().trim().min(1),\n\tplacement: McpApiKeyPlacementSchema.default(DEFAULT_MCP_API_KEY_PLACEMENT)\n});\n/** Turn a stored MCP API-key credential into request headers or query params. */\nfunction mcpApiKeyAuthInjection(value) {\n\treturn mcpCredentialAuthInjection({ token: { placement: value.placement } }, { token: value.token });\n}\n/** Apply all credential fields (each with optional placement) to outgoing MCP requests. */\nfunction mcpCredentialAuthInjection(fields, values) {\n\tconst headers = {};\n\tconst searchParams = {};\n\tfor (const [key, field] of Object.entries(fields)) {\n\t\tconst value = values[key]?.trim();\n\t\tif (!value) continue;\n\t\tconst placement = field.placement ?? DEFAULT_MCP_API_KEY_PLACEMENT;\n\t\tif (placement.kind === \"query\") searchParams[placement.name] = value;\n\t\telse headers[placement.name] = `${placement.prefix ?? \"\"}${value}`;\n\t}\n\treturn {\n\t\t...Object.keys(headers).length > 0 ? { headers } : {},\n\t\t...Object.keys(searchParams).length > 0 ? { searchParams } : {}\n\t};\n}\n//#endregion\n//#region src/schemas/app-credential-fields.ts\n/** Metadata for one vault field on a custom api_key app. */\nconst AppCredentialFieldSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tsecret: z.boolean().optional(),\n\toptional: z.boolean().optional(),\n\tdescription: z.string().trim().min(1).optional(),\n\tdefault: z.string().optional(),\n\t/** For direct MCP api-key apps: where this field's value is injected on the request. */\n\tplacement: McpApiKeyPlacementSchema.optional()\n});\n/** Credential template keyed by vault field name. */\nconst AppCredentialFieldsSchema = z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema).refine((fields) => Object.keys(fields).length > 0, { message: \"At least one credential field is required\" }).refine((fields) => Object.values(fields).some((field) => field.optional !== true), { message: \"At least one credential field must be required\" });\nfunction validateCredentialValueAgainstFields(fields, value) {\n\tfor (const [key, field] of Object.entries(fields)) {\n\t\tif (field.optional === true) continue;\n\t\tconst raw = value[key];\n\t\tif (typeof raw !== \"string\" || raw.trim().length === 0) return {\n\t\t\tok: false,\n\t\t\tmessage: `Missing required credential field \"${key}\"`\n\t\t};\n\t}\n\tfor (const key of Object.keys(value)) if (!(key in fields)) return {\n\t\tok: false,\n\t\tmessage: `Unknown credential field \"${key}\"`\n\t};\n\treturn { ok: true };\n}\n//#endregion\n//#region src/schemas/apps.ts\n/** A single OAuth scope an app can request, with human copy for connect UI. */\nconst OAuthScopeOptionSchema = z.object({\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tdefaultSelected: z.boolean().optional(),\n\trequired: z.boolean().optional()\n});\n/** How an app authenticates when connecting credentials. */\nconst AppAuthKindSchema = z.enum([\n\t\"oauth\",\n\t\"api_key\",\n\t\"keystroke\"\n]);\n/** Composio auth scheme for API-key / no-auth style connections. */\nconst AppCredentialSchemeSchema = z.enum([\n\t\"API_KEY\",\n\t\"BEARER_TOKEN\",\n\t\"BASIC\",\n\t\"BASIC_WITH_JWT\",\n\t\"NO_AUTH\"\n]);\n/**\n* Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).\n* Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.\n*/\nconst AppSourceSchema = z.string().trim().min(1);\n/** Integration metadata generated alongside an app package (source assigned at seed time). */\nconst AppCatalogMetadataSchema = z.object({\n\tslug: z.string().trim().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().optional(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema)\n});\n/** Row used to seed official apps into the platform registry. */\nconst AppSeedEntrySchema = AppCatalogMetadataSchema.extend({\n\tsource: AppSourceSchema,\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional()\n});\nconst customAppNameSchema = z.string().trim().min(1, \"Name is required\");\nconst AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;\nconst AppSlugAvailabilityResponseSchema = z.object({\n\tslug: z.string(),\n\tavailable: z.boolean(),\n\treason: AppSlugAvailabilityReasonSchema.optional(),\n\tsuggestion: AppSlugSchema.optional()\n});\nconst AppSlugAvailabilityQuerySchema = z.object({ slug: z.string().trim().min(1) });\n/** Request body for creating an org custom app (api_key or direct MCP). */\nconst optionalCredentialFieldsSchema = z.record(z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema);\nconst CreateCustomAppRequestSchema = z.object({\n\tname: customAppNameSchema,\n\tslug: AppSlugSchema,\n\tdescription: z.string().trim().min(1),\n\tsource: z.enum([\n\t\t\"custom\",\n\t\t\"mcp\",\n\t\t\"openapi\",\n\t\t\"graphql\"\n\t]).default(\"custom\"),\n\turl: z.string().url().optional(),\n\tlogo: z.string().url().optional(),\n\tauthKind: AppAuthKindSchema.optional(),\n\tfields: optionalCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\toauthScopes: z.array(OAuthScopeOptionSchema).optional()\n}).superRefine((data, ctx) => {\n\tif ((data.source === \"mcp\" || data.source === \"openapi\" || data.source === \"graphql\") && !data.url) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"url is required for this app source\",\n\t\tpath: [\"url\"]\n\t});\n\tif (!(data.authKind ?? (data.source === \"custom\" ? \"api_key\" : void 0))) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: \"authKind is required\",\n\t\t\tpath: [\"authKind\"]\n\t\t});\n\t\treturn;\n\t}\n\tif (data.source === \"custom\") {\n\t\tconst parsed = AppCredentialFieldsSchema.safeParse(data.fields ?? {});\n\t\tif (!parsed.success) for (const issue of parsed.error.issues) ctx.addIssue({\n\t\t\t...issue,\n\t\t\tpath: [\"fields\", ...issue.path]\n\t\t});\n\t}\n});\n/** Full custom app detail returned by GET (includes credential template for sync). */\nconst CustomAppDetailSchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tauthKind: AppAuthKindSchema,\n\tsource: AppSourceSchema,\n\turl: z.string().url().nullable().optional(),\n\tlogo: z.string().url().nullable().optional(),\n\tcredentialFields: optionalCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\toauthScopes: z.array(OAuthScopeOptionSchema).optional(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\nconst CreateCustomAppResponseSchema = CustomAppDetailSchema;\nconst GetCustomAppResponseSchema = CustomAppDetailSchema;\n/** Platform `apps` table row. */\nconst AppRecordSchema = z.object({\n\tid: z.string().min(1),\n\torganizationId: z.string().min(1).nullable(),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tlogo: z.string().url().nullable(),\n\tauthKind: AppAuthKindSchema,\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\tsource: AppSourceSchema,\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\turl: z.string().url().nullable().optional(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\n/**\n* Slim connect-picker row for `GET /api/apps`. Omits oauthScopes / credential\n* templates (loaded via catalog detail) so the ~1k-app list stays small.\n*/\nconst AppCatalogSummarySchema = z.object({\n\tid: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().min(1),\n\tcategory: z.string().min(1),\n\tintegrationDescription: z.string().min(1),\n\tlogo: z.string().url().nullable().optional(),\n\tauthKind: AppAuthKindSchema,\n\t/** Where app metadata and execution are sourced (e.g. composio, custom). */\n\tsource: AppSourceSchema,\n\t/** Endpoint URL for MCP, OpenAPI, or GraphQL custom apps. */\n\turl: z.string().url().nullable().optional(),\n\t/** True when the app has a non-empty credential field template. */\n\thasCredentialFields: z.boolean().optional(),\n\t/** Composio auth scheme — present for API-key and NO_AUTH apps so the picker can choose a flow. */\n\tcredentialScheme: AppCredentialSchemeSchema.optional()\n});\n/**\n* Full connectable integration detail (scopes + credential template). An \"app\"\n* is an integration / credential set — connected state is whether a credential exists.\n*/\nconst AppCatalogEntrySchema = AppCatalogSummarySchema.extend({\n\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t/** Custom api_key apps — vault field template for connect UI and sync. */\n\tcredentialFields: AppCredentialFieldsSchema.optional(),\n\t/** Composio auth scheme for API-key or NO_AUTH connections. */\n\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t/** When present, the app supports agent gateway bindings (external channels). */\n\tgateway: AppGatewaySchema.optional()\n});\nconst ListAppsResponseSchema = z.array(AppCatalogSummarySchema);\nconst GetAppCatalogEntryResponseSchema = AppCatalogEntrySchema;\n//#endregion\n//#region src/schemas/mcp-app-discovery.ts\nconst McpAuthProbeModeSchema = z.enum([\n\t\"none\",\n\t\"token\",\n\t\"oauth\"\n]);\nconst McpAuthProbeOAuthSchema = z.object({\n\tissuer: z.string().optional(),\n\tauthorizationEndpoint: z.string().url(),\n\ttokenEndpoint: z.string().url(),\n\tregistrationEndpoint: z.string().url().optional(),\n\tscopes: z.array(z.string()),\n\tresource: z.string().optional(),\n\t/** Human-readable label from OAuth protected-resource metadata (RFC 9728). */\n\tresourceName: z.string().optional()\n});\nconst McpAuthProbeResultSchema = z.object({\n\turl: z.string().url(),\n\tmode: McpAuthProbeModeSchema,\n\tunauthenticatedStatus: z.number().int().optional(),\n\tscheme: AppCredentialSchemeSchema.optional(),\n\toauth: McpAuthProbeOAuthSchema.optional()\n});\nconst McpDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst McpDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\toauth: McpAuthProbeOAuthSchema.optional(),\n\t\tserverName: z.string().optional(),\n\t\tserverDescription: z.string().optional()\n\t})\n});\nconst StartMcpOAuthConnectionInputSchema = z.object({\n\tappSlug: z.string().trim().min(1),\n\tprojects: z.array(z.string().trim().min(1)).optional(),\n\tcreateOrganizationCredential: z.boolean().optional(),\n\tcreateUserProvidedCredential: z.boolean().optional(),\n\tlabel: z.string().trim().min(1).optional(),\n\tcredentialInstanceId: z.string().trim().min(1).optional(),\n\tscopes: z.array(z.string()).optional()\n});\nconst StartMcpOAuthConnectionResultSchema = z.object({ authorizeUrl: z.string().url() });\n//#endregion\n//#region src/schemas/mcp-app-tools.ts\n/** One tool from a live MCP `tools/list` for a connected custom org app. */\nconst McpAppToolSchema = z.object({\n\tname: z.string().min(1),\n\tdescription: z.string().optional(),\n\tinputSchema: z.record(z.string(), z.unknown()).optional()\n});\nconst ListMcpAppToolsResponseSchema = z.object({\n\tslug: z.string().min(1),\n\turl: z.string().url(),\n\ttools: z.array(McpAppToolSchema)\n});\n//#endregion\n//#region src/mappers/mcp-probe.ts\nfunction mcpProbeToAppTemplate(probe) {\n\tconst url = probe.url;\n\tif (probe.mode === \"oauth\" && probe.oauth) return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: probe.oauth.scopes.map((name) => ({\n\t\t\tname,\n\t\t\tdescription: name,\n\t\t\tdefaultSelected: true\n\t\t})),\n\t\turl,\n\t\toauth: probe.oauth\n\t};\n\tif (probe.mode === \"token\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: probe.scheme ?? \"BEARER_TOKEN\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: \"Token\"\n\t\t} },\n\t\toauthScopes: [],\n\t\turl\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"NO_AUTH\",\n\t\tcredentialFields: {},\n\t\toauthScopes: [],\n\t\turl\n\t};\n}\n//#endregion\n//#region src/mappers/custom-app.ts\nfunction displayNameFromUrl$1(url) {\n\tlet hostname;\n\ttry {\n\t\thostname = new URL(url.trim()).hostname.replace(/^www\\./, \"\");\n\t} catch {\n\t\treturn;\n\t}\n\tconst parts = hostname.split(\".\").filter(Boolean);\n\tlet label = parts[0] ?? hostname;\n\tif (label === \"mcp\" && parts.length > 1) label = parts[1] ?? label;\n\tif (!label) return;\n\treturn label.charAt(0).toUpperCase() + label.slice(1);\n}\n/** Default name and description for a custom app from a discover template. */\nfunction deriveCustomAppDisplay(template, opts) {\n\tconst name = template.serverName?.trim() || template.name?.trim() || displayNameFromUrl$1(opts.url) || opts.url;\n\treturn {\n\t\tname,\n\t\tdescription: template.serverDescription?.trim() || template.description?.trim() || (opts.mcp ? `Connect to ${name} via MCP.` : `Connect to ${name}.`)\n\t};\n}\n//#endregion\n//#region src/mappers/openapi-spec.ts\nfunction isRecord$1(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction trimString$1(value) {\n\tif (typeof value !== \"string\") return;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : void 0;\n}\nfunction securitySchemesFromSpec(spec) {\n\tif (isRecord$1(spec.components) && isRecord$1(spec.components.securitySchemes)) return spec.components.securitySchemes;\n\tif (isRecord$1(spec.securityDefinitions)) return spec.securityDefinitions;\n}\nfunction primarySecuritySchemeName(spec) {\n\tconst security = spec.security;\n\tif (Array.isArray(security) && security.length > 0) {\n\t\tconst first = security[0];\n\t\tif (isRecord$1(first)) {\n\t\t\tconst keys = Object.keys(first);\n\t\t\tif (keys.length > 0) return keys[0];\n\t\t}\n\t}\n\tconst schemes = securitySchemesFromSpec(spec);\n\tif (schemes) {\n\t\tconst keys = Object.keys(schemes);\n\t\tif (keys.length > 0) return keys[0];\n\t}\n}\nfunction homepageUrlFromSpec(spec) {\n\tconst servers = spec.servers;\n\tif (Array.isArray(servers) && servers.length > 0) {\n\t\tconst first = servers[0];\n\t\tif (isRecord$1(first)) {\n\t\t\tconst url = trimString$1(first.url);\n\t\t\tif (url) return url.replace(/\\/+$/, \"\");\n\t\t}\n\t}\n\tif (typeof spec.swagger === \"string\") {\n\t\tconst schemes = spec.schemes;\n\t\tconst scheme = Array.isArray(schemes) && typeof schemes[0] === \"string\" ? schemes[0] : \"https\";\n\t\tconst host = trimString$1(spec.host);\n\t\tconst basePath = typeof spec.basePath === \"string\" ? spec.basePath : \"\";\n\t\tif (host) return `${scheme}://${host}${basePath}`.replace(/\\/+$/, \"\");\n\t}\n}\nfunction oauthScopesFromOas3Scheme(scheme) {\n\tconst flows = scheme.flows;\n\tif (!isRecord$1(flows)) return [];\n\tconst scopes = [];\n\tfor (const flow of Object.values(flows)) if (isRecord$1(flow) && isRecord$1(flow.scopes)) scopes.push(...Object.keys(flow.scopes));\n\treturn scopes;\n}\nfunction oauthScopesFromSwagger2Scheme(scheme) {\n\tif (!isRecord$1(scheme.scopes)) return [];\n\treturn Object.keys(scheme.scopes);\n}\nfunction oauthScopeOptions(scopeNames) {\n\treturn scopeNames.map((name) => ({\n\t\tname,\n\t\tdescription: name,\n\t\tdefaultSelected: true\n\t}));\n}\nfunction apiKeyPlacement(scheme) {\n\tconst name = trimString$1(scheme.name) ?? \"api_key\";\n\tif ((typeof scheme.in === \"string\" ? scheme.in.toLowerCase() : \"header\") === \"query\") return {\n\t\tkind: \"query\",\n\t\tname\n\t};\n\treturn {\n\t\tkind: \"header\",\n\t\tname\n\t};\n}\nfunction mapSecurityScheme(scheme) {\n\tconst type = typeof scheme.type === \"string\" ? scheme.type : \"\";\n\tif (type === \"http\") {\n\t\tconst httpScheme = typeof scheme.scheme === \"string\" ? scheme.scheme.toLowerCase() : \"\";\n\t\tif (httpScheme === \"bearer\") return {\n\t\t\tauthKind: \"api_key\",\n\t\t\tcredentialScheme: \"BEARER_TOKEN\",\n\t\t\tcredentialFields: { token: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Token\",\n\t\t\t\tplacement: DEFAULT_MCP_API_KEY_PLACEMENT\n\t\t\t} },\n\t\t\toauthScopes: []\n\t\t};\n\t\tif (httpScheme === \"basic\") return {\n\t\t\tauthKind: \"api_key\",\n\t\t\tcredentialScheme: \"BASIC\",\n\t\t\tcredentialFields: {\n\t\t\t\tusername: { label: \"Username\" },\n\t\t\t\tpassword: {\n\t\t\t\t\tsecret: true,\n\t\t\t\t\tlabel: \"Password\"\n\t\t\t\t}\n\t\t\t},\n\t\t\toauthScopes: []\n\t\t};\n\t}\n\tif (type === \"apiKey\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"API_KEY\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: trimString$1(scheme.name) ?? \"API Key\",\n\t\t\tplacement: apiKeyPlacement(scheme)\n\t\t} },\n\t\toauthScopes: []\n\t};\n\tif (type === \"oauth2\") return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: oauthScopeOptions(oauthScopesFromOas3Scheme(scheme).length > 0 ? oauthScopesFromOas3Scheme(scheme) : oauthScopesFromSwagger2Scheme(scheme))\n\t};\n\tif (type === \"openIdConnect\") return {\n\t\tauthKind: \"oauth\",\n\t\toauthScopes: []\n\t};\n\tif (type === \"basic\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BASIC\",\n\t\tcredentialFields: {\n\t\t\tusername: { label: \"Username\" },\n\t\t\tpassword: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Password\"\n\t\t\t}\n\t\t},\n\t\toauthScopes: []\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialFields: {},\n\t\toauthScopes: []\n\t};\n}\n/** Map a parsed OpenAPI/Swagger document to a custom app template. */\nfunction openApiSpecToAppTemplate(spec, url) {\n\tif (!isRecord$1(spec)) throw new Error(\"Invalid OpenAPI spec\");\n\tconst info = isRecord$1(spec.info) ? spec.info : {};\n\tconst name = trimString$1(info.title);\n\tconst description = trimString$1(info.description);\n\tconst homepageUrl = homepageUrlFromSpec(spec);\n\tconst schemes = securitySchemesFromSpec(spec);\n\tconst schemeName = primarySecuritySchemeName(spec);\n\tlet authPart = mapSecurityScheme({ type: \"none\" });\n\tif (schemeName && schemes && isRecord$1(schemes[schemeName])) authPart = mapSecurityScheme(schemes[schemeName]);\n\treturn {\n\t\turl,\n\t\tname,\n\t\tdescription,\n\t\thomepageUrl,\n\t\tauthKind: authPart.authKind,\n\t\tcredentialFields: authPart.credentialFields,\n\t\tcredentialScheme: authPart.credentialScheme,\n\t\toauthScopes: authPart.oauthScopes\n\t};\n}\n//#endregion\n//#region src/schemas/openapi-app-discovery.ts\nconst OpenApiDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst OpenApiDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\thomepageUrl: z.string().optional()\n\t})\n});\n//#endregion\n//#region src/mappers/graphql-introspection.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction trimString(value) {\n\tif (typeof value !== \"string\") return;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : void 0;\n}\nfunction displayNameFromUrl(value) {\n\ttry {\n\t\tconst hostname = new URL(value).hostname.replace(/^www\\./, \"\");\n\t\tconst parts = hostname.split(\".\").filter(Boolean);\n\t\tlet label = parts[0] ?? hostname;\n\t\tif ((label === \"mcp\" || label === \"api\" || label === \"graphql\") && parts.length > 1) label = parts[1] ?? label;\n\t\tif (!label) return;\n\t\treturn label.charAt(0).toUpperCase() + label.slice(1);\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction homepageUrlFromEndpoint(endpointUrl) {\n\ttry {\n\t\treturn new URL(endpointUrl).origin;\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction typeDescription(schema) {\n\tif (!schema) return;\n\treturn trimString(schema.description);\n}\nfunction authFromProbe(authProbe) {\n\tif (authProbe === \"basic\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BASIC\",\n\t\tcredentialFields: {\n\t\t\tusername: { label: \"Username\" },\n\t\t\tpassword: {\n\t\t\t\tsecret: true,\n\t\t\t\tlabel: \"Password\"\n\t\t\t}\n\t\t},\n\t\toauthScopes: []\n\t};\n\tif (authProbe === \"none\") return {\n\t\tauthKind: \"api_key\",\n\t\tcredentialFields: {},\n\t\toauthScopes: []\n\t};\n\treturn {\n\t\tauthKind: \"api_key\",\n\t\tcredentialScheme: \"BEARER_TOKEN\",\n\t\tcredentialFields: { token: {\n\t\t\tsecret: true,\n\t\t\tlabel: \"Token\",\n\t\t\tplacement: DEFAULT_MCP_API_KEY_PLACEMENT\n\t\t} },\n\t\toauthScopes: []\n\t};\n}\n/** Infer auth requirements from an unauthenticated probe response. */\nfunction inferGraphqlAuthFromProbe(status, wwwAuthenticate, body) {\n\tif (status === 401) {\n\t\tif ((wwwAuthenticate?.toLowerCase() ?? \"\").includes(\"basic\")) return \"basic\";\n\t\treturn \"bearer\";\n\t}\n\tif (status === 403) return \"bearer\";\n\tif (isGraphqlAuthError(body)) return \"bearer\";\n\treturn \"none\";\n}\nconst AUTH_ERROR_PATTERN = /auth|unauthorized|unauthenticated|access token|credentials|not authenticated/i;\nfunction isGraphqlAuthError(body) {\n\tif (!isRecord(body) || !Array.isArray(body.errors)) return false;\n\treturn body.errors.some((error) => {\n\t\tif (!isRecord(error)) return false;\n\t\tconst message = typeof error.message === \"string\" ? error.message : \"\";\n\t\tconst extensions = isRecord(error.extensions) ? error.extensions : void 0;\n\t\tconst extensionHint = extensions ? `${extensions.code ?? \"\"} ${extensions.type ?? \"\"}` : \"\";\n\t\treturn AUTH_ERROR_PATTERN.test(message) || /AUTH/i.test(extensionHint);\n\t});\n}\n/** Map a GraphQL introspection result to a custom app template. */\nfunction graphqlIntrospectionToAppTemplate(introspection, endpointUrl, authProbe = \"bearer\") {\n\tconst root = isRecord(introspection) ? introspection : {};\n\tconst data = isRecord(root.data) ? root.data : root;\n\tconst schema = isRecord(data.__schema) ? data.__schema : void 0;\n\tconst queryType = schema && isRecord(schema.queryType) ? schema.queryType : void 0;\n\tconst mutationType = schema && isRecord(schema.mutationType) ? schema.mutationType : void 0;\n\tconst queryName = trimString(queryType?.name);\n\tconst name = queryName === \"Query\" ? displayNameFromUrl(endpointUrl) : queryName;\n\tconst description = typeDescription(queryType) || typeDescription(mutationType) || (name ? `GraphQL API for ${name}.` : void 0);\n\tconst homepageUrl = homepageUrlFromEndpoint(endpointUrl);\n\tconst authPart = authFromProbe(authProbe);\n\treturn {\n\t\turl: endpointUrl,\n\t\tname,\n\t\tdescription,\n\t\thomepageUrl,\n\t\tauthKind: authPart.authKind,\n\t\tcredentialFields: authPart.credentialFields,\n\t\tcredentialScheme: authPart.credentialScheme,\n\t\toauthScopes: authPart.oauthScopes\n\t};\n}\n//#endregion\n//#region src/schemas/graphql-app-discovery.ts\nconst GraphqlDiscoverRequestSchema = z.object({ url: z.string().url() });\nconst GraphqlDiscoverResponseSchema = z.object({\n\tdetected: z.boolean(),\n\ttemplate: z.object({\n\t\tauthKind: AppAuthKindSchema,\n\t\tcredentialFields: z.record(z.string(), AppCredentialFieldSchema).optional(),\n\t\tcredentialScheme: AppCredentialSchemeSchema.optional(),\n\t\toauthScopes: z.array(OAuthScopeOptionSchema),\n\t\turl: z.string().url(),\n\t\tname: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\thomepageUrl: z.string().optional()\n\t})\n});\n//#endregion\n//#region src/schemas/catalog.ts\nconst CatalogAppSummarySchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string()\n});\nconst CatalogAppsPageSchema = z.object({\n\titems: z.array(CatalogAppSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogAppDetailSchema = z.object({\n\tname: z.string(),\n\tdescription: z.string(),\n\tpackage: z.string(),\n\tversion: z.string().optional()\n});\nconst CatalogActionSummarySchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional()\n});\nconst CatalogActionsPageSchema = z.object({\n\ttoolkit: z.string().optional(),\n\titems: z.array(CatalogActionSummarySchema),\n\tnextCursor: z.string().optional()\n});\nconst CatalogActionDetailSchema = z.object({\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\tinputParameters: z.record(z.string(), z.unknown()).optional(),\n\toutputParameters: z.record(z.string(), z.unknown()).optional(),\n\tversion: z.string().optional()\n});\nconst CatalogAppsPageResponseSchema = CatalogAppsPageSchema;\nconst CatalogAppDetailResponseSchema = CatalogAppDetailSchema;\nconst CatalogActionsPageResponseSchema = CatalogActionsPageSchema;\nconst CatalogActionDetailResponseSchema = CatalogActionDetailSchema;\n//#endregion\n//#region src/apps/slug.ts\nconst ORG_SLUG_SEPARATOR = \"/\";\n/** Official apps use a bare slug with no namespace separator. */\nfunction isOfficialSlug(slug) {\n\treturn slug.trim().length > 0 && !slug.includes(ORG_SLUG_SEPARATOR);\n}\n/** Qualify an org-custom app slug as `{orgSlug}/{name}`. */\nfunction qualifyOrgSlug(orgSlug, name) {\n\tconst trimmedOrgSlug = orgSlug.trim();\n\tconst trimmedName = name.trim();\n\tif (!trimmedOrgSlug || !trimmedName) throw new Error(\"qualifyOrgSlug requires non-empty orgSlug and name\");\n\tif (trimmedOrgSlug.includes(ORG_SLUG_SEPARATOR) || trimmedName.includes(ORG_SLUG_SEPARATOR)) throw new Error(\"orgSlug and name must not contain '/'\");\n\treturn `${trimmedOrgSlug}${ORG_SLUG_SEPARATOR}${trimmedName}`;\n}\n/** Parse a stored app slug into official vs org-custom parts. */\nfunction parseAppSlug(slug) {\n\tconst trimmed = slug.trim();\n\tif (!trimmed) throw new Error(\"parseAppSlug requires a non-empty slug\");\n\tconst separatorIndex = trimmed.indexOf(ORG_SLUG_SEPARATOR);\n\tif (separatorIndex === -1) return {\n\t\tkind: \"official\",\n\t\tslug: trimmed\n\t};\n\tconst orgSlug = trimmed.slice(0, separatorIndex);\n\tconst name = trimmed.slice(separatorIndex + 1);\n\tif (!orgSlug || !name || trimmed.indexOf(ORG_SLUG_SEPARATOR, separatorIndex + 1) !== -1) throw new Error(`Invalid org app slug: ${slug}`);\n\treturn {\n\t\tkind: \"org\",\n\t\torgSlug,\n\t\tname,\n\t\tslug: trimmed\n\t};\n}\n//#endregion\n//#region src/apps/connect-deeplink.ts\n/** Web URL that opens the org apps page with a connect dialog for the given app. */\nfunction buildConnectDeeplink(options) {\n\tconst base = options.webUrl.replace(/\\/+$/, \"\");\n\tconst params = new URLSearchParams({ connect: options.appSlug });\n\tif (options.flow) params.set(\"flow\", options.flow);\n\treturn `${base}/${options.orgSlug}/apps?${params.toString()}`;\n}\n/** Web URL that opens the org apps page with a connector request-access dialog. */\nfunction buildRequestAccessDeeplink(options) {\n\tconst base = options.webUrl.replace(/\\/+$/, \"\");\n\tconst params = new URLSearchParams({ requestAccess: options.appSlug });\n\treturn `${base}/${options.orgSlug}/apps?${params.toString()}`;\n}\n/**\n* Web URL that opens an agent's External Channels Slack dialog.\n* `rail=configure` shows the channels panel; `slack=` selects Keystroke vs custom wizard.\n*/\nfunction buildAgentSlackDeeplink(options) {\n\tconst base = options.webUrl.replace(/\\/+$/, \"\");\n\tconst params = new URLSearchParams({\n\t\trail: \"configure\",\n\t\tslack: options.kind\n\t});\n\treturn `${base}/${options.orgSlug}/agents/${encodeURIComponent(options.agentId)}?${params.toString()}`;\n}\n//#endregion\n//#region src/apps/resolve-connect-app.ts\n/**\n* Resolve a connect-catalog slug.\n*\n* Slack slugs resolve as-is: `slack` (Personal Slack Account) opens the web\n* chooser, and `slackbot` is the catalog slug for the Keystroke Slack App.\n* Callers pick a specific Slack dialog with a connect-deeplink `flow` instead\n* of slug rewriting.\n*/\nfunction resolveConnectAppSlug(slug, apps) {\n\tconst trimmed = slug.trim();\n\tif (!trimmed) throw new Error(\"App slug is required\");\n\ttry {\n\t\tparseAppSlug(trimmed);\n\t} catch {\n\t\tthrow new Error(`Invalid app slug: ${slug}`);\n\t}\n\tconst match = apps.find((app) => app.id === trimmed);\n\tif (!match) {\n\t\tconst available = apps.map((app) => app.id).join(\", \") || \"(none)\";\n\t\tthrow new Error(`Unknown app \"${trimmed}\". Available: ${available}`);\n\t}\n\treturn match;\n}\n//#endregion\n//#region src/apps/slack.ts\n/**\n* Shared Slack connection constants and helpers for the unified Slack UX.\n*\n* Catalog slugs stay `slack` (personal) and `slackbot` (Keystroke app) under the\n* hood. Custom apps use oauth_apps slugs `slack-app:<handle>` and a synthetic\n* credential catalog slug `slack-custom-app` for the Apps table.\n*/\n/** Prefix for custom Slack app oauth_apps slugs: `slack-app:<handle>`. */\nconst SLACK_CUSTOM_APP_SLUG_PREFIX = \"slack-app:\";\n/**\n* Synthetic credential app slug for custom Slack apps.\n* Not a Composio catalog entry — used for credential_instances + Apps table grouping.\n*/\nconst SLACK_CUSTOM_APP_CREDENTIAL_SLUG = \"slack-custom-app\";\n/** Catalog / connect slug for the Keystroke Slack App (bot). */\nconst SLACK_KEYSTROKE_APP_SLUG = \"slackbot\";\n/** Catalog / connect slug for a personal Slack user-token connection. */\nconst SLACK_PERSONAL_APP_SLUG = \"slack\";\n/** Gateway oauth_apps slug used when mirroring the Keystroke Slack App. */\nconst SLACK_GATEWAY_OAUTH_APP_KEY = \"slack\";\n/**\n* `?flow=` values for the Apps-page Slack connect deeplink\n* (`?connect=slack&flow=…`). Omitted flow opens the three-way chooser.\n* `keystroke` opens the Keystroke Slack App dialog (catalog slug `slackbot`),\n* `personal` the Personal Slack Account dialog (catalog slug `slack`),\n* `custom` the custom Slack app wizard.\n*/\nconst SLACK_CONNECT_FLOWS = [\n\t\"keystroke\",\n\t\"personal\",\n\t\"custom\"\n];\n/** Parse a `?flow=` search value; null when missing or not a Slack connect flow. */\nfunction parseSlackConnectFlow(value) {\n\treturn typeof value === \"string\" && SLACK_CONNECT_FLOWS.includes(value) ? value : null;\n}\n/** Channel-id sentinel for app-level gateway bindings: `app:<oauthAppSlug>`. */\nfunction slackAppBindingChannelId(oauthAppSlug) {\n\treturn `app:${oauthAppSlug}`;\n}\n/** True when `channelId` is an app-level binding sentinel. */\nfunction isSlackAppBindingChannelId(channelId) {\n\treturn channelId.startsWith(\"app:\");\n}\n/** Build the oauth_apps slug for a custom Slack app from its handle. */\nfunction slackCustomAppOauthSlug(handle) {\n\treturn `${SLACK_CUSTOM_APP_SLUG_PREFIX}${normalizeSlackAppHandle(handle)}`;\n}\n/** True when an oauth_apps slug is a custom Slack app. */\nfunction isSlackCustomAppOauthSlug(slug) {\n\treturn slug.startsWith(SLACK_CUSTOM_APP_SLUG_PREFIX);\n}\n/** Handle portion of a custom Slack app oauth slug (`slack-app:<handle>`); returns the input unchanged for non-custom slugs. */\nfunction slackCustomAppHandleFromSlug(slug) {\n\treturn isSlackCustomAppOauthSlug(slug) ? slug.slice(10) : slug;\n}\n/**\n* Map a credential/catalog app id to a Slack connection kind for Apps table grouping.\n* Returns null for non-Slack apps.\n*/\nfunction slackConnectionKindFromAppId(appId) {\n\tif (appId === \"slackbot\") return \"keystroke_app\";\n\tif (appId === \"slack-custom-app\" || isSlackCustomAppOauthSlug(appId)) return \"custom_app\";\n\tif (appId === \"slack\") return \"personal\";\n\treturn null;\n}\n/** Display group label for a Slack connection kind in the Apps credentials table. */\nfunction slackConnectionKindGroupLabel(kind) {\n\tswitch (kind) {\n\t\tcase \"keystroke_app\": return \"Keystroke Slack App\";\n\t\tcase \"custom_app\": return \"Custom Slack Apps\";\n\t\tcase \"personal\": return \"Personal Slack Account\";\n\t\tdefault: return kind;\n\t}\n}\n/**\n* Slack bot username rules (api.slack.com bot users + workspace username field):\n* - lowercase letters, numbers, periods, hyphens, underscores only\n* - max 21 characters\n* - cannot be the reserved name `slackbot`\n*/\nconst SLACK_APP_HANDLE_MAX_LENGTH = 21;\n/** Reserved bot username Slack rejects. */\nconst SLACK_APP_HANDLE_RESERVED = \"slackbot\";\n/**\n* Normalize a Slack bot handle to Slack's username charset/length.\n* Strips leading `@`, lowercases, turns whitespace into hyphens, drops other\n* disallowed characters, collapses repeated separators, truncates to 21.\n*\n* Handles remain lowercase (Slack username rules). App / bot *display* names\n* may use mixed case and spaces — see {@link slackAppNameFromHandle}.\n*/\nfunction normalizeSlackAppHandle(handle) {\n\treturn handle.trim().replace(/^@+/, \"\").toLowerCase().replace(/\\s+/g, \"-\").replace(/[^a-z0-9._-]/g, \"\").replace(/-+/g, \"-\").replace(/^[-._]+|[-._]+$/g, \"\").slice(0, 21);\n}\n/**\n* Title-case a handle/slug into a Slack app display name with spaces.\n* `support-agent` → `Support Agent`. Safe for `display_information.name` and\n* `bot_user.display_name` (mixed case + spaces); not for the @handle itself.\n*/\nfunction slackAppNameFromHandle(handle) {\n\tconst normalized = normalizeSlackAppHandle(handle);\n\tif (!normalized) return \"\";\n\treturn normalized.split(/[-._]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(\" \");\n}\n/** True when a normalized handle is usable as a Slack bot username. */\nfunction isValidSlackAppHandle(handle) {\n\tconst normalized = normalizeSlackAppHandle(handle);\n\treturn normalized.length > 0 && normalized.length <= 21 && normalized !== \"slackbot\" && /^[a-z0-9._-]+$/.test(normalized);\n}\n/** Human-readable reason a handle is invalid, or null when valid. */\nfunction slackAppHandleError(handle) {\n\tconst normalized = normalizeSlackAppHandle(handle);\n\tif (!normalized) return \"Handle is required\";\n\tif (normalized === \"slackbot\") return \"Handle cannot be slackbot\";\n\treturn null;\n}\n/** Bot scopes required for External Channels + channel create/join. */\nconst SLACK_CUSTOM_APP_BOT_SCOPES = [\n\t\"app_mentions:read\",\n\t\"channels:history\",\n\t\"channels:join\",\n\t\"channels:manage\",\n\t\"channels:read\",\n\t\"chat:write\",\n\t\"groups:history\",\n\t\"groups:read\",\n\t\"groups:write\",\n\t\"im:history\",\n\t\"im:read\",\n\t\"im:write\",\n\t\"mpim:history\",\n\t\"users:read\",\n\t\"assistant:write\",\n\t\"reactions:read\",\n\t\"reactions:write\"\n];\n/** Bot events subscribed for gateway ingress. */\nconst SLACK_CUSTOM_APP_BOT_EVENTS = [\n\t\"app_mention\",\n\t\"message.channels\",\n\t\"message.groups\",\n\t\"message.im\",\n\t\"message.mpim\",\n\t\"member_joined_channel\"\n];\nfunction buildSlackAppManifest(input) {\n\tconst name = input.name.trim();\n\tconst handle = normalizeSlackAppHandle(input.handle);\n\tif (!name) throw new Error(\"Slack app name is required\");\n\tconst handleIssue = slackAppHandleError(handle);\n\tif (handleIssue) throw new Error(handleIssue);\n\tif (!input.eventsUrl.trim()) throw new Error(\"eventsUrl is required\");\n\tif (!input.redirectUrl.trim()) throw new Error(\"redirectUrl is required\");\n\treturn {\n\t\tdisplay_information: {\n\t\t\tname,\n\t\t\tdescription: `${name} — Keystroke agent for Slack`\n\t\t},\n\t\tfeatures: {\n\t\t\tbot_user: {\n\t\t\t\tdisplay_name: name,\n\t\t\t\talways_online: true\n\t\t\t},\n\t\t\tapp_home: {\n\t\t\t\thome_tab_enabled: false,\n\t\t\t\tmessages_tab_enabled: true,\n\t\t\t\tmessages_tab_read_only_enabled: false\n\t\t\t}\n\t\t},\n\t\toauth_config: {\n\t\t\tredirect_urls: [input.redirectUrl.trim()],\n\t\t\tscopes: { bot: [...SLACK_CUSTOM_APP_BOT_SCOPES] }\n\t\t},\n\t\tsettings: {\n\t\t\tevent_subscriptions: {\n\t\t\t\trequest_url: input.eventsUrl.trim(),\n\t\t\t\tbot_events: [...SLACK_CUSTOM_APP_BOT_EVENTS]\n\t\t\t},\n\t\t\tinteractivity: {\n\t\t\t\tis_enabled: true,\n\t\t\t\trequest_url: input.eventsUrl.trim()\n\t\t\t},\n\t\t\torg_deploy_enabled: false,\n\t\t\tsocket_mode_enabled: false,\n\t\t\ttoken_rotation_enabled: false\n\t\t}\n\t};\n}\n//#endregion\n//#region src/package-manager/detect-project-package-manager.ts\nconst LOCKFILE_MANAGERS = [\n\t[\"pnpm-lock.yaml\", \"pnpm\"],\n\t[\"yarn.lock\", \"yarn\"],\n\t[\"bun.lockb\", \"bun\"],\n\t[\"package-lock.json\", \"npm\"]\n];\nfunction parsePackageManagerField(raw) {\n\tconst manager = raw.split(\"@\")[0]?.trim().toLowerCase();\n\tif (manager === \"npm\" || manager === \"pnpm\" || manager === \"yarn\" || manager === \"bun\") return manager;\n}\nfunction detectFromPackageJsonContents(packageJson) {\n\tif (!packageJson) return;\n\ttry {\n\t\tconst parsed = JSON.parse(packageJson);\n\t\tif (typeof parsed.packageManager === \"string\") return parsePackageManagerField(parsed.packageManager);\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction detectFromLockfileNames(paths) {\n\tfor (const [lockfile, manager] of LOCKFILE_MANAGERS) if (paths.has(lockfile)) return manager;\n}\n/**\n* Infer the package manager from an in-memory set of project files (e.g. a\n* deploy source snapshot). Pure and browser-safe — no filesystem access, so it\n* is safe to expose from `@keystrokehq/shared` (bundled by the web app).\n* Prefers `package.json`'s `packageManager`, then a lockfile; defaults to npm.\n*/\nfunction detectProjectPackageManagerFromSnapshot(files) {\n\tconst paths = new Set(files.map((file) => file.path));\n\tconst packageJson = files.find((file) => file.path === \"package.json\")?.contents;\n\tconst fromField = detectFromPackageJsonContents(packageJson);\n\tif (fromField) return fromField;\n\treturn detectFromLockfileNames(paths) ?? \"npm\";\n}\n//#endregion\n//#region src/package-manager/install-result.ts\n/**\n* Frozen pnpm install for trusted lockfiles (managed draft / deploy worktrees).\n*\n* pnpm 11 defaults `minimumReleaseAge` to 1440 minutes and re-verifies every\n* lockfile entry. Fresh `@keystrokehq/*` publishes are expected in Keystroke\n* projects, so exclude that scope. `trustLockfile` skips re-applying the age\n* gate to the committed lockfile (authored under the user's local pnpm).\n*/\nconst PNPM_FROZEN_INSTALL_ARGS = [\n\t\"install\",\n\t\"--frozen-lockfile\",\n\t\"--config.trustLockfile=true\",\n\t\"--config.minimum-release-age-exclude[]=@keystrokehq/*\"\n];\n/**\n* Shell form of {@link PNPM_FROZEN_INSTALL_ARGS}. The exclude pattern is\n* single-quoted so `*` is not glob-expanded by the sandbox shell.\n*/\nconst PNPM_FROZEN_INSTALL_COMMAND = \"pnpm install --frozen-lockfile --config.trustLockfile=true --config.minimum-release-age-exclude[]='@keystrokehq/*'\";\n/**\n* Whether a package-manager install exit should be treated as success.\n*\n* pnpm 10+ exits non-zero with `ERR_PNPM_IGNORED_BUILDS` when a dependency's\n* build script is not approved (e.g. native modules like better-sqlite3). The\n* dependencies are still fully installed — only the optional build script was\n* skipped — so this is not a real install failure for our purposes.\n*/\nfunction isAcceptableInstallExit(manager, exitCode, output) {\n\tif (exitCode === 0) return true;\n\tif (manager === \"pnpm\" && output.includes(\"ERR_PNPM_IGNORED_BUILDS\")) return true;\n\treturn false;\n}\n//#endregion\n//#region src/schemas/slack-apps.ts\n/** Request body for generating a Slack app manifest (stateless). */\nconst SlackAppManifestRequestSchema = z.object({\n\tname: z.string().trim().min(1).max(80),\n\thandle: z.string().trim().min(1).max(80).transform(normalizeSlackAppHandle).superRefine((handle, ctx) => {\n\t\tif (isValidSlackAppHandle(handle)) return;\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tmessage: slackAppHandleError(handle) ?? \"Handle must be a valid Slack bot username\"\n\t\t});\n\t})\n});\n/** Request body for creating a custom Slack app (credentials + identity). */\nconst CreateSlackAppRequestSchema = SlackAppManifestRequestSchema.extend({\n\tclientId: z.string().trim().min(1),\n\tclientSecret: z.string().trim().min(1),\n\tsigningSecret: z.string().trim().min(1),\n\t/** Scope the resulting credential to this project (agent flow); org-scoped when omitted. */\n\tprojectId: z.string().trim().min(1).optional()\n});\nconst SlackAppInstalledTeamSchema = z.object({\n\tteamId: z.string().min(1),\n\tteamName: z.string().min(1).optional(),\n\tconnectionId: z.string().min(1)\n});\nconst SlackAppBoundAgentSchema = z.object({\n\tagentId: z.string().min(1),\n\tagentSlug: z.string().min(1).optional(),\n\tagentName: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional()\n});\n/** Summary of a custom Slack app for list/detail responses. */\nconst SlackAppSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\thandle: z.string().min(1),\n\tslackAppId: z.string().min(1).optional(),\n\tinstalledTeams: z.array(SlackAppInstalledTeamSchema),\n\tboundAgent: SlackAppBoundAgentSchema.optional()\n});\nconst SlackAppListResponseSchema = z.array(SlackAppSummarySchema);\nconst SlackAppManifestResponseSchema = z.object({ manifest: z.record(z.string(), z.unknown()) });\nconst CreateSlackAppResponseSchema = z.object({\n\tapp: SlackAppSummarySchema,\n\tauthorizeUrl: z.string().url()\n});\nconst SlackAppInstallStartResponseSchema = z.object({ authorizeUrl: z.string().url() });\n//#endregion\n//#region src/credential-instance-label.ts\n/** Human-readable app name from a credential slug (e.g. `google-drive` → `Google Drive`). */\nfunction displayCredentialAppName(appId) {\n\treturn appId.split(/[-_]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(\" \");\n}\nfunction buildCredentialInstanceLabel(options) {\n\tconst appName = options.appName.trim();\n\tswitch (options.scopeType) {\n\t\tcase \"organization\": return `Organization ${appName}`;\n\t\tcase \"user\": return `Personal ${appName}`;\n\t\tcase \"project\": return `${appName} (${options.projectName?.trim() || \"Project\"})`;\n\t\tdefault: return options.scopeType;\n\t}\n}\n/** Pick a friendly slug unused within a credential scope bucket. */\nfunction deriveCredentialInstanceSlug(options) {\n\tconst taken = new Set(options.takenSlugs);\n\tconst explicit = options.explicitSlug?.trim();\n\tif (explicit) return explicit;\n\tconst fromName = options.name?.trim();\n\tif (fromName) {\n\t\tconst base = normalizeOrganizationNameToSlugBase(fromName) || options.appSlug;\n\t\tif (!taken.has(base)) return base;\n\t\tlet suffix = 1;\n\t\twhile (taken.has(`${base}-${suffix}`)) suffix += 1;\n\t\treturn `${base}-${suffix}`;\n\t}\n\tif (!taken.has(options.appSlug)) return options.appSlug;\n\tlet suffix = 1;\n\twhile (taken.has(`${options.appSlug}-${suffix}`)) suffix += 1;\n\treturn `${options.appSlug}-${suffix}`;\n}\n/** Pick a label that is unused within a credential scope, suffixing when needed. */\nfunction resolveUniqueCredentialInstanceLabel(options) {\n\tconst taken = new Set([...options.takenLabels].map((label) => label ?? null));\n\tif (!taken.has(options.baseLabel)) return options.baseLabel;\n\tconst disambiguator = options.disambiguator?.trim();\n\tif (disambiguator) {\n\t\tconst withDisambiguator = `${options.baseLabel} (${disambiguator})`;\n\t\tif (!taken.has(withDisambiguator)) return withDisambiguator;\n\t}\n\tlet suffix = 2;\n\twhile (taken.has(`${options.baseLabel} (${suffix})`)) suffix += 1;\n\treturn `${options.baseLabel} (${suffix})`;\n}\n//#endregion\n//#region src/schemas/app-credentials.ts\n/** Scope of a platform app credential (maps to `credential_instances.scope_type`). */\nconst AppCredentialScopeSchema = z.enum([\n\t\"user\",\n\t\"project\",\n\t\"organization\"\n]);\n/** How the credential was connected (OAuth, manual api-key entry, or no-auth). */\nconst AppCredentialConnectionKindSchema = z.enum([\n\t\"oauth\",\n\t\"manual\",\n\t\"none\"\n]);\n/** Connect-dialog permission preset for OAuth scope selection. */\nconst OAuthPermissionModeSchema = z.enum([\"default\", \"restricted\"]);\nconst optionalTimestamp$1 = z.string().optional();\nconst nullableOptionalTimestamp = z.string().nullable().optional();\n/**\n* Summary row for the apps/credentials table and credential detail page.\n* Plaintext secrets are never returned — only masked `keyPreviews`.\n*/\nconst AppCredentialSummarySchema = z.object({\n\tid: z.string().min(1),\n\tappId: z.string().min(1),\n\t/** Stable per-scope identifier; pass to `--credential` to pin a specific instance. */\n\tslug: z.string().min(1),\n\tlabel: z.string().min(1),\n\tscope: AppCredentialScopeSchema,\n\tlastRefreshedAt: z.string().nullable(),\n\tappName: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tprojectName: z.string().min(1).optional(),\n\tstatus: z.string().optional(),\n\tcreatedAt: optionalTimestamp$1,\n\tlastUsedAt: nullableOptionalTimestamp,\n\tisDefault: z.boolean().optional(),\n\tconnectionKind: AppCredentialConnectionKindSchema.optional(),\n\townerUserId: z.string().min(1).optional(),\n\townerName: z.string().min(1).optional(),\n\townerAvatarUrl: z.string().url().optional(),\n\tgrantedScopes: z.array(z.string().min(1)).optional(),\n\tcredentialKeys: z.array(z.string().min(1)).optional(),\n\tkeyPreviews: z.record(z.string(), z.string()).optional(),\n\texpiresAt: optionalTimestamp$1\n});\nconst credentialSecretValueSchema = z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" });\nfunction hasCredentialTarget(input) {\n\treturn input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential || Boolean(input.credentialInstanceId?.trim());\n}\nfunction addMissingCredentialTargetIssue(ctx, path = [\"projects\"]) {\n\tctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"At least one credential target is required\",\n\t\tpath\n\t});\n}\n/** Target fields shared by create and OAuth start flows. */\nconst CredentialTargetsFieldsSchema = z.object({\n\tprojects: z.array(z.string().min(1)).default([]),\n\tcreateOrganizationCredential: z.boolean().default(false),\n\tcreateUserProvidedCredential: z.boolean().default(false),\n\t/** Display label for created credential instances (apps table / detail page). */\n\tlabel: z.string().trim().min(1).optional(),\n\t/** When set, update this credential instance in place (reconnect) instead of creating a new row. */\n\tcredentialInstanceId: z.string().trim().min(1).optional()\n});\n/** Input for starting an OAuth connection (connect dialog / CLI connect). */\nconst StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tscopes: z.array(z.string().min(1)),\n\tpermissionMode: OAuthPermissionModeSchema\n});\n/** Result of starting an OAuth connection. */\nconst StartOAuthConnectionResultSchema = z.object({\n\tstatus: z.enum([\"connected\", \"redirecting\"]),\n\tauthorizeUrl: z.string().url().nullable()\n});\n/** Input for starting a keystroke connection (connect dialog). */\nconst StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({\n\tapp: z.string().trim().min(1),\n\tvalue: credentialSecretValueSchema.optional()\n}).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n});\nconst connectedKeystrokeConnectionResultSchema = z.object({\n\tstatus: z.literal(\"connected\"),\n\tconnectionId: z.string().min(1)\n});\nconst redirectingKeystrokeConnectionResultSchema = z.object({\n\tstatus: z.literal(\"redirecting\"),\n\tauthorizeUrl: z.string().url(),\n\tconnectionId: z.string().min(1)\n});\n/** Result of starting a keystroke connection. */\nconst StartKeystrokeConnectionResultSchema = z.discriminatedUnion(\"status\", [connectedKeystrokeConnectionResultSchema, redirectingKeystrokeConnectionResultSchema]);\n/** Request body for `POST /api/credentials` (manual api-key fan-out). */\nconst CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({\n\tappId: z.string().min(1),\n\tconnectionKind: AppCredentialConnectionKindSchema,\n\tvalue: credentialSecretValueSchema.optional(),\n\tscopes: z.array(z.string().min(1)).optional(),\n\t/** Friendly per-scope slug; when omitted, derived from label/name. */\n\tslug: z.string().trim().min(1).optional()\n}).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n\tif (input.connectionKind === \"manual\" && !input.value) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"value is required for manual connections\",\n\t\tpath: [\"value\"]\n\t});\n\tif (input.connectionKind === \"oauth\") ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"OAuth credentials are created via the OAuth callback\",\n\t\tpath: [\"connectionKind\"]\n\t});\n\tif (input.connectionKind === \"none\" && input.value) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"value is not allowed for no-auth connections\",\n\t\tpath: [\"value\"]\n\t});\n});\n/** Request body for `PATCH /api/credentials/:id`. */\nconst UpdateCredentialRequestSchema = z.object({\n\tlabel: z.string().trim().min(1).optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: credentialSecretValueSchema.optional(),\n\t/** Move this credential to a different scope in place. */\n\tscope: AppCredentialScopeSchema.optional(),\n\t/** Required when `scope` is `project`. */\n\tprojectSlug: z.string().trim().min(1).optional()\n}).superRefine((input, ctx) => {\n\tif (!(input.label !== void 0 || input.isDefault !== void 0 || input.value !== void 0 || input.scope !== void 0)) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"At least one field is required\"\n\t});\n\tif (input.scope === \"project\" && !input.projectSlug) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"projectSlug is required when scope is project\",\n\t\tpath: [\"projectSlug\"]\n\t});\n\tif (input.scope !== \"project\" && input.projectSlug !== void 0) ctx.addIssue({\n\t\tcode: \"custom\",\n\t\tmessage: \"projectSlug is only valid when scope is project\",\n\t\tpath: [\"projectSlug\"]\n\t});\n});\n/** Request body for `POST /api/credentials/:id/duplicate`. */\nconst DuplicateCredentialRequestSchema = CredentialTargetsFieldsSchema.omit({ credentialInstanceId: true }).superRefine((input, ctx) => {\n\tif (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);\n});\nconst ListCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\nconst ListCredentialsPageQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(200).optional(),\n\tcursor: z.string().min(1).optional()\n});\nconst ListCredentialsPageResponseSchema = z.object({\n\titems: z.array(AppCredentialSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst GetCredentialResponseSchema = AppCredentialSummarySchema;\nconst CreateCredentialsResponseSchema = z.array(AppCredentialSummarySchema);\nconst DuplicateCredentialsResponseSchema = CreateCredentialsResponseSchema;\n//#endregion\n//#region src/schemas/team-requests.ts\nconst TeamRequestTypeSchema = z.enum([\n\t\"org-deletion\",\n\t\"contact\",\n\t\"enterprise-upgrade\",\n\t\"verification\",\n\t\"slack-connect\",\n\t\"connector-access\",\n\t\"platform-agent-feedback\"\n]);\nconst SubmitTeamRequestRequestSchema = z.object({\n\ttype: TeamRequestTypeSchema,\n\tmessage: z.string().trim().max(5e3).optional(),\n\t/** Required for connector-access requests (sandbox VM secret exposure). */\n\tappSlug: z.string().trim().min(1).optional(),\n\t/** Optional platform-agent chat/session id for feedback requests. */\n\tsessionId: z.string().trim().min(1).optional()\n}).superRefine((value, ctx) => {\n\tif (value.type === \"connector-access\" && !value.appSlug) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tpath: [\"appSlug\"],\n\t\tmessage: \"appSlug is required for connector-access requests\"\n\t});\n});\nconst SubmitTeamRequestResponseSchema = z.object({ ok: z.literal(true) });\n//#endregion\n//#region src/schemas/agent-feedback.ts\nconst SubmitAgentFeedbackRequestSchema = z.object({\n\tmessage: z.string().trim().min(1).max(1e4),\n\tcliVersion: z.string().trim().min(1).max(64).optional(),\n\tprojectSlug: z.string().trim().min(1).max(128).optional()\n});\nconst SubmitAgentFeedbackResponseSchema = z.object({ ok: z.literal(true) });\n//#endregion\n//#region src/schemas/templates.ts\nconst TemplateKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"both\"\n]);\nconst TemplateManifestSchema = z.object({\n\tkind: TemplateKindSchema,\n\ttitle: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttags: z.array(z.string().min(1)).default([]),\n\trequiredApps: z.array(z.string().min(1)).default([])\n});\n/** Catalog row without file contents — used for list endpoints. */\nconst TemplateSummarySchema = z.object({\n\tslug: z.string().min(1),\n\tkind: TemplateKindSchema,\n\ttitle: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttags: z.array(z.string()),\n\trequiredApps: z.array(z.string()),\n\tupdatedAt: z.string().datetime()\n});\n/** Full template including path → contents map. */\nconst TemplateDetailSchema = TemplateSummarySchema.extend({ files: z.record(z.string(), z.string()) });\nconst ListTemplatesResponseSchema = z.array(TemplateSummarySchema);\nconst GetTemplateResponseSchema = TemplateDetailSchema;\nconst TemplateFilesResponseSchema = z.object({\n\tslug: z.string().min(1),\n\tfiles: z.record(z.string(), z.string())\n});\n/** Seed / upsert payload used by platform-database. */\nconst TemplateSeedEntrySchema = z.object({\n\tslug: z.string().min(1),\n\tkind: TemplateKindSchema,\n\ttitle: z.string().min(1),\n\tdescription: z.string().min(1),\n\ttags: z.array(z.string()).default([]),\n\trequiredApps: z.array(z.string()).default([]),\n\tfiles: z.record(z.string(), z.string())\n});\n//#endregion\n//#region src/schemas/marketing-contact.ts\nconst MarketingContactCompanySizeSchema = z.enum([\n\t\"1-10\",\n\t\"11-50\",\n\t\"51-200\",\n\t\"201-500\",\n\t\"500+\"\n]);\nconst SubmitMarketingContactRequestSchema = z.object({\n\tfullName: z.string().trim().min(1, \"Full name is required\").max(200),\n\tworkEmail: z.string().trim().email(\"Enter a valid email address\").max(320),\n\tcompanySize: MarketingContactCompanySizeSchema,\n\tmessage: z.string().trim().min(1, \"Message is required\").max(5e3),\n\t/** Honeypot — must stay empty; bots that fill it are ignored silently. */\n\tcompanyWebsite: z.string().optional()\n});\nconst SubmitMarketingContactResponseSchema = SubmitTeamRequestResponseSchema;\n//#endregion\n//#region src/schemas/credential-materialize.ts\nconst CredentialAccessUnavailableReasonSchema = z.enum([\"request_access\", \"reconnect_required\"]);\n/** Wire error body for sandbox materialization failures (no provider payloads). */\nconst CredentialAccessUnavailableErrorBodySchema = z.object({\n\terror: z.literal(\"credential_access_unavailable\"),\n\tcode: z.literal(\"credential_access_unavailable\"),\n\tappSlug: z.string().min(1),\n\treason: CredentialAccessUnavailableReasonSchema,\n\trequestAccessUrl: z.string().url().optional(),\n\tmessage: z.string().optional()\n});\nconst CredentialMaterializeRequestSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"api_key\"),\n\t\tinstanceId: z.string().min(1)\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"oauth\"),\n\t\tconnectionId: z.string().min(1)\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"keystroke\"),\n\t\tinstanceId: z.string().min(1),\n\t\tconnectionId: z.string().min(1),\n\t\tappSlug: z.string().min(1)\n\t})\n]);\nconst CredentialMaterializeResponseSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"api_key\"),\n\t\tvalue: z.unknown()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"oauth\"),\n\t\taccessToken: z.string().min(1)\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"keystroke\"),\n\t\tvalue: z.unknown()\n\t})\n]);\n/** True when a Composio access token is blank, redacted, or truncated. */\nfunction isUnusableProviderAccessToken(token) {\n\tif (typeof token !== \"string\") return true;\n\tconst trimmed = token.trim();\n\tif (!trimmed) return true;\n\tif (/REDACTED/i.test(trimmed)) return true;\n\tif (trimmed.endsWith(\"...\")) return true;\n\treturn false;\n}\n//#endregion\n//#region src/schemas/errors/schema.ts\nconst ValidationErrorDetailSchema = z.object({\n\tpath: z.string(),\n\tmessage: z.string()\n});\n/** Machine-readable codes returned in standard API error bodies. */\nconst ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(z.enum([\n\t\"needs_org_selection\",\n\t\"org_unverified\",\n\t\"connector_unavailable\",\n\t\"invalid_url\",\n\t\"url_not_allowed\",\n\t\"url_unreachable\",\n\t\"upstream_http_error\",\n\t\"spec_too_large\",\n\t\"spec_parse_error\",\n\t\"invalid_openapi\"\n]));\n/** Standard JSON error body returned by the HTTP API. */\nconst ErrorResponseSchema = z.object({\n\terror: z.string(),\n\tcode: ErrorResponseCodeSchema.optional(),\n\tmessage: z.string().optional(),\n\tdetails: z.array(ValidationErrorDetailSchema).optional()\n});\n//#endregion\n//#region src/schemas/errors/from-zod.ts\n/** Build the JSON body for HTTP 400 validation failures. */\nfunction validationErrorResponse(error, summary) {\n\treturn {\n\t\terror: summary,\n\t\tdetails: error.issues.map((issue) => ({\n\t\t\tpath: issue.path.join(\".\"),\n\t\t\tmessage: issue.message\n\t\t}))\n\t};\n}\n//#endregion\n//#region src/schemas/errors/parse.ts\nconst MessageOnlyErrorBodySchema = z.object({ message: z.string() });\n/** Parse a JSON error body from the API. */\nfunction parseErrorResponse(body) {\n\tconst parsed = ErrorResponseSchema.safeParse(body);\n\tif (parsed.success) return parsed.data;\n\tconst messageOnly = MessageOnlyErrorBodySchema.safeParse(body);\n\tif (messageOnly.success) return {\n\t\terror: messageOnly.data.message,\n\t\tmessage: messageOnly.data.message\n\t};\n}\n//#endregion\n//#region src/schemas/http.ts\nconst CredentialRunContextSchema = z.object({\n\torgId: z.string().min(1).optional(),\n\tprojectId: z.string().min(1).optional(),\n\tuserId: z.string().min(1).optional(),\n\tuserIds: z.record(z.string(), z.string()).optional(),\n\tselection: z.record(z.string(), z.string()).optional()\n});\nconst ThinkingLevelSchema = z.enum([\n\t\"provider-default\",\n\t\"none\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\"\n]);\nconst PromptInputSchema = z.object({\n\tmessage: z.string(),\n\tsessionId: z.string().min(1).optional(),\n\tsubscriptionId: z.string().min(1).optional(),\n\tcontext: CredentialRunContextSchema.optional(),\n\tthinkingLevel: ThinkingLevelSchema.optional(),\n\tfiles: z.array(ChatAttachmentInputSchema).max(5).optional()\n}).refine((data) => data.message.trim().length > 0 || (data.files?.length ?? 0) > 0, { message: \"message or files is required\" });\nconst PromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\ttext: z.string(),\n\terror: z.string().nullable()\n});\nconst SkipResponseSchema = z.object({\n\tok: z.literal(true),\n\tskipped: z.literal(true)\n});\nconst HealthResponseSchema = z.object({ ok: z.literal(true) });\nconst PlatformInfoResponseSchema = z.object({ service: z.string() });\nconst ConnectProviderSchema = z.object({\n\tkey: z.string(),\n\tmode: z.enum([\"authorize-url\", \"browser-redirect\"]),\n\tpath: z.string(),\n\trequiresAuth: z.boolean()\n});\nconst ConnectProvidersResponseSchema = z.object({ providers: z.array(ConnectProviderSchema) });\nconst ConnectAuthorizeUrlResponseSchema = z.object({ url: z.string() });\nconst QueuedRunResponseSchema = z.object({ runId: z.string() });\nconst QueuedAgentPromptResponseSchema = z.object({\n\tsessionId: z.string(),\n\trunId: z.string()\n});\nfunction parsePromptInput(input) {\n\treturn PromptInputSchema.parse(input);\n}\nconst PollRunRequestSchema = z.object({\n\tworkflows: z.array(z.string().min(1)).optional(),\n\tattachments: z.array(z.string().min(1)).optional()\n});\nconst PollAttachmentResultSchema = z.object({\n\tattachmentSlug: z.string(),\n\tworkflowKey: z.string(),\n\trunId: z.string().optional(),\n\tbody: z.unknown().optional(),\n\tqueued: z.boolean(),\n\tskipped: z.boolean().optional()\n});\nconst PollRunMultiResponseSchema = z.object({ results: z.array(PollAttachmentResultSchema) });\nconst PollRunResponseSchema = z.union([\n\tz.record(z.string(), z.unknown()),\n\tPollRunMultiResponseSchema,\n\tSkipResponseSchema,\n\tz.object({ runId: z.string() })\n]);\nfunction parsePollRunRequest(body) {\n\tif (body === void 0 || body === null) return {};\n\treturn PollRunRequestSchema.parse(body);\n}\n//#endregion\n//#region src/schemas/db-proxy.ts\nconst DbProxyQuerySchema = z.object({\n\tsql: z.string().min(1),\n\tparams: z.array(z.unknown()).default([]),\n\tmethod: z.string().min(1).optional()\n});\nconst DbProxyQueryRequestSchema = DbProxyQuerySchema;\nconst DbProxyQueryResponseSchema = z.object({ rows: z.array(z.unknown()) });\n//#endregion\n//#region src/schemas/runs.ts\nconst RunSourceKindSchema = z.enum([\n\t\"api\",\n\t\"trigger\",\n\t\"gateway\",\n\t\"workflow\",\n\t\"agent\"\n]);\nconst RunSourceSchema = z.object({\n\tkind: RunSourceKindSchema,\n\tid: z.string().nullable()\n});\n//#endregion\n//#region src/schemas/agent-triggers.ts\nconst AgentTriggerOriginSchema = z.enum([\"project\", \"ephemeral\"]);\nconst AgentTriggerStatusSchema = z.enum([\n\t\"active\",\n\t\"disabled\",\n\t\"completed\"\n]);\nconst AgentTriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"cron\",\n\t\"poll\"\n]);\nconst AgentTriggerSummarySchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\tname: z.string().nullable().optional(),\n\tdescription: z.string().nullable().optional(),\n\ttype: AgentTriggerTypeSchema,\n\tschedule: z.string().nullable(),\n\t/** IANA timezone for schedule wall-clock fields. Null when omitted (evaluates in UTC). */\n\ttimezone: z.string().nullable(),\n\t/** ISO timestamptz of the next scheduled fire. Null for webhooks / unset. */\n\tnextRunAt: z.string().nullable(),\n\tendpoint: z.string().nullable(),\n\torigin: AgentTriggerOriginSchema,\n\tprompt: z.string().nullable(),\n\tstatus: AgentTriggerStatusSchema,\n\texecutionCount: z.number().int().nonnegative(),\n\tuntil: z.string().nullable(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string()\n});\nconst AgentTriggerSummaryListResponseSchema = z.array(AgentTriggerSummarySchema);\n//#endregion\n//#region src/schemas/history.ts\nconst HistoryRunKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst HistoryRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"waiting_children\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst HistoryRunActorSchema = z.object({\n\tuserId: z.string(),\n\tname: z.string(),\n\tavatarUrl: z.string().nullable().optional()\n});\nconst HistoryRunUsageLineItemSchema = z.object({\n\tid: z.string(),\n\tlabel: z.string(),\n\t/** Amount debited from the org's Keystroke balance for this line. */\n\tbilledUsd: z.number(),\n\t/** Provider cost for LLM usage on the org's API key (informational; not billed by Keystroke). */\n\tproviderCostUsd: z.number().nullable().optional(),\n\tkeySource: z.enum([\"byok\", \"platform\"]).nullable().optional()\n});\nconst HistoryRunUsageSchema = z.object({\n\trunDurationMs: z.number().nullable(),\n\tlineItems: z.array(HistoryRunUsageLineItemSchema),\n\t/** Sum of `billedUsd` — what Keystroke charged for this run. */\n\ttotalBilledUsd: z.number().nullable(),\n\t/** Sum of BYOK LLM provider costs (billed externally by the org's provider). */\n\texternalProviderCostUsd: z.number().nullable().optional()\n});\nconst HistoryRunSchema = z.object({\n\tid: z.string(),\n\tkind: HistoryRunKindSchema,\n\ttraceId: z.string().nullable(),\n\tprojectId: z.string(),\n\tprojectName: z.string(),\n\tresourceKey: z.string(),\n\tresourceId: z.string(),\n\tresourceName: z.string(),\n\tstatus: HistoryRunStatusSchema,\n\ttriggeredAt: z.string(),\n\ttimeInQueueMs: z.number().nullable(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tdurationMs: z.number().nullable(),\n\ttriggerLabel: z.string(),\n\ttriggerRaw: z.string(),\n\tranAs: HistoryRunActorSchema.nullable(),\n\tmodelsUsed: z.array(z.string()),\n\totherServicesUsed: z.array(z.string()),\n\ttotalCostUsd: z.number().nullable(),\n\tmessageCount: z.number().optional(),\n\tstepCount: z.number().optional(),\n\t/** Present for workflow child runs when known. */\n\tparentWorkflowRunId: z.string().nullable().optional()\n});\nconst HistoryTraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst HistoryTraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst HistoryTraceTriggerSchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentSlug: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst HistoryTraceGatewaySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst HistoryTraceSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: HistoryTraceTriggerSchema,\n\tgateway: HistoryTraceGatewaySchema,\n\tspans: z.array(HistoryTraceSpanSchema),\n\tlogs: z.array(HistoryTraceLogSchema)\n});\nconst HistoryWorkflowStepSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\tinput: z.unknown().nullable(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\nconst HistoryWorkflowRunDetailSchema = z.object({\n\tkind: z.literal(\"workflow\"),\n\trun: z.object({\n\t\tid: z.string(),\n\t\tworkflowKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\ttrigger: z.string(),\n\t\ttriggeredAt: z.string(),\n\t\tstartedAt: z.string().nullable(),\n\t\tfinishedAt: z.string().nullable(),\n\t\tparentWorkflowRunId: z.string().nullable(),\n\t\tinput: z.unknown().nullable(),\n\t\toutput: z.unknown().nullable(),\n\t\terror: z.unknown().nullable()\n\t}),\n\ttrigger: z.object({\n\t\tid: z.string(),\n\t\tattachmentSlug: z.string().nullable(),\n\t\ttriggerType: z.string(),\n\t\tsourcePath: z.string().nullable(),\n\t\tpayload: z.unknown().nullable(),\n\t\ttriggeredAt: z.string()\n\t}).nullable(),\n\tsteps: z.array(HistoryWorkflowStepSchema),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryAgentCompactionEventSchema = z.object({\n\tseq: z.number(),\n\tcreatedAt: z.string(),\n\tcompactionModel: z.string(),\n\tsourceModel: z.string(),\n\testimatedBeforeTokens: z.number().optional(),\n\tretainedTailEstimate: z.number().optional(),\n\tdurable: z.boolean()\n});\n/** Compact abnormal prompt-finish diagnostics from `agent_end` (optional on older events). */\nconst HistoryAgentPromptFinishEventSchema = z.object({\n\tseq: z.number(),\n\tcreatedAt: z.string(),\n\tpromptId: z.string().optional(),\n\toutcome: z.enum([\n\t\t\"completed\",\n\t\t\"error\",\n\t\t\"aborted\"\n\t]),\n\tfinishReason: z.string().nullable(),\n\trawFinishReason: z.string().optional(),\n\tstepCount: z.number(),\n\tmaxSteps: z.number(),\n\thitStepLimit: z.boolean(),\n\terror: z.object({\n\t\tname: z.string().optional(),\n\t\tmessage: z.string()\n\t}).optional()\n});\nconst HistoryAgentSessionDetailSchema = z.object({\n\tkind: z.literal(\"agent\"),\n\trunId: z.string(),\n\tsession: z.object({\n\t\tid: z.string(),\n\t\tagentKey: z.string(),\n\t\tstatus: HistoryRunStatusSchema,\n\t\tsource: z.enum([\n\t\t\t\"api\",\n\t\t\t\"gateway\",\n\t\t\t\"trigger\",\n\t\t\t\"workflow\",\n\t\t\t\"agent\"\n\t\t]),\n\t\tsourceId: z.string().nullable(),\n\t\tcreatedAt: z.string(),\n\t\tupdatedAt: z.string(),\n\t\tmessageCount: z.number(),\n\t\terror: z.unknown().nullable()\n\t}),\n\tgateway: z.object({\n\t\tthreadId: z.string(),\n\t\tattachmentSlug: z.string().nullable()\n\t}).nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\t/** Sanitized context-compaction markers for the conversation timeline. */\n\tcompactionEvents: z.array(HistoryAgentCompactionEventSchema).default([]),\n\t/** Abnormal prompt-finish diagnostics from `agent_end` (missing on historical events). */\n\tpromptFinishEvents: z.array(HistoryAgentPromptFinishEventSchema).default([]),\n\ttrace: HistoryTraceSchema.nullable(),\n\tranAs: HistoryRunActorSchema.nullable().optional(),\n\tusage: HistoryRunUsageSchema.nullable().optional()\n});\nconst HistoryRunDetailSchema = z.discriminatedUnion(\"kind\", [HistoryWorkflowRunDetailSchema, HistoryAgentSessionDetailSchema]);\nconst HistoryRunListQuerySchema = z.object({\n\tproject: z.string().min(1).optional(),\n\tstatus: HistoryRunStatusSchema.optional(),\n\tkind: HistoryRunKindSchema.optional(),\n\tlimit: z.coerce.number().int().min(1).max(200).optional()\n});\nconst HistoryRunListResponseSchema = z.array(HistoryRunSchema);\nconst HistoryRunDetailResponseSchema = HistoryRunDetailSchema.nullable();\nconst HistoryRunCancelResponseSchema = HistoryRunSchema.nullable();\n//#endregion\n//#region src/schemas/workflow-runs.ts\nconst WorkflowRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"sleeping\",\n\t\"waiting_hook\",\n\t\"waiting_children\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst WorkflowRunTriggerSchema = z.enum([\n\t\"api\",\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\",\n\t\"retry\"\n]);\n/**\n* Durable workflow event-log entry types. Shared so the persistence layer\n* (`@keystrokehq/database` schema) and the runtime-agnostic replay engine\n* (`@keystrokehq/workflow`) reference one definition instead of duplicating it.\n*/\nconst WorkflowEventTypeSchema = z.enum([\n\t\"run_started\",\n\t\"step_completed\",\n\t\"step_failed\",\n\t\"step_retrying\",\n\t\"sleep_scheduled\",\n\t\"sleep_completed\",\n\t\"hook_created\",\n\t\"hook_resumed\",\n\t\"child_dispatched\",\n\t\"run_completed\",\n\t\"run_failed\",\n\t\"run_canceled\"\n]);\nconst WorkflowRunSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable(),\n\tparentWorkflowRunId: z.string().nullable()\n});\nconst WorkflowRunRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowSlug: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\ttrigger: WorkflowRunTriggerSchema,\n\ttriggeredAt: z.string(),\n\tstartedAt: z.string().nullable(),\n\tfinishedAt: z.string().nullable(),\n\tsourceKind: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttriggerRunId: z.string().nullable(),\n\tattachmentId: z.string().nullable(),\n\tparentWorkflowRunId: z.string().nullable(),\n\tparentSpanId: z.string().nullable(),\n\tinput: z.unknown().nullable(),\n\toutput: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst WorkflowRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: WorkflowRunStatusSchema.optional(),\n\ttrigger: WorkflowRunTriggerSchema.optional()\n});\nconst WorkflowRunListResponseSchema = z.object({\n\titems: z.array(WorkflowRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst WorkflowRunDetailIncludeSchema = z.enum([\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\",\n\t\"children\"\n]);\nconst WorkflowRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$2 = [\n\t\"trigger\",\n\t\"steps\",\n\t\"trace\"\n];\nfunction parseWorkflowRunDetailInclude(include) {\n\tif (include === void 0) return [...DEFAULT_DETAIL_INCLUDE$2];\n\tconst trimmed = include.trim();\n\tif (trimmed.length === 0 || trimmed === \"none\") return [];\n\tconst parsed = trimmed.split(\",\").map((part) => part.trim()).filter((part) => WorkflowRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$2];\n}\nconst TriggerRunDetailSchema = z.object({\n\tid: z.string(),\n\ttriggerId: z.string(),\n\tattachmentSlug: z.string().nullable(),\n\ttriggerType: z.enum([\n\t\t\"cron\",\n\t\t\"webhook\",\n\t\t\"poll\"\n\t]),\n\tsourcePath: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst WorkflowStepRunSchema = z.object({\n\tid: z.string(),\n\tactionKey: z.string(),\n\t/** Step input when recorded; `null` for legacy events that only stored output. */\n\tinput: z.unknown().nullable(),\n\toutput: z.unknown(),\n\tcompletedAt: z.string()\n});\n/** Marker for durable `step_completed` event payloads that include input + output. */\nconst STEP_COMPLETED_ENVELOPE_TYPE = \"keystroke.step-completed.v1\";\nconst StepCompletedEnvelopeSchema = z.object({\n\ttype: z.literal(STEP_COMPLETED_ENVELOPE_TYPE),\n\tinput: z.unknown(),\n\toutput: z.unknown()\n});\nfunction isStepCompletedEnvelope(value) {\n\treturn StepCompletedEnvelopeSchema.safeParse(value).success;\n}\nfunction stepCompletedOutput(data) {\n\treturn isStepCompletedEnvelope(data) ? data.output : data;\n}\nfunction stepCompletedInput(data) {\n\treturn isStepCompletedEnvelope(data) ? data.input : null;\n}\nfunction wrapStepCompletedData(input, output) {\n\treturn {\n\t\ttype: STEP_COMPLETED_ENVELOPE_TYPE,\n\t\tinput,\n\t\toutput\n\t};\n}\nconst TraceTriggerSummarySchema = z.object({\n\ttriggerType: z.string(),\n\ttriggerRunId: z.string(),\n\tworkflowSlug: z.string().optional(),\n\tagentSlug: z.string().optional(),\n\tattachmentId: z.string().nullable().optional(),\n\tattachmentSlug: z.string().nullable().optional(),\n\troute: z.string().optional(),\n\tsourcePath: z.string().nullable().optional()\n}).nullable();\nconst TraceGatewaySummarySchema = z.object({\n\tgatewayAttachmentId: z.string(),\n\tgatewayAttachmentKey: z.string(),\n\tthreadId: z.string().optional(),\n\tchannelId: z.string().optional(),\n\tmode: z.string().optional()\n}).nullable();\nconst TraceSpanSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tkind: z.string(),\n\trefId: z.string(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tmetadata: z.unknown().nullable(),\n\terror: z.unknown().nullable()\n});\nconst TraceLogSchema = z.object({\n\tid: z.string(),\n\ttraceId: z.string(),\n\tspanId: z.string(),\n\tseq: z.number(),\n\tlevel: z.string(),\n\tmessage: z.string(),\n\tdata: z.unknown().nullable(),\n\tsource: z.string(),\n\tcreatedAt: z.string()\n});\nconst TraceResponseSchema = z.object({\n\ttraceId: z.string(),\n\ttrigger: TraceTriggerSummarySchema,\n\tgateway: TraceGatewaySummarySchema,\n\tspans: z.array(TraceSpanSchema),\n\tlogs: z.array(TraceLogSchema)\n});\nconst WorkflowHookStatusSchema = z.enum([\"waiting\", \"resumed\"]);\nconst WorkflowHookSummarySchema = z.object({\n\ttoken: z.string(),\n\tcorrelationId: z.string(),\n\tstatus: WorkflowHookStatusSchema,\n\tcreatedAt: z.string(),\n\tresumeUrl: z.string().nullable()\n});\nconst WorkflowRunHooksResponseSchema = z.object({ items: z.array(WorkflowHookSummarySchema) });\n/** Light parent→child link (always present; used when `children` is not in include). */\nconst WorkflowChildRunLinkSchema = z.object({\n\tkind: z.enum([\"workflow\", \"agent\"]),\n\trunId: z.string(),\n\tworkflowSlug: z.string().optional(),\n\tagentSlug: z.string().optional(),\n\tcorrelationId: z.string(),\n\tstatus: z.string()\n});\nconst WorkflowRunChildDetailSchema = z.lazy(() => z.object({\n\tkind: z.literal(\"workflow\"),\n\tcorrelationId: z.string(),\n\trun: WorkflowRunRecordSchema,\n\ttrigger: TriggerRunDetailSchema.nullable(),\n\tsteps: z.array(WorkflowStepRunSchema),\n\ttrace: TraceResponseSchema.nullable(),\n\tchildren: z.array(WorkflowRunChildSchema),\n\thooks: z.array(WorkflowHookSummarySchema)\n}));\nconst WorkflowRunChildSchema = z.lazy(() => z.union([WorkflowChildRunLinkSchema, WorkflowRunChildDetailSchema]));\nconst WorkflowRunDetailResponseSchema = z.object({\n\trun: WorkflowRunRecordSchema,\n\ttrigger: TriggerRunDetailSchema.nullable(),\n\tsteps: z.array(WorkflowStepRunSchema),\n\ttrace: TraceResponseSchema.nullable(),\n\tchildren: z.array(WorkflowRunChildSchema),\n\thooks: z.array(WorkflowHookSummarySchema)\n});\n//#endregion\n//#region src/schemas/agent-sessions.ts\nconst AgentSessionStatusSchema = z.enum([\n\t\"running\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n]);\nconst AgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttitle: z.string().nullable(),\n\tranByUserName: z.string().nullable(),\n\tgatewayPlatform: z.string().nullable(),\n\ttriggerType: AgentTriggerTypeSchema.nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tmessageCount: z.number()\n});\nconst AgentSessionRecordSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string(),\n\tstatus: AgentSessionStatusSchema,\n\tsource: RunSourceKindSchema,\n\tsourceId: z.string().nullable(),\n\ttitle: z.string().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tparentSpanId: z.string().nullable(),\n\tmessageCount: z.number(),\n\terror: z.unknown().nullable()\n});\nconst AgentSessionListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\tstatus: AgentSessionStatusSchema.optional(),\n\tsource: RunSourceKindSchema.optional()\n});\nconst AgentSessionListResponseSchema = z.object({\n\titems: z.array(AgentSessionSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst AgentSessionDetailIncludeSchema = z.enum([\n\t\"gateway\",\n\t\"messages\",\n\t\"events\",\n\t\"trace\"\n]);\nconst AgentSessionDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE$1 = [\n\t\"gateway\",\n\t\"messages\",\n\t\"trace\"\n];\nfunction parseAgentSessionDetailInclude(include) {\n\tif (include === void 0) return [...DEFAULT_DETAIL_INCLUDE$1];\n\tconst trimmed = include.trim();\n\tif (trimmed.length === 0 || trimmed === \"none\") return [];\n\tconst parsed = trimmed.split(\",\").map((part) => part.trim()).filter((part) => AgentSessionDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE$1];\n}\nconst GatewaySessionDetailSchema = z.object({\n\tthreadId: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string().nullable()\n});\nconst AgentEventSchema = z.object({\n\tid: z.string(),\n\tsessionId: z.string(),\n\tseq: z.number(),\n\teventType: z.string(),\n\tpayload: z.unknown(),\n\tcreatedAt: z.string()\n});\nconst AgentSessionDetailResponseSchema = z.object({\n\tsession: AgentSessionRecordSchema,\n\tactiveRunId: z.string().nullable().default(null),\n\tgateway: GatewaySessionDetailSchema.nullable(),\n\tmessages: z.array(z.record(z.string(), z.unknown())),\n\tevents: z.array(AgentEventSchema),\n\t/**\n\t* Sanitized context-compaction markers, populated alongside `messages`.\n\t* A cheap indexed lookup (session_id + event_type) — never the full event\n\t* log. Defaulted so older servers remain compatible.\n\t*/\n\tcompactionEvents: z.array(HistoryAgentCompactionEventSchema).default([]),\n\tpromptFinishEvents: z.array(HistoryAgentPromptFinishEventSchema).default([]),\n\ttrace: TraceResponseSchema.nullable()\n});\n//#endregion\n//#region src/schemas/platform-agent.ts\n/**\n* Org-scoped platform-agent (`/chat`) wire shapes.\n*\n* Routes:\n* - `GET /api/platform-agent/sessions`\n* - `GET /api/platform-agent/sessions/:sessionId`\n* - `POST /api/platform-agent/prompt` → enqueue (lazy-create)\n* - `POST /api/platform-agent/sessions/:sessionId/cancel`\n* - `GET /api/platform-agent/runs/:runId/stream?sessionId=&startIndex=`\n* - `GET /api/platform-agent/sessions/:sessionId/stream?startIndex=`\n* - `POST /api/platform-agent/attachments/presign`\n* - `GET /api/platform-agent/attachments/:projectId/*`\n*/\n/**\n* Session lifecycle for reconnect / cancel.\n* Matches the chat UI: no idle — sessions are created already running.\n*/\nconst PlatformAgentSessionStatuses = [\n\t\"running\",\n\t\"completed\",\n\t\"failed\",\n\t\"canceled\"\n];\nconst PlatformAgentSessionStatusSchema = z.enum(PlatformAgentSessionStatuses);\n/** Gateway model id (`vendor/model-id`). Catalog membership is checked at the route. */\nconst PlatformAgentModelIdSchema = z.string().min(1).regex(/^[^/\\s]+\\/[^/\\s].*$/, \"model must be vendor/model-id\");\n/** Text part — required for AI SDK `useChat` / ChatTransport. */\nconst PlatformAgentTextPartSchema = z.object({\n\ttype: z.literal(\"text\"),\n\ttext: z.string()\n}).passthrough();\n/**\n* Other AI SDK UIMessage parts (tool-*, step-*, reasoning, file, …).\n* Attachment `file` parts are allowed in the durable transcript.\n*/\nconst PlatformAgentGenericPartSchema = z.object({ type: z.string().min(1) }).passthrough();\nconst PlatformAgentMessagePartSchema = z.union([PlatformAgentTextPartSchema, PlatformAgentGenericPartSchema]);\n/** Durable conversation checkpoint message (AI SDK UIMessage-shaped). */\nconst PlatformAgentTranscriptMessageSchema = z.object({\n\tid: z.string().min(1),\n\trole: z.enum([\n\t\t\"system\",\n\t\t\"user\",\n\t\t\"assistant\"\n\t]),\n\tparts: z.array(PlatformAgentMessagePartSchema),\n\t/** Event-row timestamp when the message was appended (ISO). */\n\tcreatedAt: z.string().datetime().optional(),\n\t/**\n\t* Wall-clock work duration for an assistant turn, derived from matching\n\t* `agent_start` → `agent_end` events (milliseconds).\n\t*/\n\tworkedMs: z.number().int().nonnegative().optional()\n}).passthrough();\nconst PlatformAgentTranscriptSchema = z.array(PlatformAgentTranscriptMessageSchema);\nfunction parsePlatformAgentTranscript(input) {\n\treturn PlatformAgentTranscriptSchema.parse(input);\n}\nconst PlatformAgentPromptInputSchema = z.object({\n\tmessage: z.string().default(\"\"),\n\tprojectId: z.string().min(1),\n\tmodel: PlatformAgentModelIdSchema,\n\tsessionId: z.string().min(1).optional(),\n\tfiles: z.array(ChatAttachmentInputSchema).max(5).optional()\n}).strict().refine((data) => data.message.trim().length > 0 || (data.files?.length ?? 0) > 0, { message: \"message or files is required\" });\nfunction parsePlatformAgentPromptInput(input) {\n\treturn PlatformAgentPromptInputSchema.parse(input);\n}\n/** Same enqueue response as project agents — keep one wire shape. */\nconst PlatformAgentPromptResponseSchema = QueuedAgentPromptResponseSchema;\nconst PlatformAgentCancelResponseSchema = z.object({ ok: z.literal(true) });\nconst PlatformAgentStreamQuerySchema = z.object({\n\tstartIndex: z.coerce.number().int().min(0).optional().default(0),\n\t/** Required on run streams so the handler can resolve the owned session / project. */\n\tsessionId: z.string().min(1).optional()\n});\nconst PlatformAgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tstatus: PlatformAgentSessionStatusSchema,\n\ttitle: z.string().nullable(),\n\tmodel: z.string().nullable(),\n\tactiveRunId: z.string().nullable(),\n\tlastDraftCommitSha: z.string().nullable(),\n\tmessageCount: z.number().int().nonnegative(),\n\tcreatedAt: z.string().datetime(),\n\tupdatedAt: z.string().datetime()\n});\nconst PlatformAgentSessionListResponseSchema = z.object({ items: z.array(PlatformAgentSessionSummarySchema) });\nconst PlatformAgentSessionDetailResponseSchema = z.object({\n\tsession: PlatformAgentSessionSummarySchema.extend({ error: z.string().nullable() }),\n\tactiveRunId: z.string().nullable().default(null),\n\tmessages: PlatformAgentTranscriptSchema,\n\tcompactionEvents: z.array(HistoryAgentCompactionEventSchema).default([])\n});\n//#endregion\n//#region src/schemas/gateway-attachments.ts\nconst SlackGatewayModeSchema = z.enum([\n\t\"mention\",\n\t\"channel\",\n\t\"dm\"\n]);\nconst GatewayAttachmentSourceSchema = z.object({\n\tkind: z.literal(\"slack\"),\n\tmode: SlackGatewayModeSchema,\n\tcredentialKey: z.string(),\n\tchannelIds: z.array(z.string()).optional(),\n\tsubscribeOnMention: z.boolean()\n});\nconst GatewayAttachmentRecordSchema = z.object({\n\tid: z.string(),\n\tkey: z.string(),\n\tagentKey: z.string(),\n\tchannelId: z.string(),\n\tteamId: z.string().nullable().optional(),\n\tplatform: z.string(),\n\tsource: GatewayAttachmentSourceSchema,\n\tregisteredAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst GatewayAttachmentListResponseSchema = z.object({ attachments: z.array(GatewayAttachmentRecordSchema) });\nconst UpsertGatewayAttachmentBodySchema = z.object({\n\tagentKey: z.string().min(1),\n\tteamId: z.string().min(1).optional(),\n\tmode: SlackGatewayModeSchema.optional(),\n\tsubscribeOnMention: z.boolean().optional()\n});\nconst AgentListItemSchema = z.object({\n\tkey: z.string(),\n\tname: z.string().optional(),\n\troute: z.string()\n});\nconst AgentListResponseSchema = z.object({ agents: z.array(AgentListItemSchema) });\n//#endregion\n//#region src/schemas/workflow-deployments.ts\nconst WorkflowSubscriptionRecordSchema = z.object({\n\tid: z.string(),\n\tworkflowKey: z.string(),\n\tuserId: z.string(),\n\tenabled: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string()\n});\nconst WorkflowSubscriptionListResponseSchema = z.object({ subscriptions: z.array(WorkflowSubscriptionRecordSchema) });\nconst UpsertWorkflowSubscriptionBodySchema = z.object({\n\tuserId: z.string().min(1).optional(),\n\tenabled: z.boolean().optional()\n});\nconst CredentialInstanceRecordSchema = z.object({\n\tid: z.string(),\n\tappSlug: z.string(),\n\tslug: z.string(),\n\tname: z.string().nullable(),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable(),\n\tlabel: z.string().nullable(),\n\tisDefault: z.boolean(),\n\tauthKind: CredentialAuthKindSchema\n});\nconst CredentialInstanceListResponseSchema = z.object({ instances: z.array(CredentialInstanceRecordSchema) });\nconst CreateCredentialInstanceBodySchema = z.object({\n\tkey: z.string().min(1),\n\tslug: z.string().min(1).optional(),\n\tname: z.string().nullable().optional(),\n\tscopeType: CredentialScopeTypeSchema,\n\tscopeId: z.string().nullable().optional(),\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" })\n});\nconst UpdateCredentialInstanceBodySchema = z.object({\n\tslug: z.string().min(1).optional(),\n\tname: z.string().nullable().optional(),\n\tlabel: z.string().nullable().optional(),\n\tisDefault: z.boolean().optional(),\n\tvalue: z.record(z.string(), z.unknown()).refine((value) => Object.keys(value).length > 0, { message: \"value must be a non-empty object\" }).optional()\n});\n//#endregion\n//#region src/schemas/trigger-runs.ts\nconst TriggerRunTypeSchema = z.enum([\n\t\"cron\",\n\t\"webhook\",\n\t\"poll\"\n]);\nconst TriggerRunOutcomeSchema = z.enum([\n\t\"dispatched\",\n\t\"skipped\",\n\t\"failed\"\n]);\nconst TriggerRunReasonSchema = z.enum([\n\t\"filter_rejected\",\n\t\"transform_undefined\",\n\t\"invalid_payload\",\n\t\"source_error\",\n\t\"handler_error\"\n]);\nconst TriggerRunWorkflowSummarySchema = z.object({\n\tid: z.string(),\n\tstatus: WorkflowRunStatusSchema,\n\tworkflowSlug: z.string()\n});\nconst TriggerRunAgentSessionSummarySchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunSummarySchema = z.object({\n\tid: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\ttriggeredAt: z.string(),\n\tsourcePath: z.string().nullable(),\n\toutcome: TriggerRunOutcomeSchema,\n\treason: TriggerRunReasonSchema.nullable(),\n\tdetail: z.string().nullable(),\n\t/** Workflow runs dispatched by this fire (fan-out → one per matched workflow attachment). */\n\tworkflowRuns: z.array(TriggerRunWorkflowSummarySchema),\n\t/** Agent sessions dispatched by this fire (fan-out → one per matched agent attachment). */\n\tagentSessions: z.array(TriggerRunAgentSessionSummarySchema)\n});\nconst TriggerRunRecordSchema = z.object({\n\tid: z.string(),\n\ttriggerId: z.string(),\n\tattachmentSlug: z.string(),\n\ttriggerType: TriggerRunTypeSchema,\n\tsourcePath: z.string().nullable(),\n\toutcome: TriggerRunOutcomeSchema,\n\treason: TriggerRunReasonSchema.nullable(),\n\tdetail: z.string().nullable(),\n\tpayload: z.unknown().nullable(),\n\ttriggeredAt: z.string()\n});\nconst TriggerRunListQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(100).optional().default(20),\n\tcursor: z.string().min(1).optional(),\n\ttriggerType: TriggerRunTypeSchema.optional(),\n\toutcome: TriggerRunOutcomeSchema.optional()\n});\nconst TriggerRunListResponseSchema = z.object({\n\titems: z.array(TriggerRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst TriggerRunDetailIncludeSchema = z.enum([\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n]);\nconst TriggerRunDetailQuerySchema = z.object({ include: z.string().optional() });\nconst DEFAULT_DETAIL_INCLUDE = [\n\t\"workflows\",\n\t\"agents\",\n\t\"trace\"\n];\nfunction parseTriggerRunDetailInclude(include) {\n\tif (!include?.trim()) return [...DEFAULT_DETAIL_INCLUDE];\n\tconst parsed = include.split(\",\").map((part) => part.trim()).filter((part) => TriggerRunDetailIncludeSchema.options.includes(part));\n\treturn parsed.length > 0 ? parsed : [...DEFAULT_DETAIL_INCLUDE];\n}\nconst TriggerRunAgentSessionDetailSchema = z.object({\n\tid: z.string(),\n\tagentSlug: z.string()\n});\nconst TriggerRunDetailResponseSchema = z.object({\n\trun: TriggerRunRecordSchema,\n\tworkflowRuns: z.array(WorkflowRunSummarySchema),\n\tagentSessions: z.array(TriggerRunAgentSessionDetailSchema),\n\ttrace: TraceResponseSchema.nullable()\n});\n//#endregion\n//#region src/schemas/triggers.ts\nconst TriggerTypeSchema = z.enum([\n\t\"webhook\",\n\t\"poll\",\n\t\"cron\"\n]);\nconst TriggerTargetKindSchema = z.enum([\"workflow\", \"agent\"]);\nconst TriggerStatusSchema = z.enum([\"active\", \"disabled\"]);\nconst TriggerAttachmentStatusSchema = z.enum([\"active\", \"disabled\"]);\nconst TriggerListItemSchema = z.object({\n\tslug: z.string(),\n\tname: z.string().optional(),\n\tdescription: z.string().optional(),\n\ttype: TriggerTypeSchema,\n\tstatus: TriggerStatusSchema.optional(),\n\tschedule: z.string().nullable().optional(),\n\tsourcePath: z.string().optional(),\n\troute: z.string().optional(),\n\twebhookUrl: z.string().url().optional(),\n\ttargetKind: TriggerTargetKindSchema,\n\tworkflowKey: z.string().optional(),\n\tagentKey: z.string().optional()\n});\nconst TriggerListResponseSchema = z.object({ triggers: z.array(TriggerListItemSchema) });\nconst TriggerListQuerySchema = z.object({ endpoint: z.string().min(1).optional() });\nconst TriggerDetailResponseSchema = TriggerListItemSchema;\nconst TriggerAssignmentSchema = z.object({\n\tkind: TriggerTargetKindSchema,\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string(),\n\tattachmentId: z.string(),\n\tattachmentSlug: z.string(),\n\tstatus: TriggerAttachmentStatusSchema,\n\tdisabledAt: z.string().nullable()\n});\n//#endregion\n//#region src/schemas/workspace-triggers.ts\n/** Status of the downstream run/session a dispatched fire produced. */\nconst WorkspaceTriggerRunStatusSchema = z.enum([\n\t\"completed\",\n\t\"running\",\n\t\"failed\"\n]);\n/**\n* Categorical reason a fire was recorded but produced no downstream run. These map\n* from the persisted `trigger_runs.reason` enum onto the labels the UI renders.\n*/\nconst WorkspaceTriggerSkipReasonSchema = z.enum([\n\t\"filtered\",\n\t\"no_new_data\",\n\t\"transform_undefined\",\n\t\"payload_mismatch\"\n]);\n/**\n* A single downstream run/session a dispatched fire produced. A fan-out fire can\n* dispatch several of these (multiple workflows and/or agents off one source event).\n*/\nconst WorkspaceTriggerRunTargetSchema = z.discriminatedUnion(\"kind\", [z.object({\n\tkind: z.literal(\"workflow\"),\n\trunId: z.string(),\n\tworkflowId: z.string(),\n\tstatus: WorkspaceTriggerRunStatusSchema,\n\tname: z.string()\n}), z.object({\n\tkind: z.literal(\"agent\"),\n\tsessionId: z.string(),\n\tagentId: z.string(),\n\tstatus: WorkspaceTriggerRunStatusSchema,\n\tname: z.string()\n})]);\n/**\n* Outcome of a single trigger fire — drives the run-history row presentation. Every\n* recorded fire either dispatched one or more workflow/agent targets, was skipped by\n* trigger logic, or failed before any target ran.\n*/\nconst WorkspaceTriggerRunOutcomeSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"dispatched\"),\n\t\ttargets: z.array(WorkspaceTriggerRunTargetSchema)\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"skipped\"),\n\t\treason: WorkspaceTriggerSkipReasonSchema,\n\t\t/** One-line Zod issue summary when reason is payload_mismatch. */\n\t\tdetail: z.string().nullable().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"failed\"),\n\t\terror: z.string()\n\t})\n]);\nconst WorkspaceTriggerSummarySchema = z.object({\n\t/** `triggers.id` UUID for the trigger row. */\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().min(1),\n\ttype: TriggerTypeSchema,\n\tstatus: TriggerStatusSchema,\n\tprojectId: z.string(),\n\tprojectName: z.string(),\n\t/** Webhook ingress URL (webhook triggers only). */\n\twebhookUrl: z.string().nullable(),\n\t/** Cron expression or poll cadence label (cron/poll triggers only). */\n\tschedule: z.string().nullable(),\n\t/** IANA timezone for schedule wall-clock fields. Null when omitted (evaluates in UTC). */\n\ttimezone: z.string().nullable(),\n\t/** ISO timestamptz of the next scheduled fire. Null for webhooks / unset. */\n\tnextRunAt: z.string().nullable(),\n\t/** Workflows + agents currently bound to this source. */\n\tassignments: z.array(TriggerAssignmentSchema),\n\tlastFiredAt: z.string().nullable(),\n\tfireCount: z.number().int().nonnegative(),\n\tcreatedAt: z.string()\n});\nconst WorkspaceTriggerDetailSchema = WorkspaceTriggerSummarySchema.extend({ \n/** Source module file path, relative to the project root. */\nsourcePath: z.string() });\nconst WorkspaceTriggerListResponseSchema = z.array(WorkspaceTriggerSummarySchema);\nconst WorkspaceTriggerRunSummarySchema = z.object({\n\tid: z.string(),\n\ttriggerType: TriggerTypeSchema,\n\ttriggeredAt: z.string(),\n\t/** Poll/webhook source path or endpoint that produced the fire. */\n\tsourcePath: z.string().nullable(),\n\toutcome: WorkspaceTriggerRunOutcomeSchema\n});\nconst WorkspaceTriggerRunListResponseSchema = z.object({\n\titems: z.array(WorkspaceTriggerRunSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nconst WorkspaceTriggerFileSchema = z.object({\n\tpath: z.string(),\n\tcontents: z.string()\n});\n/** Default gateway model for trigger overviews — a cheap model, same as session-title generation. */\nconst DEFAULT_TRIGGER_OVERVIEW_MODEL = \"deepseek/deepseek-v4-flash\";\n/** Whether the LLM overview is still being produced, finished, or errored. */\nconst WorkspaceTriggerOverviewStatusSchema = z.enum([\n\t\"generating\",\n\t\"ready\",\n\t\"failed\"\n]);\n/** LLM-generated markdown overview envelope served to the web dashboard. */\nconst WorkspaceTriggerOverviewSchema = z.object({\n\tstatus: WorkspaceTriggerOverviewStatusSchema,\n\tmarkdown: z.string(),\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Inputs the worker feeds the LLM to generate a trigger overview. */\nconst TriggerOverviewInputSchema = z.object({\n\tname: z.string(),\n\tdescription: z.string().nullable(),\n\ttype: TriggerTypeSchema,\n\tschedule: z.string().nullable(),\n\t/** IANA timezone for schedule wall-clock fields. Null/omitted → UTC. */\n\ttimezone: z.string().nullable().optional(),\n\tsourcePath: z.string(),\n\tsourceContents: z.string(),\n\tassignments: z.array(TriggerAssignmentSchema)\n});\n/** Queue payload the platform enqueues for the worker `trigger-overview` job. */\nconst TriggerOverviewJobPayloadSchema = z.object({\n\ttriggerId: z.string(),\n\tprojectId: z.string(),\n\ttriggerHash: z.string(),\n\tmodel: z.string(),\n\tinput: TriggerOverviewInputSchema\n});\nconst TriggerAttachmentUpdateRequestSchema = z.object({ enabled: z.boolean() });\nconst TriggerAttachmentUpdateResponseSchema = WorkspaceTriggerDetailSchema;\n//#endregion\n//#region src/schemas/trigger-invoke.ts\n/** Body for `POST /api/triggers/:triggerId/invoke`. `input` is webhook-only. */\nconst TriggerInvokeRequestSchema = z.object({\n\tinput: z.unknown().optional(),\n\tworkflow: z.string().min(1).optional(),\n\tagent: z.string().min(1).optional()\n});\n/** One attachment that will fire from this invoke (workflow runs are created later). */\nconst TriggerInvokeTargetSchema = z.object({\n\tkind: TriggerTargetKindSchema,\n\tslug: z.string().min(1),\n\tattachmentSlug: z.string().min(1)\n});\n/**\n* `POST /api/triggers/:triggerId/invoke` — 202 Accepted.\n* `runId` is the trigger-run / trigger-job id (not a workflow run id). Use\n* `triggers runs get` after dispatch to resolve `workflowRuns` / `agentSessions`.\n*/\nconst TriggerInvokeResponseSchema = z.object({\n\trunId: z.string().min(1),\n\ttriggerSlug: z.string().min(1),\n\ttargets: z.array(TriggerInvokeTargetSchema)\n});\n/** One attachment's invoke-form metadata for the dashboard. */\nconst TriggerInvokeAttachmentSchema = z.object({\n\tattachmentSlug: z.string().min(1),\n\tkind: TriggerTargetKindSchema,\n\ttargetSlug: z.string().min(1),\n\ttargetName: z.string().min(1),\n\tenabled: z.boolean(),\n\t/** Webhook attachment JSON Schema used to drive the invoke form. */\n\trequestSchema: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* `GET /api/triggers/:triggerId/invoke-inputs` — form metadata for the dashboard.\n* Webhook attachments carry `requestSchema`; cron carries read-only `staticPayload`.\n*/\nconst TriggerInvokeInputsSchema = z.object({\n\ttype: TriggerTypeSchema,\n\tattachments: z.array(TriggerInvokeAttachmentSchema),\n\t/** Cron source static payload — display only; never overridden on invoke. */\n\tstaticPayload: z.unknown().optional()\n});\n/**\n* Envelope stashed on a `kind: \"trigger\"` job's `payload` for manual cron/poll invokes.\n* Attachment narrowing only — no input override (cron always uses its static payload).\n*/\nconst TriggerManualInvokeJobPayloadSchema = z.object({\n\tmanual: z.literal(true),\n\tattachments: z.array(z.string().min(1)).optional()\n});\nfunction parseTriggerManualInvokeJobPayload(payload) {\n\tconst parsed = TriggerManualInvokeJobPayloadSchema.safeParse(payload);\n\treturn parsed.success ? parsed.data : void 0;\n}\n//#endregion\n//#region src/schemas/members.ts\nconst OrganizationMemberRoleSchema = z.enum([\n\t\"owner\",\n\t\"admin\",\n\t\"builder\"\n]);\nconst OrganizationMemberStatusSchema = z.enum([\n\t\"invited\",\n\t\"active\",\n\t\"rejected\",\n\t\"suspended\"\n]);\nconst InvitableOrganizationMemberRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst isoDateTime$5 = z.string().datetime();\nconst OrganizationMemberSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: OrganizationMemberRoleSchema,\n\tstatus: OrganizationMemberStatusSchema,\n\tavatarUrl: z.string().optional(),\n\tjoinedAt: isoDateTime$5.optional(),\n\tlastActiveAt: isoDateTime$5.nullable().optional()\n});\nconst ListOrganizationMembersResponseSchema = z.array(OrganizationMemberSchema);\nconst ListOrganizationMembersPageQuerySchema = z.object({\n\tlimit: z.coerce.number().int().min(1).max(200).optional(),\n\tcursor: z.string().min(1).optional()\n});\nconst ListOrganizationMembersPageResponseSchema = z.object({\n\titems: z.array(OrganizationMemberSchema),\n\tnextCursor: z.string().nullable()\n});\nconst InviteOrganizationMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: InvitableOrganizationMemberRoleSchema\n});\nconst InviteOrganizationMemberResultStatusSchema = z.enum([\n\t\"sent\",\n\t\"already_member\",\n\t\"pending\",\n\t\"invalid\"\n]);\nconst InviteOrganizationMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteOrganizationMemberResultStatusSchema,\n\tinvitationId: z.string().optional()\n});\nconst InviteOrganizationMembersResponseSchema = z.array(InviteOrganizationMemberResultSchema);\nconst UpdateOrganizationMemberRequestSchema = z.object({ role: InvitableOrganizationMemberRoleSchema });\nconst UpdateOrganizationMemberResponseSchema = OrganizationMemberSchema;\nconst OrganizationInvitationSchema = z.object({\n\tid: z.string(),\n\torganizationName: z.string(),\n\torganizationSlug: OrganizationSlugSchema,\n\tinvitedByName: z.string().optional(),\n\tinvitedByEmail: z.string().email().optional(),\n\trole: OrganizationMemberRoleSchema\n});\nconst ListOrganizationInvitationsResponseSchema = z.array(OrganizationInvitationSchema);\nconst AcceptOrganizationInvitationResponseSchema = UserOrganizationSchema;\nconst DeclineOrganizationInvitationResponseSchema = z.object({ success: z.literal(true) });\n/** Web path to auto-accept an invitation after sign-in (used in invite emails). */\nfunction organizationInvitationAcceptPath(invitationId) {\n\treturn `/organization/invitations?${new URLSearchParams({ accept: invitationId }).toString()}`;\n}\n//#endregion\n//#region src/schemas/api-keys.ts\nconst isoDateTime$4 = z.string().datetime();\nconst ApiKeyCreatorSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\temail: z.string().email().optional(),\n\tavatarUrl: z.string().optional(),\n\t/** True when the creator user row no longer exists. */\n\tdeleted: z.boolean().optional()\n});\nconst ApiKeySummarySchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tkeyPreview: z.string(),\n\tcreatedAt: isoDateTime$4,\n\tcreatedBy: ApiKeyCreatorSchema,\n\tisCreatedByCurrentUser: z.boolean()\n});\nconst ListApiKeysResponseSchema = z.array(ApiKeySummarySchema);\nconst CreateApiKeyRequestSchema = z.object({ name: z.string().trim().min(1).max(128) });\nconst CreateApiKeyResponseSchema = ApiKeySummarySchema.extend({ secret: z.string() });\n//#endregion\n//#region src/schemas/managed-service-credentials.ts\nconst isoDateTime$3 = z.string().datetime();\nconst ManagedServiceKindSchema = z.enum([\"llm\"]);\nconst LLM_PROVIDER_SLUGS = [\n\t\"openai\",\n\t\"anthropic\",\n\t\"google\",\n\t\"groq\",\n\t\"xai\"\n];\nconst LlmProviderSlugSchema = z.enum(LLM_PROVIDER_SLUGS);\nconst ManagedServiceCredentialSchema = z.object({\n\tid: z.string(),\n\tkind: ManagedServiceKindSchema,\n\tprovider: z.string(),\n\tkeyPreview: z.string(),\n\tcreatedAt: isoDateTime$3,\n\tupdatedAt: isoDateTime$3,\n\tcreatedBy: ApiKeyCreatorSchema,\n\tisCreatedByCurrentUser: z.boolean()\n});\nconst ListManagedServiceCredentialsResponseSchema = z.array(ManagedServiceCredentialSchema);\nconst ConnectManagedServiceCredentialRequestSchema = z.object({\n\tkind: ManagedServiceKindSchema.default(\"llm\"),\n\tprovider: z.string().trim().min(1),\n\tapiKey: z.string().trim().min(1)\n});\nconst UpdateManagedServiceCredentialRequestSchema = z.object({ apiKey: z.string().trim().min(1) });\nfunction isLlmProviderSlug(value) {\n\treturn LLM_PROVIDER_SLUGS.includes(value);\n}\n//#endregion\n//#region src/schemas/project-members.ts\nconst ProjectUserRoleSchema = z.enum([\"admin\", \"builder\"]);\nconst ProjectInvitePermissionSchema = z.enum([\"admin\", \"all\"]);\nconst ProjectMemberStatusSchema = z.enum([\"active\", \"invited\"]);\nconst isoDateTime$2 = z.string().datetime();\nconst ProjectMemberSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tname: z.string(),\n\temail: z.string().email(),\n\trole: ProjectUserRoleSchema,\n\tstatus: ProjectMemberStatusSchema,\n\timage: z.string().nullable(),\n\tcreatedAt: isoDateTime$2,\n\tisCurrentUser: z.boolean().optional()\n});\nconst ListProjectMembersResponseSchema = z.array(ProjectMemberSchema);\nconst InviteProjectMembersRequestSchema = z.object({\n\temails: z.array(z.string().trim().email()).min(1),\n\trole: ProjectUserRoleSchema\n});\nconst InviteProjectMemberResultStatusSchema = z.enum([\n\t\"added\",\n\t\"already_member\",\n\t\"not_org_member\",\n\t\"invalid\"\n]);\nconst InviteProjectMemberResultSchema = z.object({\n\temail: z.string(),\n\tstatus: InviteProjectMemberResultStatusSchema\n});\nconst InviteProjectMembersResponseSchema = z.array(InviteProjectMemberResultSchema);\nconst UpdateProjectMemberRequestSchema = z.object({ role: ProjectUserRoleSchema });\nconst UpdateProjectMemberResponseSchema = ProjectMemberSchema;\nconst ProjectSettingsSchema = z.object({\n\tdescription: z.string(),\n\tdefaultRole: ProjectUserRoleSchema,\n\tinvitePermission: ProjectInvitePermissionSchema\n});\nconst UpdateProjectSettingsRequestSchema = z.object({\n\tdescription: z.string().optional(),\n\tdefaultRole: ProjectUserRoleSchema.optional(),\n\tinvitePermission: ProjectInvitePermissionSchema.optional()\n}).refine((data) => data.description !== void 0 || data.defaultRole !== void 0 || data.invitePermission !== void 0, { message: \"At least one field is required\" });\nconst ProjectSettingsResponseSchema = ProjectSettingsSchema;\n//#endregion\n//#region src/schemas/user-avatar.ts\n/** Custom avatar override; null means fall back to OAuth `users.image`. */\nconst UserAvatarSchema = z.object({ url: z.url().nullable() });\nconst UserAvatarPatchSchema = z.object({ \n/** Storage key returned from presign; null removes the custom override. */\nstorageKey: z.string().min(1).nullable() });\nconst PresignUserAvatarRequestSchema = z.object({ contentType: z.string().trim().min(1) });\nconst PresignUserAvatarResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\n//#endregion\n//#region src/schemas/app-logo.ts\n/** Presign a public upload for a custom app logo (before or during create). */\nconst PresignCustomAppLogoRequestSchema = z.object({ contentType: z.string().trim().min(1) });\nconst PresignCustomAppLogoResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\n/** Finalize a uploaded logo object and return its public URL (no app row write). */\nconst FinalizeCustomAppLogoRequestSchema = z.object({ storageKey: z.string().min(1) });\nconst FinalizeCustomAppLogoResponseSchema = z.object({ logo: z.url() });\n//#endregion\n//#region src/schemas/user-preferences.ts\nconst UserInterfaceThemeSchema = z.enum([\n\t\"system\",\n\t\"light\",\n\t\"dark\"\n]);\nconst UserSurfaceContrastSchema = z.enum([\"off\", \"on\"]);\nconst UserWorkspaceLayoutModeSchema = z.enum([\"default\", \"linear\"]);\nconst UserWorkspaceFontSizeSchema = z.enum([\"default\", \"large\"]);\nconst UserSidebarNavIconVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserSidebarFooterChatRowVisibilitySchema = z.enum([\"hidden\", \"visible\"]);\nconst UserWorkspaceFavoriteKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\",\n\t\"run\"\n]);\nconst UserWorkspaceFavoriteSchema = z.object({\n\tkind: UserWorkspaceFavoriteKindSchema,\n\tresourceId: z.string().min(1)\n});\nconst UserSidebarPreferencesSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema,\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema,\n\thiddenNavItemIds: z.array(z.string()),\n\ttopNavItemOrderIds: z.array(z.string()),\n\tworkspaceNavItemOrderIds: z.array(z.string())\n});\nconst UserTimezoneSchema = z.string().refine(isValidIanaTimezone, { message: \"Invalid IANA timezone\" });\nconst UserPreferencesSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema,\n\tsurfaceContrast: UserSurfaceContrastSchema,\n\tlayoutMode: UserWorkspaceLayoutModeSchema,\n\tfontSize: UserWorkspaceFontSizeSchema,\n\tsidebar: UserSidebarPreferencesSchema,\n\tfavorites: z.array(UserWorkspaceFavoriteSchema),\n\tprojectOrderIds: z.array(z.string()),\n\tprojectDotColors: z.record(z.string(), z.string()),\n\tonboardingTabVisible: z.boolean(),\n\ttimezone: z.union([UserTimezoneSchema, z.null()])\n});\nconst UserSidebarPreferencesPatchSchema = z.object({\n\tnavIconVisibility: UserSidebarNavIconVisibilitySchema.optional(),\n\tfooterChatRowVisibility: UserSidebarFooterChatRowVisibilitySchema.optional(),\n\thiddenNavItemIds: z.array(z.string()).optional(),\n\ttopNavItemOrderIds: z.array(z.string()).optional(),\n\tworkspaceNavItemOrderIds: z.array(z.string()).optional()\n});\nconst UserPreferencesPatchSchema = z.object({\n\tinterfaceTheme: UserInterfaceThemeSchema.optional(),\n\tsurfaceContrast: UserSurfaceContrastSchema.optional(),\n\tlayoutMode: UserWorkspaceLayoutModeSchema.optional(),\n\tfontSize: UserWorkspaceFontSizeSchema.optional(),\n\tsidebar: UserSidebarPreferencesPatchSchema.optional(),\n\tfavorites: z.array(UserWorkspaceFavoriteSchema).optional(),\n\tprojectOrderIds: z.array(z.string()).optional(),\n\tprojectDotColors: z.record(z.string(), z.string()).optional(),\n\tonboardingTabVisible: z.boolean().optional(),\n\ttimezone: z.union([UserTimezoneSchema, z.null()]).optional()\n}).refine((value) => value.interfaceTheme !== void 0 || value.surfaceContrast !== void 0 || value.layoutMode !== void 0 || value.fontSize !== void 0 || value.sidebar !== void 0 || value.favorites !== void 0 || value.projectOrderIds !== void 0 || value.projectDotColors !== void 0 || value.onboardingTabVisible !== void 0 || value.timezone !== void 0, { message: \"At least one preference field is required\" });\nconst DEFAULT_USER_SIDEBAR_PREFERENCES = {\n\tnavIconVisibility: \"visible\",\n\tfooterChatRowVisibility: \"visible\",\n\thiddenNavItemIds: [\"registry\"],\n\ttopNavItemOrderIds: [],\n\tworkspaceNavItemOrderIds: []\n};\nconst DEFAULT_USER_PREFERENCES = {\n\tinterfaceTheme: \"system\",\n\tsurfaceContrast: \"on\",\n\tlayoutMode: \"linear\",\n\tfontSize: \"default\",\n\tsidebar: DEFAULT_USER_SIDEBAR_PREFERENCES,\n\tfavorites: [],\n\tprojectOrderIds: [],\n\tprojectDotColors: {},\n\tonboardingTabVisible: false,\n\ttimezone: null\n};\nfunction normalizeInterfaceTheme(value) {\n\tif (value === \"light\" || value === \"dark\") return value;\n\treturn \"system\";\n}\nfunction normalizeSurfaceContrast(value) {\n\treturn value === \"off\" ? \"off\" : \"on\";\n}\nfunction normalizeLayoutMode(value) {\n\treturn value === \"default\" ? \"default\" : \"linear\";\n}\nfunction normalizeFontSize(value) {\n\treturn value === \"large\" ? \"large\" : \"default\";\n}\nfunction normalizeStringList(value) {\n\tif (!Array.isArray(value)) return [];\n\treturn Array.from(new Set(value.filter((item) => typeof item === \"string\")));\n}\nfunction normalizeHiddenNavItemIds(value) {\n\tif (!Array.isArray(value)) return DEFAULT_USER_SIDEBAR_PREFERENCES.hiddenNavItemIds;\n\treturn normalizeStringList(value);\n}\nfunction normalizeSidebarPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_SIDEBAR_PREFERENCES;\n\tconst sidebar = value;\n\treturn {\n\t\tnavIconVisibility: sidebar.navIconVisibility === \"visible\" ? \"visible\" : \"hidden\",\n\t\tfooterChatRowVisibility: sidebar.footerChatRowVisibility === \"hidden\" ? \"hidden\" : \"visible\",\n\t\thiddenNavItemIds: normalizeHiddenNavItemIds(sidebar.hiddenNavItemIds),\n\t\ttopNavItemOrderIds: normalizeStringList(sidebar.topNavItemOrderIds),\n\t\tworkspaceNavItemOrderIds: normalizeStringList(sidebar.workspaceNavItemOrderIds)\n\t};\n}\nfunction isWorkspaceFavoriteKind(value) {\n\treturn value === \"agent\" || value === \"workflow\" || value === \"skill\" || value === \"run\";\n}\nfunction normalizeFavorites(value) {\n\tif (!Array.isArray(value)) return [];\n\tconst seenKeys = /* @__PURE__ */ new Set();\n\tconst favorites = [];\n\tfor (const item of value) {\n\t\tif (!item || typeof item !== \"object\") continue;\n\t\tconst favorite = item;\n\t\tif (typeof favorite.kind !== \"string\" || !isWorkspaceFavoriteKind(favorite.kind) || typeof favorite.resourceId !== \"string\" || favorite.resourceId.length === 0) continue;\n\t\tconst key = `${favorite.kind}:${favorite.resourceId}`;\n\t\tif (seenKeys.has(key)) continue;\n\t\tseenKeys.add(key);\n\t\tfavorites.push({\n\t\t\tkind: favorite.kind,\n\t\t\tresourceId: favorite.resourceId\n\t\t});\n\t}\n\treturn favorites;\n}\nfunction normalizeProjectDotColors(value) {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) return {};\n\treturn Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[0] === \"string\" && typeof entry[1] === \"string\"));\n}\nfunction normalizeOnboardingTabVisible(value) {\n\treturn typeof value === \"boolean\" ? value : DEFAULT_USER_PREFERENCES.onboardingTabVisible;\n}\nfunction normalizeTimezone(value) {\n\tif (value === null || value === void 0) return null;\n\tif (typeof value !== \"string\" || value.length === 0 || !isValidIanaTimezone(value)) return null;\n\treturn value;\n}\nfunction normalizeUserPreferences(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_USER_PREFERENCES;\n\tconst preferences = value;\n\treturn UserPreferencesSchema.parse({\n\t\tinterfaceTheme: normalizeInterfaceTheme(preferences.interfaceTheme),\n\t\tsurfaceContrast: normalizeSurfaceContrast(preferences.surfaceContrast),\n\t\tlayoutMode: normalizeLayoutMode(preferences.layoutMode),\n\t\tfontSize: normalizeFontSize(preferences.fontSize),\n\t\tsidebar: normalizeSidebarPreferences(preferences.sidebar),\n\t\tfavorites: normalizeFavorites(preferences.favorites),\n\t\tprojectOrderIds: normalizeStringList(preferences.projectOrderIds),\n\t\tprojectDotColors: normalizeProjectDotColors(preferences.projectDotColors),\n\t\tonboardingTabVisible: normalizeOnboardingTabVisible(preferences.onboardingTabVisible),\n\t\ttimezone: normalizeTimezone(preferences.timezone)\n\t});\n}\nfunction mergeUserPreferences(current, patch) {\n\treturn normalizeUserPreferences({\n\t\t...current,\n\t\t...patch,\n\t\tsidebar: patch.sidebar ? {\n\t\t\t...current.sidebar,\n\t\t\t...patch.sidebar\n\t\t} : current.sidebar\n\t});\n}\n//#endregion\n//#region src/schemas/organization-branding.ts\nconst OrganizationLogoVariantSchema = z.enum([\"light\", \"dark\"]);\nconst DEFAULT_LOGO_HEIGHT_PX = 20;\nconst MIN_LOGO_HEIGHT_PX = 14;\nconst MAX_LOGO_HEIGHT_PX = 32;\nconst OrganizationSidebarBrandingSchema = z.object({\n\tcustomLogoEnabled: z.boolean(),\n\tcustomLogoExplicitlyDisabled: z.boolean(),\n\tlogoLightUrl: z.url().nullable(),\n\tlogoDarkUrl: z.url().nullable(),\n\tlogoHeightPx: z.number().int().min(14).max(32)\n});\nconst OrganizationSidebarBrandingPatchSchema = z.object({\n\tcustomLogoEnabled: z.boolean().optional(),\n\tcustomLogoExplicitlyDisabled: z.boolean().optional(),\n\tlogoLightStorageKey: z.string().min(1).nullable().optional(),\n\tlogoDarkStorageKey: z.string().min(1).nullable().optional(),\n\tlogoHeightPx: z.number().int().min(14).max(32).optional()\n}).refine((value) => value.customLogoEnabled !== void 0 || value.customLogoExplicitlyDisabled !== void 0 || value.logoLightStorageKey !== void 0 || value.logoDarkStorageKey !== void 0 || value.logoHeightPx !== void 0, { message: \"At least one branding field is required\" });\nconst PresignOrgLogoRequestSchema = z.object({\n\tvariant: OrganizationLogoVariantSchema,\n\tcontentType: z.string().trim().min(1)\n});\nconst PresignOrgLogoResponseSchema = z.object({\n\tuploadUrl: z.url(),\n\tstorageKey: z.string().min(1)\n});\nconst DEFAULT_ORGANIZATION_SIDEBAR_BRANDING = {\n\tcustomLogoEnabled: false,\n\tcustomLogoExplicitlyDisabled: false,\n\tlogoLightUrl: null,\n\tlogoDarkUrl: null,\n\tlogoHeightPx: 20\n};\nfunction normalizeLogoUrl(value) {\n\tif (typeof value !== \"string\") return null;\n\ttry {\n\t\tconst url = new URL(value);\n\t\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") return null;\n\t\treturn url.toString();\n\t} catch {\n\t\treturn null;\n\t}\n}\nfunction normalizeCustomLogoEnabled(value, branding) {\n\tconst hasCustomLogo = Boolean(normalizeLogoUrl(branding.logoLightUrl) || normalizeLogoUrl(branding.logoDarkUrl));\n\tif (branding.customLogoExplicitlyDisabled === true) return false;\n\tif (typeof value === \"boolean\") return value || hasCustomLogo;\n\treturn hasCustomLogo;\n}\nfunction normalizeLogoHeightPx(value) {\n\tif (typeof value !== \"number\" || !Number.isFinite(value)) return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING.logoHeightPx;\n\treturn Math.min(32, Math.max(14, Math.round(value)));\n}\nfunction normalizeOrganizationSidebarBranding(value) {\n\tif (!value || typeof value !== \"object\") return DEFAULT_ORGANIZATION_SIDEBAR_BRANDING;\n\tconst branding = value;\n\treturn OrganizationSidebarBrandingSchema.parse({\n\t\tcustomLogoEnabled: normalizeCustomLogoEnabled(branding.customLogoEnabled, branding),\n\t\tcustomLogoExplicitlyDisabled: branding.customLogoExplicitlyDisabled === true,\n\t\tlogoLightUrl: normalizeLogoUrl(branding.logoLightUrl),\n\t\tlogoDarkUrl: normalizeLogoUrl(branding.logoDarkUrl),\n\t\tlogoHeightPx: normalizeLogoHeightPx(branding.logoHeightPx)\n\t});\n}\nfunction mergeOrganizationSidebarBranding(current, patch) {\n\treturn normalizeOrganizationSidebarBranding({\n\t\t...current,\n\t\t...patch\n\t});\n}\n//#endregion\n//#region src/schemas/project-artifacts.ts\nconst ProjectArtifactStatusSchema = z.enum([\"pending\", \"ready\"]);\nconst commitSha$3 = z.string().regex(/^[0-9a-f]{40}$/i);\nconst isoDateTime$1 = z.string().datetime();\n/**\n* Client-supplied provenance. `sourceRepositoryId` is optional on the wire —\n* the platform binds it from the ready project repository when omitted.\n*\n* Healthy filtered deploy (Slice 3) owns when these fields are required; Slice 1\n* keeps them optional so snapshot deploys continue to work.\n*/\nconst clientGitProvenanceFields = {\n\tsourceCommitSha: commitSha$3,\n\tbaseMainSha: commitSha$3,\n\tbaseDraftSha: commitSha$3\n};\nfunction requireClientGitProvenanceFields(data, ctx) {\n\tconst requiredKeys = [\n\t\t\"sourceCommitSha\",\n\t\t\"baseMainSha\",\n\t\t\"baseDraftSha\"\n\t];\n\tconst present = requiredKeys.filter((key) => data[key] !== void 0);\n\tif (present.length === 0 || present.length === requiredKeys.length) return;\n\tfor (const key of requiredKeys) if (data[key] === void 0) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: `${key} is required when git provenance is provided`,\n\t\tpath: [key]\n\t});\n}\nconst CreateProjectArtifactRequestSchema = z.object({\n\tsourceRepositoryId: z.string().min(1).optional(),\n\tsourceCommitSha: clientGitProvenanceFields.sourceCommitSha.optional(),\n\tbaseMainSha: clientGitProvenanceFields.baseMainSha.optional(),\n\tbaseDraftSha: clientGitProvenanceFields.baseDraftSha.optional(),\n\t/** Lowercase hex sha256 of the gzip tarball — enables content-addressed upload skip. */\n\tchecksumSha256: z.string().regex(/^[0-9a-f]{64}$/).optional(),\n\tsizeBytes: z.number().int().nonnegative().optional()\n}).superRefine(requireClientGitProvenanceFields).superRefine((data, ctx) => {\n\tif (data.checksumSha256 !== void 0 && data.sizeBytes === void 0) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: \"sizeBytes is required when checksumSha256 is provided\",\n\t\tpath: [\"sizeBytes\"]\n\t});\n});\nconst ProjectArtifactSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tstorageKey: z.string(),\n\tstatus: ProjectArtifactStatusSchema,\n\tsourceCommitSha: z.string().nullable().optional(),\n\tcreatedAt: isoDateTime$1,\n\tupdatedAt: isoDateTime$1\n});\nconst CreateProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\t/** Null when the tarball bytes already exist at the content-addressed key (skip PUT). */\n\tuploadUrl: z.string().url().nullable(),\n\texpiresInSeconds: z.number().int().positive()\n});\n/**\n* Optional body for artifact complete. When `manifest` is present the platform\n* skips re-downloading the tarball (CLI already has it in memory after pack).\n*/\nconst CompleteProjectArtifactRequestSchema = z.object({ manifest: StoredRouteManifestSchema.optional() });\nconst CompleteProjectArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tproject: ProjectSchema\n});\nconst DownloadActiveProjectArtifactResponseSchema = z.object({\n\tartifactId: z.string(),\n\tdownloadUrl: z.string().url(),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst ProjectDeploymentSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.string(),\n\tversion: z.number().int().positive(),\n\tdeployedBy: z.string().nullable(),\n\tdeployedByEmail: z.string().optional(),\n\tdeployedByAvatarUrl: z.string().optional(),\n\tcreatedAt: isoDateTime$1,\n\tactive: z.boolean()\n});\nconst ListProjectDeploymentsResponseSchema = z.array(ProjectDeploymentSchema);\n//#endregion\n//#region src/schemas/project-git.ts\nconst ProjectGitProviderSchema = z.enum([\"github\", \"code_storage\"]);\nconst ProjectRepositoryLifecycleStatusSchema = z.enum([\n\t\"provisioning\",\n\t\"ready\",\n\t\"failed\",\n\t\"deleting\",\n\t\"deleted\"\n]);\nconst ProjectRepositoryContentStatusSchema = z.enum([\n\t\"empty\",\n\t\"awaiting_source\",\n\t\"synced\",\n\t\"failed\"\n]);\nconst ConfiguredProjectGitStatusSchema = z.object({\n\tprovider: ProjectGitProviderSchema,\n\tlifecycleStatus: ProjectRepositoryLifecycleStatusSchema,\n\tcontentStatus: ProjectRepositoryContentStatusSchema,\n\tdefaultBranch: z.string().min(1),\n\towner: z.string().nullable(),\n\tname: z.string().nullable(),\n\tlastErrorCode: z.string().nullable(),\n\tlastError: z.string().nullable()\n});\nconst ProjectGitStatusResponseSchema = z.discriminatedUnion(\"configured\", [z.object({ configured: z.literal(false) }), z.object({\n\tconfigured: z.literal(true),\n\trepository: ConfiguredProjectGitStatusSchema\n})]);\n/** Remotes default to read-only. `draft_write` is Code.Storage-only. */\nconst ProjectGitRemoteRequestSchema = z.object({\n\tephemeral: z.boolean().optional(),\n\tcapability: z.enum([\"read\", \"draft_write\"]).optional()\n});\nconst ProjectGitRemoteResponseSchema = z.object({\n\turl: z.string().url(),\n\tusername: z.string().min(1),\n\tpassword: z.string().min(1),\n\texpiresAt: z.string().datetime(),\n\tdefaultBranch: z.literal(\"main\"),\n\tdraftBranch: z.literal(\"ks/draft\")\n});\n//#endregion\n//#region src/schemas/project-artifact-index.ts\n/** Snapshot/content-addressed blob digests are always lowercase sha256. */\nconst sha256Hex$1 = z.string().regex(/^[a-f0-9]{64}$/, \"Expected a lowercase hex sha256 digest\");\n/** One file in a modular deploy artifact (path relative to `dist/`). */\nconst ProjectArtifactIndexFileSchema = z.object({\n\tpath: z.string().min(1).refine((path) => !path.startsWith(\"/\") && !path.includes(\"\\\\\") && !path.includes(\"\\0\") && path.split(\"/\").every((segment) => segment !== \"\" && segment !== \".\" && segment !== \"..\"), \"Expected a normalized dist-relative path\"),\n\thash: sha256Hex$1,\n\tsize: z.number().int().nonnegative()\n});\n/** Per-deploy index: logical dist paths → content-addressed module blobs. */\nconst ProjectArtifactIndexSchema = z.object({\n\tversion: z.literal(1),\n\tfiles: z.array(ProjectArtifactIndexFileSchema).min(1)\n});\n/** A blob the CLI may need to upload for a modular artifact. */\nconst ModuleBlobRefSchema = z.object({\n\thash: sha256Hex$1,\n\tsize: z.number().int().nonnegative()\n});\n//#endregion\n//#region src/schemas/project-files.ts\nconst isoDateTime = z.string().datetime();\n/** Snapshot/content-addressed blob digests are always lowercase sha256. */\nconst sha256Hex = z.string().regex(/^[a-f0-9]{64}$/, \"Expected a lowercase hex sha256 digest\");\n/** Max bytes for a single source file collected or served from a deploy tree. */\nconst PROJECT_SOURCE_MAX_FILE_BYTES = 256 * 1024;\n/** Max total bytes across all source files in a deploy tree listing. */\nconst PROJECT_SOURCE_MAX_TOTAL_BYTES = 8 * 1024 * 1024;\n/** Max file count in a deploy tree listing. */\nconst PROJECT_SOURCE_MAX_FILES = 2e3;\n/** Directory names excluded from project source trees (Git and snapshot). */\nconst PROJECT_SOURCE_IGNORED_DIRS = Object.freeze(new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".git\",\n\t\".turbo\",\n\t\"build\",\n\t\"coverage\",\n\t\".keystroke\",\n\t\".cache\",\n\t\"tmp\"\n]));\n/** Basename regex: any name containing `.env` (e.g. `.env`, `.env.local`). */\nconst PROJECT_SOURCE_IGNORED_ENV_BASENAME = /\\.env/;\n/** Basename regex: names ending in `.log`. */\nconst PROJECT_SOURCE_IGNORED_LOG_BASENAME = /\\.log$/;\n/** True when a basename should be excluded from project source trees. */\nfunction isIgnoredProjectSourceFileName(name) {\n\treturn name === \"pnpm-workspace.yaml\" || PROJECT_SOURCE_IGNORED_ENV_BASENAME.test(name) || PROJECT_SOURCE_IGNORED_LOG_BASENAME.test(name);\n}\n/**\n* True when any path segment is an ignored directory (e.g. `src/node_modules/x`).\n* Does not treat the filename itself as a directory.\n*/\nfunction isIgnoredProjectSourcePath(path) {\n\tconst segments = path.split(\"/\");\n\tfor (let index = 0; index < segments.length - 1; index += 1) {\n\t\tconst segment = segments[index];\n\t\tif (segment && PROJECT_SOURCE_IGNORED_DIRS.has(segment)) return true;\n\t}\n\tconst base = segments.at(-1);\n\treturn base !== void 0 && isIgnoredProjectSourceFileName(base);\n}\n/** True when the leading sample of a buffer looks binary (NUL byte). */\nfunction isProbablyBinaryProjectSource(bytes) {\n\tconst sampleLength = Math.min(bytes.length, 8e3);\n\tfor (let index = 0; index < sampleLength; index += 1) if (bytes[index] === 0) return true;\n\treturn false;\n}\n/**\n* A single entry in a deploy's file tree, as served to the dashboard. Carries\n* no contents: `id` is a stable, path-derived handle used for selection and\n* `?file=` deep links. Contents are fetched lazily by immutable revision + path.\n*/\nconst ProjectFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\n/** Maps a runtime resource slug (agent/workflow/skill) to its source file path. */\nconst ProjectSourceResourceRefSchema = z.object({\n\tslug: z.string().min(1),\n\tpath: z.string().min(1)\n});\nconst ProjectSourceResourcesSchema = z.object({\n\tagents: z.array(ProjectSourceResourceRefSchema).default([]),\n\tworkflows: z.array(ProjectSourceResourceRefSchema).default([]),\n\tskills: z.array(ProjectSourceResourceRefSchema).default([])\n});\nconst emptyResources = () => ({\n\tagents: [],\n\tworkflows: [],\n\tskills: []\n});\n/** Response for the file-tree listing of a project's active deploy. */\nconst ListProjectFilesResponseSchema = z.object({\n\tartifactId: z.string().nullable(),\n\tfiles: z.array(ProjectFileSummarySchema),\n\tresources: ProjectSourceResourcesSchema.default(emptyResources())\n});\n/**\n* Raw source file as collected by the CLI at deploy time. `hash` is the content\n* address (sha256 of `contents`) used for dedup and immutable storage.\n*/\nconst ProjectSourceFileSchema = z.object({\n\tpath: z.string().min(1),\n\tcontents: z.string(),\n\thash: sha256Hex\n});\n/** A blob the CLI may need to upload, keyed by content hash. */\nconst SourceBlobRefSchema = z.object({\n\thash: sha256Hex,\n\tsize: z.number().int().nonnegative()\n});\n/** Request: ask the platform which blobs are missing and get presigned PUTs. */\nconst PresignProjectSourceRequestSchema = z.object({ blobs: z.array(SourceBlobRefSchema) });\nconst PresignedBlobUploadSchema = z.object({\n\thash: sha256Hex,\n\turl: z.string().url()\n});\n/** Response: presigned PUTs for the subset of blobs not already stored. */\nconst PresignProjectSourceResponseSchema = z.object({ uploads: z.array(PresignedBlobUploadSchema) });\n/** A file reference in a manifest upload: where the path's content lives. */\nconst ManifestFileRefSchema = z.object({\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** Request body the CLI sends to finalize a deploy's source manifest. */\nconst UploadProjectSourceManifestRequestSchema = z.object({ files: z.array(ManifestFileRefSchema) });\nconst UploadProjectSourceResponseSchema = z.object({\n\tok: z.literal(true),\n\tfileCount: z.number().int().nonnegative()\n});\n/** A file entry as persisted in the stored manifest (path-derived id added). */\nconst StoredManifestFileSchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1),\n\thash: sha256Hex\n});\n/** The immutable per-deploy manifest persisted to object storage. */\nconst StoredProjectSourceManifestSchema = z.object({\n\tfiles: z.array(StoredManifestFileSchema),\n\tgeneratedAt: isoDateTime\n});\n/** A single source file returned by the bulk active-source download endpoint. */\nconst DownloadActiveProjectSourceFileSchema = z.object({\n\tpath: z.string().min(1),\n\tcontents: z.string()\n});\n/** Response for downloading all source files from a project's active deploy. */\nconst DownloadActiveProjectSourceResponseSchema = z.object({\n\tartifactId: z.string(),\n\tfiles: z.array(DownloadActiveProjectSourceFileSchema)\n});\nconst commitSha$2 = z.string().regex(/^[0-9a-f]{40}$/i);\n/**\n* Metadata for the active project's published source revision.\n* Contains no credentials — clients mint remotes separately when needed.\n*/\nconst ActiveProjectSourceRevisionSchema = z.discriminatedUnion(\"kind\", [z.object({\n\tartifactId: z.string().min(1),\n\tkind: z.literal(\"git\"),\n\tcommitSha: commitSha$2,\n\tbranch: z.string().min(1)\n}), z.object({\n\tartifactId: z.string().min(1),\n\tkind: z.literal(\"snapshot\")\n})]);\nconst LANGUAGE_BY_EXTENSION = {\n\tts: \"typescript\",\n\tmts: \"typescript\",\n\tcts: \"typescript\",\n\ttsx: \"tsx\",\n\tjs: \"javascript\",\n\tmjs: \"javascript\",\n\tcjs: \"javascript\",\n\tjsx: \"jsx\",\n\tjson: \"json\",\n\tmd: \"markdown\",\n\tmdx: \"markdown\",\n\tcss: \"css\",\n\thtml: \"html\",\n\tyml: \"yaml\",\n\tyaml: \"yaml\",\n\ttoml: \"toml\",\n\ttxt: \"text\",\n\tsh: \"shell\",\n\tenv: \"shell\"\n};\n/** Best-effort syntax-highlight hint derived from a file path's extension. */\nfunction projectFileLanguage(path) {\n\tconst base = path.split(\"/\").at(-1) ?? path;\n\treturn LANGUAGE_BY_EXTENSION[base.includes(\".\") ? (base.split(\".\").at(-1) ?? \"\").toLowerCase() : \"\"];\n}\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction projectFileId(path) {\n\treturn `file-${path.trim().replace(/^\\.?\\/+/, \"\").replace(/[^a-zA-Z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\").toLowerCase()}`;\n}\n//#endregion\n//#region src/schemas/project-managed-deploy.ts\nconst commitSha$1 = z.string().regex(/^[0-9a-f]{40}$/i);\nconst repositoryPath = z.string().min(1).refine((path) => !path.startsWith(\"/\") && !path.includes(\"\\\\\") && !path.includes(\"\\0\") && path.split(\"/\").every((segment) => segment !== \"\" && segment !== \".\" && segment !== \"..\"), \"Expected a normalized repository-relative path\");\n/** Stable filtered-deploy resource key (`agents/foo`, `workflows/bar`). */\nconst ManagedDeployResourceKeySchema = z.string().regex(/^(agents|workflows)\\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);\nconst ManagedDeployModeSchema = z.enum([\"full\", \"filtered\"]);\nconst ManagedDeployImpactCompletenessSchema = z.enum([\"complete\", \"unknown\"]);\nconst ManagedDeployCandidateOpSchema = z.object({\n\tpath: repositoryPath,\n\top: z.enum([\"upsert\", \"delete\"])\n});\nconst ManagedDeployRequireFullCodeSchema = z.enum([\n\t\"package_manifest\",\n\t\"lockfile\",\n\t\"config\",\n\t\"skills_or_assets\",\n\t\"unsafe_delete_or_rename\",\n\t\"dynamic_or_unresolved_import\",\n\t\"missing_ownership\",\n\t\"ambiguous_ownership\",\n\t\"non_filterable_deployable\",\n\t\"unknown_selected_key\",\n\t\"unproven_safe\"\n]);\nconst ManagedDeployExpansionSchema = z.object({\n\tresourceKey: ManagedDeployResourceKeySchema,\n\treason: z.string().min(1),\n\tsharedInputs: z.array(z.string().min(1))\n});\n/** Source path change kinds for filtered-deploy planning (M0/D0 classification). */\nconst ManagedDeploySourceChangeKindSchema = z.enum([\n\t\"added\",\n\t\"modified\",\n\t\"deleted\",\n\t\"renamed\"\n]);\nconst ManagedDeploySourcePathChangeSchema = z.object({\n\tpath: repositoryPath,\n\tkind: ManagedDeploySourceChangeKindSchema,\n\tpreviousPath: repositoryPath.optional()\n});\n/**\n* Input for the hidden CLI analyzer (`keystroke internal analyze-filtered-deploy`).\n* Kept as a CLI/build contract; it is not a platform deploy API.\n*/\nconst InternalAnalyzeFilteredDeployRequestSchema = z.object({\n\tselectedResourceKeys: z.array(ManagedDeployResourceKeySchema).min(1),\n\tchangedPaths: z.array(z.union([repositoryPath, ManagedDeploySourcePathChangeSchema])).min(1),\n\t/** D0 (draft) checkout root. Defaults to process cwd when omitted. */\n\troot: z.string().min(1).optional(),\n\t/** Optional M0 (main) checkout root for dual-tree CLI analyze. */\n\tmainRoot: z.string().min(1).optional(),\n\t/** Analyzer contract version the caller expects (forward-compatible). */\n\tanalyzerContractVersion: z.string().min(1).optional(),\n\t/**\n\t* Optional M0 package.json / lockfile contents for package-impact attribution.\n\t* When omitted, package/lockfile changes remain full-deploy.\n\t*/\n\tbaseManifestFiles: z.array(z.object({\n\t\tpath: repositoryPath,\n\t\tcontents: z.string()\n\t})).optional()\n});\n/**\n* JSON stdout from `keystroke internal analyze-filtered-deploy`.\n* Mirrors `computeSafeFilteredDeploy` without leaking unpublished package types.\n*/\nconst InternalAnalyzeFilteredDeployResultSchema = z.discriminatedUnion(\"requireFull\", [z.object({\n\trequireFull: z.literal(true),\n\tcode: ManagedDeployRequireFullCodeSchema,\n\treason: z.string().min(1)\n}), z.object({\n\trequireFull: z.literal(false),\n\tresourceKeys: z.array(ManagedDeployResourceKeySchema).min(1),\n\timpactedResourceKeys: z.array(ManagedDeployResourceKeySchema).default([]),\n\texpansions: z.array(ManagedDeployExpansionSchema),\n\tsourceDelta: z.array(repositoryPath),\n\timpactCompleteness: ManagedDeployImpactCompletenessSchema.default(\"complete\"),\n\twarnings: z.array(z.string()).default([]),\n\tcandidateOps: z.array(ManagedDeployCandidateOpSchema).default([]),\n\tanalyzerContractVersion: z.string().min(1).optional()\n})]);\nconst ManagedDeployBaseManifestFileSchema = z.object({\n\tpath: repositoryPath,\n\tcontents: z.string()\n});\nconst ManagedDeployCandidateRecipeEntrySchema = z.object({\n\tpath: repositoryPath,\n\top: z.enum([\"upsert\", \"delete\"]),\n\tmode: z.enum([\n\t\t\"100644\",\n\t\t\"100755\",\n\t\t\"120000\",\n\t\t\"160000\"\n\t]).optional(),\n\tblobSha: commitSha$1.optional()\n}).superRefine((data, ctx) => {\n\tif (data.op === \"upsert\") {\n\t\tif (data.mode == null) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"mode is required for upsert entries\",\n\t\t\tpath: [\"mode\"]\n\t\t});\n\t\tif (data.blobSha == null) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"blobSha is required for upsert entries\",\n\t\t\tpath: [\"blobSha\"]\n\t\t});\n\t}\n});\nconst ManagedDeployCandidateRecipeSchema = z.object({\n\tparentSha: commitSha$1,\n\ttreeSha: commitSha$1,\n\tdraftSha: commitSha$1,\n\tmode: z.enum([\"full\", \"filtered\"]),\n\tentries: z.array(ManagedDeployCandidateRecipeEntrySchema)\n}).superRefine((data, ctx) => {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of data.entries.entries()) {\n\t\tif (seen.has(entry.path)) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Duplicate candidate recipe path: ${entry.path}`,\n\t\t\tpath: [\n\t\t\t\t\"entries\",\n\t\t\t\tindex,\n\t\t\t\t\"path\"\n\t\t\t]\n\t\t});\n\t\tseen.add(entry.path);\n\t}\n});\nconst PrepareManagedDeployRequestSchema = z.object({\n\tmainSha: commitSha$1,\n\tdraftSha: commitSha$1,\n\tmode: ManagedDeployModeSchema,\n\tcandidateOps: z.array(ManagedDeployCandidateOpSchema).min(1).optional(),\n\trequestedResourceKeys: z.array(ManagedDeployResourceKeySchema).min(1).optional(),\n\tresourceKeys: z.array(ManagedDeployResourceKeySchema).min(1).optional(),\n\timpactCompleteness: ManagedDeployImpactCompletenessSchema.optional(),\n\tacceptImpact: z.boolean().optional()\n}).superRefine((data, ctx) => {\n\tconst seenCandidatePaths = /* @__PURE__ */ new Set();\n\tfor (const [index, operation] of (data.candidateOps ?? []).entries()) {\n\t\tif (seenCandidatePaths.has(operation.path)) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Duplicate candidate operation path: ${operation.path}`,\n\t\t\tpath: [\n\t\t\t\t\"candidateOps\",\n\t\t\t\tindex,\n\t\t\t\t\"path\"\n\t\t\t]\n\t\t});\n\t\tseenCandidatePaths.add(operation.path);\n\t}\n\tif (data.mode === \"filtered\") {\n\t\tif (!data.candidateOps?.length) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"candidateOps is required for filtered deploys\",\n\t\t\tpath: [\"candidateOps\"]\n\t\t});\n\t\tif (!data.requestedResourceKeys?.length) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"requestedResourceKeys is required for filtered deploys\",\n\t\t\tpath: [\"requestedResourceKeys\"]\n\t\t});\n\t\tif (!data.resourceKeys?.length) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"resourceKeys is required for filtered deploys\",\n\t\t\tpath: [\"resourceKeys\"]\n\t\t});\n\t\tif (data.impactCompleteness == null) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"impactCompleteness is required for filtered deploys\",\n\t\t\tpath: [\"impactCompleteness\"]\n\t\t});\n\t\tif (data.requestedResourceKeys && data.resourceKeys && !data.requestedResourceKeys.every((key) => data.resourceKeys.includes(key))) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"requestedResourceKeys must be a subset of resourceKeys\",\n\t\t\tpath: [\"requestedResourceKeys\"]\n\t\t});\n\t\tif ((data.requestedResourceKeys != null && data.resourceKeys != null && (data.requestedResourceKeys.length !== data.resourceKeys.length || !data.requestedResourceKeys.every((key) => data.resourceKeys.includes(key))) || data.impactCompleteness === \"unknown\") && data.acceptImpact !== true) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"acceptImpact is required for expanded or unknown filtered impact\",\n\t\t\tpath: [\"acceptImpact\"]\n\t\t});\n\t\treturn;\n\t}\n\tfor (const field of [\n\t\t\"candidateOps\",\n\t\t\"requestedResourceKeys\",\n\t\t\"resourceKeys\",\n\t\t\"impactCompleteness\",\n\t\t\"acceptImpact\"\n\t]) if (data[field] != null) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: `${field} is not valid for full deploys`,\n\t\tpath: [field]\n\t});\n});\nconst PrepareManagedDeployResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tproject: ProjectSchema,\n\tmode: z.enum([\"full\", \"filtered\"]),\n\tmainSha: commitSha$1,\n\tdraftSha: commitSha$1,\n\tcandidateRef: z.string().min(1),\n\tcandidateEphemeral: z.boolean(),\n\tpublishMode: z.enum([\"git_push\", \"recipe\"]),\n\tcandidateWriteRemote: z.object({\n\t\turl: z.string().min(1),\n\t\tusername: z.string().min(1),\n\t\tpassword: z.string().min(1),\n\t\texpiresAt: z.string().datetime()\n\t}).optional(),\n\tcandidateOps: z.array(ManagedDeployCandidateOpSchema).nullable().default(null)\n});\nconst PublishManagedDeployCandidateRequestSchema = z.object({\n\tartifactId: z.string().uuid(),\n\tcandidateSha: commitSha$1.optional(),\n\trecipe: ManagedDeployCandidateRecipeSchema.optional(),\n\t/**\n\t* Client-attested tip trees for full-mode equality checks. When both are\n\t* present, platform compares the strings and skips provider tree walks.\n\t*/\n\tdraftTreeSha: commitSha$1.optional(),\n\tcandidateTreeSha: commitSha$1.optional()\n}).superRefine((data, ctx) => {\n\tconst hasDraft = data.draftTreeSha != null;\n\tif (hasDraft !== (data.candidateTreeSha != null)) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: \"draftTreeSha and candidateTreeSha must both be provided together\",\n\t\tpath: hasDraft ? [\"candidateTreeSha\"] : [\"draftTreeSha\"]\n\t});\n});\nconst PublishManagedDeployCandidateResponseSchema = z.object({\n\tartifactId: z.string().uuid(),\n\tcandidateSha: commitSha$1,\n\tcandidateRef: z.string().min(1),\n\tcandidateEphemeral: z.boolean()\n});\nconst checksumSha256 = z.string().regex(/^[0-9a-f]{64}$/);\n/** Modular complete: CAS index only — do not send/store composed flat manifesto_json. */\nconst CompleteManagedDeployModularRequestSchema = z.object({\n\tartifactId: z.string().uuid(),\n\tindex: ProjectArtifactIndexSchema\n});\n/** Legacy complete: whole-dist gzip tarball checksum + size. */\nconst CompleteManagedDeployTarballRequestSchema = z.object({\n\tartifactId: z.string().uuid(),\n\tchecksumSha256,\n\tsizeBytes: z.number().int().positive()\n});\nconst CompleteManagedDeployArtifactRequestSchema = z.union([CompleteManagedDeployModularRequestSchema, CompleteManagedDeployTarballRequestSchema]);\nconst CompleteManagedDeployArtifactResponseSchema = z.object({\n\tartifact: ProjectArtifactSchema,\n\tproject: ProjectSchema,\n\tcandidateSha: commitSha$1,\n\tmode: ManagedDeployModeSchema\n});\nconst CancelManagedDeployRequestSchema = z.object({ artifactId: z.string().uuid() });\nconst CancelManagedDeployResponseSchema = z.object({ cancelled: z.literal(true) });\n/** Presign missing module blobs (CAS). Unchanged hashes are omitted from `uploads`. */\nconst RenewManagedDeployUploadRequestSchema = z.object({\n\tartifactId: z.string().uuid(),\n\tblobs: z.array(ModuleBlobRefSchema)\n});\nconst RenewManagedDeployUploadResponseSchema = z.object({\n\tuploads: z.array(PresignedBlobUploadSchema),\n\texpiresInSeconds: z.number().int().positive()\n});\nconst HeartbeatManagedDeployRequestSchema = z.object({ artifactId: z.string().uuid() });\nconst HeartbeatManagedDeployResponseSchema = z.object({ expiresAt: z.string().datetime() });\n//#endregion\n//#region src/schemas/project-draft.ts\nconst commitSha = z.string().regex(/^[0-9a-f]{40}$/i);\n/**\n* Placeholder tip SHA returned while draft reads fall back to the active\n* deploy snapshot and managed git is still provisioning/bootstrapping.\n* Not a real commit — clients must not use it for CAS commits.\n*/\nconst DRAFT_SNAPSHOT_PLACEHOLDER_COMMIT_SHA = \"0\".repeat(40);\nfunction isDraftSnapshotPlaceholderCommitSha(sha) {\n\treturn typeof sha === \"string\" && sha.toLowerCase() === DRAFT_SNAPSHOT_PLACEHOLDER_COMMIT_SHA;\n}\n/** Tip of the shared unpublished draft branch (`ks/draft`). */\nconst DraftRevisionResponseSchema = z.object({\n\tcommitSha,\n\tbranch: z.literal(\"ks/draft\")\n});\n/** File tree for a draft revision. Clients pin subsequent reads to `commitSha`. */\nconst ListDraftFilesResponseSchema = z.object({\n\tcommitSha,\n\tfiles: z.array(ProjectFileSummarySchema)\n});\n/** Query for a single draft file read. Content is returned as plain text. */\nconst DraftFileContentQuerySchema = z.object({\n\tpath: z.string().min(1),\n\t/**\n\t* Optional immutable SHA from a prior list/revision response. When omitted,\n\t* the platform resolves the current `ks/draft` tip.\n\t*/\n\tcommitSha: commitSha.optional()\n});\n/** SDK/helper shape for a draft file body plus the SHA it was read at. */\nconst DraftFileContentResponseSchema = z.object({\n\tcontent: z.string(),\n\tcommitSha\n});\nconst DraftCommitUpsertFileSchema = z.object({\n\top: z.literal(\"upsert\"),\n\tpath: z.string().min(1),\n\tcontent: z.string()\n});\nconst DraftCommitDeleteFileSchema = z.object({\n\top: z.literal(\"delete\"),\n\tpath: z.string().min(1)\n});\nconst DraftCommitFileChangeSchema = z.discriminatedUnion(\"op\", [DraftCommitUpsertFileSchema, DraftCommitDeleteFileSchema]);\n/**\n* Atomic multi-file commit against `ks/draft`. `expectedHeadSha` is required\n* for compare-and-swap; overlapping concurrent edits return a conflict.\n*/\nconst CreateDraftCommitRequestSchema = z.object({\n\texpectedHeadSha: commitSha,\n\tmessage: z.string().min(1).max(500).optional(),\n\tfiles: z.array(DraftCommitFileChangeSchema).min(1)\n});\nconst DraftCommitResponseSchema = z.object({ commitSha });\n/**\n* Max decoded bytes for a `git diff --binary` submitted to the draft from-diff\n* endpoint. Keeps request bodies bounded for CLI sync and trusted workers.\n*/\nconst PROJECT_DRAFT_DIFF_MAX_BYTES = 2 * 1024 * 1024;\n/** Base64 expands 3 bytes → 4 chars; pad for padding characters. */\nconst PROJECT_DRAFT_DIFF_MAX_BASE64_CHARS = Math.ceil(PROJECT_DRAFT_DIFF_MAX_BYTES / 3) * 4;\n/**\n* Commit a binary Git patch (`git diff --binary`) against `ks/draft`.\n* `expectedHeadSha` is required for compare-and-swap.\n*/\nconst CreateDraftDiffCommitRequestSchema = z.object({\n\texpectedHeadSha: commitSha,\n\tmessage: z.string().min(1).max(500).optional(),\n\t/** Base64-encoded `git diff --binary` output. */\n\tdiffBase64: z.string().min(1).max(PROJECT_DRAFT_DIFF_MAX_BASE64_CHARS)\n});\n/** Structured 409 when CAS loses and touched paths overlap concurrent edits. */\nconst DraftConflictResponseSchema = z.object({\n\terror: z.string(),\n\tcode: z.literal(\"conflict\"),\n\tcurrentHeadSha: commitSha\n});\n/**\n* Transient SSE payload after an accepted draft commit. Not a durable event log —\n* clients use it only to invalidate pinned draft reads.\n*/\nconst DraftUpdateEventSchema = z.object({\n\tprojectId: z.string().min(1),\n\tcommitSha\n});\n//#endregion\n//#region src/schemas/platform-resources.ts\nconst PLATFORM_RESOURCE_UNSUPPORTED_TEXT = \"Not Supported\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP = \"0000\";\nconst PLATFORM_RESOURCE_UNSUPPORTED_COUNT = 0;\nconst optionalCount = z.number().int().nonnegative().nullable().optional();\nconst optionalTimestamp = z.string().nullable().optional();\nconst AgentSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tmodel: z.string().optional(),\n\tcapabilities: z.object({\n\t\timages: z.boolean(),\n\t\tfiles: z.boolean()\n\t}).optional(),\n\tsystemPrompt: z.string().optional(),\n\ttoolCount: optionalCount,\n\tcredentialCount: optionalCount,\n\tapps: z.array(z.object({\n\t\tid: z.string(),\n\t\tlabel: z.string()\n\t})).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst WorkflowSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tlastRunAt: optionalTimestamp\n});\nconst SkillSummarySchema = z.object({\n\tid: z.string().min(1),\n\tslug: z.string().min(1),\n\tname: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tupdatedAt: z.string().min(1),\n\tdescription: z.string().min(1),\n\tsourcePath: z.string().min(1).optional()\n});\nconst AgentSummaryListResponseSchema = z.array(AgentSummarySchema);\nconst AgentSummaryDetailResponseSchema = AgentSummarySchema.nullable();\nconst WorkflowSummaryListResponseSchema = z.array(WorkflowSummarySchema);\nconst WorkflowSummaryDetailResponseSchema = WorkflowSummarySchema.nullable();\nconst SkillSummaryListResponseSchema = z.array(SkillSummarySchema);\nconst SkillSummaryDetailResponseSchema = SkillSummarySchema.nullable();\nconst RecentResourceKindSchema = z.enum([\n\t\"agent\",\n\t\"workflow\",\n\t\"skill\"\n]);\nconst RecentResourceSourceSchema = z.enum([\"owned\", \"shared\"]);\nconst RecentResourceSchema = z.object({\n\tid: z.string().min(1),\n\tresourceKind: RecentResourceKindSchema,\n\tresourceId: z.string().min(1),\n\tname: z.string().min(1),\n\tdescription: z.string().optional(),\n\tprojectId: z.string().min(1),\n\tprojectName: z.string().min(1),\n\tsourcePath: z.string().min(1).optional(),\n\tsource: RecentResourceSourceSchema,\n\tlastOpenedAt: z.string().min(1),\n\tlastModifiedAt: z.string().min(1)\n});\nconst RecentResourceListResponseSchema = z.array(RecentResourceSchema);\n//#endregion\n//#region src/schemas/workflow-canvas-envelope.ts\n/** Whether the overview is still being produced or finished. */\nconst WorkflowOverviewStatusSchema = z.enum([\"generating\", \"ready\"]);\n/** One phase of the guided-tour overview. */\nconst WorkflowPhaseSchema = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tcopy: z.string(),\n\tnodeIds: z.array(z.string())\n});\n/** LLM-generated overview envelope. */\nconst WorkspaceWorkflowOverviewSchema = z.object({\n\tstatus: WorkflowOverviewStatusSchema,\n\tsummary: z.string(),\n\tphases: z.array(WorkflowPhaseSchema),\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Subset of JSON-Schema field types the dashboard form renders inline. */\nconst WorkflowInputFieldTypeSchema = z.enum([\n\t\"string\",\n\t\"number\",\n\t\"boolean\",\n\t\"enum\",\n\t\"object\",\n\t\"array\",\n\t\"file\"\n]);\nconst WorkflowInputFieldSchema = z.lazy(() => z.object({\n\tkey: z.string(),\n\tlabel: z.string(),\n\ttype: WorkflowInputFieldTypeSchema,\n\trequired: z.boolean(),\n\tdescription: z.string().optional(),\n\tplaceholder: z.string().optional(),\n\toptions: z.array(z.string()).optional(),\n\tdefault: z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean()\n\t]).optional(),\n\tminimum: z.number().optional(),\n\tmaximum: z.number().optional(),\n\tchildren: z.array(WorkflowInputFieldSchema).optional(),\n\tformat: z.string().optional()\n}));\n/** Flat, render-ready view of a workflow's input schema. */\nconst WorkflowInputSchemaSchema = z.object({ fields: z.array(WorkflowInputFieldSchema) });\n/** A workflow's run-input contract plus its persisted values. */\nconst WorkflowRunInputsSchema = z.object({\n\tschema: WorkflowInputSchemaSchema,\n\tvalues: z.record(z.string(), z.unknown()).nullable()\n});\n/** Response of the manual workflow-run route (`POST /workflows/:id/run`). */\nconst WorkflowRunResponseSchema = z.object({ runId: z.string() });\n/** Annotation lifecycle: \"generating\" while the LLM pass streams in, then \"ready\". */\nconst WorkflowCanvasStatusSchema = z.enum([\"generating\", \"ready\"]);\n/** LLM-produced enrichment for a single skeleton node. */\nconst WorkflowCanvasAnnotationSchema = z.object({\n\tlabel: z.string().optional(),\n\tdescription: z.string().optional()\n});\n/**\n* One token of a configured input value (inspector form). Mirrors the producer's\n* raw token kinds, with display fields filled by the platform join: `reference`\n* gains a human `sourceLabel`; `variable` may gain a `resolvedValue` when the name\n* matches a known top-level constant.\n*/\nconst WorkflowNodeValueTokenSchema = z.discriminatedUnion(\"kind\", [\n\tz.object({\n\t\tkind: z.literal(\"text\"),\n\t\ttext: z.string()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"reference\"),\n\t\tsourceNodeId: z.string().optional(),\n\t\tsourceLabel: z.string(),\n\t\tfield: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"variable\"),\n\t\ttext: z.string(),\n\t\t/** Concrete value when `text` resolves to a top-level literal constant. */\n\t\tresolvedValue: z.string().optional()\n\t}),\n\tz.object({\n\t\tkind: z.literal(\"call\"),\n\t\tname: z.string()\n\t})\n]);\n/** The configured value of one input at this call site. */\nconst WorkflowNodeInputBindingSchema = z.object({\n\ttokens: z.array(WorkflowNodeValueTokenSchema),\n\tmultiline: z.boolean().optional()\n});\n/** An inspector input with optional call-site binding. */\nconst WorkflowCanvasNodeInputSchema = WorkflowInputFieldSchema.and(z.object({\n\tbinding: WorkflowNodeInputBindingSchema.optional(),\n\tadditional: z.boolean().optional()\n}));\n/** Authored, deterministic metadata for a single node. */\nconst WorkflowCanvasNodeMetaSchema = z.object({\n\tkind: z.enum([\n\t\t\"action\",\n\t\t\"agent\",\n\t\t\"workflow\",\n\t\t\"llm\",\n\t\t\"trigger\",\n\t\t\"boundary\"\n\t]),\n\tslug: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\tappSlug: z.string().optional(),\n\tinputs: z.array(WorkflowCanvasNodeInputSchema),\n\toutputs: z.array(WorkflowInputFieldSchema),\n\trequiredApps: z.array(z.string()).optional(),\n\tmodel: z.string().optional(),\n\ttoolCount: z.number().int().nonnegative().optional()\n});\n/** The workflow canvas envelope. */\nconst WorkflowCanvasSchema = z.object({\n\tgraph: WorkflowCanvasGraphSchema,\n\tnodeMetadata: z.record(z.string(), WorkflowCanvasNodeMetaSchema),\n\tannotations: z.record(z.string(), WorkflowCanvasAnnotationSchema),\n\tstatus: WorkflowCanvasStatusSchema,\n\thash: z.string(),\n\tgeneratedAt: z.string().nullable(),\n\tmodel: z.string()\n});\n/** Per-node execution state for a single run. */\nconst WorkflowCanvasNodeRunStatusSchema = z.enum([\n\t\"pending\",\n\t\"running\",\n\t\"succeeded\",\n\t\"failed\",\n\t\"skipped\"\n]);\nconst WorkflowCanvasNodeRunStateSchema = z.object({\n\tstatus: WorkflowCanvasNodeRunStatusSchema,\n\titeration: z.object({\n\t\tindex: z.number().int().nonnegative(),\n\t\ttotal: z.number().int().nonnegative()\n\t}).optional()\n});\n/** Overall lifecycle of a run as the canvas animates it. */\nconst WorkflowCanvasRunStatusSchema = z.enum([\n\t\"running\",\n\t\"succeeded\",\n\t\"failed\",\n\t\"canceled\"\n]);\n/** A run projected onto the canvas. */\nconst WorkflowCanvasRunSchema = z.object({\n\trunId: z.string(),\n\tstatus: WorkflowCanvasRunStatusSchema,\n\tstartedAt: z.string(),\n\tfinishedAt: z.string().nullable(),\n\tnodeStates: z.record(z.string(), WorkflowCanvasNodeRunStateSchema)\n});\n/** Scope a credential instance lives in. */\nconst WorkflowCredentialScopeSchema = z.enum([\n\t\"organization\",\n\t\"project\",\n\t\"user\"\n]);\n/** The concrete credential instance a binding currently resolves to. */\nconst WorkflowResolvedCredentialSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tscope: WorkflowCredentialScopeSchema,\n\tappSlug: z.string().optional(),\n\tisDefault: z.boolean().optional(),\n\tprojectId: z.string().optional(),\n\tprojectName: z.string().optional()\n});\n/** Default model for the gated code-block annotation pass — cheap, same as trigger overviews. */\nconst DEFAULT_WORKFLOW_CANVAS_MODEL = \"deepseek/deepseek-v4-flash\";\n/** Map of canvas node id → LLM annotation. v1 only ever annotates `code-block` nodes. */\nconst WorkflowCanvasAnnotationsSchema = z.record(z.string(), WorkflowCanvasAnnotationSchema);\n/** One opaque code-block the annotation pass should label, keyed by its canvas node id. */\nconst WorkflowCanvasAnnotationCodeBlockSchema = z.object({\n\tnodeId: z.string(),\n\t/** The raw source snippet (the node's label) the LLM turns into human copy. */\n\tsource: z.string()\n});\n/** Inputs the worker feeds the LLM for the gated code-block annotation pass. */\nconst WorkflowCanvasAnnotationsInputSchema = z.object({\n\tworkflowName: z.string(),\n\tworkflowDescription: z.string().nullable(),\n\tcodeBlocks: z.array(WorkflowCanvasAnnotationCodeBlockSchema)\n});\n/** Queue payload the platform enqueues for the worker `workflow-canvas-annotations` job. */\nconst WorkflowCanvasAnnotationsJobPayloadSchema = z.object({\n\tworkflowId: z.string(),\n\tprojectId: z.string(),\n\thash: z.string(),\n\tmodel: z.string(),\n\tinput: WorkflowCanvasAnnotationsInputSchema\n});\n/** Default model for the workflow overview pass — cheap, same as the annotation/trigger passes. */\nconst DEFAULT_WORKFLOW_OVERVIEW_MODEL = \"deepseek/deepseek-v4-flash\";\n/** One node as the overview LLM sees it (derived from the canvas node metadata + graph). */\nconst WorkflowOverviewNodeSchema = z.object({\n\tnodeId: z.string(),\n\tlabel: z.string(),\n\tkind: z.string(),\n\tdescription: z.string().optional(),\n\t/** App/integration slug for steps imported from a `@keystrokehq/<app>` package. */\n\tappSlug: z.string().optional(),\n\t/** Authored input field keys (from the action/agent/workflow definition). */\n\tinputs: z.array(z.string()).optional(),\n\t/** Authored output field keys. */\n\toutputs: z.array(z.string()).optional(),\n\t/** Agent-only: the model the agent runs on. */\n\tmodel: z.string().optional(),\n\t/** Agent-only: number of tools available to the agent. */\n\ttoolCount: z.number().int().nonnegative().optional()\n});\n/** Inputs the worker feeds the LLM to produce the workflow overview (summary + phases). */\nconst WorkflowOverviewInputSchema = z.object({\n\tworkflowName: z.string(),\n\tworkflowDescription: z.string().nullable(),\n\t/** Display labels of the trigger sources upstream of the workflow (read-only context). */\n\ttriggers: z.array(z.string()),\n\tnodes: z.array(WorkflowOverviewNodeSchema),\n\t/** The workflow's TypeScript source (best-effort; null when the deploy has no source snapshot). */\n\tsource: z.string().nullable()\n});\n/** Queue payload the platform enqueues for the worker `workflow-overview` job. */\nconst WorkflowOverviewJobPayloadSchema = z.object({\n\tworkflowId: z.string(),\n\tprojectId: z.string(),\n\thash: z.string(),\n\tmodel: z.string(),\n\tinput: WorkflowOverviewInputSchema\n});\nconst WorkflowCanvasCredentialBindingBaseSchema = z.object({\n\tcredentialKey: z.string(),\n\tlabel: z.string(),\n\tappSlug: z.string().optional()\n});\n/** How one credential requirement on a step currently resolves. */\nconst WorkflowCanvasCredentialBindingSchema = z.union([\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.enum([\n\t\t\t\"project-default\",\n\t\t\t\"org-default\",\n\t\t\t\"assigned\"\n\t\t]),\n\t\tinstance: WorkflowResolvedCredentialSchema\n\t}),\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.literal(\"scope-pinned\"),\n\t\tpinnedScope: WorkflowCredentialScopeSchema,\n\t\tinstance: WorkflowResolvedCredentialSchema\n\t}),\n\tWorkflowCanvasCredentialBindingBaseSchema.extend({\n\t\tpolicy: z.literal(\"unresolved\"),\n\t\treason: z.enum([\"needs-selection\", \"missing\"]),\n\t\tpinnedScope: WorkflowCredentialScopeSchema.optional()\n\t})\n]);\n/** Live credential overlay: canvas node id → its step's credential bindings. */\nconst WorkflowCanvasCredentialBindingsSchema = z.record(z.string(), z.array(WorkflowCanvasCredentialBindingSchema));\n//#endregion\n//#region src/schemas/published-forms.ts\nconst FormControlSchema = z.enum([\n\t\"input\",\n\t\"textarea\",\n\t\"select\",\n\t\"radio\",\n\t\"stepper\",\n\t\"slider\",\n\t\"checkbox\",\n\t\"switch\"\n]);\nconst controlsForFieldType = {\n\tstring: [\"input\", \"textarea\"],\n\tnumber: [\n\t\t\"input\",\n\t\t\"stepper\",\n\t\t\"slider\"\n\t],\n\tboolean: [\"checkbox\", \"switch\"],\n\tenum: [\"select\", \"radio\"],\n\tobject: [],\n\tarray: [],\n\tfile: []\n};\nconst FormFieldConfigEntrySchema = z.object({\n\tlabel: z.string().trim().min(1).max(120).optional(),\n\thelpText: z.string().trim().min(1).max(300).optional(),\n\tplaceholder: z.string().trim().min(1).max(200).optional(),\n\tcontrol: FormControlSchema.optional()\n});\nconst FormFieldConfigSchema = z.record(z.string(), FormFieldConfigEntrySchema);\nconst PublicFormFieldSchema = WorkflowInputFieldSchema.and(z.object({\n\tcontrol: FormControlSchema.optional(),\n\thelpText: z.string().optional()\n}));\nconst PublishedFormSchema = z.object({\n\tid: z.string().min(1),\n\tworkflowId: z.string().min(1),\n\tworkflowSlug: z.string().min(1),\n\tenabled: z.boolean(),\n\ttitle: z.string().min(1).nullable(),\n\tdescription: z.string().min(1).nullable(),\n\tfieldConfig: FormFieldConfigSchema,\n\tpublicUrl: z.string().url(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\n/** Catalog row for org/project form lists (no workflow runtime id required). */\nconst PublishedFormListItemSchema = z.object({\n\tid: z.string().min(1),\n\tprojectId: z.string().min(1),\n\tworkflowSlug: z.string().min(1),\n\tenabled: z.boolean(),\n\ttitle: z.string().min(1).nullable(),\n\tdescription: z.string().min(1).nullable(),\n\tfieldConfig: FormFieldConfigSchema,\n\tpublicUrl: z.string().url(),\n\tcreatedAt: z.string().min(1),\n\tupdatedAt: z.string().min(1)\n});\nconst PublishedFormListResponseSchema = z.array(PublishedFormListItemSchema);\nconst WorkflowFormResponseSchema = PublishedFormSchema.nullable();\nconst WorkflowFormUpsertBodySchema = z.object({\n\tenabled: z.boolean().optional(),\n\ttitle: z.string().trim().min(1).max(120).nullable().optional(),\n\tdescription: z.string().trim().min(1).max(500).nullable().optional(),\n\tfieldConfig: FormFieldConfigSchema.optional()\n});\nconst PublicFormMetadataSchema = z.object({\n\ttitle: z.string().min(1),\n\tdescription: z.string().nullable(),\n\tfields: z.array(PublicFormFieldSchema),\n\tbranding: z.object({\n\t\torganizationName: z.string().min(1),\n\t\tprojectName: z.string().min(1),\n\t\tlogoLightUrl: z.string().url().nullable(),\n\t\tlogoDarkUrl: z.string().url().nullable(),\n\t\tlogoHeightPx: z.number().int().positive()\n\t})\n});\nconst PublicFormSubmitBodySchema = z.object({\n\tvalues: z.record(z.string(), z.unknown()),\n\twebsite: z.string().max(200).optional()\n});\nconst PublicFormSubmitResponseSchema = z.object({ ok: z.literal(true) });\nfunction defaultControlForField(field) {\n\tswitch (field.type) {\n\t\tcase \"string\": return \"input\";\n\t\tcase \"number\": return \"input\";\n\t\tcase \"boolean\": return \"checkbox\";\n\t\tcase \"enum\": return \"select\";\n\t\tdefault: return;\n\t}\n}\nfunction controlsForWorkflowInputField(field) {\n\tconst controls = controlsForFieldType[field.type];\n\tif (field.type === \"number\" && (field.minimum === void 0 || field.maximum === void 0)) return controls.filter((control) => control !== \"slider\");\n\treturn controls;\n}\nfunction validateFormFieldConfig(inputSchema, fieldConfig) {\n\tconst fields = new Map(inputSchema.fields.map((field) => [field.key, field]));\n\tfor (const [key, config] of Object.entries(fieldConfig)) {\n\t\tconst field = fields.get(key);\n\t\tif (!field) return {\n\t\t\tok: false,\n\t\t\terror: `Unknown field \"${key}\"`\n\t\t};\n\t\tif (config.control !== void 0 && !controlsForWorkflowInputField(field).includes(config.control)) return {\n\t\t\tok: false,\n\t\t\terror: `Control \"${config.control}\" is not supported for field \"${key}\"`\n\t\t};\n\t}\n\treturn { ok: true };\n}\n/**\n* Applies valid presentation configuration to live workflow fields. Invalid\n* stored entries are ignored so a deployed schema change cannot break a form.\n*/\nfunction resolvePublicFormFields(inputSchema, fieldConfig) {\n\treturn inputSchema.fields.map((field) => {\n\t\tconst config = fieldConfig[field.key];\n\t\tconst control = config?.control && controlsForWorkflowInputField(field).includes(config.control) ? config.control : defaultControlForField(field);\n\t\treturn {\n\t\t\t...field,\n\t\t\t...config?.label ? { label: config.label } : {},\n\t\t\t...config?.helpText ? { helpText: config.helpText } : {},\n\t\t\t...config?.placeholder ? { placeholder: config.placeholder } : {},\n\t\t\t...control ? { control } : {}\n\t\t};\n\t});\n}\nfunction schemaHasFileFields(inputSchema) {\n\treturn inputSchema.fields.some((field) => field.type === \"file\");\n}\n/** Public forms support scalar inputs and arrays of scalar inputs, not JSON objects. */\nfunction schemaHasUnsupportedFormFields(inputSchema) {\n\treturn inputSchema.fields.some((field) => {\n\t\tif (field.type === \"object\") return true;\n\t\tif (field.type !== \"array\") return false;\n\t\tconst item = field.children?.[0];\n\t\treturn !item || item.type === \"object\" || item.type === \"array\" || item.type === \"file\";\n\t});\n}\n//#endregion\n//#region src/schemas/project-pull-state.ts\n/** Relative path written after a local pull or MCP workspace hydration. */\nconst PROJECT_PULL_STATE_RELATIVE_PATH = \".keystroke/pull-state.json\";\nconst ProjectPullStateSchema = z.object({\n\tprojectId: z.string(),\n\tartifactId: z.string(),\n\tpulledAt: z.string().datetime()\n});\n//#endregion\n//#region src/schemas/agent-memory-files.ts\n/** A single memory file exposed to the dashboard (no contents in list responses). */\nconst AgentMemoryFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\nconst ListAgentMemoryFilesResponseSchema = z.object({ files: z.array(AgentMemoryFileSummarySchema) });\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction agentMemoryFileId(path) {\n\treturn projectFileId(path);\n}\n//#endregion\n//#region src/schemas/agent-workspace-files.ts\n/** A single workspace file exposed to the dashboard (no contents in list responses). */\nconst AgentWorkspaceFileSummarySchema = z.object({\n\tid: z.string(),\n\tpath: z.string().min(1)\n});\nconst ListAgentWorkspaceFilesResponseSchema = z.object({ files: z.array(AgentWorkspaceFileSummarySchema) });\n/** Stable, path-derived file id (used by the web for selection + deep links). */\nfunction agentWorkspaceFileId(path) {\n\treturn projectFileId(path);\n}\n//#endregion\n//#region src/schemas/workflow-input-schema-from-json.ts\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction titleCaseKey(key) {\n\treturn key.replace(/([a-z0-9])([A-Z])/g, \"$1 $2\").split(/[-_/]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(\" \");\n}\n/**\n* A `FilePartSchema` object: `{ type: \"file\", mediaType, url, filename? }`.\n* Detected structurally so an array of these renders as a file-upload widget.\n*/\nfunction isFilePartSchema(schema) {\n\tif (schema.type !== \"object\" || !isObject(schema.properties)) return false;\n\tconst props = schema.properties;\n\tconst typeProp = props.type;\n\treturn isObject(typeProp) && (typeProp.const === \"file\" || Array.isArray(typeProp.enum) && typeProp.enum.length === 1 && typeProp.enum[0] === \"file\") && isObject(props.url) && isObject(props.mediaType);\n}\nfunction normalizeFieldType(schema) {\n\tif (isFilePartSchema(schema)) return \"file\";\n\tif (schema.type === \"array\" && isObject(schema.items) && isFilePartSchema(schema.items)) return \"file\";\n\tconst rawType = schema.type;\n\tif (Array.isArray(rawType)) {\n\t\tconst primary = rawType.find((entry) => entry !== \"null\");\n\t\tif (typeof primary === \"string\") return normalizeFieldType({\n\t\t\t...schema,\n\t\t\ttype: primary\n\t\t});\n\t\treturn null;\n\t}\n\tif (typeof rawType !== \"string\") return null;\n\tif (Array.isArray(schema.enum) && schema.enum.every((entry) => typeof entry === \"string\")) return \"enum\";\n\tswitch (rawType) {\n\t\tcase \"string\":\n\t\tcase \"number\":\n\t\tcase \"integer\": return rawType === \"integer\" ? \"number\" : rawType;\n\t\tcase \"boolean\": return \"boolean\";\n\t\tcase \"object\": return \"object\";\n\t\tcase \"array\": return \"array\";\n\t\tdefault: return null;\n\t}\n}\nfunction normalizeField(key, schema, required) {\n\tconst type = normalizeFieldType(schema);\n\tif (!type) return null;\n\tconst field = {\n\t\tkey,\n\t\tlabel: typeof schema.title === \"string\" ? schema.title : titleCaseKey(key),\n\t\ttype,\n\t\trequired,\n\t\t...typeof schema.description === \"string\" ? { description: schema.description } : {},\n\t\t...typeof schema.placeholder === \"string\" ? { placeholder: schema.placeholder } : {},\n\t\t...typeof schema.format === \"string\" ? { format: schema.format } : {},\n\t\t...typeof schema.minimum === \"number\" ? { minimum: schema.minimum } : {},\n\t\t...typeof schema.maximum === \"number\" ? { maximum: schema.maximum } : {}\n\t};\n\tif (type === \"enum\" && Array.isArray(schema.enum)) field.options = schema.enum.filter((entry) => typeof entry === \"string\");\n\tif (type === \"file\") {\n\t\tfield.format = schema.type === \"array\" ? \"file-multiple\" : \"file-single\";\n\t\treturn field;\n\t}\n\tif (schema.default !== void 0 && (typeof schema.default === \"string\" || typeof schema.default === \"number\" || typeof schema.default === \"boolean\")) field.default = schema.default;\n\tif (type === \"object\" && isObject(schema.properties)) {\n\t\tconst childRequired = Array.isArray(schema.required) ? schema.required.filter((entry) => typeof entry === \"string\") : [];\n\t\tfield.children = Object.entries(schema.properties).flatMap(([childKey, childSchema]) => {\n\t\t\tif (!isObject(childSchema)) return [];\n\t\t\tconst child = normalizeField(childKey, childSchema, childRequired.includes(childKey));\n\t\t\treturn child ? [child] : [];\n\t\t});\n\t}\n\tif (type === \"array\" && isObject(schema.items)) {\n\t\tconst item = normalizeField(\"item\", schema.items, false);\n\t\tif (item) field.children = [item];\n\t}\n\treturn field;\n}\n/** Normalize a workflow manifest JSON Schema into the dashboard run-input form shape. */\nfunction jsonSchemaToWorkflowInputSchema(requestSchema) {\n\tif (!isObject(requestSchema)) return { fields: [] };\n\tconst properties = isObject(requestSchema.properties) ? requestSchema.properties : {};\n\tconst required = Array.isArray(requestSchema.required) ? requestSchema.required.filter((entry) => typeof entry === \"string\") : [];\n\treturn { fields: Object.entries(properties).flatMap(([key, propertySchema]) => {\n\t\tif (!isObject(propertySchema)) return [];\n\t\tconst field = normalizeField(key, propertySchema, required.includes(key));\n\t\treturn field ? [field] : [];\n\t}) };\n}\nfunction isEmpty(value) {\n\treturn value === void 0 || value === null || value === \"\";\n}\nfunction validateFieldValue(field, value) {\n\tif (field.required && isEmpty(value)) return \"Required\";\n\tif (isEmpty(value)) return null;\n\tswitch (field.type) {\n\t\tcase \"file\":\n\t\t\tif (field.required && Array.isArray(value) && value.length === 0) return \"Required\";\n\t\t\treturn null;\n\t\tcase \"number\":\n\t\t\tif (typeof value !== \"number\" && Number.isNaN(Number(value))) return \"Must be a number\";\n\t\t\treturn null;\n\t\tcase \"boolean\":\n\t\t\tif (typeof value !== \"boolean\") return \"Must be a boolean\";\n\t\t\treturn null;\n\t\tcase \"enum\":\n\t\t\tif (typeof value !== \"string\" || field.options && !field.options.includes(value)) return \"Invalid option\";\n\t\t\treturn null;\n\t\tdefault: return null;\n\t}\n}\n/** Validate a run-input payload against the normalized schema (authoritative on save). */\nfunction validateWorkflowRunInputValues(schema, values) {\n\tconst allowedKeys = new Set(schema.fields.map((field) => field.key));\n\tfor (const key of Object.keys(values)) if (!allowedKeys.has(key)) return {\n\t\tok: false,\n\t\terror: `Unknown field \"${key}\"`\n\t};\n\tfor (const field of schema.fields) {\n\t\tconst message = validateFieldValue(field, values[field.key]);\n\t\tif (message) return {\n\t\t\tok: false,\n\t\t\terror: `${field.key}: ${message}`\n\t\t};\n\t}\n\treturn { ok: true };\n}\n//#endregion\n//#region src/schemas/workflow-run-inputs.ts\nconst WorkflowRunInputsPutBodySchema = z.record(z.string(), z.unknown());\n//#endregion\n//#region src/mappers/organizations.ts\nfunction mapOrganization(row) {\n\treturn OrganizationSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tverified: row.verifiedAt != null,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapProject(row) {\n\treturn ProjectSchema.parse({\n\t\tid: row.id,\n\t\torganizationId: row.organizationId,\n\t\tname: row.name,\n\t\tslug: row.slug,\n\t\tdescription: row.description,\n\t\tstatus: row.status,\n\t\tbaseUrl: row.baseUrl,\n\t\truntimeId: row.runtimeId,\n\t\tlastError: row.lastError,\n\t\tactiveArtifactId: row.activeArtifactId,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\nfunction mapUserOrganization(row) {\n\treturn UserOrganizationSchema.parse({\n\t\torganization: mapOrganization(row.organization),\n\t\trole: row.role\n\t});\n}\n//#endregion\n//#region src/mappers/members.ts\nfunction mapOrganizationMember(row) {\n\treturn OrganizationMemberSchema.parse({\n\t\tid: row.id,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\t...row.image ? { avatarUrl: row.image } : {},\n\t\tjoinedAt: row.createdAt.toISOString(),\n\t\tlastActiveAt: null\n\t});\n}\nfunction mapOrganizationInvitation(row) {\n\treturn OrganizationInvitationSchema.parse({\n\t\tid: row.id,\n\t\torganizationName: row.organizationName,\n\t\torganizationSlug: row.organizationSlug,\n\t\trole: row.role,\n\t\t...row.invitedByName ? { invitedByName: row.invitedByName } : {},\n\t\t...row.invitedByEmail ? { invitedByEmail: row.invitedByEmail } : {}\n\t});\n}\n//#endregion\n//#region src/mappers/project-members.ts\nfunction mapProjectMember(row, options) {\n\treturn ProjectMemberSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tname: row.name,\n\t\temail: row.email,\n\t\trole: row.role,\n\t\tstatus: row.status,\n\t\timage: row.image,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tisCurrentUser: options?.isCurrentUser\n\t});\n}\nfunction mapProjectSettings(row) {\n\treturn {\n\t\tdescription: row.description ?? \"\",\n\t\tdefaultRole: row.defaultMemberRole,\n\t\tinvitePermission: row.invitePermission\n\t};\n}\n//#endregion\n//#region src/mappers/project-artifacts.ts\nfunction mapProjectArtifact(row) {\n\treturn ProjectArtifactSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tstorageKey: row.storageKey,\n\t\tstatus: row.status,\n\t\tsourceCommitSha: row.sourceCommitSha ?? null,\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tupdatedAt: row.updatedAt.toISOString()\n\t});\n}\n//#endregion\n//#region src/mappers/project-deployments.ts\nfunction mapProjectDeployment(row) {\n\treturn ProjectDeploymentSchema.parse({\n\t\tid: row.id,\n\t\tprojectId: row.projectId,\n\t\tversion: row.version,\n\t\tdeployedBy: row.deployedByName,\n\t\t...row.deployedByEmail ? { deployedByEmail: row.deployedByEmail } : {},\n\t\t...row.deployedByAvatarUrl ? { deployedByAvatarUrl: row.deployedByAvatarUrl } : {},\n\t\tcreatedAt: row.createdAt.toISOString(),\n\t\tactive: row.active\n\t});\n}\n//#endregion\nexport { ACTIVE_ORG_COOKIE, ACTIVE_ORG_HEADER, AGENT_CONTEXT_CLOSE, AGENT_CONTEXT_OPEN, AGENT_TOOL_INPUT, ANALYTICS_ID_HEADER, ANALYTICS_SESSION_HEADER, APP_SLUG_TAKEN_MESSAGE, AcceptOrganizationInvitationResponseSchema, ActionsCatalogShardSchema, ActiveOrganizationResponseSchema, ActiveProjectSourceRevisionSchema, AgentListResponseSchema, AgentManifestShardSchema, AgentMemoryFileSummarySchema, AgentSessionDetailQuerySchema, AgentSessionDetailResponseSchema, AgentSessionListQuerySchema, AgentSessionListResponseSchema, AgentSummaryDetailResponseSchema, AgentSummaryListResponseSchema, AgentSummarySchema, AgentTriggerOriginSchema, AgentTriggerStatusSchema, AgentTriggerSummaryListResponseSchema, AgentTriggerSummarySchema, AgentTriggerTypeSchema, AgentWorkspaceFileSummarySchema, ApiKeyCreatorSchema, ApiKeySummarySchema, AppAuthKindSchema, AppCatalogEntrySchema, AppCatalogMetadataSchema, AppCatalogSummarySchema, AppCredentialConnectionKindSchema, AppCredentialFieldSchema, AppCredentialFieldsSchema, AppCredentialSchemeSchema, AppCredentialScopeSchema, AppCredentialSummarySchema, AppGatewaySchema, AppRecordSchema, AppSeedEntrySchema, AppSlugAvailabilityQuerySchema, AppSlugAvailabilityResponseSchema, AppSlugSchema, AppSourceSchema, AssignCredentialBodySchema, AutoTopupSummarySchema, BillingActivityEntrySchema, BillingActivityResponseSchema, BillingInvoiceUrlResponseSchema, BillingRedirectResponseSchema, BillingSummaryResponseSchema, BillingUsageEventSourceSchema, BillingUsageKeySourceSchema, BillingUsageMeterKeySchema, BillingUsageMeterSchema, BillingUsageResponseSchema, BillingUsageRunKindSchema, BindAgentSlackAppBodySchema, BindChannelBodySchema, CHAT_ATTACHMENT_ALLOWED_MEDIA_TYPES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENT_MAX_COUNT, CHAT_ATTACHMENT_TYPES, CLIENT_CHANNEL_HEADER, CREDENTIAL_ASSIGNMENT_WILDCARD, CREDENTIAL_AUTH_KINDS, CREDENTIAL_SCOPE_TYPES, CancelManagedDeployRequestSchema, CancelManagedDeployResponseSchema, CatalogActionDetailResponseSchema, CatalogActionDetailSchema, CatalogActionSummarySchema, CatalogActionsPageResponseSchema, CatalogActionsPageSchema, CatalogAppDetailResponseSchema, CatalogAppDetailSchema, CatalogAppSummarySchema, CatalogAppsPageResponseSchema, CatalogAppsPageSchema, ChannelAccountListResponseSchema, ChannelAccountMetadataSchema, ChannelAccountSchema, ChannelBindingKindSchema, ChannelBindingSchema, ChannelBindingTargetKindSchema, ChannelCapabilitiesSchema, ChannelCardSupportSchema, ChannelConnectionListResponseSchema, ChannelConnectionSchema, ChannelDirectoryEntrySchema, ChannelDirectoryListResponseSchema, ChannelListenModeSchema, ChannelPlatformKeySchema, ChannelPlatformSchema, ChannelReactionSupportSchema, ChannelStreamingSupportSchema, ChatAttachmentInputSchema, ClaimableOrganizationSlugSchema, CompleteManagedDeployArtifactRequestSchema, CompleteManagedDeployArtifactResponseSchema, CompleteManagedDeployModularRequestSchema, CompleteManagedDeployTarballRequestSchema, CompleteProjectArtifactRequestSchema, CompleteProjectArtifactResponseSchema, ConfiguredProjectGitStatusSchema, ConfirmCheckoutRequestSchema, ConfirmCheckoutResponseSchema, ConnectAuthorizeUrlResponseSchema, ConnectManagedServiceCredentialRequestSchema, ConnectProvidersResponseSchema, CreateApiKeyRequestSchema, CreateApiKeyResponseSchema, CreateBillingPortalRequestSchema, CreateCredentialInstanceBodySchema, CreateCredentialsRequestSchema, CreateCredentialsResponseSchema, CreateCreditsCheckoutRequestSchema, CreateCustomAppRequestSchema, CreateCustomAppResponseSchema, CreateDraftCommitRequestSchema, CreateDraftDiffCommitRequestSchema, CreateOrganizationRequestSchema, CreateOrganizationResponseSchema, CreateProjectArtifactRequestSchema, CreateProjectArtifactResponseSchema, CreateProjectRequestSchema, CreateProjectResponseSchema, CreateSlackAppRequestSchema, CreateSlackAppResponseSchema, CreateSlackChannelBodySchema, CreateSlackChannelResponseSchema, CreateSubscriptionCheckoutRequestSchema, CredentialAccessUnavailableErrorBodySchema, CredentialAccessUnavailableReasonSchema, CredentialAssignmentListQuerySchema, CredentialAssignmentListResponseSchema, CredentialAssignmentRecordSchema, CredentialAssignmentTargetTypeSchema, CredentialAuthKindSchema, CredentialConsumerListQuerySchema, CredentialConsumerListResponseSchema, CredentialConsumerSummarySchema, CredentialInstanceListResponseSchema, CredentialInstanceRecordSchema, CredentialMaterializeRequestSchema, CredentialMaterializeResponseSchema, CredentialRequirementSummarySchema, CredentialScopeTypeSchema, CredentialTargetsFieldsSchema, CreditPackSchema, CurrentOrganizationResponseSchema, CustomAppDetailSchema, DEFAULT_CLOUD_PLATFORM_ORIGIN, DEFAULT_LOGO_HEIGHT_PX, DEFAULT_MCP_API_KEY_PLACEMENT, DEFAULT_ORGANIZATION_SIDEBAR_BRANDING, DEFAULT_PLAN_KEY, DEFAULT_TRIGGER_OVERVIEW_MODEL, DEFAULT_USER_PREFERENCES, DEFAULT_WORKFLOW_CANVAS_MODEL, DEFAULT_WORKFLOW_OVERVIEW_MODEL, DISCOVERY_CONVENTIONS, DOCS_MCP_PATH, DOCS_QUERY_TOOL, DOCS_SEARCH_TOOL, DRAFT_SNAPSHOT_PLACEHOLDER_COMMIT_SHA, DbProxyQueryRequestSchema, DbProxyQueryResponseSchema, DbProxyQuerySchema, DeclineOrganizationInvitationResponseSchema, DownloadActiveProjectArtifactResponseSchema, DownloadActiveProjectSourceFileSchema, DownloadActiveProjectSourceResponseSchema, DraftCommitFileChangeSchema, DraftCommitResponseSchema, DraftConflictResponseSchema, DraftFileContentQuerySchema, DraftFileContentResponseSchema, DraftRevisionResponseSchema, DraftUpdateEventSchema, DuplicateCredentialRequestSchema, DuplicateCredentialsResponseSchema, ErrorResponseCodeSchema, ErrorResponseSchema, ExecuteKeystrokeToolErrorCodeSchema, ExecuteKeystrokeToolErrorResponseSchema, ExecuteKeystrokeToolRequestSchema, FilePartSchema, FinalizeCustomAppLogoRequestSchema, FinalizeCustomAppLogoResponseSchema, FormControlSchema, FormFieldConfigEntrySchema, FormFieldConfigSchema, GatewayAttachmentListResponseSchema, GatewayAttachmentRecordSchema, GetAppCatalogEntryResponseSchema, GetCredentialResponseSchema, GetCustomAppResponseSchema, GetTemplateResponseSchema, GraphqlDiscoverRequestSchema, GraphqlDiscoverResponseSchema, HELLO_WORLD_TEMPLATE_SLUGS, HealthResponseSchema, HeartbeatManagedDeployRequestSchema, HeartbeatManagedDeployResponseSchema, HistoryAgentCompactionEventSchema, HistoryAgentPromptFinishEventSchema, HistoryAgentSessionDetailSchema, HistoryRunCancelResponseSchema, HistoryRunDetailResponseSchema, HistoryRunDetailSchema, HistoryRunKindSchema, HistoryRunListQuerySchema, HistoryRunListResponseSchema, HistoryRunSchema, HistoryRunStatusSchema, HistoryTraceSchema, HistoryWorkflowRunDetailSchema, InternalAnalyzeFilteredDeployRequestSchema, InternalAnalyzeFilteredDeployResultSchema, InvitableOrganizationMemberRoleSchema, InviteOrganizationMembersRequestSchema, InviteOrganizationMembersResponseSchema, InviteProjectMembersRequestSchema, InviteProjectMembersResponseSchema, KeystrokeCredentialSchema, LLM_KEY_SOURCE_HEADER, LLM_PROVIDER_SLUGS, LLM_RUN_ID_HEADER, LLM_RUN_KIND_HEADER, LLM_SKIP_USAGE_HEADER, LOCAL_PLATFORM_ORIGIN, ListAgentMemoryFilesResponseSchema, ListAgentWorkspaceFilesResponseSchema, ListApiKeysResponseSchema, ListAppsResponseSchema, ListChannelPlatformsResponseSchema, ListCredentialsPageQuerySchema, ListCredentialsPageResponseSchema, ListCredentialsResponseSchema, ListDraftFilesResponseSchema, ListManagedServiceCredentialsResponseSchema, ListMcpAppToolsResponseSchema, ListMcpAppsResponseSchema, ListOrganizationInvitationsResponseSchema, ListOrganizationMembersPageQuerySchema, ListOrganizationMembersPageResponseSchema, ListOrganizationMembersResponseSchema, ListOrganizationsResponseSchema, ListProjectDeploymentsResponseSchema, ListProjectFilesResponseSchema, ListProjectMembersResponseSchema, ListProjectMetricsResponseSchema, ListProjectsResponseSchema, ListTemplatesResponseSchema, LlmProviderSlugSchema, MANAGED_DEPLOY_REQUEST_TIMEOUT_MS, MAX_LOGO_HEIGHT_PX, MCP_TOOL_EXECUTE_FAILED_STATUS, MICRO_CREDITS_PER_CREDIT, MIN_LOGO_HEIGHT_PX, ManagedDeployBaseManifestFileSchema, ManagedDeployCandidateOpSchema, ManagedDeployCandidateRecipeEntrySchema, ManagedDeployCandidateRecipeSchema, ManagedDeployExpansionSchema, ManagedDeployImpactCompletenessSchema, ManagedDeployModeSchema, ManagedDeployRequireFullCodeSchema, ManagedDeployResourceKeySchema, ManagedDeploySourceChangeKindSchema, ManagedDeploySourcePathChangeSchema, ManagedServiceCredentialSchema, ManagedServiceKindSchema, ManifestFileRefSchema, MarketingContactCompanySizeSchema, McpApiKeyCredentialValueSchema, McpApiKeyPlacementSchema, McpAppSchema, McpAppToolSchema, McpAuthProbeModeSchema, McpAuthProbeOAuthSchema, McpAuthProbeResultSchema, McpConnectionStatusSchema, McpCredentialAssignmentTargetSchema, McpDiscoverRequestSchema, McpDiscoverResponseSchema, ModuleBlobRefSchema, NewChannelBindingInputSchema, OAuthPermissionModeSchema, OAuthScopeOptionSchema, OPENAPI_JSON_SCHEMA, ORGANIZATION_SLUG_TAKEN_MESSAGE, OpenApiDiscoverRequestSchema, OpenApiDiscoverResponseSchema, OrganizationInvitationSchema, OrganizationLogoVariantSchema, OrganizationMemberRoleSchema, OrganizationMemberSchema, OrganizationMemberStatusSchema, OrganizationSchema, OrganizationSidebarBrandingPatchSchema, OrganizationSidebarBrandingSchema, OrganizationSlugErrorCodeSchema, OrganizationSlugSchema, OrganizationUserRoleSchema, PLATFORM_RESOURCE_UNSUPPORTED_COUNT, PLATFORM_RESOURCE_UNSUPPORTED_TEXT, PLATFORM_RESOURCE_UNSUPPORTED_TIMESTAMP, PNPM_FROZEN_INSTALL_ARGS, PNPM_FROZEN_INSTALL_COMMAND, PROJECT_DRAFT_COMMIT_REQUEST_TIMEOUT_MS, PROJECT_DRAFT_DIFF_MAX_BYTES, PROJECT_MANIFEST_ACTIONS_CATALOG_REL, PROJECT_MANIFEST_MODULES_DIR, PROJECT_MANIFEST_REL_PATH, PROJECT_PING_TIMEOUT_MS, PROJECT_PULL_STATE_RELATIVE_PATH, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, PROJECT_REACHABILITY_RETRY_MS, PROJECT_SLUG_TAKEN_MESSAGE, PROJECT_SOURCE_IGNORED_DIRS, PROJECT_SOURCE_IGNORED_ENV_BASENAME, PROJECT_SOURCE_IGNORED_LOG_BASENAME, PROJECT_SOURCE_MAX_FILES, PROJECT_SOURCE_MAX_FILE_BYTES, PROJECT_SOURCE_MAX_TOTAL_BYTES, PlanLimitsSchema, PlatformAgentCancelResponseSchema, PlatformAgentGenericPartSchema, PlatformAgentMessagePartSchema, PlatformAgentModelIdSchema, PlatformAgentPromptInputSchema, PlatformAgentPromptResponseSchema, PlatformAgentSessionDetailResponseSchema, PlatformAgentSessionListResponseSchema, PlatformAgentSessionStatusSchema, PlatformAgentSessionStatuses, PlatformAgentSessionSummarySchema, PlatformAgentStreamQuerySchema, PlatformAgentTextPartSchema, PlatformAgentTranscriptMessageSchema, PlatformAgentTranscriptSchema, PlatformInfoResponseSchema, PollRunRequestSchema, PollRunResponseSchema, PrepareManagedDeployRequestSchema, PrepareManagedDeployResponseSchema, PresignChatAttachmentRequestSchema, PresignChatAttachmentResponseSchema, PresignCustomAppLogoRequestSchema, PresignCustomAppLogoResponseSchema, PresignOrgLogoRequestSchema, PresignOrgLogoResponseSchema, PresignProjectSourceRequestSchema, PresignProjectSourceResponseSchema, PresignUserAvatarRequestSchema, PresignUserAvatarResponseSchema, PresignedBlobUploadSchema, ProjectArtifactIndexFileSchema, ProjectArtifactIndexSchema, ProjectArtifactSchema, ProjectArtifactStatusSchema, ProjectDeploymentSchema, ProjectFileSummarySchema, ProjectGitProviderSchema, ProjectGitRemoteRequestSchema, ProjectGitRemoteResponseSchema, ProjectGitStatusResponseSchema, ProjectInvitePermissionSchema, ProjectListMetricsSchema, ProjectManifestModuleKindSchema, ProjectManifestModuleRefSchema, ProjectManifestSchema, ProjectMemberSchema, ProjectMemberStatusSchema, ProjectPullStateSchema, ProjectReachabilityResponseSchema, ProjectRepositoryContentStatusSchema, ProjectRepositoryLifecycleStatusSchema, ProjectResponseSchema, ProjectSchema, ProjectSettingsResponseSchema, ProjectSettingsSchema, ProjectSlugAvailabilityQuerySchema, ProjectSlugAvailabilityReasonSchema, ProjectSlugAvailabilityResponseSchema, ProjectSlugSchema, ProjectSourceFileSchema, ProjectSourceResourceRefSchema, ProjectSourceResourcesSchema, ProjectStatusSchema, ProjectUserRoleSchema, PromptInputSchema, PromptResponseSchema, PublicFormFieldSchema, PublicFormMetadataSchema, PublicFormSubmitBodySchema, PublicFormSubmitResponseSchema, PublicModelsResponseSchema, PublishManagedDeployCandidateRequestSchema, PublishManagedDeployCandidateResponseSchema, PublishedFormListItemSchema, PublishedFormListResponseSchema, PublishedFormSchema, QueuedAgentPromptResponseSchema, QueuedRunResponseSchema, RESERVED_ORGANIZATION_SLUGS, ROUTE_MANIFEST_REL_PATH, RecentResourceKindSchema, RecentResourceListResponseSchema, RecentResourceSchema, RecentResourceSourceSchema, RenewManagedDeployUploadRequestSchema, RenewManagedDeployUploadResponseSchema, RunSourceKindSchema, RunSourceSchema, SANDBOX_CREDENTIAL_CONSUMER_ID, SLACK_APP_HANDLE_MAX_LENGTH, SLACK_APP_HANDLE_RESERVED, SLACK_CONNECT_FLOWS, SLACK_CUSTOM_APP_BOT_EVENTS, SLACK_CUSTOM_APP_BOT_SCOPES, SLACK_CUSTOM_APP_CREDENTIAL_SLUG, SLACK_CUSTOM_APP_SLUG_PREFIX, SLACK_GATEWAY_OAUTH_APP_KEY, SLACK_KEYSTROKE_APP_SLUG, SLACK_PERSONAL_APP_SLUG, STEP_COMPLETED_ENVELOPE_TYPE, STORED_JSON_SCHEMA_TARGET, SandboxAccessTokenSchema, SkillSummaryDetailResponseSchema, SkillSummaryListResponseSchema, SkillSummarySchema, SkipResponseSchema, SlackAgentMembershipsResponseSchema, SlackAppBoundAgentSchema, SlackAppInstallStartResponseSchema, SlackAppInstalledTeamSchema, SlackAppListResponseSchema, SlackAppManifestRequestSchema, SlackAppManifestResponseSchema, SlackAppSummarySchema, SlackMembershipChannelBodySchema, SlugAvailabilityQuerySchema, SlugAvailabilityReasonSchema, SlugAvailabilityResponseSchema, SourceBlobRefSchema, StartKeystrokeConnectionInputSchema, StartKeystrokeConnectionResultSchema, StartMcpOAuthConnectionInputSchema, StartMcpOAuthConnectionResultSchema, StartOAuthConnectionInputSchema, StartOAuthConnectionResultSchema, StepCompletedEnvelopeSchema, StoredManifestFileSchema, StoredProjectSourceManifestSchema, StoredRouteManifestSchema, StoredRouteManifestSkillSchema, SubmitAgentFeedbackRequestSchema, SubmitAgentFeedbackResponseSchema, SubmitBillingUsageEventSchema, SubmitBillingUsageRequestSchema, SubmitBillingUsageResponseSchema, SubmitMarketingContactRequestSchema, SubmitMarketingContactResponseSchema, SubmitTeamRequestRequestSchema, SubmitTeamRequestResponseSchema, TOOL_JSON_SCHEMA, TeamRequestTypeSchema, TemplateDetailSchema, TemplateFilesResponseSchema, TemplateKindSchema, TemplateManifestSchema, TemplateSeedEntrySchema, TemplateSummarySchema, TriggerAssignmentSchema, TriggerAttachmentStatusSchema, TriggerAttachmentUpdateRequestSchema, TriggerAttachmentUpdateResponseSchema, TriggerDetailResponseSchema, TriggerInvokeAttachmentSchema, TriggerInvokeInputsSchema, TriggerInvokeRequestSchema, TriggerInvokeResponseSchema, TriggerInvokeTargetSchema, TriggerListItemSchema, TriggerListQuerySchema, TriggerListResponseSchema, TriggerManifestShardSchema, TriggerManualInvokeJobPayloadSchema, TriggerOverviewInputSchema, TriggerOverviewJobPayloadSchema, TriggerRunDetailQuerySchema, TriggerRunDetailResponseSchema, TriggerRunListQuerySchema, TriggerRunListResponseSchema, TriggerRunOutcomeSchema, TriggerRunReasonSchema, TriggerStatusSchema, TriggerTypeSchema, UpdateAutoTopupRequestSchema, UpdateChannelBindingBodySchema, UpdateCredentialInstanceBodySchema, UpdateCredentialRequestSchema, UpdateManagedServiceCredentialRequestSchema, UpdateOrganizationMemberRequestSchema, UpdateOrganizationMemberResponseSchema, UpdateOrganizationRequestSchema, UpdateProjectMemberRequestSchema, UpdateProjectMemberResponseSchema, UpdateProjectRequestSchema, UpdateProjectSettingsRequestSchema, UploadProjectSourceManifestRequestSchema, UploadProjectSourceResponseSchema, UpsertGatewayAttachmentBodySchema, UpsertWorkflowSubscriptionBodySchema, UserAvatarPatchSchema, UserAvatarSchema, UserInterfaceThemeSchema, UserOrganizationSchema, UserPreferencesPatchSchema, UserPreferencesSchema, UserSidebarFooterChatRowVisibilitySchema, UserSidebarNavIconVisibilitySchema, UserSidebarPreferencesPatchSchema, UserSidebarPreferencesSchema, UserSurfaceContrastSchema, UserWorkspaceFavoriteKindSchema, UserWorkspaceFavoriteSchema, UserWorkspaceFontSizeSchema, UserWorkspaceLayoutModeSchema, ValidationErrorDetailSchema, WorkflowCanvasAnnotationCodeBlockSchema, WorkflowCanvasAnnotationSchema, WorkflowCanvasAnnotationsInputSchema, WorkflowCanvasAnnotationsJobPayloadSchema, WorkflowCanvasAnnotationsSchema, WorkflowCanvasCallKindSchema, WorkflowCanvasConstantValueSchema, WorkflowCanvasConstantsSchema, WorkflowCanvasCredentialBindingSchema, WorkflowCanvasCredentialBindingsSchema, WorkflowCanvasEdgeSchema, WorkflowCanvasGraphNodeSchema, WorkflowCanvasGraphSchema, WorkflowCanvasLlmOptionsSchema, WorkflowCanvasNodeDataSchema, WorkflowCanvasNodeInputSchema, WorkflowCanvasNodeMetaSchema, WorkflowCanvasNodeOutputSchema, WorkflowCanvasNodeRunStateSchema, WorkflowCanvasNodeRunStatusSchema, WorkflowCanvasNodeTypeSchema, WorkflowCanvasRawBindingSchema, WorkflowCanvasRawValueTokenSchema, WorkflowCanvasRunSchema, WorkflowCanvasRunStatusSchema, WorkflowCanvasSchema, WorkflowCanvasStatusSchema, WorkflowChildRunLinkSchema, WorkflowCredentialScopeSchema, WorkflowEventTypeSchema, WorkflowFormResponseSchema, WorkflowFormUpsertBodySchema, WorkflowHookStatusSchema, WorkflowHookSummarySchema, WorkflowInputFieldSchema, WorkflowInputFieldTypeSchema, WorkflowInputSchemaSchema, WorkflowManifestFlowShardSchema, WorkflowManifestMetaShardSchema, WorkflowNodeInputBindingSchema, WorkflowNodeValueTokenSchema, WorkflowOverviewInputSchema, WorkflowOverviewJobPayloadSchema, WorkflowOverviewNodeSchema, WorkflowOverviewStatusSchema, WorkflowPhaseSchema, WorkflowResolvedCredentialSchema, WorkflowRunChildSchema, WorkflowRunDetailQuerySchema, WorkflowRunDetailResponseSchema, WorkflowRunHooksResponseSchema, WorkflowRunInputsPutBodySchema, WorkflowRunInputsSchema, WorkflowRunListQuerySchema, WorkflowRunListResponseSchema, WorkflowRunResponseSchema, WorkflowStepRunSchema, WorkflowSubscriptionListResponseSchema, WorkflowSubscriptionRecordSchema, WorkflowSummaryDetailResponseSchema, WorkflowSummaryListResponseSchema, WorkflowSummarySchema, WorkspaceTriggerDetailSchema, WorkspaceTriggerFileSchema, WorkspaceTriggerListResponseSchema, WorkspaceTriggerOverviewSchema, WorkspaceTriggerOverviewStatusSchema, WorkspaceTriggerRunListResponseSchema, WorkspaceTriggerRunOutcomeSchema, WorkspaceTriggerRunStatusSchema, WorkspaceTriggerRunSummarySchema, WorkspaceTriggerRunTargetSchema, WorkspaceTriggerSkipReasonSchema, WorkspaceTriggerSummarySchema, WorkspaceWorkflowOverviewSchema, agentMemoryFileId, agentWorkspaceFileId, billingLedgerEntryTypeSchema, buildAgentSlackDeeplink, buildConnectDeeplink, buildCredentialInstanceLabel, buildRequestAccessDeeplink, buildSlackAppManifest, chatAttachmentExtension, chatAttachmentServePath, controlsForFieldType, controlsForWorkflowInputField, credential, credentialInputSchema, credentialRunOverrideFromContext, defineCredential, defineTool, deriveCredentialInstanceSlug, deriveCustomAppDisplay, detectProjectPackageManagerFromSnapshot, displayCredentialAppName, formatAgentTimestampContext, formatMcpToolErrorMessage, getAgentToolInputSchema, getOpenApiJsonSchema, getToolJsonSchema, graphqlIntrospectionToAppTemplate, hasAgentTimestampContext, inferGraphqlAuthFromProbe, isAcceptableInstallExit, isAllowedChatAttachmentMediaType, isCredentialInput, isDraftSnapshotPlaceholderCommitSha, isHelloWorldTemplateSlug, isIgnoredProjectSourceFileName, isIgnoredProjectSourcePath, isLlmProviderSlug, isOfficialSlug, isProbablyBinaryProjectSource, isRecord, isRedundantMcpJsonText, isSlackAppBindingChannelId, isSlackCustomAppOauthSlug, isStepCompletedEnvelope, isUnusableProviderAccessToken, isValidIanaTimezone, isValidSlackAppHandle, jsonSchemaToWorkflowInputSchema, jsonSchemaToZod, listenPortFromPublicUrl, listenPortFromUrl, mapOrganization, mapOrganizationInvitation, mapOrganizationMember, mapProject, mapProjectArtifact, mapProjectDeployment, mapProjectMember, mapProjectSettings, mapUserOrganization, mcpApiKeyAuthInjection, mcpContentBlocksFromToolOutput, mcpContentBlocksToAiSdkParts, mcpCredentialAuthInjection, mcpEntityId, mcpProbeToAppTemplate, mediaDataUrl, mergeOrganizationSidebarBranding, mergeUserPreferences, modelSupportsMediaType, normalizeCredentialList, normalizeDocsSearchPaths, normalizeLogoUrl, normalizeOrganizationSidebarBranding, normalizeSlackAppHandle, normalizeUserPreferences, openApiSpecToAppTemplate, organizationInvitationAcceptPath, organizationSlugErrorCodeFromMessage, originFromPublicUrl, parseAgentSessionDetailInclude, parseAppSlug, parseChatAttachmentServePath, parseCreateOrganizationRequest, parseErrorResponse, parseMcpEntityId, parseMcpToolResultDisplay, parseOrganizationSlug, parsePlatformAgentAttachmentServePath, parsePlatformAgentPromptInput, parsePlatformAgentTranscript, parsePollRunRequest, parseProjectManifest, parseProjectSlug, parsePromptInput, parseSlackConnectFlow, parseStoredRouteManifest, parseTriggerManualInvokeJobPayload, parseTriggerRunDetailInclude, parseWorkflowRunDetailInclude, platformAgentAttachmentServePath, prependAgentUserContext, previewOrganizationSlugFromName, projectFileId, projectFileLanguage, qualifyOrgSlug, requiredDisplayTextSchema, resolveConnectAppSlug, resolveDocsMcpUrl, resolveExplicitPublicPlatformOrigin, resolveExternalPlatformOrigin, resolveMcpPlatformUrl, resolvePlatformWebhookOrigin, resolvePublicFormFields, resolvePublicPlatformApiOrigin, resolvePublicPlatformOrigin, resolveUniqueCredentialInstanceLabel, sanitizePromptContextContent, schemaFromJson, schemaHasFileFields, schemaHasUnsupportedFormFields, slackAppBindingChannelId, slackAppHandleError, slackAppNameFromHandle, slackConnectionKindFromAppId, slackConnectionKindGroupLabel, slackCustomAppHandleFromSlug, slackCustomAppOauthSlug, slugifyAppName, slugifyOrganizationName, slugifyProjectName, stepCompletedInput, stepCompletedOutput, stripPromptContext, subscriptionStatusSchema, toCredentialRequirement, toolParameters, validateAppSlug, validateClaimableOrganizationSlug, validateCredentialValueAgainstFields, validateFormFieldConfig, validateProjectSlug, validateWorkflowRunInputValues, validationErrorResponse, wrapPromptContext, wrapStepCompletedData, zodToStoredJsonSchema };\n\n//# sourceMappingURL=index.mjs.map","import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\nimport { tmpdir } from \"node:os\";\nimport { spawnSync } from \"node:child_process\";\n//#region src/run-tar.ts\nlet forceLocalSupported;\nlet noXattrsSupported;\nfunction tarHelpText() {\n\tconst help = spawnSync(\"tar\", [\"--help\"], { encoding: \"utf8\" });\n\tif (help.error) return;\n\treturn `${help.stdout ?? \"\"}${help.stderr ?? \"\"}`;\n}\n/**\n* Windows GNU tar treats `C:\\...` archive paths as remote `host:path` unless\n* `--force-local` is set. BSD tar (macOS / Windows System32) rejects that flag.\n*/\nfunction tarSupportsForceLocal() {\n\tif (process.platform !== \"win32\") return false;\n\tif (forceLocalSupported !== void 0) return forceLocalSupported;\n\tconst text = tarHelpText();\n\tif (text === void 0) return false;\n\tforceLocalSupported = text.includes(\"--force-local\");\n\treturn forceLocalSupported;\n}\n/**\n* BSD/GNU tar flag to omit extended attributes on create and skip restoring\n* them on extract. Without this, macOS pack embeds `LIBARCHIVE.xattr.*` pax\n* headers that spam Linux extract and slow cold boot.\n*/\nfunction tarSupportsNoXattrs() {\n\tif (noXattrsSupported !== void 0) return noXattrsSupported;\n\tconst text = tarHelpText();\n\tif (text === void 0) return false;\n\tnoXattrsSupported = text.includes(\"--no-xattrs\");\n\treturn noXattrsSupported;\n}\n/** Prefix platform-safe tar flags (`--force-local`, `--no-xattrs`). */\nfunction buildTarArgs(args, forceLocal = tarSupportsForceLocal()) {\n\tconst withForceLocal = forceLocal ? [\"--force-local\", ...args] : args;\n\treturn tarSupportsNoXattrs() ? [\"--no-xattrs\", ...withForceLocal] : withForceLocal;\n}\n/** Spawn `tar` with Windows-safe args and macOS AppleDouble suppressed. */\nfunction runTar(args, options = {}) {\n\treturn spawnSync(\"tar\", buildTarArgs(args), {\n\t\tencoding: \"utf8\",\n\t\tcwd: options.cwd,\n\t\tenv: {\n\t\t\t...process.env,\n\t\t\tCOPYFILE_DISABLE: \"1\",\n\t\t\t...options.env\n\t\t}\n\t});\n}\n//#endregion\n//#region src/pack-dir.ts\n/**\n* Pack a directory tree that contains a `dist/` folder into a gzip tarball\n* suitable for project-server extraction.\n*\n* Archive output uses a path relative to the project root so Windows GNU tar\n* does not treat `C:\\...` as a remote `host:path` name (no absolute `-f`/`-C`).\n*/\nfunction packDistTree(rootContainingDist) {\n\tconst tempDir = mkdtempSync(join(tmpdir(), \"keystroke-artifact-pack-\"));\n\tconst archivePath = join(tempDir, \"artifact.tgz\");\n\ttry {\n\t\tconst result = runTar([\n\t\t\t\"-czf\",\n\t\t\trelative(rootContainingDist, archivePath),\n\t\t\t\"--exclude=._*\",\n\t\t\t\"--exclude=.DS_Store\",\n\t\t\t\"--exclude=*.map\",\n\t\t\t\"dist\"\n\t\t], { cwd: rootContainingDist });\n\t\tif (result.status !== 0) throw new Error(result.stderr?.trim() || \"Failed to pack project artifact\");\n\t\treturn readFileSync(archivePath);\n\t} finally {\n\t\trmSync(tempDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t}\n}\n//#endregion\n//#region src/extract-gzip-tar.ts\n/**\n* Extract a gzip tarball into `destDir` by piping bytes to `tar` stdin.\n* Avoids writing a temporary `.tgz` to disk (cold-start extract path).\n*/\nfunction extractGzipTarToDir(archive, destDir) {\n\tif (archive.byteLength < 2 || archive[0] !== 31 || archive[1] !== 139) {\n\t\tconst head = Buffer.from(archive.subarray(0, Math.min(64, archive.byteLength))).toString(\"utf8\");\n\t\tconst looksLikeJson = head.trimStart().startsWith(\"{\") || head.trimStart().startsWith(\"[\");\n\t\tthrow new Error(looksLikeJson ? \"Expected gzip tarball, got JSON (possible modular artifact index.json on a legacy extract path)\" : \"Expected gzip tarball, got non-gzip bytes\");\n\t}\n\tmkdirSync(destDir, { recursive: true });\n\tconst result = spawnSync(\"tar\", buildTarArgs([\n\t\t\"-xzf\",\n\t\t\"-\",\n\t\t\"-C\",\n\t\t\".\"\n\t]), {\n\t\tcwd: destDir,\n\t\tinput: Buffer.from(archive),\n\t\tencoding: \"utf8\",\n\t\tmaxBuffer: 50 * 1024 * 1024\n\t});\n\tif (result.error) throw result.error;\n\tif (result.status !== 0) throw new Error(result.stderr?.trim() || `tar extract failed (exit ${result.status})`);\n}\n//#endregion\n//#region src/extract-artifact.ts\n/** Extract a packed project artifact tarball into `destDir` (creates `destDir/dist/`). */\nfunction extractProjectArtifact(archive, destDir) {\n\textractGzipTarToDir(archive, destDir);\n}\n//#endregion\n//#region src/merge-route-manifest.ts\nfunction moduleFileOf(entry) {\n\treturn \"moduleFile\" in entry && typeof entry.moduleFile === \"string\" ? entry.moduleFile : void 0;\n}\n/** Replace manifest rows for rebuilt modules while keeping untouched routes and metadata. */\nfunction mergeStoredRouteManifest(base, rebuiltEntries) {\n\tconst rebuiltModuleFiles = new Set(rebuiltEntries.map(moduleFileOf).filter((value) => Boolean(value)));\n\tconst keptEntries = base.entries.filter((entry) => {\n\t\tconst moduleFile = moduleFileOf(entry);\n\t\tif (!moduleFile) return true;\n\t\treturn !rebuiltModuleFiles.has(moduleFile);\n\t});\n\tconst filteredRebuilt = rebuiltEntries.filter((entry) => entry.kind !== \"health\");\n\treturn {\n\t\t...base,\n\t\tentries: [...keptEntries, ...filteredRebuilt]\n\t};\n}\n//#endregion\n//#region src/pack-artifact.ts\n/** Pack `dist/` into a gzip tarball suitable for `/app` extraction in the project server image. */\nfunction packProjectArtifact(projectRoot) {\n\tif (!existsSync(join(projectRoot, \"dist\"))) throw new Error(\"dist/ not found — run keystroke build first\");\n\treturn packDistTree(projectRoot);\n}\n//#endregion\nexport { packDistTree as a, extractGzipTarToDir as i, mergeStoredRouteManifest as n, runTar as o, extractProjectArtifact as r, packProjectArtifact as t };\n\n//# sourceMappingURL=pack-artifact-BV6-Z1x9.mjs.map","import { a as packDistTree, i as extractGzipTarToDir, n as mergeStoredRouteManifest, o as runTar, r as extractProjectArtifact, t as packProjectArtifact } from \"./pack-artifact-BV6-Z1x9.mjs\";\nimport { CreateBucketCommand, DeleteBucketCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand, ListObjectsV2Command, PutBucketAclCommand, PutBucketPolicyCommand, PutObjectCommand, S3Client } from \"@aws-sdk/client-s3\";\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\";\nimport { existsSync, linkSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative } from \"node:path\";\nimport { tmpdir } from \"node:os\";\nimport { ProjectArtifactIndexSchema, ROUTE_MANIFEST_REL_PATH, parseProjectManifest } from \"@keystrokehq/shared\";\nimport { createHash } from \"node:crypto\";\n//#region src/config.ts\nfunction readEnv$1(env, ...keys) {\n\tfor (const key of keys) {\n\t\tconst value = env[key]?.trim();\n\t\tif (value) return value;\n\t}\n}\nfunction requireEnv(env, keys) {\n\tconst candidates = Array.isArray(keys) ? keys : [keys];\n\tconst value = readEnv$1(env, ...candidates);\n\tif (!value) throw new Error(`${candidates[0]} is required`);\n\treturn value;\n}\n/** Admin S3 credentials for storage plugins (bucket is per-org, not from env). */\nfunction storageAdminConfigFromEnv(env = process.env) {\n\tconst accessKeyId = requireEnv(env, [\"STORAGE_ACCESS_KEY_ID\", \"AWS_ACCESS_KEY_ID\"]);\n\tconst secretAccessKey = requireEnv(env, [\"STORAGE_SECRET_ACCESS_KEY\", \"AWS_SECRET_ACCESS_KEY\"]);\n\tconst endpoint = requireEnv(env, [\n\t\t\"STORAGE_ENDPOINT\",\n\t\t\"AWS_ENDPOINT_URL_S3\",\n\t\t\"AWS_S3_ENDPOINT\"\n\t]);\n\treturn {\n\t\tregion: readEnv$1(env, \"STORAGE_REGION\", \"AWS_REGION\") ?? \"us-east-1\",\n\t\taccessKeyId,\n\t\tsecretAccessKey,\n\t\tendpoint,\n\t\tforcePathStyle: env.STORAGE_FORCE_PATH_STYLE === void 0 ? true : env.STORAGE_FORCE_PATH_STYLE === \"true\"\n\t};\n}\n/** Full client config including bucket — for integration tests and explicit bucket callers. */\nfunction storageConfigFromEnv(env = process.env) {\n\tconst bucket = requireEnv(env, [\"STORAGE_BUCKET\", \"BUCKET_NAME\"]);\n\treturn {\n\t\t...storageAdminConfigFromEnv(env),\n\t\tbucket\n\t};\n}\n/** Endpoint for presigned URLs fetched inside project-server containers (e.g. `http://minio:9000`). */\nfunction containerPresignEndpointFromEnv(hostEndpoint, env = process.env) {\n\tconst override = readEnv$1(env, \"STORAGE_CONTAINER_ENDPOINT\");\n\tif (override) return override;\n\ttry {\n\t\tconst url = new URL(hostEndpoint);\n\t\tif (url.hostname === \"localhost\" || url.hostname === \"127.0.0.1\") {\n\t\t\tconst port = url.port || (url.protocol === \"https:\" ? \"443\" : \"9000\");\n\t\t\treturn `${url.protocol}//minio:${port}`;\n\t\t}\n\t} catch {}\n\treturn hostEndpoint;\n}\n//#endregion\n//#region src/keys.ts\n/**\n* LEGACY forever — whole-dist gzip tarball key for already-deployed customer artifacts.\n* Readers must keep supporting these keys; customers must not need to redeploy.\n*/\nfunction projectArtifactKey(projectId, version) {\n\treturn `projects/${projectId}/artifacts/${version}.tgz`;\n}\n/**\n* LEGACY forever — content-addressed whole-dist `.tgz` blob (deduped across deploys).\n* `hash` is a lowercase hex sha256 of the gzip bytes.\n*/\nfunction projectArtifactBlobKey(projectId, hash) {\n\tif (!isSourceBlobHash(hash)) throw new Error(\"Invalid artifact blob hash\");\n\treturn `projects/${projectId}/artifacts/blobs/${hash}.tgz`;\n}\n/**\n* NEW modular — per-deploy artifact index (`path` → content hash).\n* Managed prepare writes this key; complete PUTs the JSON index object.\n*/\nfunction projectArtifactIndexKey(projectId, artifactId) {\n\treturn `projects/${projectId}/artifacts/${artifactId}/index.json`;\n}\n/**\n* NEW modular — content-addressed single dist file blob, deduped across deploys.\n* `hash` is a lowercase hex sha256 of the file bytes.\n*/\nfunction projectModuleBlobKey(projectId, hash) {\n\tif (!isSourceBlobHash(hash)) throw new Error(\"Invalid module blob hash\");\n\treturn `projects/${projectId}/modules/blobs/${hash}`;\n}\n/**\n* LEGACY forever — `storage_key` suffix detector for whole-dist `.tgz` artifacts.\n* Dual-read contract: never remove; deployed rows keep this shape indefinitely.\n*/\nfunction isProjectArtifactTarballKey(storageKey) {\n\treturn storageKey.endsWith(\".tgz\");\n}\n/**\n* NEW modular — `storage_key` detector for artifact indexes under `/artifacts/…/index.json`.\n*/\nfunction isProjectArtifactIndexKey(storageKey) {\n\treturn storageKey.endsWith(\"/index.json\") && storageKey.includes(\"/artifacts/\");\n}\n/** Dual-read layout label for logs (`null` = unsupported key). */\nfunction artifactLayoutFromStorageKey(storageKey) {\n\tif (isProjectArtifactTarballKey(storageKey)) return \"tarball\";\n\tif (isProjectArtifactIndexKey(storageKey)) return \"modular\";\n\treturn null;\n}\n/** Ownership manifest for deploy-managed agent files (org bucket, not agent mount). */\nfunction deployedFilesManifestKey(projectId, agentId) {\n\treturn `workspace-control/projects/${projectId}/agents/${agentId}/deployed-files.json`;\n}\n/**\n* Per-artifact source manifest (the deploy's file tree: path -> id + content\n* hash, plus resource refs). One per deploy.\n*/\nfunction projectSourceManifestKey(projectId, artifactId) {\n\treturn `projects/${projectId}/sources/${artifactId}/index.json`;\n}\nconst SHA256_HEX = /^[a-f0-9]{64}$/;\n/** True when `hash` is a lowercase hex sha256 digest (64 chars). */\nfunction isSourceBlobHash(hash) {\n\treturn SHA256_HEX.test(hash);\n}\n/**\n* Content-addressed key for a single source file's contents, deduped across all\n* of a project's deploys. `hash` is a lowercase hex sha256 of the file bytes.\n*/\nfunction projectSourceBlobKey(projectId, hash) {\n\tif (!isSourceBlobHash(hash)) throw new Error(\"Invalid source blob hash\");\n\treturn `projects/${projectId}/sources/blobs/${hash}`;\n}\nconst AVATAR_EXTENSION = /^[a-z0-9]+$/;\n/** Object key for a chat attachment in org-private storage. */\nfunction chatAttachmentStorageKey(projectId, id, ext) {\n\tconst normalizedExt = ext.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(normalizedExt)) throw new Error(\"Invalid chat attachment extension\");\n\treturn `chat-attachments/${projectId}/${id}.${normalizedExt}`;\n}\n/** True when `key` is a chat attachment owned by `projectId`. */\nfunction isChatAttachmentStorageKey(key, projectId) {\n\tconst prefix = `chat-attachments/${projectId}/`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst remainder = key.slice(prefix.length);\n\treturn remainder.length > 0 && !remainder.includes(\"/\");\n}\n/** Object key for a user's custom profile avatar in the shared keystroke-users bucket. */\nfunction userAvatarStorageKey(userId, extension) {\n\tconst ext = extension.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(ext)) throw new Error(\"Invalid avatar extension\");\n\treturn `avatars/${userId}/avatar.${ext}`;\n}\n/** True when `key` is the canonical avatar object for `userId`. */\nfunction isUserAvatarStorageKey(key, userId) {\n\tconst prefix = `avatars/${userId}/avatar.`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst ext = key.slice(prefix.length);\n\treturn AVATAR_EXTENSION.test(ext);\n}\n/** Object key for an org logo in the shared keystroke-assets bucket. */\nfunction orgLogoStorageKey(organizationId, variant, extension) {\n\tconst ext = extension.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(ext)) throw new Error(\"Invalid org logo extension\");\n\treturn `org-logos/${organizationId}/logo-${variant}.${ext}`;\n}\n/** True when `key` is the canonical logo object for `organizationId` and `variant`. */\nfunction isOrgLogoStorageKey(key, organizationId, variant) {\n\tconst prefix = `org-logos/${organizationId}/logo-${variant}.`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst ext = key.slice(prefix.length);\n\treturn AVATAR_EXTENSION.test(ext);\n}\n/**\n* Object key for a custom app logo upload in the shared keystroke-assets bucket.\n* Uses a random id because logos are uploaded before the app row exists.\n*/\nfunction appLogoStorageKey(organizationId, uploadId, extension) {\n\tconst ext = extension.replace(/^\\./, \"\").toLowerCase();\n\tif (!AVATAR_EXTENSION.test(ext)) throw new Error(\"Invalid app logo extension\");\n\tif (!uploadId.trim() || uploadId.includes(\"/\") || uploadId.includes(\"..\")) throw new Error(\"Invalid app logo upload id\");\n\treturn `app-logos/${organizationId}/${uploadId}.${ext}`;\n}\n/** True when `key` is an app logo object owned by `organizationId`. */\nfunction isAppLogoStorageKey(key, organizationId) {\n\tconst prefix = `app-logos/${organizationId}/`;\n\tif (!key.startsWith(prefix)) return false;\n\tconst remainder = key.slice(prefix.length);\n\tconst dot = remainder.lastIndexOf(\".\");\n\tif (dot <= 0) return false;\n\tconst uploadId = remainder.slice(0, dot);\n\tconst ext = remainder.slice(dot + 1);\n\treturn Boolean(uploadId) && !uploadId.includes(\"/\") && AVATAR_EXTENSION.test(ext);\n}\n//#endregion\n//#region src/map-in-batches.ts\n/** Default concurrency for parallel blob downloads and file writes. */\nconst DEFAULT_PARALLEL_BATCH_SIZE = 8;\n/** Run `fn` over `items` in parallel batches of `batchSize`. */\nasync function mapInParallelBatches(items, batchSize, fn) {\n\tif (batchSize < 1) throw new Error(\"batchSize must be at least 1\");\n\tconst results = [];\n\tfor (let index = 0; index < items.length; index += batchSize) {\n\t\tconst batch = items.slice(index, index + batchSize);\n\t\tresults.push(...await Promise.all(batch.map(fn)));\n\t}\n\treturn results;\n}\n//#endregion\n//#region src/load-project-source-files.ts\n/** Matches deploy-time source snapshot limits in @keystrokehq/build walk-project. */\nconst MAX_ACTIVE_SOURCE_DOWNLOAD_BYTES = 8 * 1024 * 1024;\nasync function loadProjectSourceFiles(storage, projectId, manifest, options = {}) {\n\tconst maxTotalBytes = options.maxTotalBytes ?? 8388608;\n\tconst files = [];\n\tlet totalBytes = 0;\n\tfor (let index = 0; index < manifest.files.length; index += 8) {\n\t\tconst batch = manifest.files.slice(index, index + 8);\n\t\tconst batchResults = await Promise.all(batch.map(async (file) => {\n\t\t\tconst bytes = await storage.getObject(projectSourceBlobKey(projectId, file.hash));\n\t\t\tconst contents = new TextDecoder().decode(bytes);\n\t\t\treturn {\n\t\t\t\tpath: file.path,\n\t\t\t\tcontents,\n\t\t\t\tbyteLength: Buffer.byteLength(contents, \"utf8\")\n\t\t\t};\n\t\t}));\n\t\tfor (const result of batchResults) {\n\t\t\ttotalBytes += result.byteLength;\n\t\t\tif (totalBytes > maxTotalBytes) throw new Error(\"Active source snapshot exceeds download size limit\");\n\t\t\tfiles.push({\n\t\t\t\tpath: result.path,\n\t\t\t\tcontents: result.contents\n\t\t\t});\n\t\t}\n\t}\n\treturn files;\n}\n//#endregion\n//#region src/create-storage.ts\nvar StoragePreconditionFailedError = class extends Error {\n\tkey;\n\tconstructor(key) {\n\t\tsuper(`Storage precondition failed for key ${key}`);\n\t\tthis.name = \"StoragePreconditionFailedError\";\n\t\tthis.key = key;\n\t}\n};\nconst DEFAULT_PRESIGN_TTL_SECONDS = 900;\nfunction createStorage(config) {\n\tconst client = new S3Client(toClientConfig(config));\n\treturn {\n\t\tasync putObject(input) {\n\t\t\tawait this.putObjectConditional(input);\n\t\t},\n\t\tasync putObjectConditional(input) {\n\t\t\ttry {\n\t\t\t\tconst response = await client.send(new PutObjectCommand({\n\t\t\t\t\tBucket: config.bucket,\n\t\t\t\t\tKey: input.key,\n\t\t\t\t\tBody: input.body,\n\t\t\t\t\tContentType: input.contentType,\n\t\t\t\t\t...input.ifMatch ? { IfMatch: input.ifMatch } : {},\n\t\t\t\t\t...input.ifNoneMatch ? { IfNoneMatch: \"*\" } : {}\n\t\t\t\t}));\n\t\t\t\treturn { ...response.ETag ? { etag: response.ETag } : {} };\n\t\t\t} catch (error) {\n\t\t\t\tif (isPreconditionFailedError(error)) throw new StoragePreconditionFailedError(input.key);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tasync getObject(key) {\n\t\t\treturn (await this.getObjectWithEtag(key)).body;\n\t\t},\n\t\tasync getObjectWithEtag(key) {\n\t\t\tconst response = await client.send(new GetObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: key\n\t\t\t}));\n\t\t\tif (!response.Body) throw new Error(`Object body missing for key ${key}`);\n\t\t\treturn {\n\t\t\t\tbody: await response.Body.transformToByteArray(),\n\t\t\t\t...response.ETag ? { etag: response.ETag } : {}\n\t\t\t};\n\t\t},\n\t\tasync headObject(key) {\n\t\t\ttry {\n\t\t\t\tconst response = await client.send(new HeadObjectCommand({\n\t\t\t\t\tBucket: config.bucket,\n\t\t\t\t\tKey: key\n\t\t\t\t}));\n\t\t\t\treturn {\n\t\t\t\t\tcontentLength: response.ContentLength ?? 0,\n\t\t\t\t\t...response.ETag ? { etag: response.ETag } : {}\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tif (isNotFoundError(error)) return;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tasync presignGet(input) {\n\t\t\treturn getSignedUrl(client, new GetObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: input.key\n\t\t\t}), { expiresIn: input.expiresInSeconds ?? DEFAULT_PRESIGN_TTL_SECONDS });\n\t\t},\n\t\tasync presignPut(input) {\n\t\t\treturn getSignedUrl(client, new PutObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: input.key,\n\t\t\t\tContentType: input.contentType ?? \"application/gzip\"\n\t\t\t}), { expiresIn: input.expiresInSeconds ?? DEFAULT_PRESIGN_TTL_SECONDS });\n\t\t},\n\t\tasync deleteObject(key) {\n\t\t\tawait client.send(new DeleteObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: key\n\t\t\t}));\n\t\t},\n\t\tasync listObjects(prefix) {\n\t\t\tconst keys = [];\n\t\t\tlet continuationToken;\n\t\t\tdo {\n\t\t\t\tconst response = await client.send(new ListObjectsV2Command({\n\t\t\t\t\tBucket: config.bucket,\n\t\t\t\t\tPrefix: prefix,\n\t\t\t\t\tContinuationToken: continuationToken\n\t\t\t\t}));\n\t\t\t\tfor (const object of response.Contents ?? []) if (object.Key) keys.push(object.Key);\n\t\t\t\tcontinuationToken = response.IsTruncated ? response.NextContinuationToken : void 0;\n\t\t\t} while (continuationToken);\n\t\t\treturn keys;\n\t\t}\n\t};\n}\n/** Presign URLs for project-server containers using `STORAGE_CONTAINER_ENDPOINT` when set. */\nfunction createContainerPresignStorage(config, env = process.env) {\n\treturn createStorage({\n\t\t...config,\n\t\tendpoint: containerPresignEndpointFromEnv(config.endpoint, env)\n\t});\n}\nfunction toClientConfig(config) {\n\treturn {\n\t\tregion: config.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: config.accessKeyId,\n\t\t\tsecretAccessKey: config.secretAccessKey\n\t\t},\n\t\tendpoint: config.endpoint,\n\t\tforcePathStyle: config.forcePathStyle\n\t};\n}\nfunction isNotFoundError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst status = \"$metadata\" in error ? error.$metadata : void 0;\n\treturn name === \"NotFound\" || name === \"NoSuchKey\" || status?.httpStatusCode === 404;\n}\nfunction isPreconditionFailedError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst status = \"$metadata\" in error ? error.$metadata : void 0;\n\treturn name === \"PreconditionFailed\" || name === \"412\" || status?.httpStatusCode === 412;\n}\n//#endregion\n//#region src/extract-route-manifest.ts\nvar RouteManifestNotFoundError = class extends Error {\n\tconstructor(message = `Route manifest missing in artifact (${ROUTE_MANIFEST_REL_PATH})`) {\n\t\tsuper(message);\n\t\tthis.name = \"RouteManifestNotFoundError\";\n\t}\n};\n/**\n* LEGACY forever — read `dist/.keystroke/route-manifest.json` from a packed\n* whole-dist `.tgz`. Never call this on modular index JSON bytes.\n*\n* Prefer DB `manifest_json` (composed StoredRouteManifest) for canvas / promote.\n* This extract path remains for old tarball artifacts that never stored JSON.\n*/\nfunction extractRouteManifestFromArtifact(archive) {\n\tconst tempDir = mkdtempSync(join(tmpdir(), \"keystroke-artifact-\"));\n\ttry {\n\t\twriteFileSync(join(tempDir, \"artifact.tgz\"), archive);\n\t\tif (runTar([\n\t\t\t\"-xzf\",\n\t\t\t\"artifact.tgz\",\n\t\t\t\"-C\",\n\t\t\t\".\",\n\t\t\tROUTE_MANIFEST_REL_PATH\n\t\t], { cwd: tempDir }).status !== 0) throw new RouteManifestNotFoundError();\n\t\tconst raw = readFileSync(join(tempDir, ROUTE_MANIFEST_REL_PATH), \"utf8\");\n\t\treturn JSON.parse(raw);\n\t} catch (error) {\n\t\tif (error instanceof RouteManifestNotFoundError) throw error;\n\t\tthrow new RouteManifestNotFoundError(error instanceof Error ? error.message : \"Failed to extract route manifest\");\n\t} finally {\n\t\trmSync(tempDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t}\n}\n//#endregion\n//#region src/assert-module-blob-hash.ts\n/** Lowercase hex sha256 of raw bytes. */\nfunction sha256Hex(bytes) {\n\treturn createHash(\"sha256\").update(bytes).digest(\"hex\");\n}\n/**\n* Assert a content-addressed module blob matches its declared size and SHA-256 hash.\n* Returns a Buffer copy suitable for disk write / JSON parse.\n*/\nfunction assertModuleBlobMatchesHash(input) {\n\tif (input.bytes.byteLength !== input.expectedSize) throw new Error(`Module blob size mismatch for ${input.path}: expected ${input.expectedSize}, got ${input.bytes.byteLength}`);\n\tconst actual = sha256Hex(input.bytes);\n\tconst expected = input.expectedHash.toLowerCase();\n\tif (actual !== expected) throw new Error(`Module blob hash mismatch for ${input.path}: expected ${expected}, got ${actual}`);\n\treturn Buffer.from(input.bytes);\n}\n//#endregion\n//#region src/collect-artifact-modules.ts\nfunction toPosix(path) {\n\treturn path.replace(/\\\\/g, \"/\");\n}\nfunction walkFiles$1(dir) {\n\tif (!existsSync(dir) || !statSync(dir).isDirectory()) return [];\n\tconst out = [];\n\tfor (const name of readdirSync(dir)) {\n\t\tif (name === \".\" || name === \"..\") continue;\n\t\tconst abs = join(dir, name);\n\t\tconst st = statSync(abs);\n\t\tif (st.isDirectory()) out.push(...walkFiles$1(abs));\n\t\telse if (st.isFile() && !name.endsWith(\".map\")) out.push(abs);\n\t}\n\treturn out;\n}\n/**\n* Collect every file under `dist/` (except sourcemaps) for modular deploy upload.\n* Paths in the index are relative to `dist/` (e.g. `workflows/c.mjs`).\n*/\nfunction collectArtifactModules(projectRoot, outDir = \"dist\") {\n\tconst distRoot = join(projectRoot, outDir);\n\tif (!existsSync(distRoot) || !statSync(distRoot).isDirectory()) throw new Error(`Missing ${outDir}/ — run keystroke build before deploy`);\n\tconst files = walkFiles$1(distRoot);\n\tif (files.length === 0) throw new Error(`${outDir}/ is empty — run keystroke build before deploy`);\n\tconst collected = [];\n\tfor (const absolutePath of files) {\n\t\tconst bytes = readFileSync(absolutePath);\n\t\tconst path = toPosix(relative(distRoot, absolutePath));\n\t\tcollected.push({\n\t\t\tpath,\n\t\t\thash: sha256Hex(bytes),\n\t\t\tsize: bytes.byteLength,\n\t\t\tabsolutePath,\n\t\t\tbytes\n\t\t});\n\t}\n\tcollected.sort((a, b) => a.path.localeCompare(b.path));\n\treturn collected;\n}\n/** Build the Zod-validated artifact index (no bytes) from collected modules. */\nfunction artifactIndexFromModules(modules) {\n\treturn ProjectArtifactIndexSchema.parse({\n\t\tversion: 1,\n\t\tfiles: modules.map(({ path, hash, size }) => ({\n\t\t\tpath,\n\t\t\thash,\n\t\t\tsize\n\t\t}))\n\t});\n}\n/** Unique blob refs for presign (deduped by hash). */\nfunction moduleBlobRefsFromModules(modules) {\n\tconst byHash = /* @__PURE__ */ new Map();\n\tfor (const mod of modules) {\n\t\tconst existing = byHash.get(mod.hash);\n\t\tif (existing === void 0) byHash.set(mod.hash, mod.size);\n\t\telse if (existing !== mod.size) throw new Error(`Module blob size mismatch for hash ${mod.hash}`);\n\t}\n\treturn [...byHash.entries()].map(([hash, size]) => ({\n\t\thash,\n\t\tsize\n\t})).sort((a, b) => a.hash.localeCompare(b.hash));\n}\n//#endregion\n//#region src/materialize-modular-artifact.ts\nfunction placeBlobBytes(target, bytes) {\n\tmkdirSync(dirname(target), { recursive: true });\n\twriteFileSync(target, bytes);\n}\nfunction tryReuseLocalBlob(cachedPath, target, expectedHash, expectedSize) {\n\tif (!existsSync(cachedPath)) return false;\n\ttry {\n\t\tif (statSync(cachedPath).size !== expectedSize) return false;\n\t\tconst cached = readFileSync(cachedPath);\n\t\tif (sha256Hex(cached) !== expectedHash.toLowerCase()) return false;\n\t\tmkdirSync(dirname(target), { recursive: true });\n\t\ttry {\n\t\t\tlinkSync(cachedPath, target);\n\t\t} catch {\n\t\t\twriteFileSync(target, cached);\n\t\t}\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction storeLocalBlob(cachedPath, bytes) {\n\ttry {\n\t\tif (existsSync(cachedPath) && statSync(cachedPath).size === bytes.byteLength) return;\n\t\tmkdirSync(dirname(cachedPath), { recursive: true });\n\t\twriteFileSync(cachedPath, bytes);\n\t} catch {}\n}\n/**\n* NEW modular — download every module blob listed in `index` and write under\n* `{destDir}/dist/{path}`.\n*\n* On-disk layout must match LEGACY tarball extract so workers/bootstrap stay\n* format-agnostic. This is download-all (not fetch-on-use); keep until phase 3.\n*\n* When `localBlobCacheDir` is set, blobs are reused across artifact ids on the\n* same machine (`{localBlobCacheDir}/{hash}`) via hardlink/copy before storage GET.\n*/\nasync function materializeModularArtifact(input) {\n\tconst index = ProjectArtifactIndexSchema.parse(input.index);\n\tconst distRoot = join(input.destDir, \"dist\");\n\tmkdirSync(distRoot, { recursive: true });\n\tlet totalBytes = 0;\n\tlet cacheHits = 0;\n\tawait mapInParallelBatches(index.files, input.parallelBatchSize ?? 8, async (file) => {\n\t\tconst target = join(distRoot, file.path);\n\t\tconst cachedPath = input.localBlobCacheDir ? join(input.localBlobCacheDir, file.hash) : void 0;\n\t\tif (cachedPath && tryReuseLocalBlob(cachedPath, target, file.hash, file.size)) {\n\t\t\tcacheHits += 1;\n\t\t\ttotalBytes += file.size;\n\t\t\treturn;\n\t\t}\n\t\tconst key = projectModuleBlobKey(input.projectId, file.hash);\n\t\tconst bytes = await input.storage.getObject(key);\n\t\tif (!bytes || bytes.byteLength === 0) throw new Error(`Missing module blob ${file.hash} for ${file.path}`);\n\t\tconst buffer = assertModuleBlobMatchesHash({\n\t\t\tbytes,\n\t\t\texpectedHash: file.hash,\n\t\t\texpectedSize: file.size,\n\t\t\tpath: file.path\n\t\t});\n\t\tplaceBlobBytes(target, buffer);\n\t\tif (cachedPath) storeLocalBlob(cachedPath, buffer);\n\t\ttotalBytes += bytes.byteLength;\n\t});\n\treturn {\n\t\tbytes: totalBytes,\n\t\tfiles: index.files.length,\n\t\tcacheHits\n\t};\n}\n/** Parse index JSON bytes from object storage. */\nfunction parseProjectArtifactIndex(bytes) {\n\treturn ProjectArtifactIndexSchema.parse(JSON.parse(Buffer.from(bytes).toString(\"utf8\")));\n}\n//#endregion\n//#region src/open-modular-artifact-shards.ts\nfunction toDistRelPath(keystrokeRelPath) {\n\treturn `.keystroke/${keystrokeRelPath}`;\n}\n/**\n* NEW modular — open an artifact index and provide sync shard reads after prefetch.\n* Artifact index paths are dist-relative (`.keystroke/...`).\n*/\nasync function openModularArtifactShards(input) {\n\tif (!isProjectArtifactIndexKey(input.storageKey)) throw new Error(`Expected modular artifact index key, got ${input.storageKey}`);\n\tconst indexBytes = await input.storage.getObject(input.storageKey);\n\tif (!indexBytes || indexBytes.byteLength === 0) throw new Error(`Missing artifact index at ${input.storageKey}`);\n\tconst artifactIndex = parseProjectArtifactIndex(indexBytes);\n\tconst byDistPath = new Map(artifactIndex.files.map((file) => [file.path, file]));\n\tconst cache = /* @__PURE__ */ new Map();\n\tconst fetchDistJson = async (distRelPath) => {\n\t\tconst file = byDistPath.get(distRelPath);\n\t\tif (!file) throw new Error(`Artifact index is missing ${distRelPath}`);\n\t\tconst bytes = await input.storage.getObject(projectModuleBlobKey(input.projectId, file.hash));\n\t\tif (!bytes || bytes.byteLength === 0) throw new Error(`Missing module blob for ${distRelPath} (${file.hash})`);\n\t\tconst buffer = assertModuleBlobMatchesHash({\n\t\t\tbytes,\n\t\t\texpectedHash: file.hash,\n\t\t\texpectedSize: file.size,\n\t\t\tpath: distRelPath\n\t\t});\n\t\treturn JSON.parse(buffer.toString(\"utf8\"));\n\t};\n\tconst prefetchKeystrokeJson = async (keystrokeRelPaths) => {\n\t\tconst missing = [...new Set(keystrokeRelPaths)].filter((path) => !cache.has(path));\n\t\tawait Promise.all(missing.map(async (keystrokeRelPath) => {\n\t\t\tconst value = await fetchDistJson(toDistRelPath(keystrokeRelPath));\n\t\t\tcache.set(keystrokeRelPath, value);\n\t\t}));\n\t};\n\tconst readKeystrokeJson = (keystrokeRelPath) => {\n\t\tif (!cache.has(keystrokeRelPath)) throw new Error(`Shard not prefetched: ${keystrokeRelPath}`);\n\t\treturn cache.get(keystrokeRelPath);\n\t};\n\tawait prefetchKeystrokeJson([\"manifest.json\"]);\n\treturn {\n\t\tartifactIndex,\n\t\tprojectManifest: parseProjectManifest(readKeystrokeJson(\"manifest.json\")),\n\t\treadKeystrokeJson,\n\t\tprefetchKeystrokeJson\n\t};\n}\n/** Prefetch meta shards needed for registry/promote (no flowGraphs). */\nasync function prefetchRegistryShards(access) {\n\tconst paths = [access.projectManifest.actionsCatalogPath, ...access.projectManifest.modules.map((module) => module.path)];\n\tawait access.prefetchKeystrokeJson(paths);\n}\n/** Prefetch one workflow flow + companion metas for canvas. */\nasync function prefetchCanvasShards(access, workflowSlug) {\n\tconst workflow = access.projectManifest.modules.find((module) => module.kind === \"workflow\" && module.id === workflowSlug);\n\tif (!workflow) throw new Error(`Workflow \"${workflowSlug}\" not found in project manifest`);\n\tconst paths = [\n\t\taccess.projectManifest.actionsCatalogPath,\n\t\tworkflow.path,\n\t\t...workflow.flowPath ? [workflow.flowPath] : [],\n\t\t...access.projectManifest.modules.filter((module) => module.kind === \"agent\" || module.kind === \"workflow\").map((module) => module.path)\n\t];\n\tawait access.prefetchKeystrokeJson(paths);\n}\n//#endregion\n//#region src/s3-errors.ts\nfunction isBucketAlreadyExistsError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst code = \"Code\" in error ? String(error.Code) : \"\";\n\treturn name === \"BucketAlreadyOwnedByYou\" || code === \"BucketAlreadyOwnedByYou\" || name === \"BucketAlreadyExists\" || code === \"BucketAlreadyExists\";\n}\nfunction isStorageNotFoundError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst record = error;\n\tconst name = typeof record.name === \"string\" ? record.name : \"\";\n\tconst code = typeof record.Code === \"string\" ? record.Code : \"\";\n\tconst status = typeof record.$metadata === \"object\" && record.$metadata !== null ? record.$metadata.httpStatusCode : void 0;\n\treturn name === \"NoSuchKey\" || code === \"NoSuchKey\" || code === \"NotFound\" || status === 404;\n}\nfunction isStorageBucketNotFoundError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst record = error;\n\tconst name = typeof record.name === \"string\" ? record.name : \"\";\n\tconst code = typeof record.Code === \"string\" ? record.Code : \"\";\n\tconst status = typeof record.$metadata === \"object\" && record.$metadata !== null ? record.$metadata.httpStatusCode : void 0;\n\treturn name === \"NoSuchBucket\" || code === \"NoSuchBucket\" || name === \"NotFound\" || status === 404;\n}\n//#endregion\n//#region src/asset-storage.ts\n/** Shared bucket for cross-org public assets (avatars, org sidebar logos). */\nconst KEYSTROKE_ASSETS_BUCKET = \"keystroke-assets\";\n/** Env var for the browser-facing origin of public asset objects (no trailing slash). */\nconst KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV = \"KEYSTROKE_ASSETS_PUBLIC_URL_BASE\";\nconst KEYSTROKE_ASSETS_AVATAR_PREFIX = \"avatars/\";\nconst KEYSTROKE_ASSETS_ORG_LOGO_PREFIX = \"org-logos/\";\nconst KEYSTROKE_ASSETS_APP_LOGO_PREFIX = \"app-logos/\";\nfunction readEnv(env, key) {\n\treturn env[key]?.trim() || void 0;\n}\n/** Default path-style base when `KEYSTROKE_ASSETS_PUBLIC_URL_BASE` is unset (local MinIO). */\nfunction defaultKeystrokeAssetsPublicUrlBase(env = process.env) {\n\treturn `${storageAdminConfigFromEnv(env).endpoint.replace(/\\/+$/, \"\")}/${KEYSTROKE_ASSETS_BUCKET}`;\n}\n/** Public URL prefix for asset objects — configured base or local path-style default. */\nfunction keystrokeAssetsPublicUrlBase(env = process.env) {\n\tconst configured = readEnv(env, KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV);\n\tif (configured) return configured.replace(/\\/+$/, \"\");\n\treturn defaultKeystrokeAssetsPublicUrlBase(env);\n}\nfunction keystrokeAssetsPublicUrlPrefixes(env = process.env) {\n\tconst prefixes = [keystrokeAssetsPublicUrlBase(env)];\n\tif (readEnv(env, \"KEYSTROKE_ASSETS_PUBLIC_URL_BASE\")) prefixes.push(defaultKeystrokeAssetsPublicUrlBase(env));\n\treturn [...new Set(prefixes)];\n}\nfunction createAssetsStorageClient(env = process.env) {\n\treturn createStorage({\n\t\t...storageAdminConfigFromEnv(env),\n\t\tbucket: KEYSTROKE_ASSETS_BUCKET\n\t});\n}\n/** Stable public URL for an object in the keystroke-assets bucket. */\nfunction publicKeystrokeAssetsObjectUrl(key, env = process.env) {\n\treturn `${keystrokeAssetsPublicUrlBase(env)}/${key}`;\n}\n/** Extract the object key from a public keystroke-assets URL when it matches `requiredPrefix`. */\nfunction keystrokeAssetsKeyFromPublicUrl(url, requiredPrefix, env = process.env) {\n\tfor (const prefix of keystrokeAssetsPublicUrlPrefixes(env)) {\n\t\tconst normalizedPrefix = `${prefix.replace(/\\/+$/, \"\")}/`;\n\t\tif (!url.startsWith(normalizedPrefix)) continue;\n\t\tconst key = decodeURIComponent(url.slice(normalizedPrefix.length).split(\"?\")[0] ?? \"\");\n\t\tif (key.startsWith(requiredPrefix)) return key;\n\t}\n\treturn null;\n}\nfunction isKeystrokeAssetsAvatarPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_AVATAR_PREFIX, env) !== null;\n}\nfunction keystrokeAssetsAvatarKeyFromPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_AVATAR_PREFIX, env);\n}\nfunction isKeystrokeAssetsOrgLogoPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, env) !== null;\n}\nfunction keystrokeAssetsOrgLogoKeyFromPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, env);\n}\nfunction isKeystrokeAssetsAppLogoPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_APP_LOGO_PREFIX, env) !== null;\n}\nfunction keystrokeAssetsAppLogoKeyFromPublicUrl(url, env = process.env) {\n\treturn keystrokeAssetsKeyFromPublicUrl(url, KEYSTROKE_ASSETS_APP_LOGO_PREFIX, env);\n}\nasync function ensureKeystrokeAssetsBucket(env = process.env) {\n\tconst adminConfig = storageAdminConfigFromEnv(env);\n\tconst adminClient = new S3Client({\n\t\tregion: adminConfig.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\tsecretAccessKey: adminConfig.secretAccessKey\n\t\t},\n\t\tendpoint: adminConfig.endpoint,\n\t\tforcePathStyle: adminConfig.forcePathStyle\n\t});\n\tawait createAssetsBucketIfNeeded(adminClient, KEYSTROKE_ASSETS_BUCKET);\n\tawait applyPublicAssetsBucketAcl(adminClient, KEYSTROKE_ASSETS_BUCKET);\n\tawait applyPublicAssetsBucketPolicy(adminClient, KEYSTROKE_ASSETS_BUCKET);\n}\nasync function createAssetsBucketIfNeeded(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new CreateBucketCommand({\n\t\t\tBucket: bucket,\n\t\t\tACL: \"public-read\"\n\t\t}));\n\t\treturn;\n\t} catch (error) {\n\t\tif (isBucketAlreadyExistsError(error)) return;\n\t}\n\ttry {\n\t\tawait adminClient.send(new CreateBucketCommand({ Bucket: bucket }));\n\t} catch (error) {\n\t\tif (!isBucketAlreadyExistsError(error)) throw error;\n\t}\n}\nasync function applyPublicAssetsBucketAcl(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new PutBucketAclCommand({\n\t\t\tBucket: bucket,\n\t\t\tACL: \"public-read\"\n\t\t}));\n\t} catch (error) {\n\t\tif (!isUnsupportedStorageFeatureError(error)) console.warn(\"[storage] PutBucketAcl failed (continuing):\", error);\n\t}\n}\nasync function applyPublicAssetsBucketPolicy(adminClient, bucket) {\n\ttry {\n\t\tawait adminClient.send(new PutBucketPolicyCommand({\n\t\t\tBucket: bucket,\n\t\t\tPolicy: JSON.stringify({\n\t\t\t\tVersion: \"2012-10-17\",\n\t\t\t\tStatement: [{\n\t\t\t\t\tEffect: \"Allow\",\n\t\t\t\t\tPrincipal: \"*\",\n\t\t\t\t\tAction: [\"s3:GetObject\"],\n\t\t\t\t\tResource: [\n\t\t\t\t\t\t`arn:aws:s3:::${bucket}/${KEYSTROKE_ASSETS_AVATAR_PREFIX}*`,\n\t\t\t\t\t\t`arn:aws:s3:::${bucket}/${KEYSTROKE_ASSETS_ORG_LOGO_PREFIX}*`,\n\t\t\t\t\t\t`arn:aws:s3:::${bucket}/${KEYSTROKE_ASSETS_APP_LOGO_PREFIX}*`\n\t\t\t\t\t]\n\t\t\t\t}]\n\t\t\t})\n\t\t}));\n\t} catch (error) {\n\t\tif (!isUnsupportedStorageFeatureError(error)) console.warn(\"[storage] PutBucketPolicy failed (continuing):\", error);\n\t}\n}\nfunction isUnsupportedStorageFeatureError(error) {\n\tif (!error || typeof error !== \"object\") return false;\n\tconst name = \"name\" in error ? String(error.name) : \"\";\n\tconst code = \"Code\" in error ? String(error.Code) : \"\";\n\treturn name === \"NotImplemented\" || code === \"NotImplemented\" || code === \"NotSupported\";\n}\n//#endregion\n//#region src/provision/names.ts\nconst DEFAULT_BUCKET_NAME_PREFIX = \"ks\";\nconst S3_BUCKET_NAME_MAX = 63;\n/** Deterministic bucket segment; keeps short test ids readable, hashes UUID-length ids. */\nfunction bucketIdSegment(id, hashLength = 10) {\n\tif (id.length <= 24 && !/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(id)) return id;\n\treturn createHash(\"sha256\").update(id).digest(\"hex\").slice(0, hashLength);\n}\nfunction assertBucketName(name) {\n\tif (name.length > S3_BUCKET_NAME_MAX) throw new Error(`bucket name exceeds ${S3_BUCKET_NAME_MAX} chars (${name.length}): ${name}`);\n\treturn name;\n}\nfunction orgStorageBucketName(input, prefix = DEFAULT_BUCKET_NAME_PREFIX) {\n\treturn assertBucketName(`${prefix.trim().replace(/-+$/g, \"\")}-${input.organizationId.toLowerCase()}`);\n}\nfunction orgAgentBucketName(input) {\n\tconst orgBucket = input.orgBucket ?? (input.organizationId ? orgStorageBucketName({ organizationId: input.organizationId }) : void 0);\n\tif (!orgBucket) throw new Error(\"orgAgentBucketName requires organizationId or orgBucket\");\n\treturn assertBucketName(`${orgBucket}-${bucketIdSegment(input.agentId)}`);\n}\n//#endregion\n//#region src/workspace/sync.ts\nconst DEFAULT_UPLOAD_CONCURRENCY = 8;\nfunction walkFiles(root) {\n\tconst files = [];\n\tconst stack = [root];\n\twhile (stack.length > 0) {\n\t\tconst current = stack.pop();\n\t\tfor (const entry of readdirSync(current, { withFileTypes: true })) {\n\t\t\tconst full = join(current, entry.name);\n\t\t\tif (entry.isDirectory()) stack.push(full);\n\t\t\telse if (entry.isFile()) files.push(full);\n\t\t}\n\t}\n\treturn files;\n}\nfunction collectWorkspaceObjects(workspaceRoot) {\n\treturn walkFiles(workspaceRoot).map((file) => ({\n\t\tkey: relative(workspaceRoot, file).split(\"\\\\\").join(\"/\"),\n\t\tbody: readFileSync(file)\n\t}));\n}\n/** Keys present in object storage but absent from the local workspace root. */\nfunction workspaceKeysToDelete(remoteKeys, localKeys) {\n\treturn remoteKeys.filter((key) => !localKeys.has(key));\n}\nfunction s3Client(config) {\n\treturn new S3Client({\n\t\tregion: config.region,\n\t\tendpoint: config.endpoint,\n\t\tforcePathStyle: config.forcePathStyle,\n\t\tcredentials: {\n\t\t\taccessKeyId: config.accessKeyId,\n\t\t\tsecretAccessKey: config.secretAccessKey\n\t\t}\n\t});\n}\n/** Create the bucket named in `config` when missing (idempotent for races). */\nasync function ensureStorageBucket(config) {\n\tconst client = s3Client(config);\n\ttry {\n\t\tawait client.send(new CreateBucketCommand({ Bucket: config.bucket }));\n\t} catch (error) {\n\t\tif (!isBucketAlreadyExistsError(error)) throw error;\n\t}\n}\nasync function uploadWorkspaceObjects(config, objects, concurrency = DEFAULT_UPLOAD_CONCURRENCY) {\n\tif (objects.length === 0) return;\n\tconst client = s3Client(config);\n\tlet index = 0;\n\tasync function worker() {\n\t\twhile (index < objects.length) {\n\t\t\tconst current = objects[index++];\n\t\t\tawait client.send(new PutObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: current.key,\n\t\t\t\tBody: current.body\n\t\t\t}));\n\t\t}\n\t}\n\tconst workers = Array.from({ length: Math.min(concurrency, objects.length) }, () => worker());\n\tawait Promise.all(workers);\n}\nasync function deleteWorkspaceObjects(config, keys, concurrency = DEFAULT_UPLOAD_CONCURRENCY) {\n\tif (keys.length === 0) return;\n\tconst client = s3Client(config);\n\tlet index = 0;\n\tasync function worker() {\n\t\twhile (index < keys.length) {\n\t\t\tconst key = keys[index++];\n\t\t\tawait client.send(new DeleteObjectCommand({\n\t\t\t\tBucket: config.bucket,\n\t\t\t\tKey: key\n\t\t\t}));\n\t\t}\n\t}\n\tconst workers = Array.from({ length: Math.min(concurrency, keys.length) }, () => worker());\n\tawait Promise.all(workers);\n}\n/** Mirror the host agent workspace directory to the per-agent bucket (upsert + delete stale keys). */\nasync function syncAgentWorkspaceToBucket(input) {\n\tconst bucket = orgAgentBucketName({\n\t\torgBucket: input.orgBucket,\n\t\tagentId: input.agentId\n\t});\n\tconst config = {\n\t\t...input.admin,\n\t\tbucket\n\t};\n\tawait ensureStorageBucket(config);\n\tconst objects = collectWorkspaceObjects(input.agentRoot);\n\tconst localKeys = new Set(objects.map((object) => object.key));\n\tawait deleteWorkspaceObjects(config, workspaceKeysToDelete(await createStorage(config).listObjects(\"\"), localKeys));\n\tawait uploadWorkspaceObjects(config, objects);\n}\n//#endregion\n//#region src/provision/minio.ts\nfunction minioStoragePlugin(options = {}) {\n\tconst adminConfig = storageAdminConfigFromEnv(options.env ?? process.env);\n\tconst adminClient = new S3Client({\n\t\tregion: adminConfig.region,\n\t\tcredentials: {\n\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\tsecretAccessKey: adminConfig.secretAccessKey\n\t\t},\n\t\tendpoint: adminConfig.endpoint,\n\t\tforcePathStyle: adminConfig.forcePathStyle\n\t});\n\treturn {\n\t\tasync provisionOrganization(input) {\n\t\t\tconst bucket = orgStorageBucketName(input, options.bucketNamePrefix);\n\t\t\ttry {\n\t\t\t\tawait adminClient.send(new CreateBucketCommand({ Bucket: bucket }));\n\t\t\t} catch (error) {\n\t\t\t\tif (!isBucketAlreadyExistsError(error)) throw error;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tbucket,\n\t\t\t\tendpoint: adminConfig.endpoint,\n\t\t\t\taccessKeyId: adminConfig.accessKeyId,\n\t\t\t\tsecretAccessKey: adminConfig.secretAccessKey,\n\t\t\t\tregion: adminConfig.region,\n\t\t\t\tforcePathStyle: adminConfig.forcePathStyle\n\t\t\t};\n\t\t},\n\t\tasync deprovisionOrganization(result) {\n\t\t\tconst client = new S3Client({\n\t\t\t\tregion: result.region ?? adminConfig.region,\n\t\t\t\tcredentials: {\n\t\t\t\t\taccessKeyId: result.accessKeyId,\n\t\t\t\t\tsecretAccessKey: result.secretAccessKey\n\t\t\t\t},\n\t\t\t\tendpoint: result.endpoint,\n\t\t\t\tforcePathStyle: result.forcePathStyle ?? true\n\t\t\t});\n\t\t\tif (((await client.send(new ListObjectsV2Command({\n\t\t\t\tBucket: result.bucket,\n\t\t\t\tMaxKeys: 1\n\t\t\t}))).KeyCount ?? 0) > 0) throw new Error(`Refusing to delete non-empty storage bucket ${result.bucket}`);\n\t\t\tawait client.send(new DeleteBucketCommand({ Bucket: result.bucket }));\n\t\t}\n\t};\n}\n//#endregion\nexport { DEFAULT_PARALLEL_BATCH_SIZE, KEYSTROKE_ASSETS_APP_LOGO_PREFIX, KEYSTROKE_ASSETS_AVATAR_PREFIX, KEYSTROKE_ASSETS_BUCKET, KEYSTROKE_ASSETS_ORG_LOGO_PREFIX, KEYSTROKE_ASSETS_PUBLIC_URL_BASE_ENV, MAX_ACTIVE_SOURCE_DOWNLOAD_BYTES, RouteManifestNotFoundError, StoragePreconditionFailedError, appLogoStorageKey, artifactIndexFromModules, artifactLayoutFromStorageKey, assertModuleBlobMatchesHash, bucketIdSegment, chatAttachmentStorageKey, collectArtifactModules, collectWorkspaceObjects, containerPresignEndpointFromEnv, createAssetsStorageClient, createContainerPresignStorage, createStorage, defaultKeystrokeAssetsPublicUrlBase, deleteWorkspaceObjects, deployedFilesManifestKey, ensureKeystrokeAssetsBucket, ensureStorageBucket, extractGzipTarToDir, extractProjectArtifact, extractRouteManifestFromArtifact, isAppLogoStorageKey, isBucketAlreadyExistsError, isChatAttachmentStorageKey, isKeystrokeAssetsAppLogoPublicUrl, isKeystrokeAssetsAvatarPublicUrl, isKeystrokeAssetsOrgLogoPublicUrl, isOrgLogoStorageKey, isProjectArtifactIndexKey, isProjectArtifactTarballKey, isSourceBlobHash, isStorageBucketNotFoundError, isStorageNotFoundError, isUserAvatarStorageKey, keystrokeAssetsAppLogoKeyFromPublicUrl, keystrokeAssetsAvatarKeyFromPublicUrl, keystrokeAssetsKeyFromPublicUrl, keystrokeAssetsOrgLogoKeyFromPublicUrl, keystrokeAssetsPublicUrlBase, loadProjectSourceFiles, mapInParallelBatches, materializeModularArtifact, mergeStoredRouteManifest, minioStoragePlugin, moduleBlobRefsFromModules, openModularArtifactShards, orgAgentBucketName, orgLogoStorageKey, orgStorageBucketName, packDistTree, packProjectArtifact, parseProjectArtifactIndex, prefetchCanvasShards, prefetchRegistryShards, projectArtifactBlobKey, projectArtifactIndexKey, projectArtifactKey, projectModuleBlobKey, projectSourceBlobKey, projectSourceManifestKey, publicKeystrokeAssetsObjectUrl, sha256Hex, storageAdminConfigFromEnv, storageConfigFromEnv, syncAgentWorkspaceToBucket, uploadWorkspaceObjects, userAvatarStorageKey, workspaceKeysToDelete };\n\n//# sourceMappingURL=index.mjs.map","import type { DraftUpdateEvent } from \"@keystrokehq/shared\";\n\n/**\n * Transient fan-out for accepted draft commits. Not a durable event log —\n * no DB table, no replay. Scoped by organization + project so traffic cannot leak.\n */\nexport type ProjectDraftNotifier = {\n publish(input: { organizationId: string; projectId: string; commitSha: string }): Promise<void>;\n /**\n * Subscribe to updates for one project. Returns an unsubscribe function.\n * Listeners receive only `{ projectId, commitSha }` wire payloads.\n */\n subscribe(\n input: { organizationId: string; projectId: string },\n listener: (update: DraftUpdateEvent) => void,\n ): () => void;\n /** Optional cleanup for backends that hold connections (e.g. Redis). */\n close?: () => Promise<void>;\n};\n\ntype Listener = (update: DraftUpdateEvent) => void;\n\nfunction channelKey(organizationId: string, projectId: string): string {\n return `${organizationId}:${projectId}`;\n}\n\n/** Invoke each subscriber independently so one throw cannot starve the rest. */\nfunction deliverDraftUpdateToListeners(\n listeners: Iterable<Listener>,\n update: DraftUpdateEvent,\n context: { organizationId?: string; projectId: string; channel?: string },\n): void {\n for (const listener of listeners) {\n try {\n listener(update);\n } catch (error) {\n console.error(\"[project-draft] draft update listener failed\", {\n organizationId: context.organizationId,\n projectId: context.projectId,\n channel: context.channel,\n error,\n });\n }\n }\n}\n\n/** Simplest correct implementation for OSS / single-process local. */\nexport function createInProcessProjectDraftNotifier(): ProjectDraftNotifier {\n const listeners = new Map<string, Set<Listener>>();\n\n return {\n async publish(input) {\n const key = channelKey(input.organizationId, input.projectId);\n const update: DraftUpdateEvent = {\n projectId: input.projectId,\n commitSha: input.commitSha,\n };\n const set = listeners.get(key);\n if (!set) {\n return;\n }\n deliverDraftUpdateToListeners(set, update, {\n organizationId: input.organizationId,\n projectId: input.projectId,\n channel: key,\n });\n },\n\n subscribe(input, listener) {\n const key = channelKey(input.organizationId, input.projectId);\n let set = listeners.get(key);\n if (!set) {\n set = new Set();\n listeners.set(key, set);\n }\n set.add(listener);\n return () => {\n const current = listeners.get(key);\n if (!current) {\n return;\n }\n current.delete(listener);\n if (current.size === 0) {\n listeners.delete(key);\n }\n };\n },\n };\n}\n\n/**\n * Best-effort publish after an accepted commit. Never throws — commit success\n * must not roll back or report failed solely because notification failed.\n */\nexport async function publishDraftUpdateBestEffort(\n notifier: ProjectDraftNotifier | undefined,\n input: { organizationId: string; projectId: string; commitSha: string },\n): Promise<void> {\n if (!notifier) {\n return;\n }\n try {\n await notifier.publish(input);\n } catch (error) {\n console.error(\"[project-draft] failed to publish draft update notification:\", error);\n }\n}\n"],"mappings":";;;;;;;;;;AAEA,SAAS,mBAAmB,WAAW;CACtC,OAAO,OAAO,KAAK,KAAK,UAAU,SAAS,CAAC,EAAE,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AAI,CAAC;CAC3B,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;CACrB,UAAU,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AACD,MAAM,qCAAqC,EAAE,OAAO;CACnD,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;CAC7B,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC;CAC1B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,yBAAyB;AAChE,CAAC;AACD,MAAM,sCAAsC,EAAE,OAAO;CACpD,WAAW,EAAE,OAAO,EAAE,IAAI;CAC1B,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC;AACD,SAAS,iCAAiC,WAAW;CACpD,OAAO,wBAAwB,SAAS,MAAM,KAAK;AACpD;ACvYA,MAAM,gCAAgC,IAAI,IAAI;CAJ7C;CACA;CACA;AAE6C,CAA0B;AACxE,SAAS,yBAAyB,MAAM;CACvC,OAAO,8BAA8B,IAAI,IAAI;AAC9C;;AAIA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,gBAAgB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,0BAA0B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,uBAAuB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAKA,MAAM,8BAA8B,IAAI,IAAI;CAC3C,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACJ,CAAC;;;;;;;;;AASD,MAAM,yBAAyB,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,GAAG,oCAAoC,EAAE,IAAI,IAAI,oCAAoC,EAAE,MAAM,8BAA8B,iDAAiD;;;;;;;AAO/O,MAAM,kCAAkC,uBAAuB,QAAQ,SAAS,CAAC,4BAA4B,IAAI,IAAI,GAAG,uBAAuB;AAC/I,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