@gaoding/cli 2.1.7 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +6 -3
  2. package/contracts/operations/tool.call/canvas-input.schema.json +0 -3
  3. package/contracts/presentations/agent.send.schema.json +303 -0
  4. package/contracts/presentations/model.get.schema.json +246 -0
  5. package/contracts/presentations/model.list.schema.json +144 -0
  6. package/contracts/presentations/task.get.schema.json +146 -0
  7. package/contracts/presentations/tool.call.schema.json +200 -0
  8. package/dist/bin/gd-cli.js +9 -3
  9. package/dist/bin/insmind-cli.js +6 -1
  10. package/dist/src/bootstrap/create-cli.js +7 -4
  11. package/dist/src/bootstrap/create-runtime.js +7 -32
  12. package/dist/src/cli/action-binding.js +2 -2
  13. package/dist/src/cli/agent-commands.js +5 -4
  14. package/dist/src/cli/auth-commands.js +1 -1
  15. package/dist/src/cli/dam-commands.js +18 -10
  16. package/dist/src/cli/errors.js +1 -35
  17. package/dist/src/cli/host-input.js +0 -11
  18. package/dist/src/cli/model-commands.js +6 -5
  19. package/dist/src/cli/skill-output.js +13 -0
  20. package/dist/src/cli/tool-commands.js +9 -5
  21. package/dist/src/features/skill/catalog.js +152 -0
  22. package/dist/src/features/skill/manual.js +71 -0
  23. package/dist/src/features/tool/archived-ocr-result.js +74 -0
  24. package/dist/src/features/tool/canvas-copy.js +2 -3
  25. package/dist/src/features/tool/canvas-models.js +8 -5
  26. package/dist/src/features/tool/canvas-recovery.js +3 -2
  27. package/dist/src/features/tool/canvas-results.js +1 -55
  28. package/dist/src/features/tool/canvas-tool-adapter.js +7 -10
  29. package/dist/src/features/tool/mns-catalog-adapter.js +4 -4
  30. package/dist/src/features/tool/resource-authorizer.js +1 -1
  31. package/dist/src/features/tool/scene-catalog-adapter.js +20 -22
  32. package/dist/src/features/tool/tool-definitions.js +0 -1
  33. package/dist/src/product/config.js +0 -7
  34. package/dist/src/telemetry/command-routes.json +1 -1
  35. package/package.json +4 -4
  36. package/skills/gd-cli/SKILL.md +10 -29
  37. package/contracts/operations/editor.apply/input.schema.json +0 -134
  38. package/contracts/operations/editor.apply/output.schema.json +0 -15
  39. package/contracts/operations/editor.connect/input.schema.json +0 -15
  40. package/contracts/operations/editor.connect/output.schema.json +0 -17
  41. package/contracts/operations/editor.disconnect/input.schema.json +0 -8
  42. package/contracts/operations/editor.disconnect/output.schema.json +0 -14
  43. package/contracts/operations/editor.save/input.schema.json +0 -8
  44. package/contracts/operations/editor.save/output.schema.json +0 -23
  45. package/contracts/operations/editor.screenshot/input.schema.json +0 -8
  46. package/contracts/operations/editor.screenshot/output.schema.json +0 -16
  47. package/contracts/operations/editor.snapshot/input.schema.json +0 -8
  48. package/contracts/operations/editor.snapshot/output.schema.json +0 -113
  49. package/contracts/operations/tool.call/models/image-ocr.schema.json +0 -22
  50. package/contracts/operations/tool.call/ocr-payload.schema.json +0 -65
  51. package/dist/src/cli/editor-commands.js +0 -136
  52. package/skills/gd-cli/references/agent.md +0 -39
  53. package/skills/gd-cli/references/auth-org.md +0 -11
  54. package/skills/gd-cli/references/creation.md +0 -61
  55. package/skills/gd-cli/references/dam.md +0 -53
  56. package/skills/gd-cli/references/editor.md +0 -67
  57. package/skills/gd-cli/references/errors.md +0 -46
  58. package/skills/gd-cli/references/generation-constraints.md +0 -40
  59. package/skills/gd-cli/references/matting.md +0 -27
  60. package/skills/gd-cli/references/media-tools.md +0 -46
  61. package/skills/gd-cli/references/tool.md +0 -24
  62. package/skills/gd-cli/references/update.md +0 -22
@@ -0,0 +1,74 @@
1
+ // Read-only compatibility for saved tasks created before OCR was retired.
2
+ import { randomUUID } from "node:crypto";
3
+ import { lazySchemaCompiler } from "../../platform/schema-compiler.js";
4
+ import { RemoteProtocolError } from "../../platform/remote-protocol.js";
5
+ const schema = {
6
+ type: "object",
7
+ required: ["image", "blocks"],
8
+ properties: {
9
+ image: {
10
+ type: "object",
11
+ required: ["uri", "width", "height"],
12
+ properties: {
13
+ uri: { type: "string", format: "uri" },
14
+ width: { type: "integer", minimum: 1 },
15
+ height: { type: "integer", minimum: 1 },
16
+ },
17
+ },
18
+ blocks: {
19
+ type: "array",
20
+ items: {
21
+ type: "object",
22
+ required: ["bbox", "category"],
23
+ properties: {
24
+ bbox: { type: "array", minItems: 4, maxItems: 4, items: { type: "number" } },
25
+ category: { type: "string", minLength: 1, pattern: ".*\\S.*" },
26
+ text: { type: "string" },
27
+ },
28
+ },
29
+ },
30
+ },
31
+ };
32
+ const compiler = lazySchemaCompiler({ strict: true, allErrors: true });
33
+ let validator;
34
+ function validateOcr(value) {
35
+ validator ??= compiler().compile(schema);
36
+ return validator(value);
37
+ }
38
+ export function readOcrPayload(text) {
39
+ let payload;
40
+ try {
41
+ payload = JSON.parse(text);
42
+ }
43
+ catch (cause) {
44
+ throw new RemoteProtocolError({}, cause, "OCR_JSON_INVALID");
45
+ }
46
+ if (!validateOcr(payload))
47
+ throw new RemoteProtocolError({}, undefined, "OCR_PAYLOAD_INVALID");
48
+ return payload;
49
+ }
50
+ export function ocrResult(content, image, id = randomUUID()) {
51
+ const result = [];
52
+ for (const part of content) {
53
+ if (part.type === "resource_link") {
54
+ result.push(part);
55
+ continue;
56
+ }
57
+ let blocks;
58
+ try {
59
+ blocks = JSON.parse(part.type === "text" ? part.text : part.resource.text);
60
+ }
61
+ catch {
62
+ result.push(part);
63
+ continue;
64
+ }
65
+ const payload = { image, blocks };
66
+ if (!Array.isArray(blocks) || !validateOcr(payload)) {
67
+ result.push(part);
68
+ continue;
69
+ }
70
+ result.push({ type: "resource", resource: { uri: part.type === "resource" ? part.resource.uri : `urn:uuid:${result.some(item => item.type === "resource") ? randomUUID() : id}`,
71
+ mimeType: "application/json", text: JSON.stringify(payload) } });
72
+ }
73
+ return result;
74
+ }
@@ -11,9 +11,8 @@ const copy = {
11
11
  "image-expand-standard": ["Standard image expansion", "canvas and placement use auto-oriented source pixels. Origin is top-left; x goes right and y down. The original must fit without scaling. The target canvas dimensions are requested from the service."],
12
12
  "image-expand-smart": ["Smart image expansion", "Place the source at natural size and expand its surroundings. Output uses the target aspect ratio; pixel dimensions follow the live resolution setting. Source details can change."],
13
13
  "image-text-edit": ["Image text replacement", "replacements match complete original text. An empty to deletes it. Repeated text cannot be targeted by occurrence; actual text and layout are determined by the returned image."],
14
- "image-ocr": ["Image text recognition", "Returns an embedded application/json resource: image{uri,width,height}, blocks[{bbox:[left,top,right,bottom],category,text?}]. Coordinates use the returned recognition image's top-left origin in pixels."],
15
- "image-layers-layout": ["Layout decomposition", "For separating layout elements such as poster headlines, body text and background. Fits the source within 3000×3000 pixels without enlargement. Returns native template JSON and any accompanying service notes, not PSD. Editability depends on the returned layers; fonts may be substituted. Use a discovered Editor import capability to open the template."],
16
- "image-layers-smart": ["Smart layer decomposition", "For separating objects in a photo from each other and the background, such as a product and surrounding props. Fits the source within 3000×3000 pixels without enlargement; the service requires width × height of at least 262144 total pixels (512×512), not a 512-pixel minimum for each edge. Returns native template JSON and any accompanying service notes, not PSD or word-by-word OCR. maxLayers is an upper bound. Pricing uses current remote metered components."],
14
+ "image-layers-layout": ["Layout decomposition", "For separating layout elements such as poster headlines, body text and background. Fits the source within 3000×3000 pixels without enlargement. Returns native template JSON and any accompanying service notes, not PSD. Editability depends on the returned layers; fonts may be substituted."],
15
+ "image-layers-smart": ["Smart layer decomposition", "For separating objects in a photo from each other and the background, such as a product and surrounding props. Fits the source within 3000×3000 pixels without enlargement; the service requires width × height of at least 262144 total pixels (512×512), not a 512-pixel minimum for each edge. Returns native template JSON and any accompanying service notes, not PSD. maxLayers is an upper bound. Pricing uses current remote metered components."],
17
16
  "image-vectorize": ["Image to SVG", "Returns an SVG resource. Shapes, colors and details may be reconstructed; actual vector contents are determined by the returned file."],
18
17
  "video-edit-smart": ["Smart video edit", "Duration and ratio come from the actual source. Reference videos including the source total at most 15 seconds. audioEnabled controls audio presence, not preservation of the original sound."],
19
18
  "video-enhance-standard": ["Standard video upscale", "Uses ceil(actual seconds) for billing and requests preservation of the source video. Actual duration, visuals and soundtrack are determined by the returned video."],
@@ -16,7 +16,6 @@ export const canvasModelBindings = [
16
16
  ["image.expand", "image-expand-standard", "outpainting-pro", "canvas-image-expand", "标准扩图", "dify"],
17
17
  ["image.expand", "image-expand-smart", "canvas-image-expand-sunburst", "canvas-image-expand", "智能扩图", "dify"],
18
18
  ["image.text_edit", "image-text-edit", "TextEdit", "TextEdit", "图片改字", "dify"],
19
- ["image.ocr", "image-ocr", "new-image-ocr", "new-image-ocr", "文字识别", "dify"],
20
19
  ["image.layers", "image-layers-layout", "codia", "special-agent-tools", "图文分层", "toolkit"],
21
20
  ["image.layers", "image-layers-smart", "seedream-layer-decomposition", "special-agent-tools", "智能分层", "toolkit"],
22
21
  ["image.vectorize", "image-vectorize", "eval-recraft-vectorize", "canvas-image-vectorize", "图片转矢量", "dify"],
@@ -24,7 +23,12 @@ export const canvasModelBindings = [
24
23
  ["video.enhance", "video-enhance-standard", "canvas-video-enhance-fast", "canvas-video-enhance", "标准视频超分", "dify"],
25
24
  ["video.enhance", "video-enhance-smart", "canvas-video-enhance-smart", "canvas-video-enhance", "智能视频修复", "dify"]
26
25
  ];
27
- export const canvasSceneCodes = [...new Set(canvasModelBindings.map(binding => binding[3]))];
26
+ // MNS uses both associations for layers: production uses AI-image-tool, FAT uses special-agent-tools.
27
+ export const canvasSceneTools = new Map([
28
+ ...canvasModelBindings.map(([tool, , , scene]) => [scene, tool]),
29
+ ["AI-image-tool", "image.layers"]
30
+ ]);
31
+ export const canvasSceneCodes = [...canvasSceneTools.keys()];
28
32
  export function canvasProtocol(model) {
29
33
  const binding = canvasModelBindings.find(([, id]) => id === model);
30
34
  if (!binding)
@@ -143,9 +147,8 @@ export function canvasModel(raw, binding, configuration, english = false) {
143
147
  "image-expand-standard": "canvas/placement 以自动转正后的原图自然像素计。画布左上角为原点,x向右、y向下;原图不得缩放或超出画布,向服务请求目标画布尺寸。",
144
148
  "image-expand-smart": "按自然尺寸和像素坐标放置原图、补绘外围;智能输出采用目标比例,像素尺寸由当前分辨率选项决定,可能改变原图细节。",
145
149
  "image-text-edit": "replacements 用完整原文匹配;空 to 表示删除。重复原文无法指定某一次出现;实际文字与版式以返回图片为准。",
146
- "image-ocr": "返回 application/json 内嵌资源,内容为 image{uri,width,height} 和 blocks[{bbox:[left,top,right,bottom],category,text?}];坐标以返回识别图的左上角为原点,单位像素。",
147
- "image-layers-layout": "用于拆分版式元素,例如海报的标题、正文和底图。输入按比例缩小到3000×3000范围内,不放大小图。返回原生模板 JSON 资源和服务附带的说明;文字/图片/矢量的实际可编辑程度以模板图层为准,字体可能替换。不是PSD。通过已发现的 Editor 导入能力使用模板。",
148
- "image-layers-smart": "用于分开照片中的物件和背景,例如商品与周围的摆件。输入按比例缩小到3000×3000范围内,不放大小图;服务要求处理后宽×高至少262144总像素(512×512),不是每条边都至少512。把图片拆为独立物件图层,返回原生模板 JSON 和服务附带的说明;maxLayers 是图层数量上限,按当前远端计费组件计价。不是逐字OCR或PSD。",
150
+ "image-layers-layout": "用于拆分版式元素,例如海报的标题、正文和底图。输入按比例缩小到3000×3000范围内,不放大小图。返回原生模板 JSON 资源和服务附带的说明;文字/图片/矢量的实际可编辑程度以模板图层为准,字体可能替换。不是PSD。",
151
+ "image-layers-smart": "用于分开照片中的物件和背景,例如商品与周围的摆件。输入按比例缩小到3000×3000范围内,不放大小图;服务要求处理后宽×高至少262144总像素(512×512),不是每条边都至少512。把图片拆为独立物件图层,返回原生模板 JSON 和服务附带的说明;maxLayers 是图层数量上限,按当前远端计费组件计价。不提供 PSD。",
149
152
  "image-vectorize": "返回 SVG 资源;形状、颜色和细节可能重建,实际矢量内容以返回文件为准。",
150
153
  "video-edit-smart": "从原视频推导时长与比例;原片与全部参考视频的合计时长不超过15秒。audioEnabled 控制输出是否有音轨,不承诺原音轨内容不变。智能处理可能改动画面与声音。",
151
154
  "video-enhance-standard": "标准视频超分,从实际输入时长计费(向上取整秒),请求保持原视频;实际时长、画面及原声以返回视频为准。",
@@ -1,5 +1,6 @@
1
1
  import { canvasModelBindings } from "./canvas-models.js";
2
- import { canvasContent, ocrResult, templateResult } from "./canvas-results.js";
2
+ import { ocrResult } from "./archived-ocr-result.js";
3
+ import { canvasContent, templateResult } from "./canvas-results.js";
3
4
  import { presentToolContent } from "./tool-output.js";
4
5
  import { queryToolkitResult } from "./canvas-tool-adapter.js";
5
6
  import { queryToolResult } from "./tool-api-adapter.js";
@@ -8,7 +9,7 @@ import { RemoteProtocolError } from "../../platform/remote-protocol.js";
8
9
  /** Read-only recovery. This module deliberately has no uploader or generation port. */
9
10
  export async function recoverCanvasTool(progress, context, dependencies) {
10
11
  const pipeline = progress.toolPipeline;
11
- if (!canvasModelBindings.some(binding => binding[1] === pipeline.model))
12
+ if (pipeline.model !== "image-ocr" && !canvasModelBindings.some(binding => binding[1] === pipeline.model))
12
13
  throw new RemoteProtocolError();
13
14
  const saved = pipeline.partialContent ? { content: pipeline.partialContent, fromCheckpoint: true } : {};
14
15
  const unknown = () => ({ state: "unknown", ...saved });
@@ -1,6 +1,3 @@
1
- import { randomUUID } from "node:crypto";
2
- import { lazySchemaCompiler } from "../../platform/schema-compiler.js";
3
- import { contractDocument } from "../../contracts/schema.js";
4
1
  import { parseHttpAssetUrl, parseSafeRemoteAssetUrl } from "../../platform/url-safety.js";
5
2
  import { RemoteProtocolError } from "../../platform/remote-protocol.js";
6
3
  import { normalizeToolContent } from "./tool-api-adapter.js";
@@ -11,7 +8,7 @@ export function canvasContent(value) {
11
8
  if (record(value) && value.type === "resource" && record(value.resource)) {
12
9
  const resource = value.resource;
13
10
  // Real RPC resources include nullable text/image/task slots. URI wins for media;
14
- // OCR's inline JSON has text rather than a usable media URI.
11
+ // Inline JSON resources carry text.
15
12
  if (typeof resource.uri === "string" && resource.uri.trim())
16
13
  return normalizeToolContent(value);
17
14
  if (typeof resource.text === "string" && resource.text.trim())
@@ -37,57 +34,6 @@ export function oneResource(content) {
37
34
  export function link(uri, name, mimeType) {
38
35
  return [{ type: "resource_link", uri, name, mimeType }];
39
36
  }
40
- // A version or login-state query also imports this module through the command
41
- // graph. Compile each media contract only when that actual result needs it.
42
- const canvasCompiler = lazySchemaCompiler({ strict: true, allErrors: true });
43
- function canvasContract(file) {
44
- let validate;
45
- return (value) => {
46
- validate ??= canvasCompiler().compile(contractDocument(file));
47
- return validate(value);
48
- };
49
- }
50
- const validateOcr = canvasContract("tool.call/ocr-payload.schema.json");
51
- function assertOcrPayload(payload) {
52
- if (!validateOcr(payload))
53
- throw new RemoteProtocolError({}, undefined, "OCR_PAYLOAD_INVALID");
54
- }
55
- export function readOcrPayload(text) {
56
- let payload;
57
- try {
58
- payload = JSON.parse(text);
59
- }
60
- catch (cause) {
61
- throw new RemoteProtocolError({}, cause, "OCR_JSON_INVALID");
62
- }
63
- assertOcrPayload(payload);
64
- return payload;
65
- }
66
- export function ocrResult(content, image, id = randomUUID()) {
67
- const result = [];
68
- for (const part of content) {
69
- if (part.type === "resource_link") {
70
- result.push(part);
71
- continue;
72
- }
73
- let blocks;
74
- try {
75
- blocks = JSON.parse(part.type === "text" ? part.text : part.resource.text);
76
- }
77
- catch {
78
- result.push(part);
79
- continue;
80
- }
81
- const payload = { image, blocks };
82
- if (!Array.isArray(blocks) || !validateOcr(payload)) {
83
- result.push(part);
84
- continue;
85
- }
86
- result.push({ type: "resource", resource: { uri: part.type === "resource" ? part.resource.uri : `urn:uuid:${result.some(item => item.type === "resource") ? randomUUID() : id}`,
87
- mimeType: "application/json", text: JSON.stringify(payload) } });
88
- }
89
- return result;
90
- }
91
37
  export function templateResult(content) {
92
38
  if (content.some(part => part.type === "resource_link" &&
93
39
  (part.mimeType === "application/json" || part.name.toLowerCase().endsWith(".json"))))
@@ -12,7 +12,7 @@ import { presentToolContent } from "./tool-output.js";
12
12
  import { normalizeToolItems, queryToolResult, ToolTaskCanceledError, ToolTaskFailedError } from "./tool-api-adapter.js";
13
13
  import { expansionGeometry, expansionImage, invertSelectionMask, outlineImage } from "./canvas-media.js";
14
14
  import { createCanvasVideo, videoRatio, videoEditPrompt } from "./canvas-video.js";
15
- import { canvasContent, ocrResult, oneResource, record, templateResult } from "./canvas-results.js";
15
+ import { canvasContent, oneResource, record, templateResult } from "./canvas-results.js";
16
16
  import { estimateCanvasCost } from "./canvas-pricing.js";
17
17
  import { canvasProtocol, canvasRemoteControlArguments, unavailableCanvasMediaRoles } from "./canvas-models.js";
18
18
  import { assertNoLocalAssetPaths } from "./argument-paths.js";
@@ -52,9 +52,9 @@ export function createCanvasToolAdapter(dependencies) {
52
52
  const mediaFor = (access) => typeof dependencies.media === "function" ? dependencies.media(access) : dependencies.media;
53
53
  const sleep = dependencies.sleep ?? (async (ms, signal) => { await delay(ms, undefined, { signal }); });
54
54
  const segment = createCanvasSegmenter({ ...dependencies, wait });
55
- async function pipeline(context, model, stage, requiresFinalization, protocol, partialContent, verification) {
55
+ async function pipeline(context, model, stage, requiresFinalization, protocol, partialContent) {
56
56
  await context.observe?.({ toolPipeline: { protocol, model, stage, requiresFinalization,
57
- ...(partialContent ? { partialContent } : {}), ...(verification ? { verification } : {}) } });
57
+ ...(partialContent ? { partialContent } : {}) } });
58
58
  }
59
59
  async function wait(read, signal) {
60
60
  let failures = 0;
@@ -249,10 +249,10 @@ export function createCanvasToolAdapter(dependencies) {
249
249
  backend.ratio = "original";
250
250
  let image;
251
251
  let dimensions;
252
- if (selection || id.startsWith("image-expand-") || id === "image-ocr" || id === "image-text-edit" || protocol === "toolkit") {
252
+ if (selection || id.startsWith("image-expand-") || id === "image-text-edit" || protocol === "toolkit") {
253
253
  const { default: sharp } = await import("sharp");
254
254
  let source = await media.image(args.image, context.signal);
255
- if (id === "image-ocr" || id === "image-text-edit") {
255
+ if (id === "image-text-edit") {
256
256
  const bytes = await sharp(source.bytes).resize({ width: 3000, height: 3000, fit: "inside", withoutEnlargement: true }).flatten({ background: "white" }).jpeg().toBuffer();
257
257
  const info = await sharp(bytes).metadata();
258
258
  source = { bytes, width: info.width, height: info.height };
@@ -286,7 +286,7 @@ export function createCanvasToolAdapter(dependencies) {
286
286
  backend.inner_xy_points = JSON.stringify(geometry.corners);
287
287
  }
288
288
  }
289
- image = await media.upload(prepared, id === "image-ocr" || id === "image-text-edit" ? "jpg" : "png", context.access, context.signal);
289
+ image = await media.upload(prepared, id === "image-text-edit" ? "jpg" : "png", context.access, context.signal);
290
290
  dimensions = { width: source.width, height: source.height };
291
291
  }
292
292
  else {
@@ -335,8 +335,7 @@ export function createCanvasToolAdapter(dependencies) {
335
335
  if (id === "image-remove-standard")
336
336
  backend.contentid = backend.content_id;
337
337
  const toolPipeline = { protocol, model: id, stage: "submitted", requiresFinalization: isMatting,
338
- ...(isMatting ? { matting: { cropToSubject: args.cropToSubject === true } } : {}),
339
- ...(id === "image-ocr" ? { verification: { ocr: { uri: image, ...dimensions } } } : {}) };
338
+ ...(isMatting ? { matting: { cropToSubject: args.cropToSubject === true } } : {}) };
340
339
  await context.observe?.({ toolPipeline });
341
340
  const content = await call(code, serviceArguments(), context, protocol);
342
341
  if (id === "image-matting-smart") {
@@ -347,8 +346,6 @@ export function createCanvasToolAdapter(dependencies) {
347
346
  });
348
347
  return content.map(item => item.type === "resource_link" ? result[0] : item);
349
348
  }
350
- if (id === "image-ocr")
351
- return ocrResult(content, { uri: image, ...dimensions });
352
349
  if (protocol === "toolkit")
353
350
  return templateResult(content);
354
351
  return presentToolContent(content, "image", dependencies.onMissingMedia);
@@ -1,7 +1,7 @@
1
1
  import { cleanCatalogText as cleanText, normalizeParameter as parameter } from "#model-catalog";
2
2
  import { RemoteRequestError } from "../../platform/signed-http-transport.js";
3
3
  import { defaultToolDefinitions } from "./catalog.js";
4
- import { canvasModel, canvasModelBindings, canvasSceneCodes } from "./canvas-models.js";
4
+ import { canvasModel, canvasModelBindings, canvasSceneCodes, canvasSceneTools } from "./canvas-models.js";
5
5
  import { canvasPricingSupported } from "./canvas-pricing.js";
6
6
  export const ROOT_SCENE_CODES = [
7
7
  "image-model-art",
@@ -54,12 +54,12 @@ function collectScenes(raw) {
54
54
  const root = roots.get(rootCode);
55
55
  if (!root)
56
56
  continue;
57
- const binding = canvasModelBindings.find(binding => binding[3] === rootCode);
58
- scenes.push({ code: rootCode, tool: binding[0], sort: number(root.sort) });
57
+ const tool = canvasSceneTools.get(rootCode);
58
+ scenes.push({ code: rootCode, tool, sort: number(root.sort) });
59
59
  // Canvas pickers include first-level children; generic generation keeps its existing root membership.
60
60
  for (const child of roots.values()) {
61
61
  if (child.parent_id === root.id && child !== root) {
62
- scenes.push({ code: requiredText(child.code), tool: binding[0], sort: number(child.sort) });
62
+ scenes.push({ code: requiredText(child.code), tool, sort: number(child.sort) });
63
63
  }
64
64
  }
65
65
  }
@@ -1,4 +1,4 @@
1
- import { readOcrPayload } from "./canvas-results.js";
1
+ import { readOcrPayload } from "./archived-ocr-result.js";
2
2
  import { RemoteProtocolError } from "../../platform/remote-protocol.js";
3
3
  /** Reauthorize both top-level media and the OCR image reference, without interpreting arbitrary text as URLs. */
4
4
  export async function authorizeToolResources(output, authorizer, access, signal) {
@@ -1,33 +1,31 @@
1
1
  import { canvasModel, canvasModelBindings } from "./canvas-models.js";
2
2
  import { RemoteRequestError } from "../../platform/signed-http-transport.js";
3
3
  import { record } from "./canvas-results.js";
4
- const bindingForCode = (code) => canvasModelBindings.find(binding => binding[2] === code)[1];
4
+ const textEdit = canvasModelBindings.find(binding => binding[2] === "TextEdit");
5
5
  /** Legacy scenes have fixed protocols, unlike the MNS model pickers. Availability is read separately. */
6
6
  export function createSceneCatalogAdapter(dependencies) {
7
7
  return { async load(input) {
8
8
  const catalog = await dependencies.catalog.load(input);
9
- for (const code of ["TextEdit", "new-image-ocr"]) {
10
- try {
11
- const scene = await dependencies.transport.getJson({ path: `/gdesign/tool/manage/scenes/code/${code}`, ...input.access, signal: input.signal });
12
- if (!record(scene) || scene.scene_code !== code || scene.status !== 1)
13
- continue;
14
- const binding = canvasModelBindings.find(binding => binding[2] === code);
15
- const cost = scene.is_free === true ? 0 : typeof scene.point_rights === "number" && Number.isFinite(scene.point_rights) && scene.point_rights >= 0 ? scene.point_rights : undefined;
16
- if (cost === undefined) {
17
- catalog.warnings.push(dependencies.english ? `Current pricing is unavailable for ${binding[1]}.` : `${binding[1]} 的当前报价不可用。`);
18
- }
19
- const raw = { tool: binding[0], model: code, title: binding[4], sceneSort: 0, modelSort: 0, parameters: [],
20
- ...(cost === undefined ? {} : { cost: { unit: "gaodou", minimum: cost, maximum: cost } }),
21
- outputMediaTypes: code === "new-image-ocr" ? ["application/json"] : ["image/jpeg", "image/png"] };
22
- catalog.models.push(canvasModel(raw, binding, {}, dependencies.english));
23
- }
24
- catch (error) {
25
- input.signal.throwIfAborted();
26
- if (error instanceof RemoteRequestError && error.status === 404)
27
- continue;
28
- // Do not misreport a network failure as a published offline state.
29
- catalog.warnings.push(dependencies.english ? `Unable to verify the current availability of ${bindingForCode(code)}.` : `暂时无法核实 ${bindingForCode(code)} 的当前可用性。`);
9
+ const code = textEdit[2];
10
+ try {
11
+ const scene = await dependencies.transport.getJson({ path: `/gdesign/tool/manage/scenes/code/${code}`, ...input.access, signal: input.signal });
12
+ if (!record(scene) || scene.scene_code !== code || scene.status !== 1)
13
+ return catalog;
14
+ const cost = scene.is_free === true ? 0 : typeof scene.point_rights === "number" && Number.isFinite(scene.point_rights) && scene.point_rights >= 0 ? scene.point_rights : undefined;
15
+ if (cost === undefined) {
16
+ catalog.warnings.push(dependencies.english ? `Current pricing is unavailable for ${textEdit[1]}.` : `${textEdit[1]} 的当前报价不可用。`);
30
17
  }
18
+ const raw = { tool: textEdit[0], model: code, title: textEdit[4], sceneSort: 0, modelSort: 0, parameters: [],
19
+ ...(cost === undefined ? {} : { cost: { unit: "gaodou", minimum: cost, maximum: cost } }),
20
+ outputMediaTypes: ["image/jpeg", "image/png"] };
21
+ catalog.models.push(canvasModel(raw, textEdit, {}, dependencies.english));
22
+ }
23
+ catch (error) {
24
+ input.signal.throwIfAborted();
25
+ if (error instanceof RemoteRequestError && error.status === 404)
26
+ return catalog;
27
+ // Do not misreport a network failure as a published offline state.
28
+ catalog.warnings.push(dependencies.english ? `Unable to verify the current availability of ${textEdit[1]}.` : `暂时无法核实 ${textEdit[1]} 的当前可用性。`);
31
29
  }
32
30
  return catalog;
33
31
  } };
@@ -15,7 +15,6 @@ export const defaultToolDefinitions = [
15
15
  { name: "image.enhance", title: "图片变清晰", description: "标准超分或生成式修复;智能修复可能改变细节。" },
16
16
  { name: "image.expand", title: "图片扩图", description: "按目标画布和原图位置补绘外围。" },
17
17
  { name: "image.text_edit", title: "图片改字", description: "按原文替换或删除图片文字,不承诺定位重复原文中的某一次。" },
18
- { name: "image.ocr", title: "图片文字识别", description: "返回实际识别图尺寸、文字、类别和像素坐标。" },
19
18
  { name: "image.layers", title: "图片图文分层", description: "交付原生稿定模板 JSON,保留图层结构。" },
20
19
  { name: "image.vectorize", title: "图片转矢量", description: "将位图转换为 SVG。" },
21
20
  { name: "video.edit", title: "视频修改", description: "按原视频修改内容,时长由真实素材推导。" },
@@ -19,9 +19,6 @@ export const gaodingProduct = freezeProduct({
19
19
  deviceClientId: "gdhub-cli",
20
20
  pricingUrl: new URL("https://www.gaoding.art/pricing"),
21
21
  telemetryUrl: new URL("https://gaoding-log-ai-gpu.cn-hangzhou.log.aliyuncs.com/logstores/gd-cli/track?APIVersion=0.6.0"),
22
- defaultEditorCreateUrl: new URL("https://www.gaoding.art/editor/canvas?mode=create&type=board"),
23
- editorWorkUrl: new URL("https://www.gaoding.art/editor/canvas"),
24
- restrictEditorTargets: false,
25
22
  endpoints: {
26
23
  orgApi: gaodingApi,
27
24
  creditsApi: gaodingApi,
@@ -49,9 +46,6 @@ export const insmindProduct = freezeProduct({
49
46
  deviceClientId: "gdhub-cli",
50
47
  pricingUrl: new URL("https://www.insmind.com/pricing"),
51
48
  telemetryUrl: new URL("https://gaoding-log-ai-gpu-use.us-east-1.log.aliyuncs.com/logstores/gd-cli/track?APIVersion=0.6.0"),
52
- defaultEditorCreateUrl: new URL("https://www.insmind.com/editor/canvas?mode=create&type=board"),
53
- editorWorkUrl: new URL("https://www.insmind.com/editor/canvas"),
54
- restrictEditorTargets: true,
55
49
  endpoints: {
56
50
  orgApi: insmindApi,
57
51
  creditsApi: insmindApi,
@@ -82,7 +76,6 @@ export const insmindProduct = freezeProduct({
82
76
  { "name": "image.enhance", "title": "Image enhancement", "description": "Upscale pixels or restore image details." },
83
77
  { "name": "image.expand", "title": "Image expansion", "description": "Extend a canvas with explicit source placement." },
84
78
  { "name": "image.text_edit", "title": "Image text editing", "description": "Replace specified text in an image." },
85
- { "name": "image.ocr", "title": "Text recognition", "description": "Recognize text and its pixel coordinates." },
86
79
  { "name": "image.layers", "title": "Image decomposition", "description": "Convert an image to an editable native template." },
87
80
  { "name": "image.vectorize", "title": "Image vectorization", "description": "Convert a bitmap to vector SVG." },
88
81
  { "name": "video.edit", "title": "Video editing", "description": "Edit a video using instructions and optional references." },
@@ -1 +1 @@
1
- {"operation":"unknown","action":false,"options":["-V, --version","--json-errors"],"children":{"auth":{"operation":"auth","action":false,"options":[],"children":{"login":{"operation":"auth.login","action":true,"options":["--no-browser","--require-browser"],"children":{}},"status":{"operation":"auth.status","action":true,"options":["--json"],"children":{}},"logout":{"operation":"auth.logout","action":true,"options":[],"children":{}}}},"org":{"operation":"org","action":false,"options":[],"children":{"list":{"operation":"org.list","action":true,"options":["--json"],"children":{}},"current":{"operation":"org.current","action":true,"options":["--json"],"children":{}},"switch":{"operation":"org.switch","action":true,"options":["--org <org-id>"],"children":{}}}},"agent":{"operation":"agent","action":false,"options":[],"children":{"send":{"operation":"agent.send","action":true,"options":["--schema","--input <file|->","--async","--json"],"children":{}}}},"tool":{"operation":"tool","action":false,"options":[],"children":{"list":{"operation":"tool.list","action":true,"options":["--json"],"children":{}},"call":{"operation":"tool.call","action":true,"options":["--schema","--input <file|->","--async","--json"],"children":{}}}},"model":{"operation":"model","action":false,"options":[],"children":{"list":{"operation":"model.list","action":true,"options":["--tool <tool>","--json"],"children":{}},"get":{"operation":"model.get","action":true,"options":["--tool <tool>","--json"],"children":{}}}},"editor":{"operation":"editor","action":false,"options":[],"children":{"connect":{"operation":"editor.connect","action":true,"options":["--json"],"children":{}},"disconnect":{"operation":"editor.disconnect","action":true,"options":["--json"],"children":{}},"snapshot":{"operation":"editor.snapshot","action":true,"options":["--json"],"children":{}},"apply":{"operation":"editor.apply","action":true,"options":["--schema","--input <file|->","--json"],"children":{}},"screenshot":{"operation":"editor.screenshot","action":true,"options":["--json"],"children":{}},"save":{"operation":"editor.save","action":true,"options":["--json"],"children":{}}}},"dam":{"operation":"dam","action":false,"options":[],"children":{"repository":{"operation":"dam.repository","action":false,"options":[],"children":{"list":{"operation":"dam.repository.list","action":true,"options":["--json"],"children":{}}}},"folder":{"operation":"dam.folder","action":false,"options":[],"children":{"list":{"operation":"dam.folder.list","action":true,"options":["--repository-id <id>","--parent-id <id>","--query <text>","--page <n>","--page-size <number>","--json"],"children":{}}}},"tag":{"operation":"dam.tag","action":false,"options":[],"children":{"list":{"operation":"dam.tag.list","action":true,"options":["--repository-id <id>","--query <text>","--json"],"children":{}}}},"download":{"operation":"dam.download","action":true,"options":["--repository-id <id>","--output-dir <directory>","--json"],"children":{}},"rename":{"operation":"dam.rename","action":true,"options":["--kind <asset|folder>","--title <title>","--repository-id <id>","--json"],"children":{}},"move":{"operation":"dam.move","action":true,"options":["--kind <asset|folder>","--target-folder-id <id>","--repository-id <source-id>","--target-repository-id <target-id>","--json"],"children":{}},"copy":{"operation":"dam.copy","action":true,"options":["--kind <asset|folder>","--target-folder-id <id>","--repository-id <source-id>","--target-repository-id <target-id>","--json"],"children":{}},"list":{"operation":"dam.list","action":true,"options":["--repository-id <id>","--all-repositories","--folder-id <id>","--no-include-child-folder","--type <type>","--asset-format <csv>","--tag-ids <csv>","--page-size <number>","--cursor <id>","--json"],"children":{}},"search":{"operation":"dam.search","action":true,"options":["--repository-id <id>","--all-repositories","--folder-id <id>","--no-include-child-folder","--type <type>","--asset-format <csv>","--tag-ids <csv>","--page-size <number>","--cursor <id>","--json"],"children":{}},"get":{"operation":"dam.get","action":true,"options":["--json"],"children":{}},"upload":{"operation":"dam.upload","action":true,"options":["--repository-id <id>","--title <title>","--folder-id <id>","--tag-ids <csv>","--allow-sensitive-path","--wait-analysis","--json"],"children":{}},"delete":{"operation":"dam.delete","action":true,"options":["--repository-id <id>","--permanent"],"children":{}}}},"update":{"operation":"update","action":true,"options":[],"children":{"check":{"operation":"update.check","action":true,"options":["--for-display","--schema","--json"],"children":{}}}},"task":{"operation":"task","action":false,"options":[],"children":{"list":{"operation":"task.list","action":true,"options":["--limit <number>","--operation <operation>","--json"],"children":{}},"get":{"operation":"task.get","action":true,"options":["--json"],"children":{}}}},"credits":{"operation":"credits.get","action":true,"options":["--json","--schema"],"children":{"usage":{"operation":"credits.usage","action":false,"options":[],"children":{"list":{"operation":"credits.usage.list","action":true,"options":["--from <timestamp>","--to <timestamp>","--limit <number>","--cursor <cursor>","--json","--schema"],"children":{}},"get":{"operation":"credits.usage.get","action":true,"options":["--json","--schema"],"children":{}}}}}}}}
1
+ {"operation":"unknown","action":false,"options":["-V, --version","--json-errors"],"children":{"auth":{"operation":"auth","action":false,"options":[],"children":{"login":{"operation":"auth.login","action":true,"options":["--no-browser","--require-browser"],"children":{}},"status":{"operation":"auth.status","action":true,"options":["--json"],"children":{}},"logout":{"operation":"auth.logout","action":true,"options":[],"children":{}}}},"org":{"operation":"org","action":false,"options":[],"children":{"list":{"operation":"org.list","action":true,"options":["--json"],"children":{}},"current":{"operation":"org.current","action":true,"options":["--json"],"children":{}},"switch":{"operation":"org.switch","action":true,"options":["--org <org-id>"],"children":{}}}},"agent":{"operation":"agent","action":false,"options":[],"children":{"send":{"operation":"agent.send","action":true,"options":["--schema","--input <file|->","--async","--json","--with-skills"],"children":{}}}},"tool":{"operation":"tool","action":false,"options":[],"children":{"list":{"operation":"tool.list","action":true,"options":["--json"],"children":{}},"call":{"operation":"tool.call","action":true,"options":["--schema","--input <file|->","--async","--json","--with-skills"],"children":{}}}},"model":{"operation":"model","action":false,"options":[],"children":{"list":{"operation":"model.list","action":true,"options":["--tool <tool>","--json","--with-skills"],"children":{}},"get":{"operation":"model.get","action":true,"options":["--tool <tool>","--json","--with-skills"],"children":{}}}},"dam":{"operation":"dam","action":false,"options":[],"children":{"repository":{"operation":"dam.repository","action":false,"options":[],"children":{"list":{"operation":"dam.repository.list","action":true,"options":["--json"],"children":{}}}},"folder":{"operation":"dam.folder","action":false,"options":[],"children":{"list":{"operation":"dam.folder.list","action":true,"options":["--repository-id <id>","--parent-id <id>","--query <text>","--page <n>","--page-size <number>","--json"],"children":{}}}},"tag":{"operation":"dam.tag","action":false,"options":[],"children":{"list":{"operation":"dam.tag.list","action":true,"options":["--repository-id <id>","--query <text>","--json"],"children":{}}}},"download":{"operation":"dam.download","action":true,"options":["--repository-id <id>","--output-dir <directory>","--json"],"children":{}},"rename":{"operation":"dam.rename","action":true,"options":["--kind <asset|folder>","--title <title>","--repository-id <id>","--json"],"children":{}},"move":{"operation":"dam.move","action":true,"options":["--kind <asset|folder>","--target-folder-id <id>","--repository-id <source-id>","--target-repository-id <target-id>","--json"],"children":{}},"copy":{"operation":"dam.copy","action":true,"options":["--kind <asset|folder>","--target-folder-id <id>","--repository-id <source-id>","--target-repository-id <target-id>","--json"],"children":{}},"list":{"operation":"dam.list","action":true,"options":["--repository-id <id>","--all-repositories","--folder-id <id>","--no-include-child-folder","--type <type>","--asset-format <csv>","--tag-ids <csv>","--page-size <number>","--cursor <id>","--json"],"children":{}},"search":{"operation":"dam.search","action":true,"options":["--repository-id <id>","--all-repositories","--folder-id <id>","--no-include-child-folder","--type <type>","--asset-format <csv>","--tag-ids <csv>","--page-size <number>","--cursor <id>","--json"],"children":{}},"get":{"operation":"dam.get","action":true,"options":["--json"],"children":{}},"upload":{"operation":"dam.upload","action":true,"options":["--repository-id <id>","--title <title>","--folder-id <id>","--tag-ids <csv>","--allow-sensitive-path","--wait-analysis","--json"],"children":{}},"delete":{"operation":"dam.delete","action":true,"options":["--repository-id <id>","--permanent"],"children":{}}}},"update":{"operation":"update","action":true,"options":[],"children":{"check":{"operation":"update.check","action":true,"options":["--for-display","--schema","--json"],"children":{}}}},"task":{"operation":"task","action":false,"options":[],"children":{"list":{"operation":"task.list","action":true,"options":["--limit <number>","--operation <operation>","--json"],"children":{}},"get":{"operation":"task.get","action":true,"options":["--json"],"children":{}}}},"credits":{"operation":"credits.get","action":true,"options":["--json","--schema"],"children":{"usage":{"operation":"credits.usage","action":false,"options":[],"children":{"list":{"operation":"credits.usage.list","action":true,"options":["--from <timestamp>","--to <timestamp>","--limit <number>","--cursor <cursor>","--json","--schema"],"children":{}},"get":{"operation":"credits.usage.get","action":true,"options":["--json","--schema"],"children":{}}}}}}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaoding/cli",
3
- "version": "2.1.7",
3
+ "version": "3.0.0",
4
4
  "description": "Gaoding command-line interface for agents and people.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,8 +65,8 @@
65
65
  }
66
66
  },
67
67
  "gaodingRelease": {
68
- "sourceCommit": "5ad82af1858a5e5e20c3b0018b28fe3a4a53071a",
69
- "pipelineId": "268194",
70
- "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/268194"
68
+ "sourceCommit": "93fd122bc191724092f6cc9b7148438e032a0523",
69
+ "pipelineId": "272894",
70
+ "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/272894"
71
71
  }
72
72
  }
@@ -1,41 +1,22 @@
1
1
  ---
2
2
  name: gd-cli
3
- description: 用稿定做业务策划和多轮创作,查询工具能力与稿豆价格,生成或处理图片、视频、文本,操作稿定编辑器或管理素材库。
3
+ description: 用户希望通过稿定 CLI 创作或处理图片、视频、文案,管理素材或找回任务时使用。
4
4
  ---
5
5
 
6
- # GD CLI
6
+ # 稿定 CLI
7
7
 
8
- ## 按需发现当前能力
8
+ ## 从哪里开始
9
9
 
10
- - 调用 `agent send`、`tool call`、`editor apply` 时,在输入 JSON 顶层填写发起命令的应用名 `host_application`。Codex Agent 通过 shell 执行时填 `codex`,其他宿主同理,如 `workbuddy`、`qwenwork`、`trae`。仅当用户亲自在终端执行时填 `terminal`。
11
- - 首次使用时确认 `gd-cli --version`;不确定入口时读 `gd-cli --help`,沿相关命令组选择命令,执行前读其 `--help`。本 Skill 的示例不代表完整能力清单。
12
- - 用户前台使用时,把可用升级提醒随本次结果转述给用户,一小时最多一次。只读取标准输出的宿主见下方「更新」。
13
- - 结构化输入先读取命令公开支持的 `--schema`;模型、参数选项、价格与资源 ID 由对应目录或详情查询取得,不从旧示例猜值。发现不支持或查询失败时说明缺口,不静默替换用户明确约束。
14
- - 先按操作对象选入口:附件图片、媒体链接及导出图片的改字、分层、矢量化等处理从 `tool list` 发现;作品 ID/编辑器链接中的元素操作才进入 Editor。只查过 Editor 不能判断图片工具是否支持。
15
- - 用户明确要求用稿定策划、创作或处理时,以实际 CLI 调用和服务回复为完成依据;策划请求也应发现并调用 Agent,不能用宿主自行给出的建议冒充稿定回复。选定模型后读 `model get` 的详情再判断能否满足需求;不凭列表摘要宣布不支持,也不自行用本地插值、描图等替代稿定调用。本地脚本可用于素材准备;替代产物须单独说明,不能把指定的稿定任务报为完成。
16
- - 先根据 Schema 构造并保存完整 JSON,再用 `--input request.json` 执行。命令不交互填参;若用 `--input -`,必须在同一条 shell 命令中通过管道或重定向送入完整 JSON,单独执行不会再向你提问。JSON 内的本地媒体用 `Path(path).resolve().as_uri()` 或 `pathToFileURL(path).href` 生成 URI;中文、空格和 `#` 保持原文件名并正确转义。
17
- - 同一会话可复用同一路径/版本的 help 和静态 Schema;CLI 变化后重查。动态信息在本次任务选能力或报价时查询,身份/组织变化或明确不匹配时刷新相关结果,不全量扫描无关目录。
18
- - 发现只说明当前实装 CLI 的能力,不等于升级,也不授予生成、写入或安装权限;未知结果的恢复按错误处理指引执行。
10
+ 用本机的 `gd-cli --help` 发现命令,再看所选命令的 `--help` 和 `--schema`。模型、可用参数和报价以当前组织的实时目录及模型详情为准。
19
11
 
20
- ## 创作执行边界
12
+ ## 选择创作路线
21
13
 
22
- 选定路由后,执行前读取 [Tool](references/tool.md) 或 [Agent](references/agent.md) 的提交和交付流程;下方场景页用于选能力和准备素材,不能替代执行流程。
14
+ 用户委托你策划或设计一个成品,例如“帮我设计一张能上架的商品主图”,优先用 `gd-cli agent send` 传递目标、素材和明确约束。用户已经指定一项独立处理时,用 `gd-cli tool list` 发现工具,再用 `gd-cli tool call <工具名>` 执行。
23
15
 
24
- - 现在要结果时,默认同步。保留宿主返回的退出状态和进程句柄,等原进程交付完整结果。句柄丢失时,用 stderr 中的 CLI taskId 查原任务。running 时继续等,不让用户回来催取。
25
- - 用户明确说稍后拿时,用 `--async`。收到受理回执就把 taskId 和当前状态给用户,本轮到此结束。等用户回来再取同一任务。
26
- - 首次取得可用服务结果就先交付。不得为修正自己观察到的效果偏差,擅自换模型、调整选区或再次创作;需要返修时说明偏差并由用户决定。执行前的素材准备、原任务查询和结果下载不属于追加创作。
27
- - 服务明确返回用于交付的资源 URL 是完整值,原样复制或保存后引用;不要手抄、拼接、截断或去掉查询参数。任务查询返回同一成品时仍使用实际返回的完整链接,不凭记忆重建。
28
- - Tool 返回的价格区间只是估价,即使上下限相同也不能称为实扣;Agent 的实际用量与账本核对见 [费用来源](references/errors.md#费用来源)。
16
+ ## 查找具体指引
29
17
 
30
- ## 读取任务指引
18
+ 用 `gd-cli --skill` 浏览目录。查询具体模型或提交创作时,结果 JSON 的 `relatedSkills` 默认列出匹配指引的用途和读取命令。按需用 `gd-cli --skill <章节>` 选读一篇或多篇,也可以直接交付结果。旧版可用 `gd-cli --help` 查看命令。
31
19
 
32
- 按用户目标只读取对应参考:
20
+ ## 续作和交付
33
21
 
34
- - 按业务意图选择 Agent / Tool 创作路由、发现 Model 并生成图片、视频或文本:[创作](references/creation.md)
35
- - 处理附件/链接中的图片或视频(含改字、分层、矢量化)、准备参考素材和 mask:[图片与视频工具选择](references/media-tools.md)
36
- - 去背景、提取主体、透明 PNG,或补全被遮挡的物体:[抠图](references/matting.md)
37
- - 操作已连接作品的 Shape/Connector 元素、预览、保存或断开:[编辑器](references/editor.md)
38
- - 发现资源库、文件夹与标签,查询、上传、下载或管理 DAM 资源:[素材管理](references/dam.md)
39
- - 登录或选择组织:[登录与组织](references/auth-org.md)
40
- - 创作已受理/仍在运行、取回异步结果、解释费用、警告、错误或中断:[状态与错误处理](references/errors.md)
41
- - 更新 CLI 与随包 Agent Skill:[更新](references/update.md)
22
+ 续作沿用上轮的上下文,取件用 `gd-cli task get` 查原任务。提交结果不明时先核对原单。交付实际返回的正文或完整成品链接,说明回执中的估价或实扣。