@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.
- package/CHANGELOG.md +60 -0
- package/{dist/bridge.d.ts → bridge.d.ts} +1 -1
- package/bridge.d.ts.map +1 -0
- package/bridge.js +1877 -0
- package/bun.d.ts.map +1 -0
- package/bun.js +52329 -0
- package/caps/background.json +712 -0
- package/caps/cli.json +360 -0
- package/caps/library.json +3611 -0
- package/caps/mcp.json +126 -0
- package/caps/pagebridge.json +377 -0
- package/caps/popup.json +51 -0
- package/caps/sidepanel.json +522 -0
- package/checksums.txt +142 -0
- package/cli.d.ts.map +1 -0
- package/{dist/cli.js → cli.js} +2 -2
- package/companion.d.ts.map +1 -0
- package/companion.js +389 -0
- package/crossbrowser.d.ts.map +1 -0
- package/crossbrowser.js +1191 -0
- package/dashdone.d.ts.map +1 -0
- package/dashdone.js +368 -0
- package/deno.d.ts.map +1 -0
- package/deno.js +52325 -0
- package/devthink.umd.js +52346 -0
- package/fixtures/bun.ts +7 -0
- package/fixtures/cjs.js +6 -0
- package/fixtures/deno.ts +6 -0
- package/fixtures/example-org-pagestate.json +22 -0
- package/fixtures/importers/automa-workflow.json +18 -0
- package/fixtures/importers/selenium-side.json +20 -0
- package/fixtures/importers/tabular-plan.csv +7 -0
- package/fixtures/importers/uivision-macro.json +10 -0
- package/fixtures/importers/v1-plan.json +13 -0
- package/fixtures/mcp-client.mjs +14 -0
- package/fixtures/pages/checkout.html +192 -0
- package/fixtures/pages/dashboard.html +110 -0
- package/fixtures/pages/feed.html +113 -0
- package/fixtures/pages/product-grid.html +150 -0
- package/fixtures/plans/form-inventory-plan.json +11 -0
- package/fixtures/plans/release-notes-plan.json +11 -0
- package/fixtures/recipes/agentscompete.json +11 -0
- package/fixtures/recipes/agentsforms.json +11 -0
- package/fixtures/recipes/agentsmonitor.json +11 -0
- package/fixtures/recipes/agentsreview.json +29 -0
- package/fixtures/recipes/agentswarm.json +11 -0
- package/fixtures/recipes/fillcalendar.json +12 -0
- package/fixtures/recipes/fillcheckout.json +13 -0
- package/fixtures/recipes/filldependentdropdowns.json +12 -0
- package/fixtures/recipes/fillfromcsv.json +13 -0
- package/fixtures/recipes/fillloginform.json +12 -0
- package/fixtures/recipes/fillmultistepwizard.json +13 -0
- package/fixtures/recipes/fillregistration.json +12 -0
- package/fixtures/recipes/fillsearchfilters.json +12 -0
- package/fixtures/recipes/filltypeahead.json +11 -0
- package/fixtures/recipes/monitoralerts.json +12 -0
- package/fixtures/recipes/monitoravailability.json +11 -0
- package/fixtures/recipes/monitornetworkquiet.json +12 -0
- package/fixtures/recipes/monitorpagechanges.json +11 -0
- package/fixtures/recipes/monitorpricechange.json +11 -0
- package/fixtures/recipes/monitorschedule.json +12 -0
- package/fixtures/recipes/scrapedynamicprices.json +13 -0
- package/fixtures/recipes/scrapeimagegallery.json +12 -0
- package/fixtures/recipes/scrapeinfinitefeed.json +13 -0
- package/fixtures/recipes/scrapenestedlists.json +12 -0
- package/fixtures/recipes/scrapeproductgrid.json +12 -0
- package/fixtures/recipes/scrapereviews.json +12 -0
- package/fixtures/recipes/scrapesearchresults.json +12 -0
- package/fixtures/recipes/scrapetablepagination.json +12 -0
- package/fixtures/recipes/testaccessibility.json +34 -0
- package/fixtures/recipes/testconsoleerrors.json +12 -0
- package/fixtures/recipes/testdeeplinks.json +12 -0
- package/fixtures/recipes/testformvalidation.json +13 -0
- package/fixtures/recipes/testlayoutshift.json +12 -0
- package/fixtures/recipes/testlinkcheck.json +12 -0
- package/fixtures/recipes/testloadtiming.json +12 -0
- package/fixtures/recipes/testvisualdiff.json +12 -0
- package/fixtures/workflows/changelog-digest-workflow.json +13 -0
- package/fixtures/workflows/form-survey-workflow.json +13 -0
- package/gallery.json +706 -0
- package/hardening.d.ts.map +1 -0
- package/hardening.js +188 -0
- package/headless.d.ts.map +1 -0
- package/headless.js +11522 -0
- package/http.d.ts.map +1 -0
- package/http.js +2165 -0
- package/index.cjs +54682 -0
- package/index.d.ts.map +1 -0
- package/index.js +52310 -0
- package/index.neutral.js +46343 -0
- package/{web/manifest.json → manifest.json} +1 -1
- package/mcp.d.ts.map +1 -0
- package/mcp.js +20515 -0
- package/memory.d.ts.map +1 -0
- package/{memory.ts → memory.js} +2310 -3834
- package/nativehost.template.json +10 -0
- package/node.cjs +54686 -0
- package/node.d.ts.map +1 -0
- package/pack.d.ts.map +1 -0
- package/pack.js +805 -0
- package/package.json +83 -176
- package/policy.d.ts.map +1 -0
- package/{policy.ts → policy.js} +4679 -5073
- package/progress.d.ts.map +1 -0
- package/progress.js +645 -0
- package/protocol.d.ts.map +1 -0
- package/protocol.js +8334 -0
- package/schemas/audit.schema.json +226 -0
- package/schemas/capability.schema.json +113 -0
- package/schemas/envelope.schema.json +162 -0
- package/schemas/memory.schema.json +51 -0
- package/schemas/observation.schema.json +113 -0
- package/schemas/plan.schema.json +208 -0
- package/schemas/progress.schema.json +126 -0
- package/schemas/proposal.schema.json +68 -0
- package/schemas/session.schema.json +82 -0
- package/schemas/tool.schema.json +94 -0
- package/server.d.ts.map +1 -0
- package/server.js +28877 -0
- package/umd-example.html +18 -0
- package/umd.d.ts.map +1 -0
- package/accounts.ts +0 -2087
- package/agent.ts +0 -2331
- package/antigravity.ts +0 -2139
- package/apifreeze.ts +0 -4146
- package/auth.ts +0 -642
- package/background.ts +0 -16837
- package/bridge.ts +0 -2080
- package/build.ts +0 -54
- package/bun.ts +0 -26
- package/capture.ts +0 -1614
- package/checksecrets.ts +0 -72
- package/cjs.ts +0 -9
- package/cli.ts +0 -3500
- package/commands.ts +0 -1101
- package/companion.ts +0 -450
- package/compatibility.ts +0 -37
- package/config.ts +0 -3137
- package/constants.ts +0 -943
- package/core.ts +0 -1473
- package/crossbrowser.ts +0 -1359
- package/dashdone.ts +0 -605
- package/data.ts +0 -943
- package/database.ts +0 -133
- package/debug.ts +0 -850
- package/deno.ts +0 -27
- package/devthink.ts +0 -707
- package/dist/accounts.d.ts +0 -409
- package/dist/agent.d.ts +0 -837
- package/dist/antigravity.d.ts +0 -380
- package/dist/apifreeze.d.ts +0 -113
- package/dist/auth.d.ts +0 -224
- package/dist/capture.d.ts +0 -595
- package/dist/cjs.d.ts +0 -6
- package/dist/commands.d.ts +0 -310
- package/dist/compatibility.d.ts +0 -17
- package/dist/config.d.ts +0 -1853
- package/dist/constants.d.ts +0 -637
- package/dist/core.d.ts +0 -361
- package/dist/data.d.ts +0 -330
- package/dist/database.d.ts +0 -24
- package/dist/debug.d.ts +0 -270
- package/dist/engine.d.ts +0 -74
- package/dist/environments.d.ts +0 -244
- package/dist/evidence.d.ts +0 -277
- package/dist/export.d.ts +0 -311
- package/dist/fingerprint.d.ts +0 -594
- package/dist/flow.d.ts +0 -300
- package/dist/gates.d.ts +0 -103
- package/dist/identity.d.ts +0 -51
- package/dist/ids.d.ts +0 -7
- package/dist/llm.d.ts +0 -652
- package/dist/models.d.ts +0 -1807
- package/dist/net.d.ts +0 -325
- package/dist/neutral.d.ts +0 -41
- package/dist/oauth.d.ts +0 -703
- package/dist/page.d.ts +0 -1166
- package/dist/perf.d.ts +0 -481
- package/dist/plan.d.ts +0 -134
- package/dist/project.d.ts +0 -395
- package/dist/providers.d.ts +0 -37
- package/dist/quota.d.ts +0 -453
- package/dist/recovery.d.ts +0 -621
- package/dist/request.d.ts +0 -1492
- package/dist/run.d.ts +0 -779
- package/dist/runtime.d.ts +0 -212
- package/dist/search.d.ts +0 -375
- package/dist/security.d.ts +0 -534
- package/dist/serve.d.ts +0 -136
- package/dist/session.d.ts +0 -296
- package/dist/storage.d.ts +0 -53
- package/dist/streaming.d.ts +0 -1119
- package/dist/swarm.d.ts +0 -328
- package/dist/tools.d.ts +0 -170
- package/dist/types.d.ts +0 -8357
- package/dist/utils.d.ts +0 -82
- package/dist/version.d.ts +0 -7
- package/dist/versionregistry.d.ts +0 -406
- package/dist/views.d.ts +0 -579
- package/dist/workbenchsession.d.ts +0 -69
- package/dist/workflow.d.ts +0 -649
- package/docs/readme.md +0 -92
- package/docs/schemas/antigravity.json +0 -192
- package/engine.ts +0 -1524
- package/environments.ts +0 -1005
- package/evidence.ts +0 -643
- package/export.ts +0 -889
- package/fingerprint.ts +0 -1458
- package/flow.ts +0 -1190
- package/gates.ts +0 -307
- package/gateway.ts +0 -34
- package/hardening.ts +0 -191
- package/headless.ts +0 -369
- package/http.ts +0 -2110
- package/identity.ts +0 -246
- package/ids.ts +0 -26
- package/index.ts +0 -369
- package/llm.ts +0 -2682
- package/mcp.ts +0 -1835
- package/models.ts +0 -3805
- package/modes.ts +0 -43
- package/net.ts +0 -1214
- package/neutral.ts +0 -362
- package/node.ts +0 -26
- package/oauth.ts +0 -2216
- package/offscreen.ts +0 -170
- package/pack.ts +0 -956
- package/page.ts +0 -7824
- package/pagebridge.ts +0 -1116
- package/perf.ts +0 -957
- package/plan.ts +0 -672
- package/plugin.ts +0 -76
- package/prisma.config.ts +0 -27
- package/progress.ts +0 -1308
- package/project.ts +0 -1291
- package/protocol.ts +0 -4187
- package/providers.ts +0 -246
- package/quota.ts +0 -1887
- package/recovery.ts +0 -2433
- package/request.ts +0 -4482
- package/run.ts +0 -2135
- package/runtime.ts +0 -526
- package/search.ts +0 -1760
- package/security.ts +0 -1673
- package/serve.ts +0 -419
- package/server.ts +0 -5538
- package/session.ts +0 -1162
- package/storage.ts +0 -182
- package/streaming.ts +0 -4101
- package/swarm.ts +0 -884
- package/sync.ts +0 -56
- package/tests/agentcert.test.ts +0 -128
- package/tests/agentfleet.test.ts +0 -214
- package/tests/agentreview.test.ts +0 -241
- package/tests/agentstream.test.ts +0 -335
- package/tests/agentwork.test.ts +0 -356
- package/tests/apifreeze.test.ts +0 -290
- package/tests/apimap.test.ts +0 -112
- package/tests/approvalgate.test.ts +0 -175
- package/tests/artifactmanifest.test.ts +0 -204
- package/tests/attentionfeed.test.ts +0 -163
- package/tests/backgroundruns.test.ts +0 -100
- package/tests/batchscheduling.test.ts +0 -131
- package/tests/blackboard.test.ts +0 -238
- package/tests/bridge.test.ts +0 -1088
- package/tests/browsercoverage.test.ts +0 -134
- package/tests/browserpolyfills.test.ts +0 -124
- package/tests/build.mjs +0 -1260
- package/tests/clientauth.test.ts +0 -223
- package/tests/clitools.test.ts +0 -578
- package/tests/confirmgates.test.ts +0 -190
- package/tests/containerpack.test.ts +0 -143
- package/tests/controlflow.test.ts +0 -2120
- package/tests/coordination.test.ts +0 -345
- package/tests/copyscreen.test.ts +0 -139
- package/tests/core.test.ts +0 -417
- package/tests/costcert.test.ts +0 -95
- package/tests/crossbrowser.test.ts +0 -115
- package/tests/cspaudit.test.ts +0 -79
- package/tests/dashdone.test.ts +0 -615
- package/tests/datagrid.test.ts +0 -137
- package/tests/doccheck.test.ts +0 -107
- package/tests/dombatch.test.ts +0 -109
- package/tests/emulation.test.ts +0 -282
- package/tests/environments.test.ts +0 -259
- package/tests/evidenceviews.test.ts +0 -88
- package/tests/exporttools.test.ts +0 -185
- package/tests/firefoxprep.test.ts +0 -134
- package/tests/flowlibrary.test.ts +0 -242
- package/tests/flowrun.test.ts +0 -303
- package/tests/forensics.test.ts +0 -439
- package/tests/gateway.test.ts +0 -939
- package/tests/headlesslib.test.ts +0 -171
- package/tests/httpstream.test.ts +0 -277
- package/tests/immutablelog.test.ts +0 -157
- package/tests/inboundguard.test.ts +0 -177
- package/tests/lazyload.test.ts +0 -72
- package/tests/librarymodes.test.ts +0 -623
- package/tests/llm.test.ts +0 -696
- package/tests/manifest.test.ts +0 -226
- package/tests/maskinputs.test.ts +0 -150
- package/tests/matrixverify.test.ts +0 -111
- package/tests/mavenpack.test.ts +0 -75
- package/tests/mcpserver.test.ts +0 -704
- package/tests/memory.test.ts +0 -4155
- package/tests/memorycare.test.ts +0 -230
- package/tests/migrateplan.test.ts +0 -349
- package/tests/minimization.test.ts +0 -414
- package/tests/modelroute.test.ts +0 -112
- package/tests/multiagent.test.ts +0 -440
- package/tests/nativebridge.test.ts +0 -807
- package/tests/navigation.test.ts +0 -284
- package/tests/nugetpack.test.ts +0 -83
- package/tests/orchestration.test.ts +0 -449
- package/tests/originpolicy.test.ts +0 -405
- package/tests/outputcompare.test.ts +0 -97
- package/tests/package.test.ts +0 -91
- package/tests/pagebridge.test.ts +0 -5909
- package/tests/pentest.test.ts +0 -75
- package/tests/perfrecords.test.ts +0 -257
- package/tests/permdiff.test.ts +0 -85
- package/tests/phishguard.test.ts +0 -128
- package/tests/pickerviews.test.ts +0 -155
- package/tests/pipelines.test.ts +0 -381
- package/tests/planlint.test.ts +0 -240
- package/tests/planreview.test.ts +0 -383
- package/tests/platformtargets.test.ts +0 -56
- package/tests/policy.test.ts +0 -8284
- package/tests/portability.test.ts +0 -96
- package/tests/progress.test.ts +0 -1036
- package/tests/promptlibrary.test.ts +0 -116
- package/tests/protocol.test.ts +0 -4793
- package/tests/publishingpipeline.test.ts +0 -314
- package/tests/quickactions.test.ts +0 -164
- package/tests/readiness.test.ts +0 -78
- package/tests/recipes.test.ts +0 -163
- package/tests/redactshots.test.ts +0 -216
- package/tests/registernvidiakeys.ts +0 -51
- package/tests/relayserve.test.ts +0 -304
- package/tests/releasenotes.test.ts +0 -276
- package/tests/resilience.test.ts +0 -467
- package/tests/resourceaware.test.ts +0 -187
- package/tests/runbudget.test.ts +0 -125
- package/tests/runhistory.test.ts +0 -299
- package/tests/runreplay.test.ts +0 -113
- package/tests/runresume.test.ts +0 -184
- package/tests/runstate.test.ts +0 -288
- package/tests/runtimeadapters.test.ts +0 -251
- package/tests/safariskeleton.test.ts +0 -115
- package/tests/sandboxframe.test.ts +0 -196
- package/tests/sbom.test.ts +0 -105
- package/tests/secretvault.test.ts +0 -188
- package/tests/selcache.test.ts +0 -111
- package/tests/sessioninterface.test.ts +0 -791
- package/tests/sessions.test.ts +0 -591
- package/tests/siteprefs.test.ts +0 -228
- package/tests/snapshotdelta.test.ts +0 -165
- package/tests/statusviews.test.ts +0 -237
- package/tests/stepmeter.test.ts +0 -200
- package/tests/streamparse.test.ts +0 -163
- package/tests/stylepruning.test.ts +0 -90
- package/tests/surfaces.test.ts +0 -282
- package/tests/sweep.test.ts +0 -78
- package/tests/syncbridge.test.ts +0 -164
- package/tests/taskqueue.test.ts +0 -206
- package/tests/toolcalls.test.ts +0 -336
- package/tests/toolcatalog.test.ts +0 -201
- package/tests/torture-agent.test.ts +0 -706
- package/tests/torture-auth.test.ts +0 -461
- package/tests/torture-commands.test.ts +0 -895
- package/tests/torture-data.test.ts +0 -923
- package/tests/torture-environments.test.ts +0 -285
- package/tests/torture-export.test.ts +0 -263
- package/tests/torture-http.test.ts +0 -1379
- package/tests/torture-llm.test.ts +0 -808
- package/tests/torture-memory.test.ts +0 -1084
- package/tests/torture-plan.test.ts +0 -829
- package/tests/torture-run.test.ts +0 -626
- package/tests/torture-session.test.ts +0 -928
- package/tests/torture-swarm.test.ts +0 -1245
- package/tests/torture-tools.test.ts +0 -964
- package/tests/torture-workflow.test.ts +0 -2354
- package/tests/tourviews.test.ts +0 -52
- package/tests/transparency.test.ts +0 -147
- package/tests/trigger.test.ts +0 -941
- package/tests/v1sunset.test.ts +0 -428
- package/tests/virtlist.test.ts +0 -94
- package/tests/vision.test.ts +0 -540
- package/tests/vsixpack.test.ts +0 -145
- package/tests/webapi.test.ts +0 -523
- package/tests/workflow.test.ts +0 -1785
- package/tests/workfloweditor.test.ts +0 -759
- package/tests/xpipack.test.ts +0 -128
- package/tools.ts +0 -734
- package/types.ts +0 -9908
- package/umd.ts +0 -9
- package/utils.ts +0 -249
- package/version.ts +0 -8
- package/versionregistry.ts +0 -1310
- package/views.ts +0 -2153
- package/vitest.config.ts +0 -12
- package/web/App.tsx +0 -78
- package/web/README.md +0 -47
- package/web/capacitor.config.ts +0 -46
- package/web/const.ts +0 -19
- package/web/control.shell.tsx +0 -66
- package/web/dashboardpage.ts +0 -554
- package/web/db.ts +0 -493
- package/web/design.html +0 -541
- package/web/gatewayview/Gateway.tsx +0 -345
- package/web/gatewayview/config.ts +0 -1042
- package/web/gatewayview/definition.ts +0 -174
- package/web/icons.ts +0 -15
- package/web/optionspage.ts +0 -691
- package/web/popup.ts +0 -1651
- package/web/schema.prisma +0 -176
- package/web/sidepanel.ts +0 -7941
- package/web/sitemanifest.json +0 -13
- package/web/terminal-ui.tsx +0 -622
- package/web/transparencypage.ts +0 -541
- package/web/vite.config.ts +0 -39
- package/web/workspace.ts +0 -23
- package/workbenchmemory.ts +0 -104
- package/workbenchsession.ts +0 -304
- package/workflow.ts +0 -4495
- /package/{dist/bun.d.ts → bun.d.ts} +0 -0
- /package/{dist/cli.d.ts → cli.d.ts} +0 -0
- /package/{dist/companion.d.ts → companion.d.ts} +0 -0
- /package/{dist/crossbrowser.d.ts → crossbrowser.d.ts} +0 -0
- /package/{dist/dashdone.d.ts → dashdone.d.ts} +0 -0
- /package/{dist/deno.d.ts → deno.d.ts} +0 -0
- /package/{dist/hardening.d.ts → hardening.d.ts} +0 -0
- /package/{dist/headless.d.ts → headless.d.ts} +0 -0
- /package/{dist/http.d.ts → http.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/mcp.d.ts → mcp.d.ts} +0 -0
- /package/{dist/memory.d.ts → memory.d.ts} +0 -0
- /package/{dist/node.d.ts → node.d.ts} +0 -0
- /package/{dist/pack.d.ts → pack.d.ts} +0 -0
- /package/{dist/policy.d.ts → policy.d.ts} +0 -0
- /package/{dist/progress.d.ts → progress.d.ts} +0 -0
- /package/{dist/protocol.d.ts → protocol.d.ts} +0 -0
- /package/{dist/server.d.ts → server.d.ts} +0 -0
- /package/{dist/umd.d.ts → umd.d.ts} +0 -0
package/dist/swarm.d.ts
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The swarm module of the 1.1.90 consolidation: every correlated variation of the swarm logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
-
* The correlation is the multi agent swarm organized over one shared queue and one shared board: orchestration holds the organizing topology (leader worker election by user rule, work slicing, result collection, worker scaling inside the user bound, the planner executor split with step reporting, critic reviews, verifier checks, the progressboard aggregation, human decided escalations, arbitration of competing claims and consensus rounds with quorum); taskqueue holds the shared work every agent of the swarm claims from (lanes, priorities, claims with heartbeats, work stealing with lane ownership, completion policy and the requeue of orphaned tasks); and blackboard is the shared memory every agent reads with no relay (sections, posting with authors, freshness filtered reads, retirement by the user window and the consent class inheritance of the source extraction).
|
|
4
|
-
* Orchestration never bypasses review: the leader only organizes work whose proposals still pass the same human review, the critic reads outputs without acting on the page, and every escalation lands on the user.
|
|
5
|
-
*/
|
|
6
|
-
import type { agentidentity, arbitrationrule, boardmilestone, consensusround, consensusvote, criticreview, escalationrecord, leaderworker, plannerexecutor, progressboard, reviewrequest, reviewverdict, taskitem, taskqueue, verifiercheck } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Multi agent orchestration logic of the 1.1.59 family.
|
|
9
|
-
* Every correlated rule for the leader worker topology (election by user rule, work slicing, result collection, worker scaling), the planner executor split with step reporting, critic reviews over agent outputs, verifier checks of result claims, the progressboard aggregation, escalations that stay human decided, arbitration of competing claims and consensus rounds with quorum lives in this file.
|
|
10
|
-
* Orchestration never bypasses review: the leader only organizes work whose proposals still pass the same human review, the critic reads outputs without acting on the page and every escalation lands on the user.
|
|
11
|
-
*/
|
|
12
|
-
/** Elects the leader of the swarm and builds the leader worker topology: the user rule names the leader (first registration or one named agent), the live workers, critics and verifiers join their lanes by role, and the topology records the election. */
|
|
13
|
-
export declare function electleader(input: {
|
|
14
|
-
agents: agentidentity[];
|
|
15
|
-
id: string;
|
|
16
|
-
rule?: {
|
|
17
|
-
kind: "first" | "named";
|
|
18
|
-
agentid?: string;
|
|
19
|
-
};
|
|
20
|
-
now: number;
|
|
21
|
-
}): leaderworker;
|
|
22
|
-
/** Slices the tasks across the workers of the topology: the workers take turns over the queued and claimed tasks in queue order, every slice names the task payload it owns and the assignments record the worker, the task and the slice. */
|
|
23
|
-
export declare function assignwork(input: {
|
|
24
|
-
topology: leaderworker;
|
|
25
|
-
tasks: taskitem[];
|
|
26
|
-
now: number;
|
|
27
|
-
}): leaderworker;
|
|
28
|
-
/** Gathers the worker outputs with status: every assignment reports its state while the outputs the workers returned land beside their tasks, and the missing list names the assignments still without an output. */
|
|
29
|
-
export declare function collectresults(input: {
|
|
30
|
-
topology: leaderworker;
|
|
31
|
-
outputs: Array<{
|
|
32
|
-
workerid: string;
|
|
33
|
-
taskid: string;
|
|
34
|
-
state: string;
|
|
35
|
-
summary: string;
|
|
36
|
-
}>;
|
|
37
|
-
}): {
|
|
38
|
-
gathered: Array<{
|
|
39
|
-
workerid: string;
|
|
40
|
-
taskid: string;
|
|
41
|
-
state: string;
|
|
42
|
-
summary: string;
|
|
43
|
-
}>;
|
|
44
|
-
missing: string[];
|
|
45
|
-
};
|
|
46
|
-
/** Scales the worker lane by load: queued work beyond the current workers adds the live worker role agents the swarm already holds (never past the user configured bound while one exists), idle workers retire down to the work left, and no engine cap ever exists. */
|
|
47
|
-
export declare function scaleworkers(input: {
|
|
48
|
-
topology: leaderworker;
|
|
49
|
-
agents: agentidentity[];
|
|
50
|
-
pending: number;
|
|
51
|
-
bound?: number;
|
|
52
|
-
now: number;
|
|
53
|
-
}): {
|
|
54
|
-
topology: leaderworker;
|
|
55
|
-
added: string[];
|
|
56
|
-
retired: string[];
|
|
57
|
-
reason: string;
|
|
58
|
-
};
|
|
59
|
-
/** Splits one task between the planner and the executor: the plan owner agent drafts the reviewed plan while the run owner agent executes it, and the split record starts empty of step reports. */
|
|
60
|
-
export declare function plannersplit(input: {
|
|
61
|
-
id: string;
|
|
62
|
-
planownerid: string;
|
|
63
|
-
runownerid: string;
|
|
64
|
-
taskid?: string;
|
|
65
|
-
now: number;
|
|
66
|
-
}): plannerexecutor;
|
|
67
|
-
/** Reports one executor step outcome back to the planner agent: the executor appends its report to the split record so the planner reads every step result. */
|
|
68
|
-
export declare function reportstep(input: {
|
|
69
|
-
split: plannerexecutor;
|
|
70
|
-
stepid: string;
|
|
71
|
-
outcome: "done" | "failed";
|
|
72
|
-
detail: string;
|
|
73
|
-
now: number;
|
|
74
|
-
}): plannerexecutor;
|
|
75
|
-
/** Routes one review request to a reviewing agent: the request names the subject and payload and stays open until its ack, its answer or its user configured timeout. */
|
|
76
|
-
export declare function requestreview(input: {
|
|
77
|
-
requests: reviewrequest[];
|
|
78
|
-
id: string;
|
|
79
|
-
fromagentid: string;
|
|
80
|
-
toagentid: string;
|
|
81
|
-
subject: string;
|
|
82
|
-
payload: string;
|
|
83
|
-
timeoutms?: number;
|
|
84
|
-
now: number;
|
|
85
|
-
}): reviewrequest[];
|
|
86
|
-
/** Acks one review request: the reviewing agent confirms receipt while the answer still waits. */
|
|
87
|
-
export declare function ackreview(input: {
|
|
88
|
-
requests: reviewrequest[];
|
|
89
|
-
id: string;
|
|
90
|
-
now: number;
|
|
91
|
-
}): reviewrequest[];
|
|
92
|
-
/** Applies the critic verdict to one review request: the review carries the verdict, the issues and the required changes while the request closes as answered. */
|
|
93
|
-
export declare function applyreview(input: {
|
|
94
|
-
requests: reviewrequest[];
|
|
95
|
-
id: string;
|
|
96
|
-
reviewerid: string;
|
|
97
|
-
verdict: reviewverdict;
|
|
98
|
-
issues: string[];
|
|
99
|
-
requiredchanges: string[];
|
|
100
|
-
taskid?: string;
|
|
101
|
-
now: number;
|
|
102
|
-
}): {
|
|
103
|
-
review: criticreview;
|
|
104
|
-
requests: reviewrequest[];
|
|
105
|
-
};
|
|
106
|
-
/** Sweeps the review requests past their user configured timeout: an unanswered request without an ack or an answer times out and the requester reads the expiry. */
|
|
107
|
-
export declare function sweepreviews(input: {
|
|
108
|
-
requests: reviewrequest[];
|
|
109
|
-
now: number;
|
|
110
|
-
}): {
|
|
111
|
-
requests: reviewrequest[];
|
|
112
|
-
timedout: string[];
|
|
113
|
-
};
|
|
114
|
-
/** Records one verifier check of a result claim: the verifier names the claim, the method it used and the pass or fail outcome with its evidence; the check itself never writes to the page. */
|
|
115
|
-
export declare function checkclaim(input: {
|
|
116
|
-
id: string;
|
|
117
|
-
verifierid: string;
|
|
118
|
-
claimagentid: string;
|
|
119
|
-
claim: string;
|
|
120
|
-
method: string;
|
|
121
|
-
outcome: "pass" | "fail";
|
|
122
|
-
evidence?: string;
|
|
123
|
-
taskid?: string;
|
|
124
|
-
now: number;
|
|
125
|
-
}): verifiercheck;
|
|
126
|
-
/** Builds the progressboard that aggregates the swarm: one lane per live agent with its role, state, lane of work, current task and milestones, so the user reads every agent at once. */
|
|
127
|
-
export declare function boardstate(input: {
|
|
128
|
-
agents: agentidentity[];
|
|
129
|
-
queue: taskqueue;
|
|
130
|
-
topology?: leaderworker;
|
|
131
|
-
milestones?: Record<string, boardmilestone[]>;
|
|
132
|
-
now: number;
|
|
133
|
-
}): progressboard;
|
|
134
|
-
/** Lifts one stalled agent decision to the user with its full context: the escalation stays open until the user writes the decision because escalations are always human decided. */
|
|
135
|
-
export declare function escalate(input: {
|
|
136
|
-
id: string;
|
|
137
|
-
agentid: string;
|
|
138
|
-
subject: string;
|
|
139
|
-
context: string;
|
|
140
|
-
now: number;
|
|
141
|
-
}): escalationrecord;
|
|
142
|
-
/** Resolves one escalation with the decision the user wrote; the decision time records and the record closes. */
|
|
143
|
-
export declare function resolveescalation(input: {
|
|
144
|
-
escalation: escalationrecord;
|
|
145
|
-
decision: string;
|
|
146
|
-
now: number;
|
|
147
|
-
}): escalationrecord;
|
|
148
|
-
/** Orders competing resource claims by the user configured arbitration rule: the priority strategy follows the user ordered agent list, the age strategy gives the resource to the oldest claim and the leader strategy names the elected leader first. */
|
|
149
|
-
export declare function arbitrate(input: {
|
|
150
|
-
rule: arbitrationrule;
|
|
151
|
-
leaderid?: string;
|
|
152
|
-
claims: Array<{
|
|
153
|
-
agentid: string;
|
|
154
|
-
claimedat: number;
|
|
155
|
-
}>;
|
|
156
|
-
}): string[];
|
|
157
|
-
/** Opens one consensus round: the subject stays plain language and the quorum stays the user configured value the round needs to carry. */
|
|
158
|
-
export declare function openconsensus(input: {
|
|
159
|
-
id: string;
|
|
160
|
-
subject: string;
|
|
161
|
-
quorum: number;
|
|
162
|
-
now: number;
|
|
163
|
-
}): consensusround;
|
|
164
|
-
/** Collects one verdict into a consensus round: an agent votes once, the round stays open until the votes carry or the round closes, and the quorum counts yes votes only. */
|
|
165
|
-
export declare function castvote(input: {
|
|
166
|
-
round: consensusround;
|
|
167
|
-
agentid: string;
|
|
168
|
-
vote: consensusvote;
|
|
169
|
-
now: number;
|
|
170
|
-
}): consensusround;
|
|
171
|
-
/** Reads the state of one consensus round: the yes, no and abstain counts beside the quorum so the panel shows the votes and the quorum state at once. */
|
|
172
|
-
export declare function consensusstate(round: consensusround): {
|
|
173
|
-
yes: number;
|
|
174
|
-
no: number;
|
|
175
|
-
abstain: number;
|
|
176
|
-
quorum: number;
|
|
177
|
-
state: string;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Shared task queue logic of the 1.1.58 multi agent family.
|
|
181
|
-
* Every correlated rule for lanes, priorities, claims, work stealing with lane ownership, completion, heartbeats and the requeue of orphaned tasks lives in this file.
|
|
182
|
-
* The queue never executes anything: a claimed task only names the work whose proposal still passes the same human review every single agent proposal passes.
|
|
183
|
-
*/
|
|
184
|
-
/** One lane ownership rule the user configures: the lane name and the roles allowed to steal from it; a lane without a rule stays open to every agent of the approved swarm. */
|
|
185
|
-
export interface laneownership {
|
|
186
|
-
lane: string;
|
|
187
|
-
roles: string[];
|
|
188
|
-
}
|
|
189
|
-
/** Builds one empty queue with the user configured lanes, priority scale and completion policy; the empty set of lanes accepts any lane name the user enqueues. */
|
|
190
|
-
export declare function emptyqueue(input?: {
|
|
191
|
-
lanes?: string[];
|
|
192
|
-
priorities?: number[];
|
|
193
|
-
completionpolicy?: "all" | "any";
|
|
194
|
-
}): taskqueue;
|
|
195
|
-
/** Enqueues one task item into a lane with its priority; a configured lane list refuses unknown lanes and the payload stays the plain language text the user typed. */
|
|
196
|
-
export declare function enqueue(input: {
|
|
197
|
-
queue: taskqueue;
|
|
198
|
-
id: string;
|
|
199
|
-
lane: string;
|
|
200
|
-
priority: number;
|
|
201
|
-
payload: string;
|
|
202
|
-
now: number;
|
|
203
|
-
}): taskqueue;
|
|
204
|
-
/** Lets one agent claim the highest priority queued task; the claim carries the heartbeat time that keeps it alive and an agent holds one task at a time. */
|
|
205
|
-
export declare function claim(input: {
|
|
206
|
-
queue: taskqueue;
|
|
207
|
-
agentid: string;
|
|
208
|
-
now: number;
|
|
209
|
-
}): {
|
|
210
|
-
queue: taskqueue;
|
|
211
|
-
task?: taskitem;
|
|
212
|
-
};
|
|
213
|
-
/** Lets one idle agent steal a queued task from a named lane; the lane ownership rules the user configures refuse agents whose role holds no grant for the lane. */
|
|
214
|
-
export declare function steal(input: {
|
|
215
|
-
queue: taskqueue;
|
|
216
|
-
agentid: string;
|
|
217
|
-
role: string;
|
|
218
|
-
fromlane: string;
|
|
219
|
-
ownership?: laneownership[];
|
|
220
|
-
now: number;
|
|
221
|
-
}): {
|
|
222
|
-
queue: taskqueue;
|
|
223
|
-
task?: taskitem;
|
|
224
|
-
};
|
|
225
|
-
/** Marks one task done and releases the claim of the agent that held it. */
|
|
226
|
-
export declare function complete(input: {
|
|
227
|
-
queue: taskqueue;
|
|
228
|
-
taskid: string;
|
|
229
|
-
now: number;
|
|
230
|
-
}): taskqueue;
|
|
231
|
-
/** Cancels one queued or claimed task; the cancelled task releases its claim and leaves the queue. */
|
|
232
|
-
export declare function canceltask(input: {
|
|
233
|
-
queue: taskqueue;
|
|
234
|
-
taskid: string;
|
|
235
|
-
now: number;
|
|
236
|
-
}): taskqueue;
|
|
237
|
-
/** Refreshes the heartbeats of every live claim of one agent so a working agent keeps its tasks. */
|
|
238
|
-
export declare function claimheartbeat(input: {
|
|
239
|
-
queue: taskqueue;
|
|
240
|
-
agentid: string;
|
|
241
|
-
now: number;
|
|
242
|
-
}): taskqueue;
|
|
243
|
-
/** Returns the orphaned tasks to their lane: a claim whose heartbeat stayed silent past the user configured expiry window releases and the task waits as queued again; an absent window never expires a claim. */
|
|
244
|
-
export declare function requeue(input: {
|
|
245
|
-
queue: taskqueue;
|
|
246
|
-
now: number;
|
|
247
|
-
window?: number;
|
|
248
|
-
}): {
|
|
249
|
-
queue: taskqueue;
|
|
250
|
-
requeued: string[];
|
|
251
|
-
};
|
|
252
|
-
/** Reports every lane with its queued, claimed, done and cancelled task counts and the live claims, so the queue view reads the lanes at a glance. */
|
|
253
|
-
export declare function lanereport(queue: taskqueue): Array<{
|
|
254
|
-
lane: string;
|
|
255
|
-
queued: number;
|
|
256
|
-
claimed: number;
|
|
257
|
-
done: number;
|
|
258
|
-
cancelled: number;
|
|
259
|
-
claims: Array<{
|
|
260
|
-
agentid: string;
|
|
261
|
-
taskid: string;
|
|
262
|
-
heartbeatat: number;
|
|
263
|
-
}>;
|
|
264
|
-
}>;
|
|
265
|
-
/** Evaluates the completion policy of the queue: all completes only when every task is done while any completes with the first done task. */
|
|
266
|
-
export declare function queuecomplete(queue: taskqueue): boolean;
|
|
267
|
-
/** Counts the tasks by claim state for the popup gauge: the claimed tasks are the active work of the swarm. */
|
|
268
|
-
export declare function taskcounts(queue: taskqueue): {
|
|
269
|
-
queued: number;
|
|
270
|
-
claimed: number;
|
|
271
|
-
done: number;
|
|
272
|
-
cancelled: number;
|
|
273
|
-
};
|
|
274
|
-
import type { actionrisk, blackboard, blackboardentry, blackboardsection } from "./types.js";
|
|
275
|
-
/**
|
|
276
|
-
* Blackboard shared memory logic of the 1.1.58 multi agent family.
|
|
277
|
-
* Every correlated rule for the shared sections, posting with authors, reading with freshness filters, retirement by the user configured window and the consent class inheritance of the source extraction lives in this file.
|
|
278
|
-
* Every agent of the swarm reads the same board: the writes of one agent are visible to every other agent with no relay.
|
|
279
|
-
*/
|
|
280
|
-
/** The blackboard sections the swarm shares by default; the user may narrow the list to the sections in use. */
|
|
281
|
-
export declare const blackboardsections: blackboardsection[];
|
|
282
|
-
/** Builds one empty blackboard over the four shared sections with no retirement window; an absent window keeps every entry. */
|
|
283
|
-
export declare function emptyboard(sections?: blackboardsection[]): blackboard;
|
|
284
|
-
/** Writes one entry to a section with its author: the key and value stay the plain text the author typed, the section joins the board when it is new and the entry carries the consent class of its source extraction. */
|
|
285
|
-
export declare function postentry(input: {
|
|
286
|
-
board: blackboard;
|
|
287
|
-
id: string;
|
|
288
|
-
key: string;
|
|
289
|
-
value: string;
|
|
290
|
-
section: blackboardsection;
|
|
291
|
-
author: string;
|
|
292
|
-
valuekind?: "text" | "json";
|
|
293
|
-
consentclass?: actionrisk;
|
|
294
|
-
now: number;
|
|
295
|
-
}): blackboard;
|
|
296
|
-
/** True when one entry stayed fresh inside the window; an absent window keeps every entry fresh. */
|
|
297
|
-
export declare function entryfresh(entry: blackboardentry, now: number, window?: number): boolean;
|
|
298
|
-
/** Returns the entries of one section with freshness filters: retired entries stay out and an optional window keeps only the fresh ones; an absent section returns every live entry. */
|
|
299
|
-
export declare function readentries(input: {
|
|
300
|
-
board: blackboard;
|
|
301
|
-
section?: blackboardsection;
|
|
302
|
-
freshness?: number;
|
|
303
|
-
now: number;
|
|
304
|
-
}): blackboardentry[];
|
|
305
|
-
/** Retires the stale entries by the user configured policy: entries older than the retirement window of the board receive their retirement time while an absent window retires nothing. */
|
|
306
|
-
export declare function retireentries(input: {
|
|
307
|
-
board: blackboard;
|
|
308
|
-
now: number;
|
|
309
|
-
}): {
|
|
310
|
-
board: blackboard;
|
|
311
|
-
retired: string[];
|
|
312
|
-
};
|
|
313
|
-
/** Retires one entry by its id; the retired entry stays stored for the audit trail while the live reads stop showing it. */
|
|
314
|
-
export declare function retireentry(input: {
|
|
315
|
-
board: blackboard;
|
|
316
|
-
entryid: string;
|
|
317
|
-
now: number;
|
|
318
|
-
}): blackboard;
|
|
319
|
-
/** Inherits the consent class of the source extraction into one entry: the reader of the entry sees the class of the extraction it came from, so a sensitive extraction stays sensitive on the board. */
|
|
320
|
-
export declare function inheritconsent(entry: blackboardentry, sourcerisk: actionrisk): blackboardentry;
|
|
321
|
-
/** Summarizes the board for the panel: every section with its live entry count, its authors and the freshest posting time. */
|
|
322
|
-
export declare function boardsummary(board: blackboard, now: number): Array<{
|
|
323
|
-
section: blackboardsection;
|
|
324
|
-
entries: number;
|
|
325
|
-
authors: string[];
|
|
326
|
-
freshestat?: number;
|
|
327
|
-
}>;
|
|
328
|
-
//# sourceMappingURL=swarm.d.ts.map
|
package/dist/tools.d.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The tools module of the 1.1.90 consolidation: every correlated variation of the tool catalog and call runtime logic interned in this one file, so the module family carries one surface without duplicate variations.
|
|
3
|
-
* The correlation is the tools family: toolcatalog holds the catalog of the 1.1.54 agent protocol (the tool namespaces, the json schema layout of every tool def, the read and gated tools of the browser, workflow, memory and system domains, the catalog build, the name resolution and the per namespace listing); toolcalls holds the call runtime of the 1.1.56 agent protocol part three (the per client rate limits, the structured error mapping with its retry hints — exported here as callretryhintof so the session family keeps the canonical retryhintof — the idempotency replay window, the ordered batch calls, the tool dry runs, the tool mocks and the call contexts).
|
|
4
|
-
* No budget, window or mock is ever invented: every rate limit and idempotency window stays the user's choice, and no tool call ever bypasses the dispatch gates.
|
|
5
|
-
*/
|
|
6
|
-
import type { actionkind, actionrisk, toolcatalog, tooldef, toolnamespace, toolschema, toolschemaproperty, agentsession, agentplan, batchoutcome, callcontext, callratelimit, clientrecord, idempotencykey, idempotencyrecord, retryhint, structurederror, tooldryrun, toolmock, toolresult } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Tool catalog of the 1.1.54 and 1.1.55 agent protocol family, widened by the 1.1.84 mcp server mode.
|
|
9
|
-
* Every mcp tool definition, version and json schema lives in this file: the four tool domains (browser, workflow, memory and system) with their namespace prefixes, the version appended to every tooldef for compatibility checks, the json schema generation that maps every tool input to typed properties with required markers and default values, the plain language descriptions that state the consent class and side effects of every tool and end with the openapi style field layout of their inputs, the consent metadata of the tools with side effects — the review requirement, the policy derived risk class, the approval gate requirement and the session origin scope — and the name resolution that keeps colliding base names apart through their namespace prefix. The 1.1.84 family adds the plan proposal tool with the full step grammar, the review gate tool that waits for the human answer, the observation read tool and the session record tool.
|
|
10
|
-
* The catalog stays pure data: policy validates it against the action kind grammar and the server lists it through the tools/list handshake, while no tool bypasses review — read only tools run under the dryrun risk class and every tool with side effects names the approved plan step it executes.
|
|
11
|
-
*/
|
|
12
|
-
/** The catalog version of the 1.1.84 family; every tooldef appends its own version for compatibility checks, and the bump to 2 adds the plan proposal, review gate, observation and session tools with the openapi style field layout of every description. */
|
|
13
|
-
export declare const toolcatalogversion = 2;
|
|
14
|
-
/** The tool namespaces the catalog serves, in the documented order of the panel view. */
|
|
15
|
-
export declare const toolnamespaces: toolnamespace[];
|
|
16
|
-
/** The reviewed action kinds of every namespace so policy can validate that tools stay in their domain. */
|
|
17
|
-
export declare const domainkinds: Record<toolnamespace, actionkind[]>;
|
|
18
|
-
/** Builds the json schema of one tool input from its typed property map: required properties are listed and the options object carries the reviewed empty default. */
|
|
19
|
-
export declare function toolschemaof(properties: Record<string, toolschemaproperty>): toolschema;
|
|
20
|
-
/** Renders the openapi style field layout of one tool input schema: every property lists its name, its json schema type and its required star while a reviewed default renders after an equals sign, so every tool description ends with the same field layout an openapi document carries and a client reads the wire shape from the description alone. */
|
|
21
|
-
export declare function openapilayout(schema: toolschema): string;
|
|
22
|
-
/** Builds the full mcp tool catalog of the four domains with the catalog version stamped on every record and the openapi style field layout of its inputs appended to every description. */
|
|
23
|
-
export declare function buildtoolcatalog(): toolcatalog;
|
|
24
|
-
/** Returns every tool of the catalog flattened across the domains. */
|
|
25
|
-
export declare function alltools(catalog: toolcatalog): tooldef[];
|
|
26
|
-
/** Prefixes one base tool name with its namespace so tool names never collide across domains. */
|
|
27
|
-
export declare function toolname(namespace: toolnamespace, base: string): string;
|
|
28
|
-
/** Resolves one tool by its namespaced name; a bare name resolves only when exactly one tool of the catalog carries it, so colliding base names stay unambiguous through their prefix. */
|
|
29
|
-
export declare function resolvetool(catalog: toolcatalog, name: string): tooldef | undefined;
|
|
30
|
-
/** Returns the namespace of one tool name; names without a dot carry no namespace. */
|
|
31
|
-
export declare function namespaceof(name: string): toolnamespace | undefined;
|
|
32
|
-
/** Groups the tools of the catalog by namespace for the panel view and the tools/list report. */
|
|
33
|
-
export declare function toolsbynamespace(catalog: toolcatalog): Array<{
|
|
34
|
-
namespace: toolnamespace;
|
|
35
|
-
version: number;
|
|
36
|
-
tools: tooldef[];
|
|
37
|
-
}>;
|
|
38
|
-
/**
|
|
39
|
-
* Tool call runtime of the 1.1.56 agent protocol part three.
|
|
40
|
-
* Every call runtime concern lives in this file: the per client rate limits that count calls inside their window and answer excess with a structured error carrying its retry after, the structured error mapping that turns executor failures into codes with retry hints, the retry hint classification of retryable timeouts, busy windows and consent refusals, the idempotency keys that replay stored results inside their window and expire after it, the ordered batch calls that stop on the first error when the flag requests it, the tool dry runs that evaluate arguments and consent without side effects, the tool mocks that answer declared tools with canned results only in test contexts, and the call contexts that isolate the concurrent calls of concurrent clients while every call lands its audit entry with its idempotency key and outcome.
|
|
41
|
-
* The runtime stays consent-first: a dry run never mutates the page, a mock never touches the browser and a rate limit never invents a budget the user did not configure.
|
|
42
|
-
*/
|
|
43
|
-
/** The default idempotency replay window of five minutes; any user configured window wins and an absent window keeps the replay forever. */
|
|
44
|
-
export declare const defaultidempotencywindowms = 300000;
|
|
45
|
-
/** Counts one client tool call against its per client rate limit: a window past its end resets the counter, a configured budget refuses the call that would exceed it with its retry after window and an absent limit or budget keeps the client unbounded because no silent default ever applies. */
|
|
46
|
-
export declare function applyratelimit(input: {
|
|
47
|
-
limits: callratelimit[];
|
|
48
|
-
clientid: string;
|
|
49
|
-
now: number;
|
|
50
|
-
}): {
|
|
51
|
-
allowed: boolean;
|
|
52
|
-
used: number;
|
|
53
|
-
budget?: number;
|
|
54
|
-
retryafter?: number;
|
|
55
|
-
limit?: callratelimit;
|
|
56
|
-
limits: callratelimit[];
|
|
57
|
-
};
|
|
58
|
-
/** Builds one structured error with its code, message, retry hint and optional retry after window. */
|
|
59
|
-
export declare function structurederrorof(input: {
|
|
60
|
-
code: string;
|
|
61
|
-
message: string;
|
|
62
|
-
retryhint: retryhint;
|
|
63
|
-
retryafter?: number;
|
|
64
|
-
}): structurederror;
|
|
65
|
-
/** Classifies one failure into its retry hint: timeouts stay retryable, busy windows and rate limits wait for their retry after while consent refusals never retry. */
|
|
66
|
-
export declare function callretryhintof(failure: {
|
|
67
|
-
code?: string;
|
|
68
|
-
message?: string;
|
|
69
|
-
}): retryhint;
|
|
70
|
-
/** Maps one executor failure onto its structured error: the code and message ride the answer while the retry hint classifies the retryable timeouts, busy windows and consent refusals. */
|
|
71
|
-
export declare function maptoolerror(input: {
|
|
72
|
-
failure: {
|
|
73
|
-
code?: string;
|
|
74
|
-
message: string;
|
|
75
|
-
} | Error;
|
|
76
|
-
retryafter?: number;
|
|
77
|
-
}): structurederror;
|
|
78
|
-
/** Checks one idempotency key: a live record of the same client replays its stored result while an expired, foreign or unknown key reports why nothing replayed. */
|
|
79
|
-
export declare function checkidempotency(input: {
|
|
80
|
-
records: idempotencyrecord[];
|
|
81
|
-
key: idempotencykey;
|
|
82
|
-
clientid: string;
|
|
83
|
-
now: number;
|
|
84
|
-
}): {
|
|
85
|
-
replay?: toolresult;
|
|
86
|
-
record?: idempotencyrecord;
|
|
87
|
-
reason?: string;
|
|
88
|
-
};
|
|
89
|
-
/** Stores one idempotency record for replay: the key, the calling client, the tool and the result with its user configured window; a repeated key of the same client overwrites its record. */
|
|
90
|
-
export declare function recordidempotency(input: {
|
|
91
|
-
records: idempotencyrecord[];
|
|
92
|
-
key: idempotencykey;
|
|
93
|
-
clientid: string;
|
|
94
|
-
tool: string;
|
|
95
|
-
result: toolresult;
|
|
96
|
-
now: number;
|
|
97
|
-
window?: number;
|
|
98
|
-
}): idempotencyrecord[];
|
|
99
|
-
/** Expires the idempotency records past their window: expired records leave the live set while their keys never replay. */
|
|
100
|
-
export declare function expireidempotency(records: idempotencyrecord[], now: number): idempotencyrecord[];
|
|
101
|
-
/** Executes one ordered batch call: every member runs in order through the injected executor, each member lands its own outcome and the batch stops at the first error when the stop on error flag requests it. */
|
|
102
|
-
export declare function runbatch(input: {
|
|
103
|
-
calls: Array<{
|
|
104
|
-
id: string;
|
|
105
|
-
name: string;
|
|
106
|
-
params: Record<string, unknown>;
|
|
107
|
-
}>;
|
|
108
|
-
stoponerror: boolean;
|
|
109
|
-
now: number;
|
|
110
|
-
execute: (call: {
|
|
111
|
-
id: string;
|
|
112
|
-
name: string;
|
|
113
|
-
params: Record<string, unknown>;
|
|
114
|
-
}, index: number) => Promise<{
|
|
115
|
-
ok: boolean;
|
|
116
|
-
result?: toolresult;
|
|
117
|
-
error?: structurederror;
|
|
118
|
-
}>;
|
|
119
|
-
}): Promise<{
|
|
120
|
-
outcomes: batchoutcome[];
|
|
121
|
-
stoppedat?: string;
|
|
122
|
-
}>;
|
|
123
|
-
/** Runs one tool dry run: the arguments validate against the tool json schema, the same consent gates that guard execution evaluate the call and the record stays free of page mutations by construction because nothing ever executes. */
|
|
124
|
-
export declare function dryruntool(input: {
|
|
125
|
-
tool: tooldef;
|
|
126
|
-
params: Record<string, unknown>;
|
|
127
|
-
client: clientrecord;
|
|
128
|
-
session?: agentsession;
|
|
129
|
-
plan?: agentplan;
|
|
130
|
-
origin: string;
|
|
131
|
-
stepid?: string;
|
|
132
|
-
now: number;
|
|
133
|
-
callid?: string;
|
|
134
|
-
}): tooldryrun;
|
|
135
|
-
/** Applies one tool mock: a matching mock of a test context answers with its canned result without touching the browser while a mock outside a test context is refused and no mock leaves the call to the real gates. */
|
|
136
|
-
export declare function applymock(input: {
|
|
137
|
-
mocks: toolmock[];
|
|
138
|
-
tool: string;
|
|
139
|
-
}): {
|
|
140
|
-
result?: toolresult;
|
|
141
|
-
reason?: string;
|
|
142
|
-
};
|
|
143
|
-
/** Opens one isolated call context for a concurrent client call: the call id, the client, the tool and the markers of the 1.1.56 family ride the record while the chunk counter starts at zero. */
|
|
144
|
-
export declare function begincall(input: {
|
|
145
|
-
clientid: string;
|
|
146
|
-
tool: string;
|
|
147
|
-
callid?: string;
|
|
148
|
-
idempotencykey?: idempotencykey;
|
|
149
|
-
dryrun?: boolean;
|
|
150
|
-
batchid?: string;
|
|
151
|
-
now: number;
|
|
152
|
-
}): callcontext;
|
|
153
|
-
/** Closes one call context with its outcome: the context turns done or failed with its end time while the chunks counter and the partial result of a cancellation survive for the answer. */
|
|
154
|
-
export declare function endcall(input: {
|
|
155
|
-
contexts: callcontext[];
|
|
156
|
-
callid: string;
|
|
157
|
-
ok: boolean;
|
|
158
|
-
errorcode?: string;
|
|
159
|
-
partial?: toolresult;
|
|
160
|
-
now: number;
|
|
161
|
-
}): {
|
|
162
|
-
contexts: callcontext[];
|
|
163
|
-
context?: callcontext;
|
|
164
|
-
reason?: string;
|
|
165
|
-
};
|
|
166
|
-
/** Grades one batch call by its most sensitive member: the batch takes the sensitive grade when any member is sensitive and runs only behind the approval gates. */
|
|
167
|
-
export declare function batchrisk(calls: Array<{
|
|
168
|
-
risk: actionrisk;
|
|
169
|
-
}>): actionrisk;
|
|
170
|
-
//# sourceMappingURL=tools.d.ts.map
|