feat: publish Agent Studio integrations and setup guide
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { createInterface } from "node:readline";
|
||||
import { resolve } from "node:path";
|
||||
import { CmsConnection, EditorService } from "../packages/harness/dist/index.js";
|
||||
|
||||
// Authorized local-only real-media acceptance. Credentials enter hidden stdin, never files.
|
||||
const reader = createInterface({ input: process.stdin });
|
||||
let cms;
|
||||
console.log("Provide CMS login via hidden stdin. Media stays local; no model request.");
|
||||
try {
|
||||
const input = JSON.parse((await reader[Symbol.asyncIterator]().next()).value);
|
||||
reader.close();
|
||||
cms = new CmsConnection({ publishableKey: input.publishableKey });
|
||||
await cms.login(input.email, input.password);
|
||||
input.email = ""; input.password = "";
|
||||
const service = new EditorService({ cms, runtimeRoot: resolve(".agent-studio-runtime/videos"), sessionId: "ses_media_acceptance" });
|
||||
const result = await service.prepare({ dramaId: "06aa396d-175a-48ed-ad76-02786ef4d0a9", episodeNumbers: [1, 3, 5] }, AbortSignal.timeout(600_000));
|
||||
console.log(JSON.stringify({ result: "PASS", scope: "real local download/remux/frames only", ...result }));
|
||||
} catch (error) {
|
||||
console.error(JSON.stringify({ result: "FAIL", code: typeof error?.code === "string" ? error.code : "MEDIA_VERIFICATION_FAILED" }));
|
||||
process.exitCode = 1;
|
||||
} finally { reader.close(); cms?.clear(); }
|
||||
Reference in New Issue
Block a user