@usenaive-sdk/cli 1.0.1 → 1.0.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/index.js +376 -117
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -11953,7 +11953,7 @@ function resolveConfig(args, env2, readConfig, { login = false } = {}) {
|
|
|
11953
11953
|
`unknown profile "${profile}"; run \`naive login --profile ${profile}\` first (add --api-base-url <url> for a non-production API)`
|
|
11954
11954
|
);
|
|
11955
11955
|
}
|
|
11956
|
-
const given = set(args.str("api-key")) ?? set(env2["
|
|
11956
|
+
const given = set(args.str("api-key")) ?? set(env2["NAIVE_API_KEY"]) ?? set(env2["VETTA_API_KEY"]);
|
|
11957
11957
|
return {
|
|
11958
11958
|
profile,
|
|
11959
11959
|
baseUrl,
|
|
@@ -26963,6 +26963,8 @@ var LedgerEntrySchema = external_exports.object({
|
|
|
26963
26963
|
session_id: idOf("ses").nullable(),
|
|
26964
26964
|
agent_id: idOf("agt").nullable(),
|
|
26965
26965
|
deployment_id: idOf("dep").nullable(),
|
|
26966
|
+
/** The computer (`cmp_`), browser (`brw_`) or phone (`mob_`) a debit bills; `null` for anything else, and from a server older than the field. */
|
|
26967
|
+
resource_id: external_exports.string().nullable().default(null),
|
|
26966
26968
|
line_items: external_exports.array(external_exports.object({ tier: LineItemTierSchema, amount_micro_usd: MicroUsdField })),
|
|
26967
26969
|
created_at: Timestamp
|
|
26968
26970
|
});
|
|
@@ -28421,7 +28423,11 @@ var transposed = (a, b) => {
|
|
|
28421
28423
|
};
|
|
28422
28424
|
function toolNameProblem(name6) {
|
|
28423
28425
|
if (BUILTIN_TOOLS.includes(name6) || name6 in FOLLOWS_TOOL || PLATFORM_TOOLS.includes(name6)) return null;
|
|
28424
|
-
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6))
|
|
28426
|
+
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6)) {
|
|
28427
|
+
const bare = [...BUILTIN_TOOLS, ...Object.keys(FOLLOWS_TOOL)].find((tool) => transposed(tool, name6));
|
|
28428
|
+
const hint = bare === void 0 ? "name a built-in, or a namespaced `<namespace>.<tool>`" : `did you mean \`${bare}\`?`;
|
|
28429
|
+
return `\`${name6}\` is not a tool; ${hint}`;
|
|
28430
|
+
}
|
|
28425
28431
|
const namespace = name6.slice(0, name6.indexOf("."));
|
|
28426
28432
|
if (PLATFORM_NAMESPACES.has(namespace)) {
|
|
28427
28433
|
const known = [...PLATFORM_TOOLS, ...Object.keys(FOLLOWS_TOOL)].filter((tool) => tool.startsWith(`${namespace}.`));
|
|
@@ -28432,7 +28438,8 @@ function toolNameProblem(name6) {
|
|
|
28432
28438
|
}
|
|
28433
28439
|
var isToolName = (name6) => toolNameProblem(name6) === null;
|
|
28434
28440
|
var ToolConfigSchema = external_exports.object({
|
|
28435
|
-
enabled:
|
|
28441
|
+
/** Absent is enabled (ADR-1911): naming a tool to set its permission already says it is wanted. */
|
|
28442
|
+
enabled: external_exports.boolean().default(true),
|
|
28436
28443
|
permission: ToolPermissionSchema,
|
|
28437
28444
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
28438
28445
|
});
|
|
@@ -28705,7 +28712,24 @@ var CREATOR_PROGRAM = {
|
|
|
28705
28712
|
upload_token_minutes: 15,
|
|
28706
28713
|
skill_max_bytes: 32 * 1024,
|
|
28707
28714
|
/** The reviewer's install check (§42.5): the hard cap on its one session, never charged to the draft. */
|
|
28708
|
-
review_check_budget_micro_usd: 5e6
|
|
28715
|
+
review_check_budget_micro_usd: 5e6,
|
|
28716
|
+
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
28717
|
+
video: {
|
|
28718
|
+
min_seconds: 3,
|
|
28719
|
+
max_seconds: 15,
|
|
28720
|
+
video_max_bytes: 95 * 1024 * 1024,
|
|
28721
|
+
image_max_bytes: 10 * 1024 * 1024,
|
|
28722
|
+
characters_min: 1,
|
|
28723
|
+
characters_max: 3,
|
|
28724
|
+
/** After the first render. A refused or failed render does not use one up. */
|
|
28725
|
+
revisions: 5,
|
|
28726
|
+
/** Per doomscroll account, until one of its templates is approved. */
|
|
28727
|
+
unapproved_templates: 2,
|
|
28728
|
+
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
28729
|
+
upload_tickets: 20,
|
|
28730
|
+
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
28731
|
+
draft_retention_days: 30
|
|
28732
|
+
}
|
|
28709
28733
|
}
|
|
28710
28734
|
};
|
|
28711
28735
|
var DOOMSCROLL_PROGRAM = {
|
|
@@ -28749,6 +28773,8 @@ var StudioStateSchema = external_exports.enum([
|
|
|
28749
28773
|
"setup",
|
|
28750
28774
|
"building",
|
|
28751
28775
|
"ready",
|
|
28776
|
+
/** A `video` origin only: a version was submitted and its author is writing the skill. */
|
|
28777
|
+
"finalizing",
|
|
28752
28778
|
"in_review",
|
|
28753
28779
|
"live",
|
|
28754
28780
|
"changes_requested"
|
|
@@ -28812,10 +28838,26 @@ var StudioSkillSchema = SavedSkillSchema.extend({
|
|
|
28812
28838
|
id: idOf("skl").nullable(),
|
|
28813
28839
|
version: external_exports.number().int().positive().nullable()
|
|
28814
28840
|
});
|
|
28841
|
+
var StudioImageContentTypeSchema = external_exports.enum(["image/png", "image/jpeg", "image/webp"]);
|
|
28842
|
+
var StudioSourceVideoSchema = external_exports.object({
|
|
28843
|
+
file_id: external_exports.string().nullable(),
|
|
28844
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM.studio.video.video_max_bytes),
|
|
28845
|
+
content_type: StudioUploadContentTypeSchema,
|
|
28846
|
+
filename: external_exports.string().min(1).max(200),
|
|
28847
|
+
seconds: external_exports.number().nonnegative().nullable()
|
|
28848
|
+
});
|
|
28849
|
+
var CharacterPosition = external_exports.number().int().min(1).max(CREATOR_PROGRAM.studio.video.characters_max);
|
|
28850
|
+
var StudioCharacterSchema = external_exports.object({
|
|
28851
|
+
position: CharacterPosition,
|
|
28852
|
+
file_id: external_exports.string().nullable(),
|
|
28853
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM.studio.video.image_max_bytes),
|
|
28854
|
+
content_type: StudioImageContentTypeSchema,
|
|
28855
|
+
filename: external_exports.string().min(1).max(200)
|
|
28856
|
+
});
|
|
28815
28857
|
var CreatorStudioSchema = external_exports.object({
|
|
28816
28858
|
uploads: external_exports.array(StudioUploadSchema).max(CREATOR_PROGRAM.studio.uploads).default([]),
|
|
28817
|
-
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos. */
|
|
28818
|
-
origin: external_exports.enum(["upload", "links"]).default("upload"),
|
|
28859
|
+
/** `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). */
|
|
28860
|
+
origin: external_exports.enum(["upload", "links", "video"]).default("upload"),
|
|
28819
28861
|
imports: external_exports.array(StudioImportSchema).max(CREATOR_PROGRAM.studio.uploads).default([]),
|
|
28820
28862
|
state: StudioStateSchema.default("setup"),
|
|
28821
28863
|
spend_micro_usd: MicroUsdField.nonnegative().default(0),
|
|
@@ -28826,7 +28868,11 @@ var CreatorStudioSchema = external_exports.object({
|
|
|
28826
28868
|
/** An org build's asked sample length (§57.2, ADR-1762); `null` is `sample_seconds`. */
|
|
28827
28869
|
seconds: external_exports.number().int().min(10).max(60).nullable().default(null),
|
|
28828
28870
|
/** An org build's own catalog text: its request's description when that fits a tagline; `null` lets the judge write one. */
|
|
28829
|
-
tagline: external_exports.string().max(140).nullable().default(null)
|
|
28871
|
+
tagline: external_exports.string().max(140).nullable().default(null),
|
|
28872
|
+
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
28873
|
+
source_video: StudioSourceVideoSchema.nullable().default(null),
|
|
28874
|
+
characters: external_exports.array(StudioCharacterSchema).max(CREATOR_PROGRAM.studio.video.characters_max).default([]),
|
|
28875
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
28830
28876
|
});
|
|
28831
28877
|
var CreatorTemplateListingSchema = external_exports.object({
|
|
28832
28878
|
listed: external_exports.boolean(),
|
|
@@ -28880,7 +28926,15 @@ var CreatorTemplateRoundSchema = external_exports.object({
|
|
|
28880
28926
|
spend_micro_usd: MicroUsdField.nonnegative(),
|
|
28881
28927
|
error: external_exports.string().nullable(),
|
|
28882
28928
|
created_at: Timestamp,
|
|
28883
|
-
finished_at: Timestamp.nullable()
|
|
28929
|
+
finished_at: Timestamp.nullable(),
|
|
28930
|
+
/** A `video` origin round's Mira edit and its result (migration 0172, §42.14). */
|
|
28931
|
+
edit_job_id: external_exports.string().nullable().default(null),
|
|
28932
|
+
sample_file_id: external_exports.string().nullable().default(null)
|
|
28933
|
+
});
|
|
28934
|
+
var StudioPlateSchema = external_exports.object({
|
|
28935
|
+
file: external_exports.string().min(1),
|
|
28936
|
+
kind: external_exports.enum(["video", "image"]),
|
|
28937
|
+
file_id: external_exports.string().min(1)
|
|
28884
28938
|
});
|
|
28885
28939
|
var NicheVersionStudioSchema = external_exports.object({
|
|
28886
28940
|
round: external_exports.number().int().positive(),
|
|
@@ -28889,7 +28943,9 @@ var NicheVersionStudioSchema = external_exports.object({
|
|
|
28889
28943
|
frames: external_exports.array(StudioFrameSchema),
|
|
28890
28944
|
samples: external_exports.array(StudioSampleSchema),
|
|
28891
28945
|
tagline: external_exports.string().max(140),
|
|
28892
|
-
hero_sample_index: external_exports.number().int().nonnegative()
|
|
28946
|
+
hero_sample_index: external_exports.number().int().nonnegative(),
|
|
28947
|
+
/** A `video` origin's default clip and characters. */
|
|
28948
|
+
plates: external_exports.array(StudioPlateSchema).optional()
|
|
28893
28949
|
});
|
|
28894
28950
|
var CreatorTemplateSchema = external_exports.object({
|
|
28895
28951
|
id: idOf("ctp"),
|
|
@@ -28986,13 +29042,26 @@ var CreatorAnalyticsSchema = external_exports.object({
|
|
|
28986
29042
|
install_windows: external_exports.array(external_exports.object({ install_id: idOf("bpi"), from: Day, until: Day })).optional()
|
|
28987
29043
|
});
|
|
28988
29044
|
var CreatorTemplateCreateKindSchema = external_exports.object({
|
|
28989
|
-
kind: CreatorTemplateKindSchema.default("crew")
|
|
29045
|
+
kind: CreatorTemplateKindSchema.default("crew"),
|
|
29046
|
+
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
29047
|
+
origin: external_exports.literal("video").optional()
|
|
28990
29048
|
});
|
|
28991
29049
|
var StudioUploadCreateSchema = external_exports.object({
|
|
28992
|
-
|
|
29050
|
+
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
29051
|
+
position: UploadPosition.optional(),
|
|
28993
29052
|
filename: external_exports.string().min(1).max(200),
|
|
28994
|
-
content_type: StudioUploadContentTypeSchema,
|
|
28995
|
-
bytes: external_exports.number().int().positive()
|
|
29053
|
+
content_type: external_exports.union([StudioUploadContentTypeSchema, StudioImageContentTypeSchema]),
|
|
29054
|
+
bytes: external_exports.number().int().positive()
|
|
29055
|
+
}).superRefine((body2, ctx) => {
|
|
29056
|
+
const { video, upload_max_bytes } = CREATOR_PROGRAM.studio;
|
|
29057
|
+
const character2 = body2.purpose === "character";
|
|
29058
|
+
const issue2 = (path, message4) => ctx.addIssue({ code: "custom", path: [path], message: message4 });
|
|
29059
|
+
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
29060
|
+
if (character2 !== StudioImageContentTypeSchema.safeParse(body2.content_type).success) {
|
|
29061
|
+
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
29062
|
+
}
|
|
29063
|
+
const max = character2 ? video.image_max_bytes : body2.purpose === "source" ? video.video_max_bytes : upload_max_bytes;
|
|
29064
|
+
if (body2.bytes > max) issue2("bytes", `this upload may be at most ${max} bytes`);
|
|
28996
29065
|
});
|
|
28997
29066
|
var StudioUploadTicketSchema = external_exports.object({
|
|
28998
29067
|
object: external_exports.literal("studio_upload_ticket"),
|
|
@@ -29006,6 +29075,12 @@ var StudioUploadResultSchema = external_exports.object({
|
|
|
29006
29075
|
template_id: idOf("ctp"),
|
|
29007
29076
|
upload: StudioUploadSchema
|
|
29008
29077
|
});
|
|
29078
|
+
var StudioVideoUploadResultSchema = external_exports.object({
|
|
29079
|
+
object: external_exports.literal("studio_upload"),
|
|
29080
|
+
template_id: idOf("ctp"),
|
|
29081
|
+
source_video: StudioSourceVideoSchema.nullable(),
|
|
29082
|
+
characters: external_exports.array(StudioCharacterSchema)
|
|
29083
|
+
});
|
|
29009
29084
|
var StudioRoundCreateSchema = external_exports.object({
|
|
29010
29085
|
feedback: external_exports.string().min(1).max(4e3).optional(),
|
|
29011
29086
|
rights_attested: external_exports.boolean().optional()
|
|
@@ -29018,9 +29093,12 @@ var StudioBudgetSchema = external_exports.object({
|
|
|
29018
29093
|
var CreatorStudioViewSchema = external_exports.object({
|
|
29019
29094
|
object: external_exports.literal("creator_studio"),
|
|
29020
29095
|
template_id: idOf("ctp"),
|
|
29021
|
-
|
|
29022
|
-
|
|
29023
|
-
|
|
29096
|
+
/** A `video` origin's `source_video` also carries a signed `url` once its bytes landed. */
|
|
29097
|
+
studio: CreatorStudioSchema.extend({
|
|
29098
|
+
source_video: StudioSourceVideoSchema.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
29099
|
+
}),
|
|
29100
|
+
/** Newest first. A `video` round also carries a signed `sample_url`. */
|
|
29101
|
+
rounds: external_exports.array(CreatorTemplateRoundSchema.extend({ sample_url: external_exports.string().nullable().optional() })),
|
|
29024
29102
|
budget: StudioBudgetSchema
|
|
29025
29103
|
});
|
|
29026
29104
|
var NicheSubmitSchema = external_exports.object({
|
|
@@ -29030,6 +29108,7 @@ var NicheSubmitSchema = external_exports.object({
|
|
|
29030
29108
|
hero_sample_index: external_exports.number().int().nonnegative()
|
|
29031
29109
|
})
|
|
29032
29110
|
});
|
|
29111
|
+
var VideoSubmitSchema = external_exports.object({ round: external_exports.number().int().positive() });
|
|
29033
29112
|
var CreatorListingPatchSchema = CreatorTemplateListingSchema.partial();
|
|
29034
29113
|
var CreatorListingSchema = external_exports.object({
|
|
29035
29114
|
object: external_exports.literal("creator_listing"),
|
|
@@ -29255,6 +29334,10 @@ var EventTypeSchema = external_exports.enum([
|
|
|
29255
29334
|
"span.harness_build.end",
|
|
29256
29335
|
"span.box_resume.start",
|
|
29257
29336
|
"span.box_resume.end",
|
|
29337
|
+
"span.tools_resolve.start",
|
|
29338
|
+
"span.tools_resolve.end",
|
|
29339
|
+
"span.model_gate.start",
|
|
29340
|
+
"span.model_gate.end",
|
|
29258
29341
|
/**
|
|
29259
29342
|
* A delegated thread's lifecycle, on the **coordinator's** stream (§28). The child's own
|
|
29260
29343
|
* `ses_…` rides inside `data.thread_id` — the event schema gains no field and `vetta.event` gains
|
|
@@ -30865,11 +30948,12 @@ var MusicGenerationSchema = external_exports.object({
|
|
|
30865
30948
|
duration_seconds: Seconds2.nullable(),
|
|
30866
30949
|
cost_micro_usd: MicroUsdField
|
|
30867
30950
|
});
|
|
30951
|
+
var EditModeSchema = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"]);
|
|
30868
30952
|
var EditRequestSchema = external_exports.object({
|
|
30869
30953
|
video: external_exports.string().min(1),
|
|
30870
30954
|
prompt: external_exports.string().min(1).max(1e3),
|
|
30871
30955
|
references: external_exports.array(external_exports.string().min(1)).max(4).optional(),
|
|
30872
|
-
mode:
|
|
30956
|
+
mode: EditModeSchema.optional()
|
|
30873
30957
|
});
|
|
30874
30958
|
var EditFailureCodeSchema = external_exports.enum(["bad_source", "refused", "timed_out", "provider_error", "cancelled"]);
|
|
30875
30959
|
var EditJobSchema = external_exports.object({
|
|
@@ -30879,7 +30963,7 @@ var EditJobSchema = external_exports.object({
|
|
|
30879
30963
|
video: external_exports.string(),
|
|
30880
30964
|
prompt: external_exports.string(),
|
|
30881
30965
|
references: external_exports.array(external_exports.string()),
|
|
30882
|
-
mode:
|
|
30966
|
+
mode: EditModeSchema.nullable(),
|
|
30883
30967
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
30884
30968
|
error: external_exports.object({ code: EditFailureCodeSchema, message: external_exports.string() }).nullable(),
|
|
30885
30969
|
cost_micro_usd: MicroUsdField.nullable(),
|
|
@@ -32286,6 +32370,8 @@ var LedgerEntrySchema2 = external_exports.object({
|
|
|
32286
32370
|
session_id: idOf2("ses").nullable(),
|
|
32287
32371
|
agent_id: idOf2("agt").nullable(),
|
|
32288
32372
|
deployment_id: idOf2("dep").nullable(),
|
|
32373
|
+
/** The computer (`cmp_`), browser (`brw_`) or phone (`mob_`) a debit bills; `null` for anything else, and from a server older than the field. */
|
|
32374
|
+
resource_id: external_exports.string().nullable().default(null),
|
|
32289
32375
|
line_items: external_exports.array(external_exports.object({ tier: LineItemTierSchema2, amount_micro_usd: MicroUsdField2 })),
|
|
32290
32376
|
created_at: Timestamp2
|
|
32291
32377
|
});
|
|
@@ -33720,7 +33806,11 @@ var transposed2 = (a, b) => {
|
|
|
33720
33806
|
};
|
|
33721
33807
|
function toolNameProblem2(name6) {
|
|
33722
33808
|
if (BUILTIN_TOOLS2.includes(name6) || name6 in FOLLOWS_TOOL2 || PLATFORM_TOOLS2.includes(name6)) return null;
|
|
33723
|
-
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6))
|
|
33809
|
+
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6)) {
|
|
33810
|
+
const bare = [...BUILTIN_TOOLS2, ...Object.keys(FOLLOWS_TOOL2)].find((tool) => transposed2(tool, name6));
|
|
33811
|
+
const hint = bare === void 0 ? "name a built-in, or a namespaced `<namespace>.<tool>`" : `did you mean \`${bare}\`?`;
|
|
33812
|
+
return `\`${name6}\` is not a tool; ${hint}`;
|
|
33813
|
+
}
|
|
33724
33814
|
const namespace = name6.slice(0, name6.indexOf("."));
|
|
33725
33815
|
if (PLATFORM_NAMESPACES2.has(namespace)) {
|
|
33726
33816
|
const known = [...PLATFORM_TOOLS2, ...Object.keys(FOLLOWS_TOOL2)].filter((tool) => tool.startsWith(`${namespace}.`));
|
|
@@ -33731,7 +33821,8 @@ function toolNameProblem2(name6) {
|
|
|
33731
33821
|
}
|
|
33732
33822
|
var isToolName2 = (name6) => toolNameProblem2(name6) === null;
|
|
33733
33823
|
var ToolConfigSchema2 = external_exports.object({
|
|
33734
|
-
enabled:
|
|
33824
|
+
/** Absent is enabled (ADR-1911): naming a tool to set its permission already says it is wanted. */
|
|
33825
|
+
enabled: external_exports.boolean().default(true),
|
|
33735
33826
|
permission: ToolPermissionSchema2,
|
|
33736
33827
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
33737
33828
|
});
|
|
@@ -33991,7 +34082,24 @@ var CREATOR_PROGRAM2 = {
|
|
|
33991
34082
|
upload_token_minutes: 15,
|
|
33992
34083
|
skill_max_bytes: 32 * 1024,
|
|
33993
34084
|
/** The reviewer's install check (§42.5): the hard cap on its one session, never charged to the draft. */
|
|
33994
|
-
review_check_budget_micro_usd: 5e6
|
|
34085
|
+
review_check_budget_micro_usd: 5e6,
|
|
34086
|
+
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
34087
|
+
video: {
|
|
34088
|
+
min_seconds: 3,
|
|
34089
|
+
max_seconds: 15,
|
|
34090
|
+
video_max_bytes: 95 * 1024 * 1024,
|
|
34091
|
+
image_max_bytes: 10 * 1024 * 1024,
|
|
34092
|
+
characters_min: 1,
|
|
34093
|
+
characters_max: 3,
|
|
34094
|
+
/** After the first render. A refused or failed render does not use one up. */
|
|
34095
|
+
revisions: 5,
|
|
34096
|
+
/** Per doomscroll account, until one of its templates is approved. */
|
|
34097
|
+
unapproved_templates: 2,
|
|
34098
|
+
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
34099
|
+
upload_tickets: 20,
|
|
34100
|
+
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
34101
|
+
draft_retention_days: 30
|
|
34102
|
+
}
|
|
33995
34103
|
}
|
|
33996
34104
|
};
|
|
33997
34105
|
var DOOMSCROLL_PROGRAM2 = {
|
|
@@ -34035,6 +34143,8 @@ var StudioStateSchema2 = external_exports.enum([
|
|
|
34035
34143
|
"setup",
|
|
34036
34144
|
"building",
|
|
34037
34145
|
"ready",
|
|
34146
|
+
/** A `video` origin only: a version was submitted and its author is writing the skill. */
|
|
34147
|
+
"finalizing",
|
|
34038
34148
|
"in_review",
|
|
34039
34149
|
"live",
|
|
34040
34150
|
"changes_requested"
|
|
@@ -34098,10 +34208,26 @@ var StudioSkillSchema2 = SavedSkillSchema2.extend({
|
|
|
34098
34208
|
id: idOf2("skl").nullable(),
|
|
34099
34209
|
version: external_exports.number().int().positive().nullable()
|
|
34100
34210
|
});
|
|
34211
|
+
var StudioImageContentTypeSchema2 = external_exports.enum(["image/png", "image/jpeg", "image/webp"]);
|
|
34212
|
+
var StudioSourceVideoSchema2 = external_exports.object({
|
|
34213
|
+
file_id: external_exports.string().nullable(),
|
|
34214
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM2.studio.video.video_max_bytes),
|
|
34215
|
+
content_type: StudioUploadContentTypeSchema2,
|
|
34216
|
+
filename: external_exports.string().min(1).max(200),
|
|
34217
|
+
seconds: external_exports.number().nonnegative().nullable()
|
|
34218
|
+
});
|
|
34219
|
+
var CharacterPosition2 = external_exports.number().int().min(1).max(CREATOR_PROGRAM2.studio.video.characters_max);
|
|
34220
|
+
var StudioCharacterSchema2 = external_exports.object({
|
|
34221
|
+
position: CharacterPosition2,
|
|
34222
|
+
file_id: external_exports.string().nullable(),
|
|
34223
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM2.studio.video.image_max_bytes),
|
|
34224
|
+
content_type: StudioImageContentTypeSchema2,
|
|
34225
|
+
filename: external_exports.string().min(1).max(200)
|
|
34226
|
+
});
|
|
34101
34227
|
var CreatorStudioSchema2 = external_exports.object({
|
|
34102
34228
|
uploads: external_exports.array(StudioUploadSchema2).max(CREATOR_PROGRAM2.studio.uploads).default([]),
|
|
34103
|
-
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos. */
|
|
34104
|
-
origin: external_exports.enum(["upload", "links"]).default("upload"),
|
|
34229
|
+
/** `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). */
|
|
34230
|
+
origin: external_exports.enum(["upload", "links", "video"]).default("upload"),
|
|
34105
34231
|
imports: external_exports.array(StudioImportSchema2).max(CREATOR_PROGRAM2.studio.uploads).default([]),
|
|
34106
34232
|
state: StudioStateSchema2.default("setup"),
|
|
34107
34233
|
spend_micro_usd: MicroUsdField2.nonnegative().default(0),
|
|
@@ -34112,7 +34238,11 @@ var CreatorStudioSchema2 = external_exports.object({
|
|
|
34112
34238
|
/** An org build's asked sample length (§57.2, ADR-1762); `null` is `sample_seconds`. */
|
|
34113
34239
|
seconds: external_exports.number().int().min(10).max(60).nullable().default(null),
|
|
34114
34240
|
/** An org build's own catalog text: its request's description when that fits a tagline; `null` lets the judge write one. */
|
|
34115
|
-
tagline: external_exports.string().max(140).nullable().default(null)
|
|
34241
|
+
tagline: external_exports.string().max(140).nullable().default(null),
|
|
34242
|
+
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
34243
|
+
source_video: StudioSourceVideoSchema2.nullable().default(null),
|
|
34244
|
+
characters: external_exports.array(StudioCharacterSchema2).max(CREATOR_PROGRAM2.studio.video.characters_max).default([]),
|
|
34245
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
34116
34246
|
});
|
|
34117
34247
|
var CreatorTemplateListingSchema2 = external_exports.object({
|
|
34118
34248
|
listed: external_exports.boolean(),
|
|
@@ -34166,7 +34296,15 @@ var CreatorTemplateRoundSchema2 = external_exports.object({
|
|
|
34166
34296
|
spend_micro_usd: MicroUsdField2.nonnegative(),
|
|
34167
34297
|
error: external_exports.string().nullable(),
|
|
34168
34298
|
created_at: Timestamp2,
|
|
34169
|
-
finished_at: Timestamp2.nullable()
|
|
34299
|
+
finished_at: Timestamp2.nullable(),
|
|
34300
|
+
/** A `video` origin round's Mira edit and its result (migration 0172, §42.14). */
|
|
34301
|
+
edit_job_id: external_exports.string().nullable().default(null),
|
|
34302
|
+
sample_file_id: external_exports.string().nullable().default(null)
|
|
34303
|
+
});
|
|
34304
|
+
var StudioPlateSchema2 = external_exports.object({
|
|
34305
|
+
file: external_exports.string().min(1),
|
|
34306
|
+
kind: external_exports.enum(["video", "image"]),
|
|
34307
|
+
file_id: external_exports.string().min(1)
|
|
34170
34308
|
});
|
|
34171
34309
|
var NicheVersionStudioSchema2 = external_exports.object({
|
|
34172
34310
|
round: external_exports.number().int().positive(),
|
|
@@ -34175,7 +34313,9 @@ var NicheVersionStudioSchema2 = external_exports.object({
|
|
|
34175
34313
|
frames: external_exports.array(StudioFrameSchema2),
|
|
34176
34314
|
samples: external_exports.array(StudioSampleSchema2),
|
|
34177
34315
|
tagline: external_exports.string().max(140),
|
|
34178
|
-
hero_sample_index: external_exports.number().int().nonnegative()
|
|
34316
|
+
hero_sample_index: external_exports.number().int().nonnegative(),
|
|
34317
|
+
/** A `video` origin's default clip and characters. */
|
|
34318
|
+
plates: external_exports.array(StudioPlateSchema2).optional()
|
|
34179
34319
|
});
|
|
34180
34320
|
var CreatorTemplateSchema2 = external_exports.object({
|
|
34181
34321
|
id: idOf2("ctp"),
|
|
@@ -34272,13 +34412,26 @@ var CreatorAnalyticsSchema2 = external_exports.object({
|
|
|
34272
34412
|
install_windows: external_exports.array(external_exports.object({ install_id: idOf2("bpi"), from: Day3, until: Day3 })).optional()
|
|
34273
34413
|
});
|
|
34274
34414
|
var CreatorTemplateCreateKindSchema2 = external_exports.object({
|
|
34275
|
-
kind: CreatorTemplateKindSchema2.default("crew")
|
|
34415
|
+
kind: CreatorTemplateKindSchema2.default("crew"),
|
|
34416
|
+
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
34417
|
+
origin: external_exports.literal("video").optional()
|
|
34276
34418
|
});
|
|
34277
34419
|
var StudioUploadCreateSchema2 = external_exports.object({
|
|
34278
|
-
|
|
34420
|
+
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
34421
|
+
position: UploadPosition2.optional(),
|
|
34279
34422
|
filename: external_exports.string().min(1).max(200),
|
|
34280
|
-
content_type: StudioUploadContentTypeSchema2,
|
|
34281
|
-
bytes: external_exports.number().int().positive()
|
|
34423
|
+
content_type: external_exports.union([StudioUploadContentTypeSchema2, StudioImageContentTypeSchema2]),
|
|
34424
|
+
bytes: external_exports.number().int().positive()
|
|
34425
|
+
}).superRefine((body2, ctx) => {
|
|
34426
|
+
const { video, upload_max_bytes } = CREATOR_PROGRAM2.studio;
|
|
34427
|
+
const character2 = body2.purpose === "character";
|
|
34428
|
+
const issue2 = (path, message4) => ctx.addIssue({ code: "custom", path: [path], message: message4 });
|
|
34429
|
+
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
34430
|
+
if (character2 !== StudioImageContentTypeSchema2.safeParse(body2.content_type).success) {
|
|
34431
|
+
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
34432
|
+
}
|
|
34433
|
+
const max = character2 ? video.image_max_bytes : body2.purpose === "source" ? video.video_max_bytes : upload_max_bytes;
|
|
34434
|
+
if (body2.bytes > max) issue2("bytes", `this upload may be at most ${max} bytes`);
|
|
34282
34435
|
});
|
|
34283
34436
|
var StudioUploadTicketSchema2 = external_exports.object({
|
|
34284
34437
|
object: external_exports.literal("studio_upload_ticket"),
|
|
@@ -34292,6 +34445,12 @@ var StudioUploadResultSchema2 = external_exports.object({
|
|
|
34292
34445
|
template_id: idOf2("ctp"),
|
|
34293
34446
|
upload: StudioUploadSchema2
|
|
34294
34447
|
});
|
|
34448
|
+
var StudioVideoUploadResultSchema2 = external_exports.object({
|
|
34449
|
+
object: external_exports.literal("studio_upload"),
|
|
34450
|
+
template_id: idOf2("ctp"),
|
|
34451
|
+
source_video: StudioSourceVideoSchema2.nullable(),
|
|
34452
|
+
characters: external_exports.array(StudioCharacterSchema2)
|
|
34453
|
+
});
|
|
34295
34454
|
var StudioRoundCreateSchema2 = external_exports.object({
|
|
34296
34455
|
feedback: external_exports.string().min(1).max(4e3).optional(),
|
|
34297
34456
|
rights_attested: external_exports.boolean().optional()
|
|
@@ -34304,9 +34463,12 @@ var StudioBudgetSchema2 = external_exports.object({
|
|
|
34304
34463
|
var CreatorStudioViewSchema2 = external_exports.object({
|
|
34305
34464
|
object: external_exports.literal("creator_studio"),
|
|
34306
34465
|
template_id: idOf2("ctp"),
|
|
34307
|
-
|
|
34308
|
-
|
|
34309
|
-
|
|
34466
|
+
/** A `video` origin's `source_video` also carries a signed `url` once its bytes landed. */
|
|
34467
|
+
studio: CreatorStudioSchema2.extend({
|
|
34468
|
+
source_video: StudioSourceVideoSchema2.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
34469
|
+
}),
|
|
34470
|
+
/** Newest first. A `video` round also carries a signed `sample_url`. */
|
|
34471
|
+
rounds: external_exports.array(CreatorTemplateRoundSchema2.extend({ sample_url: external_exports.string().nullable().optional() })),
|
|
34310
34472
|
budget: StudioBudgetSchema2
|
|
34311
34473
|
});
|
|
34312
34474
|
var NicheSubmitSchema2 = external_exports.object({
|
|
@@ -34316,6 +34478,7 @@ var NicheSubmitSchema2 = external_exports.object({
|
|
|
34316
34478
|
hero_sample_index: external_exports.number().int().nonnegative()
|
|
34317
34479
|
})
|
|
34318
34480
|
});
|
|
34481
|
+
var VideoSubmitSchema2 = external_exports.object({ round: external_exports.number().int().positive() });
|
|
34319
34482
|
var CreatorListingPatchSchema2 = CreatorTemplateListingSchema2.partial();
|
|
34320
34483
|
var CreatorListingSchema2 = external_exports.object({
|
|
34321
34484
|
object: external_exports.literal("creator_listing"),
|
|
@@ -34535,6 +34698,10 @@ var EventTypeSchema2 = external_exports.enum([
|
|
|
34535
34698
|
"span.harness_build.end",
|
|
34536
34699
|
"span.box_resume.start",
|
|
34537
34700
|
"span.box_resume.end",
|
|
34701
|
+
"span.tools_resolve.start",
|
|
34702
|
+
"span.tools_resolve.end",
|
|
34703
|
+
"span.model_gate.start",
|
|
34704
|
+
"span.model_gate.end",
|
|
34538
34705
|
/**
|
|
34539
34706
|
* A delegated thread's lifecycle, on the **coordinator's** stream (§28). The child's own
|
|
34540
34707
|
* `ses_…` rides inside `data.thread_id` — the event schema gains no field and `vetta.event` gains
|
|
@@ -36108,11 +36275,12 @@ var MusicGenerationSchema2 = external_exports.object({
|
|
|
36108
36275
|
duration_seconds: Seconds22.nullable(),
|
|
36109
36276
|
cost_micro_usd: MicroUsdField2
|
|
36110
36277
|
});
|
|
36278
|
+
var EditModeSchema2 = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"]);
|
|
36111
36279
|
var EditRequestSchema2 = external_exports.object({
|
|
36112
36280
|
video: external_exports.string().min(1),
|
|
36113
36281
|
prompt: external_exports.string().min(1).max(1e3),
|
|
36114
36282
|
references: external_exports.array(external_exports.string().min(1)).max(4).optional(),
|
|
36115
|
-
mode:
|
|
36283
|
+
mode: EditModeSchema2.optional()
|
|
36116
36284
|
});
|
|
36117
36285
|
var EditFailureCodeSchema2 = external_exports.enum(["bad_source", "refused", "timed_out", "provider_error", "cancelled"]);
|
|
36118
36286
|
var EditJobSchema2 = external_exports.object({
|
|
@@ -36122,7 +36290,7 @@ var EditJobSchema2 = external_exports.object({
|
|
|
36122
36290
|
video: external_exports.string(),
|
|
36123
36291
|
prompt: external_exports.string(),
|
|
36124
36292
|
references: external_exports.array(external_exports.string()),
|
|
36125
|
-
mode:
|
|
36293
|
+
mode: EditModeSchema2.nullable(),
|
|
36126
36294
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
36127
36295
|
error: external_exports.object({ code: EditFailureCodeSchema2, message: external_exports.string() }).nullable(),
|
|
36128
36296
|
cost_micro_usd: MicroUsdField2.nullable(),
|
|
@@ -37096,6 +37264,11 @@ function tolerantPage(item) {
|
|
|
37096
37264
|
});
|
|
37097
37265
|
}
|
|
37098
37266
|
var DOT_SEGMENT = /^(?:\.|%2e){1,2}$/i;
|
|
37267
|
+
function pathId(value, name6) {
|
|
37268
|
+
if (value !== void 0 && value !== null && String(value) !== "") return encodeURIComponent(value);
|
|
37269
|
+
const message4 = `${name6} is required`;
|
|
37270
|
+
throw new ApiError(400, { type: "invalid_request", code: "validation_failed", message: message4, param: name6, request_id: "" });
|
|
37271
|
+
}
|
|
37099
37272
|
function url2(config2, call) {
|
|
37100
37273
|
const segments = call.path.split("/");
|
|
37101
37274
|
if (segments.some((segment) => DOT_SEGMENT.test(segment)) || segments.at(-1) === "") {
|
|
@@ -37924,77 +38097,77 @@ var domains = (config2) => ({
|
|
|
37924
38097
|
delete: (id) => request(config2, DeletedSchema, { method: "DELETE", path: `/v1/domains/${encodeURIComponent(id)}` })
|
|
37925
38098
|
});
|
|
37926
38099
|
var emails = (config2) => ({
|
|
37927
|
-
create: (identityId, body2) => request(config2, EmailInboxSchema2, {
|
|
38100
|
+
create: async (identityId, body2) => request(config2, EmailInboxSchema2, {
|
|
37928
38101
|
method: "POST",
|
|
37929
|
-
path: `/v1/identities/${
|
|
38102
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/emails`,
|
|
37930
38103
|
body: body2
|
|
37931
38104
|
}),
|
|
37932
|
-
list: (identityId, query2 = {}) => request(config2, page(EmailInboxSchema2), {
|
|
38105
|
+
list: async (identityId, query2 = {}) => request(config2, page(EmailInboxSchema2), {
|
|
37933
38106
|
method: "GET",
|
|
37934
|
-
path: `/v1/identities/${
|
|
38107
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/emails`,
|
|
37935
38108
|
query: query2
|
|
37936
38109
|
}),
|
|
37937
38110
|
/** Turn on or off whether mail to the inbox wakes its owner. An inbox from before the wake shipped is off. */
|
|
37938
|
-
update: (identityId, inboxId, body2) => request(config2, EmailInboxSchema2, {
|
|
38111
|
+
update: async (identityId, inboxId, body2) => request(config2, EmailInboxSchema2, {
|
|
37939
38112
|
method: "PATCH",
|
|
37940
|
-
path: `/v1/identities/${
|
|
38113
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/emails/${encodeURIComponent(inboxId)}`,
|
|
37941
38114
|
body: body2
|
|
37942
38115
|
}),
|
|
37943
|
-
delete: (identityId, inboxId) => request(config2, DeletedSchema, {
|
|
38116
|
+
delete: async (identityId, inboxId) => request(config2, DeletedSchema, {
|
|
37944
38117
|
method: "DELETE",
|
|
37945
|
-
path: `/v1/identities/${
|
|
38118
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/emails/${encodeURIComponent(inboxId)}`
|
|
37946
38119
|
}),
|
|
37947
38120
|
/** Gated on the domain's `dns_status`; a premature send is a retryable `job_not_ready`. */
|
|
37948
|
-
send: (identityId, inboxId, body2) => request(config2, EmailSendSchema, {
|
|
38121
|
+
send: async (identityId, inboxId, body2) => request(config2, EmailSendSchema, {
|
|
37949
38122
|
method: "POST",
|
|
37950
|
-
path: `/v1/identities/${
|
|
38123
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/emails/${encodeURIComponent(inboxId)}/send`,
|
|
37951
38124
|
body: body2
|
|
37952
38125
|
}),
|
|
37953
38126
|
/** Everything that arrived for this persona, both channels unless one is named. */
|
|
37954
|
-
messages: (identityId, query2 = {}) => request(config2, page(InboundMessageSchema2), {
|
|
38127
|
+
messages: async (identityId, query2 = {}) => request(config2, page(InboundMessageSchema2), {
|
|
37955
38128
|
method: "GET",
|
|
37956
|
-
path: `/v1/identities/${
|
|
38129
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/messages`,
|
|
37957
38130
|
query: query2
|
|
37958
38131
|
}),
|
|
37959
38132
|
/** Mark one arrived message read or unread; a message already read keeps its first time. */
|
|
37960
|
-
markRead: (identityId, messageId, read) => request(config2, InboundMessageSchema2, {
|
|
38133
|
+
markRead: async (identityId, messageId, read) => request(config2, InboundMessageSchema2, {
|
|
37961
38134
|
method: "POST",
|
|
37962
|
-
path: `/v1/identities/${
|
|
38135
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/messages/${encodeURIComponent(messageId)}/read`,
|
|
37963
38136
|
body: { read }
|
|
37964
38137
|
}),
|
|
37965
38138
|
/** What the persona sent, newest first — through the API and through its agent alike. */
|
|
37966
|
-
sent: (identityId, query2 = {}) => request(config2, page(OutboundMessageSchema2), {
|
|
38139
|
+
sent: async (identityId, query2 = {}) => request(config2, page(OutboundMessageSchema2), {
|
|
37967
38140
|
method: "GET",
|
|
37968
|
-
path: `/v1/identities/${
|
|
38141
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/sent`,
|
|
37969
38142
|
query: query2
|
|
37970
38143
|
})
|
|
37971
38144
|
});
|
|
37972
38145
|
var phones = (config2) => ({
|
|
37973
38146
|
/** 202, not 201: the number exists and can receive, but outbound waits on a carrier decision. */
|
|
37974
|
-
provision: (identityId, body2) => request(config2, PhoneNumberSchema2, {
|
|
38147
|
+
provision: async (identityId, body2) => request(config2, PhoneNumberSchema2, {
|
|
37975
38148
|
method: "POST",
|
|
37976
|
-
path: `/v1/identities/${
|
|
38149
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/phones`,
|
|
37977
38150
|
body: body2
|
|
37978
38151
|
}),
|
|
37979
|
-
list: (identityId, query2 = {}) => request(config2, page(PhoneNumberSchema2), {
|
|
38152
|
+
list: async (identityId, query2 = {}) => request(config2, page(PhoneNumberSchema2), {
|
|
37980
38153
|
method: "GET",
|
|
37981
|
-
path: `/v1/identities/${
|
|
38154
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/phones`,
|
|
37982
38155
|
query: query2
|
|
37983
38156
|
}),
|
|
37984
38157
|
/** Set, or clear with `null`, the agent this number's inbound texts are for. */
|
|
37985
|
-
update: (identityId, phoneId, body2) => request(config2, PhoneNumberSchema2, {
|
|
38158
|
+
update: async (identityId, phoneId, body2) => request(config2, PhoneNumberSchema2, {
|
|
37986
38159
|
method: "PATCH",
|
|
37987
|
-
path: `/v1/identities/${
|
|
38160
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/phones/${encodeURIComponent(phoneId)}`,
|
|
37988
38161
|
body: body2
|
|
37989
38162
|
}),
|
|
37990
|
-
release: (identityId, phoneId) => request(config2, DeletedSchema, {
|
|
38163
|
+
release: async (identityId, phoneId) => request(config2, DeletedSchema, {
|
|
37991
38164
|
method: "DELETE",
|
|
37992
|
-
path: `/v1/identities/${
|
|
38165
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/phones/${encodeURIComponent(phoneId)}`
|
|
37993
38166
|
}),
|
|
37994
38167
|
/** Refused with `compliance_pending` until the campaign is approved. That is a carrier rule. */
|
|
37995
|
-
send: (identityId, phoneId, body2) => request(config2, SmsSendSchema, {
|
|
38168
|
+
send: async (identityId, phoneId, body2) => request(config2, SmsSendSchema, {
|
|
37996
38169
|
method: "POST",
|
|
37997
|
-
path: `/v1/identities/${
|
|
38170
|
+
path: `/v1/identities/${pathId(identityId, "identityId")}/phones/${encodeURIComponent(phoneId)}/send`,
|
|
37998
38171
|
body: body2
|
|
37999
38172
|
})
|
|
38000
38173
|
});
|
|
@@ -38557,7 +38730,7 @@ var wallet = (config2) => {
|
|
|
38557
38730
|
updatePolicy: (identity3, body2, select3 = {}) => request(config2, WalletSchema2, { method: "PATCH", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/policy`, body: body2, query: select3 }),
|
|
38558
38731
|
freeze: (identity3, select3 = {}) => request(config2, WalletSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/freeze`, query: select3 }),
|
|
38559
38732
|
unfreeze: (identity3, select3 = {}) => request(config2, WalletSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/unfreeze`, query: select3 }),
|
|
38560
|
-
/** The
|
|
38733
|
+
/** The money moves (and `pay`) take an `idempotencyKey` so a retry of one move reuses its key and moves the money once. */
|
|
38561
38734
|
fund: (identity3, body2, select3 = {}, opts = {}) => request(config2, WalletTransactionSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/fund`, body: body2, query: select3, headers: keyed(opts) }),
|
|
38562
38735
|
transfer: (identity3, body2, select3 = {}, opts = {}) => request(config2, WalletTransactionSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/transfer`, body: body2, query: select3, headers: keyed(opts) }),
|
|
38563
38736
|
sweep: (identity3, body2 = {}, select3 = {}, opts = {}) => request(config2, WalletTransactionSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/sweep`, body: body2, query: select3, headers: keyed(opts) }),
|
|
@@ -38569,7 +38742,7 @@ var wallet = (config2) => {
|
|
|
38569
38742
|
query: { ...query2, kind: "pay" }
|
|
38570
38743
|
}),
|
|
38571
38744
|
quote: (identity3, body2, select3 = {}) => request(config2, WalletQuoteSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/quote`, body: body2, query: select3 }),
|
|
38572
|
-
pay: (identity3, body2, select3 = {}) => request(config2, WalletPaymentSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/pay`, body: body2, query: select3 })
|
|
38745
|
+
pay: (identity3, body2, select3 = {}, opts = {}) => request(config2, WalletPaymentSchema2, { method: "POST", path: `/v1/identities/${encodeURIComponent(identity3)}/wallet/pay`, body: body2, query: select3, headers: keyed(opts) })
|
|
38573
38746
|
};
|
|
38574
38747
|
};
|
|
38575
38748
|
var GrantSchema = external_exports.object({
|
|
@@ -38764,65 +38937,65 @@ var SocialWorkspaceSchema = external_exports.object({
|
|
|
38764
38937
|
});
|
|
38765
38938
|
var SocialPortalSchema = external_exports.object({ object: external_exports.literal("social_portal_link"), url: external_exports.url() });
|
|
38766
38939
|
var setup = (config2) => ({
|
|
38767
|
-
activate: (identity3) => request(config2, SocialWorkspaceSchema, {
|
|
38940
|
+
activate: async (identity3) => request(config2, SocialWorkspaceSchema, {
|
|
38768
38941
|
method: "POST",
|
|
38769
|
-
path: `/v1/identities/${
|
|
38942
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/activate`
|
|
38770
38943
|
}),
|
|
38771
|
-
status: (identity3) => request(config2, SocialWorkspaceSchema, {
|
|
38944
|
+
status: async (identity3) => request(config2, SocialWorkspaceSchema, {
|
|
38772
38945
|
method: "GET",
|
|
38773
|
-
path: `/v1/identities/${
|
|
38946
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social`
|
|
38774
38947
|
}),
|
|
38775
|
-
portal: (identity3, body2 = {}) => request(config2, SocialPortalSchema, {
|
|
38948
|
+
portal: async (identity3, body2 = {}) => request(config2, SocialPortalSchema, {
|
|
38776
38949
|
method: "POST",
|
|
38777
|
-
path: `/v1/identities/${
|
|
38950
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/portal`,
|
|
38778
38951
|
body: body2
|
|
38779
38952
|
}),
|
|
38780
|
-
accounts: (identity3, query2 = {}) => request(config2, page(SocialAccountSchema2), {
|
|
38953
|
+
accounts: async (identity3, query2 = {}) => request(config2, page(SocialAccountSchema2), {
|
|
38781
38954
|
method: "GET",
|
|
38782
|
-
path: `/v1/identities/${
|
|
38955
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/accounts`,
|
|
38783
38956
|
query: query2
|
|
38784
38957
|
}),
|
|
38785
|
-
accountAnalytics: (identity3, account) => request(config2, SocialAnalyticsSchema2, {
|
|
38958
|
+
accountAnalytics: async (identity3, account) => request(config2, SocialAnalyticsSchema2, {
|
|
38786
38959
|
method: "GET",
|
|
38787
|
-
path: `/v1/identities/${
|
|
38960
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/accounts/${encodeURIComponent(account)}/analytics`
|
|
38788
38961
|
}),
|
|
38789
|
-
upload: (identity3, body2) => request(config2, SocialUploadSchema2, {
|
|
38962
|
+
upload: async (identity3, body2) => request(config2, SocialUploadSchema2, {
|
|
38790
38963
|
method: "POST",
|
|
38791
|
-
path: `/v1/identities/${
|
|
38964
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/uploads`,
|
|
38792
38965
|
body: body2
|
|
38793
38966
|
})
|
|
38794
38967
|
});
|
|
38795
38968
|
var publishing = (config2) => ({
|
|
38796
|
-
createPost: (identity3, body2) => request(config2, SocialPostSchema2, {
|
|
38969
|
+
createPost: async (identity3, body2) => request(config2, SocialPostSchema2, {
|
|
38797
38970
|
method: "POST",
|
|
38798
|
-
path: `/v1/identities/${
|
|
38971
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/posts`,
|
|
38799
38972
|
body: body2
|
|
38800
38973
|
}),
|
|
38801
|
-
getPost: (identity3, post2) => request(config2, SocialPostSchema2, {
|
|
38974
|
+
getPost: async (identity3, post2) => request(config2, SocialPostSchema2, {
|
|
38802
38975
|
method: "GET",
|
|
38803
|
-
path: `/v1/identities/${
|
|
38976
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/posts/${encodeURIComponent(post2)}`
|
|
38804
38977
|
}),
|
|
38805
|
-
deletePost: (identity3, post2) => request(config2, DeletedSchema, {
|
|
38978
|
+
deletePost: async (identity3, post2) => request(config2, DeletedSchema, {
|
|
38806
38979
|
method: "DELETE",
|
|
38807
|
-
path: `/v1/identities/${
|
|
38980
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/posts/${encodeURIComponent(post2)}`
|
|
38808
38981
|
}),
|
|
38809
|
-
postAnalytics: (identity3, post2) => request(config2, SocialAnalyticsSchema2, {
|
|
38982
|
+
postAnalytics: async (identity3, post2) => request(config2, SocialAnalyticsSchema2, {
|
|
38810
38983
|
method: "GET",
|
|
38811
|
-
path: `/v1/identities/${
|
|
38984
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/posts/${encodeURIComponent(post2)}/analytics`
|
|
38812
38985
|
}),
|
|
38813
38986
|
/**
|
|
38814
38987
|
* `GET /v1/posts` — every post the company files, across identities and sessions (§27.1): the
|
|
38815
38988
|
* `social.post` calls waiting on a person (`pending`), and the ones sent, with their latest numbers.
|
|
38816
38989
|
* `reconcile: false` lists what is stored without asking the provider about due posts first.
|
|
38817
38990
|
*/
|
|
38818
|
-
listPosts: ({ reconcile, ...query2 } = {}) => request(config2, page(PostSchema2), {
|
|
38991
|
+
listPosts: async ({ reconcile, ...query2 } = {}) => request(config2, page(PostSchema2), {
|
|
38819
38992
|
method: "GET",
|
|
38820
38993
|
path: "/v1/posts",
|
|
38821
38994
|
query: { ...query2, ...reconcile === void 0 ? {} : { reconcile: String(reconcile) } }
|
|
38822
38995
|
}),
|
|
38823
|
-
comments: (identity3, post2, query2 = {}) => request(config2, page(SocialCommentSchema2), {
|
|
38996
|
+
comments: async (identity3, post2, query2 = {}) => request(config2, page(SocialCommentSchema2), {
|
|
38824
38997
|
method: "GET",
|
|
38825
|
-
path: `/v1/identities/${
|
|
38998
|
+
path: `/v1/identities/${pathId(identity3, "identity")}/social/posts/${encodeURIComponent(post2)}/comments`,
|
|
38826
38999
|
query: query2
|
|
38827
39000
|
})
|
|
38828
39001
|
});
|
|
@@ -38981,10 +39154,10 @@ async function* streamFrames(config2, schema, call) {
|
|
|
38981
39154
|
yield parsed.data;
|
|
38982
39155
|
}
|
|
38983
39156
|
}
|
|
38984
|
-
function
|
|
38985
|
-
if (session2.status === "running" || session2.status === "queued") return
|
|
38986
|
-
if (throughGrades && session2.stop_reason === "awaiting_delegation") return
|
|
38987
|
-
return session2.last_seq
|
|
39157
|
+
function settledAt(session2, throughGrades) {
|
|
39158
|
+
if (session2.status === "running" || session2.status === "queued") return null;
|
|
39159
|
+
if (throughGrades && session2.stop_reason === "awaiting_delegation") return null;
|
|
39160
|
+
return session2.last_seq;
|
|
38988
39161
|
}
|
|
38989
39162
|
async function* streamEvents(config2, sessionId, options = {}) {
|
|
38990
39163
|
const maxRetries = options.maxRetries ?? 5;
|
|
@@ -38993,7 +39166,8 @@ async function* streamEvents(config2, sessionId, options = {}) {
|
|
|
38993
39166
|
let failures = 0;
|
|
38994
39167
|
const grading = /* @__PURE__ */ new Set();
|
|
38995
39168
|
let held = false;
|
|
38996
|
-
|
|
39169
|
+
const endAt = lastSeq > 0 ? settledAt(await sessions(config2).get(sessionId), throughGrades) : null;
|
|
39170
|
+
if (endAt !== null && endAt <= lastSeq) return;
|
|
38997
39171
|
for (; ; ) {
|
|
38998
39172
|
try {
|
|
38999
39173
|
const call = {
|
|
@@ -39011,6 +39185,7 @@ async function* streamEvents(config2, sessionId, options = {}) {
|
|
|
39011
39185
|
if (event.type === "outcome.evaluation.started") grading.add(gradeKey(event));
|
|
39012
39186
|
if (event.type === "outcome.evaluation.completed") grading.delete(gradeKey(event));
|
|
39013
39187
|
yield event;
|
|
39188
|
+
if (endAt !== null && event.seq >= endAt) return;
|
|
39014
39189
|
if (event.type === "session.idle") {
|
|
39015
39190
|
held = throughGrades && grading.size > 0 && parkedOnGrade(event);
|
|
39016
39191
|
if (!held) return;
|
|
@@ -39080,7 +39255,7 @@ var computers = (config2) => ({
|
|
|
39080
39255
|
path: `/v1/computers/${encodeURIComponent(id)}/exec`,
|
|
39081
39256
|
body: { command, ...timeoutMs === void 0 ? {} : { timeout_ms: timeoutMs } }
|
|
39082
39257
|
}),
|
|
39083
|
-
/** Paused bills
|
|
39258
|
+
/** Paused bills nothing (disk is never metered) — the first efficiency lever (`memory/context.md`). */
|
|
39084
39259
|
pause: (id) => request(config2, ComputerSchema2, { method: "POST", path: `/v1/computers/${encodeURIComponent(id)}/pause`, body: {} }),
|
|
39085
39260
|
resume: (id) => request(config2, ComputerSchema2, { method: "POST", path: `/v1/computers/${encodeURIComponent(id)}/resume`, body: {} }),
|
|
39086
39261
|
/** An agent's computer only (§41.8): a person holds it, and its sessions wait until it is handed back. */
|
|
@@ -41065,6 +41240,8 @@ var LedgerEntrySchema3 = external_exports.object({
|
|
|
41065
41240
|
session_id: idOf3("ses").nullable(),
|
|
41066
41241
|
agent_id: idOf3("agt").nullable(),
|
|
41067
41242
|
deployment_id: idOf3("dep").nullable(),
|
|
41243
|
+
/** The computer (`cmp_`), browser (`brw_`) or phone (`mob_`) a debit bills; `null` for anything else, and from a server older than the field. */
|
|
41244
|
+
resource_id: external_exports.string().nullable().default(null),
|
|
41068
41245
|
line_items: external_exports.array(external_exports.object({ tier: LineItemTierSchema3, amount_micro_usd: MicroUsdField3 })),
|
|
41069
41246
|
created_at: Timestamp3
|
|
41070
41247
|
});
|
|
@@ -42609,7 +42786,11 @@ var transposed3 = (a, b) => {
|
|
|
42609
42786
|
};
|
|
42610
42787
|
function toolNameProblem3(name6) {
|
|
42611
42788
|
if (BUILTIN_TOOLS3.includes(name6) || name6 in FOLLOWS_TOOL3 || PLATFORM_TOOLS3.includes(name6)) return null;
|
|
42612
|
-
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6))
|
|
42789
|
+
if (!/^[a-z0-9_-]+(\.[a-z0-9_-]+)+$/i.test(name6)) {
|
|
42790
|
+
const bare = [...BUILTIN_TOOLS3, ...Object.keys(FOLLOWS_TOOL3)].find((tool) => transposed3(tool, name6));
|
|
42791
|
+
const hint = bare === void 0 ? "name a built-in, or a namespaced `<namespace>.<tool>`" : `did you mean \`${bare}\`?`;
|
|
42792
|
+
return `\`${name6}\` is not a tool; ${hint}`;
|
|
42793
|
+
}
|
|
42613
42794
|
const namespace = name6.slice(0, name6.indexOf("."));
|
|
42614
42795
|
if (PLATFORM_NAMESPACES3.has(namespace)) {
|
|
42615
42796
|
const known = [...PLATFORM_TOOLS3, ...Object.keys(FOLLOWS_TOOL3)].filter((tool) => tool.startsWith(`${namespace}.`));
|
|
@@ -42619,7 +42800,8 @@ function toolNameProblem3(name6) {
|
|
|
42619
42800
|
return meant === void 0 ? null : `\`${name6}\` is not a tool; did you mean \`${meant}${name6.slice(namespace.length)}\`?`;
|
|
42620
42801
|
}
|
|
42621
42802
|
var ToolConfigSchema3 = external_exports.object({
|
|
42622
|
-
enabled:
|
|
42803
|
+
/** Absent is enabled (ADR-1911): naming a tool to set its permission already says it is wanted. */
|
|
42804
|
+
enabled: external_exports.boolean().default(true),
|
|
42623
42805
|
permission: ToolPermissionSchema3,
|
|
42624
42806
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
42625
42807
|
});
|
|
@@ -42906,7 +43088,24 @@ var CREATOR_PROGRAM3 = {
|
|
|
42906
43088
|
upload_token_minutes: 15,
|
|
42907
43089
|
skill_max_bytes: 32 * 1024,
|
|
42908
43090
|
/** The reviewer's install check (§42.5): the hard cap on its one session, never charged to the draft. */
|
|
42909
|
-
review_check_budget_micro_usd: 5e6
|
|
43091
|
+
review_check_budget_micro_usd: 5e6,
|
|
43092
|
+
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
43093
|
+
video: {
|
|
43094
|
+
min_seconds: 3,
|
|
43095
|
+
max_seconds: 15,
|
|
43096
|
+
video_max_bytes: 95 * 1024 * 1024,
|
|
43097
|
+
image_max_bytes: 10 * 1024 * 1024,
|
|
43098
|
+
characters_min: 1,
|
|
43099
|
+
characters_max: 3,
|
|
43100
|
+
/** After the first render. A refused or failed render does not use one up. */
|
|
43101
|
+
revisions: 5,
|
|
43102
|
+
/** Per doomscroll account, until one of its templates is approved. */
|
|
43103
|
+
unapproved_templates: 2,
|
|
43104
|
+
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
43105
|
+
upload_tickets: 20,
|
|
43106
|
+
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
43107
|
+
draft_retention_days: 30
|
|
43108
|
+
}
|
|
42910
43109
|
}
|
|
42911
43110
|
};
|
|
42912
43111
|
var DOOMSCROLL_PROGRAM3 = {
|
|
@@ -42950,6 +43149,8 @@ var StudioStateSchema3 = external_exports.enum([
|
|
|
42950
43149
|
"setup",
|
|
42951
43150
|
"building",
|
|
42952
43151
|
"ready",
|
|
43152
|
+
/** A `video` origin only: a version was submitted and its author is writing the skill. */
|
|
43153
|
+
"finalizing",
|
|
42953
43154
|
"in_review",
|
|
42954
43155
|
"live",
|
|
42955
43156
|
"changes_requested"
|
|
@@ -43013,10 +43214,26 @@ var StudioSkillSchema3 = SavedSkillSchema3.extend({
|
|
|
43013
43214
|
id: idOf3("skl").nullable(),
|
|
43014
43215
|
version: external_exports.number().int().positive().nullable()
|
|
43015
43216
|
});
|
|
43217
|
+
var StudioImageContentTypeSchema3 = external_exports.enum(["image/png", "image/jpeg", "image/webp"]);
|
|
43218
|
+
var StudioSourceVideoSchema3 = external_exports.object({
|
|
43219
|
+
file_id: external_exports.string().nullable(),
|
|
43220
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM3.studio.video.video_max_bytes),
|
|
43221
|
+
content_type: StudioUploadContentTypeSchema3,
|
|
43222
|
+
filename: external_exports.string().min(1).max(200),
|
|
43223
|
+
seconds: external_exports.number().nonnegative().nullable()
|
|
43224
|
+
});
|
|
43225
|
+
var CharacterPosition3 = external_exports.number().int().min(1).max(CREATOR_PROGRAM3.studio.video.characters_max);
|
|
43226
|
+
var StudioCharacterSchema3 = external_exports.object({
|
|
43227
|
+
position: CharacterPosition3,
|
|
43228
|
+
file_id: external_exports.string().nullable(),
|
|
43229
|
+
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM3.studio.video.image_max_bytes),
|
|
43230
|
+
content_type: StudioImageContentTypeSchema3,
|
|
43231
|
+
filename: external_exports.string().min(1).max(200)
|
|
43232
|
+
});
|
|
43016
43233
|
var CreatorStudioSchema3 = external_exports.object({
|
|
43017
43234
|
uploads: external_exports.array(StudioUploadSchema3).max(CREATOR_PROGRAM3.studio.uploads).default([]),
|
|
43018
|
-
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos. */
|
|
43019
|
-
origin: external_exports.enum(["upload", "links"]).default("upload"),
|
|
43235
|
+
/** `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). */
|
|
43236
|
+
origin: external_exports.enum(["upload", "links", "video"]).default("upload"),
|
|
43020
43237
|
imports: external_exports.array(StudioImportSchema3).max(CREATOR_PROGRAM3.studio.uploads).default([]),
|
|
43021
43238
|
state: StudioStateSchema3.default("setup"),
|
|
43022
43239
|
spend_micro_usd: MicroUsdField3.nonnegative().default(0),
|
|
@@ -43027,7 +43244,11 @@ var CreatorStudioSchema3 = external_exports.object({
|
|
|
43027
43244
|
/** An org build's asked sample length (§57.2, ADR-1762); `null` is `sample_seconds`. */
|
|
43028
43245
|
seconds: external_exports.number().int().min(10).max(60).nullable().default(null),
|
|
43029
43246
|
/** An org build's own catalog text: its request's description when that fits a tagline; `null` lets the judge write one. */
|
|
43030
|
-
tagline: external_exports.string().max(140).nullable().default(null)
|
|
43247
|
+
tagline: external_exports.string().max(140).nullable().default(null),
|
|
43248
|
+
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
43249
|
+
source_video: StudioSourceVideoSchema3.nullable().default(null),
|
|
43250
|
+
characters: external_exports.array(StudioCharacterSchema3).max(CREATOR_PROGRAM3.studio.video.characters_max).default([]),
|
|
43251
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
43031
43252
|
});
|
|
43032
43253
|
var CreatorTemplateListingSchema3 = external_exports.object({
|
|
43033
43254
|
listed: external_exports.boolean(),
|
|
@@ -43081,7 +43302,15 @@ var CreatorTemplateRoundSchema3 = external_exports.object({
|
|
|
43081
43302
|
spend_micro_usd: MicroUsdField3.nonnegative(),
|
|
43082
43303
|
error: external_exports.string().nullable(),
|
|
43083
43304
|
created_at: Timestamp3,
|
|
43084
|
-
finished_at: Timestamp3.nullable()
|
|
43305
|
+
finished_at: Timestamp3.nullable(),
|
|
43306
|
+
/** A `video` origin round's Mira edit and its result (migration 0172, §42.14). */
|
|
43307
|
+
edit_job_id: external_exports.string().nullable().default(null),
|
|
43308
|
+
sample_file_id: external_exports.string().nullable().default(null)
|
|
43309
|
+
});
|
|
43310
|
+
var StudioPlateSchema3 = external_exports.object({
|
|
43311
|
+
file: external_exports.string().min(1),
|
|
43312
|
+
kind: external_exports.enum(["video", "image"]),
|
|
43313
|
+
file_id: external_exports.string().min(1)
|
|
43085
43314
|
});
|
|
43086
43315
|
var NicheVersionStudioSchema3 = external_exports.object({
|
|
43087
43316
|
round: external_exports.number().int().positive(),
|
|
@@ -43090,7 +43319,9 @@ var NicheVersionStudioSchema3 = external_exports.object({
|
|
|
43090
43319
|
frames: external_exports.array(StudioFrameSchema3),
|
|
43091
43320
|
samples: external_exports.array(StudioSampleSchema3),
|
|
43092
43321
|
tagline: external_exports.string().max(140),
|
|
43093
|
-
hero_sample_index: external_exports.number().int().nonnegative()
|
|
43322
|
+
hero_sample_index: external_exports.number().int().nonnegative(),
|
|
43323
|
+
/** A `video` origin's default clip and characters. */
|
|
43324
|
+
plates: external_exports.array(StudioPlateSchema3).optional()
|
|
43094
43325
|
});
|
|
43095
43326
|
var CreatorTemplateSchema3 = external_exports.object({
|
|
43096
43327
|
id: idOf3("ctp"),
|
|
@@ -43187,13 +43418,26 @@ var CreatorAnalyticsSchema3 = external_exports.object({
|
|
|
43187
43418
|
install_windows: external_exports.array(external_exports.object({ install_id: idOf3("bpi"), from: Day4, until: Day4 })).optional()
|
|
43188
43419
|
});
|
|
43189
43420
|
var CreatorTemplateCreateKindSchema3 = external_exports.object({
|
|
43190
|
-
kind: CreatorTemplateKindSchema3.default("crew")
|
|
43421
|
+
kind: CreatorTemplateKindSchema3.default("crew"),
|
|
43422
|
+
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
43423
|
+
origin: external_exports.literal("video").optional()
|
|
43191
43424
|
});
|
|
43192
43425
|
var StudioUploadCreateSchema3 = external_exports.object({
|
|
43193
|
-
|
|
43426
|
+
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
43427
|
+
position: UploadPosition3.optional(),
|
|
43194
43428
|
filename: external_exports.string().min(1).max(200),
|
|
43195
|
-
content_type: StudioUploadContentTypeSchema3,
|
|
43196
|
-
bytes: external_exports.number().int().positive()
|
|
43429
|
+
content_type: external_exports.union([StudioUploadContentTypeSchema3, StudioImageContentTypeSchema3]),
|
|
43430
|
+
bytes: external_exports.number().int().positive()
|
|
43431
|
+
}).superRefine((body2, ctx) => {
|
|
43432
|
+
const { video, upload_max_bytes } = CREATOR_PROGRAM3.studio;
|
|
43433
|
+
const character2 = body2.purpose === "character";
|
|
43434
|
+
const issue2 = (path, message32) => ctx.addIssue({ code: "custom", path: [path], message: message32 });
|
|
43435
|
+
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
43436
|
+
if (character2 !== StudioImageContentTypeSchema3.safeParse(body2.content_type).success) {
|
|
43437
|
+
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
43438
|
+
}
|
|
43439
|
+
const max = character2 ? video.image_max_bytes : body2.purpose === "source" ? video.video_max_bytes : upload_max_bytes;
|
|
43440
|
+
if (body2.bytes > max) issue2("bytes", `this upload may be at most ${max} bytes`);
|
|
43197
43441
|
});
|
|
43198
43442
|
var StudioUploadTicketSchema3 = external_exports.object({
|
|
43199
43443
|
object: external_exports.literal("studio_upload_ticket"),
|
|
@@ -43207,6 +43451,12 @@ var StudioUploadResultSchema3 = external_exports.object({
|
|
|
43207
43451
|
template_id: idOf3("ctp"),
|
|
43208
43452
|
upload: StudioUploadSchema3
|
|
43209
43453
|
});
|
|
43454
|
+
var StudioVideoUploadResultSchema3 = external_exports.object({
|
|
43455
|
+
object: external_exports.literal("studio_upload"),
|
|
43456
|
+
template_id: idOf3("ctp"),
|
|
43457
|
+
source_video: StudioSourceVideoSchema3.nullable(),
|
|
43458
|
+
characters: external_exports.array(StudioCharacterSchema3)
|
|
43459
|
+
});
|
|
43210
43460
|
var StudioRoundCreateSchema3 = external_exports.object({
|
|
43211
43461
|
feedback: external_exports.string().min(1).max(4e3).optional(),
|
|
43212
43462
|
rights_attested: external_exports.boolean().optional()
|
|
@@ -43219,9 +43469,12 @@ var StudioBudgetSchema3 = external_exports.object({
|
|
|
43219
43469
|
var CreatorStudioViewSchema3 = external_exports.object({
|
|
43220
43470
|
object: external_exports.literal("creator_studio"),
|
|
43221
43471
|
template_id: idOf3("ctp"),
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
|
|
43472
|
+
/** A `video` origin's `source_video` also carries a signed `url` once its bytes landed. */
|
|
43473
|
+
studio: CreatorStudioSchema3.extend({
|
|
43474
|
+
source_video: StudioSourceVideoSchema3.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
43475
|
+
}),
|
|
43476
|
+
/** Newest first. A `video` round also carries a signed `sample_url`. */
|
|
43477
|
+
rounds: external_exports.array(CreatorTemplateRoundSchema3.extend({ sample_url: external_exports.string().nullable().optional() })),
|
|
43225
43478
|
budget: StudioBudgetSchema3
|
|
43226
43479
|
});
|
|
43227
43480
|
var NicheSubmitSchema3 = external_exports.object({
|
|
@@ -43231,6 +43484,7 @@ var NicheSubmitSchema3 = external_exports.object({
|
|
|
43231
43484
|
hero_sample_index: external_exports.number().int().nonnegative()
|
|
43232
43485
|
})
|
|
43233
43486
|
});
|
|
43487
|
+
var VideoSubmitSchema3 = external_exports.object({ round: external_exports.number().int().positive() });
|
|
43234
43488
|
var CreatorListingPatchSchema3 = CreatorTemplateListingSchema3.partial();
|
|
43235
43489
|
var CreatorListingSchema3 = external_exports.object({
|
|
43236
43490
|
object: external_exports.literal("creator_listing"),
|
|
@@ -43450,6 +43704,10 @@ var EventTypeSchema3 = external_exports.enum([
|
|
|
43450
43704
|
"span.harness_build.end",
|
|
43451
43705
|
"span.box_resume.start",
|
|
43452
43706
|
"span.box_resume.end",
|
|
43707
|
+
"span.tools_resolve.start",
|
|
43708
|
+
"span.tools_resolve.end",
|
|
43709
|
+
"span.model_gate.start",
|
|
43710
|
+
"span.model_gate.end",
|
|
43453
43711
|
/**
|
|
43454
43712
|
* A delegated thread's lifecycle, on the **coordinator's** stream (§28). The child's own
|
|
43455
43713
|
* `ses_…` rides inside `data.thread_id` — the event schema gains no field and `vetta.event` gains
|
|
@@ -45029,11 +45287,12 @@ var MusicGenerationSchema3 = external_exports.object({
|
|
|
45029
45287
|
duration_seconds: Seconds23.nullable(),
|
|
45030
45288
|
cost_micro_usd: MicroUsdField3
|
|
45031
45289
|
});
|
|
45290
|
+
var EditModeSchema3 = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"]);
|
|
45032
45291
|
var EditRequestSchema3 = external_exports.object({
|
|
45033
45292
|
video: external_exports.string().min(1),
|
|
45034
45293
|
prompt: external_exports.string().min(1).max(1e3),
|
|
45035
45294
|
references: external_exports.array(external_exports.string().min(1)).max(4).optional(),
|
|
45036
|
-
mode:
|
|
45295
|
+
mode: EditModeSchema3.optional()
|
|
45037
45296
|
});
|
|
45038
45297
|
var EditFailureCodeSchema3 = external_exports.enum(["bad_source", "refused", "timed_out", "provider_error", "cancelled"]);
|
|
45039
45298
|
var EditJobSchema3 = external_exports.object({
|
|
@@ -45043,7 +45302,7 @@ var EditJobSchema3 = external_exports.object({
|
|
|
45043
45302
|
video: external_exports.string(),
|
|
45044
45303
|
prompt: external_exports.string(),
|
|
45045
45304
|
references: external_exports.array(external_exports.string()),
|
|
45046
|
-
mode:
|
|
45305
|
+
mode: EditModeSchema3.nullable(),
|
|
45047
45306
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
45048
45307
|
error: external_exports.object({ code: EditFailureCodeSchema3, message: external_exports.string() }).nullable(),
|
|
45049
45308
|
cost_micro_usd: MicroUsdField3.nullable(),
|
|
@@ -47858,7 +48117,7 @@ var auth2 = {
|
|
|
47858
48117
|
} else if (apiKey === "" || cmd.config.apiKeyFromProfile) {
|
|
47859
48118
|
const piped = cmd.readStdin()?.trim() ?? "";
|
|
47860
48119
|
if (piped !== "") apiKey = piped;
|
|
47861
|
-
if (apiKey === "") throw new UsageError("pipe the key on stdin, set
|
|
48120
|
+
if (apiKey === "") throw new UsageError("pipe the key on stdin, set NAIVE_API_KEY, or pass --email and --password");
|
|
47862
48121
|
}
|
|
47863
48122
|
const client = cmd.withApiKey(apiKey);
|
|
47864
48123
|
const me = await client.auth.me();
|
|
@@ -48082,7 +48341,7 @@ function status2(args) {
|
|
|
48082
48341
|
if (found === void 0) throw new UsageError(`--status must be ${CardStatusSchema.options.join("|")}`);
|
|
48083
48342
|
return found;
|
|
48084
48343
|
}
|
|
48085
|
-
async function
|
|
48344
|
+
async function settled(cmd, issued) {
|
|
48086
48345
|
let current = issued;
|
|
48087
48346
|
for (let attempt2 = 0; SETTLING.has(current.status) && attempt2 < WAIT_ATTEMPTS; attempt2 += 1) {
|
|
48088
48347
|
await new Promise((resolve5) => setTimeout(resolve5, WAIT_MS));
|
|
@@ -48110,7 +48369,7 @@ var cards2 = {
|
|
|
48110
48369
|
label: args.need("label"),
|
|
48111
48370
|
load_micro_usd: microFromUsdFlag("usd", args.need("usd"))
|
|
48112
48371
|
});
|
|
48113
|
-
return { out: args.bool("wait") ? await
|
|
48372
|
+
return { out: args.bool("wait") ? await settled(cmd, issued) : issued };
|
|
48114
48373
|
},
|
|
48115
48374
|
show: async ({ client, args }) => ({ out: await client.identities.cards.get(ref(args), card(args)) }),
|
|
48116
48375
|
reveal: async ({ client, args }) => {
|
|
@@ -48448,11 +48707,11 @@ var WAIT_MS2 = 5e3;
|
|
|
48448
48707
|
var WAIT_ATTEMPTS2 = 1440;
|
|
48449
48708
|
var STATES = ["setup", "building", "ready"];
|
|
48450
48709
|
var newest = (build) => build.rounds[0];
|
|
48451
|
-
var
|
|
48710
|
+
var settled2 = (build) => newest(build)?.state === "ready" || newest(build)?.state === "failed";
|
|
48452
48711
|
async function finish(cmd, queued, wait) {
|
|
48453
48712
|
if (!wait) return { out: queued };
|
|
48454
48713
|
let build = queued;
|
|
48455
|
-
for (let attempt2 = 0; attempt2 < WAIT_ATTEMPTS2 && !
|
|
48714
|
+
for (let attempt2 = 0; attempt2 < WAIT_ATTEMPTS2 && !settled2(build); attempt2 += 1) {
|
|
48456
48715
|
await new Promise((resolve5) => setTimeout(resolve5, WAIT_MS2));
|
|
48457
48716
|
build = await cmd.client.media.skills.get(queued.id);
|
|
48458
48717
|
}
|
|
@@ -48699,8 +48958,8 @@ var media6 = {
|
|
|
48699
48958
|
// §55: `naive media edit "<prompt>" --video <fil_|url>`. `--wait` follows the edit job.
|
|
48700
48959
|
edit: async ({ client, args }) => {
|
|
48701
48960
|
const mode = args.str("mode");
|
|
48702
|
-
if (mode !== void 0 && mode !== "scene" && mode !== "outfit_or_object" && mode !== "person_swap") {
|
|
48703
|
-
throw new UsageError("--mode must be scene, outfit_or_object or
|
|
48961
|
+
if (mode !== void 0 && mode !== "scene" && mode !== "outfit_or_object" && mode !== "person_swap" && mode !== "recast") {
|
|
48962
|
+
throw new UsageError("--mode must be scene, outfit_or_object, person_swap or recast");
|
|
48704
48963
|
}
|
|
48705
48964
|
const references = args.list("reference");
|
|
48706
48965
|
let job = await client.media.edits.create({
|
|
@@ -51616,7 +51875,7 @@ var ALIASES = {
|
|
|
51616
51875
|
};
|
|
51617
51876
|
|
|
51618
51877
|
// src/cli.ts
|
|
51619
|
-
var VERSION = true ? "1.0.
|
|
51878
|
+
var VERSION = true ? "1.0.2" : "0.0.0-dev";
|
|
51620
51879
|
var GLOBAL_FLAGS_HELP = "global flags: --json (default) --human --profile <name> --api-key <key> --org <org_id> --api-base-url <url>";
|
|
51621
51880
|
function usage() {
|
|
51622
51881
|
const groups = [...Object.keys(GROUPS), ...Object.keys(ALIASES)].sort().join(", ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usenaive-sdk/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Naive Managed Agents command line — create agents, run sessions, watch events, see cost.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"esbuild": "0.28.2",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
29
|
"@vetta/core": "0.0.0",
|
|
30
|
-
"@usenaive-sdk/
|
|
31
|
-
"@usenaive-sdk/
|
|
30
|
+
"@usenaive-sdk/managed-agents": "0.12.2",
|
|
31
|
+
"@usenaive-sdk/blueprints": "0.18.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "node build.mjs",
|