@yuku123/z-team-component 0.2.92 → 0.2.93

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 (45) hide show
  1. package/dist/{ChangeLogView-DMVBdFFX.js → ChangeLogView-BjV4gBq4.js} +1 -1
  2. package/dist/{ComponentDoc-Boc9n2c_.js → ComponentDoc-C9lt-45y.js} +77 -77
  3. package/dist/{InvitationManagementPage-B4UJQBrv.js → InvitationManagementPage-CWtBWLd9.js} +1 -1
  4. package/dist/{OnboardingPage-BuDvSKMx.js → OnboardingPage-B2fwh4gu.js} +2 -2
  5. package/dist/{ScheduledTasks-DY4iYtX3.js → ScheduledTasks-CuQyjAK-.js} +6 -6
  6. package/dist/{SystemShell-UVZjsfJs.js → SystemShell-CTkRb3jk.js} +4 -4
  7. package/dist/{admin-logs-OIyOdfuC.js → admin-logs-Dh41ezP6.js} +1 -1
  8. package/dist/{api-mJ7FvgsR.js → api-ChrRZOc4.js} +1 -1
  9. package/dist/{createWorkspaceWsHandler-9k7O4P-D.js → createWorkspaceWsHandler-DMw_Vk6i.js} +3 -3
  10. package/dist/{index-zEqjsTFh.js → index-3JPBTMXq.js} +3 -3
  11. package/dist/{index-s5yeUpMA.js → index-7glbcqX1.js} +3 -3
  12. package/dist/{index-r4IxoITP.js → index-BYpA6zMn.js} +2 -2
  13. package/dist/{index-BydWNuk5.js → index-BZCQSW-G.js} +44 -51
  14. package/dist/{index-TW4txhve.js → index-B_2fxZ6u.js} +1 -1
  15. package/dist/{index-BMt6Z1yA.js → index-BnRRZ6Iv.js} +1 -1
  16. package/dist/{index-CsHpsX_P.js → index-C-XgeN0c.js} +2 -2
  17. package/dist/{index-Ckpc_Z6-.js → index-CA0ql0r3.js} +6 -6
  18. package/dist/{index-C2LwqjZQ.js → index-CIGBLmd6.js} +2 -2
  19. package/dist/{index-DeHC7MtX.js → index-CLSOhZRs.js} +2 -2
  20. package/dist/{index-D1odHNMR.js → index-CLnmI_a7.js} +1 -1
  21. package/dist/{index-CYe2nfiG.js → index-CSXrOBjf.js} +5 -5
  22. package/dist/{index-FAhDAnIy.js → index-CdqU0NUf.js} +6 -6
  23. package/dist/{index-CpA8ev3a.js → index-CnWYolUK.js} +1 -1
  24. package/dist/{index-CwNtNKwX.js → index-CrQpBHe1.js} +2 -2
  25. package/dist/{index-COLSSd6V.js → index-D1_tbmUH.js} +2 -2
  26. package/dist/{index-Hm6ZaRmP.js → index-DNo7i9f6.js} +3 -3
  27. package/dist/{index-kwnNAAM0.js → index-DPyEBso8.js} +3 -3
  28. package/dist/{index-D74FCwtx.js → index-DdvzONMo.js} +1818 -1848
  29. package/dist/{index-D83QI-17.js → index-Dq4oBpcb.js} +2 -2
  30. package/dist/{index-GHQ4Tl6H.js → index-DtIPLfks.js} +3 -3
  31. package/dist/{index-Bi6mbk7-.js → index-Dy6vNz1c.js} +4 -4
  32. package/dist/{index-CpwvgQ3b.js → index-bkqC-Ys8.js} +1 -1
  33. package/dist/{index-BxRNZbw5.js → index-fab1eszg.js} +3 -3
  34. package/dist/{index-CeYCMcgX.js → index-vIdK5WMU.js} +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/{instance-BpY3BXci.js → instance-BY043pYn.js} +1 -1
  37. package/dist/{menuPermission-DX8KlB6K.js → menuPermission-BeYwZcoW.js} +3 -3
  38. package/dist/pages.js +1 -1
  39. package/dist/{send-default-agent-team-message-DVFuAdE9.js → send-default-agent-team-message-BN61cG7q.js} +1 -1
  40. package/dist/{sso-user-BBkFFo35.js → sso-user-DmsDr1MJ.js} +1 -1
  41. package/dist/{training-BCi9cA6O.js → training-CU6j5m-5.js} +1 -1
  42. package/dist/{webide-MQ5gD1Go.js → webide-BYaEjOx6.js} +3 -3
  43. package/dist/z-team-component.css +1 -1
  44. package/package.json +1 -1
  45. package/dist/index-Gk-5X-GO.js +0 -1143
@@ -1,12 +1,12 @@
1
1
  import { configureTodoStore as yr } from "@yuku123/z-task-component";
2
2
  import { create as gr } from "zustand";
3
- import { message as v, Row as se, Col as D, Typography as pe, Alert as ee, Card as F, Space as U, Input as B, Button as j, Table as ie, Drawer as Ze, Descriptions as z, Tag as E, Tooltip as Oe, Modal as Ne, Statistic as X, Select as te, Tabs as Xe, Form as N, Upload as Sr, Popconfirm as Xt, Spin as bt, Radio as de, InputNumber as At, Empty as br } from "antd";
3
+ import { message as v, Row as se, Col as D, Typography as pe, Alert as ee, Card as F, Space as U, Input as B, Button as j, Table as ie, Drawer as Ze, Descriptions as z, Tag as E, Tooltip as Re, Modal as je, Statistic as X, Select as te, Tabs as Xe, Form as N, Upload as Sr, Popconfirm as Xt, Spin as bt, Radio as de, InputNumber as At, Empty as br } from "antd";
4
4
  import { jsx as a, jsxs as p, Fragment as Lt } from "react/jsx-runtime";
5
5
  import { lazy as wr, Suspense as _r, useState as $, useEffect as Y, useRef as Fn } from "react";
6
6
  import { useLocation as Tr, useNavigate as Ye, useParams as qn, Routes as Bn, Route as ue, Navigate as Hn, useSearchParams as kr } from "react-router-dom";
7
7
  import { SettingOutlined as Ir, ProjectOutlined as wt, UserOutlined as Kn, AuditOutlined as Dt, RobotOutlined as Ft, ApiOutlined as Yt, AppstoreOutlined as Cr, ThunderboltOutlined as Ke, BarChartOutlined as Ar, ScheduleOutlined as $r, FileTextOutlined as Qt, ReloadOutlined as ce, ExperimentOutlined as xr, PlayCircleOutlined as _t, CopyOutlined as Gn, GlobalOutlined as Jn, NodeIndexOutlined as vr, UndoOutlined as Pr, FileSearchOutlined as Er, VideoCameraOutlined as on, SearchOutlined as Vn, EyeOutlined as Rr, CodeOutlined as qe, InfoCircleOutlined as Or, FunctionOutlined as nt, ImportOutlined as qt, CloudUploadOutlined as cn, FileAddOutlined as Mr, PlusOutlined as Wn, EditOutlined as jr, PauseCircleOutlined as Nr, CheckCircleOutlined as en, DeleteOutlined as Ur, ExclamationCircleOutlined as zr, SaveOutlined as Zn, ArrowLeftOutlined as Xn, SendOutlined as Lr } from "@ant-design/icons";
8
8
  import "@yuku123/z-frontend-common";
9
- import { PageHeader as Ue, GradientStatCard as rt, SectionHeader as Dr, FeatureCard as Fr, DarkBanner as qr, ListTable as ye, TableToolbar as Br, ErrorState as Hr, ComponentDoc as Kr } from "@yuku123/z-frontend-common/ui";
9
+ import { PageHeader as Ne, GradientStatCard as rt, SectionHeader as Dr, FeatureCard as Fr, DarkBanner as qr, ListTable as ye, TableToolbar as Br, ErrorState as Hr, ComponentDoc as Kr } from "@yuku123/z-frontend-common/ui";
10
10
  import tn from "axios";
11
11
  function q(e) {
12
12
  return e == null || e === "" ? "" : typeof e == "string" ? e : String(e);
@@ -264,12 +264,12 @@ async function Zo(e) {
264
264
  return Ie(t, "加载任务失败");
265
265
  }
266
266
  const Xo = "http://127.0.0.1/kapi/z-webide/inspect";
267
- let V = null, Be = [], He = [], Me = 0, fn = "", st = null, Fe = 0, fe = null, er = "disconnected";
267
+ let V = null, Be = [], He = [], Oe = 0, fn = "", st = null, Fe = 0, fe = null, er = "disconnected";
268
268
  function gt(e) {
269
269
  er = e, He.forEach((t) => t(e));
270
270
  }
271
271
  function yn() {
272
- return Me !== 0 && Me !== "";
272
+ return Oe !== 0 && Oe !== "";
273
273
  }
274
274
  function as(e, t = "") {
275
275
  const n = window.location.protocol === "https:" ? "wss:" : "ws:", r = window.location.host, s = t ? `?token=${encodeURIComponent(t)}` : "";
@@ -281,11 +281,11 @@ function Yo(e) {
281
281
  };
282
282
  }
283
283
  function os(e, t = "", n) {
284
- if (V && (V.readyState === WebSocket.CONNECTING || V.readyState === WebSocket.OPEN) && Me === e)
284
+ if (V && (V.readyState === WebSocket.CONNECTING || V.readyState === WebSocket.OPEN) && Oe === e)
285
285
  return;
286
286
  V && (V.onclose = null, V.close(), V = null), fe != null && (clearTimeout(fe), fe = null);
287
287
  const r = as(e, t);
288
- Me = e, fn = t, n && (st = n), gt("connecting"), V = new WebSocket(r), V.onopen = () => {
288
+ Oe = e, fn = t, n && (st = n), gt("connecting"), V = new WebSocket(r), V.onopen = () => {
289
289
  Fe = 0, gt("connected"), console.log("[WS] connected");
290
290
  }, V.onmessage = (s) => {
291
291
  try {
@@ -303,7 +303,7 @@ function os(e, t = "", n) {
303
303
  console.warn(
304
304
  `[WS] closed (clean=${o}), reconnect #${Fe} in ${i}ms`
305
305
  ), fe = setTimeout(() => {
306
- fe = null, yn() && (os(Me, fn), st == null || st());
306
+ fe = null, yn() && (os(Oe, fn), st == null || st());
307
307
  }, i);
308
308
  };
309
309
  }
@@ -317,7 +317,7 @@ async function is(e) {
317
317
  }), V && V.readyState === WebSocket.OPEN && V.send(JSON.stringify(e));
318
318
  }
319
319
  function Kt() {
320
- Me = 0, fe != null && (clearTimeout(fe), fe = null), V && (V.onclose = null, V.close(), V = null), Fe = 0, gt("disconnected"), Be = [], He = [];
320
+ Oe = 0, fe != null && (clearTimeout(fe), fe = null), V && (V.onclose = null, V.close(), V = null), Fe = 0, gt("disconnected"), Be = [], He = [];
321
321
  }
322
322
  const b = {
323
323
  credentials: "include",
@@ -1194,7 +1194,7 @@ async function Pi(e, t = "") {
1194
1194
  );
1195
1195
  return f(r, "刷新技能失败");
1196
1196
  }
1197
- function ze(e) {
1197
+ function Ue(e) {
1198
1198
  const t = (...r) => {
1199
1199
  for (const s of r) {
1200
1200
  const o = e[s];
@@ -1220,7 +1220,7 @@ function ze(e) {
1220
1220
  }
1221
1221
  async function Ei(e = "") {
1222
1222
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await g(`${y}/personal-agents${t}`, b), r = await f(n, "获取个人 Agent 列表失败");
1223
- return (Array.isArray(r) ? r : []).map((s) => ze(s));
1223
+ return (Array.isArray(r) ? r : []).map((s) => Ue(s));
1224
1224
  }
1225
1225
  async function Ri(e, t = "") {
1226
1226
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await g(`${y}/personal-agents${n}`, {
@@ -1229,7 +1229,7 @@ async function Ri(e, t = "") {
1229
1229
  headers: { "Content-Type": "application/json" },
1230
1230
  body: JSON.stringify({ display_name: e })
1231
1231
  });
1232
- return ze(
1232
+ return Ue(
1233
1233
  await f(r, "创建个人 Agent 失败")
1234
1234
  );
1235
1235
  }
@@ -1245,7 +1245,7 @@ async function Oi(e, t, n, r, s = "") {
1245
1245
  avatar: r ?? ""
1246
1246
  })
1247
1247
  });
1248
- return ze(
1248
+ return Ue(
1249
1249
  await f(i, "创建个人 Agent 失败")
1250
1250
  );
1251
1251
  }
@@ -1263,7 +1263,7 @@ async function ji(e, t, n = "") {
1263
1263
  headers: { "Content-Type": "application/json" },
1264
1264
  body: JSON.stringify({ display_name: t })
1265
1265
  });
1266
- return ze(
1266
+ return Ue(
1267
1267
  await f(s, "重命名个人 Agent 失败")
1268
1268
  );
1269
1269
  }
@@ -1276,7 +1276,7 @@ async function Ni(e = "") {
1276
1276
  "获取共享 Agent 列表失败"
1277
1277
  );
1278
1278
  return (Array.isArray(r) ? r : []).map(
1279
- (s) => ze(s)
1279
+ (s) => Ue(s)
1280
1280
  );
1281
1281
  }
1282
1282
  async function Ui(e, t, n = "") {
@@ -1286,7 +1286,7 @@ async function Ui(e, t, n = "") {
1286
1286
  headers: { "Content-Type": "application/json" },
1287
1287
  body: JSON.stringify({ shared: t })
1288
1288
  });
1289
- return ze(
1289
+ return Ue(
1290
1290
  await f(s, "切换共享状态失败")
1291
1291
  );
1292
1292
  }
@@ -2341,7 +2341,7 @@ function In(e, t) {
2341
2341
  return Object.values(e).filter((s) => Gt(s.agentName, s.task_id) === r).map((s) => s.executionId);
2342
2342
  }
2343
2343
  const pr = "$ref";
2344
- function Le(e) {
2344
+ function ze(e) {
2345
2345
  const t = q(e);
2346
2346
  return we(t) ? t : void 0;
2347
2347
  }
@@ -2351,7 +2351,7 @@ function mr(e) {
2351
2351
  const t = Object.keys(e);
2352
2352
  return t.length === 1 && t[0] === pr;
2353
2353
  }
2354
- function je(e) {
2354
+ function Me(e) {
2355
2355
  if (!(!e || typeof e != "object" || Array.isArray(e)) && !mr(e))
2356
2356
  return e;
2357
2357
  }
@@ -2360,10 +2360,10 @@ function Je(e) {
2360
2360
  }
2361
2361
  function fa(e) {
2362
2362
  var s;
2363
- const t = je(e.submittedValue);
2363
+ const t = Me(e.submittedValue);
2364
2364
  if (Je(t))
2365
2365
  return t;
2366
- const n = je((s = e.cardForm) == null ? void 0 : s.value);
2366
+ const n = Me((s = e.cardForm) == null ? void 0 : s.value);
2367
2367
  if (Je(n))
2368
2368
  return n;
2369
2369
  const r = typeof e.result == "string" && e.result.trim() ? e.result.trim() : "";
@@ -2384,7 +2384,7 @@ function ya(e) {
2384
2384
  }
2385
2385
  }
2386
2386
  function dl(e, t) {
2387
- const n = t.result == null || t.result === "" ? e.result : String(t.result), r = ya(t.ext), s = je(
2387
+ const n = t.result == null || t.result === "" ? e.result : String(t.result), r = ya(t.ext), s = Me(
2388
2388
  (r == null ? void 0 : r.submittedValue) ?? (r == null ? void 0 : r.submitted_value)
2389
2389
  ), o = {
2390
2390
  ...e,
@@ -2396,18 +2396,18 @@ function dl(e, t) {
2396
2396
  function hr(e) {
2397
2397
  if (!e || typeof e != "object")
2398
2398
  return null;
2399
- const t = e, n = Le(t.humanTaskId ?? t.human_task_id);
2399
+ const t = e, n = ze(t.humanTaskId ?? t.human_task_id);
2400
2400
  if (n == null)
2401
2401
  return null;
2402
- const r = je(t.cardForm) ?? je(t.card_form), s = je(t.submittedValue ?? t.submitted_value), o = typeof t.result == "string" ? t.result : void 0, i = fa({
2402
+ const r = Me(t.cardForm) ?? Me(t.card_form), s = Me(t.submittedValue ?? t.submitted_value), o = typeof t.result == "string" ? t.result : void 0, i = fa({
2403
2403
  submittedValue: s,
2404
2404
  cardForm: r,
2405
2405
  result: o
2406
2406
  }), c = r && Je(i) ? { ...r, value: i } : r;
2407
2407
  return {
2408
2408
  humanTaskId: n,
2409
- agentTaskId: Le(t.agentTaskId ?? t.agent_task_id),
2410
- scenarioInstanceId: Le(
2409
+ agentTaskId: ze(t.agentTaskId ?? t.agent_task_id),
2410
+ scenarioInstanceId: ze(
2411
2411
  t.scenarioInstanceId ?? t.scenario_instance_id
2412
2412
  ),
2413
2413
  // humanTaskStatus 是状态码而非 ID,不能走 idOrUndefined(会变成字符串)
@@ -2415,8 +2415,8 @@ function hr(e) {
2415
2415
  assistType: typeof t.assistType == "string" ? t.assistType : typeof t.assist_type == "string" ? t.assist_type : void 0,
2416
2416
  assignee: t.assignee && typeof t.assignee == "object" ? t.assignee : void 0,
2417
2417
  cardForm: c,
2418
- cardFormId: Le(t.cardFormId ?? t.card_form_id),
2419
- promotedMessageId: Le(
2418
+ cardFormId: ze(t.cardFormId ?? t.card_form_id),
2419
+ promotedMessageId: ze(
2420
2420
  t.promotedMessageId ?? t.promoted_message_id
2421
2421
  ),
2422
2422
  instruction: typeof t.instruction == "string" ? t.instruction : void 0,
@@ -3962,12 +3962,12 @@ Pa();
3962
3962
  const ne = (e) => {
3963
3963
  const t = wr(e);
3964
3964
  return (n) => /* @__PURE__ */ a(_r, { fallback: null, children: /* @__PURE__ */ a(t, { ...n }) });
3965
- }, xe = ne(() => import("./index-D74FCwtx.js").then((e) => e.aw)), Ea = ne(() => import("./index-CYe2nfiG.js")), Ra = ne(() => import("./index-C2LwqjZQ.js")), Oa = ne(() => import("./index-zEqjsTFh.js")), Ma = ne(() => import("./index-Hm6ZaRmP.js")), ja = ne(() => import("./index-CeYCMcgX.js"));
3966
- ne(() => import("./index-FAhDAnIy.js"));
3967
- const Na = ne(() => import("./index-C815hPWS.js")), Ua = ne(() => import("./index-BydWNuk5.js")), za = ne(() => import("./index-DhDdFRHC.js")), La = ne(() => import("./index-BMt6Z1yA.js")), Da = ne(() => import("./index-CpwvgQ3b.js")), Fa = ne(() => import("./index-B_LJRFsK.js")), qa = ne(() => import("./index-CwNtNKwX.js"));
3965
+ }, Le = ne(() => import("./index-DdvzONMo.js").then((e) => e.aw)), Ea = ne(() => import("./index-CSXrOBjf.js")), Ra = ne(() => import("./index-CIGBLmd6.js")), Oa = ne(() => import("./index-3JPBTMXq.js")), Ma = ne(() => import("./index-DNo7i9f6.js")), ja = ne(() => import("./index-vIdK5WMU.js"));
3966
+ ne(() => import("./index-CdqU0NUf.js"));
3967
+ const Na = ne(() => import("./index-C815hPWS.js")), Ua = ne(() => import("./index-BZCQSW-G.js")), za = ne(() => import("./index-DhDdFRHC.js")), La = ne(() => import("./index-BnRRZ6Iv.js")), Da = ne(() => import("./index-bkqC-Ys8.js")), Fa = ne(() => import("./index-B_LJRFsK.js")), qa = ne(() => import("./index-CrQpBHe1.js"));
3968
3968
  function gl({ forcedMode: e }) {
3969
3969
  const { pathname: t } = Tr(), n = t.replace(/\/+$/, "") || "/";
3970
- return e === "system" ? /* @__PURE__ */ a(xe, { forcedChatMode: $a(n) }) : e === "rpa" ? /* @__PURE__ */ a(xe, { forcedChatMode: "rpa" }) : e === "dev" ? /* @__PURE__ */ a(xe, { forcedChatMode: "dev" }) : n === "/workspace" ? /* @__PURE__ */ a(xe, {}) : n === "/workspace/phone" ? /* @__PURE__ */ a(Ea, {}) : n === "/workspace/from-ticket" ? /* @__PURE__ */ a(Ra, {}) : n === "/workspace/from-scenario" ? /* @__PURE__ */ a(Oa, {}) : n === "/workspace/build-by-form" ? /* @__PURE__ */ a(Ma, {}) : n === "/scenario" ? /* @__PURE__ */ a(ja, {}) : n === "/admin" ? /* @__PURE__ */ a(xe, {}) : n === "/welcome" ? /* @__PURE__ */ a(Ua, {}) : n === "/portal" ? /* @__PURE__ */ a(za, {}) : n === "/chatdemo" ? /* @__PURE__ */ a(Na, {}) : n === "/embed/chat" || n.startsWith("/embed/chat/") ? /* @__PURE__ */ a(qa, {}) : n === "/change-log" ? /* @__PURE__ */ a(La, {}) : n === "/docs" ? /* @__PURE__ */ a(Da, {}) : n === "/download" ? /* @__PURE__ */ a(Fa, {}) : /* @__PURE__ */ a(xe, {});
3970
+ return e === "system" ? /* @__PURE__ */ a(Le, { forcedChatMode: $a(n) }) : e === "dev" ? /* @__PURE__ */ a(Le, { forcedChatMode: "dev" }) : n === "/workspace" ? /* @__PURE__ */ a(Le, {}) : n === "/workspace/phone" ? /* @__PURE__ */ a(Ea, {}) : n === "/workspace/from-ticket" ? /* @__PURE__ */ a(Ra, {}) : n === "/workspace/from-scenario" ? /* @__PURE__ */ a(Oa, {}) : n === "/workspace/build-by-form" ? /* @__PURE__ */ a(Ma, {}) : n === "/scenario" ? /* @__PURE__ */ a(ja, {}) : n === "/admin" ? /* @__PURE__ */ a(Le, {}) : n === "/welcome" ? /* @__PURE__ */ a(Ua, {}) : n === "/portal" ? /* @__PURE__ */ a(za, {}) : n === "/chatdemo" ? /* @__PURE__ */ a(Na, {}) : n === "/embed/chat" || n.startsWith("/embed/chat/") ? /* @__PURE__ */ a(qa, {}) : n === "/change-log" ? /* @__PURE__ */ a(La, {}) : n === "/docs" ? /* @__PURE__ */ a(Da, {}) : n === "/download" ? /* @__PURE__ */ a(Fa, {}) : /* @__PURE__ */ a(Le, {});
3971
3971
  }
3972
3972
  function Ba(e) {
3973
3973
  if (!e || typeof e != "string") return null;
@@ -4188,7 +4188,7 @@ const H = sn(), Sl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
4188
4188
  };
4189
4189
  }, []), /* @__PURE__ */ p("div", { children: [
4190
4190
  /* @__PURE__ */ a(
4191
- Ue,
4191
+ Ne,
4192
4192
  {
4193
4193
  title: "统一管理平台",
4194
4194
  subtitle: "一站式企业级应用管理平台 · 整合配置 / 任务 / 工作流 / 用户 / 调度 等核心模块",
@@ -4299,20 +4299,20 @@ function fr() {
4299
4299
  const tt = fr(), Xa = fr();
4300
4300
  Xa.interceptors.request.use((e) => e);
4301
4301
  tt.interceptors.request.use((e) => e);
4302
- const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).then((n) => n.data), Z = (e, t, n) => tt.post(`${Ct}${e}`, t, { params: n }).then((r) => r.data), ft = (e, t, n) => tt.put(`${Ct}${e}`, t, { params: n }).then((r) => r.data), ve = (e, t) => tt.delete(`${Ct}${e}`, { params: t }).then((n) => n.data), J = {
4302
+ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).then((n) => n.data), Z = (e, t, n) => tt.post(`${Ct}${e}`, t, { params: n }).then((r) => r.data), ft = (e, t, n) => tt.put(`${Ct}${e}`, t, { params: n }).then((r) => r.data), xe = (e, t) => tt.delete(`${Ct}${e}`, { params: t }).then((n) => n.data), J = {
4303
4303
  stats: () => Q("/stats"),
4304
4304
  environments: {
4305
4305
  list: () => Q("/environments/list"),
4306
4306
  create: (e) => Z("/environments", e),
4307
4307
  update: (e, t) => ft("/environments", t, { envCode: e }),
4308
- delete: (e) => ve("/environments", { envCode: e })
4308
+ delete: (e) => xe("/environments", { envCode: e })
4309
4309
  },
4310
4310
  endpoints: {
4311
4311
  list: (e, t, n) => Q("/endpoints/list", { envCode: e, scenarioCode: t, status: n }),
4312
4312
  get: (e) => Q("/endpoints/byCode", { mockCode: e }),
4313
4313
  create: (e) => Z("/endpoints", e),
4314
4314
  update: (e, t) => ft("/endpoints", t, { mockCode: e }),
4315
- delete: (e) => ve("/endpoints", { mockCode: e }),
4315
+ delete: (e) => xe("/endpoints", { mockCode: e }),
4316
4316
  toggle: (e, t) => Z("/endpoints/toggle", null, { mockCode: e, status: t })
4317
4317
  },
4318
4318
  scenarios: {
@@ -4320,7 +4320,7 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
4320
4320
  get: (e) => Q("/scenarios/byCode", { scenarioCode: e }),
4321
4321
  create: (e) => Z("/scenarios", e),
4322
4322
  update: (e, t) => ft("/scenarios", t, { scenarioCode: e }),
4323
- delete: (e) => ve("/scenarios", { scenarioCode: e }),
4323
+ delete: (e) => xe("/scenarios", { scenarioCode: e }),
4324
4324
  reset: (e) => Z("/scenarios/reset", null, { scenarioCode: e }),
4325
4325
  instances: (e) => Q("/scenarios/instances", { scenarioCode: e })
4326
4326
  },
@@ -4329,7 +4329,7 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
4329
4329
  get: (e) => Q("/cases/byCode", { caseCode: e }),
4330
4330
  create: (e) => Z("/cases", e),
4331
4331
  update: (e, t) => ft("/cases", t, { caseCode: e }),
4332
- delete: (e) => ve("/cases", { caseCode: e }),
4332
+ delete: (e) => xe("/cases", { caseCode: e }),
4333
4333
  run: (e) => Z("/cases/run", null, { caseCode: e }),
4334
4334
  runBatch: (e) => Z("/cases/run-batch", { caseCodes: e })
4335
4335
  },
@@ -4346,12 +4346,12 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
4346
4346
  export: (e, t) => Z("/recordings/export", { recordingCode: e, projectCode: t }),
4347
4347
  import: (e, t) => Z("/recordings/import", { recordingCode: e, projectCode: t }),
4348
4348
  playback: (e, t) => Z("/recordings/playback", { recordingCode: e, targetUrl: t }),
4349
- delete: (e) => ve("/recordings", { recordingCode: e })
4349
+ delete: (e) => xe("/recordings", { recordingCode: e })
4350
4350
  },
4351
4351
  requestLogs: {
4352
4352
  list: (e) => Q("/request-logs/list", e),
4353
4353
  stats: () => Q("/request-logs/stats"),
4354
- clear: (e) => ve("/request-logs/clear", { limit: e })
4354
+ clear: (e) => xe("/request-logs/clear", { limit: e })
4355
4355
  },
4356
4356
  curl: {
4357
4357
  parse: (e) => Z("/curl/parse", { curlText: e }),
@@ -4451,7 +4451,7 @@ function Wt({ activeEnvCode: e }) {
4451
4451
  width: 160,
4452
4452
  fixed: "right",
4453
4453
  render: (S, A) => /* @__PURE__ */ p(U, { size: "small", children: [
4454
- /* @__PURE__ */ a(Oe, { title: "预览响应", children: /* @__PURE__ */ a(
4454
+ /* @__PURE__ */ a(Re, { title: "预览响应", children: /* @__PURE__ */ a(
4455
4455
  j,
4456
4456
  {
4457
4457
  size: "small",
@@ -4463,7 +4463,7 @@ function Wt({ activeEnvCode: e }) {
4463
4463
  children: "预览"
4464
4464
  }
4465
4465
  ) }),
4466
- /* @__PURE__ */ a(Oe, { title: "复制URL", children: /* @__PURE__ */ a(
4466
+ /* @__PURE__ */ a(Re, { title: "复制URL", children: /* @__PURE__ */ a(
4467
4467
  j,
4468
4468
  {
4469
4469
  size: "small",
@@ -4820,7 +4820,7 @@ function to() {
4820
4820
  }
4821
4821
  ),
4822
4822
  /* @__PURE__ */ a(
4823
- Ne,
4823
+ je,
4824
4824
  {
4825
4825
  title: `场景实例: ${i == null ? void 0 : i.code}`,
4826
4826
  open: s,
@@ -5087,7 +5087,7 @@ function ro() {
5087
5087
  }
5088
5088
  ),
5089
5089
  /* @__PURE__ */ a(
5090
- Ne,
5090
+ je,
5091
5091
  {
5092
5092
  title: `批量执行结果 (${(u == null ? void 0 : u.total) || 0} 条)`,
5093
5093
  open: m,
@@ -5148,7 +5148,7 @@ function ro() {
5148
5148
  )
5149
5149
  ] });
5150
5150
  }
5151
- const { Text: Pe } = pe, On = {
5151
+ const { Text: ve } = pe, On = {
5152
5152
  IDLE: "default",
5153
5153
  RECORDING: "red",
5154
5154
  STOPPED: "green",
@@ -5182,7 +5182,7 @@ function so() {
5182
5182
  dataIndex: "recording_code",
5183
5183
  key: "recording_code",
5184
5184
  width: 180,
5185
- render: (x) => /* @__PURE__ */ a(Pe, { code: !0, children: x })
5185
+ render: (x) => /* @__PURE__ */ a(ve, { code: !0, children: x })
5186
5186
  },
5187
5187
  { title: "名称", dataIndex: "recording_name", key: "recording_name", width: 200 },
5188
5188
  {
@@ -5204,7 +5204,7 @@ function so() {
5204
5204
  dataIndex: "target_url",
5205
5205
  key: "target_url",
5206
5206
  ellipsis: !0,
5207
- render: (x) => x ? /* @__PURE__ */ a(Pe, { copyable: { text: x }, children: x }) : "-"
5207
+ render: (x) => x ? /* @__PURE__ */ a(ve, { copyable: { text: x }, children: x }) : "-"
5208
5208
  },
5209
5209
  { title: "开始时间", dataIndex: "start_time", key: "start_time", width: 170 },
5210
5210
  { title: "结束时间", dataIndex: "end_time", key: "end_time", width: 170 },
@@ -5236,7 +5236,7 @@ function so() {
5236
5236
  description: /* @__PURE__ */ p("div", { children: [
5237
5237
  /* @__PURE__ */ p("div", { children: [
5238
5238
  "• 开启录制后,所有 ",
5239
- /* @__PURE__ */ a(Pe, { code: !0, children: "/api/mock/{envCode}/**" }),
5239
+ /* @__PURE__ */ a(ve, { code: !0, children: "/api/mock/{envCode}/**" }),
5240
5240
  " 请求会被捕获到数据库"
5241
5241
  ] }),
5242
5242
  /* @__PURE__ */ a("div", { children: "• 停止录制后,可一键转为 Mock endpoints(用于离线测试)" }),
@@ -5285,11 +5285,11 @@ function so() {
5285
5285
  /* @__PURE__ */ a(z.Item, { label: "名称", children: i.recording_name }),
5286
5286
  /* @__PURE__ */ a(z.Item, { label: "状态", children: /* @__PURE__ */ a(E, { color: On[i.record_status], children: i.record_status }) }),
5287
5287
  /* @__PURE__ */ a(z.Item, { label: "请求数", children: i.total_requests }),
5288
- /* @__PURE__ */ a(z.Item, { label: "目标 URL", span: 2, children: /* @__PURE__ */ a(Pe, { copyable: !0, children: i.target_url }) }),
5288
+ /* @__PURE__ */ a(z.Item, { label: "目标 URL", span: 2, children: /* @__PURE__ */ a(ve, { copyable: !0, children: i.target_url }) }),
5289
5289
  /* @__PURE__ */ a(z.Item, { label: "开始", children: i.start_time }),
5290
5290
  /* @__PURE__ */ a(z.Item, { label: "结束", children: i.end_time || "(录制中)" })
5291
5291
  ] }),
5292
- /* @__PURE__ */ p(Pe, { strong: !0, children: [
5292
+ /* @__PURE__ */ p(ve, { strong: !0, children: [
5293
5293
  "请求列表 (共 ",
5294
5294
  l.length,
5295
5295
  " 条):"
@@ -5313,7 +5313,7 @@ function so() {
5313
5313
  dataIndex: "request_url",
5314
5314
  key: "request_url",
5315
5315
  ellipsis: !0,
5316
- render: (x) => /* @__PURE__ */ a(Pe, { code: !0, children: x })
5316
+ render: (x) => /* @__PURE__ */ a(ve, { code: !0, children: x })
5317
5317
  },
5318
5318
  {
5319
5319
  title: "响应",
@@ -5340,7 +5340,7 @@ function so() {
5340
5340
  )
5341
5341
  ] });
5342
5342
  }
5343
- const { Text: Ee } = pe, ao = { MOCK: "green", PROXY: "blue", 404: "red", 502: "orange" };
5343
+ const { Text: Pe } = pe, ao = { MOCK: "green", PROXY: "blue", 404: "red", 502: "orange" };
5344
5344
  function oo() {
5345
5345
  const [e, t] = $([]), [n, r] = $(null), [s, o] = $(!1), [i, c] = $(null), [l, d] = $(!1), [u, h] = $(""), [m, C] = $();
5346
5346
  Y(() => {
@@ -5392,7 +5392,7 @@ function oo() {
5392
5392
  dataIndex: "request_path",
5393
5393
  key: "request_path",
5394
5394
  ellipsis: !0,
5395
- render: (S) => /* @__PURE__ */ a(Ee, { code: !0, children: S })
5395
+ render: (S) => /* @__PURE__ */ a(Pe, { code: !0, children: S })
5396
5396
  },
5397
5397
  {
5398
5398
  title: "状态",
@@ -5431,7 +5431,7 @@ function oo() {
5431
5431
  key: "mock_code",
5432
5432
  width: 160,
5433
5433
  ellipsis: !0,
5434
- render: (S) => S ? /* @__PURE__ */ a(Ee, { code: !0, children: S }) : "-"
5434
+ render: (S) => S ? /* @__PURE__ */ a(Pe, { code: !0, children: S }) : "-"
5435
5435
  },
5436
5436
  {
5437
5437
  title: "操作",
@@ -5545,7 +5545,7 @@ function oo() {
5545
5545
  }
5546
5546
  ) }),
5547
5547
  /* @__PURE__ */ a(z.Item, { label: "路径", span: 2, children: /* @__PURE__ */ a(
5548
- Ee,
5548
+ Pe,
5549
5549
  {
5550
5550
  code: !0,
5551
5551
  children: i.request_path
@@ -5577,7 +5577,7 @@ function oo() {
5577
5577
  /* @__PURE__ */ a(z.Item, { label: "User-Agent", ellipsis: !0, children: i.user_agent || "-" }),
5578
5578
  /* @__PURE__ */ a(z.Item, { label: "时间", span: 2, children: i.create_time ? new Date(i.create_time).toLocaleString() : "-" })
5579
5579
  ] }),
5580
- /* @__PURE__ */ a(Ee, { strong: !0, children: "请求头:" }),
5580
+ /* @__PURE__ */ a(Pe, { strong: !0, children: "请求头:" }),
5581
5581
  /* @__PURE__ */ a("pre", { style: {
5582
5582
  background: "#f5f5f5",
5583
5583
  padding: 12,
@@ -5588,7 +5588,7 @@ function oo() {
5588
5588
  fontFamily: "monospace",
5589
5589
  whiteSpace: "pre-wrap"
5590
5590
  }, children: i.request_headers || "(无)" }),
5591
- /* @__PURE__ */ a(Ee, { strong: !0, style: { marginTop: 12, display: "block" }, children: "请求体:" }),
5591
+ /* @__PURE__ */ a(Pe, { strong: !0, style: { marginTop: 12, display: "block" }, children: "请求体:" }),
5592
5592
  /* @__PURE__ */ a("pre", { style: {
5593
5593
  background: "#f5f5f5",
5594
5594
  padding: 12,
@@ -5600,7 +5600,7 @@ function oo() {
5600
5600
  whiteSpace: "pre-wrap",
5601
5601
  wordBreak: "break-all"
5602
5602
  }, children: i.request_body || "(无)" }),
5603
- /* @__PURE__ */ a(Ee, { strong: !0, style: { marginTop: 12, display: "block" }, children: "响应体:" }),
5603
+ /* @__PURE__ */ a(Pe, { strong: !0, style: { marginTop: 12, display: "block" }, children: "响应体:" }),
5604
5604
  /* @__PURE__ */ a("pre", { style: {
5605
5605
  background: "#f5f5f5",
5606
5606
  padding: 12,
@@ -5649,7 +5649,7 @@ function io() {
5649
5649
  };
5650
5650
  return (u = Mn.find((h) => h.key === e)) == null || u.component, /* @__PURE__ */ p("div", { children: [
5651
5651
  /* @__PURE__ */ a(
5652
- Ue,
5652
+ Ne,
5653
5653
  {
5654
5654
  title: "Mock 平台",
5655
5655
  subtitle: "WireMock 级 · Mock 端点管理、环境隔离、场景状态机、测试用例库、录制回放、请求日志"
@@ -5817,7 +5817,7 @@ function Tl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5817
5817
  "/",
5818
5818
  d
5819
5819
  ] }),
5820
- /* @__PURE__ */ a(Oe, { title: "点击按钮即可插入到上方响应模板;点击 syntax 文本可复制", children: /* @__PURE__ */ a(Or, { style: { color: "#999" } }) })
5820
+ /* @__PURE__ */ a(Re, { title: "点击按钮即可插入到上方响应模板;点击 syntax 文本可复制", children: /* @__PURE__ */ a(Or, { style: { color: "#999" } }) })
5821
5821
  ] }),
5822
5822
  extra: /* @__PURE__ */ a(
5823
5823
  B,
@@ -5854,7 +5854,7 @@ function Tl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5854
5854
  gap: 8
5855
5855
  },
5856
5856
  children: [
5857
- /* @__PURE__ */ a(Oe, { title: "点击复制", children: /* @__PURE__ */ a(
5857
+ /* @__PURE__ */ a(Re, { title: "点击复制", children: /* @__PURE__ */ a(
5858
5858
  De,
5859
5859
  {
5860
5860
  code: !0,
@@ -5865,7 +5865,7 @@ function Tl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5865
5865
  ) }),
5866
5866
  /* @__PURE__ */ a(De, { type: "secondary", style: { fontSize: 12, flex: 1 }, children: m.desc }),
5867
5867
  /* @__PURE__ */ a(E, { color: "default", style: { margin: 0, fontFamily: "monospace" }, children: m.example }),
5868
- /* @__PURE__ */ a(Oe, { title: "插入到响应模板", children: /* @__PURE__ */ a(
5868
+ /* @__PURE__ */ a(Re, { title: "插入到响应模板", children: /* @__PURE__ */ a(
5869
5869
  j,
5870
5870
  {
5871
5871
  size: "small",
@@ -5882,7 +5882,7 @@ function Tl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5882
5882
  }
5883
5883
  );
5884
5884
  }
5885
- const { TextArea: Nn } = B, { Text: Re, Paragraph: co } = pe;
5885
+ const { TextArea: Nn } = B, { Text: Ee, Paragraph: co } = pe;
5886
5886
  function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
5887
5887
  const [s, o] = $(""), [i, c] = $(null), [l, d] = $(null), [u, h] = $(!1), [m, C] = $(null), [O, _] = $(!1), [x, S] = $("import"), [A] = N.useForm(), [k] = N.useForm(), P = () => {
5888
5888
  o(""), c(null), d(null), C(null), A.resetFields(), k.resetFields();
@@ -5981,7 +5981,7 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
5981
5981
  }
5982
5982
  };
5983
5983
  return /* @__PURE__ */ p(
5984
- Ne,
5984
+ je,
5985
5985
  {
5986
5986
  title: /* @__PURE__ */ p(U, { children: [
5987
5987
  /* @__PURE__ */ a(qe, {}),
@@ -6014,16 +6014,16 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6014
6014
  l && /* @__PURE__ */ a(ee, { type: "error", showIcon: !0, style: { marginTop: 12 }, title: "解析失败", description: l }),
6015
6015
  i && /* @__PURE__ */ a(F, { size: "small", style: { marginTop: 16 }, title: "解析结果", children: /* @__PURE__ */ p(z, { column: 1, size: "small", bordered: !0, children: [
6016
6016
  /* @__PURE__ */ a(z.Item, { label: "Method", children: /* @__PURE__ */ a(E, { color: lo(i.method), children: i.method }) }),
6017
- /* @__PURE__ */ a(z.Item, { label: "URL", children: /* @__PURE__ */ a(Re, { code: !0, copyable: !0, children: i.url }) }),
6018
- /* @__PURE__ */ a(z.Item, { label: "Path", children: /* @__PURE__ */ a(Re, { code: !0, children: i.path }) }),
6019
- i.query && /* @__PURE__ */ a(z.Item, { label: "Query", children: /* @__PURE__ */ a(Re, { code: !0, children: i.query }) }),
6020
- /* @__PURE__ */ a(z.Item, { label: "Headers", children: Object.keys(i.headers || {}).length === 0 ? /* @__PURE__ */ a(Re, { type: "secondary", children: "(无)" }) : /* @__PURE__ */ a("div", { children: Object.entries(i.headers).map(([L, R]) => /* @__PURE__ */ p("div", { children: [
6021
- /* @__PURE__ */ p(Re, { strong: !0, children: [
6017
+ /* @__PURE__ */ a(z.Item, { label: "URL", children: /* @__PURE__ */ a(Ee, { code: !0, copyable: !0, children: i.url }) }),
6018
+ /* @__PURE__ */ a(z.Item, { label: "Path", children: /* @__PURE__ */ a(Ee, { code: !0, children: i.path }) }),
6019
+ i.query && /* @__PURE__ */ a(z.Item, { label: "Query", children: /* @__PURE__ */ a(Ee, { code: !0, children: i.query }) }),
6020
+ /* @__PURE__ */ a(z.Item, { label: "Headers", children: Object.keys(i.headers || {}).length === 0 ? /* @__PURE__ */ a(Ee, { type: "secondary", children: "(无)" }) : /* @__PURE__ */ a("div", { children: Object.entries(i.headers).map(([L, R]) => /* @__PURE__ */ p("div", { children: [
6021
+ /* @__PURE__ */ p(Ee, { strong: !0, children: [
6022
6022
  L,
6023
6023
  ":"
6024
6024
  ] }),
6025
6025
  " ",
6026
- /* @__PURE__ */ a(Re, { code: !0, children: R })
6026
+ /* @__PURE__ */ a(Ee, { code: !0, children: R })
6027
6027
  ] }, L)) }) }),
6028
6028
  i.body && /* @__PURE__ */ a(z.Item, { label: "Body", children: /* @__PURE__ */ a("pre", { style: {
6029
6029
  background: "#f5f5f5",
@@ -6235,7 +6235,7 @@ function Il({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6235
6235
  }
6236
6236
  ];
6237
6237
  return /* @__PURE__ */ p(
6238
- Ne,
6238
+ je,
6239
6239
  {
6240
6240
  title: /* @__PURE__ */ p(U, { children: [
6241
6241
  /* @__PURE__ */ a(cn, {}),
@@ -6411,7 +6411,7 @@ function ho() {
6411
6411
  _();
6412
6412
  }, []);
6413
6413
  const x = (I) => {
6414
- Ne.confirm({
6414
+ je.confirm({
6415
6415
  title: "确认删除",
6416
6416
  icon: /* @__PURE__ */ a(zr, {}),
6417
6417
  content: `确定要删除订阅 "${I.name}" 吗? 运行历史会保留.`,
@@ -6439,7 +6439,7 @@ function ho() {
6439
6439
  v.error("停用失败: " + ((w == null ? void 0 : w.message) || ""));
6440
6440
  }
6441
6441
  }, k = async (I) => {
6442
- Ne.confirm({
6442
+ je.confirm({
6443
6443
  title: "手动触发",
6444
6444
  content: `将立即执行一次 "${I.name}" 的抽取, 同步返回 runId.`,
6445
6445
  onOk: async () => {
@@ -6483,7 +6483,7 @@ function ho() {
6483
6483
  };
6484
6484
  return /* @__PURE__ */ p("div", { children: [
6485
6485
  /* @__PURE__ */ a(
6486
- Ue,
6486
+ Ne,
6487
6487
  {
6488
6488
  title: "订阅中心 - 数据源订阅",
6489
6489
  subtitle: "负责把三方 / 内部 / RSS 等数据源按 Cron 定时抽取, 归一化后落到本地"
@@ -6558,7 +6558,7 @@ function ho() {
6558
6558
  width: 110,
6559
6559
  render: (I, w) => {
6560
6560
  var L;
6561
- return I ? /* @__PURE__ */ a(Oe, { title: w.lastError || "", children: /* @__PURE__ */ a(E, { color: ((L = zn[I]) == null ? void 0 : L.color) || "default", children: I }) }) : /* @__PURE__ */ a("span", { style: { color: "#ccc" }, children: "-" });
6561
+ return I ? /* @__PURE__ */ a(Re, { title: w.lastError || "", children: /* @__PURE__ */ a(E, { color: ((L = zn[I]) == null ? void 0 : L.color) || "default", children: I }) }) : /* @__PURE__ */ a("span", { style: { color: "#ccc" }, children: "-" });
6562
6562
  }
6563
6563
  },
6564
6564
  {
@@ -6931,7 +6931,7 @@ function Ln() {
6931
6931
  };
6932
6932
  return /* @__PURE__ */ p("div", { style: { padding: 24 }, children: [
6933
6933
  /* @__PURE__ */ a(
6934
- Ue,
6934
+ Ne,
6935
6935
  {
6936
6936
  title: n ? `编辑订阅 #${e}` : "新建订阅",
6937
6937
  subtitle: "配置数据源、抽取器、鉴权与调度策略",
@@ -7137,7 +7137,7 @@ function wo() {
7137
7137
  }, _ = s.reduce((A, k) => A + (k.successCount || 0), 0), x = s.reduce((A, k) => A + (k.deadLetterCount || 0), 0), S = s.reduce((A, k) => A + (k.duplicateCount || 0), 0);
7138
7138
  return /* @__PURE__ */ p("div", { children: [
7139
7139
  /* @__PURE__ */ a(
7140
- Ue,
7140
+ Ne,
7141
7141
  {
7142
7142
  title: "订阅中心 - 运行历史",
7143
7143
  subtitle: "查看各订阅的抽取运行记录与统计"
@@ -7316,7 +7316,7 @@ function ko() {
7316
7316
  };
7317
7317
  return /* @__PURE__ */ p("div", { children: [
7318
7318
  /* @__PURE__ */ a(
7319
- Ue,
7319
+ Ne,
7320
7320
  {
7321
7321
  title: "项目中心",
7322
7322
  subtitle: "管理由 CEO 立项的项目与 Agent 对话上下文",
@@ -7818,7 +7818,7 @@ function xo() {
7818
7818
  const Al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7819
7819
  __proto__: null,
7820
7820
  default: xo
7821
- }, Symbol.toStringTag, { value: "Module" })), vo = "# 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-OPC 一人公司基建', 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";
7821
+ }, Symbol.toStringTag, { value: "Module" })), vo = "# 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/` 下共 **14 个域目录**:`admin` / `agenthub-digital-brain-test` / `change-log` / `chatdemo` /\n`docs` / `download` / `embed` / `login` / `note` / `phone` / `portal` / `scenario` / `welcome` / `workspace`。\n其中 `agenthub-digital-brain-test` / `download` / `login` / `note` **没有** `ZTeamApp` 顶层分支,\n由域内路由或别的入口进入。\n\n> **2026-11-07:`rpa` 域目录已删除(RPA 入口整体下线)。** RPA 是脚本中心(z-script)的产品皮,\n> 前端 tab / `/rpa/*` 路由 / 页面全部移除,执行能力留在脚本中心继续增强;老链接 `/rpa/*` 由主壳重定向到 `/workspace`。\n\n### 1.3 工作台模式切换(`src/zteam/pages/workspace/utils/chatMode.ts`)\n\n`ChatMode` 共 12 种:`personal` / `collaboration` / `smart` / `product` / `dev` / `test` / `ops` / `admin` /\n`system` / `life` / `training` / `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| 其余模式 | `/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-OPC 一人公司基建', 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";
7822
7822
  function $l() {
7823
7823
  return /* @__PURE__ */ a(Kr, { markdown: vo, title: "组件文档 — Z-OPC 一人公司基建" });
7824
7824
  }