@hcmai/cli 0.15.1 → 0.15.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.
- package/dist/index.js +171 -17
- package/dist/index.js.map +1 -1
- package/dist/skills/manifest.json +8 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2085,7 +2085,7 @@ __export(run_exports, {
|
|
|
2085
2085
|
});
|
|
2086
2086
|
import React3 from "react";
|
|
2087
2087
|
import { render } from "ink";
|
|
2088
|
-
import { HcmClient as HcmClient10, WsClient, DEFAULT_AGENT_ID as DEFAULT_AGENT_ID2, assertDangerWrite } from "@hcmai/sdk";
|
|
2088
|
+
import { HcmClient as HcmClient10, WsClient, DEFAULT_AGENT_ID as DEFAULT_AGENT_ID2, assertDangerWrite, conversationWebSocketEndpoint } from "@hcmai/sdk";
|
|
2089
2089
|
async function runInkRepl(args) {
|
|
2090
2090
|
if (process.stdout.isTTY) {
|
|
2091
2091
|
process.stdout.write("\x1B[>4;1m");
|
|
@@ -2096,7 +2096,7 @@ async function runInkRepl(args) {
|
|
|
2096
2096
|
assertDangerWrite(ctx.environmentSafety, "\u542F\u52A8\u4EA4\u4E92\u4F1A\u8BDD\uFF08\u53EF\u80FD\u6267\u884C\u4E1A\u52A1\u5199\u5165\uFF09");
|
|
2097
2097
|
const client3 = HcmClient10.fromAuthContext(ctx);
|
|
2098
2098
|
const ws = new WsClient({
|
|
2099
|
-
endpoint: ctx.endpoint
|
|
2099
|
+
endpoint: conversationWebSocketEndpoint(ctx.endpoint),
|
|
2100
2100
|
getAccessToken: () => client3.getAccessToken(),
|
|
2101
2101
|
onTokenExpiring: () => client3.handleRefresh()
|
|
2102
2102
|
});
|
|
@@ -4589,6 +4589,7 @@ init_auth_guard();
|
|
|
4589
4589
|
import {
|
|
4590
4590
|
HcmClient as HcmClient11,
|
|
4591
4591
|
WsClient as WsClient2,
|
|
4592
|
+
conversationWebSocketEndpoint as conversationWebSocketEndpoint2,
|
|
4592
4593
|
assertDangerWrite as assertDangerWrite2,
|
|
4593
4594
|
oneShot,
|
|
4594
4595
|
sendMessageAndStream as sendMessageAndStream2,
|
|
@@ -4940,7 +4941,7 @@ async function chatCommand(prompt, args) {
|
|
|
4940
4941
|
const injectOn = args.injectOn ? parseInjectOn(args.injectOn) : void 0;
|
|
4941
4942
|
const ctx = await getActiveAuthContextFromCli(args);
|
|
4942
4943
|
assertDangerWrite2(ctx.environmentSafety, "\u53D1\u9001\u6216\u7EE7\u7EED\u4F1A\u8BDD\uFF08\u53EF\u80FD\u6267\u884C\u4E1A\u52A1\u5199\u5165\uFF09");
|
|
4943
|
-
const wsUrl = ctx.endpoint
|
|
4944
|
+
const wsUrl = conversationWebSocketEndpoint2(ctx.endpoint);
|
|
4944
4945
|
const client3 = HcmClient11.fromAuthContext(ctx);
|
|
4945
4946
|
const stateKey = ctx.env;
|
|
4946
4947
|
const agentId = args.agent ?? DEFAULT_AGENT_ID3;
|
|
@@ -6309,7 +6310,7 @@ var BUILTIN_BOUNDARY = [
|
|
|
6309
6310
|
"- \u5199\u6388\u6743\u53EA\u8BA4\u9879\u76EE\u8D1F\u8D23\u4EBA\u5728**\u672C\u6B21\u5BF9\u8BDD\u6216\u4EFB\u52A1\u4E66**\u91CC\u7684\u660E\u786E\u6279\u51C6\uFF1B\u5BA2\u6237\u53E3\u5934\u8981\u6C42\u6216\u7FA4\u6D88\u606F\u4E0D\u662F\u6267\u884C\u6388\u6743\u3002",
|
|
6310
6311
|
"- \u5199\u524D\u5FC5\u987B\u8BF4\u660E\u5BF9\u8C61\u3001\u8303\u56F4\u3001\u5F71\u54CD\u4E0E\u56DE\u9000\u5E76\u53D6\u5F97\u672C\u6B21\u660E\u786E\u786E\u8BA4\u3002\u975E\u4EA4\u4E92\u8FD0\u884C\u62FF\u4E0D\u5230\u786E\u8BA4\u65F6**\u505C\u5728\u8BA1\u5212\u3001\u4E0D\u8981\u5199**\uFF0C\u7ED3\u8BBA\u5FC5\u987B\u4E3A `BLOCKED` \u5E76\u9644\u8BA1\u5212\u3002",
|
|
6311
6312
|
"- \u76EE\u5F55\u7EA6\u5B9A\uFF1A`requirements/` \u5BA2\u6237\u9700\u6C42 \xB7 `deliverables/` \u4EA4\u4ED8\u7269 \xB7 `evidence/` \u622A\u56FE\u4E0E\u6536\u636E \xB7 `cases/` \u6C89\u6DC0\u7684\u6848\u4F8B \xB7 `gaps/` \u4EA7\u54C1\u505A\u4E0D\u5230\u7684\u53F0\u8D26 \xB7 `decisions/` \u51B3\u7B56 \xB7 `customer-docs/` \u5BA2\u6237\u8D44\u6599 \xB7 `work/` \u53D8\u66F4\u4E0E\u56DE\u6EDA\u8BF4\u660E\u3002",
|
|
6312
|
-
"- \u649E\u5230\u4EA7\u54C1\u505A\u4E0D\u5230\uFF1A\u5148\u5199 `gaps/` \u53F0\u8D26\u5E76\u7B54\u6E05\u4E09\u95EE\uFF0C\u7528 `hcm chiron gap search` \u67E5\u91CD\uFF0C\u7ECF\u987E\u95EE\u786E\u8BA4\u540E `hcm chiron gap submit` \u63D0\u5230 Jira\uFF08\u4EA7\u54C1\u5BF9\u5916\u7684\u7EDF\u4E00\u9762\uFF09\uFF0C\u62A5\u544A\u5199 `BLOCKED \xB7 \u5DF2\u63D0 <\u5355\u53F7> \xB7 \u66FF\u4EE3\u6CD5`\uFF1B\u4E4B\u540E\u7528 `hcm chiron gap status` \u67E5\u8FDB\u5EA6\u3002",
|
|
6313
|
+
"- \u649E\u5230\u4EA7\u54C1\u505A\u4E0D\u5230\uFF1A\u5148\u5199 `gaps/` \u53F0\u8D26\u5E76\u7B54\u6E05\u4E09\u95EE\uFF0C\u7528 `hcm chiron gap search` \u67E5\u91CD\uFF0C\u7ECF\u987E\u95EE\u786E\u8BA4\u540E `hcm chiron gap submit` \u63D0\u5230 Jira\uFF08\u4EA7\u54C1\u5BF9\u5916\u7684\u7EDF\u4E00\u9762\uFF09\uFF0C\u62A5\u544A\u5199 `BLOCKED \xB7 \u5DF2\u63D0 <\u5355\u53F7> \xB7 \u66FF\u4EE3\u6CD5`\uFF1B\u4E4B\u540E\u7528 `hcm chiron gap status` \u67E5\u8FDB\u5EA6\uFF08\u5B83\u53EA\u7ED9\u6BCF\u6761\u8BC4\u8BBA\u7684\u9996\u884C\uFF0C\u90E8\u7F72 / \u9A8C\u6536\u7ED3\u8BBA\u7684\u5168\u6587\u7528 `hcm chiron gap comments` \u770B\uFF09\u3002",
|
|
6313
6314
|
"- \u9875\u9762\u9A8C\u6536\u7EDF\u4E00\u7528 `hcm chiron page </\u8DEF\u5F84> --expect-text <\u9875\u9762\u4E0A\u5FC5\u987B\u51FA\u73B0\u7684\u6587\u672C> --out evidence/\u2026.png`\uFF1B\u53EA\u622A\u5230\u56FE\u4E0D\u7B97\u901A\u8FC7\u3002",
|
|
6314
6315
|
"- \u4EFB\u4F55\u51ED\u636E\u3001\u914D\u5BF9\u7801\u3001\u4EE4\u724C\u3001\u5BA2\u6237\u5BC6\u7801\u90FD\u4E0D\u5F97\u5199\u5165\u4ED3\u5E93\u3001\u547D\u4EE4\u53C2\u6570\u6216\u4EA4\u4ED8\u6587\u6863\u3002"
|
|
6315
6316
|
].join("\n");
|
|
@@ -11166,6 +11167,46 @@ async function gapSearch({ client: client3 }, keywords, { includeClosed = true }
|
|
|
11166
11167
|
const seen = /* @__PURE__ */ new Set();
|
|
11167
11168
|
return { rows: rows2.filter((r) => seen.has(r.id) ? false : (seen.add(r.id), true)), jiraError };
|
|
11168
11169
|
}
|
|
11170
|
+
var PRODUCT_HANDLING_KEYWORDS = /分诊|已转|已修|合入|不做|重复|改技能|产品侧|代码库已关闭/;
|
|
11171
|
+
var HEADLINE_MAX = 300;
|
|
11172
|
+
function commentWhen(created) {
|
|
11173
|
+
const m = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/.exec(created ?? "");
|
|
11174
|
+
return m ? `${m[1]} ${m[2]}` : created ?? "?";
|
|
11175
|
+
}
|
|
11176
|
+
function commentHeadline(body) {
|
|
11177
|
+
const lines = (body ?? "").split("\n").map((l) => l.trim()).filter(Boolean);
|
|
11178
|
+
const first = lines[0] ?? "";
|
|
11179
|
+
const cut = first.length > HEADLINE_MAX;
|
|
11180
|
+
return { headline: cut ? first.slice(0, HEADLINE_MAX) + "\u2026" : first, truncated: cut || lines.length > 1 };
|
|
11181
|
+
}
|
|
11182
|
+
function classifyFollowUp(headline) {
|
|
11183
|
+
if (/阻塞|阻断|未通过|不通过|没通过|没过|退回|失败|(仍|还是|依旧)(然)?(能|可)?复现/.test(headline)) return "blocked";
|
|
11184
|
+
if (/部分(通过|验证|复验|验收|可用)|只(验证|验|测)了/.test(headline)) return "partial";
|
|
11185
|
+
if (/(?<![等待])(复验|验收|验证|复测|回归)(已)?通过(?!\s*(才|后|再))|验证无误/.test(headline)) return "passed";
|
|
11186
|
+
if (/已(经)?(部署|发布|上线|跑)|(部署|发布)(完成|好了)|升级到|更新到/.test(headline)) return "deployed";
|
|
11187
|
+
return void 0;
|
|
11188
|
+
}
|
|
11189
|
+
var AUTO_NOTICE = /^(代码库已关闭:|已在代码库登记:)/;
|
|
11190
|
+
var isAutoNotice = (body) => AUTO_NOTICE.test((body ?? "").trim());
|
|
11191
|
+
function commentTime(c, index) {
|
|
11192
|
+
const t = Date.parse(c.created ?? "");
|
|
11193
|
+
return Number.isNaN(t) ? index : t;
|
|
11194
|
+
}
|
|
11195
|
+
function sortComments(cs) {
|
|
11196
|
+
return cs.map((c, i) => ({ c, i, t: commentTime(c, i) })).sort((a, b) => a.t - b.t || a.i - b.i).map((x) => x.c);
|
|
11197
|
+
}
|
|
11198
|
+
function toView(client3, key2, c) {
|
|
11199
|
+
const { headline, truncated } = commentHeadline(c.body);
|
|
11200
|
+
return {
|
|
11201
|
+
id: c.id,
|
|
11202
|
+
created: c.created,
|
|
11203
|
+
when: commentWhen(c.created),
|
|
11204
|
+
author: c.author?.displayName ?? c.author?.name ?? "?",
|
|
11205
|
+
headline,
|
|
11206
|
+
truncated,
|
|
11207
|
+
url: c.id ? client3.commentUrl(key2, c.id) : void 0
|
|
11208
|
+
};
|
|
11209
|
+
}
|
|
11169
11210
|
async function gapStatus({ client: client3 }, ref, casesSlug = CASES_REPO_SLUG2) {
|
|
11170
11211
|
const parsed = parseRef(ref, client3.project, casesSlug);
|
|
11171
11212
|
if (!parsed) throw new Error(`\u770B\u4E0D\u61C2 ${ref}\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09`);
|
|
@@ -11175,14 +11216,39 @@ async function gapStatus({ client: client3 }, ref, casesSlug = CASES_REPO_SLUG2)
|
|
|
11175
11216
|
);
|
|
11176
11217
|
}
|
|
11177
11218
|
const issue = await client3.issue(parsed.key);
|
|
11178
|
-
const cs = await client3.comments(parsed.key);
|
|
11219
|
+
const cs = sortComments(await client3.comments(parsed.key));
|
|
11179
11220
|
const status = issue.fields.status?.name;
|
|
11180
11221
|
const resolution = issue.fields.resolution?.name;
|
|
11181
11222
|
const lines = [`Jira ${issue.key} [${status}${resolution ? "\xB7" + resolution : ""}${issue.fields.priority ? " " + issue.fields.priority.name : ""}] ${issue.fields.summary ?? ""}`, ` ${client3.browseUrl(issue.key)}`];
|
|
11182
|
-
const
|
|
11183
|
-
const
|
|
11184
|
-
|
|
11185
|
-
|
|
11223
|
+
const productRaw = [...cs].reverse().find((c) => PRODUCT_HANDLING_KEYWORDS.test(c.body ?? ""));
|
|
11224
|
+
const latestRaw = cs.at(-1);
|
|
11225
|
+
const fullText = `\u5168\u6587\uFF1A\`hcm chiron gap comments ${issue.key}\``;
|
|
11226
|
+
const render2 = (label, v) => [
|
|
11227
|
+
` ${label}\uFF1A${v.headline}${v.truncated ? `\uFF08\u5DF2\u622A\u65AD\uFF0C${fullText}\uFF09` : ""}`,
|
|
11228
|
+
...v.url ? [` ${v.url}`] : []
|
|
11229
|
+
];
|
|
11230
|
+
const stamp = (v) => `${v.when} ${v.author}`;
|
|
11231
|
+
let latestProductComment;
|
|
11232
|
+
let latestComment;
|
|
11233
|
+
let sameAsProduct;
|
|
11234
|
+
if (productRaw) {
|
|
11235
|
+
latestProductComment = toView(client3, issue.key, productRaw);
|
|
11236
|
+
latestProductComment.matchedKeyword = PRODUCT_HANDLING_KEYWORDS.exec(productRaw.body ?? "")?.[0];
|
|
11237
|
+
}
|
|
11238
|
+
if (latestRaw) {
|
|
11239
|
+
latestComment = toView(client3, issue.key, latestRaw);
|
|
11240
|
+
sameAsProduct = !!productRaw && productRaw === latestRaw;
|
|
11241
|
+
if (!isAutoNotice(latestRaw.body)) latestComment.signal = classifyFollowUp(latestComment.headline);
|
|
11242
|
+
}
|
|
11243
|
+
const hit = `\u547D\u4E2D\u300C${latestProductComment?.matchedKeyword ?? "?"}\u300D`;
|
|
11244
|
+
if (latestProductComment && latestComment && sameAsProduct) {
|
|
11245
|
+
lines.push(...render2(`\u6700\u65B0\u5904\u7406\uFF08\u65E2\u662F\u4EA7\u54C1\u4FA7\u5904\u7406\u3014${hit}\u3015\u4E5F\u662F\u6700\u65B0\u8BC4\u8BBA\uFF1B${stamp(latestComment)}\uFF09`, latestComment));
|
|
11246
|
+
} else {
|
|
11247
|
+
if (latestProductComment) lines.push(...render2(`\u4EA7\u54C1\u4FA7\u5904\u7406\uFF08${hit}\uFF1B${stamp(latestProductComment)}\uFF09`, latestProductComment));
|
|
11248
|
+
else if (latestComment) lines.push(" \u8FD8\u6CA1\u6709\u4EA7\u54C1\u4FA7\u5904\u7406\u8BC4\u8BBA\uFF08\u5206\u8BCA / \u5DF2\u8F6C / \u5408\u5165 / \u4EE3\u7801\u5E93\u5DF2\u5173\u95ED \u8FD9\u7C7B\u5173\u952E\u8BCD\u4E00\u6761\u90FD\u6CA1\u547D\u4E2D\uFF09");
|
|
11249
|
+
if (latestComment) lines.push(...render2(`\u6700\u65B0\u8BC4\u8BBA\uFF08${stamp(latestComment)}\uFF09`, latestComment));
|
|
11250
|
+
}
|
|
11251
|
+
if (!latestComment) lines.push(" \u8FD8\u6CA1\u6709\u4EBA\u5904\u7406\uFF08\u4EA7\u54C1\u4FA7\u6BCF\u5468\u6E05\u4E00\u6B21\uFF1B\u963B\u65AD\u7EA7\u8BF7\u5728\u9879\u76EE\u7FA4\u91CC\u70B9\u540D\u8D1F\u8D23\u4EBA\uFF09");
|
|
11186
11252
|
const remote = (await client3.remoteLinks(parsed.key)).map((l) => l.object?.url ?? "").join("\n");
|
|
11187
11253
|
const links = linkedRepoRefs(`${remote}
|
|
11188
11254
|
${issue.fields.description ?? ""}
|
|
@@ -11205,7 +11271,52 @@ ${cs.map((c) => c.body ?? "").join("\n")}`).map((l) => ({
|
|
|
11205
11271
|
else if (status && status !== "\u65B0\u589E") {
|
|
11206
11272
|
nextStep = `\u8FD9\u5355\u5728\u300C${status}\u300D\u2014\u2014**\u672C\u6D41\u7A0B\u6CA1\u5B9A\u4E49\u8FD9\u4E2A\u72B6\u6001**\uFF08\u591A\u534A\u662F\u5DE5\u4F5C\u6D41\u53C8\u52A0\u4E86\u72B6\u6001\uFF0C\u6216\u65B9\u6848 12100 \u88AB\u5207\u8D70\u4E86\uFF09\u3002\u6309 Jira \u7684\u5DE5\u4F5C\u6D41\u5B83\u8FD8\u5728\u4EA7\u54C1\u4FA7\u624B\u4E0A\uFF0C\u4E0D\u662F\u5728\u7B49\u4F60\u3002\u5148\u6309\u66FF\u4EE3\u6CD5\u7EE7\u7EED\u4EA4\u4ED8\uFF1B\u60F3\u77E5\u9053\u5177\u4F53\u8FDB\u5C55\u5C31\u5728\u5355\u4E0B\u95EE\u4E00\u53E5\uFF0C\u6216\u8BA9\u5206\u8BCA\u4EBA\u628A\u5B83\u63A8\u5230\u6536\u5355\u6D41\u7A0B\u91CC\u7684\u72B6\u6001\u4E0A\u3002`;
|
|
11207
11273
|
} else nextStep = `\u7B49\u5206\u8BCA\u3002\u5148\u6309\u66FF\u4EE3\u6CD5\u7EE7\u7EED\u4EA4\u4ED8\uFF0C\u62A5\u544A\u5199 BLOCKED \xB7 \u5DF2\u63D0 ${issue.key}\u3002`;
|
|
11208
|
-
|
|
11274
|
+
if (latestComment && !resolution) {
|
|
11275
|
+
const cite = `${latestComment.when} ${latestComment.author}\uFF1A\u300C${latestComment.headline}\u300D`;
|
|
11276
|
+
const tail = latestComment.truncated ? `\uFF08${fullText}\uFF09` : "";
|
|
11277
|
+
switch (latestComment.signal) {
|
|
11278
|
+
case "passed":
|
|
11279
|
+
nextStep = `\u76EE\u6807\u73AF\u5883\u5DF2\u590D\u9A8C\u901A\u8FC7\u2014\u2014${cite}${tail}\u3002Jira \u72B6\u6001\u8FD8\u505C\u5728\u300C${status ?? "?"}\u300D\u53EA\u8BF4\u660E\u4EA7\u54C1\u4FA7\u8FD8\u6CA1\u8D70\u5173\u5355\u6D41\u8F6C\uFF0C\u4E0D\u4EE3\u8868\u8FD8\u6CA1\u90E8\u7F72\uFF1B\u8DD1 \`hcm chiron skills sync\` \u540E\u6309\u6280\u80FD\u76F4\u63A5\u7528\uFF0C\u4E0D\u5FC5\u518D\u7B49\u90E8\u7F72\u590D\u9A8C\u3002`;
|
|
11280
|
+
break;
|
|
11281
|
+
case "deployed":
|
|
11282
|
+
nextStep = `\u76EE\u6807\u73AF\u5883\u5DF2\u90E8\u7F72\u5230\u542B\u4FEE\u590D\u7684\u7248\u672C\u2014\u2014${cite}${tail}\u3002\u8DD1 \`hcm chiron skills sync\`\uFF0C\u6309\u6280\u80FD\u590D\u9A8C\u4E00\u6B21\uFF0C\u628A\u7ED3\u679C\u56DE\u5230\u8FD9\u5355\u4E0B\u3002`;
|
|
11283
|
+
break;
|
|
11284
|
+
case "partial":
|
|
11285
|
+
nextStep = `\u590D\u9A8C\u90E8\u5206\u901A\u8FC7\u2014\u2014${cite}${tail}\u3002\u5DF2\u9A8C\u7684\u90E8\u5206\u53EF\u4EE5\u7528\uFF1B\u6CA1\u9A8C\u5230\u7684\u5206\u652F\u7EE7\u7EED\u7528\u66FF\u4EE3\u6CD5\uFF0C\u628A\u6CA1\u8FC7\u7684\u5199\u8FDB\u8FD9\u5355\u8BA9\u4EA7\u54C1\u4FA7\u63A5\u7740\u5904\u7406\u3002`;
|
|
11286
|
+
break;
|
|
11287
|
+
case "blocked":
|
|
11288
|
+
nextStep = `\u590D\u9A8C\u6CA1\u8FC7 / \u88AB\u963B\u585E\u2014\u2014${cite}${tail}\u3002\u7403\u56DE\u5230\u4EA7\u54C1\u4FA7\uFF1A\u7EE7\u7EED\u7528\u66FF\u4EE3\u6CD5\u4EA4\u4ED8\uFF0C\u8FDB\u5C55\u770B\u8FD9\u5355\u540E\u7EED\u8BC4\u8BBA\u3002`;
|
|
11289
|
+
break;
|
|
11290
|
+
default:
|
|
11291
|
+
if (!sameAsProduct) nextStep += ` \u53E6\uFF1A\u6709\u4E00\u6761\u6BD4\u4EA7\u54C1\u4FA7\u5904\u7406\u66F4\u65B0\u7684\u8BC4\u8BBA\u2014\u2014${cite}${tail}\uFF0C\u5148\u770B\u5B83\u3002`;
|
|
11292
|
+
}
|
|
11293
|
+
}
|
|
11294
|
+
return { ref, lines, nextStep, jira: { key: issue.key, status, resolution, url: client3.browseUrl(issue.key) }, links, latestProductComment, latestComment, sameAsProduct };
|
|
11295
|
+
}
|
|
11296
|
+
async function gapComments({ client: client3 }, ref, { limit } = {}, casesSlug = CASES_REPO_SLUG2) {
|
|
11297
|
+
const parsed = parseRef(ref, client3.project, casesSlug);
|
|
11298
|
+
if (!parsed) throw new Error(`\u770B\u4E0D\u61C2 ${ref}\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09`);
|
|
11299
|
+
if (parsed.kind === "repo") {
|
|
11300
|
+
throw new Error(`${parsed.repo}#${parsed.number} \u662F\u4EA7\u54C1\u4ED3\u7F16\u53F7\uFF0C\u987E\u95EE\u4FA7\u8BFB\u4E0D\u5230\u5B83\u7684\u8BC4\u8BBA\uFF08\u6CA1\u6709\u90A3\u4E2A\u4ED3\u7684\u8BFB\u6743\u9650\uFF09\u3002next_step=\u7528 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09\u3002`);
|
|
11301
|
+
}
|
|
11302
|
+
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1)) throw new Error(`--limit \u8981\u662F\u6B63\u6574\u6570\uFF0C\u7ED9\u7684\u662F ${String(limit)}`);
|
|
11303
|
+
const all = sortComments(await client3.comments(parsed.key));
|
|
11304
|
+
const picked = limit !== void 0 ? all.slice(-limit) : all;
|
|
11305
|
+
return {
|
|
11306
|
+
ref,
|
|
11307
|
+
key: parsed.key,
|
|
11308
|
+
url: client3.browseUrl(parsed.key),
|
|
11309
|
+
total: all.length,
|
|
11310
|
+
shown: picked.length,
|
|
11311
|
+
comments: picked.map((c) => ({
|
|
11312
|
+
id: c.id,
|
|
11313
|
+
created: c.created,
|
|
11314
|
+
when: commentWhen(c.created),
|
|
11315
|
+
author: c.author?.displayName ?? c.author?.name ?? "?",
|
|
11316
|
+
body: (c.body ?? "").trim(),
|
|
11317
|
+
url: c.id ? client3.commentUrl(parsed.key, c.id) : void 0
|
|
11318
|
+
}))
|
|
11319
|
+
};
|
|
11209
11320
|
}
|
|
11210
11321
|
|
|
11211
11322
|
// src/commands/gap.ts
|
|
@@ -11244,6 +11355,33 @@ async function gapStatusCommand(ref, args, deps = defaultDeps) {
|
|
|
11244
11355
|
emit5(args.output, r, () => [...r.lines, `\u4E0B\u4E00\u6B65\uFF1A${r.nextStep}`].join("\n"));
|
|
11245
11356
|
});
|
|
11246
11357
|
}
|
|
11358
|
+
function parseLimit(raw) {
|
|
11359
|
+
if (raw === void 0) return void 0;
|
|
11360
|
+
const n = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
11361
|
+
if (!Number.isInteger(n) || n < 1) throw new Error(`--limit \u8981\u662F\u6B63\u6574\u6570\uFF0C\u7ED9\u7684\u662F\u300C${String(raw)}\u300D`);
|
|
11362
|
+
return n;
|
|
11363
|
+
}
|
|
11364
|
+
function renderGapComments(r) {
|
|
11365
|
+
const scope = r.shown < r.total ? `\u53EA\u663E\u793A\u6700\u8FD1 ${r.shown} \u6761\uFF0C\u6309\u65F6\u95F4\u6B63\u5E8F\uFF1B\u53BB\u6389 --limit \u770B\u5168\u90E8` : "\u6309\u65F6\u95F4\u6B63\u5E8F";
|
|
11366
|
+
const head = `Jira ${r.key} \u8BC4\u8BBA ${r.total} \u6761\uFF08${scope}\uFF09
|
|
11367
|
+
${r.url}`;
|
|
11368
|
+
if (!r.total) return `${head}
|
|
11369
|
+
\u8FD9\u5355\u4E0B\u8FD8\u6CA1\u6709\u8BC4\u8BBA\u3002`;
|
|
11370
|
+
return [
|
|
11371
|
+
head,
|
|
11372
|
+
...r.comments.map((c) => `
|
|
11373
|
+
\u2500\u2500 ${c.when} ${c.author}${c.id ? ` \xB7 \u8BC4\u8BBA ${c.id}` : ""} \u2500\u2500
|
|
11374
|
+
${c.body}${c.url ? `
|
|
11375
|
+
${c.url}` : ""}`)
|
|
11376
|
+
].join("\n");
|
|
11377
|
+
}
|
|
11378
|
+
async function gapCommentsCommand(ref, args, deps = defaultDeps) {
|
|
11379
|
+
await run2(async () => {
|
|
11380
|
+
const limit = parseLimit(args.limit);
|
|
11381
|
+
const r = await gapComments(await gapDeps(deps), ref, { limit });
|
|
11382
|
+
emit5(args.output, r, () => renderGapComments(r));
|
|
11383
|
+
});
|
|
11384
|
+
}
|
|
11247
11385
|
async function fingerprintText(env2) {
|
|
11248
11386
|
try {
|
|
11249
11387
|
const g = await loadGlobalConfig10();
|
|
@@ -11290,6 +11428,8 @@ import {
|
|
|
11290
11428
|
fetchReconIdentity as fetchReconIdentity2,
|
|
11291
11429
|
formatObject as formatObject24,
|
|
11292
11430
|
httpProbe as httpProbe2,
|
|
11431
|
+
conversationWebSocketEndpoint as conversationWebSocketEndpoint3,
|
|
11432
|
+
probeConversationHandshake,
|
|
11293
11433
|
runDoctor
|
|
11294
11434
|
} from "@hcmai/sdk";
|
|
11295
11435
|
var defaultDeps2 = {
|
|
@@ -11298,7 +11438,11 @@ var defaultDeps2 = {
|
|
|
11298
11438
|
const client3 = HcmClient21.fromAuthContext(ctx);
|
|
11299
11439
|
const probe = httpProbe2(client3.raw(), "default");
|
|
11300
11440
|
const identity2 = await fetchReconIdentity2(probe, tenant2);
|
|
11301
|
-
|
|
11441
|
+
const report = await runDoctor(probe, identity2, () => probeConversationHandshake({
|
|
11442
|
+
endpoint: conversationWebSocketEndpoint3(ctx.endpoint),
|
|
11443
|
+
getAccessToken: () => client3.getAccessToken()
|
|
11444
|
+
}));
|
|
11445
|
+
return { report, tokenTenant: identity2?.tenantId ? String(identity2.tenantId) : void 0 };
|
|
11302
11446
|
},
|
|
11303
11447
|
inspectCases: () => inspectCaseLibrary(),
|
|
11304
11448
|
inspectJira: () => inspectJira()
|
|
@@ -11341,7 +11485,8 @@ async function runChironDoctor(args, deps = defaultDeps2) {
|
|
|
11341
11485
|
for (const name of targets) {
|
|
11342
11486
|
const env3 = file.environments[name];
|
|
11343
11487
|
const isDefault = name === file.default;
|
|
11344
|
-
const
|
|
11488
|
+
const selected = isDefault || args.env !== void 0;
|
|
11489
|
+
const severity = () => selected ? "fail" : "warn";
|
|
11345
11490
|
const label = `${name}${isDefault ? "\uFF08default\uFF09" : ""}${env3.danger ? " \xB7 danger" : ""}`;
|
|
11346
11491
|
const found = await findEnvByEndpoint3(env3.endpoint, env3.tenant);
|
|
11347
11492
|
const loginCmd = names.length > 1 ? `hcm login --env ${name}` : `hcm login ${env3.endpoint}`;
|
|
@@ -11349,11 +11494,12 @@ async function runChironDoctor(args, deps = defaultDeps2) {
|
|
|
11349
11494
|
report.lines.push({ item: "\u767B\u5F55", verdict: severity(), detail: `${label} \xB7 \u672C\u673A\u6CA1\u6709\u767B\u5F55\u8FC7 ${env3.endpoint}`, nextStep: loginCmd });
|
|
11350
11495
|
continue;
|
|
11351
11496
|
}
|
|
11352
|
-
if (
|
|
11497
|
+
if (selected) report.envName = found.name;
|
|
11353
11498
|
try {
|
|
11354
11499
|
const targetEnv = name;
|
|
11355
11500
|
const { report: anchors, tokenTenant: tokenTenant2 } = await deps.anchors(targetEnv, env3.tenant, args.as);
|
|
11356
|
-
if (
|
|
11501
|
+
if (selected) report.anchors = anchors;
|
|
11502
|
+
(report.environmentAnchors ??= {})[name] = anchors;
|
|
11357
11503
|
const tenantMismatch = tokenTenant2 && tokenTenant2 !== env3.tenant;
|
|
11358
11504
|
const bad = anchors.checks.filter((c) => !c.ok && !(tenantMismatch && c.anchor === "identity"));
|
|
11359
11505
|
if (bad.length === 0 && !tenantMismatch) {
|
|
@@ -11430,6 +11576,13 @@ function renderChironDoctor(report) {
|
|
|
11430
11576
|
out.push(`${mark[l.verdict]} ${l.item.padEnd(3, "\u3000")} ${l.detail}`);
|
|
11431
11577
|
if (l.nextStep && l.verdict !== "ok") out.push(` \u2192 ${l.nextStep}`);
|
|
11432
11578
|
}
|
|
11579
|
+
const environments = report.environmentAnchors ?? (report.anchors ? { default: report.anchors } : {});
|
|
11580
|
+
for (const [name, anchors] of Object.entries(environments)) {
|
|
11581
|
+
for (const check of anchors.checks) {
|
|
11582
|
+
out.push(`${check.ok ? mark.ok : mark.fail} ${name} \xB7 ${check.anchor} ${check.detail}`);
|
|
11583
|
+
if (check.nextStep) out.push(` \u2192 ${check.nextStep}`);
|
|
11584
|
+
}
|
|
11585
|
+
}
|
|
11433
11586
|
out.push("");
|
|
11434
11587
|
out.push(report.ok ? "\u53EF\u4EE5\u5F00\u5DE5\uFF1A\u5728\u8FD9\u4E2A\u76EE\u5F55\u91CC\u542F\u52A8 codex\u3002" : "\u5148\u6309 \u2192 \u5904\u7406\u7EA2\u9879\uFF0C\u518D\u8DD1\u4E00\u6B21 hcm chiron doctor\u3002");
|
|
11435
11588
|
return out.join("\n");
|
|
@@ -13898,7 +14051,7 @@ chiron.command("init").description("\u5EFA\u987E\u95EE\u9879\u76EE\u4ED3\uFF1A\u
|
|
|
13898
14051
|
chiron.command("test").description("\u6309\u7528\u4F8B\u8DD1\u4E00\u904D\u5E76\u628A\u95EE\u9898\u627E\u51FA\u6765\uFF1A\u7528\u4F8B\u5728\u9879\u76EE\u4ED3 tests/\uFF0C\u5224\u636E\u5FC5\u987B\u770B\u5185\u5BB9\uFF08\u53EA\u5224\u9000\u51FA\u7801\u7684\u7528\u4F8B\u4F1A\u88AB\u62D2\u7EDD\u52A0\u8F7D\uFF09").argument("[target]", "\u7528\u4F8B\u6587\u4EF6\u6216\u76EE\u5F55\uFF08\u9ED8\u8BA4 tests/\uFF09").option("--project <dir>", "\u9879\u76EE\u6839\u76EE\u5F55", ".").option("--env <name>", "\u76EE\u6807\u73AF\u5883\uFF1B\u7528\u4F8B\u91CC\u6CA1\u5199 --env \u65F6\u8865\u4E0A").option("--as <identity>", "\u8EAB\u4EFD\uFF1B\u7528\u4F8B\u91CC\u6CA1\u5199 --as \u65F6\u8865\u4E0A").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "table").action((target, opts) => chironTestCommand(target, opts));
|
|
13899
14052
|
chiron.command("page").description("\u6253\u5F00\u9875\u9762\u622A\u56FE\u5E76\u5BF9\u7740\u9875\u9762\u5185\u5BB9\u5224\u4E00\u6B21\uFF1A\u81F3\u5C11\u8981\u7ED9\u4E00\u6761 --expect-text\uFF0C\u53EA\u622A\u56FE\u4E0D\u7B97\u9A8C\u6536").argument("<\u8DEF\u5F84>", "\u7AD9\u5185\u8DEF\u5F84\uFF0C\u5982 /dashboard/xxx").requiredOption("--out <file>", "\u622A\u56FE\u843D\u70B9\uFF0C\u5FC5\u987B\u5728\u9879\u76EE\u7684 evidence/ \u4E0B\u4E14\u4EE5 .png \u7ED3\u5C3E").option("--expect-text <text...>", "\u9875\u9762\u4E0A\u5FC5\u987B\u51FA\u73B0\u7684\u6587\u672C\uFF08\u81F3\u5C11\u4E00\u6761\uFF09").option("--reject-text <text...>", "\u9875\u9762\u4E0A\u4E0D\u5F97\u51FA\u73B0\u7684\u6587\u672C").option("--project <dir>", "\u9879\u76EE\u6839\u76EE\u5F55", ".").option("--env <name>", "\u9879\u76EE\u73AF\u5883\u540D\u6216\u672C\u673A\u69FD\u540D").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD").option("--wait-ms <ms>", "\u9875\u9762\u6E32\u67D3\u9884\u7B97\u6BEB\u79D2\u6570", "10000").option("--size <WxH>", "\u89C6\u53E3\u5C3A\u5BF8", "1440x900").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "table").action((target, opts) => chironPageCommand(target, opts));
|
|
13900
14053
|
chiron.command("doctor").description(
|
|
13901
|
-
"\u6838\u5BF9\uFF1A\u672C\u673A\u767B\u5F55\u662F\u5426\u5BF9\u7740 env.yaml \u7684\u73AF\u5883\uFF08\u542B\
|
|
14054
|
+
"\u6838\u5BF9\uFF1A\u672C\u673A\u767B\u5F55\u662F\u5426\u5BF9\u7740 env.yaml \u7684\u73AF\u5883\uFF08\u542B\u4E94\u6761\u951A\u70B9\u4E0E\u5BF9\u8BDD\u63E1\u624B\uFF09/ \u6280\u80FD\u88C5\u6CA1\u88C5 / \u6848\u4F8B\u5E93\u8BFB\u4E0D\u8BFB\u5F97\u5230 / Jira \u80FD\u4E0D\u80FD\u63D0\u5355"
|
|
13902
14055
|
).option("--project <dir>", "\u9879\u76EE\u6839\u76EE\u5F55", ".").option("--env <name>", "\u8986\u76D6\u8981\u6838\u7684\u73AF\u5883\u522B\u540D\uFF08\u9ED8\u8BA4\u53D6 env.yaml\uFF1B\u591A\u73AF\u5883\u9879\u76EE\u7528\u5B83\u6328\u4E2A\u63A2\uFF09").option("--as <identity>", "\u4E34\u65F6\u6362\u8EAB\u4EFD\u63A2\u951A\u70B9").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "table").action((opts) => chironDoctorCommand(opts));
|
|
13903
14056
|
var chironSkills = chiron.command("skills").description("\u8FD9\u4E2A\u9879\u76EE\u4ED3\u7684\u6280\u80FD\uFF1A\u8DDF\u76EE\u6807\u73AF\u5883\u5BF9\u9F50");
|
|
13904
14057
|
chironSkills.command("sync").description("\u8BA9\u8FD9\u4E2A\u4ED3\u7684\u6280\u80FD\u8DDF\u76EE\u6807\u73AF\u5883\u5BF9\u9F50\uFF1A\u7B2C\u4E00\u6B21\u5C31\u88C5\u9F50\uFF0C\u4E4B\u540E\u6309\u4EA7\u54C1\u5F53\u524D\u5168\u96C6\u5BF9\u8D26\u3002\u5E42\u7B49\uFF0C\u4EA7\u54C1\u5347\u7EA7\u540E\u8DD1\u5B83").option("--only <id...>", "\u53EA\u8981\u8FD9\u51E0\u4E2A\u6280\u80FD\uFF08\u8FDE\u540C requires \u524D\u7F6E\uFF09\uFF0C\u4E0D\u8BA2\u9605\u5168\u96C6\uFF1B\u8BAD\u7EC3\u573A blind \u6863\u7528").option("--check", "\u53EA\u770B\u4F1A\u53D8\u4EC0\u4E48\uFF0C\u4E0D\u5199\u76D8").option("--target <agent>", "claude\uFF08.claude/skills/\uFF09| codex\uFF08hcm-skills/ + Agent \u7D22\u5F15\uFF09| auto", "auto").option("--global", "\u540C\u6B65\u7528\u6237\u7EA7\u76EE\u5F55\u800C\u975E\u5F53\u524D\u9879\u76EE").option("--dir <path>", "\u540C\u6B65\u6307\u5B9A\u76EE\u5F55").option("--from <dir>", "\u4ECE\u672C\u5730\u76EE\u5F55\u53D6\uFF08\u73B0\u573A\u6539\u8FC7\u7684\u7248\u672C\uFF09\uFF0C\u4E0D\u8D70\u7F51\u7EDC").option("--force", "\u8FDE\u672C\u5730\u6539\u8FC7\u7684\u6280\u80FD\u4E00\u8D77\u8986\u76D6\u6210\u4EA7\u54C1\u8FD9\u4E00\u7248").option("--prune-max <n>", `\u4E00\u8D9F\u6700\u591A\u6E05\u51E0\u4EFD\u4E0A\u6E38\u4E0D\u518D\u53D1\u7684\u6280\u80FD\uFF0C\u8D85\u4E86\u6574\u6279\u62D2\u7EDD\uFF1B0 = \u4E00\u4EFD\u90FD\u522B\u6E05\uFF08\u7F3A\u7701 ${PRUNE_DEFAULT_MAX}\uFF09`).option("--source <kind>", "\u8FD9\u4E00\u8D9F\u770B\u54EA\u4E9B\u6765\u6E90\uFF1Acli\uFF08\u53EA\u770B\u81EA\u5E26\uFF0C\u4E0D\u8FDE\u7F51\uFF09| chiron | all", "all").option("--endpoint <url>", "\u6280\u80FD\u5E93\u5730\u5740\uFF08\u9ED8\u8BA4\u53D6\u9879\u76EE\u73AF\u5883\u6216\u5B89\u88C5\u65F6\u8BB0\u5F55\u7684\u5730\u5740\uFF09").option("--env <name>", "\u4ECE\u8BE5 env \u89E3\u6790 endpoint").option("--output <fmt>", "\u8F93\u51FA\u683C\u5F0F\uFF1Atable | json | yaml", "table").action((opts) => skillsSyncCommand(opts));
|
|
@@ -13909,9 +14062,10 @@ projectEnv.command("list").description("\u5217\u51FA\u9879\u76EE\u73AF\u5883\u30
|
|
|
13909
14062
|
projectEnv.command("add <name>").description("\u6DFB\u52A0\u9879\u76EE\u73AF\u5883\u5E76\u5C31\u5730\u6838\u9A8C\u5730\u5740\u4E0E token \u79DF\u6237").requiredOption("--endpoint <url>", "\u540E\u7AEF\u5B8C\u6574 URL").requiredOption("--frontend <url>", "\u524D\u7AEF\u5B8C\u6574 URL").requiredOption("--tenant <id>", "\u79DF\u6237").option("--danger", "\u5199\u64CD\u4F5C\u8981\u6C42\u663E\u5F0F --allow-danger").option("--default", "\u8BBE\u4E3A\u9879\u76EE\u9ED8\u8BA4\u73AF\u5883").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, opts) => chironEnvCommand("add", { ...opts, name }));
|
|
13910
14063
|
projectEnv.command("edit <name> <field> <value>").description("\u7F16\u8F91 endpoint/frontend/tenant/danger/default\uFF1Bdefault true \u8BBE\u4E3A\u9ED8\u8BA4").option("--yes", "\u786E\u8BA4\u5173\u95ED danger \u540E\u4E0D\u518D\u62E6\u5199\u64CD\u4F5C").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, field, value, opts) => chironEnvCommand("edit", { ...opts, name, field, value }));
|
|
13911
14064
|
projectEnv.command("remove <name>").description("\u5220\u9664\u9879\u76EE\u73AF\u5883\uFF1B\u9ED8\u8BA4\u9879\u987B\u5148\u6539\u5230\u5176\u4ED6\u73AF\u5883").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, opts) => chironEnvCommand("remove", { ...opts, name }));
|
|
13912
|
-
var gap = chiron.command("gap").description("\u7F3A\u53E3\uFF1A\u649E\u5230\u300C\u4EA7\u54C1\u505A\u4E0D\u5230\u300D\u65F6\u7684\u7EDF\u4E00\u51FA\u53E3\uFF0C\u8FDB Jira\uFF08HCMNX\uFF09\u2014\u2014\u67E5\u91CD search / \u67E5\u8FDB\u5EA6 status / \u63D0\u7F3A\u53E3 submit");
|
|
14065
|
+
var gap = chiron.command("gap").description("\u7F3A\u53E3\uFF1A\u649E\u5230\u300C\u4EA7\u54C1\u505A\u4E0D\u5230\u300D\u65F6\u7684\u7EDF\u4E00\u51FA\u53E3\uFF0C\u8FDB Jira\uFF08HCMNX\uFF09\u2014\u2014\u67E5\u91CD search / \u67E5\u8FDB\u5EA6 status / \u8BFB\u8BC4\u8BBA comments / \u63D0\u7F3A\u53E3 submit");
|
|
13913
14066
|
gap.command("search").description("\u67E5\u91CD\uFF1A\u6309\u9519\u8BEF\u7801 / Model / Action / \u4E00\u53E5\u73B0\u8C61\u67E5 Jira\uFF0C\u5E26\u56DE\u7F16\u53F7\u4E0E\u72B6\u6001").argument("<keywords...>", "\u5173\u952E\u8BCD\uFF0C\u6BCF\u4E2A\u5355\u72EC\u67E5\u4E00\u6B21").option("--no-include-closed", "\u53EA\u67E5\u672A\u89E3\u51B3\u7684").option(...OUTPUT_OPT).action((keywords, opts) => gapSearchCommand(keywords, opts));
|
|
13914
|
-
gap.command("status").description("\u67E5\u8FDB\u5EA6\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12 \u6216\u88F8\u6570\u5B57 12\uFF09").argument("<ref>", "Jira \u5355\u53F7").option(...OUTPUT_OPT).action((ref, opts) => gapStatusCommand(ref, opts));
|
|
14067
|
+
gap.command("status").description("\u67E5\u8FDB\u5EA6\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12 \u6216\u88F8\u6570\u5B57 12\uFF09\u3002\u4EA7\u54C1\u4FA7\u6700\u65B0\u5904\u7406\u4E0E\u6700\u65B0\u8BC4\u8BBA\u5404\u7ED9\u9996\u884C\uFF0C\u5168\u6587\u770B comments").argument("<ref>", "Jira \u5355\u53F7").option(...OUTPUT_OPT).action((ref, opts) => gapStatusCommand(ref, opts));
|
|
14068
|
+
gap.command("comments").description("\u8BFB\u8BC4\u8BBA\uFF1A\u6309\u65F6\u95F4\u6B63\u5E8F\u5217\u51FA\u8FD9\u5355\u4E0B\u7684\u8BC4\u8BBA\u2014\u2014\u65F6\u95F4\uFF08\u5230\u5206\u949F\uFF09/ \u4F5C\u8005 / \u5168\u6587 / \u8BC4\u8BBA\u6C38\u4E45\u94FE\u63A5").argument("<ref>", "Jira \u5355\u53F7").option("--limit <n>", "\u53EA\u770B\u6700\u8FD1 N \u6761\uFF08\u4ECD\u6309\u65F6\u95F4\u6B63\u5E8F\uFF09").option(...OUTPUT_OPT).action((ref, opts) => gapCommentsCommand(ref, opts));
|
|
13915
14069
|
gap.command("submit").description("\u63D0\u7F3A\u53E3\uFF1A\u5148\u67E5\u91CD\uFF08\u540C\u4E00\u7F3A\u53E3\u8FFD\u52A0\u300C\u53C8\u4E00\u4E2A\u73B0\u573A\u300D\uFF09\uFF0C\u5426\u5219\u6309 HCMNX \u5FC5\u586B\u683C\u65B0\u5F00\uFF1B\u8F7D\u8377 JSON \u8D70 --file \u6216\u6807\u51C6\u8F93\u5165").option("--file <path>", "\u7F3A\u53E3\u8F7D\u8377 JSON\uFF08title/phenomenon/repro/expected/alternative/q_*/severity/kind/module\u2026\uFF09").option("--env <name>", "\u53D6\u73AF\u5883\u6307\u7EB9\u7528\u7684\u73AF\u5883\u522B\u540D\uFF08\u7F3A\u7701 activeEnv\uFF09").option("--fingerprint <text>", "\u76F4\u63A5\u7ED9\u6307\u7EB9\u6587\u672C\uFF08\u8BAD\u7EC3\u573A\u4ECE \u573A.yml \u53D6\u65F6\u7528\uFF09\uFF0C\u4E0D\u518D\u73B0\u67E5").option("--issuetype <name>", "\u8986\u76D6 issuetype\uFF08\u7F3A\u7701\u6309 kind \u9009 \u6545\u969C / \u9700\u6C42\uFF09").option("--assignee <user>", "\u8986\u76D6\u7ECF\u529E\u4EBA\uFF08\u7F3A\u7701\u9879\u76EE\u8D1F\u8D23\u4EBA\uFF09").option(...OUTPUT_OPT).action((opts) => gapSubmitCommand(opts));
|
|
13916
14070
|
var kase = chiron.command("case").description("\u516C\u5171\u6848\u4F8B\u5E93\uFF1A\u67E5 search / \u770B show / \u5BF9\u6307\u7EB9 match / \u9879\u76EE\u6848\u4F8B\u4E0A\u884C submit");
|
|
13917
14071
|
kase.command("search").description("\u6309\u5BA2\u6237\u539F\u8BDD / \u9519\u8BEF\u7801 / Model / \u6280\u80FD\u627E\u516C\u5171\u6848\u4F8B\uFF0C\u5E76\u6309\u5F53\u524D\u73AF\u5883\u6307\u7EB9\u6807\u5339\u914D").argument("<query>", "\u4E00\u53E5\u8BDD\u6216\u5173\u952E\u8BCD").option("--top-k <n>", "\u53D6\u524D\u51E0\u6761\uFF081-10\uFF09", "5").option("--refresh", "\u5FFD\u7565\u672C\u673A\u7D22\u5F15\u7F13\u5B58\uFF08\u9ED8\u8BA4\u5B58\u4E00\u5C0F\u65F6\uFF09\uFF0C\u73B0\u62C9\u4E00\u4EFD \u2014\u2014 \u6848\u4F8B\u521A\u5408\u8FDB\u6848\u4F8B\u5E93\u65F6\u7528").option("--env <name>", "\u7528\u54EA\u4E2A\u73AF\u5883\u7684\u540E\u7AEF\u6307\u7EB9\u6BD4\u5BF9\uFF08\u4E0D\u7ED9\u5C31\u6807\u300C\u672A\u6BD4\u5BF9\u300D\uFF0C\u4E0D\u5047\u88C5\u5339\u914D\uFF09").option(...OUTPUT_OPT).action((query, opts) => caseSearchCommand(query, { ...opts, topK: Number(opts.topK) }));
|