@buoy-gg/agent-core 7.0.43 → 7.0.45
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/lib/commonjs/catalog/catalog.g.js +2 -2
- package/lib/commonjs/catalog/catalog.source.json +1285 -401
- package/lib/commonjs/catalog/catalog.types.g.js +1 -1
- package/lib/commonjs/catalog/normalizeParams.js +2 -2
- package/lib/commonjs/catalog/snapshotReads.js +1 -1
- package/lib/commonjs/context/buildContextPack.js +1 -1
- package/lib/commonjs/effects/ledger.js +1 -1
- package/lib/commonjs/effects/storeDiff.js +1 -0
- package/lib/commonjs/engine/compactScreen.js +1 -0
- package/lib/commonjs/engine/effectFor.js +1 -1
- package/lib/commonjs/engine/planOnlyStop.js +1 -0
- package/lib/commonjs/engine/runAgentTurn.js +7 -7
- package/lib/commonjs/engine/systemPrompt.js +13 -6
- package/lib/commonjs/engine/verify.js +1 -1
- package/lib/commonjs/providers/openai.js +3 -5
- package/lib/commonjs/providers/types.js +1 -1
- package/lib/module/catalog/catalog.g.js +2 -2
- package/lib/module/catalog/catalog.source.json +1285 -401
- package/lib/module/catalog/catalog.types.g.js +1 -1
- package/lib/module/catalog/normalizeParams.js +1 -1
- package/lib/module/catalog/snapshotReads.js +1 -1
- package/lib/module/context/buildContextPack.js +1 -1
- package/lib/module/effects/ledger.js +1 -1
- package/lib/module/effects/storeDiff.js +1 -0
- package/lib/module/engine/compactScreen.js +1 -0
- package/lib/module/engine/effectFor.js +1 -1
- package/lib/module/engine/planOnlyStop.js +1 -0
- package/lib/module/engine/runAgentTurn.js +7 -7
- package/lib/module/engine/systemPrompt.js +13 -6
- package/lib/module/engine/verify.js +1 -1
- package/lib/module/providers/openai.js +3 -5
- package/lib/module/providers/types.js +1 -1
- package/lib/typescript/catalog/catalog.g.d.ts +3 -3
- package/lib/typescript/catalog/catalog.types.g.d.ts +7 -4
- package/lib/typescript/effects/ledger.d.ts +13 -0
- package/lib/typescript/effects/storeDiff.d.ts +23 -0
- package/lib/typescript/engine/compactScreen.d.ts +18 -0
- package/lib/typescript/engine/planOnlyStop.d.ts +22 -0
- package/lib/typescript/engine/runAgentTurn.d.ts +1 -1
- package/lib/typescript/providers/types.d.ts +8 -0
- package/lib/web/index.mjs +46 -41
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* GENERATED by scripts/gen-agent-catalog.mjs — do not edit.
|
|
3
3
|
* Source: packages/agent-core/src/catalog/catalog.source.json
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* 30 Buoy tools, 271 actions.
|
|
6
6
|
*/
|
|
7
7
|
import type { ToolDescriptor } from "../types";
|
|
8
8
|
export declare const CATALOG: ToolDescriptor[];
|
|
9
|
-
export declare const CATALOG_TOOL_COUNT =
|
|
10
|
-
export declare const CATALOG_ACTION_COUNT =
|
|
9
|
+
export declare const CATALOG_TOOL_COUNT = 30;
|
|
10
|
+
export declare const CATALOG_ACTION_COUNT = 271;
|
|
11
11
|
//# sourceMappingURL=catalog.g.d.ts.map
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* The catalog's tool ids and action names as types, so a wrong name fails
|
|
6
6
|
* at compile time. `catalog.g.ts` carries the data.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* 30 Buoy tools, 271 actions.
|
|
9
9
|
*/
|
|
10
|
-
export type CatalogToolId = "env" | "console" | "sentry" | "jotai" | "route-events" | "debug-borders" | "zustand" | "redux" | "impersonate" | "query" | "events" | "network" | "js-top" | "app" | "time-machine" | "clock" | "storage" | "highlight-updates" | "scenarios" | "perf-monitor" | "assets" | "tv-remote" | "focus-inspector" | "images" | "ask-buoy" | "push-notifications" | "image-overlay";
|
|
10
|
+
export type CatalogToolId = "env" | "console" | "sentry" | "jotai" | "route-events" | "debug-borders" | "zustand" | "redux" | "impersonate" | "query" | "events" | "network" | "js-top" | "app" | "time-machine" | "clock" | "lifecycle" | "location" | "permissions" | "storage" | "highlight-updates" | "scenarios" | "perf-monitor" | "assets" | "tv-remote" | "focus-inspector" | "images" | "ask-buoy" | "push-notifications" | "image-overlay";
|
|
11
11
|
export interface CatalogActionMap {
|
|
12
12
|
"env": "getSnapshot";
|
|
13
13
|
"console": "getSnapshot" | "clearEntries";
|
|
@@ -25,7 +25,10 @@ export interface CatalogActionMap {
|
|
|
25
25
|
"app": "ping" | "reloadApp";
|
|
26
26
|
"time-machine": "list" | "capture" | "captureBaseline" | "wipeAll" | "restore" | "preview" | "inspect" | "delete" | "rename" | "duplicate" | "setExclusions" | "setScope" | "setRestoreRoute";
|
|
27
27
|
"clock": "getState" | "setTime" | "shift" | "freeze" | "resume" | "setRate" | "reset" | "updateSettings" | "jumpToTokenExpiry" | "failNextRequest" | "stopTokenCheck";
|
|
28
|
-
"
|
|
28
|
+
"lifecycle": "getState" | "background" | "interrupt" | "returnToApp" | "memoryWarning" | "openUrl" | "pressBack" | "setColorScheme" | "setPower" | "resetPower" | "relaunch" | "runRecipe" | "clearReport" | "reset";
|
|
29
|
+
"location": "getState" | "setLocation" | "startRoute" | "pauseRoute" | "resumeRoute" | "stopRoute" | "seekRoute" | "setSpeed" | "enterRegion" | "exitRegion" | "setConditions" | "setSignal" | "setServices" | "tune" | "useRealLocation" | "reset" | "updateSettings" | "clearLog";
|
|
30
|
+
"permissions": "getState" | "setOverride" | "clearOverride" | "resetAll" | "requestReal" | "updateSettings" | "simulateReturnFromSettings" | "clearLog";
|
|
31
|
+
"storage": "getSnapshot" | "getRequiredKeys" | "async.getAllKeys" | "async.multiGet" | "async.getItem" | "async.setItem" | "async.removeItem" | "async.multiRemove" | "async.multiSet" | "async.clear" | "clearAppStorage" | "getEventDetail" | "clearEvents" | "timeTravel.undo" | "timeTravel.jump" | "mmkv.snapshot" | "mmkv.get" | "mmkv.set" | "mmkv.remove" | "secure.keys" | "secure.snapshot" | "secure.get" | "secure.set" | "secure.delete";
|
|
29
32
|
"highlight-updates": "describeScreen" | "tapElement" | "waitFor" | "beginMeasurement" | "endMeasurement" | "locateComponent" | "getRenderDetail" | "setEnabled" | "toggle" | "setSilentTracking" | "toggleFreeze" | "setSpotlight" | "clearRenderCounts" | "startTouchCapture" | "stopTouchCapture" | "clearTouchCapture" | "readTouchCapture";
|
|
30
33
|
"scenarios": "listScenarios" | "getScenario" | "save" | "acceptDraft" | "discardDraft" | "preview" | "run" | "deactivate" | "delete" | "setFolder" | "listFolders" | "getActive" | "export";
|
|
31
34
|
"perf-monitor": "setEnabled" | "startRecording" | "stopRecording" | "savePending" | "discardPending" | "mark" | "startAutomation" | "cancelAutomation" | "acknowledgeAutomation" | "refreshIndex" | "getAutomationConfig" | "setAutomationConfig" | "loadReport" | "deleteReport" | "deleteBatch" | "clearAll";
|
|
@@ -33,7 +36,7 @@ export interface CatalogActionMap {
|
|
|
33
36
|
"tv-remote": "arm" | "getEventsSince" | "setMenuCapture" | "disarm" | "clear";
|
|
34
37
|
"focus-inspector": "rescan" | "focusElement" | "setTracking" | "clearHistory";
|
|
35
38
|
"images": "list" | "getDetail" | "getCaptureStatus" | "retry" | "flash" | "proveSavings" | "setOverride" | "clearOverride" | "setNetworkMode" | "setBlankImages" | "hardReload" | "evictDisk" | "massAction" | "clearRecords" | "clearExpoCaches";
|
|
36
|
-
"ask-buoy": "listChanges" | "undoAll" | "retrieve" | "openProcedure";
|
|
39
|
+
"ask-buoy": "listChanges" | "undoChange" | "undoAll" | "retrieve" | "openProcedure";
|
|
37
40
|
"push-notifications": "getSnapshot" | "getCapabilities" | "getEvent" | "getPermissions" | "listPresented" | "refreshToken" | "setCaptureSession" | "clearCapturedEvents" | "scheduleLocal";
|
|
38
41
|
"image-overlay": "getSnapshot" | "listTargets" | "selectTarget" | "loadImage" | "setSettings" | "fitToScreen" | "resetSettings" | "remove";
|
|
39
42
|
}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* before the earlier one, or the earlier value is the one that survives.
|
|
21
21
|
*/
|
|
22
22
|
import type { DispatchFn } from "../types";
|
|
23
|
+
import { type StoreLeaf } from "./storeDiff";
|
|
23
24
|
export type AppliedEffect = {
|
|
24
25
|
kind: "network-override";
|
|
25
26
|
ruleId: string;
|
|
@@ -69,6 +70,18 @@ export type AppliedEffect = {
|
|
|
69
70
|
*/
|
|
70
71
|
wroteDigest?: string;
|
|
71
72
|
label: string;
|
|
73
|
+
} | {
|
|
74
|
+
/**
|
|
75
|
+
* A store edit (zustand.setState), reversible because the engine reads
|
|
76
|
+
* the store before and after the write. Holds only the leaves that
|
|
77
|
+
* changed, so undo puts back exactly those and leaves every other field
|
|
78
|
+
* — including ones the app synced in meanwhile — alone. See storeDiff.ts.
|
|
79
|
+
*/
|
|
80
|
+
kind: "store-write";
|
|
81
|
+
toolId: string;
|
|
82
|
+
storeName: string;
|
|
83
|
+
leaves: StoreLeaf[];
|
|
84
|
+
label: string;
|
|
72
85
|
} | {
|
|
73
86
|
/**
|
|
74
87
|
* A change whose exact inverse is one known call: arming a rule is
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** One value a write changed. `path` is object keys from the store root. */
|
|
2
|
+
export interface StoreLeaf {
|
|
3
|
+
path: string[];
|
|
4
|
+
before: unknown;
|
|
5
|
+
/** Fingerprint of what the write left, for the "changed since?" check. */
|
|
6
|
+
wroteDigest: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The leaves that differ between two snapshots of a store, or `undefined`
|
|
10
|
+
* when the write cannot be undone exactly. That is the case when it added or
|
|
11
|
+
* removed an object key: a merge cannot take a key away again, so restoring
|
|
12
|
+
* the old values would still leave the new key behind. Arrays count as one
|
|
13
|
+
* leaf, because the store adapter writes arrays whole.
|
|
14
|
+
*/
|
|
15
|
+
export declare function diffLeaves(before: unknown, after: unknown): StoreLeaf[] | undefined;
|
|
16
|
+
/** The value at `path`, and whether it was there at all. */
|
|
17
|
+
export declare function readLeaf(root: unknown, path: string[]): {
|
|
18
|
+
found: boolean;
|
|
19
|
+
value?: unknown;
|
|
20
|
+
};
|
|
21
|
+
/** A nested merge patch that sets each leaf's `before` value and nothing else. */
|
|
22
|
+
export declare function restorePatch(leaves: StoreLeaf[]): Record<string, unknown>;
|
|
23
|
+
//# sourceMappingURL=storeDiff.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the model reads from `highlight-updates.describeScreen`.
|
|
3
|
+
*
|
|
4
|
+
* The raw result on the BK order-item screen was 31k characters for 156
|
|
5
|
+
* elements: over the 24k result cap, so it arrived cut and the model spent its
|
|
6
|
+
* rounds paging through it with `retrieve` (add-whoppers hit the 16-round cap
|
|
7
|
+
* twice in the Luna benchmark, once tapping a stale nativeTag it dug up). Most
|
|
8
|
+
* of it was waste: screens still mounted UNDER the open one (the header
|
|
9
|
+
* appeared 16 times), a frame and tap point on every row that no action takes,
|
|
10
|
+
* and a Text row repeating the label of the button it sits in.
|
|
11
|
+
*
|
|
12
|
+
* This keeps every element the model could act on and every visible string,
|
|
13
|
+
* one line each, NEWEST FIRST. Native tags grow as views mount, so the screen
|
|
14
|
+
* opened last sorts to the top and the stack beneath it follows. The full
|
|
15
|
+
* result is still what the card renders; only the model's copy is compacted.
|
|
16
|
+
*/
|
|
17
|
+
export declare function compactScreen(result: unknown): unknown;
|
|
18
|
+
//# sourceMappingURL=compactScreen.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "announce a plan, then stop" ending.
|
|
3
|
+
*
|
|
4
|
+
* GPT-6 Luna (and others) sometimes end a turn with "I'll add the Whopper and
|
|
5
|
+
* place the order." and no tool call. The loop treats a round with no calls as
|
|
6
|
+
* the end of the turn, so the user is left with a promise and nothing done.
|
|
7
|
+
* When the last words announce work that has not started, the engine gives
|
|
8
|
+
* the model ONE more round with a plain note saying so (runAgentTurn). The same
|
|
9
|
+
* goes for a message that ends on a colon, introducing options it never sent.
|
|
10
|
+
* It never forces a call: the model may still answer that it is done or waiting.
|
|
11
|
+
*/
|
|
12
|
+
/** What the engine tells the model when it stopped on an announcement. */
|
|
13
|
+
export declare const PLAN_ONLY_NUDGE = "[Buoy, not the user: your last message said what you would do next but called no tool, so nothing ran and the turn would end there. If the task is not finished, make the next call now. If you are done, say so. If the user has to pick or answer, send the buoy_ui block (choice, confirm or input) now \u2014 text alone gives them nothing to tap.]";
|
|
14
|
+
/** What the engine tells the model when a turn ended with no words at all. */
|
|
15
|
+
export declare const SILENT_NUDGE = "[Buoy, not the user: you ended the turn without a word to the user. Tell them in a sentence or two what you found or did \u2014 a card alone does not say it.]";
|
|
16
|
+
/**
|
|
17
|
+
* True when the closing words promise an action that no call carried out.
|
|
18
|
+
* Looks at the last two sentences only: "I'll explain below" early in a
|
|
19
|
+
* finished answer is not a stop on a promise.
|
|
20
|
+
*/
|
|
21
|
+
export declare function announcesUnstartedWork(text: string): boolean;
|
|
22
|
+
//# sourceMappingURL=planOnlyStop.d.ts.map
|
|
@@ -179,7 +179,7 @@ export type StopReason =
|
|
|
179
179
|
"answered"
|
|
180
180
|
/** An Ask block (the model's or the gate's) ended the turn; the answer comes as the next user message. */
|
|
181
181
|
| "awaiting-user"
|
|
182
|
-
/** The model→tools→model cap (policy.maxSteps, default
|
|
182
|
+
/** The model→tools→model cap (policy.maxSteps, default 24). */
|
|
183
183
|
| "step-cap"
|
|
184
184
|
/** The wall-clock cap, approval time excluded. */
|
|
185
185
|
| "time-cap"
|
|
@@ -253,4 +253,12 @@ export interface Provider {
|
|
|
253
253
|
*/
|
|
254
254
|
send(req: ProviderRequest): AsyncGenerator<StreamEvent, void, void>;
|
|
255
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Marks a tool call whose arguments would not parse. The OpenAI provider used
|
|
258
|
+
* to end the whole turn on one: GPT-6 Luna once streamed 18,000 characters of
|
|
259
|
+
* whitespace as a `query` call's arguments and the user got an error instead
|
|
260
|
+
* of an answer. The call now reaches the engine with this key as its only
|
|
261
|
+
* input, and the engine answers it as a failed call the model can redo.
|
|
262
|
+
*/
|
|
263
|
+
export declare const UNPARSEABLE_ARGS = "__buoyUnparseableArgs";
|
|
256
264
|
//# sourceMappingURL=types.d.ts.map
|