@wenathlan/extension 1.1.57 → 1.1.59
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/README.md +5 -3
- package/dist/agentmailbox.d.ts +42 -0
- package/dist/agentmailbox.d.ts.map +1 -0
- package/dist/blackboard.d.ts +55 -0
- package/dist/blackboard.d.ts.map +1 -0
- package/dist/coordination.d.ts +139 -0
- package/dist/coordination.d.ts.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4467 -3447
- package/dist/index.js.map +4 -4
- package/dist/memory.d.ts +111 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/multiagent.d.ts +151 -0
- package/dist/multiagent.d.ts.map +1 -0
- package/dist/orchestration.d.ts +174 -0
- package/dist/orchestration.d.ts.map +1 -0
- package/dist/policy.d.ts +80 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/protocol.d.ts +93 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/taskqueue.d.ts +97 -0
- package/dist/taskqueue.d.ts.map +1 -0
- package/dist/types.d.ts +460 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/extension/dist/background.js +5449 -3874
- package/extension/dist/background.js.map +4 -4
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/pagebridge.js.map +1 -1
- package/extension/dist/popup.html +1 -1
- package/extension/dist/popup.js +12 -0
- package/extension/dist/popup.js.map +2 -2
- package/extension/dist/sidepanel.html +1 -1
- package/extension/dist/sidepanel.js +889 -0
- package/extension/dist/sidepanel.js.map +3 -3
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { taskitem, taskqueue } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Shared task queue logic of the 1.1.58 multi agent family.
|
|
4
|
+
* Every correlated rule for lanes, priorities, claims, work stealing with lane ownership, completion, heartbeats and the requeue of orphaned tasks lives in this file.
|
|
5
|
+
* 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.
|
|
6
|
+
*/
|
|
7
|
+
/** 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. */
|
|
8
|
+
export interface laneownership {
|
|
9
|
+
lane: string;
|
|
10
|
+
roles: string[];
|
|
11
|
+
}
|
|
12
|
+
/** 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. */
|
|
13
|
+
export declare function emptyqueue(input?: {
|
|
14
|
+
lanes?: string[];
|
|
15
|
+
priorities?: number[];
|
|
16
|
+
completionpolicy?: "all" | "any";
|
|
17
|
+
}): taskqueue;
|
|
18
|
+
/** 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. */
|
|
19
|
+
export declare function enqueue(input: {
|
|
20
|
+
queue: taskqueue;
|
|
21
|
+
id: string;
|
|
22
|
+
lane: string;
|
|
23
|
+
priority: number;
|
|
24
|
+
payload: string;
|
|
25
|
+
now: number;
|
|
26
|
+
}): taskqueue;
|
|
27
|
+
/** 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. */
|
|
28
|
+
export declare function claim(input: {
|
|
29
|
+
queue: taskqueue;
|
|
30
|
+
agentid: string;
|
|
31
|
+
now: number;
|
|
32
|
+
}): {
|
|
33
|
+
queue: taskqueue;
|
|
34
|
+
task?: taskitem;
|
|
35
|
+
};
|
|
36
|
+
/** 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. */
|
|
37
|
+
export declare function steal(input: {
|
|
38
|
+
queue: taskqueue;
|
|
39
|
+
agentid: string;
|
|
40
|
+
role: string;
|
|
41
|
+
fromlane: string;
|
|
42
|
+
ownership?: laneownership[];
|
|
43
|
+
now: number;
|
|
44
|
+
}): {
|
|
45
|
+
queue: taskqueue;
|
|
46
|
+
task?: taskitem;
|
|
47
|
+
};
|
|
48
|
+
/** Marks one task done and releases the claim of the agent that held it. */
|
|
49
|
+
export declare function complete(input: {
|
|
50
|
+
queue: taskqueue;
|
|
51
|
+
taskid: string;
|
|
52
|
+
now: number;
|
|
53
|
+
}): taskqueue;
|
|
54
|
+
/** Cancels one queued or claimed task; the cancelled task releases its claim and leaves the queue. */
|
|
55
|
+
export declare function canceltask(input: {
|
|
56
|
+
queue: taskqueue;
|
|
57
|
+
taskid: string;
|
|
58
|
+
now: number;
|
|
59
|
+
}): taskqueue;
|
|
60
|
+
/** Refreshes the heartbeats of every live claim of one agent so a working agent keeps its tasks. */
|
|
61
|
+
export declare function claimheartbeat(input: {
|
|
62
|
+
queue: taskqueue;
|
|
63
|
+
agentid: string;
|
|
64
|
+
now: number;
|
|
65
|
+
}): taskqueue;
|
|
66
|
+
/** 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. */
|
|
67
|
+
export declare function requeue(input: {
|
|
68
|
+
queue: taskqueue;
|
|
69
|
+
now: number;
|
|
70
|
+
window?: number;
|
|
71
|
+
}): {
|
|
72
|
+
queue: taskqueue;
|
|
73
|
+
requeued: string[];
|
|
74
|
+
};
|
|
75
|
+
/** 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. */
|
|
76
|
+
export declare function lanereport(queue: taskqueue): Array<{
|
|
77
|
+
lane: string;
|
|
78
|
+
queued: number;
|
|
79
|
+
claimed: number;
|
|
80
|
+
done: number;
|
|
81
|
+
cancelled: number;
|
|
82
|
+
claims: Array<{
|
|
83
|
+
agentid: string;
|
|
84
|
+
taskid: string;
|
|
85
|
+
heartbeatat: number;
|
|
86
|
+
}>;
|
|
87
|
+
}>;
|
|
88
|
+
/** Evaluates the completion policy of the queue: all completes only when every task is done while any completes with the first done task. */
|
|
89
|
+
export declare function queuecomplete(queue: taskqueue): boolean;
|
|
90
|
+
/** Counts the tasks by claim state for the popup gauge: the claimed tasks are the active work of the swarm. */
|
|
91
|
+
export declare function taskcounts(queue: taskqueue): {
|
|
92
|
+
queued: number;
|
|
93
|
+
claimed: number;
|
|
94
|
+
done: number;
|
|
95
|
+
cancelled: number;
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=taskqueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskqueue.d.ts","sourceRoot":"","sources":["../taskqueue.ts"],"names":[],"mappings":"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"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const protocolversion: "1.1.
|
|
1
|
+
export declare const protocolversion: "1.1.59";
|
|
2
2
|
/** Every reviewed action kind. Read kinds observe, interaction kinds move focus, sensitive kinds change page or browser state. */
|
|
3
3
|
export type actionkind = "observe" | "inspect" | "extract" | "wait" | "waitfor" | "waittext" | "readattribute" | "readstyle" | "readgeometry" | "readvalue" | "readtext" | "readhtml" | "countelements" | "readtable" | "readlinks" | "readimages" | "readmeta" | "readforms" | "readstorage" | "highlight" | "tablist" | "windowlist" | "tabsnapshot" | "focus" | "scroll" | "hover" | "clickdeep" | "rightclick" | "doubleclick" | "scrollpage" | "scrollby" | "scrollend" | "scrolltop" | "fullscreen" | "zoomset" | "click" | "type" | "navigate" | "select" | "presskey" | "drag" | "drop" | "upload" | "clear" | "check" | "uncheck" | "toggle" | "submit" | "reload" | "back" | "forward" | "writestorage" | "setattribute" | "removeattribute" | "evaluate" | "tabcreate" | "tabactivate" | "tabclose" | "tabreload" | "windowcreate" | "windowclose" | "windowresize" | "downloadfile" | "movepointer" | "clickpoint" | "shiftclick" | "clicktext" | "clickaria" | "clickname" | "resolvexpath" | "typetime" | "appendtext" | "setvalue" | "typeedit" | "keyhold" | "keyrelease" | "submitsearch" | "selectmulti" | "chooseradio" | "setslider" | "setdate" | "setcolor" | "expanddetails" | "dismissdialog" | "pierceshadow" | "enterframe" | "retryaction" | "mapclicks" | "verifyvisible" | "verifyenabled" | "a11ytree" | "readvisible" | "readertree" | "detectlists" | "detecttables" | "readjson" | "watchmutate" | "waitquiet" | "watchbanner" | "detectinfinitescroll" | "detectvirtual" | "detectlazy" | "readscrollpos" | "readlang" | "readoutline" | "countpages" | "listshadow" | "listframes" | "classifypage" | "fingerprintsection" | "diffsnapshots" | "readselection" | "watchfocus" | "detectsticky" | "detectscrolllock" | "readopengraph" | "detectlanguage" | "deriveselector" | "openlink" | "openprivate" | "reloadcache" | "stopnav" | "waitload" | "waiturl" | "followlink" | "spanav" | "spawait" | "rewritequery" | "setfragment" | "navlist" | "navprofile" | "detecthttp" | "readredirects" | "readfinalurl" | "handleauth" | "printpdf" | "prefetch" | "preconnect" | "deeplink" | "reopentab" | "trailaudit" | "pausenav" | "navintent" | "navrate" | "openclipboard" | "checksafe" | "batchopen" | "querytabs" | "duplicatetab" | "closepattern" | "pintab" | "mutetab" | "movetab" | "movetabwindow" | "grouptabs" | "colorgroup" | "collapsegroup" | "discardtab" | "reloadtabs" | "zoomin" | "zoomout" | "watchtab" | "switchtab" | "maximizewindow" | "minimizewindow" | "restorewindow" | "focuswindow" | "scratchwindow" | "incognitowindow" | "restoretab" | "savelayout" | "restorelayout" | "findclones" | "searchtabs" | "badgetab" | "attachmeta" | "listaudio" | "reopenrun" | "snapshotsession" | "fillform" | "filllabel" | "fillplaceholder" | "detectfields" | "generatevalues" | "saveprofiles" | "asksubmit" | "submitform" | "readerrors" | "retryform" | "runwizard" | "selectchain" | "picktypeahead" | "pickdate" | "attachfile" | "handoffcaptcha" | "fillcard" | "fillcode" | "consentpassword" | "skiphoneypot" | "detectlogin" | "detecttemplate" | "scrapetable" | "exportcsv" | "exportjson" | "exportexcel" | "copytable" | "pushsheets" | "importcsv" | "looprows" | "transformvalues" | "deduperows" | "paginateextract" | "mergepages" | "stamplerows" | "previewgrid" | "streamdisk" | "resumeextract" | "logprovenance" | "batchdownload" | "pausedownload" | "resumedownload" | "verifydownload" | "interceptmime" | "exportnetlog" | "readclipboard" | "writeclipboard" | "copyscreen" | "quarantinedownload" | "scanvirus" | "namecaptures" | "cleanupartifacts" | "shotview" | "shotfullpage" | "shotelement" | "shotregion" | "contactsheet" | "capturepdf" | "recordscreen" | "captureaudio" | "captureframe" | "downloadimages" | "shotcanvas" | "probestream" | "readmedia" | "readassets" | "timelapse" | "convertimage" | "makethumbs" | "fetchurl" | "parsejson" | "parsehtml" | "callrest" | "callgraphql" | "opensocket" | "sendmessage" | "waitmessage" | "watchrequests" | "readheaders" | "capturebodies" | "subscribesse" | "longpoll" | "mapapi" | "extractapi" | "blockrequest" | "mockresponse" | "rewriteheaders" | "setcookies" | "readcookies" | "clearcookies" | "authflow" | "saveapikey" | "routeproxy" | "postform" | "postfiles" | "watchconsole" | "watcherrors" | "watchtasks" | "attachcdp" | "detachcdp" | "cdpcmd" | "watchcdp" | "setbreakpoint" | "stepcode" | "watchexpr" | "overridescript" | "measureflow" | "heapshot" | "trackmemory" | "profilecpu" | "watchshifts" | "traceload" | "annotatetrace" | "replaytrace" | "capturesourcemaps" | "emulatedevice" | "emulatenetwork" | "emulatelocate" | "setuseragent" | "overridepermission" | "blackboxscripts" | "persiststate" | "capturesession" | "restoresession" | "namedsessions" | "diffsessions" | "searchsessions" | "exportsessions" | "importsessions" | "composeworkflow" | "savetemplate" | "runworkflow" | "dryrun" | "delay" | "waitelement" | "compute" | "extractvars" | "listruns" | "condition" | "branch" | "loop" | "repeatuntil" | "whileloop" | "foreach" | "parallel" | "trycatch" | "visitrule" | "urlrule" | "menurule" | "keyrule" | "buttonrule" | "cronrule" | "intervalrule" | "urllistrule" | "webhookrule" | "eventrule";
|
|
4
4
|
export type actionrisk = "read" | "interaction" | "sensitive";
|
|
5
5
|
export type planstate = "draft" | "pending" | "approved" | "rejected" | "expired" | "completed" | "cancelled";
|
|
6
|
-
export type auditkind = "configure" | "session" | "observe" | "proposal" | "approval" | "action" | "error" | "stop" | "pause" | "resume" | "complete" | "capability" | "tab" | "window" | "download" | "pointer" | "dialog" | "hold" | "retry" | "observation" | "watch" | "diff" | "navigation" | "redirect" | "auth" | "prefetch" | "rate" | "group" | "layout" | "discard" | "badge" | "fill" | "submit" | "consent" | "handoff" | "scrape" | "export" | "stream" | "provenance" | "resume" | "intercept" | "clipboard" | "quarantine" | "cleanup" | "capture" | "media" | "call" | "socket" | "replay" | "control" | "timeline" | "debugger" | "profile" | "emulation" | "workflow" | "trigger" | "protocol" | "tool" | "model";
|
|
6
|
+
export type auditkind = "configure" | "session" | "observe" | "proposal" | "approval" | "action" | "error" | "stop" | "pause" | "resume" | "complete" | "capability" | "tab" | "window" | "download" | "pointer" | "dialog" | "hold" | "retry" | "observation" | "watch" | "diff" | "navigation" | "redirect" | "auth" | "prefetch" | "rate" | "group" | "layout" | "discard" | "badge" | "fill" | "submit" | "consent" | "handoff" | "scrape" | "export" | "stream" | "provenance" | "resume" | "intercept" | "clipboard" | "quarantine" | "cleanup" | "capture" | "media" | "call" | "socket" | "replay" | "control" | "timeline" | "debugger" | "profile" | "emulation" | "workflow" | "trigger" | "protocol" | "tool" | "model" | "swarm";
|
|
7
7
|
/** Observation mode classes: passive capture, watched lifetimes and diffing passes. */
|
|
8
8
|
export type observationmode = "passive" | "watching" | "diffing";
|
|
9
9
|
export interface toolstep {
|
|
@@ -182,6 +182,20 @@ export interface runsettings {
|
|
|
182
182
|
runhistoryretention?: number;
|
|
183
183
|
/** Watchdog configuration of the workflow editor: the stall threshold and the recovery action stay user configured values with no code ceiling. */
|
|
184
184
|
watchdog?: watchdogconfig;
|
|
185
|
+
/** User configured ceiling on sub agent recursion depth of the swarm; an absent value stays unbounded because the cap stays a user choice only. */
|
|
186
|
+
swarmdepth?: number;
|
|
187
|
+
/** User configured claim expiry window in milliseconds: a queue claim whose heartbeat stays silent past the window releases and its task requeues; an absent window never expires a claim. */
|
|
188
|
+
claimwindow?: number;
|
|
189
|
+
/** Retention window for stored agent mailbox messages; an absent window keeps every message while the unread counters always survive. */
|
|
190
|
+
mailboxretention?: number;
|
|
191
|
+
/** User configured consensus quorum of the swarm: the number of yes votes a consensus round needs to carry; an absent value leaves the quorum to the round the user opens. */
|
|
192
|
+
swarmquorum?: number;
|
|
193
|
+
/** User configured ceiling on the worker lane of the leader worker topology; an absent value stays unbounded because the worker scale stays a user choice with no engine cap. */
|
|
194
|
+
swarmworkers?: number;
|
|
195
|
+
/** Retention window for stored progressboard snapshots; an absent window keeps every snapshot while the board itself always rebuilds from the live swarm state. */
|
|
196
|
+
boardretention?: number;
|
|
197
|
+
/** The verification methods the user allows the verifier agents to use; an empty or absent list keeps every method open as the documented user choice. */
|
|
198
|
+
verifiermethods?: string[];
|
|
185
199
|
}
|
|
186
200
|
export interface proposalrequest {
|
|
187
201
|
objective: string;
|
|
@@ -3657,4 +3671,448 @@ export interface tokenstream {
|
|
|
3657
3671
|
text: string;
|
|
3658
3672
|
done: boolean;
|
|
3659
3673
|
}
|
|
3674
|
+
/**
|
|
3675
|
+
* Multi agent part one contracts of the 1.1.58 family: agent identities bound to tabs with user named roles, the shared task queue with lanes, priorities, claims and work stealing, agent mailboxes with direct, broadcast and role addressed routing, the blackboard shared memory with its sections and entry kinds, per agent budgets and permission scopes, sub agent spawn requests with depth limits and the killswitch that halts every agent at once.
|
|
3676
|
+
* Every value here stays a user choice: the agent count, the role names, the lane names, the priority scale, the freshness windows and the depth ceilings carry no code default and no hardcoded cap, and every agent proposal still passes the same human review the single agent passed.
|
|
3677
|
+
*/
|
|
3678
|
+
/** The lifecycle states of one agent of the swarm: active, paused by the user or stopped. */
|
|
3679
|
+
export type agentstate = "active" | "paused" | "stopped";
|
|
3680
|
+
/** The role an agent plays. The five internal roles carry their documented defaults while the user may attach any custom role name; a custom role grades with the worker defaults until the user narrows its scope. */
|
|
3681
|
+
export type agentrole = "planner" | "worker" | "observer" | "critic" | "verifier" | (string & {});
|
|
3682
|
+
/** One agent identity of the swarm: the id, the user chosen name for dashboards and audit, the role, the bound tab and session, the parent of a sub agent with its depth, the lifecycle state and the per agent budget and scope the user configured. */
|
|
3683
|
+
export interface agentidentity {
|
|
3684
|
+
id: string;
|
|
3685
|
+
/** User chosen display name; the naming stays a user choice so dashboards and audit read the names the user typed. */
|
|
3686
|
+
name: string;
|
|
3687
|
+
role: agentrole;
|
|
3688
|
+
/** The tab this agent is bound to; one tab holds at most one agent. */
|
|
3689
|
+
tabid?: number;
|
|
3690
|
+
/** The session the bound tab runs under when one is active. */
|
|
3691
|
+
sessionid?: string;
|
|
3692
|
+
/** The parent agent id of a sub agent; a root agent carries none. */
|
|
3693
|
+
parentid?: string;
|
|
3694
|
+
/** The recursion depth of this agent; root agents sit at zero and every spawn adds one. */
|
|
3695
|
+
depth: number;
|
|
3696
|
+
state: agentstate;
|
|
3697
|
+
/** Per agent budget ceilings the user configured; absent ceilings stay unbounded. */
|
|
3698
|
+
budget?: agentbudget;
|
|
3699
|
+
/** Per agent permission scope; absent scope fields stay unbounded inside the session grants. */
|
|
3700
|
+
scope?: agentscope;
|
|
3701
|
+
/** Free form metadata the user attached for dashboards and audit. */
|
|
3702
|
+
metadata?: Record<string, unknown>;
|
|
3703
|
+
registeredat: number;
|
|
3704
|
+
heartbeatat?: number;
|
|
3705
|
+
}
|
|
3706
|
+
/** The claim states of one task item: queued waits for a claim, claimed runs under one agent, done completed and cancelled left the queue. */
|
|
3707
|
+
export type taskstatekind = "queued" | "claimed" | "done" | "cancelled";
|
|
3708
|
+
/** One task of the shared queue: the id, the lane it waits in, the user configured priority, the payload in plain language and the claim state. */
|
|
3709
|
+
export interface taskitem {
|
|
3710
|
+
id: string;
|
|
3711
|
+
lane: string;
|
|
3712
|
+
/** User configured priority; a higher number runs first inside the lane. */
|
|
3713
|
+
priority: number;
|
|
3714
|
+
/** The task payload in plain language; the review reads it exactly as typed. */
|
|
3715
|
+
payload: string;
|
|
3716
|
+
state: taskstatekind;
|
|
3717
|
+
enqueuedat: number;
|
|
3718
|
+
}
|
|
3719
|
+
/** One claim of a task by an agent: the agent id, the task id and the heartbeat time that keeps the claim alive. */
|
|
3720
|
+
export interface claimrecord {
|
|
3721
|
+
agentid: string;
|
|
3722
|
+
taskid: string;
|
|
3723
|
+
claimedat: number;
|
|
3724
|
+
heartbeatat: number;
|
|
3725
|
+
}
|
|
3726
|
+
/** The completion policy of a queue: all requires every task to complete while any completes with the first finished task. */
|
|
3727
|
+
export type queuecompletionpolicy = "all" | "any";
|
|
3728
|
+
/** The shared task queue of the swarm: the user configured lane names, the user configured priority scale, the completion policy, the task items and the live claims. */
|
|
3729
|
+
export interface taskqueue {
|
|
3730
|
+
/** Lane names the user configures; work stealing may cross lanes inside one approved swarm. */
|
|
3731
|
+
lanes: string[];
|
|
3732
|
+
/** The priority values the user configures; the scale itself stays a user choice. */
|
|
3733
|
+
priorities: number[];
|
|
3734
|
+
completionpolicy: queuecompletionpolicy;
|
|
3735
|
+
items: taskitem[];
|
|
3736
|
+
claims: claimrecord[];
|
|
3737
|
+
}
|
|
3738
|
+
/** The routing kinds of one agent message: direct to one agent, broadcast to every agent or addressed to a role. */
|
|
3739
|
+
export type messagerouting = "direct" | "broadcast" | "role";
|
|
3740
|
+
/** One message between agents: the sender id, the recipient (an agent id, the broadcast marker or a role name), the routing kind, the payload and the read tracking. */
|
|
3741
|
+
export interface agentmessage {
|
|
3742
|
+
id: string;
|
|
3743
|
+
senderid: string;
|
|
3744
|
+
/** The agent id of a direct message, the role name of a role addressed message or the broadcast marker `*`. */
|
|
3745
|
+
recipient: string;
|
|
3746
|
+
routing: messagerouting;
|
|
3747
|
+
payload: string;
|
|
3748
|
+
sentat: number;
|
|
3749
|
+
readat?: number;
|
|
3750
|
+
}
|
|
3751
|
+
/** One agent mailbox: the inbox of received messages, the outbox of sent messages and the unread count. */
|
|
3752
|
+
export interface agentmailbox {
|
|
3753
|
+
agentid: string;
|
|
3754
|
+
inbox: agentmessage[];
|
|
3755
|
+
outbox: agentmessage[];
|
|
3756
|
+
unread: number;
|
|
3757
|
+
}
|
|
3758
|
+
/** The blackboard sections the swarm shares: goals, facts, findings and scratch. */
|
|
3759
|
+
export type blackboardsection = "goals" | "facts" | "findings" | "scratch";
|
|
3760
|
+
/** The value kinds of one blackboard entry: plain text or a json payload. */
|
|
3761
|
+
export type blackboardvaluekind = "text" | "json";
|
|
3762
|
+
/** One blackboard entry: the key, the value kind and value, the author agent id or the user marker, the section, the consent class inherited from the source extraction and the retirement time. */
|
|
3763
|
+
export interface blackboardentry {
|
|
3764
|
+
id: string;
|
|
3765
|
+
key: string;
|
|
3766
|
+
valuekind: blackboardvaluekind;
|
|
3767
|
+
value: string;
|
|
3768
|
+
/** The author agent id or `user` for entries the human posted. */
|
|
3769
|
+
author: string;
|
|
3770
|
+
section: blackboardsection;
|
|
3771
|
+
/** The consent class of the source extraction this entry carries; every reader sees the class. */
|
|
3772
|
+
consentclass: actionrisk;
|
|
3773
|
+
postedat: number;
|
|
3774
|
+
retiredat?: number;
|
|
3775
|
+
}
|
|
3776
|
+
/** The blackboard shared memory of one swarm: the sections in use, every entry and the user configured retirement window; an absent window keeps every entry. */
|
|
3777
|
+
export interface blackboard {
|
|
3778
|
+
sections: blackboardsection[];
|
|
3779
|
+
entries: blackboardentry[];
|
|
3780
|
+
/** User configured freshness window in milliseconds; entries older than the window retire on the pass. */
|
|
3781
|
+
retirementwindow?: number;
|
|
3782
|
+
}
|
|
3783
|
+
/** One per agent budget: the token, cost and step ceilings the user configured; every ceiling is a user choice and an absent ceiling stays unbounded. */
|
|
3784
|
+
export interface agentbudget {
|
|
3785
|
+
agentid: string;
|
|
3786
|
+
maxtokens?: number;
|
|
3787
|
+
maxcost?: number;
|
|
3788
|
+
/** Ceiling on executed steps; an absent value never refuses a step. */
|
|
3789
|
+
maxsteps?: number;
|
|
3790
|
+
currency?: string;
|
|
3791
|
+
configuredat: number;
|
|
3792
|
+
}
|
|
3793
|
+
/** One per agent permission scope: the origins and the tool namespaces granted to the agent; the grants stay inside the session grant list. */
|
|
3794
|
+
export interface agentscope {
|
|
3795
|
+
agentid: string;
|
|
3796
|
+
origins: string[];
|
|
3797
|
+
toolnamespaces: toolnamespace[];
|
|
3798
|
+
}
|
|
3799
|
+
/** One spawn request of a sub agent: the parent id, the requested role, the task in plain language and the depth of the child. */
|
|
3800
|
+
export interface spawnrequest {
|
|
3801
|
+
parentid: string;
|
|
3802
|
+
role: agentrole;
|
|
3803
|
+
task: string;
|
|
3804
|
+
depth: number;
|
|
3805
|
+
}
|
|
3806
|
+
/** The depth limit of sub agent recursion the user configures; the killswitch and the refusal message read it exactly. */
|
|
3807
|
+
export interface depthlimit {
|
|
3808
|
+
/** User configured ceiling on sub agent recursion depth; an absent limit stays unbounded. */
|
|
3809
|
+
maxdepth?: number;
|
|
3810
|
+
}
|
|
3811
|
+
/** The killswitch state: engaged halts every agent of the swarm at once; the switch stays available with no configuration barrier. */
|
|
3812
|
+
export interface killswitch {
|
|
3813
|
+
engaged: boolean;
|
|
3814
|
+
engagedat?: number;
|
|
3815
|
+
reason?: string;
|
|
3816
|
+
}
|
|
3817
|
+
/** One recorded spawn of a sub agent with its depth for the audit history. */
|
|
3818
|
+
export interface spawnrecord {
|
|
3819
|
+
id: string;
|
|
3820
|
+
parentid: string;
|
|
3821
|
+
childid: string;
|
|
3822
|
+
role: agentrole;
|
|
3823
|
+
depth: number;
|
|
3824
|
+
at: number;
|
|
3825
|
+
}
|
|
3826
|
+
/** The per agent usage counters held against the agent budget: the accumulated tokens, cost and executed steps. */
|
|
3827
|
+
export interface agentusage {
|
|
3828
|
+
agentid: string;
|
|
3829
|
+
tokens: number;
|
|
3830
|
+
cost: number;
|
|
3831
|
+
steps: number;
|
|
3832
|
+
updatedat: number;
|
|
3833
|
+
}
|
|
3834
|
+
/** The lifecycle event kinds of the swarm: registration, role assignment, tab binding, spawn, pause, resume, stop, the killswitch, the queue events, the mailbox delivery and the blackboard writes. */
|
|
3835
|
+
export type agenteventkind = "register" | "assign" | "bind" | "spawn" | "pause" | "resume" | "stop" | "killall" | "enqueued" | "claimed" | "stole" | "completed" | "requeued" | "cancelled" | "delivered" | "posted" | "retired";
|
|
3836
|
+
/** One agent lifecycle event notification: the event kind, the agent and task it names, the summary in plain language and the time. */
|
|
3837
|
+
export interface agentevent {
|
|
3838
|
+
id: string;
|
|
3839
|
+
kind: agenteventkind;
|
|
3840
|
+
agentid?: string;
|
|
3841
|
+
taskid?: string;
|
|
3842
|
+
summary: string;
|
|
3843
|
+
at: number;
|
|
3844
|
+
}
|
|
3845
|
+
/** One swarm state snapshot: every agent identity, the shared task queue with its items and claims, every mailbox and the killswitch state. */
|
|
3846
|
+
export interface swarmstate {
|
|
3847
|
+
agents: agentidentity[];
|
|
3848
|
+
queue: taskqueue;
|
|
3849
|
+
mailboxes: agentmailbox[];
|
|
3850
|
+
killswitch: killswitch;
|
|
3851
|
+
}
|
|
3852
|
+
/**
|
|
3853
|
+
* Multi agent part two contracts of the 1.1.59 family: the leader worker topology with worker assignments, critic reviews and verifier checks over agent outputs, the planner executor split, tab handoffs between agents mid run, resource locks keyed by origin and selector with conflict scans, result merging with provenance into one report, the progressboard layout, review requests between agents, escalations that lift an agent decision to the user, arbitration rules that order competing resource claims and consensus rounds with quorum.
|
|
3854
|
+
* Every value here stays a user choice: the election rule, the worker scale bound, the quorum, the lock kinds and the merge rules carry no code default, and coordination never bypasses the human review.
|
|
3855
|
+
*/
|
|
3856
|
+
/** The verdict of one critic review: approve passes the output, changes demands the listed rework and reject refuses the output. */
|
|
3857
|
+
export type reviewverdict = "approve" | "changes" | "reject";
|
|
3858
|
+
/** The leader worker topology of one swarm: the leader agent id, the worker, critic and verifier lanes and every worker assignment; the rule names how the leader was elected. */
|
|
3859
|
+
export interface leaderworker {
|
|
3860
|
+
id: string;
|
|
3861
|
+
leaderid: string;
|
|
3862
|
+
workerids: string[];
|
|
3863
|
+
criticids: string[];
|
|
3864
|
+
verifierids: string[];
|
|
3865
|
+
assignments: workerassignment[];
|
|
3866
|
+
/** The user configured election rule that picked the leader: `first` takes the first registration while `named` takes the agent the user named. */
|
|
3867
|
+
rule: {
|
|
3868
|
+
kind: "first" | "named";
|
|
3869
|
+
agentid?: string;
|
|
3870
|
+
};
|
|
3871
|
+
electedat: number;
|
|
3872
|
+
}
|
|
3873
|
+
/** One assignment linking a worker to a task slice: the worker id, the task id, the slice description in plain language and the assignment time. */
|
|
3874
|
+
export interface workerassignment {
|
|
3875
|
+
workerid: string;
|
|
3876
|
+
taskid: string;
|
|
3877
|
+
/** The slice of the task this worker owns, in plain language; the review reads it exactly as typed. */
|
|
3878
|
+
slice: string;
|
|
3879
|
+
assignedat: number;
|
|
3880
|
+
}
|
|
3881
|
+
/** One critic review of an agent output: the critic agent, the reviewed agent and task, the verdict, the issues found and the changes the output requires. */
|
|
3882
|
+
export interface criticreview {
|
|
3883
|
+
id: string;
|
|
3884
|
+
reviewerid: string;
|
|
3885
|
+
subjectagentid: string;
|
|
3886
|
+
taskid?: string;
|
|
3887
|
+
verdict: reviewverdict;
|
|
3888
|
+
issues: string[];
|
|
3889
|
+
requiredchanges: string[];
|
|
3890
|
+
reviewedat: number;
|
|
3891
|
+
}
|
|
3892
|
+
/** The outcome of one verifier check: pass confirms the claim against the page while fail refutes it. */
|
|
3893
|
+
export type verifieroutcome = "pass" | "fail";
|
|
3894
|
+
/** One verifier check of a result claim: the verifier agent, the agent whose claim is checked, the claim in plain language, the method the verifier used and the pass or fail outcome with its evidence. */
|
|
3895
|
+
export interface verifiercheck {
|
|
3896
|
+
id: string;
|
|
3897
|
+
verifierid: string;
|
|
3898
|
+
claimagentid: string;
|
|
3899
|
+
taskid?: string;
|
|
3900
|
+
claim: string;
|
|
3901
|
+
/** The verification method the verifier used, named by the user; the method grade reads it. */
|
|
3902
|
+
method: string;
|
|
3903
|
+
outcome: verifieroutcome;
|
|
3904
|
+
evidence?: string;
|
|
3905
|
+
checkedat: number;
|
|
3906
|
+
}
|
|
3907
|
+
/** The planner executor split of one task: the plan owner agent drafts while the run owner agent executes, and the executor reports every step outcome back to the planner. */
|
|
3908
|
+
export interface plannerexecutor {
|
|
3909
|
+
id: string;
|
|
3910
|
+
planownerid: string;
|
|
3911
|
+
runownerid: string;
|
|
3912
|
+
taskid?: string;
|
|
3913
|
+
stepreports: executorreport[];
|
|
3914
|
+
splitat: number;
|
|
3915
|
+
}
|
|
3916
|
+
/** One step outcome an executor reports back to the planner agent: the step id, the outcome, the detail in plain language and the report time. */
|
|
3917
|
+
export interface executorreport {
|
|
3918
|
+
stepid: string;
|
|
3919
|
+
outcome: "done" | "failed";
|
|
3920
|
+
detail: string;
|
|
3921
|
+
reportedat: number;
|
|
3922
|
+
}
|
|
3923
|
+
/** The states of one tab handoff: prepared packages the transfer, transferred moved the tab binding and resumed continued the task from the packaged state. */
|
|
3924
|
+
export type handoffstate = "prepared" | "transferred" | "resumed";
|
|
3925
|
+
/** One handoff request: the transferring agent, the receiving agent, the tab id and the packaged task state with the reason; the transfer preserves the original session grants. */
|
|
3926
|
+
export interface handoffrequest {
|
|
3927
|
+
id: string;
|
|
3928
|
+
fromagentid: string;
|
|
3929
|
+
toagentid: string;
|
|
3930
|
+
tabid?: number;
|
|
3931
|
+
/** The packaged task state in plain language; the resume continues exactly from it. */
|
|
3932
|
+
taskstate: string;
|
|
3933
|
+
reason?: string;
|
|
3934
|
+
createdat: number;
|
|
3935
|
+
}
|
|
3936
|
+
/** One handoff record: from and to agents, the tab, the packaged task state, the handoff state and the transfer and resume times. */
|
|
3937
|
+
export interface handoffrecord {
|
|
3938
|
+
id: string;
|
|
3939
|
+
fromagentid: string;
|
|
3940
|
+
toagentid: string;
|
|
3941
|
+
tabid?: number;
|
|
3942
|
+
taskstate: string;
|
|
3943
|
+
state: handoffstate;
|
|
3944
|
+
reason?: string;
|
|
3945
|
+
createdat: number;
|
|
3946
|
+
transferredat?: number;
|
|
3947
|
+
resumedat?: number;
|
|
3948
|
+
}
|
|
3949
|
+
/** The kinds of one resource lock: exclusive holds the resource alone while shared admits further shared holders only. */
|
|
3950
|
+
export type lockkind = "exclusive" | "shared";
|
|
3951
|
+
/** One resource lock of the swarm: the key composed of exactly one origin and one selector so a lock never spans unrelated origins, the holder agent, the kind and the expiry. */
|
|
3952
|
+
export interface resourcelock {
|
|
3953
|
+
/** The lock key composed of the origin and the selector; the scope gate refuses keys that span more than one origin. */
|
|
3954
|
+
key: string;
|
|
3955
|
+
holder: string;
|
|
3956
|
+
kind: lockkind;
|
|
3957
|
+
origin: string;
|
|
3958
|
+
selector: string;
|
|
3959
|
+
acquiredat: number;
|
|
3960
|
+
/** User configured expiry time; a lock past its expiry returns to the pool on the sweep. */
|
|
3961
|
+
expiresat?: number;
|
|
3962
|
+
}
|
|
3963
|
+
/** One writer of a conflict scan: the agent, the origin and selector it targets and its task. */
|
|
3964
|
+
export interface conflictwriter {
|
|
3965
|
+
agentid: string;
|
|
3966
|
+
origin: string;
|
|
3967
|
+
selector: string;
|
|
3968
|
+
taskid?: string;
|
|
3969
|
+
}
|
|
3970
|
+
/** One conflict scan result: the writers examined, the overlapping targets with their writers, the suggested ordering and the clean marker when no writes overlap. */
|
|
3971
|
+
export interface conflictscan {
|
|
3972
|
+
id: string;
|
|
3973
|
+
writers: conflictwriter[];
|
|
3974
|
+
overlaps: Array<{
|
|
3975
|
+
origin: string;
|
|
3976
|
+
selector: string;
|
|
3977
|
+
writers: string[];
|
|
3978
|
+
}>;
|
|
3979
|
+
/** The suggested ordering of the writers for the overlapping targets, by agent id so the suggestion stays deterministic. */
|
|
3980
|
+
suggestedorder: string[];
|
|
3981
|
+
clean: boolean;
|
|
3982
|
+
scannedat: number;
|
|
3983
|
+
}
|
|
3984
|
+
/** The merge rules for duplicate rows and conflicting values: first keeps the earliest value, last keeps the latest, preferagent keeps the value of the agent the user named and fail refuses the merge. */
|
|
3985
|
+
export type mergerule = "first" | "last" | "preferagent" | "fail";
|
|
3986
|
+
/** One merge entry mapping a parallel result into the final report: the agent, its task, the key and value and the conflict resolution note when other agents wrote the same key. */
|
|
3987
|
+
export interface mergeentry {
|
|
3988
|
+
id: string;
|
|
3989
|
+
agentid: string;
|
|
3990
|
+
taskid?: string;
|
|
3991
|
+
key: string;
|
|
3992
|
+
value: string;
|
|
3993
|
+
/** The conflict resolution note in plain language; an entry without a conflict carries none. */
|
|
3994
|
+
conflict?: string;
|
|
3995
|
+
mergedat: number;
|
|
3996
|
+
}
|
|
3997
|
+
/** One section of a result report: the title, the merged entries and the agents that sourced them. */
|
|
3998
|
+
export interface reportsection {
|
|
3999
|
+
title: string;
|
|
4000
|
+
entries: mergeentry[];
|
|
4001
|
+
sources: string[];
|
|
4002
|
+
}
|
|
4003
|
+
/** One result report across agents: the sections, the contributing agent sources and the confidence the user reviews; every merged value keeps its provenance. */
|
|
4004
|
+
export interface resultreport {
|
|
4005
|
+
id: string;
|
|
4006
|
+
title: string;
|
|
4007
|
+
sections: reportsection[];
|
|
4008
|
+
sources: string[];
|
|
4009
|
+
/** The confidence in the report stated in plain language; the value stays what the agents reported, never an engine score. */
|
|
4010
|
+
confidence?: string;
|
|
4011
|
+
createdat: number;
|
|
4012
|
+
}
|
|
4013
|
+
/** One milestone of a progressboard lane: the label, the done marker and the time the milestone completed. */
|
|
4014
|
+
export interface boardmilestone {
|
|
4015
|
+
label: string;
|
|
4016
|
+
done: boolean;
|
|
4017
|
+
at?: number;
|
|
4018
|
+
}
|
|
4019
|
+
/** One lane of the progressboard: the agent, its role, its lifecycle state, its lane name, the current task and the milestones of its run. */
|
|
4020
|
+
export interface boardlane {
|
|
4021
|
+
agentid: string;
|
|
4022
|
+
name: string;
|
|
4023
|
+
role: string;
|
|
4024
|
+
state: string;
|
|
4025
|
+
lane: string;
|
|
4026
|
+
currenttask?: string;
|
|
4027
|
+
milestones: boardmilestone[];
|
|
4028
|
+
}
|
|
4029
|
+
/** The progressboard layout of one swarm: one lane per agent so the user reads every agent at once, with the milestones each agent reported. */
|
|
4030
|
+
export interface progressboard {
|
|
4031
|
+
id: string;
|
|
4032
|
+
lanes: boardlane[];
|
|
4033
|
+
builtat: number;
|
|
4034
|
+
}
|
|
4035
|
+
/** The states of one review request between agents: open waits, acked confirms receipt, answered carries the verdict and timeout expired unanswered. */
|
|
4036
|
+
export type reviewrequeststate = "open" | "acked" | "answered" | "timeout";
|
|
4037
|
+
/** One review request routed between agents: the requesting agent, the reviewing agent, the subject and payload and the ack, answer and timeout times. */
|
|
4038
|
+
export interface reviewrequest {
|
|
4039
|
+
id: string;
|
|
4040
|
+
fromagentid: string;
|
|
4041
|
+
toagentid: string;
|
|
4042
|
+
subject: string;
|
|
4043
|
+
payload: string;
|
|
4044
|
+
state: reviewrequeststate;
|
|
4045
|
+
requestedat: number;
|
|
4046
|
+
ackedat?: number;
|
|
4047
|
+
answeredat?: number;
|
|
4048
|
+
/** The user configured answer deadline; a request past it without an answer times out on the sweep. */
|
|
4049
|
+
timeoutat?: number;
|
|
4050
|
+
}
|
|
4051
|
+
/** One escalation that lifts an agent decision to the user: the agent, the subject, the full context and the decision only the user writes. */
|
|
4052
|
+
export interface escalationrecord {
|
|
4053
|
+
id: string;
|
|
4054
|
+
agentid: string;
|
|
4055
|
+
subject: string;
|
|
4056
|
+
context: string;
|
|
4057
|
+
state: "open" | "decided";
|
|
4058
|
+
/** The decision the user wrote; an open escalation carries none because escalations stay human decided. */
|
|
4059
|
+
decision?: string;
|
|
4060
|
+
raisedat: number;
|
|
4061
|
+
decidedat?: number;
|
|
4062
|
+
}
|
|
4063
|
+
/** The arbitration strategies that order competing resource claims: priority follows the user ordered agent list, age gives the oldest claim the resource and leader lets the elected leader decide. */
|
|
4064
|
+
export type arbitrationstrategy = "priority" | "age" | "leader";
|
|
4065
|
+
/** One arbitration rule the user configures: the strategy and, for the priority strategy, the agent order that wins competing claims. */
|
|
4066
|
+
export interface arbitrationrule {
|
|
4067
|
+
id: string;
|
|
4068
|
+
strategy: arbitrationstrategy;
|
|
4069
|
+
/** The user ordered agent ids of the priority strategy; the first named agent wins a competing claim. */
|
|
4070
|
+
priorityorder: string[];
|
|
4071
|
+
configuredat: number;
|
|
4072
|
+
}
|
|
4073
|
+
/** One vote of a consensus round: yes, no or abstain with the voting agent and the time. */
|
|
4074
|
+
export type consensusvote = "yes" | "no" | "abstain";
|
|
4075
|
+
/** One consensus round: the subject, the collected votes, the user configured quorum and the state the votes resolve. */
|
|
4076
|
+
export interface consensusround {
|
|
4077
|
+
id: string;
|
|
4078
|
+
subject: string;
|
|
4079
|
+
votes: Array<{
|
|
4080
|
+
agentid: string;
|
|
4081
|
+
vote: consensusvote;
|
|
4082
|
+
votedat: number;
|
|
4083
|
+
}>;
|
|
4084
|
+
/** The number of yes votes the round needs to carry; a user configured value with no engine default. */
|
|
4085
|
+
quorum: number;
|
|
4086
|
+
state: "open" | "carried" | "failed";
|
|
4087
|
+
openedat: number;
|
|
4088
|
+
closedat?: number;
|
|
4089
|
+
}
|
|
4090
|
+
/** One interleaved action of the swarm timeline: the kind, the agent it names, the summary in plain language and the time. */
|
|
4091
|
+
export interface swarmaction {
|
|
4092
|
+
id: string;
|
|
4093
|
+
kind: string;
|
|
4094
|
+
agentid?: string;
|
|
4095
|
+
summary: string;
|
|
4096
|
+
at: number;
|
|
4097
|
+
}
|
|
4098
|
+
/** The shared cost accounting of one swarm: the per agent usage summed into the swarm totals of tokens, cost and steps. */
|
|
4099
|
+
export interface swarmcost {
|
|
4100
|
+
agents: number;
|
|
4101
|
+
tokens: number;
|
|
4102
|
+
cost: number;
|
|
4103
|
+
steps: number;
|
|
4104
|
+
currency?: string;
|
|
4105
|
+
computedat: number;
|
|
4106
|
+
}
|
|
4107
|
+
/** One comparison of competing agent outputs for the user: the subject, the outputs per agent and the differences the comparison names. */
|
|
4108
|
+
export interface outputcomparison {
|
|
4109
|
+
id: string;
|
|
4110
|
+
subject: string;
|
|
4111
|
+
outputs: Array<{
|
|
4112
|
+
agentid: string;
|
|
4113
|
+
value: string;
|
|
4114
|
+
}>;
|
|
4115
|
+
differences: string[];
|
|
4116
|
+
comparedat: number;
|
|
4117
|
+
}
|
|
3660
4118
|
//# sourceMappingURL=types.d.ts.map
|