@ibgib/web-gib 0.0.1

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 (372) hide show
  1. package/.ibgibignore +30 -0
  2. package/.vscode/ibgib-snippets.code-snippets +309 -0
  3. package/.vscode/launch.json +25 -0
  4. package/.vscode/settings.json +68 -0
  5. package/.vscode/tasks.json +38 -0
  6. package/CHANGELOG.md +427 -0
  7. package/README.md +66 -0
  8. package/dist/agent-texts/common-agent-texts.d.mts +14 -0
  9. package/dist/agent-texts/common-agent-texts.d.mts.map +1 -0
  10. package/dist/agent-texts/common-agent-texts.mjs +51 -0
  11. package/dist/agent-texts/common-agent-texts.mjs.map +1 -0
  12. package/dist/agent-texts/primary-agent-texts.d.mts +16 -0
  13. package/dist/agent-texts/primary-agent-texts.d.mts.map +1 -0
  14. package/dist/agent-texts/primary-agent-texts.mjs +27 -0
  15. package/dist/agent-texts/primary-agent-texts.mjs.map +1 -0
  16. package/dist/agent-texts/project-agent-texts.d.mts +8 -0
  17. package/dist/agent-texts/project-agent-texts.d.mts.map +1 -0
  18. package/dist/agent-texts/project-agent-texts.mjs +29 -0
  19. package/dist/agent-texts/project-agent-texts.mjs.map +1 -0
  20. package/dist/agent-texts/project-child-text-agent-texts.d.mts +5 -0
  21. package/dist/agent-texts/project-child-text-agent-texts.d.mts.map +1 -0
  22. package/dist/agent-texts/project-child-text-agent-texts.mjs +26 -0
  23. package/dist/agent-texts/project-child-text-agent-texts.mjs.map +1 -0
  24. package/dist/agent-texts/projects-agent-texts.d.mts +4 -0
  25. package/dist/agent-texts/projects-agent-texts.d.mts.map +1 -0
  26. package/dist/agent-texts/projects-agent-texts.mjs +15 -0
  27. package/dist/agent-texts/projects-agent-texts.mjs.map +1 -0
  28. package/dist/agent-texts/raw-agent-texts.d.mts +4 -0
  29. package/dist/agent-texts/raw-agent-texts.d.mts.map +1 -0
  30. package/dist/agent-texts/raw-agent-texts.mjs +17 -0
  31. package/dist/agent-texts/raw-agent-texts.mjs.map +1 -0
  32. package/dist/agent-texts/text-editor-agent-texts.d.mts +6 -0
  33. package/dist/agent-texts/text-editor-agent-texts.d.mts.map +1 -0
  34. package/dist/agent-texts/text-editor-agent-texts.mjs +19 -0
  35. package/dist/agent-texts/text-editor-agent-texts.mjs.map +1 -0
  36. package/dist/api/api-constants.d.mts +9 -0
  37. package/dist/api/api-constants.d.mts.map +1 -0
  38. package/dist/api/api-constants.mjs +9 -0
  39. package/dist/api/api-constants.mjs.map +1 -0
  40. package/dist/api/api-index.d.mts +10 -0
  41. package/dist/api/api-index.d.mts.map +1 -0
  42. package/dist/api/api-index.mjs +121 -0
  43. package/dist/api/api-index.mjs.map +1 -0
  44. package/dist/api/api-types.d.mts +36 -0
  45. package/dist/api/api-types.d.mts.map +1 -0
  46. package/dist/api/api-types.mjs +2 -0
  47. package/dist/api/api-types.mjs.map +1 -0
  48. package/dist/api/commands/chat/chat-index.d.mts +3 -0
  49. package/dist/api/commands/chat/chat-index.d.mts.map +1 -0
  50. package/dist/api/commands/chat/chat-index.mjs +9 -0
  51. package/dist/api/commands/chat/chat-index.mjs.map +1 -0
  52. package/dist/api/commands/chat/get-context-info.d.mts +71 -0
  53. package/dist/api/commands/chat/get-context-info.d.mts.map +1 -0
  54. package/dist/api/commands/chat/get-context-info.mjs +130 -0
  55. package/dist/api/commands/chat/get-context-info.mjs.map +1 -0
  56. package/dist/api/commands/chat/hello-world.d.mts +63 -0
  57. package/dist/api/commands/chat/hello-world.d.mts.map +1 -0
  58. package/dist/api/commands/chat/hello-world.mjs +132 -0
  59. package/dist/api/commands/chat/hello-world.mjs.map +1 -0
  60. package/dist/api/commands/chat/tell-user.d.mts +57 -0
  61. package/dist/api/commands/chat/tell-user.d.mts.map +1 -0
  62. package/dist/api/commands/chat/tell-user.mjs +199 -0
  63. package/dist/api/commands/chat/tell-user.mjs.map +1 -0
  64. package/dist/api/commands/command-constants.d.mts +22 -0
  65. package/dist/api/commands/command-constants.d.mts.map +1 -0
  66. package/dist/api/commands/command-constants.mjs +17 -0
  67. package/dist/api/commands/command-constants.mjs.map +1 -0
  68. package/dist/api/commands/command-helpers.d.mts +47 -0
  69. package/dist/api/commands/command-helpers.d.mts.map +1 -0
  70. package/dist/api/commands/command-helpers.mjs +76 -0
  71. package/dist/api/commands/command-helpers.mjs.map +1 -0
  72. package/dist/api/commands/command-service-v1.d.mts +28 -0
  73. package/dist/api/commands/command-service-v1.d.mts.map +1 -0
  74. package/dist/api/commands/command-service-v1.mjs +122 -0
  75. package/dist/api/commands/command-service-v1.mjs.map +1 -0
  76. package/dist/api/commands/command-service.respec.d.mts +7 -0
  77. package/dist/api/commands/command-service.respec.d.mts.map +1 -0
  78. package/dist/api/commands/command-service.respec.mjs +66 -0
  79. package/dist/api/commands/command-service.respec.mjs.map +1 -0
  80. package/dist/api/commands/command-types.d.mts +48 -0
  81. package/dist/api/commands/command-types.d.mts.map +1 -0
  82. package/dist/api/commands/command-types.mjs +12 -0
  83. package/dist/api/commands/command-types.mjs.map +1 -0
  84. package/dist/api/commands/ibgib/get-ibgibs.d.mts +94 -0
  85. package/dist/api/commands/ibgib/get-ibgibs.d.mts.map +1 -0
  86. package/dist/api/commands/ibgib/get-ibgibs.mjs +219 -0
  87. package/dist/api/commands/ibgib/get-ibgibs.mjs.map +1 -0
  88. package/dist/api/commands/ibgib/ibgib-index.d.mts +3 -0
  89. package/dist/api/commands/ibgib/ibgib-index.d.mts.map +1 -0
  90. package/dist/api/commands/ibgib/ibgib-index.mjs +7 -0
  91. package/dist/api/commands/ibgib/ibgib-index.mjs.map +1 -0
  92. package/dist/api/commands/ibgib/mut8-ibgib.d.mts +135 -0
  93. package/dist/api/commands/ibgib/mut8-ibgib.d.mts.map +1 -0
  94. package/dist/api/commands/ibgib/mut8-ibgib.mjs +318 -0
  95. package/dist/api/commands/ibgib/mut8-ibgib.mjs.map +1 -0
  96. package/dist/api/commands/templates/api-function-info.template.d.mts +73 -0
  97. package/dist/api/commands/templates/api-function-info.template.d.mts.map +1 -0
  98. package/dist/api/commands/templates/api-function-info.template.mjs +161 -0
  99. package/dist/api/commands/templates/api-function-info.template.mjs.map +1 -0
  100. package/dist/api/commands/text/text-edit.d.mts +54 -0
  101. package/dist/api/commands/text/text-edit.d.mts.map +1 -0
  102. package/dist/api/commands/text/text-edit.mjs +170 -0
  103. package/dist/api/commands/text/text-edit.mjs.map +1 -0
  104. package/dist/api/commands/text/text-index.d.mts +3 -0
  105. package/dist/api/commands/text/text-index.d.mts.map +1 -0
  106. package/dist/api/commands/text/text-index.mjs +5 -0
  107. package/dist/api/commands/text/text-index.mjs.map +1 -0
  108. package/dist/api/commands/ui/ui-index.d.mts +3 -0
  109. package/dist/api/commands/ui/ui-index.d.mts.map +1 -0
  110. package/dist/api/commands/ui/ui-index.mjs +5 -0
  111. package/dist/api/commands/ui/ui-index.mjs.map +1 -0
  112. package/dist/api/commands/ui/update-css-variables.d.mts +48 -0
  113. package/dist/api/commands/ui/update-css-variables.d.mts.map +1 -0
  114. package/dist/api/commands/ui/update-css-variables.mjs +145 -0
  115. package/dist/api/commands/ui/update-css-variables.mjs.map +1 -0
  116. package/dist/api/function-infos.web.d.mts +15 -0
  117. package/dist/api/function-infos.web.d.mts.map +1 -0
  118. package/dist/api/function-infos.web.mjs +63 -0
  119. package/dist/api/function-infos.web.mjs.map +1 -0
  120. package/dist/assumptions.respec.d.mts +2 -0
  121. package/dist/assumptions.respec.d.mts.map +1 -0
  122. package/dist/assumptions.respec.mjs +41 -0
  123. package/dist/assumptions.respec.mjs.map +1 -0
  124. package/dist/common/project/project-constants.d.mts +38 -0
  125. package/dist/common/project/project-constants.d.mts.map +1 -0
  126. package/dist/common/project/project-constants.mjs +71 -0
  127. package/dist/common/project/project-constants.mjs.map +1 -0
  128. package/dist/common/project/project-helper.d.mts +127 -0
  129. package/dist/common/project/project-helper.d.mts.map +1 -0
  130. package/dist/common/project/project-helper.mjs +683 -0
  131. package/dist/common/project/project-helper.mjs.map +1 -0
  132. package/dist/common/project/project-types.d.mts +91 -0
  133. package/dist/common/project/project-types.d.mts.map +1 -0
  134. package/dist/common/project/project-types.mjs +31 -0
  135. package/dist/common/project/project-types.mjs.map +1 -0
  136. package/dist/common/prompt-functions.web.d.mts +90 -0
  137. package/dist/common/prompt-functions.web.d.mts.map +1 -0
  138. package/dist/common/prompt-functions.web.mjs +426 -0
  139. package/dist/common/prompt-functions.web.mjs.map +1 -0
  140. package/dist/common/settings/settings-constants.d.mts +33 -0
  141. package/dist/common/settings/settings-constants.d.mts.map +1 -0
  142. package/dist/common/settings/settings-constants.mjs +54 -0
  143. package/dist/common/settings/settings-constants.mjs.map +1 -0
  144. package/dist/common/settings/settings-helpers.d.mts +59 -0
  145. package/dist/common/settings/settings-helpers.d.mts.map +1 -0
  146. package/dist/common/settings/settings-helpers.mjs +253 -0
  147. package/dist/common/settings/settings-helpers.mjs.map +1 -0
  148. package/dist/common/settings/settings-types.d.mts +118 -0
  149. package/dist/common/settings/settings-types.d.mts.map +1 -0
  150. package/dist/common/settings/settings-types.mjs +13 -0
  151. package/dist/common/settings/settings-types.mjs.map +1 -0
  152. package/dist/constants.d.mts +34 -0
  153. package/dist/constants.d.mts.map +1 -0
  154. package/dist/constants.mjs +35 -0
  155. package/dist/constants.mjs.map +1 -0
  156. package/dist/foo.d.mts +2 -0
  157. package/dist/foo.d.mts.map +1 -0
  158. package/dist/foo.mjs +19 -0
  159. package/dist/foo.mjs.map +1 -0
  160. package/dist/helpers.d.mts +137 -0
  161. package/dist/helpers.d.mts.map +1 -0
  162. package/dist/helpers.mjs +514 -0
  163. package/dist/helpers.mjs.map +1 -0
  164. package/dist/helpers.web.d.mts +324 -0
  165. package/dist/helpers.web.d.mts.map +1 -0
  166. package/dist/helpers.web.mjs +1133 -0
  167. package/dist/helpers.web.mjs.map +1 -0
  168. package/dist/helpers.web.respec.d.mts +2 -0
  169. package/dist/helpers.web.respec.d.mts.map +1 -0
  170. package/dist/helpers.web.respec.mjs +12 -0
  171. package/dist/helpers.web.respec.mjs.map +1 -0
  172. package/dist/index.d.mts +2 -0
  173. package/dist/index.d.mts.map +1 -0
  174. package/dist/index.mjs +3 -0
  175. package/dist/index.mjs.map +1 -0
  176. package/dist/respec-gib.node.d.mts +2 -0
  177. package/dist/respec-gib.node.d.mts.map +1 -0
  178. package/dist/respec-gib.node.mjs +211 -0
  179. package/dist/respec-gib.node.mjs.map +1 -0
  180. package/dist/spec-helper.node.respec.d.mts +13 -0
  181. package/dist/spec-helper.node.respec.d.mts.map +1 -0
  182. package/dist/spec-helper.node.respec.mjs +50 -0
  183. package/dist/spec-helper.node.respec.mjs.map +1 -0
  184. package/dist/storage/storage-helpers.web.d.mts +108 -0
  185. package/dist/storage/storage-helpers.web.d.mts.map +1 -0
  186. package/dist/storage/storage-helpers.web.mjs +757 -0
  187. package/dist/storage/storage-helpers.web.mjs.map +1 -0
  188. package/dist/storage/storage-types.web.d.mts +30 -0
  189. package/dist/storage/storage-types.web.d.mts.map +1 -0
  190. package/dist/storage/storage-types.web.mjs +2 -0
  191. package/dist/storage/storage-types.web.mjs.map +1 -0
  192. package/dist/types.web.d.mts +42 -0
  193. package/dist/types.web.d.mts.map +1 -0
  194. package/dist/types.web.mjs +2 -0
  195. package/dist/types.web.mjs.map +1 -0
  196. package/dist/ui/component/component-types.d.mts +225 -0
  197. package/dist/ui/component/component-types.d.mts.map +1 -0
  198. package/dist/ui/component/component-types.mjs +2 -0
  199. package/dist/ui/component/component-types.mjs.map +1 -0
  200. package/dist/ui/component/ibgib-component-service.d.mts +70 -0
  201. package/dist/ui/component/ibgib-component-service.d.mts.map +1 -0
  202. package/dist/ui/component/ibgib-component-service.mjs +201 -0
  203. package/dist/ui/component/ibgib-component-service.mjs.map +1 -0
  204. package/dist/ui/component/ibgib-dynamic-component-bases.d.mts +338 -0
  205. package/dist/ui/component/ibgib-dynamic-component-bases.d.mts.map +1 -0
  206. package/dist/ui/component/ibgib-dynamic-component-bases.mjs +1304 -0
  207. package/dist/ui/component/ibgib-dynamic-component-bases.mjs.map +1 -0
  208. package/dist/ui/ui-constants.d.mts +12 -0
  209. package/dist/ui/ui-constants.d.mts.map +1 -0
  210. package/dist/ui/ui-constants.mjs +93 -0
  211. package/dist/ui/ui-constants.mjs.map +1 -0
  212. package/dist/ui/ui-helpers.d.mts +42 -0
  213. package/dist/ui/ui-helpers.d.mts.map +1 -0
  214. package/dist/ui/ui-helpers.mjs +198 -0
  215. package/dist/ui/ui-helpers.mjs.map +1 -0
  216. package/dist/ui/ui-types.d.mts +13 -0
  217. package/dist/ui/ui-types.d.mts.map +1 -0
  218. package/dist/ui/ui-types.mjs +2 -0
  219. package/dist/ui/ui-types.mjs.map +1 -0
  220. package/dist/witness/agent/agent-constants.d.mts +97 -0
  221. package/dist/witness/agent/agent-constants.d.mts.map +1 -0
  222. package/dist/witness/agent/agent-constants.mjs +98 -0
  223. package/dist/witness/agent/agent-constants.mjs.map +1 -0
  224. package/dist/witness/agent/agent-helpers.d.mts +106 -0
  225. package/dist/witness/agent/agent-helpers.d.mts.map +1 -0
  226. package/dist/witness/agent/agent-helpers.mjs +601 -0
  227. package/dist/witness/agent/agent-helpers.mjs.map +1 -0
  228. package/dist/witness/agent/agent-one-file.app.d.mts +2 -0
  229. package/dist/witness/agent/agent-one-file.app.d.mts.map +1 -0
  230. package/dist/witness/agent/agent-one-file.app.mjs +8 -0
  231. package/dist/witness/agent/agent-one-file.app.mjs.map +1 -0
  232. package/dist/witness/agent/agent-one-file.d.mts +478 -0
  233. package/dist/witness/agent/agent-one-file.d.mts.map +1 -0
  234. package/dist/witness/agent/agent-one-file.mjs +1462 -0
  235. package/dist/witness/agent/agent-one-file.mjs.map +1 -0
  236. package/dist/witness/agent/agent-types.d.mts +83 -0
  237. package/dist/witness/agent/agent-types.d.mts.map +1 -0
  238. package/dist/witness/agent/agent-types.mjs +2 -0
  239. package/dist/witness/agent/agent-types.mjs.map +1 -0
  240. package/dist/witness/agent/agents-service-v1.d.mts +99 -0
  241. package/dist/witness/agent/agents-service-v1.d.mts.map +1 -0
  242. package/dist/witness/agent/agents-service-v1.mjs +453 -0
  243. package/dist/witness/agent/agents-service-v1.mjs.map +1 -0
  244. package/dist/witness/agent/function-info/function-info-one-file.d.mts +192 -0
  245. package/dist/witness/agent/function-info/function-info-one-file.d.mts.map +1 -0
  246. package/dist/witness/agent/function-info/function-info-one-file.mjs +192 -0
  247. package/dist/witness/agent/function-info/function-info-one-file.mjs.map +1 -0
  248. package/dist/witness/agent/gemini/agent-witness-gemini-v1.d.mts +51 -0
  249. package/dist/witness/agent/gemini/agent-witness-gemini-v1.d.mts.map +1 -0
  250. package/dist/witness/agent/gemini/agent-witness-gemini-v1.mjs +928 -0
  251. package/dist/witness/agent/gemini/agent-witness-gemini-v1.mjs.map +1 -0
  252. package/dist/witness/agent/gemini/gemini-agent-factory.d.mts +27 -0
  253. package/dist/witness/agent/gemini/gemini-agent-factory.d.mts.map +1 -0
  254. package/dist/witness/agent/gemini/gemini-agent-factory.mjs +144 -0
  255. package/dist/witness/agent/gemini/gemini-agent-factory.mjs.map +1 -0
  256. package/dist/witness/agent/gemini/gemini-constants.d.mts +36 -0
  257. package/dist/witness/agent/gemini/gemini-constants.d.mts.map +1 -0
  258. package/dist/witness/agent/gemini/gemini-constants.mjs +47 -0
  259. package/dist/witness/agent/gemini/gemini-constants.mjs.map +1 -0
  260. package/dist/witness/agent/gemini/gemini-helpers.d.mts +58 -0
  261. package/dist/witness/agent/gemini/gemini-helpers.d.mts.map +1 -0
  262. package/dist/witness/agent/gemini/gemini-helpers.mjs +210 -0
  263. package/dist/witness/agent/gemini/gemini-helpers.mjs.map +1 -0
  264. package/dist/witness/agent/gemini/gemini-types.d.mts +82 -0
  265. package/dist/witness/agent/gemini/gemini-types.d.mts.map +1 -0
  266. package/dist/witness/agent/gemini/gemini-types.mjs +3 -0
  267. package/dist/witness/agent/gemini/gemini-types.mjs.map +1 -0
  268. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.d.mts +136 -0
  269. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.d.mts.map +1 -0
  270. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs +334 -0
  271. package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs.map +1 -0
  272. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.d.mts +35 -0
  273. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.d.mts.map +1 -0
  274. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mjs +267 -0
  275. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mjs.map +1 -0
  276. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.d.mts +134 -0
  277. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.d.mts.map +1 -0
  278. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mjs +389 -0
  279. package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mjs.map +1 -0
  280. package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.d.mts +2 -0
  281. package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.d.mts.map +1 -0
  282. package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.mjs +2 -0
  283. package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.mjs.map +1 -0
  284. package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.d.mts +104 -0
  285. package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.d.mts.map +1 -0
  286. package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.mjs +457 -0
  287. package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.mjs.map +1 -0
  288. package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.d.mts +93 -0
  289. package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.d.mts.map +1 -0
  290. package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.mjs +98 -0
  291. package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.mjs.map +1 -0
  292. package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.d.mts +73 -0
  293. package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.d.mts.map +1 -0
  294. package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.mjs +650 -0
  295. package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.mjs.map +1 -0
  296. package/generate-version-file.js +29 -0
  297. package/package.json +60 -0
  298. package/src/agent-texts/common-agent-texts.mts +61 -0
  299. package/src/agent-texts/primary-agent-texts.mts +32 -0
  300. package/src/agent-texts/project-agent-texts.mts +29 -0
  301. package/src/agent-texts/project-child-text-agent-texts.mts +30 -0
  302. package/src/agent-texts/projects-agent-texts.mts +17 -0
  303. package/src/agent-texts/raw-agent-texts.mts +18 -0
  304. package/src/agent-texts/text-editor-agent-texts.mts +20 -0
  305. package/src/api/api-constants.mts +8 -0
  306. package/src/api/api-index.mts +110 -0
  307. package/src/api/api-types.mts +36 -0
  308. package/src/api/commands/chat/chat-index.mts +10 -0
  309. package/src/api/commands/chat/get-context-info.mts +196 -0
  310. package/src/api/commands/chat/hello-world.mts +183 -0
  311. package/src/api/commands/chat/tell-user.mts +241 -0
  312. package/src/api/commands/command-constants.mts +17 -0
  313. package/src/api/commands/command-helpers.mts +105 -0
  314. package/src/api/commands/command-service-v1.mts +136 -0
  315. package/src/api/commands/command-service.respec.mts +72 -0
  316. package/src/api/commands/command-types.mts +71 -0
  317. package/src/api/commands/ibgib/get-ibgibs.mts +269 -0
  318. package/src/api/commands/ibgib/ibgib-index.mts +8 -0
  319. package/src/api/commands/ibgib/mut8-ibgib.mts +418 -0
  320. package/src/api/commands/templates/api-function-info.template.mts +212 -0
  321. package/src/api/commands/text/text-edit.mts +217 -0
  322. package/src/api/commands/text/text-index.mts +6 -0
  323. package/src/api/commands/ui/ui-index.mts +6 -0
  324. package/src/api/commands/ui/update-css-variables.mts +187 -0
  325. package/src/api/function-infos.web.mts +66 -0
  326. package/src/assets/fullscreen-dialog.html +18 -0
  327. package/src/assumptions.respec.mts +51 -0
  328. package/src/common/project/project-constants.mts +83 -0
  329. package/src/common/project/project-helper.mts +730 -0
  330. package/src/common/project/project-types.mts +121 -0
  331. package/src/common/prompt-functions.web.mts +447 -0
  332. package/src/common/settings/settings-constants.mts +72 -0
  333. package/src/common/settings/settings-helpers.mts +280 -0
  334. package/src/common/settings/settings-types.mts +137 -0
  335. package/src/constants.mts +39 -0
  336. package/src/foo.mts +13 -0
  337. package/src/helpers.mts +574 -0
  338. package/src/helpers.web.mts +1277 -0
  339. package/src/helpers.web.respec.mts +16 -0
  340. package/src/index.mts +3 -0
  341. package/src/respec-gib.node.mts +199 -0
  342. package/src/spec-helper.node.respec.mts +50 -0
  343. package/src/storage/storage-helpers.web.mts +728 -0
  344. package/src/storage/storage-types.web.mts +29 -0
  345. package/src/types.web.mts +42 -0
  346. package/src/ui/component/component-types.mts +241 -0
  347. package/src/ui/component/ibgib-component-service.mts +201 -0
  348. package/src/ui/component/ibgib-dynamic-component-bases.mts +1369 -0
  349. package/src/ui/ui-constants.mts +101 -0
  350. package/src/ui/ui-helpers.mts +222 -0
  351. package/src/ui/ui-types.mts +11 -0
  352. package/src/witness/agent/agent-constants.mts +122 -0
  353. package/src/witness/agent/agent-helpers.mts +681 -0
  354. package/src/witness/agent/agent-one-file.app.mts +8 -0
  355. package/src/witness/agent/agent-one-file.mts +1665 -0
  356. package/src/witness/agent/agent-types.mts +92 -0
  357. package/src/witness/agent/agents-service-v1.mts +482 -0
  358. package/src/witness/agent/function-info/function-info-one-file.mts +362 -0
  359. package/src/witness/agent/gemini/agent-witness-gemini-v1.mts +910 -0
  360. package/src/witness/agent/gemini/gemini-agent-factory.mts +135 -0
  361. package/src/witness/agent/gemini/gemini-constants.mts +79 -0
  362. package/src/witness/agent/gemini/gemini-helpers.mts +216 -0
  363. package/src/witness/agent/gemini/gemini-types.mts +88 -0
  364. package/src/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mts +321 -0
  365. package/src/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mts +290 -0
  366. package/src/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mts +407 -0
  367. package/src/witness/space/web-filesystem-space/web-filesystem-space-constants.mts +1 -0
  368. package/src/witness/space/web-filesystem-space/web-filesystem-space-helper.mts +491 -0
  369. package/src/witness/space/web-filesystem-space/web-filesystem-space-types.mts +172 -0
  370. package/src/witness/space/web-filesystem-space/web-filesystem-space-v1.mts +670 -0
  371. package/tsconfig.json +17 -0
  372. package/tsconfig.test.json +10 -0
@@ -0,0 +1,82 @@
1
+ import { Content } from "@google/generative-ai";
2
+ import type { FunctionCallingMode } from "@google/generative-ai";
3
+ import { PromptInfo } from "../agent-one-file.mjs";
4
+ import { TextSource } from "../agent-constants.mjs";
5
+ export interface PromptInfoEntryGemini {
6
+ /**
7
+ * The source of the text, in terms of our code definition.
8
+ *
9
+ * I say this because the Gemini API only considers "user" and "model" but
10
+ * we keep more information (and more accurate information) than this.
11
+ *
12
+ * For example, the Gemini API expects function responses to be role "user".
13
+ * But we would store this src as {@link TextSource.FUNCTION}
14
+ */
15
+ src: TextSource;
16
+ /**
17
+ * the shape of the entry that the Gemini API would expect
18
+ */
19
+ content: Content;
20
+ }
21
+ /**
22
+ * Information required specifically for the Gemini API.
23
+ */
24
+ export interface PromptInfoGemini extends PromptInfo {
25
+ /**
26
+ * The system instructions' parts that we'll concatenate into system prompt.
27
+ */
28
+ systemPromptEntries: PromptInfoEntryGemini[];
29
+ /**
30
+ * The history of the chat, i.e., the contents of the chat sans the most
31
+ * recent.
32
+ *
33
+ * NOTE: We will be using this for the gemini api's "chat" function.
34
+ *
35
+ * @see {@link StartChatParams.history}
36
+ */
37
+ chatPromptHistoryParts: PromptInfoEntryGemini[];
38
+ /**
39
+ * The most recent chat message
40
+ *
41
+ * @see {@link ChatSession.sendMessage}
42
+ */
43
+ chatPromptCurrent: PromptInfoEntryGemini;
44
+ /**
45
+ * if truthy, this will override the default function calling mode when
46
+ * prompting the LLM.
47
+ *
48
+ * if falsy, will use the default (FunctionCallingMode.ANY)
49
+ *
50
+ * @see {@link FunctionCallingMode}
51
+ *
52
+ * ## notes
53
+ *
54
+ * I'm adding this for custom prompt. right now, it works better when
55
+ * forcing the model to call a function, but I am now wanting the use case
56
+ * to just ask the model a "normal" chat llm question (for translating some
57
+ * text).
58
+ */
59
+ overrideFunctionCallingMode?: FunctionCallingMode;
60
+ }
61
+ /**
62
+ * Gemini returns either function calls or raw text atow (01/2025)
63
+ */
64
+ export type PromptAPIResult_Gemini = {
65
+ /**
66
+ * raw strings of function calls requested returned by the underlying
67
+ * API's model (right now Gemini)
68
+ */
69
+ functionCalls: string[];
70
+ } | {
71
+ text: string;
72
+ };
73
+ /**
74
+ * This is a "kluge" IMO because it wraps the response part to be able to handle
75
+ * all responses of functions. This is a limitation of the Gemini API which requires an
76
+ * object as the response part's value. So if a function returns "undefined" or an array,
77
+ * it throws an error. So this is a wrapper.
78
+ */
79
+ export interface FunctionResponsePart_ResponseWrapper {
80
+ value: any | undefined;
81
+ }
82
+ //# sourceMappingURL=gemini-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-types.d.mts","sourceRoot":"","sources":["../../../../src/witness/agent/gemini/gemini-types.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAG,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAgC,mBAAmB,EAAG,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAG,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IAClC;;;;;;;;OAQG;IACH,GAAG,EAAE,UAAU,CAAC;IAKhB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CACpB;AACD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD;;OAEG;IACH,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C;;;;;;;OAOG;IACH,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD;;;;MAIE;IACF,iBAAiB,EAAE,qBAAqB,CAAC;IACzC;;;;;;;;;;;;;;OAcG;IACH,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC5B;IACE;;;OAGG;IACH,aAAa,EAAE,MAAM,EAAE,CAAA;CAC1B,GACC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,WAAW,oCAAoC;IACjD,KAAK,EAAE,GAAG,GAAG,SAAS,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ ;
2
+ export {};
3
+ //# sourceMappingURL=gemini-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-types.mjs","sourceRoot":"","sources":["../../../../src/witness/agent/gemini/gemini-types.mts"],"names":[],"mappings":"AAwBC,CAAC"}
@@ -0,0 +1,136 @@
1
+ import { Ib, IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
2
+ import { IbGib_V1, IbGibRel8ns_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
3
+ import { WitnessWithContextBase_V1 } from "@ibgib/core-gib/dist/witness/witness-with-context/witness-with-context-base-v1.mjs";
4
+ import { IbGibTimelineUpdateInfo } from "@ibgib/core-gib/dist/common/other/other-types.mjs";
5
+ import { ObservableWitness } from "@ibgib/core-gib/dist/common/pubsub/observable/observable-types.mjs";
6
+ import { SubjectWitness } from "@ibgib/core-gib/dist/common/pubsub/subject/subject-types.mjs";
7
+ import { WitnessWithContextData_V1, WitnessWithContextRel8ns_V1 } from "@ibgib/core-gib/dist/witness/witness-with-context/witness-with-context-types.mjs";
8
+ import { IbGibSpaceAny } from "@ibgib/core-gib/dist/witness/space/space-base-v1.mjs";
9
+ import { SpaceId } from "@ibgib/core-gib/dist/witness/space/space-types.mjs";
10
+ /**
11
+ * Helper ibgib witness for backing ibgib component instances.
12
+ *
13
+ * This witness's job is not intrinsically do much of anything, rather, its
14
+ * focus is to keep up-to-date with changes to a context.
15
+ *
16
+ * So this particular witness does not need to care about its own state (its gib
17
+ * is actually just primitive "gib"). So no calls to loadNewerSelfIfAvailable
18
+ * should be necessary.
19
+ *
20
+ * ## how to use
21
+ *
22
+ * ATOW (04/2025) the idea is to have an ibgib component that you want to keep
23
+ * up-to-date. So you include a backing model proxy ibgib and subscribe to its
24
+ * events, e.g., {@link LiveProxyIbGib.contextUpdated$}, and then the component
25
+ * will update its visual elements.
26
+ *
27
+ * ## notes on driving intent of this class
28
+ *
29
+ * There is quite a bit of plumbing involved with updating ibgibs
30
+ * when updates are published to the metaspace. This involves subscribing
31
+ * to the ibgib timeline's latestObs observable on the metaspace, checking if
32
+ * there are actual new updates, as well as other things.
33
+ *
34
+ * Our components, however, since they are web components must descend from
35
+ * HTMLElement, so we can't descend from WitnessWithContextBase_V1 directly.
36
+ *
37
+ * So my hope is that this will be performant enough, and maintainable enough,
38
+ * to have this backing model for ibgib components.
39
+ *
40
+ */
41
+ export declare class LiveProxyIbGib<TIbGib extends IbGib_V1 = IbGib_V1> extends WitnessWithContextBase_V1 {
42
+ protected lc: string;
43
+ ib: string;
44
+ gib: string | undefined;
45
+ data: import("@ibgib/ts-gib/dist/V1/types.mjs").IbGibData_V1 | undefined;
46
+ rel8ns: IbGibRel8ns_V1 | undefined;
47
+ protected loadNewerSelfIfAvailable(): Promise<void>;
48
+ loadIbGibDto(dto: IbGib_V1<WitnessWithContextData_V1, WitnessWithContextRel8ns_V1>): Promise<void>;
49
+ /**
50
+ * not a "true" witness as I'm thinking right now so I'm not validating this
51
+ * proxy class. I am keeping the validateArg function though, as that seems
52
+ * good to me.
53
+ */
54
+ protected validateThis(): Promise<string[]>;
55
+ get ibGib(): TIbGib | undefined;
56
+ /**
57
+ * determines the local space in which this proxy ibgib resides.
58
+ *
59
+ * set this via passing in a space ibgib for the proxy to witness.
60
+ */
61
+ spaceId: SpaceId | undefined;
62
+ constructor(initialData?: any, initialRel8ns?: IbGibRel8ns_V1);
63
+ protected initialize(): Promise<void>;
64
+ protected parseAddlMetadataString({ ib }: {
65
+ ib: Ib;
66
+ }): any;
67
+ /**
68
+ * @internal
69
+ *
70
+ * The first context ibgib frame that this proxy is initialized with,
71
+ * namely, before any updates happen that produce newer ibgibs in the
72
+ * timelines. Those will update the {@link _currentWorkingContextIbGib}.
73
+ */
74
+ protected _initialContext: TIbGib | undefined;
75
+ /**
76
+ * implementation for witnessing. Basically, the first ibgib this proxy
77
+ * witnesses is its context, i.e., its ibgib.
78
+ *
79
+ * ## notes
80
+ *
81
+ * ### on "Context" with this Proxy
82
+ *
83
+ * "Context" is kinda funny in this way, but it's how I'm reusing existing
84
+ * plumbing for updating contexts.
85
+ *
86
+ * Said another way, usually a "context" is peripheral/ambient compared to
87
+ * the primary behavior of a witness with context. But in this use case as a
88
+ * proxy ibgib, "context" is just the actual ibgib.
89
+ */
90
+ protected witnessImpl(arg: IbGib_V1<any, IbGibRel8ns_V1>): Promise<IbGib_V1<any, IbGibRel8ns_V1> | undefined>;
91
+ _contextUpdated$: SubjectWitness<TIbGib> | undefined;
92
+ /**
93
+ * similar to {@link newContextChild$}, but this is triggered when a NEW
94
+ * context ibgib is published via the metaspace (not its children).
95
+ *
96
+ * I believe this happens before the {@link newContextChild$} but don't
97
+ * quote me.
98
+ *
99
+ * ## notes
100
+ *
101
+ * * sometimes an ibgib is published on the timeline by the metaspace but it
102
+ * is not actually new. So this swallows those old updates to essentially
103
+ * be idempotent
104
+ *
105
+ * @see {@link _contextUpdated$}
106
+ * @see {@link newContextChild$}
107
+ */
108
+ contextUpdated$: ObservableWitness<TIbGib> | undefined;
109
+ /**
110
+ *
111
+ */
112
+ _newContextChild$: SubjectWitness<IbGib_V1> | undefined;
113
+ /**
114
+ * similar to {@link contextUpdated$}, but this happens when new _children_
115
+ * are added to the context ibgib, not just when the context ibgib itself is
116
+ * changed.
117
+ *
118
+ * This wraps {@link WitnessWithContextBase_V1.handleNewContextChild}
119
+ *
120
+ * @see {@link _newContextChild$}
121
+ * @see {@link contextUpdated$}
122
+ */
123
+ newContextChild$: ObservableWitness<IbGib_V1> | undefined;
124
+ protected handleContextUpdate({ update }: {
125
+ update: IbGibTimelineUpdateInfo;
126
+ }): Promise<void>;
127
+ setWrappedIbGib({ ibGib, ibGibAddr, space, }: {
128
+ ibGib?: IbGib_V1;
129
+ ibGibAddr?: IbGibAddr;
130
+ space?: IbGibSpaceAny;
131
+ }): Promise<void>;
132
+ protected handleNewContextChild({ newChild }: {
133
+ newChild: IbGib_V1;
134
+ }): Promise<void>;
135
+ }
136
+ //# sourceMappingURL=live-proxy-ibgib-one-file.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-proxy-ibgib-one-file.d.mts","sourceRoot":"","sources":["../../../src/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oFAAoF,CAAC;AAC/H,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAG,MAAM,oEAAoE,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAG9F,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,kFAAkF,CAAC;AAC1J,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAGrF,OAAO,EAAE,OAAO,EAAE,MAAM,oDAAoD,CAAC;AAK7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,cAAc,CAAC,MAAM,SAAS,Q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CAAC,GAAG,SAAS,CAAC;cAE1C,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,uBAAuB,CAAC;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB9F,eAAe,CAAC,EAClB,KAAK,EACL,SAAS,EACT,KAAK,GACR,EAAE;QACC,KAAK,CAAC,EAAE,QAAQ,CAAC;QACjB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,aAAa,CAAC;KACzB,GAAG,OAAO,CAAC,IAAI,CAAC;cA+CQ,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAevG"}
@@ -0,0 +1,334 @@
1
+ import { extractErrorMsg } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
2
+ import { GIB, IB, ROOT } from "@ibgib/ts-gib/dist/V1/constants.mjs";
3
+ import { WitnessWithContextBase_V1 } from "@ibgib/core-gib/dist/witness/witness-with-context/witness-with-context-base-v1.mjs";
4
+ import { newupSubject } from "@ibgib/core-gib/dist/common/pubsub/subject/subject-helper.mjs";
5
+ import { GLOBAL_LOG_A_LOT } from "../../constants.mjs";
6
+ import { getGlobalMetaspace_waitIfNeeded } from "../../helpers.web.mjs";
7
+ import { isSpaceIb } from "@ibgib/core-gib/dist/witness/space/space-helper.mjs";
8
+ import { Factory_V1 } from "@ibgib/ts-gib/dist/V1/factory.mjs";
9
+ const logalot = GLOBAL_LOG_A_LOT;
10
+ /**
11
+ * Helper ibgib witness for backing ibgib component instances.
12
+ *
13
+ * This witness's job is not intrinsically do much of anything, rather, its
14
+ * focus is to keep up-to-date with changes to a context.
15
+ *
16
+ * So this particular witness does not need to care about its own state (its gib
17
+ * is actually just primitive "gib"). So no calls to loadNewerSelfIfAvailable
18
+ * should be necessary.
19
+ *
20
+ * ## how to use
21
+ *
22
+ * ATOW (04/2025) the idea is to have an ibgib component that you want to keep
23
+ * up-to-date. So you include a backing model proxy ibgib and subscribe to its
24
+ * events, e.g., {@link LiveProxyIbGib.contextUpdated$}, and then the component
25
+ * will update its visual elements.
26
+ *
27
+ * ## notes on driving intent of this class
28
+ *
29
+ * There is quite a bit of plumbing involved with updating ibgibs
30
+ * when updates are published to the metaspace. This involves subscribing
31
+ * to the ibgib timeline's latestObs observable on the metaspace, checking if
32
+ * there are actual new updates, as well as other things.
33
+ *
34
+ * Our components, however, since they are web components must descend from
35
+ * HTMLElement, so we can't descend from WitnessWithContextBase_V1 directly.
36
+ *
37
+ * So my hope is that this will be performant enough, and maintainable enough,
38
+ * to have this backing model for ibgib components.
39
+ *
40
+ */
41
+ export class LiveProxyIbGib extends WitnessWithContextBase_V1 {
42
+ lc = ``;
43
+ ib = this._currentWorkingContextIbGib ? this._currentWorkingContextIbGib.ib : IB;
44
+ gib = this._currentWorkingContextIbGib ? this._currentWorkingContextIbGib.gib : GIB;
45
+ data = this._currentWorkingContextIbGib ? this._currentWorkingContextIbGib.data : undefined;
46
+ rel8ns = this._currentWorkingContextIbGib ? this._currentWorkingContextIbGib.rel8ns : undefined;
47
+ async loadNewerSelfIfAvailable() {
48
+ const lc = `${this.lc}[${this.loadNewerSelfIfAvailable.name}]`;
49
+ try {
50
+ if (logalot) {
51
+ console.log(`${lc} starting... (I: genuuid)`);
52
+ }
53
+ // doesn't look like this gets hit right now
54
+ console.warn(`${lc} does nothing in this class. I just have this warning here because I want to see if this gets executed. (W: genuuid)`);
55
+ }
56
+ catch (error) {
57
+ console.error(`${lc} ${extractErrorMsg(error)}`);
58
+ throw error;
59
+ }
60
+ finally {
61
+ if (logalot) {
62
+ console.log(`${lc} complete.`);
63
+ }
64
+ }
65
+ }
66
+ async loadIbGibDto(dto) {
67
+ const lc = `${this.lc}[${this.loadIbGibDto.name}]`;
68
+ try {
69
+ if (logalot) {
70
+ console.log(`${lc} starting... (I: genuuid)`);
71
+ }
72
+ debugger; // does live proxy ibgib hit here?
73
+ console.warn(`${lc} does nothing in this class. I just have this warning here because I want to see if this gets executed. (W: genuuid)`);
74
+ }
75
+ catch (error) {
76
+ console.error(`${lc} ${extractErrorMsg(error)}`);
77
+ throw error;
78
+ }
79
+ finally {
80
+ if (logalot) {
81
+ console.log(`${lc} complete.`);
82
+ }
83
+ }
84
+ }
85
+ /**
86
+ * not a "true" witness as I'm thinking right now so I'm not validating this
87
+ * proxy class. I am keeping the validateArg function though, as that seems
88
+ * good to me.
89
+ */
90
+ async validateThis() {
91
+ const lc = `${this.lc}[${this.validateThis.name}]`;
92
+ if (logalot) {
93
+ console.log(`${lc} elided in this proxy class because this isn't a true witness atow (04/2025) (I: fd223814f169798d9f499d6e9cdc0325)`);
94
+ }
95
+ return [];
96
+ }
97
+ get ibGib() {
98
+ return this._currentWorkingContextIbGib;
99
+ }
100
+ /**
101
+ * determines the local space in which this proxy ibgib resides.
102
+ *
103
+ * set this via passing in a space ibgib for the proxy to witness.
104
+ */
105
+ spaceId;
106
+ constructor(initialData, initialRel8ns) {
107
+ super(initialData, initialRel8ns);
108
+ }
109
+ async initialize() {
110
+ const lc = `${this.lc}[${this.initialize.name}]`;
111
+ try {
112
+ if (logalot) {
113
+ console.log(`${lc} starting... (I: 1bd72217a5f334effc63f8d51e7b2225)`);
114
+ }
115
+ await super.initialize();
116
+ // init observables event streams
117
+ this._contextUpdated$ = await newupSubject();
118
+ this.contextUpdated$ = this._contextUpdated$.asObservable();
119
+ this._newContextChild$ = await newupSubject();
120
+ this.newContextChild$ = this._newContextChild$.asObservable();
121
+ }
122
+ catch (error) {
123
+ console.error(`${lc} ${extractErrorMsg(error)}`);
124
+ throw error;
125
+ }
126
+ finally {
127
+ if (logalot) {
128
+ console.log(`${lc} complete.`);
129
+ }
130
+ }
131
+ }
132
+ parseAddlMetadataString({ ib }) {
133
+ const lc = `${this.lc}[${this.parseAddlMetadataString.name}]`;
134
+ console.warn(`${lc} not really implemented in this class atow (04/2025). (W: genuuid)`);
135
+ return {};
136
+ }
137
+ /**
138
+ * @internal
139
+ *
140
+ * The first context ibgib frame that this proxy is initialized with,
141
+ * namely, before any updates happen that produce newer ibgibs in the
142
+ * timelines. Those will update the {@link _currentWorkingContextIbGib}.
143
+ */
144
+ _initialContext;
145
+ /**
146
+ * implementation for witnessing. Basically, the first ibgib this proxy
147
+ * witnesses is its context, i.e., its ibgib.
148
+ *
149
+ * ## notes
150
+ *
151
+ * ### on "Context" with this Proxy
152
+ *
153
+ * "Context" is kinda funny in this way, but it's how I'm reusing existing
154
+ * plumbing for updating contexts.
155
+ *
156
+ * Said another way, usually a "context" is peripheral/ambient compared to
157
+ * the primary behavior of a witness with context. But in this use case as a
158
+ * proxy ibgib, "context" is just the actual ibgib.
159
+ */
160
+ async witnessImpl(arg) {
161
+ const lc = `${this.lc}[${this.witnessImpl.name}]`;
162
+ try {
163
+ if (logalot) {
164
+ console.log(`${lc} starting...`);
165
+ }
166
+ if (isSpaceIb({ ib: arg.ib })) {
167
+ // we're setting the local space
168
+ if (!arg.data) {
169
+ throw new Error(`arg has space ib but arg.data is falsy (E: b2af9226c067d5e72f117fa36e239525)`);
170
+ }
171
+ const spaceId = arg.data.uuid;
172
+ this.spaceId = spaceId;
173
+ if (logalot) {
174
+ console.log(`${lc} spaceId set to the ${spaceId} (I: 018724a5431ba421b71fad36924c5a25)`);
175
+ }
176
+ // return a primitive string
177
+ return Factory_V1.primitive({ ib: `spaceId set to ${spaceId}` });
178
+ }
179
+ else {
180
+ // we're wrapping an ibgib
181
+ if (!this._initialContext) {
182
+ const space = await this.metaspace?.getLocalUserSpace({ localSpaceId: this.spaceId });
183
+ await this.setWrappedIbGib({
184
+ ibGib: arg,
185
+ space,
186
+ });
187
+ // return ROOT => default action taken
188
+ return ROOT;
189
+ }
190
+ else {
191
+ debugger; // error
192
+ console.error(`${lc} (UNEXPECTED) context already initialized. returning early without doing anything. NOTE: This error was not thrown, only logged. (E: genuuid)`);
193
+ }
194
+ }
195
+ }
196
+ catch (error) {
197
+ console.error(`${lc} ${error.message}`);
198
+ throw error;
199
+ }
200
+ finally {
201
+ if (logalot) {
202
+ console.log(`${lc} complete.`);
203
+ }
204
+ }
205
+ }
206
+ _contextUpdated$;
207
+ /**
208
+ * similar to {@link newContextChild$}, but this is triggered when a NEW
209
+ * context ibgib is published via the metaspace (not its children).
210
+ *
211
+ * I believe this happens before the {@link newContextChild$} but don't
212
+ * quote me.
213
+ *
214
+ * ## notes
215
+ *
216
+ * * sometimes an ibgib is published on the timeline by the metaspace but it
217
+ * is not actually new. So this swallows those old updates to essentially
218
+ * be idempotent
219
+ *
220
+ * @see {@link _contextUpdated$}
221
+ * @see {@link newContextChild$}
222
+ */
223
+ contextUpdated$;
224
+ /**
225
+ *
226
+ */
227
+ _newContextChild$;
228
+ /**
229
+ * similar to {@link contextUpdated$}, but this happens when new _children_
230
+ * are added to the context ibgib, not just when the context ibgib itself is
231
+ * changed.
232
+ *
233
+ * This wraps {@link WitnessWithContextBase_V1.handleNewContextChild}
234
+ *
235
+ * @see {@link _newContextChild$}
236
+ * @see {@link contextUpdated$}
237
+ */
238
+ newContextChild$;
239
+ async handleContextUpdate({ update }) {
240
+ const lc = `${this.lc}[${this.handleContextUpdate.name}]`;
241
+ try {
242
+ if (logalot) {
243
+ console.log(`${lc} starting... (I: c262bcda065c086ffe9e3ac5899abe25)`);
244
+ }
245
+ await super.handleContextUpdate({ update });
246
+ if (!this._contextUpdated$) {
247
+ throw new Error(`(UNEXPECTED) this._contextUpdated$ falsy? (E: a184df090502bed9649f8df88bd4c125)`);
248
+ }
249
+ await this._contextUpdated$.next(this._currentWorkingContextIbGib);
250
+ }
251
+ catch (error) {
252
+ console.error(`${lc} ${extractErrorMsg(error)}`);
253
+ throw error;
254
+ }
255
+ finally {
256
+ if (logalot) {
257
+ console.log(`${lc} complete.`);
258
+ }
259
+ }
260
+ }
261
+ async setWrappedIbGib({ ibGib, ibGibAddr, space, }) {
262
+ const lc = `${this.lc}[${this.setWrappedIbGib.name}]`;
263
+ try {
264
+ if (logalot) {
265
+ console.log(`${lc} starting... (I: a4b0acda259c121801aa701534320125)`);
266
+ }
267
+ if (!this.metaspace) {
268
+ this.metaspace = await getGlobalMetaspace_waitIfNeeded();
269
+ // throw new Error(`(UNEXPECTED) this.metaspace falsy? (E: 60dc3b1eb082dfc266a33cd4cc96a525)`);
270
+ }
271
+ // get the ibgib by addr if necessary
272
+ // initialize the context with the ibgib
273
+ // NOTE: this.initializeContext says it has the ability to load from
274
+ // addr, but it doesn't and I'm too "lazy" right now to change that
275
+ // lib.
276
+ if (!ibGib) {
277
+ if (!ibGibAddr) {
278
+ throw new Error(`(UNEXPECTED) both ibGib AND ibGibAddr falsy? (E: 6fac98ba2d4cfdec2b7ee974dec74625)`);
279
+ }
280
+ space ??= await this.metaspace.getLocalUserSpace({ lock: false });
281
+ if (!space) {
282
+ throw new Error(`(UNEXPECTED) space falsy? no space provided and couldn't get default local user space? (E: e14d1b7a6586f99453fc571396d4df25)`);
283
+ }
284
+ const resGet = await this.metaspace.get({
285
+ addrs: [ibGibAddr],
286
+ space,
287
+ });
288
+ if (!resGet.success || resGet.ibGibs?.length !== 1) {
289
+ throw new Error(`${lc} failed to get ibGib(?) (${ibGibAddr}). space.ib: ${space.ib} (E: b38f0a25d92e44c0aa5cc3b038a43c6c)`);
290
+ }
291
+ ibGib = resGet.ibGibs.at(0);
292
+ }
293
+ await this.initializeContext({
294
+ // arg: ibGib as TIbGib,
295
+ contextIbGib: ibGib,
296
+ // empty string for rel8nName avoids attempting to rel8 this
297
+ // witness to the context...sniff sniff
298
+ rel8nName: '',
299
+ });
300
+ }
301
+ catch (error) {
302
+ console.error(`${lc} ${extractErrorMsg(error)}`);
303
+ throw error;
304
+ }
305
+ finally {
306
+ if (logalot) {
307
+ console.log(`${lc} complete.`);
308
+ }
309
+ }
310
+ }
311
+ async handleNewContextChild({ newChild }) {
312
+ const lc = `[${this.handleNewContextChild.name}]`;
313
+ try {
314
+ if (logalot) {
315
+ console.log(`${lc} starting... (I: 7e9b6b7a4bb2726e9c717f230dfe1925)`);
316
+ }
317
+ // console.error(`${lc} not really an error. newChild: ${pretty(newChild)}`);
318
+ if (!this._newContextChild$) {
319
+ throw new Error(`(UNEXPECTED) this._contextUpdated$ falsy? (E: a184df090502bed9649f8df88bd4c125)`);
320
+ }
321
+ await this._newContextChild$.next(newChild);
322
+ }
323
+ catch (error) {
324
+ console.error(`${lc} ${extractErrorMsg(error)}`);
325
+ throw error;
326
+ }
327
+ finally {
328
+ if (logalot) {
329
+ console.log(`${lc} complete.`);
330
+ }
331
+ }
332
+ }
333
+ }
334
+ //# sourceMappingURL=live-proxy-ibgib-one-file.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-proxy-ibgib-one-file.mjs","sourceRoot":"","sources":["../../../src/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,iDAAiD,CAAC;AAG1F,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oFAAoF,CAAC;AAG/H,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAG7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAO,cAAmD,SAAQ,yBAAyB;IACnF,EAAE,GAAW,EAAE,CAAC;IAE1B,EAAE,GAAG,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,EAAE,C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7E,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC,CAAC;aAAE;YACpI,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC/C;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACjD,MAAM,KAAK,CAAC;SACf;gBAAS;YACN,IAAI,OAAO,EAAE;gBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;aAAE;SACnD;IACL,CAAC;CACJ"}
@@ -0,0 +1,35 @@
1
+ import { IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
2
+ import { SyncSagaInfo } from "@ibgib/core-gib/dist/witness/space/outer-space/outer-space-types.mjs";
3
+ import { IbGibSpaceAny } from "@ibgib/core-gib/dist/witness/space/space-base-v1.mjs";
4
+ import { DtoToSpaceFunction, LocalSpaceFactoryFunction, MetaspaceService } from "@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs";
5
+ export declare const fnCreateNewLocalSpace: LocalSpaceFactoryFunction;
6
+ export declare const fnDtoToSpace_webFilesystem: DtoToSpaceFunction;
7
+ /**
8
+ * wrapper around metaspace.syncIbGibs
9
+ * @param param0
10
+ * @returns
11
+ */
12
+ export declare function doSync_awaitAllSagas({ addr, metaspace, localSpace, syncSpaces, sagaReporter, verbose, }: {
13
+ /**
14
+ * the addr whose live dependency graph is going to be built and synced.
15
+ */
16
+ addr: IbGibAddr;
17
+ /**
18
+ * it's meta yo
19
+ */
20
+ metaspace: MetaspaceService;
21
+ /**
22
+ * the space which contains the syncSpace (proxy outer space).
23
+ */
24
+ localSpace: IbGibSpaceAny;
25
+ /**
26
+ * sync space witnesses (not just ibgib dtos)
27
+ */
28
+ syncSpaces: IbGibSpaceAny[];
29
+ sagaReporter: (msg: string, saga: SyncSagaInfo | null) => Promise<void>;
30
+ /**
31
+ * If true, will report more in {@link sagaReporter}
32
+ */
33
+ verbose?: boolean;
34
+ }): Promise<SyncSagaInfo[] | undefined>;
35
+ //# sourceMappingURL=metaspace-webspace-helper.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metaspace-webspace-helper.d.mts","sourceRoot":"","sources":["../../../../../src/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAmB,MAAM,sEAAsE,CAAC;AAIrH,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EACH,kBAAkB,EAAE,yBAAyB,EAAE,gBAAgB,EAClE,MAAM,kEAAkE,CAAC;AAsB1E,eAAO,MAAM,qBAAqB,EAAE,yBAuFnC,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,kBAIxC,CAAA;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,EACvC,IAAI,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,GACV,EAAE;IACC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,gBAAgB,CAAC;IAC5B;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,CA6HtC"}