@agent-media/video 0.1.5 → 0.2.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/dist/actions/generate.d.ts +30 -0
- package/dist/actions/generate.d.ts.map +1 -0
- package/dist/actions/generate.js +36 -0
- package/dist/actions/generate.js.map +1 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +2 -3
- package/dist/actions/index.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MediaResult, VideoResolution, VideoFps } from '@agent-media/core';
|
|
2
|
+
export interface VideoGenerateInput {
|
|
3
|
+
/** Text description of the video to generate */
|
|
4
|
+
prompt: string;
|
|
5
|
+
/** Input image path or URL for image-to-video (optional) */
|
|
6
|
+
input?: string;
|
|
7
|
+
/** Duration in seconds: 6, 8, 10, 12, 14, 16, 18, or 20 (default: 6) */
|
|
8
|
+
duration?: number;
|
|
9
|
+
/** Video resolution: 720p, 1080p, 1440p, 2160p (default: 720p) */
|
|
10
|
+
resolution?: VideoResolution;
|
|
11
|
+
/** Frame rate: 25 or 50 (default: 25) */
|
|
12
|
+
fps?: VideoFps;
|
|
13
|
+
/** Generate audio track (default: false) */
|
|
14
|
+
audio?: boolean;
|
|
15
|
+
/** Output directory (overrides default) */
|
|
16
|
+
out?: string;
|
|
17
|
+
/** Output filename (extension auto-added if missing) */
|
|
18
|
+
name?: string;
|
|
19
|
+
/** Provider to use (overrides auto-detection) */
|
|
20
|
+
provider?: string;
|
|
21
|
+
/** Model to use (overrides provider default) */
|
|
22
|
+
model?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Generate a video from a text prompt
|
|
26
|
+
* Optionally accepts an input image for image-to-video generation
|
|
27
|
+
* Requires an external provider (fal or replicate)
|
|
28
|
+
*/
|
|
29
|
+
export declare function generate(options: VideoGenerateInput): Promise<MediaResult>;
|
|
30
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/actions/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA6B,eAAe,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG3G,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,yCAAyC;IACzC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,4CAA4C;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAkChF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { executeAction, globalRegistry } from '@agent-media/core';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a video from a text prompt
|
|
4
|
+
* Optionally accepts an input image for image-to-video generation
|
|
5
|
+
* Requires an external provider (fal or replicate)
|
|
6
|
+
*/
|
|
7
|
+
export async function generate(options) {
|
|
8
|
+
// Prepare input if provided (for image-to-video)
|
|
9
|
+
let input;
|
|
10
|
+
if (options.input) {
|
|
11
|
+
const isUrl = options.input.startsWith('http://') || options.input.startsWith('https://');
|
|
12
|
+
input = {
|
|
13
|
+
source: options.input,
|
|
14
|
+
isUrl,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const context = {
|
|
18
|
+
outputDir: options.out ?? process.cwd() + '/.agent-media',
|
|
19
|
+
provider: options.provider,
|
|
20
|
+
outputName: options.name,
|
|
21
|
+
inputSource: options.input,
|
|
22
|
+
};
|
|
23
|
+
return executeAction(globalRegistry, {
|
|
24
|
+
action: 'video-generate',
|
|
25
|
+
options: {
|
|
26
|
+
prompt: options.prompt,
|
|
27
|
+
input,
|
|
28
|
+
duration: options.duration,
|
|
29
|
+
resolution: options.resolution,
|
|
30
|
+
fps: options.fps,
|
|
31
|
+
generateAudio: options.audio,
|
|
32
|
+
model: options.model,
|
|
33
|
+
},
|
|
34
|
+
}, context);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/actions/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAyBlE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,OAA2B;IACxD,iDAAiD;IACjD,IAAI,KAA6B,CAAC;IAClC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC1F,KAAK,GAAG;YACN,MAAM,EAAE,OAAO,CAAC,KAAK;YACrB,KAAK;SACN,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAkB;QAC7B,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,eAAe;QACzD,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,UAAU,EAAE,OAAO,CAAC,IAAI;QACxB,WAAW,EAAE,OAAO,CAAC,KAAK;KAC3B,CAAC;IAEF,OAAO,aAAa,CAClB,cAAc,EACd;QACE,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE;YACP,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK;YACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,aAAa,EAAE,OAAO,CAAC,KAAK;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB;KACF,EACD,OAAO,CACR,CAAC;AACJ,CAAC"}
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/actions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { generate } from './actions/index.js';
|
|
2
|
+
export type { VideoGenerateInput } from './actions/index.js';
|
|
3
|
+
export type { MediaResult, VideoResolution, VideoFps, } from '@agent-media/core';
|
|
2
4
|
export { isSuccess, isError, printResult } from '@agent-media/core';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,YAAY,EACV,WAAW,EACX,eAAe,EACf,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// Video package -
|
|
2
|
-
//
|
|
1
|
+
// Video package - video-specific actions
|
|
2
|
+
// Export actions
|
|
3
|
+
export { generate } from './actions/index.js';
|
|
3
4
|
export { isSuccess, isError, printResult } from '@agent-media/core';
|
|
4
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,iBAAiB;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAU9C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-media/video",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Video actions for agent-media toolkit",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@agent-media/core": "0.
|
|
29
|
-
"@agent-media/providers": "0.
|
|
28
|
+
"@agent-media/core": "0.5.0",
|
|
29
|
+
"@agent-media/providers": "0.5.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|