@tapedock/mcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.d.ts +12 -0
- package/dist/api/client.js +6 -0
- package/dist/downloads/manager.d.ts +2 -0
- package/dist/downloads/manager.js +32 -0
- package/dist/downloads/resolve-otio.d.ts +7 -0
- package/dist/downloads/resolve-otio.js +68 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +86 -10
- package/package.json +3 -3
- package/server.json +2 -2
package/dist/api/client.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface SessionSummaryRow {
|
|
|
26
26
|
endedAtMs: number | null;
|
|
27
27
|
durationMs: number;
|
|
28
28
|
mediaDeletedAt: number | null;
|
|
29
|
+
archivedAt?: number | null;
|
|
30
|
+
downloadedAt?: number | null;
|
|
31
|
+
expiresAt?: number | null;
|
|
32
|
+
expired?: boolean;
|
|
29
33
|
syncQaPass: boolean | null;
|
|
30
34
|
createdAt?: number;
|
|
31
35
|
}
|
|
@@ -189,4 +193,12 @@ export declare class VcrApiClient {
|
|
|
189
193
|
jobId?: string;
|
|
190
194
|
error?: string;
|
|
191
195
|
}>;
|
|
196
|
+
setSessionArchived(sessionId: string, archived: boolean): Promise<{
|
|
197
|
+
ok: boolean;
|
|
198
|
+
archivedAt: number | null;
|
|
199
|
+
}>;
|
|
200
|
+
markSessionDownloaded(sessionId: string): Promise<{
|
|
201
|
+
ok: boolean;
|
|
202
|
+
downloadedAt: number;
|
|
203
|
+
}>;
|
|
192
204
|
}
|
package/dist/api/client.js
CHANGED
|
@@ -149,4 +149,10 @@ export class VcrApiClient {
|
|
|
149
149
|
processSessionNow(sessionId, opts) {
|
|
150
150
|
return this.requestJson(`/api/host/sessions/${enc(sessionId)}/process-now`, { method: "POST", body: opts ?? { forcePartial: true } });
|
|
151
151
|
}
|
|
152
|
+
setSessionArchived(sessionId, archived) {
|
|
153
|
+
return this.requestJson(`/api/host/sessions/${enc(sessionId)}/archive`, { method: "POST", body: { archived } });
|
|
154
|
+
}
|
|
155
|
+
markSessionDownloaded(sessionId) {
|
|
156
|
+
return this.requestJson(`/api/host/sessions/${enc(sessionId)}/downloaded`, { method: "POST" });
|
|
157
|
+
}
|
|
152
158
|
}
|
|
@@ -23,6 +23,8 @@ export interface DownloadJobSnapshot {
|
|
|
23
23
|
startedAtMs: number;
|
|
24
24
|
completedAtMs: number | null;
|
|
25
25
|
files: DownloadFileState[];
|
|
26
|
+
/** Local-path DaVinci Resolve timeline, written once the job completes and session.otio is on disk. */
|
|
27
|
+
resolveOtioPath?: string;
|
|
26
28
|
error?: string;
|
|
27
29
|
}
|
|
28
30
|
export interface DownloadSessionInput {
|
|
@@ -6,6 +6,7 @@ import * as path from "node:path";
|
|
|
6
6
|
import { Readable, Transform } from "node:stream";
|
|
7
7
|
import { pipeline } from "node:stream/promises";
|
|
8
8
|
import { buildSessionFolderName, formatBytes } from "../lib/format.js";
|
|
9
|
+
import { buildLocalResolveOtio } from "./resolve-otio.js";
|
|
9
10
|
export const ALL_DOWNLOAD_CATEGORIES = ["bundle", "audio", "video", "screen"];
|
|
10
11
|
const SAFE_EXPORT_FILENAME_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/;
|
|
11
12
|
const DEFAULT_AUTO_FOREGROUND_BYTES = 100 * 1024 * 1024; // 100 MB
|
|
@@ -14,6 +15,8 @@ const DEFAULT_CONCURRENCY = 2;
|
|
|
14
15
|
const MAX_FILE_RETRIES = 3;
|
|
15
16
|
const PROGRESS_THROTTLE_MS = 1500;
|
|
16
17
|
const MAX_STORED_JOBS = 50;
|
|
18
|
+
const SESSION_OTIO_FILENAME = "session.otio";
|
|
19
|
+
const RESOLVE_OTIO_FILENAME = "session.resolve.otio";
|
|
17
20
|
export function resolveDefaultDownloadDir() {
|
|
18
21
|
const fromEnv = process.env.TAPEDOCK_DOWNLOAD_DIR?.trim() || process.env.VCR_DOWNLOAD_DIR?.trim();
|
|
19
22
|
if (fromEnv)
|
|
@@ -63,6 +66,24 @@ async function abortableSleep(ms, signal) {
|
|
|
63
66
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
64
67
|
});
|
|
65
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Best-effort: a missing or malformed session.otio must never fail a download that
|
|
71
|
+
* already landed every Track, so any error here just means no Resolve timeline.
|
|
72
|
+
*/
|
|
73
|
+
async function writeLocalResolveOtio(targetDir) {
|
|
74
|
+
const resolvePath = path.join(targetDir, RESOLVE_OTIO_FILENAME);
|
|
75
|
+
const tmpPath = `${resolvePath}.${randomBytes(4).toString("hex")}.tmp`;
|
|
76
|
+
try {
|
|
77
|
+
const otioJson = await fs.readFile(path.join(targetDir, SESSION_OTIO_FILENAME), "utf8");
|
|
78
|
+
await fs.writeFile(tmpPath, buildLocalResolveOtio(otioJson, targetDir), { mode: 0o644 });
|
|
79
|
+
await fs.rename(tmpPath, resolvePath);
|
|
80
|
+
return resolvePath;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
await fs.unlink(tmpPath).catch(() => { });
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
66
87
|
class PresignedUrlExpiredError extends Error {
|
|
67
88
|
failedUrl;
|
|
68
89
|
constructor(failedUrl) {
|
|
@@ -120,6 +141,9 @@ export class DownloadManager {
|
|
|
120
141
|
if (session.mediaDeletedAt) {
|
|
121
142
|
throw new Error(`Media for Session "${session.title}" (${session.id}) has been permanently deleted.`);
|
|
122
143
|
}
|
|
144
|
+
if (session.expired || session.status === "expired") {
|
|
145
|
+
throw new Error(`Exports for Session "${session.title}" (${session.id}) have expired and are no longer available.`);
|
|
146
|
+
}
|
|
123
147
|
if (session.status !== "ready" && session.status !== "ready_partial") {
|
|
124
148
|
throw new Error(`Session "${session.title}" (${session.id}) is currently "${session.status}" and exports are not ready yet.`);
|
|
125
149
|
}
|
|
@@ -341,6 +365,14 @@ export class DownloadManager {
|
|
|
341
365
|
job.downloadedBytes = job.files.reduce((sum, f) => sum + f.downloadedBytes, 0);
|
|
342
366
|
await emitProgress("Complete", true);
|
|
343
367
|
finished = true;
|
|
368
|
+
const resolveOtioPath = await writeLocalResolveOtio(job.targetDir);
|
|
369
|
+
if (resolveOtioPath)
|
|
370
|
+
job.resolveOtioPath = resolveOtioPath;
|
|
371
|
+
// Best-effort download acknowledgement so TapeDock suppresses redundant expiry reminders
|
|
372
|
+
// (never fails a completed download, e.g. under read-only OAuth scopes or transient errors).
|
|
373
|
+
if (typeof this.api.markSessionDownloaded === "function") {
|
|
374
|
+
await this.api.markSessionDownloaded(job.sessionId).catch(() => { });
|
|
375
|
+
}
|
|
344
376
|
job.status = "completed";
|
|
345
377
|
job.completedAtMs = Date.now();
|
|
346
378
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a downloaded `session.otio` into a DaVinci Resolve 21 timeline whose media
|
|
3
|
+
* references point at absolute paths inside `targetDir`, so File → Import → Timeline
|
|
4
|
+
* links every Track without a relink pass. Throws on malformed JSON, a non-Timeline
|
|
5
|
+
* root, or any `target_url` that resolves outside `targetDir`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildLocalResolveOtio(otioJson: string, targetDir: string): string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
const URL_SCHEME_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
3
|
+
const ITEM_SCHEMAS = new Set(["Stack", "Track", "Clip", "Gap"]);
|
|
4
|
+
function isObject(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function schemaName(node) {
|
|
8
|
+
const schema = node.OTIO_SCHEMA;
|
|
9
|
+
return typeof schema === "string" ? (schema.split(".")[0] ?? null) : null;
|
|
10
|
+
}
|
|
11
|
+
function localizeTargetUrl(targetUrl, resolvedDir) {
|
|
12
|
+
if (URL_SCHEME_RE.test(targetUrl)) {
|
|
13
|
+
throw new Error(`Non-local target_url rejected: "${targetUrl}"`);
|
|
14
|
+
}
|
|
15
|
+
const resolved = path.resolve(resolvedDir, targetUrl);
|
|
16
|
+
if (!resolved.startsWith(resolvedDir + path.sep)) {
|
|
17
|
+
throw new Error(`Path traversal rejected for target_url "${targetUrl}"`);
|
|
18
|
+
}
|
|
19
|
+
return resolved;
|
|
20
|
+
}
|
|
21
|
+
function normalize(value, resolvedDir) {
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
for (const item of value)
|
|
24
|
+
normalize(item, resolvedDir);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (!isObject(value))
|
|
28
|
+
return;
|
|
29
|
+
const schema = schemaName(value);
|
|
30
|
+
if (schema === "Clip") {
|
|
31
|
+
// Legacy Clip.2 carried a single `media_reference`; Resolve 21 only reads the keyed map.
|
|
32
|
+
if ("media_reference" in value && !("media_references" in value)) {
|
|
33
|
+
value.media_references = { DEFAULT_MEDIA: value.media_reference };
|
|
34
|
+
delete value.media_reference;
|
|
35
|
+
}
|
|
36
|
+
if ("media_references" in value) {
|
|
37
|
+
value.active_media_reference_key ??= "DEFAULT_MEDIA";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (schema !== null && ITEM_SCHEMAS.has(schema)) {
|
|
41
|
+
value.metadata ??= {};
|
|
42
|
+
value.effects ??= [];
|
|
43
|
+
value.markers ??= [];
|
|
44
|
+
value.enabled ??= true;
|
|
45
|
+
}
|
|
46
|
+
if (schema === "Timeline" || schema === "ExternalReference") {
|
|
47
|
+
value.metadata ??= {};
|
|
48
|
+
}
|
|
49
|
+
if (schema === "ExternalReference" && typeof value.target_url === "string") {
|
|
50
|
+
value.target_url = localizeTargetUrl(value.target_url, resolvedDir);
|
|
51
|
+
}
|
|
52
|
+
for (const child of Object.values(value))
|
|
53
|
+
normalize(child, resolvedDir);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Turn a downloaded `session.otio` into a DaVinci Resolve 21 timeline whose media
|
|
57
|
+
* references point at absolute paths inside `targetDir`, so File → Import → Timeline
|
|
58
|
+
* links every Track without a relink pass. Throws on malformed JSON, a non-Timeline
|
|
59
|
+
* root, or any `target_url` that resolves outside `targetDir`.
|
|
60
|
+
*/
|
|
61
|
+
export function buildLocalResolveOtio(otioJson, targetDir) {
|
|
62
|
+
const timeline = JSON.parse(otioJson);
|
|
63
|
+
if (!isObject(timeline) || schemaName(timeline) !== "Timeline") {
|
|
64
|
+
throw new Error("session.otio root is not an OTIO Timeline.");
|
|
65
|
+
}
|
|
66
|
+
normalize(timeline, path.resolve(targetDir));
|
|
67
|
+
return JSON.stringify(timeline, null, 2) + "\n";
|
|
68
|
+
}
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { VcrApiError } from "./api/client.js";
|
|
@@ -8,6 +9,7 @@ import { buildInviteBlurb, buildSessionIcs, formatBytes, parseIsoToMs, parseTime
|
|
|
8
9
|
const QUALITY_TIERS = ["1080p", "4k"];
|
|
9
10
|
const MARKER_COLORS = ["Blue", "Green", "Red", "Yellow"];
|
|
10
11
|
const QualityTierSchema = z.enum(QUALITY_TIERS);
|
|
12
|
+
const STALE_PROCESSING_JOB_MS = 15 * 60 * 1000;
|
|
11
13
|
const MarkerColorSchema = z.enum(MARKER_COLORS);
|
|
12
14
|
function okResult(payload) {
|
|
13
15
|
return {
|
|
@@ -86,6 +88,7 @@ const DownloadJobOutputSchema = z.object({
|
|
|
86
88
|
startedAtMs: z.number(),
|
|
87
89
|
completedAtMs: z.number().nullable(),
|
|
88
90
|
files: z.array(DownloadFileOutputSchema),
|
|
91
|
+
resolveOtioPath: z.string().optional(),
|
|
89
92
|
error: z.string().optional(),
|
|
90
93
|
});
|
|
91
94
|
function formatJobOutput(job) {
|
|
@@ -95,11 +98,13 @@ function formatJobOutput(job) {
|
|
|
95
98
|
remainingSizeFormatted: formatBytes(job.remainingBytes),
|
|
96
99
|
};
|
|
97
100
|
}
|
|
101
|
+
const PACKAGE_JSON = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
102
|
+
export const MCP_SERVER_VERSION = PACKAGE_JSON.version ?? "0.0.0";
|
|
98
103
|
export function createVcrMcpServer(deps) {
|
|
99
104
|
const { api, downloads } = deps;
|
|
100
105
|
const server = new McpServer({
|
|
101
106
|
name: "video-call-recorder",
|
|
102
|
-
version:
|
|
107
|
+
version: MCP_SERVER_VERSION,
|
|
103
108
|
});
|
|
104
109
|
// 1. get_host_status
|
|
105
110
|
server.registerTool("get_host_status", {
|
|
@@ -576,7 +581,7 @@ export function createVcrMcpServer(deps) {
|
|
|
576
581
|
// 9. list_sessions
|
|
577
582
|
server.registerTool("list_sessions", {
|
|
578
583
|
title: "List Sessions",
|
|
579
|
-
description: "List upcoming planned Sessions and/or recorded Sessions, with optional Room/status filters and Usage Ledger summary.",
|
|
584
|
+
description: "List upcoming planned Sessions and/or recorded Sessions, with optional Room/status filters and Usage Ledger summary. Archived recorded Sessions are hidden by default.",
|
|
580
585
|
inputSchema: {
|
|
581
586
|
filter: z
|
|
582
587
|
.enum(["all", "planned", "recorded"])
|
|
@@ -586,7 +591,11 @@ export function createVcrMcpServer(deps) {
|
|
|
586
591
|
status: z
|
|
587
592
|
.string()
|
|
588
593
|
.optional()
|
|
589
|
-
.describe("Filter recorded Sessions by exact status (e.g. 'ready', 'processing', 'uploading')."),
|
|
594
|
+
.describe("Filter recorded Sessions by exact status (e.g. 'ready', 'processing', 'uploading', 'expired')."),
|
|
595
|
+
includeArchived: z
|
|
596
|
+
.boolean()
|
|
597
|
+
.default(false)
|
|
598
|
+
.describe("Include archived recorded Sessions in the result."),
|
|
590
599
|
limit: z.number().int().min(1).max(100).default(25).describe("Maximum Sessions per list."),
|
|
591
600
|
},
|
|
592
601
|
outputSchema: {
|
|
@@ -610,6 +619,10 @@ export function createVcrMcpServer(deps) {
|
|
|
610
619
|
startedAtMs: z.number(),
|
|
611
620
|
durationMs: z.number(),
|
|
612
621
|
mediaDeletedAt: z.number().nullable(),
|
|
622
|
+
archivedAt: z.number().nullable(),
|
|
623
|
+
downloadedAt: z.number().nullable(),
|
|
624
|
+
expiresAt: z.number().nullable(),
|
|
625
|
+
expired: z.boolean(),
|
|
613
626
|
syncQaPass: z.boolean().nullable(),
|
|
614
627
|
})),
|
|
615
628
|
usageSummary: z.object({
|
|
@@ -624,7 +637,7 @@ export function createVcrMcpServer(deps) {
|
|
|
624
637
|
idempotentHint: true,
|
|
625
638
|
openWorldHint: true,
|
|
626
639
|
},
|
|
627
|
-
}, async ({ filter, roomId, status, limit }) => runTool(async () => {
|
|
640
|
+
}, async ({ filter, roomId, status, includeArchived, limit }) => runTool(async () => {
|
|
628
641
|
const resp = await api.listSessions();
|
|
629
642
|
const planned = filter === "recorded"
|
|
630
643
|
? []
|
|
@@ -647,7 +660,9 @@ export function createVcrMcpServer(deps) {
|
|
|
647
660
|
const recorded = filter === "planned"
|
|
648
661
|
? []
|
|
649
662
|
: resp.sessions
|
|
650
|
-
.filter((s) => (
|
|
663
|
+
.filter((s) => (includeArchived || !s.archivedAt) &&
|
|
664
|
+
(!roomId || s.roomId === roomId) &&
|
|
665
|
+
(!status || s.status === status))
|
|
651
666
|
.slice(0, limit)
|
|
652
667
|
.map((s) => ({
|
|
653
668
|
id: s.id,
|
|
@@ -658,6 +673,10 @@ export function createVcrMcpServer(deps) {
|
|
|
658
673
|
startedAtMs: s.startedAtMs,
|
|
659
674
|
durationMs: s.durationMs,
|
|
660
675
|
mediaDeletedAt: s.mediaDeletedAt,
|
|
676
|
+
archivedAt: s.archivedAt ?? null,
|
|
677
|
+
downloadedAt: s.downloadedAt ?? null,
|
|
678
|
+
expiresAt: s.expiresAt ?? null,
|
|
679
|
+
expired: Boolean(s.expired || s.status === "expired"),
|
|
661
680
|
syncQaPass: s.syncQaPass,
|
|
662
681
|
}));
|
|
663
682
|
return {
|
|
@@ -692,6 +711,10 @@ export function createVcrMcpServer(deps) {
|
|
|
692
711
|
endedAtMs: z.number().nullable(),
|
|
693
712
|
durationMs: z.number(),
|
|
694
713
|
mediaDeletedAt: z.number().nullable(),
|
|
714
|
+
archivedAt: z.number().nullable(),
|
|
715
|
+
downloadedAt: z.number().nullable(),
|
|
716
|
+
expiresAt: z.number().nullable(),
|
|
717
|
+
expired: z.boolean(),
|
|
695
718
|
syncQaPass: z.boolean().nullable(),
|
|
696
719
|
}),
|
|
697
720
|
guidance: z.string(),
|
|
@@ -749,10 +772,14 @@ export function createVcrMcpServer(deps) {
|
|
|
749
772
|
const detail = await api.getSession(sessionId);
|
|
750
773
|
const s = detail.session;
|
|
751
774
|
const totalExportBytes = detail.files.reduce((sum, f) => sum + f.byteSize, 0);
|
|
775
|
+
const isExpired = Boolean(s.expired || s.status === "expired");
|
|
752
776
|
let guidance = "Session exports are ready. Use download_session to save Tracks locally.";
|
|
753
777
|
if (s.mediaDeletedAt) {
|
|
754
778
|
guidance = "Media files for this Session were permanently deleted; only metadata and Markers remain.";
|
|
755
779
|
}
|
|
780
|
+
else if (isExpired) {
|
|
781
|
+
guidance = "Media files for this Session have expired and are no longer available; only metadata and Markers remain.";
|
|
782
|
+
}
|
|
756
783
|
else if (s.status === "planned") {
|
|
757
784
|
guidance = "Session is planned. Share Session Invite links or enter the Room as Host to start recording.";
|
|
758
785
|
}
|
|
@@ -771,8 +798,26 @@ export function createVcrMcpServer(deps) {
|
|
|
771
798
|
"All raw Tracks are uploaded and awaiting Host unlock in the Dashboard (via Recording Credit or Pay-As-You-Go). MCP agents cannot initiate payments — share the Dashboard link with the Host.";
|
|
772
799
|
}
|
|
773
800
|
else if (s.status === "processing") {
|
|
774
|
-
|
|
775
|
-
|
|
801
|
+
const latestJob = detail.jobs[0];
|
|
802
|
+
const runningMs = latestJob ? Date.now() - latestJob.startedAt : 0;
|
|
803
|
+
if (latestJob && runningMs >= STALE_PROCESSING_JOB_MS && detail.files.length === 0) {
|
|
804
|
+
const minutes = Math.floor(runningMs / 60_000);
|
|
805
|
+
guidance = `Post-processing job ${latestJob.id} has been running for ${minutes} minutes without finishing (normal runs take 1–5 minutes). The remote Modal worker may have timed out or hit a billing/capacity limit. Call process_session_now to retry, or check the Modal logs for this job.`;
|
|
806
|
+
}
|
|
807
|
+
else {
|
|
808
|
+
guidance =
|
|
809
|
+
"Modal FFmpeg post-processing is running (typically 1–5 minutes). Poll get_session again until status is 'ready' or 'ready_partial'.";
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
else if (s.status === "ready" || s.status === "ready_partial") {
|
|
813
|
+
guidance = [
|
|
814
|
+
s.status === "ready_partial"
|
|
815
|
+
? "Session exports are ready, but some Tracks failed to conform (see syncReport.tracks)."
|
|
816
|
+
: "Session exports are ready.",
|
|
817
|
+
"Plan edits from syncReport: activeSpeechRanges and liveVideoRanges for the rough cut, integratedLufs and truePeakDbfs for loudness, warnings for sync or capture problems, and screenClips (chronological) for screen-share inserts.",
|
|
818
|
+
'Call download_session with categories: ["bundle", "audio"] first to transcribe and plan the cut before pulling multi-GB video.',
|
|
819
|
+
"download_session also writes session.resolve.otio with absolute local paths for one-click DaVinci Resolve import (File → Import → Timeline).",
|
|
820
|
+
].join(" ");
|
|
776
821
|
}
|
|
777
822
|
else if (s.status === "failed") {
|
|
778
823
|
guidance =
|
|
@@ -790,6 +835,10 @@ export function createVcrMcpServer(deps) {
|
|
|
790
835
|
endedAtMs: s.endedAtMs,
|
|
791
836
|
durationMs: s.durationMs,
|
|
792
837
|
mediaDeletedAt: s.mediaDeletedAt,
|
|
838
|
+
archivedAt: s.archivedAt ?? null,
|
|
839
|
+
downloadedAt: s.downloadedAt ?? null,
|
|
840
|
+
expiresAt: s.expiresAt ?? null,
|
|
841
|
+
expired: isExpired,
|
|
793
842
|
syncQaPass: s.syncQaPass,
|
|
794
843
|
},
|
|
795
844
|
guidance,
|
|
@@ -944,10 +993,37 @@ export function createVcrMcpServer(deps) {
|
|
|
944
993
|
}
|
|
945
994
|
return res;
|
|
946
995
|
}));
|
|
996
|
+
// 13b. archive_session
|
|
997
|
+
server.registerTool("archive_session", {
|
|
998
|
+
title: "Archive or Restore Session",
|
|
999
|
+
description: "Hide a settled recorded Session from the active Session Timeline (or restore an archived Session). Non-destructive and reversible: media remains downloadable until its natural 7-day/30-day expiry window, and archiving suppresses remaining expiry reminder emails.",
|
|
1000
|
+
inputSchema: {
|
|
1001
|
+
sessionId: z.string().min(1).describe("Recorded Session ID."),
|
|
1002
|
+
archived: z
|
|
1003
|
+
.boolean()
|
|
1004
|
+
.default(true)
|
|
1005
|
+
.describe("true to archive the Session, false to restore it to the active timeline."),
|
|
1006
|
+
},
|
|
1007
|
+
outputSchema: {
|
|
1008
|
+
ok: z.boolean(),
|
|
1009
|
+
sessionId: z.string(),
|
|
1010
|
+
archivedAt: z.number().nullable(),
|
|
1011
|
+
},
|
|
1012
|
+
annotations: {
|
|
1013
|
+
title: "Archive or Restore Session",
|
|
1014
|
+
readOnlyHint: false,
|
|
1015
|
+
destructiveHint: false,
|
|
1016
|
+
idempotentHint: true,
|
|
1017
|
+
openWorldHint: true,
|
|
1018
|
+
},
|
|
1019
|
+
}, async ({ sessionId, archived }) => runTool(async () => {
|
|
1020
|
+
const res = await api.setSessionArchived(sessionId, archived);
|
|
1021
|
+
return { ok: res.ok, sessionId, archivedAt: res.archivedAt };
|
|
1022
|
+
}));
|
|
947
1023
|
// 14. download_session
|
|
948
1024
|
server.registerTool("download_session", {
|
|
949
1025
|
title: "Download Session",
|
|
950
|
-
description: "Download exported Tracks and timeline bundles (.otio/.edl/.json) into a flat local folder with atomic .part streaming, HTTP Range resume, exact byteSize skipping, and automatic presigned URL refresh. Under mode='auto', pulls <= 100 MB run foreground with progress notifications while
|
|
1026
|
+
description: "Download exported Tracks and timeline bundles (.otio/.edl/.json) into a flat local folder with atomic .part streaming, HTTP Range resume, exact byteSize skipping, and automatic presigned URL refresh. When session.otio is on disk after the pull, also writes session.resolve.otio with absolute local paths (returned as resolveOtioPath) for one-click DaVinci Resolve import. To inspect or transcribe first, pass categories: [\"bundle\", \"audio\"] and fetch the multi-GB .mov video later. Under mode='auto', pulls <= 100 MB run foreground with progress notifications while larger pulls run in the background of this MCP server process and return a downloadId for get_download_status; they stop if the process exits, so short-lived or one-shot CLI invocations should pass mode: \"foreground\".",
|
|
951
1027
|
inputSchema: {
|
|
952
1028
|
sessionId: z.string().min(1).describe("Ready Session ID to download."),
|
|
953
1029
|
destinationDir: z
|
|
@@ -961,7 +1037,7 @@ export function createVcrMcpServer(deps) {
|
|
|
961
1037
|
categories: z
|
|
962
1038
|
.array(z.enum(["bundle", "audio", "video", "screen"]))
|
|
963
1039
|
.default(ALL_DOWNLOAD_CATEGORIES)
|
|
964
|
-
.describe(
|
|
1040
|
+
.describe('File categories to download. Use ["bundle", "audio"] to inspect or transcribe before pulling multi-GB "video"/"screen" .mov files.'),
|
|
965
1041
|
overwrite: z
|
|
966
1042
|
.boolean()
|
|
967
1043
|
.default(false)
|
|
@@ -973,7 +1049,7 @@ export function createVcrMcpServer(deps) {
|
|
|
973
1049
|
mode: z
|
|
974
1050
|
.enum(["auto", "foreground", "background"])
|
|
975
1051
|
.default("auto")
|
|
976
|
-
.describe("'auto' runs foreground <= 100 MB and background > 100 MB to avoid 60s client timeouts."),
|
|
1052
|
+
.describe("'auto' runs foreground <= 100 MB and background > 100 MB to avoid 60s client timeouts. Background pulls live only as long as this MCP server process, so short-lived or one-shot CLI invocations should pass 'foreground'."),
|
|
977
1053
|
},
|
|
978
1054
|
outputSchema: DownloadJobOutputSchema.shape,
|
|
979
1055
|
annotations: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapedock/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Official TapeDock MCP server — plan remote video interviews, mint guest invites, drop timeline markers, and stream resumable multi-GB synced exports.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"server.json"
|
|
32
32
|
],
|
|
33
33
|
"bin": {
|
|
34
|
-
"tapedock-mcp": "
|
|
35
|
-
"vcr-mcp": "
|
|
34
|
+
"tapedock-mcp": "dist/cli.js",
|
|
35
|
+
"vcr-mcp": "dist/cli.js"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://git.audrow.com/audrow/video-call-recorder",
|
|
7
7
|
"source": "git"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.2",
|
|
10
10
|
"websiteUrl": "https://tapedock.com/docs/mcp",
|
|
11
11
|
"remotes": [
|
|
12
12
|
{
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"registryType": "npm",
|
|
20
20
|
"identifier": "@tapedock/mcp",
|
|
21
|
-
"version": "0.1.
|
|
21
|
+
"version": "0.1.2",
|
|
22
22
|
"transport": {
|
|
23
23
|
"type": "stdio"
|
|
24
24
|
},
|