@particle-academy/agent-integrations 0.7.2 → 0.9.0
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/dist/bridges/artboard.d.cts +3 -3
- package/dist/bridges/artboard.d.ts +3 -3
- package/dist/bridges/charts.d.cts +3 -3
- package/dist/bridges/charts.d.ts +3 -3
- package/dist/bridges/code.d.cts +3 -3
- package/dist/bridges/code.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/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 +4 -3
- package/dist/bridges/slides.d.ts +4 -3
- package/dist/bridges/whiteboard.d.cts +3 -3
- package/dist/bridges/whiteboard.d.ts +3 -3
- package/dist/bridges-artboard.cjs +15 -54
- package/dist/bridges-artboard.cjs.map +1 -1
- package/dist/bridges-artboard.js +3 -3
- package/dist/bridges-charts.cjs +3 -5
- package/dist/bridges-charts.cjs.map +1 -1
- package/dist/bridges-charts.js +3 -3
- package/dist/bridges-code.cjs +3 -5
- package/dist/bridges-code.cjs.map +1 -1
- package/dist/bridges-code.js +3 -3
- package/dist/bridges-flow.cjs +3 -5
- package/dist/bridges-flow.cjs.map +1 -1
- package/dist/bridges-flow.js +2 -2
- package/dist/bridges-forms.cjs +3 -5
- package/dist/bridges-forms.cjs.map +1 -1
- package/dist/bridges-forms.js +3 -3
- package/dist/bridges-scene.cjs +3 -5
- package/dist/bridges-scene.cjs.map +1 -1
- package/dist/bridges-scene.js +3 -3
- package/dist/bridges-screens.cjs +3 -5
- package/dist/bridges-screens.cjs.map +1 -1
- package/dist/bridges-screens.js +3 -3
- package/dist/bridges-sheets.cjs +3 -5
- package/dist/bridges-sheets.cjs.map +1 -1
- package/dist/bridges-sheets.js +3 -3
- package/dist/bridges-slides.cjs +24 -5
- package/dist/bridges-slides.cjs.map +1 -1
- package/dist/bridges-slides.js +3 -3
- package/dist/bridges-whiteboard.cjs +10 -49
- package/dist/bridges-whiteboard.cjs.map +1 -1
- package/dist/bridges-whiteboard.js +4 -4
- package/dist/{chunk-3KSZNGNW.js → chunk-3QJSOS7G.js} +4 -4
- package/dist/{chunk-3KSZNGNW.js.map → chunk-3QJSOS7G.js.map} +1 -1
- package/dist/{chunk-4BL5M3U3.js → chunk-5AD35HS5.js} +3 -3
- package/dist/{chunk-4BL5M3U3.js.map → chunk-5AD35HS5.js.map} +1 -1
- package/dist/chunk-C3TYI5TJ.js +3 -0
- package/dist/chunk-C3TYI5TJ.js.map +1 -0
- package/dist/{chunk-57ZDHD53.js → chunk-CKK4QKD2.js} +3 -3
- package/dist/{chunk-57ZDHD53.js.map → chunk-CKK4QKD2.js.map} +1 -1
- package/dist/{chunk-LVQXIUJH.js → chunk-CPNOF4HI.js} +3 -3
- package/dist/{chunk-LVQXIUJH.js.map → chunk-CPNOF4HI.js.map} +1 -1
- package/dist/{chunk-HSTW7ZNO.js → chunk-FYGMFIY5.js} +3 -3
- package/dist/{chunk-HSTW7ZNO.js.map → chunk-FYGMFIY5.js.map} +1 -1
- package/dist/{chunk-RGO42EQ6.js → chunk-GHY3PBPN.js} +3 -3
- package/dist/{chunk-RGO42EQ6.js.map → chunk-GHY3PBPN.js.map} +1 -1
- package/dist/{chunk-IANI25IT.js → chunk-GSVVIT2O.js} +3 -3
- package/dist/{chunk-IANI25IT.js.map → chunk-GSVVIT2O.js.map} +1 -1
- package/dist/{chunk-ZHAK2DQR.js → chunk-J5KYPEYB.js} +3 -3
- package/dist/{chunk-ZHAK2DQR.js.map → chunk-J5KYPEYB.js.map} +1 -1
- package/dist/{chunk-5XELJIJR.js → chunk-KHKSQEMC.js} +3 -3
- package/dist/{chunk-5XELJIJR.js.map → chunk-KHKSQEMC.js.map} +1 -1
- package/dist/{chunk-GQ7XXK7G.js → chunk-KJ5AOOV7.js} +5 -46
- package/dist/chunk-KJ5AOOV7.js.map +1 -0
- package/dist/{chunk-7X5ZAU4P.js → chunk-R5OA26MJ.js} +26 -4
- package/dist/chunk-R5OA26MJ.js.map +1 -0
- package/dist/{chunk-NTDZWGYB.js → chunk-SJ7H242B.js} +3 -3
- package/dist/{chunk-NTDZWGYB.js.map → chunk-SJ7H242B.js.map} +1 -1
- package/dist/{chunk-X66JWQBB.js → chunk-UCKJAUBY.js} +3 -3
- package/dist/{chunk-X66JWQBB.js.map → chunk-UCKJAUBY.js.map} +1 -1
- package/dist/{chunk-52S7XYZK.js → chunk-ULJL53DL.js} +3 -3
- package/dist/{chunk-52S7XYZK.js.map → chunk-ULJL53DL.js.map} +1 -1
- package/dist/{chunk-XRAJSOPS.js → chunk-VUMFO2UW.js} +3 -3
- package/dist/{chunk-XRAJSOPS.js.map → chunk-VUMFO2UW.js.map} +1 -1
- package/dist/components/SharedWhiteboard/index.d.cts +3 -3
- package/dist/components/SharedWhiteboard/index.d.ts +3 -3
- package/dist/components-shared-whiteboard.cjs +13 -79
- package/dist/components-shared-whiteboard.cjs.map +1 -1
- package/dist/components-shared-whiteboard.js +6 -6
- package/dist/index.cjs +82 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.js +17 -17
- package/dist/mcp/index.d.cts +5 -5
- package/dist/mcp/index.d.ts +5 -5
- package/dist/presence/index.d.cts +10 -64
- package/dist/presence/index.d.ts +10 -64
- package/dist/presence.cjs +21 -37
- package/dist/presence.cjs.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/registry-TFWVXQOU.js +3 -0
- package/dist/{registry-2DRURS6U.js.map → registry-TFWVXQOU.js.map} +1 -1
- package/dist/{server-C2OpfPEo.d.cts → server-BsSwfemr.d.cts} +3 -3
- package/dist/{server-CKAqFTyc.d.ts → server-Du3-IGqM.d.ts} +3 -3
- package/dist/sharing/index.d.cts +4 -4
- package/dist/sharing/index.d.ts +4 -4
- package/dist/sharing.cjs +6 -34
- package/dist/sharing.cjs.map +1 -1
- package/dist/sharing.js +1 -1
- package/dist/sheets-adapter.cjs +2 -9
- package/dist/sheets-adapter.cjs.map +1 -1
- package/dist/sheets-adapter.d.cts +3 -3
- package/dist/sheets-adapter.d.ts +3 -3
- package/dist/sheets-adapter.js +2 -2
- package/dist/{token-C1O22GxJ.d.ts → token-CrJF76oH.d.cts} +1 -1
- package/dist/{token-C1O22GxJ.d.cts → token-CrJF76oH.d.ts} +1 -1
- package/dist/{tool-host-CX3WFXgh.d.cts → tool-host-BQuUygLF.d.cts} +1 -1
- package/dist/{tool-host-DldwGNqR.d.ts → tool-host-C8JMMGYq.d.ts} +1 -1
- package/dist/{types-Cq5u8MJ8.d.cts → types-CCSBGW9T.d.cts} +1 -1
- package/dist/{types-DyaHnqNC.d.ts → types-DIVNcIQO.d.ts} +1 -1
- package/dist/{types-C2zdUpzn.d.cts → types-aOQLTW0E.d.cts} +1 -1
- package/dist/{types-C2zdUpzn.d.ts → types-aOQLTW0E.d.ts} +1 -1
- package/dist/undo/index.d.cts +6 -43
- package/dist/undo/index.d.ts +6 -43
- package/dist/undo.cjs +31 -53
- package/dist/undo.cjs.map +1 -1
- package/dist/undo.js +2 -2
- package/package.json +188 -51
- package/dist/chunk-7X5ZAU4P.js.map +0 -1
- package/dist/chunk-GQ7XXK7G.js.map +0 -1
- package/dist/chunk-JU2N4KK6.js +0 -34
- package/dist/chunk-JU2N4KK6.js.map +0 -1
- package/dist/registry-2DRURS6U.js +0 -3
|
@@ -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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter wires a single fancy-echarts chart to the bridge. Charts are
|
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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Adapter the host wires to a fancy-code CodeEditor (typically via the
|
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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Field descriptor — what the host says about each form field. Mirrors the
|
package/dist/bridges/scene.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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose Scene types — mirror the public surface of fancy-3d's Scene
|
package/dist/bridges/scene.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose Scene types — mirror the public surface of fancy-3d's Scene
|
|
@@ -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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose snapshot of a screen — what's in fancy-screens' ScreenMeta plus
|
|
@@ -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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose snapshot of a screen — what's in fancy-screens' ScreenMeta plus
|
|
@@ -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-BQuUygLF.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
3
|
+
import '../types-aOQLTW0E.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose types — kept here so the bridge builds without a hard dep on
|
package/dist/bridges/sheets.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-C8JMMGYq.js';
|
|
2
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
3
|
+
import '../types-aOQLTW0E.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Loose types — kept here so the bridge builds without a hard dep on
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Deck, DeckOp } from '@particle-academy/fancy-slides';
|
|
2
2
|
export { reduceDeck } from '@particle-academy/fancy-slides';
|
|
3
|
-
import { T as ToolHost } from '../tool-host-
|
|
4
|
-
import { B as Bridge } from '../types-
|
|
5
|
-
import '../types-
|
|
3
|
+
import { T as ToolHost } from '../tool-host-BQuUygLF.cjs';
|
|
4
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
5
|
+
import '../types-aOQLTW0E.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Adapter — the bridge calls into these to read or change deck state. The
|
|
@@ -37,6 +37,7 @@ type SlidesBridgeOptions = {
|
|
|
37
37
|
*
|
|
38
38
|
* deck_describe read-only deck summary
|
|
39
39
|
* deck_get full deck JSON
|
|
40
|
+
* deck_set replace the whole deck (stream a presentation in)
|
|
40
41
|
* deck_set_title rename
|
|
41
42
|
* deck_apply_theme swap theme
|
|
42
43
|
* slide_list ordered list of slide ids + titles
|
package/dist/bridges/slides.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Deck, DeckOp } from '@particle-academy/fancy-slides';
|
|
2
2
|
export { reduceDeck } from '@particle-academy/fancy-slides';
|
|
3
|
-
import { T as ToolHost } from '../tool-host-
|
|
4
|
-
import { B as Bridge } from '../types-
|
|
5
|
-
import '../types-
|
|
3
|
+
import { T as ToolHost } from '../tool-host-C8JMMGYq.js';
|
|
4
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
5
|
+
import '../types-aOQLTW0E.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Adapter — the bridge calls into these to read or change deck state. The
|
|
@@ -37,6 +37,7 @@ type SlidesBridgeOptions = {
|
|
|
37
37
|
*
|
|
38
38
|
* deck_describe read-only deck summary
|
|
39
39
|
* deck_get full deck JSON
|
|
40
|
+
* deck_set replace the whole deck (stream a presentation in)
|
|
40
41
|
* deck_set_title rename
|
|
41
42
|
* deck_apply_theme swap theme
|
|
42
43
|
* slide_list ordered list of slide ids + titles
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StickyNoteItem, ShapeItem, ConnectorItem, Stroke, Viewport, RemoteCursor } from '@particle-academy/fancy-whiteboard';
|
|
2
|
-
import { T as ToolHost } from '../tool-host-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
4
|
-
import '../types-
|
|
2
|
+
import { T as ToolHost } from '../tool-host-BQuUygLF.cjs';
|
|
3
|
+
import { B as Bridge } from '../types-CCSBGW9T.cjs';
|
|
4
|
+
import '../types-aOQLTW0E.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* State accessors / mutators the bridge needs from the host. The host owns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StickyNoteItem, ShapeItem, ConnectorItem, Stroke, Viewport, RemoteCursor } from '@particle-academy/fancy-whiteboard';
|
|
2
|
-
import { T as ToolHost } from '../tool-host-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
4
|
-
import '../types-
|
|
2
|
+
import { T as ToolHost } from '../tool-host-C8JMMGYq.js';
|
|
3
|
+
import { B as Bridge } from '../types-DIVNcIQO.js';
|
|
4
|
+
import '../types-aOQLTW0E.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* State accessors / mutators the bridge needs from the host. The host owns
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var fancyAutoCommon = require('@particle-academy/fancy-auto-common');
|
|
4
|
+
|
|
3
5
|
// src/mcp/server.ts
|
|
4
6
|
function textResult(text, structured) {
|
|
5
7
|
return {
|
|
@@ -10,10 +12,6 @@ function textResult(text, structured) {
|
|
|
10
12
|
function errorResult(text) {
|
|
11
13
|
return { content: [{ type: "text", text }], isError: true };
|
|
12
14
|
}
|
|
13
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
14
|
-
function emitActivity(event) {
|
|
15
|
-
for (const l of listeners) l(event);
|
|
16
|
-
}
|
|
17
15
|
|
|
18
16
|
// src/presence/wrap-tool-with-activity.ts
|
|
19
17
|
function wrapToolWithActivity(handler, options) {
|
|
@@ -27,7 +25,7 @@ function wrapToolWithActivity(handler, options) {
|
|
|
27
25
|
target = { kind: options.kind, screenId: options.screenId };
|
|
28
26
|
}
|
|
29
27
|
if (!target) return result;
|
|
30
|
-
emitActivity({
|
|
28
|
+
fancyAutoCommon.emitActivity({
|
|
31
29
|
agentId: options.agent.id,
|
|
32
30
|
agentName: options.agent.name,
|
|
33
31
|
agentColor: options.agent.color,
|
|
@@ -48,43 +46,6 @@ function extractMeta(result) {
|
|
|
48
46
|
return void 0;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
// src/undo/undo-stack.ts
|
|
52
|
-
var stacks = /* @__PURE__ */ new Map();
|
|
53
|
-
var CAP = 200;
|
|
54
|
-
function getStack(agentId) {
|
|
55
|
-
let s = stacks.get(agentId);
|
|
56
|
-
if (!s) {
|
|
57
|
-
s = { past: [], future: [] };
|
|
58
|
-
stacks.set(agentId, s);
|
|
59
|
-
}
|
|
60
|
-
return s;
|
|
61
|
-
}
|
|
62
|
-
function pushUndoEntry(agentId, entry) {
|
|
63
|
-
const s = getStack(agentId);
|
|
64
|
-
s.past.push(entry);
|
|
65
|
-
if (s.past.length > CAP) s.past.splice(0, s.past.length - CAP);
|
|
66
|
-
s.future.length = 0;
|
|
67
|
-
}
|
|
68
|
-
async function undoOne(agentId) {
|
|
69
|
-
const s = getStack(agentId);
|
|
70
|
-
const entry = s.past.pop();
|
|
71
|
-
if (!entry) return null;
|
|
72
|
-
await entry.undo();
|
|
73
|
-
s.future.push(entry);
|
|
74
|
-
return entry;
|
|
75
|
-
}
|
|
76
|
-
async function redoOne(agentId) {
|
|
77
|
-
const s = getStack(agentId);
|
|
78
|
-
const entry = s.future.pop();
|
|
79
|
-
if (!entry) return null;
|
|
80
|
-
await entry.redo();
|
|
81
|
-
s.past.push(entry);
|
|
82
|
-
return entry;
|
|
83
|
-
}
|
|
84
|
-
function readHistory(agentId) {
|
|
85
|
-
return getStack(agentId).past.slice();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
49
|
// src/undo/undo-tools.ts
|
|
89
50
|
var installedHosts = /* @__PURE__ */ new WeakSet();
|
|
90
51
|
function ensureUndoToolsRegistered(host, options = {}) {
|
|
@@ -108,7 +69,7 @@ function registerUndoTools(host, options = {}) {
|
|
|
108
69
|
}
|
|
109
70
|
},
|
|
110
71
|
async (args) => {
|
|
111
|
-
const entry = await undoOne(agentOf(args));
|
|
72
|
+
const entry = await fancyAutoCommon.undoOne(agentOf(args));
|
|
112
73
|
if (!entry) return errorResult("Nothing to undo.");
|
|
113
74
|
return textResult(`Undid: ${entry.label}`, { entry: serialize(entry) });
|
|
114
75
|
}
|
|
@@ -126,7 +87,7 @@ function registerUndoTools(host, options = {}) {
|
|
|
126
87
|
}
|
|
127
88
|
},
|
|
128
89
|
async (args) => {
|
|
129
|
-
const entry = await redoOne(agentOf(args));
|
|
90
|
+
const entry = await fancyAutoCommon.redoOne(agentOf(args));
|
|
130
91
|
if (!entry) return errorResult("Nothing to redo.");
|
|
131
92
|
return textResult(`Redid: ${entry.label}`, { entry: serialize(entry) });
|
|
132
93
|
}
|
|
@@ -144,9 +105,9 @@ function registerUndoTools(host, options = {}) {
|
|
|
144
105
|
}
|
|
145
106
|
},
|
|
146
107
|
async (args) => {
|
|
147
|
-
const
|
|
148
|
-
const text =
|
|
149
|
-
return textResult(text || "(empty)",
|
|
108
|
+
const history = fancyAutoCommon.readHistory(agentOf(args)).map(serialize);
|
|
109
|
+
const text = history.map((e) => `${new Date(e.timestamp).toISOString()} ${e.bridgeId} ${e.action}: ${e.label}`).join("\n");
|
|
110
|
+
return textResult(text || "(empty)", history);
|
|
150
111
|
}
|
|
151
112
|
)
|
|
152
113
|
);
|
|
@@ -272,7 +233,7 @@ function registerArtboardBridge(host, options) {
|
|
|
272
233
|
(s) => s.id !== sectionId ? s : { ...s, pieces: [...s.pieces.slice(0, insertAt), piece, ...s.pieces.slice(insertAt)] }
|
|
273
234
|
)
|
|
274
235
|
}));
|
|
275
|
-
pushUndoEntry(agent.id, {
|
|
236
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
276
237
|
timestamp: Date.now(),
|
|
277
238
|
bridgeId: "artboard",
|
|
278
239
|
action: "artboard_add_piece",
|
|
@@ -320,7 +281,7 @@ function registerArtboardBridge(host, options) {
|
|
|
320
281
|
(s) => s.id !== sectionId ? s : { ...s, pieces: s.pieces.filter((p) => p.id !== pieceId) }
|
|
321
282
|
)
|
|
322
283
|
}));
|
|
323
|
-
pushUndoEntry(agent.id, {
|
|
284
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
324
285
|
timestamp: Date.now(),
|
|
325
286
|
bridgeId: "artboard",
|
|
326
287
|
action: "artboard_remove_piece",
|
|
@@ -378,7 +339,7 @@ function registerArtboardBridge(host, options) {
|
|
|
378
339
|
})
|
|
379
340
|
};
|
|
380
341
|
});
|
|
381
|
-
pushUndoEntry(agent.id, {
|
|
342
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
382
343
|
timestamp: Date.now(),
|
|
383
344
|
bridgeId: "artboard",
|
|
384
345
|
action: "artboard_reorder_piece",
|
|
@@ -417,7 +378,7 @@ function registerArtboardBridge(host, options) {
|
|
|
417
378
|
}))
|
|
418
379
|
}));
|
|
419
380
|
apply(label);
|
|
420
|
-
pushUndoEntry(agent.id, {
|
|
381
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
421
382
|
timestamp: Date.now(),
|
|
422
383
|
bridgeId: "artboard",
|
|
423
384
|
action: "artboard_rename_piece",
|
|
@@ -447,7 +408,7 @@ function registerArtboardBridge(host, options) {
|
|
|
447
408
|
}))
|
|
448
409
|
}));
|
|
449
410
|
apply(nextContent);
|
|
450
|
-
pushUndoEntry(agent.id, {
|
|
411
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
451
412
|
timestamp: Date.now(),
|
|
452
413
|
bridgeId: "artboard",
|
|
453
414
|
action: "artboard_set_piece_content",
|
|
@@ -498,7 +459,7 @@ function registerArtboardBridge(host, options) {
|
|
|
498
459
|
adapter.setValue((prev) => ({
|
|
499
460
|
sections: [...prev.sections.slice(0, insertAt), section, ...prev.sections.slice(insertAt)]
|
|
500
461
|
}));
|
|
501
|
-
pushUndoEntry(agent.id, {
|
|
462
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
502
463
|
timestamp: Date.now(),
|
|
503
464
|
bridgeId: "artboard",
|
|
504
465
|
action: "artboard_add_section",
|
|
@@ -532,7 +493,7 @@ function registerArtboardBridge(host, options) {
|
|
|
532
493
|
)
|
|
533
494
|
}));
|
|
534
495
|
apply(title, subtitle);
|
|
535
|
-
pushUndoEntry(agent.id, {
|
|
496
|
+
fancyAutoCommon.pushUndoEntry(agent.id, {
|
|
536
497
|
timestamp: Date.now(),
|
|
537
498
|
bridgeId: "artboard",
|
|
538
499
|
action: "artboard_rename_section",
|