Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

chore(plugins): 合入 main 并保留详情分享与发布入口

liugaowei433589a8c211
diff --cc apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx
index ffd4e713cb,acd4b90206..cc1b13d39a
--- a/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx
+++ b/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx
@@@ -1,5 -1,4 +1,6 @@@
+import type { PreparedPluginContribution } from '../../../shared/pluginContributions';
+import { PluginVersionUpdates } from './PluginVersionUpdates';
+ import { PluginShareButton } from './PluginShareButton';
import { Button } from '@/components/ui/button';
import { GithubAccountCard } from '@/features/cc-agent/GithubAccountCard';
import { shouldShowOpenPathError } from '../../../shared/openPathResult';
diff --cc apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx
index 92b6d1f5bf,c4939a55a2..a7c942c479
--- a/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx
+++ b/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx
@@@ -1,6 -1,5 +1,7 @@@
+ import { PluginShareButton } from './PluginShareButton';
import { Button } from '@/components/ui/button';
+import { PluginVersionUpdates } from './PluginVersionUpdates';
+import { ToolsSection } from './GhostPluginDetailView';
import { useId } from 'react';
import { Download, ShieldCheck } from 'lucide-react';
import { useTranslation } from 'react-i18next';
diff --cc apps/desktop/src/renderer/features/plugin/PluginDetailTopBar.tsx
index 83be4d90eb,731c67233b..f64025709b
--- a/apps/desktop/src/renderer/features/plugin/PluginDetailTopBar.tsx
+++ b/apps/desktop/src/renderer/features/plugin/PluginDetailTopBar.tsx
@@@ -1,8 -1,8 +1,8 @@@
/**
* Shared sticky top bar for both Plugin detail surfaces (installed + market).
*
- * Inputs: the back affordance, scroll state, and optional owning page's horizontal frame.
- * Outputs: the back button and, on macOS, the page's own window-drag region.
- * Inputs: back label/handler, scroll state and optional page actions.
++ * Inputs: back label/handler, scroll state, optional page actions and owning page's horizontal frame.
+ * Outputs: the back button, page actions and, on macOS, the window-drag region.
* [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
*/
@@@ -19,8 -19,7 +19,9 @@@ interface PluginDetailTopBarProps
onBack: () => void;
/** 滚动帧是否已离开顶部;顶栏据此从透明切到实底 + hairline。 */
scrolled: boolean;
+ /** 管理页传入与正文共用的宽度和留白;详情页保留默认阅读宽度。 */
+ frameClassName?: string;
+ actions?: ReactNode;
}
/**
@@@ -67,12 -66,7 +68,13 @@@ export function usePluginDetailScrolled
* cindy-dark.ts:131,两端同值),两条线同时出现即为一片 --surface 上相隔 64px 的
* 两条同色平行线;那两端由 ContentHeader 的下边框充当顶部分隔,本行只留实底。
*/
-export function PluginDetailTopBar({ label, onBack, scrolled, actions }: PluginDetailTopBarProps) {
+export function PluginDetailTopBar({
+ label,
+ onBack,
+ scrolled,
+ frameClassName,
++ actions,
+}: PluginDetailTopBarProps) {
const { isMac } = useMacFullscreen();
// Both installed and market detail surfaces share this escape hatch. Let
@@@ -118,12 -112,7 +120,12 @@@
)}
style={isMac ? WINDOW_DRAG_STYLE : undefined}
>
- <div className="mx-auto flex h-16 w-full max-w-[824px] items-center justify-between gap-3 px-8 max-[760px]:px-6">
+ <div
+ className={cn(
- 'flex h-16 items-center',
++ 'flex h-16 items-center justify-between gap-3',
+ frameClassName ?? 'mx-auto w-full max-w-[824px] px-8 max-[760px]:px-6',
+ )}
+ >
<button
type="button"
onClick={onBack}
diff --cc apps/desktop/src/renderer/features/plugin/__tests__/MarketPluginDetailView.test.tsx
index 4f01c34316,cd013651dd..9f4f107170
--- a/apps/desktop/src/renderer/features/plugin/__tests__/MarketPluginDetailView.test.tsx
+++ b/apps/desktop/src/renderer/features/plugin/__tests__/MarketPluginDetailView.test.tsx
@@@ -5,13 -5,17 +5,18 @@@
* @vitest-environment jsdom
*/
-import { render, screen } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';
-vi.mock('react-i18next', () => ({
+vi.mock('react-i18next', async (importOriginal) => ({
+ ...await importOriginal<typeof import('react-i18next')>(),
useTranslation: () => ({ t: (key: string, options?: { value?: string }) => options?.value !== undefined ? `${options.value} ${key}` : key, i18n: { language: 'en' } }),
}));
+ // The public share action reads the current account; these detail/install cases
+ // keep it signed out without loading the application's account lifecycle.
+ vi.mock('@/contexts/AuthContext', () => ({
+ useAuth: () => ({ isAuthenticated: false, dataOwnerId: null, dataOwnerGeneration: 0 }),
+ }));
import { MarketPluginDetailView } from '../MarketPluginDetailView';
import type { GhostManifest } from '../../../../shared/ghost';
diff --cc apps/desktop/src/shared/ipc-errors.ts
index d6e774b9ae,2e09fca220..172be8209a
--- a/apps/desktop/src/shared/ipc-errors.ts
+++ b/apps/desktop/src/shared/ipc-errors.ts
@@@ -79,9 -77,11 +79,12 @@@ export type IpcErrorCode
| 'INTERNAL'
| 'ALREADY_EXISTS'
| 'PRECONDITION_FAILED'
+ | 'OFFICIAL_PLUGIN_GITHUB_REQUIRED' // 客户端提审限制,不扩展服务端 wire 错误
| 'VOICE_SPEECH_TIMEOUT' // 本机语音合成等待响应或音频读取超时
| 'PROVIDER_GROUP_CHANGED' // 编辑期间组设置已变化,拒绝覆盖,需重新读取
+ | 'SHARE_NOT_CONFIGURED'
+ | 'SHARE_UNAVAILABLE'
+ | 'SHARE_READ_FAILED'
| 'HTML_PREVIEW_TOO_LARGE'
| 'HTML_PREVIEW_UNSUPPORTED'
// 本地模型切换窗口保护的可行动失败原因。device-link 继续降级为
@@@ -347,9 -346,11 +350,12 @@@ const IPC_ERROR_CODES: ReadonlySet<IpcE
'ALREADY_EXISTS',
'IDENTITY_CONFLICT',
'PRECONDITION_FAILED',
+ 'OFFICIAL_PLUGIN_GITHUB_REQUIRED',
'VOICE_SPEECH_TIMEOUT',
'PROVIDER_GROUP_CHANGED',
+ 'SHARE_NOT_CONFIGURED',
+ 'SHARE_UNAVAILABLE',
+ 'SHARE_READ_FAILED',
'HTML_PREVIEW_TOO_LARGE',
'HTML_PREVIEW_UNSUPPORTED',
'MODEL_CONTEXT_USAGE_UNKNOWN',
diff --cc docs/product-rules/agent-user-parity.md
index bea86c28b0,b4d67a8d4a..b91b88c872
--- a/docs/product-rules/agent-user-parity.md
+++ b/docs/product-rules/agent-user-parity.md
@@@ -158,18 -157,6 +158,20 @@@ Host 不因当前输入缺少主人标�
实现见 `maker-ipc/taskActionAuthorization.ts`、`taskActionHost.ts` 与
`mcp-integrations/codexHttpBridge.ts`;回归见各自授权及 HTTP 桥接测试。
+ 伙伴例行任务(2026-10-26):桌面与 `routine_save` 共用每条规则的 `modelOverride`,可选引擎、来源、型号、执行位置、推理强度与 Fast;null 恢复跟随伙伴,省略保留选择。执行记录返回独立 `sessionId`。内置跟进/每天查待办也可选模型,指令与触发条件仍由宿主维护。`sessionMode`(`persistent` 复用同一任务/`fresh` 每次触发新建任务)同样经桌面与 `routine_save` 设置,省略保留原值。跨电脑桌面设置通过 `routines.saveWithModel` 与 `routines.saveWithSessionMode` 能力声明协商;手机仍按现有合同不提供例行任务管理。
+
执行任务的模型可用 `cindy_helper` 的 cindy 类 `report_task_delivery` 报告本轮是否新交付最终结果;只限当前任务执行者,子 Agent 不可代报。三个 Harness 共用此入口;它不结束任务或授予操作权限。跟进通知门控见 `cindy-bots-runtime.md` §6.3。
+
+## 社区插件贡献
+
+普通个人作者的独立入口为 `ghost_contribution_prepare`、`ghost_contribution_submit`、
+`ghost_contribution_status`、`ghost_contribution_stop`、`ghost_my_plugins`、`ghost_cancel_plugin_review`,由 `cindy-tools`
+直接提供工具说明。手动和 AI 复用 Host 的精确安装快照、操作键、回执及个人读取接口;AI 不拿到
+Bearer、PUT 票据或受管文件路径。公开写入遵循当前任务 Full Access / Auto / Ask,不加最后人工点击。
+共享任务访客及既有 helper surface 判为 restricted 的插件托管任务(包括其 Worker)不得读取个人
+个人插件发布资料或执行发布。普通用户自己的 Worker、自动任务沿相同账号边界与任务权限;人工审核不由 Agent 执行。
+客户端提交边界见 [社区贡献实现说明](../plugin-community-contribution.md)。
+
+2026-10-16:个人发布 prepare 返回包内 releaseNotes 和远端只读预检;submit 前重新校验所见快照内容。
+`ghost_cancel_plugin_review` 使用本人版本的精确 revision,区分停止上传与取消审核,沿现有 Full Access/Auto/Ask 授权。
+旧版本包仍可安装,成功提审后的同版本不再支持改包重提。