@yuku123/z-team-component 0.2.39 → 0.2.41

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.
@@ -4,13 +4,13 @@ import { useLocation as kt, useNavigate as xe, useParams as ot, Routes as ct, Ro
4
4
  import { Row as Y, Col as O, Typography as ae, Alert as Z, Card as L, Space as E, Button as A, Table as Q, Drawer as we, Descriptions as z, Tag as w, Tooltip as he, message as b, Modal as me, Statistic as K, Input as B, Select as V, Tabs as ke, Form as P, Upload as St, Popconfirm as Ue, Spin as _e, Radio as ne, InputNumber as Re, Empty as Tt } from "antd";
5
5
  import { SettingOutlined as Ct, ProjectOutlined as Pe, UserOutlined as ut, AuditOutlined as De, RobotOutlined as $e, ApiOutlined as qe, AppstoreOutlined as vt, ThunderboltOutlined as be, BarChartOutlined as At, ScheduleOutlined as _t, FileTextOutlined as Ke, ReloadOutlined as ee, ExperimentOutlined as Pt, PlayCircleOutlined as Ee, CopyOutlined as pt, GlobalOutlined as ht, NodeIndexOutlined as Et, UndoOutlined as zt, FileSearchOutlined as Rt, VideoCameraOutlined as Je, SearchOutlined as mt, EyeOutlined as Ot, CodeOutlined as fe, InfoCircleOutlined as Lt, FunctionOutlined as Se, ImportOutlined as Ne, CloudUploadOutlined as Ve, FileAddOutlined as Mt, PlusOutlined as yt, EditOutlined as Dt, PauseCircleOutlined as $t, CheckCircleOutlined as Fe, DeleteOutlined as Nt, ExclamationCircleOutlined as Bt, SaveOutlined as gt, ArrowLeftOutlined as ft, SendOutlined as jt } from "@ant-design/icons";
6
6
  import "@yuku123/z-frontend-common";
7
- import { PageHeader as ye, GradientStatCard as Te, SectionHeader as Ut, FeatureCard as qt, DarkBanner as Kt, ListTable as se, TableToolbar as Ft, ErrorState as Gt, ComponentDoc as Ht } from "@yuku123/z-frontend-common/ui";
8
- import Ge from "axios";
7
+ import { PageHeader as ye, GradientStatCard as Te, SectionHeader as Ut, FeatureCard as qt, DarkBanner as Kt, ListTable as se, TableToolbar as Ft, ErrorState as Ht, ComponentDoc as Gt } from "@yuku123/z-frontend-common/ui";
8
+ import He from "axios";
9
9
  const X = (t) => {
10
10
  const i = xt(t);
11
11
  return (r) => /* @__PURE__ */ e(wt, { fallback: null, children: /* @__PURE__ */ e(i, { ...r }) });
12
- }, oe = X(() => import("./index-UxjTZ5Ta.js").then((t) => t.I)), Zt = X(() => import("./index-7nSly-MA.js")), Jt = X(() => import("./index-BX1Wd9x9.js")), Vt = X(() => import("./index-ClA0896K.js")), Wt = X(() => import("./index-qK6pyAGy.js")), Xt = X(() => import("./index-Bdu31aRV.js"));
13
- X(() => import("./index-CR3sbzOU.js"));
12
+ }, oe = X(() => import("./index-D-xqQriS.js").then((t) => t.H)), Zt = X(() => import("./index-7nSly-MA.js")), Jt = X(() => import("./index-BX1Wd9x9.js")), Vt = X(() => import("./index-ClA0896K.js")), Wt = X(() => import("./index-qK6pyAGy.js")), Xt = X(() => import("./index-Bdu31aRV.js"));
13
+ X(() => import("./index-DyJp2kSb.js"));
14
14
  const Yt = X(() => import("./index-C815hPWS.js")), Qt = X(() => import("./index-UsGqMo11.js")), en = X(() => import("./index-BkX0I2aB.js")), tn = X(() => import("./index-D9AqC2O-.js")), nn = X(() => import("./index-DpcrvKsK.js")), rn = X(() => import("./index-DFY3lzq0.js"));
15
15
  function Qn({ forcedMode: t }) {
16
16
  const { pathname: i } = kt(), r = i.replace(/\/+$/, "") || "/";
@@ -79,7 +79,7 @@ function dn(t, i = {}) {
79
79
  t.interceptors.request.use((l) => {
80
80
  const y = localStorage.getItem(r);
81
81
  if (y && ln(y))
82
- return Xe(`请求前检测到 token 已过期 (${l.url || ""})`), Promise.reject(new Ge.CanceledError("token expired"));
82
+ return Xe(`请求前检测到 token 已过期 (${l.url || ""})`), Promise.reject(new He.CanceledError("token expired"));
83
83
  try {
84
84
  const c = localStorage.getItem(S);
85
85
  if (c) {
@@ -101,8 +101,8 @@ function dn(t, i = {}) {
101
101
  }
102
102
  );
103
103
  }
104
- function He(t = {}) {
105
- const i = Ge.create({
104
+ function Ge(t = {}) {
105
+ const i = He.create({
106
106
  baseURL: t.baseURL ?? "/api",
107
107
  timeout: t.timeout ?? 1e4,
108
108
  withCredentials: !0
@@ -113,7 +113,7 @@ function He(t = {}) {
113
113
  userInfoKey: t.userInfoKey
114
114
  }), i;
115
115
  }
116
- const $ = He(), er = He(), Ce = He({ 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, un = [
116
+ const $ = Ge(), er = 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, un = [
117
117
  {
118
118
  key: "ai",
119
119
  color: "violet",
@@ -341,39 +341,39 @@ const $ = He(), er = He(), Ce = He({ baseURL: "/api", timeout: 1e4 }), ve = (t)
341
341
  };
342
342
  let pn = "/api";
343
343
  function bt() {
344
- return Ge.create({ baseURL: pn, timeout: 15e3, withCredentials: !0 });
344
+ return He.create({ baseURL: pn, timeout: 15e3, withCredentials: !0 });
345
345
  }
346
346
  const Ie = bt(), hn = bt();
347
347
  hn.interceptors.request.use((t) => t);
348
348
  Ie.interceptors.request.use((t) => t);
349
- const ze = "/mock-platform", H = (t, i) => Ie.get(`${ze}${t}`, { params: i }).then((r) => r.data), q = (t, i, r) => Ie.post(`${ze}${t}`, i, { params: r }).then((S) => S.data), Ae = (t, i, r) => Ie.put(`${ze}${t}`, i, { params: r }).then((S) => S.data), ce = (t, i) => Ie.delete(`${ze}${t}`, { params: i }).then((r) => r.data), j = {
350
- stats: () => H("/stats"),
349
+ const ze = "/mock-platform", G = (t, i) => Ie.get(`${ze}${t}`, { params: i }).then((r) => r.data), q = (t, i, r) => Ie.post(`${ze}${t}`, i, { params: r }).then((S) => S.data), Ae = (t, i, r) => Ie.put(`${ze}${t}`, i, { params: r }).then((S) => S.data), ce = (t, i) => Ie.delete(`${ze}${t}`, { params: i }).then((r) => r.data), j = {
350
+ stats: () => G("/stats"),
351
351
  environments: {
352
- list: () => H("/environments/list"),
352
+ list: () => G("/environments/list"),
353
353
  create: (t) => q("/environments", t),
354
354
  update: (t, i) => Ae("/environments", i, { envCode: t }),
355
355
  delete: (t) => ce("/environments", { envCode: t })
356
356
  },
357
357
  endpoints: {
358
- list: (t, i, r) => H("/endpoints/list", { envCode: t, scenarioCode: i, status: r }),
359
- get: (t) => H("/endpoints/byCode", { mockCode: t }),
358
+ list: (t, i, r) => G("/endpoints/list", { envCode: t, scenarioCode: i, status: r }),
359
+ get: (t) => G("/endpoints/byCode", { mockCode: t }),
360
360
  create: (t) => q("/endpoints", t),
361
361
  update: (t, i) => Ae("/endpoints", i, { mockCode: t }),
362
362
  delete: (t) => ce("/endpoints", { mockCode: t }),
363
363
  toggle: (t, i) => q("/endpoints/toggle", null, { mockCode: t, status: i })
364
364
  },
365
365
  scenarios: {
366
- list: () => H("/scenarios/list"),
367
- get: (t) => H("/scenarios/byCode", { scenarioCode: t }),
366
+ list: () => G("/scenarios/list"),
367
+ get: (t) => G("/scenarios/byCode", { scenarioCode: t }),
368
368
  create: (t) => q("/scenarios", t),
369
369
  update: (t, i) => Ae("/scenarios", i, { scenarioCode: t }),
370
370
  delete: (t) => ce("/scenarios", { scenarioCode: t }),
371
371
  reset: (t) => q("/scenarios/reset", null, { scenarioCode: t }),
372
- instances: (t) => H("/scenarios/instances", { scenarioCode: t })
372
+ instances: (t) => G("/scenarios/instances", { scenarioCode: t })
373
373
  },
374
374
  cases: {
375
- list: () => H("/cases/list"),
376
- get: (t) => H("/cases/byCode", { caseCode: t }),
375
+ list: () => G("/cases/list"),
376
+ get: (t) => G("/cases/byCode", { caseCode: t }),
377
377
  create: (t) => q("/cases", t),
378
378
  update: (t, i) => Ae("/cases", i, { caseCode: t }),
379
379
  delete: (t) => ce("/cases", { caseCode: t }),
@@ -381,9 +381,9 @@ const ze = "/mock-platform", H = (t, i) => Ie.get(`${ze}${t}`, { params: i }).th
381
381
  runBatch: (t) => q("/cases/run-batch", { caseCodes: t })
382
382
  },
383
383
  recordings: {
384
- list: () => H("/recordings/list"),
385
- get: (t) => H("/recordings/byCode", { recordingCode: t }),
386
- requests: (t) => H("/recordings/requests", { recordingCode: t }),
384
+ list: () => G("/recordings/list"),
385
+ get: (t) => G("/recordings/byCode", { recordingCode: t }),
386
+ requests: (t) => G("/recordings/requests", { recordingCode: t }),
387
387
  start: (t, i, r) => q("/recordings/start", {
388
388
  recordingCode: t,
389
389
  recordingName: i,
@@ -396,8 +396,8 @@ const ze = "/mock-platform", H = (t, i) => Ie.get(`${ze}${t}`, { params: i }).th
396
396
  delete: (t) => ce("/recordings", { recordingCode: t })
397
397
  },
398
398
  requestLogs: {
399
- list: (t) => H("/request-logs/list", t),
400
- stats: () => H("/request-logs/stats"),
399
+ list: (t) => G("/request-logs/list", t),
400
+ stats: () => G("/request-logs/stats"),
401
401
  clear: (t) => ce("/request-logs/clear", { limit: t })
402
402
  },
403
403
  curl: {
@@ -409,7 +409,7 @@ const ze = "/mock-platform", H = (t, i) => Ie.get(`${ze}${t}`, { params: i }).th
409
409
  openapi: {
410
410
  parse: (t) => q("/openapi/parse", { content: t }),
411
411
  importBatch: (t) => q("/openapi/import-batch", t),
412
- sample: (t) => H("/openapi/sample", { format: t })
412
+ sample: (t) => G("/openapi/sample", { format: t })
413
413
  }
414
414
  }, { Text: le, Paragraph: mn } = ae, Ye = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
415
415
  function Be({ activeEnvCode: t }) {
@@ -1908,7 +1908,7 @@ function lr({ open: t, onClose: i, onSuccess: r, envOptions: S = [] }) {
1908
1908
  } catch (U) {
1909
1909
  C(String((U == null ? void 0 : U.message) || U));
1910
1910
  }
1911
- }, G = async () => {
1911
+ }, H = async () => {
1912
1912
  if (!l.trim()) {
1913
1913
  b.warning("请先粘贴 curl 命令");
1914
1914
  return;
@@ -2003,7 +2003,7 @@ function lr({ open: t, onClose: i, onSuccess: r, envOptions: S = [] }) {
2003
2003
  ),
2004
2004
  /* @__PURE__ */ n(E, { style: { marginTop: 12 }, children: [
2005
2005
  /* @__PURE__ */ e(A, { icon: /* @__PURE__ */ e(Ke, {}), onClick: J, type: "primary", ghost: !0, children: "解析" }),
2006
- /* @__PURE__ */ e(A, { icon: /* @__PURE__ */ e(be, {}), onClick: G, loading: _, children: "直接执行(试跑)" })
2006
+ /* @__PURE__ */ e(A, { icon: /* @__PURE__ */ e(be, {}), onClick: H, loading: _, children: "直接执行(试跑)" })
2007
2007
  ] }),
2008
2008
  x && /* @__PURE__ */ e(Z, { type: "error", showIcon: !0, style: { marginTop: 12 }, title: "解析失败", description: x }),
2009
2009
  c && /* @__PURE__ */ e(L, { size: "small", style: { marginTop: 16 }, title: "解析结果", children: /* @__PURE__ */ n(z, { column: 1, size: "small", bordered: !0, children: [
@@ -2153,7 +2153,7 @@ function sr({ open: t, onClose: i, onSuccess: r, envOptions: S = [] }) {
2153
2153
  } finally {
2154
2154
  d(!1);
2155
2155
  }
2156
- }, G = async (k) => {
2156
+ }, H = async (k) => {
2157
2157
  try {
2158
2158
  const N = await j.openapi.sample(k);
2159
2159
  N.success && (f(N.content), b.success(`已加载 ${N.format} 示例`));
@@ -2265,9 +2265,9 @@ function sr({ open: t, onClose: i, onSuccess: r, envOptions: S = [] }) {
2265
2265
  }
2266
2266
  ),
2267
2267
  /* @__PURE__ */ n(E, { style: { marginTop: 8 }, children: [
2268
- /* @__PURE__ */ e(A, { size: "small", onClick: () => G("openapi3"), children: "加载 OpenAPI 3 示例" }),
2269
- /* @__PURE__ */ e(A, { size: "small", onClick: () => G("swagger2"), children: "加载 Swagger 2 示例" }),
2270
- /* @__PURE__ */ e(A, { size: "small", onClick: () => G("postman"), children: "加载 Postman 示例" })
2268
+ /* @__PURE__ */ e(A, { size: "small", onClick: () => H("openapi3"), children: "加载 OpenAPI 3 示例" }),
2269
+ /* @__PURE__ */ e(A, { size: "small", onClick: () => H("swagger2"), children: "加载 Swagger 2 示例" }),
2270
+ /* @__PURE__ */ e(A, { size: "small", onClick: () => H("postman"), children: "加载 Postman 示例" })
2271
2271
  ] })
2272
2272
  ] })
2273
2273
  },
@@ -3317,7 +3317,7 @@ function Nn() {
3317
3317
  breadcrumb: [{ label: "项目中心" }]
3318
3318
  }
3319
3319
  ),
3320
- f && !y && /* @__PURE__ */ e("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(Gt, { error: f, onRetry: C }) }),
3320
+ f && !y && /* @__PURE__ */ e("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e(Ht, { error: f, onRetry: C }) }),
3321
3321
  /* @__PURE__ */ n("div", { style: {
3322
3322
  background: "#ffffff",
3323
3323
  borderRadius: 16,
@@ -3455,7 +3455,7 @@ function jn() {
3455
3455
  _([]);
3456
3456
  return;
3457
3457
  }
3458
- const G = J[0], p = await $.get(`/subscribe/run/${G.id}/items?limit=100`), o = (p == null ? void 0 : p.data) ?? p ?? [];
3458
+ const H = J[0], p = await $.get(`/subscribe/run/${H.id}/items?limit=100`), o = (p == null ? void 0 : p.data) ?? p ?? [];
3459
3459
  _(Array.isArray(o) ? o : []);
3460
3460
  } catch {
3461
3461
  b.error("加载抽取项失败");
@@ -3490,12 +3490,12 @@ function jn() {
3490
3490
  const M = {
3491
3491
  ...I,
3492
3492
  sourceItemIds: y === "from-subscribe" ? d.map(String) : null
3493
- }, J = y === "from-subscribe" ? "/project/create-from-items" : "/project/create-manual", G = await $.post(J, M);
3494
- if (G && G.success !== !1) {
3495
- const p = G.data ?? G;
3493
+ }, J = y === "from-subscribe" ? "/project/create-from-items" : "/project/create-manual", H = await $.post(J, M);
3494
+ if (H && H.success !== !1) {
3495
+ const p = H.data ?? H;
3496
3496
  b.success("立项成功"), t(`/project/${p.id}`);
3497
3497
  } else
3498
- b.error((G == null ? void 0 : G.message) || "立项失败");
3498
+ b.error((H == null ? void 0 : H.message) || "立项失败");
3499
3499
  } catch (I) {
3500
3500
  I != null && I.errorFields || b.error("立项失败: " + ((I == null ? void 0 : I.message) || ""));
3501
3501
  } finally {
@@ -3814,7 +3814,7 @@ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3814
3814
  default: Kn
3815
3815
  }, Symbol.toStringTag, { value: "Module" })), Fn = "# 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";
3816
3816
  function cr() {
3817
- return /* @__PURE__ */ e(Ht, { markdown: Fn, title: "组件文档 — z-team" });
3817
+ return /* @__PURE__ */ e(Gt, { markdown: Fn, title: "组件文档 — z-team" });
3818
3818
  }
3819
3819
  export {
3820
3820
  cr as C,
@@ -3833,7 +3833,7 @@ export {
3833
3833
  tr as e,
3834
3834
  In as f,
3835
3835
  fn as g,
3836
- He as h,
3836
+ Ge as h,
3837
3837
  ln as i,
3838
3838
  nr as j,
3839
3839
  ir as k,
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e, Fragment as A } from "react/jsx-runtime";
2
2
  import { useState as o, useEffect as oe } from "react";
3
3
  import { Form as m, message as l, Button as d, Input as B, Row as ae, Col as z, Card as v, Statistic as O, Alert as T, Space as p, Typography as se, Tabs as de, Popconfirm as F, Tag as h, Tooltip as ce, Modal as he, Radio as S, Select as w, InputNumber as ue } from "antd";
4
4
  import { PlusOutlined as me, ClockCircleOutlined as _, CheckCircleOutlined as $, LinkOutlined as D, CopyOutlined as b, QrcodeOutlined as U, UserDeleteOutlined as K, TeamOutlined as pe, MailOutlined as j, DeleteOutlined as ye, UserAddOutlined as q, CloseCircleOutlined as N } from "@ant-design/icons";
5
- import { l as fe, b as ge, g as ve, c as we, d as be, e as Ce, f as xe } from "./api-DdtPixqz.js";
5
+ import { l as fe, b as ge, g as ve, c as we, d as be, e as Ce, f as xe } from "./api-CBB4Fa8N.js";
6
6
  import { PageHeader as Ie, TableToolbar as ke, ListTable as W } from "@yuku123/z-frontend-common/ui";
7
7
  const { Text: c } = se, Me = () => {
8
8
  const [C] = m.useForm(), [M, P] = o(!1), [y, G] = o([]), [L, H] = o([]), [J, Q] = o(null), [u, V] = o(""), [X, x] = o(!1), [Y, R] = o(!1), [a, E] = o(null), [r, Z] = o(localStorage.getItem("userInfo") && JSON.parse(localStorage.getItem("userInfo") || "{}").tenantCode || "");
@@ -3,8 +3,8 @@ import { useState as a, useMemo as oe, useEffect as W } from "react";
3
3
  import { useNavigate as le, useSearchParams as se } from "react-router-dom";
4
4
  import { Form as c, message as o, Spin as ce, Typography as de, Card as d, Tag as x, Empty as me, Row as he, Col as fe, Space as S, Avatar as ge, Pagination as pe, Button as T, Result as ue, Modal as E, Input as k, Alert as U } from "antd";
5
5
  import { RocketOutlined as q, ApartmentOutlined as ye, CheckCircleOutlined as Ce, PlusOutlined as z, KeyOutlined as m, GiftOutlined as ve, HomeOutlined as we, CrownOutlined as be } from "@ant-design/icons";
6
- import { g as xe, a as Se, s as Te, r as ke } from "./api-DdtPixqz.js";
7
- import { a as ze } from "./ComponentDoc-DZqGPFBm.js";
6
+ import { g as xe, a as Se, s as Te, r as ke } from "./api-CBB4Fa8N.js";
7
+ import { a as ze } from "./ComponentDoc-BztX6VlY.js";
8
8
  const { Title: u, Text: O, Paragraph: Oe } = de, y = 12, Me = () => {
9
9
  const L = le(), [H] = se(), [_, I] = a(!0), [i, $] = a(null), [l, G] = a([]), [A, F] = a(0), [h, B] = a(""), [C, K] = a(1), X = oe(() => {
10
10
  const e = (C - 1) * y;
@@ -456,7 +456,7 @@ const He = "_shell_10jrt_6", je = "_main_10jrt_21", qe = "_empty_10jrt_31", Ee =
456
456
  empty: qe,
457
457
  emptyIcon: Ee,
458
458
  emptyText: Re
459
- }, t = (c, s) => u(() => c().then((i) => ({ default: i[s] }))), $e = t(() => import("@yuku123/z-ctc-component"), "AccountManagement"), Be = t(() => import("@yuku123/z-ctc-component"), "ApplicationManagement"), We = t(() => import("@yuku123/z-ctc-component"), "AuditPage"), Ue = t(() => import("@yuku123/z-ctc-component"), "CtcOverview"), Fe = t(() => import("@yuku123/z-ctc-component"), "DictPage"), Ke = t(() => import("@yuku123/z-ctc-component"), "OrgPage"), Qe = t(() => import("@yuku123/z-ctc-component"), "PermissionManagement"), Ze = t(() => import("@yuku123/z-ctc-component"), "RoleManagement"), j = t(() => import("@yuku123/z-ctc-component"), "SurlManagement"), Ve = t(() => import("@yuku123/z-ctc-component"), "TenantManagement"), Ye = t(() => import("@yuku123/z-agent-component"), "AgentAppList"), Je = t(() => import("@yuku123/z-agent-component"), "AgentDashboard"), Xe = t(() => import("@yuku123/z-agent-component"), "AkManage"), et = t(() => import("@yuku123/z-agent-component"), "BucketList"), tt = t(() => import("@yuku123/z-agent-component"), "LlmManage"), nt = t(() => import("@yuku123/z-agent-component"), "McpPage"), at = t(() => import("@yuku123/z-agent-component"), "ObjectBrowser"), ot = t(() => import("@yuku123/z-agent-component"), "ScriptCenterPage"), ct = t(() => import("@yuku123/z-agent-component"), "ScriptProductizationPage"), lt = t(() => import("@yuku123/z-agent-component"), "SkillMarket"), st = t(() => import("./index-B-1fesc_.js"), "AgentTeamIM"), q = t(() => import("./index-B-1fesc_.js"), "DebugPlayground"), pt = t(() => import("./index-B-1fesc_.js"), "Overview"), E = t(() => import("./index-B-1fesc_.js"), "Webide"), it = u(() => import("./OnboardingPage-BECBj2le.js")), rt = u(() => import("./InvitationManagementPage-BXjItYGY.js")), mt = t(() => import("@yuku123/z-config-component"), "ConfigApp"), ut = t(() => import("@yuku123/z-task-component"), "TaskApp"), dt = t(() => import("@yuku123/z-wf-component"), "WorkflowApp"), ht = t(() => import("@yuku123/z-schedule-component"), "ScheduleApp"), bt = t(() => import("@yuku123/z-mist-component"), "MistApp"), gt = t(() => import("@yuku123/z-meta-component"), "MetaApp"), _t = t(() => import("@yuku123/z-msg-component"), "MsgApp"), kt = t(() => import("@yuku123/z-rpc-component"), "RpcApp"), yt = u(() => import("./ComponentDoc-DZqGPFBm.js").then((c) => c.k)), St = u(() => import("./ComponentDoc-DZqGPFBm.js").then((c) => c.l)), At = t(() => import("@yuku123/z-config-component"), "ComponentDocPage"), wt = t(() => import("@yuku123/z-task-component"), "ComponentDocPage"), vt = t(() => import("@yuku123/z-wf-component"), "ComponentDocPage"), Dt = t(() => import("@yuku123/z-schedule-component"), "ComponentDocPage"), Pt = t(() => import("@yuku123/z-mist-component"), "ComponentDocPage"), ft = t(() => import("@yuku123/z-meta-component"), "ComponentDocPage"), Ct = t(() => import("@yuku123/z-msg-component"), "ComponentDocPage"), Gt = t(() => import("@yuku123/z-rpc-component"), "ComponentDocPage"), It = t(() => import("@yuku123/z-kb-component"), "ComponentDocPage"), Mt = t(() => import("@yuku123/z-product-component"), "ComponentDocPage"), Ot = t(() => import("@yuku123/z-oss-component"), "ComponentDocPage"), Nt = t(() => import("@yuku123/z-vector-component"), "ComponentDocPage"), Lt = t(() => import("@yuku123/z-graph-component"), "ComponentDocPage"), zt = t(() => import("@yuku123/z-gw-component"), "ComponentDocPage"), Tt = t(() => import("@yuku123/z-cache-component"), "ComponentDocPage"), xt = t(() => import("@yuku123/z-mq-component"), "ComponentDocPage"), Ht = t(() => import("@yuku123/z-ctc-component"), "ComponentDocPage"), jt = t(() => import("@yuku123/z-agent-component"), "ComponentDocPage"), qt = t(() => import("@yuku123/z-lc-component"), "ComponentDocPage"), Et = t(() => import("@yuku123/z-qa-component"), "ComponentDocPage"), Rt = u(() => import("./ComponentDoc-DZqGPFBm.js").then((c) => c.j)), R = u(() => import("@yuku123/z-qa-component"));
459
+ }, t = (c, s) => u(() => c().then((i) => ({ default: i[s] }))), $e = t(() => import("@yuku123/z-ctc-component"), "AccountManagement"), Be = t(() => import("@yuku123/z-ctc-component"), "ApplicationManagement"), We = t(() => import("@yuku123/z-ctc-component"), "AuditPage"), Ue = t(() => import("@yuku123/z-ctc-component"), "CtcOverview"), Fe = t(() => import("@yuku123/z-ctc-component"), "DictPage"), Ke = t(() => import("@yuku123/z-ctc-component"), "OrgPage"), Qe = t(() => import("@yuku123/z-ctc-component"), "PermissionManagement"), Ze = t(() => import("@yuku123/z-ctc-component"), "RoleManagement"), j = t(() => import("@yuku123/z-ctc-component"), "SurlManagement"), Ve = t(() => import("@yuku123/z-ctc-component"), "TenantManagement"), Ye = t(() => import("@yuku123/z-agent-component"), "AgentAppList"), Je = t(() => import("@yuku123/z-agent-component"), "AgentDashboard"), Xe = t(() => import("@yuku123/z-agent-component"), "AkManage"), et = t(() => import("@yuku123/z-agent-component"), "BucketList"), tt = t(() => import("@yuku123/z-agent-component"), "LlmManage"), nt = t(() => import("@yuku123/z-agent-component"), "McpPage"), at = t(() => import("@yuku123/z-agent-component"), "ObjectBrowser"), ot = t(() => import("@yuku123/z-agent-component"), "ScriptCenterPage"), ct = t(() => import("@yuku123/z-agent-component"), "ScriptProductizationPage"), lt = t(() => import("@yuku123/z-agent-component"), "SkillMarket"), st = t(() => import("./index-D-wT2z-O.js"), "AgentTeamIM"), q = t(() => import("./index-D-wT2z-O.js"), "DebugPlayground"), pt = t(() => import("./index-D-wT2z-O.js"), "Overview"), E = t(() => import("./index-D-wT2z-O.js"), "Webide"), it = u(() => import("./OnboardingPage-b3GCxnH7.js")), rt = u(() => import("./InvitationManagementPage-Bs9EVx4Z.js")), mt = t(() => import("@yuku123/z-config-component"), "ConfigApp"), ut = t(() => import("@yuku123/z-task-component"), "TaskApp"), dt = t(() => import("@yuku123/z-wf-component"), "WorkflowApp"), ht = t(() => import("@yuku123/z-schedule-component"), "ScheduleApp"), bt = t(() => import("@yuku123/z-mist-component"), "MistApp"), gt = t(() => import("@yuku123/z-meta-component"), "MetaApp"), _t = t(() => import("@yuku123/z-msg-component"), "MsgApp"), kt = t(() => import("@yuku123/z-rpc-component"), "RpcApp"), yt = u(() => import("./ComponentDoc-BztX6VlY.js").then((c) => c.k)), St = u(() => import("./ComponentDoc-BztX6VlY.js").then((c) => c.l)), At = t(() => import("@yuku123/z-config-component"), "ComponentDocPage"), wt = t(() => import("@yuku123/z-task-component"), "ComponentDocPage"), vt = t(() => import("@yuku123/z-wf-component"), "ComponentDocPage"), Dt = t(() => import("@yuku123/z-schedule-component"), "ComponentDocPage"), Pt = t(() => import("@yuku123/z-mist-component"), "ComponentDocPage"), ft = t(() => import("@yuku123/z-meta-component"), "ComponentDocPage"), Ct = t(() => import("@yuku123/z-msg-component"), "ComponentDocPage"), Gt = t(() => import("@yuku123/z-rpc-component"), "ComponentDocPage"), It = t(() => import("@yuku123/z-kb-component"), "ComponentDocPage"), Mt = t(() => import("@yuku123/z-product-component"), "ComponentDocPage"), Ot = t(() => import("@yuku123/z-oss-component"), "ComponentDocPage"), Nt = t(() => import("@yuku123/z-vector-component"), "ComponentDocPage"), Lt = t(() => import("@yuku123/z-graph-component"), "ComponentDocPage"), zt = t(() => import("@yuku123/z-gw-component"), "ComponentDocPage"), Tt = t(() => import("@yuku123/z-cache-component"), "ComponentDocPage"), xt = t(() => import("@yuku123/z-mq-component"), "ComponentDocPage"), Ht = t(() => import("@yuku123/z-ctc-component"), "ComponentDocPage"), jt = t(() => import("@yuku123/z-agent-component"), "ComponentDocPage"), qt = t(() => import("@yuku123/z-lc-component"), "ComponentDocPage"), Et = t(() => import("@yuku123/z-qa-component"), "ComponentDocPage"), Rt = u(() => import("./ComponentDoc-BztX6VlY.js").then((c) => c.j)), R = u(() => import("@yuku123/z-qa-component"));
460
460
  function $t() {
461
461
  return /* @__PURE__ */ p("div", { className: h.empty, children: [
462
462
  /* @__PURE__ */ e("div", { className: h.emptyIcon, children: "📋" }),
@@ -1,5 +1,5 @@
1
1
  import "@yuku123/z-frontend-common";
2
- import { a } from "./ComponentDoc-DZqGPFBm.js";
2
+ import { a } from "./ComponentDoc-BztX6VlY.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "antd";
@@ -7,7 +7,7 @@ import { message as U, Input as H, Tooltip as se, Button as g, Spin as ce, Empty
7
7
  import ve from "react-markdown";
8
8
  import _e from "rehype-highlight";
9
9
  import ge from "remark-gfm";
10
- import { M as oa } from "./index-BIPAVfbP.js";
10
+ import { M as oa } from "./index-ClibxgPN.js";
11
11
  function j(a) {
12
12
  return a ? `?token=${encodeURIComponent(a)}` : "";
13
13
  }