@wenathlan/devthink 2.0.15 → 2.0.20

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 (444) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/{dist/bridge.d.ts → bridge.d.ts} +1 -1
  3. package/bridge.d.ts.map +1 -0
  4. package/bridge.js +1877 -0
  5. package/bun.d.ts.map +1 -0
  6. package/bun.js +52329 -0
  7. package/caps/background.json +712 -0
  8. package/caps/cli.json +360 -0
  9. package/caps/library.json +3611 -0
  10. package/caps/mcp.json +126 -0
  11. package/caps/pagebridge.json +377 -0
  12. package/caps/popup.json +51 -0
  13. package/caps/sidepanel.json +522 -0
  14. package/checksums.txt +142 -0
  15. package/cli.d.ts.map +1 -0
  16. package/{dist/cli.js → cli.js} +2 -2
  17. package/companion.d.ts.map +1 -0
  18. package/companion.js +389 -0
  19. package/crossbrowser.d.ts.map +1 -0
  20. package/crossbrowser.js +1191 -0
  21. package/dashdone.d.ts.map +1 -0
  22. package/dashdone.js +368 -0
  23. package/deno.d.ts.map +1 -0
  24. package/deno.js +52325 -0
  25. package/devthink.umd.js +52346 -0
  26. package/fixtures/bun.ts +7 -0
  27. package/fixtures/cjs.js +6 -0
  28. package/fixtures/deno.ts +6 -0
  29. package/fixtures/example-org-pagestate.json +22 -0
  30. package/fixtures/importers/automa-workflow.json +18 -0
  31. package/fixtures/importers/selenium-side.json +20 -0
  32. package/fixtures/importers/tabular-plan.csv +7 -0
  33. package/fixtures/importers/uivision-macro.json +10 -0
  34. package/fixtures/importers/v1-plan.json +13 -0
  35. package/fixtures/mcp-client.mjs +14 -0
  36. package/fixtures/pages/checkout.html +192 -0
  37. package/fixtures/pages/dashboard.html +110 -0
  38. package/fixtures/pages/feed.html +113 -0
  39. package/fixtures/pages/product-grid.html +150 -0
  40. package/fixtures/plans/form-inventory-plan.json +11 -0
  41. package/fixtures/plans/release-notes-plan.json +11 -0
  42. package/fixtures/recipes/agentscompete.json +11 -0
  43. package/fixtures/recipes/agentsforms.json +11 -0
  44. package/fixtures/recipes/agentsmonitor.json +11 -0
  45. package/fixtures/recipes/agentsreview.json +29 -0
  46. package/fixtures/recipes/agentswarm.json +11 -0
  47. package/fixtures/recipes/fillcalendar.json +12 -0
  48. package/fixtures/recipes/fillcheckout.json +13 -0
  49. package/fixtures/recipes/filldependentdropdowns.json +12 -0
  50. package/fixtures/recipes/fillfromcsv.json +13 -0
  51. package/fixtures/recipes/fillloginform.json +12 -0
  52. package/fixtures/recipes/fillmultistepwizard.json +13 -0
  53. package/fixtures/recipes/fillregistration.json +12 -0
  54. package/fixtures/recipes/fillsearchfilters.json +12 -0
  55. package/fixtures/recipes/filltypeahead.json +11 -0
  56. package/fixtures/recipes/monitoralerts.json +12 -0
  57. package/fixtures/recipes/monitoravailability.json +11 -0
  58. package/fixtures/recipes/monitornetworkquiet.json +12 -0
  59. package/fixtures/recipes/monitorpagechanges.json +11 -0
  60. package/fixtures/recipes/monitorpricechange.json +11 -0
  61. package/fixtures/recipes/monitorschedule.json +12 -0
  62. package/fixtures/recipes/scrapedynamicprices.json +13 -0
  63. package/fixtures/recipes/scrapeimagegallery.json +12 -0
  64. package/fixtures/recipes/scrapeinfinitefeed.json +13 -0
  65. package/fixtures/recipes/scrapenestedlists.json +12 -0
  66. package/fixtures/recipes/scrapeproductgrid.json +12 -0
  67. package/fixtures/recipes/scrapereviews.json +12 -0
  68. package/fixtures/recipes/scrapesearchresults.json +12 -0
  69. package/fixtures/recipes/scrapetablepagination.json +12 -0
  70. package/fixtures/recipes/testaccessibility.json +34 -0
  71. package/fixtures/recipes/testconsoleerrors.json +12 -0
  72. package/fixtures/recipes/testdeeplinks.json +12 -0
  73. package/fixtures/recipes/testformvalidation.json +13 -0
  74. package/fixtures/recipes/testlayoutshift.json +12 -0
  75. package/fixtures/recipes/testlinkcheck.json +12 -0
  76. package/fixtures/recipes/testloadtiming.json +12 -0
  77. package/fixtures/recipes/testvisualdiff.json +12 -0
  78. package/fixtures/workflows/changelog-digest-workflow.json +13 -0
  79. package/fixtures/workflows/form-survey-workflow.json +13 -0
  80. package/gallery.json +706 -0
  81. package/hardening.d.ts.map +1 -0
  82. package/hardening.js +188 -0
  83. package/headless.d.ts.map +1 -0
  84. package/headless.js +11522 -0
  85. package/http.d.ts.map +1 -0
  86. package/http.js +2165 -0
  87. package/index.cjs +54682 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +52310 -0
  90. package/index.neutral.js +46343 -0
  91. package/{web/manifest.json → manifest.json} +1 -1
  92. package/mcp.d.ts.map +1 -0
  93. package/mcp.js +20515 -0
  94. package/memory.d.ts.map +1 -0
  95. package/{memory.ts → memory.js} +2310 -3834
  96. package/nativehost.template.json +10 -0
  97. package/node.cjs +54686 -0
  98. package/node.d.ts.map +1 -0
  99. package/pack.d.ts.map +1 -0
  100. package/pack.js +805 -0
  101. package/package.json +83 -176
  102. package/policy.d.ts.map +1 -0
  103. package/{policy.ts → policy.js} +4679 -5073
  104. package/progress.d.ts.map +1 -0
  105. package/progress.js +645 -0
  106. package/protocol.d.ts.map +1 -0
  107. package/protocol.js +8334 -0
  108. package/schemas/audit.schema.json +226 -0
  109. package/schemas/capability.schema.json +113 -0
  110. package/schemas/envelope.schema.json +162 -0
  111. package/schemas/memory.schema.json +51 -0
  112. package/schemas/observation.schema.json +113 -0
  113. package/schemas/plan.schema.json +208 -0
  114. package/schemas/progress.schema.json +126 -0
  115. package/schemas/proposal.schema.json +68 -0
  116. package/schemas/session.schema.json +82 -0
  117. package/schemas/tool.schema.json +94 -0
  118. package/server.d.ts.map +1 -0
  119. package/server.js +28877 -0
  120. package/umd-example.html +18 -0
  121. package/umd.d.ts.map +1 -0
  122. package/accounts.ts +0 -2087
  123. package/agent.ts +0 -2331
  124. package/antigravity.ts +0 -2139
  125. package/apifreeze.ts +0 -4146
  126. package/auth.ts +0 -642
  127. package/background.ts +0 -16837
  128. package/bridge.ts +0 -2080
  129. package/build.ts +0 -54
  130. package/bun.ts +0 -26
  131. package/capture.ts +0 -1614
  132. package/checksecrets.ts +0 -72
  133. package/cjs.ts +0 -9
  134. package/cli.ts +0 -3500
  135. package/commands.ts +0 -1101
  136. package/companion.ts +0 -450
  137. package/compatibility.ts +0 -37
  138. package/config.ts +0 -3137
  139. package/constants.ts +0 -943
  140. package/core.ts +0 -1473
  141. package/crossbrowser.ts +0 -1359
  142. package/dashdone.ts +0 -605
  143. package/data.ts +0 -943
  144. package/database.ts +0 -133
  145. package/debug.ts +0 -850
  146. package/deno.ts +0 -27
  147. package/devthink.ts +0 -707
  148. package/dist/accounts.d.ts +0 -409
  149. package/dist/agent.d.ts +0 -837
  150. package/dist/antigravity.d.ts +0 -380
  151. package/dist/apifreeze.d.ts +0 -113
  152. package/dist/auth.d.ts +0 -224
  153. package/dist/capture.d.ts +0 -595
  154. package/dist/cjs.d.ts +0 -6
  155. package/dist/commands.d.ts +0 -310
  156. package/dist/compatibility.d.ts +0 -17
  157. package/dist/config.d.ts +0 -1853
  158. package/dist/constants.d.ts +0 -637
  159. package/dist/core.d.ts +0 -361
  160. package/dist/data.d.ts +0 -330
  161. package/dist/database.d.ts +0 -24
  162. package/dist/debug.d.ts +0 -270
  163. package/dist/engine.d.ts +0 -74
  164. package/dist/environments.d.ts +0 -244
  165. package/dist/evidence.d.ts +0 -277
  166. package/dist/export.d.ts +0 -311
  167. package/dist/fingerprint.d.ts +0 -594
  168. package/dist/flow.d.ts +0 -300
  169. package/dist/gates.d.ts +0 -103
  170. package/dist/identity.d.ts +0 -51
  171. package/dist/ids.d.ts +0 -7
  172. package/dist/llm.d.ts +0 -652
  173. package/dist/models.d.ts +0 -1807
  174. package/dist/net.d.ts +0 -325
  175. package/dist/neutral.d.ts +0 -41
  176. package/dist/oauth.d.ts +0 -703
  177. package/dist/page.d.ts +0 -1166
  178. package/dist/perf.d.ts +0 -481
  179. package/dist/plan.d.ts +0 -134
  180. package/dist/project.d.ts +0 -395
  181. package/dist/providers.d.ts +0 -37
  182. package/dist/quota.d.ts +0 -453
  183. package/dist/recovery.d.ts +0 -621
  184. package/dist/request.d.ts +0 -1492
  185. package/dist/run.d.ts +0 -779
  186. package/dist/runtime.d.ts +0 -212
  187. package/dist/search.d.ts +0 -375
  188. package/dist/security.d.ts +0 -534
  189. package/dist/serve.d.ts +0 -136
  190. package/dist/session.d.ts +0 -296
  191. package/dist/storage.d.ts +0 -53
  192. package/dist/streaming.d.ts +0 -1119
  193. package/dist/swarm.d.ts +0 -328
  194. package/dist/tools.d.ts +0 -170
  195. package/dist/types.d.ts +0 -8357
  196. package/dist/utils.d.ts +0 -82
  197. package/dist/version.d.ts +0 -7
  198. package/dist/versionregistry.d.ts +0 -406
  199. package/dist/views.d.ts +0 -579
  200. package/dist/workbenchsession.d.ts +0 -69
  201. package/dist/workflow.d.ts +0 -649
  202. package/docs/readme.md +0 -92
  203. package/docs/schemas/antigravity.json +0 -192
  204. package/engine.ts +0 -1524
  205. package/environments.ts +0 -1005
  206. package/evidence.ts +0 -643
  207. package/export.ts +0 -889
  208. package/fingerprint.ts +0 -1458
  209. package/flow.ts +0 -1190
  210. package/gates.ts +0 -307
  211. package/gateway.ts +0 -34
  212. package/hardening.ts +0 -191
  213. package/headless.ts +0 -369
  214. package/http.ts +0 -2110
  215. package/identity.ts +0 -246
  216. package/ids.ts +0 -26
  217. package/index.ts +0 -369
  218. package/llm.ts +0 -2682
  219. package/mcp.ts +0 -1835
  220. package/models.ts +0 -3805
  221. package/modes.ts +0 -43
  222. package/net.ts +0 -1214
  223. package/neutral.ts +0 -362
  224. package/node.ts +0 -26
  225. package/oauth.ts +0 -2216
  226. package/offscreen.ts +0 -170
  227. package/pack.ts +0 -956
  228. package/page.ts +0 -7824
  229. package/pagebridge.ts +0 -1116
  230. package/perf.ts +0 -957
  231. package/plan.ts +0 -672
  232. package/plugin.ts +0 -76
  233. package/prisma.config.ts +0 -27
  234. package/progress.ts +0 -1308
  235. package/project.ts +0 -1291
  236. package/protocol.ts +0 -4187
  237. package/providers.ts +0 -246
  238. package/quota.ts +0 -1887
  239. package/recovery.ts +0 -2433
  240. package/request.ts +0 -4482
  241. package/run.ts +0 -2135
  242. package/runtime.ts +0 -526
  243. package/search.ts +0 -1760
  244. package/security.ts +0 -1673
  245. package/serve.ts +0 -419
  246. package/server.ts +0 -5538
  247. package/session.ts +0 -1162
  248. package/storage.ts +0 -182
  249. package/streaming.ts +0 -4101
  250. package/swarm.ts +0 -884
  251. package/sync.ts +0 -56
  252. package/tests/agentcert.test.ts +0 -128
  253. package/tests/agentfleet.test.ts +0 -214
  254. package/tests/agentreview.test.ts +0 -241
  255. package/tests/agentstream.test.ts +0 -335
  256. package/tests/agentwork.test.ts +0 -356
  257. package/tests/apifreeze.test.ts +0 -290
  258. package/tests/apimap.test.ts +0 -112
  259. package/tests/approvalgate.test.ts +0 -175
  260. package/tests/artifactmanifest.test.ts +0 -204
  261. package/tests/attentionfeed.test.ts +0 -163
  262. package/tests/backgroundruns.test.ts +0 -100
  263. package/tests/batchscheduling.test.ts +0 -131
  264. package/tests/blackboard.test.ts +0 -238
  265. package/tests/bridge.test.ts +0 -1088
  266. package/tests/browsercoverage.test.ts +0 -134
  267. package/tests/browserpolyfills.test.ts +0 -124
  268. package/tests/build.mjs +0 -1260
  269. package/tests/clientauth.test.ts +0 -223
  270. package/tests/clitools.test.ts +0 -578
  271. package/tests/confirmgates.test.ts +0 -190
  272. package/tests/containerpack.test.ts +0 -143
  273. package/tests/controlflow.test.ts +0 -2120
  274. package/tests/coordination.test.ts +0 -345
  275. package/tests/copyscreen.test.ts +0 -139
  276. package/tests/core.test.ts +0 -417
  277. package/tests/costcert.test.ts +0 -95
  278. package/tests/crossbrowser.test.ts +0 -115
  279. package/tests/cspaudit.test.ts +0 -79
  280. package/tests/dashdone.test.ts +0 -615
  281. package/tests/datagrid.test.ts +0 -137
  282. package/tests/doccheck.test.ts +0 -107
  283. package/tests/dombatch.test.ts +0 -109
  284. package/tests/emulation.test.ts +0 -282
  285. package/tests/environments.test.ts +0 -259
  286. package/tests/evidenceviews.test.ts +0 -88
  287. package/tests/exporttools.test.ts +0 -185
  288. package/tests/firefoxprep.test.ts +0 -134
  289. package/tests/flowlibrary.test.ts +0 -242
  290. package/tests/flowrun.test.ts +0 -303
  291. package/tests/forensics.test.ts +0 -439
  292. package/tests/gateway.test.ts +0 -939
  293. package/tests/headlesslib.test.ts +0 -171
  294. package/tests/httpstream.test.ts +0 -277
  295. package/tests/immutablelog.test.ts +0 -157
  296. package/tests/inboundguard.test.ts +0 -177
  297. package/tests/lazyload.test.ts +0 -72
  298. package/tests/librarymodes.test.ts +0 -623
  299. package/tests/llm.test.ts +0 -696
  300. package/tests/manifest.test.ts +0 -226
  301. package/tests/maskinputs.test.ts +0 -150
  302. package/tests/matrixverify.test.ts +0 -111
  303. package/tests/mavenpack.test.ts +0 -75
  304. package/tests/mcpserver.test.ts +0 -704
  305. package/tests/memory.test.ts +0 -4155
  306. package/tests/memorycare.test.ts +0 -230
  307. package/tests/migrateplan.test.ts +0 -349
  308. package/tests/minimization.test.ts +0 -414
  309. package/tests/modelroute.test.ts +0 -112
  310. package/tests/multiagent.test.ts +0 -440
  311. package/tests/nativebridge.test.ts +0 -807
  312. package/tests/navigation.test.ts +0 -284
  313. package/tests/nugetpack.test.ts +0 -83
  314. package/tests/orchestration.test.ts +0 -449
  315. package/tests/originpolicy.test.ts +0 -405
  316. package/tests/outputcompare.test.ts +0 -97
  317. package/tests/package.test.ts +0 -91
  318. package/tests/pagebridge.test.ts +0 -5909
  319. package/tests/pentest.test.ts +0 -75
  320. package/tests/perfrecords.test.ts +0 -257
  321. package/tests/permdiff.test.ts +0 -85
  322. package/tests/phishguard.test.ts +0 -128
  323. package/tests/pickerviews.test.ts +0 -155
  324. package/tests/pipelines.test.ts +0 -381
  325. package/tests/planlint.test.ts +0 -240
  326. package/tests/planreview.test.ts +0 -383
  327. package/tests/platformtargets.test.ts +0 -56
  328. package/tests/policy.test.ts +0 -8284
  329. package/tests/portability.test.ts +0 -96
  330. package/tests/progress.test.ts +0 -1036
  331. package/tests/promptlibrary.test.ts +0 -116
  332. package/tests/protocol.test.ts +0 -4793
  333. package/tests/publishingpipeline.test.ts +0 -314
  334. package/tests/quickactions.test.ts +0 -164
  335. package/tests/readiness.test.ts +0 -78
  336. package/tests/recipes.test.ts +0 -163
  337. package/tests/redactshots.test.ts +0 -216
  338. package/tests/registernvidiakeys.ts +0 -51
  339. package/tests/relayserve.test.ts +0 -304
  340. package/tests/releasenotes.test.ts +0 -276
  341. package/tests/resilience.test.ts +0 -467
  342. package/tests/resourceaware.test.ts +0 -187
  343. package/tests/runbudget.test.ts +0 -125
  344. package/tests/runhistory.test.ts +0 -299
  345. package/tests/runreplay.test.ts +0 -113
  346. package/tests/runresume.test.ts +0 -184
  347. package/tests/runstate.test.ts +0 -288
  348. package/tests/runtimeadapters.test.ts +0 -251
  349. package/tests/safariskeleton.test.ts +0 -115
  350. package/tests/sandboxframe.test.ts +0 -196
  351. package/tests/sbom.test.ts +0 -105
  352. package/tests/secretvault.test.ts +0 -188
  353. package/tests/selcache.test.ts +0 -111
  354. package/tests/sessioninterface.test.ts +0 -791
  355. package/tests/sessions.test.ts +0 -591
  356. package/tests/siteprefs.test.ts +0 -228
  357. package/tests/snapshotdelta.test.ts +0 -165
  358. package/tests/statusviews.test.ts +0 -237
  359. package/tests/stepmeter.test.ts +0 -200
  360. package/tests/streamparse.test.ts +0 -163
  361. package/tests/stylepruning.test.ts +0 -90
  362. package/tests/surfaces.test.ts +0 -282
  363. package/tests/sweep.test.ts +0 -78
  364. package/tests/syncbridge.test.ts +0 -164
  365. package/tests/taskqueue.test.ts +0 -206
  366. package/tests/toolcalls.test.ts +0 -336
  367. package/tests/toolcatalog.test.ts +0 -201
  368. package/tests/torture-agent.test.ts +0 -706
  369. package/tests/torture-auth.test.ts +0 -461
  370. package/tests/torture-commands.test.ts +0 -895
  371. package/tests/torture-data.test.ts +0 -923
  372. package/tests/torture-environments.test.ts +0 -285
  373. package/tests/torture-export.test.ts +0 -263
  374. package/tests/torture-http.test.ts +0 -1379
  375. package/tests/torture-llm.test.ts +0 -808
  376. package/tests/torture-memory.test.ts +0 -1084
  377. package/tests/torture-plan.test.ts +0 -829
  378. package/tests/torture-run.test.ts +0 -626
  379. package/tests/torture-session.test.ts +0 -928
  380. package/tests/torture-swarm.test.ts +0 -1245
  381. package/tests/torture-tools.test.ts +0 -964
  382. package/tests/torture-workflow.test.ts +0 -2354
  383. package/tests/tourviews.test.ts +0 -52
  384. package/tests/transparency.test.ts +0 -147
  385. package/tests/trigger.test.ts +0 -941
  386. package/tests/v1sunset.test.ts +0 -428
  387. package/tests/virtlist.test.ts +0 -94
  388. package/tests/vision.test.ts +0 -540
  389. package/tests/vsixpack.test.ts +0 -145
  390. package/tests/webapi.test.ts +0 -523
  391. package/tests/workflow.test.ts +0 -1785
  392. package/tests/workfloweditor.test.ts +0 -759
  393. package/tests/xpipack.test.ts +0 -128
  394. package/tools.ts +0 -734
  395. package/types.ts +0 -9908
  396. package/umd.ts +0 -9
  397. package/utils.ts +0 -249
  398. package/version.ts +0 -8
  399. package/versionregistry.ts +0 -1310
  400. package/views.ts +0 -2153
  401. package/vitest.config.ts +0 -12
  402. package/web/App.tsx +0 -78
  403. package/web/README.md +0 -47
  404. package/web/capacitor.config.ts +0 -46
  405. package/web/const.ts +0 -19
  406. package/web/control.shell.tsx +0 -66
  407. package/web/dashboardpage.ts +0 -554
  408. package/web/db.ts +0 -493
  409. package/web/design.html +0 -541
  410. package/web/gatewayview/Gateway.tsx +0 -345
  411. package/web/gatewayview/config.ts +0 -1042
  412. package/web/gatewayview/definition.ts +0 -174
  413. package/web/icons.ts +0 -15
  414. package/web/optionspage.ts +0 -691
  415. package/web/popup.ts +0 -1651
  416. package/web/schema.prisma +0 -176
  417. package/web/sidepanel.ts +0 -7941
  418. package/web/sitemanifest.json +0 -13
  419. package/web/terminal-ui.tsx +0 -622
  420. package/web/transparencypage.ts +0 -541
  421. package/web/vite.config.ts +0 -39
  422. package/web/workspace.ts +0 -23
  423. package/workbenchmemory.ts +0 -104
  424. package/workbenchsession.ts +0 -304
  425. package/workflow.ts +0 -4495
  426. /package/{dist/bun.d.ts → bun.d.ts} +0 -0
  427. /package/{dist/cli.d.ts → cli.d.ts} +0 -0
  428. /package/{dist/companion.d.ts → companion.d.ts} +0 -0
  429. /package/{dist/crossbrowser.d.ts → crossbrowser.d.ts} +0 -0
  430. /package/{dist/dashdone.d.ts → dashdone.d.ts} +0 -0
  431. /package/{dist/deno.d.ts → deno.d.ts} +0 -0
  432. /package/{dist/hardening.d.ts → hardening.d.ts} +0 -0
  433. /package/{dist/headless.d.ts → headless.d.ts} +0 -0
  434. /package/{dist/http.d.ts → http.d.ts} +0 -0
  435. /package/{dist/index.d.ts → index.d.ts} +0 -0
  436. /package/{dist/mcp.d.ts → mcp.d.ts} +0 -0
  437. /package/{dist/memory.d.ts → memory.d.ts} +0 -0
  438. /package/{dist/node.d.ts → node.d.ts} +0 -0
  439. /package/{dist/pack.d.ts → pack.d.ts} +0 -0
  440. /package/{dist/policy.d.ts → policy.d.ts} +0 -0
  441. /package/{dist/progress.d.ts → progress.d.ts} +0 -0
  442. /package/{dist/protocol.d.ts → protocol.d.ts} +0 -0
  443. /package/{dist/server.d.ts → server.d.ts} +0 -0
  444. /package/{dist/umd.d.ts → umd.d.ts} +0 -0
@@ -1,637 +0,0 @@
1
- /**
2
- * @file constants.ts
3
- * @module provider/constants
4
- * @description
5
- * Merged constants module — v2.1.2 base (strict superset) with every unique
6
- * export from the v1.0.0 constants module ported on top. Nothing dropped.
7
- *
8
- * Third-person observer view: the library observes real traffic from the
9
- * Antigravity IDE, Gemini CLI, OmniRoute, 9router and pi-antigravity-auth
10
- * and reproduces its fingerprint without executing Antigravity.
11
- *
12
- * The V2 correction addresses the opencode.txt timeline gap: models released
13
- * up to 25/08/2026 were missing and Project ID bypass was not fully
14
- * Gemini CLI-like.
15
- *
16
- * - Plugin: the merged provider lineage 2.1.2 (ONDA 5 V2)
17
- * - Replaces the upstream research lineage which failed due to an outdated UA
18
- * (1.11.5 -> "This version of Antigravity is no longer supported")
19
- * and missing 2026 models.
20
- * - Must work WITHOUT the localhost v1 base-url proxy, straight to
21
- * cloudcode-pa.googleapis.com via endpoint cascade with retry 403/404/5xx.
22
- * - Project ID bypass behaves EXACTLY like Gemini CLI would:
23
- * 1) try loadCodeAssist without projectId -> server returns the existing
24
- * cloudaicompanionProject
25
- * 2) if null -> onboardUser FREE tier -> long-running operation polling
26
- * 3) loadCodeAssist again -> provisioned projectId
27
- * 4) fetchAvailableModels as best-effort validation
28
- * 5) blinded rising-fact-p41fc fallback only if every endpoint fails
29
- * Implemented references: pi-antigravity-auth (loadCodeAssist parsing),
30
- * OmniRoute/9router (header stripping, prod-first cascade).
31
- *
32
- * Model timeline complete up to 25/08/2026:
33
- * - Gemini 3.6 Flash family (high/medium/low/tiered/base)
34
- * - Gemini 3.5 Flash family (high/medium/base/lite/lite-preview)
35
- * - Gemini 3.1 Pro family (high/low/base + flash-image + flash-lite)
36
- * - Gemini 3 family (flash, pro, deep-think)
37
- * - Gemini 2.5 family (pro, flash, flash-lite)
38
- * - Claude 4.6 thinking (opus + sonnet), Claude 4.5 legacy
39
- * - gpt-oss-120b medium/high
40
- * - Preview models: gemini-3-pro-preview, flash-preview, 3.1-pro-preview, customtools
41
- *
42
- * Merge notes (conflict resolutions):
43
- * - ANTIGRAVITY_ENDPOINTS : kept from v2 (cascade URL array); the v1
44
- * versioned-base object is exported as ANTIGRAVITY_ENDPOINT_SET.
45
- * - CODE_ASSIST_ENDPOINTS : kept from v2 (PROD/DAILY/SANDBOX/AUTOPUSH URL
46
- * map); the v1 v1internal path map is exported as CODE_ASSIST_PATH_MAP.
47
- * - CONSTANTS : kept from v2; the v1 compatibility barrel is
48
- * exported as CONSTANTS_V1 (also provided as the module default export).
49
- * - FALLBACK_PROJECT_ID : identical value in both versions; single v2
50
- * definition retained.
51
- *
52
- * Runtime constraint: only node:* builtins + global fetch (Node >=18).
53
- * Library-first, root-first: no /src, no folder inside folder.
54
- *
55
- * @author devthink
56
- * @license MIT
57
- * @version 2.1.2 — ONDA 5 CORRECTION V2 26/08/2026
58
- */
59
- export declare const ANTIGRAVITY_VERSION_FALLBACK: "1.19.2";
60
- export declare const ANTIGRAVITY_VERSION_MIN_SUPPORTED: "1.15.8";
61
- export declare const ANTIGRAVITY_BLOCKED_VERSIONS: readonly ["1.11.5", "1.12.0", "1.12.3", "1.13.2"];
62
- export declare const ANTIGRAVITY_VERSION_REMOTE_URLS: readonly ["https://registry.npmjs.org/antigravity/latest", "https://api.github.com/repos/google/antigravity/releases/latest", "https://storage.googleapis.com/antigravity-version/version.json"];
63
- export declare const VERSION_FETCH_TIMEOUT_MS: 5000;
64
- export declare const ANTIGRAVITY_USER_AGENT_FALLBACK: string;
65
- export declare const ANTIGRAVITY_USER_AGENT: string;
66
- export declare const GEMINI_CLI_USER_AGENT_FALLBACK: string;
67
- /**
68
- * The 2.0.0 GPN:GeminiCLI User-Agent of the provider lineage (auth.ts / oauth(2).ts lineage).
69
- * Distinct from ANTIGRAVITY_USER_AGENT (the antigravity/{version} identity):
70
- * this is the legacy presentation string of the lineage, exported for callers
71
- * that need to present it; it is not part of the live bypass chains.
72
- */
73
- export declare const ANTIGRAVITY_USER_AGENT_MAENE: "devthink/2.0.0 (GPN:GeminiCLI) Node.js/22 (+https://github.com/wenathlan/devthink)";
74
- /**
75
- * Exact User-Agent sent by Gemini CLI 0.57.0 against gemini-3-pro-preview —
76
- * the live-validated request.ts/streaming.ts variant and the canonical of
77
- * the GEMINI_CLI_USER_AGENT family (v2.1.15 Phase B).
78
- */
79
- export declare const GEMINI_CLI_USER_AGENT: "GeminiCLI/0.57.0/gemini-3-pro-preview (linux; x64; GitHub) google-api-nodejs-client/9.15.1";
80
- /**
81
- * Minimal Gemini CLI UA snapshot (former project.ts local variant; consumed
82
- * by accounts.ts). Distinct value from GEMINI_CLI_USER_AGENT (no model,
83
- * platform or client suffix) — one name, one meaning.
84
- */
85
- export declare const GEMINI_CLI_USER_AGENT_MINIMAL: "GeminiCLI/0.57.0";
86
- /**
87
- * Gemini CLI UA WITHOUT the model segment (recovery.ts lineage). Distinct
88
- * value from {@link GEMINI_CLI_USER_AGENT}: recovery presents the plain
89
- * platform UA, so the accurate split keeps both historical strings.
90
- */
91
- export declare const GEMINI_CLI_USER_AGENT_PLAIN: "GeminiCLI/0.57.0 (linux; x64; GitHub) google-api-nodejs-client/9.15.1";
92
- export declare const ANTIGRAVITY_CLIENT_ID: string;
93
- export declare const ANTIGRAVITY_CLIENT_SECRET: string;
94
- export declare const ANTIGRAVITY_CLIENT_ID_IS_BLINDED: true;
95
- export declare const ANTIGRAVITY_CLIENT_SECRET_IS_BLINDED: true;
96
- /**
97
- * Secondary Antigravity client id fallback (former quota.ts local; assembled
98
- * at runtime from segments). Raw value owner.
99
- */
100
- export declare const ANTIGRAVITY_CLIENT_ID_FALLBACK_SECONDARY: string;
101
- export declare const HEADER_X_GOOG_API_CLIENT: "X-Goog-Api-Client";
102
- export declare const HEADER_CLIENT_METADATA: "Client-Metadata";
103
- export declare const HEADER_USER_AGENT: "User-Agent";
104
- export declare const HEADER_X_GOOG_USER_PROJECT: "x-goog-user-project";
105
- export declare const HEADER_X_GOOG_QUOTA_USER: "X-Goog-QuotaUser";
106
- export declare const HEADER_X_CLIENT_DEVICE_ID: "X-Client-Device-Id";
107
- export declare const HEADERS_TO_STRIP: readonly ["x-goog-user-project", "X-Goog-QuotaUser", "X-Client-Device-Id"];
108
- /**
109
- * Base forbidden-header list (5 entries) stripped case-insensitively on
110
- * content requests — the live-validated request.ts variant. Canonical of
111
- * the FORBIDDEN_HEADERS family (v2.1.15 Phase B: plugin.ts's identical copy
112
- * deleted; models.ts's 6-entry strict variant lives below under its own
113
- * accurate name).
114
- */
115
- export declare const FORBIDDEN_HEADERS: readonly ["x-goog-user-project", "x-goog-quotatuser", "x-goog-quota-user", "x-client-device-id", "x-goog-request-reason"];
116
- /**
117
- * Strict forbidden-header list (6 entries) — the base list plus
118
- * "x-goog-api-client". This is the models.ts lineage used by the strict
119
- * stripper (strip functions themselves are owned by request.ts in Phase D).
120
- */
121
- export declare const FORBIDDEN_HEADERS_STRICT: readonly ["x-goog-user-project", "x-goog-quotatuser", "x-goog-quota-user", "x-client-device-id", "x-goog-request-reason", "x-goog-api-client"];
122
- /**
123
- * Antigravity Client-Metadata raw template (quota.ts lineage — the 4-key
124
- * superset; the former 2-key constants.ts variant is subsumed). The
125
- * buildClientMetadata FUNCTION lives in fingerprint.ts and imports this.
126
- */
127
- export declare const ANTIGRAVITY_CLIENT_METADATA_TEMPLATE: {
128
- readonly ideType: "ANTIGRAVITY";
129
- readonly platform: "PLATFORM_UNSPECIFIED";
130
- readonly pluginType: "GEMINI";
131
- readonly pluginVersion: "2.1.14";
132
- };
133
- /**
134
- * Client-Metadata raw object — the Gemini CLI bypass metadata triple
135
- * (config.ts / project.ts / request.ts lineage). The dynamic ANTIGRAVITY-style
136
- * metadata string is built by fingerprint.ts's buildClientMetadata.
137
- */
138
- export declare const CLIENT_METADATA: {
139
- readonly ideType: "IDE_UNSPECIFIED";
140
- readonly platform: "PLATFORM_UNSPECIFIED";
141
- readonly pluginType: "GEMINI";
142
- };
143
- /**
144
- * Client-Metadata serialized as the header string / payload used by the
145
- * Gemini CLI bypass (config.ts / project.ts / quota.ts / request.ts lineage).
146
- */
147
- export declare const CLIENT_METADATA_STRING: "ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI";
148
- /** Historical alias of {@link CLIENT_METADATA_STRING} (request.ts/streaming.ts lineage). */
149
- export declare const CLIENT_METADATA_RAW: "ideType=IDE_UNSPECIFIED,platform=PLATFORM_UNSPECIFIED,pluginType=GEMINI";
150
- export declare const ANTIGRAVITY_ENDPOINTS: readonly ["https://cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com"];
151
- export declare const ANTIGRAVITY_ENDPOINT_FALLBACKS: readonly ["https://cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com"];
152
- /**
153
- * Raw Cloud Code Assist host map (layer-0 raw values, v2.1.15 Phase A).
154
- * The family names CODE_ASSIST_ENDPOINTS (host-map semantic) and
155
- * ENDPOINT_ORDER / ENDPOINT_ORDER_GEMINI_CLI / ENDPOINT_ORDER_ANTIGRAVITY
156
- * (per-family routing orders) are owned by models.ts, which derives them
157
- * from this map. The former local DAILY_SANDBOX key (value identical to
158
- * SANDBOX) had zero consumers and was dropped in the merge.
159
- */
160
- export declare const ENDPOINTS: {
161
- readonly PROD: "https://cloudcode-pa.googleapis.com";
162
- readonly DAILY: "https://daily-cloudcode-pa.googleapis.com";
163
- readonly SANDBOX: "https://daily-cloudcode-pa.sandbox.googleapis.com";
164
- readonly AUTOPUSH: "https://autopush-cloudcode-pa.sandbox.googleapis.com";
165
- };
166
- /**
167
- * Cloud Code Assist PA base URL — canonical of the CLOUDCODE_BASE_URL family
168
- * (v2.1.15 Phase B: accounts.ts, config.ts and fingerprint.ts locals
169
- * deleted). The alias names below keep every historical surface resolvable
170
- * while the string itself has exactly one definition.
171
- */
172
- export declare const CLOUDCODE_BASE_URL: "https://cloudcode-pa.googleapis.com";
173
- /** Alias of {@link CLOUDCODE_BASE_URL} (auth.ts / quota.ts lineage). */
174
- export declare const CLOUDCODE_BASE: "https://cloudcode-pa.googleapis.com";
175
- /** Alias of {@link CLOUDCODE_BASE_URL} (request.ts / streaming.ts lineage). */
176
- export declare const CLOUDCODE_PA_BASE: "https://cloudcode-pa.googleapis.com";
177
- /** Daily (canary) Cloud Code Assist base URL (quota.ts / request.ts lineage). */
178
- export declare const CLOUDCODE_DAILY_BASE: "https://daily-cloudcode-pa.googleapis.com";
179
- /**
180
- * Base URL for the Cloud Code Assist PaaS API (v1internal — undocumented).
181
- * v2.1.16: relocated above its dependents so every v1internal method-path
182
- * constant below derives from {@link CODE_ASSIST_PATH_MAP} (zero duplicated
183
- * path strings in this module).
184
- */
185
- export declare const CODE_ASSIST_BASE_URL: "https://cloudcode-pa.googleapis.com";
186
- /**
187
- * Canonical v1internal method-path map — the single owner of every
188
- * "/v1internal:*" path literal in this module (v2.1.16 internal-dedup: the
189
- * standalone *_ENDPOINT constants, the CLOUDCODE_ENDPOINTS URL joins and the
190
- * versioned daily-v1internal block all derive from these entries).
191
- */
192
- export declare const CODE_ASSIST_PATH_MAP: {
193
- /** Loads project and onboarding status */
194
- readonly LOAD_CODE_ASSIST: "/v1internal:loadCodeAssist";
195
- /** Onboards a user into a Cloud project */
196
- readonly ONBOARD_USER: "/v1internal:onboardUser";
197
- /** Lists models available to the account */
198
- readonly FETCH_AVAILABLE_MODELS: "/v1internal:fetchAvailableModels";
199
- /** Synchronous generation */
200
- readonly GENERATE_CONTENT: "/v1internal:generateContent";
201
- /** Streaming SSE generation */
202
- readonly STREAM_GENERATE_CONTENT: "/v1internal:streamGenerateContent";
203
- /** Quota / limits per model */
204
- readonly RETRIEVE_USER_QUOTA: "/v1internal:retrieveUserQuotaSummary";
205
- /** Compat alias: quota summary */
206
- readonly RETRIEVE_USER_QUOTA_SUMMARY: "/v1internal:retrieveUserQuotaSummary";
207
- };
208
- /** Union type of the v1 paths. */
209
- export type CodeAssistEndpointPath = (typeof CODE_ASSIST_PATH_MAP)[keyof typeof CODE_ASSIST_PATH_MAP];
210
- /**
211
- * Helper to build a full Code Assist URL.
212
- * @param endpoint - path from CODE_ASSIST_PATH_MAP
213
- */
214
- export declare function buildCodeAssistUrl(endpoint: CodeAssistEndpointPath): string;
215
- /**
216
- * Cloud Code Assist full endpoint map — canonical of the CLOUDCODE_ENDPOINTS
217
- * family (v2.1.15 Phase B: accounts.ts, auth.ts and config.ts locals
218
- * deleted). The config.ts lineage shape (base + the six v1internal method
219
- * URLs) is the most complete superset; every consumer reads the method keys.
220
- * v2.1.16: method URLs derive from {@link CODE_ASSIST_PATH_MAP}.
221
- */
222
- export declare const CLOUDCODE_ENDPOINTS: {
223
- readonly base: "https://cloudcode-pa.googleapis.com";
224
- /** Loads the Cloud Code project and binds the license */
225
- readonly loadCodeAssist: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist";
226
- /** Initial user onboarding */
227
- readonly onboardUser: "https://cloudcode-pa.googleapis.com/v1internal:onboardUser";
228
- /** Lists models available to the user */
229
- readonly fetchAvailableModels: "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels";
230
- /** Non-streaming generation */
231
- readonly generateContent: "https://cloudcode-pa.googleapis.com/v1internal:generateContent";
232
- /** Streaming SSE generation */
233
- readonly streamGenerateContent: "https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent";
234
- /** Per-model quota summary */
235
- readonly retrieveUserQuotaSummary: "https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary";
236
- };
237
- export declare const GEMINI_CLI_ENDPOINT: "https://cloudcode-pa.googleapis.com";
238
- export declare const CLOUDAI_COMPANION_ENDPOINT: "https://cloudaicompanion.googleapis.com";
239
- export declare const CLOUDAI_COMPANION: "https://cloudaicompanion.googleapis.com";
240
- export declare const CLOUDAICOMPANION_ENDPOINT: "https://cloudaicompanion.googleapis.com";
241
- export declare const QUOTA_ENDPOINT: "/v1internal:retrieveUserQuotaSummary";
242
- export declare const QUOTA_ENDPOINT_V1: "/v1internal:retrieveUserQuotaSummary";
243
- export declare const MODELS_ENDPOINT: "/v1internal:fetchAvailableModels";
244
- export declare const MODELS_ENDPOINT_FULL: "/v1internal:fetchAvailableModels";
245
- export declare const ONBOARD_USER_ENDPOINT: "/v1internal:onboardUser";
246
- export declare const LOAD_CODE_ASSIST_ENDPOINT: "/v1internal:loadCodeAssist";
247
- export declare const STREAM_GENERATE_ENDPOINT: "/v1internal:streamGenerateContent";
248
- export declare const GENERATE_CONTENT_ENDPOINT: "/v1internal:generateContent";
249
- /** No CODE_ASSIST_PATH_MAP entry exists for this legacy path (zero consumers) — kept as its single literal definition. */
250
- export declare const RESOLVE_PROJECT_ENDPOINT: "/v1internal:resolveProjectId";
251
- export declare const FETCH_AVAILABLE_MODELS_METHOD: "fetchAvailableModels";
252
- /**
253
- * Linear-time trailing-slash strip (regex-free; safe on uncontrolled input —
254
- * the former /\/+$/.replace was polynomial and flagged as ReDoS-prone).
255
- */
256
- export declare function stripTrailingSlashes(value: string): string;
257
- export declare function buildCloudCodeUrl(base: string, path: string): string;
258
- export declare const PROJECT_FALLBACK: "rising-fact-p41fc";
259
- export declare const PROJECT_ID_FALLBACK: "rising-fact-p41fc";
260
- export declare const PROJECT_NAME_FALLBACK: string;
261
- export declare const PROJECT_NUMBER_FALLBACK: "1071006060591";
262
- export declare const FALLBACK_PROJECT_ID: "rising-fact-p41fc";
263
- export declare const GEMINI_CLI_PROJECT_RESOLUTION: {
264
- readonly metadata: {
265
- readonly ideType: "ANTIGRAVITY";
266
- readonly platform: "PLATFORM_UNSPECIFIED";
267
- readonly pluginType: "GEMINI";
268
- };
269
- readonly tierId: "FREE";
270
- readonly retryableStatuses: readonly [403, 404, 408, 429, 500, 502, 503, 504];
271
- readonly nonRetryableStatuses: readonly [400, 401];
272
- readonly fallbackProjectId: "rising-fact-p41fc";
273
- readonly loadCodeAssistBodyWithoutProject: {
274
- readonly metadata: {
275
- readonly ideType: "ANTIGRAVITY";
276
- readonly platform: "PLATFORM_UNSPECIFIED";
277
- readonly pluginType: "GEMINI";
278
- };
279
- };
280
- readonly onboardUserBody: {
281
- readonly tierId: "FREE";
282
- readonly metadata: {
283
- readonly ideType: "ANTIGRAVITY";
284
- readonly platform: "PLATFORM_UNSPECIFIED";
285
- readonly pluginType: "GEMINI";
286
- };
287
- };
288
- };
289
- export declare const PROJECT_RESOLUTION_STRATEGY: {
290
- readonly metadata: {
291
- readonly ideType: "ANTIGRAVITY";
292
- readonly platform: "PLATFORM_UNSPECIFIED";
293
- readonly pluginType: "GEMINI";
294
- };
295
- readonly tierId: "FREE";
296
- readonly retryableStatuses: readonly [403, 404, 408, 429, 500, 502, 503, 504];
297
- readonly nonRetryableStatuses: readonly [400, 401];
298
- readonly fallbackProjectId: "rising-fact-p41fc";
299
- readonly loadCodeAssistBodyWithoutProject: {
300
- readonly metadata: {
301
- readonly ideType: "ANTIGRAVITY";
302
- readonly platform: "PLATFORM_UNSPECIFIED";
303
- readonly pluginType: "GEMINI";
304
- };
305
- };
306
- readonly onboardUserBody: {
307
- readonly tierId: "FREE";
308
- readonly metadata: {
309
- readonly ideType: "ANTIGRAVITY";
310
- readonly platform: "PLATFORM_UNSPECIFIED";
311
- readonly pluginType: "GEMINI";
312
- };
313
- };
314
- };
315
- export type QuotaGroup = "antigravity" | "gemini-cli" | "cloudaicompanion";
316
- export declare const OAUTH_AUTH_URL: "https://accounts.google.com/o/oauth2/v2/auth";
317
- export declare const OAUTH_TOKEN_URL: "https://oauth2.googleapis.com/token";
318
- export declare const OAUTH_USERINFO_URL: "https://www.googleapis.com/oauth2/v2/userinfo";
319
- /**
320
- * v3 userinfo endpoint (former accounts.ts local variant; the v2 URL above
321
- * is the canonical gemini-cli lineage). Distinct value — one name, one meaning.
322
- */
323
- export declare const OAUTH_USERINFO_URL_V3: "https://www.googleapis.com/oauth2/v3/userinfo";
324
- export declare const OAUTH_REVOKE_URL: "https://oauth2.googleapis.com/revoke";
325
- export declare const OAUTH_SCOPES: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/cclog", "https://www.googleapis.com/auth/experimentsandconfigs"];
326
- export declare const OAUTH_SCOPES_STRING: string;
327
- export declare const PKCE_VERIFIER_LENGTH: 128;
328
- export declare const PKCE_CODE_CHALLENGE_METHOD: "S256";
329
- export declare const OAUTH_CALLBACK_HOST: "127.0.0.1";
330
- export declare const OAUTH_CALLBACK_PATH: "/callback";
331
- export declare const OAUTH_STATE_LENGTH: 32;
332
- export declare const OAUTH_PORT_RANGE: {
333
- readonly min: 10000;
334
- readonly max: 60000;
335
- };
336
- export declare const DEFAULT_TIMEOUT_MS: 10000;
337
- export declare const CONTENT_TIMEOUT_MS: 60000;
338
- export declare const PROJECT_RESOLVE_TIMEOUT_MS: 10000;
339
- export declare const QUOTA_TIMEOUT_MS: 15000;
340
- export declare const TOKEN_REFRESH_TIMEOUT_MS: 10000;
341
- export declare const ONBOARD_TIMEOUT_MS: 15000;
342
- /**
343
- * Default control-plane fetch timeout (models.ts lineage — canonical of the
344
- * FETCH_TIMEOUT_MS family; search.ts's 60s content semantic stays local as
345
- * SEARCH_TIMEOUT_MS and version.ts passes VERSION_FETCH_TIMEOUT_MS (5s)
346
- * explicitly at its call sites).
347
- */
348
- export declare const FETCH_TIMEOUT_MS: 10000;
349
- export declare const JITTER_MIN_MS: 0;
350
- export declare const JITTER_MAX_MS: 80;
351
- export declare const BACKOFF_BASE_MS: 250;
352
- export declare const BACKOFF_MAX_MS: 10000;
353
- export declare const BACKOFF_FACTOR: 2;
354
- export declare const MAX_RETRIES: 3;
355
- export declare const RETRYABLE_STATUS_CODES: readonly [403, 404, 408, 429, 500, 502, 503, 504];
356
- export declare const RETRYABLE_ERROR_CODES: readonly ["403", "404", "5xx"];
357
- export declare const QUOTA_CACHE_TTL_MS: number;
358
- export declare const QUOTA_CACHE_TTL_MIN_MS: number;
359
- /**
360
- * Quota cache TTL ceiling — canonical is the quota.ts lineage value (30 min;
361
- * the former 10 min constants.ts variant had zero consumers). quota.ts's
362
- * resilient-layer 10 min max stays local there under its own accurate name.
363
- */
364
- export declare const QUOTA_CACHE_TTL_MAX_MS: number;
365
- export declare const QUOTA_SOFT_THRESHOLD: 0.9;
366
- /**
367
- * Quota hard-exhaustion threshold — canonical is the quota.ts lineage value
368
- * (98% used => 2% remaining => hard exhausted; the former 1.0 constants.ts
369
- * variant had zero consumers and was not exercised by the live chain).
370
- */
371
- export declare const QUOTA_HARD_THRESHOLD: 0.98;
372
- export declare const ACCOUNTS_FILE_NAME: "antigravity-accounts.json";
373
- export declare const ACCOUNTS_CONFIG_DIR: ".config/opencode";
374
- export declare const ACCOUNTS_FILE_MODE: 384;
375
- export declare const LRU_THINKING_CACHE_SIZE: 100;
376
- export declare const DEBUG_LOG_MAX_BYTES: number;
377
- export declare const DEBUG_LOG_RETENTION_DAYS: 7;
378
- export declare const DEBUG_BUFFER_TUI_LINES: 1000;
379
- export declare const MODALITIES_INPUT: readonly ["text", "image", "pdf"];
380
- export declare const GOOGLE_SEARCH_TOOL_NAME: "google_search";
381
- export declare const URL_CONTEXT_TOOL_NAME: "url_context";
382
- export declare const CONTEXT_WINDOW_ANTIGRAVITY: 1048576;
383
- export declare const OUTPUT_LIMIT_ANTIGRAVITY: 65535;
384
- /**
385
- * FNV-1a 32-bit constants (models.ts and request.ts locals deleted in
386
- * v2.1.15 Phase B; core.ts's fnv implementations keep their own inline
387
- * literals so core stays free of cross-module value coupling at the hash
388
- * primitive level).
389
- */
390
- export declare const FNV_OFFSET_BASIS: 2166136261;
391
- export declare const FNV_PRIME: 16777619;
392
- export declare const CONSTANTS: {
393
- readonly versionFallback: "1.19.2";
394
- readonly versionMinSupported: "1.15.8";
395
- readonly userAgentFallback: string;
396
- readonly clientId: string;
397
- readonly clientSecret: string;
398
- readonly endpoints: readonly ["https://cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com"];
399
- readonly endpointFallbacks: readonly ["https://cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.googleapis.com", "https://autopush-cloudcode-pa.sandbox.googleapis.com"];
400
- readonly codeAssistEndpoints: {
401
- readonly PROD: "https://cloudcode-pa.googleapis.com";
402
- readonly DAILY: "https://daily-cloudcode-pa.googleapis.com";
403
- readonly SANDBOX: "https://daily-cloudcode-pa.sandbox.googleapis.com";
404
- readonly AUTOPUSH: "https://autopush-cloudcode-pa.sandbox.googleapis.com";
405
- };
406
- readonly endpointOrder: readonly ["https://cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.googleapis.com", "https://daily-cloudcode-pa.sandbox.googleapis.com"];
407
- readonly geminiCliEndpoint: "https://cloudcode-pa.googleapis.com";
408
- readonly cloudaicompanion: "https://cloudaicompanion.googleapis.com";
409
- readonly quota: "/v1internal:retrieveUserQuotaSummary";
410
- readonly modelsEndpoint: "/v1internal:fetchAvailableModels";
411
- readonly projectFallback: "rising-fact-p41fc";
412
- readonly projectResolution: {
413
- readonly metadata: {
414
- readonly ideType: "ANTIGRAVITY";
415
- readonly platform: "PLATFORM_UNSPECIFIED";
416
- readonly pluginType: "GEMINI";
417
- };
418
- readonly tierId: "FREE";
419
- readonly retryableStatuses: readonly [403, 404, 408, 429, 500, 502, 503, 504];
420
- readonly nonRetryableStatuses: readonly [400, 401];
421
- readonly fallbackProjectId: "rising-fact-p41fc";
422
- readonly loadCodeAssistBodyWithoutProject: {
423
- readonly metadata: {
424
- readonly ideType: "ANTIGRAVITY";
425
- readonly platform: "PLATFORM_UNSPECIFIED";
426
- readonly pluginType: "GEMINI";
427
- };
428
- };
429
- readonly onboardUserBody: {
430
- readonly tierId: "FREE";
431
- readonly metadata: {
432
- readonly ideType: "ANTIGRAVITY";
433
- readonly platform: "PLATFORM_UNSPECIFIED";
434
- readonly pluginType: "GEMINI";
435
- };
436
- };
437
- };
438
- readonly scopes: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/cclog", "https://www.googleapis.com/auth/experimentsandconfigs"];
439
- };
440
- /**
441
- * Official Gemini CLI OAuth Client ID (Google Cloud SDK — public client used by the CLI).
442
- * @constant
443
- */
444
- export declare const GEMINI_CLI_OAUTH_CLIENT_ID: string;
445
- /**
446
- * Official Gemini CLI OAuth Client Secret.
447
- * @constant
448
- */
449
- export declare const GEMINI_CLI_OAUTH_CLIENT_SECRET: string;
450
- /** Scopes required by Gemini CLI / Cloud Code Assist. */
451
- export declare const GEMINI_CLI_SCOPES: readonly ["https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"];
452
- /** Scopes as a query string ready for OAuth. */
453
- export declare const GEMINI_CLI_SCOPES_JOINED: string;
454
- /**
455
- * Official Antigravity CLI (`agy`) OAuth client id — THE single owner of the
456
- * real (never the blinded decoy above) client pair. Env-overridable through
457
- * ANTIGRAVITY_CLIENT_ID / GOOGLE_CLIENT_ID; the fallback literal is assembled
458
- * from segments exactly like the `agy` binary embeds it. The grand merge
459
- * consolidation moved the owner from auth.ts into this layer-0 module so the
460
- * value never participates in an import cycle: auth.ts (the authentication
461
- * surface) and accounts.ts (the account store) both alias it while the module
462
- * graph stays legal under every evaluation order.
463
- */
464
- export declare const ANTIGRAVITY_CLI_OAUTH_CLIENT_ID: string;
465
- /**
466
- * Official Antigravity CLI (`agy`) OAuth client secret — the env-overridable
467
- * owner (ANTIGRAVITY_CLIENT_SECRET) of the real pair, paired with
468
- * {@link ANTIGRAVITY_CLI_OAUTH_CLIENT_ID}.
469
- */
470
- export declare const ANTIGRAVITY_CLI_OAUTH_CLIENT_SECRET: string;
471
- /** Google OAuth endpoints. */
472
- export declare const OAUTH_ENDPOINTS: {
473
- /** Authorization code URL */
474
- readonly AUTH: "https://accounts.google.com/o/oauth2/v2/auth";
475
- /** Token exchange */
476
- readonly TOKEN: "https://oauth2.googleapis.com/token";
477
- /** Userinfo OpenID Connect */
478
- readonly USERINFO: "https://www.googleapis.com/oauth2/v3/userinfo";
479
- /** Token info / introspect */
480
- readonly TOKENINFO: "https://oauth2.googleapis.com/tokeninfo";
481
- /** Revoke */
482
- readonly REVOKE: "https://oauth2.googleapis.com/revoke";
483
- };
484
- /**
485
- * Antigravity versioned endpoint bases (renamed from v1 ANTIGRAVITY_ENDPOINTS
486
- * to avoid collision with the v2 cascade URL array above).
487
- * Antigravity routes via cloudcode-pa but with different prefixes per version.
488
- */
489
- export declare const ANTIGRAVITY_ENDPOINT_SET: {
490
- /** v1 — legacy */
491
- readonly V1_BASE: "https://daily-cloudcode-pa.googleapis.com";
492
- /** v1internal current */
493
- readonly V1INTERNAL_BASE: "https://cloudcode-pa.googleapis.com";
494
- /** v1internal daily (canary) */
495
- readonly DAILY_V1INTERNAL_BASE: "https://daily-cloudcode-pa.googleapis.com";
496
- /** autodetect endpoint (resolves cloudcode client) */
497
- readonly AUTO_BASE: "https://cloudcode-pa.googleapis.com";
498
- };
499
- export declare const ANTIGRAVITY_VERSION_ENDPOINTS: {
500
- readonly v1: {
501
- readonly base: "https://daily-cloudcode-pa.googleapis.com";
502
- readonly load: "/v1:loadCodeAssist";
503
- readonly onboard: "/v1:onboardUser";
504
- };
505
- readonly v1internal: {
506
- readonly base: "https://cloudcode-pa.googleapis.com";
507
- readonly load: "/v1internal:loadCodeAssist";
508
- readonly onboard: "/v1internal:onboardUser";
509
- readonly fetchModels: "/v1internal:fetchAvailableModels";
510
- readonly generate: "/v1internal:generateContent";
511
- readonly streamGenerate: "/v1internal:streamGenerateContent";
512
- readonly quota: "/v1internal:retrieveUserQuotaSummary";
513
- };
514
- readonly "daily-v1internal": {
515
- readonly base: "https://daily-cloudcode-pa.googleapis.com";
516
- readonly load: "/v1internal:loadCodeAssist";
517
- readonly onboard: "/v1internal:onboardUser";
518
- readonly fetchModels: "/v1internal:fetchAvailableModels";
519
- readonly generate: "/v1internal:generateContent";
520
- readonly streamGenerate: "/v1internal:streamGenerateContent";
521
- readonly quota: "/v1internal:retrieveUserQuotaSummary";
522
- };
523
- };
524
- export type AntigravityVersion = keyof typeof ANTIGRAVITY_VERSION_ENDPOINTS;
525
- /** Public fallback Project ID list (seed candidates without billing). */
526
- export declare const PROJECT_ID_FALLBACKS: readonly ["rising-fact-p41fc", "rising-fact-p41fc-1", "unwritten-orb-463209-q6", "cloud-code-123456"];
527
- /**
528
- * Gemini CLI version pool — date-aware, consulted 2026-08-26 (npm
529
- * @google/gemini-cli latest = 0.57.0). Canonical of the pool family
530
- * (v2.1.15 Phase B): the fingerprint.ts 8-entry telemetry superset —
531
- * strictly grows the former 6-entry constants variant.
532
- */
533
- export declare const GEMINI_CLI_VERSION_POOL: readonly ["0.57.0", "0.56.0", "0.55.1", "0.54.0", "0.53.0", "0.52.0", "0.51.2", "0.50.0"];
534
- export declare const CURRENT_GEMINI_CLI_VERSION: "0.57.0";
535
- /** google-api-nodejs-client version pool. */
536
- export declare const GAPI_CLIENT_VERSION_POOL: readonly ["9.15.1", "9.14.0", "9.15.0", "9.13.0"];
537
- export declare const CURRENT_GAPI_CLIENT_VERSION: "9.15.1";
538
- /**
539
- * Node.js gl-node version pool for X-Goog-Api-Client anti-ban rotation —
540
- * canonical of the pool family (v2.1.15 Phase B): the fingerprint.ts
541
- * telemetry lineage (real Node LTS values); fingerprint.ts imports this.
542
- */
543
- export declare const GL_NODE_VERSION_POOL: readonly ["22.19.0", "22.16.0", "22.14.0", "20.19.3", "20.18.1", "20.17.0", "20.11.0", "18.20.4"];
544
- export declare const CURRENT_GL_NODE_VERSION: "22.19.0";
545
- /**
546
- * Antigravity CLI (`agy`) version pool from the official update manifest
547
- * (2026-08-26) — canonical of the pool family (v2.1.15 Phase B: identical
548
- * 5-entry values merged from auth.ts and fingerprint.ts).
549
- */
550
- export declare const ANTIGRAVITY_CLI_VERSION_POOL: readonly ["1.1.21", "1.1.20", "1.1.19", "1.1.18", "1.1.17"];
551
- export type SupportedPlatform = "linux" | "darwin" | "win32";
552
- export type SupportedArch = "x64" | "arm64" | "arm";
553
- export declare const PLATFORM_POOL: readonly SupportedPlatform[];
554
- export declare const ARCH_POOL: readonly SupportedArch[];
555
- export declare const OS_VERSION_POOL: {
556
- readonly linux: readonly ["6.8.0-52-generic", "6.5.0-44-generic", "6.11.0-8-generic"];
557
- readonly darwin: readonly ["24.3.0", "24.2.0", "23.6.0", "24.4.0"];
558
- readonly win32: readonly ["10.0.26100", "10.0.22631", "10.0.19045"];
559
- };
560
- export declare const FINGERPRINT_IDE_TYPES: readonly ["IDE_UNSPECIFIED", "VSCODE", "INTELLIJ"];
561
- export declare const FINGERPRINT_PLATFORMS: readonly ["PLATFORM_UNSPECIFIED", "LINUX", "DARWIN", "WINDOWS"];
562
- export declare const FINGERPRINT_PLUGIN_TYPES: readonly ["GEMINI", "GEMINI_CLI"];
563
- export declare const FINGERPRINT_USER_AGENT_SOURCES: readonly ["GitHub", "npm"];
564
- export declare const SYSTEM_PROMPTS: {
565
- /** base prompt for code assist */
566
- readonly CODE_ASSIST_BASE: "You are Gemini, a highly capable AI coding assistant integrated into opencode via Antigravity auth.";
567
- /** prompt for user onboarding */
568
- readonly ONBOARDING: "Initialize Cloud Code Assist project onboarding for development workflow.";
569
- /** minimal prompt for quota queries */
570
- readonly QUOTA_QUERY: "quota_retrieve";
571
- /** safety prompt — preserves IDE behavior */
572
- readonly IDE_PRESERVE: "Respond as the integrated IDE code assistance. Maintain context awareness and file system access.";
573
- };
574
- /** Resolves the config base dir: process.env.OPENCODE_CONFIG_DIR or ~/.config/opencode/. */
575
- export declare function resolveOpenCodeBaseDir(): string;
576
- /** Resolves critical plugin file paths. */
577
- export declare const FILE_PATHS: {
578
- /** dynamic getter — avoids caching in tests */
579
- readonly baseDir: string;
580
- readonly authDir: string;
581
- readonly tokenFile: string;
582
- readonly credentialsFile: string;
583
- readonly projectFile: string;
584
- readonly configFile: string;
585
- readonly cacheDir: string;
586
- readonly quotaCacheFile: string;
587
- readonly modelsCacheFile: string;
588
- /** resolves a custom sub-path inside baseDir */
589
- readonly resolve: (...segments: string[]) => string;
590
- /**
591
- * Isolated credential directory — platform-agnostic and user-overridable.
592
- * Resolution order (NO hardcoded machine paths):
593
- * 1. MAENE_ISOLATED_DIR env (explicit user override)
594
- * 2. <baseDir>/auth (beside the rest of the provider state)
595
- */
596
- readonly isolatedDir: string;
597
- };
598
- export declare const VERSION_FALLBACK_CHAIN: readonly AntigravityVersion[];
599
- export declare const RETRY_POLICY: {
600
- readonly maxRetries: 3;
601
- readonly baseDelayMs: 500;
602
- readonly maxDelayMs: 5000;
603
- readonly jitter: true;
604
- readonly retryOn: readonly [429, 500, 502, 503, 504];
605
- };
606
- export declare const TIMEOUTS: {
607
- readonly OAUTH_MS: 15000;
608
- readonly LOAD_CODE_ASSIST_MS: 20000;
609
- readonly GENERATE_MS: 120000;
610
- readonly STREAM_MS: 300000;
611
- readonly QUOTA_MS: 10000;
612
- };
613
- export declare const PLUGIN_VERSION: "2.0.0";
614
- export declare const FINGERPRINT_POOLS: {
615
- readonly cliVersions: readonly ["0.57.0", "0.56.0", "0.55.1", "0.54.0", "0.53.0", "0.52.0", "0.51.2", "0.50.0"];
616
- readonly gapiVersions: readonly ["9.15.1", "9.14.0", "9.15.0", "9.13.0"];
617
- readonly nodeVersions: readonly ["22.19.0", "22.16.0", "22.14.0", "20.19.3", "20.18.1", "20.17.0", "20.11.0", "18.20.4"];
618
- readonly platforms: readonly SupportedPlatform[];
619
- readonly archs: readonly SupportedArch[];
620
- readonly osVersions: {
621
- readonly linux: readonly ["6.8.0-52-generic", "6.5.0-44-generic", "6.11.0-8-generic"];
622
- readonly darwin: readonly ["24.3.0", "24.2.0", "23.6.0", "24.4.0"];
623
- readonly win32: readonly ["10.0.26100", "10.0.22631", "10.0.19045"];
624
- };
625
- readonly ideTypes: readonly ["IDE_UNSPECIFIED", "VSCODE", "INTELLIJ"];
626
- readonly platformMetas: readonly ["PLATFORM_UNSPECIFIED", "LINUX", "DARWIN", "WINDOWS"];
627
- readonly pluginTypes: readonly ["GEMINI", "GEMINI_CLI"];
628
- /** random delay between requests to avoid rate-ban fingerprinting (ms) */
629
- readonly antiBanDelayMs: {
630
- readonly min: 80;
631
- readonly max: 350;
632
- };
633
- };
634
- /** Generates a randomized anti-ban delay. */
635
- export declare function getAntiBanDelayMs(): number;
636
- export default CONSTANTS;
637
- //# sourceMappingURL=constants.d.ts.map