democut 0.6.19 → 0.6.24

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.
Files changed (2) hide show
  1. package/dist/cli.js +2334 -114
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6916,7 +6916,7 @@ import { realpathSync } from "fs";
6916
6916
  import { fileURLToPath } from "url";
6917
6917
 
6918
6918
  // src/version.ts
6919
- var VERSION = "0.6.19";
6919
+ var VERSION = "0.6.24";
6920
6920
 
6921
6921
  // src/device-flow.ts
6922
6922
  var DeviceFlowError = class extends Error {
@@ -16164,7 +16164,7 @@ var GENERATED_TOOLS = [
16164
16164
  },
16165
16165
  {
16166
16166
  "name": "democut_estimate_cuts",
16167
- "description": "\uCEF7 N \uAC1C\uC758 \uACAC\uC801(0\uC6D0, \uBD80\uC791\uC6A9 \uC5C6\uC74C). \uC751\uB2F5\uC758 total_krw\xB7rate_version\xB7can_afford \uB97C \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBCF4\uC5EC \uC8FC\uACE0 \uADF8\uB300\uB85C democut_make_cuts \uC5D0 \uB123\uC5B4\uB77C. BYO \uD544\uB4DC(image_asset_id\xB7narration_asset_id\xB7tsx\xB7source.asset_id)\uB97C \uC8FC\uBA74 \uADF8 \uD589\uC740 0\uC6D0\uC774\uB2E4. \uB2E4\uC74C \uD638\uCD9C: democut_make_cuts.",
16167
+ "description": "\uCEF7 N \uAC1C\uC758 \uACAC\uC801(0\uC6D0, \uBD80\uC791\uC6A9 \uC5C6\uC74C). \uC751\uB2F5\uC758 total_krw\xB7rate_version\xB7can_afford \uB97C \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBCF4\uC5EC \uC8FC\uACE0 \uADF8\uB300\uB85C democut_make_cuts \uC5D0 \uB123\uC5B4\uB77C. BYO \uD544\uB4DC(image_asset_id\xB7narration_asset_id\xB7tsx\xB7source.asset_id)\uB97C \uC8FC\uBA74 \uADF8 \uD589\uC740 0\uC6D0\uC774\uB2E4. \u2605 \uC751\uB2F5 notes \uB97C **\uBC18\uB4DC\uC2DC \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC804\uD558\uB77C** \u2014 \uB9C9\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uADF8\uB300\uB85C \uB9CC\uB4E4\uBA74 \uACB0\uACFC\uAC00 \uC758\uB3C4\uC640 \uB2E4\uB97C \uC218 \uC788\uB294 \uAC83\uB4E4\uC774\uB2E4. \uD2B9\uD788 ai_video \uC5D0 \uCC38\uC870 \uC774\uBBF8\uC9C0\uB97C \uC548 \uC8FC\uBA74 \uD14D\uC2A4\uD2B8\uB9CC\uC73C\uB85C \uB9CC\uB4E0\uB2E4(t2v): \uCCAB \uD504\uB808\uC784\uC744 \uC8FC\uBA74 \uD6E8\uC52C \uC548\uC815\uC801\uC774\uBBC0\uB85C \uC774\uBBF8\uC9C0\uB97C \uB9CC\uB4E4\uC5B4 \uC0AC\uC6A9\uC790 \uD655\uC778\uC744 \uBC1B\uC740 \uB4A4 democut_upload_asset \u2192 spec.image_asset_id \uB85C \uC8FC\uB294 \uD3B8\uC774 \uB0AB\uB2E4. \uB2E4\uC74C \uD638\uCD9C: democut_make_cuts.",
16168
16168
  "inputSchema": {
16169
16169
  "type": "object",
16170
16170
  "properties": {
@@ -16351,7 +16351,7 @@ var GENERATED_TOOLS = [
16351
16351
  }
16352
16352
  ],
16353
16353
  "default": null,
16354
- "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uCEF7 \uC774\uBBF8\uC9C0 \u2192 t2v \uC21C",
16354
+ "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uADF8\uAC83\uB3C4 \uC5C6\uC73C\uBA74 t2v(\uD14D\uC2A4\uD2B8\uB9CC) \u2014 \uACAC\uC801\uC774 notes \uB85C \uC54C\uB824\uC900\uB2E4",
16355
16355
  "title": "Image"
16356
16356
  },
16357
16357
  "end_image": {
@@ -16502,6 +16502,20 @@ var GENERATED_TOOLS = [
16502
16502
  }
16503
16503
  ],
16504
16504
  "title": "Spec"
16505
+ },
16506
+ "note": {
16507
+ "anyOf": [
16508
+ {
16509
+ "maxLength": 500,
16510
+ "type": "string"
16511
+ },
16512
+ {
16513
+ "type": "null"
16514
+ }
16515
+ ],
16516
+ "default": null,
16517
+ "description": "\uC774 \uCEF7\uC744 \uC65C \uB9CC\uB4DC\uB294\uC9C0 \u2014 \uB9CC\uB4E4 \uB54C \uADF8 \uBC84\uC804 \uD589\uC5D0 \uB0A8\uB294\uB2E4. \uACAC\uC801 \uB2E8\uACC4\uC5D0\uC11C\uB294 \uAE08\uC561\uC5D0 \uC601\uD5A5\uC774 \uC5C6\uACE0 \uC800\uC7A5\uB418\uC9C0\uB3C4 \uC54A\uB294\uB2E4(\uAC19\uC740 items \uB97C make_cuts \uC5D0 \uADF8\uB300\uB85C \uBCF4\uB0BC \uC218 \uC788\uAC8C \uBC1B\uB294\uB2E4)",
16518
+ "title": "Note"
16505
16519
  }
16506
16520
  },
16507
16521
  "required": [
@@ -17005,7 +17019,7 @@ var GENERATED_TOOLS = [
17005
17019
  },
17006
17020
  {
17007
17021
  "name": "democut_make_cuts",
17008
- "description": "\uCEF7 N \uAC1C\uB97C \uB9CC\uB4E0\uB2E4(\uCCAD\uAD6C \u2014 \uC81C\uCD9C \uC2DC \uC794\uC561\uC5D0\uC11C \uCC28\uAC10, \uC2E4\uD328 \uC2DC \uD658\uBD88). \uAE30\uBCF8 \uBC29\uC2DD\uC740 ai_video. items \uB294 all-or-nothing \uC774\uB2E4. \uB3C8\uC774 \uB098\uAC00\uB294 \uB3C4\uAD6C\uB2E4: estimate_cuts(\uB610\uB294 \uC9DD\uC774 \uB418\uB294 estimate \uB3C4\uAD6C)\uB85C \uAE08\uC561\uC744 \uBCF4\uACE0 \uC0AC\uC6A9\uC790 \uB3D9\uC758\uB97C \uBC1B\uC740 \uB4A4 confirmed_*_krw \uC640 rate_version \uC744 \uADF8\uB300\uB85C \uB123\uC5B4\uB77C. \uC5B4\uAE0B\uB098\uBA74 409 QUOTE_MISMATCH \uB85C \uC0C8 \uACAC\uC801\uC744 \uC900\uB2E4(\uACFC\uAE08 \uC5C6\uC74C). \uC2E4\uD328\uD574\uB3C4 \uC7AC\uC81C\uCD9C\uD558\uC9C0 \uB9C8\uB77C \u2014 \uAC19\uC740 spec \uC774 \uD65C\uC131\uC774\uBA74 \uC11C\uBC84\uAC00 \uAE30\uC874 \uC7A1\uC744 \uB3CC\uB824\uC900\uB2E4(deduplicated=true). \uC751\uB2F5\uC740 202 \u2014 \uACB0\uACFC\uB294 democut_wait_jobs \uB85C \uBC1B\uB294\uB2E4. \uB2E4\uC74C \uD638\uCD9C: democut_wait_jobs.",
17022
+ "description": "\uCEF7 N \uAC1C\uB97C \uB9CC\uB4E0\uB2E4(\uCCAD\uAD6C \u2014 \uC81C\uCD9C \uC2DC \uC794\uC561\uC5D0\uC11C \uCC28\uAC10, \uC2E4\uD328 \uC2DC \uD658\uBD88). \uAE30\uBCF8 \uBC29\uC2DD\uC740 ai_video. items \uB294 all-or-nothing \uC774\uB2E4. \u2605 democut_estimate_cuts \uC758 notes \uB97C \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC804\uD558\uACE0 \uB2F5\uC744 \uBC1B\uC740 \uB4A4\uC5D0 \uBD80\uB974\uB77C \u2014 \uD2B9\uD788 \uCC38\uC870 \uC774\uBBF8\uC9C0 \uC5C6\uB294 ai_video(t2v)\uB294 \uB9CC\uB4E0 \uB4A4 \uB9C8\uC74C\uC5D0 \uC548 \uB4E4\uC5B4\uB3C4 \uB2E4\uC2DC \uB9CC\uB4E4\uBA74 **\uC7AC\uACFC\uAE08**\uC774\uB2E4. \uB3C8\uC774 \uB098\uAC00\uB294 \uB3C4\uAD6C\uB2E4: estimate_cuts(\uB610\uB294 \uC9DD\uC774 \uB418\uB294 estimate \uB3C4\uAD6C)\uB85C \uAE08\uC561\uC744 \uBCF4\uACE0 \uC0AC\uC6A9\uC790 \uB3D9\uC758\uB97C \uBC1B\uC740 \uB4A4 confirmed_*_krw \uC640 rate_version \uC744 \uADF8\uB300\uB85C \uB123\uC5B4\uB77C. \uC5B4\uAE0B\uB098\uBA74 409 QUOTE_MISMATCH \uB85C \uC0C8 \uACAC\uC801\uC744 \uC900\uB2E4(\uACFC\uAE08 \uC5C6\uC74C). \uC2E4\uD328\uD574\uB3C4 \uC7AC\uC81C\uCD9C\uD558\uC9C0 \uB9C8\uB77C \u2014 \uAC19\uC740 spec \uC774 \uD65C\uC131\uC774\uBA74 \uC11C\uBC84\uAC00 \uAE30\uC874 \uC7A1\uC744 \uB3CC\uB824\uC900\uB2E4(deduplicated=true). \uC751\uB2F5\uC740 202 \u2014 \uACB0\uACFC\uB294 democut_wait_jobs \uB85C \uBC1B\uB294\uB2E4. \uB2E4\uC74C \uD638\uCD9C: democut_wait_jobs.",
17009
17023
  "inputSchema": {
17010
17024
  "type": "object",
17011
17025
  "properties": {
@@ -17200,7 +17214,7 @@ var GENERATED_TOOLS = [
17200
17214
  }
17201
17215
  ],
17202
17216
  "default": null,
17203
- "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uCEF7 \uC774\uBBF8\uC9C0 \u2192 t2v \uC21C",
17217
+ "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uADF8\uAC83\uB3C4 \uC5C6\uC73C\uBA74 t2v(\uD14D\uC2A4\uD2B8\uB9CC) \u2014 \uACAC\uC801\uC774 notes \uB85C \uC54C\uB824\uC900\uB2E4",
17204
17218
  "title": "Image"
17205
17219
  },
17206
17220
  "end_image": {
@@ -17424,6 +17438,7 @@ var GENERATED_TOOLS = [
17424
17438
  }
17425
17439
  ],
17426
17440
  "default": null,
17441
+ "description": "\uC774 \uCEF7\uC744 \uC65C \uB9CC\uB4DC\uB294\uC9C0 \u2014 \uB9CC\uB4E4\uC5B4\uC9C4 \uBC84\uC804 \uD589\uC5D0 \uB0A8\uB294\uB2E4(\uC0B0\uCD9C\uBB3C\xB7\uAE08\uC561\uC5D0\uB294 \uC601\uD5A5\uC774 \uC5C6\uB2E4)",
17427
17442
  "title": "Note"
17428
17443
  }
17429
17444
  },
@@ -17908,7 +17923,7 @@ var GENERATED_TOOLS = [
17908
17923
  },
17909
17924
  "timeout_s": {
17910
17925
  "default": 600,
17911
- "description": "0 = \uAE30\uB2E4\uB9AC\uC9C0 \uC54A\uACE0 \uC9C0\uAE08 \uC0C1\uD0DC\uB9CC. all_done=false \uBA74 \uB0A8\uC740 id \uB9CC \uB2E4\uC2DC \uBD80\uB978\uB2E4",
17926
+ "description": "\uAE30\uB2E4\uB9AC\uACE0 \uC2F6\uC740 \uCD08(0 = \uC9C0\uAE08 \uC0C1\uD0DC\uB9CC). \u2605 \uD55C \uBC88\uC758 \uD638\uCD9C\uC774 \uC2E4\uC81C\uB85C \uAE30\uB2E4\uB9AC\uB294 \uC2DC\uAC04\uC740 \uCD5C\uB300 60\uCD08\uB2E4(\uADF8\uBCF4\uB2E4 \uAE38\uBA74 MCP \uC804\uC1A1\uC774 \uBA3C\uC800 \uB04A\uAE34\uB2E4) \u2014 all_done=false \uBA74 \uB0A8\uC740 id \uB85C \uB2E4\uC2DC \uBD80\uB974\uBA74 \uC774\uC5B4\uC11C \uAE30\uB2E4\uB9B0\uB2E4.",
17912
17927
  "maximum": 600,
17913
17928
  "minimum": 0,
17914
17929
  "title": "Timeout S",
@@ -18115,6 +18130,157 @@ var GENERATED_TOOLS = [
18115
18130
  "openWorldHint": false
18116
18131
  }
18117
18132
  },
18133
+ {
18134
+ "name": "democut_get_asset",
18135
+ "description": "\uC790\uC0B0 \uD558\uB098(\uC11C\uBA85 URL \uB3D9\uBD09). fetch \uC790\uC0B0\uC740 state \uAC00 ready \uAC00 \uB420 \uB54C\uAE4C\uC9C0 \uAE30\uB2E4\uB9B0\uB2E4.",
18136
+ "inputSchema": {
18137
+ "type": "object",
18138
+ "properties": {
18139
+ "asset_id": {
18140
+ "type": "string",
18141
+ "description": "\uC790\uC0B0 id(ast_\u2026)"
18142
+ }
18143
+ },
18144
+ "required": [
18145
+ "asset_id"
18146
+ ],
18147
+ "additionalProperties": false
18148
+ },
18149
+ "annotations": {
18150
+ "readOnlyHint": true,
18151
+ "destructiveHint": false,
18152
+ "idempotentHint": true,
18153
+ "openWorldHint": false
18154
+ }
18155
+ },
18156
+ {
18157
+ "name": "democut_set_cut_image",
18158
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C \uC62C\uB9B0 \uC790\uC0B0 \uB610\uB294 \uAE30\uC874 \uBC84\uC804\uC758 \uD504\uB808\uC784\uC5D0\uC11C \uCD94\uAC00\uD55C\uB2E4(0\uC6D0).",
18159
+ "inputSchema": {
18160
+ "type": "object",
18161
+ "properties": {
18162
+ "slug": {
18163
+ "type": "string",
18164
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
18165
+ },
18166
+ "cut_id": {
18167
+ "type": "string",
18168
+ "description": "\uCEF7 id(cut_\u2026)"
18169
+ },
18170
+ "asset_id": {
18171
+ "anyOf": [
18172
+ {
18173
+ "type": "string"
18174
+ },
18175
+ {
18176
+ "type": "null"
18177
+ }
18178
+ ],
18179
+ "default": null,
18180
+ "title": "Asset Id"
18181
+ },
18182
+ "from_version": {
18183
+ "anyOf": [
18184
+ {
18185
+ "minimum": 1,
18186
+ "type": "integer"
18187
+ },
18188
+ {
18189
+ "type": "null"
18190
+ }
18191
+ ],
18192
+ "default": null,
18193
+ "title": "From Version"
18194
+ },
18195
+ "frame": {
18196
+ "default": "first",
18197
+ "enum": [
18198
+ "first",
18199
+ "last"
18200
+ ],
18201
+ "title": "Frame",
18202
+ "type": "string"
18203
+ }
18204
+ },
18205
+ "required": [
18206
+ "slug",
18207
+ "cut_id"
18208
+ ],
18209
+ "additionalProperties": false
18210
+ },
18211
+ "annotations": {
18212
+ "readOnlyHint": false,
18213
+ "destructiveHint": false,
18214
+ "idempotentHint": false,
18215
+ "openWorldHint": false
18216
+ }
18217
+ },
18218
+ {
18219
+ "name": "democut_select_cut_image",
18220
+ "description": "\uB300\uD45C \uCEF7 \uC774\uBBF8\uC9C0\uB97C \uACE0\uB978\uB2E4.",
18221
+ "inputSchema": {
18222
+ "type": "object",
18223
+ "properties": {
18224
+ "slug": {
18225
+ "type": "string",
18226
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
18227
+ },
18228
+ "cut_id": {
18229
+ "type": "string",
18230
+ "description": "\uCEF7 id(cut_\u2026)"
18231
+ },
18232
+ "image_id": {
18233
+ "title": "Image Id",
18234
+ "type": "string"
18235
+ }
18236
+ },
18237
+ "required": [
18238
+ "slug",
18239
+ "cut_id",
18240
+ "image_id"
18241
+ ],
18242
+ "additionalProperties": false
18243
+ },
18244
+ "annotations": {
18245
+ "readOnlyHint": false,
18246
+ "destructiveHint": false,
18247
+ "idempotentHint": true,
18248
+ "openWorldHint": false
18249
+ }
18250
+ },
18251
+ {
18252
+ "name": "democut_delete_cut_image",
18253
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0 \uD558\uB098\uB97C \uC9C0\uC6B4\uB2E4.",
18254
+ "inputSchema": {
18255
+ "type": "object",
18256
+ "properties": {
18257
+ "slug": {
18258
+ "type": "string",
18259
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
18260
+ },
18261
+ "cut_id": {
18262
+ "type": "string",
18263
+ "description": "\uCEF7 id(cut_\u2026)"
18264
+ },
18265
+ "image_id": {
18266
+ "type": "string",
18267
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0 id(img_\u2026)"
18268
+ }
18269
+ },
18270
+ "required": [
18271
+ "slug",
18272
+ "cut_id",
18273
+ "image_id"
18274
+ ],
18275
+ "additionalProperties": false
18276
+ },
18277
+ "annotations": {
18278
+ "readOnlyHint": false,
18279
+ "destructiveHint": true,
18280
+ "idempotentHint": true,
18281
+ "openWorldHint": false
18282
+ }
18283
+ },
18118
18284
  {
18119
18285
  "name": "democut_credit_balance",
18120
18286
  "description": "\uB0B4 \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uC758 \uD06C\uB808\uB527 \uC794\uC561. \uBD80\uC791\uC6A9\uB3C4 \uACFC\uAE08\uB3C4 \uC5C6\uB2E4. \uB3C8\uC774 \uB098\uAC00\uB294 \uC791\uC5C5(democut_make_cuts \uB4F1)\uC744 \uC81C\uCD9C\uD558\uAE30 **\uC804\uC5D0** \uD655\uC778\uD558\uB77C \u2014 \uBD80\uC871\uD558\uBA74 \uC81C\uCD9C\uC774 402 \uB85C \uAC70\uBD80\uB418\uACE0, \uADF8\uAC83\uC744 \uBBF8\uB9AC \uC544\uB294 \uD3B8\uC774 \uB0AB\uB2E4(democut_estimate_cuts \uC758 can_afford \uAC00 \uC788\uC73C\uBA74 \uB9E4\uBC88 \uBD80\uB97C \uD544\uC694\uB294 \uC5C6\uB2E4). \uBAA8\uC790\uB77C\uBA74 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC54C\uB9AC\uACE0 \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4 \uAD00\uB9AC\uC790\uC5D0\uAC8C \uCDA9\uC804\uC744 \uC694\uCCAD\uD558\uB3C4\uB85D \uC548\uB0B4\uD558\uB77C \u2014 \uB124\uAC00 \uC9C1\uC811 \uCDA9\uC804\uD560 \uC218\uB294 \uC5C6\uB2E4.",
@@ -18411,102 +18577,1868 @@ var GENERATED_TOOLS = [
18411
18577
  "idempotentHint": true,
18412
18578
  "openWorldHint": false
18413
18579
  }
18414
- }
18415
- ];
18416
-
18417
- // src/api-errors.ts
18418
- var TOOL_BASE_NAMES = GENERATED_TOOLS.map((t) => t.name.replace(/^democut_/, "")).sort((a, b) => b.length - a.length);
18419
- var escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18420
- var NAME_PATTERNS = TOOL_BASE_NAMES.map((name) => [
18421
- new RegExp(`(?<!democut_)(?<![\\w.])${escapeRe(name)}(?![\\w{(])`, "g"),
18422
- `democut_${name}`
18423
- ]);
18424
- function callableToolNames(text) {
18425
- let out2 = text;
18426
- for (const [re, replacement] of NAME_PATTERNS) out2 = out2.replace(re, replacement);
18427
- return out2;
18428
- }
18429
- function usd(v) {
18430
- return v < 0.01 ? `$${v.toFixed(4)}` : `$${v.toFixed(2)}`;
18431
- }
18432
- function classifyApiError(e, ctx) {
18433
- const hint = ctx.statusHint ?? "\uC0C1\uD0DC \uC870\uD68C";
18434
- const contractHint = typeof e.extra.hint === "string" ? callableToolNames(e.extra.hint) : null;
18435
- if (contractHint) {
18436
- const lines = [contractHint];
18437
- if (ctx.submitted) {
18438
- lines.push(
18439
- e.status < 500 ? "\uC544\uC9C1 \uC544\uBB34\uAC83\uB3C4 \uC81C\uCD9C\uB418\uC9C0 \uC54A\uC558\uACE0 \uACFC\uAE08\uB3C4 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC694\uCCAD\uC744 \uACE0\uCCD0 \uB2E4\uC2DC \uD638\uCD9C\uD558\uC138\uC694." : `\u26A0\uFE0F \uC81C\uCD9C\uC774 \uC811\uC218\uB410\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uC2DC \uBCF4\uB0B4\uC9C0 \uB9D0\uACE0 ${hint} \uB85C \uC0C1\uD0DC\uB97C \uBA3C\uC800 \uD655\uC778\uD558\uC138\uC694.`
18440
- );
18441
- }
18442
- return {
18443
- safety: e.status >= 500 && ctx.submitted ? "unsafe" : e.retriable === false ? "fixable" : "safe",
18444
- notCharged: e.status < 500,
18445
- lines
18446
- };
18447
- }
18448
- if (e.status === 422 && e.code === "VIDEOGEN_UPSTREAM_REJECTED") {
18449
- return {
18450
- safety: "unsafe",
18451
- // 돈이 나갔다가 돌아왔다 — "애초에 과금이 없었다" 와는 다르다. 그 구분을 흐리면
18452
- // 원장을 보는 사람이 이 거래를 설명하지 못한다.
18453
- notCharged: false,
18454
- lines: [
18455
- "\uC5C5\uC2A4\uD2B8\uB9BC\uC774 \uC774 \uC791\uC5C5\uC744 \uC601\uAD6C \uAC70\uBD80\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC870\uD68C\uD574\uB3C4 \uBCF5\uAD6C\uB418\uC9C0 \uC54A\uC73C\uBA70, \uACFC\uAE08\uC740 \uD658\uBD88\uB410\uC2B5\uB2C8\uB2E4.",
18456
- "\uACE0\uCE60 \uD30C\uB77C\uBBF8\uD130\uAC00 \uC788\uB294 \uC624\uB958\uAC00 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uC0C8\uB85C \uB9CC\uB4E4\uB824\uBA74 \uD504\uB86C\uD504\uD2B8\xB7\uC124\uC815\uC744 \uBC14\uAFD4 **\uC0C8\uB85C \uC81C\uCD9C**\uD574\uC57C \uD558\uACE0, \uADF8\uAC74 \uB2E4\uC2DC \uACFC\uAE08\uB429\uB2C8\uB2E4(\uC0AC\uC6A9\uC790 \uB3D9\uC758\uB97C \uBC1B\uC73C\uC138\uC694)."
18457
- ]
18458
- };
18459
- }
18460
- if (e.status === 404 && e.code === "VIDEOGEN_JOB_NOT_FOUND") {
18461
- return {
18462
- safety: "unsafe",
18463
- notCharged: false,
18464
- lines: [
18465
- "\uADF8 \uC791\uC5C5\uC744 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. job_id \uAC00 \uB9DE\uB294\uC9C0 \uBA3C\uC800 \uD655\uC778\uD558\uC138\uC694.",
18466
- "\u26A0\uFE0F \uC791\uC5C5\uC774 \uC0B4\uC544 \uC788\uB294\uB370 \uC870\uD68C\uB9CC \uC5B4\uAE0B\uB0AC\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC0C8\uB85C \uC81C\uCD9C\uD558\uBA74 **\uBCC4\uB3C4 \uC791\uC5C5\uC73C\uB85C \uB2E4\uC2DC \uACFC\uAE08**\uB429\uB2C8\uB2E4."
18467
- ]
18468
- };
18469
- }
18470
- if (e.status === 402) {
18471
- const lines = [];
18472
- const limit = e.extra.limit_usd;
18473
- const would = e.extra.would_cost_usd;
18474
- if (typeof limit === "number" && typeof would === "number") {
18475
- lines.push(`\uC0C1\uD55C ${usd(limit)} \xB7 \uC774 \uC694\uCCAD ${usd(would)}`);
18580
+ },
18581
+ {
18582
+ "name": "democut_get_storyboard",
18583
+ "description": "\uC2A4\uD1A0\uB9AC\uBCF4\uB4DC \u2014 rev\xB7\uC21C\uC11C\xB7\uCEF7(\uD30C\uC0DD \uD544\uB4DC)\xB7\uB300\uAE30 \uC81C\uC548\xB7\uC0AC\uC6A9\uB7C9. If-Match \uC5D0 \uC4F8 rev \uAC00 \uC5EC\uAE30 \uC788\uB2E4. \uB2E4\uC74C \uD638\uCD9C: democut_add_cut, democut_put_cut_draft.",
18584
+ "inputSchema": {
18585
+ "type": "object",
18586
+ "properties": {
18587
+ "slug": {
18588
+ "type": "string",
18589
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
18590
+ }
18591
+ },
18592
+ "required": [
18593
+ "slug"
18594
+ ],
18595
+ "additionalProperties": false
18596
+ },
18597
+ "annotations": {
18598
+ "readOnlyHint": true,
18599
+ "destructiveHint": false,
18600
+ "idempotentHint": true,
18601
+ "openWorldHint": false
18476
18602
  }
18477
- lines.push("\uD574\uC0C1\uB3C4\uB098 \uAE38\uC774\uB97C \uB0AE\uCDB0 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694. \uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
18478
- return { safety: "fixable", notCharged: true, lines };
18479
- }
18480
- if (e.status === 422) {
18481
- return {
18482
- safety: "fixable",
18483
- notCharged: true,
18484
- lines: ["\uD30C\uB77C\uBBF8\uD130\uB97C \uACE0\uCCD0 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694. \uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."]
18485
- };
18486
- }
18487
- if (e.status === 503) {
18488
- return {
18489
- safety: "safe",
18490
- notCharged: true,
18491
- lines: ["\uC77C\uC2DC\uC801\uC778 \uC624\uB958\uC785\uB2C8\uB2E4. \uC7A0\uC2DC \uD6C4 \uADF8\uB300\uB85C \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uB3C4 \uC548\uC804\uD569\uB2C8\uB2E4."]
18492
- };
18493
- }
18494
- if (e.status === 502) {
18495
- return ctx.submitted ? {
18496
- safety: "unsafe",
18497
- notCharged: false,
18498
- lines: [
18499
- "\u26A0\uFE0F \uC81C\uCD9C\uC774 \uC774\uBBF8 \uC811\uC218\uB410\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC81C\uCD9C\uD558\uBA74 \uB450 \uBC88 \uACFC\uAE08\uB429\uB2C8\uB2E4 \u2014",
18500
- `\uC7AC\uC2DC\uB3C4\uD558\uC9C0 \uB9D0\uACE0 ${hint} \uB85C \uD655\uC778\uD558\uAC70\uB098 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694.`
18501
- ]
18502
- } : {
18503
- safety: "safe",
18504
- notCharged: true,
18505
- lines: [
18506
- "\uC5C5\uC2A4\uD2B8\uB9BC \uC624\uB958\uC785\uB2C8\uB2E4. \uC774 \uC694\uCCAD\uC740 \uBD80\uC791\uC6A9\uC774 \uC5C6\uC73C\uBBC0\uB85C \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uB3C4 \uC548\uC804\uD569\uB2C8\uB2E4."
18507
- ]
18508
- };
18509
- }
18603
+ },
18604
+ {
18605
+ "name": "democut_add_cut",
18606
+ "description": "\uCEF7\uC744 \uD558\uB098 \uCD94\uAC00\uD55C\uB2E4(0\uC6D0, \uB80C\uB354\uD558\uC9C0 \uC54A\uB294\uB2E4). after \uAC00 \uC5C6\uC73C\uBA74 \uB05D\uC5D0 \uC5F0\uACB0. draft_spec \uC744 \uC8FC\uBA74 \uBC14\uB85C \uACAC\uC801\uC744 \uB0BC \uC218 \uC788\uACE0, \uC8FC\uC9C0 \uC54A\uC73C\uBA74 \uC790\uB9AC \uD45C\uC2DC \uCD08\uC548\uC774 \uB4E4\uC5B4\uAC00 \uB0B4\uC6A9\uC744 \uC815\uD558\uAE30 \uC804\uAE4C\uC9C0 \uACAC\uC801\xB7\uC81C\uCD9C\uC774 \uB9C9\uD78C\uB2E4 \u2014 \uB2E4\uC74C \uD589\uB3D9\uC740 \uC751\uB2F5\uC758 next_calls \uB97C \uB530\uB974\uB77C.",
18607
+ "inputSchema": {
18608
+ "type": "object",
18609
+ "properties": {
18610
+ "slug": {
18611
+ "type": "string",
18612
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
18613
+ },
18614
+ "mode": {
18615
+ "default": "ai_video",
18616
+ "enum": [
18617
+ "motion_graphic",
18618
+ "ai_video",
18619
+ "youtube_clip"
18620
+ ],
18621
+ "title": "Mode",
18622
+ "type": "string"
18623
+ },
18624
+ "after": {
18625
+ "anyOf": [
18626
+ {
18627
+ "type": "string"
18628
+ },
18629
+ {
18630
+ "type": "null"
18631
+ }
18632
+ ],
18633
+ "default": null,
18634
+ "description": "\uC774 \uCEF7 \uB2E4\uC74C\uC5D0 \uC5F0\uACB0. \uC5C6\uC73C\uBA74 \uB05D",
18635
+ "title": "After"
18636
+ },
18637
+ "title": {
18638
+ "default": "",
18639
+ "title": "Title",
18640
+ "type": "string"
18641
+ },
18642
+ "draft_spec": {
18643
+ "anyOf": [
18644
+ {
18645
+ "discriminator": {
18646
+ "mapping": {
18647
+ "ai_video": "#/$defs/AiVideoSpec",
18648
+ "motion_graphic": "#/$defs/MotionGraphicSpec",
18649
+ "youtube_clip": "#/$defs/YoutubeClipSpec"
18650
+ },
18651
+ "propertyName": "mode"
18652
+ },
18653
+ "oneOf": [
18654
+ {
18655
+ "$ref": "#/$defs/MotionGraphicSpec"
18656
+ },
18657
+ {
18658
+ "$ref": "#/$defs/AiVideoSpec"
18659
+ },
18660
+ {
18661
+ "$ref": "#/$defs/YoutubeClipSpec"
18662
+ }
18663
+ ]
18664
+ },
18665
+ {
18666
+ "type": "null"
18667
+ }
18668
+ ],
18669
+ "default": null,
18670
+ "title": "Draft Spec"
18671
+ }
18672
+ },
18673
+ "required": [
18674
+ "slug"
18675
+ ],
18676
+ "additionalProperties": false,
18677
+ "$defs": {
18678
+ "AiVideoSpec": {
18679
+ "additionalProperties": false,
18680
+ "properties": {
18681
+ "dialogue": {
18682
+ "items": {
18683
+ "$ref": "#/$defs/DialogueLine"
18684
+ },
18685
+ "title": "Dialogue",
18686
+ "type": "array"
18687
+ },
18688
+ "narration_asset_id": {
18689
+ "anyOf": [
18690
+ {
18691
+ "minLength": 1,
18692
+ "type": "string"
18693
+ },
18694
+ {
18695
+ "type": "null"
18696
+ }
18697
+ ],
18698
+ "default": null,
18699
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
18700
+ "title": "Narration Asset Id"
18701
+ },
18702
+ "subtitles": {
18703
+ "default": false,
18704
+ "title": "Subtitles",
18705
+ "type": "boolean"
18706
+ },
18707
+ "host": {
18708
+ "anyOf": [
18709
+ {
18710
+ "type": "string"
18711
+ },
18712
+ {
18713
+ "type": "null"
18714
+ }
18715
+ ],
18716
+ "default": null,
18717
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
18718
+ "title": "Host"
18719
+ },
18720
+ "voice_id": {
18721
+ "anyOf": [
18722
+ {
18723
+ "minLength": 1,
18724
+ "type": "string"
18725
+ },
18726
+ {
18727
+ "type": "null"
18728
+ }
18729
+ ],
18730
+ "default": null,
18731
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
18732
+ "title": "Voice Id"
18733
+ },
18734
+ "pip": {
18735
+ "anyOf": [
18736
+ {
18737
+ "$ref": "#/$defs/PipSpec"
18738
+ },
18739
+ {
18740
+ "type": "null"
18741
+ }
18742
+ ],
18743
+ "default": null,
18744
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
18745
+ },
18746
+ "image_asset_id": {
18747
+ "anyOf": [
18748
+ {
18749
+ "minLength": 1,
18750
+ "type": "string"
18751
+ },
18752
+ {
18753
+ "type": "null"
18754
+ }
18755
+ ],
18756
+ "default": null,
18757
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
18758
+ "title": "Image Asset Id"
18759
+ },
18760
+ "duration_s": {
18761
+ "default": 5,
18762
+ "maximum": 15,
18763
+ "minimum": 4,
18764
+ "title": "Duration S",
18765
+ "type": "number"
18766
+ },
18767
+ "mode": {
18768
+ "const": "ai_video",
18769
+ "default": "ai_video",
18770
+ "title": "Mode",
18771
+ "type": "string"
18772
+ },
18773
+ "image_prompt": {
18774
+ "maxLength": 4e3,
18775
+ "minLength": 1,
18776
+ "title": "Image Prompt",
18777
+ "type": "string"
18778
+ },
18779
+ "provider": {
18780
+ "anyOf": [
18781
+ {
18782
+ "maxLength": 32,
18783
+ "minLength": 1,
18784
+ "type": "string"
18785
+ },
18786
+ {
18787
+ "type": "null"
18788
+ }
18789
+ ],
18790
+ "default": null,
18791
+ "description": "\uC601\uC0C1 \uC0DD\uC131 \uACF5\uAE09\uC790(\uC608: minimax). \uBE44\uC6B0\uBA74 \uC11C\uBC84 \uAE30\uBCF8\uAC12 \u2014 \uC4F8 \uC218 \uC788\uB294 \uBAA9\uB85D\uC740 GET \u2026/options \uC758 videogen_providers",
18792
+ "title": "Provider"
18793
+ },
18794
+ "seed": {
18795
+ "anyOf": [
18796
+ {
18797
+ "minimum": 0,
18798
+ "type": "integer"
18799
+ },
18800
+ {
18801
+ "type": "null"
18802
+ }
18803
+ ],
18804
+ "default": null,
18805
+ "title": "Seed"
18806
+ },
18807
+ "image": {
18808
+ "anyOf": [
18809
+ {
18810
+ "discriminator": {
18811
+ "mapping": {
18812
+ "asset": "#/$defs/AssetImageRef",
18813
+ "from_cut": "#/$defs/FromCutImageRef",
18814
+ "from_version": "#/$defs/FromVersionImageRef"
18815
+ },
18816
+ "propertyName": "kind"
18817
+ },
18818
+ "oneOf": [
18819
+ {
18820
+ "$ref": "#/$defs/AssetImageRef"
18821
+ },
18822
+ {
18823
+ "$ref": "#/$defs/FromCutImageRef"
18824
+ },
18825
+ {
18826
+ "$ref": "#/$defs/FromVersionImageRef"
18827
+ }
18828
+ ]
18829
+ },
18830
+ {
18831
+ "type": "null"
18832
+ }
18833
+ ],
18834
+ "default": null,
18835
+ "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uADF8\uAC83\uB3C4 \uC5C6\uC73C\uBA74 t2v(\uD14D\uC2A4\uD2B8\uB9CC) \u2014 \uACAC\uC801\uC774 notes \uB85C \uC54C\uB824\uC900\uB2E4",
18836
+ "title": "Image"
18837
+ },
18838
+ "end_image": {
18839
+ "anyOf": [
18840
+ {
18841
+ "discriminator": {
18842
+ "mapping": {
18843
+ "asset": "#/$defs/AssetImageRef",
18844
+ "from_cut": "#/$defs/FromCutImageRef",
18845
+ "from_version": "#/$defs/FromVersionImageRef"
18846
+ },
18847
+ "propertyName": "kind"
18848
+ },
18849
+ "oneOf": [
18850
+ {
18851
+ "$ref": "#/$defs/AssetImageRef"
18852
+ },
18853
+ {
18854
+ "$ref": "#/$defs/FromCutImageRef"
18855
+ },
18856
+ {
18857
+ "$ref": "#/$defs/FromVersionImageRef"
18858
+ }
18859
+ ]
18860
+ },
18861
+ {
18862
+ "type": "null"
18863
+ }
18864
+ ],
18865
+ "default": null,
18866
+ "title": "End Image"
18867
+ }
18868
+ },
18869
+ "required": [
18870
+ "image_prompt"
18871
+ ],
18872
+ "title": "AiVideoSpec",
18873
+ "type": "object"
18874
+ },
18875
+ "AssetImageRef": {
18876
+ "additionalProperties": false,
18877
+ "properties": {
18878
+ "kind": {
18879
+ "const": "asset",
18880
+ "default": "asset",
18881
+ "title": "Kind",
18882
+ "type": "string"
18883
+ },
18884
+ "asset_id": {
18885
+ "minLength": 1,
18886
+ "title": "Asset Id",
18887
+ "type": "string"
18888
+ }
18889
+ },
18890
+ "required": [
18891
+ "asset_id"
18892
+ ],
18893
+ "title": "AssetImageRef",
18894
+ "type": "object"
18895
+ },
18896
+ "DialogueLine": {
18897
+ "additionalProperties": false,
18898
+ "properties": {
18899
+ "id": {
18900
+ "description": "\uC904 id ln_<6> \u2014 \uC81C\uC548 diff \uC758 \uB300\uC870 \uD0A4",
18901
+ "pattern": "^ln_[a-z0-9]{6}$",
18902
+ "title": "Id",
18903
+ "type": "string",
18904
+ "x-diff": "ignore"
18905
+ },
18906
+ "text": {
18907
+ "description": "\uBC1C\uD654 \uD14D\uC2A4\uD2B8(\uC22B\uC790\uB294 \uC11C\uBC84\uAC00 \uC77D\uB294 \uBC95\uC744 \uC815\uD55C\uB2E4 \u2014 \uD480\uC5B4\uC4F0\uC9C0 \uC54A\uB294\uB2E4)",
18908
+ "maxLength": 2e3,
18909
+ "minLength": 1,
18910
+ "title": "Text",
18911
+ "type": "string"
18912
+ },
18913
+ "subtitle_text": {
18914
+ "anyOf": [
18915
+ {
18916
+ "maxLength": 2e3,
18917
+ "type": "string"
18918
+ },
18919
+ {
18920
+ "type": "null"
18921
+ }
18922
+ ],
18923
+ "default": null,
18924
+ "description": "\uC790\uB9C9 \uD45C\uAE30(\uC6D0\uBB38 \uD45C\uAE30). \uC5C6\uC73C\uBA74 text",
18925
+ "title": "Subtitle Text"
18926
+ },
18927
+ "audio_asset_id": {
18928
+ "anyOf": [
18929
+ {
18930
+ "minLength": 1,
18931
+ "type": "string"
18932
+ },
18933
+ {
18934
+ "type": "null"
18935
+ }
18936
+ ],
18937
+ "default": null,
18938
+ "description": "BYO: \uC774 \uC904\uC758 \uB098\uB808\uC774\uC158 \uC624\uB514\uC624 \uC790\uC0B0 \u2014 TTS \uD589 0\uC6D0, \uC815\uB82C \uD589\uB9CC",
18939
+ "title": "Audio Asset Id"
18940
+ }
18941
+ },
18942
+ "required": [
18943
+ "id",
18944
+ "text"
18945
+ ],
18946
+ "title": "DialogueLine",
18947
+ "type": "object"
18948
+ },
18949
+ "FromCutImageRef": {
18950
+ "additionalProperties": false,
18951
+ "properties": {
18952
+ "kind": {
18953
+ "const": "from_cut",
18954
+ "default": "from_cut",
18955
+ "title": "Kind",
18956
+ "type": "string"
18957
+ },
18958
+ "from_cut": {
18959
+ "description": "\uB2E4\uB978 \uCEF7\uC758 \uB300\uD45C \uBC84\uC804 \uD504\uB808\uC784(\uC5F0\uC18D\uC131 \uB3C4\uC6B0\uBBF8)",
18960
+ "minLength": 1,
18961
+ "title": "From Cut",
18962
+ "type": "string"
18963
+ },
18964
+ "frame": {
18965
+ "default": "last",
18966
+ "enum": [
18967
+ "first",
18968
+ "last"
18969
+ ],
18970
+ "title": "Frame",
18971
+ "type": "string"
18972
+ }
18973
+ },
18974
+ "required": [
18975
+ "from_cut"
18976
+ ],
18977
+ "title": "FromCutImageRef",
18978
+ "type": "object"
18979
+ },
18980
+ "FromVersionImageRef": {
18981
+ "additionalProperties": false,
18982
+ "properties": {
18983
+ "kind": {
18984
+ "const": "from_version",
18985
+ "default": "from_version",
18986
+ "title": "Kind",
18987
+ "type": "string"
18988
+ },
18989
+ "from_version": {
18990
+ "description": "\uC774 \uCEF7\uC758 \uD2B9\uC815 \uBC84\uC804 \uD504\uB808\uC784",
18991
+ "minimum": 1,
18992
+ "title": "From Version",
18993
+ "type": "integer"
18994
+ },
18995
+ "frame": {
18996
+ "default": "last",
18997
+ "enum": [
18998
+ "first",
18999
+ "last"
19000
+ ],
19001
+ "title": "Frame",
19002
+ "type": "string"
19003
+ }
19004
+ },
19005
+ "required": [
19006
+ "from_version"
19007
+ ],
19008
+ "title": "FromVersionImageRef",
19009
+ "type": "object"
19010
+ },
19011
+ "MotionGraphicSpec": {
19012
+ "additionalProperties": false,
19013
+ "properties": {
19014
+ "dialogue": {
19015
+ "items": {
19016
+ "$ref": "#/$defs/DialogueLine"
19017
+ },
19018
+ "title": "Dialogue",
19019
+ "type": "array"
19020
+ },
19021
+ "narration_asset_id": {
19022
+ "anyOf": [
19023
+ {
19024
+ "minLength": 1,
19025
+ "type": "string"
19026
+ },
19027
+ {
19028
+ "type": "null"
19029
+ }
19030
+ ],
19031
+ "default": null,
19032
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
19033
+ "title": "Narration Asset Id"
19034
+ },
19035
+ "subtitles": {
19036
+ "default": false,
19037
+ "title": "Subtitles",
19038
+ "type": "boolean"
19039
+ },
19040
+ "host": {
19041
+ "anyOf": [
19042
+ {
19043
+ "type": "string"
19044
+ },
19045
+ {
19046
+ "type": "null"
19047
+ }
19048
+ ],
19049
+ "default": null,
19050
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
19051
+ "title": "Host"
19052
+ },
19053
+ "voice_id": {
19054
+ "anyOf": [
19055
+ {
19056
+ "minLength": 1,
19057
+ "type": "string"
19058
+ },
19059
+ {
19060
+ "type": "null"
19061
+ }
19062
+ ],
19063
+ "default": null,
19064
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
19065
+ "title": "Voice Id"
19066
+ },
19067
+ "pip": {
19068
+ "anyOf": [
19069
+ {
19070
+ "$ref": "#/$defs/PipSpec"
19071
+ },
19072
+ {
19073
+ "type": "null"
19074
+ }
19075
+ ],
19076
+ "default": null,
19077
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
19078
+ },
19079
+ "image_asset_id": {
19080
+ "anyOf": [
19081
+ {
19082
+ "minLength": 1,
19083
+ "type": "string"
19084
+ },
19085
+ {
19086
+ "type": "null"
19087
+ }
19088
+ ],
19089
+ "default": null,
19090
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
19091
+ "title": "Image Asset Id"
19092
+ },
19093
+ "duration_s": {
19094
+ "anyOf": [
19095
+ {
19096
+ "exclusiveMinimum": 0,
19097
+ "maximum": 600,
19098
+ "type": "number"
19099
+ },
19100
+ {
19101
+ "type": "null"
19102
+ }
19103
+ ],
19104
+ "default": null,
19105
+ "title": "Duration S"
19106
+ },
19107
+ "mode": {
19108
+ "const": "motion_graphic",
19109
+ "default": "motion_graphic",
19110
+ "title": "Mode",
19111
+ "type": "string"
19112
+ },
19113
+ "motion_prompt": {
19114
+ "anyOf": [
19115
+ {
19116
+ "maxLength": 4e3,
19117
+ "type": "string"
19118
+ },
19119
+ {
19120
+ "type": "null"
19121
+ }
19122
+ ],
19123
+ "default": null,
19124
+ "title": "Motion Prompt"
19125
+ },
19126
+ "tsx": {
19127
+ "anyOf": [
19128
+ {
19129
+ "maxLength": 2e5,
19130
+ "type": "string"
19131
+ },
19132
+ {
19133
+ "type": "null"
19134
+ }
19135
+ ],
19136
+ "default": null,
19137
+ "description": "BYO Remotion \uCF54\uB4DC(UTF-8 \u2264 200KB) \u2014 codegen \uD589 0\uC6D0, \uAC8C\uC774\uD2B8\uB294 codegen \uACFC \uB3D9\uAE09",
19138
+ "title": "Tsx"
19139
+ },
19140
+ "brand_override": {
19141
+ "anyOf": [
19142
+ {
19143
+ "additionalProperties": true,
19144
+ "type": "object"
19145
+ },
19146
+ {
19147
+ "type": "null"
19148
+ }
19149
+ ],
19150
+ "default": null,
19151
+ "title": "Brand Override"
19152
+ }
19153
+ },
19154
+ "title": "MotionGraphicSpec",
19155
+ "type": "object"
19156
+ },
19157
+ "PipSpec": {
19158
+ "additionalProperties": false,
19159
+ "properties": {
19160
+ "avatar_id": {
19161
+ "minLength": 1,
19162
+ "title": "Avatar Id",
19163
+ "type": "string"
19164
+ },
19165
+ "background_asset_id": {
19166
+ "description": "\uBC30\uACBD\uC740 \uC5B8\uC81C\uB098 \uC790\uC0B0(origin=background \uCE74\uD0C8\uB85C\uADF8 \uB610\uB294 \uC62C\uB9B0 \uC774\uBBF8\uC9C0)",
19167
+ "minLength": 1,
19168
+ "title": "Background Asset Id",
19169
+ "type": "string"
19170
+ },
19171
+ "position": {
19172
+ "default": "br",
19173
+ "enum": [
19174
+ "tl",
19175
+ "tr",
19176
+ "bl",
19177
+ "br"
19178
+ ],
19179
+ "title": "Position",
19180
+ "type": "string"
19181
+ },
19182
+ "size": {
19183
+ "default": "m",
19184
+ "enum": [
19185
+ "s",
19186
+ "m",
19187
+ "l"
19188
+ ],
19189
+ "title": "Size",
19190
+ "type": "string"
19191
+ }
19192
+ },
19193
+ "required": [
19194
+ "avatar_id",
19195
+ "background_asset_id"
19196
+ ],
19197
+ "title": "PipSpec",
19198
+ "type": "object"
19199
+ },
19200
+ "YoutubeAssetSource": {
19201
+ "additionalProperties": false,
19202
+ "properties": {
19203
+ "kind": {
19204
+ "const": "asset",
19205
+ "default": "asset",
19206
+ "title": "Kind",
19207
+ "type": "string"
19208
+ },
19209
+ "asset_id": {
19210
+ "description": "BYO: \uC62C\uB9B0 \uC6D0\uBCF8 \uC601\uC0C1 \u2014 \uB0B4\uB824\uBC1B\uAE30 \uD589 0\uC6D0",
19211
+ "minLength": 1,
19212
+ "title": "Asset Id",
19213
+ "type": "string"
19214
+ },
19215
+ "start_s": {
19216
+ "anyOf": [
19217
+ {
19218
+ "minimum": 0,
19219
+ "type": "number"
19220
+ },
19221
+ {
19222
+ "type": "null"
19223
+ }
19224
+ ],
19225
+ "default": null,
19226
+ "title": "Start S"
19227
+ },
19228
+ "end_s": {
19229
+ "anyOf": [
19230
+ {
19231
+ "exclusiveMinimum": 0,
19232
+ "type": "number"
19233
+ },
19234
+ {
19235
+ "type": "null"
19236
+ }
19237
+ ],
19238
+ "default": null,
19239
+ "title": "End S"
19240
+ }
19241
+ },
19242
+ "required": [
19243
+ "asset_id"
19244
+ ],
19245
+ "title": "YoutubeAssetSource",
19246
+ "type": "object"
19247
+ },
19248
+ "YoutubeClipSpec": {
19249
+ "additionalProperties": false,
19250
+ "properties": {
19251
+ "dialogue": {
19252
+ "items": {
19253
+ "$ref": "#/$defs/DialogueLine"
19254
+ },
19255
+ "title": "Dialogue",
19256
+ "type": "array"
19257
+ },
19258
+ "narration_asset_id": {
19259
+ "anyOf": [
19260
+ {
19261
+ "minLength": 1,
19262
+ "type": "string"
19263
+ },
19264
+ {
19265
+ "type": "null"
19266
+ }
19267
+ ],
19268
+ "default": null,
19269
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
19270
+ "title": "Narration Asset Id"
19271
+ },
19272
+ "subtitles": {
19273
+ "default": false,
19274
+ "title": "Subtitles",
19275
+ "type": "boolean"
19276
+ },
19277
+ "host": {
19278
+ "anyOf": [
19279
+ {
19280
+ "type": "string"
19281
+ },
19282
+ {
19283
+ "type": "null"
19284
+ }
19285
+ ],
19286
+ "default": null,
19287
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
19288
+ "title": "Host"
19289
+ },
19290
+ "voice_id": {
19291
+ "anyOf": [
19292
+ {
19293
+ "minLength": 1,
19294
+ "type": "string"
19295
+ },
19296
+ {
19297
+ "type": "null"
19298
+ }
19299
+ ],
19300
+ "default": null,
19301
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
19302
+ "title": "Voice Id"
19303
+ },
19304
+ "pip": {
19305
+ "anyOf": [
19306
+ {
19307
+ "$ref": "#/$defs/PipSpec"
19308
+ },
19309
+ {
19310
+ "type": "null"
19311
+ }
19312
+ ],
19313
+ "default": null,
19314
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
19315
+ },
19316
+ "image_asset_id": {
19317
+ "anyOf": [
19318
+ {
19319
+ "minLength": 1,
19320
+ "type": "string"
19321
+ },
19322
+ {
19323
+ "type": "null"
19324
+ }
19325
+ ],
19326
+ "default": null,
19327
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
19328
+ "title": "Image Asset Id"
19329
+ },
19330
+ "duration_s": {
19331
+ "anyOf": [
19332
+ {
19333
+ "exclusiveMinimum": 0,
19334
+ "maximum": 600,
19335
+ "type": "number"
19336
+ },
19337
+ {
19338
+ "type": "null"
19339
+ }
19340
+ ],
19341
+ "default": null,
19342
+ "title": "Duration S"
19343
+ },
19344
+ "mode": {
19345
+ "const": "youtube_clip",
19346
+ "default": "youtube_clip",
19347
+ "title": "Mode",
19348
+ "type": "string"
19349
+ },
19350
+ "source": {
19351
+ "discriminator": {
19352
+ "mapping": {
19353
+ "asset": "#/$defs/YoutubeAssetSource",
19354
+ "url": "#/$defs/YoutubeUrlSource"
19355
+ },
19356
+ "propertyName": "kind"
19357
+ },
19358
+ "oneOf": [
19359
+ {
19360
+ "$ref": "#/$defs/YoutubeUrlSource"
19361
+ },
19362
+ {
19363
+ "$ref": "#/$defs/YoutubeAssetSource"
19364
+ }
19365
+ ],
19366
+ "title": "Source"
19367
+ }
19368
+ },
19369
+ "required": [
19370
+ "source"
19371
+ ],
19372
+ "title": "YoutubeClipSpec",
19373
+ "type": "object"
19374
+ },
19375
+ "YoutubeUrlSource": {
19376
+ "additionalProperties": false,
19377
+ "properties": {
19378
+ "kind": {
19379
+ "const": "url",
19380
+ "default": "url",
19381
+ "title": "Kind",
19382
+ "type": "string"
19383
+ },
19384
+ "url": {
19385
+ "description": "https://youtube.com|youtu.be \uACF5\uAC1C \uC8FC\uC18C\uB9CC",
19386
+ "minLength": 1,
19387
+ "title": "Url",
19388
+ "type": "string"
19389
+ },
19390
+ "start_s": {
19391
+ "minimum": 0,
19392
+ "title": "Start S",
19393
+ "type": "number"
19394
+ },
19395
+ "end_s": {
19396
+ "exclusiveMinimum": 0,
19397
+ "title": "End S",
19398
+ "type": "number"
19399
+ }
19400
+ },
19401
+ "required": [
19402
+ "url",
19403
+ "start_s",
19404
+ "end_s"
19405
+ ],
19406
+ "title": "YoutubeUrlSource",
19407
+ "type": "object"
19408
+ }
19409
+ }
19410
+ },
19411
+ "annotations": {
19412
+ "readOnlyHint": false,
19413
+ "destructiveHint": false,
19414
+ "idempotentHint": false,
19415
+ "openWorldHint": false
19416
+ }
19417
+ },
19418
+ {
19419
+ "name": "democut_duplicate_cut",
19420
+ "description": "\uCEF7\uC744 \uBCF5\uC81C\uD55C\uB2E4(\uACC4\uD68D\uB9CC, \uBC84\uC804\uC740 \uBCF5\uC81C\uD558\uC9C0 \uC54A\uB294\uB2E4).",
19421
+ "inputSchema": {
19422
+ "type": "object",
19423
+ "properties": {
19424
+ "slug": {
19425
+ "type": "string",
19426
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
19427
+ },
19428
+ "cut_id": {
19429
+ "type": "string",
19430
+ "description": "\uCEF7 id(cut_\u2026)"
19431
+ }
19432
+ },
19433
+ "required": [
19434
+ "slug",
19435
+ "cut_id"
19436
+ ],
19437
+ "additionalProperties": false
19438
+ },
19439
+ "annotations": {
19440
+ "readOnlyHint": false,
19441
+ "destructiveHint": false,
19442
+ "idempotentHint": false,
19443
+ "openWorldHint": false
19444
+ }
19445
+ },
19446
+ {
19447
+ "name": "democut_delete_cut",
19448
+ "description": "\uCEF7\uC744 \uC9C0\uC6B4\uB2E4(\uD65C\uC131 \uC7A1\uC774 \uC788\uC73C\uBA74 409 CUT_BUSY).",
19449
+ "inputSchema": {
19450
+ "type": "object",
19451
+ "properties": {
19452
+ "slug": {
19453
+ "type": "string",
19454
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
19455
+ },
19456
+ "cut_id": {
19457
+ "type": "string",
19458
+ "description": "\uCEF7 id(cut_\u2026)"
19459
+ }
19460
+ },
19461
+ "required": [
19462
+ "slug",
19463
+ "cut_id"
19464
+ ],
19465
+ "additionalProperties": false
19466
+ },
19467
+ "annotations": {
19468
+ "readOnlyHint": false,
19469
+ "destructiveHint": true,
19470
+ "idempotentHint": true,
19471
+ "openWorldHint": false
19472
+ }
19473
+ },
19474
+ {
19475
+ "name": "democut_put_cut_draft",
19476
+ "description": "\uACC4\uD68D(draft_spec)\uC744 \uC804\uCCB4 \uAD50\uCCB4\uD55C\uB2E4(0\uC6D0, If-Match rev). \uB80C\uB354\uD558\uC9C0 \uC54A\uB294\uB2E4.",
19477
+ "inputSchema": {
19478
+ "type": "object",
19479
+ "properties": {
19480
+ "slug": {
19481
+ "type": "string",
19482
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
19483
+ },
19484
+ "cut_id": {
19485
+ "type": "string",
19486
+ "description": "\uCEF7 id(cut_\u2026)"
19487
+ },
19488
+ "spec": {
19489
+ "discriminator": {
19490
+ "mapping": {
19491
+ "ai_video": "#/$defs/AiVideoSpec",
19492
+ "motion_graphic": "#/$defs/MotionGraphicSpec",
19493
+ "youtube_clip": "#/$defs/YoutubeClipSpec"
19494
+ },
19495
+ "propertyName": "mode"
19496
+ },
19497
+ "oneOf": [
19498
+ {
19499
+ "$ref": "#/$defs/MotionGraphicSpec"
19500
+ },
19501
+ {
19502
+ "$ref": "#/$defs/AiVideoSpec"
19503
+ },
19504
+ {
19505
+ "$ref": "#/$defs/YoutubeClipSpec"
19506
+ }
19507
+ ],
19508
+ "title": "Spec"
19509
+ },
19510
+ "rev": {
19511
+ "type": "integer",
19512
+ "minimum": 0,
19513
+ "description": "\uD604\uC7AC rev(get_storyboard \uC758 \uAC12 \uADF8\uB300\uB85C). \uADF8 \uC0AC\uC774 \uBC14\uB00C\uC5C8\uC73C\uBA74 409 REV_MISMATCH"
19514
+ }
19515
+ },
19516
+ "required": [
19517
+ "slug",
19518
+ "cut_id",
19519
+ "spec",
19520
+ "rev"
19521
+ ],
19522
+ "additionalProperties": false,
19523
+ "$defs": {
19524
+ "AiVideoSpec": {
19525
+ "additionalProperties": false,
19526
+ "properties": {
19527
+ "dialogue": {
19528
+ "items": {
19529
+ "$ref": "#/$defs/DialogueLine"
19530
+ },
19531
+ "title": "Dialogue",
19532
+ "type": "array"
19533
+ },
19534
+ "narration_asset_id": {
19535
+ "anyOf": [
19536
+ {
19537
+ "minLength": 1,
19538
+ "type": "string"
19539
+ },
19540
+ {
19541
+ "type": "null"
19542
+ }
19543
+ ],
19544
+ "default": null,
19545
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
19546
+ "title": "Narration Asset Id"
19547
+ },
19548
+ "subtitles": {
19549
+ "default": false,
19550
+ "title": "Subtitles",
19551
+ "type": "boolean"
19552
+ },
19553
+ "host": {
19554
+ "anyOf": [
19555
+ {
19556
+ "type": "string"
19557
+ },
19558
+ {
19559
+ "type": "null"
19560
+ }
19561
+ ],
19562
+ "default": null,
19563
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
19564
+ "title": "Host"
19565
+ },
19566
+ "voice_id": {
19567
+ "anyOf": [
19568
+ {
19569
+ "minLength": 1,
19570
+ "type": "string"
19571
+ },
19572
+ {
19573
+ "type": "null"
19574
+ }
19575
+ ],
19576
+ "default": null,
19577
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
19578
+ "title": "Voice Id"
19579
+ },
19580
+ "pip": {
19581
+ "anyOf": [
19582
+ {
19583
+ "$ref": "#/$defs/PipSpec"
19584
+ },
19585
+ {
19586
+ "type": "null"
19587
+ }
19588
+ ],
19589
+ "default": null,
19590
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
19591
+ },
19592
+ "image_asset_id": {
19593
+ "anyOf": [
19594
+ {
19595
+ "minLength": 1,
19596
+ "type": "string"
19597
+ },
19598
+ {
19599
+ "type": "null"
19600
+ }
19601
+ ],
19602
+ "default": null,
19603
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
19604
+ "title": "Image Asset Id"
19605
+ },
19606
+ "duration_s": {
19607
+ "default": 5,
19608
+ "maximum": 15,
19609
+ "minimum": 4,
19610
+ "title": "Duration S",
19611
+ "type": "number"
19612
+ },
19613
+ "mode": {
19614
+ "const": "ai_video",
19615
+ "default": "ai_video",
19616
+ "title": "Mode",
19617
+ "type": "string"
19618
+ },
19619
+ "image_prompt": {
19620
+ "maxLength": 4e3,
19621
+ "minLength": 1,
19622
+ "title": "Image Prompt",
19623
+ "type": "string"
19624
+ },
19625
+ "provider": {
19626
+ "anyOf": [
19627
+ {
19628
+ "maxLength": 32,
19629
+ "minLength": 1,
19630
+ "type": "string"
19631
+ },
19632
+ {
19633
+ "type": "null"
19634
+ }
19635
+ ],
19636
+ "default": null,
19637
+ "description": "\uC601\uC0C1 \uC0DD\uC131 \uACF5\uAE09\uC790(\uC608: minimax). \uBE44\uC6B0\uBA74 \uC11C\uBC84 \uAE30\uBCF8\uAC12 \u2014 \uC4F8 \uC218 \uC788\uB294 \uBAA9\uB85D\uC740 GET \u2026/options \uC758 videogen_providers",
19638
+ "title": "Provider"
19639
+ },
19640
+ "seed": {
19641
+ "anyOf": [
19642
+ {
19643
+ "minimum": 0,
19644
+ "type": "integer"
19645
+ },
19646
+ {
19647
+ "type": "null"
19648
+ }
19649
+ ],
19650
+ "default": null,
19651
+ "title": "Seed"
19652
+ },
19653
+ "image": {
19654
+ "anyOf": [
19655
+ {
19656
+ "discriminator": {
19657
+ "mapping": {
19658
+ "asset": "#/$defs/AssetImageRef",
19659
+ "from_cut": "#/$defs/FromCutImageRef",
19660
+ "from_version": "#/$defs/FromVersionImageRef"
19661
+ },
19662
+ "propertyName": "kind"
19663
+ },
19664
+ "oneOf": [
19665
+ {
19666
+ "$ref": "#/$defs/AssetImageRef"
19667
+ },
19668
+ {
19669
+ "$ref": "#/$defs/FromCutImageRef"
19670
+ },
19671
+ {
19672
+ "$ref": "#/$defs/FromVersionImageRef"
19673
+ }
19674
+ ]
19675
+ },
19676
+ {
19677
+ "type": "null"
19678
+ }
19679
+ ],
19680
+ "default": null,
19681
+ "description": "\uCCAB \uD504\uB808\uC784. \uC5C6\uC73C\uBA74 image_asset_id \u2192 \uADF8\uAC83\uB3C4 \uC5C6\uC73C\uBA74 t2v(\uD14D\uC2A4\uD2B8\uB9CC) \u2014 \uACAC\uC801\uC774 notes \uB85C \uC54C\uB824\uC900\uB2E4",
19682
+ "title": "Image"
19683
+ },
19684
+ "end_image": {
19685
+ "anyOf": [
19686
+ {
19687
+ "discriminator": {
19688
+ "mapping": {
19689
+ "asset": "#/$defs/AssetImageRef",
19690
+ "from_cut": "#/$defs/FromCutImageRef",
19691
+ "from_version": "#/$defs/FromVersionImageRef"
19692
+ },
19693
+ "propertyName": "kind"
19694
+ },
19695
+ "oneOf": [
19696
+ {
19697
+ "$ref": "#/$defs/AssetImageRef"
19698
+ },
19699
+ {
19700
+ "$ref": "#/$defs/FromCutImageRef"
19701
+ },
19702
+ {
19703
+ "$ref": "#/$defs/FromVersionImageRef"
19704
+ }
19705
+ ]
19706
+ },
19707
+ {
19708
+ "type": "null"
19709
+ }
19710
+ ],
19711
+ "default": null,
19712
+ "title": "End Image"
19713
+ }
19714
+ },
19715
+ "required": [
19716
+ "image_prompt"
19717
+ ],
19718
+ "title": "AiVideoSpec",
19719
+ "type": "object"
19720
+ },
19721
+ "AssetImageRef": {
19722
+ "additionalProperties": false,
19723
+ "properties": {
19724
+ "kind": {
19725
+ "const": "asset",
19726
+ "default": "asset",
19727
+ "title": "Kind",
19728
+ "type": "string"
19729
+ },
19730
+ "asset_id": {
19731
+ "minLength": 1,
19732
+ "title": "Asset Id",
19733
+ "type": "string"
19734
+ }
19735
+ },
19736
+ "required": [
19737
+ "asset_id"
19738
+ ],
19739
+ "title": "AssetImageRef",
19740
+ "type": "object"
19741
+ },
19742
+ "DialogueLine": {
19743
+ "additionalProperties": false,
19744
+ "properties": {
19745
+ "id": {
19746
+ "description": "\uC904 id ln_<6> \u2014 \uC81C\uC548 diff \uC758 \uB300\uC870 \uD0A4",
19747
+ "pattern": "^ln_[a-z0-9]{6}$",
19748
+ "title": "Id",
19749
+ "type": "string",
19750
+ "x-diff": "ignore"
19751
+ },
19752
+ "text": {
19753
+ "description": "\uBC1C\uD654 \uD14D\uC2A4\uD2B8(\uC22B\uC790\uB294 \uC11C\uBC84\uAC00 \uC77D\uB294 \uBC95\uC744 \uC815\uD55C\uB2E4 \u2014 \uD480\uC5B4\uC4F0\uC9C0 \uC54A\uB294\uB2E4)",
19754
+ "maxLength": 2e3,
19755
+ "minLength": 1,
19756
+ "title": "Text",
19757
+ "type": "string"
19758
+ },
19759
+ "subtitle_text": {
19760
+ "anyOf": [
19761
+ {
19762
+ "maxLength": 2e3,
19763
+ "type": "string"
19764
+ },
19765
+ {
19766
+ "type": "null"
19767
+ }
19768
+ ],
19769
+ "default": null,
19770
+ "description": "\uC790\uB9C9 \uD45C\uAE30(\uC6D0\uBB38 \uD45C\uAE30). \uC5C6\uC73C\uBA74 text",
19771
+ "title": "Subtitle Text"
19772
+ },
19773
+ "audio_asset_id": {
19774
+ "anyOf": [
19775
+ {
19776
+ "minLength": 1,
19777
+ "type": "string"
19778
+ },
19779
+ {
19780
+ "type": "null"
19781
+ }
19782
+ ],
19783
+ "default": null,
19784
+ "description": "BYO: \uC774 \uC904\uC758 \uB098\uB808\uC774\uC158 \uC624\uB514\uC624 \uC790\uC0B0 \u2014 TTS \uD589 0\uC6D0, \uC815\uB82C \uD589\uB9CC",
19785
+ "title": "Audio Asset Id"
19786
+ }
19787
+ },
19788
+ "required": [
19789
+ "id",
19790
+ "text"
19791
+ ],
19792
+ "title": "DialogueLine",
19793
+ "type": "object"
19794
+ },
19795
+ "FromCutImageRef": {
19796
+ "additionalProperties": false,
19797
+ "properties": {
19798
+ "kind": {
19799
+ "const": "from_cut",
19800
+ "default": "from_cut",
19801
+ "title": "Kind",
19802
+ "type": "string"
19803
+ },
19804
+ "from_cut": {
19805
+ "description": "\uB2E4\uB978 \uCEF7\uC758 \uB300\uD45C \uBC84\uC804 \uD504\uB808\uC784(\uC5F0\uC18D\uC131 \uB3C4\uC6B0\uBBF8)",
19806
+ "minLength": 1,
19807
+ "title": "From Cut",
19808
+ "type": "string"
19809
+ },
19810
+ "frame": {
19811
+ "default": "last",
19812
+ "enum": [
19813
+ "first",
19814
+ "last"
19815
+ ],
19816
+ "title": "Frame",
19817
+ "type": "string"
19818
+ }
19819
+ },
19820
+ "required": [
19821
+ "from_cut"
19822
+ ],
19823
+ "title": "FromCutImageRef",
19824
+ "type": "object"
19825
+ },
19826
+ "FromVersionImageRef": {
19827
+ "additionalProperties": false,
19828
+ "properties": {
19829
+ "kind": {
19830
+ "const": "from_version",
19831
+ "default": "from_version",
19832
+ "title": "Kind",
19833
+ "type": "string"
19834
+ },
19835
+ "from_version": {
19836
+ "description": "\uC774 \uCEF7\uC758 \uD2B9\uC815 \uBC84\uC804 \uD504\uB808\uC784",
19837
+ "minimum": 1,
19838
+ "title": "From Version",
19839
+ "type": "integer"
19840
+ },
19841
+ "frame": {
19842
+ "default": "last",
19843
+ "enum": [
19844
+ "first",
19845
+ "last"
19846
+ ],
19847
+ "title": "Frame",
19848
+ "type": "string"
19849
+ }
19850
+ },
19851
+ "required": [
19852
+ "from_version"
19853
+ ],
19854
+ "title": "FromVersionImageRef",
19855
+ "type": "object"
19856
+ },
19857
+ "MotionGraphicSpec": {
19858
+ "additionalProperties": false,
19859
+ "properties": {
19860
+ "dialogue": {
19861
+ "items": {
19862
+ "$ref": "#/$defs/DialogueLine"
19863
+ },
19864
+ "title": "Dialogue",
19865
+ "type": "array"
19866
+ },
19867
+ "narration_asset_id": {
19868
+ "anyOf": [
19869
+ {
19870
+ "minLength": 1,
19871
+ "type": "string"
19872
+ },
19873
+ {
19874
+ "type": "null"
19875
+ }
19876
+ ],
19877
+ "default": null,
19878
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
19879
+ "title": "Narration Asset Id"
19880
+ },
19881
+ "subtitles": {
19882
+ "default": false,
19883
+ "title": "Subtitles",
19884
+ "type": "boolean"
19885
+ },
19886
+ "host": {
19887
+ "anyOf": [
19888
+ {
19889
+ "type": "string"
19890
+ },
19891
+ {
19892
+ "type": "null"
19893
+ }
19894
+ ],
19895
+ "default": null,
19896
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
19897
+ "title": "Host"
19898
+ },
19899
+ "voice_id": {
19900
+ "anyOf": [
19901
+ {
19902
+ "minLength": 1,
19903
+ "type": "string"
19904
+ },
19905
+ {
19906
+ "type": "null"
19907
+ }
19908
+ ],
19909
+ "default": null,
19910
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
19911
+ "title": "Voice Id"
19912
+ },
19913
+ "pip": {
19914
+ "anyOf": [
19915
+ {
19916
+ "$ref": "#/$defs/PipSpec"
19917
+ },
19918
+ {
19919
+ "type": "null"
19920
+ }
19921
+ ],
19922
+ "default": null,
19923
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
19924
+ },
19925
+ "image_asset_id": {
19926
+ "anyOf": [
19927
+ {
19928
+ "minLength": 1,
19929
+ "type": "string"
19930
+ },
19931
+ {
19932
+ "type": "null"
19933
+ }
19934
+ ],
19935
+ "default": null,
19936
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
19937
+ "title": "Image Asset Id"
19938
+ },
19939
+ "duration_s": {
19940
+ "anyOf": [
19941
+ {
19942
+ "exclusiveMinimum": 0,
19943
+ "maximum": 600,
19944
+ "type": "number"
19945
+ },
19946
+ {
19947
+ "type": "null"
19948
+ }
19949
+ ],
19950
+ "default": null,
19951
+ "title": "Duration S"
19952
+ },
19953
+ "mode": {
19954
+ "const": "motion_graphic",
19955
+ "default": "motion_graphic",
19956
+ "title": "Mode",
19957
+ "type": "string"
19958
+ },
19959
+ "motion_prompt": {
19960
+ "anyOf": [
19961
+ {
19962
+ "maxLength": 4e3,
19963
+ "type": "string"
19964
+ },
19965
+ {
19966
+ "type": "null"
19967
+ }
19968
+ ],
19969
+ "default": null,
19970
+ "title": "Motion Prompt"
19971
+ },
19972
+ "tsx": {
19973
+ "anyOf": [
19974
+ {
19975
+ "maxLength": 2e5,
19976
+ "type": "string"
19977
+ },
19978
+ {
19979
+ "type": "null"
19980
+ }
19981
+ ],
19982
+ "default": null,
19983
+ "description": "BYO Remotion \uCF54\uB4DC(UTF-8 \u2264 200KB) \u2014 codegen \uD589 0\uC6D0, \uAC8C\uC774\uD2B8\uB294 codegen \uACFC \uB3D9\uAE09",
19984
+ "title": "Tsx"
19985
+ },
19986
+ "brand_override": {
19987
+ "anyOf": [
19988
+ {
19989
+ "additionalProperties": true,
19990
+ "type": "object"
19991
+ },
19992
+ {
19993
+ "type": "null"
19994
+ }
19995
+ ],
19996
+ "default": null,
19997
+ "title": "Brand Override"
19998
+ }
19999
+ },
20000
+ "title": "MotionGraphicSpec",
20001
+ "type": "object"
20002
+ },
20003
+ "PipSpec": {
20004
+ "additionalProperties": false,
20005
+ "properties": {
20006
+ "avatar_id": {
20007
+ "minLength": 1,
20008
+ "title": "Avatar Id",
20009
+ "type": "string"
20010
+ },
20011
+ "background_asset_id": {
20012
+ "description": "\uBC30\uACBD\uC740 \uC5B8\uC81C\uB098 \uC790\uC0B0(origin=background \uCE74\uD0C8\uB85C\uADF8 \uB610\uB294 \uC62C\uB9B0 \uC774\uBBF8\uC9C0)",
20013
+ "minLength": 1,
20014
+ "title": "Background Asset Id",
20015
+ "type": "string"
20016
+ },
20017
+ "position": {
20018
+ "default": "br",
20019
+ "enum": [
20020
+ "tl",
20021
+ "tr",
20022
+ "bl",
20023
+ "br"
20024
+ ],
20025
+ "title": "Position",
20026
+ "type": "string"
20027
+ },
20028
+ "size": {
20029
+ "default": "m",
20030
+ "enum": [
20031
+ "s",
20032
+ "m",
20033
+ "l"
20034
+ ],
20035
+ "title": "Size",
20036
+ "type": "string"
20037
+ }
20038
+ },
20039
+ "required": [
20040
+ "avatar_id",
20041
+ "background_asset_id"
20042
+ ],
20043
+ "title": "PipSpec",
20044
+ "type": "object"
20045
+ },
20046
+ "YoutubeAssetSource": {
20047
+ "additionalProperties": false,
20048
+ "properties": {
20049
+ "kind": {
20050
+ "const": "asset",
20051
+ "default": "asset",
20052
+ "title": "Kind",
20053
+ "type": "string"
20054
+ },
20055
+ "asset_id": {
20056
+ "description": "BYO: \uC62C\uB9B0 \uC6D0\uBCF8 \uC601\uC0C1 \u2014 \uB0B4\uB824\uBC1B\uAE30 \uD589 0\uC6D0",
20057
+ "minLength": 1,
20058
+ "title": "Asset Id",
20059
+ "type": "string"
20060
+ },
20061
+ "start_s": {
20062
+ "anyOf": [
20063
+ {
20064
+ "minimum": 0,
20065
+ "type": "number"
20066
+ },
20067
+ {
20068
+ "type": "null"
20069
+ }
20070
+ ],
20071
+ "default": null,
20072
+ "title": "Start S"
20073
+ },
20074
+ "end_s": {
20075
+ "anyOf": [
20076
+ {
20077
+ "exclusiveMinimum": 0,
20078
+ "type": "number"
20079
+ },
20080
+ {
20081
+ "type": "null"
20082
+ }
20083
+ ],
20084
+ "default": null,
20085
+ "title": "End S"
20086
+ }
20087
+ },
20088
+ "required": [
20089
+ "asset_id"
20090
+ ],
20091
+ "title": "YoutubeAssetSource",
20092
+ "type": "object"
20093
+ },
20094
+ "YoutubeClipSpec": {
20095
+ "additionalProperties": false,
20096
+ "properties": {
20097
+ "dialogue": {
20098
+ "items": {
20099
+ "$ref": "#/$defs/DialogueLine"
20100
+ },
20101
+ "title": "Dialogue",
20102
+ "type": "array"
20103
+ },
20104
+ "narration_asset_id": {
20105
+ "anyOf": [
20106
+ {
20107
+ "minLength": 1,
20108
+ "type": "string"
20109
+ },
20110
+ {
20111
+ "type": "null"
20112
+ }
20113
+ ],
20114
+ "default": null,
20115
+ "description": "BYO: \uCEF7 \uC804\uCCB4 \uB098\uB808\uC774\uC158 wav \uD55C \uAC1C(\uB300\uC0AC\uAC00 \uC788\uC5B4\uC57C \uD55C\uB2E4 \u2014 \uC790\uB9C9\xB7\uD0C0\uC774\uBC0D\uC758 \uADFC\uAC70). \uC904\uBCC4 audio_asset_id \uC640 \uB3D9\uC2DC \uC9C0\uC815 422",
20116
+ "title": "Narration Asset Id"
20117
+ },
20118
+ "subtitles": {
20119
+ "default": false,
20120
+ "title": "Subtitles",
20121
+ "type": "boolean"
20122
+ },
20123
+ "host": {
20124
+ "anyOf": [
20125
+ {
20126
+ "type": "string"
20127
+ },
20128
+ {
20129
+ "type": "null"
20130
+ }
20131
+ ],
20132
+ "default": null,
20133
+ "description": "\uC9C4\uD589 \u2014 \uD5C8\uC6A9 \uC9D1\uD569\uC740 \uCE74\uD0C8\uB85C\uADF8(\uBC29\uC2DD\uBCC4). \uBAA8\uC158\uADF8\uB798\uD53D\uC740 \uD544\uC218",
20134
+ "title": "Host"
20135
+ },
20136
+ "voice_id": {
20137
+ "anyOf": [
20138
+ {
20139
+ "minLength": 1,
20140
+ "type": "string"
20141
+ },
20142
+ {
20143
+ "type": "null"
20144
+ }
20145
+ ],
20146
+ "default": null,
20147
+ "description": "host\u2208{voice,avatar} \uC774\uACE0 BYO \uC624\uB514\uC624\uAC00 \uC5C6\uC744 \uB54C \uD544\uC218",
20148
+ "title": "Voice Id"
20149
+ },
20150
+ "pip": {
20151
+ "anyOf": [
20152
+ {
20153
+ "$ref": "#/$defs/PipSpec"
20154
+ },
20155
+ {
20156
+ "type": "null"
20157
+ }
20158
+ ],
20159
+ "default": null,
20160
+ "description": "host=avatar \uC77C \uB54C \uD544\uC218"
20161
+ },
20162
+ "image_asset_id": {
20163
+ "anyOf": [
20164
+ {
20165
+ "minLength": 1,
20166
+ "type": "string"
20167
+ },
20168
+ {
20169
+ "type": "null"
20170
+ }
20171
+ ],
20172
+ "default": null,
20173
+ "description": "\uCEF7 \uC774\uBBF8\uC9C0\uB97C spec \uC5D0\uC11C \uC9C1\uC811 \uC9C0\uC815(\uC5D0\uC774\uC804\uD2B8 \uC6D0\uC0F7\uC6A9)",
20174
+ "title": "Image Asset Id"
20175
+ },
20176
+ "duration_s": {
20177
+ "anyOf": [
20178
+ {
20179
+ "exclusiveMinimum": 0,
20180
+ "maximum": 600,
20181
+ "type": "number"
20182
+ },
20183
+ {
20184
+ "type": "null"
20185
+ }
20186
+ ],
20187
+ "default": null,
20188
+ "title": "Duration S"
20189
+ },
20190
+ "mode": {
20191
+ "const": "youtube_clip",
20192
+ "default": "youtube_clip",
20193
+ "title": "Mode",
20194
+ "type": "string"
20195
+ },
20196
+ "source": {
20197
+ "discriminator": {
20198
+ "mapping": {
20199
+ "asset": "#/$defs/YoutubeAssetSource",
20200
+ "url": "#/$defs/YoutubeUrlSource"
20201
+ },
20202
+ "propertyName": "kind"
20203
+ },
20204
+ "oneOf": [
20205
+ {
20206
+ "$ref": "#/$defs/YoutubeUrlSource"
20207
+ },
20208
+ {
20209
+ "$ref": "#/$defs/YoutubeAssetSource"
20210
+ }
20211
+ ],
20212
+ "title": "Source"
20213
+ }
20214
+ },
20215
+ "required": [
20216
+ "source"
20217
+ ],
20218
+ "title": "YoutubeClipSpec",
20219
+ "type": "object"
20220
+ },
20221
+ "YoutubeUrlSource": {
20222
+ "additionalProperties": false,
20223
+ "properties": {
20224
+ "kind": {
20225
+ "const": "url",
20226
+ "default": "url",
20227
+ "title": "Kind",
20228
+ "type": "string"
20229
+ },
20230
+ "url": {
20231
+ "description": "https://youtube.com|youtu.be \uACF5\uAC1C \uC8FC\uC18C\uB9CC",
20232
+ "minLength": 1,
20233
+ "title": "Url",
20234
+ "type": "string"
20235
+ },
20236
+ "start_s": {
20237
+ "minimum": 0,
20238
+ "title": "Start S",
20239
+ "type": "number"
20240
+ },
20241
+ "end_s": {
20242
+ "exclusiveMinimum": 0,
20243
+ "title": "End S",
20244
+ "type": "number"
20245
+ }
20246
+ },
20247
+ "required": [
20248
+ "url",
20249
+ "start_s",
20250
+ "end_s"
20251
+ ],
20252
+ "title": "YoutubeUrlSource",
20253
+ "type": "object"
20254
+ }
20255
+ }
20256
+ },
20257
+ "annotations": {
20258
+ "readOnlyHint": false,
20259
+ "destructiveHint": false,
20260
+ "idempotentHint": true,
20261
+ "openWorldHint": false
20262
+ }
20263
+ },
20264
+ {
20265
+ "name": "democut_set_cut_edit",
20266
+ "description": "\uC7AC\uC0DD \uAD6C\uAC04\xB7\uBB34\uC74C \uC790\uB974\uAE30(0\uC6D0, \uB80C\uB354 \uD30C\uC77C \uBD88\uBCC0 \u2014 \uC7AC\uC0DD\xB7\uC644\uC131\uBCF8\uC5D0\uB9CC \uC801\uC6A9).",
20267
+ "inputSchema": {
20268
+ "type": "object",
20269
+ "properties": {
20270
+ "slug": {
20271
+ "type": "string",
20272
+ "description": "\uD504\uB85C\uC81D\uD2B8 \uC2AC\uB7EC\uADF8(list_projects)"
20273
+ },
20274
+ "cut_id": {
20275
+ "type": "string",
20276
+ "description": "\uCEF7 id(cut_\u2026)"
20277
+ },
20278
+ "edit": {
20279
+ "$ref": "#/$defs/CutEdit"
20280
+ }
20281
+ },
20282
+ "required": [
20283
+ "slug",
20284
+ "cut_id",
20285
+ "edit"
20286
+ ],
20287
+ "additionalProperties": false,
20288
+ "$defs": {
20289
+ "CutEdit": {
20290
+ "additionalProperties": false,
20291
+ "properties": {
20292
+ "trim_in_ms": {
20293
+ "default": 0,
20294
+ "minimum": 0,
20295
+ "title": "Trim In Ms",
20296
+ "type": "integer"
20297
+ },
20298
+ "trim_out_ms": {
20299
+ "anyOf": [
20300
+ {
20301
+ "minimum": 1,
20302
+ "type": "integer"
20303
+ },
20304
+ {
20305
+ "type": "null"
20306
+ }
20307
+ ],
20308
+ "default": null,
20309
+ "title": "Trim Out Ms"
20310
+ },
20311
+ "silence_removal": {
20312
+ "default": false,
20313
+ "title": "Silence Removal",
20314
+ "type": "boolean"
20315
+ },
20316
+ "silence_threshold_ms": {
20317
+ "default": 800,
20318
+ "maximum": 5e3,
20319
+ "minimum": 100,
20320
+ "title": "Silence Threshold Ms",
20321
+ "type": "integer"
20322
+ }
20323
+ },
20324
+ "title": "CutEdit",
20325
+ "type": "object"
20326
+ }
20327
+ }
20328
+ },
20329
+ "annotations": {
20330
+ "readOnlyHint": false,
20331
+ "destructiveHint": false,
20332
+ "idempotentHint": true,
20333
+ "openWorldHint": false
20334
+ }
20335
+ }
20336
+ ];
20337
+
20338
+ // src/api-errors.ts
20339
+ var TOOL_BASE_NAMES = GENERATED_TOOLS.map((t) => t.name.replace(/^democut_/, "")).sort((a, b) => b.length - a.length);
20340
+ var escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
20341
+ var NAME_PATTERNS = TOOL_BASE_NAMES.map((name) => [
20342
+ new RegExp(`(?<!democut_)(?<![\\w.])${escapeRe(name)}(?![\\w{(])`, "g"),
20343
+ `democut_${name}`
20344
+ ]);
20345
+ function callableToolNames(text) {
20346
+ let out2 = text;
20347
+ for (const [re, replacement] of NAME_PATTERNS) out2 = out2.replace(re, replacement);
20348
+ return out2;
20349
+ }
20350
+ function usd(v) {
20351
+ return v < 0.01 ? `$${v.toFixed(4)}` : `$${v.toFixed(2)}`;
20352
+ }
20353
+ function classifyApiError(e, ctx) {
20354
+ const hint = ctx.statusHint ?? "\uC0C1\uD0DC \uC870\uD68C";
20355
+ const contractHint = typeof e.extra.hint === "string" ? callableToolNames(e.extra.hint) : null;
20356
+ if (contractHint) {
20357
+ const lines = [contractHint];
20358
+ if (ctx.submitted) {
20359
+ lines.push(
20360
+ e.status < 500 ? "\uC544\uC9C1 \uC544\uBB34\uAC83\uB3C4 \uC81C\uCD9C\uB418\uC9C0 \uC54A\uC558\uACE0 \uACFC\uAE08\uB3C4 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC694\uCCAD\uC744 \uACE0\uCCD0 \uB2E4\uC2DC \uD638\uCD9C\uD558\uC138\uC694." : `\u26A0\uFE0F \uC81C\uCD9C\uC774 \uC811\uC218\uB410\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uC2DC \uBCF4\uB0B4\uC9C0 \uB9D0\uACE0 ${hint} \uB85C \uC0C1\uD0DC\uB97C \uBA3C\uC800 \uD655\uC778\uD558\uC138\uC694.`
20361
+ );
20362
+ }
20363
+ return {
20364
+ safety: e.status >= 500 && ctx.submitted ? "unsafe" : e.retriable === false ? "fixable" : "safe",
20365
+ notCharged: e.status < 500,
20366
+ lines
20367
+ };
20368
+ }
20369
+ if (e.status === 422 && e.code === "VIDEOGEN_UPSTREAM_REJECTED") {
20370
+ return {
20371
+ safety: "unsafe",
20372
+ // 돈이 나갔다가 돌아왔다 — "애초에 과금이 없었다" 와는 다르다. 그 구분을 흐리면
20373
+ // 원장을 보는 사람이 이 거래를 설명하지 못한다.
20374
+ notCharged: false,
20375
+ lines: [
20376
+ "\uC5C5\uC2A4\uD2B8\uB9BC\uC774 \uC774 \uC791\uC5C5\uC744 \uC601\uAD6C \uAC70\uBD80\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC870\uD68C\uD574\uB3C4 \uBCF5\uAD6C\uB418\uC9C0 \uC54A\uC73C\uBA70, \uACFC\uAE08\uC740 \uD658\uBD88\uB410\uC2B5\uB2C8\uB2E4.",
20377
+ "\uACE0\uCE60 \uD30C\uB77C\uBBF8\uD130\uAC00 \uC788\uB294 \uC624\uB958\uAC00 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uC0C8\uB85C \uB9CC\uB4E4\uB824\uBA74 \uD504\uB86C\uD504\uD2B8\xB7\uC124\uC815\uC744 \uBC14\uAFD4 **\uC0C8\uB85C \uC81C\uCD9C**\uD574\uC57C \uD558\uACE0, \uADF8\uAC74 \uB2E4\uC2DC \uACFC\uAE08\uB429\uB2C8\uB2E4(\uC0AC\uC6A9\uC790 \uB3D9\uC758\uB97C \uBC1B\uC73C\uC138\uC694)."
20378
+ ]
20379
+ };
20380
+ }
20381
+ if (e.status === 404 && e.code === "VIDEOGEN_JOB_NOT_FOUND") {
20382
+ return {
20383
+ safety: "unsafe",
20384
+ notCharged: false,
20385
+ lines: [
20386
+ "\uADF8 \uC791\uC5C5\uC744 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. job_id \uAC00 \uB9DE\uB294\uC9C0 \uBA3C\uC800 \uD655\uC778\uD558\uC138\uC694.",
20387
+ "\u26A0\uFE0F \uC791\uC5C5\uC774 \uC0B4\uC544 \uC788\uB294\uB370 \uC870\uD68C\uB9CC \uC5B4\uAE0B\uB0AC\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC0C8\uB85C \uC81C\uCD9C\uD558\uBA74 **\uBCC4\uB3C4 \uC791\uC5C5\uC73C\uB85C \uB2E4\uC2DC \uACFC\uAE08**\uB429\uB2C8\uB2E4."
20388
+ ]
20389
+ };
20390
+ }
20391
+ if (e.status === 402) {
20392
+ const lines = [];
20393
+ const limit = e.extra.limit_usd;
20394
+ const would = e.extra.would_cost_usd;
20395
+ if (typeof limit === "number" && typeof would === "number") {
20396
+ lines.push(`\uC0C1\uD55C ${usd(limit)} \xB7 \uC774 \uC694\uCCAD ${usd(would)}`);
20397
+ }
20398
+ lines.push("\uD574\uC0C1\uB3C4\uB098 \uAE38\uC774\uB97C \uB0AE\uCDB0 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694. \uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
20399
+ return { safety: "fixable", notCharged: true, lines };
20400
+ }
20401
+ if (e.status === 422) {
20402
+ const unknown2 = e.extra.unknownFields;
20403
+ if (Array.isArray(unknown2) && unknown2.length) {
20404
+ return {
20405
+ safety: "fixable",
20406
+ notCharged: true,
20407
+ lines: [
20408
+ `\uC11C\uBC84\uAC00 \uC544\uC9C1 \uBAA8\uB974\uB294 \uC778\uC790\uC785\uB2C8\uB2E4: ${unknown2.join(", ")} \u2014 \uBC30\uD3EC\uAC00 \uACB9\uCE58\uB294 \uC911\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,
20409
+ "\uADF8 \uC778\uC790\uB9CC \uBE7C\uACE0 \uB098\uBA38\uC9C0\uB294 \uADF8\uB300\uB85C \uB2E4\uC2DC \uBCF4\uB0B4\uC138\uC694. \uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."
20410
+ ]
20411
+ };
20412
+ }
20413
+ return {
20414
+ safety: "fixable",
20415
+ notCharged: true,
20416
+ lines: ["\uD30C\uB77C\uBBF8\uD130\uB97C \uACE0\uCCD0 \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC138\uC694. \uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."]
20417
+ };
20418
+ }
20419
+ if (e.status === 503) {
20420
+ return {
20421
+ safety: "safe",
20422
+ notCharged: true,
20423
+ lines: ["\uC77C\uC2DC\uC801\uC778 \uC624\uB958\uC785\uB2C8\uB2E4. \uC7A0\uC2DC \uD6C4 \uADF8\uB300\uB85C \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uB3C4 \uC548\uC804\uD569\uB2C8\uB2E4."]
20424
+ };
20425
+ }
20426
+ if (e.status === 502) {
20427
+ return ctx.submitted ? {
20428
+ safety: "unsafe",
20429
+ notCharged: false,
20430
+ lines: [
20431
+ "\u26A0\uFE0F \uC81C\uCD9C\uC774 \uC774\uBBF8 \uC811\uC218\uB410\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC81C\uCD9C\uD558\uBA74 \uB450 \uBC88 \uACFC\uAE08\uB429\uB2C8\uB2E4 \u2014",
20432
+ `\uC7AC\uC2DC\uB3C4\uD558\uC9C0 \uB9D0\uACE0 ${hint} \uB85C \uD655\uC778\uD558\uAC70\uB098 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694.`
20433
+ ]
20434
+ } : {
20435
+ safety: "safe",
20436
+ notCharged: true,
20437
+ lines: [
20438
+ "\uC5C5\uC2A4\uD2B8\uB9BC \uC624\uB958\uC785\uB2C8\uB2E4. \uC774 \uC694\uCCAD\uC740 \uBD80\uC791\uC6A9\uC774 \uC5C6\uC73C\uBBC0\uB85C \uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uB3C4 \uC548\uC804\uD569\uB2C8\uB2E4."
20439
+ ]
20440
+ };
20441
+ }
18510
20442
  if (e.status === 404) {
18511
20443
  const lines = [];
18512
20444
  if (e.code === "VIDEOGEN_PROJECT_NOT_FOUND") {
@@ -18588,7 +20520,17 @@ function parseDetail(status, body) {
18588
20520
  const msg = typeof item.msg === "string" ? item.msg : JSON.stringify(e);
18589
20521
  return where ? `${where}: ${msg}` : msg;
18590
20522
  });
18591
- return new ApiError(status, "VALIDATION_ERROR", lines.join("\n"), true);
20523
+ const unknownFields = detail.filter((e) => e.type === "extra_forbidden").map((e) => {
20524
+ const loc = e.loc;
20525
+ return Array.isArray(loc) ? String(loc[loc.length - 1]) : "";
20526
+ }).filter(Boolean);
20527
+ return new ApiError(
20528
+ status,
20529
+ "VALIDATION_ERROR",
20530
+ lines.join("\n"),
20531
+ true,
20532
+ unknownFields.length ? { unknownFields } : {}
20533
+ );
18592
20534
  }
18593
20535
  return new ApiError(status, `HTTP_${status}`, `\uC694\uCCAD\uC774 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4 (HTTP ${status}).`, null);
18594
20536
  }
@@ -19000,12 +20942,32 @@ function uploadAsset(a = {}, deps = {}) {
19000
20942
  return {
19001
20943
  text: [
19002
20944
  `\uC790\uC0B0 ${view.id} (${view.kind}) \uB97C \uAC00\uC838\uC624\uB294 \uC911\uC785\uB2C8\uB2E4 \u2014 state=${view.state}`,
19003
- "democut_get_cut \uC774 \uC544\uB2C8\uB77C \uC790\uC0B0 \uC870\uD68C\uB85C state \uAC00 ready \uAC00 \uB420 \uB54C\uAE4C\uC9C0 \uAE30\uB2E4\uB9B0 \uB4A4 \uC4F0\uC138\uC694.",
20945
+ "democut_get_asset \uC73C\uB85C state \uAC00 ready \uAC00 \uB420 \uB54C\uAE4C\uC9C0 \uAE30\uB2E4\uB9B0 \uB4A4 \uADF8 id \uB97C spec \uC5D0 \uC4F0\uC138\uC694.",
19004
20946
  "\uC2E4\uD328\uD558\uBA74 state=deleted \uAC00 \uB418\uACE0 \uC0AC\uC720\uB294 meta.error \uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."
19005
20947
  ].join("\n")
19006
20948
  };
19007
20949
  });
19008
20950
  }
20951
+ function getAsset(a = {}, deps = {}) {
20952
+ return guarded(READ_ONLY, async () => {
20953
+ if (!a.asset_id) return { isError: true, text: "asset_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
20954
+ const base = resolveBaseUrl(deps.baseUrl);
20955
+ const view = await apiRequest(base, `/api/assets/${encodeURIComponent(a.asset_id)}`, {}, deps);
20956
+ const lines = [`\uC790\uC0B0 ${view.id} (${view.kind}) \u2014 state=${view.state}`];
20957
+ if (view.state === "ready") {
20958
+ lines.push("\uC774 id \uB97C \uCEF7 spec \uC5D0 \uC4F0\uBA74 \uB429\uB2C8\uB2E4.");
20959
+ if (view.download_url) {
20960
+ lines.push(`\uB2E4\uC6B4\uB85C\uB4DC: ${view.download_url} (\uC11C\uBA85 URL \u2014 \uB9CC\uB8CC\uB418\uBA74 \uC774 \uB3C4\uAD6C\uB97C \uB2E4\uC2DC \uBD80\uB974\uC138\uC694)`);
20961
+ }
20962
+ } else if (view.state === "pending") {
20963
+ lines.push("\uC544\uC9C1 \uAC00\uC838\uC624\uB294 \uC911\uC785\uB2C8\uB2E4 \u2014 \uC7A0\uC2DC \uB4A4 \uB2E4\uC2DC \uBD80\uB974\uC138\uC694.");
20964
+ } else {
20965
+ const error2 = view.meta?.error;
20966
+ lines.push(`\uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4${typeof error2 === "string" ? ` \u2014 ${error2}` : ""}. \uB2E4\uB978 \uC790\uC0B0\uC744 \uC62C\uB9AC\uC138\uC694.`);
20967
+ }
20968
+ return { text: lines.join("\n") };
20969
+ });
20970
+ }
19009
20971
  function estimateCuts(a = {}, deps = {}) {
19010
20972
  return guarded(READ_ONLY, async () => {
19011
20973
  const slug = needSlug(a);
@@ -19024,7 +20986,7 @@ function estimateCuts(a = {}, deps = {}) {
19024
20986
  lines.push(` ${label}: \uACAC\uC801 \uBD88\uAC00 \u2014 ${item.blocked_reason}`);
19025
20987
  continue;
19026
20988
  }
19027
- const rows = (item.rows ?? []).map((r) => `${r.key} ${krw(r.krw)}`).join(", ") || "\uD589 \uC5C6\uC74C";
20989
+ const rows = (item.rows ?? []).map((r) => `${r.display_name || r.key} ${krw(r.krw)}`).join(", ") || "\uD589 \uC5C6\uC74C";
19028
20990
  lines.push(` ${label}: ${krw(item.total_krw ?? 0)} (${rows})`);
19029
20991
  }
19030
20992
  lines.push(
@@ -19033,9 +20995,92 @@ function estimateCuts(a = {}, deps = {}) {
19033
20995
  "\uC774 total_krw\xB7rate_version \uC744 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBCF4\uC5EC \uC8FC\uACE0 **\uADF8\uB300\uB85C** democut_make_cuts \uC5D0 \uB123\uC73C\uC138\uC694."
19034
20996
  );
19035
20997
  if (out2.mock) lines.push("(mock \uB2E8\uAC00\uC785\uB2C8\uB2E4 \u2014 \uC2E4\uC81C \uCCAD\uAD6C\uC640 \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4.)");
20998
+ for (const note of out2.notes ?? []) {
20999
+ lines.push(`\u258E ${note.cut_id ? `${note.cut_id}: ` : ""}${callableToolNames(note.message)}`);
21000
+ }
19036
21001
  return { text: lines.join("\n") };
19037
21002
  });
19038
21003
  }
21004
+ function cutImageLine(cut) {
21005
+ const n = cut.images?.length ?? 0;
21006
+ if (!n) return `${cut.id}: \uC774\uBBF8\uC9C0 \uC5C6\uC74C \u2014 \uB2E4\uC74C \uC601\uC0C1\uC740 \uD14D\uC2A4\uD2B8\uB9CC\uC73C\uB85C \uB9CC\uB4ED\uB2C8\uB2E4(t2v).`;
21007
+ const cover = cut.current_image_id ? `\uB300\uD45C ${cut.current_image_id}` : "\uB300\uD45C \uC5C6\uC74C";
21008
+ const tail = cut.current_image_id ? " \u2014 \uB2E4\uC74C \uC601\uC0C1\uC758 \uCCAB \uD504\uB808\uC784\uC774 \uB429\uB2C8\uB2E4." : "";
21009
+ return `${cut.id}: \uC774\uBBF8\uC9C0 ${n}\uC7A5 \xB7 ${cover}${tail}`;
21010
+ }
21011
+ function setCutImage(a = {}, deps = {}) {
21012
+ return guarded(READ_ONLY, async () => {
21013
+ const slug = needSlug(a);
21014
+ if (typeof slug !== "string") return slug;
21015
+ const cutId = (a.cut_id ?? "").trim();
21016
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21017
+ const assetId = (a.asset_id ?? "").trim();
21018
+ if (!assetId && a.from_version == null) {
21019
+ return {
21020
+ isError: true,
21021
+ text: "asset_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 democut_upload_asset \uC73C\uB85C \uC774\uBBF8\uC9C0\uB97C \uBA3C\uC800 \uC62C\uB9AC\uC138\uC694."
21022
+ };
21023
+ }
21024
+ const base = resolveBaseUrl(deps.baseUrl);
21025
+ const out2 = await apiRequest(
21026
+ base,
21027
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/images`),
21028
+ {
21029
+ method: "POST",
21030
+ // ★ 광고한 인자는 **전부 넘긴다** — 안 넘기면 모델이 값을 넣었는데 아무 일도 일어나지 않고
21031
+ // 오류도 안 난다(이 레포가 반복해 밟은 결함 클래스, `mcp-server.test.ts` 가드).
21032
+ body: {
21033
+ ...assetId ? { asset_id: assetId } : {},
21034
+ // ★ `!= null` 이다 — `0` 은 계약이 422 로 거부할 값이고, 그 판정은 **서버가** 한다.
21035
+ // 여기서 falsy 로 걸러 버리면 잘못된 값이 조용히 사라져 오류조차 안 난다.
21036
+ ...a.from_version != null ? { from_version: a.from_version } : {},
21037
+ ...a.frame ? { frame: a.frame } : {}
21038
+ }
21039
+ },
21040
+ deps
21041
+ );
21042
+ const added = out2.images?.[out2.images.length - 1];
21043
+ const first = added && out2.current_image_id === added.id && (out2.images?.length ?? 0) === 1;
21044
+ return { text: `\uCEF7 \uC774\uBBF8\uC9C0\uB97C \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4. ${cutImageLine(out2)}${first ? " \uCCAB \uC774\uBBF8\uC9C0\uB77C \uB300\uD45C\uB85C \uC815\uD588\uC2B5\uB2C8\uB2E4." : ""}` };
21045
+ });
21046
+ }
21047
+ function selectCutImage(a = {}, deps = {}) {
21048
+ return guarded(READ_ONLY, async () => {
21049
+ const slug = needSlug(a);
21050
+ if (typeof slug !== "string") return slug;
21051
+ const cutId = (a.cut_id ?? "").trim();
21052
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21053
+ const imageId = (a.image_id ?? "").trim();
21054
+ if (!imageId) {
21055
+ return { isError: true, text: "image_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 democut_get_cut \uC758 images[].id \uB97C \uC4F0\uC138\uC694." };
21056
+ }
21057
+ const base = resolveBaseUrl(deps.baseUrl);
21058
+ const out2 = await apiRequest(
21059
+ base,
21060
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/images/current`),
21061
+ { method: "PUT", body: { image_id: imageId } },
21062
+ deps
21063
+ );
21064
+ return { text: `\uB300\uD45C \uCEF7 \uC774\uBBF8\uC9C0\uB97C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4. ${cutImageLine(out2)} \uC774\uBBF8 \uB9CC\uB4E0 \uBC84\uC804\uC740 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.` };
21065
+ });
21066
+ }
21067
+ function deleteCutImage(a = {}, deps = {}) {
21068
+ return guarded(READ_ONLY, async () => {
21069
+ const slug = needSlug(a);
21070
+ if (typeof slug !== "string") return slug;
21071
+ const cutId = (a.cut_id ?? "").trim();
21072
+ const imageId = (a.image_id ?? "").trim();
21073
+ if (!cutId || !imageId) return { isError: true, text: "cut_id \uC640 image_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21074
+ const base = resolveBaseUrl(deps.baseUrl);
21075
+ await apiRequest(
21076
+ base,
21077
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/images/${encodeURIComponent(imageId)}`),
21078
+ { method: "DELETE" },
21079
+ deps
21080
+ );
21081
+ return { text: `\uCEF7 \uC774\uBBF8\uC9C0 ${imageId} \uB97C \uC9C0\uC6E0\uC2B5\uB2C8\uB2E4. \uC790\uC0B0\uC740 \uB0A8\uC2B5\uB2C8\uB2E4(\uC790\uC0B0 \uCE35\uC774 \uAD00\uB9AC\uD569\uB2C8\uB2E4).` };
21082
+ });
21083
+ }
19039
21084
  function makeCuts(a = {}, deps = {}) {
19040
21085
  return guarded(SUBMITTING, async () => {
19041
21086
  const slug = needSlug(a);
@@ -19064,6 +21109,13 @@ function makeCuts(a = {}, deps = {}) {
19064
21109
  });
19065
21110
  }
19066
21111
  var WAIT_CHUNK_S = 30;
21112
+ var WAIT_CALL_CAP_S = 60;
21113
+ function waitBudgetLimits() {
21114
+ const schema = GENERATED_TOOLS.find((t) => t.name === "democut_wait_jobs")?.inputSchema;
21115
+ const field = schema?.properties?.timeout_s;
21116
+ const num = (v, fb) => typeof v === "number" && Number.isFinite(v) ? v : fb;
21117
+ return { fallback: num(field?.default, 600), max: WAIT_CALL_CAP_S };
21118
+ }
19067
21119
  var LIST_LINES = 20;
19068
21120
  function listing(lines) {
19069
21121
  if (lines.length <= LIST_LINES) return lines;
@@ -19072,7 +21124,9 @@ function listing(lines) {
19072
21124
  var ACTIVE_JOB_STATES = /* @__PURE__ */ new Set(["queued", "running"]);
19073
21125
  function jobLine(j) {
19074
21126
  const bits = [`${j.job_id} [${j.state}] ${j.kind}`];
19075
- if (j.progress?.pct != null) bits.push(`${Math.round(j.progress.pct)}%`);
21127
+ if (ACTIVE_JOB_STATES.has(j.state) && j.progress?.pct != null) {
21128
+ bits.push(`${Math.round(j.progress.pct)}%`);
21129
+ }
19076
21130
  if (j.error) bits.push(`\uC624\uB958 ${j.error.code}: ${j.error.message}`);
19077
21131
  if (j.result?.version != null) bits.push(`\u2192 v${j.result.version}`);
19078
21132
  return bits.join(" \xB7 ");
@@ -19080,7 +21134,8 @@ function jobLine(j) {
19080
21134
  function waitJobs(a = {}, deps = {}) {
19081
21135
  return guarded(READ_ONLY, async () => {
19082
21136
  const base = resolveBaseUrl(deps.baseUrl);
19083
- const budget = Math.max(0, Math.min(Math.trunc(a.timeout_s ?? 600), 600));
21137
+ const { fallback, max } = waitBudgetLimits();
21138
+ const budget = Math.max(0, Math.min(Math.trunc(a.timeout_s ?? fallback), max));
19084
21139
  const deadline = Date.now() + budget * 1e3;
19085
21140
  let ids = [...a.job_ids ?? []];
19086
21141
  let narrowed = false;
@@ -19129,14 +21184,8 @@ function getCut(a = {}, deps = {}) {
19129
21184
  if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
19130
21185
  const base = resolveBaseUrl(deps.baseUrl);
19131
21186
  const cut = await apiRequest(base, projectPath(slug, `/cuts/${encodeURIComponent(cutId)}`), {}, deps);
19132
- const head = [`${cut.id} [${cut.state}] ${cut.mode}`];
19133
- if (cut.title) head.push(`\u300C${cut.title}\u300D`);
19134
- if (cut.current_version != null) head.push(`\uB300\uD45C v${cut.current_version}`);
19135
- if (cut.dirty_fields?.length) head.push(`\uB2EC\uB77C\uC9C4 \uD544\uB4DC: ${cut.dirty_fields.join(", ")}`);
19136
- if (cut.estimated_cost_krw != null) head.push(`\uC608\uC0C1 ${krw(cut.estimated_cost_krw)}`);
19137
- if (cut.blocked_reason) head.push(`\uB9C9\uD798: ${cut.blocked_reason}`);
19138
21187
  const versions = [...cut.versions ?? []].sort((x, y) => y.version - x.version);
19139
- const lines = [head.join(" \xB7 ")];
21188
+ const lines = [cutLine(cut)];
19140
21189
  lines.push(
19141
21190
  ...listing(
19142
21191
  versions.map((v) => {
@@ -19145,10 +21194,161 @@ function getCut(a = {}, deps = {}) {
19145
21194
  })
19146
21195
  )
19147
21196
  );
19148
- if (cut.next_calls?.length) lines.push(`\uB2E4\uC74C \uD638\uCD9C: ${cut.next_calls.join(", ")}`);
21197
+ if (cut.next_calls?.length)
21198
+ lines.push(callableToolNames(`\uB2E4\uC74C \uD638\uCD9C: ${cut.next_calls.join(", ")}`));
21199
+ return { text: lines.join("\n") };
21200
+ });
21201
+ }
21202
+ function mb(v) {
21203
+ if (v < 1024) return `${v}B`;
21204
+ if (v < 1024 * 1024) return `${Math.round(v / 1024)}KB`;
21205
+ if (v < 1024 * 1024 * 1024) return `${(v / (1024 * 1024)).toFixed(1)}MB`;
21206
+ return `${(v / (1024 * 1024 * 1024)).toFixed(2)}GB`;
21207
+ }
21208
+ function getStoryboard(a = {}, deps = {}) {
21209
+ return guarded(READ_ONLY, async () => {
21210
+ const slug = needSlug(a);
21211
+ if (typeof slug !== "string") return slug;
21212
+ const base = resolveBaseUrl(deps.baseUrl);
21213
+ const board = await apiRequest(base, projectPath(slug, "/storyboard"), {}, deps);
21214
+ const cuts = board.cuts ?? [];
21215
+ const lines = [
21216
+ `\uC2A4\uD1A0\uB9AC\uBCF4\uB4DC rev ${board.rev} \xB7 \uCEF7 ${cuts.length}\uAC1C \xB7 \uC0AC\uC6A9\uB7C9 ${mb(board.usage_bytes ?? 0)}`
21217
+ ];
21218
+ if (board.order?.length) lines.push(`\uC21C\uC11C: ${board.order.join(" \u2192 ")}`);
21219
+ const loose = cuts.filter((c) => c.position == null).map((c) => c.id);
21220
+ if (loose.length) lines.push(`\uC21C\uC11C\uC5D0 \uC5C6\uC74C(\uC644\uC131\uBCF8 \uC81C\uC678): ${loose.join(", ")}`);
21221
+ lines.push(
21222
+ ...listing(
21223
+ cuts.map((c) => ` ${cutLine(c)}`)
21224
+ )
21225
+ );
21226
+ if (board.next_calls?.length)
21227
+ lines.push(callableToolNames(`\uB2E4\uC74C \uD638\uCD9C: ${board.next_calls.join(", ")}`));
21228
+ return { text: lines.join("\n") };
21229
+ });
21230
+ }
21231
+ function cutLine(cut) {
21232
+ const bits = [`${cut.id} [${cut.state}] ${cut.mode}`];
21233
+ if (cut.title) bits.push(`\u300C${cut.title}\u300D`);
21234
+ if (cut.current_version != null) bits.push(`\uB300\uD45C v${cut.current_version}`);
21235
+ if (cut.dirty_fields?.length) bits.push(`\uB2EC\uB77C\uC9C4 \uD544\uB4DC: ${cut.dirty_fields.join(", ")}`);
21236
+ if (cut.estimated_cost_krw != null) bits.push(`\uC608\uC0C1 ${krw(cut.estimated_cost_krw)}`);
21237
+ if (cut.blocked_reason) bits.push(`\uB9C9\uD798: ${callableToolNames(cut.blocked_reason)}`);
21238
+ return bits.join(" \xB7 ");
21239
+ }
21240
+ function addCut(a = {}, deps = {}) {
21241
+ return guarded(READ_ONLY, async () => {
21242
+ const slug = needSlug(a);
21243
+ if (typeof slug !== "string") return slug;
21244
+ const base = resolveBaseUrl(deps.baseUrl);
21245
+ const body = {};
21246
+ for (const k of ["mode", "after", "title", "draft_spec"]) {
21247
+ if (a[k] !== void 0) body[k] = a[k];
21248
+ }
21249
+ const cut = await apiRequest(
21250
+ base,
21251
+ projectPath(slug, "/cuts"),
21252
+ { method: "POST", body },
21253
+ deps
21254
+ );
21255
+ const lines = [cutLine(cut)];
21256
+ if (cut.blocked_reason) lines.push(`\u2192 ${callableToolNames(cut.blocked_reason)}`);
21257
+ if (cut.next_calls?.length)
21258
+ lines.push(callableToolNames(`\uB2E4\uC74C \uD638\uCD9C: ${cut.next_calls.join(", ")}`));
21259
+ return { text: lines.join("\n") };
21260
+ });
21261
+ }
21262
+ var EDIT_NOTE = "\uC774\uBBF8 \uB9CC\uB4E0 \uC601\uC0C1 \uD30C\uC77C\uC740 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\xB7\uC644\uC131\uBCF8\uC5D0\uB9CC \uC801\uC6A9\uB418\uACE0 \uC7AC\uB80C\uB354\uB294 \uC5C6\uC2B5\uB2C8\uB2E4.";
21263
+ function putCutDraft(a = {}, deps = {}) {
21264
+ return guarded(READ_ONLY, async () => {
21265
+ const slug = needSlug(a);
21266
+ if (typeof slug !== "string") return slug;
21267
+ const cutId = (a.cut_id ?? "").trim();
21268
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21269
+ if (a.spec === void 0 || a.spec === null) {
21270
+ return { isError: true, text: "spec \uC774 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uC804\uCCB4 \uAD50\uCCB4\uC785\uB2C8\uB2E4(\uC77C\uBD80\uB9CC \uBC14\uAFB8\uB294 \uAC83\uC774 \uC544\uB2D9\uB2C8\uB2E4)." };
21271
+ }
21272
+ if (a.rev === void 0 || a.rev === null) {
21273
+ return {
21274
+ isError: true,
21275
+ text: callableToolNames("rev \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 get_storyboard \uB85C \uD604\uC7AC rev \uB97C \uC77D\uC5B4 \uADF8\uB300\uB85C \uB123\uC73C\uC138\uC694.")
21276
+ };
21277
+ }
21278
+ const base = resolveBaseUrl(deps.baseUrl);
21279
+ const cut = await apiRequest(
21280
+ base,
21281
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/draft`),
21282
+ { method: "PUT", body: { spec: a.spec }, headers: { "If-Match": String(a.rev) } },
21283
+ deps
21284
+ );
21285
+ const lines = [cutLine(cut)];
21286
+ if (cut.next_calls?.length)
21287
+ lines.push(callableToolNames(`\uB2E4\uC74C \uD638\uCD9C: ${cut.next_calls.join(", ")}`));
19149
21288
  return { text: lines.join("\n") };
19150
21289
  });
19151
21290
  }
21291
+ function setCutEdit(a = {}, deps = {}) {
21292
+ return guarded(READ_ONLY, async () => {
21293
+ const slug = needSlug(a);
21294
+ if (typeof slug !== "string") return slug;
21295
+ const cutId = (a.cut_id ?? "").trim();
21296
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21297
+ if (a.edit === void 0 || a.edit === null) {
21298
+ return { isError: true, text: "edit \uC774 \uD544\uC694\uD569\uB2C8\uB2E4." };
21299
+ }
21300
+ const base = resolveBaseUrl(deps.baseUrl);
21301
+ const cut = await apiRequest(
21302
+ base,
21303
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/edit`),
21304
+ { method: "PUT", body: { edit: a.edit } },
21305
+ deps
21306
+ );
21307
+ return { text: [cutLine(cut), EDIT_NOTE].join("\n") };
21308
+ });
21309
+ }
21310
+ function duplicateCut(a = {}, deps = {}) {
21311
+ return guarded(READ_ONLY, async () => {
21312
+ const slug = needSlug(a);
21313
+ if (typeof slug !== "string") return slug;
21314
+ const cutId = (a.cut_id ?? "").trim();
21315
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21316
+ const base = resolveBaseUrl(deps.baseUrl);
21317
+ const cut = await apiRequest(
21318
+ base,
21319
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}/duplicate`),
21320
+ { method: "POST", body: {} },
21321
+ deps
21322
+ );
21323
+ return {
21324
+ text: [
21325
+ `\uBCF5\uC81C\uB428 \u2014 ${cutLine(cut)}`,
21326
+ callableToolNames("\uC0B0\uCD9C\uBB3C(\uBC84\uC804)\uC740 \uBCF5\uC81C\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uACC4\uD68D\uB9CC \uBCF5\uC0AC\uB410\uC73C\uB2C8 estimate_cuts \uB85C \uACAC\uC801\uC744 \uB0B4\uACE0 \uB9CC\uB4DC\uC138\uC694.")
21327
+ ].join("\n")
21328
+ };
21329
+ });
21330
+ }
21331
+ function deleteCut(a = {}, deps = {}) {
21332
+ return guarded(READ_ONLY, async () => {
21333
+ const slug = needSlug(a);
21334
+ if (typeof slug !== "string") return slug;
21335
+ const cutId = (a.cut_id ?? "").trim();
21336
+ if (!cutId) return { isError: true, text: "cut_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
21337
+ const base = resolveBaseUrl(deps.baseUrl);
21338
+ await apiRequest(
21339
+ base,
21340
+ projectPath(slug, `/cuts/${encodeURIComponent(cutId)}`),
21341
+ { method: "DELETE" },
21342
+ deps
21343
+ );
21344
+ return {
21345
+ text: [
21346
+ `\uCEF7\uC744 \uC9C0\uC6E0\uC2B5\uB2C8\uB2E4 \u2014 ${cutId}`,
21347
+ "\uB9CC\uB4E4\uC5B4 \uB454 \uC601\uC0C1 \uD30C\uC77C\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0 \uADF8\uB300\uB85C \uC788\uC2B5\uB2C8\uB2E4(\uC0AC\uC6A9\uB7C9\uC740 \uC904\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."
21348
+ ].join("\n")
21349
+ };
21350
+ });
21351
+ }
19152
21352
  function download(a = {}, deps = {}) {
19153
21353
  return guarded(READ_ONLY, async () => {
19154
21354
  const slug = needSlug(a);
@@ -19394,14 +21594,34 @@ function dispatch(name, args, deps = {}) {
19394
21594
  return getOptions(args, deps);
19395
21595
  case "democut_upload_asset":
19396
21596
  return uploadAsset(args, deps);
21597
+ case "democut_get_asset":
21598
+ return getAsset(args, deps);
19397
21599
  case "democut_estimate_cuts":
19398
21600
  return estimateCuts(args, deps);
19399
21601
  case "democut_make_cuts":
19400
21602
  return makeCuts(args, deps);
19401
21603
  case "democut_wait_jobs":
19402
21604
  return waitJobs(args, deps);
21605
+ case "democut_set_cut_image":
21606
+ return setCutImage(args, deps);
21607
+ case "democut_select_cut_image":
21608
+ return selectCutImage(args, deps);
21609
+ case "democut_delete_cut_image":
21610
+ return deleteCutImage(args, deps);
19403
21611
  case "democut_get_cut":
19404
21612
  return getCut(args, deps);
21613
+ case "democut_get_storyboard":
21614
+ return getStoryboard(args, deps);
21615
+ case "democut_add_cut":
21616
+ return addCut(args, deps);
21617
+ case "democut_put_cut_draft":
21618
+ return putCutDraft(args, deps);
21619
+ case "democut_set_cut_edit":
21620
+ return setCutEdit(args, deps);
21621
+ case "democut_duplicate_cut":
21622
+ return duplicateCut(args, deps);
21623
+ case "democut_delete_cut":
21624
+ return deleteCut(args, deps);
19405
21625
  case "democut_download":
19406
21626
  return download(args, deps);
19407
21627
  case "democut_import_cut":