@particle-academy/agent-integrations 0.2.4 → 0.3.4
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/charts.d.cts +39 -0
- package/dist/bridges/charts.d.ts +39 -0
- package/dist/bridges/code.d.cts +47 -0
- package/dist/bridges/code.d.ts +47 -0
- package/dist/bridges/flow.d.cts +3 -2
- package/dist/bridges/flow.d.ts +3 -2
- package/dist/bridges/forms.d.cts +76 -0
- package/dist/bridges/forms.d.ts +76 -0
- package/dist/bridges/scene.d.cts +54 -0
- package/dist/bridges/scene.d.ts +54 -0
- package/dist/bridges/sheets.d.cts +62 -0
- package/dist/bridges/sheets.d.ts +62 -0
- package/dist/bridges/whiteboard.d.cts +3 -2
- package/dist/bridges/whiteboard.d.ts +3 -2
- package/dist/bridges-charts.cjs +167 -0
- package/dist/bridges-charts.cjs.map +1 -0
- package/dist/bridges-charts.js +6 -0
- package/dist/bridges-charts.js.map +1 -0
- package/dist/bridges-code.cjs +219 -0
- package/dist/bridges-code.cjs.map +1 -0
- package/dist/bridges-code.js +6 -0
- package/dist/bridges-code.js.map +1 -0
- package/dist/bridges-flow.cjs +76 -17
- package/dist/bridges-flow.cjs.map +1 -1
- package/dist/bridges-flow.js +3 -1
- package/dist/bridges-forms.cjs +205 -0
- package/dist/bridges-forms.cjs.map +1 -0
- package/dist/bridges-forms.js +6 -0
- package/dist/bridges-forms.js.map +1 -0
- package/dist/bridges-scene.cjs +250 -0
- package/dist/bridges-scene.cjs.map +1 -0
- package/dist/bridges-scene.js +6 -0
- package/dist/bridges-scene.js.map +1 -0
- package/dist/bridges-sheets.cjs +327 -0
- package/dist/bridges-sheets.cjs.map +1 -0
- package/dist/bridges-sheets.js +6 -0
- package/dist/bridges-sheets.js.map +1 -0
- package/dist/bridges-whiteboard.cjs +224 -38
- package/dist/bridges-whiteboard.cjs.map +1 -1
- package/dist/bridges-whiteboard.js +4 -1
- package/dist/{chunk-2VOQJKSU.js → chunk-4IAVAFUV.js} +41 -19
- package/dist/chunk-4IAVAFUV.js.map +1 -0
- package/dist/chunk-52S7XYZK.js +38 -0
- package/dist/chunk-52S7XYZK.js.map +1 -0
- package/dist/chunk-ACBENYYO.js +124 -0
- package/dist/chunk-ACBENYYO.js.map +1 -0
- package/dist/chunk-DJOWMF6Q.js +25 -0
- package/dist/chunk-DJOWMF6Q.js.map +1 -0
- package/dist/{chunk-FLEOQUKF.js → chunk-JMYPUAFH.js} +17 -2
- package/dist/chunk-JMYPUAFH.js.map +1 -0
- package/dist/chunk-JU2N4KK6.js +34 -0
- package/dist/chunk-JU2N4KK6.js.map +1 -0
- package/dist/chunk-OEIULP2L.js +158 -0
- package/dist/chunk-OEIULP2L.js.map +1 -0
- package/dist/chunk-PDBF4W7E.js +280 -0
- package/dist/chunk-PDBF4W7E.js.map +1 -0
- package/dist/chunk-PHPXKSWI.js +120 -0
- package/dist/chunk-PHPXKSWI.js.map +1 -0
- package/dist/chunk-QJUTISFC.js +203 -0
- package/dist/chunk-QJUTISFC.js.map +1 -0
- package/dist/{chunk-5ZUHNNLR.js → chunk-TBEITXF4.js} +79 -41
- package/dist/chunk-TBEITXF4.js.map +1 -0
- package/dist/chunk-X66JWQBB.js +37 -0
- package/dist/chunk-X66JWQBB.js.map +1 -0
- package/dist/chunk-XYYSTJHW.js +172 -0
- package/dist/chunk-XYYSTJHW.js.map +1 -0
- package/dist/index.cjs +1411 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -3
- package/dist/index.d.ts +96 -3
- package/dist/index.js +111 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.cts +4 -2
- package/dist/mcp/index.d.ts +4 -2
- package/dist/presence/index.d.cts +136 -0
- package/dist/presence/index.d.ts +136 -0
- package/dist/presence.cjs +107 -0
- package/dist/presence.cjs.map +1 -0
- package/dist/presence.js +5 -0
- package/dist/presence.js.map +1 -0
- package/dist/registry-2DRURS6U.js +3 -0
- package/dist/registry-2DRURS6U.js.map +1 -0
- package/dist/server-BJu_AMH3.d.ts +64 -0
- package/dist/server-si-VvFxI.d.cts +64 -0
- package/dist/sharing/index.d.cts +2 -1
- package/dist/sharing/index.d.ts +2 -1
- package/dist/sharing.cjs +68 -0
- package/dist/sharing.cjs.map +1 -1
- package/dist/sharing.js +1 -1
- package/dist/styles.css +57 -0
- package/dist/styles.css.map +1 -1
- package/dist/{types-DR5AS6Rd.d.cts → types-Bf1ZoGmI.d.cts} +1 -1
- package/dist/{types-CRPA_D0z.d.ts → types-DXKpLuia.d.ts} +1 -1
- package/dist/types-DksGd5Y7.d.cts +112 -0
- package/dist/types-DksGd5Y7.d.ts +112 -0
- package/dist/undo/index.d.cts +69 -0
- package/dist/undo/index.d.ts +69 -0
- package/dist/undo.cjs +163 -0
- package/dist/undo.cjs.map +1 -0
- package/dist/undo.js +5 -0
- package/dist/undo.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-2VOQJKSU.js.map +0 -1
- package/dist/chunk-5ZUHNNLR.js.map +0 -1
- package/dist/chunk-FLEOQUKF.js.map +0 -1
- package/dist/server-Bv985us3.d.cts +0 -173
- package/dist/server-Bv985us3.d.ts +0 -173
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter wires a single fancy-echarts chart to the bridge. Charts are
|
|
7
|
+
* already prop-driven, so the adapter just exposes the data + option
|
|
8
|
+
* setters and a way to read what's currently rendered.
|
|
9
|
+
*/
|
|
10
|
+
type ChartsBridgeAdapter = {
|
|
11
|
+
/** Stable id for this chart instance. */
|
|
12
|
+
id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
screenId?: string;
|
|
15
|
+
/** Read the current ECharts option object the chart is rendering. */
|
|
16
|
+
getOption: () => Record<string, unknown>;
|
|
17
|
+
/** Replace the entire option. */
|
|
18
|
+
setOption: (option: Record<string, unknown>) => void;
|
|
19
|
+
/** Convenience: shallow-merge a partial option update. */
|
|
20
|
+
updateOption?: (partial: Record<string, unknown>) => void;
|
|
21
|
+
/** Read just the data series (subset of option for quick agent reads). */
|
|
22
|
+
getData?: () => unknown;
|
|
23
|
+
/** Update only the data, leaving axes/colors/etc. alone. */
|
|
24
|
+
updateData?: (data: unknown) => void;
|
|
25
|
+
};
|
|
26
|
+
type ChartsBridgeOptions = {
|
|
27
|
+
adapter: ChartsBridgeAdapter;
|
|
28
|
+
agent?: {
|
|
29
|
+
id: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
color?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* registerChartsBridge — schema-aware MCP access to a single chart.
|
|
36
|
+
*/
|
|
37
|
+
declare function registerChartsBridge(server: MicroMcpServer, options: ChartsBridgeOptions): Bridge;
|
|
38
|
+
|
|
39
|
+
export { type ChartsBridgeAdapter, type ChartsBridgeOptions, registerChartsBridge };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter wires a single fancy-echarts chart to the bridge. Charts are
|
|
7
|
+
* already prop-driven, so the adapter just exposes the data + option
|
|
8
|
+
* setters and a way to read what's currently rendered.
|
|
9
|
+
*/
|
|
10
|
+
type ChartsBridgeAdapter = {
|
|
11
|
+
/** Stable id for this chart instance. */
|
|
12
|
+
id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
screenId?: string;
|
|
15
|
+
/** Read the current ECharts option object the chart is rendering. */
|
|
16
|
+
getOption: () => Record<string, unknown>;
|
|
17
|
+
/** Replace the entire option. */
|
|
18
|
+
setOption: (option: Record<string, unknown>) => void;
|
|
19
|
+
/** Convenience: shallow-merge a partial option update. */
|
|
20
|
+
updateOption?: (partial: Record<string, unknown>) => void;
|
|
21
|
+
/** Read just the data series (subset of option for quick agent reads). */
|
|
22
|
+
getData?: () => unknown;
|
|
23
|
+
/** Update only the data, leaving axes/colors/etc. alone. */
|
|
24
|
+
updateData?: (data: unknown) => void;
|
|
25
|
+
};
|
|
26
|
+
type ChartsBridgeOptions = {
|
|
27
|
+
adapter: ChartsBridgeAdapter;
|
|
28
|
+
agent?: {
|
|
29
|
+
id: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
color?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* registerChartsBridge — schema-aware MCP access to a single chart.
|
|
36
|
+
*/
|
|
37
|
+
declare function registerChartsBridge(server: MicroMcpServer, options: ChartsBridgeOptions): Bridge;
|
|
38
|
+
|
|
39
|
+
export { type ChartsBridgeAdapter, type ChartsBridgeOptions, registerChartsBridge };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter the host wires to a fancy-code CodeEditor (typically via the
|
|
7
|
+
* useCodeEditor hook's context value).
|
|
8
|
+
*/
|
|
9
|
+
type CodeBridgeAdapter = {
|
|
10
|
+
/** Stable id for this editor instance. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Display label. */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Optional fancy-screens screen id. */
|
|
15
|
+
screenId?: string;
|
|
16
|
+
/** Read the current document text. */
|
|
17
|
+
getValue: () => string;
|
|
18
|
+
/** Replace the document. */
|
|
19
|
+
setValue: (value: string) => void;
|
|
20
|
+
/** Read the current selection text (empty string if none). */
|
|
21
|
+
getSelection?: () => string;
|
|
22
|
+
/** Replace the current selection with text. */
|
|
23
|
+
replaceSelection?: (text: string) => void;
|
|
24
|
+
/** Programmatic focus. */
|
|
25
|
+
focus?: () => void;
|
|
26
|
+
/** Read / set the active language. */
|
|
27
|
+
getLanguage?: () => string;
|
|
28
|
+
/** Set the active language. */
|
|
29
|
+
setLanguage?: (lang: string) => void;
|
|
30
|
+
};
|
|
31
|
+
type CodeBridgeOptions = {
|
|
32
|
+
adapter: CodeBridgeAdapter;
|
|
33
|
+
agent?: {
|
|
34
|
+
id: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
color?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* registerCodeBridge — schema-aware MCP access to a single CodeEditor.
|
|
41
|
+
* Tools cover read, full replace, append, selection replace, language
|
|
42
|
+
* switch, and a streaming append helper for "type characters into the
|
|
43
|
+
* editor over time" UX.
|
|
44
|
+
*/
|
|
45
|
+
declare function registerCodeBridge(server: MicroMcpServer, options: CodeBridgeOptions): Bridge;
|
|
46
|
+
|
|
47
|
+
export { type CodeBridgeAdapter, type CodeBridgeOptions, registerCodeBridge };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Adapter the host wires to a fancy-code CodeEditor (typically via the
|
|
7
|
+
* useCodeEditor hook's context value).
|
|
8
|
+
*/
|
|
9
|
+
type CodeBridgeAdapter = {
|
|
10
|
+
/** Stable id for this editor instance. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Display label. */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Optional fancy-screens screen id. */
|
|
15
|
+
screenId?: string;
|
|
16
|
+
/** Read the current document text. */
|
|
17
|
+
getValue: () => string;
|
|
18
|
+
/** Replace the document. */
|
|
19
|
+
setValue: (value: string) => void;
|
|
20
|
+
/** Read the current selection text (empty string if none). */
|
|
21
|
+
getSelection?: () => string;
|
|
22
|
+
/** Replace the current selection with text. */
|
|
23
|
+
replaceSelection?: (text: string) => void;
|
|
24
|
+
/** Programmatic focus. */
|
|
25
|
+
focus?: () => void;
|
|
26
|
+
/** Read / set the active language. */
|
|
27
|
+
getLanguage?: () => string;
|
|
28
|
+
/** Set the active language. */
|
|
29
|
+
setLanguage?: (lang: string) => void;
|
|
30
|
+
};
|
|
31
|
+
type CodeBridgeOptions = {
|
|
32
|
+
adapter: CodeBridgeAdapter;
|
|
33
|
+
agent?: {
|
|
34
|
+
id: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
color?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* registerCodeBridge — schema-aware MCP access to a single CodeEditor.
|
|
41
|
+
* Tools cover read, full replace, append, selection replace, language
|
|
42
|
+
* switch, and a streaming append helper for "type characters into the
|
|
43
|
+
* editor over time" UX.
|
|
44
|
+
*/
|
|
45
|
+
declare function registerCodeBridge(server: MicroMcpServer, options: CodeBridgeOptions): Bridge;
|
|
46
|
+
|
|
47
|
+
export { type CodeBridgeAdapter, type CodeBridgeOptions, registerCodeBridge };
|
package/dist/bridges/flow.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { M as MicroMcpServer } from '../server-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
3
4
|
|
|
4
5
|
type FlowNode = {
|
|
5
6
|
id: string;
|
package/dist/bridges/flow.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { M as MicroMcpServer } from '../server-
|
|
2
|
-
import { B as Bridge } from '../types-
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
3
4
|
|
|
4
5
|
type FlowNode = {
|
|
5
6
|
id: string;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Field descriptor — what the host says about each form field. Mirrors the
|
|
7
|
+
* subset of HTML / react-fancy input shapes agents care about.
|
|
8
|
+
*/
|
|
9
|
+
type FormFieldDescriptor = {
|
|
10
|
+
/** Form-local field name. Matches the key the host uses in its values map. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Display label. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Logical type. Drives validation + agent expectations. */
|
|
15
|
+
type: "text" | "textarea" | "number" | "email" | "password" | "url" | "date" | "select" | "multi-select" | "checkbox" | "switch" | "radio" | "file" | "json";
|
|
16
|
+
/** Allowed values for select / radio. */
|
|
17
|
+
options?: Array<{
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Whether the field must be filled before submit. */
|
|
22
|
+
required?: boolean;
|
|
23
|
+
/** Free-text hint surfaced to the agent. */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** Default value (presented in get_value when nothing set). */
|
|
26
|
+
defaultValue?: unknown;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Adapter the host wires per form. Matches the controlled-state pattern
|
|
30
|
+
* react-fancy already uses (`value` / `onValueChange`); this adapter just
|
|
31
|
+
* exposes those state slots in a form-shaped way the bridge can call.
|
|
32
|
+
*/
|
|
33
|
+
type FormBridgeAdapter = {
|
|
34
|
+
/** Stable id for the form (used in form_describe + presence target). */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Display title for human-readable logs. */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Optional fancy-screens screen id this form belongs to. */
|
|
39
|
+
screenId?: string;
|
|
40
|
+
/** Field descriptors. The bridge uses these for schema introspection
|
|
41
|
+
* (form_describe). Agents call this first to know what to fill. */
|
|
42
|
+
getFields: () => FormFieldDescriptor[];
|
|
43
|
+
/** Read a single field's current value. */
|
|
44
|
+
getValue: (name: string) => unknown;
|
|
45
|
+
/** Read all values as { fieldName: value }. */
|
|
46
|
+
getValues: () => Record<string, unknown>;
|
|
47
|
+
/** Set a single field's value. The host wires this to its setState. */
|
|
48
|
+
setValue: (name: string, value: unknown) => void;
|
|
49
|
+
/** Set many at once. Defaults to calling setValue in a loop. */
|
|
50
|
+
setValues?: (values: Record<string, unknown>) => void;
|
|
51
|
+
/** Programmatically focus a field (host implements DOM focus). Optional. */
|
|
52
|
+
focus?: (name: string) => void;
|
|
53
|
+
/** Submit the form. Returns the values that were submitted (or rejection). */
|
|
54
|
+
submit?: () => Promise<{
|
|
55
|
+
ok: boolean;
|
|
56
|
+
values?: Record<string, unknown>;
|
|
57
|
+
error?: string;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
type FormBridgeOptions = {
|
|
61
|
+
adapter: FormBridgeAdapter;
|
|
62
|
+
/** Identity tagged into activity events. */
|
|
63
|
+
agent?: {
|
|
64
|
+
id: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
color?: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* registerFormBridge — wires schema-driven MCP access to a single form.
|
|
71
|
+
* Hosts can register multiple bridges (one per form on the screen) by
|
|
72
|
+
* giving each adapter a distinct `id`.
|
|
73
|
+
*/
|
|
74
|
+
declare function registerFormBridge(server: MicroMcpServer, options: FormBridgeOptions): Bridge;
|
|
75
|
+
|
|
76
|
+
export { type FormBridgeAdapter, type FormBridgeOptions, type FormFieldDescriptor, registerFormBridge };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Field descriptor — what the host says about each form field. Mirrors the
|
|
7
|
+
* subset of HTML / react-fancy input shapes agents care about.
|
|
8
|
+
*/
|
|
9
|
+
type FormFieldDescriptor = {
|
|
10
|
+
/** Form-local field name. Matches the key the host uses in its values map. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Display label. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Logical type. Drives validation + agent expectations. */
|
|
15
|
+
type: "text" | "textarea" | "number" | "email" | "password" | "url" | "date" | "select" | "multi-select" | "checkbox" | "switch" | "radio" | "file" | "json";
|
|
16
|
+
/** Allowed values for select / radio. */
|
|
17
|
+
options?: Array<{
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Whether the field must be filled before submit. */
|
|
22
|
+
required?: boolean;
|
|
23
|
+
/** Free-text hint surfaced to the agent. */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** Default value (presented in get_value when nothing set). */
|
|
26
|
+
defaultValue?: unknown;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Adapter the host wires per form. Matches the controlled-state pattern
|
|
30
|
+
* react-fancy already uses (`value` / `onValueChange`); this adapter just
|
|
31
|
+
* exposes those state slots in a form-shaped way the bridge can call.
|
|
32
|
+
*/
|
|
33
|
+
type FormBridgeAdapter = {
|
|
34
|
+
/** Stable id for the form (used in form_describe + presence target). */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Display title for human-readable logs. */
|
|
37
|
+
title?: string;
|
|
38
|
+
/** Optional fancy-screens screen id this form belongs to. */
|
|
39
|
+
screenId?: string;
|
|
40
|
+
/** Field descriptors. The bridge uses these for schema introspection
|
|
41
|
+
* (form_describe). Agents call this first to know what to fill. */
|
|
42
|
+
getFields: () => FormFieldDescriptor[];
|
|
43
|
+
/** Read a single field's current value. */
|
|
44
|
+
getValue: (name: string) => unknown;
|
|
45
|
+
/** Read all values as { fieldName: value }. */
|
|
46
|
+
getValues: () => Record<string, unknown>;
|
|
47
|
+
/** Set a single field's value. The host wires this to its setState. */
|
|
48
|
+
setValue: (name: string, value: unknown) => void;
|
|
49
|
+
/** Set many at once. Defaults to calling setValue in a loop. */
|
|
50
|
+
setValues?: (values: Record<string, unknown>) => void;
|
|
51
|
+
/** Programmatically focus a field (host implements DOM focus). Optional. */
|
|
52
|
+
focus?: (name: string) => void;
|
|
53
|
+
/** Submit the form. Returns the values that were submitted (or rejection). */
|
|
54
|
+
submit?: () => Promise<{
|
|
55
|
+
ok: boolean;
|
|
56
|
+
values?: Record<string, unknown>;
|
|
57
|
+
error?: string;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
type FormBridgeOptions = {
|
|
61
|
+
adapter: FormBridgeAdapter;
|
|
62
|
+
/** Identity tagged into activity events. */
|
|
63
|
+
agent?: {
|
|
64
|
+
id: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
color?: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* registerFormBridge — wires schema-driven MCP access to a single form.
|
|
71
|
+
* Hosts can register multiple bridges (one per form on the screen) by
|
|
72
|
+
* giving each adapter a distinct `id`.
|
|
73
|
+
*/
|
|
74
|
+
declare function registerFormBridge(server: MicroMcpServer, options: FormBridgeOptions): Bridge;
|
|
75
|
+
|
|
76
|
+
export { type FormBridgeAdapter, type FormBridgeOptions, type FormFieldDescriptor, registerFormBridge };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loose Scene types — mirror the public surface of fancy-3d's Scene
|
|
7
|
+
* descriptor (engine-agnostic JSON the package's adapters consume).
|
|
8
|
+
*/
|
|
9
|
+
type SceneObjectKind = "box" | "sphere" | "cylinder" | "plane" | "screen" | "group" | "custom";
|
|
10
|
+
type SceneObject = {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: SceneObjectKind | string;
|
|
13
|
+
position?: [number, number, number];
|
|
14
|
+
rotation?: [number, number, number];
|
|
15
|
+
scale?: [number, number, number];
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Free-form per-kind config (e.g. text content for screens). */
|
|
18
|
+
props?: Record<string, unknown>;
|
|
19
|
+
children?: SceneObject[];
|
|
20
|
+
};
|
|
21
|
+
type SceneCamera = {
|
|
22
|
+
position?: [number, number, number];
|
|
23
|
+
target?: [number, number, number];
|
|
24
|
+
fov?: number;
|
|
25
|
+
};
|
|
26
|
+
type SceneState = {
|
|
27
|
+
objects: SceneObject[];
|
|
28
|
+
camera?: SceneCamera;
|
|
29
|
+
background?: string;
|
|
30
|
+
};
|
|
31
|
+
type SceneBridgeAdapter = {
|
|
32
|
+
id: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
screenId?: string;
|
|
35
|
+
getScene: () => SceneState;
|
|
36
|
+
setScene: (next: SceneState) => void;
|
|
37
|
+
/** Convenience: set just the camera without touching objects. */
|
|
38
|
+
setCamera?: (next: SceneCamera) => void;
|
|
39
|
+
};
|
|
40
|
+
type SceneBridgeOptions = {
|
|
41
|
+
adapter: SceneBridgeAdapter;
|
|
42
|
+
agent?: {
|
|
43
|
+
id: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* registerSceneBridge — schema-aware MCP access to a fancy-3d Scene.
|
|
50
|
+
* Tools cover read, add/update/delete object, set camera, set background.
|
|
51
|
+
*/
|
|
52
|
+
declare function registerSceneBridge(server: MicroMcpServer, options: SceneBridgeOptions): Bridge;
|
|
53
|
+
|
|
54
|
+
export { type SceneBridgeAdapter, type SceneBridgeOptions, type SceneCamera, type SceneObject, type SceneObjectKind, type SceneState, registerSceneBridge };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loose Scene types — mirror the public surface of fancy-3d's Scene
|
|
7
|
+
* descriptor (engine-agnostic JSON the package's adapters consume).
|
|
8
|
+
*/
|
|
9
|
+
type SceneObjectKind = "box" | "sphere" | "cylinder" | "plane" | "screen" | "group" | "custom";
|
|
10
|
+
type SceneObject = {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: SceneObjectKind | string;
|
|
13
|
+
position?: [number, number, number];
|
|
14
|
+
rotation?: [number, number, number];
|
|
15
|
+
scale?: [number, number, number];
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Free-form per-kind config (e.g. text content for screens). */
|
|
18
|
+
props?: Record<string, unknown>;
|
|
19
|
+
children?: SceneObject[];
|
|
20
|
+
};
|
|
21
|
+
type SceneCamera = {
|
|
22
|
+
position?: [number, number, number];
|
|
23
|
+
target?: [number, number, number];
|
|
24
|
+
fov?: number;
|
|
25
|
+
};
|
|
26
|
+
type SceneState = {
|
|
27
|
+
objects: SceneObject[];
|
|
28
|
+
camera?: SceneCamera;
|
|
29
|
+
background?: string;
|
|
30
|
+
};
|
|
31
|
+
type SceneBridgeAdapter = {
|
|
32
|
+
id: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
screenId?: string;
|
|
35
|
+
getScene: () => SceneState;
|
|
36
|
+
setScene: (next: SceneState) => void;
|
|
37
|
+
/** Convenience: set just the camera without touching objects. */
|
|
38
|
+
setCamera?: (next: SceneCamera) => void;
|
|
39
|
+
};
|
|
40
|
+
type SceneBridgeOptions = {
|
|
41
|
+
adapter: SceneBridgeAdapter;
|
|
42
|
+
agent?: {
|
|
43
|
+
id: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* registerSceneBridge — schema-aware MCP access to a fancy-3d Scene.
|
|
50
|
+
* Tools cover read, add/update/delete object, set camera, set background.
|
|
51
|
+
*/
|
|
52
|
+
declare function registerSceneBridge(server: MicroMcpServer, options: SceneBridgeOptions): Bridge;
|
|
53
|
+
|
|
54
|
+
export { type SceneBridgeAdapter, type SceneBridgeOptions, type SceneCamera, type SceneObject, type SceneObjectKind, type SceneState, registerSceneBridge };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
2
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
3
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loose types — kept here so the bridge builds without a hard dep on
|
|
7
|
+
* @particle-academy/fancy-sheets. They mirror the public surface of
|
|
8
|
+
* `WorkbookData` / `SheetData` / `CellData` from that package.
|
|
9
|
+
*/
|
|
10
|
+
type CellValue = string | number | boolean | null;
|
|
11
|
+
type CellData = {
|
|
12
|
+
address: string;
|
|
13
|
+
value: CellValue;
|
|
14
|
+
format?: unknown;
|
|
15
|
+
comment?: unknown;
|
|
16
|
+
computedValue?: CellValue;
|
|
17
|
+
};
|
|
18
|
+
type SheetData = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
cells: Record<string, CellData>;
|
|
22
|
+
columnWidths: Record<number, number>;
|
|
23
|
+
mergedRegions: Array<{
|
|
24
|
+
start: string;
|
|
25
|
+
end: string;
|
|
26
|
+
}>;
|
|
27
|
+
columnFilters: Record<number, string>;
|
|
28
|
+
sortColumn?: number;
|
|
29
|
+
sortDirection?: "asc" | "desc";
|
|
30
|
+
frozenRows: number;
|
|
31
|
+
frozenCols: number;
|
|
32
|
+
};
|
|
33
|
+
type WorkbookData = {
|
|
34
|
+
sheets: SheetData[];
|
|
35
|
+
activeSheetId: string;
|
|
36
|
+
};
|
|
37
|
+
type SheetsBridgeAdapter = {
|
|
38
|
+
/** fancy-screens screen id (optional) so activity events know which screen the sheet lives in. */
|
|
39
|
+
screenId?: string;
|
|
40
|
+
/** Read the current workbook. */
|
|
41
|
+
getWorkbook: () => WorkbookData;
|
|
42
|
+
/** Replace the workbook. Host wires this to its onChange. */
|
|
43
|
+
setWorkbook: (next: WorkbookData) => void;
|
|
44
|
+
/** Optional: programmatically change the active cell. */
|
|
45
|
+
setActiveCell?: (sheetId: string, address: string) => void;
|
|
46
|
+
};
|
|
47
|
+
type SheetsBridgeOptions = {
|
|
48
|
+
adapter: SheetsBridgeAdapter;
|
|
49
|
+
agent?: {
|
|
50
|
+
id: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
color?: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* registerSheetsBridge — schema-aware MCP access to a fancy-sheets workbook.
|
|
57
|
+
* Tools are sheet-aware (every mutator takes an explicit `sheet` id, defaulting
|
|
58
|
+
* to the active sheet when omitted) so an agent can author multi-sheet docs.
|
|
59
|
+
*/
|
|
60
|
+
declare function registerSheetsBridge(server: MicroMcpServer, options: SheetsBridgeOptions): Bridge;
|
|
61
|
+
|
|
62
|
+
export { type SheetsBridgeAdapter, type SheetsBridgeOptions, registerSheetsBridge };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
2
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
3
|
+
import '../types-DksGd5Y7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loose types — kept here so the bridge builds without a hard dep on
|
|
7
|
+
* @particle-academy/fancy-sheets. They mirror the public surface of
|
|
8
|
+
* `WorkbookData` / `SheetData` / `CellData` from that package.
|
|
9
|
+
*/
|
|
10
|
+
type CellValue = string | number | boolean | null;
|
|
11
|
+
type CellData = {
|
|
12
|
+
address: string;
|
|
13
|
+
value: CellValue;
|
|
14
|
+
format?: unknown;
|
|
15
|
+
comment?: unknown;
|
|
16
|
+
computedValue?: CellValue;
|
|
17
|
+
};
|
|
18
|
+
type SheetData = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
cells: Record<string, CellData>;
|
|
22
|
+
columnWidths: Record<number, number>;
|
|
23
|
+
mergedRegions: Array<{
|
|
24
|
+
start: string;
|
|
25
|
+
end: string;
|
|
26
|
+
}>;
|
|
27
|
+
columnFilters: Record<number, string>;
|
|
28
|
+
sortColumn?: number;
|
|
29
|
+
sortDirection?: "asc" | "desc";
|
|
30
|
+
frozenRows: number;
|
|
31
|
+
frozenCols: number;
|
|
32
|
+
};
|
|
33
|
+
type WorkbookData = {
|
|
34
|
+
sheets: SheetData[];
|
|
35
|
+
activeSheetId: string;
|
|
36
|
+
};
|
|
37
|
+
type SheetsBridgeAdapter = {
|
|
38
|
+
/** fancy-screens screen id (optional) so activity events know which screen the sheet lives in. */
|
|
39
|
+
screenId?: string;
|
|
40
|
+
/** Read the current workbook. */
|
|
41
|
+
getWorkbook: () => WorkbookData;
|
|
42
|
+
/** Replace the workbook. Host wires this to its onChange. */
|
|
43
|
+
setWorkbook: (next: WorkbookData) => void;
|
|
44
|
+
/** Optional: programmatically change the active cell. */
|
|
45
|
+
setActiveCell?: (sheetId: string, address: string) => void;
|
|
46
|
+
};
|
|
47
|
+
type SheetsBridgeOptions = {
|
|
48
|
+
adapter: SheetsBridgeAdapter;
|
|
49
|
+
agent?: {
|
|
50
|
+
id: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
color?: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* registerSheetsBridge — schema-aware MCP access to a fancy-sheets workbook.
|
|
57
|
+
* Tools are sheet-aware (every mutator takes an explicit `sheet` id, defaulting
|
|
58
|
+
* to the active sheet when omitted) so an agent can author multi-sheet docs.
|
|
59
|
+
*/
|
|
60
|
+
declare function registerSheetsBridge(server: MicroMcpServer, options: SheetsBridgeOptions): Bridge;
|
|
61
|
+
|
|
62
|
+
export { type SheetsBridgeAdapter, type SheetsBridgeOptions, registerSheetsBridge };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StickyNoteItem, ShapeItem, ConnectorItem, Stroke, Viewport, RemoteCursor } from '@particle-academy/fancy-whiteboard';
|
|
2
|
-
import { M as MicroMcpServer } from '../server-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
2
|
+
import { M as MicroMcpServer } from '../server-si-VvFxI.cjs';
|
|
3
|
+
import { B as Bridge } from '../types-Bf1ZoGmI.cjs';
|
|
4
|
+
import '../types-DksGd5Y7.cjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* State accessors / mutators the bridge needs from the host. The host owns
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StickyNoteItem, ShapeItem, ConnectorItem, Stroke, Viewport, RemoteCursor } from '@particle-academy/fancy-whiteboard';
|
|
2
|
-
import { M as MicroMcpServer } from '../server-
|
|
3
|
-
import { B as Bridge } from '../types-
|
|
2
|
+
import { M as MicroMcpServer } from '../server-BJu_AMH3.js';
|
|
3
|
+
import { B as Bridge } from '../types-DXKpLuia.js';
|
|
4
|
+
import '../types-DksGd5Y7.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* State accessors / mutators the bridge needs from the host. The host owns
|