ai-project-manage-cli 4.0.17 → 4.0.18

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 (2) hide show
  1. package/dist/index.js +12 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -155,6 +155,10 @@ var requestConfig = {
155
155
  })
156
156
  },
157
157
  theater: {
158
+ reportMemberAgentProgress: defineEndpoint({
159
+ method: "POST",
160
+ path: "/theater/sessions/report-member-agent-progress"
161
+ }),
158
162
  submitMemberResponse: defineEndpoint({
159
163
  method: "POST",
160
164
  path: "/theater/sessions/submit-member-response"
@@ -845,6 +849,12 @@ async function handleTheaterJob(api, payload) {
845
849
  throw new Error("THEATER_JOB \u7F3A\u5C11 memberKey");
846
850
  }
847
851
  console.log("[apm] \u5267\u573A\u4F1A\u8BDD:", sessionId, "\u6210\u5458:", memberKey);
852
+ await api.theater.reportMemberAgentProgress({
853
+ sessionId,
854
+ memberKey,
855
+ status: "IN_PROGRESS",
856
+ logId: payload.logId?.trim() || void 0
857
+ });
848
858
  const eventSession = new EventSession(payload.prompt);
849
859
  const agent = await createAgentForJob(payload);
850
860
  const { agentId, failed, failReason } = await runAgentStream(
@@ -853,12 +863,13 @@ async function handleTheaterJob(api, payload) {
853
863
  agent
854
864
  );
855
865
  const assistantText = eventSession.getAssistantText();
856
- const content = failed ? `[Agent \u6267\u884C\u5931\u8D25] ${failReason || "\u672A\u77E5\u9519\u8BEF"}` : assistantText || "[Agent \u672A\u4EA7\u751F\u6587\u672C\u8F93\u51FA]";
866
+ const content = failed ? failReason || assistantText || "\u672A\u77E5\u9519\u8BEF" : assistantText || "[Agent \u672A\u4EA7\u751F\u6587\u672C\u8F93\u51FA]";
857
867
  const result = await api.theater.submitMemberResponse({
858
868
  sessionId,
859
869
  memberKey,
860
870
  content,
861
871
  agentId,
872
+ agentStatus: failed ? "FAILED" : "SUCCESS",
862
873
  logId: payload.logId?.trim() || void 0
863
874
  });
864
875
  console.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-project-manage-cli",
3
- "version": "4.0.17",
3
+ "version": "4.0.18",
4
4
  "description": "命令行工具:后续用于调用平台后端 API 完成运维与自动化操作",
5
5
  "type": "module",
6
6
  "private": false,