@particle-academy/agent-integrations 0.6.2 → 0.7.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 +78 -0
- package/dist/bridges/artboard.d.ts +78 -0
- 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 +58 -0
- package/dist/bridges/slides.d.ts +58 -0
- package/dist/bridges/whiteboard.d.cts +3 -3
- package/dist/bridges/whiteboard.d.ts +3 -3
- package/dist/bridges-artboard.cjs +576 -0
- package/dist/bridges-artboard.cjs.map +1 -0
- package/dist/bridges-artboard.js +418 -0
- package/dist/bridges-artboard.js.map +1 -0
- package/dist/bridges-slides.cjs +438 -0
- package/dist/bridges-slides.cjs.map +1 -0
- package/dist/bridges-slides.js +6 -0
- package/dist/bridges-slides.js.map +1 -0
- package/dist/chunk-NE3GIGQD.js +384 -0
- package/dist/chunk-NE3GIGQD.js.map +1 -0
- package/dist/components/SharedWhiteboard/index.d.cts +1 -1
- package/dist/components/SharedWhiteboard/index.d.ts +1 -1
- package/dist/index.cjs +377 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +3 -2
- 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/presence/index.d.cts +1 -1
- package/dist/presence/index.d.ts +1 -1
- package/dist/{server-BsSwfemr.d.cts → server-C2OpfPEo.d.cts} +3 -3
- package/dist/{server-Du3-IGqM.d.ts → server-CKAqFTyc.d.ts} +3 -3
- package/dist/sharing/index.d.cts +4 -4
- package/dist/sharing/index.d.ts +4 -4
- package/dist/sheets-adapter.d.cts +3 -3
- package/dist/sheets-adapter.d.ts +3 -3
- package/dist/{token-CrJF76oH.d.cts → token-C1O22GxJ.d.cts} +1 -1
- package/dist/{token-CrJF76oH.d.ts → token-C1O22GxJ.d.ts} +1 -1
- package/dist/{tool-host-BQuUygLF.d.cts → tool-host-CX3WFXgh.d.cts} +1 -1
- package/dist/{tool-host-C8JMMGYq.d.ts → tool-host-DldwGNqR.d.ts} +1 -1
- package/dist/{types-aOQLTW0E.d.cts → types-C2zdUpzn.d.cts} +1 -1
- package/dist/{types-aOQLTW0E.d.ts → types-C2zdUpzn.d.ts} +1 -1
- package/dist/{types-CCSBGW9T.d.cts → types-Cq5u8MJ8.d.cts} +1 -1
- package/dist/{types-DIVNcIQO.d.ts → types-DyaHnqNC.d.ts} +1 -1
- package/dist/undo/index.d.cts +2 -2
- package/dist/undo/index.d.ts +2 -2
- package/package.json +17 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { T as ToolHost, a as ToolRegistry } from './tool-host-
|
|
1
|
+
import { a as MicroMcpServer } from './server-C2OpfPEo.cjs';
|
|
2
|
+
export { M as McpServerOptions, T as Transport, e as errorResult, r as rpcError, t as textResult } from './server-C2OpfPEo.cjs';
|
|
3
|
+
export { T as ToolHost, a as ToolRegistry } from './tool-host-CX3WFXgh.cjs';
|
|
4
4
|
export { InProcessTransport, RelayChannel, RelayTransport, attachInProcess, attachRelay } from './mcp/index.cjs';
|
|
5
|
-
export { C as CallToolResult,
|
|
6
|
-
export { B as Bridge, a as BridgeFactory } from './types-
|
|
5
|
+
export { C as CallToolResult, a as ContentBlock, I as InitializeResult, f as JsonObject, i as JsonRpcMessage, j as JsonRpcNotification, k as JsonRpcRequest, m as JsonValue, M as MCP_PROTOCOL_VERSION, S as ServerCapabilities, n as ServerInfo, T as ToolDefinition, o as ToolHandler } from './types-C2zdUpzn.cjs';
|
|
6
|
+
export { B as Bridge, a as BridgeFactory } from './types-Cq5u8MJ8.cjs';
|
|
7
7
|
import { FormFieldDescriptor } from './bridges/forms.cjs';
|
|
8
8
|
export { FormBridgeAdapter, FormBridgeOptions, registerFormBridge } from './bridges/forms.cjs';
|
|
9
9
|
export { SheetsBridgeAdapter, SheetsBridgeOptions, registerSheetsBridge } from './bridges/sheets.cjs';
|
|
@@ -12,13 +12,15 @@ export { CodeBridgeAdapter, CodeBridgeOptions, registerCodeBridge } from './brid
|
|
|
12
12
|
export { ChartsBridgeAdapter, ChartsBridgeOptions, registerChartsBridge } from './bridges/charts.cjs';
|
|
13
13
|
export { SceneBridgeAdapter, SceneBridgeOptions, SceneCamera, SceneObject, SceneObjectKind, SceneState, registerSceneBridge } from './bridges/scene.cjs';
|
|
14
14
|
export { ScreenSnapshot, ScreensBridgeAdapter, ScreensBridgeOptions, registerScreensBridge } from './bridges/screens.cjs';
|
|
15
|
+
export { SlidesBridgeAdapter, SlidesBridgeOptions, registerSlidesBridge } from './bridges/slides.cjs';
|
|
15
16
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
17
|
import { ReactNode, CSSProperties } from 'react';
|
|
17
|
-
import { S as SessionDescriptor } from './token-
|
|
18
|
-
export { b as buildShareConfig, a as buildShareUrl,
|
|
18
|
+
import { S as SessionDescriptor } from './token-C1O22GxJ.cjs';
|
|
19
|
+
export { b as buildShareConfig, a as buildShareUrl, d as createSessionDescriptor, e as describeSession, r as readSessionFromUrl } from './token-C1O22GxJ.cjs';
|
|
19
20
|
export { ActivityAgent, ActivityFilter, ActivityResolverContext, ActivityTargetResolver, ToolHandler as ActivityWrappedHandler, AgentActivityEvent, AgentActivityListener, AgentTarget, AgentTargetKind, emitActivity, onActivity, readActivityHistory, resetActivityRegistry, useAgentActivity, useAgentActivityForScreen, wrapToolWithActivity } from './presence/index.cjs';
|
|
20
21
|
export { UndoEntry, UndoToolsOptions, clearStack as clearUndoStack, ensureUndoToolsRegistered, pushUndoEntry, readHistory as readUndoHistory, redoOne, registerUndoTools, resetAllUndoStacks, undoOne, useUndoStack } from './undo/index.cjs';
|
|
21
22
|
export { RelayState, SseRelayOptions, SseRelayTransport, attachSseRelay } from './sharing/index.cjs';
|
|
23
|
+
import '@particle-academy/fancy-slides';
|
|
22
24
|
|
|
23
25
|
type AgentActivity = {
|
|
24
26
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { T as ToolHost, a as ToolRegistry } from './tool-host-
|
|
1
|
+
import { a as MicroMcpServer } from './server-CKAqFTyc.js';
|
|
2
|
+
export { M as McpServerOptions, T as Transport, e as errorResult, r as rpcError, t as textResult } from './server-CKAqFTyc.js';
|
|
3
|
+
export { T as ToolHost, a as ToolRegistry } from './tool-host-DldwGNqR.js';
|
|
4
4
|
export { InProcessTransport, RelayChannel, RelayTransport, attachInProcess, attachRelay } from './mcp/index.js';
|
|
5
|
-
export { C as CallToolResult,
|
|
6
|
-
export { B as Bridge, a as BridgeFactory } from './types-
|
|
5
|
+
export { C as CallToolResult, a as ContentBlock, I as InitializeResult, f as JsonObject, i as JsonRpcMessage, j as JsonRpcNotification, k as JsonRpcRequest, m as JsonValue, M as MCP_PROTOCOL_VERSION, S as ServerCapabilities, n as ServerInfo, T as ToolDefinition, o as ToolHandler } from './types-C2zdUpzn.js';
|
|
6
|
+
export { B as Bridge, a as BridgeFactory } from './types-DyaHnqNC.js';
|
|
7
7
|
import { FormFieldDescriptor } from './bridges/forms.js';
|
|
8
8
|
export { FormBridgeAdapter, FormBridgeOptions, registerFormBridge } from './bridges/forms.js';
|
|
9
9
|
export { SheetsBridgeAdapter, SheetsBridgeOptions, registerSheetsBridge } from './bridges/sheets.js';
|
|
@@ -12,13 +12,15 @@ export { CodeBridgeAdapter, CodeBridgeOptions, registerCodeBridge } from './brid
|
|
|
12
12
|
export { ChartsBridgeAdapter, ChartsBridgeOptions, registerChartsBridge } from './bridges/charts.js';
|
|
13
13
|
export { SceneBridgeAdapter, SceneBridgeOptions, SceneCamera, SceneObject, SceneObjectKind, SceneState, registerSceneBridge } from './bridges/scene.js';
|
|
14
14
|
export { ScreenSnapshot, ScreensBridgeAdapter, ScreensBridgeOptions, registerScreensBridge } from './bridges/screens.js';
|
|
15
|
+
export { SlidesBridgeAdapter, SlidesBridgeOptions, registerSlidesBridge } from './bridges/slides.js';
|
|
15
16
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
17
|
import { ReactNode, CSSProperties } from 'react';
|
|
17
|
-
import { S as SessionDescriptor } from './token-
|
|
18
|
-
export { b as buildShareConfig, a as buildShareUrl,
|
|
18
|
+
import { S as SessionDescriptor } from './token-C1O22GxJ.js';
|
|
19
|
+
export { b as buildShareConfig, a as buildShareUrl, d as createSessionDescriptor, e as describeSession, r as readSessionFromUrl } from './token-C1O22GxJ.js';
|
|
19
20
|
export { ActivityAgent, ActivityFilter, ActivityResolverContext, ActivityTargetResolver, ToolHandler as ActivityWrappedHandler, AgentActivityEvent, AgentActivityListener, AgentTarget, AgentTargetKind, emitActivity, onActivity, readActivityHistory, resetActivityRegistry, useAgentActivity, useAgentActivityForScreen, wrapToolWithActivity } from './presence/index.js';
|
|
20
21
|
export { UndoEntry, UndoToolsOptions, clearStack as clearUndoStack, ensureUndoToolsRegistered, pushUndoEntry, readHistory as readUndoHistory, redoOne, registerUndoTools, resetAllUndoStacks, undoOne, useUndoStack } from './undo/index.js';
|
|
21
22
|
export { RelayState, SseRelayOptions, SseRelayTransport, attachSseRelay } from './sharing/index.js';
|
|
23
|
+
import '@particle-academy/fancy-slides';
|
|
22
24
|
|
|
23
25
|
type AgentActivity = {
|
|
24
26
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
export { useUndoStack } from './chunk-RGO42EQ6.js';
|
|
2
|
+
export { registerChartsBridge } from './chunk-NTDZWGYB.js';
|
|
1
3
|
export { registerSceneBridge } from './chunk-XRAJSOPS.js';
|
|
2
4
|
export { registerScreensBridge } from './chunk-57ZDHD53.js';
|
|
5
|
+
export { registerSlidesBridge } from './chunk-NE3GIGQD.js';
|
|
3
6
|
export { useSheetsActivityHighlights, useSheetsAdapter } from './chunk-5XELJIJR.js';
|
|
4
7
|
export { AgentActivityHighlight, AgentCursor, AgentPanel, ShareControls } from './chunk-ZHAK2DQR.js';
|
|
5
8
|
import './chunk-IJ6JX5VC.js';
|
|
6
9
|
export { SseRelayTransport, attachSseRelay, buildShareConfig, buildShareUrl, createSessionDescriptor, describeSession, readSessionFromUrl } from './chunk-LVQXIUJH.js';
|
|
7
10
|
export { useAgentActivity, useAgentActivityForScreen } from './chunk-X66JWQBB.js';
|
|
8
|
-
export { useUndoStack } from './chunk-RGO42EQ6.js';
|
|
9
11
|
export { RelayTransport, attachRelay } from './chunk-G6N2TQVO.js';
|
|
10
12
|
export { InProcessTransport, attachInProcess } from './chunk-AFUULW5E.js';
|
|
11
13
|
export { clearStack as clearUndoStack, ensureUndoToolsRegistered, pushUndoEntry, readHistory as readUndoHistory, redoOne, registerUndoTools, resetAllUndoStacks, undoOne } from './chunk-GQ7XXK7G.js';
|
|
@@ -13,7 +15,6 @@ import { registerFormBridge } from './chunk-4BL5M3U3.js';
|
|
|
13
15
|
export { registerFormBridge } from './chunk-4BL5M3U3.js';
|
|
14
16
|
export { registerSheetsBridge } from './chunk-IANI25IT.js';
|
|
15
17
|
export { registerCodeBridge } from './chunk-HSTW7ZNO.js';
|
|
16
|
-
export { registerChartsBridge } from './chunk-NTDZWGYB.js';
|
|
17
18
|
export { wrapToolWithActivity } from './chunk-52S7XYZK.js';
|
|
18
19
|
import { onActivity } from './chunk-JU2N4KK6.js';
|
|
19
20
|
export { emitActivity, onActivity, readActivityHistory, resetActivityRegistry } from './chunk-JU2N4KK6.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/BridgedForm/BridgedForm.tsx","../src/components/ScreensActivityBridge/ScreensActivityBridge.tsx"],"names":["useEffect"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/BridgedForm/BridgedForm.tsx","../src/components/ScreensActivityBridge/ScreensActivityBridge.tsx"],"names":["useEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyCO,SAAS,WAAA,CAAY;AAAA,EAC1B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAAqB;AAEnB,EAAA,MAAM,SAAA,GAAY,OAAO,MAAM,CAAA;AAC/B,EAAA,MAAM,WAAA,GAAc,OAAO,QAAQ,CAAA;AACnC,EAAA,MAAM,SAAA,GAAY,OAAO,MAAM,CAAA;AAC/B,EAAA,MAAM,SAAA,GAAY,OAAO,QAAQ,CAAA;AACjC,EAAA,SAAA,CAAU,MAAM;AAAE,IAAA,SAAA,CAAU,OAAA,GAAU,MAAA;AAAA,EAAQ,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AACzD,EAAA,SAAA,CAAU,MAAM;AAAE,IAAA,WAAA,CAAY,OAAA,GAAU,QAAA;AAAA,EAAU,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAC/D,EAAA,SAAA,CAAU,MAAM;AAAE,IAAA,SAAA,CAAU,OAAA,GAAU,MAAA;AAAA,EAAQ,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AACzD,EAAA,SAAA,CAAU,MAAM;AAAE,IAAA,SAAA,CAAU,OAAA,GAAU,QAAA;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AAA,QACT,QAAA;AAAA,QACA,WAAW,MAAM;AACf,UAAA,MAAA,CAAO,YAAA,CAAa,QAAA,EAAU,EAAE,aAAA,EAAe,MAAM,CAAA;AACrD,UAAA,UAAA,CAAW,OAAO,QAAQ,CAAA;AAAA,QAC5B,CAAA,EAAG,KAAA,CAAM,KAAA,IAAS,MAAM;AAAA,OAC1B;AAAA,IACF,CAAC,CAAA;AACD,IAAA,OAAO,MAAM;AACX,MAAA,GAAA,EAAI;AACJ,MAAA,KAAA,MAAW,CAAA,IAAK,UAAA,CAAW,MAAA,EAAO,eAAgB,CAAC,CAAA;AAAA,IACrD,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AACnB,EAAA,OAAO,IAAA;AACT","file":"index.js","sourcesContent":["import { type ReactNode, useEffect, useMemo, useRef } from \"react\";\nimport type { MicroMcpServer } from \"../../mcp/server\";\nimport { registerFormBridge, type FormBridgeAdapter, type FormFieldDescriptor } from \"../../bridges/forms\";\n\nexport type BridgedFormProps = {\n /** Stable id for this form. Used by agents in `form_*` tool calls. */\n id: string;\n /** Human title (also surfaced as the bridge title). */\n title?: string;\n /** Optional fancy-screens screen id this form lives in. */\n screenId?: string;\n /** Field descriptors — drives the agent-facing schema. */\n fields: FormFieldDescriptor[];\n /** Controlled values. */\n values: Record<string, unknown>;\n /** Setter — hosts pass their setState. */\n onChange: (next: Record<string, unknown>) => void;\n /** Optional submit handler. */\n onSubmit?: () => Promise<{ ok: boolean; values?: Record<string, unknown>; error?: string }>;\n /** The MicroMcpServer the bridge registers against. Pass null/undefined\n * to render without a bridge (useful for stories / non-shared use). */\n server?: MicroMcpServer | null;\n /** Identity used in activity events. */\n agent?: { id: string; name?: string; color?: string };\n children: ReactNode;\n};\n\n/**\n * BridgedForm — wraps a react-fancy form (or any controlled inputs)\n * with a `registerFormBridge` lifecycle. Children render the actual form\n * using `values` + `onChange`; this component only manages the bridge.\n *\n * Hosts use it like:\n *\n * <BridgedForm id=\"signup\" fields={...} values={values} onChange={setValues} server={server}>\n * <Field><Input value={values.email} onValueChange={(v) => onChange({ ...values, email: v })} /></Field>\n * ...\n * </BridgedForm>\n *\n * Agents can then call form_describe, form_set_value, form_submit, etc.\n */\nexport function BridgedForm({\n id,\n title,\n screenId,\n fields,\n values,\n onChange,\n onSubmit,\n server,\n agent,\n children,\n}: BridgedFormProps) {\n // Refs so the adapter sees fresh values without re-installing the bridge.\n const valuesRef = useRef(values);\n const onChangeRef = useRef(onChange);\n const fieldsRef = useRef(fields);\n const submitRef = useRef(onSubmit);\n useEffect(() => { valuesRef.current = values; }, [values]);\n useEffect(() => { onChangeRef.current = onChange; }, [onChange]);\n useEffect(() => { fieldsRef.current = fields; }, [fields]);\n useEffect(() => { submitRef.current = onSubmit; }, [onSubmit]);\n\n const focusElement = (name: string) => {\n if (typeof document === \"undefined\") return;\n const el = document.querySelector(`[data-form-id=\"${id}\"] [name=\"${name}\"]`) as HTMLElement | null;\n el?.focus();\n };\n\n const adapter = useMemo<FormBridgeAdapter>(() => ({\n id,\n title,\n screenId,\n getFields: () => fieldsRef.current,\n getValue: (name) => valuesRef.current[name],\n getValues: () => ({ ...valuesRef.current }),\n setValue: (name, v) => onChangeRef.current({ ...valuesRef.current, [name]: v }),\n setValues: (next) => onChangeRef.current({ ...valuesRef.current, ...next }),\n focus: focusElement,\n submit: async () => {\n if (!submitRef.current) {\n return { ok: true, values: { ...valuesRef.current } };\n }\n return submitRef.current();\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }), [id, title, screenId]);\n\n useEffect(() => {\n if (!server) return;\n const bridge = registerFormBridge(server, { adapter, agent });\n return () => bridge.dispose();\n }, [server, adapter, agent]);\n\n return <div data-form-id={id}>{children}</div>;\n}\n","import { useEffect } from \"react\";\nimport { onActivity } from \"../../presence/registry\";\n\n/**\n * Loose shape of the fancy-screens system context — kept here so this\n * component doesn't hard-import `@particle-academy/fancy-screens`.\n */\ntype ScreenSystemLike = {\n registry: Map<string, { id: string; agentActivity?: unknown }>;\n updateScreen: (id: string, patch: { agentActivity?: unknown }) => void;\n};\n\nexport type ScreensActivityBridgeProps = {\n /** The value returned by `useScreenSystem()` from fancy-screens. */\n system: ScreenSystemLike;\n /** ms to wait after the last activity before clearing the screen's badge. Default 1500. */\n fadeMs?: number;\n};\n\n/**\n * ScreensActivityBridge — subscribe to the in-process activity registry\n * and patch each event into the matching screen's `agentActivity` field.\n * Fade-out clears the badge after `fadeMs`.\n *\n * Use it once near the root of your app, ABOVE every <Screen>:\n *\n * const system = useScreenSystem();\n * <>\n * <ScreensActivityBridge system={system} />\n * <Screen id=\"dashboard\">…</Screen>\n * <Screen id=\"form\">…</Screen>\n * </>\n *\n * Renders nothing; pure side-effect component.\n */\nexport function ScreensActivityBridge({ system, fadeMs = 1500 }: ScreensActivityBridgeProps) {\n useEffect(() => {\n const fadeTimers = new Map<string, ReturnType<typeof setTimeout>>();\n const off = onActivity((event) => {\n const screenId = event.target.screenId;\n if (!screenId) return;\n // Only patch screens that are currently registered.\n if (!system.registry.has(screenId)) return;\n const activity = {\n agentId: event.agentId,\n agentName: event.agentName,\n agentColor: event.agentColor,\n action: event.action,\n timestamp: event.timestamp,\n elementId: event.target.elementId,\n label: event.target.label,\n };\n system.updateScreen(screenId, { agentActivity: activity });\n const prev = fadeTimers.get(screenId);\n if (prev) clearTimeout(prev);\n fadeTimers.set(\n screenId,\n setTimeout(() => {\n system.updateScreen(screenId, { agentActivity: null });\n fadeTimers.delete(screenId);\n }, event.ttlMs ?? fadeMs),\n );\n });\n return () => {\n off();\n for (const t of fadeTimers.values()) clearTimeout(t);\n };\n }, [system, fadeMs]);\n return null;\n}\n"]}
|
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as Transport,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { C as CallToolResult,
|
|
5
|
-
import '../tool-host-
|
|
1
|
+
import { T as Transport, a as MicroMcpServer } from '../server-C2OpfPEo.cjs';
|
|
2
|
+
export { M as McpServerOptions, e as errorResult, r as rpcError, t as textResult } from '../server-C2OpfPEo.cjs';
|
|
3
|
+
import { i as JsonRpcMessage } from '../types-C2zdUpzn.cjs';
|
|
4
|
+
export { C as CallToolResult, a as ContentBlock, I as InitializeResult, J as JSONRPC_INTERNAL_ERROR, b as JSONRPC_INVALID_PARAMS, c as JSONRPC_INVALID_REQUEST, d as JSONRPC_METHOD_NOT_FOUND, e as JSONRPC_PARSE_ERROR, f as JsonObject, g as JsonRpcError, h as JsonRpcId, j as JsonRpcNotification, k as JsonRpcRequest, l as JsonRpcSuccess, m as JsonValue, M as MCP_PROTOCOL_VERSION, R as RegisteredTool, S as ServerCapabilities, n as ServerInfo, T as ToolDefinition, o as ToolHandler, p as ToolInputSchema } from '../types-C2zdUpzn.cjs';
|
|
5
|
+
import '../tool-host-CX3WFXgh.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* InProcessTransport — direct function-call wiring between an in-page MCP
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as Transport,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { C as CallToolResult,
|
|
5
|
-
import '../tool-host-
|
|
1
|
+
import { T as Transport, a as MicroMcpServer } from '../server-CKAqFTyc.js';
|
|
2
|
+
export { M as McpServerOptions, e as errorResult, r as rpcError, t as textResult } from '../server-CKAqFTyc.js';
|
|
3
|
+
import { i as JsonRpcMessage } from '../types-C2zdUpzn.js';
|
|
4
|
+
export { C as CallToolResult, a as ContentBlock, I as InitializeResult, J as JSONRPC_INTERNAL_ERROR, b as JSONRPC_INVALID_PARAMS, c as JSONRPC_INVALID_REQUEST, d as JSONRPC_METHOD_NOT_FOUND, e as JSONRPC_PARSE_ERROR, f as JsonObject, g as JsonRpcError, h as JsonRpcId, j as JsonRpcNotification, k as JsonRpcRequest, l as JsonRpcSuccess, m as JsonValue, M as MCP_PROTOCOL_VERSION, R as RegisteredTool, S as ServerCapabilities, n as ServerInfo, T as ToolDefinition, o as ToolHandler, p as ToolInputSchema } from '../types-C2zdUpzn.js';
|
|
5
|
+
import '../tool-host-DldwGNqR.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* InProcessTransport — direct function-call wiring between an in-page MCP
|
package/dist/presence/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ToolRegistry } from './tool-host-
|
|
1
|
+
import { n as ServerInfo, S as ServerCapabilities, i as JsonRpcMessage, C as CallToolResult } from './types-C2zdUpzn.cjs';
|
|
2
|
+
import { a as ToolRegistry } from './tool-host-CX3WFXgh.cjs';
|
|
3
3
|
|
|
4
4
|
type McpServerOptions = {
|
|
5
5
|
info: ServerInfo;
|
|
@@ -60,4 +60,4 @@ declare function rpcError(code: number, message: string, data?: any): {
|
|
|
60
60
|
declare function textResult(text: string, structured?: any): CallToolResult;
|
|
61
61
|
declare function errorResult(text: string): CallToolResult;
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { type McpServerOptions as M, type Transport as T, MicroMcpServer as a, errorResult as e, rpcError as r, textResult as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ToolRegistry } from './tool-host-
|
|
1
|
+
import { n as ServerInfo, S as ServerCapabilities, i as JsonRpcMessage, C as CallToolResult } from './types-C2zdUpzn.js';
|
|
2
|
+
import { a as ToolRegistry } from './tool-host-DldwGNqR.js';
|
|
3
3
|
|
|
4
4
|
type McpServerOptions = {
|
|
5
5
|
info: ServerInfo;
|
|
@@ -60,4 +60,4 @@ declare function rpcError(code: number, message: string, data?: any): {
|
|
|
60
60
|
declare function textResult(text: string, structured?: any): CallToolResult;
|
|
61
61
|
declare function errorResult(text: string): CallToolResult;
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { type McpServerOptions as M, type Transport as T, MicroMcpServer as a, errorResult as e, rpcError as r, textResult as t };
|
package/dist/sharing/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { S as SessionDescriptor, b as buildShareConfig, a as buildShareUrl,
|
|
2
|
-
import {
|
|
3
|
-
import { T as Transport,
|
|
4
|
-
import '../tool-host-
|
|
1
|
+
export { S as SessionDescriptor, b as buildShareConfig, a as buildShareUrl, c as constantTimeEqual, d as createSessionDescriptor, e as describeSession, r as readSessionFromUrl } from '../token-C1O22GxJ.cjs';
|
|
2
|
+
import { i as JsonRpcMessage } from '../types-C2zdUpzn.cjs';
|
|
3
|
+
import { T as Transport, a as MicroMcpServer } from '../server-C2OpfPEo.cjs';
|
|
4
|
+
import '../tool-host-CX3WFXgh.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* SseRelayTransport — bridges the in-page MicroMcpServer to a host-app
|
package/dist/sharing/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { S as SessionDescriptor, b as buildShareConfig, a as buildShareUrl,
|
|
2
|
-
import {
|
|
3
|
-
import { T as Transport,
|
|
4
|
-
import '../tool-host-
|
|
1
|
+
export { S as SessionDescriptor, b as buildShareConfig, a as buildShareUrl, c as constantTimeEqual, d as createSessionDescriptor, e as describeSession, r as readSessionFromUrl } from '../token-C1O22GxJ.js';
|
|
2
|
+
import { i as JsonRpcMessage } from '../types-C2zdUpzn.js';
|
|
3
|
+
import { T as Transport, a as MicroMcpServer } from '../server-CKAqFTyc.js';
|
|
4
|
+
import '../tool-host-DldwGNqR.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* SseRelayTransport — bridges the in-page MicroMcpServer to a host-app
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SheetsBridgeAdapter } from './bridges/sheets.cjs';
|
|
2
|
-
import './tool-host-
|
|
3
|
-
import './types-
|
|
4
|
-
import './types-
|
|
2
|
+
import './tool-host-CX3WFXgh.cjs';
|
|
3
|
+
import './types-C2zdUpzn.cjs';
|
|
4
|
+
import './types-Cq5u8MJ8.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shared-session helpers for `@particle-academy/fancy-sheets`.
|
package/dist/sheets-adapter.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SheetsBridgeAdapter } from './bridges/sheets.js';
|
|
2
|
-
import './tool-host-
|
|
3
|
-
import './types-
|
|
4
|
-
import './types-
|
|
2
|
+
import './tool-host-DldwGNqR.js';
|
|
3
|
+
import './types-C2zdUpzn.js';
|
|
4
|
+
import './types-DyaHnqNC.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shared-session helpers for `@particle-academy/fancy-sheets`.
|
|
@@ -31,4 +31,4 @@ declare function readSessionFromUrl(): SessionDescriptor | null;
|
|
|
31
31
|
/** Constant-time string compare so a mismatched token leaks no timing info. */
|
|
32
32
|
declare function constantTimeEqual(a: string, b: string): boolean;
|
|
33
33
|
|
|
34
|
-
export { type SessionDescriptor as S, buildShareUrl as a, buildShareConfig as b,
|
|
34
|
+
export { type SessionDescriptor as S, buildShareUrl as a, buildShareConfig as b, constantTimeEqual as c, createSessionDescriptor as d, describeSession as e, readSessionFromUrl as r };
|
|
@@ -31,4 +31,4 @@ declare function readSessionFromUrl(): SessionDescriptor | null;
|
|
|
31
31
|
/** Constant-time string compare so a mismatched token leaks no timing info. */
|
|
32
32
|
declare function constantTimeEqual(a: string, b: string): boolean;
|
|
33
33
|
|
|
34
|
-
export { type SessionDescriptor as S, buildShareUrl as a, buildShareConfig as b,
|
|
34
|
+
export { type SessionDescriptor as S, buildShareUrl as a, buildShareConfig as b, constantTimeEqual as c, createSessionDescriptor as d, describeSession as e, readSessionFromUrl as r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolDefinition,
|
|
1
|
+
import { T as ToolDefinition, o as ToolHandler, R as RegisteredTool, f as JsonObject, C as CallToolResult } from './types-C2zdUpzn.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ToolHost — the minimal surface a bridge needs to register its tools.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolDefinition,
|
|
1
|
+
import { T as ToolDefinition, o as ToolHandler, R as RegisteredTool, f as JsonObject, C as CallToolResult } from './types-C2zdUpzn.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ToolHost — the minimal surface a bridge needs to register its tools.
|
|
@@ -109,4 +109,4 @@ type RegisteredTool = {
|
|
|
109
109
|
};
|
|
110
110
|
declare const MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
111
111
|
|
|
112
|
-
export { type CallToolResult as C, type InitializeResult as I,
|
|
112
|
+
export { type CallToolResult as C, type InitializeResult as I, JSONRPC_INTERNAL_ERROR as J, MCP_PROTOCOL_VERSION as M, type RegisteredTool as R, type ServerCapabilities as S, type ToolDefinition as T, type ContentBlock as a, JSONRPC_INVALID_PARAMS as b, JSONRPC_INVALID_REQUEST as c, JSONRPC_METHOD_NOT_FOUND as d, JSONRPC_PARSE_ERROR as e, type JsonObject as f, type JsonRpcError as g, type JsonRpcId as h, type JsonRpcMessage as i, type JsonRpcNotification as j, type JsonRpcRequest as k, type JsonRpcSuccess as l, type JsonValue as m, type ServerInfo as n, type ToolHandler as o, type ToolInputSchema as p };
|
|
@@ -109,4 +109,4 @@ type RegisteredTool = {
|
|
|
109
109
|
};
|
|
110
110
|
declare const MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
111
111
|
|
|
112
|
-
export { type CallToolResult as C, type InitializeResult as I,
|
|
112
|
+
export { type CallToolResult as C, type InitializeResult as I, JSONRPC_INTERNAL_ERROR as J, MCP_PROTOCOL_VERSION as M, type RegisteredTool as R, type ServerCapabilities as S, type ToolDefinition as T, type ContentBlock as a, JSONRPC_INVALID_PARAMS as b, JSONRPC_INVALID_REQUEST as c, JSONRPC_METHOD_NOT_FOUND as d, JSONRPC_PARSE_ERROR as e, type JsonObject as f, type JsonRpcError as g, type JsonRpcId as h, type JsonRpcMessage as i, type JsonRpcNotification as j, type JsonRpcRequest as k, type JsonRpcSuccess as l, type JsonValue as m, type ServerInfo as n, type ToolHandler as o, type ToolInputSchema as p };
|
package/dist/undo/index.d.cts
CHANGED
package/dist/undo/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/agent-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "MCP-driven agent presence in collab sessions: per-session micro-MCP server, pluggable bridges to fancy-* packages, and agent UX components (panel + on-canvas cursor).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"import": { "types": "./dist/bridges/whiteboard.d.ts", "default": "./dist/bridges-whiteboard.js" },
|
|
30
30
|
"require": { "types": "./dist/bridges/whiteboard.d.cts", "default": "./dist/bridges-whiteboard.cjs" }
|
|
31
31
|
},
|
|
32
|
+
"./bridges/artboard": {
|
|
33
|
+
"import": { "types": "./dist/bridges/artboard.d.ts", "default": "./dist/bridges-artboard.js" },
|
|
34
|
+
"require": { "types": "./dist/bridges/artboard.d.cts", "default": "./dist/bridges-artboard.cjs" }
|
|
35
|
+
},
|
|
32
36
|
"./bridges/flow": {
|
|
33
37
|
"import": { "types": "./dist/bridges/flow.d.ts", "default": "./dist/bridges-flow.js" },
|
|
34
38
|
"require": { "types": "./dist/bridges/flow.d.cts", "default": "./dist/bridges-flow.cjs" }
|
|
@@ -57,6 +61,10 @@
|
|
|
57
61
|
"import": { "types": "./dist/bridges/screens.d.ts", "default": "./dist/bridges-screens.js" },
|
|
58
62
|
"require": { "types": "./dist/bridges/screens.d.cts", "default": "./dist/bridges-screens.cjs" }
|
|
59
63
|
},
|
|
64
|
+
"./bridges/slides": {
|
|
65
|
+
"import": { "types": "./dist/bridges/slides.d.ts", "default": "./dist/bridges-slides.js" },
|
|
66
|
+
"require": { "types": "./dist/bridges/slides.d.cts", "default": "./dist/bridges-slides.cjs" }
|
|
67
|
+
},
|
|
60
68
|
"./sheets-adapter": {
|
|
61
69
|
"import": { "types": "./dist/sheets-adapter.d.ts", "default": "./dist/sheets-adapter.js" },
|
|
62
70
|
"require": { "types": "./dist/sheets-adapter.d.cts", "default": "./dist/sheets-adapter.cjs" }
|
|
@@ -96,15 +104,20 @@
|
|
|
96
104
|
"react": "^18.0.0 || ^19.0.0",
|
|
97
105
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
98
106
|
"@particle-academy/fancy-whiteboard": "^0.1.0",
|
|
99
|
-
"@particle-academy/fancy-
|
|
100
|
-
"@particle-academy/fancy-
|
|
107
|
+
"@particle-academy/fancy-artboard": "^0.1.0",
|
|
108
|
+
"@particle-academy/fancy-flow": "^0.2.0 || ^0.3.0",
|
|
109
|
+
"@particle-academy/fancy-sheets": "^0.1.0",
|
|
110
|
+
"@particle-academy/fancy-slides": "^0.1.4"
|
|
101
111
|
},
|
|
102
112
|
"peerDependenciesMeta": {
|
|
103
113
|
"@particle-academy/fancy-whiteboard": { "optional": true },
|
|
114
|
+
"@particle-academy/fancy-artboard": { "optional": true },
|
|
104
115
|
"@particle-academy/fancy-flow": { "optional": true },
|
|
105
|
-
"@particle-academy/fancy-sheets": { "optional": true }
|
|
116
|
+
"@particle-academy/fancy-sheets": { "optional": true },
|
|
117
|
+
"@particle-academy/fancy-slides": { "optional": true }
|
|
106
118
|
},
|
|
107
119
|
"devDependencies": {
|
|
120
|
+
"@particle-academy/fancy-slides": "^0.1.6",
|
|
108
121
|
"@particle-academy/fancy-whiteboard": "^0.1.5",
|
|
109
122
|
"@types/node": "^22.0.0",
|
|
110
123
|
"@types/react": "^19.0.0",
|