Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(plugins): 支持组织成员向公开市场投稿
liugaoweia31581670075
diff --git a/apps/desktop/resources/system-skills/cindy-plugin-creator/SKILL.md b/apps/desktop/resources/system-skills/cindy-plugin-creator/SKILL.mdindex bb36394515..457d0b85f7 100644--- a/apps/desktop/resources/system-skills/cindy-plugin-creator/SKILL.md+++ b/apps/desktop/resources/system-skills/cindy-plugin-creator/SKILL.md@@ -15,7 +15,7 @@ Build a Cindy plugin from the user's request, or update an existing plugin. This2. Before writing code, read the [sandbox boundaries](references/plugin-sandbox.md) and [packaging workflow](references/plugin-packaging.md). Read the capability references below as needed; do not load the whole manual at once.3. For a new plugin, prefer ghost_forge_scaffold with the appropriate plain, agent-action, node-json-rpc or node-mcp template, then edit the generated files. For an existing plugin, preserve its identity, data and compatible behavior. Use schemaVersion: 3 for new manifests and declare the first stable Cindy version actually required.4. Implement and validate the requested behavior, including Light and Dark modes for any UI. Separate current Agent tool-call operations from autonomous plugin capabilities, as described in the manifest and Agent-call references. Use [tool discovery](references/plugin-tool-discovery.md) and [manuals](references/plugin-manual.md) for authoring the plugin's own discovery and workflow documentation.-5. Call ghost_forge_pack to validate and produce the .cindy artifact. Report what was tested and what remains unverified. Packaging does not install or publish: use ghost_forge_install only when installation is requested, and follow [personal publication and anonymity (§7.3–7.4)](references/plugin-packaging.md) for community publication, or [publishing signatures and review (§8)](references/plugin-publishing.md) as applicable. Read the releaseNotes contract in [manifest (§2)](references/plugin-manifest.md) before submitting a version.+5. Call ghost_forge_pack to validate and produce the .cindy artifact. Report what was tested and what remains unverified. Packaging does not install or publish: use ghost_forge_install only when installation is requested, and follow [public marketplace publication and attribution (§7.3–7.4)](references/plugin-packaging.md) for community publication, or [publishing signatures and review (§8)](references/plugin-publishing.md) as applicable. Read the releaseNotes contract in [manifest (§2)](references/plugin-manifest.md) before submitting a version.Cindy supplies the Forge tools. If they are unavailable in the current environment, explain the missing capability and continue any local source work that is possible; do not claim to have packaged, installed or published. The legacy ghost_forge_guide tool serves these same references by section number or title when needed. It is a compatibility entry point, not a second source of documentation.diff --git a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.mdindex 0de8e5fda2..64c0dd7ba3 100644--- a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md+++ b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md@@ -76,9 +76,9 @@确认。成员发布仅企业组织成员可用,个人账号不可用;票据过期、换账号或重复使用后须重新以 publish intent 打包,不能改传文件路径绕过。-## 7.3 个人插件发布到社区+## 7.3 向公开市场发布插件-普通个人作者发布到社区使用独立入口:先在作者源码目录开发、安装并实际使用插件,再调用+个人账号和组织成员向公开市场投稿使用独立入口:先在作者源码目录开发、安装并实际使用插件,再调用`ghost_contribution_prepare({ ghost_id, namespace: null })`。Host 固定当前精确安装的包并返回只读发布摘要:实际版本、包内更新说明以及提审阻塞原因;此时没有创建上传或占用版本。首次上架不要求更新说明,插件用途写在 `description`。插件曾上架后再提审时,须在 `ghost.json` 顶层写入 `releaseNotes` 纯文本字符串(v2、v3 均支持),完整描述相对上一已上架版本的全部变化。@@ -96,7 +96,7 @@用户已明确委托发布时,不再另问一次是否发布。预检有 blockers 时先说明具体原因;需要改包则回到现有作者源码,用原 Forge 工具修改、安装更新后重新预检,不直接改 Host 管理的安装目录。权限拒绝按原任务权限处理,返回原因并停止,不切换权限或借其它入口重试。-当前个人账号普通任务可用;共享访客及插件托管任务不能借用房主账号。+当前个人账号与组织成员的普通任务均可向公开市场投稿,插件归提交者本人管理,不赋予组织管理员其他成员投稿的管理权。组织内部发布仍使用原 Forge 流程。共享访客及插件托管任务不能借用房主账号。一次成功提审永久占用该插件的版本号,退回、取消或下架都不能复用;修改后需要换版本号、重新安装再提交。每个插件同时只能有一个待审版本。`ghost_my_plugins` 读取本人插件及精确版本结果;停止上传用diff --git a/apps/desktop/src/main/plugin-contributions/__tests__/api.test.ts b/apps/desktop/src/main/plugin-contributions/__tests__/api.test.tsindex 9de04c26cf..c15d4db4fd 100644--- a/apps/desktop/src/main/plugin-contributions/__tests__/api.test.ts+++ b/apps/desktop/src/main/plugin-contributions/__tests__/api.test.ts@@ -4,6 +4,7 @@ import { ServerApiError } from '../../serverApiClient';const harness = vi.hoisted(() => ({owner: 'A:1',token: '',+ membershipKind: 'personal' as 'personal' | 'org',fetch: vi.fn(),discover: vi.fn(),refresh: vi.fn(),@@ -15,7 +16,7 @@ vi.mock('electron', () => ({vi.mock('../../authManager', () => ({getAccessToken: () => harness.token,getActiveAuthRealm: () => 'cn',- getAuthState: () => ({ user: { id: 'member-A' } }),+ getAuthState: () => ({ user: { id: 'member-A', membershipKind: harness.membershipKind } }),refresh: harness.refresh,}));vi.mock('../../clientEndpointsService', () => ({@@ -57,6 +58,7 @@ beforeEach(() => {vi.resetAllMocks();vi.spyOn(Date, 'now').mockReturnValue(Date.UTC(2026, 9, 21) + ++testClock * 360_000);harness.owner = 'A:1';+ harness.membershipKind = 'personal';harness.token = `unused.${Buffer.from(JSON.stringify({ iss: issuer, sub: 'member-A', ctx: 'personal' })).toString('base64url')}.unused`;harness.discover.mockResolvedValue({ ok: true, json: async () => ({ issuer }) });harness.fetch.mockResolvedValue(page());@@ -64,6 +66,17 @@ beforeEach(() => {afterEach(() => vi.restoreAllMocks());describe('personal contribution authority', () => {+ it('uses the organization member’s current token for their own public contributions', async () => {+ harness.membershipKind = 'org';+ harness.token = `unused.${Buffer.from(JSON.stringify({ iss: issuer, sub: 'member-A', ctx: 'org' })).toString('base64url')}.unused`;+ await expect(new Api().list(listInput)).resolves.toEqual(page());+ expect(harness.fetch.mock.calls[0][1].token).toBe(harness.token);+ });+ it('rejects a token for another membership kind before HTTP dispatch', async () => {+ harness.membershipKind = 'org';+ await expect(new Api().list(listInput)).rejects.toThrow('ACCOUNT_REAUTH_REQUIRED');+ expect(harness.fetch).not.toHaveBeenCalled();+ });it('rechecks a write guard after awaited discovery, before dispatching the original commit', async () => {let allowed = true;harness.discover.mockImplementationOnce(async () => {diff --git a/apps/desktop/src/main/plugin-contributions/__tests__/prepared.test.ts b/apps/desktop/src/main/plugin-contributions/__tests__/prepared.test.tsindex bf14668410..b611cf0edb 100644--- a/apps/desktop/src/main/plugin-contributions/__tests__/prepared.test.ts+++ b/apps/desktop/src/main/plugin-contributions/__tests__/prepared.test.ts@@ -9,6 +9,7 @@ import { ghostInstallApprovalToken } from '../../../shared/ghost';const harness = vi.hoisted(() => ({root: '',generation: 1,+ membershipKind: 'personal' as 'personal' | 'org',ghosts: [] as InstalledGhost[],ledger: null as { scope: string; organizationId: string | null; source?: string; installed?: boolean } | null,quit: null as (() => void | Promise<void>) | null,@@ -28,7 +29,7 @@ vi.mock('../../appSessionState', () => ({vi.mock('../../authManager', () => ({getAuthState: () => ({isAuthenticated: true,- user: { id: 'member', membershipKind: 'personal' },+ user: { id: 'member', membershipKind: harness.membershipKind },}),getActiveAuthRealm: () => 'global',}));@@ -51,6 +52,7 @@ let testGeneration = 0;beforeEach(async () => {vi.resetAllMocks();harness.generation = ++testGeneration * 1000;+ harness.membershipKind = 'personal';harness.ledger = null;harness.root = await fsp.mkdtemp(path.join(os.tmpdir(), 'cindy-contribution-prepare-test-'));harness.ghosts = [@@ -89,7 +91,8 @@ describe('current installation contribution preparation', () => {expect(harness.snapshot).not.toHaveBeenCalled();expect(harness.inspect).not.toHaveBeenCalled();});- it('does not infer official identity from a package author or display name', async () => {+ it.each(['personal', 'org'] as const)('prepares a local plugin for the %s member without inferring official identity from package text', async membershipKind => {+ harness.membershipKind = membershipKind;harness.ghosts[0].manifest.name = 'Cindy community tool';harness.ghosts[0].manifest.author = 'Cindy';expect(await prepared.prepareInstalledContribution('hello')).toMatchObject({ ghostId: 'hello' });@@ -115,8 +118,9 @@ describe('current installation contribution preparation', () => {expect(harness.snapshot).not.toHaveBeenCalled();expect(harness.inspect).not.toHaveBeenCalled();});- it('refuses private ledger resources before creating a public snapshot', async () => {- harness.ledger = { scope: 'personal', organizationId: null };+ it.each(['personal', 'organization'])('refuses %s ledger resources even for an organization member before creating a public snapshot', async scope => {+ harness.membershipKind = 'org';+ harness.ledger = { scope, organizationId: scope === 'organization' ? 'org' : null };await expect(prepared.prepareInstalledContribution('hello')).rejects.toThrow('Private plugin resources',);diff --git a/apps/desktop/src/main/plugin-contributions/api.ts b/apps/desktop/src/main/plugin-contributions/api.tsindex 72649c7fbc..8e90dfa3e0 100644--- a/apps/desktop/src/main/plugin-contributions/api.ts+++ b/apps/desktop/src/main/plugin-contributions/api.ts@@ -40,7 +40,7 @@ export class ContributionApi {private async token(): Promise<string> {assertContributionOwner(this.owner);const token = getAccessToken();- if (!token) throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Personal login required');+ if (!token) throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Login required');const issuer = await trustedIssuer(this.authEndpoint);assertContributionOwner(this.owner);// Claims here only bind the response to the Host session. Plugin Server@@ -49,15 +49,15 @@ export class ContributionApi {try {claims = JSON.parse(Buffer.from(token.split('.')[1], 'base64url').toString('utf8'));} catch {- throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Invalid personal session');+ throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Invalid account session');}if (claims.iss !== issuer ||typeof claims.sub !== 'string' ||claims.sub !== getAuthState().user?.id ||- claims.ctx !== 'personal'+ claims.ctx !== getAuthState().user?.membershipKind) {- throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Personal session issuer mismatch');+ throwIpcError('ACCOUNT_REAUTH_REQUIRED', 'Account session issuer or identity mismatch');}this.subject = { authority: issuer, membershipId: claims.sub };return token;diff --git a/apps/desktop/src/main/plugin-contributions/prepared.ts b/apps/desktop/src/main/plugin-contributions/prepared.tsindex 461085be93..98363c1406 100644--- a/apps/desktop/src/main/plugin-contributions/prepared.ts+++ b/apps/desktop/src/main/plugin-contributions/prepared.ts@@ -34,9 +34,10 @@ export function contributionOwnerKey(): string {if (isAppSessionBoundaryPending() ||!state.isAuthenticated ||- state.user?.membershipKind !== 'personal'+ !state.user ||+ (state.user.membershipKind !== 'personal' && state.user.membershipKind !== 'org')) {- throwIpcError('PERMISSION_DENIED', 'Personal account required for community contributions');+ throwIpcError('PERMISSION_DENIED', 'Signed-in account required for community contributions');}return JSON.stringify([activeOwnerScopeKey(), getActiveAuthRealm(), state.user.id]);}diff --git a/apps/desktop/src/renderer/contexts/PluginReviewUpdatesContext.tsx b/apps/desktop/src/renderer/contexts/PluginReviewUpdatesContext.tsxindex 35343c9be7..058f0162b5 100644--- a/apps/desktop/src/renderer/contexts/PluginReviewUpdatesContext.tsx+++ b/apps/desktop/src/renderer/contexts/PluginReviewUpdatesContext.tsx@@ -18,7 +18,7 @@ export const usePluginReviewUpdates = () => useContext(PluginReviewUpdatesContexexport function PluginReviewUpdatesProvider({ children }: { children: ReactNode }) {const { dataOwnerId, dataOwnerGeneration, user, mode } = useAuth();const owner = JSON.stringify([dataOwnerId, dataOwnerGeneration, user?.id, mode]);- const personal = mode === 'cloud' && user?.membershipKind === 'personal';+ const contributor = mode === 'cloud' && (user?.membershipKind === 'personal' || user?.membershipKind === 'org');const current = useRef(owner);current.current = owner;const [snapshot, setSnapshot] = useState({ owner, updates: empty });@@ -27,7 +27,7 @@ export function PluginReviewUpdatesProvider({ children }: { children: ReactNodeconst marking = useRef(new Set<string>());const acknowledged = useRef({ owner, keys: new Set<string>() });const refresh = useCallback(async () => {- if (!personal || document.visibilityState !== 'visible') return;+ if (!contributor || document.visibilityState !== 'visible') return;if (pending.current?.owner === owner) return pending.current.task;const generation = lifecycle.current;const task = (async () => {@@ -41,10 +41,10 @@ export function PluginReviewUpdatesProvider({ children }: { children: ReactNodepending.current = { owner, task };try { await task; }finally { if (pending.current?.task === task) pending.current = null; }- }, [owner, personal]);+ }, [owner, contributor]);const markRead = useCallback(async (pluginId: string, key: string) => {const request = JSON.stringify([owner, pluginId, key]);- if (!personal || marking.current.has(request)) return;+ if (!contributor || marking.current.has(request)) return;marking.current.add(request);const generation = lifecycle.current;try {@@ -57,7 +57,7 @@ export function PluginReviewUpdatesProvider({ children }: { children: ReactNode});} catch { /* A failed read receipt must leave the dot visible. */ }finally { marking.current.delete(request); }- }, [owner, personal]);+ }, [owner, contributor]);useEffect(() => {lifecycle.current++;pending.current = null;@@ -75,7 +75,7 @@ export function PluginReviewUpdatesProvider({ children }: { children: ReactNodedocument.removeEventListener('visibilitychange', sync);};}, [refresh]);- return <PluginReviewUpdatesContext.Provider value={{ updates: personal && snapshot.owner === owner ? snapshot.updates : empty, refresh, markRead }}>+ return <PluginReviewUpdatesContext.Provider value={{ updates: contributor && snapshot.owner === owner ? snapshot.updates : empty, refresh, markRead }}>{children}</PluginReviewUpdatesContext.Provider>;}diff --git a/apps/desktop/src/renderer/contexts/__tests__/PluginReviewUpdatesContext.test.tsx b/apps/desktop/src/renderer/contexts/__tests__/PluginReviewUpdatesContext.test.tsxindex 235535ad29..33b3fb4ad7 100644--- a/apps/desktop/src/renderer/contexts/__tests__/PluginReviewUpdatesContext.test.tsx+++ b/apps/desktop/src/renderer/contexts/__tests__/PluginReviewUpdatesContext.test.tsx@@ -4,10 +4,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { PluginReviewUpdate } from '../../../shared/pluginContributions';import { PluginReviewUpdatesProvider, usePluginReviewUpdates } from '../PluginReviewUpdatesContext';-const harness = vi.hoisted(() => ({ owner: 'A', generation: 1, read: vi.fn(), mark: vi.fn() }));+const harness = vi.hoisted(() => ({ owner: 'A', generation: 1, membershipKind: 'personal', read: vi.fn(), mark: vi.fn() }));vi.mock('../AuthContext', () => ({ useAuth: () => ({dataOwnerId: harness.owner, dataOwnerGeneration: harness.generation,- user: { id: harness.owner, membershipKind: 'personal' }, mode: 'cloud',+ user: { id: harness.owner, membershipKind: harness.membershipKind }, mode: 'cloud',}) }));const update: PluginReviewUpdate = { pluginId: 'plugin', key: 'approval', releaseId: 'release',version: '1.0.0', sha256: 'a'.repeat(64), revision: 'revision', status: 'approved', decidedAt: 'time', unread: true };@@ -19,14 +19,15 @@ function Probe() {}const app = () => <PluginReviewUpdatesProvider><Probe /></PluginReviewUpdatesProvider>;beforeEach(() => {- harness.owner = 'A'; harness.generation = 1;+ harness.owner = 'A'; harness.generation = 1; harness.membershipKind = 'personal';harness.read.mockReset().mockResolvedValue([update]); harness.mark.mockReset().mockResolvedValue(undefined);Object.defineProperty(window, 'electronAPI', { configurable: true, value: { pluginContributions: { reviewUpdates: harness.read, markReviewRead: harness.mark } } });vi.spyOn(document, 'visibilityState', 'get').mockReturnValue('visible');});afterEach(() => { cleanup(); vi.restoreAllMocks(); vi.useRealTimers(); });describe('in-app review result indicators', () => {- it('preserves unread results offline and after failed acknowledgement, then only clears the exact result', async () => {+ it.each(['personal', 'org'])('preserves unread %s results offline and after failed acknowledgement, then only clears the exact result', async membershipKind => {+ harness.membershipKind = membershipKind;render(app());await waitFor(() => expect(screen.getByRole('status').textContent).toBe('approval'));expect(harness.mark).not.toHaveBeenCalled();diff --git a/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx b/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsxindex d2dbc1065e..6d2ac3b3ab 100644--- a/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx+++ b/apps/desktop/src/renderer/features/plugin/GhostPluginPage.tsx@@ -538,7 +538,7 @@ function LocalGhostPluginPage({</div>) : null;const showEnterprise = user?.membershipKind === 'org';- const personalContributor = mode === 'cloud' && user?.membershipKind === 'personal';+ const contributor = mode === 'cloud' && (user?.membershipKind === 'personal' || user?.membershipKind === 'org');const ghosts = useInstalledGhosts();useMainViewVisibilityRevision();const installedGhostMarketKey = useMemo(@@ -1703,7 +1703,7 @@ function LocalGhostPluginPage({useEffect(() => {let disposed = false;setLocalContribution(null);- if (!personalContributor || !selectedGhost || !selectedGhost.publishingSource || selectedGhost.publishingSource.kind !== 'local' || selectedGhost.namespace !== null || selectedGhost.namespaceState !== 'confirmed' || selectedGhost.approval.state !== 'approved' || showMyPlugins) return;+ if (!contributor || !selectedGhost || !selectedGhost.publishingSource || selectedGhost.publishingSource.kind !== 'local' || selectedGhost.namespace !== null || selectedGhost.namespaceState !== 'confirmed' || selectedGhost.approval.state !== 'approved' || showMyPlugins) return;const owner = contributionOwner;const instanceId = installedGhostStoragePart(selectedGhost);const read = async () => {@@ -1745,8 +1745,8 @@ function LocalGhostPluginPage({if (!disposed && contributionOwnerRef.current === owner) setLocalContribution({ key: localContributionKey, plugin: null, versionUsed: false, error: contributionErrorKey(error) });});return () => { disposed = true; };- }, [personalContributor, localContributionKey, showMyPlugins]);- const canPreparePublication = personalContributor && selectedGhost?.publishingSource?.kind === 'local' &&+ }, [contributor, localContributionKey, showMyPlugins]);+ const canPreparePublication = contributor && selectedGhost?.publishingSource?.kind === 'local' &&!contributionUnavailableKey && !showMyPlugins && localContributionResult &&!localContributionResult.error && !localPublishBlocker;const currentPublicationDraft = useContributionPreview(localContributionKey,@@ -1780,7 +1780,7 @@ function LocalGhostPluginPage({};const contribute = async (instanceId: string, options?: PluginSubmitOptions): Promise<boolean> => {if (contributing.current) return false;- if (!personalContributor) {+ if (!contributor) {const ghost = findInstalledGhostByInstanceId(ghosts, instanceId);if (!ghost || localPublishingUnavailableKey(ghost) || ghost.publishingSource?.kind !== 'local') return false;const nonce = rememberContributionIntent(ghost);@@ -1846,7 +1846,7 @@ function LocalGhostPluginPage({useEffect(() => {const nonce = searchParams.get('contributionIntent');- if (!nonce || !personalContributor) return;+ if (!nonce || !contributor) return;const target = consumeContributionIntent(nonce);const next = new URLSearchParams(searchParams); next.delete('contributionIntent');setSearchParams(next, { replace: true });@@ -1860,7 +1860,7 @@ function LocalGhostPluginPage({setSearchParams(next, { replace: true });}else toast.error(t('settings.ghosts.contribution.installForAccount'));- }, [searchParams, personalContributor, contributionOwner, ghosts]);+ }, [searchParams, contributor, contributionOwner, ghosts]);// 面板收束:aside 只挂在插件页语境里(列表/详情/市场详情共用),// 路由离开本页组件整体卸载 → webview 一并回收,绝不残留到别的界面。@@ -1914,7 +1914,7 @@ function LocalGhostPluginPage({: undefined}onContribute={!showLocalPublishing || contributionUnavailableKey || localPublishBlocker ? undefined : () => void contribute(selectedDetail.id)}- contributionUnavailableReason={contributionUnavailableKey === 'officialGithubRequired' || (contributionUnavailableKey === 'reservedId' && selectedGhost?.publishingSource?.kind === 'public-market') ? t(`settings.ghosts.contribution.unavailable.${contributionUnavailableKey}`) : !showLocalPublishing ? undefined : contributionUnavailableKey ? t(`settings.ghosts.contribution.unavailable.${contributionUnavailableKey}`) : localContributionResult?.error ? t(localContributionResult.error) : localPublishBlocker ? t(`settings.ghosts.contribution.errors.${localPublishBlocker}`) : currentPublicationDraft?.error ? t(currentPublicationDraft.error, { defaultValue: t('settings.ghosts.contribution.loadFailed') }) : currentPublicationDraft?.prepared?.preflight?.blockers[0] ? currentPublicationDraft.prepared.preflight.blockers[0].message : personalContributor && !currentPublicationDraft?.prepared ? t('settings.ghosts.contribution.preparing') : undefined}+ contributionUnavailableReason={contributionUnavailableKey === 'officialGithubRequired' || (contributionUnavailableKey === 'reservedId' && selectedGhost?.publishingSource?.kind === 'public-market') ? t(`settings.ghosts.contribution.unavailable.${contributionUnavailableKey}`) : !showLocalPublishing ? undefined : contributionUnavailableKey ? t(`settings.ghosts.contribution.unavailable.${contributionUnavailableKey}`) : localContributionResult?.error ? t(localContributionResult.error) : localPublishBlocker ? t(`settings.ghosts.contribution.errors.${localPublishBlocker}`) : currentPublicationDraft?.error ? t(currentPublicationDraft.error, { defaultValue: t('settings.ghosts.contribution.loadFailed') }) : currentPublicationDraft?.prepared?.preflight?.blockers[0] ? currentPublicationDraft.prepared.preflight.blockers[0].message : contributor && !currentPublicationDraft?.prepared ? t('settings.ghosts.contribution.preparing') : undefined}publishingPreview={currentPublicationDraft?.prepared}onRefreshPublishing={() => setPublicationRefresh(value => value + 1)}contributionUpdate={Boolean(localContributionResult?.plugin || (selectedGhost?.manifest.id && marketItems.some((item) => marketItemMatchesInstalledGhost(item, selectedGhost))))}diff --git a/apps/desktop/src/renderer/features/plugin/MyPluginsPage.tsx b/apps/desktop/src/renderer/features/plugin/MyPluginsPage.tsxindex a87935f1d2..b6a2b943e5 100644--- a/apps/desktop/src/renderer/features/plugin/MyPluginsPage.tsx+++ b/apps/desktop/src/renderer/features/plugin/MyPluginsPage.tsx@@ -173,8 +173,8 @@ export function MyPluginsPage({const pageKey = useRef(JSON.stringify([query, filter]));const scrollFrame = useRef<HTMLElement>(null);const { scrolled, onScroll } = usePluginDetailScrolled();- const personal = mode === 'cloud' && user?.membershipKind === 'personal';- const pickerOpen = personal && ownerMatches && pickerOwner === ownerKey && !selectedId;+ const contributor = mode === 'cloud' && (user?.membershipKind === 'personal' || user?.membershipKind === 'org');+ const pickerOpen = contributor && ownerMatches && pickerOwner === ownerKey && !selectedId;const pickerReadKey = JSON.stringify([ownerKey, installedRevision, submissionRevision]);const pickerRead = pickerPlugins?.key === pickerReadKey ? pickerPlugins : null;const pickerReady = Boolean(pickerRead && !pickerRead.failure);@@ -292,7 +292,7 @@ export function MyPluginsPage({const refresh = useCallback(async (cursor?: string) => {- if (!personal || !ownerMatches) return;+ if (!contributor || !ownerMatches) return;const id = ++request.current;const owner = ownerKey;setLoading(true);@@ -345,7 +345,7 @@ export function MyPluginsPage({setLoading(false);}},- [reader, selectedId, query, filter, ownerKey, personal, ownerMatches, reviewUpdates.refresh, installedRevision],+ [reader, selectedId, query, filter, ownerKey, contributor, ownerMatches, reviewUpdates.refresh, installedRevision],);useEffect(() => {@@ -369,7 +369,7 @@ export function MyPluginsPage({}, [refresh, selectedId, query, filter, submissionRevision]);const loadVersions = useCallback(async (cursor?: string) => {- if (!selectedId || !personal || !ownerMatches) return;+ if (!selectedId || !contributor || !ownerMatches) return;const sequence = ++versionRequest.current,owner = ownerKey,pluginId = selectedId;@@ -412,7 +412,7 @@ export function MyPluginsPage({setVersionsLoading(false);}},- [selectedId, personal, ownerMatches, ownerKey, reader],+ [selectedId, contributor, ownerMatches, ownerKey, reader],);useEffect(() => {setVersionFailure(null);@@ -809,7 +809,7 @@ export function MyPluginsPage({className="size-7 p-0"aria-label={t(`${copy}.${isDetail ? 'refreshDetail' : 'refreshList'}`)}loading={loading || versionsLoading}- disabled={!personal}+ disabled={!contributor}onClick={() => void refreshAll()}><RotateCw size={16} />@@ -1175,7 +1175,7 @@ export function MyPluginsPage({{!isDetail ? (<Buttonvariant="cta"- disabled={!personal || !ownerMatches}+ disabled={!contributor || !ownerMatches}onClick={() => { setPickerPlugins(null); setPickerSelection(null); setPickerOwner(ownerKey); }}><Plus size={16} />@@ -1185,10 +1185,10 @@ export function MyPluginsPage({refreshButton)}</header>- {!personal ? (+ {!contributor ? (<div className="space-y-4"><p role="status" className="text-14 leading-6 text-[var(--text-secondary)]">- {t(`${copy}.personalRequired`)}+ {t(`${copy}.signInRequired`)}</p><Buttonref={accountTrigger}diff --git a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsxindex bd3e82fbd4..deec4f5a56 100644--- a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx+++ b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx@@ -967,8 +967,9 @@ describe('plugin use details and independent author management', () => {// An unused version can still fail preflight (for example, missing update notes).// Exercise the installed-detail action: it must use the same preview as first publication.- it.each([true, false])('preflights an unused installed update before submission (allowed=%s)', async allowed => {+ it.each([{ allowed: true, membershipKind: 'personal' }, { allowed: false, membershipKind: 'personal' }, { allowed: true, membershipKind: 'org' }])('preflights an unused installed update for $membershipKind before submission (allowed=$allowed)', async ({ allowed, membershipKind }) => {auth.mode = 'cloud';+ auth.user.membershipKind = membershipKind;const installed = localAuthorInstallation('2.0.0');window.electronAPI.ghosts.listSync = () => ({ ghosts: [installed] });const api = authorApi();diff --git a/apps/desktop/src/renderer/features/plugin/__tests__/MyPluginsPage.test.tsx b/apps/desktop/src/renderer/features/plugin/__tests__/MyPluginsPage.test.tsxindex c633813f96..af188a0f0a 100644--- a/apps/desktop/src/renderer/features/plugin/__tests__/MyPluginsPage.test.tsx+++ b/apps/desktop/src/renderer/features/plugin/__tests__/MyPluginsPage.test.tsx@@ -23,12 +23,12 @@ vi.mock('react-i18next', () => ({}));const confirmation = vi.hoisted(() => ({ confirm: vi.fn(async () => true) }));vi.mock('@/components/ui/confirm-dialog-provider', () => ({ useConfirmDialog: () => confirmation }));-const auth = vi.hoisted(() => ({ owner: 'A', generation: 1 }));+const auth = vi.hoisted(() => ({ owner: 'A', generation: 1, membershipKind: 'personal' }));vi.mock('@/contexts/AuthContext', () => ({useAuth: () => ({dataOwnerId: `owner-${auth.owner}`,dataOwnerGeneration: auth.generation,- user: { id: `member-${auth.owner}`, membershipKind: 'personal' },+ user: { id: `member-${auth.owner}`, membershipKind: auth.membershipKind },mode: 'cloud',}),}));@@ -156,11 +156,13 @@ beforeEach(() => {reviews.updates = []; reviews.refresh.mockReset(); reviews.markRead.mockReset();auth.owner = 'A';auth.generation = 1;+ auth.membershipKind = 'personal';});afterEach(() => { cleanup(); vi.restoreAllMocks(); });describe('My Plugins facts', () => {- it('shows the actual new package notes before submitting the same prepared package', async () => {+ it.each(['personal', 'org'])('shows the actual new package notes to a %s member before submitting the same prepared package', async membershipKind => {+ auth.membershipKind = membershipKind;const api = reader();const preview = { ...packagePreview('exact-instance', '1.2.0'), releaseNotes: 'Not yet submitted: new package changes' };vi.mocked(api.prepare).mockResolvedValue(preview);diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.jsonindex 3ba221c9ff..f0f1366219 100644--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@ -7204,7 +7204,7 @@"packageSize": "Package size: {{size}} bytes","refreshList": "Refresh List","refreshDetail": "Refresh Details",- "personalRequired": "Switch to your personal account to view your plugins.",+ "signInRequired": "Sign in to manage plugins you submit to the public marketplace.","permissionDenied": "This account cannot publish this plugin.","notFound": "This plugin is unavailable to the current account.","accountChanged": "The account changed. Refresh using the current account.",@@ -7305,8 +7305,8 @@"PLUGIN_GHOST_ID_CONFLICT": "This public plugin ID already exists. It cannot be claimed by uploading a package.","CONTRIBUTION_OPERATION_NOT_FOUND": "This account cannot view this submission.","PRECONDITION_FAILED": "This plugin cannot currently be submitted for review.",- "PERSONAL_CONTEXT_REQUIRED": "Switch to your personal account to view your plugins.",- "ACCOUNT_REAUTH_REQUIRED": "Your personal account session is no longer valid. Sign in again before retrying.",+ "PERSONAL_CONTEXT_REQUIRED": "Sign in to manage plugins you submit to the public marketplace.",+ "ACCOUNT_REAUTH_REQUIRED": "Your session is no longer valid. Sign in again before retrying.","PERMISSION_DENIED": "This account cannot publish this plugin.","OWNER_CHANGED": "The account changed. Refresh using the current account.","PLUGIN_NOT_FOUND": "This plugin is unavailable to the current account.",@@ -7352,7 +7352,7 @@"sourceUnverified": "This plugin’s installation source could not be verified. Open a local plugin you developed.","publishingPermissionRequired": "This account does not have permission to submit this plugin."},- "intro": "Manage plugin releases, updates and reviews",+ "intro": "Manage releases, updates and reviews for public marketplace plugins","pluginColumn": "Plugin","latestState": "Latest status","version": "Version",diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex 8fb7167283..f06574d98e 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -7173,7 +7173,7 @@"packageSize": "パッケージサイズ:{{size}} バイト","refreshList": "一覧を更新","refreshDetail": "詳細を更新",- "personalRequired": "個人アカウントに切り替えてマイプラグインを表示してください。",+ "signInRequired": "ログインすると、公開マーケットに提出したプラグインを管理できます。","permissionDenied": "このアカウントではこのプラグインを公開できません。","notFound": "現在のアカウントではこのプラグインを表示できません。","accountChanged": "アカウントが変わりました。現在のアカウントで更新してください。",@@ -7274,8 +7274,8 @@"PLUGIN_GHOST_ID_CONFLICT": "この公開プラグイン ID は使用済みです。アップロードで所有権は取得できません。","CONTRIBUTION_OPERATION_NOT_FOUND": "このアカウントでは、この提出を確認できません。","PRECONDITION_FAILED": "現在、このプラグインは審査に提出できません。",- "PERSONAL_CONTEXT_REQUIRED": "個人アカウントに切り替えてマイプラグインを表示してください。",- "ACCOUNT_REAUTH_REQUIRED": "個人アカウントのログイン状態が無効です。再度ログインしてからお試しください。",+ "PERSONAL_CONTEXT_REQUIRED": "ログインすると、公開マーケットに提出したプラグインを管理できます。",+ "ACCOUNT_REAUTH_REQUIRED": "ログイン状態が無効です。再度ログインしてからお試しください。","PERMISSION_DENIED": "このアカウントではこのプラグインを公開できません。","OWNER_CHANGED": "アカウントが変わりました。現在のアカウントで更新してください。","PLUGIN_NOT_FOUND": "現在のアカウントではこのプラグインを表示できません。",@@ -7321,7 +7321,7 @@"sourceUnverified": "このプラグインのインストール元を確認できません。ご自身が開発したローカルのプラグインを開いてください。","publishingPermissionRequired": "このアカウントには、このプラグインを審査に提出する権限がありません。"},- "intro": "プラグインの公開・更新・審査状況を管理",+ "intro": "公開マーケット向けプラグインの公開・更新・審査状況を管理","pluginColumn": "プラグイン","latestState": "最新の状況","version": "バージョン",diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex 996f4cea1e..32875fe5e4 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -7173,7 +7173,7 @@"packageSize": "패키지 크기: {{size}}바이트","refreshList": "목록 새로고침","refreshDetail": "상세 새로고침",- "personalRequired": "개인 계정으로 전환해 내 플러그인을 확인하세요.",+ "signInRequired": "로그인하면 공개 마켓에 제출한 플러그인을 관리할 수 있습니다.","permissionDenied": "이 계정으로는 이 플러그인을 게시할 수 없습니다.","notFound": "현재 계정으로 이 플러그인을 볼 수 없습니다.","accountChanged": "계정이 변경되었습니다. 현재 계정으로 새로고침하세요.",@@ -7274,8 +7274,8 @@"PLUGIN_GHOST_ID_CONFLICT": "이 공개 플러그인 ID는 이미 존재합니다. 업로드로 소유권을 얻을 수 없습니다.","CONTRIBUTION_OPERATION_NOT_FOUND": "현재 계정으로 이 제출 내역을 볼 수 없습니다.","PRECONDITION_FAILED": "현재 이 플러그인을 검토에 제출할 수 없습니다.",- "PERSONAL_CONTEXT_REQUIRED": "개인 계정으로 전환해 내 플러그인을 확인하세요.",- "ACCOUNT_REAUTH_REQUIRED": "개인 계정 로그인 세션이 유효하지 않습니다. 다시 로그인한 후 시도하세요.",+ "PERSONAL_CONTEXT_REQUIRED": "로그인하면 공개 마켓에 제출한 플러그인을 관리할 수 있습니다.",+ "ACCOUNT_REAUTH_REQUIRED": "로그인 세션이 유효하지 않습니다. 다시 로그인한 후 시도하세요.","PERMISSION_DENIED": "이 계정으로는 이 플러그인을 게시할 수 없습니다.","OWNER_CHANGED": "계정이 변경되었습니다. 현재 계정으로 새로고침하세요.","PLUGIN_NOT_FOUND": "현재 계정으로 이 플러그인을 볼 수 없습니다.",@@ -7321,7 +7321,7 @@"sourceUnverified": "이 플러그인의 설치 출처를 확인할 수 없습니다. 직접 개발한 로컬 플러그인을 여세요.","publishingPermissionRequired": "이 계정에는 이 플러그인을 심사에 제출할 권한이 없습니다."},- "intro": "플러그인의 게시, 업데이트 및 심사 상태 관리",+ "intro": "공개 마켓용 플러그인의 게시, 업데이트 및 심사 상태 관리","pluginColumn": "플러그인","latestState": "최근 상태","version": "버전",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex f6aac9d448..8c262424f1 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@ -7173,7 +7173,7 @@"packageSize": "包大小:{{size}} 字节","refreshList": "刷新列表","refreshDetail": "刷新详情",- "personalRequired": "请切换到个人账号查看我的插件。",+ "signInRequired": "登录后即可管理你向公开市场提交的插件。","permissionDenied": "当前账号无权发布此插件。","notFound": "当前账号无法查看此插件。","accountChanged": "账号已切换,请用当前账号刷新。",@@ -7274,8 +7274,8 @@"PLUGIN_GHOST_ID_CONFLICT": "此公开插件 ID 已存在,不能通过上传插件包认领。","CONTRIBUTION_OPERATION_NOT_FOUND": "当前账号无法查看这次提交。","PRECONDITION_FAILED": "当前插件无法提交审核。",- "PERSONAL_CONTEXT_REQUIRED": "请切换到个人账号查看我的插件。",- "ACCOUNT_REAUTH_REQUIRED": "个人账号登录状态已失效,请重新登录后重试。",+ "PERSONAL_CONTEXT_REQUIRED": "登录后即可管理你向公开市场提交的插件。",+ "ACCOUNT_REAUTH_REQUIRED": "登录状态已失效,请重新登录后重试。","PERMISSION_DENIED": "当前账号无权发布此插件。","OWNER_CHANGED": "账号已切换,请用当前账号刷新。","PLUGIN_NOT_FOUND": "当前账号无法查看此插件。",@@ -7321,7 +7321,7 @@"sourceUnverified": "无法确认此插件的安装来源。请打开自己开发的本地插件。","publishingPermissionRequired": "当前账号没有此插件的提交权限。"},- "intro": "管理插件的发布、更新与审核状态",+ "intro": "管理公开市场插件的发布、更新与审核状态","pluginColumn": "插件","latestState": "最新情况","version": "版本",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.jsonindex b3907eb6a7..67dfdc8b5b 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json@@ -7173,7 +7173,7 @@"packageSize": "套件大小:{{size}} 位元組","refreshList": "重新整理列表","refreshDetail": "重新整理詳情",- "personalRequired": "請切換至個人帳號查看我的插件。",+ "signInRequired": "登入後即可管理你向公開市場提交的插件。","permissionDenied": "目前帳號無權發佈此插件。","notFound": "目前帳號無法查看此插件。","accountChanged": "帳號已切換,請使用目前帳號重新整理。",@@ -7274,8 +7274,8 @@"PLUGIN_GHOST_ID_CONFLICT": "此公開插件 ID 已存在,無法透過上傳套件認領。","CONTRIBUTION_OPERATION_NOT_FOUND": "目前帳號無法查看這次提交。","PRECONDITION_FAILED": "目前插件無法提交審核。",- "PERSONAL_CONTEXT_REQUIRED": "請切換至個人帳號查看我的插件。",- "ACCOUNT_REAUTH_REQUIRED": "個人帳號登入狀態已失效,請重新登入後再試。",+ "PERSONAL_CONTEXT_REQUIRED": "登入後即可管理你向公開市場提交的插件。",+ "ACCOUNT_REAUTH_REQUIRED": "登入狀態已失效,請重新登入後再試。","PERMISSION_DENIED": "目前帳號無權發佈此插件。","OWNER_CHANGED": "帳號已切換,請使用目前帳號重新整理。","PLUGIN_NOT_FOUND": "目前帳號無法查看此插件。",@@ -7321,7 +7321,7 @@"sourceUnverified": "無法確認此插件的安裝來源。請開啟自己開發的本機插件。","publishingPermissionRequired": "目前帳號沒有此插件的提交權限。"},- "intro": "管理插件的發布、更新與審核狀態",+ "intro": "管理公開市場插件的發佈、更新與審核狀態","pluginColumn": "插件","latestState": "最新狀態","version": "版本",diff --git a/docs/plugin-community-contribution-contract.md b/docs/plugin-community-contribution-contract.mdindex e3b01cecdc..510e036e51 100644--- a/docs/plugin-community-contribution-contract.md+++ b/docs/plugin-community-contribution-contract.md@@ -6,13 +6,14 @@## 1. 身份与包普通接口前缀 `/api/plugin-contributions`,沿 Host 当前配置的 Plugin Server。-使用普通 Auth Access Token,经 `requireAuth` 验签,必须 `ctx=personal`。+使用普通 Auth Access Token,经 `requireAuth` 验签,接受 `ctx=personal|org`。主体为可信 issuer authority + membershipId;请求体、包内 author、版本或本地安装均不是授权证据。-不接受企业 JWT、GitHub OIDC 或 Platform token,不增加 scope,也不回退鉴权。+公开投稿归当前提交账号本人管理;组织管理员身份不授予其他成员投稿的管理权,不合并个人与组织身份。+组织内部发布和私域插件继续原流程,不通过此入口转为公开。此入口不接受 GitHub OIDC、Connection 或 Platform token,不增加 scope,也不回退鉴权。所有本人响应回显 `subject:{authority,membershipId}`;Host 在返回前核对 owner 和主体。AI 不接触 Bearer、PUT URL 或原包路径。-运行批准和安装来源只代表本机使用事实,不证明作者身份,也不授予发布权。Host 核对可信安装来源;普通市场安装不能自动作为本人开发的新插件首发。已有 public 插件始终要求当前个人主体的精确提交授权。新标识受理是等待人工审核的发布申请,首发事务建立的初始提交权和固定作者关系不表示平台已认证代码作者;服务端不接受客户端自报来源或作者字段代替这些校验。+运行批准和安装来源只代表本机使用事实,不证明作者身份,也不授予发布权。Host 核对可信安装来源;普通市场安装不能自动作为本人开发的新插件首发。已有 public 插件始终要求当前提交主体的精确提交授权。新标识受理是等待人工审核的发布申请,首发事务建立的初始提交权和固定作者关系不表示平台已认证代码作者;服务端不接受客户端自报来源或作者字段代替这些校验。`ghost.json.releaseNotes` 是可选字符串,缺此字段仍可安装。首次上架不要求更新说明,插件用途写在 `description`;从未上架的插件在退回或取消后再提审也不要求更新说明。@@ -27,7 +28,7 @@ AI 不接触 Bearer、PUT URL 或原包路径。- 官方来源继续通过 GitHub Actions OIDC、精确官方仓库名与不变 repository_id 校验,固定署名 Cindy,不能通过个人匿名设置隐藏或变更官方身份。- 个人首发在同一事务绑定已验证的 authority + membershipId;作者归属不随后续提交授权变更。预检或仅上传不占用归属。-- 原作者提审时,Plugin 使用该请求的用户 Token 调用原 Auth `GET /api/me`,核对返回的个人 Membership 与提交身份一致,将昵称保存至已有 `PluginRelease.displayAuthor` 和该次回执的 `manifestView.author`。只读本人资料,Token 不持久化,不新增 Auth 作者 API、公开作者映射或机器凭证。+- 原作者提审时,Plugin 使用该请求的用户 Token 调用原 Auth `GET /api/me`,核对返回的 Membership id 和 kind 与当前提交身份一致,将昵称保存至已有 `PluginRelease.displayAuthor` 和该次回执的 `manifestView.author`。只读本人资料,Token 不持久化,不新增 Auth 作者 API、公开作者映射或机器凭证。- 改名不会自动同步旧版本;原作者下次提审保存新的昵称。其他维护者提审沿用已保存的原作者署名,不能改成维护者本人名字。绑定、昵称快照与审计信息继续完整记录。- 当前仅在生成响应时短路个人署名:公开列表、搜索、详情、本人管理详情及历史内容的展示署名统一返回 null,展示 manifest 不含作者;不受已保存的 anonymous 偏好影响,也不通过个人昵称搜索命中。读取投影不改写数据库中的作者绑定、版本昵称或回执内容。- `PATCH /api/plugin-contributions/plugins/:pluginId/author-settings` 保留原个人鉴权、写限流和固定作者归属校验,只接受 `{anonymous:boolean}`。保存偏好不改变当前个人署名统一隐藏的返回规则,客户端界面不提供开关。提交 ACL 不授予该设置权限,原作者失去提交权也不会因此失去固定归属。可选 `authorSettings:{anonymous,canEdit}|null` 仍表示服务端保存的事实,不接受客户端指定作者、Auth 来源或昵称。@@ -160,7 +161,7 @@ Web / CLI 沿用原 approve/reject 请求及 `expectedReleaseUpdatedAt` 修订`20261016010000_plugin_review_cancellation` 只扩 review enum cancelled 和审计索引;个人三表与旧审计修订触发器仍由前一 migration 提供。-个人投稿接口部署后即可使用,沿普通个人登录及当前插件权限校验,不增加启用开关或开通资格。+公开投稿接口部署后即可使用,个人或组织成员沿当前登录身份及当前插件权限校验,不增加启用开关或开通资格。不清理或迁移旧 GitHub/组织待审队列;旧渠道继续原流程。历史 migration 的开关注释已不适用,保留已应用迁移的校验和。新增 cancelled 的 reader 兼容须在合并部署前核实,不得让不支持该值的旧 reader 与新写入混跑;写入后回滚须保留兼容 reader。diff --git a/docs/plugin-community-contribution.md b/docs/plugin-community-contribution.mdindex d500e3e213..efce0ae31f 100644--- a/docs/plugin-community-contribution.md+++ b/docs/plugin-community-contribution.md@@ -21,7 +21,8 @@选择框打开后独立完整读取本人插件版本事实,不受管理列表搜索和分页影响。已知当前版本已提审、插件有待审版本或无提交权时,在选项内直接说明并禁止选择;未知或读取失败时不冒充可提交。选中后的实际包预检仍是最终提交条件;限制或错误固定显示在底部按钮上方,不藏在用途、更新说明的滚动区域中。首次发布沿“我的插件 → 发布插件 → 选择本地版本 → 提交审核”,新版沿已有管理详情提交,审核结果仍在同一管理详情查看,不把 Agent 的调用步骤作为用户页面。不能发布的实例仍在详情固定位置显示实际原因(保留标识、组织/私域、身份或权限批准未就绪),安装不表示作者权,最终仍由 Main、服务端核验私域台账与 public ACL。-未登录或组织身份复用现有登录、切个人账号入口;登录意图只在内存保存,+个人账号和组织成员均可按当前登录身份向公开市场投稿,作者和管理权归提交者本人,组织管理员不因此获得其他成员投稿的管理权。组织内部发布及私域插件继续原流程。+未登录时复用现有登录入口;登录意图只在内存保存,恢复时必须匹配原物理实例键、安装目录和批准记录,再按当前账号重新准备。另一个账号的同 ID 安装不会自动代替原目标。列表支持服务端搜索、筛选与分页,每行以插件为主体,分别列出本地版本、当前上架版本和最近提审;列表只展示服务端已收到的插件提交,不把未完成上传当作插件记录。上传与提交过程留在原提交按钮中,失败原因也在该次提交时显示。@@ -54,7 +55,7 @@## 当前包与提交- 包快照沿 `exportGhostPackage.ts` 和既有 inspect 校验,固定实际安装字节;系统导出保持原行为。临时包只属于当前预览或本次提交,不建立持久包历史。-- `api.ts` 沿 Main 个人 Access Token 与可信 issuer 核验,服务端验签并判定 public 权限;不借用企业或 Platform 身份。+- `api.ts` 沿 Main 当前账号的 Auth Access Token 与可信 issuer 核验,token 的 sub/ctx 必须匹配当前登录身份;服务端验签并判定 public 权限,不借用其他账号或 Platform 身份。- Main 统一执行准备上传票据、上传和提交;页面及 Agent 只跟随本次进度。prepare 与 PUT 不会创建待审版本,失败后释放临时包,不保存可恢复上传任务。- 发送 commit 前仅记录尚未确认请求的服务端 operationId、目标/包摘要及安装绑定;响应丢失时,下一次正常提交先查询原请求,必要时提交同一 operation,不重复上传。确定终态后清除该记录,不保留完整回执、本地 phase/stage 或终态历史。- 未确认记录按账号隔离,不保存 Bearer、PUT 票据或临时包路径,不读取持久文件里的路径执行清理。共用 userData 的 passive 实例不能写入;页面、登录和应用重启不自动提交。普通对话结束后当前已授权提交可继续,账号、任务权限或安装变化仍阻止后续写入。@@ -63,7 +64,7 @@或 `unchanged`;上传包 SHA 与实际 Release SHA 分开。审核状态属于对应修订,市场可用以 `available`为准。旧版上架而新版被退回时,两者同时保留;历史按独立 eventId 展示,不能把同修订事件压成一条。-上传动作只做有限的操作处理查询。人工审核结果在个人账号的应用前台按 60 秒间隔及打开、手动刷新、回到前台或网络恢复时读取;应用内保留审核结果未读标记,不发送外部消息,后台不可见时不查询。+上传动作只做有限的操作处理查询。人工审核结果在当前登录账号的应用前台按 60 秒间隔及打开、手动刷新、回到前台或网络恢复时读取;应用内保留审核结果未读标记,不发送外部消息,后台不可见时不查询。离线保留当前账号上次查询快照及时间并标明失败;查询失败不冒充空列表。换账号清空视图缓存,不显示旧账号原因或内容。@@ -89,7 +90,7 @@## AI 与特权边界`ghost_contribution_prepare`、`ghost_contribution_submit`、`ghost_contribution_status`、-`ghost_contribution_stop`、`ghost_cancel_plugin_review`、`ghost_my_plugins` 是普通个人作者的独立能力入口;旧企业 Forge 发布保持原行为。+`ghost_contribution_stop`、`ghost_cancel_plugin_review`、`ghost_my_plugins` 是当前登录账号向公开市场投稿的独立能力入口;个人和组织成员均可使用,旧企业 Forge 发布保持原行为。读取工具支持列表、精确详情、历史游标和指定 submission 留存内容。提交沿当前任务 Full Access / Auto / Ask,不再增加最后人工点击;安装许可不证明公开发布权。AI 不获得 Bearer、PUT URL、受管文件路径或审核权限。diff --git a/i18n/GLOSSARY.md b/i18n/GLOSSARY.mdindex 1c2eb6e0ed..96d6c9f388 100644--- a/i18n/GLOSSARY.md+++ b/i18n/GLOSSARY.md@@ -445,7 +445,7 @@ issue #882:模型管理/新对话选择器的分类标签,对应 Gateway mod### My Plugins-个人账号发布插件、查看发布情况与发布记录的页面,区别于本机已安装插件和旧企业我的发布。+当前登录账号向公开市场发布插件、查看发布情况与发布记录的页面,个人和组织成员均可使用;区别于本机已安装插件和旧企业我的发布。### Not signed indiff --git a/i18n/glossary.json b/i18n/glossary.jsonindex 2ec0bcdf13..9a91251f36 100644--- a/i18n/glossary.json+++ b/i18n/glossary.json@@ -17,7 +17,7 @@{"id": "dissolve-group", "status": "proposed", "en": "Dissolve group", "translations": {"zh-CN": "解散群聊", "zh-TW": "解散群聊", "ja": "グループを解散", "ko": "그룹 해산"}, "checkCase": false, "note": "Irreversible group termination, distinct from archive, leave and personal list removal."},{"id": "bot-market", "status": "proposed", "en": "Discover Teammates", "translations": {"zh-CN": "发现伙伴", "zh-TW": "發現夥伴", "ja": "仲間を探す", "ko": "동료 찾기"}, "checkCase": false, "note": "预制伙伴目录与邀请入口,仅 Desktop。入口菜单项与弹窗标题同用 bots.market.heading,不再另设英文品牌名 Bot Market;英文句中小写 teammates(Discover teammates 作动作时),作功能名保持 Discover Teammates。"},{"id": "plugin-anonymous-publishing", "status": "proposed", "en": "Publish anonymously", "translations": {"zh-CN": "匿名发布", "zh-TW": "匿名發布", "ja": "匿名で公開", "ko": "익명으로 게시"}, "note": "个人插件的公开署名开关,默认开启,原作者可随时修改;不改变固定账号归属,关闭后展示提审时保存的昵称。"},- {"id": "my-plugins", "status": "proposed", "en": "My Plugins", "translations": {"zh-CN": "我的插件", "zh-TW": "我的插件", "ja": "マイプラグイン", "ko": "내 플러그인"}, "note": "个人账号发布插件、查看发布情况与发布记录的页面,区别于本机已安装插件和旧企业我的发布。"},+ {"id": "my-plugins", "status": "proposed", "en": "My Plugins", "translations": {"zh-CN": "我的插件", "zh-TW": "我的插件", "ja": "マイプラグイン", "ko": "내 플러그인"}, "note": "当前登录账号向公开市场发布插件、查看发布情况与发布记录的页面,个人和组织成员均可使用;区别于本机已安装插件和旧企业我的发布。"},{"id": "input-handoff", "status": "proposed", "en": "Input Handoff", "translations": {"zh-CN": "代输入", "zh-TW": "代輸入", "ja": "代理入力", "ko": "대리 입력"}, "checkCase": false, "note": "Agent 遇到需要主人填写的界面(选择、文本、密码、验证码、授权)时,由宿主读出当前一步,主人在本机或远程设备上填写,值只交给宿主、不进模型与记录。不是远程控制。"},{"id": "wallpaper-blur", "status": "proposed", "en": "Wallpaper Blur", "translations": {"zh-CN": "壁纸模糊", "zh-TW": "桌布模糊", "ja": "壁紙のぼかし", "ko": "배경화면 흐림"}, "note": "仅使应用壁纸柔化,不模糊文字或控件;0 为关闭,按用户选择应用于静态图片和视频。"},{"id": "group-owner", "status": "proposed", "en": "Group Owner", "translations": {"zh-CN": "群主", "zh-TW": "群主", "ja": "グループオーナー", "ko": "그룹 소유자"}, "checkCase": false, "note": "Chat Server 的群角色,可由人或伙伴担任;不要与伙伴主人或分工负责人混同。群设置成员行英文可简写 Owner。"},diff --git a/packages/cindy-tools/src/ghost/mcpServer.ts b/packages/cindy-tools/src/ghost/mcpServer.tsindex 62f3709046..256a97f6c0 100644--- a/packages/cindy-tools/src/ghost/mcpServer.ts+++ b/packages/cindy-tools/src/ghost/mcpServer.ts@@ -1536,7 +1536,7 @@ export function createCindyGhostsMcpServer(inputSchema: z.object({ plugin_id: contributionId, release_id: contributionId, sha256: z.string().regex(/^[a-f0-9]{64}$/), revision: z.string().datetime() }).strict() },async ({ plugin_id, release_id, sha256, revision }) => contribute({ action: 'cancel-review', pluginId: plugin_id, release: { releaseId: release_id, sha256, revision } }));server.registerTool('ghost_my_plugins', {- description: '读取当前个人账号的我的插件列表或精确详情。搜索/筛选/分页由服务端执行;详情分当前市场、最近提交、已留存内容和独立处理历史,退回原因完整返回。只查询本人,不审核、不代修、不发通知。修改作者源码后重新安装并使用,再从当前实例准备发布更新,不直接修改 Host 管理的安装目录。历史内容和 releaseNotes 取对应版本提审快照。个人投稿的展示署名暂由服务端返回为空,作者绑定和提审昵称仍完整记录。不从 ghost.json.author 或当前账号昵称补齐。客户端界面与本工具不提供匿名设置;官方 Cindy 与组织规则不变。',+ description: '读取当前登录账号本人向公开市场提交的插件列表或精确详情。个人和组织成员均可使用,组织管理员不因此获得其他成员投稿的管理权。搜索/筛选/分页由服务端执行;详情分当前市场、最近提交、已留存内容和独立处理历史,退回原因完整返回。只查询本人,不审核、不代修、不发通知。修改作者源码后重新安装并使用,再从当前实例准备发布更新,不直接修改 Host 管理的安装目录。历史内容和 releaseNotes 取对应版本提审快照。个人投稿的展示署名暂由服务端返回为空,作者绑定和提审昵称仍完整记录。不从 ghost.json.author 或当前账号昵称补齐。客户端界面与本工具不提供匿名设置;官方 Cindy 与组织规则不变。',inputSchema: z.object({ plugin_id: contributionId.optional(), submission_id: contributionId.optional(), query: z.string().max(200).optional(), filter: z.enum(['all', 'pending', 'needs_action', 'published']).optional(), cursor: z.string().max(4096).optional() }).strict() },async ({ plugin_id, submission_id, ...input }) => {if (submission_id && !plugin_id) return textResult({ ok: false, errorCode: 'INVALID_ARGUMENT' }, true);