@particle-academy/agent-integrations 0.46.0 → 0.47.1
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 +885 -0
- package/LICENSE +21 -0
- package/README.md +53 -3
- package/dist/bridges/artboard.d.cts +3 -3
- package/dist/bridges/artboard.d.ts +3 -3
- package/dist/bridges/catalog.d.cts +3 -3
- package/dist/bridges/catalog.d.ts +3 -3
- package/dist/bridges/charts.d.cts +3 -3
- package/dist/bridges/charts.d.ts +3 -3
- package/dist/bridges/cms.d.cts +3 -3
- package/dist/bridges/cms.d.ts +3 -3
- package/dist/bridges/code.d.cts +3 -3
- package/dist/bridges/code.d.ts +3 -3
- package/dist/bridges/doc.d.cts +3 -3
- package/dist/bridges/doc.d.ts +3 -3
- package/dist/bridges/features.d.cts +3 -3
- package/dist/bridges/features.d.ts +3 -3
- package/dist/bridges/files.d.cts +3 -3
- package/dist/bridges/files.d.ts +3 -3
- package/dist/bridges/flow.d.cts +3 -3
- package/dist/bridges/flow.d.ts +3 -3
- package/dist/bridges/forms.d.cts +3 -3
- package/dist/bridges/forms.d.ts +3 -3
- package/dist/bridges/git.d.cts +3 -3
- package/dist/bridges/git.d.ts +3 -3
- package/dist/bridges/grid.d.cts +3 -3
- package/dist/bridges/grid.d.ts +3 -3
- package/dist/bridges/map.d.cts +3 -3
- package/dist/bridges/map.d.ts +3 -3
- package/dist/bridges/navigation.d.cts +140 -0
- package/dist/bridges/navigation.d.ts +140 -0
- package/dist/bridges/passkeys.d.cts +4 -4
- package/dist/bridges/passkeys.d.ts +4 -4
- package/dist/bridges/scene.d.cts +3 -3
- package/dist/bridges/scene.d.ts +3 -3
- package/dist/bridges/screens.d.cts +3 -3
- package/dist/bridges/screens.d.ts +3 -3
- package/dist/bridges/sheets.d.cts +3 -3
- package/dist/bridges/sheets.d.ts +3 -3
- package/dist/bridges/slides.d.cts +3 -3
- package/dist/bridges/slides.d.ts +3 -3
- package/dist/bridges/terminal.d.cts +3 -3
- package/dist/bridges/terminal.d.ts +3 -3
- package/dist/bridges/tui.d.cts +2 -2
- package/dist/bridges/tui.d.ts +2 -2
- package/dist/bridges/whiteboard.d.cts +3 -3
- package/dist/bridges/whiteboard.d.ts +3 -3
- package/dist/bridges-navigation.cjs +437 -0
- package/dist/bridges-navigation.cjs.map +1 -0
- package/dist/bridges-navigation.js +7 -0
- package/dist/bridges-navigation.js.map +1 -0
- package/dist/bridges-passkeys.cjs.map +1 -1
- package/dist/bridges-passkeys.js +1 -1
- package/dist/{chunk-PWYEW6NL.js → chunk-G6CRHFWU.js} +2 -2
- package/dist/{chunk-PWYEW6NL.js.map → chunk-G6CRHFWU.js.map} +1 -1
- package/dist/chunk-OHNGURUJ.js +317 -0
- package/dist/chunk-OHNGURUJ.js.map +1 -0
- package/dist/dom-navigation/index.d.cts +175 -0
- package/dist/dom-navigation/index.d.ts +175 -0
- package/dist/dom-navigation/script.d.cts +3 -0
- package/dist/dom-navigation/script.d.ts +3 -0
- package/dist/dom-navigation-script.cjs +11 -0
- package/dist/dom-navigation-script.cjs.map +1 -0
- package/dist/dom-navigation-script.js +9 -0
- package/dist/dom-navigation-script.js.map +1 -0
- package/dist/dom-navigation.cjs +405 -0
- package/dist/dom-navigation.cjs.map +1 -0
- package/dist/dom-navigation.js +388 -0
- package/dist/dom-navigation.js.map +1 -0
- package/dist/index.cjs +94 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -125
- package/dist/index.d.ts +10 -125
- package/dist/index.js +12 -275
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.cts +5 -5
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/stdio.d.cts +3 -3
- package/dist/mcp/stdio.d.ts +3 -3
- package/dist/presence/index.d.cts +1 -1
- package/dist/presence/index.d.ts +1 -1
- package/dist/{server-BIcA3ZtK.d.cts → server-1y0n61R5.d.cts} +2 -2
- package/dist/{server-DnUyeavY.d.ts → server-vq6qVl3T.d.ts} +2 -2
- package/dist/sharing/index.d.cts +3 -3
- package/dist/sharing/index.d.ts +3 -3
- package/dist/sheets-adapter.d.cts +3 -3
- package/dist/sheets-adapter.d.ts +3 -3
- package/dist/{tool-host-LVBgCN5m.d.cts → tool-host-D67N2a2h.d.cts} +1 -1
- package/dist/{tool-host-Wo0pkY83.d.ts → tool-host-LYfdPE8u.d.ts} +1 -1
- package/dist/{types-EcElKOlk.d.cts → types-DP5yQZQU.d.cts} +1 -1
- package/dist/{types-BxNRKSVd.d.ts → types-VX_9je7w.d.ts} +1 -1
- package/dist/{types-C2DtnHIn.d.cts → types-gzIpsUDE.d.cts} +1 -1
- package/dist/{types-C2DtnHIn.d.ts → types-gzIpsUDE.d.ts} +1 -1
- package/dist/undo/index.d.cts +2 -2
- package/dist/undo/index.d.ts +2 -2
- package/package.json +35 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Particle Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -20,15 +20,15 @@ import "@particle-academy/agent-integrations/styles.css";
|
|
|
20
20
|
|
|
21
21
|
## Which version range to depend on
|
|
22
22
|
|
|
23
|
-
**Use a caret. `^0.
|
|
23
|
+
**Use a caret. `^0.46.0` is correct here, and it is deliberate.**
|
|
24
24
|
|
|
25
25
|
```jsonc
|
|
26
|
-
"@particle-academy/agent-integrations": "^0.
|
|
26
|
+
"@particle-academy/agent-integrations": "^0.46.0"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
This package is **pre-1.0, and breaking changes land in MINOR releases** — see
|
|
30
30
|
the note at the top of [`CHANGELOG.md`](./CHANGELOG.md). A caret on a `0.x` locks
|
|
31
|
-
the minor (npm reads `^0.
|
|
31
|
+
the minor (npm reads `^0.46.0` as `>=0.46.0 <0.47.0`), so it gives you patches and
|
|
32
32
|
holds you at a surface you have already integrated against. That is the right
|
|
33
33
|
default when the next minor may change something under you.
|
|
34
34
|
|
|
@@ -275,6 +275,56 @@ channel.listenForWhisper("mcp", (frame) => transport.deliverFromRemote(frame));
|
|
|
275
275
|
|
|
276
276
|
Agents (Claude Desktop, Cline, custom) connect to the same channel via your auth bridge.
|
|
277
277
|
|
|
278
|
+
## Drive a page you don't own — `./dom-navigation`
|
|
279
|
+
|
|
280
|
+
`registerNavigationBridge` (`page_describe`, `page_read`, `page_click`,
|
|
281
|
+
`page_set_field`, `nav_visit`, …) needs an adapter that walks the page's DOM.
|
|
282
|
+
`./dom-navigation` ships that walker framework-free, in two halves:
|
|
283
|
+
|
|
284
|
+
- **In the page:** `createDomNavigationAgent()` — stable handles
|
|
285
|
+
(`data-co-handle` → `name` → `id` → `role#index`), ARIA names, masking of
|
|
286
|
+
sensitive values (password, `cc-*`, `one-time-code`, `data-private`), field
|
|
287
|
+
writes that React-controlled inputs see, and rects. When your code does not
|
|
288
|
+
run in the page, inject `DOM_NAVIGATION_SCRIPT` from `./dom-navigation/script`
|
|
289
|
+
instead: a self-contained IIFE (no module system) that installs
|
|
290
|
+
`globalThis.__fancyDomNavigation`. Re-injecting is a no-op.
|
|
291
|
+
- **In the host:** `createRemoteNavigationAdapter({ transport })` — a
|
|
292
|
+
`NavigationBridgeAdapter` over any `{ call(method, args): Promise<unknown> }`.
|
|
293
|
+
Results from the page are coerced to the declared shapes; the page is hostile.
|
|
294
|
+
|
|
295
|
+
Electron, with the walker in an isolated world so the page cannot reach it:
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
import { DOM_NAVIGATION_SCRIPT } from "@particle-academy/agent-integrations/dom-navigation/script";
|
|
299
|
+
import { createRemoteNavigationAdapter, domNavigationCallScript } from "@particle-academy/agent-integrations/dom-navigation";
|
|
300
|
+
import { registerNavigationBridge } from "@particle-academy/agent-integrations/bridges/navigation";
|
|
301
|
+
|
|
302
|
+
const WORLD = 1001;
|
|
303
|
+
const wc = view.webContents;
|
|
304
|
+
const inject = () => wc.executeJavaScriptInIsolatedWorld(WORLD, [{ code: DOM_NAVIGATION_SCRIPT }]);
|
|
305
|
+
wc.on("dom-ready", inject); // every document needs its own copy
|
|
306
|
+
|
|
307
|
+
const adapter = createRemoteNavigationAdapter({
|
|
308
|
+
transport: {
|
|
309
|
+
call: (method, args) =>
|
|
310
|
+
wc.executeJavaScriptInIsolatedWorld(WORLD, [{ code: domNavigationCallScript(method, args) }]),
|
|
311
|
+
},
|
|
312
|
+
confirm: (req) => askTheHuman(req), // without this, submits + destructive clicks are NOT staged
|
|
313
|
+
});
|
|
314
|
+
registerNavigationBridge(server, { adapter });
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Adapter methods may return promises; the bridge awaits every call.
|
|
318
|
+
|
|
319
|
+
The page is treated as hostile all the way into the agent's context. The
|
|
320
|
+
bridge renders every page-supplied string on one line, with control characters
|
|
321
|
+
removed and the length capped, so a label cannot forge an extra action or
|
|
322
|
+
heading line. A handle that could pass for action syntax is shown as a `~N`
|
|
323
|
+
alias, and every handle-taking tool maps it back. For `read()`, return a
|
|
324
|
+
`PageReadout` (`{ title, headings, text }`) rather than a string. The bridge
|
|
325
|
+
can then keep the outline one heading per line, while a plain string is
|
|
326
|
+
rendered as one line.
|
|
327
|
+
|
|
278
328
|
## Tools shipped (whiteboard bridge)
|
|
279
329
|
|
|
280
330
|
| Tool | Purpose |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Transport-level JSON shapes. These intentionally mirror fancy-artboard's
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Transport-level JSON shapes. These intentionally mirror fancy-artboard's
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Headless bridge for `@particle-academy/fancy-catalog` — a Stripe catalog with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Headless bridge for `@particle-academy/fancy-catalog` — a Stripe catalog with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter wires a single fancy-echarts chart to the bridge. Charts are
|
package/dist/bridges/charts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter wires a single fancy-echarts chart to the bridge. Charts are
|
package/dist/bridges/cms.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
3
|
import { DocAdapter } from './doc.cjs';
|
|
4
4
|
import { StyledNode, StagePolicy, TreeOp, StyleProps, LayoutMode, DocReducer, DocTree } from '@particle-academy/fancy-doc-commons';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-gzIpsUDE.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* registerCmsBridge — the greenfield CMS agent bridge, built entirely on
|
package/dist/bridges/cms.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
3
|
import { DocAdapter } from './doc.js';
|
|
4
4
|
import { StyledNode, StagePolicy, TreeOp, StyleProps, LayoutMode, DocReducer, DocTree } from '@particle-academy/fancy-doc-commons';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-gzIpsUDE.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* registerCmsBridge — the greenfield CMS agent bridge, built entirely on
|
package/dist/bridges/code.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter the host wires to a fancy-code CodeEditor (typically via the
|
package/dist/bridges/code.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter the host wires to a fancy-code CodeEditor (typically via the
|
package/dist/bridges/doc.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { J as JsonObject } from '../types-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { J as JsonObject } from '../types-gzIpsUDE.cjs';
|
|
3
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
4
4
|
import { DocNode, DocTree, TreeOp, DocReducer, StagePolicy } from '@particle-academy/fancy-doc-commons';
|
|
5
5
|
|
|
6
6
|
/** Host-provided access to the document tree. */
|
package/dist/bridges/doc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { J as JsonObject } from '../types-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { J as JsonObject } from '../types-gzIpsUDE.js';
|
|
3
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
4
4
|
import { DocNode, DocTree, TreeOp, DocReducer, StagePolicy } from '@particle-academy/fancy-doc-commons';
|
|
5
5
|
|
|
6
6
|
/** Host-provided access to the document tree. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Headless bridge for `@particle-academy/fancy-features` — feature management
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Headless bridge for `@particle-academy/fancy-features` — feature management
|
package/dist/bridges/files.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
type FileKind = "file" | "dir";
|
|
6
6
|
type FileEntry = {
|
package/dist/bridges/files.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
type FileKind = "file" | "dir";
|
|
6
6
|
type FileEntry = {
|
package/dist/bridges/flow.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
type FlowNode = {
|
|
6
6
|
id: string;
|
package/dist/bridges/flow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
type FlowNode = {
|
|
6
6
|
id: string;
|
package/dist/bridges/forms.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Field descriptor — what the host says about each form field. Mirrors the
|
package/dist/bridges/forms.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Field descriptor — what the host says about each form field. Mirrors the
|
package/dist/bridges/git.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
type GitProposal = {
|
|
6
6
|
operation: string;
|
package/dist/bridges/git.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
type GitProposal = {
|
|
6
6
|
operation: string;
|
package/dist/bridges/grid.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose grid types — the public state shape of `@particle-academy/fancy-grid`,
|
package/dist/bridges/grid.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose grid types — the public state shape of `@particle-academy/fancy-grid`,
|
package/dist/bridges/map.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
4
|
|
|
5
5
|
type LatLng = {
|
|
6
6
|
lat: number;
|
package/dist/bridges/map.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as ToolHost } from '../tool-host-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
3
|
-
import '../types-
|
|
1
|
+
import { T as ToolHost } from '../tool-host-LYfdPE8u.js';
|
|
2
|
+
import { B as Bridge } from '../types-VX_9je7w.js';
|
|
3
|
+
import '../types-gzIpsUDE.js';
|
|
4
4
|
|
|
5
5
|
type LatLng = {
|
|
6
6
|
lat: number;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { T as ToolHost } from '../tool-host-D67N2a2h.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-DP5yQZQU.cjs';
|
|
3
|
+
import '../types-gzIpsUDE.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One interactive element the agent can act on, addressed by a STABLE handle
|
|
7
|
+
* (not a CSS selector) so the agent drives the page the Human+ way — never DOM
|
|
8
|
+
* scraping. The host builds these in `describe()` (data-co-handle → name/id →
|
|
9
|
+
* ARIA role + accessible name).
|
|
10
|
+
*/
|
|
11
|
+
type PageAction = {
|
|
12
|
+
/** Stable, opaque handle the agent passes back to act on this element. */
|
|
13
|
+
handle: string;
|
|
14
|
+
/** ARIA-ish role: "link" | "button" | "textbox" | "checkbox" | "select" | … */
|
|
15
|
+
role: string;
|
|
16
|
+
/** Accessible name / label. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Current value for inputs (omitted/masked for sensitive fields). */
|
|
19
|
+
value?: unknown;
|
|
20
|
+
/** True when activating this is destructive / submits (agent should stage). */
|
|
21
|
+
destructive?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** The page as the agent sees it: where it is + what it can do. */
|
|
24
|
+
type PageSnapshot = {
|
|
25
|
+
url: string;
|
|
26
|
+
title: string;
|
|
27
|
+
actions: PageAction[];
|
|
28
|
+
/** Monotonic host revision. Human input advances it and invalidates stale agent intent. */
|
|
29
|
+
revision?: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Structured page text. Preferred over a plain string from `read()`: the bridge
|
|
33
|
+
* can then put every page-supplied string on its own single line and keep the
|
|
34
|
+
* outline. A plain string is untrusted as a whole and is rendered as ONE line.
|
|
35
|
+
*/
|
|
36
|
+
type PageReadout = {
|
|
37
|
+
title: string;
|
|
38
|
+
headings: Array<{
|
|
39
|
+
level: number;
|
|
40
|
+
text: string;
|
|
41
|
+
}>;
|
|
42
|
+
text: string;
|
|
43
|
+
};
|
|
44
|
+
/** A write the host may want the human to confirm (trust-but-verify). */
|
|
45
|
+
type NavigationConfirmRequest = {
|
|
46
|
+
action: "submit" | "click";
|
|
47
|
+
handle: string;
|
|
48
|
+
label: string;
|
|
49
|
+
};
|
|
50
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Host-provided adapter. In the sandbox this is backed by Inertia's `router` +
|
|
53
|
+
* the DOM walker from `@particle-academy/agent-integrations/dom-navigation`.
|
|
54
|
+
* Every method works on stable handles, never raw selectors.
|
|
55
|
+
*
|
|
56
|
+
* Any method may return a Promise: a host driving a page it does not run in
|
|
57
|
+
* (an Electron WebContentsView, via `createRemoteNavigationAdapter`) can only
|
|
58
|
+
* answer asynchronously. The bridge awaits every call.
|
|
59
|
+
*/
|
|
60
|
+
type NavigationBridgeAdapter = {
|
|
61
|
+
/** Optional fancy-screens screen id for presence targeting. */
|
|
62
|
+
screenId?: string;
|
|
63
|
+
/** Current location. */
|
|
64
|
+
getLocation: () => MaybePromise<{
|
|
65
|
+
url: string;
|
|
66
|
+
title: string;
|
|
67
|
+
}>;
|
|
68
|
+
/** Current human-control revision. Omit to disable stale-intent protection. */
|
|
69
|
+
getRevision?: () => MaybePromise<number>;
|
|
70
|
+
/** Snapshot of the page's actionable elements (stable handles + labels). */
|
|
71
|
+
describe: () => MaybePromise<PageSnapshot>;
|
|
72
|
+
/** Visible text / heading outline for grounding (optional). Prefer a {@link PageReadout}. */
|
|
73
|
+
read?: () => MaybePromise<string | PageReadout>;
|
|
74
|
+
/** Navigate to a URL (host wires to router.visit). */
|
|
75
|
+
visit: (url: string) => void | Promise<void>;
|
|
76
|
+
back?: () => void | Promise<void>;
|
|
77
|
+
forward?: () => void | Promise<void>;
|
|
78
|
+
/** Scroll to coords or to a handle's element. */
|
|
79
|
+
scrollTo: (opts: {
|
|
80
|
+
x?: number;
|
|
81
|
+
y?: number;
|
|
82
|
+
handle?: string;
|
|
83
|
+
}) => void | Promise<void>;
|
|
84
|
+
scrollBy: (dy: number) => void | Promise<void>;
|
|
85
|
+
/** Set a field's value by handle (host dispatches input/change for React). */
|
|
86
|
+
setField: (handle: string, value: unknown) => MaybePromise<{
|
|
87
|
+
ok: boolean;
|
|
88
|
+
error?: string;
|
|
89
|
+
}>;
|
|
90
|
+
/** Activate an element by handle. */
|
|
91
|
+
click: (handle: string) => MaybePromise<{
|
|
92
|
+
ok: boolean;
|
|
93
|
+
error?: string;
|
|
94
|
+
}>;
|
|
95
|
+
/** Submit a form by handle. */
|
|
96
|
+
submit: (handle: string) => Promise<{
|
|
97
|
+
ok: boolean;
|
|
98
|
+
error?: string;
|
|
99
|
+
}> | {
|
|
100
|
+
ok: boolean;
|
|
101
|
+
error?: string;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Viewport rect of a handle's element, for agent-presence rendering (cursor +
|
|
105
|
+
* highlight). Returned in tool `meta.rect` so `<CoBrowseCursorLayer>` can show
|
|
106
|
+
* the agent acting on the page. Optional — omit and there's just no cursor.
|
|
107
|
+
*/
|
|
108
|
+
rectFor?: (handle: string) => MaybePromise<{
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
width: number;
|
|
112
|
+
height: number;
|
|
113
|
+
} | null>;
|
|
114
|
+
/**
|
|
115
|
+
* Trust-but-verify hook. When `pendingMode` is on, `page_submit` and
|
|
116
|
+
* destructive `page_click` route through this; the host shows a prompt and
|
|
117
|
+
* resolves true (proceed) / false (declined).
|
|
118
|
+
*/
|
|
119
|
+
confirm?: (req: NavigationConfirmRequest) => Promise<boolean>;
|
|
120
|
+
};
|
|
121
|
+
type NavigationBridgeOptions = {
|
|
122
|
+
adapter: NavigationBridgeAdapter;
|
|
123
|
+
/** Identity tagged into activity events (so the human sees who's driving). */
|
|
124
|
+
agent?: {
|
|
125
|
+
id: string;
|
|
126
|
+
name?: string;
|
|
127
|
+
color?: string;
|
|
128
|
+
};
|
|
129
|
+
/** Route submit + destructive clicks through `adapter.confirm`. Default true. */
|
|
130
|
+
pendingMode?: boolean;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* registerNavigationBridge — site-wide co-browsing. Lets a connected agent
|
|
134
|
+
* navigate, scroll, and (with staged confirm) fill + click any page, addressed
|
|
135
|
+
* by stable handles. Pairs with `useCoBrowseSession` (server + relay) and
|
|
136
|
+
* `<CoBrowsePresence>` (the human's view of the agent). The 12th Fancy bridge.
|
|
137
|
+
*/
|
|
138
|
+
declare function registerNavigationBridge(host: ToolHost, options: NavigationBridgeOptions): Bridge;
|
|
139
|
+
|
|
140
|
+
export { type NavigationBridgeAdapter, type NavigationBridgeOptions, type NavigationConfirmRequest, type PageAction, type PageReadout, type PageSnapshot, registerNavigationBridge };
|