@wenathlan/devthink 2.0.14 → 2.0.19

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 +60 -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
package/dist/agent.d.ts DELETED
@@ -1,837 +0,0 @@
1
- /** The agent module of the 1.1.88 consolidation: every correlated variation of the agent logic interned in this one file, so the module family carries one surface without duplicate variations. */
2
- import type { agentbudget, agentrecord, agentscope, agentrole, budgetstate, runrecord, taskqueue, toolnamespace, agentidentity, agentmailbox, agentmessage, messagerouting, comparisonrecord, consensusrecord, consensusvote, escalationrecord, replayrecord, reviewrecord, reviewverdict, callcontext, cancelframe, capabilityset, eventkind, jsonrpcframe, progressnotice, promptdef, protocoleventsubscription, resourcewatch, samplingrequest, streamchunk, aggregatecell, aggregaterecord, arbitrationcase, costentry, depthlimit, interleaveevent, lessonrecord, loadreport, spawnrecord, subagentspec, tasklane, agentevent, agenteventkind, agentusage, killswitch, spawnrequest, swarmstate, taskitem, workflowrun, actionrisk, blackboard, blackboardsection, conflictscan, conflictwriter, handoffrecord, mergeentry, mergerule, outputcomparison, resourcelock, resultreport, swarmaction, swarmcost } from "./types.js";
3
- /**
4
- * Agent fleet logic of the 1.1.72 family.
5
- * Every correlated rule for the fleet registry, the unique lowercase agent naming with its reserved words, the scope intersection that narrows the requested origins and action kinds to the session grants, the read only observer scope, the per agent budget grant from user configuration with its spending and refusal, the remaining budget report, the single agent pause that leaves the peers and their run records untouched, and the global killswitch that cancels every agent run and clears every queue in one call lives in this file.
6
- * The fleet never bypasses review: the scope keeps every step inside the session grants, every budget ceiling stays a user choice with no hardcoded cap, and the killswitch needs the user action because no agent ever triggers it.
7
- */
8
- /** The reserved fleet names no agent may take: the user, the operator, the human and the system identities stay outside the agent namespace. */
9
- export declare const reservedagentnames: ReadonlySet<string>;
10
- /** Assigns one fleet record with its unique lowercase name: the helper lowercases the user proposal, refuses names outside the lowercase identifier rule, reserved words and duplicates, and registers the record with its role and home origin before its first run. */
11
- export declare function agentname(input: {
12
- records: agentrecord[];
13
- id: string;
14
- proposed: string;
15
- role?: agentrole;
16
- origin: string;
17
- now: number;
18
- }): agentrecord;
19
- /** Intersects the requested scope with the session grants: the requested origins keep only the granted entries, the requested action kinds keep only the allowed catalog entries, an absent request stays unbounded inside the grants, and a request that lands entirely outside the grants refuses loudly instead of silently widening. */
20
- export declare function agentscopeof(input: {
21
- agentid: string;
22
- requested?: {
23
- origins?: string[];
24
- toolnamespaces?: toolnamespace[];
25
- actionkinds?: string[];
26
- };
27
- grants?: string[];
28
- allowedkinds?: string[];
29
- }): agentscope;
30
- /** Builds the read only scope of an observer agent: the observer reads the page and the fleet state through the read side kinds only and never acts on it. */
31
- export declare function readonlyscope(input: {
32
- agentid: string;
33
- readkinds: string[];
34
- }): agentscope;
35
- /** Grants one per agent budget from user configuration: the ceilings copy the user values with no hardcoded cap and the fresh budgetstate starts at zero spent. */
36
- export declare function agentbudgetof(input: {
37
- agentid: string;
38
- maxsteps?: number;
39
- maxtokens?: number;
40
- maxdurationms?: number;
41
- currency?: string;
42
- now: number;
43
- }): {
44
- budget: agentbudget;
45
- state: budgetstate;
46
- };
47
- /** Spends one unit per executed step against the budget state: the spend adds its steps, tokens and duration, and a spend past a user configured ceiling refuses the execution until the user raises the ceiling or stops the agent. */
48
- export declare function spendbudget(input: {
49
- state: budgetstate;
50
- steps?: number;
51
- tokens?: number;
52
- durationms?: number;
53
- now: number;
54
- }): budgetstate;
55
- /** Reports the remaining budget of one agent: every ceiling the user configured reports its remaining value while an absent ceiling reports unbounded. */
56
- export declare function budgetremaining(state: budgetstate): {
57
- steps?: number;
58
- tokens?: number;
59
- durationms?: number;
60
- reason: string;
61
- };
62
- /** Pauses one agent of the fleet without stopping its peers: the pause holds only the named agent while every other record and every other run record stays exactly as it was. */
63
- export declare function pauseagent(input: {
64
- records: agentrecord[];
65
- agentid: string;
66
- now: number;
67
- }): agentrecord[];
68
- /** Resumes one paused agent of the fleet: the resume lifts only the named agent while the peers never changed. */
69
- export declare function unpauseagent(input: {
70
- records: agentrecord[];
71
- agentid: string;
72
- now: number;
73
- }): agentrecord[];
74
- /** Engages the global killswitch in one call: every fleet record stops, every agent run cancels, every queued item of every queue clears, and the return carries one stop entry per agent so the audit trail records each stopped agent. */
75
- export declare function engagekillswitch(input: {
76
- records: agentrecord[];
77
- runs: runrecord[];
78
- queues?: taskqueue[];
79
- reason?: string;
80
- now: number;
81
- }): {
82
- records: agentrecord[];
83
- runs: runrecord[];
84
- queues: taskqueue[];
85
- stopped: Array<{
86
- agentid: string;
87
- name: string;
88
- runs: string[];
89
- queued: number;
90
- }>;
91
- engagedat: number;
92
- reason: string;
93
- };
94
- /** Reads the fleet at a glance for the sidepanel and the protocol envelope: the records with their control states, the budget states, the open escalations and reviews and the timestamp of the last killswitch stop. */
95
- export declare function fleetoverview(input: {
96
- records: agentrecord[];
97
- budgets: budgetstate[];
98
- openescalations: number;
99
- openreviews: number;
100
- killswitchat?: number;
101
- }): {
102
- agents: number;
103
- active: number;
104
- paused: number;
105
- stopped: number;
106
- openescalations: number;
107
- openreviews: number;
108
- lastkillswitchat?: number;
109
- };
110
- /**
111
- * Agent mailbox logic of the 1.1.58 multi agent family.
112
- * Every correlated rule for the direct, broadcast and role addressed routing, the inbox and outbox records, the unread counters and the receive drain with ack tracking lives in this file.
113
- * The messages stay inside the swarm: a message that carries page content grades as an egress event in the audit trail, and no mailbox delivery ever bypasses a consent gate.
114
- */
115
- /** The broadcast recipient marker: a message addressed to it reaches every agent of the swarm but the sender. */
116
- export declare const broadcastrecipient = "*";
117
- /** Returns the mailbox of one agent; an agent without a mailbox yet reads an empty one. */
118
- export declare function mailboxof(mailboxes: agentmailbox[], agentid: string): agentmailbox;
119
- /** Returns every agent id of one role for the role addressed routing. */
120
- export declare function roleaddress(agents: agentidentity[], role: string): string[];
121
- /** Resolves the recipients of one message: a direct message names one agent, a broadcast reaches every live agent but the sender and a role message reaches every live agent of the role. */
122
- export declare function resolverecipients(input: {
123
- agents: agentidentity[];
124
- senderid: string;
125
- recipient: string;
126
- routing: messagerouting;
127
- }): string[];
128
- /** Delivers one message to the recipient inboxes: the sender outbox records it, the unread counters rise and the delivery stays visible to every reader of the swarm. */
129
- export declare function sendmessage(input: {
130
- mailboxes: agentmailbox[];
131
- agents: agentidentity[];
132
- id: string;
133
- senderid: string;
134
- recipient: string;
135
- routing: messagerouting;
136
- payload: string;
137
- now: number;
138
- }): agentmailbox[];
139
- /** Drains one inbox with ack tracking: every message receives its read time, the unread counter resets and the drain returns the read messages oldest first. */
140
- export declare function receivemessages(input: {
141
- mailboxes: agentmailbox[];
142
- agentid: string;
143
- now: number;
144
- }): {
145
- mailboxes: agentmailbox[];
146
- messages: agentmessage[];
147
- };
148
- /** Returns the unread count of one agent mailbox. */
149
- export declare function unreadcount(mailboxes: agentmailbox[], agentid: string): number;
150
- /**
151
- * Agent review logic of the 1.1.72 family.
152
- * Every correlated rule for the human escalation hold that blocks the raising agent until the user answers, the agent to agent review requests with the reviewer verdict recorded beside the original output, the runreplay capture of the ordered steps and results of one agent run with its reconstruction from the audit trail when the run memory is gone, the field by field outputcompare of two competing agent outputs and the consensusvote with one vote per agent, the user configured quorum rule and the dissenting votes kept for the audit trail lives in this file.
153
- * The review layer never touches the page and never bypasses a gate: an escalation stays human decided, a review request stays between two agents of the shared origin, a replay reads the records only and every vote counts exactly once.
154
- */
155
- /** Reads the escalation hold of one agent: an open escalation blocks its raising agent until the human answers, so the run of a blocked agent waits instead of guessing. */
156
- export declare function escalationblock(input: {
157
- escalations: escalationrecord[];
158
- agentid: string;
159
- }): {
160
- blocked: boolean;
161
- open: number;
162
- reason: string;
163
- };
164
- /** Sends one agent output to a peer agent for review: the review record carries the original output exactly as produced and waits open until the reviewing agent records its verdict. */
165
- export declare function reviewrecordof(input: {
166
- id: string;
167
- fromagentid: string;
168
- toagentid: string;
169
- subject: string;
170
- output: string;
171
- now: number;
172
- }): reviewrecord;
173
- /** Records the reviewer verdict beside the original output: the answered review keeps the verdict, the issues the reviewer named and the answer time while the original output stays untouched. */
174
- export declare function recordverdict(input: {
175
- records: reviewrecord[];
176
- id: string;
177
- reviewerid: string;
178
- verdict: reviewverdict;
179
- issues?: string[];
180
- now: number;
181
- }): reviewrecord;
182
- /** Captures one runreplay of an agent run: the ordered steps with their results and times freeze into one replay record the audit trail keeps per agent. */
183
- export declare function runreplay(input: {
184
- id: string;
185
- agentid: string;
186
- runid: string;
187
- steps: Array<{
188
- stepid: string;
189
- kind: string;
190
- summary: string;
191
- state: string;
192
- at: number;
193
- }>;
194
- now: number;
195
- }): replayrecord;
196
- /** Reconstructs one runreplay from the audit trail when the run memory is gone: the recorded events of the agent and its run order into the same replay shape a live capture produced, and the reconstruction marks itself. */
197
- export declare function reconstructreplay(input: {
198
- id: string;
199
- agentid: string;
200
- runid: string;
201
- events: Array<{
202
- id: string;
203
- kind: string;
204
- summary: string;
205
- at: number;
206
- agentid?: string;
207
- stepid?: string;
208
- planid?: string;
209
- }>;
210
- now: number;
211
- }): replayrecord;
212
- /** Aligns two competing agent outputs field by field: every field of both sides grades matching when the values agree, conflicting when they differ and missing when one side carries no value, so the user reads exactly where the agents disagree. */
213
- export declare function outputcompare(input: {
214
- id: string;
215
- subject: string;
216
- left: {
217
- agentid: string;
218
- fields: Record<string, string>;
219
- };
220
- right: {
221
- agentid: string;
222
- fields: Record<string, string>;
223
- };
224
- now: number;
225
- }): comparisonrecord;
226
- /** Collects one vote per agent on one proposal and computes the outcome by the user configured quorum rule: duplicate voters refuse, yes votes carry the proposal at the quorum, a complete round under the quorum fails it, an incomplete round stays open and every dissenting vote stays in the record for the audit trail. */
227
- export declare function consensusrecordof(input: {
228
- id: string;
229
- proposal: string;
230
- votes: Array<{
231
- agentid: string;
232
- vote: consensusvote;
233
- reason?: string;
234
- castat: number;
235
- }>;
236
- quorum: number;
237
- voters?: number;
238
- now: number;
239
- }): consensusrecord;
240
- /**
241
- * Agent stream of the 1.1.56 agent protocol part three.
242
- * Every subscription, resource, sampling, prompt, streaming, progress and cancellation concern lives in this file: the event subscriptions with their kinds and filters, the event notifications that push protocol events to matching subscribers, the resource watchers with their page state baselines and the page state deltas they deliver, the sampling callbacks that ask a client model for a completion behind its declared capabilities and the page content grant, the prompt defs exposed as callable tools with their template rendering, the stream chunks of progressive tool results, the progress notices of long tools with their cancel hints and the cancellation frames that abort an in flight tool call while preserving its partial result.
243
- * The stream stays pure and consent-first: a subscription never widens what the session grants, a sampling prompt never leaves the browser with ungranted page content and a cancellation never bypasses the audit trail.
244
- */
245
- /** The protocol event kinds a client may subscribe to; the callstarted kind mirrors every tool call including calls with side effects. */
246
- export declare const protocoleventkinds: eventkind[];
247
- /** The observation event kinds that stay read only: every kind except the callstarted mutation mirror. */
248
- export declare const readonlyeventkinds: eventkind[];
249
- /** Registers one client event subscription: the kinds validate against the protocol event kinds while an absent kinds list subscribes the read only observation kinds so a subscription never widens what the session grants. */
250
- export declare function subscriberegister(input: {
251
- clientid: string;
252
- kinds?: string[];
253
- origin?: string;
254
- tool?: string;
255
- now: number;
256
- id?: string;
257
- }): {
258
- subscription?: protocoleventsubscription;
259
- reason?: string;
260
- };
261
- /** Cancels one client event subscription; the record stays for the audit trail with its cancel time. */
262
- export declare function unsubscriberegister(subscriptions: protocoleventsubscription[], id: string, now: number): protocoleventsubscription[];
263
- /** Pushes one protocol event to every matching subscriber: active subscriptions whose kinds carry the event kind, whose origin filter matches when set and whose tool filter matches when set receive one notification frame; the delivery stamps the last delivery time. */
264
- export declare function notifyevent(input: {
265
- subscriptions: protocoleventsubscription[];
266
- kind: eventkind;
267
- origin?: string;
268
- tool?: string;
269
- payload?: Record<string, unknown>;
270
- now: number;
271
- }): {
272
- deliveries: Array<{
273
- subscriptionid: string;
274
- clientid: string;
275
- frame: jsonrpcframe;
276
- }>;
277
- subscriptions: protocoleventsubscription[];
278
- };
279
- /** Starts one page state watcher for a client: the resource names the watched page state and the baseline freezes the page state at watch time so later deltas compare against it. */
280
- export declare function watchresource(input: {
281
- clientid: string;
282
- resource: string;
283
- state?: Record<string, unknown>;
284
- now: number;
285
- id?: string;
286
- }): {
287
- watch?: resourcewatch;
288
- reason?: string;
289
- };
290
- /** Cancels one page state watcher; the record stays for the audit trail with its cancel time. */
291
- export declare function unwatchresource(watches: resourcewatch[], id: string, now: number): resourcewatch[];
292
- /** Pushes the page state deltas of one resource to its active watchers: every changed key against the baseline lands in the delta, the baseline absorbs the new state and the delivery stamps the last delivery time. */
293
- export declare function notifyresource(input: {
294
- watches: resourcewatch[];
295
- resource: string;
296
- state: Record<string, unknown>;
297
- now: number;
298
- }): {
299
- deliveries: Array<{
300
- watchid: string;
301
- clientid: string;
302
- delta: Record<string, unknown>;
303
- }>;
304
- watches: resourcewatch[];
305
- };
306
- /** Sends one sampling callback to a client model: the client must have declared its sampling capability, the page content stays stripped unless the user granted it and the request records its provenance for the round trip. */
307
- export declare function requestsampling(input: {
308
- clientid: string;
309
- capabilities?: capabilityset;
310
- prompt: string;
311
- system?: string;
312
- pagecontent?: string;
313
- pagegrant?: boolean;
314
- maxtokens?: number;
315
- now: number;
316
- id?: string;
317
- }): {
318
- request?: samplingrequest;
319
- reason?: string;
320
- };
321
- /** Completes one sampling round trip: the client answer closes the pending request with its provenance times while answered, refused and unknown requests stay untouched. */
322
- export declare function answersampling(input: {
323
- requests: samplingrequest[];
324
- id: string;
325
- answer?: string;
326
- refused?: boolean;
327
- now: number;
328
- }): {
329
- requests: samplingrequest[];
330
- request?: samplingrequest;
331
- reason?: string;
332
- };
333
- /** Lists the prompt defs the server exposes as callable tools: every prompt carries its name, description, declared arguments and render template. */
334
- export declare function listprompts(): promptdef[];
335
- /** Renders one prompt def with its arguments: every double braced placeholder substitutes its argument value while a required argument left empty keeps its placeholder so the review sees the gap. */
336
- export declare function renderprompt(prompt: promptdef, args: Record<string, unknown>): string;
337
- /** Calls one prompt: the render validates the declared arguments, substitutes the defaults the prompt reviewed and returns the rendered prompt with its arguments as one tool call the client dispatches behind the consent gates. */
338
- export declare function callprompt(input: {
339
- name: string;
340
- args?: Record<string, unknown>;
341
- now?: number;
342
- }): {
343
- toolcall?: {
344
- name: string;
345
- params: Record<string, unknown>;
346
- };
347
- rendered?: string;
348
- reason?: string;
349
- };
350
- /** Emits one stream chunk of a progressive tool result: the sequence number orders the chunks while the done marker closes the stream. */
351
- export declare function streamchunkof(input: {
352
- callid: string;
353
- seq: number;
354
- content: string;
355
- done?: boolean;
356
- now: number;
357
- }): streamchunk;
358
- /** Splits one tool result content into ordered stream chunks; the final chunk carries the done marker so the client reassembles the progressive result. */
359
- export declare function chunkcontent(input: {
360
- callid: string;
361
- content: string;
362
- size?: number;
363
- now: number;
364
- }): streamchunk[];
365
- /** Reassembles ordered stream chunks into the progressive result content they carry. */
366
- export declare function assemblechunks(chunks: streamchunk[]): string;
367
- /** Emits one progress notice of a long tool call: the percent, the plain language message and the cancel hint the panel renders. */
368
- export declare function notifyprogress(input: {
369
- callid: string;
370
- percent?: number;
371
- message: string;
372
- cancellable?: boolean;
373
- now: number;
374
- }): progressnotice;
375
- /** Builds one cancellation frame that aborts an in flight tool call: the call id and the reason in plain language. */
376
- export declare function cancelframeof(input: {
377
- callid: string;
378
- reason?: string;
379
- now: number;
380
- }): cancelframe;
381
- /** Aborts one in flight tool call on its cancellation frame: the call context turns cancelled with its end time while the partial result survives for the answer; a finished or unknown call reports why nothing aborted. */
382
- export declare function canceltool(input: {
383
- contexts: callcontext[];
384
- callid: string;
385
- reason?: string;
386
- partial?: callcontext["partial"];
387
- now: number;
388
- }): {
389
- contexts: callcontext[];
390
- context?: callcontext;
391
- reason?: string;
392
- };
393
- /**
394
- * Agent work logic of the 1.1.73 family.
395
- * Every correlated rule for the on demand sub agent spawning under the user configured depth limit with the parent scope copied into the child unless narrowed, the lineage depth computed from the spawn records, the aggregatereport that merges parallel agent outputs into one document with per agent sections, provenance and conflicts resolved by policy order or sent to escalation, the interleaved timeline that orders the actions of every agent into one merged view with the per agent lanes kept visible, the lessonshare that records reusable lessons of finished runs, serves the matching lessons to agents starting similar tasks and counts reuse while stale lessons decay, the arbitrate cases that open when two agents contest one resource and grant it to the first requester or the priority lane winner and release when the holder finishes, the prioritylane ranking that keeps sensitive steps in the interactive lane and prevents lane starvation through the round robin fallback, the scaleworkers load reports per origin with their spawn and pause suggestions that never act without consent, and the costshare ledger that attributes shared costs to the agents that caused them lives in this file.
396
- * The work layer never bypasses a gate: a spawn stays inside the parent scope, the depth ceiling stays the user's choice with no hardcoded number, an aggregation never rewrites the original outputs, a verdict never bypasses the sessionlock or the origin grants, a suggestion never spawns a worker without consent and every lesson sanitizes before storage.
397
- */
398
- /** Spawns one sub agent under its parent: the child registers with its unique lowercase name through the same agentname rule of the fleet, the spawn refuses a paused or stopped parent, the child depth sits exactly one level under the parent lineage depth, the parent scope copies into the child unless the spec narrows it, and a narrowing that widens past the parent refuses loudly. */
399
- export declare function spawnsubagent(input: {
400
- records: agentrecord[];
401
- spawns: spawnrecord[];
402
- spec: subagentspec;
403
- parentscope?: agentscope;
404
- id: string;
405
- name?: string;
406
- now: number;
407
- }): {
408
- record: agentrecord;
409
- scope: agentscope;
410
- spawn: spawnrecord;
411
- };
412
- /** Copies the parent scope into the child unless narrowed: a narrowing keeps only the parent origins and action kinds so the child scope stays a subset of its parent, and a narrowing that lands entirely outside the parent refuses instead of silently widening. */
413
- export declare function childscopeof(input: {
414
- agentid: string;
415
- parent?: agentscope;
416
- narrowed?: {
417
- origins?: string[];
418
- actionkinds?: string[];
419
- };
420
- }): agentscope;
421
- /** Computes the spawn depth of one agent lineage: the chain of spawn records from the agent up through its parents counts one level per spawn, an agent nobody spawned sits at depth zero, and a cycle in the lineage refuses instead of looping. */
422
- export declare function depthoflineage(input: {
423
- spawns: spawnrecord[];
424
- agentid: string;
425
- }): number;
426
- /** Checks one spawn depth against the user configured depth limit: the depth refuses past the configured ceiling while an absent limit stays unbounded because the ceiling stays the user's choice with no hardcoded number. */
427
- export declare function depthlimitof(input: {
428
- spawns: spawnrecord[];
429
- agentid: string;
430
- limit: depthlimit;
431
- }): {
432
- depth: number;
433
- allowed: boolean;
434
- reason: string;
435
- };
436
- /** Merges the parallel outputs of several agents into one aggregatereport: every agent keeps its own section with its run provenance, a section two agents wrote conflicts, a conflict resolves through the user configured policy order that names its agent precedence while a conflict without an order stays unresolved and the record stays open for the escalation. */
437
- export declare function aggregatereport(input: {
438
- id: string;
439
- subject: string;
440
- cells: aggregatecell[];
441
- conflictorder?: string[];
442
- expected?: string[];
443
- now: number;
444
- }): aggregaterecord;
445
- /** Orders the actions of different agents into one interleaved timeline: the events sort by their time and id across every agent while each event carries its lane so the merged view keeps every per agent lane visible inside the one stream. */
446
- export declare function interleave(input: {
447
- events: Array<{
448
- id?: string;
449
- agentid: string;
450
- kind: string;
451
- summary: string;
452
- at: number;
453
- lane?: string;
454
- }>;
455
- lanes: tasklane[];
456
- }): interleaveevent[];
457
- /** Records one reusable lesson of a finished run: the finding in plain language, the agent that found it and the origin it holds on, with the reuse count starting at zero until another agent serves it. */
458
- export declare function lessonrecordof(input: {
459
- id: string;
460
- agentid: string;
461
- finding: string;
462
- origin: string;
463
- now: number;
464
- }): lessonrecord;
465
- /** Serves the matching lessons to an agent starting a similar task: the lessons of the same origin match first, the findings that share words with the task follow, and the reuse count of every served lesson grows so the fleet reads which lessons carry their weight. */
466
- export declare function lessonmatches(input: {
467
- lessons: lessonrecord[];
468
- task: string;
469
- origin?: string;
470
- limit?: number;
471
- }): lessonrecord[];
472
- /** Counts one reuse of a served lesson: the reuse count grows by one and the last used time moves to now while the lessons nobody serves stay exactly as they were. */
473
- export declare function lessonreuse(input: {
474
- lessons: lessonrecord[];
475
- id: string;
476
- now: number;
477
- }): lessonrecord[];
478
- /** Decays the stale lessons: a lesson nobody reused for the whole user configured window retires from the serving list while the lessons still carrying reuse stay; an absent window keeps every lesson because the decay stays the user's choice. */
479
- export declare function lessondecay(input: {
480
- lessons: lessonrecord[];
481
- now: number;
482
- stalewindow?: number;
483
- }): lessonrecord[];
484
- /** Opens one arbitration case of a contested resource and grants its first verdict: the case needs at least two requesting agents because one requester contests nothing, the first requester holds the resource by default, a requester of a higher priority lane takes the grant over the first requester, and the verdict names its lane and its reason for the audit trail. */
485
- export declare function arbitrationcaseof(input: {
486
- id: string;
487
- resource: string;
488
- origin: string;
489
- requesters: string[];
490
- lanes: tasklane[];
491
- now: number;
492
- }): arbitrationcase;
493
- /** Releases the verdict of one arbitration case when its holder finishes: the release frees the resource for the next requester and closes the case while a release without the finished holder refuses. */
494
- export declare function releasecase(input: {
495
- cases: arbitrationcase[];
496
- id: string;
497
- holderfinished: boolean;
498
- now: number;
499
- }): arbitrationcase;
500
- /** Ranks the queued tasks by the user configured lane priority: the sensitive tasks stay in the interactive lane whatever lane asked for them, the interactive lane always serves first, and every further lane serves one task per round robin cycle in its priority order so no lane starves behind a busy higher priority lane. */
501
- export declare function prioritylaneof(input: {
502
- tasks: Array<{
503
- id: string;
504
- lane: string;
505
- priority?: number;
506
- sensitive?: boolean;
507
- enqueuedat: number;
508
- }>;
509
- lanes: tasklane[];
510
- }): Array<{
511
- id: string;
512
- lane: string;
513
- priority?: number;
514
- sensitive?: boolean;
515
- enqueuedat: number;
516
- }>;
517
- /** Builds one load report sample of an origin: the concurrency of the live workers and the latency of the waits freeze into one sample the scaleworkers pass reads. */
518
- export declare function loadreportof(input: {
519
- origin: string;
520
- concurrency: number;
521
- latency: number;
522
- now: number;
523
- }): loadreport;
524
- /** Reads the scaleworkers suggestions from the load reports: an origin whose load stays low suggests spawning one more worker, an origin whose latency passes the throttle threshold suggests pausing a worker, and every suggestion stays a suggestion because the spawn itself needs the user consent; absent thresholds hold the suggestions. */
525
- export declare function scalesuggestion(input: {
526
- reports: loadreport[];
527
- lowthreshold?: number;
528
- throttlethreshold?: number;
529
- }): Array<{
530
- origin: string;
531
- suggestion: "spawn" | "pause" | "hold";
532
- reason: string;
533
- }>;
534
- /** Builds one cost entry of the shared fleet ledger: the agent that caused the cost, the run it belongs to, the units it spent and the plain language description of what the units bought. */
535
- export declare function costentryof(input: {
536
- agentid: string;
537
- runid?: string;
538
- units: number;
539
- description: string;
540
- now: number;
541
- }): costentry;
542
- /** Splits the shared costs of the fleet ledger to the agents that caused them: a cost one agent caused attributes fully to it while a cost several agents share through the same description splits equally among its causers, and every agent reads its own share. */
543
- export declare function sharedcostsplit(input: {
544
- entries: costentry[];
545
- }): Array<{
546
- agentid: string;
547
- units: number;
548
- share: number;
549
- sharedwith?: string[];
550
- }>;
551
- /**
552
- * Multi agent lifecycle logic of the 1.1.58 family.
553
- * Every correlated rule for agent identities, roles, tab binding, sub agent spawning with depth limits, pause, resume, stop, the killswitch, per agent budgets and permission scopes, per agent usage and the swarm overview lives in this file.
554
- * The swarm never bypasses review: an agent claims queue tasks and proposes work through the same plan review a single agent passes, and the killswitch stays available with no configuration barrier.
555
- */
556
- /** The default tool namespaces of a role: planners compose and read, workers also act on the browser, critics review agent outputs read only, verifiers re-read the page to check claims and observers stay read only; a custom role grades with the worker defaults until the user narrows its scope. */
557
- export declare function roledefaults(role: agentrole): {
558
- toolnamespaces: toolnamespace[];
559
- description: string;
560
- };
561
- /** Registers one agent identity bound to a tab; the user names the agent for dashboards and audit, and one tab never holds two agents. */
562
- export declare function registeragent(input: {
563
- agents: agentidentity[];
564
- id: string;
565
- name: string;
566
- tabid?: number;
567
- sessionid?: string;
568
- role?: agentrole;
569
- now: number;
570
- }): agentidentity[];
571
- /** Attaches one role to a registered agent; the role carries its defaults and the change reads in the audit trail. */
572
- export declare function assignrole(input: {
573
- agents: agentidentity[];
574
- agentid: string;
575
- role: agentrole;
576
- now: number;
577
- }): agentidentity[];
578
- /** Binds one agent to one tab session; a tab bound to another live agent refuses the binding, so one tab runs one agent. */
579
- export declare function opentabagent(input: {
580
- agents: agentidentity[];
581
- agentid: string;
582
- tabid: number;
583
- sessionid?: string;
584
- now: number;
585
- }): agentidentity[];
586
- /** Spawns one sub agent under a spawn request; the child carries its parent, its depth and the requested role, and the spawn refuses recursion past the configured depth limit. */
587
- export declare function spawn(input: {
588
- agents: agentidentity[];
589
- request: spawnrequest;
590
- limit: depthlimit;
591
- id: string;
592
- name?: string;
593
- now: number;
594
- }): agentidentity[];
595
- /** Pauses one agent without stopping the others; a paused agent claims no task until its resume. */
596
- export declare function pauseone(input: {
597
- agents: agentidentity[];
598
- agentid: string;
599
- now: number;
600
- }): agentidentity[];
601
- /** Resumes one paused agent; the other agents never changed. */
602
- export declare function resumeone(input: {
603
- agents: agentidentity[];
604
- agentid: string;
605
- now: number;
606
- }): agentidentity[];
607
- /** Stops one agent; its claims release through the queue requeue pass. */
608
- export declare function stopone(input: {
609
- agents: agentidentity[];
610
- agentid: string;
611
- now: number;
612
- }): agentidentity[];
613
- /** Triggers the killswitch and cancels every agent run at once: every agent stops whatever it holds and the switch records why. */
614
- export declare function killall(input: {
615
- agents: agentidentity[];
616
- reason?: string;
617
- now: number;
618
- }): {
619
- agents: agentidentity[];
620
- killswitch: killswitch;
621
- };
622
- /** Disarms the killswitch so the user may register or resume agents again. */
623
- export declare function disarmkillswitch(now: number): killswitch;
624
- /** Checks one agent against its budget: a reached token, cost or step ceiling halts the agent until the user raises the ceiling; absent ceilings never halt. */
625
- export declare function agentbudgetcheck(input: {
626
- agent: agentidentity;
627
- usage: agentusage | undefined;
628
- }): {
629
- halted: boolean;
630
- reason?: string;
631
- };
632
- /** Checks one agent scope: an origin or a tool namespace outside the grant refuses, and an absent scope stays unbounded inside the session grants. */
633
- export declare function scopegate(input: {
634
- scope: agentscope | undefined;
635
- origin?: string;
636
- namespace?: toolnamespace;
637
- }): {
638
- allowed: boolean;
639
- reason?: string;
640
- };
641
- /** Refreshes one agent heartbeat so the panel and the queue read a live agent. */
642
- export declare function agentheartbeat(input: {
643
- agents: agentidentity[];
644
- agentid: string;
645
- now: number;
646
- }): agentidentity[];
647
- /** Accumulates one usage delta into the per agent usage counters held against the agent budget. */
648
- export declare function recordagentusage(input: {
649
- usage: agentusage | undefined;
650
- agentid: string;
651
- tokens?: number;
652
- cost?: number;
653
- steps?: number;
654
- now: number;
655
- }): agentusage;
656
- /** Builds one per agent run context that reuses the workflow engine: the run id carries the agent and the task so concurrent agent runs stay isolated through the same run records the workflow engine keeps. */
657
- export declare function agentruncontext(input: {
658
- agent: agentidentity;
659
- task: taskitem;
660
- now: number;
661
- }): {
662
- agentid: string;
663
- taskid: string;
664
- run: workflowrun;
665
- };
666
- /** Builds one agent lifecycle event notification for the protocol envelope and the audit trail. */
667
- export declare function agenteventof(input: {
668
- id: string;
669
- kind: agenteventkind;
670
- summary: string;
671
- agentid?: string;
672
- taskid?: string;
673
- now: number;
674
- }): agentevent;
675
- /** Returns the swarm at a glance: the agents with their live states, the tasks by claim state and the message counters. */
676
- export declare function swarmoverview(input: {
677
- agents: agentidentity[];
678
- queue: taskqueue;
679
- mailboxes: agentmailbox[];
680
- }): {
681
- agents: number;
682
- active: number;
683
- paused: number;
684
- stopped: number;
685
- tasks: number;
686
- queued: number;
687
- claimed: number;
688
- done: number;
689
- cancelled: number;
690
- messages: number;
691
- unread: number;
692
- };
693
- /** Reads the swarm state snapshot the protocol envelope and the panel render: the agents, the queue, the mailboxes and the killswitch. */
694
- export declare function swarmstateof(input: {
695
- agents: agentidentity[];
696
- queue: taskqueue;
697
- mailboxes: agentmailbox[];
698
- killswitch: killswitch;
699
- }): swarmstate;
700
- /**
701
- * Multi agent coordination logic of the 1.1.59 family.
702
- * Every correlated rule for tab handoffs between agents mid run, resource locks keyed by one origin and one selector, conflict scans of overlapping writes, result merging with conflict rules and provenance, output comparison, the interleaved swarm timeline, verified lessons on the blackboard, the aggregate report across agents, the shared cost accounting and the replay of one agent run from the audit trail lives in this file.
703
- * Coordination never bypasses review: a handoff preserves the original session grants, a lock only serializes work the same review already approved and every merged report that includes page content grades as an egress event on export.
704
- */
705
- /** Composes the lock key of exactly one origin and one selector; a lock never spans unrelated origins because the key names one target of one origin. */
706
- export declare function lockkey(origin: string, selector: string): string;
707
- /** Packages one tab handoff for transfer: the transferring agent names the receiving agent, the tab and the task state in plain language; the record waits prepared until its transfer. */
708
- export declare function preparehandoff(input: {
709
- agents: agentidentity[];
710
- id: string;
711
- fromagentid: string;
712
- toagentid: string;
713
- taskstate: string;
714
- tabid?: number;
715
- reason?: string;
716
- now: number;
717
- }): handoffrecord;
718
- /** Moves one tab binding between agents: the prepared handoff transfers the tab from the transferring agent to the receiving agent under the one agent per tab rule, and the record marks the transfer. */
719
- export declare function transferhandoff(input: {
720
- agents: agentidentity[];
721
- handoffs: handoffrecord[];
722
- id: string;
723
- now: number;
724
- }): {
725
- agents: agentidentity[];
726
- handoffs: handoffrecord[];
727
- };
728
- /** Continues one transferred task from its packaged state: the receiving agent owns the task from the recorded task state and the record marks the resume. */
729
- export declare function resumehandoff(input: {
730
- handoffs: handoffrecord[];
731
- id: string;
732
- now: number;
733
- }): handoffrecord;
734
- /** Acquires one resource lock keyed by one origin and one selector: an exclusive lock refuses every second holder while a shared lock admits further shared holders only; a held key refuses the newcomer whatever the kinds. */
735
- export declare function acquirelock(input: {
736
- locks: resourcelock[];
737
- holder: string;
738
- origin: string;
739
- selector: string;
740
- kind?: "exclusive" | "shared";
741
- expiresat?: number;
742
- now: number;
743
- }): {
744
- locks: resourcelock[];
745
- acquired: boolean;
746
- reason: string;
747
- };
748
- /** Releases one lock with the holder named: the freed key returns to the pool for the next agent. */
749
- export declare function releaselock(input: {
750
- locks: resourcelock[];
751
- key: string;
752
- holder: string;
753
- now: number;
754
- }): {
755
- locks: resourcelock[];
756
- released: boolean;
757
- };
758
- /** Returns the abandoned locks to the pool: a lock past its user configured expiry releases on the sweep while a lock without an expiry never expires. */
759
- export declare function expirelocks(input: {
760
- locks: resourcelock[];
761
- now: number;
762
- }): {
763
- locks: resourcelock[];
764
- expired: string[];
765
- };
766
- /** Scans the parallel writes for overlapping targets before the runs start: two writers on the same origin and selector overlap, the scan lists the overlapping targets with their writers and the suggested ordering keeps the writers deterministic by agent id. */
767
- export declare function scanconflicts(input: {
768
- id: string;
769
- writers: conflictwriter[];
770
- now: number;
771
- }): conflictscan;
772
- /** Folds the parallel results into one report with conflict rules: the entries group by key, first keeps the earliest value, last keeps the latest, preferagent keeps the value of the agent the user named and fail refuses the fold on any conflict; every merged value keeps its provenance and every conflict lands its resolution note. */
773
- export declare function mergeresults(input: {
774
- entries: mergeentry[];
775
- rule: mergerule;
776
- preferagent?: string;
777
- now: number;
778
- }): {
779
- entries: mergeentry[];
780
- conflicts: string[];
781
- refused: boolean;
782
- };
783
- /** Builds the final report across agents: the outputs fold under the merge rule the user picked, the sections group by task and every section keeps the agent sources of its entries with the provenance. */
784
- export declare function swarmreport(input: {
785
- id: string;
786
- title: string;
787
- outputs: mergeentry[];
788
- rule: mergerule;
789
- preferagent?: string;
790
- confidence?: string;
791
- now: number;
792
- }): {
793
- report: resultreport;
794
- conflicts: string[];
795
- refused: boolean;
796
- };
797
- /** Contrasts the competing agent outputs for the user: the comparison lists every output with its agent and names the keys where the agents disagree. */
798
- export declare function compareoutputs(input: {
799
- id: string;
800
- subject: string;
801
- outputs: Array<{
802
- agentid: string;
803
- value: string;
804
- }>;
805
- now: number;
806
- }): outputcomparison;
807
- /** Interleaves the actions of every agent into one stream: the actions order by time and the ties keep their arrival order, so one timeline reads the whole swarm. */
808
- export declare function interleavetimeline(actions: swarmaction[]): swarmaction[];
809
- /** Writes one verified lesson to the blackboard: the lesson lands in the findings section under its own key with the agent and its verifier named, so every agent of the swarm reads it. */
810
- export declare function sharelesson(input: {
811
- board: blackboard;
812
- id: string;
813
- agentid: string;
814
- statement: string;
815
- verifiedby: string;
816
- section?: blackboardsection;
817
- consentclass?: actionrisk;
818
- now: number;
819
- }): blackboard;
820
- /** Sums the per agent usage into the swarm totals of the shared cost accounting: tokens, cost and steps of every agent in one record. */
821
- export declare function swarmcosts(input: {
822
- usage: agentusage[];
823
- currency?: string;
824
- now: number;
825
- }): swarmcost;
826
- /** Rebuilds one agent run from the audit trail: the actions that name the agent order by time into one replay stream the panel scrolls. */
827
- export declare function replayagentrun(input: {
828
- events: Array<{
829
- id: string;
830
- kind: string;
831
- summary: string;
832
- at: number;
833
- agentid?: string;
834
- }>;
835
- agentid: string;
836
- }): swarmaction[];
837
- //# sourceMappingURL=agent.d.ts.map