@particle-academy/agent-integrations 0.2.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.
Files changed (49) hide show
  1. package/README.md +131 -0
  2. package/dist/bridges/flow.d.cts +72 -0
  3. package/dist/bridges/flow.d.ts +72 -0
  4. package/dist/bridges/whiteboard.d.cts +40 -0
  5. package/dist/bridges/whiteboard.d.ts +40 -0
  6. package/dist/bridges-flow.cjs +330 -0
  7. package/dist/bridges-flow.cjs.map +1 -0
  8. package/dist/bridges-flow.js +4 -0
  9. package/dist/bridges-flow.js.map +1 -0
  10. package/dist/bridges-whiteboard.cjs +409 -0
  11. package/dist/bridges-whiteboard.cjs.map +1 -0
  12. package/dist/bridges-whiteboard.js +4 -0
  13. package/dist/bridges-whiteboard.js.map +1 -0
  14. package/dist/chunk-2VOQJKSU.js +320 -0
  15. package/dist/chunk-2VOQJKSU.js.map +1 -0
  16. package/dist/chunk-5ZUHNNLR.js +398 -0
  17. package/dist/chunk-5ZUHNNLR.js.map +1 -0
  18. package/dist/chunk-6LTKCNLF.js +68 -0
  19. package/dist/chunk-6LTKCNLF.js.map +1 -0
  20. package/dist/chunk-FLEOQUKF.js +157 -0
  21. package/dist/chunk-FLEOQUKF.js.map +1 -0
  22. package/dist/chunk-QGCF7YKW.js +130 -0
  23. package/dist/chunk-QGCF7YKW.js.map +1 -0
  24. package/dist/index.cjs +1632 -0
  25. package/dist/index.cjs.map +1 -0
  26. package/dist/index.d.cts +155 -0
  27. package/dist/index.d.ts +155 -0
  28. package/dist/index.js +567 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/mcp/index.d.cts +73 -0
  31. package/dist/mcp/index.d.ts +73 -0
  32. package/dist/mcp.cjs +210 -0
  33. package/dist/mcp.cjs.map +1 -0
  34. package/dist/mcp.js +4 -0
  35. package/dist/mcp.js.map +1 -0
  36. package/dist/server-Bv985us3.d.cts +173 -0
  37. package/dist/server-Bv985us3.d.ts +173 -0
  38. package/dist/sharing/index.d.cts +89 -0
  39. package/dist/sharing/index.d.ts +89 -0
  40. package/dist/sharing.cjs +166 -0
  41. package/dist/sharing.cjs.map +1 -0
  42. package/dist/sharing.js +3 -0
  43. package/dist/sharing.js.map +1 -0
  44. package/dist/styles.css +331 -0
  45. package/dist/styles.css.map +1 -0
  46. package/dist/types-CRPA_D0z.d.ts +18 -0
  47. package/dist/types-DR5AS6Rd.d.cts +18 -0
  48. package/docs/relay-protocol.md +57 -0
  49. package/package.json +61 -0
@@ -0,0 +1,155 @@
1
+ export { C as CallToolResult, a as ContentBlock, I as InitializeResult, J as JsonObject, b as JsonRpcMessage, c as JsonRpcNotification, d as JsonRpcRequest, e as JsonValue, f as MCP_PROTOCOL_VERSION, g as McpServerOptions, M as MicroMcpServer, S as ServerCapabilities, h as ServerInfo, T as ToolDefinition, i as ToolHandler, j as Transport, k as errorResult, r as rpcError, t as textResult } from './server-Bv985us3.js';
2
+ export { InProcessTransport, RelayChannel, RelayTransport, attachInProcess, attachRelay } from './mcp/index.js';
3
+ export { B as Bridge, a as BridgeFactory } from './types-CRPA_D0z.js';
4
+ export { WhiteboardBridgeAdapter, WhiteboardBridgeOptions, registerWhiteboardBridge } from './bridges/whiteboard.js';
5
+ export { FlowBridgeAdapter, FlowBridgeOptions, registerFlowBridge } from './bridges/flow.js';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ import { ReactNode, CSSProperties } from 'react';
8
+ import { SessionDescriptor } from './sharing/index.js';
9
+ export { RelayState, SseRelayOptions, SseRelayTransport, attachSseRelay, buildShareConfig, buildShareUrl, createSessionDescriptor, describeSession, readSessionFromUrl } from './sharing/index.js';
10
+ import { StickyNoteItem, ShapeItem, ConnectorItem, Stroke, Viewport } from '@particle-academy/fancy-whiteboard';
11
+
12
+ type AgentActivity = {
13
+ id: string;
14
+ /** Wall-clock timestamp; component formats it. */
15
+ at: number;
16
+ /** "tool" for MCP tool invocations, "message" for chat, "info" for status. */
17
+ kind: "tool" | "message" | "info" | "error";
18
+ /** Short label, e.g. "whiteboard_add_sticky" or "Agent". */
19
+ source: string;
20
+ /** Body text. */
21
+ text: string;
22
+ /** Optional structured payload, rendered as collapsed JSON. */
23
+ detail?: unknown;
24
+ };
25
+ type AgentPanelProps = {
26
+ /** The agent's identity (name + color appears in the header). */
27
+ agent?: {
28
+ name?: string;
29
+ color?: string;
30
+ };
31
+ /** Activity stream. Most recent at the end. */
32
+ activity: AgentActivity[];
33
+ /** Optional chat composer — pass an onSubmit to enable. */
34
+ onSubmit?: (message: string) => void;
35
+ /** Disabled while a request is in flight. */
36
+ busy?: boolean;
37
+ /** Right-rail header actions. */
38
+ actions?: ReactNode;
39
+ className?: string;
40
+ style?: CSSProperties;
41
+ };
42
+ /**
43
+ * AgentPanel — sidebar showing the agent's identity, a tool-and-chat log,
44
+ * and an optional input composer. Pure presentational: hosts feed it the
45
+ * activity stream from their own state (typically the MCP transport log).
46
+ */
47
+ declare function AgentPanel({ agent, activity, onSubmit, busy, actions, className, style }: AgentPanelProps): react_jsx_runtime.JSX.Element;
48
+
49
+ type AgentCursorProps = {
50
+ x: number;
51
+ y: number;
52
+ name?: string;
53
+ color?: string;
54
+ /** Optional caption shown under the name (e.g. current tool). */
55
+ status?: string;
56
+ className?: string;
57
+ style?: CSSProperties;
58
+ };
59
+ /**
60
+ * AgentCursor — on-canvas presence marker for the agent. Drop it inside
61
+ * (or alongside) a fancy-whiteboard <Board> at screen coords matching
62
+ * the agent's reported position.
63
+ */
64
+ declare function AgentCursor({ x, y, name, color, status, className, style }: AgentCursorProps): react_jsx_runtime.JSX.Element;
65
+
66
+ type AgentActivityHighlightProps = {
67
+ /** Bounds of the highlighted item in the parent's coord system. */
68
+ x: number;
69
+ y: number;
70
+ width: number;
71
+ height: number;
72
+ /** Trigger token — change it (e.g. set to Date.now()) to re-fire the pulse. */
73
+ pulseKey?: string | number;
74
+ /** Highlight tint. */
75
+ color?: string;
76
+ /** Pulse duration in ms. Defaults 1200. */
77
+ duration?: number;
78
+ className?: string;
79
+ style?: CSSProperties;
80
+ };
81
+ /**
82
+ * AgentActivityHighlight — short pulsing outline that flashes around an
83
+ * item the agent just touched. Position the parent so this can be placed
84
+ * absolutely matching the item's bounds.
85
+ */
86
+ declare function AgentActivityHighlight({ x, y, width, height, pulseKey, color, duration, className, style, }: AgentActivityHighlightProps): react_jsx_runtime.JSX.Element | null;
87
+
88
+ type ShareControlsProps = {
89
+ /** The active session, or null when not sharing yet. */
90
+ session: SessionDescriptor | null;
91
+ onStart: () => void;
92
+ onStop: () => void;
93
+ /** Optional connection-state badge text. */
94
+ status?: string;
95
+ /** Override the URL base used in the share URL. */
96
+ shareBaseUrl?: string;
97
+ className?: string;
98
+ style?: CSSProperties;
99
+ };
100
+ /**
101
+ * ShareControls — the host-facing UI for turning sharing on/off and
102
+ * surfacing the resulting connection details (URL / JSON / cURL).
103
+ */
104
+ declare function ShareControls({ session, onStart, onStop, status, shareBaseUrl, className, style, }: ShareControlsProps): react_jsx_runtime.JSX.Element;
105
+
106
+ type SharedWhiteboardProps = {
107
+ /** Initial board contents. */
108
+ initialNotes?: StickyNoteItem[];
109
+ initialShapes?: ShapeItem[];
110
+ initialConnectors?: ConnectorItem[];
111
+ initialStrokes?: Stroke[];
112
+ initialViewport?: Viewport;
113
+ /** Agent identity displayed in the panel + cursor. */
114
+ agent?: {
115
+ id: string;
116
+ name?: string;
117
+ color?: string;
118
+ };
119
+ /**
120
+ * Where the relay HTTP endpoints live. The host app implements these (see
121
+ * docs/relay-protocol.md). Pass `null` to disable sharing — the board
122
+ * still works locally with the in-process MCP server.
123
+ */
124
+ shareBaseUrl?: string | null;
125
+ /**
126
+ * Optional callback to register a new session token with the host's
127
+ * relay broker. Receives `{ session, token }` and should return after
128
+ * registration. Defaults to POSTing JSON to `${shareBaseUrl}/register`.
129
+ */
130
+ onRegisterSession?: (descriptor: SessionDescriptor) => Promise<void>;
131
+ /** Show the agent panel. Default true. */
132
+ showAgentPanel?: boolean;
133
+ /** Show share controls. Default true. */
134
+ showShareControls?: boolean;
135
+ /** Auto-broadcast local edits as `notifications/state_update`. Default true. */
136
+ broadcastEdits?: boolean;
137
+ /** Pixel height of the board area. Default 640. */
138
+ height?: number;
139
+ /** Header content rendered above the board. */
140
+ header?: ReactNode;
141
+ className?: string;
142
+ style?: CSSProperties;
143
+ };
144
+ /**
145
+ * SharedWhiteboard — drop-in component that bundles every piece of the
146
+ * "agent-collaborative whiteboard" UX: board with all primitives, in-page
147
+ * MCP server, share controls, agent panel, presence cursor, activity
148
+ * highlight, and outbound state broadcast.
149
+ *
150
+ * Most apps only need this one component. For deeper customization, swap
151
+ * it for the lower-level primitives (Board, MicroMcpServer, ShareControls).
152
+ */
153
+ declare function SharedWhiteboard({ initialNotes, initialShapes, initialConnectors, initialStrokes, initialViewport, agent, shareBaseUrl, onRegisterSession, showAgentPanel, showShareControls, broadcastEdits, height, header, className, style, }: SharedWhiteboardProps): react_jsx_runtime.JSX.Element;
154
+
155
+ export { type AgentActivity, AgentActivityHighlight, type AgentActivityHighlightProps, AgentCursor, type AgentCursorProps, AgentPanel, type AgentPanelProps, SessionDescriptor, ShareControls, type ShareControlsProps, SharedWhiteboard, type SharedWhiteboardProps };