@yuku123/z-team-component 0.2.53 → 0.2.55

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 (47) hide show
  1. package/dist/{ChangeLogView-Dm7C3S14.js → ChangeLogView-R6boINWk.js} +1 -1
  2. package/dist/{ComponentDoc-y1NfPcHG.js → ComponentDoc-DTJyJAy-.js} +121 -121
  3. package/dist/{InvitationManagementPage-Btw9iVOl.js → InvitationManagementPage-BZOxuoM5.js} +1 -1
  4. package/dist/{OnboardingPage-wF0OrgfD.js → OnboardingPage-Be3MXW9i.js} +2 -2
  5. package/dist/{ScheduledTasks-CzzgG3n8.js → ScheduledTasks-CxDbixJe.js} +806 -809
  6. package/dist/{SystemShell-BSCmnOxf.js → SystemShell-BEKwj3WF.js} +1 -1
  7. package/dist/{admin-logs-vR556ORQ.js → admin-logs-DMF0dtG1.js} +2 -2
  8. package/dist/{api-Jfnj1ybB.js → api-DhuqONeb.js} +210 -227
  9. package/dist/{api-Bs0qYxjL.js → api-DqNgdbLm.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-obuYWncQ.js → createWorkspaceWsHandler-BKcAIc4B.js} +5359 -5145
  11. package/dist/{index-DqUOCs_a.js → index-8Qtz0IKN.js} +2 -2
  12. package/dist/{index-Pk7OkJrk.js → index-B30K72xQ.js} +517 -320
  13. package/dist/{index-CnEWSsKt.js → index-B7cZdoRq.js} +1 -1
  14. package/dist/{index-DroZE6Bv.js → index-B8eiFO_f.js} +3 -3
  15. package/dist/{index-CYViRXQo.js → index-BKVWW3ba.js} +1 -1
  16. package/dist/{index-JLtVgwZv.js → index-BM6XpIcw.js} +1 -1
  17. package/dist/{index-BbkE7r8M.js → index-BOcKPM37.js} +610 -529
  18. package/dist/{index-gxEdw4X4.js → index-BP97Ev-W.js} +4 -4
  19. package/dist/{index-BtWtVMgY.js → index-C5O0cK8A.js} +6 -6
  20. package/dist/index-C8Wkx3H_.js +8960 -0
  21. package/dist/{index-yS7XIUis.js → index-CZ9xxAL0.js} +3 -3
  22. package/dist/{index-BNShjps9.js → index-CZxihNo5.js} +7 -7
  23. package/dist/{index-DmZdGNnh.js → index-CbUsvCMy.js} +4 -4
  24. package/dist/{index-Ck_D109M.js → index-Ct9MzvZV.js} +2 -2
  25. package/dist/{index-B3LhKHBx.js → index-CzePRAbT.js} +41 -35
  26. package/dist/{index-tADa82Fa.js → index-DQk6Pt6U.js} +3 -3
  27. package/dist/{index-Onqu_VQO.js → index-DQmgOqd1.js} +7 -7
  28. package/dist/{index-Dj5_8ulz.js → index-DV8rmjvN.js} +5 -5
  29. package/dist/{index-Di_vaPxC.js → index-DpNZTqcn.js} +3 -3
  30. package/dist/{index-C5WSr14Z.js → index-Otx98G8z.js} +1 -1
  31. package/dist/{index-BXiuxhgz.js → index-TPTesErt.js} +2 -2
  32. package/dist/{index-CxrBnzg2.js → index-mXMdvUYD.js} +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/{instance-B0DZJnee.js → instance-Cr4_XM2r.js} +1 -1
  35. package/dist/pages.js +1 -1
  36. package/dist/{schedule-D3jTrI1R.js → schedule-BNLns-p4.js} +1 -1
  37. package/dist/{send-default-agent-team-message-CbqHaohM.js → send-default-agent-team-message-C9VWSWKJ.js} +1 -1
  38. package/dist/{sso-user-Dw_wwYa-.js → sso-user-Cme2tmGq.js} +1 -1
  39. package/dist/{training-CETtJBNQ.js → training-SjRAdtNQ.js} +1 -1
  40. package/dist/{useAppStore-s-CLa-nF.js → useAppStore-C63xiq3-.js} +1 -1
  41. package/dist/{webide-6j4OVoNA.js → webide-DDFxSedU.js} +4 -4
  42. package/dist/z-team-component.css +2 -2
  43. package/package.json +1 -1
  44. package/dist/SmartWorkbench.module-xRRmpTTw.js +0 -85
  45. package/dist/index-DUmgSTQu.js +0 -9179
  46. package/dist/index-DWsfQMp8.js +0 -208
  47. package/dist/index-WIsi8fln.js +0 -339
@@ -49,17 +49,17 @@ function Je(t, l) {
49
49
  function Vt(t) {
50
50
  return t ? Jt.some((l) => Je(t, l)) ? "ops" : Zt.includes(t) || Xt.some((l) => Je(t, l)) ? "middleware" : "system" : "system";
51
51
  }
52
- const J = (t) => {
52
+ const V = (t) => {
53
53
  const l = wt(t);
54
54
  return (r) => /* @__PURE__ */ e(kt, { fallback: null, children: /* @__PURE__ */ e(l, { ...r }) });
55
- }, oe = J(() => import("./index-DUmgSTQu.js").then((t) => t.a4)), Yt = J(() => import("./index-BtWtVMgY.js")), Qt = J(() => import("./index-yS7XIUis.js")), en = J(() => import("./index-gxEdw4X4.js")), tn = J(() => import("./index-DmZdGNnh.js")), nn = J(() => import("./index-Ck_D109M.js"));
56
- J(() => import("./index-BNShjps9.js"));
57
- const rn = J(() => import("./index-C815hPWS.js")), an = J(() => import("./index-Pk7OkJrk.js")), ln = J(() => import("./index-BkX0I2aB.js")), sn = J(() => import("./index-CYViRXQo.js")), on = J(() => import("./index-C5WSr14Z.js")), cn = J(() => import("./index-WIsi8fln.js")), dn = J(() => import("./index-DroZE6Bv.js"));
58
- function lr({ forcedMode: t }) {
55
+ }, oe = V(() => import("./index-C8Wkx3H_.js").then((t) => t.a4)), Yt = V(() => import("./index-C5O0cK8A.js")), Qt = V(() => import("./index-CZ9xxAL0.js")), en = V(() => import("./index-BP97Ev-W.js")), tn = V(() => import("./index-CbUsvCMy.js")), nn = V(() => import("./index-Ct9MzvZV.js"));
56
+ V(() => import("./index-CZxihNo5.js"));
57
+ const rn = V(() => import("./index-C815hPWS.js")), an = V(() => import("./index-B30K72xQ.js")), ln = V(() => import("./index-BkX0I2aB.js")), sn = V(() => import("./index-BKVWW3ba.js")), on = V(() => import("./index-Otx98G8z.js")), cn = V(() => import("./index-B8eiFO_f.js"));
58
+ function ar({ forcedMode: t }) {
59
59
  const { pathname: l } = It(), r = l.replace(/\/+$/, "") || "/";
60
- return t === "system" ? /* @__PURE__ */ e(oe, { forcedChatMode: Vt(r) }) : t === "rpa" ? /* @__PURE__ */ e(oe, { forcedChatMode: "rpa" }) : t === "dev" ? /* @__PURE__ */ e(oe, { forcedChatMode: "dev" }) : r === "/workspace" ? /* @__PURE__ */ e(oe, {}) : r === "/workspace/phone" ? /* @__PURE__ */ e(Yt, {}) : r === "/workspace/from-ticket" ? /* @__PURE__ */ e(Qt, {}) : r === "/workspace/from-scenario" ? /* @__PURE__ */ e(en, {}) : r === "/workspace/build-by-form" ? /* @__PURE__ */ e(tn, {}) : r === "/scenario" ? /* @__PURE__ */ e(nn, {}) : r === "/admin" ? /* @__PURE__ */ e(oe, {}) : r === "/welcome" ? /* @__PURE__ */ e(an, {}) : r === "/portal" ? /* @__PURE__ */ e(ln, {}) : r === "/chatdemo" ? /* @__PURE__ */ e(rn, {}) : r === "/embed/chat" || r.startsWith("/embed/chat/") ? /* @__PURE__ */ e(dn, {}) : r === "/change-log" ? /* @__PURE__ */ e(sn, {}) : r === "/docs" ? /* @__PURE__ */ e(on, {}) : r === "/download" ? /* @__PURE__ */ e(cn, {}) : /* @__PURE__ */ e(oe, {});
60
+ return t === "system" ? /* @__PURE__ */ e(oe, { forcedChatMode: Vt(r) }) : t === "rpa" ? /* @__PURE__ */ e(oe, { forcedChatMode: "rpa" }) : t === "dev" ? /* @__PURE__ */ e(oe, { forcedChatMode: "dev" }) : r === "/workspace" ? /* @__PURE__ */ e(oe, {}) : r === "/workspace/phone" ? /* @__PURE__ */ e(Yt, {}) : r === "/workspace/from-ticket" ? /* @__PURE__ */ e(Qt, {}) : r === "/workspace/from-scenario" ? /* @__PURE__ */ e(en, {}) : r === "/workspace/build-by-form" ? /* @__PURE__ */ e(tn, {}) : r === "/scenario" ? /* @__PURE__ */ e(nn, {}) : r === "/admin" ? /* @__PURE__ */ e(oe, {}) : r === "/welcome" ? /* @__PURE__ */ e(an, {}) : r === "/portal" ? /* @__PURE__ */ e(ln, {}) : r === "/chatdemo" ? /* @__PURE__ */ e(rn, {}) : r === "/embed/chat" || r.startsWith("/embed/chat/") ? /* @__PURE__ */ e(cn, {}) : r === "/change-log" ? /* @__PURE__ */ e(sn, {}) : r === "/docs" ? /* @__PURE__ */ e(on, {}) : /* @__PURE__ */ e(oe, {});
61
61
  }
62
- function un(t) {
62
+ function dn(t) {
63
63
  if (!t || typeof t != "string") return null;
64
64
  const l = t.split(".");
65
65
  if (l.length !== 3) return null;
@@ -73,12 +73,12 @@ function un(t) {
73
73
  return null;
74
74
  }
75
75
  }
76
- function pn(t, l = 30) {
77
- const r = un(t);
76
+ function un(t, l = 30) {
77
+ const r = dn(t);
78
78
  return !r || typeof r.exp != "number" ? !0 : Date.now() / 1e3 > r.exp - l;
79
79
  }
80
80
  let Ve = !1;
81
- const hn = [
81
+ const pn = [
82
82
  "/ctc/authn/login",
83
83
  "/ctc/authn/register",
84
84
  "/ctc/authn/send-code",
@@ -96,8 +96,8 @@ const hn = [
96
96
  "/sso/login",
97
97
  "/sso/callback"
98
98
  ];
99
- function mn(t) {
100
- return hn.some((l) => t.includes(l));
99
+ function hn(t) {
100
+ return pn.some((l) => t.includes(l));
101
101
  }
102
102
  function Ye(t) {
103
103
  if (Ve || typeof window > "u" || window.location.pathname.startsWith("/login")) return;
@@ -110,18 +110,18 @@ function Ye(t) {
110
110
  const l = window.location.pathname + window.location.search, r = encodeURIComponent(l);
111
111
  window.location.href = `/login?redirect=${r}`;
112
112
  }
113
- function yn(t) {
113
+ function mn(t) {
114
114
  if (t && typeof t == "object" && "code" in t && "data" in t) {
115
115
  const l = t;
116
116
  return (typeof l.success == "boolean" ? l.success : typeof l.code == "number" && l.code >= 200 && l.code < 300) ? l.data : Promise.reject(new Error(l.message || "请求失败"));
117
117
  }
118
118
  return t;
119
119
  }
120
- function gn(t, l = {}) {
120
+ function yn(t, l = {}) {
121
121
  const { tokenKey: r = "token", userInfoKey: S = "userInfo" } = l;
122
122
  t.interceptors.request.use((s) => {
123
123
  const y = localStorage.getItem(r);
124
- if (y && pn(y))
124
+ if (y && un(y))
125
125
  return Ye(`请求前检测到 token 已过期 (${s.url || ""})`), Promise.reject(new He.CanceledError("token expired"));
126
126
  try {
127
127
  const c = localStorage.getItem(S);
@@ -136,11 +136,11 @@ function gn(t, l = {}) {
136
136
  }
137
137
  return s;
138
138
  }), t.interceptors.response.use(
139
- (s) => yn(s.data),
139
+ (s) => mn(s.data),
140
140
  (s) => {
141
141
  var f, x;
142
142
  const y = (f = s.response) == null ? void 0 : f.status, c = ((x = s.config) == null ? void 0 : x.url) || "";
143
- return y === 401 ? mn(c) ? console.warn(`[401] 公开接口返回 401 (不是 token 问题): ${c}`) : Ye(`接口 ${c} 返回 401`) : y === 403 ? console.warn("[403] 没有权限访问该资源:", c) : y === 404 ? console.warn("[404] 接口不存在:", c) : y === 500 && console.error("[500] 服务器内部错误:", c), Promise.reject(s);
143
+ return y === 401 ? hn(c) ? console.warn(`[401] 公开接口返回 401 (不是 token 问题): ${c}`) : Ye(`接口 ${c} 返回 401`) : y === 403 ? console.warn("[403] 没有权限访问该资源:", c) : y === 404 ? console.warn("[404] 接口不存在:", c) : y === 500 && console.error("[500] 服务器内部错误:", c), Promise.reject(s);
144
144
  }
145
145
  );
146
146
  }
@@ -151,12 +151,12 @@ function Ge(t = {}) {
151
151
  withCredentials: !0
152
152
  // Cookie 模式:浏览器自动携带 Cookie
153
153
  });
154
- return gn(l, {
154
+ return yn(l, {
155
155
  tokenKey: t.tokenKey,
156
156
  userInfoKey: t.userInfoKey
157
157
  }), l;
158
158
  }
159
- const $ = Ge(), sr = Ge(), Ce = Ge({ baseURL: "/api", timeout: 1e4 }), ve = (t) => t ? typeof t.total == "number" ? t.total : Array.isArray(t) ? t.length : Array.isArray(t.records) ? t.records.length : Array.isArray(t.data) ? t.data.length : 0 : 0, fn = [
159
+ const $ = Ge(), lr = Ge(), Ce = Ge({ baseURL: "/api", timeout: 1e4 }), ve = (t) => t ? typeof t.total == "number" ? t.total : Array.isArray(t) ? t.length : Array.isArray(t.records) ? t.records.length : Array.isArray(t.data) ? t.data.length : 0 : 0, gn = [
160
160
  {
161
161
  key: "ai",
162
162
  color: "violet",
@@ -254,7 +254,7 @@ const $ = Ge(), sr = Ge(), Ce = Ge({ baseURL: "/api", timeout: 1e4 }), ve = (t)
254
254
  }
255
255
  ]
256
256
  }
257
- ], ir = () => {
257
+ ], sr = () => {
258
258
  const [t, l] = m({
259
259
  configCount: null,
260
260
  projectCount: null,
@@ -335,7 +335,7 @@ const $ = Ge(), sr = Ge(), Ce = Ge({ baseURL: "/api", timeout: 1e4 }), ve = (t)
335
335
  }
336
336
  ) })
337
337
  ] }),
338
- fn.map((r) => /* @__PURE__ */ n("div", { style: { marginBottom: 32 }, children: [
338
+ gn.map((r) => /* @__PURE__ */ n("div", { style: { marginBottom: 32 }, children: [
339
339
  /* @__PURE__ */ e(
340
340
  qt,
341
341
  {
@@ -382,12 +382,12 @@ const $ = Ge(), sr = Ge(), Ce = Ge({ baseURL: "/api", timeout: 1e4 }), ve = (t)
382
382
  )
383
383
  ] });
384
384
  };
385
- let bn = "/api";
385
+ let fn = "/api";
386
386
  function xt() {
387
- return He.create({ baseURL: bn, timeout: 15e3, withCredentials: !0 });
387
+ return He.create({ baseURL: fn, timeout: 15e3, withCredentials: !0 });
388
388
  }
389
- const Ie = xt(), xn = xt();
390
- xn.interceptors.request.use((t) => t);
389
+ const Ie = xt(), bn = xt();
390
+ bn.interceptors.request.use((t) => t);
391
391
  Ie.interceptors.request.use((t) => t);
392
392
  const ze = "/mock-platform", G = (t, l) => Ie.get(`${ze}${t}`, { params: l }).then((r) => r.data), q = (t, l, r) => Ie.post(`${ze}${t}`, l, { params: r }).then((S) => S.data), Ae = (t, l, r) => Ie.put(`${ze}${t}`, l, { params: r }).then((S) => S.data), ce = (t, l) => Ie.delete(`${ze}${t}`, { params: l }).then((r) => r.data), j = {
393
393
  stats: () => G("/stats"),
@@ -454,7 +454,7 @@ const ze = "/mock-platform", G = (t, l) => Ie.get(`${ze}${t}`, { params: l }).th
454
454
  importBatch: (t) => q("/openapi/import-batch", t),
455
455
  sample: (t) => G("/openapi/sample", { format: t })
456
456
  }
457
- }, { Text: le, Paragraph: wn } = ae, Qe = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
457
+ }, { Text: le, Paragraph: xn } = ae, Qe = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
458
458
  function Be({ activeEnvCode: t }) {
459
459
  const [l, r] = m([]), [S, s] = m(!1), [y, c] = m(null), [f, x] = m(!1), [C, _] = m(null);
460
460
  K(() => {
@@ -645,7 +645,7 @@ function Be({ activeEnvCode: t }) {
645
645
  /* @__PURE__ */ e(z.Item, { label: "状态", span: 2, children: C.status === 1 ? /* @__PURE__ */ e(w, { color: "green", children: "启用" }) : /* @__PURE__ */ e(w, { children: "禁用" }) }),
646
646
  /* @__PURE__ */ e(z.Item, { label: "完整 URL", span: 2, children: /* @__PURE__ */ e(le, { copyable: !0, children: a(C) }) })
647
647
  ] }),
648
- /* @__PURE__ */ e(wn, { strong: !0, children: "响应模板:" }),
648
+ /* @__PURE__ */ e(xn, { strong: !0, children: "响应模板:" }),
649
649
  /* @__PURE__ */ e("pre", { style: {
650
650
  background: "#f5f5f5",
651
651
  padding: 12,
@@ -662,7 +662,7 @@ function Be({ activeEnvCode: t }) {
662
662
  )
663
663
  ] });
664
664
  }
665
- const { Text: Oe } = ae, kn = { MOCK: "green", REAL: "blue", MIXED: "orange" };
665
+ const { Text: Oe } = ae, wn = { MOCK: "green", REAL: "blue", MIXED: "orange" };
666
666
  function je({ onEnvChange: t }) {
667
667
  const [l, r] = m([]), [S, s] = m(!1);
668
668
  K(() => {
@@ -722,7 +722,7 @@ function je({ onEnvChange: t }) {
722
722
  dataIndex: "env_type",
723
723
  key: "env_type",
724
724
  width: 240,
725
- render: (f) => /* @__PURE__ */ e(w, { color: kn[f] || "default", children: f })
725
+ render: (f) => /* @__PURE__ */ e(w, { color: wn[f] || "default", children: f })
726
726
  },
727
727
  {
728
728
  title: "真实服务地址",
@@ -771,8 +771,8 @@ function je({ onEnvChange: t }) {
771
771
  )
772
772
  ] });
773
773
  }
774
- const { Text: In } = ae;
775
- function Sn() {
774
+ const { Text: kn } = ae;
775
+ function In() {
776
776
  const [t, l] = m([]), [r, S] = m(!1), [s, y] = m(!1), [c, f] = m(null);
777
777
  K(() => {
778
778
  x();
@@ -823,7 +823,7 @@ function Sn() {
823
823
  dataIndex: "scenario_code",
824
824
  key: "scenario_code",
825
825
  width: 160,
826
- render: (a) => /* @__PURE__ */ e(In, { code: !0, children: a })
826
+ render: (a) => /* @__PURE__ */ e(kn, { code: !0, children: a })
827
827
  },
828
828
  { title: "场景名称", dataIndex: "scenario_name", key: "scenario_name", width: 200 },
829
829
  {
@@ -907,8 +907,8 @@ function Sn() {
907
907
  )
908
908
  ] });
909
909
  }
910
- const { Text: ie } = ae, Le = { PASS: "green", FAIL: "red", SKIP: "default" }, Tn = { P0: "red", P1: "orange", P2: "blue", P3: "default" };
911
- function Cn() {
910
+ const { Text: ie } = ae, Le = { PASS: "green", FAIL: "red", SKIP: "default" }, Sn = { P0: "red", P1: "orange", P2: "blue", P3: "default" };
911
+ function Tn() {
912
912
  const [t, l] = m([]), [r, S] = m(!1), [s, y] = m([]), [c, f] = m(!1), [x, C] = m(null), [_, h] = m(null), [a, d] = m(!1);
913
913
  K(() => {
914
914
  g();
@@ -977,7 +977,7 @@ function Cn() {
977
977
  key: "priority",
978
978
  width: 80,
979
979
  align: "center",
980
- render: (u) => /* @__PURE__ */ e(w, { color: Tn[u], children: u || "P1" })
980
+ render: (u) => /* @__PURE__ */ e(w, { color: Sn[u], children: u || "P1" })
981
981
  },
982
982
  {
983
983
  title: "上次结果",
@@ -1202,7 +1202,7 @@ const { Text: de } = ae, et = {
1202
1202
  STOPPED: "green",
1203
1203
  EXPIRED: "gray"
1204
1204
  };
1205
- function vn() {
1205
+ function Cn() {
1206
1206
  const [t, l] = m([]), [r, S] = m(!1), [s, y] = m(!1), [c, f] = m(null), [x, C] = m([]);
1207
1207
  K(() => {
1208
1208
  _();
@@ -1377,8 +1377,8 @@ function vn() {
1377
1377
  )
1378
1378
  ] });
1379
1379
  }
1380
- const { Text: ue } = ae, An = { MOCK: "green", PROXY: "blue", 404: "red", 502: "orange" };
1381
- function _n() {
1380
+ const { Text: ue } = ae, vn = { MOCK: "green", PROXY: "blue", 404: "red", 502: "orange" };
1381
+ function An() {
1382
1382
  const [t, l] = m([]), [r, S] = m(null), [s, y] = m(!1), [c, f] = m(null), [x, C] = m(!1), [_, h] = m(""), [a, d] = m();
1383
1383
  K(() => {
1384
1384
  g();
@@ -1452,7 +1452,7 @@ function _n() {
1452
1452
  dataIndex: "fallback_type",
1453
1453
  key: "fallback_type",
1454
1454
  width: 100,
1455
- render: (T) => T ? /* @__PURE__ */ e(w, { color: An[T], children: T }) : "-"
1455
+ render: (T) => T ? /* @__PURE__ */ e(w, { color: vn[T], children: T }) : "-"
1456
1456
  },
1457
1457
  {
1458
1458
  title: "耗时",
@@ -1657,12 +1657,12 @@ function _n() {
1657
1657
  const { Text: te } = ae, tt = [
1658
1658
  { key: "endpoints", label: "Mock 端点", component: Be },
1659
1659
  { key: "environments", label: "环境 (MOCK/REAL/MIXED)", component: je },
1660
- { key: "scenarios", label: "场景状态机", component: Sn },
1661
- { key: "cases", label: "测试用例", component: Cn },
1662
- { key: "recordings", label: "录制回放", component: vn },
1663
- { key: "request-logs", label: "请求日志", component: _n }
1660
+ { key: "scenarios", label: "场景状态机", component: In },
1661
+ { key: "cases", label: "测试用例", component: Tn },
1662
+ { key: "recordings", label: "录制回放", component: Cn },
1663
+ { key: "request-logs", label: "请求日志", component: An }
1664
1664
  ];
1665
- function Pn() {
1665
+ function _n() {
1666
1666
  var _;
1667
1667
  const [t, l] = m("endpoints"), [r, S] = m([]), [s, y] = m("default"), [c, f] = m(null);
1668
1668
  K(() => {
@@ -1755,10 +1755,10 @@ function Pn() {
1755
1755
  )
1756
1756
  ] });
1757
1757
  }
1758
- const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1758
+ const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1759
1759
  __proto__: null,
1760
- default: Pn
1761
- }, Symbol.toStringTag, { value: "Module" })), { Text: ge, Paragraph: cr } = ae, nt = [
1760
+ default: _n
1761
+ }, Symbol.toStringTag, { value: "Module" })), { Text: ge, Paragraph: or } = ae, nt = [
1762
1762
  {
1763
1763
  group: "基础数据",
1764
1764
  icon: /* @__PURE__ */ e(fe, {}),
@@ -1814,7 +1814,7 @@ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1814
1814
  ]
1815
1815
  }
1816
1816
  ];
1817
- function dr({ onInsert: t, form: l, formField: r = "responseTemplate" }) {
1817
+ function cr({ onInsert: t, form: l, formField: r = "responseTemplate" }) {
1818
1818
  const [S, s] = m(""), y = (h) => {
1819
1819
  var a;
1820
1820
  try {
@@ -1919,14 +1919,14 @@ function dr({ onInsert: t, form: l, formField: r = "responseTemplate" }) {
1919
1919
  }
1920
1920
  );
1921
1921
  }
1922
- const { TextArea: rt } = B, { Text: pe, Paragraph: En } = ae;
1923
- function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
1922
+ const { TextArea: rt } = B, { Text: pe, Paragraph: Pn } = ae;
1923
+ function dr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
1924
1924
  const [s, y] = m(""), [c, f] = m(null), [x, C] = m(null), [_, h] = m(!1), [a, d] = m(null), [g, v] = m(!1), [D, T] = m("import"), [u] = P.useForm(), [i] = P.useForm(), I = () => {
1925
1925
  y(""), f(null), C(null), d(null), u.resetFields(), i.resetFields();
1926
1926
  }, M = () => {
1927
1927
  I(), l();
1928
1928
  }, X = async () => {
1929
- var R, k, N, V;
1929
+ var R, k, N, J;
1930
1930
  if (!s.trim()) {
1931
1931
  b.warning("请先粘贴 curl 命令");
1932
1932
  return;
@@ -1939,7 +1939,7 @@ function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
1939
1939
  caseGroup: "imported",
1940
1940
  envCode: S[0] || "default"
1941
1941
  }), i.setFieldsValue({
1942
- mockName: `mock-${((N = U.data) == null ? void 0 : N.method) || "GET"}-${(((V = U.data) == null ? void 0 : V.path) || "").replace(/\W+/g, "-")}`,
1942
+ mockName: `mock-${((N = U.data) == null ? void 0 : N.method) || "GET"}-${(((J = U.data) == null ? void 0 : J.path) || "").replace(/\W+/g, "-")}`,
1943
1943
  envCode: S[0] || "default",
1944
1944
  projectCode: "default",
1945
1945
  responseTemplate: `{
@@ -2030,7 +2030,7 @@ function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2030
2030
  size: "large",
2031
2031
  destroyOnHidden: !0,
2032
2032
  children: [
2033
- /* @__PURE__ */ e(En, { type: "secondary", style: { marginBottom: 12 }, children: "从浏览器 DevTools / Postman / 终端复制 curl 命令,粘贴到下方即可解析、试跑、入库。" }),
2033
+ /* @__PURE__ */ e(Pn, { type: "secondary", style: { marginBottom: 12 }, children: "从浏览器 DevTools / Postman / 终端复制 curl 命令,粘贴到下方即可解析、试跑、入库。" }),
2034
2034
  /* @__PURE__ */ e(
2035
2035
  rt,
2036
2036
  {
@@ -2050,7 +2050,7 @@ function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2050
2050
  ] }),
2051
2051
  x && /* @__PURE__ */ e(W, { type: "error", showIcon: !0, style: { marginTop: 12 }, title: "解析失败", description: x }),
2052
2052
  c && /* @__PURE__ */ e(L, { size: "small", style: { marginTop: 16 }, title: "解析结果", children: /* @__PURE__ */ n(z, { column: 1, size: "small", bordered: !0, children: [
2053
- /* @__PURE__ */ e(z.Item, { label: "Method", children: /* @__PURE__ */ e(w, { color: zn(c.method), children: c.method }) }),
2053
+ /* @__PURE__ */ e(z.Item, { label: "Method", children: /* @__PURE__ */ e(w, { color: En(c.method), children: c.method }) }),
2054
2054
  /* @__PURE__ */ e(z.Item, { label: "URL", children: /* @__PURE__ */ e(pe, { code: !0, copyable: !0, children: c.url }) }),
2055
2055
  /* @__PURE__ */ e(z.Item, { label: "Path", children: /* @__PURE__ */ e(pe, { code: !0, children: c.path }) }),
2056
2056
  c.query && /* @__PURE__ */ e(z.Item, { label: "Query", children: /* @__PURE__ */ e(pe, { code: !0, children: c.query }) }),
@@ -2162,11 +2162,11 @@ function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2162
2162
  }
2163
2163
  );
2164
2164
  }
2165
- function zn(t) {
2165
+ function En(t) {
2166
2166
  return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[t] || "default";
2167
2167
  }
2168
2168
  const { TextArea: at } = B;
2169
- function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2169
+ function ur({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2170
2170
  const [s, y] = m("paste"), [c, f] = m(""), [x, C] = m(null), [_, h] = m(null), [a, d] = m(!1), [g, v] = m([]), [D, T] = m(!1), [u] = P.useForm(), i = ot(null), I = () => {
2171
2171
  f(""), C(null), h(null), v([]), u.resetFields();
2172
2172
  }, M = () => {
@@ -2179,7 +2179,7 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2179
2179
  h(null), d(!0);
2180
2180
  try {
2181
2181
  const k = await j.openapi.parse(c);
2182
- k.success ? (C(k), v((k.endpoints || []).map((N, V) => V)), u.setFieldsValue({
2182
+ k.success ? (C(k), v((k.endpoints || []).map((N, J) => J)), u.setFieldsValue({
2183
2183
  envCode: S[0] || "default",
2184
2184
  projectCode: "default",
2185
2185
  defaultResponse: `{
@@ -2205,9 +2205,9 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2205
2205
  }
2206
2206
  }, p = (k) => {
2207
2207
  const N = new FileReader();
2208
- return N.onload = (V) => {
2208
+ return N.onload = (J) => {
2209
2209
  var U;
2210
- f(String(((U = V.target) == null ? void 0 : U.result) || "")), b.success(`已读取 ${k.name}(${(k.size / 1024).toFixed(1)}KB)`);
2210
+ f(String(((U = J.target) == null ? void 0 : U.result) || "")), b.success(`已读取 ${k.name}(${(k.size / 1024).toFixed(1)}KB)`);
2211
2211
  }, N.onerror = () => b.error("文件读取失败"), N.readAsText(k), !1;
2212
2212
  }, o = async () => {
2213
2213
  if (!x) {
@@ -2225,7 +2225,7 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2225
2225
  const N = (x.endpoints || []).map((U, We) => ({
2226
2226
  method: U.method,
2227
2227
  path: U.path
2228
- })).filter((U, We) => g.includes(We)), V = await j.openapi.importBatch({
2228
+ })).filter((U, We) => g.includes(We)), J = await j.openapi.importBatch({
2229
2229
  content: c,
2230
2230
  selected: N,
2231
2231
  envCode: k.envCode,
@@ -2235,7 +2235,7 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2235
2235
  priority: k.priority,
2236
2236
  tagPrefix: k.tagPrefix
2237
2237
  });
2238
- V.success ? (b.success(`已导入 ${V.imported} 个 Mock 端点${V.failed > 0 ? `,失败 ${V.failed}` : ""}`), r && r(V), M()) : b.error(V.message || "导入失败");
2238
+ J.success ? (b.success(`已导入 ${J.imported} 个 Mock 端点${J.failed > 0 ? `,失败 ${J.failed}` : ""}`), r && r(J), M()) : b.error(J.message || "导入失败");
2239
2239
  } catch (N) {
2240
2240
  b.error(String((N == null ? void 0 : N.message) || N));
2241
2241
  } finally {
@@ -2246,7 +2246,7 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2246
2246
  title: "Method",
2247
2247
  dataIndex: "method",
2248
2248
  width: 90,
2249
- render: (k) => /* @__PURE__ */ e(w, { color: Rn(k), children: k })
2249
+ render: (k) => /* @__PURE__ */ e(w, { color: zn(k), children: k })
2250
2250
  },
2251
2251
  { title: "Path", dataIndex: "path", width: 240, ellipsis: !0 },
2252
2252
  { title: "Summary", dataIndex: "summary", ellipsis: !0 },
@@ -2409,16 +2409,16 @@ function pr({ open: t, onClose: l, onSuccess: r, envOptions: S = [] }) {
2409
2409
  }
2410
2410
  );
2411
2411
  }
2412
- function Rn(t) {
2412
+ function zn(t) {
2413
2413
  return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[t] || "default";
2414
2414
  }
2415
- const On = {
2415
+ const Rn = {
2416
2416
  STANDARD_JSON: { label: "标准 JSON", color: "blue" },
2417
2417
  RSS_XML: { label: "RSS 2.0", color: "orange" },
2418
2418
  ATOM_XML: { label: "Atom 1.0", color: "gold" },
2419
2419
  CUSTOM_SCRIPT: { label: "自定义脚本", color: "purple" },
2420
2420
  INTERNAL_BEAN: { label: "内部 Bean", color: "cyan" }
2421
- }, Ln = {
2421
+ }, On = {
2422
2422
  PENDING_VERIFY: { color: "default", text: "待验证" },
2423
2423
  VERIFIED: { color: "green", text: "已验证" },
2424
2424
  INVALID_AUTH: { color: "red", text: "鉴权失败" },
@@ -2432,7 +2432,7 @@ const On = {
2432
2432
  FAILED: { color: "red" },
2433
2433
  FATAL: { color: "red" }
2434
2434
  };
2435
- function Mn() {
2435
+ function Ln() {
2436
2436
  const t = xe(), [l, r] = m([]), [S, s] = m(!1), [y, c] = m(null), [f, x] = m([]), [C, _] = m({}), [h, a] = m(null), [d, g] = m([]), v = async () => {
2437
2437
  s(!0);
2438
2438
  try {
@@ -2564,7 +2564,7 @@ function Mn() {
2564
2564
  dataIndex: "extractorType",
2565
2565
  width: 140,
2566
2566
  render: (p) => {
2567
- const o = On[p] || { label: p, color: "default" };
2567
+ const o = Rn[p] || { label: p, color: "default" };
2568
2568
  return /* @__PURE__ */ e(w, { color: o.color, children: o.label });
2569
2569
  }
2570
2570
  },
@@ -2579,7 +2579,7 @@ function Mn() {
2579
2579
  dataIndex: "status",
2580
2580
  width: 110,
2581
2581
  render: (p) => {
2582
- const o = Ln[p] || { color: "default", text: p };
2582
+ const o = On[p] || { color: "default", text: p };
2583
2583
  return /* @__PURE__ */ e(w, { color: o.color, children: o.text });
2584
2584
  }
2585
2585
  },
@@ -2848,12 +2848,12 @@ function Mn() {
2848
2848
  }
2849
2849
  ]
2850
2850
  }
2851
- ) : /* @__PURE__ */ e(Dn, { result: y == null ? void 0 : y.result })
2851
+ ) : /* @__PURE__ */ e(Mn, { result: y == null ? void 0 : y.result })
2852
2852
  }
2853
2853
  )
2854
2854
  ] });
2855
2855
  }
2856
- function Dn({ result: t }) {
2856
+ function Mn({ result: t }) {
2857
2857
  return t ? t.success ? /* @__PURE__ */ n(E, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
2858
2858
  /* @__PURE__ */ e(L, { size: "small", title: "调用结果", children: /* @__PURE__ */ n(E, { size: "large", wrap: !0, children: [
2859
2859
  /* @__PURE__ */ n("span", { children: [
@@ -2898,18 +2898,18 @@ function Dn({ result: t }) {
2898
2898
  t.fieldErrors && t.fieldErrors.length > 0 && /* @__PURE__ */ e(W, { type: "warning", showIcon: !0, message: "字段问题", description: /* @__PURE__ */ e("ul", { children: t.fieldErrors.map((l, r) => /* @__PURE__ */ e("li", { children: l }, r)) }) })
2899
2899
  ] }) : /* @__PURE__ */ e(W, { type: "error", showIcon: !0, title: "试运行失败", description: t.errorMessage || "未知错误" }) : null;
2900
2900
  }
2901
- const $n = [
2901
+ const Dn = [
2902
2902
  { value: "STANDARD_JSON", label: "标准 JSON (按统一契约返回的 JSON)" },
2903
2903
  { value: "RSS_XML", label: "RSS 2.0 (XML feed)" },
2904
2904
  { value: "ATOM_XML", label: "Atom 1.0 (XML feed)" },
2905
2905
  { value: "CUSTOM_SCRIPT", label: "自定义脚本 (z-script 平台)" },
2906
2906
  { value: "INTERNAL_BEAN", label: "内部 Bean (我们自己的模块, 暂未启用)" }
2907
- ], Nn = [
2907
+ ], $n = [
2908
2908
  { value: "NONE", label: "无鉴权" },
2909
2909
  { value: "BEARER", label: "Bearer (Authorization: Bearer xxx)" },
2910
2910
  { value: "API_KEY", label: "API Key (Authorization: xxx)" },
2911
2911
  { value: "BASIC", label: "Basic (user:password base64)" }
2912
- ], Bn = [
2912
+ ], Nn = [
2913
2913
  { label: "每 5 分钟", value: "0 */5 * * * ?" },
2914
2914
  { label: "每 15 分钟", value: "0 */15 * * * ?" },
2915
2915
  { label: "每小时", value: "0 0 * * * ?" },
@@ -3027,7 +3027,7 @@ function st() {
3027
3027
  ] })
3028
3028
  ] }),
3029
3029
  /* @__PURE__ */ n(L, { type: "inner", title: "鉴权 (从 z-mist 拉取 secret)", style: { marginBottom: 16 }, children: [
3030
- /* @__PURE__ */ e(P.Item, { label: "鉴权方式", name: "authType", children: /* @__PURE__ */ e(Z, { options: Nn }) }),
3030
+ /* @__PURE__ */ e(P.Item, { label: "鉴权方式", name: "authType", children: /* @__PURE__ */ e(Z, { options: $n }) }),
3031
3031
  g && g !== "NONE" && /* @__PURE__ */ e(
3032
3032
  P.Item,
3033
3033
  {
@@ -3057,7 +3057,7 @@ function st() {
3057
3057
  name: "extractorType",
3058
3058
  rules: [{ required: !0 }],
3059
3059
  extra: "STANDARD_JSON/RSS_XML/ATOM_XML 直接解析; CUSTOM_SCRIPT 调 z-script 平台",
3060
- children: /* @__PURE__ */ e(Z, { options: $n })
3060
+ children: /* @__PURE__ */ e(Z, { options: Dn })
3061
3061
  }
3062
3062
  ),
3063
3063
  d === "CUSTOM_SCRIPT" && /* @__PURE__ */ e(
@@ -3094,7 +3094,7 @@ function st() {
3094
3094
  {
3095
3095
  style: { width: 140 },
3096
3096
  placeholder: "常用",
3097
- options: Bn,
3097
+ options: Nn,
3098
3098
  onChange: (i) => S.setFieldValue("cronExpr", i),
3099
3099
  value: null
3100
3100
  }
@@ -3131,7 +3131,7 @@ function st() {
3131
3131
  ) }) })
3132
3132
  ] });
3133
3133
  }
3134
- const jn = {
3134
+ const Bn = {
3135
3135
  PENDING: "default",
3136
3136
  RUNNING: "processing",
3137
3137
  SUCCESS: "green",
@@ -3139,7 +3139,7 @@ const jn = {
3139
3139
  FAILED: "red",
3140
3140
  FATAL: "red"
3141
3141
  };
3142
- function Un() {
3142
+ function jn() {
3143
3143
  const [t, l] = m([]), [r, S] = m(null), [s, y] = m([]), [c, f] = m([]), [x, C] = m(null), [_, h] = m(!1);
3144
3144
  K(() => {
3145
3145
  a();
@@ -3251,7 +3251,7 @@ function Un() {
3251
3251
  title: "状态",
3252
3252
  dataIndex: "status",
3253
3253
  width: 80,
3254
- render: (u) => /* @__PURE__ */ e(w, { color: jn[u], children: u })
3254
+ render: (u) => /* @__PURE__ */ e(w, { color: Bn[u], children: u })
3255
3255
  },
3256
3256
  {
3257
3257
  title: "拉取/成功/死信",
@@ -3310,25 +3310,25 @@ function Un() {
3310
3310
  ] })
3311
3311
  ] });
3312
3312
  }
3313
- function qn() {
3313
+ function Un() {
3314
3314
  return /* @__PURE__ */ n(dt, { children: [
3315
3315
  /* @__PURE__ */ e(re, { index: !0, element: /* @__PURE__ */ e(ut, { to: "list", replace: !0 }) }),
3316
- /* @__PURE__ */ e(re, { path: "list", element: /* @__PURE__ */ e(Mn, {}) }),
3316
+ /* @__PURE__ */ e(re, { path: "list", element: /* @__PURE__ */ e(Ln, {}) }),
3317
3317
  /* @__PURE__ */ e(re, { path: "new", element: /* @__PURE__ */ e(st, {}) }),
3318
3318
  /* @__PURE__ */ e(re, { path: "edit/:id", element: /* @__PURE__ */ e(st, {}) }),
3319
- /* @__PURE__ */ e(re, { path: "runs", element: /* @__PURE__ */ e(Un, {}) })
3319
+ /* @__PURE__ */ e(re, { path: "runs", element: /* @__PURE__ */ e(jn, {}) })
3320
3320
  ] });
3321
3321
  }
3322
- const hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3322
+ const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3323
3323
  __proto__: null,
3324
- default: qn
3325
- }, Symbol.toStringTag, { value: "Module" })), Fn = {
3324
+ default: Un
3325
+ }, Symbol.toStringTag, { value: "Module" })), qn = {
3326
3326
  OPEN: { color: "blue", text: "待开始" },
3327
3327
  IN_PROGRESS: { color: "green", text: "进行中" },
3328
3328
  COMPLETED: { color: "default", text: "已完成" },
3329
3329
  ARCHIVED: { color: "default", text: "已归档" }
3330
3330
  };
3331
- function Kn() {
3331
+ function Fn() {
3332
3332
  const t = xe(), [l, r] = m("mine"), [S, s] = m([]), [y, c] = m(!1), [f, x] = m(null), C = async () => {
3333
3333
  c(!0), x(null);
3334
3334
  try {
@@ -3418,7 +3418,7 @@ function Kn() {
3418
3418
  dataIndex: "status",
3419
3419
  width: 100,
3420
3420
  render: (a) => {
3421
- const d = Fn[a] || { color: "default", text: a };
3421
+ const d = qn[a] || { color: "default", text: a };
3422
3422
  return /* @__PURE__ */ e(w, { color: d.color, children: d.text });
3423
3423
  }
3424
3424
  },
@@ -3469,14 +3469,14 @@ function Kn() {
3469
3469
  ] })
3470
3470
  ] });
3471
3471
  }
3472
- const Hn = [
3472
+ const Kn = [
3473
3473
  { value: "general", label: "通用助手" },
3474
3474
  { value: "analyst", label: "分析师" },
3475
3475
  { value: "writer", label: "写手" },
3476
3476
  { value: "pm", label: "产品经理" },
3477
3477
  { value: "ops", label: "运营" }
3478
3478
  ];
3479
- function Gn() {
3479
+ function Hn() {
3480
3480
  const t = xe(), [l] = St(), [r] = P.useForm(), [S, s] = m(!1), [y, c] = m("from-subscribe"), [f, x] = m([]), [C, _] = m([]), [h, a] = m(!1), [d, g] = m([]), [v, D] = m(null);
3481
3481
  K(() => {
3482
3482
  const I = l.get("subscriptionId"), M = l.get("itemIds");
@@ -3640,7 +3640,7 @@ function Gn() {
3640
3640
  ] })
3641
3641
  ] }),
3642
3642
  /* @__PURE__ */ n(L, { type: "inner", title: "Agent 配置", style: { marginBottom: 16 }, children: [
3643
- /* @__PURE__ */ e(P.Item, { label: "Agent 角色", name: "agentRole", extra: "决定 system prompt 的语气 / 视角", children: /* @__PURE__ */ e(Z, { options: Hn }) }),
3643
+ /* @__PURE__ */ e(P.Item, { label: "Agent 角色", name: "agentRole", extra: "决定 system prompt 的语气 / 视角", children: /* @__PURE__ */ e(Z, { options: Kn }) }),
3644
3644
  /* @__PURE__ */ e(
3645
3645
  P.Item,
3646
3646
  {
@@ -3667,13 +3667,13 @@ const it = {
3667
3667
  USER: { color: "blue", icon: /* @__PURE__ */ e(pt, {}), label: "CEO" },
3668
3668
  ASSISTANT: { color: "purple", icon: /* @__PURE__ */ e($e, {}), label: "Agent" },
3669
3669
  SYSTEM: { color: "default", icon: null, label: "系统" }
3670
- }, Wn = {
3670
+ }, Gn = {
3671
3671
  OPEN: { color: "blue", text: "待开始" },
3672
3672
  IN_PROGRESS: { color: "green", text: "进行中" },
3673
3673
  COMPLETED: { color: "default", text: "已完成" },
3674
3674
  ARCHIVED: { color: "default", text: "已归档" }
3675
3675
  };
3676
- function Xn() {
3676
+ function Wn() {
3677
3677
  const { id: t } = ct(), l = xe(), [r, S] = m(null), [s, y] = m([]), [c, f] = m(""), [x, C] = m(!1), _ = ot(null);
3678
3678
  K(() => {
3679
3679
  t && h();
@@ -3717,7 +3717,7 @@ function Xn() {
3717
3717
  }
3718
3718
  };
3719
3719
  if (!r) return /* @__PURE__ */ e("div", { style: { padding: 24 }, children: /* @__PURE__ */ e(_e, {}) });
3720
- const g = Wn[r.status] || { color: "default", text: r.status };
3720
+ const g = Gn[r.status] || { color: "default", text: r.status };
3721
3721
  return /* @__PURE__ */ n("div", { style: { padding: 24, height: "calc(100vh - 64px)", display: "flex", flexDirection: "column", gap: 16 }, children: [
3722
3722
  /* @__PURE__ */ n(
3723
3723
  L,
@@ -3844,45 +3844,45 @@ function Xn() {
3844
3844
  )
3845
3845
  ] });
3846
3846
  }
3847
- function Zn() {
3847
+ function Xn() {
3848
3848
  return /* @__PURE__ */ n(dt, { children: [
3849
3849
  /* @__PURE__ */ e(re, { index: !0, element: /* @__PURE__ */ e(ut, { to: "list", replace: !0 }) }),
3850
- /* @__PURE__ */ e(re, { path: "list", element: /* @__PURE__ */ e(Kn, {}) }),
3851
- /* @__PURE__ */ e(re, { path: "new", element: /* @__PURE__ */ e(Gn, {}) }),
3852
- /* @__PURE__ */ e(re, { path: ":id", element: /* @__PURE__ */ e(Xn, {}) })
3850
+ /* @__PURE__ */ e(re, { path: "list", element: /* @__PURE__ */ e(Fn, {}) }),
3851
+ /* @__PURE__ */ e(re, { path: "new", element: /* @__PURE__ */ e(Hn, {}) }),
3852
+ /* @__PURE__ */ e(re, { path: ":id", element: /* @__PURE__ */ e(Wn, {}) })
3853
3853
  ] });
3854
3854
  }
3855
- const mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3855
+ const hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3856
3856
  __proto__: null,
3857
- default: Zn
3858
- }, Symbol.toStringTag, { value: "Module" })), Jn = "# z-team-component\n\nz-team(团队工作台)的**跨仓唯一前端面**:把「多模式工作台 / 模式切换 / z-opc 业务套件聚合 / 订阅域 / 项目域」\n这一整套团队工作台页面收敛成一个可复用的 React 组件包,由主壳(z-opc 主前端)挂载。\n\n- **npm 包名**:`@yuku123/z-team-component`\n- **宿主接入**:双入口 —— `.`(`ZTeamApp` / `SubscribeApp` / `ProjectApp`)与 `./pages`(`routes` / `appMeta` / `menuItems`)\n- **后端**:与 z-opc 主壳同源的 `/api/**`(axios `baseURL = '/api'`,Cookie 模式 `withCredentials`)\n- **技术栈**:React 19 + antd 6 + react-router-dom 7 + vite(**library mode**,双入口 `index` / `pages`,\n 基座与全部 `@yuku123/*` 一律 **external**,由消费方用自己的 node_modules 解析)\n\n> ⚠ z-team 是**主壳的总控包**:它自己不承载某个业务域,而是把 z-opc 的业务套件(`/ctc/*`、`/ai/*`、`/config/*` …)\n> 聚合进工作台外壳里渲染。所以本文档描述的是 **z-team 自身的能力**(工作台 / 模式切换 / 套件聚合 / 订阅 / 项目)。\n\n---\n\n## 一、能力概览\n\n### 1.1 顶层路由(`src/pages-manifest.ts` 的 `routes`)\n\n| 路由 | 组件 | 能力 |\n|------|------|------|\n| `/team/subscribe` | `SubscribeApp` | 订阅域:订阅列表 / 编辑 / 运行历史 |\n| `/team/project` | `ProjectApp` | 项目域:项目列表 / 创建 / 详情 |\n| `/team/docs` | `ComponentDocPage` | 本文件渲染页(左侧 240px TOC + 右侧正文) |\n| `/team/:rest*` | `ZTeamApp` | **兜底**:`ZTeamApp` 内部按 `useLocation().pathname` 懒加载分发到下面 15 个域 |\n\n`menuItems`:`/team/subscribe`(订阅)/ `/team/project`(项目)/ `/team/workspace`(工作台)/ `/team/docs`(组件文档,末项)。\n\n### 1.2 `ZTeamApp` 顶层分发(`src/zteam-adapter/App.tsx`)\n\n| pathname | 渲染的域 | 源文件 |\n|----------|----------|--------|\n| `/workspace` | 工作台 | `src/zteam/pages/workspace/index.tsx` |\n| `/workspace/phone` | 移动端工作台 | `src/zteam/pages/workspace/phone/index.tsx` |\n| `/workspace/from-ticket` | 从工单进入 | `src/zteam/pages/workspace/from-ticket.tsx` |\n| `/workspace/from-scenario` | 从场景进入 | `src/zteam/pages/workspace/from-scenario.tsx` |\n| `/workspace/build-by-form` | 表单构建 | `src/zteam/pages/workspace/build-by-form.tsx` |\n| `/scenario` | 场景 | `src/zteam/pages/scenario/index.tsx` |\n| `/admin` | 管理后台(走工作台外壳的 admin 分支) | `src/zteam/pages/admin/index.tsx` |\n| `/welcome` | 产品介绍 | `src/zteam/pages/welcome/index.tsx` |\n| `/portal` | 场景入口 | `src/zteam/pages/portal/index.tsx` |\n| `/chatdemo` | 聊天演示 | `src/zteam/pages/chatdemo/index.tsx` |\n| `/embed/chat` | 嵌入式聊天 | `src/zteam/pages/embed/chat/index.tsx` |\n| `/change-log` | 变更记录 | `src/zteam/pages/change-log/index.tsx` |\n| `/docs` | **操作手册页**(52KB 手写暗色主题页,**与本文件的组件文档页不是一回事**) | `src/zteam/pages/docs/index.tsx` |\n\n`src/zteam/pages/` 下共 **15 个域目录**:`admin` / `agenthub-digital-brain-test` / `change-log` / `chatdemo` /\n`docs` / `download` / `embed` / `login` / `note` / `phone` / `portal` / `rpa` / `scenario` / `welcome` / `workspace`。\n其中 `agenthub-digital-brain-test` / `download` / `login` / `note` / `rpa` **没有** `ZTeamApp` 顶层分支,\n由域内路由或别的入口进入。\n\n### 1.3 工作台模式切换(`src/zteam/pages/workspace/utils/chatMode.ts`)\n\n`ChatMode` 共 13 种:`personal` / `collaboration` / `smart` / `product` / `dev` / `test` / `ops` / `admin` /\n`system` / `life` / `training` / `rpa` / `knowledge`(默认 `collaboration`)。\n\n模式切换统一走 `history.push` 到对应顶层路由(`Layout/index.tsx` 的 `handleModeSwitch`):\n\n| 模式 | 落点 |\n|------|------|\n| `system` | `/ctc/4a/account`(z-opc 业务路径;已在业务路径上时不重复跳) |\n| `test` | `/test/qa/dashboard` |\n| `admin` | `/admin?mode=admin` |\n| `rpa` | `/rpa/dashboard` |\n| 其余模式 | `/workspace?mode=xxx`(必须带 `?desktop=1`,否则窄视口会被重定向到移动端工作台) |\n\n模式持久化在 URL query 上(`?mode=xxx`,`replaceState` 不污染历史记录);\n`/admin*` → `admin`、`/ops/*` → `ops`、`/lc/*` → `dev` 由 `readModeFromUrl()` 自动识别。\n\n### 1.4 套件聚合(`src/zteam/pages/workspace/components/Layout/SystemShell.tsx`)\n\n`SystemShell` 用一张 `SYSTEM_ROUTES` 表把 **z-opc 的业务套件**接进工作台的右侧内容区,\n用 `matchSystemPath()` 做 pathname 匹配(精确 → 通配 `*` / 参数 `:param`),支持 `/ctc/*`、`/ai/*`、`/config/*`、\n`/task/*`、`/workflow/*`、`/schedule/*`、`/mist/*`、`/meta/*`、`/msg/*`、`/rpc/*`、`/kb/*`、`/product/*`、`/ops/*` 等前缀。\n\n## 二、导出面\n\n```js\n// 主入口(. 桶):工作台主壳 + 订阅 / 项目域 + 公共设施\nimport ZTeamApp, {SubscribeApp, ProjectApp, history, isTokenExpired, ComponentDocPage}\n from '@yuku123/z-team-component'\n\n// 宿主组装面(./pages 桶):路由清单 + 菜单\nimport {routes, appMeta, menuItems, ComponentDocPage} from '@yuku123/z-team-component/pages'\n```\n\n- `routes`:`/team/subscribe`、`/team/project`、`/team/docs`、`/team/:rest*`(兜底)。\n- `appMeta`:`{ title: 'z-team 团队工作台', short: 'team' }`。\n- `ComponentDocPage`:组件文档页,**主入口与 `./pages` 桶都具名导出**(名字全仓统一,主壳按这个名字取)。\n\n## 三、API 端点\n\n请求实例由 `src/common/services/api.js` 的 axios 工厂创建:`baseURL = '/api'`(可用 `configureBaseURL()` 改),\n`timeout = 15000`,`withCredentials = true`(**Cookie 模式,不设 Authorization Header**)。\n下表路径是 `src/common/services/`、`src/services/`、`src/subscribe/services/`、`src/project/services/` 里\n**实际调用**的路径(已补上 `/api` 前缀)。\n\n| 方法 | 路径 | 说明 |\n|---|---|---|\n| POST | `/api/ctc/authn/login` | 登录 |\n| GET | `/api/ctc/authn/my-tenants` | 我的租户 |\n| POST | `/api/ctc/authn/select-tenant` | 选择租户 |\n| POST | `/api/ctc/authn/switch-tenant` | 切换租户 |\n| GET | `/api/ctc/app-menu/tree` | 应用菜单树 |\n| GET/POST | `/api/ctc/ac/invitations`、`/accept`、`/redeem`、`/leave` | 邀请(加入 / 兑换 / 退出) |\n| GET/POST | `/api/ctc/ac/invitations/members`、`/members/{memberId}/remove`、`/{id}/revoke` | 邀请成员管理 |\n| GET/POST/PUT/DELETE | `/api/agent/team/workspace`、`/workspace/{id}` | Agent 团队工作区 |\n| GET | `/api/agent/team/workspace/list`、`/file-tree-by-path`、`/file-content` | 工作区列表 / 文件树 / 文件内容 |\n| GET/POST/PUT/DELETE | `/api/agent/team/work-item`、`/work-item/{id}` | 工作项 |\n| GET | `/api/agent/team/conversation/{conversationId}/work-items` | 会话下的工作项 |\n| POST | `/api/agent/skill/register`、`/heartbeat`、`/pull`、`/sync-logs` | 技能注册 / 心跳 / 拉取 / 日志回传 |\n| POST/GET | `/api/agent/skill/bind`、`/unbind`、`/bindings` | 技能绑定 |\n| GET/POST/DELETE | `/api/agent/instance/list`、`/get`、`/create`、`/create-container`、`/create-external`、`/destroy-container`、`/destroy-local-process`、`/agent-types`、`/health`、`/status` | Agent 实例(容器 / 外部 / 本地进程) |\n| POST/GET | `/api/bot/feedback`、`/feedback/recent`、`/feedback/score` | Bot 反馈 |\n| GET | `/api/skill/get`、`/api/skill/page` | 技能查询 |\n| GET/POST | `/api/task`、`/task/list`、`/task/complete`、`/task/move`、`/task/project/list` | 任务 |\n| GET/POST | `/api/project`、`/api/project/archive`、`/api/project/user/list` | 项目 |\n| GET/POST/PUT/DELETE | `/api/mock-platform/{environments,endpoints,scenarios,cases,recordings,...}` | Mock 平台(`z-script-web` 的 `MockPlatformController`) |\n| GET | `/api/{name}/list`、`/api/{name}/page`、`/api/{name}/byId` | 通用 CRUD 工厂(`makeApi(name)`,`src/common/services/api.js`) |\n\n各服务模块另有自己的探活端点(`/api/agentTeam/health`、`/api/ctcAc/health`、`/api/ctcAcDomain/health`、\n`/api/ctcSurl/health`、`/api/ctcUser/health`、`/api/job/health`、`/api/metaApp/health`、\n`/api/privateConfig/health`、`/api/webide/health`)。\n\n## 四、页面说明\n\n### 4.1 工作台(`src/zteam/pages/workspace/`)\n\n工作台是本包最大的域,含 `Layout`(顶栏 + 模式切换 + 内容区)、`ProductWorkbench` / `SmartWorkbench` /\n`DevWorkbench` / `OpsWorkbench` 等工作台壳,以及聊天、笔记、代码编辑、知识图谱等通用组件。\n\n### 4.2 套件聚合壳(`SystemShell`)\n\n工作台的「系统」模式用它把 z-opc 业务页面(账号 / 角色 / 应用 / 租户 / 组织 / 权限 / 短链 / 字典 / 审计 /\nwebide / Agent / LLM / MCP / 技能 / OSS / 任务 / 流程 / 调度 / 密钥 / 运维 等)渲染进工作台右侧内容区,\n而不是回到 z-opc 旧 Layout。\n\n### 4.3 订阅域(`src/subscribe/pages/`)\n\n`SubscribeApp` + `SubscriptionList` / `SubscriptionEdit` / `RunHistory`:订阅的列表、编辑与运行历史。\n\n### 4.4 项目域(`src/project/pages/`)\n\n`ProjectApp` + `ProjectList` / `ProjectCreate` / `ProjectDetail`:项目的列表、创建与详情。\n\n### 4.5 组件文档\n\n本文件。内容以 `?raw` 在编译期内联,零额外请求;左侧 240px TOC 随滚动联动。\n渲染用基座的 `ComponentDoc`(`@yuku123/z-frontend-common/ui`),不在本包重写 TOC / 两栏 / 滚动联动。\n\n## 五、配置\n\n| 配置项 | 默认值 | 说明 |\n|---|---|---|\n| `configureBaseURL(baseURL)` | `'/api'` | 改写 axios `baseURL`(`src/common/services/api.js`) |\n| 请求 `timeout` | `15000` | axios 实例默认值 |\n| `withCredentials` | `true` | Cookie 模式;**不设 Authorization Header** |\n| vite `external` | 25 个精确包 + 4 条前缀规则 | `react` / `react-dom` / `antd` / `@ant-design/icons` / `@yuku123/*` / `@zopc-mock/*` / `echarts/*` / `highlight.js/*` 等一律 external,**消费方必须自备** |\n| vite alias | `@` → `src/`、`@zteam` → `src/zteam/` | 仅 standalone 构建用;打包后路径已解析 |\n| 模式 URL 参数 | `?mode=xxx` | 持久化在 query 上;`collaboration` 是默认值,不写入 URL |\n| `?desktop=1` | — | 强制桌面版工作台(窄视口默认跳 `/workspace/phone`) |\n\n## 六、已知限制\n\n- **`/team/docs` 目前没有可达路径**:主壳 `z-opc-main-starter-frontend/src/domainRoutes.ts` 的 `DOMAINS` 数组里\n **没有注册 z-team 域**(截至 2026-10-23),所以 z-team 的 `routes` 清单还没有被主壳消费。\n ⇒ 需要主控决定是否接线(注册 z-team 域,或在主壳里显式挂 `ComponentDocPage`)。\n- **`ZTeamApp` 内部没有 `/team/docs` 分支**:它按**绝对 pathname** 分发(`/workspace`、`/scenario`、`/docs` …),\n 未知路径兜底渲染工作台。所以即使走了 `/team/:rest*` 兜底路由,`/team/docs` 也会落进工作台而不是文档页。\n (`ZTeamApp` 不在本批次的改动范围内,需要单独接线。)\n- **已有另一个「文档页」**:`src/zteam/pages/docs/index.tsx` 是 52KB 的手写暗色主题**操作手册**页,\n 路由是 `/docs`。它与本 §7 的**组件文档页**不是一回事(内容、样式、来源都不同),别混淆。\n- **本仓没有 `tsconfig.json`,构建不做类型检查**(`npm run build` = `vite build` + 产物守卫脚本)。\n 基座只发 JS 不发 `.d.ts`,`src/z-frontend-common-ui.d.ts` 是手写的最小声明;\n 新增基座组件时要同步补声明(当前该声明文件里**还没有** `ComponentDoc`,因为本包的文档页走的是 `.jsx`,不参与类型检查)。\n- **组件包必须 external 基座**:`@yuku123/z-frontend-common/ui` 在 dist 里保持裸 import,\n 消费方(主壳)必须自己装基座,否则会出现两份 UI 主题。\n- **工作台下的部分工作台壳仍在改造中**(`ProductWorkbench` / `SmartWorkbench` 等),页面结构可能继续变,\n 本文档只描述到「域 + 顶层路由 + 模式」这一层,域内二级页面未逐页展开。\n- **请求是 Cookie 模式**:后端 `SsoInterceptor` 靠 `Accept` / `Content-Type` 判断「是不是 API 请求」,\n 裸 `fetch` 不带 `Accept` 会被当成页面访问而 302 跳登录页(构建产物有 `guard-fetch-accept.mjs` 守卫)。\n\n## 七、变更记录\n\n| 版本 | 变更 |\n|---|---|\n| 0.2.30(未发布) | 新增组件文档页 `ComponentDocPage`(lead 008 §7):`src/DOC.md` + 基座 `ComponentDoc` 薄包装 + 菜单末项 `/team/docs` |\n| 0.2.30 | 工作台模式体系(13 种 `ChatMode`)+ `SystemShell` 套件聚合 + 订阅 / 项目双域 |\n";
3859
- function yr() {
3860
- return /* @__PURE__ */ e(Wt, { markdown: Jn, title: "组件文档 — z-team" });
3857
+ default: Xn
3858
+ }, Symbol.toStringTag, { value: "Module" })), Zn = "# z-team-component\n\nz-team(团队工作台)的**跨仓唯一前端面**:把「多模式工作台 / 模式切换 / z-opc 业务套件聚合 / 订阅域 / 项目域」\n这一整套团队工作台页面收敛成一个可复用的 React 组件包,由主壳(z-opc 主前端)挂载。\n\n- **npm 包名**:`@yuku123/z-team-component`\n- **宿主接入**:双入口 —— `.`(`ZTeamApp` / `SubscribeApp` / `ProjectApp`)与 `./pages`(`routes` / `appMeta` / `menuItems`)\n- **后端**:与 z-opc 主壳同源的 `/api/**`(axios `baseURL = '/api'`,Cookie 模式 `withCredentials`)\n- **技术栈**:React 19 + antd 6 + react-router-dom 7 + vite(**library mode**,双入口 `index` / `pages`,\n 基座与全部 `@yuku123/*` 一律 **external**,由消费方用自己的 node_modules 解析)\n\n> ⚠ z-team 是**主壳的总控包**:它自己不承载某个业务域,而是把 z-opc 的业务套件(`/ctc/*`、`/ai/*`、`/config/*` …)\n> 聚合进工作台外壳里渲染。所以本文档描述的是 **z-team 自身的能力**(工作台 / 模式切换 / 套件聚合 / 订阅 / 项目)。\n\n---\n\n## 一、能力概览\n\n### 1.1 顶层路由(`src/pages-manifest.ts` 的 `routes`)\n\n| 路由 | 组件 | 能力 |\n|------|------|------|\n| `/team/subscribe` | `SubscribeApp` | 订阅域:订阅列表 / 编辑 / 运行历史 |\n| `/team/project` | `ProjectApp` | 项目域:项目列表 / 创建 / 详情 |\n| `/team/docs` | `ComponentDocPage` | 本文件渲染页(左侧 240px TOC + 右侧正文) |\n| `/team/:rest*` | `ZTeamApp` | **兜底**:`ZTeamApp` 内部按 `useLocation().pathname` 懒加载分发到下面 15 个域 |\n\n`menuItems`:`/team/subscribe`(订阅)/ `/team/project`(项目)/ `/team/workspace`(工作台)/ `/team/docs`(组件文档,末项)。\n\n### 1.2 `ZTeamApp` 顶层分发(`src/zteam-adapter/App.tsx`)\n\n| pathname | 渲染的域 | 源文件 |\n|----------|----------|--------|\n| `/workspace` | 工作台 | `src/zteam/pages/workspace/index.tsx` |\n| `/workspace/phone` | 移动端工作台 | `src/zteam/pages/workspace/phone/index.tsx` |\n| `/workspace/from-ticket` | 从工单进入 | `src/zteam/pages/workspace/from-ticket.tsx` |\n| `/workspace/from-scenario` | 从场景进入 | `src/zteam/pages/workspace/from-scenario.tsx` |\n| `/workspace/build-by-form` | 表单构建 | `src/zteam/pages/workspace/build-by-form.tsx` |\n| `/scenario` | 场景 | `src/zteam/pages/scenario/index.tsx` |\n| `/admin` | 管理后台(走工作台外壳的 admin 分支) | `src/zteam/pages/admin/index.tsx` |\n| `/welcome` | 产品介绍 | `src/zteam/pages/welcome/index.tsx` |\n| `/portal` | 场景入口 | `src/zteam/pages/portal/index.tsx` |\n| `/chatdemo` | 聊天演示 | `src/zteam/pages/chatdemo/index.tsx` |\n| `/embed/chat` | 嵌入式聊天 | `src/zteam/pages/embed/chat/index.tsx` |\n| `/change-log` | 变更记录 | `src/zteam/pages/change-log/index.tsx` |\n| `/docs` | **操作手册页**(52KB 手写暗色主题页,**与本文件的组件文档页不是一回事**) | `src/zteam/pages/docs/index.tsx` |\n\n`src/zteam/pages/` 下共 **15 个域目录**:`admin` / `agenthub-digital-brain-test` / `change-log` / `chatdemo` /\n`docs` / `download` / `embed` / `login` / `note` / `phone` / `portal` / `rpa` / `scenario` / `welcome` / `workspace`。\n其中 `agenthub-digital-brain-test` / `download` / `login` / `note` / `rpa` **没有** `ZTeamApp` 顶层分支,\n由域内路由或别的入口进入。\n\n### 1.3 工作台模式切换(`src/zteam/pages/workspace/utils/chatMode.ts`)\n\n`ChatMode` 共 13 种:`personal` / `collaboration` / `smart` / `product` / `dev` / `test` / `ops` / `admin` /\n`system` / `life` / `training` / `rpa` / `knowledge`(默认 `collaboration`)。\n\n模式切换统一走 `history.push` 到对应顶层路由(`Layout/index.tsx` 的 `handleModeSwitch`):\n\n| 模式 | 落点 |\n|------|------|\n| `system` | `/ctc/4a/account`(z-opc 业务路径;已在业务路径上时不重复跳) |\n| `test` | `/test/qa/dashboard` |\n| `admin` | `/admin?mode=admin` |\n| `rpa` | `/rpa/dashboard` |\n| 其余模式 | `/workspace?mode=xxx`(必须带 `?desktop=1`,否则窄视口会被重定向到移动端工作台) |\n\n模式持久化在 URL query 上(`?mode=xxx`,`replaceState` 不污染历史记录);\n`/admin*` → `admin`、`/ops/*` → `ops`、`/lc/*` → `dev` 由 `readModeFromUrl()` 自动识别。\n\n### 1.4 套件聚合(`src/zteam/pages/workspace/components/Layout/SystemShell.tsx`)\n\n`SystemShell` 用一张 `SYSTEM_ROUTES` 表把 **z-opc 的业务套件**接进工作台的右侧内容区,\n用 `matchSystemPath()` 做 pathname 匹配(精确 → 通配 `*` / 参数 `:param`),支持 `/ctc/*`、`/ai/*`、`/config/*`、\n`/task/*`、`/workflow/*`、`/schedule/*`、`/mist/*`、`/meta/*`、`/msg/*`、`/rpc/*`、`/kb/*`、`/product/*`、`/ops/*` 等前缀。\n\n## 二、导出面\n\n```js\n// 主入口(. 桶):工作台主壳 + 订阅 / 项目域 + 公共设施\nimport ZTeamApp, {SubscribeApp, ProjectApp, history, isTokenExpired, ComponentDocPage}\n from '@yuku123/z-team-component'\n\n// 宿主组装面(./pages 桶):路由清单 + 菜单\nimport {routes, appMeta, menuItems, ComponentDocPage} from '@yuku123/z-team-component/pages'\n```\n\n- `routes`:`/team/subscribe`、`/team/project`、`/team/docs`、`/team/:rest*`(兜底)。\n- `appMeta`:`{ title: 'z-team 团队工作台', short: 'team' }`。\n- `ComponentDocPage`:组件文档页,**主入口与 `./pages` 桶都具名导出**(名字全仓统一,主壳按这个名字取)。\n\n## 三、API 端点\n\n请求实例由 `src/common/services/api.js` 的 axios 工厂创建:`baseURL = '/api'`(可用 `configureBaseURL()` 改),\n`timeout = 15000`,`withCredentials = true`(**Cookie 模式,不设 Authorization Header**)。\n下表路径是 `src/common/services/`、`src/services/`、`src/subscribe/services/`、`src/project/services/` 里\n**实际调用**的路径(已补上 `/api` 前缀)。\n\n| 方法 | 路径 | 说明 |\n|---|---|---|\n| POST | `/api/ctc/authn/login` | 登录 |\n| GET | `/api/ctc/authn/my-tenants` | 我的租户 |\n| POST | `/api/ctc/authn/select-tenant` | 选择租户 |\n| POST | `/api/ctc/authn/switch-tenant` | 切换租户 |\n| GET | `/api/ctc/app-menu/tree` | 应用菜单树 |\n| GET/POST | `/api/ctc/ac/invitations`、`/accept`、`/redeem`、`/leave` | 邀请(加入 / 兑换 / 退出) |\n| GET/POST | `/api/ctc/ac/invitations/members`、`/members/{memberId}/remove`、`/{id}/revoke` | 邀请成员管理 |\n| GET/POST/PUT/DELETE | `/api/agent/team/workspace`、`/workspace/{id}` | Agent 团队工作区 |\n| GET | `/api/agent/team/workspace/list`、`/file-tree-by-path`、`/file-content` | 工作区列表 / 文件树 / 文件内容 |\n| GET/POST/PUT/DELETE | `/api/agent/team/work-item`、`/work-item/{id}` | 工作项 |\n| GET | `/api/agent/team/conversation/{conversationId}/work-items` | 会话下的工作项 |\n| POST | `/api/agent/skill/register`、`/heartbeat`、`/pull`、`/sync-logs` | 技能注册 / 心跳 / 拉取 / 日志回传 |\n| POST/GET | `/api/agent/skill/bind`、`/unbind`、`/bindings` | 技能绑定 |\n| GET/POST/DELETE | `/api/agent/instance/list`、`/get`、`/create`、`/create-container`、`/create-external`、`/destroy-container`、`/destroy-local-process`、`/agent-types`、`/health`、`/status` | Agent 实例(容器 / 外部 / 本地进程) |\n| POST/GET | `/api/bot/feedback`、`/feedback/recent`、`/feedback/score` | Bot 反馈 |\n| GET | `/api/skill/get`、`/api/skill/page` | 技能查询 |\n| GET/POST | `/api/task`、`/task/list`、`/task/complete`、`/task/move`、`/task/project/list` | 任务 |\n| GET/POST | `/api/project`、`/api/project/archive`、`/api/project/user/list` | 项目 |\n| GET/POST/PUT/DELETE | `/api/mock-platform/{environments,endpoints,scenarios,cases,recordings,...}` | Mock 平台(`z-script-web` 的 `MockPlatformController`) |\n| GET | `/api/{name}/list`、`/api/{name}/page`、`/api/{name}/byId` | 通用 CRUD 工厂(`makeApi(name)`,`src/common/services/api.js`) |\n\n各服务模块另有自己的探活端点(`/api/agentTeam/health`、`/api/ctcAc/health`、`/api/ctcAcDomain/health`、\n`/api/ctcSurl/health`、`/api/ctcUser/health`、`/api/job/health`、`/api/metaApp/health`、\n`/api/privateConfig/health`、`/api/webide/health`)。\n\n## 四、页面说明\n\n### 4.1 工作台(`src/zteam/pages/workspace/`)\n\n工作台是本包最大的域,含 `Layout`(顶栏 + 模式切换 + 内容区)、`ProductWorkbench` / `SmartWorkbench` /\n`DevWorkbench` / `OpsWorkbench` 等工作台壳,以及聊天、笔记、代码编辑、知识图谱等通用组件。\n\n### 4.2 套件聚合壳(`SystemShell`)\n\n工作台的「系统」模式用它把 z-opc 业务页面(账号 / 角色 / 应用 / 租户 / 组织 / 权限 / 短链 / 字典 / 审计 /\nwebide / Agent / LLM / MCP / 技能 / OSS / 任务 / 流程 / 调度 / 密钥 / 运维 等)渲染进工作台右侧内容区,\n而不是回到 z-opc 旧 Layout。\n\n### 4.3 订阅域(`src/subscribe/pages/`)\n\n`SubscribeApp` + `SubscriptionList` / `SubscriptionEdit` / `RunHistory`:订阅的列表、编辑与运行历史。\n\n### 4.4 项目域(`src/project/pages/`)\n\n`ProjectApp` + `ProjectList` / `ProjectCreate` / `ProjectDetail`:项目的列表、创建与详情。\n\n### 4.5 组件文档\n\n本文件。内容以 `?raw` 在编译期内联,零额外请求;左侧 240px TOC 随滚动联动。\n渲染用基座的 `ComponentDoc`(`@yuku123/z-frontend-common/ui`),不在本包重写 TOC / 两栏 / 滚动联动。\n\n## 五、配置\n\n| 配置项 | 默认值 | 说明 |\n|---|---|---|\n| `configureBaseURL(baseURL)` | `'/api'` | 改写 axios `baseURL`(`src/common/services/api.js`) |\n| 请求 `timeout` | `15000` | axios 实例默认值 |\n| `withCredentials` | `true` | Cookie 模式;**不设 Authorization Header** |\n| vite `external` | 25 个精确包 + 4 条前缀规则 | `react` / `react-dom` / `antd` / `@ant-design/icons` / `@yuku123/*` / `@zopc-mock/*` / `echarts/*` / `highlight.js/*` 等一律 external,**消费方必须自备** |\n| vite alias | `@` → `src/`、`@zteam` → `src/zteam/` | 仅 standalone 构建用;打包后路径已解析 |\n| 模式 URL 参数 | `?mode=xxx` | 持久化在 query 上;`collaboration` 是默认值,不写入 URL |\n| `?desktop=1` | — | 强制桌面版工作台(窄视口默认跳 `/workspace/phone`) |\n\n## 六、已知限制\n\n- **`/team/docs` 目前没有可达路径**:主壳 `z-opc-main-starter-frontend/src/domainRoutes.ts` 的 `DOMAINS` 数组里\n **没有注册 z-team 域**(截至 2026-10-23),所以 z-team 的 `routes` 清单还没有被主壳消费。\n ⇒ 需要主控决定是否接线(注册 z-team 域,或在主壳里显式挂 `ComponentDocPage`)。\n- **`ZTeamApp` 内部没有 `/team/docs` 分支**:它按**绝对 pathname** 分发(`/workspace`、`/scenario`、`/docs` …),\n 未知路径兜底渲染工作台。所以即使走了 `/team/:rest*` 兜底路由,`/team/docs` 也会落进工作台而不是文档页。\n (`ZTeamApp` 不在本批次的改动范围内,需要单独接线。)\n- **已有另一个「文档页」**:`src/zteam/pages/docs/index.tsx` 是 52KB 的手写暗色主题**操作手册**页,\n 路由是 `/docs`。它与本 §7 的**组件文档页**不是一回事(内容、样式、来源都不同),别混淆。\n- **本仓没有 `tsconfig.json`,构建不做类型检查**(`npm run build` = `vite build` + 产物守卫脚本)。\n 基座只发 JS 不发 `.d.ts`,`src/z-frontend-common-ui.d.ts` 是手写的最小声明;\n 新增基座组件时要同步补声明(当前该声明文件里**还没有** `ComponentDoc`,因为本包的文档页走的是 `.jsx`,不参与类型检查)。\n- **组件包必须 external 基座**:`@yuku123/z-frontend-common/ui` 在 dist 里保持裸 import,\n 消费方(主壳)必须自己装基座,否则会出现两份 UI 主题。\n- **工作台下的部分工作台壳仍在改造中**(`ProductWorkbench` / `SmartWorkbench` 等),页面结构可能继续变,\n 本文档只描述到「域 + 顶层路由 + 模式」这一层,域内二级页面未逐页展开。\n- **请求是 Cookie 模式**:后端 `SsoInterceptor` 靠 `Accept` / `Content-Type` 判断「是不是 API 请求」,\n 裸 `fetch` 不带 `Accept` 会被当成页面访问而 302 跳登录页(构建产物有 `guard-fetch-accept.mjs` 守卫)。\n\n## 七、变更记录\n\n| 版本 | 变更 |\n|---|---|\n| 0.2.30(未发布) | 新增组件文档页 `ComponentDocPage`(lead 008 §7):`src/DOC.md` + 基座 `ComponentDoc` 薄包装 + 菜单末项 `/team/docs` |\n| 0.2.30 | 工作台模式体系(13 种 `ChatMode`)+ `SystemShell` 套件聚合 + 订阅 / 项目双域 |\n";
3859
+ function mr() {
3860
+ return /* @__PURE__ */ e(Wt, { markdown: Zn, title: "组件文档 — z-team" });
3861
3861
  }
3862
3862
  export {
3863
- yr as C,
3863
+ mr as C,
3864
3864
  Be as E,
3865
3865
  Xt as M,
3866
- pr as O,
3867
- Zn as P,
3868
- vn as R,
3869
- qn as S,
3870
- Cn as T,
3871
- lr as Z,
3872
- sr as a,
3873
- ur as b,
3866
+ ur as O,
3867
+ Xn as P,
3868
+ Cn as R,
3869
+ Un as S,
3870
+ Tn as T,
3871
+ ar as Z,
3872
+ lr as a,
3873
+ dr as b,
3874
3874
  je as c,
3875
- Pn as d,
3876
- dr as e,
3877
- ir as f,
3878
- _n as g,
3879
- Sn as h,
3880
- pn as i,
3875
+ _n as d,
3876
+ cr as e,
3877
+ sr as f,
3878
+ An as g,
3879
+ In as h,
3880
+ un as i,
3881
3881
  Ge as j,
3882
3882
  Vt as k,
3883
- or as l,
3884
- hr as m,
3885
- mr as n,
3883
+ ir as l,
3884
+ pr as m,
3885
+ hr as n,
3886
3886
  $ as r,
3887
- gn as s
3887
+ yn as s
3888
3888
  };