@usenaive-sdk/managed-agents 0.12.3 → 0.12.4

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/index.d.ts CHANGED
@@ -1899,10 +1899,12 @@ declare const EditRequestSchema: z.ZodObject<{
1899
1899
  prompt: z.ZodString;
1900
1900
  references: z.ZodOptional<z.ZodArray<z.ZodString>>;
1901
1901
  mode: z.ZodOptional<z.ZodEnum<{
1902
+ edit: "edit";
1902
1903
  scene: "scene";
1903
1904
  outfit_or_object: "outfit_or_object";
1904
1905
  person_swap: "person_swap";
1905
1906
  recast: "recast";
1907
+ motion_transfer: "motion_transfer";
1906
1908
  }>>;
1907
1909
  }, z.core.$strip>;
1908
1910
  /** What `POST /v1/media/edits` and `GET /v1/media/edits/:id` answer. No checkpoint, route or vendor. */
@@ -1919,11 +1921,17 @@ declare const EditJobSchema: z.ZodObject<{
1919
1921
  prompt: z.ZodString;
1920
1922
  references: z.ZodArray<z.ZodString>;
1921
1923
  mode: z.ZodNullable<z.ZodEnum<{
1924
+ edit: "edit";
1922
1925
  scene: "scene";
1923
1926
  outfit_or_object: "outfit_or_object";
1924
1927
  person_swap: "person_swap";
1925
1928
  recast: "recast";
1929
+ motion_transfer: "motion_transfer";
1926
1930
  }>>;
1931
+ rendered_as: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
1932
+ edit: "edit";
1933
+ motion_transfer: "motion_transfer";
1934
+ }>>>;
1927
1935
  result: z.ZodNullable<z.ZodObject<{
1928
1936
  file_id: z.ZodString;
1929
1937
  }, z.core.$strip>>;
@@ -3360,6 +3368,8 @@ type CharacterFilter = {
3360
3368
 
3361
3369
  type EditRequest = z.input<typeof EditRequestSchema>;
3362
3370
  type EditJob = z.infer<typeof EditJobSchema>;
3371
+ /** A Mira edit's kind (§55, ADR-2410): `edit` (the default) or a narrower mode, or `motion_transfer`. */
3372
+ type EditMode = NonNullable<EditRequest["mode"]>;
3363
3373
  type ImageRequest = z.input<typeof ImageRequestSchema>;
3364
3374
  type MeshRequest = z.input<typeof MeshRequestSchema>;
3365
3375
  type VideoRequest = z.input<typeof VideoRequestSchema>;
@@ -8642,7 +8652,8 @@ declare function createClient(options: Partial<ClientConfig> & Pick<ClientConfig
8642
8652
  video: string;
8643
8653
  prompt: string;
8644
8654
  references: string[];
8645
- mode: "scene" | "outfit_or_object" | "person_swap" | "recast" | null;
8655
+ mode: "edit" | "scene" | "outfit_or_object" | "person_swap" | "recast" | "motion_transfer" | null;
8656
+ rendered_as: "edit" | "motion_transfer" | null;
8646
8657
  result: {
8647
8658
  file_id: string;
8648
8659
  } | null;
@@ -8661,7 +8672,8 @@ declare function createClient(options: Partial<ClientConfig> & Pick<ClientConfig
8661
8672
  video: string;
8662
8673
  prompt: string;
8663
8674
  references: string[];
8664
- mode: "scene" | "outfit_or_object" | "person_swap" | "recast" | null;
8675
+ mode: "edit" | "scene" | "outfit_or_object" | "person_swap" | "recast" | "motion_transfer" | null;
8676
+ rendered_as: "edit" | "motion_transfer" | null;
8665
8677
  result: {
8666
8678
  file_id: string;
8667
8679
  } | null;
@@ -13326,4 +13338,4 @@ declare function createClient(options: Partial<ClientConfig> & Pick<ClientConfig
13326
13338
  };
13327
13339
  type VettaClient = ReturnType<typeof createClient>;
13328
13340
 
13329
- export { type AdAccount, type AgentCreate, type AgentPatch, ApiError, type AppCreate, type AppOption, type AppPatch, type AuditFilter, type AuthConfig, type AuthConfigCreate, type AuthSession, type BrowserActionRequest, type BrowserCredential, type BrowserLogin, type BrowserOptionsInput, type BrowserSignup, type Build3dRequestInput, type Build3dResult, CONNECTION_AUTHS, type Call, type CardCreate, type CardPatch, type Character, type CharacterCreate, type CharacterFilter, type ClientConfig, type ClipCreate, type ClipFilter, type CloseTradingPosition, type ComputerCreate, type Connection, type ConnectionApp, type ConnectionAppDetail, type ConnectionAuth, type ConnectionField, type ConnectionStatus, type Connector, type CreateBrowserGrant, type CredentialCreate, type CrmActivityCreate, type CrmActivityUpdate, type CrmContactCreate, type CrmContactUpdate, DEFAULT_BASE_URL, type DataDomain, type DataRun, type DataRunRequest, type DataTool, type DataToolDetail, type DataToolSearch, type DbFilter, type DbOptions, type DbPage, type DeploymentCreate, type DeploymentPatch, type DomainCreate, type DomainPurchase, type EditJob, type EditRequest, type EmailSend, type FileFilter, type FileImport, type FileUpdate, type FsOp, type Handoffs, type Identity, type IdentityCreate, type IdentityPatch, type ImageGeneration, type ImageRequest, type InboxCreate, type InstallApply, type InstallPreview, type LedgerFilter, type ListQuery, type McpSession, type McpSessionCreate, type MediaFilter, type MediaJob, type MediaModel, type MediaSkillBuild, type MediaSkillCreate, type MediaSkillFilter, type MediaToolConfig, type MeshRequest, type Method, type MobileAction, type MobileActionResult, type MobileDevice, type MobileDeviceCreate, type MobileInstallAppOutput, type MobileLiveView, type ModelSelection, type ModelSelectionPolicy, type ModelSelectionRequest, type ObjectListQuery, type Outcome, type OutcomeCreate, type OutcomeEvaluation, type PendingAction, type PhoneProvision, type PhoneTier, type PlaceTradingOrder, type Plan, type Post, type PostStatus, type ProxyBlock, type ProxyMessage, type ProxyMessageCreate, ResponseParseError, SOCIAL_PLATFORMS, SOCIAL_TEXT_PLATFORMS, SOCIAL_VISIBILITIES, type SaveBrowserContext, type SearchCampaignCreate, type Session, type SessionCreate, type SessionFilter, type SkillContent, type SocialDataRun, type SocialDataRunRequest, type SocialDataTool, type SocialDataToolDetail, type SocialDataToolSearch, type SocialPlatform, type SocialPostCreate, type SocialTextPlatform, type SocialVisibility, type SocialWorkspace, type SpeechCreate, type SpeechToSpeechCreate, type StockPhoto, type StockPhotoQuery, type StopReason, type StreamOptions, type ToolSettings, type TradingAccount, type TradingConnect, type TradingConnection, type TradingEnv, type TradingEnvQuery, type TradingOrder, type TradingOrdersQuery, type TradingPosition, type TradingQuote, type TradingQuotesQuery, type TranscriptionCreate, type UploadOptions, type UploadUrlOptions, type VaultCreate, type VettaClient, type VideoRequest, type WebToolConfig, type WebhookPatch, apiErrorFrom, createClient, filterQuery, resolveApp, send, withTool };
13341
+ export { type AdAccount, type AgentCreate, type AgentPatch, ApiError, type AppCreate, type AppOption, type AppPatch, type AuditFilter, type AuthConfig, type AuthConfigCreate, type AuthSession, type BrowserActionRequest, type BrowserCredential, type BrowserLogin, type BrowserOptionsInput, type BrowserSignup, type Build3dRequestInput, type Build3dResult, CONNECTION_AUTHS, type Call, type CardCreate, type CardPatch, type Character, type CharacterCreate, type CharacterFilter, type ClientConfig, type ClipCreate, type ClipFilter, type CloseTradingPosition, type ComputerCreate, type Connection, type ConnectionApp, type ConnectionAppDetail, type ConnectionAuth, type ConnectionField, type ConnectionStatus, type Connector, type CreateBrowserGrant, type CredentialCreate, type CrmActivityCreate, type CrmActivityUpdate, type CrmContactCreate, type CrmContactUpdate, DEFAULT_BASE_URL, type DataDomain, type DataRun, type DataRunRequest, type DataTool, type DataToolDetail, type DataToolSearch, type DbFilter, type DbOptions, type DbPage, type DeploymentCreate, type DeploymentPatch, type DomainCreate, type DomainPurchase, type EditJob, type EditMode, type EditRequest, type EmailSend, type FileFilter, type FileImport, type FileUpdate, type FsOp, type Handoffs, type Identity, type IdentityCreate, type IdentityPatch, type ImageGeneration, type ImageRequest, type InboxCreate, type InstallApply, type InstallPreview, type LedgerFilter, type ListQuery, type McpSession, type McpSessionCreate, type MediaFilter, type MediaJob, type MediaModel, type MediaSkillBuild, type MediaSkillCreate, type MediaSkillFilter, type MediaToolConfig, type MeshRequest, type Method, type MobileAction, type MobileActionResult, type MobileDevice, type MobileDeviceCreate, type MobileInstallAppOutput, type MobileLiveView, type ModelSelection, type ModelSelectionPolicy, type ModelSelectionRequest, type ObjectListQuery, type Outcome, type OutcomeCreate, type OutcomeEvaluation, type PendingAction, type PhoneProvision, type PhoneTier, type PlaceTradingOrder, type Plan, type Post, type PostStatus, type ProxyBlock, type ProxyMessage, type ProxyMessageCreate, ResponseParseError, SOCIAL_PLATFORMS, SOCIAL_TEXT_PLATFORMS, SOCIAL_VISIBILITIES, type SaveBrowserContext, type SearchCampaignCreate, type Session, type SessionCreate, type SessionFilter, type SkillContent, type SocialDataRun, type SocialDataRunRequest, type SocialDataTool, type SocialDataToolDetail, type SocialDataToolSearch, type SocialPlatform, type SocialPostCreate, type SocialTextPlatform, type SocialVisibility, type SocialWorkspace, type SpeechCreate, type SpeechToSpeechCreate, type StockPhoto, type StockPhotoQuery, type StopReason, type StreamOptions, type ToolSettings, type TradingAccount, type TradingConnect, type TradingConnection, type TradingEnv, type TradingEnvQuery, type TradingOrder, type TradingOrdersQuery, type TradingPosition, type TradingQuote, type TradingQuotesQuery, type TranscriptionCreate, type UploadOptions, type UploadUrlOptions, type VaultCreate, type VettaClient, type VideoRequest, type WebToolConfig, type WebhookPatch, apiErrorFrom, createClient, filterQuery, resolveApp, send, withTool };
package/dist/index.js CHANGED
@@ -2091,6 +2091,10 @@ var PayoutDetailsSchema = z13.object({
2091
2091
  var CreatorStatusSchema = z13.enum(["active", "suspended", "archived"]);
2092
2092
  var CreatorSourceSchema = z13.enum(["youtube", "channel_license", "doomscroll"]);
2093
2093
  var CreatorStudioBudgetSchema = MicroUsdField.positive().max(1e10);
2094
+ var CreatorModeSchema = z13.enum(["ai_clips", "sports_clips", "movie_clips", "dance_clips"]);
2095
+ var VIDEO_CREATOR_MODES = ["sports_clips", "movie_clips", "dance_clips"];
2096
+ var VideoCreatorModeSchema = z13.enum(VIDEO_CREATOR_MODES);
2097
+ var CreatorModesSchema = z13.array(CreatorModeSchema).min(1, "keep at least one account type").refine((modes) => new Set(modes).size === modes.length, "each account type at most once");
2094
2098
  var CreatorSchema = z13.object({
2095
2099
  id: idOf("crt"),
2096
2100
  object: z13.literal("creator"),
@@ -2104,6 +2108,8 @@ var CreatorSchema = z13.object({
2104
2108
  clicks: z13.number().int().nonnegative(),
2105
2109
  /** This creator's per-draft studio cap, overriding `CREATOR_PROGRAM.studio`; `null` = the default. */
2106
2110
  studio_budget_micro_usd: CreatorStudioBudgetSchema.nullable(),
2111
+ /** Its campaign modes (migration 0181); a row read before it parses as `ai_clips` only. */
2112
+ modes: CreatorModesSchema.default(["ai_clips"]),
2107
2113
  created_at: Timestamp,
2108
2114
  updated_at: Timestamp
2109
2115
  });
@@ -2216,7 +2222,9 @@ var CREATOR_PROGRAM = {
2216
2222
  review_check_budget_micro_usd: 5e6,
2217
2223
  /** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
2218
2224
  video: {
2219
- min_seconds: 3,
2225
+ /** The object swap refuses a clip under 4 s (§42.15). */
2226
+ min_seconds: 4,
2227
+ /** The longest part of a clip a render uses: a longer upload is taken and cut to its first 15 s (ADR-2204). */
2220
2228
  max_seconds: 15,
2221
2229
  video_max_bytes: 95 * 1024 * 1024,
2222
2230
  image_max_bytes: 10 * 1024 * 1024,
@@ -2224,8 +2232,8 @@ var CREATOR_PROGRAM = {
2224
2232
  characters_max: 3,
2225
2233
  /** After the first render. A refused or failed render does not use one up. */
2226
2234
  revisions: 5,
2227
- /** Per doomscroll account, until one of its templates is approved. */
2228
- unapproved_templates: 2,
2235
+ /** Per doomscroll account, until one of its templates is approved. Only drafts that rendered a video count. */
2236
+ unapproved_templates: 5,
2229
2237
  /** Upload tickets a doomscroll account may ask for, per template. */
2230
2238
  upload_tickets: 20,
2231
2239
  /** A draft never submitted loses its source and character bytes this long after `updated_at`. */
@@ -2353,8 +2361,11 @@ var StudioCharacterSchema = z13.object({
2353
2361
  file_id: z13.string().nullable(),
2354
2362
  bytes: z13.number().int().positive().max(CREATOR_PROGRAM.studio.video.image_max_bytes),
2355
2363
  content_type: StudioImageContentTypeSchema,
2356
- filename: z13.string().min(1).max(200)
2364
+ filename: z13.string().min(1).max(200),
2365
+ /** Who this is in the clip, in the creator's words ("the driver"): the render is told which photo is whom. */
2366
+ label: z13.string().min(1).max(80).optional()
2357
2367
  });
2368
+ var StudioEditModeSchema = z13.enum(["edit", "motion_transfer"]);
2358
2369
  var CreatorStudioSchema = z13.object({
2359
2370
  uploads: z13.array(StudioUploadSchema).max(CREATOR_PROGRAM.studio.uploads).default([]),
2360
2371
  /** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos; `video`: one raw clip recast by Mira (§42.14). */
@@ -2373,7 +2384,11 @@ var CreatorStudioSchema = z13.object({
2373
2384
  /** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
2374
2385
  source_video: StudioSourceVideoSchema.nullable().default(null),
2375
2386
  characters: z13.array(StudioCharacterSchema).max(CREATOR_PROGRAM.studio.video.characters_max).default([]),
2376
- chosen_round: z13.number().int().positive().nullable().default(null)
2387
+ chosen_round: z13.number().int().positive().nullable().default(null),
2388
+ /** A `video` origin's campaign mode (§42.15); absent on a draft made before modes, which reads as generic. */
2389
+ mode: VideoCreatorModeSchema.optional(),
2390
+ /** A `video` origin's kind of Mira edit (ADR-2410); absent is `edit`. Not `mode`, which is the campaign mode. */
2391
+ edit_mode: StudioEditModeSchema.optional()
2377
2392
  });
2378
2393
  var CreatorTemplateListingSchema = z13.object({
2379
2394
  listed: z13.boolean(),
@@ -2545,19 +2560,28 @@ var CreatorAnalyticsSchema = z13.object({
2545
2560
  var CreatorTemplateCreateKindSchema = z13.object({
2546
2561
  kind: CreatorTemplateKindSchema.default("crew"),
2547
2562
  /** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
2548
- origin: z13.literal("video").optional()
2563
+ origin: z13.literal("video").optional(),
2564
+ /** Required with `origin: "video"`: one of the creator's video modes (§42.15). */
2565
+ mode: VideoCreatorModeSchema.optional(),
2566
+ /** Only with `origin: "video"`: how its rounds are made on Mira (ADR-2410); absent is `edit`. */
2567
+ edit_mode: StudioEditModeSchema.optional()
2549
2568
  });
2550
2569
  var StudioUploadCreateSchema = z13.object({
2551
2570
  purpose: z13.enum(["source", "character"]).optional(),
2552
2571
  position: UploadPosition.optional(),
2553
2572
  filename: z13.string().min(1).max(200),
2554
2573
  content_type: z13.union([StudioUploadContentTypeSchema, StudioImageContentTypeSchema]),
2555
- bytes: z13.number().int().positive()
2574
+ bytes: z13.number().int().positive(),
2575
+ /** A `source` only: its length as the browser read it. Prices the render, held to the program's 4–15 s (§42.15). */
2576
+ seconds: z13.number().positive().max(600).optional(),
2577
+ /** A `character` only: who it is in the clip. */
2578
+ label: z13.string().trim().min(1).max(80).optional()
2556
2579
  }).superRefine((body, ctx) => {
2557
2580
  const { video, upload_max_bytes } = CREATOR_PROGRAM.studio;
2558
2581
  const character = body.purpose === "character";
2559
2582
  const issue = (path, message) => ctx.addIssue({ code: "custom", path: [path], message });
2560
2583
  if (body.purpose !== "source" && body.position === void 0) issue("position", "position is required");
2584
+ if (body.label !== void 0 && !character) issue("label", "only a character takes a label");
2561
2585
  if (character !== StudioImageContentTypeSchema.safeParse(body.content_type).success) {
2562
2586
  issue("content_type", character ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
2563
2587
  }
@@ -2598,8 +2622,16 @@ var CreatorStudioViewSchema = z13.object({
2598
2622
  studio: CreatorStudioSchema.extend({
2599
2623
  source_video: StudioSourceVideoSchema.extend({ url: z13.string().nullable().optional() }).nullable().default(null)
2600
2624
  }),
2601
- /** Newest first. A `video` round also carries a signed `sample_url`. */
2602
- rounds: z13.array(CreatorTemplateRoundSchema.extend({ sample_url: z13.string().nullable().optional() })),
2625
+ /**
2626
+ * Newest first. A `video` round also carries a signed `sample_url`; a `motion_transfer` build's ended
2627
+ * round carries `rendered_as`, how Mira made it (`edit` when the motion could not be copied, ADR-2410).
2628
+ */
2629
+ rounds: z13.array(
2630
+ CreatorTemplateRoundSchema.extend({
2631
+ sample_url: z13.string().nullable().optional(),
2632
+ rendered_as: z13.enum(["edit", "motion_transfer"]).nullable().optional()
2633
+ })
2634
+ ),
2603
2635
  budget: StudioBudgetSchema
2604
2636
  });
2605
2637
  var NicheSubmitSchema = z13.object({
@@ -4475,7 +4507,9 @@ var MusicGenerationSchema = z33.object({
4475
4507
  duration_seconds: Seconds2.nullable(),
4476
4508
  cost_micro_usd: MicroUsdField
4477
4509
  });
4478
- var EditModeSchema = z33.enum(["scene", "outfit_or_object", "person_swap", "recast"]);
4510
+ var EditModeSchema = z33.enum(["edit", "scene", "outfit_or_object", "person_swap", "recast", "motion_transfer"]).describe(
4511
+ `What kind of edit. "edit" (the default): the regular editor, reading what to do from the prompt. "scene", "outfit_or_object", "person_swap" and "recast" narrow it. "motion_transfer": copy the clip's exact motion onto the characters in the reference photos (fil_ images, at most 3 used), keeping the place; best for 5-15 s fights and dances; with 2-3 photos, start the prompt with <Character1>who photo 1 replaces<Character2>who photo 2 replaces and a new line. A clip it cannot take is made by the regular editor.`
4512
+ );
4479
4513
  var EditRequestSchema = z33.object({
4480
4514
  video: z33.string().min(1),
4481
4515
  prompt: z33.string().min(1).max(1e3),
@@ -4491,6 +4525,12 @@ var EditJobSchema = z33.object({
4491
4525
  prompt: z33.string(),
4492
4526
  references: z33.array(z33.string()),
4493
4527
  mode: EditModeSchema.nullable(),
4528
+ /**
4529
+ * How the finished edit was made: `motion_transfer` when the motion was copied, `edit` when the regular
4530
+ * editor made it (every other mode, or a motion transfer that fell back). `null` until it is completed, and
4531
+ * from a server older than the field.
4532
+ */
4533
+ rendered_as: z33.enum(["edit", "motion_transfer"]).nullable().default(null).describe("How the finished edit was made: motion_transfer, or edit (the regular editor). null until completed."),
4494
4534
  result: z33.object({ file_id: z33.string().startsWith("fil_") }).nullable(),
4495
4535
  error: z33.object({ code: EditFailureCodeSchema, message: z33.string() }).nullable(),
4496
4536
  cost_micro_usd: MicroUsdField.nullable(),