agenttwin 0.3.21 → 0.3.22

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 (408) hide show
  1. package/dist/api.js +2113 -609
  2. package/dist/dashboard/assets/dashboard/agent-home.css +7 -7
  3. package/dist/dashboard/assets/dashboard/bay-morning.webp +0 -0
  4. package/dist/dashboard/assets/dashboard/golden-gate-afternoon.webp +0 -0
  5. package/dist/dashboard/assets/dashboard/golden-gate-portrait.webp +0 -0
  6. package/dist/dashboard/assets/dashboard/moonlit-coast.webp +0 -0
  7. package/dist/dashboard/assets/next/static/chunks/5663-403316746afad10e.js +1 -0
  8. package/dist/dashboard/assets/next/static/chunks/app/dashboard/{page-9c11295678539a5f.js → page-0e0392368e0a891e.js} +1 -1
  9. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-4981ea4966b19e3e.js +1 -0
  10. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-dd4ac0f5f36e6bfa.js +1 -0
  11. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/{page-34574448d210c775.js → page-de0fe6d84be21e6a.js} +1 -1
  12. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-360cbffc57981f6b.js +1 -0
  13. package/dist/dashboard/assets/next/static/chunks/app/v2/{page-07c8054d57c9089b.js → page-3e86fffabfa87d88.js} +1 -1
  14. package/dist/dashboard/assets/next/static/chunks/{webpack-40324749d289e4a5.js → webpack-be6e526fd530c797.js} +1 -1
  15. package/dist/dashboard/assets/next/static/css/{42045de5f39b50ca.css → 37d81e1d2804cc5f.css} +1 -1
  16. package/dist/dashboard/assets/next/static/css/69ec1bae997c3bb0.css +1 -0
  17. package/dist/dashboard/assets/next/static/css/ad85402a1595e56e.css +1 -0
  18. package/dist/dashboard/assets/next/static/css/{4bbe78c2fe206b92.css → da981fb878a02b8c.css} +1 -1
  19. package/dist/dashboard/assets/next/static/media/bay-morning.82669113.webp +0 -0
  20. package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.0aa49492.webp +0 -0
  21. package/dist/dashboard/assets/next/static/media/golden-gate-portrait.89fc667a.webp +0 -0
  22. package/dist/dashboard/assets/next/static/media/moonlit-coast.09739ef4.webp +0 -0
  23. package/dist/dashboard/index.html +2 -2
  24. package/dist/engine.js +6385 -4973
  25. package/dist/gateway.js +2194 -604
  26. package/dist/twins/catalog.json +6020 -0
  27. package/dist/twins/engine/v2/THIRD-PARTY.txt +25 -0
  28. package/dist/twins/engine/v2/chunks/2CHBP57N.mjs +8 -0
  29. package/dist/twins/engine/v2/chunks/4CPL6MPF.mjs +30 -0
  30. package/dist/twins/engine/v2/chunks/OYLYKZGD.mjs +2 -0
  31. package/dist/twins/engine/v2/chunks/SQSP35HM.mjs +38 -0
  32. package/dist/twins/engine/v2/chunks/YSJQQVUM.mjs +2 -0
  33. package/dist/twins/engine/v2/react-dom_client.mjs +272 -0
  34. package/dist/twins/engine/v2/react-dom_server.mjs +263 -0
  35. package/dist/twins/engine/v2/react.mjs +2 -0
  36. package/dist/twins/engine/v2/react_jsx-runtime.mjs +31 -0
  37. package/dist/twins/engine/v2/volter_world-core.mjs +195 -0
  38. package/dist/twins/engine/v2/volter_world-core_app-route.mjs +2 -0
  39. package/dist/twins/engine/v2/volter_world-core_network-policy.mjs +2 -0
  40. package/dist/twins/engine/v3/THIRD-PARTY.txt +65 -0
  41. package/dist/twins/engine/v3/chunks/2CHBP57N.mjs +8 -0
  42. package/dist/twins/engine/v3/chunks/2YSSPA5O.mjs +65 -0
  43. package/dist/twins/engine/v3/chunks/5PWRY4UK.mjs +154 -0
  44. package/dist/twins/engine/v3/chunks/7XRKSFFJ.mjs +2 -0
  45. package/dist/twins/engine/v3/chunks/AWOWH2H5.mjs +2 -0
  46. package/dist/twins/engine/v3/chunks/C46M5U3Q.mjs +2 -0
  47. package/dist/twins/engine/v3/chunks/MFH2VZPP.mjs +2 -0
  48. package/dist/twins/engine/v3/chunks/MWCO5UV3.mjs +2 -0
  49. package/dist/twins/engine/v3/chunks/N5BL5RDF.mjs +313 -0
  50. package/dist/twins/engine/v3/chunks/O7HGPMXG.mjs +2 -0
  51. package/dist/twins/engine/v3/chunks/OYLYKZGD.mjs +2 -0
  52. package/dist/twins/engine/v3/chunks/PLB7HTON.mjs +8 -0
  53. package/dist/twins/engine/v3/chunks/TY4LDBVH.mjs +7 -0
  54. package/dist/twins/engine/v3/chunks/VDIRUSCM.mjs +2 -0
  55. package/dist/twins/engine/v3/chunks/WGUCFQK6.mjs +2 -0
  56. package/dist/twins/engine/v3/chunks/WPATONSC.mjs +2 -0
  57. package/dist/twins/engine/v3/react_jsx-runtime.mjs +2 -0
  58. package/dist/twins/engine/v3/volter_world-core.mjs +2 -0
  59. package/dist/twins/engine/v3/volter_world-ui.mjs +559 -0
  60. package/dist/twins/packs/ahrefs/LICENSE +202 -0
  61. package/dist/twins/packs/ahrefs/NOTICE +7 -0
  62. package/dist/twins/packs/ahrefs/index.mjs +2 -0
  63. package/dist/twins/packs/ai-gateway/LICENSE +202 -0
  64. package/dist/twins/packs/ai-gateway/NOTICE +7 -0
  65. package/dist/twins/packs/ai-gateway/index.mjs +14 -0
  66. package/dist/twins/packs/airtable/LICENSE +202 -0
  67. package/dist/twins/packs/airtable/NOTICE +7 -0
  68. package/dist/twins/packs/airtable/index.mjs +2 -0
  69. package/dist/twins/packs/algolia/LICENSE +202 -0
  70. package/dist/twins/packs/algolia/NOTICE +7 -0
  71. package/dist/twins/packs/algolia/index.mjs +2 -0
  72. package/dist/twins/packs/ambientcg/LICENSE +202 -0
  73. package/dist/twins/packs/ambientcg/NOTICE +7 -0
  74. package/dist/twins/packs/ambientcg/index.mjs +2 -0
  75. package/dist/twins/packs/anthropic/LICENSE +202 -0
  76. package/dist/twins/packs/anthropic/NOTICE +7 -0
  77. package/dist/twins/packs/anthropic/index.mjs +18 -0
  78. package/dist/twins/packs/assemblyai/LICENSE +202 -0
  79. package/dist/twins/packs/assemblyai/NOTICE +7 -0
  80. package/dist/twins/packs/assemblyai/index.mjs +11 -0
  81. package/dist/twins/packs/aws/LICENSE +202 -0
  82. package/dist/twins/packs/aws/NOTICE +7 -0
  83. package/dist/twins/packs/aws/index.mjs +2 -0
  84. package/dist/twins/packs/azure/LICENSE +202 -0
  85. package/dist/twins/packs/azure/NOTICE +7 -0
  86. package/dist/twins/packs/azure/index.mjs +38 -0
  87. package/dist/twins/packs/azureformrecognizer/LICENSE +202 -0
  88. package/dist/twins/packs/azureformrecognizer/NOTICE +7 -0
  89. package/dist/twins/packs/azureformrecognizer/index.mjs +3 -0
  90. package/dist/twins/packs/bitly/LICENSE +202 -0
  91. package/dist/twins/packs/bitly/NOTICE +7 -0
  92. package/dist/twins/packs/bitly/index.mjs +2 -0
  93. package/dist/twins/packs/bluesky/LICENSE +202 -0
  94. package/dist/twins/packs/bluesky/NOTICE +7 -0
  95. package/dist/twins/packs/bluesky/index.mjs +30 -0
  96. package/dist/twins/packs/calcom/LICENSE +202 -0
  97. package/dist/twins/packs/calcom/NOTICE +7 -0
  98. package/dist/twins/packs/calcom/index.mjs +2 -0
  99. package/dist/twins/packs/clerk/LICENSE +202 -0
  100. package/dist/twins/packs/clerk/NOTICE +7 -0
  101. package/dist/twins/packs/clerk/index.mjs +5 -0
  102. package/dist/twins/packs/cloudflare/LICENSE +202 -0
  103. package/dist/twins/packs/cloudflare/NOTICE +7 -0
  104. package/dist/twins/packs/cloudflare/index.mjs +79 -0
  105. package/dist/twins/packs/cohere/LICENSE +202 -0
  106. package/dist/twins/packs/cohere/NOTICE +7 -0
  107. package/dist/twins/packs/cohere/index.mjs +2 -0
  108. package/dist/twins/packs/datadog/LICENSE +202 -0
  109. package/dist/twins/packs/datadog/NOTICE +7 -0
  110. package/dist/twins/packs/datadog/index.mjs +3 -0
  111. package/dist/twins/packs/deepinfra/LICENSE +202 -0
  112. package/dist/twins/packs/deepinfra/NOTICE +7 -0
  113. package/dist/twins/packs/deepinfra/index.mjs +13 -0
  114. package/dist/twins/packs/deepseek/LICENSE +202 -0
  115. package/dist/twins/packs/deepseek/NOTICE +7 -0
  116. package/dist/twins/packs/deepseek/index.mjs +12 -0
  117. package/dist/twins/packs/discord/LICENSE +202 -0
  118. package/dist/twins/packs/discord/NOTICE +7 -0
  119. package/dist/twins/packs/discord/index.mjs +2 -0
  120. package/dist/twins/packs/duckduckgo/LICENSE +202 -0
  121. package/dist/twins/packs/duckduckgo/NOTICE +7 -0
  122. package/dist/twins/packs/duckduckgo/index.mjs +532 -0
  123. package/dist/twins/packs/dynadot/LICENSE +202 -0
  124. package/dist/twins/packs/dynadot/NOTICE +7 -0
  125. package/dist/twins/packs/dynadot/index.mjs +2 -0
  126. package/dist/twins/packs/e2b/LICENSE +202 -0
  127. package/dist/twins/packs/e2b/NOTICE +7 -0
  128. package/dist/twins/packs/e2b/index.mjs +2 -0
  129. package/dist/twins/packs/elevenlabs/LICENSE +202 -0
  130. package/dist/twins/packs/elevenlabs/NOTICE +7 -0
  131. package/dist/twins/packs/elevenlabs/index.mjs +4 -0
  132. package/dist/twins/packs/expo/LICENSE +202 -0
  133. package/dist/twins/packs/expo/NOTICE +7 -0
  134. package/dist/twins/packs/expo/index.mjs +2 -0
  135. package/dist/twins/packs/fal/LICENSE +202 -0
  136. package/dist/twins/packs/fal/NOTICE +7 -0
  137. package/dist/twins/packs/fal/index.mjs +2 -0
  138. package/dist/twins/packs/figma/LICENSE +202 -0
  139. package/dist/twins/packs/figma/NOTICE +7 -0
  140. package/dist/twins/packs/figma/index.mjs +2 -0
  141. package/dist/twins/packs/firecrawl/LICENSE +202 -0
  142. package/dist/twins/packs/firecrawl/NOTICE +7 -0
  143. package/dist/twins/packs/firecrawl/index.mjs +9 -0
  144. package/dist/twins/packs/fireworks/LICENSE +202 -0
  145. package/dist/twins/packs/fireworks/NOTICE +7 -0
  146. package/dist/twins/packs/fireworks/index.mjs +13 -0
  147. package/dist/twins/packs/fly/LICENSE +202 -0
  148. package/dist/twins/packs/fly/NOTICE +7 -0
  149. package/dist/twins/packs/fly/index.mjs +2 -0
  150. package/dist/twins/packs/gcs/LICENSE +202 -0
  151. package/dist/twins/packs/gcs/NOTICE +7 -0
  152. package/dist/twins/packs/gcs/index.mjs +8 -0
  153. package/dist/twins/packs/gemini/LICENSE +202 -0
  154. package/dist/twins/packs/gemini/NOTICE +7 -0
  155. package/dist/twins/packs/gemini/index.mjs +7 -0
  156. package/dist/twins/packs/github/LICENSE +202 -0
  157. package/dist/twins/packs/github/NOTICE +7 -0
  158. package/dist/twins/packs/github/index.mjs +75153 -0
  159. package/dist/twins/packs/googleads/LICENSE +202 -0
  160. package/dist/twins/packs/googleads/NOTICE +7 -0
  161. package/dist/twins/packs/googleads/index.mjs +3 -0
  162. package/dist/twins/packs/googlemaps/LICENSE +202 -0
  163. package/dist/twins/packs/googlemaps/NOTICE +7 -0
  164. package/dist/twins/packs/googlemaps/index.mjs +2 -0
  165. package/dist/twins/packs/googleoauth/LICENSE +202 -0
  166. package/dist/twins/packs/googleoauth/NOTICE +7 -0
  167. package/dist/twins/packs/googleoauth/index.mjs +2 -0
  168. package/dist/twins/packs/hackernews/LICENSE +202 -0
  169. package/dist/twins/packs/hackernews/NOTICE +7 -0
  170. package/dist/twins/packs/hackernews/index.mjs +35 -0
  171. package/dist/twins/packs/huggingface/LICENSE +202 -0
  172. package/dist/twins/packs/huggingface/NOTICE +7 -0
  173. package/dist/twins/packs/huggingface/index.mjs +9 -0
  174. package/dist/twins/packs/inngest/LICENSE +202 -0
  175. package/dist/twins/packs/inngest/NOTICE +7 -0
  176. package/dist/twins/packs/inngest/index.mjs +2 -0
  177. package/dist/twins/packs/instagram/LICENSE +202 -0
  178. package/dist/twins/packs/instagram/NOTICE +7 -0
  179. package/dist/twins/packs/instagram/index.mjs +2 -0
  180. package/dist/twins/packs/jira/LICENSE +202 -0
  181. package/dist/twins/packs/jira/NOTICE +7 -0
  182. package/dist/twins/packs/jira/index.mjs +2 -0
  183. package/dist/twins/packs/langfuse/LICENSE +202 -0
  184. package/dist/twins/packs/langfuse/NOTICE +7 -0
  185. package/dist/twins/packs/langfuse/index.mjs +2 -0
  186. package/dist/twins/packs/linear/LICENSE +202 -0
  187. package/dist/twins/packs/linear/NOTICE +7 -0
  188. package/dist/twins/packs/linear/index.mjs +52866 -0
  189. package/dist/twins/packs/linkedin/LICENSE +202 -0
  190. package/dist/twins/packs/linkedin/NOTICE +7 -0
  191. package/dist/twins/packs/linkedin/index.mjs +78 -0
  192. package/dist/twins/packs/livekit/LICENSE +202 -0
  193. package/dist/twins/packs/livekit/NOTICE +7 -0
  194. package/dist/twins/packs/livekit/index.mjs +2 -0
  195. package/dist/twins/packs/mailgun/LICENSE +202 -0
  196. package/dist/twins/packs/mailgun/NOTICE +7 -0
  197. package/dist/twins/packs/mailgun/index.mjs +13 -0
  198. package/dist/twins/packs/mapbox/LICENSE +202 -0
  199. package/dist/twins/packs/mapbox/NOTICE +7 -0
  200. package/dist/twins/packs/mapbox/index.mjs +2 -0
  201. package/dist/twins/packs/merge/LICENSE +202 -0
  202. package/dist/twins/packs/merge/NOTICE +7 -0
  203. package/dist/twins/packs/merge/index.mjs +4 -0
  204. package/dist/twins/packs/mistral/LICENSE +202 -0
  205. package/dist/twins/packs/mistral/NOTICE +7 -0
  206. package/dist/twins/packs/mistral/index.mjs +6 -0
  207. package/dist/twins/packs/mixpanel/LICENSE +202 -0
  208. package/dist/twins/packs/mixpanel/NOTICE +8 -0
  209. package/dist/twins/packs/mixpanel/index.mjs +2 -0
  210. package/dist/twins/packs/mongodb/LICENSE +202 -0
  211. package/dist/twins/packs/mongodb/NOTICE +7 -0
  212. package/dist/twins/packs/mongodb/index.mjs +8 -0
  213. package/dist/twins/packs/moonshot/LICENSE +202 -0
  214. package/dist/twins/packs/moonshot/NOTICE +7 -0
  215. package/dist/twins/packs/moonshot/index.mjs +18 -0
  216. package/dist/twins/packs/notion/LICENSE +202 -0
  217. package/dist/twins/packs/notion/NOTICE +7 -0
  218. package/dist/twins/packs/notion/index.mjs +2 -0
  219. package/dist/twins/packs/npm-registry/LICENSE +202 -0
  220. package/dist/twins/packs/npm-registry/NOTICE +7 -0
  221. package/dist/twins/packs/npm-registry/index.mjs +2 -0
  222. package/dist/twins/packs/oa-treasury/LICENSE +202 -0
  223. package/dist/twins/packs/oa-treasury/NOTICE +8 -0
  224. package/dist/twins/packs/oa-treasury/index.mjs +16 -0
  225. package/dist/twins/packs/openai/LICENSE +202 -0
  226. package/dist/twins/packs/openai/NOTICE +7 -0
  227. package/dist/twins/packs/openai/index.mjs +3473 -0
  228. package/dist/twins/packs/openrouter/LICENSE +202 -0
  229. package/dist/twins/packs/openrouter/NOTICE +7 -0
  230. package/dist/twins/packs/openrouter/index.mjs +2 -0
  231. package/dist/twins/packs/openweather/LICENSE +202 -0
  232. package/dist/twins/packs/openweather/NOTICE +7 -0
  233. package/dist/twins/packs/openweather/index.mjs +2 -0
  234. package/dist/twins/packs/paypal/LICENSE +202 -0
  235. package/dist/twins/packs/paypal/NOTICE +7 -0
  236. package/dist/twins/packs/paypal/index.mjs +51 -0
  237. package/dist/twins/packs/pinecone/LICENSE +202 -0
  238. package/dist/twins/packs/pinecone/NOTICE +7 -0
  239. package/dist/twins/packs/pinecone/index.mjs +2 -0
  240. package/dist/twins/packs/plain/LICENSE +202 -0
  241. package/dist/twins/packs/plain/NOTICE +8 -0
  242. package/dist/twins/packs/plain/index.mjs +18426 -0
  243. package/dist/twins/packs/planetscale/LICENSE +202 -0
  244. package/dist/twins/packs/planetscale/NOTICE +7 -0
  245. package/dist/twins/packs/planetscale/index.mjs +18 -0
  246. package/dist/twins/packs/polar/LICENSE +202 -0
  247. package/dist/twins/packs/polar/NOTICE +7 -0
  248. package/dist/twins/packs/polar/index.mjs +2 -0
  249. package/dist/twins/packs/polyhaven/LICENSE +202 -0
  250. package/dist/twins/packs/polyhaven/NOTICE +7 -0
  251. package/dist/twins/packs/polyhaven/index.mjs +3 -0
  252. package/dist/twins/packs/postmark/LICENSE +202 -0
  253. package/dist/twins/packs/postmark/NOTICE +7 -0
  254. package/dist/twins/packs/postmark/index.mjs +12 -0
  255. package/dist/twins/packs/reddit/LICENSE +202 -0
  256. package/dist/twins/packs/reddit/NOTICE +7 -0
  257. package/dist/twins/packs/reddit/index.mjs +324 -0
  258. package/dist/twins/packs/redis/LICENSE +202 -0
  259. package/dist/twins/packs/redis/NOTICE +7 -0
  260. package/dist/twins/packs/redis/index.mjs +2 -0
  261. package/dist/twins/packs/replicate/LICENSE +202 -0
  262. package/dist/twins/packs/replicate/NOTICE +7 -0
  263. package/dist/twins/packs/replicate/index.mjs +2 -0
  264. package/dist/twins/packs/resend/LICENSE +202 -0
  265. package/dist/twins/packs/resend/NOTICE +7 -0
  266. package/dist/twins/packs/resend/index.mjs +139 -0
  267. package/dist/twins/packs/runhuman/LICENSE +202 -0
  268. package/dist/twins/packs/runhuman/NOTICE +7 -0
  269. package/dist/twins/packs/runhuman/index.mjs +3 -0
  270. package/dist/twins/packs/scrapecreators/LICENSE +202 -0
  271. package/dist/twins/packs/scrapecreators/NOTICE +7 -0
  272. package/dist/twins/packs/scrapecreators/index.mjs +2 -0
  273. package/dist/twins/packs/segment/LICENSE +202 -0
  274. package/dist/twins/packs/segment/NOTICE +8 -0
  275. package/dist/twins/packs/segment/index.mjs +2 -0
  276. package/dist/twins/packs/sendblue/LICENSE +202 -0
  277. package/dist/twins/packs/sendblue/NOTICE +7 -0
  278. package/dist/twins/packs/sendblue/index.mjs +2 -0
  279. package/dist/twins/packs/sendgrid/LICENSE +202 -0
  280. package/dist/twins/packs/sendgrid/NOTICE +8 -0
  281. package/dist/twins/packs/sendgrid/index.mjs +4 -0
  282. package/dist/twins/packs/sentry/LICENSE +202 -0
  283. package/dist/twins/packs/sentry/NOTICE +7 -0
  284. package/dist/twins/packs/sentry/index.mjs +5 -0
  285. package/dist/twins/packs/sigstore/LICENSE +202 -0
  286. package/dist/twins/packs/sigstore/NOTICE +7 -0
  287. package/dist/twins/packs/sigstore/index.mjs +12 -0
  288. package/dist/twins/packs/slack/LICENSE +202 -0
  289. package/dist/twins/packs/slack/NOTICE +7 -0
  290. package/dist/twins/packs/slack/index.mjs +66 -0
  291. package/dist/twins/packs/smtp/LICENSE +202 -0
  292. package/dist/twins/packs/smtp/NOTICE +7 -0
  293. package/dist/twins/packs/smtp/index.mjs +3 -0
  294. package/dist/twins/packs/snowflake/LICENSE +202 -0
  295. package/dist/twins/packs/snowflake/NOTICE +8 -0
  296. package/dist/twins/packs/snowflake/index.mjs +30 -0
  297. package/dist/twins/packs/stigg/LICENSE +202 -0
  298. package/dist/twins/packs/stigg/NOTICE +8 -0
  299. package/dist/twins/packs/stigg/index.mjs +22194 -0
  300. package/dist/twins/packs/stream/LICENSE +202 -0
  301. package/dist/twins/packs/stream/NOTICE +7 -0
  302. package/dist/twins/packs/stream/index.mjs +2 -0
  303. package/dist/twins/packs/stripe/LICENSE +202 -0
  304. package/dist/twins/packs/stripe/NOTICE +7 -0
  305. package/dist/twins/packs/stripe/index.mjs +211 -0
  306. package/dist/twins/packs/supabase/LICENSE +202 -0
  307. package/dist/twins/packs/supabase/NOTICE +7 -0
  308. package/dist/twins/packs/supabase/index.mjs +2 -0
  309. package/dist/twins/packs/supermemory/LICENSE +202 -0
  310. package/dist/twins/packs/supermemory/NOTICE +7 -0
  311. package/dist/twins/packs/supermemory/index.mjs +2 -0
  312. package/dist/twins/packs/svix/LICENSE +202 -0
  313. package/dist/twins/packs/svix/NOTICE +7 -0
  314. package/dist/twins/packs/svix/index.mjs +2 -0
  315. package/dist/twins/packs/tavily/LICENSE +202 -0
  316. package/dist/twins/packs/tavily/NOTICE +7 -0
  317. package/dist/twins/packs/tavily/index.mjs +2 -0
  318. package/dist/twins/packs/telegram/LICENSE +202 -0
  319. package/dist/twins/packs/telegram/NOTICE +7 -0
  320. package/dist/twins/packs/telegram/index.mjs +11 -0
  321. package/dist/twins/packs/temporal/LICENSE +202 -0
  322. package/dist/twins/packs/temporal/NOTICE +7 -0
  323. package/dist/twins/packs/temporal/index.mjs +44 -0
  324. package/dist/twins/packs/tiktok/LICENSE +202 -0
  325. package/dist/twins/packs/tiktok/NOTICE +7 -0
  326. package/dist/twins/packs/tiktok/index.mjs +2 -0
  327. package/dist/twins/packs/tinybird/LICENSE +202 -0
  328. package/dist/twins/packs/tinybird/NOTICE +7 -0
  329. package/dist/twins/packs/tinybird/index.mjs +50 -0
  330. package/dist/twins/packs/togetherai/LICENSE +202 -0
  331. package/dist/twins/packs/togetherai/NOTICE +7 -0
  332. package/dist/twins/packs/togetherai/index.mjs +11 -0
  333. package/dist/twins/packs/tremendous/LICENSE +202 -0
  334. package/dist/twins/packs/tremendous/NOTICE +7 -0
  335. package/dist/twins/packs/tremendous/index.mjs +2 -0
  336. package/dist/twins/packs/tripo/LICENSE +202 -0
  337. package/dist/twins/packs/tripo/NOTICE +7 -0
  338. package/dist/twins/packs/tripo/index.mjs +9 -0
  339. package/dist/twins/packs/tunnel/LICENSE +202 -0
  340. package/dist/twins/packs/tunnel/NOTICE +7 -0
  341. package/dist/twins/packs/tunnel/index.mjs +2 -0
  342. package/dist/twins/packs/twelvelabs/LICENSE +202 -0
  343. package/dist/twins/packs/twelvelabs/NOTICE +7 -0
  344. package/dist/twins/packs/twelvelabs/index.mjs +5 -0
  345. package/dist/twins/packs/twilio/LICENSE +202 -0
  346. package/dist/twins/packs/twilio/NOTICE +7 -0
  347. package/dist/twins/packs/twilio/index.mjs +2 -0
  348. package/dist/twins/packs/twitch/LICENSE +202 -0
  349. package/dist/twins/packs/twitch/NOTICE +7 -0
  350. package/dist/twins/packs/twitch/index.mjs +68 -0
  351. package/dist/twins/packs/upstash/LICENSE +202 -0
  352. package/dist/twins/packs/upstash/NOTICE +7 -0
  353. package/dist/twins/packs/upstash/index.mjs +14 -0
  354. package/dist/twins/packs/upstashvector/LICENSE +202 -0
  355. package/dist/twins/packs/upstashvector/NOTICE +7 -0
  356. package/dist/twins/packs/upstashvector/index.mjs +3 -0
  357. package/dist/twins/packs/vercel/LICENSE +202 -0
  358. package/dist/twins/packs/vercel/NOTICE +7 -0
  359. package/dist/twins/packs/vercel/index.mjs +10 -0
  360. package/dist/twins/packs/veriff/LICENSE +202 -0
  361. package/dist/twins/packs/veriff/NOTICE +7 -0
  362. package/dist/twins/packs/veriff/index.mjs +2 -0
  363. package/dist/twins/packs/vgauth/LICENSE +202 -0
  364. package/dist/twins/packs/vgauth/NOTICE +7 -0
  365. package/dist/twins/packs/vgauth/index.mjs +2 -0
  366. package/dist/twins/packs/vital/LICENSE +202 -0
  367. package/dist/twins/packs/vital/NOTICE +7 -0
  368. package/dist/twins/packs/vital/index.mjs +2 -0
  369. package/dist/twins/packs/volteridentity/LICENSE +202 -0
  370. package/dist/twins/packs/volteridentity/NOTICE +7 -0
  371. package/dist/twins/packs/volteridentity/index.mjs +2 -0
  372. package/dist/twins/packs/webrisk/LICENSE +202 -0
  373. package/dist/twins/packs/webrisk/NOTICE +7 -0
  374. package/dist/twins/packs/webrisk/index.mjs +2 -0
  375. package/dist/twins/packs/worldlabs/LICENSE +202 -0
  376. package/dist/twins/packs/worldlabs/NOTICE +7 -0
  377. package/dist/twins/packs/worldlabs/index.mjs +2 -0
  378. package/dist/twins/packs/x/LICENSE +202 -0
  379. package/dist/twins/packs/x/NOTICE +7 -0
  380. package/dist/twins/packs/x/index.mjs +63 -0
  381. package/dist/twins/packs/xai/LICENSE +202 -0
  382. package/dist/twins/packs/xai/NOTICE +7 -0
  383. package/dist/twins/packs/xai/index.mjs +4 -0
  384. package/dist/twins/packs/xidentity/LICENSE +202 -0
  385. package/dist/twins/packs/xidentity/NOTICE +8 -0
  386. package/dist/twins/packs/xidentity/index.mjs +209 -0
  387. package/dist/twins/packs/youtube/LICENSE +202 -0
  388. package/dist/twins/packs/youtube/NOTICE +7 -0
  389. package/dist/twins/packs/youtube/index.mjs +5 -0
  390. package/dist/worker.js +442 -18
  391. package/dist/world-host.js +928 -91
  392. package/package.json +5 -4
  393. package/dist/dashboard/assets/dashboard/bay-morning.png +0 -0
  394. package/dist/dashboard/assets/dashboard/golden-gate-afternoon.png +0 -0
  395. package/dist/dashboard/assets/dashboard/golden-gate-portrait.png +0 -0
  396. package/dist/dashboard/assets/dashboard/moonlit-coast.png +0 -0
  397. package/dist/dashboard/assets/next/static/chunks/2868-424d32cfc8ae81c9.js +0 -1
  398. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-f9fca2c08f779fa0.js +0 -1
  399. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-bc480c9258e5cc4d.js +0 -1
  400. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-f04c0b236abaead3.js +0 -1
  401. package/dist/dashboard/assets/next/static/css/4af3c8ca0da0f48b.css +0 -1
  402. package/dist/dashboard/assets/next/static/css/6b8edde77e493a51.css +0 -1
  403. package/dist/dashboard/assets/next/static/media/bay-morning.1a9f358c.png +0 -0
  404. package/dist/dashboard/assets/next/static/media/golden-gate-afternoon.3e7cea58.png +0 -0
  405. package/dist/dashboard/assets/next/static/media/golden-gate-portrait.7941528f.png +0 -0
  406. package/dist/dashboard/assets/next/static/media/moonlit-coast.bbe901a1.png +0 -0
  407. /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → 8f121VqXS9LLPMmYd1SRn}/_buildManifest.js +0 -0
  408. /package/dist/dashboard/assets/next/static/{5ub3D2yzS8DE7w2qZd1nv → 8f121VqXS9LLPMmYd1SRn}/_ssgManifest.js +0 -0
@@ -0,0 +1,8 @@
1
+ import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
+ import{applyTwinWrite as gt,projectResources as ft,worldNow as mt}from"../../engine/v2/volter_world-core.mjs";import{join as re}from"node:path";import{getActiveBlobStore as B,worldStateRoot as rt}from"../../engine/v2/volter_world-core.mjs";import{createHash as be}from"node:crypto";function ne(t){return be("md5").update(t).digest("base64")}function H(t){return be("sha256").update(t).digest("hex")}var ot=(()=>{let t=new Uint32Array(256);for(let e=0;e<256;e++){let n=e;for(let o=0;o<8;o++)n=n&1?2197175160^n>>>1:n>>>1;t[e]=n>>>0}return t})();function ye(t){let e=4294967295;for(let n=0;n<t.length;n++)e=ot[(e^t[n])&255]^e>>>8;return(e^4294967295)>>>0}function oe(t){let e=Buffer.alloc(4);return e.writeUInt32BE(ye(t),0),e.toString("base64")}function ie(t){return re(rt(t),"gcs","blobs")}var it=/^[0-9a-f]{64}$/;function we(t,e){return re(ie(e),"sha256",t.slice(0,2),t)}async function F(t,e){let n=H(t),o=we(n,e),i=B();return await i.exists(o)||await i.put(o,t),{sha256:n,size:t.length}}async function _(t,e){if(!it.test(t))return;let n=await B().get(we(t,e));return n===null?void 0:Buffer.from(n.buffer,n.byteOffset,n.byteLength)}function Y(t,e){return re(ie(e),"staging",`${t}.part`)}async function Te(t,e,n){let o=Y(t,n),i=B(),r=await i.get(o),s=r===null?Buffer.from(e):Buffer.concat([Buffer.from(r.buffer,r.byteOffset,r.byteLength),e]);return await i.put(o,s),s.length}async function Se(t,e){let n=await B().get(Y(t,e));return n===null?Buffer.alloc(0):Buffer.from(n.buffer,n.byteOffset,n.byteLength)}async function ke(t,e){return await B().size(Y(t,e))??0}async function Ee(t,e){await B().remove(Y(t,e))}function ae(t,e,n){return{error:{code:t,message:n,errors:[{message:n,domain:"global",reason:e}]}}}function G(t,e){return`No such object: ${t}/${e}`}function E(t){return"The specified bucket does not exist."}function se(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ce(t,e,n){return`<?xml version='1.0' encoding='UTF-8'?><Error><Code>${se(t)}</Code><Message>${se(e)}</Message>${n?`<Details>${se(n)}</Details>`:""}</Error>`}import{randomUUID as st}from"node:crypto";import{dirname as at,join as ct}from"node:path";import{getActiveWorldStore as xe,worldStateRoot as dt,worldNow as qt}from"../../engine/v2/volter_world-core.mjs";function de(t){if(!t.bucket)throw new Error("gcs mirror: a bucket name is required");let e=Promise.resolve(),n=o=>{let i=e.then(o,o);return e=i.catch(()=>{}),i};return{bucket:t.bucket,client:t.client,strict:t.strict??!0,warn:t.warn??(o=>console.error(`[gcs-twin mirror] ${o}`)),enqueue:n}}var ut=new Set(["upstream-intent","upstream-insert","upstream-insert-failed","upstream-delete","upstream-disown"]);function ue(t){return ct(dt(t),"gcs","mirror-manifest.jsonl")}function P(t,e){let n=ue(e),o=xe();o.mkdir(at(n)),o.append(n,`${JSON.stringify(t)}
3
+ `)}function je(t){let e=ue(t),n=xe().read(e);if(n===null)return{records:[],torn:!1};let o=n.endsWith(`
4
+ `),i=n.split(`
5
+ `).filter((c,d,a)=>!(c===""&&d===a.length-1)),r=[],s=!1;for(let c=0;c<i.length;c++){let d=i[c],a=c===i.length-1,u;try{u=JSON.parse(d)}catch{if(a&&!o){s=!0;continue}throw new Error(`${e}:${c+1}: corrupt mirror-manifest line \u2014 refusing to guess about upstream ownership. Inspect the file; every completed line above the corruption is still valid JSONL.`)}let l=u;if(!(typeof l=="object"&&l!==null&&ut.has(String(l.kind))&&typeof l.bucket=="string"&&typeof l.name=="string"&&typeof l.at=="string"&&(l.kind!=="upstream-intent"||typeof l.id=="string")&&(!(l.kind==="upstream-insert"||l.kind==="upstream-insert-failed")||typeof l.intentId=="string")))throw new Error(`${e}:${c+1}: mirror-manifest record is not a known shape (kind=${String(l.kind)}) \u2014 refusing to guess about upstream ownership.`);r.push(u)}return{records:r,torn:s}}var Oe=(t,e)=>`${t}/${e}`;function Ce(t){let e=new Map,n=new Map;for(let o of t){let i=Oe(o.bucket,o.name);o.kind==="upstream-intent"?n.set(o.id,{bucket:o.bucket,name:o.name,at:o.at}):o.kind==="upstream-insert"?(n.delete(o.intentId),e.set(i,{bucket:o.bucket,name:o.name,generation:o.generation,at:o.at})):o.kind==="upstream-insert-failed"?n.delete(o.intentId):(o.kind==="upstream-delete"||o.kind==="upstream-disown")&&e.get(i)?.generation===o.generation&&e.delete(i)}return{owned:e,unresolvedIntents:[...n.values()]}}async function le(t,e,n,o){return t.enqueue(async()=>{let i=st();P({kind:"upstream-intent",id:i,bucket:e.bucket,name:e.name,at:o},n);try{let{generation:r}=await t.client.insertObject({bucket:e.bucket,name:e.name,body:e.bytes,contentType:e.contentType,...e.cacheControl!==void 0?{cacheControl:e.cacheControl}:{},...e.contentDisposition!==void 0?{contentDisposition:e.contentDisposition}:{},...e.contentEncoding!==void 0?{contentEncoding:e.contentEncoding}:{},...e.contentLanguage!==void 0?{contentLanguage:e.contentLanguage}:{},...e.metadata!==void 0?{metadata:e.metadata}:{}});return typeof r!="string"||r===""?(P({kind:"upstream-insert-failed",intentId:i,bucket:e.bucket,name:e.name,error:"upstream client returned no generation",at:o},n),{ok:!1,message:"upstream client returned no generation \u2014 cannot record ownership, so the write cannot be cleaned up later"}):(P({kind:"upstream-insert",intentId:i,bucket:e.bucket,name:e.name,generation:r,at:o},n),{ok:!0})}catch(r){let s=r instanceof Error?r.message:String(r);return P({kind:"upstream-insert-failed",intentId:i,bucket:e.bucket,name:e.name,error:s,at:o},n),{ok:!1,message:s}}})}async function ge(t,e,n,o){return t.enqueue(()=>lt(t,e,n,o))}async function lt(t,e,n,o){let i;try{i=Ce(je(n).records)}catch(s){return{ok:!1,message:s instanceof Error?s.message:String(s)}}let r=i.owned.get(Oe(e.bucket,e.name));if(!r)return{ok:!0,action:"not-owned"};try{let s=await t.client.deleteObject({bucket:e.bucket,name:e.name,ifGenerationMatch:r.generation});return s==="deleted"?(P({kind:"upstream-delete",bucket:e.bucket,name:e.name,generation:r.generation,at:o},n),{ok:!0,action:"deleted"}):s==="not-found"?(P({kind:"upstream-delete",bucket:e.bucket,name:e.name,generation:r.generation,at:o},n),{ok:!0,action:"already-gone"}):(P({kind:"upstream-disown",bucket:e.bucket,name:e.name,generation:r.generation,reason:"upstream generation changed \u2014 another writer owns this object now",at:o},n),t.warn(`upstream ${e.bucket}/${e.name} was overwritten by another writer (expected generation ${r.generation}) \u2014 disowned, NOT deleted`),{ok:!0,action:"disowned"})}catch(s){return{ok:!1,message:s instanceof Error?s.message:String(s)}}}var Ae="gcs";var I="twin-project",Re="123456789012";function z(t,e){return ft(Ae,e).filter(n=>n.type===t)}function R(t,e,n){return z(t,n).find(o=>o.id===e)}async function v(t,e,n,o,i){let{resource:r}=await gt(Ae,{operation:o,subjectType:t,subjectId:e,fields:n,...i.occurredAt?{occurredAt:i.occurredAt}:{},actor:{kind:"agent"}},i.root);return r}function C(t){return t.occurredAt??mt()}var ve="application/json; charset=UTF-8";function T(t,e,n={}){return{status:t,headers:{"content-type":ve,...n},body:JSON.stringify(e)}}function g(t,e,n){return T(t,ae(t,e,n))}function w(t,e,n){return{status:t,headers:{"content-type":"application/xml; charset=UTF-8"},body:ce(e,n)}}var X=(t,e={})=>({status:t,headers:{...e},body:""});function K(t){let e={};for(let[n,o]of Object.entries(t))e[n.toLowerCase()]=o;return e}function J(t){return t===void 0?Buffer.alloc(0):typeof t=="string"?Buffer.from(t,"utf8"):Buffer.from(t)}function M(t){let e=J(t).toString("utf8");if(!e.trim())return{};try{let n=JSON.parse(e);return typeof n=="object"&&n!==null?n:{}}catch{return{}}}var O=(t,e)=>`${t}/${e}`;function pt(t,e,n,o){let i=new Set(z("upload",o).map(s=>String(s.id))),r=i.size;for(let s=0;;s+=1){let c=`twinupload_${H(Buffer.from(`${t}/${e}/${n}/${r}/${s}`)).slice(0,40)}`;if(!i.has(c))return c}}function x(t){return Array.isArray(t?.versions)?t.versions:[]}function $(t){return x(t).find(e=>!e.noncurrent)}function A(t,e){let n=R("bucket",t,e);return n&&n.deleted!==!0?n:void 0}var ht=/^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$/;async function ee(t,e){let n=A(t,e.root);if(n)return n;if(!ht.test(t))return;let o=C(e);return await v("bucket",t,{object:"bucket",project:I,location:"US",location_type:"multi-region",storage_class:"STANDARD",metageneration:1,time_created:o,updated:o,versioning:null,cors:null,labels:{},iam_configuration:null,iam_bindings:null,deleted:!1,autoProvisioned:!0},"bucket.autoProvision",e)}function Ge(t,e){return A(t,e)?.versioning?.enabled===!0}function bt(t,e,n){let o=e.reduce((r,s)=>Math.max(r,Number(s.generation)||0),n),i=t.occurredAt?Date.parse(t.occurredAt)*1e3:0;return String(Math.max(i,o)+1)}function V(t,e){return Buffer.from(`${t}:${e}`).toString("base64")}function Q(t){let e=t.host??K(t.headers??{}).host??"storage.googleapis.com";return e.startsWith("http://")||e.startsWith("https://")?e:`http://${e}`}function q(t,e){let n=String(t.id);return{kind:"storage#bucket",id:n,selfLink:`${Q(e)}/storage/v1/b/${encodeURIComponent(n)}`,projectNumber:Re,name:n,metageneration:String(t.metageneration??1),location:String(t.location??"US"),locationType:String(t.location_type??"multi-region"),storageClass:String(t.storage_class??"STANDARD"),etag:V(n,Number(t.metageneration??1)),timeCreated:String(t.time_created??""),updated:String(t.updated??t.time_created??""),iamConfiguration:t.iam_configuration??{bucketPolicyOnly:{enabled:!1},uniformBucketLevelAccess:{enabled:!1},publicAccessPrevention:"inherited"},...Array.isArray(t.cors)&&t.cors.length?{cors:t.cors}:{},...t.versioning?{versioning:t.versioning}:{},...t.labels&&Object.keys(t.labels).length?{labels:t.labels}:{},rpo:"DEFAULT"}}function W(t,e,n,o){let i=encodeURIComponent(e);return{kind:"storage#object",id:`${t}/${e}/${n.generation}`,selfLink:`${Q(o)}/storage/v1/b/${encodeURIComponent(t)}/o/${i}`,mediaLink:`${Q(o)}/download/storage/v1/b/${encodeURIComponent(t)}/o/${i}?generation=${n.generation}&alt=media`,name:e,bucket:t,generation:n.generation,metageneration:String(n.metageneration),contentType:n.contentType,storageClass:"STANDARD",size:String(n.size),...n.md5?{md5Hash:n.md5}:{},crc32c:n.crc32c,etag:V(n.generation,n.metageneration),timeCreated:n.timeCreated,updated:n.updated,timeStorageClassUpdated:n.timeCreated,...n.contentEncoding?{contentEncoding:n.contentEncoding}:{},...n.contentDisposition?{contentDisposition:n.contentDisposition}:{},...n.cacheControl?{cacheControl:n.cacheControl}:{},...n.contentLanguage?{contentLanguage:n.contentLanguage}:{},...n.metadata&&Object.keys(n.metadata).length?{metadata:n.metadata}:{},...n.componentCount!==void 0?{componentCount:n.componentCount}:{},...n.noncurrent&&n.timeDeleted?{timeDeleted:n.timeDeleted}:{}}}function Z(t,e){let n=t.get("ifGenerationMatch");if(n!==null&&(n==="0"&&e||n!=="0"&&(!e||e.generation!==n)))return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let o=t.get("ifGenerationNotMatch");if(o!==null&&e&&e.generation===o)return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let i=t.get("ifMetagenerationMatch");if(i!==null&&(!e||String(e.metageneration)!==i))return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let r=t.get("ifMetagenerationNotMatch");return r!==null&&e&&String(e.metageneration)===r?g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold."):null}function Ne(t,e){if(!t)return null;let n=/^bytes=(\d*)-(\d*)$/.exec(t.trim());if(!n||n[1]===""&&n[2]==="")return null;if(n[1]===""){let r=Number(n[2]);if(r===0)return"unsatisfiable";let s=Math.max(0,e-r);return e===0?"unsatisfiable":{start:s,end:e-1}}let o=Number(n[1]);if(o>=e)return"unsatisfiable";let i=n[2]===""?e-1:Math.min(Number(n[2]),e-1);return i<o?"unsatisfiable":{start:o,end:i}}async function _e(t,e,n,o,i){let r=await _(n.blob,o.root);if(!r)return i.xml?w(500,"InternalError","twin blob missing"):g(500,"internalError","twin blob missing");let s={"content-type":n.contentType,"accept-ranges":"bytes",etag:V(n.generation,n.metageneration),"x-goog-generation":n.generation,"x-goog-metageneration":String(n.metageneration),"x-goog-stored-content-length":String(n.size),"x-goog-stored-content-encoding":n.contentEncoding??"identity","x-goog-hash":`crc32c=${n.crc32c}${n.md5?`,md5=${n.md5}`:""}`,"last-modified":new Date(n.updated).toUTCString(),"cache-control":n.cacheControl??"private, max-age=0"},c=Ne(K(o.headers??{}).range,n.size);if(c==="unsatisfiable")return{status:416,headers:{...s,"content-range":`bytes */${n.size}`},body:""};if(c){let d=r.subarray(c.start,c.end+1);return{status:206,headers:{...s,"content-range":`bytes ${c.start}-${c.end}/${n.size}`,"content-length":String(d.length)},body:i.head?"":d}}return{status:200,headers:{...s,"content-length":String(n.size)},body:i.head?"":r}}function Pe(t,e){if(!t.has("X-Goog-Algorithm"))return null;let n=t.get("X-Goog-Date"),o=t.get("X-Goog-Expires"),i=t.get("X-Goog-Signature");if(!n||!o||!i||!t.get("X-Goog-Credential"))return w(400,"MalformedSecurityHeader","Your request has a malformed header. Missing required signed URL query parameter.");let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(n);if(!r)return w(400,"MalformedSecurityHeader","Your request has a malformed header. Invalid X-Goog-Date.");let s=Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3]),Number(r[4]),Number(r[5]),Number(r[6])),c=Number(o);return!Number.isFinite(c)||c<=0||c>604800?w(400,"InvalidArgument","Invalid argument. X-Goog-Expires must be between 1 and 604800 seconds."):Date.parse(e)>s+c*1e3?w(400,"ExpiredToken",`Invalid argument. Signed URL expired at ${new Date(s+c*1e3).toISOString()}.`):null}function pe(t){if(!Array.isArray(t))return[];let e=n=>Array.isArray(n)?n.filter(o=>typeof o=="string"):void 0;return t.filter(n=>typeof n=="object"&&n!==null).map(n=>({...e(n.origin)?{origin:e(n.origin)}:{},...e(n.method)?{method:e(n.method)}:{},...e(n.responseHeader)?{responseHeader:e(n.responseHeader)}:{},...Number.isFinite(Number(n.maxAgeSeconds))&&n.maxAgeSeconds!==null&&n.maxAgeSeconds!==void 0&&n.maxAgeSeconds!==""?{maxAgeSeconds:Number(n.maxAgeSeconds)}:{}}))}function Me(t,e){let n=A(t,e.root),o=pe(n?.cors);return o.length?o:n?e.corsFallback??[]:[]}function Be(t,e,n,o){for(let i of t){let r=i.origin??[],s=r.includes("*")?"*":r.find(d=>d===e);if(!s)continue;let c=i.method??[];if(!(!c.includes("*")&&!c.includes(n.toUpperCase()))){if(o?.length){let d=(i.responseHeader??[]).map(a=>a.toLowerCase());if(!d.includes("*")&&!o.every(a=>d.includes(a.toLowerCase())))continue}return{allowOrigin:s,rule:i}}}return null}var Ie="content-length, content-range, content-type, content-encoding, date, etag, x-goog-generation, x-goog-metageneration, x-goog-hash, x-goog-stored-content-length, x-goog-stored-content-encoding";function Ue(t,e){return{"access-control-allow-origin":t,...e?{"access-control-expose-headers":e}:{},...t==="*"?{}:{vary:"Origin"}}}function $e(t,e,n,o){return X(200,{"access-control-allow-origin":t,"access-control-allow-methods":e,...n?{"access-control-allow-headers":n}:{},"access-control-max-age":String(o),...t==="*"?{}:{vary:"Origin"},"content-length":"0"})}var yt=t=>(t??"").split(",").map(e=>e.trim()).filter(e=>e!=="");function wt(t,e,n,o){let i=decodeURIComponent(t.replace(/^\/+/,"").split("/")[0]??"");if(!i)return{};let r=Be(Me(i,o),e,n);if(!r)return{};let s=r.rule.responseHeader?.length?r.rule.responseHeader.includes("*")?Ie:r.rule.responseHeader.join(", "):void 0;return Ue(r.allowOrigin,s)}function Tt(t,e,n,o){let i=n.origin,r=n["access-control-request-method"];if(!i||!r)return null;let s=yt(n["access-control-request-headers"]);if(!e)return $e(i,"DELETE, GET, HEAD, PATCH, POST, PUT",s.length?s.join(", "):void 0,3600);let c=decodeURIComponent(t.replace(/^\/+/,"").split("/")[0]??""),d=c?Me(c,o):[],a=Be(d,i,r,s);if(!a)return X(200,{"content-length":"0"});let u=a.rule.method??[],l=u.includes("*")?r.toUpperCase():u.join(", "),m=a.rule.responseHeader?.length?a.rule.responseHeader.includes("*")?s.length?s.join(", "):void 0:a.rule.responseHeader.join(", "):void 0;return $e(a.allowOrigin,l,m,a.rule.maxAgeSeconds??3600)}async function he(t){let e=t.method.toUpperCase(),n=t.path.indexOf("?"),o=n>=0?t.path.slice(0,n):t.path,i=new URLSearchParams(n>=0?t.path.slice(n+1):""),r=e==="POST"||e==="PUT"||e==="PATCH"||e==="DELETE",s=!/^\/(storage\/v1|upload\/storage|download\/storage|b|batch)(\/|$)/.test(o);if(t.readOnly&&r)return s?w(405,"MethodNotAllowed","The specified method is not allowed; this twin is read-only."):g(405,"methodNotAllowed","The specified method is not allowed; this twin is read-only.");let c=K(t.headers??{});if(e==="OPTIONS"){let d=Tt(o,s,c,t);if(d)return d}try{let d=await St(e,o,i,t),a=c.origin;if(a&&e!=="OPTIONS"){let u=s?wt(o,a,e,t):Ue(a,Ie);Object.keys(u).length&&(d.headers={...d.headers,...u})}return d}catch(d){return g(500,"internalError",`twin error: ${d instanceof Error?d.message:String(d)}`)}}async function St(t,e,n,o){return e.startsWith("/upload/storage/v1/")?await $t(t,e,n,o):e.startsWith("/download/storage/v1/")?await fe(t,e.slice(20),n,o):e==="/batch/storage/v1"?g(501,"notImplemented","Batch requests are not modeled by this twin yet (todo: gcs.batch.multi_request \u2014 issue the calls individually)."):e.startsWith("/storage/v1/")?await fe(t,e.slice(11),n,o):e==="/b"||e.startsWith("/b/")?await fe(t,e,n,o):await Gt(t,e,n,o)}async function fe(t,e,n,o){let i=e.replace(/^\/+/,"").split("/").filter(a=>a!=="");if(i[0]==="projects"&&i.length===3&&i[2]==="serviceAccount"&&t==="GET"){let a=decodeURIComponent(i[1]);return T(200,{kind:"storage#serviceAccount",email_address:`twin-service-account@${a}.iam.gserviceaccount.com`})}if(i[0]==="projects"&&i[2]==="hmacKeys")return g(501,"notImplemented","HMAC keys are not modeled by this twin yet (todo: gcs.hmac.*).");if(i[0]!=="b")return g(404,"notFound","Not Found");if(i.length===1)return t==="GET"?kt(n,o):t==="POST"?await Et(n,o):g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`);let r=decodeURIComponent(i[1]);if(i.length===2)return await xt(t,r,n,o);if(i.length===3&&i[2]==="iam")return await jt(t,r,o);if(i.length>=3&&(i[2]==="acl"||i[2]==="defaultObjectAcl"))return g(501,"notImplemented","Bucket ACL resources are not modeled by this twin yet (todo: gcs.acl.*; IAM policy get/set IS modeled at /b/<bucket>/iam).");if(i.length>=3&&i[2]==="notificationConfigs")return g(501,"notImplemented","Pub/Sub notification configs are not modeled by this twin yet (todo: gcs.notifications.*).");if(i[2]==="lockRetentionPolicy"||i[2]==="channels")return g(501,"notImplemented","This bucket operation is not modeled by this twin yet (see the capability manifest todos).");if(i[2]!=="o")return g(404,"notFound","Not Found");let s=i.slice(3);if(s.length===0)return t==="GET"?Ot(r,n,o):g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`);let c=s.findIndex(a=>a==="copyTo"||a==="rewriteTo");if(c>0&&s[c+1]==="b"&&s[c+3]==="o"){let a=s.slice(0,c).map(decodeURIComponent).join("/"),u=decodeURIComponent(s[c+2]),l=s.slice(c+4).map(decodeURIComponent).join("/");return t!=="POST"?g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`):await Rt(r,a,u,l,s[c]==="rewriteTo",n,o)}if(s.length>1&&s[s.length-1]==="compose"){let a=s.slice(0,-1).map(decodeURIComponent).join("/");return t!=="POST"?g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`):await vt(r,a,n,o)}if(s.length>1&&s[s.length-1]==="acl")return g(501,"notImplemented","Object ACL resources are not modeled by this twin yet (todo: gcs.acl.*).");let d=s.map(decodeURIComponent).join("/");return await De(t,r,d,n,o)}function kt(t,e){let n=t.get("project");if(!n)return g(400,"required","Required parameter: project");let o=z("bucket",e.root).filter(i=>i.deleted!==!0&&String(i.project??I)===n).sort((i,r)=>String(i.id).localeCompare(String(r.id))).map(i=>q(i,e));return T(200,{kind:"storage#buckets",...o.length?{items:o}:{}})}async function Et(t,e){let n=t.get("project");if(!n)return g(400,"required","Required parameter: project");let o=M(e.body),i=typeof o.name=="string"?o.name:"";if(!i)return g(400,"required","Required parameter: name");if(!/^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$/.test(i))return g(400,"invalid",`Invalid bucket name: '${i}'`);if(A(i,e.root))return g(409,"conflict","Your previous request to create the named bucket succeeded and you already own it.");let r=C(e),s=typeof o.location=="string"?o.location.toUpperCase():"US",c=await v("bucket",i,{object:"bucket",project:n,location:s,location_type:s.includes("-")?"region":"multi-region",storage_class:typeof o.storageClass=="string"?o.storageClass:"STANDARD",metageneration:1,time_created:r,updated:r,versioning:o.versioning??null,cors:o.cors!==void 0?pe(o.cors):null,labels:o.labels??{},iam_configuration:o.iamConfiguration??null,iam_bindings:null,deleted:!1},"bucket.insert",e);return T(200,q(c,e))}async function xt(t,e,n,o){let i=A(e,o.root);if(!i)return g(404,"notFound",E(e));if(t==="GET"){let r=n.get("ifMetagenerationMatch");return r!==null&&String(i.metageneration??1)!==r?g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold."):T(200,q(i,o))}if(t==="DELETE")return z("object",o.root).some(s=>String(s.bucket)===e&&x(s).length>0)?g(409,"conflict","The bucket you tried to delete is not empty."):(await v("bucket",e,{deleted:!0,updated:C(o)},"bucket.delete",o),X(204));if(t==="PATCH"){let r=M(o.body),s=n.get("ifMetagenerationMatch");if(s!==null&&String(i.metageneration??1)!==s)return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let c={metageneration:Number(i.metageneration??1)+1,updated:C(o)};if(r.versioning!==void 0&&(c.versioning=r.versioning),r.cors!==void 0&&(c.cors=pe(r.cors)),r.labels!==void 0){let a={...i.labels??{}};for(let[u,l]of Object.entries(r.labels))l===null?delete a[u]:a[u]=l;c.labels=a}r.storageClass!==void 0&&(c.storage_class=r.storageClass),r.iamConfiguration!==void 0&&(c.iam_configuration=r.iamConfiguration);let d=await v("bucket",e,c,"bucket.patch",o);return T(200,q(d,o))}return t==="PUT"?g(501,"notImplemented","buckets.update (full PUT) is not modeled by this twin yet (todo: gcs.buckets.update \u2014 use PATCH)."):g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`)}async function jt(t,e,n){let o=A(e,n.root);if(!o)return g(404,"notFound",E(e));let i=r=>({kind:"storage#policy",resourceId:`projects/_/buckets/${e}`,version:1,etag:V(e,Number(o.metageneration??1)),bindings:r??[{role:"roles/storage.legacyBucketOwner",members:[`projectEditor:${o.project??I}`,`projectOwner:${o.project??I}`]},{role:"roles/storage.legacyBucketReader",members:[`projectViewer:${o.project??I}`]}]});if(t==="GET")return T(200,i(o.iam_bindings));if(t==="PUT"){let r=M(n.body),s=Array.isArray(r.bindings)?r.bindings:[];return await v("bucket",e,{iam_bindings:s,updated:C(n)},"bucket.setIamPolicy",n),T(200,i(s))}return g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`)}function Ot(t,e,n){if(!A(t,n.root))return g(404,"notFound",E(t));let o=e.get("prefix")??"",i=e.get("delimiter")??"",r=e.get("versions")==="true",s=Math.max(1,Math.min(Number(e.get("maxResults")??1e3)||1e3,1e3)),c=e.get("pageToken"),d=c?Buffer.from(c,"base64").toString("utf8"):"",a=z("object",n.root).filter(h=>String(h.bucket)===t).sort((h,j)=>String(h.name).localeCompare(String(j.name))),u=new Set,l=[];for(let h of a){let j=String(h.name);if(!j.startsWith(o))continue;let D=r?x(h):$(h)?[$(h)]:[];if(D.length!==0){if(i){let N=j.slice(o.length),L=N.indexOf(i);if(L>=0){u.add(o+N.slice(0,L)+i);continue}}for(let N of D)l.push({kind:"obj",key:`${j}\0${N.generation}`,item:W(t,j,N,n)})}}let m=[...[...u].sort().map(h=>({kind:"prefix",key:h})),...l].sort((h,j)=>h.key.localeCompare(j.key)),f=d?m.findIndex(h=>h.key>d):0,p=f<0?[]:m.slice(f,f+s),y=f>=0&&f+s<m.length,b=p.filter(h=>h.kind==="prefix").map(h=>h.key),S=p.filter(h=>h.kind==="obj").map(h=>h.item),k=p.length?p[p.length-1].key:"";return T(200,{kind:"storage#objects",...b.length?{prefixes:b}:{},...S.length?{items:S}:{},...y?{nextPageToken:Buffer.from(k,"utf8").toString("base64")}:{}})}async function De(t,e,n,o,i){if(!A(e,i.root))return g(404,"notFound",E(e));let r=R("object",O(e,n),i.root),s=o.get("generation"),c=s?x(r).find(d=>d.generation===s):$(r);if(t==="GET"||t==="HEAD"){if(!c)return g(404,"notFound",G(e,n));let d=Z(o,c);return d||(o.get("alt")==="media"?await _e(e,n,c,i,{xml:!1,head:t==="HEAD"}):T(200,W(e,n,c,i)))}if(t==="DELETE"){let d=Z(o,c??$(r));if(d)return d;if(!c)return g(404,"notFound",G(e,n));let a=C(i),u;if(s?u=x(r).filter(l=>l.generation!==s):Ge(e,i.root)?u=x(r).map(l=>l.generation===c.generation?{...l,noncurrent:!0,timeDeleted:a}:l):u=x(r).filter(l=>l.noncurrent),await v("object",O(e,n),{bucket:e,name:n,versions:u},"object.delete",i),i.mirror&&e===i.mirror.bucket&&!c.noncurrent){let l=await ge(i.mirror,{bucket:e,name:n},i.root,a);if(!l.ok){if(i.mirror.strict)return g(502,"twinMirrorUpstreamFailed",`upstream mirror delete for ${e}/${n} FAILED \u2014 the hybrid world is inconsistent (deleted locally but still present upstream): ${l.message}. Run \`world-gcs mirror-cleanup\` to remove it (ownership is retained for retry), or serve with --no-mirror-strict to downgrade this to a warning.`);i.mirror.warn(`upstream mirror delete for ${e}/${n} failed (non-strict \u2014 continuing; mirror-cleanup will retry): ${l.message}`)}}return X(204)}if(t==="PATCH"){if(!c)return g(404,"notFound",G(e,n));let d=Z(o,c);if(d)return d;let a=M(i.body),u={...c,metageneration:c.metageneration+1,updated:C(i)};typeof a.contentType=="string"&&(u.contentType=a.contentType);for(let m of["contentEncoding","contentDisposition","cacheControl","contentLanguage"])a[m]===null?delete u[m]:typeof a[m]=="string"&&(u[m]=a[m]);if(a.metadata===null)delete u.metadata;else if(a.metadata!==void 0&&typeof a.metadata=="object"){let m={...c.metadata??{}};for(let[f,p]of Object.entries(a.metadata))p===null?delete m[f]:m[f]=String(p);u.metadata=m}let l=x(r).map(m=>m.generation===c.generation?u:m);return await v("object",O(e,n),{bucket:e,name:n,versions:l},"object.patch",i),T(200,W(e,n,u,i))}return t==="PUT"?g(501,"notImplemented","objects.update (full PUT) is not modeled by this twin yet (todo: gcs.objects.update \u2014 use PATCH)."):g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`)}async function U(t,e,n,o,i,r){if(!await ee(t,r))return g(404,"notFound",E(t));if(!e)return g(400,"required","Required parameter: name");let s=R("object",O(t,e),r.root),c=$(s),d=Z(i,c);if(d)return d;let a=C(r),{sha256:u}=await F(n,r.root),l=x(s),m=bt(r,l,Number(s?.max_generation??0)),f={generation:m,metageneration:1,blob:u,size:n.length,...o.componentCount===void 0?{md5:ne(n)}:{componentCount:o.componentCount},crc32c:oe(n),contentType:o.contentType??"application/octet-stream",...o.contentEncoding?{contentEncoding:o.contentEncoding}:{},...o.contentDisposition?{contentDisposition:o.contentDisposition}:{},...o.cacheControl?{cacheControl:o.cacheControl}:{},...o.contentLanguage?{contentLanguage:o.contentLanguage}:{},...o.metadata&&Object.keys(o.metadata).length?{metadata:o.metadata}:{},timeCreated:a,updated:a,noncurrent:!1},p;if(Ge(t,r.root)?p=[...l.map(y=>y.noncurrent?y:{...y,noncurrent:!0,timeDeleted:a}),f]:p=[...l.filter(y=>y.noncurrent),f],await v("object",O(t,e),{bucket:t,name:e,versions:p,max_generation:Number(m)},"object.insert",r),r.mirror&&t===r.mirror.bucket){let y=await le(r.mirror,{bucket:t,name:e,bytes:n,contentType:f.contentType,...f.cacheControl!==void 0?{cacheControl:f.cacheControl}:{},...f.contentDisposition!==void 0?{contentDisposition:f.contentDisposition}:{},...f.contentEncoding!==void 0?{contentEncoding:f.contentEncoding}:{},...f.contentLanguage!==void 0?{contentLanguage:f.contentLanguage}:{},...f.metadata!==void 0?{metadata:f.metadata}:{}},r.root,a);if(!y.ok){if(r.mirror.strict)return g(502,"twinMirrorUpstreamFailed",`upstream mirror write for ${t}/${e} FAILED \u2014 the hybrid world is broken (the new bytes exist in the local twin but the upstream copy of gs://${t}/${e} is MISSING OR STALE, so a real vendor would miss or misread it): ${y.message}. Fix the upstream (credentials/bucket/network) and retry, or serve with --no-mirror-strict to downgrade this to a warning.`);r.mirror.warn(`upstream mirror write for ${t}/${e} failed (non-strict \u2014 continuing; the upstream copy is MISSING OR STALE and a real vendor reading gs://${t}/${e} would miss or misread it): ${y.message}`)}}return T(200,W(t,e,f,r))}function Ct(t,e){let n=/boundary=(?:"([^"]+)"|([^;]+))/i.exec(e),o=(n?.[1]??n?.[2])?.trim();if(!o)return null;let i=Buffer.from(`--${o}`),r=[],s=t.indexOf(i);for(;s>=0;){let d=t.indexOf(i,s+i.length);if(d<0)break;let a=t.subarray(s+i.length,d);a[0]===13&&a[1]===10&&(a=a.subarray(2)),a[a.length-2]===13&&a[a.length-1]===10&&(a=a.subarray(0,a.length-2));let u=a.indexOf(`\r
6
+ \r
7
+ `);if(u>=0){let l=a.subarray(0,u).toString("utf8"),m={};for(let f of l.split(`\r
8
+ `)){let p=f.indexOf(":");p>0&&(m[f.slice(0,p).trim().toLowerCase()]=f.slice(p+1).trim())}r.push({headers:m,body:a.subarray(u+4)})}s=d}if(r.length<2)return null;let c;try{c=JSON.parse(r[0].body.toString("utf8"))}catch{return null}return{meta:c,media:r[1].body,mediaType:r[1].headers["content-type"]}}function me(t){return{...typeof t.contentType=="string"?{contentType:t.contentType}:{},...typeof t.contentEncoding=="string"?{contentEncoding:t.contentEncoding}:{},...typeof t.contentDisposition=="string"?{contentDisposition:t.contentDisposition}:{},...typeof t.cacheControl=="string"?{cacheControl:t.cacheControl}:{},...typeof t.contentLanguage=="string"?{contentLanguage:t.contentLanguage}:{},...t.metadata&&typeof t.metadata=="object"?{metadata:t.metadata}:{}}}async function $t(t,e,n,o){let i=e.slice(18).replace(/^\/+/,"").split("/");if(i[0]!=="b"||i[2]!=="o")return g(404,"notFound","Not Found");let r=decodeURIComponent(i[1]),s=K(o.headers??{}),c=n.get("uploadType")??n.get("upload_type")??"",d=n.get("upload_id");if(t==="PUT"&&d)return await At(r,d,s,n,o);if(t!=="POST")return g(405,"httpMethodNotAllowed",`The HTTP method ${t} is not allowed for this resource.`);if(!await ee(r,o))return g(404,"notFound",E(r));if(c==="media"){let a=n.get("name");return a?await U(r,a,J(o.body),{contentType:s["content-type"]??"application/octet-stream"},n,o):g(400,"required","Required parameter: name")}if(c==="multipart"){let a=Ct(J(o.body),s["content-type"]??"");if(!a)return g(400,"parseError","Parse Error: could not parse the multipart/related body.");let u=n.get("name")??(typeof a.meta.name=="string"?a.meta.name:"");if(!u)return g(400,"required","Required parameter: name");let l=me(a.meta);return!l.contentType&&a.mediaType&&(l.contentType=a.mediaType),await U(r,u,a.media,l,n,o)}if(c==="resumable"){let a=M(o.body),u=n.get("name")??(typeof a.name=="string"?a.name:"");if(!u)return g(400,"required","Required parameter: name");let l=pt(r,u,C(o),o.root),m={};for(let p of["ifGenerationMatch","ifGenerationNotMatch","ifMetagenerationMatch","ifMetagenerationNotMatch"]){let y=n.get(p);y!==null&&(m[p]=y)}await v("upload",l,{object:"upload",bucket:r,name:u,meta:me(a),preconditions:m,state:"active",received:0,created_at:C(o),content_type_header:s["x-upload-content-type"]??null},"upload.start",o);let f=`${Q(o)}/upload/storage/v1/b/${encodeURIComponent(r)}/o?uploadType=resumable&upload_id=${l}`;return{status:200,headers:{"content-type":ve,location:f},body:""}}return g(400,"invalid",`Invalid uploadType: '${c}' (expected media, multipart or resumable).`)}async function At(t,e,n,o,i){let r=R("upload",e,i.root);if(!r)return g(404,"notFound","No such upload session. The upload id is unknown.");if(r.state==="final"){let b=R("object",O(String(r.bucket),String(r.name)),i.root),S=x(b).find(k=>k.generation===String(r.result_generation))??$(b);return S?T(200,W(String(r.bucket),String(r.name),S,i)):g(404,"notFound",G(String(r.bucket),String(r.name)))}if(r.state!=="active")return g(404,"notFound","No such upload session. The session failed and cannot be resumed.");let s=J(i.body),c=n["content-range"],d="*",a=!1,u=!1,l=null,m=null;if(c){let b=/^bytes (?:(\d+)-(\d+|\*)|\*)\/(\d+|\*)$/.exec(c.trim());if(!b)return g(400,"invalid",`Invalid Content-Range header: '${c}'`);b[1]===void 0?a=!0:(l=Number(b[1]),b[2]==="*"?u=!0:m=Number(b[2])),d=b[3]==="*"?"*":Number(b[3])}let f=await ke(e,i.root);if(!a&&s.length>0){if(l!==null&&m!==null&&m<f)return{status:308,headers:{range:`bytes=0-${f-1}`,"x-goog-upload-status":"active","content-length":"0"},body:""};if(l!==null&&l!==f)return g(400,"invalid",`Upload request started at byte ${l}, but the session expected byte ${f}.`);if(l!==null&&m!==null&&m-l+1!==s.length)return g(400,"invalid","Content-Range byte count does not match the request body length.");f=await Te(e,s,i.root)}if(d!=="*"&&f>=d||u&&d==="*"||!c){let b=await Se(e,i.root),S=new URLSearchParams(r.preconditions),k=r.meta??{};!k.contentType&&typeof r.content_type_header=="string"&&r.content_type_header&&(k.contentType=r.content_type_header);let h=await U(String(r.bucket),String(r.name),b,k,S,i);await Ee(e,i.root);let j=h.status===200?"final":"failed",D=h.status===200?JSON.parse(String(h.body)).generation:null;if(h.status===502){let N=R("object",O(String(r.bucket),String(r.name)),i.root),L=$(N);L&&(j="final",D=L.generation)}return await v("upload",e,{state:j,result_generation:D},"upload.finalize",i),h}return{status:308,headers:{...f>0?{range:`bytes=0-${f-1}`}:{},"x-goog-upload-status":"active","content-length":"0"},body:""}}async function Rt(t,e,n,o,i,r,s){if(!A(t,s.root))return g(404,"notFound",E(t));if(!await ee(n,s))return g(404,"notFound",E(n));let c=R("object",O(t,e),s.root),d=r.get("sourceGeneration"),a=d?x(c).find(k=>k.generation===d):$(c);if(!a)return g(404,"notFound",G(t,e));let u=r.get("ifSourceGenerationMatch");if(u!==null&&a.generation!==u)return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let l=r.get("ifSourceMetagenerationMatch");if(l!==null&&String(a.metageneration)!==l)return g(412,"conditionNotMet","At least one of the pre-conditions you specified did not hold.");let m=await _(a.blob,s.root);if(!m)return g(500,"internalError","twin blob missing");let f=M(s.body),p={contentType:typeof f.contentType=="string"?f.contentType:a.contentType,...a.contentEncoding?{contentEncoding:a.contentEncoding}:{},...a.cacheControl?{cacheControl:a.cacheControl}:{},...a.contentDisposition?{contentDisposition:a.contentDisposition}:{},...a.contentLanguage?{contentLanguage:a.contentLanguage}:{},metadata:f.metadata??a.metadata},y=new URLSearchParams;for(let[k,h]of r)(k.startsWith("ifGeneration")||k.startsWith("ifMetageneration"))&&y.set(k,h);let b=await U(n,o,m,p,y,s);if(b.status!==200||!i)return b;let S=JSON.parse(String(b.body));return T(200,{kind:"storage#rewriteResponse",totalBytesRewritten:String(a.size),objectSize:String(a.size),done:!0,resource:S})}async function vt(t,e,n,o){if(!A(t,o.root))return g(404,"notFound",E(t));let i=M(o.body),r=Array.isArray(i.sourceObjects)?i.sourceObjects:[];if(r.length===0)return g(400,"required","Required: sourceObjects must list at least one source.");if(r.length>32)return g(400,"invalid","The number of source components provided (max 32) is invalid.");let s=[];for(let u of r){if(!u.name)return g(400,"required","Required: sourceObjects[].name");let l=R("object",O(t,u.name),o.root),m=u.generation!==void 0?x(l).find(p=>p.generation===String(u.generation)):$(l);if(!m)return g(404,"notFound",G(t,u.name));let f=await _(m.blob,o.root);if(!f)return g(500,"internalError","twin blob missing");s.push(f)}let c=i.destination??{},d=me(c);d.componentCount=r.length;let a=new URLSearchParams;for(let[u,l]of n)(u.startsWith("ifGeneration")||u.startsWith("ifMetageneration"))&&a.set(u,l);return await U(t,e,Buffer.concat(s),d,a,o)}async function Gt(t,e,n,o){let i=e.replace(/^\/+/,"");if(i==="")return w(400,"InvalidArgument","Invalid argument (service-level XML listing is not modeled by this twin \u2014 use the JSON API /storage/v1/b).");let r=i.indexOf("/"),s=decodeURIComponent(r<0?i:i.slice(0,r)),c=r<0?"":i.slice(r+1).split("/").map(decodeURIComponent).join("/"),d=Pe(n,C(o));if(d)return d;if(t==="PUT"&&c){if(!await ee(s,o))return w(404,"NoSuchBucket",E(s))}else if(!A(s,o.root))return w(404,"NoSuchBucket",E(s));if(!c)return w(501,"NotImplemented","Bucket-level XML operations (list/multipart) are not modeled by this twin yet \u2014 use the JSON API.");if(t==="GET"||t==="HEAD"){let a=R("object",O(s,c),o.root),u=n.get("generation"),l=u?x(a).find(m=>m.generation===u):$(a);return l?await _e(s,c,l,o,{xml:!0,head:t==="HEAD"}):w(404,"NoSuchKey","The specified key does not exist.")}if(t==="PUT"){let a=K(o.headers??{}),u=new URLSearchParams,l=a["x-goog-if-generation-match"];l!==void 0&&u.set("ifGenerationMatch",l);let m={};for(let[b,S]of Object.entries(a))b.startsWith("x-goog-meta-")&&(m[b.slice(12)]=S);let f={contentType:a["content-type"]??"application/octet-stream",...a["cache-control"]?{cacheControl:a["cache-control"]}:{},...a["content-disposition"]?{contentDisposition:a["content-disposition"]}:{},...Object.keys(m).length?{metadata:m}:{}},p=await U(s,c,J(o.body),f,u,o);if(p.status!==200){let b=JSON.parse(String(p.body)),S=p.status===404?"NoSuchBucket":p.status===412?"PreconditionFailed":p.status===502?"InternalError":"InvalidArgument";return w(p.status,S,b.error.message)}let y=JSON.parse(String(p.body));return{status:200,headers:{etag:V(y.generation,Number(y.metageneration)),"x-goog-generation":y.generation,"x-goog-metageneration":y.metageneration},body:""}}if(t==="DELETE"){let a=R("object",O(s,c),o.root);if(!$(a))return w(404,"NoSuchKey","The specified key does not exist.");let u=await De("DELETE",s,c,new URLSearchParams,o);if(u.status===204)return X(204);let l=(()=>{try{return JSON.parse(String(u.body)).error.message}catch{return"delete failed"}})();return w(u.status,u.status===502?"InternalError":"InvalidArgument",l)}return t==="POST"?w(501,"NotImplemented","XML multipart upload is not modeled by this twin yet (todo: gcs.xml.multipart_*) \u2014 use the JSON API resumable upload."):w(405,"MethodNotAllowed","The specified method is not allowed against this resource.")}import{serveHttp as dn}from"../../engine/v2/volter_world-core.mjs";import{worldNow as Nt,statefulTwinManifest as _t}from"../../engine/v2/volter_world-core.mjs";function Le(t={}){let e=t.readOnly??!1,n=t.mirror?de(t.mirror):void 0,o=t.corsOrigins?.length?[{origin:t.corsOrigins,method:["*"],responseHeader:["*"],maxAgeSeconds:3600}]:void 0;return async function(r){let s=new URL(r.url);if(r.method==="GET"&&s.pathname.replace(/\/+$/,"")==="/twin")return Response.json(_t({vendor:"gcs",twinOf:"Google Cloud Storage",stores:"buckets and objects over GCS's real wire surfaces (JSON + XML + resumable uploads)"}));let c={};r.headers.forEach((f,p)=>c[p.toLowerCase()]=f);let a=r.method==="GET"||r.method==="HEAD"?void 0:Buffer.from(await r.arrayBuffer()),u=await he({method:r.method,path:s.pathname+(s.search||""),headers:c,...a!==void 0?{body:a}:{},host:c.host??s.host,readOnly:e,occurredAt:Nt(),...t.root!==void 0?{root:t.root}:{},...n!==void 0?{mirror:n}:{},...o?{corsFallback:o}:{}}),l=u.body,m=typeof l=="string"?l:new Uint8Array(l);return new Response(r.method==="HEAD"||u.status===204||u.status===304?null:m,{status:u.status,headers:{"x-guploader-uploadid":"twin-upload-id",...u.headers}})}}import{observeResources as Pt}from"../../engine/v2/volter_world-core.mjs";var He="gcs";function Fe(t){return{type:"bucket",id:t.name,fields:{object:"bucket",project:"pulled",location:t.location??"US",location_type:(t.location??"US").includes("-")?"region":"multi-region",storage_class:t.storageClass??"STANDARD",metageneration:Number(t.metageneration??1),time_created:t.timeCreated??"1970-01-01T00:00:00.000Z",updated:t.timeCreated??"1970-01-01T00:00:00.000Z",versioning:t.versioningEnabled?{enabled:!0}:null,labels:t.labels??{},iam_configuration:null,iam_bindings:null,deleted:!1}}}async function Je(t,e,n,o){let i=n?(await F(n.body,o)).sha256:"",r={generation:String(e.generation??"1"),metageneration:Number(e.metageneration??1),blob:i,size:n?n.body.length:Number(e.size??0),...e.md5Hash?{md5:e.md5Hash}:{},crc32c:e.crc32c??"",contentType:e.contentType??n?.contentType??"application/octet-stream",...e.metadata??n?.metadata?{metadata:e.metadata??n?.metadata}:{},timeCreated:e.timeCreated??"1970-01-01T00:00:00.000Z",updated:e.updated??e.timeCreated??"1970-01-01T00:00:00.000Z",noncurrent:!1};return{type:"object",id:`${t}/${e.name}`,fields:{bucket:t,name:e.name,versions:[r]}}}async function We(t){return(await t.listBuckets()).buckets.map(Fe)}async function ze(t,e,n={}){let o=await t.listObjects(e),i=[];for(let r of o.objects){let s=n.withBytes&&t.getObject?await t.getObject(e,r.name):void 0;i.push(await Je(e,r,s,n.root))}return i}async function Xe(t,e){let n=await We(t),o=[];for(let s of n)o.push(...await ze(t,s.id,{withBytes:e.withBytes??!0,...e.root!==void 0?{root:e.root}:{}}));let i=[...n,...o],r=Pt(He,i.map(s=>({type:s.type,id:s.id,fields:s.fields})),{...e.root!==void 0?{root:e.root}:{},at:e.occurredAt,batch:`obs:${He}:${e.occurredAt}`});return{observed:r.observed,deltasAppended:r.appended}}var Mt=new Set(["object.insert","object.delete","bucket.insert"]);async function Ke(t,e,n){let o=e.operation??"";if(!Mt.has(o))throw new Error(`gcs push: unsupported operation '${o}' \u2014 refusing to silently drop a local write`);let i=e.fields??{};if(o==="bucket.insert"){if(!t.createBucket)throw new Error("gcs push: injected client has no createBucket");return await t.createBucket({name:e.subject.id,location:String(i.location??"US"),storageClass:String(i.storage_class??"STANDARD")}),{externalId:e.subject.id}}let r=String(i.bucket??e.subject.id.split("/")[0]),s=String(i.name??e.subject.id.slice(r.length+1)),d=(Array.isArray(i.versions)?i.versions:[]).find(a=>!a.noncurrent);if(o==="object.insert"){if(!t.uploadObject)throw new Error("gcs push: injected client has no uploadObject");if(!d)throw new Error(`gcs push: object.insert action for ${e.subject.id} carries no live generation`);let a=await _(d.blob,n);if(!a)throw new Error(`gcs push: blob ${d.blob} missing from the local byte plane`);await t.uploadObject({bucket:r,name:s,body:a,contentType:d.contentType,...d.metadata?{metadata:d.metadata}:{}})}else if(o==="object.delete"){if(!t.deleteObject)throw new Error("gcs push: injected client has no deleteObject");await t.deleteObject(r,s)}return{externalId:e.subject.id}}function Ve(t){let e=async(i,r,s,c)=>{let d=await t({method:i,path:r,headers:{accept:"application/json",...c===void 0?{}:{"content-type":c}},...s===void 0?{}:{body:s}});if(d.status<200||d.status>=300)throw new Error(`gcs ${i} ${r} refused: HTTP ${d.status} ${d.body.slice(0,200)}`);return d},n=async(i,r,s)=>{let c=await e(i,r,s===void 0?void 0:JSON.stringify(s),s===void 0?void 0:"application/json");try{return JSON.parse(c.body||"{}")}catch{return{}}},o=encodeURIComponent;return{listBuckets:async()=>({buckets:(await n("GET","/storage/v1/b?project=twin")).items??[]}),listObjects:async i=>({objects:(await n("GET",`/storage/v1/b/${o(i)}/o`)).items??[]}),getObject:async(i,r)=>{let s=await n("GET",`/storage/v1/b/${o(i)}/o/${o(r)}`),c=await e("GET",`/storage/v1/b/${o(i)}/o/${o(r)}?alt=media`);return{body:Buffer.from(c.body,"utf8"),...typeof s.contentType=="string"?{contentType:s.contentType}:{},...s.metadata&&typeof s.metadata=="object"?{metadata:s.metadata}:{}}},uploadObject:async({bucket:i,name:r,body:s,contentType:c,metadata:d})=>{let a=await e("POST",`/upload/storage/v1/b/${o(i)}/o?uploadType=media&name=${o(r)}`,s.toString("utf8"),c??"application/octet-stream"),u;try{u=JSON.parse(a.body||"{}").generation}catch{u=void 0}return d&&Object.keys(d).length>0&&await n("PATCH",`/storage/v1/b/${o(i)}/o/${o(r)}`,{metadata:d}),u===void 0?{}:{generation:u}},deleteObject:async(i,r)=>{await e("DELETE",`/storage/v1/b/${o(i)}/o/${o(r)}`)},createBucket:async({name:i,location:r,storageClass:s})=>{await n("POST","/storage/v1/b?project=twin",{name:i,...r===void 0?{}:{location:r},...s===void 0?{}:{storageClass:s}})}}}async function Ye(t,e={}){return Xe(Ve(t),{...e.root!==void 0?{root:e.root}:{},occurredAt:e.occurredAt??new Date().toISOString()})}async function Ze(t,e,n){let o=e.operation??`${e.subject.type}.update`;try{return await Ke(Ve(t),{operation:o,subject:e.subject,fields:e.fields??{}},n.root)}catch(i){let r=i instanceof Error?i.message:String(i);if(/unsupported operation|not pushable|no push/i.test(r))return{externalId:e.subject.id,data:{performed:!1,reason:`${o} is the twin's own record \u2014 nothing at Google Cloud Storage to write`}};throw i}}import{declareRateBudget as Bt,rateBudgetPath as yn,rateBudgetWeight as wn,RateBudget as Tn}from"../../engine/v2/volter_world-core.mjs";import{RateBudgetError as nt}from"../../engine/v2/volter_world-core.mjs";var It="gcs",Qe=6e4,qe=300,et=300,tt={other:1},te={windowMs:Qe,ceiling:qe,defaultWeight:tt.other,maxRetryAfterSeconds:et,rules:[],reason:"Google publishes scalar Cloud Storage figures (cloud.google.com/storage/quotas, read 2026-07-27): an initial ~1,000 object writes per second per bucket (auto-scaling higher) \u2014 60,000 writes/minute \u2014 and ~5,000 object reads/second. 300 weighted units / 60s is 300 calls a minute at the default weight, 0.5% of that documented per-bucket write rate: sized for the upstream mirror of a hybrid eval world (tens of media objects), deliberately more permissive than the kernel's undeclared fallback (30 calls/min) BECAUSE the vendor's number licenses it. Every call is priced 1 \u2014 GCS counts requests, and the three shapes this client issues (multipart insert, generation-guarded delete, OAuth token exchange) are all flat. The window bounds the 60s average and does not pace; the 429/Retry-After cooldown the kernel arms is the backstop for a sub-second burst."};Bt(It,te);import{registerPack as Lt}from"../../engine/v2/volter_world-core.mjs";var Ht={protocol:"2",refresh:{every:"10m",onDemand:{atMost:"60s"}},stateSystem:{perform:Ze,refresh:Ye},roundTrip:[{method:"POST",path:"/storage/v1/b?project=round-trip",body:{name:"round-trip"},headers:{authorization:"Bearer round-trip"}},{method:"POST",path:"/upload/storage/v1/b/round-trip/o?uploadType=resumable&name=note.txt",body:{contentType:"text/plain"},headers:{authorization:"Bearer round-trip"}}],parityOrigin:"http://twin",vendor:"gcs",transport:"rest",archetype:"crud",bin:"world-gcs",rateBudget:te,resources:["bucket","object","upload"],specSource:"gcs-conformance.ts (self-referential endpoint/resource inventory) \u2014 the vendor publishes a first-party machine-readable Google API Discovery document for storage/v1 (see spec-sources.json), grounded against cloud.google.com/storage/docs/json_api and the @google-cloud/storage@7 SDK behavior.",description:"Google Cloud Storage twin \u2014 buckets, objects with generations/preconditions, media/multipart/resumable uploads, media downloads with Range (206), copy/rewrite/compose, metadata patch, bucket IAM policy, and the V4 signed-URL surface (signature accepted, expiry enforced). Control plane in the kernel log; object bytes content-addressed on the kernel blob seam (fs locally, object storage in a hosted namespace). Unmodified @google-cloud/storage (Node) and google-cloud-storage (Python) under STORAGE_EMULATOR_HOST talk to it. Opt-in UPSTREAM MIRROR mode (hybrid worlds) writes one bucket\u2019s objects through to the same-named real GCS bucket \u2014 manifest-tracked, generation-guarded, torn down with `world-gcs mirror-cleanup`.",adoption:{pypi:["google-cloud-storage"],sdks:["@google-cloud/storage"],envStems:["GCS","GOOGLECLOUDSTORAGE"]},hosts:[{host:"storage.googleapis.com"},{suffix:".storage.googleapis.com"}],browserRouting:{apiPathPrefix:"/storage/v1/",loaderHost:"https://storage.googleapis.com"}};Lt(Ht);export{Le as createTwinFetch};
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ @agenttwin/twin-gemini
2
+
3
+ Contains @volter/twin-gemini 1.0.0 by Volter (https://github.com/volter-ai),
4
+ licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ Modified by AgentTwin: bundled and minified into one file; only code reachable from the pack's
7
+ fetch factory is included; shared modules are imported from the AgentTwin twin engine.