democut 1.0.47 → 1.0.49
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/cli.js +174 -4
- 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 = "1.0.
|
|
6919
|
+
var VERSION = "1.0.49";
|
|
6920
6920
|
|
|
6921
6921
|
// src/device-flow.ts
|
|
6922
6922
|
var DeviceFlowError = class extends Error {
|
|
@@ -12192,6 +12192,20 @@ var GENERATED_TOOLS = [
|
|
|
12192
12192
|
"high"
|
|
12193
12193
|
],
|
|
12194
12194
|
"type": "string"
|
|
12195
|
+
},
|
|
12196
|
+
"replaces_asset_id": {
|
|
12197
|
+
"anyOf": [
|
|
12198
|
+
{
|
|
12199
|
+
"maxLength": 64,
|
|
12200
|
+
"minLength": 1,
|
|
12201
|
+
"type": "string"
|
|
12202
|
+
},
|
|
12203
|
+
{
|
|
12204
|
+
"type": "null"
|
|
12205
|
+
}
|
|
12206
|
+
],
|
|
12207
|
+
"default": null,
|
|
12208
|
+
"description": "\uB2E4\uC2DC \uB9CC\uB4E4 \uB54C \uAD50\uCCB4\uD560 \uAE30\uC874 \uBC30\uACBD \uC790\uC0B0 id(\uAE08\uC561\uACFC \uBB34\uAD00). \uC0C8 \uBC30\uACBD\uC774 \uC644\uC131\uB418\uBA74 \uC774\uAC83\uC744 \uC9C0\uC6B4\uB2E4(\uCEF7\uC774 \uC4F0\uACE0 \uC788\uC73C\uBA74 \uB0A8\uAE30\uACE0 \uACB0\uACFC extra.replaced \uB85C \uC54C\uB9B0\uB2E4)"
|
|
12195
12209
|
}
|
|
12196
12210
|
},
|
|
12197
12211
|
"required": [],
|
|
@@ -12245,7 +12259,7 @@ var GENERATED_TOOLS = [
|
|
|
12245
12259
|
},
|
|
12246
12260
|
{
|
|
12247
12261
|
"name": "democut_make_background_image",
|
|
12248
|
-
"description": "PIP \uBC30\uACBD\uC744 AI \uB85C \uB9CC\uB4E0\uB2E4(\uCCAD\uAD6C\xB7\uC0C1\uD55C). description(\uBB34\uC5C7\uC774 \uBCF4\uC774\uB294 \uC7A5\uBA74\uC778\uAC00)\uC73C\uB85C \uADF8\uB9AC\uACE0, \uBE44\uC6B0\uBA74 label \uB85C \uADF8\uB9B0\uB2E4. \uC0AC\uB78C\uC774 \uC5C6\uB294 \uC7A5\uBA74\uC774\uB2E4(PIP \uC7A5\uBA74\uC774 \uADF8 \uC548\uC5D0 \uC544\uBC14\uD0C0\uB97C \uADF8\uB824 \uB123\uB294\uB2E4). \uB05D\uB098\uBA74 democut_list_backgrounds \uC5D0 \uB098\uC628\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.",
|
|
12262
|
+
"description": "PIP \uBC30\uACBD\uC744 AI \uB85C \uB9CC\uB4E0\uB2E4(\uCCAD\uAD6C\xB7\uC0C1\uD55C). description(\uBB34\uC5C7\uC774 \uBCF4\uC774\uB294 \uC7A5\uBA74\uC778\uAC00)\uC73C\uB85C \uADF8\uB9AC\uACE0, \uBE44\uC6B0\uBA74 label \uB85C \uADF8\uB9B0\uB2E4. \uC0AC\uB78C\uC774 \uC5C6\uB294 \uC7A5\uBA74\uC774\uB2E4(PIP \uC7A5\uBA74\uC774 \uADF8 \uC548\uC5D0 \uC544\uBC14\uD0C0\uB97C \uADF8\uB824 \uB123\uB294\uB2E4). \uB05D\uB098\uBA74 democut_list_backgrounds \uC5D0 \uB098\uC628\uB2E4. \uC788\uB294 \uBC30\uACBD\uC744 \uB2E4\uC2DC \uB9CC\uB4E4\uB824\uBA74 replaces_asset_id \uC5D0 \uADF8 id \uB97C \uB123\uB294\uB2E4 \u2014 \uC0C8 \uBC30\uACBD\uC774 \uC644\uC131\uB418\uBA74 \uC61B \uAC83\uC744 \uC9C0\uC6B0\uACE0, \uCEF7\uC774 \uC4F0\uACE0 \uC788\uC73C\uBA74 \uB0A8\uAE34\uB2E4(democut_wait_jobs \uACB0\uACFC\uC758 extra.replaced \uAC00 \uC5B4\uB290 \uCABD\uC778\uC9C0 \uB9D0\uD55C\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.",
|
|
12249
12263
|
"inputSchema": {
|
|
12250
12264
|
"type": "object",
|
|
12251
12265
|
"properties": {
|
|
@@ -12284,6 +12298,20 @@ var GENERATED_TOOLS = [
|
|
|
12284
12298
|
],
|
|
12285
12299
|
"type": "string"
|
|
12286
12300
|
},
|
|
12301
|
+
"replaces_asset_id": {
|
|
12302
|
+
"anyOf": [
|
|
12303
|
+
{
|
|
12304
|
+
"maxLength": 64,
|
|
12305
|
+
"minLength": 1,
|
|
12306
|
+
"type": "string"
|
|
12307
|
+
},
|
|
12308
|
+
{
|
|
12309
|
+
"type": "null"
|
|
12310
|
+
}
|
|
12311
|
+
],
|
|
12312
|
+
"default": null,
|
|
12313
|
+
"description": "\uB2E4\uC2DC \uB9CC\uB4E4 \uB54C \uAD50\uCCB4\uD560 \uAE30\uC874 \uBC30\uACBD \uC790\uC0B0 id(\uAE08\uC561\uACFC \uBB34\uAD00). \uC0C8 \uBC30\uACBD\uC774 \uC644\uC131\uB418\uBA74 \uC774\uAC83\uC744 \uC9C0\uC6B4\uB2E4(\uCEF7\uC774 \uC4F0\uACE0 \uC788\uC73C\uBA74 \uB0A8\uAE30\uACE0 \uACB0\uACFC extra.replaced \uB85C \uC54C\uB9B0\uB2E4)"
|
|
12314
|
+
},
|
|
12287
12315
|
"confirmed_cost_krw": {
|
|
12288
12316
|
"minimum": 0,
|
|
12289
12317
|
"type": "integer"
|
|
@@ -12321,6 +12349,114 @@ var GENERATED_TOOLS = [
|
|
|
12321
12349
|
"openWorldHint": false
|
|
12322
12350
|
}
|
|
12323
12351
|
},
|
|
12352
|
+
{
|
|
12353
|
+
"name": "democut_update_background",
|
|
12354
|
+
"description": "\uBC30\uACBD\uC758 \uB77C\uBCA8\xB7\uC124\uBA85\uC744 \uACE0\uCE5C\uB2E4(0\uC6D0). \uC900 \uCE78\uB9CC \uBC14\uAFB8\uACE0 \uC548 \uC900 \uCE78\uC740 \uADF8\uB300\uB85C, \uBE48 \uBB38\uC790\uC5F4\uC740 \uADF8 \uCE78\uC744 \uBE44\uC6B4\uB2E4. \uADF8\uB9BC\uC740 \uADF8\uB300\uB85C\uB2E4 \u2014 \uB2E4\uC2DC \uADF8\uB9AC\uB824\uBA74 democut_make_background_image \uC5D0 replaces_asset_id.",
|
|
12355
|
+
"inputSchema": {
|
|
12356
|
+
"type": "object",
|
|
12357
|
+
"properties": {
|
|
12358
|
+
"asset_id": {
|
|
12359
|
+
"type": "string",
|
|
12360
|
+
"description": "\uC790\uC0B0 id(ast_\u2026)"
|
|
12361
|
+
},
|
|
12362
|
+
"label": {
|
|
12363
|
+
"anyOf": [
|
|
12364
|
+
{
|
|
12365
|
+
"maxLength": 128,
|
|
12366
|
+
"type": "string"
|
|
12367
|
+
},
|
|
12368
|
+
{
|
|
12369
|
+
"type": "null"
|
|
12370
|
+
}
|
|
12371
|
+
],
|
|
12372
|
+
"default": null,
|
|
12373
|
+
"description": "\uBC30\uACBD \uC774\uB984(meta.label). \uBE48 \uBB38\uC790\uC5F4\uC774\uBA74 \uBE44\uC6B4\uB2E4"
|
|
12374
|
+
},
|
|
12375
|
+
"description": {
|
|
12376
|
+
"anyOf": [
|
|
12377
|
+
{
|
|
12378
|
+
"maxLength": 1e3,
|
|
12379
|
+
"type": "string"
|
|
12380
|
+
},
|
|
12381
|
+
{
|
|
12382
|
+
"type": "null"
|
|
12383
|
+
}
|
|
12384
|
+
],
|
|
12385
|
+
"default": null,
|
|
12386
|
+
"description": "\uBB34\uC5C7\uC774 \uBCF4\uC774\uB294 \uC7A5\uBA74\uC778\uAC00(meta.description). \uBE48 \uBB38\uC790\uC5F4\uC774\uBA74 \uBE44\uC6B4\uB2E4"
|
|
12387
|
+
}
|
|
12388
|
+
},
|
|
12389
|
+
"required": [
|
|
12390
|
+
"asset_id"
|
|
12391
|
+
],
|
|
12392
|
+
"additionalProperties": false,
|
|
12393
|
+
"anyOf": [
|
|
12394
|
+
{
|
|
12395
|
+
"required": [
|
|
12396
|
+
"label"
|
|
12397
|
+
]
|
|
12398
|
+
},
|
|
12399
|
+
{
|
|
12400
|
+
"required": [
|
|
12401
|
+
"description"
|
|
12402
|
+
]
|
|
12403
|
+
}
|
|
12404
|
+
]
|
|
12405
|
+
},
|
|
12406
|
+
"outputSchema": {
|
|
12407
|
+
"type": "object",
|
|
12408
|
+
"properties": {
|
|
12409
|
+
"id": {
|
|
12410
|
+
"type": "string"
|
|
12411
|
+
},
|
|
12412
|
+
"workspace_id": {
|
|
12413
|
+
"type": "string"
|
|
12414
|
+
},
|
|
12415
|
+
"project_slug": {},
|
|
12416
|
+
"kind": {
|
|
12417
|
+
"type": "string"
|
|
12418
|
+
},
|
|
12419
|
+
"origin": {
|
|
12420
|
+
"type": "string"
|
|
12421
|
+
},
|
|
12422
|
+
"mime": {
|
|
12423
|
+
"type": "string"
|
|
12424
|
+
},
|
|
12425
|
+
"bytes": {
|
|
12426
|
+
"type": "integer"
|
|
12427
|
+
},
|
|
12428
|
+
"sha256": {},
|
|
12429
|
+
"meta": {},
|
|
12430
|
+
"state": {
|
|
12431
|
+
"type": "string"
|
|
12432
|
+
},
|
|
12433
|
+
"created_by": {
|
|
12434
|
+
"type": "string"
|
|
12435
|
+
},
|
|
12436
|
+
"created_at": {
|
|
12437
|
+
"type": "string"
|
|
12438
|
+
},
|
|
12439
|
+
"download_url": {}
|
|
12440
|
+
},
|
|
12441
|
+
"required": [
|
|
12442
|
+
"id",
|
|
12443
|
+
"workspace_id",
|
|
12444
|
+
"kind",
|
|
12445
|
+
"origin",
|
|
12446
|
+
"mime",
|
|
12447
|
+
"bytes",
|
|
12448
|
+
"state",
|
|
12449
|
+
"created_by",
|
|
12450
|
+
"created_at"
|
|
12451
|
+
]
|
|
12452
|
+
},
|
|
12453
|
+
"annotations": {
|
|
12454
|
+
"readOnlyHint": false,
|
|
12455
|
+
"destructiveHint": false,
|
|
12456
|
+
"idempotentHint": false,
|
|
12457
|
+
"openWorldHint": false
|
|
12458
|
+
}
|
|
12459
|
+
},
|
|
12324
12460
|
{
|
|
12325
12461
|
"name": "democut_get_brand_kit",
|
|
12326
12462
|
"description": "\uC774 \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uC758 \uBE0C\uB79C\uB4DC\uD0B7(\uBE0C\uB79C\uB4DC \uC774\uB984\xB7\uB300\uD45C\uC0C9\xB7\uBCF4\uC870\uC0C9\xB7\uD1A4\xB7\uD5E4\uB529/\uBCF8\uBB38 \uD3F0\uD2B8\xB7\uB85C\uACE0)\uACFC \uACE0\uB97C \uC218 \uC788\uB294 \uD3F0\uD2B8(font_options \u2014 `is_default` \uAC00 \uD3F0\uD2B8\uB97C \uBE44\uC6E0\uC744 \uB54C \uC4F0\uC774\uB294 \uAC83). \uBD80\uC791\uC6A9\uB3C4 \uACFC\uAE08\uB3C4 \uC5C6\uB2E4. \uC800\uC7A5\uD55C \uC801\uC774 \uC5C6\uC73C\uBA74 \uBE48 \uBE0C\uB79C\uB4DC\uD0B7\uACFC rev 0 \uC774\uB2E4.",
|
|
@@ -16762,6 +16898,12 @@ var TOOL_META = {
|
|
|
16762
16898
|
"method": "POST",
|
|
16763
16899
|
"path": "/api/backgrounds/generate"
|
|
16764
16900
|
},
|
|
16901
|
+
"democut_update_background": {
|
|
16902
|
+
"cost": "none",
|
|
16903
|
+
"group": "character",
|
|
16904
|
+
"method": "PATCH",
|
|
16905
|
+
"path": "/api/backgrounds/{asset_id}"
|
|
16906
|
+
},
|
|
16765
16907
|
"democut_get_brand_kit": {
|
|
16766
16908
|
"cost": "none",
|
|
16767
16909
|
"group": "brand",
|
|
@@ -19039,7 +19181,8 @@ function backgroundImageBody(a) {
|
|
|
19039
19181
|
return {
|
|
19040
19182
|
...a.label !== void 0 ? { label: a.label } : {},
|
|
19041
19183
|
...a.description !== void 0 ? { description: a.description } : {},
|
|
19042
|
-
...a.quality !== void 0 ? { quality: a.quality } : {}
|
|
19184
|
+
...a.quality !== void 0 ? { quality: a.quality } : {},
|
|
19185
|
+
...a.replaces_asset_id ? { replaces_asset_id: a.replaces_asset_id } : {}
|
|
19043
19186
|
};
|
|
19044
19187
|
}
|
|
19045
19188
|
function estimateBackgroundImage(a = {}, deps = {}) {
|
|
@@ -19094,12 +19237,37 @@ function makeBackgroundImage(a = {}, deps = {}) {
|
|
|
19094
19237
|
text: [
|
|
19095
19238
|
`\uBC30\uACBD\uC744 \uB9CC\uB4DC\uB294 \uC911\uC785\uB2C8\uB2E4 \u2014 ${out4.job_id}`,
|
|
19096
19239
|
`\uCCAD\uAD6C ${krw(total)} \u2014 \uC0C1\uD55C\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uC0AC\uC6A9\uB7C9\uC774 \uC801\uC73C\uBA74 \uCC28\uC561\uC744 \uC790\uB3D9\uC73C\uB85C \uB3CC\uB824\uB4DC\uB9BD\uB2C8\uB2E4.`,
|
|
19097
|
-
"democut_wait_jobs \uB85C \uB05D\uB098\uBA74 democut_list_backgrounds \uC5D0 \uC0C8 \uBC30\uACBD\uC774 \uB098\uC635\uB2C8\uB2E4 \u2014 \uADF8 id \uB97C pip.background_asset_id \uC5D0 \uB123\uC73C\uC138\uC694."
|
|
19240
|
+
"democut_wait_jobs \uB85C \uB05D\uB098\uBA74 democut_list_backgrounds \uC5D0 \uC0C8 \uBC30\uACBD\uC774 \uB098\uC635\uB2C8\uB2E4 \u2014 \uADF8 id \uB97C pip.background_asset_id \uC5D0 \uB123\uC73C\uC138\uC694.",
|
|
19241
|
+
...a.replaces_asset_id ? [`\uB05D\uB098\uBA74 ${a.replaces_asset_id} \uB97C \uC9C0\uC6C1\uB2C8\uB2E4 \u2014 \uCEF7\uC774 \uC4F0\uACE0 \uC788\uC73C\uBA74 \uB0A8\uAE30\uACE0 wait_jobs \uACB0\uACFC\uC758 extra.replaced \uAC00 \uADF8\uB807\uAC8C \uB9D0\uD569\uB2C8\uB2E4.`] : []
|
|
19098
19242
|
].join("\n"),
|
|
19099
19243
|
structured: callableStructured(out4)
|
|
19100
19244
|
};
|
|
19101
19245
|
});
|
|
19102
19246
|
}
|
|
19247
|
+
function updateBackground(a = {}, deps = {}) {
|
|
19248
|
+
return guarded(READ_ONLY, async () => {
|
|
19249
|
+
const id = (a.asset_id ?? "").trim();
|
|
19250
|
+
if (!id) return { isError: true, text: "asset_id \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4." };
|
|
19251
|
+
const base = resolveBaseUrl(deps.baseUrl);
|
|
19252
|
+
const out4 = await apiRequest(
|
|
19253
|
+
base,
|
|
19254
|
+
`/api/backgrounds/${encodeURIComponent(id)}`,
|
|
19255
|
+
{
|
|
19256
|
+
method: "PATCH",
|
|
19257
|
+
body: {
|
|
19258
|
+
...a.label !== void 0 ? { label: a.label } : {},
|
|
19259
|
+
...a.description !== void 0 ? { description: a.description } : {}
|
|
19260
|
+
}
|
|
19261
|
+
},
|
|
19262
|
+
deps
|
|
19263
|
+
);
|
|
19264
|
+
const meta2 = out4.meta ?? {};
|
|
19265
|
+
return {
|
|
19266
|
+
text: `\uBC30\uACBD ${out4.id} \uC744 \uACE0\uCCE4\uC2B5\uB2C8\uB2E4 \u2014 \uB77C\uBCA8 \u300C${meta2.label ?? ""}\u300D, \uC124\uBA85 \u300C${meta2.description ?? ""}\u300D.`,
|
|
19267
|
+
structured: callableStructured(out4)
|
|
19268
|
+
};
|
|
19269
|
+
});
|
|
19270
|
+
}
|
|
19103
19271
|
function estimateCharacterSheet(a = {}, deps = {}) {
|
|
19104
19272
|
return guarded(READ_ONLY, async () => {
|
|
19105
19273
|
const id = (a.character_id ?? "").trim();
|
|
@@ -19754,6 +19922,8 @@ function dispatch(name, args, deps = {}) {
|
|
|
19754
19922
|
return estimateBackgroundImage(args, deps);
|
|
19755
19923
|
case "democut_make_background_image":
|
|
19756
19924
|
return makeBackgroundImage(args, deps);
|
|
19925
|
+
case "democut_update_background":
|
|
19926
|
+
return updateBackground(args, deps);
|
|
19757
19927
|
default:
|
|
19758
19928
|
return Promise.resolve({ isError: true, text: `\uC54C \uC218 \uC5C6\uB294 \uB3C4\uAD6C: ${name}` });
|
|
19759
19929
|
}
|