ai-project-manage-cli 7.1.29 → 7.1.31

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 CHANGED
@@ -304,6 +304,10 @@ var init_request_config = __esm({
304
304
  path: "/cli/deploy-artifact-storage"
305
305
  }
306
306
  ),
307
+ getApmLogStorage: defineEndpoint({
308
+ method: "GET",
309
+ path: "/cli/apm-log-storage"
310
+ }),
307
311
  attachTaskDeploymentArtifact: defineEndpoint({
308
312
  method: "PUT",
309
313
  path: "/cli/task-deployments/artifact"
@@ -481,8 +485,12 @@ var init_minio = __esm({
481
485
  });
482
486
 
483
487
  // src/commands/connect/apm-log-minio.ts
484
- function createApmLogMinioClient() {
485
- const storage = APM_LOG_MINIO_CONFIG;
488
+ async function fetchApmLogStorage(cfg) {
489
+ const api = createApmApiClient(cfg);
490
+ return api.cli.getApmLogStorage(void 0);
491
+ }
492
+ async function createApmLogMinioClient(cfg) {
493
+ const storage = await fetchApmLogStorage(cfg);
486
494
  return {
487
495
  client: new MinioClient({
488
496
  endPoint: storage.endpoint,
@@ -494,19 +502,11 @@ function createApmLogMinioClient() {
494
502
  bucket: storage.bucket
495
503
  };
496
504
  }
497
- var APM_LOG_MINIO_CONFIG;
498
505
  var init_apm_log_minio = __esm({
499
506
  "src/commands/connect/apm-log-minio.ts"() {
500
507
  "use strict";
508
+ init_client();
501
509
  init_minio();
502
- APM_LOG_MINIO_CONFIG = {
503
- endpoint: "objectstorageapi.gzg.sealos.run",
504
- port: 443,
505
- useSsl: true,
506
- accessKey: "428hqav4",
507
- secretKey: "68b8srk4vdbjdhlc",
508
- bucket: "428hqav4-apm-log"
509
- };
510
510
  }
511
511
  });
512
512
 
@@ -647,7 +647,7 @@ var init_webide_terminal_registry = __esm({
647
647
  bucket = "";
648
648
  async ensureMinio() {
649
649
  if (this.minio) return;
650
- const created = createApmLogMinioClient();
650
+ const created = await createApmLogMinioClient(this.cfg);
651
651
  this.minio = created.client;
652
652
  this.bucket = created.bucket;
653
653
  await this.minio.ensureBucket(this.bucket);
@@ -7767,13 +7767,13 @@ function createAppendMessageCustomTools(cfg, messageId, appendContent) {
7767
7767
  const doAppend = appendContent ?? ((content) => appendMessageContent(cfg, messageId, content));
7768
7768
  return {
7769
7769
  AppendMessage: {
7770
- description: "\u5411\u5F53\u524D\u4F1A\u8BDD\u6D88\u606F\u8FFD\u52A0\u56DE\u590D\u5185\u5BB9\u3002\u53EF\u591A\u6B21\u8C03\u7528\u8865\u5145\u8FDB\u5C55\uFF1B\u88AB @ \u65F6\u6536\u5230\u540E\u5E94\u5148\u7B80\u77ED\u786E\u8BA4\u518D\u6267\u884C\u4EFB\u52A1\u3002",
7770
+ description: "\u5411\u5F53\u524D\u4F1A\u8BDD/WebIDE \u6D88\u606F\u8FFD\u52A0\u7528\u6237\u53EF\u89C1\u56DE\u590D\u3002\u53EF\u591A\u6B21\u8C03\u7528\u8865\u5145\u8FDB\u5C55\uFF1B\u88AB @ \u65F6\u6536\u5230\u540E\u5E94\u5148\u7B80\u77ED\u786E\u8BA4\u518D\u6267\u884C\u4EFB\u52A1\u3002\u7ED3\u8BBA\u4E0E\u8FDB\u5C55\u5E94\u5199\u5728\u672C\u5DE5\u5177\u4E2D\uFF1B\u6700\u7EC8\u81EA\u7136\u8BED\u8A00\u6536\u5C3E\u52FF\u518D\u590D\u8FF0\u6B64\u5904\u5185\u5BB9\u3002",
7771
7771
  inputSchema: {
7772
7772
  type: "object",
7773
7773
  properties: {
7774
7774
  content: {
7775
7775
  type: "string",
7776
- description: "\u8981\u53D1\u9001\u5230\u7FA4\u91CC\u7684\u56DE\u590D\u5185\u5BB9"
7776
+ description: "\u8981\u5C55\u793A\u7ED9\u7528\u6237\u7684\u56DE\u590D\u5185\u5BB9\uFF08\u975E\u6700\u7EC8 assistant \u590D\u8FF0\uFF09"
7777
7777
  }
7778
7778
  },
7779
7779
  required: ["content"]
@@ -8685,7 +8685,8 @@ function spawnWebIdeMessageWorker(cfg, msg) {
8685
8685
  const api = createApmApiClient2(cfg);
8686
8686
  await api.cli.webideSetMessageError({
8687
8687
  id: msg.messageId,
8688
- error: reason
8688
+ error: reason,
8689
+ asCancelled: true
8689
8690
  });
8690
8691
  } catch (err) {
8691
8692
  console.error(
@@ -208,6 +208,10 @@ var requestConfig = {
208
208
  path: "/cli/deploy-artifact-storage"
209
209
  }
210
210
  ),
211
+ getApmLogStorage: defineEndpoint({
212
+ method: "GET",
213
+ path: "/cli/apm-log-storage"
214
+ }),
211
215
  attachTaskDeploymentArtifact: defineEndpoint({
212
216
  method: "PUT",
213
217
  path: "/cli/task-deployments/artifact"
@@ -1768,13 +1772,13 @@ function createAppendMessageCustomTools(cfg, messageId, appendContent2) {
1768
1772
  const doAppend = appendContent2 ?? ((content) => appendMessageContent(cfg, messageId, content));
1769
1773
  return {
1770
1774
  AppendMessage: {
1771
- description: "\u5411\u5F53\u524D\u4F1A\u8BDD\u6D88\u606F\u8FFD\u52A0\u56DE\u590D\u5185\u5BB9\u3002\u53EF\u591A\u6B21\u8C03\u7528\u8865\u5145\u8FDB\u5C55\uFF1B\u88AB @ \u65F6\u6536\u5230\u540E\u5E94\u5148\u7B80\u77ED\u786E\u8BA4\u518D\u6267\u884C\u4EFB\u52A1\u3002",
1775
+ description: "\u5411\u5F53\u524D\u4F1A\u8BDD/WebIDE \u6D88\u606F\u8FFD\u52A0\u7528\u6237\u53EF\u89C1\u56DE\u590D\u3002\u53EF\u591A\u6B21\u8C03\u7528\u8865\u5145\u8FDB\u5C55\uFF1B\u88AB @ \u65F6\u6536\u5230\u540E\u5E94\u5148\u7B80\u77ED\u786E\u8BA4\u518D\u6267\u884C\u4EFB\u52A1\u3002\u7ED3\u8BBA\u4E0E\u8FDB\u5C55\u5E94\u5199\u5728\u672C\u5DE5\u5177\u4E2D\uFF1B\u6700\u7EC8\u81EA\u7136\u8BED\u8A00\u6536\u5C3E\u52FF\u518D\u590D\u8FF0\u6B64\u5904\u5185\u5BB9\u3002",
1772
1776
  inputSchema: {
1773
1777
  type: "object",
1774
1778
  properties: {
1775
1779
  content: {
1776
1780
  type: "string",
1777
- description: "\u8981\u53D1\u9001\u5230\u7FA4\u91CC\u7684\u56DE\u590D\u5185\u5BB9"
1781
+ description: "\u8981\u5C55\u793A\u7ED9\u7528\u6237\u7684\u56DE\u590D\u5185\u5BB9\uFF08\u975E\u6700\u7EC8 assistant \u590D\u8FF0\uFF09"
1778
1782
  }
1779
1783
  },
1780
1784
  required: ["content"]
@@ -2704,16 +2708,12 @@ var MinioClient = class {
2704
2708
  };
2705
2709
 
2706
2710
  // src/commands/connect/apm-log-minio.ts
2707
- var APM_LOG_MINIO_CONFIG = {
2708
- endpoint: "objectstorageapi.gzg.sealos.run",
2709
- port: 443,
2710
- useSsl: true,
2711
- accessKey: "428hqav4",
2712
- secretKey: "68b8srk4vdbjdhlc",
2713
- bucket: "428hqav4-apm-log"
2714
- };
2715
- function createApmLogMinioClient() {
2716
- const storage = APM_LOG_MINIO_CONFIG;
2711
+ async function fetchApmLogStorage(cfg) {
2712
+ const api = createApmApiClient(cfg);
2713
+ return api.cli.getApmLogStorage(void 0);
2714
+ }
2715
+ async function createApmLogMinioClient(cfg) {
2716
+ const storage = await fetchApmLogStorage(cfg);
2717
2717
  return {
2718
2718
  client: new MinioClient({
2719
2719
  endPoint: storage.endpoint,
@@ -2766,7 +2766,7 @@ function createThrottledWebIdeMessageLogSync(cfg, ctx, onError, options) {
2766
2766
  let firstLogNotified = false;
2767
2767
  const ensureMinio = async () => {
2768
2768
  if (minio) return;
2769
- const created = createApmLogMinioClient();
2769
+ const created = await createApmLogMinioClient(cfg);
2770
2770
  minio = created.client;
2771
2771
  bucket = created.bucket;
2772
2772
  await minio.ensureBucket(bucket);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-project-manage-cli",
3
- "version": "7.1.29",
3
+ "version": "7.1.31",
4
4
  "description": "命令行工具:后续用于调用平台后端 API 完成运维与自动化操作",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,6 +29,7 @@
29
29
  - 规则: `.apm/rules/*`
30
30
  - reply.md:当需要回复消息时需要读取这个文档,记住回复规则
31
31
  - write_doc.md:当需要写文档时需要读取这个文档,记住写文档的规则
32
+ - webide_reply.md:WebIDE 任务必守;用户可见只走 AppendMessage,最终自然语言收尾最多 1 句、禁止复述
32
33
  - webide_git_commit.md:WebIDE 开发/修码时读取,按规范分轮 commit,结束前 push
33
34
  - webide_sql_change.md:WebIDE 开发/修码时读取;若有数据表或 SQL 变更,须在 AppendMessage 中醒目提示
34
35
  - webide_testcase.md:WebIDE 生成测试用例时读取,按规范编写并提交用例
@@ -0,0 +1,18 @@
1
+ ## WebIDE 输出通道
2
+
3
+ 适用:WebIDE 任务(`webide-message` / 本轮 prompt 含 `taskId` + `action`)。
4
+
5
+ ### 分工
6
+
7
+ 1. **用户可见内容 → 只走 `AppendMessage`**
8
+ 进展、评估结论、改动说明、错误原因、下一步等,一律用 `AppendMessage` 写入(可多次追加)。
9
+
10
+ 2. **最终自然语言回复(非工具调用的收尾文本)→ 极简**
11
+ 最多 1 句状态确认,例如「本轮已完成」或「本轮已阻塞:…」。
12
+ **禁止**复述、扩写或总结 `AppendMessage` 已写内容;**禁止**再列改动清单、步骤回放或长篇收尾。
13
+
14
+ 3. 本轮若已调用过 `AppendMessage`,最终回复不要重复其要点。
15
+
16
+ ### 为何
17
+
18
+ 对话面板只展示 `AppendMessage`;最终 assistant 文本会进执行日志并触发同步,重复总结既无助于用户,又增加耗时。