@ultrst-armada/kloks 1.26.2 → 1.26.4

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 (272) hide show
  1. package/README.md +39 -0
  2. package/index.d.ts +16 -10
  3. package/index.js +3 -0
  4. package/package.json +70 -8
  5. package/packages/audio-midi/dist/{audioClipEngine-BOT33JKI.js → audioClipEngine-LKZRWTJ3.js} +2 -2
  6. package/packages/audio-midi/dist/{audioInputManager-BLDGGLAR.js → audioInputManager-5BNHLOJM.js} +1 -1
  7. package/packages/audio-midi/dist/{chunk-N55BWOC6.js → chunk-M4JFGTHE.js} +1 -1
  8. package/packages/audio-midi/dist/{chunk-3GRGELA4.js → chunk-OUOFTYHY.js} +50 -11
  9. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Compressor/manifest.json +7 -0
  10. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Delay/manifest.json +7 -0
  11. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Equalizer/manifest.json +7 -0
  12. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Limiter/manifest.json +7 -0
  13. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/MultibandCompressor/manifest.json +7 -0
  14. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Reverb/manifest.json +7 -0
  15. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Saturation/manifest.json +7 -0
  16. package/packages/audio-midi/dist/index.d.ts +10 -1
  17. package/packages/audio-midi/dist/index.js +36 -20
  18. package/packages/audio-midi/package.json +8 -0
  19. package/packages/backend/dist/ai-models/index.js +2 -2
  20. package/packages/backend/dist/ai-routing/index.js +3 -3
  21. package/packages/backend/dist/api/BaseApiRoute.d.ts +1 -1
  22. package/packages/backend/dist/api/index.js +1 -1
  23. package/packages/backend/dist/auth/CanonicalAuthClient.d.ts +6 -6
  24. package/packages/backend/dist/auth/index.js +2 -1
  25. package/packages/backend/dist/chunk-2Y2EXYDK.js +0 -0
  26. package/packages/backend/dist/{chunk-3SWMKYCI.js → chunk-3FZSYSJC.js} +18 -9
  27. package/packages/backend/dist/chunk-5F5V7NAG.js +54 -0
  28. package/packages/backend/dist/{chunk-KVWBIDZG.js → chunk-BVXGUHLZ.js} +1 -1
  29. package/packages/backend/dist/chunk-DAG2L4RN.js +0 -0
  30. package/packages/backend/dist/{chunk-GKXI5V23.js → chunk-G7PPVOFP.js} +17 -51
  31. package/packages/backend/dist/{chunk-GKQ42CYW.js → chunk-H6ET362U.js} +3 -3
  32. package/packages/backend/dist/chunk-HUY4272L.js +69 -0
  33. package/packages/backend/dist/chunk-JQKKMUCT.js +0 -0
  34. package/packages/backend/dist/{chunk-PT6J6UEU.js → chunk-LMAU62ZG.js} +4 -4
  35. package/packages/backend/dist/{chunk-4TPSXGG5.js → chunk-MZK362U4.js} +12 -12
  36. package/packages/backend/dist/{chunk-BQLQTUDD.js → chunk-NGEB3CF5.js} +3 -35
  37. package/packages/backend/dist/{chunk-3VWBZEMG.js → chunk-NTKUQVCQ.js} +4 -5
  38. package/packages/backend/dist/chunk-NY2SQOXI.js +34 -0
  39. package/packages/backend/dist/{chunk-JOTDEFRG.js → chunk-OXEP3AP6.js} +5 -4
  40. package/packages/backend/dist/chunk-RABSY2JU.js +0 -0
  41. package/packages/backend/dist/{chunk-M45KQRPR.js → chunk-RFPGUJAZ.js} +11 -11
  42. package/packages/backend/dist/{chunk-TWCEVES2.js → chunk-WC6EPW3A.js} +1 -1
  43. package/packages/backend/dist/{chunk-UCCFQCAE.js → chunk-Y5ENDXU2.js} +72 -129
  44. package/packages/backend/dist/{chunk-EO5VUYYU.js → chunk-Y7ZE6D5H.js} +4 -4
  45. package/packages/backend/dist/{chunk-RCCQ7IRM.js → chunk-ZBNSK26X.js} +2 -2
  46. package/packages/backend/dist/control-plane/AuditLogger.d.ts +1 -1
  47. package/packages/backend/dist/control-plane/ControlPlaneManager.d.ts +1 -1
  48. package/packages/backend/dist/control-plane/index.js +1 -1
  49. package/packages/backend/dist/core/dynamicRouteResolver.d.ts +1 -1
  50. package/packages/backend/dist/core/routesCore.d.ts +1 -1
  51. package/packages/backend/dist/core/vercelTransformer.d.ts +1 -1
  52. package/packages/backend/dist/core/workspaceCore.d.ts +2 -2
  53. package/packages/backend/dist/data/BaseDataProvider.d.ts +1 -1
  54. package/packages/backend/dist/development/index.js +34 -21
  55. package/packages/backend/dist/development/playwrightInspectionService.js +1 -2
  56. package/packages/backend/dist/development/webContainerService.js +1 -2
  57. package/packages/backend/dist/index.d.ts +4 -24
  58. package/packages/backend/dist/index.js +14 -4657
  59. package/packages/backend/dist/krnl-ai-services.d.ts +9 -9
  60. package/packages/backend/dist/krnl-ai-services.js +5 -6
  61. package/packages/backend/dist/krnl-services.js +8 -7
  62. package/packages/backend/dist/node.d.ts +28 -0
  63. package/packages/backend/dist/node.js +4754 -0
  64. package/packages/backend/dist/resourceEngine/BaseResourceFetcher.d.ts +3 -3
  65. package/packages/backend/dist/resourceEngine/CloudflareResourceFetcher.d.ts +3 -3
  66. package/packages/backend/dist/resourceEngine/ResourceFetcherRegistry.d.ts +5 -5
  67. package/packages/backend/dist/resourceEngine/VercelResourceFetcher.d.ts +3 -3
  68. package/packages/backend/dist/resourceEngine/adapters/CloudflareResourceAdapter.d.ts +2 -2
  69. package/packages/backend/dist/resourceEngine/adapters/VercelResourceAdapter.d.ts +2 -2
  70. package/packages/backend/dist/resourceEngine/calculator/UniversalResourceCalculator.d.ts +1 -1
  71. package/packages/backend/dist/resourceEngine/calculator/types.d.ts +1 -1
  72. package/packages/backend/dist/resourceEngine/index.d.ts +6 -6
  73. package/packages/backend/dist/resourceEngine/types/depm/entities.d.ts +2 -2
  74. package/packages/backend/dist/resourceEngine/types.d.ts +1 -1
  75. package/packages/backend/dist/resourceEngine/weightEngine/helpers.d.ts +1 -1
  76. package/packages/backend/dist/resourceEngine/weightEngine/index.d.ts +2 -2
  77. package/packages/backend/dist/resourceEngine/weightEngine/weightEngine.d.ts +1 -1
  78. package/packages/backend/dist/resourceEngine/weightEngine.d.ts +1 -1
  79. package/packages/backend/dist/server/services/assetPoolService/assetPoolService.d.ts +3 -3
  80. package/packages/backend/dist/server/services/projectService/projectService.d.ts +3 -3
  81. package/packages/backend/dist/services/index.d.ts +2 -10
  82. package/packages/backend/dist/services/index.js +1 -37
  83. package/packages/backend/dist/services/node.d.ts +10 -0
  84. package/packages/backend/dist/services/node.js +38 -0
  85. package/packages/backend/dist/srkl/index.js +1 -1
  86. package/packages/backend/dist/storage/BaseStorageAdapter.d.ts +1 -1
  87. package/packages/backend/dist/storage/GoogleDriveWorkspaceService.d.ts +69 -0
  88. package/packages/backend/dist/storage/GoogleDriveWorkspaceService.test.d.ts +1 -0
  89. package/packages/backend/dist/storage/S3Adapter.d.ts +5 -0
  90. package/packages/backend/dist/storage/googleDriveSdk.d.ts +1 -0
  91. package/packages/backend/dist/storage/index.d.ts +1 -10
  92. package/packages/backend/dist/storage/index.js +8 -43
  93. package/packages/backend/dist/storage/node.d.ts +14 -0
  94. package/packages/backend/dist/storage/node.js +66 -0
  95. package/packages/backend/dist/storage-workspace.d.ts +2 -0
  96. package/packages/backend/dist/storage-workspace.js +339 -0
  97. package/packages/backend/dist/workspace/WorkspaceCloneSyncEngine.d.ts +1 -1
  98. package/packages/backend/dist/workspace/index.d.ts +1 -5
  99. package/packages/backend/dist/workspace/index.js +4 -24
  100. package/packages/backend/dist/workspace/node.d.ts +8 -0
  101. package/packages/backend/dist/workspace/node.js +30 -0
  102. package/packages/backend/package.json +40 -3
  103. package/packages/functions/dist/base-DDYO-DzM.d.ts +64 -0
  104. package/packages/functions/dist/base.d.ts +1 -0
  105. package/packages/functions/dist/base.js +6 -0
  106. package/packages/functions/dist/chunk-6EHIZHO4.js +555 -0
  107. package/packages/functions/dist/chunk-Z4LM5TOJ.js +114 -0
  108. package/packages/functions/dist/index.d.ts +4 -373
  109. package/packages/functions/dist/index.js +53 -1693
  110. package/packages/functions/dist/node.d.ts +110 -0
  111. package/packages/functions/dist/node.js +442 -0
  112. package/packages/functions/dist/portable.d.ts +207 -0
  113. package/packages/functions/dist/portable.js +94 -0
  114. package/packages/functions/package.json +23 -1
  115. package/packages/{functions/dist/chunk-K6H7T3EP.js → services/dist/chunk-P54QSKOQ.js} +1 -3
  116. package/packages/{state-graph/dist/dist-es-TLPJYZTE.js → services/dist/dist-es-2P6LFFZL.js} +1 -1
  117. package/packages/services/dist/{dist-es-5IACWOIO.js → dist-es-OZCE67MW.js} +1 -1
  118. package/packages/services/dist/{dist-es-3DGJJFOU.js → dist-es-RUJB3ALN.js} +3 -3
  119. package/packages/{state-graph/dist/dist-es-OECEAUXH.js → services/dist/dist-es-SSJGP5AI.js} +4 -4
  120. package/packages/services/dist/{loadSso-M3ZIZDGO.js → loadSso-3PZYFUB7.js} +1 -1
  121. package/packages/{functions/dist/signin-YXALFRYB.js → services/dist/signin-WYPGSXHF.js} +1 -1
  122. package/packages/{state-graph/dist/sso-oidc-NXFKRL6O.js → services/dist/sso-oidc-PQMIMLJU.js} +1 -1
  123. package/packages/{state-graph/dist/sts-MICPT37B.js → services/dist/sts-Z7LR3AZH.js} +1 -1
  124. package/packages/state-graph/dist/browser.d.ts +18 -0
  125. package/packages/state-graph/dist/browser.js +613 -0
  126. package/packages/state-graph/dist/browser.test.d.ts +1 -0
  127. package/packages/state-graph/dist/{chunk-KG6QYS26.js → chunk-5KP74NMF.js} +80 -80
  128. package/packages/state-graph/dist/{chunk-4UVGXFEM.js → chunk-LVULR5M4.js} +1 -1
  129. package/packages/state-graph/dist/{chunk-S22PMERU.js → chunk-OXUDG6HE.js} +1 -1
  130. package/packages/state-graph/dist/chunk-UKTICGGV.js +9523 -0
  131. package/packages/state-graph/dist/domain/index.js +2 -3
  132. package/packages/state-graph/dist/engine/AudioConcepts.d.ts +1 -1
  133. package/packages/state-graph/dist/engine/GraphConcepts.d.ts +1 -1
  134. package/packages/state-graph/dist/engine/core/archetypes/audioArchetypes.d.ts +1 -1
  135. package/packages/state-graph/dist/engine/core/archetypes/effectArchetypes.d.ts +1 -1
  136. package/packages/state-graph/dist/engine/core/archetypes/primitiveArchetypes.d.ts +1 -1
  137. package/packages/state-graph/dist/engine/core/archetypes/routingArchetypes.d.ts +1 -1
  138. package/packages/state-graph/dist/engine/core/archetypes/triggerModuleArchetypes.d.ts +1 -1
  139. package/packages/state-graph/dist/engine/core/assets/containerSprites.d.ts +1 -1
  140. package/packages/state-graph/dist/engine/core/assets/effectSprites.d.ts +1 -1
  141. package/packages/state-graph/dist/engine/core/assets/primitiveSprites.d.ts +1 -1
  142. package/packages/state-graph/dist/engine/core/assets/routingSprites.d.ts +1 -1
  143. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalAudioInputEndpoint.d.ts +1 -1
  144. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalMidiInputEndpoint.d.ts +1 -1
  145. package/packages/state-graph/dist/engine/core/canonicalIo/topLevelIoRegistry.d.ts +6 -6
  146. package/packages/state-graph/dist/engine/core/canonicalIo/types.d.ts +1 -1
  147. package/packages/state-graph/dist/engine/core/graphDataService.d.ts +1 -1
  148. package/packages/state-graph/dist/engine/core/hierarchy/index.d.ts +11 -11
  149. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeParent.d.ts +3 -3
  150. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeTypes.d.ts +1 -1
  151. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketParent.d.ts +2 -2
  152. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketTypes.d.ts +1 -1
  153. package/packages/state-graph/dist/engine/core/hierarchy/ui/UIElementBase.d.ts +3 -3
  154. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireParent.d.ts +2 -2
  155. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireTypes.d.ts +1 -1
  156. package/packages/state-graph/dist/engine/core/nodeArchetypeRegistry.d.ts +1 -1
  157. package/packages/state-graph/dist/engine/core/socketRegistry/containersSockets.d.ts +1 -1
  158. package/packages/state-graph/dist/engine/core/socketRegistry/customRegistry.d.ts +1 -1
  159. package/packages/state-graph/dist/engine/core/socketRegistry/landmarksSockets.d.ts +1 -1
  160. package/packages/state-graph/dist/engine/core/socketRegistry/primitivesSockets.d.ts +1 -1
  161. package/packages/state-graph/dist/engine/core/socketRegistry/processorsSockets.d.ts +1 -1
  162. package/packages/state-graph/dist/engine/core/sockets/arrangementControlSockets.d.ts +1 -1
  163. package/packages/state-graph/dist/engine/core/sockets/audioSockets.d.ts +1 -1
  164. package/packages/state-graph/dist/engine/core/sockets/folderButtonSockets.d.ts +1 -1
  165. package/packages/state-graph/dist/engine/core/sockets/moduleSockets.d.ts +1 -1
  166. package/packages/state-graph/dist/engine/core/sockets/playbackSockets.d.ts +1 -1
  167. package/packages/state-graph/dist/engine/core/sockets/primitiveSockets.d.ts +1 -1
  168. package/packages/state-graph/dist/engine/core/sockets/routingSockets.d.ts +1 -1
  169. package/packages/state-graph/dist/engine/core/sockets/samplerSockets.d.ts +1 -1
  170. package/packages/state-graph/dist/engine/core/sockets/stripSockets.d.ts +1 -1
  171. package/packages/state-graph/dist/engine/functions/arrangementFactory.d.ts +1 -1
  172. package/packages/state-graph/dist/engine/functions/codeNodeParser/codeNodeParser.d.ts +2 -2
  173. package/packages/state-graph/dist/engine/functions/codeNodeParser/helpers.d.ts +1 -1
  174. package/packages/state-graph/dist/engine/functions/connection/portMatching.d.ts +1 -1
  175. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/helpers.d.ts +1 -1
  176. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/signalCompatibility.d.ts +1 -1
  177. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility.d.ts +1 -1
  178. package/packages/state-graph/dist/engine/functions/connection/wireValidation.d.ts +1 -1
  179. package/packages/state-graph/dist/engine/functions/containerClipSync.d.ts +1 -1
  180. package/packages/state-graph/dist/engine/functions/containerFactory/containerFactory.d.ts +1 -1
  181. package/packages/state-graph/dist/engine/functions/effectLogic.d.ts +1 -1
  182. package/packages/state-graph/dist/engine/functions/graphManager/graphManager.d.ts +1 -1
  183. package/packages/state-graph/dist/engine/functions/graphManager.d.ts +1 -1
  184. package/packages/state-graph/dist/engine/functions/nodeFactory/nodeFactory.d.ts +8 -8
  185. package/packages/state-graph/dist/engine/functions/nodeFactory.d.ts +2 -2
  186. package/packages/state-graph/dist/engine/functions/signalTable/audioMidiSignals.d.ts +1 -1
  187. package/packages/state-graph/dist/engine/functions/signalTable/canonicalEffectsTable.d.ts +1 -1
  188. package/packages/state-graph/dist/engine/functions/signalTable/dataSignals.d.ts +1 -1
  189. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/helpers.d.ts +1 -1
  190. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/socketCompatibilitySpawner.d.ts +1 -1
  191. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner.d.ts +1 -1
  192. package/packages/state-graph/dist/engine/functions/spawnNodeFactory.d.ts +1 -1
  193. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine/helpers.d.ts +1 -1
  194. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine.d.ts +2 -2
  195. package/packages/state-graph/dist/engine/types/auth.d.ts +1 -1
  196. package/packages/state-graph/dist/engine/types/hardwareBus.d.ts +1 -1
  197. package/packages/state-graph/dist/engine/types/legacyTypes.d.ts +1 -1
  198. package/packages/state-graph/dist/engine/types/nodesArrangement.d.ts +2 -2
  199. package/packages/state-graph/dist/engine/types/nodesAudio.d.ts +5 -5
  200. package/packages/state-graph/dist/engine/types/nodesControl.d.ts +2 -2
  201. package/packages/state-graph/dist/engine/types/nodesPlayback.d.ts +2 -2
  202. package/packages/state-graph/dist/engine/types/nodesPrimitives.d.ts +6 -6
  203. package/packages/state-graph/dist/engine/types/nodesRouting.d.ts +2 -2
  204. package/packages/state-graph/dist/engine/types/sceneData.d.ts +2 -2
  205. package/packages/state-graph/dist/engine/types/sceneState.d.ts +4 -4
  206. package/packages/state-graph/dist/engine/types/signals.d.ts +2 -2
  207. package/packages/state-graph/dist/engine/types/stripsTypes.d.ts +2 -2
  208. package/packages/state-graph/dist/index.js +262 -9979
  209. package/packages/state-graph/dist/rules/index.js +0 -1
  210. package/packages/state-graph/dist/runtime-entrypoint.test.d.ts +1 -0
  211. package/packages/state-graph/dist/spatial/index.js +0 -1
  212. package/packages/state-graph/dist/state/index.js +0 -1
  213. package/packages/state-graph/dist/store/CommandApi.d.ts +2 -2
  214. package/packages/state-graph/dist/store/index.js +2 -3
  215. package/packages/state-graph/package.json +8 -2
  216. package/scripts/normalize-package-declarations.mjs +63 -0
  217. package/packages/backend/dist/chunk-SXDYW3QA.js +0 -579
  218. package/packages/functions/dist/bowser-F6LIZBYW.js +0 -2821
  219. package/packages/functions/dist/chunk-34KJBG4F.js +0 -357
  220. package/packages/functions/dist/chunk-EAQYK3U2.js +0 -41
  221. package/packages/functions/dist/chunk-IOAPEUC7.js +0 -3424
  222. package/packages/functions/dist/chunk-J64ZDIIX.js +0 -2753
  223. package/packages/functions/dist/chunk-N3MSTUJN.js +0 -4785
  224. package/packages/functions/dist/chunk-VP26OHBN.js +0 -480
  225. package/packages/functions/dist/chunk-VRLVLNLG.js +0 -1727
  226. package/packages/functions/dist/dist-TKZ5TDRN.js +0 -1124
  227. package/packages/functions/dist/dist-W7ZJS3LZ.js +0 -899
  228. package/packages/functions/dist/dist-es-3DGJJFOU.js +0 -338
  229. package/packages/functions/dist/dist-es-5IACWOIO.js +0 -69
  230. package/packages/functions/dist/dist-es-BWLDIBIA.js +0 -47
  231. package/packages/functions/dist/dist-es-DO3F4OBN.js +0 -377
  232. package/packages/functions/dist/dist-es-NN7AKU7P.js +0 -175
  233. package/packages/functions/dist/dist-es-QZ6GKMM7.js +0 -220
  234. package/packages/functions/dist/dist-es-R3VEGXOP.js +0 -87
  235. package/packages/functions/dist/dist-es-TLPJYZTE.js +0 -294
  236. package/packages/functions/dist/event-streams-DRE6QVD6.js +0 -940
  237. package/packages/functions/dist/loadSso-M3ZIZDGO.js +0 -586
  238. package/packages/functions/dist/multipart-parser-YYFFJ4QD.js +0 -371
  239. package/packages/functions/dist/src-2QCYQXYH.js +0 -1396
  240. package/packages/functions/dist/sso-oidc-NXFKRL6O.js +0 -847
  241. package/packages/functions/dist/sts-MICPT37B.js +0 -1253
  242. package/packages/functions/dist/transformers.node-R6VHTGC2.js +0 -43879
  243. package/packages/services/dist/chunk-K6H7T3EP.js +0 -1991
  244. package/packages/services/dist/dist-es-QZ6GKMM7.js +0 -220
  245. package/packages/services/dist/dist-es-TLPJYZTE.js +0 -294
  246. package/packages/services/dist/signin-YXALFRYB.js +0 -831
  247. package/packages/services/dist/sso-oidc-NXFKRL6O.js +0 -847
  248. package/packages/services/dist/sts-MICPT37B.js +0 -1253
  249. package/packages/state-graph/dist/bowser-F6LIZBYW.js +0 -2821
  250. package/packages/state-graph/dist/chunk-34KJBG4F.js +0 -357
  251. package/packages/state-graph/dist/chunk-EAQYK3U2.js +0 -41
  252. package/packages/state-graph/dist/chunk-IOAPEUC7.js +0 -3424
  253. package/packages/state-graph/dist/chunk-J64ZDIIX.js +0 -2753
  254. package/packages/state-graph/dist/chunk-K6H7T3EP.js +0 -1991
  255. package/packages/state-graph/dist/chunk-N3MSTUJN.js +0 -4785
  256. package/packages/state-graph/dist/chunk-VP26OHBN.js +0 -480
  257. package/packages/state-graph/dist/chunk-VRLVLNLG.js +0 -1727
  258. package/packages/state-graph/dist/dist-TKZ5TDRN.js +0 -1124
  259. package/packages/state-graph/dist/dist-W7ZJS3LZ.js +0 -899
  260. package/packages/state-graph/dist/dist-es-3DGJJFOU.js +0 -338
  261. package/packages/state-graph/dist/dist-es-5IACWOIO.js +0 -69
  262. package/packages/state-graph/dist/dist-es-BWLDIBIA.js +0 -47
  263. package/packages/state-graph/dist/dist-es-DO3F4OBN.js +0 -377
  264. package/packages/state-graph/dist/dist-es-NN7AKU7P.js +0 -175
  265. package/packages/state-graph/dist/dist-es-R3VEGXOP.js +0 -87
  266. package/packages/state-graph/dist/event-streams-DRE6QVD6.js +0 -940
  267. package/packages/state-graph/dist/loadSso-M3ZIZDGO.js +0 -586
  268. package/packages/state-graph/dist/multipart-parser-YYFFJ4QD.js +0 -371
  269. package/packages/state-graph/dist/signin-YXALFRYB.js +0 -831
  270. package/packages/state-graph/dist/src-2QCYQXYH.js +0 -1396
  271. package/packages/state-graph/dist/transformers.node-R6VHTGC2.js +0 -43879
  272. package/packages/backend/dist/{chunk-LMWXONZG.js → chunk-EREYT3WJ.js} +3 -3
@@ -0,0 +1,339 @@
1
+ // src/storage/GoogleDriveWorkspaceService.ts
2
+ var GOOGLE_DRIVE_WORKSPACE_SCOPE = "https://www.googleapis.com/auth/drive";
3
+ var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
4
+ var GOOGLE_API_URL = "https://www.googleapis.com/drive/v3";
5
+ var GOOGLE_UPLOAD_URL = "https://www.googleapis.com/upload/drive/v3";
6
+ var FOLDER_MIME_TYPE = "application/vnd.google-apps.folder";
7
+ function encodeBytes(parts) {
8
+ const encoder = new TextEncoder();
9
+ const buffers = parts.map((part) => typeof part === "string" ? encoder.encode(part) : part);
10
+ const output = new Uint8Array(buffers.reduce((sum, item) => sum + item.length, 0));
11
+ let offset = 0;
12
+ for (const item of buffers) {
13
+ output.set(item, offset);
14
+ offset += item.length;
15
+ }
16
+ return output;
17
+ }
18
+ function quoteDriveQuery(value) {
19
+ return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
20
+ }
21
+ async function parseJson(response) {
22
+ return response.json().catch(() => ({}));
23
+ }
24
+ var GoogleDriveWorkspaceService = class _GoogleDriveWorkspaceService {
25
+ options;
26
+ fetcher;
27
+ tokens;
28
+ refreshPromise;
29
+ constructor(options) {
30
+ if (!options.clientId?.trim()) throw new Error("Google Drive OAuth client ID is required.");
31
+ if (!options.redirectUri?.trim()) throw new Error("Google Drive OAuth redirect URI is required.");
32
+ this.options = options;
33
+ this.fetcher = options.fetcher || fetch;
34
+ this.tokens = { ...options.tokens || { accessToken: "" } };
35
+ }
36
+ static createAuthorizationUrl(options, state, scopes = [GOOGLE_DRIVE_WORKSPACE_SCOPE]) {
37
+ if (!options.clientId?.trim() || !options.redirectUri?.trim()) {
38
+ throw new Error("Google Drive OAuth client ID and redirect URI are required.");
39
+ }
40
+ if (!state?.trim()) throw new Error("A non-empty Google Drive OAuth state is required.");
41
+ const url = new URL("https://accounts.google.com/o/oauth2/v2/auth");
42
+ url.searchParams.set("client_id", options.clientId);
43
+ url.searchParams.set("redirect_uri", options.redirectUri);
44
+ url.searchParams.set("response_type", "code");
45
+ url.searchParams.set("access_type", "offline");
46
+ url.searchParams.set("prompt", "consent");
47
+ url.searchParams.set("include_granted_scopes", "true");
48
+ url.searchParams.set("scope", scopes.join(" "));
49
+ url.searchParams.set("state", state);
50
+ return url.toString();
51
+ }
52
+ static async exchangeAuthorizationCode(options, code, existingRefreshToken, codeVerifier) {
53
+ if (!code?.trim()) throw new Error("Google Drive authorization code is required.");
54
+ return _GoogleDriveWorkspaceService.requestTokens(
55
+ options.fetcher || fetch,
56
+ {
57
+ client_id: options.clientId,
58
+ client_secret: options.clientSecret || "",
59
+ redirect_uri: options.redirectUri,
60
+ grant_type: "authorization_code",
61
+ code,
62
+ ...codeVerifier ? { code_verifier: codeVerifier } : {}
63
+ },
64
+ existingRefreshToken
65
+ );
66
+ }
67
+ static async requestTokens(fetcher, fields, existingRefreshToken) {
68
+ const response = await fetcher(GOOGLE_TOKEN_URL, {
69
+ method: "POST",
70
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
71
+ body: new URLSearchParams(fields),
72
+ cache: "no-store"
73
+ });
74
+ const data = await parseJson(response);
75
+ if (!response.ok || typeof data.access_token !== "string" || !data.access_token) {
76
+ const reason = typeof data.error === "string" ? data.error : "token_exchange_failed";
77
+ throw new Error(`Google Drive OAuth token request failed (${reason}).`);
78
+ }
79
+ return {
80
+ accessToken: data.access_token,
81
+ ...data.refresh_token || existingRefreshToken ? { refreshToken: data.refresh_token || existingRefreshToken } : {},
82
+ ...Number.isFinite(Number(data.expires_in)) ? { expiresAt: Date.now() + Number(data.expires_in) * 1e3 } : {},
83
+ ...typeof data.token_type === "string" ? { tokenType: data.token_type } : {}
84
+ };
85
+ }
86
+ async getAccessToken(forceRefresh = false) {
87
+ const expiresSoon = Boolean(this.tokens.expiresAt && this.tokens.expiresAt <= Date.now() + 6e4);
88
+ if (!forceRefresh && this.tokens.accessToken && !expiresSoon) return this.tokens.accessToken;
89
+ if (!this.tokens.refreshToken || !this.options.clientSecret) {
90
+ throw new Error("Google Drive credentials are missing or expired. Reconnect the Google account.");
91
+ }
92
+ if (!this.refreshPromise) {
93
+ this.refreshPromise = _GoogleDriveWorkspaceService.requestTokens(
94
+ this.fetcher,
95
+ {
96
+ client_id: this.options.clientId,
97
+ client_secret: this.options.clientSecret,
98
+ refresh_token: this.tokens.refreshToken,
99
+ grant_type: "refresh_token"
100
+ },
101
+ this.tokens.refreshToken
102
+ ).then(async (tokens) => {
103
+ this.tokens = tokens;
104
+ await this.options.persistTokens?.(tokens);
105
+ return tokens;
106
+ }).finally(() => {
107
+ this.refreshPromise = void 0;
108
+ });
109
+ }
110
+ const refreshed = await this.refreshPromise;
111
+ return refreshed.accessToken;
112
+ }
113
+ async api(path, init = {}, retry = true) {
114
+ const token = await this.getAccessToken();
115
+ const response = await this.fetcher(
116
+ path.startsWith("https://") ? path : `${GOOGLE_API_URL}/${path.replace(/^\/+/, "")}`,
117
+ {
118
+ ...init,
119
+ headers: {
120
+ ...init.headers || {},
121
+ Authorization: `Bearer ${token}`
122
+ },
123
+ cache: "no-store"
124
+ }
125
+ );
126
+ if (response.status === 401 && retry && this.tokens.refreshToken) {
127
+ await this.getAccessToken(true);
128
+ return this.api(path, init, false);
129
+ }
130
+ if (!response.ok) {
131
+ const data = await parseJson(response);
132
+ const message = typeof data.error?.message === "string" ? data.error.message : `Google Drive request failed with HTTP ${response.status}.`;
133
+ throw new Error(message);
134
+ }
135
+ return response;
136
+ }
137
+ async listFiles(parentId, query = "trashed = false") {
138
+ const files = [];
139
+ let pageToken = "";
140
+ do {
141
+ const url = new URL(`${GOOGLE_API_URL}/files`);
142
+ url.searchParams.set("q", `'${quoteDriveQuery(parentId)}' in parents and ${query}`);
143
+ url.searchParams.set("fields", "nextPageToken,files(id,name,mimeType,size,modifiedTime,parents)");
144
+ url.searchParams.set("pageSize", "1000");
145
+ url.searchParams.set("supportsAllDrives", "true");
146
+ url.searchParams.set("includeItemsFromAllDrives", "true");
147
+ if (pageToken) url.searchParams.set("pageToken", pageToken);
148
+ const data = await parseJson(await this.api(url.toString()));
149
+ if (Array.isArray(data.files)) files.push(...data.files);
150
+ pageToken = typeof data.nextPageToken === "string" ? data.nextPageToken : "";
151
+ } while (pageToken);
152
+ return files;
153
+ }
154
+ async findChild(parentId, name) {
155
+ const matches = await this.listFiles(
156
+ parentId,
157
+ `name = '${quoteDriveQuery(name)}' and trashed = false`
158
+ );
159
+ return matches.find((item) => Boolean(item.id));
160
+ }
161
+ async resolveParent(relativePath, create = false) {
162
+ let parent = this.options.rootFolderId || "root";
163
+ for (const segment of relativePath.replace(/\\/g, "/").split("/").filter(Boolean)) {
164
+ let child = await this.findChild(parent, segment);
165
+ if (!child && create) {
166
+ const data = await parseJson(await this.api("files", {
167
+ method: "POST",
168
+ headers: { "Content-Type": "application/json" },
169
+ body: JSON.stringify({
170
+ name: segment,
171
+ mimeType: FOLDER_MIME_TYPE,
172
+ parents: [parent]
173
+ })
174
+ }));
175
+ child = data;
176
+ }
177
+ if (!child?.id || child.mimeType !== FOLDER_MIME_TYPE) {
178
+ throw new Error(`Google Drive folder not found: ${segment}`);
179
+ }
180
+ parent = child.id;
181
+ }
182
+ return parent;
183
+ }
184
+ splitPath(value) {
185
+ const normalized = value.replace(/\\/g, "/").replace(/^\/+|\/+$/g, "");
186
+ const index = normalized.lastIndexOf("/");
187
+ return index < 0 ? { parent: "", name: normalized } : { parent: normalized.slice(0, index), name: normalized.slice(index + 1) };
188
+ }
189
+ async getAccountIdentity() {
190
+ const url = new URL(`${GOOGLE_API_URL}/about`);
191
+ url.searchParams.set("fields", "user(permissionId,emailAddress)");
192
+ const data = await parseJson(await this.api(url.toString()));
193
+ const accountId = data.user?.permissionId || data.user?.emailAddress;
194
+ if (typeof accountId !== "string" || !accountId) {
195
+ throw new Error("Google Drive did not return a stable account identity.");
196
+ }
197
+ return {
198
+ accountId,
199
+ ...typeof data.user?.emailAddress === "string" ? { email: data.user.emailAddress } : {}
200
+ };
201
+ }
202
+ async listFolders(parentFolderId = this.options.rootFolderId || "root") {
203
+ const files = await this.listFiles(
204
+ parentFolderId,
205
+ `mimeType = '${FOLDER_MIME_TYPE}' and trashed = false`
206
+ );
207
+ return files.flatMap((file) => file.id && file.name ? [{
208
+ id: file.id,
209
+ name: file.name,
210
+ mimeType: FOLDER_MIME_TYPE,
211
+ parentIds: file.parents || [],
212
+ modifiedAt: file.modifiedTime ? Date.parse(file.modifiedTime) : 0
213
+ }] : []);
214
+ }
215
+ async resolveFolder(folderId) {
216
+ if (!folderId?.trim()) throw new Error("A Google Drive folder ID is required.");
217
+ const url = new URL(`${GOOGLE_API_URL}/files/${encodeURIComponent(folderId)}`);
218
+ url.searchParams.set("fields", "id,name,mimeType,parents,modifiedTime");
219
+ url.searchParams.set("supportsAllDrives", "true");
220
+ const file = await parseJson(await this.api(url.toString()));
221
+ if (!file.id || !file.name || file.mimeType !== FOLDER_MIME_TYPE) {
222
+ throw new Error("The selected Google Drive item is not a folder.");
223
+ }
224
+ return {
225
+ id: file.id,
226
+ name: file.name,
227
+ mimeType: file.mimeType,
228
+ parentIds: file.parents || [],
229
+ modifiedAt: file.modifiedTime ? Date.parse(file.modifiedTime) : 0
230
+ };
231
+ }
232
+ async selectRootFolder(folderId) {
233
+ const folder = await this.resolveFolder(folderId);
234
+ this.options.rootFolderId = folder.id;
235
+ return folder;
236
+ }
237
+ async read(path) {
238
+ const { parent, name } = this.splitPath(path);
239
+ if (!name) throw new Error("A Google Drive file path is required.");
240
+ const parentId = await this.resolveParent(parent);
241
+ const file = await this.findChild(parentId, name);
242
+ if (!file?.id || file.mimeType === FOLDER_MIME_TYPE) throw new Error(`Google Drive file not found: ${path}`);
243
+ const url = new URL(`${GOOGLE_API_URL}/files/${encodeURIComponent(file.id)}`);
244
+ url.searchParams.set("alt", "media");
245
+ return new Uint8Array(await (await this.api(url.toString())).arrayBuffer());
246
+ }
247
+ async write(path, bytes, contentType = "application/octet-stream") {
248
+ const { parent, name } = this.splitPath(path);
249
+ if (!name) throw new Error("A Google Drive file name is required.");
250
+ const parentId = await this.resolveParent(parent, true);
251
+ const existing = await this.findChild(parentId, name);
252
+ if (existing?.mimeType === FOLDER_MIME_TYPE) throw new Error(`Google Drive path is a folder: ${path}`);
253
+ const data = typeof bytes === "string" ? new TextEncoder().encode(bytes) : bytes;
254
+ const boundary = `kloks-drive-${crypto.randomUUID()}`;
255
+ const body = encodeBytes([
256
+ `--${boundary}\\r\\nContent-Type: application/json; charset=UTF-8\\r\\n\\r\\n`,
257
+ JSON.stringify({
258
+ name,
259
+ mimeType: contentType,
260
+ ...!existing?.id ? { parents: [parentId] } : {}
261
+ }),
262
+ `\\r\\n--${boundary}\\r\\nContent-Type: ${contentType}\\r\\n\\r\\n`,
263
+ data,
264
+ `\\r\\n--${boundary}--`
265
+ ]);
266
+ const endpoint = existing?.id ? `${GOOGLE_UPLOAD_URL}/files/${encodeURIComponent(existing.id)}?uploadType=multipart&supportsAllDrives=true` : `${GOOGLE_UPLOAD_URL}/files?uploadType=multipart&supportsAllDrives=true`;
267
+ await this.api(endpoint, {
268
+ method: existing?.id ? "PATCH" : "POST",
269
+ headers: { "Content-Type": `multipart/related; boundary=${boundary}` },
270
+ body: body.buffer
271
+ });
272
+ }
273
+ async delete(path) {
274
+ const { parent, name } = this.splitPath(path);
275
+ const parentId = await this.resolveParent(parent);
276
+ const file = await this.findChild(parentId, name);
277
+ if (!file?.id) return;
278
+ await this.api(`files/${encodeURIComponent(file.id)}?supportsAllDrives=true`, { method: "DELETE" });
279
+ }
280
+ async exists(path) {
281
+ try {
282
+ await this.stat(path);
283
+ return true;
284
+ } catch (error) {
285
+ if (error instanceof Error && /not found|404/i.test(error.message)) return false;
286
+ throw error;
287
+ }
288
+ }
289
+ async list(path = "") {
290
+ const parentId = await this.resolveParent(path);
291
+ const files = await this.listFiles(parentId);
292
+ return files.flatMap((file) => file.name ? [{
293
+ path: path ? `${path.replace(/\/+$/, "")}/${file.name}` : file.name,
294
+ size: Number(file.size || 0),
295
+ modifiedAt: file.modifiedTime ? Date.parse(file.modifiedTime) : 0
296
+ }] : []);
297
+ }
298
+ async stat(path) {
299
+ const { parent, name } = this.splitPath(path);
300
+ const parentId = await this.resolveParent(parent);
301
+ const file = await this.findChild(parentId, name);
302
+ if (!file?.id) throw new Error(`Google Drive file not found: ${path}`);
303
+ return {
304
+ path,
305
+ size: Number(file.size || 0),
306
+ modifiedAt: file.modifiedTime ? Date.parse(file.modifiedTime) : 0
307
+ };
308
+ }
309
+ async mkdir(path) {
310
+ await this.resolveParent(path, true);
311
+ }
312
+ async testConnection() {
313
+ const started = Date.now();
314
+ try {
315
+ const identity = await this.getAccountIdentity();
316
+ return {
317
+ ok: true,
318
+ latencyMs: Date.now() - started,
319
+ details: { accountId: identity.accountId, email: identity.email, rootFolderId: this.options.rootFolderId || "root" }
320
+ };
321
+ } catch (error) {
322
+ return {
323
+ ok: false,
324
+ latencyMs: Date.now() - started,
325
+ error: error instanceof Error ? error.message : "Google Drive connection failed."
326
+ };
327
+ }
328
+ }
329
+ getConnectionMetadata() {
330
+ return {
331
+ provider: "google_drive",
332
+ ...this.options.rootFolderId ? { googleRootFolderId: this.options.rootFolderId } : {}
333
+ };
334
+ }
335
+ };
336
+ export {
337
+ GOOGLE_DRIVE_WORKSPACE_SCOPE,
338
+ GoogleDriveWorkspaceService
339
+ };
@@ -3,7 +3,7 @@
3
3
  * @description Primary Vault -> Secondary Clones Replication Engine for Skipo.
4
4
  * Conforms to Skipo Governance (< 200 lines).
5
5
  */
6
- import { SkipoBase } from '@ultrst-armada/kloks/functions';
6
+ import { SkipoBase } from '@ultrst-armada/kloks/functions/base';
7
7
  import { WorkspaceSecondaryClone } from './types.js';
8
8
  export interface CloneReplicationResult {
9
9
  cloneId: string;
@@ -1,8 +1,4 @@
1
+ /** Portable workspace contracts and replication primitives. */
1
2
  export * from './types.js';
2
- export * from './WorkspaceCanonical.js';
3
- export * from './WorkspaceFS.js';
4
- export * from './SyncEngine.js';
5
3
  export * from './WorkspaceCloneSyncEngine.js';
6
4
  export * from './WorkspaceService.js';
7
- export * from './RemoteWorkspaceService.js';
8
- export * from './WorkingWorkspaceService.js';
@@ -1,27 +1,7 @@
1
+ import "../chunk-RABSY2JU.js";
1
2
  import {
2
- RemoteWorkspaceService,
3
- SyncEngine,
4
- WorkingWorkspaceService,
5
- WorkspaceCloneSyncEngine,
6
- WorkspaceFS,
7
- remoteWorkspaceService,
8
- workingWorkspaceService
9
- } from "../chunk-BQLQTUDD.js";
10
- import {
11
- formatCanonicalWorkspaceFolderName,
12
- sanitizeWorkspaceName
13
- } from "../chunk-FZKBTF34.js";
14
- import "../chunk-JGUWYVOL.js";
15
- import "../chunk-JCMB7BIM.js";
16
- import "../chunk-GKXI5V23.js";
3
+ WorkspaceCloneSyncEngine
4
+ } from "../chunk-NY2SQOXI.js";
17
5
  export {
18
- RemoteWorkspaceService,
19
- SyncEngine,
20
- WorkingWorkspaceService,
21
- WorkspaceCloneSyncEngine,
22
- WorkspaceFS,
23
- formatCanonicalWorkspaceFolderName,
24
- remoteWorkspaceService,
25
- sanitizeWorkspaceName,
26
- workingWorkspaceService
6
+ WorkspaceCloneSyncEngine
27
7
  };
@@ -0,0 +1,8 @@
1
+ export * from './types.js';
2
+ export * from './WorkspaceCanonical.js';
3
+ export * from './WorkspaceFS.js';
4
+ export * from './SyncEngine.js';
5
+ export * from './WorkspaceCloneSyncEngine.js';
6
+ export * from './WorkspaceService.js';
7
+ export * from './RemoteWorkspaceService.js';
8
+ export * from './WorkingWorkspaceService.js';
@@ -0,0 +1,30 @@
1
+ import {
2
+ RemoteWorkspaceService,
3
+ SyncEngine,
4
+ WorkingWorkspaceService,
5
+ WorkspaceFS,
6
+ remoteWorkspaceService,
7
+ workingWorkspaceService
8
+ } from "../chunk-NGEB3CF5.js";
9
+ import {
10
+ WorkspaceCloneSyncEngine
11
+ } from "../chunk-NY2SQOXI.js";
12
+ import {
13
+ formatCanonicalWorkspaceFolderName,
14
+ sanitizeWorkspaceName
15
+ } from "../chunk-FZKBTF34.js";
16
+ import "../chunk-JGUWYVOL.js";
17
+ import "../chunk-G7PPVOFP.js";
18
+ import "../chunk-JCMB7BIM.js";
19
+ import "../chunk-5F5V7NAG.js";
20
+ export {
21
+ RemoteWorkspaceService,
22
+ SyncEngine,
23
+ WorkingWorkspaceService,
24
+ WorkspaceCloneSyncEngine,
25
+ WorkspaceFS,
26
+ formatCanonicalWorkspaceFolderName,
27
+ remoteWorkspaceService,
28
+ sanitizeWorkspaceName,
29
+ workingWorkspaceService
30
+ };
@@ -112,15 +112,40 @@
112
112
  "import": "./dist/krnl-ai-services.js",
113
113
  "types": "./dist/krnl-ai-services.d.ts",
114
114
  "default": "./dist/krnl-ai-services.js"
115
+ },
116
+ "./storage-workspace": {
117
+ "import": "./dist/storage-workspace.js",
118
+ "types": "./dist/storage-workspace.d.ts",
119
+ "default": "./dist/storage-workspace.js"
120
+ },
121
+ "./node": {
122
+ "import": "./dist/node.js",
123
+ "types": "./dist/node.d.ts",
124
+ "default": "./dist/node.js"
125
+ },
126
+ "./storage/node": {
127
+ "import": "./dist/storage/node.js",
128
+ "types": "./dist/storage/node.d.ts",
129
+ "default": "./dist/storage/node.js"
130
+ },
131
+ "./services/node": {
132
+ "import": "./dist/services/node.js",
133
+ "types": "./dist/services/node.d.ts",
134
+ "default": "./dist/services/node.js"
135
+ },
136
+ "./workspace/node": {
137
+ "import": "./dist/workspace/node.js",
138
+ "types": "./dist/workspace/node.d.ts",
139
+ "default": "./dist/workspace/node.js"
115
140
  }
116
141
  },
117
142
  "scripts": {
118
- "build": "tsup src/index.ts src/krnl-services.ts src/krnl-ai-services.ts src/services/index.ts src/auth/index.ts src/storage/index.ts src/workspace/index.ts src/control-plane/index.ts src/api/index.ts src/connectivity/index.ts src/client/index.ts src/srkl/index.ts src/development/index.ts src/development/webContainerService.ts src/development/webContainerRuntime.ts src/development/playwrightInspectionService.ts src/development/playwrightInspectionTypes.ts src/ai-provider/index.ts src/ai-inference/index.ts src/ai-models/index.ts src/ai-routing/index.ts src/ai-keys/index.ts src/ai-tools/index.ts --format esm --clean --external @kloks/functions --external @kloks/wasm-runtime --external react --external @kloks/state-graph --external @neondatabase/serverless --external @supabase/supabase-js --external @aws-sdk/client-s3 --external @aws-sdk/lib-storage --external zod --external ws --external @webcontainer/api --external playwright --external @dinilmusick/gutts && tsc --emitDeclarationOnly --declaration --project tsconfig.json && tsup src/development/client.ts --format esm --dts --out-dir dist/development --splitting false --platform browser --external @ultrst-armada/krnl",
143
+ "build": "tsup src/index.ts src/node.ts src/storage/node.ts src/services/node.ts src/workspace/node.ts src/krnl-services.ts src/krnl-ai-services.ts src/services/index.ts src/auth/index.ts src/storage/index.ts src/storage-workspace.ts src/workspace/index.ts src/control-plane/index.ts src/api/index.ts src/connectivity/index.ts src/client/index.ts src/srkl/index.ts src/development/index.ts src/development/webContainerService.ts src/development/webContainerRuntime.ts src/development/playwrightInspectionService.ts src/development/playwrightInspectionTypes.ts src/ai-provider/index.ts src/ai-inference/index.ts src/ai-models/index.ts src/ai-routing/index.ts src/ai-keys/index.ts src/ai-tools/index.ts --format esm --clean --external @kloks/wasm-runtime --external react --external @kloks/state-graph --external @neondatabase/serverless --external @supabase/supabase-js --external @aws-sdk/client-s3 --external @aws-sdk/lib-storage --external zod --external ws --external @webcontainer/api --external playwright --external @dinilmusick/gutts && tsc --emitDeclarationOnly --declaration --project tsconfig.json && tsup src/development/client.ts --format esm --dts --out-dir dist/development --splitting false --platform browser --external @ultrst-armada/krnl",
119
144
  "typecheck": "tsc --noEmit",
120
145
  "clean": "rm -rf dist"
121
146
  },
122
147
  "dependencies": {
123
- "@dinilmusick/gutts": "^1.6.0",
148
+ "@dinilmusick/gutts": "^2.0.2",
124
149
  "@kloks/functions": "workspace:*",
125
150
  "@kloks/state-graph": "workspace:*",
126
151
  "@webcontainer/api": "^1.6.4",
@@ -130,7 +155,10 @@
130
155
  "@neondatabase/serverless": "^0.10.0",
131
156
  "@supabase/supabase-js": "^2.45.0",
132
157
  "react": "^18.0.0 || ^19.0.0",
133
- "zod": "^3.22.0"
158
+ "zod": "^3.22.0",
159
+ "@ultrst-armada/krnl": "^1.0.9",
160
+ "@aws-sdk/client-s3": "^3.1164.0",
161
+ "googleapis": "^189.0.0"
134
162
  },
135
163
  "peerDependenciesMeta": {
136
164
  "@supabase/supabase-js": {
@@ -144,6 +172,15 @@
144
172
  },
145
173
  "react": {
146
174
  "optional": true
175
+ },
176
+ "@ultrst-armada/krnl": {
177
+ "optional": true
178
+ },
179
+ "@aws-sdk/client-s3": {
180
+ "optional": true
181
+ },
182
+ "googleapis": {
183
+ "optional": true
147
184
  }
148
185
  },
149
186
  "devDependencies": {
@@ -0,0 +1,64 @@
1
+ /** Standard result type for operations that can fail */
2
+ type Result<T, E = Error> = {
3
+ ok: true;
4
+ value: T;
5
+ } | {
6
+ ok: false;
7
+ error: E;
8
+ };
9
+ /** Standard logger interface */
10
+ interface Logger {
11
+ log(message: string, ...args: unknown[]): void;
12
+ warn(message: string, ...args: unknown[]): void;
13
+ error(message: string, ...args: unknown[]): void;
14
+ debug?(message: string, ...args: unknown[]): void;
15
+ }
16
+ /** Disposable resource interface */
17
+ interface Disposable {
18
+ dispose(): Promise<void>;
19
+ }
20
+ /** Generic provider interface */
21
+ interface Provider<_T = unknown> {
22
+ initialize(): Promise<void>;
23
+ dispose(): Promise<void>;
24
+ isInitialized(): boolean;
25
+ }
26
+ /** Configuration for any Skipo component */
27
+ interface SkipoConfig {
28
+ name: string;
29
+ logger?: Logger;
30
+ [key: string]: unknown;
31
+ }
32
+
33
+ /**
34
+ * SkipoBase — Abstract foundation class for all Skipo components.
35
+ * Provides lifecycle management, logging, and unique identification.
36
+ * All @skipo/* classes should extend this.
37
+ */
38
+ declare abstract class SkipoBase implements Disposable {
39
+ /** Unique instance identifier */
40
+ readonly instanceId: string;
41
+ /** Human-readable component name */
42
+ readonly name: string;
43
+ /** Logger instance */
44
+ protected readonly logger: Logger;
45
+ /** Whether this component has been initialized */
46
+ protected initialized: boolean;
47
+ /** Whether this component has been disposed */
48
+ protected disposed: boolean;
49
+ constructor(config?: SkipoConfig);
50
+ /** Initialize the component. Call before use. */
51
+ initialize(): Promise<void>;
52
+ /** Override to add custom initialization logic */
53
+ protected onInitialize(): Promise<void>;
54
+ /** Dispose the component and release resources */
55
+ dispose(): Promise<void>;
56
+ /** Override to add custom cleanup logic */
57
+ protected onDispose(): Promise<void>;
58
+ /** Guard: throws if not initialized */
59
+ protected ensureInitialized(): void;
60
+ /** Guard: throws if already disposed */
61
+ protected ensureNotDisposed(): void;
62
+ }
63
+
64
+ export { type Disposable as D, type Logger as L, type Provider as P, type Result as R, SkipoBase as S, type SkipoConfig as a };
@@ -0,0 +1 @@
1
+ export { S as SkipoBase } from './base-DDYO-DzM.js';
@@ -0,0 +1,6 @@
1
+ import {
2
+ SkipoBase
3
+ } from "./chunk-Z4LM5TOJ.js";
4
+ export {
5
+ SkipoBase
6
+ };