@insmind/cli 2.1.2 → 2.1.3

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.
@@ -27,21 +27,22 @@ const messages = {
27
27
  request: ["本次请求未能完成。", "This request could not be completed."],
28
28
  client: ["程序运行遇到问题,本次操作未能完成。", "The app encountered a problem and could not complete this operation."]
29
29
  };
30
- const reviewCodes = new Set(["12020751", "12020752", "12020757", "12020758", "12020760", "12020790"]);
30
+ const reviewCodes = new Set(["12020751", "12020752", "12020756", "12020757", "12020758", "12020760", "12020790"]);
31
31
  export function observedErrorCategory(e) {
32
32
  const gd = e.product === "gaoding", ins = e.product === "insmind";
33
33
  const toolOrQuery = e.operation === "tool.call" || e.operation === "task.get";
34
34
  if (e.code === "INSUFFICIENT_CREDITS" || gd && e.operation === "tool.call" && e.remoteCode === "12020770")
35
35
  return "credits";
36
36
  if (e.errorType === "AgentAuditRejectedError" || e.diagnosticReason === "AGENT_INPUT_AUDIT_REJECTED"
37
- || gd && (toolOrQuery && reviewCodes.has(e.remoteCode ?? "") || e.operation === "agent.send" && e.remoteCode === "-1006")
38
- || ins && toolOrQuery && e.remoteCode === "12020760")
37
+ || e.diagnosticReason !== "TASK_QUERY_FAILED" && (gd && (toolOrQuery && reviewCodes.has(e.remoteCode ?? "") || e.operation === "agent.send" && e.remoteCode === "-1006")
38
+ || ins && toolOrQuery && e.remoteCode === "12020760"))
39
39
  return "review";
40
40
  if (gd && e.operation === "agent.send" && e.httpStatus === 409)
41
41
  return "session_busy";
42
42
  if (gd && e.operation === "agent.send" && e.httpStatus === 429)
43
43
  return "service_busy";
44
44
  if (gd && e.operation === "auth.login" && e.httpStatus === 504 || e.code === "EDITOR_RPC_TIMEOUT"
45
+ || gd && toolOrQuery && e.remoteCode === "12020792"
45
46
  || (gd || ins) && e.operation === "tool.call" && e.remoteCode === "-31994" && e.diagnosticReason === "IMAGE_AUDIT_TIMEOUT")
46
47
  return "timeout";
47
48
  if (ins && e.operation === "tool.call" && e.remoteCode === "-31993")
@@ -106,6 +107,9 @@ export function observedErrorMessage(category, e) {
106
107
  return text("已收到本页流水,但服务未返回可用的下一页游标。请查看 details.partial_result,本次无法续页。", "This page was received without a usable cursor. Its records are in details.partial_result; the next page cannot be requested.");
107
108
  if (category === "timeout" && e.diagnosticReason === "IMAGE_AUDIT_TIMEOUT")
108
109
  return text("图片审核处理超时,尚未取得结果。", "The image check did not finish in time.");
110
+ if (category === "timeout" && e.product === "gaoding" && (e.operation === "tool.call" || e.operation === "task.get")
111
+ && e.remoteCode === "12020792")
112
+ return "内容审核处理超时,尚未取得结果。";
109
113
  if (category === "login" && e.errorType === "DeviceAuthorizationExpiredError")
110
114
  return text("本次登录已超时,请重新登录。", "This sign-in timed out. Please sign in again.");
111
115
  if (category === "account" && e.code === "ORG_INVALID")
@@ -3,12 +3,14 @@ import { ToolTaskFailedError } from "../tool/tool-api-adapter.js";
3
3
  import { RemoteRequestError } from "../../platform/signed-http-transport.js";
4
4
  import { RemoteProtocolError } from "../../platform/remote-protocol.js";
5
5
  // Scope numeric codes to the product/entry where they have a confirmed meaning.
6
- const CONTENT_REVIEW_CODES = new Set(["12020751", "12020752", "12020757", "12020758", "12020760", "12020790"]);
6
+ const CONTENT_REVIEW_CODES = new Set(["12020751", "12020752", "12020756", "12020757", "12020758", "12020760", "12020790"]);
7
7
  export function isContentReviewRejection(error, context = {}) {
8
8
  if (error instanceof AgentAuditRejectedError)
9
9
  return true;
10
10
  if (!(error instanceof RemoteRequestError || error instanceof RemoteProtocolError || error instanceof ToolTaskFailedError))
11
11
  return false;
12
+ if (error.diagnosticReason === "TASK_QUERY_FAILED")
13
+ return false;
12
14
  if (error.diagnosticReason === "AGENT_INPUT_AUDIT_REJECTED")
13
15
  return true;
14
16
  const toolOrQuery = context.operation === "tool.call" || context.operation === "task.get";
@@ -129,7 +129,9 @@ export function createSlsTelemetrySink(options) {
129
129
  // All writers hold the same lock, so remaining write temporaries are orphaned.
130
130
  if (/^(?:[a-f0-9]{64}|delivery-status)\.json\.tmp-[a-f0-9-]+$/u.test(name)) {
131
131
  await unlink(join(directory, name)).catch(() => undefined);
132
- await dropped("interrupted_write", 1);
132
+ // The health snapshot is not an event; its interrupted write loses no queued event.
133
+ if (!name.startsWith("delivery-status.json.tmp-"))
134
+ await dropped("interrupted_write", 1);
133
135
  }
134
136
  return;
135
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insmind/cli",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "insMind command-line interface for agents and people.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,8 +47,8 @@
47
47
  "@gaoding/cli": "workspace:*"
48
48
  },
49
49
  "gaodingRelease": {
50
- "sourceCommit": "db01676824330fe8f15c190fe71b3516b8b1924e",
51
- "pipelineId": "246753",
52
- "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/246753"
50
+ "sourceCommit": "e6cfcdd32450fc7a5753f11fddf6cf8b91298a17",
51
+ "pipelineId": "253026",
52
+ "pipelineUrl": "https://git.intra.gaoding.com/gtt/gaoding-cli/-/pipelines/253026"
53
53
  }
54
54
  }