recordful-mcp 0.4.0 → 0.6.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/CHANGELOG.md +77 -53
- package/LICENSE +21 -21
- package/README.md +177 -171
- package/SECURITY.md +36 -36
- package/dist/args.js +1 -1
- package/dist/args.js.map +1 -1
- package/dist/cli.js +169 -33
- package/dist/cli.js.map +1 -1
- package/dist/core/createRecordfulServer.d.ts +11 -0
- package/dist/core/createRecordfulServer.js +207 -0
- package/dist/core/createRecordfulServer.js.map +1 -0
- package/dist/core/libraryTools.d.ts +6 -0
- package/dist/core/libraryTools.js +61 -0
- package/dist/core/libraryTools.js.map +1 -0
- package/dist/core/transport.d.ts +18 -0
- package/dist/core/transport.js +10 -0
- package/dist/core/transport.js.map +1 -0
- package/dist/core/videoTools.js.map +1 -0
- package/dist/guide.d.ts +33 -0
- package/dist/guide.js +94 -0
- package/dist/guide.js.map +1 -0
- package/dist/install.d.ts +25 -0
- package/dist/install.js +179 -0
- package/dist/install.js.map +1 -0
- package/dist/mcp/createMcpServer.d.ts +2 -2
- package/dist/mcp/createMcpServer.js +51 -257
- package/dist/mcp/createMcpServer.js.map +1 -1
- package/dist/mcp/localTransport.d.ts +3 -0
- package/dist/mcp/localTransport.js +26 -0
- package/dist/mcp/localTransport.js.map +1 -0
- package/dist/protocol/errors.d.ts +2 -0
- package/dist/protocol/errors.js +2 -0
- package/dist/protocol/errors.js.map +1 -1
- package/dist/protocol/methods.d.ts +9 -0
- package/dist/protocol/methods.js +10 -0
- package/dist/protocol/methods.js.map +1 -1
- package/dist/protocol/video.d.ts +33 -0
- package/dist/protocol/video.js +30 -0
- package/dist/protocol/video.js.map +1 -1
- package/dist/setupGuide.js +44 -44
- package/dist/setupPrompt.d.ts +1 -0
- package/dist/setupPrompt.js +33 -0
- package/dist/setupPrompt.js.map +1 -0
- package/dist/skill.d.ts +1 -0
- package/dist/skill.js +4 -0
- package/dist/skill.js.map +1 -0
- package/package.json +64 -64
- package/dist/mcp/videoTools.js.map +0 -1
- /package/dist/{mcp → core}/videoTools.d.ts +0 -0
- /package/dist/{mcp → core}/videoTools.js +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// MCP surface: one tool per recorder action. Tools are thin; the extension
|
|
2
|
+
// owns recording state and the transport carries requests to it, so this
|
|
3
|
+
// layer only validates input, waits for the extension, and shapes results for
|
|
4
|
+
// the agent. Transport-agnostic: the local server (src/mcp/createMcpServer.ts)
|
|
5
|
+
// and the hosted one (hosted/) both build on it.
|
|
6
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { BridgeError, ErrorCode } from "../protocol/errors.js";
|
|
9
|
+
import { Method } from "../protocol/methods.js";
|
|
10
|
+
import { pageExtraWaitMs, pageParams, parsePageParams } from "../protocol/page.js";
|
|
11
|
+
import { registerLibraryTools } from "./libraryTools.js";
|
|
12
|
+
import { registerVideoTools } from "./videoTools.js";
|
|
13
|
+
const text = (value) => ({
|
|
14
|
+
content: [{ type: "text", text: typeof value === "string" ? value : JSON.stringify(value, null, 2) }],
|
|
15
|
+
});
|
|
16
|
+
const failure = (err) => {
|
|
17
|
+
const e = err instanceof BridgeError
|
|
18
|
+
? err
|
|
19
|
+
: new BridgeError(ErrorCode.Internal, err instanceof Error ? err.message : String(err));
|
|
20
|
+
return {
|
|
21
|
+
isError: true,
|
|
22
|
+
content: [
|
|
23
|
+
{
|
|
24
|
+
type: "text",
|
|
25
|
+
text: JSON.stringify({ error: { code: e.code, message: e.message, data: e.data } }, null, 2),
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
// Upper bound on how long the extension may spend inside a recording call.
|
|
31
|
+
const waitMs = z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(1_000)
|
|
35
|
+
.max(120_000)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Maximum time to wait for the recorder to reach the new state, in milliseconds.");
|
|
38
|
+
const tabId = z
|
|
39
|
+
.number()
|
|
40
|
+
.int()
|
|
41
|
+
.nonnegative()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Chrome tab ID to target. Defaults to the active tab of the last focused window.");
|
|
44
|
+
export const createRecordfulServer = (deps) => {
|
|
45
|
+
const { transport, copy, timeouts, logger } = deps;
|
|
46
|
+
const log = logger.child({ component: "mcp" });
|
|
47
|
+
const server = new McpServer({ name: "recordful", title: "Recordful", version: deps.version }, { instructions: copy.instructions });
|
|
48
|
+
// Every call waits briefly for the extension: Chrome idles service workers,
|
|
49
|
+
// and a cold one needs a moment to wake and dial back in.
|
|
50
|
+
const call = async (method, params, extraWaitMs = 0) => {
|
|
51
|
+
await transport.ready(timeouts.connectWaitMs);
|
|
52
|
+
const started = Date.now();
|
|
53
|
+
try {
|
|
54
|
+
return await transport.request(method, params, timeouts.requestTimeoutMs + extraWaitMs);
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
log.info("tool call", { method, ms: Date.now() - started });
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const handle = (fn) => async (args) => {
|
|
61
|
+
try {
|
|
62
|
+
return text(await fn(args));
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
return failure(err);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
server.registerTool("get_status", {
|
|
69
|
+
title: "Get recorder status",
|
|
70
|
+
description: "Report whether the Recordful extension is connected and what the recorder is doing (idle, starting, recording, paused), the selected recording mode, the active tab, and which capture permissions are granted. Safe to call any time.",
|
|
71
|
+
inputSchema: {},
|
|
72
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
73
|
+
}, async () => {
|
|
74
|
+
const status = await transport.status();
|
|
75
|
+
const base = { bridge: status.detail };
|
|
76
|
+
if (!status.connected)
|
|
77
|
+
return text({ ...base, recorder: null, hint: status.hint });
|
|
78
|
+
try {
|
|
79
|
+
return text({ ...base, recorder: await call(Method.StatusGet, {}) });
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
return failure(err);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
server.registerTool("start_recording", {
|
|
86
|
+
title: "Start recording",
|
|
87
|
+
description: "Start a Recordful recording on the target tab using the user's saved Recordful settings (mode, microphone, camera, countdown). Resolves once capture is live, or reports why it could not start. Navigate to the page you want to show before calling this.",
|
|
88
|
+
inputSchema: { tabId, timeoutMs: waitMs },
|
|
89
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
90
|
+
}, handle(async ({ tabId, timeoutMs }) => {
|
|
91
|
+
const wait = timeoutMs ?? 30_000;
|
|
92
|
+
return call(Method.RecordingStart, { tabId, timeoutMs: wait }, wait);
|
|
93
|
+
}));
|
|
94
|
+
server.registerTool("stop_recording", {
|
|
95
|
+
title: "Stop recording",
|
|
96
|
+
description: 'Stop the current Recordful recording. Recordful then opens its editor with the recording, exactly as when the user clicks Stop. Returns where it went: recording.kind "cloud" (Recordful Pro: already uploading, with its videoId and links) or "local" (saved on this computer as takeId; upload_recording uploads it).',
|
|
97
|
+
inputSchema: { timeoutMs: waitMs },
|
|
98
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
99
|
+
}, handle(async ({ timeoutMs }) => {
|
|
100
|
+
const wait = timeoutMs ?? 30_000;
|
|
101
|
+
// After stopping, a local recording is written out (up to 20 s) and the
|
|
102
|
+
// editor opens (up to 15 s) before the extension answers.
|
|
103
|
+
return call(Method.RecordingStop, { timeoutMs: wait }, wait + 40_000);
|
|
104
|
+
}));
|
|
105
|
+
server.registerTool("pause_recording", {
|
|
106
|
+
title: "Pause recording",
|
|
107
|
+
description: "Pause the current recording. Use it while you plan the next step so the video has no dead air. No-op if already paused.",
|
|
108
|
+
inputSchema: {},
|
|
109
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
110
|
+
}, handle(async () => call(Method.RecordingPause, {}, 10_000)));
|
|
111
|
+
server.registerTool("resume_recording", {
|
|
112
|
+
title: "Resume recording",
|
|
113
|
+
description: "Resume a paused recording. No-op if not paused.",
|
|
114
|
+
inputSchema: {},
|
|
115
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
116
|
+
}, handle(async () => call(Method.RecordingResume, {}, 10_000)));
|
|
117
|
+
server.registerTool("probe_capture", {
|
|
118
|
+
title: "Probe capture permissions",
|
|
119
|
+
description: "Diagnostic: check, without recording, whether the extension can capture the target tab right now with no user click, and which optional Chrome permissions are granted. Refuses while a recording is running.",
|
|
120
|
+
inputSchema: { tabId },
|
|
121
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
122
|
+
}, handle(async ({ tabId }) => call(Method.CaptureProbe, { tabId })));
|
|
123
|
+
// ---- page tools ----------------------------------------------------------
|
|
124
|
+
// The extension performs these in the tab the user handed it, so agents
|
|
125
|
+
// without a browser tool can do the walkthrough themselves.
|
|
126
|
+
const pageCall = async (method, args) => {
|
|
127
|
+
const params = parsePageParams(method, args);
|
|
128
|
+
try {
|
|
129
|
+
return await call(method, params, pageExtraWaitMs(method, params));
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
if (err instanceof BridgeError && err.code === ErrorCode.UnknownMethod) {
|
|
133
|
+
throw new BridgeError(err.code, err.message, {
|
|
134
|
+
hint: "This version of Recordful predates page tools. Ask the user to update Recordful (chrome://extensions → Update) and try again.",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
throw err;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const pageTool = (name, method, title, description, annotations) => server.registerTool(name, {
|
|
141
|
+
title,
|
|
142
|
+
description,
|
|
143
|
+
inputSchema: pageParams[method],
|
|
144
|
+
annotations: { destructiveHint: false, idempotentHint: false, openWorldHint: true, ...annotations },
|
|
145
|
+
}, handle(async (args) => pageCall(method, args)));
|
|
146
|
+
pageTool("navigate", Method.PageNavigate, "Open a URL", "Open an http(s) URL in the tab the user handed to Recordful and wait for it to load. Returns the final URL and title. Refs from earlier snapshots stop working.", { readOnlyHint: false });
|
|
147
|
+
pageTool("snapshot", Method.PageSnapshot, "List page elements", "List the interactive elements (links, buttons, fields, checkboxes, tabs, menu items) and headings in the recorded tab, each with a ref to pass to click/type/scroll/wait_for, its role, accessible name, current value or state, and bounding box in CSS pixels. Refs stay the same for an element while it stays on the page.", { readOnlyHint: true });
|
|
148
|
+
pageTool("click", Method.PageClick, "Click an element", "Move Recordful's visible cursor to the element, scrolling it into view if needed, and click it, with a click highlight in the video. Reports a navigation the click started. Fails with ELEMENT_OBSCURED (naming what is on top, with its ref) if something covers it.", { readOnlyHint: false });
|
|
149
|
+
pageTool("type", Method.PageType, "Type into a field", "Click the field, then type the text at a human pace (text inputs, text areas, content-editable areas). Set clear to replace what is already there. Use press for Enter, Tab and other keys.", { readOnlyHint: false });
|
|
150
|
+
pageTool("press", Method.PagePress, "Press a key", "Press a key in the focused element, e.g. Enter to submit a form, Tab to move focus, Escape to close a dialog, ArrowDown in a menu, Shift+Tab, Control+a. Recordful also performs the key's usual effect (submitting, moving focus, deleting), since pages ignore synthetic keys otherwise.", { readOnlyHint: false });
|
|
151
|
+
pageTool("scroll", Method.PageScroll, "Scroll", "Scroll smoothly: either bring an element (ref) into view, or scroll the page in a direction, by amount pixels or most of a screen.", { readOnlyHint: false });
|
|
152
|
+
pageTool("wait_for", Method.PageWaitFor, "Wait for the page", 'Wait until text appears on the page or an element (ref) becomes visible, or with state "hidden" until it goes away. Keeps waiting across navigations. Fails with WAIT_TIMEOUT if it doesn\'t happen in time.', { readOnlyHint: true });
|
|
153
|
+
server.registerTool("screenshot", {
|
|
154
|
+
title: "Screenshot the page",
|
|
155
|
+
description: "Capture what the recorded tab shows right now, as an image, to check the page looks right. The tab must be the active tab of its window.",
|
|
156
|
+
inputSchema: pageParams[Method.PageScreenshot],
|
|
157
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
158
|
+
}, async (args) => {
|
|
159
|
+
try {
|
|
160
|
+
const shot = (await pageCall(Method.PageScreenshot, args));
|
|
161
|
+
const { data, mimeType, ...meta } = shot ?? {};
|
|
162
|
+
if (typeof data !== "string" || typeof mimeType !== "string") {
|
|
163
|
+
throw new BridgeError(ErrorCode.Internal, "The extension returned no image.");
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
content: [
|
|
167
|
+
{ type: "image", data, mimeType },
|
|
168
|
+
{ type: "text", text: JSON.stringify(meta, null, 2) },
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
return failure(err);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
// ---- recordings: upload, videos, transcripts ------------------------------
|
|
177
|
+
const handleTool = async (fn) => {
|
|
178
|
+
try {
|
|
179
|
+
return text(await fn());
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
return failure(err);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
registerVideoTools(server, call, handleTool);
|
|
186
|
+
// ---- managing videos, folders and comments (Pro) ---------------------------
|
|
187
|
+
registerLibraryTools(server, call, handleTool);
|
|
188
|
+
// ---- prompts -------------------------------------------------------------
|
|
189
|
+
// The whole "record the feature I just built" workflow, shipped with the
|
|
190
|
+
// server so every MCP client gets it (Claude Code lists it as
|
|
191
|
+
// /mcp__recordful__record_feature).
|
|
192
|
+
server.registerPrompt("record_feature", {
|
|
193
|
+
title: "Record a feature demo",
|
|
194
|
+
description: "Plan and record a short product demo of a feature with Recordful: work out the user-facing flow, get the app running with test data, record a clean walkthrough, and open it in the editor.",
|
|
195
|
+
argsSchema: {
|
|
196
|
+
feature: z.string().describe("The feature to show, e.g. \"sign up and sign in\" or \"the new billing page\"."),
|
|
197
|
+
url: z
|
|
198
|
+
.string()
|
|
199
|
+
.optional()
|
|
200
|
+
.describe("Where the app runs, e.g. http://localhost:3000. Leave empty to work it out from the project."),
|
|
201
|
+
},
|
|
202
|
+
}, ({ feature, url }) => ({
|
|
203
|
+
messages: [{ role: "user", content: { type: "text", text: copy.recordFeaturePrompt(feature, url) } }],
|
|
204
|
+
}));
|
|
205
|
+
return server;
|
|
206
|
+
};
|
|
207
|
+
//# sourceMappingURL=createRecordfulServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRecordfulServer.js","sourceRoot":"","sources":["../../src/core/createRecordfulServer.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,8EAA8E;AAC9E,+EAA+E;AAC/E,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAYrD,MAAM,IAAI,GAAG,CAAC,KAAc,EAAkB,EAAE,CAAC,CAAC;IAChD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CACtG,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,CAAC,GAAY,EAAkB,EAAE;IAC/C,MAAM,CAAC,GACL,GAAG,YAAY,WAAW;QAC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AAC,QAAQ,CAAC,gFAAgF,CAAC;YAC9G,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,8FAA8F,CAAC;SAC5G;KACF,EACD,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACrB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;KACtG,CAAC,CACH,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import type { Call } from "../workflows.js";
|
|
4
|
+
type Handle = (fn: () => Promise<unknown>) => Promise<CallToolResult>;
|
|
5
|
+
export declare const registerLibraryTools: (server: McpServer, call: Call, handle: Handle) => void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Method } from "../protocol/methods.js";
|
|
2
|
+
import { parseVideoParams, videoParams } from "../protocol/video.js";
|
|
3
|
+
const PRO = "Recordful Pro only (check get_status recorder.account.plan first).";
|
|
4
|
+
const ASK = "Show the user exactly what you will change and wait for their yes first.";
|
|
5
|
+
export const registerLibraryTools = (server, call, handle) => {
|
|
6
|
+
server.registerTool("update_video", {
|
|
7
|
+
title: "Rename a video or change who can watch",
|
|
8
|
+
description: `${PRO} Change a video's title and/or who may watch it: "private" (only the user), "workspace" (their team) or "public" (anyone with the link). ${ASK} Defaults to the last recording. Only the person who recorded it, or the workspace owner, can.`,
|
|
9
|
+
inputSchema: videoParams.update,
|
|
10
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
11
|
+
}, async (args) => handle(() => call(Method.VideoUpdate, parseVideoParams(videoParams.update, args), 40_000)));
|
|
12
|
+
server.registerTool("delete_video", {
|
|
13
|
+
title: "Delete a video",
|
|
14
|
+
description: `${PRO} Permanently delete a video and its files from recordful.app. This can't be undone, and there is no default video: name it. Ask the user to confirm this exact video (title and link) first, then call with confirm: true.`,
|
|
15
|
+
inputSchema: videoParams.remove,
|
|
16
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
17
|
+
}, async (args) => handle(() => call(Method.VideoDelete, parseVideoParams(videoParams.remove, args), 40_000)));
|
|
18
|
+
server.registerTool("get_video_activity", {
|
|
19
|
+
title: "Read views, likes and comments",
|
|
20
|
+
description: `${PRO} What viewers did with a video: its view count, likes, and every comment (oldest first, with author and time). Read-only. Defaults to the last recording.`,
|
|
21
|
+
inputSchema: videoParams.activity,
|
|
22
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
23
|
+
}, async (args) => handle(() => call(Method.VideoEngagement, parseVideoParams(videoParams.activity, args), 40_000)));
|
|
24
|
+
server.registerTool("comment_on_video", {
|
|
25
|
+
title: "Comment on a video",
|
|
26
|
+
description: `${PRO} Post a comment on a video as the signed-in user. It is public to everyone who can watch the video. ${ASK} Pass the comment exactly as the user approved it. Defaults to the last recording.`,
|
|
27
|
+
inputSchema: videoParams.comment,
|
|
28
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
29
|
+
}, async (args) => handle(() => call(Method.VideoComment, parseVideoParams(videoParams.comment, args), 40_000)));
|
|
30
|
+
server.registerTool("like_video", {
|
|
31
|
+
title: "Like or unlike a video",
|
|
32
|
+
description: `${PRO} Like a video as the signed-in user (liked: false removes it). Returns the new like count. Defaults to the last recording.`,
|
|
33
|
+
inputSchema: videoParams.like,
|
|
34
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
35
|
+
}, async (args) => handle(() => call(Method.VideoLike, parseVideoParams(videoParams.like, args), 40_000)));
|
|
36
|
+
server.registerTool("list_folders", {
|
|
37
|
+
title: "List folders",
|
|
38
|
+
description: `${PRO} The user's folders on recordful.app: folderId, name, parentId (null at the top level) and whether it's shared. list_videos shows each video's folderId.`,
|
|
39
|
+
inputSchema: {},
|
|
40
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
41
|
+
}, async () => handle(() => call(Method.FolderList, {}, 40_000)));
|
|
42
|
+
server.registerTool("create_folder", {
|
|
43
|
+
title: "Create a folder",
|
|
44
|
+
description: `${PRO} Create a folder, at the top level or inside another folder. ${ASK}`,
|
|
45
|
+
inputSchema: videoParams.createFolder,
|
|
46
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
47
|
+
}, async (args) => handle(() => call(Method.FolderCreate, parseVideoParams(videoParams.createFolder, args), 40_000)));
|
|
48
|
+
server.registerTool("move_videos", {
|
|
49
|
+
title: "Move videos into a folder",
|
|
50
|
+
description: `${PRO} Move videos into a folder (folderId null moves them to the top level). Moving into a shared folder shares them, except private videos. ${ASK} Videos the user can't manage come back as skipped.`,
|
|
51
|
+
inputSchema: videoParams.move,
|
|
52
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
53
|
+
}, async (args) => handle(() => call(Method.VideoMove, parseVideoParams(videoParams.move, args), 40_000)));
|
|
54
|
+
server.registerTool("get_storage", {
|
|
55
|
+
title: "Check storage",
|
|
56
|
+
description: `${PRO} How much of the user's Recordful cloud storage is used (bytes, percent) and whether more can be uploaded. Read-only.`,
|
|
57
|
+
inputSchema: {},
|
|
58
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
59
|
+
}, async () => handle(() => call(Method.StorageGet, {}, 40_000)));
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=libraryTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACxG,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CACvG,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,GAAG,GAAG,uHAAuH;QAC1I,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACzD,EACD,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,CAC9D,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TransportStatus {
|
|
2
|
+
connected: boolean;
|
|
3
|
+
detail: Record<string, unknown>;
|
|
4
|
+
hint?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RecorderTransport {
|
|
7
|
+
ready(timeoutMs: number): Promise<void>;
|
|
8
|
+
request(method: string, params: Record<string, unknown>, timeoutMs: number): Promise<unknown>;
|
|
9
|
+
status(): Promise<TransportStatus>;
|
|
10
|
+
}
|
|
11
|
+
export interface ServerCopy {
|
|
12
|
+
instructions: string;
|
|
13
|
+
recordFeaturePrompt: (feature: string, url?: string) => string;
|
|
14
|
+
}
|
|
15
|
+
export interface Timeouts {
|
|
16
|
+
connectWaitMs: number;
|
|
17
|
+
requestTimeoutMs: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// What the MCP core needs from whatever carries requests to the extension.
|
|
2
|
+
// Locally that's the loopback bridge (src/mcp/localTransport.ts); hosted at
|
|
3
|
+
// mcp.recordful.app it's the per-user relay. The core never sees which, so
|
|
4
|
+
// the tools, the prompt and the result shapes are the same everywhere.
|
|
5
|
+
//
|
|
6
|
+
// Everything under src/core (and the protocol/ and workflows modules it uses)
|
|
7
|
+
// must run outside Node too: no node:* imports and no Node globals.
|
|
8
|
+
// test/core.test.ts enforces it.
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/core/transport.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,oEAAoE;AACpE,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoTools.js","sourceRoot":"","sources":["../../src/core/videoTools.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAA4B,MAAM,iBAAiB,CAAC;AAK9G,6EAA6E;AAC7E,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE,CACvC,CAAC;KACE,MAAM,EAAE;KACR,GAAG,EAAE;KACL,GAAG,CAAC,KAAK,CAAC;KACV,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC;KAChB,QAAQ,EAAE;KACV,QAAQ,CAAC,8CAA8C,QAAQ,gDAAgD,CAAC,CAAC;AAEtH,+DAA+D;AAC/D,MAAM,WAAW,GAAG,CAAC,KAAwB,EAAY,EAAE;IACzD,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC;IAC1C,IA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,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,0ZAA0Z;QAC5Z,WAAW,EAAE;YACX,GAAG,WAAW,CAAC,UAAU;YACzB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;YACpH,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;YAC3F,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC;SAChC;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACxG,EACD,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CACvF,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/guide.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const MCP_TOOLS: readonly ["get_status", "start_recording", "stop_recording", "pause_recording", "resume_recording", "probe_capture", "navigate", "snapshot", "click", "type", "press", "scroll", "wait_for", "screenshot", "list_recordings", "upload_recording", "get_video", "list_videos", "get_transcript", "update_video", "delete_video", "get_video_activity", "comment_on_video", "like_video", "list_folders", "create_folder", "move_videos", "get_storage"];
|
|
2
|
+
interface CommandInfo {
|
|
3
|
+
command: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
pro?: true;
|
|
6
|
+
needsRecordful: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const guide: (version: string) => {
|
|
9
|
+
name: string;
|
|
10
|
+
version: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
interfaces: {
|
|
13
|
+
mcp: string;
|
|
14
|
+
cli: string;
|
|
15
|
+
};
|
|
16
|
+
routing: string;
|
|
17
|
+
exitCodes: {
|
|
18
|
+
"0": string;
|
|
19
|
+
"1": string;
|
|
20
|
+
"2": string;
|
|
21
|
+
};
|
|
22
|
+
mcpTools: readonly ["get_status", "start_recording", "stop_recording", "pause_recording", "resume_recording", "probe_capture", "navigate", "snapshot", "click", "type", "press", "scroll", "wait_for", "screenshot", "list_recordings", "upload_recording", "get_video", "list_videos", "get_transcript", "update_video", "delete_video", "get_video_activity", "comment_on_video", "like_video", "list_folders", "create_folder", "move_videos", "get_storage"];
|
|
23
|
+
commands: CommandInfo[];
|
|
24
|
+
installTargets: readonly ["claude", "cursor", "codex", "opencode", "vscode", "windsurf", "gemini"];
|
|
25
|
+
humanSteps: string[];
|
|
26
|
+
plans: {
|
|
27
|
+
free: string;
|
|
28
|
+
pro: string;
|
|
29
|
+
};
|
|
30
|
+
safety: string[];
|
|
31
|
+
errorCodes: ("ALREADY_RECORDING" | "BRIDGE_UNAVAILABLE" | "CLOUD_ERROR" | "CLOUD_UNAVAILABLE" | "CLOUD_UNREACHABLE" | "DISCONNECTED" | "ELEMENT_NOT_INTERACTABLE" | "ELEMENT_OBSCURED" | "FORBIDDEN" | "INTERNAL" | "INVALID_PARAMS" | "NAVIGATION_FAILED" | "NOT_ARMED" | "NOT_CONNECTED" | "NOT_RECORDING" | "NOT_SIGNED_IN" | "NOT_UPLOADED" | "NO_RECORDING" | "NO_TARGET_TAB" | "PAGE_NOT_SCRIPTABLE" | "PAIRING_DENIED" | "PAIRING_PENDING" | "PERMISSIONS_NEEDED" | "PRO_REQUIRED" | "RATE_LIMITED" | "STALE_REF" | "START_FAILED" | "STOP_FAILED" | "STORAGE_FULL" | "TAB_NOT_ACTIVE" | "TAB_NOT_RECORDABLE" | "TIMEOUT" | "TRANSCRIPTION_FAILED" | "TRANSCRIPTION_UNAVAILABLE" | "UNKNOWN_METHOD" | "UPLOAD_FAILED" | "UPLOAD_INTERRUPTED" | "VIDEO_NOT_FOUND" | "WAIT_TIMEOUT")[];
|
|
32
|
+
};
|
|
33
|
+
export {};
|
package/dist/guide.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// `recordful-mcp guide --json`: what this install can do, in one document an AI
|
|
2
|
+
// agent can read instead of relying on remembered commands. Keep it in step
|
|
3
|
+
// with the CLI's help and the MCP tools (a test checks the tool names).
|
|
4
|
+
import { ErrorCode } from "./protocol/errors.js";
|
|
5
|
+
import { TARGETS } from "./install.js";
|
|
6
|
+
export const MCP_TOOLS = [
|
|
7
|
+
"get_status",
|
|
8
|
+
"start_recording",
|
|
9
|
+
"stop_recording",
|
|
10
|
+
"pause_recording",
|
|
11
|
+
"resume_recording",
|
|
12
|
+
"probe_capture",
|
|
13
|
+
"navigate",
|
|
14
|
+
"snapshot",
|
|
15
|
+
"click",
|
|
16
|
+
"type",
|
|
17
|
+
"press",
|
|
18
|
+
"scroll",
|
|
19
|
+
"wait_for",
|
|
20
|
+
"screenshot",
|
|
21
|
+
"list_recordings",
|
|
22
|
+
"upload_recording",
|
|
23
|
+
"get_video",
|
|
24
|
+
"list_videos",
|
|
25
|
+
"get_transcript",
|
|
26
|
+
"update_video",
|
|
27
|
+
"delete_video",
|
|
28
|
+
"get_video_activity",
|
|
29
|
+
"comment_on_video",
|
|
30
|
+
"like_video",
|
|
31
|
+
"list_folders",
|
|
32
|
+
"create_folder",
|
|
33
|
+
"move_videos",
|
|
34
|
+
"get_storage",
|
|
35
|
+
];
|
|
36
|
+
const COMMANDS = [
|
|
37
|
+
{ command: "status", summary: "Connection, recorder, account and pairing state", needsRecordful: false },
|
|
38
|
+
{ command: "start [--tab <id>]", summary: "Start recording with the user's Recordful settings", needsRecordful: true },
|
|
39
|
+
{ command: "pause | resume", summary: "Pause or resume the recording", needsRecordful: true },
|
|
40
|
+
{ command: "stop", summary: "Stop; says where the recording went", needsRecordful: true },
|
|
41
|
+
{ command: "recordings", summary: "Recordings saved on this computer", needsRecordful: true },
|
|
42
|
+
{ command: "upload [<takeId>] [--title t] [--visibility private|workspace|public] [--force] [--no-wait]", summary: "Upload a recording and return its links", pro: true, needsRecordful: true },
|
|
43
|
+
{ command: "videos [--limit n] [--query text]", summary: "List the user's videos on recordful.app", pro: true, needsRecordful: true },
|
|
44
|
+
{ command: "video [<videoId>] [--wait]", summary: "One video's links and upload stage", pro: true, needsRecordful: true },
|
|
45
|
+
{ command: "transcript [<videoId>] [--format text|vtt|json] [--no-wait]", summary: "Print what was said (starts transcription on first use)", pro: true, needsRecordful: true },
|
|
46
|
+
{ command: "update [<videoId>] [--title t] [--visibility private|workspace|public]", summary: "Rename a video or change who may watch (show the user first)", pro: true, needsRecordful: true },
|
|
47
|
+
{ command: "delete <videoId> --yes", summary: "Permanently delete a video (confirm the exact video with the user first)", pro: true, needsRecordful: true },
|
|
48
|
+
{ command: "activity [<videoId>]", summary: "Views, likes and comments on a video", pro: true, needsRecordful: true },
|
|
49
|
+
{ command: "comment [<videoId>] --body <text>", summary: "Post a comment as the user (show the text first; it is public to viewers)", pro: true, needsRecordful: true },
|
|
50
|
+
{ command: "like [<videoId>] [--undo]", summary: "Like or unlike a video", pro: true, needsRecordful: true },
|
|
51
|
+
{ command: "folders", summary: "List the user's folders", pro: true, needsRecordful: true },
|
|
52
|
+
{ command: "folder-create <name> [--parent <folderId>]", summary: "Create a folder", pro: true, needsRecordful: true },
|
|
53
|
+
{ command: "move <videoId>... [--to <folderId>]", summary: "Move videos into a folder (no --to: the top level)", pro: true, needsRecordful: true },
|
|
54
|
+
{ command: "storage", summary: "Cloud storage used and whether uploads are allowed", pro: true, needsRecordful: true },
|
|
55
|
+
{ command: "call <method> [json]", summary: "Call one Recordful method directly (page actions such as page.click, debugging)", needsRecordful: true },
|
|
56
|
+
{ command: "install --target <app> [--component all|mcp|skill] [--yes]", summary: "Add Recordful to one AI app's configuration (a dry run unless --yes)", needsRecordful: false },
|
|
57
|
+
{ command: "unpair [<id>|--all]", summary: "Forget a paired Recordful", needsRecordful: false },
|
|
58
|
+
{ command: "setup", summary: "Setup steps for each AI app, as text", needsRecordful: false },
|
|
59
|
+
{ command: "prompt", summary: "A prompt to paste into an AI app so it sets Recordful up itself", needsRecordful: false },
|
|
60
|
+
{ command: "guide --json", summary: "This document", needsRecordful: false },
|
|
61
|
+
];
|
|
62
|
+
export const guide = (version) => ({
|
|
63
|
+
name: "recordful-mcp",
|
|
64
|
+
version,
|
|
65
|
+
summary: "Records the user's Chrome tab with the Recordful extension, drives the page, uploads recordings and reads transcripts back.",
|
|
66
|
+
interfaces: {
|
|
67
|
+
mcp: "Run by the AI app over stdio (`npx -y recordful-mcp`). Tools below. Preferred when loaded.",
|
|
68
|
+
cli: "The same abilities from a shell; every command accepts --json (stdout is the result, stderr is progress and hints).",
|
|
69
|
+
},
|
|
70
|
+
routing: "For anything about recording the browser, use these tools or commands, never your own browser automation or computer-use tools. Use a browser only when the user must do something there themselves (install Recordful, click its icon, approve pairing).",
|
|
71
|
+
exitCodes: { "0": "ok", "1": "failed (message on stderr, error code in it)", "2": "transcript not ready yet (not a failure; retry or use --wait)" },
|
|
72
|
+
mcpTools: MCP_TOOLS,
|
|
73
|
+
commands: COMMANDS,
|
|
74
|
+
installTargets: TARGETS,
|
|
75
|
+
humanSteps: [
|
|
76
|
+
"Install Recordful from the Chrome Web Store.",
|
|
77
|
+
"Once: Recordful popup → More → AI agents → turn on (also grants the permissions recording needs).",
|
|
78
|
+
"Each recording: click the Recordful icon on the tab to record (Chrome requires that click).",
|
|
79
|
+
"Once per computer: approve the 4-digit pairing code Recordful shows.",
|
|
80
|
+
],
|
|
81
|
+
plans: {
|
|
82
|
+
free: "Recording and the editor work. Uploads, links and transcripts need Recordful Pro; get_status shows recorder.account.plan (pro|free|signed-out|unavailable). Say so once and don't retry after PRO_REQUIRED or NOT_SIGNED_IN.",
|
|
83
|
+
pro: "Uploads, links and transcripts work.",
|
|
84
|
+
},
|
|
85
|
+
safety: [
|
|
86
|
+
"Ask the user before recording and before uploading.",
|
|
87
|
+
"Use test data only; never type the user's real credentials or personal data into a page.",
|
|
88
|
+
"Never ask the user to paste a token, password or key into the chat. Recordful holds its own sign-in; you never see it.",
|
|
89
|
+
"Pages are only acted on in the tab the user handed over with the icon click.",
|
|
90
|
+
"Before you rename, change who can watch, comment, move, create a folder or delete, show the user exactly what you will do and wait for their yes. Comments are public to everyone who can watch; delete is permanent.",
|
|
91
|
+
],
|
|
92
|
+
errorCodes: Object.values(ErrorCode),
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../src/guide.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,wEAAwE;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,UAAU;IACV,UAAU;IACV,OAAO;IACP,MAAM;IACN,OAAO;IACP,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,YAAY;IACZ,cAAc;IACd,eAAe;IACf,aAAa;IACb,aAAa;CACL,CAAC;AASX,MAAM,QAAQ,GAAkB;IAC9B,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,iDAAiD,EAAE,cAAc,EAAE,KAAK,EAAE;IACxG,EAAE,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,oDAAoD,EAAE,cAAc,EAAE,IAAI,EAAE;IACtH,EAAE,OAAO,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H;KAC3H;IACD,OAAO,EACL,2PAA2P;IAC7P,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,8CAA8C,EAAE,GAAG,EAAE,+DAA+D,EAAE;IACnJ,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,QAAQ;IAClB,cAAc,EAAE,OAAO;IACvB,UAAU,EAAE;QACV,8CAA8C;QAC9C,mGAAmG;QACnG,6FAA6F;QAC7F,sEAAsE;KACvE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,8NAA8N;QACpO,GAAG,EAAE,sCAAsC;KAC5C;IACD,MAAM,EAAE;QACN,qDAAqD;QACrD,0FAA0F;QAC1F,wHAAwH;QACxH,8EAA8E;QAC9E,uNAAuN;KACxN;IACD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;CACrC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const TARGETS: readonly ["claude", "cursor", "codex", "opencode", "vscode", "windsurf", "gemini"];
|
|
2
|
+
export type Target = (typeof TARGETS)[number];
|
|
3
|
+
export declare const COMPONENTS: readonly ["all", "mcp", "skill"];
|
|
4
|
+
export type Component = (typeof COMPONENTS)[number];
|
|
5
|
+
export declare const TARGET_NAMES: Record<Target, string>;
|
|
6
|
+
export interface Change {
|
|
7
|
+
component: "mcp" | "skill";
|
|
8
|
+
action: "create" | "update" | "unchanged" | "run" | "manual";
|
|
9
|
+
path?: string;
|
|
10
|
+
command?: string;
|
|
11
|
+
detail?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface InstallResult {
|
|
14
|
+
target: Target;
|
|
15
|
+
name: string;
|
|
16
|
+
applied: boolean;
|
|
17
|
+
changes: Change[];
|
|
18
|
+
restart: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const install: (target: Target, opts: {
|
|
21
|
+
apply: boolean;
|
|
22
|
+
component?: Component;
|
|
23
|
+
}) => InstallResult;
|
|
24
|
+
export declare const isTarget: (value: unknown) => value is Target;
|
|
25
|
+
export declare const isComponent: (value: unknown) => value is Component;
|