From 6d63e9fefff65cfe337778cad781a64e512b8844 Mon Sep 17 00:00:00 2001 From: Fiona Date: Thu, 6 Aug 2026 00:44:49 -0700 Subject: [PATCH 1/3] fix(mcp): route MCP APIs through N9E_PATHNAME Agent MCP picker and OAuth consent use the same ENT/OS prefix switch. Co-authored-by: Cursor --- src/pages/aiConfig/agents/services.ts | 3 ++- src/pages/oauthConsent/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/aiConfig/agents/services.ts b/src/pages/aiConfig/agents/services.ts index 2623b11377..c10644cbb3 100644 --- a/src/pages/aiConfig/agents/services.ts +++ b/src/pages/aiConfig/agents/services.ts @@ -2,6 +2,7 @@ import _ from 'lodash'; import request from '@/utils/request'; import { RequestMethod } from '@/store/common'; +import { N9E_PATHNAME } from '@/utils/constant'; import { Item, FormValues } from './types'; @@ -40,7 +41,7 @@ export const deleteItem = function (id: number) { }; export const getMCPServers = function (): Promise<{ id: number; name: string }[]> { - return request('/api/n9e/mcp-servers', { + return request(`/api/${N9E_PATHNAME}/mcp-servers`, { method: RequestMethod.Get, }).then((res) => res.dat ?? []); }; diff --git a/src/pages/oauthConsent/index.tsx b/src/pages/oauthConsent/index.tsx index 37c6b89cd6..d694a1c29d 100644 --- a/src/pages/oauthConsent/index.tsx +++ b/src/pages/oauthConsent/index.tsx @@ -34,6 +34,7 @@ import { ApiOutlined } from '@ant-design/icons'; import request from '@/utils/request'; import { RequestMethod } from '@/store/common'; import { CommonStateContext } from '@/App'; +import { N9E_PATHNAME } from '@/utils/constant'; import { NAME_SPACE } from './constants'; @@ -102,7 +103,7 @@ export default function OAuthConsent() { const decide = (decision: 'allow' | 'deny') => { setSubmitting(decision); setError(null); - request('/api/n9e/mcp/oauth/authorize', { + request(`/api/${N9E_PATHNAME}/mcp/oauth/authorize`, { method: RequestMethod.Post, data: { req, decision }, }) From 355085ff94d5623807d0c5b72edc5765a74db90e Mon Sep 17 00:00:00 2001 From: jsers Date: Thu, 6 Aug 2026 19:54:01 +0800 Subject: [PATCH 2/3] ci: add package-only workflow and align tar packaging Add package.yml for manual packaging without release. Update release.yml to include the pub/ directory as the archive root so both workflows produce a consistent tarball structure. --- .github/workflows/package.yml | 46 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000000..2c7c5c1cfd --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,46 @@ +name: Package Only + +on: + workflow_dispatch: + inputs: + upload_artifact: + description: 'Upload the packaged tar.gz as a GitHub Actions artifact' + required: false + default: true + type: boolean + +permissions: + contents: read + +jobs: + package: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 16.15.0 + cache: npm + + - name: Install dependencies and build + run: | + npm ci + npm run build + + - name: Get version from package.json + id: pkg_version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Package files to tar.gz + run: tar -czf n9e-fe-${{ steps.pkg_version.outputs.version }}.tar.gz pub + + - name: Upload packaged artifact + if: ${{ inputs.upload_artifact }} + uses: actions/upload-artifact@v4 + with: + name: n9e-fe-${{ steps.pkg_version.outputs.version }}-tar-gz + path: n9e-fe-${{ steps.pkg_version.outputs.version }}.tar.gz + if-no-files-found: error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0839de0c64..0d7fa2f758 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Package files to tar.gz - run: tar -C pub -czf n9e-fe-${{ steps.pkg_version.outputs.version }}.tar.gz . + run: tar -czf n9e-fe-${{ steps.pkg_version.outputs.version }}.tar.gz pub - name: Upload workflow artifact uses: actions/upload-artifact@v4 From 2d94f8674a0fee33c978ae6ca4a2303aa2dfb1b4 Mon Sep 17 00:00:00 2001 From: jsers Date: Fri, 7 Aug 2026 11:21:05 +0800 Subject: [PATCH 3/3] feat(pageLayout, hosts): add headerCenter slot for ObsLoop entry Add an optional headerCenter prop to PageLayout and render the ObsLoop host entry in the hosts list, gated by IS_ENT. --- .../pageLayout/PageLayoutWithTabs/index.tsx | 19 ++++++++++++++++++- src/components/pageLayout/index.tsx | 1 + src/pages/hosts/pages/List/index.tsx | 10 +++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/pageLayout/PageLayoutWithTabs/index.tsx b/src/components/pageLayout/PageLayoutWithTabs/index.tsx index c82313e6b0..20df2f2b49 100644 --- a/src/components/pageLayout/PageLayoutWithTabs/index.tsx +++ b/src/components/pageLayout/PageLayoutWithTabs/index.tsx @@ -54,9 +54,24 @@ interface IPageLayoutProps { productDocLink?: string; tabGroup?: string; docButtonText?: string; + headerCenter?: ReactNode; } -const PageLayout: React.FC = ({ icon, title, rightArea, introIcon, children, customArea, showBack, backPath, doc, productDocLink, tabGroup, docButtonText }) => { +const PageLayout: React.FC = ({ + icon, + title, + rightArea, + introIcon, + children, + customArea, + showBack, + backPath, + doc, + productDocLink, + tabGroup, + docButtonText, + headerCenter, +}) => { const { t, i18n } = useTranslation('pageLayout'); const history = useHistory(); const location = useLocation(); @@ -128,6 +143,8 @@ const PageLayout: React.FC = ({ icon, title, rightArea, introI {shouldShowPageDocLink(doc) && } + {headerCenter} +
{introIcon}
diff --git a/src/components/pageLayout/index.tsx b/src/components/pageLayout/index.tsx index 397121c7dc..1c0b8050c2 100644 --- a/src/components/pageLayout/index.tsx +++ b/src/components/pageLayout/index.tsx @@ -48,6 +48,7 @@ interface IPageLayoutProps { showBack?: Boolean; backPath?: string; docFn?: Function; + headerCenter?: ReactNode; } export const i18nMap = { diff --git a/src/pages/hosts/pages/List/index.tsx b/src/pages/hosts/pages/List/index.tsx index b5a3e0553a..3a877f2c0c 100644 --- a/src/pages/hosts/pages/List/index.tsx +++ b/src/pages/hosts/pages/List/index.tsx @@ -7,6 +7,10 @@ import { CommonStateContext } from '@/App'; import PageLayout from '@/components/pageLayout'; import BusinessGroup2, { getCleanBusinessGroupIds } from '@/components/BusinessGroup'; import { getTargetsCompatibleGids } from '@/components/BusinessGroup/presetFilters'; +import { IS_ENT } from '@/utils/constant'; + +// @ts-ignore — ObsLoop HostEntry(srm-fe parcel;开源/plus 源仓不挂此依赖) +import ObsLoopHostEntry from 'plus:/parcels/ObsLoop/HostEntry'; import { NS, STATS_COLLAPSED_KEY } from '../../constants'; import { Item, OperateType } from '../../types'; @@ -43,7 +47,11 @@ export default function index() { }, [businessGroup.ids]); return ( - + : undefined} + >