@particle-academy/agent-integrations 0.12.0 → 0.13.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/README.md +20 -0
- package/dist/chunk-54QEFRMS.js +285 -0
- package/dist/chunk-54QEFRMS.js.map +1 -0
- package/dist/chunk-GO2Y6H6U.js +62 -0
- package/dist/chunk-GO2Y6H6U.js.map +1 -0
- package/dist/connectors/build.d.cts +56 -0
- package/dist/connectors/build.d.ts +56 -0
- package/dist/connectors/index.d.cts +130 -0
- package/dist/connectors/index.d.ts +130 -0
- package/dist/connectors-build.cjs +133 -0
- package/dist/connectors-build.cjs.map +1 -0
- package/dist/connectors-build.js +66 -0
- package/dist/connectors-build.js.map +1 -0
- package/dist/connectors.cjs +366 -0
- package/dist/connectors.cjs.map +1 -0
- package/dist/connectors.js +4 -0
- package/dist/connectors.js.map +1 -0
- package/dist/index.cjs +357 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/mcpb-BXOrsRnv.d.cts +54 -0
- package/dist/mcpb-BXOrsRnv.d.ts +54 -0
- package/dist/styles.css +156 -0
- package/dist/styles.css.map +1 -1
- package/docs/connectors.md +118 -0
- package/package.json +27 -2
package/dist/index.d.cts
CHANGED
|
@@ -22,6 +22,8 @@ export { ActivityFilter, AutoActivityEvent as AgentActivityEvent, AutoActivityLi
|
|
|
22
22
|
export { ActivityAgent, ActivityResolverContext, ActivityTargetResolver, ToolHandler as ActivityWrappedHandler, useAgentActivity, useAgentActivityForScreen, wrapToolWithActivity } from './presence/index.cjs';
|
|
23
23
|
export { UndoToolsOptions, ensureUndoToolsRegistered, registerUndoTools, useUndoStack } from './undo/index.cjs';
|
|
24
24
|
export { RelayState, SseRelayOptions, SseRelayTransport, attachSseRelay } from './sharing/index.cjs';
|
|
25
|
+
export { CLAUDE_CONNECTORS_URL, CONNECTOR_GLYPHS, CONNECTOR_TARGETS, ClaudeMark, ConnectorButtons, ConnectorButtonsProps, ConnectorClient, ConnectorMechanism, ConnectorServer, ConnectorTargetMeta, CursorMark, DesktopMark, ManualMcpConfig, VscodeMark, WrenchMark, buildCursorDeeplink, buildManualConfig, buildManualConfigSnippet, buildVscodeDeeplink, connectorHref, encodeBase64Json, slugifyServerName } from './connectors/index.cjs';
|
|
26
|
+
export { D as DEFAULT_MCPB_ENTRY_POINT, b as MCPB_MANIFEST_VERSION, c as MCPB_MIN_NODE, M as McpbManifestInput, a as McpbTool, d as buildMcpbManifest, e as buildMcpbProxyStub } from './mcpb-BXOrsRnv.cjs';
|
|
25
27
|
import '@particle-academy/fancy-slides';
|
|
26
28
|
|
|
27
29
|
type AgentActivity = {
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { ActivityFilter, AutoActivityEvent as AgentActivityEvent, AutoActivityLi
|
|
|
22
22
|
export { ActivityAgent, ActivityResolverContext, ActivityTargetResolver, ToolHandler as ActivityWrappedHandler, useAgentActivity, useAgentActivityForScreen, wrapToolWithActivity } from './presence/index.js';
|
|
23
23
|
export { UndoToolsOptions, ensureUndoToolsRegistered, registerUndoTools, useUndoStack } from './undo/index.js';
|
|
24
24
|
export { RelayState, SseRelayOptions, SseRelayTransport, attachSseRelay } from './sharing/index.js';
|
|
25
|
+
export { CLAUDE_CONNECTORS_URL, CONNECTOR_GLYPHS, CONNECTOR_TARGETS, ClaudeMark, ConnectorButtons, ConnectorButtonsProps, ConnectorClient, ConnectorMechanism, ConnectorServer, ConnectorTargetMeta, CursorMark, DesktopMark, ManualMcpConfig, VscodeMark, WrenchMark, buildCursorDeeplink, buildManualConfig, buildManualConfigSnippet, buildVscodeDeeplink, connectorHref, encodeBase64Json, slugifyServerName } from './connectors/index.js';
|
|
26
|
+
export { D as DEFAULT_MCPB_ENTRY_POINT, b as MCPB_MANIFEST_VERSION, c as MCPB_MIN_NODE, M as McpbManifestInput, a as McpbTool, d as buildMcpbManifest, e as buildMcpbProxyStub } from './mcpb-BXOrsRnv.js';
|
|
25
27
|
import '@particle-academy/fancy-slides';
|
|
26
28
|
|
|
27
29
|
type AgentActivity = {
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { AgentActivityHighlight, AgentCursor, AgentPanel, ShareControls } from './chunk-J5KYPEYB.js';
|
|
2
|
+
import './chunk-IJ6JX5VC.js';
|
|
3
|
+
export { SseRelayTransport, attachSseRelay, buildShareConfig, buildShareUrl, createSessionDescriptor, describeSession, readSessionFromUrl } from './chunk-CPNOF4HI.js';
|
|
1
4
|
export { useAgentActivity, useAgentActivityForScreen } from './chunk-UCKJAUBY.js';
|
|
2
5
|
export { useUndoStack } from './chunk-GHY3PBPN.js';
|
|
3
6
|
export { registerChartsBridge } from './chunk-SJ7H242B.js';
|
|
@@ -6,9 +9,8 @@ export { registerScreensBridge } from './chunk-CKK4QKD2.js';
|
|
|
6
9
|
export { registerSlidesBridge } from './chunk-R5OA26MJ.js';
|
|
7
10
|
export { registerTerminalBridge } from './chunk-57KAMBAR.js';
|
|
8
11
|
export { useSheetsActivityHighlights, useSheetsAdapter } from './chunk-KHKSQEMC.js';
|
|
9
|
-
export {
|
|
10
|
-
|
|
11
|
-
export { SseRelayTransport, attachSseRelay, buildShareConfig, buildShareUrl, createSessionDescriptor, describeSession, readSessionFromUrl } from './chunk-CPNOF4HI.js';
|
|
12
|
+
export { CLAUDE_CONNECTORS_URL, CONNECTOR_GLYPHS, CONNECTOR_TARGETS, ClaudeMark, ConnectorButtons, CursorMark, DesktopMark, VscodeMark, WrenchMark, buildCursorDeeplink, buildManualConfig, buildManualConfigSnippet, buildVscodeDeeplink, connectorHref, encodeBase64Json, slugifyServerName } from './chunk-54QEFRMS.js';
|
|
13
|
+
export { DEFAULT_MCPB_ENTRY_POINT, MCPB_MANIFEST_VERSION, MCPB_MIN_NODE, buildMcpbManifest, buildMcpbProxyStub } from './chunk-GO2Y6H6U.js';
|
|
12
14
|
export { RelayTransport, attachRelay } from './chunk-G6N2TQVO.js';
|
|
13
15
|
export { InProcessTransport, attachInProcess } from './chunk-AFUULW5E.js';
|
|
14
16
|
export { clearStack as clearUndoStack, ensureUndoToolsRegistered, pushUndoEntry, readHistory as readUndoHistory, redoOne, registerUndoTools, resetAllUndoStacks, undoOne } from './chunk-KJ5AOOV7.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,S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,CAAA;AACzD,MAAA,MAAM,IAAA,GAAO,UAAA,CAAW,GAAA,CAAI,QAAQ,CAAA;AACpC,MAAA,IAAI,IAAA,eAAmB,IAAI,CAAA;AAC3B,MAAA,UAAA,CAAW,GAAA;AAAA,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"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** The MCPB manifest schema version this helper emits. */
|
|
2
|
+
declare const MCPB_MANIFEST_VERSION = "0.2";
|
|
3
|
+
/** Minimum Node the mcp-remote proxy needs on the user's machine. */
|
|
4
|
+
declare const MCPB_MIN_NODE = ">=18.0.0";
|
|
5
|
+
/** A tool advertised in the bundle manifest (display-only metadata). */
|
|
6
|
+
interface McpbTool {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Inputs for {@link buildMcpbManifest} / `writeMcpbBundle`. */
|
|
11
|
+
interface McpbManifestInput {
|
|
12
|
+
/** Machine name, e.g. `"decksmith"` (lowercase, no spaces). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Human display name, e.g. `"Decksmith"`. Defaults to `name`. */
|
|
15
|
+
display_name?: string;
|
|
16
|
+
/** Bundle version, e.g. `"0.2.0"`. */
|
|
17
|
+
version: string;
|
|
18
|
+
/** Short one-line description. */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Optional longer description shown on the extension's detail view. */
|
|
21
|
+
long_description?: string;
|
|
22
|
+
author: {
|
|
23
|
+
name: string;
|
|
24
|
+
url?: string;
|
|
25
|
+
email?: string;
|
|
26
|
+
};
|
|
27
|
+
homepage?: string;
|
|
28
|
+
documentation?: string;
|
|
29
|
+
support?: string;
|
|
30
|
+
/** The remote MCP endpoint the bundle proxies to. */
|
|
31
|
+
mcpUrl: string;
|
|
32
|
+
/** Advertised tools (display metadata only). */
|
|
33
|
+
tools?: McpbTool[];
|
|
34
|
+
keywords?: string[];
|
|
35
|
+
license?: string;
|
|
36
|
+
/** Entry-point path inside the bundle. Defaults to `"server/proxy.js"`. */
|
|
37
|
+
entryPoint?: string;
|
|
38
|
+
}
|
|
39
|
+
/** The default entry-point path the proxy stub is written to. */
|
|
40
|
+
declare const DEFAULT_MCPB_ENTRY_POINT = "server/proxy.js";
|
|
41
|
+
/**
|
|
42
|
+
* Build the full MCPB `manifest.json` object for a remote MCP server, wrapping
|
|
43
|
+
* it with `npx -y mcp-remote <url>` (stdio→HTTP). Returns a plain object ready
|
|
44
|
+
* to `JSON.stringify`.
|
|
45
|
+
*/
|
|
46
|
+
declare function buildMcpbManifest(input: McpbManifestInput): Record<string, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* The `server/proxy.js` stub. MCPB requires an `entry_point` file even though
|
|
49
|
+
* `mcp_config.command` overrides it; if it ever DOES run, it spawns
|
|
50
|
+
* `npx -y mcp-remote <url>` itself so the bundle still works.
|
|
51
|
+
*/
|
|
52
|
+
declare function buildMcpbProxyStub(mcpUrl: string): string;
|
|
53
|
+
|
|
54
|
+
export { DEFAULT_MCPB_ENTRY_POINT as D, type McpbManifestInput as M, type McpbTool as a, MCPB_MANIFEST_VERSION as b, MCPB_MIN_NODE as c, buildMcpbManifest as d, buildMcpbProxyStub as e };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** The MCPB manifest schema version this helper emits. */
|
|
2
|
+
declare const MCPB_MANIFEST_VERSION = "0.2";
|
|
3
|
+
/** Minimum Node the mcp-remote proxy needs on the user's machine. */
|
|
4
|
+
declare const MCPB_MIN_NODE = ">=18.0.0";
|
|
5
|
+
/** A tool advertised in the bundle manifest (display-only metadata). */
|
|
6
|
+
interface McpbTool {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Inputs for {@link buildMcpbManifest} / `writeMcpbBundle`. */
|
|
11
|
+
interface McpbManifestInput {
|
|
12
|
+
/** Machine name, e.g. `"decksmith"` (lowercase, no spaces). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Human display name, e.g. `"Decksmith"`. Defaults to `name`. */
|
|
15
|
+
display_name?: string;
|
|
16
|
+
/** Bundle version, e.g. `"0.2.0"`. */
|
|
17
|
+
version: string;
|
|
18
|
+
/** Short one-line description. */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Optional longer description shown on the extension's detail view. */
|
|
21
|
+
long_description?: string;
|
|
22
|
+
author: {
|
|
23
|
+
name: string;
|
|
24
|
+
url?: string;
|
|
25
|
+
email?: string;
|
|
26
|
+
};
|
|
27
|
+
homepage?: string;
|
|
28
|
+
documentation?: string;
|
|
29
|
+
support?: string;
|
|
30
|
+
/** The remote MCP endpoint the bundle proxies to. */
|
|
31
|
+
mcpUrl: string;
|
|
32
|
+
/** Advertised tools (display metadata only). */
|
|
33
|
+
tools?: McpbTool[];
|
|
34
|
+
keywords?: string[];
|
|
35
|
+
license?: string;
|
|
36
|
+
/** Entry-point path inside the bundle. Defaults to `"server/proxy.js"`. */
|
|
37
|
+
entryPoint?: string;
|
|
38
|
+
}
|
|
39
|
+
/** The default entry-point path the proxy stub is written to. */
|
|
40
|
+
declare const DEFAULT_MCPB_ENTRY_POINT = "server/proxy.js";
|
|
41
|
+
/**
|
|
42
|
+
* Build the full MCPB `manifest.json` object for a remote MCP server, wrapping
|
|
43
|
+
* it with `npx -y mcp-remote <url>` (stdio→HTTP). Returns a plain object ready
|
|
44
|
+
* to `JSON.stringify`.
|
|
45
|
+
*/
|
|
46
|
+
declare function buildMcpbManifest(input: McpbManifestInput): Record<string, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* The `server/proxy.js` stub. MCPB requires an `entry_point` file even though
|
|
49
|
+
* `mcp_config.command` overrides it; if it ever DOES run, it spawns
|
|
50
|
+
* `npx -y mcp-remote <url>` itself so the bundle still works.
|
|
51
|
+
*/
|
|
52
|
+
declare function buildMcpbProxyStub(mcpUrl: string): string;
|
|
53
|
+
|
|
54
|
+
export { DEFAULT_MCPB_ENTRY_POINT as D, type McpbManifestInput as M, type McpbTool as a, MCPB_MANIFEST_VERSION as b, MCPB_MIN_NODE as c, buildMcpbManifest as d, buildMcpbProxyStub as e };
|
package/dist/styles.css
CHANGED
|
@@ -385,4 +385,160 @@
|
|
|
385
385
|
opacity: 1;
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
+
.fai-connect {
|
|
389
|
+
display: flex;
|
|
390
|
+
flex-wrap: wrap;
|
|
391
|
+
align-items: center;
|
|
392
|
+
gap: 8px;
|
|
393
|
+
font-family:
|
|
394
|
+
ui-sans-serif,
|
|
395
|
+
system-ui,
|
|
396
|
+
sans-serif;
|
|
397
|
+
}
|
|
398
|
+
.fai-connect__btn {
|
|
399
|
+
display: inline-flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
gap: 6px;
|
|
402
|
+
border: 1px solid transparent;
|
|
403
|
+
border-radius: 8px;
|
|
404
|
+
padding: 6px 12px;
|
|
405
|
+
font-size: 12px;
|
|
406
|
+
font-weight: 500;
|
|
407
|
+
line-height: 1;
|
|
408
|
+
text-decoration: none;
|
|
409
|
+
cursor: pointer;
|
|
410
|
+
color: #fff;
|
|
411
|
+
background: #18181b;
|
|
412
|
+
transition:
|
|
413
|
+
background 120ms ease,
|
|
414
|
+
opacity 120ms ease,
|
|
415
|
+
box-shadow 120ms ease;
|
|
416
|
+
}
|
|
417
|
+
.fai-connect__btn:hover {
|
|
418
|
+
opacity: 0.92;
|
|
419
|
+
}
|
|
420
|
+
.fai-connect__btn:focus-visible {
|
|
421
|
+
outline: 2px solid currentColor;
|
|
422
|
+
outline-offset: 2px;
|
|
423
|
+
}
|
|
424
|
+
.fai-connect__glyph {
|
|
425
|
+
width: 14px;
|
|
426
|
+
height: 14px;
|
|
427
|
+
flex: 0 0 auto;
|
|
428
|
+
}
|
|
429
|
+
.fai-connect__btn--claude-web {
|
|
430
|
+
background: #cc785c;
|
|
431
|
+
}
|
|
432
|
+
.fai-connect__btn--claude-desktop {
|
|
433
|
+
background: #cc785c;
|
|
434
|
+
}
|
|
435
|
+
.fai-connect__btn--cursor {
|
|
436
|
+
background: #111827;
|
|
437
|
+
}
|
|
438
|
+
.fai-connect__btn--vscode {
|
|
439
|
+
background: #0066b8;
|
|
440
|
+
}
|
|
441
|
+
.fai-connect__btn--manual {
|
|
442
|
+
background: #3f3f46;
|
|
443
|
+
}
|
|
444
|
+
.fai-connect__manual-wrap {
|
|
445
|
+
position: relative;
|
|
446
|
+
display: inline-flex;
|
|
447
|
+
}
|
|
448
|
+
.fai-connect__popover {
|
|
449
|
+
position: absolute;
|
|
450
|
+
top: calc(100% + 6px);
|
|
451
|
+
left: 0;
|
|
452
|
+
z-index: 50;
|
|
453
|
+
width: min(420px, 80vw);
|
|
454
|
+
background: #fff;
|
|
455
|
+
color: #18181b;
|
|
456
|
+
border: 1px solid #e4e4e7;
|
|
457
|
+
border-radius: 10px;
|
|
458
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
|
|
459
|
+
padding: 12px;
|
|
460
|
+
}
|
|
461
|
+
.fai-connect__popover-head {
|
|
462
|
+
display: flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
justify-content: space-between;
|
|
465
|
+
font-size: 12px;
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
margin-bottom: 6px;
|
|
468
|
+
}
|
|
469
|
+
.fai-connect__popover-close {
|
|
470
|
+
border: none;
|
|
471
|
+
background: transparent;
|
|
472
|
+
cursor: pointer;
|
|
473
|
+
font-size: 16px;
|
|
474
|
+
line-height: 1;
|
|
475
|
+
color: #71717a;
|
|
476
|
+
padding: 0 4px;
|
|
477
|
+
}
|
|
478
|
+
.fai-connect__popover-hint {
|
|
479
|
+
font-size: 11px;
|
|
480
|
+
color: #52525b;
|
|
481
|
+
margin: 0 0 8px;
|
|
482
|
+
}
|
|
483
|
+
.fai-connect__popover-hint code {
|
|
484
|
+
font-family:
|
|
485
|
+
ui-monospace,
|
|
486
|
+
SFMono-Regular,
|
|
487
|
+
Menlo,
|
|
488
|
+
monospace;
|
|
489
|
+
background: #f4f4f5;
|
|
490
|
+
padding: 1px 4px;
|
|
491
|
+
border-radius: 4px;
|
|
492
|
+
}
|
|
493
|
+
.fai-connect__snippet {
|
|
494
|
+
margin: 0 0 8px;
|
|
495
|
+
max-height: 220px;
|
|
496
|
+
overflow: auto;
|
|
497
|
+
background: #18181b;
|
|
498
|
+
color: #e4e4e7;
|
|
499
|
+
border-radius: 8px;
|
|
500
|
+
padding: 10px;
|
|
501
|
+
font-family:
|
|
502
|
+
ui-monospace,
|
|
503
|
+
SFMono-Regular,
|
|
504
|
+
Menlo,
|
|
505
|
+
monospace;
|
|
506
|
+
font-size: 11px;
|
|
507
|
+
line-height: 1.5;
|
|
508
|
+
white-space: pre;
|
|
509
|
+
}
|
|
510
|
+
.fai-connect__copy-btn {
|
|
511
|
+
border: 1px solid #e4e4e7;
|
|
512
|
+
border-radius: 7px;
|
|
513
|
+
background: #fafafa;
|
|
514
|
+
color: #18181b;
|
|
515
|
+
cursor: pointer;
|
|
516
|
+
font-size: 11px;
|
|
517
|
+
font-weight: 500;
|
|
518
|
+
padding: 5px 10px;
|
|
519
|
+
}
|
|
520
|
+
.fai-connect__copy-btn:hover {
|
|
521
|
+
background: #f4f4f5;
|
|
522
|
+
}
|
|
523
|
+
@media (prefers-color-scheme: dark) {
|
|
524
|
+
.fai-connect__popover {
|
|
525
|
+
background: #18181b;
|
|
526
|
+
color: #fafafa;
|
|
527
|
+
border-color: #3f3f46;
|
|
528
|
+
}
|
|
529
|
+
.fai-connect__popover-hint {
|
|
530
|
+
color: #a1a1aa;
|
|
531
|
+
}
|
|
532
|
+
.fai-connect__popover-hint code {
|
|
533
|
+
background: #27272a;
|
|
534
|
+
}
|
|
535
|
+
.fai-connect__copy-btn {
|
|
536
|
+
background: #27272a;
|
|
537
|
+
color: #fafafa;
|
|
538
|
+
border-color: #3f3f46;
|
|
539
|
+
}
|
|
540
|
+
.fai-connect__copy-btn:hover {
|
|
541
|
+
background: #3f3f46;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
388
544
|
/*# sourceMappingURL=styles.css.map */
|
package/dist/styles.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles.css"],"sourcesContent":["/* @particle-academy/agent-integrations — minimal styles, host app provides tailwind/theme. */\n\n.fai-panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: white;\n color: #18181b;\n border-radius: 12px;\n border: 1px solid #e4e4e7;\n font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n overflow: hidden;\n}\n@media (prefers-color-scheme: dark) {\n .fai-panel { background: #18181b; color: #fafafa; border-color: #3f3f46; }\n}\n.fai-panel__header {\n display: flex; align-items: center; gap: 10px;\n padding: 10px 12px; border-bottom: 1px solid #e4e4e7;\n}\n@media (prefers-color-scheme: dark) { .fai-panel__header { border-color: #3f3f46; } }\n.fai-panel__avatar {\n width: 32px; height: 32px; border-radius: 50%;\n display: inline-flex; align-items: center; justify-content: center;\n color: white; font-weight: 600; font-size: 14px;\n}\n.fai-panel__title { display: flex; flex-direction: column; line-height: 1.1; flex: 1; }\n.fai-panel__subtitle { font-size: 11px; opacity: 0.6; }\n.fai-panel__actions { display: flex; gap: 6px; }\n.fai-panel__stream {\n flex: 1; overflow: auto; padding: 8px 12px;\n display: flex; flex-direction: column; gap: 6px;\n}\n.fai-panel__empty { font-size: 12px; opacity: 0.5; margin: auto; }\n.fai-row {\n font-size: 12px;\n border-radius: 6px;\n padding: 6px 8px;\n background: rgba(244, 244, 245, 0.6);\n}\n@media (prefers-color-scheme: dark) { .fai-row { background: rgba(63, 63, 70, 0.4); } }\n.fai-row--tool { border-left: 3px solid #a855f7; }\n.fai-row--message { border-left: 3px solid #3b82f6; }\n.fai-row--info { border-left: 3px solid #71717a; }\n.fai-row--error { border-left: 3px solid #ef4444; background: rgba(254, 226, 226, 0.4); }\n.fai-row__meta { display: flex; justify-content: space-between; opacity: 0.6; font-size: 10px; }\n.fai-row__source { font-family: ui-monospace, monospace; }\n.fai-row__text { white-space: pre-wrap; }\n.fai-row__detail summary { cursor: pointer; opacity: 0.7; font-size: 11px; margin-top: 4px; }\n.fai-row__detail pre {\n font-size: 11px; margin: 4px 0 0; padding: 6px;\n background: rgba(0,0,0,0.06); border-radius: 4px; overflow: auto;\n max-height: 200px;\n}\n.fai-panel__composer {\n display: flex; gap: 6px; padding: 8px;\n border-top: 1px solid #e4e4e7;\n}\n@media (prefers-color-scheme: dark) { .fai-panel__composer { border-color: #3f3f46; } }\n.fai-panel__input {\n flex: 1;\n resize: none;\n border-radius: 6px;\n border: 1px solid #d4d4d8;\n padding: 6px 8px;\n font: inherit;\n background: transparent;\n color: inherit;\n}\n.fai-panel__input:focus { outline: 2px solid #a855f7; outline-offset: -1px; }\n.fai-panel__send {\n align-self: stretch;\n padding: 0 14px;\n border: 0; border-radius: 6px;\n background: #a855f7; color: white;\n cursor: pointer; font-weight: 500;\n}\n.fai-panel__send:disabled { opacity: 0.5; cursor: default; }\n\n/* Cursor */\n.fai-cursor {\n transition: left 500ms cubic-bezier(0.22, 1, 0.36, 1),\n top 500ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n@media (prefers-reduced-motion: reduce) { .fai-cursor { transition: none; } }\n.fai-cursor__tag {\n position: absolute; left: 18px; top: 14px;\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 11px; font-family: system-ui, sans-serif;\n white-space: nowrap;\n}\n.fai-cursor__status { font-style: normal; opacity: 0.85; }\n\n/* Highlight pulse */\n@keyframes fai-pulse {\n 0% { opacity: 0; transform: scale(0.96); }\n 20% { opacity: 1; transform: scale(1.03); }\n 100% { opacity: 0; transform: scale(1); }\n}\n\n/* ShareControls */\n.fai-share {\n border: 1px solid #e4e4e7; border-radius: 12px; padding: 12px;\n background: white; color: #18181b;\n font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px;\n}\n@media (prefers-color-scheme: dark) { .fai-share { background: #18181b; color: #fafafa; border-color: #3f3f46; } }\n.fai-share--idle { display: flex; flex-direction: column; gap: 6px; }\n.fai-share__start { align-self: flex-start; padding: 8px 14px; border: 0; border-radius: 6px; background: #a855f7; color: white; font-weight: 500; cursor: pointer; }\n.fai-share__hint { margin: 0; opacity: 0.7; font-size: 12px; }\n.fai-share__header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }\n.fai-share__id { display: block; opacity: 0.7; font-size: 11px; margin-top: 2px; }\n.fai-share__id code { font-family: ui-monospace, monospace; }\n.fai-share__header-actions { display: flex; gap: 8px; align-items: center; }\n.fai-share__status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(34, 197, 94, 0.15); color: #16a34a; }\n.fai-share__stop { border: 1px solid #d4d4d8; background: transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: inherit; }\n.fai-share__tabs { display: flex; gap: 4px; margin-bottom: 8px; }\n.fai-share__tab { border: 0; background: transparent; cursor: pointer; padding: 4px 10px; border-radius: 4px; color: inherit; font-size: 12px; }\n.fai-share__tab.is-active { background: rgba(168, 85, 247, 0.12); color: #a855f7; }\n.fai-share__panel-label { font-size: 11px; opacity: 0.7; margin-bottom: 4px; }\n.fai-share__copy { display: flex; gap: 6px; align-items: stretch; }\n.fai-share__pre { flex: 1; margin: 0; padding: 8px 10px; background: rgba(0,0,0,0.05); border-radius: 6px; font-family: ui-monospace, monospace; font-size: 11px; white-space: nowrap; overflow: auto; }\n.fai-share__pre.is-multi { white-space: pre; max-height: 240px; }\n.fai-share__copy-btn { border: 1px solid #d4d4d8; background: transparent; cursor: pointer; border-radius: 6px; padding: 0 12px; color: inherit; font-size: 12px; }\n\n/* === Cross-package agent presence === */\n/*\n * Apply `.agent-focused-element` to any DOM node that's currently being\n * touched by an agent. The CSS variables let hosts override the agent's\n * accent without touching the rule. Bridges typically apply this class\n * via a brief side-effect when their tools fire.\n */\n.agent-focused-element {\n --agent-color: #a855f7;\n position: relative;\n outline: 2px solid var(--agent-color);\n outline-offset: 2px;\n border-radius: 4px;\n animation: agent-focus-pulse 1500ms ease-out forwards;\n}\n@keyframes agent-focus-pulse {\n 0% { box-shadow: 0 0 0 0 var(--agent-color); }\n 40% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.18); }\n 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); outline-color: transparent; }\n}\n@media (prefers-reduced-motion: reduce) {\n .agent-focused-element { animation: none; }\n}\n\n/* Small badge hosts can drop next to an element to label \"Agent active\". */\n.agent-active-badge {\n display: inline-flex; align-items: center; gap: 4px;\n background: var(--agent-color, #a855f7);\n color: white;\n font-family: ui-sans-serif, system-ui, sans-serif;\n font-size: 11px; font-weight: 500;\n padding: 2px 6px; border-radius: 999px;\n vertical-align: middle;\n}\n.agent-active-badge::before {\n content: \"\";\n width: 6px; height: 6px;\n border-radius: 50%;\n background: white;\n animation: agent-active-blink 1.4s ease-in-out infinite;\n}\n@keyframes agent-active-blink {\n 0%, 100% { opacity: 0.4; }\n 50% { opacity: 1; }\n}\n"],"mappings":";AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR,cAAY;AACZ,SAAO;AACP,iBAAe;AACf,UAAQ,IAAI,MAAM;AAClB;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE,UAAU;AAAA,IAAE,MAAM;AAAA,IAAE;AAC1E,YAAU;AACZ;AACA,QAAO,sBAAuB;AAC5B,GAZD;AAYc,gBAAY;AAAS,WAAO;AAAS,kBAAc;AAAS;AAC3E;AACA,CAAC;AACC,WAAS;AAAM,eAAa;AAAQ,OAAK;AACzC,WAAS,KAAK;AAAM,iBAAe,IAAI,MAAM;AAC/C;AACA,QAAO,sBAAuB;AAAQ,GAJrC;AAI0D,kBAAc;AAAS;AAAE;AACpF,CAAC;AACC,SAAO;AAAM,UAAQ;AAAM,iBAAe;AAC1C,WAAS;AAAa,eAAa;AAAQ,mBAAiB;AAC5D,SAAO;AAAO,eAAa;AAAK,aAAW;AAC7C;AACA,CAAC;AAAmB,WAAS;AAAM,kBAAgB;AAAQ,eAAa;AAAK,QAAM;AAAG;AACtF,CAAC;AAAsB,aAAW;AAAM,WAAS;AAAK;AACtD,CAAC;AAAqB,WAAS;AAAM,OAAK;AAAK;AAC/C,CAAC;AACC,QAAM;AAAG,YAAU;AAAM,WAAS,IAAI;AACtC,WAAS;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AM;AASlK,CAAC;AACC,iBAAe;AACf,YAAU;AACV,WAAS,IAAI,MAAM,IAAI;AACvB,kBAAgB;AAChB,iBAAe;AACf,aAAW,kBAAkB,OAAO,SAAS;AAC/C;AACA,WAFa;AAGX;AAAO,gBAAY,EAAE,EAAE,EAAE,EAAE,IAAI;AAAgB;AAC/C;AAAO,gBAAY,EAAE,EAAE,EAAE,IAAI,KAAK,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE;AAAO;AACvD;AAAO,gBAAY,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE;AAAI,mBAAe;AAAa;AAChF;AACA,QAAO,wBAAyB;AAC9B,GAdD;AAc0B,eAAW;AAAM;AAC5C;AAGA,CAAC;AACC,WAAS;AAAa,eAAa;AAAQ,OAAK;AAChD,cAAY,IAAI,aAAa,EAAE;AAC/B,SAAO;AACP;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE;AACvC,aAAW;AAAM,eAAa;AAC9B,WAAS,IAAI;AAAK,iBAAe;AACjC,kBAAgB;AAClB;AACA,CATC,kBASkB;AACjB,WAAS;AACT,SAAO;AAAK,UAAQ;AACpB,iBAAe;AACf,cAAY;AACZ,aAAW,mBAAmB,KAAK,YAAY;AACjD;AACA,WAFa;AAGX;AAAW,aAAS;AAAK;AACzB;AAAW,aAAS;AAAG;AACzB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/styles.css"],"sourcesContent":["/* @particle-academy/agent-integrations — minimal styles, host app provides tailwind/theme. */\n\n.fai-panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: white;\n color: #18181b;\n border-radius: 12px;\n border: 1px solid #e4e4e7;\n font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n overflow: hidden;\n}\n@media (prefers-color-scheme: dark) {\n .fai-panel { background: #18181b; color: #fafafa; border-color: #3f3f46; }\n}\n.fai-panel__header {\n display: flex; align-items: center; gap: 10px;\n padding: 10px 12px; border-bottom: 1px solid #e4e4e7;\n}\n@media (prefers-color-scheme: dark) { .fai-panel__header { border-color: #3f3f46; } }\n.fai-panel__avatar {\n width: 32px; height: 32px; border-radius: 50%;\n display: inline-flex; align-items: center; justify-content: center;\n color: white; font-weight: 600; font-size: 14px;\n}\n.fai-panel__title { display: flex; flex-direction: column; line-height: 1.1; flex: 1; }\n.fai-panel__subtitle { font-size: 11px; opacity: 0.6; }\n.fai-panel__actions { display: flex; gap: 6px; }\n.fai-panel__stream {\n flex: 1; overflow: auto; padding: 8px 12px;\n display: flex; flex-direction: column; gap: 6px;\n}\n.fai-panel__empty { font-size: 12px; opacity: 0.5; margin: auto; }\n.fai-row {\n font-size: 12px;\n border-radius: 6px;\n padding: 6px 8px;\n background: rgba(244, 244, 245, 0.6);\n}\n@media (prefers-color-scheme: dark) { .fai-row { background: rgba(63, 63, 70, 0.4); } }\n.fai-row--tool { border-left: 3px solid #a855f7; }\n.fai-row--message { border-left: 3px solid #3b82f6; }\n.fai-row--info { border-left: 3px solid #71717a; }\n.fai-row--error { border-left: 3px solid #ef4444; background: rgba(254, 226, 226, 0.4); }\n.fai-row__meta { display: flex; justify-content: space-between; opacity: 0.6; font-size: 10px; }\n.fai-row__source { font-family: ui-monospace, monospace; }\n.fai-row__text { white-space: pre-wrap; }\n.fai-row__detail summary { cursor: pointer; opacity: 0.7; font-size: 11px; margin-top: 4px; }\n.fai-row__detail pre {\n font-size: 11px; margin: 4px 0 0; padding: 6px;\n background: rgba(0,0,0,0.06); border-radius: 4px; overflow: auto;\n max-height: 200px;\n}\n.fai-panel__composer {\n display: flex; gap: 6px; padding: 8px;\n border-top: 1px solid #e4e4e7;\n}\n@media (prefers-color-scheme: dark) { .fai-panel__composer { border-color: #3f3f46; } }\n.fai-panel__input {\n flex: 1;\n resize: none;\n border-radius: 6px;\n border: 1px solid #d4d4d8;\n padding: 6px 8px;\n font: inherit;\n background: transparent;\n color: inherit;\n}\n.fai-panel__input:focus { outline: 2px solid #a855f7; outline-offset: -1px; }\n.fai-panel__send {\n align-self: stretch;\n padding: 0 14px;\n border: 0; border-radius: 6px;\n background: #a855f7; color: white;\n cursor: pointer; font-weight: 500;\n}\n.fai-panel__send:disabled { opacity: 0.5; cursor: default; }\n\n/* Cursor */\n.fai-cursor {\n transition: left 500ms cubic-bezier(0.22, 1, 0.36, 1),\n top 500ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n@media (prefers-reduced-motion: reduce) { .fai-cursor { transition: none; } }\n.fai-cursor__tag {\n position: absolute; left: 18px; top: 14px;\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 11px; font-family: system-ui, sans-serif;\n white-space: nowrap;\n}\n.fai-cursor__status { font-style: normal; opacity: 0.85; }\n\n/* Highlight pulse */\n@keyframes fai-pulse {\n 0% { opacity: 0; transform: scale(0.96); }\n 20% { opacity: 1; transform: scale(1.03); }\n 100% { opacity: 0; transform: scale(1); }\n}\n\n/* ShareControls */\n.fai-share {\n border: 1px solid #e4e4e7; border-radius: 12px; padding: 12px;\n background: white; color: #18181b;\n font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px;\n}\n@media (prefers-color-scheme: dark) { .fai-share { background: #18181b; color: #fafafa; border-color: #3f3f46; } }\n.fai-share--idle { display: flex; flex-direction: column; gap: 6px; }\n.fai-share__start { align-self: flex-start; padding: 8px 14px; border: 0; border-radius: 6px; background: #a855f7; color: white; font-weight: 500; cursor: pointer; }\n.fai-share__hint { margin: 0; opacity: 0.7; font-size: 12px; }\n.fai-share__header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }\n.fai-share__id { display: block; opacity: 0.7; font-size: 11px; margin-top: 2px; }\n.fai-share__id code { font-family: ui-monospace, monospace; }\n.fai-share__header-actions { display: flex; gap: 8px; align-items: center; }\n.fai-share__status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(34, 197, 94, 0.15); color: #16a34a; }\n.fai-share__stop { border: 1px solid #d4d4d8; background: transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: inherit; }\n.fai-share__tabs { display: flex; gap: 4px; margin-bottom: 8px; }\n.fai-share__tab { border: 0; background: transparent; cursor: pointer; padding: 4px 10px; border-radius: 4px; color: inherit; font-size: 12px; }\n.fai-share__tab.is-active { background: rgba(168, 85, 247, 0.12); color: #a855f7; }\n.fai-share__panel-label { font-size: 11px; opacity: 0.7; margin-bottom: 4px; }\n.fai-share__copy { display: flex; gap: 6px; align-items: stretch; }\n.fai-share__pre { flex: 1; margin: 0; padding: 8px 10px; background: rgba(0,0,0,0.05); border-radius: 6px; font-family: ui-monospace, monospace; font-size: 11px; white-space: nowrap; overflow: auto; }\n.fai-share__pre.is-multi { white-space: pre; max-height: 240px; }\n.fai-share__copy-btn { border: 1px solid #d4d4d8; background: transparent; cursor: pointer; border-radius: 6px; padding: 0 12px; color: inherit; font-size: 12px; }\n\n/* === Cross-package agent presence === */\n/*\n * Apply `.agent-focused-element` to any DOM node that's currently being\n * touched by an agent. The CSS variables let hosts override the agent's\n * accent without touching the rule. Bridges typically apply this class\n * via a brief side-effect when their tools fire.\n */\n.agent-focused-element {\n --agent-color: #a855f7;\n position: relative;\n outline: 2px solid var(--agent-color);\n outline-offset: 2px;\n border-radius: 4px;\n animation: agent-focus-pulse 1500ms ease-out forwards;\n}\n@keyframes agent-focus-pulse {\n 0% { box-shadow: 0 0 0 0 var(--agent-color); }\n 40% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.18); }\n 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); outline-color: transparent; }\n}\n@media (prefers-reduced-motion: reduce) {\n .agent-focused-element { animation: none; }\n}\n\n/* Small badge hosts can drop next to an element to label \"Agent active\". */\n.agent-active-badge {\n display: inline-flex; align-items: center; gap: 4px;\n background: var(--agent-color, #a855f7);\n color: white;\n font-family: ui-sans-serif, system-ui, sans-serif;\n font-size: 11px; font-weight: 500;\n padding: 2px 6px; border-radius: 999px;\n vertical-align: middle;\n}\n.agent-active-badge::before {\n content: \"\";\n width: 6px; height: 6px;\n border-radius: 50%;\n background: white;\n animation: agent-active-blink 1.4s ease-in-out infinite;\n}\n@keyframes agent-active-blink {\n 0%, 100% { opacity: 0.4; }\n 50% { opacity: 1; }\n}\n\n/* ── Connector buttons (ConnectorButtons) ─────────────────────────────────── */\n.fai-connect {\n display: flex; flex-wrap: wrap; align-items: center; gap: 8px;\n font-family: ui-sans-serif, system-ui, sans-serif;\n}\n.fai-connect__btn {\n display: inline-flex; align-items: center; gap: 6px;\n border: 1px solid transparent; border-radius: 8px;\n padding: 6px 12px;\n font-size: 12px; font-weight: 500; line-height: 1;\n text-decoration: none; cursor: pointer;\n color: #fff; background: #18181b;\n transition: background 120ms ease, opacity 120ms ease, box-shadow 120ms ease;\n}\n.fai-connect__btn:hover { opacity: 0.92; }\n.fai-connect__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }\n.fai-connect__glyph { width: 14px; height: 14px; flex: 0 0 auto; }\n.fai-connect__btn--claude-web { background: #cc785c; }\n.fai-connect__btn--claude-desktop{ background: #cc785c; }\n.fai-connect__btn--cursor { background: #111827; }\n.fai-connect__btn--vscode { background: #0066b8; }\n.fai-connect__btn--manual { background: #3f3f46; }\n\n.fai-connect__manual-wrap { position: relative; display: inline-flex; }\n.fai-connect__popover {\n position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;\n width: min(420px, 80vw);\n background: #fff; color: #18181b;\n border: 1px solid #e4e4e7; border-radius: 10px;\n box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);\n padding: 12px;\n}\n.fai-connect__popover-head {\n display: flex; align-items: center; justify-content: space-between;\n font-size: 12px; font-weight: 600; margin-bottom: 6px;\n}\n.fai-connect__popover-close {\n border: none; background: transparent; cursor: pointer;\n font-size: 16px; line-height: 1; color: #71717a; padding: 0 4px;\n}\n.fai-connect__popover-hint { font-size: 11px; color: #52525b; margin: 0 0 8px; }\n.fai-connect__popover-hint code {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n background: #f4f4f5; padding: 1px 4px; border-radius: 4px;\n}\n.fai-connect__snippet {\n margin: 0 0 8px; max-height: 220px; overflow: auto;\n background: #18181b; color: #e4e4e7;\n border-radius: 8px; padding: 10px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 11px; line-height: 1.5; white-space: pre;\n}\n.fai-connect__copy-btn {\n border: 1px solid #e4e4e7; border-radius: 7px;\n background: #fafafa; color: #18181b; cursor: pointer;\n font-size: 11px; font-weight: 500; padding: 5px 10px;\n}\n.fai-connect__copy-btn:hover { background: #f4f4f5; }\n\n@media (prefers-color-scheme: dark) {\n .fai-connect__popover { background: #18181b; color: #fafafa; border-color: #3f3f46; }\n .fai-connect__popover-hint { color: #a1a1aa; }\n .fai-connect__popover-hint code { background: #27272a; }\n .fai-connect__copy-btn { background: #27272a; color: #fafafa; border-color: #3f3f46; }\n .fai-connect__copy-btn:hover { background: #3f3f46; }\n}\n"],"mappings":";AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR,cAAY;AACZ,SAAO;AACP,iBAAe;AACf,UAAQ,IAAI,MAAM;AAClB;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE,UAAU;AAAA,IAAE,MAAM;AAAA,IAAE;AAC1E,YAAU;AACZ;AACA,QAAO,sBAAuB;AAC5B,GAZD;AAYc,gBAAY;AAAS,WAAO;AAAS,kBAAc;AAAS;AAC3E;AACA,CAAC;AACC,WAAS;AAAM,eAAa;AAAQ,OAAK;AACzC,WAAS,KAAK;AAAM,iBAAe,IAAI,MAAM;AAC/C;AACA,QAAO,sBAAuB;AAAQ,GAJrC;AAI0D,kBAAc;AAAS;AAAE;AACpF,CAAC;AACC,SAAO;AAAM,UAAQ;AAAM,iBAAe;AAC1C,WAAS;AAAa,eAAa;AAAQ,mBAAiB;AAC5D,SAAO;AAAO,eAAa;AAAK,aAAW;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,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAClD,cAAY;AAAS,WAAS,IAAI;AAAK,iBAAe;AACxD;AACA,CAAC;AACC,UAAQ,EAAE,EAAE;AAAK,cAAY;AAAO,YAAU;AAC9C,cAAY;AAAS,SAAO;AAC5B,iBAAe;AAAK,WAAS;AAC7B;AAAA,IAAa,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AAClD,aAAW;AAAM,eAAa;AAAK,eAAa;AAClD;AACA,CAAC;AACC,UAAQ,IAAI,MAAM;AAAS,iBAAe;AAC1C,cAAY;AAAS,SAAO;AAAS,UAAQ;AAC7C,aAAW;AAAM,eAAa;AAAK,WAAS,IAAI;AAClD;AACA,CALC,qBAKqB;AAAS,cAAY;AAAS;AAEpD,QAAO,sBAAuB;AAC5B,GApCD;AAoCyB,gBAAY;AAAS,WAAO;AAAS,kBAAc;AAAS;AACpF,GArBD;AAqB8B,WAAO;AAAS;AAC7C,GAtBD,0BAsB4B;AAAO,gBAAY;AAAS;AACvD,GAXD;AAW0B,gBAAY;AAAS,WAAO;AAAS,kBAAc;AAAS;AACrF,GAZD,qBAYuB;AAAS,gBAAY;AAAS;AACtD;","names":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Connector builder — per-client MCP install artifacts
|
|
2
|
+
|
|
3
|
+
Every app that exposes an MCP server has to ship "Add to Claude / Cursor / VS
|
|
4
|
+
Code" affordances and (for Claude Desktop) a `.mcpb` bundle. Each host wants the
|
|
5
|
+
server handed to it differently, and each format is subtly wrong the first time.
|
|
6
|
+
This module is the single source of truth for those formats — a runtime React
|
|
7
|
+
component plus a build-time `.mcpb` helper.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {
|
|
11
|
+
ConnectorButtons, // React buttons
|
|
12
|
+
buildCursorDeeplink, // pure builders
|
|
13
|
+
buildVscodeDeeplink,
|
|
14
|
+
buildManualConfigSnippet,
|
|
15
|
+
} from "@particle-academy/agent-integrations";
|
|
16
|
+
|
|
17
|
+
import { writeMcpbBundle } from "@particle-academy/agent-integrations/connectors/build"; // Node only
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What each client actually needs
|
|
21
|
+
|
|
22
|
+
| Client | Mechanism | Notes |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `claude-web` | **copy URL + open** the Connectors page | Claude has **no install deeplink** (web or Desktop). Best a button can do is copy the URL and open `claude.ai/settings/connectors` for a manual "Add custom connector". |
|
|
25
|
+
| `claude-desktop` | **download a `.mcpb`** | The only double-click path. Build it with `writeMcpbBundle` (below). |
|
|
26
|
+
| `cursor` | **deeplink** | `cursor://anysphere.cursor-deeplink/mcp/install?name=&config=<base64>` — base64 of `{"url":"…"}` for an HTTP server (no `type`/`transport`). |
|
|
27
|
+
| `vscode` | **deeplink** | `vscode://mcp/install?<urlencoded-json>` — URL-encoded JSON `{name,url}` (NOT base64; different from Cursor). |
|
|
28
|
+
| `manual` | **JSON snippet** | A `claude_desktop_config.json` entry wrapping the URL with `npx -y mcp-remote <url>` (stdio clients can't take an HTTP URL). |
|
|
29
|
+
|
|
30
|
+
## Runtime — `<ConnectorButtons>`
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { ConnectorButtons } from "@particle-academy/agent-integrations";
|
|
34
|
+
import "@particle-academy/agent-integrations/styles.css";
|
|
35
|
+
|
|
36
|
+
<ConnectorButtons
|
|
37
|
+
serverName="Decksmith"
|
|
38
|
+
mcpUrl="https://decksmith.dev/mcp"
|
|
39
|
+
mcpbDownloadUrl="/decksmith.mcpb" // optional — enables the Claude Desktop button
|
|
40
|
+
onCopy={(target) => toast(`Copied — paste in ${target}`)}
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The component owns brand glyphs, copy/feedback states, and the manual-config
|
|
45
|
+
popover. Customize which buttons render and their labels:
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<ConnectorButtons
|
|
49
|
+
serverName="Decksmith"
|
|
50
|
+
mcpUrl="https://decksmith.dev/mcp"
|
|
51
|
+
clients={["cursor", "vscode", "manual"]}
|
|
52
|
+
labels={{ cursor: "Open in Cursor" }}
|
|
53
|
+
vscodeInsiders
|
|
54
|
+
claudeConnectorsUrl="https://claude.ai/settings/connectors"
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`clients` defaults to `["claude-web", "cursor", "vscode", "manual"]`, plus
|
|
59
|
+
`"claude-desktop"` when `mcpbDownloadUrl` is set. A `"claude-desktop"` entry with
|
|
60
|
+
no bundle URL is skipped.
|
|
61
|
+
|
|
62
|
+
### Just want the URLs?
|
|
63
|
+
|
|
64
|
+
The builders are pure and framework-agnostic — render your own buttons:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import {
|
|
68
|
+
buildCursorDeeplink,
|
|
69
|
+
buildVscodeDeeplink,
|
|
70
|
+
buildManualConfigSnippet,
|
|
71
|
+
CLAUDE_CONNECTORS_URL,
|
|
72
|
+
} from "@particle-academy/agent-integrations";
|
|
73
|
+
|
|
74
|
+
const server = { name: "Decksmith", url: "https://decksmith.dev/mcp" };
|
|
75
|
+
buildCursorDeeplink(server); // cursor://…
|
|
76
|
+
buildVscodeDeeplink(server); // vscode://…
|
|
77
|
+
buildManualConfigSnippet(server); // claude_desktop_config.json JSON
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Build — `writeMcpbBundle()`
|
|
81
|
+
|
|
82
|
+
`.mcpb` (Claude Desktop Extensions) is **stdio-only** — there is no
|
|
83
|
+
`type: "http"`. To bundle a remote server you ship a thin `node` proxy whose
|
|
84
|
+
`mcp_config` runs `npx -y mcp-remote <url>`. This helper writes the manifest +
|
|
85
|
+
the (validator-required) proxy stub and packs them with the official
|
|
86
|
+
`@anthropic-ai/mcpb` CLI.
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
// scripts/build-mcpb.mjs — run at build time (needs Node 18+)
|
|
90
|
+
import { writeMcpbBundle } from "@particle-academy/agent-integrations/connectors/build";
|
|
91
|
+
|
|
92
|
+
await writeMcpbBundle({
|
|
93
|
+
outFile: "public/decksmith.mcpb",
|
|
94
|
+
manifest: {
|
|
95
|
+
name: "decksmith",
|
|
96
|
+
display_name: "Decksmith",
|
|
97
|
+
version: "0.2.0",
|
|
98
|
+
description: "Agent-driven slide deck builder.",
|
|
99
|
+
author: { name: "Particle Academy", url: "https://decksmith.dev" },
|
|
100
|
+
mcpUrl: "https://decksmith.dev/mcp",
|
|
101
|
+
tools: [{ name: "start_session", description: "Lock onto a deck." }],
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Options: `mcpbBin` (override the default `npx -y @anthropic-ai/mcpb`, e.g. a
|
|
107
|
+
locally installed binary), `validate` (default `true`), `keepWorkDir`, `cwd`.
|
|
108
|
+
|
|
109
|
+
> **Future-proof.** When MCPB grows a real `type: "http"`, drop the proxy and
|
|
110
|
+
> point the manifest straight at the URL — your call site here doesn't change.
|
|
111
|
+
|
|
112
|
+
## Caveats baked in
|
|
113
|
+
|
|
114
|
+
- The `.mcpb` route needs **Node 18+** on the end user's machine (for `npx` /
|
|
115
|
+
`mcp-remote`) and adds a process hop Claude → node → mcp-remote → server.
|
|
116
|
+
- Claude's "one-click install via URL" does not exist; don't promise it.
|
|
117
|
+
- OAuth-protected remote servers (Claude Desktop's callback at
|
|
118
|
+
`claude.ai/api/mcp/auth_callback`) aren't handled yet — room left for it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/agent-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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",
|
|
@@ -157,6 +157,26 @@
|
|
|
157
157
|
"default": "./dist/sheets-adapter.cjs"
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
+
"./connectors": {
|
|
161
|
+
"import": {
|
|
162
|
+
"types": "./dist/connectors/index.d.ts",
|
|
163
|
+
"default": "./dist/connectors.js"
|
|
164
|
+
},
|
|
165
|
+
"require": {
|
|
166
|
+
"types": "./dist/connectors/index.d.cts",
|
|
167
|
+
"default": "./dist/connectors.cjs"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"./connectors/build": {
|
|
171
|
+
"import": {
|
|
172
|
+
"types": "./dist/connectors/build.d.ts",
|
|
173
|
+
"default": "./dist/connectors-build.js"
|
|
174
|
+
},
|
|
175
|
+
"require": {
|
|
176
|
+
"types": "./dist/connectors/build.d.cts",
|
|
177
|
+
"default": "./dist/connectors-build.cjs"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
160
180
|
"./components/shared-whiteboard": {
|
|
161
181
|
"import": {
|
|
162
182
|
"types": "./dist/components/SharedWhiteboard/index.d.ts",
|
|
@@ -218,6 +238,8 @@
|
|
|
218
238
|
"build": "tsup",
|
|
219
239
|
"dev": "tsup --watch",
|
|
220
240
|
"lint": "tsc --noEmit",
|
|
241
|
+
"test": "vitest run",
|
|
242
|
+
"test:watch": "vitest",
|
|
221
243
|
"clean": "rm -rf dist",
|
|
222
244
|
"prepublishOnly": "tsup"
|
|
223
245
|
},
|
|
@@ -259,13 +281,16 @@
|
|
|
259
281
|
"devDependencies": {
|
|
260
282
|
"@particle-academy/fancy-slides": "^0.12.0",
|
|
261
283
|
"@particle-academy/fancy-whiteboard": "^0.2.0",
|
|
284
|
+
"@testing-library/react": "^16.0.0",
|
|
262
285
|
"@types/node": "^22.0.0",
|
|
263
286
|
"@types/react": "^19.0.0",
|
|
264
287
|
"@types/react-dom": "^19.0.0",
|
|
288
|
+
"jsdom": "^25.0.0",
|
|
265
289
|
"react": "^19.0.0",
|
|
266
290
|
"react-dom": "^19.0.0",
|
|
267
291
|
"tsup": "^8.0.0",
|
|
268
|
-
"typescript": "^5.7.0"
|
|
292
|
+
"typescript": "^5.7.0",
|
|
293
|
+
"vitest": "^3.0.0"
|
|
269
294
|
},
|
|
270
295
|
"publishConfig": {
|
|
271
296
|
"access": "public"
|