Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-8220: docs: interactive demos, structured pages and docs for undocumented features (#9498)

苗大e13a902f59bf
diff --git a/apps/docs/app/[lang]/[...slug]/page.tsx b/apps/docs/app/[lang]/[...slug]/page.tsx
index ea09a66326..0548f3f4f6 100644
--- a/apps/docs/app/[lang]/[...slug]/page.tsx
+++ b/apps/docs/app/[lang]/[...slug]/page.tsx
@@ -7,7 +7,7 @@ import {
} from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import defaultMdxComponents from "fumadocs-ui/mdx";
-import { ImageZoom } from "fumadocs-ui/components/image-zoom";
+import { ImageZoom, type ImageZoomProps } from "fumadocs-ui/components/image-zoom";
import type { Metadata } from "next";
import { docsAlternates } from "@/lib/site";
import { i18n, type Lang } from "@/lib/i18n";
@@ -42,7 +42,7 @@ export default async function Page(props: {
...defaultMdxComponents,
// Every markdown image gets the standard Fumadocs lightbox:
// click to zoom to viewport, scroll/Esc/click to dismiss.
- img: (props) => <ImageZoom {...props} />,
+ img: (props) => <ImageZoom {...(props as ImageZoomProps)} />,
a: LocaleLink,
VideoEmbed,
}}
diff --git a/apps/docs/app/[lang]/layout.tsx b/apps/docs/app/[lang]/layout.tsx
index 1362eb58e7..6304998a9a 100644
--- a/apps/docs/app/[lang]/layout.tsx
+++ b/apps/docs/app/[lang]/layout.tsx
@@ -1,5 +1,5 @@
import "../global.css";
-import { RootProvider } from "fumadocs-ui/provider";
+import { RootProvider } from "fumadocs-ui/provider/next";
import { DocsFrameworkProvider } from "@/components/i18n-frame-provider";
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import { Inter, Geist_Mono, Source_Serif_4 } from "next/font/google";
@@ -11,6 +11,7 @@ import { source } from "@/lib/source";
import { i18n, type Lang } from "@/lib/i18n";
import { uiTranslations, localeLabels } from "@/lib/translations";
import { DocsSettings } from "@/components/docs-settings";
+import { DocsSearchDialog } from "@/components/search-dialog";
// Inter (Latin UI face) is exposed under `--font-inter`. The full `--font-sans`
// stack — Inter + the per-locale CJK fallback chain, including the Japanese-first
@@ -92,17 +93,17 @@ export default async function Layout({
locales,
translations: uiTranslations[lang],
}}
- search={{ options: { api: "/docs/api/search" } }}
+ search={{ SearchDialog: DocsSearchDialog, options: { api: "/docs/api/search" } }}
>
<DocsFrameworkProvider>
<DocsLayout
tree={source.getPageTree(lang)}
- // Suppress Fumadocs's default sidebar-footer icons (theme +
- // language + search). Our custom <DocsSettings> is mounted as
- // the sidebar footer instead — two labelled buttons, not three
- // icons.
+ // Theme and language live in our <DocsSettings> sidebar footer
+ // (two labelled buttons), so Fumadocs's own controls for them are
+ // off. Its search toggle stays: the search bar atop the sidebar
+ // and the icon in the mobile header open the ⌘K dialog.
themeSwitch={{ enabled: false }}
- searchToggle={{ enabled: false }}
+ slots={{ languageSelect: false }}
sidebar={{ footer: <DocsSettings locale={lang} /> }}
{...baseOptions}
>
diff --git a/apps/docs/app/[lang]/page.tsx b/apps/docs/app/[lang]/page.tsx
index 99b1af02a0..a9f21798f9 100644
--- a/apps/docs/app/[lang]/page.tsx
+++ b/apps/docs/app/[lang]/page.tsx
@@ -2,7 +2,7 @@ import { source } from "@/lib/source";
import { DocsPage, DocsBody } from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import defaultMdxComponents from "fumadocs-ui/mdx";
-import { ImageZoom } from "fumadocs-ui/components/image-zoom";
+import { ImageZoom, type ImageZoomProps } from "fumadocs-ui/components/image-zoom";
import type { Metadata } from "next";
import { DocsHero } from "@/components/hero";
import { NumberedCards, NumberedCard, NumberedSteps, Step } from "@/components/editorial";
@@ -60,7 +60,7 @@ export default async function Page({
components={{
...defaultMdxComponents,
// Same lightbox mapping as [...slug]/page.tsx — keep in sync.
- img: (props) => <ImageZoom {...props} />,
+ img: (props) => <ImageZoom {...(props as ImageZoomProps)} />,
a: LocaleLink,
NumberedCards,
NumberedCard,
diff --git a/apps/docs/app/global.css b/apps/docs/app/global.css
index 83aa08aa97..12f4e1c3ab 100644
--- a/apps/docs/app/global.css
+++ b/apps/docs/app/global.css
@@ -1,4 +1,5 @@
@import "tailwindcss";
+@import "tw-animate-css";
@import "fumadocs-ui/css/preset.css";
@import "../../../packages/ui/styles/tokens.css";
@@ -156,6 +157,77 @@ html[lang|="ja"] {
--color-fd-ring: var(--ring);
}
+/* Fumadocs 16 moved these slots out of preset.css into its color themes
+ * (neutral.css etc.). We don't import a theme — its `.dark` block would
+ * override the bridge above — so declare the remaining slots with the
+ * Fumadocs defaults. */
+@theme static {
+ --color-fd-overlay: hsla(0, 0%, 0%, 0.2);
+ --color-fd-info: oklch(62.3% 0.214 259.815);
+ --color-fd-warning: oklch(76.9% 0.188 70.08);
+ --color-fd-error: oklch(63.7% 0.237 25.331);
+ --color-fd-success: oklch(72.3% 0.219 149.579);
+ --color-fd-idea: oklch(70.5% 0.209 60.849);
+ --color-fd-diff-remove: rgba(200, 10, 100, 0.12);
+ --color-fd-diff-remove-symbol: rgb(230, 10, 100);
+ --color-fd-diff-add: rgba(14, 180, 100, 0.1);
+ --color-fd-diff-add-symbol: rgb(10, 200, 100);
+}
+
+/* Interactive demos: the pulse around the control a reader should use next. */
+@keyframes demo-halo {
+ from {
+ box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand) 45%, transparent);
+ }
+ to {
+ box-shadow: 0 0 0 10px color-mix(in oklab, var(--brand) 0%, transparent);
+ }
+}
+
+.demo-halo {
+ animation: demo-halo 1.4s ease-out infinite;
+}
+
+/* The coach-mark arrow nudges toward the control it points at. */
+@keyframes demo-nudge {
+ 50% {
+ translate: var(--demo-nudge);
+ }
+}
+
+.demo-nudge-top,
+.demo-nudge-bottom,
+.demo-nudge-left,
+.demo-nudge-right {
+ animation: demo-nudge 1s ease-in-out infinite;
+}
+
+.demo-nudge-top {
+ --demo-nudge: 0 3px;
+}
+
+.demo-nudge-bottom {
+ --demo-nudge: 0 -3px;
+}
+
+.demo-nudge-left {
+ --demo-nudge: 3px 0;
+}
+
+.demo-nudge-right {
+ --demo-nudge: -3px 0;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .demo-halo,
+ .demo-nudge-top,
+ .demo-nudge-bottom,
+ .demo-nudge-left,
+ .demo-nudge-right {
+ animation: none;
+ }
+}
+
/* Sidebar uses dedicated --sidebar-* tokens so it sits a hair off the main
* canvas. Fumadocs renders it as #nd-sidebar (desktop) and
* #nd-sidebar-mobile (mobile drawer); both IDs need the override. */
@@ -269,7 +341,7 @@ article > p.text-lg {
margin-top: 0 !important;
}
-.prose h2 {
+.prose h2:not(.not-prose) {
font-family: var(--font-serif), ui-serif, serif;
font-size: 1.625rem; /* 26px */
font-weight: 400;
@@ -282,7 +354,7 @@ article > p.text-lg {
}
/* h3 = small uppercase sans label, ruled-bottom — v2 editorial signature */
-.prose h3 {
+.prose h3:not(.not-prose) {
font-family: var(--font-sans), system-ui, sans-serif;
font-size: 0.8125rem; /* 13px */
font-weight: 700;
@@ -295,7 +367,7 @@ article > p.text-lg {
border-bottom: 1px solid var(--border);
}
-.prose h4 {
+.prose h4:not(.not-prose) {
font-family: var(--font-serif), ui-serif, serif;
font-size: 1.0625rem; /* 17px */
font-weight: 500;
@@ -486,7 +558,7 @@ article > p.text-lg {
* (NumberedCards is the showpiece; this keeps non-showpiece pages on tone)
* ------------------------------------------------------------------------- */
-.prose [data-card]:not(.peer) {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *) {
border-radius: 4px !important;
border: 1px solid var(--border) !important;
background: var(--card);
@@ -494,12 +566,12 @@ article > p.text-lg {
transition: border-color 150ms, background-color 150ms !important;
}
-.prose [data-card]:not(.peer):hover {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *):hover {
border-color: var(--primary) !important;
background: var(--card) !important;
}
-.prose [data-card]:not(.peer) > div:first-child {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *) > div:first-child {
box-shadow: none !important;
border-radius: 0 !important;
padding: 0 !important;
@@ -509,11 +581,11 @@ article > p.text-lg {
margin-bottom: 0.75rem !important;
}
-.prose [data-card]:not(.peer) > div:first-child svg {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *) > div:first-child svg {
color: var(--accent-foreground);
}
-.prose [data-card]:not(.peer) h3 {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *) h3 {
font-family: var(--font-serif), serif !important;
font-size: 1.125rem !important;
font-weight: 500 !important;
@@ -527,7 +599,7 @@ article > p.text-lg {
color: var(--foreground) !important;
}
-.prose [data-card]:not(.peer) p {
+.prose [data-card]:not(.peer, :is(h1, h2, h3, h4, h5, h6) > *) p {
color: var(--muted-foreground) !important;
line-height: 1.6;
font-size: 0.9375rem !important;
@@ -735,3 +807,38 @@ article figure.shiki button:hover {
color: var(--foreground) !important;
background: var(--muted) !important;
}
+
+/* Accordion ids exist so links can open an entry; the "copy link" button
+ * Fumadocs adds next to each title only adds noise, so it is hidden. */
+[data-accordion-value] > button[aria-live] {
+ display: none;
+}
+
+/* A Steps item is at least as tall as its number badge plus a gap, so
+ * consecutive one-line steps never stack their badges. */
+.fd-step {
+ min-height: 2.5rem;
+}
+
+/* Fumadocs Tabs: a hairline closes the tab bar and the active underline sits
+ * on it, so the indicator never meets the panel's rounded corner. The hairline
+ * is an inset shadow because the tab bar scrolls horizontally: anything that
+ * reaches past its edge adds a scrollbar. The panel's own radius is dropped;
+ * the outer frame already clips the corners. A lone code block keeps its inset
+ * and border instead of bleeding to the edges, so every tab group reads the
+ * same. */
+[dir][data-orientation="horizontal"]:has(> [role="tablist"]) {
+ > [role="tablist"] {
+ box-shadow: inset 0 -1px 0 var(--border);
+ }
+ > [role="tablist"] > [role="tab"] {
+ border-bottom-width: 2px;
+ }
+ > [role="tabpanel"] {
+ border-radius: 0;
+ }
+ > [role="tabpanel"] > figure:only-child {
+ margin: 0;
+ border-style: solid;
+ }
+}
diff --git a/apps/docs/components/demos/agent-access-demo.tsx b/apps/docs/components/demos/agent-access-demo.tsx
new file mode 100644
index 0000000000..c4c57cfcb5
--- /dev/null
+++ b/apps/docs/components/demos/agent-access-demo.tsx
@@ -0,0 +1,380 @@
+"use client";
+
+import { useState } from "react";
+import { ArrowLeft, Check, Globe, Lock, Minus, Users } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+import { useDocsLocale } from "@/components/locale-link";
+import { demoChromeCopy } from "@/lib/translations";
+
+type Scope = "private" | "workspace" | "members";
+type Person = { name: string; owner: boolean };
+
+const SCOPES: Scope[] = ["private", "workspace", "members"];
+const SCOPE_ICON = { private: Lock, workspace: Globe, members: Users } as const;
+
+const copy = {
+ en: {
+ title: "Ops helper · Access",
+ sectionTitle: "Who can run this agent",
+ scopes: {
+ private: { title: "Only me", desc: "Only you can run this agent" },
+ workspace: { title: "Entire workspace", desc: "All workspace members can run this agent" },
+ members: { title: "Specific people", desc: "Only the people you pick can run this agent" },
+ } as Record<Scope, { title: string; desc: string }>,
+ targetRequired: "Select at least one person before saving.",
+ save: "Save",
+ effectTitle: "What each member sees",
+ pickerCol: "Assignee picker",
+ mentionCol: "@mention",
+ ownerBadge: "Agent owner",
+ memberBadge: "Member",
+ canPick: "Can pick",
+ canMention: "Starts a run",
+ hidden: "Not listed",
+ people: [
+ { name: "You", owner: true },
+ { name: "Lei Li", owner: false },
+ { name: "Meimei Han", owner: false },
+ ] as Person[],
+ captions: {
+ idle: "You own Ops helper, and right now only you can run it.",
+ pickWorkspace: "Lei Li and Meimei Han can't see Ops helper at all. Pick Entire workspace to open it to every member.",
+ saveWorkspace: "Choosing a scope only changes the draft; nothing applies until you save. Click Save.",
+ pickMembers: "Saved: every member can now assign Ops helper and @mention it. Next, narrow it with Specific people.",
+ checkMember: "Specific people needs at least one person before it can be saved. Check Lei Li.",
+ saveMembers: "You're always included as the owner. Click Save.",
+ done: "Only you and Lei Li can run Ops helper now; Meimei Han no longer sees it. Use Replay to start over.",
+ },
+ },
+ zh: {
+ title: "运营助手 · 访问权限",
+ sectionTitle: "谁可以运行该智能体",
+ scopes: {
+ private: { title: "仅自己", desc: "只有你可以运行该智能体" },
+ workspace: { title: "整个工作区", desc: "默认允许工作区内所有成员运行该智能体" },
+ members: { title: "指定成员", desc: "只有你选择的人可以运行该智能体" },
+ } as Record<Scope, { title: string; desc: string }>,
+ targetRequired: "保存前,请至少选择一名成员。",
+ save: "保存",
+ effectTitle: "每位成员看到的",
+ pickerCol: "负责人选择器",
+ mentionCol: "@提及",
+ ownerBadge: "智能体 owner",
+ memberBadge: "普通成员",
+ canPick: "可以选择",
+ canMention: "触发运行",
+ hidden: "看不到",
+ people: [
+ { name: "你", owner: true },
+ { name: "李雷", owner: false },
+ { name: "韩梅梅", owner: false },
+ ] as Person[],
+ captions: {
+ idle: "运营助手 的 owner 是你,现在只有你能运行它。",
+ pickWorkspace: "李雷和韩梅梅完全看不到运营助手。选择\"整个工作区\",把它开放给所有成员。",
+ saveWorkspace: "选中某一档只改了草稿,保存后才生效。点击保存。",
+ pickMembers: "已保存:所有成员都能把任务分配给运营助手,也能 @它。接下来用\"指定成员\"收窄范围。",
+ checkMember: "\"指定成员\"至少要选一个人才能保存。勾选李雷。",
+ saveMembers: "你是 owner,始终可以运行,不用勾选自己。点击保存。",
+ done: "现在只有你和李雷能运行运营助手,韩梅梅看不到它了。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "運用アシスタント · アクセス",
+ sectionTitle: "このエージェントを実行できるユーザー",
+ scopes: {
+ private: { title: "プライベート", desc: "あなただけがこのエージェントを実行できます" },
+ workspace: { title: "ワークスペースに公開", desc: "このワークスペースの全員がこのエージェントを実行できます" },
+ members: { title: "特定のメンバーに公開", desc: "選択した人だけがこのエージェントを実行できます" },
+ } as Record<Scope, { title: string; desc: string }>,
+ targetRequired: "保存する前に、ワークスペースまたは1人以上のメンバーを選択してください。",
+ save: "保存",
+ effectTitle: "各メンバーに見える内容",
+ pickerCol: "担当者の選択",
+ mentionCol: "@メンション",
+ ownerBadge: "エージェントのオーナー",
+ memberBadge: "メンバー",
+ canPick: "選択できる",
+ canMention: "実行が始まる",
+ hidden: "表示されない",
+ people: [
+ { name: "あなた", owner: true },
+ { name: "李雷", owner: false },
+ { name: "韓梅梅", owner: false },
+ ] as Person[],
+ captions: {
+ idle: "運用アシスタントのオーナーはあなたで、今はあなたしか実行できません。",
+ pickWorkspace: "李雷と韓梅梅には運用アシスタントがまったく見えていません。「ワークスペースに公開」を選んで、全メンバーに開放します。",
+ saveWorkspace: "選んだだけでは下書きが変わるだけで、保存するまで反映されません。「保存」をクリックします。",
+ pickMembers: "保存しました。全メンバーが運用アシスタントにタスクを割り当て、@メンションできます。次は「特定のメンバーに公開」で範囲を絞ります。",
+ checkMember: "「特定のメンバーに公開」は 1 人以上選ばないと保存できません。李雷にチェックを入れます。",
+ saveMembers: "オーナーのあなたは常に実行できるので、自分を選ぶ必要はありません。「保存」をクリックします。",
+ done: "運用アシスタントを実行できるのはあなたと李雷だけになり、韓梅梅には表示されなくなりました。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "운영 도우미 · 접근 권한",
+ sectionTitle: "이 에이전트를 실행할 수 있는 사용자",
+ scopes: {
+ private: { title: "비공개", desc: "나만 이 에이전트를 실행할 수 있습니다" },
+ workspace: { title: "워크스페이스에 공개", desc: "이 워크스페이스의 모든 사람이 이 에이전트를 실행할 수 있습니다" },
+ members: { title: "특정 사용자에게 공개", desc: "선택한 사람만 이 에이전트를 실행할 수 있습니다" },
+ } as Record<Scope, { title: string; desc: string }>,
+ targetRequired: "저장하기 전에 워크스페이스 또는 한 명 이상의 사용자를 선택하세요.",
+ save: "저장",
+ effectTitle: "멤버별로 보이는 결과",
+ pickerCol: "담당자 선택",
+ mentionCol: "@멘션",
+ ownerBadge: "에이전트 소유자",
+ memberBadge: "멤버",
+ canPick: "선택 가능",
+ canMention: "실행 시작",
+ hidden: "표시 안 됨",
+ people: [
+ { name: "나", owner: true },
+ { name: "리레이", owner: false },
+ { name: "한메이메이", owner: false },
+ ] as Person[],
+ captions: {
+ idle: "운영 도우미의 소유자는 나이고, 지금은 나만 실행할 수 있습니다.",
+ pickWorkspace: "리레이와 한메이메이에게는 운영 도우미가 아예 보이지 않습니다. 워크스페이스에 공개를 골라 모든 멤버에게 엽니다.",
+ saveWorkspace: "범위를 고르기만 하면 초안만 바뀌고, 저장해야 적용됩니다. 저장을 클릭하세요.",
+ pickMembers: "저장했습니다. 이제 모든 멤버가 운영 도우미에게 태스크를 할당하고 @멘션할 수 있습니다. 다음으로 특정 사용자에게 공개로 범위를 좁힙니다.",
+ checkMember: "특정 사용자에게 공개는 한 명 이상 골라야 저장할 수 있습니다. 리레이를 체크하세요.",
+ saveMembers: "소유자인 나는 항상 실행할 수 있으니 나를 따로 고를 필요는 없습니다. 저장을 클릭하세요.",
+ done: "이제 운영 도우미는 나와 리레이만 실행할 수 있고, 한메이메이에게는 보이지 않습니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Assistant ops · Accès",
+ sectionTitle: "Qui peut exécuter cet agent",
+ scopes: {
+ private: { title: "Moi uniquement", desc: "Vous seul pouvez exécuter cet agent" },
+ workspace: { title: "Tout l'espace de travail", desc: "Tous les membres de l'espace de travail peuvent exécuter cet agent" },
+ members: { title: "Personnes précises", desc: "Seules les personnes que vous choisissez peuvent exécuter cet agent" },
+ } as Record<Scope, { title: string; desc: string }>,
+ targetRequired: "Sélectionnez au moins une personne avant d'enregistrer.",
+ save: "Enregistrer",
+ effectTitle: "Ce que voit chaque membre",
+ pickerCol: "Sélecteur d'assigné",
+ mentionCol: "@mention",
+ ownerBadge: "Propriétaire de l'agent",
+ memberBadge: "Membre",
+ canPick: "Peut le choisir",
+ canMention: "Lance une exécution",
+ hidden: "Absent de la liste",
+ people: [
+ { name: "Vous", owner: true },
+ { name: "Lei Li", owner: false },
+ { name: "Meimei Han", owner: false },
+ ] as Person[],
+ captions: {
+ idle: "Vous êtes propriétaire d'Assistant ops, et pour l'instant vous seul pouvez l'exécuter.",
+ pickWorkspace: "Lei Li et Meimei Han ne voient pas du tout Assistant ops. Choisissez Tout l'espace de travail pour l'ouvrir à tous les membres.",
+ saveWorkspace: "Choisir une option ne modifie que le brouillon ; rien ne s'applique avant l'enregistrement. Cliquez sur Enregistrer.",
+ pickMembers: "Enregistré : tous les membres peuvent maintenant assigner Assistant ops et le @mentionner. Restreignez ensuite avec Personnes précises.",
+ checkMember: "Personnes précises exige au moins une personne pour pouvoir enregistrer. Cochez Lei Li.",
+ saveMembers: "En tant que propriétaire, vous êtes toujours inclus. Cliquez sur Enregistrer.",
+ done: "Seuls vous et Lei Li pouvez désormais exécuter Assistant ops ; Meimei Han ne le voit plus. Cliquez sur Rejouer pour recommencer.",
+ },
+ },
+};
+
+type Phase = "pickWorkspace" | "saveWorkspace" | "pickMembers" | "checkMember" | "saveMembers" | "done";
+
+// The reader walks one fixed path — Only me → Entire workspace → Specific
+// people with Lei Li — so the only enabled control is the next one on it.
+export function AgentAccessDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("pickWorkspace");
+
+ const saved: Scope = phase === "pickWorkspace" || phase === "saveWorkspace"
+ ? "private"
+ : phase === "done"
+ ? "members"
+ : "workspace";
+ const draft: Scope = phase === "pickWorkspace"
+ ? "private"
+ : phase === "saveWorkspace" || phase === "pickMembers"
+ ? "workspace"
+ : "members";
+ const leiChecked = phase === "saveMembers" || phase === "done";
+
+ // Mirrors the invoke gate: the owner always passes; otherwise a workspace
+ // grant admits every member and a member grant only the people listed. A
+ // regular member who can't run an agent doesn't get it in the list at all.
+ const canRun = (person: Person, index: number) =>
+ person.owner || saved === "workspace" || (saved === "members" && index === 1);
+
+ const nextScope: Scope | null = phase === "pickWorkspace" ? "workspace" : phase === "pickMembers" ? "members" : null;
+ const canSave = phase === "saveWorkspace" || phase === "saveMembers";
+
+ const replay = () => setPhase("pickWorkspace");
+
+ const shown = visible;
+ const caption = shown ? t.captions[phase] : t.captions.idle;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="grid gap-4 p-4 sm:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)]">
+ <fieldset className="min-w-0 overflow-hidden rounded-lg border bg-background">
+ <legend className="sr-only">{t.sectionTitle}</legend>
+ <div className="border-b px-3 py-2 text-label font-medium">{t.sectionTitle}</div>
+ <div className="divide-y">
+ {SCOPES.map((scope) => {
+ const Icon = SCOPE_ICON[scope];
+ const selected = draft === scope;
+ const enabled = shown && nextScope === scope;
+ return (
+ <CoachMark quiet key={scope} active={enabled} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="radio"
+ aria-checked={selected}
+ disabled={!enabled}
+ onClick={() => setPhase(scope === "workspace" ? "saveWorkspace" : "checkMember")}
+ className="flex w-full items-start gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-muted/60 disabled:hover:bg-transparent"
+ >
+ <span
+ aria-hidden
+ className={cn(
+ "mt-1.5 flex size-3.5 shrink-0 items-center justify-center rounded-full border",
+ selected ? "border-foreground" : "border-muted-foreground/50",
+ )}
+ >
+ {selected && <span className="size-1.5 rounded-full bg-foreground" />}
+ </span>
+ <span className="flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
+ <Icon aria-hidden className="size-3.5" />
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="flex flex-wrap items-baseline gap-x-2">
+ <span className="text-body font-medium">{t.scopes[scope].title}</span>
+ {enabled && (
+ <InlineHint />
+ )}
+ </span>
+ <span className="block text-caption text-muted-foreground">{t.scopes[scope].desc}</span>
+ </span>
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+
+ {draft === "members" && (
+ <div className="border-t bg-muted/30 px-3 py-3 motion-safe:animate-in motion-safe:fade-in">
+ <div className="divide-y rounded-md border bg-background">
+ {t.people
+ .filter((person) => !person.owner)
+ .map((person, i) => {
+ const checked = i === 0 && leiChecked;
+ const enabled = i === 0 && phase === "checkMember";
+ return (
+ <CoachMark quiet key={person.name} active={enabled} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="checkbox"
+ aria-checked={checked}
+ disabled={!enabled}
+ onClick={() => setPhase("saveMembers")}
+ className="flex w-full items-center gap-2.5 px-2.5 py-2 text-left text-body hover:bg-muted/60 disabled:hover:bg-transparent"
+ >
+ <span
+ aria-hidden
+ className={cn(
+ "flex size-4 shrink-0 items-center justify-center rounded-sm border",
+ checked ? "border-foreground bg-foreground text-background" : "border-muted-foreground/50",
+ )}
+ >
+ {checked && <Check className="size-3" />}
+ </span>
+ <DemoAvatar name={person.name} />
+ <span className="truncate">{person.name}</span>
+ {enabled && <InlineHint />}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ {!leiChecked && (
+ <p role="alert" className="mt-2 text-caption text-destructive">
+ {t.targetRequired}
+ </p>
+ )}
+ </div>
+ )}
+
+ <div className="flex justify-end border-t px-3 py-2.5">
+ <CoachMark active={shown && canSave} side="left" ringClassName="rounded-md">
+ <Button
+ type="button"
+ size="sm"
+ disabled={!shown || !canSave}
+ onClick={() => setPhase(phase === "saveWorkspace" ? "pickMembers" : "done")}
+ >
+ {t.save}
+ </Button>
+ </CoachMark>
+ </div>
+ </fieldset>
+
+ <div className="min-w-0">
+ <div className="mb-2 text-caption text-muted-foreground">{t.effectTitle}</div>
+ <ul className="flex flex-col gap-2">
+ {t.people.map((person, i) => {
+ const allowed = canRun(person, i);
+ return (
+ <li key={person.name} className="block rounded-lg border bg-background px-3 py-2">
+ <div className="flex items-center gap-2">
+ <DemoAvatar name={person.name} />
+ <span className="text-label font-medium">{person.name}</span>
+ <span className="rounded-xs bg-muted px-1 text-micro text-muted-foreground">
+ {person.owner ? t.ownerBadge : t.memberBadge}
+ </span>
+ </div>
+ <dl
+ key={`${saved}-${allowed}`}
+ className="mt-1.5 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 pl-7 text-caption motion-safe:animate-in motion-safe:fade-in"
+ >
+ <dt className="text-muted-foreground">{t.pickerCol}</dt>
+ <dd><Verdict ok={allowed}>{allowed ? t.canPick : t.hidden}</Verdict></dd>
+ <dt className="text-muted-foreground">{t.mentionCol}</dt>
+ <dd><Verdict ok={allowed}>{allowed ? t.canMention : t.hidden}</Verdict></dd>
+ </dl>
+ </li>
+ );
+ })}
+ </ul>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
+
+/** The coach-mark hint, placed inside the row so it never covers a neighbour. */
+function InlineHint() {
+ const lang = useDocsLocale();
+ return (
+ <span aria-hidden className="inline-flex items-center gap-0.5 text-caption font-medium text-brand motion-safe:animate-in motion-safe:fade-in">
+ <ArrowLeft className="demo-nudge-right size-3.5 shrink-0" />
+ {demoChromeCopy[lang].click}
+ </span>
+ );
+}
+
+function Verdict({ ok, children }: { ok: boolean; children: string }) {
+ return (
+ <span className={cn("inline-flex items-center gap-1", ok ? "text-foreground" : "text-muted-foreground")}>
+ {ok ? (
+ <Check aria-hidden className="size-3.5 shrink-0 text-success" />
+ ) : (
+ <Minus aria-hidden className="size-3.5 shrink-0" />
+ )}
+ {children}
+ </span>
+ );
+}
diff --git a/apps/docs/components/demos/assign-demo.tsx b/apps/docs/components/demos/assign-demo.tsx
new file mode 100644
index 0000000000..392bd8f217
--- /dev/null
+++ b/apps/docs/components/demos/assign-demo.tsx
@@ -0,0 +1,424 @@
+"use client";
+
+import { useState } from "react";
+import { ChevronDown, X } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Candidate = { name: string; agent: boolean };
+type Status = "todo" | "in_progress" | "in_review";
+
+const copy = {
+ en: {
+ title: "OPS-14 · Put together the new-hire onboarding checklist",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ unassigned: "Unassigned",
+ status: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<Status, string>,
+ agentsGroup: "Agents",
+ membersGroup: "Members",
+ candidates: [
+ { name: "Ops helper", agent: true },
+ { name: "Writing helper", agent: true },
+ { name: "You", agent: false },
+ { name: "Lei Li", agent: false },
+ ] as Candidate[],
+ confirmTitle: "Confirm assignment?",
+ confirmBody: (name: string) => `Assign this issue to ${name}. They'll start right away if the run conditions are met.`,
+ close: "Close",
+ dontStart: "Don't start yet",
+ confirm: "Confirm assignment",
+ queued: "Queued",
+ running: "Running",
+ completed: "Completed",
+ steps: [
+ "Read the issue description and discussion",
+ "Set the status to In Progress",
+ "Collect the onboarding items from IT, admin and HR",
+ "Arrange them by first day and first week",
+ "Set the status to In Review",
+ ],
+ reply: "The onboarding checklist is ready: 18 items grouped by first day and first week. Please review.",
+ captions: {
+ idle: "An issue with no assignee yet.",
+ start: "Hand the whole issue to an agent: click Assignee.",
+ pick: "Pick an agent. Choosing a member only changes the assignee.",
+ confirm: "The confirmation names who will start. Confirm to start now, or keep the assignee without starting.",
+ member: "Assigned to a member: the assignee changed, and no AI coding tool was called.",
+ parked: "The agent is the assignee now, but no run was created. It starts once you ask it to.",
+ running: "A run was created. The agent moves the issue to In Progress as it starts.",
+ done: "Delivered: the agent moved the issue to In Review. Use Replay to try another path.",
+ },
+ },
+ zh: {
+ title: "OPS-14 · 整理新员工入职清单",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ unassigned: "未分配",
+ status: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<Status, string>,
+ agentsGroup: "智能体",
+ membersGroup: "成员",
+ candidates: [
+ { name: "运营助手", agent: true },
+ { name: "文案助手", agent: true },
+ { name: "你", agent: false },
+ { name: "李雷", agent: false },
+ ] as Candidate[],
+ confirmTitle: "确认指派?",
+ confirmBody: (name: string) => `将这个任务指派给 ${name};符合运行条件时会立即开始处理。`,
+ close: "关闭",
+ dontStart: "暂不开始",
+ confirm: "确认指派",
+ queued: "排队中",
+ running: "运行中",
+ completed: "已完成",
+ steps: [
+ "读取任务描述和讨论",
+ "把状态改为 进行中",
+ "汇总 IT、行政、人事三方的入职事项",
+ "按入职第一天、第一周排好顺序",
+ "把状态改为 审核中",
+ ],
+ reply: "入职清单已整理好:按第一天和第一周分组,共 18 项,请检查。",
+ captions: {
+ idle: "一条还没有负责人的任务。",
+ start: "把整条任务交给智能体:点击负责人。",
+ pick: "选择一个智能体。选择成员只会改变负责人。",
+ confirm: "确认窗写明了谁会开始工作。确认后立即开始;暂不开始只保存负责人。",
+ member: "负责人改成了成员:只改变负责人,不会调用 AI 编程工具。",
+ parked: "负责人已经是智能体,但这次没有创建运行;之后向它提出要求时才会开始。",
+ running: "已创建运行。智能体开始工作时把任务改为进行中。",
+ done: "交付完成,智能体把任务改为审核中。点右上角可以换一条路径再试。",
+ },
+ },
+ ja: {
+ title: "OPS-14 · 新入社員のオンボーディングチェックリストを作る",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ unassigned: "未割り当て",
+ status: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<Status, string>,
+ agentsGroup: "エージェント",
+ membersGroup: "メンバー",
+ candidates: [
+ { name: "運用アシスタント", agent: true },
+ { name: "ライティングアシスタント", agent: true },
+ { name: "あなた", agent: false },
+ { name: "李雷", agent: false },
+ ] as Candidate[],
+ confirmTitle: "割り当てを確認しますか?",
+ confirmBody: (name: string) =>
+ `このタスクを ${name} に割り当てます。実行条件を満たす場合はすぐに作業を開始します。`,
+ close: "閉じる",
+ dontStart: "まだ開始しない",
+ confirm: "割り当てを確認",
+ queued: "待機中",
+ running: "実行中",
+ completed: "完了",
+ steps: [
+ "タスクの説明とコメントを読む",
+ "ステータスを 進行中 に変更",
+ "IT・総務・人事からオンボーディングの項目を集める",
+ "初日と最初の 1 週間に分けて並べる",
+ "ステータスを レビュー中 に変更",
+ ],
+ reply: "オンボーディングチェックリストができました。初日と最初の 1 週間に分けて全 18 項目です。確認をお願いします。",
+ captions: {
+ idle: "まだ担当者のいないタスクです。",
+ start: "タスクをまるごとエージェントに任せます。担当者をクリックします。",
+ pick: "エージェントを選びます。メンバーを選ぶと担当者が変わるだけです。",
+ confirm:
+ "確認ダイアログに、誰が作業を始めるかが書かれています。確認するとすぐに始まり、「まだ開始しない」なら担当者だけを保存します。",
+ member: "担当者がメンバーに変わりました。変わったのは担当者だけで、AI コーディングツールは呼び出されていません。",
+ parked: "担当者はエージェントになりましたが、今回は実行が作成されていません。あとで依頼したときに作業を始めます。",
+ running: "実行が作成されました。エージェントは作業を始めるときにタスクを 進行中 にします。",
+ done: "納品されました。エージェントがタスクを レビュー中 に移しました。「もう一度」で別の流れも試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-14 · 신입 사원 온보딩 체크리스트 정리",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ unassigned: "담당자 없음",
+ status: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<Status, string>,
+ agentsGroup: "에이전트",
+ membersGroup: "멤버",
+ candidates: [
+ { name: "운영 도우미", agent: true },
+ { name: "글쓰기 도우미", agent: true },
+ { name: "나", agent: false },
+ { name: "리레이", agent: false },
+ ] as Candidate[],
+ confirmTitle: "할당을 확인할까요?",
+ confirmBody: (name: string) => `이 태스크를 ${name}에게 할당합니다. 실행 조건을 충족하면 바로 시작합니다.`,
+ close: "닫기",
+ dontStart: "아직 시작 안 함",
+ confirm: "할당 확인",
+ queued: "대기 중",
+ running: "실행 중",
+ completed: "완료됨",
+ steps: [
+ "태스크 설명과 댓글 읽기",
+ "상태를 진행 중으로 변경",
+ "IT·총무·인사팀의 온보딩 항목 모으기",
+ "첫날과 첫 주 기준으로 순서 정리",
+ "상태를 리뷰 중으로 변경",
+ ],
+ reply: "온보딩 체크리스트를 정리했습니다. 첫날과 첫 주로 나눠 모두 18개 항목입니다. 확인해 주세요.",
+ captions: {
+ idle: "아직 담당자가 없는 태스크입니다.",
+ start: "태스크 전체를 에이전트에게 맡기려면 담당자를 클릭하세요.",
+ pick: "에이전트를 선택하세요. 멤버를 선택하면 담당자만 바뀝니다.",
+ confirm:
+ "확인 창에 누가 작업을 시작하는지 나옵니다. 확인하면 바로 시작하고, '아직 시작 안 함'을 고르면 담당자만 저장합니다.",
+ member: "담당자가 멤버로 바뀌었습니다. 담당자만 바뀌고 AI 코딩 도구는 호출되지 않았습니다.",
+ parked: "담당자는 이제 에이전트지만 이번에는 실행이 만들어지지 않았습니다. 나중에 요청하면 그때 시작합니다.",
+ running: "실행이 만들어졌습니다. 에이전트가 작업을 시작하면서 태스크를 진행 중으로 바꿉니다.",
+ done: "전달 완료: 에이전트가 태스크를 리뷰 중으로 옮겼습니다. '다시 보기'로 다른 경로도 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-14 · Préparer la checklist d'intégration des nouveaux arrivants",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ unassigned: "Non assigné",
+ status: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<Status, string>,
+ agentsGroup: "Agents",
+ membersGroup: "Membres",
+ candidates: [
+ { name: "Assistant ops", agent: true },
+ { name: "Assistant rédaction", agent: true },
+ { name: "Vous", agent: false },
+ { name: "Lei Li", agent: false },
+ ] as Candidate[],
+ confirmTitle: "Confirmer l'assignation ?",
+ confirmBody: (name: string) =>
+ `Assigner cette tâche à ${name}. Le travail démarrera immédiatement si les conditions d'exécution sont réunies.`,
+ close: "Fermer",
+ dontStart: "Ne pas démarrer maintenant",
+ confirm: "Confirmer l'assignation",
+ queued: "En file d'attente",
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire la description et la discussion de la tâche",
+ "Passer le statut à En cours",
+ "Rassembler les points d'intégration de l'IT, des services généraux et des RH",
+ "Les classer entre premier jour et première semaine",
+ "Passer le statut à En relecture",
+ ],
+ reply:
+ "La checklist d'intégration est prête : 18 points répartis entre le premier jour et la première semaine. Merci de la relire.",
+ captions: {
+ idle: "Une tâche qui n'a pas encore d'assigné.",
+ start: "Confiez toute la tâche à un agent : cliquez sur Assigné à.",
+ pick: "Choisissez un agent. Choisir un membre change seulement l'assigné.",
+ confirm:
+ "La confirmation indique qui va démarrer. Confirmez pour démarrer maintenant, ou gardez l'assigné sans démarrer.",
+ member: "Assignée à un membre : seul l'assigné a changé, aucun outil de codage IA n'a été appelé.",
+ parked: "L'agent est maintenant l'assigné, mais aucune exécution n'a été créée. Il démarrera quand vous le lui demanderez.",
+ running: "Une exécution a été créée. L'agent passe la tâche à En cours en démarrant.",
+ done: "Livré : l'agent a passé la tâche à En relecture. Utilisez Rejouer pour essayer un autre chemin.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "pick" | "confirm" | "member" | "parked" | "running" | "done";
+
+// Index of the step at which the agent updates the issue status.
+const STATUS_STEPS: Partial<Record<number, Status>> = { 2: "in_progress", 5: "in_review" };
+
+const statusDot: Record<Status, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+export function AssignDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("start");
+ const [assignee, setAssignee] = useState<Candidate | null>(null);
+ const [status, setStatus] = useState<Status>("todo");
+ const [queued, setQueued] = useState(true);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+
+ const pick = (candidate: Candidate) => {
+ setAssignee(candidate);
+ setPhase(candidate.agent ? "confirm" : "member");
+ };
+
+ const confirm = () => {
+ setPhase("running");
+ after(1000, () => setQueued(false));
+ t.steps.forEach((_, i) =>
+ after(1000 + i * 1000, () => {
+ setStepsShown(i + 1);
+ const next = STATUS_STEPS[i + 1];
+ if (next) setStatus(next);
+ }),
+ );
+ after(1000 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ setAssignee(null);
+ setStatus("todo");
+ setQueued(true);
+ setStepsShown(0);
+ };
+
+ const runActive = phase === "running";
+ const showRun = (phase === "running" || phase === "done") && assignee;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-80 flex-col gap-3 p-4">
+ <dl className="grid w-fit grid-cols-[auto_auto] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", statusDot[status])} />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="relative">
+ <CoachMark active={shownPhase === "start"} side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={phase === "pick"}
+ disabled={!visible || (phase !== "start" && phase !== "pick")}
+ onClick={() => setPhase(phase === "pick" ? "start" : "pick")}
+ className="-mx-1.5 inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 hover:bg-muted disabled:hover:bg-transparent"
+ >
+ {assignee ? (
+ <>
+ <DemoAvatar name={assignee.name} agent={assignee.agent} />
+ {assignee.name}
+ </>
+ ) : (
+ <span className="text-muted-foreground">{t.unassigned}</span>
+ )}
+ {(phase === "start" || phase === "pick") && (
+ <ChevronDown aria-hidden className="size-3.5 text-muted-foreground" />
+ )}
+ </button>
+ </CoachMark>
+ {phase === "pick" && (
+ <div
+ role="listbox"
+ aria-label={t.assigneeLabel}
+ className="absolute top-full left-0 z-10 mt-1 w-52 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {[true, false].map((isAgent) => (
+ <div key={String(isAgent)}>
+ <div className="px-2 pt-1 pb-0.5 text-micro text-muted-foreground">
+ {isAgent ? t.agentsGroup : t.membersGroup}
+ </div>
+ {t.candidates
+ .filter((c) => c.agent === isAgent)
+ .map((candidate, i) => (
+ <CoachMark
+ key={candidate.name}
+ active={isAgent && i === 0}
+ side="right"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={false}
+ onClick={() => pick(candidate)}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent"
+ >
+ <DemoAvatar name={candidate.name} agent={candidate.agent} />
+ {candidate.name}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ ))}
+ </div>
+ )}
+ </dd>
+ </dl>
+
+ {showRun && (
+ <DemoRun
+ agent={assignee.name}
+ status={phase === "done" ? t.completed : queued ? t.queued : t.running}
+ active={runActive}
+ >
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && runActive ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ )}
+
+ {phase === "done" && assignee && (
+ <DemoComment author={assignee.name} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ {phase === "confirm" && assignee && (
+ <div className="absolute inset-0 z-20 flex items-center justify-center bg-background/60 p-4 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in">
+ <div
+ role="dialog"
+ aria-modal="false"
+ aria-labelledby="assign-demo-title"
+ className="w-full max-w-sm rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:zoom-in-95"
+ >
+ <div className="flex items-start gap-2 p-4 pb-3">
+ <div className="min-w-0 flex-1">
+ <div id="assign-demo-title" className="text-title-sm font-medium">
+ {t.confirmTitle}
+ </div>
+ <div className="mt-1 text-body text-muted-foreground">{t.confirmBody(assignee.name)}</div>
+ </div>
+ <button
+ type="button"
+ aria-label={t.close}
+ onClick={replay}
+ className="rounded-md p-1 text-muted-foreground hover:bg-muted"
+ >
+ <X className="size-4" />
+ </button>
+ </div>
+ <div className="flex justify-end gap-2 rounded-b-xl border-t bg-muted/40 px-4 py-3">
+ <Button type="button" variant="outline" size="sm" onClick={() => setPhase("parked")}>
+ {t.dontStart}
+ </Button>
+ <CoachMark active side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" onClick={confirm}>
+ {t.confirm}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/autopilot-demo.tsx b/apps/docs/components/demos/autopilot-demo.tsx
new file mode 100644
index 0000000000..ddc1b305b9
--- /dev/null
+++ b/apps/docs/components/demos/autopilot-demo.tsx
@@ -0,0 +1,515 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { CheckCircle2, Clock, FastForward, Loader2, Pencil, Play } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type IssueStatus = "todo" | "in_progress" | "in_review";
+type Source = "manual" | "schedule";
+
+const copy = {
+ en: {
+ title: "Autopilot · Weekly customer feedback roundup",
+ breadcrumb: "Autopilot",
+ name: "Weekly customer feedback roundup",
+ active: "Active",
+ edit: "Edit",
+ runNow: "Run now",
+ running: "Running...",
+ toast: "Autopilot triggered",
+ properties: "Properties",
+ agentLabel: "Agent",
+ agent: "Ops helper",
+ modeLabel: "Output Mode",
+ mode: "Create Issue",
+ triggers: "Triggers",
+ schedule: "Schedule",
+ scheduleText: "09:00 · Mon (Asia/Shanghai)",
+ cron: "0 9 * * 1",
+ nextBefore: "Next: Oct 26, 09:00",
+ nextAfter: "Next: Nov 2, 09:00",
+ fastForward: "Skip ahead to Monday 09:00",
+ history: "Run History",
+ noRuns: "No runs yet. Click \"Run now\" to trigger manually.",
+ runStatus: { created: "Issue Created", completed: "Completed" },
+ source: { manual: "Manual", schedule: "Schedule" } as Record<Source, string>,
+ issueLinked: "Issue linked",
+ runTime: { manual: "Oct 24, 15:42", schedule: "Oct 26, 09:00" } as Record<Source, string>,
+ issueTitle: "OPS-31 · Weekly customer feedback roundup",
+ statusLabel: "Status",
+ issueStatus: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<IssueStatus, string>,
+ assigneeLabel: "Assignee",
+ queued: "Queued",
+ workingStatus: "Running",
+ completed: "Completed",
+ steps: [
+ "Read the issue description and discussion",
+ "Set the status to In Progress",
+ "Collect last week's support tickets, survey answers and app reviews",
+ "Group them by problem type and count each group",
+ "Write a one-page weekly report",
+ "Set the status to In Review",
+ ],
+ reply:
+ "Last week's feedback is in: 64 items in five groups. Slow delivery is up the most, with 21 mentions. The one-page report is ready; please review.",
+ captions: {
+ idle: "An autopilot that runs every Monday at 09:00 and creates an issue each time.",
+ ready: "Click \"Run now\" to run the whole flow once. Or skip ahead to Monday 09:00 to watch the schedule fire.",
+ triggering: "Triggering the autopilot...",
+ created: {
+ manual: "The autopilot created issue OPS-31 and assigned it to Ops helper. Run History records a manual run.",
+ schedule: "Monday 09:00 arrived and the schedule fired: the autopilot created issue OPS-31 and assigned it to Ops helper.",
+ } as Record<Source, string>,
+ running: "Ops helper follows the runbook and reports progress on the issue.",
+ done: "The issue moved to In Review, so this autopilot run is marked Completed. Use Replay to try the other trigger.",
+ },
+ },
+ zh: {
+ title: "自动化 · 每周客户反馈整理",
+ breadcrumb: "自动化",
+ name: "每周客户反馈整理",
+ active: "启用",
+ edit: "编辑",
+ runNow: "立即运行",
+ running: "运行中...",
+ toast: "已触发自动化",
+ properties: "属性",
+ agentLabel: "智能体",
+ agent: "运营助手",
+ modeLabel: "输出模式",
+ mode: "创建任务",
+ triggers: "触发器",
+ schedule: "时间表",
+ scheduleText: "09:00 · 周一 (Asia/Shanghai)",
+ cron: "0 9 * * 1",
+ nextBefore: "下次:10月26日 09:00",
+ nextAfter: "下次:11月2日 09:00",
+ fastForward: "快进到周一 09:00",
+ history: "运行历史",
+ noRuns: "暂无运行记录。点击\"立即运行\"手动触发。",
+ runStatus: { created: "已创建任务", completed: "已完成" },
+ source: { manual: "手动", schedule: "时间表" } as Record<Source, string>,
+ issueLinked: "已关联任务",
+ runTime: { manual: "10月24日 15:42", schedule: "10月26日 09:00" } as Record<Source, string>,
+ issueTitle: "OPS-31 · 每周客户反馈整理",
+ statusLabel: "状态",
+ issueStatus: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<IssueStatus, string>,
+ assigneeLabel: "负责人",
+ queued: "排队中",
+ workingStatus: "运行中",
+ completed: "已完成",
+ steps: [
+ "读取任务描述和讨论",
+ "把状态改为 进行中",
+ "汇总上周的客服工单、问卷回复和应用商店评论",
+ "按问题类型归类,统计每类数量",
+ "写成一页周报",
+ "把状态改为 审核中",
+ ],
+ reply: "上周反馈已整理好:共 64 条,分成 5 类,其中\"配送慢\"增加最多,有 21 条。一页周报已写好,请检查。",
+ captions: {
+ idle: "一条每周一 09:00 运行的自动化,每次触发都会创建一条任务。",
+ ready: "点击\"立即运行\",手动执行一次完整流程;也可以快进到周一 09:00,看时间表怎么触发。",
+ triggering: "正在触发自动化...",
+ created: {
+ manual: "自动化创建了任务 OPS-31,交给 运营助手。运行历史记下一次手动运行。",
+ schedule: "到了周一 09:00,时间表触发:自动化创建了任务 OPS-31,交给 运营助手。",
+ } as Record<Source, string>,
+ running: "运营助手 按 Runbook 处理任务,进度写在任务里。",
+ done: "任务进入审核中,这次自动化运行记为已完成。点右上角可以换另一种触发方式再试。",
+ },
+ },
+ ja: {
+ title: "オートパイロット · 毎週の顧客フィードバックまとめ",
+ breadcrumb: "オートパイロット",
+ name: "毎週の顧客フィードバックまとめ",
+ active: "アクティブ",
+ edit: "編集",
+ runNow: "今すぐ実行",
+ running: "実行中...",
+ toast: "オートパイロットを実行しました",
+ properties: "プロパティ",
+ agentLabel: "エージェント",
+ agent: "運用アシスタント",
+ modeLabel: "出力モード",
+ mode: "タスクを作成",
+ triggers: "トリガー",
+ schedule: "スケジュール",
+ scheduleText: "09:00 · 月 (Asia/Shanghai)",
+ cron: "0 9 * * 1",
+ nextBefore: "次回: 10月26日 09:00",
+ nextAfter: "次回: 11月2日 09:00",
+ fastForward: "月曜 09:00 まで早送り",
+ history: "実行履歴",
+ noRuns: "まだ実行履歴がありません。手動で実行するには「今すぐ実行」をクリックしてください。",
+ runStatus: { created: "タスク作成済み", completed: "完了" },
+ source: { manual: "手動", schedule: "スケジュール" } as Record<Source, string>,
+ issueLinked: "タスクをリンク済み",
+ runTime: { manual: "10月24日 15:42", schedule: "10月26日 09:00" } as Record<Source, string>,
+ issueTitle: "OPS-31 · 毎週の顧客フィードバックまとめ",
+ statusLabel: "ステータス",
+ issueStatus: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<IssueStatus, string>,
+ assigneeLabel: "担当者",
+ queued: "待機中",
+ workingStatus: "実行中",
+ completed: "完了",
+ steps: [
+ "タスクの説明と議論を読む",
+ "ステータスを 進行中 にする",
+ "先週のサポートチケット、アンケート回答、アプリレビューを集める",
+ "問題の種類ごとに分類し、件数を数える",
+ "1 ページの週次レポートにまとめる",
+ "ステータスを レビュー中 にする",
+ ],
+ reply:
+ "先週のフィードバックをまとめました。全 64 件を 5 つに分類し、最も増えたのは「配送が遅い」で 21 件です。1 ページのレポートができたので確認をお願いします。",
+ captions: {
+ idle: "毎週月曜 09:00 に動き、そのたびにタスクを作成するオートパイロットです。",
+ ready: "「今すぐ実行」をクリックすると、一連の流れを 1 回手動で実行します。月曜 09:00 まで早送りして、スケジュールでの起動を見ることもできます。",
+ triggering: "オートパイロットを実行しています...",
+ created: {
+ manual: "オートパイロットがタスク OPS-31 を作成し、運用アシスタント に割り当てました。実行履歴には手動の実行が記録されます。",
+ schedule: "月曜 09:00 になりスケジュールが発火しました。オートパイロットがタスク OPS-31 を作成し、運用アシスタント に割り当てました。",
+ } as Record<Source, string>,
+ running: "運用アシスタント が Runbook に沿って作業し、進捗をタスクに書き込みます。",
+ done: "タスクがレビュー中になり、このオートパイロットの実行は完了と記録されました。「もう一度」でもう一方のトリガーも試せます。",
+ },
+ },
+ ko: {
+ title: "오토파일럿 · 주간 고객 피드백 정리",
+ breadcrumb: "오토파일럿",
+ name: "주간 고객 피드백 정리",
+ active: "활성",
+ edit: "수정",
+ runNow: "지금 실행",
+ running: "실행 중...",
+ toast: "오토파일럿을 실행했습니다",
+ properties: "속성",
+ agentLabel: "에이전트",
+ agent: "운영 도우미",
+ modeLabel: "출력 모드",
+ mode: "태스크 생성",
+ triggers: "트리거",
+ schedule: "일정",
+ scheduleText: "09:00 · 월 (Asia/Shanghai)",
+ cron: "0 9 * * 1",
+ nextBefore: "다음: 10월 26일 09:00",
+ nextAfter: "다음: 11월 2일 09:00",
+ fastForward: "월요일 09:00으로 건너뛰기",
+ history: "실행 기록",
+ noRuns: "아직 실행 기록이 없습니다. 수동으로 실행하려면 \"지금 실행\"을 클릭하세요.",
+ runStatus: { created: "태스크 생성됨", completed: "완료됨" },
+ source: { manual: "수동", schedule: "일정" } as Record<Source, string>,
+ issueLinked: "태스크 연결됨",
+ runTime: { manual: "10월 24일 15:42", schedule: "10월 26일 09:00" } as Record<Source, string>,
+ issueTitle: "OPS-31 · 주간 고객 피드백 정리",
+ statusLabel: "상태",
+ issueStatus: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<IssueStatus, string>,
+ assigneeLabel: "담당자",
+ queued: "대기 중",
+ workingStatus: "실행 중",
+ completed: "완료됨",
+ steps: [
+ "태스크 설명과 논의 읽기",
+ "상태를 진행 중으로 변경",
+ "지난주 고객 지원 티켓, 설문 응답, 앱 리뷰 모으기",
+ "문제 유형별로 묶고 유형마다 개수 세기",
+ "한 페이지짜리 주간 보고서 작성",
+ "상태를 리뷰 중으로 변경",
+ ],
+ reply:
+ "지난주 피드백을 정리했습니다. 총 64건을 5개 유형으로 나눴고, 가장 많이 늘어난 것은 \"배송 지연\"으로 21건입니다. 한 페이지 보고서를 작성했으니 확인해 주세요.",
+ captions: {
+ idle: "매주 월요일 09:00에 실행되고, 실행할 때마다 태스크를 만드는 오토파일럿입니다.",
+ ready: "\"지금 실행\"을 클릭하면 전체 흐름을 한 번 수동으로 실행합니다. 월요일 09:00으로 건너뛰어 일정이 실행되는 모습을 볼 수도 있습니다.",
+ triggering: "오토파일럿을 실행하는 중...",
+ created: {
+ manual: "오토파일럿이 태스크 OPS-31을 만들고 운영 도우미에게 할당했습니다. 실행 기록에 수동 실행이 남습니다.",
+ schedule: "월요일 09:00이 되어 일정이 실행되었습니다. 오토파일럿이 태스크 OPS-31을 만들고 운영 도우미에게 할당했습니다.",
+ } as Record<Source, string>,
+ running: "운영 도우미가 Runbook에 따라 작업하고 진행 상황을 태스크에 남깁니다.",
+ done: "태스크가 리뷰 중으로 바뀌어 이번 오토파일럿 실행은 완료됨으로 기록되었습니다. \"다시 보기\"로 다른 트리거도 시도해 보세요.",
+ },
+ },
+ fr: {
+ title: "Automatisation · Synthèse hebdomadaire des retours clients",
+ breadcrumb: "Automatisation",
+ name: "Synthèse hebdomadaire des retours clients",
+ active: "Active",
+ edit: "Modifier",
+ runNow: "Exécuter maintenant",
+ running: "Exécution...",
+ toast: "Automatisation déclenchée",
+ properties: "Propriétés",
+ agentLabel: "Agent",
+ agent: "Assistant ops",
+ modeLabel: "Mode de sortie",
+ mode: "Créer une tâche",
+ triggers: "Déclencheurs",
+ schedule: "Planification",
+ scheduleText: "09:00 · lun. (Asia/Shanghai)",
+ cron: "0 9 * * 1",
+ nextBefore: "Prochaine : 26 oct., 09:00",
+ nextAfter: "Prochaine : 2 nov., 09:00",
+ fastForward: "Avancer jusqu'à lundi 09:00",
+ history: "Historique des exécutions",
+ noRuns: "Aucune exécution pour l'instant. Cliquez sur « Exécuter maintenant » pour déclencher manuellement.",
+ runStatus: { created: "Tâche créée", completed: "Terminée" },
+ source: { manual: "Manuelle", schedule: "Planification" } as Record<Source, string>,
+ issueLinked: "Tâche liée",
+ runTime: { manual: "24 oct., 15:42", schedule: "26 oct., 09:00" } as Record<Source, string>,
+ issueTitle: "OPS-31 · Synthèse hebdomadaire des retours clients",
+ statusLabel: "Statut",
+ issueStatus: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<IssueStatus, string>,
+ assigneeLabel: "Assigné à",
+ queued: "En file d'attente",
+ workingStatus: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire la description et la discussion de la tâche",
+ "Passer le statut à En cours",
+ "Rassembler les tickets support, les réponses au questionnaire et les avis de l'app de la semaine dernière",
+ "Les regrouper par type de problème et compter chaque groupe",
+ "Rédiger un rapport hebdomadaire d'une page",
+ "Passer le statut à En relecture",
+ ],
+ reply:
+ "Les retours de la semaine dernière sont regroupés : 64 éléments en cinq groupes. La lenteur de livraison progresse le plus, avec 21 mentions. Le rapport d'une page est prêt ; merci de le relire.",
+ captions: {
+ idle: "Une automatisation qui tourne chaque lundi à 09:00 et crée une tâche à chaque fois.",
+ ready: "Cliquez sur « Exécuter maintenant » pour dérouler le flux complet une fois. Ou avancez jusqu'à lundi 09:00 pour voir la planification se déclencher.",
+ triggering: "Déclenchement de l'automatisation...",
+ created: {
+ manual: "L'automatisation a créé la tâche OPS-31 et l'a assignée à Assistant ops. L'historique des exécutions enregistre une exécution manuelle.",
+ schedule: "Lundi 09:00 est arrivé et la planification s'est déclenchée : l'automatisation a créé la tâche OPS-31 et l'a assignée à Assistant ops.",
+ } as Record<Source, string>,
+ running: "Assistant ops suit le runbook et rend compte de l'avancement dans la tâche.",
+ done: "La tâche est passée à En relecture, donc cette exécution de l'automatisation est marquée Terminée. Rejouer permet d'essayer l'autre déclencheur.",
+ },
+ },
+};
+
+type Phase = "idle" | "ready" | "triggering" | "created" | "running" | "done";
+
+// Index of the step at which the agent updates the issue status.
+const STATUS_STEPS: Partial<Record<number, IssueStatus>> = { 2: "in_progress", 6: "in_review" };
+
+const issueDot: Record<IssueStatus, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+export function AutopilotDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [cycle, setCycle] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [source, setSource] = useState<Source>("manual");
+ const [issueStatus, setIssueStatus] = useState<IssueStatus>("todo");
+ const [stepsShown, setStepsShown] = useState(0);
+ const [toast, setToast] = useState(false);
+
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ after(500, () => setPhase("ready"));
+ }, [visible, cycle, after, clear]);
+
+ const startRun = (from: number) => {
+ after(from, () => setPhase("running"));
+ t.steps.forEach((_, i) =>
+ after(from + 1000 + i * 1000, () => {
+ setStepsShown(i + 1);
+ const next = STATUS_STEPS[i + 1];
+ if (next) setIssueStatus(next);
+ }),
+ );
+ after(from + 1000 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const runNow = () => {
+ setSource("manual");
+ setPhase("triggering");
+ after(700, () => {
+ setPhase("created");
+ setToast(true);
+ });
+ after(2700, () => setToast(false));
+ startRun(2600);
+ };
+
+ const fastForward = () => {
+ setSource("schedule");
+ setPhase("created");
+ startRun(2200);
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("idle");
+ setSource("manual");
+ setIssueStatus("todo");
+ setStepsShown(0);
+ setToast(false);
+ setCycle((c) => c + 1);
+ };
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const fired = shownPhase === "created" || shownPhase === "running" || shownPhase === "done";
+ const caption =
+ shownPhase === "created" ? t.captions.created[source] : t.captions[shownPhase];
+ const runStatus = shownPhase === "done" ? t.completed : shownPhase === "running" ? t.workingStatus : t.queued;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="relative flex min-h-96 flex-col gap-4 p-4">
+ <div className="flex flex-wrap items-center gap-2">
+ <span className="text-caption text-muted-foreground">{t.breadcrumb} /</span>
+ <span className="min-w-0 truncate text-body font-medium">{t.name}</span>
+ <span className="inline-flex items-center gap-1.5 text-caption font-medium text-success">
+ <span aria-hidden className="inline-flex h-4 w-7 items-center rounded-full bg-success/80 p-0.5">
+ <span className="ml-auto size-3 rounded-full bg-background" />
+ </span>
+ {t.active}
+ </span>
+ <span className="ml-auto flex items-center gap-1.5">
+ <Button type="button" size="sm" variant="outline" disabled>
+ <Pencil />
+ {t.edit}
+ </Button>
+ <CoachMark active={shownPhase === "ready"} side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={shownPhase !== "ready"} onClick={runNow}>
+ {shownPhase === "triggering" ? <Loader2 className="motion-safe:animate-spin" /> : <Play />}
+ {shownPhase === "triggering" ? t.running : t.runNow}
+ </Button>
+ </CoachMark>
+ </span>
+ </div>
+
+ <div className="grid gap-4 sm:grid-cols-2">
+ <section className="flex min-w-0 flex-col gap-2">
+ <div className="text-caption font-medium text-muted-foreground">{t.properties}</div>
+ <dl className="grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-4 gap-y-1.5 text-body">
+ <dt className="text-caption text-muted-foreground">{t.agentLabel}</dt>
+ <dd className="flex min-w-0 items-center gap-1.5">
+ <DemoAvatar name={t.agent} agent />
+ <span className="truncate">{t.agent}</span>
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.modeLabel}</dt>
+ <dd>{t.mode}</dd>
+ </dl>
+ </section>
+
+ <section className="flex min-w-0 flex-col gap-2">
+ <div className="text-caption font-medium text-muted-foreground">{t.triggers}</div>
+ <div className="flex items-start gap-2.5 rounded-md border bg-background px-3 py-2">
+ <Clock aria-hidden className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
+ <div className="min-w-0 flex-1">
+ <div className="text-body font-medium">{t.schedule}</div>
+ <div className="text-caption text-muted-foreground">{t.scheduleText}</div>
+ <div className="font-mono text-micro text-muted-foreground">{t.cron}</div>
+ <div key={String(fired && source === "schedule")} className="text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ {fired && source === "schedule" ? t.nextAfter : t.nextBefore}
+ </div>
+ </div>
+ </div>
+ <Button
+ type="button"
+ size="xs"
+ variant="ghost"
+ className="self-start text-muted-foreground"
+ disabled={shownPhase !== "ready"}
+ onClick={fastForward}
+ >
+ <FastForward />
+ {t.fastForward}
+ </Button>
+ </section>
+ </div>
+
+ <section className="flex min-w-0 flex-col gap-2">
+ <div className="text-caption font-medium text-muted-foreground">{t.history}</div>
+ <div className="overflow-hidden rounded-md border bg-background">
+ {fired ? (
+ <div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-body motion-safe:animate-in motion-safe:fade-in">
+ {shownPhase === "done" ? (
+ <CheckCircle2 aria-hidden className="size-4 shrink-0 text-success" />
+ ) : (
+ <Clock aria-hidden className="size-4 shrink-0 text-info" />
+ )}
+ <span className={cn("w-20 shrink-0 text-caption font-medium", shownPhase === "done" ? "text-success" : "text-info")}>
+ {shownPhase === "done" ? t.runStatus.completed : t.runStatus.created}
+ </span>
+ <span className="shrink-0 text-caption text-muted-foreground">{t.source[source]}</span>
+ <span className="min-w-0 flex-1 truncate text-caption text-muted-foreground">{t.issueLinked}</span>
+ <span className="shrink-0 text-caption text-muted-foreground tabular-nums">{t.runTime[source]}</span>
+ </div>
+ ) : (
+ <div className="px-3 py-3 text-center text-caption text-muted-foreground">{t.noRuns}</div>
+ )}
+ </div>
+ </section>
+
+ {fired && (
+ <section className="flex min-w-0 flex-col gap-3 rounded-lg border border-dashed p-3 motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1">
+ <div className="min-w-0 truncate text-label font-medium">{t.issueTitle}</div>
+ <dl className="flex flex-wrap items-center gap-x-5 gap-y-1.5 text-body">
+ <div className="flex items-center gap-2">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", issueDot[issueStatus])} />
+ <span key={issueStatus} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.issueStatus[issueStatus]}
+ </span>
+ </dd>
+ </div>
+ <div className="flex items-center gap-2">
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <DemoAvatar name={t.agent} agent />
+ {t.agent}
+ </dd>
+ </div>
+ </dl>
+ <DemoRun agent={t.agent} status={runStatus} active={shownPhase !== "done"}>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && shownPhase !== "done" ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ {shownPhase === "done" && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+ </section>
+ )}
+
+ {toast && (
+ <div
+ aria-hidden
+ className="absolute right-4 bottom-4 z-10 flex items-center gap-2 rounded-lg border bg-popover px-3 py-2 text-caption text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2"
+ >
+ <CheckCircle2 className="size-4 text-success" />
+ {t.toast}
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/channel-chat-demo.tsx b/apps/docs/components/demos/channel-chat-demo.tsx
new file mode 100644
index 0000000000..a367b3fa88
--- /dev/null
+++ b/apps/docs/components/demos/channel-chat-demo.tsx
@@ -0,0 +1,467 @@
+"use client";
+
+import { useState, type ReactNode } from "react";
+import { Users } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoFrame,
+ DemoRun,
+ DemoSendButton,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Status = "todo" | "in_progress";
+
+const copy = {
+ en: {
+ title: "Ops team group chat · Ops helper connected",
+ chatApp: "Chat app",
+ multica: "Multica",
+ chatName: "Ops team",
+ botTag: "Bot",
+ you: "You",
+ lei: "Lei Li",
+ bot: "Ops helper",
+ leiMessage: "I'll hand this month's expense reports to finance by Friday.",
+ mention: "@Ops helper",
+ askText:
+ " Team dinner next Wednesday, 12 people, up to 150 per person. What should I confirm before booking a restaurant?",
+ askReply:
+ "Before booking, confirm four things: dietary restrictions, lunch or dinner, whether the 150 includes drinks, and a private room or the main hall.",
+ issueText: " /issue Book a restaurant for next Wednesday's team dinner\n12 people, up to 150 per person, private room needed.",
+ created: "✅ Created OPS-21 — Book a restaurant for next Wednesday's team dinner",
+ link: ".../issues/OPS-21",
+ placeholder: "Message Ops team",
+ send: "Send",
+ issueTitle: "OPS-21 · Book a restaurant for next Wednesday's team dinner",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ creatorLabel: "Created by",
+ status: { todo: "Todo", in_progress: "In Progress" } as Record<Status, string>,
+ description: "12 people, up to 150 per person, private room needed.",
+ queued: "Queued",
+ running: "Running",
+ steps: [
+ "Read the issue description",
+ "Set the status to In Progress",
+ "Shortlist restaurants that fit the group size and budget",
+ ],
+ captions: {
+ idle: "A group chat with the Ops helper Bot connected.",
+ ask: "In a group, the Bot only handles messages that @ it, so Lei Li's message doesn't start it. Click send.",
+ thinking: "The message goes into a Multica chat, and Ops helper starts a run.",
+ replied:
+ "The reply comes back to this group. Next, record the work as an issue with /issue: the first line is the title, the rest is the description. Click send.",
+ creating: "/issue is a command: Multica creates the issue straight from the message and doesn't add it to the chat.",
+ created: "The issue is created and assigned to the agent behind this Bot. Click the link to open it.",
+ issue: "The issue is assigned to Ops helper and created as Todo. A run starts for it, and the agent moves the issue to In Progress as it begins.",
+ done: "Ops helper is working on the issue, and its progress stays on the issue. Use Replay to start over.",
+ },
+ },
+ zh: {
+ title: "运营组群聊 · 已接入 运营助手",
+ chatApp: "聊天工具",
+ multica: "Multica",
+ chatName: "运营组",
+ botTag: "Bot",
+ you: "你",
+ lei: "李雷",
+ bot: "运营助手",
+ leiMessage: "这个月的报销单我周五前交给财务。",
+ mention: "@运营助手",
+ askText: " 下周三部门聚餐,12 个人,人均 150 元以内。订餐厅前还要确认哪些事?",
+ askReply: "订之前建议确认四件事:有没有人忌口,吃午饭还是晚饭,150 元含不含酒水,要包间还是大厅。",
+ issueText: " /issue 预订下周三部门聚餐的餐厅\n12 人,人均 150 元以内,需要包间。",
+ created: "✅ 已创建 OPS-21 — 预订下周三部门聚餐的餐厅",
+ link: ".../issues/OPS-21",
+ placeholder: "发送给 运营组",
+ send: "发送",
+ issueTitle: "OPS-21 · 预订下周三部门聚餐的餐厅",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ creatorLabel: "创建者",
+ status: { todo: "待办", in_progress: "进行中" } as Record<Status, string>,
+ description: "12 人,人均 150 元以内,需要包间。",
+ queued: "排队中",
+ running: "运行中",
+ steps: ["读取任务描述", "把状态改为 进行中", "按人数和预算筛选餐厅"],
+ captions: {
+ idle: "一个接入了 运营助手 Bot 的群聊。",
+ ask: "群聊里只有 @ Bot 的消息才会交给它,李雷那条不会触发。点击发送。",
+ thinking: "消息进入一段 Multica 对话,运营助手 开始一次运行。",
+ replied: "回复发回了这个群。接下来用 /issue 把这件事记成任务:第一行是标题,其余是描述。点击发送。",
+ creating: "/issue 是命令:Multica 直接按这条消息创建任务,不会把它加入对话。",
+ created: "任务已创建,负责人是这个 Bot 绑定的智能体。点击链接打开任务。",
+ issue: "任务的负责人是 运营助手,创建时为待办。Multica 为它创建了一次运行,智能体开始工作时把状态改为进行中。",
+ done: "运营助手 正在处理这条任务,进展都记在任务里。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "運用チームのグループチャット · 運用アシスタント 接続済み",
+ chatApp: "チャットツール",
+ multica: "Multica",
+ chatName: "運用チーム",
+ botTag: "Bot",
+ you: "あなた",
+ lei: "李雷",
+ bot: "運用アシスタント",
+ leiMessage: "今月の経費精算は金曜までに経理へ出しておきます。",
+ mention: "@運用アシスタント",
+ askText:
+ " 来週水曜にチームの食事会をします。12 人で、予算は 1 人 5,000 円まで。お店を予約する前に何を確認しておくべき?",
+ askReply:
+ "予約の前に 4 つ確認しておきましょう:食べられないものがある人はいるか、ランチかディナーか、5,000 円に飲み物代を含むか、個室かフロア席か。",
+ issueText: " /issue 来週水曜のチーム食事会のお店を予約する\n12 人、1 人 5,000 円まで、個室希望。",
+ created: "✅ OPS-21 を作成しました — 来週水曜のチーム食事会のお店を予約する",
+ link: ".../issues/OPS-21",
+ placeholder: "運用チーム にメッセージを送信",
+ send: "送信",
+ issueTitle: "OPS-21 · 来週水曜のチーム食事会のお店を予約する",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ creatorLabel: "作成者",
+ status: { todo: "未着手", in_progress: "進行中" } as Record<Status, string>,
+ description: "12 人、1 人 5,000 円まで、個室希望。",
+ queued: "キュー待ち",
+ running: "実行中",
+ steps: ["タスクの説明を読む", "ステータスを 進行中 に変更", "人数と予算に合うお店を絞り込む"],
+ captions: {
+ idle: "運用アシスタント の Bot を接続したグループチャットです。",
+ ask: "グループでは Bot を @メンションしたメッセージだけが Bot に渡るので、李雷 のメッセージでは動きません。送信をクリックしてください。",
+ thinking: "メッセージが Multica のチャットに入り、運用アシスタント が実行を始めます。",
+ replied:
+ "返信はこのグループに届きます。次は /issue でこの件をタスクにします。1 行目がタイトル、残りが説明です。送信をクリックしてください。",
+ creating: "/issue はコマンドです。Multica はこのメッセージからそのままタスクを作成し、チャットには追加しません。",
+ created: "タスクが作成され、担当者はこの Bot に紐づいたエージェントです。リンクをクリックしてタスクを開きます。",
+ issue: "担当者は 運用アシスタント、作成時のステータスは 未着手 です。Multica が実行を作成し、エージェントは作業を始めるときにステータスを 進行中 に変更します。",
+ done: "運用アシスタント がタスクに取り組んでいて、進捗はタスクに記録されます。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "운영팀 그룹 채팅 · 운영 도우미 연결됨",
+ chatApp: "채팅 도구",
+ multica: "Multica",
+ chatName: "운영팀",
+ botTag: "Bot",
+ you: "나",
+ lei: "리레이",
+ bot: "운영 도우미",
+ leiMessage: "이번 달 경비 정산서는 금요일까지 재무팀에 낼게요.",
+ mention: "@운영 도우미",
+ askText: " 다음 주 수요일에 팀 회식이 있어요. 12명이고 1인당 3만 원 이하예요. 식당을 예약하기 전에 뭘 확인해야 할까요?",
+ askReply:
+ "예약 전에 네 가지를 확인하세요. 못 먹는 음식이 있는 사람이 있는지, 점심인지 저녁인지, 3만 원에 주류가 포함되는지, 룸이 필요한지 홀이면 되는지입니다.",
+ issueText: " /issue 다음 주 수요일 팀 회식 식당 예약\n12명, 1인당 3만 원 이하, 룸 필요.",
+ created: "✅ OPS-21 생성됨 — 다음 주 수요일 팀 회식 식당 예약",
+ link: ".../issues/OPS-21",
+ placeholder: "운영팀에 메시지 보내기",
+ send: "보내기",
+ issueTitle: "OPS-21 · 다음 주 수요일 팀 회식 식당 예약",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ creatorLabel: "작성자",
+ status: { todo: "할 일", in_progress: "진행 중" } as Record<Status, string>,
+ description: "12명, 1인당 3만 원 이하, 룸 필요.",
+ queued: "대기열에 있음",
+ running: "실행 중",
+ steps: ["태스크 설명 읽기", "상태를 진행 중으로 변경", "인원과 예산에 맞는 식당 추리기"],
+ captions: {
+ idle: "운영 도우미 Bot이 연결된 그룹 채팅입니다.",
+ ask: "그룹에서는 Bot을 @멘션한 메시지만 Bot에게 전달되므로 리레이의 메시지로는 시작되지 않습니다. 보내기를 클릭하세요.",
+ thinking: "메시지가 Multica 대화에 들어가고 운영 도우미가 실행을 시작합니다.",
+ replied:
+ "답변이 이 그룹으로 돌아왔습니다. 이제 /issue로 이 일을 태스크로 남깁니다. 첫 줄은 제목, 나머지는 설명입니다. 보내기를 클릭하세요.",
+ creating: "/issue는 명령입니다. Multica는 이 메시지로 바로 태스크를 만들고 대화에는 추가하지 않습니다.",
+ created: "태스크가 생성되었고 담당자는 이 Bot에 연결된 에이전트입니다. 링크를 클릭해 태스크를 여세요.",
+ issue: "담당자는 운영 도우미이고 태스크는 할 일 상태로 생성되었습니다. Multica가 실행을 만들고, 에이전트는 작업을 시작하면서 상태를 진행 중으로 바꿉니다.",
+ done: "운영 도우미가 태스크를 처리하고 있으며 진행 상황은 태스크에 남습니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Groupe Équipe ops · Assistant ops connecté",
+ chatApp: "Messagerie",
+ multica: "Multica",
+ chatName: "Équipe ops",
+ botTag: "Bot",
+ you: "Vous",
+ lei: "Lei Li",
+ bot: "Assistant ops",
+ leiMessage: "Je transmets les notes de frais du mois à la compta d'ici vendredi.",
+ mention: "@Assistant ops",
+ askText:
+ " Dîner d'équipe mercredi prochain, 12 personnes, 30 € maximum par personne. Que faut-il vérifier avant de réserver un restaurant ?",
+ askReply:
+ "Avant de réserver, vérifiez quatre points : les restrictions alimentaires, déjeuner ou dîner, si les 30 € incluent les boissons, et salle privée ou salle principale.",
+ issueText:
+ " /issue Réserver un restaurant pour le dîner d'équipe de mercredi prochain\n12 personnes, 30 € maximum par personne, salle privée nécessaire.",
+ created: "✅ OPS-21 créée — Réserver un restaurant pour le dîner d'équipe de mercredi prochain",
+ link: ".../issues/OPS-21",
+ placeholder: "Écrire dans Équipe ops",
+ send: "Envoyer",
+ issueTitle: "OPS-21 · Réserver un restaurant pour le dîner d'équipe de mercredi prochain",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ creatorLabel: "Créé par",
+ status: { todo: "À faire", in_progress: "En cours" } as Record<Status, string>,
+ description: "12 personnes, 30 € maximum par personne, salle privée nécessaire.",
+ queued: "En file",
+ running: "En cours",
+ steps: [
+ "Lire la description de la tâche",
+ "Passer le statut à En cours",
+ "Sélectionner des restaurants adaptés au groupe et au budget",
+ ],
+ captions: {
+ idle: "Une discussion de groupe où le bot Assistant ops est connecté.",
+ ask: "Dans un groupe, le bot ne traite que les messages qui le @mentionnent : le message de Lei Li ne le déclenche pas. Cliquez sur Envoyer.",
+ thinking: "Le message rejoint une discussion Multica, et Assistant ops lance une exécution.",
+ replied:
+ "La réponse revient dans ce groupe. Enregistrez maintenant ce travail comme tâche avec /issue : la première ligne est le titre, le reste la description. Cliquez sur Envoyer.",
+ creating: "/issue est une commande : Multica crée la tâche directement à partir du message et ne l'ajoute pas à la discussion.",
+ created: "La tâche est créée et assignée à l'agent lié à ce bot. Cliquez sur le lien pour l'ouvrir.",
+ issue: "La tâche est assignée à Assistant ops et créée en À faire. Une exécution démarre, et l'agent passe la tâche à En cours en commençant.",
+ done: "Assistant ops travaille sur la tâche, et son avancement reste consigné sur la tâche. Cliquez sur Rejouer pour recommencer.",
+ },
+ },
+};
+
+type Phase = "idle" | "ask" | "thinking" | "replied" | "creating" | "created" | "issue" | "done";
+
+const ORDER: Phase[] = ["ask", "thinking", "replied", "creating", "created", "issue", "done"];
+
+// Index of the step at which the agent moves the issue to In Progress.
+const IN_PROGRESS_STEP = 2;
+
+function ChatMessage({
+ author,
+ bot,
+ botTag,
+ own,
+ children,
+}: {
+ author: string;
+ bot?: boolean;
+ botTag?: string;
+ own?: boolean;
+ children: ReactNode;
+}) {
+ return (
+ <div
+ className={cn(
+ "flex min-w-0 items-start gap-2 motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1",
+ own && "flex-row-reverse",
+ )}
+ >
+ <DemoAvatar name={author} agent={bot} />
+ <div className={cn("flex min-w-0 max-w-[85%] flex-col gap-0.5", own && "items-end")}>
+ <span className="flex items-center gap-1 text-micro text-muted-foreground">
+ {author}
+ {bot && botTag && <span className="rounded-xs bg-muted px-1 text-micro text-foreground">{botTag}</span>}
+ </span>
+ <div
+ className={cn(
+ "rounded-lg px-2.5 py-1.5 text-body break-words whitespace-pre-line",
+ own ? "bg-brand/10 dark:bg-brand/20" : "border bg-background",
+ )}
+ >
+ {children}
+ </div>
+ </div>
+ </div>
+ );
+}
+
+function TypingBubble({ author, botTag }: { author: string; botTag: string }) {
+ return (
+ <ChatMessage author={author} bot botTag={botTag}>
+ <span aria-hidden className="inline-flex gap-1 py-1">
+ {[0, 1, 2].map((i) => (
+ <span
+ key={i}
+ className="size-1.5 rounded-full bg-muted-foreground motion-safe:animate-pulse"
+ style={{ animationDelay: `${i * 200}ms` }}
+ />
+ ))}
+ </span>
+ </ChatMessage>
+ );
+}
+
+// The chat tool is drawn neutral on purpose: the flow is the same on every
+// supported platform, so no platform's look is implied.
+export function ChannelChatDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("ask");
+ const [status, setStatus] = useState<Status>("todo");
+ const [queued, setQueued] = useState(true);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const reached = (p: Phase) => ORDER.indexOf(phase) >= ORDER.indexOf(p);
+ const view = reached("issue") ? "multica" : "chat";
+ const canSend = visible && (phase === "ask" || phase === "replied");
+
+ const send = () => {
+ if (phase === "ask") {
+ setPhase("thinking");
+ after(1800, () => setPhase("replied"));
+ } else if (phase === "replied") {
+ setPhase("creating");
+ after(1200, () => setPhase("created"));
+ }
+ };
+
+ const openIssue = () => {
+ setPhase("issue");
+ after(1000, () => setQueued(false));
+ t.steps.forEach((_, i) =>
+ after(1000 + i * 1000, () => {
+ setStepsShown(i + 1);
+ if (i + 1 === IN_PROGRESS_STEP) setStatus("in_progress");
+ }),
+ );
+ after(1000 + t.steps.length * 1000, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("ask");
+ setStatus("todo");
+ setQueued(true);
+ setStepsShown(0);
+ };
+
+ const mention = <span className="font-medium text-brand">{t.mention}</span>;
+ const draft = phase === "ask" ? t.askText : phase === "replied" ? t.issueText : null;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div aria-hidden className="flex gap-1 border-b px-3 py-1.5 text-caption">
+ {(["chat", "multica"] as const).map((v) => (
+ <span
+ key={v}
+ className={cn(
+ "rounded-md px-2 py-0.5 transition-colors",
+ view === v ? "bg-muted font-medium text-foreground" : "text-muted-foreground",
+ )}
+ >
+ {v === "chat" ? t.chatApp : t.multica}
+ </span>
+ ))}
+ </div>
+
+ {view === "chat" ? (
+ <div className="flex min-h-96 flex-col">
+ <div className="flex items-center gap-2 border-b px-4 py-2">
+ <span
+ aria-hidden
+ className="inline-flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground"
+ >
+ <Users className="size-3.5" />
+ </span>
+ <span className="text-label font-medium">{t.chatName}</span>
+ </div>
+
+ <div className="flex flex-1 flex-col gap-3 p-4">
+ <ChatMessage author={t.lei}>{t.leiMessage}</ChatMessage>
+ {reached("thinking") && (
+ <ChatMessage author={t.you} own>
+ {mention}
+ {t.askText}
+ </ChatMessage>
+ )}
+ {phase === "thinking" && <TypingBubble author={t.bot} botTag={t.botTag} />}
+ {reached("replied") && (
+ <ChatMessage author={t.bot} bot botTag={t.botTag}>
+ {t.askReply}
+ </ChatMessage>
+ )}
+ {reached("creating") && (
+ <ChatMessage author={t.you} own>
+ {mention}
+ {t.issueText}
+ </ChatMessage>
+ )}
+ {phase === "creating" && <TypingBubble author={t.bot} botTag={t.botTag} />}
+ {reached("created") && (
+ <ChatMessage author={t.bot} bot botTag={t.botTag}>
+ {t.created}
+ {"\n"}
+ <CoachMark active={phase === "created"} side="right" ringClassName="rounded-sm">
+ <button
+ type="button"
+ disabled={phase !== "created"}
+ onClick={openIssue}
+ className="text-brand underline decoration-brand/40 underline-offset-2 hover:decoration-brand"
+ >
+ {t.link}
+ </button>
+ </CoachMark>
+ </ChatMessage>
+ )}
+ </div>
+
+ <div className="m-3 mt-0 flex items-end gap-2 rounded-lg border bg-background p-2">
+ <div className="min-h-10 min-w-0 flex-1 px-1 text-body break-words whitespace-pre-line">
+ {visible && draft ? (
+ <span key={phase} className="motion-safe:animate-in motion-safe:fade-in">
+ {mention}
+ {draft}
+ </span>
+ ) : (
+ <span className="text-muted-foreground">{t.placeholder}</span>
+ )}
+ </div>
+ <CoachMark active={canSend} side="top" align="end" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={!canSend} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ ) : (
+ <div className="flex min-h-96 flex-col gap-3 p-4 motion-safe:animate-in motion-safe:fade-in">
+ <div className="text-body font-medium">{t.issueTitle}</div>
+ <dl className="grid w-fit grid-cols-[auto_auto] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <span
+ aria-hidden
+ className={cn(
+ "size-3 rounded-full border-2 transition-colors",
+ status === "todo" ? "border-muted-foreground" : "border-warning bg-warning/40",
+ )}
+ />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <DemoAvatar name={t.bot} agent />
+ {t.bot}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.creatorLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <DemoAvatar name={t.you} />
+ {t.you}
+ </dd>
+ </dl>
+ <p className="rounded-lg border bg-background px-3 py-2 text-body">{t.description}</p>
+ <DemoRun agent={t.bot} status={queued ? t.queued : t.running} active>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ </div>
+ )}
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/chat-demo.tsx b/apps/docs/components/demos/chat-demo.tsx
new file mode 100644
index 0000000000..a3eb9a0eed
--- /dev/null
+++ b/apps/docs/components/demos/chat-demo.tsx
@@ -0,0 +1,447 @@
+"use client";
+
+import { type ReactNode, useState } from "react";
+import { CircleDashed, Loader2 } from "lucide-react";
+import { CoachMark, DemoAvatar, DemoFrame, DemoSendButton, useDemoCopy, useDemoTimers, useStartWhenVisible } from "./demo-kit";
+
+type Suggestion = { label: string; prompt: string };
+type DueIssue = { id: string; title: string; due: string; assignee: string };
+
+const copy = {
+ en: {
+ title: "Chat · Ops helper",
+ agent: "Ops helper",
+ heading: "Chat with Ops helper",
+ description: "Handles office and operations chores: checks progress, plans schedules, files issues.",
+ startersLabel: "Conversation starters",
+ starters: [
+ {
+ label: "What's due this week?",
+ prompt: "List the issues due this week that aren't done yet, sorted by due date, with their assignees.",
+ },
+ { label: "Sum up yesterday's customer feedback", prompt: "Sum up yesterday's customer feedback in five points." },
+ { label: "Plan my day", prompt: "Look at my open issues and suggest an order for today." },
+ ] as Suggestion[],
+ placeholder: "Message Ops helper...",
+ send: "Send",
+ thinking: "Thinking",
+ runningCommand: "Running a command",
+ repliedIn: (elapsed: string) => `Replied in ${elapsed}`,
+ replyTimes: ["12s", "9s"],
+ dueIntro: "Three issues are due this week and none is done yet:",
+ due: [
+ { id: "OPS-32", title: "Buy gifts for the annual party", due: "Wed", assignee: "Lei Li" },
+ { id: "OPS-33", title: "Update the staff directory", due: "Thu", assignee: "You" },
+ { id: "OPS-34", title: "Submit Q3 expense claims", due: "Fri", assignee: "Lei Li" },
+ ] as DueIssue[],
+ dueOutro: "OPS-34 is still missing two invoices.",
+ followUpsHeading: "Follow-up questions",
+ followUps: [
+ {
+ label: "Create an issue to chase the missing invoices",
+ prompt:
+ "Create an issue: collect the two invoices OPS-34 is missing, assign it to me, due this Thursday.",
+ },
+ { label: "Which issues are overdue?", prompt: "Which issues are overdue?" },
+ ] as Suggestion[],
+ createdReply: "Done. I created the issue, assigned it to you and set it due Thursday:",
+ created: { id: "OPS-35", title: "Collect the missing invoices for OPS-34", status: "Todo" },
+ captions: {
+ idle: "A new chat with an agent. Nobody else can see it.",
+ start: "Before the first message, the agent's suggestions are shown. Pick the first one.",
+ filled: "The suggestion went into the composer and was not sent, so you can adjust it first. Click send.",
+ replying: "The agent looks this up in the workspace with the Multica CLI. The chat isn't tied to any issue.",
+ replied:
+ "The agent answered without creating anything. Click the follow-up to ask it to create an issue: a follow-up is sent right away.",
+ creating: "You asked it explicitly, so the agent acts with your workspace access and creates the issue.",
+ done: "The issue is created, and the chat stays private to you. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "对话 · 运营助手",
+ agent: "运营助手",
+ heading: "与 运营助手 对话",
+ description: "负责行政和运营杂务:查进度、排日程、建任务。",
+ startersLabel: "对话开场建议",
+ starters: [
+ { label: "这周有哪些任务要到期?", prompt: "列出这周到期、还没完成的任务,按截止日期排序,并注明负责人。" },
+ { label: "总结昨天的客户反馈", prompt: "把昨天的客户反馈总结成五条要点。" },
+ { label: "规划我的今天", prompt: "看看我手上还没完成的任务,建议今天按什么顺序处理。" },
+ ] as Suggestion[],
+ placeholder: "给 运营助手 发消息...",
+ send: "发送",
+ thinking: "思考中",
+ runningCommand: "执行命令",
+ repliedIn: (elapsed: string) => `${elapsed} 内回复`,
+ replyTimes: ["12s", "9s"],
+ dueIntro: "这周有 3 个任务到期,都还没完成:",
+ due: [
+ { id: "OPS-32", title: "采购年会礼品", due: "周三", assignee: "李雷" },
+ { id: "OPS-33", title: "更新员工通讯录", due: "周四", assignee: "你" },
+ { id: "OPS-34", title: "提交三季度报销", due: "周五", assignee: "李雷" },
+ ] as DueIssue[],
+ dueOutro: "其中 OPS-34 还缺两张发票。",
+ followUpsHeading: "后续提问",
+ followUps: [
+ {
+ label: "建一个任务去催缺的发票",
+ prompt: "帮我建一个任务:催齐 OPS-34 缺的两张发票,负责人设为我,本周四截止。",
+ },
+ { label: "哪些任务已经逾期?", prompt: "哪些任务已经逾期?" },
+ ] as Suggestion[],
+ createdReply: "已经建好,负责人是你,周四截止:",
+ created: { id: "OPS-35", title: "催齐 OPS-34 缺的发票", status: "待办" },
+ captions: {
+ idle: "和智能体新开的一段对话,只有你能看到。",
+ start: "发送第一条消息前,这里列出智能体的开场建议。选择第一条。",
+ filled: "建议填进了输入框,没有发送,可以先改。点击发送。",
+ replying: "智能体用 Multica CLI 查询工作区。这段对话不绑定任何任务。",
+ replied: "智能体只回答了问题,没有建任何东西。点击后续提问请它建任务,后续提问点了就会发送。",
+ creating: "你明确提出了要求,智能体以你的工作区权限代你建任务。",
+ done: "任务建好了,这段对话仍然只有你能看到。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "チャット · 運用アシスタント",
+ agent: "運用アシスタント",
+ heading: "運用アシスタント とチャット",
+ description: "総務と運用の雑務を担当します。進捗の確認、予定の調整、タスクの作成など。",
+ startersLabel: "会話の開始例",
+ starters: [
+ {
+ label: "今週が期限のタスクは?",
+ prompt: "今週が期限でまだ完了していないタスクを、期限の早い順に、担当者も添えて一覧にしてください。",
+ },
+ { label: "昨日の顧客フィードバックをまとめる", prompt: "昨日の顧客フィードバックを 5 つの要点にまとめてください。" },
+ { label: "今日の段取りを決める", prompt: "私の未完了のタスクを見て、今日取りかかる順番を提案してください。" },
+ ] as Suggestion[],
+ placeholder: "運用アシスタント にメッセージ…",
+ send: "送信",
+ thinking: "考え中",
+ runningCommand: "コマンドを実行中",
+ repliedIn: (elapsed: string) => `${elapsed}で返信`,
+ replyTimes: ["12s", "9s"],
+ dueIntro: "今週が期限のタスクは 3 件で、どれもまだ完了していません:",
+ due: [
+ { id: "OPS-32", title: "年次パーティーの記念品を購入", due: "水", assignee: "李雷" },
+ { id: "OPS-33", title: "社員名簿を更新", due: "木", assignee: "あなた" },
+ { id: "OPS-34", title: "第 3 四半期の経費精算を提出", due: "金", assignee: "李雷" },
+ ] as DueIssue[],
+ dueOutro: "OPS-34 はまだ領収書が 2 枚足りません。",
+ followUpsHeading: "フォローアップ質問",
+ followUps: [
+ {
+ label: "足りない領収書を集めるタスクを作成",
+ prompt: "タスクを作成してください:OPS-34 で足りない領収書 2 枚を集める。担当は私、期限は今週の木曜日。",
+ },
+ { label: "期限を過ぎたタスクは?", prompt: "期限を過ぎたタスクは?" },
+ ] as Suggestion[],
+ createdReply: "作成しました。担当者はあなた、期限は木曜日です:",
+ created: { id: "OPS-35", title: "OPS-34 で足りない領収書を集める", status: "未着手" },
+ captions: {
+ idle: "エージェントと新しく始めたチャットです。ほかの人には見えません。",
+ start: "最初のメッセージを送る前は、エージェントの開始例が表示されます。最初の例を選びます。",
+ filled: "開始例は入力欄に入っただけで、送信はされていません。先に手直しできます。送信をクリックします。",
+ replying: "エージェントは Multica CLI でワークスペースを調べます。このチャットはどのタスクにも紐づいていません。",
+ replied:
+ "エージェントは質問に答えただけで、何も作成していません。フォローアップ質問をクリックしてタスクの作成を頼みます。フォローアップ質問はクリックするとすぐ送信されます。",
+ creating: "はっきり頼んだので、エージェントはあなたのワークスペース権限でタスクを作成します。",
+ done: "タスクができました。チャットは引き続きあなたにしか見えません。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "채팅 · 운영 도우미",
+ agent: "운영 도우미",
+ heading: "운영 도우미와 채팅",
+ description: "사무와 운영 잡무를 맡습니다. 진행 상황 확인, 일정 조율, 태스크 생성 등.",
+ startersLabel: "대화 시작 예시",
+ starters: [
+ {
+ label: "이번 주에 마감되는 태스크는?",
+ prompt: "이번 주가 마감이고 아직 끝나지 않은 태스크를 마감일 순으로, 담당자와 함께 보여 주세요.",
+ },
+ { label: "어제 고객 피드백 요약", prompt: "어제 들어온 고객 피드백을 다섯 가지 요점으로 요약해 주세요." },
+ { label: "오늘 할 일 순서 정하기", prompt: "내가 맡은 미완료 태스크를 보고 오늘 처리할 순서를 제안해 주세요." },
+ ] as Suggestion[],
+ placeholder: "운영 도우미에게 메시지 보내기…",
+ send: "보내기",
+ thinking: "생각 중",
+ runningCommand: "명령 실행 중",
+ repliedIn: (elapsed: string) => `${elapsed} 만에 답변`,
+ replyTimes: ["12s", "9s"],
+ dueIntro: "이번 주에 마감되는 태스크가 3개 있고, 모두 아직 완료되지 않았습니다:",
+ due: [
+ { id: "OPS-32", title: "연례 파티 기념품 구매", due: "수", assignee: "리레이" },
+ { id: "OPS-33", title: "직원 연락처 업데이트", due: "목", assignee: "나" },
+ { id: "OPS-34", title: "3분기 경비 청구 제출", due: "금", assignee: "리레이" },
+ ] as DueIssue[],
+ dueOutro: "OPS-34는 아직 영수증 두 장이 빠져 있습니다.",
+ followUpsHeading: "후속 질문",
+ followUps: [
+ {
+ label: "빠진 영수증을 받을 태스크 만들기",
+ prompt: "태스크를 만들어 주세요: OPS-34에 빠진 영수증 두 장 받기, 담당자는 나, 마감은 이번 주 목요일.",
+ },
+ { label: "기한이 지난 태스크는?", prompt: "기한이 지난 태스크는?" },
+ ] as Suggestion[],
+ createdReply: "태스크를 만들어 담당자로 지정했고, 마감은 목요일입니다:",
+ created: { id: "OPS-35", title: "OPS-34의 빠진 영수증 받기", status: "할 일" },
+ captions: {
+ idle: "에이전트와 새로 시작한 채팅입니다. 다른 사람은 볼 수 없습니다.",
+ start: "첫 메시지를 보내기 전에는 에이전트의 대화 시작 예시가 표시됩니다. 첫 번째 예시를 선택하세요.",
+ filled: "예시는 입력란에 채워졌을 뿐 전송되지 않았으니 먼저 고칠 수 있습니다. 보내기를 클릭하세요.",
+ replying: "에이전트가 Multica CLI로 워크스페이스를 조회합니다. 이 채팅은 어떤 태스크에도 묶여 있지 않습니다.",
+ replied:
+ "에이전트는 질문에 답하기만 했고 아무것도 만들지 않았습니다. 후속 질문을 클릭해 태스크 생성을 요청하세요. 후속 질문은 클릭하면 바로 전송됩니다.",
+ creating: "명시적으로 요청했으므로 에이전트가 내 워크스페이스 권한으로 태스크를 만듭니다.",
+ done: "태스크가 만들어졌고, 채팅은 여전히 나만 볼 수 있습니다. '다시 보기'로 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Discussion · Assistant ops",
+ agent: "Assistant ops",
+ heading: "Discuter avec Assistant ops",
+ description: "S'occupe des tâches administratives et opérationnelles : suivi d'avancement, planning, création de tâches.",
+ startersLabel: "Amorces de conversation",
+ starters: [
+ {
+ label: "Qu'est-ce qui arrive à échéance cette semaine ?",
+ prompt:
+ "Listez les tâches à échéance cette semaine qui ne sont pas terminées, triées par date d'échéance, avec leurs assignés.",
+ },
+ { label: "Résumer les retours clients d'hier", prompt: "Résumez les retours clients d'hier en cinq points." },
+ { label: "Planifier ma journée", prompt: "Regardez mes tâches en cours et proposez un ordre pour aujourd'hui." },
+ ] as Suggestion[],
+ placeholder: "Écrire à Assistant ops…",
+ send: "Envoyer",
+ thinking: "Réflexion",
+ runningCommand: "Exécution d'une commande",
+ repliedIn: (elapsed: string) => `Réponse en ${elapsed}`,
+ replyTimes: ["12s", "9s"],
+ dueIntro: "Trois tâches arrivent à échéance cette semaine, et aucune n'est terminée :",
+ due: [
+ { id: "OPS-32", title: "Acheter les cadeaux de la soirée annuelle", due: "mer.", assignee: "Lei Li" },
+ { id: "OPS-33", title: "Mettre à jour l'annuaire du personnel", due: "jeu.", assignee: "Vous" },
+ { id: "OPS-34", title: "Soumettre les notes de frais du T3", due: "ven.", assignee: "Lei Li" },
+ ] as DueIssue[],
+ dueOutro: "Il manque encore deux factures pour OPS-34.",
+ followUpsHeading: "Questions de suivi",
+ followUps: [
+ {
+ label: "Créer une tâche pour récupérer les factures manquantes",
+ prompt:
+ "Créez une tâche : récupérer les deux factures qui manquent à OPS-34, assignée à moi, à échéance ce jeudi.",
+ },
+ { label: "Quelles tâches sont en retard ?", prompt: "Quelles tâches sont en retard ?" },
+ ] as Suggestion[],
+ createdReply: "C'est fait. J'ai créé la tâche, je vous l'ai assignée, échéance jeudi :",
+ created: { id: "OPS-35", title: "Récupérer les factures manquantes d'OPS-34", status: "À faire" },
+ captions: {
+ idle: "Une nouvelle discussion avec un agent. Personne d'autre ne la voit.",
+ start: "Avant le premier message, les suggestions de l'agent s'affichent. Choisissez la première.",
+ filled:
+ "La suggestion est dans la zone de saisie, pas encore envoyée : vous pouvez l'ajuster d'abord. Cliquez sur envoyer.",
+ replying:
+ "L'agent consulte l'espace de travail avec la CLI Multica. La discussion n'est liée à aucune tâche.",
+ replied:
+ "L'agent a répondu sans rien créer. Cliquez sur la question de suivi pour lui demander de créer une tâche : une question de suivi part dès le clic.",
+ creating:
+ "Vous l'avez demandé explicitement : l'agent agit avec vos droits dans l'espace de travail et crée la tâche.",
+ done: "La tâche est créée, et la discussion reste visible de vous seul. Utilisez Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "filled" | "replying" | "replied" | "creating" | "done";
+type Pill = "thinking" | "command" | null;
+
+export function ChatDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+ const [pill, setPill] = useState<Pill>(null);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const starter = t.starters[0]!;
+ const followUp = t.followUps[0]!;
+ const asked = phase !== "start" && phase !== "filled";
+ const followedUp = phase === "creating" || phase === "done";
+
+ // One agent turn: a short status pill, then the reply lands in `next`.
+ const runTurn = (next: Exclude<Phase, "idle">) => {
+ setPill("thinking");
+ after(900, () => setPill("command"));
+ after(2300, () => {
+ setPill(null);
+ setPhase(next);
+ });
+ };
+
+ const send = () => {
+ setPhase("replying");
+ runTurn("replied");
+ };
+
+ const askFollowUp = () => {
+ setPhase("creating");
+ runTurn("done");
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ setPill(null);
+ };
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-96 flex-col gap-3 p-4">
+ {!asked ? (
+ <div className="flex flex-1 flex-col items-center justify-center gap-4 py-2">
+ <div className="max-w-sm space-y-1 text-center">
+ <div className="flex justify-center pb-1">
+ <span className="inline-flex size-9 items-center justify-center rounded-full bg-brand/12 ring-1 ring-border ring-inset">
+ <DemoAvatar name={t.agent} agent />
+ </span>
+ </div>
+ <div className="text-title-sm font-semibold">{t.heading}</div>
+ <p className="text-body text-muted-foreground">{t.description}</p>
+ </div>
+ <div aria-label={t.startersLabel} className="w-full max-w-sm space-y-2">
+ {t.starters.map((item, i) => (
+ <CoachMark
+ key={item.label}
+ active={visible && phase === "start" && i === 0}
+ side="right"
+ ringClassName="rounded-lg"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ disabled={!visible || phase !== "start" || i !== 0}
+ onClick={() => setPhase("filled")}
+ className="w-full rounded-lg border bg-card px-3 py-2.5 text-left text-body hover:border-brand/40 hover:bg-accent disabled:opacity-60 disabled:hover:border-border disabled:hover:bg-card"
+ >
+ {item.label}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ </div>
+ ) : (
+ <div className="flex flex-col gap-3">
+ <UserMessage>{starter.prompt}</UserMessage>
+ {phase === "replying" ? (
+ <StatusPill pill={pill} t={t} />
+ ) : (
+ <AgentMessage name={t.agent} meta={t.repliedIn(t.replyTimes[0]!)}>
+ <p>{t.dueIntro}</p>
+ <ul className="mt-1 flex flex-col gap-0.5">
+ {t.due.map((issue) => (
+ <li key={issue.id} className="flex min-w-0 gap-2">
+ <span className="shrink-0 text-muted-foreground">{issue.id}</span>
+ <span className="min-w-0 truncate">{issue.title}</span>
+ <span className="ml-auto shrink-0 text-caption text-muted-foreground">
+ {issue.due} · {issue.assignee}
+ </span>
+ </li>
+ ))}
+ </ul>
+ <p className="mt-1">{t.dueOutro}</p>
+ </AgentMessage>
+ )}
+
+ {phase === "replied" && (
+ <div className="flex flex-col gap-1.5 pl-7 motion-safe:animate-in motion-safe:fade-in">
+ <div className="text-caption text-muted-foreground">{t.followUpsHeading}</div>
+ <div className="flex flex-wrap gap-1.5">
+ {t.followUps.map((item, i) => (
+ <CoachMark
+ quiet
+ key={item.label}
+ active={i === 0}
+ ringClassName="rounded-full"
+ >
+ <button
+ type="button"
+ disabled={i !== 0}
+ onClick={askFollowUp}
+ className="rounded-full border bg-background px-3 py-1 text-caption hover:bg-accent disabled:opacity-60 disabled:hover:bg-background"
+ >
+ {item.label}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ </div>
+ )}
+
+ {followedUp && <UserMessage>{followUp.prompt}</UserMessage>}
+ {phase === "creating" && <StatusPill pill={pill} t={t} />}
+ {phase === "done" && (
+ <AgentMessage name={t.agent} meta={t.repliedIn(t.replyTimes[1]!)}>
+ <p>{t.createdReply}</p>
+ <div className="mt-1.5 flex min-w-0 items-center gap-2 rounded-lg border bg-background px-3 py-2">
+ <CircleDashed aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="shrink-0 text-caption text-muted-foreground">{t.created.id}</span>
+ <span className="min-w-0 truncate text-label font-medium">{t.created.title}</span>
+ <span className="ml-auto shrink-0 text-caption text-muted-foreground">{t.created.status}</span>
+ </div>
+ </AgentMessage>
+ )}
+ </div>
+ )}
+
+ <div className="mt-auto rounded-lg border bg-background p-2">
+ <div className="min-h-10 px-1 text-body">
+ {phase === "filled" ? (
+ <span className="motion-safe:animate-in motion-safe:fade-in">{starter.prompt}</span>
+ ) : (
+ <span className="text-muted-foreground">{t.placeholder}</span>
+ )}
+ </div>
+ <div className="mt-1.5 flex items-center">
+ <span className="ml-auto" />
+ <CoachMark active={phase === "filled"} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={phase !== "filled"} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
+
+function UserMessage({ children }: { children: ReactNode }) {
+ return (
+ <div className="flex justify-end motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1">
+ <div className="max-w-[85%] rounded-2xl bg-muted px-3 py-2 text-body break-words">{children}</div>
+ </div>
+ );
+}
+
+function AgentMessage({ name, meta, children }: { name: string; meta: string; children: ReactNode }) {
+ return (
+ <div className="min-w-0 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex items-center gap-2">
+ <DemoAvatar name={name} agent />
+ <span className="text-label font-medium">{name}</span>
+ <span className="text-caption text-muted-foreground">{meta}</span>
+ </div>
+ <div className="mt-1 pl-7 text-body break-words">{children}</div>
+ </div>
+ );
+}
+
+function StatusPill({ pill, t }: { pill: Pill; t: { thinking: string; runningCommand: string } }) {
+ if (!pill) return null;
+ return (
+ <div className="pl-7">
+ <span className="inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <Loader2 aria-hidden className="size-3 text-brand motion-safe:animate-spin" />
+ {pill === "thinking" ? t.thinking : t.runningCommand}
+ </span>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/chat-queue-demo.tsx b/apps/docs/components/demos/chat-queue-demo.tsx
new file mode 100644
index 0000000000..3841e11e98
--- /dev/null
+++ b/apps/docs/components/demos/chat-queue-demo.tsx
@@ -0,0 +1,452 @@
+"use client";
+
+import { type ReactNode, useEffect, useState } from "react";
+import { CornerDownRight, Ellipsis, ListEnd, Loader2, Pencil, Square, Trash2 } from "lucide-react";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoFrame,
+ DemoSendButton,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Captions = {
+ idle: string;
+ opening: string;
+ ready: string;
+ queued: string;
+ menu: string;
+ steering: string;
+ steered: string;
+ clearing: string;
+ cleared: string;
+};
+
+const copy = {
+ en: {
+ title: "Chat · Ops helper",
+ agent: "Ops helper",
+ placeholder: "Message Ops helper…",
+ queueSend: "Queue message",
+ stop: "Stop",
+ typing: "Typing",
+ thinking: "Thinking",
+ repliedIn: (elapsed: string) => `Replied in ${elapsed}`,
+ replyTimes: ["14s", "11s"],
+ cancelled: "This reply was cancelled.",
+ queueTitle: "1 queued message",
+ steer: "Steer",
+ remove: "Remove queued message",
+ more: "More queue actions",
+ edit: "Edit queued message",
+ clear: "Clear all",
+ firstPrompt: "Draft an all-staff notice for next Wednesday's fire drill. Assembly point: the 1st-floor lobby.",
+ partial: [
+ "Hi all, we're holding a fire drill next Wednesday at 3 pm. ",
+ "When the alarm sounds, take the nearest emergency exit ",
+ ],
+ tail: "and gather in the 1st-floor lobby. Team leads, please count heads and report to the admin office.",
+ draft: "Change the assembly point to the B1 parking garage. The lobby is being renovated that day.",
+ steeredReply:
+ "Hi all, we're holding a fire drill next Wednesday at 3 pm. When the alarm sounds, take the nearest emergency exit and gather in the B1 parking garage (the lobby is closed for renovation that day). Team leads, please count heads and report to the admin office.",
+ captions: {
+ idle: "You've asked Ops helper to draft a notice.",
+ opening: "Ops helper is writing its reply. Then you remember the assembly point has to change.",
+ ready: "The agent is still replying, so the send button now queues the message. Click send.",
+ queued:
+ "The message waits in the queue until the current reply ends. Click Steer to have it handled now, or open ⋯ to clear the queue.",
+ menu: "Clear all withdraws every queued message; the current reply keeps going. Click Clear all.",
+ steering:
+ "Steer stopped the current reply and kept what it had written. The agent started on your new message right away.",
+ steered: "The notice is rewritten with the new location. Use Replay to watch again.",
+ clearing: "The queue is empty and that message won't reach the agent. The current reply continues.",
+ cleared: "The reply finished as first asked, still at the 1st-floor lobby. Use Replay and try Steer.",
+ } satisfies Captions,
+ },
+ zh: {
+ title: "聊天 · 运营助手",
+ agent: "运营助手",
+ placeholder: "给 运营助手 发消息...",
+ queueSend: "排队发送",
+ stop: "停止",
+ typing: "输入中",
+ thinking: "思考中",
+ repliedIn: (elapsed: string) => `${elapsed} 内回复`,
+ replyTimes: ["14s", "11s"],
+ cancelled: "这次回复已取消。",
+ queueTitle: "1 条排队消息",
+ steer: "引导",
+ remove: "移除排队消息",
+ more: "更多队列操作",
+ edit: "编辑排队消息",
+ clear: "全部清空",
+ firstPrompt: "起草一份下周三消防演练的全员通知,集合地点写 1 楼大厅。",
+ partial: ["各位同事:下周三下午 3 点进行消防演练,", "警报响起后请走最近的安全通道,"],
+ tail: "到 1 楼大厅集合,各部门负责人清点人数后报给行政部。",
+ draft: "集合地点改成 B1 停车场,1 楼大厅那天在装修。",
+ steeredReply:
+ "各位同事:下周三下午 3 点进行消防演练,警报响起后请走最近的安全通道,到 B1 停车场集合(1 楼大厅当天装修),各部门负责人清点人数后报给行政部。",
+ captions: {
+ idle: "你请 运营助手 起草一份通知。",
+ opening: "运营助手 正在写回复。这时你想起集合地点得改。",
+ ready: "智能体还在回复,发送按钮变成了\"排队发送\"。点击发送。",
+ queued: "消息进了队列,要等当前回复写完才处理。点击\"引导\"让它马上处理,或者点 ⋯ 清空队列。",
+ menu: "全部清空会撤回队列里的消息,当前回复不受影响。点击\"全部清空\"。",
+ steering: "引导停掉了当前回复,已写出的部分留在对话里。智能体马上开始处理你的新消息。",
+ steered: "通知按新地点重写好了。点右上角可以重新演示。",
+ clearing: "队列已清空,那条消息不会发给智能体。当前回复继续写。",
+ cleared: "回复按原来的要求写完,地点仍是 1 楼大厅。点右上角重新演示,可以试试\"引导\"。",
+ } satisfies Captions,
+ },
+ ja: {
+ title: "チャット · 運用アシスタント",
+ agent: "運用アシスタント",
+ placeholder: "運用アシスタント にメッセージ…",
+ queueSend: "キューに追加",
+ stop: "停止",
+ typing: "入力中",
+ thinking: "考え中",
+ repliedIn: (elapsed: string) => `${elapsed}で返信`,
+ replyTimes: ["14s", "11s"],
+ cancelled: "この返信はキャンセルされました。",
+ queueTitle: "キュー内のメッセージ 1 件",
+ steer: "指示",
+ remove: "キューから削除",
+ more: "その他のキュー操作",
+ edit: "キュー内のメッセージを編集",
+ clear: "すべて削除",
+ firstPrompt: "来週水曜の避難訓練について、全社員向けのお知らせを書いてください。集合場所は 1 階ロビーです。",
+ partial: ["皆さま、来週水曜の午後 3 時に避難訓練を行います。", "警報が鳴ったら最寄りの非常口から避難し、"],
+ tail: "1 階ロビーに集合してください。各部署の責任者は人数を確認し、総務部に報告してください。",
+ draft: "集合場所を地下 1 階の駐車場に変更してください。当日は 1 階ロビーが改装中です。",
+ steeredReply:
+ "皆さま、来週水曜の午後 3 時に避難訓練を行います。警報が鳴ったら最寄りの非常口から避難し、地下 1 階の駐車場に集合してください(当日は 1 階ロビーが改装中です)。各部署の責任者は人数を確認し、総務部に報告してください。",
+ captions: {
+ idle: "運用アシスタント にお知らせの下書きを頼みました。",
+ opening: "運用アシスタント が返信を書いています。そこで集合場所を変える必要を思い出しました。",
+ ready: "エージェントはまだ返信中なので、送信ボタンは「キューに追加」になっています。送信をクリックします。",
+ queued:
+ "メッセージはキューに入り、今の返信が終わるまで処理されません。「指示」をクリックするとすぐ処理されます。⋯ からキューを空にすることもできます。",
+ menu: "「すべて削除」はキュー内のメッセージを取り消します。今の返信はそのまま続きます。「すべて削除」をクリックします。",
+ steering: "「指示」で今の返信が止まり、書きかけの部分はチャットに残りました。エージェントはすぐ新しいメッセージに取りかかります。",
+ steered: "新しい集合場所でお知らせが書き直されました。「もう一度」で最初から見られます。",
+ clearing: "キューが空になり、あのメッセージはエージェントに届きません。今の返信は続きます。",
+ cleared: "返信は最初の依頼どおり 1 階ロビーのまま完成しました。「もう一度」で「指示」も試せます。",
+ } satisfies Captions,
+ },
+ ko: {
+ title: "채팅 · 운영 도우미",
+ agent: "운영 도우미",
+ placeholder: "운영 도우미에게 메시지 보내기…",
+ queueSend: "대기열에 추가",
+ stop: "중지",
+ typing: "입력 중",
+ thinking: "생각 중",
+ repliedIn: (elapsed: string) => `${elapsed} 만에 답변`,
+ replyTimes: ["14s", "11s"],
+ cancelled: "이 답변이 취소되었습니다.",
+ queueTitle: "대기 중인 메시지 1개",
+ steer: "지시",
+ remove: "대기열에서 삭제",
+ more: "추가 대기열 작업",
+ edit: "대기 중인 메시지 편집",
+ clear: "모두 지우기",
+ firstPrompt: "다음 주 수요일 소방 훈련 전 직원 공지를 작성해 주세요. 집결 장소는 1층 로비입니다.",
+ partial: ["여러분, 다음 주 수요일 오후 3시에 소방 훈련이 있습니다. ", "경보가 울리면 가장 가까운 비상구로 나와 "],
+ tail: "1층 로비에 모여 주세요. 각 팀장은 인원을 확인해 총무팀에 알려 주세요.",
+ draft: "집결 장소를 지하 1층 주차장으로 바꿔 주세요. 그날 1층 로비는 공사 중이에요.",
+ steeredReply:
+ "여러분, 다음 주 수요일 오후 3시에 소방 훈련이 있습니다. 경보가 울리면 가장 가까운 비상구로 나와 지하 1층 주차장에 모여 주세요(그날 1층 로비는 공사 중입니다). 각 팀장은 인원을 확인해 총무팀에 알려 주세요.",
+ captions: {
+ idle: "운영 도우미에게 공지 초안을 부탁했습니다.",
+ opening: "운영 도우미가 답변을 쓰는 중입니다. 그때 집결 장소를 바꿔야 한다는 게 떠오릅니다.",
+ ready: "에이전트가 아직 답변 중이라 보내기 버튼이 '대기열에 추가'로 바뀌었습니다. 보내기를 클릭하세요.",
+ queued:
+ "메시지는 대기열에 들어가 현재 답변이 끝난 뒤에 처리됩니다. '지시'를 클릭하면 바로 처리되고, ⋯에서 대기열을 비울 수도 있습니다.",
+ menu: "'모두 지우기'는 대기 중인 메시지를 취소하고, 현재 답변은 그대로 이어집니다. '모두 지우기'를 클릭하세요.",
+ steering: "'지시'로 현재 답변이 멈췄고, 이미 쓴 부분은 채팅에 남았습니다. 에이전트가 바로 새 메시지를 처리합니다.",
+ steered: "새 집결 장소로 공지가 다시 작성되었습니다. '다시 보기'로 다시 볼 수 있습니다.",
+ clearing: "대기열이 비었고, 그 메시지는 에이전트에게 전달되지 않습니다. 현재 답변은 계속됩니다.",
+ cleared: "답변은 처음 요청대로 1층 로비로 완성되었습니다. '다시 보기'로 '지시'도 해 보세요.",
+ } satisfies Captions,
+ },
+ fr: {
+ title: "Discussion · Assistant ops",
+ agent: "Assistant ops",
+ placeholder: "Écrire à Assistant ops…",
+ queueSend: "Mettre le message en file d'attente",
+ stop: "Arrêter",
+ typing: "Rédaction",
+ thinking: "Réflexion",
+ repliedIn: (elapsed: string) => `Réponse en ${elapsed}`,
+ replyTimes: ["14s", "11s"],
+ cancelled: "Cette réponse a été annulée.",
+ queueTitle: "1 message en file d'attente",
+ steer: "Réorienter",
+ remove: "Retirer le message de la file d'attente",
+ more: "Plus d'actions sur la file d'attente",
+ edit: "Modifier le message en file d'attente",
+ clear: "Tout effacer",
+ firstPrompt:
+ "Rédigez une note à tout le personnel pour l'exercice d'évacuation de mercredi prochain. Point de rassemblement : le hall du rez-de-chaussée.",
+ partial: [
+ "Bonjour à tous, un exercice d'évacuation aura lieu mercredi prochain à 15 h. ",
+ "Quand l'alarme retentit, sortez par l'issue de secours la plus proche ",
+ ],
+ tail: "et rejoignez le hall du rez-de-chaussée. Les responsables d'équipe comptent leurs effectifs et préviennent les services généraux.",
+ draft: "Changez le point de rassemblement pour le parking du sous-sol : le hall est en travaux ce jour-là.",
+ steeredReply:
+ "Bonjour à tous, un exercice d'évacuation aura lieu mercredi prochain à 15 h. Quand l'alarme retentit, sortez par l'issue de secours la plus proche et rejoignez le parking du sous-sol (le hall est en travaux ce jour-là). Les responsables d'équipe comptent leurs effectifs et préviennent les services généraux.",
+ captions: {
+ idle: "Vous avez demandé à Assistant ops de rédiger une note.",
+ opening: "Assistant ops rédige sa réponse. Vous vous rappelez alors que le point de rassemblement doit changer.",
+ ready:
+ "L'agent répond encore : le bouton d'envoi met donc le message en file d'attente. Cliquez sur envoyer.",
+ queued:
+ "Le message attend dans la file jusqu'à la fin de la réponse en cours. Cliquez sur Réorienter pour qu'il soit traité tout de suite, ou ouvrez ⋯ pour vider la file.",
+ menu: "Tout effacer retire tous les messages en attente ; la réponse en cours continue. Cliquez sur Tout effacer.",
+ steering:
+ "Réorienter a arrêté la réponse en cours, en gardant ce qui était déjà écrit. L'agent traite aussitôt votre nouveau message.",
+ steered: "La note est réécrite avec le nouveau lieu. Utilisez Rejouer pour revoir la démo.",
+ clearing: "La file est vide et ce message n'arrivera pas à l'agent. La réponse en cours continue.",
+ cleared:
+ "La réponse s'est terminée comme demandé au départ, toujours dans le hall. Utilisez Rejouer pour essayer Réorienter.",
+ } satisfies Captions,
+ },
+};
+
+type Phase = keyof Captions;
+
+export function ChatQueueDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [run, setRun] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [chunks, setChunks] = useState(0);
+ const [secondPill, setSecondPill] = useState<"thinking" | "typing">("thinking");
+
+ // Opening: the first reply streams in, then the composer offers the follow-up.
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ setPhase("opening");
+ setChunks(1);
+ after(1000, () => setChunks(2));
+ after(1800, () => setPhase("ready"));
+ }, [visible, run, after, clear]);
+
+ const queue = () => setPhase("queued");
+
+ const steer = () => {
+ setPhase("steering");
+ setSecondPill("thinking");
+ after(1100, () => setSecondPill("typing"));
+ after(2600, () => setPhase("steered"));
+ };
+
+ const clearQueue = () => {
+ setPhase("clearing");
+ after(1600, () => setPhase("cleared"));
+ };
+
+ const replay = () => {
+ clear();
+ setChunks(0);
+ setSecondPill("thinking");
+ setPhase("idle");
+ setRun((r) => r + 1);
+ };
+
+ const steered = phase === "steering" || phase === "steered";
+ const firstDone = phase === "cleared";
+ const firstRunning = !steered && !firstDone;
+ const queueShown = phase === "queued" || phase === "menu";
+ // While the first reply is still being written, an empty composer offers Stop.
+ const showStop = phase === "queued" || phase === "menu" || phase === "clearing" || phase === "steering";
+ const partial = t.partial.slice(0, chunks).join("");
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[phase]} onReplay={replay}>
+ <div className="flex min-h-96 flex-col gap-3 p-4">
+ <div className="flex flex-col gap-3">
+ <UserMessage>{t.firstPrompt}</UserMessage>
+ {phase !== "idle" && (
+ <AgentMessage name={t.agent} meta={firstDone ? t.repliedIn(t.replyTimes[0]!) : undefined}>
+ <p className={steered ? "text-muted-foreground" : undefined}>
+ {firstDone ? `${t.partial.join("")}${t.tail}` : partial}
+ </p>
+ {steered && <p className="mt-1 text-caption text-muted-foreground">{t.cancelled}</p>}
+ </AgentMessage>
+ )}
+ {phase !== "idle" && firstRunning && <StatusPill label={t.typing} />}
+
+ {steered && <UserMessage>{t.draft}</UserMessage>}
+ {phase === "steering" && <StatusPill label={secondPill === "thinking" ? t.thinking : t.typing} />}
+ {phase === "steered" && (
+ <AgentMessage name={t.agent} meta={t.repliedIn(t.replyTimes[1]!)}>
+ <p>{t.steeredReply}</p>
+ </AgentMessage>
+ )}
+ </div>
+
+ <div className="mt-auto">
+ {queueShown && (
+ <section
+ aria-label={t.queueTitle}
+ className="relative z-0 mx-3 -mb-3 rounded-lg border bg-muted/40 px-2 pt-1 pb-4 motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2"
+ >
+ <div className="flex min-h-7 min-w-0 items-center gap-2 px-1 py-0.5 text-caption">
+ <ListEnd aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 flex-1 truncate text-muted-foreground">{t.draft}</span>
+ <div className="flex shrink-0 items-center gap-0.5">
+ <CoachMark quiet active={phase === "queued"} ringClassName="rounded-md">
+ <button
+ type="button"
+ disabled={phase !== "queued"}
+ onClick={steer}
+ className="inline-flex h-6 items-center gap-1 rounded-md px-1.5 text-caption text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-60 disabled:hover:bg-transparent"
+ >
+ <CornerDownRight aria-hidden className="size-3.5" />
+ {t.steer}
+ </button>
+ </CoachMark>
+ <IconButton label={t.remove} disabled>
+ <Trash2 aria-hidden className="size-3.5" />
+ </IconButton>
+ <span className="relative inline-flex">
+ <IconButton
+ label={t.more}
+ disabled={phase !== "queued"}
+ pressed={phase === "menu"}
+ onClick={() => setPhase("menu")}
+ >
+ <Ellipsis aria-hidden className="size-3.5" />
+ </IconButton>
+ {phase === "menu" && (
+ <div
+ role="menu"
+ aria-label={t.more}
+ className="absolute right-0 bottom-full z-20 mb-1.5 flex w-max flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ <button
+ type="button"
+ role="menuitem"
+ disabled
+ className="flex items-center gap-2 rounded-md px-2 py-1.5 text-caption opacity-50"
+ >
+ <Pencil aria-hidden className="size-3.5" />
+ {t.edit}
+ </button>
+ <div aria-hidden className="-mx-1 my-1 h-px bg-border" />
+ <CoachMark quiet active ringClassName="rounded-md" className="flex">
+ <button
+ type="button"
+ role="menuitem"
+ onClick={clearQueue}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-caption text-destructive hover:bg-destructive/10"
+ >
+ <Trash2 aria-hidden className="size-3.5" />
+ {t.clear}
+ </button>
+ </CoachMark>
+ </div>
+ )}
+ </span>
+ </div>
+ </div>
+ </section>
+ )}
+
+ <div className="relative z-10 rounded-lg border bg-background p-2">
+ <div className="min-h-10 px-1 text-body">
+ {phase === "ready" || phase === "opening" ? (
+ <span className="motion-safe:animate-in motion-safe:fade-in">{t.draft}</span>
+ ) : (
+ <span className="text-muted-foreground">{t.placeholder}</span>
+ )}
+ </div>
+ <div className="mt-1.5 flex items-center">
+ <span className="ml-auto" />
+ {showStop ? (
+ <button
+ type="button"
+ aria-label={t.stop}
+ disabled
+ className="inline-flex size-7 items-center justify-center rounded-full bg-foreground text-background opacity-40"
+ >
+ <Square aria-hidden className="size-3 fill-current" />
+ </button>
+ ) : (
+ <CoachMark active={phase === "ready"} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.queueSend} disabled={phase !== "ready"} onClick={queue} />
+ </CoachMark>
+ )}
+ </div>
+ </div>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
+
+function IconButton({
+ label,
+ disabled,
+ pressed,
+ onClick,
+ children,
+}: {
+ label: string;
+ disabled?: boolean;
+ pressed?: boolean;
+ onClick?: () => void;
+ children: ReactNode;
+}) {
+ return (
+ <button
+ type="button"
+ aria-label={label}
+ aria-expanded={pressed}
+ disabled={disabled}
+ onClick={onClick}
+ className="inline-flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-60 disabled:hover:bg-transparent aria-expanded:bg-accent"
+ >
+ {children}
+ </button>
+ );
+}
+
+function UserMessage({ children }: { children: ReactNode }) {
+ return (
+ <div className="flex justify-end motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1">
+ <div className="max-w-[85%] rounded-2xl bg-muted px-3 py-2 text-body break-words">{children}</div>
+ </div>
+ );
+}
+
+function AgentMessage({ name, meta, children }: { name: string; meta?: string; children: ReactNode }) {
+ return (
+ <div className="min-w-0 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex items-center gap-2">
+ <DemoAvatar name={name} agent />
+ <span className="text-label font-medium">{name}</span>
+ {meta && <span className="text-caption text-muted-foreground">{meta}</span>}
+ </div>
+ <div className="mt-1 pl-7 text-body break-words">{children}</div>
+ </div>
+ );
+}
+
+function StatusPill({ label }: { label: string }) {
+ return (
+ <div className="pl-7">
+ <span className="inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <Loader2 aria-hidden className="size-3 text-brand motion-safe:animate-spin" />
+ {label}
+ </span>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/concept-map-demo.tsx b/apps/docs/components/demos/concept-map-demo.tsx
new file mode 100644
index 0000000000..1f9a605f0c
--- /dev/null
+++ b/apps/docs/components/demos/concept-map-demo.tsx
@@ -0,0 +1,722 @@
+"use client";
+
+import { useState } from "react";
+import { CornerDownRight } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { LocaleLink } from "@/components/locale-link";
+import { CoachMark, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type NodeId =
+ | "workspace"
+ | "issue"
+ | "project"
+ | "agent"
+ | "skill"
+ | "runtime"
+ | "run"
+ | "squad"
+ | "chat"
+ | "inbox"
+ | "autopilot";
+
+type MapNode = Exclude<NodeId, "workspace">;
+
+type EdgeId =
+ | "project_issue"
+ | "issue_agent"
+ | "chat_agent"
+ | "autopilot_agent"
+ | "agent_run"
+ | "run_runtime"
+ | "run_issue"
+ | "run_chat"
+ | "skill_agent"
+ | "squad_agent"
+ | "squad_issue"
+ | "issue_inbox";
+
+type NodeCopy = { name: string; desc: string; page: string };
+
+// Positions on the wide map, in percent of its width and height.
+const POSITION: Record<MapNode, [number, number]> = {
+ project: [12, 24],
+ issue: [12, 48],
+ chat: [12, 71],
+ autopilot: [12, 90],
+ inbox: [31, 24],
+ squad: [50, 24],
+ skill: [70, 24],
+ agent: [48, 52],
+ run: [72, 52],
+ runtime: [90, 52],
+};
+
+// Write-back edges curve below the agent so they do not run through it.
+const EDGES: { id: EdgeId; from: MapNode; to: MapNode; curve?: [number, number]; dashed?: boolean }[] = [
+ { id: "project_issue", from: "project", to: "issue" },
+ { id: "issue_agent", from: "issue", to: "agent" },
+ { id: "chat_agent", from: "chat", to: "agent" },
+ { id: "autopilot_agent", from: "autopilot", to: "agent" },
+ { id: "agent_run", from: "agent", to: "run" },
+ { id: "run_runtime", from: "run", to: "runtime" },
+ { id: "run_issue", from: "run", to: "issue", curve: [44, 92], dashed: true },
+ { id: "run_chat", from: "run", to: "chat", curve: [46, 102], dashed: true },
+ { id: "skill_agent", from: "skill", to: "agent" },
+ { id: "squad_agent", from: "squad", to: "agent" },
+ { id: "squad_issue", from: "squad", to: "issue" },
+ { id: "issue_inbox", from: "issue", to: "inbox" },
+];
+
+const MAP_NODES = Object.keys(POSITION) as MapNode[];
+
+// The main line the coach mark walks the reader along, as on "How Multica works".
+const GUIDE: MapNode[] = ["issue", "agent", "run", "runtime"];
+
+const GROUPS: { key: "basic" | "execution" | "collaboration"; nodes: NodeId[] }[] = [
+ { key: "basic", nodes: ["workspace", "issue", "project"] },
+ { key: "execution", nodes: ["agent", "skill", "runtime", "run"] },
+ { key: "collaboration", nodes: ["squad", "chat", "inbox", "autopilot"] },
+];
+
+const copy = {
+ en: {
+ title: "Core objects and how they relate",
+ groups: { basic: "Basic objects", execution: "Agents and execution", collaboration: "Collaboration and automation" },
+ nodes: {
+ workspace: {
+ name: "Workspace",
+ desc: "The self-contained scope where a team works together; all work and configuration happen inside it. Humans and agents collaborate in the same workspace.",
+ page: "Workspaces",
+ },
+ issue: {
+ name: "Issue",
+ desc: "A piece of work to be done, plus the description, discussion, status, and history that accumulate around it. The assignee can be a member, an agent, or a squad.",
+ page: "Issues",
+ },
+ project: {
+ name: "Project",
+ desc: "Organizes related issues under one goal, tracks overall progress, and can bind resources such as repositories and directories for use during execution.",
+ page: "Projects",
+ },
+ agent: {
+ name: "Agent",
+ desc: "An AI collaborator in the workspace — a reusable configuration: name, instructions, model, skills, Access, and runtime. It executes only when triggered.",
+ page: "Agents",
+ },
+ skill: {
+ name: "Skill",
+ desc: "A reusable capability package. It describes how a kind of work is done, and can be attached to multiple agents.",
+ page: "Skills",
+ },
+ runtime: {
+ name: "Runtime",
+ desc: "Where execution actually happens: a computer connected to Multica and the AI coding tools on it.",
+ page: "Daemon and runtimes",
+ },
+ run: {
+ name: "Run",
+ desc: "One concrete execution record for an agent. One issue can produce multiple runs over time; a finished run does not mean the issue is done.",
+ page: "Runs",
+ },
+ squad: {
+ name: "Squad",
+ desc: "A group of agents and members led by an agent leader. Assign an issue to a squad and the leader coordinates the work.",
+ page: "Squads",
+ },
+ chat: {
+ name: "Chat",
+ desc: "A way to talk that is not attached to an issue — good for questions and quick experiments. Each message triggers one run.",
+ page: "Chat with agents",
+ },
+ inbox: {
+ name: "Inbox",
+ desc: "A member's notification center: activity on subscribed issues, mentions, and assignments all land here. Agents do not use the inbox.",
+ page: "Inbox and subscriptions",
+ },
+ autopilot: {
+ name: "Autopilot",
+ desc: "Triggers agent runs automatically on a schedule or from external events; you can also run one manually.",
+ page: "Autopilots",
+ },
+ } as Record<NodeId, NodeCopy>,
+ edges: {
+ project_issue: "Related issues are organized with projects.",
+ issue_agent: "Assigning or @-mentioning on an issue triggers the agent.",
+ chat_agent: "A chat message triggers the agent.",
+ autopilot_agent: "An autopilot triggers the agent on a schedule or event.",
+ agent_run: "Every trigger produces a run.",
+ run_runtime: "The run completes on a runtime.",
+ run_issue: "Results are written back to the issue that triggered it.",
+ run_chat: "Results are written back to the chat that triggered it.",
+ skill_agent: "Skills attach to agents, so what works is reused across them.",
+ squad_agent: "A squad lets multiple agents work together.",
+ squad_issue: "An issue can be assigned to a squad; its leader coordinates.",
+ issue_inbox: "Issue activity, mentions, and assignments reach members' inboxes.",
+ } as Record<EdgeId, string>,
+ workspaceRelation: "The workspace is the container for everything; humans and agents collaborate inside it.",
+ learnMore: "See ",
+ list: (names: string[]) => names.join(", "),
+ captions: {
+ idle: "The core objects in a workspace and the lines between them.",
+ start: "Click Issue to see what it connects to.",
+ connected: (name: string, related: string) => `${name} connects directly to ${related}.`,
+ contains: "The workspace contains every object.",
+ // Leading spaces: these follow another sentence in the caption.
+ next: (name: string) => ` Next, click ${name}.`,
+ done: "That is the main line: an issue triggers an agent, which produces a run; the run completes on a runtime and the results go back to the issue. Click any other object to explore.",
+ explore: " Click any other object to explore.",
+ },
+ },
+ zh: {
+ title: "核心对象和它们的关系",
+ groups: { basic: "基础对象", execution: "智能体与执行", collaboration: "协作与自动化" },
+ nodes: {
+ workspace: {
+ name: "工作区",
+ desc: "团队共同工作的独立范围,所有工作和配置都发生在其中;人和智能体在同一个工作区里协作。",
+ page: "工作区",
+ },
+ issue: {
+ name: "任务",
+ desc: "一项要完成的工作,以及围绕它积累的描述、讨论、状态和历史。负责人可以是成员、智能体或小队。",
+ page: "任务",
+ },
+ project: {
+ name: "项目",
+ desc: "把相关的任务组织在一个目标下,跟踪整体进度,并可以绑定仓库、目录等资源供执行时使用。",
+ page: "项目",
+ },
+ agent: {
+ name: "智能体",
+ desc: "加入工作区的 AI 协作者,是一份可复用的配置:名称、指令、模型、skill、Access 和运行时。只在被触发时执行。",
+ page: "智能体",
+ },
+ skill: {
+ name: "Skill",
+ desc: "可复用的能力包,说明\"这类工作怎么做\",可以挂载给多个智能体共用。",
+ page: "Skills",
+ },
+ runtime: {
+ name: "运行时",
+ desc: "执行实际发生的地方:连接到 Multica 的电脑和其中的 AI 编程工具。",
+ page: "守护进程与运行时",
+ },
+ run: {
+ name: "运行",
+ desc: "智能体的一次具体执行记录。一个任务可以先后产生多次运行;运行结束不等于任务完成。",
+ page: "运行",
+ },
+ squad: {
+ name: "小队",
+ desc: "一组智能体和成员,由一个智能体 leader 带领。把任务分配给小队,由 leader 协调完成。",
+ page: "小队",
+ },
+ chat: {
+ name: "对话",
+ desc: "不依附于任务的交流方式,适合提问和快速尝试。每条消息触发一轮执行。",
+ page: "与智能体对话",
+ },
+ inbox: {
+ name: "收件箱",
+ desc: "成员的通知中心:订阅的任务动态、提及和分配都汇聚在这里。智能体不使用收件箱。",
+ page: "收件箱与订阅",
+ },
+ autopilot: {
+ name: "自动化",
+ desc: "按时间表或外部事件自动触发智能体执行,也可以手动运行一次。",
+ page: "自动化",
+ },
+ } as Record<NodeId, NodeCopy>,
+ edges: {
+ project_issue: "相关的任务用项目组织。",
+ issue_agent: "在任务上分配或 @提及,触发智能体。",
+ chat_agent: "对话里的每条消息触发智能体。",
+ autopilot_agent: "自动化按时间表或外部事件触发智能体。",
+ agent_run: "每次触发产生一条运行。",
+ run_runtime: "运行在某个运行时上完成。",
+ run_issue: "结果写回触发它的任务。",
+ run_chat: "结果写回触发它的对话。",
+ skill_agent: "Skill 挂载给智能体,让成功经验跨智能体复用。",
+ squad_agent: "小队让多个智能体协同。",
+ squad_issue: "任务可以分配给小队,由 leader 协调。",
+ issue_inbox: "任务动态、提及和分配通知进成员的收件箱。",
+ } as Record<EdgeId, string>,
+ workspaceRelation: "工作区是一切的容器,人和智能体都在其中协作。",
+ learnMore: "详见",
+ list: (names: string[]) => names.join("、"),
+ captions: {
+ idle: "工作区里的核心对象,以及它们之间的连线。",
+ start: "点击任务,看它和哪些对象相连。",
+ // Space only where an English name meets Chinese, e.g. "Skill 和智能体".
+ connected: (name: string, related: string) =>
+ `${name}${/[A-Za-z]$/.test(name) ? " " : ""}和${/^[A-Za-z]/.test(related) ? " " : ""}${related}直接相连。`,
+ contains: "工作区包含所有对象。",
+ next: (name: string) => `接着点${name}。`,
+ done: "主线走完了:任务触发智能体,产生一条运行;运行在运行时上完成,结果写回任务。其他对象也可以点开看。",
+ explore: "其他对象也可以点开看。",
+ },
+ },
+ ja: {
+ title: "コアオブジェクトとその関係",
+ groups: { basic: "基本オブジェクト", execution: "エージェントと実行", collaboration: "協働と自動化" },
+ nodes: {
+ workspace: {
+ name: "ワークスペース",
+ desc: "チームが一緒に働く独立した範囲で、すべての仕事と設定はその中で行われます。人間とエージェントは同じワークスペースで協働します。",
+ page: "ワークスペース",
+ },
+ issue: {
+ name: "タスク",
+ desc: "完了すべき 1 件の仕事と、その周りに蓄積される説明、議論、ステータス、履歴。担当者はメンバー、エージェント、スクワッドのいずれかです。",
+ page: "タスク",
+ },
+ project: {
+ name: "プロジェクト",
+ desc: "関連するタスクを 1 つの目標の下に整理し、全体の進捗を追跡します。リポジトリやディレクトリなどのリソースを紐づけて、実行時に使わせることもできます。",
+ page: "プロジェクト",
+ },
+ agent: {
+ name: "エージェント",
+ desc: "ワークスペースに参加する AI の協働者で、名前、指示、モデル、スキル、アクセス、ランタイムからなる再利用可能な設定です。トリガーされたときだけ実行します。",
+ page: "エージェント",
+ },
+ skill: {
+ name: "スキル",
+ desc: "再利用可能な能力パッケージ。ある種類の仕事をどう進めるかを記述し、複数のエージェントに取り付けて共用できます。",
+ page: "スキル",
+ },
+ runtime: {
+ name: "ランタイム",
+ desc: "実行が実際に行われる場所。Multica に接続されたコンピュータと、その上の AI コーディングツールです。",
+ page: "デーモンとランタイム",
+ },
+ run: {
+ name: "実行",
+ desc: "エージェントの 1 回の具体的な実行記録。1 つのタスクから複数の実行が順に生まれることがあり、実行の終了はタスクの完了を意味しません。",
+ page: "実行",
+ },
+ squad: {
+ name: "スクワッド",
+ desc: "1 体のリーダーエージェントが率いる、エージェントとメンバーのグループ。タスクをスクワッドに割り当てると、リーダーが調整して進めます。",
+ page: "スクワッド",
+ },
+ chat: {
+ name: "チャット",
+ desc: "タスクに紐づかないやり取りの方法で、質問や素早い試行に向いています。メッセージ 1 件ごとに 1 回の実行がトリガーされます。",
+ page: "エージェントとのチャット",
+ },
+ inbox: {
+ name: "インボックス",
+ desc: "メンバーの通知センター。購読しているタスクの動き、メンション、割り当てがここに集まります。エージェントはインボックスを使いません。",
+ page: "インボックスと購読",
+ },
+ autopilot: {
+ name: "オートパイロット",
+ desc: "スケジュールまたは外部イベントに応じて、エージェントの実行を自動的にトリガーします。手動で 1 回だけ実行することもできます。",
+ page: "オートパイロット",
+ },
+ } as Record<NodeId, NodeCopy>,
+ edges: {
+ project_issue: "関連するタスクはプロジェクトで整理します。",
+ issue_agent: "タスクでの割り当てや @メンションがエージェントをトリガーします。",
+ chat_agent: "チャットのメッセージがエージェントをトリガーします。",
+ autopilot_agent: "オートパイロットがスケジュールや外部イベントでエージェントをトリガーします。",
+ agent_run: "トリガーのたびに実行が 1 件作られます。",
+ run_runtime: "実行はいずれかのランタイム上で完了します。",
+ run_issue: "結果はトリガー元のタスクに書き戻されます。",
+ run_chat: "結果はトリガー元のチャットに書き戻されます。",
+ skill_agent: "スキルはエージェントに取り付けて、成功したやり方をエージェント間で再利用させます。",
+ squad_agent: "スクワッドは複数のエージェントを協働させます。",
+ squad_issue: "タスクはスクワッドにも割り当てられ、リーダーが調整します。",
+ issue_inbox: "タスクの動き、メンション、割り当てはメンバーのインボックスに届きます。",
+ } as Record<EdgeId, string>,
+ workspaceRelation: "ワークスペースはすべての入れ物で、人間とエージェントがその中で協働します。",
+ learnMore: "詳しくは",
+ list: (names: string[]) => names.join("、"),
+ captions: {
+ idle: "ワークスペースのコアオブジェクトと、それらをつなぐ線です。",
+ start: "タスクをクリックすると、つながっているオブジェクトが分かります。",
+ connected: (name: string, related: string) => `${name}は${related}と直接つながっています。`,
+ contains: "ワークスペースはすべてのオブジェクトを含みます。",
+ next: (name: string) => `次に${name}をクリックしてください。`,
+ done: "これがメインの流れです。タスクがエージェントをトリガーして実行が作られ、実行はランタイム上で完了し、結果がタスクに書き戻されます。ほかのオブジェクトもクリックして確認できます。",
+ explore: "ほかのオブジェクトもクリックして確認できます。",
+ },
+ },
+ ko: {
+ title: "핵심 객체와 서로의 관계",
+ groups: { basic: "기본 객체", execution: "에이전트와 실행", collaboration: "협업과 자동화" },
+ nodes: {
+ workspace: {
+ name: "워크스페이스",
+ desc: "팀이 함께 일하는 독립된 공간입니다. 모든 작업과 설정이 워크스페이스 안에서 이루어지며, 사람과 에이전트가 같은 워크스페이스에서 협업합니다.",
+ page: "워크스페이스",
+ },
+ issue: {
+ name: "태스크",
+ desc: "해야 할 일과 그에 관한 설명, 논의, 상태, 이력을 한곳에 모은 객체입니다. 멤버나 에이전트, 스쿼드를 담당자로 지정할 수 있습니다.",
+ page: "태스크",
+ },
+ project: {
+ name: "프로젝트",
+ desc: "관련 태스크를 하나의 목표 아래 정리하고 전체 진행 상황을 추적합니다. 실행할 때 사용할 저장소나 디렉터리 같은 리소스도 연결할 수 있습니다.",
+ page: "프로젝트",
+ },
+ agent: {
+ name: "에이전트",
+ desc: "워크스페이스에서 함께 일하는 AI 협업자입니다. 이름, 지침, 모델, 스킬, 접근 권한, 런타임으로 이루어진 재사용 가능한 설정이며, 트리거될 때만 동작합니다.",
+ page: "에이전트",
+ },
+ skill: {
+ name: "스킬",
+ desc: "재사용할 수 있는 기능 패키지입니다. 특정 종류의 작업을 어떻게 수행하는지 설명하며, 여러 에이전트에 연결해 함께 사용할 수 있습니다.",
+ page: "스킬",
+ },
+ runtime: {
+ name: "런타임",
+ desc: "실제 실행이 일어나는 곳으로, Multica에 연결된 컴퓨터와 그 컴퓨터의 AI 코딩 도구를 뜻합니다.",
+ page: "데몬과 런타임",
+ },
+ run: {
+ name: "실행",
+ desc: "에이전트가 한 번 실행된 기록입니다. 하나의 태스크에서 여러 실행이 만들어질 수 있으며, 실행이 끝났다고 해서 태스크까지 완료된 것은 아닙니다.",
+ page: "실행",
+ },
+ squad: {
+ name: "스쿼드",
+ desc: "리더 에이전트 한 명이 이끄는 에이전트와 멤버의 그룹입니다. 태스크를 스쿼드에 할당하면 리더가 작업을 조율합니다.",
+ page: "스쿼드",
+ },
+ chat: {
+ name: "채팅",
+ desc: "태스크에 연결하지 않고 대화하는 방식으로, 질문이나 간단한 시도에 적합합니다. 메시지를 보낼 때마다 한 번의 실행이 트리거됩니다.",
+ page: "에이전트와 대화",
+ },
+ inbox: {
+ name: "인박스",
+ desc: "멤버를 위한 알림 센터입니다. 구독한 태스크의 활동, 멘션, 할당 알림이 이곳에 모입니다. 에이전트는 인박스를 사용하지 않습니다.",
+ page: "인박스와 구독",
+ },
+ autopilot: {
+ name: "오토파일럿",
+ desc: "일정이나 외부 이벤트에 따라 에이전트 실행을 자동으로 트리거하며, 필요하면 한 번만 수동으로 실행할 수도 있습니다.",
+ page: "오토파일럿",
+ },
+ } as Record<NodeId, NodeCopy>,
+ edges: {
+ project_issue: "관련 태스크는 프로젝트로 정리합니다.",
+ issue_agent: "태스크에서 할당하거나 @멘션하면 에이전트가 트리거됩니다.",
+ chat_agent: "채팅 메시지가 에이전트를 트리거합니다.",
+ autopilot_agent: "오토파일럿이 일정이나 외부 이벤트에 따라 에이전트를 트리거합니다.",
+ agent_run: "트리거할 때마다 실행이 하나 만들어집니다.",
+ run_runtime: "실행은 런타임에서 완료됩니다.",
+ run_issue: "결과는 실행을 트리거한 태스크에 다시 기록됩니다.",
+ run_chat: "결과는 실행을 트리거한 채팅에 다시 기록됩니다.",
+ skill_agent: "스킬은 에이전트에 연결되어 검증된 작업 방식을 여러 에이전트에서 재사용하게 합니다.",
+ squad_agent: "스쿼드는 여러 에이전트가 함께 일하게 합니다.",
+ squad_issue: "태스크를 스쿼드에 할당하면 리더가 조율합니다.",
+ issue_inbox: "태스크 활동, 멘션, 할당 알림은 멤버의 인박스로 갑니다.",
+ } as Record<EdgeId, string>,
+ workspaceRelation: "워크스페이스는 모든 객체를 담는 공간이며, 사람과 에이전트가 그 안에서 협업합니다.",
+ learnMore: "자세히: ",
+ list: (names: string[]) => names.join(", "),
+ captions: {
+ idle: "워크스페이스의 핵심 객체와 그 사이를 잇는 선입니다.",
+ start: "태스크를 클릭해 어떤 객체와 연결되는지 확인하세요.",
+ // Phrased so no particle has to agree with the name's final consonant.
+ connected: (name: string, related: string) => `${name}에 직접 연결된 객체: ${related}.`,
+ contains: "워크스페이스가 모든 객체를 담고 있습니다.",
+ next: (name: string) => ` 이어서 ${name} 항목을 클릭하세요.`,
+ done: "이것이 주요 흐름입니다. 태스크가 에이전트를 트리거해 실행이 만들어지고, 실행은 런타임에서 완료되어 결과가 태스크에 다시 기록됩니다. 다른 객체도 클릭해 살펴보세요.",
+ explore: " 다른 객체도 클릭해 살펴보세요.",
+ },
+ },
+ fr: {
+ title: "Les objets clés et leurs relations",
+ groups: { basic: "Objets de base", execution: "Agents et exécution", collaboration: "Collaboration et automatisation" },
+ nodes: {
+ workspace: {
+ name: "Espace de travail",
+ desc: "Le périmètre autonome dans lequel une équipe travaille ensemble ; tout le travail et toute la configuration s'y trouvent. Humains et agents collaborent dans le même espace de travail.",
+ page: "Espaces de travail",
+ },
+ issue: {
+ name: "Tâche",
+ desc: "Un travail à réaliser, accompagné de la description, de la discussion, du statut et de l'historique qui s'accumulent autour de lui. L'assigné peut être un membre, un agent ou un squad.",
+ page: "Tâches",
+ },
+ project: {
+ name: "Projet",
+ desc: "Regroupe des tâches liées autour d'un même objectif, suit l'avancement global et peut rattacher des ressources, comme des dépôts et des répertoires, utilisées pendant l'exécution.",
+ page: "Projets",
+ },
+ agent: {
+ name: "Agent",
+ desc: "Un collaborateur IA de l'espace de travail — une configuration réutilisable : nom, instructions, modèle, skills, Accès et runtime. Il ne s'exécute que lorsqu'il est déclenché.",
+ page: "Agents",
+ },
+ skill: {
+ name: "Skill",
+ desc: "Un paquet de capacités réutilisable. Il décrit comment réaliser un type de travail et peut être rattaché à plusieurs agents.",
+ page: "Skills",
+ },
+ runtime: {
+ name: "Runtime",
+ desc: "L'endroit où l'exécution a réellement lieu : un ordinateur connecté à Multica et les outils de codage IA qui y sont installés.",
+ page: "Daemon et runtimes",
+ },
+ run: {
+ name: "Exécution",
+ desc: "L'enregistrement concret d'une exécution d'un agent. Une tâche peut produire plusieurs exécutions au fil du temps ; une exécution terminée ne signifie pas que la tâche est terminée.",
+ page: "Exécutions",
+ },
+ squad: {
+ name: "Squad",
+ desc: "Un groupe d'agents et de membres dirigé par un agent chef. Assignez une tâche à un squad et le chef coordonne le travail.",
+ page: "Squads",
+ },
+ chat: {
+ name: "Discussion",
+ desc: "Un moyen d'échanger qui n'est rattaché à aucune tâche, idéal pour les questions et les essais rapides. Chaque message déclenche une exécution.",
+ page: "Discuter avec des agents",
+ },
+ inbox: {
+ name: "Boîte de réception",
+ desc: "Le centre de notifications d'un membre : l'activité sur les tâches suivies, les mentions et les assignations y arrivent. Les agents n'utilisent pas la Boîte de réception.",
+ page: "Boîte de réception et abonnements",
+ },
+ autopilot: {
+ name: "Automatisation",
+ desc: "Déclenche automatiquement des exécutions d'agents selon une planification ou à partir d'événements externes ; vous pouvez aussi en lancer une manuellement.",
+ page: "Automatisations",
+ },
+ } as Record<NodeId, NodeCopy>,
+ edges: {
+ project_issue: "Les tâches liées sont organisées en projets.",
+ issue_agent: "Assigner une tâche ou @mentionner l'agent dans une tâche le déclenche.",
+ chat_agent: "Un message de discussion déclenche l'agent.",
+ autopilot_agent: "Une automatisation déclenche l'agent selon une planification ou un événement.",
+ agent_run: "Chaque déclenchement produit une exécution.",
+ run_runtime: "L'exécution s'effectue sur un runtime.",
+ run_issue: "Les résultats sont réécrits dans la tâche qui l'a déclenchée.",
+ run_chat: "Les résultats sont réécrits dans la discussion qui l'a déclenchée.",
+ skill_agent: "Les skills se rattachent aux agents pour réutiliser ce qui fonctionne de l'un à l'autre.",
+ squad_agent: "Un squad fait travailler plusieurs agents ensemble.",
+ squad_issue: "Une tâche peut être assignée à un squad ; son chef coordonne.",
+ issue_inbox: "L'activité des tâches, les mentions et les assignations arrivent dans la Boîte de réception des membres.",
+ } as Record<EdgeId, string>,
+ workspaceRelation: "L'espace de travail contient tout ; humains et agents y collaborent.",
+ learnMore: "Voir ",
+ list: (names: string[]) =>
+ names.length < 2 ? names.join("") : `${names.slice(0, -1).join(", ")} et ${names[names.length - 1]}`,
+ captions: {
+ idle: "Les objets clés d'un espace de travail et les liens entre eux.",
+ start: "Cliquez sur Tâche pour voir à quoi elle est reliée.",
+ connected: (name: string, related: string) => `${name} se connecte directement à : ${related}.`,
+ contains: "L'espace de travail contient tous les objets.",
+ next: (name: string) => ` Cliquez ensuite sur ${name}.`,
+ done: "Voilà le fil principal : une tâche déclenche un agent, qui produit une exécution ; l'exécution se termine sur un runtime et les résultats reviennent dans la tâche. Cliquez sur n'importe quel autre objet pour explorer.",
+ explore: " Cliquez sur n'importe quel autre objet pour explorer.",
+ },
+ },
+};
+
+const PAGE_HREF: Record<NodeId, string> = {
+ workspace: "/workspaces",
+ issue: "/issues",
+ project: "/projects",
+ agent: "/agents",
+ skill: "/skills",
+ runtime: "/daemon-runtimes",
+ run: "/tasks",
+ squad: "/squads",
+ chat: "/chat",
+ inbox: "/inbox",
+ autopilot: "/autopilots",
+};
+
+function edgesOf(id: NodeId) {
+ return EDGES.filter((e) => e.from === id || e.to === id);
+}
+
+function neighborsOf(id: NodeId): Set<NodeId> {
+ if (id === "workspace") return new Set(MAP_NODES);
+ return new Set(edgesOf(id).map((e) => (e.from === id ? e.to : e.from)));
+}
+
+function edgePath({ from, to, curve }: (typeof EDGES)[number]) {
+ const [x1, y1] = POSITION[from];
+ const [x2, y2] = POSITION[to];
+ return curve ? `M ${x1} ${y1} Q ${curve[0]} ${curve[1]} ${x2} ${y2}` : `M ${x1} ${y1} L ${x2} ${y2}`;
+}
+
+export function ConceptMapDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [selected, setSelected] = useState<NodeId | null>(null);
+ const [guide, setGuide] = useState(0);
+
+ const guideTarget = visible && guide < GUIDE.length ? GUIDE[guide] : null;
+ const neighbors = selected ? neighborsOf(selected) : null;
+
+ const select = (id: NodeId) => {
+ setSelected(id);
+ if (id === guideTarget) setGuide(guide + 1);
+ };
+
+ const replay = () => {
+ setSelected(null);
+ setGuide(0);
+ };
+
+ const caption = (() => {
+ if (!visible) return t.captions.idle;
+ if (!selected) return t.captions.start;
+ const name = t.nodes[selected].name;
+ const head =
+ selected === "workspace"
+ ? t.captions.contains
+ : t.captions.connected(name, t.list([...neighborsOf(selected)].map((n) => t.nodes[n].name)));
+ if (guideTarget) return `${head}${t.captions.next(t.nodes[guideTarget].name)}`;
+ if (selected === GUIDE[GUIDE.length - 1] && guide === GUIDE.length) return t.captions.done;
+ return `${head}${t.captions.explore}`;
+ })();
+
+ const nodeState = (id: NodeId) => {
+ if (!selected) return "idle" as const;
+ if (id === selected) return "selected" as const;
+ return neighbors?.has(id) ? ("related" as const) : ("dimmed" as const);
+ };
+
+ const nodeButton = (id: NodeId, className?: string) => {
+ const state = nodeState(id);
+ return (
+ <button
+ type="button"
+ aria-pressed={id === selected}
+ disabled={!visible}
+ onClick={() => select(id)}
+ className={cn(
+ "rounded-md border px-2.5 py-1 text-label font-medium whitespace-nowrap shadow-xs transition-[color,background-color,border-color,opacity] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
+ // Every state keeps an opaque fill: edges run to node centers and
+ // must stay hidden behind the label.
+ state === "selected" && "border-brand bg-brand text-brand-foreground",
+ state === "related" && "border-brand/60 bg-background bg-linear-to-b from-brand/10 to-brand/10 text-foreground",
+ state === "idle" && "bg-background hover:bg-muted",
+ state === "dimmed" && "border-border/60 bg-background text-muted-foreground/60 shadow-none hover:bg-muted",
+ className,
+ )}
+ >
+ {t.nodes[id].name}
+ </button>
+ );
+ };
+
+ const workspaceState = nodeState("workspace");
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="flex flex-col gap-3 p-4">
+ {/* Wide screens: the map, with the workspace as the frame around every object. */}
+ <div
+ className={cn(
+ "relative hidden aspect-[16/9] rounded-lg border border-dashed transition-colors sm:block",
+ workspaceState === "selected" && "border-brand bg-brand/5",
+ )}
+ >
+ <div className="absolute top-2 left-2 z-10">{nodeButton("workspace", "shadow-none")}</div>
+ <svg
+ aria-hidden
+ className="absolute inset-0 size-full"
+ viewBox="0 0 100 100"
+ preserveAspectRatio="none"
+ >
+ {EDGES.map((edge) => {
+ const lit = selected === "workspace" || edge.from === selected || edge.to === selected;
+ return (
+ <path
+ key={edge.id}
+ d={edgePath(edge)}
+ vectorEffect="non-scaling-stroke"
+ strokeDasharray={edge.dashed ? "4 3" : undefined}
+ strokeWidth={lit ? 2 : 1.25}
+ className={cn(
+ "fill-none transition-[stroke,opacity]",
+ lit ? "stroke-brand" : "stroke-border",
+ selected && !lit && "opacity-50",
+ )}
+ />
+ );
+ })}
+ </svg>
+ {MAP_NODES.map((id) => {
+ const [x, y] = POSITION[id];
+ return (
+ <div
+ key={id}
+ className="absolute z-10 -translate-x-1/2 -translate-y-1/2"
+ style={{ left: `${x}%`, top: `${y}%` }}
+ >
+ <CoachMark
+ active={guideTarget === id}
+ side="top"
+ align={x > 85 ? "end" : x < 15 ? "start" : "center"}
+ ringClassName="rounded-lg"
+ >
+ {nodeButton(id)}
+ </CoachMark>
+ </div>
+ );
+ })}
+ </div>
+
+ {/* Phones: the same objects grouped as on the page; related ones light up. */}
+ <div className="flex flex-col gap-3 sm:hidden">
+ {GROUPS.map((group) => (
+ <div key={group.key}>
+ <div className="mb-1.5 text-micro text-muted-foreground">{t.groups[group.key]}</div>
+ <div className="flex flex-wrap gap-2">
+ {group.nodes.map((id) => (
+ <CoachMark quiet key={id} active={guideTarget === id} ringClassName="rounded-lg">
+ {nodeButton(id)}
+ </CoachMark>
+ ))}
+ </div>
+ </div>
+ ))}
+ </div>
+
+ {selected && (
+ <div
+ key={selected}
+ className="rounded-lg border bg-background px-3 py-2.5 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="text-body font-medium">{t.nodes[selected].name}</div>
+ <p className="mt-0.5 text-body text-muted-foreground">{t.nodes[selected].desc}</p>
+ <ul className="mt-2 flex flex-col gap-1">
+ {selected === "workspace" ? (
+ <li className="flex items-start gap-1.5 text-caption">
+ <CornerDownRight aria-hidden className="mt-px size-3.5 shrink-0 text-brand" />
+ {t.workspaceRelation}
+ </li>
+ ) : (
+ edgesOf(selected).map((edge) => (
+ <li key={edge.id} className="flex items-start gap-1.5 text-caption">
+ <CornerDownRight aria-hidden className="mt-px size-3.5 shrink-0 text-brand" />
+ {t.edges[edge.id]}
+ </li>
+ ))
+ )}
+ </ul>
+ <div className="mt-2 text-caption text-muted-foreground">
+ {t.learnMore}
+ <LocaleLink href={PAGE_HREF[selected]} className="font-medium text-brand hover:underline">
+ {t.nodes[selected].page}
+ </LocaleLink>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/create-agent-demo.tsx b/apps/docs/components/demos/create-agent-demo.tsx
new file mode 100644
index 0000000000..13e40bc0b1
--- /dev/null
+++ b/apps/docs/components/demos/create-agent-demo.tsx
@@ -0,0 +1,746 @@
+"use client";
+
+import { useState, type ReactNode } from "react";
+import { ArrowRight, AtSign, Bot, Check, CircleCheck, ListPlus, Monitor, Sparkles, Users } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoFrame, useDemoCopy, useDemoTimers, useStartWhenVisible } from "./demo-kit";
+
+type Harness = { id: string; label: string; version: string };
+type Access = { title: string; desc: string };
+
+const copy = {
+ en: {
+ frameTitle: "New agent",
+ shellTitle: "Create an agent",
+ steps: ["Choose runtime", "Configure", "Done"],
+ runtimeTitle: "Where should this agent run?",
+ machinesGroup: "Machines",
+ thisMachine: "This machine",
+ harnessCount: "2 harnesses",
+ harnesses: [
+ { id: "claude", label: "Claude", version: "v2.1" },
+ { id: "codex", label: "Codex", version: "v0.46" },
+ ] as Harness[],
+ selected: "Selected:",
+ selectedSummary: "Claude · This machine",
+ cancel: "Cancel",
+ next: "Next",
+ configureTitle: "Configure the agent",
+ askAi: "Let AI write it",
+ identity: "Identity",
+ nameLabel: "Name",
+ name: "Ops helper",
+ descriptionLabel: "Description",
+ description: "Weekly reports, event prep and day-to-day ops chores",
+ behavior: "Behavior & capabilities",
+ instructionsLabel: "Instructions",
+ instructions: [
+ "You handle the team's day-to-day operations: weekly reports, event prep, customer feedback roundups.",
+ "Read the description and comments first. If something is missing, ask in a comment instead of guessing.",
+ "Deliver in the issue comments, in short paragraphs and lists. Check with the assignee before spending money or publishing anything.",
+ ],
+ skillsLabel: "Skills",
+ skillsPlaceholder: "Add skills from workspace",
+ execution: "Execution",
+ executionHint: "Unspecified options use the runtime defaults.",
+ runtimeLabel: "Runtime",
+ runtime: "Claude (MacBook)",
+ change: "Change",
+ modelLabel: "Model",
+ model: "Default (provider)",
+ accessLabel: "Access",
+ access: [
+ { title: "Only me", desc: "Only you can run this agent." },
+ { title: "Entire workspace", desc: "Every workspace member can run it." },
+ { title: "Specific people", desc: "Only selected members can run it." },
+ ] as Access[],
+ create: "Create agent",
+ creating: "Creating agent…",
+ ready: (name: string) => `${name} is ready`,
+ runsOn: (runtime: string) => `Runs on ${runtime}`,
+ nextLabel: "What next",
+ assignTitle: "Assign its first task",
+ mentionTitle: "Mention it in an issue",
+ squadTitle: "Add it to a squad",
+ openAgent: "Open agent",
+ backToList: "Back to agents",
+ listTitle: "Agents",
+ newAgent: "New agent",
+ columns: { agent: "Agent", status: "Status", workload: "Workload", runtime: "Runtime" },
+ online: "Online",
+ idle: "Idle",
+ working: "Working",
+ otherAgent: "Writing helper",
+ otherRuntime: "Codex (MacBook)",
+ captions: {
+ idle: "Creating an agent starts with where it runs.",
+ runtime: "Step 1: pick a runtime. Only online harnesses can be chosen.",
+ runtimeNext: "The footer shows your choice. Click Next.",
+ configure: "Step 2: name and instructions are filled in. The model is left at the runtime default, and Access starts at Only me.",
+ creating: "Creating the agent…",
+ done: "Created. From here you can hand it work, or go back to the agent list.",
+ list: "Ops helper is in the list: its runtime is online and nothing is running yet. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ frameTitle: "新建智能体",
+ shellTitle: "创建智能体",
+ steps: ["选择运行时", "配置", "完成"],
+ runtimeTitle: "这个智能体在哪里运行?",
+ machinesGroup: "机器",
+ thisMachine: "本机",
+ harnessCount: "2 个 harness",
+ harnesses: [
+ { id: "claude", label: "Claude", version: "v2.1" },
+ { id: "codex", label: "Codex", version: "v0.46" },
+ ] as Harness[],
+ selected: "已选:",
+ selectedSummary: "Claude · 本机",
+ cancel: "取消",
+ next: "下一步",
+ configureTitle: "配置智能体",
+ askAi: "让 AI 帮我写",
+ identity: "身份",
+ nameLabel: "名称",
+ name: "运营助手",
+ descriptionLabel: "描述",
+ description: "整理周报、筹备活动和日常运营杂事",
+ behavior: "行为与能力",
+ instructionsLabel: "指令",
+ instructions: [
+ "你负责团队的日常运营:整理周报、筹备活动、汇总客户反馈。",
+ "收到任务先读完描述和评论;信息不够就在评论里问,不要自己猜。",
+ "结果写在任务评论里,用短段落和清单。要花钱或对外发布的事,先找负责人确认。",
+ ],
+ skillsLabel: "Skills",
+ skillsPlaceholder: "从工作区添加 skill",
+ execution: "执行配置",
+ executionHint: "未指定的选项沿用运行时默认值。",
+ runtimeLabel: "运行时",
+ runtime: "Claude (MacBook)",
+ change: "更换",
+ modelLabel: "模型",
+ model: "默认(提供方)",
+ accessLabel: "访问权限",
+ access: [
+ { title: "仅自己", desc: "只有你可以运行此智能体。" },
+ { title: "整个工作区", desc: "工作区中的所有成员都可以运行。" },
+ { title: "指定成员", desc: "只有选中的成员可以运行。" },
+ ] as Access[],
+ create: "创建智能体",
+ creating: "正在创建…",
+ ready: (name: string) => `${name} 已就绪`,
+ runsOn: (runtime: string) => `运行在 ${runtime}`,
+ nextLabel: "接下来",
+ assignTitle: "指派第一个任务",
+ mentionTitle: "在任务里 @ 它",
+ squadTitle: "加入小队",
+ openAgent: "打开智能体",
+ backToList: "返回智能体列表",
+ listTitle: "智能体",
+ newAgent: "新建智能体",
+ columns: { agent: "智能体", status: "状态", workload: "工作负载", runtime: "运行时" },
+ online: "在线",
+ idle: "空闲",
+ working: "处理中",
+ otherAgent: "文案助手",
+ otherRuntime: "Codex (MacBook)",
+ captions: {
+ idle: "创建智能体的第一步是决定它在哪里运行。",
+ runtime: "第 1 步:选择运行时。只有在线的 harness 可以选。",
+ runtimeNext: "底部显示了你的选择。点击下一步。",
+ configure: "第 2 步:名称和指令已经填好。模型留空,沿用运行时默认值;访问权限默认是仅自己。",
+ creating: "正在创建智能体…",
+ done: "创建完成。可以直接给它派活,也可以先回到智能体列表。",
+ list: "运营助手 出现在列表里:运行时在线,还没有运行,所以是空闲。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ frameTitle: "新規エージェント",
+ shellTitle: "エージェントを作成",
+ steps: ["ランタイムを選択", "設定", "完了"],
+ runtimeTitle: "このエージェントをどこで実行しますか?",
+ machinesGroup: "マシン",
+ thisMachine: "このマシン",
+ harnessCount: "2 個のハーネス",
+ harnesses: [
+ { id: "claude", label: "Claude", version: "v2.1" },
+ { id: "codex", label: "Codex", version: "v0.46" },
+ ] as Harness[],
+ selected: "選択中:",
+ selectedSummary: "Claude · このマシン",
+ cancel: "キャンセル",
+ next: "次へ",
+ configureTitle: "エージェントを設定",
+ askAi: "AI に書いてもらう",
+ identity: "基本情報",
+ nameLabel: "名前",
+ name: "運用アシスタント",
+ descriptionLabel: "説明",
+ description: "週報、イベント準備、日々の運用まわりの雑務",
+ behavior: "動作と機能",
+ instructionsLabel: "指示",
+ instructions: [
+ "チームの日常運用を担当します:週報の作成、イベントの準備、顧客フィードバックの取りまとめ。",
+ "タスクを受けたら、まず説明とコメントを読みます。情報が足りなければ推測せず、コメントで質問します。",
+ "成果はタスクのコメントに、短い段落と箇条書きで書きます。費用が発生する作業や社外への公開は、先に担当者に確認します。",
+ ],
+ skillsLabel: "スキル",
+ skillsPlaceholder: "ワークスペースからスキルを追加",
+ execution: "実行設定",
+ executionHint: "未指定の項目はランタイムの既定値を使います。",
+ runtimeLabel: "ランタイム",
+ runtime: "Claude (MacBook)",
+ change: "変更",
+ modelLabel: "モデル",
+ model: "デフォルト(プロバイダー)",
+ accessLabel: "アクセス",
+ access: [
+ { title: "自分のみ", desc: "このエージェントを実行できるのは自分だけです。" },
+ { title: "ワークスペース全体", desc: "すべてのワークスペースメンバーが実行できます。" },
+ { title: "特定のメンバー", desc: "選択したメンバーだけが実行できます。" },
+ ] as Access[],
+ create: "エージェントを作成",
+ creating: "エージェントを作成中…",
+ ready: (name: string) => `${name} の準備ができました`,
+ runsOn: (runtime: string) => `${runtime} で実行`,
+ nextLabel: "次にすること",
+ assignTitle: "最初のタスクを割り当てる",
+ mentionTitle: "イシューでメンションする",
+ squadTitle: "スクワッドに追加",
+ openAgent: "エージェントを開く",
+ backToList: "エージェント一覧に戻る",
+ listTitle: "エージェント",
+ newAgent: "新規エージェント",
+ columns: { agent: "エージェント", status: "ステータス", workload: "作業量", runtime: "ランタイム" },
+ online: "オンライン",
+ idle: "アイドル",
+ working: "作業中",
+ otherAgent: "ライティングアシスタント",
+ otherRuntime: "Codex (MacBook)",
+ captions: {
+ idle: "エージェントの作成は、どこで実行するかを決めるところから始まります。",
+ runtime: "ステップ 1:ランタイムを選びます。選べるのはオンラインのハーネスだけです。",
+ runtimeNext: "下部に選んだ内容が表示されます。「次へ」をクリックします。",
+ configure: "ステップ 2:名前と指示は入力済みです。モデルは空欄のままなのでランタイムの既定値を使い、アクセスは最初「自分のみ」です。",
+ creating: "エージェントを作成しています…",
+ done: "作成できました。ここからすぐ仕事を任せることも、エージェント一覧に戻ることもできます。",
+ list: "運用アシスタントが一覧に加わりました。ランタイムはオンラインで、まだ実行がないのでアイドルです。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ frameTitle: "새 에이전트",
+ shellTitle: "에이전트 만들기",
+ steps: ["런타임 선택", "구성", "완료"],
+ runtimeTitle: "이 에이전트를 어디서 실행할까요?",
+ machinesGroup: "머신",
+ thisMachine: "이 머신",
+ harnessCount: "하네스 2개",
+ harnesses: [
+ { id: "claude", label: "Claude", version: "v2.1" },
+ { id: "codex", label: "Codex", version: "v0.46" },
+ ] as Harness[],
+ selected: "선택됨:",
+ selectedSummary: "Claude · 이 머신",
+ cancel: "취소",
+ next: "다음",
+ configureTitle: "에이전트 구성",
+ askAi: "AI에게 작성 맡기기",
+ identity: "기본 정보",
+ nameLabel: "이름",
+ name: "운영 도우미",
+ descriptionLabel: "설명",
+ description: "주간 보고, 행사 준비, 일상적인 운영 업무",
+ behavior: "동작 및 기능",
+ instructionsLabel: "지침",
+ instructions: [
+ "팀의 일상 운영을 맡습니다: 주간 보고 작성, 행사 준비, 고객 피드백 정리.",
+ "태스크를 받으면 설명과 댓글부터 읽습니다. 정보가 부족하면 추측하지 말고 댓글로 물어봅니다.",
+ "결과는 태스크 댓글에 짧은 문단과 목록으로 남깁니다. 비용이 들거나 외부에 공개하는 일은 먼저 담당자에게 확인합니다.",
+ ],
+ skillsLabel: "스킬",
+ skillsPlaceholder: "워크스페이스에서 스킬 추가",
+ execution: "실행 설정",
+ executionHint: "지정하지 않은 옵션은 런타임 기본값을 사용합니다.",
+ runtimeLabel: "런타임",
+ runtime: "Claude (MacBook)",
+ change: "변경",
+ modelLabel: "모델",
+ model: "기본값(제공자)",
+ accessLabel: "접근 권한",
+ access: [
+ { title: "나만", desc: "나만 이 에이전트를 실행할 수 있습니다." },
+ { title: "전체 워크스페이스", desc: "모든 워크스페이스 멤버가 실행할 수 있습니다." },
+ { title: "특정 멤버", desc: "선택한 멤버만 실행할 수 있습니다." },
+ ] as Access[],
+ create: "에이전트 만들기",
+ creating: "에이전트 만드는 중…",
+ ready: (name: string) => `${name} 준비 완료`,
+ runsOn: (runtime: string) => `${runtime}에서 실행`,
+ nextLabel: "다음 단계",
+ assignTitle: "첫 작업 할당하기",
+ mentionTitle: "이슈에서 멘션하기",
+ squadTitle: "스쿼드에 추가",
+ openAgent: "에이전트 열기",
+ backToList: "에이전트 목록으로",
+ listTitle: "에이전트",
+ newAgent: "새 에이전트",
+ columns: { agent: "에이전트", status: "상태", workload: "작업량", runtime: "런타임" },
+ online: "온라인",
+ idle: "유휴",
+ working: "작업 중",
+ otherAgent: "글쓰기 도우미",
+ otherRuntime: "Codex (MacBook)",
+ captions: {
+ idle: "에이전트를 만들 때는 먼저 어디서 실행할지 정합니다.",
+ runtime: "1단계: 런타임을 고릅니다. 온라인인 하네스만 선택할 수 있습니다.",
+ runtimeNext: "아래쪽에 선택한 항목이 표시됩니다. 다음을 클릭하세요.",
+ configure: "2단계: 이름과 지침은 채워져 있습니다. 모델은 비워 두어 런타임 기본값을 쓰고, 접근 권한은 처음에 나만입니다.",
+ creating: "에이전트를 만드는 중…",
+ done: "만들었습니다. 여기서 바로 일을 맡기거나 에이전트 목록으로 돌아갈 수 있습니다.",
+ list: "운영 도우미가 목록에 추가되었습니다. 런타임은 온라인이고 아직 실행이 없어 유휴 상태입니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ frameTitle: "Nouvel agent",
+ shellTitle: "Créer un agent",
+ steps: ["Choisir le runtime", "Configurer", "Terminé"],
+ runtimeTitle: "Où cet agent doit-il s'exécuter ?",
+ machinesGroup: "Machines",
+ thisMachine: "Cette machine",
+ harnessCount: "2 harness",
+ harnesses: [
+ { id: "claude", label: "Claude", version: "v2.1" },
+ { id: "codex", label: "Codex", version: "v0.46" },
+ ] as Harness[],
+ selected: "Sélection :",
+ selectedSummary: "Claude · Cette machine",
+ cancel: "Annuler",
+ next: "Suivant",
+ configureTitle: "Configurer l'agent",
+ askAi: "Laisser l'IA rédiger",
+ identity: "Identité",
+ nameLabel: "Nom",
+ name: "Assistant ops",
+ descriptionLabel: "Description",
+ description: "Rapports hebdomadaires, préparation d'événements et tâches ops du quotidien",
+ behavior: "Comportement et capacités",
+ instructionsLabel: "Instructions",
+ instructions: [
+ "Tu gères les opérations courantes de l'équipe : rapports hebdomadaires, préparation d'événements, synthèse des retours clients.",
+ "Lis d'abord la description et les commentaires. S'il manque une information, pose la question en commentaire au lieu de deviner.",
+ "Livre le résultat dans les commentaires de la tâche, en paragraphes courts et en listes. Avant toute dépense ou publication externe, demande confirmation à la personne assignée.",
+ ],
+ skillsLabel: "Skills",
+ skillsPlaceholder: "Ajouter des skills de l'espace de travail",
+ execution: "Exécution",
+ executionHint: "Les options non spécifiées utilisent les valeurs par défaut du runtime.",
+ runtimeLabel: "Runtime",
+ runtime: "Claude (MacBook)",
+ change: "Changer",
+ modelLabel: "Modèle",
+ model: "Par défaut (fournisseur)",
+ accessLabel: "Accès",
+ access: [
+ { title: "Moi uniquement", desc: "Vous seul pouvez exécuter cet agent." },
+ { title: "Tout l'espace de travail", desc: "Tous les membres de l'espace de travail peuvent l'exécuter." },
+ { title: "Personnes précises", desc: "Seuls les membres sélectionnés peuvent l'exécuter." },
+ ] as Access[],
+ create: "Créer l'agent",
+ creating: "Création de l'agent…",
+ ready: (name: string) => `${name} est prêt`,
+ runsOn: (runtime: string) => `S'exécute sur ${runtime}`,
+ nextLabel: "Et ensuite",
+ assignTitle: "Lui confier une première tâche",
+ mentionTitle: "Le mentionner dans un ticket",
+ squadTitle: "L'ajouter à une escouade",
+ openAgent: "Ouvrir l'agent",
+ backToList: "Retour aux agents",
+ listTitle: "Agents",
+ newAgent: "Nouvel agent",
+ columns: { agent: "Agent", status: "Statut", workload: "Charge", runtime: "Runtime" },
+ online: "En ligne",
+ idle: "Au repos",
+ working: "Au travail",
+ otherAgent: "Assistant rédaction",
+ otherRuntime: "Codex (MacBook)",
+ captions: {
+ idle: "Créer un agent commence par choisir où il s'exécute.",
+ runtime: "Étape 1 : choisissez un runtime. Seuls les harness en ligne sont sélectionnables.",
+ runtimeNext: "Le bas de l'écran affiche votre choix. Cliquez sur Suivant.",
+ configure: "Étape 2 : le nom et les instructions sont remplis. Le modèle reste vide, donc le runtime applique sa valeur par défaut, et l'accès part de Moi uniquement.",
+ creating: "Création de l'agent…",
+ done: "C'est créé. D'ici, vous pouvez lui confier du travail ou revenir à la liste des agents.",
+ list: "Assistant ops apparaît dans la liste : son runtime est en ligne et rien ne tourne encore, il est donc au repos. Cliquez sur Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+type Phase = "runtime" | "runtimeNext" | "configure" | "creating" | "done" | "list";
+
+const STEP_INDEX: Record<Phase, number> = {
+ runtime: 0,
+ runtimeNext: 0,
+ configure: 1,
+ creating: 1,
+ done: 2,
+ list: 2,
+};
+
+// Follows the product's three-step route: choose a runtime, configure the
+// draft, land on the done page. Form fields are fixed text, so the only
+// enabled control on each screen is the one that moves the flow forward.
+export function CreateAgentDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("runtime");
+
+ const create = () => {
+ setPhase("creating");
+ after(900, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("runtime");
+ };
+
+ const caption = visible ? t.captions[phase] : t.captions.idle;
+ const step = STEP_INDEX[phase];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.frameTitle} caption={caption} onReplay={replay}>
+ {phase === "list" ? (
+ <AgentList t={t} />
+ ) : (
+ <div className="flex min-h-80 flex-col">
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2">
+ <div className="min-w-0 flex-1">
+ <div className="truncate text-label font-semibold">{t.shellTitle}</div>
+ <div className="truncate text-caption text-muted-foreground">{t.steps[step]}</div>
+ </div>
+ <ol className="flex items-center gap-1.5">
+ {t.steps.map((label, i) => (
+ <li key={label} className="flex items-center gap-1.5 text-caption">
+ <span
+ className={cn(
+ "flex size-4 items-center justify-center rounded-full text-micro font-medium",
+ i < step && "bg-success/15 text-success",
+ i === step && "bg-foreground text-background",
+ i > step && "bg-muted text-muted-foreground",
+ )}
+ >
+ {i < step ? <Check aria-hidden className="size-2.5" /> : i + 1}
+ </span>
+ <span className={cn("max-sm:hidden", i === step ? "text-foreground" : "text-muted-foreground")}>
+ {label}
+ </span>
+ </li>
+ ))}
+ </ol>
+ </div>
+
+ {(phase === "runtime" || phase === "runtimeNext") && (
+ <RuntimeStep t={t} visible={visible} phase={phase} onPick={() => setPhase("runtimeNext")} onNext={() => setPhase("configure")} />
+ )}
+ {(phase === "configure" || phase === "creating") && (
+ <ConfigureStep t={t} creating={phase === "creating"} onCreate={create} />
+ )}
+ {phase === "done" && <DoneStep t={t} onBack={() => setPhase("list")} />}
+ </div>
+ )}
+ </DemoFrame>
+ );
+}
+
+type Copy = (typeof copy)["en"];
+
+function RuntimeStep({
+ t,
+ visible,
+ phase,
+ onPick,
+ onNext,
+}: {
+ t: Copy;
+ visible: boolean;
+ phase: Phase;
+ onPick: () => void;
+ onNext: () => void;
+}) {
+ const picked = phase === "runtimeNext";
+ return (
+ <>
+ <div className="flex-1 px-4 py-4">
+ <div className="text-title-sm font-semibold">{t.runtimeTitle}</div>
+ <div className="mt-3 text-micro text-muted-foreground">{t.machinesGroup}</div>
+ <div className="mt-1 rounded-lg border bg-background">
+ <div className="flex items-center gap-2 border-b px-3 py-2">
+ <Monitor aria-hidden className="size-4 text-muted-foreground" />
+ <span className="text-label font-medium">{t.thisMachine}</span>
+ <span className="text-caption text-muted-foreground">· {t.harnessCount}</span>
+ </div>
+ <div className="grid gap-1.5 p-2 sm:grid-cols-2">
+ {t.harnesses.map((harness, i) => {
+ const selected = picked && i === 0;
+ const enabled = visible && phase === "runtime" && i === 0;
+ return (
+ <CoachMark
+ key={harness.id}
+ active={enabled}
+ side="bottom"
+ align="start"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ aria-pressed={selected}
+ disabled={!enabled}
+ onClick={onPick}
+ className={cn(
+ "flex w-full items-center gap-2 rounded-md border px-2.5 py-2 text-left transition-colors",
+ selected ? "border-brand bg-brand/7 dark:bg-brand/12" : "hover:bg-muted/60 disabled:hover:bg-transparent",
+ )}
+ >
+ <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-success" />
+ <span className="min-w-0 flex-1 truncate text-body font-medium">{harness.label}</span>
+ <span className="text-caption text-muted-foreground">{harness.version}</span>
+ {selected && <Check aria-hidden className="size-3.5 text-brand" />}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ </div>
+ </div>
+ <div className="mt-4 flex items-center gap-2 border-t px-4 py-2.5">
+ <p className="min-w-0 flex-1 truncate text-label text-muted-foreground">
+ {picked && (
+ <>
+ {t.selected} <span className="font-medium text-foreground">{t.selectedSummary}</span>
+ </>
+ )}
+ </p>
+ <Button type="button" variant="ghost" size="sm" disabled>
+ {t.cancel}
+ </Button>
+ <CoachMark active={picked} side="top" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={!picked} onClick={onNext}>
+ {t.next}
+ <ArrowRight aria-hidden className="size-3.5" />
+ </Button>
+ </CoachMark>
+ </div>
+ </>
+ );
+}
+
+function Field({ label, children }: { label: string; children: ReactNode }) {
+ return (
+ <div className="grid gap-1 px-3 py-2 sm:grid-cols-[6rem_minmax(0,1fr)] sm:gap-3">
+ <div className="pt-1 text-label font-medium">{label}</div>
+ <div className="min-w-0">{children}</div>
+ </div>
+ );
+}
+
+function Section({ title, hint, children }: { title: string; hint?: string; children: ReactNode }) {
+ return (
+ <section>
+ <div className="mb-1 flex flex-wrap items-baseline gap-x-2">
+ <span className="text-label font-semibold">{title}</span>
+ {hint && <span className="text-caption text-muted-foreground">{hint}</span>}
+ </div>
+ <div className="divide-y rounded-lg border bg-background">{children}</div>
+ </section>
+ );
+}
+
+const valueBox = "rounded-md border bg-card px-2 py-1 text-body";
+
+function ConfigureStep({ t, creating, onCreate }: { t: Copy; creating: boolean; onCreate: () => void }) {
+ return (
+ <>
+ <div className="flex flex-1 flex-col gap-4 px-4 py-4 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex flex-wrap items-center justify-between gap-2">
+ <div className="text-title-sm font-semibold">{t.configureTitle}</div>
+ <Button type="button" variant="outline" size="sm" disabled>
+ <Sparkles aria-hidden className="size-3.5" />
+ {t.askAi}
+ </Button>
+ </div>
+
+ <Section title={t.identity}>
+ <Field label={t.nameLabel}>
+ <div className={valueBox}>{t.name}</div>
+ </Field>
+ <Field label={t.descriptionLabel}>
+ <div className={valueBox}>{t.description}</div>
+ </Field>
+ </Section>
+
+ <Section title={t.behavior}>
+ <Field label={t.instructionsLabel}>
+ <div className={cn(valueBox, "flex flex-col gap-1 font-mono text-caption leading-5")}>
+ {t.instructions.map((line) => (
+ <span key={line}>{line}</span>
+ ))}
+ </div>
+ </Field>
+ <Field label={t.skillsLabel}>
+ <div className={cn(valueBox, "border-dashed text-muted-foreground")}>{t.skillsPlaceholder}</div>
+ </Field>
+ </Section>
+
+ <Section title={t.execution} hint={t.executionHint}>
+ <Field label={t.runtimeLabel}>
+ <div className={cn(valueBox, "flex items-center gap-2")}>
+ <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-success" />
+ <span className="min-w-0 flex-1 truncate">{t.runtime}</span>
+ <span className="text-caption text-muted-foreground">{t.change}</span>
+ </div>
+ </Field>
+ <Field label={t.modelLabel}>
+ <div className={cn(valueBox, "text-muted-foreground")}>{t.model}</div>
+ </Field>
+ </Section>
+
+ <Section title={t.accessLabel}>
+ <div className="flex flex-col gap-0.5 p-1.5">
+ {t.access.map((option, i) => (
+ <div key={option.title} className={cn("flex items-start gap-2 rounded-md px-2 py-1.5", i === 0 && "bg-muted")}>
+ <span
+ aria-hidden
+ className={cn(
+ "mt-1 flex size-3.5 shrink-0 items-center justify-center rounded-full border",
+ i === 0 ? "border-foreground" : "border-muted-foreground/50",
+ )}
+ >
+ {i === 0 && <span className="size-1.5 rounded-full bg-foreground" />}
+ </span>
+ <span className="min-w-0 text-body">
+ <span className="font-medium">{option.title}</span>
+ <span className="text-caption text-muted-foreground"> · {option.desc}</span>
+ </span>
+ </div>
+ ))}
+ </div>
+ </Section>
+ </div>
+ <div className="flex justify-end border-t px-4 py-2.5">
+ <CoachMark active={!creating} side="left" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={creating} onClick={onCreate}>
+ {creating ? t.creating : t.create}
+ </Button>
+ </CoachMark>
+ </div>
+ </>
+ );
+}
+
+function DoneStep({ t, onBack }: { t: Copy; onBack: () => void }) {
+ const actions = [
+ { icon: ListPlus, title: t.assignTitle, primary: true },
+ { icon: AtSign, title: t.mentionTitle, primary: false },
+ { icon: Users, title: t.squadTitle, primary: false },
+ ];
+ return (
+ <div className="flex flex-1 flex-col items-center px-4 py-6 motion-safe:animate-in motion-safe:fade-in">
+ <span className="relative inline-flex">
+ <span className="flex size-12 items-center justify-center rounded-full bg-brand/12 text-brand">
+ <Bot aria-hidden className="size-6" />
+ </span>
+ <CircleCheck aria-hidden className="absolute -right-1 -bottom-1 size-5 rounded-full bg-background text-success" />
+ </span>
+ <div className="mt-3 text-title-sm font-semibold">{t.ready(t.name)}</div>
+ <div className="mt-1 text-body text-muted-foreground">{t.runsOn(t.runtime)}</div>
+
+ <div className="mt-5 w-full max-w-sm">
+ <div className="text-label font-medium text-muted-foreground">{t.nextLabel}</div>
+ <div className="mt-1.5 flex flex-col gap-1.5">
+ {actions.map(({ icon: Icon, title, primary }) => (
+ <div
+ key={title}
+ className={cn(
+ "flex items-center gap-2.5 rounded-lg border bg-card px-3 py-2",
+ primary && "border-primary/30 bg-primary/[0.03]",
+ )}
+ >
+ <span
+ className={cn(
+ "flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",
+ primary && "bg-primary/10 text-primary",
+ )}
+ >
+ <Icon aria-hidden className="size-3.5" />
+ </span>
+ <span className="min-w-0 flex-1 text-body font-medium">{title}</span>
+ <ArrowRight aria-hidden className="size-3.5 text-muted-foreground" />
+ </div>
+ ))}
+ </div>
+ </div>
+
+ <div className="mt-5 flex items-center gap-3 text-label">
+ <span className="font-medium">{t.openAgent}</span>
+ <span aria-hidden className="text-muted-foreground">·</span>
+ <CoachMark active side="bottom" ringClassName="rounded-md">
+ <button type="button" onClick={onBack} className="rounded-md px-1 text-muted-foreground underline-offset-4 hover:text-foreground hover:underline">
+ {t.backToList}
+ </button>
+ </CoachMark>
+ </div>
+ <div className="h-6" />
+ </div>
+ );
+}
+
+function AgentList({ t }: { t: Copy }) {
+ const rows = [
+ { name: t.name, workload: t.idle, runtime: t.runtime, fresh: true },
+ { name: t.otherAgent, workload: t.working, runtime: t.otherRuntime, fresh: false },
+ ];
+ return (
+ <div className="flex flex-col gap-3 p-4 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex items-center justify-between gap-2">
+ <div className="text-title-sm font-semibold">{t.listTitle}</div>
+ <Button type="button" size="sm" disabled>
+ {t.newAgent}
+ </Button>
+ </div>
+ <div className="overflow-hidden rounded-lg border bg-background">
+ <div className="grid grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_minmax(0,1fr)] gap-2 border-b px-3 py-1.5 text-caption text-muted-foreground sm:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1.4fr)]">
+ <span>{t.columns.agent}</span>
+ <span>{t.columns.status}</span>
+ <span>{t.columns.workload}</span>
+ <span className="max-sm:hidden">{t.columns.runtime}</span>
+ </div>
+ {rows.map((row) => (
+ <div
+ key={row.name}
+ className={cn(
+ "grid grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_minmax(0,1fr)] items-center gap-2 px-3 py-2 text-body sm:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1.4fr)]",
+ row.fresh && "bg-brand/5 motion-safe:animate-in motion-safe:slide-in-from-top-1",
+ )}
+ >
+ <span className="flex min-w-0 items-center gap-2">
+ <span aria-hidden className="inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-brand/12 text-brand">
+ <Bot className="size-3" />
+ </span>
+ <span className="truncate font-medium">{row.name}</span>
+ </span>
+ <span className="flex items-center gap-1.5">
+ <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-success" />
+ {t.online}
+ </span>
+ <span className="text-muted-foreground">{row.workload}</span>
+ <span className="truncate text-caption text-muted-foreground max-sm:hidden">{row.runtime}</span>
+ </div>
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/deliverables-demo.tsx b/apps/docs/components/demos/deliverables-demo.tsx
new file mode 100644
index 0000000000..048801837a
--- /dev/null
+++ b/apps/docs/components/demos/deliverables-demo.tsx
@@ -0,0 +1,410 @@
+"use client";
+
+import { useState, type ReactNode } from "react";
+import { Check, ChevronDown, ChevronRight, FileText, LayoutGrid, MessageSquareText, X } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Version = 1 | 2;
+
+const copy = {
+ en: {
+ title: "OPS-52 · Compare restaurants for the team dinner",
+ agent: "Ops helper",
+ member: "Lei Li",
+ fileName: "restaurants.pdf",
+ fileType: "PDF",
+ size: { 1: "84 KB", 2: "86 KB" } as Record<Version, string>,
+ uploadedAt: { 1: "Oct 20, 2026, 2:05 PM", 2: "Oct 21, 2026, 10:40 AM" } as Record<Version, string>,
+ comments: {
+ first: "Three candidates compared in the attachment, sorted by distance from the office.",
+ feedback: "The second one has a free private room. Sort them by total price instead?",
+ second: "Re-sorted by total price.",
+ },
+ sectionTitle: "Deliverables",
+ viewAll: "View all 1 deliverable",
+ versionShort: (v: Version) => `v${v}`,
+ versionLabel: (v: Version) => `Version ${v} of 2`,
+ versionOf: (v: Version) => `v${v} of 2`,
+ locate: "Show in comments",
+ close: "Close",
+ page: {
+ heading: "Team dinner · 12 people",
+ sortedBy: { 1: "Sorted by distance", 2: "Sorted by total price" } as Record<Version, string>,
+ rows: {
+ 1: ["Riverside Grill · 5 min walk", "Lotus Garden · 8 min walk", "The Brick Room · 12 min walk"],
+ 2: ["Lotus Garden · $420, room free", "Riverside Grill · $450", "The Brick Room · $470"],
+ } as Record<Version, string[]>,
+ },
+ captions: {
+ idle: "An issue where the agent uploaded a file, got feedback, and uploaded it again.",
+ start: "Both uploads share a name and type, so Deliverables lists one file, marked v2. Open it.",
+ viewer: "The viewer opens the latest version. Click the version number to see the others.",
+ versions: "Newest first. Pick v1.",
+ v1: "This is the first version. Show in comments takes you to the comment that posted it.",
+ located: "The viewer closed and the page is on the comment that uploaded v1. Use Replay to run it again.",
+ },
+ },
+ zh: {
+ title: "OPS-52 · 比较团建餐厅候选",
+ agent: "运营助手",
+ member: "李雷",
+ fileName: "餐厅对比.pdf",
+ fileType: "PDF",
+ size: { 1: "84 KB", 2: "86 KB" } as Record<Version, string>,
+ uploadedAt: { 1: "2026年10月20日 14:05", 2: "2026年10月21日 10:40" } as Record<Version, string>,
+ comments: {
+ first: "三家候选餐厅的对比在附件里,按离公司的距离排序。",
+ feedback: "第二家包间免费,改成按总价排吧。",
+ second: "已改成按总价排序。",
+ },
+ sectionTitle: "产物",
+ viewAll: "查看全部 1 个产物",
+ versionShort: (v: Version) => `v${v}`,
+ versionLabel: (v: Version) => `第 ${v} 版,共 2 版`,
+ versionOf: (v: Version) => `v${v}(共 2 版)`,
+ locate: "定位到评论",
+ close: "关闭",
+ page: {
+ heading: "团建聚餐 · 12 人",
+ sortedBy: { 1: "按距离排序", 2: "按总价排序" } as Record<Version, string>,
+ rows: {
+ 1: ["江边小馆 · 步行 5 分钟", "荷塘人家 · 步行 8 分钟", "红砖餐厅 · 步行 12 分钟"],
+ 2: ["荷塘人家 · 1680 元,包间免费", "江边小馆 · 1800 元", "红砖餐厅 · 1860 元"],
+ } as Record<Version, string[]>,
+ },
+ captions: {
+ idle: "一条任务:智能体上传了文件,收到意见后又传了一版。",
+ start: "两次上传的文件同名、同类型,所以产物里只列一份,标着 v2。点开它。",
+ viewer: "查看器打开的是最新版。点版本号看其他版本。",
+ versions: "新版本在上面。选 v1。",
+ v1: "现在看的是第一版。点定位到评论,回到上传它的那条评论。",
+ located: "查看器关了,页面停在上传 v1 的评论上。点右上角可以再演示一遍。",
+ },
+ },
+ ja: {
+ title: "OPS-52 · チーム食事会のお店候補を比較",
+ agent: "運用アシスタント",
+ member: "李雷",
+ fileName: "店舗比較.pdf",
+ fileType: "PDF",
+ size: { 1: "84 KB", 2: "86 KB" } as Record<Version, string>,
+ uploadedAt: { 1: "2026/10/20 14:05", 2: "2026/10/21 10:40" } as Record<Version, string>,
+ comments: {
+ first: "候補 3 店の比較を添付しました。会社からの距離順です。",
+ feedback: "2 軒目は個室料が無料です。総額順に並べ替えてもらえますか?",
+ second: "総額順に並べ替えました。",
+ },
+ sectionTitle: "成果物",
+ viewAll: "成果物 1 件をすべて表示",
+ versionShort: (v: Version) => `v${v}`,
+ versionLabel: (v: Version) => `バージョン ${v}(全 2 版)`,
+ versionOf: (v: Version) => `v${v}(全 2 版)`,
+ locate: "コメントで表示",
+ close: "閉じる",
+ page: {
+ heading: "チーム食事会 · 12 人",
+ sortedBy: { 1: "距離順", 2: "総額順" } as Record<Version, string>,
+ rows: {
+ 1: ["川辺食堂 · 徒歩 5 分", "蓮の庭 · 徒歩 8 分", "レンガ亭 · 徒歩 12 分"],
+ 2: ["蓮の庭 · 54,000 円、個室無料", "川辺食堂 · 58,000 円", "レンガ亭 · 60,000 円"],
+ } as Record<Version, string[]>,
+ },
+ captions: {
+ idle: "エージェントがファイルを上げ、意見を受けてもう一度上げたタスクです。",
+ start: "2 回のアップロードは名前も種類も同じなので、成果物には 1 件だけ v2 として並びます。開いてみます。",
+ viewer: "ビューアは最新版で開きます。バージョン番号をクリックすると、ほかの版が見られます。",
+ versions: "新しい版が上です。v1 を選びます。",
+ v1: "いま見ているのは最初の版です。「コメントで表示」で、これを投稿したコメントに戻ります。",
+ located: "ビューアが閉じ、v1 をアップロードしたコメントが表示されました。「もう一度」で最初から試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-52 · 팀 회식 식당 후보 비교",
+ agent: "운영 도우미",
+ member: "리레이",
+ fileName: "식당-비교.pdf",
+ fileType: "PDF",
+ size: { 1: "84 KB", 2: "86 KB" } as Record<Version, string>,
+ uploadedAt: { 1: "2026. 10. 20. 오후 2:05", 2: "2026. 10. 21. 오전 10:40" } as Record<Version, string>,
+ comments: {
+ first: "후보 식당 세 곳 비교를 첨부했습니다. 회사에서 가까운 순입니다.",
+ feedback: "두 번째 집은 룸이 무료예요. 총액 순으로 바꿔 줄래요?",
+ second: "총액 순으로 다시 정렬했습니다.",
+ },
+ sectionTitle: "산출물",
+ viewAll: "산출물 1개 모두 보기",
+ versionShort: (v: Version) => `v${v}`,
+ versionLabel: (v: Version) => `버전 ${v} / 전체 2개`,
+ versionOf: (v: Version) => `v${v} / 전체 2개`,
+ locate: "댓글에서 보기",
+ close: "닫기",
+ page: {
+ heading: "팀 회식 · 12명",
+ sortedBy: { 1: "거리순", 2: "총액순" } as Record<Version, string>,
+ rows: {
+ 1: ["강변식당 · 도보 5분", "연못집 · 도보 8분", "벽돌집 · 도보 12분"],
+ 2: ["연못집 · 46만 원, 룸 무료", "강변식당 · 49만 원", "벽돌집 · 51만 원"],
+ } as Record<Version, string[]>,
+ },
+ captions: {
+ idle: "에이전트가 파일을 올리고, 의견을 받은 뒤 다시 올린 태스크입니다.",
+ start: "두 번 올린 파일은 이름과 형식이 같아서 산출물에는 하나만 v2로 표시됩니다. 열어 보세요.",
+ viewer: "뷰어는 최신 버전으로 열립니다. 버전 번호를 클릭하면 다른 버전을 볼 수 있습니다.",
+ versions: "새 버전이 위에 있습니다. v1을 고르세요.",
+ v1: "지금 보는 것은 첫 버전입니다. '댓글에서 보기'를 누르면 이 파일을 올린 댓글로 돌아갑니다.",
+ located: "뷰어가 닫히고 v1을 올린 댓글이 표시됐습니다. '다시 보기'로 처음부터 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-52 · Comparer les restaurants du dîner d'équipe",
+ agent: "Assistant ops",
+ member: "Lei Li",
+ fileName: "comparatif.pdf",
+ fileType: "PDF",
+ size: { 1: "84 Ko", 2: "86 Ko" } as Record<Version, string>,
+ uploadedAt: { 1: "20 oct. 2026, 14:05", 2: "21 oct. 2026, 10:40" } as Record<Version, string>,
+ comments: {
+ first: "Le comparatif des trois restaurants est en pièce jointe, trié par distance du bureau.",
+ feedback: "Le deuxième offre le salon privé. Tu peux trier par prix total ?",
+ second: "Trié par prix total.",
+ },
+ sectionTitle: "Livrables",
+ viewAll: "Voir le livrable",
+ versionShort: (v: Version) => `v${v}`,
+ versionLabel: (v: Version) => `Version ${v} sur 2`,
+ versionOf: (v: Version) => `v${v} sur 2`,
+ locate: "Afficher dans les commentaires",
+ close: "Fermer",
+ page: {
+ heading: "Dîner d'équipe · 12 personnes",
+ sortedBy: { 1: "Trié par distance", 2: "Trié par prix total" } as Record<Version, string>,
+ rows: {
+ 1: ["Le Quai · 5 min à pied", "Le Jardin du Lotus · 8 min à pied", "La Brique · 12 min à pied"],
+ 2: ["Le Jardin du Lotus · 380 €, salon offert", "Le Quai · 410 €", "La Brique · 425 €"],
+ } as Record<Version, string[]>,
+ },
+ captions: {
+ idle: "Une tâche où l'agent a envoyé un fichier, reçu un retour, puis l'a renvoyé.",
+ start: "Les deux envois ont le même nom et le même type : Livrables n'affiche qu'un fichier, marqué v2. Ouvrez-le.",
+ viewer: "La visionneuse s'ouvre sur la dernière version. Cliquez sur le numéro de version pour voir les autres.",
+ versions: "La plus récente en haut. Choisissez v1.",
+ v1: "Voici la première version. Afficher dans les commentaires ramène au commentaire qui l'a publiée.",
+ located: "La visionneuse s'est fermée sur le commentaire qui a envoyé la v1. Utilisez Rejouer pour recommencer.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "viewer" | "versions" | "v1" | "located";
+
+export function DeliverablesDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const viewerOpen = phase === "viewer" || phase === "versions" || phase === "v1";
+ const version: Version = phase === "v1" ? 1 : 2;
+ const replay = () => setPhase("start");
+
+ const attachment = (v: Version) => (
+ <span className="mt-1.5 flex w-full max-w-64 items-center gap-2 rounded-md border bg-card px-2 py-1.5 text-caption">
+ <FileText aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 truncate">{t.fileName}</span>
+ <VersionBadge label={t.versionShort(v)} />
+ <span className="ml-auto shrink-0 text-micro text-muted-foreground tabular-nums">{t.size[v]}</span>
+ </span>
+ );
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative min-h-96">
+ <div className={cn("grid gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_13rem]", viewerOpen && "invisible")}>
+ <div className="flex min-w-0 flex-col gap-2">
+ <Comment
+ author={t.agent}
+ agent
+ highlighted={phase === "located"}
+ body={t.comments.first}
+ attachment={attachment(1)}
+ />
+ <Comment author={t.member} body={t.comments.feedback} />
+ <Comment author={t.agent} agent body={t.comments.second} attachment={attachment(2)} />
+ </div>
+
+ <aside className="order-first min-w-0 sm:order-none">
+ <div className="mb-1.5 flex items-center gap-1 px-1 text-caption font-medium">
+ {t.sectionTitle}
+ <span className="rounded-xs bg-muted px-1 text-micro font-medium text-muted-foreground tabular-nums">1</span>
+ <ChevronRight aria-hidden className="size-3 rotate-90 text-muted-foreground" />
+ </div>
+ <CoachMark active={shownPhase === "start"} side="bottom" align="end" ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ aria-label={t.fileName}
+ disabled={!visible || phase !== "start"}
+ onClick={() => setPhase("viewer")}
+ className="flex w-full items-center gap-2 rounded-md px-1 py-1 text-left text-caption hover:bg-accent/50 disabled:hover:bg-transparent"
+ >
+ <FileText aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 truncate">{t.fileName}</span>
+ <VersionBadge label={t.versionShort(2)} />
+ <span className="ml-auto shrink-0 text-micro text-muted-foreground tabular-nums">{t.size[2]}</span>
+ </button>
+ </CoachMark>
+ <span className="mt-0.5 flex items-center gap-2 px-1 py-1 text-caption text-muted-foreground">
+ <LayoutGrid aria-hidden className="size-3.5 shrink-0" />
+ {t.viewAll}
+ </span>
+ </aside>
+ </div>
+
+ {viewerOpen && (
+ <div
+ role="dialog"
+ aria-label={t.fileName}
+ className="dark absolute inset-0 z-20 flex flex-col bg-black/95 text-foreground motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="flex items-center gap-2 border-b border-white/10 px-3 py-2">
+ <FileText aria-hidden className="size-4 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 truncate text-body font-medium">{t.fileName}</span>
+ <span className="relative shrink-0">
+ <CoachMark active={phase === "viewer"} side="bottom" align="start" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-label={t.versionLabel(version)}
+ aria-haspopup="menu"
+ aria-expanded={phase === "versions"}
+ disabled={phase !== "viewer" && phase !== "versions"}
+ onClick={() => setPhase(phase === "versions" ? "viewer" : "versions")}
+ className="flex items-center gap-0.5 rounded-xs bg-secondary px-1.5 py-0.5 text-micro font-medium text-muted-foreground tabular-nums hover:text-foreground"
+ >
+ {t.versionShort(version)}
+ <ChevronDown aria-hidden className="size-3" />
+ </button>
+ </CoachMark>
+ {phase === "versions" && (
+ <div
+ role="menu"
+ aria-label={t.versionLabel(version)}
+ className="absolute top-full left-0 z-10 mt-1 w-60 max-w-[calc(100vw-3rem)] rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {([2, 1] as Version[]).map((v) => {
+ const row = (
+ <button
+ type="button"
+ role="menuitem"
+ disabled={v !== 1}
+ onClick={() => setPhase("v1")}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:hover:bg-transparent"
+ >
+ <span className="w-6 font-medium tabular-nums">{t.versionShort(v)}</span>
+ <span className="min-w-0 flex-1 truncate text-caption text-muted-foreground tabular-nums">
+ {t.uploadedAt[v]} · {t.size[v]}
+ </span>
+ {v === version && <Check aria-hidden className="size-3.5 shrink-0" />}
+ </button>
+ );
+ return v === 1 ? (
+ <CoachMark key={v} active quiet ringClassName="rounded-md" className="flex w-full">
+ {row}
+ </CoachMark>
+ ) : (
+ <div key={v}>{row}</div>
+ );
+ })}
+ </div>
+ )}
+ </span>
+ <span className="ml-auto flex shrink-0 items-center gap-1">
+ <CoachMark active={phase === "v1"} side="bottom" align="end" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-label={t.locate}
+ disabled={phase !== "v1"}
+ onClick={() => setPhase("located")}
+ className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-caption text-muted-foreground hover:bg-secondary hover:text-foreground disabled:hover:bg-transparent"
+ >
+ <MessageSquareText aria-hidden className="size-3.5" />
+ <span className="max-sm:hidden">{t.locate}</span>
+ </button>
+ </CoachMark>
+ <button
+ type="button"
+ disabled
+ aria-label={t.close}
+ className="rounded-md p-1 text-muted-foreground opacity-60"
+ >
+ <X className="size-4" />
+ </button>
+ </span>
+ </div>
+
+ <div className="flex min-h-0 flex-1 flex-col items-center justify-center gap-2 p-4">
+ <div
+ key={version}
+ className="w-full max-w-72 rounded-md bg-white px-4 py-3 text-neutral-900 shadow-lg motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="text-label font-medium">{t.page.heading}</div>
+ <div className="mt-0.5 text-micro text-neutral-500">{t.page.sortedBy[version]}</div>
+ <ol className="mt-2 flex list-decimal flex-col gap-1 ps-4 text-caption">
+ {t.page.rows[version].map((row) => (
+ <li key={row} className="m-0">
+ {row}
+ </li>
+ ))}
+ </ol>
+ </div>
+ <div className="text-caption text-muted-foreground tabular-nums">
+ {t.fileType} · {t.size[version]} · {t.versionOf(version)}
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
+
+function VersionBadge({ label }: { label: string }) {
+ return (
+ <span
+ aria-hidden
+ className="shrink-0 rounded-xs bg-muted px-1 text-micro font-medium text-muted-foreground tabular-nums"
+ >
+ {label}
+ </span>
+ );
+}
+
+function Comment({
+ author,
+ agent = false,
+ highlighted = false,
+ body,
+ attachment,
+}: {
+ author: string;
+ agent?: boolean;
+ highlighted?: boolean;
+ body: string;
+ attachment?: ReactNode;
+}) {
+ return (
+ <div
+ className={cn(
+ "min-w-0 rounded-lg border bg-background px-3 py-2 transition-colors",
+ highlighted && "border-brand/50 bg-brand/5 ring-2 ring-brand/30",
+ )}
+ >
+ <div className="flex items-center gap-2">
+ <DemoAvatar name={author} agent={agent} />
+ <span className="text-label font-medium">{author}</span>
+ </div>
+ <div className="mt-1 pl-7 text-body break-words">
+ {body}
+ {attachment}
+ </div>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/demo-kit.tsx b/apps/docs/components/demos/demo-kit.tsx
new file mode 100644
index 0000000000..f6617cb225
--- /dev/null
+++ b/apps/docs/components/demos/demo-kit.tsx
@@ -0,0 +1,319 @@
+"use client";
+
+import {
+ useCallback,
+ useEffect,
+ useRef,
+ useState,
+ type ReactNode,
+ type RefObject,
+} from "react";
+import {
+ ArrowDown,
+ ArrowLeft,
+ ArrowRight,
+ ArrowUp,
+ Bot,
+ Check,
+ CornerDownRight,
+ Loader2,
+ RotateCcw,
+} from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { useDocsLocale } from "@/components/locale-link";
+import type { Lang } from "@/lib/i18n";
+import { demoChromeCopy } from "@/lib/translations";
+
+// Building blocks for the scripted product demos embedded in docs pages. The
+// demos imitate the product with docs-local markup instead of importing
+// @multica/views, which needs live stores and queries.
+
+/** Picks a demo's scenario copy for the page language, falling back to English. */
+export function useDemoCopy<T>(copy: { en: T } & Partial<Record<Lang, T>>): T {
+ const lang = useDocsLocale();
+ return copy[lang] ?? copy.en;
+}
+
+/** Timers owned by one demo run: cleared on replay and on unmount. */
+export function useDemoTimers() {
+ const ids = useRef<number[]>([]);
+ const clear = useCallback(() => {
+ for (const id of ids.current) window.clearTimeout(id);
+ ids.current = [];
+ }, []);
+ const after = useCallback((ms: number, fn: () => void) => {
+ ids.current.push(window.setTimeout(fn, ms));
+ }, []);
+ useEffect(() => clear, [clear]);
+ return { after, clear };
+}
+
+/**
+ * True once the element has been mostly on screen, so a demo starts when the
+ * reader reaches it rather than while they read the top of the page.
+ */
+export function useStartWhenVisible<T extends Element>(): [RefObject<T | null>, boolean] {
+ const ref = useRef<T>(null);
+ const [visible, setVisible] = useState(false);
+ useEffect(() => {
+ const el = ref.current;
+ if (!el || visible) return;
+ const observer = new IntersectionObserver(
+ ([entry]) => {
+ if (entry?.isIntersecting) {
+ setVisible(true);
+ observer.disconnect();
+ }
+ },
+ { threshold: 0.35 },
+ );
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, [visible]);
+ return [ref, visible];
+}
+
+export function DemoFrame({
+ title,
+ caption,
+ onReplay,
+ frameRef,
+ children,
+}: {
+ title: string;
+ /** What the reader should do or notice now; announced to screen readers. */
+ caption: ReactNode;
+ onReplay: () => void;
+ frameRef?: RefObject<HTMLElement | null>;
+ children: ReactNode;
+}) {
+ const lang = useDocsLocale();
+ const chrome = demoChromeCopy[lang];
+ // `isolate` keeps the demos' own z-indexes below the sticky page header.
+ return (
+ <figure
+ ref={frameRef}
+ className="not-prose isolate my-6 overflow-hidden rounded-xl border bg-card text-card-foreground shadow-sm"
+ >
+ <div className="flex items-center gap-2 border-b bg-muted/40 py-1.5 pr-1.5 pl-3">
+ <span className="shrink-0 rounded-sm bg-brand/10 px-1.5 py-0.5 text-micro font-medium text-brand">
+ {chrome.label}
+ </span>
+ <span className="min-w-0 flex-1 truncate text-caption text-muted-foreground">{title}</span>
+ <Button type="button" size="xs" variant="ghost" className="text-muted-foreground" onClick={onReplay}>
+ <RotateCcw />
+ {chrome.replay}
+ </Button>
+ </div>
+ <div className="relative">{children}</div>
+ <figcaption
+ role="status"
+ aria-live="polite"
+ className="border-t bg-muted/40 px-3 py-2 text-label text-muted-foreground"
+ >
+ {caption}
+ </figcaption>
+ </figure>
+ );
+}
+
+/**
+ * Draws the eye to the control the reader should use next: a pulsing ring
+ * around it and a plain "Click" with an arrow pointing at it. The control's
+ * own label says what it does, so the hint never repeats it. It is
+ * decorative; the frame caption carries the instruction for assistive
+ * technology.
+ */
+export function CoachMark({
+ active,
+ quiet = false,
+ side = "top",
+ align = "center",
+ ringClassName = "rounded-lg",
+ className,
+ children,
+}: {
+ active: boolean;
+ /** Show only the ring, e.g. where a label would cover neighbouring content. */
+ quiet?: boolean;
+ /** Where the label sits relative to the control; the arrow points back at it. */
+ side?: "top" | "bottom" | "left" | "right";
+ align?: "start" | "center" | "end";
+ ringClassName?: string;
+ className?: string;
+ children: ReactNode;
+}) {
+ const lang = useDocsLocale();
+ const Arrow = { top: ArrowDown, bottom: ArrowUp, left: ArrowRight, right: ArrowLeft }[side];
+ const vertical = side === "top" || side === "bottom";
+ return (
+ <span className={cn("relative inline-flex", className)}>
+ {children}
+ {active && (
+ <>
+ <span
+ aria-hidden
+ className={cn("demo-halo pointer-events-none absolute -inset-1 ring-2 ring-brand", ringClassName)}
+ />
+ {!quiet && (
+ <span
+ aria-hidden
+ className={cn(
+ // Phones have no room for labels beside controls; the ring and the
+ // caption remain.
+ "pointer-events-none absolute z-20 flex w-max max-w-56 gap-0.5 text-caption font-medium text-brand motion-safe:animate-in motion-safe:fade-in max-sm:hidden",
+ side === "top" && "bottom-full mb-1.5 flex-col",
+ side === "bottom" && "top-full mt-1.5 flex-col-reverse",
+ side === "left" && "top-1/2 right-full mr-2 -translate-y-1/2 items-center",
+ side === "right" && "top-1/2 left-full ml-2 -translate-y-1/2 flex-row-reverse items-center",
+ vertical && align === "start" && "left-0 items-start",
+ vertical && align === "center" && "left-1/2 -translate-x-1/2 items-center",
+ vertical && align === "end" && "right-0 items-end",
+ )}
+ >
+ {/* A halo in the card color keeps lines underneath from crossing the text. */}
+ <span className="[text-shadow:0_0_2px_var(--card),0_0_4px_var(--card),0_0_6px_var(--card)]">
+ {demoChromeCopy[lang].click}
+ </span>
+ <Arrow className={cn("size-3.5 shrink-0", `demo-nudge-${side}`)} />
+ </span>
+ )}
+ </>
+ )}
+ </span>
+ );
+}
+
+export function DemoAvatar({ name, agent = false }: { name: string; agent?: boolean }) {
+ return (
+ <span
+ aria-hidden
+ className={cn(
+ "inline-flex size-5 shrink-0 items-center justify-center rounded-full text-micro font-medium",
+ agent ? "bg-brand/12 text-brand" : "bg-muted text-foreground",
+ )}
+ >
+ {agent ? <Bot className="size-3" /> : name.slice(0, 1)}
+ </span>
+ );
+}
+
+export type StepState = "running" | "done";
+
+export function DemoStep({ state, children }: { state: StepState; children: ReactNode }) {
+ return (
+ <li className="m-0 flex min-w-0 items-start gap-2 py-0.5 ps-0 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-top-1">
+ {state === "running" ? (
+ <Loader2 aria-hidden className="mt-px size-3.5 shrink-0 text-brand motion-safe:animate-spin" />
+ ) : (
+ <Check aria-hidden className="mt-px size-3.5 shrink-0 text-success" />
+ )}
+ <span className={cn("min-w-0", state === "running" && "text-foreground")}>{children}</span>
+ </li>
+ );
+}
+
+/** The step-list marker for a message a running turn has read (mirrors the product). */
+export function DemoSteerMarker({ label, detail }: { label: string; detail: string }) {
+ return (
+ <li className="m-0 flex min-w-0 items-center gap-2 rounded-xs bg-brand/7 px-1 py-1.5 text-caption motion-safe:animate-in motion-safe:fade-in dark:bg-brand/12">
+ <CornerDownRight aria-hidden className="size-3.5 shrink-0 text-brand" />
+ <span className="min-w-0 truncate">
+ <span className="font-medium">{label}</span>
+ <span className="text-muted-foreground"> · {detail}</span>
+ </span>
+ </li>
+ );
+}
+
+/** One agent run as it appears in the issue timeline. */
+export function DemoRun({
+ agent,
+ status,
+ active,
+ children,
+}: {
+ agent: string;
+ status: string;
+ active: boolean;
+ children?: ReactNode;
+}) {
+ return (
+ <div className="min-w-0 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex min-h-7 items-center gap-2">
+ <DemoAvatar name={agent} agent />
+ <span className="truncate text-body font-medium">{agent}</span>
+ <span className="inline-flex items-center gap-1 text-caption text-muted-foreground">
+ {active ? (
+ <Loader2 aria-hidden className="size-3 text-brand motion-safe:animate-spin" />
+ ) : (
+ <Check aria-hidden className="size-3 text-success" />
+ )}
+ {status}
+ </span>
+ </div>
+ {children && <ul className="mt-1 flex flex-col gap-0.5 pl-7">{children}</ul>}
+ </div>
+ );
+}
+
+/** A posted comment in the issue timeline. */
+export function DemoComment({
+ author,
+ agent = false,
+ children,
+ footer,
+}: {
+ author: string;
+ agent?: boolean;
+ children: ReactNode;
+ footer?: ReactNode;
+}) {
+ return (
+ <div className="min-w-0 rounded-lg border bg-background px-3 py-2 motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1">
+ <div className="flex items-center gap-2">
+ <DemoAvatar name={author} agent={agent} />
+ <span className="text-label font-medium">{author}</span>
+ </div>
+ <div className="mt-1 pl-7 text-body break-words">{children}</div>
+ {footer && <div className="mt-1.5 pl-7">{footer}</div>}
+ </div>
+ );
+}
+
+export function DemoReceipt({ read, children }: { read: boolean; children: ReactNode }) {
+ return (
+ <span className="flex items-center gap-1.5 text-caption text-muted-foreground">
+ {read ? (
+ <Check aria-hidden className="size-3.5 shrink-0 text-success" />
+ ) : (
+ <Loader2 aria-hidden className="size-3.5 shrink-0 motion-safe:animate-spin" />
+ )}
+ {children}
+ </span>
+ );
+}
+
+/** The round send button of the comment composer. */
+export function DemoSendButton({
+ label,
+ disabled,
+ onClick,
+}: {
+ label: string;
+ disabled?: boolean;
+ onClick: () => void;
+}) {
+ return (
+ <button
+ type="button"
+ aria-label={label}
+ disabled={disabled}
+ onClick={onClick}
+ className="inline-flex size-7 items-center justify-center rounded-full bg-foreground text-background transition-opacity outline-none hover:opacity-85 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-40"
+ >
+ <ArrowUp className="size-4" />
+ </button>
+ );
+}
diff --git a/apps/docs/components/demos/desktop-tabs-demo.tsx b/apps/docs/components/demos/desktop-tabs-demo.tsx
new file mode 100644
index 0000000000..0307188ea0
--- /dev/null
+++ b/apps/docs/components/demos/desktop-tabs-demo.tsx
@@ -0,0 +1,444 @@
+"use client";
+
+import { useState } from "react";
+import { Check, ChevronsUpDown, Inbox, ListTodo, Pin, PinOff, UserRound, X } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Ws = "a" | "b";
+type Status = "todo" | "in_progress" | "in_review";
+type Issue = { id: string; title: string; status: Status };
+
+const copy = {
+ en: {
+ title: "Desktop · Each workspace keeps its own tabs",
+ workspaces: { a: "Ops team", b: "Marketing team" } as Record<Ws, string>,
+ workspacesLabel: "Workspaces",
+ nav: { inbox: "Inbox", myIssues: "My Issues", issues: "Issues" },
+ issues: {
+ a: [
+ { id: "OPS-31", title: "Travel expense rules", status: "in_progress" },
+ { id: "OPS-32", title: "New-hire handbook", status: "todo" },
+ { id: "OPS-33", title: "Quarterly team outing", status: "todo" },
+ ],
+ b: [
+ { id: "MKT-8", title: "Holiday campaign poster", status: "in_review" },
+ { id: "MKT-9", title: "Customer story", status: "in_progress" },
+ ],
+ } as Record<Ws, Issue[]>,
+ status: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<Status, string>,
+ pin: "Pin tab",
+ unpin: "Unpin tab",
+ close: "Close tab",
+ pinnedName: (title: string) => `${title} (pinned)`,
+ captions: {
+ idle: "The Ops team workspace already has three tabs open.",
+ pin: "First pin the Issues list: click the pin on its tab.",
+ open: "A pinned tab stays on its page. Click OPS-33, and it opens in a new tab.",
+ switch: "Move to another workspace: click the workspace name at the top left.",
+ pickB: "Choose Marketing team.",
+ inB: "These are Marketing team's own tabs; none of Ops team's tabs came along. Now switch back to Ops team.",
+ pickA: "Choose Ops team.",
+ done: "Ops team's tabs are all still here, and OPS-33 is still the active tab.",
+ },
+ },
+ zh: {
+ title: "Desktop · 每个工作区保留自己的标签页",
+ workspaces: { a: "运营团队", b: "市场团队" } as Record<Ws, string>,
+ workspacesLabel: "工作区",
+ nav: { inbox: "收件箱", myIssues: "我的任务", issues: "任务" },
+ issues: {
+ a: [
+ { id: "OPS-31", title: "差旅报销规则", status: "in_progress" },
+ { id: "OPS-32", title: "新人手册", status: "todo" },
+ { id: "OPS-33", title: "季度团建", status: "todo" },
+ ],
+ b: [
+ { id: "MKT-8", title: "节日活动海报", status: "in_review" },
+ { id: "MKT-9", title: "客户案例", status: "in_progress" },
+ ],
+ } as Record<Ws, Issue[]>,
+ status: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<Status, string>,
+ pin: "固定标签页",
+ unpin: "取消固定标签页",
+ close: "关闭标签页",
+ pinnedName: (title: string) => `${title}(已固定)`,
+ captions: {
+ idle: "运营团队工作区里已经开着三个标签页。",
+ pin: `先把"任务"列表固定住:点它标签上的图钉。`,
+ open: "固定的标签页会停在原页面。点 OPS-33,它会在新标签页里打开。",
+ switch: "切到另一个工作区:点左上角的工作区名称。",
+ pickB: `选择"市场团队"。`,
+ inB: "这里是市场团队自己的标签页,运营团队的标签一个也没带过来。再切回运营团队看看。",
+ pickA: `选择"运营团队"。`,
+ done: "运营团队的标签页都还在,OPS-33 仍是当前标签。",
+ },
+ },
+ ja: {
+ title: "Desktop · ワークスペースごとにタブを保持",
+ workspaces: { a: "運用チーム", b: "マーケティングチーム" } as Record<Ws, string>,
+ workspacesLabel: "ワークスペース",
+ nav: { inbox: "インボックス", myIssues: "マイタスク", issues: "タスク" },
+ issues: {
+ a: [
+ { id: "OPS-31", title: "出張旅費の精算ルール", status: "in_progress" },
+ { id: "OPS-32", title: "新入社員ハンドブック", status: "todo" },
+ { id: "OPS-33", title: "四半期のチームイベント", status: "todo" },
+ ],
+ b: [
+ { id: "MKT-8", title: "季節キャンペーンのポスター", status: "in_review" },
+ { id: "MKT-9", title: "導入事例", status: "in_progress" },
+ ],
+ } as Record<Ws, Issue[]>,
+ status: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<Status, string>,
+ pin: "タブをピン留め",
+ unpin: "タブのピン留めを解除",
+ close: "タブを閉じる",
+ pinnedName: (title: string) => `${title}(ピン留め)`,
+ captions: {
+ idle: "運用チームのワークスペースでは、すでに 3 つのタブが開いています。",
+ pin: "まず「タスク」一覧をピン留めします。タブのピンをクリックします。",
+ open: "ピン留めしたタブは元のページにとどまります。OPS-33 をクリックすると、新しいタブで開きます。",
+ switch: "別のワークスペースに移ります。左上のワークスペース名をクリックします。",
+ pickB: "「マーケティングチーム」を選びます。",
+ inB: "ここはマーケティングチーム自身のタブです。運用チームのタブは 1 つも入っていません。運用チームに戻ってみます。",
+ pickA: "「運用チーム」を選びます。",
+ done: "運用チームのタブはすべて残っていて、OPS-33 もアクティブなままです。",
+ },
+ },
+ ko: {
+ title: "Desktop · 워크스페이스마다 탭을 따로 보관",
+ workspaces: { a: "운영팀", b: "마케팅팀" } as Record<Ws, string>,
+ workspacesLabel: "워크스페이스",
+ nav: { inbox: "인박스", myIssues: "내 태스크", issues: "태스크" },
+ issues: {
+ a: [
+ { id: "OPS-31", title: "출장비 정산 규칙", status: "in_progress" },
+ { id: "OPS-32", title: "신입 사원 안내서", status: "todo" },
+ { id: "OPS-33", title: "분기 팀 행사", status: "todo" },
+ ],
+ b: [
+ { id: "MKT-8", title: "시즌 캠페인 포스터", status: "in_review" },
+ { id: "MKT-9", title: "고객 사례", status: "in_progress" },
+ ],
+ } as Record<Ws, Issue[]>,
+ status: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<Status, string>,
+ pin: "탭 고정",
+ unpin: "탭 고정 해제",
+ close: "탭 닫기",
+ pinnedName: (title: string) => `${title} (고정됨)`,
+ captions: {
+ idle: "운영팀 워크스페이스에는 이미 탭 세 개가 열려 있습니다.",
+ pin: "먼저 '태스크' 목록을 고정합니다. 탭의 핀을 클릭하세요.",
+ open: "고정한 탭은 원래 페이지에 머뭅니다. OPS-33을 클릭하면 새 탭에서 열립니다.",
+ switch: "다른 워크스페이스로 이동합니다. 왼쪽 위의 워크스페이스 이름을 클릭하세요.",
+ pickB: "'마케팅팀'을 선택하세요.",
+ inB: "여기는 마케팅팀의 탭입니다. 운영팀의 탭은 하나도 따라오지 않았습니다. 다시 운영팀으로 돌아가 보세요.",
+ pickA: "'운영팀'을 선택하세요.",
+ done: "운영팀의 탭이 모두 남아 있고 OPS-33도 여전히 현재 탭입니다.",
+ },
+ },
+ fr: {
+ title: "Desktop · Chaque espace de travail garde ses onglets",
+ workspaces: { a: "Équipe ops", b: "Équipe marketing" } as Record<Ws, string>,
+ workspacesLabel: "Espaces de travail",
+ nav: { inbox: "Boîte de réception", myIssues: "Mes tâches", issues: "Tâches" },
+ issues: {
+ a: [
+ { id: "OPS-31", title: "Règles des notes de frais", status: "in_progress" },
+ { id: "OPS-32", title: "Guide des nouveaux arrivants", status: "todo" },
+ { id: "OPS-33", title: "Sortie d'équipe trimestrielle", status: "todo" },
+ ],
+ b: [
+ { id: "MKT-8", title: "Affiche de la campagne saisonnière", status: "in_review" },
+ { id: "MKT-9", title: "Témoignage client", status: "in_progress" },
+ ],
+ } as Record<Ws, Issue[]>,
+ status: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<Status, string>,
+ pin: "Épingler l'onglet",
+ unpin: "Désépingler l'onglet",
+ close: "Fermer l'onglet",
+ pinnedName: (title: string) => `${title} (épinglé)`,
+ captions: {
+ idle: "L'espace de travail Équipe ops a déjà trois onglets ouverts.",
+ pin: "Épinglez d'abord la liste des tâches : cliquez sur l'épingle de son onglet.",
+ open: "Un onglet épinglé reste sur sa page. Cliquez sur OPS-33 : la tâche s'ouvre dans un nouvel onglet.",
+ switch: "Passez à un autre espace de travail : cliquez sur son nom en haut à gauche.",
+ pickB: "Choisissez Équipe marketing.",
+ inB: "Voici les onglets propres à Équipe marketing ; aucun onglet d'Équipe ops ne l'a suivie. Revenez maintenant à Équipe ops.",
+ pickA: "Choisissez Équipe ops.",
+ done: "Les onglets d'Équipe ops sont tous là, et OPS-33 est toujours l'onglet actif.",
+ },
+ },
+};
+
+type Phase = "idle" | "pin" | "open" | "switch" | "pickB" | "inB" | "pickA" | "done";
+
+// A tab is the workspace's issue list (issue === null) or one issue.
+type TabState = { key: string; issue: number | null; pinned: boolean };
+type Group = { tabs: TabState[]; active: string };
+
+const INITIAL: Record<Ws, Group> = {
+ a: {
+ tabs: [
+ { key: "list", issue: null, pinned: false },
+ { key: "0", issue: 0, pinned: false },
+ { key: "1", issue: 1, pinned: false },
+ ],
+ active: "list",
+ },
+ b: {
+ tabs: [
+ { key: "list", issue: null, pinned: false },
+ { key: "0", issue: 0, pinned: false },
+ { key: "1", issue: 1, pinned: false },
+ ],
+ active: "0",
+ },
+};
+
+const statusDot: Record<Status, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+export function DesktopTabsDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("pin");
+ const [ws, setWs] = useState<Ws>("a");
+ const [groups, setGroups] = useState(INITIAL);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const group = groups[ws];
+ const activeTab = group.tabs.find((tab) => tab.key === group.active)!;
+ const menuOpen = phase === "pickB" || phase === "pickA";
+ const issuesOf = t.issues[ws];
+
+ const tabTitle = (tab: TabState) => (tab.issue === null ? t.nav.issues : issuesOf[tab.issue]!.title);
+
+ // Pinning keeps the list where it is: it is already the first tab, which is
+ // the end of the (empty) pinned zone.
+ const pinList = () => {
+ setGroups((g) => ({
+ ...g,
+ a: { ...g.a, tabs: g.a.tabs.map((tab) => (tab.key === "list" ? { ...tab, pinned: true } : tab)) },
+ }));
+ setPhase("open");
+ };
+
+ // A push from a pinned tab opens a new, active tab right of the opener
+ // (never inside the pinned zone), so the list stays parked.
+ const openFromPinned = (issue: number) => {
+ setGroups((g) => {
+ const tabs = g.a.tabs;
+ const activeIndex = tabs.findIndex((tab) => tab.key === g.a.active);
+ const boundary = tabs.filter((tab) => tab.pinned).length;
+ const at = Math.max(activeIndex + 1, boundary);
+ const tab: TabState = { key: String(issue), issue, pinned: false };
+ return { ...g, a: { tabs: [...tabs.slice(0, at), tab, ...tabs.slice(at)], active: tab.key } };
+ });
+ setPhase("switch");
+ };
+
+ const pickWorkspace = (target: Ws) => {
+ setWs(target);
+ setPhase(target === "b" ? "inB" : "done");
+ };
+
+ const replay = () => {
+ setPhase("pin");
+ setWs("a");
+ setGroups(INITIAL);
+ };
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="grid min-h-80 grid-cols-1 grid-rows-[auto_1fr] sm:grid-cols-[10rem_minmax(0,1fr)] sm:grid-rows-1">
+ {/* Sidebar: the workspace switcher sits at its top, as in Desktop. */}
+ <div className="relative border-b bg-muted/30 p-2 sm:border-r sm:border-b-0">
+ <CoachMark
+ active={shownPhase === "switch" || shownPhase === "inB"}
+ // A label below would cover the sidebar's first entry; the caption
+ // already names the workspace switcher.
+ quiet
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ aria-haspopup="menu"
+ aria-expanded={menuOpen}
+ disabled={!visible || (phase !== "switch" && phase !== "inB")}
+ onClick={() => setPhase(phase === "switch" ? "pickB" : "pickA")}
+ className="flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-1.5 text-left text-label font-medium hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <WorkspaceAvatar name={t.workspaces[ws]} />
+ <span className="min-w-0 flex-1 truncate">{t.workspaces[ws]}</span>
+ <ChevronsUpDown aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ </button>
+ </CoachMark>
+ {menuOpen && (
+ <div
+ role="menu"
+ aria-label={t.workspacesLabel}
+ className="absolute top-11 left-2 z-30 w-52 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="px-2 pt-1 pb-0.5 text-micro text-muted-foreground">{t.workspacesLabel}</div>
+ {(["a", "b"] as Ws[]).map((option) => {
+ const target = phase === "pickB" ? "b" : "a";
+ return (
+ <CoachMark
+ key={option}
+ active={option === target}
+ quiet
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="menuitemradio"
+ aria-checked={option === ws}
+ disabled={option !== target}
+ onClick={() => pickWorkspace(option)}
+ className="flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:hover:bg-transparent"
+ >
+ <WorkspaceAvatar name={t.workspaces[option]} />
+ <span className="min-w-0 flex-1 truncate">{t.workspaces[option]}</span>
+ {option === ws && <Check aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ )}
+ <ul aria-hidden className="m-0 mt-10 hidden list-none flex-col gap-0.5 p-0 text-caption text-muted-foreground sm:flex">
+ {[
+ { Icon: Inbox, label: t.nav.inbox },
+ { Icon: UserRound, label: t.nav.myIssues },
+ { Icon: ListTodo, label: t.nav.issues },
+ ].map(({ Icon, label }) => (
+ <li key={label} className="m-0 flex items-center gap-2 rounded-md px-1.5 py-1">
+ <Icon className="size-3.5 shrink-0" />
+ <span className="truncate">{label}</span>
+ </li>
+ ))}
+ </ul>
+ </div>
+
+ <div className="flex min-w-0 flex-col">
+ <div role="tablist" aria-label={t.workspaces[ws]} className="flex min-w-0 gap-0.5 border-b bg-muted/30 px-1.5 pt-1.5">
+ {group.tabs.map((tab) => {
+ const isActive = tab.key === group.active;
+ const title = tabTitle(tab);
+ const issue = tab.issue === null ? null : issuesOf[tab.issue]!;
+ const pinTarget = ws === "a" && tab.key === "list" && shownPhase === "pin";
+ return (
+ <div
+ key={`${ws}-${tab.key}`}
+ role="tab"
+ aria-selected={isActive}
+ aria-label={tab.pinned ? t.pinnedName(title) : title}
+ className={cn(
+ "flex h-8 min-w-0 max-w-40 flex-1 items-center gap-1.5 rounded-t-md border border-b-0 px-2 text-caption motion-safe:animate-in motion-safe:fade-in",
+ tab.pinned ? "shrink-0 flex-none" : "",
+ isActive
+ ? "-mb-px min-w-24 border-border bg-card font-medium text-foreground"
+ : "border-transparent text-muted-foreground",
+ )}
+ >
+ {issue ? (
+ <span aria-hidden className={cn("size-2.5 shrink-0 rounded-full border-2", statusDot[issue.status])} />
+ ) : (
+ <ListTodo aria-hidden className="size-3.5 shrink-0" />
+ )}
+ <span className="min-w-0 flex-1 truncate">{title}</span>
+ {pinTarget ? (
+ <CoachMark active side="bottom" ringClassName="rounded-sm">
+ <button
+ type="button"
+ aria-label={t.pin}
+ onClick={pinList}
+ className="inline-flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted-foreground/20 hover:text-foreground"
+ >
+ <Pin className="size-3" />
+ </button>
+ </CoachMark>
+ ) : tab.pinned ? (
+ <PinOff aria-label={t.unpin} role="img" className="size-3 shrink-0 text-muted-foreground" />
+ ) : (
+ isActive && <X aria-label={t.close} role="img" className="size-3 shrink-0 text-muted-foreground" />
+ )}
+ </div>
+ );
+ })}
+ </div>
+
+ <div key={`${ws}-${group.active}`} className="min-w-0 flex-1 px-4 pt-3 pb-4 motion-safe:animate-in motion-safe:fade-in">
+ {activeTab.issue === null ? (
+ <>
+ <div className="flex h-8 items-center text-label font-medium">{t.nav.issues}</div>
+ <ul className="m-0 mt-1 flex list-none flex-col p-0">
+ {issuesOf.map((issue, i) => {
+ const target = ws === "a" && i === 2 && shownPhase === "open";
+ return (
+ <li key={issue.id} className="m-0 flex min-h-9 items-center gap-2 border-b last:border-b-0">
+ <span
+ aria-hidden
+ className={cn("size-3 shrink-0 rounded-full border-2", statusDot[issue.status])}
+ />
+ <span className="w-14 shrink-0 text-caption text-muted-foreground">{issue.id}</span>
+ <CoachMark active={target} side="right" ringClassName="rounded-sm" className="min-w-0">
+ <button
+ type="button"
+ disabled={!target}
+ onClick={() => openFromPinned(i)}
+ className="max-w-full truncate rounded-sm text-left text-body hover:underline disabled:hover:no-underline"
+ >
+ {issue.title}
+ </button>
+ </CoachMark>
+ </li>
+ );
+ })}
+ </ul>
+ </>
+ ) : (
+ <IssueDetail issue={issuesOf[activeTab.issue]!} statusLabel={t.status[issuesOf[activeTab.issue]!.status]} />
+ )}
+ </div>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
+
+function WorkspaceAvatar({ name }: { name: string }) {
+ return (
+ <span
+ aria-hidden
+ className="inline-flex size-5 shrink-0 items-center justify-center rounded-sm bg-brand/12 text-micro font-medium text-brand"
+ >
+ {name.slice(0, 1)}
+ </span>
+ );
+}
+
+function IssueDetail({ issue, statusLabel }: { issue: Issue; statusLabel: string }) {
+ return (
+ <div className="min-w-0">
+ <div className="flex h-8 items-center text-caption text-muted-foreground">{issue.id}</div>
+ <div className="text-title-sm font-medium">{issue.title}</div>
+ <div className="mt-2 flex items-center gap-1.5 text-caption text-muted-foreground">
+ <span aria-hidden className={cn("size-3 rounded-full border-2", statusDot[issue.status])} />
+ {statusLabel}
+ </div>
+ <div aria-hidden className="mt-4 flex flex-col gap-2">
+ <span className="h-2 w-11/12 rounded-full bg-muted" />
+ <span className="h-2 w-4/5 rounded-full bg-muted" />
+ <span className="h-2 w-2/3 rounded-full bg-muted" />
+ </div>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/inbox-demo.tsx b/apps/docs/components/demos/inbox-demo.tsx
new file mode 100644
index 0000000000..7c01921b9a
--- /dev/null
+++ b/apps/docs/components/demos/inbox-demo.tsx
@@ -0,0 +1,487 @@
+"use client";
+
+import { useState } from "react";
+import { Archive, ArchiveRestore, ChevronLeft, ChevronRight, CircleCheck, X } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoComment, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Notice = {
+ id: string;
+ issue: string;
+ title: string;
+ actor: string;
+ agent: boolean;
+ detail: string;
+ time: string;
+ /** What the issue shows when the notification is opened. */
+ body: string;
+ /** A mention that opens the comment body. */
+ mention?: string;
+ failed?: boolean;
+};
+
+const copy = {
+ en: {
+ title: "Inbox",
+ heading: "Inbox",
+ notices: [
+ {
+ id: "mention",
+ issue: "OPS-41",
+ title: "Sort out March expense claims",
+ actor: "Lei Li",
+ agent: false,
+ detail: "Mentioned",
+ time: "5m",
+ mention: "@You",
+ body: "Two March invoices are still missing. Can you send them by Friday?",
+ },
+ {
+ id: "failed",
+ issue: "OPS-42",
+ title: "Update the customer service FAQ",
+ actor: "Ops helper",
+ agent: true,
+ detail: "Run failed",
+ time: "20m",
+ body: "Ops helper's run failed before it finished.",
+ failed: true,
+ },
+ {
+ id: "assigned",
+ issue: "OPS-43",
+ title: "Prepare the quarterly supplier review",
+ actor: "Lei Li",
+ agent: false,
+ detail: "Assigned to You",
+ time: "1h",
+ body: "",
+ },
+ {
+ id: "comment",
+ issue: "OPS-44",
+ title: "Write the November campaign post",
+ actor: "Writing helper",
+ agent: true,
+ detail: "The first draft is in the comments. Pick one of the two titles.",
+ time: "3h",
+ body: "",
+ },
+ ] as Notice[],
+ selectPrompt: "Select a notification to view details",
+ archive: "Archive",
+ unarchive: "Unarchive",
+ archivedTitle: "Archived",
+ archivedToast: "Notification archived",
+ runFailed: "Run failed",
+ captions: {
+ idle: "Updates that concern you collect in the inbox.",
+ start: "Four unread notifications. Open the one where someone mentioned you.",
+ opened:
+ "Opening it marked it read, and the detail shows its issue. When you're done with it, click Archive.",
+ archived:
+ "Archiving takes the notification out of the list and leaves the issue alone. The next one opened and was marked read. Click Archived at the bottom.",
+ archivedView:
+ "Archived notifications keep their read state and can be unarchived from here. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "收件箱",
+ heading: "收件箱",
+ notices: [
+ {
+ id: "mention",
+ issue: "OPS-41",
+ title: "整理三月报销单",
+ actor: "李雷",
+ agent: false,
+ detail: "提及了你",
+ time: "5 分钟",
+ mention: "@你",
+ body: "三月还差两张发票,周五前能补上吗?",
+ },
+ {
+ id: "failed",
+ issue: "OPS-42",
+ title: "更新客服常见问题",
+ actor: "运营助手",
+ agent: true,
+ detail: "运行失败",
+ time: "20 分钟",
+ body: "运营助手的运行没有完成。",
+ failed: true,
+ },
+ {
+ id: "assigned",
+ issue: "OPS-43",
+ title: "准备季度供应商评估",
+ actor: "李雷",
+ agent: false,
+ detail: "分配给 你",
+ time: "1 小时",
+ body: "",
+ },
+ {
+ id: "comment",
+ issue: "OPS-44",
+ title: "写 11 月活动推文",
+ actor: "文案助手",
+ agent: true,
+ detail: "初稿放在评论里了,标题有两个版本,请选一个。",
+ time: "3 小时",
+ body: "",
+ },
+ ] as Notice[],
+ selectPrompt: "选择一条通知查看详情",
+ archive: "归档",
+ unarchive: "取消归档",
+ archivedTitle: "已归档",
+ archivedToast: "已归档通知",
+ runFailed: "运行失败",
+ captions: {
+ idle: "和你有关的动态集中在收件箱。",
+ start: "四条未读通知。打开有人 @你 的那一条。",
+ opened: "打开后这条通知标为已读,详情里显示对应的任务。处理完点\"归档\"。",
+ archived: "归档只把通知移出列表,任务不受影响。下一条通知自动打开,也标为已读。点底部的\"已归档\"。",
+ archivedView: "归档的通知保留已读状态,可以在这里取消归档。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "インボックス",
+ heading: "インボックス",
+ notices: [
+ {
+ id: "mention",
+ issue: "OPS-41",
+ title: "3 月の経費精算を整理する",
+ actor: "李雷",
+ agent: false,
+ detail: "メンションされました",
+ time: "5分",
+ mention: "@あなた",
+ body: "3 月分の領収書がまだ 2 枚足りません。金曜までに出してもらえますか?",
+ },
+ {
+ id: "failed",
+ issue: "OPS-42",
+ title: "カスタマーサポートの FAQ を更新する",
+ actor: "運用アシスタント",
+ agent: true,
+ detail: "実行失敗",
+ time: "20分",
+ body: "運用アシスタントの実行は、終わる前に失敗しました。",
+ failed: true,
+ },
+ {
+ id: "assigned",
+ issue: "OPS-43",
+ title: "四半期のサプライヤー評価を準備する",
+ actor: "李雷",
+ agent: false,
+ detail: "あなた に割り当て",
+ time: "1時間",
+ body: "",
+ },
+ {
+ id: "comment",
+ issue: "OPS-44",
+ title: "11 月のキャンペーン投稿を書く",
+ actor: "ライティングアシスタント",
+ agent: true,
+ detail: "初稿をコメントに載せました。タイトル案が 2 つあるので、どちらか選んでください。",
+ time: "3時間",
+ body: "",
+ },
+ ] as Notice[],
+ selectPrompt: "詳細を表示する通知を選択してください",
+ archive: "アーカイブ",
+ unarchive: "アーカイブ解除",
+ archivedTitle: "アーカイブ済み",
+ archivedToast: "通知をアーカイブしました",
+ runFailed: "実行失敗",
+ captions: {
+ idle: "あなたに関係する更新はインボックスに集まります。",
+ start: "未読の通知が 4 件あります。あなたがメンションされた通知を開きます。",
+ opened: "開いた通知は既読になり、詳細には対象のタスクが表示されます。対応が済んだら「アーカイブ」をクリックします。",
+ archived:
+ "アーカイブしても通知がリストから外れるだけで、タスクには影響しません。次の通知が開いて既読になりました。下にある「アーカイブ済み」をクリックします。",
+ archivedView: "アーカイブした通知は既読のまま残り、ここからアーカイブを解除できます。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "인박스",
+ heading: "인박스",
+ notices: [
+ {
+ id: "mention",
+ issue: "OPS-41",
+ title: "3월 경비 청구 정리",
+ actor: "리레이",
+ agent: false,
+ detail: "멘션됨",
+ time: "5분",
+ mention: "@나",
+ body: "3월 영수증이 아직 두 장 빠져 있어요. 금요일까지 보내 주실 수 있나요?",
+ },
+ {
+ id: "failed",
+ issue: "OPS-42",
+ title: "고객 지원 FAQ 업데이트",
+ actor: "운영 도우미",
+ agent: true,
+ detail: "실행 실패함",
+ time: "20분",
+ body: "운영 도우미의 실행이 끝나기 전에 실패했습니다.",
+ failed: true,
+ },
+ {
+ id: "assigned",
+ issue: "OPS-43",
+ title: "분기별 공급업체 평가 준비",
+ actor: "리레이",
+ agent: false,
+ detail: "나에게 할당",
+ time: "1시간",
+ body: "",
+ },
+ {
+ id: "comment",
+ issue: "OPS-44",
+ title: "11월 캠페인 게시물 작성",
+ actor: "글쓰기 도우미",
+ agent: true,
+ detail: "초안을 댓글에 올렸습니다. 제목이 두 가지인데 하나를 골라 주세요.",
+ time: "3시간",
+ body: "",
+ },
+ ] as Notice[],
+ selectPrompt: "자세히 볼 알림을 선택하세요",
+ archive: "보관",
+ unarchive: "보관 해제",
+ archivedTitle: "보관됨",
+ archivedToast: "알림을 보관했습니다",
+ runFailed: "실행 실패함",
+ captions: {
+ idle: "나와 관련된 업데이트는 인박스에 모입니다.",
+ start: "읽지 않은 알림이 4개 있습니다. 누군가 나를 멘션한 알림을 여세요.",
+ opened: "연 알림은 읽음으로 표시되고, 상세에는 해당 태스크가 보입니다. 처리가 끝나면 '보관'을 클릭하세요.",
+ archived:
+ "보관하면 알림만 목록에서 빠지고 태스크는 그대로입니다. 다음 알림이 열리면서 읽음으로 표시되었습니다. 아래쪽의 '보관됨'을 클릭하세요.",
+ archivedView: "보관한 알림은 읽음 상태 그대로 남고, 여기서 보관을 해제할 수 있습니다. '다시 보기'로 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Boîte de réception",
+ heading: "Boîte de réception",
+ notices: [
+ {
+ id: "mention",
+ issue: "OPS-41",
+ title: "Régulariser les notes de frais de mars",
+ actor: "Lei Li",
+ agent: false,
+ detail: "Mentionné",
+ time: "5 min",
+ mention: "@Vous",
+ body: "Il manque encore deux factures de mars. Pouvez-vous les envoyer d'ici vendredi ?",
+ },
+ {
+ id: "failed",
+ issue: "OPS-42",
+ title: "Mettre à jour la FAQ du service client",
+ actor: "Assistant ops",
+ agent: true,
+ detail: "Exécution en échec",
+ time: "20 min",
+ body: "L'exécution d'Assistant ops a échoué avant la fin.",
+ failed: true,
+ },
+ {
+ id: "assigned",
+ issue: "OPS-43",
+ title: "Préparer la revue trimestrielle des fournisseurs",
+ actor: "Lei Li",
+ agent: false,
+ detail: "Assigné à vous",
+ time: "1 h",
+ body: "",
+ },
+ {
+ id: "comment",
+ issue: "OPS-44",
+ title: "Rédiger le post de la campagne de novembre",
+ actor: "Assistant rédaction",
+ agent: true,
+ detail: "Le premier jet est dans les commentaires. Choisissez l'un des deux titres.",
+ time: "3 h",
+ body: "",
+ },
+ ] as Notice[],
+ selectPrompt: "Sélectionnez une notification pour afficher les détails",
+ archive: "Archiver",
+ unarchive: "Désarchiver",
+ archivedTitle: "Archivées",
+ archivedToast: "Notification archivée",
+ runFailed: "Exécution en échec",
+ captions: {
+ idle: "Les mises à jour qui vous concernent arrivent dans la boîte de réception.",
+ start: "Quatre notifications non lues. Ouvrez celle où quelqu'un vous a mentionné.",
+ opened:
+ "En l'ouvrant, vous l'avez marquée comme lue, et le détail affiche sa tâche. Une fois qu'elle est traitée, cliquez sur Archiver.",
+ archived:
+ "L'archivage retire la notification de la liste sans toucher à la tâche. La suivante s'est ouverte et a été marquée comme lue. Cliquez sur Archivées en bas.",
+ archivedView:
+ "Les notifications archivées gardent leur état de lecture et peuvent être désarchivées ici. Utilisez Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "opened" | "archived" | "archivedView";
+
+export function InboxDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const [mention, failed] = t.notices;
+ const archivedIds = phase === "archived" || phase === "archivedView" ? ["mention"] : [];
+ const readIds =
+ phase === "start" ? [] : phase === "opened" ? ["mention"] : ["mention", "failed"];
+ const selectedId = phase === "opened" ? "mention" : phase === "archived" ? "failed" : phase === "archivedView" ? "mention" : null;
+ const selected = t.notices.find((n) => n.id === selectedId) ?? null;
+ const archivedView = phase === "archivedView";
+
+ const rows = archivedView ? [mention!] : t.notices.filter((n) => !archivedIds.includes(n.id));
+ const unread = t.notices.filter((n) => !readIds.includes(n.id) && !archivedIds.includes(n.id)).length;
+
+ const replay = () => setPhase("start");
+
+ const list = (
+ <div className="flex min-w-0 flex-col sm:w-[52%] sm:shrink-0 sm:border-r">
+ <div className="flex h-10 items-center gap-2 border-b px-3">
+ <span className="text-label font-medium">{t.heading}</span>
+ {unread > 0 && (
+ <span className="rounded-full bg-brand/12 px-1.5 text-micro font-medium text-brand">{unread}</span>
+ )}
+ </div>
+ {archivedView && (
+ <div className="flex items-center gap-1.5 border-b px-3 py-2 text-caption font-medium text-muted-foreground">
+ <ChevronLeft aria-hidden className="size-4 shrink-0" />
+ {t.archivedTitle}
+ </div>
+ )}
+ <div className="flex flex-1 flex-col gap-0.5 p-1.5">
+ {rows.map((notice) => {
+ const isUnread = !readIds.includes(notice.id) && !archivedView;
+ const clickable = visible && phase === "start" && notice.id === "mention";
+ return (
+ <CoachMark
+ key={notice.id}
+ active={clickable}
+ side="top"
+ align="end"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ disabled={!clickable}
+ onClick={() => setPhase("opened")}
+ className={cn(
+ "flex w-full items-center gap-2.5 rounded-md px-2 py-2 text-left motion-safe:animate-in motion-safe:fade-in",
+ notice.id === selectedId ? "bg-accent" : "enabled:hover:bg-accent/50",
+ )}
+ >
+ <span className="flex size-7 shrink-0 items-center justify-center">
+ <DemoAvatar name={notice.actor} agent={notice.agent} />
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="flex min-w-0 items-center gap-1.5">
+ {isUnread && <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-brand" />}
+ <span className={cn("truncate text-body", isUnread ? "font-medium" : "text-muted-foreground")}>
+ {notice.title}
+ </span>
+ </span>
+ <span className="mt-0.5 flex min-w-0 items-center justify-between gap-2 text-caption text-muted-foreground">
+ <span className="truncate">{notice.detail}</span>
+ <span className="shrink-0">{notice.time}</span>
+ </span>
+ </span>
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ {!archivedView && (
+ <div className="border-t p-1.5">
+ <CoachMark quiet active={phase === "archived"} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ disabled={phase !== "archived"}
+ onClick={() => setPhase("archivedView")}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-caption text-muted-foreground enabled:hover:bg-accent/50"
+ >
+ <Archive aria-hidden className="size-4" />
+ <span className="flex-1">{t.archivedTitle}</span>
+ <ChevronRight aria-hidden className="size-3.5" />
+ </button>
+ </CoachMark>
+ </div>
+ )}
+ </div>
+ );
+
+ const detail = selected ? (
+ <div key={selected.id + phase} className="flex min-w-0 flex-1 flex-col motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex h-10 items-center gap-2 border-b px-3">
+ <span className="shrink-0 text-caption text-muted-foreground">{selected.issue}</span>
+ <span className="min-w-0 flex-1 truncate text-label font-medium">{selected.title}</span>
+ <CoachMark active={phase === "opened"} side="bottom" align="end" ringClassName="rounded-md">
+ <Button type="button" variant="outline" size="xs" disabled={phase !== "opened"} onClick={() => setPhase("archived")}>
+ {archivedView ? <ArchiveRestore /> : <Archive />}
+ {archivedView ? t.unarchive : t.archive}
+ </Button>
+ </CoachMark>
+ </div>
+ <div className="flex flex-col gap-2 p-3">
+ {selected.failed ? (
+ <div className="flex items-center gap-2 text-body">
+ <DemoAvatar name={selected.actor} agent />
+ <span className="font-medium">{selected.actor}</span>
+ <span className="inline-flex items-center gap-1 text-caption text-destructive">
+ <X aria-hidden className="size-3" />
+ {t.runFailed}
+ </span>
+ </div>
+ ) : (
+ <DemoComment author={selected.actor} agent={selected.agent}>
+ {selected.mention && <span className="font-medium text-brand">{selected.mention} </span>}
+ {selected.body}
+ </DemoComment>
+ )}
+ {selected.failed && <p className="pl-7 text-caption text-muted-foreground">{selected.body}</p>}
+ </div>
+ </div>
+ ) : (
+ <div className="flex min-h-32 flex-1 items-center justify-center p-4 text-caption text-muted-foreground">
+ {t.selectPrompt}
+ </div>
+ );
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-96 flex-col max-sm:divide-y sm:flex-row">
+ {list}
+ {detail}
+ {phase === "archived" && (
+ <div className="absolute right-3 bottom-3 z-20 flex items-center gap-2 rounded-lg border bg-popover px-3 py-2 text-caption text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2">
+ <CircleCheck aria-hidden className="size-3.5 text-success" />
+ {t.archivedToast}
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/issue-draft-demo.tsx b/apps/docs/components/demos/issue-draft-demo.tsx
new file mode 100644
index 0000000000..582e7fa257
--- /dev/null
+++ b/apps/docs/components/demos/issue-draft-demo.tsx
@@ -0,0 +1,538 @@
+"use client";
+
+import { useState } from "react";
+import {
+ ArrowLeftRight,
+ ChevronDown,
+ ChevronRight,
+ FolderKanban,
+ Maximize2,
+ MoreHorizontal,
+ Paperclip,
+ Users,
+ X,
+} from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Actor = { name: string; squad: boolean };
+
+const copy = {
+ en: {
+ title: "Create with agent · Book the team-dinner venue",
+ workspace: "Ops team",
+ breadcrumb: "Create with agent",
+ expand: "Expand",
+ close: "Close",
+ createdBy: "Created by",
+ agentsGroup: "Agents",
+ squadsGroup: "Squads",
+ actors: [
+ { name: "Ops helper", squad: false },
+ { name: "Writing helper", squad: false },
+ { name: "Admin squad", squad: true },
+ ] as Actor[],
+ prompt:
+ "Team dinner next Wednesday. Book a restaurant for 12 people, under $40 a head, close to the office, a private room if possible.",
+ project: "Team events",
+ projectLabel: "Project",
+ moreFields: "More fields",
+ attach: "Attach file",
+ switchToManual: "Switch to Manual",
+ createAnother: "Create another",
+ submit: "Create",
+ sending: "Sending…",
+ toastSent: "Sent to agent — you'll get an inbox notification when it's done",
+ inbox: "Inbox",
+ notificationType: "Created with agent",
+ issueId: "OPS-51",
+ issueTitle: "Book a restaurant for next Wednesday's team dinner (12 people)",
+ issueDescription:
+ "Team dinner next Wednesday: book a restaurant for 12 people, under $40 a head, close to the office, a private room if possible.",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ status: "Todo",
+ queued: "Queued",
+ running: "Running",
+ firstStep: "Read the issue description and discussion",
+ captions: {
+ idle: "Say what needs doing in a sentence or two, and an agent turns it into an issue.",
+ actor: "The request is written. Created by starts with the agent you picked last time; click it to choose another.",
+ picking: "Pick Ops helper. A squad works too: its leader drafts the issue.",
+ ready: "The project carries over from the page you opened the dialog on. Click Create.",
+ sending: "Sending the request to Ops helper…",
+ waiting: "Ops helper drafts it in the background, so the dialog has already closed. The inbox tells you when it's done.",
+ inbox: "The notification arrived. Open the new issue.",
+ done: "Ops helper wrote the title and description and kept itself as the assignee. The issue is in Todo, so it starts working on it next.",
+ },
+ },
+ zh: {
+ title: "通过智能体创建:团建订餐厅",
+ workspace: "运营部",
+ breadcrumb: "通过智能体创建",
+ expand: "展开",
+ close: "关闭",
+ createdBy: "创建者",
+ agentsGroup: "智能体",
+ squadsGroup: "小队",
+ actors: [
+ { name: "运营助手", squad: false },
+ { name: "文案助手", squad: false },
+ { name: "行政小队", squad: true },
+ ] as Actor[],
+ prompt: "下周三团建,帮忙订一家餐厅:12 个人,人均 150 元以内,离公司近一点,最好有包间。",
+ project: "团队活动",
+ projectLabel: "项目",
+ moreFields: "更多字段",
+ attach: "添加附件",
+ switchToManual: "切换到手动",
+ createAnother: "继续创建",
+ submit: "创建",
+ sending: "发送中...",
+ toastSent: "已交给智能体——完成后会在收件箱通知你",
+ inbox: "收件箱",
+ notificationType: "通过智能体创建",
+ issueId: "OPS-51",
+ issueTitle: "预订下周三团建餐厅(12 人)",
+ issueDescription: "下周三团建,订一家餐厅:12 人,人均 150 元以内,离公司近,最好有包间。",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ status: "待办",
+ queued: "排队中",
+ running: "运行中",
+ firstStep: "读取任务描述和讨论",
+ captions: {
+ idle: "一两句话说清要做的事,由智能体写成任务。",
+ actor: "需求已经写好。创建者默认是上次选的智能体,点它换一个。",
+ picking: "选运营助手。也可以选小队,由队长来起草。",
+ ready: "项目沿用了打开对话框时所在的项目。点击创建。",
+ sending: "正在把需求交给运营助手...",
+ waiting: "运营助手在后台起草,对话框已经关了,不用守着。写好后收件箱会通知你。",
+ inbox: "通知到了。点开这条新任务。",
+ done: "运营助手写好了标题和描述,负责人默认是它自己。任务处于待办,所以它接着就开始处理。",
+ },
+ },
+ ja: {
+ title: "エージェントで作成:チームの食事会の店を予約",
+ workspace: "運用チーム",
+ breadcrumb: "エージェントで作成",
+ expand: "展開",
+ close: "閉じる",
+ createdBy: "作成者",
+ agentsGroup: "エージェント",
+ squadsGroup: "スクワッド",
+ actors: [
+ { name: "運用アシスタント", squad: false },
+ { name: "ライティングアシスタント", squad: false },
+ { name: "総務スクワッド", squad: true },
+ ] as Actor[],
+ prompt: "来週水曜のチームの食事会、お店を予約してほしい。12 人、1 人 5,000 円以内、会社の近くで、できれば個室。",
+ project: "チームイベント",
+ projectLabel: "プロジェクト",
+ moreFields: "その他のフィールド",
+ attach: "ファイルを添付",
+ switchToManual: "手動に切り替え",
+ createAnother: "もう 1 つ作成",
+ submit: "作成",
+ sending: "送信中…",
+ toastSent: "エージェントに送信しました。完了するとインボックス通知が届きます",
+ inbox: "インボックス",
+ notificationType: "エージェントで作成",
+ issueId: "OPS-51",
+ issueTitle: "来週水曜のチーム食事会の店を予約(12 人)",
+ issueDescription: "来週水曜のチームの食事会:12 人、1 人 5,000 円以内、会社の近く、できれば個室のお店を予約する。",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ status: "未着手",
+ queued: "待機中",
+ running: "実行中",
+ firstStep: "タスクの説明とコメントを読む",
+ captions: {
+ idle: "やりたいことを一言二言で書けば、エージェントがタスクにまとめます。",
+ actor: "依頼文は書けています。作成者には前回選んだエージェントが入っています。クリックして選び直します。",
+ picking: "運用アシスタントを選びます。スクワッドを選ぶと、リーダーが下書きします。",
+ ready: "プロジェクトは、ダイアログを開いたページのものが引き継がれています。作成をクリックします。",
+ sending: "依頼を運用アシスタントに送っています…",
+ waiting: "運用アシスタントがバックグラウンドで下書きするので、ダイアログはもう閉じています。終わるとインボックスに通知が届きます。",
+ inbox: "通知が届きました。新しいタスクを開きます。",
+ done: "運用アシスタントがタイトルと説明を書き、担当者には自分を設定しました。タスクは未着手なので、続けて作業を始めます。",
+ },
+ },
+ ko: {
+ title: "에이전트로 만들기: 팀 회식 식당 예약",
+ workspace: "운영팀",
+ breadcrumb: "에이전트로 만들기",
+ expand: "펼치기",
+ close: "닫기",
+ createdBy: "생성자",
+ agentsGroup: "에이전트",
+ squadsGroup: "스쿼드",
+ actors: [
+ { name: "운영 도우미", squad: false },
+ { name: "글쓰기 도우미", squad: false },
+ { name: "총무 스쿼드", squad: true },
+ ] as Actor[],
+ prompt: "다음 주 수요일 팀 회식, 식당 하나 예약해 줘. 12명, 1인 4만 원 이내, 회사 근처, 가능하면 룸.",
+ project: "팀 행사",
+ projectLabel: "프로젝트",
+ moreFields: "추가 필드",
+ attach: "파일 첨부",
+ switchToManual: "직접 만들기로 전환",
+ createAnother: "하나 더 만들기",
+ submit: "만들기",
+ sending: "보내는 중...",
+ toastSent: "에이전트에게 보냈습니다. 완료되면 인박스 알림을 받습니다",
+ inbox: "인박스",
+ notificationType: "에이전트로 생성됨",
+ issueId: "OPS-51",
+ issueTitle: "다음 주 수요일 팀 회식 식당 예약 (12명)",
+ issueDescription: "다음 주 수요일 팀 회식: 12명, 1인 4만 원 이내, 회사 근처, 가능하면 룸이 있는 식당을 예약한다.",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ status: "할 일",
+ queued: "대기 중",
+ running: "실행 중",
+ firstStep: "태스크 설명과 댓글 읽기",
+ captions: {
+ idle: "할 일을 한두 문장으로 적으면 에이전트가 태스크로 만듭니다.",
+ actor: "요청은 이미 적혀 있습니다. 생성자에는 지난번에 고른 에이전트가 들어 있습니다. 클릭해서 바꿉니다.",
+ picking: "운영 도우미를 고르세요. 스쿼드를 고르면 리더가 초안을 씁니다.",
+ ready: "프로젝트는 대화상자를 연 페이지의 것이 그대로 들어갑니다. 만들기를 클릭하세요.",
+ sending: "요청을 운영 도우미에게 보내는 중...",
+ waiting: "운영 도우미가 백그라운드에서 초안을 쓰므로 대화상자는 이미 닫혔습니다. 끝나면 인박스로 알려 줍니다.",
+ inbox: "알림이 왔습니다. 새 태스크를 여세요.",
+ done: "운영 도우미가 제목과 설명을 쓰고 담당자는 자기 자신으로 두었습니다. 태스크가 할 일 상태라서 이어서 작업을 시작합니다.",
+ },
+ },
+ fr: {
+ title: "Créer avec un agent : réserver le restaurant du dîner d'équipe",
+ workspace: "Équipe ops",
+ breadcrumb: "Créer avec un agent",
+ expand: "Agrandir",
+ close: "Fermer",
+ createdBy: "Créé par",
+ agentsGroup: "Agents",
+ squadsGroup: "Squads",
+ actors: [
+ { name: "Assistant ops", squad: false },
+ { name: "Assistant rédaction", squad: false },
+ { name: "Squad services généraux", squad: true },
+ ] as Actor[],
+ prompt:
+ "Dîner d'équipe mercredi prochain : réserve un restaurant pour 12 personnes, moins de 35 € par tête, près du bureau, avec un salon privé si possible.",
+ project: "Événements d'équipe",
+ projectLabel: "Projet",
+ moreFields: "Plus de champs",
+ attach: "Joindre un fichier",
+ switchToManual: "Passer en mode manuel",
+ createAnother: "En créer un autre",
+ submit: "Créer",
+ sending: "Envoi…",
+ toastSent: "Envoyé à l'agent — vous recevrez une notification dans votre boîte de réception une fois terminé",
+ inbox: "Boîte de réception",
+ notificationType: "Créé avec un agent",
+ issueId: "OPS-51",
+ issueTitle: "Réserver le restaurant du dîner d'équipe de mercredi prochain (12 personnes)",
+ issueDescription:
+ "Dîner d'équipe mercredi prochain : réserver un restaurant pour 12 personnes, moins de 35 € par tête, près du bureau, avec un salon privé si possible.",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ status: "À faire",
+ queued: "En file d'attente",
+ running: "En cours",
+ firstStep: "Lire la description et la discussion de la tâche",
+ captions: {
+ idle: "Décrivez le travail en une ou deux phrases ; un agent en fait une tâche.",
+ actor: "La demande est rédigée. Créé par reprend l'agent choisi la dernière fois ; cliquez dessus pour en changer.",
+ picking: "Choisissez Assistant ops. Un squad convient aussi : son chef rédige la tâche.",
+ ready: "Le projet est repris de la page depuis laquelle vous avez ouvert la fenêtre. Cliquez sur Créer.",
+ sending: "Envoi de la demande à Assistant ops…",
+ waiting: "Assistant ops rédige en arrière-plan, la fenêtre est donc déjà fermée. La boîte de réception vous prévient quand c'est fait.",
+ inbox: "La notification est arrivée. Ouvrez la nouvelle tâche.",
+ done: "Assistant ops a écrit le titre et la description, et s'est laissé comme assigné. La tâche est À faire, il commence donc à la traiter.",
+ },
+ },
+};
+
+type Phase = "idle" | "actor" | "picking" | "ready" | "sending" | "waiting" | "inbox" | "done";
+
+export function IssueDraftDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("actor");
+ // The picker opens on the agent used last time; the scenario switches to the first one.
+ const [actorIndex, setActorIndex] = useState(1);
+ const [queued, setQueued] = useState(true);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const actor = t.actors[actorIndex]!;
+ const dialogOpen = phase === "actor" || phase === "picking" || phase === "ready" || phase === "sending";
+
+ const pick = (index: number) => {
+ setActorIndex(index);
+ setPhase("ready");
+ };
+
+ const create = () => {
+ setPhase("sending");
+ after(800, () => setPhase("waiting"));
+ after(3200, () => setPhase("inbox"));
+ };
+
+ const open = () => {
+ setPhase("done");
+ after(1100, () => setQueued(false));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("actor");
+ setActorIndex(1);
+ setQueued(true);
+ };
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-96 flex-col bg-muted/30 p-3 sm:p-4">
+ {dialogOpen && (
+ <div
+ role="dialog"
+ aria-label={t.breadcrumb}
+ className="flex flex-1 flex-col rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="flex items-center justify-between gap-2 px-4 pt-3 pb-2">
+ <div className="flex min-w-0 items-center gap-1.5 text-caption">
+ <span className="truncate text-muted-foreground">{t.workspace}</span>
+ <ChevronRight aria-hidden className="size-3 shrink-0 text-muted-foreground" />
+ <span className="truncate font-medium">{t.breadcrumb}</span>
+ </div>
+ <div className="flex shrink-0 items-center gap-1 text-muted-foreground">
+ <button type="button" disabled aria-label={t.expand} className="rounded-sm p-1 opacity-60">
+ <Maximize2 className="size-3.5" />
+ </button>
+ <button type="button" disabled aria-label={t.close} className="rounded-sm p-1 opacity-60">
+ <X className="size-3.5" />
+ </button>
+ </div>
+ </div>
+
+ <div className="relative px-4 pb-2">
+ <CoachMark active={shownPhase === "actor"} side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={phase === "picking"}
+ disabled={!visible || (phase !== "actor" && phase !== "picking")}
+ onClick={() => setPhase(phase === "picking" ? "actor" : "picking")}
+ className="-mx-1 inline-flex h-7 items-center gap-2 rounded-md px-1 text-caption text-muted-foreground hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <span>{t.createdBy}</span>
+ <span className="flex items-center gap-1.5 text-label text-foreground">
+ <ActorAvatar actor={actor} />
+ {actor.name}
+ </span>
+ {(phase === "actor" || phase === "picking") && (
+ <ChevronDown aria-hidden className="size-3.5" />
+ )}
+ </button>
+ </CoachMark>
+ {phase === "picking" && (
+ <div
+ role="listbox"
+ aria-label={t.createdBy}
+ className="absolute top-full left-3 z-10 mt-1 w-56 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {[false, true].map((squad) => (
+ <div key={String(squad)}>
+ <div className="px-2 pt-1 pb-0.5 text-micro text-muted-foreground">
+ {squad ? t.squadsGroup : t.agentsGroup}
+ </div>
+ {t.actors.map((candidate, i) =>
+ candidate.squad === squad ? (
+ <CoachMark
+ key={candidate.name}
+ active={i === 0}
+ side="right"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={i === actorIndex}
+ disabled={i !== 0}
+ onClick={() => pick(i)}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:opacity-50 disabled:hover:bg-transparent"
+ >
+ <ActorAvatar actor={candidate} />
+ <span className="min-w-0 truncate">{candidate.name}</span>
+ </button>
+ </CoachMark>
+ ) : null,
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+
+ <p className="min-h-20 flex-1 px-4 pb-3 text-body">{t.prompt}</p>
+
+ <div className="flex flex-wrap items-center gap-1.5 px-3 pb-2">
+ <span
+ aria-label={t.projectLabel}
+ className="inline-flex h-6 items-center gap-1 rounded-full border px-2 text-caption"
+ >
+ <FolderKanban aria-hidden className="size-3.5 text-muted-foreground" />
+ {t.project}
+ </span>
+ <button
+ type="button"
+ disabled
+ aria-label={t.moreFields}
+ className="inline-flex h-6 items-center rounded-full border px-1.5 text-muted-foreground opacity-60"
+ >
+ <MoreHorizontal className="size-3.5" />
+ </button>
+ </div>
+
+ <div className="flex flex-wrap items-center gap-x-2 gap-y-2 border-t px-3 py-2.5">
+ <button
+ type="button"
+ disabled
+ aria-label={t.attach}
+ className="mr-auto rounded-md p-1 text-muted-foreground opacity-60"
+ >
+ <Paperclip className="size-3.5" />
+ </button>
+ <button
+ type="button"
+ disabled
+ className="inline-flex items-center gap-1.5 rounded-sm px-2 py-1 text-caption text-muted-foreground opacity-60"
+ >
+ <ArrowLeftRight aria-hidden className="size-3.5" />
+ {t.switchToManual}
+ </button>
+ <span className="inline-flex items-center gap-1.5 text-caption text-muted-foreground opacity-60">
+ <span aria-hidden className="inline-flex h-3.5 w-6 items-center rounded-full bg-input px-0.5">
+ <span className="size-2.5 rounded-full bg-background shadow-sm" />
+ </span>
+ {t.createAnother}
+ </span>
+ <CoachMark active={shownPhase === "ready"} side="top" align="end" ringClassName="rounded-lg" className="ml-auto">
+ <Button
+ type="button"
+ size="sm"
+ className="min-w-20"
+ disabled={phase !== "ready"}
+ onClick={create}
+ >
+ {phase === "sending" ? t.sending : t.submit}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ )}
+
+ {(phase === "waiting" || phase === "inbox") && (
+ <div className="flex flex-1 flex-col rounded-xl border bg-background motion-safe:animate-in motion-safe:fade-in">
+ <div className="border-b px-3 py-2 text-label font-medium">{t.inbox}</div>
+ <div className="flex flex-col gap-1 p-2">
+ {phase === "inbox" ? (
+ <CoachMark active side="bottom" align="start" ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ onClick={open}
+ className="flex w-full items-start gap-2 rounded-md bg-brand/5 px-2 py-2 text-left hover:bg-accent motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-top-1"
+ >
+ <DemoAvatar name={t.actors[0]!.name} agent />
+ <span className="min-w-0 flex-1">
+ <span className="flex items-center gap-1.5 text-caption text-muted-foreground">
+ <span className="truncate font-medium text-foreground">{t.actors[0]!.name}</span>
+ <span className="truncate">· {t.notificationType}</span>
+ </span>
+ <span className="mt-0.5 block text-body break-words">
+ <span className="text-muted-foreground">{t.issueId}</span> {t.issueTitle}
+ </span>
+ </span>
+ <span aria-hidden className="mt-1.5 size-1.5 shrink-0 rounded-full bg-brand" />
+ </button>
+ </CoachMark>
+ ) : (
+ <div aria-hidden className="flex flex-col gap-2 px-2 py-2">
+ <span className="h-2.5 w-2/3 rounded-full bg-muted" />
+ <span className="h-2.5 w-1/2 rounded-full bg-muted" />
+ </div>
+ )}
+ </div>
+ </div>
+ )}
+
+ {phase === "done" && (
+ <div className="flex flex-1 flex-col gap-3 rounded-xl border bg-background p-4 motion-safe:animate-in motion-safe:fade-in">
+ <div>
+ <div className="text-caption text-muted-foreground">{t.issueId}</div>
+ <div className="mt-0.5 text-title-sm font-medium break-words">{t.issueTitle}</div>
+ <p className="mt-1.5 text-body text-muted-foreground">{t.issueDescription}</p>
+ </div>
+ <dl className="grid w-fit grid-cols-[auto_minmax(0,1fr)] items-center gap-x-6 gap-y-1.5 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <span aria-hidden className="size-3 rounded-full border-2 border-muted-foreground" />
+ {t.status}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="flex min-w-0 items-center gap-1.5">
+ <DemoAvatar name={t.actors[0]!.name} agent />
+ <span className="truncate">{t.actors[0]!.name}</span>
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.projectLabel}</dt>
+ <dd className="flex min-w-0 items-center gap-1.5">
+ <FolderKanban aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="truncate">{t.project}</span>
+ </dd>
+ </dl>
+ <DemoRun agent={t.actors[0]!.name} status={queued ? t.queued : t.running} active>
+ {!queued && <DemoStep state="running">{t.firstStep}</DemoStep>}
+ </DemoRun>
+ </div>
+ )}
+
+ {phase === "waiting" && (
+ <div
+ className={cn(
+ "pointer-events-none absolute inset-x-3 bottom-3 rounded-lg border bg-popover px-3 py-2 text-caption shadow-md sm:inset-x-auto sm:right-4 sm:max-w-80",
+ "motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-1",
+ )}
+ >
+ {t.toastSent}
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
+
+function ActorAvatar({ actor }: { actor: Actor }) {
+ return actor.squad ? (
+ <span
+ aria-hidden
+ className="inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-foreground"
+ >
+ <Users className="size-3" />
+ </span>
+ ) : (
+ <DemoAvatar name={actor.name} agent />
+ );
+}
diff --git a/apps/docs/components/demos/issue-status-demo.tsx b/apps/docs/components/demos/issue-status-demo.tsx
new file mode 100644
index 0000000000..4f3bd9682a
--- /dev/null
+++ b/apps/docs/components/demos/issue-status-demo.tsx
@@ -0,0 +1,546 @@
+"use client";
+
+import { useRef, useState } from "react";
+import { ChevronDown } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Status = "backlog" | "todo" | "in_progress" | "in_review" | "blocked" | "done" | "cancelled";
+type Category = "unstarted" | "started" | "done" | "closed";
+
+const CATEGORIES: { key: Category; statuses: Status[] }[] = [
+ { key: "unstarted", statuses: ["backlog", "todo"] },
+ { key: "started", statuses: ["in_progress", "in_review", "blocked"] },
+ { key: "done", statuses: ["done"] },
+ { key: "closed", statuses: ["cancelled"] },
+];
+
+const MENU_ORDER: Status[] = ["backlog", "todo", "in_progress", "in_review", "done", "blocked", "cancelled"];
+
+const categoryOf = (status: Status) => CATEGORIES.find((c) => c.statuses.includes(status))!.key;
+
+const statusDot: Record<Status, string> = {
+ backlog: "border-dashed border-muted-foreground",
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+ blocked: "border-destructive bg-destructive/30",
+ done: "border-success bg-success",
+ cancelled: "border-muted-foreground bg-muted-foreground/50",
+};
+
+const copy = {
+ en: {
+ title: "OPS-21 · Draft next quarter's team outing plan",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ agent: "Ops helper",
+ you: "You",
+ status: {
+ backlog: "Backlog",
+ todo: "Todo",
+ in_progress: "In Progress",
+ in_review: "In Review",
+ blocked: "Blocked",
+ done: "Done",
+ cancelled: "Cancelled",
+ } as Record<Status, string>,
+ category: { unstarted: "Unstarted", started: "Started", done: "Done", closed: "Closed" } as Record<Category, string>,
+ meaning: {
+ backlog: "Parked. Assigning an issue here never starts an agent run.",
+ todo: "Queued. Moving an issue here starts the assigned agent.",
+ in_progress: "Actively being worked on.",
+ in_review: "Delivered, waiting on human review.",
+ blocked: "Stalled on an external dependency.",
+ done: "Completed.",
+ cancelled: "Decided not to do.",
+ } as Record<Status, string>,
+ note: {
+ backlog: "Ops helper is already the assignee, but it waits while the issue is here.",
+ todo: "A run is created for Ops helper.",
+ in_progress: "The agent set this as it started work.",
+ in_review: "The run has finished; the issue has not. Whether the work is done is decided by the status.",
+ blocked: "",
+ done: "A terminal status: the work finished as planned.",
+ cancelled: "A terminal status, not counted as finished well. The discussion and results stay readable.",
+ } as Record<Status, string>,
+ changed: (from: string, to: string) => `changed status from ${from} to ${to}`,
+ queued: "Queued",
+ running: "Running",
+ completed: "Completed",
+ steps: [
+ "Read the issue description and discussion",
+ "Set the status to In Progress",
+ "Compare two venues on budget, distance and capacity",
+ "Draft a one-day schedule",
+ "Set the status to In Review",
+ ],
+ reply: "The outing plan is ready: two venue options with budgets and a one-day schedule. Please review.",
+ captions: {
+ idle: "An issue assigned to an agent, parked in Backlog.",
+ backlog: "Backlog parks the issue: the assignee is Ops helper, but it does not start. Click Status.",
+ pick: "Move it to Todo.",
+ running: "Leaving Backlog starts the assigned agent. It moves the issue to In Progress as it begins.",
+ review: "Delivered: the agent set In Review. Check the result, then click Status.",
+ finish: "Pick Done if the plan works. Cancelled also ends the issue, but not as finished.",
+ done: "Done is terminal. Use Replay to try Cancelled instead.",
+ cancelled: "Cancelled ends the issue without counting it as finished. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "OPS-21 · 整理下季度团建方案",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ agent: "运营助手",
+ you: "你",
+ status: {
+ backlog: "待规划",
+ todo: "待办",
+ in_progress: "进行中",
+ in_review: "审核中",
+ blocked: "已阻塞",
+ done: "已完成",
+ cancelled: "已取消",
+ } as Record<Status, string>,
+ category: { unstarted: "未开始", started: "已开始", done: "已完成", closed: "已关闭" } as Record<Category, string>,
+ meaning: {
+ backlog: "搁置。把任务移到这里不会启动智能体。",
+ todo: "排队中。把任务移到这里会启动指派的智能体。",
+ in_progress: "正在进行。",
+ in_review: "已交付,等待人工审核。",
+ blocked: "被外部依赖阻塞。",
+ done: "已完成。",
+ cancelled: "决定不做。",
+ } as Record<Status, string>,
+ note: {
+ backlog: "负责人已经是运营助手,但任务停在这里时它不会开始。",
+ todo: "为运营助手创建了一次运行。",
+ in_progress: "智能体开始工作时自己改成了进行中。",
+ in_review: "运行已经结束,任务还没有。任务是否完成,以状态为准。",
+ blocked: "",
+ done: "终态,工作顺利完成。",
+ cancelled: "终态,但不算顺利完成。讨论和结果仍可查阅。",
+ } as Record<Status, string>,
+ changed: (from: string, to: string) => `状态从 ${from} 改为 ${to}`,
+ queued: "排队中",
+ running: "运行中",
+ completed: "已完成",
+ steps: [
+ "读取任务描述和讨论",
+ "把状态改为 进行中",
+ "比较两个场地的预算、路程和容纳人数",
+ "排出一天的日程",
+ "把状态改为 审核中",
+ ],
+ reply: "团建方案已整理好:两个备选场地和各自预算,附一天的日程,请检查。",
+ captions: {
+ idle: "一条已分配给智能体、停在待规划的任务。",
+ backlog: "待规划会把任务搁置:负责人是运营助手,但它不会开始。点击状态。",
+ pick: "把任务移到待办。",
+ running: "离开待规划后,被分配的智能体开始执行,并在开始时把任务改为进行中。",
+ review: "交付完成,智能体把状态改成了审核中。检查结果后点击状态。",
+ finish: "方案可用就选已完成。已取消同样会结束任务,但不算完成。",
+ done: "已完成是终态。点右上角重新演示,可以改选已取消。",
+ cancelled: "已取消结束了任务,但不计为完成。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-21 · 来期のチームイベント案をまとめる",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ agent: "運用アシスタント",
+ you: "あなた",
+ status: {
+ backlog: "バックログ",
+ todo: "未着手",
+ in_progress: "進行中",
+ in_review: "レビュー中",
+ blocked: "ブロック中",
+ done: "完了",
+ cancelled: "キャンセル済み",
+ } as Record<Status, string>,
+ category: { unstarted: "未着手", started: "開始済み", done: "完了", closed: "終了" } as Record<Category, string>,
+ meaning: {
+ backlog: "保留。ここに移動してもエージェントは起動しません。",
+ todo: "待機中。ここに移動すると担当エージェントが起動します。",
+ in_progress: "作業中。",
+ in_review: "納品済み、レビュー待ち。",
+ blocked: "外部依存でブロック中。",
+ done: "完了。",
+ cancelled: "見送り。",
+ } as Record<Status, string>,
+ note: {
+ backlog: "担当者はすでに運用アシスタントですが、タスクがここにある間は始めません。",
+ todo: "運用アシスタントの実行が作成されました。",
+ in_progress: "エージェントが作業を始めるときに自分で進行中に変えました。",
+ in_review: "実行は終わりましたが、タスクはまだ終わっていません。完了したかどうかはステータスで決まります。",
+ blocked: "",
+ done: "終了状態。作業は予定どおり完了しました。",
+ cancelled: "終了状態ですが、完了扱いにはなりません。議論と成果はそのまま読めます。",
+ } as Record<Status, string>,
+ changed: (from: string, to: string) => `ステータスを ${from} から ${to} に変更しました`,
+ queued: "待機中",
+ running: "実行中",
+ completed: "完了",
+ steps: [
+ "タスクの説明と議論を読む",
+ "ステータスを 進行中 に変更",
+ "2 つの会場を予算、距離、収容人数で比べる",
+ "1 日のスケジュール案を作る",
+ "ステータスを レビュー中 に変更",
+ ],
+ reply: "イベント案をまとめました。会場の候補 2 つとそれぞれの予算、1 日のスケジュールです。確認をお願いします。",
+ captions: {
+ idle: "エージェントに割り当て済みで、バックログに置かれたタスク。",
+ backlog: "バックログはタスクを保留にします。担当者は運用アシスタントですが、作業は始まりません。ステータスをクリックしてください。",
+ pick: "未着手に移動してください。",
+ running: "バックログを出ると、担当エージェントが動き出し、始めるときにタスクを進行中に変えます。",
+ review: "納品されました。エージェントがレビュー中に変えています。結果を確認したら、ステータスをクリックしてください。",
+ finish: "案に問題がなければ完了を選びます。キャンセル済みでもタスクは終わりますが、完了扱いにはなりません。",
+ done: "完了は終了状態です。右上から最初に戻すと、キャンセル済みも試せます。",
+ cancelled: "キャンセル済みでタスクは終わりましたが、完了には数えません。右上から最初に戻せます。",
+ },
+ },
+ ko: {
+ title: "OPS-21 · 다음 분기 팀 워크숍 계획 정리",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ agent: "운영 도우미",
+ you: "나",
+ status: {
+ backlog: "백로그",
+ todo: "할 일",
+ in_progress: "진행 중",
+ in_review: "리뷰 중",
+ blocked: "막힘",
+ done: "완료",
+ cancelled: "취소됨",
+ } as Record<Status, string>,
+ category: { unstarted: "시작 전", started: "시작됨", done: "완료", closed: "종료" } as Record<Category, string>,
+ meaning: {
+ backlog: "보류. 여기로 옮겨도 에이전트가 시작되지 않습니다.",
+ todo: "대기 중. 여기로 옮기면 담당 에이전트가 시작됩니다.",
+ in_progress: "진행 중.",
+ in_review: "전달 완료, 리뷰 대기.",
+ blocked: "외부 의존성으로 중단됨.",
+ done: "완료됨.",
+ cancelled: "진행하지 않기로 함.",
+ } as Record<Status, string>,
+ note: {
+ backlog: "담당자는 이미 운영 도우미지만, 태스크가 여기 있는 동안에는 시작하지 않습니다.",
+ todo: "운영 도우미의 실행이 생성되었습니다.",
+ in_progress: "에이전트가 작업을 시작하면서 직접 진행 중으로 바꿨습니다.",
+ in_review: "실행은 끝났지만 태스크는 아직 끝나지 않았습니다. 완료 여부는 상태로 판단합니다.",
+ blocked: "",
+ done: "종료 상태입니다. 작업이 계획대로 끝났습니다.",
+ cancelled: "종료 상태지만 완료로 보지 않습니다. 논의와 결과는 그대로 볼 수 있습니다.",
+ } as Record<Status, string>,
+ changed: (from: string, to: string) => `상태를 ${from}에서 ${to}로 변경했습니다`,
+ queued: "대기 중",
+ running: "실행 중",
+ completed: "완료됨",
+ steps: [
+ "태스크 설명과 논의 읽기",
+ "상태를 진행 중으로 변경",
+ "장소 두 곳을 예산, 거리, 수용 인원으로 비교",
+ "하루 일정 초안 작성",
+ "상태를 리뷰 중으로 변경",
+ ],
+ reply: "워크숍 계획을 정리했습니다. 장소 후보 두 곳과 각각의 예산, 하루 일정입니다. 확인 부탁드립니다.",
+ captions: {
+ idle: "에이전트에게 할당된 채 백로그에 있는 태스크입니다.",
+ backlog: "백로그는 태스크를 보류합니다. 담당자는 운영 도우미지만 시작하지 않습니다. 상태를 클릭하세요.",
+ pick: "할 일로 옮기세요.",
+ running: "백로그에서 나오면 담당 에이전트가 시작하고, 시작하면서 태스크를 진행 중으로 바꿉니다.",
+ review: "전달이 끝나 에이전트가 리뷰 중으로 바꿨습니다. 결과를 확인한 뒤 상태를 클릭하세요.",
+ finish: "계획이 괜찮으면 완료를 선택하세요. 취소됨도 태스크를 끝내지만 완료로 보지 않습니다.",
+ done: "완료는 종료 상태입니다. 오른쪽 위에서 다시 시작하면 취소됨도 선택해 볼 수 있습니다.",
+ cancelled: "취소됨으로 태스크는 끝났지만 완료로 세지 않습니다. 오른쪽 위에서 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-21 · Préparer la sortie d'équipe du prochain trimestre",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ agent: "Assistant ops",
+ you: "Vous",
+ status: {
+ backlog: "À planifier",
+ todo: "À faire",
+ in_progress: "En cours",
+ in_review: "En relecture",
+ blocked: "Bloqué",
+ done: "Terminé",
+ cancelled: "Annulé",
+ } as Record<Status, string>,
+ category: { unstarted: "Non démarré", started: "Démarrage", done: "Terminé", closed: "Fermée" } as Record<Category, string>,
+ meaning: {
+ backlog: "En attente. Affecter une tâche ici ne démarre jamais un agent.",
+ todo: "En file. Déplacer une tâche ici démarre l'agent qui lui est affecté.",
+ in_progress: "En cours de traitement.",
+ in_review: "Livré, en attente d'une relecture humaine.",
+ blocked: "À l'arrêt, en attente d'une dépendance extérieure.",
+ done: "Terminé.",
+ cancelled: "Abandonné.",
+ } as Record<Status, string>,
+ note: {
+ backlog: "Assistant ops est déjà assigné, mais il attend tant que la tâche reste ici.",
+ todo: "Une exécution est créée pour Assistant ops.",
+ in_progress: "L'agent a choisi ce statut en commençant le travail.",
+ in_review: "L'exécution est terminée, pas la tâche. C'est le statut qui dit si le travail est fini.",
+ blocked: "",
+ done: "Statut final : le travail s'est terminé comme prévu.",
+ cancelled: "Statut final, sans compter comme terminé. La discussion et les résultats restent consultables.",
+ } as Record<Status, string>,
+ changed: (from: string, to: string) => `a changé le statut de ${from} à ${to}`,
+ queued: "En file d'attente",
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire la description et la discussion de la tâche",
+ "Passer le statut à En cours",
+ "Comparer deux lieux selon le budget, la distance et la capacité",
+ "Rédiger un programme sur une journée",
+ "Passer le statut à En relecture",
+ ],
+ reply: "Le plan de la sortie est prêt : deux lieux possibles avec leur budget et un programme sur une journée. Merci de relire.",
+ captions: {
+ idle: "Une tâche assignée à un agent, mise de côté dans À planifier.",
+ backlog: "À planifier met la tâche de côté : Assistant ops est assigné, mais ne démarre pas. Cliquez sur Statut.",
+ pick: "Passez-la à À faire.",
+ running: "En quittant À planifier, la tâche démarre l'agent assigné, qui la passe à En cours en commençant.",
+ review: "Livré : l'agent a choisi En relecture. Vérifiez le résultat, puis cliquez sur Statut.",
+ finish: "Choisissez Terminé si le plan convient. Annulé clôt aussi la tâche, mais sans la compter comme terminée.",
+ done: "Terminé est un statut final. Relancez la démo pour essayer Annulé.",
+ cancelled: "Annulé clôt la tâche sans la compter comme terminée. Relancez la démo pour la revoir.",
+ },
+ },
+};
+
+type Phase = "idle" | "backlog" | "pick" | "running" | "review" | "finish" | "done" | "cancelled";
+
+type Activity = { actor: string; agent: boolean; from: Status; to: Status };
+
+// Run step index (1-based) at which the agent updates the status.
+const STATUS_STEPS: Partial<Record<number, Status>> = { 2: "in_progress", 5: "in_review" };
+
+export function IssueStatusDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("backlog");
+ const [status, setStatus] = useState<Status>("backlog");
+ const [activity, setActivity] = useState<Activity[]>([]);
+ const [queued, setQueued] = useState(true);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const menuOpen = phase === "pick" || phase === "finish";
+ // The one status each open menu accepts; the finish menu offers two endings.
+ const choices: Status[] = phase === "pick" ? ["todo"] : phase === "finish" ? ["done", "cancelled"] : [];
+
+ const statusRef = useRef<Status>("backlog");
+ const move = (to: Status, actor: string, agent: boolean) => {
+ const from = statusRef.current;
+ statusRef.current = to;
+ setStatus(to);
+ setActivity((items) => [...items, { actor, agent, from, to }]);
+ };
+
+ const choose = (to: Status) => {
+ move(to, t.you, false);
+ if (to === "todo") {
+ setPhase("running");
+ after(900, () => setQueued(false));
+ t.steps.forEach((_, i) =>
+ after(900 + i * 1000, () => {
+ setStepsShown(i + 1);
+ const next = STATUS_STEPS[i + 1];
+ if (next) move(next, t.agent, true);
+ }),
+ );
+ after(900 + t.steps.length * 1000 + 500, () => setPhase("review"));
+ } else {
+ setPhase(to === "done" ? "done" : "cancelled");
+ }
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("backlog");
+ statusRef.current = "backlog";
+ setStatus("backlog");
+ setActivity([]);
+ setQueued(true);
+ setStepsShown(0);
+ };
+
+ const statusEnabled = visible && (phase === "backlog" || phase === "review" || menuOpen);
+ const coachOnStatus = visible && (phase === "backlog" || phase === "review");
+ const runActive = phase === "running";
+ const showRun = phase !== "backlog" && phase !== "pick";
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-96 flex-col gap-3 p-4">
+ <ol className="flex flex-wrap gap-2">
+ {CATEGORIES.map((group) => (
+ <li
+ key={group.key}
+ className={cn(
+ "m-0 max-w-full flex-none rounded-lg border px-2 py-1.5 transition-colors",
+ categoryOf(status) === group.key ? "border-brand/40 bg-brand/5" : "bg-background",
+ )}
+ >
+ <div className="flex items-baseline gap-1.5">
+ <span className="text-micro font-medium">{t.category[group.key]}</span>
+ <code className="text-micro text-muted-foreground">{group.key}</code>
+ </div>
+ <div className="mt-1 flex flex-wrap gap-1">
+ {group.statuses.map((s) => (
+ <span
+ key={s}
+ className={cn(
+ "inline-flex items-center gap-1 rounded-sm px-1 py-0.5 text-micro transition-colors",
+ s === status ? "bg-foreground text-background" : "text-muted-foreground",
+ )}
+ >
+ <span aria-hidden className={cn("size-2 rounded-full border", s === status ? "border-background" : statusDot[s])} />
+ {t.status[s]}
+ </span>
+ ))}
+ </div>
+ </li>
+ ))}
+ </ol>
+
+ <dl className="grid w-fit grid-cols-[auto_auto] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="relative">
+ <CoachMark
+ active={coachOnStatus}
+ side="right"
+ ringClassName="rounded-md"
+ >
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={menuOpen}
+ disabled={!statusEnabled}
+ onClick={() => {
+ if (phase === "backlog") setPhase("pick");
+ else if (phase === "pick") setPhase("backlog");
+ else if (phase === "review") setPhase("finish");
+ else if (phase === "finish") setPhase("review");
+ }}
+ className="-mx-1.5 inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", statusDot[status])} />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ {statusEnabled && <ChevronDown aria-hidden className="size-3.5 text-muted-foreground" />}
+ </button>
+ </CoachMark>
+ {menuOpen && (
+ <div
+ role="listbox"
+ aria-label={t.statusLabel}
+ className="absolute top-full left-0 z-10 mt-1 w-44 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {MENU_ORDER.map((s) => {
+ const enabled = choices.includes(s);
+ return (
+ <CoachMark
+ quiet
+ key={s}
+ active={s === choices[0]}
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={s === status}
+ disabled={!enabled}
+ onClick={() => choose(s)}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-body hover:bg-accent disabled:opacity-45 disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-3 shrink-0 rounded-full border-2", statusDot[s])} />
+ <span className="min-w-0 flex-1 truncate">{t.status[s]}</span>
+ {s === status && <span className="text-caption text-muted-foreground">✓</span>}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ )}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <DemoAvatar name={t.agent} agent />
+ {t.agent}
+ </dd>
+ </dl>
+
+ <div
+ key={status}
+ className="rounded-lg border bg-muted/40 px-3 py-2 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="flex flex-wrap items-baseline gap-x-2 text-label">
+ <span className="font-medium">{t.status[status]}</span>
+ <code className="text-micro text-muted-foreground">{status}</code>
+ <span className="text-caption text-muted-foreground">· {t.category[categoryOf(status)]}</span>
+ </div>
+ <p className="mt-0.5 text-caption">{t.meaning[status]}</p>
+ {t.note[status] && <p className="mt-0.5 text-caption text-muted-foreground">{t.note[status]}</p>}
+ </div>
+
+ {activity.length > 0 && (
+ <ul className="flex flex-col gap-1">
+ {activity.map((item, i) => (
+ <li
+ key={i}
+ className="m-0 flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in"
+ >
+ <DemoAvatar name={item.actor} agent={item.agent} />
+ <span className="font-medium text-foreground">{item.actor}</span>
+ <span className="min-w-0 truncate">{t.changed(t.status[item.from], t.status[item.to])}</span>
+ </li>
+ ))}
+ </ul>
+ )}
+
+ {showRun && (
+ <DemoRun
+ agent={t.agent}
+ status={runActive ? (queued ? t.queued : t.running) : t.completed}
+ active={runActive}
+ >
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && runActive ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ )}
+
+ {(phase === "review" || phase === "finish" || phase === "done" || phase === "cancelled") && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/local-dir-mode-demo.tsx b/apps/docs/components/demos/local-dir-mode-demo.tsx
new file mode 100644
index 0000000000..4c36534d8f
--- /dev/null
+++ b/apps/docs/components/demos/local-dir-mode-demo.tsx
@@ -0,0 +1,556 @@
+"use client";
+
+import { useState } from "react";
+import { Check, Clock, FileText, Folder, GitBranch, Loader2, Pencil } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoFrame,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Mode = "in_place" | "worktree";
+type RunStatus = "idle" | "waiting" | "working" | "completed";
+
+// Branch names follow server/internal/daemon/execenv/local_worktree.go:
+// agent/<sanitized agent name>/<sanitized issue identifier>. The agent segment
+// keeps only a-z and 0-9, so names without Latin letters become "agent".
+const copy = {
+ en: {
+ title: "OPS-21 and OPS-22 · Two runs on one local folder",
+ path: "~/Documents/website-copy",
+ agent: "Ops helper",
+ issues: [
+ { id: "OPS-21", title: "Update the pricing page copy", file: "pricing.md", branch: "agent/ops-helper/ops-21" },
+ { id: "OPS-22", title: "Add answers to the FAQ page", file: "faq.md", branch: "agent/ops-helper/ops-22" },
+ ],
+ dialogTitle: "How should runs use this folder?",
+ modes: {
+ in_place: {
+ title: "Edit this folder directly",
+ description:
+ "One run at a time. Changes appear in your working copy as the agent makes them, ready for you to keep working on.",
+ },
+ worktree: {
+ title: "Run in parallel, isolated",
+ description:
+ "Runs execute at the same time without touching your working copy. Each one hands back an agent/… branch in this repo for you to review and merge.",
+ },
+ } as Record<Mode, { title: string; description: string }>,
+ add: "Add folder",
+ badge: { in_place: "Direct", worktree: "Parallel" } as Record<Mode, string>,
+ startSecond: "Start the second run",
+ status: {
+ working: "Working",
+ waiting: "Waiting for local directory",
+ completed: "Completed",
+ } as Record<Exclude<RunStatus, "idle">, string>,
+ isWaiting: (name: string) => `${name} is waiting for the local directory`,
+ branch: "Branch",
+ steps: (file: string) => ["Read the issue and discussion", `Edit ${file}`, "Write up what changed"],
+ folderLabel: "Your folder",
+ noChanges: "No changes",
+ modified: "Modified",
+ captions: {
+ idle: "Two issues both need to edit the website copy in the same local folder.",
+ choose:
+ "The folder is a git repository, so Desktop preselects Parallel. To see Direct, pick it first; then click Add folder.",
+ starting: "Ops helper starts working on OPS-21.",
+ ready: "OPS-21 is still running. Click Start the second run so OPS-22 uses the same folder too.",
+ waiting: "Direct runs one at a time: OPS-22 waits for the local directory and leaves the folder alone.",
+ handoff: "OPS-21 finished and released the folder, so OPS-22 starts now.",
+ parallel: "In Parallel mode both runs go at once, each in its own worktree. Your folder stays as it was.",
+ doneInPlace: "The runs took turns, and their edits landed straight in your folder. Use Replay to try Parallel.",
+ doneWorktree:
+ "Each run handed back an agent/… branch and your folder is unchanged. Review the branches, then decide what to merge. Use Replay to try Direct.",
+ },
+ },
+ zh: {
+ title: "OPS-21 和 OPS-22 · 同一个本地文件夹上的两次运行",
+ path: "~/Documents/website-copy",
+ agent: "运营助手",
+ issues: [
+ { id: "OPS-21", title: "更新价格页文案", file: "pricing.md", branch: "agent/agent/ops-21" },
+ { id: "OPS-22", title: "补充常见问题", file: "faq.md", branch: "agent/agent/ops-22" },
+ ],
+ dialogTitle: "每次运行如何使用这个文件夹?",
+ modes: {
+ in_place: {
+ title: "直接修改这个文件夹",
+ description: "同一时间只处理一次运行。智能体的改动会直接出现在你的工作区里,你可以接着改。",
+ },
+ worktree: {
+ title: "并行隔离运行",
+ description:
+ "运行可以并行,互不干扰,也不会改动你的工作区。每次运行的结果都是这个仓库里的一个 agent/… 分支,由你 review 后合并。",
+ },
+ } as Record<Mode, { title: string; description: string }>,
+ add: "添加文件夹",
+ badge: { in_place: "原地", worktree: "并行" } as Record<Mode, string>,
+ startSecond: "开始第二次运行",
+ status: {
+ working: "正在工作",
+ waiting: "等待本地目录释放",
+ completed: "已完成",
+ } as Record<Exclude<RunStatus, "idle">, string>,
+ isWaiting: (name: string) => `${name} 正在等待本地目录`,
+ branch: "分支",
+ steps: (file: string) => ["读取任务和讨论", `修改 ${file}`, "整理改动说明"],
+ folderLabel: "你的文件夹",
+ noChanges: "没有改动",
+ modified: "已修改",
+ captions: {
+ idle: "两条任务都要修改同一个本地文件夹里的官网文案。",
+ choose: `这个文件夹是 git 仓库,Desktop 预选了"并行"。想看"原地"就先点它,再点"添加文件夹"。`,
+ starting: "运营助手开始处理 OPS-21。",
+ ready: `OPS-21 还没做完。点"开始第二次运行",让 OPS-22 也用这个文件夹。`,
+ waiting: `"原地"同一时间只进行一次运行:OPS-22 进入"等待本地目录释放",不会动文件夹。`,
+ handoff: "OPS-21 结束并释放了文件夹,OPS-22 接着开始。",
+ parallel: `"并行"模式下两次运行同时进行,各自在单独的 worktree 里工作,你的文件夹保持原样。`,
+ doneInPlace: `两次运行轮流完成,改动直接写进了你的文件夹。点右上角可以换"并行"再试。`,
+ doneWorktree: `每次运行交回一个 agent/… 分支,你的文件夹没有改动。看过分支后由你决定合并哪些。点右上角可以换"原地"再试。`,
+ },
+ },
+ ja: {
+ title: "OPS-21 と OPS-22 · 同じローカルフォルダでの 2 つの実行",
+ path: "~/Documents/website-copy",
+ agent: "運用アシスタント",
+ issues: [
+ { id: "OPS-21", title: "料金ページの文言を更新", file: "pricing.md", branch: "agent/agent/ops-21" },
+ { id: "OPS-22", title: "よくある質問を追加", file: "faq.md", branch: "agent/agent/ops-22" },
+ ],
+ dialogTitle: "実行はこのフォルダをどう使いますか?",
+ modes: {
+ in_place: {
+ title: "このフォルダを直接編集する",
+ description: "実行は一度に1つずつ。エージェントの変更はそのまま作業コピーに現れ、続けて作業できます。",
+ },
+ worktree: {
+ title: "隔離して並行実行する",
+ description:
+ "実行は、作業コピーに触れずに並行して進みます。それぞれがこのリポジトリの agent/… ブランチを返すので、レビューしてマージします。",
+ },
+ } as Record<Mode, { title: string; description: string }>,
+ add: "フォルダを追加",
+ badge: { in_place: "直接", worktree: "並行" } as Record<Mode, string>,
+ startSecond: "2 回目の実行を開始",
+ status: {
+ working: "作業中",
+ waiting: "ローカルディレクトリ待機中",
+ completed: "完了",
+ } as Record<Exclude<RunStatus, "idle">, string>,
+ isWaiting: (name: string) => `${name} がローカルディレクトリを待機中`,
+ branch: "ブランチ",
+ steps: (file: string) => ["タスクの説明とコメントを読む", `${file} を編集`, "変更内容をまとめる"],
+ folderLabel: "あなたのフォルダ",
+ noChanges: "変更なし",
+ modified: "変更あり",
+ captions: {
+ idle: "2 つのタスクが、同じローカルフォルダにある Web サイトの文言を編集します。",
+ choose:
+ "このフォルダは git リポジトリなので、Desktop は「並行」を選んだ状態で開きます。「直接」を見たい場合は先にそれを選び、「フォルダを追加」をクリックします。",
+ starting: "運用アシスタントが OPS-21 の作業を始めます。",
+ ready: "OPS-21 はまだ作業中です。「2 回目の実行を開始」をクリックして、OPS-22 にも同じフォルダを使わせます。",
+ waiting: "「直接」では実行は一度に 1 つです。OPS-22 はローカルディレクトリ待ちになり、フォルダには触れません。",
+ handoff: "OPS-21 が終わってフォルダを解放したので、OPS-22 が始まります。",
+ parallel: "「並行」では 2 つの実行が同時に進み、それぞれ専用のワークツリーで作業します。フォルダはそのままです。",
+ doneInPlace: "2 つの実行が順番に終わり、変更はフォルダに直接書き込まれました。「もう一度」で「並行」も試せます。",
+ doneWorktree:
+ "それぞれの実行が agent/… ブランチを返し、フォルダは変わっていません。ブランチを確認してから、何をマージするか決めます。「もう一度」で「直接」も試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-21과 OPS-22 · 같은 로컬 폴더에서 두 번 실행",
+ path: "~/Documents/website-copy",
+ agent: "운영 도우미",
+ issues: [
+ { id: "OPS-21", title: "요금 페이지 문구 업데이트", file: "pricing.md", branch: "agent/agent/ops-21" },
+ { id: "OPS-22", title: "자주 묻는 질문 보충", file: "faq.md", branch: "agent/agent/ops-22" },
+ ],
+ dialogTitle: "실행이 이 폴더를 어떻게 사용할까요?",
+ modes: {
+ in_place: {
+ title: "이 폴더를 직접 수정",
+ description:
+ "한 번에 하나의 실행만 진행됩니다. 에이전트의 변경 사항이 작업 사본에 바로 나타나므로 이어서 작업할 수 있습니다.",
+ },
+ worktree: {
+ title: "격리해서 병렬 실행",
+ description:
+ "실행이 작업 사본을 건드리지 않고 동시에 진행됩니다. 각 실행은 이 저장소의 agent/… 브랜치를 돌려주며, 검토 후 병합하면 됩니다.",
+ },
+ } as Record<Mode, { title: string; description: string }>,
+ add: "폴더 추가",
+ badge: { in_place: "직접", worktree: "병렬" } as Record<Mode, string>,
+ startSecond: "두 번째 실행 시작",
+ status: {
+ working: "작업 중",
+ waiting: "로컬 디렉터리 대기 중",
+ completed: "완료됨",
+ } as Record<Exclude<RunStatus, "idle">, string>,
+ isWaiting: (name: string) => `${name} 로컬 디렉터리 대기 중`,
+ branch: "브랜치",
+ steps: (file: string) => ["태스크 설명과 댓글 읽기", `${file} 수정`, "변경 내용 정리"],
+ folderLabel: "내 폴더",
+ noChanges: "변경 없음",
+ modified: "수정됨",
+ captions: {
+ idle: "두 태스크가 같은 로컬 폴더에 있는 웹사이트 문구를 수정해야 합니다.",
+ choose:
+ "이 폴더는 git 저장소라서 Desktop이 '병렬'을 미리 선택합니다. '직접'을 보려면 먼저 그것을 고른 뒤 '폴더 추가'를 클릭하세요.",
+ starting: "운영 도우미가 OPS-21 작업을 시작합니다.",
+ ready: "OPS-21이 아직 진행 중입니다. '두 번째 실행 시작'을 클릭해 OPS-22도 같은 폴더를 쓰게 하세요.",
+ waiting: "'직접' 모드에서는 한 번에 하나만 실행됩니다. OPS-22는 로컬 디렉터리를 기다리며 폴더를 건드리지 않습니다.",
+ handoff: "OPS-21이 끝나 폴더를 놓아주자 OPS-22가 시작됩니다.",
+ parallel: "'병렬' 모드에서는 두 실행이 동시에 진행되고, 각자 별도의 워크트리에서 작업합니다. 폴더는 그대로입니다.",
+ doneInPlace: "두 실행이 차례로 끝났고, 변경 사항은 폴더에 바로 기록되었습니다. '다시 보기'로 '병렬'도 해 보세요.",
+ doneWorktree:
+ "각 실행이 agent/… 브랜치를 돌려주었고 폴더는 바뀌지 않았습니다. 브랜치를 검토한 뒤 무엇을 병합할지 정하세요. '다시 보기'로 '직접'도 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-21 et OPS-22 · Deux exécutions sur un même dossier local",
+ path: "~/Documents/website-copy",
+ agent: "Assistant ops",
+ issues: [
+ { id: "OPS-21", title: "Mettre à jour la page des tarifs", file: "pricing.md", branch: "agent/assistant-ops/ops-21" },
+ { id: "OPS-22", title: "Compléter la FAQ", file: "faq.md", branch: "agent/assistant-ops/ops-22" },
+ ],
+ dialogTitle: "Comment les exécutions doivent-elles utiliser ce dossier ?",
+ modes: {
+ in_place: {
+ title: "Modifier ce dossier directement",
+ description:
+ "Une exécution à la fois. Les modifications apparaissent dans votre copie de travail au fur et à mesure, prêtes à être reprises.",
+ },
+ worktree: {
+ title: "Exécuter en parallèle, en isolation",
+ description:
+ "Les exécutions ont lieu simultanément sans toucher à votre copie de travail. Chacune restitue une branche agent/… dans ce dépôt pour relecture et fusion.",
+ },
+ } as Record<Mode, { title: string; description: string }>,
+ add: "Ajouter le dossier",
+ badge: { in_place: "Direct", worktree: "Parallèle" } as Record<Mode, string>,
+ startSecond: "Lancer la deuxième exécution",
+ status: {
+ working: "Au travail",
+ waiting: "En attente du répertoire local",
+ completed: "Terminée",
+ } as Record<Exclude<RunStatus, "idle">, string>,
+ isWaiting: (name: string) => `${name} attend le répertoire local`,
+ branch: "Branche",
+ steps: (file: string) => ["Lire la tâche et la discussion", `Modifier ${file}`, "Résumer les modifications"],
+ folderLabel: "Votre dossier",
+ noChanges: "Aucune modification",
+ modified: "Modifié",
+ captions: {
+ idle: "Deux tâches doivent modifier les textes du site, dans le même dossier local.",
+ choose:
+ "Ce dossier est un dépôt git, donc Desktop présélectionne Parallèle. Pour voir Direct, choisissez-le d'abord, puis cliquez sur Ajouter le dossier.",
+ starting: "Assistant ops commence à travailler sur OPS-21.",
+ ready:
+ "OPS-21 est toujours en cours. Cliquez sur Lancer la deuxième exécution pour qu'OPS-22 utilise aussi ce dossier.",
+ waiting:
+ "En mode Direct, une seule exécution à la fois : OPS-22 attend le répertoire local et ne touche pas au dossier.",
+ handoff: "OPS-21 est terminée et a libéré le dossier : OPS-22 démarre.",
+ parallel:
+ "En mode Parallèle, les deux exécutions avancent en même temps, chacune dans son propre worktree. Votre dossier reste tel quel.",
+ doneInPlace:
+ "Les exécutions se sont succédé et leurs modifications sont écrites directement dans votre dossier. Utilisez Rejouer pour essayer Parallèle.",
+ doneWorktree:
+ "Chaque exécution a restitué une branche agent/… et votre dossier n'a pas changé. Relisez les branches, puis décidez quoi fusionner. Utilisez Rejouer pour essayer Direct.",
+ },
+ },
+};
+
+type Phase =
+ | "idle"
+ | "choose"
+ | "starting"
+ | "ready"
+ | "waiting"
+ | "handoff"
+ | "parallel"
+ | "doneInPlace"
+ | "doneWorktree";
+
+type Run = { status: RunStatus; steps: number };
+
+const IDLE_RUN: Run = { status: "idle", steps: 0 };
+
+export function LocalDirModeDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("choose");
+ // A git folder on a runtime that can isolate runs opens on worktree.
+ const [mode, setMode] = useState<Mode>("worktree");
+ const [runs, setRuns] = useState<[Run, Run]>([IDLE_RUN, IDLE_RUN]);
+ const [touched, setTouched] = useState<[boolean, boolean]>([false, false]);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const saved = phase !== "choose";
+
+ const patchRun = (index: 0 | 1, patch: Partial<Run>) =>
+ setRuns((current) => {
+ const next: [Run, Run] = [current[0], current[1]];
+ next[index] = { ...next[index], ...patch };
+ return next;
+ });
+
+ // In place, the agent's edits show up in the folder while it works.
+ const markTouched = (index: 0 | 1) =>
+ setTouched((current) => {
+ const next: [boolean, boolean] = [current[0], current[1]];
+ next[index] = true;
+ return next;
+ });
+
+ const add = () => {
+ setPhase("starting");
+ patchRun(0, { status: "working", steps: 1 });
+ after(900, () => patchRun(0, { steps: 2 }));
+ if (mode === "in_place") after(1200, () => markTouched(0));
+ after(1600, () => setPhase("ready"));
+ };
+
+ // Runs one issue's remaining steps starting at `start` ms, then completes it.
+ const play = (index: 0 | 1, start: number, fromStep: number) => {
+ const total = t.steps("").length;
+ for (let step = fromStep; step <= total; step++) {
+ after(start + (step - fromStep) * 1000, () => {
+ patchRun(index, { status: "working", steps: step });
+ if (step === 2 && mode === "in_place") after(300, () => markTouched(index));
+ });
+ }
+ const end = start + (total - fromStep + 1) * 1000;
+ after(end, () => patchRun(index, { status: "completed" }));
+ return end;
+ };
+
+ const startSecond = () => {
+ if (mode === "in_place") {
+ setPhase("waiting");
+ patchRun(1, { status: "waiting" });
+ const firstDone = play(0, 1200, 3);
+ after(firstDone + 600, () => setPhase("handoff"));
+ const secondDone = play(1, firstDone + 600, 1);
+ after(secondDone + 400, () => setPhase("doneInPlace"));
+ } else {
+ setPhase("parallel");
+ patchRun(1, { status: "working", steps: 1 });
+ const firstDone = play(0, 1200, 3);
+ const secondDone = play(1, 1000, 2);
+ after(Math.max(firstDone, secondDone) + 400, () => setPhase("doneWorktree"));
+ }
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("choose");
+ setMode("worktree");
+ setRuns([IDLE_RUN, IDLE_RUN]);
+ setTouched([false, false]);
+ };
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-80 flex-col gap-3 p-4">
+ {!saved ? (
+ <div className="rounded-xl border bg-popover p-4 text-popover-foreground shadow-sm motion-safe:animate-in motion-safe:fade-in">
+ <div className="text-title-sm font-medium">{t.dialogTitle}</div>
+ <div className="mt-2 rounded-md bg-muted px-2.5 py-1.5 font-mono text-micro break-all text-muted-foreground">
+ {t.path}
+ </div>
+ <div role="radiogroup" aria-label={t.dialogTitle} className="mt-3 flex flex-col gap-2">
+ {(["in_place", "worktree"] as Mode[]).map((option) => {
+ const selected = mode === option;
+ const Icon = option === "in_place" ? Pencil : GitBranch;
+ return (
+ <button
+ key={option}
+ type="button"
+ role="radio"
+ aria-checked={selected}
+ disabled={!visible}
+ onClick={() => setMode(option)}
+ className={cn(
+ "flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
+ selected ? "border-primary ring-1 ring-primary" : "border-border hover:bg-muted/50",
+ )}
+ >
+ <Icon
+ aria-hidden
+ className={cn("mt-0.5 size-4 shrink-0", selected ? "text-primary" : "text-muted-foreground")}
+ />
+ <span className="min-w-0 flex-1">
+ <span className="flex flex-wrap items-center gap-x-2">
+ <span className="text-body font-medium">{t.modes[option].title}</span>
+ <span className="font-mono text-micro text-muted-foreground">{option}</span>
+ </span>
+ <span className="mt-0.5 block text-caption text-muted-foreground">
+ {t.modes[option].description}
+ </span>
+ </span>
+ </button>
+ );
+ })}
+ </div>
+ <div className="mt-3 flex justify-end">
+ <CoachMark active={shownPhase === "choose"} side="left" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={!visible} onClick={add}>
+ {t.add}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ ) : (
+ <>
+ <div className="flex min-w-0 items-center gap-2 rounded-lg border bg-background px-3 py-2 motion-safe:animate-in motion-safe:fade-in">
+ <Folder aria-hidden className="size-4 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 flex-1 truncate font-mono text-caption">{t.path}</span>
+ <span className="inline-flex shrink-0 items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 text-micro text-muted-foreground">
+ {mode === "worktree" ? (
+ <GitBranch aria-hidden className="size-3" />
+ ) : (
+ <Pencil aria-hidden className="size-3" />
+ )}
+ {t.badge[mode]}
+ </span>
+ </div>
+
+ <div className="grid gap-3 sm:grid-cols-2">
+ {t.issues.map((issue, i) => {
+ const run = runs[i]!;
+ return (
+ <div key={issue.id} className="flex min-w-0 flex-col gap-1.5 rounded-lg border bg-background p-3">
+ <div className="min-w-0 truncate text-label">
+ <span className="text-muted-foreground">{issue.id}</span> {issue.title}
+ </div>
+ {run.status === "idle" ? (
+ <div className="flex min-h-7 items-center">
+ <CoachMark active={shownPhase === "ready"} side="right" ringClassName="rounded-lg">
+ <Button
+ type="button"
+ size="sm"
+ variant="outline"
+ disabled={phase !== "ready"}
+ onClick={startSecond}
+ >
+ {t.startSecond}
+ </Button>
+ </CoachMark>
+ </div>
+ ) : (
+ <RunLane
+ agent={t.agent}
+ run={run}
+ statusLabel={t.status[run.status]}
+ waitingLine={t.isWaiting(t.agent)}
+ steps={t.steps(issue.file)}
+ branch={mode === "worktree" && run.status === "completed" ? issue.branch : null}
+ branchLabel={t.branch}
+ />
+ )}
+ </div>
+ );
+ })}
+ </div>
+
+ <div className="rounded-lg border border-dashed px-3 py-2">
+ <div className="text-micro text-muted-foreground">{t.folderLabel}</div>
+ {touched.some(Boolean) ? (
+ <ul className="m-0 mt-1 flex list-none flex-col gap-0.5 p-0">
+ {t.issues
+ .filter((_, i) => touched[i])
+ .map((issue) => (
+ <li
+ key={issue.file}
+ className="m-0 flex items-center gap-1.5 text-caption motion-safe:animate-in motion-safe:fade-in"
+ >
+ <FileText aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ <span className="font-mono">{issue.file}</span>
+ <span className="text-warning">{t.modified}</span>
+ </li>
+ ))}
+ </ul>
+ ) : (
+ <div className="mt-1 flex items-center gap-1.5 text-caption text-muted-foreground">
+ <Check aria-hidden className="size-3.5 shrink-0 text-success" />
+ {t.noChanges}
+ </div>
+ )}
+ </div>
+ </>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
+
+function RunLane({
+ agent,
+ run,
+ statusLabel,
+ waitingLine,
+ steps,
+ branch,
+ branchLabel,
+}: {
+ agent: string;
+ run: Run;
+ statusLabel: string;
+ waitingLine: string;
+ steps: string[];
+ branch: string | null;
+ branchLabel: string;
+}) {
+ const active = run.status === "working";
+ return (
+ <div className="min-w-0 motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex min-h-7 flex-wrap items-center gap-x-2 gap-y-0.5">
+ <DemoAvatar name={agent} agent />
+ <span className="truncate text-body font-medium">{agent}</span>
+ <span
+ key={run.status}
+ className={cn(
+ "inline-flex items-center gap-1 text-caption motion-safe:animate-in motion-safe:fade-in",
+ run.status === "waiting" ? "text-warning" : "text-muted-foreground",
+ )}
+ >
+ {run.status === "waiting" ? (
+ <Clock aria-hidden className="size-3" />
+ ) : active ? (
+ <Loader2 aria-hidden className="size-3 text-brand motion-safe:animate-spin" />
+ ) : (
+ <Check aria-hidden className="size-3 text-success" />
+ )}
+ {statusLabel}
+ </span>
+ </div>
+ {run.status === "waiting" ? (
+ <p className="mt-1 pl-7 text-caption text-muted-foreground">{waitingLine}</p>
+ ) : (
+ <ul className="mt-1 flex flex-col gap-0.5 pl-7">
+ {steps.slice(0, run.steps).map((step, i) => (
+ <DemoStep key={step} state={i === run.steps - 1 && active ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </ul>
+ )}
+ {branch && (
+ <div className="mt-1.5 flex min-w-0 items-center gap-1.5 pl-7 text-caption motion-safe:animate-in motion-safe:fade-in">
+ <GitBranch aria-hidden className="size-3.5 shrink-0 text-brand" />
+ <span className="text-muted-foreground">{branchLabel}</span>
+ <code className="min-w-0 truncate rounded-xs bg-muted px-1 font-mono text-micro">{branch}</code>
+ </div>
+ )}
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/mention-demo.tsx b/apps/docs/components/demos/mention-demo.tsx
new file mode 100644
index 0000000000..1fb8b34d44
--- /dev/null
+++ b/apps/docs/components/demos/mention-demo.tsx
@@ -0,0 +1,328 @@
+"use client";
+
+import { useState } from "react";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoSendButton,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Candidate = { name: string; agent: boolean };
+
+const copy = {
+ en: {
+ title: "OPS-15 · Prepare next week's customer training",
+ assigneeLabel: "Assignee",
+ assignee: "Lei Li",
+ you: "You",
+ draft: "The invitation email for the training isn't written yet. ",
+ agentsGroup: "Agents",
+ membersGroup: "Members",
+ candidates: [
+ { name: "Writing helper", agent: true },
+ { name: "Ops helper", agent: true },
+ { name: "Lei Li", agent: false },
+ ] as Candidate[],
+ memberNote: "Notify only",
+ mention: "@ Mention",
+ willStart: "Starts when sent",
+ send: "Send",
+ running: "Running",
+ completed: "Completed",
+ steps: [
+ "Read this comment and the issue description",
+ "Check the training date and agenda",
+ "Draft the invitation email",
+ ],
+ reply: "The invitation draft is ready, with the date, the agenda and the sign-up link. Edit it as you like.",
+ captions: {
+ idle: "A member is the assignee. Ask an agent for help without changing that.",
+ type: "The comment is written. Click @ Mention to bring in an agent.",
+ pick: "Pick an agent. Mentioning a member only notifies them, so members can't be picked here.",
+ preview: "The preview under the composer shows who starts when you send. Click send.",
+ running: "The agent works on this comment. The assignee is still Lei Li.",
+ done: "Done. The assignee never changed. Use Replay to try again.",
+ },
+ },
+ zh: {
+ title: "OPS-15 · 准备下周的客户培训",
+ assigneeLabel: "负责人",
+ assignee: "李雷",
+ you: "你",
+ draft: "培训的邀请邮件还没写,",
+ agentsGroup: "智能体",
+ membersGroup: "成员",
+ candidates: [
+ { name: "文案助手", agent: true },
+ { name: "运营助手", agent: true },
+ { name: "李雷", agent: false },
+ ] as Candidate[],
+ memberNote: "仅通知",
+ mention: "@ 提及",
+ willStart: "发送后开始",
+ send: "发送",
+ running: "运行中",
+ completed: "已完成",
+ steps: ["读取这条评论和任务描述", "查看培训时间和议程", "起草邀请邮件"],
+ reply: "邀请邮件草稿已写好,包含时间、议程和报名链接,你可以直接修改。",
+ captions: {
+ idle: "这条任务的负责人是成员。不改变负责人,也能请智能体帮忙。",
+ type: "评论已经写好。点击\"@ 提及\",请一个智能体来处理。",
+ pick: "选择一个智能体。提及成员只会通知对方,所以这里不能选成员。",
+ preview: "评论框下方的触发预览列出发送后会开始工作的智能体。点击发送。",
+ running: "智能体处理这条评论,负责人仍然是 李雷。",
+ done: "处理完成,负责人没有变化。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-15 · 来週の顧客トレーニングを準備する",
+ assigneeLabel: "担当者",
+ assignee: "李雷",
+ you: "あなた",
+ draft: "トレーニングの案内メールがまだ書けていません。",
+ agentsGroup: "エージェント",
+ membersGroup: "メンバー",
+ candidates: [
+ { name: "ライティングアシスタント", agent: true },
+ { name: "運用アシスタント", agent: true },
+ { name: "李雷", agent: false },
+ ] as Candidate[],
+ memberNote: "通知のみ",
+ mention: "@ メンション",
+ willStart: "送信後に作業を開始します",
+ send: "送信",
+ running: "実行中",
+ completed: "完了",
+ steps: ["このコメントとタスクの説明を読む", "トレーニングの日程とアジェンダを確認する", "案内メールを下書きする"],
+ reply: "案内メールの下書きができました。日程、アジェンダ、申し込みリンクを入れてあります。自由に手を入れてください。",
+ captions: {
+ idle: "このタスクの担当者はメンバーです。担当者を変えずに、エージェントに手伝ってもらえます。",
+ type: "コメントは書けています。「@ メンション」をクリックしてエージェントを呼びます。",
+ pick: "エージェントを選びます。メンバーをメンションしても通知が届くだけなので、ここでは選べません。",
+ preview: "入力欄の下のトリガープレビューに、送信すると作業を始めるエージェントが表示されます。送信をクリックします。",
+ running: "エージェントがこのコメントに取り組みます。担当者は 李雷 のままです。",
+ done: "完了しました。担当者は一度も変わっていません。「もう一度」でもう一度試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-15 · 다음 주 고객 교육 준비",
+ assigneeLabel: "담당자",
+ assignee: "리레이",
+ you: "나",
+ draft: "교육 초대 메일을 아직 못 썼어요. ",
+ agentsGroup: "에이전트",
+ membersGroup: "멤버",
+ candidates: [
+ { name: "글쓰기 도우미", agent: true },
+ { name: "운영 도우미", agent: true },
+ { name: "리레이", agent: false },
+ ] as Candidate[],
+ memberNote: "알림만",
+ mention: "@ 멘션",
+ willStart: "전송 후 작업을 시작합니다",
+ send: "보내기",
+ running: "실행 중",
+ completed: "완료됨",
+ steps: ["이 댓글과 태스크 설명 읽기", "교육 일정과 안건 확인", "초대 메일 초안 작성"],
+ reply: "초대 메일 초안을 작성했습니다. 일정, 안건, 신청 링크가 들어 있으니 자유롭게 고쳐 주세요.",
+ captions: {
+ idle: "이 태스크의 담당자는 멤버입니다. 담당자를 바꾸지 않고도 에이전트에게 도움을 요청할 수 있습니다.",
+ type: "댓글은 다 썼습니다. '@ 멘션'을 클릭해 에이전트를 불러오세요.",
+ pick: "에이전트를 선택하세요. 멤버를 멘션하면 알림만 가므로 여기서는 멤버를 고를 수 없습니다.",
+ preview: "입력란 아래의 트리거 미리보기에 보내면 작업을 시작할 에이전트가 표시됩니다. 보내기를 클릭하세요.",
+ running: "에이전트가 이 댓글을 처리합니다. 담당자는 여전히 리레이입니다.",
+ done: "완료되었습니다. 담당자는 한 번도 바뀌지 않았습니다. '다시 보기'로 다시 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-15 · Préparer la formation clients de la semaine prochaine",
+ assigneeLabel: "Assigné à",
+ assignee: "Lei Li",
+ you: "Vous",
+ draft: "L'e-mail d'invitation à la formation n'est pas encore rédigé. ",
+ agentsGroup: "Agents",
+ membersGroup: "Membres",
+ candidates: [
+ { name: "Assistant rédaction", agent: true },
+ { name: "Assistant ops", agent: true },
+ { name: "Lei Li", agent: false },
+ ] as Candidate[],
+ memberNote: "Notification seule",
+ mention: "@ Mentionner",
+ willStart: "Démarrera à l'envoi",
+ send: "Envoyer",
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire ce commentaire et la description de la tâche",
+ "Vérifier la date et le programme de la formation",
+ "Rédiger l'e-mail d'invitation",
+ ],
+ reply:
+ "Le brouillon de l'invitation est prêt, avec la date, le programme et le lien d'inscription. Modifiez-le comme vous voulez.",
+ captions: {
+ idle: "Un membre est assigné à cette tâche. Vous pouvez demander l'aide d'un agent sans changer l'assigné.",
+ type: "Le commentaire est rédigé. Cliquez sur « @ Mentionner » pour faire intervenir un agent.",
+ pick: "Choisissez un agent. Mentionner un membre ne fait que le notifier, donc les membres ne sont pas proposés ici.",
+ preview: "L'aperçu sous la zone de commentaire indique qui démarrera à l'envoi. Cliquez sur envoyer.",
+ running: "L'agent traite ce commentaire. L'assigné reste Lei Li.",
+ done: "Terminé. L'assigné n'a jamais changé. Utilisez Rejouer pour recommencer.",
+ },
+ },
+};
+
+type Phase = "idle" | "type" | "pick" | "preview" | "running" | "done";
+
+// Every step advances by a click on the one control the caption names: the
+// comment itself is fixed, so the demo can't reach a state it doesn't script.
+export function MentionDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("type");
+ const [agent, setAgent] = useState<string | null>(null);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const sent = phase === "running" || phase === "done";
+
+ const pick = (name: string) => {
+ setAgent(name);
+ setPhase("preview");
+ };
+
+ const send = () => {
+ setPhase("running");
+ t.steps.forEach((_, i) => after(500 + i * 1000, () => setStepsShown(i + 1)));
+ after(500 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("type");
+ setAgent(null);
+ setStepsShown(0);
+ };
+
+ const mentionToken = (name: string | null) => (
+ <span className="font-medium text-brand">@{name ?? ""}</span>
+ );
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-80 flex-col gap-3 p-4">
+ <div className="flex items-center gap-2 text-caption text-muted-foreground">
+ <span>{t.assigneeLabel}</span>
+ <DemoAvatar name={t.assignee} />
+ <span className="text-label text-foreground">{t.assignee}</span>
+ </div>
+
+ {sent && agent && (
+ <>
+ <DemoComment author={t.you}>
+ {t.draft}
+ {mentionToken(agent)}
+ </DemoComment>
+ <DemoRun agent={agent} status={phase === "done" ? t.completed : t.running} active={phase !== "done"}>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && phase !== "done" ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ </>
+ )}
+
+ {phase === "done" && agent && (
+ <DemoComment author={agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ <div className="relative mt-auto rounded-lg border bg-background p-2">
+ {phase === "pick" && (
+ <div
+ role="listbox"
+ aria-label={t.agentsGroup}
+ className="absolute bottom-full left-2 z-10 mb-1 w-56 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {[true, false].map((isAgent) => (
+ <div key={String(isAgent)}>
+ <div className="px-2 pt-1 pb-0.5 text-micro text-muted-foreground">
+ {isAgent ? t.agentsGroup : t.membersGroup}
+ </div>
+ {t.candidates
+ .filter((c) => c.agent === isAgent)
+ .map((candidate, i) => (
+ <CoachMark
+ key={candidate.name}
+ active={isAgent && i === 0}
+ side="right"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={false}
+ disabled={!candidate.agent}
+ onClick={() => pick(candidate.name)}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:opacity-50 disabled:hover:bg-transparent"
+ >
+ <DemoAvatar name={candidate.name} agent={candidate.agent} />
+ <span className="min-w-0 flex-1 truncate">{candidate.name}</span>
+ {!candidate.agent && <span className="text-caption text-muted-foreground">{t.memberNote}</span>}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ ))}
+ </div>
+ )}
+
+ <div className="min-h-12 px-1 text-body">
+ {!sent && visible && (
+ <>
+ {t.draft}
+ {phase === "type" ? (
+ <CoachMark active side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ onClick={() => setPhase("pick")}
+ className="rounded-md border border-dashed border-brand/50 px-1.5 text-label font-medium text-brand hover:bg-brand/7"
+ >
+ {t.mention}
+ </button>
+ </CoachMark>
+ ) : (
+ mentionToken(agent)
+ )}
+ </>
+ )}
+ </div>
+
+ <div className="mt-1.5 flex items-center gap-2">
+ {phase === "preview" && agent && (
+ <span className="inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md bg-muted px-1.5 text-caption motion-safe:animate-in motion-safe:fade-in">
+ <DemoAvatar name={agent} agent />
+ <span className="truncate">{agent}</span>
+ <span className="text-muted-foreground">· {t.willStart}</span>
+ </span>
+ )}
+ <span className="ml-auto" />
+ <CoachMark active={phase === "preview"} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={phase !== "preview"} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/pr-link-demo.tsx b/apps/docs/components/demos/pr-link-demo.tsx
new file mode 100644
index 0000000000..7e5751915e
--- /dev/null
+++ b/apps/docs/components/demos/pr-link-demo.tsx
@@ -0,0 +1,475 @@
+"use client";
+
+import { useState, type ReactNode } from "react";
+import {
+ CheckCircle2,
+ CircleDashed,
+ CircleSlash,
+ GitMerge,
+ GitPullRequestArrow,
+ MoreHorizontal,
+} from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useDemoTimers, useStartWhenVisible } from "./demo-kit";
+
+type Status = "in_review" | "done";
+
+const copy = {
+ en: {
+ title: "OPS-31 · Update the campaign copy on the website homepage",
+ github: "GitHub",
+ multica: "Multica",
+ ghTitle: "OPS-31 Update the campaign copy on the website homepage",
+ ghNumber: "#19",
+ ghBranch: "ops-31-homepage-copy → main",
+ open: "Open",
+ merged: "Merged",
+ checks: "All checks have passed · No conflicts",
+ mergeButton: "Merge pull request",
+ merging: "Merging...",
+ mergedNote: "Pull request successfully merged",
+ issueTitle: "OPS-31 · Update the campaign copy on the website homepage",
+ statusLabel: "Status",
+ status: { in_review: "In Review", done: "Done" } as Record<Status, string>,
+ section: "Pull requests",
+ sectionMenu: "Pull request automation",
+ disable: "Keep status when PRs merge",
+ prTitle: "Update the campaign copy on the website homepage",
+ diff: { add: "+12", del: "−4" },
+ justNow: "just now",
+ ready: "Ready",
+ waiting: { before: "Moves to ", after: " when #19 merges" },
+ issueDisabled: "PR merges won’t change this issue",
+ issueDisabledAction: "Turn on",
+ you: "You",
+ optedOutActivity: "set this issue to keep its status when PRs merge",
+ mergedActivity: "Changed status from In Review to Done after every linked PR merged (#19)",
+ captions: {
+ idle: "An issue with a linked pull request that hasn't merged yet.",
+ ready:
+ "The issue is linked to #19, and the line under it says what a merge will do. Click Merge pull request on GitHub, or first use the ⋯ menu to keep this issue's status.",
+ menu: "Keep status when PRs merge: this issue stays where it is after its PRs merge.",
+ optedOut: "This issue now keeps its status when PRs merge. Merge on GitHub, or click Turn on to go back to the default.",
+ merging: "GitHub sends the merge event to Multica.",
+ merged:
+ "Every linked PR has merged, so the issue moved to Done and the timeline records it as a system change. Use Replay to try the other path.",
+ kept: "The PR merged, but this issue keeps its status when PRs merge, so it stays In Review. Use Replay to start over.",
+ },
+ },
+ zh: {
+ title: "OPS-31 · 更新官网首页的活动文案",
+ github: "GitHub",
+ multica: "Multica",
+ ghTitle: "OPS-31 更新官网首页的活动文案",
+ ghNumber: "#19",
+ ghBranch: "ops-31-homepage-copy → main",
+ open: "Open",
+ merged: "Merged",
+ checks: "检查已通过,没有冲突",
+ mergeButton: "Merge pull request",
+ merging: "合并中...",
+ mergedNote: "Pull request 已合并",
+ issueTitle: "OPS-31 · 更新官网首页的活动文案",
+ statusLabel: "状态",
+ status: { in_review: "审核中", done: "已完成" } as Record<Status, string>,
+ section: "Pull Request",
+ sectionMenu: "PR 自动化",
+ disable: "此任务合并后不改状态",
+ prTitle: "更新官网首页的活动文案",
+ diff: { add: "+12", del: "−4" },
+ justNow: "刚刚",
+ ready: "可合入",
+ waiting: { before: "等待 #19 合并后改为 ", after: "" },
+ issueDisabled: "此任务合并后不改状态",
+ issueDisabledAction: "恢复",
+ you: "你",
+ optedOutActivity: "设置此任务合并后不改状态",
+ mergedActivity: "所有关联 PR 均已合并(#19),状态从 审核中 改为 已完成",
+ captions: {
+ idle: "一条关联了 PR 的任务,PR 还没有合并。",
+ ready: "任务关联了 #19,列表下方写着合并后会改成什么状态。在 GitHub 上点击 Merge pull request;也可以先在 ⋯ 菜单里让这条任务合并后不改状态。",
+ menu: "选择\"此任务合并后不改状态\"后,这条任务的 PR 合并时保持当前状态。",
+ optedOut: "这条任务已设置为合并后不改状态。去 GitHub 合并,或点击\"恢复\"回到默认规则。",
+ merging: "GitHub 把合并事件发给 Multica。",
+ merged: "关联的 PR 全部合并,任务改为已完成,时间线以系统操作记下这次变化。点右上角可以换一条路径再试。",
+ kept: "PR 已合并,但这条任务设置了合并后不改状态,所以仍是审核中。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-31 · Web サイトのトップページのキャンペーン文言を更新する",
+ github: "GitHub",
+ multica: "Multica",
+ ghTitle: "OPS-31 Web サイトのトップページのキャンペーン文言を更新する",
+ ghNumber: "#19",
+ ghBranch: "ops-31-homepage-copy → main",
+ open: "Open",
+ merged: "Merged",
+ checks: "すべてのチェックに合格 · コンフリクトなし",
+ mergeButton: "Merge pull request",
+ merging: "マージ中...",
+ mergedNote: "Pull request をマージしました",
+ issueTitle: "OPS-31 · Web サイトのトップページのキャンペーン文言を更新する",
+ statusLabel: "ステータス",
+ status: { in_review: "レビュー中", done: "完了" } as Record<Status, string>,
+ section: "Pull requests",
+ sectionMenu: "PR の自動化",
+ disable: "PR マージ後もステータスを変えない",
+ prTitle: "Web サイトのトップページのキャンペーン文言を更新する",
+ diff: { add: "+12", del: "−4" },
+ justNow: "たった今",
+ ready: "マージ可能",
+ waiting: { before: "#19 がマージされると ", after: " に変更" },
+ issueDisabled: "このタスクは PR マージでステータスを変えません",
+ issueDisabledAction: "再開",
+ you: "あなた",
+ optedOutActivity: "このタスクを PR マージでステータスを変えないように設定しました",
+ mergedActivity: "関連するすべての PR がマージされたため(#19)、ステータスを レビュー中 から 完了 に変更しました",
+ captions: {
+ idle: "PR が関連付けられたタスクです。PR はまだマージされていません。",
+ ready:
+ "タスクには #19 が関連付けられ、その下の行にマージ後のステータスが表示されています。GitHub で Merge pull request をクリックするか、先に ⋯ メニューでこのタスクのステータスを変えないように設定します。",
+ menu: "「PR マージ後もステータスを変えない」を選ぶと、このタスクは PR がマージされても今のステータスのままです。",
+ optedOut: "このタスクは PR マージでステータスを変えない設定になりました。GitHub でマージするか、「再開」をクリックしてデフォルトに戻します。",
+ merging: "GitHub がマージイベントを Multica に送ります。",
+ merged:
+ "関連する PR がすべてマージされたので、タスクは 完了 になり、タイムラインにシステムによる変更として記録されました。「もう一度」で別の流れも試せます。",
+ kept: "PR はマージされましたが、このタスクは PR マージでステータスを変えない設定なので レビュー中 のままです。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "OPS-31 · 웹사이트 홈페이지의 캠페인 문구 업데이트",
+ github: "GitHub",
+ multica: "Multica",
+ ghTitle: "OPS-31 웹사이트 홈페이지의 캠페인 문구 업데이트",
+ ghNumber: "#19",
+ ghBranch: "ops-31-homepage-copy → main",
+ open: "Open",
+ merged: "Merged",
+ checks: "모든 검사 통과 · 충돌 없음",
+ mergeButton: "Merge pull request",
+ merging: "병합 중...",
+ mergedNote: "Pull request가 병합되었습니다",
+ issueTitle: "OPS-31 · 웹사이트 홈페이지의 캠페인 문구 업데이트",
+ statusLabel: "상태",
+ status: { in_review: "리뷰 중", done: "완료" } as Record<Status, string>,
+ section: "Pull requests",
+ sectionMenu: "PR 자동화",
+ disable: "PR 병합 후에도 상태 유지",
+ prTitle: "웹사이트 홈페이지의 캠페인 문구 업데이트",
+ diff: { add: "+12", del: "−4" },
+ justNow: "방금 전",
+ ready: "병합 가능",
+ waiting: { before: "#19 병합 시 ", after: "로 변경" },
+ issueDisabled: "이 태스크는 PR 병합 시 상태를 바꾸지 않음",
+ issueDisabledAction: "다시 켜기",
+ you: "나",
+ optedOutActivity: "이 태스크가 PR 병합 시 상태를 유지하도록 설정했습니다",
+ mergedActivity: "연결된 PR이 모두 병합되어(#19) 상태를 리뷰 중에서 완료로 변경했습니다",
+ captions: {
+ idle: "PR이 연결된 태스크입니다. PR은 아직 병합되지 않았습니다.",
+ ready:
+ "태스크에 #19가 연결되어 있고, 그 아래 줄에 병합 후 바뀔 상태가 표시됩니다. GitHub에서 Merge pull request를 클릭하거나, 먼저 ⋯ 메뉴에서 이 태스크의 상태를 유지하도록 설정하세요.",
+ menu: "PR 병합 후에도 상태 유지를 선택하면 이 태스크는 PR이 병합되어도 현재 상태를 유지합니다.",
+ optedOut: "이제 이 태스크는 PR 병합 시 상태를 유지합니다. GitHub에서 병합하거나 다시 켜기를 클릭해 기본 동작으로 돌아가세요.",
+ merging: "GitHub가 병합 이벤트를 Multica로 보냅니다.",
+ merged:
+ "연결된 PR이 모두 병합되어 태스크가 완료로 바뀌었고, 타임라인에 시스템 변경으로 기록되었습니다. 다시 보기를 눌러 다른 경로도 시도해 보세요.",
+ kept: "PR은 병합되었지만 이 태스크는 PR 병합 시 상태를 유지하도록 설정되어 있어 리뷰 중으로 남습니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-31 · Mettre à jour le texte de la campagne sur la page d'accueil du site",
+ github: "GitHub",
+ multica: "Multica",
+ ghTitle: "OPS-31 Mettre à jour le texte de la campagne sur la page d'accueil du site",
+ ghNumber: "#19",
+ ghBranch: "ops-31-homepage-copy → main",
+ open: "Open",
+ merged: "Merged",
+ checks: "Toutes les vérifications ont réussi · Aucun conflit",
+ mergeButton: "Merge pull request",
+ merging: "Fusion...",
+ mergedNote: "Pull request fusionnée",
+ issueTitle: "OPS-31 · Mettre à jour le texte de la campagne sur la page d'accueil du site",
+ statusLabel: "Statut",
+ status: { in_review: "En relecture", done: "Terminé" } as Record<Status, string>,
+ section: "Pull requests",
+ sectionMenu: "Automatisation des pull requests",
+ disable: "Garder le statut à la fusion des PR",
+ prTitle: "Mettre à jour le texte de la campagne sur la page d'accueil du site",
+ diff: { add: "+12", del: "−4" },
+ justNow: "à l'instant",
+ ready: "Prête à fusionner",
+ waiting: { before: "Passe à ", after: " quand #19 est fusionnée" },
+ issueDisabled: "Les fusions de PR ne changent pas cette tâche",
+ issueDisabledAction: "Réactiver",
+ you: "Vous",
+ optedOutActivity: "a configuré cette tâche pour garder son statut à la fusion des PR",
+ mergedActivity: "Statut changé de En relecture à Terminé après la fusion de toutes les PR liées (#19)",
+ captions: {
+ idle: "Une tâche liée à une pull request qui n'est pas encore fusionnée.",
+ ready:
+ "La tâche est liée à #19, et la ligne en dessous indique ce que fera la fusion. Cliquez sur Merge pull request sur GitHub, ou passez d'abord par le menu ⋯ pour que cette tâche garde son statut.",
+ menu: "Garder le statut à la fusion des PR : cette tâche reste où elle est après la fusion de ses PR.",
+ optedOut:
+ "Cette tâche garde désormais son statut à la fusion des PR. Fusionnez sur GitHub, ou cliquez sur Réactiver pour revenir au comportement par défaut.",
+ merging: "GitHub envoie l'événement de fusion à Multica.",
+ merged:
+ "Toutes les PR liées sont fusionnées : la tâche passe à Terminé, et la chronologie l'enregistre comme une modification système. Cliquez sur Rejouer pour essayer l'autre chemin.",
+ kept: "La PR est fusionnée, mais cette tâche garde son statut à la fusion des PR : elle reste En relecture. Cliquez sur Rejouer pour recommencer.",
+ },
+ },
+};
+
+type Phase = "idle" | "ready" | "menu" | "optedOut" | "merging" | "merged" | "kept";
+
+const statusDot: Record<Status, string> = {
+ in_review: "border-brand bg-brand/40",
+ done: "border-success bg-success",
+};
+
+function StatusChip({ label, status }: { label: string; status: Status }) {
+ return (
+ <span className="inline-flex items-center gap-1 align-[-2px] font-medium text-foreground">
+ <span aria-hidden className={cn("size-2.5 rounded-full border-2", statusDot[status])} />
+ {label}
+ </span>
+ );
+}
+
+export function PrLinkDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("ready");
+ const [optedOut, setOptedOut] = useState(false);
+ const [status, setStatus] = useState<Status>("in_review");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const prMerged = phase === "merged" || phase === "kept";
+ const canMerge = visible && (phase === "ready" || phase === "optedOut");
+ const canUseMenu = visible && (phase === "ready" || phase === "menu");
+
+ const merge = () => {
+ const keep = optedOut;
+ setPhase("merging");
+ after(900, () => {
+ setPhase(keep ? "kept" : "merged");
+ if (!keep) after(500, () => setStatus("done"));
+ });
+ };
+
+ const optOut = () => {
+ setOptedOut(true);
+ setPhase("optedOut");
+ };
+
+ const turnBackOn = () => {
+ setOptedOut(false);
+ setPhase("ready");
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("ready");
+ setOptedOut(false);
+ setStatus("in_review");
+ };
+
+ // The line under the PR list follows the server's decision: it names the
+ // target while a PR is open, reports an opt-out, and goes quiet once the
+ // issue is done.
+ let autoLine: ReactNode = null;
+ if (optedOut) {
+ autoLine = (
+ <>
+ <CircleSlash aria-hidden />
+ <span className="min-w-0">
+ {t.issueDisabled} ·{" "}
+ <button
+ type="button"
+ disabled={phase !== "optedOut"}
+ onClick={turnBackOn}
+ className="font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground disabled:no-underline"
+ >
+ {t.issueDisabledAction}
+ </button>
+ </span>
+ </>
+ );
+ } else if (!prMerged) {
+ autoLine = (
+ <>
+ <CircleDashed aria-hidden />
+ <span className="min-w-0">
+ {t.waiting.before}
+ <StatusChip label={t.status.done} status="done" />
+ {t.waiting.after}
+ </span>
+ </>
+ );
+ }
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="grid min-h-80 gap-3 p-4 sm:grid-cols-2">
+ <section className="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-3">
+ <div className="text-micro font-medium text-muted-foreground">{t.github}</div>
+ <div className="text-body font-medium break-words">
+ {t.ghTitle} <span className="font-normal text-muted-foreground">{t.ghNumber}</span>
+ </div>
+ <div className="flex min-w-0 flex-wrap items-center gap-2 text-caption text-muted-foreground">
+ <span
+ key={String(prMerged)}
+ className={cn(
+ "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-micro font-medium text-white motion-safe:animate-in motion-safe:fade-in",
+ prMerged ? "bg-violet-600" : "bg-emerald-600",
+ )}
+ >
+ {prMerged ? <GitMerge aria-hidden className="size-3" /> : <GitPullRequestArrow aria-hidden className="size-3" />}
+ {prMerged ? t.merged : t.open}
+ </span>
+ <span className="min-w-0 truncate font-mono text-micro">{t.ghBranch}</span>
+ </div>
+ <div className="mt-auto flex flex-col gap-2 rounded-md border bg-muted/40 p-2.5">
+ {prMerged ? (
+ <span className="flex items-center gap-1.5 text-caption motion-safe:animate-in motion-safe:fade-in">
+ <GitMerge aria-hidden className="size-3.5 text-violet-600 dark:text-violet-400" />
+ {t.mergedNote}
+ </span>
+ ) : (
+ <>
+ <span className="flex items-center gap-1.5 text-caption">
+ <CheckCircle2 aria-hidden className="size-3.5 text-success" />
+ {t.checks}
+ </span>
+ <CoachMark active={canMerge} side="bottom" align="start" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={!canMerge} onClick={merge}>
+ {phase === "merging" ? t.merging : t.mergeButton}
+ </Button>
+ </CoachMark>
+ </>
+ )}
+ </div>
+ </section>
+
+ <section className="flex min-w-0 flex-col gap-3 rounded-lg border bg-background p-3">
+ <div className="text-micro font-medium text-muted-foreground">{t.multica}</div>
+ <div className="text-body font-medium break-words">{t.issueTitle}</div>
+ <div className="flex items-center gap-3 text-body">
+ <span className="text-caption text-muted-foreground">{t.statusLabel}</span>
+ <span className="flex items-center gap-1.5">
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", statusDot[status])} />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ </span>
+ </div>
+
+ <div className="relative">
+ <div className="flex items-center justify-between">
+ <span className="text-caption font-medium text-muted-foreground">{t.section}</span>
+ <button
+ type="button"
+ aria-label={t.sectionMenu}
+ aria-haspopup="menu"
+ aria-expanded={phase === "menu"}
+ disabled={!canUseMenu}
+ onClick={() => setPhase(phase === "menu" ? "ready" : "menu")}
+ className="inline-flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:hover:bg-transparent"
+ >
+ <MoreHorizontal className="size-4" />
+ </button>
+ </div>
+ {phase === "menu" && (
+ <div
+ role="menu"
+ aria-label={t.sectionMenu}
+ className="absolute top-7 right-0 z-10 w-56 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ <CoachMark quiet active ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="menuitem"
+ onClick={optOut}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent"
+ >
+ <CircleSlash aria-hidden className="size-3.5 text-muted-foreground" />
+ {t.disable}
+ </button>
+ </CoachMark>
+ </div>
+ )}
+
+ <div className="mt-1 flex items-start gap-2 rounded-md px-0.5 py-1.5">
+ {prMerged ? (
+ <GitMerge aria-hidden className="mt-px size-3.5 shrink-0 text-violet-600 dark:text-violet-400" />
+ ) : (
+ <GitPullRequestArrow aria-hidden className="mt-px size-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" />
+ )}
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-caption font-medium">{t.prTitle}</p>
+ <div className="mt-1 flex items-center gap-2">
+ <p className="flex min-w-0 flex-1 items-center gap-1.5 text-micro text-muted-foreground tabular-nums">
+ <span>{t.ghNumber}</span>
+ <span aria-hidden>·</span>
+ {prMerged ? (
+ <span>{t.justNow}</span>
+ ) : (
+ <span>
+ <span className="text-emerald-600 dark:text-emerald-400">{t.diff.add}</span>{" "}
+ <span className="text-rose-600 dark:text-rose-400">{t.diff.del}</span>
+ </span>
+ )}
+ </p>
+ <span
+ className={cn(
+ "inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-micro font-medium",
+ prMerged
+ ? "bg-violet-500/10 text-violet-700 dark:text-violet-300"
+ : "bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",
+ )}
+ >
+ {prMerged ? <GitMerge aria-hidden className="size-3" /> : <CheckCircle2 aria-hidden className="size-3" />}
+ {prMerged ? t.merged : t.ready}
+ </span>
+ </div>
+ </div>
+ </div>
+
+ {autoLine && (
+ <p className="mt-1 flex items-start gap-1.5 border-t pt-2 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in [&>svg]:mt-0.5 [&>svg]:size-3.5 [&>svg]:shrink-0">
+ {autoLine}
+ </p>
+ )}
+ </div>
+
+ {(optedOut || status === "done") && (
+ <ul className="mt-auto flex flex-col gap-1.5 border-t pt-2 text-caption text-muted-foreground">
+ {optedOut && (
+ <li className="flex min-w-0 items-start gap-2 motion-safe:animate-in motion-safe:fade-in">
+ <DemoAvatar name={t.you} />
+ <span className="min-w-0">
+ <span className="font-medium text-foreground">{t.you}</span> {t.optedOutActivity}
+ </span>
+ </li>
+ )}
+ {status === "done" && (
+ <li className="flex min-w-0 items-start gap-2 motion-safe:animate-in motion-safe:fade-in">
+ <span
+ aria-hidden
+ className="inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-muted"
+ >
+ <GitMerge className="size-3" />
+ </span>
+ <span className="min-w-0">{t.mergedActivity}</span>
+ </li>
+ )}
+ </ul>
+ )}
+ </section>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/project-demo.tsx b/apps/docs/components/demos/project-demo.tsx
new file mode 100644
index 0000000000..737a9ee43b
--- /dev/null
+++ b/apps/docs/components/demos/project-demo.tsx
@@ -0,0 +1,438 @@
+"use client";
+
+import { useState } from "react";
+import { ChevronDown, FolderKanban } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type IssueStatus = "todo" | "in_progress" | "in_review" | "done" | "cancelled";
+type ProjectStatus = "planned" | "in_progress" | "paused" | "completed" | "cancelled";
+type IssueId = "OPS-41" | "OPS-42" | "OPS-43" | "OPS-44";
+
+const ISSUE_MENU: IssueStatus[] = ["todo", "in_progress", "in_review", "done", "cancelled"];
+const PROJECT_MENU: ProjectStatus[] = ["planned", "in_progress", "paused", "completed", "cancelled"];
+
+// Progress counts issues in the done and closed categories (handler/project.go).
+const finished = (s: IssueStatus) => s === "done" || s === "cancelled";
+
+const issueDot: Record<IssueStatus, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+ done: "border-success bg-success",
+ cancelled: "border-muted-foreground bg-muted-foreground/50",
+};
+
+const copy = {
+ en: {
+ title: "Project · Anniversary online event",
+ project: "Anniversary online event",
+ statusLabel: "Status",
+ leadLabel: "Lead",
+ progressLabel: "Progress",
+ you: "You",
+ descriptionLabel: "Description",
+ description: "Run the anniversary online event by October 31: the announcement post, the prize draw and partner promotion. Keep the brand voice friendly; budget stays within the approved amount.",
+ descriptionHint: "Used as project context for agents, applied to every run in this project.",
+ issueStatus: {
+ todo: "Todo",
+ in_progress: "In Progress",
+ in_review: "In Review",
+ done: "Done",
+ cancelled: "Cancelled",
+ } as Record<IssueStatus, string>,
+ projectStatus: {
+ planned: "Planned",
+ in_progress: "In Progress",
+ paused: "Paused",
+ completed: "Completed",
+ cancelled: "Cancelled",
+ } as Record<ProjectStatus, string>,
+ issues: {
+ "OPS-41": "Pick the event theme and dates",
+ "OPS-42": "Write the event announcement post",
+ "OPS-43": "List the prizes for the draw",
+ "OPS-44": "Book a partner influencer",
+ } as Record<IssueId, string>,
+ captions: {
+ idle: "A project with four issues; two are finished.",
+ first: "OPS-42 has been reviewed. Click its status and mark it Done.",
+ firstMenu: "Pick Done.",
+ second: "Progress went up a step. The partner promotion is no longer happening: set OPS-44 to Cancelled.",
+ secondMenu: "Pick Cancelled. A cancelled issue has left the project's scope.",
+ allDone: "Cancelled counts toward progress too, so the project is at 100%. Its own status is still In Progress: it does not follow the issues. Click the project status.",
+ projectMenu: "Pick Completed. Changing it would not touch any issue either.",
+ done: "The project is now Completed; that never happens on its own. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "项目 · 周年庆线上活动",
+ project: "周年庆线上活动",
+ statusLabel: "状态",
+ leadLabel: "负责人",
+ progressLabel: "进度",
+ you: "你",
+ descriptionLabel: "描述",
+ description: "10 月 31 日前办完周年庆线上活动:活动推文、抽奖和合作推广。语气保持亲切,花费不超过已批预算。",
+ descriptionHint: "会作为项目上下文提供给智能体,应用于该项目下的每次运行。",
+ issueStatus: {
+ todo: "待办",
+ in_progress: "进行中",
+ in_review: "审核中",
+ done: "已完成",
+ cancelled: "已取消",
+ } as Record<IssueStatus, string>,
+ projectStatus: {
+ planned: "计划中",
+ in_progress: "进行中",
+ paused: "已暂停",
+ completed: "已完成",
+ cancelled: "已取消",
+ } as Record<ProjectStatus, string>,
+ issues: {
+ "OPS-41": "确定活动主题和时间",
+ "OPS-42": "写活动推文",
+ "OPS-43": "列出抽奖奖品清单",
+ "OPS-44": "联系合作博主",
+ } as Record<IssueId, string>,
+ captions: {
+ idle: "一个包含 4 条任务的项目,其中 2 条已经结束。",
+ first: "OPS-42 已经检查过了。点击它的状态,改为已完成。",
+ firstMenu: "选择已完成。",
+ second: "进度前进了一格。合作推广不做了:把 OPS-44 改为已取消。",
+ secondMenu: "选择已取消。取消表示这项工作已从项目范围中结束。",
+ allDone: "已取消同样计入进度,项目到了 100%,但项目状态还是进行中:它不跟随任务变化。点击项目状态。",
+ projectMenu: "选择已完成。修改项目状态也不会改动其中的任务。",
+ done: "项目状态改成了已完成,这一步不会自动发生。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "プロジェクト · 周年記念オンラインイベント",
+ project: "周年記念オンラインイベント",
+ statusLabel: "ステータス",
+ leadLabel: "リード",
+ progressLabel: "進捗",
+ you: "あなた",
+ descriptionLabel: "説明",
+ description: "10 月 31 日までに周年記念オンラインイベントを実施する:告知投稿、抽選、パートナーとの共同プロモーション。トーンは親しみやすく、費用は承認済みの予算内に収める。",
+ descriptionHint: "このプロジェクトのすべての実行で、コンテキストとしてエージェントに共有されます。",
+ issueStatus: {
+ todo: "未着手",
+ in_progress: "進行中",
+ in_review: "レビュー中",
+ done: "完了",
+ cancelled: "キャンセル済み",
+ } as Record<IssueStatus, string>,
+ projectStatus: {
+ planned: "計画中",
+ in_progress: "進行中",
+ paused: "一時停止",
+ completed: "完了",
+ cancelled: "キャンセル",
+ } as Record<ProjectStatus, string>,
+ issues: {
+ "OPS-41": "イベントのテーマと日程を決める",
+ "OPS-42": "イベント告知の投稿を書く",
+ "OPS-43": "抽選の景品リストを作る",
+ "OPS-44": "パートナーのインフルエンサーに依頼する",
+ } as Record<IssueId, string>,
+ captions: {
+ idle: "4 件のタスクを含むプロジェクト。そのうち 2 件はすでに終わっています。",
+ first: "OPS-42 はレビュー済みです。ステータスをクリックして完了にしてください。",
+ firstMenu: "完了を選んでください。",
+ second: "進捗が 1 段進みました。パートナーとの共同プロモーションは取りやめになったので、OPS-44 をキャンセル済みにしてください。",
+ secondMenu: "キャンセル済みを選んでください。キャンセルは、その作業がプロジェクトの範囲から外れたことを表します。",
+ allDone: "キャンセル済みも進捗に数えるので、プロジェクトは 100% になりました。それでもプロジェクトのステータスは進行中のままで、タスクには連動しません。プロジェクトのステータスをクリックしてください。",
+ projectMenu: "完了を選んでください。プロジェクトのステータスを変えても、タスクは変わりません。",
+ done: "プロジェクトが完了になりました。これは自動では起きません。右上から最初に戻せます。",
+ },
+ },
+ ko: {
+ title: "프로젝트 · 창립 기념 온라인 이벤트",
+ project: "창립 기념 온라인 이벤트",
+ statusLabel: "상태",
+ leadLabel: "리드",
+ progressLabel: "진행률",
+ you: "나",
+ descriptionLabel: "설명",
+ description: "10월 31일까지 창립 기념 온라인 이벤트를 마친다: 이벤트 공지 게시물, 경품 추첨, 파트너 공동 홍보. 말투는 친근하게 유지하고 비용은 승인된 예산을 넘지 않는다.",
+ descriptionHint: "이 프로젝트의 모든 실행에서 컨텍스트로 에이전트에게 공유됩니다.",
+ issueStatus: {
+ todo: "할 일",
+ in_progress: "진행 중",
+ in_review: "리뷰 중",
+ done: "완료",
+ cancelled: "취소됨",
+ } as Record<IssueStatus, string>,
+ projectStatus: {
+ planned: "계획됨",
+ in_progress: "진행 중",
+ paused: "일시 중지",
+ completed: "완료됨",
+ cancelled: "취소됨",
+ } as Record<ProjectStatus, string>,
+ issues: {
+ "OPS-41": "이벤트 주제와 일정 정하기",
+ "OPS-42": "이벤트 공지 게시물 작성",
+ "OPS-43": "추첨 경품 목록 만들기",
+ "OPS-44": "협업 인플루언서 섭외",
+ } as Record<IssueId, string>,
+ captions: {
+ idle: "태스크 4개가 있는 프로젝트입니다. 그중 2개는 이미 끝났습니다.",
+ first: "OPS-42는 검토를 마쳤습니다. 상태를 클릭해 완료로 바꾸세요.",
+ firstMenu: "완료를 선택하세요.",
+ second: "진행률이 한 칸 올랐습니다. 파트너 공동 홍보는 하지 않기로 했으니 OPS-44를 취소됨으로 바꾸세요.",
+ secondMenu: "취소됨을 선택하세요. 취소는 그 작업이 프로젝트 범위에서 끝났다는 뜻입니다.",
+ allDone: "취소됨도 진행률에 들어가서 프로젝트가 100%가 됐습니다. 그래도 프로젝트 상태는 여전히 진행 중입니다. 태스크를 따라 바뀌지 않습니다. 프로젝트 상태를 클릭하세요.",
+ projectMenu: "완료됨을 선택하세요. 프로젝트 상태를 바꿔도 태스크는 바뀌지 않습니다.",
+ done: "프로젝트가 완료됨이 됐습니다. 이 단계는 자동으로 일어나지 않습니다. 오른쪽 위에서 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Projet · Événement en ligne de l'anniversaire",
+ project: "Événement en ligne de l'anniversaire",
+ statusLabel: "Statut",
+ leadLabel: "Responsable",
+ progressLabel: "Avancement",
+ you: "Vous",
+ descriptionLabel: "Description",
+ description: "Organiser l'événement en ligne de l'anniversaire d'ici le 31 octobre : la publication d'annonce, le tirage au sort et la promotion avec un partenaire. Garder un ton chaleureux ; ne pas dépasser le budget validé.",
+ descriptionHint: "Partagé avec les agents comme contexte à chaque exécution dans ce projet.",
+ issueStatus: {
+ todo: "À faire",
+ in_progress: "En cours",
+ in_review: "En relecture",
+ done: "Terminé",
+ cancelled: "Annulé",
+ } as Record<IssueStatus, string>,
+ projectStatus: {
+ planned: "Planifié",
+ in_progress: "En cours",
+ paused: "En pause",
+ completed: "Terminé",
+ cancelled: "Annulé",
+ } as Record<ProjectStatus, string>,
+ issues: {
+ "OPS-41": "Choisir le thème et les dates de l'événement",
+ "OPS-42": "Rédiger la publication d'annonce",
+ "OPS-43": "Lister les lots du tirage au sort",
+ "OPS-44": "Contacter un influenceur partenaire",
+ } as Record<IssueId, string>,
+ captions: {
+ idle: "Un projet de quatre tâches, dont deux sont déjà closes.",
+ first: "OPS-42 a été relue. Cliquez sur son statut et passez-la à Terminé.",
+ firstMenu: "Choisissez Terminé.",
+ second: "L'avancement a progressé d'un cran. La promotion avec le partenaire n'aura pas lieu : passez OPS-44 à Annulé.",
+ secondMenu: "Choisissez Annulé. Une tâche annulée est sortie du périmètre du projet.",
+ allDone: "Annulé compte aussi dans l'avancement : le projet est à 100 %. Son propre statut reste En cours, car il ne suit pas les tâches. Cliquez sur le statut du projet.",
+ projectMenu: "Choisissez Terminé. Changer le statut du projet ne touche à aucune tâche non plus.",
+ done: "Le projet est maintenant Terminé ; cela n'arrive jamais tout seul. Relancez la démo pour la revoir.",
+ },
+ },
+};
+
+type Phase = "idle" | "first" | "firstMenu" | "second" | "secondMenu" | "allDone" | "projectMenu" | "done";
+
+const INITIAL: Record<IssueId, IssueStatus> = {
+ "OPS-41": "done",
+ "OPS-42": "in_review",
+ "OPS-43": "done",
+ "OPS-44": "todo",
+};
+
+// Which issue each phase works on, and the status its menu accepts.
+const SCRIPT: Partial<Record<Phase, { issue: IssueId; to: IssueStatus; menu: boolean }>> = {
+ first: { issue: "OPS-42", to: "done", menu: false },
+ firstMenu: { issue: "OPS-42", to: "done", menu: true },
+ second: { issue: "OPS-44", to: "cancelled", menu: false },
+ secondMenu: { issue: "OPS-44", to: "cancelled", menu: true },
+};
+
+export function ProjectDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("first");
+ const [statuses, setStatuses] = useState(INITIAL);
+ const [projectStatus, setProjectStatus] = useState<ProjectStatus>("in_progress");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const ids = Object.keys(statuses) as IssueId[];
+ const done = ids.filter((id) => finished(statuses[id])).length;
+ const percent = Math.round((done / ids.length) * 100);
+ const step = visible ? SCRIPT[phase] : undefined;
+
+ const toggleMenu = () => {
+ if (phase === "first") setPhase("firstMenu");
+ else if (phase === "firstMenu") setPhase("first");
+ else if (phase === "second") setPhase("secondMenu");
+ else if (phase === "secondMenu") setPhase("second");
+ };
+
+ const pickIssue = (id: IssueId, to: IssueStatus) => {
+ setStatuses((current) => ({ ...current, [id]: to }));
+ setPhase(id === "OPS-42" ? "second" : "allDone");
+ };
+
+ const replay = () => {
+ setPhase("first");
+ setStatuses(INITIAL);
+ setProjectStatus("in_progress");
+ };
+
+ const projectMenuOpen = phase === "projectMenu";
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-96 flex-col gap-3 p-4">
+ <div className="flex items-center gap-2">
+ <FolderKanban aria-hidden className="size-4 text-muted-foreground" />
+ <span className="text-body font-medium">{t.project}</span>
+ </div>
+
+ <dl className="grid grid-cols-[auto_1fr] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="relative">
+ <CoachMark active={visible && phase === "allDone"} side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={projectMenuOpen}
+ disabled={!visible || (phase !== "allDone" && phase !== "projectMenu")}
+ onClick={() => setPhase(projectMenuOpen ? "allDone" : "projectMenu")}
+ className="-mx-1.5 inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <span key={projectStatus} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.projectStatus[projectStatus]}
+ </span>
+ {(phase === "allDone" || projectMenuOpen) && (
+ <ChevronDown aria-hidden className="size-3.5 text-muted-foreground" />
+ )}
+ </button>
+ </CoachMark>
+ {projectMenuOpen && (
+ <div
+ role="listbox"
+ aria-label={t.statusLabel}
+ className="absolute top-full left-0 z-10 mt-1 w-40 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {PROJECT_MENU.map((s) => (
+ <CoachMark quiet key={s} active={s === "completed"} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="option"
+ aria-selected={s === projectStatus}
+ disabled={s !== "completed"}
+ onClick={() => {
+ setProjectStatus("completed");
+ setPhase("done");
+ }}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-body hover:bg-accent disabled:opacity-45 disabled:hover:bg-transparent"
+ >
+ <span className="min-w-0 flex-1 truncate">{t.projectStatus[s]}</span>
+ {s === projectStatus && <span className="text-caption text-muted-foreground">✓</span>}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ )}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.leadLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <DemoAvatar name={t.you} />
+ {t.you}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.progressLabel}</dt>
+ <dd className="flex min-w-0 items-center gap-2">
+ <span
+ role="progressbar"
+ aria-label={t.progressLabel}
+ aria-valuenow={percent}
+ aria-valuemin={0}
+ aria-valuemax={100}
+ className="h-1.5 w-full max-w-40 overflow-hidden rounded-full bg-muted"
+ >
+ <span
+ className="block h-full rounded-full bg-success transition-[width] duration-500"
+ style={{ width: `${percent}%` }}
+ />
+ </span>
+ <span key={done} className="shrink-0 text-caption tabular-nums text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ {done}/{ids.length} · {percent}%
+ </span>
+ </dd>
+ </dl>
+
+ <ul className="rounded-lg border bg-background">
+ {ids.map((id) => {
+ const s = statuses[id];
+ const active = step?.issue === id;
+ const menuOpen = active && step.menu;
+ return (
+ <li key={id} className="relative m-0 flex min-h-10 items-center gap-2 border-b px-3 py-1.5 last:border-b-0">
+ <span className="w-14 shrink-0 text-caption tabular-nums text-muted-foreground">{id}</span>
+ <span
+ className={cn(
+ "min-w-0 flex-1 truncate text-body",
+ s === "cancelled" && "text-muted-foreground line-through",
+ )}
+ >
+ {t.issues[id]}
+ </span>
+ <CoachMark quiet active={active && !step.menu} ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={menuOpen}
+ disabled={!active}
+ onClick={toggleMenu}
+ className="inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md px-1.5 text-caption hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-2.5 rounded-full border-2", issueDot[s])} />
+ <span key={s} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.issueStatus[s]}
+ </span>
+ {active && <ChevronDown aria-hidden className="size-3 text-muted-foreground" />}
+ </button>
+ </CoachMark>
+ {menuOpen && (
+ <div
+ role="listbox"
+ aria-label={t.statusLabel}
+ className={cn(
+ "absolute right-2 z-10 w-36 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in",
+ // The last row opens upward so the menu stays inside the frame.
+ id === ids[ids.length - 1] ? "bottom-full mb-1" : "top-full mt-1",
+ )}
+ >
+ {ISSUE_MENU.map((option) => (
+ <CoachMark quiet key={option} active={option === step.to} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="option"
+ aria-selected={option === s}
+ disabled={option !== step.to}
+ onClick={() => pickIssue(id, option)}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-body hover:bg-accent disabled:opacity-45 disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-3 shrink-0 rounded-full border-2", issueDot[option])} />
+ <span className="min-w-0 flex-1 truncate">{t.issueStatus[option]}</span>
+ {option === s && <span className="text-caption text-muted-foreground">✓</span>}
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ )}
+ </li>
+ );
+ })}
+ </ul>
+
+ <div className="rounded-lg bg-muted/40 px-3 py-2">
+ <div className="text-caption text-muted-foreground">{t.descriptionLabel}</div>
+ <p className="mt-0.5 text-caption">{t.description}</p>
+ <p className="mt-1 text-micro text-muted-foreground">{t.descriptionHint}</p>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/provider-picker-demo.tsx b/apps/docs/components/demos/provider-picker-demo.tsx
new file mode 100644
index 0000000000..ac9b5a3fc4
--- /dev/null
+++ b/apps/docs/components/demos/provider-picker-demo.tsx
@@ -0,0 +1,241 @@
+"use client";
+
+import { useState } from "react";
+import { Check, Cpu, History, Plug } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Need = "resume" | "mcp" | "model";
+
+const NEEDS: Need[] = ["resume", "mcp", "model"];
+
+const needIcon: Record<Need, typeof History> = { resume: History, mcp: Plug, model: Cpu };
+
+// Capabilities as the code declares them: resume — the backend resumes a stored
+// session (server/pkg/agent/<provider>.go); mcp — providerSupportsMcpConfig
+// (packages/core/agents/mcp-support.ts); model — ModelSelectionSupported
+// (server/pkg/agent/models.go). Keep in step with the table on the providers page.
+const TOOLS: { name: string; resume: boolean; mcp: boolean; model: boolean }[] = [
+ { name: "Antigravity", resume: true, mcp: false, model: true },
+ { name: "Claude Code", resume: true, mcp: true, model: true },
+ { name: "CodeBuddy", resume: true, mcp: true, model: true },
+ { name: "CodeArts", resume: true, mcp: true, model: true },
+ { name: "Codex", resume: true, mcp: true, model: true },
+ { name: "GitHub Copilot CLI", resume: true, mcp: false, model: true },
+ { name: "Cursor Agent", resume: true, mcp: true, model: true },
+ { name: "DeepSeek Harness", resume: true, mcp: true, model: true },
+ { name: "DevEco Code", resume: true, mcp: false, model: true },
+ { name: "Grok", resume: true, mcp: true, model: true },
+ { name: "Hermes", resume: true, mcp: true, model: true },
+ { name: "Kimi CLI", resume: true, mcp: true, model: true },
+ { name: "Kiro CLI", resume: true, mcp: true, model: true },
+ { name: "MiniMax Code", resume: false, mcp: true, model: false },
+ { name: "Muse Code", resume: true, mcp: false, model: true },
+ { name: "OpenClaw", resume: true, mcp: true, model: true },
+ { name: "OpenCode", resume: true, mcp: true, model: true },
+ { name: "Pi", resume: true, mcp: true, model: true },
+ { name: "Oh-My-Pi", resume: true, mcp: true, model: true },
+ { name: "Qoder CLI", resume: true, mcp: true, model: true },
+ { name: "Qoder CN CLI", resume: true, mcp: true, model: true },
+ { name: "Qwen Code", resume: true, mcp: true, model: true },
+ { name: "QwenPaw", resume: true, mcp: true, model: false },
+ { name: "Reasonix", resume: true, mcp: true, model: true },
+ { name: "Trae CLI", resume: true, mcp: true, model: true },
+ { name: "Dim", resume: true, mcp: true, model: true },
+ { name: "ZeroClaw", resume: true, mcp: false, model: false },
+];
+
+const copy = {
+ en: {
+ title: "Filter AI coding tools by what you need",
+ needsLabel: "I need",
+ needs: {
+ resume: "Session resumption",
+ mcp: "Multica-managed MCP",
+ model: "Model picked in Multica",
+ } as Record<Need, string>,
+ toolsLabel: "Tools",
+ matching: (n: number, total: number) => `Matching tools: ${n} of ${total}`,
+ captions: {
+ idle: "Each tool supports a different mix of these three things.",
+ start: "Click what you need. You can pick more than one.",
+ picked: (n: number) => `${n} tools meet every need you picked. Click a need again to drop it.`,
+ none: "No tool meets all of these. Drop one and look again.",
+ },
+ },
+ zh: {
+ title: "按需求筛选 AI 编程工具",
+ needsLabel: "我需要",
+ needs: {
+ resume: "会话恢复",
+ mcp: "Multica 管理 MCP",
+ model: "在 Multica 选模型",
+ } as Record<Need, string>,
+ toolsLabel: "工具",
+ matching: (n: number, total: number) => `符合的工具 ${n} 个(共 ${total} 个)`,
+ captions: {
+ idle: "这三项能力,每个工具支持的组合都不一样。",
+ start: "点选你需要的能力,可以多选。",
+ picked: (n: number) => `${n} 个工具满足你选的全部需求。再点一次可以取消。`,
+ none: "没有工具同时满足这些需求,去掉一项再看。",
+ },
+ },
+ ja: {
+ title: "必要な機能で AI コーディングツールを絞り込む",
+ needsLabel: "必要なもの",
+ needs: {
+ resume: "セッション再開",
+ mcp: "Multica による MCP 管理",
+ model: "Multica でのモデル選択",
+ } as Record<Need, string>,
+ toolsLabel: "ツール",
+ matching: (n: number, total: number) => `条件に合うツール: ${n} 個(全 ${total} 個)`,
+ captions: {
+ idle: "この 3 つの機能の組み合わせは、ツールごとに異なります。",
+ start: "必要なものをクリックします。複数選べます。",
+ picked: (n: number) => `選んだ条件をすべて満たすツールは ${n} 個です。もう一度クリックすると外せます。`,
+ none: "すべてを満たすツールはありません。条件を 1 つ外して見直してください。",
+ },
+ },
+ ko: {
+ title: "필요한 기능으로 AI 코딩 도구 고르기",
+ needsLabel: "필요한 기능",
+ needs: {
+ resume: "세션 복원",
+ mcp: "Multica의 MCP 관리",
+ model: "Multica에서 모델 선택",
+ } as Record<Need, string>,
+ toolsLabel: "도구",
+ matching: (n: number, total: number) => `조건에 맞는 도구 ${n}개 (전체 ${total}개)`,
+ captions: {
+ idle: "이 세 가지 기능의 조합은 도구마다 다릅니다.",
+ start: "필요한 기능을 클릭하세요. 여러 개를 고를 수 있습니다.",
+ picked: (n: number) => `고른 조건을 모두 만족하는 도구는 ${n}개입니다. 다시 클릭하면 해제됩니다.`,
+ none: "모든 조건을 만족하는 도구가 없습니다. 하나를 빼고 다시 보세요.",
+ },
+ },
+ fr: {
+ title: "Filtrer les outils de codage IA selon vos besoins",
+ needsLabel: "J'ai besoin de",
+ needs: {
+ resume: "Reprise de session",
+ mcp: "MCP géré par Multica",
+ model: "Modèle choisi dans Multica",
+ } as Record<Need, string>,
+ toolsLabel: "Outils",
+ matching: (n: number, total: number) => `Outils correspondants : ${n} sur ${total}`,
+ captions: {
+ idle: "Chaque outil prend en charge une combinaison différente de ces trois points.",
+ start: "Cliquez sur ce dont vous avez besoin. Plusieurs choix sont possibles.",
+ picked: (n: number) =>
+ `${n} outils répondent à tous les besoins choisis. Cliquez de nouveau sur un besoin pour le retirer.`,
+ none: "Aucun outil ne répond à tous ces besoins. Retirez-en un et regardez de nouveau.",
+ },
+ },
+};
+
+export function ProviderPickerDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [picked, setPicked] = useState<Need[]>([]);
+
+ const toggle = (need: Need) =>
+ setPicked((current) => (current.includes(need) ? current.filter((n) => n !== need) : [...current, need]));
+
+ const matches = (tool: (typeof TOOLS)[number]) => picked.every((need) => tool[need]);
+ const count = TOOLS.filter(matches).length;
+ const caption = !visible
+ ? t.captions.idle
+ : picked.length === 0
+ ? t.captions.start
+ : count === 0
+ ? t.captions.none
+ : t.captions.picked(count);
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={() => setPicked([])}>
+ <div className="flex flex-col gap-3 p-4">
+ <div className="min-w-0">
+ <div id="provider-picker-needs" className="mb-1.5 text-micro text-muted-foreground">
+ {t.needsLabel}
+ </div>
+ <div role="group" aria-labelledby="provider-picker-needs" className="flex flex-wrap gap-1.5">
+ {NEEDS.map((need, i) => {
+ const Icon = needIcon[need];
+ const on = picked.includes(need);
+ return (
+ <CoachMark
+ key={need}
+ active={visible && picked.length === 0 && i === 0}
+ quiet
+ ringClassName="rounded-md"
+ >
+ <button
+ type="button"
+ aria-pressed={on}
+ disabled={!visible}
+ onClick={() => toggle(need)}
+ className={cn(
+ "inline-flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-body transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
+ on ? "border-brand bg-brand/10 font-medium" : "bg-background hover:bg-muted",
+ )}
+ >
+ <Icon aria-hidden className={cn("size-3.5 shrink-0", on ? "text-brand" : "text-muted-foreground")} />
+ {t.needs[need]}
+ {on && <Check aria-hidden className="size-3.5 shrink-0 text-brand" />}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ </div>
+
+ <div className="flex items-baseline justify-between gap-2 border-t pt-3">
+ <span id="provider-picker-tools" className="text-micro text-muted-foreground">
+ {t.toolsLabel}
+ </span>
+ <span key={count} className="text-label font-medium motion-safe:animate-in motion-safe:fade-in">
+ {t.matching(count, TOOLS.length)}
+ </span>
+ </div>
+
+ <ul aria-labelledby="provider-picker-tools" className="m-0 grid list-none grid-cols-2 gap-1.5 p-0 sm:grid-cols-3">
+ {TOOLS.map((tool) => {
+ const hit = matches(tool);
+ const highlighted = hit && picked.length > 0;
+ return (
+ <li
+ key={tool.name}
+ className={cn(
+ "m-0 flex min-w-0 items-center gap-1.5 rounded-md border px-2 py-1.5 transition-[opacity,background-color,border-color] duration-200",
+ highlighted ? "border-brand/50 bg-brand/7 dark:bg-brand/12" : "bg-background",
+ !hit && "opacity-35",
+ )}
+ >
+ <span className={cn("min-w-0 flex-1 truncate text-caption", highlighted && "font-medium")}>
+ {tool.name}
+ </span>
+ <span className="flex shrink-0 items-center gap-0.5">
+ {NEEDS.filter((need) => tool[need]).map((need) => {
+ const Icon = needIcon[need];
+ return (
+ <Icon
+ key={need}
+ role="img"
+ aria-label={t.needs[need]}
+ className={cn(
+ "size-3",
+ picked.includes(need) ? "text-brand" : "text-muted-foreground/70",
+ )}
+ />
+ );
+ })}
+ </span>
+ </li>
+ );
+ })}
+ </ul>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/quick-action-demo.tsx b/apps/docs/components/demos/quick-action-demo.tsx
new file mode 100644
index 0000000000..7bcdc72d70
--- /dev/null
+++ b/apps/docs/components/demos/quick-action-demo.tsx
@@ -0,0 +1,411 @@
+"use client";
+
+import { useState } from "react";
+import { ChevronRight, CircleCheck, Loader2, Zap } from "lucide-react";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoSendButton,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Action = { name: string; agent: string; description: string };
+
+const copy = {
+ en: {
+ title: "OPS-31 · Prepare the November customer appreciation event",
+ you: "You",
+ assigneeLabel: "Assignee",
+ assignee: "Lei Li",
+ earlier: {
+ author: "Lei Li",
+ body: "The venue and catering are booked. The guest list is still missing 20 people from marketing.",
+ },
+ section: "Quick Actions",
+ actions: [
+ { name: "Weekly-meeting update", agent: "Ops helper", description: "Sum up progress for the weekly meeting" },
+ { name: "Draft an invitation", agent: "Writing helper", description: "Write a guest invitation" },
+ ] as Action[],
+ note: "/note",
+ noteDescription: "Add a note — won't trigger any agents",
+ prompt:
+ "Turn this issue's progress so far into a weekly-meeting update: what's done, what's in progress and what needs help, a few lines each. Reply here.",
+ slash: "/ Quick action",
+ willStart: "Will start when sent",
+ send: "Send",
+ started: (name: string) => `${name} started working`,
+ running: "Running",
+ completed: "Completed",
+ steps: ["Read the issue description and discussion", "Collect what's done and what's open", "Write the update"],
+ reply:
+ "Weekly-meeting update. Done: venue and catering booked. In progress: guest list. Needs help: marketing still owes 20 names.",
+ captions: {
+ idle: "An issue with a discussion already under way.",
+ start:
+ "Type / in the comment box to pick a saved action. Or click an action in the sidebar: it posts right away.",
+ pick: "These are the workspace's quick actions. Pick Weekly-meeting update.",
+ draft:
+ "The saved request is in the draft, with @Ops helper in front of it. You can still edit it. Click send.",
+ runningDraft: "Sent as your comment. Ops helper starts working on it.",
+ runningSidebar: "The sidebar action posted the request at once, without a draft. Ops helper starts working on it.",
+ done: "Done. The assignee and the status did not change. Use Replay to try the other entry point.",
+ },
+ },
+ zh: {
+ title: "OPS-31 · 筹备 11 月客户答谢会",
+ you: "你",
+ assigneeLabel: "负责人",
+ assignee: "李雷",
+ earlier: {
+ author: "李雷",
+ body: "场地和餐饮已经订好,邀请名单还差市场部的 20 人。",
+ },
+ section: "快捷操作",
+ actions: [
+ { name: "整理成周会汇报", agent: "运营助手", description: "把进展整理成周会汇报" },
+ { name: "起草邀请函", agent: "文案助手", description: "给来宾写一封邀请函" },
+ ] as Action[],
+ note: "/note",
+ noteDescription: "添加备注——不触发任何智能体",
+ prompt: "把这条任务目前的进展整理成周会汇报:已完成、进行中、需要协调的事项各列几条,回复在这里。",
+ slash: "/ 快捷操作",
+ willStart: "发送后开始",
+ send: "发送",
+ started: (name: string) => `${name} 已开始处理`,
+ running: "运行中",
+ completed: "已完成",
+ steps: ["读取任务描述和讨论", "汇总已完成和未完成的事项", "写成周会汇报"],
+ reply: "周会汇报:已完成,场地和餐饮已订好;进行中,邀请名单;需要协调,市场部还差 20 人的名单。",
+ captions: {
+ idle: "一条已经有讨论的任务。",
+ start: "在评论框输入 / 选择保存好的操作。也可以直接点侧栏里的操作,它会立刻发布。",
+ pick: "这里列出工作区的快捷操作。选择\"整理成周会汇报\"。",
+ draft: "保存好的请求连同 @运营助手 放进了草稿,发送前还能修改。点击发送。",
+ runningDraft: "已作为你的评论发布,运营助手开始处理。",
+ runningSidebar: "侧栏里的操作不经过草稿,点击后立即发布,运营助手开始处理。",
+ done: "处理完成,负责人和状态都没有变。点右上角可以换另一个入口再试。",
+ },
+ },
+ ja: {
+ title: "OPS-31 · 11 月の顧客感謝イベントを準備する",
+ you: "あなた",
+ assigneeLabel: "担当者",
+ assignee: "李雷",
+ earlier: {
+ author: "李雷",
+ body: "会場とケータリングは予約済みです。招待リストはマーケティング部の 20 人分がまだ足りません。",
+ },
+ section: "クイックアクション",
+ actions: [
+ {
+ name: "週次ミーティング用にまとめる",
+ agent: "運用アシスタント",
+ description: "進捗を週次ミーティングの報告にまとめる",
+ },
+ { name: "招待状を下書き", agent: "ライティングアシスタント", description: "来賓向けの招待状を書く" },
+ ] as Action[],
+ note: "/note",
+ noteDescription: "メモを追加 — エージェントをトリガーしません",
+ prompt:
+ "このタスクのこれまでの進捗を週次ミーティングの報告にまとめてください。完了したこと、進行中のこと、調整が必要なことをそれぞれ数行で。返信はここにお願いします。",
+ slash: "/ クイックアクション",
+ willStart: "送信後に作業を開始します",
+ send: "送信",
+ started: (name: string) => `${name} が作業を開始しました`,
+ running: "実行中",
+ completed: "完了",
+ steps: ["タスクの説明とコメントを読む", "完了した項目と残っている項目を集める", "報告を書く"],
+ reply:
+ "週次報告です。完了:会場とケータリングの予約。進行中:招待リスト。要調整:マーケティング部の 20 人分の名前がまだ届いていません。",
+ captions: {
+ idle: "すでにコメントのやり取りが進んでいるタスクです。",
+ start:
+ "コメント欄に / を入力すると、保存済みのアクションを選べます。サイドバーのアクションをクリックした場合は、その場で投稿されます。",
+ pick: "ワークスペースのクイックアクションが並んでいます。「週次ミーティング用にまとめる」を選びます。",
+ draft:
+ "保存済みの依頼が @運用アシスタント 付きで下書きに入りました。送信前に編集できます。送信をクリックします。",
+ runningDraft: "あなたのコメントとして投稿され、運用アシスタントが作業を始めます。",
+ runningSidebar: "サイドバーのアクションは下書きを経由せず、すぐに依頼を投稿しました。運用アシスタントが作業を始めます。",
+ done: "完了しました。担当者もステータスも変わっていません。「もう一度」で別の入口も試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-31 · 11월 고객 감사 행사 준비",
+ you: "나",
+ assigneeLabel: "담당자",
+ assignee: "리레이",
+ earlier: {
+ author: "리레이",
+ body: "장소와 케이터링은 예약했습니다. 초대 명단에는 아직 마케팅팀 20명이 빠져 있어요.",
+ },
+ section: "퀵 액션",
+ actions: [
+ { name: "주간 회의 보고로 정리", agent: "운영 도우미", description: "진행 상황을 주간 회의 보고로 정리" },
+ { name: "초대장 초안 작성", agent: "글쓰기 도우미", description: "손님에게 보낼 초대장 작성" },
+ ] as Action[],
+ note: "/note",
+ noteDescription: "메모 추가 — 에이전트를 트리거하지 않음",
+ prompt:
+ "이 태스크의 지금까지 진행 상황을 주간 회의 보고로 정리해 주세요. 완료된 일, 진행 중인 일, 조율이 필요한 일을 각각 몇 줄씩 쓰고, 답변은 여기에 남겨 주세요.",
+ slash: "/ 퀵 액션",
+ willStart: "전송 후 작업을 시작합니다",
+ send: "보내기",
+ started: (name: string) => `${name}이(가) 작업을 시작했습니다`,
+ running: "실행 중",
+ completed: "완료됨",
+ steps: ["태스크 설명과 댓글 읽기", "완료된 일과 남은 일 정리", "보고 작성"],
+ reply:
+ "주간 회의 보고입니다. 완료: 장소와 케이터링 예약. 진행 중: 초대 명단. 조율 필요: 마케팅팀 20명의 명단이 아직 없습니다.",
+ captions: {
+ idle: "이미 댓글로 논의가 진행 중인 태스크입니다.",
+ start: "댓글 입력란에 / 를 입력하면 저장된 액션을 고를 수 있습니다. 사이드바의 액션을 클릭하면 바로 게시됩니다.",
+ pick: "워크스페이스의 퀵 액션 목록입니다. '주간 회의 보고로 정리'를 선택하세요.",
+ draft: "저장된 요청이 @운영 도우미와 함께 초안에 들어갔습니다. 보내기 전에 고칠 수 있습니다. 보내기를 클릭하세요.",
+ runningDraft: "내 댓글로 게시되었고, 운영 도우미가 작업을 시작합니다.",
+ runningSidebar: "사이드바의 액션은 초안 없이 바로 요청을 게시했습니다. 운영 도우미가 작업을 시작합니다.",
+ done: "완료되었습니다. 담당자와 상태는 바뀌지 않았습니다. '다시 보기'로 다른 진입점도 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-31 · Préparer l'événement clients de novembre",
+ you: "Vous",
+ assigneeLabel: "Assigné à",
+ assignee: "Lei Li",
+ earlier: {
+ author: "Lei Li",
+ body: "Le lieu et le traiteur sont réservés. Il manque encore 20 personnes du marketing sur la liste des invités.",
+ },
+ section: "Actions rapides",
+ actions: [
+ {
+ name: "Point pour la réunion hebdo",
+ agent: "Assistant ops",
+ description: "Résumer l'avancement pour la réunion hebdo",
+ },
+ { name: "Rédiger une invitation", agent: "Assistant rédaction", description: "Écrire une invitation pour les invités" },
+ ] as Action[],
+ note: "/note",
+ noteDescription: "Ajouter une note — ne déclenchera aucun agent",
+ prompt:
+ "Faites le point sur l'avancement de cette tâche pour la réunion hebdo : ce qui est fait, ce qui est en cours et ce qui demande de l'aide, quelques lignes chacun. Répondez ici.",
+ slash: "/ Action rapide",
+ willStart: "Démarrera à l'envoi",
+ send: "Envoyer",
+ started: (name: string) => `${name} a commencé à travailler`,
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire la description et la discussion de la tâche",
+ "Rassembler ce qui est fait et ce qui reste",
+ "Rédiger le point",
+ ],
+ reply:
+ "Point pour la réunion hebdo. Fait : lieu et traiteur réservés. En cours : liste des invités. Besoin d'aide : le marketing doit encore fournir 20 noms.",
+ captions: {
+ idle: "Une tâche dont la discussion a déjà commencé.",
+ start:
+ "Tapez / dans la zone de commentaire pour choisir une action enregistrée. Ou cliquez sur une action dans la barre latérale : elle est publiée aussitôt.",
+ pick: "Voici les actions rapides de l'espace de travail. Choisissez « Point pour la réunion hebdo ».",
+ draft:
+ "La demande enregistrée est dans le brouillon, précédée de @Assistant ops. Vous pouvez encore la modifier. Cliquez sur envoyer.",
+ runningDraft: "Publiée comme votre commentaire. Assistant ops commence à la traiter.",
+ runningSidebar:
+ "L'action de la barre latérale a publié la demande aussitôt, sans brouillon. Assistant ops commence à la traiter.",
+ done: "Terminé. Ni l'assigné ni le statut n'ont changé. Utilisez Rejouer pour essayer l'autre point d'entrée.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "pick" | "draft" | "runningDraft" | "runningSidebar" | "done";
+
+export function QuickActionDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+ const [posting, setPosting] = useState(false);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const action = t.actions[0]!;
+ const posted = phase === "runningDraft" || phase === "runningSidebar" || phase === "done";
+ const runActive = phase !== "done";
+
+ const startRun = () => {
+ t.steps.forEach((_, i) => after(600 + i * 1000, () => setStepsShown(i + 1)));
+ after(600 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const send = () => {
+ setPhase("runningDraft");
+ startRun();
+ };
+
+ const runFromSidebar = () => {
+ setPosting(true);
+ after(500, () => {
+ setPosting(false);
+ setPhase("runningSidebar");
+ startRun();
+ });
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ setPosting(false);
+ setStepsShown(0);
+ };
+
+ const mention = <span className="font-medium text-brand">@{action.agent}</span>;
+ const requestBody = (
+ <>
+ {mention}
+ <span className="mt-1 block">{t.prompt}</span>
+ </>
+ );
+
+ const sidebar = (
+ <div className="sm:w-44 sm:shrink-0">
+ <div className="mb-1 flex items-center gap-1 px-2 py-1 text-caption font-medium">
+ {t.section}
+ <ChevronRight aria-hidden className="size-3 rotate-90 text-muted-foreground" />
+ </div>
+ <div className="flex flex-col gap-0.5 pl-2">
+ {t.actions.map((item, i) => (
+ <button
+ key={item.name}
+ type="button"
+ disabled={!visible || phase !== "start" || posting || i !== 0}
+ onClick={runFromSidebar}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent/70 disabled:cursor-default disabled:hover:bg-transparent"
+ >
+ {posting && i === 0 ? (
+ <Loader2 aria-hidden className="size-3.5 shrink-0 text-muted-foreground motion-safe:animate-spin" />
+ ) : (
+ <Zap aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />
+ )}
+ <span className="min-w-0 flex-1 truncate">{item.name}</span>
+ <DemoAvatar name={item.agent} agent />
+ </button>
+ ))}
+ </div>
+ </div>
+ );
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-80 flex-col gap-4 p-4 sm:flex-row-reverse">
+ {sidebar}
+
+ <div className="flex min-w-0 flex-1 flex-col gap-3">
+ <div className="flex items-center gap-2 text-caption text-muted-foreground">
+ <span>{t.assigneeLabel}</span>
+ <DemoAvatar name={t.assignee} />
+ <span className="text-label text-foreground">{t.assignee}</span>
+ </div>
+
+ <DemoComment author={t.earlier.author}>{t.earlier.body}</DemoComment>
+
+ {posted && (
+ <>
+ <DemoComment author={t.you}>{requestBody}</DemoComment>
+ <DemoRun agent={action.agent} status={runActive ? t.running : t.completed} active={runActive}>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && runActive ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ </>
+ )}
+
+ {phase === "done" && (
+ <DemoComment author={action.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ <div className="relative mt-auto rounded-lg border bg-background p-2">
+ {phase === "pick" && (
+ <div
+ role="listbox"
+ aria-label={t.section}
+ className="absolute bottom-full left-2 z-10 mb-1 w-64 max-w-[calc(100%-1rem)] rounded-md border bg-popover py-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {[...t.actions.map((a) => ({ label: `/${a.name}`, description: a.description })), { label: t.note, description: t.noteDescription }].map(
+ (item, i) => (
+ <CoachMark
+ quiet
+ key={item.label}
+ active={i === 0}
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={false}
+ disabled={i !== 0}
+ onClick={() => setPhase("draft")}
+ className="flex w-full flex-col gap-0.5 px-3 py-1.5 text-left text-caption hover:bg-accent disabled:opacity-50 disabled:hover:bg-transparent"
+ >
+ <span className="font-medium">{item.label}</span>
+ <span className="truncate text-muted-foreground">{item.description}</span>
+ </button>
+ </CoachMark>
+ ),
+ )}
+ </div>
+ )}
+
+ <div className="min-h-12 px-1 text-body">
+ {visible && (phase === "start" || phase === "pick") && (
+ <CoachMark active={phase === "start"} side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ disabled={phase !== "start"}
+ onClick={() => setPhase("pick")}
+ className="rounded-md border border-dashed border-brand/50 px-1.5 text-label font-medium text-brand hover:bg-brand/7 disabled:opacity-70"
+ >
+ {t.slash}
+ </button>
+ </CoachMark>
+ )}
+ {phase === "draft" && <div className="motion-safe:animate-in motion-safe:fade-in">{requestBody}</div>}
+ </div>
+
+ <div className="mt-1.5 flex items-center gap-2">
+ {phase === "draft" && (
+ <span className="inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md bg-muted px-1.5 text-caption motion-safe:animate-in motion-safe:fade-in">
+ <DemoAvatar name={action.agent} agent />
+ <span className="truncate">{action.agent}</span>
+ <span className="text-muted-foreground">· {t.willStart}</span>
+ </span>
+ )}
+ <span className="ml-auto" />
+ <CoachMark active={phase === "draft"} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={phase !== "draft"} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+
+ {phase === "runningSidebar" && (
+ <div
+ className="absolute right-4 bottom-4 z-20 flex items-center gap-2 rounded-lg border bg-popover px-3 py-2 text-caption text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2"
+ >
+ <CircleCheck aria-hidden className="size-3.5 text-success" />
+ {t.started(action.agent)}
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/resolve-thread-demo.tsx b/apps/docs/components/demos/resolve-thread-demo.tsx
new file mode 100644
index 0000000000..95901fc2b1
--- /dev/null
+++ b/apps/docs/components/demos/resolve-thread-demo.tsx
@@ -0,0 +1,413 @@
+"use client";
+
+import { type ReactNode, useState } from "react";
+import { CheckCircle2, ChevronRight, Copy, ListChevronsDownUp, MoreHorizontal } from "lucide-react";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Entry = { author: string; agent: boolean; body: string };
+
+const copy = {
+ en: {
+ title: "OPS-21 · Pick the venue for the annual party",
+ root: {
+ author: "Lei Li",
+ agent: false,
+ body: "Which venue should we book? The options are the Riverside Expo Center and the Westside Hotel.",
+ } as Entry,
+ replies: [
+ {
+ author: "Ops helper",
+ agent: true,
+ body: "I compared both: Riverside seats 300. Westside is 20% cheaper but seats at most 200.",
+ },
+ { author: "Lei Li", agent: false, body: "260 people have signed up already, so Westside is too small." },
+ {
+ author: "Ops helper",
+ agent: true,
+ body: "Then book the Riverside Expo Center: it fits all 260 and costs 12,000 more than Westside.",
+ },
+ ] as Entry[],
+ moreActions: "Comment actions",
+ resolveThread: "Resolve thread",
+ resolveWithComment: "Resolve thread with comment",
+ copyAction: "Copy",
+ resolution: "Resolution",
+ collapse: "Collapse",
+ // Mirrors comment.resolve.bar / fold, with the author list the product builds.
+ bar: (count: number, authors: string) => `${count} resolved comments from ${authors}`,
+ fold: (count: number, authors: string) => `${count} comments from ${authors}`,
+ captions: {
+ idle: "A thread that has reached a decision.",
+ start:
+ "The thread has its answer. Open the menu on the first comment to resolve the whole thread, or open the last reply's menu to mark it as the resolution.",
+ rootMenu: "Choose Resolve thread.",
+ replyMenu: "Choose Resolve thread with comment: this reply becomes the thread's resolution.",
+ rootResolved: "The whole thread folded into one line. Click it to read the thread again.",
+ rootExpanded:
+ "Nothing was lost. Collapse folds it again, and replying in the thread reopens it. Use Replay to try the other way.",
+ replyResolved:
+ "The first comment and the resolution stay visible, and the replies in between fold away. A thread keeps only one resolution at a time.",
+ replyExpanded:
+ "The resolution keeps its place in the thread, marked Resolution. Use Replay to try the other way.",
+ },
+ },
+ zh: {
+ title: "OPS-21 · 确定年会场地",
+ root: {
+ author: "李雷",
+ agent: false,
+ body: "年会场地定哪家?备选是滨江会展中心和城西酒店。",
+ } as Entry,
+ replies: [
+ {
+ author: "运营助手",
+ agent: true,
+ body: "两家都问过了:滨江能坐 300 人;城西报价低两成,但最多坐 200 人。",
+ },
+ { author: "李雷", agent: false, body: "报名已经 260 人了,城西坐不下。" },
+ {
+ author: "运营助手",
+ agent: true,
+ body: "那就定滨江会展中心:坐得下 260 人,比城西多花 1.2 万元。",
+ },
+ ] as Entry[],
+ moreActions: "评论操作",
+ resolveThread: "解决该讨论",
+ resolveWithComment: "以此评论解决讨论",
+ copyAction: "复制",
+ resolution: "结论",
+ collapse: "收起",
+ bar: (count: number, authors: string) => `来自 ${authors} 的 ${count} 条已解决评论`,
+ fold: (count: number, authors: string) => `来自 ${authors} 的 ${count} 条评论`,
+ captions: {
+ idle: "一条已经有结论的讨论。",
+ start:
+ "讨论有了答案。打开第一条评论的菜单可以解决整条讨论;打开最后一条回复的菜单,可以把它设为结论。",
+ rootMenu: "选择\"解决该讨论\"。",
+ replyMenu: "选择\"以此评论解决讨论\",这条回复会成为讨论的结论。",
+ rootResolved: "整条讨论折叠成了一行。点它可以重新展开。",
+ rootExpanded: "内容都还在。点\"收起\"再折叠;在讨论里继续回复会自动重新打开它。点右上角可以换另一种方式再试。",
+ replyResolved: "第一条评论和结论留在原处,中间的回复折叠起来。一条讨论同时只保留一个结论。",
+ replyExpanded: "结论留在原来的位置,带着\"结论\"标记。点右上角可以换另一种方式再试。",
+ },
+ },
+ ja: {
+ title: "OPS-21 · 年次パーティーの会場を決める",
+ root: {
+ author: "李雷",
+ agent: false,
+ body: "パーティー会場はどちらにしますか?候補はリバーサイド展示センターとウエストサイドホテルです。",
+ } as Entry,
+ replies: [
+ {
+ author: "運用アシスタント",
+ agent: true,
+ body: "両方に問い合わせました。リバーサイドは 300 人まで入れます。ウエストサイドは 2 割安いものの、最大 200 人です。",
+ },
+ { author: "李雷", agent: false, body: "申し込みがもう 260 人なので、ウエストサイドでは入りきりません。" },
+ {
+ author: "運用アシスタント",
+ agent: true,
+ body: "それならリバーサイド展示センターにしましょう。260 人が入り、費用はウエストサイドより 12,000 多くかかります。",
+ },
+ ] as Entry[],
+ moreActions: "コメントの操作",
+ resolveThread: "スレッドを解決",
+ resolveWithComment: "このコメントでスレッドを解決",
+ copyAction: "コピー",
+ resolution: "解決",
+ collapse: "折りたたむ",
+ bar: (count: number, authors: string) => `${authors} による解決済みコメント ${count} 件`,
+ fold: (count: number, authors: string) => `${authors} のコメント ${count} 件`,
+ captions: {
+ idle: "結論が出たスレッドです。",
+ start:
+ "スレッドに答えが出ました。最初のコメントのメニューからはスレッド全体を解決できます。最後の返信のメニューからは、その返信をスレッドの解決にできます。",
+ rootMenu: "「スレッドを解決」を選びます。",
+ replyMenu: "「このコメントでスレッドを解決」を選びます。この返信がスレッドの解決になります。",
+ rootResolved: "スレッド全体が 1 行に折りたたまれました。クリックすると読み返せます。",
+ rootExpanded:
+ "内容はそのまま残っています。「折りたたむ」でまた畳め、スレッドに返信すると自動で開き直されます。「もう一度」で別の方法も試せます。",
+ replyResolved:
+ "最初のコメントと解決はそのまま表示され、間の返信が折りたたまれます。1 つのスレッドに残る解決は常に 1 つだけです。",
+ replyExpanded: "解決はスレッド内の元の位置に「解決」の印付きで残ります。「もう一度」で別の方法も試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-21 · 연례 파티 장소 정하기",
+ root: {
+ author: "리레이",
+ agent: false,
+ body: "파티 장소는 어디로 할까요? 후보는 리버사이드 전시센터와 웨스트사이드 호텔입니다.",
+ } as Entry,
+ replies: [
+ {
+ author: "운영 도우미",
+ agent: true,
+ body: "두 곳 다 알아봤습니다. 리버사이드는 300명까지 앉을 수 있고, 웨스트사이드는 20% 저렴하지만 최대 200명입니다.",
+ },
+ { author: "리레이", agent: false, body: "벌써 260명이 신청해서 웨스트사이드는 자리가 모자라요." },
+ {
+ author: "운영 도우미",
+ agent: true,
+ body: "그럼 리버사이드 전시센터로 하죠. 260명이 모두 앉을 수 있고, 비용은 웨스트사이드보다 12,000 더 듭니다.",
+ },
+ ] as Entry[],
+ moreActions: "댓글 작업",
+ resolveThread: "스레드 해결",
+ resolveWithComment: "이 댓글로 스레드 해결",
+ copyAction: "복사",
+ resolution: "해결",
+ collapse: "접기",
+ bar: (count: number, authors: string) => `${authors}님의 해결된 댓글 ${count}개`,
+ fold: (count: number, authors: string) => `${authors}님의 댓글 ${count}개`,
+ captions: {
+ idle: "결론이 난 스레드입니다.",
+ start:
+ "스레드에 답이 나왔습니다. 첫 댓글의 메뉴에서는 스레드 전체를 해결할 수 있고, 마지막 답글의 메뉴에서는 그 답글을 스레드의 해결로 지정할 수 있습니다.",
+ rootMenu: "'스레드 해결'을 선택하세요.",
+ replyMenu: "'이 댓글로 스레드 해결'을 선택하세요. 이 답글이 스레드의 해결이 됩니다.",
+ rootResolved: "스레드 전체가 한 줄로 접혔습니다. 클릭하면 다시 읽을 수 있습니다.",
+ rootExpanded:
+ "내용은 그대로 남아 있습니다. '접기'로 다시 접을 수 있고, 스레드에 답글을 달면 자동으로 다시 열립니다. '다시 보기'로 다른 방법도 해 보세요.",
+ replyResolved: "첫 댓글과 해결은 그대로 보이고, 그 사이의 답글은 접힙니다. 한 스레드에는 해결이 하나만 남습니다.",
+ replyExpanded: "해결은 스레드 안 원래 자리에 '해결' 표시와 함께 남습니다. '다시 보기'로 다른 방법도 해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-21 · Choisir le lieu de la soirée annuelle",
+ root: {
+ author: "Lei Li",
+ agent: false,
+ body: "Quel lieu réserve-t-on ? Les options sont le Riverside Expo Center et l'hôtel Westside.",
+ } as Entry,
+ replies: [
+ {
+ author: "Assistant ops",
+ agent: true,
+ body: "J'ai comparé les deux : le Riverside accueille 300 personnes. Le Westside est 20 % moins cher, mais 200 places au maximum.",
+ },
+ { author: "Lei Li", agent: false, body: "260 personnes sont déjà inscrites, le Westside est trop petit." },
+ {
+ author: "Assistant ops",
+ agent: true,
+ body: "Alors réservons le Riverside Expo Center : il accueille les 260 personnes et coûte 12 000 de plus que le Westside.",
+ },
+ ] as Entry[],
+ moreActions: "Actions du commentaire",
+ resolveThread: "Résoudre le fil",
+ resolveWithComment: "Résoudre le fil avec un commentaire",
+ copyAction: "Copier",
+ resolution: "Résolution",
+ collapse: "Replier",
+ bar: (count: number, authors: string) => `${count} commentaires résolus de ${authors}`,
+ fold: (count: number, authors: string) => `${count} commentaires de ${authors}`,
+ captions: {
+ idle: "Un fil qui a abouti à une décision.",
+ start:
+ "Le fil a sa réponse. Ouvrez le menu du premier commentaire pour résoudre tout le fil, ou celui de la dernière réponse pour en faire la résolution.",
+ rootMenu: "Choisissez « Résoudre le fil ».",
+ replyMenu: "Choisissez « Résoudre le fil avec un commentaire » : cette réponse devient la résolution du fil.",
+ rootResolved: "Tout le fil tient maintenant sur une ligne. Cliquez dessus pour le relire.",
+ rootExpanded:
+ "Rien n'est perdu. « Replier » le referme, et répondre dans le fil le rouvre. Utilisez Rejouer pour essayer l'autre méthode.",
+ replyResolved:
+ "Le premier commentaire et la résolution restent visibles, les réponses intermédiaires sont repliées. Un fil ne garde qu'une résolution à la fois.",
+ replyExpanded:
+ "La résolution garde sa place dans le fil, marquée « Résolution ». Utilisez Rejouer pour essayer l'autre méthode.",
+ },
+ },
+};
+
+type Phase =
+ | "idle"
+ | "start"
+ | "rootMenu"
+ | "replyMenu"
+ | "rootResolved"
+ | "rootExpanded"
+ | "replyResolved"
+ | "replyExpanded";
+
+// Distinct authors in first-seen order, joined the way the product's resolved
+// bars name them (two names fit, so no "and N others" here).
+function authorsOf(entries: Entry[]): string {
+ return [...new Set(entries.map((e) => e.author))].join(", ");
+}
+
+export function ResolveThreadDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const replay = () => setPhase("start");
+
+ const lastIndex = t.replies.length - 1;
+ const resolution = t.replies[lastIndex]!;
+ const folded = t.replies.slice(0, lastIndex);
+ const replyMode = phase === "replyResolved" || phase === "replyExpanded";
+
+ const menu = (items: { label: string; onClick?: () => void }[]) => (
+ <div
+ role="menu"
+ aria-label={t.moreActions}
+ className="absolute top-full right-0 z-10 mt-1 w-52 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {items.map((item) => {
+ const Icon = item.onClick ? CheckCircle2 : Copy;
+ const row = (
+ <button
+ type="button"
+ role="menuitem"
+ disabled={!item.onClick}
+ onClick={item.onClick}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:opacity-50 disabled:hover:bg-transparent"
+ >
+ <Icon aria-hidden className="size-3.5 shrink-0" />
+ {item.label}
+ </button>
+ );
+ return item.onClick ? (
+ <CoachMark quiet
+ key={item.label}
+ active
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ {row}
+ </CoachMark>
+ ) : (
+ <div key={item.label}>{row}</div>
+ );
+ })}
+ </div>
+ );
+
+ const menuButton = (open: boolean, onClick: () => void, coach: boolean) => (
+ <CoachMark active={coach} side="left" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-label={t.moreActions}
+ aria-haspopup="menu"
+ aria-expanded={open}
+ disabled={!visible}
+ onClick={onClick}
+ className="inline-flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-muted"
+ >
+ <MoreHorizontal aria-hidden className="size-4" />
+ </button>
+ </CoachMark>
+ );
+
+ const rootActions =
+ phase === "start" || phase === "rootMenu" ? (
+ <div className="relative">
+ {menuButton(phase === "rootMenu", () => setPhase(phase === "rootMenu" ? "start" : "rootMenu"), shownPhase === "start")}
+ {phase === "rootMenu" &&
+ menu([
+ { label: t.resolveThread, onClick: () => setPhase("rootResolved") },
+ { label: t.copyAction },
+ ])}
+ </div>
+ ) : null;
+
+ const resolutionActions =
+ phase === "start" || phase === "replyMenu" ? (
+ <div className="relative">
+ {menuButton(phase === "replyMenu", () => setPhase(phase === "replyMenu" ? "start" : "replyMenu"), false)}
+ {phase === "replyMenu" &&
+ menu([
+ { label: t.resolveWithComment, onClick: () => setPhase("replyResolved") },
+ { label: t.copyAction },
+ ])}
+ </div>
+ ) : null;
+
+ const resolutionBadge = replyMode ? (
+ <span className="text-caption font-medium text-success motion-safe:animate-in motion-safe:fade-in">
+ {t.resolution}
+ </span>
+ ) : null;
+
+ const thread = (
+ <div className="overflow-hidden rounded-lg border bg-background motion-safe:animate-in motion-safe:fade-in">
+ {(phase === "rootExpanded" || phase === "replyExpanded") && (
+ <button
+ type="button"
+ onClick={() => setPhase(phase === "rootExpanded" ? "rootResolved" : "replyResolved")}
+ className="flex w-full items-center gap-2.5 border-b border-border/50 bg-muted px-3 py-2 text-left text-body text-muted-foreground hover:bg-accent hover:text-accent-foreground"
+ >
+ <ListChevronsDownUp aria-hidden className="size-3.5" />
+ {t.collapse}
+ </button>
+ )}
+ <ThreadEntry entry={t.root} actions={rootActions} />
+ <div className="flex flex-col gap-1 pb-2 pl-7">
+ {phase === "replyResolved" ? (
+ <>
+ <CoachMark active side="bottom" align="end" className="flex w-full pr-3" ringClassName="rounded-md">
+ <button
+ type="button"
+ onClick={() => setPhase("replyExpanded")}
+ className="flex w-full items-center gap-2.5 rounded-md bg-muted/45 px-3 py-2 text-left text-body text-muted-foreground hover:bg-muted"
+ >
+ <ChevronRight aria-hidden className="size-3.5 shrink-0 rotate-90" />
+ <span className="truncate">{t.fold(folded.length, authorsOf(folded))}</span>
+ </button>
+ </CoachMark>
+ <ThreadEntry entry={resolution} badge={resolutionBadge} />
+ </>
+ ) : (
+ t.replies.map((reply, i) => (
+ <ThreadEntry
+ key={reply.body}
+ entry={reply}
+ badge={i === lastIndex ? resolutionBadge : null}
+ actions={i === lastIndex ? resolutionActions : null}
+ />
+ ))
+ )}
+ </div>
+ </div>
+ );
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-80 flex-col gap-3 p-4">
+ {phase === "rootResolved" ? (
+ <CoachMark active side="bottom" align="start" className="mt-1 flex w-full" ringClassName="rounded-lg">
+ <button
+ type="button"
+ onClick={() => setPhase("rootExpanded")}
+ className="flex w-full items-center justify-between gap-2 rounded-lg border bg-background px-3 py-3 text-left hover:bg-muted/50 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <span className="flex min-w-0 items-center gap-2.5 text-body text-muted-foreground">
+ <CheckCircle2 aria-hidden className="size-4 shrink-0" />
+ <span className="truncate">{t.bar(1 + t.replies.length, authorsOf([t.root, ...t.replies]))}</span>
+ </span>
+ <ChevronRight aria-hidden className="size-3.5 shrink-0 rotate-90 text-muted-foreground" />
+ </button>
+ </CoachMark>
+ ) : (
+ thread
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
+
+function ThreadEntry({ entry, badge, actions }: { entry: Entry; badge?: ReactNode; actions?: ReactNode }) {
+ return (
+ <div className="min-w-0 px-3 py-2">
+ <div className="flex min-h-6 items-center gap-2">
+ <DemoAvatar name={entry.author} agent={entry.agent} />
+ <span className="truncate text-label font-medium">{entry.author}</span>
+ {badge}
+ <span className="ml-auto" />
+ {actions}
+ </div>
+ <div className="mt-0.5 pl-7 text-body break-words">{entry.body}</div>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/roles-demo.tsx b/apps/docs/components/demos/roles-demo.tsx
new file mode 100644
index 0000000000..3133ec7810
--- /dev/null
+++ b/apps/docs/components/demos/roles-demo.tsx
@@ -0,0 +1,435 @@
+"use client";
+
+import { useState } from "react";
+import { Check, Crown, Minus, MoreHorizontal, Plus, Shield, User, UserMinus } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import { CoachMark, DemoAvatar, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Role = "owner" | "admin" | "member";
+
+const ROLES: Role[] = ["owner", "admin", "member"];
+
+// Mirrors the role matrix on the members & roles page and the server checks in
+// server/internal/handler/workspace.go and invitation.go.
+const CAN: Role[][] = [
+ ["owner", "admin", "member"],
+ ["owner", "admin"],
+ ["owner", "admin"],
+ ["owner", "admin"],
+ ["owner"],
+ ["owner"],
+];
+
+const ROLE_ICONS = { owner: Crown, admin: Shield, member: User } as const;
+
+const copy = {
+ en: {
+ title: "Settings · Members",
+ yourRole: "Your role",
+ roles: {
+ owner: { label: "Owner", description: "Full access, manage all settings" },
+ admin: { label: "Admin", description: "Manage members and settings" },
+ member: { label: "Member", description: "Create and work on issues" },
+ } as Record<Role, { label: string; description: string }>,
+ canDo: "What this role can do",
+ abilities: [
+ "View the workspace and take part in everyday work",
+ "Change workspace settings",
+ "Invite an admin or member",
+ "Change or remove an admin or member",
+ "Grant, revoke or remove owner",
+ "Delete the workspace",
+ ],
+ members: "Members",
+ invite: "Invite member",
+ readOnlyTitle: "View only",
+ readOnlyBody: "Only workspace owners and admins can change these settings.",
+ you: "You",
+ people: { owner: "Meimei Han", other: "Lei Li" },
+ actions: (name: string) => `${name} actions`,
+ changeRole: "Change role",
+ remove: "Remove from workspace",
+ roleUpdated: "Role updated",
+ captions: {
+ idle: "The members page as a member sees it.",
+ member: "A member creates issues and comments like everyone else, but can only view the settings. Click Admin.",
+ admin: "An admin also changes settings, invites people and manages members. Meimei Han is an owner, so her row has no menu. Open the menu next to Lei Li.",
+ menu: "An admin can move people between admin and member only, so Owner is not in the list. Pick Admin.",
+ changed: "The change takes effect right away. Click Owner to see what only an owner can do.",
+ owner: "An owner can also grant and revoke owner and delete the workspace. A workspace always keeps at least one owner. Switch roles to compare, or use Replay.",
+ },
+ },
+ zh: {
+ title: "设置 · 成员",
+ yourRole: "你的角色",
+ roles: {
+ owner: { label: "所有者", description: "完全访问权限,可管理所有设置" },
+ admin: { label: "管理员", description: "管理成员与设置" },
+ member: { label: "成员", description: "创建并处理任务" },
+ } as Record<Role, { label: string; description: string }>,
+ canDo: "这个角色能做的事",
+ abilities: [
+ "查看工作区并参与日常协作",
+ "修改工作区设置",
+ "邀请 admin 或 member",
+ "调整或移除 admin、member",
+ "授予、收回或移除 owner",
+ "删除工作区",
+ ],
+ members: "成员",
+ invite: "邀请成员",
+ readOnlyTitle: "你只能查看此页",
+ readOnlyBody: "只有工作区所有者和管理员可以修改这些设置。",
+ you: "你",
+ people: { owner: "韩梅梅", other: "李雷" },
+ actions: (name: string) => `${name} 的操作`,
+ changeRole: "更改角色",
+ remove: "从工作区移除",
+ roleUpdated: "已更新角色",
+ captions: {
+ idle: "以成员身份打开的成员页。",
+ member: "成员和其他人一样创建任务、发表评论,但设置只能查看。点击管理员。",
+ admin: "管理员多了修改设置、邀请和管理成员的权限。韩梅梅是所有者,她那一行没有操作菜单。打开李雷旁边的菜单。",
+ menu: "管理员只能在管理员和成员之间调整,列表里没有所有者。选择管理员。",
+ changed: "角色立即生效。点击所有者,看看只有 owner 能做的事。",
+ owner: "所有者还能授予、收回 owner,也能删除工作区;工作区至少要保留一位所有者。可以切换角色再对比,或点右上角重新演示。",
+ },
+ },
+ ja: {
+ title: "設定 · メンバー",
+ yourRole: "あなたのロール",
+ roles: {
+ owner: { label: "オーナー", description: "フルアクセス、すべての設定を管理" },
+ admin: { label: "管理者", description: "メンバーと設定を管理" },
+ member: { label: "メンバー", description: "タスクの作成と作業" },
+ } as Record<Role, { label: string; description: string }>,
+ canDo: "このロールでできること",
+ abilities: [
+ "ワークスペースの閲覧と日常のコラボレーション",
+ "ワークスペース設定の変更",
+ "admin または member の招待",
+ "admin、member の変更・削除",
+ "owner の付与・剥奪・削除",
+ "ワークスペースの削除",
+ ],
+ members: "メンバー",
+ invite: "メンバーを招待",
+ readOnlyTitle: "閲覧のみ",
+ readOnlyBody: "これらの設定を変更できるのはワークスペースのオーナーと管理者だけです。",
+ you: "あなた",
+ people: { owner: "韓梅梅", other: "李雷" },
+ actions: (name: string) => `${name} の操作`,
+ changeRole: "ロールを変更",
+ remove: "ワークスペースから削除",
+ roleUpdated: "ロールを更新しました",
+ captions: {
+ idle: "メンバーの立場で開いたメンバーページ。",
+ member: "メンバーもほかの人と同じようにタスクを作り、コメントできますが、設定は閲覧だけです。管理者をクリックしてください。",
+ admin: "管理者は設定の変更、招待、メンバー管理もできます。韓梅梅はオーナーなので、その行には操作メニューがありません。李雷の横のメニューを開いてください。",
+ menu: "管理者が切り替えられるのは管理者とメンバーの間だけなので、一覧にオーナーはありません。管理者を選んでください。",
+ changed: "変更はすぐに反映されます。オーナーをクリックして、オーナーだけができることを見てみましょう。",
+ owner: "オーナーは owner の付与・剥奪やワークスペースの削除もできます。ワークスペースには常に 1 人以上のオーナーが必要です。ロールを切り替えて比べるか、右上から最初に戻せます。",
+ },
+ },
+ ko: {
+ title: "설정 · 멤버",
+ yourRole: "내 역할",
+ roles: {
+ owner: { label: "소유자", description: "전체 접근 권한, 모든 설정 관리" },
+ admin: { label: "관리자", description: "멤버와 설정 관리" },
+ member: { label: "멤버", description: "태스크 생성 및 작업" },
+ } as Record<Role, { label: string; description: string }>,
+ canDo: "이 역할로 할 수 있는 일",
+ abilities: [
+ "워크스페이스를 보고 일상적인 협업에 참여",
+ "워크스페이스 설정 변경",
+ "admin 또는 member 초대",
+ "admin, member의 역할 변경 또는 제거",
+ "owner 부여, 회수 또는 제거",
+ "워크스페이스 삭제",
+ ],
+ members: "멤버",
+ invite: "멤버 초대",
+ readOnlyTitle: "보기 전용",
+ readOnlyBody: "이 설정은 워크스페이스 소유자와 관리자만 변경할 수 있습니다.",
+ you: "나",
+ people: { owner: "한메이메이", other: "리레이" },
+ actions: (name: string) => `${name} 작업`,
+ changeRole: "역할 변경",
+ remove: "워크스페이스에서 제거",
+ roleUpdated: "역할을 업데이트했습니다",
+ captions: {
+ idle: "멤버로 연 멤버 페이지입니다.",
+ member: "멤버도 다른 사람처럼 태스크를 만들고 댓글을 달 수 있지만, 설정은 보기만 할 수 있습니다. 관리자를 클릭하세요.",
+ admin: "관리자는 설정 변경, 초대, 멤버 관리까지 할 수 있습니다. 한메이메이는 소유자라서 그 행에는 작업 메뉴가 없습니다. 리레이 옆의 메뉴를 여세요.",
+ menu: "관리자는 관리자와 멤버 사이에서만 바꿀 수 있어 목록에 소유자가 없습니다. 관리자를 선택하세요.",
+ changed: "변경은 바로 적용됩니다. 소유자를 클릭해 소유자만 할 수 있는 일을 확인하세요.",
+ owner: "소유자는 owner를 부여하거나 회수하고 워크스페이스를 삭제할 수도 있습니다. 워크스페이스에는 항상 소유자가 한 명 이상 있어야 합니다. 역할을 바꿔 가며 비교하거나 오른쪽 위에서 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Paramètres · Membres",
+ yourRole: "Votre rôle",
+ roles: {
+ owner: { label: "Propriétaire", description: "Accès complet, gestion de tous les paramètres" },
+ admin: { label: "Administrateur", description: "Gestion des membres et des paramètres" },
+ member: { label: "Membre", description: "Créer des tâches et y travailler" },
+ } as Record<Role, { label: string; description: string }>,
+ canDo: "Ce que ce rôle permet",
+ abilities: [
+ "Consulter l'espace de travail et collaborer au quotidien",
+ "Modifier les paramètres de l'espace de travail",
+ "Inviter un admin ou un member",
+ "Modifier ou retirer un admin ou un member",
+ "Accorder, révoquer ou retirer le rôle owner",
+ "Supprimer l'espace de travail",
+ ],
+ members: "Membres",
+ invite: "Inviter un membre",
+ readOnlyTitle: "Lecture seule",
+ readOnlyBody: "Seuls les propriétaires et administrateurs de l'espace de travail peuvent modifier ces paramètres.",
+ you: "Vous",
+ people: { owner: "Meimei Han", other: "Lei Li" },
+ actions: (name: string) => `Actions pour ${name}`,
+ changeRole: "Changer de rôle",
+ remove: "Retirer de l'espace de travail",
+ roleUpdated: "Rôle mis à jour",
+ captions: {
+ idle: "La page des membres, vue par un membre.",
+ member: "Un membre crée des tâches et commente comme tout le monde, mais ne peut que consulter les paramètres. Cliquez sur Administrateur.",
+ admin: "Un administrateur peut aussi modifier les paramètres, inviter et gérer les membres. Meimei Han est propriétaire : sa ligne n'a pas de menu. Ouvrez le menu à côté de Lei Li.",
+ menu: "Un administrateur ne passe quelqu'un que d'administrateur à membre et inversement, d'où l'absence de Propriétaire dans la liste. Choisissez Administrateur.",
+ changed: "Le changement s'applique immédiatement. Cliquez sur Propriétaire pour voir ce que lui seul peut faire.",
+ owner: "Un propriétaire peut aussi accorder et révoquer le rôle owner, et supprimer l'espace de travail. Un espace de travail garde toujours au moins un propriétaire. Changez de rôle pour comparer, ou relancez la démo.",
+ },
+ },
+};
+
+type Phase = "idle" | "member" | "admin" | "menu" | "changed" | "owner";
+
+export function RolesDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("member");
+ const [viewer, setViewer] = useState<Role>("member");
+ const [changedFrom, setChangedFrom] = useState<Role | null>(null);
+ const [otherRole, setOtherRole] = useState<Role>("member");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const canManage = viewer === "owner" || viewer === "admin";
+
+ const switchTo = (role: Role) => {
+ setChangedFrom(viewer);
+ setViewer(role);
+ if (phase === "member" && role === "admin") setPhase("admin");
+ if (phase === "changed" && role === "owner") setPhase("owner");
+ };
+
+ const promote = () => {
+ setOtherRole("admin");
+ setChangedFrom(null);
+ setPhase("changed");
+ };
+
+ const replay = () => {
+ setPhase("member");
+ setViewer("member");
+ setChangedFrom(null);
+ setOtherRole("member");
+ };
+
+ // Which role chip the script waits on; once finished every chip is open.
+ const nextRole: Role | null = phase === "member" ? "admin" : phase === "changed" ? "owner" : null;
+ const chipEnabled = (role: Role) => visible && (phase === "owner" || role === nextRole);
+
+ const roster: { key: string; name: string; role: Role; self: boolean }[] = [
+ { key: "owner", name: t.people.owner, role: "owner", self: false },
+ { key: "self", name: t.you, role: viewer, self: true },
+ { key: "other", name: t.people.other, role: otherRole, self: false },
+ ];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-96 flex-col gap-4 p-4">
+ {/* Bottom padding leaves room for the coach label under the role chips. */}
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-2 pb-5">
+ <span className="text-caption text-muted-foreground">{t.yourRole}</span>
+ <div role="radiogroup" aria-label={t.yourRole} className="flex gap-1 rounded-lg bg-muted p-0.5">
+ {ROLES.map((role) => {
+ const Icon = ROLE_ICONS[role];
+ return (
+ <CoachMark
+ key={role}
+ active={visible && role === nextRole}
+ side="bottom"
+ ringClassName="rounded-md"
+ >
+ <button
+ type="button"
+ role="radio"
+ aria-checked={viewer === role}
+ disabled={!chipEnabled(role) && viewer !== role}
+ onClick={() => viewer !== role && switchTo(role)}
+ className={cn(
+ "inline-flex h-7 items-center gap-1.5 rounded-md px-2.5 text-label transition-colors",
+ viewer === role
+ ? "bg-background font-medium text-foreground shadow-sm"
+ : "text-muted-foreground hover:text-foreground disabled:hover:text-muted-foreground",
+ )}
+ >
+ <Icon aria-hidden className="size-3.5" />
+ {t.roles[role].label}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ </div>
+
+ <div className="grid gap-4 md:grid-cols-2">
+ <section className="min-w-0 rounded-lg border bg-background p-3">
+ <div className="flex items-baseline justify-between gap-2">
+ <div className="text-label font-medium">{t.canDo}</div>
+ <code className="text-micro text-muted-foreground">{viewer}</code>
+ </div>
+ <p className="mt-0.5 text-caption text-muted-foreground">{t.roles[viewer].description}</p>
+ <ul className="mt-2 flex flex-col gap-0.5">
+ {t.abilities.map((ability, i) => {
+ const allowed = CAN[i]!.includes(viewer);
+ const changed = changedFrom !== null && CAN[i]!.includes(changedFrom) !== allowed;
+ return (
+ <li
+ key={`${ability}-${viewer}`}
+ className={cn(
+ "m-0 flex items-start gap-2 rounded-md px-1.5 py-1 text-caption",
+ allowed ? "text-foreground" : "text-muted-foreground",
+ changed && allowed && "bg-success/10 motion-safe:animate-in motion-safe:fade-in",
+ )}
+ >
+ {allowed ? (
+ <Check aria-hidden className="mt-px size-3.5 shrink-0 text-success" />
+ ) : (
+ <Minus aria-hidden className="mt-px size-3.5 shrink-0" />
+ )}
+ <span className="min-w-0">{ability}</span>
+ </li>
+ );
+ })}
+ </ul>
+ </section>
+
+ <section className="relative min-w-0 rounded-lg border bg-background">
+ <div className="flex h-11 items-center justify-between gap-2 border-b px-3">
+ <div className="text-label font-medium">{t.members}</div>
+ {canManage && (
+ <Button type="button" size="xs" disabled tabIndex={-1} className="disabled:opacity-100">
+ <Plus />
+ {t.invite}
+ </Button>
+ )}
+ </div>
+ {!canManage && (
+ <div className="border-b bg-muted/40 px-3 py-2">
+ <div className="text-caption font-medium">{t.readOnlyTitle}</div>
+ <div className="text-caption text-muted-foreground">{t.readOnlyBody}</div>
+ </div>
+ )}
+ <ul>
+ {roster.map((person) => {
+ const RoleIcon = ROLE_ICONS[person.role];
+ // Same rule as MemberRow in packages/views/settings/components/members-tab.tsx.
+ const showMenu = canManage && !person.self && (person.role !== "owner" || viewer === "owner");
+ const menuTarget = person.key === "other" && phase === "admin";
+ return (
+ <li key={person.key} className="relative m-0 flex h-11 items-center gap-2 px-3">
+ <DemoAvatar name={person.name} />
+ <span className="min-w-0 flex-1 truncate text-body">{person.name}</span>
+ <span
+ key={person.role}
+ className="flex w-20 shrink-0 items-center gap-1 text-caption motion-safe:animate-in motion-safe:fade-in"
+ >
+ <RoleIcon aria-hidden className="size-3.5 text-muted-foreground" />
+ {t.roles[person.role].label}
+ </span>
+ <span className="flex size-7 shrink-0 items-center justify-center">
+ {showMenu && (
+ <CoachMark active={menuTarget} side="bottom" align="end" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-label={t.actions(person.name)}
+ aria-expanded={person.key === "other" && phase === "menu"}
+ disabled={!menuTarget}
+ onClick={() => setPhase("menu")}
+ className="inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <MoreHorizontal className="size-4" />
+ </button>
+ </CoachMark>
+ )}
+ </span>
+ {person.key === "other" && phase === "menu" && (
+ <div
+ role="menu"
+ aria-label={t.changeRole}
+ className="absolute right-2 bottom-full z-10 mb-1 w-56 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="flex items-center gap-1.5 px-2 pt-1 pb-0.5 text-micro text-muted-foreground">
+ <Shield aria-hidden className="size-3" />
+ {t.changeRole}
+ </div>
+ {(["admin", "member"] as const).map((role) => {
+ const Icon = ROLE_ICONS[role];
+ const current = otherRole === role;
+ return (
+ <CoachMark quiet
+ key={role}
+ active={role === "admin"}
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="menuitem"
+ disabled={role !== "admin"}
+ onClick={promote}
+ className="flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left hover:bg-accent disabled:hover:bg-transparent"
+ >
+ <Icon aria-hidden className="mt-0.5 size-3.5 shrink-0" />
+ <span className="flex min-w-0 flex-1 flex-col">
+ <span className="text-body">{t.roles[role].label}</span>
+ <span className="text-caption text-muted-foreground">
+ {t.roles[role].description}
+ </span>
+ </span>
+ {current && <span className="text-caption text-muted-foreground">✓</span>}
+ </button>
+ </CoachMark>
+ );
+ })}
+ <div className="-mx-1 my-1 h-px bg-border" />
+ <div className="flex items-center gap-2 px-2 py-1.5 text-body text-destructive/60">
+ <UserMinus aria-hidden className="size-3.5" />
+ {t.remove}
+ </div>
+ </div>
+ )}
+ </li>
+ );
+ })}
+ </ul>
+ {/* Holds the coach label under the menu button and the update toast. */}
+ <div className="flex h-9 items-center justify-end border-t px-3">
+ {phase === "changed" && (
+ <span className="flex items-center gap-1.5 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <Check aria-hidden className="size-3.5 text-success" />
+ {t.roleUpdated}
+ </span>
+ )}
+ </div>
+ </section>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/run-lifecycle-demo.tsx b/apps/docs/components/demos/run-lifecycle-demo.tsx
new file mode 100644
index 0000000000..0265670f97
--- /dev/null
+++ b/apps/docs/components/demos/run-lifecycle-demo.tsx
@@ -0,0 +1,537 @@
+"use client";
+
+import { useCallback, useEffect, useRef, useState } from "react";
+import { Ban, CheckCircle2, ChevronRight, Loader2, RotateCcw, Square, XCircle } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type RunStatus = "queued" | "dispatched" | "running" | "completed" | "failed" | "cancelled";
+type IssueStatus = "todo" | "in_progress" | "in_review";
+type Run = { id: number; status: RunStatus; runningSince?: number };
+
+const copy = {
+ en: {
+ title: "OPS-21 · Compare the office-supply quotes from five suppliers",
+ agent: "Ops helper",
+ you: "You",
+ statusLabel: "Status",
+ issueStatus: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<IssueStatus, string>,
+ isWorking: (name: string) => `${name} is working`,
+ isQueued: (name: string) => `${name} is queued`,
+ request: "@Ops helper Put the five suppliers' quotes into one comparison table.",
+ trigger: "@Ops helper Put the five suppliers' quotes into one comparison table.",
+ section: "Execution log",
+ latest: "Latest",
+ runStatus: {
+ queued: "Queued",
+ dispatched: "Starting",
+ running: "Working",
+ completed: "Completed",
+ failed: "Failed",
+ cancelled: "Cancelled",
+ } as Record<RunStatus, string>,
+ failedReason: "Rate limited by provider",
+ cancelledBy: "Cancelled by You",
+ duration: "1m 48s",
+ retry: "Retry run",
+ cancel: "Cancel run",
+ dialogTitle: "Stop this run?",
+ dialogBody: "The run will be cancelled and cannot be resumed. Running work may take a few seconds to fully halt.",
+ keep: "Keep running",
+ stop: "Stop run",
+ reply:
+ "The comparison table is ready: five suppliers side by side on unit price, minimum order and delivery time. Please review.",
+ captions: {
+ idle: "You asked Ops helper in a comment to compare the quotes.",
+ queued: "The comment created a run. It waits in the queue for the runtime to claim it.",
+ dispatched: "The runtime claimed the run and is starting the AI coding tool.",
+ running: "Ops helper is working and moved the issue to In Progress.",
+ failed:
+ "The run failed: the model provider was rate limiting requests. This kind of failure is not retried automatically, so the issue went back to Todo. Click Retry run.",
+ retryQueued: "Retrying created a new run. The failed one stays under Latest.",
+ retryRunning: "The new run is working. To stop it midway, click the stop button; otherwise let it finish.",
+ confirm: "Stopping cancels this run, and it cannot be resumed.",
+ cancelled:
+ "The run was cancelled. Stopping a run does not change the issue status, and a cancelled run can be retried too. Use Replay to start over.",
+ done: "The new run completed and Ops helper moved the issue to In Review. Each attempt kept its own record. Use Replay to try another path.",
+ },
+ },
+ zh: {
+ title: "OPS-21 · 整理五家供应商的办公用品报价",
+ agent: "运营助手",
+ you: "你",
+ statusLabel: "状态",
+ issueStatus: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<IssueStatus, string>,
+ isWorking: (name: string) => `${name} 在工作`,
+ isQueued: (name: string) => `${name} 排队中`,
+ request: "@运营助手 把五家供应商的报价整理成一张对比表。",
+ trigger: "@运营助手 把五家供应商的报价整理成一张对比表。",
+ section: "执行日志",
+ latest: "最近",
+ runStatus: {
+ queued: "排队中",
+ dispatched: "启动中",
+ running: "正在工作",
+ completed: "已完成",
+ failed: "失败",
+ cancelled: "已取消",
+ } as Record<RunStatus, string>,
+ failedReason: "受到提供商速率限制",
+ cancelledBy: "已由 你 取消",
+ duration: "1m 48s",
+ retry: "重试运行",
+ cancel: "取消运行",
+ dialogTitle: "确定停止本次运行?",
+ dialogBody: "本次运行会被取消且无法恢复。进行中的运行可能需要几秒才能完全停止。",
+ keep: "保留运行",
+ stop: "停止运行",
+ reply: "对比表已整理好:五家供应商按单价、起订量和交货周期并排列出,请检查。",
+ captions: {
+ idle: "你在评论里请 运营助手 整理报价。",
+ queued: "评论触发了一次运行,先进入队列,等运行时领取。",
+ dispatched: "运行时已领取,正在启动 AI 编程工具。",
+ running: "运营助手 开始工作,把任务改为进行中。",
+ failed: "运行失败:模型服务限流了。这类失败不会自动重试,任务回到待办。点击重试运行。",
+ retryQueued: "重试创建了一条新的运行,失败的那条留在\"最近\"里。",
+ retryRunning: "新的运行正在工作。想中途停下,可以点停止按钮;不停就等它完成。",
+ confirm: "停止后,这次运行会被取消,无法恢复。",
+ cancelled: "运行已取消。停止运行不会改变任务状态;已取消的运行同样可以重试。点右上角可以重新演示。",
+ done: "新的运行完成,运营助手 把任务改为审核中。两次运行各留一条记录。点右上角可以换一条路径再试。",
+ },
+ },
+ ja: {
+ title: "OPS-21 · 5 社の事務用品の見積もりを比較する",
+ agent: "運用アシスタント",
+ you: "あなた",
+ statusLabel: "ステータス",
+ issueStatus: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<IssueStatus, string>,
+ isWorking: (name: string) => `${name} が作業中`,
+ isQueued: (name: string) => `${name} が待機中`,
+ request: "@運用アシスタント 5 社の見積もりを 1 枚の比較表にまとめてください。",
+ trigger: "@運用アシスタント 5 社の見積もりを 1 枚の比較表にまとめてください。",
+ section: "実行ログ",
+ latest: "最新",
+ runStatus: {
+ queued: "待機中",
+ dispatched: "開始中",
+ running: "作業中",
+ completed: "完了",
+ failed: "失敗",
+ cancelled: "キャンセル済み",
+ } as Record<RunStatus, string>,
+ failedReason: "プロバイダーによるレート制限",
+ cancelledBy: "あなた がキャンセル",
+ duration: "1m 48s",
+ retry: "実行を再試行",
+ cancel: "実行をキャンセル",
+ dialogTitle: "この実行を停止しますか?",
+ dialogBody: "実行はキャンセルされ、再開できません。実行中の処理が完全に停止するまで数秒かかる場合があります。",
+ keep: "実行を続ける",
+ stop: "実行を停止",
+ reply: "比較表ができました。5 社を単価、最小発注数、納期で並べています。確認をお願いします。",
+ captions: {
+ idle: "コメントで 運用アシスタント に見積もりの比較を頼みました。",
+ queued: "コメントから実行が 1 件作られ、ランタイムが受け取るまでキューで待ちます。",
+ dispatched: "ランタイムが実行を受け取り、AI コーディングツールを起動しています。",
+ running: "運用アシスタント が作業を始め、タスクを進行中にしました。",
+ failed:
+ "実行が失敗しました。モデルプロバイダーのレート制限です。この種の失敗は自動では再試行されず、タスクは未着手に戻りました。「実行を再試行」をクリックしてください。",
+ retryQueued: "再試行で新しい実行が作られました。失敗した実行は「最新」に残ります。",
+ retryRunning: "新しい実行が作業中です。途中で止めたいときは停止ボタンを、止めなければ完了を待ちます。",
+ confirm: "停止するとこの実行はキャンセルされ、再開できません。",
+ cancelled:
+ "実行がキャンセルされました。実行を止めてもタスクのステータスは変わらず、キャンセルした実行も再試行できます。「もう一度」で最初から見られます。",
+ done: "新しい実行が完了し、運用アシスタント がタスクをレビュー中にしました。2 回の実行はそれぞれ記録に残ります。「もう一度」で別の流れも試せます。",
+ },
+ },
+ ko: {
+ title: "OPS-21 · 공급업체 다섯 곳의 사무용품 견적 비교",
+ agent: "운영 도우미",
+ you: "나",
+ statusLabel: "상태",
+ issueStatus: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<IssueStatus, string>,
+ isWorking: (name: string) => `${name} 작업 중`,
+ isQueued: (name: string) => `${name} 대기 중`,
+ request: "@운영 도우미 공급업체 다섯 곳의 견적을 비교표 하나로 정리해 주세요.",
+ trigger: "@운영 도우미 공급업체 다섯 곳의 견적을 비교표 하나로 정리해 주세요.",
+ section: "실행 로그",
+ latest: "최근",
+ runStatus: {
+ queued: "대기 중",
+ dispatched: "시작 중",
+ running: "작업 중",
+ completed: "완료됨",
+ failed: "실패함",
+ cancelled: "취소됨",
+ } as Record<RunStatus, string>,
+ failedReason: "공급자 요청 한도에 도달함",
+ cancelledBy: "내가 취소함",
+ duration: "1m 48s",
+ retry: "실행 다시 시도",
+ cancel: "실행 취소",
+ dialogTitle: "이 실행을 중지할까요?",
+ dialogBody: "실행이 취소되며 재개할 수 없습니다. 진행 중인 실행이 완전히 멈추기까지 몇 초가 걸릴 수 있습니다.",
+ keep: "계속 실행",
+ stop: "실행 중지",
+ reply: "비교표를 정리했습니다. 다섯 곳을 단가, 최소 주문량, 납기 기준으로 나란히 놓았으니 확인해 주세요.",
+ captions: {
+ idle: "댓글로 운영 도우미에게 견적 비교를 요청했습니다.",
+ queued: "댓글이 실행을 하나 만들었습니다. 런타임이 가져갈 때까지 대기열에서 기다립니다.",
+ dispatched: "런타임이 실행을 가져가 AI 코딩 도구를 시작하고 있습니다.",
+ running: "운영 도우미가 작업을 시작하고 태스크를 진행 중으로 바꿨습니다.",
+ failed:
+ "실행이 실패했습니다. 모델 공급자가 요청 한도를 걸었습니다. 이런 실패는 자동으로 다시 시도되지 않아 태스크가 할 일로 돌아갔습니다. 실행 다시 시도를 클릭하세요.",
+ retryQueued: "다시 시도하면 새 실행이 만들어집니다. 실패한 실행은 \"최근\"에 남습니다.",
+ retryRunning: "새 실행이 작업 중입니다. 중간에 멈추려면 중지 버튼을 누르고, 아니면 끝날 때까지 기다리세요.",
+ confirm: "중지하면 이 실행은 취소되고 재개할 수 없습니다.",
+ cancelled:
+ "실행이 취소되었습니다. 실행을 중지해도 태스크 상태는 바뀌지 않으며, 취소된 실행도 다시 시도할 수 있습니다. \"다시 보기\"로 처음부터 볼 수 있습니다.",
+ done: "새 실행이 완료되었고 운영 도우미가 태스크를 리뷰 중으로 바꿨습니다. 두 번의 실행이 각각 기록으로 남습니다. \"다시 보기\"로 다른 흐름도 시도해 보세요.",
+ },
+ },
+ fr: {
+ title: "OPS-21 · Comparer les devis de fournitures de cinq fournisseurs",
+ agent: "Assistant ops",
+ you: "Vous",
+ statusLabel: "Statut",
+ issueStatus: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<IssueStatus, string>,
+ isWorking: (name: string) => `${name} travaille`,
+ isQueued: (name: string) => `${name} est en file d'attente`,
+ request: "@Assistant ops Regroupe les devis des cinq fournisseurs dans un seul tableau comparatif.",
+ trigger: "@Assistant ops Regroupe les devis des cinq fournisseurs dans un seul tableau comparatif.",
+ section: "Journal d'exécution",
+ latest: "Récentes",
+ runStatus: {
+ queued: "En file d'attente",
+ dispatched: "Démarrage",
+ running: "Au travail",
+ completed: "Terminée",
+ failed: "En échec",
+ cancelled: "Annulée",
+ } as Record<RunStatus, string>,
+ failedReason: "Limite de requêtes du fournisseur atteinte",
+ cancelledBy: "Annulée par Vous",
+ duration: "1m 48s",
+ retry: "Relancer l'exécution",
+ cancel: "Annuler l'exécution",
+ dialogTitle: "Arrêter cette exécution ?",
+ dialogBody: "L'exécution sera annulée et ne pourra pas être reprise. Le travail en cours peut mettre quelques secondes à s'arrêter complètement.",
+ keep: "Laisser tourner",
+ stop: "Arrêter l'exécution",
+ reply:
+ "Le tableau comparatif est prêt : les cinq fournisseurs côte à côte selon le prix unitaire, la quantité minimale et le délai de livraison. Merci de vérifier.",
+ captions: {
+ idle: "Dans un commentaire, vous avez demandé à Assistant ops de comparer les devis.",
+ queued: "Le commentaire a créé une exécution. Elle attend dans la file qu'un runtime la prenne.",
+ dispatched: "Le runtime a pris l'exécution et démarre l'outil de code IA.",
+ running: "Assistant ops travaille et a passé la tâche à En cours.",
+ failed:
+ "L'exécution a échoué : le fournisseur du modèle limitait les requêtes. Ce type d'échec n'est pas relancé automatiquement, la tâche est donc revenue à À faire. Cliquez sur Relancer l'exécution.",
+ retryQueued: "La relance a créé une nouvelle exécution. Celle en échec reste sous Récentes.",
+ retryRunning: "La nouvelle exécution travaille. Pour l'arrêter en cours de route, cliquez sur le bouton d'arrêt ; sinon, laissez-la finir.",
+ confirm: "Arrêter annule cette exécution, sans possibilité de reprise.",
+ cancelled:
+ "L'exécution est annulée. Arrêter une exécution ne change pas le statut de la tâche, et une exécution annulée peut elle aussi être relancée. Rejouer recommence depuis le début.",
+ done: "La nouvelle exécution est terminée et Assistant ops a passé la tâche à En relecture. Chaque tentative garde sa propre trace. Rejouer permet d'essayer un autre chemin.",
+ },
+ },
+};
+
+type Phase = "idle" | "first" | "failed" | "second" | "confirm" | "cancelled" | "done";
+
+const ACTIVE: RunStatus[] = ["queued", "dispatched", "running"];
+
+const issueDot: Record<IssueStatus, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+const activeTone: Partial<Record<RunStatus, string>> = {
+ queued: "text-warning",
+ dispatched: "text-warning",
+};
+
+export function RunLifecycleDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [cycle, setCycle] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [runs, setRuns] = useState<Run[]>([]);
+ const [issueStatus, setIssueStatus] = useState<IssueStatus>("todo");
+ const [now, setNow] = useState(0);
+ // Index of the next scripted step of the retried run, so closing the stop
+ // dialog with "Keep running" resumes where the script paused.
+ const secondStep = useRef(0);
+
+ const setRun = useCallback((id: number, status: RunStatus) => {
+ setRuns((rs) =>
+ rs.map((r) => (r.id === id ? { ...r, status, runningSince: status === "running" ? Date.now() : r.runningSince } : r)),
+ );
+ }, []);
+
+ // Opening: the first run moves through the queue and fails.
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ setPhase("first");
+ setIssueStatus("todo");
+ setRuns([{ id: 1, status: "queued" }]);
+ after(1400, () => setRun(1, "dispatched"));
+ after(2500, () => {
+ setRun(1, "running");
+ setIssueStatus("in_progress");
+ });
+ after(5500, () => {
+ setRun(1, "failed");
+ setIssueStatus("todo");
+ setPhase("failed");
+ });
+ }, [visible, cycle, after, clear, setRun]);
+
+ const anyRunning = runs.some((r) => r.status === "running");
+ useEffect(() => {
+ if (!anyRunning) return;
+ setNow(Date.now());
+ const id = window.setInterval(() => setNow(Date.now()), 1000);
+ return () => window.clearInterval(id);
+ }, [anyRunning]);
+
+ const secondScript: Array<[number, () => void]> = [
+ [1400, () => setRun(2, "dispatched")],
+ [1100, () => {
+ setRun(2, "running");
+ setIssueStatus("in_progress");
+ }],
+ [6500, () => {
+ setRun(2, "completed");
+ setIssueStatus("in_review");
+ setPhase("done");
+ }],
+ ];
+
+ const playSecond = (from: number) => {
+ const step = secondScript[from];
+ if (!step) return;
+ after(step[0], () => {
+ step[1]();
+ secondStep.current = from + 1;
+ playSecond(from + 1);
+ });
+ };
+
+ const retry = () => {
+ setRuns((rs) => [...rs, { id: 2, status: "queued" }]);
+ setPhase("second");
+ secondStep.current = 0;
+ playSecond(0);
+ };
+
+ const openStop = () => {
+ clear();
+ setPhase("confirm");
+ };
+
+ const keepRunning = () => {
+ setPhase("second");
+ playSecond(secondStep.current);
+ };
+
+ const stopRun = () => {
+ setRun(2, "cancelled");
+ setPhase("cancelled");
+ };
+
+ const replay = () => {
+ clear();
+ secondStep.current = 0;
+ setRuns([]);
+ setIssueStatus("todo");
+ setPhase("idle");
+ setCycle((c) => c + 1);
+ };
+
+ const active = runs.filter((r) => ACTIVE.includes(r.status));
+ const past = runs.filter((r) => !ACTIVE.includes(r.status)).reverse();
+ const second = runs.find((r) => r.id === 2);
+ const first = runs.find((r) => r.id === 1);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ let caption: string = t.captions.idle;
+ if (shownPhase === "first" && first) {
+ caption = first.status === "queued" ? t.captions.queued : first.status === "dispatched" ? t.captions.dispatched : t.captions.running;
+ } else if (shownPhase === "second") {
+ caption = second?.status === "running" ? t.captions.retryRunning : t.captions.retryQueued;
+ } else if (shownPhase !== "idle" && shownPhase !== "first") {
+ caption = t.captions[shownPhase];
+ }
+
+ const liveRun = active[0];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="relative grid min-h-80 gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_15rem]">
+ <div className="flex min-w-0 flex-col gap-3">
+ <div className="flex flex-wrap items-center gap-x-4 gap-y-2">
+ <span className="flex items-center gap-2 text-body">
+ <span className="text-caption text-muted-foreground">{t.statusLabel}</span>
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", issueDot[issueStatus])} />
+ <span key={issueStatus} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.issueStatus[issueStatus]}
+ </span>
+ </span>
+ {liveRun && (
+ <span className="inline-flex h-6 items-center gap-1.5 rounded-full border px-2 text-caption motion-safe:animate-in motion-safe:fade-in">
+ {liveRun.status === "running" ? (
+ <Loader2 aria-hidden className="size-3 text-info motion-safe:animate-spin" />
+ ) : (
+ <span aria-hidden className="size-1.5 rounded-full bg-warning" />
+ )}
+ {liveRun.status === "running" ? t.isWorking(t.agent) : t.isQueued(t.agent)}
+ </span>
+ )}
+ </div>
+ <DemoComment author={t.you}>{t.request}</DemoComment>
+ {phase === "done" && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+ </div>
+
+ <section aria-label={t.section} className="min-w-0 rounded-lg border bg-background p-2 sm:self-start">
+ <div className="mb-1 flex items-center gap-1 px-1">
+ <span className="text-caption font-medium">{t.section}</span>
+ <ChevronRight aria-hidden className="size-3 rotate-90 text-muted-foreground" />
+ {active.length > 0 && (
+ <span className="ml-auto inline-flex items-center gap-1 text-info">
+ <span aria-hidden className="size-1.5 animate-pulse rounded-full bg-info" />
+ <span className="font-mono text-caption tabular-nums">{active.length}</span>
+ </span>
+ )}
+ </div>
+
+ {active.map((run) => (
+ <div
+ key={run.id}
+ className="flex min-w-0 items-center gap-2 rounded-xs px-1 py-1.5 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <DemoAvatar name={t.agent} agent />
+ <span className="min-w-0 flex-1 truncate text-caption text-muted-foreground">{t.trigger}</span>
+ <span className={cn("shrink-0 text-caption tabular-nums", activeTone[run.status] ?? "text-info")}>
+ {run.status === "running"
+ ? `${Math.max(0, Math.round((now - (run.runningSince ?? now)) / 1000))}s`
+ : t.runStatus[run.status]}
+ {run.status === "running" && <span className="sr-only">{t.runStatus.running}</span>}
+ </span>
+ <button
+ type="button"
+ aria-label={t.cancel}
+ title={t.cancel}
+ disabled={run.id !== 2 || phase !== "second"}
+ onClick={openStop}
+ className="flex shrink-0 items-center justify-center rounded-xs p-1 text-destructive transition-colors hover:bg-destructive/10 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
+ >
+ <Square className="size-3.5" />
+ </button>
+ </div>
+ ))}
+
+ {active.length > 0 && past.length > 0 && <div className="my-1.5 border-t border-border/60" />}
+
+ {past.length > 0 && (
+ <>
+ <div className="px-1 pt-1 pb-0.5 text-micro text-muted-foreground">{t.latest}</div>
+ {past.map((run) => (
+ <div
+ key={run.id}
+ className="flex min-w-0 items-start gap-2 rounded-xs px-1 py-1.5 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <span className="mt-1 flex shrink-0">
+ <DemoAvatar name={t.agent} agent />
+ </span>
+ <div className="min-w-0 flex-1">
+ <div className="flex min-h-7 min-w-0 items-center gap-2">
+ <span className="min-w-0 flex-1 truncate text-caption">{t.trigger}</span>
+ <span title={t.runStatus[run.status]} className="flex shrink-0 items-center">
+ {run.status === "completed" && <CheckCircle2 aria-hidden className="size-3.5 text-success" />}
+ {run.status === "failed" && <XCircle aria-hidden className="size-3.5 text-destructive" />}
+ {run.status === "cancelled" && <Ban aria-hidden className="size-3.5 text-muted-foreground" />}
+ <span className="sr-only">{t.runStatus[run.status]}</span>
+ </span>
+ {run.status !== "completed" && (
+ <CoachMark
+ quiet
+ active={shownPhase === "failed" && run.id === 1}
+ ringClassName="rounded-md"
+ >
+ <button
+ type="button"
+ aria-label={t.retry}
+ title={t.retry}
+ disabled={!(phase === "failed" && run.id === 1)}
+ onClick={retry}
+ className="flex items-center justify-center rounded-xs p-1 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent"
+ >
+ <RotateCcw className="size-3.5" />
+ </button>
+ </CoachMark>
+ )}
+ </div>
+ <p className="-mt-1 truncate text-micro text-muted-foreground">
+ {t.agent}
+ <span className="text-faint-foreground"> · </span>
+ {run.status === "failed" ? (
+ <span className="text-destructive">{t.failedReason}</span>
+ ) : run.status === "cancelled" ? (
+ t.cancelledBy
+ ) : (
+ t.duration
+ )}
+ </p>
+ </div>
+ </div>
+ ))}
+ </>
+ )}
+ </section>
+
+ {phase === "confirm" && (
+ <div className="absolute inset-0 z-20 flex items-center justify-center bg-background/60 p-4 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in">
+ <div
+ role="dialog"
+ aria-modal="false"
+ aria-labelledby="run-lifecycle-demo-title"
+ className="w-full max-w-sm rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:zoom-in-95"
+ >
+ <div className="p-4 pb-3">
+ <div id="run-lifecycle-demo-title" className="text-title-sm font-medium">
+ {t.dialogTitle}
+ </div>
+ <div className="mt-1 text-body text-muted-foreground">{t.dialogBody}</div>
+ </div>
+ <div className="flex justify-end gap-2 rounded-b-xl border-t bg-muted/40 px-4 py-3">
+ <Button type="button" variant="outline" size="sm" onClick={keepRunning}>
+ {t.keep}
+ </Button>
+ <Button type="button" variant="destructive" size="sm" onClick={stopRun}>
+ {t.stop}
+ </Button>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/run-path-demo.tsx b/apps/docs/components/demos/run-path-demo.tsx
new file mode 100644
index 0000000000..f4709d739c
--- /dev/null
+++ b/apps/docs/components/demos/run-path-demo.tsx
@@ -0,0 +1,474 @@
+"use client";
+
+import { useState, type ReactNode } from "react";
+import { ArrowRight, Laptop, Loader2 } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+// Run statuses in the order the execution log shows them.
+type RunStatus = "queued" | "dispatched" | "running" | "completed";
+
+const copy = {
+ en: {
+ title: "OPS-31 · Compile this week's customer support FAQ",
+ multicaLane: "Multica",
+ multicaRole: "Records and coordinates",
+ computerLane: "Your computer",
+ computerRole: "Executes",
+ issueTitle: "OPS-31 · Compile this week's customer support FAQ",
+ issueDesc: "Turn the questions that came up again and again in last week's support tickets into an FAQ document.",
+ assigneeLabel: "Assignee",
+ agent: "Ops helper",
+ configLabel: "Configuration used",
+ config: ["Instructions", "Model", "Skills", "Runtime"],
+ executionLog: "Execution log",
+ status: { queued: "Queued", dispatched: "Starting", running: "Working", completed: "Completed" } as Record<RunStatus, string>,
+ toolCount: (n: number) => (n === 1 ? "1 tool" : `${n} tools`),
+ tool: "Claude Code",
+ online: "Online",
+ claimed: "Claimed the OPS-31 run and started Claude Code",
+ actions: [
+ "Read last week's ticket export in the working directory",
+ "Count the questions that came up repeatedly",
+ "Write the FAQ document",
+ ],
+ wroteBack: "Wrote the results back to the issue",
+ reply: "The FAQ is ready: 12 questions grouped by account, orders and refunds. Please review.",
+ stepOf: (n: number, total: number) => `Step ${n} of ${total}`,
+ steps: [
+ "The issue provides the context",
+ "Multica creates a run",
+ "A runtime claims the run",
+ "The AI coding tool executes locally",
+ "Results are written back to the issue",
+ ],
+ next: "Next",
+ captions: {
+ idle: "An issue just assigned to an agent.",
+ steps: [
+ "The issue holds the work description, the discussion, and the assignee; the run uses the agent's instructions, model, skills, and runtime. Click Next.",
+ "The run enters the queue; if no runtime is online, it waits there. Click Next.",
+ "An online runtime on your computer claims the run and invokes the AI coding tool the agent is configured to use. Click Next.",
+ "The tool reads the working directory, runs commands, and produces results; progress streams back to the execution log.",
+ "Results appear in the issue's timeline and execution log. Completed only means this run has ended. Use Replay to watch again.",
+ ],
+ working: "The tool reads the working directory, runs commands, and produces results; progress streams back to the execution log. Click Next.",
+ },
+ },
+ zh: {
+ title: "OPS-31 · 整理本周客服常见问题",
+ multicaLane: "Multica",
+ multicaRole: "记录与协调",
+ computerLane: "你的电脑",
+ computerRole: "负责执行",
+ issueTitle: "OPS-31 · 整理本周客服常见问题",
+ issueDesc: "把上周客服工单里反复出现的问题整理成一份常见问题文档。",
+ assigneeLabel: "负责人",
+ agent: "运营助手",
+ configLabel: "使用的配置",
+ config: ["指令", "模型", "skill", "运行时"],
+ executionLog: "执行日志",
+ status: { queued: "排队中", dispatched: "启动中", running: "正在工作", completed: "已完成" } as Record<RunStatus, string>,
+ toolCount: (n: number) => `${n} 次工具调用`,
+ tool: "Claude Code",
+ online: "在线",
+ claimed: "领取 OPS-31 的运行,启动 Claude Code",
+ actions: ["读取工作目录里的上周工单导出文件", "统计反复出现的问题", "写出常见问题文档"],
+ wroteBack: "把结果写回任务",
+ reply: "常见问题文档已整理好:共 12 个问题,按账号、订单、退款分组,请检查。",
+ stepOf: (n: number, total: number) => `第 ${n} 步,共 ${total} 步`,
+ steps: ["任务提供上下文", "Multica 创建运行", "运行时领取运行", "AI 编程工具在本地执行", "结果写回任务"],
+ next: "下一步",
+ captions: {
+ idle: "一条刚分配给智能体的任务。",
+ steps: [
+ "任务保存工作说明、讨论和负责人;运行会使用智能体的指令、模型、skill 和运行时配置。点下一步。",
+ "运行进入队列;没有在线运行时时,它会在队列中等待。点下一步。",
+ "你电脑上的在线运行时领取运行,调用智能体配置的 AI 编程工具。点下一步。",
+ "工具读取工作目录、运行命令并生成结果,进度实时流回执行日志。",
+ "结果显示在任务的时间线和执行日志中。已完成只表示这一次运行结束。点右上角可以重新演示。",
+ ],
+ working: "工具读取工作目录、运行命令并生成结果,进度实时流回执行日志。点下一步。",
+ },
+ },
+ ja: {
+ title: "OPS-31 · 今週のカスタマーサポートのよくある質問をまとめる",
+ multicaLane: "Multica",
+ multicaRole: "記録と調整",
+ computerLane: "あなたのコンピュータ",
+ computerRole: "実行を担当",
+ issueTitle: "OPS-31 · 今週のカスタマーサポートのよくある質問をまとめる",
+ issueDesc: "先週のサポートチケットで繰り返し出た質問を、よくある質問のドキュメントにまとめる。",
+ assigneeLabel: "担当者",
+ agent: "運用アシスタント",
+ configLabel: "使われる設定",
+ config: ["指示", "モデル", "スキル", "ランタイム"],
+ executionLog: "実行ログ",
+ status: { queued: "待機中", dispatched: "開始中", running: "作業中", completed: "完了" } as Record<RunStatus, string>,
+ toolCount: (n: number) => `ツール ${n} 件`,
+ tool: "Claude Code",
+ online: "オンライン",
+ claimed: "OPS-31 の実行を引き受け、Claude Code を起動",
+ actions: [
+ "作業ディレクトリにある先週のチケットのエクスポートを読む",
+ "繰り返し出た質問を集計する",
+ "よくある質問のドキュメントを書く",
+ ],
+ wroteBack: "結果をタスクに書き戻す",
+ reply: "よくある質問のドキュメントができました。全 12 問を、アカウント、注文、返金に分けています。確認をお願いします。",
+ stepOf: (n: number, total: number) => `ステップ ${n} / ${total}`,
+ steps: [
+ "タスクがコンテキストを提供する",
+ "Multica が実行を作成する",
+ "ランタイムが実行を引き受ける",
+ "AI コーディングツールがローカルで実行する",
+ "結果がタスクに書き戻される",
+ ],
+ next: "次へ",
+ captions: {
+ idle: "エージェントに割り当てたばかりのタスクです。",
+ steps: [
+ "タスクには作業の説明、議論、担当者が保存されています。実行にはエージェントの指示、モデル、スキル、ランタイム設定が使われます。「次へ」をクリックしてください。",
+ "実行はキューに入ります。オンラインのランタイムがなければ、キューで待機します。「次へ」をクリックしてください。",
+ "あなたのコンピュータ上のオンラインのランタイムが実行を引き受け、エージェントに設定された AI コーディングツールを呼び出します。「次へ」をクリックしてください。",
+ "ツールは作業ディレクトリを読み、コマンドを実行して結果を生成します。進捗はリアルタイムで実行ログに流れます。",
+ "結果はタスクのタイムラインと実行ログに表示されます。「完了」は、この 1 回の実行が終わったことを示すだけです。「もう一度」で最初から見られます。",
+ ],
+ working: "ツールは作業ディレクトリを読み、コマンドを実行して結果を生成します。進捗はリアルタイムで実行ログに流れます。「次へ」をクリックしてください。",
+ },
+ },
+ ko: {
+ title: "OPS-31 · 이번 주 고객 지원 자주 묻는 질문 정리",
+ multicaLane: "Multica",
+ multicaRole: "기록과 조율",
+ computerLane: "내 컴퓨터",
+ computerRole: "실행 담당",
+ issueTitle: "OPS-31 · 이번 주 고객 지원 자주 묻는 질문 정리",
+ issueDesc: "지난주 고객 지원 티켓에서 반복해서 나온 질문을 자주 묻는 질문 문서로 정리합니다.",
+ assigneeLabel: "담당자",
+ agent: "운영 도우미",
+ configLabel: "사용하는 설정",
+ config: ["지침", "모델", "스킬", "런타임"],
+ executionLog: "실행 로그",
+ status: { queued: "대기 중", dispatched: "시작 중", running: "작업 중", completed: "완료됨" } as Record<RunStatus, string>,
+ toolCount: (n: number) => `도구 ${n}개`,
+ tool: "Claude Code",
+ online: "온라인",
+ claimed: "OPS-31의 실행을 가져와 Claude Code 시작",
+ actions: [
+ "작업 디렉터리에서 지난주 티켓 내보내기 파일 읽기",
+ "반복해서 나온 질문 집계",
+ "자주 묻는 질문 문서 작성",
+ ],
+ wroteBack: "결과를 태스크에 다시 기록",
+ reply: "자주 묻는 질문 문서를 정리했습니다. 질문 12개를 계정, 주문, 환불로 나눴으니 확인해 주세요.",
+ stepOf: (n: number, total: number) => `${total}단계 중 ${n}단계`,
+ steps: [
+ "태스크가 컨텍스트 제공",
+ "Multica가 실행 생성",
+ "런타임이 실행을 가져감",
+ "AI 코딩 도구가 로컬에서 실행",
+ "결과를 태스크에 기록",
+ ],
+ next: "다음",
+ captions: {
+ idle: "에이전트에게 방금 할당한 태스크입니다.",
+ steps: [
+ "태스크에는 작업 설명, 논의, 담당자가 저장됩니다. 실행에는 에이전트의 지침, 모델, 스킬, 런타임 설정이 사용됩니다. 다음을 클릭하세요.",
+ "실행이 큐에 들어갑니다. 온라인 런타임이 없으면 큐에서 기다립니다. 다음을 클릭하세요.",
+ "내 컴퓨터의 온라인 런타임이 실행을 가져와 에이전트에 설정된 AI 코딩 도구를 호출합니다. 다음을 클릭하세요.",
+ "도구가 작업 디렉터리를 읽고 명령을 실행해 결과를 만듭니다. 진행 상황은 실행 로그로 실시간 전송됩니다.",
+ "결과가 태스크 타임라인과 실행 로그에 표시됩니다. 완료됨은 이번 실행이 끝났다는 뜻일 뿐입니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ ],
+ working: "도구가 작업 디렉터리를 읽고 명령을 실행해 결과를 만듭니다. 진행 상황은 실행 로그로 실시간 전송됩니다. 다음을 클릭하세요.",
+ },
+ },
+ fr: {
+ title: "OPS-31 · Compiler la FAQ du support client de la semaine",
+ multicaLane: "Multica",
+ multicaRole: "Consigne et coordonne",
+ computerLane: "Votre ordinateur",
+ computerRole: "Exécute",
+ issueTitle: "OPS-31 · Compiler la FAQ du support client de la semaine",
+ issueDesc: "Transformer les questions revenues sans cesse dans les tickets de support de la semaine dernière en un document FAQ.",
+ assigneeLabel: "Assigné à",
+ agent: "Assistant ops",
+ configLabel: "Configuration utilisée",
+ config: ["Instructions", "Modèle", "Skills", "Runtime"],
+ executionLog: "Journal d'exécution",
+ status: { queued: "En file d'attente", dispatched: "Démarrage", running: "Au travail", completed: "Terminée" } as Record<RunStatus, string>,
+ toolCount: (n: number) => (n === 1 ? "1 outil" : `${n} outils`),
+ tool: "Claude Code",
+ online: "En ligne",
+ claimed: "A pris en charge l'exécution d'OPS-31 et lancé Claude Code",
+ actions: [
+ "Lire l'export des tickets de la semaine dernière dans le répertoire de travail",
+ "Compter les questions qui reviennent",
+ "Rédiger le document FAQ",
+ ],
+ wroteBack: "A réécrit les résultats dans la tâche",
+ reply: "La FAQ est prête : 12 questions regroupées par compte, commandes et remboursements. Merci de la relire.",
+ stepOf: (n: number, total: number) => `Étape ${n} sur ${total}`,
+ steps: [
+ "La tâche fournit le contexte",
+ "Multica crée une exécution",
+ "Un runtime prend en charge l'exécution",
+ "L'outil de codage IA s'exécute localement",
+ "Les résultats sont réécrits dans la tâche",
+ ],
+ next: "Suivant",
+ captions: {
+ idle: "Une tâche qui vient d'être assignée à un agent.",
+ steps: [
+ "La tâche contient la description du travail, la discussion et l'assigné ; l'exécution utilise les instructions, le modèle, les skills et le runtime de l'agent. Cliquez sur Suivant.",
+ "L'exécution entre dans la file d'attente ; si aucun runtime n'est en ligne, elle y patiente. Cliquez sur Suivant.",
+ "Un runtime en ligne sur votre ordinateur prend en charge l'exécution et appelle l'outil de codage IA configuré pour l'agent. Cliquez sur Suivant.",
+ "L'outil lit le répertoire de travail, exécute des commandes et produit des résultats ; l'avancement remonte en temps réel dans le journal d'exécution.",
+ "Les résultats apparaissent dans le fil d'activité et le journal d'exécution de la tâche. Terminée signifie seulement que cette exécution est finie. Cliquez sur Rejouer pour revoir la démo.",
+ ],
+ working: "L'outil lit le répertoire de travail, exécute des commandes et produit des résultats ; l'avancement remonte en temps réel dans le journal d'exécution. Cliquez sur Suivant.",
+ },
+ },
+};
+
+const STATUS_AT_STEP: RunStatus[] = ["queued", "queued", "dispatched", "running", "completed"];
+const LAST = 4;
+
+function Lane({
+ icon,
+ name,
+ role,
+ active,
+ children,
+}: {
+ icon: ReactNode;
+ name: string;
+ role: string;
+ active: boolean;
+ children: ReactNode;
+}) {
+ return (
+ <section
+ className={cn(
+ "flex min-w-0 flex-col gap-2 rounded-lg border p-3 transition-colors",
+ active ? "border-brand/60 bg-brand/5" : "bg-muted/30",
+ )}
+ >
+ <div className="flex items-center gap-1.5">
+ {icon}
+ <span className="text-label font-medium">{name}</span>
+ <span className="text-caption text-muted-foreground">· {role}</span>
+ </div>
+ {children}
+ </section>
+ );
+}
+
+/** The piece of the lane the current step is about. */
+function Focus({ on, children }: { on: boolean; children: ReactNode }) {
+ return (
+ <div
+ className={cn(
+ "rounded-md border bg-background px-2.5 py-2 transition-shadow motion-safe:animate-in motion-safe:fade-in",
+ on && "ring-2 ring-brand/60",
+ )}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function RunPathDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [step, setStep] = useState(0);
+ const [actionsShown, setActionsShown] = useState(0);
+
+ const executing = step === 3 && actionsShown < t.actions.length;
+ const status = STATUS_AT_STEP[step] ?? "queued";
+
+ const next = () => {
+ const to = step + 1;
+ setStep(to);
+ if (to === 3) {
+ t.actions.forEach((_, i) => after(700 + i * 900, () => setActionsShown(i + 1)));
+ }
+ };
+
+ const replay = () => {
+ clear();
+ setStep(0);
+ setActionsShown(0);
+ };
+
+ const caption = !visible
+ ? t.captions.idle
+ : step === 3 && !executing
+ ? t.captions.working
+ : t.captions.steps[step];
+
+ const onComputer = step === 2 || step === 3;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="flex flex-col gap-3 p-4">
+ <ol className="hidden grid-cols-5 gap-2 sm:grid" aria-label={t.stepOf(step + 1, t.steps.length)}>
+ {t.steps.map((label, i) => (
+ <li
+ key={label}
+ aria-current={i === step ? "step" : undefined}
+ className={cn(
+ "flex flex-col gap-1 border-t-2 pt-1.5 text-caption transition-colors",
+ i < step && "border-brand/50 text-muted-foreground",
+ i === step && "border-brand font-medium text-foreground",
+ i > step && "border-border text-muted-foreground",
+ )}
+ >
+ <span className="text-micro">{i + 1}</span>
+ {label}
+ </li>
+ ))}
+ </ol>
+ <div className="text-caption sm:hidden">
+ <span className="text-muted-foreground">{t.stepOf(step + 1, t.steps.length)} · </span>
+ <span className="font-medium">{t.steps[step]}</span>
+ </div>
+
+ <div className="grid gap-3 sm:grid-cols-2">
+ <Lane
+ icon={<span aria-hidden className="size-2 rounded-full bg-brand" />}
+ name={t.multicaLane}
+ role={t.multicaRole}
+ active={!onComputer}
+ >
+ <Focus on={step === 0}>
+ <div className="text-body font-medium">{t.issueTitle}</div>
+ <p className="mt-0.5 text-caption text-muted-foreground">{t.issueDesc}</p>
+ <div className="mt-2 flex items-center gap-1.5 text-caption">
+ <span className="text-muted-foreground">{t.assigneeLabel}</span>
+ <DemoAvatar name={t.agent} agent />
+ <span>{t.agent}</span>
+ </div>
+ {step === 0 && (
+ <div className="mt-2 flex flex-wrap items-center gap-1 motion-safe:animate-in motion-safe:fade-in">
+ <span className="mr-0.5 text-micro text-muted-foreground">{t.configLabel}</span>
+ {t.config.map((item) => (
+ <span key={item} className="rounded-sm bg-brand/10 px-1.5 py-0.5 text-micro font-medium text-brand">
+ {item}
+ </span>
+ ))}
+ </div>
+ )}
+ </Focus>
+
+ {step >= 1 && (
+ <Focus on={step === 1}>
+ <div className="text-micro text-muted-foreground">{t.executionLog}</div>
+ <div className="mt-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5">
+ <DemoAvatar name={t.agent} agent />
+ <span className="text-label font-medium">{t.agent}</span>
+ <span
+ key={status}
+ className={cn(
+ "inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-micro font-medium motion-safe:animate-in motion-safe:fade-in",
+ status === "completed" ? "bg-success/12 text-success" : "bg-muted text-muted-foreground",
+ )}
+ >
+ {status !== "completed" && (
+ <Loader2 aria-hidden className="size-3 motion-safe:animate-spin" />
+ )}
+ {t.status[status]}
+ </span>
+ {actionsShown > 0 && (
+ <span className="text-caption text-muted-foreground">{t.toolCount(actionsShown)}</span>
+ )}
+ </div>
+ </Focus>
+ )}
+
+ {step === LAST && (
+ <div className="ring-2 ring-brand/60 rounded-lg">
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ </div>
+ )}
+ </Lane>
+
+ <Lane
+ icon={<Laptop aria-hidden className="size-3.5 text-muted-foreground" />}
+ name={t.computerLane}
+ role={t.computerRole}
+ active={onComputer}
+ >
+ <Focus on={step === 2}>
+ <div className="flex items-center gap-2 text-label">
+ <span className="font-medium">{t.tool}</span>
+ <span className="inline-flex items-center gap-1 text-caption text-muted-foreground">
+ <span aria-hidden className="size-1.5 rounded-full bg-success" />
+ {t.online}
+ </span>
+ </div>
+ {step >= 2 && (
+ <ul className="mt-1.5">
+ <DemoStep state="done">{t.claimed}</DemoStep>
+ </ul>
+ )}
+ </Focus>
+
+ {step >= 3 && (
+ <Focus on={step === 3}>
+ <ul className="flex flex-col gap-0.5">
+ {t.actions.slice(0, actionsShown).map((action, i) => (
+ <DemoStep key={action} state={i === actionsShown - 1 && executing ? "running" : "done"}>
+ {action}
+ </DemoStep>
+ ))}
+ {actionsShown === 0 && (
+ <li className="flex items-center gap-2 py-0.5 text-caption text-muted-foreground">
+ <Loader2 aria-hidden className="size-3.5 text-brand motion-safe:animate-spin" />
+ {t.status.running}
+ </li>
+ )}
+ </ul>
+ </Focus>
+ )}
+
+ {step === LAST && (
+ <ul className="px-1">
+ <DemoStep state="done">
+ <span className="inline-flex items-center gap-1">
+ {t.wroteBack}
+ <ArrowRight aria-hidden className="size-3 max-sm:-rotate-90" />
+ </span>
+ </DemoStep>
+ </ul>
+ )}
+ </Lane>
+ </div>
+
+ {step < LAST && (
+ <div className="flex justify-end">
+ <CoachMark active={visible && !executing} side="left" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={!visible || executing} onClick={next}>
+ {t.next}
+ <ArrowRight />
+ </Button>
+ </CoachMark>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/runtime-offline-demo.tsx b/apps/docs/components/demos/runtime-offline-demo.tsx
new file mode 100644
index 0000000000..26e6ebdcd9
--- /dev/null
+++ b/apps/docs/components/demos/runtime-offline-demo.tsx
@@ -0,0 +1,380 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { Laptop, Loader2, Power } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type IssueStatus = "todo" | "in_progress" | "in_review";
+type Machine = "offline" | "connecting" | "online";
+
+const copy = {
+ en: {
+ title: "OPS-23 · Collect this month's supply requests from every store",
+ agent: "Ops helper",
+ statusLabel: "Status",
+ issueStatus: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<IssueStatus, string>,
+ isQueued: (name: string) => `${name} is queued`,
+ queuedFor: "queued for 42m",
+ runtimesTitle: "Runtimes",
+ office: "Office computer",
+ lei: "Lei Li's computer",
+ tool: "Claude Code",
+ boundAgent: "Ops helper runs here",
+ online: "Online",
+ offline: "Offline",
+ connecting: "Connecting to workspace...",
+ bringOnline: "Bring this computer online",
+ bringOnlineHint: "Same as opening Multica Desktop or running multica daemon start",
+ queued: "Queued",
+ starting: "Starting",
+ working: "Working",
+ completed: "Completed",
+ steps: [
+ "Read the issue description and discussion",
+ "Set the status to In Progress",
+ "Open the supply request sheets from 12 stores",
+ "Total the requests by item and flag unusual quantities",
+ "Set the status to In Review",
+ ],
+ reply: "The summary is ready: 12 stores, 37 items, and 3 unusually large requests marked for a second look. Please review.",
+ captions: {
+ idle: "You assigned the issue to Ops helper, whose runtime is on the office computer.",
+ waiting:
+ "The office computer is offline, so the run waits in the queue. Lei Li's computer is online, but the run does not move there. Click \"Bring this computer online\".",
+ connecting: "The daemon starts and registers the computer's runtimes again.",
+ claimed: "Back online, the runtime claims the queued run and starts the AI coding tool.",
+ running: "Ops helper is working on the office computer.",
+ done: "The run completed and the issue moved to In Review. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "OPS-23 · 汇总本月各门店的物料申请",
+ agent: "运营助手",
+ statusLabel: "状态",
+ issueStatus: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<IssueStatus, string>,
+ isQueued: (name: string) => `${name} 排队中`,
+ queuedFor: "已排队 42m",
+ runtimesTitle: "运行时",
+ office: "办公室电脑",
+ lei: "李雷的电脑",
+ tool: "Claude Code",
+ boundAgent: "运营助手 在这里运行",
+ online: "在线",
+ offline: "离线",
+ connecting: "正在连接工作区...",
+ bringOnline: "让这台电脑上线",
+ bringOnlineHint: "相当于打开 Multica Desktop,或运行 multica daemon start",
+ queued: "排队中",
+ starting: "启动中",
+ working: "正在工作",
+ completed: "已完成",
+ steps: [
+ "读取任务描述和讨论",
+ "把状态改为 进行中",
+ "打开 12 家门店的物料申请表",
+ "按物料汇总数量,标出异常的申请",
+ "把状态改为 审核中",
+ ],
+ reply: "汇总已完成:12 家门店共 37 种物料,其中 3 笔申请量明显偏大,已标出待复核。请检查。",
+ captions: {
+ idle: "你把任务分配给了 运营助手,它的运行时在办公室电脑上。",
+ waiting: "办公室电脑离线,运行留在队列里等待。李雷的电脑在线,运行也不会转过去。点击\"让这台电脑上线\"。",
+ connecting: "守护进程启动,重新注册这台电脑的运行时。",
+ claimed: "运行时上线后领取了排队的运行,开始启动 AI 编程工具。",
+ running: "运营助手 正在办公室电脑上工作。",
+ done: "运行完成,任务改为审核中。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-23 · 今月の各店舗の備品申請を集計する",
+ agent: "運用アシスタント",
+ statusLabel: "ステータス",
+ issueStatus: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<IssueStatus, string>,
+ isQueued: (name: string) => `${name} が待機中`,
+ queuedFor: "42m 待機中",
+ runtimesTitle: "ランタイム",
+ office: "オフィスのパソコン",
+ lei: "李雷のパソコン",
+ tool: "Claude Code",
+ boundAgent: "運用アシスタント はここで動きます",
+ online: "オンライン",
+ offline: "オフライン",
+ connecting: "ワークスペースに接続中...",
+ bringOnline: "このパソコンをオンラインにする",
+ bringOnlineHint: "Multica Desktop を開くか、multica daemon start を実行するのと同じです",
+ queued: "待機中",
+ starting: "開始中",
+ working: "作業中",
+ completed: "完了",
+ steps: [
+ "タスクの説明と議論を読む",
+ "ステータスを 進行中 にする",
+ "12 店舗の備品申請シートを開く",
+ "品目ごとに数量を集計し、異常な申請に印を付ける",
+ "ステータスを レビュー中 にする",
+ ],
+ reply: "集計が終わりました。12 店舗で 37 品目、数量が明らかに多い申請 3 件に再確認の印を付けています。確認をお願いします。",
+ captions: {
+ idle: "タスクを 運用アシスタント に割り当てました。そのランタイムはオフィスのパソコンにあります。",
+ waiting:
+ "オフィスのパソコンがオフラインなので、実行はキューで待ちます。李雷のパソコンはオンラインですが、実行はそちらへ移りません。「このパソコンをオンラインにする」をクリックしてください。",
+ connecting: "デーモンが起動し、このパソコンのランタイムを登録し直します。",
+ claimed: "オンラインに戻ったランタイムが待機中の実行を受け取り、AI コーディングツールを起動します。",
+ running: "運用アシスタント がオフィスのパソコンで作業しています。",
+ done: "実行が完了し、タスクはレビュー中になりました。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "OPS-23 · 이번 달 매장별 비품 신청 취합",
+ agent: "운영 도우미",
+ statusLabel: "상태",
+ issueStatus: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<IssueStatus, string>,
+ isQueued: (name: string) => `${name} 대기 중`,
+ queuedFor: "42m 동안 대기 중",
+ runtimesTitle: "런타임",
+ office: "사무실 컴퓨터",
+ lei: "리레이의 컴퓨터",
+ tool: "Claude Code",
+ boundAgent: "운영 도우미가 여기서 실행됨",
+ online: "온라인",
+ offline: "오프라인",
+ connecting: "워크스페이스에 연결 중...",
+ bringOnline: "이 컴퓨터를 온라인으로",
+ bringOnlineHint: "Multica Desktop을 열거나 multica daemon start를 실행하는 것과 같습니다",
+ queued: "대기 중",
+ starting: "시작 중",
+ working: "작업 중",
+ completed: "완료됨",
+ steps: [
+ "태스크 설명과 논의 읽기",
+ "상태를 진행 중으로 변경",
+ "매장 12곳의 비품 신청서 열기",
+ "품목별로 수량을 합산하고 이상한 신청 표시",
+ "상태를 리뷰 중으로 변경",
+ ],
+ reply: "취합을 마쳤습니다. 매장 12곳, 품목 37개이며 수량이 눈에 띄게 많은 신청 3건은 재확인 대상으로 표시했습니다. 확인해 주세요.",
+ captions: {
+ idle: "태스크를 운영 도우미에게 할당했습니다. 이 에이전트의 런타임은 사무실 컴퓨터에 있습니다.",
+ waiting:
+ "사무실 컴퓨터가 오프라인이라 실행은 대기열에서 기다립니다. 리레이의 컴퓨터는 온라인이지만 실행이 그쪽으로 넘어가지 않습니다. \"이 컴퓨터를 온라인으로\"를 클릭하세요.",
+ connecting: "데몬이 시작되면서 이 컴퓨터의 런타임을 다시 등록합니다.",
+ claimed: "다시 온라인이 된 런타임이 대기 중인 실행을 가져가 AI 코딩 도구를 시작합니다.",
+ running: "운영 도우미가 사무실 컴퓨터에서 작업하고 있습니다.",
+ done: "실행이 완료되어 태스크가 리뷰 중으로 바뀌었습니다. \"다시 보기\"로 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-23 · Rassembler les demandes de fournitures du mois de chaque magasin",
+ agent: "Assistant ops",
+ statusLabel: "Statut",
+ issueStatus: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<IssueStatus, string>,
+ isQueued: (name: string) => `${name} est en file d'attente`,
+ queuedFor: "en file d'attente depuis 42m",
+ runtimesTitle: "Runtimes",
+ office: "Ordinateur du bureau",
+ lei: "Ordinateur de Lei Li",
+ tool: "Claude Code",
+ boundAgent: "Assistant ops s'exécute ici",
+ online: "En ligne",
+ offline: "Hors ligne",
+ connecting: "Connexion à l’espace de travail...",
+ bringOnline: "Mettre cet ordinateur en ligne",
+ bringOnlineHint: "Revient à ouvrir Multica Desktop ou à lancer multica daemon start",
+ queued: "En file d'attente",
+ starting: "Démarrage",
+ working: "Au travail",
+ completed: "Terminée",
+ steps: [
+ "Lire la description et la discussion de la tâche",
+ "Passer le statut à En cours",
+ "Ouvrir les fiches de demande de fournitures des 12 magasins",
+ "Totaliser les demandes par article et signaler les quantités inhabituelles",
+ "Passer le statut à En relecture",
+ ],
+ reply:
+ "La synthèse est prête : 12 magasins, 37 articles, et 3 demandes anormalement élevées marquées pour une seconde vérification. Merci de relire.",
+ captions: {
+ idle: "Vous avez assigné la tâche à Assistant ops, dont le runtime se trouve sur l'ordinateur du bureau.",
+ waiting:
+ "L'ordinateur du bureau est hors ligne, l'exécution attend donc dans la file. L'ordinateur de Lei Li est en ligne, mais l'exécution n'y est pas transférée. Cliquez sur « Mettre cet ordinateur en ligne ».",
+ connecting: "Le daemon démarre et réenregistre les runtimes de cet ordinateur.",
+ claimed: "De retour en ligne, le runtime prend l'exécution en attente et démarre l'outil de code IA.",
+ running: "Assistant ops travaille sur l'ordinateur du bureau.",
+ done: "L'exécution est terminée et la tâche est passée à En relecture. Rejouer recommence depuis le début.",
+ },
+ },
+};
+
+type Phase = "idle" | "waiting" | "connecting" | "claimed" | "running" | "done";
+
+// Index of the step at which the agent updates the issue status.
+const STATUS_STEPS: Partial<Record<number, IssueStatus>> = { 2: "in_progress", 5: "in_review" };
+
+const issueDot: Record<IssueStatus, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+function StatusDot({ state }: { state: Machine }) {
+ return (
+ <span
+ aria-hidden
+ className={cn(
+ "size-2 shrink-0 rounded-full",
+ state === "online" && "bg-success",
+ state === "offline" && "bg-muted-foreground/50",
+ state === "connecting" && "bg-warning",
+ )}
+ />
+ );
+}
+
+export function RuntimeOfflineDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [cycle, setCycle] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [issueStatus, setIssueStatus] = useState<IssueStatus>("todo");
+ const [stepsShown, setStepsShown] = useState(0);
+
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ after(600, () => setPhase("waiting"));
+ }, [visible, cycle, after, clear]);
+
+ const bringOnline = () => {
+ setPhase("connecting");
+ after(1800, () => setPhase("claimed"));
+ after(3200, () => setPhase("running"));
+ t.steps.forEach((_, i) =>
+ after(3200 + i * 1000, () => {
+ setStepsShown(i + 1);
+ const next = STATUS_STEPS[i + 1];
+ if (next) setIssueStatus(next);
+ }),
+ );
+ after(3200 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("idle");
+ setIssueStatus("todo");
+ setStepsShown(0);
+ setCycle((c) => c + 1);
+ };
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const office: Machine =
+ shownPhase === "connecting" ? "connecting" : shownPhase === "idle" || shownPhase === "waiting" ? "offline" : "online";
+ const queued = shownPhase === "idle" || shownPhase === "waiting" || shownPhase === "connecting";
+ const runStatus =
+ shownPhase === "done" ? t.completed : shownPhase === "claimed" ? t.starting : shownPhase === "running" ? t.working : t.queued;
+
+ const machines = [
+ { name: t.office, state: office, bound: true },
+ { name: t.lei, state: "online" as Machine, bound: false },
+ ];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="grid min-h-80 gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_15rem]">
+ <div className="flex min-w-0 flex-col gap-3">
+ <div className="flex flex-wrap items-center gap-x-4 gap-y-2">
+ <span className="flex items-center gap-2 text-body">
+ <span className="text-caption text-muted-foreground">{t.statusLabel}</span>
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", issueDot[issueStatus])} />
+ <span key={issueStatus} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.issueStatus[issueStatus]}
+ </span>
+ </span>
+ {queued && (
+ <span className="inline-flex h-6 min-w-0 items-center gap-1.5 rounded-full border px-2 text-caption">
+ <span aria-hidden className="size-1.5 shrink-0 rounded-full bg-warning" />
+ <span className="truncate">{t.isQueued(t.agent)}</span>
+ <span className="shrink-0 text-muted-foreground">· {t.queuedFor}</span>
+ </span>
+ )}
+ </div>
+
+ <DemoRun agent={t.agent} status={runStatus} active={shownPhase !== "done"}>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && shownPhase !== "done" ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+
+ {shownPhase === "done" && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+ </div>
+
+ <section aria-label={t.runtimesTitle} className="flex min-w-0 flex-col gap-2 sm:self-start">
+ <div className="px-1 text-caption font-medium text-muted-foreground">{t.runtimesTitle}</div>
+ {machines.map((m) => (
+ <div
+ key={m.name}
+ className={cn(
+ "min-w-0 rounded-lg border bg-background p-2.5",
+ m.bound && m.state === "offline" && "border-dashed",
+ )}
+ >
+ <div className="flex min-w-0 items-center gap-2">
+ <Laptop aria-hidden className="size-4 shrink-0 text-muted-foreground" />
+ <span className="min-w-0 flex-1 truncate text-label font-medium">{m.name}</span>
+ </div>
+ <div className="mt-1.5 flex min-w-0 items-center gap-2 pl-6 text-caption">
+ <span className="min-w-0 flex-1 truncate text-muted-foreground">{t.tool}</span>
+ <span className="inline-flex shrink-0 items-center gap-1.5">
+ {m.state === "connecting" ? (
+ <Loader2 aria-hidden className="size-3 text-warning motion-safe:animate-spin" />
+ ) : (
+ <StatusDot state={m.state} />
+ )}
+ <span key={m.state} className="motion-safe:animate-in motion-safe:fade-in">
+ {m.state === "online" ? t.online : m.state === "offline" ? t.offline : t.connecting}
+ </span>
+ </span>
+ </div>
+ {m.bound && (
+ <div className="mt-1 flex items-center gap-1.5 pl-6 text-micro text-muted-foreground">
+ <DemoAvatar name={t.agent} agent />
+ {t.boundAgent}
+ </div>
+ )}
+ {m.bound && (shownPhase === "idle" || shownPhase === "waiting") && (
+ <div className="mt-2.5 flex flex-col items-start gap-1.5 pl-6">
+ <p className="text-micro text-muted-foreground">{t.bringOnlineHint}</p>
+ <CoachMark active={shownPhase === "waiting"} side="left" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={shownPhase !== "waiting"} onClick={bringOnline}>
+ <Power />
+ {t.bringOnline}
+ </Button>
+ </CoachMark>
+ </div>
+ )}
+ </div>
+ ))}
+ </section>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/skill-demo.tsx b/apps/docs/components/demos/skill-demo.tsx
new file mode 100644
index 0000000000..b176d620fa
--- /dev/null
+++ b/apps/docs/components/demos/skill-demo.tsx
@@ -0,0 +1,448 @@
+"use client";
+
+import { useState } from "react";
+import { Check, Plus, Search } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoSendButton,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type SkillOption = { name: string; desc: string };
+
+const SKILL_NAME = "weekly-report";
+
+const copy = {
+ en: {
+ title: "Ops helper · Skills",
+ assignedTitle: "Assigned to agent",
+ assignedHint: "Turn off a skill to pause its use without removing it.",
+ addAction: "Add skill",
+ emptyTitle: "No skills assigned",
+ workspaceBadge: "Workspace",
+ dialogTitle: "Add skill",
+ searchPlaceholder: "Search skills",
+ skills: [
+ { name: SKILL_NAME, desc: "Weekly reports in three parts: Done this week, Next week, Risks. At most three points each." },
+ { name: "event-recap", desc: "Event recap template with sign-ups, turnout and follow-ups." },
+ { name: "support-reply", desc: "Tone and structure for replying to customer tickets." },
+ ] as SkillOption[],
+ cancel: "Cancel",
+ confirmDefault: "Add",
+ confirmOne: "Add 1 skill",
+ issueTitle: "OPS-17 · Write this week's ops report",
+ agent: "Ops helper",
+ you: "You",
+ draft: "write up this week's ops report.",
+ send: "Send",
+ running: "Running",
+ completed: "Completed",
+ steps: [
+ "Read this comment and the issue description",
+ `Skill · ${SKILL_NAME}`,
+ "Collect this week's event, support and content numbers",
+ `Write the report in the ${SKILL_NAME} format`,
+ ],
+ reply: [
+ { head: "Done this week", body: "Ran the members' day event, 326 sign-ups; first support response down to 4 minutes." },
+ { head: "Next week", body: "Publish the event recap; sort October's customer feedback." },
+ { head: "Risks", body: "8% of the event budget is left, so next week's materials may need more." },
+ ],
+ coachPick: `Pick ${SKILL_NAME}`,
+ captions: {
+ idle: "Ops helper has no skills yet.",
+ start: "Give Ops helper a weekly-report method it can reuse: click Add skill.",
+ pick: "These are the workspace's skills. Pick weekly-report.",
+ confirm: "Selected. Click Add 1 skill.",
+ added: "Assigned. Runs from now on can use it. Now ask Ops helper for this week's report: click send.",
+ running: "In the run, the agent loads the skill before writing; that call shows up as a step.",
+ done: "The report follows the skill's three parts. Edits to the skill apply from the next run. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "运营助手 · Skills",
+ assignedTitle: "分配给智能体",
+ assignedHint: "关闭后暂停使用,仍保留分配。",
+ addAction: "添加 skill",
+ emptyTitle: "尚未分配 skill",
+ workspaceBadge: "工作区",
+ dialogTitle: "添加 skill",
+ searchPlaceholder: "搜索 skill",
+ skills: [
+ { name: SKILL_NAME, desc: "周报按\"本周完成 / 下周计划 / 风险\"三段写,每段最多三条。" },
+ { name: "event-recap", desc: "活动复盘模板:报名、到场和后续跟进。" },
+ { name: "support-reply", desc: "回复客户工单的语气和结构。" },
+ ] as SkillOption[],
+ cancel: "取消",
+ confirmDefault: "添加",
+ confirmOne: "添加 1 个 skill",
+ issueTitle: "OPS-17 · 写本周运营周报",
+ agent: "运营助手",
+ you: "你",
+ draft: "写一下本周的运营周报。",
+ send: "发送",
+ running: "运行中",
+ completed: "已完成",
+ steps: [
+ "读取这条评论和任务描述",
+ `Skill · ${SKILL_NAME}`,
+ "汇总本周的活动、客服和内容数据",
+ `按 ${SKILL_NAME} 的格式写周报`,
+ ],
+ reply: [
+ { head: "本周完成", body: "会员日活动上线,报名 326 人;客服首次响应缩短到 4 分钟。" },
+ { head: "下周计划", body: "发布活动复盘;整理 10 月客户反馈。" },
+ { head: "风险", body: "活动预算只剩 8%,下周物料可能要追加。" },
+ ],
+ coachPick: `选择 ${SKILL_NAME}`,
+ captions: {
+ idle: "运营助手 还没有分配任何 skill。",
+ start: "给运营助手一套可以复用的周报写法:点击\"添加 skill\"。",
+ pick: "这里列出工作区里的 skill。选择 weekly-report。",
+ confirm: "已选中。点击\"添加 1 个 skill\"。",
+ added: "分配完成,之后的运行都能用它。到任务里请运营助手写本周周报:点击发送。",
+ running: "运行中,智能体先加载 skill 再动笔,这次调用会作为一个步骤出现在运行记录里。",
+ done: "周报按 skill 规定的三段交付。之后修改 skill,从下一次运行开始生效。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "運用アシスタント · スキル",
+ assignedTitle: "エージェントに割り当て済み",
+ assignedHint: "オフにすると割り当てを残したまま使用を停止できます。",
+ addAction: "スキルを追加",
+ emptyTitle: "割り当てられたスキルがありません",
+ workspaceBadge: "ワークスペース",
+ dialogTitle: "スキルを追加",
+ searchPlaceholder: "スキルを検索",
+ skills: [
+ { name: SKILL_NAME, desc: "週報を「今週やったこと / 来週の予定 / リスク」の 3 部で書きます。各部は最大 3 項目。" },
+ { name: "event-recap", desc: "イベント振り返りのテンプレート:申込数、参加数、フォローアップ。" },
+ { name: "support-reply", desc: "顧客チケットに返信するときのトーンと構成。" },
+ ] as SkillOption[],
+ cancel: "キャンセル",
+ confirmDefault: "追加",
+ confirmOne: "スキル 1 件を追加",
+ issueTitle: "OPS-17 · 今週の運用週報を書く",
+ agent: "運用アシスタント",
+ you: "あなた",
+ draft: "今週の運用週報をまとめてください。",
+ send: "送信",
+ running: "実行中",
+ completed: "完了",
+ steps: [
+ "このコメントとタスクの説明を読む",
+ `Skill · ${SKILL_NAME}`,
+ "今週のイベント、サポート、コンテンツの数字を集める",
+ `${SKILL_NAME} の形式で週報を書く`,
+ ],
+ reply: [
+ { head: "今週やったこと", body: "会員デーのイベントを実施し、申込は 326 人。サポートの初回応答は 4 分まで短縮しました。" },
+ { head: "来週の予定", body: "イベントの振り返りを公開し、10 月の顧客フィードバックを整理します。" },
+ { head: "リスク", body: "イベント予算の残りが 8% なので、来週の資材は追加が必要になるかもしれません。" },
+ ],
+ coachPick: `${SKILL_NAME} を選ぶ`,
+ captions: {
+ idle: "運用アシスタントにはまだスキルがありません。",
+ start: "運用アシスタントに、使い回せる週報の書き方を渡します。「スキルを追加」をクリックします。",
+ pick: "ワークスペースにあるスキルが並んでいます。weekly-report を選びます。",
+ confirm: "選択しました。「スキル 1 件を追加」をクリックします。",
+ added: "割り当てが済み、これ以降の実行で使えます。タスクで運用アシスタントに今週の週報を頼みます。送信をクリックします。",
+ running: "実行の中で、エージェントは書き始める前にスキルを読み込みます。この呼び出しは 1 つのステップとして記録に残ります。",
+ done: "週報はスキルが決めた 3 部構成で届きました。スキルを編集すると、次の実行から反映されます。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "운영 도우미 · 스킬",
+ assignedTitle: "에이전트에 할당됨",
+ assignedHint: "끄면 할당은 유지한 채 사용을 중지합니다.",
+ addAction: "스킬 추가",
+ emptyTitle: "할당된 스킬이 없습니다",
+ workspaceBadge: "워크스페이스",
+ dialogTitle: "스킬 추가",
+ searchPlaceholder: "스킬 검색",
+ skills: [
+ { name: SKILL_NAME, desc: "주간 보고를 '이번 주 완료 / 다음 주 계획 / 리스크' 세 부분으로 씁니다. 부분마다 최대 세 항목." },
+ { name: "event-recap", desc: "행사 회고 템플릿: 신청, 참석, 후속 조치." },
+ { name: "support-reply", desc: "고객 티켓에 답할 때의 어조와 구성." },
+ ] as SkillOption[],
+ cancel: "취소",
+ confirmDefault: "추가",
+ confirmOne: "스킬 1개 추가",
+ issueTitle: "OPS-17 · 이번 주 운영 주간 보고 작성",
+ agent: "운영 도우미",
+ you: "나",
+ draft: "이번 주 운영 주간 보고를 정리해 주세요.",
+ send: "보내기",
+ running: "실행 중",
+ completed: "완료됨",
+ steps: [
+ "이 댓글과 태스크 설명 읽기",
+ `Skill · ${SKILL_NAME}`,
+ "이번 주 행사, 고객 지원, 콘텐츠 수치 모으기",
+ `${SKILL_NAME} 형식으로 주간 보고 작성`,
+ ],
+ reply: [
+ { head: "이번 주 완료", body: "회원의 날 행사를 진행했고 신청은 326명입니다. 고객 지원 첫 응답 시간은 4분으로 줄었습니다." },
+ { head: "다음 주 계획", body: "행사 회고를 공개하고 10월 고객 피드백을 정리합니다." },
+ { head: "리스크", body: "행사 예산이 8%만 남아 다음 주 물품은 추가 예산이 필요할 수 있습니다." },
+ ],
+ coachPick: `${SKILL_NAME} 선택`,
+ captions: {
+ idle: "운영 도우미에게는 아직 스킬이 없습니다.",
+ start: "운영 도우미에게 다시 쓸 수 있는 주간 보고 작성법을 줍니다. 스킬 추가를 클릭하세요.",
+ pick: "워크스페이스에 있는 스킬 목록입니다. weekly-report를 고르세요.",
+ confirm: "선택했습니다. 스킬 1개 추가를 클릭하세요.",
+ added: "할당이 끝나 이후 실행부터 쓸 수 있습니다. 이제 태스크에서 운영 도우미에게 이번 주 보고를 부탁합니다. 보내기를 클릭하세요.",
+ running: "실행 중에 에이전트는 글을 쓰기 전에 스킬부터 불러옵니다. 이 호출은 하나의 단계로 기록됩니다.",
+ done: "보고는 스킬이 정한 세 부분으로 나왔습니다. 스킬을 수정하면 다음 실행부터 반영됩니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "Assistant ops · Skills",
+ assignedTitle: "Assignés à l'agent",
+ assignedHint: "Désactivez un skill pour suspendre son utilisation sans le retirer.",
+ addAction: "Ajouter un skill",
+ emptyTitle: "Aucun skill assigné",
+ workspaceBadge: "Espace de travail",
+ dialogTitle: "Ajouter un skill",
+ searchPlaceholder: "Rechercher des skills",
+ skills: [
+ { name: SKILL_NAME, desc: "Rapport hebdomadaire en trois parties : Fait cette semaine, Semaine prochaine, Risques. Trois points maximum par partie." },
+ { name: "event-recap", desc: "Modèle de bilan d'événement : inscriptions, participation et suites à donner." },
+ { name: "support-reply", desc: "Ton et structure pour répondre aux tickets clients." },
+ ] as SkillOption[],
+ cancel: "Annuler",
+ confirmDefault: "Ajouter",
+ confirmOne: "Ajouter 1 skill",
+ issueTitle: "OPS-17 · Rédiger le rapport ops de la semaine",
+ agent: "Assistant ops",
+ you: "Vous",
+ draft: "rédige le rapport ops de cette semaine.",
+ send: "Envoyer",
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire ce commentaire et la description de la tâche",
+ `Skill · ${SKILL_NAME}`,
+ "Rassembler les chiffres de la semaine : événements, support, contenu",
+ `Rédiger le rapport au format ${SKILL_NAME}`,
+ ],
+ reply: [
+ { head: "Fait cette semaine", body: "Journée membres organisée, 326 inscriptions ; premier délai de réponse du support ramené à 4 minutes." },
+ { head: "Semaine prochaine", body: "Publier le bilan de l'événement ; trier les retours clients d'octobre." },
+ { head: "Risques", body: "Il reste 8 % du budget événementiel ; le matériel de la semaine prochaine pourrait demander une rallonge." },
+ ],
+ coachPick: `Choisir ${SKILL_NAME}`,
+ captions: {
+ idle: "Assistant ops n'a encore aucun skill.",
+ start: "Donnez à Assistant ops une méthode de rapport hebdomadaire réutilisable : cliquez sur Ajouter un skill.",
+ pick: "Voici les skills de l'espace de travail. Choisissez weekly-report.",
+ confirm: "Sélectionné. Cliquez sur Ajouter 1 skill.",
+ added: "C'est assigné : les exécutions suivantes peuvent l'utiliser. Demandez maintenant le rapport de la semaine à Assistant ops : cliquez sur envoyer.",
+ running: "Pendant l'exécution, l'agent charge le skill avant de rédiger ; cet appel apparaît comme une étape.",
+ done: "Le rapport suit les trois parties du skill. Une modification du skill s'applique à partir de l'exécution suivante. Cliquez sur Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "pick" | "confirm" | "added" | "running" | "done";
+
+// One scripted path: attach the skill on the agent's Skills tab, then watch a
+// run use it. The composer and the dialog's search are fixed text.
+export function SkillDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const attached = phase === "added" || phase === "running" || phase === "done";
+ const sent = phase === "running" || phase === "done";
+ const dialogOpen = phase === "pick" || phase === "confirm";
+ const skill = t.skills[0]!;
+
+ const send = () => {
+ setPhase("running");
+ t.steps.forEach((_, i) => after(500 + i * 1000, () => setStepsShown(i + 1)));
+ after(500 + t.steps.length * 1000 + 600, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ setStepsShown(0);
+ };
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-80 flex-col gap-4 p-4">
+ <section className="rounded-lg border bg-background">
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-2 border-b px-3 py-2">
+ <div className="min-w-0 flex-1">
+ <div className="text-label font-medium">{t.assignedTitle}</div>
+ <div className="text-caption text-muted-foreground">{t.assignedHint}</div>
+ </div>
+ <CoachMark active={shownPhase === "start"} side="left" ringClassName="rounded-md">
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ disabled={shownPhase !== "start"}
+ onClick={() => setPhase("pick")}
+ >
+ <Plus aria-hidden className="size-3.5" />
+ {t.addAction}
+ </Button>
+ </CoachMark>
+ </div>
+ {attached ? (
+ <div className="flex items-start gap-3 px-3 py-2.5 motion-safe:animate-in motion-safe:fade-in">
+ <div className="min-w-0 flex-1">
+ <div className="flex flex-wrap items-center gap-2">
+ <span className="font-mono text-label font-medium">{skill.name}</span>
+ <span className="rounded-xs bg-muted px-1 text-micro text-muted-foreground">{t.workspaceBadge}</span>
+ </div>
+ <div className="mt-0.5 text-caption text-muted-foreground">{skill.desc}</div>
+ </div>
+ <span aria-hidden className="mt-0.5 inline-flex h-4 w-7 shrink-0 items-center rounded-full bg-foreground p-0.5">
+ <span className="ml-auto size-3 rounded-full bg-background" />
+ </span>
+ </div>
+ ) : (
+ <div className="px-3 py-5 text-center text-caption text-muted-foreground">{t.emptyTitle}</div>
+ )}
+ </section>
+
+ {attached && (
+ <section className="flex flex-col gap-3 motion-safe:animate-in motion-safe:fade-in">
+ <div className="text-label font-medium">{t.issueTitle}</div>
+
+ {sent && (
+ <>
+ <DemoComment author={t.you}>
+ <span className="font-medium text-brand">@{t.agent}</span> {t.draft}
+ </DemoComment>
+ <DemoRun agent={t.agent} status={phase === "done" ? t.completed : t.running} active={phase !== "done"}>
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && phase !== "done" ? "running" : "done"}>
+ {i === 1 ? <span className="font-mono text-foreground">{step}</span> : step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ </>
+ )}
+
+ {phase === "done" && (
+ <DemoComment author={t.agent} agent>
+ <div className="flex flex-col gap-1">
+ {t.reply.map((part) => (
+ <p key={part.head}>
+ <span className="font-medium">{part.head}</span>
+ <span className="text-muted-foreground"> · </span>
+ {part.body}
+ </p>
+ ))}
+ </div>
+ </DemoComment>
+ )}
+
+ {!sent && (
+ <div className="rounded-lg border bg-background p-2">
+ <div className="min-h-10 px-1 text-body">
+ <span className="font-medium text-brand">@{t.agent}</span> {t.draft}
+ </div>
+ <div className="mt-1 flex justify-end">
+ <CoachMark active={phase === "added"} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={phase !== "added"} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ )}
+ </section>
+ )}
+
+ {dialogOpen && (
+ <div className="absolute inset-0 z-20 flex items-start justify-center bg-background/60 p-4 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in">
+ <div
+ role="dialog"
+ aria-modal="false"
+ aria-labelledby="skill-demo-dialog-title"
+ className="w-full max-w-sm rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:zoom-in-95"
+ >
+ <div id="skill-demo-dialog-title" className="px-4 pt-4 text-body font-medium">
+ {t.dialogTitle}
+ </div>
+ <div className="px-4 pt-3">
+ <div className="flex h-8 items-center gap-2 rounded-md border px-2 text-body text-muted-foreground">
+ <Search aria-hidden className="size-3.5" />
+ {t.searchPlaceholder}
+ </div>
+ </div>
+ <div className="flex flex-col gap-0.5 p-2">
+ {t.skills.map((option, i) => {
+ const checked = i === 0 && phase === "confirm";
+ const enabled = i === 0 && phase === "pick";
+ return (
+ <CoachMark quiet key={option.name} active={enabled} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="checkbox"
+ aria-checked={checked}
+ disabled={!enabled}
+ onClick={() => setPhase("confirm")}
+ className={cn(
+ "flex w-full items-start gap-2.5 rounded-md px-2 py-1.5 text-left hover:bg-accent disabled:hover:bg-transparent",
+ checked && "bg-accent/60",
+ )}
+ >
+ <span
+ aria-hidden
+ className={cn(
+ "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border",
+ checked ? "border-foreground bg-foreground text-background" : "border-muted-foreground/50",
+ )}
+ >
+ {checked && <Check className="size-3" />}
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="flex flex-wrap items-baseline gap-x-2">
+ <span className="font-mono text-label font-medium">{option.name}</span>
+ {enabled && (
+ <span aria-hidden className="text-caption font-medium text-brand">
+ {t.coachPick}
+ </span>
+ )}
+ </span>
+ <span className="block truncate text-caption text-muted-foreground">{option.desc}</span>
+ </span>
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ <div className="flex justify-end gap-2 rounded-b-xl border-t bg-muted/40 px-4 py-3">
+ <Button type="button" variant="ghost" size="sm" disabled>
+ {t.cancel}
+ </Button>
+ <CoachMark active={phase === "confirm"} side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={phase !== "confirm"} onClick={() => setPhase("added")}>
+ {phase === "confirm" ? t.confirmOne : t.confirmDefault}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/squad-demo.tsx b/apps/docs/components/demos/squad-demo.tsx
new file mode 100644
index 0000000000..376fbd2c60
--- /dev/null
+++ b/apps/docs/components/demos/squad-demo.tsx
@@ -0,0 +1,594 @@
+"use client";
+
+import { useState } from "react";
+import { ChevronDown, Users, X } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoSendButton,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Status = "todo" | "in_progress" | "in_review";
+type Candidate = { name: string; kind: "member" | "agent" | "squad" };
+
+const copy = {
+ en: {
+ title: "OPS-21 · Prepare the end-of-month customer thank-you event",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ unassigned: "Unassigned",
+ status: { todo: "Todo", in_progress: "In Progress", in_review: "In Review" } as Record<Status, string>,
+ groups: { member: "Members", agent: "Agents", squad: "Squads" },
+ squad: "Events squad",
+ leader: "Ops helper",
+ writer: "Writing helper",
+ you: "You",
+ leaderTag: "Leader",
+ candidates: [
+ { name: "You", kind: "member" },
+ { name: "Lei Li", kind: "member" },
+ { name: "Ops helper", kind: "agent" },
+ { name: "Writing helper", kind: "agent" },
+ { name: "Events squad", kind: "squad" },
+ ] as Candidate[],
+ confirmTitle: "Confirm assignment?",
+ confirmBody: (name: string) => `Assign this issue to ${name}. They'll start right away if the run conditions are met.`,
+ close: "Close",
+ dontStart: "Don't start yet",
+ confirm: "Confirm assignment",
+ running: "Running",
+ completed: "Completed",
+ leaderSteps: [
+ "Read the issue description and discussion",
+ "Match the work against the squad roster",
+ "Set the status to In Progress",
+ "Post the dispatch comment",
+ "Record this evaluation",
+ ],
+ dispatch: { writer: "draft the invitation, first version by Wednesday.", you: "please confirm the venue and the catering quote." },
+ dispatchActivity: "evaluated and took action: handed off to Writing helper and You",
+ writerSteps: ["Read the issue and the dispatch comment", "Draft the invitation"],
+ writerReply: "The invitation draft is ready, with the time, the place and an RSVP link.",
+ recheckSteps: ["Read the new comment"],
+ noActionActivity: "evaluated: no action needed (waiting on You for the venue)",
+ yourDraft: "Venue is the third-floor event hall; catering quote is 4,800 and confirmed.",
+ send: "Send",
+ finalSteps: ["Read the new comment", "Pull the invitation and venue details together", "Set the status to In Review"],
+ summary: "The event is ready: the invitation draft is done, and the venue and catering are confirmed. Please review before we send it out.",
+ finalActivity: "evaluated and took action: work is complete, moved to In Review",
+ captions: {
+ idle: "An issue that needs both writing and on-site coordination.",
+ start: "Hand the whole issue to a squad: click Assignee.",
+ pick: "Squads are listed with members and agents. Pick Events squad.",
+ confirm: "The squad becomes the assignee. Confirm to start.",
+ leader: "Only the leader starts. It reads the issue and the roster, then dispatches by @mention instead of doing the work.",
+ leaderPosted: "The @mentions are the handoff: Writing helper gets a run, and you get a notification. The leader has stopped.",
+ writer: "Writing helper works in its own run on the same issue.",
+ writerPosted: "A squad member posted an update without @mentioning anyone, so the leader wakes up.",
+ recheck: "The leader re-evaluates.",
+ yourTurn: "Your part isn't in yet, so the leader records no action and posts nothing. Your reply is written: click send.",
+ final: "Your reply wakes the leader again. Everything it asked for is in.",
+ done: "The leader sums up and moves the issue to In Review; Done is left for a person to decide. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "OPS-21 · 筹备月底的客户答谢会",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ unassigned: "未分配",
+ status: { todo: "待办", in_progress: "进行中", in_review: "审核中" } as Record<Status, string>,
+ groups: { member: "成员", agent: "智能体", squad: "小队" },
+ squad: "活动小队",
+ leader: "运营助手",
+ writer: "文案助手",
+ you: "你",
+ leaderTag: "队长",
+ candidates: [
+ { name: "你", kind: "member" },
+ { name: "李雷", kind: "member" },
+ { name: "运营助手", kind: "agent" },
+ { name: "文案助手", kind: "agent" },
+ { name: "活动小队", kind: "squad" },
+ ] as Candidate[],
+ confirmTitle: "确认指派?",
+ confirmBody: (name: string) => `将这个任务指派给 ${name};符合运行条件时会立即开始处理。`,
+ close: "关闭",
+ dontStart: "暂不开始",
+ confirm: "确认指派",
+ running: "运行中",
+ completed: "已完成",
+ leaderSteps: ["读取任务描述和讨论", "对照小队花名册挑选成员", "把状态改为 进行中", "发出派活评论", "记录这次评估"],
+ dispatch: { writer: "写答谢会邀请函,周三前给初稿。", you: "确认一下场地和餐饮报价。" },
+ dispatchActivity: "已评估并采取了操作:派给文案助手和你",
+ writerSteps: ["读取任务和派活评论", "起草邀请函"],
+ writerReply: "邀请函初稿写好了,时间、地点和回执链接都在里面。",
+ recheckSteps: ["读取新评论"],
+ noActionActivity: "已评估:无需操作(等你确认场地)",
+ yourDraft: "场地定在三楼多功能厅,餐饮报价 4,800 元,已确认。",
+ send: "发送",
+ finalSteps: ["读取新评论", "汇总邀请函和场地信息", "把状态改为 审核中"],
+ summary: "答谢会准备好了:邀请函初稿已完成,场地和餐饮已确认。请检查后再发出邀请。",
+ finalActivity: "已评估并采取了操作:工作已完成,改为审核中",
+ captions: {
+ idle: "一条既要写文案、又要跑现场的任务。",
+ start: "把整条任务交给小队:点击负责人。",
+ pick: "小队和成员、智能体列在一起。选择\"活动小队\"。",
+ confirm: "小队会成为负责人。确认后开始。",
+ leader: "只有队长开始运行。它读任务和花名册,用 @ 派活,自己不动手。",
+ leaderPosted: "@ 就是交接:文案助手入队了一次运行,你收到一条通知。队长到这里就停下了。",
+ writer: "文案助手在同一条任务上开始自己的运行。",
+ writerPosted: "小队成员发了进展,没有 @ 任何人,所以队长被唤醒。",
+ recheck: "队长重新评估下一步。",
+ yourTurn: "你那部分还没交,队长记一条\"无需操作\",不发评论。你的回复已经写好:点击发送。",
+ final: "你的回复再次唤醒队长,它要的东西都齐了。",
+ done: "队长汇总结果,把任务改为审核中;改成已完成留给人来决定。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-21 · 月末の顧客感謝イベントを準備する",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ unassigned: "未割り当て",
+ status: { todo: "未着手", in_progress: "進行中", in_review: "レビュー中" } as Record<Status, string>,
+ groups: { member: "メンバー", agent: "エージェント", squad: "スクワッド" },
+ squad: "イベントスクワッド",
+ leader: "運用アシスタント",
+ writer: "ライティングアシスタント",
+ you: "あなた",
+ leaderTag: "リーダー",
+ candidates: [
+ { name: "あなた", kind: "member" },
+ { name: "李雷", kind: "member" },
+ { name: "運用アシスタント", kind: "agent" },
+ { name: "ライティングアシスタント", kind: "agent" },
+ { name: "イベントスクワッド", kind: "squad" },
+ ] as Candidate[],
+ confirmTitle: "割り当てを確認しますか?",
+ confirmBody: (name: string) => `このタスクを ${name} に割り当てます。実行条件を満たす場合はすぐに作業を開始します。`,
+ close: "閉じる",
+ dontStart: "まだ開始しない",
+ confirm: "割り当てを確認",
+ running: "実行中",
+ completed: "完了",
+ leaderSteps: [
+ "タスクの説明と議論を読む",
+ "スクワッドの名簿と照らし合わせてメンバーを選ぶ",
+ "ステータスを 進行中 に変更",
+ "割り振りのコメントを投稿",
+ "今回の評価を記録",
+ ],
+ dispatch: { writer: "招待状の文面をお願いします。初稿は水曜までに。", you: "会場とケータリングの見積もりを確認してください。" },
+ dispatchActivity: "評価してアクションを実行しました: ライティングアシスタントとあなたに割り振り",
+ writerSteps: ["タスクと割り振りのコメントを読む", "招待状の下書きを書く"],
+ writerReply: "招待状の初稿ができました。日時、場所、出欠フォームへのリンクを入れています。",
+ recheckSteps: ["新しいコメントを読む"],
+ noActionActivity: "評価完了: 必要なアクションはありません(会場の確認をあなたに依頼中)",
+ yourDraft: "会場は 3 階のイベントホールに決まりました。ケータリングは 4,800 の見積もりで確定です。",
+ send: "送信",
+ finalSteps: ["新しいコメントを読む", "招待状と会場の情報をまとめる", "ステータスを レビュー中 に変更"],
+ summary: "イベントの準備が整いました。招待状の初稿ができ、会場とケータリングも確定しています。送付前に確認をお願いします。",
+ finalActivity: "評価してアクションを実行しました: 作業が完了したのでレビュー中に変更",
+ captions: {
+ idle: "文面づくりと現地の手配、両方が必要なタスクです。",
+ start: "タスク全体をスクワッドに任せます。担当者をクリックします。",
+ pick: "スクワッドはメンバーやエージェントと同じ一覧に並びます。イベントスクワッドを選びます。",
+ confirm: "スクワッドが担当者になります。確認すると開始します。",
+ leader: "動き出すのはリーダーだけです。タスクと名簿を読み、自分では作業せず @メンションで割り振ります。",
+ leaderPosted: "@メンションが引き継ぎの合図です。ライティングアシスタントには実行が入り、あなたには通知が届きます。リーダーはここで止まります。",
+ writer: "ライティングアシスタントが同じタスクで自分の実行を始めます。",
+ writerPosted: "スクワッドのメンバーが誰も @メンションせずに進捗を投稿したので、リーダーが起こされます。",
+ recheck: "リーダーが次の一手を評価し直します。",
+ yourTurn: "あなたの担当分がまだなので、リーダーは「アクションなし」を記録し、コメントは投稿しません。返信は入力済みです。送信をクリックします。",
+ final: "あなたの返信でリーダーがもう一度起こされます。頼んだものはすべて揃いました。",
+ done: "リーダーが結果をまとめ、タスクをレビュー中にします。完了にするかどうかは人が決めます。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "OPS-21 · 월말 고객 감사 행사 준비",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ unassigned: "담당자 없음",
+ status: { todo: "할 일", in_progress: "진행 중", in_review: "리뷰 중" } as Record<Status, string>,
+ groups: { member: "멤버", agent: "에이전트", squad: "스쿼드" },
+ squad: "행사 스쿼드",
+ leader: "운영 도우미",
+ writer: "글쓰기 도우미",
+ you: "나",
+ leaderTag: "리더",
+ candidates: [
+ { name: "나", kind: "member" },
+ { name: "리레이", kind: "member" },
+ { name: "운영 도우미", kind: "agent" },
+ { name: "글쓰기 도우미", kind: "agent" },
+ { name: "행사 스쿼드", kind: "squad" },
+ ] as Candidate[],
+ confirmTitle: "할당을 확인할까요?",
+ confirmBody: (name: string) => `이 태스크를 ${name}에게 할당합니다. 실행 조건을 충족하면 바로 시작합니다.`,
+ close: "닫기",
+ dontStart: "아직 시작 안 함",
+ confirm: "할당 확인",
+ running: "실행 중",
+ completed: "완료됨",
+ leaderSteps: [
+ "태스크 설명과 논의 읽기",
+ "스쿼드 명단과 비교해 멤버 고르기",
+ "상태를 진행 중으로 변경",
+ "작업 배정 댓글 남기기",
+ "이번 평가 기록하기",
+ ],
+ dispatch: { writer: "초대장 문안을 써 주세요. 초안은 수요일까지 부탁합니다.", you: "행사장과 케이터링 견적을 확인해 주세요." },
+ dispatchActivity: "평가 후 작업을 수행했습니다: 글쓰기 도우미와 나에게 배정",
+ writerSteps: ["태스크와 배정 댓글 읽기", "초대장 초안 작성"],
+ writerReply: "초대장 초안을 다 썼습니다. 일시, 장소, 참석 회신 링크를 넣었습니다.",
+ recheckSteps: ["새 댓글 읽기"],
+ noActionActivity: "평가 완료: 필요한 작업 없음(행사장 확인은 나에게서 대기 중)",
+ yourDraft: "행사장은 3층 다목적홀로 정했고, 케이터링 견적 4,800으로 확정했습니다.",
+ send: "보내기",
+ finalSteps: ["새 댓글 읽기", "초대장과 행사장 정보 정리", "상태를 리뷰 중으로 변경"],
+ summary: "행사 준비가 끝났습니다. 초대장 초안이 나왔고 행사장과 케이터링도 확정됐습니다. 발송 전에 검토해 주세요.",
+ finalActivity: "평가 후 작업을 수행했습니다: 작업이 끝나 리뷰 중으로 변경",
+ captions: {
+ idle: "문안 작성과 현장 준비가 모두 필요한 태스크입니다.",
+ start: "태스크 전체를 스쿼드에 맡깁니다. 담당자를 클릭하세요.",
+ pick: "스쿼드는 멤버, 에이전트와 같은 목록에 있습니다. 행사 스쿼드를 고르세요.",
+ confirm: "스쿼드가 담당자가 됩니다. 확인하면 시작합니다.",
+ leader: "리더만 실행을 시작합니다. 태스크와 명단을 읽고, 직접 일하지 않고 @멘션으로 배정합니다.",
+ leaderPosted: "@멘션이 곧 인계입니다. 글쓰기 도우미에게는 실행이 들어가고 나에게는 알림이 옵니다. 리더는 여기서 멈춥니다.",
+ writer: "글쓰기 도우미가 같은 태스크에서 자기 실행을 시작합니다.",
+ writerPosted: "스쿼드 멤버가 아무도 @멘션하지 않고 진행 상황을 올렸으므로 리더가 깨어납니다.",
+ recheck: "리더가 다음 단계를 다시 평가합니다.",
+ yourTurn: "내 몫이 아직 들어오지 않아 리더는 '작업 없음'을 기록하고 댓글은 남기지 않습니다. 답장은 작성되어 있습니다. 보내기를 클릭하세요.",
+ final: "내 답장이 리더를 다시 깨웁니다. 요청한 내용이 모두 모였습니다.",
+ done: "리더가 결과를 정리하고 태스크를 리뷰 중으로 옮깁니다. 완료 처리는 사람이 결정합니다. 다시 보기를 누르면 처음부터 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-21 · Préparer la soirée de remerciement clients de fin de mois",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ unassigned: "Non assigné",
+ status: { todo: "À faire", in_progress: "En cours", in_review: "En relecture" } as Record<Status, string>,
+ groups: { member: "Membres", agent: "Agents", squad: "Squads" },
+ squad: "Squad événements",
+ leader: "Assistant ops",
+ writer: "Assistant rédaction",
+ you: "Vous",
+ leaderTag: "Chef",
+ candidates: [
+ { name: "Vous", kind: "member" },
+ { name: "Lei Li", kind: "member" },
+ { name: "Assistant ops", kind: "agent" },
+ { name: "Assistant rédaction", kind: "agent" },
+ { name: "Squad événements", kind: "squad" },
+ ] as Candidate[],
+ confirmTitle: "Confirmer l'assignation ?",
+ confirmBody: (name: string) => `Assigner cette tâche à ${name}. Le travail démarrera immédiatement si les conditions d'exécution sont réunies.`,
+ close: "Fermer",
+ dontStart: "Ne pas démarrer maintenant",
+ confirm: "Confirmer l'assignation",
+ running: "En cours",
+ completed: "Terminée",
+ leaderSteps: [
+ "Lire la description et la discussion de la tâche",
+ "Comparer le travail au roster du squad",
+ "Passer le statut à En cours",
+ "Publier le commentaire de délégation",
+ "Consigner cette évaluation",
+ ],
+ dispatch: { writer: "rédige l'invitation, première version pour mercredi.", you: "merci de confirmer la salle et le devis du traiteur." },
+ dispatchActivity: "a évalué et agi : délégué à Assistant rédaction et à Vous",
+ writerSteps: ["Lire la tâche et le commentaire de délégation", "Rédiger l'invitation"],
+ writerReply: "Le brouillon de l'invitation est prêt, avec la date, le lieu et un lien de réponse.",
+ recheckSteps: ["Lire le nouveau commentaire"],
+ noActionActivity: "a évalué : aucune action nécessaire (en attente de Vous pour la salle)",
+ yourDraft: "La salle sera celle du troisième étage ; le devis du traiteur est de 4 800 et il est validé.",
+ send: "Envoyer",
+ finalSteps: ["Lire le nouveau commentaire", "Rassembler l'invitation et les infos sur la salle", "Passer le statut à En relecture"],
+ summary: "La soirée est prête : le brouillon de l'invitation est fait, la salle et le traiteur sont confirmés. Merci de relire avant l'envoi.",
+ finalActivity: "a évalué et agi : travail terminé, passé En relecture",
+ captions: {
+ idle: "Une tâche qui demande à la fois de la rédaction et de l'organisation sur place.",
+ start: "Confiez toute la tâche à un squad : cliquez sur Assigné à.",
+ pick: "Les squads sont listés avec les membres et les agents. Choisissez Squad événements.",
+ confirm: "Le squad devient l'assigné. Confirmez pour démarrer.",
+ leader: "Seul le chef démarre. Il lit la tâche et le roster, puis délègue par @mention au lieu de faire le travail.",
+ leaderPosted: "Les @mentions servent de passation : Assistant rédaction reçoit une exécution, et vous une notification. Le chef s'arrête là.",
+ writer: "Assistant rédaction travaille dans sa propre exécution, sur la même tâche.",
+ writerPosted: "Un membre du squad a publié un point d'avancement sans @mentionner personne : le chef se réveille.",
+ recheck: "Le chef réévalue la suite.",
+ yourTurn: "Votre partie n'est pas encore arrivée : le chef consigne « aucune action » et ne publie rien. Votre réponse est rédigée : cliquez sur envoyer.",
+ final: "Votre réponse réveille de nouveau le chef. Tout ce qu'il avait demandé est là.",
+ done: "Le chef fait la synthèse et passe la tâche En relecture ; c'est à une personne de la passer à Terminé. Cliquez sur Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+const ORDER = [
+ "start",
+ "pick",
+ "confirm",
+ "leader",
+ "leaderPosted",
+ "writer",
+ "writerPosted",
+ "recheck",
+ "yourTurn",
+ "final",
+ "done",
+] as const;
+type Phase = (typeof ORDER)[number];
+
+const STEP_MS = 800;
+const PAUSE_MS = 1200;
+
+const statusDot: Record<Status, string> = {
+ todo: "border-muted-foreground",
+ in_progress: "border-warning bg-warning/40",
+ in_review: "border-brand bg-brand/40",
+};
+
+// The squad flow as the server runs it: assigning enqueues only the leader;
+// the leader dispatches with @mentions and stops; a member's plain update wakes
+// it again; it moves the parent to in_review once the goal is met.
+export function SquadDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Phase>("start");
+ const [status, setStatus] = useState<Status>("todo");
+ const [stepsShown, setStepsShown] = useState(0);
+
+ const at = (p: Phase) => ORDER.indexOf(phase) >= ORDER.indexOf(p);
+ const assigned = at("leader");
+
+ // Plays one run's steps, then hands over to `next` after a pause.
+ const playRun = (start: number, steps: string[], next: Phase, onStep?: (i: number) => void) => {
+ after(start, () => setStepsShown(0));
+ steps.forEach((_, i) =>
+ after(start + 300 + i * STEP_MS, () => {
+ setStepsShown(i + 1);
+ onStep?.(i + 1);
+ }),
+ );
+ const end = start + 300 + steps.length * STEP_MS + 300;
+ after(end, () => setPhase(next));
+ return end;
+ };
+
+ const confirm = () => {
+ setPhase("leader");
+ let time = playRun(0, t.leaderSteps, "leaderPosted", (n) => n === 3 && setStatus("in_progress"));
+ time += PAUSE_MS + 800;
+ after(time, () => setPhase("writer"));
+ time = playRun(time, t.writerSteps, "writerPosted");
+ time += PAUSE_MS + 800;
+ after(time, () => setPhase("recheck"));
+ playRun(time, t.recheckSteps, "yourTurn");
+ };
+
+ const send = () => {
+ setPhase("final");
+ playRun(0, t.finalSteps, "done", (n) => n === 3 && setStatus("in_review"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ setStatus("todo");
+ setStepsShown(0);
+ };
+
+ const caption = visible ? t.captions[phase] : t.captions.idle;
+
+ const run = (agent: string, steps: string[], active: boolean, leader = false) => (
+ <DemoRun agent={leader ? `${agent} · ${t.leaderTag}` : agent} status={active ? t.running : t.completed} active={active}>
+ {active &&
+ steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ );
+
+ const mention = (name: string) => <span className="font-medium text-brand">@{name}</span>;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="relative flex min-h-96 flex-col gap-3 p-4">
+ <dl className="grid w-fit grid-cols-[auto_auto] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="flex items-center gap-1.5">
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", statusDot[status])} />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd className="relative">
+ <CoachMark active={visible && phase === "start"} side="right" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={phase === "pick"}
+ disabled={!visible || (phase !== "start" && phase !== "pick")}
+ onClick={() => setPhase(phase === "pick" ? "start" : "pick")}
+ className="-mx-1.5 inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 hover:bg-muted disabled:hover:bg-transparent"
+ >
+ {assigned ? (
+ <>
+ <SquadAvatar />
+ {t.squad}
+ </>
+ ) : (
+ <span className="text-muted-foreground">{t.unassigned}</span>
+ )}
+ {(phase === "start" || phase === "pick") && (
+ <ChevronDown aria-hidden className="size-3.5 text-muted-foreground" />
+ )}
+ </button>
+ </CoachMark>
+ {phase === "pick" && (
+ <div
+ role="listbox"
+ aria-label={t.assigneeLabel}
+ className="absolute top-full left-0 z-10 mt-1 w-52 rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ {(["member", "agent", "squad"] as const).map((kind) => (
+ <div key={kind}>
+ <div className="px-2 pt-1 pb-0.5 text-micro text-muted-foreground">{t.groups[kind]}</div>
+ {t.candidates
+ .filter((c) => c.kind === kind)
+ .map((candidate) => {
+ const target = kind === "squad";
+ return (
+ <CoachMark
+ key={candidate.name}
+ active={target}
+ side="right"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ role="option"
+ aria-selected={false}
+ disabled={!target}
+ onClick={() => setPhase("confirm")}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-body hover:bg-accent disabled:hover:bg-transparent"
+ >
+ {kind === "squad" ? <SquadAvatar /> : <DemoAvatar name={candidate.name} agent={kind === "agent"} />}
+ {candidate.name}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ ))}
+ </div>
+ )}
+ </dd>
+ </dl>
+
+ {at("leader") && run(t.leader, t.leaderSteps, phase === "leader", true)}
+ {at("leaderPosted") && (
+ <>
+ <DemoComment author={t.leader} agent>
+ <span className="block">
+ {mention(t.writer)} {t.dispatch.writer}
+ </span>
+ <span className="block">
+ {mention(t.you)} {t.dispatch.you}
+ </span>
+ </DemoComment>
+ <Activity actor={t.leader}>{t.dispatchActivity}</Activity>
+ </>
+ )}
+ {at("writer") && run(t.writer, t.writerSteps, phase === "writer")}
+ {at("writerPosted") && (
+ <DemoComment author={t.writer} agent>
+ {t.writerReply}
+ </DemoComment>
+ )}
+ {at("recheck") && run(t.leader, t.recheckSteps, phase === "recheck", true)}
+ {at("yourTurn") && <Activity actor={t.leader}>{t.noActionActivity}</Activity>}
+
+ {phase === "yourTurn" && (
+ <div className="rounded-lg border bg-background p-2 motion-safe:animate-in motion-safe:fade-in">
+ <div className="min-h-10 px-1 text-body">{t.yourDraft}</div>
+ <div className="mt-1 flex justify-end">
+ <CoachMark active side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ )}
+
+ {at("final") && (
+ <>
+ <DemoComment author={t.you}>{t.yourDraft}</DemoComment>
+ {run(t.leader, t.finalSteps, phase === "final", true)}
+ </>
+ )}
+ {phase === "done" && (
+ <>
+ <DemoComment author={t.leader} agent>
+ {t.summary}
+ </DemoComment>
+ <Activity actor={t.leader}>{t.finalActivity}</Activity>
+ </>
+ )}
+
+ {phase === "confirm" && (
+ <div className="absolute inset-0 z-20 flex items-center justify-center bg-background/60 p-4 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in">
+ <div
+ role="dialog"
+ aria-modal="false"
+ aria-labelledby="squad-demo-title"
+ className="w-full max-w-sm rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:zoom-in-95"
+ >
+ <div className="flex items-start gap-2 p-4 pb-3">
+ <div className="min-w-0 flex-1">
+ <div id="squad-demo-title" className="text-title-sm font-medium">
+ {t.confirmTitle}
+ </div>
+ <div className="mt-1 text-body text-muted-foreground">{t.confirmBody(t.squad)}</div>
+ </div>
+ <button
+ type="button"
+ aria-label={t.close}
+ onClick={replay}
+ className="rounded-md p-1 text-muted-foreground hover:bg-muted"
+ >
+ <X className="size-4" />
+ </button>
+ </div>
+ <div className="flex justify-end gap-2 rounded-b-xl border-t bg-muted/40 px-4 py-3">
+ <Button type="button" variant="outline" size="sm" disabled>
+ {t.dontStart}
+ </Button>
+ <CoachMark active side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" onClick={confirm}>
+ {t.confirm}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
+
+function SquadAvatar() {
+ return (
+ <span
+ aria-hidden
+ className="inline-flex size-5 shrink-0 items-center justify-center rounded-md bg-muted text-foreground"
+ >
+ <Users className="size-3" />
+ </span>
+ );
+}
+
+/** A line in the issue's activity timeline, e.g. the leader's recorded evaluation. */
+function Activity({ actor, children }: { actor: string; children: string }) {
+ return (
+ <div className="flex min-w-0 items-start gap-2 px-1 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <DemoAvatar name={actor} agent />
+ <span className="min-w-0 pt-0.5">
+ <span className="font-medium text-foreground">{actor}</span> {children}
+ </span>
+ </div>
+ );
+}
diff --git a/apps/docs/components/demos/steer-demo.tsx b/apps/docs/components/demos/steer-demo.tsx
new file mode 100644
index 0000000000..7601af7491
--- /dev/null
+++ b/apps/docs/components/demos/steer-demo.tsx
@@ -0,0 +1,306 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { CornerDownRight } from "lucide-react";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoReceipt,
+ DemoRun,
+ DemoSendButton,
+ DemoSteerMarker,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+const FEEDBACK_TOTAL = 86;
+
+const copy = {
+ en: {
+ title: "OPS-12 · Turn this month's customer feedback into a weekly-meeting summary",
+ agent: "Ops helper",
+ you: "You",
+ running: "Running",
+ completed: "Completed",
+ readTask: "Read the issue description and discussion",
+ openSheet: `Open the feedback sheet (${FEEDBACK_TOTAL} entries)`,
+ perItem: (n: number) => `Write a summary for each entry (${n}/${FEEDBACK_TOTAL})`,
+ afterSteer: [
+ "Group the feedback by theme: pricing, getting started, support response",
+ "Write one takeaway per theme and pick 1–2 customer quotes",
+ "Put it together on a single page",
+ ],
+ draft:
+ "No need to summarize every entry. Group them by theme, give each theme one takeaway and 1–2 quotes, and keep it to one page.",
+ placeholder: "Leave a comment...",
+ chip: "Add to current run",
+ send: "Send",
+ waiting: "Waiting for Ops helper to read it",
+ read: "Read by Ops helper · after step 3",
+ steerLabel: "You steered",
+ steerDetail: "Read",
+ reply:
+ "The summary is ready: three themes, each with one takeaway and two customer quotes, all on one page.",
+ captions: {
+ idle: "Ops helper is working on this issue.",
+ working: "Ops helper is heading the wrong way: it is summarizing all 86 entries one by one.",
+ ready: "The correction is already in the composer, and its recipient says \"Add to current run\". Click send.",
+ sent: "Sent. Ops helper reads it as soon as the current step ends.",
+ read: "It read the message and kept going in the new direction instead of starting over.",
+ done: "Same run, new direction, original task finished. Use Replay to watch again.",
+ },
+ },
+ zh: {
+ title: "OPS-12 · 把本月客户反馈整理成周会汇报",
+ agent: "运营助手",
+ you: "你",
+ running: "运行中",
+ completed: "已完成",
+ readTask: "读取任务描述和讨论",
+ openSheet: `打开客户反馈表(共 ${FEEDBACK_TOTAL} 条)`,
+ perItem: (n: number) => `逐条撰写反馈摘要(${n}/${FEEDBACK_TOTAL})`,
+ afterSteer: [
+ "按主题归类:价格、上手难度、客服响应",
+ "每类写一句结论,挑 1–2 条客户原话",
+ "整理成一页汇报",
+ ],
+ draft: "不用逐条写摘要。按主题分几类,每类一句结论加 1–2 条原话,一页纸以内。",
+ placeholder: "留下评论...",
+ chip: "插话到当前运行",
+ send: "发送",
+ waiting: "等待 运营助手 读取",
+ read: "运营助手 已读取 · 第 3 步后",
+ steerLabel: "你 插话",
+ steerDetail: "已读取",
+ reply: "汇报已整理好:反馈分成 3 类,每类一句结论和 2 条客户原话,控制在一页内。",
+ captions: {
+ idle: "运营助手 正在执行这条任务。",
+ working: "运营助手 的方向跑偏了:它在给 86 条反馈逐条写摘要。",
+ ready: "评论框里已经写好了修正,收件人标签是\"插话到当前运行\"。点击发送。",
+ sent: "插话已发出。运营助手 会在当前步骤结束后读到。",
+ read: "它读到插话后没有从头开始,而是沿着新方向继续执行原任务。",
+ done: "同一次运行、换了方向、完成了原任务。点右上角可以重新演示。",
+ },
+ },
+ ja: {
+ title: "OPS-12 · 今月の顧客フィードバックを週次ミーティング用にまとめる",
+ agent: "運用アシスタント",
+ you: "あなた",
+ running: "実行中",
+ completed: "完了",
+ readTask: "タスクの説明とコメントを読む",
+ openSheet: `フィードバック表を開く(全 ${FEEDBACK_TOTAL} 件)`,
+ perItem: (n: number) => `1 件ずつ要約を書く(${n}/${FEEDBACK_TOTAL})`,
+ afterSteer: [
+ "テーマ別に分ける:価格、使い始めやすさ、サポートの対応",
+ "テーマごとに結論を 1 文書き、顧客の声を 1〜2 件選ぶ",
+ "1 ページにまとめる",
+ ],
+ draft:
+ "1 件ずつ要約しなくて大丈夫です。テーマ別に分けて、テーマごとに結論 1 文と顧客の声 1〜2 件、全体で 1 ページ以内にしてください。",
+ placeholder: "コメントを残す...",
+ chip: "現在の実行に追加",
+ send: "送信",
+ waiting: "運用アシスタント が読むのを待っています",
+ read: "運用アシスタント が読みました · ステップ 3 の後",
+ steerLabel: "あなた が追加",
+ steerDetail: "既読",
+ reply: "まとめができました。フィードバックを 3 つのテーマに分け、それぞれ結論 1 文と顧客の声 2 件を付けて 1 ページに収めています。",
+ captions: {
+ idle: "運用アシスタント がこのタスクを実行しています。",
+ working: "運用アシスタント の進め方がずれています。86 件のフィードバックを 1 件ずつ要約しています。",
+ ready: "修正の指示はもうコメント欄に書いてあり、送り先は「現在の実行に追加」になっています。送信をクリックします。",
+ sent: "送信しました。運用アシスタント は今のステップが終わりしだい読みます。",
+ read: "メッセージを読んだあと、最初からやり直さずに新しい方向で作業を続けています。",
+ done: "同じ実行のまま方向を変え、元のタスクを終えました。「もう一度」で最初から見られます。",
+ },
+ },
+ ko: {
+ title: "OPS-12 · 이번 달 고객 피드백을 주간 회의 보고로 정리",
+ agent: "운영 도우미",
+ you: "나",
+ running: "실행 중",
+ completed: "완료됨",
+ readTask: "태스크 설명과 댓글 읽기",
+ openSheet: `고객 피드백 시트 열기(총 ${FEEDBACK_TOTAL}건)`,
+ perItem: (n: number) => `피드백을 한 건씩 요약(${n}/${FEEDBACK_TOTAL})`,
+ afterSteer: [
+ "주제별로 분류: 가격, 시작 난이도, 고객 지원 응답",
+ "주제마다 결론 한 문장을 쓰고 고객 발언 1~2개 고르기",
+ "한 페이지로 정리",
+ ],
+ draft:
+ "한 건씩 요약할 필요 없어요. 주제별로 나누고, 주제마다 결론 한 문장과 고객 발언 1~2개만 넣어 한 페이지 안으로 정리해 주세요.",
+ placeholder: "댓글 남기기...",
+ chip: "현재 실행에 추가",
+ send: "보내기",
+ waiting: "운영 도우미가 읽기를 기다리는 중",
+ read: "운영 도우미가 읽음 · 3단계 후",
+ steerLabel: "내가 추가",
+ steerDetail: "읽음",
+ reply: "보고를 정리했습니다. 피드백을 3개 주제로 나누고, 주제마다 결론 한 문장과 고객 발언 2개를 붙여 한 페이지에 담았습니다.",
+ captions: {
+ idle: "운영 도우미가 이 태스크를 실행하고 있습니다.",
+ working: "운영 도우미가 엉뚱한 방향으로 가고 있습니다. 피드백 86건을 한 건씩 요약하는 중입니다.",
+ ready: "수정 내용은 이미 댓글 입력란에 있고, 받는 사람 표시는 '현재 실행에 추가'입니다. 보내기를 클릭하세요.",
+ sent: "보냈습니다. 운영 도우미는 현재 단계가 끝나는 대로 읽습니다.",
+ read: "메시지를 읽은 뒤 처음부터 다시 하지 않고 새 방향으로 이어서 작업합니다.",
+ done: "같은 실행에서 방향만 바꿔 원래 태스크를 끝냈습니다. '다시 보기'로 다시 볼 수 있습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-12 · Résumer les retours clients du mois pour la réunion hebdo",
+ agent: "Assistant ops",
+ you: "Vous",
+ running: "En cours",
+ completed: "Terminée",
+ readTask: "Lire la description et la discussion de la tâche",
+ openSheet: `Ouvrir le tableau des retours (${FEEDBACK_TOTAL} entrées)`,
+ perItem: (n: number) => `Résumer chaque entrée (${n}/${FEEDBACK_TOTAL})`,
+ afterSteer: [
+ "Regrouper les retours par thème : prix, prise en main, réactivité du support",
+ "Écrire une conclusion par thème et choisir 1 à 2 citations de clients",
+ "Tout rassembler sur une seule page",
+ ],
+ draft:
+ "Inutile de résumer chaque entrée. Regroupez-les par thème, avec une conclusion et 1 à 2 citations par thème, sur une page au maximum.",
+ placeholder: "Laisser un commentaire...",
+ chip: "Ajouter à l'exécution en cours",
+ send: "Envoyer",
+ waiting: "En attente de lecture par Assistant ops",
+ read: "Lu par Assistant ops · après l'étape 3",
+ steerLabel: "Vous avez ajouté",
+ steerDetail: "Lu",
+ reply: "Le résumé est prêt : trois thèmes, chacun avec une conclusion et deux citations de clients, le tout sur une page.",
+ captions: {
+ idle: "Assistant ops travaille sur cette tâche.",
+ working: "Assistant ops part dans la mauvaise direction : il résume les 86 entrées une par une.",
+ ready:
+ "La correction est déjà dans la zone de commentaire, et son destinataire indique « Ajouter à l'exécution en cours ». Cliquez sur envoyer.",
+ sent: "Envoyé. Assistant ops le lira dès la fin de l'étape en cours.",
+ read: "Il a lu le message et poursuit dans la nouvelle direction au lieu de tout recommencer.",
+ done: "Même exécution, nouvelle direction, tâche d'origine terminée. Utilisez Rejouer pour revoir la démo.",
+ },
+ },
+};
+
+type Phase = "idle" | "working" | "ready" | "sent" | "read" | "done";
+
+export function SteerDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [run, setRun] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [stepsShown, setStepsShown] = useState(0);
+ const [count, setCount] = useState(1);
+ const [newSteps, setNewSteps] = useState(0);
+
+ // Opening: the agent works through its first steps, then starts the
+ // item-by-item loop the reader is about to correct.
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ setPhase("working");
+ setStepsShown(1);
+ after(900, () => setStepsShown(2));
+ after(1900, () => setStepsShown(3));
+ after(2600, () => setPhase("ready"));
+ }, [visible, run, after, clear]);
+
+ // The wrong-direction loop keeps ticking until the steer is read.
+ const looping = stepsShown >= 3 && (phase === "working" || phase === "ready" || phase === "sent");
+ useEffect(() => {
+ if (!looping) return;
+ const id = window.setInterval(() => setCount((n) => Math.min(n + 1, 5)), 900);
+ return () => window.clearInterval(id);
+ }, [looping]);
+
+ const send = () => {
+ setPhase("sent");
+ after(1800, () => setPhase("read"));
+ for (let i = 1; i <= t.afterSteer.length; i++) after(1800 + i * 900, () => setNewSteps(i));
+ after(1800 + t.afterSteer.length * 900 + 900, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setStepsShown(0);
+ setCount(1);
+ setNewSteps(0);
+ setPhase("idle");
+ setRun((r) => r + 1);
+ };
+
+ const sent = phase === "sent" || phase === "read" || phase === "done";
+ const read = phase === "read" || phase === "done";
+ // Only once the opening has finished: its last timer moves the phase to
+ // "ready" and would otherwise overwrite a steer sent during the opening.
+ const canSend = phase === "ready";
+ const caption =
+ phase === "working" && stepsShown >= 3 ? t.captions.working : t.captions[phase];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="flex min-h-80 flex-col gap-3 p-4">
+ <DemoRun
+ agent={t.agent}
+ status={phase === "done" ? t.completed : t.running}
+ active={phase !== "done"}
+ >
+ {stepsShown >= 1 && <DemoStep state={stepsShown > 1 ? "done" : "running"}>{t.readTask}</DemoStep>}
+ {stepsShown >= 2 && <DemoStep state={stepsShown > 2 ? "done" : "running"}>{t.openSheet}</DemoStep>}
+ {stepsShown >= 3 && (
+ <DemoStep state={read ? "done" : "running"}>{t.perItem(count)}</DemoStep>
+ )}
+ {read && <DemoSteerMarker label={t.steerLabel} detail={t.steerDetail} />}
+ {t.afterSteer.slice(0, newSteps).map((step, i) => (
+ <DemoStep key={step} state={i === newSteps - 1 && phase !== "done" ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+
+ {sent && (
+ <DemoComment
+ author={t.you}
+ footer={<DemoReceipt read={read}>{read ? t.read : t.waiting}</DemoReceipt>}
+ >
+ {t.draft}
+ </DemoComment>
+ )}
+
+ {phase === "done" && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ <div className="mt-auto rounded-lg border bg-background p-2">
+ {/* Static text, not an input: the demo is scripted around this exact correction. */}
+ <div className="min-h-12 px-1 text-body">
+ {sent || phase === "idle" ? <span className="text-muted-foreground">{t.placeholder}</span> : t.draft}
+ </div>
+ <div className="mt-1.5 flex items-center gap-2">
+ {!sent && phase !== "idle" && (
+ <span className="inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md border border-brand/28 bg-brand/7 px-1.5 text-caption dark:border-brand/45 dark:bg-brand/12">
+ <DemoAvatar name={t.agent} agent />
+ <span className="truncate">{t.agent}</span>
+ <CornerDownRight aria-hidden className="size-3 shrink-0 text-brand" />
+ <span className="truncate font-medium">{t.chip}</span>
+ </span>
+ )}
+ <span className="ml-auto" />
+ <CoachMark active={phase === "ready" && canSend} side="left" ringClassName="rounded-full">
+ <DemoSendButton label={t.send} disabled={!canSend} onClick={send} />
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/trigger-chooser-demo.tsx b/apps/docs/components/demos/trigger-chooser-demo.tsx
new file mode 100644
index 0000000000..a4c41a40f7
--- /dev/null
+++ b/apps/docs/components/demos/trigger-chooser-demo.tsx
@@ -0,0 +1,455 @@
+"use client";
+
+import { useState } from "react";
+import { ArrowRight, Check } from "lucide-react";
+import { cn } from "@multica/ui/lib/utils";
+import { LocaleLink } from "@/components/locale-link";
+import { CoachMark, DemoFrame, useDemoCopy, useStartWhenVisible } from "./demo-kit";
+
+type Choice = {
+ /** The situation, worded as in the page's table. */
+ need: string;
+ method: string;
+ how: string;
+ why: string;
+ page: string;
+ href: string;
+};
+
+const copy = {
+ en: {
+ title: "Which way should I start the work?",
+ needsLabel: "What you need",
+ useLabel: "Use",
+ howLabel: "How",
+ whyLabel: "Why",
+ choices: [
+ {
+ need: "Have an agent own an issue",
+ method: "Assign",
+ how: "Open the issue, click Assignee, and choose an agent or squad.",
+ why: "The agent reads the issue's description and discussion and writes progress and results back to the same issue.",
+ page: "Assign issues to agents",
+ href: "/assigning-issues",
+ },
+ {
+ need: "Ask for help without changing the assignee",
+ method: "@mention",
+ how: "@mention the agent in a comment, or reply to its comment to continue.",
+ why: "The comment becomes the starting point for the run; the issue's assignee and status stay unchanged.",
+ page: "@-mention agents in comments",
+ href: "/mentioning-agents",
+ },
+ {
+ need: "Send the same kind of request often",
+ method: "Quick action",
+ how: "Save the request as a quick action and use it from the issue.",
+ why: "Save who to ask and what to say once, then use the same request on other issues.",
+ page: "Quick Actions",
+ href: "/quick-actions",
+ },
+ {
+ need: "Pass work through a repeatable set of steps",
+ method: "Workflow",
+ how: "Choose a project workflow and who takes over at each step.",
+ why: "The description, discussion, and earlier results stay on the same issue, so whoever handles the next step picks up where the last one left off.",
+ page: "Workflows",
+ href: "/workflows",
+ },
+ {
+ need: "Ask a question without creating an issue",
+ method: "Chat",
+ how: "Start a chat with the agent.",
+ why: "A chat is not bound to any issue, and the entire conversation is private to you.",
+ page: "Chat with agents",
+ href: "/chat",
+ },
+ {
+ need: "Start recurring work by time or an outside event",
+ method: "Autopilot",
+ how: "Create an autopilot with an assignee and one or more triggers.",
+ why: "When triggered, Multica creates an issue or runs the agent directly, and keeps a record of every run.",
+ page: "Autopilots",
+ href: "/autopilots",
+ },
+ {
+ need: "Have an agent come back to an issue later",
+ method: "Wakeup",
+ how: "In the issue sidebar, add a wakeup with a time or an event to wait for.",
+ why: "When the time comes or the event happens, the agent starts a new run on the same issue and continues from where things stand.",
+ page: "Issue wakeups",
+ href: "/issue-wakeups",
+ },
+ ] as Choice[],
+ readMore: (page: string) => `Read: ${page}`,
+ captions: {
+ idle: "Seven things you might want an agent to do.",
+ start: "Pick what you need to see which way fits.",
+ picked: (method: string) => `Use ${method}. Pick another need to compare.`,
+ },
+ },
+ zh: {
+ title: "该用哪种方式让智能体开始工作?",
+ needsLabel: "你想做什么",
+ useLabel: "使用",
+ howLabel: "怎么做",
+ whyLabel: "为什么",
+ choices: [
+ {
+ need: "让智能体负责一条任务",
+ method: "分配任务",
+ how: "打开任务,点击负责人,选择智能体或小队。",
+ why: "智能体会读取任务的说明和讨论,并把进展和结果写回原来的任务。",
+ page: "分配任务给智能体",
+ href: "/assigning-issues",
+ },
+ {
+ need: "请求帮助,保留原来的负责人",
+ method: "@提及",
+ how: "在评论中 @智能体,或回复它的评论继续讨论。",
+ why: "评论会成为这次执行的起点,任务的负责人和状态都不会改变。",
+ page: "在评论中 @智能体",
+ href: "/mentioning-agents",
+ },
+ {
+ need: "经常发送同一类请求",
+ method: "快捷操作",
+ how: "把请求保存成快捷操作,在任务中直接使用。",
+ why: "保存一次\"请谁来做、做什么\",之后就能在其他任务上重复使用。",
+ page: "快捷操作",
+ href: "/quick-actions",
+ },
+ {
+ need: "让任务按固定步骤交给不同处理人",
+ method: "工作流",
+ how: "为项目选择工作流,安排每一步由谁接手。",
+ why: "任务的描述、讨论和之前的结果都留在原处,下一位处理人可以接着做。",
+ page: "工作流",
+ href: "/workflows",
+ },
+ {
+ need: "问一个问题,不需要新建任务",
+ method: "对话",
+ how: "与智能体开始对话。",
+ why: "对话不绑定某一条任务,整段对话完全私人。",
+ page: "与智能体对话",
+ href: "/chat",
+ },
+ {
+ need: "按时间或外部事件开展重复性工作",
+ method: "自动化",
+ how: "创建自动化,选好执行方和触发器。",
+ why: "触发后,Multica 会创建任务或直接运行智能体,并保留每一次运行记录。",
+ page: "自动化",
+ href: "/autopilots",
+ },
+ {
+ need: "让智能体之后再回到某条任务",
+ method: "任务唤醒",
+ how: "在任务侧栏添加唤醒,设好要等的时间或事件。",
+ why: "时间到了或事件发生后,智能体在同一条任务上开始新的运行,接着现在的进度做。",
+ page: "任务唤醒",
+ href: "/issue-wakeups",
+ },
+ ] as Choice[],
+ readMore: (page: string) => `详见${page}`,
+ captions: {
+ idle: "你可能想让智能体做的七类事。",
+ start: "选一件你想做的事,看看该用哪种方式。",
+ // Space before a method that starts with "@" or a Latin letter, e.g. "用 @提及".
+ picked: (method: string) => `用${/^[@A-Za-z]/.test(method) ? " " : ""}${method}。换一件事可以对比。`,
+ },
+ },
+ ja: {
+ title: "どの方法でエージェントに作業を始めてもらう?",
+ needsLabel: "やりたいこと",
+ useLabel: "使うもの",
+ howLabel: "やり方",
+ whyLabel: "理由",
+ choices: [
+ {
+ need: "エージェントにタスクを任せる",
+ method: "割り当て",
+ how: "タスクを開き、担当者をクリックして、エージェントかスクワッドを選びます。",
+ why: "エージェントはタスクの説明と議論を読み、進捗と結果を同じタスクに書き戻します。",
+ page: "タスクをエージェントに割り当てる",
+ href: "/assigning-issues",
+ },
+ {
+ need: "担当者を変えずに相談する",
+ method: "@メンション",
+ how: "コメントでエージェントを @メンションするか、そのエージェントのコメントに返信して続けます。",
+ why: "コメントがこの実行の起点になります。タスクの担当者とステータスは変わりません。",
+ page: "コメントでエージェントを @メンション",
+ href: "/mentioning-agents",
+ },
+ {
+ need: "同じ種類の依頼を繰り返す",
+ method: "クイックアクション",
+ how: "依頼をクイックアクションとして保存し、タスクから使います。",
+ why: "誰に何を頼むかを一度保存すれば、ほかのタスクでも同じ依頼を使えます。",
+ page: "クイックアクション",
+ href: "/quick-actions",
+ },
+ {
+ need: "決まったステップで担当者を引き継ぐ",
+ method: "ワークフロー",
+ how: "プロジェクトのワークフローを選び、各ステップを誰が引き継ぐか決めます。",
+ why: "説明、議論、それまでの結果が同じタスクに残るので、次のステップの担当者は前の続きから進められます。",
+ page: "ワークフロー",
+ href: "/workflows",
+ },
+ {
+ need: "タスクを作らず質問する",
+ method: "チャット",
+ how: "エージェントとチャットを始めます。",
+ why: "チャットはどのタスクにも紐づかず、会話全体があなただけのものです。",
+ page: "エージェントとのチャット",
+ href: "/chat",
+ },
+ {
+ need: "時刻や外部イベントから繰り返し作業を始める",
+ method: "オートパイロット",
+ how: "担当者と 1 つ以上のトリガーを設定して、オートパイロットを作成します。",
+ why: "トリガーされると、Multica はタスクを作成するか、エージェントを直接実行し、毎回の実行を記録に残します。",
+ page: "オートパイロット",
+ href: "/autopilots",
+ },
+ {
+ need: "あとでエージェントにタスクへ戻ってもらう",
+ method: "ウェイクアップ",
+ how: "タスクのサイドバーで、待つ時刻やイベントを決めてウェイクアップを追加します。",
+ why: "時刻になるかイベントが起きると、エージェントは同じタスクで新しい実行を始め、今の状況から続けます。",
+ page: "タスクのウェイクアップ",
+ href: "/issue-wakeups",
+ },
+ ] as Choice[],
+ readMore: (page: string) => `詳しくは${page}`,
+ captions: {
+ idle: "エージェントに頼みたいことは、主に 7 種類あります。",
+ start: "やりたいことを選ぶと、合う方法が表示されます。",
+ picked: (method: string) => `${method}を使います。別の項目を選ぶと比べられます。`,
+ },
+ },
+ ko: {
+ title: "어떤 방식으로 작업을 시작할까요?",
+ needsLabel: "하고 싶은 일",
+ useLabel: "사용할 기능",
+ howLabel: "방법",
+ whyLabel: "이유",
+ choices: [
+ {
+ need: "에이전트에게 태스크 맡기기",
+ method: "할당",
+ how: "태스크를 열고 담당자를 클릭한 뒤 에이전트나 스쿼드를 선택합니다.",
+ why: "에이전트가 태스크의 설명과 논의를 읽고, 진행 상황과 결과를 같은 태스크에 기록합니다.",
+ page: "태스크를 에이전트에게 할당하기",
+ href: "/assigning-issues",
+ },
+ {
+ need: "담당자를 바꾸지 않고 도움 요청하기",
+ method: "@멘션",
+ how: "댓글에서 에이전트를 @멘션하거나, 에이전트 댓글에 답글을 달아 이어 갑니다.",
+ why: "댓글이 이번 실행의 출발점이 되며, 태스크의 담당자와 상태는 바뀌지 않습니다.",
+ page: "댓글에서 에이전트 @멘션하기",
+ href: "/mentioning-agents",
+ },
+ {
+ need: "같은 종류의 요청 반복하기",
+ method: "퀵 액션",
+ how: "요청을 퀵 액션으로 저장해 태스크에서 사용합니다.",
+ why: "누구에게 무엇을 요청할지 한 번 저장해 두면 다른 태스크에서도 같은 요청을 쓸 수 있습니다.",
+ page: "퀵 액션",
+ href: "/quick-actions",
+ },
+ {
+ need: "정해진 단계마다 다른 담당자에게 넘기기",
+ method: "워크플로",
+ how: "프로젝트 워크플로를 선택하고 단계마다 누가 이어받을지 정합니다.",
+ why: "설명, 논의, 이전 결과가 같은 태스크에 남아 있어 다음 단계 담당자가 이어서 작업할 수 있습니다.",
+ page: "워크플로",
+ href: "/workflows",
+ },
+ {
+ need: "태스크를 만들지 않고 질문하기",
+ method: "채팅",
+ how: "에이전트와 채팅을 시작합니다.",
+ why: "채팅은 특정 태스크에 묶이지 않으며, 대화 전체를 나만 볼 수 있습니다.",
+ page: "에이전트와 대화",
+ href: "/chat",
+ },
+ {
+ need: "일정이나 외부 이벤트에 따라 반복 작업 시작하기",
+ method: "오토파일럿",
+ how: "담당자와 트리거를 하나 이상 정해 오토파일럿을 만듭니다.",
+ why: "트리거되면 Multica가 태스크를 만들거나 에이전트를 바로 실행하고, 모든 실행 기록을 남깁니다.",
+ page: "오토파일럿",
+ href: "/autopilots",
+ },
+ {
+ need: "나중에 에이전트가 태스크로 돌아오게 하기",
+ method: "깨우기",
+ how: "태스크 사이드바에서 기다릴 시각이나 이벤트를 정해 깨우기를 추가합니다.",
+ why: "시각이 되거나 이벤트가 생기면 에이전트가 같은 태스크에서 새 실행을 시작해 지금 상황부터 이어 갑니다.",
+ page: "태스크 깨우기",
+ href: "/issue-wakeups",
+ },
+ ] as Choice[],
+ readMore: (page: string) => `자세히: ${page}`,
+ captions: {
+ idle: "에이전트에게 맡길 만한 일 일곱 가지입니다.",
+ start: "하고 싶은 일을 고르면 맞는 방법을 보여 줍니다.",
+ // Phrased so no particle has to agree with the method's final consonant.
+ picked: (method: string) => `${method} 기능을 사용하세요. 다른 일을 골라 비교해 보세요.`,
+ },
+ },
+ fr: {
+ title: "Comment lancer le travail ?",
+ needsLabel: "Votre besoin",
+ useLabel: "À utiliser",
+ howLabel: "Comment",
+ whyLabel: "Pourquoi",
+ choices: [
+ {
+ need: "Confier une tâche à un agent",
+ method: "Assignation",
+ how: "Ouvrez la tâche, cliquez sur Assigné à et choisissez un agent ou un squad.",
+ why: "L'agent lit la description et la discussion de la tâche, puis réécrit l'avancement et les résultats dans la même tâche.",
+ page: "Assigner des tâches aux agents",
+ href: "/assigning-issues",
+ },
+ {
+ need: "Demander de l'aide sans changer le responsable",
+ method: "@mention",
+ how: "@mentionnez l'agent dans un commentaire, ou répondez à son commentaire pour continuer.",
+ why: "Le commentaire devient le point de départ de l'exécution ; l'assigné et le statut de la tâche ne changent pas.",
+ page: "@mentionner des agents dans les commentaires",
+ href: "/mentioning-agents",
+ },
+ {
+ need: "Envoyer souvent le même type de demande",
+ method: "Action rapide",
+ how: "Enregistrez la demande comme action rapide et utilisez-la depuis la tâche.",
+ why: "Enregistrez une fois à qui demander et quoi dire, puis réutilisez la même demande sur d'autres tâches.",
+ page: "Actions rapides",
+ href: "/quick-actions",
+ },
+ {
+ need: "Transmettre le travail selon des étapes répétées",
+ method: "Workflow",
+ how: "Choisissez un workflow de projet et qui prend le relais à chaque étape.",
+ why: "La description, la discussion et les résultats précédents restent sur la même tâche : la personne suivante reprend là où la précédente s'est arrêtée.",
+ page: "Workflows",
+ href: "/workflows",
+ },
+ {
+ need: "Poser une question sans créer de tâche",
+ method: "Discussion",
+ how: "Démarrez une discussion avec l'agent.",
+ why: "Une discussion n'est liée à aucune tâche, et toute la conversation reste privée.",
+ page: "Discuter avec des agents",
+ href: "/chat",
+ },
+ {
+ need: "Commencer un travail récurrent selon une date ou un événement extérieur",
+ method: "Automatisation",
+ how: "Créez une automatisation avec un assigné et un ou plusieurs déclencheurs.",
+ why: "Une fois déclenchée, Multica crée une tâche ou exécute directement l'agent, et garde une trace de chaque exécution.",
+ page: "Automatisations",
+ href: "/autopilots",
+ },
+ {
+ need: "Faire revenir un agent sur une tâche plus tard",
+ method: "Réveil",
+ how: "Dans la barre latérale de la tâche, ajoutez un réveil avec l'heure ou l'événement à attendre.",
+ why: "À l'heure dite ou quand l'événement se produit, l'agent démarre une nouvelle exécution sur la même tâche et reprend là où en sont les choses.",
+ page: "Réveils de tâches",
+ href: "/issue-wakeups",
+ },
+ ] as Choice[],
+ readMore: (page: string) => `Voir : ${page}`,
+ captions: {
+ idle: "Sept choses que vous pourriez demander à un agent.",
+ start: "Choisissez votre besoin pour voir la méthode adaptée.",
+ picked: (method: string) => `À utiliser : ${method}. Choisissez un autre besoin pour comparer.`,
+ },
+ },
+};
+
+export function TriggerChooserDemo() {
+ const t = useDemoCopy(copy);
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [picked, setPicked] = useState<number | null>(null);
+
+ const choice = picked === null ? null : t.choices[picked];
+ const caption = !visible ? t.captions.idle : choice ? t.captions.picked(choice.method) : t.captions.start;
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={() => setPicked(null)}>
+ <div className="grid gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)]">
+ <div className="min-w-0">
+ <div id="trigger-chooser-needs" className="mb-1.5 text-micro text-muted-foreground">
+ {t.needsLabel}
+ </div>
+ <ul aria-labelledby="trigger-chooser-needs" className="flex flex-col gap-1">
+ {t.choices.map((c, i) => (
+ <li key={c.need} className="flex">
+ <CoachMark
+ active={visible && picked === null && i === 0}
+ side="right"
+ ringClassName="rounded-md"
+ className="flex w-full"
+ >
+ <button
+ type="button"
+ aria-pressed={picked === i}
+ disabled={!visible}
+ onClick={() => setPicked(i)}
+ className={cn(
+ "flex w-full items-center gap-2 rounded-md border px-2.5 py-1.5 text-left text-body transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
+ picked === i ? "border-brand bg-brand/10 font-medium" : "bg-background hover:bg-muted",
+ )}
+ >
+ <span className="min-w-0 flex-1">{c.need}</span>
+ {picked === i && <Check aria-hidden className="size-3.5 shrink-0 text-brand" />}
+ </button>
+ </CoachMark>
+ </li>
+ ))}
+ </ul>
+ </div>
+
+ <div className={cn("min-w-0", !choice && "max-sm:hidden")}>
+ {choice ? (
+ <div
+ key={picked}
+ className="flex h-full flex-col gap-2.5 rounded-lg border bg-background p-3 motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div>
+ <div className="text-micro text-muted-foreground">{t.useLabel}</div>
+ <div className="text-title-sm font-medium text-brand">{choice.method}</div>
+ </div>
+ <div>
+ <div className="text-micro text-muted-foreground">{t.howLabel}</div>
+ <p className="text-body">{choice.how}</p>
+ </div>
+ <div>
+ <div className="text-micro text-muted-foreground">{t.whyLabel}</div>
+ <p className="text-body text-muted-foreground">{choice.why}</p>
+ </div>
+ <LocaleLink
+ href={choice.href}
+ className="mt-auto inline-flex w-fit items-center gap-1 text-label font-medium text-brand hover:underline"
+ >
+ {t.readMore(choice.page)}
+ <ArrowRight aria-hidden className="size-3.5" />
+ </LocaleLink>
+ </div>
+ ) : (
+ <div aria-hidden className="h-full rounded-lg border border-dashed" />
+ )}
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/usage-demo.tsx b/apps/docs/components/demos/usage-demo.tsx
new file mode 100644
index 0000000000..9e5828e898
--- /dev/null
+++ b/apps/docs/components/demos/usage-demo.tsx
@@ -0,0 +1,925 @@
+"use client";
+
+import { useEffect, useState, type CSSProperties } from "react";
+import { BarChart3, CalendarDays, ChevronDown, FolderKanban, RefreshCw } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoFrame,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Metric = "tokens" | "cost" | "time" | "runs";
+type Dim = "daily" | "weekly";
+type Tab = "usage" | "errors";
+type AgentKey = "ops" | "writing" | "support";
+type FailureClass = "auth" | "rate_limit" | "timeout";
+type Phase = "idle" | "metric" | "weekly" | "sort" | "errors" | "codes" | "done";
+
+// The product formats chart dates in English for every locale
+// (formatShortDate in packages/views/runtimes/utils.ts), so the demo does too.
+const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+const shortDate = (month: number, day: number) => `${MONTHS[month - 1]} ${day}`;
+
+const copy = {
+ en: {
+ title: "Analytics · Ops team, last 30 days",
+ pageTitle: "Analytics",
+ freshness: "GMT+8 · updated 10:30",
+ refresh: "Refresh",
+ tabs: { usage: "Usage", errors: "Errors" } as Record<Tab, string>,
+ periodLabel: "Time range",
+ projectLabel: "Project",
+ allProjects: "All projects",
+ kpi: {
+ cost: "Cost · 30D",
+ tokens: "Tokens · 30D",
+ tokensHint: "Input 1.1M · Output 0.3M",
+ time: "Run time · 30D",
+ timeHint: "Across 143 runs",
+ runs: "Runs · 30D",
+ runsHint: "9 failed",
+ },
+ metricLabel: "Metric",
+ dimLabel: "Dimension",
+ metrics: { tokens: "Tokens", cost: "Cost", time: "Time", runs: "Runs" } as Record<Metric, string>,
+ dims: { daily: "Daily", weekly: "Weekly" } as Record<Dim, string>,
+ chartTitle: {
+ daily: { tokens: "Daily tokens", cost: "Daily cost" },
+ weekly: { tokens: "Weekly tokens", cost: "Weekly cost" },
+ },
+ shortDate,
+ partial: (range: string, covered: number) => `${range} (partial · ${covered} / 7 days)`,
+ leaderboard: {
+ title: "Leaderboard",
+ sortLabel: "Rank agents by",
+ caption: "3 agents",
+ agent: "Agent",
+ },
+ agents: { ops: "Ops helper", writing: "Writing helper", support: "Support helper" } as Record<AgentKey, string>,
+ errors: {
+ failedLabel: "Failed runs · 30D",
+ failedHint: "Of 143 runs",
+ rateLabel: "Failure rate · 30D",
+ rateHint: "9 of 143 runs failed · 6.3%",
+ agentsLabel: "Agents affected · 30D",
+ agentsHint: "Worst Support helper · 6",
+ mixTitle: "Failure mix · 9",
+ showCodes: "Show error codes",
+ hideCodes: "Hide error codes",
+ classes: { auth: "Auth", rate_limit: "Rate limit", timeout: "Timeout" } as Record<FailureClass, string>,
+ byAgent: "Top offenders",
+ sortLabel: "Rank offenders by",
+ sortFailed: "Failures",
+ sortRate: "Rate",
+ headerFailed: "Failed",
+ headerRuns: "Runs",
+ headerRate: "Rate",
+ },
+ captions: {
+ idle: "Analytics for an operations team's three agents over the last 30 days.",
+ metric: "The trend card charts tokens per day by default. Click Cost to see what each day cost.",
+ weekly: "Weekdays cost more than weekends. Click Weekly to see each week's total.",
+ sort: "Cost rises week over week; the faded bar is this week, still in progress. The leaderboard below ranks by tokens. Click Cost to re-rank it.",
+ errors:
+ "Writing helper uses the most tokens, yet Ops helper costs the most: its model has a higher rate. Click the Errors tab to see which runs failed.",
+ codes: "9 of 143 runs failed, 6 of them Support helper's. Click Show error codes to see the exact reasons.",
+ done: "5 failures are agent_error.provider_auth_or_access, and the bars show they all belong to Support helper: sign in to its AI coding tool again on its runtime, then retry. Use Replay to watch again.",
+ } as Record<Phase, string>,
+ },
+ zh: {
+ title: "统计 · 运营团队近 30 天",
+ pageTitle: "统计",
+ freshness: "GMT+8 · 更新于 10:30",
+ refresh: "刷新",
+ tabs: { usage: "用量", errors: "错误" } as Record<Tab, string>,
+ periodLabel: "时间范围",
+ projectLabel: "项目",
+ allProjects: "全部项目",
+ kpi: {
+ cost: "费用 · 30天",
+ tokens: "Token · 30天",
+ tokensHint: "输入 1.1M · 输出 0.3M",
+ time: "耗时 · 30天",
+ timeHint: "共 143 次运行",
+ runs: "运行数 · 30天",
+ runsHint: "失败 9 个",
+ },
+ metricLabel: "指标",
+ dimLabel: "维度",
+ metrics: { tokens: "Token", cost: "费用", time: "耗时", runs: "运行数" } as Record<Metric, string>,
+ dims: { daily: "按天", weekly: "按周" } as Record<Dim, string>,
+ chartTitle: {
+ daily: { tokens: "每日 Token", cost: "每日费用" },
+ weekly: { tokens: "每周 Token", cost: "每周费用" },
+ },
+ shortDate,
+ partial: (range: string, covered: number) => `${range}(未满 · 已过 ${covered} / 7 天)`,
+ leaderboard: {
+ title: "排行榜",
+ sortLabel: "智能体排序依据",
+ caption: "3 个智能体",
+ agent: "智能体",
+ },
+ agents: { ops: "运营助手", writing: "文案助手", support: "客服助手" } as Record<AgentKey, string>,
+ errors: {
+ failedLabel: "失败运行 · 30天",
+ failedHint: "共 143 次运行",
+ rateLabel: "失败率 · 30天",
+ rateHint: "143 次运行中有 9 次失败 · 6.3%",
+ agentsLabel: "受影响智能体 · 30天",
+ agentsHint: "最多 客服助手 · 6 次",
+ mixTitle: "失败构成 · 9",
+ showCodes: "展开错误码",
+ hideCodes: "收起错误码",
+ classes: { auth: "认证", rate_limit: "限流", timeout: "超时" } as Record<FailureClass, string>,
+ byAgent: "问题最多的智能体",
+ sortLabel: "错误榜排序依据",
+ sortFailed: "失败数",
+ sortRate: "失败率",
+ headerFailed: "失败数",
+ headerRuns: "运行数",
+ headerRate: "失败率",
+ },
+ captions: {
+ idle: "运营团队三个智能体近 30 天的统计。",
+ metric: "趋势卡片默认按天画 Token 用量。点击\"费用\",看每天花了多少钱。",
+ weekly: "工作日花得多,周末花得少。点击\"按周\",看每周合计。",
+ sort: "费用一周比一周高,颜色浅的那根是还没过完的本周。下面的排行榜按 Token 排序,点击\"费用\"重新排。",
+ errors: "Token 用得最多的是文案助手,花钱最多的却是运营助手:它用的模型单价更高。点击\"错误\"页签,看哪些运行失败了。",
+ codes: "143 次运行里失败了 9 次,其中 6 次是客服助手。点击\"展开错误码\"看具体原因。",
+ done: "有 5 次失败是 agent_error.provider_auth_or_access,看条形图都出在客服助手:到它所在的运行时上重新登录 AI 编程工具,再重试。点右上角可以重新演示。",
+ } as Record<Phase, string>,
+ },
+ ja: {
+ title: "分析 · 運用チームの直近 30 日",
+ pageTitle: "分析",
+ freshness: "GMT+8 · 10:30 更新",
+ refresh: "更新",
+ tabs: { usage: "使用量", errors: "エラー" } as Record<Tab, string>,
+ periodLabel: "期間",
+ projectLabel: "プロジェクト",
+ allProjects: "すべてのプロジェクト",
+ kpi: {
+ cost: "コスト · 30日",
+ tokens: "トークン · 30日",
+ tokensHint: "入力 1.1M · 出力 0.3M",
+ time: "実行時間 · 30日",
+ timeHint: "143 件の実行全体",
+ runs: "実行 · 30日",
+ runsHint: "9 件失敗",
+ },
+ metricLabel: "指標",
+ dimLabel: "単位",
+ metrics: { tokens: "トークン", cost: "コスト", time: "時間", runs: "実行" } as Record<Metric, string>,
+ dims: { daily: "日別", weekly: "週別" } as Record<Dim, string>,
+ chartTitle: {
+ daily: { tokens: "日別トークン", cost: "日別コスト" },
+ weekly: { tokens: "週別トークン", cost: "週別コスト" },
+ },
+ shortDate,
+ partial: (range: string, covered: number) => `${range} (一部 · 7日中 ${covered}日)`,
+ leaderboard: {
+ title: "リーダーボード",
+ sortLabel: "エージェントの並び順",
+ caption: "3 件のエージェント",
+ agent: "エージェント",
+ },
+ agents: {
+ ops: "運用アシスタント",
+ writing: "ライティングアシスタント",
+ support: "サポートアシスタント",
+ } as Record<AgentKey, string>,
+ errors: {
+ failedLabel: "失敗した実行 · 30日",
+ failedHint: "143 回の実行中",
+ rateLabel: "失敗率 · 30日",
+ rateHint: "143 回中 9 回が失敗 · 6.3%",
+ agentsLabel: "影響を受けたエージェント · 30日",
+ agentsHint: "最多 サポートアシスタント · 6 回",
+ mixTitle: "失敗の内訳 · 9",
+ showCodes: "エラーコードを表示",
+ hideCodes: "エラーコードを隠す",
+ classes: { auth: "認証", rate_limit: "レート制限", timeout: "タイムアウト" } as Record<FailureClass, string>,
+ byAgent: "失敗の多いエージェント",
+ sortLabel: "失敗の多いエージェントの並び順",
+ sortFailed: "失敗数",
+ sortRate: "失敗率",
+ headerFailed: "失敗",
+ headerRuns: "実行",
+ headerRate: "失敗率",
+ },
+ captions: {
+ idle: "運用チームの 3 つのエージェントについて、直近 30 日の分析です。",
+ metric: "推移カードは既定で日別のトークンを表示します。「コスト」をクリックして、日ごとの費用を見ます。",
+ weekly: "平日は多く、週末は少なめです。「週別」をクリックして、週ごとの合計を見ます。",
+ sort: "コストは週を追うごとに増えています。色の薄い棒はまだ途中の今週です。下のリーダーボードはトークン順なので、「コスト」をクリックして並べ替えます。",
+ errors:
+ "トークンが最も多いのはライティングアシスタントですが、コストが最も高いのは運用アシスタントです。使っているモデルの単価が高いためです。「エラー」タブをクリックして、失敗した実行を見ます。",
+ codes: "143 回中 9 回が失敗し、そのうち 6 回はサポートアシスタントです。「エラーコードを表示」をクリックして、具体的な理由を見ます。",
+ done: "5 回は agent_error.provider_auth_or_access で、棒を見るとすべてサポートアシスタントのものです。そのランタイムで AI コーディングツールに再ログインしてから再試行します。「もう一度」で最初から見られます。",
+ } as Record<Phase, string>,
+ },
+ ko: {
+ title: "분석 · 운영팀 최근 30일",
+ pageTitle: "분석",
+ freshness: "GMT+8 · 10:30 업데이트",
+ refresh: "새로고침",
+ tabs: { usage: "사용량", errors: "오류" } as Record<Tab, string>,
+ periodLabel: "기간",
+ projectLabel: "프로젝트",
+ allProjects: "모든 프로젝트",
+ kpi: {
+ cost: "비용 · 30일",
+ tokens: "토큰 · 30일",
+ tokensHint: "입력 1.1M · 출력 0.3M",
+ time: "실행 시간 · 30일",
+ timeHint: "실행 143개 기준",
+ runs: "실행 · 30일",
+ runsHint: "실패 9개",
+ },
+ metricLabel: "지표",
+ dimLabel: "단위",
+ metrics: { tokens: "토큰", cost: "비용", time: "시간", runs: "실행" } as Record<Metric, string>,
+ dims: { daily: "일별", weekly: "주별" } as Record<Dim, string>,
+ chartTitle: {
+ daily: { tokens: "일별 토큰", cost: "일별 비용" },
+ weekly: { tokens: "주별 토큰", cost: "주별 비용" },
+ },
+ shortDate,
+ partial: (range: string, covered: number) => `${range} (부분 · 7일 중 ${covered}일)`,
+ leaderboard: {
+ title: "리더보드",
+ sortLabel: "에이전트 순위 기준",
+ caption: "에이전트 3개",
+ agent: "에이전트",
+ },
+ agents: { ops: "운영 도우미", writing: "글쓰기 도우미", support: "고객지원 도우미" } as Record<AgentKey, string>,
+ errors: {
+ failedLabel: "실패한 실행 · 30일",
+ failedHint: "실행 143회 중",
+ rateLabel: "실패율 · 30일",
+ rateHint: "실행 143회 중 9회 실패 · 6.3%",
+ agentsLabel: "영향받은 에이전트 · 30일",
+ agentsHint: "최다 고객지원 도우미 · 6회",
+ mixTitle: "실패 구성 · 9",
+ showCodes: "오류 코드 표시",
+ hideCodes: "오류 코드 숨기기",
+ classes: { auth: "인증", rate_limit: "속도 제한", timeout: "시간 초과" } as Record<FailureClass, string>,
+ byAgent: "실패가 많은 에이전트",
+ sortLabel: "오류 순위 기준",
+ sortFailed: "실패 수",
+ sortRate: "실패율",
+ headerFailed: "실패",
+ headerRuns: "실행",
+ headerRate: "실패율",
+ },
+ captions: {
+ idle: "운영팀 에이전트 3개의 최근 30일 분석입니다.",
+ metric: "추이 카드는 기본으로 일별 토큰을 보여 줍니다. \"비용\"을 클릭해 날마다 얼마를 썼는지 보세요.",
+ weekly: "평일에는 많이, 주말에는 적게 씁니다. \"주별\"을 클릭해 주마다 합계를 보세요.",
+ sort: "비용이 주마다 늘고 있고, 색이 옅은 막대는 아직 끝나지 않은 이번 주입니다. 아래 리더보드는 토큰 순이니 \"비용\"을 클릭해 다시 정렬하세요.",
+ errors:
+ "토큰을 가장 많이 쓴 것은 글쓰기 도우미지만 비용이 가장 큰 것은 운영 도우미입니다. 쓰는 모델의 단가가 더 높기 때문입니다. \"오류\" 탭을 클릭해 실패한 실행을 보세요.",
+ codes: "실행 143회 중 9회가 실패했고, 그중 6회가 고객지원 도우미입니다. \"오류 코드 표시\"를 클릭해 구체적인 원인을 보세요.",
+ done: "5회는 agent_error.provider_auth_or_access이고, 막대를 보면 모두 고객지원 도우미에서 났습니다. 그 런타임에서 AI 코딩 도구에 다시 로그인한 뒤 재시도하세요. \"다시 보기\"로 처음부터 볼 수 있습니다.",
+ } as Record<Phase, string>,
+ },
+ fr: {
+ title: "Statistiques · Équipe ops, 30 derniers jours",
+ pageTitle: "Statistiques",
+ freshness: "GMT+8 · mis à jour 10:30",
+ refresh: "Actualiser",
+ tabs: { usage: "Consommation", errors: "Erreurs" } as Record<Tab, string>,
+ periodLabel: "Période",
+ projectLabel: "Projet",
+ allProjects: "Tous les projets",
+ kpi: {
+ cost: "Coût · 30 j",
+ tokens: "Tokens · 30 j",
+ tokensHint: "Entrée 1.1M · Sortie 0.3M",
+ time: "Temps d'exécution · 30 j",
+ timeHint: "Sur 143 exécutions",
+ runs: "Exécutions · 30 j",
+ runsHint: "9 en échec",
+ },
+ metricLabel: "Métrique",
+ dimLabel: "Dimension",
+ metrics: { tokens: "Tokens", cost: "Coût", time: "Temps", runs: "Exécutions" } as Record<Metric, string>,
+ dims: { daily: "Quotidien", weekly: "Hebdomadaire" } as Record<Dim, string>,
+ chartTitle: {
+ daily: { tokens: "Tokens quotidiens", cost: "Coût quotidien" },
+ weekly: { tokens: "Tokens hebdomadaires", cost: "Coût hebdomadaire" },
+ },
+ shortDate,
+ partial: (range: string, covered: number) => `${range} (partiel · ${covered} / 7 jours)`,
+ leaderboard: {
+ title: "Classement",
+ sortLabel: "Classer les agents par",
+ caption: "3 agents",
+ agent: "Agent",
+ },
+ agents: {
+ ops: "Assistant ops",
+ writing: "Assistant rédaction",
+ support: "Assistant support",
+ } as Record<AgentKey, string>,
+ errors: {
+ failedLabel: "Exécutions en échec · 30 j",
+ failedHint: "Sur 143 exécutions",
+ rateLabel: "Taux d'échec · 30 j",
+ rateHint: "9 exécutions sur 143 en échec · 6.3%",
+ agentsLabel: "Agents touchés · 30 j",
+ agentsHint: "Pire : Assistant support · 6",
+ mixTitle: "Répartition des échecs · 9",
+ showCodes: "Afficher les codes d'erreur",
+ hideCodes: "Masquer les codes d'erreur",
+ classes: {
+ auth: "Authentification",
+ rate_limit: "Limite de débit",
+ timeout: "Délai dépassé",
+ } as Record<FailureClass, string>,
+ byAgent: "Principaux fautifs",
+ sortLabel: "Classer les fautifs par",
+ sortFailed: "Échecs",
+ sortRate: "Taux",
+ headerFailed: "Échecs",
+ headerRuns: "Exécutions",
+ headerRate: "Taux",
+ },
+ captions: {
+ idle: "Les statistiques des trois agents d'une équipe ops sur les 30 derniers jours.",
+ metric: "La carte de tendance affiche par défaut les tokens par jour. Cliquez sur « Coût » pour voir ce que chaque journée a coûté.",
+ weekly: "Les jours ouvrés coûtent plus que le week-end. Cliquez sur « Hebdomadaire » pour voir le total de chaque semaine.",
+ sort: "Le coût augmente d'une semaine à l'autre ; la barre plus pâle est la semaine en cours. Le classement ci-dessous trie par tokens : cliquez sur « Coût » pour le reclasser.",
+ errors:
+ "Assistant rédaction consomme le plus de tokens, mais c'est Assistant ops qui coûte le plus : son modèle a un tarif plus élevé. Cliquez sur l'onglet « Erreurs » pour voir les exécutions en échec.",
+ codes: "9 exécutions sur 143 ont échoué, dont 6 pour Assistant support. Cliquez sur « Afficher les codes d'erreur » pour voir les motifs exacts.",
+ done: "5 échecs sont des agent_error.provider_auth_or_access, et les barres montrent qu'ils viennent tous d'Assistant support : reconnectez son outil de codage IA sur son runtime, puis relancez. Rejouer permet de recommencer.",
+ } as Record<Phase, string>,
+ },
+};
+
+// ─── Scenario data ──────────────────────────────────────────────────────────
+// "Today" is Saturday Oct 24. Like the product, the weekly view covers whole
+// calendar weeks (Monday first), so the series starts on Monday Sep 21 and the
+// daily view shows its last 30 days.
+const FIRST_DAY = { month: 9, day: 21 };
+const DAILY_COST = [
+ 1.56, 1.47, 1.84, 1.46, 1.81, 0.55, 0.47, 1.87, 1.54, 1.87, 1.61, 1.65, 0.56, 0.65, 1.74, 1.85, 2.2,
+ 2.51, 2.21, 0.56, 0.68, 1.83, 2.58, 2.09, 1.98, 1.97, 0.54, 0.65, 2.11, 2.52, 2.6, 2.36, 2.57, 0.47,
+];
+// In units of 10K tokens.
+const DAILY_TOKENS = [
+ 34, 34, 48, 36, 43, 14, 12, 44, 42, 50, 37, 42, 14, 18, 46, 43, 64, 57, 55, 15, 15, 46, 57, 56, 54, 50,
+ 15, 15, 57, 66, 68, 59, 73, 13,
+];
+const DAILY_WINDOW = 30;
+const WEEKS = 5;
+// Days of the current week that have elapsed (Mon Oct 19 – Sat Oct 24).
+const CURRENT_WEEK_COVERED = 6;
+
+function dateAt(offset: number) {
+ const d = new Date(Date.UTC(2026, FIRST_DAY.month - 1, FIRST_DAY.day + offset));
+ return { month: d.getUTCMonth() + 1, day: d.getUTCDate() };
+}
+
+function weeklySums(series: number[]) {
+ return Array.from({ length: WEEKS }, (_, w) =>
+ series.slice(w * 7, w * 7 + 7).reduce((sum, v) => sum + v, 0),
+ );
+}
+
+const fmtUsd = (n: number) => `$${n.toFixed(2)}`;
+const fmtTokens = (tenK: number) => `${Number((tenK / 100).toFixed(2))}M`;
+
+// Axis ceilings leave headroom above the tallest bar so the hint under the
+// card's toggles never sits on a bar.
+const CHART = {
+ daily: {
+ cost: { ticks: [0, 2, 4], format: (v: number) => `$${v}` },
+ tokens: { ticks: [0, 60, 120], format: (v: number) => (v === 0 ? "0" : fmtTokens(v)) },
+ },
+ weekly: {
+ cost: { ticks: [0, 10, 20], format: (v: number) => `$${v}` },
+ tokens: { ticks: [0, 300, 600], format: (v: number) => (v === 0 ? "0" : fmtTokens(v)) },
+ },
+} as const;
+
+type AgentRow = { key: AgentKey; tokens: number; cost: number; time: string; seconds: number; runs: number };
+const AGENT_ROWS: AgentRow[] = [
+ { key: "writing", tokens: 620, cost: 14.8, time: "6h 10m", seconds: 22200, runs: 41 },
+ { key: "ops", tokens: 410, cost: 25.3, time: "11h 5m", seconds: 39900, runs: 72 },
+ { key: "support", tokens: 210, cost: 8.5, time: "4h 25m", seconds: 15900, runs: 30 },
+];
+
+type OffenderRow = { key: AgentKey; failed: number; runs: number; rate: string; classes: Partial<Record<FailureClass, number>> };
+const OFFENDERS: OffenderRow[] = [
+ { key: "support", failed: 6, runs: 30, rate: "20%", classes: { auth: 5, rate_limit: 1 } },
+ { key: "ops", failed: 3, runs: 72, rate: "4.2%", classes: { rate_limit: 2, timeout: 1 } },
+];
+const CLASS_COUNTS: { cls: FailureClass; count: number }[] = [
+ { cls: "auth", count: 5 },
+ { cls: "rate_limit", count: 3 },
+ { cls: "timeout", count: 1 },
+];
+const REASON_COUNTS: { reason: string; cls: FailureClass; count: number }[] = [
+ { reason: "agent_error.provider_auth_or_access", cls: "auth", count: 5 },
+ { reason: "agent_error.provider_capacity_or_rate_limit", cls: "rate_limit", count: 3 },
+ { reason: "timeout", cls: "timeout", count: 1 },
+];
+const TOTAL_FAILED = 9;
+
+// The product's failure palette: steps down a --destructive ramp toward the
+// card colour, so every class reads as "errors" in both themes.
+const CLASS_COLOR: Record<FailureClass, string> = {
+ auth: "var(--destructive)",
+ rate_limit: "color-mix(in oklch, var(--destructive) 86%, var(--card))",
+ timeout: "color-mix(in oklch, var(--destructive) 72%, var(--card))",
+};
+
+// ─── Small product pieces ───────────────────────────────────────────────────
+
+/** The card-local pill toggle; only `live` can be pressed, and only when `open`. */
+function Segmented<T extends string>({
+ label,
+ value,
+ options,
+ live,
+ open,
+ onPick,
+ coachSide = "bottom",
+ coachAlign = "center",
+}: {
+ label: string;
+ value: T;
+ options: { value: T; label: string }[];
+ live?: T;
+ open: boolean;
+ onPick?: (value: T) => void;
+ coachSide?: "top" | "bottom";
+ coachAlign?: "start" | "center" | "end";
+}) {
+ return (
+ <div role="group" aria-label={label} className="inline-flex items-center gap-0.5 rounded-md bg-muted p-0.5">
+ {options.map((o) => {
+ const enabled = open && o.value === live;
+ return (
+ <CoachMark key={o.value} active={enabled} side={coachSide} align={coachAlign} ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-pressed={o.value === value}
+ disabled={!enabled}
+ onClick={() => onPick?.(o.value)}
+ className={cn(
+ "rounded-sm px-2.5 py-1 text-caption font-medium transition-colors",
+ o.value === value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground",
+ enabled && "hover:text-foreground",
+ )}
+ >
+ {o.label}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ );
+}
+
+function Kpi({ label, value, hint }: { label: string; value: string; hint?: string }) {
+ return (
+ <div className="min-w-0 bg-card px-3 py-2.5">
+ <div className="text-caption text-muted-foreground">{label}</div>
+ <div className="mt-0.5 text-title font-semibold tabular-nums">{value}</div>
+ {hint && <div className="mt-0.5 text-caption text-muted-foreground">{hint}</div>}
+ </div>
+ );
+}
+
+function TrendChart({
+ values,
+ ticks,
+ format,
+ labels,
+ fadedLast,
+ everyLabel,
+}: {
+ values: number[];
+ ticks: readonly number[];
+ format: (v: number) => string;
+ labels: string[];
+ fadedLast: boolean;
+ /** Label every bar (weekly) instead of the first, middle and last (daily). */
+ everyLabel: boolean;
+}) {
+ const max = ticks[ticks.length - 1] ?? 1;
+ return (
+ <div aria-hidden className="flex gap-2">
+ <div className="relative h-32 w-9 shrink-0 text-micro text-muted-foreground tabular-nums">
+ {ticks.map((tick) => (
+ <span
+ key={tick}
+ className="absolute right-0 -translate-y-1/2"
+ style={{ bottom: `calc(${(tick / max) * 100}% - 0.5em)` }}
+ >
+ {format(tick)}
+ </span>
+ ))}
+ </div>
+ <div className="min-w-0 flex-1">
+ <div className="relative h-32">
+ {ticks.map((tick) => (
+ <div
+ key={tick}
+ className="absolute inset-x-0 border-t border-dashed border-border"
+ style={{ bottom: `${(tick / max) * 100}%` }}
+ />
+ ))}
+ <div className={cn("absolute inset-0 flex items-end", everyLabel ? "gap-1 px-1 sm:gap-6" : "gap-px")}>
+ {values.map((v, i) => (
+ <div
+ key={i}
+ className={cn(
+ "min-w-0 flex-1 rounded-t-[2px] bg-chart-1 transition-[height] duration-300 ease-out",
+ fadedLast && i === values.length - 1 && "opacity-50",
+ )}
+ style={{ height: `${(v / max) * 100}%` }}
+ />
+ ))}
+ </div>
+ </div>
+ <div
+ className={cn(
+ "mt-1.5 text-micro text-muted-foreground",
+ everyLabel ? "flex gap-1 px-1 sm:gap-6" : "flex justify-between",
+ )}
+ >
+ {labels.map((label) => (
+ <span key={label} className={cn("whitespace-nowrap", everyLabel && "min-w-0 flex-1 text-center")}>
+ {label}
+ </span>
+ ))}
+ </div>
+ </div>
+ </div>
+ );
+}
+
+// ─── Demo ───────────────────────────────────────────────────────────────────
+
+export function UsageDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [cycle, setCycle] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [metric, setMetric] = useState<Metric>("tokens");
+ const [dim, setDim] = useState<Dim>("daily");
+ const [sortBy, setSortBy] = useState<Metric>("tokens");
+ const [tab, setTab] = useState<Tab>("usage");
+ const [showCodes, setShowCodes] = useState(false);
+
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ after(600, () => setPhase("metric"));
+ }, [visible, cycle, after, clear]);
+
+ const replay = () => {
+ clear();
+ setPhase("idle");
+ setMetric("tokens");
+ setDim("daily");
+ setSortBy("tokens");
+ setTab("usage");
+ setShowCodes(false);
+ setCycle((c) => c + 1);
+ };
+
+ const shownPhase: Phase = visible ? phase : "idle";
+ const chartMetric = metric === "cost" ? "cost" : "tokens";
+ const series = chartMetric === "cost" ? DAILY_COST : DAILY_TOKENS;
+ const daily = series.slice(-DAILY_WINDOW);
+ const values = dim === "weekly" ? weeklySums(series) : daily;
+ const chart = CHART[dim][chartMetric];
+ const firstShown = DAILY_COST.length - DAILY_WINDOW;
+ const label = (offset: number) => {
+ const d = dateAt(offset);
+ return t.shortDate(d.month, d.day);
+ };
+ const labels =
+ dim === "weekly"
+ ? Array.from({ length: WEEKS }, (_, w) => label(w * 7))
+ : [label(firstShown), label(firstShown + 15), label(DAILY_COST.length - 1)];
+ const currentWeek = `${label((WEEKS - 1) * 7)} – ${label((WEEKS - 1) * 7 + 6)}`;
+ const totalCost = DAILY_COST.slice(-DAILY_WINDOW).reduce((sum, v) => sum + v, 0);
+ const totalTokens = DAILY_TOKENS.slice(-DAILY_WINDOW).reduce((sum, v) => sum + v, 0);
+
+ const sortValue = (r: AgentRow) => (sortBy === "cost" ? r.cost : r.tokens);
+ const ranked = AGENT_ROWS.toSorted((a, b) => sortValue(b) - sortValue(a));
+ const leader = ranked[0] ? sortValue(ranked[0]) : 1;
+ const leaderFailed = OFFENDERS[0]?.failed ?? 1;
+
+ const metricOptions = (["tokens", "cost", "time", "runs"] as const).map((m) => ({ value: m, label: t.metrics[m] }));
+ const col = (key: Metric) => (sortBy === key ? "text-foreground" : "text-muted-foreground");
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="flex min-h-[44rem] flex-col">
+ {/* Page header */}
+ <div className="flex h-11 items-center gap-2 border-b px-4">
+ <BarChart3 aria-hidden className="size-4 text-muted-foreground" />
+ <span className="text-body font-medium">{t.pageTitle}</span>
+ <span className="ml-auto hidden text-caption text-muted-foreground sm:inline">{t.freshness}</span>
+ <Button type="button" size="icon-sm" variant="ghost" aria-label={t.refresh} disabled className="max-sm:ml-auto">
+ <RefreshCw />
+ </Button>
+ </div>
+
+ {/* Toolbar: tabs on the left, page-scoped filters on the right */}
+ <div className="flex flex-wrap items-center justify-between gap-x-2 gap-y-1 border-b px-4">
+ <div role="tablist" className="flex h-11 items-stretch">
+ {(["usage", "errors"] as const).map((key) => {
+ const live = key === "errors" && shownPhase === "errors";
+ return (
+ <CoachMark key={key} active={live} side="right" ringClassName="rounded-md" className="items-stretch">
+ <button
+ type="button"
+ role="tab"
+ aria-selected={tab === key}
+ disabled={!live}
+ onClick={() => {
+ setTab("errors");
+ setPhase("codes");
+ }}
+ className={cn(
+ "relative px-2.5 text-label transition-colors",
+ tab === key ? "font-medium text-foreground" : "text-muted-foreground",
+ live && "hover:text-foreground",
+ )}
+ >
+ {t.tabs[key]}
+ {tab === key && <span aria-hidden className="absolute inset-x-2 bottom-0 h-0.5 rounded-full bg-foreground" />}
+ </button>
+ </CoachMark>
+ );
+ })}
+ </div>
+ <div className="flex items-center gap-2 py-1.5">
+ <Button type="button" size="sm" variant="outline" disabled aria-label={t.periodLabel} className="gap-1 px-2.5">
+ <CalendarDays className="size-3.5 text-muted-foreground" />
+ <span className="tabular-nums">30d</span>
+ <ChevronDown className="size-3 text-muted-foreground" />
+ </Button>
+ <Button type="button" size="sm" variant="outline" disabled aria-label={t.projectLabel} className="gap-1 px-2.5 text-muted-foreground">
+ <FolderKanban className="size-3.5" />
+ <span className="truncate">{t.allProjects}</span>
+ <ChevronDown className="size-3" />
+ </Button>
+ </div>
+ </div>
+
+ <div className="flex flex-1 flex-col gap-4 bg-muted/20 p-4">
+ {tab === "usage" ? (
+ <>
+ <div className="grid grid-cols-2 gap-px overflow-hidden rounded-lg border bg-border sm:grid-cols-4">
+ <Kpi label={t.kpi.cost} value={fmtUsd(totalCost)} />
+ <Kpi label={t.kpi.tokens} value={fmtTokens(totalTokens)} hint={t.kpi.tokensHint} />
+ <Kpi label={t.kpi.time} value="21h 40m" hint={t.kpi.timeHint} />
+ <Kpi label={t.kpi.runs} value="143" hint={t.kpi.runsHint} />
+ </div>
+
+ {/* Trend card */}
+ <section className="rounded-lg border bg-card p-4">
+ <div className="mb-3 flex flex-wrap items-center justify-between gap-3">
+ <div key={`${dim}-${chartMetric}`} className="text-body font-semibold motion-safe:animate-in motion-safe:fade-in">
+ {t.chartTitle[dim][chartMetric]}
+ </div>
+ <div className="flex flex-wrap items-center gap-2">
+ <Segmented
+ label={t.metricLabel}
+ value={metric}
+ options={metricOptions}
+ live="cost"
+ open={shownPhase === "metric"}
+ onPick={() => {
+ setMetric("cost");
+ setPhase("weekly");
+ }}
+ />
+ <Segmented
+ label={t.dimLabel}
+ value={dim}
+ options={(["daily", "weekly"] as const).map((d) => ({ value: d, label: t.dims[d] }))}
+ live="weekly"
+ open={shownPhase === "weekly"}
+ coachAlign="end"
+ onPick={() => {
+ setDim("weekly");
+ setPhase("sort");
+ }}
+ />
+ </div>
+ </div>
+ <TrendChart
+ values={values}
+ ticks={chart.ticks}
+ format={chart.format}
+ labels={labels}
+ fadedLast={dim === "weekly"}
+ everyLabel={dim === "weekly"}
+ />
+ {dim === "weekly" && (
+ <div className="mt-2 flex items-center gap-1.5 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <span aria-hidden className="size-2 shrink-0 rounded-[2px] bg-chart-1 opacity-50" />
+ {t.partial(currentWeek, CURRENT_WEEK_COVERED)}
+ <span className="ml-auto font-medium text-foreground tabular-nums">{fmtUsd(values[WEEKS - 1] ?? 0)}</span>
+ </div>
+ )}
+ </section>
+
+ {/* Leaderboard */}
+ <section className="mt-4 rounded-lg border bg-card">
+ <div className="flex flex-wrap items-center justify-between gap-3 border-b px-4 pt-4 pb-3">
+ <div className="text-body font-semibold">{t.leaderboard.title}</div>
+ <div className="flex flex-wrap items-center justify-end gap-3">
+ <Segmented
+ label={t.leaderboard.sortLabel}
+ value={sortBy}
+ options={metricOptions}
+ live="cost"
+ open={shownPhase === "sort"}
+ coachSide="top"
+ onPick={() => {
+ setSortBy("cost");
+ setPhase("errors");
+ }}
+ />
+ <span className="text-caption text-muted-foreground">{t.leaderboard.caption}</span>
+ </div>
+ </div>
+ <div className="grid grid-cols-[minmax(0,1fr)_4rem_4rem] items-center gap-x-2 sm:gap-x-3 border-b px-4 py-2 text-caption font-medium text-muted-foreground sm:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_4rem_4rem_4rem_3rem]">
+ <span>{t.leaderboard.agent}</span>
+ <span className="max-sm:hidden" />
+ <span className={cn("text-right", col("tokens"))}>{t.metrics.tokens}</span>
+ <span className={cn("text-right", col("cost"))}>{t.metrics.cost}</span>
+ <span className="text-right max-sm:hidden">{t.metrics.time}</span>
+ <span className="text-right max-sm:hidden">{t.metrics.runs}</span>
+ </div>
+ <ul className="m-0 list-none divide-y p-0">
+ {ranked.map((row) => (
+ <li
+ key={row.key}
+ className="m-0 grid grid-cols-[minmax(0,1fr)_4rem_4rem] items-center gap-x-2 sm:gap-x-3 px-4 py-2 sm:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)_4rem_4rem_4rem_3rem] motion-safe:animate-in motion-safe:fade-in"
+ >
+ <span className="flex min-w-0 items-center gap-2">
+ <DemoAvatar name={t.agents[row.key]} agent />
+ <span className="min-w-0 text-body font-medium break-words sm:truncate">{t.agents[row.key]}</span>
+ </span>
+ <span className="relative h-2 overflow-hidden rounded-full bg-muted max-sm:hidden">
+ <span
+ className="absolute inset-y-0 left-0 rounded-full bg-chart-1 transition-[width] duration-300 ease-out"
+ style={{ width: `${(sortValue(row) / leader) * 100}%` }}
+ />
+ </span>
+ <span className={cn("text-right text-caption tabular-nums", sortBy === "tokens" ? "font-medium text-foreground" : "text-muted-foreground")}>
+ {fmtTokens(row.tokens)}
+ </span>
+ <span className={cn("text-right tabular-nums", sortBy === "cost" ? "text-body font-medium" : "text-caption text-muted-foreground")}>
+ {fmtUsd(row.cost)}
+ </span>
+ <span className="text-right text-caption text-muted-foreground tabular-nums max-sm:hidden">{row.time}</span>
+ <span className="text-right text-caption text-muted-foreground tabular-nums max-sm:hidden">{row.runs}</span>
+ </li>
+ ))}
+ </ul>
+ </section>
+ </>
+ ) : (
+ <div className="flex flex-col gap-4 motion-safe:animate-in motion-safe:fade-in">
+ <div className="grid grid-cols-1 gap-px overflow-hidden rounded-lg border bg-border sm:grid-cols-3">
+ <Kpi label={t.errors.failedLabel} value={String(TOTAL_FAILED)} hint={t.errors.failedHint} />
+ <Kpi label={t.errors.rateLabel} value="6.3%" hint={t.errors.rateHint} />
+ <Kpi label={t.errors.agentsLabel} value={String(OFFENDERS.length)} hint={t.errors.agentsHint} />
+ </div>
+
+ {/* Failure mix */}
+ <section className="rounded-lg border bg-card">
+ <div className="flex flex-wrap items-center justify-between gap-3 border-b px-4 pt-4 pb-3">
+ <div className="text-body font-semibold">{t.errors.mixTitle}</div>
+ <CoachMark active={shownPhase === "codes"} side="left" ringClassName="rounded-md">
+ <button
+ type="button"
+ disabled={shownPhase !== "codes"}
+ onClick={() => {
+ setShowCodes(true);
+ setPhase("done");
+ }}
+ className="rounded-sm px-1 text-caption text-muted-foreground underline-offset-2 enabled:hover:text-foreground enabled:hover:underline"
+ >
+ {showCodes ? t.errors.hideCodes : t.errors.showCodes}
+ </button>
+ </CoachMark>
+ </div>
+ <div className="p-4">
+ {showCodes ? (
+ <ul className="m-0 grid list-none grid-cols-1 gap-1.5 p-0 motion-safe:animate-in motion-safe:fade-in">
+ {REASON_COUNTS.map((r) => (
+ <li key={r.reason} className="m-0 flex items-start justify-between gap-3">
+ <span className="flex min-w-0 items-start gap-2">
+ <span aria-hidden className="mt-1 size-2 shrink-0 rounded-[2px]" style={{ backgroundColor: CLASS_COLOR[r.cls] }} />
+ <span className="min-w-0 font-mono text-caption break-all text-muted-foreground">{r.reason}</span>
+ </span>
+ <span className="shrink-0 text-caption tabular-nums">{r.count}</span>
+ </li>
+ ))}
+ </ul>
+ ) : (
+ <div className="space-y-2.5">
+ <div className="flex h-2 w-full overflow-hidden rounded-full bg-muted">
+ {CLASS_COUNTS.map((c) => (
+ <div
+ key={c.cls}
+ className="h-full"
+ style={{ width: `${(c.count / TOTAL_FAILED) * 100}%`, backgroundColor: CLASS_COLOR[c.cls] }}
+ />
+ ))}
+ </div>
+ <ul className="m-0 flex list-none flex-wrap items-center gap-x-4 gap-y-1.5 p-0">
+ {CLASS_COUNTS.map((c) => (
+ <li key={c.cls} className="m-0 flex items-center gap-1.5">
+ <span aria-hidden className="size-2 shrink-0 rounded-[2px]" style={{ backgroundColor: CLASS_COLOR[c.cls] }} />
+ <span className="text-caption">{t.errors.classes[c.cls]}</span>
+ <span className="text-caption text-muted-foreground tabular-nums">{c.count}</span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ )}
+ </div>
+ </section>
+
+ {/* Offenders */}
+ <section className="rounded-lg border bg-card">
+ <div className="flex flex-wrap items-center justify-between gap-3 border-b px-4 pt-4 pb-3">
+ <div className="text-body font-semibold">{t.errors.byAgent}</div>
+ <Segmented
+ label={t.errors.sortLabel}
+ value="failed"
+ options={[
+ { value: "failed", label: t.errors.sortFailed },
+ { value: "rate", label: t.errors.sortRate },
+ ]}
+ open={false}
+ />
+ </div>
+ <div className="px-4 pb-2">
+ <div className="grid grid-cols-[minmax(0,1fr)_3.5rem_3.5rem] items-center gap-x-2 border-b py-2 text-caption font-medium text-muted-foreground sm:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_4rem_4rem_4rem] sm:gap-x-3">
+ <span>{t.leaderboard.agent}</span>
+ <span className="max-sm:hidden" />
+ <span className="text-right text-foreground">{t.errors.headerFailed}</span>
+ <span className="truncate text-right max-sm:hidden">{t.errors.headerRuns}</span>
+ <span className="truncate text-right">{t.errors.headerRate}</span>
+ </div>
+ <ul className="m-0 list-none divide-y p-0">
+ {OFFENDERS.map((row) => (
+ <li
+ key={row.key}
+ className="m-0 grid grid-cols-[minmax(0,1fr)_3.5rem_3.5rem] items-center gap-x-2 gap-y-1.5 py-2 sm:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_4rem_4rem_4rem] sm:gap-x-3"
+ >
+ <span className="min-w-0 text-caption break-words sm:truncate">{t.agents[row.key]}</span>
+ <span className="order-last col-span-3 h-1.5 overflow-hidden rounded-full bg-muted sm:order-none sm:col-span-1">
+ <span className="flex h-full overflow-hidden rounded-full" style={{ width: `${(row.failed / leaderFailed) * 100}%` }}>
+ {(Object.keys(row.classes) as FailureClass[]).map((cls) => (
+ <span
+ key={cls}
+ className="h-full"
+ style={
+ {
+ width: `${((row.classes[cls] ?? 0) / row.failed) * 100}%`,
+ backgroundColor: CLASS_COLOR[cls],
+ } satisfies CSSProperties
+ }
+ />
+ ))}
+ </span>
+ </span>
+ <span className="text-right text-caption font-medium text-foreground tabular-nums">{row.failed}</span>
+ <span className="text-right text-caption text-muted-foreground tabular-nums max-sm:hidden">{row.runs}</span>
+ <span className="text-right text-caption text-muted-foreground tabular-nums">{row.rate}</span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ </section>
+ </div>
+ )}
+ </div>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/wakeup-demo.tsx b/apps/docs/components/demos/wakeup-demo.tsx
new file mode 100644
index 0000000000..12b7235b61
--- /dev/null
+++ b/apps/docs/components/demos/wakeup-demo.tsx
@@ -0,0 +1,808 @@
+"use client";
+
+import { useEffect, useState, type ReactNode } from "react";
+import { Bell, ChevronDown, ChevronRight, Clock3, FastForward, Info, Plus, RefreshCw } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+type Choice = "at" | "recurring";
+
+const copy = {
+ en: {
+ title: "OPS-56 · Confirm supplier quotes for trade-show materials",
+ agent: "Ops helper",
+ running: "Running",
+ completed: "Completed",
+ opening:
+ "I've sent quote requests to 3 suppliers and asked them to reply by end of day. I can't compare prices until the quotes are in, so I'm stopping here for now.",
+ section: "Wakeups",
+ newWakeup: "New wakeup",
+ formTitle: "New wakeup",
+ when: "When",
+ wake: "Wake",
+ chooseCondition: "Choose a condition",
+ groupTime: "Time",
+ condAt: "At a time",
+ condAtHint: "In 10 min, tomorrow 09:00",
+ condRecurring: "Check regularly",
+ condRecurringHint: "Hourly or daily, with an end date",
+ atPresets: ["In 10 minutes", "In 1 hour", "Tomorrow 09:00", "Pick a time"],
+ daily: "Every day 09:00",
+ until: "Until",
+ untilValue: "10/27/2026",
+ instructionTitle: "What to do when woken",
+ instruction:
+ "Check the quote emails to see whether all 3 suppliers have replied. If they have, put the quotes in a comparison table and recommend one.",
+ onBehalf: "Runs act on your behalf",
+ cancel: "Cancel",
+ create: "Create",
+ rule: { at: "Wake at Oct 21, 09:00 AM", recurring: "At 09:00 · Every day" } as Record<Choice, string>,
+ summaryOnce: "Wake Ops helper · Trigger once",
+ summaryFired: "Wake Ops helper · Trigger once · Triggered",
+ summaryNext: (date: number) =>
+ `Wake Ops helper · Next: Oct ${date}, 09:00 AM · until Oct 27`,
+ summaryOff: "Wake Ops helper · Turned off",
+ thisRun: (done: boolean) => `This execution: ${done ? "Run succeeded" : "Running"}`,
+ lastRun: "Last execution: Run succeeded",
+ history: "Wakeup history 1",
+ chip: (date: number) => `Oct ${date}, 09:00 AM · wakes Ops helper`,
+ source: { at: "Wakeup · Wake at Oct 21, 09:00 AM", recurring: "Wakeup · At 09:00 · Every day" } as Record<Choice, string>,
+ steps: {
+ read: "Read the issue, comments and wakeup instruction",
+ found: "Check the quote emails: all 3 have replied",
+ none: "Check the quote emails: no replies yet",
+ compare: "Build the quote comparison table",
+ checkin: "Nothing needs a reply: end with a silent check",
+ disable: "Quotes are in: turn off this regular check",
+ },
+ checkin: "silent check: None of the 3 suppliers has sent a quote yet; checking again tomorrow",
+ reply:
+ "All 3 quotes are in: A is $260 a set with delivery in 10 days, B $240 in 14 days, C $275 in 7 days. The show is 3 weeks away, so I recommend B. The comparison table is attached to the issue.",
+ fastForward: (date: number) => `Skip ahead to Oct ${date}, 09:00 AM`,
+ captions: {
+ idle: "Ops helper has asked 3 suppliers for quotes and is waiting for their replies.",
+ ready: "The quotes won't arrive before tomorrow. Click + in the Wakeups section so Ops helper comes back to this issue later.",
+ form: "The issue's assignee, Ops helper, is already selected, and the instruction is filled in. Open the condition menu.",
+ menu: "Either time condition works here: \"At a time\" wakes Ops helper once; \"Check regularly\" wakes it every day until the end date.",
+ preset: "The time defaults to one hour from now. Change it to tomorrow 09:00.",
+ presetMenu: "Pick \"Tomorrow 09:00\".",
+ filled: {
+ at: "Ops helper will be woken once, tomorrow at 09:00. Click Create.",
+ recurring: "Ops helper will be woken every day at 09:00 until Oct 27. Click Create.",
+ } as Record<Choice, string>,
+ scheduled:
+ "The rule is saved on the issue, and the header shows what the issue is waiting for. No run is active in the meantime. Skip ahead to the wakeup time.",
+ running: "It's 09:00: Ops helper starts a new run on this issue with the wakeup's instruction.",
+ checked:
+ "No replies yet. This run posted no comment; it left a silent check in the timeline instead. Skip ahead another day.",
+ running2: "The next day's check starts.",
+ done: {
+ at: "Ops helper found the quotes and finished the comparison. A one-time wakeup ends after it fires and moves to Wakeup history. Use Replay to try the other condition.",
+ recurring:
+ "The quotes arrived. Ops helper posted the comparison and turned off the regular check. Use Replay to try the other condition.",
+ } as Record<Choice, string>,
+ },
+ },
+ zh: {
+ title: "OPS-56 · 确认展会物料的供应商报价",
+ agent: "运营助手",
+ running: "运行中",
+ completed: "已完成",
+ opening: "已向 3 家供应商发出询价,请他们今天下班前回复。报价到齐前没法比价,先停在这里。",
+ section: "唤醒",
+ newWakeup: "新建唤醒",
+ formTitle: "新建唤醒",
+ when: "当",
+ wake: "唤醒",
+ chooseCondition: "选择条件",
+ groupTime: "时间",
+ condAt: "在某个时间",
+ condAtHint: "10 分钟后、明天 09:00",
+ condRecurring: "定期检查",
+ condRecurringHint: "每小时、每天,需设截止日",
+ atPresets: ["10 分钟后", "1 小时后", "明天 09:00", "自定义时间"],
+ daily: "每天 09:00",
+ until: "截止",
+ untilValue: "2026/10/27",
+ instructionTitle: "唤醒后要做什么",
+ instruction: "查看询价邮件,看 3 家供应商是否都回了报价。回齐了就整理成对比表,给出建议。",
+ onBehalf: "唤醒后的运行将代表你执行",
+ cancel: "取消",
+ create: "创建",
+ rule: { at: "10月21日 09:00 唤醒", recurring: "09:00 · 每天" } as Record<Choice, string>,
+ summaryOnce: "唤醒 运营助手 · 仅触发一次",
+ summaryFired: "唤醒 运营助手 · 仅触发一次 · 已触发",
+ summaryNext: (date: number) => `唤醒 运营助手 · 下次 10月${date}日 09:00 · 至 10月27日`,
+ summaryOff: "唤醒 运营助手 · 已关闭",
+ thisRun: (done: boolean) => `本次执行:${done ? "运行成功" : "运行中"}`,
+ lastRun: "最近一次:运行成功",
+ history: "历史唤醒 1",
+ chip: (date: number) => `10月${date}日 09:00 唤醒 运营助手`,
+ source: { at: "由唤醒触发 · 10月21日 09:00 唤醒", recurring: "由唤醒触发 · 09:00 · 每天" } as Record<Choice, string>,
+ steps: {
+ read: "读取任务、评论和唤醒指令",
+ found: "查看询价邮件:3 家都已回复",
+ none: "查看询价邮件:还没有回复",
+ compare: "整理报价对比表",
+ checkin: "没有需要回复的内容,以静默检查结束",
+ disable: "报价已齐,关闭这条定期检查",
+ },
+ checkin: "静默检查:3 家供应商都还没回复报价,明天再看",
+ reply:
+ "3 家报价都到了:A 每套 2,600 元,10 天交货;B 每套 2,400 元,14 天交货;C 每套 2,750 元,7 天交货。离展会还有 3 周,建议选 B。对比表已附在任务里。",
+ fastForward: (date: number) => `快进到 10月${date}日 09:00`,
+ captions: {
+ idle: "运营助手 已向 3 家供应商询价,正在等回复。",
+ ready: "报价明天之前到不了。点唤醒区域的 +,让 运营助手 之后再回到这条任务。",
+ form: "唤醒对象已预选为任务负责人 运营助手,指令也写好了。打开条件菜单。",
+ menu: "这里两种时间条件都能用:\"在某个时间\"只唤醒一次,\"定期检查\"每天唤醒一次,直到截止日。",
+ preset: "时间默认是 1 小时后,改成明天 09:00。",
+ presetMenu: "选择\"明天 09:00\"。",
+ filled: {
+ at: "明天 09:00 唤醒 运营助手 一次。点击创建。",
+ recurring: "每天 09:00 唤醒 运营助手,到 10月27日 截止。点击创建。",
+ } as Record<Choice, string>,
+ scheduled: "规则存在任务上,标题旁显示这条任务在等什么。这期间没有运行在跑。快进到唤醒时间。",
+ running: "到 09:00 了:运营助手 带着唤醒指令,在这条任务上开始一次新的运行。",
+ checked: "还没有回复。这次运行没有发评论,只在时间线留下一条静默检查。再快进一天。",
+ running2: "第二天的检查开始了。",
+ done: {
+ at: "运营助手 读到了报价,把比价做完。单次唤醒触发后就结束,移到了历史唤醒。点右上角重新演示,可以试另一种条件。",
+ recurring: "报价到了。运营助手 发出比价结果,并关掉了这条定期检查。点右上角重新演示,可以试另一种条件。",
+ } as Record<Choice, string>,
+ },
+ },
+ ja: {
+ title: "OPS-56 · 展示会資材の仕入れ先見積もりを確認する",
+ agent: "運用アシスタント",
+ running: "実行中",
+ completed: "完了",
+ opening:
+ "仕入れ先 3 社に見積もりを依頼し、今日の終業までに返信をお願いしました。見積もりがそろうまで比較できないので、いったんここで止めます。",
+ section: "ウェイクアップ",
+ newWakeup: "新しいウェイクアップ",
+ formTitle: "新しいウェイクアップ",
+ when: "条件",
+ wake: "起こす",
+ chooseCondition: "条件を選択",
+ groupTime: "時間",
+ condAt: "指定した時刻",
+ condAtHint: "10 分後、明日 09:00",
+ condRecurring: "定期チェック",
+ condRecurringHint: "毎時・毎日、終了日を設定",
+ atPresets: ["10 分後", "1 時間後", "明日 09:00", "時刻を指定"],
+ daily: "毎日 09:00",
+ until: "終了日",
+ untilValue: "2026/10/27",
+ instructionTitle: "起動後に行うこと",
+ instruction:
+ "見積もりメールを確認し、3 社すべてから返信が来ているか見てください。そろっていれば比較表にまとめ、おすすめを示してください。",
+ onBehalf: "起動された実行はあなたの代理として動きます",
+ cancel: "キャンセル",
+ create: "作成",
+ rule: { at: "10月21日 09:00 に起動", recurring: "09:00 · 毎日" } as Record<Choice, string>,
+ summaryOnce: "運用アシスタント を起動 · 一度だけ起動",
+ summaryFired: "運用アシスタント を起動 · 一度だけ起動 · 起動済み",
+ summaryNext: (date: number) =>
+ `運用アシスタント を起動 · 次回:10月${date}日 09:00 · 10月27日 まで`,
+ summaryOff: "運用アシスタント を起動 · 無効",
+ thisRun: (done: boolean) => `今回の実行:${done ? "実行成功" : "実行中"}`,
+ lastRun: "前回の実行:実行成功",
+ history: "ウェイクアップ履歴 1",
+ chip: (date: number) => `10月${date}日 09:00 に 運用アシスタント を起こす`,
+ source: { at: "起動 · 10月21日 09:00 に起動", recurring: "起動 · 09:00 · 毎日" } as Record<Choice, string>,
+ steps: {
+ read: "タスク、コメント、ウェイクアップの指示を読む",
+ found: "見積もりメールを確認:3 社とも返信あり",
+ none: "見積もりメールを確認:まだ返信なし",
+ compare: "見積もりの比較表を作る",
+ checkin: "返信が必要な内容はないので、サイレントチェックで終える",
+ disable: "見積もりがそろったので、この定期チェックをオフにする",
+ },
+ checkin: "サイレントチェック:3 社ともまだ見積もりの返信なし。明日また確認",
+ reply:
+ "3 社の見積もりがそろいました。A は 1 セット 52,000 円で納期 10 日、B は 48,000 円で 14 日、C は 55,000 円で 7 日です。展示会まで 3 週間あるので B をおすすめします。比較表はタスクに添付しました。",
+ fastForward: (date: number) => `10月${date}日 09:00 まで早送り`,
+ captions: {
+ idle: "運用アシスタント は仕入れ先 3 社に見積もりを依頼し、返信を待っています。",
+ ready: "見積もりは明日まで届きません。ウェイクアップ欄の + をクリックして、運用アシスタント が後でこのタスクに戻るようにします。",
+ form: "起こす相手にはタスクの担当者 運用アシスタント が選ばれていて、指示も入力済みです。条件メニューを開きます。",
+ menu: "ここではどちらの時間条件も使えます。「指定した時刻」は一度だけ、「定期チェック」は終了日まで毎日起こします。",
+ preset: "時刻の既定は 1 時間後です。明日 09:00 に変えます。",
+ presetMenu: "「明日 09:00」を選びます。",
+ filled: {
+ at: "明日 09:00 に 運用アシスタント を一度だけ起こします。作成をクリックします。",
+ recurring: "10月27日 まで毎日 09:00 に 運用アシスタント を起こします。作成をクリックします。",
+ } as Record<Choice, string>,
+ scheduled:
+ "ルールはタスクに保存され、ヘッダーにはこのタスクが何を待っているかが表示されます。その間に動いている実行はありません。起動時刻まで早送りします。",
+ running: "09:00 になりました。運用アシスタント がウェイクアップの指示を持って、このタスクで新しい実行を始めます。",
+ checked:
+ "まだ返信はありません。この実行はコメントを投稿せず、タイムラインにサイレントチェックを 1 件残しました。もう 1 日早送りします。",
+ running2: "翌日のチェックが始まりました。",
+ done: {
+ at: "運用アシスタント は見積もりを読み、比較を仕上げました。一度だけのウェイクアップは起動後に終わり、履歴に移ります。「もう一度」でもう一方の条件も試せます。",
+ recurring:
+ "見積もりが届きました。運用アシスタント は比較結果を投稿し、定期チェックをオフにしました。「もう一度」でもう一方の条件も試せます。",
+ } as Record<Choice, string>,
+ },
+ },
+ ko: {
+ title: "OPS-56 · 전시회 물품 공급업체 견적 확인",
+ agent: "운영 도우미",
+ running: "실행 중",
+ completed: "완료됨",
+ opening:
+ "공급업체 3곳에 견적을 요청하고 오늘 퇴근 전까지 회신해 달라고 했습니다. 견적이 다 모여야 비교할 수 있어서 일단 여기서 멈춥니다.",
+ section: "깨우기",
+ newWakeup: "새 웨이크업",
+ formTitle: "새 웨이크업",
+ when: "조건",
+ wake: "깨울 대상",
+ chooseCondition: "조건 선택",
+ groupTime: "시간",
+ condAt: "특정 시각",
+ condAtHint: "10분 후, 내일 09:00",
+ condRecurring: "정기 확인",
+ condRecurringHint: "매시간·매일, 종료일 필요",
+ atPresets: ["10분 후", "1시간 후", "내일 09:00", "시간 지정"],
+ daily: "매일 09:00",
+ until: "종료일",
+ untilValue: "2026. 10. 27.",
+ instructionTitle: "깨운 후 수행할 일",
+ instruction: "견적 메일을 확인해 3곳 모두 회신했는지 봐 주세요. 다 모였으면 비교표로 정리하고 추천안을 제시해 주세요.",
+ onBehalf: "시작된 실행은 사용자를 대신해 동작합니다",
+ cancel: "취소",
+ create: "만들기",
+ rule: { at: "10월 21일 오전 09:00에 깨우기", recurring: "09:00 · 매일" } as Record<Choice, string>,
+ summaryOnce: "운영 도우미 깨우기 · 한 번만 트리거",
+ summaryFired: "운영 도우미 깨우기 · 한 번만 트리거 · 트리거됨",
+ summaryNext: (date: number) =>
+ `운영 도우미 깨우기 · 다음: 10월 ${date}일 오전 09:00 · 10월 27일까지`,
+ summaryOff: "운영 도우미 깨우기 · 꺼짐",
+ thisRun: (done: boolean) => `이번 실행: ${done ? "실행 성공" : "실행 중"}`,
+ lastRun: "최근 실행: 실행 성공",
+ history: "깨우기 기록 1",
+ chip: (date: number) => `10월 ${date}일 오전 09:00에 운영 도우미 깨우기`,
+ source: { at: "깨우기 · 10월 21일 오전 09:00에 깨우기", recurring: "깨우기 · 09:00 · 매일" } as Record<Choice, string>,
+ steps: {
+ read: "태스크, 댓글, 깨우기 지시 읽기",
+ found: "견적 메일 확인: 3곳 모두 회신함",
+ none: "견적 메일 확인: 아직 회신 없음",
+ compare: "견적 비교표 만들기",
+ checkin: "답할 내용이 없어 조용한 확인으로 종료",
+ disable: "견적이 모였으니 이 정기 확인 끄기",
+ },
+ checkin: "조용한 확인: 3곳 모두 아직 견적 회신 없음. 내일 다시 확인",
+ reply:
+ "견적 3건이 모두 도착했습니다. A는 세트당 52만 원에 납기 10일, B는 48만 원에 14일, C는 55만 원에 7일입니다. 전시회까지 3주 남아서 B를 추천합니다. 비교표는 태스크에 첨부했습니다.",
+ fastForward: (date: number) => `10월 ${date}일 오전 09:00으로 건너뛰기`,
+ captions: {
+ idle: "운영 도우미가 공급업체 3곳에 견적을 요청하고 회신을 기다리고 있습니다.",
+ ready: "견적은 내일 전에는 오지 않습니다. 깨우기 섹션의 +를 클릭해 운영 도우미가 나중에 이 태스크로 돌아오게 하세요.",
+ form: "깨울 대상에는 태스크 담당자인 운영 도우미가 미리 선택되어 있고, 지시도 적혀 있습니다. 조건 메뉴를 여세요.",
+ menu: "여기서는 두 시간 조건 모두 쓸 수 있습니다. '특정 시각'은 한 번만, '정기 확인'은 종료일까지 매일 깨웁니다.",
+ preset: "시간은 기본값이 1시간 후입니다. 내일 09:00으로 바꾸세요.",
+ presetMenu: "'내일 09:00'을 선택하세요.",
+ filled: {
+ at: "내일 09:00에 운영 도우미를 한 번 깨웁니다. 만들기를 클릭하세요.",
+ recurring: "10월 27일까지 매일 09:00에 운영 도우미를 깨웁니다. 만들기를 클릭하세요.",
+ } as Record<Choice, string>,
+ scheduled:
+ "규칙이 태스크에 저장되고, 헤더에 이 태스크가 무엇을 기다리는지 표시됩니다. 그동안 돌아가는 실행은 없습니다. 깨우는 시각으로 건너뛰세요.",
+ running: "09:00이 되었습니다. 운영 도우미가 깨우기 지시를 가지고 이 태스크에서 새 실행을 시작합니다.",
+ checked:
+ "아직 회신이 없습니다. 이번 실행은 댓글을 남기지 않고 타임라인에 조용한 확인 기록만 남겼습니다. 하루 더 건너뛰세요.",
+ running2: "다음 날 확인이 시작됩니다.",
+ done: {
+ at: "운영 도우미가 견적을 읽고 비교를 마쳤습니다. 한 번만 깨우는 규칙은 트리거된 뒤 끝나고 기록으로 옮겨집니다. '다시 보기'로 다른 조건도 해 보세요.",
+ recurring:
+ "견적이 도착했습니다. 운영 도우미가 비교 결과를 올리고 정기 확인을 껐습니다. '다시 보기'로 다른 조건도 해 보세요.",
+ } as Record<Choice, string>,
+ },
+ },
+ fr: {
+ title: "OPS-56 · Confirmer les devis fournisseurs pour le matériel du salon",
+ agent: "Assistant ops",
+ running: "En cours",
+ completed: "Terminée",
+ opening:
+ "J'ai demandé un devis à 3 fournisseurs, avec une réponse attendue d'ici ce soir. Je ne peux pas comparer les prix avant d'avoir tous les devis, je m'arrête donc ici pour l'instant.",
+ section: "Réveils",
+ newWakeup: "Nouveau réveil",
+ formTitle: "Nouveau réveil",
+ when: "Quand",
+ wake: "Réveiller",
+ chooseCondition: "Choisir une condition",
+ groupTime: "Temps",
+ condAt: "À une heure donnée",
+ condAtHint: "Dans 10 min, demain 09:00",
+ condRecurring: "Vérifier régulièrement",
+ condRecurringHint: "Toutes les heures ou chaque jour, avec une date de fin",
+ atPresets: ["Dans 10 minutes", "Dans 1 heure", "Demain 09:00", "Choisir une heure"],
+ daily: "Chaque jour 09:00",
+ until: "Jusqu’au",
+ untilValue: "27/10/2026",
+ instructionTitle: "Action au réveil",
+ instruction:
+ "Consultez les e-mails de devis pour voir si les 3 fournisseurs ont répondu. Si c'est le cas, rassemblez les devis dans un tableau comparatif et recommandez-en un.",
+ onBehalf: "Les exécutions agissent en votre nom",
+ cancel: "Annuler",
+ create: "Créer",
+ rule: { at: "Réveil à 21 oct., 09:00", recurring: "À 09:00 · Tous les jours" } as Record<Choice, string>,
+ summaryOnce: "Réveiller Assistant ops · Déclencher une fois",
+ summaryFired: "Réveiller Assistant ops · Déclencher une fois · Déclenché",
+ summaryNext: (date: number) =>
+ `Réveiller Assistant ops · Prochain : ${date} oct., 09:00 · jusqu’au 27 oct.`,
+ summaryOff: "Réveiller Assistant ops · Désactivé",
+ thisRun: (done: boolean) => `Cette exécution : ${done ? "Exécution réussie" : "En cours"}`,
+ lastRun: "Dernière exécution : Exécution réussie",
+ history: "Historique des réveils 1",
+ chip: (date: number) => `${date} oct., 09:00 · réveille Assistant ops`,
+ source: { at: "Réveil · Réveil à 21 oct., 09:00", recurring: "Réveil · À 09:00 · Tous les jours" } as Record<Choice, string>,
+ steps: {
+ read: "Lire la tâche, les commentaires et l'instruction du réveil",
+ found: "Consulter les e-mails de devis : les 3 ont répondu",
+ none: "Consulter les e-mails de devis : aucune réponse pour l'instant",
+ compare: "Préparer le tableau comparatif des devis",
+ checkin: "Rien qui demande une réponse : terminer par une vérification silencieuse",
+ disable: "Devis reçus : désactiver cette vérification régulière",
+ },
+ checkin: "vérification silencieuse : aucun des 3 fournisseurs n'a encore envoyé de devis ; nouvelle vérification demain",
+ reply:
+ "Les 3 devis sont arrivés : A à 260 € le lot, livré en 10 jours ; B à 240 € en 14 jours ; C à 275 € en 7 jours. Le salon a lieu dans 3 semaines, je recommande donc B. Le tableau comparatif est joint à la tâche.",
+ fastForward: (date: number) => `Avancer au ${date} oct., 09:00`,
+ captions: {
+ idle: "Assistant ops a demandé des devis à 3 fournisseurs et attend leurs réponses.",
+ ready: "Les devis n'arriveront pas avant demain. Cliquez sur + dans la section Réveils pour qu'Assistant ops revienne plus tard sur cette tâche.",
+ form: "L'assigné de la tâche, Assistant ops, est déjà sélectionné et l'instruction est rédigée. Ouvrez le menu des conditions.",
+ menu: "Les deux conditions de temps conviennent ici : « À une heure donnée » réveille Assistant ops une fois ; « Vérifier régulièrement » le réveille chaque jour jusqu'à la date de fin.",
+ preset: "L'heure par défaut est dans une heure. Remplacez-la par demain 09:00.",
+ presetMenu: "Choisissez « Demain 09:00 ».",
+ filled: {
+ at: "Assistant ops sera réveillé une fois, demain à 09:00. Cliquez sur Créer.",
+ recurring: "Assistant ops sera réveillé chaque jour à 09:00 jusqu'au 27 oct. Cliquez sur Créer.",
+ } as Record<Choice, string>,
+ scheduled:
+ "La règle est enregistrée sur la tâche, et l'en-tête indique ce que la tâche attend. Aucune exécution ne tourne entre-temps. Avancez jusqu'à l'heure du réveil.",
+ running: "Il est 09:00 : Assistant ops démarre une nouvelle exécution sur cette tâche, avec l'instruction du réveil.",
+ checked:
+ "Pas encore de réponse. Cette exécution n'a publié aucun commentaire ; elle a seulement laissé une vérification silencieuse dans l'historique. Avancez d'un jour de plus.",
+ running2: "La vérification du lendemain commence.",
+ done: {
+ at: "Assistant ops a trouvé les devis et terminé la comparaison. Un réveil unique s'arrête après s'être déclenché et passe dans l'historique. Utilisez Rejouer pour essayer l'autre condition.",
+ recurring:
+ "Les devis sont arrivés. Assistant ops a publié la comparaison et désactivé la vérification régulière. Utilisez Rejouer pour essayer l'autre condition.",
+ } as Record<Choice, string>,
+ },
+ },
+};
+
+type Phase =
+ | "idle"
+ | "ready"
+ | "form"
+ | "menu"
+ | "preset"
+ | "presetMenu"
+ | "filled"
+ | "scheduled"
+ | "running"
+ | "checked"
+ | "done";
+
+const pillClass =
+ "inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-md border bg-background px-2 text-label outline-none transition-colors enabled:hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default [&_svg]:shrink-0";
+
+/** The rule's on/off switch; shown, not operated, in this demo. */
+function SwitchMark({ on }: { on: boolean }) {
+ return (
+ <span
+ aria-hidden
+ className={cn(
+ "inline-flex h-4 w-7 shrink-0 items-center rounded-full p-0.5 transition-colors",
+ on ? "bg-brand" : "bg-muted-foreground/30",
+ )}
+ >
+ <span className={cn("size-3 rounded-full bg-background transition-transform", on && "translate-x-3")} />
+ </span>
+ );
+}
+
+function RuleRow({
+ icon,
+ title,
+ on,
+ children,
+}: {
+ icon: ReactNode;
+ title: string;
+ on: boolean;
+ children: ReactNode;
+}) {
+ return (
+ <div className="grid grid-cols-[minmax(0,1fr)_auto] gap-x-2 rounded-md py-1.5 text-caption motion-safe:animate-in motion-safe:fade-in">
+ <span className="flex min-w-0 items-start gap-2 pl-2">
+ {icon}
+ <span className="min-w-0 font-medium break-words">{title}</span>
+ </span>
+ <span className="row-span-2 self-start pt-0.5 pr-2">
+ <SwitchMark on={on} />
+ </span>
+ <span className="min-w-0 pl-7.5 break-words text-muted-foreground">{children}</span>
+ </div>
+ );
+}
+
+export function WakeupDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [cycle, setCycle] = useState(0);
+ const [phase, setPhase] = useState<Phase>("idle");
+ const [choice, setChoice] = useState<Choice | null>(null);
+ const [round, setRound] = useState<1 | 2>(1);
+ const [stepsShown, setStepsShown] = useState(0);
+
+ useEffect(() => {
+ if (!visible) return;
+ clear();
+ after(600, () => setPhase("ready"));
+ }, [visible, cycle, after, clear]);
+
+ const stepsFor = (c: Choice, r: 1 | 2) =>
+ c === "at"
+ ? [t.steps.read, t.steps.found, t.steps.compare]
+ : r === 1
+ ? [t.steps.read, t.steps.none, t.steps.checkin]
+ : [t.steps.read, t.steps.found, t.steps.compare, t.steps.disable];
+
+ const pick = (c: Choice) => {
+ setChoice(c);
+ setPhase(c === "at" ? "preset" : "filled");
+ };
+
+ const fastForward = () => {
+ if (!choice) return;
+ const r: 1 | 2 = phase === "checked" ? 2 : 1;
+ const steps = stepsFor(choice, r);
+ setRound(r);
+ setStepsShown(1);
+ setPhase("running");
+ steps.forEach((_, i) => {
+ if (i > 0) after(i * 1000, () => setStepsShown(i + 1));
+ });
+ after(steps.length * 1000 + 300, () => setPhase(choice === "recurring" && r === 1 ? "checked" : "done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("idle");
+ setChoice(null);
+ setRound(1);
+ setStepsShown(0);
+ setCycle((c) => c + 1);
+ };
+
+ const shown: Phase = visible ? phase : "idle";
+ const created = ["scheduled", "running", "checked", "done"].includes(shown) && choice !== null;
+ const formOpen = ["form", "menu", "preset", "presetMenu", "filled"].includes(shown);
+ const running = shown === "running";
+ // A one-time rule turns off once it has fired; the regular check stays on
+ // until the agent turns it off at the end.
+ const ruleOn = created && (choice === "recurring" ? shown !== "done" : shown === "scheduled");
+ const current = created && (ruleOn || running);
+ // The day of the rule's next firing: the 21st until the first run starts.
+ const next = shown === "scheduled" ? 21 : running && round === 2 ? 23 : 22;
+ const steps = choice ? stepsFor(choice, round) : [];
+ const showRun = choice !== null && (running || shown === "checked" || shown === "done");
+ const showCheckin = choice === "recurring" && (shown === "checked" || round === 2);
+
+ const caption = (() => {
+ switch (shown) {
+ case "filled":
+ return t.captions.filled[choice ?? "at"];
+ case "done":
+ return t.captions.done[choice ?? "at"];
+ case "running":
+ return round === 2 ? t.captions.running2 : t.captions.running;
+ default:
+ return t.captions[shown];
+ }
+ })();
+
+ const ruleLines = (() => {
+ if (!choice) return null;
+ if (choice === "at") {
+ return (
+ <>
+ <span className="block">{shown === "scheduled" ? t.summaryOnce : t.summaryFired}</span>
+ {shown !== "scheduled" && <span className="block">{t.thisRun(shown === "done")}</span>}
+ </>
+ );
+ }
+ return (
+ <>
+ <span className="block">{shown === "done" ? t.summaryOff : t.summaryNext(next)}</span>
+ {running && <span className="block">{t.thisRun(false)}</span>}
+ {(shown === "checked" || shown === "done") && <span className="block">{t.lastRun}</span>}
+ </>
+ );
+ })();
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={caption} onReplay={replay}>
+ <div className="grid gap-4 p-4 sm:grid-cols-[minmax(0,1fr)_17rem]">
+ {/* Issue: header and timeline */}
+ <div className="flex min-w-0 flex-col gap-3">
+ <div className="flex min-h-7 flex-wrap items-center gap-2">
+ <span className="min-w-0 truncate text-body font-medium">{t.title}</span>
+ {ruleOn && (
+ <span
+ key={next}
+ className="inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full border px-2.5 text-caption motion-safe:animate-in motion-safe:fade-in"
+ >
+ <Bell aria-hidden className="size-3.5 shrink-0" />
+ <span className="min-w-0 truncate">{t.chip(next)}</span>
+ </span>
+ )}
+ </div>
+
+ <DemoComment author={t.agent} agent>
+ {t.opening}
+ </DemoComment>
+
+ {/* The check-in follows its own run, then stays above the next day's run. */}
+ {showCheckin && round === 2 && (
+ <div className="flex min-w-0 items-start gap-2 px-1 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <RefreshCw aria-hidden className="mt-px size-4 shrink-0" />
+ <span className="min-w-0 flex-1 break-words">
+ <span className="font-medium text-foreground">{t.agent}</span> {t.checkin}
+ </span>
+ <span className="hidden shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-micro sm:inline">
+ {t.rule.recurring}
+ </span>
+ </div>
+ )}
+
+ {showRun && choice && (
+ <div key={round} className="flex min-w-0 flex-col gap-1.5 motion-safe:animate-in motion-safe:fade-in">
+ <span className="inline-flex w-fit max-w-full min-w-0 items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 text-micro text-muted-foreground">
+ <Bell aria-hidden className="size-3 shrink-0" />
+ <span className="truncate">{t.source[choice]}</span>
+ </span>
+ <DemoRun agent={t.agent} status={running ? t.running : t.completed} active={running}>
+ {steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={running && i === stepsShown - 1 ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ </div>
+ )}
+
+ {showCheckin && round === 1 && (
+ <div className="flex min-w-0 items-start gap-2 px-1 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <RefreshCw aria-hidden className="mt-px size-4 shrink-0" />
+ <span className="min-w-0 flex-1 break-words">
+ <span className="font-medium text-foreground">{t.agent}</span> {t.checkin}
+ </span>
+ <span className="hidden shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-micro sm:inline">
+ {t.rule.recurring}
+ </span>
+ </div>
+ )}
+
+ {shown === "done" && (
+ <DemoComment author={t.agent} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ {(shown === "scheduled" || shown === "checked") && (
+ <div className="mt-auto">
+ <CoachMark active side="right" ringClassName="rounded-md">
+ <Button type="button" size="sm" variant="outline" onClick={fastForward}>
+ <FastForward />
+ {t.fastForward(shown === "checked" ? 22 : 21)}
+ </Button>
+ </CoachMark>
+ </div>
+ )}
+ </div>
+
+ {/* Issue sidebar: the Wakeups section */}
+ <aside className="min-w-0 border-t pt-3 sm:border-t-0 sm:border-l sm:pt-0 sm:pl-4">
+ <div className="mb-1 flex items-center gap-1">
+ <span className="flex min-h-8 flex-1 items-center gap-1 px-2 text-caption font-medium">
+ {t.section}
+ <span className="text-muted-foreground tabular-nums">{current ? 1 : 0}</span>
+ <ChevronRight aria-hidden className="size-3 rotate-90 text-muted-foreground" />
+ </span>
+ <CoachMark active={shown === "ready"} side="bottom" align="end" ringClassName="rounded-md">
+ <button
+ type="button"
+ aria-label={t.newWakeup}
+ title={t.newWakeup}
+ disabled={shown !== "ready"}
+ onClick={() => setPhase("form")}
+ className="inline-flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none enabled:hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50"
+ >
+ <Plus className="size-4" />
+ </button>
+ </CoachMark>
+ </div>
+
+ {formOpen && (
+ <div className="rounded-lg border bg-popover p-3 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95">
+ <div className="text-label font-semibold">{t.formTitle}</div>
+ <div className="mt-3 grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2">
+ <span className="flex h-7 items-center text-label text-muted-foreground">{t.when}</span>
+ <div className="flex min-w-0 flex-wrap items-center gap-1.5">
+ <CoachMark active={shown === "form"} quiet ringClassName="rounded-md">
+ <button
+ type="button"
+ disabled={shown !== "form"}
+ onClick={() => setPhase("menu")}
+ className={cn(pillClass, !choice && "border-ring")}
+ >
+ {choice === "recurring" ? (
+ <RefreshCw aria-hidden className="size-3.5 text-muted-foreground" />
+ ) : (
+ <Clock3 aria-hidden className="size-3.5 text-muted-foreground" />
+ )}
+ <span className={cn("truncate", !choice && "text-muted-foreground")}>
+ {choice === "at" ? t.condAt : choice === "recurring" ? t.condRecurring : t.chooseCondition}
+ </span>
+ <ChevronDown aria-hidden className="size-3 text-muted-foreground" />
+ </button>
+ </CoachMark>
+ {choice === "at" && (
+ <CoachMark active={shown === "preset"} quiet ringClassName="rounded-md">
+ <button
+ type="button"
+ disabled={shown !== "preset"}
+ onClick={() => setPhase("presetMenu")}
+ className={pillClass}
+ >
+ <span className="truncate">{shown === "filled" ? t.atPresets[2] : t.atPresets[1]}</span>
+ <ChevronDown aria-hidden className="size-3 text-muted-foreground" />
+ </button>
+ </CoachMark>
+ )}
+ {choice === "recurring" && (
+ <span className={pillClass}>
+ <span className="truncate">{t.daily}</span>
+ <ChevronDown aria-hidden className="size-3 text-muted-foreground" />
+ </span>
+ )}
+ </div>
+
+ {shown === "menu" && (
+ <div className="col-span-2 rounded-md border bg-popover p-1 shadow-sm motion-safe:animate-in motion-safe:fade-in">
+ <div className="px-2 py-1 text-micro text-muted-foreground">{t.groupTime}</div>
+ {(
+ [
+ ["at", Clock3, t.condAt, t.condAtHint],
+ ["recurring", RefreshCw, t.condRecurring, t.condRecurringHint],
+ ] as const
+ ).map(([key, Icon, label, hint]) => (
+ <CoachMark key={key} active quiet ringClassName="rounded-sm" className="flex w-full">
+ <button
+ type="button"
+ onClick={() => pick(key)}
+ className="flex w-full items-start gap-2 rounded-sm px-2 py-1.5 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50"
+ >
+ <Icon aria-hidden className="mt-0.5 size-3.5 shrink-0 text-muted-foreground" />
+ <span className="flex min-w-0 flex-col gap-0.5">
+ <span className="text-label">{label}</span>
+ <span className="text-caption text-muted-foreground">{hint}</span>
+ </span>
+ </button>
+ </CoachMark>
+ ))}
+ </div>
+ )}
+
+ {shown === "presetMenu" && (
+ <div className="col-span-2 rounded-md border bg-popover p-1 shadow-sm motion-safe:animate-in motion-safe:fade-in">
+ {t.atPresets.map((label, i) =>
+ i === 2 ? (
+ <CoachMark key={label} active quiet ringClassName="rounded-sm" className="flex w-full">
+ <button
+ type="button"
+ onClick={() => setPhase("filled")}
+ className="flex w-full rounded-sm px-2 py-1 text-left text-label outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50"
+ >
+ {label}
+ </button>
+ </CoachMark>
+ ) : (
+ <span key={label} className="flex px-2 py-1 text-label text-muted-foreground">
+ {label}
+ </span>
+ ),
+ )}
+ </div>
+ )}
+
+ <span className="flex h-7 items-center text-label text-muted-foreground">{t.wake}</span>
+ <span className={cn(pillClass, "w-fit")}>
+ <DemoAvatar name={t.agent} agent />
+ <span className="truncate">{t.agent}</span>
+ <ChevronDown aria-hidden className="size-3 text-muted-foreground" />
+ </span>
+ </div>
+
+ <div className="mt-3 text-caption font-medium">{t.instructionTitle}</div>
+ {/* Static text, not a textarea: the demo is scripted around this instruction. */}
+ <div className="mt-1 rounded-md border bg-background px-2 py-1.5 text-label">{t.instruction}</div>
+
+ {choice === "recurring" && (
+ <div className="mt-3 flex items-center gap-3 text-caption">
+ <span className="text-muted-foreground">{t.until}</span>
+ <span className="rounded-md border bg-background px-2 py-1 tabular-nums">{t.untilValue}</span>
+ </div>
+ )}
+
+ <div className="mt-3 flex flex-col gap-2 border-t pt-2.5">
+ <span className="flex min-w-0 items-center gap-1 text-caption text-muted-foreground">
+ <Info aria-hidden className="size-3 shrink-0" />
+ {t.onBehalf}
+ </span>
+ <span className="flex items-center justify-end gap-1.5 sm:pb-7">
+ <Button type="button" size="sm" variant="ghost" disabled>
+ {t.cancel}
+ </Button>
+ <CoachMark active={shown === "filled"} side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" disabled={shown !== "filled"} onClick={() => setPhase("scheduled")}>
+ {t.create}
+ </Button>
+ </CoachMark>
+ </span>
+ </div>
+ </div>
+ )}
+
+ {created && choice && current && (
+ <RuleRow
+ icon={<Clock3 aria-hidden className="mt-px size-3.5 shrink-0 text-muted-foreground" />}
+ title={t.rule[choice]}
+ on={ruleOn}
+ >
+ {ruleLines}
+ </RuleRow>
+ )}
+
+ {created && choice && !current && (
+ <>
+ <div className="flex min-h-8 items-center gap-1 px-2 text-caption text-muted-foreground">
+ <ChevronRight aria-hidden className="size-3 rotate-90" />
+ {t.history}
+ </div>
+ <RuleRow
+ icon={<Clock3 aria-hidden className="mt-px size-3.5 shrink-0 text-muted-foreground" />}
+ title={t.rule[choice]}
+ on={false}
+ >
+ {ruleLines}
+ </RuleRow>
+ </>
+ )}
+
+ </aside>
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/demos/workflow-demo.tsx b/apps/docs/components/demos/workflow-demo.tsx
new file mode 100644
index 0000000000..bfde956d8f
--- /dev/null
+++ b/apps/docs/components/demos/workflow-demo.tsx
@@ -0,0 +1,585 @@
+"use client";
+
+import { useRef, useState } from "react";
+import { ArrowRight, ChevronDown, ChevronRight, CornerDownRight, X } from "lucide-react";
+import { Button } from "@multica/ui/components/ui/button";
+import { cn } from "@multica/ui/lib/utils";
+import {
+ CoachMark,
+ DemoAvatar,
+ DemoComment,
+ DemoFrame,
+ DemoRun,
+ DemoStep,
+ useDemoCopy,
+ useDemoTimers,
+ useStartWhenVisible,
+} from "./demo-kit";
+
+// The Content template's middle columns (packages/views/workflows/templates.ts)
+// between the fixed todo / done / cancelled columns every workflow lists.
+type Status = "todo" | "drafting" | "editing" | "scheduled" | "done" | "cancelled";
+type Handler = "you" | "agent" | "member";
+
+const PICKER: Status[] = ["todo", "drafting", "editing", "scheduled", "done", "cancelled"];
+const STEPS: Status[] = ["drafting", "editing", "scheduled"];
+const HANDLERS: Partial<Record<Status, Handler>> = { drafting: "you", editing: "agent", scheduled: "member" };
+
+const statusDot: Record<Status, string> = {
+ todo: "border-muted-foreground",
+ drafting: "border-warning bg-warning/40",
+ editing: "border-brand bg-brand/40",
+ scheduled: "border-success bg-success/40",
+ done: "border-success bg-success",
+ cancelled: "border-muted-foreground bg-muted-foreground/50",
+};
+
+const copy = {
+ en: {
+ title: "OPS-31 · Write the anniversary event announcement",
+ issue: "OPS-31",
+ workflow: "Content",
+ project: "Anniversary online event",
+ statusLabel: "Status",
+ assigneeLabel: "Assignee",
+ names: { you: "You", agent: "Writing helper", member: "Lei Li" } as Record<Handler, string>,
+ status: {
+ todo: "Todo",
+ drafting: "Drafting",
+ editing: "Editing",
+ scheduled: "Scheduled",
+ done: "Done",
+ cancelled: "Cancelled",
+ } as Record<Status, string>,
+ handsOffTo: (name: string) => `Hands off to ${name}`,
+ then: (status: string) => `Then → ${status}`,
+ pickerHeader: (workflow: string, project: string) => `${workflow} · from project "${project}"`,
+ pickerFooter: "Only this issue's workflow statuses are shown. The right side is who entering the status hands it to.",
+ confirmTitle: (issue: string, status: string) => `Move ${issue} to "${status}"?`,
+ reassignRun: (from: string, to: string) => [`The assignee changes from `, from, ` to `, to, `, who starts working right away.`],
+ briefToggle: (name: string) => `What ${name} receives`,
+ brief: "Polish the title and body in the brand voice, fix typos, check the event dates and prize rules, then move the issue to Scheduled.",
+ cancel: "Cancel",
+ confirm: (status: string) => `Move to ${status}`,
+ close: "Close",
+ changed: (from: string, to: string) => `changed status from ${from} to ${to}`,
+ handedTo: "Handed to",
+ runStarted: "and started a run",
+ memberNoRun: "(member, no run)",
+ queued: "Queued",
+ running: "Running",
+ completed: "Completed",
+ steps: [
+ "Read the issue description, comments and handoff brief",
+ "Tighten the title and fix two typos",
+ "Check the event dates, prize rules and sign-up link",
+ "Set the status to Scheduled",
+ ],
+ reply: "The post is edited: a shorter title and two date fixes. Lei Li, it is ready to schedule.",
+ captions: {
+ idle: "An issue in a project that uses the Content workflow.",
+ start: "Your draft is written. Click Status to pass the issue to the next step.",
+ pick: "The list only has this workflow's steps, and shows who each one hands to. Pick Editing.",
+ confirm: "The confirmation names the new assignee, and you can read the brief it will receive. Confirm, or cancel to keep the issue where it is.",
+ kept: "Nothing moved: the issue stays in Drafting and you are still the assignee. Click Status to try again.",
+ running: "Writing helper took over and started a run. The description, comments and earlier work stay on the issue.",
+ done: "Writing helper followed \"Then\" and moved the issue to Scheduled, which hands it to Lei Li. A member handoff only changes the assignee and starts no run.",
+ },
+ },
+ zh: {
+ title: "OPS-31 · 写周年庆活动推文",
+ issue: "OPS-31",
+ workflow: "内容生产",
+ project: "周年庆线上活动",
+ statusLabel: "状态",
+ assigneeLabel: "负责人",
+ names: { you: "你", agent: "文案助手", member: "李雷" } as Record<Handler, string>,
+ status: {
+ todo: "待办",
+ drafting: "撰写中",
+ editing: "编辑中",
+ scheduled: "已排期",
+ done: "已完成",
+ cancelled: "已取消",
+ } as Record<Status, string>,
+ handsOffTo: (name: string) => `交给 ${name}`,
+ then: (status: string) => `完成后 → ${status}`,
+ pickerHeader: (workflow: string, project: string) => `${workflow} · 跟随项目"${project}"`,
+ pickerFooter: "只显示这个任务所在工作流里的状态。右侧是进入该状态时的处理人。",
+ confirmTitle: (issue: string, status: string) => `将 ${issue} 移到"${status}"?`,
+ reassignRun: (from: string, to: string) => [`负责人将从 `, from, ` 改为 `, to, `,它会立即开始运行。`],
+ briefToggle: (name: string) => `${name} 会收到的说明`,
+ brief: "按品牌语气润色标题和正文,改掉错别字,核对活动时间和抽奖规则,改好后把任务移到已排期。",
+ cancel: "取消",
+ confirm: (status: string) => `移到${status}`,
+ close: "关闭",
+ changed: (from: string, to: string) => `状态从 ${from} 改为 ${to}`,
+ handedTo: "已交给",
+ runStarted: "并开始运行",
+ memberNoRun: "(成员,不启动运行)",
+ queued: "排队中",
+ running: "运行中",
+ completed: "已完成",
+ steps: [
+ "读取任务描述、评论和交接说明",
+ "缩短标题,改掉两处错别字",
+ "核对活动时间、抽奖规则和报名链接",
+ "把状态改为 已排期",
+ ],
+ reply: "推文已改好:标题换成了更短的版本,修正了两处日期。李雷,可以安排发布了。",
+ captions: {
+ idle: "一条任务,所在项目使用内容生产工作流。",
+ start: "你的初稿写完了。点击状态,把任务交给下一步。",
+ pick: "列表里只有这个工作流的步骤,右侧标出进入后交给谁。选择编辑中。",
+ confirm: "确认窗口写明了新的负责人,还能查看它会收到的说明。确认交接,或取消留在原处。",
+ kept: "没有交接:任务留在撰写中,负责人还是你。点击状态可以再试一次。",
+ running: "文案助手接手并开始运行。任务的描述、评论和之前的成果都留在原处。",
+ done: "文案助手按\"完成后进入\"把任务移到已排期,负责人随之换成李雷。交给成员只改负责人,不启动运行。",
+ },
+ },
+ ja: {
+ title: "OPS-31 · 周年記念イベントの告知投稿を書く",
+ issue: "OPS-31",
+ workflow: "コンテンツ制作",
+ project: "周年記念オンラインイベント",
+ statusLabel: "ステータス",
+ assigneeLabel: "担当者",
+ names: { you: "あなた", agent: "ライティングアシスタント", member: "李雷" } as Record<Handler, string>,
+ status: {
+ todo: "未着手",
+ drafting: "執筆中",
+ editing: "編集中",
+ scheduled: "公開予約済み",
+ done: "完了",
+ cancelled: "キャンセル済み",
+ } as Record<Status, string>,
+ handsOffTo: (name: string) => `${name} に引き継ぐ`,
+ then: (status: string) => `完了後 → ${status}`,
+ pickerHeader: (workflow: string, project: string) => `${workflow} · プロジェクト「${project}」に従う`,
+ pickerFooter: "このタスクのワークフローのステータスだけを表示しています。右側はそのステータスに入ったときの引き継ぎ先です。",
+ confirmTitle: (issue: string, status: string) => `${issue} を「${status}」に移動しますか?`,
+ reassignRun: (from: string, to: string) => [`担当者が `, from, ` から `, to, ` に変わり、すぐに実行を始めます。`],
+ briefToggle: (name: string) => `${name} が受け取る説明`,
+ brief: "ブランドのトーンに合わせてタイトルと本文を整え、誤字を直し、イベントの日程と抽選ルールを確認してから、タスクを公開予約済みに移動する。",
+ cancel: "キャンセル",
+ confirm: (status: string) => `${status}に移動`,
+ close: "閉じる",
+ changed: (from: string, to: string) => `ステータスを ${from} から ${to} に変更しました`,
+ handedTo: "引き継ぎ先",
+ runStarted: "実行を開始",
+ memberNoRun: "(メンバー、実行なし)",
+ queued: "待機中",
+ running: "実行中",
+ completed: "完了",
+ steps: [
+ "タスクの説明、コメント、引き継ぎの説明を読む",
+ "タイトルを短くし、誤字を 2 か所直す",
+ "イベントの日程、抽選ルール、申し込みリンクを確認する",
+ "ステータスを 公開予約済み に変更",
+ ],
+ reply: "投稿を直しました。タイトルを短くし、日付を 2 か所修正しています。李雷さん、公開の予約をお願いします。",
+ captions: {
+ idle: "コンテンツ制作ワークフローを使うプロジェクトのタスク。",
+ start: "下書きが書き終わりました。ステータスをクリックして、タスクを次のステップに渡します。",
+ pick: "一覧にはこのワークフローのステップだけが並び、右側にそれぞれの引き継ぎ先が出ます。編集中を選んでください。",
+ confirm: "確認ダイアログに新しい担当者が表示され、その担当者が受け取る説明も読めます。確定するか、キャンセルしてそのままにします。",
+ kept: "何も動いていません。タスクは執筆中のままで、担当者もあなたのままです。ステータスをクリックしてもう一度試せます。",
+ running: "ライティングアシスタントが引き継いで実行を始めました。説明、コメント、それまでの成果はタスクに残っています。",
+ done: "ライティングアシスタントは「完了したら移動」に従ってタスクを公開予約済みに移し、担当者は李雷に替わりました。メンバーへの引き継ぎは担当者を変えるだけで、実行は始まりません。",
+ },
+ },
+ ko: {
+ title: "OPS-31 · 창립 기념 이벤트 공지 게시물 작성",
+ issue: "OPS-31",
+ workflow: "콘텐츠 제작",
+ project: "창립 기념 온라인 이벤트",
+ statusLabel: "상태",
+ assigneeLabel: "담당자",
+ names: { you: "나", agent: "글쓰기 도우미", member: "리레이" } as Record<Handler, string>,
+ status: {
+ todo: "할 일",
+ drafting: "작성 중",
+ editing: "편집 중",
+ scheduled: "예약됨",
+ done: "완료",
+ cancelled: "취소됨",
+ } as Record<Status, string>,
+ handsOffTo: (name: string) => `${name}에게 인계`,
+ then: (status: string) => `완료 후 → ${status}`,
+ pickerHeader: (workflow: string, project: string) => `${workflow} · 프로젝트 “${project}” 기준`,
+ pickerFooter: "이 태스크 워크플로의 상태만 표시합니다. 오른쪽은 해당 상태에 들어갈 때의 처리자입니다.",
+ confirmTitle: (issue: string, status: string) => `${issue}을(를) “${status}”(으)로 옮길까요?`,
+ reassignRun: (from: string, to: string) => [`담당자가 `, from, `에서 `, to, `(으)로 바뀌고 바로 실행을 시작합니다.`],
+ briefToggle: (name: string) => `${name}이(가) 받는 설명`,
+ brief: "브랜드 말투에 맞춰 제목과 본문을 다듬고, 오탈자를 고치고, 이벤트 일정과 추첨 규칙을 확인한 뒤 태스크를 예약됨으로 옮긴다.",
+ cancel: "취소",
+ confirm: (status: string) => `${status}(으)로 이동`,
+ close: "닫기",
+ changed: (from: string, to: string) => `상태를 ${from}에서 ${to}로 변경했습니다`,
+ handedTo: "인계 대상",
+ runStarted: "실행 시작",
+ memberNoRun: "(멤버, 실행 없음)",
+ queued: "대기 중",
+ running: "실행 중",
+ completed: "완료됨",
+ steps: [
+ "태스크 설명, 댓글, 인계 설명 읽기",
+ "제목을 줄이고 오탈자 두 곳 수정",
+ "이벤트 일정, 추첨 규칙, 신청 링크 확인",
+ "상태를 예약됨으로 변경",
+ ],
+ reply: "게시물을 다듬었습니다. 제목을 더 짧게 바꾸고 날짜 두 곳을 고쳤습니다. 리레이 님, 게시 예약을 부탁드립니다.",
+ captions: {
+ idle: "콘텐츠 제작 워크플로를 쓰는 프로젝트의 태스크입니다.",
+ start: "초안을 다 썼습니다. 상태를 클릭해 태스크를 다음 단계로 넘기세요.",
+ pick: "목록에는 이 워크플로의 단계만 있고, 오른쪽에 각 단계의 인계 대상이 표시됩니다. 편집 중을 선택하세요.",
+ confirm: "확인 창에 새 담당자가 표시되고, 그 담당자가 받을 설명도 볼 수 있습니다. 확인하거나, 취소해서 그대로 두세요.",
+ kept: "아무것도 바뀌지 않았습니다. 태스크는 작성 중에 그대로 있고 담당자도 여전히 나입니다. 상태를 클릭해 다시 해 보세요.",
+ running: "글쓰기 도우미가 넘겨받아 실행을 시작했습니다. 설명, 댓글, 이전 결과는 태스크에 그대로 남아 있습니다.",
+ done: "글쓰기 도우미가 “완료 후 이동”에 따라 태스크를 예약됨으로 옮겼고, 담당자는 리레이로 바뀌었습니다. 멤버에게 넘기면 담당자만 바뀌고 실행은 시작되지 않습니다.",
+ },
+ },
+ fr: {
+ title: "OPS-31 · Rédiger l'annonce de l'événement anniversaire",
+ issue: "OPS-31",
+ workflow: "Contenu",
+ project: "Événement en ligne de l'anniversaire",
+ statusLabel: "Statut",
+ assigneeLabel: "Assigné à",
+ names: { you: "Vous", agent: "Assistant rédaction", member: "Lei Li" } as Record<Handler, string>,
+ status: {
+ todo: "À faire",
+ drafting: "Rédaction",
+ editing: "Relecture",
+ scheduled: "Planifié",
+ done: "Terminé",
+ cancelled: "Annulé",
+ } as Record<Status, string>,
+ handsOffTo: (name: string) => `Confiée à ${name}`,
+ then: (status: string) => `puis → ${status}`,
+ pickerHeader: (workflow: string, project: string) => `${workflow} · selon le projet « ${project} »`,
+ pickerFooter: "Seuls les états du workflow de cette tâche sont affichés. À droite : à qui elle est confiée en entrant dans l’état.",
+ confirmTitle: (issue: string, status: string) => `Déplacer ${issue} vers « ${status} » ?`,
+ reassignRun: (from: string, to: string) => [`L’assigné passe de `, from, ` à `, to, `, qui commence aussitôt.`],
+ briefToggle: (name: string) => `Ce que reçoit ${name}`,
+ brief: "Retravailler le titre et le texte dans le ton de la marque, corriger les coquilles, vérifier les dates de l'événement et le règlement du tirage, puis passer la tâche à Planifié.",
+ cancel: "Annuler",
+ confirm: (status: string) => `Déplacer vers ${status}`,
+ close: "Fermer",
+ changed: (from: string, to: string) => `a changé le statut de ${from} à ${to}`,
+ handedTo: "Confiée à",
+ runStarted: "exécution lancée",
+ memberNoRun: "(membre, sans exécution)",
+ queued: "En file d'attente",
+ running: "En cours",
+ completed: "Terminée",
+ steps: [
+ "Lire la description de la tâche, les commentaires et les consignes de relais",
+ "Raccourcir le titre et corriger deux coquilles",
+ "Vérifier les dates, le règlement du tirage et le lien d'inscription",
+ "Passer le statut à Planifié",
+ ],
+ reply: "L'annonce est relue : un titre plus court et deux dates corrigées. Lei Li, elle est prête à être planifiée.",
+ captions: {
+ idle: "Une tâche dans un projet qui utilise le workflow Contenu.",
+ start: "Votre brouillon est écrit. Cliquez sur Statut pour passer la tâche à l'étape suivante.",
+ pick: "La liste ne contient que les étapes de ce workflow et indique à qui chacune confie la tâche. Choisissez Relecture.",
+ confirm: "La confirmation indique le nouvel assigné, et vous pouvez lire les consignes qu'il recevra. Confirmez, ou annulez pour laisser la tâche où elle est.",
+ kept: "Rien n'a bougé : la tâche reste en Rédaction et vous en êtes toujours l'assigné. Cliquez sur Statut pour réessayer.",
+ running: "Assistant rédaction a pris le relais et lancé une exécution. La description, les commentaires et le travail déjà fait restent sur la tâche.",
+ done: "Assistant rédaction a suivi « Une fois terminé, passer à » et déplacé la tâche vers Planifié, qui la confie à Lei Li. Un relais vers un membre ne change que l'assigné et ne lance aucune exécution.",
+ },
+ },
+};
+
+type Phase = "idle" | "start" | "pick" | "confirm" | "kept" | "running" | "done";
+
+type Entry = { actor: Handler; from: Status; to: Status; handedTo: Handler };
+
+export function WorkflowDemo() {
+ const t = useDemoCopy(copy);
+ const { after, clear } = useDemoTimers();
+ const [frameRef, visible] = useStartWhenVisible<HTMLElement>();
+ const [phase, setPhase] = useState<Exclude<Phase, "idle">>("start");
+ const [status, setStatus] = useState<Status>("drafting");
+ const [assignee, setAssignee] = useState<Handler>("you");
+ const [entries, setEntries] = useState<Entry[]>([]);
+ const [briefOpen, setBriefOpen] = useState(false);
+ const [queued, setQueued] = useState(true);
+ const [stepsShown, setStepsShown] = useState(0);
+ const statusRef = useRef<Status>("drafting");
+
+ const shownPhase: Phase = visible ? phase : "idle";
+
+ // A status change that enters a handoff step reassigns the issue in the same write.
+ const enter = (to: Status, actor: Handler) => {
+ const from = statusRef.current;
+ const handedTo = HANDLERS[to]!;
+ statusRef.current = to;
+ setStatus(to);
+ setAssignee(handedTo);
+ setEntries((items) => [...items, { actor, from, to, handedTo }]);
+ };
+
+ const confirm = () => {
+ enter("editing", "you");
+ setPhase("running");
+ after(900, () => setQueued(false));
+ t.steps.forEach((_, i) =>
+ after(900 + i * 1000, () => {
+ setStepsShown(i + 1);
+ if (i === t.steps.length - 1) enter("scheduled", "agent");
+ }),
+ );
+ after(900 + t.steps.length * 1000 + 500, () => setPhase("done"));
+ };
+
+ const replay = () => {
+ clear();
+ setPhase("start");
+ statusRef.current = "drafting";
+ setStatus("drafting");
+ setAssignee("you");
+ setEntries([]);
+ setBriefOpen(false);
+ setQueued(true);
+ setStepsShown(0);
+ };
+
+ const canOpenPicker = visible && (phase === "start" || phase === "kept" || phase === "pick");
+ const runActive = phase === "running";
+ const showRun = phase === "running" || phase === "done";
+ const name = (h: Handler) => t.names[h];
+
+ return (
+ <DemoFrame frameRef={frameRef} title={t.title} caption={t.captions[shownPhase]} onReplay={replay}>
+ <div className="relative flex min-h-[28rem] flex-col gap-3 p-4">
+ <ol className="flex flex-wrap items-stretch gap-1.5" aria-label={t.workflow}>
+ {STEPS.map((step, i) => {
+ const handler = HANDLERS[step]!;
+ const next = STEPS[i + 1];
+ return (
+ <li key={step} className="m-0 flex min-w-0 items-center gap-1.5">
+ <div
+ className={cn(
+ "min-w-0 rounded-lg border px-2 py-1 transition-colors",
+ status === step ? "border-brand/40 bg-brand/5" : "bg-background",
+ )}
+ >
+ <div className="flex items-center gap-1.5 text-label font-medium">
+ <span aria-hidden className={cn("size-2.5 rounded-full border-2", statusDot[step])} />
+ {t.status[step]}
+ </div>
+ <div className="flex items-center gap-1 text-micro text-muted-foreground">
+ <DemoAvatar name={name(handler)} agent={handler === "agent"} />
+ <span className="truncate">{t.handsOffTo(name(handler))}</span>
+ </div>
+ {handler === "agent" && next && (
+ <div className="text-micro text-muted-foreground">{t.then(t.status[next])}</div>
+ )}
+ </div>
+ {next && <ArrowRight aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />}
+ </li>
+ );
+ })}
+ </ol>
+
+ <dl className="grid w-fit grid-cols-[auto_auto] items-center gap-x-6 gap-y-2 text-body">
+ <dt className="text-caption text-muted-foreground">{t.statusLabel}</dt>
+ <dd className="relative">
+ <CoachMark
+ active={visible && (phase === "start" || phase === "kept")}
+ side="right"
+ ringClassName="rounded-md"
+ >
+ <button
+ type="button"
+ aria-haspopup="listbox"
+ aria-expanded={phase === "pick"}
+ disabled={!canOpenPicker}
+ onClick={() => setPhase(phase === "pick" ? "start" : "pick")}
+ className="-mx-1.5 inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 hover:bg-muted disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-3 rounded-full border-2 transition-colors", statusDot[status])} />
+ <span key={status} className="motion-safe:animate-in motion-safe:fade-in">
+ {t.status[status]}
+ </span>
+ {canOpenPicker && <ChevronDown aria-hidden className="size-3.5 text-muted-foreground" />}
+ </button>
+ </CoachMark>
+ {phase === "pick" && (
+ <div
+ role="listbox"
+ aria-label={t.statusLabel}
+ className="absolute top-full left-0 z-10 mt-1 w-72 max-w-[calc(100vw-7.5rem)] rounded-lg border bg-popover p-1 text-popover-foreground shadow-md motion-safe:animate-in motion-safe:fade-in"
+ >
+ <div className="truncate px-2 pt-1 pb-1 text-micro text-muted-foreground">
+ {t.pickerHeader(t.workflow, t.project)}
+ </div>
+ {PICKER.map((s) => {
+ const handler = HANDLERS[s];
+ return (
+ <CoachMark quiet key={s} active={s === "editing"} ringClassName="rounded-md" className="flex w-full">
+ <button
+ type="button"
+ role="option"
+ aria-selected={s === status}
+ disabled={s !== "editing"}
+ onClick={() => setPhase("confirm")}
+ className="flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-body hover:bg-accent disabled:opacity-45 disabled:hover:bg-transparent"
+ >
+ <span aria-hidden className={cn("size-3 shrink-0 rounded-full border-2", statusDot[s])} />
+ <span className="min-w-0 flex-1 truncate">{t.status[s]}</span>
+ {s === status ? (
+ <span className="text-caption text-muted-foreground">✓</span>
+ ) : (
+ handler && (
+ <span className="flex shrink-0 items-center gap-1 text-caption text-muted-foreground">
+ <DemoAvatar name={name(handler)} agent={handler === "agent"} />
+ {name(handler)}
+ </span>
+ )
+ )}
+ </button>
+ </CoachMark>
+ );
+ })}
+ <div className="mt-1 border-t px-2 pt-1.5 pb-1 text-micro text-muted-foreground">{t.pickerFooter}</div>
+ </div>
+ )}
+ </dd>
+ <dt className="text-caption text-muted-foreground">{t.assigneeLabel}</dt>
+ <dd key={assignee} className="flex items-center gap-1.5 motion-safe:animate-in motion-safe:fade-in">
+ <DemoAvatar name={name(assignee)} agent={assignee === "agent"} />
+ {name(assignee)}
+ </dd>
+ </dl>
+
+ {entries.length > 0 && (
+ <ul className="flex list-none flex-col gap-1.5 p-0">
+ {entries.map((entry, i) => (
+ <li key={i} className="m-0 min-w-0 text-caption text-muted-foreground motion-safe:animate-in motion-safe:fade-in">
+ <div className="flex min-w-0 items-center gap-1.5">
+ <DemoAvatar name={name(entry.actor)} agent={entry.actor === "agent"} />
+ <span className="font-medium text-foreground">{name(entry.actor)}</span>
+ <span className="min-w-0 truncate">{t.changed(t.status[entry.from], t.status[entry.to])}</span>
+ </div>
+ <div className="mt-0.5 flex flex-wrap items-center gap-1.5 pl-6">
+ <CornerDownRight aria-hidden className="size-3 shrink-0" />
+ <span>{t.handedTo}</span>
+ <DemoAvatar name={name(entry.handedTo)} agent={entry.handedTo === "agent"} />
+ <span className="font-medium text-foreground">{name(entry.handedTo)}</span>
+ <span>{entry.handedTo === "member" ? t.memberNoRun : t.runStarted}</span>
+ </div>
+ </li>
+ ))}
+ </ul>
+ )}
+
+ {showRun && (
+ <DemoRun
+ agent={name("agent")}
+ status={runActive ? (queued ? t.queued : t.running) : t.completed}
+ active={runActive}
+ >
+ {t.steps.slice(0, stepsShown).map((step, i) => (
+ <DemoStep key={step} state={i === stepsShown - 1 && runActive ? "running" : "done"}>
+ {step}
+ </DemoStep>
+ ))}
+ </DemoRun>
+ )}
+
+ {phase === "done" && (
+ <DemoComment author={name("agent")} agent>
+ {t.reply}
+ </DemoComment>
+ )}
+
+ {phase === "confirm" && (
+ <div className="absolute inset-0 z-20 flex items-center justify-center bg-background/60 p-4 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in">
+ <div
+ role="dialog"
+ aria-modal="false"
+ aria-labelledby="workflow-demo-title"
+ className="w-full max-w-md rounded-xl border bg-popover text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:zoom-in-95"
+ >
+ <div className="flex items-start gap-2 p-4 pb-3">
+ <div className="min-w-0 flex-1">
+ <div id="workflow-demo-title" className="text-title-sm font-medium">
+ {t.confirmTitle(t.issue, t.status.editing)}
+ </div>
+ <div className="mt-1 flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground">
+ <span className="inline-flex items-center gap-1">
+ <span aria-hidden className={cn("size-2.5 rounded-full border-2", statusDot.drafting)} />
+ {t.status.drafting}
+ </span>
+ <ArrowRight aria-hidden className="size-3" />
+ <span className="inline-flex items-center gap-1">
+ <span aria-hidden className={cn("size-2.5 rounded-full border-2", statusDot.editing)} />
+ {t.status.editing}
+ </span>
+ <span aria-hidden>·</span>
+ <span>{t.workflow}</span>
+ </div>
+ </div>
+ <button
+ type="button"
+ aria-label={t.close}
+ onClick={() => setPhase("kept")}
+ className="rounded-md p-1 text-muted-foreground hover:bg-muted"
+ >
+ <X className="size-4" />
+ </button>
+ </div>
+ <div className="space-y-3 px-4 pb-4">
+ <p className="text-body leading-7">
+ {t.reassignRun(name("you"), name("agent")).map((part, i) =>
+ i % 2 === 1 ? (
+ <span key={i} className="mx-0.5 inline-flex items-center gap-1 align-middle font-medium">
+ <DemoAvatar name={part} agent={i === 3} />
+ {part}
+ </span>
+ ) : (
+ <span key={i}>{part}</span>
+ ),
+ )}
+ </p>
+ <div>
+ <button
+ type="button"
+ aria-expanded={briefOpen}
+ onClick={() => setBriefOpen((v) => !v)}
+ className="flex items-center gap-1 text-caption font-medium text-brand hover:underline"
+ >
+ {briefOpen ? (
+ <ChevronDown aria-hidden className="size-3.5" />
+ ) : (
+ <ChevronRight aria-hidden className="size-3.5" />
+ )}
+ {t.briefToggle(name("agent"))}
+ </button>
+ {briefOpen && (
+ <div className="mt-2 rounded-lg border bg-muted/40 px-3 py-2 text-caption motion-safe:animate-in motion-safe:fade-in">
+ {t.brief}
+ </div>
+ )}
+ </div>
+ </div>
+ <div className="flex justify-end gap-2 rounded-b-xl border-t bg-muted/40 px-4 py-3">
+ <Button type="button" variant="outline" size="sm" onClick={() => setPhase("kept")}>
+ {t.cancel}
+ </Button>
+ <CoachMark active side="bottom" align="end" ringClassName="rounded-lg">
+ <Button type="button" size="sm" onClick={confirm}>
+ {t.confirm(t.status.editing)}
+ </Button>
+ </CoachMark>
+ </div>
+ </div>
+ </div>
+ )}
+ </div>
+ </DemoFrame>
+ );
+}
diff --git a/apps/docs/components/search-dialog.tsx b/apps/docs/components/search-dialog.tsx
new file mode 100644
index 0000000000..2ae02c3ee4
--- /dev/null
+++ b/apps/docs/components/search-dialog.tsx
@@ -0,0 +1,118 @@
+"use client";
+
+import { useMemo } from "react";
+import {
+ SearchDialog,
+ SearchDialogClose,
+ SearchDialogContent,
+ SearchDialogHeader,
+ SearchDialogIcon,
+ SearchDialogInput,
+ SearchDialogList,
+ SearchDialogListItem,
+ SearchDialogOverlay,
+ type SearchItemType,
+} from "fumadocs-ui/components/dialog/search";
+import { useI18n } from "fumadocs-ui/contexts/i18n";
+import type { SharedProps } from "fumadocs-ui/contexts/search";
+import { useFetchSearch, type SearchResultItem } from "fumadocs-core/search/client";
+
+// Results read like DocSearch and Pagefind: the page and section titles, then
+// at most a few one-line excerpts around the match. Fumadocs's default dialog
+// renders every matching paragraph and table in full, which buries the titles.
+
+/** Matches shown under one page; Pagefind caps its sub-results at three too. */
+const MAX_MATCHES_PER_PAGE = 3;
+/** Characters of an excerpt: about one line of CJK, or 12–15 English words. */
+const EXCERPT_LENGTH = 80;
+/** Characters kept before the match, so it reads in context. */
+const EXCERPT_LEAD = 20;
+
+interface HastNode {
+ type: string;
+ tagName?: string;
+ value?: string;
+ children?: HastNode[];
+}
+
+/** The text of a parsed result; table cells are joined into one line. */
+function textOf(node: HastNode): string {
+ if (node.type === "text") return node.value ?? "";
+ const parts = (node.children ?? []).map(textOf);
+ if (node.tagName === "tr") return parts.filter((p) => p.trim()).join(" · ");
+ return parts.join(node.tagName === "table" || node.tagName === "tbody" ? " " : "");
+}
+
+/** Cuts `text` to a window around the first place it matches `query`. */
+function excerpt(text: string, query: string): string {
+ const flat = text.replace(/\s+/g, " ").trim();
+ if (flat.length <= EXCERPT_LENGTH) return flat;
+ const lower = flat.toLowerCase();
+ const terms = [query, ...query.split(/\s+/)].map((t) => t.trim().toLowerCase()).filter(Boolean);
+ const hit = terms.map((t) => lower.indexOf(t)).find((i) => i >= 0) ?? 0;
+ let start = Math.max(0, Math.min(hit - EXCERPT_LEAD, flat.length - EXCERPT_LENGTH));
+ let end = start + EXCERPT_LENGTH;
+ // Don't cut Latin words in half; CJK text has no spaces to snap to.
+ const space = (from: number, to: number) => flat.slice(from, to).search(/\s/);
+ if (start > 0 && /\w/.test(flat[start - 1] ?? "")) {
+ const s = space(start, Math.min(hit, start + 15));
+ if (s >= 0) start += s + 1;
+ }
+ if (end < flat.length && /\w/.test(flat[end] ?? "")) {
+ const tail = flat.slice(end - 15, end);
+ const s = tail.lastIndexOf(" ");
+ if (s >= 0) end -= 15 - s;
+ }
+ return `${start > 0 ? "…" : ""}${flat.slice(start, end).trim()}${end < flat.length ? "…" : ""}`;
+}
+
+/** Flattens tables, caps the matches per page and shortens each one. */
+function compact(items: SearchResultItem[], query: string): SearchItemType[] {
+ const out: SearchItemType[] = [];
+ let matches = 0;
+ const rows = items.flatMap((item) => (item.type === "table" ? item.rows : [item]));
+ for (const row of rows) {
+ if (row.type === "page") {
+ matches = 0;
+ out.push({ id: row.id, url: row.url, type: "page", content: row.content, breadcrumbs: row.breadcrumbs });
+ continue;
+ }
+ if (matches >= MAX_MATCHES_PER_PAGE) continue;
+ matches += 1;
+ const text = textOf(row.hastContent as HastNode);
+ out.push({
+ id: row.id,
+ url: row.url,
+ type: row.type,
+ content: row.type === "heading" ? text : excerpt(text, query),
+ breadcrumbs: row.breadcrumbs,
+ });
+ }
+ return out;
+}
+
+export function DocsSearchDialog({ api, ...props }: SharedProps & { api?: string }) {
+ const { locale } = useI18n();
+ const search = useFetchSearch({ api, locale });
+ const items = useMemo(
+ () => (search.data ? compact(search.data.items, search.data.query) : null),
+ [search.data],
+ );
+ return (
+ <SearchDialog {...search} {...props}>
+ <SearchDialogOverlay />
+ <SearchDialogContent>
+ <SearchDialogHeader>
+ <SearchDialogIcon />
+ <SearchDialogInput />
+ <SearchDialogClose />
+ </SearchDialogHeader>
+ <SearchDialogList
+ items={items}
+ // Excerpts stay within two lines even on a phone.
+ Item={(p) => <SearchDialogListItem {...p} className="[&_.prose]:line-clamp-2" />}
+ />
+ </SearchDialogContent>
+ </SearchDialog>
+ );
+}
diff --git a/apps/docs/content/docs/agents-create.fr.mdx b/apps/docs/content/docs/agents-create.fr.mdx
index 5ae5056fad..351a7be239 100644
--- a/apps/docs/content/docs/agents-create.fr.mdx
+++ b/apps/docs/content/docs/agents-create.fr.mdx
@@ -1,26 +1,37 @@
---
title: Créer et configurer un agent
-description: Choisissez un point de départ, puis définissez les responsabilités, les capacités, la configuration d'exécution et l'Accès de l'agent.
+description: Choisissez un runtime, puis définissez les responsabilités, les capacités, la configuration d'exécution et l'Accès de l'agent.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { CreateAgentDemo } from "@/components/demos/create-agent-demo";
Pour créer un agent, il faut d'abord un [runtime](/daemon-runtimes) fonctionnel. Le runtime détermine l'ordinateur et l'outil de codage IA utilisés par l'agent ; l'agent porte l'identité durable, les instructions et les capacités.
-Sur la page **Agents** de l'espace de travail, cliquez sur **Nouvel agent**.
+## Étapes de création
-## Points de départ
+Sur la page **Agents** de l'espace de travail, cliquez sur **Nouvel agent**, puis suivez trois étapes :
-La page de création propose deux options :
+<Steps>
+<Step>
-| Option | Quand l'utiliser |
-|---|---|
-| **Partir de zéro** | Vous connaissez déjà les responsabilités de l'agent et souhaitez remplir vous-même chaque champ. |
-| **Construire avec l'IA** | Décrivez d'abord l'objectif, puis laissez l'Agent Builder poser les questions clés et générer un brouillon. |
+**Choisissez le runtime.** La page liste les outils de codage IA (harness) de chaque machine ; seuls ceux en ligne permettent de continuer. Les modèles proposés ensuite, et la disponibilité des skills, dépendent de ce choix.
+
+</Step>
+<Step>
+
+**Configurez l'agent.** Renseignez le nom, la description, les instructions, les skills, le modèle et l'Accès. Pour ne pas tout rédiger vous-même, cliquez sur **Laisser l'IA rédiger** : le brouillon actuel est confié à l'Agent Builder, qui pose les questions clés dans une conversation et complète la configuration. Ce bouton n'apparaît que si le runtime choisi est en ligne et n'est pas un runtime cloud. Pendant la conversation, vous pouvez modifier à tout moment le brouillon affiché à côté.
-**Construire avec l'IA** nécessite un runtime en ligne pour la conversation avec le Builder. Dans les deux cas, vous pouvez relire et modifier la configuration finale avant la création.
+</Step>
+<Step>
-![Points de départ de la création d'un agent : Partir de zéro et Construire avec l'IA](/images/docs/quickstart-new-agent.webp)
+**Cliquez sur Créer l'agent.** La page de fin indique sur quel runtime l'agent s'exécute et propose la suite : lui confier une première tâche, le mentionner dans une tâche ou l'ajouter à un squad.
+
+</Step>
+</Steps>
+
+<CreateAgentDemo />
## Champs obligatoires
@@ -95,7 +106,7 @@ L'Accès détermine quels membres peuvent exécuter cet agent (l'assigner, l'@me
![Paramètres d'Accès : Moi uniquement, Tout l'espace de travail, Personnes précises](/images/docs/agent-access-settings.webp)
-Seul le propriétaire de l'agent peut modifier l'Accès — les administrateurs de l'espace de travail ne le peuvent pas. Les `owner` et `admin` de l'espace de travail peuvent gérer le reste de la configuration, mais ne peuvent pas se servir de leur rôle d'administrateur pour exécuter des agents auxquels ils n'ont pas accès.
+Seul le propriétaire de l'agent peut modifier l'Accès ; les administrateurs de l'espace de travail ne le peuvent pas. Les `owner` et `admin` de l'espace de travail peuvent gérer le reste de la configuration, mais ne peuvent pas se servir de leur rôle d'administrateur pour exécuter des agents auxquels ils n'ont pas accès.
## Configuration après la création
@@ -106,7 +117,7 @@ Sur la page de détail de l'agent, vous pouvez continuer à ajuster :
| **Parallélisme** | Nombre d'exécutions que l'agent peut mener en même temps. La valeur par défaut est 6 ; les exécutions au-delà de ce plafond restent en file d'attente. |
| **Variables d'environnement** | Injectent des variables au démarrage de l'outil de codage IA. |
| **Arguments personnalisés** | Ajoutés un par un aux arguments CLI de l'outil de codage IA. |
-| **MCP** | Fournit une configuration de serveurs MCP aux outils de codage IA qui la prennent en charge. |
+| **MCP** | Configure les serveurs MCP des outils de codage IA qui les prennent en charge : ajoutez-en un propre à cet agent, ou choisissez parmi les serveurs MCP partagés de l'espace de travail. |
| **Intégrations** | Connecte les services externes que cet agent peut utiliser. |
Le daemon qui héberge le runtime a aussi un plafond global de parallélisme (20 par défaut) ; le parallélisme effectif est le plus petit des deux.
@@ -133,13 +144,59 @@ Les arguments personnalisés sont transmis à l'outil de codage IA sous forme de
Ne placez pas d'identifiants ni d'autres secrets dans les arguments personnalisés. Ils restent dans l'argv du processus enfant et peuvent être visibles par d'autres processus locaux via `ps` ou `/proc` ; utilisez plutôt les variables d'environnement (`custom_env`). Les journaux du daemon masquent les valeurs des arguments, mais cela ne protège pas la liste des processus du système d'exploitation.
</Callout>
-La configuration MCP peut contenir des jetons ; ses règles de stockage et d'affichage sont les mêmes que pour les variables d'environnement. Seuls les runtimes qui prennent en charge la configuration MCP gérée affichent cette section ; les outils sans prise en charge de MCP ne l'acquièrent pas simplement parce qu'une configuration est enregistrée.
+La configuration MCP peut contenir des jetons ; ses règles de stockage et d'affichage sont les mêmes que pour les variables d'environnement. Seuls les runtimes qui prennent en charge la configuration MCP gérée affichent cette section ; les outils sans prise en charge de MCP ne l'acquièrent pas simplement parce qu'une configuration est enregistrée. Quand un agent a une configuration MCP, le daemon y fusionne aussi les serveurs MCP déjà configurés sur la machine du runtime ; voir [Configuration MCP locale](/daemon-runtimes#local-mcp).
+
+L'onglet **MCP** d'un agent répartit les serveurs MCP qu'il peut utiliser en trois groupes :
+
+| Groupe | Origine |
+|---|---|
+| **Géré par Multica** | Serveurs propres à cet agent. Cliquez sur **Ajouter un MCP** et saisissez une commande STDIO ou une URL Streamable HTTP, dans l'éditeur visuel ou en JSON. |
+| **Depuis la bibliothèque de l'espace de travail** | Serveurs partagés de l'espace de travail assignés à cet agent ; voir la section suivante. |
+| **Hérité du runtime** | La configuration utilisateur de l'outil de codage IA sur la machine du runtime, en lecture seule. Elle n'est lisible que lorsqu'un runtime local est en ligne. |
+
+En cas de noms identiques, l'entrée propre à l'agent l'emporte sur un serveur assigné depuis l'espace de travail, et les deux l'emportent sur un serveur du runtime du même nom. L'entrée écartée porte la mention **Remplacé** ou **Remplacé par Multica**.
+
+### Serveurs MCP partagés de l'espace de travail
+
+Quand plusieurs agents ont besoin du même serveur MCP, inutile de saisir son URL et son jeton sur chacun. Un `owner` ou un `admin` de l'espace de travail l'ajoute une fois dans **Paramètres → Serveurs MCP**, puis l'assigne aux agents qui en ont besoin.
+
+<Steps>
+<Step>
+
+Un administrateur ouvre **Paramètres → Serveurs MCP**, clique sur **Ajouter un serveur** et saisit un nom et une configuration.
+
+</Step>
+<Step>
+
+Un serveur ajouté n'appartient encore à aucun agent. Ouvrez l'onglet **MCP** de chaque agent qui doit l'utiliser, cliquez sur **Ajouter depuis l'espace de travail** dans le groupe **Depuis la bibliothèque de l'espace de travail**, puis choisissez-le.
+
+</Step>
+<Step>
+
+Chaque assignation a son propre interrupteur : vous pouvez désactiver un serveur pour un agent sans le retirer. Les changements s'appliquent à partir de la prochaine exécution de cet agent.
+
+</Step>
+</Steps>
+
+Dans la liste **Paramètres → Serveurs MCP**, chaque serveur indique « Utilisé par N agents » ou « Attribué à aucun agent ». À savoir :
+
+- **La configuration est en écriture seule.** Une fois enregistrées, les URL, commandes, en-têtes et valeurs d'environnement ne sont plus jamais affichés, à personne, owners compris. Pour les changer, cliquez sur **Remplacer la configuration** et saisissez une configuration complète. Renommer conserve la configuration et toutes les assignations.
+- **La suppression touche tous les agents.** Supprimer un serveur dans les paramètres le retire aussi de tous les agents auxquels il était assigné, à partir de leur prochaine exécution. Pour qu'un seul agent cesse de l'utiliser, désactivez-le ou retirez-le dans l'onglet **MCP** de cet agent.
+- **Permissions.** Les membres voient la liste mais ne peuvent ni ajouter ni modifier de serveur. Assigner ou retirer un serveur sur un agent demande d'être owner de cet agent, ou `owner` ou `admin` de l'espace de travail. Un agent en cours d'exécution ne peut ni ajouter de serveur ni changer les assignations via le CLI.
+
+Le CLI permet les mêmes opérations. Les configurations contiennent souvent des jetons : passez-les par un fichier ou par stdin plutôt qu'en argument de ligne de commande.
+
+```bash
+multica workspace mcp add linear --server-config-file ./linear.json
+multica workspace mcp list
+multica agent mcp add <agent-id> <server-id>
+```
## Dupliquer un agent
La duplication reprend l'essentiel de la configuration de travail, sauf le nom : instructions, amorces de conversation, skills, arguments personnalisés, avatar, limite de parallélisme et paramètres d'Accès. Le modèle, le niveau de réflexion et la vitesse (niveau de service) sont également repris ; si le runtime d'origine est indisponible et que la copie doit passer sur un autre runtime, ces trois valeurs sont effacées et doivent être choisies à nouveau.
-Les valeurs des variables d'environnement et la configuration MCP ne sont jamais copiées et doivent être redéfinies sur le nouvel agent. La duplication conserve le rattachement au runtime et les paramètres d'Accès de l'agent d'origine.
+Les valeurs des variables d'environnement, la configuration MCP et les assignations de serveurs MCP de l'espace de travail ne sont jamais copiées et doivent être redéfinies sur le nouvel agent.
## Créer avec le CLI
diff --git a/apps/docs/content/docs/agents-create.ja.mdx b/apps/docs/content/docs/agents-create.ja.mdx
index a4ce0998df..26c22b2f9b 100644
--- a/apps/docs/content/docs/agents-create.ja.mdx
+++ b/apps/docs/content/docs/agents-create.ja.mdx
@@ -1,26 +1,37 @@
---
title: エージェントの作成と構成
-description: 開始方法を選び、エージェントの職責・能力・実行方法・Access を定義します。
+description: ランタイムを選び、エージェントの職責・能力・実行方法・Access を定義します。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { CreateAgentDemo } from "@/components/demos/create-agent-demo";
エージェントを作成するには、先に使える[ランタイム](/daemon-runtimes)が必要です。ランタイムは、そのエージェントがどのコンピュータとどの AI コーディングツールを使うかを決めます。エージェント側は、長く使うアイデンティティ、指示、能力を保持します。
-ワークスペースの **エージェント** ページで **新規エージェント** をクリックします。
+## 作成の流れ
-## 開始方法の選択
+ワークスペースの **エージェント** ページで **新規エージェント** をクリックし、3 つのステップで作成します。
-作成ページには 2 つの方法があります。
+<Steps>
+<Step>
-| 方法 | 向いている場合 |
-|---|---|
-| **Start blank** | エージェントの職責がすでに決まっていて、各項目を自分で記入したい。 |
-| **Build with AI** | まず目標を説明し、Agent Builder に重要な点を確認させてドラフトを生成させたい。 |
+**ランタイムを選ぶ。** 各マシン上の AI コーディングツール(ハーネス)が一覧表示され、オンラインのものだけが次へ進めます。この後で選べるモデルや、スキルを使えるかどうかは、ここでの選択で決まります。
+
+</Step>
+<Step>
+
+**エージェントを設定する。** 名前、説明、指示、スキル、モデル、アクセスを入力します。一から書きたくなければ **AI に書いてもらう** をクリックします。今の下書きが Agent Builder に渡り、Builder が対話の中で重要な点を確認しながら設定を補います。このボタンは、選んだランタイムがオンラインで、クラウドランタイムでない場合にだけ表示されます。対話中も、横に表示される設定の下書きはいつでも直接編集できます。
-Build with AI には、Builder との対話のためにオンラインのランタイムが必要です。どちらの方法でも、作成前に最終的な構成を確認して修正できます。
+</Step>
+<Step>
-![エージェント作成の開始方法選択画面:Start blank と Build with AI](/images/docs/quickstart-new-agent.webp)
+**エージェントを作成をクリックする。** 完了ページには、エージェントがどのランタイムで実行されるかと、次にできること(最初のタスクを割り当てる、イシューでメンションする、スクワッドに追加する)が表示されます。
+
+</Step>
+</Steps>
+
+<CreateAgentDemo />
## 必須項目
@@ -89,11 +100,11 @@ Access は、どのメンバーがこのエージェントを実行(割り当
| Access | 意味 |
|---|---|
-| **Only me** | 自分だけが実行できます。デフォルトです。 |
-| **Entire workspace** | ワークスペースの全メンバーが実行できます。 |
-| **Specific people** | 自分と選択したメンバーだけが実行できます。 |
+| **自分のみ** | 自分だけが実行できます。デフォルトです。 |
+| **ワークスペース全体** | ワークスペースの全メンバーが実行できます。 |
+| **特定のメンバー** | 自分と選択したメンバーだけが実行できます。 |
-![Access 設定:Only me、Entire workspace、Specific people の 3 択](/images/docs/agent-access-settings.webp)
+![Access 設定:自分のみ、ワークスペース全体、特定のメンバーの 3 択](/images/docs/agent-access-settings.webp)
Access を変更できるのはエージェントの owner だけで、ワークスペースの管理者にもできません。ワークスペースの `owner` と `admin` はその他の構成を管理できますが、管理者の立場を使って、許可されていないエージェントを実行することはできません。
@@ -106,7 +117,7 @@ Access を変更できるのはエージェントの owner だけで、ワーク
| **同時実行上限** | 同じエージェントが同時に実行できる実行数。デフォルトは 6 で、上限に達すると以降の実行はキューで待機します。 |
| **環境変数** | AI コーディングツールの起動時に変数を注入します。 |
| **カスタム引数** | AI コーディングツールの CLI 引数に 1 つずつ追加されます。 |
-| **MCP** | 対応する AI コーディングツールに MCP サーバー構成を提供します。 |
+| **MCP** | 対応する AI コーディングツールの MCP サーバーを構成します。このエージェント専用に追加するほか、ワークスペースで共有している MCP サーバーから選ぶこともできます。 |
| **インテグレーション** | このエージェントが使える外部サービスを接続します。 |
ランタイムが載っているデーモンにも全体の同時実行上限(デフォルト 20)があり、実際の同時実行数は 2 つの小さい方になります。
@@ -133,13 +144,59 @@ Access を変更できるのはエージェントの owner だけで、ワーク
認証情報などのシークレットをカスタム引数に入れないでください。値は子プロセスの argv に残り、同じマシン上の別プロセスから `ps` や `/proc` を通じて見える可能性があります。代わりに環境変数(`custom_env`)を使用してください。デーモンログでは引数値をマスクしますが、OS のプロセス一覧までは保護できません。
</Callout>
-MCP 構成にはトークンが含まれることがあり、保存と表示のルールは環境変数と同じです。この項目が表示されるのは、マネージド MCP 構成をサポートするランタイムだけです。サポートしないツールが、構成を保存しただけで MCP 機能を獲得することはありません。
+MCP 構成にはトークンが含まれることがあり、保存と表示のルールは環境変数と同じです。この項目が表示されるのは、マネージド MCP 構成をサポートするランタイムだけです。サポートしないツールが、構成を保存しただけで MCP 機能を獲得することはありません。エージェントに MCP 構成があるとき、デーモンはランタイムのマシンに設定済みの MCP サーバーもマージします。[ローカルの MCP 設定](/daemon-runtimes#local-mcp)を参照してください。
+
+エージェント詳細ページの **MCP** タブには、そのエージェントが使える MCP サーバーが 3 つのグループに分かれて表示されます。
+
+| グループ | 出どころ |
+|---|---|
+| **Multica で管理** | このエージェントだけのサーバーです。**MCP を追加**をクリックし、ビジュアルエディタか JSON で STDIO の起動コマンドまたは Streamable HTTP の URL を入力します。 |
+| **ワークスペースライブラリから** | ワークスペースの共有サーバーのうち、このエージェントに割り当てられたものです。次の節を参照してください。 |
+| **ランタイムから継承** | ランタイムのマシン上にある AI コーディングツール自身のユーザー設定で、読み取り専用です。ローカルランタイムがオンラインのときだけ読み取れます。 |
+
+名前が重なった場合は、エージェント自身の設定が割り当てられたワークスペースのサーバーより優先され、どちらもランタイムにある同名のサーバーより優先されます。負けた側には**上書き**または **Multica で上書き**と表示されます。
+
+### ワークスペースで共有する MCP サーバー
+
+同じ MCP サーバーを複数のエージェントで使う場合、エージェントごとに URL やトークンを入力し直す必要はありません。ワークスペースの `owner` または `admin` が**設定 → MCP サーバー**で一度追加し、必要なエージェントに割り当てます。
+
+<Steps>
+<Step>
+
+管理者が**設定 → MCP サーバー**を開き、**サーバーを追加**をクリックして名前と設定を入力します。
+
+</Step>
+<Step>
+
+追加しただけでは、どのエージェントにも割り当てられません。使わせたいエージェントの **MCP** タブを開き、**ワークスペースライブラリから**のグループで**ワークスペースから追加**をクリックして選びます。
+
+</Step>
+<Step>
+
+割り当てごとにスイッチがあり、割り当てを外さずに一時的にオフにできます。変更はそのエージェントの次の実行から反映されます。
+
+</Step>
+</Steps>
+
+**設定 → MCP サーバー**の一覧では、各サーバーの下に「N 個のエージェントが使用中」または「どのエージェントにも割り当てられていません」と表示されます。使うときの注意点は次のとおりです。
+
+- **設定は書き込み専用**:保存した URL、コマンド、ヘッダー、環境変数の値は、owner を含め誰にも再表示されません。変更するには**設定を置き換え**をクリックし、新しい設定をすべて入力します。名前だけの変更なら、設定も割り当てもそのまま残ります。
+- **削除はすべてのエージェントに及ぶ**:設定でサーバーを削除すると、割り当てられていたすべてのエージェントからも外れ、それぞれの次の実行から反映されます。特定のエージェントだけ使わせたくない場合は、そのエージェントの **MCP** タブでオフにするか外してください。
+- **権限**:一般メンバーは一覧を見られますが、追加や変更はできません。エージェントへの割り当てや解除には、そのエージェントの owner かワークスペースの `owner`・`admin` が必要です。実行中のエージェントが CLI からサーバーを追加したり割り当てを変えたりすることはできません。
+
+CLI でも同じ操作ができます。設定には通常トークンが含まれるので、コマンドライン引数に直接書かず、ファイルか標準入力で渡してください。
+
+```bash
+multica workspace mcp add linear --server-config-file ./linear.json
+multica workspace mcp list
+multica agent mcp add <agent-id> <server-id>
+```
## エージェントの複製
複製すると、名前以外のほとんどの作業構成が引き継がれます。指示、会話の開始例、スキル、カスタム引数、アバター、同時実行上限、Access 設定が含まれます。モデル、思考レベル、サービスティアも一緒に引き継がれますが、元のランタイムが利用できず、複製がやむを得ず別のランタイムに移る場合、この 3 つはクリアされるため選び直しが必要です。
-環境変数の値と MCP 構成は、どんな場合も複製されません。新しいエージェントで設定し直してください。複製では、元のエージェントのランタイム紐づけと Access 設定が保持されます。
+環境変数の値、MCP 構成、ワークスペース MCP サーバーの割り当ては、どんな場合も複製されません。新しいエージェントで設定し直してください。
## CLI での作成
diff --git a/apps/docs/content/docs/agents-create.ko.mdx b/apps/docs/content/docs/agents-create.ko.mdx
index b31154c670..d67a3648b3 100644
--- a/apps/docs/content/docs/agents-create.ko.mdx
+++ b/apps/docs/content/docs/agents-create.ko.mdx
@@ -1,26 +1,37 @@
---
title: 에이전트 생성 및 설정
-description: 시작 방법을 선택하고 에이전트의 역할, 기능, 실행 방식, Access를 정의합니다.
+description: 런타임을 선택하고 에이전트의 역할, 기능, 실행 방식, Access를 정의합니다.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { CreateAgentDemo } from "@/components/demos/create-agent-demo";
에이전트를 만들기 전에 사용할 수 있는 [런타임](/daemon-runtimes)이 있어야 합니다. 런타임은 이 에이전트가 사용할 컴퓨터와 AI 코딩 도구를 결정하며, 에이전트에는 장기적으로 사용할 정체성, 지시문, 기능이 저장됩니다.
-워크스페이스의 **에이전트** 페이지에서 **새 에이전트**를 클릭합니다.
+## 생성 과정
-## 시작 방법 선택
+워크스페이스의 **에이전트** 페이지에서 **새 에이전트**를 클릭하고 세 단계로 만듭니다.
-생성 페이지에서는 두 가지 방법을 제공합니다.
+<Steps>
+<Step>
-| 방법 | 적합한 경우 |
-|---|---|
-| **빈 상태에서 시작** | 에이전트의 역할을 이미 알고 있고 각 설정을 직접 입력하려는 경우 |
-| **AI로 만들기** | 먼저 목표를 설명하고 Agent Builder가 핵심 정보를 추가로 질문해 초안을 만들게 하려는 경우 |
+**런타임을 선택합니다.** 머신별로 AI 코딩 도구(하네스)가 표시되며, 온라인인 것만 다음 단계로 넘어갈 수 있습니다. 이후 고를 수 있는 모델과 스킬 사용 여부는 여기서 고른 런타임에 따라 정해집니다.
+
+</Step>
+<Step>
+
+**에이전트를 구성합니다.** 이름, 설명, 지침, 스킬, 모델, 접근 권한을 채웁니다. 처음부터 직접 쓰고 싶지 않다면 **AI에게 작성 맡기기**를 클릭하세요. 현재 초안이 Agent Builder로 넘어가고, Builder가 대화로 핵심 정보를 물어 설정을 채워 줍니다. 이 버튼은 선택한 런타임이 온라인이고 클라우드 런타임이 아닐 때만 나타납니다. 대화하는 동안에도 옆에 있는 설정 초안을 언제든 직접 고칠 수 있습니다.
-AI로 만들려면 Builder 대화를 진행할 온라인 런타임이 필요합니다. 어느 방법을 선택하든 만들기 전에 최종 설정을 확인하고 수정할 수 있습니다.
+</Step>
+<Step>
-![에이전트 생성 시작 방법 선택: Start blank와 Build with AI](/images/docs/quickstart-new-agent.webp)
+**에이전트 만들기를 클릭합니다.** 완료 페이지에 에이전트가 실행될 런타임과 다음에 할 수 있는 일(첫 작업 할당하기, 이슈에서 멘션하기, 스쿼드에 추가)이 표시됩니다.
+
+</Step>
+</Steps>
+
+<CreateAgentDemo />
## 필수 항목
@@ -89,11 +100,11 @@ Access는 어떤 멤버가 이 에이전트를 실행할 수 있는지 결정합
| Access | 의미 |
|---|---|
-| **나만**(Only me) | 나만 실행할 수 있습니다. 기본값입니다. |
-| **전체 워크스페이스**(Entire workspace) | 모든 워크스페이스 멤버가 실행할 수 있습니다. |
-| **지정한 멤버**(Specific people) | 나와 선택한 멤버만 실행할 수 있습니다. |
+| **나만** | 나만 실행할 수 있습니다. 기본값입니다. |
+| **전체 워크스페이스** | 모든 워크스페이스 멤버가 실행할 수 있습니다. |
+| **특정 멤버** | 나와 선택한 멤버만 실행할 수 있습니다. |
-![Access 설정: 나만, 전체 워크스페이스, 지정한 멤버의 세 단계](/images/docs/agent-access-settings.webp)
+![Access 설정: 나만, 전체 워크스페이스, 특정 멤버의 세 단계](/images/docs/agent-access-settings.webp)
에이전트 owner만 Access를 수정할 수 있으며 워크스페이스 관리자도 수정할 수 없습니다. 워크스페이스 `owner`와 `admin`은 다른 설정을 관리할 수 있지만 관리자 권한으로 허가받지 않은 에이전트를 실행할 수는 없습니다.
@@ -106,7 +117,7 @@ Access는 어떤 멤버가 이 에이전트를 실행할 수 있는지 결정합
| **동시 실행 상한** | 같은 에이전트가 동시에 실행할 수 있는 실행 수입니다. 기본값은 6이며 상한에 도달하면 계속 큐에서 기다립니다. |
| **환경 변수** | AI 코딩 도구를 시작할 때 변수를 주입합니다. |
| **사용자 지정 인수** | AI 코딩 도구의 CLI 인수에 항목별로 추가합니다. |
-| **MCP** | 지원되는 AI 코딩 도구에 MCP server 설정을 제공합니다. |
+| **MCP** | 지원되는 AI 코딩 도구의 MCP server를 설정합니다. 이 에이전트 전용으로 추가하거나, 워크스페이스에서 공유하는 MCP 서버 중에서 고를 수 있습니다. |
| **연동** | 이 에이전트가 사용할 수 있는 외부 서비스를 연결합니다. |
런타임이 속한 데몬에도 전체 동시 실행 상한(기본 20)이 있으며 실제 동시 실행 수에는 둘 중 더 작은 값이 적용됩니다.
@@ -133,13 +144,59 @@ Access는 어떤 멤버가 이 에이전트를 실행할 수 있는지 결정합
자격 증명이나 다른 secret을 사용자 지정 인수에 넣지 마세요. 값은 자식 프로세스의 argv에 남아 같은 머신의 다른 프로세스에서 `ps` 또는 `/proc`를 통해 보일 수 있습니다. 대신 환경 변수(`custom_env`)를 사용하세요. 데몬 로그는 인수 값을 가리지만 운영 체제의 프로세스 목록까지 보호하지는 못합니다.
</Callout>
-MCP 설정에는 token이 포함될 수 있으며 저장 및 표시 규칙은 환경 변수와 같습니다. 관리형 MCP 설정을 지원하는 런타임에서만 이 항목이 표시됩니다. 지원하지 않는 도구는 설정을 저장해도 MCP 기능을 자동으로 얻지 않습니다.
+MCP 설정에는 token이 포함될 수 있으며 저장 및 표시 규칙은 환경 변수와 같습니다. 관리형 MCP 설정을 지원하는 런타임에서만 이 항목이 표시됩니다. 지원하지 않는 도구는 설정을 저장해도 MCP 기능을 자동으로 얻지 않습니다. 에이전트에 MCP 설정이 있으면 데몬은 런타임 컴퓨터에 이미 설정된 MCP server도 합칩니다. [로컬 MCP 설정](/daemon-runtimes#local-mcp)을 참고하세요.
+
+에이전트 상세 페이지의 **MCP** 탭은 이 에이전트가 쓸 수 있는 MCP server를 세 그룹으로 보여 줍니다.
+
+| 그룹 | 출처 |
+|---|---|
+| **Multica에서 관리** | 이 에이전트에만 속한 server입니다. **MCP 추가**를 클릭하고 시각적 편집기나 JSON으로 STDIO 실행 명령 또는 Streamable HTTP 주소를 입력합니다. |
+| **워크스페이스 라이브러리에서** | 워크스페이스 공유 server 중 이 에이전트에 할당된 것입니다. 다음 절을 참고하세요. |
+| **런타임에서 상속** | 런타임이 있는 컴퓨터에서 AI 코딩 도구가 쓰는 자체 사용자 설정으로, 읽기 전용입니다. 로컬 런타임이 온라인일 때만 읽을 수 있습니다. |
+
+이름이 같으면 에이전트 자체 설정이 할당된 워크스페이스 server보다 우선하고, 둘 다 런타임의 같은 이름 server보다 우선합니다. 밀린 쪽에는 **재정의됨** 또는 **Multica에서 재정의**가 표시됩니다.
+
+### 워크스페이스에서 공유하는 MCP 서버
+
+같은 MCP server를 여러 에이전트가 써야 할 때 에이전트마다 주소와 token을 따로 입력할 필요가 없습니다. 워크스페이스 `owner`나 `admin`이 **설정 → MCP 서버**에서 한 번 추가한 뒤, 필요한 에이전트에 할당하면 됩니다.
+
+<Steps>
+<Step>
+
+관리자가 **설정 → MCP 서버**를 열고 **서버 추가**를 클릭해 이름과 설정을 입력합니다.
+
+</Step>
+<Step>
+
+추가만 해서는 어떤 에이전트에도 할당되지 않습니다. 이 server를 쓸 에이전트의 **MCP** 탭을 열고 **워크스페이스 라이브러리에서** 그룹에서 **워크스페이스에서 추가**를 클릭해 선택합니다.
+
+</Step>
+<Step>
+
+할당마다 스위치가 있어 할당을 해제하지 않고 잠시 끌 수 있습니다. 변경 사항은 그 에이전트의 다음 실행부터 적용됩니다.
+
+</Step>
+</Steps>
+
+**설정 → MCP 서버** 목록에서는 server마다 '에이전트 N개가 사용 중' 또는 '어떤 에이전트에도 할당되지 않음'이 표시됩니다. 쓸 때 알아 둘 점은 다음과 같습니다.
+
+- **설정은 쓰기 전용**: 저장한 URL, 명령, 헤더, 환경 변수 값은 owner를 포함해 누구에게도 다시 표시되지 않습니다. 바꾸려면 **설정 교체**를 클릭해 새 설정 전체를 입력해야 합니다. 이름만 바꾸면 설정과 할당은 그대로 유지됩니다.
+- **삭제는 모든 에이전트에 적용**: 설정에서 server를 삭제하면 할당된 모든 에이전트에서도 빠지며, 각 에이전트의 다음 실행부터 적용됩니다. 특정 에이전트만 쓰지 않게 하려면 그 에이전트의 **MCP** 탭에서 끄거나 제거하세요.
+- **권한**: 일반 멤버는 목록을 볼 수 있지만 추가하거나 바꿀 수는 없습니다. 에이전트에 server를 할당하거나 제거하려면 그 에이전트의 owner나 워크스페이스 `owner`, `admin`이어야 합니다. 실행 중인 에이전트는 CLI로 server를 추가하거나 할당을 바꿀 수 없습니다.
+
+CLI로도 같은 작업을 할 수 있습니다. 설정에는 보통 token이 들어 있으므로 명령줄 인수에 직접 쓰지 말고 파일이나 stdin으로 넘기세요.
+
+```bash
+multica workspace mcp add linear --server-config-file ./linear.json
+multica workspace mcp list
+multica agent mcp add <agent-id> <server-id>
+```
## 에이전트 복사
복사하면 이름을 제외한 대부분의 작업 설정이 포함됩니다. 지시문, 대화 시작 예시, 스킬, 사용자 지정 인수, 아바타, 동시 실행 상한, Access 설정이 복사됩니다. 모델, 사고 강도, 속도 단계도 함께 복사되지만 원래 런타임을 사용할 수 없어 다른 런타임으로 바꿔야 하면 이 세 항목이 비워지므로 다시 선택해야 합니다.
-환경 변수 값과 MCP 설정은 어떤 경우에도 복사되지 않으며 새 에이전트에서 다시 설정해야 합니다. 복사본은 원래 에이전트의 런타임 연결과 Access 설정을 유지합니다.
+환경 변수 값, MCP 설정, 워크스페이스 MCP 서버 할당은 어떤 경우에도 복사되지 않으며 새 에이전트에서 다시 설정해야 합니다.
## CLI로 만들기
diff --git a/apps/docs/content/docs/agents-create.mdx b/apps/docs/content/docs/agents-create.mdx
index 0de9dca4c3..5e9eda24ef 100644
--- a/apps/docs/content/docs/agents-create.mdx
+++ b/apps/docs/content/docs/agents-create.mdx
@@ -1,26 +1,37 @@
---
title: Create and configure an agent
-description: Choose a starting point, then define the agent's responsibilities, capabilities, execution setup, and Access.
+description: Choose a runtime, then define the agent's responsibilities, capabilities, execution setup, and Access.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { CreateAgentDemo } from "@/components/demos/create-agent-demo";
Creating an agent requires a working [runtime](/daemon-runtimes) first. The runtime decides which computer and which AI coding tool the agent uses; the agent holds the long-lived identity, instructions, and capabilities.
-On the workspace **Agents** page, click **New agent**.
+## Creation flow
-## Starting points
+On the workspace **Agents** page, click **New agent**, then go through three steps:
-The creation page offers two options:
+<Steps>
+<Step>
-| Option | When it fits |
-|---|---|
-| **Start blank** | You already know the agent's responsibilities and want to fill in every field yourself. |
-| **Build with AI** | Describe the goal first and let the Agent Builder ask the key questions and generate a draft. |
+**Choose a runtime.** The page lists the AI coding tools (harnesses) on each machine, and only online ones let you continue. Which models you can pick later, and whether skills are available, depend on this choice.
+
+</Step>
+<Step>
+
+**Configure the agent.** Fill in the name, description, instructions, skills, model, and Access. To skip writing it all yourself, click **Let AI write it**: the current draft goes to the Agent Builder, which asks for the key details in a conversation and completes the configuration. The button appears only when the selected runtime is online and isn't a cloud runtime. While you talk to the Builder, you can edit the draft beside the conversation at any time.
-Build with AI needs an online runtime for the Builder conversation. Either way, you can review and edit the final configuration before creating.
+</Step>
+<Step>
-![Agent creation starting points: Start blank and Build with AI](/images/docs/quickstart-new-agent.webp)
+**Click Create agent.** The done page shows which runtime the agent runs on and links to what comes next: assign its first task, mention it in an issue, or add it to a squad.
+
+</Step>
+</Steps>
+
+<CreateAgentDemo />
## Required fields
@@ -95,7 +106,7 @@ Access decides which members can run this agent (assign, @-mention, or chat):
![Access settings: Only me, Entire workspace, Specific people](/images/docs/agent-access-settings.webp)
-Only the agent owner can change Access — workspace admins cannot. Workspace `owner`s and `admin`s can manage the rest of the configuration, but cannot use their admin role to run agents they aren't granted.
+Only the agent owner can change Access; workspace admins cannot. Workspace `owner`s and `admin`s can manage the rest of the configuration, but cannot use their admin role to run agents they aren't granted.
## Configuration after creation
@@ -106,7 +117,7 @@ On the agent's detail page you can keep adjusting:
| **Concurrency limit** | How many runs the agent can run at the same time. The default is 6; runs beyond the cap keep queuing. |
| **Environment variables** | Inject variables when the AI coding tool starts. |
| **Custom arguments** | Appended item by item to the AI coding tool's CLI arguments. |
-| **MCP** | Provide MCP server configuration for AI coding tools that support it. |
+| **MCP** | Configure MCP servers for AI coding tools that support them: add one just for this agent, or pick from the workspace's shared MCP servers. |
| **Integrations** | Connect external services this agent can use. |
The daemon hosting the runtime also has a global concurrency cap (default 20); the effective concurrency is the smaller of the two.
@@ -133,13 +144,59 @@ Custom arguments are passed to the AI coding tool as an array, item by item, wit
Do not put credentials or other secrets in custom arguments. They remain in the child process's argv and may be visible to other local processes through `ps` or `/proc`; use environment variables (`custom_env`) instead. Daemon logs redact argument values, but that does not protect the operating system's process list.
</Callout>
-MCP configuration may contain tokens; its storage and display rules match environment variables. Only runtimes that support managed MCP configuration show this section; tools without MCP support don't gain it just because a configuration is saved.
+MCP configuration may contain tokens; its storage and display rules match environment variables. Only runtimes that support managed MCP configuration show this section; tools without MCP support don't gain it just because a configuration is saved. When an agent has an MCP configuration, the daemon also merges in the MCP servers already configured on the runtime's machine; see [Local MCP configuration](/daemon-runtimes#local-mcp).
+
+An agent's **MCP** tab lists the MCP servers it can use in three groups:
+
+| Group | Source |
+|---|---|
+| **Managed by Multica** | Servers that belong to this agent alone. Click **Add MCP** and fill in a STDIO command or a Streamable HTTP URL, in the visual editor or as JSON. |
+| **From the workspace library** | Shared workspace servers assigned to this agent; see the next section. |
+| **Inherited from runtime** | The AI coding tool's own user configuration on the runtime's machine, read-only. It can be read only while a local runtime is online. |
+
+When names collide, the agent's own entry wins over an assigned workspace server, and both win over a runtime server with the same name. The entry that loses is marked **Overridden** or **Overridden by Multica**.
+
+### Shared workspace MCP servers
+
+When several agents need the same MCP server, you don't have to enter its URL and token on each of them. A workspace `owner` or `admin` adds it once under **Settings → MCP servers**, then assigns it to the agents that need it.
+
+<Steps>
+<Step>
+
+An admin opens **Settings → MCP servers**, clicks **Add server**, and enters a name and configuration.
+
+</Step>
+<Step>
+
+A newly added server belongs to no agent. Open the **MCP** tab of each agent that should use it, click **Add from workspace** in the **From the workspace library** group, and pick it.
+
+</Step>
+<Step>
+
+Each assignment has its own switch, so you can turn a server off for one agent without removing it. Changes take effect from that agent's next run.
+
+</Step>
+</Steps>
+
+In the **Settings → MCP servers** list, each server shows "Used by N agents" or "Not assigned to any agent". Keep in mind:
+
+- **Configuration is write-only.** Once saved, URLs, commands, headers, and environment values are never shown again, to anyone, owners included. To change them, click **Replace configuration** and enter a complete new configuration. Renaming keeps the configuration and every assignment.
+- **Deleting affects every agent.** Removing a server in Settings also removes it from every agent it was assigned to, starting with each agent's next run. To stop just one agent from using it, switch it off or remove it on that agent's **MCP** tab.
+- **Permissions.** Members can see the list but can't add or change servers. Assigning or removing a server on an agent takes that agent's owner or a workspace `owner` or `admin`. An agent can't add servers or change assignments through the CLI while it runs.
+
+The CLI does the same. Configurations usually contain tokens, so pass them from a file or stdin rather than as a command-line argument:
+
+```bash
+multica workspace mcp add linear --server-config-file ./linear.json
+multica workspace mcp list
+multica agent mcp add <agent-id> <server-id>
+```
## Duplicating an agent
Duplicating carries over most working configuration except the name, including instructions, conversation starters, skills, custom arguments, avatar, concurrency limit, and Access settings. The model, thinking level, and service tier come along too; if the original runtime is unavailable and the copy is forced onto another runtime, those three are cleared and must be re-selected.
-Environment variable values and MCP configuration are never copied and must be set again on the new agent. Duplication keeps the original agent's runtime binding and Access settings.
+Environment variable values, MCP configuration, and workspace MCP server assignments are never copied and must be set again on the new agent.
## Creating with the CLI
diff --git a/apps/docs/content/docs/agents-create.zh.mdx b/apps/docs/content/docs/agents-create.zh.mdx
index fa968a1a7f..129e8e9a0c 100644
--- a/apps/docs/content/docs/agents-create.zh.mdx
+++ b/apps/docs/content/docs/agents-create.zh.mdx
@@ -1,26 +1,37 @@
---
title: 创建和配置智能体
-description: 选择起点,定义智能体的职责、能力、运行方式和 Access。
+description: 选择运行时,定义智能体的职责、能力、运行方式和 Access。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { CreateAgentDemo } from "@/components/demos/create-agent-demo";
创建智能体前,需要先有一个可用的[运行时](/daemon-runtimes)。运行时决定这名智能体使用哪台电脑和哪款 AI 编程工具;智能体则保存它长期使用的身份、指令和能力。
-在工作区的 **智能体** 页面点 **新建智能体**。
+## 创建流程
-## 选择起点
+在工作区的 **智能体** 页面点 **新建智能体**,按三步完成:
-创建页面提供两种方式:
+<Steps>
+<Step>
-| 方式 | 适合什么情况 |
-|---|---|
-| **从空白开始** | 已经知道智能体的职责,想自己填写每项配置。 |
-| **通过 AI 创建** | 先描述目标,让 Agent Builder 追问关键信息并生成草稿。 |
+**选择运行时。** 页面会列出各台机器上的 AI 编程工具(harness),只有在线的才能进入下一步。后面能选哪些模型、能不能用 skill,都取决于这一步的选择。
+
+</Step>
+<Step>
+
+**配置智能体。** 填写名称、描述、指令、skill、模型和访问权限。不想从头写,可以点 **让 AI 帮我写**:当前草稿会交给 Agent Builder,它在对话里追问关键信息并补全配置。这个按钮只在所选运行时在线、且不是云端运行时时出现。对话期间,旁边的配置草稿随时可以直接修改。
-通过 AI 创建需要一个在线运行时来完成 Builder 对话。无论选择哪种方式,创建前都可以检查并修改最终配置。
+</Step>
+<Step>
-![创建智能体的起点选择页:Start blank 与 Build with AI](/images/docs/quickstart-new-agent.webp)
+**点击创建智能体。** 完成页会显示它运行在哪个运行时,并给出下一步入口:指派第一个任务、在任务里 @ 它,或加入小队。
+
+</Step>
+</Steps>
+
+<CreateAgentDemo />
## 必填项
@@ -106,7 +117,7 @@ Access 决定哪些成员可以运行这名智能体(分配、@提及或对话
| **并发上限** | 同一名智能体最多同时执行多少次运行,默认是 6;达到上限后继续排队。 |
| **环境变量** | 在 AI 编程工具启动时注入变量。 |
| **自定义参数** | 逐项追加到 AI 编程工具的 CLI 参数中。 |
-| **MCP** | 为支持的 AI 编程工具提供 MCP server 配置。 |
+| **MCP** | 为支持的 AI 编程工具配置 MCP server:可以单独添加,也可以从工作区共享的 MCP Server 里选用。 |
| **集成** | 连接这名智能体可以使用的外部服务。 |
运行时所在的守护进程还有一个全局并发上限(默认 20),实际并发取两者中的较小值。
@@ -133,13 +144,59 @@ Access 决定哪些成员可以运行这名智能体(分配、@提及或对话
不要把凭据或其他 secret 放进自定义参数。它们会留在子进程的 argv 中,同机其他进程可能通过 `ps` 或 `/proc` 看到;请改用环境变量(`custom_env`)。守护进程日志会遮蔽参数值,但无法保护操作系统的进程列表。
</Callout>
-MCP 配置可能包含 token,保存与展示规则和环境变量相同。只有支持托管 MCP 配置的运行时会显示这一项;不支持的工具不会因为保存了配置就自动获得 MCP 能力。
+MCP 配置可能包含 token,保存与展示规则和环境变量相同。只有支持托管 MCP 配置的运行时会显示这一项;不支持的工具不会因为保存了配置就自动获得 MCP 能力。智能体有 MCP 配置时,守护进程还会合并运行时所在电脑上已配置的 MCP server,见[本机 MCP 配置](/daemon-runtimes#local-mcp)。
+
+智能体详情页的 **MCP** 分三组列出这名智能体能用的 MCP server:
+
+| 分组 | 来源 |
+|---|---|
+| **由 Multica 管理** | 只属于这名智能体的 server。点击**添加 MCP Server**,用可视化表单或 JSON 填写 STDIO 启动命令或 Streamable HTTP 地址。 |
+| **工作区 MCP Server** | 从工作区共享库里分配给它的 server,见下一节。 |
+| **从运行时继承** | 运行时所在电脑上 AI 编程工具自己的用户配置,只读。只有本地运行时在线时才能读取。 |
+
+名称相同时,智能体自己的配置优先于工作区分配的 server,两者又都优先于运行时里的同名 server。被盖住的一项会标上**已覆盖**或**已由 Multica 覆盖**。
+
+### 工作区共享的 MCP Server
+
+同一个 MCP server 要给多名智能体用时,不必在每名智能体里各填一遍地址和 token。工作区 `owner` 或 `admin` 在**设置 → MCP 服务器**里添加一次,再分给需要它的智能体。
+
+<Steps>
+<Step>
+
+管理员打开**设置 → MCP 服务器**,点击**添加 MCP Server**,填写名称和配置。
+
+</Step>
+<Step>
+
+添加后,这个 server 不属于任何智能体。打开要用它的智能体详情页的 **MCP**,在**工作区 MCP Server**一组点击**从工作区添加**,选中它。
+
+</Step>
+<Step>
+
+分配后,每名智能体各有一个开关,可以暂时关掉而不取消分配。改动从这名智能体的下一次运行起生效。
+
+</Step>
+</Steps>
+
+**设置 → MCP 服务器**的列表里,每个 server 下方显示"已分配给 N 个智能体"或"未分配给任何智能体"。使用时注意:
+
+- **配置只写不读**:保存后,地址、命令、请求头和环境变量的值不会再显示给任何人,包括 owner。要改配置只能点**替换配置**,重新填写一份完整配置;只改名称不影响配置和已有分配。
+- **删除影响所有智能体**:在设置里删除一个 server,会把它从所有分配过的智能体上一并移除,从各自的下一次运行起生效。只想让某一名智能体不再用,在它的 **MCP** 里关掉开关或移除即可。
+- **权限**:普通成员能看到列表,但不能添加或修改。给智能体分配或移除 server,需要该智能体的 owner 或工作区 `owner`、`admin`。智能体在运行中通过 CLI 不能添加 server,也不能改分配。
+
+用 CLI 也能完成同样的操作。配置里通常有 token,用文件或 stdin 传入,不要直接写在命令行参数里:
+
+```bash
+multica workspace mcp add linear --server-config-file ./linear.json
+multica workspace mcp list
+multica agent mcp add <agent-id> <server-id>
+```
## 复制智能体
复制会带上名称之外的大部分工作配置,包括指令、对话开场建议、skill、自定义参数、头像、并发上限和 Access 设置。模型、思考强度和速度档也会一并带走;如果原运行时不可用、复制被迫换到其他运行时,这三项会清空,需要重新选择。
-环境变量的值和 MCP 配置在任何情况下都不会复制,需要在新智能体中重新设置。复制会保留原智能体的运行时绑定和 Access 设置。
+环境变量的值、MCP 配置和工作区 MCP Server 的分配在任何情况下都不会复制,需要在新智能体中重新设置。
## 使用 CLI 创建
diff --git a/apps/docs/content/docs/agents.fr.mdx b/apps/docs/content/docs/agents.fr.mdx
index 621446c1f8..1823ee0456 100644
--- a/apps/docs/content/docs/agents.fr.mdx
+++ b/apps/docs/content/docs/agents.fr.mdx
@@ -4,10 +4,11 @@ description: Un agent est un ensemble réutilisable d'identité, de capacités e
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AgentAccessDemo } from "@/components/demos/agent-access-demo";
Un agent est un collaborateur d'un [espace de travail Multica](/workspaces). Vous pouvez lui assigner des tâches, le @mentionner dans des commentaires ou discuter directement avec lui. Il pilote un outil de codage IA via le runtime auquel il est associé, et renvoie son avancement et ses résultats dans l'espace de travail.
-Un agent n'est pas un processus qui tourne en continu. C'est une identité et une configuration réutilisables ; il ne produit des [exécutions](/tasks) concrètes que lorsque du travail arrive.
+Un agent ne tourne pas en permanence en arrière-plan. Il conserve une identité et une configuration réutilisables, et ne produit des [exécutions](/tasks) concrètes que lorsque du travail arrive.
## Configuration d'un agent
@@ -46,7 +47,7 @@ Les agents peuvent créer des tâches, publier des commentaires et changer le st
## Permissions et accès
-Chaque agent a un propriétaire et un paramètre **Accès** :
+Chaque agent a un propriétaire et un paramètre **Accès**. L'Accès détermine qui peut exécuter l'agent, c'est-à-dire lui assigner des tâches, le @mentionner dans un commentaire ou discuter avec lui :
| Accès | Qui peut l'exécuter |
|---|---|
@@ -54,15 +55,23 @@ Chaque agent a un propriétaire et un paramètre **Accès** :
| **Tout l'espace de travail** | Tous les membres de l'espace de travail. |
| **Personnes précises** | Le propriétaire de l'agent et les membres sélectionnés. |
-Les nouveaux agents sont par défaut en **Moi uniquement**.
+Les nouveaux agents sont par défaut en **Moi uniquement**. La démo ci-dessous part de Moi uniquement, passe tour à tour aux deux autres options et montre ce que chaque membre obtient alors dans le sélecteur d'assigné et le menu des @mentions.
+
+<AgentAccessDemo />
<Callout type="info">
-Les `owner` et les `admin` de l'espace de travail peuvent voir et gérer tous les agents, mais ne peuvent pas contourner l'Accès pour exécuter l'agent « Moi uniquement » de quelqu'un d'autre. Les membres ordinaires ne voient que les agents dont ils sont propriétaires ou qu'ils sont autorisés à exécuter.
+Les `owner` et les `admin` de l'espace de travail peuvent voir et gérer tous les agents, mais ne peuvent pas contourner l'Accès pour exécuter l'agent « Moi uniquement » de quelqu'un d'autre.
</Callout>
-La possibilité de **voir** un agent dépend à la fois de la propriété, des rôles d'administration de l'espace de travail et de l'Accès ; la **modification** est ouverte au propriétaire de l'agent ainsi qu'aux propriétaires et administrateurs de l'espace de travail, à l'exception de l'Accès lui-même, que seul le propriétaire de l'agent peut modifier.
+Les autres opérations se répartissent ainsi :
+
+| Opération | Qui peut |
+|---|---|
+| Voir l'agent dans la liste et les sélecteurs | Le propriétaire de l'agent, les `owner` et `admin` de l'espace de travail, et les membres autorisés par l'Accès |
+| Modifier sa configuration | Le propriétaire de l'agent, les `owner` et `admin` de l'espace de travail |
+| Modifier l'Accès | Le propriétaire de l'agent uniquement |
-Les éléments de configuration susceptibles de contenir des identifiants, comme les variables d'environnement et MCP, obéissent à des règles de lecture plus strictes — voir [Créer et configurer un agent](/agents-create#variables-denvironnement-et-identifiants).
+Les éléments de configuration susceptibles de contenir des identifiants, comme les variables d'environnement et MCP, obéissent à des règles de lecture plus strictes : voir [Créer et configurer un agent](/agents-create#variables-denvironnement-et-identifiants).
## En ligne, hors ligne et charge
@@ -85,7 +94,7 @@ Le propriétaire de l'agent ainsi que les `owner` et les `admin` de l'espace de
## Étapes suivantes
-- [Créer et configurer un agent](/agents-create) — partez de zéro, ou construisez-le avec l'IA.
+- [Créer et configurer un agent](/agents-create) — remplissez la configuration vous-même, ou laissez l'IA en rédiger un brouillon.
- [Skills](/skills) — ajoutez des méthodes et des documents réutilisables à un agent.
- [Squads](/squads) — laissez un chef choisir le membre le plus adapté au travail.
- [Daemon et runtimes](/daemon-runtimes) — là où les agents s'exécutent réellement.
diff --git a/apps/docs/content/docs/agents.ja.mdx b/apps/docs/content/docs/agents.ja.mdx
index 8f45d5e19b..6dbfd77aec 100644
--- a/apps/docs/content/docs/agents.ja.mdx
+++ b/apps/docs/content/docs/agents.ja.mdx
@@ -4,10 +4,11 @@ description: エージェントは、ワークスペースで繰り返し使え
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AgentAccessDemo } from "@/components/demos/agent-access-demo";
エージェントは [Multica ワークスペース](/workspaces)におけるコラボレーターです。タスクを割り当てる、コメントで @メンションする、直接チャットする、といった関わり方ができます。エージェントは紐づいたランタイムを通じて AI コーディングツールを動かし、進捗と結果をワークスペースに書き戻します。
-エージェント自体は常時稼働するプロセスではありません。繰り返し使えるアイデンティティと設定のまとまりであり、仕事を受け取ったときにだけ具体的な[実行](/tasks)が生まれます。
+エージェントはバックグラウンドで動き続けるわけではありません。保持しているのは繰り返し使えるアイデンティティと設定で、仕事を受け取ったときにだけ具体的な[実行](/tasks)が生まれます。
## エージェントの設定項目
@@ -46,21 +47,29 @@ import { Callout } from "fumadocs-ui/components/callout";
## 権限と Access
-すべてのエージェントには 1 人の owner と Access 設定があります。
+すべてのエージェントには 1 人の owner と Access 設定(画面上の表記は「アクセス」)があります。Access は、誰がそのエージェントを実行できるか、つまりタスクの割り当て、コメントでの @メンション、チャットができるかを決めます。
| Access | 実行できる人 |
|---|---|
-| **Only me** | エージェントの owner だけ。 |
-| **Entire workspace** | ワークスペースのすべてのメンバー。 |
-| **Specific people** | エージェントの owner と指定したメンバー。 |
+| **プライベート** | エージェントの owner だけ。 |
+| **ワークスペースに公開** | ワークスペースのすべてのメンバー。 |
+| **特定のメンバーに公開** | エージェントの owner と指定したメンバー。 |
-新しいエージェントのデフォルトは **Only me** です。
+エージェント作成画面では、この 3 つがそれぞれ「自分のみ」「ワークスペース全体」「特定のメンバー」と表示されます。新しいエージェントのデフォルトは「自分のみ」(プライベート)です。下のデモはプライベートから始めて残りの 2 つに順に切り替え、そのたびに各メンバーの担当者選択と @メンションメニューに何が出るかを示します。
+
+<AgentAccessDemo />
<Callout type="info">
-ワークスペースの `owner` と `admin` はすべてのエージェントを見て管理できますが、Access をバイパスして他人の「Only me」エージェントを実行することはできません。一般メンバーには、自分が所有するか実行を許可されたエージェントだけが表示されます。
+ワークスペースの `owner` と `admin` はすべてのエージェントを見て管理できますが、Access をバイパスして他人のプライベートなエージェントを実行することはできません。
</Callout>
-**見える**かどうかは、owner であるか、ワークスペースの管理ロール、Access の 3 つで決まります。**変更**はエージェントの owner とワークスペースの `owner` / `admin` に開かれていますが、Access だけはエージェントの owner しか変更できません。
+実行以外の操作は次のように分かれます。
+
+| 操作 | できる人 |
+|---|---|
+| エージェント一覧や選択メニューに表示される | エージェントの owner、ワークスペースの `owner` と `admin`、Access で許可されたメンバー |
+| 設定を変更する | エージェントの owner、ワークスペースの `owner` と `admin` |
+| Access を変更する | エージェントの owner だけ |
環境変数や MCP など、認証情報を含みうる設定にはより厳しい読み取りルールがあります。[エージェントの作成と構成](/agents-create#環境変数と認証情報)を参照してください。
@@ -85,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 次のステップ
-- [エージェントの作成と構成](/agents-create) — 空白から作るか、AI で組み立てる。
+- [エージェントの作成と構成](/agents-create) — 設定を自分で入力するか、AI に下書きしてもらう。
- [スキル](/skills) — 再利用できる手法と資料をエージェントに追加する。
- [スクワッド](/squads) — リーダーに仕事に合ったメンバーを選ばせる。
- [デーモンとランタイム](/daemon-runtimes) — エージェントが実際に実行される場所。
diff --git a/apps/docs/content/docs/agents.ko.mdx b/apps/docs/content/docs/agents.ko.mdx
index c304245079..f3510f9586 100644
--- a/apps/docs/content/docs/agents.ko.mdx
+++ b/apps/docs/content/docs/agents.ko.mdx
@@ -4,10 +4,11 @@ description: 에이전트는 워크스페이스에서 반복해서 사용하는
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AgentAccessDemo } from "@/components/demos/agent-access-demo";
에이전트는 [Multica 워크스페이스](/workspaces)의 협업자입니다. 태스크를 할당하거나 댓글에서 @멘션하거나 직접 대화할 수 있습니다. 에이전트는 연결된 런타임을 통해 AI 코딩 도구를 호출하고 진행 상황과 결과를 워크스페이스에 기록합니다.
-에이전트 자체는 계속 실행되는 프로세스가 아닙니다. 반복해서 사용할 수 있는 정체성과 설정의 묶음이며, 작업을 받을 때만 구체적인 [실행](/tasks)이 생성됩니다.
+에이전트는 백그라운드에서 계속 돌아가지 않습니다. 반복해서 쓰는 정체성과 설정을 담고 있다가, 작업을 받을 때만 구체적인 [실행](/tasks)을 만듭니다.
## 에이전트 설정
@@ -46,21 +47,29 @@ import { Callout } from "fumadocs-ui/components/callout";
## 권한과 Access
-각 에이전트에는 owner 한 명과 Access 설정 하나가 있습니다.
+각 에이전트에는 owner 한 명과 Access 설정(화면 표기는 "접근 권한") 하나가 있습니다. Access는 누가 에이전트를 실행할 수 있는지, 즉 태스크를 할당하고 댓글에서 @멘션하고 대화할 수 있는지를 정합니다.
| Access | 실행할 수 있는 사람 |
|---|---|
-| **나만**(Only me) | 에이전트 owner만 실행할 수 있습니다. |
-| **전체 워크스페이스**(Entire workspace) | 워크스페이스의 모든 멤버가 실행할 수 있습니다. |
-| **지정한 멤버**(Specific people) | 에이전트 owner와 지정된 멤버가 실행할 수 있습니다. |
+| **비공개** | 에이전트 owner만 실행할 수 있습니다. |
+| **워크스페이스에 공개** | 워크스페이스의 모든 멤버가 실행할 수 있습니다. |
+| **특정 사용자에게 공개** | 에이전트 owner와 지정된 멤버가 실행할 수 있습니다. |
-새 에이전트의 기본값은 **나만**입니다.
+에이전트 생성 화면에서는 세 옵션이 각각 "나만", "전체 워크스페이스", "특정 멤버"로 표시됩니다. 새 에이전트의 기본값은 "나만"(비공개)입니다. 아래 데모는 비공개에서 시작해 나머지 두 옵션으로 차례로 바꾸고, 그때마다 각 멤버의 담당자 선택기와 @멘션 메뉴에 무엇이 보이는지 보여 줍니다.
+
+<AgentAccessDemo />
<Callout type="info">
-워크스페이스 `owner`와 `admin`은 모든 에이전트를 보고 관리할 수 있지만 다른 사람의 "나만" 에이전트를 Access를 우회해 실행할 수는 없습니다. 일반 멤버에게는 자신이 소유하거나 실행할 권한이 있는 에이전트만 표시됩니다.
+워크스페이스 `owner`와 `admin`은 모든 에이전트를 보고 관리할 수 있지만 다른 사람의 비공개 에이전트를 Access를 우회해 실행할 수는 없습니다.
</Callout>
-**보기 권한**은 owner 여부, 워크스페이스 관리 역할, Access가 함께 결정합니다. **수정 권한**은 에이전트 owner와 워크스페이스 owner/admin에게 있으며, 이 중 Access는 에이전트 owner만 바꿀 수 있습니다.
+실행 외의 작업은 다음과 같이 나뉩니다.
+
+| 작업 | 할 수 있는 사람 |
+|---|---|
+| 에이전트 목록과 선택기에서 보기 | 에이전트 owner, 워크스페이스 `owner`와 `admin`, Access로 허용된 멤버 |
+| 설정 수정 | 에이전트 owner, 워크스페이스 `owner`와 `admin` |
+| Access 변경 | 에이전트 owner만 |
환경 변수와 MCP처럼 자격 증명이 포함될 수 있는 설정에는 더 엄격한 읽기 규칙이 적용됩니다. [에이전트 생성 및 설정](/agents-create#환경-변수와-자격-증명)을 참고하세요.
@@ -85,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 다음 단계
-- [에이전트 생성 및 설정](/agents-create) — 빈 상태에서 시작하거나 AI를 사용해 만듭니다.
+- [에이전트 생성 및 설정](/agents-create) — 설정을 직접 채우거나 AI에게 초안을 맡깁니다.
- [스킬](/skills) — 에이전트에 재사용 가능한 방법과 자료를 추가합니다.
- [스쿼드](/squads) — 리더가 작업에 맞는 멤버를 선택하게 합니다.
- [데몬과 런타임](/daemon-runtimes) — 에이전트가 실제로 어디에서 실행되는지 알아봅니다.
diff --git a/apps/docs/content/docs/agents.mdx b/apps/docs/content/docs/agents.mdx
index 18cc86db6a..4252fe5726 100644
--- a/apps/docs/content/docs/agents.mdx
+++ b/apps/docs/content/docs/agents.mdx
@@ -4,10 +4,11 @@ description: An agent is a reusable set of identity, capabilities, and execution
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AgentAccessDemo } from "@/components/demos/agent-access-demo";
An agent is a collaborator in a [Multica workspace](/workspaces). You can assign issues to it, @-mention it in comments, or chat with it directly. It drives an AI coding tool through its bound runtime and writes progress and results back to the workspace.
-An agent is not a continuously running process. It is a reusable identity and configuration; it only produces concrete [runs](/tasks) when work arrives.
+An agent doesn't keep running in the background. It stores a reusable identity and configuration, and produces concrete [runs](/tasks) only when work arrives.
## Agent configuration
@@ -46,7 +47,7 @@ Agents can create issues, post comments, and change work status, but they have n
## Permissions and Access
-Every agent has one owner and an Access setting:
+Every agent has one owner and an Access setting. Access decides who can run the agent, meaning assign issues to it, @-mention it in comments, or chat with it:
| Access | Who can run it |
|---|---|
@@ -54,15 +55,23 @@ Every agent has one owner and an Access setting:
| **Entire workspace** | Every member of the workspace. |
| **Specific people** | The agent owner and the selected members. |
-New agents default to **Only me**.
+New agents default to **Only me**. The demo below starts at Only me, switches to the other two options in turn, and shows what each member then gets in the assignee picker and the @-mention menu.
+
+<AgentAccessDemo />
<Callout type="info">
-Workspace `owner`s and `admin`s can see and manage every agent, but cannot bypass Access to run someone else's "Only me" agent. Regular members only see agents they own or are allowed to run.
+Workspace `owner`s and `admin`s can see and manage every agent, but cannot bypass Access to run someone else's "Only me" agent.
</Callout>
-**Seeing** an agent is determined by ownership, workspace admin roles, and Access together; **modifying** is open to the agent owner and workspace owners/admins, except Access itself, which only the agent owner can change.
+Everything other than running it is split like this:
+
+| Action | Who can |
+|---|---|
+| See it in the agent list and pickers | The agent owner, workspace `owner`s and `admin`s, and members Access grants |
+| Edit its configuration | The agent owner and workspace `owner`s and `admin`s |
+| Change Access | Only the agent owner |
-Configuration that may contain credentials, such as environment variables and MCP, has stricter read rules — see [Create and configure an agent](/agents-create#environment-variables-and-credentials).
+Configuration that may contain credentials, such as environment variables and MCP, has stricter read rules. See [Create and configure an agent](/agents-create#environment-variables-and-credentials).
## Online, offline, and workload status
@@ -85,7 +94,7 @@ The agent owner and workspace `owner`s and `admin`s can archive or restore an ag
## Next steps
-- [Create and configure an agent](/agents-create) — start blank, or build with AI.
+- [Create and configure an agent](/agents-create) — fill in the configuration yourself, or let AI draft it.
- [Skills](/skills) — add reusable methods and material to an agent.
- [Squads](/squads) — let a leader pick the right member for the work.
- [Daemon and runtimes](/daemon-runtimes) — where agents actually execute.
diff --git a/apps/docs/content/docs/agents.zh.mdx b/apps/docs/content/docs/agents.zh.mdx
index 8930ed6a45..b43b6150d3 100644
--- a/apps/docs/content/docs/agents.zh.mdx
+++ b/apps/docs/content/docs/agents.zh.mdx
@@ -4,10 +4,11 @@ description: 智能体是在工作区中反复使用的一套身份、能力和
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AgentAccessDemo } from "@/components/demos/agent-access-demo";
智能体是 [Multica 工作区](/workspaces)中的协作者。你可以把任务分配给它、在评论中 @它,或直接和它对话。它会通过绑定的运行时调用 AI 编程工具,并把进度和结果写回工作区。
-智能体本身不是一个持续运行的进程。它是一套可以反复使用的身份和配置,只有收到工作时才会产生具体的[运行](/tasks)。
+智能体不会一直在后台运行。它保存的是一套可以反复使用的身份和配置,收到工作时才产生具体的[运行](/tasks)。
## 智能体的配置项
@@ -39,14 +40,14 @@ import { Callout } from "fumadocs-ui/components/callout";
- **处理一条评论**:在评论中 @智能体,不改变任务的负责人。
- **继续讨论**:回复智能体的评论,新的信息会进入后续执行。
- **直接对话**:开始一段不依附于任务的对话。
-- **参与项目和小队**:智能体可以成为项目 lead,也可以担任小队 leader 或小队成员。
+- **参与项目和小队**:智能体可以成为项目 lead,也可以担任小队队长或小队成员。
- **通过自动化运行**:按时间表或外部事件触发预设工作,也可以手动运行。
智能体可以创建任务、发表评论和修改工作状态,但它没有收件箱,也不会收到 `@all`。对智能体的 @提及是一次执行触发,不是通知。
## 权限与 Access
-每个智能体都有一名 owner 和一个 Access 设置:
+每个智能体都有一名 owner 和一个 Access 设置(界面上叫"访问权限")。Access 决定谁可以运行它,也就是把任务分配给它、在评论中 @它或和它对话:
| Access | 谁可以运行 |
|---|---|
@@ -54,13 +55,21 @@ import { Callout } from "fumadocs-ui/components/callout";
| **整个工作区**(Entire workspace) | 工作区中的所有成员。 |
| **指定成员**(Specific people) | 智能体 owner 和指定的成员。 |
-新建智能体默认使用 **仅自己**。
+新建智能体默认使用 **仅自己**。下面的演示从"仅自己"开始,依次切到另外两档,同时列出每位成员在负责人选择器和 @提及菜单里看到的结果。
+
+<AgentAccessDemo />
<Callout type="info">
-工作区 `owner` 和 `admin` 可以查看并管理所有智能体,但不能绕过 Access 运行别人的"仅自己"智能体。普通成员只会看到自己拥有或有权运行的智能体。
+工作区 `owner` 和 `admin` 可以查看并管理所有智能体,但不能绕过 Access 运行别人的"仅自己"智能体。
</Callout>
-**看见**由 owner 身份、工作区管理角色和 Access 共同决定;**修改**开放给智能体 owner 和工作区 owner/admin,其中 Access 只有智能体 owner 能改。
+运行之外的操作按下表划分:
+
+| 操作 | 谁可以 |
+|---|---|
+| 在智能体列表和选择器中看到它 | 智能体 owner、工作区 `owner` 和 `admin`,以及 Access 授权的成员 |
+| 修改配置 | 智能体 owner、工作区 `owner` 和 `admin` |
+| 修改 Access | 只有智能体 owner |
环境变量和 MCP 等可能包含凭据的配置有更严格的读取规则,见[创建和配置智能体](/agents-create#环境变量与凭据)。
@@ -85,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 接下来
-- [创建和配置智能体](/agents-create) — 从空白开始,或通过 AI 创建。
+- [创建和配置智能体](/agents-create) — 自己填写配置,或让 AI 帮你写草稿。
- [Skills](/skills) — 给智能体添加可复用的方法和资料。
-- [小队](/squads) — 让 leader 根据任务选择合适的成员。
+- [小队](/squads) — 让队长根据任务选择合适的成员。
- [守护进程与运行时](/daemon-runtimes) — 了解智能体实际在哪里执行。
diff --git a/apps/docs/content/docs/analytics.fr.mdx b/apps/docs/content/docs/analytics.fr.mdx
new file mode 100644
index 0000000000..b00e54c567
--- /dev/null
+++ b/apps/docs/content/docs/analytics.fr.mdx
@@ -0,0 +1,132 @@
+---
+title: Statistiques
+description: Voir ce que coûtent les agents, combien de tokens ils consomment, combien de temps ils tournent, et quelles exécutions échouent et pourquoi.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { UsageDemo } from "@/components/demos/usage-demo";
+
+La page **Statistiques** de la barre latérale regroupe la consommation des agents de tout l'espace de travail : coût, tokens, temps d'exécution, nombre d'exécutions et exécutions en échec. Tous les membres de l'espace de travail peuvent l'ouvrir. La consommation de chaque runtime se trouve sur sa page de détail, et le coût d'une tâche dans sa boîte de dialogue **Exécutions** ; les deux sont décrits plus bas.
+
+## Organisation de la page
+
+La page a deux onglets, **Consommation** et **Erreurs**, qui partagent les deux filtres en haut à droite :
+
+- **Période** : `1d`, `7d`, `30d` (par défaut), `90d`, `180d`. `1d` signifie aujourd'hui, à partir de minuit dans votre fuseau horaire, et non les dernières 24 heures.
+- **Projet** : **Tous les projets** par défaut. Avec un projet sélectionné, seules les exécutions des tâches de ce projet comptent ; celles qui n'appartiennent à aucune tâche, comme les exécutions de chat, sont exclues.
+
+Les jours sont découpés selon votre fuseau horaire : celui choisi dans **Paramètres → Préférences → Fuseau horaire**, ou celui du navigateur si vous n'en avez pas choisi. L'en-tête affiche ce fuseau et l'heure de la dernière mise à jour. Le serveur agrège les chiffres toutes les 5 minutes et une page ouverte se rafraîchit au même rythme ; une exécution qui vient de se terminer peut donc mettre quelques minutes à apparaître. Le bouton d'actualisation récupère tout de suite les derniers chiffres.
+
+Passer sur l'onglet Erreurs ajoute `?tab=errors` à l'adresse : le lien que vous envoyez à un collègue s'ouvre directement sur cet onglet.
+
+## Onglet Consommation
+
+Quatre chiffres en haut :
+
+| Carte | Contenu |
+| --- | --- |
+| **Coût** | Coût estimé en USD ; voir [Calcul du coût](#calcul-du-coût) |
+| **Tokens** | Total des tokens d'entrée, de sortie, de lecture et d'écriture de cache, avec l'entrée et la sortie détaillées en dessous |
+| **Temps d'exécution** | Durée cumulée des exécutions terminées, du début à la fin de chacune |
+| **Exécutions** | Exécutions terminées sur la période, et combien ont échoué |
+
+Le temps d'exécution et le nombre d'exécutions ne comptent que les exécutions réellement démarrées (terminées, en échec ou annulées en cours de route) ; une exécution annulée alors qu'elle attendait encore dans la file n'est pas comptée.
+
+La carte de tendance affiche Tokens, Coût, Temps ou Exécutions sur un même axe temporel, en **Quotidien** ou **Hebdomadaire**. `30d` et `90d` proposent les deux ; `1d` et `7d` sont uniquement quotidiens, `180d` uniquement hebdomadaire. Les semaines commencent le lundi, et la semaine en cours, pas encore terminée, est dessinée plus pâle ; au survol, la barre est marquée comme partielle avec le nombre de jours écoulés sur 7.
+
+Le **Classement** liste les tokens, le coût, le temps et les exécutions de chaque agent, triés selon l'une de ces quatre valeurs. Il affiche les 10 premiers ; **Tout afficher** montre le reste. Deux lignes peuvent regrouper plusieurs agents :
+
+- **Agents supprimés** : la consommation des agents supprimés depuis, fusionnée en une ligne pour que les lignes s'additionnent toujours aux totaux du haut.
+- **Autres agents** : les agents que vous ne pouvez pas voir, fusionnés en une ligne. Les propriétaires et administrateurs de l'espace de travail voient tous les agents créés par les membres ; un membre ordinaire ne voit pas les agents privés des autres, dont la consommation n'apparaît qu'ici, sans nom.
+
+Quand une partie des exécutions d'un agent n'a pas transmis de tokens, ses Tokens et son Coût sont précédés de `≥`, et une ligne sous son nom indique combien d'exécutions n'ont pas transmis leur consommation.
+
+Dans la démo ci-dessous, une équipe ops a trois agents. Regardez d'abord la tendance du coût, puis qui dépense le plus, et cherchez enfin la cause des échecs dans l'onglet Erreurs.
+
+<UsageDemo />
+
+## Onglet Erreurs
+
+En haut : **Exécutions en échec**, **Taux d'échec** et **Agents touchés**. Le taux est calculé sur toutes les exécutions terminées dans la période, et la carte indique les deux nombres en dessous.
+
+Ensuite :
+
+- **Erreurs quotidiennes** (ou hebdomadaires) : chaque couleur d'une barre est une catégorie d'échec.
+- **Répartition des échecs** : tous les échecs de la période, répartis par catégorie. **Afficher les codes d'erreur** affiche à la place les codes de motif d'échec bruts, à rechercher dans les journaux ou à coller dans une tâche.
+- **Principaux fautifs** : classés par nombre d'échecs par défaut, au-delà des 8 premiers derrière un bouton. Classés par **Taux**, les agents qui ont moins de 10 exécutions passent en dernier : sur si peu d'exécutions, un taux ne dit pas grand-chose. Cliquer sur le nom d'un agent ouvre sa page de détail, avec ses exécutions récentes et le motif de chaque échec.
+
+Les codes de motif d'échec se répartissent en sept catégories :
+
+| Catégorie | Comprend | Solution habituelle |
+| --- | --- | --- |
+| Authentification | Échec d'authentification ou accès refusé chez le fournisseur, configuration manquante comme une clé API | Se reconnecter dans l'outil de codage IA, ou compléter la configuration |
+| Limite de débit | Limitation de débit, capacité insuffisante, quota ou solde épuisé | Réessayer plus tard, ou relever la limite |
+| Délai dépassé | Délai d'exécution dépassé, outil qui ne répond plus, Codex bloqué | Réduire la tâche, ou ajuster le délai |
+| Fournisseur | Erreurs serveur du fournisseur, pannes réseau, modèle indisponible, requête refusée | Réessayer plus tard, ou passer à un modèle disponible |
+| Runtime | Runtime hors ligne, redémarrage du daemon, expiration dans la file, échec du téléchargement du bundle de skills, outil introuvable ou trop ancien, échec de préparation de l'environnement | Vérifier l'ordinateur qui a exécuté la tâche |
+| Agent | Plantage du processus de l'outil, sortie illisible, dépassement de contexte, limite d'itérations, agent signalant qu'il ne peut pas continuer | Lire la transcription, ajuster la tâche et relancer |
+| Autre | Échecs impossibles à classer | Consulter le code d'erreur brut et la transcription |
+
+Pour le sens de chaque code et la manière de le traiter, voir [Exécutions · Référence des motifs d'échec](/tasks#référence-des-motifs-déchec).
+
+## Calcul du coût
+
+Tous les coûts affichés dans Statistiques sont des estimations en USD, pas une facture de l'outil de codage IA ni du fournisseur de modèle :
+
+- Multica embarque une table des tarifs publiés des modèles, avec un prix par million de tokens pour l'entrée, la sortie, la lecture et l'écriture de cache, qu'il multiplie par les tokens transmis.
+- Quand l'outil de codage IA communique son propre coût (c'est le cas de Grok Build, par exemple), ce chiffre est repris tel quel au lieu d'une estimation.
+- Les tokens des modèles absents de la table sont comptés, mais leur coût vaut $0. Vous pouvez [définir des tarifs personnalisés](#tarifs-personnalisés) pour ces modèles depuis la consommation d'un runtime.
+- Certains modèles appliquent un tarif plus élevé au-delà d'une certaine longueur de prompt. Les données agrégées ne disent pas quelle était la longueur de chaque requête, tout est donc compté au tarif standard, et ces exécutions peuvent être sous-estimées.
+
+Les tokens sont transmis par l'outil de codage IA. Quand un outil n'en transmet aucun, l'exécution compte quand même dans le temps d'exécution et le nombre d'exécutions, mais n'ajoute ni tokens ni coût. Par exemple, le GitHub Copilot CLI actuel n'indique pas de nombre de tokens dans sa sortie ; les agents qui l'utilisent affichent donc `≥` et le nombre d'exécutions non transmises dans le classement.
+
+## Consommation d'un runtime
+
+Ouvrez **Runtimes** et entrez dans la page de détail d'un runtime pour voir sa consommation. Celle d'un runtime privé n'est visible que par son propriétaire ; celle d'un runtime public est visible par tous les membres.
+
+- En haut : **Coût**, **Économies de cache** et **Tokens**. Le coût est comparé à la période précédente de même durée. Les économies de cache estiment combien les lectures de cache auraient coûté de plus au tarif d'entrée normal, avec le taux de succès du cache en dessous.
+- **Quand ce runtime a dépensé** : coût ou tokens par jour ou par semaine. La vue **Carte de chaleur** colore un carré par jour des 26 dernières semaines selon son coût, sans tenir compte de la période choisie au-dessus.
+- **Par agent** et **Par modèle** : à quels agents et à quels modèles est allé le coût de la période.
+- **Tableau du détail quotidien** : se déplie en une ligne par date et par modèle, avec chaque type de tokens.
+
+La page d'un runtime propose `7d`, `30d`, `90d` et `180d`.
+
+## Tarifs personnalisés
+
+Quand la période choisie contient des modèles absents de la table des tarifs, la consommation du runtime affiche au-dessus des chiffres un avis indiquant combien de modèles n'ont pas de tarif maintenu et que leurs tokens sont exclus du coût. Cliquez sur **Définir des tarifs personnalisés**, saisissez pour chaque modèle les tarifs d'entrée, de sortie, de lecture et d'écriture de cache en USD par million de tokens, puis enregistrez. Une fois que tous les modèles ont un tarif, un bouton **Modifier les tarifs personnalisés** reste en place pour les changer plus tard. Pour retirer le tarif d'un modèle, videz tous ses champs et enregistrez, ou cliquez sur le bouton de suppression à côté.
+
+<Callout type="info">
+Les tarifs personnalisés sont stockés uniquement dans le navigateur ou l'application de bureau de cet appareil. Ils ne sont pas synchronisés avec votre compte ni partagés avec les autres membres, et s'appliquent à tous les espaces de travail de cet appareil. Les autres membres voient toujours $0 pour ces modèles.
+</Callout>
+
+Les tarifs personnalisés ne s'appliquent qu'aux modèles absents de la table : ils ne remplacent pas un tarif intégré, ni un coût que l'outil de codage IA a communiqué lui-même. Après l'enregistrement, Statistiques, la consommation des runtimes et les boîtes de dialogue Exécutions des tâches sont recalculées avec les nouveaux tarifs sur cet appareil.
+
+## Coût d'une tâche
+
+Le **Journal d'exécution** de la barre latérale de chaque tâche affiche son **Dépensé**, ses **Tokens** et son **Travail d'agent**, ainsi qu'une barre de coût par exécution. Cliquez sur le total, sur une barre de coût ou sur **Ouvrir la chronologie** pour ouvrir la boîte de dialogue **Exécutions** :
+
+- Le résumé du haut montre **Dépensé**, **Tokens** (et la part venue du cache), **Sortie**, **Travail d'agent** et **Exécutions**. Le travail d'agent est la somme des durées des exécutions ; la durée affichée à côté va du début de la première exécution à la fin de la dernière. À côté du nombre d'exécutions figurent celles en échec, annulées et en cours.
+- La vue **Par exécution** du graphique trace une barre par exécution pour le coût, les tokens ou le travail d'agent ; la vue **Cumul** trace le coût cumulé au fil du temps.
+- Les bandes **Par agent** et **Par modèle** montrent à qui et à quels modèles le coût est allé.
+- En dessous, les exécutions sont listées par jour ; **Détails de l'exécution** montre le détail du coût d'une exécution et ce que ses lectures de cache ont fait économiser.
+
+Le bas de la boîte de dialogue rappelle que le coût est estimé et nomme les modèles sans tarif.
+
+## Depuis la CLI
+
+```bash
+multica issue usage <issue-id>
+multica runtime usage <runtime-id> --days 30
+```
+
+`issue usage` affiche les totaux de tokens d'une tâche (entrée, sortie, lecture de cache, écriture de cache) et les nombres d'exécutions. `RUNS` est le nombre d'exécutions terminées, `METERED_RUNS` celles qui ont transmis leur consommation, `UNREPORTED` celles qui ne l'ont pas fait ; dès qu'une exécution n'a rien transmis, les totaux de tokens sont précédés de `>=`, car le chiffre réel ne peut être que plus élevé.
+
+`runtime usage` liste les tokens d'un runtime par date, fournisseur et modèle. `--days` vaut 90 par défaut, 365 au maximum.
+
+Aucun des deux tableaux ne contient d'estimation de coût ; ajoutez `--output json` pour obtenir les données brutes renvoyées par l'API.
+
+## Étapes suivantes
+
+- [Exécutions](/tasks) — le journal d'exécution, les motifs d'échec et les relances.
+- [Daemon et runtimes](/daemon-runtimes) — sur quel ordinateur une exécution tourne.
+- [Membres et rôles](/members-roles) — qui peut voir quels agents.
diff --git a/apps/docs/content/docs/analytics.ja.mdx b/apps/docs/content/docs/analytics.ja.mdx
new file mode 100644
index 0000000000..da887e4b11
--- /dev/null
+++ b/apps/docs/content/docs/analytics.ja.mdx
@@ -0,0 +1,132 @@
+---
+title: 分析
+description: エージェントのコスト、トークン使用量、実行時間と、どの実行がなぜ失敗したかを確認します。
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { UsageDemo } from "@/components/demos/usage-demo";
+
+サイドバーの**分析**ページには、ワークスペース全体のエージェント使用量がまとまっています。コスト、トークン、実行時間、実行回数、そして失敗した実行です。ワークスペースのメンバーなら誰でも開けます。ランタイムごとの使用量はランタイムの詳細ページに、1 つのタスクにかかった費用はその**実行履歴**ダイアログにあります。どちらも後半で説明します。
+
+## ページの構成
+
+ページは**使用量**と**エラー**の 2 つのタブに分かれ、右上の 2 つのフィルターを共有します。
+
+- **期間**: `1d`、`7d`、`30d`(既定)、`90d`、`180d`。`1d` はあなたのタイムゾーンの 0 時からの「今日」で、直近 24 時間ではありません。
+- **プロジェクト**: 既定は**すべてのプロジェクト**です。プロジェクトを選ぶと、そのプロジェクトのタスクで動いた実行だけを集計します。チャットなど、どのタスクにも属さない実行は含まれません。
+
+日付の区切りはあなたのタイムゾーンに従います。**設定 → 環境設定 → タイムゾーン**で設定した値を使い、未設定ならブラウザーのタイムゾーンを使います。ヘッダーには使用中のタイムゾーンとデータの更新時刻が表示されます。数値はサーバーが 5 分ごとに集計し、開いているページも同じ間隔で再読み込みするため、終わったばかりの実行が表示されるまで数分かかることがあります。すぐに見たいときは更新ボタンを押します。
+
+エラータブに切り替えるとアドレスに `?tab=errors` が付きます。そのリンクを送れば、相手もエラータブから開けます。
+
+## 使用量タブ
+
+上部の 4 つの数値:
+
+| カード | 内容 |
+| --- | --- |
+| **コスト** | 米ドル建ての概算。計算方法は[コストの計算方法](#コストの計算方法)を参照 |
+| **トークン** | 入力・出力・キャッシュ読み取り・キャッシュ書き込みの合計。下の行に入力と出力を個別に表示 |
+| **実行時間** | 終了した実行の所要時間の合計。各実行の開始から終了まで |
+| **実行** | 期間内に終了した実行の数と、そのうち失敗した数 |
+
+実行時間と実行の数に入るのは、実際に動き始めた実行(完了、失敗、途中でキャンセル)だけです。待機中にキャンセルされた実行は含まれません。
+
+推移カードでは、トークン・コスト・時間・実行の 4 つの指標を同じ時間軸で切り替え、**日別**と**週別**の単位を選べます。`30d` と `90d` はどちらも選べ、`1d` と `7d` は日別のみ、`180d` は週別のみです。週は月曜始まりで、まだ終わっていない今週は薄い色で描かれ、ホバーすると 7 日中何日経過したかが表示されます。
+
+**リーダーボード**はエージェントごとのトークン・コスト・時間・実行を並べ、どの項目でも並べ替えられます。上位 10 件を表示し、残りは**すべて表示**で開きます。複数のエージェントをまとめた行が出ることがあります。
+
+- **削除済みエージェント**: 削除されたエージェントの使用量を 1 行にまとめたもの。各行を足すと上部の合計と一致します。
+- **その他のエージェント**: あなたが見られないエージェントを 1 行にまとめたもの。ワークスペースのオーナーと管理者は、メンバーが作ったすべてのエージェントを見られます。一般メンバーには他人のプライベートエージェントが見えず、その使用量は名前なしでこの行にだけ入ります。
+
+あるエージェントの実行の一部がトークンを報告していないと、そのトークンとコストの前に `≥` が付き、名前の下に使用量が報告されていない実行の数が出ます。
+
+下のデモでは、運用チームに 3 つのエージェントがいます。まずコストの推移を見て、次に誰が一番使っているかを確認し、最後にエラータブで失敗の理由を探します。
+
+<UsageDemo />
+
+## エラータブ
+
+上部に**失敗した実行**、**失敗率**、**影響を受けたエージェント**が並びます。失敗率は期間内に終了したすべての実行に対する割合で、カードの下に分子と分母が書かれています。
+
+その下には次のカードがあります。
+
+- **日別エラー**(または週別エラー): 棒の色分けが失敗の分類です。
+- **失敗の内訳**: 期間内の全失敗を分類ごとに分けたもの。**エラーコードを表示**を押すと元の失敗理由コードに切り替わり、ログ検索やタスクへの貼り付けに使えます。
+- **失敗の多いエージェント**: 既定は失敗数の順で、9 件目以降は展開して表示します。**失敗率**で並べると、実行が 10 回未満のエージェントは後ろに回ります。回数が少ないと割合はあまり当てにならないためです。エージェント名をクリックすると詳細ページが開き、最近の実行と失敗ごとの理由を確認できます。
+
+失敗理由コードは 7 つに分類されます。
+
+| 分類 | 含まれるもの | 主な対処 |
+| --- | --- | --- |
+| 認証 | プロバイダーの認証失敗やアクセス拒否、API キーなどの設定不足 | AI コーディングツールで再ログインするか、設定を補う |
+| レート制限 | レート制限、容量不足、クォータや残高の枯渇 | 時間をおいて再試行するか、上限を引き上げる |
+| タイムアウト | 実行のタイムアウト、ツールの無応答、Codex の停滞 | タスクの範囲を絞るか、タイムアウト設定を調整する |
+| プロバイダー | プロバイダーのサーバーエラー、ネットワーク障害、モデルが使えない、リクエストの拒否 | 時間をおいて再試行するか、使えるモデルに切り替える |
+| ランタイム | ランタイムのオフライン、デーモンの再起動、待機の期限切れ、skill バンドルのダウンロード失敗、ツールが見つからない・古い、実行環境の準備失敗 | 実行したコンピューターを確認する |
+| エージェント | ツールプロセスの異常終了、出力を解析できない、コンテキスト超過、反復回数の上限、エージェントが続行不能と報告 | 実行ログを確認し、タスクを見直して再試行する |
+| その他 | 分類できない失敗 | 元のエラーコードと実行ログを確認する |
+
+各コードの意味と対処は[実行 · 失敗理由リファレンス](/tasks#失敗理由リファレンス)を参照してください。
+
+## コストの計算方法
+
+分析に出るコストはすべて米ドル建ての概算で、AI コーディングツールやモデルプロバイダーの請求額ではありません。
+
+- Multica は公開されているモデル料金の表を持っており、入力・出力・キャッシュ読み取り・キャッシュ書き込みそれぞれの 100 万トークンあたりの単価を、報告されたトークン数に掛けます。
+- AI コーディングツール自身がコストを報告した場合(Grok Build など)は、その値をそのまま使い、概算はしません。
+- 料金表にないモデルは、トークンは数えますがコストは $0 として扱います。そうしたモデルにはランタイムの使用量から[カスタム価格](#カスタム価格)を設定できます。
+- プロンプトが一定の長さを超えると単価が上がるモデルがあります。集計データからは各リクエストの長さがわからないため一律に標準料金で計算し、こうした実行は低めに見積もられることがあります。
+
+トークンは AI コーディングツールが報告します。ツールが報告しない場合、その実行は実行時間と実行の数には入りますが、トークンとコストは加算されません。たとえば現在の GitHub Copilot CLI は出力にトークン数を含めないため、これを使うエージェントはリーダーボードで `≥` と未報告の数が表示されます。
+
+## ランタイムの使用量
+
+**ランタイム**を開いて各ランタイムの詳細ページに入ると、そのランタイムの使用量が表示されます。プライベートなランタイムの使用量はオーナーだけが、公開ランタイムの使用量はメンバー全員が見られます。
+
+- 上部は**コスト**、**キャッシュによる節約**、**トークン**です。コストは同じ長さの前の期間と比べた増減が付きます。キャッシュによる節約は、キャッシュ読み取りを通常の入力単価で払っていたら余分にいくらかかったかの概算で、下にヒット率が出ます。
+- **このランタイムでコストが発生した時期**: 日別または週別のコストかトークン。**ヒートマップ**に切り替えると、直近 26 週の毎日のコストをマスの濃さで表示します。上の期間の選択には左右されません。
+- **エージェント別**と**モデル別**: その期間のコストがどのエージェント、どのモデルに使われたか。
+- **日別内訳テーブル**: 展開すると、日付とモデルごとに各種トークンの数が並びます。
+
+ランタイムページの期間は `7d`、`30d`、`90d`、`180d` です。
+
+## カスタム価格
+
+選んだ期間に料金表にないモデルが含まれると、ランタイムの使用量の上に、価格が管理されていないモデルの数と、そのトークンがコストから除外されていることを知らせる表示が出ます。**カスタム価格を設定**を押し、モデルごとに入力・出力・キャッシュ読み取り・キャッシュ書き込みの単価を 100 万トークンあたりの USD で入れて保存します。すべてのモデルに価格が付いた後も、あとで変更できるように**カスタム価格を編集**ボタンが残ります。あるモデルの価格を消すには、そのフィールドをすべて空にして保存するか、横の削除ボタンを押します。
+
+<Callout type="info">
+カスタム価格はこのデバイスのブラウザーかデスクトップアプリにだけ保存されます。アカウントには同期されず、ワークスペースの他のメンバーとも共有されません。このデバイスではすべてのワークスペースに適用されます。他のメンバーの画面では、これらのモデルは引き続き $0 のままです。
+</Callout>
+
+カスタム価格が使われるのは料金表にないモデルだけで、組み込みの単価は上書きできません。AI コーディングツールが自ら報告したコストも置き換えません。保存すると、このデバイス上の分析ページ、ランタイムの使用量、タスクの実行履歴が新しい単価で計算し直されます。
+
+## タスクのコスト
+
+各タスクのサイドバーにある**実行ログ**には、そのタスクの**費用**、**トークン**、**エージェント作業**の時間と、実行ごとに 1 本ずつのコストバーが出ます。合計、コストバー、または**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開きます。
+
+- 上部に**費用**、**トークン**(そのうちキャッシュの割合)、**出力**、**エージェント作業**、**実行回数**がまとまっています。エージェント作業は各実行の所要時間の合計で、横の「経過」は最初の実行の開始から最後の実行の終了までの時間です。実行回数の横には失敗、キャンセル、進行中の数が並びます。
+- グラフは**実行ごと**にすると実行 1 回につき 1 本の棒で費用・トークン・エージェント作業を表示し、**累計**にすると累計費用が時間とともに増える線を表示します。
+- **エージェント別**と**モデル別**の帯で、費用がどのエージェント、どのモデルに使われたかがわかります。
+- その下には実行が日ごとに並び、**実行の詳細**を開くとその実行の費用の内訳と、キャッシュヒットで節約できた額が見られます。
+
+ダイアログの下部には、費用が概算であることと、価格のないモデルの名前が記されます。
+
+## CLI で確認する
+
+```bash
+multica issue usage <issue-id>
+multica runtime usage <runtime-id> --days 30
+```
+
+`issue usage` はタスクのトークン合計(入力、出力、キャッシュ読み取り、キャッシュ書き込み)と実行回数を出力します。`RUNS` は終了した実行の数、`METERED_RUNS` は使用量を報告した数、`UNREPORTED` は報告しなかった数です。報告のない実行があると、トークン合計に `>=` が付きます。実際の値はそれ以上という意味です。
+
+`runtime usage` はランタイムのトークン使用量を日付、プロバイダー、モデルごとに並べます。`--days` の既定は 90、最大 365 です。
+
+どちらの表にもコストの概算は含まれません。`--output json` を付けると API が返す元データを出力します。
+
+## 次のステップ
+
+- [実行](/tasks) — 実行ログ、失敗理由、再試行
+- [デーモンとランタイム](/daemon-runtimes) — 実行がどのコンピューターで動くか
+- [メンバーとロール](/members-roles) — 誰がどのエージェントを見られるか
diff --git a/apps/docs/content/docs/analytics.ko.mdx b/apps/docs/content/docs/analytics.ko.mdx
new file mode 100644
index 0000000000..d352c142ec
--- /dev/null
+++ b/apps/docs/content/docs/analytics.ko.mdx
@@ -0,0 +1,132 @@
+---
+title: 분석
+description: 에이전트가 쓴 비용과 토큰, 실행 시간, 그리고 어떤 실행이 왜 실패했는지 확인합니다.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { UsageDemo } from "@/components/demos/usage-demo";
+
+사이드바의 **분석** 페이지는 워크스페이스 전체의 에이전트 사용량을 모아 보여 줍니다. 비용, 토큰, 실행 시간, 실행 횟수, 실패한 실행이 여기에 있습니다. 워크스페이스 멤버라면 누구나 열 수 있습니다. 런타임별 사용량은 런타임 상세 페이지에, 태스크 하나에 든 비용은 그 태스크의 **실행 기록** 대화상자에 있으며, 둘 다 아래에서 설명합니다.
+
+## 페이지 구성
+
+페이지는 **사용량**과 **오류** 두 탭으로 나뉘고, 오른쪽 위의 필터 두 개를 함께 씁니다.
+
+- **기간**: `1d`, `7d`, `30d`(기본값), `90d`, `180d`. `1d`는 내 시간대의 자정부터 시작하는 오늘이며, 최근 24시간이 아닙니다.
+- **프로젝트**: 기본값은 **모든 프로젝트**입니다. 프로젝트를 고르면 그 프로젝트에 속한 태스크의 실행만 집계하고, 채팅처럼 어느 태스크에도 속하지 않는 실행은 빠집니다.
+
+날짜는 내 시간대 기준으로 나뉩니다. **설정 → 환경설정 → 시간대**에서 고른 값을 쓰고, 설정하지 않았으면 브라우저 시간대를 씁니다. 헤더에 현재 시간대와 데이터 업데이트 시각이 표시됩니다. 서버는 5분마다 수치를 집계하고 열려 있는 페이지도 같은 간격으로 새로고침하므로, 방금 끝난 실행은 몇 분 뒤에 나타날 수 있습니다. 바로 확인하려면 새로고침 버튼을 누르세요.
+
+오류 탭으로 바꾸면 주소에 `?tab=errors`가 붙습니다. 이 링크를 동료에게 보내면 바로 오류 탭이 열립니다.
+
+## 사용량 탭
+
+맨 위의 네 가지 수치:
+
+| 카드 | 내용 |
+| --- | --- |
+| **비용** | 달러 기준 추정치. 계산 방식은 [비용 계산 방식](#비용-계산-방식) 참고 |
+| **토큰** | 입력, 출력, 캐시 읽기, 캐시 쓰기 토큰의 합계. 아래 줄에 입력과 출력을 따로 표시 |
+| **실행 시간** | 끝난 실행들의 실행 시간 합계. 각 실행이 시작된 때부터 끝난 때까지 |
+| **실행** | 기간 안에 끝난 실행 수와 그중 실패한 수 |
+
+실행 시간과 실행 수에는 실제로 실행을 시작한 실행(완료, 실패, 도중 취소)만 들어갑니다. 대기 중에 취소된 실행은 빠집니다.
+
+추이 카드는 토큰, 비용, 시간, 실행 네 가지 지표를 같은 시간 축에서 바꿔 가며 보여 주고, **일별**과 **주별** 단위를 고를 수 있습니다. `30d`와 `90d`는 둘 다 고를 수 있고, `1d`와 `7d`는 일별만, `180d`는 주별만 됩니다. 주는 월요일부터 시작하며, 아직 끝나지 않은 이번 주는 옅은 색으로 그려지고 마우스를 올리면 7일 중 며칠이 지났는지 표시됩니다.
+
+**리더보드**는 에이전트별 토큰, 비용, 시간, 실행을 보여 주며 이 중 어느 항목으로든 정렬할 수 있습니다. 상위 10개를 보여 주고 나머지는 **전체 보기**로 펼칩니다. 여러 에이전트를 묶은 행이 나올 수 있습니다.
+
+- **삭제된 에이전트**: 삭제된 에이전트들의 사용량을 한 행으로 합친 것입니다. 그래야 각 행의 합이 맨 위 합계와 맞습니다.
+- **기타 에이전트**: 내가 볼 수 없는 에이전트들을 한 행으로 합친 것입니다. 워크스페이스 소유자와 관리자는 멤버가 만든 모든 에이전트를 볼 수 있습니다. 일반 멤버는 다른 사람의 비공개 에이전트를 볼 수 없으며, 그 사용량은 이름 없이 이 행에만 들어갑니다.
+
+어떤 에이전트의 실행 중 일부가 토큰을 보고하지 않았으면 토큰과 비용 앞에 `≥`가 붙고, 이름 아래에 사용량을 보고하지 않은 실행 수가 표시됩니다.
+
+아래 데모에서는 운영팀에 에이전트가 세 개 있습니다. 먼저 비용 추이를 보고, 누가 가장 많이 쓰는지 확인한 뒤, 오류 탭에서 실패 원인을 찾아봅니다.
+
+<UsageDemo />
+
+## 오류 탭
+
+맨 위에 **실패한 실행**, **실패율**, **영향받은 에이전트**가 있습니다. 실패율은 기간 안에 끝난 모든 실행을 기준으로 계산하며, 카드 아래에 분자와 분모가 적혀 있습니다.
+
+그 아래에는 다음 카드가 이어집니다.
+
+- **일별 오류**(또는 주별 오류): 막대의 색이 실패 분류를 나타냅니다.
+- **실패 구성**: 기간 안의 모든 실패를 분류별로 나눈 것입니다. **오류 코드 표시**를 누르면 원래의 실패 원인 코드로 바뀌어, 로그를 검색하거나 태스크에 붙여 넣을 때 쓸 수 있습니다.
+- **실패가 많은 에이전트**: 기본은 실패 수 순이며, 9번째부터는 펼쳐야 보입니다. **실패율**로 정렬하면 실행이 10회 미만인 에이전트는 뒤로 갑니다. 횟수가 적으면 비율이 큰 의미가 없기 때문입니다. 에이전트 이름을 클릭하면 상세 페이지가 열리고, 최근 실행과 실패마다의 원인을 볼 수 있습니다.
+
+실패 원인 코드는 일곱 가지로 분류됩니다.
+
+| 분류 | 포함되는 것 | 보통의 대처 |
+| --- | --- | --- |
+| 인증 | 프로바이더 인증 실패나 접근 거부, API 키 같은 설정 누락 | AI 코딩 도구에서 다시 로그인하거나 설정을 채우기 |
+| 속도 제한 | 속도 제한, 용량 부족, 할당량이나 잔액 소진 | 잠시 뒤 재시도하거나 한도 올리기 |
+| 시간 초과 | 실행 시간 초과, 도구 응답 없음, Codex 정체 | 태스크 범위를 줄이거나 시간 제한 조정 |
+| 프로바이더 | 프로바이더 서버 오류, 네트워크 장애, 모델 사용 불가, 요청 거부 | 잠시 뒤 재시도하거나 사용 가능한 모델로 변경 |
+| 런타임 | 런타임 오프라인, 데몬 재시작, 대기 만료, skill 번들 다운로드 실패, 도구 없음 또는 오래된 버전, 실행 환경 준비 실패 | 그 실행을 돌린 컴퓨터 확인 |
+| 에이전트 | 도구 프로세스 비정상 종료, 출력 해석 불가, 컨텍스트 초과, 반복 횟수 한도, 에이전트가 계속할 수 없다고 보고 | 실행 로그를 확인하고 태스크를 고쳐 재시도 |
+| 기타 | 분류할 수 없는 실패 | 원래 오류 코드와 실행 로그 확인 |
+
+코드마다의 의미와 대처는 [실행 · 실패 원인 참조](/tasks#실패-원인-참조)를 보세요.
+
+## 비용 계산 방식
+
+분석에 나오는 비용은 모두 달러 기준 추정치이며, AI 코딩 도구나 모델 프로바이더의 청구서가 아닙니다.
+
+- Multica에는 공개된 모델 요금표가 들어 있어, 입력, 출력, 캐시 읽기, 캐시 쓰기마다 정한 100만 토큰당 단가를 보고된 토큰 수에 곱합니다.
+- AI 코딩 도구가 직접 비용을 보고하면(예: Grok Build) 추정하지 않고 그 값을 그대로 씁니다.
+- 요금표에 없는 모델은 토큰은 집계하지만 비용은 $0으로 계산합니다. 이런 모델은 런타임 사용량에서 [사용자 지정 가격](#사용자-지정-가격)을 설정할 수 있습니다.
+- 일부 모델은 프롬프트가 일정 길이를 넘으면 단가가 올라갑니다. 집계 데이터로는 요청마다의 길이를 알 수 없어 모두 표준 단가로 계산하므로, 이런 실행은 낮게 추정될 수 있습니다.
+
+토큰은 AI 코딩 도구가 보고합니다. 도구가 보고하지 않은 실행은 실행 시간과 실행 수에는 들어가지만 토큰과 비용은 더해지지 않습니다. 예를 들어 현재 GitHub Copilot CLI는 출력에 토큰 수를 넣지 않기 때문에, 이 도구를 쓰는 에이전트는 리더보드에 `≥`와 보고되지 않은 실행 수가 표시됩니다.
+
+## 런타임 사용량
+
+**런타임**을 열고 런타임 상세 페이지로 들어가면 그 런타임의 사용량이 보입니다. 비공개 런타임의 사용량은 소유자만, 공개 런타임의 사용량은 모든 멤버가 볼 수 있습니다.
+
+- 맨 위에는 **비용**, **캐시 절감**, **토큰**이 있습니다. 비용 아래에는 같은 길이의 이전 기간과 비교한 증감이 나옵니다. 캐시 절감은 캐시 읽기를 원래 입력 단가로 냈다면 얼마가 더 들었을지 추정한 값이며, 아래에 캐시 적중률이 표시됩니다.
+- **런타임 비용 발생 시점**: 일별 또는 주별 비용이나 토큰. **히트맵**으로 바꾸면 최근 26주 동안 하루하루의 비용을 칸의 진하기로 보여 주며, 위의 기간 선택과 상관없습니다.
+- **에이전트별**과 **모델별**: 그 기간의 비용이 어느 에이전트, 어느 모델에 쓰였는지.
+- **일별 상세 테이블**: 펼치면 날짜와 모델별로 토큰 종류마다의 수가 나옵니다.
+
+런타임 페이지의 기간은 `7d`, `30d`, `90d`, `180d`입니다.
+
+## 사용자 지정 가격
+
+고른 기간에 요금표에 없는 모델이 있으면, 런타임 사용량 위에 기본 가격이 등록되지 않은 모델 수와 그 토큰이 비용에서 빠졌다는 안내가 나옵니다. **사용자 지정 가격 설정**을 누르고, 모델마다 입력, 출력, 캐시 읽기, 캐시 쓰기 단가를 100만 토큰당 USD로 넣은 뒤 저장합니다. 모든 모델에 가격이 생긴 뒤에도 나중에 고칠 수 있도록 **사용자 지정 가격 편집** 버튼이 남습니다. 어떤 모델의 가격을 지우려면 그 필드를 모두 비우고 저장하거나, 옆의 삭제 버튼을 누릅니다.
+
+<Callout type="info">
+사용자 지정 가격은 이 기기의 브라우저나 데스크톱 앱에만 저장됩니다. 계정에 동기화되지 않고 워크스페이스의 다른 멤버와도 공유되지 않으며, 이 기기의 모든 워크스페이스에 적용됩니다. 다른 멤버 화면에서는 이 모델들이 여전히 $0으로 계산됩니다.
+</Callout>
+
+사용자 지정 가격은 요금표에 없는 모델에만 쓰이며, 기본 단가를 덮어쓸 수 없고 AI 코딩 도구가 직접 보고한 비용도 바꾸지 않습니다. 저장하면 이 기기의 분석 페이지, 런타임 사용량, 태스크 실행 기록이 새 단가로 다시 계산됩니다.
+
+## 태스크 비용
+
+태스크마다 사이드바의 **실행 로그**에 그 태스크의 **비용**, **토큰**, **에이전트 작업** 시간과 실행마다 하나씩의 비용 막대가 표시됩니다. 합계나 비용 막대, 또는 **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다.
+
+- 맨 위에 **비용**, **토큰**(그중 캐시 비율), **출력**, **에이전트 작업**, **실행**이 요약됩니다. 에이전트 작업은 각 실행 시간의 합이고, 옆의 "경과"는 첫 실행이 시작된 때부터 마지막 실행이 끝난 때까지의 시간입니다. 실행 옆에는 실패, 취소, 진행 중인 횟수가 나옵니다.
+- 차트를 **실행별**로 두면 실행마다 막대 하나로 비용, 토큰, 에이전트 작업을 보여 주고, **누적**으로 두면 누적 비용이 시간에 따라 늘어나는 선을 그립니다.
+- **에이전트별**과 **모델별** 띠가 비용이 누구에게, 어느 모델에 쓰였는지 보여 줍니다.
+- 아래에는 실행이 날짜별로 나열되며, **실행 세부 정보**를 펼치면 그 실행의 비용 내역과 캐시 적중으로 아낀 금액이 보입니다.
+
+대화상자 맨 아래에는 비용이 추정치라는 점과 가격이 없는 모델 이름이 적혀 있습니다.
+
+## CLI로 확인하기
+
+```bash
+multica issue usage <issue-id>
+multica runtime usage <runtime-id> --days 30
+```
+
+`issue usage`는 태스크의 토큰 합계(입력, 출력, 캐시 읽기, 캐시 쓰기)와 실행 수를 출력합니다. `RUNS`는 끝난 실행 수, `METERED_RUNS`는 사용량을 보고한 실행 수, `UNREPORTED`는 보고하지 않은 실행 수입니다. 보고하지 않은 실행이 있으면 토큰 합계 앞에 `>=`가 붙습니다. 실제 값은 그보다 크다는 뜻입니다.
+
+`runtime usage`는 런타임의 토큰 사용량을 날짜, 프로바이더, 모델별로 나열합니다. `--days`의 기본값은 90이고 최대 365입니다.
+
+두 표 모두 비용 추정치는 없습니다. `--output json`을 붙이면 API가 돌려준 원본 데이터를 출력합니다.
+
+## 다음 단계
+
+- [실행](/tasks) — 실행 로그, 실패 원인, 재시도를 알아봅니다.
+- [데몬과 런타임](/daemon-runtimes) — 실행이 어느 컴퓨터에서 도는지 확인합니다.
+- [멤버와 권한](/members-roles) — 누가 어떤 에이전트를 볼 수 있는지 알아봅니다.
diff --git a/apps/docs/content/docs/analytics.mdx b/apps/docs/content/docs/analytics.mdx
new file mode 100644
index 0000000000..c27420495f
--- /dev/null
+++ b/apps/docs/content/docs/analytics.mdx
@@ -0,0 +1,132 @@
+---
+title: Analytics
+description: See what agents cost, how many tokens they used, how long they ran, and which runs failed and why.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { UsageDemo } from "@/components/demos/usage-demo";
+
+The **Analytics** page in the sidebar rolls up agent usage across the whole workspace: cost, tokens, run time, run count, and failed runs. Every workspace member can open it. Each runtime's own usage lives on the runtime detail page, and what a single issue cost lives in its **Runs** dialog; both are covered below.
+
+## Page layout
+
+The page has two tabs, **Usage** and **Errors**, which share the two filters at the top right:
+
+- **Time range**: `1d`, `7d`, `30d` (default), `90d`, `180d`. `1d` means today, starting at midnight in your time zone, not the last 24 hours.
+- **Project**: **All projects** by default. With a project selected, only runs on that project's issues count; runs that belong to no issue, such as chat runs, drop out.
+
+Days are cut in your time zone: the one set under **Settings → Preferences → Time zone**, or the browser's if you have not set one. The header shows that time zone and when the data was last updated. The server rolls the figures up every 5 minutes and an open page refreshes on the same interval, so a run that just finished can take a few minutes to appear; the refresh button pulls the latest figures immediately.
+
+Switching to the Errors tab adds `?tab=errors` to the address, so a link you send a teammate opens straight on that tab.
+
+## Usage tab
+
+Four figures sit at the top:
+
+| Card | What it shows |
+| --- | --- |
+| **Cost** | Estimated cost in USD; see [How cost is calculated](#how-cost-is-calculated) |
+| **Tokens** | Input, output, cache-read and cache-write tokens combined, with input and output broken out underneath |
+| **Run time** | Total execution time of finished runs, from when each started to when it ended |
+| **Runs** | Runs that finished in the range, and how many of them failed |
+
+Run time and Runs count only runs that actually started executing (completed, failed, or cancelled mid-run); a run cancelled while still queued is left out.
+
+The trend card plots Tokens, Cost, Time, or Runs on one time axis, at a **Daily** or **Weekly** grain. `30d` and `90d` offer both; `1d` and `7d` are daily only, `180d` weekly only. Weeks start on Monday, and the current, unfinished week is drawn lighter; hovering it marks the bar as partial and says how many of its 7 days have passed.
+
+The **Leaderboard** lists each agent's tokens, cost, run time, and runs, ranked by whichever of the four you pick. It shows the top 10; **Show all** reveals the rest. Two rows can stand for more than one agent:
+
+- **Deleted agents**: usage of agents that have since been deleted, merged into one row so the rows still add up to the totals above.
+- **Other agents**: agents you cannot see, merged into one row. Workspace owners and admins see every agent members created; a regular member does not see other people's private agents, whose usage appears only here, without names.
+
+When some of an agent's runs did not report tokens, its Tokens and Cost carry a `≥` prefix and a line under its name says how many runs did not report usage.
+
+In the demo below, an operations team has three agents. Check the cost trend first, then who spends the most, and finally find the reasons for failures on the Errors tab.
+
+<UsageDemo />
+
+## Errors tab
+
+At the top are **Failed runs**, **Failure rate**, and **Agents affected**. The rate is taken over every run that finished in the range, and the card spells out both numbers underneath.
+
+Below them:
+
+- **Daily errors** (or Weekly errors): each colour in a bar is one failure class.
+- **Failure mix**: every failure in the range, split by class. **Show error codes** swaps in the raw failure reason codes, which you can search logs for or paste into an issue.
+- **Top offenders**: ranked by failure count by default, with anything past the first 8 behind a toggle. When ranked by **Rate**, agents with fewer than 10 runs sort last, because a rate from that few runs says little. Clicking an agent's name opens its detail page, which lists its recent runs and the reason for each failure.
+
+Failure reason codes fall into seven classes:
+
+| Class | Includes | Usual fix |
+| --- | --- | --- |
+| Auth | Provider authentication or access denied, missing configuration such as an API key | Sign in again in the AI coding tool, or fill in the configuration |
+| Rate limit | Rate limits, insufficient capacity, exhausted quota or balance | Retry later, or raise the limit |
+| Timeout | Run timeout, the tool going unresponsive, Codex stalling | Narrow the task, or adjust the timeout |
+| Provider | Provider server errors, network failures, unavailable models, rejected requests | Retry later, or switch to an available model |
+| Runtime | Runtime offline, daemon restart, queue expiry, skill bundle download failure, missing or outdated tool, environment preparation failure | Check the computer that ran it |
+| Agent | Tool process crash, unparseable output, context overflow, iteration limit, agent reporting it cannot continue | Read the transcript, adjust the issue, and retry |
+| Other | Failures that could not be classified | Check the raw error code and the transcript |
+
+For what each code means and how to handle it, see [Runs · Failure reason reference](/tasks#failure-reason-reference).
+
+## How cost is calculated
+
+Every cost in Analytics is an estimate in USD, not a bill from the AI coding tool or the model provider:
+
+- Multica ships a table of published model rates, priced per million tokens separately for input, output, cache reads, and cache writes, and multiplies the reported tokens by it.
+- When the AI coding tool reports its own cost (Grok Build does, for example), that figure is used as is instead of an estimate.
+- Tokens from models missing from the table are still counted, but their cost counts as $0. You can [set custom prices](#custom-prices) for those models from a runtime's usage.
+- Some models charge a higher rate once a prompt passes a certain length. The rolled-up data cannot tell how long each request was, so everything is priced at the standard rate, and such runs may be underestimated.
+
+Tokens are reported by the AI coding tool. When a tool reports none, the run still counts toward run time and runs, but adds no tokens or cost. The current GitHub Copilot CLI, for example, does not include token counts in its output, so agents using it show `≥` and the unreported count on the leaderboard.
+
+## Runtime usage
+
+Open **Runtimes** and go into a runtime's detail page to see that runtime's usage. A private runtime's usage is visible only to its owner; a public runtime's usage is visible to every member.
+
+- At the top are **Cost**, **Cache savings**, and **Tokens**. Cost is compared with the previous period of the same length. Cache savings estimates how much more the cache reads would have cost at the full input rate, with the cache hit rate underneath.
+- **When this runtime spent**: cost or tokens per day or per week. The **Heatmap** view shades a square for each day of the last 26 weeks by its cost, regardless of the time range above.
+- **Cost by agent** and **Cost by model**: which agents and which models the period's cost went to.
+- **Daily breakdown table**: expands into each type of token per date and model.
+
+The runtime page offers `7d`, `30d`, `90d`, and `180d`.
+
+## Custom prices
+
+When the selected range includes models missing from the price table, the runtime's usage shows a notice above the figures saying how many models have no maintained price and that their tokens are excluded from cost. Click **Set custom prices**, enter each model's input, output, cache-read, and cache-write rates in USD per million tokens, and save. Once every model has a price, an **Edit custom prices** button stays there so you can change them later. To remove a model's price, clear all its fields and save, or click the delete button next to it.
+
+<Callout type="info">
+Custom prices are stored only in the browser or desktop app on this device. They are not synced to your account or shared with other workspace members, and they apply to every workspace on this device. Other members still see $0 for those models.
+</Callout>
+
+Custom prices apply only to models missing from the price table; they cannot override a built-in rate, and they never replace a cost the AI coding tool reported itself. After you save, Analytics, runtime usage, and issue Runs dialogs on this device recalculate with the new rates.
+
+## Issue cost
+
+The **Execution log** in each issue's sidebar shows the issue's **Spent**, **Tokens**, and **Agent time**, plus one cost bar per run. Click the total, a cost bar, or **Open timeline** to open the **Runs** dialog:
+
+- The summary at the top shows **Spent**, **Tokens** (and how much came from cache), **Output**, **Agent time**, and **Runs**. Agent time is the sum of the runs' durations; the "elapsed" figure next to it is the time from the first run's start to the last run's end. Next to Runs are the failed, cancelled, and active counts.
+- The chart's **Per run** view draws a bar per run for cost, tokens, or agent time; **Cumulative** draws cumulative cost growing over time.
+- **By agent** and **By model** bands show who and which models the cost went to.
+- Below, runs are listed by day; **Run details** shows a run's cost breakdown and what its cache hits saved.
+
+The bottom of the dialog notes that cost is estimated and names any models without a price.
+
+## From the CLI
+
+```bash
+multica issue usage <issue-id>
+multica runtime usage <runtime-id> --days 30
+```
+
+`issue usage` prints an issue's token totals (input, output, cache read, cache write) and run counts. `RUNS` is the number of finished runs, `METERED_RUNS` how many reported usage, and `UNREPORTED` how many did not; when any run went unreported, token totals carry a `>=` prefix because the real figure can only be higher.
+
+`runtime usage` lists a runtime's tokens per date, provider, and model. `--days` defaults to 90, up to 365.
+
+Neither table includes a cost estimate; add `--output json` for the raw data the API returns.
+
+## Next steps
+
+- [Runs](/tasks) — the execution log, failure reasons, and retries.
+- [Daemon and runtimes](/daemon-runtimes) — which computer a run executes on.
+- [Members and roles](/members-roles) — who can see which agents.
diff --git a/apps/docs/content/docs/analytics.zh.mdx b/apps/docs/content/docs/analytics.zh.mdx
new file mode 100644
index 0000000000..cb9cfc1152
--- /dev/null
+++ b/apps/docs/content/docs/analytics.zh.mdx
@@ -0,0 +1,132 @@
+---
+title: 统计
+description: 查看智能体花了多少钱、用了多少 token、跑了多久,以及哪些运行失败、为什么失败。
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { UsageDemo } from "@/components/demos/usage-demo";
+
+侧边栏的**统计**页汇总整个工作区的智能体用量:费用、token、耗时和运行数,以及失败的运行。工作区成员都能打开它。每个运行时自己的用量在运行时详情页,一条任务花了多少在它的**运行记录**里,见下文。
+
+## 页面结构
+
+页面分**用量**和**错误**两个页签,共用右上角的两个筛选:
+
+- **时间范围**:`1d`、`7d`、`30d`(默认)、`90d`、`180d`。`1d` 指今天,从你所在时区的 0 点算起,不是最近 24 小时。
+- **项目**:默认**全部项目**。选定项目后,只统计这个项目下任务的运行;对话等不属于任何任务的运行不计入。
+
+日期按你的时区切分:先用**设置 → 偏好设置 → 时区**里的设置,没设置时用浏览器时区。页头显示当前时区和数据更新时间。统计数据由服务器每 5 分钟汇总一次,页面开着时也按这个间隔刷新,刚结束的运行可能要过几分钟才出现;想马上看可以点刷新按钮。
+
+切到错误页签后,地址栏会带上 `?tab=errors`,把链接发给同事,对方打开就是错误页签。
+
+## 用量页签
+
+顶部四个数字:
+
+| 卡片 | 内容 |
+| --- | --- |
+| **费用** | 估算的美元费用,算法见[费用怎么算](#费用怎么算) |
+| **Token** | 输入、输出、缓存读取、缓存写入的合计;下面一行单列输入和输出 |
+| **耗时** | 已结束运行的执行时长之和,从开始执行算到结束 |
+| **运行数** | 时间范围内结束的运行,以及其中失败的个数 |
+
+耗时和运行数只算真正开始执行过的运行(已完成、失败或中途取消),排队时就被取消的不算。
+
+趋势卡片在同一条时间轴上切换 Token、费用、耗时、运行数四种指标,**按天**和**按周**两种粒度。`30d` 和 `90d` 两种都能选;`1d`、`7d` 只能按天,`180d` 只能按周。按周时每周从周一开始,还没过完的本周颜色较浅,悬停会标出"未满 · 已过 N / 7 天"。
+
+**排行榜**按智能体列出 Token、费用、耗时和运行数,可以按其中任意一项排序,默认显示前 10 个,点**展开全部**看其余的。排行榜里可能有两行汇总:
+
+- **已删除的智能体**:已经删除的智能体的用量合并成一行,保证各行加起来仍等于顶部合计。
+- **其他智能体**:你看不到的智能体合并成一行。工作区所有者和管理员能看到所有成员创建的智能体;普通成员看不到别人的私有智能体,它们的用量只在这里出现,不显示名字。
+
+某个智能体有运行没上报 token 时,它的 Token 和费用前面会加 `≥`,名字下方注明有几次运行未上报用量。
+
+下面的演示里,运营团队有三个智能体。先看费用趋势,再看谁花得最多,最后在错误页签里找失败原因。
+
+<UsageDemo />
+
+## 错误页签
+
+顶部是**失败运行**、**失败率**和**受影响智能体**。失败率按时间范围内结束的全部运行计算,卡片下方写着分子和分母。
+
+下面依次是:
+
+- **每日错误**(或每周错误):每段颜色是一类失败。
+- **失败构成**:时间范围内全部失败按类别拆分。点**展开错误码**换成原始的失败原因码,可以拿去搜日志或贴到任务里。
+- **问题最多的智能体**:默认按失败数排序,前 8 个之后要展开。按**失败率**排序时,运行不足 10 次的智能体排在后面,因为样本太少,比例参考价值有限。点智能体名字进入它的详情页,能看到最近的运行和每次失败的原因。
+
+失败原因码归成七类:
+
+| 类别 | 包括 | 一般怎么处理 |
+| --- | --- | --- |
+| 认证 | 模型服务认证失败或无权限、缺少 API key 等配置 | 在 AI 编程工具里重新登录,或补齐配置 |
+| 限流 | 限流、容量不足、配额或余额用尽 | 稍后重试,或提高额度 |
+| 超时 | 执行超时、工具长时间无响应、Codex 停滞 | 缩小任务范围,或调整超时设置 |
+| 模型服务 | 模型服务端错误、网络故障、模型不可用、请求被拒 | 稍后重试,或换一个可用模型 |
+| 运行时 | 运行时离线、守护进程重启、排队过期、skill 包下载失败、找不到工具或版本过旧、准备运行环境失败 | 检查执行这次运行的电脑 |
+| 智能体 | 工具进程异常退出、输出无法解析、上下文超出、达到轮次上限、智能体报告无法继续 | 查看执行记录,调整任务后重试 |
+| 其他 | 无法归类的失败 | 查看原始错误码和执行记录 |
+
+每个原因码的含义和处理见[运行 · 失败原因参考](/tasks#失败原因参考)。
+
+## 费用怎么算
+
+统计里的费用都是估算值,单位美元,不是 AI 编程工具或模型服务商的账单:
+
+- Multica 内置一张各模型的公开价目表,按每百万 token 分别给输入、输出、缓存读取和缓存写入定价,用它乘以上报的 token 数。
+- AI 编程工具自己报告了费用时(例如 Grok Build),这部分直接用报告的数字,不再估算。
+- 价目表里没有的模型,token 照常计入,费用按 $0 计算。在运行时的用量里可以给这些模型[设置自定义价格](#自定义价格)。
+- 有些模型的提示超过一定长度后单价会上浮,汇总数据区分不出每次请求的长度,统一按标准价算,这类运行的估算可能偏低。
+
+token 由 AI 编程工具上报。工具没有上报时,这次运行仍计入耗时和运行数,但不计 token 和费用。例如目前的 GitHub Copilot CLI 不在输出中提供 token 数,用它的智能体在排行榜上会显示 `≥` 和未上报的次数。
+
+## 运行时的用量
+
+打开**运行时**,进入某个运行时的详情页,可以看到这个运行时的用量。私有运行时的用量只有所有者能看到,公开运行时的用量所有成员都能看到。
+
+- 顶部是**费用**、**缓存节省**和 **Token**。费用下方是和上一个等长时间段的对比;缓存节省估算缓存读取按原价计费会多花多少,下方是缓存命中率。
+- **这个运行时在何时消耗**:按天或按周显示费用或 Token。切到**热力图**,用方格颜色深浅显示最近 26 周每天的费用,不受上面的时间范围影响。
+- **按智能体分摊**和**按模型分摊**:这段时间的费用分别落在哪些智能体、哪些模型上。
+- **每日明细表**:展开后按日期和模型列出每类 token 的数量。
+
+运行时页的时间范围是 `7d`、`30d`、`90d`、`180d`。
+
+## 自定义价格
+
+所选时间范围里有模型不在价目表中时,运行时的用量上方会提示有几个模型没有维护价格,相关 token 未计入费用。点**设置自定义价格**,为每个模型填入输入、输出、缓存读取和缓存写入的单价,单位是美元 / 百万 token,然后保存。所有模型都有价格后,这里仍保留**编辑自定义价格**按钮,方便以后修改。要移除某个模型的价格,清空它的全部字段再保存,或点它旁边的删除按钮。
+
+<Callout type="info">
+自定义价格只保存在当前这台设备的浏览器或桌面应用里,不同步到账号,也不会分享给工作区其他成员;同一台设备上的所有工作区都会用它。其他成员看到的费用里,这些模型仍按 $0 计算。
+</Callout>
+
+自定义价格只用于价目表里没有的模型,不能覆盖内置价格,也不影响 AI 编程工具自己报告的费用。保存后,这台设备上的统计页、运行时用量和任务的运行记录都会按新价格重新计算。
+
+## 任务的花费
+
+每条任务右侧的**执行日志**会显示这条任务的**已花费**、**Token** 和**智能体工作**时长,以及每次运行一根的费用条。点合计、费用条或**打开时间线**,打开**运行记录**对话框:
+
+- 顶部汇总**已花费**、**Token**(其中多少来自缓存)、**输出**、**智能体工作**和**运行次数**。智能体工作是各次运行时长之和,旁边的"历时"是从第一次运行开始到最后一次结束经过的时间;运行次数旁边列出失败、取消和进行中的次数。
+- 图表切**按次**时每次运行一根柱,可以看费用、Token 或智能体工作;切**累计**时显示累计费用随时间增长的曲线。
+- **按智能体**和**按模型**两条色带显示费用落在谁身上、哪个模型上。
+- 下方按天列出每次运行;展开**运行详情**能看到这次运行的费用明细和缓存命中节省了多少。
+
+对话框底部会注明费用是估算值,以及哪些模型没有价格。
+
+## 用 CLI 查看
+
+```bash
+multica issue usage <issue-id>
+multica runtime usage <runtime-id> --days 30
+```
+
+`issue usage` 输出一条任务的 token 合计(输入、输出、缓存读取、缓存写入)和运行次数。`RUNS` 是已结束的运行数,`METERED_RUNS` 是上报了用量的运行数,`UNREPORTED` 是没有上报的;有运行没上报时,token 数前面带 `>=`,表示实际只会更多。
+
+`runtime usage` 按日期、工具和模型列出一个运行时的 token 用量,`--days` 默认 90,最大 365。
+
+两条命令的表格只有 token,不含费用估算;加 `--output json` 输出接口返回的原始数据。
+
+## 接下来
+
+- [运行](/tasks) — 执行日志、失败原因和重试。
+- [守护进程与运行时](/daemon-runtimes) — 运行时在哪台电脑上执行。
+- [成员与角色](/members-roles) — 谁能看到哪些智能体。
diff --git a/apps/docs/content/docs/assigning-issues.fr.mdx b/apps/docs/content/docs/assigning-issues.fr.mdx
index e7be4925dc..409a22d7fa 100644
--- a/apps/docs/content/docs/assigning-issues.fr.mdx
+++ b/apps/docs/content/docs/assigning-issues.fr.mdx
@@ -4,6 +4,8 @@ description: Confiez une tâche à un agent et décidez s'il commence à travail
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AssignDemo } from "@/components/demos/assign-demo";
Lorsqu'un travail doit être pris en charge par un agent dans la durée, assignez-lui la tâche. L'agent lit la description et la discussion de la tâche, effectue le travail avec sa propre configuration et ses skills, puis consigne l'avancement et les résultats dans la même tâche.
@@ -11,13 +13,27 @@ Si vous avez seulement besoin que l'agent traite une demande précise sans chang
## Assigner et lancer une exécution
-1. Ouvrez une tâche et cliquez sur **Assigné à**.
-2. Choisissez un agent ou un squad.
-3. Vérifiez l'agent sur le point de démarrer dans la boîte de dialogue de confirmation, puis choisissez **Confirmer l'assignation**.
+<Steps>
+<Step>
-![Boîte de dialogue de confirmation de l'assignation : confirmer l'assignation, ou choisir de ne pas démarrer maintenant](/images/docs/assign-confirm-dialog.webp)
+Ouvrez une tâche et cliquez sur **Assigné à**.
-Tout ce que l'agent doit savoir sur ce travail doit figurer dans la tâche elle-même — sa description, sa discussion, ou encore la description du projet et les instructions de l'agent.
+</Step>
+<Step>
+
+Choisissez un agent ou un squad.
+
+</Step>
+<Step>
+
+Vérifiez l'agent sur le point de démarrer dans la boîte de dialogue de confirmation, puis choisissez **Confirmer l'assignation**.
+
+</Step>
+</Steps>
+
+<AssignDemo />
+
+Ce que l'agent doit savoir pour ce travail va dans la description et la discussion de la tâche, ou dans la description du projet et les instructions de l'agent.
Lorsque vous assignez la tâche à un squad, le squad devient l'assigné de la tâche et le chef du squad démarre en premier. Il décide s'il confie le travail à d'autres membres, selon le fonctionnement du squad.
@@ -36,7 +52,7 @@ Pendant l'exécution, l'agent peut :
Ce qu'il peut réellement faire reste limité par la configuration de l'agent, l'environnement du runtime et votre droit de l'exécuter.
-Les agents mettent à jour le statut au fil du travail. Par défaut, ils indiquent le travail en cours au démarrage et la relecture à la livraison. Si le projet utilise un workflow, ils suivent ses étapes et ses consignes. La fin d’une exécution ne termine pas la tâche à elle seule ; répondre à une question ne signifie pas que tout le travail est livré.
+Les agents mettent à jour le statut au fil du travail. Par défaut, ils passent la tâche à En cours au démarrage et à En relecture à la livraison. Si le projet utilise un workflow, ils suivent ses étapes et ses consignes. La fin d’une exécution ne termine pas la tâche à elle seule ; répondre à une question ne signifie pas que tout le travail est livré.
Si le projet passe régulièrement le travail entre plusieurs personnes ou agents, utilisez un [workflow](/workflows) pour organiser les relais. Pour enregistrer une demande fréquente sans changer le responsable, utilisez une [action rapide](/quick-actions).
@@ -46,9 +62,9 @@ Si le projet passe régulièrement le travail entre plusieurs personnes ou agent
`backlog` ne lance pas non plus d'exécution lors de l'assignation. L'exécution ne suit qu'une fois la tâche sortie de `backlog`, ou après une demande adressée à l'assigné dans un commentaire ultérieur.
-Lorsque la tâche a déjà un agent ou un squad comme responsable, la sortir de `backlog` ouvre la même boîte de dialogue : c'est ce changement de statut qui lance l'exécution, elle propose donc le même bouton **Ne pas démarrer maintenant**, qui déplace la tâche sans réveiller l'agent. La boîte de dialogue apparaît pour toute cible autre que `backlog` lui-même et que les statuts des catégories `done` ou `closed`.
+Lorsque la tâche a déjà un agent ou un squad comme responsable, la sortir de `backlog` ouvre la même boîte de dialogue, car c'est ce changement de statut qui lance l'exécution. Elle propose le même bouton **Ne pas démarrer maintenant**, qui change le statut sans réveiller l'agent. La boîte de dialogue apparaît pour toute cible autre que `backlog` lui-même et que les statuts des catégories `done` ou `closed`.
-Seul le statut fixe `backlog` fonctionne ainsi. Un [statut personnalisé](/issues#statuts-personnalisés) de la catégorie `unstarted` ne met **pas** le travail en attente — assigner un agent à une tâche dans ce statut lance immédiatement une exécution. Les tâches déjà en `done` ou `cancelled` lancent quand même une exécution immédiatement lorsqu'elles sont assignées ou réassignées à un agent.
+Seul le statut fixe `backlog` fonctionne ainsi. Un [statut personnalisé](/issues#statuts-personnalisés) de la catégorie `unstarted` ne met **pas** le travail en attente : assigner un agent à une tâche dans ce statut lance immédiatement une exécution. Les tâches déjà en `done` ou `cancelled` lancent quand même une exécution immédiatement lorsqu'elles sont assignées ou réassignées à un agent.
## Droits d'assignation
diff --git a/apps/docs/content/docs/assigning-issues.ja.mdx b/apps/docs/content/docs/assigning-issues.ja.mdx
index c321c1e2f5..a15bf3b07f 100644
--- a/apps/docs/content/docs/assigning-issues.ja.mdx
+++ b/apps/docs/content/docs/assigning-issues.ja.mdx
@@ -4,6 +4,8 @@ description: エージェントにタスクを任せ、すぐに実行を開始
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AssignDemo } from "@/components/demos/assign-demo";
ある作業をエージェントに継続して任せたいときは、タスクをそのエージェントに割り当てます。エージェントはタスクの説明と議論を読み、自身の設定とスキルで作業を進め、進捗と結果を同じタスクに書き戻します。
@@ -11,11 +13,25 @@ import { Callout } from "fumadocs-ui/components/callout";
## 割り当てと実行の開始
-1. タスクを開き、**担当者**をクリックします。
-2. エージェントまたはスクワッドを選択します。
-3. 確認ダイアログで、これから開始するエージェントを確認し、**開始**を選択します。
+<Steps>
+<Step>
-![割り当ての確認ダイアログ:割り当てを確認するか、まだ開始しないことを選べます](/images/docs/assign-confirm-dialog.webp)
+タスクを開き、**担当者**をクリックします。
+
+</Step>
+<Step>
+
+エージェントまたはスクワッドを選択します。
+
+</Step>
+<Step>
+
+確認ダイアログで、これから開始するエージェントを確認し、**割り当てを確認**を選択します。
+
+</Step>
+</Steps>
+
+<AssignDemo />
エージェントに伝えたいことは、タスク本文とその議論、あるいはプロジェクトの説明やエージェントの指示に書きます。
@@ -36,7 +52,7 @@ Multica はエージェントのために[実行](/tasks)を作成します。
実際にできることは、エージェントの設定、ランタイム環境、あなたの実行権限によって制限されます。
-エージェントは作業の進み具合に合わせてステータスを更新します。通常は着手したら進行中、成果を提出したら確認待ちにします。プロジェクトにワークフローがあれば、そのステップと引き継ぎの指示に従います。実行が終わっただけではタスクは完了せず、質問への回答だけで仕事全体の完了にはなりません。
+エージェントは作業の進み具合に合わせてステータスを更新します。通常は着手したら「進行中」、成果を提出したら「レビュー中」にします。プロジェクトにワークフローがあれば、そのステップと引き継ぎの指示に従います。実行が終わっただけではタスクは完了せず、質問への回答だけで仕事全体の完了にはなりません。
複数の担当者が繰り返し仕事を引き継ぐプロジェクトでは、[ワークフロー](/workflows)でステップを決めます。担当者を変えずによく使う依頼を送るなら、[クイックアクション](/quick-actions)に保存します。
@@ -46,7 +62,7 @@ Multica はエージェントのために[実行](/tasks)を作成します。
`backlog` のタスクも、割り当てだけでは実行を開始しません。タスクを `backlog` から移動するか、コメントで担当者に依頼を続けたときに、はじめて後続の実行が生まれます。
-すでにエージェントまたはスカッドの担当者がいるイシューを `backlog` から移動すると、同じ確認ダイアログが開きます。実行を開始するのはこのステータス変更そのものなので、同じ引き継ぎメモを書けますし、**まだ開始しない**も同じように使えます(ステータスだけ変えて、エージェントは起こしません)。この確認ダイアログは、移動先が `backlog` 自体でなく、`done` または `closed` カテゴリのステータスでもない場合に表示されます。
+すでにエージェントまたはスクワッドが担当しているタスクを `backlog` から移動すると、同じ確認ダイアログが開きます。実行を開始するのはこのステータス変更だからです。ここでも **まだ開始しない** を選べば、ステータスだけ変えてエージェントは起こしません。この確認ダイアログは、移動先が `backlog` 自体でなく、`done` または `closed` カテゴリのステータスでもない場合に表示されます。
この挙動は固定の `backlog` ステータスだけです。`unstarted` カテゴリの[カスタムステータス](/issues#カスタムステータス)は作業を保留**しません**。そこにエージェントを割り当てると、すぐに実行が始まります。すでに `done` や `cancelled` にあるタスクは、エージェントに割り当て・再割り当てすると、すぐに実行が開始されます。
diff --git a/apps/docs/content/docs/assigning-issues.ko.mdx b/apps/docs/content/docs/assigning-issues.ko.mdx
index 7f5154d8c6..e7ac0e73c0 100644
--- a/apps/docs/content/docs/assigning-issues.ko.mdx
+++ b/apps/docs/content/docs/assigning-issues.ko.mdx
@@ -4,6 +4,8 @@ description: 에이전트가 태스크를 맡게 하고 즉시 실행을 시작
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AssignDemo } from "@/components/demos/assign-demo";
한 작업을 에이전트가 계속 책임져야 한다면 태스크를 해당 에이전트에게 할당하세요. 에이전트는 태스크의 설명과 논의를 읽고 자신의 설정과 스킬을 사용해 작업한 뒤 진행 상황과 결과를 원래 태스크에 기록합니다.
@@ -11,11 +13,25 @@ import { Callout } from "fumadocs-ui/components/callout";
## 할당하고 실행 시작
-1. 태스크를 열고 **담당자**를 클릭합니다.
-2. 에이전트 또는 스쿼드를 선택합니다.
-3. 확인 창에서 시작될 에이전트를 확인한 뒤 **시작**을 선택합니다.
+<Steps>
+<Step>
-![할당 확인 창: 할당을 확인하거나 지금은 시작하지 않도록 선택할 수 있습니다.](/images/docs/assign-confirm-dialog.webp)
+태스크를 열고 **담당자**를 클릭합니다.
+
+</Step>
+<Step>
+
+에이전트 또는 스쿼드를 선택합니다.
+
+</Step>
+<Step>
+
+확인 창에서 시작될 에이전트를 확인한 뒤 **할당 확인**을 선택합니다.
+
+</Step>
+</Steps>
+
+<AssignDemo />
에이전트가 알아야 할 내용은 태스크 본문과 그 논의, 또는 프로젝트 설명과 에이전트 지시문에 작성하세요.
@@ -36,7 +52,7 @@ Multica가 에이전트의 [실행](/tasks)을 만듭니다. 온라인 런타임
구체적인 기능은 에이전트 설정, 런타임 환경, 사용자의 호출 권한에 따라 제한됩니다.
-에이전트는 작업 진행에 따라 태스크 상태를 업데이트합니다. 보통 시작하면 진행 중으로, 결과를 전달하면 검토 대기로 표시합니다. 프로젝트에 워크플로가 있다면 해당 단계와 인계 지침을 따릅니다. 실행이 끝난 것만으로 태스크가 완료되지는 않으며, 질문에 답한 것만으로 전체 작업을 마친 것도 아닙니다.
+에이전트는 작업 진행에 따라 태스크 상태를 업데이트합니다. 보통 시작하면 '진행 중'으로, 결과를 전달하면 '리뷰 중'으로 바꿉니다. 프로젝트에 워크플로가 있다면 해당 단계와 인계 지침을 따릅니다. 실행이 끝난 것만으로 태스크가 완료되지는 않으며, 질문에 답한 것만으로 전체 작업을 마친 것도 아닙니다.
프로젝트에서 여러 담당자가 반복해서 일을 넘겨받는다면 [워크플로](/workflows)로 단계를 정하세요. 담당자를 바꾸지 않고 자주 쓰는 요청을 보내려면 [퀵 액션](/quick-actions)으로 저장하세요.
@@ -46,9 +62,9 @@ Multica가 에이전트의 [실행](/tasks)을 만듭니다. 온라인 런타임
`backlog` 상태에서도 에이전트를 할당하는 것만으로 실행이 시작되지 않습니다. 태스크를 `backlog`에서 다른 상태로 옮기거나 댓글에서 담당자에게 추가 요청을 해야 이후 실행이 생성됩니다.
-이미 에이전트나 스쿼드 담당자가 있는 이슈를 `backlog` 밖으로 옮기면 같은 확인 대화상자가 열립니다. 실행을 시작하는 것이 바로 이 상태 변경이므로 동일한 인계 메모를 남길 수 있고, **아직 시작 안 함**도 그대로 사용할 수 있습니다(상태만 옮기고 에이전트는 깨우지 않습니다). 이 대화상자는 대상이 `backlog` 자체가 아니고 `done` 또는 `closed` 카테고리의 상태도 아닐 때 나타납니다.
+이미 에이전트나 스쿼드가 담당자인 태스크를 `backlog` 밖으로 옮기면 같은 확인 창이 열립니다. 실행을 시작하는 것이 바로 이 상태 변경이기 때문입니다. 여기서도 **아직 시작 안 함**을 고르면 상태만 바꾸고 에이전트는 깨우지 않습니다. 이 확인 창은 대상이 `backlog` 자체가 아니고 `done` 또는 `closed` 카테고리의 상태도 아닐 때 나타납니다.
-이 효과는 고정된 `backlog` 상태에만 적용됩니다. `unstarted` 카테고리의 [사용자 지정 상태](/issues#사용자-지정-상태)는 작업을 보류하지 **않습니다**. 그곳에 에이전트를 할당하면 곧바로 실행이 시작됩니다. 이미 `done` 또는 `cancelled` 상태인 태스크도 에이전트에게 할당하거나 다시 할당하면 즉시 실행이 시작됩니다.
+이 효과는 고정된 `backlog` 상태에만 적용됩니다. `unstarted` 카테고리의 [사용자 지정 상태](/issues#사용자-정의-상태)는 작업을 보류하지 **않습니다**. 그곳에 에이전트를 할당하면 곧바로 실행이 시작됩니다. 이미 `done` 또는 `cancelled` 상태인 태스크도 에이전트에게 할당하거나 다시 할당하면 즉시 실행이 시작됩니다.
## 할당 권한
diff --git a/apps/docs/content/docs/assigning-issues.mdx b/apps/docs/content/docs/assigning-issues.mdx
index a5c61e354e..fc1516b39d 100644
--- a/apps/docs/content/docs/assigning-issues.mdx
+++ b/apps/docs/content/docs/assigning-issues.mdx
@@ -4,6 +4,8 @@ description: Put an agent in charge of an issue and decide whether it starts wor
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AssignDemo } from "@/components/demos/assign-demo";
When a piece of work needs an agent to own it over time, assign the issue to it. The agent reads the issue's description and discussion, does the work with its own configuration and skills, and writes progress and results back to the same issue.
@@ -11,13 +13,27 @@ When you only need the agent to handle one specific request without changing own
## Assign and start a run
-1. Open an issue and click **Assignee**.
-2. Pick an agent or a squad.
-3. Review the agent about to start in the confirmation dialog, then choose **Start**.
+<Steps>
+<Step>
-![Assignment confirmation dialog: confirm the assignment, or choose not to start yet](/images/docs/assign-confirm-dialog.webp)
+Open an issue and click **Assignee**.
-Everything the agent should know about this work belongs in the issue itself — its description, its discussion, or the project description and agent instructions.
+</Step>
+<Step>
+
+Pick an agent or a squad.
+
+</Step>
+<Step>
+
+Review the agent about to start in the confirmation dialog, then choose **Confirm assignment**.
+
+</Step>
+</Steps>
+
+<AssignDemo />
+
+Whatever the agent needs to know for this work goes in the issue's description and discussion, or in the project description and agent instructions.
When you assign to a squad, the squad becomes the issue's assignee and the squad leader starts first. It decides whether to hand work to other members, following how the squad operates.
@@ -36,7 +52,7 @@ While executing, the agent can:
What it can actually do is still limited by the agent's configuration, the runtime environment, and your permission to run it.
-Agents update the issue’s status as work progresses. By default, they mark work in progress when they begin and ready for review when they deliver. When a project has a workflow, they follow its steps and handoff instructions instead. A run ending does not complete the issue by itself; answering a question does not mean the issue’s work is finished.
+Agents update the issue’s status as work progresses. By default, they move the issue to In Progress when they begin and to In Review when they deliver. When a project has a workflow, they follow its steps and handoff instructions instead. A run ending does not complete the issue by itself; answering a question does not mean the issue’s work is finished.
For a project that repeatedly passes work between people or agents, use a [workflow](/workflows) to arrange the handoffs. To save a request you often send without changing the assignee, use a [quick action](/quick-actions).
@@ -46,9 +62,9 @@ For a project that repeatedly passes work between people or agents, use a [workf
`backlog` doesn't start a run on assignment either. Execution only follows after you move the issue out of `backlog`, or ask the assignee for something in a follow-up comment.
-When the issue already has an agent or squad owner, moving it out of `backlog` opens the same dialog: that status change is what starts the run, so it offers the same **Don't start yet**, which moves the issue without waking the agent. The dialog appears for every target other than `backlog` itself and any status in the `done` or `closed` category.
+When the issue already has an agent or squad owner, moving it out of `backlog` opens the same dialog, because that status change is what starts the run. It offers the same **Don't start yet**, which changes the status without waking the agent. The dialog appears for every target other than `backlog` itself and any status in the `done` or `closed` category.
-Only the fixed `backlog` status works this way. A [custom status](/issues#custom-statuses) in the `unstarted` category does **not** park work — assigning an agent to an issue there starts a run right away. Issues already in `done` or `cancelled` still start a run immediately when assigned or reassigned to an agent.
+Only the fixed `backlog` status works this way. A [custom status](/issues#custom-statuses) in the `unstarted` category does **not** park work: assigning an agent to an issue there starts a run right away. Issues already in `done` or `cancelled` still start a run immediately when assigned or reassigned to an agent.
## Assignment permissions
diff --git a/apps/docs/content/docs/assigning-issues.zh.mdx b/apps/docs/content/docs/assigning-issues.zh.mdx
index 911fd36d49..20d84f604e 100644
--- a/apps/docs/content/docs/assigning-issues.zh.mdx
+++ b/apps/docs/content/docs/assigning-issues.zh.mdx
@@ -4,6 +4,8 @@ description: 让智能体负责一条任务,并决定是否立即开始执行
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AssignDemo } from "@/components/demos/assign-demo";
当一项工作需要由智能体持续负责时,把任务分配给它。智能体会读取任务的说明和讨论,使用自己的配置与 skill 完成工作,并把进展和结果写回原来的任务。
@@ -11,13 +13,27 @@ import { Callout } from "fumadocs-ui/components/callout";
## 分配并开始执行
-1. 打开一条任务,点击**负责人**。
-2. 选择一个智能体或小队。
-3. 在确认窗口中检查即将启动的智能体,然后选择**开始**。
+<Steps>
+<Step>
-![分配确认窗:确认分配,或选择暂不开始](/images/docs/assign-confirm-dialog.webp)
+打开一条任务,点击**负责人**。
-这次执行需要智能体知道的信息,都写在任务本身——它的说明、讨论,或者项目说明与智能体指令中。
+</Step>
+<Step>
+
+选择一个智能体或小队。
+
+</Step>
+<Step>
+
+在确认窗口中检查即将启动的智能体,然后选择**确认指派**。
+
+</Step>
+</Steps>
+
+<AssignDemo />
+
+智能体这次需要知道的信息,要写在任务的说明和讨论里,或者写进项目说明和智能体指令。
分配给小队时,任务的负责人是小队,首先开始执行的是小队 leader。它会按照小队的工作方式判断是否需要交给其他成员。
@@ -36,7 +52,7 @@ Multica 会为智能体创建一条[运行](/tasks)。在线运行时领取运
具体能力仍受智能体配置、运行时环境和你的调用权限限制。
-智能体会随工作进展更新任务状态。默认情况下,开始工作时标记为进行中,交付后标记为等待检查;项目使用工作流时,则按其中的步骤和交接说明推进。一次运行结束不等于任务完成,仅回答一个问题也不表示任务本身的工作已经交付。
+智能体会随工作进展更新任务状态。默认情况下,开始工作时改为进行中,交付后改为审核中;项目使用工作流时,则按其中的步骤和交接说明推进。一次运行结束不等于任务完成,仅回答一个问题也不表示任务本身的工作已经交付。
项目经常需要在成员或智能体之间交接时,可以用[工作流](/workflows)安排每一步。只是经常发送同一类请求、希望保留原负责人时,可以保存成[快捷操作](/quick-actions)。
@@ -46,9 +62,9 @@ Multica 会为智能体创建一条[运行](/tasks)。在线运行时领取运
`backlog` 也不会因为分配智能体而启动执行。把任务移出 `backlog`,或者在评论中继续向负责人提出要求后,才会产生后续执行。
-如果任务已经有智能体或小队负责人,把它移出 `backlog` 会弹出同一个确认窗:真正启动执行的正是这次状态变更,所以同样有**暂不开始**——只改状态,不叫醒智能体。只要目标不是 `backlog` 本身,也不属于 `done` 或 `closed` 分类,都会弹这个确认窗。
+如果任务已经有智能体或小队负责人,把它移出 `backlog` 也会弹出同一个确认窗,因为启动执行的是这次状态变更。窗里同样有**暂不开始**:只改状态,不叫醒智能体。只要目标不是 `backlog` 本身,也不属于 `done` 或 `closed` 分类,都会弹这个确认窗。
-只有固定的 `backlog` 状态有这个效果。`unstarted` 分类下的[自定义状态](/issues#自定义状态)**不会**停住工作——把智能体分配到那里会立刻启动执行。已经处于 `done` 或 `cancelled` 的任务,分配或重新分配给智能体时同样会立即开始执行。
+只有固定的 `backlog` 状态有这个效果。`unstarted` 分类下的[自定义状态](/issues#自定义状态)**不会**停住工作,把智能体分配到那里会立刻启动执行。已经处于 `done` 或 `cancelled` 的任务,分配或重新分配给智能体时同样会立即开始执行。
## 分配权限
diff --git a/apps/docs/content/docs/auth-setup.fr.mdx b/apps/docs/content/docs/auth-setup.fr.mdx
index b6921d64b9..4dc53c17ab 100644
--- a/apps/docs/content/docs/auth-setup.fr.mdx
+++ b/apps/docs/content/docs/auth-setup.fr.mdx
@@ -4,6 +4,7 @@ description: Configurez les codes de vérification par e-mail, la connexion avec
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Par défaut, Multica connecte les utilisateurs au moyen de codes de vérification envoyés par e-mail ; Google OAuth peut être ajouté en complément. Les utilisateurs existants peuvent toujours se reconnecter — les restrictions d'inscription décident uniquement si de nouveaux comptes peuvent être créés.
@@ -15,15 +16,28 @@ Les e-mails peuvent être envoyés via Resend ou SMTP. Lorsque les deux sont con
### Utiliser Resend
-1. Vérifiez un domaine d'envoi et créez une clé d'API sur [Resend](https://resend.com/).
-2. Définissez :
+<Steps>
+<Step>
- ```dotenv
- RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
- ```
+Vérifiez un domaine d'envoi et créez une clé d'API sur [Resend](https://resend.com/).
-3. Redémarrez le service API.
+</Step>
+<Step>
+
+Définissez :
+
+```dotenv
+RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
+```
+
+</Step>
+<Step>
+
+Redémarrez le service API.
+
+</Step>
+</Steps>
`RESEND_FROM_EMAIL` doit appartenir à un domaine déjà vérifié dans Resend.
@@ -57,7 +71,7 @@ SMTP_EHLO_NAME=mail.example.com
### Comportement sans service d'e-mail
-Le serveur démarre quand même, mais les codes de vérification et les liens d'invitation sont uniquement écrits dans le journal ; aucun e-mail n'est envoyé. Cela convient au développement local, pas à la production.
+Le serveur démarre quand même, mais les codes de vérification et les liens d'invitation sont uniquement écrits dans le journal ; aucun e-mail n'est envoyé. Ce mode ne convient qu'au développement local.
Le journal de démarrage indique si le mode actuel est `Resend API`, `SMTP relay` ou `DEV mode`.
@@ -78,22 +92,38 @@ N'activez pas de code fixe sur une instance accessible publiquement. La combinai
## Connexion avec Google
-1. Créez un client OAuth 2.0 dans la [Google Cloud Console](https://console.cloud.google.com/).
-2. Ajoutez l'URL de rappel du frontend Multica dans **Authorized redirect URIs** (« URI de redirection autorisés » dans la console en français) :
+<Steps>
+<Step>
+
+Créez un client OAuth 2.0 dans la [Google Cloud Console](https://console.cloud.google.com/).
- ```text
- https://multica.example.com/auth/callback
- ```
+</Step>
+<Step>
+
+Ajoutez l'URL de rappel du frontend Multica dans **Authorized redirect URIs** (« URI de redirection autorisés » dans la console en français) :
+
+```text
+https://multica.example.com/auth/callback
+```
+
+</Step>
+<Step>
+
+Définissez :
+
+```dotenv
+GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
+GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
+GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
+```
-3. Définissez :
+</Step>
+<Step>
- ```dotenv
- GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
- GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
- ```
+Redémarrez le service API.
-4. Redémarrez le service API.
+</Step>
+</Steps>
Les URL indiquées dans la Google Console et dans `GOOGLE_REDIRECT_URI` doivent correspondre exactement, y compris le protocole, le port et la barre oblique finale. Une fois la configuration terminée, la page de connexion affiche un bouton **Continuer avec Google** ; l'image du frontend n'a pas besoin d'être reconstruite.
@@ -144,7 +174,7 @@ La révocation d'une invitation ne supprime pas un compte déjà créé grâce
Les sessions sont glissantes. La durée de vie ci-dessous est une limite d'**inactivité**, et non un compte à rebours depuis la connexion : dès qu'il reste moins de la moitié de cette durée à une session, la requête suivante la réémet avec une durée de vie complète, si bien qu'un compte utilisé en continu n'est jamais déconnecté selon un calendrier fixe. Il n'y a pas de plafond absolu.
-Cette limite est asymétrique. Une session n'est réémise qu'une fois passée la moitié de sa durée de vie ; une session utilisée pour la dernière fois alors qu'il lui restait plus de la moitié de sa durée de vie n'est donc pas prolongée — la période d'inactivité toujours tolérée correspond à la moitié de la valeur ci-dessous, et non à sa totalité.
+Cette limite est asymétrique. Une session n'est réémise qu'une fois passée la moitié de sa durée de vie ; une session utilisée pour la dernière fois alors qu'il lui restait plus de la moitié de sa durée de vie n'est donc pas prolongée. La période d'inactivité garantie ne représente que la moitié de la valeur ci-dessous.
Ajustez-la avec `AUTH_TOKEN_TTL`, qui accepte une durée Go ou un nombre entier positif de secondes :
@@ -154,7 +184,7 @@ AUTH_TOKEN_TTL=720h
La valeur minimale est `60s` ; toute valeur plus courte est ramenée à ce minimum et un avertissement est journalisé au démarrage. En dessous, la cadence de renouvellement que le serveur en déduit passerait sous le plancher que les clients lui appliquent, et les clients vérifieraient le renouvellement moins souvent que la session ne peut survivre.
-Redémarrez le service API après l'avoir modifiée. La valeur s'applique aux sessions émises ou réémises ensuite — comme les sessions sont glissantes, une session existante adopte la nouvelle durée de vie lors de sa prochaine réémission.
+Redémarrez le service API après l'avoir modifiée. La valeur s'applique aux sessions émises ou réémises ensuite. Comme les sessions sont glissantes, une session existante adopte la nouvelle durée de vie lors de sa prochaine réémission.
## Étapes suivantes
diff --git a/apps/docs/content/docs/auth-setup.ja.mdx b/apps/docs/content/docs/auth-setup.ja.mdx
index 01f41c3e74..e697c8d6d8 100644
--- a/apps/docs/content/docs/auth-setup.ja.mdx
+++ b/apps/docs/content/docs/auth-setup.ja.mdx
@@ -4,6 +4,7 @@ description: メール認証コード、Google ログイン、新規登録の範
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica はデフォルトでメール認証コードによるログインを使い、Google OAuth を追加することもできます。既存のユーザーはいつでも再ログインできます。サインアップ制限は、新しいアカウントを作成できるかどうかだけを決めます。
@@ -15,15 +16,28 @@ Multica はデフォルトでメール認証コードによるログインを使
### Resend を使う
-1. [Resend](https://resend.com/) で送信ドメインを検証し、API key を作成します。
-2. 次を設定します:
+<Steps>
+<Step>
- ```dotenv
- RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
- ```
+[Resend](https://resend.com/) で送信ドメインを検証し、API key を作成します。
-3. API サービスを再起動します。
+</Step>
+<Step>
+
+次を設定します:
+
+```dotenv
+RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
+```
+
+</Step>
+<Step>
+
+API サービスを再起動します。
+
+</Step>
+</Steps>
`RESEND_FROM_EMAIL` は、Resend で検証済みのドメインに属している必要があります。
@@ -57,7 +71,7 @@ SMTP_EHLO_NAME=mail.example.com
### メールサービスがない場合の動作
-サーバーは起動しますが、認証コードと招待リンクはログに書き込まれるだけで、メールは送信されません。ローカル開発には向きますが、プロダクションには向きません。
+サーバーは起動しますが、認証コードと招待リンクはログに書き込まれるだけで、メールは送信されません。このモードはローカル開発専用です。
起動ログには、現在使っているのが `Resend API`、`SMTP relay`、`DEV mode` のどれかが表示されます。
@@ -78,22 +92,38 @@ MULTICA_DEV_VERIFICATION_CODE=888888
## Google ログイン
-1. [Google Cloud Console](https://console.cloud.google.com/) で OAuth 2.0 client を作成します。
-2. Multica フロントエンドのコールバックアドレスを **Authorized redirect URIs** に追加します:
+<Steps>
+<Step>
+
+[Google Cloud Console](https://console.cloud.google.com/) で OAuth 2.0 client を作成します。
- ```text
- https://multica.example.com/auth/callback
- ```
+</Step>
+<Step>
+
+Multica フロントエンドのコールバックアドレスを **Authorized redirect URIs** に追加します:
+
+```text
+https://multica.example.com/auth/callback
+```
+
+</Step>
+<Step>
+
+次を設定します:
+
+```dotenv
+GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
+GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
+GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
+```
-3. 次を設定します:
+</Step>
+<Step>
- ```dotenv
- GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
- GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
- ```
+API サービスを再起動します。
-4. API サービスを再起動します。
+</Step>
+</Steps>
Google Console と `GOOGLE_REDIRECT_URI` のアドレスは、プロトコル、ポート、末尾のスラッシュを含めて完全に一致している必要があります。設定が反映されると、ログインページに Google ログインボタンが表示されます。フロントエンドイメージの再ビルドは不要です。
@@ -144,7 +174,7 @@ [email protected]
セッションはスライド更新されます。以下の値はサインインからのカウントダウンではなく、**アイドル**の上限です。残り有効期間が半分を下回ると、次のリクエストで完全な有効期間に再発行されるため、使い続けているアカウントが定期的にサインアウトされることはありません。絶対的な上限はありません。
-この上限は片側のみです。半分を下回ってからでないと再発行されないため、最後の利用時点で半分以上残っていたセッションは延長されません。常に耐えられるアイドル時間は、以下の値の半分です。
+この上限は片側のみです。半分を下回ってからでないと再発行されないため、最後の利用時点で半分以上残っていたセッションは延長されません。確実に維持されるアイドル時間は、以下の値の半分だけです。
`AUTH_TOKEN_TTL` で調整でき、Go duration または正の整数秒を受け付けます:
diff --git a/apps/docs/content/docs/auth-setup.ko.mdx b/apps/docs/content/docs/auth-setup.ko.mdx
index 85e18474c8..64d18d0aa8 100644
--- a/apps/docs/content/docs/auth-setup.ko.mdx
+++ b/apps/docs/content/docs/auth-setup.ko.mdx
@@ -4,6 +4,7 @@ description: 이메일 인증 코드, Google 로그인, 신규 사용자 가입
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica는 기본적으로 이메일 인증 코드로 로그인하며 Google OAuth를 추가할 수도 있습니다. 기존 사용자는 언제든 다시 로그인할 수 있습니다. 가입 제한은 새 계정을 만들 수 있는지만 결정합니다.
@@ -15,15 +16,28 @@ Multica는 기본적으로 이메일 인증 코드로 로그인하며 Google OAu
### Resend 사용
-1. [Resend](https://resend.com/)에서 발신 도메인을 인증하고 API key를 만듭니다.
-2. 다음을 설정합니다.
+<Steps>
+<Step>
- ```dotenv
- RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
- ```
+[Resend](https://resend.com/)에서 발신 도메인을 인증하고 API key를 만듭니다.
-3. API 서비스를 다시 시작합니다.
+</Step>
+<Step>
+
+다음을 설정합니다.
+
+```dotenv
+RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
+```
+
+</Step>
+<Step>
+
+API 서비스를 다시 시작합니다.
+
+</Step>
+</Steps>
`RESEND_FROM_EMAIL`은 Resend에서 인증한 도메인에 속해야 합니다.
@@ -57,7 +71,7 @@ SMTP_EHLO_NAME=mail.example.com
### 이메일 서비스가 없을 때의 동작
-서버는 계속 시작되지만 인증 코드와 초대 링크가 이메일로 전송되지 않고 로그에만 기록됩니다. 로컬 개발에는 적합하지만 프로덕션 환경에는 적합하지 않습니다.
+서버는 계속 시작되지만 인증 코드와 초대 링크가 이메일로 전송되지 않고 로그에만 기록됩니다. 이 모드는 로컬 개발에만 적합합니다.
시작 로그에는 현재 `Resend API`, `SMTP relay`, `DEV mode` 중 무엇을 사용하는지 표시됩니다.
@@ -78,22 +92,38 @@ MULTICA_DEV_VERIFICATION_CODE=888888
## Google 로그인
-1. [Google Cloud Console](https://console.cloud.google.com/)에서 OAuth 2.0 client를 만듭니다.
-2. Multica 프런트엔드의 callback 주소를 **Authorized redirect URIs**에 추가합니다.
+<Steps>
+<Step>
+
+[Google Cloud Console](https://console.cloud.google.com/)에서 OAuth 2.0 client를 만듭니다.
- ```text
- https://multica.example.com/auth/callback
- ```
+</Step>
+<Step>
+
+Multica 프런트엔드의 callback 주소를 **Authorized redirect URIs**에 추가합니다.
+
+```text
+https://multica.example.com/auth/callback
+```
+
+</Step>
+<Step>
+
+다음을 설정합니다.
+
+```dotenv
+GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
+GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
+GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
+```
-3. 다음을 설정합니다.
+</Step>
+<Step>
- ```dotenv
- GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
- GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
- ```
+API 서비스를 다시 시작합니다.
-4. API 서비스를 다시 시작합니다.
+</Step>
+</Steps>
Google Console과 `GOOGLE_REDIRECT_URI`의 주소는 프로토콜, 포트, 마지막 슬래시까지 완전히 같아야 합니다. 설정이 적용되면 로그인 페이지에 Google 로그인 버튼이 표시됩니다. 프런트엔드 이미지를 다시 빌드할 필요는 없습니다.
@@ -144,7 +174,7 @@ [email protected]
세션은 슬라이딩 갱신됩니다. 아래 값은 로그인 시점부터의 카운트다운이 아니라 **유휴** 한도입니다. 남은 유효 기간이 절반 아래로 내려가면 다음 요청에서 전체 기간으로 다시 발급되므로, 계속 사용하는 계정이 주기적으로 로그아웃되지 않습니다. 절대 상한은 없습니다.
-이 한도는 한쪽 방향으로만 적용됩니다. 절반 아래로 내려간 뒤에야 다시 발급되므로, 마지막 사용 시점에 절반 이상 남아 있던 세션은 연장되지 않습니다. 항상 견딜 수 있는 유휴 시간은 아래 값의 절반입니다.
+이 한도는 한쪽 방향으로만 적용됩니다. 절반 아래로 내려간 뒤에야 다시 발급되므로, 마지막 사용 시점에 절반 이상 남아 있던 세션은 연장되지 않습니다. 확실히 유지되는 유휴 시간은 아래 값의 절반뿐입니다.
`AUTH_TOKEN_TTL`로 조정할 수 있으며 Go duration 또는 양의 정수 초를 지원합니다.
diff --git a/apps/docs/content/docs/auth-setup.mdx b/apps/docs/content/docs/auth-setup.mdx
index 52fe3e2178..dfc10a9ad3 100644
--- a/apps/docs/content/docs/auth-setup.mdx
+++ b/apps/docs/content/docs/auth-setup.mdx
@@ -4,6 +4,7 @@ description: Configure email verification codes, Google sign-in, and who can sig
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica signs users in with email verification codes by default; Google OAuth can be added on top. Existing users can always sign in again — signup restrictions only decide whether new accounts can be created.
@@ -15,15 +16,28 @@ Email can be delivered through Resend or SMTP. When both are configured, `SMTP_H
### Using Resend
-1. Verify a sending domain and create an API key at [Resend](https://resend.com/).
-2. Set:
+<Steps>
+<Step>
- ```dotenv
- RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
- ```
+Verify a sending domain and create an API key at [Resend](https://resend.com/).
-3. Restart the API service.
+</Step>
+<Step>
+
+Set:
+
+```dotenv
+RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
+```
+
+</Step>
+<Step>
+
+Restart the API service.
+
+</Step>
+</Steps>
`RESEND_FROM_EMAIL` must belong to a domain already verified in Resend.
@@ -57,7 +71,7 @@ SMTP_EHLO_NAME=mail.example.com
### Behavior without an email service
-The server still starts, but verification codes and invitation links are only written to the log; no email is sent. This suits local development, not production.
+The server still starts, but verification codes and invitation links are only written to the log; no email is sent. This mode is only suitable for local development.
The startup log states whether the current mode is `Resend API`, `SMTP relay`, or `DEV mode`.
@@ -78,22 +92,38 @@ Do not enable a fixed code on a publicly reachable instance. The production comb
## Google sign-in
-1. Create an OAuth 2.0 client in the [Google Cloud Console](https://console.cloud.google.com/).
-2. Add the Multica frontend's callback URL to **Authorized redirect URIs**:
+<Steps>
+<Step>
+
+Create an OAuth 2.0 client in the [Google Cloud Console](https://console.cloud.google.com/).
- ```text
- https://multica.example.com/auth/callback
- ```
+</Step>
+<Step>
+
+Add the Multica frontend's callback URL to **Authorized redirect URIs**:
+
+```text
+https://multica.example.com/auth/callback
+```
+
+</Step>
+<Step>
+
+Set:
+
+```dotenv
+GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
+GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
+GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
+```
-3. Set:
+</Step>
+<Step>
- ```dotenv
- GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
- GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
- ```
+Restart the API service.
-4. Restart the API service.
+</Step>
+</Steps>
The URLs in the Google Console and in `GOOGLE_REDIRECT_URI` must match exactly, including protocol, port, and trailing slash. Once configured, the sign-in page shows a Google sign-in button; the frontend image needs no rebuild.
@@ -144,7 +174,7 @@ Revoking an invitation does not delete an account already created using it or pr
Sessions slide. The lifetime below is an **idle** bound, not a countdown from sign-in: once a session drops below half of it, the next request re-issues it with a full lifetime again, so an account in continuous use is never signed out on a schedule. There is no absolute cap.
-The bound is one-sided. A session is only re-issued once it is past the halfway point, so a session last used while it still had more than half its lifetime left is not extended — the idle gap that is always survivable is half the value below, not all of it.
+The bound is one-sided. A session is only re-issued once it is past the halfway point, so a session last used while it still had more than half its lifetime left is not extended. The idle gap a session is guaranteed to survive is only half the value below.
Adjust with `AUTH_TOKEN_TTL`, which accepts a Go duration or a positive integer of seconds:
@@ -154,7 +184,7 @@ AUTH_TOKEN_TTL=720h
The minimum is `60s`; anything shorter is clamped up to it and logs a warning at startup. Below that, the renewal cadence the server derives would fall under the floor clients apply to it, and clients would check for renewal less often than the session can survive.
-Restart the API service after changing it. The value applies to sessions issued or re-issued afterwards — because sessions slide, an existing session picks up the new lifetime the next time it is re-issued.
+Restart the API service after changing it. The value applies to sessions issued or re-issued afterwards. Because sessions slide, an existing session picks up the new lifetime the next time it is re-issued.
## Next steps
diff --git a/apps/docs/content/docs/auth-setup.zh.mdx b/apps/docs/content/docs/auth-setup.zh.mdx
index bf1f5d30d4..9864686772 100644
--- a/apps/docs/content/docs/auth-setup.zh.mdx
+++ b/apps/docs/content/docs/auth-setup.zh.mdx
@@ -4,6 +4,7 @@ description: 配置邮箱验证码、Google 登录和新用户注册范围。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica 默认使用邮箱验证码登录,也可以增加 Google OAuth。已经存在的用户始终可以再次登录;注册限制只决定是否允许创建新账号。
@@ -15,15 +16,28 @@ Multica 默认使用邮箱验证码登录,也可以增加 Google OAuth。已
### 使用 Resend
-1. 在 [Resend](https://resend.com/) 验证发信域名并创建 API key。
-2. 设置:
+<Steps>
+<Step>
- ```dotenv
- RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
- ```
+在 [Resend](https://resend.com/) 验证发信域名并创建 API key。
-3. 重启 API 服务。
+</Step>
+<Step>
+
+设置:
+
+```dotenv
+RESEND_API_KEY=re_xxxxxxxxxxxxxxxx
+```
+
+</Step>
+<Step>
+
+重启 API 服务。
+
+</Step>
+</Steps>
`RESEND_FROM_EMAIL` 必须属于已经在 Resend 验证的域名。
@@ -57,7 +71,7 @@ SMTP_EHLO_NAME=mail.example.com
### 无邮件服务时的行为
-服务器仍可启动,但验证码和邀请链接只会写入日志,不会发送邮件。这适合本地开发,不适合生产环境。
+服务器仍可启动,但验证码和邀请链接只会写入日志,不会发送邮件。这种模式只适合本地开发。
启动日志会说明当前使用的是 `Resend API`、`SMTP relay` 还是 `DEV mode`。
@@ -78,22 +92,38 @@ MULTICA_DEV_VERIFICATION_CODE=888888
## Google 登录
-1. 在 [Google Cloud Console](https://console.cloud.google.com/) 创建 OAuth 2.0 client。
-2. 把 Multica 前端的回调地址加入 **Authorized redirect URIs**:
+<Steps>
+<Step>
+
+在 [Google Cloud Console](https://console.cloud.google.com/) 创建 OAuth 2.0 client。
- ```text
- https://multica.example.com/auth/callback
- ```
+</Step>
+<Step>
+
+把 Multica 前端的回调地址加入 **Authorized redirect URIs**:
+
+```text
+https://multica.example.com/auth/callback
+```
+
+</Step>
+<Step>
+
+设置:
+
+```dotenv
+GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
+GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
+GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
+```
-3. 设置:
+</Step>
+<Step>
- ```dotenv
- GOOGLE_CLIENT_ID=xxxxx.apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxx
- GOOGLE_REDIRECT_URI=https://multica.example.com/auth/callback
- ```
+重启 API 服务。
-4. 重启 API 服务。
+</Step>
+</Steps>
Google Console 与 `GOOGLE_REDIRECT_URI` 中的地址必须完全一致,包括协议、端口和结尾斜杠。配置生效后,登录页会出现 Google 登录按钮;前端镜像不需要重新构建。
@@ -142,9 +172,9 @@ [email protected]
## 登录有效期
-会话会滑动续期。下面这个值是**闲置**上限,不是从登录开始倒计时:会话剩余有效期低于一半时,下一个请求就会把它续到完整有效期,所以持续使用的账号不会被定时踢出。没有绝对上限。
+会话会滑动续期。下面这个值是**闲置**上限,不从登录时刻开始倒计时:会话剩余有效期低于一半时,下一个请求就会把它续到完整有效期,所以持续使用的账号不会被定时踢出。没有绝对上限。
-这个上限是单边的。只有掉到一半以下才会续期,因此最后一次使用时仍有超过一半有效期的会话不会被延长 —— 能保证活下来的闲置时长是下面这个值的一半,而不是全部。
+这个上限是单边的。只有掉到一半以下才会续期,因此最后一次使用时仍有超过一半有效期的会话不会被延长。能保证存活的闲置时长只有下面这个值的一半。
可以用 `AUTH_TOKEN_TTL` 调整,支持 Go duration 或正整数秒数:
@@ -154,7 +184,7 @@ AUTH_TOKEN_TTL=720h
最小值是 `60s`,更小的取值会被上调到 `60s` 并在启动时打出警告。低于这个值时,服务端算出的续期检查间隔会低于客户端对它设置的下限,客户端的检查频率就会低于会话能存活的时长。
-修改后需要重启 API 服务。这个值对之后签发或续期的会话生效 —— 因为会话会滑动续期,已有会话会在下次续期时用上新的有效期。
+修改后需要重启 API 服务。这个值对之后签发或续期的会话生效。会话会滑动续期,所以已有会话会在下次续期时用上新的有效期。
## 接下来
diff --git a/apps/docs/content/docs/auth-tokens.zh.mdx b/apps/docs/content/docs/auth-tokens.zh.mdx
index d7c6160ed4..7cdf0667e0 100644
--- a/apps/docs/content/docs/auth-tokens.zh.mdx
+++ b/apps/docs/content/docs/auth-tokens.zh.mdx
@@ -56,15 +56,15 @@ multica login --token
export MULTICA_TOKEN='mul_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
curl https://api.multica.ai/api/me \
- -H "Authorization: Bearer $MULTICA_TOKEN"
+ -H "Authorization: Bearer $MULTICA_TOKEN"
```
调用工作区级 API 时,还需要按接口要求提供工作区:
```bash
curl https://api.multica.ai/api/issues \
- -H "Authorization: Bearer $MULTICA_TOKEN" \
- -H "X-Workspace-ID: $MULTICA_WORKSPACE_ID"
+ -H "Authorization: Bearer $MULTICA_TOKEN" \
+ -H "X-Workspace-ID: $MULTICA_WORKSPACE_ID"
```
脚本中的令牌取自 secret manager 或受保护的环境变量,不要硬编码。自托管实例把域名替换为自己的公开 API 地址。
@@ -79,7 +79,7 @@ curl https://api.multica.ai/api/issues \
守护进程领取运行后,服务器会为这次执行创建一个以 `mat_` 开头的临时令牌。它绑定当前用户、工作区、智能体和运行,最长有效 24 小时,并在运行结束时清理。
-守护进程把这个临时令牌注入 AI 编程工具,而不是把用户 PAT 交给智能体。因此,智能体发出的请求会记录为智能体行为,也不能借此调用只允许用户或 owner 执行的敏感操作。
+守护进程把这个临时令牌注入 AI 编程工具,不会把用户 PAT 交给智能体。所以智能体发出的请求会记录为智能体行为,也不能借此调用只允许用户或 owner 执行的敏感操作。
这类令牌由服务器自动创建,用户不需要保存或管理。
diff --git a/apps/docs/content/docs/autopilots.fr.mdx b/apps/docs/content/docs/autopilots.fr.mdx
index d9d013a2ab..248c3d840a 100644
--- a/apps/docs/content/docs/autopilots.fr.mdx
+++ b/apps/docs/content/docs/autopilots.fr.mdx
@@ -4,10 +4,15 @@ description: Confiez automatiquement le travail récurrent aux agents, selon une
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AutopilotDemo } from "@/components/demos/autopilot-demo";
-Les automatisations prennent en charge le travail qui revient sans cesse — un résumé quotidien de l'avancement, une vérification périodique des dépendances, ou un agent lancé par un événement provenant d'un système externe.
+Un résumé quotidien de l'avancement, une vérification périodique des dépendances, un agent lancé par un événement venu d'un système externe : le travail qui revient sans cesse se confie à une automatisation.
-Chaque automatisation enregistre une procédure, un assigné et un ou plusieurs déclencheurs. Lorsqu'elle est déclenchée, Multica crée une tâche ou exécute directement l'agent, et conserve une trace de chaque exécution.
+Chaque automatisation enregistre une procédure, un assigné et un ou plusieurs déclencheurs. Lorsqu'elle est déclenchée, Multica crée une tâche ou exécute directement l'agent, et chaque exécution laisse une trace.
+
+## Automatisations et réveils de tâches [#vs-wakeups]
+
+Une automatisation lance du travail nouveau à partir d'un calendrier ou d'un webhook, et peut créer une tâche à chaque fois. Pour qu'un agent revienne plus tard sur une tâche existante, à une heure donnée ou après un événement sur cette tâche, ajoutez-lui plutôt un [réveil](/issue-wakeups). L'onglet **Réveils de tâches** de la page Automatisation liste tous les réveils de l'espace de travail.
## Créer une automatisation
@@ -21,7 +26,11 @@ Ouvrez **Automatisation** dans la barre latérale, choisissez un modèle ou part
- **Abonnés** : les membres à notifier après la création automatique d'une tâche ;
- **Déclencheurs** : une planification ou un webhook.
-Une automatisation est activée par défaut après l'enregistrement ; **Exécuter maintenant** lance manuellement le flux complet une fois, à tout moment.
+Une automatisation est activée par défaut après l'enregistrement. **Exécuter maintenant** lance le flux complet une fois, à tout moment, sans attendre la planification.
+
+Voici une automatisation dont le mode de sortie est Créer une tâche. Cliquez sur **Exécuter maintenant**, ou avancez jusqu'à la prochaine exécution planifiée, et regardez-la créer une tâche, la confier à l'agent, puis terminer l'exécution.
+
+<AutopilotDemo />
## Choisir un mode de sortie
@@ -30,7 +39,7 @@ Une automatisation est activée par défaut après l'enregistrement ; **Exécute
| **Créer une tâche** | Chaque déclenchement crée d'abord une tâche, puis l'assigne à l'agent ou au squad assigné ; la discussion, le statut et les enregistrements d'exécution se trouvent tous sur la tâche. | Le travail que l'équipe doit relire, confirmer ou suivre. |
| **Exécution seule** | Crée directement une exécution, sans tâche ; les résultats ne sont visibles que dans l'historique des exécutions de l'automatisation. | Les exécutions d'arrière-plan qui ne nécessitent aucune trace collaborative. |
-Le mode **Créer une tâche** utilise la même file d'exécution que les tâches ordinaires : lorsque le runtime est hors ligne, la tâche est tout de même créée et l'exécution attend que le runtime revienne en ligne.
+Le mode **Créer une tâche** utilise la même file d'exécution que les tâches ordinaires : lorsque le runtime est hors ligne, la tâche est tout de même créée, et l'exécution démarre quand le runtime revient en ligne.
Le mode **Exécution seule** exige que le runtime soit disponible au moment du déclenchement ; sinon, l'exécution apparaît comme « Ignorée », et aucune tâche en attente n'est laissée derrière.
@@ -92,7 +101,7 @@ Seuls le créateur de l'automatisation, les propriétaires/administrateurs de l'
### Référence des réponses du webhook
-Lors du débogage d'un expéditeur, utilisez ce tableau pour interpréter les réponses de Multica :
+Pour déboguer un expéditeur, comparez les réponses de Multica à ce tableau :
| Statut HTTP | Statut de la réponse | Signification |
|---|---|---|
@@ -149,7 +158,7 @@ multica autopilot runs <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
-`autopilot get` définit par défaut `webhook_token`, `webhook_path` et `webhook_url` à `null`, et renvoie à la place `has_webhook_token` et `webhook_token_hint`. N'ajoutez `--show-secrets` que lorsque vous avez délibérément besoin de l'identifiant réel ; le CLI affiche alors un avertissement sur stderr afin que le JSON transmis par pipe reste valide.
+`autopilot get` définit par défaut `webhook_token`, `webhook_path` et `webhook_url` à `null`, et renvoie à la place `has_webhook_token` et `webhook_token_hint`. N'ajoutez `--show-secrets` que lorsque vous avez délibérément besoin de l'identifiant réel ; le CLI affiche son avertissement sur stderr, ce qui laisse intact le JSON transmis par pipe.
Consultez [Utiliser le CLI](/cli) pour la liste complète des paramètres.
@@ -158,3 +167,4 @@ Consultez [Utiliser le CLI](/cli) pour la liste complète des paramètres.
- [Assigner des tâches aux agents](/assigning-issues) — l'assignation et la fenêtre de confirmation.
- [Boîte de réception et abonnements](/inbox) — où arrivent les notifications d'exécution.
- [Exécutions](/tasks) — états des exécutions et gestion des échecs.
+- [Réveils de tâches](/issue-wakeups) — faire revenir un agent plus tard sur une tâche existante.
diff --git a/apps/docs/content/docs/autopilots.ja.mdx b/apps/docs/content/docs/autopilots.ja.mdx
index 992011e92b..7d830a644f 100644
--- a/apps/docs/content/docs/autopilots.ja.mdx
+++ b/apps/docs/content/docs/autopilots.ja.mdx
@@ -4,10 +4,15 @@ description: 繰り返し行う作業を、スケジュールや Webhook に応
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AutopilotDemo } from "@/components/demos/autopilot-demo";
-オートパイロットは、毎日の進捗まとめ、依存関係の定期確認、外部システムからイベントを受け取ったときの対応など、繰り返し発生する作業に使います。
+毎日の進捗まとめ、依存関係の定期確認、外部システムからイベントが届いたときのエージェント起動など、繰り返し発生する作業はオートパイロットに任せます。
-各オートパイロットには、Runbook、実行担当、1 つ以上のトリガーが保存されます。トリガーされると、Multica はタスクを作成するか、エージェントを直接実行し、実行ごとの記録を残します。
+各オートパイロットには、Runbook、実行担当、1 つ以上のトリガーが保存されます。トリガーされると、Multica はタスクを作成するかエージェントを直接実行し、実行ごとに記録が残ります。
+
+## オートパイロットとタスクのウェイクアップ [#vs-wakeups]
+
+オートパイロットはスケジュールや Webhook から新しい作業を始め、そのたびにタスクを作ることもできます。既存のタスクに、決めた時刻やそのタスクで何かが起きたあとでエージェントを戻らせたい場合は、そのタスクに[ウェイクアップ](/issue-wakeups)を追加します。オートパイロットページの**タスクのウェイクアップ**タブには、ワークスペースのすべてのウェイクアップが並びます。
## オートパイロットを作成する
@@ -21,7 +26,11 @@ import { Callout } from "fumadocs-ui/components/callout";
- **購読者**: 自動作成されたタスクの通知を受け取るメンバー
- **トリガー**: スケジュールまたは Webhook
-保存すると、オートパイロットはデフォルトで有効になります。**今すぐ実行**を使えば、いつでも一連の処理を手動で 1 回実行できます。
+保存すると、オートパイロットはデフォルトで有効になります。**今すぐ実行**を使えば、スケジュールを待たずにいつでも一連の処理を手動で 1 回実行できます。
+
+下は出力モードが「タスクを作成」のオートパイロットです。**今すぐ実行**をクリックするか、次回の実行時刻まで早送りすると、タスクの作成、エージェントへの割り当て、実行の完了までを確認できます。
+
+<AutopilotDemo />
## 出力モードを選ぶ
@@ -30,7 +39,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| **タスクを作成** | トリガーされるたびにタスクを作成して実行担当へ割り当てます。議論、状態、実行記録はすべてタスクに残ります。 | チームによる確認や対応の継続が必要な作業 |
| **実行のみ** | タスクを作成せず、実行を直接作成します。結果はオートパイロットの実行履歴からのみ確認できます。 | 共同作業の記録が不要なバックグラウンド処理 |
-**タスクを作成**モードは、通常のタスクと同じ実行キューを使います。ランタイムがオフラインでも先にタスクを作成でき、実行はランタイムがオンラインになるまで待機します。
+**タスクを作成**モードは、通常のタスクと同じ実行キューを使います。ランタイムがオフラインでもタスクは作成され、実行はランタイムがオンラインになってから始まります。
**実行のみ**モードでは、トリガー時にランタイムが利用可能である必要があります。利用できない場合、その実行は「スキップ」と表示され、待機中のタスクは作成されません。
@@ -76,7 +85,7 @@ Webhook リクエストには次の制約があります。
- 安定した冪等キーがない場合、Multica は同じリクエストが 1 回だけ実行されることを保証できない
- トリガーが無効、またはイベントがフィルターに一致しない場合、配信は「無視」として記録され、実行は作成されない
-### イベントをフィルターする
+### イベントをフィルターする [#event-filters]
同じ送信元から複数種類のイベントが届く場合、トリガーにイベントフィルターを追加できます。各行にイベント名と、任意で action の一覧を指定します。いずれか 1 行に一致すると実行され、すべて空の場合は全イベントを受け入れます。
@@ -92,7 +101,7 @@ Webhook URL の token は、そのまま呼び出し用の認証情報です。
### Webhook レスポンス早見表
-送信側をデバッグするときは、次の表で Multica のレスポンスを確認してください。
+送信側をデバッグするときは、次の表と Multica のレスポンスを照らし合わせてください。
| HTTP ステータス | レスポンスの状態 | 意味 |
|---|---|---|
@@ -149,7 +158,7 @@ multica autopilot runs <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
-`autopilot get` はデフォルトで `webhook_token`、`webhook_path`、`webhook_url` を `null` にし、代わりに `has_webhook_token` と `webhook_token_hint` を返します。実際の認証情報が必要な場合に限り `--show-secrets` を追加してください。CLI は警告を stderr に出力するため、パイプされた JSON は有効なままです。
+`autopilot get` はデフォルトで `webhook_token`、`webhook_path`、`webhook_url` を `null` にし、代わりに `has_webhook_token` と `webhook_token_hint` を返します。実際の認証情報が必要な場合に限り `--show-secrets` を追加してください。CLI は警告を stderr に出力するので、パイプした JSON には影響しません。
すべての引数は [CLI](/cli)を参照してください。
@@ -158,3 +167,4 @@ multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
- [タスクをエージェントに割り当てる](/assigning-issues) — 割り当てと確認ダイアログ
- [インボックスと購読](/inbox) — 実行通知の受信先
- [実行](/tasks) — 実行状態と失敗時の処理
+- [タスクのウェイクアップ](/issue-wakeups) — あとでエージェントを既存のタスクに戻らせる
diff --git a/apps/docs/content/docs/autopilots.ko.mdx b/apps/docs/content/docs/autopilots.ko.mdx
index 28d7b4358c..ab0abbf773 100644
--- a/apps/docs/content/docs/autopilots.ko.mdx
+++ b/apps/docs/content/docs/autopilots.ko.mdx
@@ -4,16 +4,21 @@ description: 시간 또는 Webhook에 따라 반복 작업을 에이전트에게
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AutopilotDemo } from "@/components/demos/autopilot-demo";
-오토파일럿는 매일 진행 상황을 요약하거나, 의존성을 정기적으로 확인하거나, 외부 시스템에서 이벤트를 받으면 에이전트를 시작하는 반복 작업에 사용합니다.
+매일 진행 상황 요약, 정기적인 의존성 확인, 외부 시스템에서 이벤트가 오면 에이전트 시작처럼 반복되는 작업은 오토파일럿에 맡깁니다.
-각 오토파일럿에는 런북 하나, 실행 주체 하나, 하나 이상의 트리거가 저장됩니다. 트리거되면 Multica가 태스크를 만들거나 에이전트를 바로 실행하고 모든 실행 기록을 보관합니다.
+각 오토파일럿에는 런북 하나, 실행 주체 하나, 하나 이상의 트리거가 저장됩니다. 트리거되면 Multica가 태스크를 만들거나 에이전트를 바로 실행하며, 실행마다 기록이 남습니다.
+
+## 오토파일럿과 태스크 깨우기 [#vs-wakeups]
+
+오토파일럿은 일정이나 Webhook으로 새 작업을 시작하며, 그때마다 태스크를 새로 만들 수 있습니다. 이미 있는 태스크로 정한 시각이나 그 태스크에서 어떤 일이 생긴 뒤 에이전트가 돌아오게 하려면, 그 태스크에 [깨우기](/issue-wakeups)를 추가하세요. 오토파일럿 페이지의 **작업 깨우기** 탭에서 워크스페이스의 모든 깨우기를 볼 수 있습니다.
## 오토파일럿 만들기
사이드바에서 **오토파일럿**를 열고 템플릿을 선택하거나 빈 상태에서 시작한 뒤 다음 항목을 설정합니다.
-- **이름**: 오토파일럿가 담당하는 일을 설명합니다.
+- **이름**: 오토파일럿이 담당하는 일을 설명합니다.
- **런북**: 에이전트가 실행할 때마다 읽는 목표, 배경, 제약, 단계입니다.
- **실행 주체**: 에이전트 또는 스쿼드 하나입니다.
- **연결 프로젝트**: 선택 항목이며 자동 생성된 태스크를 지정한 프로젝트에 넣습니다.
@@ -21,16 +26,20 @@ import { Callout } from "fumadocs-ui/components/callout";
- **구독자**: 자동 생성된 태스크의 알림을 받아야 하는 멤버입니다.
- **트리거 방식**: 일정 또는 Webhook입니다.
-저장하면 오토파일럿가 기본적으로 활성화됩니다. **지금 실행**으로 언제든 전체 과정을 한 번 수동 실행할 수 있습니다.
+저장하면 오토파일럿이 기본적으로 활성화됩니다. **지금 실행**으로 일정을 기다리지 않고 언제든 전체 과정을 한 번 수동 실행할 수 있습니다.
+
+아래는 출력 모드가 "태스크 생성"인 오토파일럿입니다. **지금 실행**을 클릭하거나 다음 실행 시간으로 건너뛰어, 태스크를 만들고 에이전트에게 맡긴 뒤 이번 실행이 완료되는 과정을 확인해 보세요.
+
+<AutopilotDemo />
## 출력 모드 선택
| 모드 | 동작 | 적합한 경우 |
|---|---|---|
-| **태스크 만들기** | 트리거할 때마다 태스크를 먼저 만든 뒤 실행 주체에 할당합니다. 논의, 상태, 실행 기록이 모두 태스크에 남습니다. | 팀이 확인하거나 승인하거나 후속 처리해야 하는 작업 |
+| **태스크 생성** | 트리거할 때마다 태스크를 먼저 만든 뒤 실행 주체에 할당합니다. 논의, 상태, 실행 기록이 모두 태스크에 남습니다. | 팀이 확인하거나 승인하거나 후속 처리해야 하는 작업 |
| **실행만** | 태스크 없이 실행을 바로 만듭니다. 결과는 오토파일럿 실행 기록에서만 확인합니다. | 협업 기록이 필요 없는 백그라운드 실행 |
-**태스크 만들기** 모드는 일반 태스크와 같은 실행 큐를 사용합니다. 런타임이 오프라인이어도 태스크를 먼저 만들고 실행은 런타임이 온라인이 될 때까지 기다릴 수 있습니다.
+**태스크 생성** 모드는 일반 태스크와 같은 실행 큐를 사용합니다. 런타임이 오프라인이어도 태스크는 만들어지고, 실행은 런타임이 온라인이 된 뒤 시작됩니다.
**실행만** 모드는 트리거하는 시점에 런타임을 사용할 수 있어야 합니다. 사용할 수 없으면 이번 실행이 "건너뜀"으로 표시되며 대기 중인 태스크를 남기지 않습니다.
@@ -58,7 +67,7 @@ Cron에는 초가 없으며 시간대에는 `Asia/Shanghai` 같은 IANA 이름
## Webhook으로 실행
-Webhook 트리거를 추가하면 Multica가 고유 URL을 생성합니다. 이 URL에 JSON 객체나 배열을 보내 오토파일럿를 트리거할 수 있습니다.
+Webhook 트리거를 추가하면 Multica가 고유 URL을 생성합니다. 이 URL에 JSON 객체나 배열을 보내 오토파일럿을 트리거할 수 있습니다.
```bash
curl -X POST "$MULTICA_WEBHOOK_URL" \
@@ -67,7 +76,7 @@ curl -X POST "$MULTICA_WEBHOOK_URL" \
-d '{"event":"build.completed","eventPayload":{"status":"success"}}'
```
-Payload는 전달 및 실행 기록에 저장되고 에이전트에게 제공됩니다. 태스크 만들기 모드에서는 이벤트 내용도 태스크 설명에 첨부됩니다.
+Payload는 전달 및 실행 기록에 저장되고 에이전트에게 제공됩니다. 태스크 생성 모드에서는 이벤트 내용도 태스크 설명에 첨부됩니다.
Webhook 요청에는 다음 제약이 있습니다.
@@ -76,7 +85,7 @@ Webhook 요청에는 다음 제약이 있습니다.
- 안정적인 멱등성 key가 없으면 Multica는 중복 요청이 한 번만 실행된다고 보장할 수 없습니다.
- 트리거가 비활성화되었거나 이벤트가 일치하지 않으면 전달이 "무시됨"으로 기록되고 실행은 생성되지 않습니다.
-### 이벤트 필터링
+### 이벤트 필터링 [#event-filters]
같은 소스에서 여러 종류의 이벤트를 보낸다면 트리거에 이벤트 필터를 추가할 수 있습니다. 각 줄에는 이벤트 이름과 선택적인 action 목록을 입력합니다. 어느 한 줄이라도 일치하면 실행되며 모두 비워 두면 모든 이벤트를 받습니다.
@@ -92,13 +101,13 @@ Webhook URL의 token이 호출 자격 증명입니다. 전체 URL을 공개 저
### Webhook 응답 빠른 참조
-발신자를 디버깅할 때 다음 표로 Multica 응답을 확인하세요.
+발신자를 디버깅할 때는 다음 표와 Multica 응답을 대조하세요.
| HTTP 상태 | 응답 상태 | 의미 |
|---|---|---|
| 200 | `accepted` | 요청을 받아 실행을 만들었으며 전달 ID와 실행 ID를 반환합니다. |
| 200 | `skipped` | 요청을 받았지만 이번 실행을 건너뛰었습니다. 예를 들어 실행만 모드에서 런타임이 오프라인일 때이며 이유가 포함됩니다. |
-| 200 | `ignored` | 실행을 만들지 않았습니다. 트리거가 비활성화되었거나 오토파일럿가 일시 중지 또는 보관되었거나 이벤트가 필터링되었습니다. `reason` 필드에 이유가 있습니다. |
+| 200 | `ignored` | 실행을 만들지 않았습니다. 트리거가 비활성화되었거나 오토파일럿이 일시 중지 또는 보관되었거나 이벤트가 필터링되었습니다. `reason` 필드에 이유가 있습니다. |
| 200 | `duplicate` | 멱등성 key가 기존 전달과 일치합니다. 원래 전달 ID를 반환하고 다시 실행하지 않습니다. |
| 400 | 오류 메시지 | Body가 비어 있거나 유효한 JSON이 아니거나 JSON 객체/배열이 아닙니다. |
| 401 | `rejected` | 트리거에 서명 key가 설정되어 있지만 요청에 서명이 없거나 일치하지 않습니다. |
@@ -126,19 +135,19 @@ Webhook URL의 token이 호출 자격 증명입니다. 전체 URL을 공개 저
## 실패, 일시 중지, 삭제
-실행만 모드의 실행이 실패해도 자동으로 재시도하지 않습니다. 다음 일정은 원래 계획대로 트리거됩니다. 태스크 만들기 모드에서 생성된 실행은 일반 태스크 실행이며 인프라 장애는 [실행](/tasks#실패와-자동-재시도)의 규칙에 따라 처리됩니다.
+실행만 모드의 실행이 실패해도 자동으로 재시도하지 않습니다. 다음 일정은 원래 계획대로 트리거됩니다. 태스크 생성 모드에서 생성된 실행은 일반 태스크 실행이며 인프라 장애는 [실행](/tasks#실패와-자동-재시도)의 규칙에 따라 처리됩니다.
-Multica는 최근 실행이 계속 실패하는지 정기적으로 확인합니다. 지난 7일 동안 완료되거나 실패한 실행이 50회 이상이고 실패율이 90% 이상이면 시스템이 오토파일럿를 일시 중지하고 생성자에게 알립니다. 원인을 해결한 뒤 수동으로 다시 시작할 수 있습니다.
+Multica는 최근 실행이 계속 실패하는지 정기적으로 확인합니다. 지난 7일 동안 완료되거나 실패한 실행이 50회 이상이고 실패율이 90% 이상이면 시스템이 오토파일럿을 일시 중지하고 생성자에게 알립니다. 원인을 해결한 뒤 수동으로 다시 시작할 수 있습니다.
수동으로 일시 중지하면 일정, Webhook, "지금 실행"이 모두 중지됩니다. 삭제는 실제로 보관 처리합니다. 이후 트리거는 중지하지만 실행 및 전달 기록은 유지합니다.
## 관리 권한
-- 모든 워크스페이스 멤버가 오토파일럿를 만들 수 있습니다.
+- 모든 워크스페이스 멤버가 오토파일럿을 만들 수 있습니다.
- 생성자와 워크스페이스 owner/admin은 수정, 실행, 삭제, 트리거 관리를 할 수 있습니다.
- 생성자와 owner/admin은 협업자를 "관리 접근"에 추가할 수 있습니다.
- 협업자는 수정, 실행, 트리거 관리를 할 수 있지만 다른 사람에게 권한을 다시 부여할 수는 없습니다.
-- 오토파일럿를 관리할 수 있다고 해서 반드시 그 오토파일럿가 사용하는 에이전트를 실행할 수 있는 것은 아닙니다. 에이전트 Access는 계속 적용됩니다.
+- 오토파일럿을 관리할 수 있다고 해서 반드시 그 오토파일럿이 사용하는 에이전트를 실행할 수 있는 것은 아닙니다. 에이전트 Access는 계속 적용됩니다.
## CLI 사용
@@ -149,7 +158,7 @@ multica autopilot runs <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
-`autopilot get`은 기본적으로 `webhook_token`, `webhook_path`, `webhook_url`을 `null`로 설정하고 대신 `has_webhook_token`과 `webhook_token_hint`를 반환합니다. 실제 자격 증명이 꼭 필요할 때만 `--show-secrets`를 추가하세요. CLI는 경고를 stderr로 출력하므로 파이프로 전달되는 JSON은 유효하게 유지됩니다.
+`autopilot get`은 기본적으로 `webhook_token`, `webhook_path`, `webhook_url`을 `null`로 설정하고 대신 `has_webhook_token`과 `webhook_token_hint`를 반환합니다. 실제 자격 증명이 꼭 필요할 때만 `--show-secrets`를 추가하세요. CLI는 경고를 stderr로 출력하므로 파이프로 전달되는 JSON에는 영향이 없습니다.
전체 인수는 [CLI 사용](/cli)을 참고하세요.
@@ -158,3 +167,4 @@ multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
- [태스크를 에이전트에게 할당하기](/assigning-issues) — 할당과 확인 창을 알아봅니다.
- [인박스와 구독](/inbox) — 실행 알림이 도착하는 위치를 확인합니다.
- [실행](/tasks) — 실행 상태와 실패 처리를 알아봅니다.
+- [태스크 깨우기](/issue-wakeups) — 나중에 에이전트를 기존 태스크로 돌아오게 합니다.
diff --git a/apps/docs/content/docs/autopilots.mdx b/apps/docs/content/docs/autopilots.mdx
index 6a5ddbc962..2e197dc2b1 100644
--- a/apps/docs/content/docs/autopilots.mdx
+++ b/apps/docs/content/docs/autopilots.mdx
@@ -4,10 +4,15 @@ description: Hand recurring work to agents automatically, on a schedule or from
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AutopilotDemo } from "@/components/demos/autopilot-demo";
-Autopilots run work that happens over and over — a daily progress summary, a periodic dependency check, or an agent kicked off by an event from an external system.
+A daily progress summary, a periodic dependency check, an agent kicked off by an event from an external system: work that happens over and over goes to an autopilot.
-Each autopilot stores a Runbook, an assignee, and one or more triggers. When triggered, Multica creates an issue or runs the agent directly, and keeps a record of every run.
+Each autopilot stores a Runbook, an assignee, and one or more triggers. When triggered, Multica creates an issue or runs the agent directly, and every run leaves a record.
+
+## Autopilots and issue wakeups [#vs-wakeups]
+
+An autopilot starts new work from a schedule or webhook, and can create a new issue each time. To have an agent come back to one existing issue later, at a set time or once something happens on it, add a [wakeup](/issue-wakeups) to that issue instead. The **Issue wakeups** tab on the Autopilot page lists every wakeup in the workspace.
## Create an autopilot
@@ -21,7 +26,11 @@ Open **Autopilot** in the sidebar, pick a template or start from scratch, then c
- **Subscribers**: members to notify after an issue is auto-created;
- **Triggers**: a schedule or a webhook.
-An autopilot is enabled by default after saving; **Run now** manually executes the full flow once at any time.
+An autopilot is enabled by default after saving. **Run now** executes the full flow once at any time, without waiting for the schedule.
+
+Below is an autopilot whose execution mode is Create issue. Click **Run now**, or skip ahead to the next scheduled time, and watch it create an issue, hand it to the agent, and complete the run.
+
+<AutopilotDemo />
## Choose an execution mode
@@ -30,15 +39,15 @@ An autopilot is enabled by default after saving; **Run now** manually executes t
| **Create issue** | Each trigger first creates an issue, then assigns it to the assignee; discussion, status, and run records all live on the issue. | Work the team needs to review, confirm, or follow up on. |
| **Run only** | Creates a run directly with no issue; results are visible only in the autopilot's run history. | Background runs that need no collaboration record. |
-**Create issue** mode uses the same run queue as regular issues: when the runtime is offline, the issue is still created and the run waits for the runtime to come online.
+**Create issue** mode uses the same run queue as regular issues: when the runtime is offline, the issue is still created, and the run starts once the runtime comes online.
**Run only** requires the runtime to be available at trigger time; otherwise the run shows as skipped, and no waiting issue is left behind.
## Run on a schedule
-The schedule editor lets you pick the run time, repeat days, time window, and timezone, and previews the upcoming run times. One autopilot can have multiple schedules; enabling or disabling an individual trigger is done with the CLI's `autopilot trigger-update` — see [Using the CLI](/cli) for the parameters.
+The schedule editor lets you pick the run time, repeat days, time window, and timezone, and previews the upcoming run times. One autopilot can have multiple schedules; to enable or disable an individual trigger, use the CLI's `autopilot trigger-update` — see [Using the CLI](/cli) for the parameters.
-When you need more complex rules, edit the standard 5-field cron directly:
+For more complex rules, edit the standard 5-field cron directly:
```text
minute hour day month weekday
@@ -76,7 +85,7 @@ Constraints on webhook requests:
- without a stable idempotency key, Multica can't guarantee that repeated requests run only once;
- when the trigger is disabled or the event doesn't match, the delivery is recorded as ignored and no run is created.
-### Filter events
+### Filter events [#event-filters]
When one source sends several event types, add event filters to the trigger. Each row holds one event name plus an optional list of actions; a run fires if any row matches, and leaving all rows empty accepts every event.
@@ -92,7 +101,7 @@ Only the autopilot's creator, workspace owners/admins, and collaborators granted
### Webhook response reference
-When debugging a sender, use this table to interpret Multica's responses:
+When debugging a sender, check Multica's responses against this table:
| HTTP status | Response status | Meaning |
|---|---|---|
@@ -149,7 +158,7 @@ multica autopilot runs <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
-`autopilot get` sets `webhook_token`, `webhook_path`, and `webhook_url` to `null` by default, and returns `has_webhook_token` plus `webhook_token_hint` instead. Add `--show-secrets` only when you intentionally need the live credential; the CLI prints a warning to stderr so piped JSON stays valid.
+`autopilot get` sets `webhook_token`, `webhook_path`, and `webhook_url` to `null` by default, and returns `has_webhook_token` plus `webhook_token_hint` instead. Add `--show-secrets` only when you intentionally need the live credential; the CLI prints its warning to stderr, so piped JSON is unaffected.
See [Using the CLI](/cli) for the full parameters.
@@ -158,3 +167,4 @@ See [Using the CLI](/cli) for the full parameters.
- [Assign issues to agents](/assigning-issues) — assignment and the confirmation window.
- [Inbox and subscriptions](/inbox) — where run notifications arrive.
- [Runs](/tasks) — run states and failure handling.
+- [Issue wakeups](/issue-wakeups) — bring an agent back to an existing issue later.
diff --git a/apps/docs/content/docs/autopilots.zh.mdx b/apps/docs/content/docs/autopilots.zh.mdx
index 74850e7caa..9a2952c6c0 100644
--- a/apps/docs/content/docs/autopilots.zh.mdx
+++ b/apps/docs/content/docs/autopilots.zh.mdx
@@ -4,10 +4,15 @@ description: 按时间或 Webhook 自动把重复工作交给智能体。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { AutopilotDemo } from "@/components/demos/autopilot-demo";
-自动化用来执行反复发生的工作,例如每天汇总进展、定期检查依赖,或在外部系统发来事件时启动智能体。
+每天汇总进展、定期检查依赖、外部系统发来事件时启动智能体,这类反复发生的工作交给自动化。
-每条自动化保存一份 Runbook、一个执行方和一个或多个触发器。触发后,Multica 会创建任务或直接运行智能体,并保留每一次运行记录。
+每条自动化保存一份 Runbook、一个执行方和一个或多个触发器。触发后,Multica 创建任务或直接运行智能体,每一次运行都留有记录。
+
+## 自动化还是任务唤醒 [#vs-wakeups]
+
+自动化按时间表或 Webhook 开始新的工作,每次可以新建一条任务。如果是想让智能体在某个时间、或者等任务上发生某件事之后,回到一条已有的任务接着做,就给那条任务加[唤醒](/issue-wakeups)。自动化页面的**任务唤醒**标签列出整个工作区的唤醒。
## 创建自动化
@@ -21,7 +26,11 @@ import { Callout } from "fumadocs-ui/components/callout";
- **订阅者**:自动创建任务后需要收到通知的成员;
- **触发方式**:时间表或 Webhook。
-保存后自动化默认为启用状态;**立即运行**可随时手动执行一次完整流程。
+保存后自动化默认启用。**立即运行**随时手动执行一次完整流程,不用等时间表。
+
+下面是一条输出模式为"创建任务"的自动化。点**立即运行**,或者快进到下次运行时间,看它创建任务、交给智能体,再到这次运行完成。
+
+<AutopilotDemo />
## 选择输出模式
@@ -30,15 +39,15 @@ import { Callout } from "fumadocs-ui/components/callout";
| **创建任务** | 每次触发先创建一条任务,再分配给执行方;讨论、状态和执行记录都保留在任务中。 | 需要团队查看、确认或继续处理的工作。 |
| **仅运行** | 直接创建运行,不产生任务;结果只在自动化的运行历史中查看。 | 无需协作记录的后台运行。 |
-**创建任务**模式与普通任务使用相同的运行队列:运行时离线时可以先创建任务,运行会等待运行时上线。
+**创建任务**模式和普通任务用同一个运行队列:运行时离线时照样先创建任务,运行等运行时上线后开始。
**仅运行**要求运行时在触发时可用;否则本次运行会显示为"已跳过",不会留下一个等待中的任务。
## 按时间运行
-时间表编辑器可以选择运行时间、重复日期、时间窗口和时区,并预览接下来的运行时间。一条自动化可以添加多个时间表;单独启停某个触发器通过 CLI 的 `autopilot trigger-update` 完成,参数见 [CLI 命令](/cli)。
+时间表编辑器可以选择运行时间、重复日期、时间窗口和时区,并预览接下来的运行时间。一条自动化可以添加多个时间表;单独启停某个触发器要用 CLI 的 `autopilot trigger-update`,参数见 [CLI 命令](/cli)。
-需要更复杂的规则时,可以直接编辑标准 5 字段 cron:
+规则更复杂时,直接编辑标准 5 字段 cron:
```text
分 时 日 月 星期
@@ -76,9 +85,9 @@ Webhook 请求的约束:
- 没有稳定幂等键时,Multica 无法保证重复请求只运行一次;
- 触发器已禁用或事件不匹配时,投递会记录为"已忽略",不会创建运行。
-### 过滤事件
+### 过滤事件 [#事件过滤]
-同一个来源会发送多种事件时,可以为触发器添加事件过滤。每行包含一个事件名,以及可选的 action 列表;任意一行命中即可运行,全部留空则接收所有事件。
+同一个来源会发送多种事件时,给触发器加上事件过滤。每行一个事件名,加可选的 action 列表;任意一行命中就运行,全部留空则接收所有事件。
例如,事件名填写 `workflow_run`,Actions 填写 `completed, failed`,只会接收这两类 `workflow_run` 结果。Multica 会从常见请求头和 payload 中识别事件与 action,包括 GitHub 的 `X-GitHub-Event` 和 body 中的 `action`。
@@ -92,7 +101,7 @@ Webhook URL 中的 token 就是调用凭证。不要把完整 URL 放进公开
### Webhook 响应速查
-调试发送方时,可以对照下表理解 Multica 的响应:
+调试发送方时,对照下表看 Multica 的响应:
| HTTP 状态 | 响应状态 | 含义 |
|---|---|---|
@@ -107,7 +116,7 @@ Webhook URL 中的 token 就是调用凭证。不要把完整 URL 放进公开
| 429 | 错误信息 | 请求过于频繁,按响应头 `Retry-After` 稍后重试。 |
| 500 | 错误信息 | Multica 内部错误,发送方可稍后重试。 |
-暂停、归档和事件过滤这类业务性忽略返回的是 200 而不是 4xx,避免发送方反复重试。
+暂停、归档、事件过滤这类业务上的忽略返回 200,不返回 4xx,以免发送方反复重试。
事件与 action 的推断顺序:
@@ -128,7 +137,7 @@ Webhook URL 中的 token 就是调用凭证。不要把完整 URL 放进公开
仅运行模式中的运行失败后不会自动重试;下一次时间表仍会按原计划触发。创建任务模式产生的是普通任务运行,基础设施故障按照[运行](/tasks#失败与自动重试)中的规则处理。
-Multica 会定期检查近期运行是否持续失败:过去 7 天内已完成或失败的运行不少于 50 次且失败率达到 90% 时,系统会暂停这条自动化并通知创建者;修复原因后可以手动恢复。
+Multica 定期检查近期运行是否持续失败:过去 7 天内已完成或失败的运行不少于 50 次、且失败率达到 90% 时,系统暂停这条自动化并通知创建者,修复原因后可以手动恢复。
手动暂停会停止时间表、Webhook 和"立即运行"。删除实际是归档:停止后续触发,运行和投递历史保留。
@@ -149,7 +158,7 @@ multica autopilot runs <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
-`autopilot get` 默认把 `webhook_token`、`webhook_path` 和 `webhook_url` 设为 `null`,并返回 `has_webhook_token` 与 `webhook_token_hint`。只有确实需要获取当前有效凭证时才添加 `--show-secrets`;CLI 会把警告输出到 stderr,确保管道中的 JSON 仍然有效。
+`autopilot get` 默认把 `webhook_token`、`webhook_path` 和 `webhook_url` 设为 `null`,并返回 `has_webhook_token` 与 `webhook_token_hint`。确实需要拿到当前有效凭证时才加 `--show-secrets`;CLI 把警告输出到 stderr,管道中的 JSON 不受影响。
完整参数见[使用 CLI](/cli)。
@@ -158,3 +167,4 @@ multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
- [分配任务给智能体](/assigning-issues) — 分配与确认窗口。
- [收件箱与订阅](/inbox) — 运行通知的接收位置。
- [运行](/tasks) — 执行状态与失败处理。
+- [任务唤醒](/issue-wakeups) — 让智能体之后回到已有任务接着做。
diff --git a/apps/docs/content/docs/channels.fr.mdx b/apps/docs/content/docs/channels.fr.mdx
index d881f51015..6d23795e5b 100644
--- a/apps/docs/content/docs/channels.fr.mdx
+++ b/apps/docs/content/docs/channels.fr.mdx
@@ -4,8 +4,9 @@ description: Connectez les agents Multica à Feishu, Lark, Slack, DingTalk, WeCo
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ChannelChatDemo } from "@/components/demos/channel-chat-demo";
-Les intégrations de messagerie permettent à l'équipe de poser des questions à un agent, de le @mentionner dans une conversation de groupe ou de créer des tâches depuis la fenêtre de conversation, sans ouvrir Multica.
+Les intégrations de messagerie permettent à l'équipe de poser des questions à un agent en message direct, de le @mentionner dans une conversation de groupe ou de créer des tâches depuis la fenêtre de conversation, sans ouvrir Multica.
Feishu/Lark, Slack, DingTalk, WeCom et Telegram sont pris en charge aujourd'hui. Ils partagent les mêmes mécanismes de session, d'identité et d'exécution, mais s'installent différemment.
@@ -46,9 +47,11 @@ Guides pas à pas :
4. Le message rejoint une session de [discussion avec l'agent](/chat), et une exécution est créée.
5. La réponse de l'agent est renvoyée dans le message direct ou le fil d'origine.
-Les messages de canal qui ne @mentionnent pas le bot ne déclenchent jamais l'agent et ne sont pas ajoutés au contexte de sa conversation.
+Les messages de canal qui ne @mentionnent pas le bot ne déclenchent jamais l'agent et ne deviennent jamais un tour à eux seuls. Feishu/Lark et Telegram joignent toutefois les messages récents du groupe, en lecture seule, devant le tour lorsque quelqu'un s'adresse au bot ; la page de chaque plateforme donne le détail.
-Les messages ordinaires suivent ce flux. `/issue` est une commande, pas un tour de discussion : Multica publie le résultat sur la plateforme d'origine, mais n'ajoute pas la commande aux discussions Multica. La commande slash native de Slack passe toujours par son propre flux asynchrone de création de tâche.
+`/issue` est une commande, pas un tour de discussion : Multica crée la tâche à partir du message, l'assigne à l'agent lié au bot et publie le résultat dans la conversation d'origine. La commande elle-même n'apparaît pas dans les discussions Multica. La commande slash native de Slack passe par un flux asynchrone distinct de création de tâche.
+
+<ChannelChatDemo />
## Contrôle des conversations
@@ -66,7 +69,7 @@ Sur Slack, `/new` et `/clear` sont des commandes slash natives dans un message d
- WeCom sépare les sessions par conversation ; chaque message direct ou conversation de groupe poursuit sa propre session.
- Telegram sépare les sessions par conversation ; les sujets de forum sont isolés par sujet.
-Dans un canal, chaque relance nécessite toujours une nouvelle @mention. L'agent ne reçoit que les messages qui lui sont adressés : il ne lit jamais automatiquement tout l'historique du canal.
+Dans un canal, chaque relance nécessite toujours une nouvelle @mention. En dehors du contexte récent décrit plus haut, l'agent ne lit jamais automatiquement l'historique du canal.
## Association de compte
@@ -98,12 +101,12 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64-encoded 32-byte key>
Ces clés chiffrent les identifiants de bot stockés. Consultez [Variables d'environnement](/environment-variables) pour savoir comment les générer, les stocker et les renouveler. Multica Cloud est déjà configuré.
-Le seul chemin sortant de WeCom est le WebSocket détenu par un processus ; ce qu'il advient d'une réponse produite sur une *autre* réplique dépend donc du relais temps réel :
+WeCom ne peut envoyer ses réponses que par le WebSocket détenu par un processus. Ce qu'il advient d'une réponse produite sur une autre réplique dépend du mode du relais temps réel :
-- **Mode de relais sharded ou dual** (`REDIS_URL` défini — le mode par défaut avec Redis) : la réponse est transmise à la réplique qui détient la connexion, puis livrée. WeCom sur plusieurs répliques est pris en charge.
+- **Mode de relais sharded ou dual** (`REDIS_URL` défini — le mode par défaut avec Redis) : la réponse est transmise à la réplique qui détient la connexion, puis livrée ; WeCom peut donc tourner sur plusieurs répliques.
- **Mode de relais legacy, ou sans Redis** : la réponse est abandonnée. Dans cette configuration, exécutez le backend avec WeCom activé sur une seule réplique.
-Quel que soit le mode, une réponse produite alors qu'*aucune* réplique ne détient de connexion active (toutes en cours de reconnexion) n'est pas livrée. Elle est comptabilisée dans `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` par la réplique qui l'a routée, ce qui permet de mesurer l'ampleur de cette fenêtre ; si cette perte est inacceptable, une réplique unique reste le déploiement le plus prudent.
+Quel que soit le mode, une réponse produite alors qu'aucune réplique ne détient de connexion active (toutes en cours de reconnexion) n'est pas livrée. La réplique qui l'a routée vérifie ensuite si une réplique a pris en charge la livraison et, sinon, incrémente `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` : cette métrique indique la fréquence de ces pertes. Si elles sont inacceptables, une réplique unique reste le déploiement le plus prudent.
## Étapes suivantes
diff --git a/apps/docs/content/docs/channels.ja.mdx b/apps/docs/content/docs/channels.ja.mdx
index 081ce7426b..a50bcbf2a5 100644
--- a/apps/docs/content/docs/channels.ja.mdx
+++ b/apps/docs/content/docs/channels.ja.mdx
@@ -4,8 +4,9 @@ description: Multica のエージェントを Feishu、Lark、Slack、DingTalk
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ChannelChatDemo } from "@/components/demos/channel-chat-demo";
-チャット連携を使うと、Multica を開かなくても、エージェントへの質問、グループチャットでの @メンション、チャット画面からのタスク作成ができます。
+チャット連携を使うと、Multica を開かなくても、DM でのエージェントへの質問、グループチャットでの @メンション、チャット画面からのタスク作成ができます。
現在は Feishu/Lark、Slack、DingTalk、WeCom、Telegram に対応しています。セッション、ユーザー識別、実行の仕組みは共通ですが、インストール方法が異なります。
@@ -46,9 +47,11 @@ Telegram は画像、ファイル、動画、音声を添付ファイルとし
4. メッセージが[エージェントとのチャット](/chat)セッションに追加され、実行が作成されます。
5. エージェントの返信が元の DM またはスレッドに返されます。
-Bot を @メンションしていないチャンネルメッセージは、エージェントをトリガーせず、会話コンテキストにも追加されません。
+Bot を @メンションしていないチャンネルメッセージはエージェントを起動せず、それ単体で会話のターンになることもありません。Feishu/Lark と Telegram では、誰かが Bot に指示を出したとき、グループの直近のメッセージを読み取り専用のコンテキストとしてそのターンの前に添えます。詳しくは各プラットフォームのページを参照してください。
-通常のメッセージはこの流れで処理されます。`/issue` はコマンドであり、チャットのターンではありません。Multica は元のプラットフォームに結果を返しますが、コマンド自体は Multica Chat に追加しません。Slack のネイティブスラッシュコマンドは、独立した非同期の実行作成フローで処理されます。
+`/issue` はコマンドで、会話のターンには数えません。Multica はメッセージからタスクを作成し、担当者をこの Bot に紐づいたエージェントにして、結果を元のチャットに返します。コマンド自体は Multica Chat に表示されません。Slack のネイティブスラッシュコマンドは、別の非同期タスク作成フローで処理されます。
+
+<ChannelChatDemo />
## 会話コンテキストを操作する
@@ -66,7 +69,7 @@ Slack の DM では、`/new` と `/clear` はネイティブスラッシュコ
- WeCom はチャットごとにセッションを分けます。DM とグループチャットはそれぞれのセッションを継続します。
- Telegram はチャットごとにセッションを分け、forum topic は topic ごとに分離します。
-チャンネルで追加の依頼を送る場合も、Bot を再度 @メンションする必要があります。エージェントが受け取るのは自分宛てのメッセージだけで、チャンネルの履歴全体を自動的に読み取ることはありません。
+チャンネルで追加の依頼を送る場合も、Bot を再度 @メンションする必要があります。上で説明した直近のコンテキストを除き、エージェントがチャンネルの履歴を自動的に読み取ることはありません。
## アカウント連携
@@ -98,12 +101,12 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64-encoded 32-byte key>
これらのキーは、保存された Bot の認証情報を暗号化します。生成、保管、ローテーションの方法は[環境変数](/environment-variables)を参照してください。Multica Cloud ではすでに設定済みです。
-WeCom の送信経路は、1 つのプロセスが保持する WebSocket だけです。**別のレプリカ**で生成された返信がどうなるかは、リアルタイムリレーのモードによって決まります。
+WeCom の返信は、1 つのプロセスが保持する WebSocket からしか送信できません。別のレプリカで生成された返信がどうなるかは、リアルタイムリレーのモードによって決まります。
-- **シャード / デュアルリレーモード**(`REDIS_URL` を設定、Redis がある場合のデフォルト):返信は接続を保持するレプリカへ転送されて配信されます。**マルチレプリカ運用に対応しています。**
+- **シャード / デュアルリレーモード**(`REDIS_URL` を設定、Redis がある場合のデフォルト):返信は接続を保持するレプリカへ転送されて配信されるため、マルチレプリカで運用できます。
- **レガシーリレーモード、または Redis なし**:返信は破棄されます。この構成では WeCom を有効にしたバックエンドを単一レプリカで運用してください。
-どのモードでも、**どのレプリカも**接続を保持していない瞬間(全て再接続中)に生成された返信は配信されません。ただし計測はされます。転送したレプリカが後からその配信をどのレプリカかが引き受けたかを確認し、誰も引き受けていなければ `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` を加算するため、この窓の大きさは実測できます。この損失が許容できない場合は、単一レプリカが最も保守的な構成です。
+どのモードでも、どのレプリカも接続を保持していない瞬間(全て再接続中)に生成された返信は配信されません。転送したレプリカは後から、いずれかのレプリカがその配信を引き受けたかを確認し、誰も引き受けていなければ `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` を加算します。取りこぼしの頻度はこの指標で確認できます。この損失が許容できない場合は、単一レプリカが最も保守的な構成です。
## 次のステップ
diff --git a/apps/docs/content/docs/channels.ko.mdx b/apps/docs/content/docs/channels.ko.mdx
index b83f71954d..23a0f8da11 100644
--- a/apps/docs/content/docs/channels.ko.mdx
+++ b/apps/docs/content/docs/channels.ko.mdx
@@ -4,8 +4,9 @@ description: Multica 에이전트를 Feishu, Lark, Slack, DingTalk, WeCom 또는
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ChannelChatDemo } from "@/components/demos/channel-chat-demo";
-채팅 연동을 사용하면 팀이 Multica를 열지 않고도 에이전트에게 바로 질문하고, 그룹 채팅에서 @멘션하거나, 채팅 창에서 태스크를 만들 수 있습니다.
+채팅 연동을 사용하면 팀이 Multica를 열지 않고도 DM으로 에이전트에게 질문하고, 그룹 채팅에서 @멘션하거나, 채팅 창에서 바로 태스크를 만들 수 있습니다.
현재 Feishu/Lark, Slack, DingTalk, WeCom, Telegram을 지원합니다. 같은 대화, 신원, 실행 메커니즘을 사용하지만 설치 방법은 다릅니다.
@@ -46,9 +47,11 @@ Telegram은 이미지, 파일, 영상, 음성을 첨부파일로 에이전트에
4. 메시지가 [에이전트 대화](/chat)에 들어가고 실행이 하나 생성됩니다.
5. 에이전트의 답변이 원래 DM 또는 스레드로 돌아옵니다.
-Bot을 @멘션하지 않은 채널 메시지는 에이전트를 트리거하지 않으며 대화 컨텍스트에도 추가되지 않습니다.
+Bot을 @멘션하지 않은 채널 메시지는 에이전트를 트리거하지 않으며, 그 자체로 대화의 한 턴이 되지도 않습니다. Feishu/Lark와 Telegram은 누군가 Bot에게 지시를 보낼 때 그룹의 최근 메시지를 읽기 전용 컨텍스트로 그 턴 앞에 붙입니다. 자세한 내용은 각 플랫폼 페이지를 참고하세요.
-일반 메시지는 위 흐름으로 처리됩니다. `/issue`는 명령이며 채팅 turn이 아닙니다. Multica는 원래 플랫폼에 처리 결과를 보내지만 명령 자체는 Multica Chat에 추가하지 않습니다. Slack의 기본 slash 명령은 별도의 비동기 실행 생성 흐름으로 처리됩니다.
+`/issue`는 명령이며 대화의 한 턴으로 치지 않습니다. Multica는 메시지로 태스크를 만들고 담당자를 이 Bot에 연결된 에이전트로 지정한 뒤, 결과를 원래 채팅으로 보냅니다. 명령 자체는 Multica Chat에 나타나지 않습니다. Slack의 기본 slash 명령은 별도의 비동기 태스크 생성 흐름으로 처리됩니다.
+
+<ChannelChatDemo />
## 대화 컨텍스트 제어
@@ -66,7 +69,7 @@ Slack DM에서는 `/new`과 `/clear`가 네이티브 slash 명령입니다. 네
- WeCom은 채팅별로 대화를 구분하며 각 DM 또는 그룹 채팅이 자체 대화를 이어갑니다.
- Telegram은 채팅별로 대화를 구분하며 forum topic은 topic별로 분리합니다.
-채널에서 후속 질문을 할 때도 Bot을 다시 @멘션해야 합니다. 에이전트는 자신에게 보낸 메시지만 받으며 전체 채널 기록을 자동으로 읽지 않습니다.
+채널에서 후속 질문을 할 때도 Bot을 다시 @멘션해야 합니다. 위에서 설명한 최근 컨텍스트 외에는 에이전트가 채널 기록을 자동으로 읽지 않습니다.
## 계정 연결
@@ -98,12 +101,12 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64로 인코딩한 32바이트 키>
이 키는 Bot 자격 증명을 암호화해 저장하는 데 사용됩니다. 생성, 보관, 교체 방법은 [환경 변수](/environment-variables)를 참고하세요. Multica Cloud에는 이미 설정되어 있습니다.
-WeCom의 발신 경로는 한 프로세스가 보유한 WebSocket뿐입니다. **다른 레플리카**에서 생성된 응답이 어떻게 되는지는 실시간 릴레이 모드에 따라 달라집니다.
+WeCom의 응답은 한 프로세스가 보유한 WebSocket으로만 보낼 수 있습니다. 다른 레플리카에서 생성된 응답이 어떻게 되는지는 실시간 릴레이 모드에 따라 달라집니다.
-- **샤딩 / 듀얼 릴레이 모드**(`REDIS_URL` 설정, Redis가 있을 때의 기본값): 응답이 연결을 보유한 레플리카로 전달되어 배달됩니다. **다중 레플리카 운영을 지원합니다.**
+- **샤딩 / 듀얼 릴레이 모드**(`REDIS_URL` 설정, Redis가 있을 때의 기본값): 응답이 연결을 보유한 레플리카로 전달되어 배달되므로 다중 레플리카로 운영할 수 있습니다.
- **레거시 릴레이 모드 또는 Redis 없음**: 응답이 폐기됩니다. 이 구성에서는 WeCom을 켠 백엔드를 단일 레플리카로 운영하세요.
-어떤 모드에서든 **어느 레플리카도** 연결을 보유하지 않은 순간(모두 재연결 중)에 생성된 응답은 배달되지 않습니다. 다만 집계는 됩니다. 응답을 전달한 레플리카가 이후에 어느 레플리카든 그 배달을 가져갔는지 확인하고, 아무도 가져가지 않았으면 `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` 을 올리므로 이 구간의 크기를 실제로 측정할 수 있습니다. 이 손실을 허용할 수 없다면 단일 레플리카가 가장 보수적인 구성입니다.
+어떤 모드에서든 어느 레플리카도 연결을 보유하지 않은 순간(모두 재연결 중)에 생성된 응답은 배달되지 않습니다. 응답을 전달한 레플리카는 이후 어느 레플리카든 그 배달을 가져갔는지 확인하고, 아무도 가져가지 않았으면 `multica_wecom_outbound_dropped_total{reason="no_live_connection"}`을 올립니다. 이런 손실이 얼마나 자주 생기는지는 이 지표로 확인할 수 있습니다. 이 손실을 허용할 수 없다면 단일 레플리카가 가장 보수적인 구성입니다.
## 다음 단계
diff --git a/apps/docs/content/docs/channels.mdx b/apps/docs/content/docs/channels.mdx
index a7bcda5b60..fe47a8b56b 100644
--- a/apps/docs/content/docs/channels.mdx
+++ b/apps/docs/content/docs/channels.mdx
@@ -4,8 +4,9 @@ description: Connect Multica agents to Feishu, Lark, Slack, DingTalk, WeCom, or
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ChannelChatDemo } from "@/components/demos/channel-chat-demo";
-Chat integrations let the team ask an agent questions, @-mention it in a group chat, or create issues from the chat window — without opening Multica.
+Chat integrations let the team ask an agent questions in a DM, @-mention it in a group chat, or create issues from the chat window, without opening Multica.
Feishu/Lark, Slack, DingTalk, WeCom, and Telegram are supported today. They share the same session, identity, and execution mechanics but install differently.
@@ -46,9 +47,11 @@ Step-by-step guides:
4. The message joins an [agent chat](/chat) session, and a run is created.
5. The agent's reply goes back to the original DM or thread.
-Channel messages that don't @-mention the Bot never trigger the agent and are not added to its conversation context.
+Channel messages that don't @-mention the Bot never trigger the agent and never become a turn of their own. Feishu/Lark and Telegram attach the group's recent messages as read-only context in front of the turn when someone addresses the Bot; each platform's page has the details.
-Ordinary messages follow this flow. `/issue` is a command, not a chat turn: Multica posts the result back to the originating platform but does not add the command to Multica Chat. Slack's native slash command continues through its separate asynchronous issue-creation flow.
+`/issue` is a command, not a chat turn: Multica creates the issue from the message, assigns it to the agent the Bot is bound to, and posts the result back to the original chat. The command itself never appears in Multica Chat. Slack's native slash command goes through a separate asynchronous issue-creation flow.
+
+<ChannelChatDemo />
## Conversation controls
@@ -66,7 +69,7 @@ On Slack, `/new` and `/clear` are native slash commands in a DM. A native slash-
- WeCom separates sessions by chat; each DM or group chat continues its own session.
- Telegram separates sessions by chat; forum topics are isolated by topic.
-Follow-ups in a channel still need a fresh @-mention. The agent only receives messages addressed to it — it never reads the whole channel history automatically.
+Follow-ups in a channel still need a fresh @-mention. Apart from the recent context described above, the agent never reads the channel history automatically.
## Account binding
@@ -98,12 +101,12 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64-encoded 32-byte key>
These keys encrypt stored Bot credentials. See [Environment variables](/environment-variables) for how to generate, store, and rotate them. Multica Cloud already has this configured.
-WeCom's only outbound path is the WebSocket held by one process, so what happens to a reply produced on a *different* replica depends on the realtime relay:
+WeCom can only send replies through the WebSocket held by one process. What happens to a reply produced on another replica depends on the realtime relay mode:
-- **Sharded or dual relay mode** (`REDIS_URL` set — the default with Redis): the reply is forwarded to the replica holding the connection and delivered. Multi-replica WeCom is supported.
+- **Sharded or dual relay mode** (`REDIS_URL` set — the default with Redis): the reply is forwarded to the replica holding the connection and delivered, so WeCom can run on several replicas.
- **Legacy relay mode, or no Redis**: the reply is dropped. Run the WeCom-enabled backend as a single replica in this configuration.
-In every mode, a reply produced while *no* replica holds a live connection (all mid-reconnect) is not delivered. It is counted as `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` by the replica that routed it, so the size of that window is measurable; if the loss is unacceptable, a single replica remains the most conservative deployment.
+In every mode, a reply produced while no replica holds a live connection (all mid-reconnect) is not delivered. The replica that routed it later checks whether any replica claimed the delivery and, if none did, increments `multica_wecom_outbound_dropped_total{reason="no_live_connection"}`, so the metric shows how often this happens. If that loss is unacceptable, a single replica remains the most conservative deployment.
## Next steps
diff --git a/apps/docs/content/docs/channels.zh.mdx b/apps/docs/content/docs/channels.zh.mdx
index e903cfa9cd..b57fda7c18 100644
--- a/apps/docs/content/docs/channels.zh.mdx
+++ b/apps/docs/content/docs/channels.zh.mdx
@@ -4,8 +4,9 @@ description: 把 Multica 智能体接入飞书、Lark、Slack、钉钉、企业
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ChannelChatDemo } from "@/components/demos/channel-chat-demo";
-聊天集成让团队不用打开 Multica,也能直接向智能体提问、在群聊中 @它,或从聊天窗口创建任务。
+接入聊天工具后,团队不用打开 Multica,就能在私聊里向智能体提问、在群聊中 @ 它,或者直接在聊天窗口创建任务。
目前支持飞书/Lark、Slack、钉钉、企业微信和 Telegram。它们使用相同的会话、身份和执行机制,但安装方式不同。
@@ -46,9 +47,11 @@ Telegram 会把图片、文件、视频和音频作为附件转交给智能体
4. 消息进入一段[智能体对话](/chat),并创建一次运行。
5. 智能体的回复回到原来的私聊或讨论串。
-没有 @ Bot 的频道消息不会触发智能体,也不会被加入它的对话上下文。
+没有 @ Bot 的频道消息不会触发智能体,也不会单独成为对话的一轮。飞书和 Telegram 会在有人向 Bot 发出指令时,把群里最近的几条消息作为只读上下文附在这一轮前面,细节见各平台页面。
-普通消息按上述流程处理。`/issue` 是命令,不是对话轮次:Multica 会在原平台返回处理结果,但不会把命令加入 Multica Chat。Slack 原生 slash 命令仍按独立的异步创建任务流程处理。
+`/issue` 是命令,不算对话的一轮:Multica 按消息创建任务,负责人是这个 Bot 绑定的智能体,结果回到原来的聊天,命令本身不会出现在 Multica Chat 中。Slack 原生 slash 命令另走一条异步创建任务的流程。
+
+<ChannelChatDemo />
## 控制对话上下文
@@ -66,7 +69,7 @@ Telegram 会把图片、文件、视频和音频作为附件转交给智能体
- 企业微信按聊天区分会话;每个单聊或群聊分别延续自己的会话。
- Telegram 按聊天区分会话;forum 的每个 topic 分别隔离。
-在频道中继续追问时仍需再次 @ Bot。智能体只收到发给自己的消息,不会自动读取整个频道的历史。
+在频道中继续追问时仍需再次 @ Bot。除了上面提到的近期上下文,智能体不会自动读取整个频道的历史。
## 账号绑定
@@ -98,12 +101,12 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64 编码的 32 字节密钥>
这些密钥用于加密保存 Bot 凭据。生成、保存和轮换方法见[环境变量](/environment-variables)。Multica Cloud 已完成这项配置。
-企业微信的出站只有一条路径——某个进程持有的 WebSocket。回复产生在**其他副本**上时会发生什么,取决于实时中继(realtime relay)的模式:
+企业微信的回复只能经由某个进程持有的 WebSocket 发出。回复产生在其他副本上时,结果取决于实时中继(realtime relay)的模式:
-- **分片或双写中继模式**(配置了 `REDIS_URL`,有 Redis 时的默认):回复会转发给持有连接的副本并送达,**支持多副本部署**。
+- **分片或双写中继模式**(配置了 `REDIS_URL`,有 Redis 时的默认):回复会转发给持有连接的副本并送达,可以多副本部署。
- **legacy 中继模式,或没有 Redis**:回复会被丢弃。这种配置下请把启用企业微信的后端保持单副本。
-任何模式下都有一个残留窗口:回复产生时**没有任何副本**持有活连接(全部在重连中),这条回复不会送达。但它会被记录下来——转发它的副本事后会去确认有没有副本认领过这次投递,没有就给 `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` 加一,所以这个窗口有多大是能实测出来的。如果这种丢失不可接受,单副本仍是最保守的部署方式。
+任何模式下都有一个残留窗口:回复产生时没有任何副本持有活连接(全部在重连中),这条回复不会送达。转发它的副本事后会确认有没有副本认领过这次投递,没有就给 `multica_wecom_outbound_dropped_total{reason="no_live_connection"}` 加一,所以丢失的频率可以从这个指标看出来。不能接受这种丢失时,单副本仍是最保守的部署方式。
## 接下来
diff --git a/apps/docs/content/docs/chat.fr.mdx b/apps/docs/content/docs/chat.fr.mdx
index 70293c349d..a9c593b1d7 100644
--- a/apps/docs/content/docs/chat.fr.mdx
+++ b/apps/docs/content/docs/chat.fr.mdx
@@ -1,30 +1,63 @@
---
title: "Discuter avec des agents"
-description: "Conversation privée en tête-à-tête avec un agent, en dehors de toute tâche. L'agent démarre sans aucun contexte de tâche et ne crée jamais de tâches de lui-même — mais il agit avec vos accès à l'espace de travail lorsque vous le lui demandez explicitement."
+description: "Conversation en tête-à-tête avec un agent, visible de vous seul. L'agent démarre sans contexte de tâche et ne crée pas de tâches de lui-même ; quand vous le lui demandez explicitement, il agit avec vos accès à l'espace de travail."
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { ChatDemo } from "@/components/demos/chat-demo";
+import { ChatQueueDemo } from "@/components/demos/chat-queue-demo";
-Discussion convient aux sujets qui n'ont pas encore pris la forme d'une tâche claire : clarifier des idées, faire le point sur l'espace de travail, discuter d'une approche, ou confier d'abord un petit travail à un agent.
+Discussion convient aux sujets qui n'ont pas encore pris la forme d'une tâche claire : clarifier des idées, faire le point sur l'espace de travail, discuter d'une approche, poser une question qui ne relève d'aucune tâche, ou confier d'abord un petit travail à un agent.
-**Une discussion est une conversation en tête-à-tête entre vous et un [agent](/agents)**, en dehors du tableau des [tâches](/issues). L'agent démarre **sans aucun contexte de tâche** — il ne regarde pas votre tableau et ne transformera pas la conversation en tâches de lui-même — et l'ensemble de la conversation est **entièrement privé** (personne d'autre dans l'[espace de travail](/workspaces), pas même les administrateurs, ne peut la voir). Elle convient pour discuter d'une approche avec un agent, faire un brainstorming ou poser une question qui ne relève d'aucune tâche.
+Une discussion est une conversation en tête-à-tête entre vous et un [agent](/agents), en dehors du tableau des [tâches](/issues). Elle est **entièrement privée** : personne d'autre dans l'[espace de travail](/workspaces), pas même les administrateurs, ne peut la voir.
-Une discussion n'est **liée à aucune tâche** : l'agent ne reçoit pas automatiquement la description et les commentaires d'une tâche, mais il peut toujours utiliser le CLI Multica pour consulter les espaces de travail, projets, tâches et skills dans la limite de ses autorisations.
+Une discussion n'est **liée à aucune tâche**. L'agent ne regarde pas votre tableau, ne reçoit pas automatiquement la description et les commentaires d'une tâche, et ne transforme pas la conversation en tâches de lui-même. Il peut toujours utiliser le CLI Multica pour consulter les espaces de travail, projets, tâches et skills dans la limite de ses autorisations, et quand vous le lui demandez explicitement, il agit avec vos accès à l'espace de travail, par exemple pour créer une tâche.
Une discussion peut aussi porter un contexte. Cliquez sur **+** en bas à gauche de la zone de saisie et choisissez **Contexte de projet** pour rattacher un [projet](/projects) à la conversation ; lorsque l'agent s'exécute, il reçoit la description, les dépôts et les autres ressources de ce projet.
-![Une discussion avec un agent : une question dont la réponse est organisée dans un tableau](/images/docs/chat-conversation.webp)
-
## Démarrer une conversation
-1. Ouvrez **Discussion** dans la barre latérale.
-2. Cliquez sur Nouvelle discussion et choisissez un agent que vous avez la permission d'exécuter.
-3. Saisissez un message ; vous pouvez aussi joindre des images ou des fichiers.
-4. Après l'envoi, Multica crée une exécution pour le message, et la réponse revient dans la conversation en cours.
+<Steps>
+<Step>
+
+Ouvrez **Discussion** dans la barre latérale.
+
+</Step>
+<Step>
+
+Cliquez sur Nouvelle discussion et choisissez un agent que vous avez la permission d'exécuter.
+
+</Step>
+<Step>
+
+Saisissez un message ; vous pouvez aussi joindre des images ou des fichiers.
+
+</Step>
+<Step>
+
+Après l'envoi, Multica crée une exécution pour le message, et la réponse revient dans la conversation en cours.
+
+</Step>
+</Steps>
Si le runtime est hors ligne, le message attend son retour en ligne. Une fois l'agent archivé, ou si vous perdez la permission de l'exécuter, vous ne pouvez plus envoyer de nouveaux messages.
-Avant le premier message, Discussion affiche jusqu'à trois amorces de conversation configurées pour l'agent sélectionné. En choisir une copie son prompt complet dans la zone de saisie sans l'envoyer, pour que vous puissiez d'abord l'adapter. Les agents sans amorces configurées utilisent des exemples généraux localisés.
+Avant le premier message, Discussion affiche jusqu'à trois amorces de conversation configurées pour l'agent sélectionné. En choisir une remplit seulement la zone de saisie avec son prompt complet, sans rien envoyer : vous pouvez d'abord le modifier. Les agents sans amorces configurées affichent des exemples généraux.
+
+Après la réponse de l'agent, des **Questions de suivi** s'affichent parfois en dessous. Un clic sur l'une d'elles l'envoie aussitôt.
+
+<ChatDemo />
+
+## Discuter depuis n'importe quelle page
+
+Inutile de quitter la page en cours pour discuter. Les pages de l'espace de travail affichent un bouton de discussion rond en bas à droite (son info-bulle indique « Demander à Multica ») qui ouvre une fenêtre de discussion flottante. Cette fenêtre et la page **Discussion** partagent les mêmes conversations : une discussion commencée d'un côté se poursuit de l'autre.
+
+- Appuyez sur `⌘J` (`Ctrl+J` sous Windows et Linux) pour ouvrir ou fermer la fenêtre flottante ; à l'ouverture, le curseur se place dans la zone de saisie. La touche fonctionne aussi pendant que vous tapez dans cette zone. Vous pouvez la modifier dans **Paramètres → Raccourcis** ; voir [Recherche, raccourcis et préférences](/shortcuts).
+- Faites glisser les bords de la fenêtre pour la redimensionner, ou développez-la et réduisez-la. Pendant qu'un agent répond, le bouton de discussion fermé pulse légèrement.
+- La page **Discussion** elle-même n'affiche pas ce bouton, et `⌘J` n'y fait rien : la page montre déjà la même conversation.
+
+Si vous ne voulez pas de la fenêtre flottante, désactivez **Fenêtre de discussion flottante** dans **Paramètres → Préférences → Commentaires et discussion**. La discussion n'est alors accessible que depuis la barre latérale. Ce réglage ne s'applique qu'à l'appareil utilisé.
## Discussion ou tâches
@@ -35,7 +68,7 @@ Avant le premier message, Discussion affiche jusqu'à trois amorces de conversat
| Permettre à vos coéquipiers de voir le contexte et de poursuivre la discussion | **Tâche** |
| Un coup d'œil rapide aux informations de l'espace de travail, sans besoin de garder une trace du travail | **Discussion** |
-Les discussions directes créées dans Multica ne sont visibles que par leur créateur ; les autres membres et les administrateurs de l'espace de travail ne peuvent pas les lire. Les conclusions que toute l'équipe doit voir doivent être consignées dans une tâche, une description de projet ou un skill.
+Seul leur créateur peut lire les discussions directes créées dans Multica ; les autres membres et les administrateurs ne le peuvent pas. Consignez les conclusions que l'équipe doit voir dans une tâche, une description de projet ou un skill.
## Contexte sur plusieurs tours
@@ -47,7 +80,28 @@ Si la session locale n'existe plus, si le contexte ne peut pas être poursuivi,
Pendant l'exécution de l'agent, l'interface affiche la phase en cours et l'activité des outils. Dépliez **Afficher les détails** pour inspecter l'exécution en entier.
-Pour l'interrompre, cliquez sur le bouton Arrêter à côté de la zone de saisie. Le contenu déjà renvoyé dans la conversation est conservé ; la saisie pas encore traitée est restaurée dans l'éditeur lorsque c'est possible.
+Pour l'interrompre, cliquez sur le bouton Arrêter à côté de la zone de saisie (affiché quand la zone est vide). Le contenu déjà renvoyé dans la conversation est conservé.
+
+Si l'agent n'avait encore rien produit, le message que vous venez d'envoyer est retiré de la conversation et revient dans la zone de saisie, pièces jointes comprises : vous pouvez le corriger et le renvoyer. L'arrêt met parfois un moment à aboutir ; recharger la page ou fermer la fenêtre entre-temps ne fait pas perdre le message, qui revient dans la zone de saisie à la prochaine ouverture de la conversation. Si la zone contient déjà un autre brouillon, le message attend que vous la vidiez.
+
+## Envoyer des messages pendant une réponse
+
+Vous pouvez continuer à écrire pendant que l'agent répond. Dès que la zone de saisie contient du texte, le bouton d'envoi devient **Mettre le message en file d'attente**. Les messages en file n'interrompent pas la réponse en cours : ils attendent dans une file au-dessus de la zone de saisie et sont traités dans l'ordre une fois la réponse terminée.
+
+| Action | Résultat |
+|---|---|
+| **Réorienter** | Place ce message en tête de file et arrête la réponse en cours. Ce que l'agent a déjà écrit reste dans la conversation, puis il traite ce message. |
+| Retirer (icône corbeille) | Retire le message de la file ; il n'est jamais envoyé à l'agent. |
+| **⋯ → Modifier le message en file d'attente** | Remet le message et ses pièces jointes dans la zone de saisie pour le modifier et le renvoyer. |
+| **⋯ → Tout effacer** | Retire tous les messages en file. La réponse en cours continue. |
+
+**Réorienter** n'est pas disponible tant que la réponse en cours n'a pas vraiment commencé (par exemple quand elle attend encore qu'un runtime la prenne en charge), ni si vous avez perdu la permission d'exécuter l'agent.
+
+<ChatQueueDemo />
+
+<Callout>
+Ici, **Réorienter** arrête d'abord la réponse en cours. Dans les commentaires d'une tâche, [Ajouter à l'exécution en cours](/mentioning-agents#réorienter-un-agent-en-cours-dexécution) fonctionne autrement : l'exécution n'est pas interrompue, l'agent lit le message à la fin de l'étape en cours et poursuit la tâche d'origine.
+</Callout>
## Organiser la liste des conversations
@@ -68,4 +122,5 @@ La suppression d'une conversation est irréversible et arrête toutes les exécu
- [Assigner des tâches aux agents](/assigning-issues) — transformer une discussion en travail suivi.
- [Boîte de réception et abonnements](/inbox) — suivre l'activité de l'équipe qui vous concerne.
+- [Recherche, raccourcis et préférences](/shortcuts) — ouvrir la discussion, rechercher et changer de page au clavier.
- [Matrice des fournisseurs](/providers) — capacités de session et de modèle de chaque outil de codage IA.
diff --git a/apps/docs/content/docs/chat.ja.mdx b/apps/docs/content/docs/chat.ja.mdx
index b5078f5cbe..48b9764f8a 100644
--- a/apps/docs/content/docs/chat.ja.mdx
+++ b/apps/docs/content/docs/chat.ja.mdx
@@ -1,30 +1,63 @@
---
title: エージェントとのチャット
-description: どのタスクにも属さない、エージェントとの一対一の会話。会話全体は完全に非公開で、エージェントは既定ではタスクのコンテキストを持たず、自動でタスクを作ることもありません — ただし、あなたが明示的に頼めば、あなたのワークスペース権限であなたに代わって操作します。
+description: エージェントとの一対一の会話で、あなたにしか見えません。エージェントは既定ではタスクのコンテキストを持たず、自分からタスクを作ることもありません。あなたが明示的に頼んだときは、あなたのワークスペース権限で代わりに操作します。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { ChatDemo } from "@/components/demos/chat-demo";
+import { ChatQueueDemo } from "@/components/demos/chat-queue-demo";
-チャットは、まだ明確なタスクになっていない作業に向いています。アイデアの整理、ワークスペースの状況確認、方針の議論、あるいは小さな作業を先にエージェントに任せる、といった使い方です。
+チャットは、まだ明確なタスクになっていない作業に向いています。アイデアの整理、ワークスペースの状況確認、方針の議論、どのタスクにも属さない質問、あるいは小さな作業を先にエージェントに任せる、といった使い方です。
-**チャットはあなたと[エージェント](/agents)との一対一の会話です** — [タスク](/issues)ボードから外に出るものです。エージェントは既定では**タスクのコンテキストを持たず** — あなたのボードを見ておらず、会話を勝手にタスクに変えることもしません — 会話全体は**完全に非公開**です([ワークスペース](/workspaces)内の他の誰も、admin を含めて、この会話を見ることはできません)。エージェントとアプローチを議論したり、ブレインストーミングをしたり、どのタスクにも属さない質問をしたりするのに適しています。
+チャットはあなたと[エージェント](/agents)との一対一の会話で、[タスク](/issues)ボードの外にあります。会話全体は**完全に非公開**で、[ワークスペース](/workspaces)内のほかの人は、admin も含めて見ることができません。
-チャットは**特定のタスクに紐づきません**。エージェントはタスクの説明やコメントを自動的には受け取りませんが、権限の範囲内で Multica CLI を使い、ワークスペース、プロジェクト、タスク、スキルを照会できます。
+チャットは**タスクに紐づきません**。エージェントはあなたのボードを見ておらず、タスクの説明やコメントを自動的には受け取らず、会話を勝手にタスクに変えることもしません。それでも権限の範囲内で Multica CLI を使い、ワークスペース、プロジェクト、タスク、スキルを照会できます。あなたが明示的に頼めば、あなたのワークスペース権限で代わりに操作します。たとえばタスクを作成できます。
チャットに背景を持たせることもできます。入力欄左下の **+** をクリックして**プロジェクトコンテキスト**を選ぶと、チャットに[プロジェクト](/projects)を紐づけられます。エージェントの実行時に、そのプロジェクトの説明やリポジトリなどのリソースが渡されます。
-![エージェントとのチャット:質問への回答が表に整理されて返ってくる](/images/docs/chat-conversation.webp)
-
## チャットの開始
-1. サイドバーの**チャット**を開きます。
-2. 新規作成をクリックし、実行権限のあるエージェントを選択します。
-3. メッセージを入力します。画像やファイルも添付できます。
-4. 送信すると、Multica はこのメッセージのための実行を作成し、返信は現在のチャットに戻ってきます。
+<Steps>
+<Step>
+
+サイドバーの**チャット**を開きます。
+
+</Step>
+<Step>
+
+新規作成をクリックし、実行権限のあるエージェントを選択します。
+
+</Step>
+<Step>
+
+メッセージを入力します。画像やファイルも添付できます。
+
+</Step>
+<Step>
+
+送信すると、Multica はこのメッセージのための実行を作成し、返信は現在のチャットに戻ってきます。
+
+</Step>
+</Steps>
ランタイムがオフラインの場合、メッセージはオンラインに戻るまで待機します。エージェントがアーカイブされたり、あなたが実行権限を失ったりすると、新しいメッセージは送信できません。
-最初のメッセージの前に、選択したエージェントに設定された候補が最大3件表示されます。選ぶと完全なプロンプトが送信されずに入力欄へ入り、先に調整できます。候補が未設定のエージェントでは、ローカライズされた汎用例が使われます。
+最初のメッセージの前に、選択したエージェントに設定された候補が最大3件表示されます。選んでも完全なプロンプトが入力欄に入るだけで送信はされないので、先に手直しできます。候補が未設定のエージェントでは汎用の例が表示されます。
+
+エージェントが返信したあと、その下に**フォローアップ質問**が表示されることがあります。クリックするとそのまま送信されます。
+
+<ChatDemo />
+
+## どのページからでもチャットする
+
+いま開いているページを離れずにチャットできます。ワークスペースの各ページの右下には丸いチャットボタンがあり(ツールチップは「Multica に質問」)、クリックするとフローティングチャットが開きます。このウィンドウとサイドバーの**チャット**ページは同じ会話を共有しているので、どちらで始めた会話も、もう一方で続けられます。
+
+- `⌘J`(Windows と Linux では `Ctrl+J`)でフローティングチャットを開閉できます。開くとカーソルがメッセージ入力欄に入り、入力欄で文字を打っている最中でもこのキーで閉じられます。キーは**設定 → ショートカット**で変更できます。詳しくは[検索・ショートカット・環境設定](/shortcuts)を参照してください。
+- ウィンドウは端をドラッグしてサイズを変えられるほか、展開や最小化もできます。エージェントが返信している間は、閉じた状態のチャットボタンが小さく脈打ちます。
+- **チャット**ページ自体にはこのボタンが表示されず、`⌘J` も効きません。ページ全体ですでに同じ会話を表示しているためです。
+
+フローティングチャットが不要なら、**設定 → 環境設定 → コメントとチャット**で**フローティングチャット**をオフにします。以後チャットはサイドバーからだけ開けます。この設定は今使っているデバイスにだけ適用されます。
## チャットとタスクの使い分け
@@ -35,7 +68,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| チームメンバーが背景を確認して議論を続ける | **タスク** |
| 作業記録を残さずにワークスペースの情報を確認する | **チャット** |
-Multica で作成したダイレクトチャットは作成者だけが見られます。他のワークスペースメンバーや管理者は読めません。チームで共有すべき結論は、タスク、プロジェクトの説明、またはスキルにまとめてください。
+Multica で作成したダイレクトチャットを読めるのは作成者だけで、ほかのメンバーや管理者は読めません。チームで見るべき結論は、タスク、プロジェクトの説明、またはスキルにまとめてください。
## マルチターンのコンテキスト
@@ -47,7 +80,28 @@ Multica で作成したダイレクトチャットは作成者だけが見られ
エージェントの実行中は、現在のフェーズとツールのアクティビティが画面に表示されます。**詳細を表示**を展開すると、より完全な実行過程を確認できます。
-中断するには、入力欄の横にある停止ボタンをクリックします。すでにチャットへ返ってきた内容は保持され、まだ処理されていない入力は可能な限り編集欄に復元されます。
+中断するには、入力欄の横にある停止ボタン(入力欄が空のときに表示)をクリックします。すでにチャットへ返ってきた内容は保持されます。
+
+エージェントがまだ何も出力していないうちに止めた場合、送ったばかりのメッセージは会話から取り下げられ、添付ファイルごと入力欄に戻るので、手直しして送り直せます。停止が完了するまで少し時間がかかることがありますが、その間にページを再読み込みしたりウィンドウを閉じたりしてもメッセージは失われず、次にその会話を開いたときに入力欄に戻ります。入力欄に別の下書きがある場合は、それを空にするまで待ちます。
+
+## 返信中に続けてメッセージを送る
+
+エージェントが返信している間も、次のメッセージを入力できます。入力欄に内容があると、送信ボタンは**キューに追加**に変わります。キューに入ったメッセージは今の返信を中断せず、入力欄の上のキューで待ち、返信が終わると順番に処理されます。
+
+| 操作 | 結果 |
+|---|---|
+| **指示** | このメッセージを先頭に移し、今の返信を停止します。エージェントがすでに書いた内容は会話に残り、続けてこのメッセージを処理します。 |
+| 削除(ゴミ箱アイコン) | メッセージをキューから外します。エージェントには送られません。 |
+| **⋯ → キュー内のメッセージを編集** | メッセージを添付ファイルごと入力欄に戻します。直してから送り直せます。 |
+| **⋯ → すべて削除** | キュー内のメッセージをすべて取り消します。今の返信はそのまま続きます。 |
+
+今の返信が実際に始まるまで(たとえばランタイムに受け取られるのを待っている間)は**指示**を使えません。エージェントを実行する権限を失った場合も使えません。
+
+<ChatQueueDemo />
+
+<Callout>
+ここでの**指示**は、まず今の返信を止めます。タスクのコメントで使う[現在の実行に追加](/mentioning-agents#実行中のエージェントに割り込む)は別の動きで、実行を中断せず、エージェントは今のステップが終わったところでメッセージを読み、元のタスクを続けます。
+</Callout>
## チャット一覧の整理
@@ -68,4 +122,5 @@ Multica で作成したダイレクトチャットは作成者だけが見られ
- [タスクをエージェントに割り当てる](/assigning-issues) — 議論を追跡可能な作業に変えます。
- [インボックスと購読](/inbox) — フォローが必要なチームの動きを確認します。
+- [検索・ショートカット・環境設定](/shortcuts) — キーボードでチャットを開き、検索し、ページを移動します。
- [AI コーディングツール対応表](/providers) — セッションとモデルの機能を確認します。
diff --git a/apps/docs/content/docs/chat.ko.mdx b/apps/docs/content/docs/chat.ko.mdx
index 7f40ced9c9..607e0c7198 100644
--- a/apps/docs/content/docs/chat.ko.mdx
+++ b/apps/docs/content/docs/chat.ko.mdx
@@ -1,30 +1,63 @@
---
title: 에이전트와 대화
-description: 어떤 태스크에도 속하지 않는, 에이전트와의 일대일 대화. 대화 전체가 완전히 비공개이며, 에이전트는 기본적으로 태스크 컨텍스트를 갖지 않고 태스크를 자동으로 만들지도 않습니다 — 다만 당신이 명시적으로 요청하면 당신의 워크스페이스 권한으로 당신을 대신해 작업합니다.
+description: 에이전트와 일대일로 나누는 대화로, 나만 볼 수 있습니다. 에이전트는 기본적으로 태스크 컨텍스트가 없고 스스로 태스크를 만들지 않으며, 명시적으로 요청하면 내 워크스페이스 권한으로 대신 작업합니다.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { ChatDemo } from "@/components/demos/chat-demo";
+import { ChatQueueDemo } from "@/components/demos/chat-queue-demo";
-대화는 아직 명확한 태스크가 되지 않은 작업에 적합합니다. 아이디어를 정리하고, 워크스페이스 상황을 조회하고, 방안을 논의하거나, 에이전트에게 작은 작업을 먼저 맡길 수 있습니다.
+대화는 아직 명확한 태스크가 되지 않은 작업에 적합합니다. 아이디어를 정리하고, 워크스페이스 상황을 조회하고, 방안을 논의하고, 어떤 태스크에도 속하지 않는 질문을 하거나, 에이전트에게 작은 작업을 먼저 맡길 수 있습니다.
-**대화(Chat)는 당신과 [에이전트](/agents) 사이의 일대일 소통입니다** — [태스크](/issues) 보드에서 벗어나는 것입니다. 에이전트는 기본적으로 **태스크 컨텍스트가 없으며** — 당신의 보드를 보고 있지 않고, 대화를 스스로 태스크로 바꾸지도 않습니다 — 대화 전체가 **완전히 비공개**입니다([워크스페이스](/workspaces) 내의 다른 누구도, admin을 포함해서, 이 대화를 볼 수 없습니다). 에이전트와 접근 방식을 논의하거나, 브레인스토밍을 하거나, 어떤 태스크에도 속하지 않는 질문을 하기에 적합합니다.
+대화(Chat)는 나와 [에이전트](/agents) 사이의 일대일 소통이며, [태스크](/issues) 보드 밖에서 이루어집니다. 대화 전체는 **완전히 비공개**여서 [워크스페이스](/workspaces)의 다른 사람은 admin을 포함해 아무도 볼 수 없습니다.
-대화는 **특정 태스크에 연결되지 않습니다**. 에이전트가 태스크 설명과 댓글을 자동으로 받지는 않지만, 권한 범위 안에서 Multica CLI로 워크스페이스, 프로젝트, 태스크, 스킬을 조회할 수 있습니다.
+대화는 **태스크에 연결되지 않습니다**. 에이전트는 내 보드를 보고 있지 않고, 태스크 설명과 댓글을 자동으로 받지 않으며, 대화를 스스로 태스크로 바꾸지도 않습니다. 그래도 권한 범위 안에서 Multica CLI로 워크스페이스, 프로젝트, 태스크, 스킬을 조회할 수 있고, 명시적으로 요청하면 내 워크스페이스 권한으로 대신 작업합니다. 예를 들어 태스크를 만들 수 있습니다.
대화에 배경을 추가할 수도 있습니다. 입력란 왼쪽 아래의 **+**를 클릭하고 **프로젝트 컨텍스트**를 선택해 대화에 [프로젝트](/projects)를 연결하세요. 에이전트는 실행할 때 해당 프로젝트의 설명과 저장소 같은 리소스를 받습니다.
-![에이전트와의 대화: 질문에 표로 정리된 답변이 돌아온 모습](/images/docs/chat-conversation.webp)
-
## 대화 시작
-1. 사이드바에서 **대화**를 엽니다.
-2. 새 대화를 클릭하고 실행 권한이 있는 에이전트를 선택합니다.
-3. 메시지를 입력합니다. 이미지나 파일을 첨부할 수도 있습니다.
-4. 전송하면 Multica가 이 메시지에 대한 실행을 만들고 답변은 현재 대화로 돌아옵니다.
+<Steps>
+<Step>
+
+사이드바에서 **채팅**을 엽니다.
+
+</Step>
+<Step>
+
+새 대화를 클릭하고 실행 권한이 있는 에이전트를 선택합니다.
+
+</Step>
+<Step>
+
+메시지를 입력합니다. 이미지나 파일을 첨부할 수도 있습니다.
+
+</Step>
+<Step>
+
+전송하면 Multica가 이 메시지에 대한 실행을 만들고 답변은 현재 대화로 돌아옵니다.
+
+</Step>
+</Steps>
런타임이 오프라인이면 다시 온라인이 될 때까지 메시지가 기다립니다. 에이전트가 보관 처리되거나 호출 권한을 잃으면 새 메시지를 보낼 수 없습니다.
-첫 메시지를 보내기 전에 선택한 에이전트에 설정된 추천이 최대 3개 표시됩니다. 선택하면 전체 프롬프트가 전송되지 않고 입력창에 채워져 먼저 수정할 수 있습니다. 추천이 없는 에이전트에는 현지화된 범용 예시가 사용됩니다.
+첫 메시지를 보내기 전에 선택한 에이전트에 설정된 추천이 최대 3개 표시됩니다. 하나를 선택하면 전체 프롬프트가 입력창에 채워질 뿐 전송되지 않으므로 먼저 고칠 수 있습니다. 추천이 설정되지 않은 에이전트에는 범용 예시가 표시됩니다.
+
+에이전트가 답변한 뒤 그 아래에 **후속 질문**이 나올 때가 있습니다. 클릭하면 바로 전송됩니다.
+
+<ChatDemo />
+
+## 어느 페이지에서나 채팅하기
+
+지금 보고 있는 페이지를 떠나지 않고도 채팅할 수 있습니다. 워크스페이스 페이지 오른쪽 아래에 둥근 채팅 버튼이 있고(툴팁은 'Multica에 묻기'), 클릭하면 플로팅 채팅 창이 열립니다. 이 창과 사이드바의 **채팅** 페이지는 같은 대화를 공유하므로, 어느 쪽에서 시작한 대화든 다른 쪽에서 이어서 할 수 있습니다.
+
+- `⌘J`(Windows와 Linux에서는 `Ctrl+J`)로 플로팅 채팅 창을 열고 닫습니다. 창을 열면 커서가 메시지 입력란에 놓이고, 입력란에서 글을 쓰는 중에도 이 키로 닫을 수 있습니다. 키는 **설정 → 단축키**에서 바꿀 수 있습니다. [검색, 단축키, 환경설정](/shortcuts)을 참고하세요.
+- 창 가장자리를 끌어 크기를 조절하거나, 창을 펼치거나 최소화할 수 있습니다. 에이전트가 답변하는 동안에는 닫힌 채팅 버튼이 살짝 맥박치듯 움직입니다.
+- **채팅** 페이지에는 이 버튼이 표시되지 않고 `⌘J`도 동작하지 않습니다. 페이지 전체가 이미 같은 대화를 보여 주기 때문입니다.
+
+플로팅 창이 필요 없다면 **설정 → 환경설정 → 댓글 및 채팅**에서 **플로팅 채팅 창**을 끄세요. 그 뒤에는 사이드바에서만 채팅에 들어갈 수 있습니다. 이 설정은 지금 쓰는 기기에만 적용됩니다.
## 대화와 태스크 선택
@@ -35,7 +68,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| 팀 멤버가 배경을 확인하고 논의를 이어가게 하기 | **태스크** |
| 작업 기록을 만들 필요 없이 워크스페이스 정보를 임시로 확인 | **대화** |
-Multica에서 만든 직접 대화는 만든 사람만 볼 수 있으며 다른 워크스페이스 멤버와 관리자도 읽을 수 없습니다. 팀이 함께 확인해야 하는 결론은 태스크, 프로젝트 설명, 스킬 중 하나로 정리하세요.
+Multica에서 만든 직접 대화는 만든 사람만 읽을 수 있고, 다른 멤버와 관리자는 읽을 수 없습니다. 팀이 함께 봐야 하는 결론은 태스크, 프로젝트 설명, 스킬에 정리하세요.
## 여러 대화 턴의 컨텍스트
@@ -47,7 +80,28 @@ Multica에서 만든 직접 대화는 만든 사람만 볼 수 있으며 다른
에이전트가 실행 중이면 화면에 현재 단계와 도구 활동이 표시됩니다. **상세 보기**를 펼치면 더 자세한 실행 과정을 확인할 수 있습니다.
-중단하려면 입력란 옆의 중지 버튼을 클릭하세요. 대화에 이미 반환된 내용은 유지되며 아직 처리를 시작하지 않은 입력은 가능한 경우 편집란으로 복원됩니다.
+중단하려면 입력란 옆의 중지 버튼(입력란이 비어 있을 때 표시)을 클릭하세요. 대화에 이미 반환된 내용은 유지됩니다.
+
+에이전트가 아직 아무것도 출력하지 않았을 때 멈추면, 방금 보낸 메시지가 대화에서 빠지고 첨부 파일과 함께 입력란으로 돌아오므로 고쳐서 다시 보낼 수 있습니다. 중지가 끝나기까지 조금 걸릴 때가 있는데, 그사이 페이지를 새로 고치거나 창을 닫아도 메시지는 사라지지 않고 다음에 그 대화를 열 때 입력란으로 돌아옵니다. 입력란에 다른 초안이 있으면 그 초안을 비울 때까지 기다립니다.
+
+## 답변 중에 메시지 이어서 보내기
+
+에이전트가 답변하는 동안에도 다음 메시지를 입력할 수 있습니다. 입력란에 내용이 있으면 보내기 버튼이 **대기열에 추가**로 바뀝니다. 대기열에 들어간 메시지는 현재 답변을 끊지 않고 입력란 위의 대기열에서 기다리다가, 답변이 끝나면 순서대로 처리됩니다.
+
+| 동작 | 결과 |
+|---|---|
+| **지시** | 이 메시지를 맨 앞으로 옮기고 현재 답변을 멈춥니다. 에이전트가 이미 쓴 내용은 대화에 남고, 이어서 이 메시지를 처리합니다. |
+| 삭제(휴지통 아이콘) | 메시지를 대기열에서 뺍니다. 에이전트에게는 전달되지 않습니다. |
+| **⋯ → 대기 중인 메시지 편집** | 메시지를 첨부 파일과 함께 입력란으로 되돌립니다. 고친 뒤 다시 보내면 됩니다. |
+| **⋯ → 모두 지우기** | 대기 중인 메시지를 모두 취소합니다. 현재 답변은 그대로 이어집니다. |
+
+현재 답변이 실제로 시작되기 전(예: 런타임이 가져가기를 기다리는 중)에는 **지시**를 쓸 수 없고, 에이전트를 실행할 권한을 잃은 뒤에도 쓸 수 없습니다.
+
+<ChatQueueDemo />
+
+<Callout>
+여기서 **지시**는 현재 답변부터 멈춥니다. 태스크 댓글의 [현재 실행에 추가](/mentioning-agents#실행-중인-에이전트에게-끼어들기)는 다르게 동작합니다. 실행을 끊지 않고, 에이전트가 현재 단계를 마친 뒤 메시지를 읽고 원래 태스크를 이어 갑니다.
+</Callout>
## 대화 목록 정리
@@ -68,4 +122,5 @@ Multica에서 만든 직접 대화는 만든 사람만 볼 수 있으며 다른
- [태스크를 에이전트에게 할당하기](/assigning-issues) — 논의를 추적 가능한 작업으로 전환합니다.
- [인박스와 구독](/inbox) — 확인해야 할 팀 활동을 살펴봅니다.
+- [검색, 단축키, 환경설정](/shortcuts) — 키보드로 채팅을 열고, 검색하고, 페이지를 오갑니다.
- [AI 코딩 도구 비교](/providers) — 세션과 모델 기능을 알아봅니다.
diff --git a/apps/docs/content/docs/chat.mdx b/apps/docs/content/docs/chat.mdx
index f25904dfc4..4cb8f11f8e 100644
--- a/apps/docs/content/docs/chat.mdx
+++ b/apps/docs/content/docs/chat.mdx
@@ -1,30 +1,63 @@
---
title: Chat with agents
-description: One-to-one, fully private conversation with an agent, outside any issue. The agent starts with no issue context and never auto-creates issues — but it acts with your workspace access when you explicitly ask it to.
+description: A one-to-one conversation with an agent that only you can see. The agent starts with no issue context and doesn't create issues on its own; when you explicitly ask, it acts with your workspace access.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { ChatDemo } from "@/components/demos/chat-demo";
+import { ChatQueueDemo } from "@/components/demos/chat-queue-demo";
-Chat fits work that hasn't formed a clear issue yet: sorting out ideas, checking on the workspace, discussing an approach, or having an agent finish a small task first.
+Chat fits work that hasn't become a clear issue yet: sorting out ideas, checking on the workspace, discussing an approach, asking a question that doesn't belong to any issue, or having an agent finish a small task first.
-**Chat is a one-to-one conversation between you and an [agent](/agents)** — stepping outside the [issue](/issues) board. The agent starts with **no issue context** — it isn't looking at your board and won't turn the conversation into issues on its own — and the entire conversation is **fully private** (nobody else in the [workspace](/workspaces), including admins, can see it). It fits discussing an approach with an agent, brainstorming, or asking a question that does not belong to any issue.
+Chat is a one-to-one conversation between you and an [agent](/agents), off the [issue](/issues) board. The whole conversation is **fully private**: nobody else in the [workspace](/workspaces), admins included, can see it.
-A chat is **not bound to any issue**: the agent doesn't automatically receive an issue's description and comments, but it can still use the Multica CLI to query workspaces, projects, issues, and skills within its permissions.
+A chat is **not bound to any issue**. The agent isn't watching your board, doesn't automatically receive an issue's description and comments, and won't turn the conversation into issues on its own. It can still use the Multica CLI to query workspaces, projects, issues, and skills within its permissions, and when you explicitly ask, it acts with your workspace access, for example to create an issue.
A chat can also carry background. Click **+** at the bottom left of the input and choose **Project context** to attach a [project](/projects) to the conversation; when the agent runs, it receives that project's description, repositories, and other resources.
-![A chat with an agent: a question answered with the result organized into a table](/images/docs/chat-conversation.webp)
-
## Start a conversation
-1. Open **Chat** in the sidebar.
-2. Click new and pick an agent you have permission to run.
-3. Type a message; you can also attach images or files.
-4. After you send, Multica creates a run for the message, and the reply comes back to the current conversation.
+<Steps>
+<Step>
+
+Open **Chat** in the sidebar.
+
+</Step>
+<Step>
+
+Click new and pick an agent you have permission to run.
+
+</Step>
+<Step>
+
+Type a message; you can also attach images or files.
+
+</Step>
+<Step>
+
+After you send, Multica creates a run for the message, and the reply comes back to the current conversation.
+
+</Step>
+</Steps>
If the runtime is offline, the message waits until it comes back online. Once the agent is archived, or you lose permission to run it, you can't send new messages.
-Before the first message, Chat shows up to three suggestions configured for the selected agent. Selecting one copies its full prompt into the composer without sending it, so you can adapt it first. Agents without configured suggestions use localized general-purpose examples.
+Before the first message, Chat shows up to three suggestions configured for the selected agent. Selecting one only fills the composer with its full prompt; nothing is sent, so you can edit it first. Agents without configured suggestions show general-purpose examples.
+
+After the agent replies, it sometimes offers **Follow-up questions** below the reply. Clicking one sends it right away.
+
+<ChatDemo />
+
+## Chat from any page
+
+You don't have to leave the page you're on to chat. Workspace pages have a round chat button in the bottom-right corner (its tooltip reads "Ask Multica"), which opens a floating chat window. The window and the **Chat** page share the same conversations, so you can pick up a chat from either one.
+
+- Press `⌘J` (`Ctrl+J` on Windows and Linux) to open or close the floating window; opening it puts the cursor in the message input. The key works while you're typing in that input, too. You can rebind it under **Settings → Shortcuts**; see [Search, shortcuts, and preferences](/shortcuts).
+- Drag the window's edges to resize it, or expand or minimize it. While an agent is replying, the closed chat button pulses gently.
+- The **Chat** page itself doesn't show the button, and `⌘J` does nothing there: the page already shows the same conversation.
+
+If you don't want the floating window, turn off **Floating chat window** under **Settings → Preferences → Comments & chat**. Chat is then reachable only from the sidebar. The switch applies to the current device only.
## Chat vs. issues
@@ -35,7 +68,7 @@ Before the first message, Chat shows up to three suggestions configured for the
| Letting teammates see the background and continue the discussion | **Issue** |
| A quick look at workspace information with no work record needed | **Chat** |
-Direct chats created in Multica are visible only to their creator; other workspace members and admins cannot read them. Conclusions the team needs to see together should be written into an issue, a project description, or a skill.
+Direct chats created in Multica can be read only by their creator, not by other members or admins. Put conclusions the team needs to see into an issue, a project description, or a skill.
## Multi-turn context
@@ -47,7 +80,28 @@ If the local session no longer exists, the context can't be continued, or the pr
While the agent runs, the UI shows the current phase and tool activity. Expand **View details** to inspect the run in full.
-To interrupt, click the stop button next to the input. Content already returned to the conversation is kept; input not yet processed is restored to the editor when possible.
+To interrupt, click the stop button next to the input (shown while the input is empty). Content already returned to the conversation is kept.
+
+If the agent hadn't produced anything yet, the message you just sent is taken back out of the conversation and returned to the input, attachments included, so you can edit and resend it. Stopping sometimes takes a moment to finish; refreshing the page or closing the window in the meantime doesn't lose the message, and it comes back to the input the next time you open that conversation. If the input already holds another draft, the message waits until you clear it.
+
+## Send messages while a reply is in progress
+
+You can keep typing while the agent is still replying. Once the input has content, the send button becomes **Queue message**. Queued messages don't interrupt the current reply; they wait in a queue above the input and are handled in order after the reply ends.
+
+| Action | Result |
+|---|---|
+| **Steer** | Moves this message to the front and stops the current reply. What the agent already wrote stays in the conversation, and it handles this message next. |
+| Remove (trash icon) | Takes the message out of the queue; it is never sent to the agent. |
+| **⋯ → Edit queued message** | Puts the message and its attachments back in the input so you can change it and send it again. |
+| **⋯ → Clear all** | Withdraws every queued message. The current reply keeps going. |
+
+**Steer** is unavailable until the current reply has actually started (for example, while it still waits for a runtime to pick it up), and after you lose permission to run the agent.
+
+<ChatQueueDemo />
+
+<Callout>
+**Steer** here stops the current reply first. [Add to current run](/mentioning-agents#steer-a-running-agent) in issue comments works differently: it doesn't interrupt the run, and the agent reads the message after its current step and carries on with the original task.
+</Callout>
## Organize the conversation list
@@ -68,4 +122,5 @@ Deleting a conversation cannot be undone and stops any runs in it that haven't f
- [Assign issues to agents](/assigning-issues) — turn a discussion into trackable work.
- [Inbox and subscriptions](/inbox) — follow team activity that needs you.
+- [Search, shortcuts, and preferences](/shortcuts) — open chat, search, and move between pages from the keyboard.
- [Providers matrix](/providers) — session and model capabilities per AI coding tool.
diff --git a/apps/docs/content/docs/chat.zh.mdx b/apps/docs/content/docs/chat.zh.mdx
index 83adf6bdad..c5d1247c0d 100644
--- a/apps/docs/content/docs/chat.zh.mdx
+++ b/apps/docs/content/docs/chat.zh.mdx
@@ -1,30 +1,63 @@
---
title: 与智能体对话
-description: 和智能体一对一独立聊天,整段对话完全私人。智能体默认没有任何任务上下文、也不会自动建任务——但你明确要求时,它会以你的工作区权限代你操作。
+description: 和智能体一对一聊天,整段对话只有你能看到。智能体默认没有任务上下文,也不会自己建任务;你明确要求时,它会以你的工作区权限代你操作。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { ChatDemo } from "@/components/demos/chat-demo";
+import { ChatQueueDemo } from "@/components/demos/chat-queue-demo";
-对话适合还没有形成明确任务的工作:梳理想法、查询工作区情况、讨论方案,或者先让智能体完成一个小任务。
+对话适合还没有形成明确任务的工作:梳理想法、查询工作区情况、讨论方案、问一个不属于任何任务的问题,或者先让智能体完成一个小任务。
-**对话(Chat)是你和 [智能体](/agents) 的一对一独立沟通**——跳出 [任务](/issues) 看板。智能体默认**没有任何任务上下文**——它不盯着你的看板,也不会自己把对话变成任务——整段对话**完全私人**([工作区](/workspaces) 里其他人、包括 admin 都看不到)。适合和智能体讨论方案、做 brainstorming、问一个不属于任何任务的问题。
+对话(Chat)是你和[智能体](/agents)的一对一沟通,不在[任务](/issues)看板上。整段对话**完全私人**,[工作区](/workspaces)里的其他人,包括 admin,都看不到。
-对话**不绑定某一条任务**:智能体不会自动收到任务的描述和评论,但仍可以在权限范围内用 Multica CLI 查询工作区、项目、任务和 skill。
+对话**不绑定任务**。智能体不盯着你的看板,不会自动收到任务的描述和评论,也不会自己把对话变成任务。它仍可以在权限范围内用 Multica CLI 查询工作区、项目、任务和 skill;你明确要求时,它会以你的工作区权限代你操作,例如建一个任务。
对话也可以携带背景。点击输入框左下角的 **+**,选择**项目上下文**,为对话挂上一个[项目](/projects);智能体执行时会收到该项目的描述和仓库等资源。
-![与智能体的对话:提问后得到整理成表格的回答](/images/docs/chat-conversation.webp)
-
## 开始对话
-1. 打开侧边栏中的**对话**。
-2. 点击新建,选择一个你有权运行的智能体。
-3. 输入消息,也可以附加图片或文件。
-4. 发送后,Multica 会为这条消息创建一次执行,回复会回到当前对话。
+<Steps>
+<Step>
+
+打开侧边栏中的**聊天**。
+
+</Step>
+<Step>
+
+点击新建,选择一个你有权运行的智能体。
+
+</Step>
+<Step>
+
+输入消息,也可以附加图片或文件。
+
+</Step>
+<Step>
+
+发送后,Multica 会为这条消息创建一次执行,回复回到当前对话。
+
+</Step>
+</Steps>
运行时离线时,消息会等待它重新上线。智能体被归档,或者你失去调用权限后,不能继续发送新消息。
-第一条消息发送前,对话页会显示所选智能体配置的最多三个建议。选择后会把完整提示词填入输入框而不会发送,方便你先调整。未配置建议的智能体会使用本地化的通用示例。
+第一条消息发送前,对话页会显示所选智能体配置的最多三个建议。选择一条只会把完整提示词填进输入框,不会发送,你可以先改再发。没有配置建议的智能体显示通用示例。
+
+智能体回复后,下方有时会给出**后续提问**。后续提问点击后直接发送。
+
+<ChatDemo />
+
+## 在任意页面打开悬浮聊天窗
+
+不用离开当前页面也能聊天。工作区页面的右下角有一个圆形聊天按钮,悬停时提示"问 Multica",点开是一个悬浮聊天窗。窗里的对话和**聊天**页是同一份,在哪边开始的对话,另一边都能接着聊。
+
+- 按 `⌘J`(Windows / Linux 上是 `Ctrl+J`)打开或收起悬浮窗,打开后光标直接落在输入框里。光标在输入框里时也能用这个键收起。按键可以在**设置 → 快捷键**里改,见[搜索、快捷键与偏好设置](/shortcuts)。
+- 悬浮窗可以拖动边缘调整大小,也可以展开或最小化。智能体正在回复时,收起后的按钮会轻轻跳动。
+- **聊天**页本身不显示这个按钮,`⌘J` 在这里也不起作用:整页显示的已经是同一段对话。
+
+不需要悬浮窗时,在**设置 → 偏好设置 → 评论与聊天**里关闭**悬浮聊天窗**,之后只能从侧边栏进入聊天。这个开关只对当前设备生效。
## 对话与任务的选择
@@ -35,7 +68,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| 让团队成员查看背景并继续讨论 | **任务** |
| 临时查看工作区信息,不需要建立工作记录 | **对话** |
-在 Multica 中创建的直接对话只对创建者开放,其他工作区成员和管理员不能读取。需要团队共同查看的结论,应整理到任务、项目说明或 skill 中。
+在 Multica 中创建的直接对话只有创建者能读取,其他成员和管理员都不能。需要团队一起看的结论,整理到任务、项目说明或 skill 中。
## 多轮上下文
@@ -47,7 +80,28 @@ import { Callout } from "fumadocs-ui/components/callout";
智能体运行时,界面会显示当前阶段和工具活动。展开**查看详情**可以检查更完整的执行过程。
-需要中断时,点击输入框旁的停止按钮。已经返回到对话中的内容会保留;尚未开始处理的输入会尽量恢复到编辑框中。
+需要中断时,点击输入框旁的停止按钮(输入框为空时显示)。已经返回到对话中的内容会保留。
+
+如果智能体还没输出任何内容就被停下,你刚发的那条消息会从对话里撤回,连同附件放回输入框,改一改就能重发。停止有时要过一会儿才真正完成;这期间刷新页面或关掉窗口也不会丢,下次打开这段对话时,消息会回到输入框。输入框里已经有别的草稿时,会等你清空后再放回。
+
+## 回复还没结束时继续发消息
+
+智能体还在回复时,可以接着输入下一条。输入框有内容时,发送按钮变成**排队发送**。排队的消息不会打断当前回复,而是显示在输入框上方的队列里,等当前回复结束后按顺序处理。
+
+| 操作 | 结果 |
+|---|---|
+| **引导** | 把这条消息提到队首,并停止当前回复。已经写出的内容留在对话里,智能体紧接着处理这条消息。 |
+| 删除(垃圾桶图标) | 从队列里移除这条消息,它不会发给智能体。 |
+| **⋯ → 编辑排队消息** | 把消息连同附件放回输入框,改完重新发送。 |
+| **⋯ → 全部清空** | 撤回队列里的所有消息,当前回复照常进行。 |
+
+当前回复还没真正开始(例如还在等运行时领取)时,**引导**按钮不可用;失去这名智能体的运行权限后也不能引导。
+
+<ChatQueueDemo />
+
+<Callout>
+这里的**引导**会先停掉当前回复。任务评论里的[插话到当前运行](/mentioning-agents#给正在运行的智能体插话)不一样:它不中断运行,智能体在当前步骤结束后读到插话,然后继续原来的任务。
+</Callout>
## 整理对话列表
@@ -68,4 +122,5 @@ import { Callout } from "fumadocs-ui/components/callout";
- [分配任务给智能体](/assigning-issues) — 把讨论转成可追踪的工作。
- [收件箱与订阅](/inbox) — 查看需要你跟进的团队动态。
+- [搜索、快捷键与偏好设置](/shortcuts) — 用键盘打开聊天窗、搜索和切换页面。
- [AI 编程工具对照](/providers) — 了解会话和模型能力。
diff --git a/apps/docs/content/docs/cli.fr.mdx b/apps/docs/content/docs/cli.fr.mdx
index e771be7390..27d95963f3 100644
--- a/apps/docs/content/docs/cli.fr.mdx
+++ b/apps/docs/content/docs/cli.fr.mdx
@@ -4,12 +4,14 @@ description: Installez le CLI Multica, connectez-vous et gérez les espaces de t
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Le CLI Multica sert à la fois à connecter des runtimes locaux et à gérer, depuis le terminal, les espaces de travail, les tâches, les agents et les automatisations. Cette page présente les parcours courants ; les options prises en charge par la version installée sont toujours définies par le `--help` de chaque commande.
## Installation
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
@@ -21,12 +23,18 @@ Si Homebrew est installé, vous pouvez aussi exécuter :
brew install multica-ai/tap/multica
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
+
+Dans PowerShell, exécutez :
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
+</Tab>
+</Tabs>
+
Vérifiez l'installation :
```bash
@@ -35,13 +43,17 @@ multica version
## Première connexion
-Se connecter à Multica Cloud :
+Choisissez le service auquel vous vous connectez :
+
+<Tabs items={["Multica Cloud", "Instance auto-hébergée"]}>
+<Tab value="Multica Cloud">
```bash
multica setup
```
-Se connecter à une instance auto-hébergée :
+</Tab>
+<Tab value="Instance auto-hébergée">
```bash
multica setup self-host \
@@ -49,6 +61,9 @@ multica setup self-host \
--app-url https://app.example.com
```
+</Tab>
+</Tabs>
+
`setup` enregistre l'adresse du serveur, ouvre un navigateur pour finaliser la connexion et démarre le daemon. Une fois l'opération terminée, vérifiez :
```bash
@@ -117,6 +132,55 @@ multica issue run-messages <task-id> --issue MUL-123
multica issue cancel-task <task-id> --issue MUL-123
```
+Si une tâche ouverte portant le même titre (sans tenir compte de la casse ni des espaces en trop) existe déjà sous le même projet et le même parent, `issue create` refuse et indique cette tâche. Pour en créer une autre malgré tout, ajoutez `--allow-duplicate`. Pour marquer une tâche comme doublon d'une autre, utilisez `multica issue status MUL-124 cancelled --duplicate-of MUL-123`.
+
+### Chronologie
+
+`issue get` montre la tâche telle qu'elle est maintenant. `issue timeline` liste dans l'ordre les changements de statut, de priorité, d'assigné, de titre et de dates ainsi que les résultats des exécutions, entremêlés avec les commentaires. C'est la commande pour savoir « quand est-elle passée en in_review » ou « depuis combien de temps est-elle bloquée dans ce statut » :
+
+```bash
+multica issue timeline MUL-123 --action status_changed
+multica issue timeline MUL-123 --activity-only --output json
+multica issue timeline MUL-123 --since 2026-08-19T00:00:00Z
+```
+
+`--activity-only` retire les commentaires et garde tous les enregistrements d'activité ; `--action` ne renvoie que les actions indiquées, peut être répété et implique `--activity-only`. Le serveur limite l'historique qu'il lit ; si le résultat est tronqué, un avertissement s'affiche sur stderr, et il ne faut pas en déduire de durée.
+
+### Lire de longs fils de commentaires
+
+Sur une tâche très commentée, tout lire un par un coûte beaucoup de tokens à un agent. Parcourez d'abord les fils, puis ouvrez celui qui vous intéresse :
+
+```bash
+multica issue comment list MUL-123 --roots-only --summary --output json --compact
+multica issue comment list MUL-123 --thread <comment-id> --tail 5 --output json --compact
+```
+
+- `--roots-only` ne renvoie que les commentaires de premier niveau, chacun avec son nombre de réponses et l'heure de sa dernière activité.
+- `--summary` réduit chaque commentaire à un court aperçu.
+- `--compact` s'applique à la sortie JSON et retire les champs sans information (comme l'`issue_id` répété et les tableaux vides).
+- `--recent N` renvoie les N fils les plus récemment actifs avec toutes leurs réponses, ce qui peut être long.
+- Les fils résolus sont repliés par défaut sur le premier commentaire et la conclusion ; ajoutez `--full` pour le texte complet.
+
+Les listes peuvent aussi se limiter aux champs utiles : `multica issue list --output json --fields id,identifier,title,status`. Le filtrage a lieu dans la CLI : il réduit la sortie et le contexte, pas la requête.
+
+### Réveils
+
+Un réveil lance une exécution ordinaire d'un agent quand un événement se produit, qu'une condition devient vraie ou qu'une heure arrive. Les règles complètes figurent dans [Réveils de tâche](/issue-wakeups).
+
+```bash
+multica issue wakeup events
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --event comment.created --filter-actor-type member --filter-actor-id <user-id> \
+ --instruction "Quand ils répondent, mettre à jour le devis d'après leur réponse"
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --kind every --every 1h --expires-in 72h \
+ --instruction "Vérifier si le fournisseur a répondu"
+multica issue wakeup list MUL-123
+multica issue wakeup runs MUL-123 <wakeup-id>
+```
+
+Créer un réveil depuis un terminal en tant que membre demande `--agent-id` ; un agent qui en crée un pendant sa propre exécution se réveille lui-même par défaut.
+
## Agents et skills
```bash
@@ -141,6 +205,23 @@ multica skill import --url <skill-url> --on-conflict skip
`overwrite` n'est autorisé que pour le créateur du skill et conserve l'ID d'origine ainsi que les liaisons avec les agents.
+Les variables d'environnement et la configuration MCP contiennent souvent des tokens. Une valeur tapée sur la ligne de commande reste dans l'historique du shell et dans la sortie de `ps` ; passez-les plutôt par les formes `-file` ou `-stdin` :
+
+```bash
+multica agent create --name "Assistant ops" --runtime-id <runtime-id> \
+ --custom-env-file ./agent-env.json \
+ --mcp-config-file ./mcp.json \
+ --custom-args '["--max-turns", "40"]'
+
+multica agent env set <agent-id> --custom-env-stdin < agent-env.json
+multica agent update <agent-id> --mcp-config-file ./mcp.json
+```
+
+- Les options `--custom-env` n'existent que sur `agent create`. Pour modifier les variables ensuite, utilisez `agent env set`, qui remplace l'ensemble ; les clés dont la valeur est `****` gardent leur valeur actuelle.
+- `agent update --mcp-config null` efface la configuration MCP.
+- `--custom-args` est un tableau JSON placé à la fin des arguments de lancement. Choisissez le modèle avec `--model` ; certains outils refusent un `--model` dans les arguments personnalisés.
+- `--permission-mode` détermine qui peut invoquer l'agent : `private` pour le propriétaire seul, ou `public_to` avec `--public-to-workspace` ou `--public-to-member <user-id>`. `--visibility private|workspace` est l'ancienne forme, convertie en `--permission-mode` ; si les deux sont fournis, `--permission-mode` l'emporte.
+
## Daemon et runtimes
```bash
@@ -156,15 +237,45 @@ multica runtime usage <runtime-id>
multica runtime activity <runtime-id>
```
+```bash
+multica daemon autostart enable
+multica runtime usage <runtime-id> --days 30
+multica runtime update <runtime-id> --target-version <version> --wait
+multica runtime profile create --display-name "Wrapper Claude interne" \
+ --command-name ccms --runtime-type claude
+```
+
+`daemon autostart` enregistre le profil courant pour qu'il démarre à l'ouverture de session ; les différences entre plateformes sont décrites dans [Démarrage à l'ouverture de session](/daemon-runtimes#autostart). `runtime usage` couvre 90 jours par défaut, et `--days` va jusqu'à 365. `runtime update` demande au daemon de cette machine de mettre sa CLI à jour vers la version indiquée ; `--wait` attend la fin de la mise à jour. `runtime profile create` indique l'outil compatible avec `--runtime-type` (l'ancien `--protocol-family` fonctionne encore) ; les arguments fixes ne se définissent pour l'instant que dans l'application web.
+
La suppression d'un runtime auquel des agents actifs sont encore liés est refusée par défaut. `multica runtime delete <id> --cascade` dissocie ces agents, préserve leur configuration et leur historique, et annule leurs exécutions actives.
Consultez [Daemon et runtimes](/daemon-runtimes) pour son fonctionnement et les profils personnalisés.
+## Projets, espaces de travail et automatisations
+
+```bash
+multica project create --title "Campagne d'été" --lead "Lei Li" \
+ --repo https://github.com/acme/campaign-site
+multica project resource add <project-id> --type github_repo \
+ --url https://github.com/acme/brand-assets --default-branch-hint main
+
+multica workspace create --name "Opérations" --slug ops --issue-prefix OPS
+multica workspace update --context-stdin < team-context.md
+
+multica autopilot create --title "Rapport de ventes hebdomadaire" --agent "Assistant ops" \
+ --mode create_issue --issue-title-template "Rapport de ventes {{date}}"
+multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Europe/Paris
+```
+
+- `--lead` prend le nom d'un membre ou d'un agent. `--default-branch-hint` indique seulement à l'agent la branche par défaut du dépôt ; il ne change pas de branche.
+- Le `--context` d'un espace de travail est fourni à tous ses agents. `--slug` ne peut plus être modifié après la création. `--issue-prefix` est mis en majuscules ; le changer renumérote toutes les tâches existantes, et les anciens identifiants cités ailleurs ne mènent plus nulle part.
+- `--issue-title-template` ne remplace que `{{date}}` (UTC, `YYYY-MM-DD`) et refuse tout autre `{{...}}`. Le `--timezone` d'un déclencheur planifié vaut UTC par défaut.
+
## Vue d'ensemble des commandes
| Commande | Rôle |
| --- | --- |
-| `issue` | Créer, mettre à jour, assigner et rechercher des tâches ; gérer les commentaires, les abonnés, les étiquettes, les propriétés et les exécutions |
+| `issue` | Créer, mettre à jour, assigner et rechercher des tâches ; gérer les commentaires, les abonnés, les étiquettes, les propriétés, les réveils, la chronologie et les exécutions |
| `project` | Gérer les projets et leurs ressources |
| `label`, `property` | Gérer les étiquettes et les propriétés personnalisées de l'espace de travail |
| `agent`, `skill`, `squad` | Gérer les agents, les skills et les squads |
@@ -234,9 +345,9 @@ Les tableaux ci-dessous couvrent toutes les commandes de premier niveau actuelle
| Commande | Sous-commande | Rôle | Options principales |
| --- | --- | --- | --- |
-| `issue` | `list` | Lister les tâches | `--status`, `--priority`, `--assignee`, `--project`, `--metadata` (répétable), `--property` (répétable, `"Name=Value"` ; `__none__` correspond à une valeur non définie), `--limit`, `--offset`, `--sort` (y compris `property:<name-or-id>`), `--full-id`, `--resolve-properties` (JSON uniquement ; lignes avec les noms de propriété, d'option et de membre à côté des ID enregistrés) |
+| `issue` | `list` | Lister les tâches | `--status`, `--priority`, `--assignee`, `--project`, `--metadata` (répétable), `--property` (répétable, `"Name=Value"` ; `__none__` correspond à une valeur non définie), `--limit`, `--offset`, `--sort` (y compris `property:<name-or-id>`), `--full-id`, `--resolve-properties` (JSON uniquement ; lignes avec les noms de propriété, d'option et de membre à côté des ID enregistrés), `--fields` (JSON uniquement ; champs à conserver, séparés par des virgules) |
| | `get <id>` | Afficher une tâche | `--resolve-properties` (JSON uniquement ; lignes avec les noms de propriété, d'option et de membre à côté des ID enregistrés) |
-| | `create` | Créer une tâche | `--title` (obligatoire), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment` (répétable) |
+| | `create` | Créer une tâche | `--title` (obligatoire), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment` (répétable), `--property` (répétable), `--allow-duplicate` (crée même si une tâche ouverte porte le même titre) |
| | `update <id>` | Mettre à jour les champs d'une tâche | Mêmes champs que `create`, plus `--position`, `--no-start`, `--duplicate-of` |
| | `assign <id>` | Assigner ou désassigner | `--to` (correspondance approximative sur le nom parmi les membres, les agents et les squads), `--to-id`, `--unassign`, `--no-start` |
| | `status <id> <status>` | Changer le statut | `--no-start`, `--duplicate-of` |
@@ -244,7 +355,9 @@ Les tableaux ci-dessous couvrent toutes les commandes de premier niveau actuelle
| | `search <query>` | Rechercher des tâches | `--limit`, `--include-closed` |
| | `children <id>` | Lister les sous-tâches regroupées par étape | |
| | `pull-requests <id>` | Lister les PR associées | |
-| | `comment list/add/delete/resolve/unresolve` | Gérer les commentaires | `add` : `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment` ; `list` : `--since`, `--thread`, `--tail` |
+| | `comment list/add/update/delete/resolve/unresolve` | Gérer les commentaires | `add` : `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment` ; `update` : `--expected-revision` (obligatoire), `--content` / `--content-stdin` / `--content-file` ; `list` : `--since`, `--thread`, `--tail`, `--recent`, `--roots-only`, `--summary`, `--compact`, `--full` |
+| | `timeline <id>` | Lister l'activité et les commentaires dans l'ordre chronologique | `--action` (répétable), `--activity-only`, `--since`, `--tail` |
+| | `wakeup events/list/get/create/update/disable/trigger/delete/checkin/runs` | Gérer les réveils de tâche ; voir [Réveils de tâche](/issue-wakeups) | `create` / `update` : `--agent-id`, `--kind` (`event`, `at`, `every`, `cron`), `--event`, `--at` / `--after`, `--every`, `--cron`, `--timezone`, conditions `--until-*`, `--expires-in` / `--expires-at`, `--instruction` / `--instruction-file` ; `checkin` : `--note` |
| | `subscriber list/add/remove <issue-id>` | Gérer les abonnés | `--user`, `--user-id` (par défaut, l'utilisateur actuel) |
| | `label list/add/remove <issue-id>` | Gérer les étiquettes d'une tâche | |
| | `metadata list/get/set/delete <issue-id>` | Gérer les métadonnées clé-valeur au niveau de la tâche | |
@@ -254,23 +367,23 @@ Les tableaux ci-dessous couvrent toutes les commandes de premier niveau actuelle
| | `usage <issue-id>` | Afficher la consommation de tokens agrégée | |
| | `rerun <id>` | Remettre en file une exécution pour l'assigné actuel | |
| | `cancel-task <task-id>` | Annuler une exécution en cours ou en file d'attente | `--issue` |
-| `project` | `list/get/create/update/delete` | Gérer les projets | |
+| `project` | `list/get/create/update/delete` | Gérer les projets | `create` : `--title` (obligatoire), `--lead`, `--status`, `--icon`, `--start-date`, `--due-date`, `--repo` (répétable) |
| | `status <id> <status>` | Changer le statut d'un projet | |
-| | `resource list/add/update/remove` | Gérer les ressources d'un projet | `--type`, `--url`, `--local-path`, `--daemon-id`, `--execution-mode` (`in_place` / `worktree` pour un répertoire local) |
+| | `resource list/add/update/remove` | Gérer les ressources d'un projet | `--type`, `--url`, `--default-branch-hint`, `--ref`, `--local-path`, `--daemon-id`, `--execution-mode` (`in_place` / `worktree` pour un répertoire local) |
| `label` | `list/get/create/update/delete` | Gérer les étiquettes de l'espace de travail | `list` : `--resource-type` (`issue` ou `skill`), `--full-id` ; `create` : `--name`, `--color`, `--resource-type` (`issue` ou `skill`), `--description` |
| `property` | `list/get/create/update/archive/unarchive` | Gérer les propriétés personnalisées de l'espace de travail | `create` : `--name`, `--type` (`text`, `number`, `select`, `multi_select`, `date`, `checkbox`, `url`, `actor`, `multi_actor`), `--option` (répétable, types select uniquement) ; `list` : `--include-archived` ; le type ne peut plus être modifié après la création |
-| `agent` | `list/get/create/update/archive/restore` | Gérer les agents | `--name`, `--runtime-id` (obligatoire pour `create`), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--mcp-config`, `--permission-mode`, `--max-concurrent-tasks` |
+| `agent` | `list/get/create/update/archive/restore` | Gérer les agents | `--name`, `--runtime-id` (obligatoire pour `create`), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--custom-env` / `--custom-env-file` / `--custom-env-stdin` (`create` uniquement), `--custom-args`, `--mcp-config` / `--mcp-config-file` / `--mcp-config-stdin`, `--permission-mode`, `--visibility` (ancienne forme), `--max-concurrent-tasks` |
| | `copy <agent-id>` | Copier dans un nouvel agent ; l'original reste intact | `--name` (par défaut, le nom d'origine suivi de ` (copy)`), `--runtime-id` (copier vers un autre runtime exige aussi `--model`), `--no-skills` ; la configuration secrète comme `custom_env`, `mcp_config` et `runtime_config` n'est pas copiée — fournissez-la à nouveau avec les mêmes options que pour `create` |
| | `tasks <id>` | Afficher les exécutions d'un agent | |
| | `avatar <id>` | Envoyer un avatar | |
-| | `env get/set <agent-id>` | Lire et écrire les variables d'environnement personnalisées (propriétaires et administrateurs uniquement) | |
+| | `env get/set <agent-id>` | Lire et écrire les variables d'environnement personnalisées (propriétaire de l'agent ou owner/admin de l'espace de travail ; chaque lecture est enregistrée) | `set` : `--custom-env` / `--custom-env-file` / `--custom-env-stdin` ; remplace l'ensemble, et les clés dont la valeur est `****` gardent leur valeur |
| | `skills list/set/add <agent-id>` | Gérer les skills rattachés | `--skill-ids` (`set` remplace toute la liste, `add` ajoute à la suite) |
| | `mcp list/add/enable/disable/remove <agent-id>` | Assigner des serveurs MCP de l'espace de travail à cet agent | Récupérez l'ID du serveur avec `workspace mcp list`. Une entrée de la bibliothèque n'a aucun effet tant qu'elle n'est pas ajoutée ici ; `disable` cesse de l'envoyer sans supprimer l'assignation |
-| `autopilot` | `list/get/create/update/delete` | Gérer les automatisations | `create` : `--title`, `--agent`, `--mode` (tous obligatoires), `--project`, `--subscriber` (répétable) |
+| `autopilot` | `list/get/create/update/delete` | Gérer les automatisations | `create` : `--title`, `--agent`, `--mode` (tous obligatoires), `--description`, `--issue-title-template`, `--project`, `--subscriber` (répétable) |
| | `trigger <id>` | Déclencher une exécution manuellement | |
| | `runs <id>` | Afficher l'historique des exécutions | |
-| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | Gérer les déclencheurs de planification et webhook | |
-| `workspace` | `list/get/create/update/switch` | Gérer les espaces de travail ; `switch` définit l'espace de travail par défaut du profil actuel | |
+| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | Gérer les déclencheurs de planification et webhook | `trigger-add` : `--kind` (`schedule` ou `webhook`), `--cron`, `--timezone` (UTC par défaut), `--label` |
+| `workspace` | `list/get/create/update/switch` | Gérer les espaces de travail ; `switch` définit l'espace de travail par défaut du profil actuel | `create` : `--name`, `--slug` (tous deux obligatoires), `--issue-prefix`, `--description`, `--context` / `--context-stdin` ; `update` modifie les mêmes champs, sauf le slug |
| | `mcp list/add/update/remove` | Gérer la bibliothèque de serveurs MCP de l'espace de travail | Les écritures sont réservées aux propriétaires et administrateurs. Un serveur ajouté ici n'est assigné à aucun agent — attribuez-le à un agent avec `multica agent mcp add`. `list` n'affiche que les noms et les transports ; l'entrée enregistrée est en écriture seule et n'est jamais renvoyée. `--server-config-file` / `--server-config-stdin` gardent les jetons hors de l'historique du shell |
| | `member list/invite <email>` | Consulter les membres, envoyer des invitations | `invite` : `--role` (member ou admin, member par défaut) |
| `repo` | `list/add/remove/checkout` | Gérer les dépôts de l'espace de travail et les extraire localement | `--url` (répétable) ; `checkout` : `--ref` |
@@ -292,8 +405,9 @@ Les tableaux ci-dessous couvrent toutes les commandes de premier niveau actuelle
| | `stop` / `status` / `restart` | Arrêter, vérifier l'état, redémarrer (`restart` accepte les mêmes options que `start`) | |
| | `logs` | Afficher les journaux du daemon | `--follow`, `--lines` |
| | `disk-usage` | Afficher l'utilisation du disque local | `--by-workspace`, `--by-task`, `--top` |
-| `runtime` | `list/usage/activity/update/rename/delete` | Consulter et gérer les runtimes | `delete` : `--cascade` (dissocie les agents liés, préserve leurs données et annule leurs exécutions) |
-| | `profile list/create/update/delete` | Gérer les profils de runtime personnalisés | |
+| | `autostart enable/disable/status` | Enregistrer ou retirer le démarrage à l'ouverture de session pour le profil courant | `status` : `--output` |
+| `runtime` | `list/usage/activity/update/rename/delete` | Consulter et gérer les runtimes | `usage` : `--days` (90 par défaut, 365 au maximum) ; `update` : `--target-version` (obligatoire), `--wait` ; `delete` : `--cascade` (dissocie les agents liés, préserve leurs données et annule leurs exécutions) |
+| | `profile list/create/update/delete` | Gérer les profils de runtime personnalisés | `create` : `--display-name`, `--command-name` (tous deux obligatoires), `--runtime-type` (ou l'ancien `--protocol-family`), `--description` ; `update` : `--enabled` |
| | `profile set-path/unset-path <profile-id>` | Fixer le chemin d'un exécutable local (local uniquement, jamais envoyé au serveur) | |
### Additional
@@ -311,18 +425,9 @@ Les tableaux ci-dessous couvrent toutes les commandes de premier niveau actuelle
## Piloter Multica depuis un autre agent de codage
-Si l'essentiel de votre travail se passe déjà dans Codex, Claude Code ou Cursor, vous
-pouvez piloter Multica depuis ces outils au lieu de basculer vers un terminal. Le
-[skill Multica CLI](https://github.com/multica-ai/multica-cli) apprend à ces agents à
-utiliser les commandes de cette page en toute sécurité : lire les tâches et les fils de
-commentaires sans gaspiller de tokens, écrire les commentaires via un fichier, et gérer
-les effets de bord qu'entraînent les mentions, les changements de statut et les assignations.
-
-Il passe entièrement par votre CLI authentifié et n'accorde aucun accès qui lui soit propre :
-les permissions proviennent toujours de votre connexion, du profil sélectionné et de
-l'espace de travail. Il nécessite le CLI v0.4.26 ou ultérieur. Le README du dépôt explique
-l'installation via la marketplace de plugins de Claude Code, l'installateur de skills de
-Codex, Cursor et tout autre outil qui charge des instructions Markdown.
+Si l'essentiel de votre travail se passe déjà dans Codex, Claude Code ou Cursor, vous pouvez piloter Multica depuis ces outils au lieu de basculer vers un terminal. Le [skill Multica CLI](https://github.com/multica-ai/multica-cli) apprend à ces agents à utiliser les commandes de cette page en toute sécurité : lire les tâches et les fils de commentaires sans gaspiller de tokens, écrire les commentaires via un fichier, et gérer les effets de bord qu'entraînent les mentions, les changements de statut et les assignations.
+
+Il passe entièrement par votre CLI authentifié et n'accorde aucun accès qui lui soit propre : les permissions proviennent toujours de votre connexion, du profil sélectionné et de l'espace de travail. Il nécessite le CLI v0.4.26 ou ultérieur. Le README du dépôt explique l'installation via la marketplace de plugins de Claude Code, l'installateur de skills de Codex, Cursor et tout autre outil qui charge des instructions Markdown.
## Étapes suivantes
diff --git a/apps/docs/content/docs/cli.ja.mdx b/apps/docs/content/docs/cli.ja.mdx
index 5bc69f1dee..ee870df55b 100644
--- a/apps/docs/content/docs/cli.ja.mdx
+++ b/apps/docs/content/docs/cli.ja.mdx
@@ -4,12 +4,14 @@ description: Multica CLI をインストールしてサインインし、ター
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Multica CLI は、ローカルのランタイムを接続する役割と、ターミナルからワークスペース、タスク、エージェント、オートパイロットを管理する役割の両方を担います。このページではよく使う操作の流れを紹介します。現在のバージョンがサポートするフラグは、常に各コマンド自身の `--help` が正です。
## インストール
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
@@ -21,12 +23,18 @@ Homebrew がインストールされていれば、次のコマンドでもイ
brew install multica-ai/tap/multica
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
+
+PowerShell で実行します:
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
+</Tab>
+</Tabs>
+
インストールを確認します:
```bash
@@ -35,13 +43,17 @@ multica version
## 初回接続
-Multica Cloud に接続する:
+接続先のサービスを選びます:
+
+<Tabs items={["Multica Cloud", "セルフホストインスタンス"]}>
+<Tab value="Multica Cloud">
```bash
multica setup
```
-セルフホストインスタンスに接続する:
+</Tab>
+<Tab value="セルフホストインスタンス">
```bash
multica setup self-host \
@@ -49,6 +61,9 @@ multica setup self-host \
--app-url https://app.example.com
```
+</Tab>
+</Tabs>
+
`setup` はサーバーアドレスを保存し、ブラウザを開いてサインインを完了し、デーモンを起動します。完了したら確認します:
```bash
@@ -117,6 +132,55 @@ multica issue run-messages <task-id> --issue MUL-123
multica issue cancel-task <task-id> --issue MUL-123
```
+同じプロジェクト・同じ親タスクの下に、タイトルが同じ(大文字小文字と余分な空白は区別しない)未完了のタスクがすでにあると、`issue create` は作成を拒否してそのタスクを示します。それでも作る場合は `--allow-duplicate` を付けます。あるタスクを別のタスクの重複にするには `multica issue status MUL-124 cancelled --duplicate-of MUL-123` を使います。
+
+### タイムライン
+
+`issue get` はタスクの現在の状態を返します。`issue timeline` はステータス、優先度、担当者、タイトル、日付の変更と実行結果を時系列に並べ、コメントも混ぜて表示します。「いつ in_review に移ったか」「今のステータスにどれだけ留まっているか」を調べるときに使います。
+
+```bash
+multica issue timeline MUL-123 --action status_changed
+multica issue timeline MUL-123 --activity-only --output json
+multica issue timeline MUL-123 --since 2026-08-19T00:00:00Z
+```
+
+`--activity-only` はコメントを除き、すべてのアクティビティ記録を残します。`--action` は指定したアクションだけを返し、繰り返し指定でき、`--activity-only` を含意します。サーバーが読み込む履歴には上限があり、切り詰められた場合は stderr に警告が出ます。その結果から滞在時間を推定しないでください。
+
+### 長いコメントスレッドを読む
+
+コメントの多いタスクを 1 件ずつ読むと、エージェントは多くのトークンを使います。まずスレッドをざっと見て、必要なものだけを開きます。
+
+```bash
+multica issue comment list MUL-123 --roots-only --summary --output json --compact
+multica issue comment list MUL-123 --thread <comment-id> --tail 5 --output json --compact
+```
+
+- `--roots-only` はトップレベルのコメントだけを返し、それぞれに返信数と最終アクティビティ時刻が付きます。
+- `--summary` は各コメントを短いプレビューに切り詰めます。
+- `--compact` は JSON 出力にだけ効き、情報のないフィールド(繰り返される `issue_id`、空の配列など)を省きます。
+- `--recent N` は最近動きのあった N 件のスレッドを、すべての返信付きで返します。返信が多いと出力は長くなります。
+- 解決済みのスレッドは既定で最初のコメントと結論に折りたたまれます。全文が必要なら `--full` を付けます。
+
+一覧も必要なフィールドだけに絞れます:`multica issue list --output json --fields id,identifier,title,status`。絞り込みは CLI 側で行われるので、減るのは出力とコンテキストで、リクエストの量は変わりません。
+
+### ウェイクアップ
+
+ウェイクアップは、イベントが起きたとき、条件が成り立ったとき、または指定の時刻に、エージェントの通常の実行を始めます。詳しいルールは[タスクのウェイクアップ](/issue-wakeups)を参照してください。
+
+```bash
+multica issue wakeup events
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --event comment.created --filter-actor-type member --filter-actor-id <user-id> \
+ --instruction "返信が来たら、その内容で見積書を更新する"
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --kind every --every 1h --expires-in 72h \
+ --instruction "仕入れ先から返信が来ているか確認する"
+multica issue wakeup list MUL-123
+multica issue wakeup runs MUL-123 <wakeup-id>
+```
+
+ターミナルからメンバーとして作成するときは `--agent-id` が必要です。エージェントが自分の実行の中で作成した場合は、既定でそのエージェント自身を起こします。
+
## エージェントとスキル
```bash
@@ -141,6 +205,23 @@ multica skill import --url <skill-url> --on-conflict skip
`overwrite` はスキルの作成者だけが使え、元の ID とエージェントの紐付けを維持します。
+環境変数や MCP 設定にはトークンが含まれることがよくあります。コマンドラインに値を直接書くとシェルの履歴や `ps` の出力に残るので、`-file` または `-stdin` の形で渡してください。
+
+```bash
+multica agent create --name "運用アシスタント" --runtime-id <runtime-id> \
+ --custom-env-file ./agent-env.json \
+ --mcp-config-file ./mcp.json \
+ --custom-args '["--max-turns", "40"]'
+
+multica agent env set <agent-id> --custom-env-stdin < agent-env.json
+multica agent update <agent-id> --mcp-config-file ./mcp.json
+```
+
+- `--custom-env` 系のフラグは `agent create` にしかありません。後から変えるときは `agent env set` を使います。これは全体を置き換え、値を `****` にしたキーは元の値を保ちます。
+- `agent update --mcp-config null` で MCP 設定を消去します。
+- `--custom-args` は JSON 配列で、起動引数の最後に置かれます。モデルは `--model` で選んでください。カスタム引数の中の `--model` を受け付けないツールもあります。
+- エージェントを呼び出せる人は `--permission-mode` で決めます。`private` は所有者だけ、`public_to` は `--public-to-workspace` または `--public-to-member <user-id>` と組み合わせます。`--visibility private|workspace` は古い書き方で、`--permission-mode` に対応付けられます。両方を指定した場合は `--permission-mode` が優先されます。
+
## デーモンとランタイム
```bash
@@ -156,15 +237,45 @@ multica runtime usage <runtime-id>
multica runtime activity <runtime-id>
```
+```bash
+multica daemon autostart enable
+multica runtime usage <runtime-id> --days 30
+multica runtime update <runtime-id> --target-version <version> --wait
+multica runtime profile create --display-name "社内 Claude ラッパー" \
+ --command-name ccms --runtime-type claude
+```
+
+`daemon autostart` は現在のプロファイルをログイン時に起動するよう登録します。プラットフォームごとの違いは[ログイン時の自動起動](/daemon-runtimes#autostart)を参照してください。`runtime usage` は既定で 90 日分を集計し、`--days` は最大 365 です。`runtime update` はそのコンピューターのデーモンに CLI を指定のバージョンへ更新させ、`--wait` を付けると更新が終わるまで待ちます。`runtime profile create` は互換ツールを `--runtime-type` で指定します(古い `--protocol-family` も使えます)。固定引数は今のところ Web アプリでしか設定できません。
+
アクティブなエージェントがまだ紐付いているランタイムの削除は、デフォルトで拒否されます。`multica runtime delete <id> --cascade` は、それらのエージェントをランタイムから解除して設定と履歴を保持し、アクティブな実行をキャンセルします。
仕組みとカスタムプロファイルについては[デーモンとランタイム](/daemon-runtimes)を参照してください。
+## プロジェクト、ワークスペース、オートパイロット
+
+```bash
+multica project create --title "夏のキャンペーン" --lead "李雷" \
+ --repo https://github.com/acme/campaign-site
+multica project resource add <project-id> --type github_repo \
+ --url https://github.com/acme/brand-assets --default-branch-hint main
+
+multica workspace create --name "運用チーム" --slug ops --issue-prefix OPS
+multica workspace update --context-stdin < team-context.md
+
+multica autopilot create --title "週次の売上レポート" --agent "運用アシスタント" \
+ --mode create_issue --issue-title-template "売上レポート {{date}}"
+multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/Tokyo
+```
+
+- `--lead` にはメンバーまたはエージェントの名前を指定します。`--default-branch-hint` はリポジトリの既定ブランチをエージェントに伝えるだけで、ブランチは切り替えません。
+- ワークスペースの `--context` は、ワークスペース内のすべてのエージェントに渡されます。`--slug` は作成後に変更できません。`--issue-prefix` は大文字に変換され、変更すると既存のすべてのタスクが振り直され、外部から参照している古い番号は使えなくなります。
+- `--issue-title-template` で置き換えられるのは `{{date}}`(UTC、`YYYY-MM-DD`)だけで、ほかの `{{...}}` は拒否されます。スケジュールトリガーの `--timezone` は既定で UTC です。
+
## コマンド概要
| コマンド | 用途 |
| --- | --- |
-| `issue` | タスクの作成、更新、割り当て、検索。コメント、購読者、ラベル、プロパティ、実行履歴の管理 |
+| `issue` | タスクの作成、更新、割り当て、検索。コメント、購読者、ラベル、プロパティ、ウェイクアップ、タイムライン、実行履歴の管理 |
| `project` | プロジェクトとそのリソースを管理 |
| `label`、`property` | ワークスペースのラベルとカスタムプロパティを管理 |
| `agent`、`skill`、`squad` | エージェント、スキル、スクワッドを管理 |
@@ -226,9 +337,9 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
| コマンド | サブコマンド | 用途 | 主なフラグ |
| --- | --- | --- | --- |
-| `issue` | `list` | タスクを一覧 | `--status`、`--priority`、`--assignee`、`--project`、`--metadata`(繰り返し可)、`--property`(繰り返し可、`"名前=値"` または `"Score>=3"`、`"Due<2026-01-01"`、`"Notes~=text"` のような比較;`__none__` は未設定に一致)、`--limit`、`--offset`、`--sort`(`property:<名前または id>` に対応)、`--full-id`、`--resolve-properties`(JSON のみ;保存された id に加えてプロパティ名・選択肢名・メンバー名を返します) |
+| `issue` | `list` | タスクを一覧 | `--status`、`--priority`、`--assignee`、`--project`、`--metadata`(繰り返し可)、`--property`(繰り返し可、`"名前=値"` または `"Score>=3"`、`"Due<2026-01-01"`、`"Notes~=text"` のような比較;`__none__` は未設定に一致)、`--limit`、`--offset`、`--sort`(`property:<名前または id>` に対応)、`--full-id`、`--resolve-properties`(JSON のみ;保存された id に加えてプロパティ名・選択肢名・メンバー名を返します)、`--fields`(JSON のみ;カンマ区切りで残すフィールドを指定) |
| | `get <id>` | 単一のタスクを表示 | `--resolve-properties`(JSON のみ;保存された id に加えてプロパティ名・選択肢名・メンバー名を返します) |
-| | `create` | タスクを作成 | `--title`(必須)、`--description` / `--description-stdin` / `--description-file`、`--status`、`--priority`、`--assignee`、`--parent`、`--stage`、`--project`、`--start-date`、`--due-date`、`--attachment`(繰り返し可) |
+| | `create` | タスクを作成 | `--title`(必須)、`--description` / `--description-stdin` / `--description-file`、`--status`、`--priority`、`--assignee`、`--parent`、`--stage`、`--project`、`--start-date`、`--due-date`、`--attachment`(繰り返し可)、`--property`(繰り返し可)、`--allow-duplicate`(同じタイトルの未完了タスクがあっても作成) |
| | `update <id>` | タスクのフィールドを更新 | `create` と同系のフィールドに加え `--position`、`--no-start`、`--duplicate-of` |
| | `assign <id>` | 割り当てまたは割り当て解除 | `--to`(メンバー、エージェント、スクワッドを名前であいまいマッチ)、`--to-id`、`--unassign`、`--no-start` |
| | `status <id> <status>` | ステータスを変更 | `--no-start`、`--duplicate-of` |
@@ -236,7 +347,9 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
| | `search <query>` | タスクを検索 | `--limit`、`--include-closed` |
| | `children <id>` | サブタスクをステージごとに一覧 | |
| | `pull-requests <id>` | 関連付けられた PR を一覧 | |
-| | `comment list/add/delete/resolve/unresolve` | コメントを管理 | `add`: `--content` / `--content-stdin` / `--content-file`、`--parent`、`--attachment`;`list`: `--since`、`--thread`、`--tail` |
+| | `comment list/add/update/delete/resolve/unresolve` | コメントを管理 | `add`: `--content` / `--content-stdin` / `--content-file`、`--parent`、`--attachment`;`update`: `--expected-revision`(必須)、`--content` / `--content-stdin` / `--content-file`;`list`: `--since`、`--thread`、`--tail`、`--recent`、`--roots-only`、`--summary`、`--compact`、`--full` |
+| | `timeline <id>` | アクティビティ記録とコメントを時系列で表示 | `--action`(繰り返し可)、`--activity-only`、`--since`、`--tail` |
+| | `wakeup events/list/get/create/update/disable/trigger/delete/checkin/runs` | タスクのウェイクアップを管理。詳しくは[タスクのウェイクアップ](/issue-wakeups) | `create` / `update`: `--agent-id`、`--kind`(`event`、`at`、`every`、`cron`)、`--event`、`--at` / `--after`、`--every`、`--cron`、`--timezone`、`--until-*` 条件、`--expires-in` / `--expires-at`、`--instruction` / `--instruction-file`;`checkin`: `--note` |
| | `subscriber list/add/remove <issue-id>` | 購読者を管理 | `--user`、`--user-id`(省略時は現在のユーザー) |
| | `label list/add/remove <issue-id>` | タスクのラベルを管理 | |
| | `metadata list/get/set/delete <issue-id>` | タスクレベルのキー・バリューメタデータを管理 | |
@@ -246,23 +359,23 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
| | `usage <issue-id>` | 集計されたトークン使用量を表示 | |
| | `rerun <id>` | 現在の担当者で実行を再キューイング | |
| | `cancel-task <task-id>` | 進行中またはキュー中の実行をキャンセル | `--issue` |
-| `project` | `list/get/create/update/delete` | プロジェクトを管理 | |
+| `project` | `list/get/create/update/delete` | プロジェクトを管理 | `create`: `--title`(必須)、`--lead`、`--status`、`--icon`、`--start-date`、`--due-date`、`--repo`(繰り返し可) |
| | `status <id> <status>` | プロジェクトのステータスを変更 | |
-| | `resource list/add/update/remove` | プロジェクトの追加リソースを管理 | `--type`、`--url`、`--local-path`、`--daemon-id`、`--execution-mode`(ローカルディレクトリの `in_place` / `worktree`) |
+| | `resource list/add/update/remove` | プロジェクトの追加リソースを管理 | `--type`、`--url`、`--default-branch-hint`、`--ref`、`--local-path`、`--daemon-id`、`--execution-mode`(ローカルディレクトリの `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | ワークスペースのラベルを管理 | `list`: `--resource-type`(`issue` または `skill`)、`--full-id`;`create`: `--name`、`--color`、`--resource-type`(`issue` または `skill`)、`--description` |
| `property` | `list/get/create/update/archive/unarchive` | ワークスペースのカスタムプロパティを管理 | `create`: `--name`、`--type`(`text`、`number`、`select`、`multi_select`、`date`、`checkbox`、`url`、`actor`、`multi_actor`、`multi_text`、`multi_url`)、`--option`(繰り返し可、select 系のみ);`list`: `--include-archived`;タイプは作成後に変更できません |
-| `agent` | `list/get/create/update/archive/restore` | エージェントを管理 | `--name`、`--runtime-id`(`create` では必須)、`--instructions`、`--conversation-starters`、`--model`、`--thinking-level`、`--mcp-config`、`--permission-mode`、`--max-concurrent-tasks` |
+| `agent` | `list/get/create/update/archive/restore` | エージェントを管理 | `--name`、`--runtime-id`(`create` では必須)、`--instructions`、`--conversation-starters`、`--model`、`--thinking-level`、`--custom-env` / `--custom-env-file` / `--custom-env-stdin`(`create` のみ)、`--custom-args`、`--mcp-config` / `--mcp-config-file` / `--mcp-config-stdin`、`--permission-mode`、`--visibility`(古い書き方)、`--max-concurrent-tasks` |
| | `copy <agent-id>` | 新しいエージェントとして複製。元のエージェントは変更されません | `--name`(デフォルトは元の名前 + ` (copy)`)、`--runtime-id`(別のランタイムへ複製する場合は `--model` の同時指定が必須)、`--no-skills`;`custom_env`、`mcp_config`、`runtime_config` などの機密設定は複製されないため、`create` と同じフラグで再指定してください |
| | `tasks <id>` | エージェントの実行を表示 | |
| | `avatar <id>` | アバターをアップロード | |
-| | `env get/set <agent-id>` | カスタム環境変数の読み書き(owner と admin のみ) | |
+| | `env get/set <agent-id>` | カスタム環境変数の読み書き(エージェントの所有者、またはワークスペースの owner/admin。読み取りはすべて記録される) | `set`: `--custom-env` / `--custom-env-file` / `--custom-env-stdin`。全体を置き換え、値が `****` のキーは元の値を保つ |
| | `skills list/set/add <agent-id>` | 紐付けられたスキルを管理 | `--skill-ids`(`set` は全置換、`add` は追加) |
| | `mcp list/add/enable/disable/remove <agent-id>` | ワークスペース MCP サーバーをこのエージェントに割り当て | server id は `workspace mcp list` から取得。ライブラリの項目はここで追加するまで機能しません。`disable` は割り当てを残したまま送信を停止します |
-| `autopilot` | `list/get/create/update/delete` | オートパイロットを管理 | `create`: `--title`、`--agent`、`--mode`(いずれも必須)、`--project`、`--subscriber`(繰り返し可) |
+| `autopilot` | `list/get/create/update/delete` | オートパイロットを管理 | `create`: `--title`、`--agent`、`--mode`(いずれも必須)、`--description`、`--issue-title-template`、`--project`、`--subscriber`(繰り返し可) |
| | `trigger <id>` | 手動で 1 回トリガー | |
| | `runs <id>` | 実行履歴を表示 | |
-| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | スケジュールと webhook のトリガーを管理 | |
-| `workspace` | `list/get/create/update/switch` | ワークスペースを管理。`switch` は現在のプロファイルのデフォルトワークスペースを設定 | |
+| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | スケジュールと webhook のトリガーを管理 | `trigger-add`: `--kind`(`schedule` または `webhook`)、`--cron`、`--timezone`(既定は UTC)、`--label` |
+| `workspace` | `list/get/create/update/switch` | ワークスペースを管理。`switch` は現在のプロファイルのデフォルトワークスペースを設定 | `create`: `--name`、`--slug`(いずれも必須)、`--issue-prefix`、`--description`、`--context` / `--context-stdin`;`update` は slug 以外の同じ項目を変更 |
| | `mcp list/add/update/remove` | ワークスペースの MCP サーバーライブラリを管理 | 書き込みは owner/admin のみ。ここに追加したサーバーはどのエージェントにも割り当てられません — `multica agent mcp add` で割り当てます。`list` は名前と transport のみを表示し、保存されたエントリは書き込み専用でどのロールにも返りません。`--server-config-file` / `--server-config-stdin` はトークンをシェル履歴から守ります |
| | `member list/invite <email>` | メンバーの表示と招待 | `invite`: `--role`(member または admin。デフォルトは member) |
| `repo` | `list/add/remove/checkout` | ワークスペースのリポジトリを管理し、ローカルにチェックアウト | `--url`(繰り返し可);`checkout`: `--ref` |
@@ -284,8 +397,9 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
| | `stop` / `status` / `restart` | 停止、状態の確認、再起動(`restart` は `start` と同じフラグ) | |
| | `logs` | デーモンのログを表示 | `--follow`、`--lines` |
| | `disk-usage` | ローカルのディスク使用量を表示 | `--by-workspace`、`--by-task`、`--top` |
-| `runtime` | `list/usage/activity/update/rename/delete` | ランタイムを表示・管理 | `delete`: `--cascade`(紐付くエージェントを解除してデータを保持し、その実行をキャンセル) |
-| | `profile list/create/update/delete` | カスタムランタイムプロファイルを管理 | |
+| | `autostart enable/disable/status` | 現在のプロファイルのログイン時自動起動を登録・解除 | `status`: `--output` |
+| `runtime` | `list/usage/activity/update/rename/delete` | ランタイムを表示・管理 | `usage`: `--days`(既定 90、最大 365);`update`: `--target-version`(必須)、`--wait`;`delete`: `--cascade`(紐付くエージェントを解除してデータを保持し、その実行をキャンセル) |
+| | `profile list/create/update/delete` | カスタムランタイムプロファイルを管理 | `create`: `--display-name`、`--command-name`(いずれも必須)、`--runtime-type`(または古い `--protocol-family`)、`--description`;`update`: `--enabled` |
| | `profile set-path/unset-path <profile-id>` | ローカルの実行ファイルパスを固定(ローカルのみ有効。サーバーには送信されません) | |
### Additional
@@ -303,17 +417,9 @@ CLI の設定ファイルには、あなたとして Multica にアクセスで
## 別のコーディングエージェントから Multica を操作する
-作業の多くを Codex、Claude Code、Cursor の中で進めているなら、ターミナルに切り替えず
-そこから Multica を操作できます。[Multica CLI skill](https://github.com/multica-ai/multica-cli)
-は、このページのコマンドを安全に扱う方法をそれらのエージェントに教えます。タスクと
-コメントスレッドをトークンを浪費せずに読み、コメントはファイル経由で書き、メンション・
-ステータス変更・アサインが伴う副作用を正しく扱います。
-
-認証済みの CLI を通してのみ動作し、それ自体は何の権限も与えません。権限は引き続き
-ログイン、選択中のプロファイル、ワークスペースに由来します。CLI は v0.4.26 以降が必要です。
-Claude Code のプラグインマーケットプレイス、Codex の skill インストーラー、Cursor、
-その他 Markdown の指示を読み込むツールへのインストール方法は、リポジトリの README を
-参照してください。
+作業の多くを Codex、Claude Code、Cursor の中で進めているなら、ターミナルに切り替えずそこから Multica を操作できます。[Multica CLI skill](https://github.com/multica-ai/multica-cli) は、このページのコマンドを安全に扱う方法をそれらのエージェントに教えます。タスクとコメントスレッドをトークンを浪費せずに読み、コメントはファイル経由で書き、メンション・ステータス変更・アサインが伴う副作用を正しく扱います。
+
+認証済みの CLI を通してのみ動作し、それ自体は何の権限も与えません。権限は引き続きログイン、選択中のプロファイル、ワークスペースに由来します。CLI は v0.4.26 以降が必要です。Claude Code のプラグインマーケットプレイス、Codex の skill インストーラー、Cursor、その他 Markdown の指示を読み込むツールへのインストール方法は、リポジトリの README を参照してください。
## 次のステップ
diff --git a/apps/docs/content/docs/cli.ko.mdx b/apps/docs/content/docs/cli.ko.mdx
index aba14abdef..213f678694 100644
--- a/apps/docs/content/docs/cli.ko.mdx
+++ b/apps/docs/content/docs/cli.ko.mdx
@@ -4,12 +4,14 @@ description: Multica CLI를 설치하고 로그인해 터미널에서 워크스
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Multica CLI는 로컬 런타임을 연결할 뿐 아니라 터미널에서 워크스페이스, 태스크, 에이전트, 자동화를 관리할 수 있습니다. 이 페이지에서는 자주 사용하는 경로를 설명합니다. 현재 버전에서 지원하는 인수는 항상 명령 자체의 `--help`를 기준으로 확인하세요.
## 설치
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
@@ -21,12 +23,18 @@ Homebrew가 설치되어 있다면 다음 명령도 사용할 수 있습니다.
brew install multica-ai/tap/multica
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
+
+PowerShell에서 실행합니다.
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
+</Tab>
+</Tabs>
+
설치 성공 여부를 확인합니다.
```bash
@@ -35,13 +43,17 @@ multica version
## 처음 연결
-Multica Cloud 연결:
+연결할 서비스를 선택합니다.
+
+<Tabs items={["Multica Cloud", "자체 호스팅 인스턴스"]}>
+<Tab value="Multica Cloud">
```bash
multica setup
```
-자체 호스팅 인스턴스 연결:
+</Tab>
+<Tab value="자체 호스팅 인스턴스">
```bash
multica setup self-host \
@@ -49,6 +61,9 @@ multica setup self-host \
--app-url https://app.example.com
```
+</Tab>
+</Tabs>
+
`setup`은 서비스 주소를 저장하고 브라우저를 열어 로그인을 완료한 뒤 데몬을 시작합니다. 완료 후 다음을 확인하세요.
```bash
@@ -117,6 +132,55 @@ multica issue run-messages <task-id> --issue MUL-123
multica issue cancel-task <task-id> --issue MUL-123
```
+같은 프로젝트, 같은 상위 태스크 아래에 제목이 같은(대소문자와 여분의 공백은 구분하지 않음) 닫히지 않은 태스크가 이미 있으면 `issue create`는 생성을 거부하고 그 태스크를 알려 줍니다. 그래도 만들려면 `--allow-duplicate`를 붙이세요. 한 태스크를 다른 태스크의 중복으로 표시하려면 `multica issue status MUL-124 cancelled --duplicate-of MUL-123`을 실행합니다.
+
+### 타임라인
+
+`issue get`은 태스크의 현재 상태를 보여 줍니다. `issue timeline`은 상태, 우선순위, 담당자, 제목, 날짜 변경과 실행 결과를 시간순으로 나열하고 댓글도 섞어 보여 줍니다. "언제 in_review로 바뀌었나", "지금 상태에 얼마나 머물러 있나"를 확인할 때 씁니다.
+
+```bash
+multica issue timeline MUL-123 --action status_changed
+multica issue timeline MUL-123 --activity-only --output json
+multica issue timeline MUL-123 --since 2026-08-19T00:00:00Z
+```
+
+`--activity-only`는 댓글을 빼고 모든 활동 기록을 남깁니다. `--action`은 지정한 동작만 반환하며 반복해서 쓸 수 있고 `--activity-only`를 포함합니다. 서버가 읽는 기록에는 한도가 있어 잘린 경우 stderr에 경고가 출력됩니다. 이때는 그 결과로 머문 시간을 추정하지 마세요.
+
+### 긴 댓글 스레드 읽기
+
+댓글이 많은 태스크를 하나씩 읽으면 에이전트가 토큰을 많이 씁니다. 먼저 스레드를 훑어보고 필요한 스레드만 펼치세요.
+
+```bash
+multica issue comment list MUL-123 --roots-only --summary --output json --compact
+multica issue comment list MUL-123 --thread <comment-id> --tail 5 --output json --compact
+```
+
+- `--roots-only`는 최상위 댓글만 반환하며 각 댓글에 답글 수와 마지막 활동 시각이 붙습니다.
+- `--summary`는 각 댓글을 짧은 미리보기로 자릅니다.
+- `--compact`는 JSON 출력에만 적용되며 정보가 없는 필드(반복되는 `issue_id`, 빈 배열 등)를 뺍니다.
+- `--recent N`은 최근 활동이 있었던 스레드 N개를 모든 답글과 함께 반환하므로 답글이 많으면 출력이 길어집니다.
+- 해결된 스레드는 기본적으로 첫 댓글과 결론으로 접힙니다. 전체 내용이 필요하면 `--full`을 붙이세요.
+
+목록도 필요한 필드만 받을 수 있습니다: `multica issue list --output json --fields id,identifier,title,status`. 필터링은 CLI에서 이루어지므로 줄어드는 것은 출력과 컨텍스트이고 요청량은 그대로입니다.
+
+### 깨우기
+
+깨우기는 이벤트가 생기거나 조건이 충족되거나 지정한 시각이 되면 에이전트의 일반 실행을 시작합니다. 전체 규칙은 [태스크 깨우기](/issue-wakeups)를 참고하세요.
+
+```bash
+multica issue wakeup events
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --event comment.created --filter-actor-type member --filter-actor-id <user-id> \
+ --instruction "답장이 오면 그 내용으로 견적서를 업데이트"
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --kind every --every 1h --expires-in 72h \
+ --instruction "공급업체가 회신했는지 확인"
+multica issue wakeup list MUL-123
+multica issue wakeup runs MUL-123 <wakeup-id>
+```
+
+터미널에서 멤버로 만들 때는 `--agent-id`가 필요합니다. 에이전트가 자기 실행 안에서 만들면 기본적으로 자기 자신을 깨웁니다.
+
## 에이전트와 스킬
```bash
@@ -141,6 +205,23 @@ multica skill import --url <skill-url> --on-conflict skip
`overwrite`는 스킬 생성자만 사용할 수 있으며 기존 ID와 에이전트 연결을 유지합니다.
+환경 변수와 MCP 설정에는 토큰이 들어 있는 경우가 많습니다. 명령줄에 값을 직접 쓰면 셸 기록과 `ps` 출력에 남으므로 `-file` 또는 `-stdin` 형태로 전달하세요.
+
+```bash
+multica agent create --name "운영 도우미" --runtime-id <runtime-id> \
+ --custom-env-file ./agent-env.json \
+ --mcp-config-file ./mcp.json \
+ --custom-args '["--max-turns", "40"]'
+
+multica agent env set <agent-id> --custom-env-stdin < agent-env.json
+multica agent update <agent-id> --mcp-config-file ./mcp.json
+```
+
+- `--custom-env` 계열 플래그는 `agent create`에만 있습니다. 나중에 바꿀 때는 `agent env set`을 쓰며, 전체를 교체하고 값이 `****`인 키는 기존 값을 유지합니다.
+- `agent update --mcp-config null`은 MCP 설정을 지웁니다.
+- `--custom-args`는 JSON 배열이며 실행 인수의 맨 끝에 붙습니다. 모델은 `--model`로 고르세요. 사용자 지정 인수 안의 `--model`을 거부하는 도구도 있습니다.
+- 에이전트를 호출할 수 있는 사람은 `--permission-mode`로 정합니다. `private`은 소유자만, `public_to`는 `--public-to-workspace` 또는 `--public-to-member <user-id>`와 함께 씁니다. `--visibility private|workspace`는 예전 방식이며 `--permission-mode`로 변환됩니다. 둘 다 지정하면 `--permission-mode`가 우선합니다.
+
## 데몬과 런타임
```bash
@@ -156,15 +237,45 @@ multica runtime usage <runtime-id>
multica runtime activity <runtime-id>
```
+```bash
+multica daemon autostart enable
+multica runtime usage <runtime-id> --days 30
+multica runtime update <runtime-id> --target-version <version> --wait
+multica runtime profile create --display-name "사내 Claude 래퍼" \
+ --command-name ccms --runtime-type claude
+```
+
+`daemon autostart`는 현재 profile이 로그인할 때 시작되도록 등록합니다. 플랫폼별 차이는 [로그인 시 자동 시작](/daemon-runtimes#autostart)을 참고하세요. `runtime usage`는 기본적으로 90일을 집계하며 `--days`는 최대 365입니다. `runtime update`는 해당 컴퓨터의 데몬이 CLI를 지정한 버전으로 업데이트하게 하고, `--wait`를 붙이면 업데이트가 끝날 때까지 기다립니다. `runtime profile create`는 호환 도구를 `--runtime-type`으로 지정합니다(예전 `--protocol-family`도 쓸 수 있음). 고정 인수는 현재 웹 앱에서만 설정할 수 있습니다.
+
활성 에이전트가 계속 연결된 런타임을 삭제하면 명령이 기본적으로 거부됩니다. `multica runtime delete <id> --cascade`는 에이전트의 런타임 연결을 해제하고 설정과 기록을 보존하며 활성 실행을 취소합니다.
실행 메커니즘과 사용자 지정 profile은 [데몬과 런타임](/daemon-runtimes)을 참고하세요.
+## 프로젝트, 워크스페이스, 오토파일럿
+
+```bash
+multica project create --title "여름 캠페인" --lead "리레이" \
+ --repo https://github.com/acme/campaign-site
+multica project resource add <project-id> --type github_repo \
+ --url https://github.com/acme/brand-assets --default-branch-hint main
+
+multica workspace create --name "운영팀" --slug ops --issue-prefix OPS
+multica workspace update --context-stdin < team-context.md
+
+multica autopilot create --title "주간 매출 보고" --agent "운영 도우미" \
+ --mode create_issue --issue-title-template "매출 보고 {{date}}"
+multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/Seoul
+```
+
+- `--lead`에는 멤버나 에이전트의 이름을 씁니다. `--default-branch-hint`는 저장소의 기본 브랜치를 에이전트에게 알려 줄 뿐 브랜치를 바꾸지는 않습니다.
+- 워크스페이스의 `--context`는 워크스페이스의 모든 에이전트에게 제공됩니다. `--slug`는 만든 뒤 바꿀 수 없습니다. `--issue-prefix`는 대문자로 바뀌며, 변경하면 기존 태스크 번호가 모두 다시 매겨져 외부에서 참조하던 예전 번호는 더 이상 연결되지 않습니다.
+- `--issue-title-template`은 `{{date}}`(UTC, `YYYY-MM-DD`)만 치환하며 다른 `{{...}}`는 거부합니다. 일정 트리거의 `--timezone` 기본값은 UTC입니다.
+
## 명령 개요
| 명령 | 용도 |
| --- | --- |
-| `issue` | 태스크 생성, 업데이트, 할당, 검색. 댓글, 구독, 라벨, 속성, 실행 기록 관리 |
+| `issue` | 태스크 생성, 업데이트, 할당, 검색. 댓글, 구독, 라벨, 속성, 깨우기, 타임라인, 실행 기록 관리 |
| `project` | 프로젝트와 프로젝트 리소스 관리 |
| `label`, `property` | 워크스페이스 라벨과 사용자 지정 속성 관리 |
| `agent`, `skill`, `squad` | 에이전트, 스킬, 스쿼드 관리 |
@@ -226,9 +337,9 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
| 명령 | 하위 명령 | 용도 | 주요 flag |
| --- | --- | --- | --- |
-| `issue` | `list` | 태스크 목록 | `--status`, `--priority`, `--assignee`, `--project`, `--metadata`(반복 가능), `--property`(반복 가능, `"이름=값"` 또는 `"Score>=3"`, `"Due<2026-01-01"`, `"Notes~=text"` 같은 비교; `__none__`은 미설정과 일치), `--limit`, `--offset`, `--sort`(`property:<이름 또는 id>` 지원), `--full-id`, `--resolve-properties`(JSON 전용; 저장된 id와 함께 속성, 옵션, 멤버 이름을 반환) |
+| `issue` | `list` | 태스크 목록 | `--status`, `--priority`, `--assignee`, `--project`, `--metadata`(반복 가능), `--property`(반복 가능, `"이름=값"` 또는 `"Score>=3"`, `"Due<2026-01-01"`, `"Notes~=text"` 같은 비교; `__none__`은 미설정과 일치), `--limit`, `--offset`, `--sort`(`property:<이름 또는 id>` 지원), `--full-id`, `--resolve-properties`(JSON 전용; 저장된 id와 함께 속성, 옵션, 멤버 이름을 반환), `--fields`(JSON 전용. 남길 필드를 쉼표로 구분) |
| | `get <id>` | 태스크 하나 확인 | `--resolve-properties`(JSON 전용; 저장된 id와 함께 속성, 옵션, 멤버 이름을 반환) |
-| | `create` | 태스크 생성 | `--title`(필수), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment`(반복 가능) |
+| | `create` | 태스크 생성 | `--title`(필수), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment`(반복 가능), `--property`(반복 가능), `--allow-duplicate`(같은 제목의 닫히지 않은 태스크가 있어도 생성) |
| | `update <id>` | 태스크 필드 업데이트 | `create`와 같은 종류의 필드에 `--position`, `--no-start`, `--duplicate-of` 추가 |
| | `assign <id>` | 할당 또는 할당 해제 | `--to`(이름으로 멤버, 에이전트, 스쿼드 fuzzy match), `--to-id`, `--unassign`, `--no-start` |
| | `status <id> <status>` | 상태 변경 | `--no-start`, `--duplicate-of` |
@@ -236,7 +347,9 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
| | `search <query>` | 태스크 검색 | `--limit`, `--include-closed` |
| | `children <id>` | 단계별로 묶은 하위 태스크 목록 | |
| | `pull-requests <id>` | 연결된 PR 목록 | |
-| | `comment list/add/delete/resolve/unresolve` | 댓글 관리 | `add`: `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment`. `list`: `--since`, `--thread`, `--tail` |
+| | `comment list/add/update/delete/resolve/unresolve` | 댓글 관리 | `add`: `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment`. `update`: `--expected-revision`(필수), `--content` / `--content-stdin` / `--content-file`. `list`: `--since`, `--thread`, `--tail`, `--recent`, `--roots-only`, `--summary`, `--compact`, `--full` |
+| | `timeline <id>` | 활동 기록과 댓글을 시간순으로 표시 | `--action`(반복 가능), `--activity-only`, `--since`, `--tail` |
+| | `wakeup events/list/get/create/update/disable/trigger/delete/checkin/runs` | 태스크 깨우기 관리. 자세한 내용은 [태스크 깨우기](/issue-wakeups) | `create` / `update`: `--agent-id`, `--kind`(`event`, `at`, `every`, `cron`), `--event`, `--at` / `--after`, `--every`, `--cron`, `--timezone`, `--until-*` 조건, `--expires-in` / `--expires-at`, `--instruction` / `--instruction-file`. `checkin`: `--note` |
| | `subscriber list/add/remove <issue-id>` | 구독자 관리 | `--user`, `--user-id`(생략하면 현재 사용자) |
| | `label list/add/remove <issue-id>` | 태스크 라벨 관리 | |
| | `metadata list/get/set/delete <issue-id>` | 태스크 수준 key-value metadata 관리 | |
@@ -246,23 +359,23 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
| | `usage <issue-id>` | 집계 token 사용량 확인 | |
| | `rerun <id>` | 현재 할당을 기준으로 다시 큐에 넣어 실행 | |
| | `cancel-task <task-id>` | 진행 중 또는 큐 대기 중인 실행 취소 | `--issue` |
-| `project` | `list/get/create/update/delete` | 프로젝트 관리 | |
+| `project` | `list/get/create/update/delete` | 프로젝트 관리 | `create`: `--title`(필수), `--lead`, `--status`, `--icon`, `--start-date`, `--due-date`, `--repo`(반복 가능) |
| | `status <id> <status>` | 프로젝트 상태 변경 | |
-| | `resource list/add/update/remove` | 프로젝트 추가 리소스 관리 | `--type`, `--url`, `--local-path`, `--daemon-id`, `--execution-mode`(로컬 디렉터리의 `in_place` / `worktree`) |
+| | `resource list/add/update/remove` | 프로젝트 추가 리소스 관리 | `--type`, `--url`, `--default-branch-hint`, `--ref`, `--local-path`, `--daemon-id`, `--execution-mode`(로컬 디렉터리의 `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | 워크스페이스 라벨 관리 | `list`: `--resource-type`(`issue` 또는 `skill`), `--full-id`; `create`: `--name`, `--color`, `--resource-type`(`issue` 또는 `skill`), `--description` |
| `property` | `list/get/create/update/archive/unarchive` | 워크스페이스 사용자 지정 속성 관리 | `create`: `--name`, `--type`(`text`, `number`, `select`, `multi_select`, `date`, `checkbox`, `url`, `actor`, `multi_actor`, `multi_text`, `multi_url`), `--option`(반복 가능, select 유형만). `list`: `--include-archived`. 유형은 생성 후 변경 불가 |
-| `agent` | `list/get/create/update/archive/restore` | 에이전트 관리 | `--name`, `--runtime-id`(`create`에서 필수), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--mcp-config`, `--permission-mode`, `--max-concurrent-tasks` |
+| `agent` | `list/get/create/update/archive/restore` | 에이전트 관리 | `--name`, `--runtime-id`(`create`에서 필수), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--custom-env` / `--custom-env-file` / `--custom-env-stdin`(`create` 전용), `--custom-args`, `--mcp-config` / `--mcp-config-file` / `--mcp-config-stdin`, `--permission-mode`, `--visibility`(예전 방식), `--max-concurrent-tasks` |
| | `copy <agent-id>` | 원래 에이전트에 영향 없이 새 에이전트로 복사 | `--name`(기본값은 원래 이름 + ` (copy)`), `--runtime-id`(다른 런타임으로 복사할 때 `--model`도 필수), `--no-skills`. `custom_env`, `mcp_config`, `runtime_config` 같은 기밀 설정은 복사되지 않으며 `create`와 같은 flag로 다시 제공해야 함 |
| | `tasks <id>` | 에이전트 실행 확인 | |
| | `avatar <id>` | 아바타 업로드 | |
-| | `env get/set <agent-id>` | 사용자 지정 환경 변수 읽기/쓰기(owner와 admin만) | |
+| | `env get/set <agent-id>` | 사용자 지정 환경 변수 읽기/쓰기(에이전트 소유자 또는 워크스페이스 owner/admin. 읽을 때마다 기록됨) | `set`: `--custom-env` / `--custom-env-file` / `--custom-env-stdin`. 전체를 교체하며 값이 `****`인 키는 기존 값 유지 |
| | `skills list/set/add <agent-id>` | 연결된 스킬 관리 | `--skill-ids`(`set`은 전체 교체, `add`는 증분 추가) |
| | `mcp list/add/enable/disable/remove <agent-id>` | 워크스페이스 MCP 서버를 이 에이전트에 할당 | server id는 `workspace mcp list`에서 확인. 라이브러리 항목은 여기서 추가하기 전까지 동작하지 않으며, `disable`은 할당을 유지한 채 전달만 중단합니다 |
-| `autopilot` | `list/get/create/update/delete` | 자동화 관리 | `create`: `--title`, `--agent`, `--mode`(모두 필수), `--project`, `--subscriber`(반복 가능) |
+| `autopilot` | `list/get/create/update/delete` | 자동화 관리 | `create`: `--title`, `--agent`, `--mode`(모두 필수), `--description`, `--issue-title-template`, `--project`, `--subscriber`(반복 가능) |
| | `trigger <id>` | 수동으로 한 번 트리거 | |
| | `runs <id>` | 실행 기록 확인 | |
-| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 일정 및 webhook 트리거 관리 | |
-| `workspace` | `list/get/create/update/switch` | 워크스페이스 관리. `switch`는 현재 profile의 기본 워크스페이스 설정 | |
+| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 일정 및 webhook 트리거 관리 | `trigger-add`: `--kind`(`schedule` 또는 `webhook`), `--cron`, `--timezone`(기본값 UTC), `--label` |
+| `workspace` | `list/get/create/update/switch` | 워크스페이스 관리. `switch`는 현재 profile의 기본 워크스페이스 설정 | `create`: `--name`, `--slug`(모두 필수), `--issue-prefix`, `--description`, `--context` / `--context-stdin`. `update`는 slug를 제외한 같은 항목 변경 |
| | `mcp list/add/update/remove` | 워크스페이스의 MCP 서버 라이브러리를 관리 | 쓰기는 owner/admin 전용. 여기에 추가한 서버는 어떤 에이전트에도 할당되지 않으며 `multica agent mcp add`로 할당합니다. `list`는 이름과 transport만 표시하고, 저장된 항목은 쓰기 전용이라 어떤 역할에도 반환되지 않습니다. `--server-config-file` / `--server-config-stdin`은 토큰이 셸 기록에 남지 않게 합니다 |
| | `member list/invite <email>` | 멤버 확인 및 초대 전송 | `invite`: `--role`(member 또는 admin, 기본 member) |
| `repo` | `list/add/remove/checkout` | 워크스페이스 저장소 관리 및 로컬 checkout | `--url`(반복 가능). `checkout`: `--ref` |
@@ -284,8 +397,9 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
| | `stop` / `status` / `restart` | 중지, 상태 확인, 다시 시작(`restart`와 `start`의 flag가 같음) | |
| | `logs` | 데몬 로그 확인 | `--follow`, `--lines` |
| | `disk-usage` | 로컬 디스크 사용량 확인 | `--by-workspace`, `--by-task`, `--top` |
-| `runtime` | `list/usage/activity/update/rename/delete` | 런타임 확인 및 관리 | `delete`: `--cascade`(연결된 에이전트의 런타임을 해제하고 데이터를 보존하며 실행 취소) |
-| | `profile list/create/update/delete` | 사용자 지정 런타임 profile 관리 | |
+| | `autostart enable/disable/status` | 현재 profile의 로그인 시 자동 시작 등록 또는 해제 | `status`: `--output` |
+| `runtime` | `list/usage/activity/update/rename/delete` | 런타임 확인 및 관리 | `usage`: `--days`(기본값 90, 최대 365). `update`: `--target-version`(필수), `--wait`. `delete`: `--cascade`(연결된 에이전트의 런타임을 해제하고 데이터를 보존하며 실행 취소) |
+| | `profile list/create/update/delete` | 사용자 지정 런타임 profile 관리 | `create`: `--display-name`, `--command-name`(모두 필수), `--runtime-type`(또는 예전 `--protocol-family`), `--description`. `update`: `--enabled` |
| | `profile set-path/unset-path <profile-id>` | 로컬 실행 파일 경로 고정(로컬에만 적용되고 서버에 업로드되지 않음) | |
### Additional
@@ -303,17 +417,9 @@ CLI 설정 파일에는 사용자를 대신해 Multica에 접근할 수 있는 t
## 다른 코딩 에이전트에서 Multica 조작하기
-작업 대부분이 Codex, Claude Code, Cursor 안에서 이루어진다면 터미널로 전환하지 않고
-그곳에서 바로 Multica를 조작할 수 있습니다.
-[Multica CLI skill](https://github.com/multica-ai/multica-cli)은 이 페이지의 명령을
-안전하게 다루는 방법을 해당 에이전트에게 가르칩니다. 토큰을 낭비하지 않고 태스크와 댓글
-스레드를 읽고, 댓글은 파일을 통해 작성하며, 멘션·상태 변경·할당이 유발하는 부수 효과를
-올바르게 처리합니다.
-
-인증된 CLI를 통해서만 동작하며 그 자체로는 어떤 접근 권한도 부여하지 않습니다. 권한은
-여전히 로그인, 선택한 profile, workspace에서 나옵니다. CLI v0.4.26 이상이 필요합니다.
-Claude Code 플러그인 마켓플레이스, Codex skill 설치 도구, Cursor를 비롯해 Markdown
-지침을 읽어들이는 다른 도구의 설치 방법은 저장소 README를 참고하세요.
+작업 대부분이 Codex, Claude Code, Cursor 안에서 이루어진다면 터미널로 전환하지 않고 그곳에서 바로 Multica를 조작할 수 있습니다. [Multica CLI skill](https://github.com/multica-ai/multica-cli)은 이 페이지의 명령을 안전하게 다루는 방법을 해당 에이전트에게 가르칩니다. 토큰을 낭비하지 않고 태스크와 댓글 스레드를 읽고, 댓글은 파일을 통해 작성하며, 멘션·상태 변경·할당이 유발하는 부수 효과를 올바르게 처리합니다.
+
+인증된 CLI를 통해서만 동작하며 그 자체로는 어떤 접근 권한도 부여하지 않습니다. 권한은 여전히 로그인, 선택한 profile, workspace에서 나옵니다. CLI v0.4.26 이상이 필요합니다. Claude Code 플러그인 마켓플레이스, Codex skill 설치 도구, Cursor를 비롯해 Markdown 지침을 읽어들이는 다른 도구의 설치 방법은 저장소 README를 참고하세요.
## 다음 단계
diff --git a/apps/docs/content/docs/cli.mdx b/apps/docs/content/docs/cli.mdx
index e794f69c19..eeca48be33 100644
--- a/apps/docs/content/docs/cli.mdx
+++ b/apps/docs/content/docs/cli.mdx
@@ -4,12 +4,14 @@ description: Install and log in to the Multica CLI, and manage workspaces, issue
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
The Multica CLI both connects local runtimes and manages workspaces, issues, agents, and automations from the terminal. This page covers the common paths; the flags your installed version supports are always defined by each command's own `--help`.
## Installation
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
@@ -21,12 +23,18 @@ With Homebrew installed, you can also run:
brew install multica-ai/tap/multica
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
+
+Run in PowerShell:
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
+</Tab>
+</Tabs>
+
Confirm the install:
```bash
@@ -35,13 +43,17 @@ multica version
## First connection
-Connect to Multica Cloud:
+Pick the service you are connecting to:
+
+<Tabs items={["Multica Cloud", "Self-hosted instance"]}>
+<Tab value="Multica Cloud">
```bash
multica setup
```
-Connect to a self-hosted instance:
+</Tab>
+<Tab value="Self-hosted instance">
```bash
multica setup self-host \
@@ -49,6 +61,9 @@ multica setup self-host \
--app-url https://app.example.com
```
+</Tab>
+</Tabs>
+
`setup` saves the server address, opens a browser to complete sign-in, and starts the daemon. When it finishes, check:
```bash
@@ -117,6 +132,55 @@ multica issue run-messages <task-id> --issue MUL-123
multica issue cancel-task <task-id> --issue MUL-123
```
+If an open issue with the same title (case-insensitive, extra spaces ignored) already exists under the same project and parent, `issue create` refuses and points to that issue. To create another one anyway, add `--allow-duplicate`. To mark an issue as a duplicate of another, run `multica issue status MUL-124 cancelled --duplicate-of MUL-123`.
+
+### Timeline
+
+`issue get` shows an issue as it is now. `issue timeline` lists, in order, the changes to status, priority, assignee, title, and dates and the run outcomes, interleaved with comments, which answers questions like "when did it move to in_review" or "how long has it been stuck in this status":
+
+```bash
+multica issue timeline MUL-123 --action status_changed
+multica issue timeline MUL-123 --activity-only --output json
+multica issue timeline MUL-123 --since 2026-08-19T00:00:00Z
+```
+
+`--activity-only` drops comments and keeps every activity record; `--action` returns only the given actions, is repeatable, and implies `--activity-only`. The server caps how far back it reads; when the result is truncated, a warning goes to stderr, and durations should not be inferred from it.
+
+### Reading long comment threads
+
+On an issue with many comments, reading them one by one costs an agent a lot of tokens. Scan the threads first, then open the one you need:
+
+```bash
+multica issue comment list MUL-123 --roots-only --summary --output json --compact
+multica issue comment list MUL-123 --thread <comment-id> --tail 5 --output json --compact
+```
+
+- `--roots-only` returns only top-level comments, each with its reply count and last activity time.
+- `--summary` clips each comment to a short preview.
+- `--compact` applies to JSON output and drops fields that carry no information (such as the echoed `issue_id` and empty arrays).
+- `--recent N` returns the N most recently active threads with every reply, which can be long.
+- Resolved threads are folded to their root and conclusion by default; add `--full` for the complete text.
+
+Lists can be trimmed to the fields you need, too: `multica issue list --output json --fields id,identifier,title,status`. The filtering happens in the CLI, so it shrinks output and context, not the request.
+
+### Wakeups
+
+A wakeup starts an ordinary run for an agent when an event happens, a condition becomes true, or a time arrives. The full rules are in [Issue wakeups](/issue-wakeups).
+
+```bash
+multica issue wakeup events
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --event comment.created --filter-actor-type member --filter-actor-id <user-id> \
+ --instruction "When they reply, update the quote from their answer"
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --kind every --every 1h --expires-in 72h \
+ --instruction "Check whether the supplier has replied"
+multica issue wakeup list MUL-123
+multica issue wakeup runs MUL-123 <wakeup-id>
+```
+
+Creating one from a terminal as a member requires `--agent-id`; an agent creating one inside its own run wakes itself by default.
+
## Agents and skills
```bash
@@ -141,6 +205,23 @@ multica skill import --url <skill-url> --on-conflict skip
`overwrite` is only allowed for the skill's creator and preserves the original ID and agent bindings.
+Environment variables and MCP configuration often carry tokens. Values typed on the command line stay in shell history and `ps` output, so pass them through the `-file` or `-stdin` forms:
+
+```bash
+multica agent create --name "Ops helper" --runtime-id <runtime-id> \
+ --custom-env-file ./agent-env.json \
+ --mcp-config-file ./mcp.json \
+ --custom-args '["--max-turns", "40"]'
+
+multica agent env set <agent-id> --custom-env-stdin < agent-env.json
+multica agent update <agent-id> --mcp-config-file ./mcp.json
+```
+
+- The `--custom-env` flags exist only on `agent create`. Change variables later with `agent env set`, which replaces the whole set; keys whose value is `****` keep their existing value.
+- `agent update --mcp-config null` clears the MCP configuration.
+- `--custom-args` is a JSON array placed at the end of the launch arguments. Choose the model with `--model`; some tools reject `--model` inside custom arguments.
+- `--permission-mode` controls who can invoke the agent: `private` for the owner only, or `public_to` with `--public-to-workspace` or `--public-to-member <user-id>`. `--visibility private|workspace` is the older form and maps onto `--permission-mode`; when both are given, `--permission-mode` wins.
+
### Agent run history
`multica agent tasks <agent-id> --limit 200` returns the newest page of runs.
@@ -171,15 +252,45 @@ multica runtime usage <runtime-id>
multica runtime activity <runtime-id>
```
+```bash
+multica daemon autostart enable
+multica runtime usage <runtime-id> --days 30
+multica runtime update <runtime-id> --target-version <version> --wait
+multica runtime profile create --display-name "Internal Claude wrapper" \
+ --command-name ccms --runtime-type claude
+```
+
+`daemon autostart` registers the current profile to start at login; see [Start at login](/daemon-runtimes#autostart) for platform details. `runtime usage` covers 90 days by default, and `--days` goes up to 365. `runtime update` asks the daemon on that computer to update its CLI to the given version; `--wait` keeps polling until the update finishes. `runtime profile create` takes the compatible tool through `--runtime-type` (the older `--protocol-family` still works); fixed arguments can currently be set only in the web app.
+
Deleting a runtime that still has active agents bound to it is refused by default. `multica runtime delete <id> --cascade` unbinds those agents, preserves their configuration and history, and cancels their active runs.
See [Daemon and runtimes](/daemon-runtimes) for how it works and for custom profiles.
+## Projects, workspaces, and autopilots
+
+```bash
+multica project create --title "Summer campaign" --lead "Lei Li" \
+ --repo https://github.com/acme/campaign-site
+multica project resource add <project-id> --type github_repo \
+ --url https://github.com/acme/brand-assets --default-branch-hint main
+
+multica workspace create --name "Operations" --slug ops --issue-prefix OPS
+multica workspace update --context-stdin < team-context.md
+
+multica autopilot create --title "Weekly sales report" --agent "Ops helper" \
+ --mode create_issue --issue-title-template "Sales report {{date}}"
+multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Europe/London
+```
+
+- `--lead` takes the name of a member or an agent. `--default-branch-hint` only tells the agent the repository's default branch; it does not switch branches.
+- A workspace's `--context` is provided to every agent in the workspace. `--slug` cannot be changed after creation. `--issue-prefix` is uppercased; changing it renumbers every existing issue, and old identifiers in external references stop resolving.
+- `--issue-title-template` interpolates only `{{date}}` (UTC, `YYYY-MM-DD`) and rejects any other `{{...}}` token. A schedule trigger's `--timezone` defaults to UTC.
+
## Command overview
| Command | Purpose |
| --- | --- |
-| `issue` | Create, update, assign, and search issues; manage comments, subscribers, labels, properties, and runs |
+| `issue` | Create, update, assign, and search issues; manage comments, subscribers, labels, properties, wakeups, the timeline, and runs |
| `project` | Manage projects and their resources |
| `label`, `property` | Manage workspace labels and custom properties |
| `agent`, `skill`, `squad` | Manage agents, skills, and squads |
@@ -249,9 +360,9 @@ The tables below cover every current top-level command, grouped the way the CLI
| Command | Subcommand | Purpose | Key flags |
| --- | --- | --- | --- |
-| `issue` | `list` | List issues | `--status`, `--priority`, `--assignee`, `--project`, `--metadata` (repeatable), `--property` (repeatable, `"Name=Value"` or a comparison such as `"Score>=3"`, `"Due<2026-01-01"`, `"Notes~=text"`; `__none__` matches unset), `--limit`, `--offset`, `--sort` (incl. `property:<name-or-id>`), `--full-id`, `--resolve-properties` (JSON only; rows with property, option and member names beside the stored ids) |
+| `issue` | `list` | List issues | `--status`, `--priority`, `--assignee`, `--project`, `--metadata` (repeatable), `--property` (repeatable, `"Name=Value"` or a comparison such as `"Score>=3"`, `"Due<2026-01-01"`, `"Notes~=text"`; `__none__` matches unset), `--limit`, `--offset`, `--sort` (incl. `property:<name-or-id>`), `--full-id`, `--fields` (JSON only; comma-separated fields to keep), `--resolve-properties` (JSON only; rows with property, option and member names beside the stored ids) |
| | `get <id>` | Show a single issue | `--resolve-properties` (JSON only; rows with property, option and member names beside the stored ids) |
-| | `create` | Create an issue | `--title` (required), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment` (repeatable) |
+| | `create` | Create an issue | `--title` (required), `--description` / `--description-stdin` / `--description-file`, `--status`, `--priority`, `--assignee`, `--parent`, `--stage`, `--project`, `--start-date`, `--due-date`, `--attachment` (repeatable), `--property` (repeatable), `--allow-duplicate` (create even when an open issue with the same title exists) |
| | `update <id>` | Update issue fields | Same fields as `create`, plus `--position`, `--no-start`, `--duplicate-of` |
| | `assign <id>` | Assign or unassign | `--to` (fuzzy name match against members, agents, and squads), `--to-id`, `--unassign`, `--no-start` |
| | `status <id> <status>` | Change status | `--no-start`, `--duplicate-of` |
@@ -259,7 +370,9 @@ The tables below cover every current top-level command, grouped the way the CLI
| | `search <query>` | Search issues | `--limit`, `--include-closed` |
| | `children <id>` | List sub-issues grouped by stage | |
| | `pull-requests <id>` | List linked PRs | |
-| | `comment list/add/delete/resolve/unresolve` | Manage comments | `add`: `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment`; `list`: `--since`, `--thread`, `--tail` |
+| | `comment list/add/update/delete/resolve/unresolve` | Manage comments | `add`: `--content` / `--content-stdin` / `--content-file`, `--parent`, `--attachment`; `update`: `--expected-revision` (required), `--content` / `--content-stdin` / `--content-file`; `list`: `--since`, `--thread`, `--tail`, `--recent`, `--roots-only`, `--summary`, `--compact`, `--full` |
+| | `timeline <id>` | List activity records and comments in time order | `--action` (repeatable), `--activity-only`, `--since`, `--tail` |
+| | `wakeup events/list/get/create/update/disable/trigger/delete/checkin/runs` | Manage issue wakeups; see [Issue wakeups](/issue-wakeups) | `create` / `update`: `--agent-id`, `--kind` (`event`, `at`, `every`, `cron`), `--event`, `--at` / `--after`, `--every`, `--cron`, `--timezone`, `--until-*` conditions, `--expires-in` / `--expires-at`, `--instruction` / `--instruction-file`; `checkin`: `--note` |
| | `subscriber list/add/remove <issue-id>` | Manage subscribers | `--user`, `--user-id` (defaults to the current user) |
| | `label list/add/remove <issue-id>` | Manage labels on an issue | |
| | `metadata list/get/set/delete <issue-id>` | Manage issue-level key-value metadata | |
@@ -269,23 +382,23 @@ The tables below cover every current top-level command, grouped the way the CLI
| | `usage <issue-id>` | View aggregated token usage | |
| | `rerun <id>` | Re-enqueue a run for the current assignee | |
| | `cancel-task <task-id>` | Cancel a running or queued run | `--issue` |
-| `project` | `list/get/create/update/delete` | Manage projects | |
+| `project` | `list/get/create/update/delete` | Manage projects | `create`: `--title` (required), `--lead`, `--status`, `--icon`, `--start-date`, `--due-date`, `--repo` (repeatable) |
| | `status <id> <status>` | Change project status | |
-| | `resource list/add/update/remove` | Manage project resources | `--type`, `--url`, `--local-path`, `--daemon-id`, `--execution-mode` (`in_place` / `worktree` for a local directory) |
+| | `resource list/add/update/remove` | Manage project resources | `--type`, `--url`, `--default-branch-hint`, `--ref`, `--local-path`, `--daemon-id`, `--execution-mode` (`in_place` / `worktree` for a local directory) |
| `label` | `list/get/create/update/delete` | Manage workspace labels | `list`: `--resource-type` (`issue` or `skill`), `--full-id`; `create`: `--name`, `--color`, `--resource-type` (`issue` or `skill`), `--description` |
| `property` | `list/get/create/update/archive/unarchive` | Manage workspace custom properties | `create`: `--name`, `--type` (`text`, `number`, `select`, `multi_select`, `date`, `checkbox`, `url`, `actor`, `multi_actor`, `multi_text`, `multi_url`), `--option` (repeatable, select types only); `list`: `--include-archived`; the type cannot be changed after creation |
-| `agent` | `list/get/create/update/archive/restore` | Manage agents | `--name`, `--runtime-id` (required for `create`), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--mcp-config`, `--permission-mode`, `--max-concurrent-tasks` |
+| `agent` | `list/get/create/update/archive/restore` | Manage agents | `--name`, `--runtime-id` (required for `create`), `--instructions`, `--conversation-starters`, `--model`, `--thinking-level`, `--custom-env` / `--custom-env-file` / `--custom-env-stdin` (`create` only), `--custom-args`, `--mcp-config` / `--mcp-config-file` / `--mcp-config-stdin`, `--permission-mode`, `--visibility` (older form), `--max-concurrent-tasks` |
| | `copy <agent-id>` | Copy into a new agent; the original is untouched | `--name` (defaults to the original name plus ` (copy)`), `--runtime-id` (copying to another runtime also requires `--model`), `--no-skills`; secret configuration such as `custom_env`, `mcp_config`, and `runtime_config` is not copied — re-provide it with the same flags as `create` |
| | `tasks <id>` | View an agent's runs | |
| | `avatar <id>` | Upload an avatar | |
-| | `env get/set <agent-id>` | Read and write custom environment variables (owner and admin only) | |
+| | `env get/set <agent-id>` | Read and write custom environment variables (agent owner or workspace owner/admin; every read is recorded) | `set`: `--custom-env` / `--custom-env-file` / `--custom-env-stdin`; replaces the whole set, and keys whose value is `****` keep their existing value |
| | `skills list/set/add <agent-id>` | Manage attached skills | `--skill-ids` (`set` replaces the full list, `add` appends) |
| | `mcp list/add/enable/disable/remove <agent-id>` | Assign workspace MCP servers to this agent | Take the server id from `workspace mcp list`. A library entry does nothing until it is added here; `disable` stops sending it without dropping the assignment |
-| `autopilot` | `list/get/create/update/delete` | Manage automations | `create`: `--title`, `--agent`, `--mode` (all required), `--project`, `--subscriber` (repeatable) |
+| `autopilot` | `list/get/create/update/delete` | Manage automations | `create`: `--title`, `--agent`, `--mode` (all required), `--description`, `--issue-title-template`, `--project`, `--subscriber` (repeatable) |
| | `trigger <id>` | Trigger a run manually | |
| | `runs <id>` | View run history | |
-| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | Manage schedule and webhook triggers | |
-| `workspace` | `list/get/create/update/switch` | Manage workspaces; `switch` sets the current profile's default workspace | |
+| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | Manage schedule and webhook triggers | `trigger-add`: `--kind` (`schedule` or `webhook`), `--cron`, `--timezone` (default UTC), `--label` |
+| `workspace` | `list/get/create/update/switch` | Manage workspaces; `switch` sets the current profile's default workspace | `create`: `--name`, `--slug` (both required), `--issue-prefix`, `--description`, `--context` / `--context-stdin`; `update` changes the same fields except the slug |
| | `mcp list/add/update/remove` | Manage the workspace's MCP server library | Writes are owner/admin. A server added here is assigned to no agent — give it to one with `multica agent mcp add`. `list` shows names and transports only; the stored entry is write-only and never returned. `--server-config-file` / `--server-config-stdin` keep tokens out of shell history |
| | `member list/invite <email>` | View members, send invites | `invite`: `--role` (member or admin, default member) |
| `repo` | `list/add/remove/checkout` | Manage workspace repositories and check them out locally | `--url` (repeatable); `checkout`: `--ref` |
@@ -307,8 +420,9 @@ The tables below cover every current top-level command, grouped the way the CLI
| | `stop` / `status` / `restart` | Stop, check status, restart (`restart` takes the same flags as `start`) | |
| | `logs` | View daemon logs | `--follow`, `--lines` |
| | `disk-usage` | View local disk usage | `--by-workspace`, `--by-task`, `--top` |
-| `runtime` | `list/usage/activity/update/rename/delete` | View and manage runtimes | `delete`: `--cascade` (unbinds bound agents, preserves their data, and cancels their runs) |
-| | `profile list/create/update/delete` | Manage custom runtime profiles | |
+| | `autostart enable/disable/status` | Register or remove start-at-login for the current profile | `status`: `--output` |
+| `runtime` | `list/usage/activity/update/rename/delete` | View and manage runtimes | `usage`: `--days` (default 90, max 365); `update`: `--target-version` (required), `--wait`; `delete`: `--cascade` (unbinds bound agents, preserves their data, and cancels their runs) |
+| | `profile list/create/update/delete` | Manage custom runtime profiles | `create`: `--display-name`, `--command-name` (both required), `--runtime-type` (or the older `--protocol-family`), `--description`; `update`: `--enabled` |
| | `profile set-path/unset-path <profile-id>` | Pin a local executable path (local only, never uploaded to the server) | |
### Additional
@@ -326,18 +440,9 @@ The tables below cover every current top-level command, grouped the way the CLI
## Driving Multica from another coding agent
-If most of your work already happens inside Codex, Claude Code, or Cursor, you can
-operate Multica from there instead of switching to a terminal. The
-[Multica CLI skill](https://github.com/multica-ai/multica-cli) teaches those agents
-to drive the commands on this page safely: reading issues and comment threads
-without burning tokens, writing comments through a file, and handling the side
-effects that mentions, status changes, and assignments carry.
-
-It runs entirely through your authenticated CLI and grants no access of its own —
-permissions still come from your login, selected profile, and workspace. It requires
-CLI v0.4.26 or newer. The repository README covers installation for the Claude Code
-plugin marketplace, the Codex skill installer, Cursor, and any other tool that loads
-Markdown instructions.
+If most of your work already happens inside Codex, Claude Code, or Cursor, you can operate Multica from there instead of switching to a terminal. The [Multica CLI skill](https://github.com/multica-ai/multica-cli) teaches those agents to drive the commands on this page safely: reading issues and comment threads without burning tokens, writing comments through a file, and handling the side effects that mentions, status changes, and assignments carry.
+
+It runs entirely through your authenticated CLI and grants no access of its own — permissions still come from your login, selected profile, and workspace. It requires CLI v0.4.26 or newer. The repository README covers installation for the Claude Code plugin marketplace, the Codex skill installer, Cursor, and any other tool that loads Markdown instructions.
## Next steps
diff --git a/apps/docs/content/docs/cli.zh.mdx b/apps/docs/content/docs/cli.zh.mdx
index 72f2885e79..ecb2ec0982 100644
--- a/apps/docs/content/docs/cli.zh.mdx
+++ b/apps/docs/content/docs/cli.zh.mdx
@@ -4,12 +4,14 @@ description: 安装并登录 Multica CLI,在终端中管理工作区、任务
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Multica CLI 既负责连接本机运行时,也可以在终端中管理工作区、任务、智能体和自动化。这里介绍常用路径;当前版本支持的参数始终以命令自身的 `--help` 为准。
## 安装
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
@@ -21,12 +23,18 @@ curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/ins
brew install multica-ai/tap/multica
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
+
+在 PowerShell 中运行:
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
+</Tab>
+</Tabs>
+
确认安装成功:
```bash
@@ -35,20 +43,27 @@ multica version
## 第一次连接
-连接 Multica Cloud:
+按连接的服务选择:
+
+<Tabs items={["Multica Cloud", "自托管实例"]}>
+<Tab value="Multica Cloud">
```bash
multica setup
```
-连接自托管实例:
+</Tab>
+<Tab value="自托管实例">
```bash
multica setup self-host \
- --server-url https://api.example.com \
- --app-url https://app.example.com
+ --server-url https://api.example.com \
+ --app-url https://app.example.com
```
+</Tab>
+</Tabs>
+
`setup` 会保存服务地址、打开浏览器完成登录,并启动守护进程。完成后检查:
```bash
@@ -117,6 +132,55 @@ multica issue run-messages <task-id> --issue MUL-123
multica issue cancel-task <task-id> --issue MUL-123
```
+同一项目、同一父任务下已有标题相同(不区分大小写,忽略多余空格)且未关闭的任务时,`issue create` 会拒绝创建并给出那个任务。确实要再建一个,加 `--allow-duplicate`;要把一个任务标为另一个的重复,用 `multica issue status MUL-124 cancelled --duplicate-of MUL-123`。
+
+### 时间线
+
+`issue get` 给出任务现在的状态;`issue timeline` 按时间顺序列出状态、优先级、负责人、标题、日期的改动和运行结果,并混排评论,用来回答"什么时候进入 in_review""卡在当前状态多久了":
+
+```bash
+multica issue timeline MUL-123 --action status_changed
+multica issue timeline MUL-123 --activity-only --output json
+multica issue timeline MUL-123 --since 2026-08-19T00:00:00Z
+```
+
+`--activity-only` 去掉评论,保留全部活动记录;`--action` 只返回指定的动作,可重复,并隐含 `--activity-only`。服务器读取的历史有上限,被截断时 stderr 会打印警告,这时不要据此推算停留时长。
+
+### 读长评论线程
+
+评论多的任务,智能体逐条读取很费 token。先扫一遍线程,再展开需要的那一个:
+
+```bash
+multica issue comment list MUL-123 --roots-only --summary --output json --compact
+multica issue comment list MUL-123 --thread <comment-id> --tail 5 --output json --compact
+```
+
+- `--roots-only` 只返回顶层评论,每条附带回复数和最近活动时间。
+- `--summary` 把每条内容截成预览。
+- `--compact` 只作用于 JSON 输出,去掉不带信息的字段(例如重复的 `issue_id`、空数组)。
+- `--recent N` 返回最近活跃的 N 个线程,每个线程带上全部回复,回复多时输出可能很长。
+- 已解决的线程默认折叠成首条评论和结论,需要原文时加 `--full`。
+
+列表也可以只取需要的字段:`multica issue list --output json --fields id,identifier,title,status`。筛选在 CLI 本地完成,减少的是输出和上下文,不是请求量。
+
+### 唤醒
+
+唤醒让智能体在某个事件发生、某个条件成立或到点时开始一次普通运行。完整规则见[任务唤醒](/issue-wakeups)。
+
+```bash
+multica issue wakeup events
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --event comment.created --filter-actor-type member --filter-actor-id <user-id> \
+ --instruction "对方回复后,按回复内容更新报价单"
+multica issue wakeup create MUL-123 --agent-id <agent-id> \
+ --kind every --every 1h --expires-in 72h \
+ --instruction "检查供应商是否回信"
+multica issue wakeup list MUL-123
+multica issue wakeup runs MUL-123 <wakeup-id>
+```
+
+在终端里以成员身份创建时需要 `--agent-id`;智能体在自己的运行中创建时默认唤醒它自己。
+
## 智能体和 skill
```bash
@@ -141,6 +205,23 @@ multica skill import --url <skill-url> --on-conflict skip
`overwrite` 只允许 skill 的创建者使用,并保留原来的 ID 与智能体绑定关系。
+环境变量和 MCP 配置常带有 token。命令行里直接写值会留在 shell 历史和 `ps` 输出中,用 `-file` 或 `-stdin` 形式传入:
+
+```bash
+multica agent create --name "运营助手" --runtime-id <runtime-id> \
+ --custom-env-file ./agent-env.json \
+ --mcp-config-file ./mcp.json \
+ --custom-args '["--max-turns", "40"]'
+
+multica agent env set <agent-id> --custom-env-stdin < agent-env.json
+multica agent update <agent-id> --mcp-config-file ./mcp.json
+```
+
+- `--custom-env` 系列只在 `agent create` 中可用。之后修改用 `agent env set`,它整体替换原有变量,值写成 `****` 的键保留原值。
+- `agent update --mcp-config null` 清除 MCP 配置。
+- `--custom-args` 是 JSON 数组,排在启动参数的最后。选模型用 `--model`,部分工具会拒绝出现在自定义参数里的 `--model`。
+- 谁能调用智能体用 `--permission-mode`:`private` 只有所有者,`public_to` 配合 `--public-to-workspace` 或 `--public-to-member <user-id>`。`--visibility private|workspace` 是旧写法,会映射到 `--permission-mode`;两者同时给出时以 `--permission-mode` 为准。
+
## 守护进程和运行时
```bash
@@ -156,15 +237,45 @@ multica runtime usage <runtime-id>
multica runtime activity <runtime-id>
```
+```bash
+multica daemon autostart enable
+multica runtime usage <runtime-id> --days 30
+multica runtime update <runtime-id> --target-version <version> --wait
+multica runtime profile create --display-name "内部 Claude 封装" \
+ --command-name ccms --runtime-type claude
+```
+
+`daemon autostart` 为当前 profile 登记开机自启,平台差异见[开机自启](/daemon-runtimes#autostart)。`runtime usage` 默认统计 90 天,`--days` 最多 365。`runtime update` 让那台电脑上的守护进程把 CLI 更新到指定版本,`--wait` 会一直等到更新结束。`runtime profile create` 用 `--runtime-type` 指定兼容的工具(旧的 `--protocol-family` 仍可用);固定参数目前只能在网页端填写。
+
删除仍绑定活跃智能体的运行时时,命令默认拒绝。`multica runtime delete <id> --cascade` 会解绑这些智能体、保留其配置与历史记录,并取消它们的活动运行。
运行机制和自定义 profile 见[守护进程与运行时](/daemon-runtimes)。
+## 项目、工作区和自动化
+
+```bash
+multica project create --title "618 活动" --lead "李雷" \
+ --repo https://github.com/acme/campaign-site
+multica project resource add <project-id> --type github_repo \
+ --url https://github.com/acme/brand-assets --default-branch-hint main
+
+multica workspace create --name "运营部" --slug ops --issue-prefix OPS
+multica workspace update --context-stdin < team-context.md
+
+multica autopilot create --title "每周销售周报" --agent "运营助手" \
+ --mode create_issue --issue-title-template "销售周报 {{date}}"
+multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/Shanghai
+```
+
+- `--lead` 接受成员或智能体的名称。`--default-branch-hint` 只告诉智能体仓库的默认分支,不会切换分支。
+- 工作区的 `--context` 会提供给工作区里的每个智能体。`--slug` 创建后不能修改;`--issue-prefix` 会转成大写,修改它会给所有现有任务重新编号,外部引用里的旧编号随之失效。
+- `--issue-title-template` 只替换 `{{date}}`(UTC,`YYYY-MM-DD`),其他 `{{...}}` 会被拒绝。定时触发器的 `--timezone` 默认 UTC。
+
## 命令概览
| 命令 | 用途 |
| --- | --- |
-| `issue` | 创建、更新、分配和搜索任务;管理评论、订阅、标签、属性与执行记录 |
+| `issue` | 创建、更新、分配和搜索任务;管理评论、订阅、标签、属性、唤醒、时间线与执行记录 |
| `project` | 管理项目及其资源 |
| `label`、`property` | 管理工作区标签和自定义属性 |
| `agent`、`skill`、`squad` | 管理智能体、skill 和小队 |
@@ -178,7 +289,7 @@ multica runtime activity <runtime-id>
| `config` | 查看或修改当前 CLI profile 的本地配置 |
| `update`、`version` | 更新 CLI 或查看版本 |
-`multica chat` 读取的是**智能体当前正在处理的外部聊天会话**,主要供聊天集成中的智能体使用;它不是用于浏览任意工作区对话的通用命令。
+`multica chat` 读取的是**智能体当前正在处理的外部聊天会话**,主要供聊天集成中的智能体使用,不能用来浏览任意工作区对话。
## ID 和输出格式
@@ -201,8 +312,8 @@ multica agent list --output json
```bash
multica setup self-host --profile staging \
- --server-url https://api.staging.example.com \
- --app-url https://app.staging.example.com
+ --server-url https://api.staging.example.com \
+ --app-url https://app.staging.example.com
multica issue list --profile staging
```
@@ -226,9 +337,9 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
| 命令 | 子命令 | 用途 | 关键 flag |
| --- | --- | --- | --- |
-| `issue` | `list` | 列出任务 | `--status`、`--priority`、`--assignee`、`--project`、`--metadata`(可重复)、`--property`(可重复,`"名称=值"` 或 `"Score>=3"`、`"Due<2026-01-01"`、`"Notes~=text"` 这样的比较;`__none__` 匹配未设置)、`--limit`、`--offset`、`--sort`(支持 `property:<名称或 id>`)、`--full-id`、`--resolve-properties`(仅 JSON;在保存的 id 旁附上属性、选项和成员名称) |
+| `issue` | `list` | 列出任务 | `--status`、`--priority`、`--assignee`、`--project`、`--metadata`(可重复)、`--property`(可重复,`"名称=值"` 或 `"Score>=3"`、`"Due<2026-01-01"`、`"Notes~=text"` 这样的比较;`__none__` 匹配未设置)、`--limit`、`--offset`、`--sort`(支持 `property:<名称或 id>`)、`--full-id`、`--fields`(仅 JSON;逗号分隔,只输出这些字段)、`--resolve-properties`(仅 JSON;在保存的 id 旁附上属性、选项和成员名称) |
| | `get <id>` | 查看单个任务 | `--resolve-properties`(仅 JSON;在保存的 id 旁附上属性、选项和成员名称) |
-| | `create` | 创建任务 | `--title`(必填)、`--description` / `--description-stdin` / `--description-file`、`--status`、`--priority`、`--assignee`、`--parent`、`--stage`、`--project`、`--start-date`、`--due-date`、`--attachment`(可重复) |
+| | `create` | 创建任务 | `--title`(必填)、`--description` / `--description-stdin` / `--description-file`、`--status`、`--priority`、`--assignee`、`--parent`、`--stage`、`--project`、`--start-date`、`--due-date`、`--attachment`(可重复)、`--property`(可重复)、`--allow-duplicate`(已有同名未关闭任务时仍创建) |
| | `update <id>` | 更新任务字段 | 与 `create` 同类字段,另有 `--position`、`--no-start`、`--duplicate-of` |
| | `assign <id>` | 指派或取消指派 | `--to`(名称模糊匹配成员、智能体或小队)、`--to-id`、`--unassign`、`--no-start` |
| | `status <id> <status>` | 修改状态 | `--no-start`、`--duplicate-of` |
@@ -236,7 +347,9 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
| | `search <query>` | 搜索任务 | `--limit`、`--include-closed` |
| | `children <id>` | 按阶段分组列出子任务 | |
| | `pull-requests <id>` | 列出关联的 PR | |
-| | `comment list/add/delete/resolve/unresolve` | 管理评论 | `add`:`--content` / `--content-stdin` / `--content-file`、`--parent`、`--attachment`;`list`:`--since`、`--thread`、`--tail` |
+| | `comment list/add/update/delete/resolve/unresolve` | 管理评论 | `add`:`--content` / `--content-stdin` / `--content-file`、`--parent`、`--attachment`;`update`:`--expected-revision`(必填)、`--content` / `--content-stdin` / `--content-file`;`list`:`--since`、`--thread`、`--tail`、`--recent`、`--roots-only`、`--summary`、`--compact`、`--full` |
+| | `timeline <id>` | 按时间列出活动记录和评论 | `--action`(可重复)、`--activity-only`、`--since`、`--tail` |
+| | `wakeup events/list/get/create/update/disable/trigger/delete/checkin/runs` | 管理任务唤醒,详见[任务唤醒](/issue-wakeups) | `create` / `update`:`--agent-id`、`--kind`(`event`、`at`、`every`、`cron`)、`--event`、`--at` / `--after`、`--every`、`--cron`、`--timezone`、`--until-*` 条件、`--expires-in` / `--expires-at`、`--instruction` / `--instruction-file`;`checkin`:`--note` |
| | `subscriber list/add/remove <issue-id>` | 管理订阅者 | `--user`、`--user-id`(缺省为当前用户) |
| | `label list/add/remove <issue-id>` | 管理任务上的标签 | |
| | `metadata list/get/set/delete <issue-id>` | 管理任务级键值元数据 | |
@@ -246,23 +359,23 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
| | `usage <issue-id>` | 查看聚合 token 用量 | |
| | `rerun <id>` | 按当前指派重新入队执行 | |
| | `cancel-task <task-id>` | 取消进行中或排队中的运行 | `--issue` |
-| `project` | `list/get/create/update/delete` | 管理项目 | |
+| `project` | `list/get/create/update/delete` | 管理项目 | `create`:`--title`(必填)、`--lead`、`--status`、`--icon`、`--start-date`、`--due-date`、`--repo`(可重复) |
| | `status <id> <status>` | 修改项目状态 | |
-| | `resource list/add/update/remove` | 管理项目附加资源 | `--type`、`--url`、`--local-path`、`--daemon-id`、`--execution-mode`(本地目录的 `in_place` / `worktree`) |
+| | `resource list/add/update/remove` | 管理项目附加资源 | `--type`、`--url`、`--default-branch-hint`、`--ref`、`--local-path`、`--daemon-id`、`--execution-mode`(本地目录的 `in_place` / `worktree`) |
| `label` | `list/get/create/update/delete` | 管理工作区标签 | `list`:`--resource-type`(`issue` 或 `skill`)、`--full-id`;`create`:`--name`、`--color`、`--resource-type`(`issue` 或 `skill`)、`--description` |
| `property` | `list/get/create/update/archive/unarchive` | 管理工作区自定义属性 | `create`:`--name`、`--type`(`text`、`number`、`select`、`multi_select`、`date`、`checkbox`、`url`、`actor`、`multi_actor`、`multi_text`、`multi_url`)、`--option`(可重复,仅 select 类型);`list`:`--include-archived`;类型创建后不可修改 |
-| `agent` | `list/get/create/update/archive/restore` | 管理智能体 | `--name`、`--runtime-id`(`create` 必填)、`--instructions`、`--conversation-starters`、`--model`、`--thinking-level`、`--mcp-config`、`--permission-mode`、`--max-concurrent-tasks` |
+| `agent` | `list/get/create/update/archive/restore` | 管理智能体 | `--name`、`--runtime-id`(`create` 必填)、`--instructions`、`--conversation-starters`、`--model`、`--thinking-level`、`--custom-env` / `--custom-env-file` / `--custom-env-stdin`(仅 `create`)、`--custom-args`、`--mcp-config` / `--mcp-config-file` / `--mcp-config-stdin`、`--permission-mode`、`--visibility`(旧写法)、`--max-concurrent-tasks` |
| | `copy <agent-id>` | 复制为新智能体,原智能体不受影响 | `--name`(默认为原名加 ` (copy)`)、`--runtime-id`(复制到其他运行时时必须同时指定 `--model`)、`--no-skills`;`custom_env`、`mcp_config`、`runtime_config` 等机密配置不会复制,需用与 `create` 相同的 flag 重新提供 |
| | `tasks <id>` | 查看智能体的运行 | |
| | `avatar <id>` | 上传头像 | |
-| | `env get/set <agent-id>` | 读写自定义环境变量(仅 owner 和 admin) | |
+| | `env get/set <agent-id>` | 读写自定义环境变量(智能体所有者或工作区 owner/admin;每次读取都会记录) | `set`:`--custom-env` / `--custom-env-file` / `--custom-env-stdin`,整体替换,值为 `****` 的键保留原值 |
| | `skills list/set/add <agent-id>` | 管理绑定的 skill | `--skill-ids`(`set` 全量替换,`add` 增量添加) |
| | `mcp list/add/enable/disable/remove <agent-id>` | 给该 agent 分配工作区 MCP 服务 | server id 从 `workspace mcp list` 获取。库里的条目在这里添加之前不会生效;`disable` 只停止下发,保留分配 |
-| `autopilot` | `list/get/create/update/delete` | 管理自动化 | `create`:`--title`、`--agent`、`--mode`(均必填)、`--project`、`--subscriber`(可重复) |
+| `autopilot` | `list/get/create/update/delete` | 管理自动化 | `create`:`--title`、`--agent`、`--mode`(均必填)、`--description`、`--issue-title-template`、`--project`、`--subscriber`(可重复) |
| | `trigger <id>` | 手动触发一次 | |
| | `runs <id>` | 查看运行历史 | |
-| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 管理定时和 webhook 触发器 | |
-| `workspace` | `list/get/create/update/switch` | 管理工作区;`switch` 设置当前 profile 的默认工作区 | |
+| | `trigger-add/trigger-update/trigger-delete/trigger-rotate-url` | 管理定时和 webhook 触发器 | `trigger-add`:`--kind`(`schedule` 或 `webhook`)、`--cron`、`--timezone`(默认 UTC)、`--label` |
+| `workspace` | `list/get/create/update/switch` | 管理工作区;`switch` 设置当前 profile 的默认工作区 | `create`:`--name`、`--slug`(均必填)、`--issue-prefix`、`--description`、`--context` / `--context-stdin`;`update` 可改除 slug 外的同类字段 |
| | `mcp list/add/update/remove` | 管理工作区的 MCP 服务库 | 写操作需要 owner/admin。这里添加的服务不会分配给任何 agent——用 `multica agent mcp add` 分配给某个 agent。`list` 只列出名称与 transport;存储的条目是只写的,任何角色都读不回。`--server-config-file` / `--server-config-stdin` 避免 token 进入 shell 历史 |
| | `member list/invite <email>` | 查看成员、发出邀请 | `invite`:`--role`(member 或 admin,默认 member) |
| `repo` | `list/add/remove/checkout` | 管理工作区仓库并检出到本机 | `--url`(可重复);`checkout`:`--ref` |
@@ -284,8 +397,9 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
| | `stop` / `status` / `restart` | 停止、查看状态、重启(`restart` 与 `start` 同一套 flag) | |
| | `logs` | 查看守护进程日志 | `--follow`、`--lines` |
| | `disk-usage` | 查看本机磁盘占用 | `--by-workspace`、`--by-task`、`--top` |
-| `runtime` | `list/usage/activity/update/rename/delete` | 查看和管理运行时 | `delete`:`--cascade`(解绑绑定的智能体、保留其数据并取消其运行) |
-| | `profile list/create/update/delete` | 管理自定义运行时 profile | |
+| | `autostart enable/disable/status` | 登记或取消当前 profile 的开机自启 | `status`:`--output` |
+| `runtime` | `list/usage/activity/update/rename/delete` | 查看和管理运行时 | `usage`:`--days`(默认 90,最多 365);`update`:`--target-version`(必填)、`--wait`;`delete`:`--cascade`(解绑绑定的智能体、保留其数据并取消其运行) |
+| | `profile list/create/update/delete` | 管理自定义运行时 profile | `create`:`--display-name`、`--command-name`(均必填)、`--runtime-type`(或旧的 `--protocol-family`)、`--description`;`update`:`--enabled` |
| | `profile set-path/unset-path <profile-id>` | 固定本机可执行文件路径(仅本地生效,不上传服务器) | |
### Additional
@@ -303,15 +417,9 @@ CLI 配置文件包含可代表你访问 Multica 的令牌。不要提交到仓
## 在其他编码智能体里操作 Multica
-如果你的工作大多发生在 Codex、Claude Code 或 Cursor 里,可以直接在那里操作 Multica,
-不必切回终端。[Multica CLI skill](https://github.com/multica-ai/multica-cli)
-会教这些智能体安全地使用本页的命令:低成本地读任务和评论线程、通过文件写评论,
-以及正确处理 mention、状态变更和指派带来的副作用。
+如果你的工作大多发生在 Codex、Claude Code 或 Cursor 里,可以直接在那里操作 Multica,不必切回终端。[Multica CLI skill](https://github.com/multica-ai/multica-cli) 会教这些智能体安全地使用本页的命令:读任务和评论线程时少耗 token、通过文件写评论,以及正确处理 mention、状态变更和指派带来的副作用。
-它完全通过你已认证的 CLI 运行,本身不授予任何权限 —— 权限仍然只来自你的登录、
-所选 profile 和 workspace。要求 CLI 版本不低于 v0.4.26。该仓库的 README 说明了
-Claude Code 插件市场、Codex skill 安装器、Cursor 以及其他任何加载 Markdown 指令的
-工具的安装方式。
+它完全通过你已认证的 CLI 运行,本身不授予任何权限,权限仍然只来自你的登录、所选 profile 和工作区。要求 CLI 版本不低于 v0.4.26。该仓库的 README 说明了 Claude Code 插件市场、Codex skill 安装器、Cursor 以及其他任何加载 Markdown 指令的工具的安装方式。
## 接下来
diff --git a/apps/docs/content/docs/cloud-quickstart.fr.mdx b/apps/docs/content/docs/cloud-quickstart.fr.mdx
index 9f398fb365..18d39d5f03 100644
--- a/apps/docs/content/docs/cloud-quickstart.fr.mdx
+++ b/apps/docs/content/docs/cloud-quickstart.fr.mdx
@@ -4,40 +4,50 @@ description: Connectez un ordinateur, créez votre premier agent et faites-lui a
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="info">
Avant qu'un agent puisse s'exécuter, l'ordinateur qui l'exécute doit disposer d'au moins un [outil de codage IA pris en charge](/providers), installé et connecté — par exemple Claude Code, Codex ou Cursor. Multica ne fournit pas ces outils.
</Callout>
-## 1. Connectez-vous et ouvrez votre espace de travail
+<Steps>
+<Step>
-Connectez-vous sur le web ([multica.ai](https://multica.ai)) ou avec [Multica Desktop](https://multica.ai/download). La connexion par code de vérification envoyé par e-mail et la connexion Google sont toutes deux prises en charge.
+## Connectez-vous et ouvrez votre espace de travail [#1-connectez-vous-et-ouvrez-votre-espace-de-travail]
-- **Desktop** : peut connecter automatiquement cet ordinateur.
-- **Web** : connectez l'ordinateur depuis la ligne de commande à l'étape suivante.
+Connectez-vous sur le web ([multica.ai](https://multica.ai)) ou avec [Multica Desktop](https://multica.ai/download). La connexion par code de vérification envoyé par e-mail et la connexion Google sont toutes deux prises en charge. Avec Desktop, l'étape suivante peut connecter cet ordinateur automatiquement ; sur le web, vous le connectez depuis la ligne de commande.
-## 2. Connectez un ordinateur
+</Step>
+<Step>
-Les agents exécutent le travail sur les ordinateurs que vous connectez. Ouvrez **Équipe IA → Runtimes** en bas de la barre latérale :
+## Connectez un ordinateur [#2-connectez-un-ordinateur]
+
+Les agents exécutent le travail sur les ordinateurs que vous connectez. Ouvrez **Runtimes** sous **Équipe IA** dans la barre latérale :
- **Avec Desktop** : Desktop enregistre automatiquement cet ordinateur comme runtime et détecte les outils de codage IA installés. Pour un outil que vous venez d'installer, cliquez sur **Actualiser** pour relancer la détection.
-- **Avec le Web, ou pour ajouter un autre ordinateur** : cliquez sur **Ajouter un ordinateur** en haut à droite, puis exécutez les deux commandes de la boîte de dialogue dans un terminal de l'ordinateur cible :
+- **Avec le Web, ou pour ajouter un autre ordinateur** : cliquez sur **Ajouter** en haut à droite, choisissez **Autre machine ou serveur**, puis exécutez les deux commandes de la boîte de dialogue dans un terminal de l'ordinateur cible :
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
- **macOS / Linux**
+```bash
+curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
+multica setup
+```
- ```bash
- curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
- multica setup
- ```
+</Tab>
+<Tab value="Windows">
- **Windows PowerShell**
+```powershell
+irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
+multica setup
+```
- ```powershell
- irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
- multica setup
- ```
+</Tab>
+</Tabs>
- `multica setup` ouvre un navigateur pour finaliser la connexion, puis laisse le daemon tourner en arrière-plan. Une fois le daemon en ligne, la boîte de dialogue détecte généralement l'ordinateur en moins d'une minute.
+`multica setup` ouvre un navigateur pour finaliser la connexion, puis laisse le daemon tourner en arrière-plan. Une fois le daemon en ligne, la boîte de dialogue détecte généralement l'ordinateur en moins d'une minute.
**Vérification** : un ordinateur en ligne apparaît dans la liste des runtimes.
@@ -47,20 +57,21 @@ Les agents exécutent le travail sur les ordinateurs que vous connectez. Ouvrez
Les commandes de connexion diffèrent légèrement sur les instances auto-hébergées — consultez le [démarrage rapide en auto-hébergement](/self-host-quickstart).
</Callout>
-## 3. Créez un agent
+</Step>
+<Step>
-Ouvrez **Équipe IA → Agents** dans la barre latérale, cliquez sur **Nouvel agent** et choisissez une méthode :
+## Créez un agent [#3-créez-un-agent]
-- **Partir de zéro** : remplissez vous-même les champs. Seul le nom est strictement obligatoire — confirmez le runtime et l'outil de codage IA, puis créez l'agent.
-- **Construire avec l'IA** : décrivez ce que vous voulez ; l'Agent Builder vous pose des questions et génère la configuration. Cette méthode nécessite un runtime en ligne.
+Ouvrez **Agents** sous **Équipe IA** dans la barre latérale et cliquez sur **Nouvel agent**. Choisissez d'abord un outil de codage IA sur l'ordinateur que vous venez de connecter, saisissez un nom, puis cliquez sur **Créer l'agent**. Seuls le runtime et le nom sont obligatoires.
-Tout le reste peut être affiné plus tard — voir [Créer et configurer des agents](/agents-create).
+Si vous ne voulez pas rédiger la configuration vous-même, cliquez sur **Laisser l'IA rédiger** sur la page de configuration : l'Agent Builder vous pose quelques questions et la complète. Le runtime sélectionné doit être en ligne. Tout le reste peut être affiné plus tard — voir [Créer et configurer un agent](/agents-create).
**Vérification** : votre agent apparaît dans la liste des agents et s'affiche comme en ligne.
-![Choix du point de départ pour créer un agent : Partir de zéro et Construire avec l'IA](/images/docs/quickstart-new-agent.webp)
+</Step>
+<Step>
-## 4. Confiez-lui votre première tâche
+## Confiez-lui votre première tâche [#4-confiez-lui-votre-première-tâche]
Cliquez sur **Nouvelle tâche** en haut de la barre latérale (ou appuyez sur `C`). Dans le mode agent par défaut :
@@ -70,7 +81,10 @@ Cliquez sur **Nouvelle tâche** en haut de la barre latérale (ou appuyez sur `C
![Boîte de dialogue Nouvelle tâche en mode agent : Créé par défini sur Multica Assistant](/images/docs/quickstart-new-issue.webp)
-## 5. Suivez l'avancement et les résultats
+</Step>
+<Step>
+
+## Suivez l'avancement et les résultats [#5-suivez-lavancement-et-les-résultats]
Après validation, ouvrez la tâche : le journal d'exécution affiche le statut de l'exécution, et l'avancement ainsi que les réponses de l'agent apparaissent dans le fil d'activité.
@@ -78,6 +92,9 @@ Après validation, ouvrez la tâche : le journal d'exécution affiche le statut
![La réponse de l'agent dans la tâche et un journal d'exécution terminé](/images/docs/quickstart-run-result.webp)
+</Step>
+</Steps>
+
## Problèmes courants
| Symptôme | À vérifier en premier |
@@ -92,4 +109,4 @@ Pour d'autres cas, consultez [Dépannage](/troubleshooting).
- [Concepts clés](/concepts) — découvrez en trois minutes tous les objets clés de Multica.
- [Fonctionnement de Multica](/how-multica-works) — comment les tâches, les agents, les runtimes et chaque exécution s'articulent.
-- [Mettre les agents au travail](/triggering-agents) — au-delà de l'assignation : @mentions, Discussion et automatisations.
+- [Mettre les agents au travail](/triggering-agents) — en plus de l'assignation, une @mention, une discussion ou une automatisation peuvent aussi lancer un agent.
diff --git a/apps/docs/content/docs/cloud-quickstart.ja.mdx b/apps/docs/content/docs/cloud-quickstart.ja.mdx
index a6b8598811..7541dc2e38 100644
--- a/apps/docs/content/docs/cloud-quickstart.ja.mdx
+++ b/apps/docs/content/docs/cloud-quickstart.ja.mdx
@@ -4,40 +4,50 @@ description: コンピュータを接続し、最初のエージェントを作
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="info">
エージェントが実行するには、実行するコンピュータに Claude Code、Codex、Cursor などの[サポートされている AI コーディングツール](/providers)が少なくとも 1 つインストールされ、ログイン済みである必要があります。Multica にこれらのツールは同梱されていません。
</Callout>
-## 1. ログインしてワークスペースに入る
+<Steps>
+<Step>
-Web([multica.ai](https://multica.ai))または [Multica Desktop](https://multica.ai/download) でログインします。メール認証コードと Google に対応しています。
+## ログインしてワークスペースに入る [#1-ログインしてワークスペースに入る]
-- **Desktop**:このコンピュータを自動で接続できます。
-- **Web**:次のステップでコマンドラインから接続します。
+Web([multica.ai](https://multica.ai))または [Multica Desktop](https://multica.ai/download) でログインします。メール認証コードと Google に対応しています。Desktop でログインした場合は次のステップでこのコンピュータを自動で接続でき、Web の場合はコマンドラインから接続します。
-## 2. コンピュータを接続する
+</Step>
+<Step>
-エージェントは接続されたコンピュータ上で作業を実行します。サイドバー下部の **設定 → ランタイム** を開きます。
+## コンピュータを接続する [#2-コンピュータを接続する]
+
+エージェントは接続されたコンピュータ上で作業を実行します。サイドバーの **AI チーム** にある **ランタイム** を開きます。
- **Desktop の場合**:Desktop がこのコンピュータをランタイムとして自動登録し、インストール済みの AI コーディングツールを検出します。インストールしたばかりのツールは、「更新」をクリックして再検出します。
-- **Web の場合、または別のコンピュータを追加する場合**:右上の **コンピュータを追加** をクリックし、ダイアログに表示される 2 つのコマンドを対象コンピュータのターミナルで実行します。
+- **Web の場合、または別のコンピュータを追加する場合**:右上の **追加** をクリックして **他のマシンまたはサーバー** を選び、ダイアログに表示される 2 つのコマンドを対象コンピュータのターミナルで実行します。
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
- **macOS / Linux**
+```bash
+curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
+multica setup
+```
- ```bash
- curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
- multica setup
- ```
+</Tab>
+<Tab value="Windows">
- **Windows PowerShell**
+```powershell
+irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
+multica setup
+```
- ```powershell
- irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
- multica setup
- ```
+</Tab>
+</Tabs>
- `multica setup` はブラウザを開いてログインを完了し、その後デーモンをバックグラウンドで実行し続けます。デーモンがオンラインになると、通常 1 分以内にダイアログがこのコンピュータを検出します。
+`multica setup` はブラウザを開いてログインを完了し、その後デーモンをバックグラウンドで実行し続けます。デーモンがオンラインになると、通常 1 分以内にダイアログがこのコンピュータを検出します。
**成功の目安**:ランタイム一覧にオンラインのコンピュータが表示されます。
@@ -47,20 +57,21 @@ Web([multica.ai](https://multica.ai))または [Multica Desktop](https://mul
セルフホストインスタンスでは接続コマンドが少し異なります。[セルフホストクイックスタート](/self-host-quickstart)を参照してください。
</Callout>
-## 3. エージェントを作成する
+</Step>
+<Step>
-サイドバーの **ワークスペース → エージェント** を開き、**新規エージェント** をクリックして、どちらかの方法を選びます。
+## エージェントを作成する [#3-エージェントを作成する]
-- **空白から始める**:自分でフィールドを入力します。最低限必要なのは名前だけで、あとはランタイムと AI コーディングツールを確認すれば作成できます。
-- **AI で作成**:欲しいエージェントを説明すると、Agent Builder が質問しながら設定を生成します。この方法にはオンラインのランタイムが必要です。
+サイドバーの **AI チーム** にある **エージェント** を開き、**新規エージェント** をクリックします。まず接続したコンピュータ上の AI コーディングツールを選び、名前を入力して **エージェントを作成** をクリックします。必須項目はランタイムと名前だけです。
-残りの設定は後から整えられます。詳しくは[エージェントの作成と構成](/agents-create)を参照してください。
+設定を一から書きたくない場合は、設定画面で **AI に書いてもらう** をクリックすると、Agent Builder が質問しながら設定を補います。これには選択したランタイムがオンラインである必要があります。残りの設定は後から整えられます。詳しくは[エージェントの作成と構成](/agents-create)を参照してください。
**成功の目安**:エージェント一覧に作成したエージェントが表示され、オンラインと表示されます。
-![エージェント作成の開始方法の選択画面:「Start blank」と「Build with AI」](/images/docs/quickstart-new-agent.webp)
+</Step>
+<Step>
-## 4. 最初のタスクを任せる
+## 最初のタスクを任せる [#4-最初のタスクを任せる]
サイドバー上部の **新規タスク** をクリックします(またはショートカット `C`)。デフォルトのエージェントモードでは次のように進めます。
@@ -70,7 +81,10 @@ Web([multica.ai](https://multica.ai))または [Multica Desktop](https://mul
![新規タスクダイアログのエージェントモード:Created by に Multica Assistant が選択されている](/images/docs/quickstart-new-issue.webp)
-## 5. 進捗と結果を確認する
+</Step>
+<Step>
+
+## 進捗と結果を確認する [#5-進捗と結果を確認する]
送信後にそのタスクを開きます。実行ログには実行のステータスが表示され、エージェントの進捗と返信はタイムラインに表示されます。
@@ -78,6 +92,9 @@ Web([multica.ai](https://multica.ai))または [Multica Desktop](https://mul
![タスク内のエージェントの返信と完了した実行ログ](/images/docs/quickstart-run-result.webp)
+</Step>
+</Steps>
+
## よくある問題
| 症状 | まず確認すること |
@@ -92,4 +109,4 @@ Web([multica.ai](https://multica.ai))または [Multica Desktop](https://mul
- [コアコンセプト](/concepts) — Multica のすべてのコアオブジェクトを 3 分で把握する。
- [Multica の仕組み](/how-multica-works) — タスク、エージェント、ランタイム、各実行の関係を理解する。
-- [エージェントに仕事を任せる](/triggering-agents) — 割り当てのほかに、@コメント、チャット、オートパイロットという 3 つのトリガー方法。
+- [エージェントに仕事を任せる](/triggering-agents) — 割り当てのほかに、@メンション、チャット、オートパイロットでもエージェントに作業を始めさせられます。
diff --git a/apps/docs/content/docs/cloud-quickstart.ko.mdx b/apps/docs/content/docs/cloud-quickstart.ko.mdx
index 2cf83ac4d5..4aa2dd3d21 100644
--- a/apps/docs/content/docs/cloud-quickstart.ko.mdx
+++ b/apps/docs/content/docs/cloud-quickstart.ko.mdx
@@ -4,40 +4,50 @@ description: 컴퓨터를 연결하고 첫 에이전트를 만든 뒤 첫 작업
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="info">
에이전트를 실행하기 전에 해당 컴퓨터에 Claude Code, Codex, Cursor 같은 [지원되는 AI 코딩 도구](/providers)가 하나 이상 설치되어 있고 로그인되어 있어야 합니다. Multica에는 이 도구들이 포함되어 있지 않습니다.
</Callout>
-## 1. 로그인하고 워크스페이스 열기
+<Steps>
+<Step>
-Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.ai/download)에서 로그인합니다. 이메일 인증 코드와 Google 로그인을 지원합니다.
+## 로그인하고 워크스페이스 열기 [#1-로그인하고-워크스페이스-열기]
-- **Desktop**: 현재 컴퓨터를 자동으로 연결할 수 있습니다.
-- **Web**: 다음 단계에서 명령줄을 통해 연결해야 합니다.
+Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.ai/download)에서 로그인합니다. 이메일 인증 코드와 Google 로그인을 지원합니다. Desktop으로 로그인하면 다음 단계에서 이 컴퓨터를 자동으로 연결할 수 있고, Web으로 로그인하면 명령줄로 연결합니다.
-## 2. 컴퓨터 연결
+</Step>
+<Step>
-에이전트는 연결된 컴퓨터에서 작업을 실행합니다. 사이드바 아래쪽의 **설정 → 런타임**을 엽니다.
+## 컴퓨터 연결 [#2-컴퓨터-연결]
+
+에이전트는 연결된 컴퓨터에서 작업을 실행합니다. 사이드바 **AI 팀** 아래의 **런타임**을 엽니다.
- **Desktop 사용**: Desktop이 이 컴퓨터를 런타임으로 자동 등록하고 설치된 AI 코딩 도구를 감지합니다. 도구를 방금 설치했다면 "새로고침"을 클릭해 다시 감지하세요.
-- **Web을 사용하거나 다른 컴퓨터를 추가해야 하는 경우**: 오른쪽 위의 **컴퓨터 추가**를 클릭하고 대상 컴퓨터의 터미널에서 팝업에 표시된 두 명령을 실행합니다.
+- **Web을 사용하거나 다른 컴퓨터를 추가해야 하는 경우**: 오른쪽 위의 **추가**를 클릭하고 **다른 머신 또는 서버**를 선택한 뒤 대상 컴퓨터의 터미널에서 팝업에 표시된 두 명령을 실행합니다.
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
- **macOS / Linux**
+```bash
+curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
+multica setup
+```
- ```bash
- curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
- multica setup
- ```
+</Tab>
+<Tab value="Windows">
- **Windows PowerShell**
+```powershell
+irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
+multica setup
+```
- ```powershell
- irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
- multica setup
- ```
+</Tab>
+</Tabs>
- `multica setup`이 브라우저를 열어 로그인을 마친 뒤 데몬을 백그라운드에서 실행합니다. 데몬이 온라인이 되면 보통 1분 안에 팝업이 이 컴퓨터를 자동으로 감지합니다.
+`multica setup`이 브라우저를 열어 로그인을 마친 뒤 데몬을 백그라운드에서 실행합니다. 데몬이 온라인이 되면 보통 1분 안에 팝업이 이 컴퓨터를 감지합니다.
**성공 기준**: 런타임 목록에 온라인 컴퓨터가 표시됩니다.
@@ -47,20 +57,21 @@ Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.a
자체 호스팅 인스턴스의 연결 명령은 조금 다릅니다. [자체 호스팅 빠른 시작](/self-host-quickstart)을 참고하세요.
</Callout>
-## 3. 에이전트 만들기
+</Step>
+<Step>
-사이드바에서 **워크스페이스 → 에이전트**를 열고 **새 에이전트**를 클릭한 뒤 방법을 선택합니다.
+## 에이전트 만들기 [#3-에이전트-만들기]
-- **빈 상태로 시작**: 필드를 직접 입력합니다. 최소한 이름만 입력하고 런타임과 AI 코딩 도구를 확인하면 만들 수 있습니다.
-- **AI로 만들기**: 원하는 내용을 설명하면 Agent Builder가 질문하고 설정을 생성합니다. 이 방법에는 온라인 런타임이 필요합니다.
+사이드바 **AI 팀** 아래의 **에이전트**를 열고 **새 에이전트**를 클릭합니다. 먼저 방금 연결한 컴퓨터의 AI 코딩 도구를 선택하고 이름을 입력한 뒤 **에이전트 만들기**를 클릭합니다. 필수 항목은 런타임과 이름뿐입니다.
-나머지 설정은 나중에 보완할 수 있습니다. [에이전트 생성 및 설정](/agents-create)을 참고하세요.
+설정을 처음부터 쓰고 싶지 않다면 구성 화면에서 **AI에게 작성 맡기기**를 클릭하세요. Agent Builder가 질문하면서 설정을 채웁니다. 이 기능은 선택한 런타임이 온라인이어야 합니다. 나머지 설정은 나중에 보완할 수 있습니다. [에이전트 생성 및 설정](/agents-create)을 참고하세요.
**성공 기준**: 에이전트 목록에 만든 에이전트가 온라인으로 표시됩니다.
-![에이전트 생성 시작 방법 선택: Start blank와 Build with AI](/images/docs/quickstart-new-agent.webp)
+</Step>
+<Step>
-## 4. 첫 태스크 맡기기
+## 첫 태스크 맡기기 [#4-첫-태스크-맡기기]
사이드바 위쪽의 **새 태스크**를 클릭하거나 단축키 `C`를 누릅니다. 기본 에이전트 모드에서 다음과 같이 진행합니다.
@@ -70,7 +81,10 @@ Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.a
![새 태스크 팝업의 에이전트 모드: Created by에 Multica Assistant가 선택된 모습](/images/docs/quickstart-new-issue.webp)
-## 5. 진행 상황과 결과 확인
+</Step>
+<Step>
+
+## 진행 상황과 결과 확인 [#5-진행-상황과-결과-확인]
제출 후 해당 태스크를 엽니다. 실행 로그에는 실행 상태가 표시되고 에이전트의 진행 상황과 답변은 타임라인에 나타납니다.
@@ -78,6 +92,9 @@ Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.a
![태스크의 에이전트 답변과 완료된 실행 로그](/images/docs/quickstart-run-result.webp)
+</Step>
+</Steps>
+
## 자주 묻는 문제
| 증상 | 먼저 확인할 사항 |
@@ -92,4 +109,4 @@ Web([multica.ai](https://multica.ai)) 또는 [Multica Desktop](https://multica.a
- [핵심 개념](/concepts) — 3분 안에 Multica의 모든 핵심 객체를 알아봅니다.
- [Multica의 작동 방식](/how-multica-works) — 태스크, 에이전트, 런타임, 각 실행의 관계를 이해합니다.
-- [에이전트에게 작업 맡기기](/triggering-agents) — 할당 외에 @댓글, 대화, 오토파일럿으로 트리거하는 세 가지 방법을 알아봅니다.
+- [에이전트에게 작업 맡기기](/triggering-agents) — 할당 외에도 @멘션, 채팅, 오토파일럿으로 에이전트가 작업을 시작하게 할 수 있습니다.
diff --git a/apps/docs/content/docs/cloud-quickstart.mdx b/apps/docs/content/docs/cloud-quickstart.mdx
index 7edb7b0b9c..99829cc4fd 100644
--- a/apps/docs/content/docs/cloud-quickstart.mdx
+++ b/apps/docs/content/docs/cloud-quickstart.mdx
@@ -4,40 +4,50 @@ description: Connect a computer, create your first agent, and have it complete i
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="info">
Before an agent can execute, the computer that runs it needs at least one [supported AI coding tool](/providers) installed and signed in — for example Claude Code, Codex, or Cursor. Multica does not ship these tools.
</Callout>
-## 1. Sign in and open your workspace
+<Steps>
+<Step>
-Sign in on the web ([multica.ai](https://multica.ai)) or with [Multica Desktop](https://multica.ai/download). Email verification codes and Google are both supported.
+## Sign in and open your workspace [#1-sign-in-and-open-your-workspace]
-- **Desktop**: can connect this computer automatically.
-- **Web**: connect from the command line in the next step.
+Sign in on the web ([multica.ai](https://multica.ai)) or with [Multica Desktop](https://multica.ai/download). Email verification codes and Google are both supported. If you sign in with Desktop, the next step can connect this computer automatically; on the web, you connect it from the command line.
-## 2. Connect a computer
+</Step>
+<Step>
-Agents execute work on the computers you connect. Open **Configure → Runtimes** at the bottom of the sidebar:
+## Connect a computer [#2-connect-a-computer]
+
+Agents execute work on the computers you connect. Open **Runtimes** under **AI Team** in the sidebar:
- **With Desktop**: Desktop automatically registers this computer as a runtime and detects the installed AI coding tools. For a tool you just installed, click **Refresh** to detect it again.
-- **With Web, or to add another computer**: click **Add a computer** in the top right, then run the two commands from the dialog in a terminal on the target computer:
+- **With Web, or to add another computer**: click **Add** in the top right, choose **Other machine or server**, then run the two commands from the dialog in a terminal on the target computer:
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
- **macOS / Linux**
+```bash
+curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
+multica setup
+```
- ```bash
- curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
- multica setup
- ```
+</Tab>
+<Tab value="Windows">
- **Windows PowerShell**
+```powershell
+irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
+multica setup
+```
- ```powershell
- irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
- multica setup
- ```
+</Tab>
+</Tabs>
- `multica setup` opens a browser to complete sign-in, then leaves the daemon running in the background. Once the daemon is online, the dialog usually detects the computer within a minute.
+`multica setup` opens a browser to complete sign-in, then leaves the daemon running in the background. Once the daemon is online, the dialog usually detects the computer within a minute.
**Success check**: an online computer appears in the runtime list.
@@ -47,20 +57,21 @@ Agents execute work on the computers you connect. Open **Configure → Runtimes*
The connection commands differ slightly on self-hosted instances — see the [Self-host quickstart](/self-host-quickstart).
</Callout>
-## 3. Create an agent
+</Step>
+<Step>
-Open **Workspace → Agents** in the sidebar, click **New agent**, and pick a path:
+## Create an agent [#3-create-an-agent]
-- **Start blank**: fill in the fields yourself. Only a name is strictly required — confirm the runtime and AI coding tool, then create.
-- **Build with AI**: describe what you want, and the Agent Builder asks questions and generates the configuration. This path needs an online runtime.
+Open **Agents** under **AI Team** in the sidebar and click **New agent**. Choose an AI coding tool on the computer you just connected, enter a name, and click **Create agent**. The runtime and the name are the only required fields.
-Everything else can be refined later — see [Create and configure agents](/agents-create).
+If you would rather not write the configuration yourself, click **Let AI write it** on the configuration page: the Agent Builder asks a few questions and fills it in. This needs the selected runtime to be online. Everything else can be refined later — see [Create and configure an agent](/agents-create).
**Success check**: your agent appears in the agent list and shows as online.
-![Agent creation starting-point picker: Start blank and Build with AI](/images/docs/quickstart-new-agent.webp)
+</Step>
+<Step>
-## 4. Hand it your first issue
+## Hand it your first issue [#4-hand-it-your-first-issue]
Click **New Issue** at the top of the sidebar (or press `C`). In the default agent mode:
@@ -70,7 +81,10 @@ Click **New Issue** at the top of the sidebar (or press `C`). In the default age
![New issue dialog in agent mode: Created by set to Multica Assistant](/images/docs/quickstart-new-issue.webp)
-## 5. Watch progress and results
+</Step>
+<Step>
+
+## Watch progress and results [#5-watch-progress-and-results]
After submitting, open the issue: the execution log shows the run status, and the agent's progress and replies appear in the timeline.
@@ -78,6 +92,9 @@ After submitting, open the issue: the execution log shows the run status, and th
![The agent's reply in the issue and a completed execution log](/images/docs/quickstart-run-result.webp)
+</Step>
+</Steps>
+
## Common problems
| Symptom | Check first |
@@ -92,4 +109,4 @@ For more cases, see [Troubleshooting](/troubleshooting).
- [Core concepts](/concepts) — meet all of Multica's core objects in three minutes.
- [How Multica works](/how-multica-works) — how issues, agents, runtimes, and each run relate.
-- [Put agents to work](/triggering-agents) — beyond assignment: @-mentions, chat, and Autopilots.
+- [Put agents to work](/triggering-agents) — besides assignment, you can start an agent with an @mention, a chat, or an Autopilot.
diff --git a/apps/docs/content/docs/cloud-quickstart.zh.mdx b/apps/docs/content/docs/cloud-quickstart.zh.mdx
index 00d1c8f5e9..e8c698ea04 100644
--- a/apps/docs/content/docs/cloud-quickstart.zh.mdx
+++ b/apps/docs/content/docs/cloud-quickstart.zh.mdx
@@ -4,40 +4,50 @@ description: 连接一台电脑,创建你的第一个智能体,并让它完
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="info">
智能体执行前,运行它的电脑上需要有至少一款已安装并登录的[支持的 AI 编程工具](/providers),例如 Claude Code、Codex 或 Cursor。Multica 不自带这些工具。
</Callout>
-## 1. 登录,进入工作区
+<Steps>
+<Step>
-用 Web([multica.ai](https://multica.ai))或 [Multica Desktop](https://multica.ai/download) 登录,支持邮箱验证码和 Google。
+## 登录,进入工作区 [#1-登录进入工作区]
-- **Desktop**:可以自动连接这台电脑。
-- **Web**:需要在下一步通过命令行连接。
+用 Web([multica.ai](https://multica.ai))或 [Multica Desktop](https://multica.ai/download) 登录,支持邮箱验证码和 Google。用 Desktop 登录的话,下一步可以自动连接这台电脑;用 Web 则要在下一步通过命令行连接。
-## 2. 连接一台电脑
+</Step>
+<Step>
-智能体在你连接的电脑上执行工作。打开侧边栏底部的 **配置 → 运行时**:
+## 连接一台电脑 [#2-连接一台电脑]
+
+智能体在你连接的电脑上执行工作。打开侧边栏 **AI 团队** 下的 **运行时**:
- **用 Desktop**:Desktop 会自动把这台电脑注册为运行时,并检测已安装的 AI 编程工具。刚安装的工具,点"刷新"重新检测。
-- **用 Web,或需要添加另一台电脑**:点右上角的 **添加电脑**,在目标电脑的终端里运行弹窗给出的两条命令:
+- **用 Web,或需要添加另一台电脑**:点右上角的 **添加**,选择 **其他机器或服务器**,在目标电脑的终端里运行弹窗给出的两条命令:
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
- **macOS / Linux**
+```bash
+curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
+multica setup
+```
- ```bash
- curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
- multica setup
- ```
+</Tab>
+<Tab value="Windows">
- **Windows PowerShell**
+```powershell
+irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
+multica setup
+```
- ```powershell
- irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
- multica setup
- ```
+</Tab>
+</Tabs>
- `multica setup` 会打开浏览器完成登录,然后让守护进程在后台运行。守护进程上线后,弹窗通常在一分钟内自动检测到这台电脑。
+`multica setup` 会打开浏览器完成登录,然后让守护进程在后台运行。守护进程上线后,弹窗通常在一分钟内检测到这台电脑。
**成功标志**:运行时列表里出现一台在线的电脑。
@@ -47,20 +57,21 @@ import { Callout } from "fumadocs-ui/components/callout";
自托管实例的连接命令略有不同,见[自托管快速上手](/self-host-quickstart)。
</Callout>
-## 3. 创建一个智能体
+</Step>
+<Step>
-打开侧边栏的 **工作区 → 智能体**,点 **新建智能体**,选择一条路径:
+## 创建一个智能体 [#3-创建一个智能体]
-- **从空白开始**:自己填字段。最少只需要名称,再确认运行时和 AI 编程工具即可创建。
-- **通过 AI 创建**:描述你想要什么,由 Agent Builder 提问并生成配置。这条路径需要一个在线运行时。
+打开侧边栏 **AI 团队** 下的 **智能体**,点 **新建智能体**。先选择刚连接的电脑上的一款 AI 编程工具,再填名称,点 **创建智能体**。必填的只有运行时和名称。
-其余配置可以之后完善,详见[创建和配置智能体](/agents-create)。
+不想从头写配置,可以在配置页点 **让 AI 帮我写**,由 Agent Builder 提问并补全;这需要所选运行时在线。其余配置可以之后完善,详见[创建和配置智能体](/agents-create)。
**成功标志**:智能体列表中出现你的智能体,并显示为在线。
-![创建智能体的起点选择页:Start blank 与 Build with AI](/images/docs/quickstart-new-agent.webp)
+</Step>
+<Step>
-## 4. 把第一个任务交给它
+## 把第一个任务交给它 [#4-把第一个任务交给它]
点侧边栏顶部的 **新建任务**(或按快捷键 `C`)。在默认的智能体模式下:
@@ -70,7 +81,10 @@ import { Callout } from "fumadocs-ui/components/callout";
![新建任务弹窗的智能体模式:Created by 已选中 Multica Assistant](/images/docs/quickstart-new-issue.webp)
-## 5. 查看进度和结果
+</Step>
+<Step>
+
+## 查看进度和结果 [#5-查看进度和结果]
提交后打开这条任务:执行日志显示运行状态,智能体的进展和回复出现在时间线中。
@@ -78,6 +92,9 @@ import { Callout } from "fumadocs-ui/components/callout";
![任务中智能体的回复与已完成的执行日志](/images/docs/quickstart-run-result.webp)
+</Step>
+</Steps>
+
## 常见问题
| 现象 | 先检查什么 |
@@ -92,4 +109,4 @@ import { Callout } from "fumadocs-ui/components/callout";
- [核心概念](/concepts) — 三分钟认识 Multica 的全部核心对象。
- [Multica 的工作方式](/how-multica-works) — 理解任务、智能体、运行时和每次执行之间的关系。
-- [让智能体开始工作](/triggering-agents) — 除了分配,还有 @评论、对话和自动化三种触发方式。
+- [让智能体开始工作](/triggering-agents) — 除了分配,还可以用 @提及、对话和自动化让智能体开始工作。
diff --git a/apps/docs/content/docs/comments.fr.mdx b/apps/docs/content/docs/comments.fr.mdx
index 20663ba85b..21dbae4cc3 100644
--- a/apps/docs/content/docs/comments.fr.mdx
+++ b/apps/docs/content/docs/comments.fr.mdx
@@ -4,8 +4,11 @@ description: Ajoutez des informations, répondez aux discussions et @mentionnez
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { ResolveThreadDemo } from "@/components/demos/resolve-thread-demo";
-Les commentaires sont le lieu de la collaboration continue sur une [tâche](/issues). Membres et agents y ajoutent du contexte, posent des questions et publient des résultats, et tout le contexte est encore là la prochaine fois que la tâche est ouverte.
+Membres et agents ajoutent du contexte, posent des questions et publient leurs résultats dans les commentaires d'une [tâche](/issues). Ces échanges restent sur la tâche : quiconque l'ouvre plus tard voit comment on en est arrivé là.
## Publier des commentaires et des réponses
@@ -15,20 +18,72 @@ Un bloc de code `html` ou `mermaid` s’affiche directement sous forme de graphi
Répondre à un commentaire crée un fil de discussion. Les réponses peuvent s'imbriquer davantage, mais elles restent toutes sous la même discussion de premier niveau.
+Dès qu'une tâche compte au moins deux fils, sa page sur Web et Desktop affiche une colonne de repères à droite : un repère long par fil, un court par réponse. Survolez-la pour ouvrir le plan de tous les fils, et cliquez sur une entrée pour aller au commentaire, y compris dans un fil résolu replié.
+
## Annoter des commentaires et des descriptions
-Sur le web et dans l'application de bureau, sélectionnez du texte dans n'importe quel commentaire publié, y compris les vôtres, puis choisissez **Ajouter à la réponse** dans la barre d'outils de sélection. Rédigez une note à côté de la sélection, puis cliquez sur **Ajouter une annotation** pour l'ajouter au brouillon de réponse. Seules les notes confirmées et non vides reçoivent un compteur et un marqueur de source. Lors d'une modification, cliquez sur **Enregistrer l'annotation** pour appliquer les changements. Entrée confirme ; Maj + Entrée insère un saut de ligne. Échap ou un clic à l'extérieur annule les modifications non confirmées. Cliquez sur le marqueur de source numéroté pour la modifier à nouveau. Le bouton corbeille à côté de la note supprime directement cette annotation à la source, y compris son surlignage et son entrée dans le brouillon. Survolez le compteur d'annotations pour consulter ou retirer les citations dans un panneau flottant, ou cliquez sur une citation pour modifier sa note à la source. Vous pouvez aussi ouvrir le panneau d'un clic ou au clavier. Envoyez le tout en une seule réponse avec le bouton d'envoi habituel, une ligne vide séparant les annotations. Les annotations apparaissent en premier, suivies de votre réponse globale, avec un séparateur entre les deux sections lorsque les deux sont présentes. Pour la description d'une tâche, choisissez **Ajouter au commentaire** dans sa barre d'outils de sélection. Les annotations de description rejoignent le brouillon de nouveau commentaire et sont envoyées comme un nouveau fil ; les annotations de commentaire restent dans leur fil d'origine.
+Sur le web et dans l'application de bureau, vous pouvez sélectionner du texte dans n'importe quel commentaire publié, y compris les vôtres, et écrire une note sur ce passage :
+
+<Steps>
+<Step>
+
+Sélectionnez le texte et choisissez **Ajouter à la réponse** dans la barre d'outils de sélection.
+
+</Step>
+<Step>
+
+Rédigez votre note à côté de la sélection et cliquez sur **Ajouter une annotation**. Seule une note confirmée rejoint le brouillon de réponse du fil et reçoit un numéro ; une note vide ne peut pas être confirmée.
+
+</Step>
+<Step>
+
+Avec le bouton d'envoi habituel, publiez toutes les annotations en une seule réponse, séparées par une ligne vide. La réponse publiée affiche d'abord les annotations, puis ce que vous avez écrit dans la zone de saisie, avec un séparateur entre les deux lorsque les deux sont présents.
+
+</Step>
+</Steps>
+
+Sur la description d'une tâche, la barre d'outils de sélection propose **Ajouter au commentaire** : les annotations vont dans un brouillon de nouveau commentaire, et l'envoyer crée un nouveau fil. Les annotations sur un commentaire continuent d'aller dans le brouillon de réponse de leur fil.
+
+Pour les annotations de commentaire, la première que vous enregistrez fixe la cible de la réponse, y compris pour les réponses imbriquées. Les citations d'autres messages du même fil rejoignent ce brouillon, et le tout est publié en un seul commentaire. Les mentions citées ne notifient ni ne déclenchent personne ; les mentions que vous rédigez vous-même suivent les règles habituelles.
+
+<Accordions>
+<Accordion title="Modifier, supprimer et raccourcis" id="annotation-editing">
-Pour les annotations de commentaire, la première annotation enregistrée fixe la cible de la réponse, y compris pour les réponses imbriquées. Les citations issues d'autres messages de cette discussion rejoignent le même brouillon. Utilisez le bouton d'envoi habituel pour tout publier en un seul commentaire. Les mentions citées ne notifient ni ne déclenchent personne ; les mentions que vous rédigez vous-même suivent les règles habituelles.
+- Après avoir modifié une annotation existante, cliquez sur **Enregistrer l'annotation** pour appliquer le changement.
+- Entrée confirme ; Maj + Entrée insère un saut de ligne. Échap ou un clic à l'extérieur annule les modifications non confirmées.
+- Cliquez sur le marqueur numéroté dans le texte source pour modifier à nouveau la note. Le bouton corbeille à côté de la note supprime l'annotation, son marqueur et son entrée dans le brouillon.
+- Survoler le compteur d'annotations ouvre un panneau où vous pouvez consulter ou retirer les citations, ou cliquer sur une citation pour revenir à la source et modifier sa note. Ce panneau s'ouvre aussi d'un clic ou au clavier.
-Les brouillons sont propres à cet appareil et à cet espace de travail, survivent aux rechargements et expirent au bout de 30 jours. Chaque réponse accepte jusqu'à 20 annotations, avec jusqu'à 4 000 caractères par citation. Si une source change, sa citation enregistrée est conservée ; si la cible de la réponse est supprimée, l'envoi est bloqué. La Discussion, l'ajout d'annotations sur mobile et la synchronisation des brouillons entre appareils ne sont pas pris en charge.
+</Accordion>
+<Accordion title="Brouillons et limites" id="annotation-limits">
+
+Les brouillons restent sur cet appareil et dans cet espace de travail. Ils survivent aux rechargements et expirent au bout de 30 jours. Chaque réponse accepte jusqu'à 20 annotations, et chaque citation jusqu'à 4 000 caractères. Si le texte source change ensuite, la citation enregistrée ne bouge pas ; si la cible de la réponse est supprimée, le brouillon ne peut pas être envoyé.
+
+Les annotations dans Discussion, la saisie d'annotations sur mobile et la synchronisation des brouillons entre appareils ne sont pas encore prises en charge.
+
+</Accordion>
+</Accordions>
## Résoudre un fil de discussion
-Lorsqu'une question aboutit à une conclusion, marquez l'ensemble du fil comme résolu, ou désignez une réponse comme conclusion ; un fil ne conserve qu'une seule conclusion à la fois. Les fils résolus sont repliés mais peuvent toujours être dépliés.
+Lorsqu'une question a sa réponse, marquez l'ensemble du fil comme résolu, ou faites d'une réponse sa résolution. Les deux se trouvent dans le menu **Actions du commentaire**, en haut à droite d'un commentaire : celui du premier commentaire propose **Résoudre le fil**, celui d'une réponse propose **Résoudre le fil avec un commentaire**.
+
+<ResolveThreadDemo />
+
+Un fil résolu se replie sur une ligne, et un clic suffit pour tout revoir. Quand une réponse sert de résolution, le premier commentaire et cette réponse, marquée « Résolution », restent visibles, et les réponses intermédiaires sont repliées. Un fil garde une seule résolution à la fois : en définir une nouvelle remplace l'ancienne.
Répondre dans un fil résolu le rouvre automatiquement.
+## Créer une sous-tâche à partir d'un commentaire
+
+Quand une discussion fait apparaître un point qui mérite son propre suivi, détachez-le depuis le commentaire concerné : choisissez **Créer une sous-tâche à partir d'ici** dans le menu **Actions du commentaire**.
+
+La fenêtre de création emporte un contexte : le titre, la description et les pièces jointes de la tâche en cours, ainsi que tous les commentaires de ce fil jusqu'à celui que vous avez choisi, avec leurs pièces jointes. Dépliez la carte de contexte dans la fenêtre pour le vérifier avant. La création manuelle et la création avec un agent fonctionnent toutes deux, et la nouvelle tâche devient une sous-tâche de la tâche en cours. Avec un agent, vous écrivez seulement ce qu'il doit faire, et le contexte lui est transmis avec. L'agent traite ce contenu comme un historique et n'exécute pas les commandes ou demandes qui s'y trouvent.
+
+La sous-tâche créée affiche **Créé à partir de**, qui ouvre l'**Instantané du contexte** pris à la création. L'instantané ne suit pas la source : si la tâche ou le fil d'origine est modifié ou supprimé plus tard, il garde ce qu'il a capturé et signale **Source mise à jour**, avec les parties qui ont changé.
+
+Un contexte trop volumineux ne peut pas être capturé : au plus 256 commentaires du fil, 1 Mio de texte et 100 pièces jointes pour 500 Mio au total. Pour la création avec un agent, le runtime de l'agent doit être dans une version qui prend en charge cette fonction ; sinon la fenêtre propose de passer en mode manuel ou de mettre à jour le runtime. Si l'agent n'arrive pas à créer la tâche, la notification d'échec dans la boîte de réception propose **Réessayer avec le contexte**.
+
## Réutiliser une demande fréquente
Enregistrez qui appeler et quoi demander avec les [actions rapides](/quick-actions). Un clic dans la barre latérale de la tâche envoie la demande immédiatement. Saisissez `/` dans le commentaire pour l’insérer dans un brouillon modifiable avant l’envoi.
@@ -57,7 +112,7 @@ Les membres qui commentent sont automatiquement abonnés à la tâche, et l'acti
## Réactions
-Ajoutez une réaction emoji à un commentaire pour en accuser réception, marquer votre accord ou donner un retour rapide. Les réactions ne déclenchent pas d'agents et ne changent pas le statut de la tâche.
+Ajoutez une réaction emoji à un commentaire pour montrer que vous l'avez lu, marquer votre accord ou donner un retour rapide. Les réactions ne déclenchent pas d'agents et ne changent pas le statut de la tâche.
## Modifier et supprimer
@@ -65,6 +120,8 @@ Les auteurs de commentaires peuvent modifier ou supprimer leurs propres commenta
Après la modification d'un commentaire, Multica recalcule les déclenchements à partir du nouveau contenu. Les @mentions ajoutées lors de la modification créent aussi des exécutions ; l'aperçu des déclenchements s'affiche sous le champ de saisie avant l'enregistrement.
+Si quelqu'un d'autre enregistre le commentaire pendant que vous le modifiez, votre enregistrement est bloqué et l'éditeur affiche côte à côte la **Dernière version du serveur** et **Votre version locale**, lignes différentes signalées. **Garder ma version** enregistre votre texte ; **Utiliser la dernière version** remplace le contenu de l'éditeur par le leur pour continuer à partir de là. Le titre de la tâche bénéficie de la même comparaison quand deux personnes le modifient en même temps.
+
<Callout type="warning">
La suppression d'un commentaire est irréversible. Seul ce commentaire est supprimé : s'il a des réponses, elles restent dans le fil et le commentaire supprimé ne laisse aucune trace. Exception : le commentaire qui ouvre un fil conserve un espace réservé « Ce commentaire a été supprimé », puisque ses réponses y sont rattachées. Si le contenu est erroné, modifiez-le plutôt.
</Callout>
diff --git a/apps/docs/content/docs/comments.ja.mdx b/apps/docs/content/docs/comments.ja.mdx
index 6b96f3b640..433d623b79 100644
--- a/apps/docs/content/docs/comments.ja.mdx
+++ b/apps/docs/content/docs/comments.ja.mdx
@@ -4,8 +4,11 @@ description: タスクに情報を補足し、スレッドに返信し、メン
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { ResolveThreadDemo } from "@/components/demos/resolve-thread-demo";
-コメントは、[タスク](/issues)上で継続的な協働が行われる場所です。メンバーとエージェントはここで背景を補足し、質問し、結果を報告します。次にタスクを開いたときも、完全なコンテキストがそのまま残っています。
+メンバーとエージェントは、[タスク](/issues)のコメントで背景を補足し、質問し、結果を報告します。記録はタスクに残るので、あとから誰がタスクを開いても経緯がわかります。
## コメントと返信の投稿
@@ -15,20 +18,72 @@ import { Callout } from "fumadocs-ui/components/callout";
コメントに返信するとスレッドになります。返信はさらにネストできますが、すべて同じトップレベルのスレッドの下にまとまります。
+スレッドが 2 つ以上あるタスクでは、Web と Desktop のタスクページ右側に目盛りの列が出ます。長い目盛りが 1 つのスレッド、短い目盛りが 1 件の返信です。マウスを乗せるとすべてのスレッドのアウトラインが開き、項目をクリックするとそのコメントに移動します。折りたたまれた解決済みスレッドの中にも直接移動できます。
+
## コメントと説明に注釈を付ける
-Web と Desktop では、自分を含む誰のコメントでも選択して選択ツールバーの **返信に追加** を押すと、選択箇所の横にコメント入力欄が開きます。コメントを入力して**注釈を追加** を押すと、返信下書きに保存されて件数と番号に反映されます。編集時は **注釈を保存** で変更を確定します。空の内容は確定できません。Enter で確定、Shift + Enter で改行します。Esc または入力欄の外をクリックすると未確定の変更を取り消します。原文の番号をクリックすると再編集できます。入力欄の横のごみ箱ボタンで、その注釈と原文のマーク、下書きの項目をその場で削除できます。注釈件数にマウスを重ねるとポップアップで引用の確認・削除ができ、引用をクリックすると原文でコメントを編集できます。クリックやキーボードでも開けます。既存の送信ボタンで 1 件の返信として送信し、注釈の間には空行が入ります。投稿では注釈が先に表示され、その下に全体への返信が続きます。両方がある場合は区切り線で分けられます。タスク説明では選択ツールバーの **コメントに追加** を選びます。説明の注釈は新しいコメントの下書きに入り、送信すると新しいスレッドを作成します。コメントの注釈は元のスレッドへの返信になります。
+Web と Desktop では、投稿済みのコメント(自分のコメントを含む)の文字を選択し、その箇所に意見を書けます。
+
+<Steps>
+<Step>
+
+文字を選択し、選択ツールバーの **返信に追加** を押します。
+
+</Step>
+<Step>
+
+選択箇所の横に意見を入力し、**注釈を追加** を押します。確定した注釈だけがスレッドの返信下書きに入り、番号が付きます。空の内容は確定できません。
+
+</Step>
+<Step>
+
+いつもの送信ボタンで、すべての注釈を 1 件の返信として送信します。注釈の間には空行が入ります。投稿では注釈が先に表示され、その下に入力欄に書いた全体への返信が続きます。両方がある場合は区切り線で分けられます。
+
+</Step>
+</Steps>
+
+タスク説明の選択ツールバーには **コメントに追加** があります。注釈は新しいコメントの下書きに入り、送信すると新しいスレッドになります。コメントへの注釈は、これまでどおり元のスレッドの返信下書きに入ります。
+
+コメントへの注釈では、最初に保存した注釈で返信先が決まります。ネストした返信も対象です。同じスレッドの別のメッセージからの引用も同じ下書きに入り、最後に 1 件のコメントとして投稿されます。引用内のメンションは通知も実行も発生させません。自分で入力したメンションには通常のルールが適用されます。
+
+<Accordions>
+<Accordion title="編集・削除とショートカット" id="annotation-editing">
-コメントへの注釈では、最初に保存した注釈で返信先が決まります。ネストした返信も対象になり、同じスレッドの別のメッセージからも引用できます。必要に応じて全体への返信も入力し、既存の送信ボタンで 1 件のコメントとして投稿します。引用内のメンションは通知や実行を発生させません。自分で入力したメンションには通常のルールが適用されます。
+- 既存の注釈を編集したら、**注釈を保存** を押すと変更が反映されます。
+- Enter で確定、Shift + Enter で改行します。Esc または入力欄の外をクリックすると、未確定の変更を取り消します。
+- 原文の番号をクリックすると再編集できます。入力欄の横のごみ箱ボタンを押すと、その注釈、原文のマーク、下書きの項目がまとめて削除されます。
+- 注釈件数にマウスを重ねるとポップアップが開き、引用の確認や削除ができます。引用をクリックすると原文の位置に戻って意見を編集できます。クリックやキーボードでもポップアップを開けます。
-下書きはこのデバイスとワークスペース内だけに保存され、再読み込み後も復元されます。保存期間は 30 日です。返信ごとに最大 20 件の注釈、引用ごとに最大 4,000 文字を追加できます。原文が変更されても引用は残りますが、返信先が削除された場合は送信できません。Chat、モバイルでの注釈入力、デバイス間の下書き同期には対応していません。
+</Accordion>
+<Accordion title="下書きと件数の上限" id="annotation-limits">
+
+下書きはこのデバイスとワークスペース内だけに保存され、再読み込み後も復元されます。保存期間は 30 日です。返信ごとに最大 20 件の注釈、引用ごとに最大 4,000 文字まで追加できます。あとで原文が変更されても保存済みの引用は変わりません。返信先が削除された場合、下書きは送信できません。
+
+現在、チャットでの注釈、モバイルでの注釈入力、デバイス間の下書き同期には対応していません。
+
+</Accordion>
+</Accordions>
## スレッドの解決
-疑問に結論が出たら、スレッド全体を解決済みにするか、いずれかの返信を結論に設定できます。1 つのスレッドが同時に保持できる結論は 1 つだけです。解決済みのスレッドは折りたたまれますが、展開して確認できます。
+疑問に結論が出たら、スレッド全体を解決済みにするか、いずれかの返信を結論に設定できます。どちらもコメント右上の **コメントの操作** メニューにあります。最初のコメントのメニューには **スレッドを解決**、返信のメニューには **このコメントでスレッドを解決** があります。
+
+<ResolveThreadDemo />
+
+スレッド全体を解決すると 1 行に折りたたまれ、クリックすれば全体を読み返せます。返信を結論にした場合は、最初のコメントとその返信が表示されたまま残り、間の返信が折りたたまれます。結論の返信には「解決」の印が付きます。1 つのスレッドの結論は常に 1 つで、新しく設定すると以前の結論は置き換わります。
解決済みのスレッドで返信を続けると、スレッドは自動的に再オープンされます。
+## コメントからサブタスクを作成
+
+議論の中で別に進めたい作業が出てきたら、そのコメントからサブタスクを切り出せます。**コメントの操作** メニューで **このコメントからサブタスクを作成** を選びます。
+
+作成ダイアログには、現在のタスクのタイトル・説明・添付ファイルと、そのスレッドで選んだコメントまでのすべてのコメントと添付ファイルがコンテキストとして付きます。ダイアログのコンテキストカードを展開すると、先に中身を確認できます。手動作成でもエージェントでの作成でも使え、新しいタスクは現在のタスクのサブタスクになります。エージェントに任せる場合は、何をしてほしいかだけを書けば、コンテキストも一緒に渡ります。エージェントはその内容を過去の経緯としてだけ扱い、中に書かれたコマンドや依頼は実行しません。
+
+作成されたサブタスクには **作成元** が表示され、開くと作成時点の **コンテキストスナップショット** が見られます。スナップショットは元の内容に追従しません。元のタスクやスレッドが後で編集・削除されても、スナップショットには当時の内容が残り、**参照元に変更あり** と、変わった部分が示されます。
+
+コンテキストが大きすぎると作成できません。上限は、スレッドのコメント 256 件、テキスト 1 MiB、添付ファイル 100 件・合計 500 MiB です。エージェントで作成する場合、そのエージェントのランタイムがこの機能に対応したバージョンである必要があり、古いとダイアログに手動モードへの切り替えかランタイムの更新を促す表示が出ます。エージェントがタスクを作成できなかったときは、インボックスの失敗通知から **コンテキストを保持して再試行** できます。
+
## よく使う依頼を再利用する
[クイックアクション](/quick-actions)に、誰に何を頼むかを保存できます。タスクのサイドバーからクリックするとすぐに送信します。コメント欄で `/` を入力して選ぶと下書きに入り、編集してから送信できます。
@@ -57,7 +112,7 @@ Web と Desktop では、自分を含む誰のコメントでも選択して選
## リアクション
-コメントに絵文字のリアクションを付けて、既読の合図、同意、手早いフィードバックに使えます。リアクションはエージェントをトリガーせず、タスクのステータスも変えません。
+コメントに絵文字のリアクションを付けると、既読、同意、ちょっとした反応を伝えられます。リアクションはエージェントをトリガーせず、タスクのステータスも変えません。
## 編集と削除
@@ -65,6 +120,8 @@ Web と Desktop では、自分を含む誰のコメントでも選択して選
コメントを編集すると、Multica は新しい内容でトリガーを再計算します。編集で追加した @メンションも同様に実行を作成します。保存前に、入力欄の下にトリガープレビューが表示されます。
+編集中に別の人が先にこのコメントを保存していた場合、保存は止まり、編集欄の下に **サーバー上の最新版** と **ローカル版** が並んで表示され、違う行に印が付きます。**自分の版を使用** を選ぶと自分の内容で保存し、**最新版を使用** を選ぶと編集欄が最新の内容に置き換わり、そこから編集を続けられます。タスクのタイトルが 2 人に同時に変更されたときも、同じように比較できます。
+
<Callout type="warning">
コメントの削除は元に戻せません。削除されるのはそのコメントだけです。返信がある場合、返信はスレッドに残り、削除されたコメントは跡を残しません。例外はスレッドの最初のコメントで、返信がぶら下がるため、元の位置に「このコメントは削除されました」と表示されます。内容が間違っている場合は編集してください。
</Callout>
diff --git a/apps/docs/content/docs/comments.ko.mdx b/apps/docs/content/docs/comments.ko.mdx
index 4459b63eef..aa108d96ad 100644
--- a/apps/docs/content/docs/comments.ko.mdx
+++ b/apps/docs/content/docs/comments.ko.mdx
@@ -4,8 +4,11 @@ description: 태스크에 정보를 보충하고, 논의에 답하고, 멤버나
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { ResolveThreadDemo } from "@/components/demos/resolve-thread-demo";
-댓글은 [태스크](/issues)에서 지속적으로 협업하는 공간입니다. 멤버와 에이전트가 배경을 보충하고, 질문을 남기고, 결과를 제출할 수 있으며 나중에 태스크를 다시 열어도 전체 컨텍스트를 확인할 수 있습니다.
+멤버와 에이전트는 [태스크](/issues)의 댓글에서 배경을 보충하고, 질문을 남기고, 결과를 제출합니다. 기록이 태스크에 남으므로 나중에 누가 태스크를 열어도 경위를 알 수 있습니다.
## 댓글 작성 및 답글
@@ -13,22 +16,74 @@ import { Callout } from "fumadocs-ui/components/callout";
`html` 또는 `mermaid` 코드 블록은 댓글 안에서 바로 차트나 다이어그램으로 표시되며, 소스 보기로 전환할 수 있습니다. 첨부 파일은 카드로 표시되고 뷰어에서 열리며, HTML 파일도 마찬가지입니다.
-댓글에 답글을 달면 논의 스레드가 만들어집니다. 답글은 계속 중첩할 수 있지만 모두 같은 최상위 논의 아래에 속합니다.
+댓글에 답글을 달면 논의가 만들어집니다. 답글은 계속 중첩할 수 있지만 모두 같은 최상위 논의 아래에 속합니다.
+
+논의가 두 개 이상인 태스크에서는 Web과 Desktop의 태스크 페이지 오른쪽에 눈금 한 줄이 나타납니다. 긴 눈금은 논의 하나, 짧은 눈금은 답글 하나입니다. 마우스를 올리면 모든 논의의 개요가 펼쳐지고, 항목을 클릭하면 해당 댓글로 이동합니다. 접혀 있는 해결된 논의 안으로도 바로 이동할 수 있습니다.
## 댓글과 설명에 주석 달기
-Web과 Desktop에서 본인 댓글을 포함한 모든 댓글의 텍스트를 선택하고 선택 도구 모음의 **답글에 추가**를 누르면 선택한 위치 옆에 의견 입력란이 열립니다. 의견을 입력한 뒤 **주석 추가**를 누르면 답글 초안에 저장되고 주석 개수와 번호에 반영됩니다. 편집한 내용은 **주석 저장**을 눌러 확정합니다. 빈 내용은 확정할 수 없습니다. Enter는 확정, Shift + Enter는 줄바꿈입니다. Esc를 누르거나 입력란 밖을 클릭하면 미확정 변경을 취소합니다. 원문의 번호 표시를 누르면 다시 편집할 수 있습니다. 입력란 옆의 휴지통 버튼으로 해당 주석과 원문 표시, 초안 항목을 그 자리에서 삭제할 수 있습니다. 주석 개수에 마우스를 올리면 팝업에서 인용문을 확인하거나 삭제하고, 인용문을 눌러 원문에서 의견을 편집할 수 있습니다. 클릭이나 키보드로도 팝업을 열 수 있습니다. 기존 전송 버튼으로 하나의 답글을 보내며 주석 사이에는 빈 줄이 들어갑니다. 게시된 댓글에서는 주석이 먼저 표시되고 그 아래에 전체 답글이 이어집니다. 두 부분이 모두 있으면 구분선이 표시됩니다. 작업 설명에서는 선택 도구 모음의 **댓글에 추가**를 누릅니다. 설명 주석은 새 댓글 초안에 추가되며 전송하면 새 스레드를 만듭니다. 댓글 주석은 원래 스레드의 답글로 전송됩니다.
+Web과 Desktop에서는 게시된 댓글(본인 댓글 포함)의 텍스트를 선택하고 그 부분에 의견을 달 수 있습니다.
+
+<Steps>
+<Step>
+
+텍스트를 선택하고 선택 도구 모음의 **답글에 추가**를 누릅니다.
+
+</Step>
+<Step>
+
+선택한 위치 옆에 의견을 입력하고 **주석 추가**를 누릅니다. 확정한 주석만 해당 논의의 답글 초안에 들어가고 번호가 붙습니다. 빈 내용은 확정할 수 없습니다.
+
+</Step>
+<Step>
+
+기존 전송 버튼으로 모든 주석을 하나의 답글로 보냅니다. 주석 사이에는 빈 줄이 들어갑니다. 게시된 답글에는 주석이 먼저 표시되고, 그 아래에 입력란에 쓴 전체 답글이 이어집니다. 두 부분이 모두 있으면 구분선이 표시됩니다.
+
+</Step>
+</Steps>
+
+태스크 설명의 선택 도구 모음에는 **댓글에 추가**가 있습니다. 주석은 새 댓글 초안에 들어가고, 보내면 새 논의가 만들어집니다. 댓글에 단 주석은 그대로 원래 논의의 답글 초안에 들어갑니다.
+
+댓글 주석에서는 처음 저장한 주석이 중첩 답글을 포함한 답글 대상을 정합니다. 같은 논의의 다른 메시지에서 가져온 인용도 이 초안에 들어가고, 마지막에 하나의 댓글로 게시됩니다. 인용문 안의 멘션은 알림이나 실행을 발생시키지 않으며, 직접 작성한 멘션에는 일반 규칙이 적용됩니다.
+
+<Accordions>
+<Accordion title="편집, 삭제, 단축키" id="annotation-editing">
-댓글 주석에서는 처음 저장한 주석이 중첩 답글을 포함한 정확한 답글 대상을 결정합니다. 같은 스레드의 다른 메시지에서도 인용할 수 있습니다. 필요하면 전체 답글도 작성한 뒤 기존 전송 버튼으로 하나의 댓글을 게시하세요. 인용문 안의 멘션은 알림이나 실행을 발생시키지 않으며, 직접 작성한 멘션에는 일반 규칙이 적용됩니다.
+- 기존 주석을 편집한 뒤에는 **주석 저장**을 눌러야 변경이 적용됩니다.
+- Enter는 확정, Shift + Enter는 줄바꿈입니다. Esc를 누르거나 입력란 밖을 클릭하면 확정하지 않은 변경이 취소됩니다.
+- 원문의 번호 표시를 누르면 다시 편집할 수 있습니다. 입력란 옆의 휴지통 버튼을 누르면 해당 주석, 원문 표시, 초안 항목이 함께 삭제됩니다.
+- 주석 개수에 마우스를 올리면 팝업이 열리고, 인용문을 확인하거나 삭제하거나, 인용문을 눌러 원래 위치로 돌아가 의견을 편집할 수 있습니다. 클릭이나 키보드로도 팝업을 열 수 있습니다.
-초안은 이 기기와 워크스페이스에만 저장되며 새로고침 후 복원되고 30일 후 만료됩니다. 답글당 주석은 최대 20개, 인용문당 최대 4,000자입니다. 원문이 변경되어도 저장한 인용문은 유지되지만 답글 대상이 삭제되면 전송할 수 없습니다. Chat, 모바일 주석 입력, 기기 간 초안 동기화는 지원하지 않습니다.
+</Accordion>
+<Accordion title="초안과 개수 제한" id="annotation-limits">
+
+초안은 이 기기와 워크스페이스에만 저장되며, 새로고침 후 복원되고 30일 후 만료됩니다. 답글당 주석은 최대 20개, 인용문당 최대 4,000자입니다. 나중에 원문이 바뀌어도 저장된 인용문은 그대로이며, 답글 대상이 삭제되면 초안을 보낼 수 없습니다.
+
+현재 채팅에서의 주석, 모바일에서의 주석 입력, 기기 간 초안 동기화는 지원하지 않습니다.
+
+</Accordion>
+</Accordions>
## 논의 해결
-문제에 결론이 나면 전체 논의를 해결됨으로 표시하거나 특정 답글을 결론으로 지정할 수 있습니다. 한 논의에는 한 번에 하나의 결론만 유지됩니다. 해결된 논의는 접히지만 다시 펼쳐서 볼 수 있습니다.
+문제에 결론이 나면 전체 논의를 해결됨으로 표시하거나 특정 답글을 결론으로 지정할 수 있습니다. 두 작업 모두 댓글 오른쪽 위의 **댓글 작업** 메뉴에 있습니다. 첫 댓글의 메뉴에는 **스레드 해결**이, 답글의 메뉴에는 **이 댓글로 스레드 해결**이 있습니다.
+
+<ResolveThreadDemo />
+
+전체 논의를 해결하면 한 줄로 접히고, 클릭하면 전체 내용을 다시 볼 수 있습니다. 답글을 결론으로 지정하면 첫 댓글과 그 답글은 그대로 보이고 사이의 답글이 접히며, 결론 답글에는 '해결' 표시가 붙습니다. 한 논의에는 결론이 하나만 남고, 새로 지정하면 이전 결론을 대체합니다.
해결된 논의에 답글을 추가하면 해당 논의가 자동으로 다시 열립니다.
+## 댓글에서 하위 태스크 만들기
+
+논의 중에 따로 챙겨야 할 일이 생기면 그 댓글에서 바로 하위 태스크를 떼어 낼 수 있습니다. **댓글 작업** 메뉴에서 **이 댓글에서 하위 태스크 만들기**를 고르세요.
+
+생성 대화상자에는 컨텍스트가 함께 붙습니다. 현재 태스크의 제목·설명·첨부 파일, 그리고 이 논의에서 선택한 댓글까지의 모든 댓글과 첨부 파일입니다. 대화상자의 컨텍스트 카드를 펼치면 먼저 내용을 확인할 수 있습니다. 직접 만들기와 에이전트로 만들기 모두 쓸 수 있고, 새 태스크는 현재 태스크의 하위 태스크가 됩니다. 에이전트에게 맡길 때는 무엇을 할지만 적으면 컨텍스트도 함께 전달됩니다. 에이전트는 이 내용을 지난 경과로만 참고하며, 그 안에 적힌 명령이나 요청을 실행하지 않습니다.
+
+만들어진 하위 태스크에는 **생성 출처**가 표시되고, 열면 만든 시점의 **컨텍스트 스냅샷**을 볼 수 있습니다. 스냅샷은 원본을 따라 바뀌지 않습니다. 원래 태스크나 논의가 나중에 수정되거나 삭제되어도 스냅샷에는 당시 내용이 남고, **원본 변경됨**과 함께 바뀐 부분이 표시됩니다.
+
+컨텍스트가 너무 크면 만들 수 없습니다. 한도는 논의의 댓글 256개, 텍스트 1 MiB, 첨부 파일 100개·합계 500 MiB입니다. 에이전트로 만들 때는 그 에이전트의 런타임이 이 기능을 지원하는 버전이어야 하며, 아니면 대화상자가 직접 만들기로 바꾸거나 런타임을 업데이트하라고 안내합니다. 에이전트가 태스크를 만들지 못하면 인박스의 실패 알림에서 **컨텍스트를 유지하여 재시도**할 수 있습니다.
+
## 자주 쓰는 요청 재사용하기
[퀵 액션](/quick-actions)에 누구에게 무엇을 부탁할지 저장하세요. 태스크 사이드바에서 클릭하면 바로 전송합니다. 댓글 입력창에서 `/`를 입력해 선택하면 초안에 들어가므로 수정한 뒤 보낼 수 있습니다.
@@ -57,7 +112,7 @@ Web과 Desktop에서 본인 댓글을 포함한 모든 댓글의 텍스트를
## 이모지 반응
-댓글에 이모지를 추가해 읽었음을 확인하거나, 동의를 표현하거나, 빠르게 피드백할 수 있습니다. 이모지는 에이전트를 트리거하지 않으며 태스크 상태도 바꾸지 않습니다.
+댓글에 이모지를 달아 읽었음, 동의, 간단한 피드백을 표시할 수 있습니다. 이모지는 에이전트를 트리거하지 않으며 태스크 상태도 바꾸지 않습니다.
## 수정 및 삭제
@@ -65,6 +120,8 @@ Web과 Desktop에서 본인 댓글을 포함한 모든 댓글의 텍스트를
댓글을 수정하면 Multica가 새 내용을 기준으로 트리거를 다시 계산합니다. 수정하면서 새로 추가한 @멘션도 실행을 생성하며, 저장하기 전에 입력란 아래에 트리거 미리보기가 표시됩니다.
+수정하는 동안 다른 사람이 이 댓글을 먼저 저장했다면 저장이 멈추고, 편집란 아래에 **서버의 최신 버전**과 **내 로컬 버전**이 나란히 표시되며 달라진 줄이 표시됩니다. **내 버전 유지**를 고르면 내 내용으로 저장하고, **최신 버전 사용**을 고르면 편집란이 최신 내용으로 바뀌어 그 위에서 계속 수정할 수 있습니다. 태스크 제목을 두 사람이 동시에 바꿀 때도 같은 방식으로 비교합니다.
+
<Callout type="warning">
댓글 삭제는 취소할 수 없습니다. 해당 댓글만 삭제되며, 답글이 있으면 답글은 스레드에 남고 삭제된 댓글은 흔적을 남기지 않습니다. 예외는 스레드를 시작한 댓글로, 답글이 그 아래에 달리므로 원래 자리에 "삭제된 댓글입니다"가 표시됩니다. 내용이 잘못되었다면 수정하세요.
</Callout>
diff --git a/apps/docs/content/docs/comments.mdx b/apps/docs/content/docs/comments.mdx
index 380a5e920c..145e1078ca 100644
--- a/apps/docs/content/docs/comments.mdx
+++ b/apps/docs/content/docs/comments.mdx
@@ -4,31 +4,86 @@ description: Add information, reply to discussions, and @-mention members or age
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { ResolveThreadDemo } from "@/components/demos/resolve-thread-demo";
-Comments are where ongoing collaboration on an [issue](/issues) happens. Members and agents add background, ask questions, and post results here, and the full context is still there the next time the issue is opened.
+Members and agents add background, ask questions, and post results in the comments on an [issue](/issues). The record stays on the issue, so whoever opens it later can see how things got where they are.
## Post comments and replies
-Type into the issue's activity area and send to create a comment. Comments support formatting, code blocks, links, and attachments.
+Type into the issue's activity area and send, and a comment is created. Comments support formatting, code blocks, links, and attachments.
An `html` or `mermaid` code block renders in place as a chart or diagram, with a switch to its source. Attached files show as cards that open in the viewer; that includes HTML files.
-Replying to a comment forms a discussion thread. Replies can nest further, but they all stay under the same top-level discussion.
+Replying to a comment starts a thread. Replies can nest further, but they all stay under the same top-level thread.
+
+Once an issue has two or more threads, the issue page on Web and Desktop shows a column of ticks on the right: a long tick per thread and a short one per reply. Hover it to open an outline of every thread, and click any entry to jump to that comment, including comments inside folded, resolved threads.
## Annotate comments and descriptions
-On Web and Desktop, select text in any posted comment, including your own and choose **Add to reply** in the selection toolbar. Write a note beside the selection, then click **Add annotation** to add it to the reply draft. Only confirmed, non-empty notes receive a count and source marker. When editing, click **Save annotation** to apply changes. Enter confirms; Shift + Enter inserts a newline. Escape or clicking outside cancels unconfirmed changes. Click the numbered source marker to edit it again. The trash button beside the note removes that annotation directly at the source, including its highlight and draft entry. Hover over the annotation count to inspect or remove quotes in a floating panel, or click a quote to edit its note at the source. You can also open the panel by clicking or using the keyboard. Send everything as one reply with the existing send button, with a blank line between annotations. Annotations appear first, followed by your overall reply, with a divider between the two sections when both are present. For an issue description, choose **Add to comment** in its selection toolbar. Description annotations join the new-comment draft and are sent as a new thread; comment annotations stay in their original thread.
+On Web and Desktop, you can select text in any posted comment, your own included, and write a note on that passage:
+
+<Steps>
+<Step>
+
+Select the text and choose **Add to reply** in the selection toolbar.
+
+</Step>
+<Step>
+
+Write your note beside the selection and click **Add annotation**. Only a confirmed note joins the thread's reply draft and gets a number; an empty note can't be confirmed.
+
+</Step>
+<Step>
+
+Use the usual send button to post all the annotations as one reply, with a blank line between them. The posted reply shows the annotations first, then whatever you wrote in the composer, with a divider between the two when both are present.
+
+</Step>
+</Steps>
+
+The selection toolbar on an issue description offers **Add to comment** instead: the annotations go into a new-comment draft, and sending it starts a new thread. Annotations on a comment still go into that thread's reply draft.
+
+For comment annotations, the first one you save fixes the reply target, including nested replies. Quotes from other messages in the same thread join that draft, and everything is posted as one comment. Mentions inside a quote don't notify or trigger anyone; mentions you write yourself follow the normal rules.
+
+<Accordions>
+<Accordion title="Editing, removing, and shortcuts" id="annotation-editing">
-For comment annotations, the first saved annotation fixes the reply target, including nested replies. Quotes from other messages in that discussion join the same draft. Use the existing send button to publish everything as one comment. Quoted mentions do not notify or trigger anyone; mentions you write yourself follow the normal rules.
+- After editing an existing annotation, click **Save annotation** to apply the change.
+- Enter confirms; Shift + Enter inserts a newline. Escape or clicking outside cancels unconfirmed changes.
+- Click the numbered marker in the source text to edit the note again. The trash button beside the note removes the annotation together with its marker and draft entry.
+- Hovering over the annotation count opens a panel where you can review or remove quotes, or click a quote to jump back and edit its note. Clicking or using the keyboard opens the panel too.
-Drafts are private to this device and workspace, survive reloads, and expire after 30 days. Each reply supports up to 20 annotations, with up to 4,000 characters per quote. If a source changes, its saved quote remains; if the reply target is deleted, sending is blocked. Chat, mobile annotation entry, and cross-device draft sync are not included.
+</Accordion>
+<Accordion title="Drafts and limits" id="annotation-limits">
+
+Drafts are kept only on this device and in this workspace. They survive reloads and expire after 30 days. Each reply holds up to 20 annotations, and each quote up to 4,000 characters. If the source text changes later, the saved quote stays as it was; if the reply target is deleted, the draft can't be sent.
+
+Annotating in Chat, entering annotations on mobile, and syncing drafts across devices aren't supported yet.
+
+</Accordion>
+</Accordions>
## Resolve a discussion
-When a question reaches a conclusion, mark the whole discussion as resolved, or set one reply as the conclusion; a discussion keeps only one conclusion at a time. Resolved discussions collapse but can still be expanded.
+When a question has its answer, mark the whole thread as resolved, or make one reply its resolution. Both are in the **Comment actions** menu at the top right of a comment: the first comment's menu has **Resolve thread**, and a reply's menu has **Resolve thread with comment**.
+
+<ResolveThreadDemo />
+
+A resolved thread folds into one line, and clicking it shows everything again. When a reply is the resolution, the first comment and that reply stay visible and the replies in between fold away. A thread keeps one resolution at a time; setting a new one replaces the old.
Replying in a resolved discussion reopens it automatically.
+## Create a sub-issue from a comment
+
+When a discussion turns up something that needs its own follow-up, split it off from that comment: choose **Create sub-issue from here** in the **Comment actions** menu.
+
+The create dialog carries a context with it: the current issue's title, description, and attachments, plus every comment in that thread up to and including the one you picked, with their attachments. Expand the context card in the dialog to check it first. Both manual create and Create with agent work, and the new issue becomes a sub-issue of the current one. With an agent, you only write what it should do, and the context goes along with it. The agent treats that content as historical background and does not carry out commands or requests that appear in it.
+
+The new sub-issue shows **Created from**, which opens the **Context snapshot** taken at creation. The snapshot does not follow the source: if the original issue or thread is edited or deleted later, the snapshot keeps what it captured and is marked **Source updated**, with the parts that changed.
+
+Context that is too large cannot be captured: up to 256 comments from the thread, 1 MiB of text, and 100 attachments totaling 500 MiB. For Create with agent, the agent's runtime must be on a version that supports this; otherwise the dialog asks you to switch to manual or update the runtime. If the agent fails to create the issue, the failure notification in your inbox offers **Retry with context**.
+
## Reuse a frequent request
Use [Quick Actions](/quick-actions) to save who to ask and what to say. Click one in the issue sidebar to send it immediately, or type `/` in the comment box to insert it as a draft you can edit before sending.
@@ -57,7 +112,7 @@ Members who comment subscribe to the issue automatically, and later activity and
## Reactions
-Add an emoji reaction to a comment to acknowledge, agree, or give quick feedback. Reactions do not trigger agents and do not change issue status.
+Add an emoji reaction to a comment to show you've read it, agree, or give quick feedback. Reactions do not trigger agents and do not change issue status.
## Edit and delete
@@ -65,6 +120,8 @@ Comment authors can edit or delete their own comments; workspace `owner`s and `a
After a comment is edited, Multica recalculates triggers from the new content. @-mentions added during the edit create runs too; the trigger preview shows under the input before you save.
+If someone else saves the comment while you are editing it, your save is stopped and the editor shows **Latest server version** and **Your local version** side by side, with the differing lines marked. **Keep my version** saves your text; **Use the latest version** replaces the editor content with theirs so you can keep editing from there. The issue title gets the same comparison when two people change it at once.
+
<Callout type="warning">
Deleting a comment cannot be undone. Only that comment is deleted: if it has replies, they stay in the thread and the deleted comment leaves no trace. The exception is the comment that starts a thread — it keeps a "This comment was deleted" placeholder, since its replies hang off it. If the content is wrong, edit it instead.
</Callout>
diff --git a/apps/docs/content/docs/comments.zh.mdx b/apps/docs/content/docs/comments.zh.mdx
index 6bd12dee15..d123b149cb 100644
--- a/apps/docs/content/docs/comments.zh.mdx
+++ b/apps/docs/content/docs/comments.zh.mdx
@@ -4,31 +4,86 @@ description: 在任务中补充信息、回复讨论、@成员或智能体,并
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { ResolveThreadDemo } from "@/components/demos/resolve-thread-demo";
-评论是 [任务](/issues) 中持续协作的地方。成员和智能体可以在这里补充背景、提出问题、提交结果,后续打开任务时仍能看到完整上下文。
+成员和智能体在 [任务](/issues) 的评论里补充背景、提出问题、提交结果。这些记录留在任务上,之后谁打开任务都能看到前因后果。
## 发表评论和回复
-在任务的动态区输入内容并发送,即可创建一条评论。评论支持格式、代码块、链接和附件。
+在任务的动态区输入内容并发送,就会创建一条评论。评论支持格式、代码块、链接和附件。
`html` 或 `mermaid` 代码块会直接在评论里渲染成图表或图示,可以切换查看源码。附件以卡片显示,点击在查看器中打开,HTML 文件也是如此。
-回复某条评论会形成一条讨论线程。回复可以继续嵌套,但都归在同一条顶层讨论下。
+回复某条评论会形成一条讨论。回复可以继续嵌套,但都归在同一条顶层讨论下。
+
+任务里有两条以上讨论时,Web 和 Desktop 的任务详情页右侧会出现一列刻度:长刻度是一条讨论,短刻度是一条回复。鼠标移上去会展开所有讨论的提纲,点任意一项跳到对应评论,折叠起来的已解决讨论也能直接跳进去。
## 批注评论与任务描述
-在 Web 或 Desktop 中,选中任意已发表的评论文字,包括自己的评论,点击选区工具条中的 **加入回复**,在选区旁填写意见,再点击 **添加批注**,批注才加入当前讨论的回复草稿并显示编号。编辑已有批注后,点击 **保存批注** 才会应用修改。空内容无法确认。Enter 确认,Shift + Enter 换行;Esc 或点击框外会取消本次未确认的修改。点击原文编号标记可继续编辑,也可点击批注框右侧的删除图标,直接移除该批注及其原文标记和草稿条目。鼠标悬停在批注计数上,即可在浮层中查看、删除引用,或点击引用返回原位编辑意见;也支持点击或使用键盘打开浮层。通过原有发送按钮合并发送为一条回复,各条批注之间保留一个空行。发布后先显示批注,再显示你在输入框中填写的整体回复;两部分都有内容时,中间显示分隔线。任务描述的选区工具条提供 **加入评论**,批注进入新评论草稿,发送后创建新的讨论;评论批注仍进入原讨论的回复草稿。
+在 Web 或 Desktop 中,可以选中任意已发表评论里的文字(包括自己的评论),针对这段文字写意见:
+
+<Steps>
+<Step>
+
+选中文字,点击选区工具条中的 **加入回复**。
+
+</Step>
+<Step>
+
+在选区旁填写意见,点击 **添加批注**。确认后批注才加入当前讨论的回复草稿并显示编号;空内容无法确认。
+
+</Step>
+<Step>
+
+用原有的发送按钮,把所有批注合并成一条回复发出,各条批注之间保留一个空行。发布后先显示批注,再显示你在输入框中填写的整体回复;两部分都有内容时,中间显示分隔线。
+
+</Step>
+</Steps>
+
+任务描述的选区工具条提供的是 **加入评论**:批注进入新评论草稿,发送后创建新的讨论。评论上的批注仍进入原讨论的回复草稿。
+
+首次保存的评论批注会确定具体回复目标,包括嵌套回复。同一讨论中其他消息的引用也会加入这份草稿,最后作为一条评论发布。引用中的提及不会通知或触发任何人;你自己填写的提及仍按普通规则处理。
+
+<Accordions>
+<Accordion title="编辑、删除和快捷键" id="annotation-editing">
-首次保存的评论批注会确定具体回复目标,包括嵌套回复。同一讨论中其他消息的引用会加入这份草稿。使用原有发送按钮,将全部内容作为一条评论发布。引用中的提及不会通知或触发任何人;你自己填写的提及仍遵循普通规则。
+- 编辑已有批注后,点击 **保存批注** 才会应用修改。
+- Enter 确认,Shift + Enter 换行;Esc 或点击框外会取消本次未确认的修改。
+- 点击原文上的编号标记可以继续编辑;点击批注框右侧的删除图标,会同时移除这条批注、原文标记和草稿条目。
+- 鼠标悬停在批注计数上会打开浮层,可以查看、删除引用,或点击引用回到原位编辑意见。点击或使用键盘也能打开这个浮层。
-草稿仅保存在当前设备和工作区,刷新后可恢复,30 天后过期。每条回复最多包含 20 条批注,每次引用最多 4,000 个字符。原文更改后仍保留引用快照;回复目标被删除时会阻止发送。首版不包含 Chat、移动端批注输入或跨设备草稿同步。
+</Accordion>
+<Accordion title="草稿和数量限制" id="annotation-limits">
+
+草稿只保存在当前设备和工作区,刷新后可以恢复,30 天后过期。每条回复最多包含 20 条批注,每次引用最多 4,000 个字符。原文之后被修改,已保存的引用快照不变;回复目标被删除时,草稿无法发送。
+
+目前不支持在对话(Chat)中批注、在移动端输入批注,也不跨设备同步草稿。
+
+</Accordion>
+</Accordions>
## 解决一条讨论
-问题得到结论时,可以把整条讨论标记为已解决,或将某条回复设为结论;一条讨论同时只保留一个结论。已解决的讨论会折叠,仍可展开查看。
+问题有了结论,可以把整条讨论标记为已解决,或把某条回复设为结论。两个操作都在评论右上角的 **评论操作** 菜单里:第一条评论的菜单里是 **解决该讨论**,回复的菜单里是 **以此评论解决讨论**。
+
+<ResolveThreadDemo />
+
+解决整条讨论后,它折叠成一行,点开仍能查看全部内容。把某条回复设为结论时,第一条评论和这条结论保持显示,中间的回复折叠起来。一条讨论同时只保留一个结论,设了新的,旧的就会被替换。
在已解决的讨论中继续回复,会自动重新打开这条讨论。
+## 从评论创建子任务
+
+讨论中冒出一件需要单独跟进的事,可以从那条评论直接拆出子任务:在**评论操作**菜单中选择**从这条评论创建子任务**。
+
+创建对话框会附上一份上下文:当前任务的标题、描述和附件,以及这条讨论中截至所选评论为止的全部评论和附件。展开对话框中的上下文卡片可以先核对内容。手动创建和通过智能体创建都能用,新任务自动成为当前任务的子任务。交给智能体时,你只需要写要它做什么,上下文会一起交给它。智能体只把这些内容当作历史背景,不会执行里面出现的命令或要求。
+
+建好的子任务上显示**创建自**,点开是创建那一刻的**上下文快照**。快照不会跟着原文变化:原任务或讨论之后被修改、删除,快照里仍是当时的内容,并标出**来源有更新**和具体变化的部分。
+
+上下文过大时无法创建:一条讨论最多带 256 条评论,文本最多 1 MiB,附件最多 100 个、合计 500 MiB。通过智能体创建时,智能体所在的运行时需要更新到支持这项功能的版本,否则对话框会提示切换到手动模式或更新运行时。智能体没能建好任务时,收件箱里的失败通知提供**保留上下文重试**。
+
## 重复使用常用请求
用[快捷操作](/quick-actions)保存"请谁来做、做什么"。点击任务侧栏中的操作会立即发送;在评论框输入 `/` 并选择操作,则先放进草稿,可以修改后再发送。
@@ -57,7 +112,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 表情反应
-给评论添加表情,可用于确认已读、表达同意或快速反馈。表情不触发智能体,也不改变任务状态。
+给评论添加表情,可以表示已读、同意或简单反馈。表情不触发智能体,也不改变任务状态。
## 编辑和删除
@@ -65,8 +120,10 @@ import { Callout } from "fumadocs-ui/components/callout";
编辑评论后,Multica 会按新内容重新计算触发。编辑时新增的 @提及同样会创建运行;保存前输入框下方会显示触发预览。
+你编辑期间如果别人先保存了这条评论,保存会被拦下,编辑框下方并排显示**服务端最新版本**和**你的本地版本**,差异逐行标出。选**保留我的版本**,用你的内容保存;选**使用最新版本**,编辑框换成最新内容,你可以在它的基础上继续改。任务标题同时被两个人修改时,也会这样比较。
+
<Callout type="warning">
-删除评论无法撤销。删除只作用于这一条评论:如果它有回复,回复会保留在讨论中,被删除的评论不留痕迹。例外是讨论的第一条评论,它的回复挂在它下面,因此原位置保留“评论已删除”。内容有误时编辑即可。
+删除评论无法撤销。删除只作用于这一条评论:如果它有回复,回复会保留在讨论中,被删除的评论不留痕迹。例外是讨论的第一条评论:回复都挂在它下面,所以原位置会保留"评论已删除"。内容有误时编辑即可。
</Callout>
## 接下来
diff --git a/apps/docs/content/docs/community-maintained.fr.mdx b/apps/docs/content/docs/community-maintained.fr.mdx
index 5d9a6349f5..feb6c00465 100644
--- a/apps/docs/content/docs/community-maintained.fr.mdx
+++ b/apps/docs/content/docs/community-maintained.fr.mdx
@@ -7,7 +7,7 @@ import { Callout } from "fumadocs-ui/components/callout";
La majeure partie de Multica est développée et prise en charge par l'équipe principale. Quelques domaines ont été apportés par des bénévoles qui en sont restés les mainteneurs. Ces domaines sont livrés dans chaque version, mais ne bénéficient d'aucun SLA de support officiel.
-Cette page en est la liste de référence. Elle existe pour que vous sachiez sur quoi vous vous appuyez avant d'y bâtir un flux de travail, et pour que les personnes qui ont contribué à ce travail soient créditées nommément.
+Cette page en est la liste de référence. Consultez-la pour savoir sur quoi vous vous appuyez avant de bâtir un flux de travail sur l'un de ces domaines ; les personnes qui ont contribué à ce travail y sont aussi créditées nommément.
## Ce que signifie « maintenu par la communauté »
@@ -30,11 +30,11 @@ Cette liste ne change que lorsque la responsabilité d'un domaine change. Tout c
## Signaler un problème dans l'un de ces domaines
<Callout type="warning">
-Ouvrez une [issue GitHub](https://github.com/multica-ai/multica/issues). Merci de ne pas contacter un mainteneur en message privé ni de le @-mentionner directement — les mainteneurs ont accepté d'être le premier interlocuteur pour les questions que **nous** leur transmettons, pas un service d'assistance que n'importe qui peut solliciter.
+Ouvrez une [issue GitHub](https://github.com/multica-ai/multica/issues). Merci de ne pas contacter un mainteneur en message privé ni de le @-mentionner directement. Les mainteneurs ont accepté d'être le premier interlocuteur pour les questions que **nous** leur transmettons, pas un service d'assistance que n'importe qui peut solliciter.
</Callout>
-Le formulaire d'issue comporte un champ **Area**. C'est en le remplissant que vous nous permettez de transmettre le signalement au bon mainteneur : cela vaut bien un clic de plus.
+Le formulaire d'issue comporte un champ **Area**. C'est en le remplissant que vous nous permettez de transmettre le signalement au bon mainteneur.
## Devenir mainteneur
-Si vous apportez une nouvelle intégration ou un autre domaine conséquent, nous aurons cette conversation avec vous avant la fusion : ce à quoi nous nous engageons, ce que nous vous demanderions, et la règle de retrait ci-dessus. Vous pouvez tout à fait refuser — cela change la façon dont le domaine est étiqueté, pas le fait que le travail soit fusionné.
+Si vous apportez une nouvelle intégration ou un autre domaine conséquent, nous aurons cette conversation avec vous avant la fusion : ce à quoi nous nous engageons, ce que nous vous demanderions, et la règle de retrait ci-dessus. Vous pouvez tout à fait refuser : cela ne change que la façon dont le domaine est étiqueté, sans effet sur la fusion du travail.
diff --git a/apps/docs/content/docs/community-maintained.ja.mdx b/apps/docs/content/docs/community-maintained.ja.mdx
index e902b6ce02..60bfdd7539 100644
--- a/apps/docs/content/docs/community-maintained.ja.mdx
+++ b/apps/docs/content/docs/community-maintained.ja.mdx
@@ -7,7 +7,7 @@ import { Callout } from "fumadocs-ui/components/callout";
Multica の大部分はコアチームが開発・サポートしています。一部の領域はコミュニティのボランティアが提供し、マージ後もその領域のコミュニティメンテナーとして関わり続けています。これらの領域は毎リリースに同梱されますが、公式のサポート SLA は付きません。
-このページが正式な一覧です。ワークフローをある領域の上に構築する前に何に依存するのかを把握できるようにするため、そしてその貢献をした人を名前で記録するためにあります。
+このページが正式な一覧です。ある領域の上にワークフローを構築する前に、何に依存することになるのかをここで確認できます。その貢献をした人の名前もここに記録しています。
## コミュニティメンテナンスとは
@@ -33,8 +33,8 @@ Multica の大部分はコアチームが開発・サポートしています。
[GitHub issues](https://github.com/multica-ai/multica/issues) に報告してください。メンテナー本人に DM や @ メンションを送らないでください。彼らが引き受けたのは**私たちが**ルーティングした質問の最初の窓口であり、誰でも呼び出せるサポート窓口ではありません。
</Callout>
-issue フォームには **Area** フィールドがあります。これを埋めてもらえると担当メンテナーにルーティングできるので、ひと手間かける価値があります。
+issue フォームには **Area** フィールドがあります。これを埋めてもらえると、担当メンテナーにルーティングできます。
## メンテナーになるには
-新しい連携やその他のまとまった領域を提供してくれた場合、マージ前にこの話をします。私たちが約束すること、お願いしたいこと、そして上記の終了ルールです。断っても問題ありません。変わるのはその領域の扱いの表記であって、その貢献がマージされるかどうかではありません。
+新しい連携やその他のまとまった領域を提供してくれた場合、マージ前にこの話をします。私たちが約束すること、お願いしたいこと、そして上記の終了ルールです。断っても問題ありません。変わるのはその領域の表記だけで、マージされるかどうかには影響しません。
diff --git a/apps/docs/content/docs/community-maintained.ko.mdx b/apps/docs/content/docs/community-maintained.ko.mdx
index 0d6a8ee327..7b7c223f51 100644
--- a/apps/docs/content/docs/community-maintained.ko.mdx
+++ b/apps/docs/content/docs/community-maintained.ko.mdx
@@ -7,7 +7,7 @@ import { Callout } from "fumadocs-ui/components/callout";
Multica의 대부분은 코어 팀이 만들고 지원합니다. 일부 영역은 커뮤니티 자원봉사자가 기여했고, 이들은 머지 이후에도 해당 영역의 커뮤니티 유지관리자로 남았습니다. 이 영역들은 모든 릴리스에 포함되지만 공식 지원 SLA는 없습니다.
-이 페이지가 공식 목록입니다. 어떤 영역 위에 워크플로를 만들기 전에 무엇에 의존하게 되는지 알 수 있도록, 그리고 그 작업을 기여한 사람을 이름으로 남기기 위해 존재합니다.
+이 페이지가 공식 목록입니다. 어떤 영역 위에 워크플로를 만들기 전에 무엇에 의존하게 되는지 여기서 확인할 수 있고, 그 작업을 기여한 사람의 이름도 여기에 남깁니다.
## 커뮤니티 유지관리란
@@ -33,8 +33,8 @@ Multica의 대부분은 코어 팀이 만들고 지원합니다. 일부 영역
[GitHub issues](https://github.com/multica-ai/multica/issues)에 등록해 주세요. 유지관리자에게 직접 DM이나 @멘션을 보내지 마세요. 그들이 맡은 역할은 **우리가** 전달한 질문의 첫 창구이지, 누구나 호출할 수 있는 지원 데스크가 아닙니다.
</Callout>
-태스크 양식에는 **Area** 필드가 있습니다. 이 값을 채워 주면 담당 유지관리자에게 전달할 수 있으니 한 번 더 클릭할 가치가 있습니다.
+issue 양식에는 **Area** 필드가 있습니다. 이 값을 채워 주어야 담당 유지관리자에게 전달할 수 있습니다.
## 유지관리자가 되려면
-새로운 연동이나 그에 준하는 영역을 기여하면, 머지 전에 이런 이야기를 나눕니다. 우리가 약속하는 것, 부탁드리고 싶은 것, 그리고 위의 종료 규칙입니다. 거절해도 괜찮습니다. 달라지는 것은 그 영역의 표기 방식이지, 그 작업의 머지 여부가 아닙니다.
+새로운 연동이나 그에 준하는 영역을 기여하면, 머지 전에 이런 이야기를 나눕니다. 우리가 약속하는 것, 부탁드리고 싶은 것, 그리고 위의 종료 규칙입니다. 거절해도 괜찮습니다. 달라지는 것은 그 영역의 표기 방식뿐이며, 머지 여부에는 영향이 없습니다.
diff --git a/apps/docs/content/docs/community-maintained.mdx b/apps/docs/content/docs/community-maintained.mdx
index a401c27dbe..d567a40bc1 100644
--- a/apps/docs/content/docs/community-maintained.mdx
+++ b/apps/docs/content/docs/community-maintained.mdx
@@ -7,7 +7,7 @@ import { Callout } from "fumadocs-ui/components/callout";
Most of Multica is built and supported by the core team. A few areas were contributed by volunteers who stayed on as their maintainers. Those areas ship in every release, but they carry no official support SLA.
-This page is the authoritative list. It exists so you know what you are relying on before you build a workflow on top of it, and so the people who contributed that work are credited by name.
+This page is the authoritative list. Check it to see what you are relying on before you build a workflow on top of an area; it also credits the people who contributed that work by name.
## What community-maintained means
@@ -15,7 +15,7 @@ This page is the authoritative list. It exists so you know what you are relying
**What we cannot promise.** We do not use these platforms day to day, so we cannot verify behavior against the real thing. A bug that needs real platform access depends on a volunteer's availability, which means no response-time guarantee.
-**How an area retires.** If an area breaks in a way we cannot fix without real access, and no fix appears for a few releases, we may deprecate it rather than leave it quietly broken. That rule protects the maintainers as much as it protects you: a volunteer who gets busy or moves on owes nobody a fix.
+**How an area retires.** If an area breaks in a way we cannot fix without real access, and no fix appears for a few releases, we may deprecate it instead of leaving it quietly broken. That rule protects the maintainers as much as it protects you: a volunteer who gets busy or moves on owes nobody a fix.
## The areas
@@ -30,11 +30,11 @@ This list changes only when ownership of an area does. Everything not listed her
## Reporting a problem in one of these areas
<Callout type="warning">
-File a [GitHub issue](https://github.com/multica-ai/multica/issues). Please do not DM or @-mention a maintainer directly — they agreed to be the first stop for questions **we** route to them, not a support desk anyone can page.
+File a [GitHub issue](https://github.com/multica-ai/multica/issues). Please do not DM or @-mention a maintainer directly. They agreed to be the first stop for questions **we** route to them, not a support desk anyone can page.
</Callout>
-The issue form has an **Area** field. Filling it in is what lets us route the report to the right maintainer, so it is worth the extra click.
+The issue form has an **Area** field. Filling it in is what lets us route the report to the right maintainer.
## Becoming a maintainer
-If you contribute a new integration or another substantial area, we will have this conversation with you before merging: what we commit to, what we would ask of you, and the retirement rule above. Declining is fine — it changes how the area is labelled, not whether the work merges.
+If you contribute a new integration or another substantial area, we will have this conversation with you before merging: what we commit to, what we would ask of you, and the retirement rule above. Declining is fine: it only changes how the area is labelled, and has no effect on whether the work merges.
diff --git a/apps/docs/content/docs/community-maintained.zh.mdx b/apps/docs/content/docs/community-maintained.zh.mdx
index f465f8b6f0..07ae727b4a 100644
--- a/apps/docs/content/docs/community-maintained.zh.mdx
+++ b/apps/docs/content/docs/community-maintained.zh.mdx
@@ -7,7 +7,7 @@ import { Callout } from "fumadocs-ui/components/callout";
Multica 的大部分功能由核心团队构建和支持。有少数功能区域由社区志愿者贡献,他们在合入后继续作为这些区域的社区维护者。这些区域会随每个版本发布,但不附带官方支持 SLA。
-这一页是权威列表。它的作用有两个:让你在把工作流搭在某个区域上之前,先知道自己依赖的是什么;也让贡献这些工作的人被具名记录下来。
+这一页是权威列表。你在把工作流搭在某个区域上之前,可以先在这里查清自己依赖的是什么;贡献这些工作的人也在这里具名记录。
## "社区维护"是什么意思
@@ -15,7 +15,7 @@ Multica 的大部分功能由核心团队构建和支持。有少数功能区域
**我们无法承诺什么。** 我们自己不日常使用这些平台,无法对着真实环境验证行为。需要真实平台权限才能定位的问题取决于志愿者的时间,因此没有响应时效保证。
-**区域如何退役。** 如果某个区域坏在我们没有真实权限就修不了的地方,并且几个版本都没有修复出现,我们会把它标记为废弃,而不是让它悄悄坏着。这条规则既是对你的保护,也是对维护者的保护:志愿者哪天忙了或者离开了,不欠任何人一个修复。
+**区域如何退役。** 如果某个区域坏在我们没有真实权限就修不了的地方,并且几个版本都没有修复出现,我们会把它标记为废弃,不让它悄悄坏着。这条规则既是对你的保护,也是对维护者的保护:志愿者哪天忙了或者离开了,不欠任何人一个修复。
## 功能区域
@@ -30,11 +30,11 @@ Multica 的大部分功能由核心团队构建和支持。有少数功能区域
## 在这些区域遇到问题怎么反馈
<Callout type="warning">
-请提 [GitHub 任务](https://github.com/multica-ai/multica/issues),不要直接私信或 @ 维护者本人 —— 他们同意的是成为**我们**转过去的问题的第一接口,而不是任何人都可以呼叫的客服台。
+请提 [GitHub issue](https://github.com/multica-ai/multica/issues),不要直接私信或 @ 维护者本人。他们同意的是成为**我们**转过去的问题的第一接口,而不是任何人都可以呼叫的客服台。
</Callout>
-任务表单里有一个 **Area** 字段。填上它,我们才能把反馈路由给对应的维护者,值得多点这一下。
+issue 表单里有一个 **Area** 字段。填上它,我们才能把反馈路由给对应的维护者。
## 成为维护者
-如果你贡献了一个新的集成或者其他成规模的功能区域,我们会在合入前和你聊清楚这几件事:我们承诺什么、希望你承担什么,以及上面那条退役规则。拒绝完全没问题 —— 它影响的是这个区域怎么标注,而不是这份工作能不能合入。
+如果你贡献了一个新的集成或者其他成规模的功能区域,我们会在合入前和你聊清楚这几件事:我们承诺什么、希望你承担什么,以及上面那条退役规则。拒绝完全没问题,它只影响这个区域怎么标注,不影响这份工作能不能合入。
diff --git a/apps/docs/content/docs/concepts.fr.mdx b/apps/docs/content/docs/concepts.fr.mdx
index 0bce6b5784..94b36c2c12 100644
--- a/apps/docs/content/docs/concepts.fr.mdx
+++ b/apps/docs/content/docs/concepts.fr.mdx
@@ -3,7 +3,9 @@ title: Concepts clés
description: Tous les objets clés de Multica et leurs relations, sur une seule page.
---
-![Schéma des objets clés de Multica : dans un espace de travail, une tâche déclenche un agent par assignation ou par mention, l'agent crée une exécution, l'exécution s'effectue sur un runtime et les résultats sont réécrits dans la tâche ; la Discussion et l'automatisation sont deux autres sources de déclenchement, les skills et les squads se rattachent aux agents, les projets organisent les tâches, et les notifications arrivent dans la Boîte de réception](/images/docs/concepts-core-objects.webp)
+import { ConceptMapDemo } from "@/components/demos/concept-map-demo";
+
+<ConceptMapDemo />
## Objets de base
@@ -45,7 +47,7 @@ Un groupe d'agents et de membres dirigé par un agent chef. Assignez une tâche
### Discussion
-Un moyen d'échanger qui n'est rattaché à aucune tâche — idéal pour les questions et les essais rapides. Chaque message déclenche une exécution. Voir [Discuter avec les agents](/chat).
+Un moyen d'échanger qui n'est rattaché à aucune tâche — idéal pour les questions et les essais rapides. Chaque message déclenche une exécution. Voir [Discuter avec des agents](/chat).
### Boîte de réception
@@ -61,10 +63,10 @@ Déclenche automatiquement des exécutions d'agents selon une planification ou
- Une **tâche** consigne un travail ; les tâches liées sont organisées en **projets**.
- Une assignation, une @mention, une **discussion** ou une **automatisation** déclenche un agent et produit une **exécution**.
- L'exécution s'effectue sur un **runtime**, et les résultats sont réécrits là où elle a été déclenchée.
-- Les **skills** permettent de réutiliser ce qui fonctionne d'un agent à l'autre ; les **squads** permettent à plusieurs agents de travailler ensemble.
+- Les **skills** se rattachent aux agents pour réutiliser ce qui fonctionne d'un agent à l'autre ; les **squads** permettent à plusieurs agents de travailler ensemble.
- Chaque notification destinée aux humains en cours de route arrive dans la **Boîte de réception**.
## Étapes suivantes
-- [Mettre les agents au travail](/triggering-agents) — le point d'entrée des quatre méthodes de déclenchement.
+- [Mettre les agents au travail](/triggering-agents) — choisissez comment lancer un agent selon ce que vous voulez faire.
- [Fonctionnement de Multica](/how-multica-works) — le parcours complet d'une exécution.
diff --git a/apps/docs/content/docs/concepts.ja.mdx b/apps/docs/content/docs/concepts.ja.mdx
index 2462ab789a..e02d1fc220 100644
--- a/apps/docs/content/docs/concepts.ja.mdx
+++ b/apps/docs/content/docs/concepts.ja.mdx
@@ -3,7 +3,9 @@ title: コアコンセプト
description: Multica のすべてのコアオブジェクトとその関係を、1 ページで把握できます。
---
-![Multica のコアオブジェクト関係図:ワークスペース内で、タスクが割り当てまたはメンションによってエージェントをトリガーし、エージェントが実行を作成し、実行がランタイム上で進み、結果がタスクに書き戻される。チャットとオートパイロットはさらに 2 つのトリガー源で、スキルとスクワッドはエージェントに取り付けられ、プロジェクトがタスクを整理し、通知はインボックスに届く](/images/docs/concepts-core-objects.webp)
+import { ConceptMapDemo } from "@/components/demos/concept-map-demo";
+
+<ConceptMapDemo />
## 基本オブジェクト
@@ -23,7 +25,7 @@ description: Multica のすべてのコアオブジェクトとその関係を
### エージェント
-ワークスペースに参加する AI の協働者で、名前、指示、モデル、スキル、Access、ランタイムからなる再利用可能な設定です。エージェントは常駐して動き続けるプロセスではなく、トリガーされたときだけ実行します。詳しくは[エージェント](/agents)を参照してください。
+ワークスペースに参加する AI の協働者で、名前、指示、モデル、スキル、アクセス、ランタイムからなる再利用可能な設定です。エージェントは常駐して動き続けるプロセスではなく、トリガーされたときだけ実行します。詳しくは[エージェント](/agents)を参照してください。
### スキル
@@ -59,12 +61,12 @@ description: Multica のすべてのコアオブジェクトとその関係を
- **ワークスペース**はすべての入れ物で、人間と**エージェント**がその中で協働します。
- **タスク**は 1 件の仕事を記録し、関連するタスクは**プロジェクト**で整理します。
-- 割り当て、@メンション、**チャット**、**オートパイロット**がエージェントをトリガーすると、**作業**が 1 件作られます。
-- 作業はいずれかの**ランタイム**上で完了し、結果はトリガーされた場所に書き戻されます。
-- **スキル**は成功したやり方をエージェント間で再利用させ、**スクワッド**は複数のエージェントを協働させます。
+- 割り当て、@メンション、**チャット**、**オートパイロット**がエージェントをトリガーすると、**実行**が 1 件作られます。
+- 実行はいずれかの**ランタイム**上で完了し、結果はトリガーされた場所に書き戻されます。
+- **スキル**はエージェントに取り付けて、成功したやり方をエージェント間で再利用させます。**スクワッド**は複数のエージェントを協働させます。
- 過程で人間に届く通知は、すべて**インボックス**に入ります。
## 次のステップ
-- [エージェントに仕事を任せる](/triggering-agents) — 4 つのトリガー方法の入口。
+- [エージェントに仕事を任せる](/triggering-agents) — やりたいことに合わせて起動方法を選びます。
- [Multica の仕組み](/how-multica-works) — 1 回の実行の流れ。
diff --git a/apps/docs/content/docs/concepts.ko.mdx b/apps/docs/content/docs/concepts.ko.mdx
index dda3c205b2..297168e3a3 100644
--- a/apps/docs/content/docs/concepts.ko.mdx
+++ b/apps/docs/content/docs/concepts.ko.mdx
@@ -3,7 +3,9 @@ title: 핵심 개념
description: 한 페이지에서 Multica의 핵심 객체와 서로의 관계를 살펴봅니다.
---
-![Multica 핵심 객체 관계도: 워크스페이스 안에서 태스크를 할당하거나 에이전트를 멘션하면 에이전트가 실행을 만들고, 실행은 런타임에서 진행된 뒤 결과를 태스크에 다시 기록합니다. 대화와 오토파일럿도 에이전트를 실행할 수 있으며, 스킬과 스쿼드는 에이전트에 연결되고, 프로젝트는 태스크를 정리하며, 알림은 인박스로 전달됩니다.](/images/docs/concepts-core-objects.webp)
+import { ConceptMapDemo } from "@/components/demos/concept-map-demo";
+
+<ConceptMapDemo />
## 기본 객체
@@ -23,7 +25,7 @@ description: 한 페이지에서 Multica의 핵심 객체와 서로의 관계를
### 에이전트
-워크스페이스에서 함께 일하는 AI 협업자입니다. 이름, 지침, 모델, 스킬, Access, 런타임으로 이루어진 재사용 가능한 설정이며, 계속 실행되는 프로세스가 아니라 트리거될 때만 동작합니다. 자세한 내용은 [에이전트](/agents)를 참고하세요.
+워크스페이스에서 함께 일하는 AI 협업자입니다. 이름, 지침, 모델, 스킬, 접근 권한, 런타임으로 이루어진 재사용 가능한 설정이며, 계속 실행되는 프로세스가 아니라 트리거될 때만 동작합니다. 자세한 내용은 [에이전트](/agents)를 참고하세요.
### 스킬
@@ -43,7 +45,7 @@ description: 한 페이지에서 Multica의 핵심 객체와 서로의 관계를
리더 에이전트 한 명이 이끄는 에이전트와 멤버의 그룹입니다. 태스크를 스쿼드에 할당하면 리더가 작업을 조율합니다. 자세한 내용은 [스쿼드](/squads)를 참고하세요.
-### 대화
+### 채팅
태스크에 연결하지 않고 대화하는 방식으로, 질문이나 간단한 시도에 적합합니다. 메시지를 보낼 때마다 한 번의 실행이 트리거됩니다. 자세한 내용은 [에이전트와 대화](/chat)를 참고하세요.
@@ -59,12 +61,12 @@ description: 한 페이지에서 Multica의 핵심 객체와 서로의 관계를
- **워크스페이스**는 모든 객체를 담는 공간이며, 사람과 **에이전트**가 그 안에서 협업합니다.
- **태스크**는 해야 할 일을 기록하고, 관련 태스크는 **프로젝트**로 정리합니다.
-- 태스크 할당, @멘션, **대화**, **오토파일럿**으로 에이전트를 트리거하면 **실행**이 하나 만들어집니다.
+- 태스크 할당, @멘션, **채팅**, **오토파일럿**으로 에이전트를 트리거하면 **실행**이 하나 만들어집니다.
- 실행은 **런타임**에서 진행되고, 결과는 실행을 트리거한 곳에 다시 기록됩니다.
-- **스킬**은 검증된 작업 방식을 여러 에이전트에서 재사용하게 하고, **스쿼드**는 여러 에이전트가 함께 일하게 합니다.
+- **스킬**은 에이전트에 연결되어 검증된 작업 방식을 여러 에이전트에서 재사용하게 하고, **스쿼드**는 여러 에이전트가 함께 일하게 합니다.
- 이 과정에서 사람에게 보내는 모든 알림은 **인박스**에 들어갑니다.
## 다음 단계
-- [에이전트에게 작업 맡기기](/triggering-agents) — 네 가지 트리거 방식의 시작점입니다.
+- [에이전트에게 작업 맡기기](/triggering-agents) — 하려는 일에 맞는 시작 방법을 고릅니다.
- [Multica의 작동 방식](/how-multica-works) — 한 번의 실행이 진행되는 전체 과정입니다.
diff --git a/apps/docs/content/docs/concepts.mdx b/apps/docs/content/docs/concepts.mdx
index 131c97d501..f372233934 100644
--- a/apps/docs/content/docs/concepts.mdx
+++ b/apps/docs/content/docs/concepts.mdx
@@ -3,7 +3,9 @@ title: Core concepts
description: All of Multica's core objects and how they relate, on one page.
---
-![Multica core object diagram: inside a workspace, an issue triggers an agent via assignment or mention, the agent creates a run, the run executes on a runtime, and results are written back to the issue; chat and Autopilot are two more trigger sources, skills and squads attach to agents, projects organize issues, and notifications go to the inbox](/images/docs/concepts-core-objects.webp)
+import { ConceptMapDemo } from "@/components/demos/concept-map-demo";
+
+<ConceptMapDemo />
## Basic objects
@@ -61,10 +63,10 @@ Triggers agent runs automatically on a schedule or from external events; you can
- An **issue** records a piece of work; related issues are organized with **projects**.
- Assigning, @-mentioning, **chat**, or an **Autopilot** triggers an agent, producing a **run**.
- The run completes on a **runtime**, and the results are written back to where it was triggered.
-- **Skills** let what works be reused across agents; **squads** let multiple agents work together.
+- **Skills** attach to agents, so what works is reused across them; **squads** let multiple agents work together.
- Every notification for humans along the way goes to the **inbox**.
## Next steps
-- [Put agents to work](/triggering-agents) — the entry point for the four trigger methods.
+- [Put agents to work](/triggering-agents) — pick a way to start an agent based on what you need.
- [How Multica works](/how-multica-works) — the full path of a run.
diff --git a/apps/docs/content/docs/concepts.zh.mdx b/apps/docs/content/docs/concepts.zh.mdx
index 4cecb639c7..40195239e8 100644
--- a/apps/docs/content/docs/concepts.zh.mdx
+++ b/apps/docs/content/docs/concepts.zh.mdx
@@ -3,7 +3,9 @@ title: 核心概念
description: 一页认识 Multica 的全部核心对象,以及它们之间的关系。
---
-![Multica 核心对象关系图:工作区内,任务经分配或提及触发智能体,智能体创建运行,运行在运行时上执行,结果写回任务;对话和自动化是另两个触发源,skill 和小队挂载于智能体,项目组织任务,通知进入收件箱](/images/docs/concepts-core-objects.webp)
+import { ConceptMapDemo } from "@/components/demos/concept-map-demo";
+
+<ConceptMapDemo />
## 基础对象
@@ -13,7 +15,7 @@ description: 一页认识 Multica 的全部核心对象,以及它们之间的
### 任务
-一项要完成的工作,以及围绕它积累的描述、讨论、状态和历史。任务是 Multica 中日常工作的基本单位,负责人可以是成员、智能体或小队。详见 [任务](/issues)。
+一项要完成的工作,以及围绕它积累的描述、讨论、状态和历史。任务是 Multica 中日常工作的基本单位,负责人可以是成员、智能体或小队。详见[任务](/issues)。
### 项目
@@ -61,10 +63,10 @@ description: 一页认识 Multica 的全部核心对象,以及它们之间的
- **任务**记录一件要做的工作;相关的任务用**项目**组织。
- 分配、@提及、**对话**或**自动化**触发智能体时,产生一条**运行**。
- 运行在某个**运行时**上完成,结果写回触发它的地方。
-- **Skill** 让成功经验跨智能体复用;**小队**让多个智能体协同。
+- **Skill** 挂载给智能体,让成功经验跨智能体复用;**小队**让多个智能体协同。
- 所有过程中给人的通知,都进**收件箱**。
## 接下来
-- [让智能体开始工作](/triggering-agents) — 四种触发方式的入口。
+- [让智能体开始工作](/triggering-agents) — 按要做的事选择触发方式。
- [Multica 的工作方式](/how-multica-works) — 一次执行的完整链路。
diff --git a/apps/docs/content/docs/daemon-runtimes.fr.mdx b/apps/docs/content/docs/daemon-runtimes.fr.mdx
index 453106e09e..ec96d6bccf 100644
--- a/apps/docs/content/docs/daemon-runtimes.fr.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.fr.mdx
@@ -4,50 +4,17 @@ description: Comment Multica connecte les ordinateurs, détecte les outils de co
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RuntimeOfflineDemo } from "@/components/demos/runtime-offline-demo";
Multica enregistre et coordonne le travail ; ce sont les ordinateurs connectés qui l'exécutent. Le **daemon** d'un ordinateur prend en charge les exécutions et invoque les outils de codage IA installés sur cette machine.
-## Runtime distant Qoder Cloud Agents
-
-Qoder Cloud Agents exécute les tickets assignés dans des sessions QCA distantes. Le serveur Multica supervise un pont qui utilise le protocole de tâches existant du daemon ; aucun daemon local n'est nécessaire pour ce runtime.
-
-### Avant de commencer
-
-- Vous devez être administrateur de l'espace de travail. Chaque espace de travail a une seule connexion Qoder.
-- Dans Qoder, créez un jeton d'accès personnel (PAT), au moins un environnement et les agents QCA à utiliser. Les modèles, outils et skills se configurent sur l'agent QCA dans Qoder, pas dans Multica.
-- Les installations auto-hébergées doivent définir `MULTICA_VCS_SECRET_KEY` sur le serveur : une clé de 32 octets encodée en base64, identique d'un redémarrage à l'autre. Sans elle, Qoder Cloud Agents n'apparaît pas dans le menu **Ajouter**.
-
-### Connecter Qoder
-
-1. Sur la page **Runtimes**, cliquez sur **Ajouter** et choisissez **Qoder Cloud Agents** sous **Services cloud**.
-2. Sous **Région**, choisissez le site qui a émis votre PAT : **International (qoder.com)** ou **Chine (qoder.com.cn)**. Un PAT ne fonctionne que dans sa propre région ; s'il est refusé, utilisez le bouton qui réessaie sur l'autre site.
-3. Collez le PAT dans **Jeton d'accès personnel**. Une fois vérifié, la liste **Environnement** est chargée depuis Qoder. Un environnement unique est sélectionné automatiquement ; sinon, choisissez-en un.
-4. Facultatif : ouvrez **Autorisation GitHub** et ajoutez l'URL et un jeton pour chaque dépôt que les agents peuvent cloner. Les agents ne peuvent cloner que les dépôts autorisés ici.
-5. Facultatif : ouvrez **Exécution** pour régler le nombre d'exécutions simultanées (3 par défaut, 10 au maximum) et le délai d'expiration (60 minutes par défaut, de 5 à 240).
-6. Cliquez sur **Connecter**. Qoder Cloud Agents apparaît dans la section cloud de la page Runtimes et passe en ligne en quelques secondes.
-
-### Ajouter un agent
-
-Ouvrez Qoder Cloud Agents depuis la page Runtimes et cliquez sur **Créer un agent avec**, ou créez un agent comme d'habitude en choisissant le runtime Qoder. Dans le formulaire de l'agent, sélectionnez l'agent distant sous **Agent QCA**. Pour un agent existant, modifiez l'agent QCA ou son dépôt par défaut dans l'onglet **Routage**. Plusieurs agents Multica peuvent partager une connexion, chacun lié à un agent QCA différent.
-
-Les identifiants de connexion sont chiffrés et partagés dans l'espace de travail. Les administrateurs gèrent la connexion ; les membres peuvent sélectionner les agents QCA accessibles. Les projets choisissent le dépôt et la branche de départ ; le jeton du dépôt est transmis à QCA à la création d'une session de code. Les PAT ne sont jamais renvoyés au navigateur après l'enregistrement.
-
-Sur la page Qoder Cloud Agents, les administrateurs peuvent modifier la connexion et les dépôts, **Mettre en pause** pour ne plus envoyer de nouvelles tâches en conservant identifiants et agents, ou **Déconnecter** pour supprimer les jetons enregistrés, retirer le runtime et délier ses agents.
-
-### Fonctionnement des exécutions
-
-Au-delà de la limite de simultanéité, les exécutions attendent dans la file. Une relance sur le même ticket reprend la session Qoder précédente de l'agent si elle est inactive. Un agent peut définir un dépôt par défaut, utilisé quand le projet du ticket n'en a pas. L'agent est invité à pousser une branche nommée d'après l'identifiant du ticket et à préfixer le titre de la pull request avec cet identifiant, afin que la pull request soit liée au ticket.
-
-Cette première version prend en charge l'exécution des tickets, le suivi de progression, l'annulation et la reprise à partir d'un journal d'exécution persistant. Le chat interactif, les répertoires locaux, les pièces jointes et la création d'agents QCA distants depuis Multica ne sont pas pris en charge. La page Runtimes sépare les runtimes distants des ordinateurs connectés.
-
-Pour le déploiement du pont autonome et ses limites opérationnelles, consultez le [README du runtime Qoder](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md).
-
## Daemon et runtime
- Le **daemon** est le processus d'arrière-plan de Multica qui tourne sur un ordinateur. Il se connecte au serveur, détecte les outils locaux, prend en charge les exécutions et renvoie les résultats.
- Un **runtime** représente un environnement d'exécution concret mis à la disposition d'un espace de travail. Il correspond à un ordinateur associé à un outil de codage IA — ou à un profil de runtime personnalisé — sur cet ordinateur.
-Par exemple, un ordinateur sur lequel sont installés Claude Code et Codex est connecté à deux espaces de travail. Le daemon enregistre un runtime Claude Code et un runtime Codex pour chaque espace de travail. Redémarrer le daemon met à jour les enregistrements existants ; il ne crée pas de nouveaux runtimes à chaque fois pour la même combinaison.
+Par exemple, si un ordinateur sur lequel sont installés Claude Code et Codex est connecté à deux espaces de travail, le daemon enregistre un runtime Claude Code et un runtime Codex pour chaque espace de travail. Redémarrer le daemon met à jour les enregistrements existants ; il ne crée pas de nouveaux runtimes à chaque fois pour la même combinaison.
## Lieu d'exécution et périmètre des données
@@ -56,12 +23,18 @@ Les outils de codage IA qu'invoque un runtime local, leurs propres identifiants
Pour permettre à l'équipe de collaborer, le serveur stocke les tâches, les commentaires, la configuration des agents, le contexte des exécutions, les enregistrements d'exécution et les résultats que les agents renvoient. Ce contenu peut inclure des extraits de code ou d'autres éléments de contexte du projet qu'un agent a choisi de lire et d'inclure dans ses réponses.
<Callout type="warning">
-Les variables d'environnement personnalisées d'un agent sont stockées côté serveur et envoyées au runtime au moment de l'exécution. Ne comprenez pas « exécution locale » comme « chaque secret n'existe que sur cette machine » : les variables d'environnement personnalisées et la configuration MCP résident sur le serveur, et leur affichage est limité par les règles applicables aux valeurs sensibles.
+« Exécution locale » ne signifie pas que chaque secret n'existe que sur cette machine. Les variables d'environnement personnalisées d'un agent et la configuration MCP sont stockées sur le serveur, et leur affichage est limité par les règles applicables aux valeurs sensibles ; les variables d'environnement personnalisées sont envoyées au runtime au moment de l'exécution.
</Callout>
## Démarrer le daemon
-Avec Multica Desktop, l'application démarre le daemon automatiquement — aucune commande supplémentaire n'est nécessaire.
+<Tabs items={["Desktop", "CLI"]}>
+<Tab value="Desktop">
+
+Multica Desktop démarre le daemon automatiquement ; aucune commande supplémentaire n'est nécessaire.
+
+</Tab>
+<Tab value="CLI">
Sur le web, sur un ordinateur distant ou dans un environnement sans interface graphique, [installez d'abord le CLI Multica](/cli), puis exécutez :
@@ -69,6 +42,9 @@ Sur le web, sur un ordinateur distant ou dans un environnement sans interface gr
multica daemon start
```
+</Tab>
+</Tabs>
+
Par défaut, le daemon s'exécute en arrière-plan. Commandes courantes :
| Commande | Rôle |
@@ -81,40 +57,128 @@ Par défaut, le daemon s'exécute en arrière-plan. Commandes courantes :
Pour placer les répertoires de travail des exécutions sur un autre disque, enregistrez une racine pour le profil courant avec `multica config set workspaces_root <path>`, ou passez `--workspaces-root <path>` à `daemon start` ou `daemon restart`. L'option prime sur `MULTICA_WORKSPACES_ROOT`, qui prime elle-même sur la configuration du profil. Les répertoires d'exécution existants ne sont pas déplacés lorsque la racine change.
-Au démarrage, le daemon détecte les outils de codage IA pris en charge présents dans le `PATH` et enregistre des runtimes pour les espaces de travail auxquels vous êtes autorisé à vous connecter. Si vous venez d'installer un outil ou de vous y connecter, redémarrez le daemon pour qu'il le détecte à nouveau.
+Au démarrage, le daemon détecte les outils de codage IA pris en charge présents dans le `PATH` et enregistre des runtimes pour les espaces de travail auxquels vous êtes autorisé à vous connecter. Si vous venez d'installer un outil ou de vous y connecter, redémarrez le daemon pour qu'il le détecte.
Pour démarrer, le daemon a besoin de détecter au moins un outil de codage IA intégré pris en charge. Les méthodes d'installation et les noms des exécutables figurent dans [Installer les outils de codage IA](/install-agent-runtime).
-## Distribution et statut en ligne
+### Démarrage à l'ouverture de session [#autostart]
-Une fois enregistré, un runtime maintient une connexion persistante. Lorsqu'une nouvelle exécution entre dans la file d'attente, le serveur prévient le daemon concerné ; le daemon interroge aussi le serveur périodiquement, en filet de sécurité après une interruption de connexion. Ainsi, lorsqu'un runtime est en ligne et dispose de capacité libre, les exécutions démarrent généralement immédiatement.
+Un daemon lancé depuis la CLI ne revient pas de lui-même après un redémarrage. Pour qu'il démarre automatiquement, enregistrez le profil courant :
-Le daemon envoie un signal de présence (heartbeat) toutes les 15 secondes. Le serveur combine ces signaux et l'état de la connexion pour déterminer si un runtime est en ligne ; lorsqu'un daemon s'arrête de manière inattendue, le runtime apparaît généralement hors ligne en 3 minutes environ au plus tard.
+```bash
+multica daemon autostart enable
+multica daemon autostart status
+multica daemon autostart disable
+```
-![Détails du runtime pour un ordinateur en ligne : le même daemon a enregistré 7 runtimes, une ligne par outil de codage IA détecté, chacune indiquant le statut en ligne et la version du CLI](/images/docs/runtime-machine-detail.webp)
+La commande enregistrée est `multica daemon start --foreground` pour ce profil, lancée par le système à l'ouverture de session : une valeur de registre Run pour l'utilisateur courant sous Windows, un LaunchAgent dans `~/Library/LaunchAgents` sous macOS, et une unité utilisateur systemd sous Linux, ou une entrée XDG autostart quand aucune session utilisateur systemd n'est disponible. Pour un profil nommé, ajoutez `--profile <name>` ; chaque profil est enregistré séparément.
+
+- Seul `enable` crée l'enregistrement. `multica daemon start` ne s'enregistre jamais de lui-même : il affiche une ligne d'indication quand rien n'est enregistré et, si un enregistrement créé par Multica existe, il y met à jour le chemin de l'exécutable. Mettre à jour ou déplacer la CLI ne demande donc pas de relancer `enable`.
+- Sous macOS et Linux, la session ne reçoit que le `PATH` capturé dans votre shell au moment de `enable`. Les autres variables exportées (clés d'API, `HTTPS_PROXY`, etc.) ne suivent pas. Enregistrez les réglages du daemon avec `multica config set` et placez les autres variables dans votre environnement utilisateur.
+- Une unité utilisateur systemd démarre à l'ouverture de session. Pour démarrer au boot sans ouvrir de session, exécutez `loginctl enable-linger <utilisateur>` comme l'indique la sortie de `enable`.
+- `multica daemon stop` arrête le daemon en cours mais conserve l'enregistrement.
+- Si un fichier que Multica n'a pas créé occupe déjà cet emplacement (votre propre unité systemd, par exemple), `enable` et `disable` refusent de le modifier.
+- Un daemon lancé par Desktop est géré par Desktop ; `daemon start` n'affiche pas d'indication et ne met pas à jour d'enregistrement pour lui.
+
+## Distribution et statut en ligne
+
+Une fois enregistré, un runtime maintient une connexion persistante. Lorsqu'une nouvelle exécution entre dans la file d'attente, le serveur prévient le daemon concerné ; le daemon interroge aussi le serveur périodiquement pour ne pas manquer une notification si la connexion tombe. Lorsqu'un runtime est en ligne et dispose de capacité libre, les exécutions démarrent généralement immédiatement.
+
+Le daemon envoie un signal de présence (heartbeat) toutes les 15 secondes. Le serveur combine ces signaux et l'état de la connexion pour déterminer si un runtime est en ligne ; lorsqu'un daemon s'arrête de manière inattendue, le runtime est marqué hors ligne en 3 minutes environ au plus tard. Pendant les 5 premières minutes après la perte de contact, la page **Runtimes** l'affiche comme « Perdu récemment », puis comme « Hors ligne ».
Lorsqu'un runtime est hors ligne :
-- Les exécutions déjà en file d'attente attendent que le runtime revienne. Elles n'échouent qu'une fois que le runtime a cessé d'envoyer des signaux de présence pendant plus longtemps que le délai de grâce de reconnexion **et** que l'exécution elle-même est en file d'attente depuis aussi longtemps ; ainsi, un runtime simplement occupé conserve sa file, et le travail assigné à un runtime déjà hors ligne bénéficie tout de même d'un délai de grâce complet.
-- Les exécutions en cours échouent ; les exécutions de tâche ou de discussion éligibles peuvent être relancées automatiquement.
+- Les exécutions déjà en file d'attente attendent que le runtime revienne ; elles ne passent pas sur un autre ordinateur. Elles n'échouent qu'une fois que le runtime a cessé d'envoyer des signaux de présence pendant plus longtemps que le délai de grâce de reconnexion **et** que l'exécution elle-même est en file d'attente depuis aussi longtemps. Un runtime simplement occupé conserve sa file, et le travail assigné à un runtime déjà hors ligne bénéficie tout de même d'un délai de grâce complet.
+- Les exécutions en cours n'échouent pas tout de suite. Elles échouent avec `runtime_offline` seulement lorsque le signal de présence du runtime manque depuis plus longtemps que le délai de grâce de reconnexion (`MULTICA_RUNTIME_RECONNECT_GRACE`, 3 heures par défaut) ; les exécutions de tâche ou de discussion éligibles peuvent être relancées automatiquement.
- Au redémarrage, le daemon réenregistre ses runtimes et récupère les exécutions qui ne se sont pas terminées proprement la dernière fois.
- Un runtime hors ligne depuis plus de 7 jours et auquel aucun agent n'est lié (y compris les agents archivés) est supprimé automatiquement.
+Dans la démo ci-dessous, une exécution assignée pendant que l'ordinateur est hors ligne attend dans la file et n'est prise en charge qu'une fois l'ordinateur de nouveau en ligne.
+
+<RuntimeOfflineDemo />
+
Les états détaillés et les règles de relance figurent dans [Exécutions](/tasks).
## Limites de parallélisme
Par défaut, un daemon traite au maximum 20 exécutions simultanées, et chaque agent au maximum 6. Le parallélisme effectif correspond à la plus petite de ces deux valeurs.
-Une fois une limite atteinte, les nouvelles exécutions restent en file d'attente. Vous pouvez ajuster le parallélisme d'un agent donné dans ses paramètres, et le plafond global de la machine via `MULTICA_DAEMON_MAX_CONCURRENT_TASKS`. Les exécutions en parallèle se disputent en même temps la capacité de la machine, le quota du compte de l'outil et le même répertoire de travail.
+Une fois une limite atteinte, les nouvelles exécutions restent en file d'attente. Le parallélisme d'un agent se règle dans ses paramètres, le plafond global de la machine avec `MULTICA_DAEMON_MAX_CONCURRENT_TASKS`. Les exécutions en parallèle se disputent en même temps la capacité de la machine, le quota du compte de l'outil et le même répertoire de travail.
+
+La consommation de tokens, les coûts et les échecs des exécutions sont regroupés par espace de travail sur la page [Statistiques](/analytics) ; `multica runtime usage <runtime-id>` affiche la consommation de tokens d'un seul runtime.
+
+## Configuration MCP locale [#local-mcp]
+
+Quand aucune configuration MCP n'est enregistrée sur un agent, Multica ne transmet aucun réglage MCP et l'outil lit comme d'habitude sa propre configuration sur cette machine.
+
+Dès qu'un agent a une configuration MCP (même vide), Multica génère une configuration dédiée pour chaque exécution et la remet à l'outil ; Claude Code, par exemple, ne charge alors que ce fichier, en mode strict. Pour que les serveurs déjà configurés sur la machine continuent de fonctionner, le daemon lit la configuration MCP de niveau utilisateur de l'outil sur la machine du runtime et la fusionne avec celle de l'agent. Pour deux serveurs du même nom, la première source dans cet ordre l'emporte :
+
+1. les serveurs gérés par Multica ou attribués depuis la bibliothèque MCP de l'espace de travail dans l'onglet **MCP** de l'agent ;
+2. le fichier de configuration de niveau utilisateur de l'outil ;
+3. Claude Code uniquement : les serveurs MCP fournis par les plugins Claude Code activés. Les plugins viennent de `enabledPlugins` dans `~/.claude/settings.json` ; le daemon lit le `.mcp.json` de chaque plugin et les fichiers MCP déclarés dans son manifeste.
+
+| Outil | Configuration de niveau utilisateur lue |
+|---|---|
+| Claude Code | `mcpServers` dans `~/.claude.json`, plus les serveurs MCP des plugins activés |
+| Codex | `mcp_servers` dans `$CODEX_HOME/config.toml` (par défaut `~/.codex/config.toml`) |
+| Cursor Agent | `mcpServers` dans `~/.cursor/mcp.json` |
+| OpenCode | `mcp` dans `$XDG_CONFIG_HOME/opencode/opencode.json` (par défaut `~/.config/opencode/opencode.json`) |
+| OpenClaw | `mcp.servers` dans `$CLAWDBOT_CONFIG_PATH`, ou dans `$OPENCLAW_STATE_DIR/openclaw.json` (par défaut `~/.openclaw/openclaw.json`) |
+| CodeArts | `mcp` dans `~/.codeartsdoer/codearts_cli.json` ou `codearts_cli.jsonc` |
-## Runtimes privés et publics
+CodeBuddy, Kimi CLI et Pi chargent eux-mêmes leur configuration de niveau utilisateur au démarrage et la combinent avec ce que Multica envoie ; le daemon ne fusionne donc pas à l'avance pour eux, sinon le même serveur démarrerait deux fois. En cas de nom en double, CodeBuddy garde l'entrée de Multica. Les autres outils absents du tableau ne reçoivent que la configuration de l'agent.
-Un runtime local est **privé** par défaut : seul le propriétaire du runtime peut y créer des agents. Les propriétaires et administrateurs de l'espace de travail ne font pas exception — le runtime est l'ordinateur de quelqu'un d'autre, et y exécuter un agent consomme sa machine et ses identifiants d'outils.
+La fusion a lieu sur la machine du runtime : les commandes, URL, en-têtes et variables d'environnement des serveurs locaux ne sont jamais envoyés. La liste « Hérité du runtime » de l'onglet **MCP** de l'agent n'affiche que le nom, le transport, la source et l'état activé de chaque serveur ; un serveur masqué par un serveur de l'agent du même nom porte la mention « Remplacé par Multica ». Si un fichier de configuration local ne peut pas être analysé, le daemon consigne un avertissement et l'exécution n'utilise que la configuration de l'agent.
-Seul le propriétaire du runtime peut le rendre **public** — les administrateurs de l'espace de travail peuvent renommer ou supprimer un runtime, mais le partager relève de la décision du propriétaire. Les autres membres de l'espace de travail peuvent alors eux aussi sélectionner ce runtime ; cela ne partage pas les identifiants de connexion de l'outil de codage IA sous-jacent — cela permet seulement aux membres d'acheminer les exécutions de leurs agents vers cet ordinateur.
+## Nettoyage et conservation [#cleanup]
-Lorsque le propriétaire rend un runtime public à nouveau **privé**, Multica affiche d'abord les agents et les exécutions actives concernés, y compris les conversations de création d'agents avec Agent Builder. La confirmation dissocie les agents de ces autres membres, annule leurs exécutions en file d'attente, distribuées, en cours, en attente d'un répertoire local ou différées avec le motif `runtime_access_revoked`, et met en pause les automatisations actives assignées aux agents dissociés. Les agents et exécutions du propriétaire ne sont pas affectés. Si le plan change, une nouvelle confirmation est nécessaire ; des modifications simultanées de la discussion peuvent nécessiter de réessayer. Pour reprendre le travail, associez l'agent à un runtime accessible, puis reprenez explicitement ses automatisations en pause.
+Le daemon fait un premier nettoyage environ 30 secondes après son démarrage, puis toutes les 2 heures. Les répertoires utilisés par une exécution en cours ne sont jamais nettoyés. `multica daemon disk-usage` affiche l'occupation par espace de travail ou par exécution. Les durées ci-dessous sont les valeurs par défaut ; les variables `MULTICA_GC_*` correspondantes figurent dans [Variables d'environnement](/environment-variables#gc).
+
+### Répertoires des exécutions
+
+Chaque exécution a un répertoire sous la racine des espaces de travail (par défaut `~/multica_workspaces`) contenant le code récupéré, les sorties et les journaux ; les exécutions suivantes sur la même tâche le réutilisent. Le répertoire entier est supprimé :
+
+| Origine de l'exécution | Moment de la suppression |
+|---|---|
+| Tâche | Quand la tâche est dans un statut de catégorie `done` ou `closed` et n'a pas été mise à jour depuis 24 heures |
+| Chat | 24 heures après l'archivage de la session ; au nettoyage suivant si la session est supprimée. Conservé tant que la session n'est pas archivée |
+| Automatisation (Exécution seule), création rapide | Au nettoyage suivant la fin de l'exécution |
+| Sans propriétaire identifié (métadonnées absentes, ou enregistrement disparu côté serveur) | Après 72 heures sans modification du répertoire |
+
+Tant que la tâche reste ouverte, 12 heures après la fin d'une exécution, seul le contenu régénérable est supprimé : les répertoires `node_modules`, `.next` et `.turbo`, ainsi que le cache que le daemon prépare pour Codex. Le reste est conservé. Un daemon connecté à Multica Cloud supprime aussi le répertoire entier 14 jours après la fin de l'exécution, que la tâche soit fermée ou non ; les daemons auto-hébergés ne le font pas par défaut.
+
+Une exécution sur le répertoire local d'un projet travaille dans votre propre répertoire, auquel le daemon ne touche jamais. Le répertoire de suivi que Multica crée pour cette exécution (journaux, etc.) est conservé lui aussi ; seuls les caches régénérables qu'il contient sont nettoyés.
+
+### Cache de dépôts partagé
+
+Le daemon garde un cache de dépôt nu par dépôt de l'espace de travail, sous `.repos/<id-espace-de-travail>/` dans la racine des espaces de travail. Les exécutions du même espace de travail sur cette machine le partagent : chaque checkout crée un git worktree à partir du cache et ne récupère que les nouveaux commits, sans recloner. Les exécutions Codex sous Linux et Windows font exception et reçoivent un clone autonome avec `.git` dans le répertoire de travail, car le bac à sable workspace-write de Codex laisse en lecture seule les métadonnées Git situées hors du répertoire de travail.
+
+Un cache n'est supprimé que si les trois conditions sont réunies : aucun espace de travail ni projet ne référence plus le dépôt, aucun worktree ne subsiste, et aucune exécution n'en a fait de checkout depuis 30 jours. Il est recloné au besoin. Après avoir supprimé les branches d'agent périmées, le daemon exécute `git reflog expire --expire=30.days --all` et `git gc --prune=30.days` sur le cache quand aucune exécution n'est en cours.
+
+### Sessions, mémoire et répertoires temporaires
+
+| Donnée | Emplacement | Conservation |
+|---|---|---|
+| Historiques de session Codex (un par agent et par tâche) | `multica-sessions/` dans le répertoire Codex (par défaut `~/.codex`) | Supprimés après 14 jours sans usage ; les exécutions suivantes sur cette tâche ne peuvent plus reprendre l'ancienne session Codex |
+| Historiques de session Hermes | `hermes-sessions/` dans le répertoire de configuration Multica (par défaut `~/.multica` ; `~/.multica/profiles/<name>` pour un profil nommé) | Supprimés après 14 jours sans usage |
+| Mémoire Hermes (une par agent) | `hermes-state/` dans le même répertoire | Supprimée après 90 jours sans usage |
+| Répertoire temporaire privé de chaque exécution (`TMPDIR`) | `multica-task-*` dans le répertoire temporaire du système | Supprimé à la fin de l'exécution ; si le daemon a été tué, un nettoyage ultérieur s'en charge |
+
+### Mémoire native et sous-agents de Codex [#codex-memory]
+
+Dans les exécutions Codex gérées par le daemon, la mémoire native de Codex est désactivée par défaut, pour que les souvenirs de cette machine ou d'une exécution précédente ne passent pas dans un autre espace de travail. Le réglage est écrit uniquement dans le `CODEX_HOME/config.toml` propre à l'exécution (`features.memories`, `memories.generate_memories` et `memories.use_memories` à `false`) ; votre `~/.codex/config.toml` n'est pas modifié. Pour garder la mémoire native, définissez `MULTICA_CODEX_MEMORY=1` dans l'environnement du daemon.
+
+Les sous-agents natifs de Codex sont eux aussi désactivés par défaut : Multica considère l'exécution terminée quand le fil parent se termine, et les résultats des sous-agents encore actifs sont perdus. Si vous acceptez ce risque, définissez `MULTICA_CODEX_MULTI_AGENT=1`.
+
+## Partage des runtimes [#runtimes-privés-et-publics]
+
+Un runtime local est **privé** par défaut : seul le propriétaire du runtime peut y créer des agents. Les propriétaires et administrateurs de l'espace de travail ne font pas exception : le runtime est l'ordinateur de quelqu'un d'autre, et y exécuter un agent utilise sa machine et ses identifiants d'outils.
+
+Seul le propriétaire peut le rendre **public**. Les administrateurs de l'espace de travail peuvent renommer ou supprimer un runtime, mais le partager relève de la décision du propriétaire. Une fois le runtime public, les autres membres peuvent le sélectionner et acheminer les exécutions de leurs agents vers cet ordinateur ; les identifiants de connexion de l'outil de codage IA sous-jacent ne sont pas partagés.
+
+Pour le partager seulement avec certaines personnes, ouvrez la page de détail du runtime, choisissez **Membres**, sélectionnez un ou plusieurs membres de l'espace de travail, puis cliquez sur **Enregistrer**. Ces membres peuvent sélectionner le runtime et y créer des agents. Seul le propriétaire peut modifier la liste, et y figurer ne donne pas le droit de renommer, supprimer ou administrer le runtime.
+
+Lorsque le propriétaire retire des membres, restreint un runtime public à des membres spécifiques ou le rend à nouveau **privé**, Multica affiche d'abord les agents et les exécutions actives concernés, y compris les conversations de création d'agents avec Agent Builder. La confirmation dissocie les agents de ces autres membres, annule leurs exécutions en file d'attente, distribuées, en cours, en attente d'un répertoire local ou différées avec le motif `runtime_access_revoked`, et met en pause les automatisations actives assignées aux agents dissociés. Les agents et exécutions du propriétaire et des membres qui gardent l'accès ne sont pas affectés. Si le plan change, une nouvelle confirmation est nécessaire ; des modifications simultanées de la discussion peuvent nécessiter de réessayer. Pour reprendre le travail, associez l'agent à un runtime accessible, puis reprenez explicitement ses automatisations en pause.
L'annulation conserve l'historique de discussion et enregistre sur le serveur les données de restauration du brouillon et des pièces jointes. Les versions web et bureau utilisent l'interface de restauration existante ; la version mobile ne propose pas encore cette interface. Une exécution démarrée sans sortie attend l'accusé d'annulation du daemon ou la fin du délai de finalisation du serveur avant de décider si la saisie doit être restaurée. Un daemon connecté reçoit l'annulation lors de sa vérification habituelle. Si l'ordinateur est hors ligne, l'accès côté serveur est tout de même révoqué immédiatement, mais le processus local peut continuer jusqu'à sa reconnexion et à la réception de l'annulation ; le serveur ne peut pas garantir un arrêt à distance immédiat.
@@ -142,6 +206,7 @@ Le tableau liste les variables que les runtimes personnalisés peuvent utiliser
| `MULTICA_AGENT_NAME` | Nom affiché de l'agent assigné | Indicatif |
| `MULTICA_DAEMON_PORT` | Port local de santé/API du daemon utilisé par les commandes réservées aux exécutions, comme `multica repo checkout` | Indicatif |
| `MULTICA_TASK_SLOT` | Emplacement dans le pool de parallélisme global du daemon ; utile pour les ressources indexées par emplacement, comme les GPU | Indicatif |
+| `MULTICA_REPO_CHECKOUT_MODE` | Vaut `isolated` uniquement dans les exécutions Codex sous Linux et Windows, pour que `multica repo checkout` crée un clone autonome avec `.git` dans le répertoire de travail ; absente des autres exécutions | Indicatif |
| `TMPDIR` | Répertoire temporaire privé de l'exécution ; également fourni sous `TMP` et `TEMP`, sauf sous Windows, où les tâches héritent des chemins temporaires utilisateur pour le `/tmp` partagé de Git Bash ; Claude Code sous Windows utilise par défaut le répertoire temporaire de la tâche pour `CLAUDE_CODE_TMPDIR` | Indicatif |
Le serveur détermine l'auteur des requêtes effectuées avec `MULTICA_TOKEN` ; les écritures telles que les commentaires de tâche sont attribuées à l'agent assigné et à l'exécution en cours. Pour tout savoir sur le rattachement du jeton, ses permissions, l'attribution, sa durée de vie maximale de 24 heures et son nettoyage, consultez [Jetons temporaires pour les exécutions d'agents](/auth-tokens#jetons-temporaires-pour-les-exécutions-dagents).
@@ -168,14 +233,14 @@ Le champ de commande accepte un exécutable et des arguments, pas un script shel
Tout ce que vous saisissez dans le champ de commande reste directement après l'exécutable, avant les arguments ajoutés par Multica :
```text
-<your command> <your fixed arguments> <Multica's protocol arguments> <the agent's custom arguments>
+<votre commande> <vos arguments fixes> <arguments de protocole de Multica> <arguments personnalisés de l'agent>
```
-C'est ce qui permet à un wrapper à sous-commandes de fonctionner. Si votre commande est `ccms start q36`, l'outil voit d'abord `start q36` et peut sélectionner sa sous-commande avant que n'arrivent le `-p` de Multica et le reste — c'est le seul ordre qu'accepte ce type de wrapper.
+Les wrappers à sous-commandes reposent sur cet ordre. Si votre commande est `ccms start q36`, l'outil voit d'abord `start q36` et choisit sa sous-commande avant que n'arrivent le `-p` de Multica et le reste ; ce type de wrapper n'accepte aucun autre ordre.
-Auparavant, vos arguments étaient ajoutés en dernier. La plupart des commandes à options les analysent de la même façon dans les deux cas, mais pas toutes — une commande qui distingue les options globales des options de sous-commande peut être sensible à la position d'une option. Si vous avez déjà un profil avec des arguments fixes, lancez une exécution dessus après la mise à jour pour vérifier qu'il fonctionne toujours.
+Auparavant, vos arguments étaient ajoutés en dernier. La plupart des commandes à options les analysent de la même façon dans les deux cas, mais une commande qui distingue les options globales des options de sous-commande est sensible à la position d'une option. Si vous avez déjà un profil avec des arguments fixes, lancez une exécution dessus après la mise à jour pour vérifier qu'il fonctionne toujours.
-Deux autres conséquences à connaître :
+À noter aussi :
- **Les valeurs de Multica l'emportent en cas de conflit.** Si vos arguments fixes définissent une option que Multica définit aussi, la valeur de Multica arrive plus tard et prend effet. Surtout, un modèle choisi sur l'agent remplace un `--model` figé dans le profil. Pour imposer un modèle à tout le monde, laissez vide le champ du modèle des agents.
- **Les options critiques pour le protocole sont ignorées.** `-p`, `--output-format`, `--input-format`, `--permission-mode` et leurs équivalents pour les autres familles sont retirés de vos arguments fixes, car les remplacer romprait la connexion du daemon à l'outil. Les sous-commandes et les autres arguments positionnels sont toujours transmis.
@@ -194,6 +259,41 @@ multica runtime profile unset-path <profile-id>
Modifier un profil n'affecte que les exécutions prises en charge par la suite. Avant de supprimer un profil, occupez-vous des agents actifs encore liés à ses runtimes. Supprimer uniquement l'instance de runtime sur un ordinateur ne supprime pas le profil — un daemon en cours d'exécution le réenregistrera.
+## Runtime distant Qoder Cloud Agents
+
+Qoder Cloud Agents exécute les tickets assignés dans des sessions QCA distantes. Le serveur Multica supervise un pont qui utilise le protocole de tâches existant du daemon ; aucun daemon local n'est nécessaire pour ce runtime.
+
+### Avant de commencer
+
+- Vous devez être administrateur de l'espace de travail. Chaque espace de travail a une seule connexion Qoder.
+- Dans Qoder, créez un jeton d'accès personnel (PAT), au moins un environnement et les agents QCA à utiliser. Les modèles, outils et skills se configurent sur l'agent QCA dans Qoder, pas dans Multica.
+- Les installations auto-hébergées doivent définir `MULTICA_VCS_SECRET_KEY` sur le serveur : une clé de 32 octets encodée en base64, identique d'un redémarrage à l'autre. Sans elle, Qoder Cloud Agents n'apparaît pas dans le menu **Ajouter**.
+
+### Connecter Qoder
+
+1. Sur la page **Runtimes**, cliquez sur **Ajouter** et choisissez **Qoder Cloud Agents** sous **Services cloud**.
+2. Sous **Région**, choisissez le site qui a émis votre PAT : **International (qoder.com)** ou **Chine (qoder.com.cn)**. Un PAT ne fonctionne que dans sa propre région ; s'il est refusé, utilisez le bouton qui réessaie sur l'autre site.
+3. Collez le PAT dans **Jeton d'accès personnel**. Une fois vérifié, la liste **Environnement** est chargée depuis Qoder. Un environnement unique est sélectionné automatiquement ; sinon, choisissez-en un.
+4. Facultatif : ouvrez **Autorisation GitHub** et ajoutez l'URL et un jeton pour chaque dépôt que les agents peuvent cloner. Les agents ne peuvent cloner que les dépôts autorisés ici.
+5. Facultatif : ouvrez **Exécution** pour régler le nombre d'exécutions simultanées (3 par défaut, 10 au maximum) et le délai d'expiration (60 minutes par défaut, de 5 à 240).
+6. Cliquez sur **Connecter**. Qoder Cloud Agents apparaît dans la section cloud de la page Runtimes et passe en ligne en quelques secondes.
+
+### Ajouter un agent
+
+Ouvrez Qoder Cloud Agents depuis la page Runtimes et cliquez sur **Créer un agent avec**, ou créez un agent comme d'habitude en choisissant le runtime Qoder. Dans le formulaire de l'agent, sélectionnez l'agent distant sous **Agent QCA**. Pour un agent existant, modifiez l'agent QCA ou son dépôt par défaut dans l'onglet **Routage**. Plusieurs agents Multica peuvent partager une connexion, chacun lié à un agent QCA différent.
+
+Les identifiants de connexion sont chiffrés et partagés dans l'espace de travail. Les administrateurs gèrent la connexion ; les membres peuvent sélectionner les agents QCA accessibles. Les projets choisissent le dépôt et la branche de départ ; le jeton du dépôt est transmis à QCA à la création d'une session de code. Les PAT ne sont jamais renvoyés au navigateur après l'enregistrement.
+
+Sur la page Qoder Cloud Agents, les administrateurs peuvent modifier la connexion et les dépôts, **Mettre en pause** pour ne plus envoyer de nouvelles tâches en conservant identifiants et agents, ou **Déconnecter** pour supprimer les jetons enregistrés, retirer le runtime et délier ses agents.
+
+### Fonctionnement des exécutions
+
+Au-delà de la limite de simultanéité, les exécutions attendent dans la file. Une relance sur le même ticket reprend la session Qoder précédente de l'agent si elle est inactive. Un agent peut définir un dépôt par défaut, utilisé quand le projet du ticket n'en a pas. L'agent est invité à pousser une branche nommée d'après l'identifiant du ticket et à préfixer le titre de la pull request avec cet identifiant, afin que la pull request soit liée au ticket.
+
+Cette première version prend en charge l'exécution des tickets, le suivi de progression, l'annulation et la reprise à partir d'un journal d'exécution persistant. Le chat interactif, les répertoires locaux, les pièces jointes et la création d'agents QCA distants depuis Multica ne sont pas pris en charge. La page Runtimes sépare les runtimes distants des ordinateurs connectés.
+
+Pour le déploiement du pont autonome et ses limites opérationnelles, consultez le [README du runtime Qoder](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md).
+
## Dépanner un runtime hors ligne
Vérifiez dans cet ordre :
diff --git a/apps/docs/content/docs/daemon-runtimes.ja.mdx b/apps/docs/content/docs/daemon-runtimes.ja.mdx
index 24a442ece6..9d9c010e97 100644
--- a/apps/docs/content/docs/daemon-runtimes.ja.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.ja.mdx
@@ -4,49 +4,17 @@ description: Multica がどのようにコンピュータを接続し、AI コ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RuntimeOfflineDemo } from "@/components/demos/runtime-offline-demo";
Multica は作業の記録と調整を担い、接続されたコンピュータが実行を担います。コンピュータ上の**デーモン**(daemon)が実行を取得し、そのマシンにインストールされた AI コーディングツールを呼び出します。
-## Qoder Cloud Agents リモートランタイム
-
-Qoder Cloud Agents は割り当てられたタスクをリモートセッションで実行します。Multica サーバーが既存のデーモンプロトコルを使うブリッジを管理するため、ユーザーがローカルデーモンを起動する必要はありません。
-
-### 事前準備
-
-- ワークスペース管理者の権限が必要です。Qoder 接続はワークスペースごとに 1 つです。
-- Qoder で個人アクセストークン(PAT)、1 つ以上の実行環境、使用する QCA エージェントを作成します。モデル、ツール、スキルは Multica ではなく Qoder の QCA エージェントで設定します。
-- セルフホスト環境では、サーバーに `MULTICA_VCS_SECRET_KEY`(base64 エンコードされた 32 バイトの鍵。再起動後も同じ値を使用)を設定してください。未設定の場合、**追加**メニューに Qoder Cloud Agents は表示されません。
-
-### Qoder を接続する
-
-1. **ランタイム**ページで**追加**をクリックし、**クラウドサービス**の **Qoder Cloud Agents** を選びます。
-2. **リージョン**で PAT を発行したサイトを選びます:**グローバル**(qoder.com)または**中国**(qoder.com.cn)。PAT は発行元のサイトでのみ有効です。拒否された場合は、もう一方のサイトで再試行するボタンを使います。
-3. **個人アクセストークン**に PAT を貼り付けます。検証されると Qoder から**実行環境**の一覧が読み込まれます。環境が 1 つだけなら自動で選択され、複数ある場合は選択します。
-4. 任意:**GitHub authorization** を開き、エージェントがクローンするリポジトリごとに URL とトークンを追加します。エージェントはここで許可したリポジトリのみクローンできます。
-5. 任意:**実行設定**を開き、同時実行数(デフォルト 3、最大 10)と実行タイムアウト(デフォルト 60 分、5〜240 分)を設定します。
-6. **接続**をクリックします。Qoder Cloud Agents がランタイムページのクラウドの区分に表示され、数秒でオンラインになります。
-
-### エージェントを追加する
-
-ランタイムページで Qoder Cloud Agents を開き、**これでエージェントを作成**をクリックします。通常どおりエージェントを作成して Qoder ランタイムを選ぶこともできます。エージェントのフォームで **QCA エージェント**からリモートのエージェントを選びます。既存のエージェントは**ルーティング**タブで QCA エージェントやデフォルトのリポジトリを変更できます。複数の Multica エージェントが 1 つの接続を共有し、それぞれ別の QCA エージェントに紐づけられます。
-
-認証情報は暗号化され、ワークスペース内で共有されます。管理者が接続を管理し、メンバーはアクセス可能な QCA エージェントを選択できます。リポジトリと開始ブランチはプロジェクトで選び、そのリポジトリのトークンは QCA のセッション作成時に送信されます。保存した PAT がブラウザーに返されることはありません。
-
-管理者は Qoder Cloud Agents のページで接続とリポジトリを編集できます。**一時停止**すると認証情報とエージェントを残したまま新しいタスクの送信を止め、**接続を解除**すると保存済みのトークンを削除してランタイムを外し、エージェントの紐づけを解除します。
-
-### 実行の仕組み
-
-同時実行数の上限を超えたタスクはキューで待機します。同じタスクの後続の実行は、前回のセッションがアイドルであればその Qoder セッションを引き継ぎます。エージェントにはデフォルトのリポジトリを設定でき、タスクのプロジェクトにリポジトリがない場合に使われます。エージェントにはタスク ID を含むブランチ名と、タスク ID で始まる PR タイトルを使うよう指示するため、PR はタスクに自動で紐づきます。
-
-初期版はタスク実行、進捗同期、キャンセル、永続化された実行記録からの復旧に対応します。チャット、ローカルディレクトリ、添付ファイル、リモート QCA Agent の新規作成は未対応です。詳細は [README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md) を参照してください。
-
-
## デーモンとランタイムの違い
- **デーモン**は、1 台のコンピュータで動く Multica のバックグラウンドプロセスです。サーバーへの接続、ローカルツールの検出、実行の取得、結果の報告を担当します。
- **ランタイム**は、ワークスペースが利用できる 1 つの具体的な実行環境を表します。1 台のコンピュータと、そのコンピュータ上の 1 つの AI コーディングツール(またはカスタムランタイムプロファイル)の組み合わせに対応します。
-たとえば、Claude Code と Codex の両方をインストールした 1 台のコンピュータが、2 つのワークスペースに接続しているとします。デーモンはそれぞれのワークスペースに Claude Code と Codex のランタイムを登録します。デーモンを再起動すると既存のレコードが更新されるだけで、同じ組み合わせに対して新しいランタイムが増え続けることはありません。
+たとえば、Claude Code と Codex の両方をインストールした 1 台のコンピュータが 2 つのワークスペースに接続している場合、デーモンはワークスペースごとに Claude Code と Codex のランタイムを 1 つずつ登録します。デーモンを再起動すると既存のレコードが更新されるだけで、同じ組み合わせに対して新しいランタイムが増え続けることはありません。
## 実行場所とデータ境界
@@ -55,12 +23,18 @@ Qoder Cloud Agents は割り当てられたタスクをリモートセッショ
チームが協働できるように、サーバーはタスク、コメント、エージェント設定、実行のコンテキスト、実行記録、エージェントが書き戻した結果を保存します。これらには、エージェントが自ら読み取って返信に含めたコードスニペットやその他のプロジェクトコンテキストが含まれることがあります。
<Callout type="warning">
-エージェントのカスタム環境変数はサーバー側に保存され、実行時にランタイムへ送られます。「ローカル実行」を「すべてのシークレットがこのマシンにしか存在しない」と読み替えないでください。カスタム環境変数と MCP 設定はサーバー側にあり、その表示は機密値のルールによって制限されます。
+「ローカル実行」は、すべてのシークレットがこのマシンにしか存在しないという意味ではありません。エージェントのカスタム環境変数と MCP 設定はサーバー側に保存され、その表示は機密値のルールによって制限されます。カスタム環境変数は実行時にランタイムへ送られます。
</Callout>
## デーモンの起動
-Multica Desktop を使う場合、アプリがデーモンを自動的に起動するため、追加のコマンドは不要です。
+<Tabs items={["Desktop", "CLI"]}>
+<Tab value="Desktop">
+
+Multica Desktop はデーモンを自動的に起動するため、追加のコマンドは不要です。
+
+</Tab>
+<Tab value="CLI">
Web、リモートのコンピュータ、ヘッドレス環境では、先に [Multica CLI をインストール](/cli)してから実行します。
@@ -68,6 +42,9 @@ Web、リモートのコンピュータ、ヘッドレス環境では、先に [
multica daemon start
```
+</Tab>
+</Tabs>
+
デーモンはデフォルトでバックグラウンドで動きます。よく使うコマンド:
| コマンド | 役割 |
@@ -84,21 +61,42 @@ multica daemon start
デーモンは、組み込みで対応している AI コーディングツールを少なくとも 1 つ検出できないと起動しません。インストール方法と実行コマンド名は [AI コーディングツールのインストール](/install-agent-runtime)を参照してください。
-## ディスパッチとオンライン状態
+### ログイン時の自動起動 [#autostart]
+
+CLI で起動したデーモンは、コンピューターを再起動すると自動では戻りません。自動で起動させるには、現在のプロファイルを登録します。
+
+```bash
+multica daemon autostart enable
+multica daemon autostart status
+multica daemon autostart disable
+```
-登録されたランタイムは接続を維持し続けます。新しい実行がキューに入ると、サーバーは対応するデーモンに通知します。デーモン側も定期的にポーリングし、接続断のあとの補完として機能します。そのため、ランタイムがオンラインで空き容量があれば、実行は通常すぐに開始されます。
+登録されるのはそのプロファイルの `multica daemon start --foreground` で、ログイン時に OS が起動します。Windows では現在のユーザーの Run レジストリ値、macOS では `~/Library/LaunchAgents` の LaunchAgent、Linux では systemd のユーザーユニットを使い、systemd のユーザーセッションがない場合は XDG autostart のエントリを使います。名前付きプロファイルでは `--profile <name>` を付けます。プロファイルごとに個別に登録されます。
-デーモンは 15 秒ごとにハートビートを送ります。サーバーはハートビートと接続状態を組み合わせてランタイムのオンラインを判定し、デーモンが予期せず終了した場合、通常は遅くとも約 3 分以内にオフラインと表示されます。
+- 登録を作るのは `enable` だけです。`multica daemon start` が自分で登録することはなく、未登録のときに 1 行のヒントを出すだけです。Multica が作った登録がある場合は、その中の実行ファイルのパスを更新するので、CLI を更新・移動しても `enable` をやり直す必要はありません。
+- macOS と Linux では、ログインセッションに渡るのは `enable` 実行時のシェルの `PATH` だけです。シェルで export したほかの変数(API キー、`HTTPS_PROXY` など)は引き継がれません。デーモンの設定は `multica config set` で保存し、ほかの変数はユーザー環境に置いてください。
+- systemd のユーザーユニットはログイン時に起動します。ログインせずに起動時から動かすには、`enable` の出力にあるとおり `loginctl enable-linger <ユーザー名>` を実行します。
+- `multica daemon stop` は動いているデーモンを止めるだけで、登録は残ります。
+- 同じ場所に Multica が作っていないファイル(自分で書いた systemd ユニットなど)がある場合、`enable` も `disable` もそのファイルを変更しません。
+- Desktop が起動したデーモンは Desktop が管理します。`daemon start` はそのデーモンについてヒントを出したり登録を更新したりしません。
-![オンラインのコンピュータ 1 台のランタイム詳細: 同じデーモンが 7 個のランタイムを登録し、検出された AI コーディングツールごとに 1 行、いずれもオンライン状態と CLI バージョンを表示している](/images/docs/runtime-machine-detail.webp)
+## ディスパッチとオンライン状態
+
+登録されたランタイムは接続を維持し続けます。新しい実行がキューに入ると、サーバーは対応するデーモンに通知します。接続が切れて通知を取りこぼさないよう、デーモン側も定期的にポーリングします。ランタイムがオンラインで空き容量があれば、実行は通常すぐに開始されます。
+
+デーモンは 15 秒ごとにハートビートを送ります。サーバーはハートビートと接続状態を組み合わせてランタイムのオンラインを判定し、デーモンが予期せず終了した場合、遅くとも約 3 分以内にオフラインと判定されます。**ランタイム**ページでは、接続が切れてから最初の 5 分間は「最近接続が切れました」、その後は「オフライン」と表示されます。
ランタイムがオフラインのとき:
-- キュー済みの実行はランタイムの復帰を待ちます。失敗するのは、そのランタイムが再接続猶予を超えてハートビートを停止し、**かつ**実行自身も同じ時間キューで待った場合のみです。したがって単に取り込み中のランタイムは滞留分を保持し続け、すでにオフラインのランタイムに割り当てられた実行にも猶予がまるまる 1 回分残ります。
-- 進行中だった実行は失敗します。条件を満たすタスクまたはチャットの実行は自動リトライできます。
+- キュー済みの実行はランタイムの復帰を待ち、ほかのコンピュータへは移りません。失敗するのは、そのランタイムが再接続猶予を超えてハートビートを停止し、**かつ**実行自身も同じ時間キューで待った場合のみです。単に処理が詰まっているだけのランタイムは滞留分を保持し続け、すでにオフラインのランタイムに割り当てられた実行にも猶予がまるまる 1 回分あります。
+- 進行中の実行はすぐには失敗しません。ランタイムのハートビートの途絶が再接続猶予(`MULTICA_RUNTIME_RECONNECT_GRACE`、デフォルト 3 時間)を超えてから `runtime_offline` で失敗します。条件を満たすタスクまたはチャットの実行は自動リトライできます。
- デーモンが再起動すると、ランタイムを再登録し、前回正常に終了しなかった実行を回収します。
- 7 日を超えてオフラインで、(アーカイブ済みを含め)どのエージェントにも紐づいていないランタイムは、自動的にクリーンアップされます。
+下のデモでは、コンピュータがオフラインのあいだに割り当てた実行がキューで待ち続け、コンピュータがオンラインに戻ってから取得されます。
+
+<RuntimeOfflineDemo />
+
詳細な状態とリトライのルールは[実行](/tasks)を参照してください。
## 同時実行の上限
@@ -107,13 +105,80 @@ multica daemon start
上限に達すると、新しい実行はキューで待ち続けます。個々のエージェントの同時実行数はエージェント設定で、マシン全体の上限は `MULTICA_DAEMON_MAX_CONCURRENT_TASKS` で調整できます。並列実行は、マシンの性能、ツールアカウントのクォータ、同じ作業ディレクトリを同時に取り合います。
-## プライベートと公開
+実行で使われたトークン、費用、失敗はワークスペースごとに[分析](/analytics)ページにまとまっています。1 つのランタイムのトークン使用量は `multica runtime usage <runtime-id>` でも確認できます。
+
+## ローカルの MCP 設定 [#local-mcp]
+
+エージェントに MCP 設定が保存されていない場合、Multica は MCP の設定を何も渡さず、ツールはそのコンピューター上の自身の設定をいつもどおり読み込みます。
+
+エージェントに MCP 設定があると(空の設定でも)、Multica は実行ごとに専用の設定を作ってツールに渡します。たとえば Claude Code は strict モードでこの設定だけを読み込みます。マシンにすでにあるサーバーが使えなくならないよう、デーモンはランタイムのコンピューター上でツールのユーザーレベルの MCP 設定を読み、エージェントの設定と統合します。同じ名前のサーバーは、次の順で先にあるものが使われます。
+
+1. エージェントの **MCP** タブで Multica が管理しているサーバー、またはワークスペースの MCP ライブラリから割り当てたサーバー
+2. ツールのユーザーレベルの設定ファイル
+3. Claude Code のみ:有効な Claude Code プラグインに含まれる MCP サーバー。プラグインは `~/.claude/settings.json` の `enabledPlugins` から決まり、各プラグインの `.mcp.json` とマニフェストで宣言された MCP ファイルを読みます。
+
+| ツール | 読み込むユーザーレベルの設定 |
+|---|---|
+| Claude Code | `~/.claude.json` の `mcpServers` と、有効なプラグインの MCP サーバー |
+| Codex | `$CODEX_HOME/config.toml`(既定は `~/.codex/config.toml`)の `mcp_servers` |
+| Cursor Agent | `~/.cursor/mcp.json` の `mcpServers` |
+| OpenCode | `$XDG_CONFIG_HOME/opencode/opencode.json`(既定は `~/.config/opencode/opencode.json`)の `mcp` |
+| OpenClaw | `$CLAWDBOT_CONFIG_PATH`、または `$OPENCLAW_STATE_DIR/openclaw.json`(既定は `~/.openclaw/openclaw.json`)の `mcp.servers` |
+| CodeArts | `~/.codeartsdoer/codearts_cli.json` または `codearts_cli.jsonc` の `mcp` |
+
+CodeBuddy、Kimi CLI、Pi は起動時に自分でユーザーレベルの設定を読み込み、Multica が渡す設定と組み合わせます。デーモンが先に統合すると同じサーバーが 2 回起動するため、これらのツールでは統合しません。CodeBuddy は名前が重なった場合 Multica が渡した方を使います。表にないほかのツールは、エージェントの設定だけを受け取ります。
+
+統合はランタイムのコンピューター上で行われ、ローカルのサーバーのコマンド、URL、ヘッダー、環境変数はアップロードされません。エージェントの **MCP** タブの「ランタイムから継承」には、サーバー名、トランスポート、取得元、有効かどうかだけが表示されます。エージェント側の同名サーバーに上書きされたものには「Multica で上書き」と表示されます。ローカルの設定ファイルを解析できない場合、デーモンは警告をログに残し、その実行はエージェントの設定だけを使います。
+
+## クリーンアップと保持 [#cleanup]
+
+デーモンは起動の約 30 秒後に最初のクリーンアップを行い、その後は 2 時間ごとに行います。実行中の実行が使っているディレクトリは削除されません。`multica daemon disk-usage` でワークスペースごと、実行ごとの使用量を確認できます。以下の期間はデフォルト値で、対応する `MULTICA_GC_*` 変数は[環境変数](/environment-variables#gc)にあります。
-ローカルランタイムはデフォルトで**プライベート**です。その上にエージェントを作成できるのはランタイムの所有者だけで、ワークスペースの owner・admin も例外ではありません。ランタイムは他のメンバーのコンピュータであり、そこでエージェントを動かすことはそのメンバーのマシンとツール認証情報を消費するためです。
+### 実行ディレクトリ
-ランタイムを**公開**に変更できるのは所有者だけです。ワークスペースの管理者はランタイムの名前変更や削除はできますが、共有するかどうかは所有者が決めます。公開すると、ワークスペースの他のメンバーもこのランタイムを選べるようになります。これは基盤の AI コーディングツールのログイン認証情報を共有するものではなく、メンバーがエージェントの実行をこのコンピュータにルーティングできるようになるだけです。
+実行ごとに作業ディレクトリのルート(既定は `~/multica_workspaces`)の下にディレクトリが作られ、チェックアウトしたコード、出力、ログが入ります。同じタスクの後続の実行はこれを引き続き使います。ディレクトリ全体が削除されるのは次のときです。
-所有者が公開ランタイムを再び**プライベート**にすると、Multica はエージェントビルダーのセッションも含め、影響を受けるエージェントとアクティブな実行を表示します。確定すると、他メンバーの該当エージェントの接続を解除し、キュー中・配信済み・実行中・ローカルディレクトリ待ち・延期中の実行を `runtime_access_revoked` としてキャンセルします。これらのエージェントに割り当てられた有効な自動化も一時停止します。所有者自身のエージェントと実行には影響しません。対象が変わった場合は再確認が必要で、同時にチャットが更新されている場合は再試行が必要になることがあります。作業を再開するには、利用可能なランタイムにエージェントを接続し、一時停止中の自動化を手動で再開してください。
+| 実行の出どころ | 削除のタイミング |
+|---|---|
+| タスク | タスクが `done` または `closed` カテゴリのステータスに入り、24 時間更新がないとき |
+| チャット | セッションのアーカイブから 24 時間後。セッションが削除されたら次のクリーンアップ。アーカイブされていない間は残ります |
+| オートパイロット(実行のみ)、クイック作成 | 実行が終わった後の次のクリーンアップ |
+| 持ち主が見つからない(メタデータがない、またはサーバー上に該当する記録がない) | ディレクトリが 72 時間変更されていないとき |
+
+タスクがまだ閉じていない場合、実行完了から 12 時間後に再生成できる内容だけを削除します。対象は `node_modules`、`.next`、`.turbo` ディレクトリと、デーモンが Codex 用に用意したキャッシュで、ほかは残ります。Multica Cloud に接続したデーモンは、タスクが閉じているかどうかにかかわらず、実行完了から 14 日後にディレクトリ全体も削除します。セルフホストでは既定でこれを行いません。
+
+プロジェクトのローカルディレクトリでの実行は、あなた自身のディレクトリで作業し、デーモンはそこに触れません。Multica がその実行用に作る記録ディレクトリ(ログなど)も残り、中の再生成できるキャッシュだけが片付けられます。
+
+### 共有のリポジトリキャッシュ
+
+デーモンはワークスペースのリポジトリごとにベアリポジトリのキャッシュを 1 つ持ちます。場所は作業ディレクトリのルート下の `.repos/<ワークスペース ID>/` です。このコンピューター上の同じワークスペースの実行はこれを共有し、チェックアウトのたびにキャッシュから git worktree を作り、新しいコミットだけを取得します。再クローンはしません。例外は Linux と Windows の Codex 実行で、作業ディレクトリ内に `.git` を持つ独立したクローンを受け取ります。Codex の workspace-write サンドボックスでは、作業ディレクトリ外の Git メタデータが読み取り専用になるためです。
+
+キャッシュが削除されるのは、どのワークスペースやプロジェクトからもリポジトリが参照されず、worktree が残っておらず、30 日間どの実行もそこからチェックアウトしていない、という 3 つがそろったときだけです。必要になれば再びクローンされます。古いエージェントブランチを消したあと、デーモンは実行中の実行がないときにキャッシュに対して `git reflog expire --expire=30.days --all` と `git gc --prune=30.days` を実行します。
+
+### セッション、メモリ、一時ディレクトリ
+
+| データ | 場所 | 保持 |
+|---|---|---|
+| Codex のセッション記録(エージェントとタスクごとに 1 つ) | Codex のホーム(既定は `~/.codex`)の `multica-sessions/` | 14 日間使われないと削除。以後、そのタスクの実行は以前の Codex セッションを再開できません |
+| Hermes のセッション記録 | Multica の設定ディレクトリ(既定は `~/.multica`、名前付きプロファイルは `~/.multica/profiles/<name>`)の `hermes-sessions/` | 14 日間使われないと削除 |
+| Hermes のメモリ(エージェントごとに 1 つ) | 同じディレクトリの `hermes-state/` | 90 日間使われないと削除 |
+| 実行ごとの専用一時ディレクトリ(`TMPDIR`) | システムの一時ディレクトリの `multica-task-*` | 実行終了時に削除。デーモンが強制終了された場合は後のクリーンアップで削除 |
+
+### Codex のネイティブメモリとサブエージェント [#codex-memory]
+
+デーモンが管理する Codex の実行では、Codex のネイティブメモリが既定でオフになります。このマシンや以前の実行のメモリが別のワークスペースに持ち込まれないようにするためです。設定はその実行専用の `CODEX_HOME/config.toml` にだけ書かれ(`features.memories`、`memories.generate_memories`、`memories.use_memories` をすべて `false`)、`~/.codex/config.toml` は変更されません。ネイティブメモリを残したい場合は、デーモンの環境で `MULTICA_CODEX_MEMORY=1` を設定します。
+
+Codex のネイティブサブエージェントも既定でオフです。Multica は親スレッドが終わった時点で実行を終了とみなすため、まだ動いているサブエージェントの結果は失われます。このリスクを受け入れる場合は `MULTICA_CODEX_MULTI_AGENT=1` を設定します。
+
+## ランタイムの共有 [#プライベートと公開]
+
+ローカルランタイムはデフォルトで**プライベート**です。その上にエージェントを作成できるのはランタイムの所有者だけで、ワークスペースの owner・admin も例外ではありません。ランタイムは他のメンバーのコンピュータで、そこでエージェントを動かせばそのメンバーのマシンとツール認証情報を使うことになります。
+
+ランタイムを**公開**に変更できるのは所有者だけです。ワークスペースの管理者はランタイムの名前変更や削除はできますが、共有するかどうかは所有者が決めます。公開すると、ワークスペースの他のメンバーもこのランタイムを選び、エージェントの実行をこのコンピュータにルーティングできるようになります。基盤の AI コーディングツールのログイン認証情報は共有されません。
+
+一部のメンバーにだけ共有するには、ランタイムの詳細で**メンバー**を選び、ワークスペースのメンバーを 1 人以上選んで**保存**します。選ばれたメンバーはこのランタイムを選択し、その上でエージェントを作成できます。リストを変更できるのは所有者だけで、リストに入っていても名前変更・削除・管理の権限は得られません。
+
+所有者が共有メンバーを外したとき、公開ランタイムを指定メンバーに絞ったとき、または再び**プライベート**にしたとき、Multica はエージェントビルダーのセッションも含め、影響を受けるエージェントとアクティブな実行を表示します。確定すると、他メンバーの該当エージェントの接続を解除し、キュー中・配信済み・実行中・ローカルディレクトリ待ち・延期中の実行を `runtime_access_revoked` としてキャンセルします。これらのエージェントに割り当てられた有効なオートパイロットも一時停止します。所有者と、引き続きアクセスできるメンバーのエージェントと実行には影響しません。対象が変わった場合は再確認が必要で、同時にチャットが更新されている場合は再試行が必要になることがあります。作業を再開するには、利用可能なランタイムにエージェントを接続し、一時停止中のオートパイロットを手動で再開してください。
キャンセル後もチャット履歴は維持され、下書き・添付ファイルの復元データはサーバーに保存されます。Web・デスクトップ版は既存の下書き復元 UI を利用しますが、モバイル版にはまだその UI がありません。開始済みで出力のない実行は、デーモンのキャンセル確認またはサーバーの猶予期間終了を待って入力の復元を判断します。接続中のデーモンは通常の確認でキャンセルを受信します。オフラインでもサーバー側のアクセスは直ちに取り消されますが、ローカルプロセスは再接続してキャンセルを受信するまで続く場合があり、即時の遠隔停止は保証できません。
@@ -141,6 +206,7 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 割り当てられたエージェントの表示名 | 参考情報 |
| `MULTICA_DAEMON_PORT` | `multica repo checkout` など作業専用コマンドが使うローカルデーモンのヘルス/API ポート | 参考情報 |
| `MULTICA_TASK_SLOT` | デーモン全体の同時実行プール内のスロット。GPU などスロット番号付きリソースに使用可能 | 参考情報 |
+| `MULTICA_REPO_CHECKOUT_MODE` | Linux と Windows の Codex 実行でだけ `isolated` になり、`multica repo checkout` が作業ディレクトリ内に `.git` を持つ独立したクローンを作る。ほかの実行では設定されない | 参考情報 |
| `TMPDIR` | 実行中の作業専用の一時ディレクトリ。`TMP` と `TEMP` でも提供しますが、Windows では Git Bash の共有 `/tmp` のため作業はユーザーの一時パスを継承します。Windows の Claude Code は `CLAUDE_CODE_TMPDIR` の既定値を作業の一時ディレクトリに設定 | 参考情報 |
`MULTICA_TOKEN` を使ったリクエストの作成者はサーバーが決定し、タスクへのコメントなどの書き込みは、割り当てられたエージェントと実行中の作業に帰属します。認証情報の完全な紐付け、権限、帰属、最長 24 時間の有効期間、クリーンアップについては、[エージェント実行用の一時トークン](/auth-tokens#エージェント実行用の一時トークン)を参照してください。
@@ -162,6 +228,23 @@ multica daemon start
ここに入力するのは実行ファイルと引数であり、shell スクリプトではありません。通常の引数、引用符、バックスラッシュによるエスケープは使えますが、パイプ、リダイレクト、`&&`、`;`、バッククォート、環境変数の展開は使えません。これらの挙動が必要な場合は wrapper script にまとめ、そのスクリプトをコマンドとして指定してください。
+### 引数の並び順
+
+コマンド欄に入力した内容は実行ファイルの直後に置かれ、Multica が追加する引数より前に並びます。
+
+```text
+<あなたのコマンド> <あなたの固定引数> <Multica のプロトコル引数> <エージェントのカスタム引数>
+```
+
+サブコマンド型の wrapper はこの順序で動きます。コマンドが `ccms start q36` なら、ツールは先に `start q36` を受け取り、Multica の `-p` などが届く前にサブコマンドを選びます。この種の wrapper はこの順序しか受け付けません。
+
+以前は、ここに入力した引数は最後に追加されていました。フラグ形式のコマンドの多くはどちらの位置でも同じように解釈しますが、グローバルフラグとサブコマンドのフラグを区別するコマンドではフラグの位置が意味を持ちます。固定引数付きのプロファイルをすでに使っている場合は、アップグレード後に一度実行して、正常に起動することを確認してください。
+
+ほかにも次の点に注意してください。
+
+- **競合したときは Multica の値が優先されます。** 固定引数で Multica も設定するフラグを指定した場合、Multica の値が後ろに来て有効になります。典型的なのは、エージェントで選んだモデルがプロファイルに固定した `--model` を上書きするケースです。全員に同じモデルを固定したい場合は、エージェントのモデル欄を空にしてください。
+- **プロトコルに必須のフラグは無視されます。** `-p`、`--output-format`、`--input-format`、`--permission-mode` と、ほかのプロトコルファミリーの対応するフラグは固定引数から取り除かれます。これらを上書きするとデーモンとツールの通信が切れるためです。サブコマンドとその他の位置引数は常にそのまま渡されます。
+
Desktop が起動したデーモンが、ターミナルでは実行できるコマンドを見つけられない場合は、現在のコンピュータに絶対パスを設定できます。
```bash
@@ -176,6 +259,39 @@ multica runtime profile unset-path <profile-id>
プロファイルの変更は、それ以降に取得される実行にのみ影響します。プロファイルを削除する前に、対応するランタイムにまだ紐づいているアクティブなエージェントを先に処理してください。あるコンピュータ上のランタイムインスタンスだけを削除してもプロファイルは消えず、実行中のデーモンが再登録します。
+## Qoder Cloud Agents リモートランタイム
+
+Qoder Cloud Agents は割り当てられたタスクをリモートセッションで実行します。Multica サーバーが既存のデーモンプロトコルを使うブリッジを管理するため、ユーザーがローカルデーモンを起動する必要はありません。
+
+### 事前準備
+
+- ワークスペース管理者の権限が必要です。Qoder 接続はワークスペースごとに 1 つです。
+- Qoder で個人アクセストークン(PAT)、1 つ以上の実行環境、使用する QCA エージェントを作成します。モデル、ツール、スキルは Multica ではなく Qoder の QCA エージェントで設定します。
+- セルフホスト環境では、サーバーに `MULTICA_VCS_SECRET_KEY`(base64 エンコードされた 32 バイトの鍵。再起動後も同じ値を使用)を設定してください。未設定の場合、**追加**メニューに Qoder Cloud Agents は表示されません。
+
+### Qoder を接続する
+
+1. **ランタイム**ページで**追加**をクリックし、**クラウドサービス**の **Qoder Cloud Agents** を選びます。
+2. **リージョン**で PAT を発行したサイトを選びます:**グローバル**(qoder.com)または**中国**(qoder.com.cn)。PAT は発行元のサイトでのみ有効です。拒否された場合は、もう一方のサイトで再試行するボタンを使います。
+3. **個人アクセストークン**に PAT を貼り付けます。検証されると Qoder から**実行環境**の一覧が読み込まれます。環境が 1 つだけなら自動で選択され、複数ある場合は選択します。
+4. 任意:**GitHub authorization** を開き、エージェントがクローンするリポジトリごとに URL とトークンを追加します。エージェントはここで許可したリポジトリのみクローンできます。
+5. 任意:**実行設定**を開き、同時実行数(デフォルト 3、最大 10)と実行タイムアウト(デフォルト 60 分、5〜240 分)を設定します。
+6. **接続**をクリックします。Qoder Cloud Agents がランタイムページのクラウドの区分に表示され、数秒でオンラインになります。
+
+### エージェントを追加する
+
+ランタイムページで Qoder Cloud Agents を開き、**これでエージェントを作成**をクリックします。通常どおりエージェントを作成して Qoder ランタイムを選ぶこともできます。エージェントのフォームで **QCA エージェント**からリモートのエージェントを選びます。既存のエージェントは**ルーティング**タブで QCA エージェントやデフォルトのリポジトリを変更できます。複数の Multica エージェントが 1 つの接続を共有し、それぞれ別の QCA エージェントに紐づけられます。
+
+認証情報は暗号化され、ワークスペース内で共有されます。管理者が接続を管理し、メンバーはアクセス可能な QCA エージェントを選択できます。リポジトリと開始ブランチはプロジェクトで選び、そのリポジトリのトークンは QCA のセッション作成時に送信されます。保存した PAT がブラウザーに返されることはありません。
+
+管理者は Qoder Cloud Agents のページで接続とリポジトリを編集できます。**一時停止**すると認証情報とエージェントを残したまま新しいタスクの送信を止め、**接続を解除**すると保存済みのトークンを削除してランタイムを外し、エージェントの紐づけを解除します。
+
+### 実行の仕組み
+
+同時実行数の上限を超えたタスクはキューで待機します。同じタスクの後続の実行は、前回のセッションがアイドルであればその Qoder セッションを引き継ぎます。エージェントにはデフォルトのリポジトリを設定でき、タスクのプロジェクトにリポジトリがない場合に使われます。エージェントにはタスク ID を含むブランチ名と、タスク ID で始まる PR タイトルを使うよう指示するため、PR はタスクに自動で紐づきます。
+
+初期版はタスク実行、進捗同期、キャンセル、永続化された実行記録からの復旧に対応します。チャット、ローカルディレクトリ、添付ファイル、リモート QCA Agent の新規作成は未対応です。詳細は [README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md) を参照してください。
+
## ランタイムがオフラインのときの確認手順
次の順に確認します。
diff --git a/apps/docs/content/docs/daemon-runtimes.ko.mdx b/apps/docs/content/docs/daemon-runtimes.ko.mdx
index a4c11e6799..eba3a4f395 100644
--- a/apps/docs/content/docs/daemon-runtimes.ko.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.ko.mdx
@@ -4,49 +4,17 @@ description: Multica가 컴퓨터를 연결하고 AI 코딩 도구를 찾아 실
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RuntimeOfflineDemo } from "@/components/demos/runtime-offline-demo";
-Multica는 실행을 기록하고 조율하며 연결된 컴퓨터가 실행을 담당합니다. 컴퓨터의 **데몬**(daemon)이 실행을 가져간 뒤 로컬에 설치된 AI 코딩 도구를 호출합니다.
-
-## Qoder Cloud Agents 원격 런타임
-
-Qoder Cloud Agents는 할당된 태스크를 원격 세션으로 실행합니다. Multica 서버가 기존 데몬 프로토콜을 사용하는 브리지를 관리하므로 사용자가 로컬 데몬을 실행할 필요가 없습니다.
-
-### 시작하기 전에
-
-- 워크스페이스 관리자 권한이 필요합니다. Qoder 연결은 워크스페이스마다 하나입니다.
-- Qoder에서 개인 액세스 토큰(PAT), 하나 이상의 실행 환경, 사용할 QCA 에이전트를 만드세요. 모델, 도구, 스킬은 Multica가 아니라 Qoder의 QCA 에이전트에서 설정합니다.
-- 셀프 호스팅에서는 서버에 `MULTICA_VCS_SECRET_KEY`(base64로 인코딩한 32바이트 키, 재시작해도 같은 값 유지)를 설정해야 합니다. 설정하지 않으면 **추가** 메뉴에 Qoder Cloud Agents가 나타나지 않습니다.
-
-### Qoder 연결하기
-
-1. **런타임** 페이지에서 **추가**를 클릭하고 **클라우드 서비스** 아래의 **Qoder Cloud Agents**를 선택합니다.
-2. **리전**에서 PAT를 발급한 사이트를 고릅니다: **글로벌(qoder.com)** 또는 **중국(qoder.com.cn)**. PAT는 발급한 사이트에서만 동작합니다. 거부되면 다른 사이트로 다시 시도하는 버튼을 사용하세요.
-3. **개인 액세스 토큰**에 PAT를 붙여 넣습니다. 확인이 끝나면 Qoder에서 **실행 환경** 목록을 불러옵니다. 환경이 하나뿐이면 자동으로 선택되고, 여러 개면 직접 선택합니다.
-4. 선택 사항: **GitHub authorization**을 열고 에이전트가 클론할 저장소마다 URL과 토큰을 추가합니다. 에이전트는 여기서 승인한 저장소만 클론할 수 있습니다.
-5. 선택 사항: **실행 설정**을 열어 동시 실행 수(기본 3, 최대 10)와 실행 제한 시간(기본 60분, 5~240분)을 설정합니다.
-6. **연결**을 클릭합니다. Qoder Cloud Agents가 런타임 페이지의 클라우드 영역에 나타나고 몇 초 안에 온라인이 됩니다.
-
-### 에이전트 추가하기
-
-런타임 페이지에서 Qoder Cloud Agents를 열고 **이것으로 에이전트 만들기**를 클릭합니다. 평소처럼 에이전트를 만들면서 Qoder 런타임을 선택해도 됩니다. 에이전트 양식의 **QCA 에이전트**에서 원격 에이전트를 선택하세요. 기존 에이전트는 **라우팅** 탭에서 QCA 에이전트나 기본 저장소를 바꿀 수 있습니다. 여러 Multica 에이전트가 하나의 연결을 공유하면서 각각 다른 QCA 에이전트에 연결될 수 있습니다.
-
-자격 증명은 암호화되어 워크스페이스 내에서 공유됩니다. 관리자가 연결을 관리하고, 멤버는 접근 가능한 QCA 에이전트를 선택할 수 있습니다. 저장소와 시작 브랜치는 프로젝트에서 선택하며, 해당 저장소의 토큰은 QCA 세션 생성 시 전달됩니다. 저장된 PAT는 브라우저로 다시 반환되지 않습니다.
-
-관리자는 Qoder Cloud Agents 페이지에서 연결과 저장소를 편집할 수 있습니다. **일시 중지**는 자격 증명과 에이전트를 유지한 채 새 태스크 전송을 멈추고, **연결 해제**는 저장된 토큰을 삭제하고 런타임을 제거하며 에이전트 연결을 해제합니다.
-
-### 실행 방식
-
-동시 실행 한도를 넘는 태스크는 대기열에서 기다립니다. 같은 태스크의 후속 실행은 이전 세션이 유휴 상태이면 해당 Qoder 세션을 이어서 사용합니다. 에이전트에 기본 저장소를 설정할 수 있으며, 태스크의 프로젝트에 저장소가 없을 때 사용됩니다. 에이전트는 태스크 식별자가 포함된 브랜치 이름과 식별자로 시작하는 PR 제목을 사용하도록 안내받으므로 PR이 태스크에 자동으로 연결됩니다.
-
-초기 버전은 태스크 실행, 진행 상황 동기화, 취소, 영구 실행 기록을 통한 복구를 지원합니다. 채팅, 로컬 디렉터리, 첨부 파일, 원격 QCA Agent 생성은 지원하지 않습니다. 자세한 내용은 [README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md)를 참고하세요.
-
+Multica는 작업을 기록하고 조율하며, 연결된 컴퓨터가 실행을 담당합니다. 컴퓨터의 **데몬**(daemon)이 실행을 가져간 뒤 로컬에 설치된 AI 코딩 도구를 호출합니다.
## 개념 구분
- **데몬**은 한 컴퓨터에서 실행되는 Multica 백그라운드 프로그램입니다. 서버 연결, 로컬 도구 검색, 실행 수령, 결과 반환을 담당합니다.
- **런타임**은 워크스페이스가 사용할 수 있는 구체적인 실행 환경을 나타냅니다. 컴퓨터 한 대와 그 컴퓨터의 AI 코딩 도구 하나 또는 사용자 지정 런타임 설정의 조합입니다.
-예를 들어 한 컴퓨터에 Claude Code와 Codex가 모두 설치되어 있고 두 워크스페이스에 연결되어 있다면 데몬이 각 워크스페이스에 Claude Code와 Codex 런타임을 각각 등록합니다. 데몬을 다시 시작하면 기존 기록이 업데이트되며 같은 조합의 런타임이 계속 새로 생기지 않습니다.
+예를 들어 한 컴퓨터에 Claude Code와 Codex가 모두 설치되어 있고 두 워크스페이스에 연결되어 있다면 데몬이 워크스페이스마다 Claude Code 런타임과 Codex 런타임을 하나씩 등록합니다. 데몬을 다시 시작하면 기존 기록이 업데이트되며 같은 조합의 런타임이 계속 새로 생기지 않습니다.
## 실행 위치와 데이터 경계
@@ -55,12 +23,18 @@ Qoder Cloud Agents는 할당된 태스크를 원격 세션으로 실행합니다
팀 협업을 위해 서버에는 태스크, 댓글, 에이전트 설정, 실행 컨텍스트, 실행 기록, 에이전트가 반환한 결과가 저장됩니다. 이 내용에는 에이전트가 직접 읽고 답변에 포함한 코드 조각이나 다른 프로젝트 컨텍스트가 들어갈 수 있습니다.
<Callout type="warning">
-에이전트의 사용자 지정 환경 변수는 서버에 저장되고 실행할 때 런타임으로 전송됩니다. "로컬 실행"이 모든 secret이 로컬에만 존재한다는 뜻은 아닙니다. 사용자 지정 환경 변수와 MCP 설정은 서버에 저장되며 민감 정보 규칙에 따라 표시가 제한됩니다.
+"로컬 실행"이 모든 secret이 로컬에만 존재한다는 뜻은 아닙니다. 에이전트의 사용자 지정 환경 변수와 MCP 설정은 서버에 저장되며 민감 정보 규칙에 따라 표시가 제한됩니다. 사용자 지정 환경 변수는 실행할 때 런타임으로 전송됩니다.
</Callout>
## 데몬 시작
-Multica Desktop을 사용하면 앱이 데몬을 자동으로 시작하므로 별도 명령을 실행할 필요가 없습니다.
+<Tabs items={["Desktop", "CLI"]}>
+<Tab value="Desktop">
+
+Multica Desktop은 데몬을 자동으로 시작하므로 별도 명령을 실행할 필요가 없습니다.
+
+</Tab>
+<Tab value="CLI">
Web, 원격 컴퓨터, 화면 없는 환경에서는 먼저 [Multica CLI를 설치](/cli)한 뒤 다음을 실행합니다.
@@ -68,7 +42,10 @@ Web, 원격 컴퓨터, 화면 없는 환경에서는 먼저 [Multica CLI를 설
multica daemon start
```
-데몬은 기본적으로 백그라운드에서 실행됩니다. 자주 사용하는 명령은 다음과 같습니다.
+</Tab>
+</Tabs>
+
+데몬은 기본적으로 백그라운드에서 실행됩니다. 자주 사용하는 명령:
| 명령 | 역할 |
| --- | --- |
@@ -80,25 +57,46 @@ multica daemon start
실행용 작업 디렉터리를 다른 디스크에 두려면 `multica config set workspaces_root <path>`로 현재 profile의 루트를 저장하거나 `daemon start` 또는 `daemon restart`에 `--workspaces-root <path>`를 전달합니다. flag는 `MULTICA_WORKSPACES_ROOT`보다 우선하고, 환경 변수는 profile 설정보다 우선합니다. 루트를 변경해도 기존 작업 디렉터리는 이동되지 않습니다.
-시작할 때 데몬은 `PATH`에서 지원되는 AI 코딩 도구를 감지하고 사용자가 연결할 권한이 있는 워크스페이스에 런타임을 등록합니다. 도구를 방금 설치하거나 로그인했다면 데몬을 다시 시작해 다시 감지할 수 있습니다.
+시작할 때 데몬은 `PATH`에서 지원되는 AI 코딩 도구를 감지하고 사용자가 연결할 권한이 있는 워크스페이스에 런타임을 등록합니다. 도구를 방금 설치하거나 로그인했다면 데몬을 다시 시작하면 다시 감지됩니다.
데몬을 시작하려면 기본 지원 AI 코딩 도구를 하나 이상 감지해야 합니다. 설치 방법과 실행 파일 이름은 [AI 코딩 도구 설치](/install-agent-runtime)를 참고하세요.
-## 디스패치와 온라인 상태
+### 로그인 시 자동 시작 [#autostart]
+
+CLI로 시작한 데몬은 컴퓨터를 다시 시작해도 저절로 다시 켜지지 않습니다. 자동으로 시작하게 하려면 현재 프로필을 등록하세요.
+
+```bash
+multica daemon autostart enable
+multica daemon autostart status
+multica daemon autostart disable
+```
-런타임이 등록되면 연결을 계속 유지합니다. 새 실행이 큐에 들어오면 서버가 해당 데몬에 알리고, 연결이 끊겼을 때를 대비해 데몬도 주기적으로 폴링합니다. 따라서 런타임이 온라인이고 여유 용량이 있으면 실행은 보통 즉시 시작됩니다.
+등록되는 명령은 해당 프로필의 `multica daemon start --foreground`이며 로그인할 때 OS가 실행합니다. Windows에서는 현재 사용자의 Run 레지스트리 값, macOS에서는 `~/Library/LaunchAgents`의 LaunchAgent, Linux에서는 systemd 사용자 유닛을 쓰고, systemd 사용자 세션이 없으면 XDG autostart 항목을 씁니다. 이름 있는 프로필은 `--profile <name>`을 붙이며, 프로필마다 따로 등록됩니다.
-데몬은 15초마다 heartbeat를 보냅니다. 서버는 heartbeat와 연결 상태를 함께 사용해 런타임의 온라인 여부를 판단합니다. 데몬이 예기치 않게 종료되면 보통 늦어도 약 3분 안에 오프라인으로 표시됩니다.
+- 등록을 만드는 것은 `enable`뿐입니다. `multica daemon start`는 스스로 등록하지 않고, 등록이 없을 때 한 줄짜리 안내만 출력합니다. Multica가 만든 등록이 있으면 그 안의 실행 파일 경로를 갱신하므로 CLI를 업그레이드하거나 옮겨도 `enable`을 다시 할 필요가 없습니다.
+- macOS와 Linux에서는 `enable`할 때 셸의 `PATH`만 로그인 세션으로 전달됩니다. 셸에서 export한 다른 변수(API 키, `HTTPS_PROXY` 등)는 전달되지 않습니다. 데몬 설정은 `multica config set`으로 저장하고 다른 변수는 사용자 환경에 두세요.
+- systemd 사용자 유닛은 로그인할 때 시작됩니다. 로그인하지 않아도 부팅 시 시작하려면 `enable` 출력의 안내대로 `loginctl enable-linger <사용자 이름>`을 실행하세요.
+- `multica daemon stop`은 실행 중인 데몬만 멈추고 등록은 남겨 둡니다.
+- 같은 위치에 Multica가 만들지 않은 파일(직접 작성한 systemd 유닛 등)이 있으면 `enable`과 `disable` 모두 그 파일을 수정하지 않습니다.
+- Desktop이 시작한 데몬은 Desktop이 관리합니다. `daemon start`는 이 데몬에 대해 안내를 출력하거나 등록을 갱신하지 않습니다.
-![온라인 컴퓨터의 런타임 상세: 같은 데몬이 감지된 AI 코딩 도구마다 한 줄씩 총 7개 런타임을 등록했고 모두 온라인 상태와 CLI 버전을 표시합니다.](/images/docs/runtime-machine-detail.webp)
+## 디스패치와 온라인 상태
+
+런타임이 등록되면 연결을 계속 유지합니다. 새 실행이 큐에 들어오면 서버가 해당 데몬에 알리고, 연결이 끊겼을 때를 대비해 데몬도 주기적으로 폴링합니다. 런타임이 온라인이고 여유 용량이 있으면 실행은 보통 즉시 시작됩니다.
+
+데몬은 15초마다 하트비트를 보냅니다. 서버는 하트비트와 연결 상태를 함께 사용해 런타임의 온라인 여부를 판단합니다. 데몬이 예기치 않게 종료되면 늦어도 약 3분 안에 오프라인으로 판단됩니다. **런타임** 페이지에서는 연결이 끊긴 뒤 처음 5분 동안 "최근 연결 끊김"으로, 그 뒤에는 "오프라인"으로 표시됩니다.
런타임이 오프라인일 때는 다음과 같이 처리됩니다.
-- 이미 큐에 들어간 실행은 런타임이 복구될 때까지 기다립니다. 해당 런타임이 재연결 유예를 넘겨 하트비트를 멈추고 **동시에** 실행 자체도 그만큼 기다린 뒤에만 실패하므로, 단지 바쁜 런타임은 밀린 실행을 그대로 유지하고 이미 오프라인인 런타임에 배정된 실행도 온전한 유예를 한 번 갖습니다.
-- 진행 중이던 실행은 실패합니다. 조건을 만족하는 태스크 또는 대화 실행은 자동으로 재시도될 수 있습니다.
+- 이미 큐에 들어간 실행은 런타임이 복구될 때까지 기다리며 다른 컴퓨터로 넘어가지 않습니다. 해당 런타임이 재연결 유예를 넘겨 하트비트를 멈추고 **동시에** 실행 자체도 그만큼 기다린 뒤에만 실패합니다. 단지 바쁜 런타임은 밀린 실행을 그대로 유지하고, 이미 오프라인인 런타임에 배정된 실행도 온전한 유예를 한 번 갖습니다.
+- 진행 중인 실행은 바로 실패하지 않습니다. 런타임의 하트비트가 재연결 유예(`MULTICA_RUNTIME_RECONNECT_GRACE`, 기본 3시간)를 넘겨 끊긴 뒤에야 `runtime_offline`으로 실패합니다. 조건을 만족하는 태스크 또는 대화 실행은 자동으로 재시도될 수 있습니다.
- 데몬이 다시 시작되면 런타임을 재등록하고 이전에 정상적으로 끝나지 않은 실행을 회수합니다.
- 7일 넘게 오프라인이고 연결된 에이전트가 하나도 없는 런타임은 보관된 에이전트까지 확인한 뒤 자동으로 정리됩니다.
+아래 데모에서는 컴퓨터가 오프라인일 때 할당한 실행이 큐에서 계속 기다리다가, 컴퓨터가 다시 온라인이 된 뒤에야 런타임에 수령됩니다.
+
+<RuntimeOfflineDemo />
+
자세한 상태와 재시도 규칙은 [실행](/tasks)을 참고하세요.
## 동시 실행 제한
@@ -107,17 +105,84 @@ multica daemon start
상한에 도달하면 새 실행은 계속 큐에서 기다립니다. 에이전트 설정에서 개별 에이전트의 동시 실행 수를 조정할 수 있고 `MULTICA_DAEMON_MAX_CONCURRENT_TASKS`로 컴퓨터 전체 상한을 조정할 수도 있습니다. 병렬 실행은 컴퓨터 성능, 도구 계정 사용량, 같은 작업 디렉터리를 동시에 사용합니다.
-## 비공개와 공개
+실행에 쓰인 토큰, 비용, 실패는 워크스페이스별로 [분석](/analytics) 페이지에 모여 있습니다. 런타임 하나의 토큰 사용량은 `multica runtime usage <runtime-id>`로도 볼 수 있습니다.
+
+## 로컬 MCP 설정 [#local-mcp]
+
+에이전트에 MCP 설정이 저장되어 있지 않으면 Multica는 MCP 설정을 전혀 전달하지 않고, 도구는 평소처럼 그 컴퓨터에 있는 자체 설정을 읽습니다.
+
+에이전트에 MCP 설정이 있으면(빈 설정이라도) Multica는 실행마다 전용 설정을 만들어 도구에 넘깁니다. 예를 들어 Claude Code는 strict 모드로 이 설정만 읽습니다. 컴퓨터에 이미 있던 서버가 이 때문에 쓸 수 없게 되지 않도록, 데몬은 런타임 컴퓨터에서 도구의 사용자 수준 MCP 설정을 읽어 에이전트 설정과 병합합니다. 이름이 같은 서버는 다음 순서에서 먼저 나오는 것을 씁니다.
+
+1. 에이전트 **MCP** 탭에서 Multica가 관리하거나 워크스페이스 MCP 라이브러리에서 할당한 서버
+2. 도구의 사용자 수준 설정 파일
+3. Claude Code만 해당: 활성화된 Claude Code 플러그인에 포함된 MCP 서버. 플러그인은 `~/.claude/settings.json`의 `enabledPlugins`에서 정해지며, 각 플러그인의 `.mcp.json`과 매니페스트에 선언된 MCP 파일을 읽습니다.
+
+| 도구 | 읽는 사용자 수준 설정 |
+|---|---|
+| Claude Code | `~/.claude.json`의 `mcpServers`와 활성화된 플러그인의 MCP 서버 |
+| Codex | `$CODEX_HOME/config.toml`(기본값 `~/.codex/config.toml`)의 `mcp_servers` |
+| Cursor Agent | `~/.cursor/mcp.json`의 `mcpServers` |
+| OpenCode | `$XDG_CONFIG_HOME/opencode/opencode.json`(기본값 `~/.config/opencode/opencode.json`)의 `mcp` |
+| OpenClaw | `$CLAWDBOT_CONFIG_PATH` 또는 `$OPENCLAW_STATE_DIR/openclaw.json`(기본값 `~/.openclaw/openclaw.json`)의 `mcp.servers` |
+| CodeArts | `~/.codeartsdoer/codearts_cli.json` 또는 `codearts_cli.jsonc`의 `mcp` |
+
+CodeBuddy, Kimi CLI, Pi는 시작할 때 사용자 수준 설정을 직접 읽고 Multica가 보낸 설정과 합칩니다. 데몬이 미리 병합하면 같은 서버가 두 번 시작되므로 이 도구들에는 병합하지 않습니다. CodeBuddy는 이름이 겹치면 Multica가 보낸 쪽을 씁니다. 표에 없는 다른 도구는 에이전트 설정만 받습니다.
+
+병합은 런타임 컴퓨터에서 이루어지며 로컬 서버의 명령, URL, 헤더, 환경 변수는 업로드되지 않습니다. 에이전트 **MCP** 탭의 "런타임에서 상속" 목록에는 서버 이름, 전송 방식, 출처, 활성화 여부만 표시되고, 에이전트의 같은 이름 서버에 가려진 항목에는 "Multica에서 재정의"가 표시됩니다. 로컬 설정 파일을 해석할 수 없으면 데몬은 경고를 로그에 남기고 해당 실행은 에이전트 설정만 사용합니다.
+
+## 정리와 보존 [#cleanup]
+
+데몬은 시작하고 약 30초 뒤에 처음 정리하고, 그 뒤로는 2시간마다 정리합니다. 진행 중인 실행이 쓰는 디렉터리는 정리하지 않습니다. `multica daemon disk-usage`로 워크스페이스별, 실행별 사용량을 볼 수 있습니다. 아래 기간은 기본값이며 해당 `MULTICA_GC_*` 변수는 [환경 변수](/environment-variables#gc)에 있습니다.
-로컬 런타임의 기본값은 **비공개**입니다. 그 위에 에이전트를 만들 수 있는 사람은 런타임 owner뿐이며, 워크스페이스 owner와 admin도 예외가 아닙니다. 런타임은 다른 멤버의 컴퓨터이고, 거기서 에이전트를 실행하면 그 멤버의 컴퓨터와 도구 자격 증명을 사용하게 되기 때문입니다.
+### 실행 디렉터리
-**공개**로 바꿀 수 있는 사람은 런타임 owner뿐입니다. 워크스페이스 관리자는 런타임의 이름을 바꾸거나 삭제할 수 있지만, 공유 여부는 owner가 결정합니다. 공개하면 워크스페이스의 다른 멤버도 이 런타임을 선택할 수 있습니다. 기반 AI 코딩 도구의 로그인 자격 증명을 공유하는 것이 아니라 멤버가 에이전트 실행을 해당 컴퓨터로 라우팅할 수 있게 하는 것입니다.
+실행마다 작업 디렉터리 루트(기본값 `~/multica_workspaces`) 아래에 디렉터리가 생기고, 체크아웃한 코드와 출력, 로그가 들어갑니다. 같은 태스크의 후속 실행은 이 디렉터리를 이어서 씁니다. 디렉터리 전체는 다음 시점에 삭제됩니다.
-소유자가 공개 런타임을 다시 **비공개**로 전환하면 Multica는 에이전트 빌더 세션을 포함하여 영향을 받는 에이전트와 활성 실행을 표시합니다. 확인하면 다른 멤버의 해당 에이전트 연결을 해제하고, 대기 중·배포됨·실행 중·로컬 디렉터리 대기·지연 중인 실행을 `runtime_access_revoked`로 취소합니다. 해당 에이전트에 할당된 활성 자동화도 일시 중지합니다. 소유자 자신의 에이전트와 실행에는 영향을 주지 않습니다. 대상이 바뀌면 다시 확인해야 하며, 채팅이 동시에 변경되는 경우 재시도가 필요할 수 있습니다. 작업을 재개하려면 에이전트를 사용 가능한 런타임에 연결한 후 일시 중지된 자동화를 직접 재개하세요.
+| 실행 출처 | 삭제 시점 |
+|---|---|
+| 태스크 | 태스크가 `done` 또는 `closed` 분류의 상태가 되고 24시간 동안 업데이트가 없을 때 |
+| 채팅 | 세션을 보관하고 24시간 뒤. 세션을 삭제하면 다음 정리 때. 보관하지 않은 동안에는 유지 |
+| 오토파일럿(실행만), 빠른 생성 | 실행이 끝난 뒤 다음 정리 때 |
+| 소속을 찾을 수 없음(메타데이터가 없거나 서버에 해당 기록이 없음) | 디렉터리가 72시간 동안 변경되지 않았을 때 |
+
+태스크가 아직 닫히지 않았다면 실행 완료 12시간 뒤에 다시 만들 수 있는 내용만 지웁니다. 대상은 `node_modules`, `.next`, `.turbo` 디렉터리와 데몬이 Codex용으로 준비한 캐시이며 나머지는 남습니다. Multica Cloud에 연결된 데몬은 태스크가 닫혔는지와 관계없이 실행 완료 14일 뒤에 디렉터리 전체도 삭제합니다. 셀프 호스팅에서는 기본적으로 이 단계를 하지 않습니다.
+
+프로젝트 로컬 디렉터리에서의 실행은 사용자 자신의 디렉터리에서 작업하며 데몬은 그 디렉터리를 건드리지 않습니다. Multica가 그 실행을 위해 따로 만드는 기록 디렉터리(로그 등)도 유지되고, 그 안의 다시 만들 수 있는 캐시만 정리됩니다.
+
+### 공유 저장소 캐시
+
+데몬은 워크스페이스 저장소마다 bare 저장소 캐시를 하나 둡니다. 위치는 작업 디렉터리 루트 아래의 `.repos/<워크스페이스 ID>/`입니다. 이 컴퓨터에서 같은 워크스페이스의 실행은 이 캐시를 함께 쓰며, 체크아웃할 때마다 캐시에서 git worktree를 만들고 새 커밋만 가져옵니다. 다시 클론하지 않습니다. 예외는 Linux와 Windows의 Codex 실행으로, 작업 디렉터리 안에 `.git`이 있는 독립 클론을 받습니다. Codex의 workspace-write 샌드박스에서는 작업 디렉터리 밖의 Git 메타데이터가 읽기 전용이기 때문입니다.
+
+캐시는 세 가지가 모두 충족될 때만 삭제됩니다. 어떤 워크스페이스나 프로젝트도 이 저장소를 참조하지 않고, 남은 worktree가 없고, 30일 동안 어떤 실행도 이 캐시에서 체크아웃하지 않았을 때입니다. 필요하면 다시 클론됩니다. 오래된 에이전트 브랜치를 지운 뒤에는 진행 중인 실행이 없을 때 캐시에 `git reflog expire --expire=30.days --all`과 `git gc --prune=30.days`를 실행합니다.
+
+### 세션, 메모리, 임시 디렉터리
+
+| 데이터 | 위치 | 보존 |
+|---|---|---|
+| Codex 세션 기록(에이전트와 태스크마다 하나) | Codex 홈(기본값 `~/.codex`)의 `multica-sessions/` | 14일 동안 쓰지 않으면 삭제. 이후 해당 태스크의 실행은 이전 Codex 세션을 이어 가지 못함 |
+| Hermes 세션 기록 | Multica 설정 디렉터리(기본값 `~/.multica`, 이름 있는 프로필은 `~/.multica/profiles/<name>`)의 `hermes-sessions/` | 14일 동안 쓰지 않으면 삭제 |
+| Hermes 메모리(에이전트마다 하나) | 같은 디렉터리의 `hermes-state/` | 90일 동안 쓰지 않으면 삭제 |
+| 실행마다 쓰는 전용 임시 디렉터리(`TMPDIR`) | 시스템 임시 디렉터리의 `multica-task-*` | 실행이 끝나면 삭제. 데몬이 강제 종료된 경우 이후 정리에서 삭제 |
+
+### Codex 기본 메모리와 하위 에이전트 [#codex-memory]
+
+데몬이 관리하는 Codex 실행에서는 Codex 기본 메모리가 기본적으로 꺼집니다. 이 컴퓨터나 이전 실행의 메모리가 다른 워크스페이스로 넘어가지 않게 하기 위해서입니다. 설정은 해당 실행 전용 `CODEX_HOME/config.toml`에만 기록되고(`features.memories`, `memories.generate_memories`, `memories.use_memories` 모두 `false`), `~/.codex/config.toml`은 바뀌지 않습니다. 기본 메모리를 유지하려면 데몬 환경에 `MULTICA_CODEX_MEMORY=1`을 설정하세요.
+
+Codex 기본 하위 에이전트도 기본적으로 꺼져 있습니다. Multica는 상위 스레드가 끝나면 실행이 끝난 것으로 보므로 아직 작업 중인 하위 에이전트의 결과는 사라집니다. 이 위험을 감수한다면 `MULTICA_CODEX_MULTI_AGENT=1`을 설정하세요.
+
+## 런타임 공유 [#비공개와-공개]
+
+로컬 런타임의 기본값은 **비공개**입니다. 그 위에 에이전트를 만들 수 있는 사람은 런타임 owner뿐이며, 워크스페이스 owner와 admin도 예외가 아닙니다. 런타임은 다른 멤버의 컴퓨터이고, 거기서 에이전트를 실행하면 그 멤버의 컴퓨터와 도구 자격 증명을 쓰게 됩니다.
+
+**공개**로 바꿀 수 있는 사람은 런타임 owner뿐입니다. 워크스페이스 관리자는 런타임의 이름을 바꾸거나 삭제할 수 있지만, 공유 여부는 owner가 결정합니다. 공개하면 워크스페이스의 다른 멤버도 이 런타임을 선택해 에이전트 실행을 해당 컴퓨터로 라우팅할 수 있습니다. 기반 AI 코딩 도구의 로그인 자격 증명은 공유되지 않습니다.
+
+일부 멤버에게만 공유하려면 런타임 상세에서 **멤버**를 고르고, 워크스페이스 멤버를 한 명 이상 선택한 뒤 **저장**합니다. 선택된 멤버는 이 런타임을 골라 에이전트를 만들 수 있습니다. 목록은 owner만 바꿀 수 있으며, 목록에 있다고 해서 런타임의 이름 변경·삭제·관리 권한이 생기지는 않습니다.
+
+소유자가 공유 멤버를 빼거나, 공개 런타임을 지정 멤버로 좁히거나, 다시 **비공개**로 전환하면 Multica는 에이전트 빌더 세션을 포함하여 영향을 받는 에이전트와 활성 실행을 표시합니다. 확인하면 다른 멤버의 해당 에이전트 연결을 해제하고, 대기 중·배포됨·실행 중·로컬 디렉터리 대기·지연 중인 실행을 `runtime_access_revoked`로 취소합니다. 해당 에이전트에 할당된 활성 오토파일럿도 일시 중지합니다. 소유자와 계속 접근할 수 있는 멤버의 에이전트와 실행에는 영향을 주지 않습니다. 대상이 바뀌면 다시 확인해야 하며, 채팅이 동시에 변경되는 경우 재시도가 필요할 수 있습니다. 작업을 재개하려면 에이전트를 사용 가능한 런타임에 연결한 후 일시 중지된 오토파일럿을 직접 재개하세요.
취소해도 채팅 기록은 유지되며 초안·첨부 파일 복원 데이터는 서버에 저장됩니다. 웹과 데스크톱은 기존 초안 복원 UI를 사용하지만 모바일에는 아직 해당 UI가 없습니다. 이미 시작했지만 출력이 없는 실행은 데몬의 취소 확인 또는 서버의 유예 기간 종료 후 입력 복원 여부를 결정합니다. 연결된 데몬은 일반 확인 과정에서 취소를 받습니다. 오프라인에서도 서버의 접근 권한은 즉시 취소되지만, 로컬 프로세스는 다시 연결되어 취소를 받을 때까지 계속될 수 있으므로 즉시 원격 중단을 보장할 수 없습니다.
-## 사용자 지정 런타임 설정
+## 사용자 지정 런타임 설정 [#사용자-지정-런타임-프로필]
팀에서 내부 wrapper, 고정 버전 실행 파일을 사용하거나 호환 도구에 고정 인수를 추가해야 한다면 **사용자 지정 런타임 설정**을 만들 수 있습니다.
@@ -141,6 +206,7 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 할당된 에이전트의 표시 이름 | 참고 정보 |
| `MULTICA_DAEMON_PORT` | `multica repo checkout` 같은 작업 전용 명령이 사용하는 로컬 데몬 상태/API 포트 | 참고 정보 |
| `MULTICA_TASK_SLOT` | 데몬 전체 동시 실행 풀의 슬롯. GPU 같은 슬롯 번호 기반 리소스에 사용 가능 | 참고 정보 |
+| `MULTICA_REPO_CHECKOUT_MODE` | Linux와 Windows의 Codex 실행에서만 `isolated`로 설정되어, `multica repo checkout`이 작업 디렉터리 안에 `.git`이 있는 독립 클론을 만듭니다. 다른 실행에서는 설정되지 않습니다 | 참고 정보 |
| `TMPDIR` | 실행 중인 작업의 비공개 임시 디렉터리. `TMP`와 `TEMP`로도 제공하지만, Windows에서는 Git Bash의 공유 `/tmp`를 위해 작업이 사용자 temp 경로를 상속합니다. Windows Claude Code는 `CLAUDE_CODE_TMPDIR`의 기본값을 작업 임시 디렉터리로 지정 | 참고 정보 |
`MULTICA_TOKEN`을 사용하는 요청의 작성자는 서버가 결정하며, 태스크 댓글 같은 쓰기는 할당된 에이전트와 실행 중인 작업에 귀속됩니다. 자격 증명의 전체 바인딩, 권한, 귀속, 최대 24시간의 유효 기간 및 정리 동작은 [에이전트 실행용 임시 토큰](/auth-tokens#에이전트-실행용-임시-토큰)을 참고하세요.
@@ -162,6 +228,23 @@ multica daemon start
여기에는 shell script가 아니라 실행 파일과 인수를 입력합니다. 일반 인수, 따옴표, 백슬래시 이스케이프는 사용할 수 있지만 파이프, 리디렉션, `&&`, `;`, 역따옴표, 환경 변수 확장은 사용할 수 없습니다. 이런 동작이 필요하면 wrapper script에 넣고 해당 스크립트를 명령으로 입력하세요.
+### 인수 순서
+
+명령 칸에 입력한 내용은 실행 파일 바로 뒤, Multica가 추가하는 인수보다 앞에 놓입니다.
+
+```text
+<사용자 명령> <사용자 고정 인수> <Multica 프로토콜 인수> <에이전트 사용자 지정 인수>
+```
+
+하위 명령 방식의 wrapper는 이 순서 덕분에 동작합니다. 명령이 `ccms start q36`이면 도구는 먼저 `start q36`을 받아 Multica의 `-p` 등이 도착하기 전에 하위 명령을 고릅니다. 이런 wrapper는 이 순서만 받아들입니다.
+
+예전에는 여기에 입력한 인수가 맨 뒤에 붙었습니다. flag 형식의 명령은 대부분 어느 위치든 똑같이 해석하지만, 전역 flag와 하위 명령 flag를 구분하는 명령은 flag 위치에 영향을 받습니다. 고정 인수가 있는 설정을 이미 쓰고 있다면 업그레이드 후 한 번 실행해 정상적으로 시작되는지 확인하세요.
+
+그 밖에 다음 두 가지가 있습니다.
+
+- **충돌하면 Multica의 값이 적용됩니다.** 고정 인수에 Multica도 설정하는 flag가 있으면 Multica의 값이 뒤에 와서 최종 적용됩니다. 가장 흔한 예는 에이전트에서 고른 모델이 설정에 고정한 `--model`을 덮어쓰는 경우입니다. 모든 사람에게 같은 모델을 고정하려면 에이전트의 모델 칸을 비워 두세요.
+- **프로토콜 필수 flag는 무시됩니다.** `-p`, `--output-format`, `--input-format`, `--permission-mode`와 다른 프로토콜 계열의 대응 flag는 고정 인수에서 제거됩니다. 이 값을 덮어쓰면 데몬과 도구 사이의 통신이 끊기기 때문입니다. 하위 명령과 그 밖의 위치 인수는 항상 그대로 전달됩니다.
+
Desktop이 시작한 데몬에서 터미널에서는 실행되는 명령을 찾지 못한다면 현재 컴퓨터에 절대 경로를 설정할 수 있습니다.
```bash
@@ -176,6 +259,39 @@ multica runtime profile unset-path <profile-id>
설정 변경은 이후 가져가는 실행에만 적용됩니다. 설정을 삭제하기 전에 해당 런타임에 계속 연결된 활성 에이전트를 먼저 처리해야 합니다. 특정 컴퓨터의 런타임 인스턴스만 삭제해도 설정은 삭제되지 않으며 실행 중인 데몬이 다시 등록합니다.
+## Qoder Cloud Agents 원격 런타임
+
+Qoder Cloud Agents는 할당된 태스크를 원격 세션으로 실행합니다. Multica 서버가 기존 데몬 프로토콜을 사용하는 브리지를 관리하므로 사용자가 로컬 데몬을 실행할 필요가 없습니다.
+
+### 시작하기 전에
+
+- 워크스페이스 관리자 권한이 필요합니다. Qoder 연결은 워크스페이스마다 하나입니다.
+- Qoder에서 개인 액세스 토큰(PAT), 하나 이상의 실행 환경, 사용할 QCA 에이전트를 만드세요. 모델, 도구, 스킬은 Multica가 아니라 Qoder의 QCA 에이전트에서 설정합니다.
+- 셀프 호스팅에서는 서버에 `MULTICA_VCS_SECRET_KEY`(base64로 인코딩한 32바이트 키, 재시작해도 같은 값 유지)를 설정해야 합니다. 설정하지 않으면 **추가** 메뉴에 Qoder Cloud Agents가 나타나지 않습니다.
+
+### Qoder 연결하기
+
+1. **런타임** 페이지에서 **추가**를 클릭하고 **클라우드 서비스** 아래의 **Qoder Cloud Agents**를 선택합니다.
+2. **리전**에서 PAT를 발급한 사이트를 고릅니다: **글로벌(qoder.com)** 또는 **중국(qoder.com.cn)**. PAT는 발급한 사이트에서만 동작합니다. 거부되면 다른 사이트로 다시 시도하는 버튼을 사용하세요.
+3. **개인 액세스 토큰**에 PAT를 붙여 넣습니다. 확인이 끝나면 Qoder에서 **실행 환경** 목록을 불러옵니다. 환경이 하나뿐이면 자동으로 선택되고, 여러 개면 직접 선택합니다.
+4. 선택 사항: **GitHub authorization**을 열고 에이전트가 클론할 저장소마다 URL과 토큰을 추가합니다. 에이전트는 여기서 승인한 저장소만 클론할 수 있습니다.
+5. 선택 사항: **실행 설정**을 열어 동시 실행 수(기본 3, 최대 10)와 실행 제한 시간(기본 60분, 5~240분)을 설정합니다.
+6. **연결**을 클릭합니다. Qoder Cloud Agents가 런타임 페이지의 클라우드 영역에 나타나고 몇 초 안에 온라인이 됩니다.
+
+### 에이전트 추가하기
+
+런타임 페이지에서 Qoder Cloud Agents를 열고 **이것으로 에이전트 만들기**를 클릭합니다. 평소처럼 에이전트를 만들면서 Qoder 런타임을 선택해도 됩니다. 에이전트 양식의 **QCA 에이전트**에서 원격 에이전트를 선택하세요. 기존 에이전트는 **라우팅** 탭에서 QCA 에이전트나 기본 저장소를 바꿀 수 있습니다. 여러 Multica 에이전트가 하나의 연결을 공유하면서 각각 다른 QCA 에이전트에 연결될 수 있습니다.
+
+자격 증명은 암호화되어 워크스페이스 내에서 공유됩니다. 관리자가 연결을 관리하고, 멤버는 접근 가능한 QCA 에이전트를 선택할 수 있습니다. 저장소와 시작 브랜치는 프로젝트에서 선택하며, 해당 저장소의 토큰은 QCA 세션 생성 시 전달됩니다. 저장된 PAT는 브라우저로 다시 반환되지 않습니다.
+
+관리자는 Qoder Cloud Agents 페이지에서 연결과 저장소를 편집할 수 있습니다. **일시 중지**는 자격 증명과 에이전트를 유지한 채 새 태스크 전송을 멈추고, **연결 해제**는 저장된 토큰을 삭제하고 런타임을 제거하며 에이전트 연결을 해제합니다.
+
+### 실행 방식
+
+동시 실행 한도를 넘는 태스크는 대기열에서 기다립니다. 같은 태스크의 후속 실행은 이전 세션이 유휴 상태이면 해당 Qoder 세션을 이어서 사용합니다. 에이전트에 기본 저장소를 설정할 수 있으며, 태스크의 프로젝트에 저장소가 없을 때 사용됩니다. 에이전트는 태스크 식별자가 포함된 브랜치 이름과 식별자로 시작하는 PR 제목을 사용하도록 안내받으므로 PR이 태스크에 자동으로 연결됩니다.
+
+초기 버전은 태스크 실행, 진행 상황 동기화, 취소, 영구 실행 기록을 통한 복구를 지원합니다. 채팅, 로컬 디렉터리, 첨부 파일, 원격 QCA Agent 생성은 지원하지 않습니다. 자세한 내용은 [README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md)를 참고하세요.
+
## 런타임 오프라인 문제 해결
다음 순서로 확인하세요.
diff --git a/apps/docs/content/docs/daemon-runtimes.mdx b/apps/docs/content/docs/daemon-runtimes.mdx
index da8569e268..a3e6c35521 100644
--- a/apps/docs/content/docs/daemon-runtimes.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.mdx
@@ -4,51 +4,17 @@ description: How Multica connects computers, discovers AI coding tools, and exec
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RuntimeOfflineDemo } from "@/components/demos/runtime-offline-demo";
Multica records and coordinates the work; connected computers execute it. The **daemon** on a computer claims runs and invokes the AI coding tools installed on that machine.
-## Qoder Cloud Agents remote runtime
-
-Qoder Cloud Agents runs assigned issues through remote QCA sessions. The Multica server supervises a bridge that uses the existing daemon task protocol; no user-operated local daemon is needed for this runtime.
-
-### Before you start
-
-- You need to be a workspace administrator. Each workspace has one Qoder connection.
-- In Qoder, create a personal access token (PAT), at least one environment, and the QCA Agents you want to use. Models, tools, and skills are configured on the QCA Agent in Qoder, not in Multica.
-- Self-hosted installations must set `MULTICA_VCS_SECRET_KEY` on the server: a base64-encoded 32-byte key that stays the same across restarts. Without it, Qoder Cloud Agents does not appear in the **Add** menu.
-
-### Connect Qoder
-
-1. On the **Runtimes** page, click **Add** and choose **Qoder Cloud Agents** under **Cloud services**.
-2. Under **Region**, pick the site that issued your PAT: **Global (qoder.com)** or **China (qoder.com.cn)**. A PAT only works in its own region; if it is rejected, use the button that retries on the other site.
-3. Paste the PAT into **Personal access token**. Once it is verified, the **Environment** list loads from Qoder. A single environment is selected automatically; otherwise choose one.
-4. Optional: open **GitHub authorization** and add a repository URL and token for each repository agents may clone. Agents can only clone repositories authorized here.
-5. Optional: open **Execution** to set concurrent runs (default 3, up to 10) and the run timeout (default 60 minutes, from 5 to 240).
-6. Click **Connect**. Qoder Cloud Agents appears in the cloud section of the Runtimes page and comes online within a few seconds.
-
-### Add an agent
-
-Open Qoder Cloud Agents from the Runtimes page and click **Create an agent with it**, or create an agent as usual and choose the Qoder runtime. In the agent form, select the remote agent under **QCA Agent**. For an existing agent, change the QCA Agent or its default repository in the agent's **Routing** tab. Several Multica agents can share one connection, each linked to a different QCA Agent.
-
-Connection credentials are encrypted and shared within the workspace. Administrators manage the connection; members can select accessible QCA agents. Projects choose the repository and starting branch; the repository's token is passed to QCA when a coding session is created. PAT values are never returned to the browser after saving.
-
-On the Qoder Cloud Agents page, administrators can edit the connection and repositories, **Pause** to stop sending new tasks while keeping credentials and agents, or **Disconnect** to delete the saved tokens, remove the runtime, and unbind its agents.
-
-### How runs work
-
-Runs beyond the concurrency limit wait in the queue. A follow-up on the same issue continues the agent's previous Qoder session when it is idle. An agent can set a default repository, used when the issue's project has none. The agent is asked to push a branch named after the issue identifier and to prefix the pull request title with it, so the pull request is linked to the issue.
-
-This first version supports issue runs, progress reporting, cancellation, and recovery from a persisted run journal. Configure models, tools, and skills in Qoder. Interactive chat, local directories, attachments, and creating remote QCA agents from Multica are not supported. The Runtimes page separates remote runtimes from connected computers.
-
-For standalone bridge setup and operational limitations, see the [Qoder runtime README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md).
-
-
## Daemon vs runtime
- The **daemon** is the Multica background process running on one computer. It connects to the server, discovers local tools, claims runs, and reports results back.
- A **runtime** represents one concrete execution environment available to a workspace. It corresponds to one computer plus one AI coding tool — or one custom runtime profile — on that computer.
-For example, a computer has both Claude Code and Codex installed and is connected to two workspaces. The daemon registers Claude Code and Codex runtimes for each workspace. Restarting the daemon updates the existing records; it does not keep creating new runtimes for the same combination.
+For example, if a computer has both Claude Code and Codex installed and is connected to two workspaces, the daemon registers one Claude Code runtime and one Codex runtime for each workspace. Restarting the daemon updates the existing records; it does not keep creating new runtimes for the same combination.
## Execution location and data boundaries
@@ -57,12 +23,18 @@ The AI coding tools a local runtime invokes, those tools' own login credentials,
So the team can collaborate, the server stores issues, comments, agent configuration, run context, run records, and the results agents write back. That content can include code snippets or other project context an agent chose to read and include in its replies.
<Callout type="warning">
-An agent's custom environment variables are stored server-side and sent to the runtime at execution time. Do not read "local execution" as "every secret exists only on this machine": custom environment variables and MCP configuration live on the server, and their display is limited by the sensitive-value rules.
+"Local execution" does not mean every secret exists only on this machine. An agent's custom environment variables and MCP configuration are stored on the server, and their display is limited by the sensitive-value rules; custom environment variables are sent to the runtime at execution time.
</Callout>
## Starting the daemon
-With Multica Desktop, the app starts the daemon automatically — no extra command needed.
+<Tabs items={["Desktop", "CLI"]}>
+<Tab value="Desktop">
+
+Multica Desktop starts the daemon automatically; no extra command is needed.
+
+</Tab>
+<Tab value="CLI">
On the web, a remote computer, or a headless environment, [install the Multica CLI](/cli) first, then run:
@@ -70,6 +42,9 @@ On the web, a remote computer, or a headless environment, [install the Multica C
multica daemon start
```
+</Tab>
+</Tabs>
+
The daemon runs in the background by default. Common commands:
| Command | Purpose |
@@ -82,42 +57,128 @@ The daemon runs in the background by default. Common commands:
To place run workspaces on another disk, persist a root for the current profile with `multica config set workspaces_root <path>`, or pass `--workspaces-root <path>` to `daemon start` or `daemon restart`. The flag overrides `MULTICA_WORKSPACES_ROOT`, which overrides the profile config. Existing run directories are not moved when the root changes.
-On startup, the daemon detects supported AI coding tools on `PATH` and registers runtimes for the workspaces you are allowed to connect. If a tool was just installed or signed in, restart the daemon to detect it again.
+On startup, the daemon detects supported AI coding tools on `PATH` and registers runtimes for the workspaces you are allowed to connect. If a tool was just installed or signed in, restart the daemon to detect it.
The daemon needs at least one built-in supported AI coding tool detected before it will start. Install methods and executable names are in [Install AI coding tools](/install-agent-runtime).
-## Dispatch and online status
+### Start at login [#autostart]
-Once registered, a runtime keeps a persistent connection. When a new run enters the queue, the server notifies the matching daemon; the daemon also polls periodically as a backstop after connection interruptions. So when a runtime is online with spare capacity, runs usually start immediately.
+A daemon started from the CLI does not come back on its own after a reboot. To have it start automatically, register the current profile:
-The daemon sends a heartbeat every 15 seconds. The server combines heartbeats and connection state to decide whether a runtime is online; after a daemon exits unexpectedly, the runtime usually shows as offline within about 3 minutes at the latest.
+```bash
+multica daemon autostart enable
+multica daemon autostart status
+multica daemon autostart disable
+```
+
+The registered command is `multica daemon start --foreground` for that profile, launched by the OS at login: a Run registry value for the current user on Windows, a LaunchAgent in `~/Library/LaunchAgents` on macOS, and a systemd user unit on Linux, or an XDG autostart entry when no systemd user session is available. For a named profile, add `--profile <name>`; each profile is registered separately.
-![Runtime details for one online computer: the same daemon registered 7 runtimes, one row per detected AI coding tool, each showing online status and CLI version](/images/docs/runtime-machine-detail.webp)
+- Only `enable` creates the registration. `multica daemon start` never registers on its own; it prints a one-line hint when nothing is registered, and when a Multica-created entry exists it refreshes the executable path in it, so upgrading or moving the CLI does not require another `enable`.
+- On macOS and Linux, the login session receives only the `PATH` captured from your shell at `enable` time. Other exported variables (API keys, `HTTPS_PROXY`, and so on) do not carry over. Persist daemon settings with `multica config set` and put other variables in your user environment.
+- A systemd user unit starts at login. To start at boot without logging in, run `loginctl enable-linger <username>` as the `enable` output suggests.
+- `multica daemon stop` stops the running daemon but keeps the registration.
+- If a file Multica did not create already sits at that location (your own systemd unit, for example), `enable` and `disable` refuse to modify it.
+- A daemon launched by Desktop is managed by Desktop; `daemon start` neither hints nor refreshes a registration for it.
+
+## Dispatch and online status
+
+Once registered, a runtime keeps a persistent connection. When a new run enters the queue, the server notifies the matching daemon; the daemon also polls periodically so a dropped connection does not lose the notification. When a runtime is online with spare capacity, runs usually start immediately.
+
+The daemon sends a heartbeat every 15 seconds. The server combines heartbeats and connection state to decide whether a runtime is online; after a daemon exits unexpectedly, the runtime is marked offline within about 3 minutes at the latest. For the first 5 minutes after losing contact, the **Runtimes** page shows it as "Recently lost", then as "Offline".
When a runtime is offline:
-- Runs already queued wait for the runtime to recover. They fail only once it has stopped heartbeating for longer than the reconnect grace **and** the run has itself been queued that long, so a runtime that is merely busy keeps its backlog, and work assigned to an already-offline runtime still gets a full grace to wait.
-- Runs that were in progress fail; eligible issue or chat runs can retry automatically.
+- Runs already queued wait for the runtime to recover; they do not move to another computer. A queued run fails only once the runtime has stopped heartbeating for longer than the reconnect grace **and** the run has itself been queued that long. A runtime that is merely busy keeps its backlog, and work assigned to an already-offline runtime still gets a full grace period to wait.
+- Runs already in progress do not fail right away. They fail with `runtime_offline` only after the runtime's heartbeat has been missing longer than the reconnect grace (`MULTICA_RUNTIME_RECONNECT_GRACE`, 3 hours by default); eligible issue or chat runs can retry automatically.
- When the daemon starts again, it re-registers its runtimes and reclaims runs that did not end cleanly last time.
- A runtime offline for more than 7 days with no agents bound to it (including archived ones) is cleaned up automatically.
+In the demo below, a run assigned while the computer is offline waits in the queue and is claimed only after the computer comes back online.
+
+<RuntimeOfflineDemo />
+
Detailed states and retry rules are in [Runs](/tasks).
## Concurrency limits
One daemon executes at most 20 runs at a time by default; each agent at most 6. Effective concurrency is the smaller of the two.
-Once a limit is reached, new runs keep queueing. You can adjust a single agent's concurrency in the agent settings, and the machine-wide cap through `MULTICA_DAEMON_MAX_CONCURRENT_TASKS`. Parallel runs compete for machine capacity, tool account quota, and the same working directory all at once.
+Once a limit is reached, new runs keep queueing. Adjust a single agent's concurrency in the agent settings, and the machine-wide cap with `MULTICA_DAEMON_MAX_CONCURRENT_TASKS`. Parallel runs compete for machine capacity, tool account quota, and the same working directory all at once.
+
+Token usage, cost, and failures across runs are summarized per workspace on the [Analytics](/analytics) page; `multica runtime usage <runtime-id>` shows token usage for a single runtime.
+
+## Local MCP configuration [#local-mcp]
+
+When an agent has no MCP configuration saved, Multica passes no MCP settings and the tool reads its own configuration on that computer as usual.
+
+Once an agent has an MCP configuration (even an empty one), Multica generates a dedicated configuration for each run and hands it to the tool; Claude Code, for example, loads only that file in strict mode. So that servers already set up on the machine keep working, the daemon reads the tool's user-level MCP configuration on the runtime's computer and merges it with the agent's. For servers with the same name, the first source in this order wins:
+
+1. Servers managed by Multica or assigned from the workspace MCP library on the agent's **MCP** tab;
+2. The tool's user-level configuration file;
+3. Claude Code only: MCP servers bundled with enabled Claude Code plugins. Plugins come from `enabledPlugins` in `~/.claude/settings.json`; the daemon reads each plugin's `.mcp.json` and any MCP files its manifest declares.
-## Runtime sharing
+| Tool | User-level configuration read |
+|---|---|
+| Claude Code | `mcpServers` in `~/.claude.json`, plus MCP servers from enabled plugins |
+| Codex | `mcp_servers` in `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) |
+| Cursor Agent | `mcpServers` in `~/.cursor/mcp.json` |
+| OpenCode | `mcp` in `$XDG_CONFIG_HOME/opencode/opencode.json` (default `~/.config/opencode/opencode.json`) |
+| OpenClaw | `mcp.servers` in `$CLAWDBOT_CONFIG_PATH`, or in `$OPENCLAW_STATE_DIR/openclaw.json` (default `~/.openclaw/openclaw.json`) |
+| CodeArts | `mcp` in `~/.codeartsdoer/codearts_cli.json` or `codearts_cli.jsonc` |
-A local runtime is **private** by default: only the runtime owner can create agents on it. Workspace owners and admins are no exception — the runtime is someone else's computer, and running an agent there spends their machine and their tool credentials.
+CodeBuddy, Kimi CLI, and Pi load their user-level configuration themselves at startup and combine it with what Multica sends, so the daemon does not pre-merge for them; doing so would start the same server twice. CodeBuddy keeps the Multica entry when names collide. Other tools not in the table receive only the agent's configuration.
-Only the runtime owner can make it **public** — workspace admins can rename or delete a runtime, but sharing one is the owner's decision. Other workspace members can then select this runtime as well; that does not share the underlying AI coding tool's login credentials — it only lets members route their agents' runs to this computer.
+The merge happens on the runtime's computer; the commands, URLs, headers, and environment values of local servers are never uploaded. The "Inherited from runtime" list on the agent's **MCP** tab shows only each server's name, transport, source, and whether it is enabled; one shadowed by a same-named agent server is marked "Overridden by Multica". If a local configuration file cannot be parsed, the daemon logs a warning and that run uses only the agent's configuration.
-To share with selected people, open the runtime's detail page, select **Specific members**, choose one or more workspace members, and **Save**. Those members can select the runtime and create agents on it. Only its owner can change the recipient list; recipients do not gain permission to rename, delete, or administer the runtime.
+## Cleanup and retention [#cleanup]
-When the owner removes members, limits a public runtime to specific members, or makes it **private** again, Multica shows the affected agents and active runs, including Agent Builder sessions, before applying the change. Confirmation unbinds those teammates' agents, cancels their queued, dispatched, running, local-directory-waiting and deferred runs with `runtime_access_revoked`, and pauses active autopilots assigned to the unbound agents. Agents and runs belonging to the owner or members who retain access are unaffected. A changed plan requires renewed confirmation; concurrent chat writes may require a retry. To resume work, bind the agent to an accessible runtime, then explicitly resume its paused autopilots.
+The daemon runs its first cleanup about 30 seconds after starting, then every 2 hours. Directories in use by a running run are never cleaned. `multica daemon disk-usage` shows usage per workspace or per run. The durations below are defaults; the matching `MULTICA_GC_*` variables are in [Environment variables](/environment-variables#gc).
+
+### Run directories
+
+Each run gets a directory under the workspaces root (default `~/multica_workspaces`) holding the checked-out code, output, and logs; later runs on the same issue reuse it. The whole directory is removed:
+
+| Run source | When it is removed |
+|---|---|
+| Issue | Once the issue is in a status of the `done` or `closed` category and has not been updated for 24 hours |
+| Chat | 24 hours after the session is archived; on the next cleanup after the session is deleted. Kept for as long as the session is not archived |
+| Autopilot (Run Only), quick create | On the next cleanup after the run ends |
+| No owner found (missing metadata, or the server no longer has the record) | After 72 hours without changes to the directory |
+
+While the issue is still open, 12 hours after a run completes only regenerable content is removed: `node_modules`, `.next`, and `.turbo` directories, plus the cache the daemon prepares for Codex. Everything else stays. A daemon connected to Multica Cloud also removes the whole directory 14 days after the run completes, whether or not the issue is closed; self-hosted daemons do not do this by default.
+
+A run on a project's local directory works in your own directory, which the daemon never touches. The record directory Multica creates for that run (logs and so on) is kept too; only regenerable caches inside it are cleaned.
+
+### Shared repository cache
+
+The daemon keeps one bare-repository cache per workspace repository, under `.repos/<workspace-id>/` in the workspaces root. Runs of the same workspace on this computer share it: each checkout creates a git worktree from the cache and only fetches new commits instead of cloning again. Codex runs on Linux and Windows are the exception and get a standalone clone with `.git` inside the work directory, because Codex's workspace-write sandbox leaves Git metadata outside the work directory read-only.
+
+A cache is removed only when all three hold: no workspace or project references the repository any more, no worktrees remain, and no run has checked out from it for 30 days. It is cloned again when needed. After removing stale agent branches, the daemon runs `git reflog expire --expire=30.days --all` and `git gc --prune=30.days` on the cache while no runs are executing.
+
+### Sessions, memory, and temporary directories
+
+| Data | Location | Retention |
+|---|---|---|
+| Codex session records (one per agent per issue) | `multica-sessions/` in the Codex home (default `~/.codex`) | Removed after 14 days unused; later runs on that issue can no longer resume the earlier Codex session |
+| Hermes session records | `hermes-sessions/` in the Multica config directory (default `~/.multica`; `~/.multica/profiles/<name>` for a named profile) | Removed after 14 days unused |
+| Hermes memory (one per agent) | `hermes-state/` in the same directory | Removed after 90 days unused |
+| Each run's private temporary directory (`TMPDIR`) | `multica-task-*` in the system temp directory | Removed when the run ends; if the daemon was killed, a later cleanup removes it |
+
+### Codex native memory and subagents [#codex-memory]
+
+Daemon-managed Codex runs have Codex native memory turned off by default, so memories from this machine or an earlier run do not carry into another workspace. The setting is written only to that run's own `CODEX_HOME/config.toml` (`features.memories`, `memories.generate_memories`, and `memories.use_memories` all `false`); your `~/.codex/config.toml` is not changed. To keep native memory, set `MULTICA_CODEX_MEMORY=1` in the daemon's environment.
+
+Codex native subagents are off by default as well: Multica treats the run as finished when the parent thread finishes, and results from subagents still working are lost. If you accept that risk, set `MULTICA_CODEX_MULTI_AGENT=1`.
+
+## Runtime sharing [#private-and-public-runtimes]
+
+A local runtime is **private** by default: only the runtime owner can create agents on it, and workspace owners and admins are no exception. The runtime is someone else's computer, and running an agent there uses their machine and their tool credentials.
+
+Only the owner can make it **public**. Workspace admins can rename or delete a runtime, but sharing one is the owner's decision. Once it is public, other workspace members can select this runtime and route their agents' runs to this computer; the underlying AI coding tool's login credentials are not shared.
+
+To share it with selected people instead, open the runtime's detail page, choose **Members**, pick one or more workspace members, and **Save**. Those members can select the runtime and create agents on it. Only the owner can change the list, and being on it does not let anyone rename, delete, or administer the runtime.
+
+When the owner removes members, narrows a public runtime to specific members, or makes it **private** again, Multica shows the affected agents and active runs, including Agent Builder sessions, before applying the change. Confirmation unbinds those teammates' agents, cancels their queued, dispatched, running, local-directory-waiting and deferred runs with `runtime_access_revoked`, and pauses active autopilots assigned to the unbound agents. Agents and runs belonging to the owner or to members who keep access are unaffected. A changed plan requires renewed confirmation; concurrent chat writes may require a retry. To resume work, bind the agent to an accessible runtime, then explicitly resume its paused autopilots.
Cancellation preserves chat history and stores draft/attachment recovery data on the server. Web and desktop use the existing draft recovery UI; mobile does not yet expose that recovery UI. A started turn with no output waits for the daemon's cancellation acknowledgement or the server's finalize grace period before deciding whether to restore the input. A connected daemon observes cancellation through its regular check. If the computer is offline, server-side access is still revoked immediately, but the local process may continue until it receives cancellation after reconnecting; the server cannot guarantee an immediate remote stop.
@@ -145,6 +206,7 @@ The table lists the variables that custom runtimes can use today. It is intentio
| `MULTICA_AGENT_NAME` | Display name of the assigned agent | Informational |
| `MULTICA_DAEMON_PORT` | Local daemon health/API port used by task-only commands such as `multica repo checkout` | Informational |
| `MULTICA_TASK_SLOT` | Slot in the daemon-wide concurrency pool; useful for slot-indexed resources such as GPUs | Informational |
+| `MULTICA_REPO_CHECKOUT_MODE` | Set to `isolated` only in Codex runs on Linux and Windows, so `multica repo checkout` creates a standalone clone with `.git` inside the work directory; unset in other runs | Informational |
| `TMPDIR` | Private temporary directory for the active task; also supplied as `TMP` and `TEMP` except on Windows, where tasks inherit the user's temp paths for Git Bash's shared `/tmp`; Windows Claude Code defaults `CLAUDE_CODE_TMPDIR` to the task temp directory | Informational |
The server determines authorship for requests made with `MULTICA_TOKEN`; writes such as issue comments are attributed to the assigned agent and active task. For the token's complete binding, permissions, attribution, 24-hour maximum lifetime, and cleanup behavior, see [Temporary tokens for agent runs](/auth-tokens#temporary-tokens-for-agent-runs).
@@ -174,11 +236,11 @@ Everything you type in the command field stays directly after the executable, ah
<your command> <your fixed arguments> <Multica's protocol arguments> <the agent's custom arguments>
```
-This is what makes a subcommand-style wrapper work. If your command is `ccms start q36`, the tool sees `start q36` first and can select its subcommand before Multica's `-p` and the rest arrive — which is the only order such a wrapper accepts.
+Subcommand-style wrappers rely on this order. If your command is `ccms start q36`, the tool sees `start q36` first and selects its subcommand before Multica's `-p` and the rest arrive; such a wrapper accepts no other order.
-Your arguments used to be appended last instead. Most flag-style commands parse the same either way, but not all of them do — a command that distinguishes global flags from subcommand flags can care where a flag sits. If you already have a profile with fixed arguments, start one run on it after upgrading to confirm it still works.
+Your arguments used to be appended last. Most flag-style commands parse the same either way, but a command that distinguishes global flags from subcommand flags cares where a flag sits. If you already have a profile with fixed arguments, start one run on it after upgrading to confirm it still works.
-Two more consequences worth knowing:
+Also:
- **Multica's own values win a conflict.** If your fixed arguments set a flag Multica also sets, Multica's value comes later and takes effect. Most importantly, a model chosen on the agent overrides a `--model` pinned in the profile. To pin a model for everyone, leave the agents' model field empty.
- **Protocol-critical flags are ignored.** `-p`, `--output-format`, `--input-format`, `--permission-mode`, and the equivalents for other families are dropped from your fixed arguments, because overriding them would break the daemon's connection to the tool. Subcommands and other positional arguments always pass through.
@@ -197,6 +259,41 @@ multica runtime profile unset-path <profile-id>
Editing a profile only affects runs claimed afterwards. Before deleting a profile, deal with the active agents still bound to its runtimes. Deleting only the runtime instance on one computer does not delete the profile — a running daemon will re-register it.
+## Qoder Cloud Agents remote runtime
+
+Qoder Cloud Agents runs assigned issues through remote QCA sessions. The Multica server supervises a bridge that uses the existing daemon task protocol; no user-operated local daemon is needed for this runtime.
+
+### Before you start
+
+- You need to be a workspace administrator. Each workspace has one Qoder connection.
+- In Qoder, create a personal access token (PAT), at least one environment, and the QCA Agents you want to use. Models, tools, and skills are configured on the QCA Agent in Qoder, not in Multica.
+- Self-hosted installations must set `MULTICA_VCS_SECRET_KEY` on the server: a base64-encoded 32-byte key that stays the same across restarts. Without it, Qoder Cloud Agents does not appear in the **Add** menu.
+
+### Connect Qoder
+
+1. On the **Runtimes** page, click **Add** and choose **Qoder Cloud Agents** under **Cloud services**.
+2. Under **Region**, pick the site that issued your PAT: **Global (qoder.com)** or **China (qoder.com.cn)**. A PAT only works in its own region; if it is rejected, use the button that retries on the other site.
+3. Paste the PAT into **Personal access token**. Once it is verified, the **Environment** list loads from Qoder. A single environment is selected automatically; otherwise choose one.
+4. Optional: open **GitHub authorization** and add a repository URL and token for each repository agents may clone. Agents can only clone repositories authorized here.
+5. Optional: open **Execution** to set concurrent runs (default 3, up to 10) and the run timeout (default 60 minutes, from 5 to 240).
+6. Click **Connect**. Qoder Cloud Agents appears in the cloud section of the Runtimes page and comes online within a few seconds.
+
+### Add an agent
+
+Open Qoder Cloud Agents from the Runtimes page and click **Create an agent with it**, or create an agent as usual and choose the Qoder runtime. In the agent form, select the remote agent under **QCA Agent**. For an existing agent, change the QCA Agent or its default repository in the agent's **Routing** tab. Several Multica agents can share one connection, each linked to a different QCA Agent.
+
+Connection credentials are encrypted and shared within the workspace. Administrators manage the connection; members can select accessible QCA agents. Projects choose the repository and starting branch; the repository's token is passed to QCA when a coding session is created. PAT values are never returned to the browser after saving.
+
+On the Qoder Cloud Agents page, administrators can edit the connection and repositories, **Pause** to stop sending new tasks while keeping credentials and agents, or **Disconnect** to delete the saved tokens, remove the runtime, and unbind its agents.
+
+### How runs work
+
+Runs beyond the concurrency limit wait in the queue. A follow-up on the same issue continues the agent's previous Qoder session when it is idle. An agent can set a default repository, used when the issue's project has none. The agent is asked to push a branch named after the issue identifier and to prefix the pull request title with it, so the pull request is linked to the issue.
+
+This first version supports issue runs, progress reporting, cancellation, and recovery from a persisted run journal. Configure models, tools, and skills in Qoder. Interactive chat, local directories, attachments, and creating remote QCA agents from Multica are not supported. The Runtimes page separates remote runtimes from connected computers.
+
+For standalone bridge setup and operational limitations, see the [Qoder runtime README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md).
+
## Troubleshooting an offline runtime
Check in this order:
diff --git a/apps/docs/content/docs/daemon-runtimes.zh.mdx b/apps/docs/content/docs/daemon-runtimes.zh.mdx
index eb31545573..c29309a374 100644
--- a/apps/docs/content/docs/daemon-runtimes.zh.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.zh.mdx
@@ -4,65 +4,37 @@ description: 了解 Multica 如何连接电脑、发现 AI 编程工具并运行
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RuntimeOfflineDemo } from "@/components/demos/runtime-offline-demo";
-Multica 负责记录和协调工作,连接的电脑负责执行。电脑上的**守护进程**(daemon)领取运行,再调用本机安装的 AI 编程工具。
-
-## Qoder Cloud Agents 远端运行时
-
-Qoder Cloud Agents 通过远端会话执行分配的任务。Multica 服务端管理桥接进程,复用现有守护进程任务协议,无需用户启动本地守护进程。
-
-### 准备工作
-
-- 需要工作区管理员权限。每个工作区只有一个 Qoder 连接。
-- 在 Qoder 中创建个人访问令牌(PAT)、至少一个运行环境,以及要使用的 QCA 智能体。模型、工具和 skill 都在 Qoder 的 QCA 智能体上配置,不在 Multica 中配置。
-- 自托管部署需在服务端设置 `MULTICA_VCS_SECRET_KEY`:一个 base64 编码的 32 字节密钥,重启前后必须保持不变。未设置时,**添加**菜单中不会出现 Qoder Cloud Agents。
-
-### 连接 Qoder
-
-1. 在**运行时**页面点击**添加**,在**云服务**下选择 **Qoder Cloud Agents**。
-2. 在**服务区域**中选择签发 PAT 的站点:**国际站**(qoder.com)或**中国站**(qoder.com.cn)。PAT 只在签发它的站点有效;如果被拒绝,可点击按钮改用另一站点重试。
-3. 将 PAT 粘贴到**个人访问令牌**。验证通过后会从 Qoder 加载**运行环境**列表;只有一个环境时自动选中,否则手动选择。
-4. 可选:展开 **GitHub 仓库授权**,为智能体需要克隆的每个仓库填写仓库 URL 和令牌。智能体只能克隆这里授权过的仓库。
-5. 可选:展开**执行设置**,设置并发运行数(默认 3,最多 10)和运行超时(默认 60 分钟,可设 5 到 240 分钟)。
-6. 点击**连接**。Qoder Cloud Agents 会出现在运行时页面的云服务分组中,几秒内上线。
-
-### 添加智能体
-
-在运行时页面打开 Qoder Cloud Agents,点击**用它创建智能体**;也可以照常创建智能体并选择 Qoder 运行时。在智能体表单的 **QCA 智能体**中选择远端智能体。已有智能体可在**路由**标签页中修改关联的 QCA 智能体或默认仓库。多个 Multica 智能体可以共用同一个连接,各自关联不同的 QCA 智能体。
-
-连接凭证加密保存,在工作区内共享。管理员管理连接,成员可以选择可访问的 QCA 智能体。项目选择仓库和起始分支;创建编码会话时,对应仓库的令牌会传给 QCA。保存后的 PAT 不会返回浏览器。
-
-管理员可以在 Qoder Cloud Agents 页面编辑连接和仓库;点击**暂停**停止下发新任务,凭证和智能体保留;点击**断开连接**删除已保存的令牌、移除该运行时并解绑其智能体。
-
-### 运行方式
-
-超出并发上限的任务会排队等待。同一任务的后续运行会在上一会话空闲时继续使用该 Qoder 会话。智能体可以设置默认仓库,在任务所属项目未绑定仓库时使用。智能体会被要求以任务标识命名分支,并在 PR 标题前加上任务标识,以便 PR 自动关联到任务。
-
-首版支持任务运行、进度同步、取消和基于持久化记录的恢复。模型、工具和 skill 在 Qoder 中配置;暂不支持交互聊天、本地目录、附件,也不支持从 Multica 创建远端 QCA 智能体。运行时页面分别展示远端运行时和电脑。
-
-独立桥接进程的配置与限制见 [Qoder runtime README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md)。
-
+Multica 记录和协调工作,连接上来的电脑负责执行:电脑上的**守护进程**(daemon)领取运行,再调用本机安装的 AI 编程工具。
## 概念区分
- **守护进程**是运行在一台电脑上的 Multica 后台程序。它负责连接服务器、发现本机工具、领取运行和回传结果。
- **运行时**代表一个工作区可以使用的具体执行环境。它对应一台电脑,以及这台电脑上的一款 AI 编程工具或自定义运行时配置。
-例如,一台电脑同时安装了 Claude Code 和 Codex,并连接两个工作区。守护进程会分别为两个工作区注册 Claude Code 和 Codex 运行时。重启守护进程会更新原有记录,不会为同一个组合不断创建新运行时。
+例如,一台电脑装了 Claude Code 和 Codex,连接了两个工作区,守护进程就为每个工作区各注册一条 Claude Code 运行时和一条 Codex 运行时。重启守护进程会更新原有记录,不会为同一个组合反复创建新运行时。
## 执行位置与数据边界
-本地运行时调用的 AI 编程工具、这些工具自己的登录凭据,以及本地代码目录都留在连接的电脑上。Multica 服务器不会代替本地工具执行命令,也不会自动上传整个工作目录。
+本地运行时调用的 AI 编程工具、这些工具自己的登录凭据和本地代码目录,都留在连接的电脑上。Multica 服务器不替本地工具执行命令,也不会自动上传整个工作目录。
为了让团队能够协作,服务器会保存任务、评论、智能体配置、运行上下文、执行记录和智能体写回的结果。这些内容可能包含智能体主动读取并写入回复的代码片段或其他项目上下文。
<Callout type="warning">
-智能体的自定义环境变量保存在服务器侧,并在执行时发送给运行时。不要把"本地执行"理解为所有 secret 都只存在本机;自定义环境变量和 MCP 配置保存在服务器侧,展示受敏感信息规则限制。
+"本地执行"不等于所有 secret 都只存在本机。智能体的自定义环境变量和 MCP 配置保存在服务器侧,展示时受敏感信息规则限制;自定义环境变量会在执行时发送给运行时。
</Callout>
## 启动守护进程
-使用 Multica Desktop 时,应用会自动启动守护进程,不需要额外运行命令。
+<Tabs items={["Desktop", "CLI"]}>
+<Tab value="Desktop">
+
+Multica Desktop 会自动启动守护进程,不需要额外运行命令。
+
+</Tab>
+<Tab value="CLI">
使用 Web、远程电脑或无界面环境时,先[安装 Multica CLI](/cli),再运行:
@@ -70,7 +42,10 @@ Qoder Cloud Agents 通过远端会话执行分配的任务。Multica 服务端
multica daemon start
```
-守护进程默认在后台运行。常用命令如下:
+</Tab>
+</Tabs>
+
+守护进程默认在后台运行。常用命令:
| 命令 | 作用 |
| --- | --- |
@@ -82,42 +57,129 @@ multica daemon start
如需把执行工作目录放到其他磁盘,可用 `multica config set workspaces_root <path>` 为当前 profile 持久化根目录,也可在 `daemon start` 或 `daemon restart` 中传入 `--workspaces-root <path>`。flag 的优先级高于 `MULTICA_WORKSPACES_ROOT`,环境变量又高于 profile 配置。修改根目录不会迁移已有的执行目录。
-启动时,守护进程会检测 `PATH` 中受支持的 AI 编程工具,并为你有权连接的工作区注册运行时。如果一款工具刚刚安装或登录,重启守护进程即可重新检测。
+启动时,守护进程检测 `PATH` 中受支持的 AI 编程工具,为你有权连接的工作区注册运行时。工具刚安装或刚登录时,重启守护进程就会重新检测。
守护进程至少需要检测到一款内置支持的 AI 编程工具才能启动。安装方法和可执行文件名见[安装 AI 编程工具](/install-agent-runtime)。
+### 开机自启 [#autostart]
+
+用 CLI 启动的守护进程默认不会随电脑重启自动恢复。需要的话,为当前 profile 登记开机自启:
+
+```bash
+multica daemon autostart enable
+multica daemon autostart status
+multica daemon autostart disable
+```
+
+登记的命令是这个 profile 的 `multica daemon start --foreground`,由系统在登录时拉起:Windows 写入当前用户的 Run 注册表项,macOS 写入 `~/Library/LaunchAgents` 下的 LaunchAgent,Linux 写入 systemd 用户单元,没有 systemd 用户会话时改用 XDG autostart 条目。使用命名 profile 时加 `--profile <name>`,每个 profile 单独登记。
+
+- 只有 `enable` 会创建登记。`multica daemon start` 不会自己登记,只在没有登记时提示一行;已有 Multica 创建的登记时,它会顺手更新其中的可执行文件路径,升级或挪动 CLI 后不必重新 `enable`。
+- 在 macOS 和 Linux 上,登录会话只带上 `enable` 时 shell 里的 `PATH`,shell 导出的其他变量(API key、`HTTPS_PROXY` 等)都不会带过去。守护进程配置用 `multica config set` 持久化,其他变量放进用户级环境。
+- Linux 的 systemd 用户单元在登录时启动。要在开机后不登录也启动,按 `enable` 输出的提示运行 `loginctl enable-linger <用户名>`。
+- `multica daemon stop` 只停止当前进程,不删除登记。
+- 同一位置已有不是 Multica 创建的文件(例如你自己写的 systemd 单元)时,`enable` 和 `disable` 都会拒绝修改它。
+- Desktop 拉起的守护进程由 Desktop 管理,`daemon start` 不会为它提示或更新登记。
+
## 派发与在线状态
-运行时注册后会持续保持连接。新运行入队时,服务器会通知对应守护进程;守护进程也会定期轮询,作为连接中断后的补充。因此运行时在线且有空闲容量时,运行通常会立即开始。
+运行时注册后保持连接。新运行入队时,服务器通知对应的守护进程;守护进程也会定期轮询,防止连接中断时漏掉通知。所以运行时在线、又有空闲容量时,运行通常立即开始。
-守护进程每 15 秒发送一次心跳。服务端综合心跳与连接状态判断运行时是否在线;守护进程意外退出后,最迟通常会在约 3 分钟内显示为离线。
+守护进程每 15 秒发送一次心跳。服务端综合心跳与连接状态判断运行时是否在线;守护进程意外退出后,最迟约 3 分钟会被判为离线。**运行时**页面在失联的头 5 分钟里显示"最近失联",之后显示"离线"。
-![一台在线电脑的运行时详情:同一守护进程注册了 7 个运行时,每款检测到的 AI 编程工具各占一行,均显示在线状态与 CLI 版本](/images/docs/runtime-machine-detail.webp)
运行时离线时:
-- 已经排队的运行会等待运行时恢复,只有当它心跳缺席超过重连宽限期**且**该运行自己也已排队满这么久时才会失败;所以运行时只是忙的话积压会一直保留,指派给已离线运行时的工作也仍然有完整一个宽限期可以等待。
-- 正在执行的运行会失败;符合条件的任务或对话运行可以自动重试。
+- 已经排队的运行等待运行时恢复,不会转到其他电脑。只有运行时心跳缺席超过重连宽限期,**并且**这条运行自己也已排队满这么久,它才会失败。运行时只是忙的话,积压会一直保留;指派给已离线运行时的工作,也有完整的一个宽限期可以等。
+- 正在执行的运行不会马上失败。运行时心跳缺席超过重连宽限期(`MULTICA_RUNTIME_RECONNECT_GRACE`,默认 3 小时)后,它们才以 `runtime_offline` 失败;符合条件的任务或对话运行可以自动重试。
- 守护进程重新启动后,会重新注册运行时,并回收上一次没有正常结束的运行。
- 离线超过 7 天且没有任何智能体(包括已归档的)绑定的运行时,会被自动清理。
+下面的演示里,电脑离线时分配的运行一直在队列里等,电脑重新上线后才被领取。
+
+<RuntimeOfflineDemo />
+
详细状态和重试规则见[运行](/tasks)。
## 并发限制
一台守护进程默认最多同时执行 20 次运行;每个智能体默认最多同时执行 6 次。实际并发取两者中的较小值。
-达到上限后,新运行会继续排队。你可以在智能体设置中调整单个智能体的并发数,也可以通过 `MULTICA_DAEMON_MAX_CONCURRENT_TASKS` 调整整台电脑的上限。并行执行会同时占用机器性能、工具账号额度和同一工作目录。
+达到上限后,新运行继续排队。单个智能体的并发数在智能体设置中调整,整台电脑的上限用 `MULTICA_DAEMON_MAX_CONCURRENT_TASKS` 调整。并行执行会同时占用机器性能、工具账号额度和同一工作目录。
+
+运行消耗的 token、费用和失败情况在[统计](/analytics)页按工作区汇总;单条运行时的 token 用量也可以用 `multica runtime usage <runtime-id>` 查看。
+
+## 本机 MCP 配置 [#local-mcp]
+
+智能体没有保存 MCP 配置时,Multica 不向工具传任何 MCP 设置,工具照常读取这台电脑上它自己的配置。
+
+智能体有 MCP 配置后(哪怕是空配置),Multica 会为每次运行生成一份专用配置交给工具,例如 Claude Code 会以严格模式只加载这份配置。为了不让本机已有的服务器因此失效,守护进程会在运行时所在的电脑上读取该工具的用户级 MCP 配置,再和智能体的配置合并。同名服务器按以下顺序取第一个:
+
+1. 智能体 **MCP** 标签页中由 Multica 管理或从工作区 MCP 库分配的服务器;
+2. 工具的用户级配置文件;
+3. 仅 Claude Code:已启用的 Claude Code 插件自带的 MCP 服务器。插件取自 `~/.claude/settings.json` 的 `enabledPlugins`,读取插件目录下的 `.mcp.json` 和插件清单里声明的 MCP 文件。
-## 运行时共享
+| 工具 | 读取的用户级配置 |
+|---|---|
+| Claude Code | `~/.claude.json` 的 `mcpServers`,以及已启用插件的 MCP 服务器 |
+| Codex | `$CODEX_HOME/config.toml`(默认 `~/.codex/config.toml`)的 `mcp_servers` |
+| Cursor Agent | `~/.cursor/mcp.json` 的 `mcpServers` |
+| OpenCode | `$XDG_CONFIG_HOME/opencode/opencode.json`(默认 `~/.config/opencode/opencode.json`)的 `mcp` |
+| OpenClaw | `$CLAWDBOT_CONFIG_PATH`,或 `$OPENCLAW_STATE_DIR/openclaw.json`(默认 `~/.openclaw/openclaw.json`)的 `mcp.servers` |
+| CodeArts | `~/.codeartsdoer/codearts_cli.json` 或 `codearts_cli.jsonc` 的 `mcp` |
-本地运行时默认是**私有**的:只有运行时所有者可以在它上面创建智能体。工作区的 owner、admin 也不例外——运行时是别人的电脑,在上面跑智能体消耗的是对方的机器和工具凭据。
+CodeBuddy、Kimi CLI 和 Pi 启动时会自己加载用户级配置,并与 Multica 下发的配置合并,守护进程不再预先合并,否则同一个服务器会启动两次。CodeBuddy 遇到同名服务器时以 Multica 下发的为准。表外的其他工具只收到智能体的配置。
-只有运行时所有者可以把它改为**公开**——管理员可以重命名或删除运行时,但要不要共享由所有者决定。公开后,工作区中的其他成员也可以选择这条运行时;这不会分享底层 AI 编程工具的登录凭据,只是允许成员把智能体的执行路由到这台电脑。
+合并在运行时所在的电脑上完成,本机服务器的命令、URL、请求头和环境变量不会上传。智能体 **MCP** 标签页的"从运行时继承"一栏只显示服务器名称、传输方式、来源和是否启用;被智能体同名服务器覆盖的会标为"已由 Multica 覆盖"。本机配置文件无法解析时,守护进程记一条警告日志,这次运行只使用智能体的配置。
-如需仅向部分成员开放,在运行时详情中选择**指定成员**,勾选一位或多位工作区成员,然后**保存**。所选成员可以选择该运行时并创建智能体。只有所有者能修改共享名单;获得共享权限不会同时获得重命名、删除或管理运行时的权限。
+## 清理与保留 [#cleanup]
-所有者移除共享成员、将公开范围改为指定成员,或重新设为**私有**时,Multica 会先展示受影响的智能体和活动运行,包括智能体构建会话。确认后会解绑其他成员的这些智能体,以 `runtime_access_revoked` 取消其排队中、已调度、执行中、等待本地目录和延迟中的运行,并暂停分配给这些智能体的已启用自动化。所有者和仍有权限成员的智能体与运行不受影响。影响范围变化时需要重新确认;遇到并发聊天写入时可能需要重试。恢复工作时,请先将智能体绑定到可用的运行时,再手动恢复已暂停的自动化。
+守护进程启动约 30 秒后清理一次,之后每 2 小时一次。正在执行的运行用到的目录不会被清理。`multica daemon disk-usage` 可以按工作区或按运行查看占用。下文的时长都是默认值,对应的 `MULTICA_GC_*` 变量见[环境变量](/environment-variables#gc)。
+
+### 运行目录
+
+每次运行在工作目录根目录(默认 `~/multica_workspaces`)下有一个目录,放检出的代码、输出和日志;同一任务的后续运行会续用它。整个目录在以下时机删除:
+
+| 运行来源 | 删除时机 |
+|---|---|
+| 任务 | 任务进入 `done` 或 `closed` 分类的状态,并且超过 24 小时没有更新 |
+| 聊天 | 会话归档 24 小时后;会话被删除后的下一轮清理。会话未归档时一直保留 |
+| 自动化(仅运行)、快速创建 | 运行结束后的下一轮清理 |
+| 找不到归属(目录缺少元数据,或服务器上已没有对应记录) | 目录 72 小时没有改动 |
+
+任务仍未关闭时,运行完成 12 小时后只删可以重新生成的内容:目录中的 `node_modules`、`.next`、`.turbo`,以及守护进程为 Codex 准备的缓存,其余保留。连接 Multica Cloud 的守护进程还会在运行完成 14 天后删除整个目录,不论任务是否关闭;自托管默认不做这一步。
+
+项目本地目录上的运行直接改你自己的目录,守护进程不会动它;Multica 为这次运行另建的记录目录(日志等)也会保留,只清理其中可再生成的缓存。
+
+### 共享的仓库缓存
+
+守护进程为每个工作区的仓库保留一份裸仓库缓存,位置在工作目录根目录下的 `.repos/<工作区 ID>/`。这台电脑上同一工作区的运行共用这份缓存:每次检出从缓存创建 git worktree,只拉取新提交,不重新克隆。Linux 和 Windows 上的 Codex 运行例外,会从缓存得到一份 `.git` 在工作目录内的独立克隆,因为在 Codex 的 workspace-write 沙箱下,工作目录外的 Git 元数据是只读的。
+
+缓存在三个条件同时满足时删除:已经没有工作区或项目引用这个仓库,没有剩余 worktree,并且 30 天内没有运行从它检出。之后需要时会重新克隆。清理删掉过期的智能体分支后,守护进程会在没有运行执行时对缓存运行 `git reflog expire --expire=30.days --all` 和 `git gc --prune=30.days`。
+
+### 会话、记忆与临时目录
+
+| 数据 | 位置 | 保留 |
+|---|---|---|
+| Codex 会话记录(每个智能体、每个任务一份) | Codex 目录(默认 `~/.codex`)下的 `multica-sessions/` | 14 天未使用后删除;之后这个任务的运行无法续接原来的 Codex 会话 |
+| Hermes 会话记录 | Multica 配置目录(默认 `~/.multica`,命名 profile 为 `~/.multica/profiles/<name>`)下的 `hermes-sessions/` | 14 天未使用后删除 |
+| Hermes 记忆(每个智能体一份) | 同一目录下的 `hermes-state/` | 90 天未使用后删除 |
+| 每次运行的私有临时目录(`TMPDIR`) | 系统临时目录下的 `multica-task-*` | 运行结束后删除,守护进程被强制结束时由之后的清理补删 |
+
+### Codex 原生记忆与子智能体 [#codex-memory]
+
+守护进程管理的 Codex 运行默认关闭 Codex 原生记忆,避免本机或前一次运行留下的记忆带进别的工作区。设置只写入这次运行专用的 `CODEX_HOME/config.toml`(`features.memories` 和 `memories.generate_memories`、`memories.use_memories` 均为 `false`),不改你的 `~/.codex/config.toml`。需要保留原生记忆时,在守护进程的环境中设置 `MULTICA_CODEX_MEMORY=1`。
+
+Codex 原生子智能体同样默认关闭:父线程结束时,Multica 就把这次运行判为结束,仍在执行的子智能体的结果会丢失。接受这个风险的话,设置 `MULTICA_CODEX_MULTI_AGENT=1`。
+
+## 运行时共享 [#私有与公开]
+
+本地运行时默认是**私有**的:只有运行时所有者可以在它上面创建智能体,工作区的 owner、admin 也不例外。运行时是别人的电脑,在上面跑智能体,用的是对方的机器和工具凭据。
+
+也只有所有者可以把它改为**公开**。管理员可以重命名或删除运行时,但要不要共享由所有者决定。公开后,工作区中的其他成员也可以选择这条运行时,把智能体的执行路由到这台电脑;底层 AI 编程工具的登录凭据不会因此共享。
+
+只想开放给部分成员时,在运行时详情中选择**指定成员**,勾选一位或多位工作区成员,然后**保存**。这些成员可以选择该运行时并在上面创建智能体。只有所有者能修改名单;在名单上不代表可以重命名、删除或管理这条运行时。
+
+所有者移除共享成员、把公开运行时改为指定成员,或重新设为**私有**时,Multica 会先展示受影响的智能体和活动运行,包括智能体构建会话。确认后会解绑其他成员的这些智能体,以 `runtime_access_revoked` 取消其排队中、已调度、执行中、等待本地目录和延迟中的运行,并暂停分配给这些智能体的已启用自动化。所有者和仍有权限的成员,其智能体与运行不受影响。影响范围变化时需要重新确认;遇到并发聊天写入时可能需要重试。恢复工作时,请先将智能体绑定到可用的运行时,再手动恢复已暂停的自动化。
取消会保留聊天历史,并在服务端保存草稿和附件恢复数据。网页端和桌面端沿用现有的草稿恢复入口;移动端暂未提供该入口。已开始但尚无输出的运行,会等待守护进程确认取消或服务端收尾宽限期结束,再决定是否恢复输入。已连接的守护进程通过常规检查接收取消。电脑离线时,服务端仍会立即撤销访问,但本地进程可能继续执行,直到重新连接并收到取消;服务端无法保证立即远程停止。
@@ -125,7 +187,7 @@ multica daemon start
如果团队使用内部 wrapper、固定版本的可执行文件,或需要为一款兼容工具追加固定参数,可以创建**自定义运行时配置**。
-自定义配置不会增加新的通信协议。创建时仍需选择一种 Multica 已支持的协议族(工具的对接协议类型,见 [AI 编程工具对照](/providers));命令本身必须与该协议兼容。
+自定义配置不增加新的通信协议。创建时要选择一种 Multica 已支持的协议族(工具的对接协议类型,见 [AI 编程工具对照](/providers));命令本身必须与该协议兼容。
### Task 运行时环境
@@ -145,12 +207,13 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 被指派智能体的显示名称 | 仅供参考 |
| `MULTICA_DAEMON_PORT` | 本地守护进程的健康检查/API 端口,供 `multica repo checkout` 等仅限 task 的命令使用 | 仅供参考 |
| `MULTICA_TASK_SLOT` | 守护进程全局并发池中的槽位,可用于 GPU 等按槽位编号的资源 | 仅供参考 |
+| `MULTICA_REPO_CHECKOUT_MODE` | 只在 Linux 和 Windows 的 Codex 运行中设为 `isolated`,让 `multica repo checkout` 生成 `.git` 在工作目录内的独立克隆;其他运行不设置 | 仅供参考 |
| `TMPDIR` | 当前 task 的私有临时目录;也会以 `TMP` 和 `TEMP` 提供,但在 Windows 上 task 会继承用户临时路径以维持 Git Bash 的共享 `/tmp`;Windows 上的 Claude Code 会将 `CLAUDE_CODE_TMPDIR` 默认设为 task 临时目录 | 仅供参考 |
使用 `MULTICA_TOKEN` 发起请求时,作者身份由服务端决定;任务评论等写入操作会归属到被指派的智能体和当前 task。令牌的完整绑定关系、权限、归属方式、最长 24 小时的有效期和清理规则见[智能体执行的临时令牌](/auth-tokens#智能体执行的临时令牌)。
<Callout type="warning">
-这些值存在于运行时进程的实际环境中。运行时启动的任何子进程默认都会继承全部变量,包括 `MULTICA_TOKEN`。如果子进程不应持有该凭据,必须显式移除;不要假定进程之间存在并没有的隔离。反过来,有些工具会过滤自己的子进程环境,因此可能需要显式放行变量。例如,Codex 的 shell 工具会丢弃名称中含有 `TOKEN`、`KEY` 或 `SECRET` 的变量,所以守护进程会安装托管的 shell 策略,放行所需的 task 变量。令牌只能存在于进程环境中,不得写入 prompt、日志、仓库文件或持久配置。子进程与父 task 共享身份和权限,不会获得新的独立作用域身份。
+这些值存在于运行时进程的实际环境中。运行时启动的任何子进程默认都会继承全部变量,包括 `MULTICA_TOKEN`。子进程不应持有该凭据时,必须显式移除,进程之间没有自动隔离。反过来,有些工具会过滤自己的子进程环境,这时可能需要显式放行变量。例如,Codex 的 shell 工具会丢弃名称中含有 `TOKEN`、`KEY` 或 `SECRET` 的变量,所以守护进程会安装托管的 shell 策略,放行所需的 task 变量。令牌只能存在于进程环境中,不得写入 prompt、日志、仓库文件或持久配置。子进程与父 task 共享身份和权限,不会获得新的独立作用域身份。
</Callout>
### 创建配置
@@ -174,11 +237,11 @@ multica daemon start
<你的命令> <你的固定参数> <Multica 的协议参数> <Agent 的自定义参数>
```
-带子命令的 wrapper 正是依靠这个顺序才能工作。如果命令是 `ccms start q36`,工具会先看到 `start q36`,在 Multica 的 `-p` 等参数到达之前完成子命令选择——这类 wrapper 只接受这一种顺序。
+带子命令的 wrapper 靠这个顺序工作。命令是 `ccms start q36` 时,工具先看到 `start q36`,在 Multica 的 `-p` 等参数到达之前选好子命令;这类 wrapper 只接受这一种顺序。
-此前这里填写的参数是追加在最后的。多数 flag 形式的命令在两种位置下解析结果相同,但并非全部——如果某个命令区分全局 flag 和子命令 flag,它就会在意 flag 的位置。如果你已经配置了带固定参数的 profile,升级后请发起一次运行,确认它仍能正常启动。
+这里的参数以前追加在最后。多数 flag 形式的命令在两种位置下解析结果相同,但区分全局 flag 和子命令 flag 的命令会在意位置。已经配置了带固定参数的 profile 的,升级后请发起一次运行,确认它仍能正常启动。
-另有两点需要注意:
+另外:
- **冲突时以 Multica 的值为准。** 如果固定参数设置了 Multica 也会设置的 flag,Multica 的值排在后面并最终生效。最典型的是:在 Agent 上选择的模型会覆盖 profile 里固定的 `--model`。若要为所有人固定模型,请把 Agent 的模型字段留空。
- **协议关键 flag 会被忽略。** `-p`、`--output-format`、`--input-format`、`--permission-mode` 以及其他协议族的对应 flag 会从固定参数中被剔除,因为覆盖它们会切断 daemon 与工具之间的通信。子命令和其他位置参数始终原样传递。
@@ -195,7 +258,42 @@ multica runtime profile set-path <profile-id> --path /absolute/path/to/command
multica runtime profile unset-path <profile-id>
```
-修改配置只影响之后领取的运行。删除配置前,需要先处理仍绑定在对应运行时上的活动智能体。只删除某台电脑上的运行时实例并不会删除配置,运行中的守护进程还会重新注册它。
+修改配置只影响之后领取的运行。删除配置前,需要先处理仍绑定在对应运行时上的活动智能体。只删除某台电脑上的运行时实例不会删除配置,运行中的守护进程还会重新注册它。
+
+## Qoder Cloud Agents 远端运行时
+
+Qoder Cloud Agents 通过远端会话执行分配的任务。Multica 服务端管理桥接进程,复用现有守护进程任务协议,无需用户启动本地守护进程。
+
+### 准备工作
+
+- 需要工作区管理员权限。每个工作区只有一个 Qoder 连接。
+- 在 Qoder 中创建个人访问令牌(PAT)、至少一个运行环境,以及要使用的 QCA 智能体。模型、工具和 skill 都在 Qoder 的 QCA 智能体上配置,不在 Multica 中配置。
+- 自托管部署需在服务端设置 `MULTICA_VCS_SECRET_KEY`:一个 base64 编码的 32 字节密钥,重启前后必须保持不变。未设置时,**添加**菜单中不会出现 Qoder Cloud Agents。
+
+### 连接 Qoder
+
+1. 在**运行时**页面点击**添加**,在**云服务**下选择 **Qoder Cloud Agents**。
+2. 在**服务区域**中选择签发 PAT 的站点:**国际站**(qoder.com)或**中国站**(qoder.com.cn)。PAT 只在签发它的站点有效;如果被拒绝,可点击按钮改用另一站点重试。
+3. 将 PAT 粘贴到**个人访问令牌**。验证通过后会从 Qoder 加载**运行环境**列表;只有一个环境时自动选中,否则手动选择。
+4. 可选:展开 **GitHub 仓库授权**,为智能体需要克隆的每个仓库填写仓库 URL 和令牌。智能体只能克隆这里授权过的仓库。
+5. 可选:展开**执行设置**,设置并发运行数(默认 3,最多 10)和运行超时(默认 60 分钟,可设 5 到 240 分钟)。
+6. 点击**连接**。Qoder Cloud Agents 会出现在运行时页面的云服务分组中,几秒内上线。
+
+### 添加智能体
+
+在运行时页面打开 Qoder Cloud Agents,点击**用它创建智能体**;也可以照常创建智能体并选择 Qoder 运行时。在智能体表单的 **QCA 智能体**中选择远端智能体。已有智能体可在**路由**标签页中修改关联的 QCA 智能体或默认仓库。多个 Multica 智能体可以共用同一个连接,各自关联不同的 QCA 智能体。
+
+连接凭证加密保存,在工作区内共享。管理员管理连接,成员可以选择可访问的 QCA 智能体。项目选择仓库和起始分支;创建编码会话时,对应仓库的令牌会传给 QCA。保存后的 PAT 不会返回浏览器。
+
+管理员可以在 Qoder Cloud Agents 页面编辑连接和仓库;点击**暂停**停止下发新任务,凭证和智能体保留;点击**断开连接**删除已保存的令牌、移除该运行时并解绑其智能体。
+
+### 运行方式
+
+超出并发上限的任务会排队等待。同一任务的后续运行会在上一会话空闲时继续使用该 Qoder 会话。智能体可以设置默认仓库,在任务所属项目未绑定仓库时使用。智能体会被要求以任务标识命名分支,并在 PR 标题前加上任务标识,以便 PR 自动关联到任务。
+
+首版支持任务运行、进度同步、取消和基于持久化记录的恢复。模型、工具和 skill 在 Qoder 中配置;暂不支持交互聊天、本地目录、附件,也不支持从 Multica 创建远端 QCA 智能体。运行时页面分别展示远端运行时和电脑。
+
+独立桥接进程的配置与限制见 [Qoder runtime README](https://github.com/multica-ai/multica/blob/main/server/cmd/qoder-runtime/README.md)。
## 运行时离线的排查
diff --git a/apps/docs/content/docs/desktop-app.fr.mdx b/apps/docs/content/docs/desktop-app.fr.mdx
index b422865a8b..0561393ded 100644
--- a/apps/docs/content/docs/desktop-app.fr.mdx
+++ b/apps/docs/content/docs/desktop-app.fr.mdx
@@ -4,6 +4,9 @@ description: Installez Multica Desktop, utilisez les onglets de Desktop et le da
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { DesktopTabsDemo } from "@/components/demos/desktop-tabs-demo";
Multica Desktop est disponible pour macOS, Windows et Linux. Il utilise le même compte et les mêmes données d'espace de travail que l'application web, mais il gère automatiquement le daemon sur votre machine et conserve un ensemble d'onglets distinct pour chaque espace de travail.
@@ -22,6 +25,8 @@ Vous pouvez être connecté aux deux en même temps. Tant qu'ils se connectent a
## Installation
+<Steps>
+<Step>
Choisissez le programme d'installation correspondant à votre système d'exploitation et à l'architecture de votre processeur sur la [page de téléchargement de Multica](https://multica.ai/download) :
| Plateforme | Programme d'installation |
@@ -29,8 +34,11 @@ Choisissez le programme d'installation correspondant à votre système d'exploit
| macOS | `.dmg` |
| Windows | `.exe` |
| Linux | `.AppImage`, `.deb` ou `.rpm` |
-
+</Step>
+<Step>
Après l'installation, connectez-vous avec la même adresse e-mail que sur le web. Une fois connecté, Desktop démarre son propre CLI Multica intégré et détecte les outils de codage IA déjà installés sur la machine.
+</Step>
+</Steps>
<Callout type="info">
Le CLI intégré à Desktop sert uniquement au runtime géré par l'application. Si vous voulez aussi exécuter des commandes comme `multica issue` dans un terminal, installez le CLI séparément en suivant l'[étape 2 du démarrage rapide](/cloud-quickstart#2-connectez-un-ordinateur).
@@ -40,7 +48,9 @@ Le CLI intégré à Desktop sert uniquement au runtime géré par l'application.
Desktop enregistre les onglets par espace de travail. Par exemple, si vous ouvrez trois tâches dans l'espace de travail A puis passez à l'espace de travail B, vous voyez les onglets propres à B ; revenez à A et les trois onglets précédents sont toujours là.
-Une même ressource ne s'ouvre qu'une seule fois dans l'espace de travail courant. Les onglets peuvent être réordonnés, épinglés et fermés, et chacun conserve son propre historique de navigation avant/arrière et sa position de défilement. Cliquer sur un lien de l'application pour ce déploiement, ou le coller, l'ouvre directement dans un onglet au lieu de basculer vers le navigateur.
+<DesktopTabsDemo />
+
+Une même ressource ne s'ouvre qu'une seule fois dans l'espace de travail courant. Les onglets peuvent être réordonnés, épinglés et fermés, et chacun conserve son propre historique de navigation avant/arrière et sa position de défilement. Les onglets épinglés se placent à gauche et n'ont pas de bouton de fermeture ; désépinglez un onglet pour le fermer. Ouvrir une autre page depuis un onglet épinglé crée un nouvel onglet, et l'onglet épinglé reste sur sa page. Cliquer sur un lien de l'application pour ce déploiement, ou le coller, l'ouvre directement dans un onglet au lieu de basculer vers le navigateur.
La déconnexion efface tous les onglets enregistrés sur la machine : la personne suivante qui se connecte ne voit jamais les pages laissées par le compte précédent.
@@ -64,29 +74,53 @@ Les mises à jour sont distribuées par système d'exploitation et par architect
- Windows arm64 et macOS x64 (Intel) utilisent chacun leur propre flux de mise à jour ;
- toutes les autres architectures utilisent le flux par défaut ;
-- l'application sélectionne automatiquement le bon flux de mise à jour — aucun choix manuel n'est nécessaire ;
+- l'application sélectionne automatiquement le bon flux de mise à jour, sans choix manuel ;
- sous Linux, la mise à jour automatique ne fonctionne qu'avec `.AppImage` ; mettez à jour `.deb` et `.rpm` en installant un nouveau paquet par-dessus l'ancien ;
- si la mise à jour automatique échoue, réinstallez de la même façon par-dessus avec le programme d'installation correspondant, disponible sur la page de téléchargement.
## Se connecter à une instance auto-hébergée
-Desktop se connecte par défaut à Multica Cloud. Pour vous connecter à une instance auto-hébergée, créez `desktop.json` dans le répertoire `.multica` de votre répertoire personnel :
+Desktop se connecte par défaut à Multica Cloud. Pour vous connecter à une instance auto-hébergée, créez `desktop.json` dans le répertoire `.multica` de votre répertoire personnel, avec ce contenu :
+
+```json
+{
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
+}
+```
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
| Plateforme | Chemin |
| --- | --- |
| macOS | `/Users/<you>/.multica/desktop.json` |
| Linux | `/home/<you>/.multica/desktop.json` |
-| Windows | `C:\Users\<you>\.multica\desktop.json` |
-Ce sont les emplacements par défaut — si votre répertoire personnel a été déplacé ou redirigé, utilisez son chemin réel.
+</Tab>
+<Tab value="Windows">
-```json
+Le chemin du fichier est `C:\Users\<you>\.multica\desktop.json`.
+
+Le Bloc-notes et la redirection PowerShell produisent facilement un fichier que Desktop ne peut pas lire (voir [Windows : vérifier le nom et l'encodage du fichier](#windows--vérifier-le-nom-et-lencodage-du-fichier)) ; créez-le plutôt depuis PowerShell en une seule étape :
+
+```powershell
+$dir = "$env:USERPROFILE\.multica"
+New-Item -ItemType Directory -Force $dir | Out-Null
+$json = @'
{
"schemaVersion": 1,
"apiUrl": "https://api.example.com"
}
+'@
+[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
```
+</Tab>
+</Tabs>
+
+Ce sont les emplacements par défaut. Si votre répertoire personnel a été déplacé ou redirigé, utilisez son chemin réel.
+
<Callout type="warning">
Il ne s'agit **pas** du `~/.multica/config.json` du CLI, et les noms de clés diffèrent : le CLI utilise `server_url`, Desktop utilise `apiUrl`. Desktop ne lit jamais la configuration du CLI — il gère un profil de daemon distinct dans `~/.multica/profiles/desktop-<host>/`. Modifier `config.json` ne change pas le serveur auquel Desktop se connecte.
</Callout>
@@ -111,49 +145,37 @@ En général, `apiUrl` seul suffit. Ne les définissez explicitement que si la d
}
```
-Redémarrez Desktop après l'enregistrement — le fichier n'est lu qu'une fois, au démarrage. Les deux modes d'échec se manifestent différemment, ce qui est le moyen le plus rapide de les distinguer :
+Redémarrez Desktop après l'enregistrement : le fichier n'est lu qu'une fois, au démarrage. Les deux modes d'échec se manifestent différemment :
-- **Fichier introuvable** (mauvais répertoire, ou nom de fichier qui n'est pas exactement `desktop.json`) — Desktop utilise la configuration Cloud par défaut et n'affiche aucune erreur. Donc, si Desktop indique toujours une adresse Cloud sans aucune erreur de configuration, le fichier ne se trouve pas là où Desktop le cherche.
-- **Fichier trouvé mais invalide** (JSON, version ou URL) — Desktop affiche une erreur de configuration et ne se rabat pas sur Cloud.
+- **Fichier introuvable** (mauvais répertoire, ou nom de fichier qui n'est pas exactement `desktop.json`) : Desktop utilise la configuration Cloud par défaut et n'affiche aucune erreur. Donc, si Desktop indique toujours une adresse Cloud sans aucune erreur de configuration, le fichier ne se trouve pas là où Desktop le cherche.
+- **Fichier trouvé mais invalide** (JSON, version ou URL) : Desktop affiche une erreur de configuration et ne se rabat pas sur Cloud.
Supprimez le fichier et redémarrez pour revenir à la configuration Cloud par défaut.
<Callout type="warning">
-Desktop ne peut se connecter qu'à des adresses joignables à la fois depuis le navigateur et depuis la machine d'exécution. Si une instance auto-hébergée distante n'utilise pas HTTPS ou ne fait pas passer le WebSocket par son proxy, Desktop ne peut pas établir de connexion ; consultez le [démarrage rapide en auto-hébergement](/self-host-quickstart#3-choisir-le-mode-daccès) pour la configuration complète.
+Desktop ne peut se connecter qu'à des adresses joignables à la fois depuis le navigateur et depuis la machine d'exécution. Si une instance auto-hébergée distante n'utilise pas HTTPS ou ne fait pas passer le WebSocket par son proxy, Desktop ne peut pas établir de connexion ; consultez le [démarrage rapide en auto-hébergement](/self-host-quickstart#remote-access) pour la configuration complète.
</Callout>
### Windows : vérifier le nom et l'encodage du fichier
-Deux comportements par défaut des éditeurs Windows produisent silencieusement un fichier que Desktop ne peut pas utiliser :
+Deux façons courantes d'écrire le fichier sous Windows produisent un fichier que Desktop ne peut pas lire :
-- **Le Bloc-notes ajoute `.txt`.** Enregistrer sous `desktop.json` peut produire `desktop.json.txt`, que Desktop considère comme introuvable. Activez l'affichage des extensions de noms de fichiers dans l'Explorateur de fichiers, ou choisissez *Tous les fichiers* dans la boîte de dialogue d'enregistrement. Pour voir le vrai nom du fichier, exécutez `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"` dans PowerShell — la colonne `Name` doit indiquer exactement `desktop.json`.
+- **Le Bloc-notes ajoute `.txt`.** Enregistrer sous `desktop.json` peut produire `desktop.json.txt`, que Desktop considère comme introuvable. Activez l'affichage des extensions de noms de fichiers dans l'Explorateur de fichiers, ou choisissez *Tous les fichiers* dans la boîte de dialogue d'enregistrement. Pour voir le vrai nom du fichier, exécutez `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"` dans PowerShell ; la colonne `Name` doit indiquer exactement `desktop.json`.
- **La redirection PowerShell écrit en UTF-16 ou avec un BOM.** `> desktop.json` et `Out-File` peuvent produire un encodage impossible à analyser, qui se traduit par une erreur de configuration.
-Pour éviter ces deux problèmes, créez le fichier depuis PowerShell en une seule étape :
-
-```powershell
-$dir = "$env:USERPROFILE\.multica"
-New-Item -ItemType Directory -Force $dir | Out-Null
-$json = @'
-{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
-}
-'@
-[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
-```
+La commande PowerShell de l'onglet Windows ci-dessus évite ces deux problèmes.
## Windows Defender signale Multica comme un virus
-**Symptôme** : Sécurité Windows signale une menace telle que `Trojan:Script/Wacatac.B!ml` et met en quarantaine un fichier de l'installation de Desktop. L'élément concerné est normalement le CLI intégré, et non l'exécutable de l'application :
+Sécurité Windows signale une menace telle que `Trojan:Script/Wacatac.B!ml` et met en quarantaine un fichier de l'installation de Desktop. L'élément concerné est normalement le CLI intégré, et non l'exécutable de l'application :
```text
C:\Users\<you>\AppData\Local\Programs\@multicadesktop\resources\app.asar.unpacked\resources\bin\multica.exe
```
-**Il s'agit d'un faux positif.** Le suffixe `!ml` signifie que le verdict provient des heuristiques d'apprentissage automatique de Defender, et non d'une signature de logiciel malveillant. Les builds Windows de Multica ne sont pas encore signées avec Authenticode, et un binaire non signé tout juste publié, qui lance des processus en arrière-plan et ouvre des connexions réseau, correspond exactement au profil que ces heuristiques jugent suspect. Chaque artefact Windows est construit par GitHub Actions à partir du code source public de ce dépôt.
+Il s'agit d'un faux positif. Le suffixe `!ml` signifie que le verdict provient des heuristiques d'apprentissage automatique de Defender, et non d'une signature de logiciel malveillant. Les builds Windows de Multica ne sont pas encore signées avec Authenticode, et un binaire non signé tout juste publié, qui lance des processus en arrière-plan et ouvre des connexions réseau, est facilement jugé suspect par ces heuristiques. Chaque artefact Windows est construit par GitHub Actions à partir du code source public de ce dépôt.
-**Vérifiez par vous-même** — chaque release GitHub publie un fichier `checksums.txt` couvrant toutes les archives du CLI :
+Vous pouvez le vérifier vous-même : chaque release GitHub publie un fichier `checksums.txt` couvrant toutes les archives du CLI.
```powershell
Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
@@ -161,15 +183,24 @@ Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
Comparez l'empreinte obtenue avec la ligne correspondante de `checksums.txt` dans la [dernière release](https://github.com/multica-ai/multica/releases/latest).
-**Comment corriger** :
+Corrigez-le en trois étapes :
+
+<Steps>
+<Step>
+Restaurez le fichier mis en quarantaine : Sécurité Windows → *Protection contre les virus et menaces* → *Historique de protection* → sélectionnez l'élément Multica → *Actions* → *Restaurer*.
+</Step>
+<Step>
+Ajoutez une exclusion pour qu'il ne soit plus mis en quarantaine : *Protection contre les virus et menaces* → *Gérer les paramètres* → *Exclusions* → *Ajouter une exclusion* → *Dossier*, et ajoutez les deux dossiers suivants :
-1. **Restaurez le fichier mis en quarantaine** — Sécurité Windows → *Protection contre les virus et menaces* → *Historique de protection* → sélectionnez l'élément Multica → *Actions* → *Restaurer*.
-2. **Ajoutez une exclusion** pour qu'il ne soit plus mis en quarantaine — *Protection contre les virus et menaces* → *Gérer les paramètres* → *Exclusions* → *Ajouter une exclusion* → *Dossier*, et ajoutez les deux dossiers suivants :
- - `%LOCALAPPDATA%\Programs\@multicadesktop`
- - `%APPDATA%\Multica`
+- `%LOCALAPPDATA%\Programs\@multicadesktop`
+- `%APPDATA%\Multica`
- Les deux chemins sont nécessaires : lorsque le CLI intégré disparaît, Desktop télécharge un remplaçant dans `%APPDATA%\Multica\bin` ; exclure uniquement le dossier d'installation vous enferme donc dans une boucle où le remplaçant est lui aussi mis en quarantaine.
-3. **Signalez le faux positif à Microsoft** sur [Microsoft Security Intelligence — soumettre un fichier](https://www.microsoft.com/en-us/wdsi/filesubmission), en choisissant *Software developer* et *Incorrectly detected as malware*. C'est ce qui permet de retirer la détection pour tous les utilisateurs, généralement en quelques jours.
+Les deux chemins sont nécessaires : lorsque le CLI intégré disparaît, Desktop télécharge un remplaçant dans `%APPDATA%\Multica\bin` ; exclure uniquement le dossier d'installation vous enferme donc dans une boucle où le remplaçant est lui aussi mis en quarantaine.
+</Step>
+<Step>
+Signalez le faux positif à Microsoft sur [Microsoft Security Intelligence — soumettre un fichier](https://www.microsoft.com/en-us/wdsi/filesubmission), en choisissant *Software developer* et *Incorrectly detected as malware*. C'est ce qui permet de retirer la détection pour tous les utilisateurs, généralement en quelques jours.
+</Step>
+</Steps>
<Callout type="warning">
N'ajoutez ces exclusions que si vous avez installé Multica depuis la [page de téléchargement](https://multica.ai/download) ou les [releases GitHub](https://github.com/multica-ai/multica/releases) et que la somme de contrôle correspond. Une exclusion désactive la protection en temps réel pour tout le contenu de ce dossier.
diff --git a/apps/docs/content/docs/desktop-app.ja.mdx b/apps/docs/content/docs/desktop-app.ja.mdx
index 1b928a11f1..66d46448ed 100644
--- a/apps/docs/content/docs/desktop-app.ja.mdx
+++ b/apps/docs/content/docs/desktop-app.ja.mdx
@@ -4,6 +4,9 @@ description: Multica Desktop をインストールし、デスクトップタブ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { DesktopTabsDemo } from "@/components/demos/desktop-tabs-demo";
Multica Desktop は macOS、Windows、Linux で利用できます。Web 版と同じアカウントとワークスペースデータを使いますが、ローカルマシンのデーモンを自動で管理し、ワークスペースごとに独立したタブのセットを保持します。
@@ -22,6 +25,8 @@ Multica Desktop は macOS、Windows、Linux で利用できます。Web 版と
## インストール
+<Steps>
+<Step>
[Multica ダウンロードページ](https://multica.ai/download)から、OS と CPU アーキテクチャに合ったインストーラーを選びます:
| プラットフォーム | インストーラー |
@@ -29,8 +34,11 @@ Multica Desktop は macOS、Windows、Linux で利用できます。Web 版と
| macOS | `.dmg` |
| Windows | `.exe` |
| Linux | `.AppImage`、`.deb` または `.rpm` |
-
+</Step>
+<Step>
インストール後、Web 版と同じメールアドレスでサインインします。サインインすると、Desktop は内蔵の Multica CLI を起動し、マシンにすでにインストールされている AI コーディングツールを検出します。
+</Step>
+</Steps>
<Callout type="info">
Desktop に内蔵された CLI は、アプリが管理するランタイム専用です。ターミナルで `multica issue` などのコマンドも実行したい場合は、[クイックスタートのステップ 2](/cloud-quickstart#2-コンピュータを接続する)に従って CLI を別途インストールしてください。
@@ -40,7 +48,9 @@ Desktop に内蔵された CLI は、アプリが管理するランタイム専
Desktop はワークスペースごとにタブを保存します。たとえば、ワークスペース A でタスクを 3 つ開いてからワークスペース B に切り替えると、B 自身のタブが表示されます。A に戻ると、先ほどの 3 つのタブがそのまま残っています。
-同じリソースは現在のワークスペースで一度しか開きません。タブは並べ替え、ピン留め、クローズができ、それぞれが進む・戻るの履歴とスクロール位置を保持します。このデプロイのアプリリンクをクリックまたは貼り付けると、ブラウザに移動せずタブ内で直接開きます。
+<DesktopTabsDemo />
+
+同じリソースは現在のワークスペースで一度しか開きません。タブは並べ替え、ピン留め、クローズができ、それぞれが進む・戻るの履歴とスクロール位置を保持します。ピン留めしたタブは左端に並び、閉じるボタンがありません。閉じるにはピン留めを解除します。ピン留めしたタブから別のページを開くと新しいタブで開き、ピン留めしたタブは元のページにとどまります。このデプロイのアプリリンクをクリックまたは貼り付けると、ブラウザに移動せずタブ内で直接開きます。
サインアウトすると、このマシンに保存されたすべてのタブが消去されるため、次にサインインした人が前のアカウントの残したページを見ることはありません。
@@ -70,23 +80,47 @@ Desktop はワークスペースごとにタブを保存します。たとえば
## セルフホストインスタンスへの接続
-Desktop はデフォルトで Multica Cloud に接続します。セルフホストインスタンスに接続するには、ホームディレクトリの `.multica` の中に `desktop.json` を作成します:
+Desktop はデフォルトで Multica Cloud に接続します。セルフホストインスタンスに接続するには、ホームディレクトリの `.multica` の中に `desktop.json` を作成し、次の内容を書きます:
+
+```json
+{
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
+}
+```
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
| プラットフォーム | パス |
| --- | --- |
| macOS | `/Users/<you>/.multica/desktop.json` |
| Linux | `/home/<you>/.multica/desktop.json` |
-| Windows | `C:\Users\<you>\.multica\desktop.json` |
-これらはデフォルトの場所です。ホームディレクトリを移動またはリダイレクトしている場合は、実際のパスを使ってください。
+</Tab>
+<Tab value="Windows">
-```json
+ファイルのパスは `C:\Users\<you>\.multica\desktop.json` です。
+
+メモ帳や PowerShell のリダイレクトでは Desktop が読めないファイルになりやすいため(理由は[Windows: ファイル名とエンコーディングを確認する](#windows-ファイル名とエンコーディングを確認する)を参照)、PowerShell で一度に作成することをおすすめします:
+
+```powershell
+$dir = "$env:USERPROFILE\.multica"
+New-Item -ItemType Directory -Force $dir | Out-Null
+$json = @'
{
"schemaVersion": 1,
"apiUrl": "https://api.example.com"
}
+'@
+[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
```
+</Tab>
+</Tabs>
+
+これらはデフォルトの場所です。ホームディレクトリを移動またはリダイレクトしている場合は、実際のパスを使ってください。
+
<Callout type="warning">
これは CLI の `~/.multica/config.json` と**別のファイル**で、キー名も異なります: CLI は `server_url`、Desktop は `apiUrl` を使います。Desktop は CLI の設定を読みません。`~/.multica/profiles/desktop-<host>/` の下に専用の daemon プロファイルを管理します。`config.json` を編集しても、Desktop の接続先は変わりません。
</Callout>
@@ -111,7 +145,7 @@ Desktop はデフォルトで Multica Cloud に接続します。セルフホス
}
```
-保存後に Desktop を再起動します。この設定は起動時に一度だけ読み込まれます。2 つの失敗の現れ方は異なるため、これが切り分けの手がかりになります:
+保存後に Desktop を再起動します。この設定は起動時に一度だけ読み込まれます。2 つの失敗は現れ方が異なります:
- **ファイルが見つからない**(ディレクトリが違う、またはファイル名が `desktop.json` ではない): Desktop はデフォルトの Cloud 設定を使い、エラーは表示しません。つまり Desktop が Cloud のアドレスを表示したままで設定エラーも出ない場合、ファイルは Desktop が探している場所にありません。
- **ファイルは見つかったが無効**(JSON、バージョン、URL のいずれかに問題がある): Desktop は設定エラーを表示し、自動では Cloud にフォールバックしません。
@@ -119,41 +153,29 @@ Desktop はデフォルトで Multica Cloud に接続します。セルフホス
そのファイルを削除して再起動すれば、デフォルトの Cloud 設定に戻ります。
<Callout type="warning">
-Desktop が接続できるのは、ブラウザと実行マシンの両方から到達できるアドレスだけです。リモートのセルフホストインスタンスが HTTPS を使っていない、または WebSocket をプロキシしていない場合、Desktop は接続を確立できません。完全な設定は[セルフホストクイックスタート](/self-host-quickstart#3-アクセス方法を選ぶ)を参照してください。
+Desktop が接続できるのは、ブラウザと実行マシンの両方から到達できるアドレスだけです。リモートのセルフホストインスタンスが HTTPS を使っていない、または WebSocket をプロキシしていない場合、Desktop は接続を確立できません。完全な設定は[セルフホストクイックスタート](/self-host-quickstart#remote-access)を参照してください。
</Callout>
### Windows: ファイル名とエンコーディングを確認する
-Windows では、エディタの 2 つのデフォルト動作が Desktop の読めないファイルを気づかないうちに作ってしまいます:
+Windows でよく使う 2 つの書き方では、Desktop が読めないファイルができてしまいます:
- **メモ帳は `.txt` を付け足します。** `desktop.json` として保存したつもりでも実際には `desktop.json.txt` になることがあり、Desktop はファイルが見つからないものとして扱います。エクスプローラーでファイル名拡張子の表示を有効にするか、保存ダイアログで*すべてのファイル*を選んでください。実際のファイル名を確認するには、PowerShell で `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"` を実行します。`Name` 列がちょうど `desktop.json` になっている必要があります。
- **PowerShell のリダイレクトは UTF-16 や BOM 付きで書き込みます。** `> desktop.json` や `Out-File` はパースできないエンコーディングを生成することがあり、設定エラーとして現れます。
-どちらも避けるには、PowerShell で一度に作成します:
-
-```powershell
-$dir = "$env:USERPROFILE\.multica"
-New-Item -ItemType Directory -Force $dir | Out-Null
-$json = @'
-{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
-}
-'@
-[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
-```
+上の Windows タブにある PowerShell のコマンドなら、この 2 つをどちらも避けられます。
## Windows Defender が Multica をウイルスとして検出する
-**症状**: Windows セキュリティが `Trojan:Script/Wacatac.B!ml` のような脅威を報告し、Desktop のインストール先にあるファイルを隔離します。対象になるのは通常、アプリ本体の実行ファイルではなく同梱の CLI です。
+Windows セキュリティが `Trojan:Script/Wacatac.B!ml` のような脅威を報告し、Desktop のインストール先にあるファイルを隔離します。対象になるのは通常、アプリ本体の実行ファイルではなく同梱の CLI です。
```text
C:\Users\<ユーザー名>\AppData\Local\Programs\@multicadesktop\resources\app.asar.unpacked\resources\bin\multica.exe
```
-**これは誤検知です。** `!ml` というサフィックスは、この判定がマルウェアのシグネチャ一致ではなく Defender の機械学習ヒューリスティックによるものであることを示します。Multica の Windows ビルドはまだ Authenticode コード署名を行っておらず、公開されたばかりで署名がなく、バックグラウンドプロセスを起動してネットワーク接続を張るバイナリは、この種のヒューリスティックが最も疑わしいと判定するプロファイルそのものです。Windows 向けの成果物はすべて、このリポジトリの公開ソースから GitHub Actions でビルドされています。
+これは誤検知です。`!ml` というサフィックスは、この判定がマルウェアのシグネチャ一致ではなく Defender の機械学習ヒューリスティックによるものであることを示します。Multica の Windows ビルドはまだ Authenticode コード署名を行っておらず、公開されたばかりで署名がなく、バックグラウンドプロセスを起動してネットワーク接続を張るバイナリは、この種のヒューリスティックで疑わしいと判定されやすいのです。Windows 向けの成果物はすべて、このリポジトリの公開ソースから GitHub Actions でビルドされています。
-**自分で検証できます** — 各 GitHub リリースには、すべての CLI アーカイブを網羅した `checksums.txt` が公開されています。
+自分で検証することもできます。各 GitHub リリースには、すべての CLI アーカイブを網羅した `checksums.txt` が公開されています。
```powershell
Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
@@ -161,15 +183,24 @@ Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
出力されたハッシュを、[最新リリース](https://github.com/multica-ai/multica/releases/latest)の `checksums.txt` の該当行と照合してください。
-**対処方法**:
+次の 3 つの手順で対処します。
+
+<Steps>
+<Step>
+隔離されたファイルを復元する:Windows セキュリティ → *ウイルスと脅威の防止* → *保護の履歴* → Multica の項目を選択 → *操作* → *復元*。
+</Step>
+<Step>
+除外を追加する(再び隔離されないように):*ウイルスと脅威の防止* → *設定の管理* → *除外* → *除外の追加または削除* → *フォルダー* で、次の両方を追加します。
-1. **隔離されたファイルを復元する** — Windows セキュリティ → *ウイルスと脅威の防止* → *保護の履歴* → Multica の項目を選択 → *操作* → *復元*。
-2. **除外を追加する**(再び隔離されないように)— *ウイルスと脅威の防止* → *設定の管理* → *除外* → *除外の追加または削除* → *フォルダー* で、次の両方を追加します。
- - `%LOCALAPPDATA%\Programs\@multicadesktop`
- - `%APPDATA%\Multica`
+- `%LOCALAPPDATA%\Programs\@multicadesktop`
+- `%APPDATA%\Multica`
- 両方が必要です。同梱の CLI が失われると Desktop は代替バイナリを `%APPDATA%\Multica\bin` にダウンロードするため、インストール先だけを除外してもダウンロードした代替バイナリが再び隔離され、同じことの繰り返しになります。
-3. **誤検知を Microsoft に報告する** — [Microsoft Security Intelligence のファイル送信ページ](https://www.microsoft.com/en-us/wdsi/filesubmission)で *Software developer* と *Incorrectly detected as malware* を選択します。すべてのユーザーに対して検出を取り下げてもらうにはこの手順が必要で、通常は数日で反映されます。
+両方が必要です。同梱の CLI が失われると Desktop は代替バイナリを `%APPDATA%\Multica\bin` にダウンロードするため、インストール先だけを除外してもダウンロードした代替バイナリが再び隔離され、同じことの繰り返しになります。
+</Step>
+<Step>
+誤検知を Microsoft に報告する:[Microsoft Security Intelligence のファイル送信ページ](https://www.microsoft.com/en-us/wdsi/filesubmission)で *Software developer* と *Incorrectly detected as malware* を選択します。すべてのユーザーに対して検出を取り下げてもらうにはこの手順が必要で、通常は数日で反映されます。
+</Step>
+</Steps>
<Callout type="warning">
これらの除外を追加してよいのは、[ダウンロードページ](https://multica.ai/download)または [GitHub リリース](https://github.com/multica-ai/multica/releases)からインストールし、チェックサムが一致している場合だけです。除外を設定すると、そのフォルダー内のすべてのファイルでリアルタイム保護が無効になります。
diff --git a/apps/docs/content/docs/desktop-app.ko.mdx b/apps/docs/content/docs/desktop-app.ko.mdx
index d6b6399978..73b0f95174 100644
--- a/apps/docs/content/docs/desktop-app.ko.mdx
+++ b/apps/docs/content/docs/desktop-app.ko.mdx
@@ -4,6 +4,9 @@ description: Multica Desktop을 설치하고 데스크톱 탭과 내장 데몬
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { DesktopTabsDemo } from "@/components/demos/desktop-tabs-demo";
Multica Desktop은 macOS, Windows, Linux에서 사용할 수 있습니다. Web 버전과 같은 계정 및 워크스페이스 데이터를 사용하지만 로컬 데몬을 자동으로 관리하고 워크스페이스별 탭을 따로 유지합니다.
@@ -22,6 +25,8 @@ Multica Desktop은 macOS, Windows, Linux에서 사용할 수 있습니다. Web
## 설치
+<Steps>
+<Step>
[Multica 다운로드 페이지](https://multica.ai/download)에서 운영체제와 프로세서 아키텍처에 맞는 설치 패키지를 선택합니다.
| 플랫폼 | 설치 패키지 |
@@ -29,8 +34,11 @@ Multica Desktop은 macOS, Windows, Linux에서 사용할 수 있습니다. Web
| macOS | `.dmg` |
| Windows | `.exe` |
| Linux | `.AppImage`, `.deb`, `.rpm` |
-
+</Step>
+<Step>
설치 후 Web 버전과 같은 이메일로 로그인합니다. 로그인하면 Desktop이 내장 Multica CLI를 시작하고 로컬에 설치된 AI 코딩 도구를 감지합니다.
+</Step>
+</Steps>
<Callout type="info">
Desktop 내장 CLI는 앱이 런타임을 관리할 때만 사용합니다. 터미널에서 `multica issue` 같은 명령도 실행하려면 [빠른 시작 2단계](/cloud-quickstart#2-컴퓨터-연결)에 따라 CLI를 별도로 설치하세요.
@@ -40,7 +48,9 @@ Desktop 내장 CLI는 앱이 런타임을 관리할 때만 사용합니다. 터
Desktop은 워크스페이스마다 탭을 따로 저장합니다. 예를 들어 워크스페이스 A에서 태스크 세 개를 연 뒤 워크스페이스 B로 전환하면 B의 탭이 표시됩니다. A로 돌아오면 이전 세 탭이 그대로 남아 있습니다.
-같은 리소스는 현재 워크스페이스에서 한 번만 열립니다. 탭은 순서를 바꾸고, 고정하고, 닫을 수 있으며 각각의 앞으로 가기, 뒤로 가기, 스크롤 위치도 유지됩니다. 현재 배포 환경의 앱 링크를 클릭하거나 붙여 넣으면 브라우저로 이동하지 않고 탭에서 바로 열립니다.
+<DesktopTabsDemo />
+
+같은 리소스는 현재 워크스페이스에서 한 번만 열립니다. 탭은 순서를 바꾸고, 고정하고, 닫을 수 있으며 각각의 앞으로 가기, 뒤로 가기, 스크롤 위치도 유지됩니다. 고정한 탭은 왼쪽 끝에 놓이고 닫기 버튼이 없으므로, 닫으려면 먼저 고정을 해제합니다. 고정한 탭에서 다른 페이지를 열면 새 탭에서 열리고 고정한 탭은 원래 페이지에 머뭅니다. 현재 배포 환경의 앱 링크를 클릭하거나 붙여 넣으면 브라우저로 이동하지 않고 탭에서 바로 열립니다.
로그아웃하면 로컬에 저장된 모든 탭이 삭제되어 다음 로그인 사용자가 이전 계정의 페이지를 보지 못합니다.
@@ -70,23 +80,47 @@ Desktop 설정에서 실행 상태와 로그를 확인할 수 있습니다. 도
## 자체 호스팅 인스턴스 연결
-Desktop은 기본적으로 Multica Cloud에 연결됩니다. 자체 호스팅 인스턴스에 연결하려면 사용자 디렉터리의 `.multica` 안에 `desktop.json`을 만듭니다.
+Desktop은 기본적으로 Multica Cloud에 연결됩니다. 자체 호스팅 인스턴스에 연결하려면 사용자 디렉터리의 `.multica` 안에 `desktop.json`을 만들고 다음 내용을 넣습니다.
+
+```json
+{
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
+}
+```
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
| 플랫폼 | 경로 |
| --- | --- |
| macOS | `/Users/<사용자>/.multica/desktop.json` |
| Linux | `/home/<사용자>/.multica/desktop.json` |
-| Windows | `C:\Users\<사용자>\.multica\desktop.json` |
-위 경로는 기본 위치입니다. 홈 디렉터리를 옮겼거나 리디렉션한 경우에는 실제 경로를 사용하세요.
+</Tab>
+<Tab value="Windows">
-```json
+파일 경로는 `C:\Users\<사용자>\.multica\desktop.json`입니다.
+
+메모장이나 PowerShell 리디렉션으로 만들면 Desktop이 읽을 수 없는 파일이 되기 쉬우므로([Windows: 파일 이름과 인코딩 확인](#windows-파일-이름과-인코딩-확인) 참고), PowerShell에서 한 번에 만드는 것을 권장합니다.
+
+```powershell
+$dir = "$env:USERPROFILE\.multica"
+New-Item -ItemType Directory -Force $dir | Out-Null
+$json = @'
{
"schemaVersion": 1,
"apiUrl": "https://api.example.com"
}
+'@
+[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
```
+</Tab>
+</Tabs>
+
+위 경로는 기본 위치입니다. 홈 디렉터리를 옮겼거나 리디렉션한 경우에는 실제 경로를 사용하세요.
+
<Callout type="warning">
이 파일은 CLI의 `~/.multica/config.json`과 **다른 파일**이며 키 이름도 다릅니다. CLI는 `server_url`을, Desktop은 `apiUrl`을 사용합니다. Desktop은 CLI 설정을 읽지 않고 `~/.multica/profiles/desktop-<host>/` 아래에 별도의 daemon 프로필을 관리합니다. `config.json`을 수정해도 Desktop이 연결하는 서버는 바뀌지 않습니다.
</Callout>
@@ -111,7 +145,7 @@ Desktop은 기본적으로 Multica Cloud에 연결됩니다. 자체 호스팅
}
```
-저장한 뒤 Desktop을 다시 시작합니다. 이 설정은 시작할 때 한 번만 읽습니다. 두 가지 실패는 다르게 나타나므로 이를 보고 빠르게 구분할 수 있습니다.
+저장한 뒤 Desktop을 다시 시작합니다. 이 설정은 시작할 때 한 번만 읽습니다. 두 가지 실패는 다르게 나타납니다.
- **파일을 찾지 못한 경우**(디렉터리가 다르거나 파일 이름이 `desktop.json`이 아닌 경우): Desktop은 기본 Cloud 설정을 사용하고 오류를 표시하지 않습니다. 따라서 Desktop이 여전히 Cloud 주소를 표시하고 설정 오류도 없다면, 파일이 Desktop이 찾는 위치에 없다는 뜻입니다.
- **파일은 찾았지만 유효하지 않은 경우**(JSON, 버전, URL에 문제가 있는 경우): Desktop에 설정 오류가 표시되며 Cloud로 자동 폴백하지 않습니다.
@@ -119,41 +153,29 @@ Desktop은 기본적으로 Multica Cloud에 연결됩니다. 자체 호스팅
해당 파일을 삭제하고 다시 시작하면 기본 Cloud 설정으로 돌아갑니다.
<Callout type="warning">
-Desktop은 브라우저와 실행 컴퓨터에서 모두 접근할 수 있는 주소에만 연결할 수 있습니다. 원격 자체 호스팅 인스턴스에 HTTPS가 없거나 WebSocket 프록시가 설정되지 않으면 Desktop이 연결되지 않습니다. 전체 설정은 [자체 호스팅 빠른 시작](/self-host-quickstart#3-접근-방식-선택)을 참고하세요.
+Desktop은 브라우저와 실행 컴퓨터에서 모두 접근할 수 있는 주소에만 연결할 수 있습니다. 원격 자체 호스팅 인스턴스에 HTTPS가 없거나 WebSocket 프록시가 설정되지 않으면 Desktop이 연결되지 않습니다. 전체 설정은 [자체 호스팅 빠른 시작](/self-host-quickstart#remote-access)을 참고하세요.
</Callout>
### Windows: 파일 이름과 인코딩 확인
-Windows에서는 편집기의 두 가지 기본 동작 때문에 Desktop이 사용할 수 없는 파일이 조용히 만들어집니다.
+Windows에서 흔히 쓰는 두 가지 방법으로 파일을 만들면 Desktop이 읽을 수 없는 파일이 생깁니다.
- **메모장이 `.txt`를 덧붙입니다.** `desktop.json`으로 저장해도 실제로는 `desktop.json.txt`가 될 수 있으며, Desktop은 이를 파일이 없는 것으로 처리합니다. 파일 탐색기에서 파일 확장명 표시를 켜거나 저장 대화 상자에서 *모든 파일*을 선택하세요. 실제 파일 이름을 확인하려면 PowerShell에서 `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"`를 실행하세요. `Name` 열이 정확히 `desktop.json`이어야 합니다.
- **PowerShell 리디렉션은 UTF-16이나 BOM을 씁니다.** `> desktop.json`과 `Out-File`은 파싱할 수 없는 인코딩을 만들 수 있으며, 설정 오류로 나타납니다.
-두 가지를 모두 피하려면 PowerShell에서 한 번에 파일을 만듭니다.
-
-```powershell
-$dir = "$env:USERPROFILE\.multica"
-New-Item -ItemType Directory -Force $dir | Out-Null
-$json = @'
-{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
-}
-'@
-[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
-```
+위 Windows 탭의 PowerShell 명령을 쓰면 두 문제를 모두 피할 수 있습니다.
## Windows Defender가 Multica를 바이러스로 탐지하는 경우
-**증상**: Windows 보안이 `Trojan:Script/Wacatac.B!ml` 같은 위협을 보고하고 Desktop 설치 경로 안의 파일을 격리합니다. 격리되는 대상은 보통 앱 실행 파일이 아니라 함께 포함된 CLI입니다.
+Windows 보안이 `Trojan:Script/Wacatac.B!ml` 같은 위협을 보고하고 Desktop 설치 경로 안의 파일을 격리합니다. 격리되는 대상은 보통 앱 실행 파일이 아니라 함께 포함된 CLI입니다.
```text
C:\Users\<사용자>\AppData\Local\Programs\@multicadesktop\resources\app.asar.unpacked\resources\bin\multica.exe
```
-**오탐입니다.** `!ml` 접미사는 이 판정이 악성코드 시그니처 일치가 아니라 Defender의 머신러닝 휴리스틱에서 나왔다는 뜻입니다. Multica의 Windows 빌드는 아직 Authenticode 코드 서명을 하지 않았고, 갓 배포된 서명 없는 바이너리가 백그라운드 프로세스를 띄우고 네트워크 연결을 여는 형태는 이런 휴리스틱이 가장 의심스럽게 평가하는 프로필입니다. 모든 Windows 산출물은 이 저장소의 공개 소스에서 GitHub Actions로 빌드됩니다.
+오탐입니다. `!ml` 접미사는 이 판정이 악성코드 시그니처 일치가 아니라 Defender의 머신러닝 휴리스틱에서 나왔다는 뜻입니다. Multica의 Windows 빌드는 아직 Authenticode 코드 서명을 하지 않았고, 갓 배포된 서명 없는 바이너리가 백그라운드 프로세스를 띄우고 네트워크 연결을 여는 바이너리는 이런 휴리스틱에서 의심스럽게 평가되기 쉽습니다. 모든 Windows 산출물은 이 저장소의 공개 소스에서 GitHub Actions로 빌드됩니다.
-**직접 검증할 수 있습니다** — 모든 GitHub 릴리스에는 CLI 아카이브 전체를 포함한 `checksums.txt`가 함께 게시됩니다.
+직접 검증할 수도 있습니다. 모든 GitHub 릴리스에는 CLI 아카이브 전체를 포함한 `checksums.txt`가 함께 게시됩니다.
```powershell
Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
@@ -161,15 +183,24 @@ Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
출력된 해시를 [최신 릴리스](https://github.com/multica-ai/multica/releases/latest)의 `checksums.txt` 해당 줄과 비교하세요.
-**해결 방법**:
+다음 세 단계로 해결합니다.
+
+<Steps>
+<Step>
+격리된 파일 복원: Windows 보안 → *바이러스 및 위협 방지* → *보호 기록* → Multica 항목 선택 → *작업* → *복원*.
+</Step>
+<Step>
+제외 항목 추가 (다시 격리되지 않도록): *바이러스 및 위협 방지* → *설정 관리* → *제외* → *제외 추가 또는 제거* → *폴더*에서 다음 두 경로를 모두 추가합니다.
-1. **격리된 파일 복원** — Windows 보안 → *바이러스 및 위협 방지* → *보호 기록* → Multica 항목 선택 → *작업* → *복원*.
-2. **제외 항목 추가** (다시 격리되지 않도록) — *바이러스 및 위협 방지* → *설정 관리* → *제외* → *제외 추가 또는 제거* → *폴더*에서 다음 두 경로를 모두 추가합니다.
- - `%LOCALAPPDATA%\Programs\@multicadesktop`
- - `%APPDATA%\Multica`
+- `%LOCALAPPDATA%\Programs\@multicadesktop`
+- `%APPDATA%\Multica`
- 두 경로 모두 필요합니다. 포함된 CLI가 사라지면 Desktop이 대체 바이너리를 `%APPDATA%\Multica\bin`에 내려받기 때문에, 설치 폴더만 제외하면 새로 받은 파일이 다시 격리되는 상황이 반복됩니다.
-3. **오탐을 Microsoft에 신고** — [Microsoft Security Intelligence 파일 제출 페이지](https://www.microsoft.com/en-us/wdsi/filesubmission)에서 *Software developer*와 *Incorrectly detected as malware*를 선택하세요. 모든 사용자에 대해 탐지를 철회시키는 방법은 이것이며, 보통 며칠 안에 반영됩니다.
+두 경로 모두 필요합니다. 포함된 CLI가 사라지면 Desktop이 대체 바이너리를 `%APPDATA%\Multica\bin`에 내려받기 때문에, 설치 폴더만 제외하면 새로 받은 파일이 다시 격리되는 상황이 반복됩니다.
+</Step>
+<Step>
+오탐을 Microsoft에 신고: [Microsoft Security Intelligence 파일 제출 페이지](https://www.microsoft.com/en-us/wdsi/filesubmission)에서 *Software developer*와 *Incorrectly detected as malware*를 선택하세요. 모든 사용자에 대해 탐지를 철회시키는 방법은 이것이며, 보통 며칠 안에 반영됩니다.
+</Step>
+</Steps>
<Callout type="warning">
이 제외 항목은 [다운로드 페이지](https://multica.ai/download) 또는 [GitHub 릴리스](https://github.com/multica-ai/multica/releases)에서 설치했고 체크섬이 일치하는 경우에만 추가하세요. 제외를 설정하면 해당 폴더 안의 모든 파일에 대해 실시간 보호가 꺼집니다.
diff --git a/apps/docs/content/docs/desktop-app.mdx b/apps/docs/content/docs/desktop-app.mdx
index 45b1344179..54de89b448 100644
--- a/apps/docs/content/docs/desktop-app.mdx
+++ b/apps/docs/content/docs/desktop-app.mdx
@@ -4,6 +4,9 @@ description: Install Multica Desktop, use desktop tabs and the built-in daemon,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { DesktopTabsDemo } from "@/components/demos/desktop-tabs-demo";
Multica Desktop is available for macOS, Windows, and Linux. It uses the same account and workspace data as the web app, but it manages the daemon on your machine automatically and keeps a separate set of tabs for each workspace.
@@ -22,6 +25,8 @@ You can be signed in to both at the same time. As long as they connect to the sa
## Installation
+<Steps>
+<Step>
Pick the installer that matches your OS and CPU architecture from the [Multica downloads page](https://multica.ai/download):
| Platform | Installer |
@@ -29,8 +34,11 @@ Pick the installer that matches your OS and CPU architecture from the [Multica d
| macOS | `.dmg` |
| Windows | `.exe` |
| Linux | `.AppImage`, `.deb`, or `.rpm` |
-
+</Step>
+<Step>
After installing, sign in with the same email you use on the web. Once signed in, Desktop starts its own bundled Multica CLI and detects the AI coding tools already installed on the machine.
+</Step>
+</Steps>
<Callout type="info">
The CLI bundled with Desktop only serves the app's managed runtime. If you also want to run commands like `multica issue` in a terminal, install the CLI separately following [step 2 of the quickstart](/cloud-quickstart#2-connect-a-computer).
@@ -40,7 +48,9 @@ The CLI bundled with Desktop only serves the app's managed runtime. If you also
Desktop saves tabs per workspace. For example, if you open three issues in workspace A and switch to workspace B, you see B's own tabs; switch back to A and the three earlier tabs are still there.
-A given resource opens only once in the current workspace. Tabs can be reordered, pinned, and closed, and each keeps its own forward/back history and scroll position. Clicking or pasting an app link for this deployment opens it directly in a tab instead of jumping to the browser.
+<DesktopTabsDemo />
+
+A given resource opens only once in the current workspace. Tabs can be reordered, pinned, and closed, and each keeps its own forward/back history and scroll position. Pinned tabs sit at the left end and have no close button; unpin a tab to close it. Opening another page from a pinned tab opens a new tab, and the pinned tab stays where it is. Clicking or pasting an app link for this deployment opens it directly in a tab instead of jumping to the browser.
Logging out clears every tab saved on the machine, so the next person to sign in never sees pages left behind by the previous account.
@@ -58,40 +68,64 @@ You can check runtime status and logs in Desktop's settings. If a tool isn't det
## Updating Desktop
-Auto-update is on by default. The app checks for and downloads new versions in the background; once a download finishes you can restart to install immediately or let it install on the next quit. You can also turn off automatic checks or check for new versions manually under **Settings → Updates**.
+Auto-update is on by default. The app checks for and downloads new versions in the background; once a download finishes you can restart to install immediately or let it install on the next quit. Under **Settings → Updates** you can turn off automatic checks or check for new versions manually.
Updates are distributed per OS and CPU architecture:
- Windows arm64 and macOS x64 (Intel) each use their own update feed;
- all other architectures use the default feed;
-- the app matches the update feed automatically — no manual selection needed;
+- the app matches the update feed automatically, so no manual selection is needed;
- on Linux, auto-update only works for `.AppImage`; update `.deb` and `.rpm` by installing a new package over the old one;
- if auto-update fails, likewise install over the top with the matching installer from the downloads page.
## Connecting to a self-hosted instance
-Desktop connects to Multica Cloud by default. To connect to a self-hosted instance, create `desktop.json` inside the `.multica` directory of your home directory:
+Desktop connects to Multica Cloud by default. To connect to a self-hosted instance, create `desktop.json` inside the `.multica` directory of your home directory with this content:
+
+```json
+{
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
+}
+```
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
| Platform | Path |
| --- | --- |
| macOS | `/Users/<you>/.multica/desktop.json` |
| Linux | `/home/<you>/.multica/desktop.json` |
-| Windows | `C:\Users\<you>\.multica\desktop.json` |
-These are the default locations — if your home directory has been moved or redirected, use its actual path.
+</Tab>
+<Tab value="Windows">
-```json
+The file path is `C:\Users\<you>\.multica\desktop.json`.
+
+Notepad and PowerShell redirection easily produce a file Desktop can't read (see [Windows: check the filename and encoding](#windows-check-the-filename-and-encoding)), so create it from PowerShell in one step:
+
+```powershell
+$dir = "$env:USERPROFILE\.multica"
+New-Item -ItemType Directory -Force $dir | Out-Null
+$json = @'
{
"schemaVersion": 1,
"apiUrl": "https://api.example.com"
}
+'@
+[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
```
+</Tab>
+</Tabs>
+
+These are the default locations. If your home directory has been moved or redirected, use its actual path.
+
<Callout type="warning">
-This is **not** the CLI's `~/.multica/config.json`, and the key names differ: the CLI uses `server_url`, Desktop uses `apiUrl`. Desktop never reads the CLI's config — it manages a separate daemon profile under `~/.multica/profiles/desktop-<host>/`. Editing `config.json` does not change which server Desktop connects to.
+This is **not** the CLI's `~/.multica/config.json`, and the key names differ: the CLI uses `server_url`, Desktop uses `apiUrl`. Desktop never reads the CLI's config; it manages a separate daemon profile under `~/.multica/profiles/desktop-<host>/`. Editing `config.json` does not change which server Desktop connects to.
</Callout>
-`apiUrl` is the backend's public address; it is required and must use `http` or `https`. The other two URLs can be omitted — Desktop derives them automatically:
+`apiUrl` is the backend's public address; it is required and must use `http` or `https`. The other two URLs can be omitted, and Desktop derives them automatically:
- `wsUrl`: swaps the `apiUrl` scheme to `ws` or `wss` and appends `/ws` to the path;
- `appUrl`: strips the `api.` prefix when the host starts with `api.` and has at least three labels (`api.example.com` → `example.com`); otherwise it stays the same as `apiUrl`.
@@ -111,49 +145,37 @@ Usually `apiUrl` alone is enough. Override explicitly only when the derivation d
}
```
-Restart Desktop after saving — the file is read once at startup. The two failure modes look different, which is the fastest way to tell them apart:
+Restart Desktop after saving; the file is read once at startup. The two failure modes look different:
-- **File not found** (wrong directory, or a filename that isn't exactly `desktop.json`) — Desktop uses the default Cloud configuration and shows no error. So if Desktop still reports a Cloud address and no configuration error, the file is not where Desktop is looking.
-- **File found but invalid** JSON, version, or URLs — Desktop shows a configuration error and does not fall back to Cloud.
+- **File not found** (wrong directory, or a filename that isn't exactly `desktop.json`): Desktop uses the default Cloud configuration and shows no error. So if Desktop still reports a Cloud address and no configuration error, the file is not where Desktop is looking.
+- **File found but invalid** (JSON, version, or URLs): Desktop shows a configuration error and does not fall back to Cloud.
Delete the file and restart to return to the default Cloud configuration.
<Callout type="warning">
-Desktop can only connect to addresses reachable from both the browser and the executing machine. If a remote self-hosted instance doesn't use HTTPS or doesn't proxy WebSocket, Desktop can't establish a connection; see the [self-host quickstart](/self-host-quickstart#3-choose-how-to-access) for the full configuration.
+Desktop can only connect to addresses reachable from both the browser and the executing machine. If a remote self-hosted instance doesn't use HTTPS or doesn't proxy WebSocket, Desktop can't establish a connection; see the [self-host quickstart](/self-host-quickstart#remote-access) for the full configuration.
</Callout>
### Windows: check the filename and encoding
-Two Windows editor defaults silently produce a file Desktop can't use:
+Two common ways of writing the file on Windows produce one Desktop can't read:
-- **Notepad appends `.txt`.** Saving as `desktop.json` can produce `desktop.json.txt`, which Desktop treats as not found. Turn on file name extensions in Explorer, or pick *All files* in the save dialog. To see the real filename, run `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"` in PowerShell — the `Name` column must read exactly `desktop.json`.
+- **Notepad appends `.txt`.** Saving as `desktop.json` can produce `desktop.json.txt`, which Desktop treats as not found. Turn on file name extensions in Explorer, or pick *All files* in the save dialog. To see the real filename, run `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"` in PowerShell; the `Name` column must read exactly `desktop.json`.
- **PowerShell redirection writes UTF-16 or a BOM.** `> desktop.json` and `Out-File` can produce an encoding that fails to parse, which surfaces as a configuration error.
-To avoid both, create the file from PowerShell in one step:
-
-```powershell
-$dir = "$env:USERPROFILE\.multica"
-New-Item -ItemType Directory -Force $dir | Out-Null
-$json = @'
-{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
-}
-'@
-[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
-```
+The PowerShell command in the Windows tab above avoids both.
## Windows Defender flags Multica as a virus
-**Symptom**: Windows Security reports a threat such as `Trojan:Script/Wacatac.B!ml` and quarantines a file inside the Desktop installation. The affected item is normally the bundled CLI, not the app executable:
+Windows Security reports a threat such as `Trojan:Script/Wacatac.B!ml` and quarantines a file inside the Desktop installation. The affected item is normally the bundled CLI, not the app executable:
```text
C:\Users\<you>\AppData\Local\Programs\@multicadesktop\resources\app.asar.unpacked\resources\bin\multica.exe
```
-**This is a false positive.** The `!ml` suffix means the verdict came from Defender's machine-learning heuristics rather than a malware signature. Multica's Windows builds are not Authenticode code-signed yet, and a freshly published unsigned binary that starts background processes and opens network connections is exactly the profile those heuristics score as suspicious. Every Windows artifact is built by GitHub Actions from the public source in this repository.
+This is a false positive. The `!ml` suffix means the verdict came from Defender's machine-learning heuristics rather than a malware signature. Multica's Windows builds are not Authenticode code-signed yet, and a freshly published unsigned binary that starts background processes and opens network connections is the kind of binary those heuristics readily score as suspicious. Every Windows artifact is built by GitHub Actions from the public source in this repository.
-**Verify it yourself** — each GitHub release publishes a `checksums.txt` covering every CLI archive:
+You can verify it yourself: each GitHub release publishes a `checksums.txt` covering every CLI archive.
```powershell
Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
@@ -161,15 +183,24 @@ Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
Compare the hash with the matching line in `checksums.txt` on the [latest release](https://github.com/multica-ai/multica/releases/latest).
-**How to fix**:
+Fix it in three steps:
+
+<Steps>
+<Step>
+Restore the quarantined file: Windows Security → *Virus & threat protection* → *Protection history* → select the Multica item → *Actions* → *Restore*.
+</Step>
+<Step>
+Add an exclusion so it isn't quarantined again: *Virus & threat protection* → *Manage settings* → *Exclusions* → *Add an exclusion* → *Folder*, and add both:
-1. **Restore the quarantined file** — Windows Security → *Virus & threat protection* → *Protection history* → select the Multica item → *Actions* → *Restore*.
-2. **Add an exclusion** so it isn't quarantined again — *Virus & threat protection* → *Manage settings* → *Exclusions* → *Add an exclusion* → *Folder*, and add both:
- - `%LOCALAPPDATA%\Programs\@multicadesktop`
- - `%APPDATA%\Multica`
+- `%LOCALAPPDATA%\Programs\@multicadesktop`
+- `%APPDATA%\Multica`
- Both paths matter: when the bundled CLI goes missing, Desktop downloads a replacement into `%APPDATA%\Multica\bin`, so excluding only the install folder leaves you in a loop where the replacement gets quarantined too.
-3. **Report the false positive to Microsoft** at [Microsoft Security Intelligence — submit a file](https://www.microsoft.com/en-us/wdsi/filesubmission), choosing *Software developer* and *Incorrectly detected as malware*. That is what gets the detection withdrawn for every user, usually within a few days.
+Both paths matter: when the bundled CLI goes missing, Desktop downloads a replacement into `%APPDATA%\Multica\bin`, so excluding only the install folder leaves you in a loop where the replacement gets quarantined too.
+</Step>
+<Step>
+Report the false positive to Microsoft at [Microsoft Security Intelligence — submit a file](https://www.microsoft.com/en-us/wdsi/filesubmission), choosing *Software developer* and *Incorrectly detected as malware*. That is what gets the detection withdrawn for every user, usually within a few days.
+</Step>
+</Steps>
<Callout type="warning">
Only add these exclusions if you installed Multica from the [downloads page](https://multica.ai/download) or [GitHub releases](https://github.com/multica-ai/multica/releases) and the checksum matches. An exclusion disables real-time protection for everything in that folder.
diff --git a/apps/docs/content/docs/desktop-app.zh.mdx b/apps/docs/content/docs/desktop-app.zh.mdx
index 53138d0b63..5ce1534d03 100644
--- a/apps/docs/content/docs/desktop-app.zh.mdx
+++ b/apps/docs/content/docs/desktop-app.zh.mdx
@@ -4,6 +4,9 @@ description: 安装 Multica Desktop,使用桌面标签页和内置守护进程
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { DesktopTabsDemo } from "@/components/demos/desktop-tabs-demo";
Multica Desktop 提供 macOS、Windows 和 Linux 版本。它和 Web 版使用相同的账号与工作区数据,但会在本机自动管理守护进程,并为不同工作区保留各自的标签页。
@@ -22,6 +25,8 @@ Multica Desktop 提供 macOS、Windows 和 Linux 版本。它和 Web 版使用
## 安装
+<Steps>
+<Step>
从 [Multica 下载页](https://multica.ai/download) 选择与系统和处理器架构对应的安装包:
| 平台 | 安装包 |
@@ -29,8 +34,11 @@ Multica Desktop 提供 macOS、Windows 和 Linux 版本。它和 Web 版使用
| macOS | `.dmg` |
| Windows | `.exe` |
| Linux | `.AppImage`、`.deb` 或 `.rpm` |
-
+</Step>
+<Step>
安装后使用和 Web 版相同的邮箱登录。登录后,Desktop 会启动自己内置的 Multica CLI,并检测本机已有的 AI 编程工具。
+</Step>
+</Steps>
<Callout type="info">
Desktop 内置的 CLI 只供应用管理运行时使用。如果你还要在终端中运行 `multica issue` 等命令,按[快速上手第 2 步](/cloud-quickstart#2-连接一台电脑)单独安装 CLI。
@@ -40,7 +48,9 @@ Desktop 内置的 CLI 只供应用管理运行时使用。如果你还要在终
Desktop 会为每个工作区单独保存标签页。例如,你在工作区 A 打开了三个任务,切到工作区 B 后会看到 B 自己的标签页;切回 A 时,之前的三个标签页仍然保留。
-同一资源只会在当前工作区打开一次。标签页可以重新排序、固定、关闭,也会保留各自的前进、后退和滚动位置。点击或粘贴本部署的应用链接会直接在标签页中打开,不会跳转到浏览器。
+<DesktopTabsDemo />
+
+同一资源只会在当前工作区打开一次。标签页可以重新排序、固定、关闭,也会保留各自的前进、后退和滚动位置。固定的标签页排在最左边,没有关闭按钮,要先取消固定才能关;在它里面打开别的页面时会新开一个标签页,它自己停在原页面。点击或粘贴本部署的应用链接会直接在标签页中打开,不会跳转到浏览器。
退出登录会清除本机保存的所有标签页,避免下一位登录者看到上一个账号留下的页面。
@@ -58,7 +68,7 @@ Desktop 会为每个工作区单独保存标签页。例如,你在工作区 A
## 更新 Desktop
-自动更新默认开启。应用会在后台检查并下载新版本,下载完成后可以立即重启安装,也可以等下次退出时安装。你也可以在 **设置 → 更新**中关闭自动检查或手动检查新版本。
+自动更新默认开启。应用在后台检查并下载新版本,下载完成后可以立即重启安装,也可以等下次退出时安装。在 **设置 → 更新** 中可以关闭自动检查,或手动检查新版本。
更新按操作系统和处理器架构分发:
@@ -70,23 +80,47 @@ Desktop 会为每个工作区单独保存标签页。例如,你在工作区 A
## 连接自托管实例
-Desktop 默认连接 Multica Cloud。连接自托管实例时,在用户目录的 `.multica` 下创建 `desktop.json`:
+Desktop 默认连接 Multica Cloud。连接自托管实例时,在用户目录的 `.multica` 下创建 `desktop.json`,内容如下:
+
+```json
+{
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
+}
+```
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
| 平台 | 路径 |
| --- | --- |
| macOS | `/Users/<你>/.multica/desktop.json` |
| Linux | `/home/<你>/.multica/desktop.json` |
-| Windows | `C:\Users\<你>\.multica\desktop.json` |
-以上是默认位置。用户目录被迁移或重定向过的话,用实际路径。
+</Tab>
+<Tab value="Windows">
-```json
+文件路径是 `C:\Users\<你>\.multica\desktop.json`。
+
+记事本和 PowerShell 重定向容易生成 Desktop 读不了的文件(原因见[Windows:检查文件名和编码](#windows检查文件名和编码)),建议在 PowerShell 里一步创建:
+
+```powershell
+$dir = "$env:USERPROFILE\.multica"
+New-Item -ItemType Directory -Force $dir | Out-Null
+$json = @'
{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com"
}
+'@
+[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
```
+</Tab>
+</Tabs>
+
+以上是默认位置。用户目录被迁移或重定向过的话,用实际路径。
+
<Callout type="warning">
这个文件**不是** CLI 的 `~/.multica/config.json`,字段名也不同:CLI 用 `server_url`,Desktop 用 `apiUrl`。Desktop 不会读取 CLI 的配置,它在 `~/.multica/profiles/desktop-<host>/` 下管理独立的 daemon profile。改 `config.json` 不会影响 Desktop 连接哪个服务。
</Callout>
@@ -104,14 +138,14 @@ Desktop 默认连接 Multica Cloud。连接自托管实例时,在用户目录
```json
{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com",
- "appUrl": "https://app.example.com",
- "wsUrl": "wss://ws.example.com/socket"
+ "schemaVersion": 1,
+ "apiUrl": "https://api.example.com",
+ "appUrl": "https://app.example.com",
+ "wsUrl": "wss://ws.example.com/socket"
}
```
-保存后重启 Desktop,配置只在启动时读取一次。两种失败的表现不同,据此可以快速区分:
+保存后重启 Desktop,配置只在启动时读取一次。两种失败的表现不同:
- **文件没找到**(目录不对,或文件名不是 `desktop.json`):Desktop 使用默认的 Cloud 配置,不报错。所以如果 Desktop 仍然显示 Cloud 地址且没有任何配置错误,说明文件不在 Desktop 查找的位置。
- **文件找到但无效**(JSON、版本或 URL 有问题):Desktop 显示配置错误,不会自动回退到 Cloud。
@@ -119,41 +153,29 @@ Desktop 默认连接 Multica Cloud。连接自托管实例时,在用户目录
删除该文件并重启即可恢复默认的 Cloud 配置。
<Callout type="warning">
-Desktop 只能连接浏览器和执行电脑都能访问的地址。远程自托管实例未使用 HTTPS 或未代理 WebSocket 时,Desktop 无法建立连接;完整配置见[自托管快速上手](/self-host-quickstart#3-选择访问方式)。
+Desktop 只能连接浏览器和执行电脑都能访问的地址。远程自托管实例未使用 HTTPS 或未代理 WebSocket 时,Desktop 无法建立连接;完整配置见[自托管快速上手](/self-host-quickstart#remote-access)。
</Callout>
### Windows:检查文件名和编码
-Windows 上两个编辑器默认行为会悄悄生成 Desktop 用不了的文件:
+Windows 上两种常见的写文件方式会生成 Desktop 读不了的文件:
- **记事本会补 `.txt` 后缀**。存成 `desktop.json` 可能实际得到 `desktop.json.txt`,Desktop 会当作没找到。在资源管理器里打开文件扩展名显示,或在保存对话框里选*所有文件*。想确认真实文件名,在 PowerShell 里运行 `Get-ChildItem "$env:USERPROFILE\.multica" -Filter "desktop.json*"`,`Name` 一列必须正好是 `desktop.json`。
- **PowerShell 重定向会写成 UTF-16 或带 BOM**。`> desktop.json` 和 `Out-File` 可能生成无法解析的编码,表现为配置错误。
-用 PowerShell 一步创建可以同时避开这两个坑:
-
-```powershell
-$dir = "$env:USERPROFILE\.multica"
-New-Item -ItemType Directory -Force $dir | Out-Null
-$json = @'
-{
- "schemaVersion": 1,
- "apiUrl": "https://api.example.com"
-}
-'@
-[System.IO.File]::WriteAllText("$dir\desktop.json", $json)
-```
+上面 Windows 页签里的 PowerShell 命令可以同时避开这两个坑。
## Windows Defender 把 Multica 报成病毒
-**现象**:Windows 安全中心报出 `Trojan:Script/Wacatac.B!ml` 之类的威胁,并隔离 Desktop 安装目录里的某个文件。被隔离的通常是内置的 CLI,而不是应用主程序:
+Windows 安全中心报出 `Trojan:Script/Wacatac.B!ml` 之类的威胁,并隔离 Desktop 安装目录里的某个文件。被隔离的通常是内置的 CLI,而不是应用主程序:
```text
C:\Users\<你>\AppData\Local\Programs\@multicadesktop\resources\app.asar.unpacked\resources\bin\multica.exe
```
-**这是误报。** `!ml` 后缀表示这个结论来自 Defender 的机器学习启发式判断,而不是病毒特征库匹配。Multica 的 Windows 构建目前还没有做 Authenticode 代码签名,而一个刚发布、没有签名、又会拉起后台进程并建立网络连接的二进制,正好落在这类启发式最容易判可疑的画像上。所有 Windows 产物都由 GitHub Actions 从本仓库的公开源码构建。
+这是误报。`!ml` 后缀表示结论来自 Defender 的机器学习启发式判断,不是病毒特征库匹配。Multica 的 Windows 构建目前还没有做 Authenticode 代码签名,一个刚发布、没有签名、又会拉起后台进程并建立网络连接的二进制,很容易被这类启发式判为可疑。所有 Windows 产物都由 GitHub Actions 从本仓库的公开源码构建。
-**可以自己校验** —— 每个 GitHub release 都发布了覆盖全部 CLI 压缩包的 `checksums.txt`:
+你可以自己校验:每个 GitHub release 都发布了覆盖全部 CLI 压缩包的 `checksums.txt`。
```powershell
Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
@@ -161,15 +183,24 @@ Get-FileHash .\multica-cli-<version>-windows-amd64.zip -Algorithm SHA256
把输出的哈希和[最新 release](https://github.com/multica-ai/multica/releases/latest) 里 `checksums.txt` 对应那一行比对。
-**怎么解决**:
+按下面三步处理:
+
+<Steps>
+<Step>
+把隔离的文件恢复回来:Windows 安全中心 → *病毒和威胁防护* → *保护历史记录* → 选中 Multica 那一条 → *操作* → *还原*。
+</Step>
+<Step>
+加排除项,避免再次被隔离:*病毒和威胁防护* → *管理设置* → *排除项* → *添加或删除排除项* → *文件夹*,两个都要加:
-1. **把隔离的文件恢复回来** —— Windows 安全中心 → *病毒和威胁防护* → *保护历史记录* → 选中 Multica 那一条 → *操作* → *还原*。
-2. **加排除项**,避免再次被隔离 —— *病毒和威胁防护* → *管理设置* → *排除项* → *添加或删除排除项* → *文件夹*,两个都要加:
- - `%LOCALAPPDATA%\Programs\@multicadesktop`
- - `%APPDATA%\Multica`
+- `%LOCALAPPDATA%\Programs\@multicadesktop`
+- `%APPDATA%\Multica`
- 两个路径缺一不可:内置 CLI 被删掉后,Desktop 会把替换版本下载到 `%APPDATA%\Multica\bin`,只排除安装目录的话,下载下来的副本还会再被隔离一次,陷入循环。
-3. **把误报提交给微软** —— 在 [Microsoft Security Intelligence 文件提交页](https://www.microsoft.com/en-us/wdsi/filesubmission)选择 *Software developer* 和 *Incorrectly detected as malware*。这一步才是让检测对所有用户撤销的办法,一般几天内生效。
+两个路径缺一不可:内置 CLI 被删掉后,Desktop 会把替换版本下载到 `%APPDATA%\Multica\bin`,只排除安装目录的话,下载下来的副本还会再被隔离一次,陷入循环。
+</Step>
+<Step>
+把误报提交给微软:在 [Microsoft Security Intelligence 文件提交页](https://www.microsoft.com/en-us/wdsi/filesubmission)选择 *Software developer* 和 *Incorrectly detected as malware*。只有这一步能让检测对所有用户撤销,一般几天内生效。
+</Step>
+</Steps>
<Callout type="warning">
只有在你是从[下载页](https://multica.ai/download)或 [GitHub releases](https://github.com/multica-ai/multica/releases) 安装、且校验和对得上的前提下,才加这些排除项。排除项会关闭该文件夹内所有文件的实时保护。
diff --git a/apps/docs/content/docs/dingtalk-bot-integration.fr.mdx b/apps/docs/content/docs/dingtalk-bot-integration.fr.mdx
index 52b7ac5204..ee03910c7b 100644
--- a/apps/docs/content/docs/dingtalk-bot-integration.fr.mdx
+++ b/apps/docs/content/docs/dingtalk-bot-integration.fr.mdx
@@ -4,6 +4,7 @@ description: Connectez un agent à DingTalk et confiez-lui du travail directemen
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Une fois un [agent](/agents) connecté à DingTalk, les membres de son espace de travail peuvent envoyer des messages directs au bot, le @mentionner dans un groupe ou utiliser la commande `/issue` pour créer directement une [tâche](/issues) Multica. Les conversations et les historiques d'exécution sont enregistrés dans l'espace de travail Multica.
@@ -11,34 +12,50 @@ Une fois un [agent](/agents) connecté à DingTalk, les membres de son espace de
L'intégration DingTalk est [maintenue par la communauté](/community-maintained) et ne bénéficie d'aucun SLA de support officiel. Signalez les problèmes dans les [issues GitHub](https://github.com/multica-ai/multica/issues).
</Callout>
-
## Connecter le bot
-Le créateur de l'agent ou un propriétaire/administrateur de l'espace de travail peut connecter l'agent à DingTalk. Les agents et les bots DingTalk sont liés un à un.
+Le créateur de l'agent ou un propriétaire/administrateur de l'espace de travail peut connecter l'agent à DingTalk. Chaque agent correspond à un seul bot DingTalk.
+
+<Steps>
+<Step>
-## 1. Créer un robot en mode Stream
+### Créer un robot en mode Stream [#1-créer-un-robot-en-mode-stream]
1. Créez une application de type **enterprise internal app** dans [DingTalk Open Platform](https://open-dev.dingtalk.com).
2. Activez la capacité robot et réglez **Message Receiving Mode** sur **Stream Mode**.
-## 2. Accorder des permissions au robot
+</Step>
+<Step>
+
+### Accorder des permissions au robot [#2-accorder-des-permissions-au-robot]
La permission **Robot Message Sending** (`qyapi_robot_sendmsg`) est ajoutée par défaut. Pour afficher le nom du bot dans Multica, ajoutez manuellement la permission **DingTalk Group Basic Information Management** (`qyapi_chat_manage`).
-## 3. Obtenir les identifiants de l'application
+</Step>
+<Step>
+
+### Obtenir les identifiants de l'application [#3-obtenir-les-identifiants-de-lapplication]
Ouvrez la page **Credentials & Basic Information** et copiez le **Client ID (AppKey)** et le **Client Secret (AppSecret)**.
-## 4. Connecter l'agent à DingTalk
+</Step>
+<Step>
+
+### Connecter l'agent à DingTalk [#4-connecter-lagent-à-dingtalk]
1. Revenez dans Multica et ouvrez **Agents → _votre agent_ → Capacités → Intégrations**.
2. Cliquez sur **Connecter DingTalk**.
3. Saisissez l'**AppKey** et l'**AppSecret**, puis validez.
-## 5. Associer vos comptes DingTalk et Multica
+</Step>
+<Step>
+
+### Associer vos comptes DingTalk et Multica [#5-associer-vos-comptes-dingtalk-et-multica]
-Envoyez un message direct au bot dans DingTalk ou @mentionnez-le dans un groupe pour déclencher une demande d'association. Vous recevrez un lien dans votre conversation privée avec le bot ; il est valable environ 15 minutes. Ouvrez le lien. Lorsque le message de confirmation s'affiche, l'association du compte est terminée.
+Envoyez un message direct au bot dans DingTalk ou @mentionnez-le dans un groupe pour déclencher une demande d'association. Le bot vous envoie un lien en message direct (valable environ 15 minutes) ; ouvrez-le, et l'association est terminée dès que le message de confirmation s'affiche.
+</Step>
+</Steps>
## Confier du travail à l'agent dans DingTalk
@@ -68,7 +85,7 @@ Les réactions dépendent de l'API de DingTalk et peuvent ne pas se mettre à jo
### Créer une tâche avec `/issue`
-Envoyez `/issue <title>` ou `/issue <title>{newline}<detailed description>` pour créer une nouvelle tâche Multica et l'assigner automatiquement à l'agent connecté au bot. Les images du même message sont aussi ajoutées à la tâche en pièces jointes. Contrairement aux messages de discussion ordinaires, la commande `/issue` ne laisse aucune trace dans la [Discussion](/chat) Multica.
+Envoyez `/issue <title>` ou `/issue <title>{newline}<detailed description>` pour créer une nouvelle tâche Multica et l'assigner automatiquement à l'agent lié au bot. Les images du même message sont aussi ajoutées à la tâche en pièces jointes. Contrairement aux messages de discussion ordinaires, la commande `/issue` ne laisse aucune trace dans la [Discussion](/chat) Multica.
### Démarrer une nouvelle discussion avec `/new`
@@ -83,7 +100,6 @@ Envoyez `/clear` pour conserver la discussion Multica en cours tout en appliquan
- Dans **Agents → _votre agent_ → Capacités → Intégrations**, le créateur de l'agent et les propriétaires/administrateurs de l'espace de travail peuvent connecter l'agent à DingTalk ou le déconnecter. Une fois la connexion établie, cette page affiche le nom du bot, les groupes DingTalk où il a traité des messages avec succès et ses données d'activité dans ces groupes. Tout membre de l'espace de travail disposant d'un accès en lecture à l'agent peut voir ces informations. Les groupes sans message traité avec succès au cours des 90 derniers jours sont placés sous **Inactifs depuis longtemps** et chargés lorsque cette section est dépliée.
- **Paramètres → Messagerie → DingTalk** liste tous les agents connectés à DingTalk dans l'espace de travail actuel que l'utilisateur peut consulter, avec les données d'activité du bot dans les groupes DingTalk. Les propriétaires/administrateurs de l'espace de travail peuvent aussi déconnecter de DingTalk n'importe quel agent listé. Après la déconnexion, le bot ne reçoit plus de messages, mais l'enregistrement d'installation est conservé pour l'audit. Les propriétaires/administrateurs de l'espace de travail peuvent aussi oublier un groupe. Cela retire le groupe de la liste sans supprimer les conversations ni les messages. Le groupe réapparaît si un membre de l'espace de travail disposant d'un compte DingTalk associé y @mentionne de nouveau le bot et que Multica accepte le message.
-
## Configuration en auto-hébergement
Les utilisateurs de Multica Cloud peuvent ignorer cette section. Un déploiement auto-hébergé doit d'abord définir une clé pour chiffrer l'`AppSecret` DingTalk :
@@ -102,7 +118,6 @@ Redémarrez le service API, puis connectez DingTalk. Conservez cette clé de fa
Les URL d'association de compte utilisent `MULTICA_APP_URL`, ou `FRONTEND_ORIGIN` si elle n'est pas définie. L'URL doit pointer vers une adresse Multica accessible aux membres.
-
## Étapes suivantes
- [Intégrations de messagerie](/channels) — fonctionnement du moteur Channel, des sessions et des autorisations
diff --git a/apps/docs/content/docs/dingtalk-bot-integration.ja.mdx b/apps/docs/content/docs/dingtalk-bot-integration.ja.mdx
index 6fc2d65fd4..d9c338c364 100644
--- a/apps/docs/content/docs/dingtalk-bot-integration.ja.mdx
+++ b/apps/docs/content/docs/dingtalk-bot-integration.ja.mdx
@@ -4,41 +4,58 @@ description: エージェントを DingTalk に接続し、DM やグループチ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-[エージェント](/agents)を DingTalk に接続すると、そのエージェントが属するワークスペースのメンバーは、Bot に DM を送ったり、グループで @ メンションしたり、`/issue` コマンドで Multica [作業](/issues)を直接作成したりできます。会話と実行記録は Multica ワークスペースに保存されます。
+[エージェント](/agents)を DingTalk に接続すると、そのエージェントが属するワークスペースのメンバーは、Bot に DM を送ったり、グループで @ メンションしたり、`/issue` コマンドで Multica の[タスク](/issues)を直接作成したりできます。会話と実行記録は Multica ワークスペースに保存されます。
<Callout type="info">
DingTalk 連携は[コミュニティがメンテナンス](/community-maintained)しており、公式サポートの SLA はありません。問題がある場合は [GitHub issues](https://github.com/multica-ai/multica/issues) に報告してください。
</Callout>
-
## Bot を接続する
-エージェントの作成者またはワークスペースの owner/admin は、エージェントを DingTalk に接続できます。エージェントと DingTalk Bot は 1 対 1 の接続関係です。
+エージェントの作成者またはワークスペースの owner/admin は、エージェントを DingTalk に接続できます。1 つのエージェントに対応する DingTalk Bot は 1 つです。
+
+<Steps>
+<Step>
-## 1. Stream モードのロボットを作成する
+### Stream モードのロボットを作成する [#1-stream-モードのロボットを作成する]
1. [DingTalk オープンプラットフォーム](https://open-dev.dingtalk.com)で**企業内部アプリ**を作成します。
2. ロボット機能を有効にし、**メッセージ受信モード**を **Stream モード**に設定します。
-## 2. ロボットに権限を付与する
+</Step>
+<Step>
+
+### ロボットに権限を付与する [#2-ロボットに権限を付与する]
**ロボットメッセージ送信権限**(`qyapi_robot_sendmsg`)はデフォルトで追加されています。Multica に Bot 名を表示するには、**DingTalk グループ基本情報管理権限**(`qyapi_chat_manage`)を手動で追加します。
-## 3. アプリ認証情報を取得する
+</Step>
+<Step>
+
+### アプリ認証情報を取得する [#3-アプリ認証情報を取得する]
**凭证与基础信息**(認証情報と基本情報)ページを開き、**Client ID(AppKey)** と **Client Secret(AppSecret)** をコピーします。
-## 4. エージェントを DingTalk に接続する
+</Step>
+<Step>
+
+### エージェントを DingTalk に接続する [#4-エージェントを-dingtalk-に接続する]
1. Multica に戻り、**エージェント → _あなたのエージェント_ → 機能 → 連携**を開きます。
-2. **DingTalk に接続**をクリックします。
+2. **DingTalk を接続**をクリックします。
3. **AppKey** と **AppSecret** を入力し、送信します。
-## 5. DingTalk アカウントと Multica アカウントを連携する
+</Step>
+<Step>
+
+### DingTalk アカウントと Multica アカウントを連携する [#5-dingtalk-アカウントと-multica-アカウントを連携する]
-DingTalk で Bot に DM を送るか、グループで @ メンションして、アカウント連携を一度開始します。Bot との DM にリンクが届きます(有効期間は約 15 分)。リンクを開き、接続成功のメッセージが表示されたら完了です。
+DingTalk で Bot に DM を送るか、グループで @ メンションすると、アカウント連携のリクエストが始まります。Bot から DM でリンクが届きます(有効期間は約 15 分)。リンクを開き、接続成功のメッセージが表示されたら完了です。
+</Step>
+</Steps>
## DingTalk でエージェントに仕事を依頼する
@@ -66,9 +83,9 @@ Multica は DingTalk メッセージを受信すると、元のユーザーメ
リアクションは DingTalk API に依存するため、即時に更新されるとは限りません。結果を確認するときは、Bot の返信と Multica の実行記録も参照してください。
-### `/issue` で作業を作成する
+### `/issue` でタスクを作成する [#issue-で作業を作成する]
-`/issue <タイトル>` または `/issue <タイトル>{改行}<詳細説明>` を送ると、新しい Multica 作業が作成され、Bot に接続されたエージェントに自動的に割り当てられます。同じメッセージの画像も、添付ファイルとして作業に追加されます。通常の会話メッセージとは異なり、`/issue` コマンドは Multica の「[チャット](/chat)」に記録されません。
+`/issue <タイトル>` または `/issue <タイトル>{改行}<詳細説明>` を送ると、新しい Multica タスクが作成され、この Bot に紐づいたエージェントに自動的に割り当てられます。同じメッセージの画像も、添付ファイルとしてタスクに追加されます。通常の会話メッセージとは異なり、`/issue` コマンドは Multica の「[チャット](/chat)」に記録されません。
### `/new` で新しい Chat を開始する
@@ -83,7 +100,6 @@ Multica は DingTalk メッセージを受信すると、元のユーザーメ
- **エージェント → _あなたのエージェント_ → 機能 → 連携**ページでは、エージェントの作成者とワークスペースの owner/admin が DingTalk への接続と切断を行えます。接続後は、Bot 名、Bot がメッセージを正常に処理したことのある DingTalk グループ、および各グループでの Bot のアクティビティ状況データが表示されます。エージェントの読み取り権限を持つワークスペースメンバーは、これらの情報をすべて確認できます。直近 90 日間に正常に処理されたメッセージがないグループは**長期間未使用**にまとめられ、展開時に読み込まれます。
- **設定 → メッセージング → DingTalk**ページには、現在のワークスペース内で、自分に読み取り権限があり、DingTalk に接続済みのエージェントがすべて表示されます。Bot の DingTalk グループ内でのアクティビティ状況データも表示されます。ワークスペースの owner/admin は、リスト内の任意のエージェントの DingTalk 接続をここから直接切断できます。切断後、Bot はメッセージを受信しなくなりますが、インストール記録は監査用に保持されます。ワークスペースの owner/admin は、グループを一覧から削除することもできます。この操作で会話やメッセージが削除されることはありません。その後、DingTalk アカウントを連携済みのワークスペースメンバーが同じグループで Bot を @メンションし、そのメッセージを Multica が正常に受け付けると、グループは再び表示されます。
-
## セルフホスト設定
Multica Cloud ユーザーはこのセクションをスキップできます。セルフホスト環境では、DingTalk の `AppSecret` を暗号化するためのキーを先に設定します。
@@ -102,9 +118,8 @@ API サービスを再起動した後、DingTalk に接続します。このキ
アカウント連携リンクは `MULTICA_APP_URL` を使用し、未設定の場合は `FRONTEND_ORIGIN` にフォールバックします。メンバーがアクセスできる Multica のアドレスを指定してください。
-
## 次に
- [チャット連携](/channels) —— Channel エンジン、セッション、認可の仕組み
-- [エージェント](/agents) · [Chat](/chat) · [作業](/issues)
+- [エージェント](/agents) · [Chat](/chat) · [タスク](/issues)
- [環境変数](/environment-variables) —— セルフホスト設定の完全なリファレンス
diff --git a/apps/docs/content/docs/dingtalk-bot-integration.ko.mdx b/apps/docs/content/docs/dingtalk-bot-integration.ko.mdx
index 21a2edfb47..a7413fe441 100644
--- a/apps/docs/content/docs/dingtalk-bot-integration.ko.mdx
+++ b/apps/docs/content/docs/dingtalk-bot-integration.ko.mdx
@@ -4,41 +4,58 @@ description: 에이전트를 DingTalk에 연결해 DM이나 그룹 채팅에서
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-[에이전트](/agents)를 DingTalk에 연결하면 해당 에이전트가 속한 워크스페이스의 멤버는 봇에게 DM을 보내거나, 그룹에서 @ 멘션하거나, `/issue` 명령으로 Multica [작업](/issues)를 바로 만들 수 있습니다. 대화와 실행 기록은 Multica 워크스페이스에 저장됩니다.
+[에이전트](/agents)를 DingTalk에 연결하면 해당 에이전트가 속한 워크스페이스의 멤버는 봇에게 DM을 보내거나, 그룹에서 @ 멘션하거나, `/issue` 명령으로 Multica [태스크](/issues)를 바로 만들 수 있습니다. 대화와 실행 기록은 Multica 워크스페이스에 저장됩니다.
<Callout type="info">
DingTalk 연동은 [커뮤니티가 유지관리](/community-maintained)하며 공식 지원 SLA는 제공되지 않습니다. 문제가 있으면 [GitHub issues](https://github.com/multica-ai/multica/issues)에 보고해 주세요.
</Callout>
-
## 봇 연결하기
-에이전트 생성자 또는 워크스페이스 owner/admin은 에이전트를 DingTalk에 연결할 수 있습니다. 에이전트와 DingTalk 봇은 1:1로 연결됩니다.
+에이전트 생성자 또는 워크스페이스 owner/admin은 에이전트를 DingTalk에 연결할 수 있습니다. 에이전트 하나에 DingTalk 봇 하나가 대응합니다.
+
+<Steps>
+<Step>
-## 1. Stream 모드 로봇 만들기
+### Stream 모드 로봇 만들기 [#1-stream-모드-로봇-만들기]
1. [DingTalk 오픈 플랫폼](https://open-dev.dingtalk.com)에서 **기업 내부 앱**을 만듭니다.
2. 로봇 기능을 활성화하고 **메시지 수신 모드**를 **Stream 모드**로 설정합니다.
-## 2. 로봇에 권한 부여하기
+</Step>
+<Step>
+
+### 로봇에 권한 부여하기 [#2-로봇에-권한-부여하기]
**로봇 메시지 전송 권한**(`qyapi_robot_sendmsg`)은 기본으로 추가되어 있습니다. Multica에 봇 이름을 표시하려면 **DingTalk 그룹 기본 정보 관리 권한**(`qyapi_chat_manage`)을 수동으로 추가하세요.
-## 3. 앱 자격 증명 가져오기
+</Step>
+<Step>
+
+### 앱 자격 증명 가져오기 [#3-앱-자격-증명-가져오기]
**凭证与基础信息**(자격 증명 및 기본 정보) 페이지에서 **Client ID(AppKey)**와 **Client Secret(AppSecret)**을 복사합니다.
-## 4. 에이전트를 DingTalk에 연결하기
+</Step>
+<Step>
+
+### 에이전트를 DingTalk에 연결하기 [#4-에이전트를-dingtalk에-연결하기]
1. Multica로 돌아가 **에이전트 → _당신의 에이전트_ → 기능 → 연동**을 엽니다.
2. **DingTalk 연결**을 클릭합니다.
3. **AppKey**와 **AppSecret**을 입력한 뒤 제출합니다.
-## 5. DingTalk 계정과 Multica 계정 연결하기
+</Step>
+<Step>
+
+### DingTalk 계정과 Multica 계정 연결하기 [#5-dingtalk-계정과-multica-계정-연결하기]
-DingTalk에서 봇에게 DM을 보내거나 그룹에서 @ 멘션해 계정 연결을 한 번 요청합니다. 봇과의 DM으로 링크가 오며 약 15분 동안 유효합니다. 링크를 열어 연결 성공 안내가 표시되면 완료입니다.
+DingTalk에서 봇에게 DM을 보내거나 그룹에서 @ 멘션하면 계정 연결 요청이 시작됩니다. 봇이 DM으로 링크를 보내며, 링크는 약 15분 동안 유효합니다. 링크를 열어 연결 성공 안내가 표시되면 완료입니다.
+</Step>
+</Steps>
## DingTalk에서 에이전트에게 작업 요청하기
@@ -66,9 +83,9 @@ Multica는 DingTalk 메시지를 받으면 사용자의 원래 메시지에 Ding
리액션은 DingTalk API에 의존하므로 즉시 갱신되지 않을 수 있습니다. 결과를 확인할 때는 봇의 답장과 Multica의 실행 기록도 함께 확인하세요.
-### `/issue`로 작업 만들기
+### `/issue`로 태스크 만들기 [#issue로-작업-만들기]
-`/issue <제목>` 또는 `/issue <제목>{줄 바꿈}<상세 설명>`을 보내면 새 Multica 작업이 만들어지고 봇에 연결된 에이전트에 자동으로 할당됩니다. 같은 메시지의 이미지도 첨부 파일로 작업에 추가됩니다. 일반 대화 메시지와 달리 `/issue` 명령은 Multica의 “[채팅](/chat)”에 기록을 남기지 않습니다.
+`/issue <제목>` 또는 `/issue <제목>{줄 바꿈}<상세 설명>`을 보내면 새 Multica 태스크가 만들어지고 이 봇에 연결된 에이전트에 자동으로 할당됩니다. 같은 메시지의 이미지도 첨부 파일로 태스크에 추가됩니다. 일반 대화 메시지와 달리 `/issue` 명령은 Multica의 “[채팅](/chat)”에 기록을 남기지 않습니다.
### `/new`로 새 Chat 시작하기
@@ -83,7 +100,6 @@ Multica는 DingTalk 메시지를 받으면 사용자의 원래 메시지에 Ding
- **에이전트 → _당신의 에이전트_ → 기능 → 연동** 페이지에서 에이전트 생성자와 워크스페이스 owner/admin은 DingTalk에 연결하거나 연결을 해제할 수 있습니다. DingTalk에 연결하면 이 페이지에 봇 이름, 봇이 메시지를 정상적으로 처리한 적이 있는 DingTalk 그룹, 그리고 각 그룹에서의 봇 활동 상태 데이터가 표시됩니다. 에이전트 읽기 권한이 있는 워크스페이스 멤버는 모두 이 정보를 볼 수 있습니다. 최근 90일 동안 정상적으로 처리된 메시지가 없는 그룹은 **장기 미활동**에 모이며 펼칠 때 불러옵니다.
- **설정 → 메신저 → DingTalk** 페이지에는 현재 워크스페이스에서 자신에게 읽기 권한이 있고 DingTalk에 연결된 모든 에이전트 목록과 DingTalk 그룹에서의 봇 활동 상태 데이터가 표시됩니다. 워크스페이스 owner/admin은 목록에 있는 에이전트의 DingTalk 연결을 여기서 바로 해제할 수도 있습니다. 연결을 해제하면 봇은 메시지 수신을 멈추지만 설치 기록은 감사용으로 보관됩니다. 워크스페이스 owner/admin은 그룹을 목록에서 삭제할 수도 있습니다. 이 작업은 대화나 메시지를 삭제하지 않습니다. 이후 DingTalk 계정을 연결한 워크스페이스 멤버가 같은 그룹에서 봇을 다시 @멘션하고 Multica가 해당 메시지를 정상적으로 접수하면 그룹이 다시 표시됩니다.
-
## 자체 호스팅 설정
Multica Cloud 사용자는 이 섹션을 건너뛸 수 있습니다. 자체 호스팅 배포에서는 DingTalk `AppSecret`을 암호화하기 위한 키를 먼저 설정해야 합니다.
@@ -102,9 +118,8 @@ API 서비스를 재시작한 뒤 DingTalk에 연결하세요. 이 키는 계속
계정 연결 링크는 `MULTICA_APP_URL`을 사용하고, 설정하지 않으면 `FRONTEND_ORIGIN`으로 대체합니다. 멤버가 접근할 수 있는 Multica 주소여야 합니다.
-
## 다음
- [채팅 연동](/channels) —— Channel 엔진, 세션, 권한 부여 방식
-- [에이전트](/agents) · [Chat](/chat) · [작업](/issues)
+- [에이전트](/agents) · [Chat](/chat) · [태스크](/issues)
- [환경 변수](/environment-variables) —— 전체 자체 호스팅 설정 참조
diff --git a/apps/docs/content/docs/dingtalk-bot-integration.mdx b/apps/docs/content/docs/dingtalk-bot-integration.mdx
index 7e38bfd2ff..3a7748cb64 100644
--- a/apps/docs/content/docs/dingtalk-bot-integration.mdx
+++ b/apps/docs/content/docs/dingtalk-bot-integration.mdx
@@ -4,6 +4,7 @@ description: Connect an agent to DingTalk and give it work directly in DMs or gr
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
After connecting an [agent](/agents) to DingTalk, members of the agent's workspace can DM the Bot, @-mention it in a group, or use the `/issue` command to create a Multica [issue](/issues) directly. Conversations and run records are saved to the Multica workspace.
@@ -11,50 +12,66 @@ After connecting an [agent](/agents) to DingTalk, members of the agent's workspa
The DingTalk integration is [community-maintained](/community-maintained) and has no official support SLA. Report problems in [GitHub issues](https://github.com/multica-ai/multica/issues).
</Callout>
-
## Connect the Bot
-The agent's creator or a workspace owner/admin can connect the agent to DingTalk. Agents and DingTalk Bots have a one-to-one connection.
+The agent's creator or a workspace owner/admin can connect the agent to DingTalk. Each agent maps to one DingTalk Bot.
+
+<Steps>
+<Step>
-## 1. Create a Stream-mode robot
+### Create a Stream-mode robot [#1-create-a-stream-mode-robot]
1. Create an **enterprise internal app** in the [DingTalk Open Platform](https://open-dev.dingtalk.com).
2. Enable the robot capability and set **Message Receiving Mode** to **Stream Mode**.
-## 2. Grant permissions to the robot
+</Step>
+<Step>
+
+### Grant permissions to the robot [#2-grant-permissions-to-the-robot]
The **Robot Message Sending** permission (`qyapi_robot_sendmsg`) is added by default. To show the Bot's name in Multica, manually add the **DingTalk Group Basic Information Management** permission (`qyapi_chat_manage`).
-## 3. Get the application credentials
+</Step>
+<Step>
+
+### Get the application credentials [#3-get-the-application-credentials]
-Open **Credentials & Basic Information** page and copy the **Client ID (AppKey)** and **Client Secret (AppSecret)**.
+Open the **Credentials & Basic Information** page and copy the **Client ID (AppKey)** and **Client Secret (AppSecret)**.
-## 4. Connect the agent to DingTalk
+</Step>
+<Step>
+
+### Connect the agent to DingTalk [#4-connect-the-agent-to-dingtalk]
1. Return to Multica and open **Agents → _your agent_ → Capabilities → Integrations**.
2. Click **Connect DingTalk**.
3. Enter the **AppKey** and **AppSecret**, then submit.
-## 5. Link your DingTalk and Multica accounts
+</Step>
+<Step>
+
+### Link your DingTalk and Multica accounts [#5-link-your-dingtalk-and-multica-accounts]
-DM the Bot in DingTalk or @-mention it in a group to trigger a linking request. You will receive a link in your DM with the Bot; it is valid for about 15 minutes. Open the link. When the success message appears, account linking is complete.
+DM the Bot in DingTalk or @-mention it in a group to trigger a linking request. The Bot sends you a link in a DM (valid for about 15 minutes); open it, and linking is complete once the success message appears.
+</Step>
+</Steps>
## Give the agent work in DingTalk
### Direct messages
-Send the Bot a message. When the agent finishes the work, it replies with the result in the DM.
+Send the Bot a message. When the agent finishes, it replies with the result in the DM.
### Group chats
-Add the Bot to a DingTalk group, then send `@your-bot <message>`. You must @-mention the Bot again in every follow-up. The Bot processes only messages that @-mention it.
+Add the Bot to a DingTalk group, then send `@your-bot <message>`. Every follow-up needs a fresh @-mention; the Bot processes only messages that @-mention it.
### Send images
Direct messages and group chats both support messages containing text and images. Supported image formats are PNG, JPEG, GIF, WebP, and BMP. Each message can contain up to 4 images, with a maximum size of 10 MB per image. Files and voice messages are not currently supported.
-In group messages containing both text and images, the @-mention of the Bot is also included in the message sent to the agent. To remove the Bot's name precisely, add the **DingTalk Group Basic Information Management** permission (`qyapi_chat_manage`).
+In group messages that mix text and images, the text produced by the @-mention is also sent to the agent as part of the message. To strip the Bot's name from it, add the **DingTalk Group Basic Information Management** permission (`qyapi_chat_manage`).
### Follow up with a quoted message
@@ -62,13 +79,13 @@ Use DingTalk's quote action to select a message, then enter your current input.
### Message processing feedback
-After receiving a DingTalk message, Multica attempts to add DingTalk's `RogerThat` reaction to the original user message to indicate that it has been passed to the agent for processing. Once the agent finishes processing and the reply is successfully sent to DingTalk, `RogerThat` is replaced with `Done`. If processing is cancelled, `RogerThat` is removed.
+After receiving a DingTalk message, Multica tries to add DingTalk's `RogerThat` reaction to the original message to show it has been handed to the agent. Once the agent finishes and the reply reaches DingTalk, `RogerThat` is replaced with `Done`. If the run is cancelled, `RogerThat` is removed.
Reactions depend on DingTalk's API and may not update immediately. Check the Bot's reply and the run record in Multica when assessing the outcome.
### Create an issue with `/issue`
-Send `/issue <title>` or `/issue <title>{newline}<detailed description>` to create a new Multica issue and automatically assign it to the agent connected to the Bot. Images in the same message are also added to the issue as attachments. Unlike regular chat messages, the `/issue` command leaves no record in Multica [Chat](/chat).
+Send `/issue <title>` or `/issue <title>{newline}<detailed description>` to create a new Multica issue and automatically assign it to the agent the Bot is bound to. Images in the same message are also added to the issue as attachments. Unlike regular chat messages, the `/issue` command leaves no record in Multica [Chat](/chat).
### Start a new Chat with `/new`
@@ -83,7 +100,6 @@ Send `/clear` to keep the current Multica Chat while applying a fresh agent-visi
- On **Agents → _your agent_ → Capabilities → Integrations**, the agent's creator and workspace owners/admins can connect the agent to DingTalk or disconnect it. Once connected, this page shows the Bot's name, DingTalk groups where it has successfully processed messages, and its activity status data in those groups. Any workspace member with read access to the agent can see this information. Groups with no successfully processed messages in the last 90 days are placed under **Long inactive** and loaded when expanded.
- **Settings → Messaging → DingTalk** lists every DingTalk-connected agent in the current workspace that the viewer can read, along with the Bot's activity status data in DingTalk groups. Workspace owners/admins can also disconnect any listed agent from DingTalk. After disconnection, the Bot stops receiving messages, while the installation record is retained for audit. Workspace owners/admins can also forget a group. This removes the group from the list without deleting conversations or messages. The group reappears if a workspace member with a linked DingTalk account later @mentions the Bot there and Multica accepts the message.
-
## Self-hosting setup
Multica Cloud users can skip this section. A self-hosted deployment must first set a key for encrypting the DingTalk `AppSecret`:
@@ -102,7 +118,6 @@ Restart the API service, then connect DingTalk. Keep this key permanently: if it
Account-linking URLs use `MULTICA_APP_URL`, falling back to `FRONTEND_ORIGIN` when it is unset. The URL must point to a Multica address that members can access.
-
## Next
- [Chat integrations](/channels) — how the Channel engine, sessions, and authorization work
diff --git a/apps/docs/content/docs/dingtalk-bot-integration.zh.mdx b/apps/docs/content/docs/dingtalk-bot-integration.zh.mdx
index 78942d92dc..f7f712b908 100644
--- a/apps/docs/content/docs/dingtalk-bot-integration.zh.mdx
+++ b/apps/docs/content/docs/dingtalk-bot-integration.zh.mdx
@@ -4,6 +4,7 @@ description: 把智能体接入钉钉,在私聊或群聊中直接交代工作
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
把[智能体](/agents)接入钉钉后,智能体所在工作区的成员可以私聊 Bot、在群里 @ Bot,或用 `/issue` 指令直接创建 Multica [任务](/issues)。对话和执行记录会保存到 Multica 工作区。
@@ -11,40 +12,56 @@ import { Callout } from "fumadocs-ui/components/callout";
钉钉集成[由社区维护](/community-maintained),不提供官方支持 SLA。遇到问题请提交到 [GitHub 任务](https://github.com/multica-ai/multica/issues)。
</Callout>
-
## 连接 Bot
-智能体创建者或工作区 owner/admin 可以将智能体接入钉钉,智能体跟钉钉 Bot 是 1:1 的连接关系。
+智能体创建者或工作区 owner/admin 可以把智能体接入钉钉。一个智能体对应一个钉钉 Bot。
+
+<Steps>
+<Step>
-## 1. 创建 Stream 模式机器人
+### 创建 Stream 模式机器人 [#1-创建-stream-模式机器人]
1. 在[钉钉开放平台](https://open-dev.dingtalk.com)创建一个**企业内部应用**。
2. 开启机器人能力,其中**消息接收模式**设为 **Stream 模式**。
-## 2. 给机器人授权
+</Step>
+<Step>
+
+### 给机器人授权 [#2-给机器人授权]
+
+默认已添加"机器人发消息权限"(`qyapi_robot_sendmsg`)。如需在 Multica 平台显示 Bot 名称,需手动添加"钉群基础信息管理权限"(`qyapi_chat_manage`)。
-默认已添加“机器人发消息权限”(`qyapi_robot_sendmsg`)。如需在 Multica 平台显示 Bot 名称,需手动添加“钉群基础信息管理权限”(`qyapi_chat_manage`)。
+</Step>
+<Step>
-## 3. 获取应用凭证
+### 获取应用凭证 [#3-获取应用凭证]
进入**凭证与基础信息**页面,复制 **Client ID(AppKey)** 和 **Client Secret(AppSecret)**。
-## 4. 把智能体接入钉钉
+</Step>
+<Step>
+
+### 把智能体接入钉钉 [#4-把智能体接入钉钉]
1. 回到 Multica,打开 **智能体 → _你的智能体_ → 能力 → 集成**。
2. 点击**连接钉钉**。
3. 填入 **AppKey** 和 **AppSecret** 后提交。
-## 5. 关联钉钉账号与 Multica 平台账号
+</Step>
+<Step>
+
+### 关联钉钉账号与 Multica 平台账号 [#5-关联钉钉账号与-multica-平台账号]
-在钉钉上跟 Bot 私聊,或者在群里 @ Bot,触发一次关联请求,你会在 Bot 私聊对话框中收到一个链接(有效期约 15 分钟),点击链接后看到连接成功的提示即大功告成。
+在钉钉上跟 Bot 私聊,或者在群里 @ Bot,触发一次关联请求。Bot 会在私聊里发来一个链接(有效期约 15 分钟),点击后看到连接成功的提示即完成关联。
+</Step>
+</Steps>
-## 在钉钉中给智能体交代工作
+## 在钉钉中交代工作 [#在钉钉中给智能体交代工作]
### 私聊
-直接给 Bot 发消息即可。智能体处理完任务后,会将结果回复至私聊对话框中。
+直接给 Bot 发消息即可。智能体处理完成后,把结果回复到私聊里。
### 群聊
@@ -54,7 +71,7 @@ import { Callout } from "fumadocs-ui/components/callout";
私聊和群聊都支持图文混排消息,图片支持 PNG、JPEG、GIF、WebP 和 BMP;每条消息最多 4 张,每张不超过 10 MB。暂不支持文件和语音消息。
-注意,群聊中的图文混排消息,@ Bot 产生的内容也会作为消息内容的一部分发送给智能体,如果想精准剔除掉 Bot 名称,需添加“钉群基础信息管理权限”(`qyapi_chat_manage`)。
+群聊中的图文混排消息里,@ Bot 产生的文字也会作为消息内容发给智能体。要去掉其中的 Bot 名称,需添加"钉群基础信息管理权限"(`qyapi_chat_manage`)。
### 引用消息继续追问
@@ -62,13 +79,13 @@ import { Callout } from "fumadocs-ui/components/callout";
### 消息处理反馈
-Multica 收到钉钉消息后,会尝试在用户原消息上添加钉钉的`收到`表情,以表示已将消息交由智能体处理;智能体处理完成、并成功将消息发送到钉钉后,`收到`表情会被替换为`Done`;任务被取消后,会撤回`收到`表情。
+Multica 收到钉钉消息后,会尝试在原消息上添加钉钉的 `收到` 表情,表示消息已交给智能体;智能体处理完成、回复成功发到钉钉后,`收到` 换成 `Done`;任务被取消时,撤回 `收到` 表情。
表情反馈依赖钉钉接口,不保证即时更新。判断结果时请结合 Bot 回复和 Multica 中的运行记录。
### 使用 `/issue` 创建任务
-发送 `/issue <标题>` 或者 `/issue <标题>{换行}<详细描述>`,就可以创建一个新 Multica 任务,并自动指派给 Bot 连接着的智能体。同一条消息内的图片也会以附件的形式添加到该任务中。跟普通对话消息不一样的是,`/issue` 指令不会在 Multica 的“[对话](/chat)”中留下记录。
+发送 `/issue <标题>` 或者 `/issue <标题>{换行}<详细描述>`,会创建一个新 Multica 任务,并自动指派给这个 Bot 绑定的智能体。同一条消息里的图片会作为附件加到该任务中。和普通消息不同,`/issue` 指令不会在 Multica 的[对话](/chat)中留下记录。
### 使用 `/new` 新建 Chat
@@ -84,7 +101,7 @@ Multica 收到钉钉消息后,会尝试在用户原消息上添加钉钉的`
- 在**设置 → 消息渠道 → 钉钉**页面,显示当前工作区内所有有读权限且连接了钉钉的智能体列表,以及 Bot 在钉群内的活跃状态数据。工作区 owner/admin 还可以在此直接断开列表中任意智能体的钉钉连接。断开后 Bot 停止接收消息,安装记录仍会保留用于审计。工作区 owner/admin 还可以忘记某个群。忘记只会从列表中移除该群,不会删除对话和消息。如果已关联钉钉账号的工作区成员以后在该群再次 @ Bot,且 Multica 成功接收这条消息,群会重新出现。
-## 自部署配置
+## 自托管配置 [#自部署配置]
Multica Cloud 用户可跳过本节。自托管部署需要先设置一个用于加密钉钉 `AppSecret` 的密钥:
@@ -102,7 +119,6 @@ openssl rand -base64 32
账号绑定链接使用 `MULTICA_APP_URL`,未设置时回退到 `FRONTEND_ORIGIN`;它需要指向成员可以访问的 Multica 地址。
-
## 接下来
- [聊天集成](/channels) —— Channel 引擎、会话与授权是怎么运作的
diff --git a/apps/docs/content/docs/environment-variables.fr.mdx b/apps/docs/content/docs/environment-variables.fr.mdx
index e4da9fbd4a..f96a1f48fa 100644
--- a/apps/docs/content/docs/environment-variables.fr.mdx
+++ b/apps/docs/content/docs/environment-variables.fr.mdx
@@ -3,11 +3,12 @@ title: Variables d'environnement
description: Configuration courante du serveur, du stockage, des intégrations et du runtime pour auto-héberger Multica.
---
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Callout } from "fumadocs-ui/components/callout";
Multica lit les variables d'environnement au démarrage du processus. Après en avoir modifié une, redémarrez le processus API, web ou daemon concerné. La commande `docker compose restart` de Docker Compose ne relit pas `.env` ; recréez les conteneurs avec `up -d` pour que les modifications prennent effet.
-Cette page ne liste que la configuration liée au déploiement ; les variables de test et les variables internes aux exécutions n'y figurent pas. Il s'agit d'une référence organisée par thème — pour les étapes complètes de déploiement, consultez le [démarrage rapide de l'auto-hébergement](/self-host-quickstart).
+Cette page regroupe par thème la configuration liée au déploiement ; les variables de test et les variables internes aux exécutions n'y figurent pas. Pour les étapes complètes de déploiement, consultez le [démarrage rapide de l'auto-hébergement](/self-host-quickstart).
## Configuration minimale pour la production
@@ -67,7 +68,7 @@ Les limites de connexions du primaire et du réplica sont indépendantes. Dimens
`MULTICA_DAEMON_SERVER_URL` est renvoyée par le point de terminaison `/api/config`, qui ne requiert aucune authentification, et elle est visible par les clients. Considérez-la comme une configuration publique ; n'y placez jamais d'identifiants, de jetons ni d'autres secrets.
</Callout>
-Lorsque le frontend et l'API s'exécutent sur des hôtes différents et que le navigateur communique directement avec le domaine de l'API, vous devez définir `COOKIE_DOMAIN` — sinon le navigateur ne peut pas lire le cookie CSRF : toutes les requêtes d'écriture renvoient `403 CSRF validation failed`, alors que les lectures fonctionnent normalement. Utilisez le domaine parent le plus restreint qui couvre les deux hôtes (`.agent.example.com` plutôt que `.example.com`). Il étend le cookie de session de connexion à tous les hôtes de ce domaine, ce qui n'est acceptable que si tous ces hôtes sont exploités par la même entité de confiance. Après l'avoir modifié, effacez les anciens cookies sur les deux hôtes et reconnectez-vous. Si vous suivez la configuration en origine unique du [démarrage rapide de l'auto-hébergement](/self-host-quickstart#3-choisir-le-mode-daccès) (le navigateur ne visite que le domaine de l'application), laissez-le vide. N'utilisez pas d'adresse IP — les navigateurs ignorent les cookies dont le Domain est une adresse IP.
+Lorsque le frontend et l'API s'exécutent sur des hôtes différents et que le navigateur communique directement avec le domaine de l'API, vous devez définir `COOKIE_DOMAIN` — sinon le navigateur ne peut pas lire le cookie CSRF : toutes les requêtes d'écriture renvoient `403 CSRF validation failed`, alors que les lectures fonctionnent normalement. Utilisez le domaine parent le plus restreint qui couvre les deux hôtes (`.agent.example.com` plutôt que `.example.com`). Il étend le cookie de session de connexion à tous les hôtes de ce domaine, ce qui n'est acceptable que si tous ces hôtes sont exploités par la même entité de confiance. Après l'avoir modifié, effacez les anciens cookies sur les deux hôtes et reconnectez-vous. Si vous suivez la configuration en origine unique du [démarrage rapide de l'auto-hébergement](/self-host-quickstart#remote-access) (le navigateur ne visite que le domaine de l'application), laissez-le vide. N'utilisez pas d'adresse IP — les navigateurs ignorent les cookies dont le Domain est une adresse IP.
<Callout type="warning">
Les déploiements auto-hébergés doivent définir `FRONTEND_ORIGIN`. Sans cette variable, les liens d'invitation, les attributs de sécurité des cookies et les vérifications d'origine WebSocket peuvent tous diverger de votre domaine réel.
@@ -241,31 +242,116 @@ Les variables ci-dessous sont lues sur l'ordinateur qui exécute vos agents, et
| `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | identique à `MULTICA_AGENT_IDLE_WATCHDOG` | Seuil de silence sémantique de Codex. Le minuteur propre à Codex ne peut pas voir qu'un outil est en cours d'exécution ; il suit donc le plus grand des budgets d'inactivité et d'outil au lieu de maintenir un plafond distinct et plus court |
| `MULTICA_CODEX_FIRST_TURN_TIMEOUT` | `0` | Surcharge explicite du plafond d'absence de progression du premier tour de Codex ; `0` conserve la valeur par défaut. L'attente effective du premier tour reste bornée par `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` et par le délai d'exécution global — définissez `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` strictement au-dessus de cette valeur (avec une certaine marge), sinon l'attente est tronquée à cette valeur et la nouvelle tentative de démarrage du catalogue de modèles est ignorée. Des valeurs égales ne suffisent pas : le minuteur sémantique est armé en premier, donc à durées égales la nouvelle tentative peut quand même être perdue |
| `MULTICA_CODEX_HANDSHAKE_TIMEOUT` | `30s` ; `thread/start`, `thread/resume` : `60s` | Plafonds de la poignée de main au démarrage du Codex app-server. Une valeur explicite remplace globalement les deux budgets |
+| `MULTICA_CODEX_MEMORY` | désactivé | `1`, `true`, `yes` ou `on` conserve la mémoire native de Codex dans les exécutions Codex gérées par le daemon ; par défaut, elle est désactivée pour chaque exécution. Voir [Mémoire native et sous-agents de Codex](/daemon-runtimes#codex-memory) |
+| `MULTICA_CODEX_MULTI_AGENT` | désactivé | Mêmes valeurs ; conserve les sous-agents natifs de Codex. L'exécution est considérée comme terminée dès que le fil parent se termine, et les résultats que les sous-agents n'ont pas encore rendus sont perdus |
| `MULTICA_CODEX_TURN_INTERRUPT_TIMEOUT` | `2s` | Délai de grâce, après une annulation, accordé au Codex app-server pour accuser réception de `turn/interrupt` et émettre `turn/completed`, afin de conserver la consommation finale de tokens avant le nettoyage forcé du processus. Sur des hôtes inhabituellement lents, ajustez-le à partir de la latence d'interruption enregistrée dans les journaux du daemon |
| `MULTICA_DAEMON_AUTO_UPDATE` | Cloud `true` ; auto-hébergé `false` | Vérifier et appliquer automatiquement ou non les mises à jour du CLI |
| `MULTICA_DAEMON_AUTO_UPDATE_INTERVAL` | `6h` | Intervalle de vérification des mises à jour |
| `MULTICA_DAEMON_AUTO_RELOAD` | `true` | Redémarrer ou non sur un binaire `multica` remplacé sur disque par un moyen externe (`brew upgrade`, un nouveau téléchargement, une compilation locale). Indépendant de `MULTICA_DAEMON_AUTO_UPDATE` |
| `MULTICA_WORKSPACES_ROOT` | `~/multica_workspaces` | Répertoire racine des répertoires de travail des exécutions |
| `MULTICA_AGENT_TEMP_BASE` | `/tmp` (Linux/macOS) | Linux/macOS uniquement. Répertoire parent des répertoires temporaires privés de chaque exécution ; doit être un répertoire absolu existant et accessible en écriture, et une valeur invalide fait échouer le démarrage de l'exécution au lieu de se rabattre sur `/tmp`. Choisissez un chemin court — les outils enfants peuvent y lier des sockets AF_UNIX, et `sun_path` est limité à 108 octets sous Linux et à 104 sous macOS |
-| `MULTICA_KEEP_ENV_AFTER_TASK` | `false` | Conserver les répertoires des exécutions pour le débogage |
-Pour le contexte interne que le daemon injecte dans les exécutions des agents, consultez [Environnement des exécutions](/daemon-runtimes#environnement-du-runtime-pendant-une-exécution).
+Pour le contexte interne que le daemon injecte dans les exécutions des agents, consultez [Environnement des exécutions](/daemon-runtimes#environnement-du-runtime-pendant-une-exécution). `MULTICA_REPO_CHECKOUT_MODE` en fait partie : le daemon la définit à `isolated` uniquement pour les exécutions Codex sous Linux et Windows, et elle ne se configure pas à la main. Les variables `MULTICA_*` de l'environnement du daemon lui-même ne sont pas transmises aux exécutions.
-Chaque outil de codage IA accepte `MULTICA_<PROVIDER>_PATH` et `MULTICA_<PROVIDER>_MODEL` pour remplacer le chemin de la commande et le modèle par défaut. QwenPaw et MiniMax Code n'ont pas de variable de modèle, car Multica ne leur envoie jamais de modèle ; la variable de chemin de MiniMax Code est `MULTICA_MCODE_PATH` — consultez [Comparaison des outils de codage IA](/providers#sources-des-modèles). DeepSeek Harness prend en charge `MULTICA_DSH_PATH` et `MULTICA_DSH_MODEL` (un ID de modèle du catalogue dsh, par exemple `deepseek-official/deepseek-chat`). DeepSeek Harness accepte en outre `MULTICA_DSH_PROFILE_BUNDLE` : une liste de bundles, séparés par des virgules, à installer dans son profil `multica` lorsque ce profil est absent, essayés dans l'ordre, chaque entrée étant une spécification npm, un répertoire ou une archive tarball empaquetée. Elle n'est pas définie par défaut, et c'est ce profil qui fournit le protocole `--stdio` que pilote Multica : si la variable n'est pas définie, l'installation DSH reste intacte et le daemon signale le profil manquant au lieu d'enregistrer un runtime inutilisable. Le bridge de Multica n'est pas encore publié sur un registre npm public ; le choix d'une valeur est donc traité dans [Installer un runtime d'agent](/install-agent-runtime). Ce que vous définissez est installé dans le répertoire DSH de chaque hôte de daemon sans autre confirmation : considérez donc ce choix comme une décision relative à la chaîne d'approvisionnement. L'installation qu'active `MULTICA_DSH_PROFILE_BUNDLE` est volontairement limitée : elle s'exécute au plus une fois par durée de vie du daemon, uniquement lorsque la sonde signale que le profil est réellement absent, et un échec est journalisé avec la sortie du gestionnaire de paquets lui-même et n'est retenté qu'après un redémarrage du daemon. Une sonde qui expire, ou qui répond avec une version de protocole que ce daemon ne pilote pas, est signalée et ne donne jamais lieu à une installation par-dessus — le daemon n'écrase pas un profil présent à dessein. Pour diagnostiquer, recherchez `DSH runtime profile` dans le journal du daemon ; pour annuler une installation, supprimez `$DSH_HOME/profiles/multica` (par défaut `~/.dsh/profiles/multica`). `MULTICA_DSH_PLUGIN_PATH` remplace le répertoire à partir duquel l'installation résout pnpm. DSH Desktop conserve le pnpm vers lequel `dsh plugin` redirige dans son propre répertoire de commandes du runtime, sous macOS comme sous Windows, et le daemon le trouve et l'ajoute automatiquement en tête — y compris dans l'arborescence versionnée qu'utilise une version plus récente de Desktop. Cette variable n'est donc nécessaire que pour une installation que le daemon ne parvient pas à trouver, ou pour que l'installation utilise votre propre pnpm. La définir remplace entièrement la recherche : si le répertoire n'existe pas, l'installation se rabat sur le pnpm présent dans le `PATH` du daemon plutôt que sur celui fourni. Linux n'a pas de DSH Desktop ; l'installation y utilise donc toujours le `PATH`. Dim prend en charge `MULTICA_DIM_PATH` et `MULTICA_DIM_MODEL` (un ID de modèle du catalogue dim). ZeroClaw prend en charge `MULTICA_ZEROCLAW_PATH` mais n'a pas de variable de modèle ; c'est son profil d'agent qui détermine le choix du modèle. Les arguments par défaut à l'échelle de la machine via `MULTICA_<PROVIDER>_ARGS` sont actuellement pris en charge pour cinq outils : Claude Code, Codex, CodeBuddy, Qwen Code et QwenPaw. Les variables sont `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS` et `MULTICA_QWENPAW_ARGS`. Par exemple :
+L'ordre de priorité est : option de ligne de commande → variable d'environnement → `~/.multica/config.json` → valeur par défaut intégrée. Pour le comportement du watchdog, consultez [Daemon et runtimes](/daemon-runtimes).
+
+### Nettoyage et conservation [#gc]
+
+Le daemon nettoie régulièrement les répertoires des exécutions, les caches de dépôts, les historiques de session et les répertoires temporaires ; ce qui est supprimé et quand est décrit dans [Nettoyage et conservation](/daemon-runtimes#cleanup). Les durées acceptent la syntaxe Go, plus `d` pour les jours (par exemple `14d` ou `1d12h`).
+
+| Variable | Valeur par défaut | Description |
+|---|---|---|
+| `MULTICA_GC_ENABLED` | `true` | `false` ou `0` désactive toute la boucle de nettoyage |
+| `MULTICA_GC_INTERVAL` | `2h` | Intervalle entre deux passes ; la première a lieu environ 30 secondes après le démarrage du daemon |
+| `MULTICA_GC_TTL` | `24h` | Délai après lequel les répertoires d'exécution sont supprimés une fois la tâche passée dans la catégorie `done` ou `closed`, ou la session de chat archivée |
+| `MULTICA_GC_COMPLETED_TASK_TTL` | Multica Cloud `14d` ; auto-hébergé `0` | Délai après la fin d'une exécution de tâche au bout duquel tout son répertoire est supprimé, que la tâche soit fermée ou non ; `0` désactive. Ne s'applique pas aux exécutions sur le répertoire local d'un projet |
+| `MULTICA_GC_ORPHAN_TTL` | `72h` | Durée sans modification après laquelle un répertoire sans propriétaire identifié est supprimé |
+| `MULTICA_GC_ARTIFACT_TTL` | `12h` | Délai après la fin d'une exécution au bout duquel le contenu régénérable est supprimé (les répertoires de la ligne suivante et le cache que le daemon prépare pour Codex) ; `0` le conserve |
+| `MULTICA_GC_ARTIFACT_PATTERNS` | `node_modules,.next,.turbo` | Noms de répertoires considérés comme régénérables, séparés par des virgules. La définir **remplace** la liste par défaut : ajoutez les valeurs par défaut si vous voulez les garder. Les entrées contenant `/` ou `\` sont ignorées |
+| `MULTICA_GC_REPO_TTL` | `30d` | Durée sans checkout après laquelle un cache de dépôt nu qui n'est plus référencé et n'a plus de worktree est supprimé ; `0` le conserve |
+| `MULTICA_GC_REPO_MAINTENANCE_ENABLED` | `true` | Exécuter ou non `git reflog expire` et `git gc` sur un cache de dépôt après la suppression des branches d'agent périmées ; `false` désactive seulement cette étape |
+| `MULTICA_GC_CODEX_SESSION_TTL` | `14d` | Durée d'inutilisation avant suppression des historiques de session Codex ; `0` les conserve |
+| `MULTICA_GC_HERMES_SESSION_TTL` | `14d` | Durée d'inutilisation avant suppression des historiques de session Hermes ; `0` les conserve |
+| `MULTICA_GC_HERMES_MEMORY_TTL` | `90d` | Durée d'inutilisation avant suppression de la mémoire Hermes ; `0` la conserve |
+| `MULTICA_GC_TASK_TEMP_LEGACY_TTL` | `0` | Uniquement pour les répertoires temporaires laissés par d'anciens daemons, sans verrou d'exécution : durée sans modification avant suppression. `0` les conserve. Les répertoires temporaires avec verrou sont supprimés à la fin de l'exécution et ne sont pas concernés |
+
+### Journaux du daemon [#daemon-logs]
+
+Quand le daemon tourne en arrière-plan (sans terminal attaché), il écrit ses journaux dans `~/.multica/daemon.log`, ou `~/.multica/profiles/<name>/daemon.log` pour un profil nommé, avec une rotation par taille ; les fichiers issus de la rotation sont compressés en gzip.
+
+| Variable | Valeur par défaut | Description |
+|---|---|---|
+| `MULTICA_DAEMON_LOG_MAX_SIZE_MB` | `20` | Taille en Mo à partir de laquelle `daemon.log` tourne |
+| `MULTICA_DAEMON_LOG_MAX_BACKUPS` | `5` | Nombre maximal de fichiers tournés conservés |
+| `MULTICA_DAEMON_LOG_MAX_AGE_DAYS` | `30` | Nombre de jours de conservation des fichiers tournés |
+
+Les trois attendent un entier positif ; `0`, une valeur négative ou illisible reprend la valeur par défaut au lieu de signifier « illimité ». Un fichier tourné est supprimé dès que la limite de nombre ou d'âge est atteinte. La sortie des plantages va dans `daemon.err.log`, dans le même répertoire, renommé en `daemon.err.log.1` au démarrage s'il dépasse 5 Mo.
+
+### Chemins, modèles et arguments par outil
+
+Chaque outil intégré a une variable de chemin, `MULTICA_<PREFIX>_PATH`. Quand elle est définie, le daemon utilise ce chemin au lieu de chercher la commande dans le `PATH` ; si le chemin n'existe pas, l'outil n'est pas enregistré et le daemon ne se rabat pas sur une commande du même nom dans le `PATH`. La plupart des outils ont aussi une variable de modèle, `MULTICA_<PREFIX>_MODEL`, utilisée comme modèle par défaut de cette machine quand l'agent n'en a pas choisi. Si les deux sont vides, aucun modèle n'est transmis et l'outil décide.
+
+<Accordions>
+<Accordion title="Préfixe des variables pour chaque outil" id="tool-env-prefixes" value="tool-env-prefixes">
+
+| Outil | Préfixe | Variable de modèle |
+|---|---|---|
+| Antigravity | `MULTICA_ANTIGRAVITY` | ✓ (le nom exact affiché par `agy models`) |
+| Claude Code | `MULTICA_CLAUDE` | ✓ |
+| CodeArts | `MULTICA_CODEARTS` | ✓ |
+| CodeBuddy | `MULTICA_CODEBUDDY` | ✓ |
+| Codex | `MULTICA_CODEX` | ✓ |
+| Cursor Agent | `MULTICA_CURSOR` | ✓ |
+| DeepSeek Harness | `MULTICA_DSH` | ✓ (un ID du catalogue dsh, par exemple `deepseek-official/deepseek-chat`) |
+| DevEco Code | `MULTICA_DEVECO` | ✓ |
+| Dim | `MULTICA_DIM` | ✓ (un ID du catalogue dim) |
+| GitHub Copilot CLI | `MULTICA_COPILOT` | ✓ |
+| Grok | `MULTICA_GROK` | ✓ |
+| Hermes | `MULTICA_HERMES` | ✓ |
+| Kimi CLI | `MULTICA_KIMI` | ✓ |
+| Kiro CLI | `MULTICA_KIRO` | ✓ |
+| MiniMax Code | `MULTICA_MCODE` | — |
+| Muse Code | `MULTICA_MUSE` | ✓ (un ID du catalogue de modèles du runtime) |
+| Oh-My-Pi | `MULTICA_OMP` | ✓ |
+| OpenClaw | `MULTICA_OPENCLAW` | ✓ |
+| OpenCode | `MULTICA_OPENCODE` | ✓ |
+| Pi | `MULTICA_PI` | ✓ |
+| Qoder CLI | `MULTICA_QODER` | ✓ |
+| Qoder CN CLI | `MULTICA_QODERCLICN` | ✓ |
+| Qwen Code | `MULTICA_QWEN` | ✓ |
+| QwenPaw | `MULTICA_QWENPAW` | — |
+| Reasonix | `MULTICA_REASONIX` | ✓ |
+| Trae CLI | `MULTICA_TRAECLI` | ✓ |
+| ZeroClaw | `MULTICA_ZEROCLAW` | — (le modèle est géré par le profil d'agent ZeroClaw) |
+
+</Accordion>
+</Accordions>
+
+QwenPaw et MiniMax Code n'ont pas de variable de modèle, car Multica ne leur envoie jamais de modèle ; consultez [Comparaison des outils de codage IA](/providers#sources-des-modèles). DeepSeek Harness a aussi `MULTICA_DSH_PROFILE_BUNDLE` et `MULTICA_DSH_PLUGIN_PATH`, décrits dans la section suivante.
+
+Les arguments par défaut à l'échelle de la machine via `MULTICA_<PREFIX>_ARGS` sont actuellement pris en charge pour cinq outils : Claude Code, Codex, CodeBuddy, Qwen Code et QwenPaw. Les variables sont `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS` et `MULTICA_QWENPAW_ARGS`. Par exemple :
```dotenv
MULTICA_CLAUDE_PATH=/opt/bin/claude
MULTICA_CLAUDE_ARGS=--max-turns 40
```
-Muse Code accepte `MULTICA_MUSE_PATH` et `MULTICA_MUSE_MODEL` ; utilisez un identifiant de modèle du catalogue du runtime.
+### Installation du profil DeepSeek Harness
+
+`MULTICA_DSH_PROFILE_BUNDLE` est une liste de bundles, séparés par des virgules, à installer dans le profil `multica` lorsque ce profil est absent, essayés dans l'ordre, chaque entrée étant une spécification npm, un répertoire ou une archive tarball empaquetée. Elle n'est pas définie par défaut. C'est ce profil qui fournit le protocole `--stdio` que pilote Multica : si la variable n'est pas définie, l'installation DSH reste intacte et le daemon signale le profil manquant au lieu d'enregistrer un runtime inutilisable.
+
+Le bridge de Multica n'est pas encore publié sur un registre npm public ; le choix d'une valeur est traité dans [Installer un runtime d'agent](/install-agent-runtime). Ce que vous définissez est installé dans le répertoire DSH de chaque hôte de daemon sans autre confirmation : considérez ce choix comme une décision relative à la chaîne d'approvisionnement.
+
+Cette installation est volontairement limitée : elle s'exécute au plus une fois par durée de vie du daemon, uniquement lorsque la sonde signale que le profil est réellement absent, et un échec est journalisé avec la sortie du gestionnaire de paquets lui-même et n'est retenté qu'après un redémarrage du daemon. Une sonde qui expire, ou qui répond avec une version de protocole que ce daemon ne pilote pas, est signalée et ne donne jamais lieu à une installation par-dessus : le daemon n'écrase pas un profil présent à dessein. Pour diagnostiquer, recherchez `DSH runtime profile` dans le journal du daemon ; pour annuler une installation, supprimez `$DSH_HOME/profiles/multica` (par défaut `~/.dsh/profiles/multica`).
+
+`MULTICA_DSH_PLUGIN_PATH` remplace le répertoire à partir duquel l'installation résout pnpm. DSH Desktop conserve le pnpm vers lequel `dsh plugin` redirige dans son propre répertoire de commandes du runtime, sous macOS comme sous Windows, et le daemon le trouve et l'ajoute automatiquement en tête du `PATH`, y compris dans l'arborescence versionnée qu'utilise une version plus récente de Desktop. Cette variable n'est donc nécessaire que pour une installation que le daemon ne parvient pas à trouver, ou pour que l'installation utilise votre propre pnpm. La définir remplace entièrement la recherche : si le répertoire n'existe pas, l'installation se rabat sur le pnpm présent dans le `PATH` du daemon, et non sur celui fourni. Linux n'a pas de DSH Desktop ; l'installation y utilise donc toujours le `PATH`.
+
+### Nettoyage des processus d'arrière-plan de Cursor
Le nettoyage vérifié des processus d'arrière-plan de Cursor nécessite Linux 6.9 ou une version ultérieure (pidfd de groupe de processus), la prise en charge par le noyau macOS des requêtes d'identité de processus et de l'envoi de signaux par audit token, ou un Job Object imbriqué correctement attribué sous Windows. Sous macOS, chaque processus reçoit ses signaux au moyen d'une version de PID vérifiée par le noyau ; aucune adhésion à un groupe de la même session n'est nécessaire. Ces API macOS sont privées et vérifiées au moment de la capture. Un lancement qui ne peut pas être revendiqué renvoie son résultat d'outil d'origine et utilise le watchdog d'inactivité ordinaire, y compris lorsque le watchdog d'outil vaut `0`. Le travail déjà revendiqué reste en cours si le nettoyage ne peut pas être confirmé. Avec un watchdog d'outil à `0`, cette limite n'existe pas du tout : le travail d'arrière-plan revendiqué maintient l'exécution en cours aussi longtemps qu'il vit, si bien que l'exécution n'est bornée que par `MULTICA_AGENT_TIMEOUT`, qui vaut `0` par défaut.
Les processus d'arrière-plan de Cursor qui appartiennent à l'exécution sont aussi arrêtés lorsque celle-ci se termine normalement : un serveur d'arrière-plan lancé par cette exécution ne survit donc pas intentionnellement à la finalisation. macOS peut reconnaître des enfants tardifs grâce aux identités de parent d'origine conservées, mais ne peut pas prouver une chaîne dont les processus intermédiaires ont disparu avant d'être observés. De tels processus, le travail qui quitte le groupe suivi, ou des erreurs persistantes d'appartenance ou d'envoi de signaux peuvent laisser du travail d'arrière-plan derrière eux. Un nettoyage non confirmé est journalisé et n'ouvre jamais la fenêtre de récupération réservée aux nettoyages réussis ; les processus inconnus ne sont pas tués sur la seule base de leur PID numérique ou de leur groupe de processus.
-L'ordre de priorité est : option de ligne de commande → variable d'environnement → `~/.multica/config.json` → valeur par défaut intégrée. Pour le comportement du watchdog, consultez [Daemon et runtimes](/daemon-runtimes).
-
### Rendre persistante la configuration du daemon
Les paramètres courants côté daemon peuvent aussi être écrits dans `~/.multica/config.json` au lieu de dépendre des variables d'environnement du shell ; les profils nommés conservent les leurs dans `~/.multica/profiles/<name>/config.json` :
diff --git a/apps/docs/content/docs/environment-variables.ja.mdx b/apps/docs/content/docs/environment-variables.ja.mdx
index e991579dc0..6d8cb367bf 100644
--- a/apps/docs/content/docs/environment-variables.ja.mdx
+++ b/apps/docs/content/docs/environment-variables.ja.mdx
@@ -3,11 +3,12 @@ title: 環境変数
description: セルフホスト Multica でよく使うサーバー、ストレージ、連携、ランタイムの設定。
---
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Callout } from "fumadocs-ui/components/callout";
Multica はプロセス起動時に環境変数を読み込みます。変更後は、該当する API・Web・デーモンのプロセスを再起動してください。Docker Compose の `docker compose restart` は `.env` を再読み込みしません。`up -d` でコンテナを再作成して初めて反映されます。
-このページにはデプロイ運用者向けの設定のみを載せています。テスト用変数や内部実行用の変数は扱いません。グループ別のリファレンスとして使い、完全なデプロイ手順は[セルフホストクイックスタート](/self-host-quickstart)を参照してください。
+このページでは、デプロイ運用者向けの設定をグループ別にまとめています。テスト用変数や内部実行用の変数は扱いません。完全なデプロイ手順は[セルフホストクイックスタート](/self-host-quickstart)を参照してください。
## プロダクションの最小構成
@@ -67,7 +68,7 @@ primary とレプリカの接続上限は独立しています。全 API プロ
`MULTICA_DAEMON_SERVER_URL` は認証なしの `/api/config` エンドポイントから返され、クライアントが読み取れます。公開設定として扱い、認証情報・トークンなどのシークレットを含めないでください。
</Callout>
-フロントエンドと API が異なる host を使い、ブラウザが API ドメインへ直接アクセスする構成では、`COOKIE_DOMAIN` の設定が必須です。設定しないとブラウザが CSRF cookie を読めず、すべての書き込みリクエストが `403 CSRF validation failed` を返す一方、読み取りは正常に動きます。値には、両方の host を同時にカバーできる最も狭い親ドメインを使ってください(`.example.com` より `.agent.example.com`)。この設定はログインセッション cookie をそのドメイン配下のすべての host に広げるため、それらの host がすべて同一の信頼できる運用主体のものである場合にのみ使えます。変更後は両方の host で古い cookie を削除し、再ログインしてください。[セルフホストクイックスタート](/self-host-quickstart#3-アクセス方法を選ぶ)の同一オリジン構成(ブラウザは app ドメインのみアクセス)に従う場合は、空のままで構いません。IP アドレスは指定しないでください。ブラウザは Domain が IP の cookie を無視します。
+フロントエンドと API が異なる host を使い、ブラウザが API ドメインへ直接アクセスする構成では、`COOKIE_DOMAIN` の設定が必須です。設定しないとブラウザが CSRF cookie を読めず、すべての書き込みリクエストが `403 CSRF validation failed` を返す一方、読み取りは正常に動きます。値には、両方の host を同時にカバーできる最も狭い親ドメインを使ってください(`.example.com` より `.agent.example.com`)。この設定はログインセッション cookie をそのドメイン配下のすべての host に広げるため、それらの host がすべて同一の信頼できる運用主体のものである場合にのみ使えます。変更後は両方の host で古い cookie を削除し、再ログインしてください。[セルフホストクイックスタート](/self-host-quickstart#remote-access)の同一オリジン構成(ブラウザは app ドメインのみアクセス)に従う場合は、空のままで構いません。IP アドレスは指定しないでください。ブラウザは Domain が IP の cookie を無視します。
<Callout type="warning">
セルフホストのデプロイでは `FRONTEND_ORIGIN` の設定が必須です。設定しないと、招待リンク、cookie のセキュリティ属性、WebSocket の origin 検証が実際のドメインと食い違うおそれがあります。
@@ -244,31 +245,116 @@ API key と base URL の両方が空の場合、このレイヤーは無効に
| `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | `MULTICA_AGENT_IDLE_WATCHDOG` と同じ | Codex のセマンティック静穏しきい値。Codex 自身のタイマーはツール実行中かどうかを判別できないため、独自の短い上限を持たず idle / tool 予算の大きい方に追従します |
| `MULTICA_CODEX_FIRST_TURN_TIMEOUT` | `0` | Codex 初回ターンの無進捗上限を明示的に上書き;`0` はデフォルトを維持。実効の初回ターン待機は依然として `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` と全体の実行タイムアウトに制限される——`MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` をこの値より厳密に大きく(余裕を持たせて)設定すること。さもないと待機はその値で打ち切られ、モデルカタログの起動リトライがスキップされる。同値では不十分:セマンティックタイマーが先に起動するため、同値の場合でもリトライが失われることがある |
| `MULTICA_CODEX_HANDSHAKE_TIMEOUT` | `30s`、`thread/start`・`thread/resume`:`60s` | Codex app-server 起動ハンドシェイクの上限。明示的な値は両方の予算を一括で上書きします |
+| `MULTICA_CODEX_MEMORY` | オフ | `1`、`true`、`yes`、`on` のいずれかにすると、デーモンが管理する Codex の実行で Codex ネイティブのメモリを残します。既定では実行ごとにオフになります。[Codex のネイティブメモリとサブエージェント](/daemon-runtimes#codex-memory)を参照 |
+| `MULTICA_CODEX_MULTI_AGENT` | オフ | 値は同上。Codex ネイティブのサブエージェントを残します。親スレッドが終わった時点で実行は終了扱いになり、サブエージェントがまだ返していない結果は失われます |
| `MULTICA_CODEX_TURN_INTERRUPT_TIMEOUT` | `2s` | キャンセル後に Codex app-server が `turn/interrupt` を確認し `turn/completed` を送信するまでの猶予時間。プロセスを強制終了する前に最終トークン使用量を保持します。特に遅いホストでは daemon ログに記録された割り込み遅延を基に調整できます |
| `MULTICA_DAEMON_AUTO_UPDATE` | Cloud は `true`、セルフホストは `false` | CLI の更新を自動でチェックして適用するか |
| `MULTICA_DAEMON_AUTO_UPDATE_INTERVAL` | `6h` | 更新チェックの間隔 |
| `MULTICA_DAEMON_AUTO_RELOAD` | `true` | 帯域外で置き換えられた `multica` バイナリ(`brew upgrade`、再ダウンロード、ローカルビルド)へ再起動して追従するかどうか。`MULTICA_DAEMON_AUTO_UPDATE` とは独立 |
| `MULTICA_WORKSPACES_ROOT` | `~/multica_workspaces` | 実行用作業ディレクトリのルート |
| `MULTICA_AGENT_TEMP_BASE` | `/tmp`(Linux/macOS) | Linux/macOS 専用。作業ごとのプライベート一時ディレクトリの親ディレクトリ。既存かつ書き込み可能な絶対パスである必要があり、無効な値の場合は `/tmp` にフォールバックせず作業の開始に失敗します。短いパスを選んでください。子ツールがその配下に AF_UNIX ソケットを作成する場合があり、`sun_path` の上限は Linux で 108 バイト、macOS で 104 バイトです |
-| `MULTICA_KEEP_ENV_AFTER_TASK` | `false` | デバッグ用に実行ディレクトリを保持 |
-デーモンがエージェント作業に注入する内部コンテキストについては、[作業ランタイム環境](/daemon-runtimes#作業ランタイム環境)を参照してください。
+デーモンがエージェント作業に注入する内部コンテキストについては、[作業ランタイム環境](/daemon-runtimes#作業ランタイム環境)を参照してください。`MULTICA_REPO_CHECKOUT_MODE` もその一つです。デーモンは Linux と Windows の Codex 実行でだけ `isolated` を設定し、手動では設定できません。デーモン自身の環境にある `MULTICA_*` 変数は実行に引き継がれません。
-各 AI コーディングツールは `MULTICA_<PROVIDER>_PATH` でコマンドパスを上書きでき、モデル上書き対応ツールでは `MULTICA_<PROVIDER>_MODEL` も利用できます。QwenPaw と MiniMax Code にはモデル変数がなく、MiniMax Code のパス変数は `MULTICA_MCODE_PATH` です。詳しくは [AI コーディングツール比較](/providers#モデルの取得元) を参照してください。DeepSeek Harness は `MULTICA_DSH_PATH` と `MULTICA_DSH_MODEL` に対応しています(値は dsh のモデルカタログにあるモデル ID、例: `deepseek-official/deepseek-chat`)。 DeepSeek Harness はさらに `MULTICA_DSH_PROFILE_BUNDLE` に対応しています。`multica` プロファイルが存在しない場合にインストールするバンドルを指定するもので、カンマ区切りで複数の候補を順に試します。各項目は npm のパッケージ名、ディレクトリ、またはパック済み tarball です。既定では未設定です。Multica が利用する `--stdio` プロトコルはこのプロファイルが提供するため、未設定の場合は DSH のインストールには手を加えず、デーモンは使用できないランタイムを登録する代わりにプロファイルの欠落を報告します。Multica 自身のブリッジはまだ公開 npm レジストリにないため、値の選び方は[エージェントランタイムのインストール](/install-agent-runtime)を参照してください。ここに設定した値は追加の確認なしに各デーモンホストの DSH ホームへインストールされるので、サプライチェーンの判断として扱ってください。`MULTICA_DSH_PROFILE_BUNDLE` が有効にするインストールは範囲を意図的に限定しています。実行はデーモンのライフタイムにつき最大 1 回、プローブがプロファイルの不在を確認できた場合のみです。失敗時はパッケージマネージャー自身の出力をログに記録し、再試行はデーモンの再起動後のみ行います。プローブがタイムアウトした場合や、このデーモンが扱わないプロトコルバージョンを返した場合は報告のみで、上書きインストールは行いません。意図して用意されたプロファイルをデーモンが上書きすることはありません。調査はデーモンログで `DSH runtime profile` を検索してください。取り消す場合は `$DSH_HOME/profiles/multica`(既定は `~/.dsh/profiles/multica`)を削除します。`MULTICA_DSH_PLUGIN_PATH` はインストール時に pnpm を解決するディレクトリを上書きします。`dsh plugin` が転送する pnpm は macOS でも Windows でも DSH Desktop 独自の runtime-commands ディレクトリに置かれており、デーモンはそれを自動で見つけて PATH の先頭に追加します(新しい Desktop が使うバージョン付きの構成も含みます)。したがってこの変数が必要なのは、デーモンが見つけられない場所にインストールされている場合か、独自の pnpm を使わせたい場合だけです。設定すると自動探索は完全に置き換わり、指定したディレクトリが存在しなければ、インストールは同梱の pnpm ではなくデーモンの `PATH` 上の pnpm にフォールバックします。Linux には DSH Desktop がないため、常に `PATH` が使われます。ZeroClaw は `MULTICA_ZEROCLAW_PATH` に対応しますが、モデル変数はありません。モデルは ZeroClaw のエージェント設定で管理します。マシン全体のデフォルト引数 `MULTICA_<PROVIDER>_ARGS` は、現在 Claude Code、Codex、CodeBuddy、Qwen Code、QwenPaw の 5 ツールに対応しています。対応する変数は `MULTICA_CLAUDE_ARGS`、`MULTICA_CODEX_ARGS`、`MULTICA_CODEBUDDY_ARGS`、`MULTICA_QWEN_ARGS`、`MULTICA_QWENPAW_ARGS` です。例:
+優先順位はコマンドラインフラグ → 環境変数 → `~/.multica/config.json` → 組み込みデフォルトです。watchdog の動作は[デーモンとランタイム](/daemon-runtimes)を参照してください。
+
+### クリーンアップと保持 [#gc]
+
+デーモンは実行ディレクトリ、リポジトリキャッシュ、セッション記録、一時ディレクトリを定期的に片付けます。何がいつ削除されるかは[クリーンアップと保持](/daemon-runtimes#cleanup)を参照してください。期間は Go の duration 形式に加えて、日数の `d`(`14d`、`1d12h` など)も使えます。
+
+| 変数 | デフォルト | 説明 |
+|---|---|---|
+| `MULTICA_GC_ENABLED` | `true` | `false` または `0` でクリーンアップ全体を止める |
+| `MULTICA_GC_INTERVAL` | `2h` | クリーンアップの間隔。デーモン起動の約 30 秒後に最初の 1 回を実行 |
+| `MULTICA_GC_TTL` | `24h` | タスクが `done` または `closed` カテゴリに入ってから、またはチャットセッションがアーカイブされてから、実行ディレクトリを削除するまでの時間 |
+| `MULTICA_GC_COMPLETED_TASK_TTL` | Multica Cloud は `14d`、セルフホストは `0` | タスクの実行が完了してからディレクトリ全体を削除するまでの時間。タスクが閉じているかどうかは問わない。`0` で無効。プロジェクトのローカルディレクトリでの実行には適用されない |
+| `MULTICA_GC_ORPHAN_TTL` | `72h` | 持ち主が見つからないディレクトリを、変更がないまま何時間経ったら削除するか |
+| `MULTICA_GC_ARTIFACT_TTL` | `12h` | 実行完了後、再生成できる内容(次の行のディレクトリと、デーモンが Codex 用に用意するキャッシュ)を削除するまでの時間。`0` で削除しない |
+| `MULTICA_GC_ARTIFACT_PATTERNS` | `node_modules,.next,.turbo` | 再生成できるとみなすディレクトリ名(カンマ区切り)。設定するとデフォルトの一覧を**置き換える**ため、デフォルトも残したいなら一緒に書く。`/` や `\` を含む項目は無視される |
+| `MULTICA_GC_REPO_TTL` | `30d` | どこからも参照されず worktree も残っていないベアリポジトリキャッシュを、チェックアウトがないまま何日経ったら削除するか。`0` で削除しない |
+| `MULTICA_GC_REPO_MAINTENANCE_ENABLED` | `true` | 古いエージェントブランチを消したあと、リポジトリキャッシュに `git reflog expire` と `git gc` を実行するか。`false` でこの手順だけを止める |
+| `MULTICA_GC_CODEX_SESSION_TTL` | `14d` | 使われていない Codex セッション記録を削除するまでの時間。`0` で削除しない |
+| `MULTICA_GC_HERMES_SESSION_TTL` | `14d` | 使われていない Hermes セッション記録を削除するまでの時間。`0` で削除しない |
+| `MULTICA_GC_HERMES_MEMORY_TTL` | `90d` | 使われていない Hermes メモリを削除するまでの時間。`0` で削除しない |
+| `MULTICA_GC_TASK_TEMP_LEGACY_TTL` | `0` | 古いデーモンが残した、実行ロックのない一時ディレクトリだけが対象。変更がないまま何時間経ったら削除するか。`0` で削除しない。実行ロックのある一時ディレクトリは実行終了時に削除され、この設定の影響を受けない |
+
+### デーモンのログ [#daemon-logs]
+
+デーモンがバックグラウンドで(ターミナルにつながずに)動いているとき、ログは `~/.multica/daemon.log`(名前付きプロファイルでは `~/.multica/profiles/<name>/daemon.log`)に書かれ、サイズでローテーションされます。ローテーション後のファイルは gzip で圧縮されます。
+
+| 変数 | デフォルト | 説明 |
+|---|---|---|
+| `MULTICA_DAEMON_LOG_MAX_SIZE_MB` | `20` | `daemon.log` をローテーションするサイズ(MB) |
+| `MULTICA_DAEMON_LOG_MAX_BACKUPS` | `5` | 残すローテーション済みファイルの最大数 |
+| `MULTICA_DAEMON_LOG_MAX_AGE_DAYS` | `30` | ローテーション済みファイルを残す日数 |
+
+3 つとも正の整数を取ります。`0`、負の数、解釈できない値はデフォルトとして扱われ、「無制限」にはなりません。ローテーション済みファイルは、個数と日数のどちらかの上限に先に達した時点で削除されます。クラッシュ時の出力は同じディレクトリの `daemon.err.log` に書かれ、起動時に 5 MB を超えていれば `daemon.err.log.1` に名前が変わります。
+
+### ツールごとのパス、モデル、引数
+
+組み込みの各ツールにはパス変数 `MULTICA_<PREFIX>_PATH` があります。設定すると、デーモンは `PATH` からコマンドを探す代わりにそのパスを使います。パスが存在しない場合、そのツールは登録されず、`PATH` 上の同名コマンドに切り替わることもありません。多くのツールにはモデル変数 `MULTICA_<PREFIX>_MODEL` もあり、エージェントでモデルが選ばれていないときにこのコンピューターの既定モデルとして使われます。どちらも空ならモデルは渡されず、ツール自身が決めます。
+
+<Accordions>
+<Accordion title="ツールごとの変数プレフィックス" id="tool-env-prefixes" value="tool-env-prefixes">
+
+| ツール | プレフィックス | モデル変数 |
+|---|---|---|
+| Antigravity | `MULTICA_ANTIGRAVITY` | ✓(値は `agy models` が表示する名前そのもの) |
+| Claude Code | `MULTICA_CLAUDE` | ✓ |
+| CodeArts | `MULTICA_CODEARTS` | ✓ |
+| CodeBuddy | `MULTICA_CODEBUDDY` | ✓ |
+| Codex | `MULTICA_CODEX` | ✓ |
+| Cursor Agent | `MULTICA_CURSOR` | ✓ |
+| DeepSeek Harness | `MULTICA_DSH` | ✓(値は dsh のモデルカタログにある ID。例: `deepseek-official/deepseek-chat`) |
+| DevEco Code | `MULTICA_DEVECO` | ✓ |
+| Dim | `MULTICA_DIM` | ✓(値は dim のモデルカタログにある ID) |
+| GitHub Copilot CLI | `MULTICA_COPILOT` | ✓ |
+| Grok | `MULTICA_GROK` | ✓ |
+| Hermes | `MULTICA_HERMES` | ✓ |
+| Kimi CLI | `MULTICA_KIMI` | ✓ |
+| Kiro CLI | `MULTICA_KIRO` | ✓ |
+| MiniMax Code | `MULTICA_MCODE` | — |
+| Muse Code | `MULTICA_MUSE` | ✓(値はランタイムのモデル一覧にある ID) |
+| Oh-My-Pi | `MULTICA_OMP` | ✓ |
+| OpenClaw | `MULTICA_OPENCLAW` | ✓ |
+| OpenCode | `MULTICA_OPENCODE` | ✓ |
+| Pi | `MULTICA_PI` | ✓ |
+| Qoder CLI | `MULTICA_QODER` | ✓ |
+| Qoder CN CLI | `MULTICA_QODERCLICN` | ✓ |
+| Qwen Code | `MULTICA_QWEN` | ✓ |
+| QwenPaw | `MULTICA_QWENPAW` | — |
+| Reasonix | `MULTICA_REASONIX` | ✓ |
+| Trae CLI | `MULTICA_TRAECLI` | ✓ |
+| ZeroClaw | `MULTICA_ZEROCLAW` | —(モデルは ZeroClaw のエージェント設定で管理) |
+
+</Accordion>
+</Accordions>
+
+QwenPaw と MiniMax Code には、Multica がモデルを渡さないためモデル変数がありません。詳しくは [AI コーディングツール比較](/providers#モデルの取得元)を参照してください。DeepSeek Harness には `MULTICA_DSH_PROFILE_BUNDLE` と `MULTICA_DSH_PLUGIN_PATH` もあり、次のセクションで説明します。
+
+マシン全体のデフォルト引数 `MULTICA_<PREFIX>_ARGS` は、現在 Claude Code、Codex、CodeBuddy、Qwen Code、QwenPaw の 5 ツールに対応しています。対応する変数は `MULTICA_CLAUDE_ARGS`、`MULTICA_CODEX_ARGS`、`MULTICA_CODEBUDDY_ARGS`、`MULTICA_QWEN_ARGS`、`MULTICA_QWENPAW_ARGS` です。例:
```dotenv
MULTICA_CLAUDE_PATH=/opt/bin/claude
MULTICA_CLAUDE_ARGS=--max-turns 40
```
-Muse Code は `MULTICA_MUSE_PATH` と `MULTICA_MUSE_MODEL` に対応しています。モデルにはランタイムの一覧にある ID を指定してください。
+### DeepSeek Harness のプロファイルのインストール
+
+`MULTICA_DSH_PROFILE_BUNDLE` は、`multica` プロファイルが存在しない場合にインストールするバンドルを指定します。カンマ区切りで複数の候補を順に試し、各項目は npm のパッケージ名、ディレクトリ、またはパック済み tarball です。既定では未設定です。Multica が利用する `--stdio` プロトコルはこのプロファイルが提供するため、未設定の場合は DSH のインストールには手を加えず、デーモンは使用できないランタイムを登録せずにプロファイルの欠落を報告します。
+
+Multica 自身のブリッジはまだ公開 npm レジストリにないため、値の選び方は[エージェントランタイムのインストール](/install-agent-runtime)を参照してください。ここに設定した値は追加の確認なしに各デーモンホストの DSH ホームへインストールされるので、サプライチェーンの判断として扱ってください。
+
+このインストールは範囲を意図的に限定しています。実行はデーモンのライフタイムにつき最大 1 回、プローブがプロファイルの不在を確認できた場合のみです。失敗時はパッケージマネージャー自身の出力をログに記録し、再試行はデーモンの再起動後のみ行います。プローブがタイムアウトした場合や、このデーモンが扱わないプロトコルバージョンを返した場合は報告のみで、上書きインストールは行いません。意図して用意されたプロファイルをデーモンが上書きすることはありません。調査はデーモンログで `DSH runtime profile` を検索してください。取り消す場合は `$DSH_HOME/profiles/multica`(既定は `~/.dsh/profiles/multica`)を削除します。
+
+`MULTICA_DSH_PLUGIN_PATH` はインストール時に pnpm を解決するディレクトリを上書きします。`dsh plugin` が転送する pnpm は macOS でも Windows でも DSH Desktop 独自の runtime-commands ディレクトリに置かれており、デーモンはそれを自動で見つけて PATH の先頭に追加します(新しい Desktop が使うバージョン付きの構成も含みます)。したがってこの変数が必要なのは、デーモンが見つけられない場所にインストールされている場合か、独自の pnpm を使わせたい場合だけです。設定すると自動探索は完全に置き換わり、指定したディレクトリが存在しなければ、インストールは同梱の pnpm ではなくデーモンの `PATH` 上の pnpm にフォールバックします。Linux には DSH Desktop がないため、常に `PATH` が使われます。
+
+### Cursor のバックグラウンドプロセスのクリーンアップ
Cursor の検証済みバックグラウンドクリーンアップには、Linux 6.9 以降(プロセスグループ pidfd)、macOS カーネルによるプロセス識別子の照会と audit token を用いたシグナル送信のサポート、または Windows で正常に割り当てられた入れ子の Job Object が必要です。macOS では各プロセスへのシグナル送信にカーネルが検証する PID version を用いるため、同一セッションのグループに参加する必要はありません。これらの macOS API は非公開であり、プロセス捕捉時に確認されます。所有権を確保できなかったバックグラウンドプロセスは元のツール結果を返し、ツール watchdog が `0` の場合も含めて通常の idle watchdog に従います。すでに所有している作業は、クリーンアップを確認できない場合も実行中のままです。ツール watchdog を `0` にした場合はこの境界自体が存在せず、所有済みのバックグラウンド作業が生きている限り実行は継続します。その場合の実行は `MULTICA_AGENT_TIMEOUT` だけに制限され、これも既定値は `0` です。
所有している Cursor のバックグラウンドプロセスは、実行が正常に完了したときにも停止されます。したがって、その実行が起動したバックグラウンドサーバーが意図的に終了処理後まで生き残ることはありません。macOS は保持された元の親プロセスの識別子によって後から生まれた子プロセスを認識できますが、観測前に中間プロセスが消えた連鎖は証明できません。そのようなプロセス、追跡対象のグループから外れた作業、および継続的な所有権や送信のエラーは、バックグラウンド作業を残す可能性があります。確認できなかったクリーンアップはログに記録され、「クリーンアップ成功」による回復ウィンドウを与えることはありません。数値の PID やプロセスグループだけを根拠に未知のプロセスを終了させることはありません。
-優先順位はコマンドラインフラグ → 環境変数 → `~/.multica/config.json` → 組み込みデフォルトです。watchdog の動作は[デーモンとランタイム](/daemon-runtimes)を参照してください。
-
### デーモン設定の永続化
デーモン側のよく使う設定は、シェルの環境変数に頼らず `~/.multica/config.json` に書き込むこともできます。名前付きプロファイルの設定ファイルは `~/.multica/profiles/<name>/config.json` にあります:
diff --git a/apps/docs/content/docs/environment-variables.ko.mdx b/apps/docs/content/docs/environment-variables.ko.mdx
index 17384d0297..b8b41e27ee 100644
--- a/apps/docs/content/docs/environment-variables.ko.mdx
+++ b/apps/docs/content/docs/environment-variables.ko.mdx
@@ -3,11 +3,12 @@ title: 환경 변수
description: 자체 호스팅 Multica에서 자주 사용하는 서버, 저장소, 연동, 런타임 설정입니다.
---
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Callout } from "fumadocs-ui/components/callout";
Multica는 프로세스를 시작할 때 환경 변수를 읽습니다. 수정 후에는 보통 해당 API, Web 또는 데몬을 다시 시작해야 합니다. Docker Compose의 `docker compose restart`는 `.env`를 다시 읽지 않으므로 `up -d`로 컨테이너를 다시 만들어야 적용됩니다.
-이 페이지에는 배포자를 위한 설정만 나열하며 테스트 변수와 내부 실행 변수는 다루지 않습니다. 여기서는 그룹별 참조를 제공하고 전체 배포 단계는 [자체 호스팅 빠른 시작](/self-host-quickstart)을 참고하세요.
+이 페이지는 배포자를 위한 설정을 그룹별로 정리하며 테스트 변수와 내부 실행 변수는 다루지 않습니다. 전체 배포 단계는 [자체 호스팅 빠른 시작](/self-host-quickstart)을 참고하세요.
## 프로덕션 최소 설정
@@ -67,7 +68,7 @@ primary와 복제본의 연결 한도는 서로 독립적입니다. 모든 API
`MULTICA_DAEMON_SERVER_URL`은 인증이 필요 없는 `/api/config` 엔드포인트에서 반환되며 클라이언트가 읽을 수 있습니다. 공개 설정으로 취급하고 자격 증명, 토큰 또는 기타 비밀을 절대 포함하지 마세요.
</Callout>
-프런트엔드와 API가 서로 다른 host를 사용하고 브라우저가 API 도메인에 직접 접근한다면 `COOKIE_DOMAIN`을 설정해야 합니다. 설정하지 않으면 브라우저가 CSRF cookie를 읽지 못해 모든 쓰기 요청이 `403 CSRF validation failed`를 반환하고 읽기 요청만 정상 작동합니다. 두 host를 모두 포함하는 가장 좁은 상위 도메인을 사용하세요(`.example.com`보다 `.agent.example.com`이 더 적합). 이 설정은 로그인 세션 cookie를 해당 도메인의 모든 host로 확장하므로 모든 host를 같은 신뢰 주체가 운영할 때만 사용할 수 있습니다. 수정 후 두 host에서 이전 cookie를 삭제하고 다시 로그인해야 합니다. [자체 호스팅 빠른 시작](/self-host-quickstart#3-접근-방식-선택)의 same-origin 구성을 사용해 브라우저가 app 도메인에만 접근한다면 비워 두세요. IP 주소는 입력하지 마세요. 브라우저가 IP Domain이 포함된 cookie를 무시합니다.
+프런트엔드와 API가 서로 다른 host를 사용하고 브라우저가 API 도메인에 직접 접근한다면 `COOKIE_DOMAIN`을 설정해야 합니다. 설정하지 않으면 브라우저가 CSRF cookie를 읽지 못해 모든 쓰기 요청이 `403 CSRF validation failed`를 반환하고 읽기 요청만 정상 작동합니다. 두 host를 모두 포함하는 가장 좁은 상위 도메인을 사용하세요(`.example.com`보다 `.agent.example.com`이 더 적합). 이 설정은 로그인 세션 cookie를 해당 도메인의 모든 host로 확장하므로 모든 host를 같은 신뢰 주체가 운영할 때만 사용할 수 있습니다. 수정 후 두 host에서 이전 cookie를 삭제하고 다시 로그인해야 합니다. [자체 호스팅 빠른 시작](/self-host-quickstart#remote-access)의 same-origin 구성을 사용해 브라우저가 app 도메인에만 접근한다면 비워 두세요. IP 주소는 입력하지 마세요. 브라우저가 IP Domain이 포함된 cookie를 무시합니다.
<Callout type="warning">
자체 호스팅 배포에서는 `FRONTEND_ORIGIN`을 설정해야 합니다. 없으면 초대 링크, cookie 보안 속성, WebSocket origin 검증이 실제 도메인과 맞지 않을 수 있습니다.
@@ -244,31 +245,116 @@ API key와 base URL이 모두 비어 있으면 이 레이어가 꺼지고 업스
| `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | `MULTICA_AGENT_IDLE_WATCHDOG`와 동일 | Codex 의미 활동 없음 기준값. Codex 자체 타이머는 도구 실행 중인지 알 수 없으므로 별도의 짧은 상한 대신 idle / tool 예산 중 큰 값을 따릅니다 |
| `MULTICA_CODEX_FIRST_TURN_TIMEOUT` | `0` | Codex 첫 턴 무진행 상한의 명시적 재정의; `0` 은 기본값 유지. 실제 첫 턴 대기는 여전히 `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` 및 전체 실행 타임아웃으로 제한됨 — `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` 을 이 값보다 엄격히 크게(여유를 두고) 설정해야 하며, 그렇지 않으면 대기가 그 값으로 잘리고 모델 카탈로그 시작 재시도가 건너뛰어짐. 값이 같으면 충분하지 않음: 의미 타이머가 먼저 시작되므로 값이 같을 때도 재시도가 손실될 수 있음 |
| `MULTICA_CODEX_HANDSHAKE_TIMEOUT` | `30s`, `thread/start`·`thread/resume`: `60s` | Codex app-server 시작 handshake 상한. 명시적으로 설정한 값은 두 예산을 모두 일괄 재정의합니다 |
+| `MULTICA_CODEX_MEMORY` | 끔 | `1`, `true`, `yes`, `on` 중 하나로 설정하면 데몬이 관리하는 Codex 실행에서 Codex 기본 메모리를 유지합니다. 기본값은 실행마다 끄는 것입니다. [Codex 기본 메모리와 하위 에이전트](/daemon-runtimes#codex-memory) 참고 |
+| `MULTICA_CODEX_MULTI_AGENT` | 끔 | 값은 위와 같으며 Codex 기본 하위 에이전트를 유지합니다. 상위 스레드가 끝나면 실행이 끝난 것으로 처리되므로 하위 에이전트가 아직 돌려주지 않은 결과는 사라집니다 |
| `MULTICA_CODEX_TURN_INTERRUPT_TIMEOUT` | `2s` | 취소 후 Codex app-server가 `turn/interrupt`를 확인하고 `turn/completed`를 보낼 때까지의 유예 시간입니다. 프로세스를 강제 정리하기 전에 최종 토큰 사용량을 보존합니다. 특히 느린 호스트에서는 daemon 로그에 기록된 인터럽트 지연을 기준으로 조정할 수 있습니다 |
| `MULTICA_DAEMON_AUTO_UPDATE` | Cloud `true`, 자체 호스팅 `false` | CLI 자동 확인 및 업데이트 여부 |
| `MULTICA_DAEMON_AUTO_UPDATE_INTERVAL` | `6h` | 업데이트 확인 간격 |
| `MULTICA_DAEMON_AUTO_RELOAD` | `true` | 외부에서 교체된 `multica` 바이너리(`brew upgrade`, 재다운로드, 로컬 빌드)로 재시작할지 여부. `MULTICA_DAEMON_AUTO_UPDATE`와 독립적 |
| `MULTICA_WORKSPACES_ROOT` | `~/multica_workspaces` | 실행용 작업 디렉터리의 루트 |
| `MULTICA_AGENT_TEMP_BASE` | `/tmp`(Linux/macOS) | Linux/macOS 전용. 실행별 비공개 임시 디렉터리의 상위 디렉터리입니다. 기존의 쓰기 가능한 절대 경로여야 하며, 값이 잘못되면 `/tmp`로 대체하지 않고 실행 시작에 실패합니다. 짧은 경로를 선택하세요. 하위 도구가 그 아래에 AF_UNIX 소켓을 만들 수 있으며 `sun_path` 제한은 Linux에서 108바이트, macOS에서 104바이트입니다 |
-| `MULTICA_KEEP_ENV_AFTER_TASK` | `false` | 디버깅을 위해 작업 디렉터리 유지 |
-데몬이 에이전트 작업에 주입하는 내부 컨텍스트는 [작업 런타임 환경](/daemon-runtimes#작업-런타임-환경)을 참고하세요.
+데몬이 에이전트 작업에 주입하는 내부 컨텍스트는 [작업 런타임 환경](/daemon-runtimes#작업-런타임-환경)을 참고하세요. `MULTICA_REPO_CHECKOUT_MODE`도 여기에 속합니다. 데몬은 Linux와 Windows의 Codex 실행에서만 이 값을 `isolated`로 설정하며, 직접 설정할 수는 없습니다. 데몬 자체 환경의 `MULTICA_*` 변수는 실행으로 전달되지 않습니다.
-각 AI 코딩 도구는 `MULTICA_<PROVIDER>_PATH`로 명령 경로를 덮어쓸 수 있으며 모델 재정의를 지원하는 도구는 `MULTICA_<PROVIDER>_MODEL`도 사용할 수 있습니다. QwenPaw와 MiniMax Code에는 모델 변수가 없고 MiniMax Code의 경로 변수는 `MULTICA_MCODE_PATH`입니다. 자세한 내용은 [AI 코딩 도구 비교](/providers#모델-출처)를 참고하세요. DeepSeek Harness는 `MULTICA_DSH_PATH`와 `MULTICA_DSH_MODEL`을 지원합니다(값은 dsh 모델 카탈로그의 모델 ID, 예: `deepseek-official/deepseek-chat`). DeepSeek Harness는 `MULTICA_DSH_PROFILE_BUNDLE`도 지원합니다. `multica` 프로필이 없을 때 설치할 번들을 지정하며, 쉼표로 구분한 여러 후보를 순서대로 시도합니다. 각 항목은 npm 패키지 이름, 디렉터리 또는 패키징된 tarball입니다. 기본값은 설정하지 않는 것입니다. Multica가 사용하는 `--stdio` 프로토콜은 이 프로필이 제공하므로, 설정하지 않으면 DSH 설치를 건드리지 않고 데몬은 사용할 수 없는 런타임을 등록하는 대신 프로필 누락을 보고합니다. Multica 자체 브리지는 아직 공개 npm 레지스트리에 없으므로 값 선택 방법은 [에이전트 런타임 설치](/install-agent-runtime)를 참고하세요. 여기에 설정한 값은 추가 확인 없이 모든 데몬 호스트의 DSH 홈에 설치되므로 공급망에 관한 결정으로 다루세요. `MULTICA_DSH_PROFILE_BUNDLE`이 활성화하는 설치는 범위를 의도적으로 제한합니다. 실행은 데몬 수명당 최대 한 번, 프로브가 프로필 부재를 확인한 경우에만 수행됩니다. 실패하면 패키지 관리자 자체의 출력을 로그에 남기고 재시도는 데몬을 재시작한 뒤에만 이루어집니다. 프로브가 시간 초과되거나 이 데몬이 다루지 않는 프로토콜 버전을 반환하면 보고만 하고 덮어쓰지 않습니다. 의도적으로 설치된 프로필을 데몬이 덮어쓰는 일은 없습니다. 진단은 데몬 로그에서 `DSH runtime profile`을 검색하세요. 되돌리려면 `$DSH_HOME/profiles/multica`(기본값 `~/.dsh/profiles/multica`)를 삭제합니다. `MULTICA_DSH_PLUGIN_PATH`는 설치 시 pnpm을 찾을 디렉터리를 덮어씁니다. `dsh plugin`이 전달하는 pnpm은 macOS와 Windows 모두 DSH Desktop 전용 runtime-commands 디렉터리에 있으며, 데몬이 이를 자동으로 찾아 PATH 앞에 추가합니다(최신 Desktop이 쓰는 버전별 구조도 포함). 따라서 이 변수는 데몬이 찾지 못하는 위치에 설치된 경우나 직접 준비한 pnpm을 쓰게 하려는 경우에만 필요합니다. 설정하면 자동 탐색을 완전히 대체하며, 지정한 디렉터리가 없으면 설치는 번들된 pnpm이 아니라 데몬 `PATH`의 pnpm으로 넘어갑니다. Linux에는 DSH Desktop이 없으므로 항상 `PATH`를 사용합니다. ZeroClaw는 `MULTICA_ZEROCLAW_PATH`를 지원하지만 모델 변수는 없습니다. 모델은 ZeroClaw의 에이전트 설정에서 관리합니다. 컴퓨터 전체 기본 인수 `MULTICA_<PROVIDER>_ARGS`는 현재 Claude Code, Codex, CodeBuddy, Qwen Code, QwenPaw 다섯 도구를 지원합니다. 해당 변수는 `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS`, `MULTICA_QWENPAW_ARGS`입니다. 예시:
+우선순위는 명령줄 flag → 환경 변수 → `~/.multica/config.json` → 내장 기본값입니다. watchdog 동작은 [데몬과 런타임](/daemon-runtimes)을 참고하세요.
+
+### 정리와 보존 [#gc]
+
+데몬은 실행 디렉터리, 저장소 캐시, 세션 기록, 임시 디렉터리를 주기적으로 정리합니다. 무엇이 언제 삭제되는지는 [정리와 보존](/daemon-runtimes#cleanup)을 참고하세요. 기간은 Go duration 형식에 더해 일 단위 `d`(예: `14d`, `1d12h`)도 받습니다.
+
+| 변수 | 기본값 | 설명 |
+|---|---|---|
+| `MULTICA_GC_ENABLED` | `true` | `false` 또는 `0`이면 정리 전체를 끕니다 |
+| `MULTICA_GC_INTERVAL` | `2h` | 정리 간격. 데몬 시작 약 30초 뒤에 첫 정리를 합니다 |
+| `MULTICA_GC_TTL` | `24h` | 태스크가 `done` 또는 `closed` 분류에 들어가거나 채팅 세션이 보관된 뒤, 실행 디렉터리를 삭제하기까지의 시간 |
+| `MULTICA_GC_COMPLETED_TASK_TTL` | Multica Cloud `14d`, 셀프 호스팅 `0` | 태스크 실행이 완료된 뒤 디렉터리 전체를 삭제하기까지의 시간. 태스크가 닫혔는지와 관계없음. `0`이면 끔. 프로젝트 로컬 디렉터리에서의 실행에는 적용되지 않음 |
+| `MULTICA_GC_ORPHAN_TTL` | `72h` | 소속을 찾을 수 없는 디렉터리가 변경 없이 얼마나 지나면 삭제할지 |
+| `MULTICA_GC_ARTIFACT_TTL` | `12h` | 실행 완료 후 다시 만들 수 있는 내용(다음 행의 디렉터리와 데몬이 Codex용으로 준비하는 캐시)을 삭제하기까지의 시간. `0`이면 삭제하지 않음 |
+| `MULTICA_GC_ARTIFACT_PATTERNS` | `node_modules,.next,.turbo` | 다시 만들 수 있다고 보는 디렉터리 이름(쉼표로 구분). 설정하면 기본 목록을 **대체**하므로 기본 항목도 유지하려면 함께 적어야 함. `/`나 `\`가 들어간 항목은 무시됨 |
+| `MULTICA_GC_REPO_TTL` | `30d` | 더 이상 참조되지 않고 worktree도 없는 bare 저장소 캐시를, 체크아웃 없이 얼마나 지나면 삭제할지. `0`이면 삭제하지 않음 |
+| `MULTICA_GC_REPO_MAINTENANCE_ENABLED` | `true` | 오래된 에이전트 브랜치를 지운 뒤 저장소 캐시에 `git reflog expire`와 `git gc`를 실행할지. `false`면 이 단계만 끔 |
+| `MULTICA_GC_CODEX_SESSION_TTL` | `14d` | 사용하지 않은 Codex 세션 기록을 삭제하기까지의 시간. `0`이면 삭제하지 않음 |
+| `MULTICA_GC_HERMES_SESSION_TTL` | `14d` | 사용하지 않은 Hermes 세션 기록을 삭제하기까지의 시간. `0`이면 삭제하지 않음 |
+| `MULTICA_GC_HERMES_MEMORY_TTL` | `90d` | 사용하지 않은 Hermes 메모리를 삭제하기까지의 시간. `0`이면 삭제하지 않음 |
+| `MULTICA_GC_TASK_TEMP_LEGACY_TTL` | `0` | 이전 버전 데몬이 남긴, 실행 잠금이 없는 임시 디렉터리만 대상. 변경 없이 얼마나 지나면 삭제할지. `0`이면 삭제하지 않음. 실행 잠금이 있는 임시 디렉터리는 실행이 끝나면 삭제되며 이 값의 영향을 받지 않음 |
+
+### 데몬 로그 [#daemon-logs]
+
+데몬이 백그라운드에서(터미널에 연결되지 않은 채) 실행될 때 로그는 `~/.multica/daemon.log`(이름 있는 프로필은 `~/.multica/profiles/<name>/daemon.log`)에 기록되고 크기에 따라 순환됩니다. 순환된 파일은 gzip으로 압축됩니다.
+
+| 변수 | 기본값 | 설명 |
+|---|---|---|
+| `MULTICA_DAEMON_LOG_MAX_SIZE_MB` | `20` | `daemon.log`를 순환할 크기(MB) |
+| `MULTICA_DAEMON_LOG_MAX_BACKUPS` | `5` | 보관할 순환 파일의 최대 개수 |
+| `MULTICA_DAEMON_LOG_MAX_AGE_DAYS` | `30` | 순환 파일을 보관할 일수 |
+
+세 변수 모두 양의 정수를 받습니다. `0`, 음수, 해석할 수 없는 값은 기본값으로 처리되며 "무제한"이 되지 않습니다. 순환 파일은 개수와 일수 중 먼저 도달한 한도에 따라 삭제됩니다. 충돌 출력은 같은 디렉터리의 `daemon.err.log`에 기록되며, 시작할 때 5MB를 넘으면 `daemon.err.log.1`로 이름이 바뀝니다.
+
+### 도구별 경로, 모델, 인수
+
+기본 제공 도구마다 경로 변수 `MULTICA_<PREFIX>_PATH`가 있습니다. 설정하면 데몬은 `PATH`에서 명령을 찾는 대신 이 경로를 사용합니다. 경로가 없으면 해당 도구는 등록되지 않고, `PATH`에 있는 같은 이름의 명령으로 대체되지도 않습니다. 대부분의 도구에는 모델 변수 `MULTICA_<PREFIX>_MODEL`도 있어, 에이전트에 모델이 선택되지 않았을 때 이 컴퓨터의 기본 모델로 쓰입니다. 둘 다 비어 있으면 모델을 전달하지 않고 도구가 정합니다.
+
+<Accordions>
+<Accordion title="도구별 변수 접두사" id="tool-env-prefixes" value="tool-env-prefixes">
+
+| 도구 | 접두사 | 모델 변수 |
+|---|---|---|
+| Antigravity | `MULTICA_ANTIGRAVITY` | ✓(값은 `agy models`에 표시되는 이름 그대로) |
+| Claude Code | `MULTICA_CLAUDE` | ✓ |
+| CodeArts | `MULTICA_CODEARTS` | ✓ |
+| CodeBuddy | `MULTICA_CODEBUDDY` | ✓ |
+| Codex | `MULTICA_CODEX` | ✓ |
+| Cursor Agent | `MULTICA_CURSOR` | ✓ |
+| DeepSeek Harness | `MULTICA_DSH` | ✓(값은 dsh 모델 카탈로그의 ID, 예: `deepseek-official/deepseek-chat`) |
+| DevEco Code | `MULTICA_DEVECO` | ✓ |
+| Dim | `MULTICA_DIM` | ✓(값은 dim 모델 카탈로그의 ID) |
+| GitHub Copilot CLI | `MULTICA_COPILOT` | ✓ |
+| Grok | `MULTICA_GROK` | ✓ |
+| Hermes | `MULTICA_HERMES` | ✓ |
+| Kimi CLI | `MULTICA_KIMI` | ✓ |
+| Kiro CLI | `MULTICA_KIRO` | ✓ |
+| MiniMax Code | `MULTICA_MCODE` | — |
+| Muse Code | `MULTICA_MUSE` | ✓(값은 런타임 모델 목록의 ID) |
+| Oh-My-Pi | `MULTICA_OMP` | ✓ |
+| OpenClaw | `MULTICA_OPENCLAW` | ✓ |
+| OpenCode | `MULTICA_OPENCODE` | ✓ |
+| Pi | `MULTICA_PI` | ✓ |
+| Qoder CLI | `MULTICA_QODER` | ✓ |
+| Qoder CN CLI | `MULTICA_QODERCLICN` | ✓ |
+| Qwen Code | `MULTICA_QWEN` | ✓ |
+| QwenPaw | `MULTICA_QWENPAW` | — |
+| Reasonix | `MULTICA_REASONIX` | ✓ |
+| Trae CLI | `MULTICA_TRAECLI` | ✓ |
+| ZeroClaw | `MULTICA_ZEROCLAW` | —(모델은 ZeroClaw의 에이전트 설정에서 관리) |
+
+</Accordion>
+</Accordions>
+
+QwenPaw와 MiniMax Code에는 Multica가 모델을 전달하지 않으므로 모델 변수가 없습니다. 자세한 내용은 [AI 코딩 도구 비교](/providers#모델-출처)를 참고하세요. DeepSeek Harness에는 `MULTICA_DSH_PROFILE_BUNDLE`과 `MULTICA_DSH_PLUGIN_PATH`도 있으며 다음 섹션에서 설명합니다.
+
+컴퓨터 전체 기본 인수 `MULTICA_<PREFIX>_ARGS`는 현재 Claude Code, Codex, CodeBuddy, Qwen Code, QwenPaw 다섯 도구를 지원합니다. 해당 변수는 `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS`, `MULTICA_QWENPAW_ARGS`입니다. 예시:
```dotenv
MULTICA_CLAUDE_PATH=/opt/bin/claude
MULTICA_CLAUDE_ARGS=--max-turns 40
```
-Muse Code는 `MULTICA_MUSE_PATH`와 `MULTICA_MUSE_MODEL`을 지원합니다. 모델은 런타임 목록의 ID를 사용하세요.
+### DeepSeek Harness 프로필 설치
+
+`MULTICA_DSH_PROFILE_BUNDLE`은 `multica` 프로필이 없을 때 설치할 번들을 지정하며, 쉼표로 구분한 여러 후보를 순서대로 시도합니다. 각 항목은 npm 패키지 이름, 디렉터리 또는 패키징된 tarball입니다. 기본값은 설정하지 않는 것입니다. Multica가 사용하는 `--stdio` 프로토콜은 이 프로필이 제공하므로, 설정하지 않으면 DSH 설치를 건드리지 않고 데몬은 사용할 수 없는 런타임을 등록하지 않고 프로필 누락을 보고합니다.
+
+Multica 자체 브리지는 아직 공개 npm 레지스트리에 없으므로 값 선택 방법은 [에이전트 런타임 설치](/install-agent-runtime)를 참고하세요. 여기에 설정한 값은 추가 확인 없이 모든 데몬 호스트의 DSH 홈에 설치되므로 공급망에 관한 결정으로 다루세요.
+
+이 설치는 범위를 의도적으로 제한합니다. 실행은 데몬 수명당 최대 한 번, 프로브가 프로필 부재를 확인한 경우에만 수행됩니다. 실패하면 패키지 관리자 자체의 출력을 로그에 남기고 재시도는 데몬을 재시작한 뒤에만 이루어집니다. 프로브가 시간 초과되거나 이 데몬이 다루지 않는 프로토콜 버전을 반환하면 보고만 하고 덮어쓰지 않습니다. 의도적으로 설치된 프로필을 데몬이 덮어쓰는 일은 없습니다. 진단은 데몬 로그에서 `DSH runtime profile`을 검색하세요. 되돌리려면 `$DSH_HOME/profiles/multica`(기본값 `~/.dsh/profiles/multica`)를 삭제합니다.
+
+`MULTICA_DSH_PLUGIN_PATH`는 설치 시 pnpm을 찾을 디렉터리를 덮어씁니다. `dsh plugin`이 전달하는 pnpm은 macOS와 Windows 모두 DSH Desktop 전용 runtime-commands 디렉터리에 있으며, 데몬이 이를 자동으로 찾아 PATH 앞에 추가합니다(최신 Desktop이 쓰는 버전별 구조도 포함). 따라서 이 변수는 데몬이 찾지 못하는 위치에 설치된 경우나 직접 준비한 pnpm을 쓰게 하려는 경우에만 필요합니다. 설정하면 자동 탐색을 완전히 대체하며, 지정한 디렉터리가 없으면 설치는 번들된 pnpm이 아닌 데몬 `PATH`의 pnpm으로 넘어갑니다. Linux에는 DSH Desktop이 없으므로 항상 `PATH`를 사용합니다.
+
+### Cursor 백그라운드 프로세스 정리
Cursor의 검증된 백그라운드 정리에는 Linux 6.9 이상(프로세스 그룹 pidfd), 프로세스 신원 조회와 audit token 시그널링에 대한 macOS 커널 지원, 또는 Windows에서 성공적으로 할당된 중첩 Job Object가 필요합니다. macOS에서는 커널이 검증하는 PID version으로 각 프로세스에 시그널을 보내므로 같은 세션의 그룹에 합류할 필요가 없습니다. 이 macOS API들은 비공개이며 확보 시점에 확인합니다. 소유권을 확보하지 못한 실행은 원래의 도구 결과를 반환하고, 도구 watchdog이 `0`인 경우를 포함해 일반적인 idle watchdog을 따릅니다. 이미 확보한 작업은 정리를 확인할 수 없을 때 계속 실행 중으로 남습니다. 도구 watchdog을 `0`으로 두면 이러한 경계 자체가 없습니다. 확보한 백그라운드 작업이 살아 있는 동안 실행이 계속되며, 이때 실행은 기본값이 역시 `0`인 `MULTICA_AGENT_TIMEOUT`에만 제한됩니다.
확보한 Cursor 백그라운드 프로세스는 실행이 정상적으로 완료될 때도 정리됩니다. 따라서 해당 실행이 시작한 백그라운드 서버가 의도적으로 종료 처리 이후까지 살아남지는 않습니다. macOS는 보존된 원래 부모 프로세스 신원을 통해 나중에 생성된 자식 프로세스를 인식할 수 있지만, 관찰 이전에 중간 프로세스가 사라진 연결 고리는 증명할 수 없습니다. 그러한 프로세스, 추적 중인 그룹을 벗어난 작업, 그리고 지속적인 소유권 또는 시그널링 오류는 백그라운드 작업을 남길 수 있습니다. 확인되지 않은 정리는 로그로 남으며 '정리 성공'에 따른 복구 창을 부여하지 않습니다. 숫자 PID나 프로세스 그룹만을 근거로 알 수 없는 프로세스를 종료하지 않습니다.
-우선순위는 명령줄 flag → 환경 변수 → `~/.multica/config.json` → 내장 기본값입니다. watchdog 동작은 [데몬과 런타임](/daemon-runtimes)을 참고하세요.
-
### 데몬 설정 영속화
자주 사용하는 데몬 측 설정은 shell 환경 변수에 의존하지 않고 `~/.multica/config.json`에 기록할 수도 있습니다. 이름 있는 profile의 설정 파일은 `~/.multica/profiles/<name>/config.json`에 있습니다.
diff --git a/apps/docs/content/docs/environment-variables.mdx b/apps/docs/content/docs/environment-variables.mdx
index 694af50aa6..8ee67b35c8 100644
--- a/apps/docs/content/docs/environment-variables.mdx
+++ b/apps/docs/content/docs/environment-variables.mdx
@@ -3,11 +3,12 @@ title: Environment variables
description: Common server, storage, integration, and runtime configuration for self-hosting Multica.
---
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Callout } from "fumadocs-ui/components/callout";
Multica reads environment variables at process startup. After changing one, restart the affected API, web, or daemon process. Docker Compose's `docker compose restart` does not re-read `.env`; recreate containers with `up -d` for changes to take effect.
-This page lists deployment-facing configuration only; test variables and internal run variables are not covered here. It is a grouped reference — for full deployment steps, see the [self-host quickstart](/self-host-quickstart).
+This page groups deployment-facing configuration; test variables and internal run variables are not covered here. For full deployment steps, see the [self-host quickstart](/self-host-quickstart).
## Minimum production configuration
@@ -67,7 +68,7 @@ The primary and replica connection limits are independent. Budget their sum acro
`MULTICA_DAEMON_SERVER_URL` is returned by the unauthenticated `/api/config` endpoint and is visible to clients. Treat it as public configuration; never put credentials, tokens, or other secrets in it.
</Callout>
-When the frontend and API run on different hosts and the browser talks to the API domain directly, you must set `COOKIE_DOMAIN` — otherwise the browser cannot read the CSRF cookie: every write request returns `403 CSRF validation failed` while reads work fine. Use the narrowest parent domain that covers both hosts (`.agent.example.com` over `.example.com`). It spreads the sign-in session cookie to every host under that domain, which is only acceptable when all of those hosts are operated by the same trusted party. After changing it, clear the old cookies on both hosts and sign in again. If you follow the same-origin recipe in the [self-host quickstart](/self-host-quickstart#3-choose-how-to-access) (the browser only visits the app domain), keep it empty. Do not use an IP address — browsers ignore cookies whose Domain is an IP.
+When the frontend and API run on different hosts and the browser talks to the API domain directly, you must set `COOKIE_DOMAIN` — otherwise the browser cannot read the CSRF cookie: every write request returns `403 CSRF validation failed` while reads work fine. Use the narrowest parent domain that covers both hosts (`.agent.example.com` over `.example.com`). It spreads the sign-in session cookie to every host under that domain, which is only acceptable when all of those hosts are operated by the same trusted party. After changing it, clear the old cookies on both hosts and sign in again. If you follow the same-origin recipe in the [self-host quickstart](/self-host-quickstart#remote-access) (the browser only visits the app domain), keep it empty. Do not use an IP address — browsers ignore cookies whose Domain is an IP.
<Callout type="warning">
Self-hosted deployments must set `FRONTEND_ORIGIN`. Without it, invitation links, cookie security attributes, and WebSocket origin checks can all disagree with your actual domain.
@@ -244,31 +245,116 @@ The variables below are read on the computer that runs your agents, not in the A
| `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | same as `MULTICA_AGENT_IDLE_WATCHDOG` | Codex semantic-silence threshold. Codex's own timer cannot see that a tool is running, so it tracks the larger of the idle / tool budgets instead of holding a separate, shorter ceiling |
| `MULTICA_CODEX_FIRST_TURN_TIMEOUT` | `0` | Explicit override for the Codex first-turn no-progress ceiling; `0` keeps the default. The effective first-turn wait stays bounded by `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` and the overall execution timeout — set `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` strictly above this value (with some margin), or the wait is truncated to it and the model-catalog startup retry is skipped. Equal values are not enough: the semantic timer is armed first, so at equal durations the retry can still be lost |
| `MULTICA_CODEX_HANDSHAKE_TIMEOUT` | `30s`; `thread/start`, `thread/resume`: `60s` | Codex app-server startup handshake ceilings. An explicit value overrides both budgets globally |
+| `MULTICA_CODEX_MEMORY` | off | Set to `1`, `true`, `yes`, or `on` to keep Codex native memory in daemon-managed Codex runs; it is turned off per run by default. See [Codex native memory and subagents](/daemon-runtimes#codex-memory) |
+| `MULTICA_CODEX_MULTI_AGENT` | off | Same values; keeps Codex native subagents. The run counts as finished when the parent thread finishes, so results subagents have not handed back are lost |
| `MULTICA_CODEX_TURN_INTERRUPT_TIMEOUT` | `2s` | Grace period after cancellation for Codex app-server to acknowledge `turn/interrupt` and emit `turn/completed`, preserving final token usage before forced process cleanup. On unusually slow hosts, tune this from the interrupt latency recorded in daemon logs |
| `MULTICA_DAEMON_AUTO_UPDATE` | Cloud `true`; self-hosted `false` | Whether to check for and apply CLI updates automatically |
| `MULTICA_DAEMON_AUTO_UPDATE_INTERVAL` | `6h` | Update check interval |
| `MULTICA_DAEMON_AUTO_RELOAD` | `true` | Whether to restart into a `multica` binary replaced on disk out of band (`brew upgrade`, a re-download, a local build). Independent of `MULTICA_DAEMON_AUTO_UPDATE` |
| `MULTICA_WORKSPACES_ROOT` | `~/multica_workspaces` | Root directory for run working directories |
| `MULTICA_AGENT_TEMP_BASE` | `/tmp` (Linux/macOS) | Linux/macOS only. Parent directory for private per-run temp dirs; must be an existing, writable absolute directory, and an invalid value fails run startup instead of falling back to `/tmp`. Pick a short path — child tools may bind AF_UNIX sockets under it, and `sun_path` is limited to 108 bytes on Linux and 104 on macOS |
-| `MULTICA_KEEP_ENV_AFTER_TASK` | `false` | Keep run directories for debugging |
-For the internal context that the daemon injects into agent tasks, see [Task runtime environment](/daemon-runtimes#task-runtime-environment).
+For the internal context that the daemon injects into agent tasks, see [Task runtime environment](/daemon-runtimes#task-runtime-environment). `MULTICA_REPO_CHECKOUT_MODE` is one of these: the daemon sets it to `isolated` only for Codex runs on Linux and Windows, and it cannot be configured by hand. `MULTICA_*` variables in the daemon's own environment are not passed into runs.
-Each AI coding tool accepts `MULTICA_<PROVIDER>_PATH` and `MULTICA_<PROVIDER>_MODEL` to override the command path and default model. QwenPaw and MiniMax Code have no model variable because Multica never sends them a model; MiniMax Code's path variable is `MULTICA_MCODE_PATH` — see [AI coding tools comparison](/providers#model-sources). DeepSeek Harness supports `MULTICA_DSH_PATH` and `MULTICA_DSH_MODEL` (a model id from the dsh catalog, e.g. `deepseek-official/deepseek-chat`). DeepSeek Harness additionally accepts `MULTICA_DSH_PROFILE_BUNDLE`: a comma-separated list of bundles to install into its `multica` profile when that profile is missing, tried in order, where each entry is an npm spec, a directory, or a packed tarball. It is unset by default, and the `--stdio` protocol Multica drives is what that profile supplies, so an unset variable leaves the DSH installation untouched and the daemon reports the missing profile instead of registering an unusable runtime. Multica's own bridge is not on a public npm registry yet, so choosing a value is covered in [Install an agent runtime](/install-agent-runtime); whatever you set is installed into every daemon host's DSH home without further confirmation, so treat it as a supply-chain decision. The install `MULTICA_DSH_PROFILE_BUNDLE` enables is bounded on purpose: it runs at most once per daemon lifetime, only when the probe reports the profile genuinely absent, and a failure is logged with the package manager's own output and retried only after a daemon restart. A probe that times out, or answers with a protocol version this daemon does not drive, is reported and never installed over — the daemon does not overwrite a profile that is deliberately there. To diagnose, search the daemon log for `DSH runtime profile`; to undo an install, delete `$DSH_HOME/profiles/multica` (default `~/.dsh/profiles/multica`). `MULTICA_DSH_PLUGIN_PATH` overrides the directory the install resolves pnpm from. DSH Desktop keeps the pnpm that `dsh plugin` forwards to inside its own runtime-commands directory on both macOS and Windows, and the daemon finds and prepends it automatically — including the versioned layout a newer Desktop uses — so this variable is only needed for an installation the daemon cannot find, or to make the install use a pnpm of your own. Setting it replaces the search entirely: if the directory does not exist, the install falls back to whatever pnpm is on the daemon's `PATH` rather than to the bundled one. Linux has no DSH Desktop, so there the install always uses `PATH`. Dim supports `MULTICA_DIM_PATH` and `MULTICA_DIM_MODEL` (a model id from the dim catalog). ZeroClaw supports `MULTICA_ZEROCLAW_PATH` but has no model variable; its agent profile owns the model selection. Machine-wide default arguments via `MULTICA_<PROVIDER>_ARGS` are currently supported for five tools: Claude Code, Codex, CodeBuddy, Qwen Code, and QwenPaw. The variables are `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS`, and `MULTICA_QWENPAW_ARGS`. For example:
+Precedence is command-line flag → environment variable → `~/.multica/config.json` → built-in default. For watchdog behavior, see [Daemon and runtimes](/daemon-runtimes).
+
+### Cleanup and retention [#gc]
+
+The daemon periodically cleans up run directories, repository caches, session records, and temporary directories; what is removed when is described in [Cleanup and retention](/daemon-runtimes#cleanup). Durations accept Go duration syntax plus `d` for days (for example `14d` or `1d12h`).
+
+| Variable | Default | Description |
+|---|---|---|
+| `MULTICA_GC_ENABLED` | `true` | Set to `false` or `0` to turn the whole cleanup loop off |
+| `MULTICA_GC_INTERVAL` | `2h` | Time between cleanup passes; the first pass runs about 30 seconds after the daemon starts |
+| `MULTICA_GC_TTL` | `24h` | How long after an issue enters the `done` or `closed` category, or a chat session is archived, its run directories are removed |
+| `MULTICA_GC_COMPLETED_TASK_TTL` | Multica Cloud `14d`; self-hosted `0` | How long after an issue run completes its whole directory is removed, whether or not the issue is closed; `0` turns this off. Does not apply to runs on a project's local directory |
+| `MULTICA_GC_ORPHAN_TTL` | `72h` | How long a directory with no owner found must go unchanged before it is removed |
+| `MULTICA_GC_ARTIFACT_TTL` | `12h` | How long after a run completes regenerable content is removed (the directories in the next row plus the cache the daemon prepares for Codex); `0` keeps it |
+| `MULTICA_GC_ARTIFACT_PATTERNS` | `node_modules,.next,.turbo` | Directory names treated as regenerable, comma-separated. Setting it **replaces** the default list, so include the defaults if you still want them; entries containing `/` or `\` are ignored |
+| `MULTICA_GC_REPO_TTL` | `30d` | How long a bare repository cache that is no longer referenced and has no worktrees must go without a checkout before it is removed; `0` keeps it |
+| `MULTICA_GC_REPO_MAINTENANCE_ENABLED` | `true` | Whether to run `git reflog expire` and `git gc` on a repository cache after stale agent branches are removed; `false` turns off only this step |
+| `MULTICA_GC_CODEX_SESSION_TTL` | `14d` | How long Codex session records stay unused before removal; `0` keeps them |
+| `MULTICA_GC_HERMES_SESSION_TTL` | `14d` | How long Hermes session records stay unused before removal; `0` keeps them |
+| `MULTICA_GC_HERMES_MEMORY_TTL` | `90d` | How long Hermes memory stays unused before removal; `0` keeps it |
+| `MULTICA_GC_TASK_TEMP_LEGACY_TTL` | `0` | Only for temporary directories left by older daemons without a run lock: how long they must go unchanged before removal. `0` keeps them. Temporary directories with a run lock are removed when the run ends and are unaffected |
+
+### Daemon logs [#daemon-logs]
+
+When the daemon runs in the background (not attached to a terminal), it writes logs to `~/.multica/daemon.log`, or `~/.multica/profiles/<name>/daemon.log` for a named profile, rotating by size and compressing rotated files with gzip.
+
+| Variable | Default | Description |
+|---|---|---|
+| `MULTICA_DAEMON_LOG_MAX_SIZE_MB` | `20` | Size in MB at which `daemon.log` rotates |
+| `MULTICA_DAEMON_LOG_MAX_BACKUPS` | `5` | Maximum number of rotated files kept |
+| `MULTICA_DAEMON_LOG_MAX_AGE_DAYS` | `30` | Days rotated files are kept |
+
+All three take a positive integer; `0`, a negative number, or an unparsable value falls back to the default rather than meaning "unlimited". A rotated file is deleted as soon as either the count or the age limit is reached. Crash output goes to `daemon.err.log` in the same directory, which is renamed to `daemon.err.log.1` at startup once it exceeds 5 MB.
+
+### Per-tool paths, models, and arguments
+
+Every built-in tool has a path variable, `MULTICA_<PREFIX>_PATH`. When it is set, the daemon uses that path instead of looking the command up on `PATH`; if the path does not exist, the tool is not registered and the daemon does not fall back to a same-named command on `PATH`. Most tools also have a model variable, `MULTICA_<PREFIX>_MODEL`, used as this computer's default model when the agent has none selected. When both are empty, no model is passed and the tool decides.
+
+<Accordions>
+<Accordion title="Variable prefix for each tool" id="tool-env-prefixes" value="tool-env-prefixes">
+
+| Tool | Prefix | Model variable |
+|---|---|---|
+| Antigravity | `MULTICA_ANTIGRAVITY` | ✓ (the exact name shown by `agy models`) |
+| Claude Code | `MULTICA_CLAUDE` | ✓ |
+| CodeArts | `MULTICA_CODEARTS` | ✓ |
+| CodeBuddy | `MULTICA_CODEBUDDY` | ✓ |
+| Codex | `MULTICA_CODEX` | ✓ |
+| Cursor Agent | `MULTICA_CURSOR` | ✓ |
+| DeepSeek Harness | `MULTICA_DSH` | ✓ (a model id from the dsh catalog, e.g. `deepseek-official/deepseek-chat`) |
+| DevEco Code | `MULTICA_DEVECO` | ✓ |
+| Dim | `MULTICA_DIM` | ✓ (a model id from the dim catalog) |
+| GitHub Copilot CLI | `MULTICA_COPILOT` | ✓ |
+| Grok | `MULTICA_GROK` | ✓ |
+| Hermes | `MULTICA_HERMES` | ✓ |
+| Kimi CLI | `MULTICA_KIMI` | ✓ |
+| Kiro CLI | `MULTICA_KIRO` | ✓ |
+| MiniMax Code | `MULTICA_MCODE` | — |
+| Muse Code | `MULTICA_MUSE` | ✓ (a model id from its runtime catalog) |
+| Oh-My-Pi | `MULTICA_OMP` | ✓ |
+| OpenClaw | `MULTICA_OPENCLAW` | ✓ |
+| OpenCode | `MULTICA_OPENCODE` | ✓ |
+| Pi | `MULTICA_PI` | ✓ |
+| Qoder CLI | `MULTICA_QODER` | ✓ |
+| Qoder CN CLI | `MULTICA_QODERCLICN` | ✓ |
+| Qwen Code | `MULTICA_QWEN` | ✓ |
+| QwenPaw | `MULTICA_QWENPAW` | — |
+| Reasonix | `MULTICA_REASONIX` | ✓ |
+| Trae CLI | `MULTICA_TRAECLI` | ✓ |
+| ZeroClaw | `MULTICA_ZEROCLAW` | — (its agent profile owns the model selection) |
+
+</Accordion>
+</Accordions>
+
+QwenPaw and MiniMax Code have no model variable because Multica never sends them a model; see [AI coding tools comparison](/providers#model-sources). DeepSeek Harness also has `MULTICA_DSH_PROFILE_BUNDLE` and `MULTICA_DSH_PLUGIN_PATH`, covered in the next section.
+
+Machine-wide default arguments via `MULTICA_<PREFIX>_ARGS` are currently supported for five tools — Claude Code, Codex, CodeBuddy, Qwen Code, and QwenPaw — through `MULTICA_CLAUDE_ARGS`, `MULTICA_CODEX_ARGS`, `MULTICA_CODEBUDDY_ARGS`, `MULTICA_QWEN_ARGS`, and `MULTICA_QWENPAW_ARGS`. For example:
```dotenv
MULTICA_CLAUDE_PATH=/opt/bin/claude
MULTICA_CLAUDE_ARGS=--max-turns 40
```
-Muse Code accepts `MULTICA_MUSE_PATH` and `MULTICA_MUSE_MODEL`; use a model id from its runtime catalog.
+### DeepSeek Harness profile install
+
+`MULTICA_DSH_PROFILE_BUNDLE` is a comma-separated list of bundles to install into the `multica` profile when that profile is missing, tried in order, where each entry is an npm spec, a directory, or a packed tarball. It is unset by default. The `--stdio` protocol Multica drives is what that profile supplies, so an unset variable leaves the DSH installation untouched and the daemon reports the missing profile instead of registering an unusable runtime.
+
+Multica's own bridge is not on a public npm registry yet; choosing a value is covered in [Install an agent runtime](/install-agent-runtime). Whatever you set is installed into every daemon host's DSH home without further confirmation, so treat it as a supply-chain decision.
+
+The install is bounded on purpose: it runs at most once per daemon lifetime, only when the probe reports the profile genuinely absent, and a failure is logged with the package manager's own output and retried only after a daemon restart. A probe that times out, or answers with a protocol version this daemon does not drive, is reported and never installed over: the daemon does not overwrite a profile that is deliberately there. To diagnose, search the daemon log for `DSH runtime profile`; to undo an install, delete `$DSH_HOME/profiles/multica` (default `~/.dsh/profiles/multica`).
+
+`MULTICA_DSH_PLUGIN_PATH` overrides the directory the install resolves pnpm from. DSH Desktop keeps the pnpm that `dsh plugin` forwards to inside its own runtime-commands directory on both macOS and Windows, and the daemon finds and prepends it automatically, including the versioned layout a newer Desktop uses. You only need this variable for an installation the daemon cannot find, or to make the install use a pnpm of your own. Setting it replaces the search entirely: if the directory does not exist, the install falls back to whatever pnpm is on the daemon's `PATH`, not to the bundled one. Linux has no DSH Desktop, so there the install always uses `PATH`.
+
+### Cursor background process cleanup
Cursor's verified background cleanup requires Linux 6.9 or newer (process-group pidfds), macOS kernel support for process identity queries and audit-token signalling, or a successfully assigned nested Job Object on Windows. On macOS, each process is signalled using a kernel-checked PID version; no same-session group join is required. These macOS APIs are private and checked at capture time. A launch that cannot be claimed returns its original tool result and uses the ordinary idle watchdog, including when the tool watchdog is `0`. Already-claimed work remains in flight if cleanup cannot be confirmed. With the tool watchdog set to `0` there is no such boundary at all: claimed background work keeps the run in flight for as long as it lives, so the run is bounded only by `MULTICA_AGENT_TIMEOUT`, which is `0` by default.
Owned Cursor background processes are also stopped when the run completes normally, so a background server started by that run does not intentionally survive finalization. macOS can recognize late children through retained original-parent identities, but cannot prove a chain whose intermediate processes disappeared before observation. Such processes, work that leaves the tracked group, or persistent ownership/signalling errors can leave background work behind. Unconfirmed cleanup is logged and never grants a successful-cleanup recovery window; unknown processes are not killed based only on their numeric PID or process group.
-Precedence is command-line flag → environment variable → `~/.multica/config.json` → built-in default. For watchdog behavior, see [Daemon and runtimes](/daemon-runtimes).
-
### Persisting daemon configuration
Common daemon-side settings can also be written to `~/.multica/config.json` instead of relying on shell environment variables; named profiles keep theirs at `~/.multica/profiles/<name>/config.json`:
diff --git a/apps/docs/content/docs/environment-variables.zh.mdx b/apps/docs/content/docs/environment-variables.zh.mdx
index 28e8f2aded..3963919338 100644
--- a/apps/docs/content/docs/environment-variables.zh.mdx
+++ b/apps/docs/content/docs/environment-variables.zh.mdx
@@ -3,11 +3,12 @@ title: 环境变量
description: 自托管 Multica 常用的服务端、存储、集成和运行时配置。
---
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Callout } from "fumadocs-ui/components/callout";
Multica 在进程启动时读取环境变量。修改后通常需要重启对应的 API、Web 或守护进程。Docker Compose 的 `docker compose restart` 不会重新读取 `.env`,要用 `up -d` 重建容器才能生效。
-本页只列面向部署者的配置;测试变量和内部运行变量不在这里展开。本页是分组参考;完整部署步骤见[自托管快速上手](/self-host-quickstart)。
+本页按分组列出面向部署者的配置,测试变量和内部运行变量不在这里展开。完整部署步骤见[自托管快速上手](/self-host-quickstart)。
## 生产环境最小配置
@@ -67,7 +68,7 @@ MULTICA_PUBLIC_URL=https://api.multica.example.com
`MULTICA_DAEMON_SERVER_URL` 会由无需认证的 `/api/config` 接口返回,客户端可以读取。请将它视为公开配置,切勿填入凭据、令牌或其他密钥。
</Callout>
-前端和 API 使用不同 host、且浏览器直接访问 API 域时,必须设置 `COOKIE_DOMAIN`,否则浏览器读不到 CSRF cookie——所有写请求返回 `403 CSRF validation failed`,而读请求一切正常。取值用能同时覆盖两个 host 的最窄父域(`.agent.example.com` 优于 `.example.com`)。它会把登录会话 cookie 扩散到该域下的所有 host,只有这些 host 都由同一可信主体运维时才可用。修改后需要在两个 host 上清除旧 cookie 并重新登录。若采用[自托管快速上手](/self-host-quickstart#3-选择访问方式)的同源配方(浏览器只访问 app 域),保持为空即可。不要填写 IP 地址,浏览器会忽略带 IP Domain 的 cookie。
+前端和 API 使用不同 host、且浏览器直接访问 API 域时,必须设置 `COOKIE_DOMAIN`,否则浏览器读不到 CSRF cookie——所有写请求返回 `403 CSRF validation failed`,而读请求一切正常。取值用能同时覆盖两个 host 的最窄父域(`.agent.example.com` 优于 `.example.com`)。它会把登录会话 cookie 扩散到该域下的所有 host,只有这些 host 都由同一可信主体运维时才可用。修改后需要在两个 host 上清除旧 cookie 并重新登录。若采用[自托管快速上手](/self-host-quickstart#remote-access)的同源配方(浏览器只访问 app 域),保持为空即可。不要填写 IP 地址,浏览器会忽略带 IP Domain 的 cookie。
<Callout type="warning">
自托管部署需要设置 `FRONTEND_ORIGIN`。缺少它时,邀请链接、cookie 安全属性和 WebSocket origin 校验都可能与实际域名不一致。
@@ -209,7 +210,7 @@ MULTICA_PUBLIC_URL=https://api.multica.example.com
| `MULTICA_LLM_MAX_RETRIES` | `2` | 单次调用的重试上限;`0` 表示禁用重试,`1`–`5` 表示最多重试 N 次 |
| `MULTICA_LLM_DISABLE_THINKING` | `false` | 在每个请求中附带 `chat_template_kwargs: {"enable_thinking": false}`,供支持该字段的网关关闭模型思考 |
-`MULTICA_LLM_MAX_RETRIES` 是重试策略的唯一配置源。不设置时使用默认的 2 次;设为 `0` 表示每次调用只发一个请求;设为 1–5 表示最多重试这么多次。它是上限而不是配额:只有可重试的失败才会消耗它,请求成功或调用方自身的超时都会让调用提前结束。其它取值(负数、非数字、大于 5)会让服务启动失败,而不是被静默纠正。上限是一个延迟预算:退避从 0.5s 开始翻倍,上限 8s,更大的预算会超出调用方自身的超时,把可重试的失败变成超时失败。重试覆盖连接失败以及 HTTP 408、409、429 和 5xx;其余 4xx 直接返回。服务启动时会以 `llm retry policy` 打印生效策略,其中不包含任何凭据。
+`MULTICA_LLM_MAX_RETRIES` 是重试策略的唯一配置源。不设置时使用默认的 2 次;设为 `0` 表示每次调用只发一个请求;设为 1–5 表示最多重试这么多次。它是上限而不是配额:只有可重试的失败才会消耗它,请求成功或调用方自身的超时都会让调用提前结束。其它取值(负数、非数字、大于 5)会让服务启动失败,不会被静默纠正。上限是一个延迟预算:退避从 0.5s 开始翻倍,上限 8s,更大的预算会超出调用方自身的超时,把可重试的失败变成超时失败。重试覆盖连接失败以及 HTTP 408、409、429 和 5xx;其余 4xx 直接返回。服务启动时会以 `llm retry policy` 打印生效策略,其中不包含任何凭据。
`MULTICA_LLM_DISABLE_THINKING` 面向"模型会先跑一段推理(thinking)并吃掉辅助调用延迟预算"的网关。设为 `true`(或 `1`)时,服务端会在每个请求体中附带 `chat_template_kwargs: {"enable_thinking": false}`;支持透传该字段的网关(vLLM/sglang 类部署、部分 GLM/Qwen 系的 LiteLLM 路由)会因此跳过思考阶段。标准 OpenAI 端点会拒绝未知的请求体字段,所以仅在上游接受时启用。GPT-5.6 系模型和 GPT-6 Luna 在后续提问建议请求中已由服务端附带 `reasoning_effort: none`。会话自动命名不发送推理字段;只有当所配置的上游接受 `chat_template_kwargs` 时,此项才会影响它。可接受的取值为 `true`/`false` 和 `1`/`0`(不区分大小写);其它取值会让服务启动失败。启动日志会在重试策略旁打印生效状态。
@@ -244,30 +245,115 @@ API key 与 base URL 都为空时,这一层关闭,不会发出任何上游
| `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | 同 `MULTICA_AGENT_IDLE_WATCHDOG` | Codex 语义静默阈值。Codex 自己的计时器看不到工具是否在执行,因此跟随 idle / tool 预算中较大的那个,而不再单独保留一个更短的上限 |
| `MULTICA_CODEX_FIRST_TURN_TIMEOUT` | `0` | 显式覆盖 Codex 首轮无进展上限;`0` 保持默认值。实际首轮等待仍受 `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` 和总执行超时限制——需将 `MULTICA_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` 设为严格大于此值(并留出余量),否则等待会被截断至该值,且会跳过模型目录启动重试。设为相等还不够:语义计时器先启动,两者相等时仍可能丢失该重试 |
| `MULTICA_CODEX_HANDSHAKE_TIMEOUT` | `30s`;`thread/start`、`thread/resume`:`60s` | Codex app-server 启动握手上限;显式设置后会统一覆盖两类预算 |
+| `MULTICA_CODEX_MEMORY` | 关闭 | 设为 `1`、`true`、`yes` 或 `on` 时,在守护进程管理的 Codex 运行中保留 Codex 原生记忆;默认按运行关闭,见 [Codex 原生记忆与子智能体](/daemon-runtimes#codex-memory) |
+| `MULTICA_CODEX_MULTI_AGENT` | 关闭 | 取值同上,保留 Codex 原生子智能体。父线程结束时运行即判为结束,子智能体未交回的结果会丢失 |
| `MULTICA_CODEX_TURN_INTERRUPT_TIMEOUT` | `2s` | 任务取消后等待 Codex app-server 确认 `turn/interrupt` 并发出 `turn/completed` 的宽限期,以便在强制清理进程前保留最终 token 用量。主机异常缓慢时,可根据 daemon 日志记录的中断延迟调整 |
| `MULTICA_DAEMON_AUTO_UPDATE` | Cloud `true`;自托管 `false` | 是否自动检查并更新 CLI |
| `MULTICA_DAEMON_AUTO_UPDATE_INTERVAL` | `6h` | 检查更新的间隔 |
| `MULTICA_DAEMON_AUTO_RELOAD` | `true` | 是否在 `multica` 二进制被带外替换(`brew upgrade`、重新下载、本地构建)后重启到新二进制。与 `MULTICA_DAEMON_AUTO_UPDATE` 相互独立 |
| `MULTICA_WORKSPACES_ROOT` | `~/multica_workspaces` | 执行工作目录的根目录 |
| `MULTICA_AGENT_TEMP_BASE` | `/tmp`(Linux/macOS) | 仅适用于 Linux/macOS。每次运行的私有临时目录的父目录;必须是现有、可写的绝对路径,无效值会使运行启动失败,不会回退到 `/tmp`。请选择较短的路径——子工具可能会在其中绑定 AF_UNIX socket;Linux 的 `sun_path` 上限为 108 字节,macOS 为 104 字节 |
-| `MULTICA_KEEP_ENV_AFTER_TASK` | `false` | 保留运行目录用于调试 |
-守护进程注入智能体 task 的内部上下文见 [Task 运行时环境](/daemon-runtimes#task-运行时环境)。
+守护进程注入智能体 task 的内部上下文见 [Task 运行时环境](/daemon-runtimes#task-运行时环境)。`MULTICA_REPO_CHECKOUT_MODE` 也属于这类变量:守护进程只在 Linux 和 Windows 的 Codex 运行中把它设为 `isolated`,不需要也无法手动配置。守护进程自身环境里的 `MULTICA_*` 变量不会传进运行。
-各 AI 编程工具可以使用 `MULTICA_<PROVIDER>_PATH` 覆盖命令路径;支持模型覆盖的工具还可以使用 `MULTICA_<PROVIDER>_MODEL`。QwenPaw 和 MiniMax Code 没有模型变量,因为 Multica 不会向它们传模型;MiniMax Code 的路径变量是 `MULTICA_MCODE_PATH`。详见 [AI 编程工具对比](/providers#模型来源)。DeepSeek Harness 支持 `MULTICA_DSH_PATH` 和 `MULTICA_DSH_MODEL`(取值为 dsh 模型目录中的模型 id,例如 `deepseek-official/deepseek-chat`)。 DeepSeek Harness 另外支持 `MULTICA_DSH_PROFILE_BUNDLE`:当 `multica` profile 缺失时,用它指定要安装的 bundle,多个候选用逗号分隔、按序尝试,每项可以是 npm 包名、目录或打包好的 tarball。该变量默认不设置;Multica 驱动的 `--stdio` 协议正是由这个 profile 提供,所以不设置时不会改动 DSH 的安装,守护进程会报告缺少 profile,而不是注册一个不可用的运行时。Multica 自己的桥接还没有发布到公共 npm registry,如何选取值见[安装智能体运行时](/install-agent-runtime);这里填的东西会在没有二次确认的情况下装进每一台守护进程宿主的 DSH 家目录,请当作供应链决策来对待。`MULTICA_DSH_PROFILE_BUNDLE` 开启的安装被刻意限制了范围:每个守护进程生命周期最多执行一次,只在探测确认 profile 确实缺失时执行;失败时会把包管理器自身的输出记入日志,且只有重启守护进程后才会重试。探测超时、或返回本守护进程不支持的协议版本时,只做报告,绝不覆盖安装——守护进程不会覆盖一个明显是刻意装上去的 profile。排查时在守护进程日志中搜索 `DSH runtime profile`;要撤销安装,删除 `$DSH_HOME/profiles/multica`(默认 `~/.dsh/profiles/multica`)。`MULTICA_DSH_PLUGIN_PATH` 用于覆盖安装时解析 pnpm 的目录。`dsh plugin` 转发到的那个 pnpm 由 DSH Desktop 放在它私有的 runtime-commands 目录里,macOS 和 Windows 都是如此,守护进程会自动找到并加到 PATH 最前——包括较新版 Desktop 采用的带版本号目录结构。所以只有守护进程找不到的安装位置、或者你想让安装使用自己的 pnpm 时,才需要这个变量。一旦设置就完全取代自动查找:目录不存在时,安装会退回使用守护进程 `PATH` 上的 pnpm,而不是内置的那个。Linux 上没有 DSH Desktop,安装始终使用 `PATH`。ZeroClaw 支持 `MULTICA_ZEROCLAW_PATH`,但没有模型变量;模型由 ZeroClaw 的智能体配置管理。全机默认参数 `MULTICA_<PROVIDER>_ARGS` 目前支持 Claude Code、Codex、CodeBuddy、Qwen Code 和 QwenPaw 五款工具。对应变量是 `MULTICA_CLAUDE_ARGS`、`MULTICA_CODEX_ARGS`、`MULTICA_CODEBUDDY_ARGS`、`MULTICA_QWEN_ARGS` 和 `MULTICA_QWENPAW_ARGS`。例如:
+优先级为命令行 flag → 环境变量 → `~/.multica/config.json` → 内置默认。watchdog 的行为见[守护进程与运行时](/daemon-runtimes)。
+
+### 清理与保留 [#gc]
+
+守护进程定期清理执行工作目录、仓库缓存、会话记录和临时目录,各类数据的删除条件见[清理与保留](/daemon-runtimes#cleanup)。时长接受 Go duration,另外支持 `d` 表示天(如 `14d`、`1d12h`)。
+
+| 变量 | 默认值 | 说明 |
+|---|---|---|
+| `MULTICA_GC_ENABLED` | `true` | 设为 `false` 或 `0` 关闭整个清理循环 |
+| `MULTICA_GC_INTERVAL` | `2h` | 两轮清理之间的间隔;守护进程启动约 30 秒后先清理一次 |
+| `MULTICA_GC_TTL` | `24h` | 任务进入 `done` 或 `closed` 分类、或聊天会话归档后,再过多久删除对应运行目录 |
+| `MULTICA_GC_COMPLETED_TASK_TTL` | Multica Cloud `14d`;自托管 `0` | 任务运行完成多久后删除整个目录,不论任务是否关闭;`0` 表示关闭。不作用于项目本地目录上的运行 |
+| `MULTICA_GC_ORPHAN_TTL` | `72h` | 找不到归属的目录多久没有改动后删除 |
+| `MULTICA_GC_ARTIFACT_TTL` | `12h` | 运行完成多久后删除可再生成的内容(下一行的目录和守护进程为 Codex 准备的缓存);`0` 表示不删 |
+| `MULTICA_GC_ARTIFACT_PATTERNS` | `node_modules,.next,.turbo` | 按目录名匹配的可再生成内容,逗号分隔。设置后**替换**默认列表,要保留默认项就一并写上;含 `/` 或 `\` 的项会被忽略 |
+| `MULTICA_GC_REPO_TTL` | `30d` | 不再被引用、也没有 worktree 的裸仓库缓存,多久没有检出后删除;`0` 表示不删 |
+| `MULTICA_GC_REPO_MAINTENANCE_ENABLED` | `true` | 删掉过期的智能体分支后,是否对仓库缓存运行 `git reflog expire` 和 `git gc`;设为 `false` 只关掉这一步 |
+| `MULTICA_GC_CODEX_SESSION_TTL` | `14d` | Codex 会话记录多久未使用后删除;`0` 表示不删 |
+| `MULTICA_GC_HERMES_SESSION_TTL` | `14d` | Hermes 会话记录多久未使用后删除;`0` 表示不删 |
+| `MULTICA_GC_HERMES_MEMORY_TTL` | `90d` | Hermes 记忆多久未使用后删除;`0` 表示不删 |
+| `MULTICA_GC_TASK_TEMP_LEGACY_TTL` | `0` | 只针对旧版守护进程留下、没有运行锁的临时目录:多久没有改动后删除。`0` 表示不删。带运行锁的临时目录在运行结束后就会删除,不受它影响 |
+
+### 守护进程日志 [#daemon-logs]
+
+守护进程在后台运行(不连着终端)时,日志写入 `~/.multica/daemon.log`,命名 profile 为 `~/.multica/profiles/<name>/daemon.log`,并按大小轮转,轮转出的文件用 gzip 压缩。
+
+| 变量 | 默认值 | 说明 |
+|---|---|---|
+| `MULTICA_DAEMON_LOG_MAX_SIZE_MB` | `20` | `daemon.log` 达到多少 MB 时轮转 |
+| `MULTICA_DAEMON_LOG_MAX_BACKUPS` | `5` | 最多保留几个轮转文件 |
+| `MULTICA_DAEMON_LOG_MAX_AGE_DAYS` | `30` | 轮转文件保留的天数 |
+
+三个变量都要求正整数;`0`、负数或无法解析的值按默认值处理,不会变成"不限制"。保留数量和天数哪个先到就按哪个删除。崩溃输出写在同目录的 `daemon.err.log`,启动时超过 5 MB 就改名为 `daemon.err.log.1`。
+
+### 各 AI 编程工具的路径、模型与参数
+
+每款内置工具都有路径变量 `MULTICA_<前缀>_PATH`。设置后,守护进程用这个路径代替在 `PATH` 中查找命令;路径不存在时这款工具不会注册,也不会退回 `PATH` 里的同名命令。多数工具还有模型变量 `MULTICA_<前缀>_MODEL`:智能体没有选择模型时,用它作为这台电脑的默认模型;两者都为空时不传模型,由工具自己决定。
+
+<Accordions>
+<Accordion title="各工具的变量前缀" id="tool-env-prefixes" value="tool-env-prefixes">
+
+| 工具 | 前缀 | 有模型变量 |
+|---|---|---|
+| Antigravity | `MULTICA_ANTIGRAVITY` | ✓(取值是 `agy models` 显示的完整名称) |
+| Claude Code | `MULTICA_CLAUDE` | ✓ |
+| CodeArts | `MULTICA_CODEARTS` | ✓ |
+| CodeBuddy | `MULTICA_CODEBUDDY` | ✓ |
+| Codex | `MULTICA_CODEX` | ✓ |
+| Cursor Agent | `MULTICA_CURSOR` | ✓ |
+| DeepSeek Harness | `MULTICA_DSH` | ✓(取值是 dsh 模型目录中的 id,例如 `deepseek-official/deepseek-chat`) |
+| DevEco Code | `MULTICA_DEVECO` | ✓ |
+| Dim | `MULTICA_DIM` | ✓(取值是 dim 模型目录中的 id) |
+| GitHub Copilot CLI | `MULTICA_COPILOT` | ✓ |
+| Grok | `MULTICA_GROK` | ✓ |
+| Hermes | `MULTICA_HERMES` | ✓ |
+| Kimi CLI | `MULTICA_KIMI` | ✓ |
+| Kiro CLI | `MULTICA_KIRO` | ✓ |
+| MiniMax Code | `MULTICA_MCODE` | — |
+| Muse Code | `MULTICA_MUSE` | ✓(取值用运行时模型列表中的 ID) |
+| Oh-My-Pi | `MULTICA_OMP` | ✓ |
+| OpenClaw | `MULTICA_OPENCLAW` | ✓ |
+| OpenCode | `MULTICA_OPENCODE` | ✓ |
+| Pi | `MULTICA_PI` | ✓ |
+| Qoder CLI | `MULTICA_QODER` | ✓ |
+| Qoder CN CLI | `MULTICA_QODERCLICN` | ✓ |
+| Qwen Code | `MULTICA_QWEN` | ✓ |
+| QwenPaw | `MULTICA_QWENPAW` | — |
+| Reasonix | `MULTICA_REASONIX` | ✓ |
+| Trae CLI | `MULTICA_TRAECLI` | ✓ |
+| ZeroClaw | `MULTICA_ZEROCLAW` | —(模型由 ZeroClaw 的智能体配置管理) |
+
+</Accordion>
+</Accordions>
+
+QwenPaw 和 MiniMax Code 没有模型变量,因为 Multica 不会向它们传模型,详见 [AI 编程工具对比](/providers#模型来源)。DeepSeek Harness 另有 `MULTICA_DSH_PROFILE_BUNDLE` 和 `MULTICA_DSH_PLUGIN_PATH`,见下一节。
+
+全机默认参数 `MULTICA_<前缀>_ARGS` 目前支持 Claude Code、Codex、CodeBuddy、Qwen Code 和 QwenPaw 五款工具,对应变量是 `MULTICA_CLAUDE_ARGS`、`MULTICA_CODEX_ARGS`、`MULTICA_CODEBUDDY_ARGS`、`MULTICA_QWEN_ARGS` 和 `MULTICA_QWENPAW_ARGS`。例如:
```dotenv
MULTICA_CLAUDE_PATH=/opt/bin/claude
MULTICA_CLAUDE_ARGS=--max-turns 40
```
-Muse Code 支持 `MULTICA_MUSE_PATH` 和 `MULTICA_MUSE_MODEL`;模型值应使用运行时模型列表中的 ID。
+### DeepSeek Harness 的 profile 安装
-Cursor 已验证的后台清理需要 Linux 6.9 及以上(进程组 pidfd)、macOS 内核对进程身份查询与 audit token 发信号的支持,或 Windows 上成功分配的嵌套 Job Object。在 macOS 上,每个进程都按内核校验的 PID version 发信号,不需要加入同一 session 的进程组;这些 macOS 接口是私有的,会在捕获时做探测。无法认领的后台启动会返回它原本的工具结果并回到普通的 idle watchdog,工具 watchdog 为 `0` 时同样如此。已经认领的工作在清理无法确认时会继续算作执行中。当工具 watchdog 设为 `0` 时则完全没有这个边界:已认领的后台工作只要还活着就一直让运行处于执行中,此时运行仅受 `MULTICA_AGENT_TIMEOUT` 约束,而它默认也是 `0`。
+`MULTICA_DSH_PROFILE_BUNDLE` 指定 `multica` profile 缺失时要安装的 bundle,多个候选用逗号分隔、按序尝试,每项可以是 npm 包名、目录或打包好的 tarball。该变量默认不设置。Multica 驱动的 `--stdio` 协议正是由这个 profile 提供,所以不设置时不会改动 DSH 的安装,守护进程会报告缺少 profile,不会注册一个不可用的运行时。
-运行正常结束时,被认领的 Cursor 后台进程同样会被停止,因此该次运行启动的后台服务不会有意地在收尾之后继续存活。macOS 可以通过保留的原始父进程身份识别后期产生的子进程,但无法证明中间进程在被观察到之前就已消失的那条链路。这类进程、离开被追踪进程组的工作,以及持续的归属或发信号错误,都可能留下残余的后台工作。未确认的清理会被记录下来,且永远不会换取一次「清理成功」的恢复窗口;不会仅凭数字 PID 或进程组就去杀掉未知进程。
+Multica 自己的桥接还没有发布到公共 npm registry,如何选取值见[安装智能体运行时](/install-agent-runtime)。这里填的东西会在没有二次确认的情况下装进每一台守护进程宿主的 DSH 家目录,请当作供应链决策来对待。
-优先级为命令行 flag → 环境变量 → `~/.multica/config.json` → 内置默认。watchdog 的行为见[守护进程与运行时](/daemon-runtimes)。
+这项安装被刻意限制了范围:每个守护进程生命周期最多执行一次,只在探测确认 profile 确实缺失时执行;失败时会把包管理器自身的输出记入日志,且只有重启守护进程后才会重试。探测超时、或返回本守护进程不支持的协议版本时,只做报告,绝不覆盖安装:守护进程不会覆盖一个明显是刻意装上去的 profile。排查时在守护进程日志中搜索 `DSH runtime profile`;要撤销安装,删除 `$DSH_HOME/profiles/multica`(默认 `~/.dsh/profiles/multica`)。
+
+`MULTICA_DSH_PLUGIN_PATH` 用于覆盖安装时解析 pnpm 的目录。`dsh plugin` 转发到的那个 pnpm 由 DSH Desktop 放在它私有的 runtime-commands 目录里,macOS 和 Windows 都是如此,守护进程会自动找到并加到 PATH 最前,较新版 Desktop 采用的带版本号目录结构也能找到。所以只有守护进程找不到的安装位置、或者你想让安装使用自己的 pnpm 时,才需要这个变量。一旦设置就完全取代自动查找:目录不存在时,安装会退回使用守护进程 `PATH` 上的 pnpm,不会用内置的那个。Linux 上没有 DSH Desktop,安装始终使用 `PATH`。
+
+### Cursor 后台进程清理
+
+Cursor 已验证的后台清理需要 Linux 6.9 及以上(进程组 pidfd)、macOS 内核对进程身份查询与 audit token 发信号的支持,或 Windows 上成功分配的嵌套 Job Object。在 macOS 上,每个进程都按内核校验的 PID version 发信号,不需要加入同一 session 的进程组;这些 macOS 接口是私有的,会在捕获时做探测。无法认领的后台启动会返回它原本的工具结果并回到普通的 idle watchdog,工具 watchdog 为 `0` 时同样如此。已经认领的工作在清理无法确认时会继续算作执行中。当工具 watchdog 设为 `0` 时则完全没有这个边界:已认领的后台工作只要还活着就一直让运行处于执行中,此时运行仅受 `MULTICA_AGENT_TIMEOUT` 约束,而它默认也是 `0`。
+
+运行正常结束时,被认领的 Cursor 后台进程同样会被停止,因此该次运行启动的后台服务不会有意留到收尾之后。macOS 可以通过保留的原始父进程身份识别后期产生的子进程,但无法证明中间进程在被观察到之前就已消失的那条链路。这类进程、离开被追踪进程组的工作,以及持续的归属或发信号错误,都可能留下残余的后台工作。未确认的清理会被记录下来,且永远不会换取一次"清理成功"的恢复窗口;不会仅凭数字 PID 或进程组就去杀掉未知进程。
### 守护进程配置的持久化
diff --git a/apps/docs/content/docs/github-integration.fr.mdx b/apps/docs/content/docs/github-integration.fr.mdx
index 094cbd2422..f623fd8e26 100644
--- a/apps/docs/content/docs/github-integration.fr.mdx
+++ b/apps/docs/content/docs/github-integration.fr.mdx
@@ -4,40 +4,53 @@ description: Associez les pull requests aux tâches Multica et suivez l'avanceme
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { PrLinkDemo } from "@/components/demos/pr-link-demo";
Une fois GitHub connecté, Multica associe automatiquement les pull requests à partir des identifiants de tâche. Le détail de la tâche affiche directement l'état de la PR, l'ampleur des modifications, les résultats de la CI et les conflits de fusion.
L'intégration GitHub se contente de lire les dépôts autorisés lors de l'installation ; elle ne pousse jamais de commits, de commentaires ni de status checks.
-Multica auto-hébergé peut aussi connecter en parallèle des instances Forgejo, Gitea ou GitLab auto-hébergées, avec la même association automatique des PR, le même passage à Terminé à la fusion et le même affichage de la CI. Le point d'entrée est **Paramètres → Code** ; voir [Fournisseurs Git auto-hébergés](/vcs-integration). Multica Cloud ne propose pas ce point d'entrée.
+Multica auto-hébergé peut aussi connecter en parallèle des instances Forgejo, Gitea ou GitLab auto-hébergées, avec la même association automatique des PR, le même changement de statut à la fusion et le même affichage de la CI. Le point d'entrée est **Paramètres → Code** ; voir [Fournisseurs Git auto-hébergés](/vcs-integration). Multica Cloud ne propose pas ce point d'entrée.
## Connecter GitHub
Un propriétaire ou un administrateur de l'espace de travail peut effectuer la connexion :
-1. Ouvrez **Paramètres → Code**.
-2. Sur la ligne **GitHub**, cliquez sur **Connecter GitHub**.
-3. Sur GitHub, choisissez le compte ou l'organisation, puis autorisez tous les dépôts ou une sélection d'entre eux.
-4. Revenez sur Multica une fois l'installation terminée.
+<Steps>
+<Step>
+Ouvrez **Paramètres → Code**.
+</Step>
+<Step>
+Sur la ligne **GitHub**, cliquez sur **Connecter GitHub**.
+</Step>
+<Step>
+Sur GitHub, choisissez le compte ou l'organisation, puis autorisez tous les dépôts ou une sélection d'entre eux.
+</Step>
+<Step>
+Revenez sur Multica une fois l'installation terminée.
+</Step>
+</Steps>
L'état de la connexion s'affiche sur la même page. Les membres ordinaires peuvent consulter cet état, mais ne peuvent ni connecter, ni déconnecter, ni modifier les interrupteurs.
<Callout type="info">
-La **connexion GitHub** détermine de quels dépôts Multica reçoit les événements de PR ; le réglage des **dépôts de code** (section **Dépôts** de la même page) détermine les dépôts que les agents peuvent choisir au démarrage des exécutions. Ils ont des rôles différents et se configurent séparément.
+La **connexion GitHub** détermine de quels dépôts Multica reçoit les événements de PR ; le réglage des **dépôts de code** détermine les dépôts que les agents peuvent choisir au démarrage des exécutions. Ils ont des rôles différents et se configurent séparément.
</Callout>
## Interrupteurs de fonctions
-La section **Pull requests et tâches** de **Paramètres → Code** comporte ces interrupteurs. **Mettre en pause les fonctionnalités GitHub**, dans le menu **⋯** de la ligne GitHub, désactive les trois interrupteurs ci-dessous sans déconnecter la GitHub App.
+La section **Pull requests et tâches** de **Paramètres → Code** comporte ces réglages. **Mettre en pause les fonctionnalités GitHub**, dans le menu **⋯** de la ligne GitHub, arrête les trois interrupteurs ci-dessous sans déconnecter la GitHub App.
-| Interrupteur | Effet |
+| Réglage | Effet |
|---|---|
| Barre latérale des pull requests | Affiche les pull requests associées dans le détail de la tâche. |
| Mention Co-authored-by | Ajoute `Co-authored-by: multica-agent <[email protected]>` aux commits créés par les agents. |
-| Lier automatiquement tâches et PR | Détecte les identifiants de tâche dans le nom de branche ou le titre d'une PR, ainsi que dans sa description lorsqu'ils suivent un mot-clé de clôture. |
-| **Carte de PR → CI et possibilité de fusion** | Pour chaque PR associée, Multica récupère un instantané authentifié via l'API GitHub et reporte son **statut CI** et sa **possibilité de fusion** sur la carte (voir **Ce qu'affiche la carte de PR** ci-dessous). |
-
+| Lier automatiquement tâches et PR | Associe une PR à la tâche dont l'identifiant figure dans son nom de branche ou son titre, ou suit un mot-clé de clôture dans sa description. |
+| Après la fusion des PR, passer la tâche à | Ce que fait la fusion de toutes les PR liées à une tâche : la passer à un statut (`Done` par défaut) ou ne rien changer. Voir [Quand des PR fusionnées changent le statut d'une tâche](#quand-une-pr-fusionnée-fait-passer-une-tâche-à-terminé). |
+| Carte de PR → CI et possibilité de fusion | Pour chaque PR associée, Multica récupère un instantané via l'API GitHub en tant qu'App et affiche son statut CI et sa possibilité de fusion sur la carte. Voir [Voir les PR d'une tâche](#voir-les-pr-dune-tâche). |
+**Après la fusion des PR, passer la tâche à** s'applique à tous les hébergeurs de code, y compris les [fournisseurs Git auto-hébergés](/vcs-integration).
## Associer une PR à une tâche
@@ -53,7 +66,7 @@ MUL-123 Fix the redirect after login
Multica ignore la casse et ne reconnaît que le préfixe de tâche de l'espace de travail courant. Une même PR peut être associée à plusieurs tâches.
-Si l'identifiant n'apparaît que dans la description de la PR, vous devez utiliser l'un des mots-clés de clôture de GitHub :
+Si l'identifiant n'apparaît que dans la description de la PR, placez-le juste après un mot-clé de clôture :
```text
Closes MUL-123
@@ -63,6 +76,8 @@ Resolves MUL-123
Une simple mention dans la description, comme `Related to MUL-123`, n'associe pas du tout la PR à cette tâche. Les messages de commit et les commentaires de PR ne déclenchent pas non plus l'association.
+Vous pouvez aussi associer une PR à la main : dans le bloc **Pull requests** de la tâche, cliquez sur **+** et collez l'URL de la PR. Pour retirer une PR d'une tâche, ouvrez le menu **⋯** de sa ligne et choisissez **Retirer de la tâche** ; Multica ne la réassociera plus à partir de son titre ou de sa branche.
+
## Voir les PR d'une tâche
Une fois associées, les PR apparaissent dans le bloc **Pull requests** du détail de la tâche. Chaque entrée affiche :
@@ -70,24 +85,31 @@ Une fois associées, les PR apparaissent dans le bloc **Pull requests** du déta
- le dépôt, le numéro, le titre et l'auteur ;
- l'état `Ouverte`, `Brouillon`, `Fusionnée` ou `Fermée` ;
- le nombre de lignes ajoutées et supprimées, et le nombre de fichiers modifiés ;
-- le statut CI : toutes les vérifications ont réussi (avec leur nombre), certaines sont en échec (avec le nom des vérifications concernées) ou certaines sont en cours ; les PR sans vérification configurée n'affichent pas cet élément — « aucune vérification » n'est jamais considéré comme une réussite ;
+- le statut CI : toutes les vérifications ont réussi (avec leur nombre), certaines sont en échec (avec le nom des vérifications concernées) ou certaines sont en cours ; les PR sans vérification configurée n'affichent pas cet élément, et « aucune vérification » n'est jamais considéré comme une réussite ;
- la possibilité de fusion : « Prête à fusionner » (uniquement lorsque GitHub signale un état de fusion propre), « Conflits de fusion », « Bloquée » ou « En retard sur la base ».
-Le statut CI et la possibilité de fusion proviennent d'instantanés que Multica récupère depuis l'API GitHub, et les deux sont indépendants ; les PR fusionnées ou fermées n'affichent plus ni l'un ni l'autre. Lorsque GitHub est momentanément indisponible, la carte conserve le dernier instantané et le signale comme périmé au lieu de se vider.
+Le statut CI et la possibilité de fusion proviennent d'instantanés que Multica récupère depuis l'API GitHub, et les deux sont indépendants ; les PR fusionnées ou fermées n'affichent plus ni l'un ni l'autre. Lorsque GitHub est momentanément indisponible, la carte conserve le dernier instantané et le signale comme périmé.
+
+Sous la liste, une ligne indique ce qui va se passer : par exemple *Passe à Terminé quand #19 est fusionnée*, ou quelle PR a été fermée sans fusion. Cette ligne n'apparaît pas lorsque l'espace de travail ne change pas le statut ou que la tâche a déjà le statut cible.
Cliquez sur une entrée pour ouvrir la PR sur GitHub. Désactiver la **Barre latérale des pull requests** masque seulement ce bloc ; cela ne déconnecte rien.
-## Quand une PR fusionnée fait passer une tâche à Terminé
+## Quand des PR fusionnées changent le statut d'une tâche [#quand-une-pr-fusionnée-fait-passer-une-tâche-à-terminé]
+
+Une PR fusionnée ne signifie pas forcément que la tâche est terminée : c'est donc l'espace de travail qui décide de l'effet d'une fusion, dans **Paramètres → Code → Après la fusion des PR, passer la tâche à**. Choisissez `Done` (la valeur par défaut des nouveaux espaces de travail), un autre statut de type démarré ou terminé (un statut personnalisé comme *En attente de recette* convient aussi), ou **Ne pas changer**. Les espaces de travail qui existaient avant ce réglage conservent leur comportement : si la fusion ne terminait pas toujours leurs tâches, ils démarrent sur **Ne pas changer**.
+
+Une tâche passe au statut choisi lorsque toutes les conditions suivantes sont réunies :
+
+1. toutes les PR associées sont `Merged` : une PR `Open` ou `Draft` fait attendre la tâche, tout comme une PR fermée sans fusion tant que vous ne l'avez pas retirée de la tâche ;
+2. la tâche n'est pas `done` ou `cancelled`, n'est pas en Triage, n'a pas déjà le statut cible et n'a pas été exclue pour elle seule (**Pull requests → ⋯ → Garder le statut à la fusion des PR**).
-Une PR fusionnée ne signifie pas forcément que la tâche est terminée. Multica ne fait passer une tâche à `Terminé` que lorsque toutes les conditions suivantes sont réunies :
+<PrLinkDemo />
-1. au moins une PR associée et fusionnée a utilisé un mot-clé de clôture immédiatement suivi de l'identifiant, comme `Closes MUL-123` (les formes avec des mots intercalés, comme `Closes login MUL-123`, ne comptent pas) ;
-2. la tâche n'a aucune autre PR associée encore `Ouverte` ou en `Brouillon` ;
-3. la tâche n'est pas actuellement `done` ou `cancelled`.
+La façon dont une PR a été associée ne change rien : le titre, le nom de branche et un `Closes MUL-123` dans la description ne font que l'associer. Quand une PR ne livre qu'une partie de la tâche, ou qu'une mise en production ou une vérification doit suivre la fusion, gardez le statut de cette tâche depuis son menu **Pull requests**.
-Ainsi, écrire `MUL-123` uniquement dans le nom de branche ou le titre établit l'association, mais ne déclenche pas à lui seul la clôture de la tâche. Une PR fermée sans fusion ne termine pas non plus la tâche.
+La vérification a lieu lorsqu'un événement de PR touche la tâche : une PR associée est fusionnée, une PR est associée, ou une association est retirée. Rouvrir une tâche ne la fait pas repasser au statut cible ; c'est la prochaine PR associée fusionnée qui le fait. Modifier le réglage ne change pas les tâches dont les PR ont été fusionnées auparavant.
-Le changement de statut est inscrit dans l'activité de la tâche comme une action système, et les membres abonnés à la tâche sont notifiés.
+Le changement de statut est inscrit dans la chronologie comme une action système qui nomme les PR, et les membres abonnés à la tâche sont notifiés.
## Plusieurs espaces de travail
@@ -95,6 +117,8 @@ Une même installation de la GitHub App peut être connectée à plusieurs espac
Par exemple, une PR qui référence à la fois `MUL-1` et `ENG-2` peut être associée dans deux espaces de travail aux préfixes différents. Les espaces de travail ne voient jamais les tâches les uns des autres.
+Si un même identifiant correspond à une tâche dans plusieurs des espaces de travail connectés (possible lorsqu'ils partagent un préfixe), Multica ne l'associe automatiquement dans aucun d'eux, afin que la fusion de la PR ne termine pas une tâche sans rapport. Associez la PR à la main dans le bon espace de travail.
+
## Déconnecter
Choisir **Déconnecter** dans le menu **⋯** de la ligne GitHub, sur **Paramètres → Code**, supprime seulement la relation entre l'espace de travail Multica courant et l'installation ; cela ne désinstalle pas l'App de GitHub à votre place. Les enregistrements de PR existants sont conservés, et les nouveaux événements cessent d'arriver dans cet espace de travail.
@@ -105,7 +129,10 @@ Pour révoquer l'autorisation d'accès aux dépôts côté GitHub, désinstallez
Multica Cloud n'a pas besoin de cette section. En auto-hébergement, vous devez d'abord créer votre propre GitHub App.
-### 1. Créer une GitHub App
+<Steps>
+<Step>
+
+### Créer une GitHub App [#1-créer-une-github-app]
Créez l'App dans **Developer settings → GitHub Apps** sur GitHub et renseignez :
@@ -137,7 +164,10 @@ Les instantanés de PR utilisent les API REST Pull requests, Checks et Commit st
Il s'agit du **Webhook secret**, et non du Client secret OAuth. Si les deux côtés n'ont pas le même secret de webhook, les livraisons GitHub renvoient `401 invalid signature`.
</Callout>
-### 2. Définir les variables d'environnement
+</Step>
+<Step>
+
+### Définir les variables d'environnement [#2-définir-les-variables-denvironnement]
Récupérez le slug dans l'URL publique de l'App. Par exemple, le slug de `https://github.com/apps/multica-acme` est `multica-acme`.
@@ -149,16 +179,19 @@ FRONTEND_ORIGIN=https://multica.example.com
Si `GITHUB_APP_SLUG` ou `GITHUB_WEBHOOK_SECRET` manque, le bouton de connexion est désactivé et le point de terminaison du webhook refuse de traiter les événements.
-Les deux variables suivantes sont nécessaires pour que la carte de PR affiche le statut CI et la possibilité de fusion — Multica s'en sert pour s'authentifier en tant qu'App et récupérer les instantanés :
+Pour que la carte de PR affiche le statut CI et la possibilité de fusion, définissez aussi les deux variables suivantes. Multica s'en sert pour s'authentifier en tant qu'App et récupérer les instantanés :
```dotenv
GITHUB_APP_ID=<the GitHub App's numeric ID>
GITHUB_APP_PRIVATE_KEY=<full PEM private key, keeping the BEGIN/END lines and newlines>
```
-Générez la clé privée dans **Private keys → Generate a private key** de la GitHub App. Sans ces variables, l'intégration fonctionne en mode dégradé : les PR sont toujours reflétées, les tâches sont toujours associées automatiquement et passent à Terminé à la fusion — la carte de PR n'affiche simplement ni CI ni état de fusion.
+Générez la clé privée dans **Private keys → Generate a private key** de la GitHub App. Sans ces deux variables, les PR sont toujours reflétées et les tâches toujours associées automatiquement et changées de statut à la fusion ; la carte de PR n'affiche simplement ni CI ni état de fusion.
-### 3. Mettre à jour la base de données et connecter
+</Step>
+<Step>
+
+### Mettre à jour la base de données et connecter [#3-mettre-à-jour-la-base-de-données-et-connecter]
Lors de la mise à niveau d'un déploiement existant, exécutez d'abord les migrations habituelles de la base de données :
@@ -168,17 +201,20 @@ make migrate-up
Redémarrez le serveur API, puis effectuez la connexion dans **Paramètres → Code**.
+</Step>
+</Steps>
+
## Dépannage
- **Bouton de connexion désactivé** : vérifiez que `GITHUB_APP_SLUG` et `GITHUB_WEBHOOK_SECRET` parviennent bien au processus de l'API.
- **Le webhook renvoie 401** : vérifiez que la GitHub App et l'API utilisent le même secret de webhook, puis relancez la livraison depuis **Recent Deliveries** sur GitHub.
-- **PR non associée** : vérifiez que le dépôt fait partie du périmètre autorisé de l'App, que l'association automatique est activée et que l'identifiant appartient à l'espace de travail courant.
-- **Identifiant dans la description, mais PR non associée** : utilisez plutôt `Closes MUL-123`, ou placez l'identifiant dans le nom de branche ou le titre de la PR.
+- **PR non associée** : vérifiez que le dépôt fait partie du périmètre autorisé de l'App, que l'association automatique est activée, que l'identifiant appartient à l'espace de travail courant et que personne n'a retiré la PR de la tâche.
+- **Identifiant dans la description, mais PR non associée** : placez-le juste après un mot-clé de clôture (`Closes MUL-123`), ou dans le nom de branche ou le titre de la PR, ou associez la PR à la main.
- **Aucun statut CI** : vérifiez que `GITHUB_APP_ID` et `GITHUB_APP_PRIVATE_KEY` sont configurées, et que l'App dispose des permissions Pull requests, Checks et Commit statuses en lecture seule, avec les événements correspondants souscrits. La permission Contents n'est pas nécessaire. Après l'ajout de permissions à une App déjà installée, le propriétaire de chaque installation doit les approuver sur GitHub pour qu'elles prennent effet.
-- **Tâche non terminée après la fusion de la PR** : vérifiez que la PR a utilisé un mot-clé de clôture, et si d'autres PR associées sont encore Ouvertes ou en Brouillon.
+- **Statut de la tâche inchangé après la fusion de la PR** : lisez la ligne sous la liste **Pull requests** de la tâche. Elle nomme les PR encore ouvertes ou fermées sans fusion, ou indique que la tâche garde son statut à la fusion des PR. Si aucune ligne n'apparaît, le réglage de l'espace de travail est **Ne pas changer**, ou la tâche a déjà le statut cible.
## Étapes suivantes
-- [Tâches](/issues) — le lien entre les transitions de statut et le passage à Terminé à la fusion.
+- [Tâches](/issues) — le lien entre les transitions de statut et les PR fusionnées.
- [Ressources de projet](/project-resources) — les dépôts utilisés par les agents lors des exécutions.
- [Variables d'environnement](/environment-variables) — la configuration complète de la GitHub App en auto-hébergement.
diff --git a/apps/docs/content/docs/github-integration.ja.mdx b/apps/docs/content/docs/github-integration.ja.mdx
index 015515f02d..7ef0f87b31 100644
--- a/apps/docs/content/docs/github-integration.ja.mdx
+++ b/apps/docs/content/docs/github-integration.ja.mdx
@@ -4,6 +4,8 @@ description: pull request を Multica のタスクに紐づけ、開発の進捗
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { PrLinkDemo } from "@/components/demos/pr-link-demo";
GitHub を接続すると、Multica はタスク番号を使って pull request を自動的に紐づけます。タスクの詳細画面から、PR の状態、変更規模、CI の結果、マージ競合を直接確認できます。
@@ -15,10 +17,20 @@ GitHub 連携が読み取るのは、インストール時に許可されたリ
ワークスペースの owner または admin が接続できます。
-1. **設定 → コード** を開きます。
-2. **GitHub** の行で **GitHub に接続**をクリックします。
-3. GitHub でアカウントまたは organization を選び、すべてのリポジトリか指定したリポジトリを許可します。
-4. インストールが完了したら Multica に戻ります。
+<Steps>
+<Step>
+**設定 → コード** を開きます。
+</Step>
+<Step>
+**GitHub** の行で **GitHub を接続**をクリックします。
+</Step>
+<Step>
+GitHub でアカウントまたは organization を選び、すべてのリポジトリか指定したリポジトリを許可します。
+</Step>
+<Step>
+インストールが完了したら Multica に戻ります。
+</Step>
+</Steps>
接続状態は同じページに表示されます。通常のメンバーは状態を確認できますが、接続、切断、スイッチの変更はできません。
@@ -35,9 +47,8 @@ GitHub 連携が読み取るのは、インストール時に許可されたリ
| PR サイドバー | 紐づいた pull request をタスクの詳細画面に表示します。 |
| Co-authored-by | エージェントが作成する commit に `Co-authored-by: multica-agent <[email protected]>` を追加します。 |
| PR の自動紐づけ | ブランチ名かタイトルにタスク番号を含む PR、または本文で closing keyword の直後にタスク番号を置いた PR を、そのタスクに紐づけます。 |
-| PR マージ後のタスクのステータス | タスクに紐づく PR がすべてマージされたとき、タスクをあるステータス(既定は `Done`)に変更するか、変更しないかを選びます。下記の **PR マージ後のステータス変更** を参照してください。 |
-| **PR カード → CI とマージ可否** | 紐づいた各 PR について、Multica は認証済みの GitHub API スナップショットを取得し、その **CI ステータス**と**マージ可否**をカードにミラーリングします(下記の **PR カードに表示される内容** を参照)。 |
-
+| PR マージ後のタスクのステータス | タスクに紐づく PR がすべてマージされたとき、タスクをあるステータス(既定は `Done`)に変更するか、変更しないかを選びます。[PR マージ後のステータス変更](#pr-マージ後のステータス変更)を参照してください。 |
+| PR カード → CI とマージ可否 | 紐づいた各 PR について、Multica は App として GitHub API からスナップショットを取得し、CI の状態とマージ可否をカードに表示します。[タスクから PR を確認する](#タスクから-pr-を確認する)を参照してください。 |
## PR をタスクに紐づける
@@ -75,7 +86,7 @@ Resolves MUL-123
- CI の状態: すべて成功した check の件数、失敗した check の名前、実行中の check の件数。check が 1 つも設定されていない PR ではこの項目を表示せず、「check なし」を成功として扱いません。
- マージ可能性: GitHub がマージ状態を clean と報告した場合だけマージ可能。ほかに競合、blocked、behind を表示します。
-CI の状態とマージ可能性は、Multica が GitHub API から取得したスナップショットで、互いに独立しています。マージ済みまたはクローズ済みの PR では、この 2 項目を表示しません。GitHub が一時的に利用できない場合、カードを空にせず、前回のスナップショットを古い情報として表示します。
+CI の状態とマージ可能性は、Multica が GitHub API から取得したスナップショットで、互いに独立しています。マージ済みまたはクローズ済みの PR では、この 2 項目を表示しません。GitHub が一時的に利用できない場合、カードは前回のスナップショットを残し、古い情報として表示します。
リストの下には、次に何が起きるかを 1 行で表示します。たとえば「#19 がマージされると 完了 に変更」や、マージされずにクローズされた PR です。ワークスペースが「変更しない」に設定されている場合や、タスクがすでに変更先のステータスにある場合は表示されません。
@@ -90,7 +101,9 @@ PR がマージされても、必ずしもタスクが完了するわけでは
1. タスクに紐づく PR がすべて `Merged` である。`Open` や `Draft` の PR が残っているとタスクは待機を続けます。マージされずにクローズされた PR も、タスクから外すまで同様です。
2. タスクが `done` または `cancelled` ではなく、Triage 中でもなく、すでに変更先のステータスでもなく、このタスクだけ変更をオフにしていない(**Pull requests → ⋯ → PR マージ後もステータスを変えない**)。
-PR の紐づけ方は結果に影響しません。タイトル、ブランチ名、本文の `Closes MUL-123` はどれも紐づけるだけで、マージ後の動作は決めません。PR がタスクの一部しか納品しない場合や、マージ後にリリースや確認が必要な場合は、そのタスクの **Pull requests** メニューからステータスを変えないように設定します。
+<PrLinkDemo />
+
+PR の紐づけ方は結果に影響しません。タイトル、ブランチ名、本文の `Closes MUL-123` はどれも紐づけるだけです。PR がタスクの一部しか納品しない場合や、マージ後にリリースや確認が必要な場合は、そのタスクの **Pull requests** メニューからステータスを変えないように設定します。
判定は PR イベントがタスクに関わったときだけ行います。紐づいた PR のマージ、紐づけの追加、紐づけの解除です。タスクを再度開いても元には戻らず、次に紐づいた PR がマージされたときに変更されます。設定を変えても、以前にマージされたタスクには影響しません。
@@ -114,7 +127,10 @@ GitHub 側のリポジトリアクセスを取り消す場合は、個人また
Multica Cloud ではこのセクションの作業は不要です。セルフホスト環境では、自分の GitHub App を先に作成します。
-### 1. GitHub App を作成する
+<Steps>
+<Step>
+
+### GitHub App を作成する [#1-github-app-を作成する]
GitHub の **Developer settings → GitHub Apps** で App を作成し、次の値を入力します。
@@ -146,7 +162,10 @@ PR スナップショットは Pull requests、Checks、Commit statuses の REST
必要なのは **Webhook secret** であり、OAuth Client secret ではありません。GitHub と Multica に入力した Webhook secret が異なる場合、GitHub delivery は `401 invalid signature` を返します。
</Callout>
-### 2. 環境変数を設定する
+</Step>
+<Step>
+
+### 環境変数を設定する [#2-環境変数を設定する]
App の公開 URL から slug を確認します。たとえば `https://github.com/apps/multica-acme` の slug は `multica-acme` です。
@@ -158,16 +177,19 @@ FRONTEND_ORIGIN=https://multica.example.com
`GITHUB_APP_SLUG` と `GITHUB_WEBHOOK_SECRET` のいずれかがない場合、接続ボタンは無効になり、webhook エンドポイントもイベントを拒否します。
-次の 2 つの変数は、PR カードに CI の状態とマージ可能性を表示するために必要です。Multica は App として認証し、スナップショットを取得します。
+PR カードに CI の状態とマージ可能性を表示するには、次の 2 つの変数も必要です。Multica はこれを使って App として認証し、スナップショットを取得します。
```dotenv
GITHUB_APP_ID=<numeric GitHub App ID>
GITHUB_APP_PRIVATE_KEY=<complete PEM private key, including BEGIN/END lines and newlines>
```
-秘密鍵は GitHub App の **Private keys → Generate a private key** から生成します。設定しない場合も連携は安全に縮退します。PR のミラー、タスクの自動紐づけ、マージ時のステータス変更は動作しますが、PR カードに CI やマージ状態は表示されません。
+秘密鍵は GitHub App の **Private keys → Generate a private key** から生成します。この 2 つを設定しなくても、PR のミラー、タスクの自動紐づけ、マージ時のステータス変更は動作します。PR カードに CI やマージ状態が表示されないだけです。
+
+</Step>
+<Step>
-### 3. データベースを更新して接続する
+### データベースを更新して接続する [#3-データベースを更新して接続する]
既存のデプロイをアップグレードする場合は、通常のデータベースマイグレーションを先に実行します。
@@ -177,6 +199,9 @@ make migrate-up
API サービスを再起動し、**設定 → コード** から接続します。
+</Step>
+</Steps>
+
## よくある問題
- **接続ボタンを使用できない**: `GITHUB_APP_SLUG` と `GITHUB_WEBHOOK_SECRET` が API プロセスに設定されていることを確認します。
diff --git a/apps/docs/content/docs/github-integration.ko.mdx b/apps/docs/content/docs/github-integration.ko.mdx
index ab5702d48f..6fcd668e00 100644
--- a/apps/docs/content/docs/github-integration.ko.mdx
+++ b/apps/docs/content/docs/github-integration.ko.mdx
@@ -4,6 +4,8 @@ description: pull request를 Multica 태스크에 연결하고 태스크에서
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { PrLinkDemo } from "@/components/demos/pr-link-demo";
GitHub를 연결하면 Multica가 태스크 번호를 기준으로 pull request를 자동 연결합니다. 태스크 상세 화면에서 PR 상태, 변경 규모, CI 결과, merge conflict를 바로 확인할 수 있습니다.
@@ -15,10 +17,20 @@ GitHub 연동은 설치할 때 승인한 저장소만 읽으며 코드, 댓글,
워크스페이스 owner 또는 admin이 연결할 수 있습니다.
-1. **설정 → 코드**를 엽니다.
-2. **GitHub** 행에서 **GitHub 연결**을 클릭합니다.
-3. GitHub에서 계정 또는 조직을 선택하고 모든 저장소나 지정한 저장소를 승인합니다.
-4. 설치가 끝나면 Multica로 돌아옵니다.
+<Steps>
+<Step>
+**설정 → 코드**를 엽니다.
+</Step>
+<Step>
+**GitHub** 행에서 **GitHub 연결**을 클릭합니다.
+</Step>
+<Step>
+GitHub에서 계정 또는 조직을 선택하고 모든 저장소나 지정한 저장소를 승인합니다.
+</Step>
+<Step>
+설치가 끝나면 Multica로 돌아옵니다.
+</Step>
+</Steps>
연결 상태는 같은 페이지에 표시됩니다. 일반 멤버는 상태를 볼 수 있지만 연결, 연결 해제, 스위치 변경은 할 수 없습니다.
@@ -35,9 +47,8 @@ GitHub 연동은 설치할 때 승인한 저장소만 읽으며 코드, 댓글,
| PR 사이드바 | 태스크 상세 화면에 연결된 pull request를 표시합니다. |
| Co-authored-by | 에이전트가 만든 commit에 `Co-authored-by: multica-agent <[email protected]>`를 추가합니다. |
| PR 자동 연결 | 브랜치 이름이나 제목에 태스크 번호가 있거나, 본문에서 closing keyword 바로 뒤에 태스크 번호를 쓴 PR을 해당 태스크에 연결합니다. |
-| PR 병합 후 태스크 상태 | 태스크에 연결된 PR이 모두 병합되면 태스크를 특정 상태(기본값 `Done`)로 바꿀지, 바꾸지 않을지 정합니다. 아래 **PR 병합 후 상태 변경**을 참고하세요. |
-| **PR 카드 → CI와 머지 가능 여부** | 연결된 각 PR에 대해 Multica는 인증된 GitHub API 스냅샷을 가져와, 그 **CI 상태**와 **머지 가능 여부**를 카드에 미러링합니다(아래 **PR 카드에 표시되는 것** 참조). |
-
+| PR 병합 후 태스크 상태 | 태스크에 연결된 PR이 모두 병합되면 태스크를 특정 상태(기본값 `Done`)로 바꿀지, 바꾸지 않을지 정합니다. [PR 병합 후 상태 변경](#pr-병합-후-상태-변경)을 참고하세요. |
+| PR 카드 → CI와 merge 가능 여부 | 연결된 각 PR에 대해 Multica는 App 신원으로 GitHub API에서 snapshot을 가져와 CI 상태와 merge 가능 여부를 카드에 표시합니다. [태스크에서 PR 확인](#태스크에서-pr-확인)을 참고하세요. |
## PR을 태스크에 연결
@@ -75,7 +86,7 @@ Resolves MUL-123
- CI 상태: 모두 통과(개수 표시), 일부 실패(실패한 check 이름 표시), 일부 진행 중. 설정된 check가 없는 PR에는 이 항목을 표시하지 않으며 "check 없음"을 통과로 간주하지 않습니다.
- merge 가능 여부: merge 가능(GitHub가 merge 상태를 clean으로 보고한 경우만), conflict 있음, blocked, behind
-CI 상태와 merge 가능 여부는 Multica가 GitHub API에서 가져온 snapshot이며 서로 독립적입니다. 이미 merge되거나 닫힌 PR에는 두 항목을 더 이상 표시하지 않습니다. GitHub를 일시적으로 사용할 수 없으면 카드가 비워지는 대신 마지막 snapshot을 유지하고 만료된 정보라고 표시합니다.
+CI 상태와 merge 가능 여부는 Multica가 GitHub API에서 가져온 snapshot이며 서로 독립적입니다. 이미 merge되거나 닫힌 PR에는 두 항목을 더 이상 표시하지 않습니다. GitHub를 일시적으로 사용할 수 없으면 카드는 마지막 snapshot을 유지하고 만료된 정보라고 표시합니다.
목록 아래에는 다음에 일어날 일을 한 줄로 보여 줍니다. 예를 들어 "#19 병합 시 완료(으)로 변경"이나 병합되지 않고 닫힌 PR입니다. 워크스페이스가 "변경하지 않음"으로 설정되어 있거나 태스크가 이미 대상 상태이면 표시되지 않습니다.
@@ -90,7 +101,9 @@ PR이 merge되었다고 해서 태스크가 반드시 끝난 것은 아닙니다
1. 태스크에 연결된 PR이 모두 `Merged` 상태입니다. `Open`이나 `Draft` PR이 남아 있으면 태스크는 계속 기다립니다. merge되지 않고 닫힌 PR도 태스크에서 제거할 때까지 마찬가지입니다.
2. 태스크가 `done` 또는 `cancelled`가 아니고, Triage 중이 아니며, 이미 대상 상태가 아니고, 이 태스크만 상태 변경을 끄지 않았습니다(**Pull requests → ⋯ → PR 병합 후에도 상태 유지**).
-PR을 어떻게 연결했는지는 결과에 영향을 주지 않습니다. 제목, 브랜치 이름, 본문의 `Closes MUL-123`은 모두 연결만 하고, merge 후 동작을 정하지 않습니다. PR이 태스크의 일부만 전달하거나 merge 후에 릴리스나 확인이 필요하면 그 태스크의 **Pull requests** 메뉴에서 상태를 유지하도록 설정하세요.
+<PrLinkDemo />
+
+PR을 어떻게 연결했는지는 결과에 영향을 주지 않습니다. 제목, 브랜치 이름, 본문의 `Closes MUL-123`은 모두 연결만 합니다. PR이 태스크의 일부만 전달하거나 merge 후에 릴리스나 확인이 필요하면 그 태스크의 **Pull requests** 메뉴에서 상태를 유지하도록 설정하세요.
판단은 PR 이벤트가 태스크에 닿을 때만 이루어집니다. 연결된 PR의 merge, 연결 추가, 연결 제거입니다. 태스크를 다시 열어도 원래대로 돌아가지 않으며, 다음에 연결된 PR이 merge될 때 바뀝니다. 설정을 바꿔도 이전에 merge된 태스크에는 영향을 주지 않습니다.
@@ -114,7 +127,10 @@ GitHub 측의 저장소 승인을 취소하려면 개인 또는 조직의 GitHub
Multica Cloud에서는 이 절차가 필요 없습니다. 자체 호스팅 환경에서는 자신의 GitHub App을 먼저 만들어야 합니다.
-### 1. GitHub App 만들기
+<Steps>
+<Step>
+
+### GitHub App 만들기 [#1-github-app-만들기]
GitHub의 **Developer settings → GitHub Apps**에서 App을 만들고 다음 값을 입력합니다.
@@ -146,7 +162,10 @@ PR snapshot은 Pull requests, Checks 및 Commit statuses REST API로 가져옵
여기에는 OAuth Client secret이 아니라 **Webhook secret**이 필요합니다. 양쪽에 입력한 Webhook secret이 다르면 GitHub delivery가 `401 invalid signature`를 반환합니다.
</Callout>
-### 2. 환경 변수 설정
+</Step>
+<Step>
+
+### 환경 변수 설정 [#2-환경-변수-설정]
App의 공개 주소에서 slug를 확인합니다. 예를 들어 `https://github.com/apps/multica-acme`의 slug는 `multica-acme`입니다.
@@ -158,16 +177,19 @@ FRONTEND_ORIGIN=https://multica.example.com
`GITHUB_APP_SLUG`와 `GITHUB_WEBHOOK_SECRET` 중 하나라도 없으면 연결 버튼이 비활성화되고 webhook endpoint도 이벤트 처리를 거부합니다.
-다음 두 변수는 PR 카드에서 CI 상태와 merge 가능 여부를 표시하기 위해 필요합니다. Multica는 이 값으로 App 신원을 인증하고 snapshot을 가져옵니다.
+PR 카드에 CI 상태와 merge 가능 여부를 표시하려면 다음 두 변수도 필요합니다. Multica는 이 값으로 App 신원을 인증하고 snapshot을 가져옵니다.
```dotenv
GITHUB_APP_ID=<GitHub App 숫자 ID>
GITHUB_APP_PRIVATE_KEY=<BEGIN/END 줄과 줄바꿈을 유지한 전체 PEM private key>
```
-Private key는 GitHub App의 **Private keys → Generate a private key**에서 생성합니다. 설정하지 않으면 연동 기능이 자연스럽게 축소됩니다. PR은 계속 미러링되고 태스크 자동 연결과 merge 시 상태 변경도 정상적으로 작동하지만 PR 카드에 CI 또는 merge 상태가 표시되지 않습니다.
+Private key는 GitHub App의 **Private keys → Generate a private key**에서 생성합니다. 이 두 변수가 없어도 PR은 계속 미러링되고 태스크 자동 연결과 merge 시 상태 변경도 작동합니다. PR 카드에 CI 또는 merge 상태가 표시되지 않을 뿐입니다.
+
+</Step>
+<Step>
-### 3. 데이터베이스 업데이트 및 연결
+### 데이터베이스 업데이트 및 연결 [#3-데이터베이스-업데이트-및-연결]
기존 배포를 업그레이드할 때는 먼저 일반 데이터베이스 migration을 실행합니다.
@@ -177,6 +199,9 @@ make migrate-up
API 서비스를 다시 시작한 뒤 **설정 → 코드**에서 연결을 완료합니다.
+</Step>
+</Steps>
+
## 자주 묻는 문제
- **연결 버튼을 사용할 수 없음**: `GITHUB_APP_SLUG`와 `GITHUB_WEBHOOK_SECRET`이 API 프로세스에 전달되었는지 확인합니다.
diff --git a/apps/docs/content/docs/github-integration.mdx b/apps/docs/content/docs/github-integration.mdx
index af4958d7c5..27672e8e50 100644
--- a/apps/docs/content/docs/github-integration.mdx
+++ b/apps/docs/content/docs/github-integration.mdx
@@ -4,6 +4,8 @@ description: Link pull requests to Multica issues and watch development progress
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { PrLinkDemo } from "@/components/demos/pr-link-demo";
Once GitHub is connected, Multica automatically links pull requests based on issue identifiers. Issue detail shows PR state, change size, CI results, and merge conflicts in place.
@@ -15,10 +17,20 @@ Self-hosted Multica can also connect self-hosted Forgejo, Gitea, or GitLab insta
A workspace owner or admin can complete the connection:
-1. Open **Settings → Code**.
-2. In the **GitHub** row, click **Connect GitHub**.
-3. In GitHub, pick the account or organization and authorize all repositories or a chosen subset.
-4. Return to Multica after the installation completes.
+<Steps>
+<Step>
+Open **Settings → Code**.
+</Step>
+<Step>
+In the **GitHub** row, click **Connect GitHub**.
+</Step>
+<Step>
+In GitHub, pick the account or organization and authorize all repositories or a chosen subset.
+</Step>
+<Step>
+Return to Multica after the installation completes.
+</Step>
+</Steps>
The connection status shows on the same page. Regular members can view the status but can't connect, disconnect, or change the switches.
@@ -36,9 +48,7 @@ The **Pull requests & issues** section of **Settings → Code** has these settin
| Co-authored-by | Adds `Co-authored-by: multica-agent <[email protected]>` to commits created by agents. |
| Auto-link PRs | Links a PR to the issue whose identifier is in its branch name or title, or follows a closing keyword in its body. |
| After PRs merge, move the issue to | What merging every PR linked to an issue does: move it to a status (`Done` by default) or leave it alone. See [When merged PRs move an issue](#when-merged-prs-move-an-issue). |
-| **PR card → CI & mergeability** | For each linked PR, Multica fetches an authenticated GitHub API snapshot and mirrors its **CI status** and **mergeability** onto the card (see **What the PR card shows** below). |
-
-
+| PR card → CI & mergeability | For each linked PR, Multica fetches a GitHub API snapshot as the App and shows its CI status and mergeability on the card. See [View PRs on an issue](#view-prs-on-an-issue). |
**After PRs merge, move the issue to** applies to every code host, including [self-hosted Git hosting](/vcs-integration).
@@ -75,27 +85,29 @@ Once linked, PRs appear in the **Pull requests** block of issue detail. Each ent
- repository, number, title, and author;
- `Open`, `Draft`, `Merged`, or `Closed` state;
- added and deleted lines and the number of changed files;
-- CI status: all passed (with a count), some failed (naming the failing checks), or some in progress; PRs with no checks configured don't show this item — "no checks" is never treated as passing;
+- CI status: all passed (with a count), some failed (naming the failing checks), or some in progress; PRs with no checks configured don't show this item, and "no checks" is never treated as passing;
- mergeability: mergeable (only when GitHub reports a clean merge state), conflicting, blocked, or behind.
-CI status and mergeability come from snapshots Multica pulls from the GitHub API, and the two are independent; merged or closed PRs no longer show either. When GitHub is temporarily unavailable, the card keeps the last snapshot and marks it stale instead of going blank.
+CI status and mergeability come from snapshots Multica pulls from the GitHub API, and the two are independent; merged or closed PRs no longer show either. When GitHub is temporarily unavailable, the card keeps the last snapshot and marks it stale.
-Under the list, one line says what happens next — for example *Moves to Done when #19 merges*, or which PR closed without merging. There's no line when the workspace leaves status alone or the issue already has the target status.
+Under the list, one line says what happens next: for example *Moves to Done when #19 merges*, or which PR closed without merging. There's no line when the workspace leaves status alone or the issue already has the target status.
Click an entry to open the PR on GitHub. Turning off the **PR sidebar** only hides this block; it doesn't disconnect anything.
## When merged PRs move an issue
-A merged PR doesn't necessarily mean the issue is finished, so the workspace decides what a merge does: **Settings → Code → After PRs merge, move the issue to**. Pick `Done` (the default for new workspaces), another started or done status — a custom one such as *Awaiting regression* works too — or **Don't change**. Workspaces that existed before this setting keep their behavior: if merging didn't always complete their issues, they start on **Don't change**.
+A merged PR doesn't necessarily mean the issue is finished, so the workspace decides what a merge does: **Settings → Code → After PRs merge, move the issue to**. Pick `Done` (the default for new workspaces), another started or done status (a custom one such as *Awaiting regression* works too), or **Don't change**. Workspaces that existed before this setting keep their behavior: if merging didn't always complete their issues, they start on **Don't change**.
An issue moves to the chosen status when all of the following hold:
-1. every linked PR is `Merged` — an `Open` or `Draft` PR keeps the issue waiting, and so does a PR closed without merging until you remove it from the issue;
+1. every linked PR is `Merged`: an `Open` or `Draft` PR keeps the issue waiting, and so does a PR closed without merging until you remove it from the issue;
2. the issue isn't `done` or `cancelled`, isn't in Triage, doesn't already have the target status, and hasn't been switched off for this issue (**Pull requests → ⋯ → Keep status when PRs merge**).
-How a PR was linked doesn't matter: the title, the branch name and a `Closes MUL-123` in the body all link it, and none of them changes what the merge does. When a PR delivers only part of the issue, or a release or a check has to follow the merge, keep that issue's status from its **Pull requests** menu.
+<PrLinkDemo />
-The check runs when a PR event touches the issue: a linked PR merges, a PR is linked, or a link is removed. Reopening an issue doesn't move it back — the next linked PR that merges does. Changing the setting doesn't move issues whose PRs merged earlier.
+How a PR was linked doesn't matter: the title, the branch name, and a `Closes MUL-123` in the body only link it. When a PR delivers only part of the issue, or a release or a check has to follow the merge, keep that issue's status from its **Pull requests** menu.
+
+The check runs when a PR event touches the issue: a linked PR merges, a PR is linked, or a link is removed. Reopening an issue doesn't move it back; the next linked PR that merges does. Changing the setting doesn't move issues whose PRs merged earlier.
The status change is written to the timeline as a system action naming the PRs, and members subscribed to the issue are notified.
@@ -117,7 +129,10 @@ To revoke repository authorization on the GitHub side, uninstall the App or adju
Multica Cloud doesn't need this section. Self-hosting requires creating your own GitHub App first.
-### 1. Create a GitHub App
+<Steps>
+<Step>
+
+### Create a GitHub App [#1-create-a-github-app]
Create the App under GitHub's **Developer settings → GitHub Apps** and fill in:
@@ -149,7 +164,10 @@ PR snapshots use the Pull requests, Checks, and Commit statuses REST APIs. Conte
This is the **Webhook secret**, not the OAuth Client secret. If the two sides have different webhook secrets, GitHub deliveries return `401 invalid signature`.
</Callout>
-### 2. Set environment variables
+</Step>
+<Step>
+
+### Set environment variables [#2-set-environment-variables]
Take the slug from the App's public URL. For example, the slug of `https://github.com/apps/multica-acme` is `multica-acme`.
@@ -161,16 +179,19 @@ FRONTEND_ORIGIN=https://multica.example.com
If either `GITHUB_APP_SLUG` or `GITHUB_WEBHOOK_SECRET` is missing, the connect button is disabled and the webhook endpoint refuses to process events.
-The next two variables are required for the PR card to show CI status and mergeability — Multica uses them to authenticate as the App and pull snapshots:
+For the PR card to show CI status and mergeability, also set the next two variables. Multica uses them to authenticate as the App and pull snapshots:
```dotenv
GITHUB_APP_ID=<the GitHub App's numeric ID>
GITHUB_APP_PRIVATE_KEY=<full PEM private key, keeping the BEGIN/END lines and newlines>
```
-Generate the private key under the GitHub App's **Private keys → Generate a private key**. Without them the integration degrades gracefully: PRs still mirror, issues still auto-link and move on merge — the PR card just shows no CI or merge state.
+Generate the private key under the GitHub App's **Private keys → Generate a private key**. Without these two variables, PRs still mirror and issues still auto-link and change status on merge; the PR card just shows no CI or merge state.
+
+</Step>
+<Step>
-### 3. Update the database and connect
+### Update the database and connect [#3-update-the-database-and-connect]
When upgrading an existing deployment, run the regular database migrations first:
@@ -180,6 +201,9 @@ make migrate-up
Restart the API server, then complete the connection in **Settings → Code**.
+</Step>
+</Steps>
+
## Troubleshooting
- **Connect button disabled**: check that `GITHUB_APP_SLUG` and `GITHUB_WEBHOOK_SECRET` reached the API process.
diff --git a/apps/docs/content/docs/github-integration.zh.mdx b/apps/docs/content/docs/github-integration.zh.mdx
index 6fc4a8cd67..1918d3c841 100644
--- a/apps/docs/content/docs/github-integration.zh.mdx
+++ b/apps/docs/content/docs/github-integration.zh.mdx
@@ -4,6 +4,8 @@ description: 把 pull request 与 Multica 任务关联,并在任务中查看
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { PrLinkDemo } from "@/components/demos/pr-link-demo";
连接 GitHub 后,Multica 根据任务编号自动关联 pull request。任务详情中可直接查看 PR 状态、改动规模、CI 结果和合并冲突。
@@ -15,10 +17,20 @@ GitHub 集成只读取安装时授权的仓库,不会提交代码、评论或
工作区 owner 或 admin 可以完成连接:
-1. 打开 **设置 → 代码**。
-2. 在 **GitHub** 一行点击 **连接 GitHub**。
-3. 在 GitHub 中选择账号或组织,并授权全部仓库或指定仓库。
-4. 安装完成后回到 Multica。
+<Steps>
+<Step>
+打开 **设置 → 代码**。
+</Step>
+<Step>
+在 **GitHub** 一行点击 **连接 GitHub**。
+</Step>
+<Step>
+在 GitHub 中选择账号或组织,并授权全部仓库或指定仓库。
+</Step>
+<Step>
+安装完成后回到 Multica。
+</Step>
+</Steps>
连接状态会显示在同一页面。普通成员可以查看状态,但不能连接、断开或修改开关。
@@ -35,10 +47,8 @@ GitHub 集成只读取安装时授权的仓库,不会提交代码、评论或
| PR 侧栏 | 在任务详情中显示关联的 pull request。 |
| Co-authored-by | 在智能体创建的 commit 中加入 `Co-authored-by: multica-agent <[email protected]>`。 |
| 自动关联 PR | 分支名或标题含任务编号、或正文中关闭语句后写了任务编号的 PR,会关联到对应任务。 |
-| PR 合并后,任务状态改为 | 任务关联的 PR 全部合并后,把任务改成某个状态(默认 `Done`),或者不改。见下方 **PR 合并后怎样改状态**。 |
-| **PR 卡片 → CI 与可合并性** | 对每个关联的 PR,Multica 从 GitHub API 拉取一份经鉴权的快照,把它的 **CI 状态**和**可合并性**镜像到卡片上(见下方 **PR 卡片展示什么**)。 |
-
-
+| PR 合并后,任务状态改为 | 任务关联的 PR 全部合并后,把任务改成某个状态(默认 `Done`),或者不改。见[PR 合并后怎样改状态](#pr-合并后怎样改状态)。 |
+| PR 卡片 → CI 与可合并性 | 对每个关联的 PR,Multica 以 App 身份从 GitHub API 拉取快照,把 CI 状态和可合并性显示在卡片上,见[在任务中查看 PR](#在任务中查看-pr)。 |
**PR 合并后,任务状态改为** 对所有代码托管平台生效,包括[自托管 Git 代码托管](/vcs-integration)。
@@ -78,22 +88,24 @@ Resolves MUL-123
- CI 状态:全部通过(带计数)、若干个失败(点名失败的 check),或若干个进行中;没有配置任何 check 的 PR 不显示这一项,"没有 check"不会被当成通过;
- 可合并性:可合并(仅当 GitHub 报告合并状态为 clean)、有冲突、blocked 或 behind。
-CI 状态和可合并性来自 Multica 从 GitHub API 拉取的快照,两者互相独立;已合并或已关闭的 PR 不再显示这两项。GitHub 暂时不可用时,卡片会保留上一次的快照并标记为过期,而不是清空。
+CI 状态和可合并性来自 Multica 从 GitHub API 拉取的快照,两者互相独立;已合并或已关闭的 PR 不再显示这两项。GitHub 暂时不可用时,卡片保留上一次的快照并标记为过期。
-列表下方有一行说明接下来会发生什么,例如「等待 #19 合并后改为 已完成」,或者哪个 PR 已关闭、未合并。工作区设置为不改变、或者任务已经是目标状态时,不显示这行说明。
+列表下方有一行说明接下来会发生什么,例如"等待 #19 合并后改为 已完成",或者哪个 PR 已关闭、未合并。工作区设置为不改变、或者任务已经是目标状态时,不显示这行说明。
点击记录可以打开 GitHub 上的 PR。关闭 **PR 侧栏** 只会隐藏这个区块,不会断开连接。
## PR 合并后怎样改状态
-PR 合并不一定代表任务已完成,所以由工作区决定合并后做什么:**设置 → 代码 → PR 合并后,任务状态改为**。可以选 `Done`(新工作区的默认值)、其他"已开始"或"已完成"类的状态(自定义状态也可以,例如「待回归」),或者**不改变**。这项设置出现之前就已存在的工作区保持原来的行为:如果以前的合并并不总会完成任务,初始值就是**不改变**。
+PR 合并不一定代表任务已完成,所以由工作区决定合并后做什么:**设置 → 代码 → PR 合并后,任务状态改为**。可以选 `Done`(新工作区的默认值)、其他"已开始"或"已完成"类的状态(也可以是自定义状态,例如"待回归"),或者**不改变**。这项设置出现之前就已存在的工作区保持原来的行为:如果以前的合并并不总会完成任务,初始值就是**不改变**。
以下条件同时成立时,任务会改为选定的状态:
1. 所有关联 PR 都是 `Merged`。仍为 `Open` 或 `Draft` 的 PR 会让任务继续等待;关闭但未合并的 PR 也一样,直到你把它从任务上移除;
2. 任务当前不是 `done` 或 `cancelled`,不在 Triage 中,还不是目标状态,也没有单独设置合并后不改状态(**Pull requests → ⋯ → 此任务合并后不改状态**)。
-PR 怎么关联的不影响结果:标题、分支名和正文里的 `Closes MUL-123` 都只负责关联,不决定合并后做什么。如果一个 PR 只交付了任务的一部分,或者合并后还要发布、验证,就在这个任务的 **Pull requests** 菜单里设置合并后不改状态。
+<PrLinkDemo />
+
+PR 是怎么关联上的,不影响结果:标题、分支名和正文里的 `Closes MUL-123` 只负责关联。如果一个 PR 只交付了任务的一部分,或者合并后还要发布、验证,就在这个任务的 **Pull requests** 菜单里设置合并后不改状态。
只有 PR 事件会触发判断:关联 PR 合并、新增关联或移除关联。重新打开任务后,它不会被改回去,下一个关联 PR 合并时才会。修改这项设置,也不会改动此前已合并的任务。
@@ -117,7 +129,10 @@ PR 怎么关联的不影响结果:标题、分支名和正文里的 `Closes MU
Multica Cloud 无需执行本节。自托管需要先创建自己的 GitHub App。
-### 1. 创建 GitHub App
+<Steps>
+<Step>
+
+### 创建 GitHub App [#1-创建-github-app]
在 GitHub 的 **Developer settings → GitHub Apps** 中创建 App,并填写:
@@ -149,7 +164,10 @@ PR 快照通过 Pull requests、Checks 和 Commit statuses 的 REST API 获取
这里需要的是 **Webhook secret**,不是 OAuth Client secret。两边填写的 Webhook secret 不一致时,GitHub delivery 会返回 `401 invalid signature`。
</Callout>
-### 2. 配置环境变量
+</Step>
+<Step>
+
+### 配置环境变量 [#2-配置环境变量]
从 App 的公开地址取得 slug。例如 `https://github.com/apps/multica-acme` 的 slug 是 `multica-acme`。
@@ -161,16 +179,19 @@ FRONTEND_ORIGIN=https://multica.example.com
`GITHUB_APP_SLUG` 和 `GITHUB_WEBHOOK_SECRET` 缺少任意一个时,连接按钮会被禁用,webhook 接口也会拒绝处理事件。
-下面两个变量是 PR 卡片显示 CI 状态与可合并性的必要条件——Multica 用它们以 App 身份鉴权并拉取快照:
+PR 卡片要显示 CI 状态与可合并性,还需要下面两个变量,Multica 用它们以 App 身份鉴权并拉取快照:
```dotenv
GITHUB_APP_ID=<GitHub App 的数字 ID>
GITHUB_APP_PRIVATE_KEY=<完整 PEM 私钥,保留 BEGIN/END 行和换行>
```
-私钥在 GitHub App 的 **Private keys → Generate a private key** 中生成。不配置时集成会平稳降级:PR 照常镜像,任务照常自动关联并在合并时改状态,只是 PR 卡片不显示 CI 或合并状态。
+私钥在 GitHub App 的 **Private keys → Generate a private key** 中生成。不配置这两个变量时,PR 照常镜像,任务照常自动关联并在合并时改状态,只是 PR 卡片不显示 CI 或合并状态。
+
+</Step>
+<Step>
-### 3. 更新数据库并连接
+### 更新数据库并连接 [#3-更新数据库并连接]
升级已有部署时,先执行常规数据库迁移:
@@ -180,6 +201,9 @@ make migrate-up
重启 API 服务,再到 **设置 → 代码** 完成连接。
+</Step>
+</Steps>
+
## 常见问题
- **连接按钮不可用**:检查 `GITHUB_APP_SLUG` 和 `GITHUB_WEBHOOK_SECRET` 是否已进入 API 进程。
diff --git a/apps/docs/content/docs/how-multica-works.fr.mdx b/apps/docs/content/docs/how-multica-works.fr.mdx
index baefe951ba..b01f2d3741 100644
--- a/apps/docs/content/docs/how-multica-works.fr.mdx
+++ b/apps/docs/content/docs/how-multica-works.fr.mdx
@@ -4,12 +4,13 @@ description: Multica consigne et coordonne le travail ; les ordinateurs connect
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RunPathDemo } from "@/components/demos/run-path-demo";
Lorsque vous assignez une tâche à un agent, Multica crée une exécution que prend en charge un runtime sur un ordinateur connecté. Le runtime appelle un outil de codage IA local et réécrit l'avancement et les résultats dans la tâche d'origine.
## Le parcours complet d'une exécution
-![Schéma d'une exécution : à gauche, la zone Multica consigne et planifie — une tâche déclenche la création d'une exécution ; à droite, dans la zone « votre ordinateur », le daemon prend en charge l'exécution, lance l'outil de codage IA, puis lit et écrit dans le répertoire de travail ; les messages d'avancement remontent en temps réel vers le journal d'exécution, et le daemon réécrit le résultat final dans la tâche](/images/docs/how-a-run-works.webp)
+<RunPathDemo />
1. **La tâche fournit le contexte.** La tâche contient la description du travail, la discussion et l'assigné. Lorsqu'elle est assignée à un agent, le système utilise les instructions, le modèle, les skills et la configuration de runtime de cet agent.
2. **Multica crée une exécution.** L'exécution entre dans la file d'attente ; si aucun runtime n'est en ligne, elle y patiente.
@@ -35,7 +36,7 @@ Une exception : tout ce qui est enregistré dans le `custom_env` d'un agent est
## Comment les agents sont déclenchés
-Les agents ne se mettent jamais au travail d'eux-mêmes — chaque exécution est déclenchée par une action explicite : assigner une tâche, @mentionner l'agent dans un commentaire, discuter directement avec lui, ou une automatisation. Pour savoir comment choisir entre ces quatre méthodes et connaître les règles qu'elles partagent, consultez [Mettre les agents au travail](/triggering-agents).
+Les agents ne se mettent jamais au travail d'eux-mêmes — chaque exécution est déclenchée par une action explicite : assigner une tâche, @mentionner l'agent dans un commentaire, discuter directement avec lui, ou une automatisation. Pour savoir laquelle choisir et connaître les règles communes, consultez [Mettre les agents au travail](/triggering-agents).
## Fin d'une exécution et fin d'une tâche
diff --git a/apps/docs/content/docs/how-multica-works.ja.mdx b/apps/docs/content/docs/how-multica-works.ja.mdx
index a9efc10bef..698bab5a9c 100644
--- a/apps/docs/content/docs/how-multica-works.ja.mdx
+++ b/apps/docs/content/docs/how-multica-works.ja.mdx
@@ -4,12 +4,13 @@ description: Multica が仕事を記録・調整し、実行は接続された
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RunPathDemo } from "@/components/demos/run-path-demo";
タスクをエージェントに割り当てると、Multica は実行を作成し、接続されたコンピュータ上のランタイムがそれを引き受けます。ランタイムはローカルの AI コーディングツールを呼び出し、進捗と結果を元のタスクに書き戻します。
## 1 回の実行の流れ
-![1 回の実行の流れ図:左側の Multica 領域が記録とスケジューリングを担当し、タスクが実行の作成をトリガーする。右側の「あなたのコンピュータ」領域では、デーモンが実行を引き受け、AI コーディングツールを起動し、作業ディレクトリを読み書きする。進捗メッセージはリアルタイムで実行ログに流れ、最終結果はデーモンがタスクに書き戻す](/images/docs/how-a-run-works.webp)
+<RunPathDemo />
1. **タスクがコンテキストを提供します。** タスクには作業の説明、議論、担当者が保存されます。エージェントに割り当てると、そのエージェントの指示、モデル、スキル、ランタイム設定が使われます。
2. **Multica が実行を作成します。** 実行はキューに入ります。オンラインのランタイムがなければ、キューで待機します。
@@ -35,7 +36,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## エージェントのトリガー方法
-エージェントが自分から作業を始めることはなく、すべての実行は明確なアクションでトリガーされます。タスクの割り当て、コメントでの @メンション、直接のチャット、またはオートパイロットです。4 つの方法の選び方と共通のルールは、[エージェントに仕事を任せる](/triggering-agents)を参照してください。
+エージェントが自分から作業を始めることはなく、すべての実行は明確なアクションでトリガーされます。タスクの割り当て、コメントでの @メンション、直接のチャット、またはオートパイロットです。選び方と共通のルールは、[エージェントに仕事を任せる](/triggering-agents)を参照してください。
## 実行の終了とタスクの完了
diff --git a/apps/docs/content/docs/how-multica-works.ko.mdx b/apps/docs/content/docs/how-multica-works.ko.mdx
index 398df19f05..1243760783 100644
--- a/apps/docs/content/docs/how-multica-works.ko.mdx
+++ b/apps/docs/content/docs/how-multica-works.ko.mdx
@@ -4,12 +4,13 @@ description: Multica는 작업을 기록하고 조율하며, 연결된 컴퓨터
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RunPathDemo } from "@/components/demos/run-path-demo";
태스크를 에이전트에게 할당하면 Multica가 실행을 만들고, 연결된 컴퓨터의 런타임이 이를 가져갑니다. 런타임은 로컬 AI 코딩 도구를 호출하고 진행 상황과 결과를 원래 태스크에 다시 기록합니다.
## 한 번의 실행이 이루어지는 전체 과정
-![한 번의 실행 흐름도: 왼쪽 Multica 영역은 기록과 스케줄링을 담당하며 태스크가 실행 생성을 트리거합니다. 오른쪽 '내 컴퓨터' 영역에서는 데몬이 실행을 가져와 AI 코딩 도구를 시작하고 작업 디렉터리를 읽고 씁니다. 진행 메시지는 실행 로그로 실시간 전송되고, 최종 결과는 데몬이 태스크에 다시 기록합니다.](/images/docs/how-a-run-works.webp)
+<RunPathDemo />
1. **태스크가 컨텍스트를 제공합니다.** 태스크에는 작업 설명, 논의, 담당자가 저장됩니다. 에이전트에게 할당되면 시스템은 해당 에이전트의 지시문, 모델, 스킬, 런타임 설정을 사용합니다.
2. **Multica가 실행을 만듭니다.** 실행이 큐에 들어갑니다. 온라인 런타임이 없으면 큐에서 기다립니다.
@@ -35,7 +36,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 에이전트를 트리거하는 방법
-에이전트는 스스로 작업을 시작하지 않습니다. 모든 실행은 태스크 할당, 댓글에서 에이전트 @멘션, 직접 대화, 자동화 중 하나의 명시적인 동작으로 트리거됩니다. 네 가지 방법의 선택 기준과 공통 규칙은 [에이전트가 작업을 시작하게 하기](/triggering-agents)를 참고하세요.
+에이전트는 스스로 작업을 시작하지 않습니다. 모든 실행은 태스크 할당, 댓글에서 에이전트 @멘션, 직접 채팅, 오토파일럿 중 하나의 명시적인 동작으로 트리거됩니다. 선택 기준과 공통 규칙은 [에이전트에게 작업 맡기기](/triggering-agents)를 참고하세요.
## 실행 종료와 태스크 완료
diff --git a/apps/docs/content/docs/how-multica-works.mdx b/apps/docs/content/docs/how-multica-works.mdx
index df64505ff1..196e5a289f 100644
--- a/apps/docs/content/docs/how-multica-works.mdx
+++ b/apps/docs/content/docs/how-multica-works.mdx
@@ -4,12 +4,13 @@ description: Multica records and coordinates the work; connected computers execu
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RunPathDemo } from "@/components/demos/run-path-demo";
When you assign an issue to an agent, Multica creates a run that a runtime on a connected computer claims. The runtime invokes a local AI coding tool and writes progress and results back to the original issue.
## The full path of a run
-![Diagram of a run: on the left, the Multica area records and schedules — an issue triggers the creation of a run; on the right, in the "your computer" area, the daemon claims the run, launches the AI coding tool, and reads and writes the working directory; progress messages stream back to the execution log in real time, and the daemon writes the final result back to the issue](/images/docs/how-a-run-works.webp)
+<RunPathDemo />
1. **The issue provides the context.** The issue holds the work description, the discussion, and the assignee. When it is assigned to an agent, the system uses that agent's instructions, model, skills, and runtime configuration.
2. **Multica creates a run.** The run enters the queue; if no runtime is online, it waits there.
@@ -35,11 +36,11 @@ One exception: anything saved to an agent's `custom_env` is stored on the Multic
## How agents are triggered
-Agents never start work on their own — every run is triggered by an explicit action: assigning an issue, @-mentioning the agent in a comment, chatting with it directly, or an Autopilot. For how to choose between the four and the rules they share, see [Put agents to work](/triggering-agents).
+Agents never start work on their own — every run is triggered by an explicit action: assigning an issue, @-mentioning the agent in a comment, chatting with it directly, or an Autopilot. For how to choose among them and the rules they share, see [Put agents to work](/triggering-agents).
## Run completion and issue completion
-When the execution log shows Completed, it only means that one run has ended. The issue can still take further discussion, added requirements, or another agent trigger. Whether the issue is done depends on the actual progress of the work and its status.
+When the execution log shows Completed, it only means that one run has ended. The issue can still take further discussion, added requirements, or another agent trigger; whether it is done depends on the actual progress of the work and its status.
## Next steps
diff --git a/apps/docs/content/docs/how-multica-works.zh.mdx b/apps/docs/content/docs/how-multica-works.zh.mdx
index 432593e03c..df4d960f7c 100644
--- a/apps/docs/content/docs/how-multica-works.zh.mdx
+++ b/apps/docs/content/docs/how-multica-works.zh.mdx
@@ -4,16 +4,17 @@ description: Multica 记录并协调工作,连接的电脑负责执行。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RunPathDemo } from "@/components/demos/run-path-demo";
-把一个任务分配给智能体后,Multica 会创建一次运行,由连接电脑上的运行时领取。运行时调用本地 AI 编程工具,并把进度和结果写回原来的任务。
+把一个任务分配给智能体后,Multica 会创建一条运行,由连接电脑上的运行时领取。运行时调用本地 AI 编程工具,并把进度和结果写回原来的任务。
-## 一次执行的完整链路
+## 一次运行的完整路径 [#一次执行的完整链路]
-![一次运行的流程图:左侧 Multica 区域负责记录与调度,任务触发创建运行;右侧"你的电脑"区域中,守护进程领取运行、启动 AI 编程工具、读写工作目录;过程消息实时流回执行日志,最终结果由守护进程写回任务](/images/docs/how-a-run-works.webp)
+<RunPathDemo />
1. **任务提供上下文。** 任务保存工作说明、讨论和负责人。分配给智能体后,系统会使用该智能体的指令、模型、skill 和运行时配置。
2. **Multica 创建运行。** 运行进入队列;没有在线运行时时,它会在队列中等待。
-3. **运行时领取本次执行。** 连接电脑上的在线运行时领取后,会调用智能体配置的 AI 编程工具。
+3. **运行时领取这次运行。** 连接电脑上的在线运行时领取后,调用智能体配置的 AI 编程工具。
4. **AI 编程工具在本地执行。** 工具读取工作目录、运行命令并生成结果。
5. **结果写回任务。** 进度、评论和结果显示在任务的时间线与执行日志中。
@@ -35,11 +36,11 @@ import { Callout } from "fumadocs-ui/components/callout";
## 智能体的触发方式
-智能体不会自己开始工作,每次执行都由一个明确的动作触发:分配任务、在评论中 @智能体、直接对话,或自动化。四种方式的选择和通用规则见[让智能体开始工作](/triggering-agents)。
+智能体不会自己开始工作,每次运行都由一个明确的动作触发:分配任务、在评论中 @智能体、直接对话,或自动化。怎么选、有哪些通用规则,见[让智能体开始工作](/triggering-agents)。
-## 执行结束与任务完成
+## 运行结束与任务完成 [#执行结束与任务完成]
-执行日志显示"已完成",只表示这一次执行已经结束。任务仍然可以继续讨论、补充要求或再次触发智能体。任务是否完成,以实际工作进展和它的状态为准。
+执行日志显示"已完成",只表示这一次运行已经结束。任务仍然可以继续讨论、补充要求或再次触发智能体;任务是否完成,看实际工作进展和它的状态。
## 接下来
diff --git a/apps/docs/content/docs/inbox.fr.mdx b/apps/docs/content/docs/inbox.fr.mdx
index 36eda93886..90b450015a 100644
--- a/apps/docs/content/docs/inbox.fr.mdx
+++ b/apps/docs/content/docs/inbox.fr.mdx
@@ -4,8 +4,9 @@ description: "Un seul endroit pour les assignations, mentions, commentaires et
---
import { Callout } from "fumadocs-ui/components/callout";
+import { InboxDemo } from "@/components/demos/inbox-demo";
-La boîte de réception rassemble l'activité de travail qui vous concerne. Ce n'est pas un journal d'activité complet — elle signale les changements qui demandent votre attention ; le contexte complet reste sur la tâche correspondante.
+La boîte de réception rassemble l'activité de travail qui vous concerne et signale les changements qui demandent votre attention. Ce n'est pas un journal d'activité complet : le contexte reste sur la tâche correspondante.
## Ce qui arrive dans la boîte de réception
@@ -16,7 +17,7 @@ Les notifications courantes incluent :
- quelqu'un vous @mentionne dans la description ou un commentaire d'une tâche ;
- une tâche ou un commentaire que vous avez créé reçoit une réaction ;
- une exécution d'agent échoue sur une tâche à laquelle vous êtes abonné ;
-- la création d'une tâche via un agent aboutit ou échoue ;
+- [la création d'une tâche via un agent](/issues#créer-avec-un-agent) aboutit ou échoue ;
- une automatisation à laquelle vous êtes abonné crée une nouvelle tâche, ou est mise en pause après des échecs consécutifs.
Vos propres actions ne vous notifient pas. Plusieurs notifications sur la même tâche sont fusionnées en une seule entrée ; ouvrez-la pour voir les changements récents de la tâche.
@@ -41,13 +42,17 @@ Lorsque le statut d'une sous-tâche change, les abonnés de la tâche parente so
La boîte de réception est réservée aux membres de l'espace de travail. Même lorsqu'un agent est l'assigné ou un abonné, il ne lit jamais les notifications de la boîte de réception.
-@mentionner un agent dans un commentaire, lui assigner une tâche ou déclencher une automatisation crée directement une exécution au lieu de laisser une notification à l'agent. `@all` ne notifie que les membres.
+@mentionner un agent dans un commentaire, lui assigner une tâche ou déclencher une automatisation crée directement une exécution ; aucune notification n'est laissée à l'agent. `@all` ne notifie que les membres.
## Traiter les notifications
-Sélectionner une notification la marque comme lue. Archivez-la quand vous avez terminé ; l'archivage ne modifie ni ne supprime la tâche correspondante. Dès qu'une tâche atteint un statut qui la rend à une personne — `in_review`, un statut personnalisé de la catégorie `started`, ou tout statut des catégories `done` ou `closed` — ses notifications d'échec d'exécution sont archivées automatiquement. `blocked` fait exception : il transmet la tâche, mais le travail reste bloqué, donc les échecs passés restent utiles à lire.
+Sélectionner une notification la marque comme lue. Archivez-la quand vous avez terminé ; l'archivage ne modifie ni ne supprime la tâche correspondante.
-Faites un clic droit sur une notification pour **Marquer comme lu** / **Marquer comme non lu** et **Archiver** (**Désarchiver** dans la vue Archivées). Marquer comme non lu est l'action « j'ai regardé, mais je n'en ai pas fini » : la notification redevient non lue et fait remonter le compteur de non-lus, et elle reste non lue même tant que vous la gardez ouverte — la rouvrir plus tard la marque comme lue, comme d'habitude. Les notifications archivées conservent leur état de lecture : en restaurer une la rétablit exactement comme vous l'aviez laissée.
+<InboxDemo />
+
+Dès qu'une tâche atteint un statut qui la rend à une personne, ses notifications « Exécution en échec » sont archivées automatiquement. Ces statuts sont `in_review`, les statuts personnalisés de la catégorie `started` et tous les statuts des catégories `done` et `closed`. `blocked` fait exception : il rend aussi la tâche, mais le travail reste bloqué, donc les échecs précédents méritent encore d'être lus.
+
+Faites un clic droit sur une notification pour **Marquer comme lu** / **Marquer comme non lu** et **Archiver** (**Désarchiver** dans la vue Archivées). Marquer comme non lu est l'action « j'ai regardé, mais je n'en ai pas fini » : la notification redevient non lue et fait remonter le compteur de non-lus, et elle reste non lue même tant que vous la gardez ouverte ; la rouvrir plus tard la marque comme lue, comme d'habitude. Les notifications archivées conservent leur état de lecture : en restaurer une la rétablit exactement comme vous l'aviez laissée.
Depuis le menu de la boîte de réception, vous pouvez aussi :
diff --git a/apps/docs/content/docs/inbox.ja.mdx b/apps/docs/content/docs/inbox.ja.mdx
index 3c5954ffaa..056dae5588 100644
--- a/apps/docs/content/docs/inbox.ja.mdx
+++ b/apps/docs/content/docs/inbox.ja.mdx
@@ -4,8 +4,9 @@ description: 割り当て、メンション、コメント、エージェント
---
import { Callout } from "fumadocs-ui/components/callout";
+import { InboxDemo } from "@/components/demos/inbox-demo";
-インボックスは、あなたに関係する作業の動きを集約します。完全なアクティビティログではなく、「注意が必要な変化がどこで起きたか」を知らせるためのものです。完全なコンテキストは対応するタスクに残ります。
+インボックスは、あなたに関係する作業の動きを集め、注意が必要な変化がどこで起きたかを知らせます。完全なアクティビティログではなく、経緯は対応するタスクに残っています。
## インボックスに届くもの
@@ -16,7 +17,7 @@ import { Callout } from "fumadocs-ui/components/callout";
- タスクの説明やコメントで誰かがあなたを @メンションした
- あなたが作成したタスクやコメントにリアクションが付いた
- 購読中のタスクでエージェントの実行が失敗した
-- エージェント経由のタスク作成が完了または失敗した
+- [エージェント経由のタスク作成](/issues#エージェントで作成)が完了または失敗した
- 購読中のオートパイロットが新しいタスクを作成した、または連続した失敗により一時停止された
自分の操作は自分には通知されません。同じタスクの複数の通知は 1 件にまとめられ、開くとそのタスクの最近の変化を確認できます。
@@ -41,11 +42,15 @@ import { Callout } from "fumadocs-ui/components/callout";
インボックスはワークスペースメンバー専用です。エージェントが担当者や購読者であっても、インボックスの通知を読むことはありません。
-コメントでの @メンション、タスクの割り当て、オートパイロットのトリガーは、エージェントに通知を残すのではなく、直接実行を作成します。`@all` もメンバーにのみ通知します。
+コメントでの @メンション、タスクの割り当て、オートパイロットのトリガーは、直接実行を作成し、エージェントに通知は残しません。`@all` もメンバーにのみ通知します。
## 通知の処理
-通知を選択すると既読になります。対応が済んだらアーカイブできます。アーカイブしても対応するタスクは変更・削除されません。タスクが人に引き継がれるステータス、つまり `in_review`、`started` カテゴリのカスタムステータス、または `done`・`closed` カテゴリのいずれかのステータスになると、その「実行失敗」の通知は自動的にアーカイブされます。`blocked` は例外です。人に引き継がれはしますが作業は止まったままなので、過去の失敗は読む価値が残ります。
+通知を選択すると既読になります。対応が済んだらアーカイブできます。アーカイブしても対応するタスクは変更・削除されません。
+
+<InboxDemo />
+
+タスクが人に引き継がれるステータスになると、その「実行失敗」の通知は自動的にアーカイブされます。対象は `in_review`、`started` カテゴリのカスタムステータス、`done`・`closed` カテゴリのすべてのステータスです。`blocked` は例外です。人に引き継がれはしますが作業は止まったままなので、それまでの失敗の記録はまだ確認する必要があります。
通知を右クリックすると、**既読にする** / **未読にする**と**アーカイブ**(「アーカイブ済み」ビューでは**アーカイブ解除**)を使えます。未読にするは「目は通したが、まだ終わっていない」ための操作です。通知は未読に戻り、未読数も戻ります。開いたままでも未読のままで、あとでもう一度開けば通常どおり既読になります。アーカイブ済みの通知は既読状態を保持するため、復元すると元のまま戻ります。
diff --git a/apps/docs/content/docs/inbox.ko.mdx b/apps/docs/content/docs/inbox.ko.mdx
index 7a5180ace5..f9831e3208 100644
--- a/apps/docs/content/docs/inbox.ko.mdx
+++ b/apps/docs/content/docs/inbox.ko.mdx
@@ -4,8 +4,9 @@ description: 할당, 멘션, 댓글, 에이전트 실패처럼 확인이 필요
---
import { Callout } from "fumadocs-ui/components/callout";
+import { InboxDemo } from "@/components/demos/inbox-demo";
-인박스는 나와 관련된 작업 활동을 모아 보여 줍니다. 전체 활동 로그가 아니라 "확인해야 할 변화가 어디에서 일어났는지" 알려 주는 곳입니다. 전체 컨텍스트는 여전히 해당 태스크에 저장됩니다.
+인박스는 나와 관련된 작업 활동을 모아 확인해야 할 변화가 어디에서 일어났는지 알려 줍니다. 전체 활동 로그는 아니며, 자세한 경위는 해당 태스크에 남아 있습니다.
## 인박스에 들어오는 내용
@@ -15,8 +16,8 @@ import { Callout } from "fumadocs-ui/components/callout";
- 구독한 태스크에 새 댓글이 달리거나 담당자, 상태, 우선순위, 날짜가 변경됨
- 누군가 태스크 설명이나 댓글에서 나를 @멘션함
- 내가 만든 태스크나 댓글에 이모지 반응이 추가됨
-- 구독한 태스크에서 에이전트 실행이 실패함
-- 에이전트를 통한 태스크 생성 작업이 완료되거나 실패함
+- 구독한 태스크에서 에이전트의 실행이 실패함
+- [에이전트를 통한 태스크 생성](/issues#에이전트로-만들기) 작업이 완료되거나 실패함
- 구독한 자동화가 새 태스크를 만들거나 연속 실패로 일시 중지됨
자신이 수행한 작업은 자신에게 알리지 않습니다. 같은 태스크의 여러 알림은 하나로 합쳐지며, 열면 해당 태스크의 최근 변경 사항을 확인할 수 있습니다.
@@ -41,11 +42,15 @@ import { Callout } from "fumadocs-ui/components/callout";
인박스는 워크스페이스 멤버만 사용합니다. 에이전트가 담당자나 구독자여도 인박스 알림을 읽지 않습니다.
-댓글에서 에이전트를 @멘션하거나 태스크를 에이전트에게 할당하거나 자동화를 트리거하면 에이전트에게 알림을 남기는 대신 실행이 직접 생성됩니다. `@all`도 멤버에게만 알립니다.
+댓글에서 에이전트를 @멘션하거나 태스크를 에이전트에게 할당하거나 자동화를 트리거하면 실행이 직접 생성되며, 에이전트에게 알림을 남기지 않습니다. `@all`도 멤버에게만 알립니다.
## 알림 처리
-알림을 선택하면 읽음으로 표시됩니다. 처리한 뒤 보관할 수 있으며, 보관해도 해당 태스크가 변경되거나 삭제되지 않습니다. 태스크가 사람에게 넘기는 상태, 즉 `in_review`나 `started` 카테고리의 사용자 지정 상태, 또는 `done`·`closed` 카테고리의 상태가 되면 그 태스크의 "실행 실패" 알림은 자동으로 보관됩니다. `blocked`는 예외입니다. 사람에게 넘기기는 하지만 작업이 여전히 막혀 있으므로 지난 실패 기록은 계속 읽을 가치가 있습니다.
+알림을 선택하면 읽음으로 표시됩니다. 처리한 뒤 보관할 수 있으며, 보관해도 해당 태스크가 변경되거나 삭제되지 않습니다.
+
+<InboxDemo />
+
+태스크가 사람에게 넘어가는 상태가 되면 그 태스크의 "실행 실패함" 알림은 자동으로 보관됩니다. 해당 상태는 `in_review`, `started` 카테고리의 사용자 지정 상태, `done`·`closed` 카테고리의 모든 상태입니다. `blocked`는 예외입니다. 사람에게 넘어가기는 하지만 작업이 여전히 막혀 있으므로 지난 실패 기록을 계속 확인해야 합니다.
알림을 오른쪽 클릭하면 **읽음으로 표시** / **읽지 않음으로 표시**와 **보관**("보관됨" 뷰에서는 **보관 해제**)을 쓸 수 있습니다. 읽지 않음으로 표시는 "보긴 했지만 아직 끝내지 않았다"는 뜻입니다. 알림이 다시 읽지 않음이 되고 읽지 않은 개수도 다시 올라가며, 열어둔 상태에서도 읽지 않음으로 유지됩니다. 나중에 다시 열면 평소대로 읽음으로 바뀝니다. 보관된 알림은 읽음 상태를 유지하므로 복원하면 그대로 돌아옵니다.
diff --git a/apps/docs/content/docs/inbox.mdx b/apps/docs/content/docs/inbox.mdx
index 4558be36ca..7bdacd23b5 100644
--- a/apps/docs/content/docs/inbox.mdx
+++ b/apps/docs/content/docs/inbox.mdx
@@ -4,8 +4,9 @@ description: One place for assignments, mentions, comments, and agent failures t
---
import { Callout } from "fumadocs-ui/components/callout";
+import { InboxDemo } from "@/components/demos/inbox-demo";
-The inbox collects the work activity that concerns you. It's not a full activity log — it flags where something changed that needs your attention; the full context stays on the corresponding issue.
+The inbox collects the work activity that concerns you and flags where something changed that needs your attention. It isn't a full activity log; the full story stays on the corresponding issue.
## What lands in the inbox
@@ -16,7 +17,7 @@ Common notifications include:
- someone @-mentions you in an issue description or comment;
- an issue or comment you created gets a reaction;
- an agent run fails on an issue you subscribe to;
-- creating an issue through an agent completes or fails;
+- [creating an issue through an agent](/issues#create-with-agent) completes or fails;
- an autopilot you subscribe to creates a new issue, or is paused after consecutive failures.
Your own actions don't notify you. Multiple notifications on the same issue merge into one entry; open it to see the issue's recent changes.
@@ -41,13 +42,17 @@ When a sub-issue's status changes, subscribers of the parent issue are notified
The inbox is only for workspace members. Even when an agent is the assignee or a subscriber, it never reads inbox notifications.
-@-mentioning an agent in a comment, assigning an issue to it, or triggering an autopilot creates a run directly instead of leaving the agent a notification. `@all` notifies members only.
+@-mentioning an agent in a comment, assigning an issue to it, or triggering an autopilot creates a run directly; no notification is left for the agent. `@all` notifies members only.
## Handle notifications
-Selecting a notification marks it as read. Archive it when you're done; archiving doesn't modify or delete the corresponding issue. Once an issue reaches a status that hands it back to a person — `in_review`, a custom status in the `started` category, or any status in the `done` or `closed` category — its run-failure notifications archive automatically. `blocked` is the exception: it hands the issue over, but the work is still stuck, so past failures stay worth reading.
+Selecting a notification marks it as read. Archive it when you're done; archiving doesn't modify or delete the corresponding issue.
-Right-click a notification for **Mark as read** / **Mark as unread** and **Archive** (**Unarchive** in the Archived view). Mark as unread is the "I looked, but I'm not done with this" action: the notification goes back to unread and raises the unread count again, and it stays unread even while you keep it open — opening it again later marks it read as usual. Archived notifications keep their read state, so restoring one brings it back exactly as you left it.
+<InboxDemo />
+
+Once an issue reaches a status that hands it back to a person, its **Run failed** notifications archive automatically. Those statuses are `in_review`, custom statuses in the `started` category, and any status in the `done` or `closed` category. `blocked` is the exception: it hands the issue over too, but the work is still stuck, so the earlier failures are still worth reading.
+
+Right-click a notification for **Mark as read** / **Mark as unread** and **Archive** (**Unarchive** in the Archived view). Mark as unread is the "I looked, but I'm not done with this" action: the notification goes back to unread and raises the unread count again, and it stays unread even while you keep it open; opening it again later marks it read as usual. Archived notifications keep their read state, so restoring one brings it back exactly as you left it.
From the inbox menu you can also:
diff --git a/apps/docs/content/docs/inbox.zh.mdx b/apps/docs/content/docs/inbox.zh.mdx
index 6bfe2027c9..643d140b07 100644
--- a/apps/docs/content/docs/inbox.zh.mdx
+++ b/apps/docs/content/docs/inbox.zh.mdx
@@ -4,8 +4,9 @@ description: 集中查看分配、提及、评论和智能体失败等需要跟
---
import { Callout } from "fumadocs-ui/components/callout";
+import { InboxDemo } from "@/components/demos/inbox-demo";
-收件箱汇总与你有关的工作动态。它不是完整的活动日志,而是提醒你"哪里发生了需要关注的变化";完整上下文仍然保存在对应的任务中。
+收件箱汇总与你有关的工作动态,提醒你哪里出现了需要关注的变化。它不是完整的活动日志,前因后果仍在对应的任务里。
## 收件箱的内容
@@ -15,8 +16,8 @@ import { Callout } from "fumadocs-ui/components/callout";
- 你订阅的任务出现新评论,或负责人、状态、优先级和日期发生变化;
- 有人在任务描述或评论中 @你;
- 你创建的任务或评论收到表情回应;
-- 你订阅的任务中,智能体执行失败;
-- 通过智能体创建任务的操作完成或失败;
+- 你订阅的任务中,智能体运行失败;
+- [通过智能体创建任务](/issues#通过智能体创建)的操作完成或失败;
- 你订阅的自动化创建了新任务,或自动化因连续失败被暂停。
自己的操作不会通知自己。同一任务的多条通知会合并成一项,打开后可查看这条任务最近的变化。
@@ -41,13 +42,17 @@ import { Callout } from "fumadocs-ui/components/callout";
收件箱只面向工作区成员。即使智能体是负责人或订阅者,它也不会读取收件箱通知。
-在评论中 @智能体、把任务分配给智能体或触发自动化,都会直接创建一次执行,而不是给智能体留一条通知。`@all` 也只通知成员。
+在评论中 @智能体、把任务分配给智能体或触发自动化,都会直接创建一次运行,不会给智能体留通知。`@all` 也只通知成员。
## 处理通知
-选择一条通知会把它标为已读。处理完后可以归档;归档不会修改或删除对应的任务。任务进入把它交回给人的状态后——`in_review`、`started` 分类下的自定义状态,或者 `done`、`closed` 分类下的任一状态——它的"执行失败"通知会自动归档。`blocked` 是例外:它同样交回给人,但工作还卡着,之前的失败记录仍然值得看。
+选择一条通知会把它标为已读。处理完后可以归档,归档不会修改或删除对应的任务。
-右键点击一条通知,可以使用**标为已读** / **标为未读**和**归档**(在"已归档"视图中是**取消归档**)。标为未读表达的是"我看过了,但还没处理完":该通知重新变为未读,未读数也会回升;即使它还开着也会保持未读——之后再打开一次才会照常标为已读。已归档的通知会保留已读状态,因此恢复时会原样回来。
+<InboxDemo />
+
+任务进入交回给人的状态后,它的"运行失败"通知会自动归档。这类状态包括 `in_review`、`started` 分类下的自定义状态,以及 `done`、`closed` 分类下的任一状态。`blocked` 例外:它同样交回给人,但工作还卡着,之前的失败记录还要看。
+
+右键点击一条通知,可以使用**标为已读** / **标为未读**和**归档**(在"已归档"视图中是**取消归档**)。标为未读表达的是"我看过了,但还没处理完":该通知重新变为未读,未读数也会回升;即使它还开着也保持未读,之后再打开一次才会照常标为已读。已归档的通知会保留已读状态,因此恢复时会原样回来。
收件箱菜单还可以:
diff --git a/apps/docs/content/docs/index.fr.mdx b/apps/docs/content/docs/index.fr.mdx
index c96fd16bf0..ff72c3b47c 100644
--- a/apps/docs/content/docs/index.fr.mdx
+++ b/apps/docs/content/docs/index.fr.mdx
@@ -5,9 +5,9 @@ title: Bienvenue
## Ce que Multica permet de faire
- **Confier le travail aux agents** — assignez une tâche comme vous le feriez à un coéquipier ; l'agent publie son avancement et livre les résultats.
-- **Partager tout le contexte** — discussions, historiques et livrables restent dans l'espace de travail, visibles à tout moment par toute l'équipe.
-- **Laisser le travail avancer tout seul** — configurez des exécutions planifiées et laissez plusieurs agents collaborer automatiquement.
-- **Capitaliser le savoir-faire de l'équipe** — enregistrez ce qui fonctionne sous forme de skill, réutilisable par tous les agents.
+- **Partager le contexte** — les discussions, historiques et livrables de chaque tâche restent dans l'espace de travail, visibles par toute l'équipe.
+- **Laisser le travail avancer tout seul** — les automatisations lancent des agents à intervalles réguliers, et plusieurs agents peuvent collaborer au sein d'un squad.
+- **Capitaliser le savoir-faire de l'équipe** — enregistrez ce qui fonctionne sous forme de skill et rattachez-le à plusieurs agents.
![Tableau de l'espace de travail : membres humains et plusieurs agents font avancer le travail ensemble](/images/docs/workspace-overview.webp)
@@ -19,9 +19,9 @@ title: Bienvenue
## Pages les plus consultées
-- [Mettre les agents au travail](/triggering-agents) — les quatre façons de déclencher un agent.
-- [Créer et configurer des agents](/agents-create) — créez votre premier agent à partir de zéro ou avec l'IA.
-- [Installer des outils de codage IA](/install-agent-runtime) — donnez à votre ordinateur la capacité d'exécuter.
+- [Mettre les agents au travail](/triggering-agents) — choisissez comment lancer un agent selon ce que vous voulez faire.
+- [Créer et configurer un agent](/agents-create) — choisissez un runtime, configurez et créez votre premier agent.
+- [Installer des outils de codage IA](/install-agent-runtime) — les agents s'en servent pour exécuter le travail sur votre ordinateur.
- [Exécutions](/tasks) — consultez le statut, les relances et les journaux de chaque exécution.
- [Dépannage](/troubleshooting) — un agent ne bouge pas ? Commencez ici.
diff --git a/apps/docs/content/docs/index.ja.mdx b/apps/docs/content/docs/index.ja.mdx
index f625e947fa..c51f7ba977 100644
--- a/apps/docs/content/docs/index.ja.mdx
+++ b/apps/docs/content/docs/index.ja.mdx
@@ -5,9 +5,9 @@ title: ようこそ
## Multica でできること
- **仕事をエージェントに任せる**:同僚に割り当てるようにタスクを割り当てると、エージェントが進捗を更新し、成果を届けます。
-- **コンテキストをすべて共有する**:議論、記録、成果物はワークスペースに残り、チームのメンバーがいつでも参照できます。
-- **仕事を自動で回す**:スケジュール実行を設定し、複数のエージェントに自動で協働させられます。
-- **チームのノウハウを蓄積する**:有効だったやり方をスキルとして保存し、すべてのエージェントで再利用できます。
+- **コンテキストを共有する**:タスクでの議論、記録、成果物はワークスペースに残り、チームのメンバー全員が見られます。
+- **仕事を自動で回す**:オートパイロットでエージェントを定期的に起動できます。複数のエージェントをスクワッドにまとめて協働させることもできます。
+- **チームのノウハウを蓄積する**:有効だったやり方をスキルとして保存し、複数のエージェントに追加して再利用できます。
![ワークスペースのボード:人間のメンバーと複数のエージェントが一緒に仕事を進めている](/images/docs/workspace-overview.webp)
@@ -19,9 +19,9 @@ title: ようこそ
## よく開かれるページ
-- [エージェントを動かす](/triggering-agents) — エージェントをトリガーする 4 つの方法。
-- [エージェントの作成と設定](/agents-create) — 空白から、または AI で最初のエージェントを作成します。
-- [AI コーディングツールのインストール](/install-agent-runtime) — コンピュータに実行の能力を持たせます。
+- [エージェントに仕事を任せる](/triggering-agents) — やりたいことに合わせて起動方法を選びます。
+- [エージェントの作成と構成](/agents-create) — ランタイムを選んで設定し、最初のエージェントを作成します。
+- [AI コーディングツールのインストール](/install-agent-runtime) — エージェントはこれらのツールを使ってコンピュータ上で実行します。
- [実行](/tasks) — 実行ごとのステータス、リトライ、ログの読み方。
- [トラブルシューティング](/troubleshooting) — エージェントが動かないときは、ここから切り分けます。
diff --git a/apps/docs/content/docs/index.ko.mdx b/apps/docs/content/docs/index.ko.mdx
index b75d3fcbb7..186aa3c082 100644
--- a/apps/docs/content/docs/index.ko.mdx
+++ b/apps/docs/content/docs/index.ko.mdx
@@ -5,9 +5,9 @@ title: 환영합니다
## Multica로 할 수 있는 일
- **에이전트에게 작업 맡기기**: 동료에게 맡기듯 태스크를 할당하면 에이전트가 진행 상황을 업데이트하고 결과를 제출합니다.
-- **모든 컨텍스트 공유하기**: 논의, 기록, 결과물이 모두 워크스페이스에 남아 언제든 팀 멤버가 확인할 수 있습니다.
-- **작업을 자동으로 운영하기**: 예약 작업을 설정해 여러 에이전트가 자동으로 협업하게 할 수 있습니다.
-- **팀의 경험 축적하기**: 효과가 검증된 방법을 스킬로 저장해 모든 에이전트가 재사용할 수 있습니다.
+- **컨텍스트 공유하기**: 태스크의 논의, 기록, 결과물이 워크스페이스에 남아 팀 멤버 모두가 볼 수 있습니다.
+- **작업을 자동으로 운영하기**: 오토파일럿으로 에이전트를 정기적으로 시작하고, 여러 에이전트를 스쿼드로 묶어 협업하게 할 수 있습니다.
+- **팀의 경험 축적하기**: 효과가 검증된 방법을 스킬로 저장하고 여러 에이전트에 연결해 재사용합니다.
![워크스페이스 보드: 사람 멤버와 여러 에이전트가 함께 작업을 진행하는 모습](/images/docs/workspace-overview.webp)
@@ -19,9 +19,9 @@ title: 환영합니다
## 자주 찾는 페이지
-- [에이전트가 작업을 시작하게 하기](/triggering-agents) — 에이전트를 트리거하는 네 가지 방법입니다.
-- [에이전트 생성 및 설정](/agents-create) — 빈 상태에서 시작하거나 AI를 이용해 첫 에이전트를 만듭니다.
-- [AI 코딩 도구 설치](/install-agent-runtime) — 컴퓨터에서 작업을 실행할 수 있게 준비합니다.
+- [에이전트에게 작업 맡기기](/triggering-agents) — 하려는 일에 맞는 시작 방법을 고릅니다.
+- [에이전트 생성 및 설정](/agents-create) — 런타임을 선택하고 구성해 첫 에이전트를 만듭니다.
+- [AI 코딩 도구 설치](/install-agent-runtime) — 에이전트는 이 도구로 컴퓨터에서 작업을 실행합니다.
- [실행](/tasks) — 각 실행의 상태, 재시도, 로그를 이해합니다.
- [문제 해결](/troubleshooting) — 에이전트가 움직이지 않을 때 여기서 원인을 찾습니다.
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
index 1d94d50f12..6424ed2778 100644
--- a/apps/docs/content/docs/index.mdx
+++ b/apps/docs/content/docs/index.mdx
@@ -5,9 +5,9 @@ title: Welcome
## What Multica can do
- **Hand work to agents** — assign an issue the way you would to a teammate; the agent posts progress and delivers results.
-- **Share all context** — discussions, records, and deliverables stay in the workspace, visible to the whole team at any time.
-- **Let work run itself** — set up scheduled runs and let multiple agents collaborate automatically.
-- **Capture team know-how** — save what works as a skill that every agent can reuse.
+- **Share context** — the discussion, records, and deliverables on each issue stay in the workspace, where the whole team can see them.
+- **Let work run itself** — Autopilots start agents on a schedule, and several agents can team up as a squad.
+- **Capture team know-how** — save what works as a skill and attach it to any number of agents.
![Workspace board: human members and multiple agents driving work forward together](/images/docs/workspace-overview.webp)
@@ -19,9 +19,9 @@ title: Welcome
## Most-visited pages
-- [Get agents working](/triggering-agents) — the four ways to trigger an agent.
-- [Create and configure agents](/agents-create) — create your first agent from blank or with AI.
-- [Install AI coding tools](/install-agent-runtime) — give your computer the ability to execute.
+- [Put agents to work](/triggering-agents) — pick a way to start an agent based on what you need.
+- [Create and configure an agent](/agents-create) — choose a runtime, configure, and create your first agent.
+- [Install AI coding tools](/install-agent-runtime) — agents use these tools to execute on your computer.
- [Runs](/tasks) — read the status, retries, and logs of every run.
- [Troubleshooting](/troubleshooting) — agent not moving? Start here.
diff --git a/apps/docs/content/docs/index.zh.mdx b/apps/docs/content/docs/index.zh.mdx
index fef87299e9..6d8f3a1701 100644
--- a/apps/docs/content/docs/index.zh.mdx
+++ b/apps/docs/content/docs/index.zh.mdx
@@ -5,9 +5,9 @@ title: 欢迎
## Multica 能做什么
- **把工作交给智能体**:像分配给同事一样分配任务,它会更新进度、提交结果。
-- **共享全部上下文**:讨论、记录和产出都留在工作区,团队成员随时可见。
-- **让工作自动运转**:设置定时任务,让多个智能体自动协作。
-- **沉淀团队经验**:把有效的做法存成 skill,供所有智能体复用。
+- **共享上下文**:任务里的讨论、记录和产出都留在工作区,团队成员都能看到。
+- **让工作自动运转**:用自动化定期启动智能体,多个智能体还可以组成小队协作。
+- **沉淀团队经验**:把有效的做法存成 skill,挂载给多个智能体复用。
![工作区看板:人类成员与多个智能体共同推进工作](/images/docs/workspace-overview.webp)
@@ -19,9 +19,9 @@ title: 欢迎
## 最常打开的页面
-- [让智能体开始工作](/triggering-agents) — 触发智能体的四种方式。
-- [创建和配置智能体](/agents-create) — 从空白或用 AI 创建你的第一个智能体。
-- [安装 AI 编程工具](/install-agent-runtime) — 让你的电脑具备执行能力。
+- [让智能体开始工作](/triggering-agents) — 按要做的事选择触发方式。
+- [创建和配置智能体](/agents-create) — 选择运行时,配置并创建你的第一个智能体。
+- [安装 AI 编程工具](/install-agent-runtime) — 智能体靠这些工具在你的电脑上执行。
- [运行](/tasks) — 看懂每一次执行的状态、重试和日志。
- [故障排查](/troubleshooting) — 智能体不动了?从这里定位。
diff --git a/apps/docs/content/docs/install-agent-runtime.fr.mdx b/apps/docs/content/docs/install-agent-runtime.fr.mdx
index 078a81983a..8fcbe785e9 100644
--- a/apps/docs/content/docs/install-agent-runtime.fr.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.fr.mdx
@@ -4,10 +4,16 @@ description: Installez un outil de codage IA pris en charge et connectez-vous-y
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Un runtime local comporte deux éléments : le daemon Multica et un outil de codage IA qu'il peut invoquer. N'installez que l'outil que vous comptez utiliser — inutile de tous les installer.
-## 1. Choisir un outil
+<Steps>
+<Step>
+
+## Choisir un outil [#1-choisir-un-outil]
Un outil déjà installé et connecté ne nécessite aucune configuration supplémentaire. Les outils diffèrent par leurs modèles, MCP, la reprise de session et la prise en charge des skills ; les détails figurent dans [Comparatif des outils de codage IA](/providers).
@@ -41,32 +47,88 @@ Multica détecte actuellement ces commandes :
| Reasonix | `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| TRAE CLI | `traecli` | [Site officiel de TRAE](https://www.trae.cn/) |
| Dim | `dim` | [DimCode](https://dimagent.cn/en/docs/cli) |
+| ZeroClaw | `zeroclaw` | [Démarrage rapide de ZeroClaw](https://github.com/zeroclaw-labs/zeroclaw/blob/master/docs/book/src/getting-started/quickstart.md#install) |
« Pris en charge » signifie que Multica peut invoquer ce CLI. Cela ne signifie pas que Multica vous fournit le compte, l'abonnement ou le quota de modèle de l'outil.
-## 2. Se connecter sur votre machine
+</Step>
+<Step>
+
+## Se connecter sur votre machine [#2-se-connecter-sur-votre-machine]
Après l'installation, lancez une première fois l'outil seul dans un terminal et terminez sa connexion ou la configuration de son fournisseur de modèles. Si l'outil ne parvient pas à traiter des requêtes dans le terminal, les invocations du daemon échoueront de la même manière.
-Pour CodeArts, vérifiez le chemin non interactif avec `codearts run --model provider/model "Reply OK"`, et pas seulement la TUI. Le CLI CodeArts actuel peut laisser un fournisseur personnalisé fonctionner dans la TUI alors que `run`, `models` et `serve` exigent toujours [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html). Multica peut découvrir des modèles personnalisés depuis `~/.codeartsdoer/codearts_cli.json` ou `.jsonc`, mais les exécutions d'agent utilisent `codearts run` et suivent donc ses exigences d'autorisation.
+Ces identifiants de connexion sont stockés localement par l'outil lui-même. Multica ne reçoit jamais les jetons de connexion de Claude, Codex, Cursor ni d'aucun autre CLI.
-Pour Reasonix, exécutez `reasonix setup` et configurez un fournisseur et un modèle par défaut avant de démarrer le daemon.
+En dessous de la version minimale, le daemon n'enregistre pas le runtime correspondant :
-Pour QwenPaw, choisissez le fournisseur et le modèle dans la configuration propre de QwenPaw. Multica ne peut pas remplacer le modèle de QwenPaw au moment de l'exécution.
+| Outil | Version minimale |
+| --- | --- |
+| Antigravity | 1.1.10 |
+| Claude Code | 2.0.0 |
+| Codex | 0.100.0 |
+| Copilot | 1.0.0 |
+| Grok | 0.2.89 |
+| Qwen Code | 0.20.0 |
+| MiniMax Code | 0.1.2 |
+| OpenCode | 1.1.54 |
+| Dim | 0.3.10 |
+| ZeroClaw | 0.8.0 |
-Pour MiniMax Code, installez une version de Node.js prise en charge (`>=22.19 <23` ou `>=24 <27`) et exécutez `npm install --global @minimax-ai/code@latest`. Une installation npm globale place `mcode` dans le chemin des binaires globaux de npm ; si `command -v mcode` ou `Get-Command mcode` ne le trouve pas, ajoutez ce chemin au `PATH`. Exécutez ensuite `mcode login`. C'est MiniMax Code qui gère le choix du modèle ; Multica ne peut pas le remplacer via ACP.
+Quelques outils demandent une configuration en plus de la connexion :
-Muse Code nécessite la version 1.4.10 ou ultérieure. Suivez le [guide officiel d'installation et de connexion](https://dev.meta.ai/docs/muse-code), puis vérifiez que `muse` est dans le `PATH`. Multica découvre ses modèles via MSP et permet de reprendre les sessions.
+<Accordions type="multiple">
+<Accordion title="CodeArts" id="codearts">
-Pour DeepSeek Harness, installez Node.js 20+ et exécutez `npm install -g @deepseek-ai/dsh`, puis fournissez-lui le profil de runtime Multica — le bundle qui implémente le protocole `--stdio` piloté par Multica, et la raison pour laquelle un `dsh` nu n'est pas utilisable seul. Définissez `MULTICA_DSH_PROFILE_BUNDLE` sur le bundle à installer et le daemon l'ajoute pour vous, ou ajoutez-le vous-même avec `dsh plugin --profile multica add <bundle>`. `<bundle>` peut être tout ce que `dsh plugin` accepte — un nom de paquet npm, un répertoire ou une archive tarball empaquetée — et le pont de Multica se trouve dans [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime). Il n'est pas encore publié sur un registre npm public ([multica#6936](https://github.com/multica-ai/multica/issues/6936)) : aujourd'hui, une équipe auto-hébergée le compile donc depuis ce dépôt et fait pointer la variable vers le répertoire de build, ou vers la tarball produite par `npm pack` — cette seconde option si la machine qui exécute le daemon n'est pas celle qui l'a compilé. Un nom de paquet deviendra l'option la plus simple une fois le pont publié. Quel que soit votre choix, privilégiez quelque chose que votre propre équipe publie ou compile : cette valeur est installée dans le répertoire personnel DSH de chaque hôte du daemon sans autre confirmation, si bien qu'un paquet tiers non vérifié relève d'une décision de chaîne d'approvisionnement, et non d'une simple commodité. Si vous avez installé DeepSeek Harness Desktop plutôt que le paquet npm, le daemon recherche aussi les shims CLI que génère cette application, dans son propre répertoire de données par utilisateur — `~/Library/Application Support/DSH Desktop` sur macOS, `%APPDATA%\DSH Desktop` sur Windows. Sous Windows, il s'agit des données d'application itinérantes (roaming), pas du répertoire d'installation : l'application s'installe dans Program Files ou dans `%LOCALAPPDATA%\Programs`, mais le CLI qu'elle pilote se trouve à côté de ses autres données par utilisateur. Le segment de version de ces chemins est un identifiant généré ; le daemon les énumère donc et privilégie le plus récent. Rien d'autre n'est nécessaire dans le `PATH` — un shim généré exécute le runtime propre de l'application Desktop par chemin absolu. Si DSH Desktop est installé à un emplacement non standard, faites pointer `MULTICA_DSH_PATH` vers le shim. Le daemon n'enregistre DeepSeek Harness qu'après la réussite de `dsh --profile multica --probe`, et signale le profil manquant sur `/health` en cas d'échec. Définissez `DEEPSEEK_API_KEY` (ou enregistrez-la dans les paramètres propres de dsh) avant de démarrer le daemon.
+Vérifiez le chemin non interactif avec `codearts run --model provider/model "Reply OK"`, et pas seulement la TUI. Le CLI CodeArts actuel peut laisser un fournisseur personnalisé fonctionner dans la TUI alors que `run`, `models` et `serve` exigent toujours [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html). Multica peut découvrir des modèles personnalisés depuis `~/.codeartsdoer/codearts_cli.json` ou `.jsonc`, mais les exécutions d'agent utilisent `codearts run` et suivent donc ses exigences d'autorisation.
-Ces identifiants de connexion sont stockés localement par l'outil lui-même. Multica ne reçoit jamais les jetons de connexion de Claude, Codex, Cursor ni d'aucun autre CLI.
+</Accordion>
+<Accordion title="DeepSeek Harness" id="deepseek-harness">
+
+Installez Node.js 20+ et exécutez `npm install -g @deepseek-ai/dsh`, puis fournissez-lui le profil de runtime Multica : le bundle qui implémente le protocole `--stdio` piloté par Multica, et la raison pour laquelle un `dsh` nu n'est pas utilisable seul. Définissez `DEEPSEEK_API_KEY` (ou enregistrez-la dans les paramètres propres de dsh) avant de démarrer le daemon.
-<Callout type="info">
-Antigravity nécessite la version 1.1.10 ou ultérieure, Claude Code la 2.0.0 ou ultérieure, Codex la 0.100.0 ou ultérieure, Copilot la 1.0.0 ou ultérieure, Grok la 0.2.89 ou ultérieure, Qwen Code la 0.20.0 ou ultérieure, MiniMax Code la 0.1.2 ou ultérieure et OpenCode la 1.1.54 ou ultérieure. En dessous de la version minimale, le daemon n'enregistre pas le runtime correspondant.
+**Installer le profil.** Définissez `MULTICA_DSH_PROFILE_BUNDLE` sur le bundle à installer et le daemon l'ajoute pour vous, ou ajoutez-le vous-même avec `dsh plugin --profile multica add <bundle>`. `<bundle>` peut être tout ce que `dsh plugin` accepte (un nom de paquet npm, un répertoire ou une archive tarball empaquetée), et le pont de Multica se trouve dans [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime). Il n'est pas encore publié sur un registre npm public ([multica#6936](https://github.com/multica-ai/multica/issues/6936)) : aujourd'hui, une équipe auto-hébergée le compile donc depuis ce dépôt et fait pointer la variable vers le répertoire de build, ou vers la tarball produite par `npm pack` si la machine qui exécute le daemon n'est pas celle qui l'a compilé. Un nom de paquet deviendra l'option la plus simple une fois le pont publié.
+
+<Callout type="warning">
+Privilégiez un bundle que votre propre équipe publie ou compile : cette valeur est installée dans le répertoire personnel DSH de chaque hôte du daemon sans autre confirmation, si bien qu'un paquet tiers non vérifié relève d'une décision de chaîne d'approvisionnement.
</Callout>
-## 3. Vérifier que le daemon trouve la commande
+**DSH Desktop.** Si vous avez installé DeepSeek Harness Desktop plutôt que le paquet npm, le daemon recherche aussi les shims CLI que génère cette application, dans son propre répertoire de données par utilisateur : `~/Library/Application Support/DSH Desktop` sur macOS, `%APPDATA%\DSH Desktop` sur Windows. Sous Windows, il s'agit des données d'application itinérantes (roaming), pas du répertoire d'installation : l'application s'installe dans Program Files ou dans `%LOCALAPPDATA%\Programs`, mais le CLI qu'elle pilote se trouve à côté de ses autres données par utilisateur. Le segment de version de ces chemins est un identifiant généré ; le daemon les énumère donc et privilégie le plus récent. Rien d'autre n'est nécessaire dans le `PATH` : un shim généré exécute le runtime propre de l'application Desktop par chemin absolu. Si DSH Desktop est installé à un emplacement non standard, faites pointer `MULTICA_DSH_PATH` vers le shim.
+
+Le daemon n'enregistre DeepSeek Harness qu'après la réussite de `dsh --profile multica --probe`, et signale le profil manquant sur `/health` en cas d'échec.
+
+</Accordion>
+<Accordion title="MiniMax Code" id="minimax-code">
+
+Installez une version de Node.js prise en charge (`>=22.19 <23` ou `>=24 <27`) et exécutez `npm install --global @minimax-ai/code@latest`. Une installation npm globale place `mcode` dans le chemin des binaires globaux de npm ; si `command -v mcode` ou `Get-Command mcode` ne le trouve pas, ajoutez ce chemin au `PATH`. Exécutez ensuite `mcode login`. C'est MiniMax Code qui gère le choix du modèle ; Multica ne peut pas le remplacer via ACP.
+
+</Accordion>
+<Accordion title="Muse Code" id="muse-code">
+
+Muse Code nécessite la version 1.4.10 ou ultérieure. Suivez le [guide officiel d'installation et de connexion](https://dev.meta.ai/docs/muse-code), puis vérifiez que `muse` est dans le `PATH`. Multica découvre ses modèles via MSP et permet de reprendre les sessions.
+
+</Accordion>
+<Accordion title="QwenPaw" id="qwenpaw">
+
+Choisissez le fournisseur et le modèle dans la configuration propre de QwenPaw. Multica ne peut pas remplacer le modèle de QwenPaw au moment de l'exécution.
+
+</Accordion>
+<Accordion title="Reasonix" id="reasonix">
+
+Exécutez `reasonix setup` et configurez un fournisseur et un modèle par défaut avant de démarrer le daemon.
+
+</Accordion>
+</Accordions>
+
+</Step>
+<Step>
+
+## Vérifier que le daemon trouve la commande [#3-vérifier-que-le-daemon-trouve-la-commande]
+
+Remplacez `<command>` par une commande du tableau, comme `claude`, `codex` ou `cursor-agent`. La première commande affiche le chemin de l'exécutable.
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
Sous macOS, Linux ou WSL, exécutez :
@@ -75,6 +137,9 @@ command -v <command>
<command> --version
```
+</Tab>
+<Tab value="Windows">
+
Dans Windows PowerShell, exécutez :
```powershell
@@ -82,13 +147,20 @@ Get-Command <command>
<command> --version
```
-Remplacez `<command>` par une commande du tableau, comme `claude`, `codex` ou `cursor-agent`. La première commande affiche le chemin de l'exécutable.
+</Tab>
+</Tabs>
Si le terminal trouve l'outil mais que Desktop ou le daemon en arrière-plan ne le trouve pas, c'est généralement qu'ils utilisent des valeurs de `PATH` différentes. Redémarrez l'application, ou définissez un chemin absolu via la variable d'environnement `MULTICA_<PROVIDER>_PATH` correspondante ; la configuration complète figure dans [Variables d'environnement](/environment-variables#configuration-du-daemon).
-## 4. Relancer la détection et vérifier que le runtime est en ligne
+</Step>
+<Step>
+
+## Relancer la détection et vérifier que le runtime est en ligne [#4-relancer-la-détection-et-vérifier-que-le-runtime-est-en-ligne]
+
+<Tabs items={["CLI", "Desktop"]}>
+<Tab value="CLI">
-Démarrez le daemon avec le CLI :
+Démarrez le daemon :
```bash
multica daemon start
@@ -100,14 +172,23 @@ Si le daemon tourne déjà, redémarrez-le après avoir installé un nouvel outi
multica daemon restart
```
-Avec Multica Desktop, quittez puis rouvrez l'application.
+</Tab>
+<Tab value="Desktop">
+
+Quittez puis rouvrez Multica Desktop.
+
+</Tab>
+</Tabs>
Ouvrez ensuite la page **Runtimes** de Multica. L'outil apparaît sous l'ordinateur cible et s'affiche comme en ligne. Vous pouvez désormais sélectionner ce runtime lors de la création ou de la modification d'un agent.
<Callout type="warning">
-Pour démarrer, le daemon doit détecter au moins un CLI intégré pris en charge. Les profils de runtime personnalisés se synchronisent une fois le daemon lancé ; ils ne peuvent donc pas être l'unique condition de démarrage sur une machine vierge. Il existe une exception : lorsque le daemon vient lui-même de commencer à installer le profil de runtime DSH (`MULTICA_DSH_PROFILE_BUNDLE`), il démarre sans aucun runtime et enregistre DeepSeek Harness une fois cette installation terminée. Sans cela, un hôte dont le seul outil est un DSH ayant besoin du profil ne pourrait jamais terminer l'installation — le daemon s'arrêterait avant la fin et l'interromprait avec lui.
+Pour démarrer, le daemon doit détecter au moins un CLI intégré pris en charge. Les profils de runtime personnalisés se synchronisent une fois le daemon lancé ; ils ne peuvent donc pas être l'unique condition de démarrage sur une machine vierge. Il existe une exception : lorsque le daemon vient lui-même de commencer à installer le profil de runtime DSH (`MULTICA_DSH_PROFILE_BUNDLE`), il démarre sans aucun runtime et enregistre DeepSeek Harness une fois cette installation terminée. Sans cela, un hôte dont le seul outil est un DSH ayant besoin du profil ne pourrait jamais terminer l'installation : le daemon s'arrêterait avant la fin et l'interromprait avec lui.
</Callout>
+</Step>
+</Steps>
+
## Aucun outil détecté
Vérifiez dans l'ordre :
diff --git a/apps/docs/content/docs/install-agent-runtime.ja.mdx b/apps/docs/content/docs/install-agent-runtime.ja.mdx
index 58a3e73614..29a8da6ca6 100644
--- a/apps/docs/content/docs/install-agent-runtime.ja.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ja.mdx
@@ -4,10 +4,16 @@ description: 対応する AI コーディングツールをインストールし
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
-ローカルランタイムは、Multica デーモンと、デーモンが呼び出せる AI コーディングツールの 2 つで構成されます。使用するツールだけをインストールすればよく、すべてをインストールする必要はありません。
+ローカルランタイムは、Multica デーモンと、デーモンが呼び出せる AI コーディングツールの 2 つで構成されます。使うツールだけをインストールすればよく、すべてをそろえる必要はありません。
-## 1. ツールを選ぶ
+<Steps>
+<Step>
+
+## ツールを選ぶ [#1-ツールを選ぶ]
すでにインストールしてログイン済みのツールには、追加設定は不要です。モデル、MCP、セッション再開、スキルの対応状況はツールごとに異なります。詳しくは [AI コーディングツール比較](/providers)を参照してください。
@@ -41,32 +47,88 @@ Multica は現在、次のコマンドを検出します。
| Reasonix | `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| TRAE CLI | `traecli` | [TRAE 公式サイト](https://www.trae.cn/) |
| Dim | `dim` | [DimCode](https://dimagent.cn/en/docs/cli) |
+| ZeroClaw | `zeroclaw` | [ZeroClaw クイックスタート](https://github.com/zeroclaw-labs/zeroclaw/blob/master/docs/book/src/getting-started/quickstart.md#install) |
ここでの「対応」とは、Multica が該当する CLI を呼び出せるという意味です。そのツールのアカウント、サブスクリプション、モデルの利用枠を Multica が提供するわけではありません。
-## 2. ローカル環境でログインする
+</Step>
+<Step>
+
+## ローカル環境でログインする [#2-ローカル環境でログインする]
インストール後、まずターミナルからツールを単独で起動し、各ツールの手順に従ってログインするか、モデルプロバイダーを設定してください。ターミナル上でリクエストを実行できない場合は、デーモンから呼び出しても失敗します。
-CodeArts では、TUI だけでなく `codearts run --model provider/model "OK とだけ返してください"` で非対話モードを確認してください。現在の CodeArts CLI では、カスタム provider が TUI で動作しても、`run`、`models`、`serve` には引き続き [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html) が必要な場合があります。Multica は `~/.codeartsdoer/codearts_cli.json` または `.jsonc` からカスタムモデルを検出できますが、実行には `codearts run` を使用するため、その認証要件に従います。
+ログイン情報はツールがローカル環境に保存します。Multica が Claude、Codex、Cursor などの CLI のログイントークンを受け取ることはありません。
-Reasonix を使う場合は、デーモンを起動する前に `reasonix setup` を実行し、デフォルトのプロバイダーとモデルを設定してください。
+最低バージョンを満たしていない場合、デーモンはそのランタイムを登録しません。
-QwenPaw を使う場合は、QwenPaw 側の設定でプロバイダーとモデルを選んでください。Multica が実行時に QwenPaw のモデルを上書きすることはできません。
+| ツール | 最低バージョン |
+| --- | --- |
+| Antigravity | 1.1.10 |
+| Claude Code | 2.0.0 |
+| Codex | 0.100.0 |
+| Copilot | 1.0.0 |
+| Grok | 0.2.89 |
+| Qwen Code | 0.20.0 |
+| MiniMax Code | 0.1.2 |
+| OpenCode | 1.1.54 |
+| Dim | 0.3.10 |
+| ZeroClaw | 0.8.0 |
-MiniMax Code を使う場合は、対応する Node.js バージョン(`>=22.19 <23` または `>=24 <27`)をインストールし、`npm install --global @minimax-ai/code@latest` を実行してください。npm のグローバルインストールによって `mcode` は npm のグローバル実行ファイルディレクトリに配置されます。`command -v mcode` または `Get-Command mcode` で見つからない場合は、そのディレクトリを `PATH` に追加してください。その後 `mcode login` を実行します。モデルは MiniMax Code が管理し、Multica から ACP 経由で上書きすることはできません。
+次のツールは、ログインのほかに追加の設定が必要です。
-Muse Code は 1.4.10 以降が必要です。[公式のインストールとサインイン手順](https://dev.meta.ai/docs/muse-code)に従い、`muse` が `PATH` にあることを確認してください。Multica は MSP からモデル一覧を取得し、既存のセッションを再開できます。
+<Accordions type="multiple">
+<Accordion title="CodeArts" id="codearts">
-DeepSeek Harness を使う場合は、Node.js 20+ をインストールして `npm install -g @deepseek-ai/dsh` を実行し、Multica ランタイムプロファイルを追加してください。このバンドルが Multica の利用する `--stdio` プロトコルを提供しており、素の `dsh` だけでは使えない理由でもあります。`MULTICA_DSH_PROFILE_BUNDLE` にインストールするバンドルを設定すればデーモンが追加します。手動で行う場合は `dsh plugin --profile multica add <bundle>` を実行します。`<bundle>` は `dsh plugin` が受け付けるもの、つまり npm のパッケージ名、ディレクトリ、パック済み tarball のいずれかで、Multica 自身のブリッジは [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime) にあります。これはまだ公開 npm レジストリに公開されていないため([multica#6936](https://github.com/multica-ai/multica/issues/6936))、現時点でセルフホストのチームはそのリポジトリからビルドし、変数をビルド出力のディレクトリに向けます。デーモンを動かすマシンとビルドしたマシンが別なら、`npm pack` が生成する tarball を指定してください。ブリッジが公開されれば、パッケージ名を指定するのが最も簡単になります。いずれの場合も、自チームが公開・ビルドしたものを優先してください。この値は追加の確認なしに各デーモンホストの DSH ホームへインストールされるため、素性の分からないサードパーティのパッケージを指定することは利便性の問題ではなくサプライチェーンの判断です。npm パッケージではなく DeepSeek Harness Desktop をインストールした場合、デーモンはそのアプリが生成する CLI シムも、アプリ自身のユーザーデータディレクトリから探します。macOS は `~/Library/Application Support/DSH Desktop`、Windows は `%APPDATA%\DSH Desktop` です。Windows のそれはローミングのアプリケーションデータであり、インストール先ではありません。アプリ自体は Program Files または `%LOCALAPPDATA%\Programs` に入りますが、駆動される CLI はユーザーごとの他の状態と同じ場所に置かれます。これらのパスのバージョン部分は生成された ID なので、デーモンは列挙して最新のものを優先します。PATH に他のものは必要ありません。生成されたシムはアプリ同梱のランタイムを絶対パスで起動します。DSH Desktop が既定以外の場所にある場合は `MULTICA_DSH_PATH` でそのシムを指定してください。デーモンは `dsh --profile multica --probe` が成功した場合のみ DeepSeek Harness を登録し、失敗した場合は `/health` にプロファイルの欠落を報告します。デーモンを起動する前に `DEEPSEEK_API_KEY` を設定(または dsh の設定に保存)してください。
+TUI だけでなく、`codearts run --model provider/model "OK とだけ返してください"` で非対話モードを確認してください。現在の CodeArts CLI では、カスタム provider が TUI で動作しても、`run`、`models`、`serve` には引き続き [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html) が必要な場合があります。Multica は `~/.codeartsdoer/codearts_cli.json` または `.jsonc` からカスタムモデルを検出できますが、実行には `codearts run` を使用するため、その認証要件に従います。
-ログイン情報はツールがローカル環境に保存します。Multica が Claude、Codex、Cursor などの CLI のログイントークンを受け取ることはありません。
+</Accordion>
+<Accordion title="DeepSeek Harness" id="deepseek-harness">
+
+Node.js 20+ をインストールして `npm install -g @deepseek-ai/dsh` を実行し、Multica ランタイムプロファイルを追加してください。このバンドルが Multica の利用する `--stdio` プロトコルを提供しており、素の `dsh` だけでは使えない理由でもあります。デーモンを起動する前に `DEEPSEEK_API_KEY` を設定(または dsh の設定に保存)してください。
-<Callout type="info">
-Antigravity は 1.1.10 以降、Claude Code は 2.0.0 以降、Codex は 0.100.0 以降、Copilot は 1.0.0 以降、Grok は 0.2.89 以降、Qwen Code は 0.20.0 以降、MiniMax Code は 0.1.2 以降、OpenCode は 1.1.54 以降が必要です。最低バージョンを満たしていない場合、デーモンはそのランタイムを登録しません。
+**プロファイルのインストール。** `MULTICA_DSH_PROFILE_BUNDLE` にインストールするバンドルを設定すればデーモンが追加します。手動で行う場合は `dsh plugin --profile multica add <bundle>` を実行します。`<bundle>` は `dsh plugin` が受け付けるもの、つまり npm のパッケージ名、ディレクトリ、パック済み tarball のいずれかで、Multica 自身のブリッジは [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime) にあります。これはまだ公開 npm レジストリに公開されていないため([multica#6936](https://github.com/multica-ai/multica/issues/6936))、現時点でセルフホストのチームはそのリポジトリからビルドし、変数をビルド出力のディレクトリに向けます。デーモンを動かすマシンとビルドしたマシンが別なら、`npm pack` が生成する tarball を指定してください。ブリッジが公開されれば、パッケージ名を指定するのが最も簡単になります。
+
+<Callout type="warning">
+自チームが公開・ビルドしたものを優先してください。この値は追加の確認なしに各デーモンホストの DSH ホームへインストールされるため、素性の分からないサードパーティのパッケージを指定することは、サプライチェーンに関わる判断になります。
</Callout>
-## 3. デーモンからコマンドを見つけられることを確認する
+**DSH Desktop。** npm パッケージではなく DeepSeek Harness Desktop をインストールした場合、デーモンはそのアプリが生成する CLI シムも、アプリ自身のユーザーデータディレクトリから探します。macOS は `~/Library/Application Support/DSH Desktop`、Windows は `%APPDATA%\DSH Desktop` です。Windows のそれはローミングのアプリケーションデータであり、インストール先ではありません。アプリ自体は Program Files または `%LOCALAPPDATA%\Programs` に入りますが、駆動される CLI はユーザーごとの他の状態と同じ場所に置かれます。これらのパスのバージョン部分は生成された ID なので、デーモンは列挙して最新のものを優先します。PATH に他のものは必要ありません。生成されたシムはアプリ同梱のランタイムを絶対パスで起動します。DSH Desktop が既定以外の場所にある場合は `MULTICA_DSH_PATH` でそのシムを指定してください。
+
+デーモンは `dsh --profile multica --probe` が成功した場合のみ DeepSeek Harness を登録し、失敗した場合は `/health` にプロファイルの欠落を報告します。
+
+</Accordion>
+<Accordion title="MiniMax Code" id="minimax-code">
+
+対応する Node.js バージョン(`>=22.19 <23` または `>=24 <27`)をインストールし、`npm install --global @minimax-ai/code@latest` を実行してください。npm のグローバルインストールによって `mcode` は npm のグローバル実行ファイルディレクトリに配置されます。`command -v mcode` または `Get-Command mcode` で見つからない場合は、そのディレクトリを `PATH` に追加してください。その後 `mcode login` を実行します。モデルは MiniMax Code が管理し、Multica から ACP 経由で上書きすることはできません。
+
+</Accordion>
+<Accordion title="Muse Code" id="muse-code">
+
+Muse Code は 1.4.10 以降が必要です。[公式のインストールとサインイン手順](https://dev.meta.ai/docs/muse-code)に従い、`muse` が `PATH` にあることを確認してください。Multica は MSP からモデル一覧を取得し、既存のセッションを再開できます。
+
+</Accordion>
+<Accordion title="QwenPaw" id="qwenpaw">
+
+QwenPaw 側の設定でプロバイダーとモデルを選んでください。Multica が実行時に QwenPaw のモデルを上書きすることはできません。
+
+</Accordion>
+<Accordion title="Reasonix" id="reasonix">
+
+デーモンを起動する前に `reasonix setup` を実行し、デフォルトのプロバイダーとモデルを設定してください。
+
+</Accordion>
+</Accordions>
+
+</Step>
+<Step>
+
+## デーモンからコマンドを見つけられることを確認する [#3-デーモンからコマンドを見つけられることを確認する]
+
+`<command>` は表にあるコマンド名に置き換えてください。たとえば `claude`、`codex`、`cursor-agent` です。最初のコマンドで実行ファイルのパスが表示されます。
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
macOS、Linux、WSL では、次を実行します。
@@ -75,6 +137,9 @@ command -v <command>
<command> --version
```
+</Tab>
+<Tab value="Windows">
+
Windows PowerShell では、次を実行します。
```powershell
@@ -82,13 +147,20 @@ Get-Command <command>
<command> --version
```
-`<command>` は表にあるコマンド名に置き換えてください。たとえば `claude`、`codex`、`cursor-agent` です。最初のコマンドで実行ファイルのパスが返れば、検出できています。
+</Tab>
+</Tabs>
+
+ターミナルではツールを見つけられるのに、Desktop やバックグラウンドのデーモンでは見つからない場合、たいていは両者が異なる `PATH` を使っています。アプリを再起動するか、対応する `MULTICA_<PROVIDER>_PATH` 環境変数で絶対パスを指定してください。設定の詳細は[環境変数](/environment-variables#デーモン設定)を参照してください。
+
+</Step>
+<Step>
-ターミナルではツールを見つけられるのに、Desktop やバックグラウンドのデーモンでは見つからない場合、両者が異なる `PATH` を使っていることが一般的な原因です。アプリを再起動するか、対応する `MULTICA_<PROVIDER>_PATH` 環境変数で絶対パスを指定してください。設定の詳細は[環境変数](/environment-variables#デーモン設定)を参照してください。
+## 再検出してオンライン状態を確認する [#4-再検出してオンライン状態を確認する]
-## 4. 再検出してオンライン状態を確認する
+<Tabs items={["CLI", "Desktop"]}>
+<Tab value="CLI">
-CLI でデーモンを起動します。
+デーモンを起動します。
```bash
multica daemon start
@@ -100,7 +172,13 @@ multica daemon start
multica daemon restart
```
-Multica Desktop を使っている場合は、アプリを終了して開き直してください。
+</Tab>
+<Tab value="Desktop">
+
+Multica Desktop を終了して開き直してください。
+
+</Tab>
+</Tabs>
次に Multica の**ランタイム**ページを開きます。対象のコンピューターの下にツールが表示され、オンライン状態になっていることを確認してください。これで、エージェントを作成または編集するときにこのランタイムを選択できます。
@@ -108,6 +186,9 @@ Multica Desktop を使っている場合は、アプリを終了して開き直
デーモンの起動時には、標準対応している CLI が少なくとも 1 つ検出される必要があります。カスタムランタイム設定はデーモンの起動後に同期されるため、ツールが何もないコンピューターで唯一の起動条件として使うことはできません。例外は 1 つだけです。デーモンが DSH ランタイムプロファイルのインストール(`MULTICA_DSH_PROFILE_BUNDLE`)を開始した直後は、ランタイムが 1 つもない状態で起動し、そのインストールが完了した時点で DeepSeek Harness を登録します。そうしないと、プロファイルを必要とする DSH しかないコンピューターではインストールを完了できません。デーモンが完了前に終了し、インストール処理も道連れにしてしまうからです。
</Callout>
+</Step>
+</Steps>
+
## ツールが検出されない場合
次の順番で確認してください。
diff --git a/apps/docs/content/docs/install-agent-runtime.ko.mdx b/apps/docs/content/docs/install-agent-runtime.ko.mdx
index 9ff321c679..2debe43f64 100644
--- a/apps/docs/content/docs/install-agent-runtime.ko.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.ko.mdx
@@ -4,10 +4,16 @@ description: 지원되는 AI 코딩 도구를 설치하고 로그인해 Multica
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
로컬 런타임은 Multica 데몬과 데몬이 호출할 수 있는 AI 코딩 도구 하나, 두 부분으로 구성됩니다. 사용할 도구만 설치하면 되며 모든 도구를 설치할 필요는 없습니다.
-## 1. 도구 선택
+<Steps>
+<Step>
+
+## 도구 선택 [#1-도구-선택]
이미 설치되어 로그인된 도구에는 추가 설정이 필요 없습니다. 도구마다 모델, MCP, 세션 복원, 스킬 지원이 다릅니다. 자세한 차이는 [AI 코딩 도구 비교](/providers)를 참고하세요.
@@ -41,32 +47,88 @@ Multica는 현재 다음 명령을 감지합니다.
| Reasonix | `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| TRAE CLI | `traecli` | [TRAE 공식 사이트](https://www.trae.cn/) |
| Dim | `dim` | [DimCode](https://dimagent.cn/en/docs/cli) |
+| ZeroClaw | `zeroclaw` | [ZeroClaw 빠른 시작](https://github.com/zeroclaw-labs/zeroclaw/blob/master/docs/book/src/getting-started/quickstart.md#install) |
"지원됨"은 Multica가 해당 CLI를 호출할 수 있다는 뜻이며 Multica가 도구의 계정, 구독, 모델 사용량을 제공한다는 뜻은 아닙니다.
-## 2. 로컬에서 로그인 완료
+</Step>
+<Step>
+
+## 로컬에서 로그인 완료 [#2-로컬에서-로그인-완료]
설치 후 터미널에서 도구를 한 번 직접 실행하고 도구 자체의 절차에 따라 로그인하거나 모델 서비스를 설정합니다. 터미널에서 요청을 완료하지 못하면 데몬이 호출할 때도 실패합니다.
-CodeArts는 TUI뿐 아니라 `codearts run --model provider/model "OK만 응답하세요"`로 비대화형 모드도 확인하세요. 현재 CodeArts CLI에서는 사용자 지정 provider가 TUI에서 동작하더라도 `run`, `models`, `serve`에 여전히 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)가 필요할 수 있습니다. Multica는 `~/.codeartsdoer/codearts_cli.json` 또는 `.jsonc`에서 사용자 지정 모델을 찾을 수 있지만, 실행에는 `codearts run`을 사용하므로 해당 인증 요구 사항을 따릅니다.
+로그인 자격 증명은 도구가 로컬에 저장합니다. Multica는 Claude, Codex, Cursor 또는 다른 CLI의 로그인 토큰을 받지 않습니다.
-Reasonix를 사용할 때는 데몬을 시작하기 전에 `reasonix setup`을 실행해 기본 공급자와 모델을 설정하세요.
+최소 버전보다 낮으면 데몬이 해당 런타임을 등록하지 않습니다.
-QwenPaw를 사용할 때는 QwenPaw 자체 설정에서 공급자와 모델을 선택하세요. Multica는 실행 시 QwenPaw의 모델을 덮어쓸 수 없습니다.
+| 도구 | 최소 버전 |
+| --- | --- |
+| Antigravity | 1.1.10 |
+| Claude Code | 2.0.0 |
+| Codex | 0.100.0 |
+| Copilot | 1.0.0 |
+| Grok | 0.2.89 |
+| Qwen Code | 0.20.0 |
+| MiniMax Code | 0.1.2 |
+| OpenCode | 1.1.54 |
+| Dim | 0.3.10 |
+| ZeroClaw | 0.8.0 |
-MiniMax Code를 사용하려면 지원되는 Node.js 버전(`>=22.19 <23` 또는 `>=24 <27`)을 설치한 뒤 `npm install --global @minimax-ai/code@latest`를 실행하세요. npm 전역 설치는 `mcode`를 npm의 전역 실행 파일 디렉터리에 추가합니다. `command -v mcode` 또는 `Get-Command mcode`에서 찾지 못하면 해당 디렉터리를 `PATH`에 추가하세요. 그다음 `mcode login`을 실행합니다. 모델은 MiniMax Code가 관리하며 Multica는 ACP를 통해 이를 덮어쓸 수 없습니다.
+다음 도구는 로그인 외에 추가 설정이 필요합니다.
-Muse Code는 1.4.10 이상이 필요합니다. [공식 설치 및 로그인 안내](https://dev.meta.ai/docs/muse-code)를 따르고 `muse`가 `PATH`에 있는지 확인하세요. Multica는 MSP로 모델 목록을 가져오며 기존 세션을 이어서 실행할 수 있습니다.
+<Accordions type="multiple">
+<Accordion title="CodeArts" id="codearts">
+
+TUI만 확인하지 말고 `codearts run --model provider/model "OK만 응답하세요"`로 비대화형 모드도 확인하세요. 현재 CodeArts CLI에서는 사용자 지정 provider가 TUI에서 동작하더라도 `run`, `models`, `serve`에 여전히 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)가 필요할 수 있습니다. Multica는 `~/.codeartsdoer/codearts_cli.json` 또는 `.jsonc`에서 사용자 지정 모델을 찾을 수 있지만, 실행에는 `codearts run`을 사용하므로 해당 인증 요구 사항을 따릅니다.
-DeepSeek Harness를 사용하려면 Node.js 20+를 설치하고 `npm install -g @deepseek-ai/dsh`를 실행한 뒤 Multica 런타임 프로필을 추가하세요. 이 번들이 Multica가 사용하는 `--stdio` 프로토콜을 제공하며, `dsh`만으로는 사용할 수 없는 이유이기도 합니다. `MULTICA_DSH_PROFILE_BUNDLE`에 설치할 번들을 설정하면 데몬이 대신 추가합니다. 직접 하려면 `dsh plugin --profile multica add <bundle>`을 실행하세요. `<bundle>`은 `dsh plugin`이 받아들이는 모든 형태 — npm 패키지 이름, 디렉터리, 패키징된 tarball — 이며, Multica 자체 브리지는 [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime)에 있습니다. 아직 공개 npm 레지스트리에 게시되지 않았으므로([multica#6936](https://github.com/multica-ai/multica/issues/6936)), 현재 셀프호스트 팀은 해당 저장소에서 직접 빌드한 뒤 변수를 빌드 산출물 디렉터리로 지정합니다. 데몬을 실행하는 기기와 빌드한 기기가 다르면 `npm pack`이 만든 tarball을 지정하세요. 브리지가 게시되면 패키지 이름을 쓰는 것이 가장 간단합니다. 어느 쪽이든 팀이 직접 게시하거나 빌드한 산출물을 우선하세요. 이 값은 추가 확인 없이 모든 데몬 호스트의 DSH 홈에 설치되므로, 검증되지 않은 서드파티 패키지를 지정하는 것은 편의의 문제가 아니라 공급망에 관한 결정입니다. npm 패키지 대신 DeepSeek Harness Desktop을 설치했다면, 데몬은 그 앱이 생성하는 CLI 심(shim)도 앱 자체의 사용자 데이터 디렉터리에서 찾습니다. macOS는 `~/Library/Application Support/DSH Desktop`, Windows는 `%APPDATA%\DSH Desktop`입니다. Windows의 이 경로는 로밍 애플리케이션 데이터이지 설치 디렉터리가 아닙니다. 앱 자체는 Program Files 또는 `%LOCALAPPDATA%\Programs`에 설치되지만, 앱이 구동하는 CLI는 사용자별 다른 상태와 함께 저장됩니다. 이 경로의 버전 구간은 생성된 id이므로 데몬이 열거하여 가장 최신 것을 우선합니다. `PATH`에 다른 것이 필요하지 않습니다. 생성된 심은 앱에 포함된 런타임을 절대 경로로 실행합니다. DSH Desktop이 기본이 아닌 위치에 있다면 `MULTICA_DSH_PATH`로 그 심을 지정하세요. 데몬은 `dsh --profile multica --probe`가 성공한 경우에만 DeepSeek Harness를 등록하고, 실패하면 `/health`에 프로필 누락을 보고합니다. 데몬을 시작하기 전에 `DEEPSEEK_API_KEY`를 설정(또는 dsh 자체 설정에 저장)하세요.
+</Accordion>
+<Accordion title="DeepSeek Harness" id="deepseek-harness">
-로그인 자격 증명은 도구가 로컬에 저장합니다. Multica는 Claude, Codex, Cursor 또는 다른 CLI의 로그인 token을 받지 않습니다.
+Node.js 20+를 설치하고 `npm install -g @deepseek-ai/dsh`를 실행한 뒤 Multica 런타임 프로필을 추가하세요. 이 번들이 Multica가 사용하는 `--stdio` 프로토콜을 제공하며, `dsh`만으로는 사용할 수 없는 이유이기도 합니다. 데몬을 시작하기 전에 `DEEPSEEK_API_KEY`를 설정(또는 dsh 자체 설정에 저장)하세요.
-<Callout type="info">
-Antigravity는 1.1.10 이상, Claude Code는 2.0.0 이상, Codex는 0.100.0 이상, Copilot은 1.0.0 이상, Grok은 0.2.89 이상, Qwen Code는 0.20.0 이상, MiniMax Code는 0.1.2 이상, OpenCode는 1.1.54 이상이 필요합니다. 최소 버전보다 낮으면 데몬이 해당 런타임을 등록하지 않습니다.
+**프로필 설치.** `MULTICA_DSH_PROFILE_BUNDLE`에 설치할 번들을 설정하면 데몬이 대신 추가합니다. 직접 하려면 `dsh plugin --profile multica add <bundle>`을 실행하세요. `<bundle>`은 `dsh plugin`이 받아들이는 형태(npm 패키지 이름, 디렉터리, 패키징된 tarball)이면 되고, Multica 자체 브리지는 [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime)에 있습니다. 아직 공개 npm 레지스트리에 게시되지 않았으므로([multica#6936](https://github.com/multica-ai/multica/issues/6936)), 현재 셀프호스트 팀은 해당 저장소에서 직접 빌드한 뒤 변수를 빌드 산출물 디렉터리로 지정합니다. 데몬을 실행하는 기기와 빌드한 기기가 다르면 `npm pack`이 만든 tarball을 지정하세요. 브리지가 게시되면 패키지 이름을 쓰는 것이 가장 간단합니다.
+
+<Callout type="warning">
+팀이 직접 게시하거나 빌드한 산출물을 우선하세요. 이 값은 추가 확인 없이 모든 데몬 호스트의 DSH 홈에 설치되므로, 검증되지 않은 서드파티 패키지를 지정하는 것은 공급망에 관한 결정입니다.
</Callout>
-## 3. 데몬이 명령을 찾을 수 있는지 확인
+**DSH Desktop.** npm 패키지 대신 DeepSeek Harness Desktop을 설치했다면, 데몬은 그 앱이 생성하는 CLI 심(shim)도 앱 자체의 사용자 데이터 디렉터리에서 찾습니다. macOS는 `~/Library/Application Support/DSH Desktop`, Windows는 `%APPDATA%\DSH Desktop`입니다. Windows의 이 경로는 로밍 애플리케이션 데이터이지 설치 디렉터리가 아닙니다. 앱 자체는 Program Files 또는 `%LOCALAPPDATA%\Programs`에 설치되지만, 앱이 구동하는 CLI는 사용자별 다른 상태와 함께 저장됩니다. 이 경로의 버전 구간은 생성된 id이므로 데몬이 열거하여 가장 최신 것을 우선합니다. `PATH`에 다른 것이 필요하지 않습니다. 생성된 심은 앱에 포함된 런타임을 절대 경로로 실행합니다. DSH Desktop이 기본이 아닌 위치에 있다면 `MULTICA_DSH_PATH`로 그 심을 지정하세요.
+
+데몬은 `dsh --profile multica --probe`가 성공한 경우에만 DeepSeek Harness를 등록하고, 실패하면 `/health`에 프로필 누락을 보고합니다.
+
+</Accordion>
+<Accordion title="MiniMax Code" id="minimax-code">
+
+지원되는 Node.js 버전(`>=22.19 <23` 또는 `>=24 <27`)을 설치한 뒤 `npm install --global @minimax-ai/code@latest`를 실행하세요. npm 전역 설치는 `mcode`를 npm의 전역 실행 파일 디렉터리에 추가합니다. `command -v mcode` 또는 `Get-Command mcode`에서 찾지 못하면 해당 디렉터리를 `PATH`에 추가하세요. 그다음 `mcode login`을 실행합니다. 모델은 MiniMax Code가 관리하며 Multica는 ACP를 통해 이를 덮어쓸 수 없습니다.
+
+</Accordion>
+<Accordion title="Muse Code" id="muse-code">
+
+Muse Code는 1.4.10 이상이 필요합니다. [공식 설치 및 로그인 안내](https://dev.meta.ai/docs/muse-code)를 따르고 `muse`가 `PATH`에 있는지 확인하세요. Multica는 MSP로 모델 목록을 가져오며 기존 세션을 이어서 실행할 수 있습니다.
+
+</Accordion>
+<Accordion title="QwenPaw" id="qwenpaw">
+
+QwenPaw 자체 설정에서 공급자와 모델을 선택하세요. Multica는 실행 시 QwenPaw의 모델을 덮어쓸 수 없습니다.
+
+</Accordion>
+<Accordion title="Reasonix" id="reasonix">
+
+데몬을 시작하기 전에 `reasonix setup`을 실행해 기본 공급자와 모델을 설정하세요.
+
+</Accordion>
+</Accordions>
+
+</Step>
+<Step>
+
+## 데몬이 명령을 찾을 수 있는지 확인 [#3-데몬이-명령을-찾을-수-있는지-확인]
+
+`<command>`를 표에 있는 `claude`, `codex`, `cursor-agent` 같은 명령으로 바꾸세요. 첫 명령이 실행 파일 경로를 출력합니다.
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
macOS, Linux 또는 WSL에서 실행합니다.
@@ -75,6 +137,9 @@ command -v <command>
<command> --version
```
+</Tab>
+<Tab value="Windows">
+
Windows PowerShell에서 실행합니다.
```powershell
@@ -82,13 +147,20 @@ Get-Command <command>
<command> --version
```
-`<command>`를 표에 있는 `claude`, `codex`, `cursor-agent` 같은 명령으로 바꾸세요. 첫 명령이 실행 파일 경로를 반환합니다.
+</Tab>
+</Tabs>
터미널에서는 도구를 찾지만 Desktop이나 백그라운드 데몬에서는 찾지 못한다면 보통 서로 다른 `PATH`를 사용하기 때문입니다. 앱을 다시 시작하거나 해당 `MULTICA_<PROVIDER>_PATH` 환경 변수로 절대 경로를 지정할 수 있습니다. 전체 설정은 [환경 변수](/environment-variables#데몬-설정)를 참고하세요.
-## 4. 다시 감지하고 온라인 상태 확인
+</Step>
+<Step>
+
+## 다시 감지하고 온라인 상태 확인 [#4-다시-감지하고-온라인-상태-확인]
+
+<Tabs items={["CLI", "Desktop"]}>
+<Tab value="CLI">
-CLI로 데몬을 시작합니다.
+데몬을 시작합니다.
```bash
multica daemon start
@@ -100,7 +172,13 @@ multica daemon start
multica daemon restart
```
-Multica Desktop을 사용한다면 앱을 종료한 뒤 다시 열면 됩니다.
+</Tab>
+<Tab value="Desktop">
+
+Multica Desktop을 종료한 뒤 다시 엽니다.
+
+</Tab>
+</Tabs>
그런 다음 Multica의 **런타임** 페이지를 엽니다. 대상 컴퓨터 아래에 해당 도구가 나타나고 온라인으로 표시됩니다. 이제 에이전트를 만들거나 수정할 때 이 런타임을 선택할 수 있습니다.
@@ -108,6 +186,9 @@ Multica Desktop을 사용한다면 앱을 종료한 뒤 다시 열면 됩니다.
데몬이 시작될 때 기본 지원 CLI를 하나 이상 감지해야 합니다. 사용자 지정 런타임 설정은 데몬이 시작된 뒤 동기화되므로 빈 컴퓨터에서 유일한 시작 조건으로 사용할 수 없습니다. 예외는 하나뿐입니다. 데몬이 DSH 런타임 프로필 설치(`MULTICA_DSH_PROFILE_BUNDLE`)를 막 시작한 경우에는 런타임 없이 시작하고, 그 설치가 끝나면 DeepSeek Harness를 등록합니다. 그렇지 않으면 프로필이 필요한 DSH만 설치된 컴퓨터에서는 설치를 끝낼 수 없습니다. 데몬이 완료 전에 종료하면서 설치 과정까지 함께 중단시키기 때문입니다.
</Callout>
+</Step>
+</Steps>
+
## 도구가 감지되지 않을 때
다음 순서로 확인하세요.
diff --git a/apps/docs/content/docs/install-agent-runtime.mdx b/apps/docs/content/docs/install-agent-runtime.mdx
index 6fb925825f..cff102f820 100644
--- a/apps/docs/content/docs/install-agent-runtime.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.mdx
@@ -4,10 +4,16 @@ description: Install and sign in to a supported AI coding tool so Multica can ex
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
A local runtime has two parts: the Multica daemon, and one AI coding tool it can invoke. Install only the tool you intend to use — you do not need all of them.
-## 1. Choose a tool
+<Steps>
+<Step>
+
+## Choose a tool [#1-choose-a-tool]
A tool that is already installed and signed in needs no extra setup. Tools differ in models, MCP, session resumption, and skill support; the details are in [AI coding tools comparison](/providers).
@@ -41,54 +47,120 @@ Multica currently detects these commands:
| Reasonix | `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| TRAE CLI | `traecli` | [TRAE official site](https://www.trae.cn/) |
| Dim | `dim` | [DimCode](https://dimagent.cn/en/docs/cli) |
+| ZeroClaw | `zeroclaw` | [ZeroClaw quickstart](https://github.com/zeroclaw-labs/zeroclaw/blob/master/docs/book/src/getting-started/quickstart.md#install) |
"Supported" means Multica can invoke that CLI. It does not mean Multica provides the tool's account, subscription, or model quota for you.
-## 2. Sign in on your machine
+</Step>
+<Step>
+
+## Sign in on your machine [#2-sign-in-on-your-machine]
After installing, launch the tool once in a terminal on its own and complete its sign-in or model provider setup. If the tool cannot complete requests in the terminal, the daemon's invocations fail the same way.
-For CodeArts, verify the non-interactive path with `codearts run --model provider/model "Reply OK"`, not only the TUI. The current CodeArts CLI can let a custom provider work in the TUI while `run`, `models`, and `serve` still require [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html). Multica can discover custom models from `~/.codeartsdoer/codearts_cli.json` or `.jsonc`, but agent runs use `codearts run` and therefore follow its authorization requirements.
+Those login credentials are stored locally by the tool itself. Multica never receives login tokens from Claude, Codex, Cursor, or any other CLI.
-For Reasonix, run `reasonix setup` and configure a default provider and model before starting the daemon.
+Below the minimum version, the daemon does not register the corresponding runtime:
-For QwenPaw, choose the provider and model in QwenPaw's own configuration. Multica cannot override a QwenPaw model at run time.
+| Tool | Minimum version |
+| --- | --- |
+| Antigravity | 1.1.10 |
+| Claude Code | 2.0.0 |
+| Codex | 0.100.0 |
+| Copilot | 1.0.0 |
+| Grok | 0.2.89 |
+| Qwen Code | 0.20.0 |
+| MiniMax Code | 0.1.2 |
+| OpenCode | 1.1.54 |
+| Dim | 0.3.10 |
+| ZeroClaw | 0.8.0 |
-For MiniMax Code, install a supported Node.js release (`>=22.19 <23` or `>=24 <27`) and run `npm install --global @minimax-ai/code@latest`. A global npm install places `mcode` on npm's global binary path; if `command -v mcode` or `Get-Command mcode` cannot find it, add that path to `PATH`. Then run `mcode login`. MiniMax Code owns the model selection; Multica cannot override it through ACP.
+A few tools need extra setup beyond signing in:
-Muse Code requires 1.4.10 or later. Follow the [official installation and sign-in guide](https://dev.meta.ai/docs/muse-code), then confirm `muse` is on `PATH`. Multica discovers its models over MSP and supports continuing sessions.
+<Accordions type="multiple">
+<Accordion title="CodeArts" id="codearts">
-For DeepSeek Harness, install Node.js 20+ and run `npm install -g @deepseek-ai/dsh`, then give it the Multica runtime profile — the bundle that implements the `--stdio` protocol Multica drives, and the reason a bare `dsh` is not usable on its own. Set `MULTICA_DSH_PROFILE_BUNDLE` to the bundle to install and the daemon adds it for you, or add it yourself with `dsh plugin --profile multica add <bundle>`. `<bundle>` is anything `dsh plugin` accepts — an npm package name, a directory, or a packed tarball — and Multica's own bridge lives at [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime). It is not on a public npm registry yet ([multica#6936](https://github.com/multica-ai/multica/issues/6936)), so today a self-hosted team builds it from that repository and points the variable at the build directory, or at the tarball `npm pack` produces — the latter if the machine running the daemon is not the machine that built it. A package name becomes the simplest option once the bridge is published. Whatever you choose, prefer something your own team publishes or builds: this value is installed into every daemon host's DSH home without further confirmation, so an unvetted third-party package is a supply-chain decision, not a convenience. If you installed DeepSeek Harness Desktop instead of the npm package, the daemon also looks for the CLI shims that app generates, under its own per-user data directory — `~/Library/Application Support/DSH Desktop` on macOS, `%APPDATA%\DSH Desktop` on Windows. On Windows that is roaming application data, not the install directory: the app installs to Program Files or `%LOCALAPPDATA%\Programs`, but the CLI it drives lives beside its other per-user state. The version segment in those paths is a generated id, so the daemon enumerates them and prefers the newest. Nothing else is needed on `PATH` — a generated shim runs the Desktop app's own runtime by absolute path. If DSH Desktop is installed somewhere non-default, point `MULTICA_DSH_PATH` at the shim. The daemon registers DeepSeek Harness only after `dsh --profile multica --probe` succeeds, and reports the missing profile on `/health` when it does not. Set `DEEPSEEK_API_KEY` (or store it in dsh's own settings) before starting the daemon.
+Verify the non-interactive path with `codearts run --model provider/model "Reply OK"`, not only the TUI. The current CodeArts CLI can let a custom provider work in the TUI while `run`, `models`, and `serve` still require [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html). Multica can discover custom models from `~/.codeartsdoer/codearts_cli.json` or `.jsonc`, but agent runs use `codearts run` and therefore follow its authorization requirements.
-Those login credentials are stored locally by the tool itself. Multica never receives login tokens from Claude, Codex, Cursor, or any other CLI.
+</Accordion>
+<Accordion title="DeepSeek Harness" id="deepseek-harness">
+
+Install Node.js 20+ and run `npm install -g @deepseek-ai/dsh`, then give it the Multica runtime profile — the bundle that implements the `--stdio` protocol Multica drives, and the reason a bare `dsh` is not usable on its own. Set `DEEPSEEK_API_KEY` (or store it in dsh's own settings) before starting the daemon.
-<Callout type="info">
-Antigravity requires 1.1.10 or later, Claude Code requires 2.0.0 or later, Codex 0.100.0 or later, Copilot 1.0.0 or later, Grok 0.2.89 or later, Qwen Code 0.20.0 or later, MiniMax Code 0.1.2 or later, and OpenCode 1.1.54 or later. Below the minimum version, the daemon does not register the corresponding runtime.
+**Installing the profile.** Set `MULTICA_DSH_PROFILE_BUNDLE` to the bundle to install and the daemon adds it for you, or add it yourself with `dsh plugin --profile multica add <bundle>`. `<bundle>` is anything `dsh plugin` accepts — an npm package name, a directory, or a packed tarball — and Multica's own bridge lives at [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime). It is not on a public npm registry yet ([multica#6936](https://github.com/multica-ai/multica/issues/6936)), so today a self-hosted team builds it from that repository and points the variable at the build directory, or at the tarball `npm pack` produces — the latter if the machine running the daemon is not the machine that built it. A package name becomes the simplest option once the bridge is published.
+
+<Callout type="warning">
+Prefer a bundle your own team publishes or builds: this value is installed into every daemon host's DSH home without further confirmation, so an unvetted third-party package is a supply-chain decision, not a convenience.
</Callout>
-## 3. Confirm the daemon can find the command
+**DSH Desktop.** If you installed DeepSeek Harness Desktop instead of the npm package, the daemon also looks for the CLI shims that app generates, under its own per-user data directory — `~/Library/Application Support/DSH Desktop` on macOS, `%APPDATA%\DSH Desktop` on Windows. On Windows that is roaming application data, not the install directory: the app installs to Program Files or `%LOCALAPPDATA%\Programs`, but the CLI it drives lives beside its other per-user state. The version segment in those paths is a generated id, so the daemon enumerates them and prefers the newest. Nothing else is needed on `PATH` — a generated shim runs the Desktop app's own runtime by absolute path. If DSH Desktop is installed somewhere non-default, point `MULTICA_DSH_PATH` at the shim.
+
+The daemon registers DeepSeek Harness only after `dsh --profile multica --probe` succeeds, and reports the missing profile on `/health` when it does not.
+
+</Accordion>
+<Accordion title="MiniMax Code" id="minimax-code">
+
+Install a supported Node.js release (`>=22.19 <23` or `>=24 <27`) and run `npm install --global @minimax-ai/code@latest`. A global npm install places `mcode` on npm's global binary path; if `command -v mcode` or `Get-Command mcode` cannot find it, add that path to `PATH`. Then run `mcode login`. MiniMax Code owns the model selection; Multica cannot override it through ACP.
+
+</Accordion>
+<Accordion title="Muse Code" id="muse-code">
+
+Muse Code requires 1.4.10 or later. Follow the [official installation and sign-in guide](https://dev.meta.ai/docs/muse-code), then confirm `muse` is on `PATH`. Multica discovers its models over MSP and supports continuing sessions.
+
+</Accordion>
+<Accordion title="QwenPaw" id="qwenpaw">
+
+Choose the provider and model in QwenPaw's own configuration. Multica cannot override a QwenPaw model at run time.
-On macOS, Linux, or WSL, run:
+</Accordion>
+<Accordion title="Reasonix" id="reasonix">
+
+Run `reasonix setup` and configure a default provider and model before starting the daemon.
+
+</Accordion>
+</Accordions>
+
+</Step>
+<Step>
+
+## Confirm the daemon can find the command [#3-confirm-the-daemon-can-find-the-command]
+
+Replace `<command>` with a command from the table, such as `claude`, `codex`, or `cursor-agent`. The first command prints the executable path.
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+On macOS, Linux, or WSL:
```bash
command -v <command>
<command> --version
```
-In Windows PowerShell, run:
+</Tab>
+<Tab value="Windows">
+
+In Windows PowerShell:
```powershell
Get-Command <command>
<command> --version
```
-Replace `<command>` with a command from the table, such as `claude`, `codex`, or `cursor-agent`. The first command prints the executable path.
+</Tab>
+</Tabs>
If the terminal finds the tool but Desktop or the background daemon does not, the two are usually using different `PATH` values. Restart the app, or set an absolute path through the matching `MULTICA_<PROVIDER>_PATH` environment variable; full configuration is in [Environment variables](/environment-variables#daemon-configuration).
-## 4. Re-detect and confirm the runtime is online
+</Step>
+<Step>
+
+## Re-detect and confirm the runtime is online [#4-re-detect-and-confirm-the-runtime-is-online]
+
+<Tabs items={["CLI", "Desktop"]}>
+<Tab value="CLI">
-Start the daemon with the CLI:
+Start the daemon:
```bash
multica daemon start
@@ -100,7 +172,13 @@ If the daemon is already running, restart it after installing a new tool:
multica daemon restart
```
-With Multica Desktop, quit and reopen the app.
+</Tab>
+<Tab value="Desktop">
+
+Quit and reopen Multica Desktop.
+
+</Tab>
+</Tabs>
Then open Multica's **Runtimes** page. The tool appears under the target computer and shows as online. You can now select this runtime when creating or editing an agent.
@@ -108,6 +186,9 @@ Then open Multica's **Runtimes** page. The tool appears under the target compute
The daemon must detect at least one built-in supported CLI before it will start. Custom runtime profiles sync after the daemon is up, so they cannot be the sole startup condition on a blank machine. There is one exception: when the daemon has just begun installing the DSH runtime profile itself (`MULTICA_DSH_PROFILE_BUNDLE`), it starts with no runtimes and registers DeepSeek Harness once that install finishes. Without it, a host whose only tool is a DSH that needs the profile could never complete the install — the daemon would exit before it finished and take it down with it.
</Callout>
+</Step>
+</Steps>
+
## No tools detected
Check in order:
diff --git a/apps/docs/content/docs/install-agent-runtime.zh.mdx b/apps/docs/content/docs/install-agent-runtime.zh.mdx
index 153e7d783e..9ce62dbc5a 100644
--- a/apps/docs/content/docs/install-agent-runtime.zh.mdx
+++ b/apps/docs/content/docs/install-agent-runtime.zh.mdx
@@ -4,12 +4,18 @@ description: 安装并登录一款受支持的 AI 编程工具,让 Multica 在
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
-本地运行时由两部分组成:Multica 守护进程,以及它能够调用的一款 AI 编程工具。只需要安装你准备使用的工具,不必安装全部工具。
+本地运行时由两部分组成:Multica 守护进程,和它能调用的一款 AI 编程工具。只装你准备用的那一款就行,不必全部安装。
-## 1. 选择一款工具
+<Steps>
+<Step>
-已经安装并登录的工具不需要额外配置。工具之间的模型、MCP、会话恢复和 skill 支持有所不同,详细差异见 [AI 编程工具对照](/providers)。
+## 选择一款工具 [#1-选择一款工具]
+
+已经安装并登录的工具不需要额外配置。各工具在模型、MCP、会话恢复和 skill 支持上有差异,见 [AI 编程工具对照](/providers)。
Multica 当前会检测以下命令:
@@ -41,32 +47,88 @@ Multica 当前会检测以下命令:
| Reasonix | `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
| TRAE CLI | `traecli` | [TRAE 官方站](https://www.trae.cn/) |
| Dim | `dim` | [DimCode](https://dimagent.cn/docs/cli) |
+| ZeroClaw | `zeroclaw` | [ZeroClaw 快速开始](https://github.com/zeroclaw-labs/zeroclaw/blob/master/docs/book/src/getting-started/quickstart.md#install) |
"受支持"表示 Multica 能够调用对应 CLI,不代表 Multica 会替你提供该工具的账号、订阅或模型额度。
-## 2. 在本机完成登录
+</Step>
+<Step>
+
+## 在本机完成登录 [#2-在本机完成登录]
-安装后,先在终端中单独启动一次工具,并按照它自己的流程登录或配置模型服务。工具在终端中无法完成请求时,守护进程调用它同样会失败。
+安装后,先在终端里单独启动一次工具,按它自己的流程登录或配置模型服务。工具在终端中完成不了请求,守护进程调用它也会失败。
-使用 CodeArts 时,请用 `codearts run --model provider/model "只回复 OK"` 验证非交互模式,而不只是验证 TUI。当前 CodeArts CLI 可能允许自定义 provider 在 TUI 中工作,但 `run`、`models` 和 `serve` 仍要求配置 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)。Multica 可以从 `~/.codeartsdoer/codearts_cli.json` 或 `.jsonc` 发现自定义模型,但每次运行都会使用 `codearts run`,因此仍遵循该命令的授权要求。
+这些登录凭据由工具保存在本机。Multica 不会接收 Claude、Codex、Cursor 或其他 CLI 的登录 token。
-使用 Reasonix 时,请先运行 `reasonix setup`,配置默认的模型服务和模型,再启动守护进程。
+低于最低版本时,守护进程不会注册对应运行时:
-使用 QwenPaw 时,请在 QwenPaw 自身的配置里选择模型服务和模型。Multica 无法在执行时覆盖 QwenPaw 的模型。
+| 工具 | 最低版本 |
+| --- | --- |
+| Antigravity | 1.1.10 |
+| Claude Code | 2.0.0 |
+| Codex | 0.100.0 |
+| Copilot | 1.0.0 |
+| Grok | 0.2.89 |
+| Qwen Code | 0.20.0 |
+| MiniMax Code | 0.1.2 |
+| OpenCode | 1.1.54 |
+| Dim | 0.3.10 |
+| ZeroClaw | 0.8.0 |
-使用 MiniMax Code 时,请安装受支持的 Node.js 版本(`>=22.19 <23` 或 `>=24 <27`),并运行 `npm install --global @minimax-ai/code@latest`。全局 npm 安装会把 `mcode` 放入 npm 的全局可执行目录;如果 `command -v mcode` 或 `Get-Command mcode` 找不到它,请将该目录加入 `PATH`。然后运行 `mcode login`。模型由 MiniMax Code 管理,Multica 无法通过 ACP 覆盖它。
+以下工具除了登录,还要额外配置:
-Muse Code 需要 1.4.10 或更高版本。请按照[官方安装和登录指南](https://dev.meta.ai/docs/muse-code)操作,并确认 `muse` 已加入 `PATH`。Multica 通过 MSP 获取模型列表,支持继续已有会话。
+<Accordions type="multiple">
+<Accordion title="CodeArts" id="codearts">
-使用 DeepSeek Harness 时,请先安装 Node.js 20+ 并运行 `npm install -g @deepseek-ai/dsh`,然后为它安装 Multica 运行时 profile —— 这个 bundle 实现了 Multica 驱动的 `--stdio` 协议,也是单独的 `dsh` 无法直接使用的原因。把 `MULTICA_DSH_PROFILE_BUNDLE` 设为要安装的 bundle,守护进程会替你安装;也可以自己执行 `dsh plugin --profile multica add <bundle>`。`<bundle>` 可以是 `dsh plugin` 接受的任意形式——npm 包名、目录,或打包好的 tarball——Multica 自己的桥接实现在 [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime)。它目前还没有发布到公共 npm registry([multica#6936](https://github.com/multica-ai/multica/issues/6936)),所以现阶段自托管团队的做法是:从该仓库自行构建,然后把变量指向构建产物目录;如果运行守护进程的机器和构建机器不是同一台,就指向 `npm pack` 产出的 tarball。等桥接发布之后,直接填包名是最省事的选择。无论选哪种,都优先用你们自己发布或构建的产物:这个值会在没有二次确认的情况下被装进每一台守护进程宿主的 DSH 家目录,填一个未经审查的第三方包是供应链决策,不是图方便。如果你装的是 DeepSeek Harness Desktop 而不是 npm 包,守护进程也会去找这个应用生成的 CLI shim,位置在它自己的用户级数据目录下:macOS 是 `~/Library/Application Support/DSH Desktop`,Windows 是 `%APPDATA%\DSH Desktop`。Windows 上这是漫游应用数据目录,不是安装目录:应用本身装在 Program Files 或 `%LOCALAPPDATA%\Programs`,但它驱动的 CLI 和其他用户级状态放在一起。这些路径里的版本层是生成出来的 id,所以守护进程会枚举并优先取最新的一份。不需要 PATH 上有别的东西——生成的 shim 会用绝对路径调用应用自带的运行时。如果 DSH Desktop 装在非默认位置,请用 `MULTICA_DSH_PATH` 指向那个 shim。守护进程只有在 `dsh --profile multica --probe` 成功后才注册 DeepSeek Harness;失败时会在 `/health` 报告缺少 profile。启动守护进程前请设置 `DEEPSEEK_API_KEY`(或在 dsh 自身设置中保存)。
+用 `codearts run --model provider/model "只回复 OK"` 验证非交互模式,只验证 TUI 不够。当前 CodeArts CLI 可能允许自定义 provider 在 TUI 中工作,但 `run`、`models` 和 `serve` 仍要求配置 [`CODEARTS_CLI_AK` / `CODEARTS_CLI_SK`](https://support.huaweicloud.com/usermanual-cli/codeartsagent_cli_0026.html)。Multica 可以从 `~/.codeartsdoer/codearts_cli.json` 或 `.jsonc` 发现自定义模型,但每次运行都使用 `codearts run`,因此仍遵循该命令的授权要求。
-这些登录凭据由工具保存在本机。Multica 不会接收 Claude、Codex、Cursor 或其他 CLI 的登录 token。
+</Accordion>
+<Accordion title="DeepSeek Harness" id="deepseek-harness">
-<Callout type="info">
-Antigravity 需要 1.1.10 或更高版本,Claude Code 需要 2.0.0 或更高版本,Codex 需要 0.100.0 或更高版本,Copilot 需要 1.0.0 或更高版本,Grok 需要 0.2.89 或更高版本,Qwen Code 需要 0.20.0 或更高版本,MiniMax Code 需要 0.1.2 或更高版本,OpenCode 需要 1.1.54 或更高版本。低于最低版本时,守护进程不会注册对应运行时。
+先安装 Node.js 20+ 并运行 `npm install -g @deepseek-ai/dsh`,再为它安装 Multica 运行时 profile。这个 bundle 实现了 Multica 驱动的 `--stdio` 协议,单独的 `dsh` 因此无法直接使用。启动守护进程前,设置 `DEEPSEEK_API_KEY`(或保存在 dsh 自身的设置中)。
+
+**安装 profile。** 把 `MULTICA_DSH_PROFILE_BUNDLE` 设为要安装的 bundle,守护进程会替你安装;也可以自己执行 `dsh plugin --profile multica add <bundle>`。`<bundle>` 可以是 `dsh plugin` 接受的任意形式:npm 包名、目录,或打包好的 tarball。Multica 自己的桥接实现在 [multica-ai/dsh-multica-runtime](https://github.com/multica-ai/dsh-multica-runtime),目前还没有发布到公共 npm registry([multica#6936](https://github.com/multica-ai/multica/issues/6936))。现阶段自托管团队从该仓库自行构建,把变量指向构建产物目录;运行守护进程的机器和构建机器不是同一台时,指向 `npm pack` 产出的 tarball。桥接发布之后,直接填包名最省事。
+
+<Callout type="warning">
+优先使用你们自己发布或构建的产物。这个值会在没有二次确认的情况下装进每一台守护进程宿主的 DSH 家目录,填一个未经审查的第三方包,就是做了一次供应链决策。
</Callout>
-## 3. 确认守护进程能够找到命令
+**DSH Desktop。** 装的是 DeepSeek Harness Desktop 而不是 npm 包时,守护进程也会去找这个应用生成的 CLI shim,位置在它自己的用户级数据目录下:macOS 是 `~/Library/Application Support/DSH Desktop`,Windows 是 `%APPDATA%\DSH Desktop`。Windows 上这是漫游应用数据目录,不是安装目录:应用本身装在 Program Files 或 `%LOCALAPPDATA%\Programs`,它驱动的 CLI 则和其他用户级状态放在一起。这些路径里的版本层是生成的 id,守护进程会逐个枚举,优先取最新的一份。PATH 上不需要别的东西,生成的 shim 会用绝对路径调用应用自带的运行时。DSH Desktop 装在非默认位置时,用 `MULTICA_DSH_PATH` 指向那个 shim。
+
+守护进程只有在 `dsh --profile multica --probe` 成功后才注册 DeepSeek Harness;失败时会在 `/health` 报告缺少 profile。
+
+</Accordion>
+<Accordion title="MiniMax Code" id="minimax-code">
+
+安装受支持的 Node.js 版本(`>=22.19 <23` 或 `>=24 <27`),并运行 `npm install --global @minimax-ai/code@latest`。全局 npm 安装会把 `mcode` 放进 npm 的全局可执行目录;`command -v mcode` 或 `Get-Command mcode` 找不到它时,把该目录加入 `PATH`。然后运行 `mcode login`。模型由 MiniMax Code 管理,Multica 无法通过 ACP 覆盖。
+
+</Accordion>
+<Accordion title="Muse Code" id="muse-code">
+
+Muse Code 需要 1.4.10 或更高版本。按[官方安装和登录指南](https://dev.meta.ai/docs/muse-code)操作,并确认 `muse` 已加入 `PATH`。Multica 通过 MSP 获取模型列表,支持继续已有会话。
+
+</Accordion>
+<Accordion title="QwenPaw" id="qwenpaw">
+
+在 QwenPaw 自身的配置里选择模型服务和模型。Multica 无法在执行时覆盖 QwenPaw 的模型。
+
+</Accordion>
+<Accordion title="Reasonix" id="reasonix">
+
+先运行 `reasonix setup`,配置默认的模型服务和模型,再启动守护进程。
+
+</Accordion>
+</Accordions>
+
+</Step>
+<Step>
+
+## 确认守护进程能够找到命令 [#3-确认守护进程能够找到命令]
+
+把 `<command>` 换成表格中的命令,例如 `claude`、`codex` 或 `cursor-agent`。第一条命令返回可执行文件路径。
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
在 macOS、Linux 或 WSL 中运行:
@@ -75,6 +137,9 @@ command -v <command>
<command> --version
```
+</Tab>
+<Tab value="Windows">
+
在 Windows PowerShell 中运行:
```powershell
@@ -82,32 +147,48 @@ Get-Command <command>
<command> --version
```
-把 `<command>` 换成表格中的命令,例如 `claude`、`codex` 或 `cursor-agent`。第一条命令返回可执行文件路径。
+</Tab>
+</Tabs>
+
+终端能找到工具,Desktop 或后台守护进程却找不到,通常是两者用的 `PATH` 不同。可以重启应用,或通过对应的 `MULTICA_<PROVIDER>_PATH` 环境变量指定绝对路径;完整配置见[环境变量](/environment-variables#守护进程配置)。
+
+</Step>
+<Step>
-如果终端能够找到工具,但 Desktop 或后台守护进程找不到,通常是两者使用的 `PATH` 不同。可以重启应用,或通过对应的 `MULTICA_<PROVIDER>_PATH` 环境变量指定绝对路径;完整配置见[环境变量](/environment-variables#守护进程配置)。
+## 重新检测并确认上线 [#4-重新检测并确认上线]
-## 4. 重新检测并确认上线
+<Tabs items={["CLI", "Desktop"]}>
+<Tab value="CLI">
-使用 CLI 启动守护进程:
+启动守护进程:
```bash
multica daemon start
```
-如果守护进程已经运行,安装新工具后重新启动:
+守护进程已经在运行时,安装新工具后重新启动:
```bash
multica daemon restart
```
-使用 Multica Desktop 时,退出并重新打开应用即可。
+</Tab>
+<Tab value="Desktop">
-然后打开 Multica 的**运行时**页面。目标电脑下面会出现对应工具,并显示为在线。现在可以在创建或编辑智能体时选择这条运行时。
+退出并重新打开 Multica Desktop。
+
+</Tab>
+</Tabs>
+
+然后打开 Multica 的**运行时**页面,目标电脑下面会出现对应工具,并显示为在线。之后创建或编辑智能体时,就可以选这条运行时。
<Callout type="warning">
-守护进程启动时必须先检测到至少一款内置支持的 CLI。自定义运行时配置会在守护进程启动后同步,因此不能作为一台空白机器上的唯一启动条件。只有一个例外:当守护进程刚开始自行安装 DSH 运行时 profile(`MULTICA_DSH_PROFILE_BUNDLE`)时,它会在没有任何运行时的情况下启动,并在安装完成后注册 DeepSeek Harness。否则,一台只装了需要该 profile 的 DSH 的机器永远装不完——守护进程会在安装结束前退出,并把安装进程一起带走。
+守护进程启动时必须先检测到至少一款内置支持的 CLI。自定义运行时配置在守护进程启动后才同步,所以在一台空白机器上不能只靠它启动。只有一个例外:守护进程刚开始自行安装 DSH 运行时 profile(`MULTICA_DSH_PROFILE_BUNDLE`)时,会在没有任何运行时的情况下启动,安装完成后再注册 DeepSeek Harness。否则,一台只装了需要该 profile 的 DSH 的机器永远装不完:守护进程会在安装结束前退出,把安装进程一起带走。
</Callout>
+</Step>
+</Steps>
+
## 未检测到工具
依次检查:
@@ -118,7 +199,7 @@ multica daemon restart
4. 重启守护进程,让它重新读取当前环境。
5. 回到**运行时**页面,确认电脑和工具都已上线。
-工具已经显示在线,但执行仍然失败时,打开任务的执行记录查看 CLI 返回的具体错误,或继续阅读[故障排查](/troubleshooting)。
+工具显示在线、执行却仍然失败时,打开任务的执行记录查看 CLI 返回的具体错误,或继续看[故障排查](/troubleshooting)。
## 接下来
diff --git a/apps/docs/content/docs/issue-wakeups.fr.mdx b/apps/docs/content/docs/issue-wakeups.fr.mdx
new file mode 100644
index 0000000000..d0d535aa99
--- /dev/null
+++ b/apps/docs/content/docs/issue-wakeups.fr.mdx
@@ -0,0 +1,171 @@
+---
+title: Réveils de tâches
+description: Posez une règle de réveil sur une tâche pour qu'un agent y revienne à une heure donnée ou après un événement.
+---
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WakeupDemo } from "@/components/demos/wakeup-demo";
+
+Certains travaux s'arrêtent à mi-chemin et attendent : le devis d'un fournisseur, la réponse d'un collègue, la fin des sous-tâches. Ajoutez alors un **réveil** à la tâche : une règle du type « quand ceci se produit, réveiller tel agent pour qu'il fasse cela ». Quand la condition est remplie, l'agent démarre une exécution ordinaire sur la tâche, lit où en sont les choses et publie son résultat en commentaire, comme d'habitude.
+
+La règle est enregistrée sur la tâche : rien ne tourne pendant l'attente. Les membres créent des réveils depuis la barre latérale de la tâche ; les agents programment eux-mêmes leur prochaine vérification pendant une exécution, avec le [CLI](#cli). Dans les deux cas, c'est la même règle.
+
+## Créer un réveil [#create]
+
+<Steps>
+<Step>
+
+Ouvrez la tâche et cliquez sur **+** à côté de **Réveils** dans la barre latérale.
+
+</Step>
+<Step>
+
+Après **Quand**, choisissez une condition et complétez ce qu'elle demande : une heure, la personne attendue, le statut attendu…
+
+</Step>
+<Step>
+
+Après **Réveiller**, choisissez l'agent. Si l'assigné de la tâche est un agent, il est déjà sélectionné. Seuls les agents liés à un runtime et que vous avez le droit d'exécuter sont proposés ; voir [Permissions et accès](/agents#permissions-et-accès).
+
+</Step>
+<Step>
+
+Sous **Action au réveil**, écrivez l'instruction, par exemple « Vérifie si tous les fournisseurs ont envoyé leur devis et, si oui, fais un tableau comparatif ». Elle peut atteindre 12 000 octets. Vous pourrez la modifier plus tard ; la modification ne vaut que pour les réveils suivants.
+
+</Step>
+<Step>
+
+Cliquez sur **Créer**.
+
+</Step>
+</Steps>
+
+Les exécutions lancées par un réveil agissent au nom de la personne qui l'a créé, et Multica vérifie de nouveau, avant que l'exécution ne démarre, que cette personne peut toujours exécuter l'agent.
+
+Dans la tâche ci-dessous, Assistant ops a demandé des devis et attend les réponses des fournisseurs. Ajoutez un réveil, puis avancez jusqu'à l'heure prévue. Avec « Vérifier régulièrement », vous verrez aussi comment l'agent termine une vérification sans commenter quand rien n'est encore arrivé.
+
+<WakeupDemo />
+
+## Ce que vous pouvez attendre [#conditions]
+
+| Groupe | Condition | Réveille l'agent quand |
+|---|---|---|
+| Temps | À une heure donnée | Dans 10 minutes, dans 1 heure, demain à 09:00 ou à l'heure choisie. Une seule fois. |
+| Temps | Vérifier régulièrement | Toutes les heures, chaque jour à 09:00 ou les jours ouvrés à 09:00, dans votre fuseau horaire. Une date de fin est obligatoire ; la règle s'arrête à la fin de ce jour-là. |
+| Collaboration | Quelqu’un répond | Un nouveau commentaire arrive sur la tâche ; vous pouvez le limiter à un membre ou à un agent. |
+| Collaboration | Un champ prend une valeur | Le statut, l'assigné, une étiquette ou une propriété personnalisée de la tâche prend la valeur choisie. |
+| Exécutions et sous-tâches | L’exécution d’un agent se termine | Une exécution d'un agent donné (ou de n'importe quel agent) sur cette tâche réussit, échoue ou est annulée. |
+| Exécutions et sous-tâches | Les sous-tâches se terminent | Toutes les sous-tâches sont closes (`done` ou `cancelled`), ou toutes celles jusqu'à l'étape choisie. Sans sous-tâche, la règle ne se déclenche jamais. |
+| Liés | La CI d’une PR liée se termine | Ou la PR est fusionnée, ou elle a des conflits de fusion. Seules les PR liées directement à cette tâche comptent ; s'il y en a plusieurs, une seule suffit. CI et conflits ne fonctionnent qu'avec les pull requests GitHub. |
+| Liés | Le statut d’une autre tâche | Une autre tâche est terminée, terminée ou annulée, ou passe en revue. |
+| | Événements personnalisés | Choisissez parmi 25 événements bruts : réactions, pièces jointes, commentaires modifiés, fils résolus… |
+
+Multica vérifie lui-même les conditions sur un champ, les sous-tâches, les PR et les autres tâches. Si la condition est déjà remplie à la création, la vérification suivante (dans les 30 secondes environ) réveille l'agent. La CI fait exception : seules les vérifications terminées après la création de la règle comptent.
+
+Toutes les conditions autres que le temps attendent un événement et ont trois réglages de plus :
+
+- **Déclenchements** : **Déclencher une fois** par défaut. Avec **Réveils répétés**, fixez aussi le nombre maximal avec **Au plus** (5, 10, 20 ou 50 fois ; 20 par défaut).
+- **Attendre au plus** : 1, 3, 7 ou 30 jours ; 7 par défaut.
+- **Ensuite** (ce qui se passe à l'échéance) : par défaut, l'agent est réveillé pour s'en occuper et apprend que l'événement attendu n'a pas eu lieu. **Terminer sans exécution** clôt la règle sans bruit.
+
+Quand l'assigné de la tâche est un agent, les commentaires des membres le déclenchent déjà. Un réveil « Quelqu’un répond » pour ce même agent n'ajoute pas d'exécution : il rejoint celle que lance le commentaire. Ne l'ajoutez que pour lui donner des instructions supplémentaires.
+
+## Après le réveil [#after-wake]
+
+- L'agent démarre une exécution ordinaire sur la tâche, lit la tâche, les commentaires et l'instruction du réveil, puis publie un commentaire. Ce commentaire porte l'étiquette « Réveil » avec la condition, et le [journal d'exécution](/tasks) affiche le même déclencheur.
+- Quand une vérification régulière ne trouve rien qui demande une réponse, l'agent peut terminer par une **vérification silencieuse** : pas de commentaire, seulement une note dans l'historique de la tâche et dans l'historique de la règle. Les vérifications silencieuses successives sont regroupées en une seule entrée.
+- Les commentaires et les modifications d'un agent ne le réveillent jamais lui-même.
+- Si le même agent a déjà une exécution en attente de démarrage sur la tâche, le réveil rejoint cette exécution au lieu d'en lancer une autre.
+- Tant qu'un réveil attend, l'en-tête de la tâche indique ce qu'elle attend, par exemple « Assistant ops : Attend une réponse ». Un clic mène à la section Réveils.
+
+## Consulter et gérer [#manage]
+
+La section Réveils de la barre latérale liste les règles de la tâche : la condition, qui est réveillé, le prochain réveil et le temps restant. Cliquez sur une règle pour voir sa source, son échéance, son instruction et son **historique** (les dernières exécutions, si chacune a commenté, et ce qu'a trouvé chaque vérification silencieuse).
+
+| Action | Effet |
+|---|---|
+| Désactiver l'interrupteur | Arrête les réveils suivants et retire les exécutions pas encore démarrées. Une exécution déjà lancée continue ; arrêtez-la depuis le journal d'exécution si besoin. |
+| **Réveiller maintenant** | Réveille l'agent une fois tout de suite, sans attendre la condition. |
+| Modifier l'instruction | Ne vaut que pour les réveils suivants ; une exécution en cours ne change pas. |
+| **Supprimer** | La règle ne réveille plus personne. Les exécutions pas encore démarrées sont retirées, celles qui ont démarré continuent. |
+| **Réactiver** / **Choisir une nouvelle heure** | Réactive une règle unique après son déclenchement. Une règle à heure fixe demande une nouvelle heure. |
+
+Les règles terminées passent dans l'**Historique des réveils**. Seuls le créateur de la règle et les owners et admins de l'espace de travail peuvent la gérer. Un réveil créé par un agent pendant une exécution appartient au membre qui a lancé cette exécution, et s'affiche ainsi : « Assistant ops, pour Lei Li ».
+
+Pour voir tous les réveils de l'espace de travail, ouvrez **Automatisation** et passez à l'onglet **Réveils de tâches**. Vous pouvez filtrer par état (En attente ou en cours, En pause, Désactivés, Terminés), type de déclencheur, source et agent, en désactiver plusieurs à la fois, ou créer un réveil après avoir choisi sa tâche.
+
+## Fins et pauses automatiques [#limits]
+
+- Quand une tâche est terminée ou annulée, tous ses réveils sont désactivés et les exécutions pas encore démarrées sont retirées. Rouvrir la tâche ne les rétablit pas. On ne peut pas créer de réveil sur une tâche terminée ou annulée.
+- Une règle d'attente qui atteint sa limite **Attendre au plus** applique son réglage **Ensuite** ; une vérification régulière s'arrête à sa date de fin.
+- Une règle répétée se met en pause quand elle atteint son nombre maximal de déclenchements. Les règles d'attente se mettent aussi en pause quand elles se déclenchent mutuellement avec d'autres réveils (la chaîne passe une troisième fois par la règle sans intervention humaine), ou quand elles se déclenchent plus de 12 fois en une heure. Une règle en pause reste désactivée jusqu'à ce que quelqu'un la réactive, et son compteur repart de zéro.
+- Une tâche peut avoir au plus 32 réveils actifs, un espace de travail au plus 1 000.
+
+## Réveiller le parent quand les sous-tâches se terminent [#child-done]
+
+Quand une tâche a des sous-tâches, sa section Réveils affiche une règle marquée **Système**. Personne n'a besoin de la créer :
+
+- Quand toutes les sous-tâches d'une étape sont closes alors qu'une étape suivante attend, elle réveille l'assigné du parent, puis une fois encore quand toutes les sous-tâches sont closes. Des sous-tâches sans étape réveillent le parent une fois, à la clôture de la dernière.
+- Un agent assigné est réveillé ; pour un squad, c'est son chef ; un membre assigné reçoit plutôt une notification dans sa boîte de réception. Sans assigné, personne n'est réveillé.
+- Tant que le parent est en `backlog`, rien n'est réveillé ; le réveil a lieu une fois le parent sorti de `backlog`.
+- L'instruction par défaut indique à l'agent quelle étape s'est close et laquelle suit : vérifier ses dépendances, puis sortir de `backlog` les sous-tâches de l'étape suivante. Quand tout est clos, il rassemble les résultats sur le parent.
+
+L'assigné du parent est déjà réveillé par cette règle : inutile d'ajouter un réveil « Les sous-tâches se terminent » pour la même chose. Pour définir des étapes, voir [Tâches](/issues#projets-et-sous-tâches).
+
+Sur une tâche donnée, tout membre de l'espace de travail peut désactiver cette règle ou réécrire son instruction (jusqu'à 4 000 octets) ; les agents ne peuvent pas la modifier. Une fois modifiée, la tâche ne suit plus la valeur par défaut de l'espace de travail.
+
+Les owners et admins règlent les valeurs par défaut dans **Paramètres → Réveils** : activée ou non par défaut (elle l'est) et l'instruction par défaut. Sans instruction par défaut, l'instruction intégrée s'applique. La page indique aussi combien de tâches en cours utilisent leur propre réglage.
+
+## Laisser les agents programmer leurs réveils [#cli]
+
+Pendant une exécution, un agent utilise `multica issue wakeup` pour programmer la prochaine exécution sur la tâche, puis termine l'exécution en cours. Sans `--agent-id`, le réveil vise l'agent qui lance la commande. Vous pouvez utiliser les mêmes commandes depuis votre terminal ; indiquez alors l'agent avec `--agent-id`.
+
+```bash
+# Revoir demain à 09:00 (heure de Shanghai)
+multica issue wakeup create OPS-56 --kind at --at 2026-10-21T09:00:00+08:00 \
+ --instruction "Vérifier si tous les fournisseurs ont envoyé leur devis ; si oui, faire un tableau comparatif"
+
+# Vérifier chaque jour ouvré à 09:00 pendant une semaine
+multica issue wakeup create OPS-56 --kind cron --cron "0 9 * * 1-5" --timezone Asia/Shanghai \
+ --expires-in 168h --instruction "Consulter les e-mails de devis et mettre à jour le tableau"
+
+# Attendre jusqu'à 3 jours la réponse de Lei Li ; réveiller quand même à l'échéance
+multica issue wakeup create OPS-56 --event comment.created \
+ --filter-actor-type member --filter-actor-id <id-utilisateur-de-Lei-Li> \
+ --expires-in 72h --on-timeout wake --instruction "Poursuivre selon la réponse de Lei Li"
+
+# Attendre que la tâche passe en revue
+multica issue wakeup create OPS-56 --until-status in_review --instruction "Vérifier les livrables et faire la synthèse"
+```
+
+- **Temps** : `--kind at` avec `--after 10m` ou `--at <heure RFC3339>` ; `--kind every --every 1h` pour un intervalle fixe d'au moins 1 minute ; `--kind cron --cron "<expression à 5 champs>"` avec `--timezone` (UTC par défaut).
+- **Événements** : indiquez les noms d'événements après `--event`, séparés par des virgules. `multica issue wakeup events` liste tous les événements et filtres. `--mode continuous` rend la règle répétée.
+- **Conditions** : `--until-status`, `--until-assignee`, `--until-label`, `--until-property`, `--until-children-done [--stage N]`, `--until-pr checks|merged|conflicts` et `--until-issue <tâche> --until-issue-state done|ended|in_review`. Un seul `--until-*` par réveil, et jamais avec `--event`.
+- **Fin** : le CLI n'ajoute pas d'échéance à votre place. Utilisez `--expires-in 72h` ou `--expires-at <heure RFC3339>` ; `--on-timeout wake` fait qu'une règle d'événement réveille l'agent une dernière fois à l'échéance. `--max-fires N` (1–1000) limite le nombre d'exécutions d'une règle répétée.
+- **Où va la réponse** : `--parent <id-de-commentaire>` garde la réponse de l'exécution réveillée dans le fil d'origine.
+
+Pour gérer les règles existantes :
+
+| Commande | Rôle |
+|---|---|
+| `multica issue wakeup list <tâche>` | Lister les réveils de la tâche |
+| `multica issue wakeup get <tâche> <id-réveil>` | Afficher toute la configuration d'un réveil |
+| `multica issue wakeup runs <tâche> <id-réveil>` | Dernières exécutions, leur déclencheur, notes de vérification silencieuse et commentaire publié ou non |
+| `multica issue wakeup update <tâche> <id-réveil>` | Remplacer toute la configuration avec les mêmes options que `create`, et la réactiver |
+| `multica issue wakeup disable <tâche> <id-réveil>` | Désactiver et retirer les exécutions pas encore démarrées |
+| `multica issue wakeup trigger <tâche> <id-réveil>` | Réveiller l'agent une fois tout de suite |
+| `multica issue wakeup delete <tâche> <id-réveil>` | Supprimer la règle et retirer les exécutions pas encore démarrées |
+| `multica issue wakeup checkin <tâche> <id-réveil> --note "..."` | Terminer en silence une vérification régulière qui n'a rien trouvé ; seule une exécution lancée par cette règle peut l'appeler |
+
+`list`, `get` et `runs` affichent un tableau avec `--output table`. Pour les autres commandes, voir [Utiliser le CLI](/cli).
+
+## Réveils et automatisations [#vs-autopilots]
+
+Une [automatisation](/autopilots) lance du travail nouveau, encore et encore, à partir d'un calendrier ou d'un webhook, et peut créer une tâche à chaque fois. Un réveil appartient à une tâche existante : il ramène un agent vers cette tâche après une heure ou un événement donnés, et se termine avec elle.
+
+## Étapes suivantes
+
+- [Mettre les agents au travail](/triggering-agents) — les autres façons de lancer le travail.
+- [Automatisations](/autopilots) — lancer du travail récurrent par calendrier ou webhook.
+- [Exécutions](/tasks) — voir les exécutions lancées par un réveil.
+- [Tâches](/issues) — sous-tâches et étapes.
diff --git a/apps/docs/content/docs/issue-wakeups.ja.mdx b/apps/docs/content/docs/issue-wakeups.ja.mdx
new file mode 100644
index 0000000000..99e52e5c27
--- /dev/null
+++ b/apps/docs/content/docs/issue-wakeups.ja.mdx
@@ -0,0 +1,171 @@
+---
+title: タスクのウェイクアップ
+description: タスクにウェイクアップのルールを設定し、決めた時刻や出来事のあとでエージェントをそのタスクに戻らせます。
+---
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WakeupDemo } from "@/components/demos/wakeup-demo";
+
+作業によっては途中で待つしかありません。仕入れ先の見積もり、同僚の返事、サブタスクの完了などです。そんなときはタスクに**ウェイクアップ**のルールを追加します。「これが起きたら、このエージェントを起こして、これをさせる」というルールです。条件を満たすと、エージェントはそのタスクで通常の実行を始め、最新の状況を読み、結果をいつもどおりコメントで返します。
+
+ルールはタスクに保存されるので、待っている間に動いている実行はありません。メンバーはタスクのサイドバーから、エージェントは実行中に [CLI](#cli) から次の確認を予約します。どちらも同じ種類のルールになります。
+
+## ウェイクアップを作成する [#create]
+
+<Steps>
+<Step>
+
+タスクを開き、サイドバーの**ウェイクアップ**欄の右にある **+** をクリックします。
+
+</Step>
+<Step>
+
+**条件**で条件を選び、時刻、待つ相手、待つステータスなど、条件に必要な項目を埋めます。
+
+</Step>
+<Step>
+
+**起こす**でエージェントを選びます。タスクの担当者がエージェントなら、最初から選ばれています。選べるのは、ランタイムに紐づいていて、あなたが実行する権限を持つエージェントだけです。[権限と Access](/agents#権限と-access) を参照してください。
+
+</Step>
+<Step>
+
+**起動後に行うこと**に指示を書きます。たとえば「仕入れ先から見積もりがそろったか確認し、そろっていれば比較表にまとめる」。最大 12,000 バイトです。あとで編集でき、変更はそれ以降のウェイクアップにだけ反映されます。
+
+</Step>
+<Step>
+
+**作成**をクリックします。
+
+</Step>
+</Steps>
+
+ウェイクアップが始める実行は作成者の代理として動きます。実行が始まる前に、作成者がまだそのエージェントを実行できるかどうかを Multica が確認し直します。
+
+次のタスクでは、運用アシスタントが見積もりを依頼し、仕入れ先の返信を待っています。ウェイクアップを追加して、起動時刻まで早送りしてみてください。「定期チェック」を選ぶと、まだ何も届いていない日にエージェントがコメントせずに確認を終える様子も見られます。
+
+<WakeupDemo />
+
+## 待てるもの [#conditions]
+
+| グループ | 条件 | 起こすタイミング |
+|---|---|---|
+| 時間 | 指定した時刻 | 10 分後、1 時間後、明日 09:00、または指定した時刻。一度だけ起こします。 |
+| 時間 | 定期チェック | 毎時、毎日 09:00、平日 09:00 のいずれかで、あなたのタイムゾーンで計算します。終了日が必須で、その日が終わると止まります。 |
+| コラボレーション | 誰かが返信 | タスクに新しいコメントが付いたとき。特定のメンバーやエージェントに絞れます。 |
+| コラボレーション | フィールドが特定の値になる | タスクのステータス、担当者、ラベル、カスタムプロパティが指定した値になったとき。 |
+| 実行とサブタスク | エージェントの実行が終了 | このタスクで特定の(または任意の)エージェントの実行が成功、失敗、キャンセルになったとき。 |
+| 実行とサブタスク | サブタスクが終わる | すべてのサブタスクが閉じた(`done` または `cancelled`)とき、または指定したステージまでがすべて閉じたとき。サブタスクがなければ起動しません。 |
+| 関連 | 関連 PR の CI が終わる | PR のマージやマージコンフリクトも選べます。このタスクに直接関連付けた PR だけが対象で、複数あればどれか 1 つで条件を満たします。CI とコンフリクトは GitHub の PR だけに対応しています。 |
+| 関連 | 別のタスクのステータス | 別のタスクが完了、完了またはキャンセル、レビュー中になったとき。 |
+| | カスタムイベント | リアクション、添付ファイル、コメントの編集、スレッドの解決など、25 種類のイベントから選びます。 |
+
+フィールド、サブタスク、PR、別のタスクの条件は Multica 自身が確認します。作成した時点で条件がすでに成り立っていれば、次の確認(約 30 秒以内)で起動します。CI だけは例外で、作成後に終わったチェックしか数えません。
+
+時間以外の条件は「何かが起きるのを待つ」ルールで、設定がさらに 3 つあります。
+
+- **トリガー回数**:既定は**一度だけ起動**です。**繰り返し起動**にした場合は、**最大**回数(5、10、20、50 回。既定は 20 回)も決めます。
+- **最大待機**:1、3、7、30 日。既定は 7 日です。
+- **期限後**:既定ではエージェントを起こして対応させます。待っていたことが起きなかったと伝わります。**そのまま終了**も選べます。
+
+タスクの担当者がエージェントの場合、メンバーのコメントはもともとそのエージェントを起動します。同じエージェントに「誰かが返信」のウェイクアップを追加しても実行は増えず、コメントで始まる実行に合流するだけです。追加の指示を渡したいときだけ使ってください。
+
+## 起動したあと [#after-wake]
+
+- エージェントはタスクで通常の実行を始め、タスク、コメント、ウェイクアップの指示を読み、最後にコメントを 1 件投稿します。コメントには「起動」タグと条件が付き、[実行ログ](/tasks)にも同じきっかけが表示されます。
+- 定期チェックで返信が必要なことが何もなければ、エージェントは**サイレントチェック**で終えられます。コメントは投稿せず、タスクのタイムラインとルールの起動履歴にメモだけを残します。続いたサイレントチェックはタイムラインで 1 件にまとまります。
+- エージェント自身のコメントやタスクへの変更で、そのエージェントが起こされることはありません。
+- 同じエージェントの実行がこのタスクで開始待ちなら、ウェイクアップはその実行に合流し、別の実行は始めません。
+- ウェイクアップが待っている間、タスクのヘッダーには「運用アシスタント:返信待ち」のように、タスクが何を待っているかが表示されます。クリックするとウェイクアップ欄に移動します。
+
+## 確認と管理 [#manage]
+
+サイドバーのウェイクアップ欄には、このタスクのルールが並びます。条件、誰を起こすか、次の起動時刻、残り時間が表示されます。ルールをクリックすると、作成元、期限、指示、**起動履歴**(最近の実行、コメントしたかどうか、サイレントチェックの内容)を確認できます。
+
+| 操作 | 結果 |
+|---|---|
+| スイッチをオフ | 以降のウェイクアップを止め、まだ始まっていない実行を取り下げます。始まった実行は続くので、必要なら実行ログで停止します。 |
+| **今すぐ起こす** | 条件を待たずに、このルールで今すぐ 1 回起こします。 |
+| 指示を編集 | 以降のウェイクアップにだけ反映されます。実行中の実行は変わりません。 |
+| **削除** | ルールはもう起動しません。まだ始まっていない実行は取り下げ、始まったものは続きます。 |
+| **再度有効にする** / **時刻を再設定** | 一度だけのルールを起動後にもう一度有効にします。時刻指定のルールは新しい時刻を選びます。 |
+
+終わったルールは**ウェイクアップ履歴**に移ります。ルールを管理できるのは、作成者とワークスペースの owner、admin だけです。エージェントが実行中に作ったウェイクアップは、その実行を始めたメンバーのものとして扱われ、「運用アシスタント が作成(李雷 の代理)」と表示されます。
+
+ワークスペース全体のウェイクアップは、**オートパイロット**ページの**タスクのウェイクアップ**タブで確認できます。状態(起動待ち・実行中、一時停止中、無効、終了)、トリガーの種類、作成元、エージェントで絞り込み、まとめて無効にしたり、タスクを選んでから新しく作成したりできます。
+
+## 自動で終わる・止まる場合 [#limits]
+
+- タスクが完了またはキャンセルになると、そのタスクのウェイクアップはすべて無効になり、まだ始まっていない実行は取り下げられます。タスクを開き直しても元には戻りません。完了またはキャンセルしたタスクには作成できません。
+- 待つルールが**最大待機**に達すると、**期限後**の設定どおりに処理します。定期チェックは終了日で止まります。
+- 繰り返すルールは最大回数に達すると自動で一時停止します。待つルールはさらに、ほかのウェイクアップと互いに起こし合ったとき(人を挟まずにトリガーの連鎖が 3 回目にそのルールを通ったとき)と、1 時間に 12 回を超えて起動したときにも一時停止します。一時停止したルールは誰かがオンに戻すまで止まったままで、回数は数え直しになります。
+- 1 つのタスクで同時に有効にできるのは 32 件まで、ワークスペース全体では 1,000 件までです。
+
+## サブタスクが終わったら親を起こす [#child-done]
+
+サブタスクがあるタスクでは、ウェイクアップ欄に**システム**の印が付いたルールが表示されます。手で作る必要はありません。
+
+- あるステージのサブタスクがすべて閉じ、後ろのステージがまだ待っているときに、親タスクの担当者を起こします。すべてのサブタスクが閉じたときにもう一度起こします。ステージのないサブタスクは、最後の 1 件が閉じたときに一度起こします。
+- 担当者がエージェントならそのエージェントを、スクワッドならリーダーを起こします。メンバーには代わりにインボックスへ通知します。担当者がいなければ誰も起こしません。
+- 親タスクが `backlog` の間は起こしません。`backlog` を出たときにまとめて一度起こします。
+- 既定の指示は、どのステージが閉じ、次がどれかをエージェントに伝え、依存関係を確認してから次のステージのサブタスクを `backlog` から出すよう求めます。すべて閉じたときは、結果を親タスクにまとめます。
+
+親タスクの担当者はこのルールで起こされるので、同じ目的で「サブタスクが終わる」のウェイクアップを追加する必要はありません。ステージの設定は[タスク](/issues#プロジェクトと子タスク)を参照してください。
+
+個々のタスクでは、ワークスペースのメンバーなら誰でもこのルールをオフにしたり、指示(最大 4,000 バイト)を書き換えたりできます。エージェントは変更できません。変更したタスクは、ワークスペースの既定値に従わなくなります。
+
+ワークスペースの owner と admin は、**設定 → ウェイクアップ**で既定値を決めます。既定でオンにするか(初期状態はオン)と既定の指示です。既定の指示が空なら組み込みの指示を使います。このページには、独自の設定を使っている進行中のタスクの数も表示されます。
+
+## エージェントに自分で予約させる [#cli]
+
+エージェントは実行中に `multica issue wakeup` でこのタスクの次の実行を予約し、今の実行を終えます。`--agent-id` を省くと、コマンドを実行しているエージェント自身を起こします。自分のターミナルから同じコマンドを使うこともでき、その場合は `--agent-id` でエージェントを指定します。
+
+```bash
+# 明日の 09:00(上海時間)にもう一度見る
+multica issue wakeup create OPS-56 --kind at --at 2026-10-21T09:00:00+08:00 \
+ --instruction "仕入れ先から見積もりがそろったか確認し、そろっていれば比較表にまとめる"
+
+# 平日の毎朝 09:00 に確認し、1 週間で終える
+multica issue wakeup create OPS-56 --kind cron --cron "0 9 * * 1-5" --timezone Asia/Shanghai \
+ --expires-in 168h --instruction "見積もりメールを確認し、新しい見積もりがあれば比較表を更新する"
+
+# 李雷の返信を最大 3 日待ち、期限になっても一度起こす
+multica issue wakeup create OPS-56 --event comment.created \
+ --filter-actor-type member --filter-actor-id <李雷のユーザー ID> \
+ --expires-in 72h --on-timeout wake --instruction "李雷の回答に沿って進める"
+
+# タスクがレビュー中になるまで待つ
+multica issue wakeup create OPS-56 --until-status in_review --instruction "成果物を確認してまとめる"
+```
+
+- **時間**:`--kind at` に `--after 10m` または `--at <RFC3339 の時刻>`。`--kind every --every 1h` で一定間隔(最短 1 分)。`--kind cron --cron "<5 フィールドの式>"` には `--timezone` を付けます(既定は UTC)。
+- **イベント**:`--event` のあとにイベント名をカンマ区切りで書きます。`multica issue wakeup events` ですべてのイベントとフィルターを一覧できます。`--mode continuous` で繰り返し起動になります。
+- **条件**:`--until-status`、`--until-assignee`、`--until-label`、`--until-property`、`--until-children-done [--stage N]`、`--until-pr checks|merged|conflicts`、`--until-issue <タスク> --until-issue-state done|ended|in_review`。1 つのウェイクアップに使える `--until-*` は 1 つだけで、`--event` とは併用できません。
+- **終わり方**:CLI は待つ期限を自動では付けません。`--expires-in 72h` か `--expires-at <RFC3339 の時刻>` で終わりを決めます。`--on-timeout wake` を付けると、イベントのルールは期限が来たときにもう一度起こします。`--max-fires N`(1〜1000)で繰り返すルールの実行回数に上限を付けます。
+- **返信先**:`--parent <コメント ID>` を付けると、起動後の返信が元のスレッドに入ります。
+
+既存のルールを管理するコマンド:
+
+| コマンド | 内容 |
+|---|---|
+| `multica issue wakeup list <タスク>` | タスクのウェイクアップを一覧する |
+| `multica issue wakeup get <タスク> <ウェイクアップ ID>` | 1 件の設定をすべて表示する |
+| `multica issue wakeup runs <タスク> <ウェイクアップ ID>` | 最近の実行、起動理由、サイレントチェックのメモ、コメントしたかどうか |
+| `multica issue wakeup update <タスク> <ウェイクアップ ID>` | `create` と同じフラグで設定全体を置き換え、オンに戻す |
+| `multica issue wakeup disable <タスク> <ウェイクアップ ID>` | オフにして、まだ始まっていない実行を取り下げる |
+| `multica issue wakeup trigger <タスク> <ウェイクアップ ID>` | 今すぐ 1 回起こす |
+| `multica issue wakeup delete <タスク> <ウェイクアップ ID>` | ルールを削除し、まだ始まっていない実行を取り下げる |
+| `multica issue wakeup checkin <タスク> <ウェイクアップ ID> --note "..."` | 返信が必要なことがない定期チェックを静かに終える。このルールが始めた実行からだけ呼べる |
+
+`list`、`get`、`runs` は `--output table` で表形式になります。ほかのコマンドは [CLI を使う](/cli)を参照してください。
+
+## オートパイロットとの違い [#vs-autopilots]
+
+[オートパイロット](/autopilots)はスケジュールや Webhook から新しい作業を繰り返し始め、そのたびにタスクを作ることもできます。ウェイクアップは既存の 1 つのタスクに付き、決めた時刻や出来事のあとでエージェントをそのタスクに戻らせ、タスクが終わればウェイクアップも終わります。
+
+## 次のステップ
+
+- [エージェントに仕事を任せる](/triggering-agents) — 作業を始めるほかの方法。
+- [オートパイロット](/autopilots) — スケジュールや Webhook で繰り返しの作業を始める。
+- [実行](/tasks) — ウェイクアップが始めた実行を確認する。
+- [タスク](/issues) — サブタスクとステージ。
diff --git a/apps/docs/content/docs/issue-wakeups.ko.mdx b/apps/docs/content/docs/issue-wakeups.ko.mdx
new file mode 100644
index 0000000000..b269cca412
--- /dev/null
+++ b/apps/docs/content/docs/issue-wakeups.ko.mdx
@@ -0,0 +1,171 @@
+---
+title: 태스크 깨우기
+description: 태스크에 깨우기 규칙을 두어, 정한 시각이나 어떤 일이 생긴 뒤 에이전트가 그 태스크로 돌아와 이어서 처리하게 합니다.
+---
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WakeupDemo } from "@/components/demos/wakeup-demo";
+
+어떤 작업은 중간에 기다릴 수밖에 없습니다. 공급업체의 견적, 동료의 답변, 하위 태스크의 완료를 기다리는 경우입니다. 이럴 때 태스크에 **깨우기** 규칙을 추가합니다. "이 일이 생기면 이 에이전트를 깨워서 이것을 하게 한다"는 규칙입니다. 조건이 맞으면 에이전트는 그 태스크에서 일반 실행을 시작해 최신 상황을 읽고, 결과는 평소처럼 댓글로 남깁니다.
+
+규칙은 태스크에 저장되므로 기다리는 동안 돌아가는 실행은 없습니다. 멤버는 태스크 사이드바에서 깨우기를 만들고, 에이전트는 실행 중에 [CLI](#cli)로 다음 확인을 예약합니다. 두 방법 모두 같은 종류의 규칙을 만듭니다.
+
+## 깨우기 만들기 [#create]
+
+<Steps>
+<Step>
+
+태스크를 열고 사이드바 **깨우기** 영역 오른쪽의 **+**를 클릭합니다.
+
+</Step>
+<Step>
+
+**조건**에서 조건을 고르고 시간, 기다릴 사람, 기다릴 상태처럼 그 조건에 필요한 값을 채웁니다.
+
+</Step>
+<Step>
+
+**깨울 대상**에서 에이전트를 고릅니다. 태스크 담당자가 에이전트라면 이미 선택되어 있습니다. 런타임에 연결되어 있고 내가 실행할 권한이 있는 에이전트만 고를 수 있습니다. [권한과 Access](/agents#권한과-access)를 참고하세요.
+
+</Step>
+<Step>
+
+**깨운 후 수행할 일**에 지시를 씁니다. 예: "공급업체 견적이 다 왔는지 확인하고, 다 왔으면 비교표로 정리해 주세요." 최대 12,000바이트입니다. 나중에 수정할 수 있으며, 수정한 내용은 이후 깨우기에만 적용됩니다.
+
+</Step>
+<Step>
+
+**만들기**를 클릭합니다.
+
+</Step>
+</Steps>
+
+깨우기가 시작한 실행은 규칙을 만든 사람을 대신해 동작합니다. 실행이 시작되기 전에 Multica는 그 사람이 아직 이 에이전트를 실행할 수 있는지 다시 확인합니다.
+
+아래 태스크에서 운영 도우미는 견적을 요청해 두고 공급업체의 회신을 기다리고 있습니다. 깨우기를 추가한 뒤 깨우는 시각으로 건너뛰어 보세요. '정기 확인'을 고르면 아직 아무것도 오지 않은 날 에이전트가 댓글 없이 확인을 끝내는 모습도 볼 수 있습니다.
+
+<WakeupDemo />
+
+## 기다릴 수 있는 것 [#conditions]
+
+| 그룹 | 조건 | 깨우는 때 |
+|---|---|---|
+| 시간 | 특정 시각 | 10분 후, 1시간 후, 내일 09:00, 또는 직접 정한 시간. 한 번만 깨웁니다. |
+| 시간 | 정기 확인 | 매시간, 매일 09:00, 평일 09:00 중 하나이며 내 시간대로 계산합니다. 종료일이 꼭 필요하고, 그날이 끝나면 멈춥니다. |
+| 협업 | 누군가 답글 | 태스크에 새 댓글이 달렸을 때. 특정 멤버나 에이전트로 좁힐 수 있습니다. |
+| 협업 | 필드가 특정 값으로 바뀜 | 태스크의 상태, 담당자, 라벨, 사용자 지정 속성이 정한 값이 되었을 때. |
+| 실행과 하위 태스크 | 에이전트 실행 종료 | 이 태스크에서 특정 에이전트(또는 아무 에이전트)의 실행이 성공, 실패, 취소되었을 때. |
+| 실행과 하위 태스크 | 하위 태스크 완료 | 모든 하위 태스크가 닫혔을 때(`done` 또는 `cancelled`), 또는 정한 단계까지가 모두 닫혔을 때. 하위 태스크가 없으면 트리거되지 않습니다. |
+| 연결 | 연결된 PR의 CI 종료 | PR 병합이나 병합 충돌도 고를 수 있습니다. 이 태스크에 직접 연결된 PR만 보며, 여러 개라면 하나만 맞아도 됩니다. CI와 충돌은 GitHub PR에서만 동작합니다. |
+| 연결 | 다른 태스크의 상태 | 다른 태스크가 완료, 완료 또는 취소, 검토 중이 되었을 때. |
+| | 사용자 지정 이벤트 | 반응, 첨부 파일, 댓글 수정, 스레드 해결 등 25가지 원본 이벤트 중에서 고릅니다. |
+
+필드, 하위 태스크, PR, 다른 태스크 조건은 Multica가 직접 확인합니다. 만들 때 이미 조건이 맞는다면 다음 확인(약 30초 이내)에서 깨웁니다. CI만 예외로, 규칙을 만든 뒤에 끝난 검사만 셉니다.
+
+시간 외의 조건은 "어떤 일이 생기기를 기다리는" 규칙이며, 설정이 세 가지 더 있습니다.
+
+- **트리거 횟수**: 기본은 **한 번만 트리거**입니다. **반복 깨우기**로 바꾸면 **최대** 횟수(5, 10, 20, 50회, 기본 20회)도 정합니다.
+- **최대 대기**: 1, 3, 7, 30일 중 하나이며 기본은 7일입니다.
+- **시간 초과 시**: 기본은 에이전트를 깨워 처리하게 하며, 기다리던 일이 일어나지 않았다는 사실이 전달됩니다. **그대로 종료**를 고를 수도 있습니다.
+
+태스크 담당자가 에이전트라면 멤버의 댓글이 원래 그 에이전트를 트리거합니다. 같은 에이전트에게 '누군가 답글' 깨우기를 더해도 실행이 늘지 않고, 댓글로 시작된 실행에 합쳐질 뿐입니다. 지시를 덧붙이고 싶을 때만 쓰세요.
+
+## 깨운 뒤 [#after-wake]
+
+- 에이전트는 태스크에서 일반 실행을 시작해 태스크, 댓글, 깨우기 지시를 읽고, 마지막에 댓글 하나를 남깁니다. 댓글에는 '깨우기' 태그와 조건이 붙고, [실행 로그](/tasks)에도 같은 계기가 표시됩니다.
+- 정기 확인에서 답할 만한 일이 없으면 에이전트는 **조용한 확인**으로 끝낼 수 있습니다. 댓글은 남기지 않고, 태스크 타임라인과 규칙의 실행 기록에 메모만 남깁니다. 연달아 이어진 조용한 확인은 타임라인에서 한 줄로 합쳐집니다.
+- 에이전트가 직접 남긴 댓글이나 태스크 변경으로는 그 에이전트가 깨어나지 않습니다.
+- 같은 에이전트의 실행이 이 태스크에서 시작을 기다리고 있으면, 깨우기는 그 실행에 합쳐지고 실행을 하나 더 만들지 않습니다.
+- 깨우기가 기다리는 동안 태스크 헤더에 "운영 도우미: 답글 대기"처럼 태스크가 무엇을 기다리는지 표시됩니다. 클릭하면 깨우기 영역으로 이동합니다.
+
+## 확인하고 관리하기 [#manage]
+
+사이드바의 깨우기 영역에는 이 태스크의 규칙이 나열됩니다. 조건, 깨울 대상, 다음 실행 시각, 남은 시간이 보입니다. 규칙을 클릭하면 출처, 유효 기간, 지시, **실행 기록**(최근 실행, 댓글을 남겼는지, 조용한 확인 내용)을 볼 수 있습니다.
+
+| 작업 | 결과 |
+|---|---|
+| 스위치 끄기 | 이후 깨우기를 멈추고 아직 시작하지 않은 실행을 거둬들입니다. 이미 시작한 실행은 계속되므로, 필요하면 실행 로그에서 중지합니다. |
+| **지금 깨우기** | 조건을 기다리지 않고 이 규칙으로 지금 한 번 깨웁니다. |
+| 지시 수정 | 이후 깨우기에만 적용되며 진행 중인 실행은 그대로입니다. |
+| **삭제** | 규칙이 더는 깨우지 않습니다. 시작하지 않은 실행은 거둬들이고, 시작한 실행은 계속됩니다. |
+| **다시 활성화** / **시간 다시 설정** | 한 번만 트리거되는 규칙을 실행 후 다시 켭니다. 특정 시각 규칙은 새 시간을 고릅니다. |
+
+끝난 규칙은 **깨우기 기록**으로 옮겨집니다. 규칙은 만든 사람과 워크스페이스 owner, admin만 관리할 수 있습니다. 에이전트가 실행 중에 만든 깨우기는 그 실행을 시작한 멤버의 것으로 기록되며 "운영 도우미 생성 (리레이 대리)"처럼 표시됩니다.
+
+워크스페이스 전체의 깨우기는 **오토파일럿** 페이지의 **작업 깨우기** 탭에서 볼 수 있습니다. 상태(깨우기 대기 또는 실행 중, 일시중지됨, 꺼짐, 종료됨), 트리거 방식, 출처, 에이전트로 거르고, 여러 개를 한 번에 끄거나, 태스크를 먼저 고른 뒤 새로 만들 수 있습니다.
+
+## 자동으로 끝나거나 멈추는 경우 [#limits]
+
+- 태스크가 완료되거나 취소되면 그 태스크의 깨우기가 모두 꺼지고, 아직 시작하지 않은 실행은 거둬들입니다. 태스크를 다시 열어도 되살아나지 않습니다. 완료되거나 취소된 태스크에는 깨우기를 만들 수 없습니다.
+- 기다리는 규칙이 **최대 대기**에 이르면 **시간 초과 시** 설정대로 처리합니다. 정기 확인은 종료일에 멈춥니다.
+- 반복 규칙은 최대 횟수에 이르면 자동으로 일시중지됩니다. 기다리는 규칙은 다른 깨우기와 서로를 깨울 때(사람이 끼지 않은 채 트리거 연쇄가 세 번째로 그 규칙을 지날 때), 그리고 1시간 안에 12번 넘게 트리거될 때도 일시중지됩니다. 일시중지된 규칙은 누군가 다시 켤 때까지 꺼져 있고, 횟수는 처음부터 다시 셉니다.
+- 태스크 하나에 동시에 켜 둘 수 있는 깨우기는 32개, 워크스페이스 전체로는 1,000개까지입니다.
+
+## 하위 태스크가 끝나면 상위 태스크 깨우기 [#child-done]
+
+하위 태스크가 있는 태스크의 깨우기 영역에는 **시스템** 표시가 붙은 규칙이 나타납니다. 따로 만들 필요는 없습니다.
+
+- 한 단계의 하위 태스크가 모두 닫히고 뒤 단계가 아직 기다리고 있으면 상위 태스크의 담당자를 깨웁니다. 모든 하위 태스크가 닫히면 한 번 더 깨웁니다. 단계가 없는 하위 태스크는 마지막 하나가 닫힐 때 한 번 깨웁니다.
+- 담당자가 에이전트면 그 에이전트를, 스쿼드면 리더를 깨웁니다. 멤버에게는 대신 인박스 알림을 보냅니다. 담당자가 없으면 아무도 깨우지 않습니다.
+- 상위 태스크가 `backlog`에 있는 동안은 깨우지 않고, `backlog`를 벗어나면 한 번 몰아서 깨웁니다.
+- 기본 지시는 어떤 단계가 닫혔고 다음 단계가 무엇인지 알려 주며, 의존성을 확인한 뒤 다음 단계의 하위 태스크를 `backlog`에서 꺼내라고 합니다. 모두 닫히면 결과를 상위 태스크에 모으게 합니다.
+
+상위 태스크의 담당자는 이미 이 규칙으로 깨어나므로, 같은 목적으로 '하위 태스크 완료' 깨우기를 더할 필요는 없습니다. 단계를 나누는 방법은 [태스크](/issues#프로젝트와-하위-태스크)를 참고하세요.
+
+태스크 하나에서는 워크스페이스 멤버 누구나 이 규칙을 끄거나 지시(최대 4,000바이트)를 바꿀 수 있습니다. 에이전트는 바꿀 수 없습니다. 바꾼 태스크는 더는 워크스페이스 기본값을 따르지 않습니다.
+
+워크스페이스 owner와 admin은 **설정 → 깨우기**에서 기본값을 정합니다. 기본으로 켤지(처음에는 켜져 있음)와 기본 지시입니다. 기본 지시를 비워 두면 내장 지시를 씁니다. 이 페이지에는 자체 설정을 쓰는 진행 중 태스크 수도 표시됩니다.
+
+## 에이전트가 직접 예약하게 하기 [#cli]
+
+에이전트는 실행 중에 `multica issue wakeup`으로 이 태스크의 다음 실행을 예약하고 지금 실행을 마칩니다. `--agent-id`를 빼면 명령을 실행한 에이전트 자신을 깨웁니다. 내 터미널에서도 같은 명령을 쓸 수 있으며, 이때는 `--agent-id`로 에이전트를 지정합니다.
+
+```bash
+# 내일 09:00(상하이 시간)에 다시 보기
+multica issue wakeup create OPS-56 --kind at --at 2026-10-21T09:00:00+08:00 \
+ --instruction "공급업체 견적이 다 왔는지 확인하고, 다 왔으면 비교표로 정리"
+
+# 평일 매일 09:00에 확인하고, 일주일 뒤 끝내기
+multica issue wakeup create OPS-56 --kind cron --cron "0 9 * * 1-5" --timezone Asia/Shanghai \
+ --expires-in 168h --instruction "견적 메일을 확인하고 새 견적이 있으면 비교표 업데이트"
+
+# 리레이의 답글을 최대 3일 기다리고, 시간이 지나도 한 번 깨우기
+multica issue wakeup create OPS-56 --event comment.created \
+ --filter-actor-type member --filter-actor-id <리레이의 사용자 ID> \
+ --expires-in 72h --on-timeout wake --instruction "리레이의 답변에 따라 이어서 진행"
+
+# 태스크가 검토 중이 될 때까지 기다리기
+multica issue wakeup create OPS-56 --until-status in_review --instruction "결과물을 확인하고 정리"
+```
+
+- **시간**: `--kind at`에 `--after 10m` 또는 `--at <RFC3339 시간>`. `--kind every --every 1h`는 고정 간격(최소 1분). `--kind cron --cron "<5개 필드 표현식>"`에는 `--timezone`을 붙입니다(기본 UTC).
+- **이벤트**: `--event` 뒤에 이벤트 이름을 쉼표로 구분해 씁니다. `multica issue wakeup events`가 모든 이벤트와 필터를 보여 줍니다. `--mode continuous`는 반복 깨우기로 만듭니다.
+- **조건**: `--until-status`, `--until-assignee`, `--until-label`, `--until-property`, `--until-children-done [--stage N]`, `--until-pr checks|merged|conflicts`, `--until-issue <태스크> --until-issue-state done|ended|in_review`. 깨우기 하나에 `--until-*`는 하나만 쓸 수 있고 `--event`와 함께 쓸 수 없습니다.
+- **끝내는 방법**: CLI는 대기 기한을 자동으로 붙이지 않습니다. `--expires-in 72h`나 `--expires-at <RFC3339 시간>`으로 끝을 정하세요. `--on-timeout wake`를 붙이면 이벤트 규칙이 기한이 되었을 때 한 번 더 깨웁니다. `--max-fires N`(1–1000)은 반복 규칙의 실행 횟수에 상한을 둡니다.
+- **답이 남는 곳**: `--parent <댓글 ID>`를 붙이면 깨운 뒤의 답글이 원래 스레드에 남습니다.
+
+기존 규칙 관리:
+
+| 명령 | 하는 일 |
+|---|---|
+| `multica issue wakeup list <태스크>` | 태스크의 깨우기 목록 |
+| `multica issue wakeup get <태스크> <깨우기 ID>` | 깨우기 하나의 전체 설정 보기 |
+| `multica issue wakeup runs <태스크> <깨우기 ID>` | 최근 실행, 트리거 이유, 조용한 확인 메모, 댓글 여부 |
+| `multica issue wakeup update <태스크> <깨우기 ID>` | `create`와 같은 플래그로 전체 설정을 바꾸고 다시 켜기 |
+| `multica issue wakeup disable <태스크> <깨우기 ID>` | 끄고 아직 시작하지 않은 실행 거둬들이기 |
+| `multica issue wakeup trigger <태스크> <깨우기 ID>` | 지금 한 번 깨우기 |
+| `multica issue wakeup delete <태스크> <깨우기 ID>` | 규칙을 삭제하고 아직 시작하지 않은 실행 거둬들이기 |
+| `multica issue wakeup checkin <태스크> <깨우기 ID> --note "..."` | 답할 일이 없는 정기 확인을 조용히 끝내기. 이 규칙이 시작한 실행에서만 호출 가능 |
+
+`list`, `get`, `runs`에 `--output table`을 붙이면 표로 출력합니다. 다른 명령은 [CLI 사용](/cli)을 참고하세요.
+
+## 오토파일럿과의 차이 [#vs-autopilots]
+
+[오토파일럿](/autopilots)은 일정이나 Webhook으로 새 작업을 반복해서 시작하며, 그때마다 태스크를 새로 만들 수 있습니다. 깨우기는 이미 있는 태스크 하나에 붙어, 정한 시각이나 어떤 일이 생긴 뒤 에이전트를 그 태스크로 돌려보내고, 태스크가 끝나면 함께 끝납니다.
+
+## 다음 단계
+
+- [에이전트에게 작업 맡기기](/triggering-agents) — 작업을 시작하는 다른 방법.
+- [오토파일럿](/autopilots) — 일정이나 Webhook으로 반복 작업 시작하기.
+- [실행](/tasks) — 깨우기가 시작한 실행 확인하기.
+- [태스크](/issues) — 하위 태스크와 단계.
diff --git a/apps/docs/content/docs/issue-wakeups.mdx b/apps/docs/content/docs/issue-wakeups.mdx
new file mode 100644
index 0000000000..7eb1fdc3d7
--- /dev/null
+++ b/apps/docs/content/docs/issue-wakeups.mdx
@@ -0,0 +1,171 @@
+---
+title: Issue wakeups
+description: Put a wakeup rule on an issue so an agent comes back to it at a set time or after something happens.
+---
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WakeupDemo } from "@/components/demos/wakeup-demo";
+
+Some work stops halfway and waits: for a supplier's quote, a colleague's answer, or sub-issues to finish. A **wakeup** is a rule on the issue that says "when this happens, wake this agent and have it do that". When the condition is met, the agent starts an ordinary run on the issue, reads where things stand, and posts its result as a comment as usual.
+
+The rule is stored on the issue, so nothing runs while it waits. Members create wakeups from the issue sidebar; agents schedule their own next check from a run with the [CLI](#cli). Both create the same kind of rule.
+
+## Create a wakeup [#create]
+
+<Steps>
+<Step>
+
+Open the issue and click **+** next to **Wakeups** in the issue sidebar.
+
+</Step>
+<Step>
+
+After **When**, choose a condition and fill in what it needs, such as a time, the person to wait for, or the status to wait for.
+
+</Step>
+<Step>
+
+After **Wake**, choose the agent. If the issue's assignee is an agent, it is already selected. You can only choose agents that are bound to a runtime and that you are allowed to run; see [Permissions and Access](/agents#permissions-and-access).
+
+</Step>
+<Step>
+
+Under **What to do when woken**, write the instruction, for example "Check whether every supplier has sent a quote, and if so, put them in a comparison table". It can be up to 12,000 bytes. You can edit it later; the change applies to later wakeups only.
+
+</Step>
+<Step>
+
+Click **Create**.
+
+</Step>
+</Steps>
+
+Runs a wakeup starts act on behalf of the person who created it, and Multica checks again before the run starts that this person may still run the agent.
+
+In the issue below, Ops helper has asked suppliers for quotes and is waiting for their replies. Add a wakeup, then skip ahead to the wakeup time. Choose "Check regularly" to also see how the agent ends a check without commenting when nothing has arrived yet.
+
+<WakeupDemo />
+
+## What you can wait for [#conditions]
+
+| Group | Condition | Wakes the agent when |
+|---|---|---|
+| Time | At a time | In 10 minutes, in 1 hour, tomorrow at 09:00, or a time you pick. Wakes once. |
+| Time | Check regularly | Every hour, every day at 09:00, or weekdays at 09:00, in your timezone. Needs an end date; the rule stops after that day ends. |
+| Collaboration | Someone replies | A new comment appears on the issue; you can limit it to one member or agent. |
+| Collaboration | A field changes to a value | The issue's status, assignee, label, or a custom property takes the value you chose. |
+| Runs and sub-issues | An agent's run ends | A run on this issue by a given agent (or any agent) succeeds, fails, or is cancelled. |
+| Runs and sub-issues | Sub-issues finish | Every sub-issue is closed (`done` or `cancelled`), or every stage up to the one you pick is. An issue without sub-issues never fires. |
+| Linked | A linked PR's CI finishes | Or the PR merges, or it has merge conflicts. Only PRs linked directly to this issue count; with several, any one is enough. CI and conflicts work only for GitHub pull requests. |
+| Linked | Another issue's status | Another issue is done, done or cancelled, or moves to In Review. |
+| | Custom events | Pick from the 25 raw events, such as reactions, attachments, edited comments, or resolved threads. |
+
+Multica checks field, sub-issue, PR, and other-issue conditions itself. If the condition already holds when you create the rule, the next check (within about 30 seconds) wakes the agent. CI is the exception: it only counts checks that finish after the rule was created.
+
+Every condition other than time waits for something to happen, and has three more settings:
+
+- **Triggers**: **Trigger once** by default. With **Repeat wakeups**, also set **Up to** how many times (5, 10, 20, or 50; 20 by default).
+- **Wait up to**: 1, 3, 7, or 30 days; 7 by default.
+- **Then** (what happens at the deadline): by default the agent is woken to handle it and is told that what it waited for did not happen. **End without a run** ends the rule quietly instead.
+
+When the issue's assignee is an agent, members' comments already trigger it. A "Someone replies" wakeup for that same agent does not add a run; it joins the run the comment starts. Add one only when you want to give the agent extra instructions.
+
+## After the wakeup fires [#after-wake]
+
+- The agent starts an ordinary run on the issue, reads the issue, comments, and wakeup instruction, and ends with one comment. The comment carries a "Wakeup" tag with the condition, and the [execution log](/tasks) shows the same trigger.
+- When a regular check finds nothing that needs a reply, the agent can end with a **silent check**: no comment, only a note in the issue timeline and in the rule's trigger history. Consecutive silent checks collapse into one timeline entry.
+- An agent's own comments and its own changes to the issue never wake it.
+- If the same agent already has a run waiting to start on the issue, the wakeup joins that run instead of starting another one.
+- While a wakeup is waiting, the issue header shows what the issue is waiting for, such as "Ops helper: Waiting for a reply". Click it to jump to the Wakeups section.
+
+## View and manage wakeups [#manage]
+
+The Wakeups section of the issue sidebar lists the issue's rules: the condition, who is woken, when it fires next, and how long is left. Click a rule for its details, including its source, its deadline, its instruction, and its **trigger history** (the latest runs, whether each posted a comment, and what each silent check found).
+
+| Action | Result |
+|---|---|
+| Turn the switch off | Stops later wakeups and withdraws runs that have not started. A run that already started keeps going; stop it from the execution log if needed. |
+| **Wake now** | Wakes the agent once right away, without waiting for the condition. |
+| Edit the instruction | Affects later wakeups only; a run in progress is unchanged. |
+| **Delete** | The rule no longer wakes anyone. Runs that have not started are withdrawn; started ones continue. |
+| **Enable again** / **Set a new time** | Re-enables a one-time rule after it fired. A one-time rule at a set time needs a new time. |
+
+Rules that have ended move to **Wakeup history**. Only the rule's creator and workspace owners and admins can manage it. A wakeup an agent creates during a run belongs to the member who started that run, and shows as "Ops helper, on behalf of Lei Li".
+
+To see every wakeup in the workspace, open **Autopilot** and switch to the **Issue wakeups** tab. You can filter by state (Waiting or executing, Paused, Turned off, Ended), trigger type, source, and agent, turn several off at once, or create a wakeup after picking its issue.
+
+## Automatic endings and pauses [#limits]
+
+- When an issue is done or cancelled, its wakeups are all turned off and runs that have not started are withdrawn. Reopening the issue does not bring them back. You cannot create wakeups on a done or cancelled issue.
+- A waiting rule that reaches its **Wait up to** limit does what its **Then** setting says; a regular check stops at its end date.
+- A repeating rule pauses once it reaches its maximum number of triggers. Waiting rules are also paused when they trigger each other with other wakeups (the trigger chain passes through the rule a third time with no person in between), or when they fire more than 12 times in an hour. A paused rule stays off until someone turns it back on, and its count starts over.
+- An issue can have at most 32 wakeups turned on, and a workspace at most 1,000.
+
+## Wake the parent when sub-issues finish [#child-done]
+
+When an issue has sub-issues, its Wakeups section shows a rule marked **System**. Nobody needs to create it:
+
+- When every sub-issue in a stage is closed and a later stage is still waiting, it wakes the parent's assignee, and it wakes them once more when every sub-issue is closed. Sub-issues without stages wake the parent once, when the last one closes.
+- An agent assignee is woken; for a squad, its leader is woken; a member assignee gets an inbox notification instead. Without an assignee, nobody is woken.
+- While the parent is in `backlog`, nothing is woken; it catches up once the parent leaves `backlog`.
+- The default instruction tells the agent which stage closed and which comes next: check its dependencies, then move the next stage's sub-issues out of `backlog`. When every sub-issue is closed, it brings their results together on the parent.
+
+The parent's assignee is already woken by this rule, so do not add a "Sub-issues finish" wakeup for the same thing. To set up stages, see [Issues](/issues#projects-and-sub-issues).
+
+On a single issue, any workspace member can turn this rule off or rewrite its instruction (up to 4,000 bytes); agents cannot change it. Once changed, that issue no longer follows the workspace default.
+
+Workspace owners and admins set the defaults in **Settings → Wakeups**: whether the rule is on by default (it is) and the default instruction. With no default instruction, the built-in one is used. The page also shows how many open issues use their own setting.
+
+## Let agents schedule their own wakeups [#cli]
+
+During a run, an agent uses `multica issue wakeup` to arrange the next run on the issue, then finishes the current run. Without `--agent-id`, the wakeup targets the agent running the command. You can use the same commands from your own terminal; then pass `--agent-id` to choose the agent.
+
+```bash
+# Look again tomorrow at 09:00 (Shanghai time)
+multica issue wakeup create OPS-56 --kind at --at 2026-10-21T09:00:00+08:00 \
+ --instruction "Check whether every supplier has sent a quote; if so, build a comparison table"
+
+# Check every weekday at 09:00 for a week
+multica issue wakeup create OPS-56 --kind cron --cron "0 9 * * 1-5" --timezone Asia/Shanghai \
+ --expires-in 168h --instruction "Check the quote emails and update the comparison table"
+
+# Wait up to 3 days for Lei Li to reply; wake once anyway on timeout
+multica issue wakeup create OPS-56 --event comment.created \
+ --filter-actor-type member --filter-actor-id <Lei-Li-user-id> \
+ --expires-in 72h --on-timeout wake --instruction "Continue based on Lei Li's answer"
+
+# Wait until the issue is in review
+multica issue wakeup create OPS-56 --until-status in_review --instruction "Check the deliverables and summarize"
+```
+
+- **Time**: `--kind at` with `--after 10m` or `--at <RFC3339 time>`; `--kind every --every 1h` for a fixed interval of at least 1 minute; `--kind cron --cron "<5-field expression>"` with `--timezone` (UTC by default).
+- **Events**: list event names after `--event`, separated by commas. `multica issue wakeup events` lists every event and filter. `--mode continuous` makes the rule repeat.
+- **Conditions**: `--until-status`, `--until-assignee`, `--until-label`, `--until-property`, `--until-children-done [--stage N]`, `--until-pr checks|merged|conflicts`, and `--until-issue <issue> --until-issue-state done|ended|in_review`. Use one `--until-*` per wakeup, and not together with `--event`.
+- **Endings**: the CLI does not add a deadline for you. Use `--expires-in 72h` or `--expires-at <RFC3339 time>`; `--on-timeout wake` makes an event rule wake the agent once more at the deadline. `--max-fires N` (1–1000) caps how many runs a repeating rule starts.
+- **Where results go**: `--parent <comment-id>` keeps the woken run's reply in the original thread.
+
+To manage existing rules:
+
+| Command | What it does |
+|---|---|
+| `multica issue wakeup list <issue>` | List the issue's wakeups |
+| `multica issue wakeup get <issue> <wakeup-id>` | Show one wakeup's full configuration |
+| `multica issue wakeup runs <issue> <wakeup-id>` | Latest runs, what triggered them, silent-check notes, and whether each commented |
+| `multica issue wakeup update <issue> <wakeup-id>` | Replace the whole configuration with the same flags as `create`, and turn it back on |
+| `multica issue wakeup disable <issue> <wakeup-id>` | Turn it off and withdraw runs that have not started |
+| `multica issue wakeup trigger <issue> <wakeup-id>` | Wake the agent once now |
+| `multica issue wakeup delete <issue> <wakeup-id>` | Delete the rule and withdraw runs that have not started |
+| `multica issue wakeup checkin <issue> <wakeup-id> --note "..."` | End a regular check silently when it found nothing that needs a reply; only a run that this rule started can call it |
+
+`list`, `get`, and `runs` print a table with `--output table`. For other commands, see [Using the CLI](/cli).
+
+## Wakeups and autopilots [#vs-autopilots]
+
+An [autopilot](/autopilots) starts new work again and again from a schedule or webhook, and can create a new issue each time. A wakeup belongs to one existing issue: it brings an agent back to that issue after a set time or event, and ends when the issue does.
+
+## Next steps
+
+- [Put agents to work](/triggering-agents) — the other ways to start work.
+- [Autopilots](/autopilots) — start recurring work from a schedule or webhook.
+- [Runs](/tasks) — see the runs a wakeup starts.
+- [Issues](/issues) — sub-issues and stages.
diff --git a/apps/docs/content/docs/issue-wakeups.zh.mdx b/apps/docs/content/docs/issue-wakeups.zh.mdx
new file mode 100644
index 0000000000..6b60b89589
--- /dev/null
+++ b/apps/docs/content/docs/issue-wakeups.zh.mdx
@@ -0,0 +1,171 @@
+---
+title: 任务唤醒
+description: 在任务上设一条唤醒规则,到了约定时间或等到某件事发生,让智能体回到这条任务继续处理。
+---
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WakeupDemo } from "@/components/demos/wakeup-demo";
+
+有些工作做到一半只能等:等供应商回报价,等同事答复,等子任务做完。这时可以在任务上加一条**唤醒**规则:"当某件事发生时,唤醒某个智能体,让它做什么"。条件满足后,智能体在这条任务上开始一次普通运行,读取任务的最新情况,结果照常以评论写回任务。
+
+规则保存在任务上,等待期间没有运行在跑。成员在任务侧栏里创建唤醒;智能体在运行中用 [CLI](#cli) 给自己安排下一次检查,两种方式创建的是同一种规则。
+
+## 新建唤醒 [#create]
+
+<Steps>
+<Step>
+
+打开任务,点任务侧栏**唤醒**区域右侧的 **+**。
+
+</Step>
+<Step>
+
+在**当**后面选择条件,再补齐条件需要的参数,例如时间、要等的人或要等的状态。
+
+</Step>
+<Step>
+
+在**唤醒**后面选择智能体。任务负责人是智能体时,这里已经预选了它。只能选已绑定运行时、并且你有权限运行的智能体,见[权限与 Access](/agents#权限与-access)。
+
+</Step>
+<Step>
+
+在**唤醒后要做什么**里写下指令,例如"看供应商是否都回了报价,回齐了就整理成对比表"。指令最多 12,000 字节,之后可以修改,只影响以后的唤醒。
+
+</Step>
+<Step>
+
+点**创建**。
+
+</Step>
+</Steps>
+
+唤醒开始的运行代表创建者执行,开始前会再确认创建者仍有权限运行这个智能体。
+
+下面这条任务里,运营助手已经发出询价,正在等供应商回复。给它加一条唤醒,再快进到唤醒时间。选"定期检查"还能看到第一天没有消息时,智能体怎样不发评论就结束。
+
+<WakeupDemo />
+
+## 可以等什么 [#conditions]
+
+| 分组 | 条件 | 什么时候唤醒 |
+|---|---|---|
+| 时间 | 在某个时间 | 10 分钟后、1 小时后、明天 09:00,或自定义时间。只唤醒一次。 |
+| 时间 | 定期检查 | 每小时、每天 09:00 或工作日 09:00,按你的时区计算。必须设截止日,截止日当天结束后停止。 |
+| 协作 | 有人回复 | 任务上出现新评论;可以限定为某位成员或某个智能体。 |
+| 协作 | 字段变为某个值 | 任务的状态、负责人、标签或自定义属性变成指定的值。 |
+| 运行与子任务 | 智能体的运行结束 | 这条任务上某个智能体(或任意智能体)的运行成功、失败或被取消。 |
+| 运行与子任务 | 子任务完成 | 全部子任务结束(`done` 或 `cancelled`),或某个阶段及之前的阶段全部结束。没有子任务时不会触发。 |
+| 关联 | 关联 PR 的 CI 结束 | 也可以选 PR 合并、出现合并冲突。只看直接关联到这条任务的 PR,有多个时任意一个满足即可。CI 结束和合并冲突只支持 GitHub 上的 PR。 |
+| 关联 | 其他任务的状态变化 | 另一条任务完成、完成或取消,或进入审核中。 |
+| | 自定义事件 | 从 25 种原始事件里勾选,例如表态、附件、评论被编辑或讨论被解决。 |
+
+字段、子任务、PR 和其他任务这几类条件由平台自己去查:条件在创建时已经成立的,下一次检查(约 30 秒内)就会唤醒;"CI 结束"例外,它只认创建之后才出结果的检查。
+
+时间以外的条件都是"等某件事发生",还有三项设置:
+
+- **触发次数**:默认**仅触发一次**;选**重复唤醒**时,再设**最多触发**几次(5、10、20 或 50 次,默认 20)。
+- **最多等待**:1、3、7 或 30 天,默认 7 天。
+- **超时后**:默认唤醒智能体处理,它会知道要等的事没有发生;也可以选直接结束。
+
+任务负责人是智能体时,成员发评论本来就会触发它。给负责人再加一条"有人回复"的唤醒,不会多跑一次,只会并入那次运行,所以只在想附加指令时才需要。
+
+## 唤醒之后 [#after-wake]
+
+- 智能体在任务上开始一次普通运行,读取任务、评论和唤醒指令,结束时发一条评论。评论带有"由唤醒触发"标签和触发条件,[执行日志](/tasks)里也能看到触发来源。
+- 定期检查没发现需要回复的事,智能体可以**静默检查**后结束:不发评论,只在任务时间线和这条唤醒的触发记录里留一条说明。连续几次静默检查在时间线里合并成一条。
+- 智能体自己发的评论、自己对任务的修改,不会唤醒它自己。
+- 同一个智能体在这条任务上已经有一次运行在等待开始,新的唤醒会并入那次运行,不再另起一次。
+- 有唤醒在等时,任务标题旁会显示任务在等什么,例如"运营助手 在等回复",点一下跳到唤醒区域。
+
+## 查看和管理 [#manage]
+
+任务侧栏的唤醒区域列出这条任务上的规则:条件、唤醒谁、下次什么时候、还剩多久。点一条规则查看详情,包括来源、有效期、指令和**触发记录**(最近的运行,有没有发评论,静默检查写了什么)。
+
+| 操作 | 结果 |
+|---|---|
+| 关闭开关 | 停止后续唤醒,撤回还没开始的运行。已经开始的运行继续,需要时在执行日志里停止。 |
+| **立即唤醒** | 现在就按这条规则唤醒一次,不等条件。 |
+| 编辑指令 | 只影响以后的唤醒,正在执行的运行不变。 |
+| **删除** | 规则不再唤醒,还没开始的运行被撤回,已经开始的继续。 |
+| **再次启用** / **重新设置时间** | 单次规则触发过后重新启用;单次定时的规则需要选一个新时间。 |
+
+结束的规则收进**历史唤醒**。只有规则的创建者和工作区 owner、admin 可以管理它。智能体在运行中创建的唤醒,记在发起那次运行的成员名下,显示为"运营助手 创建(代表 李雷)"。
+
+要看整个工作区的唤醒,打开**自动化**页面,切到**任务唤醒**标签。这里可以按状态(待唤醒或执行中、已暂停、已关闭、已结束)、触发方式、来源和智能体筛选,批量关闭,或者先选任务再新建唤醒。
+
+## 自动结束和暂停 [#limits]
+
+- 任务完成或取消时,上面的唤醒全部关闭,还没开始的运行被撤回;任务重新打开后不会自动恢复。已完成或已取消的任务不能新建唤醒。
+- 等待类规则到了最多等待时间,按**超时后**的设置处理;定期检查到截止日停止。
+- 重复唤醒的规则达到最多触发次数后自动暂停。等待类规则还有两种保护:和其他唤醒规则互相触发(触发链第三次经过它,中间没有人参与),或 1 小时内触发超过 12 次,都会自动暂停。暂停的规则保持关闭,有人重新开启后恢复,次数重新计算。
+- 一条任务最多同时开启 32 条唤醒,一个工作区最多 1000 条。
+
+## 子任务结束时唤醒父任务 [#child-done]
+
+任务有子任务时,唤醒区域会出现一条带**系统**标记的规则,它不用手动创建:
+
+- 某个阶段的子任务全部结束、后面还有阶段在等时,唤醒父任务的负责人;全部子任务结束时再唤醒一次。没有分阶段的子任务,全部结束时唤醒一次。
+- 负责人是智能体时唤醒它,是小队时唤醒队长,是成员时改发收件箱通知;没有负责人就不唤醒。
+- 父任务在 `backlog` 时暂不唤醒,移出 `backlog` 后补一次。
+- 默认指令告诉智能体哪个阶段结束了、下一个是哪个:先检查依赖,再把下一阶段的子任务移出 `backlog`;全部结束时把结果汇总到父任务上。
+
+父任务的负责人已经由这条规则唤醒,不需要再为同一件事加"子任务完成"条件。阶段怎么设置见[任务](/issues#项目和子任务)。
+
+在单条任务上,工作区成员可以关闭这条规则,或者改写它的指令(最多 4,000 字节),智能体不能改。改过之后,这条任务不再跟随工作区默认值。
+
+工作区 owner 和 admin 在**设置 → 唤醒**里设置默认值:是否默认开启(默认开启)和默认指令,默认指令留空时使用内置指令。页面上会显示有多少进行中的任务用了自己的设置。
+
+## 让智能体自己安排唤醒 [#cli]
+
+智能体在运行中用 `multica issue wakeup` 给这条任务安排下一次运行,然后结束当前运行。不写 `--agent-id` 时,唤醒的就是执行命令的智能体自己。你也可以在自己的终端里用同一组命令,这时要用 `--agent-id` 指定智能体。
+
+```bash
+# 明天上午 9 点(北京时间)再看一次
+multica issue wakeup create OPS-56 --kind at --at 2026-10-21T09:00:00+08:00 \
+ --instruction "看供应商是否都回了报价,回齐了就整理成对比表"
+
+# 工作日每天 9 点检查,一周后结束
+multica issue wakeup create OPS-56 --kind cron --cron "0 9 * * 1-5" --timezone Asia/Shanghai \
+ --expires-in 168h --instruction "查看询价邮件,有新报价就更新对比表"
+
+# 等李雷回复,最多等 3 天,超时也唤醒一次
+multica issue wakeup create OPS-56 --event comment.created \
+ --filter-actor-type member --filter-actor-id <李雷的用户 ID> \
+ --expires-in 72h --on-timeout wake --instruction "按李雷的答复继续"
+
+# 等任务进入审核中
+multica issue wakeup create OPS-56 --until-status in_review --instruction "检查交付物并汇总"
+```
+
+- **时间**:`--kind at` 配 `--after 10m` 或 `--at <RFC3339 时间>`;`--kind every --every 1h` 按固定间隔,最短 1 分钟;`--kind cron --cron "<5 段表达式>"` 配 `--timezone`,时区默认 UTC。
+- **事件**:`--event` 后面写事件名,多个用逗号分隔,`multica issue wakeup events` 列出全部事件和过滤参数。`--mode continuous` 改成重复唤醒。
+- **条件**:`--until-status`、`--until-assignee`、`--until-label`、`--until-property`、`--until-children-done [--stage N]`、`--until-pr checks|merged|conflicts`、`--until-issue <任务> --until-issue-state done|ended|in_review`。一条唤醒只能用一个 `--until-*`,不能和 `--event` 同时用。
+- **结束方式**:CLI 不会自动给等待加期限,用 `--expires-in 72h` 或 `--expires-at <RFC3339 时间>` 设结束时间;`--on-timeout wake` 让事件规则在超时时再唤醒一次。`--max-fires N`(1–1000)限制重复规则最多运行几次。
+- **结果放在哪**:`--parent <评论 ID>` 让唤醒后的回复留在原来的评论串里。
+
+管理已有规则:
+
+| 命令 | 作用 |
+|---|---|
+| `multica issue wakeup list <任务>` | 列出任务上的唤醒 |
+| `multica issue wakeup get <任务> <唤醒 ID>` | 查看一条唤醒的完整配置 |
+| `multica issue wakeup runs <任务> <唤醒 ID>` | 最近的运行、触发原因、静默检查说明,以及是否发了评论 |
+| `multica issue wakeup update <任务> <唤醒 ID>` | 用和 `create` 相同的参数替换整份配置,并重新开启 |
+| `multica issue wakeup disable <任务> <唤醒 ID>` | 关闭,撤回还没开始的运行 |
+| `multica issue wakeup trigger <任务> <唤醒 ID>` | 立即唤醒一次 |
+| `multica issue wakeup delete <任务> <唤醒 ID>` | 删除规则,撤回还没开始的运行 |
+| `multica issue wakeup checkin <任务> <唤醒 ID> --note "..."` | 定期检查没发现需要回复的事时静默结束,只能由这条规则开始的运行调用 |
+
+`list`、`get` 和 `runs` 加 `--output table` 输出表格。其他命令见[使用 CLI](/cli)。
+
+## 和自动化的区别 [#vs-autopilots]
+
+[自动化](/autopilots)按时间表或 Webhook 反复开始新的工作,每次可以新建一条任务;唤醒挂在一条已有任务上,让智能体在约定的时间或事件之后回到这条任务接着做,任务结束时它也跟着结束。
+
+## 接下来
+
+- [让智能体开始工作](/triggering-agents) — 其他开始工作的方式。
+- [自动化](/autopilots) — 按时间表或 Webhook 开始重复工作。
+- [运行](/tasks) — 查看唤醒开始的运行。
+- [任务](/issues) — 子任务和阶段。
diff --git a/apps/docs/content/docs/issues.fr.mdx b/apps/docs/content/docs/issues.fr.mdx
index 00200b7560..d4e6759667 100644
--- a/apps/docs/content/docs/issues.fr.mdx
+++ b/apps/docs/content/docs/issues.fr.mdx
@@ -4,8 +4,12 @@ description: Une tâche regroupe le contexte, l'assigné, le statut et l'histori
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { IssueStatusDemo } from "@/components/demos/issue-status-demo";
+import { IssueDraftDemo } from "@/components/demos/issue-draft-demo";
+import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
-Une tâche est l'unité de base de Multica pour organiser le travail : une fonctionnalité, un bug, une investigation — tout ce qu'un membre ou un agent doit prendre en charge et faire avancer. La discussion qui l'entoure, ses changements de statut et chacune de ses exécutions restent au même endroit : inutile de reconstituer le contexte à partir d'historiques de discussion ou de sorties de terminal.
+Une tâche est l'unité de base de Multica pour organiser le travail : une fonctionnalité, un bug, une investigation — tout ce qu'un membre ou un agent doit prendre en charge et faire avancer. La discussion qui l'entoure, ses changements de statut et chacune de ses exécutions sont consignés dans la tâche : plus besoin de fouiller l'historique des discussions ou les sorties de terminal.
## Composantes d'une tâche
@@ -17,15 +21,28 @@ Une tâche est l'unité de base de Multica pour organiser le travail : une fonct
| **Dates, étiquettes et propriétés personnalisées** | Planification, catégorisation et champs propres à votre équipe. |
| **Projet et relations parent-enfant** | S'inscrit dans un ensemble de travail plus large, ou se découpe en sous-tâches. |
| **Activité et journal d'exécution** | Commentaires, changements de statut, exécutions et résultats renvoyés par les agents. |
+| **Livrables** | Fichiers envoyés dans les commentaires ; un même fichier renvoyé devient une nouvelle version. |
![Détail d'une tâche : description, discussion, propriétés à droite et journal d'exécution](/images/docs/quickstart-run-result.webp)
## Créer une tâche
-Créez-en une depuis la page **Tâches** ou à l'intérieur d'un projet — un titre suffit, et toutes les autres propriétés peuvent être renseignées plus tard.
+Créez-en une depuis la page **Tâches** ou à l'intérieur d'un projet. **Nouvelle tâche** dans la barre latérale, ou `C`, ouvre la fenêtre de création dans le mode utilisé la dernière fois : avec **Créer manuellement**, vous remplissez vous-même le titre et les propriétés (un titre suffit, le reste peut attendre) ; avec **Créer avec un agent**, il suffit de décrire la demande. Le mode se change en bas de la fenêtre, sans perdre ce qui est déjà saisi.
Chaque tâche porte un numéro, par exemple `MUL-123`. Les chiffres s'incrémentent au sein de l'espace de travail ; après qu'un administrateur a modifié le préfixe des tâches de l'espace de travail, les numéros s'affichent avec le nouveau préfixe. Voir [Espaces de travail](/workspaces#créer-un-espace-de-travail).
+### Créer avec un agent
+
+Décrivez le travail, choisissez un agent ou un squad dans **Créé par** et cliquez sur **Créer**. La fenêtre se ferme aussitôt : l'agent travaille en arrière-plan, met la demande en forme de titre et de description, puis crée la tâche. Succès ou échec, une notification arrive dans votre boîte de réception. Celle d'un échec propose **Modifier en mode avancé**, qui reporte votre demande d'origine dans le formulaire manuel.
+
+<IssueDraftDemo />
+
+- L'agent reprend fidèlement votre demande et n'ajoute ni exigence ni critère d'acceptation que vous n'avez pas formulés.
+- Si la demande nomme un assigné (« confie-la à Lei Li »), l'agent l'assigne. Sinon, l'assigné est ce que vous avez choisi dans **Créé par** : l'agent lui-même, ou le squad. Les nouvelles tâches démarrent en `todo` ; quand l'assigné est un agent, il commence donc à la traiter dès qu'elle existe.
+- Le projet, la priorité et la date d'échéance choisis dans la fenêtre sont repris tels quels ; l'agent n'en déduit pas d'autres du texte. Le projet est visible par défaut, la priorité et l'échéance sont dans le menu **⋯**. Les champs toujours affichés se règlent dans **Paramètres → Préférences → Champs affichés à la création de tâches**.
+- Avec **En créer un autre** activé, la fenêtre reste ouverte après chaque envoi pour enchaîner la demande suivante.
+- **Créé par** ne liste que les agents et squads que vous avez le droit d'assigner. Si la CLI multica du runtime de l'agent est trop ancienne, la fenêtre propose de mettre à jour le daemon ou de passer en création manuelle.
+
## Choisir l'assigné
| Assigné à | Effet |
@@ -40,7 +57,10 @@ L'assignation ne contourne pas l'**Accès** d'un agent ; lors d'une assignation
## Statut
-Chaque espace de travail démarre avec sept statuts intégrés, regroupés en quatre catégories de cycle de vie :
+Chaque espace de travail démarre avec sept statuts intégrés, regroupés en quatre catégories de cycle de vie.
+
+<Tabs items={["Par catégorie", "Par statut"]}>
+<Tab value="Par catégorie" id="status-categories">
| Catégorie | Statuts intégrés | Signification |
|---|---|---|
@@ -49,7 +69,10 @@ Chaque espace de travail démarre avec sept statuts intégrés, regroupés en qu
| `done` (Terminé) | `done` | Terminé avec succès ; état final. |
| `closed` (Fermée) | `cancelled` | Abandonné ; état final, sans aboutissement réussi. |
-Les catégories simplifient le raisonnement sur le cycle de vie. Les tableaux, les listes, les filtres et les tris s'appuient tous sur le statut individuel, et les statuts concrets préservent le comportement de workflow plus spécifique sur lequel reposent les agents et les automatisations.
+La catégorie sert seulement à situer la tâche dans son cycle de vie. Les tableaux, les listes, les filtres et les tris s'appuient sur le statut précis, et les comportements particuliers dont dépendent les agents et les automatisations sont eux aussi attachés au statut précis.
+
+</Tab>
+<Tab value="Par statut" id="built-in-statuses">
| Statut | Signification |
|---|---|
@@ -61,9 +84,16 @@ Les catégories simplifient le raisonnement sur le cycle de vie. Les tableaux, l
| `blocked` (Bloqué) | Ne peut pas continuer pour l'instant. |
| `cancelled` (Annulé) | Abandonnée ; l'historique est conservé. |
+</Tab>
+</Tabs>
+
+La démonstration ci-dessous part d'une tâche déjà assignée à un agent et laissée en `backlog` :
+
+<IssueStatusDemo />
+
Les membres et les agents peuvent modifier directement les statuts. Dans un projet avec un [workflow](/workflows), choisissez parmi ses étapes. Entrer dans une étape avec passage de relais peut aussi changer le responsable et demander à un agent de commencer.
-Les agents mettent à jour le statut au fil du travail. Par défaut, ils indiquent le travail en cours au démarrage et la relecture à la livraison. Si le projet utilise un workflow, ils suivent ses étapes et ses consignes. La fin d’une exécution ne termine pas la tâche à elle seule ; répondre à une question ne signifie pas que tout le travail est livré.
+Les agents mettent à jour le statut au fil du travail : par défaut, ils passent la tâche à `in_progress` en commençant et à `in_review` à la livraison. Si le projet utilise un workflow, ils suivent ses étapes et ses consignes de relais.
<Callout type="info">
Deux changements sont effectués par le système :
@@ -76,7 +106,7 @@ Deux changements sont effectués par le système :
Un `owner` ou un `admin` peut ajouter des statuts comme **Revue de code**, **QA** ou **À corriger**. Si **Paramètres** contient **Workflows**, gérez-les dans la bibliothèque de statuts en dessous. Sinon, utilisez **Paramètres → États des tâches**.
-À la création, choisissez si le statut correspond à un travail non commencé, en cours, terminé ou annulé. Cette catégorie ne peut plus être changée ensuite. Un statut personnalisé ne reprend pas les comportements particuliers d’un statut intégré : l’appeler « En attente » ne met pas un agent en pause.
+À la création, choisissez sa catégorie : **Non démarré**, **Démarrage**, **Terminé** ou **Fermée**. Elle ne peut plus être changée ensuite. Un statut personnalisé ne reprend pas les comportements particuliers d’un statut intégré : l’appeler « En attente » ne met pas un agent en pause.
- Les statuts intégrés ne peuvent être ni renommés, ni recolorés, ni archivés.
- Les statuts personnalisés affichent le nom saisi. Modifier leur nom ou leur couleur les met à jour partout où ils sont utilisés.
@@ -84,9 +114,25 @@ Un `owner` ou un `admin` peut ajouter des statuts comme **Revue de code**, **QA*
La bibliothèque contient les statuts disponibles. Le workflow d’un projet choisit ceux que ses tâches utilisent et leur ordre.
+## Propriétés personnalisées
+
+Les champs propres à votre équipe, comme la gravité, le client ou le budget, s'ajoutent sous forme de propriétés personnalisées. Un `owner` ou un `admin` de l'espace de travail les gère dans **Paramètres → Propriétés** ; un espace de travail peut avoir jusqu'à 20 propriétés actives.
+
+Les types disponibles sont texte, nombre, liste déroulante, sélection multiple, date, case à cocher, URL, membre, membres, liste de textes et liste d'URL. Le type ne peut plus être modifié après la création. Les propriétés servent dans les filtres ; un tableau peut aussi être regroupé par une propriété à liste déroulante, et les propriétés de type nombre ou date servent au tri.
+
+Archivez une propriété qui ne sert plus : elle disparaît des sélecteurs et des filtres, les valeurs déjà saisies sur les tâches restent, et vous pouvez la restaurer plus tard.
+
## Tâches et exécutions
-Une tâche est l'enregistrement durable d'un travail ; une [exécution](/tasks) est une intervention concrète d'un agent. Une même tâche peut produire plusieurs exécutions au fil du temps — une première implémentation, des modifications de suivi, une nouvelle vérification. Une exécution terminée signifie seulement que cette exécution a pris fin ; c'est le statut de la tâche qui détermine si la tâche est terminée.
+Une tâche est l'enregistrement durable d'un travail ; une [exécution](/tasks) est une intervention concrète d'un agent. Une même tâche peut produire plusieurs exécutions au fil du temps — une première implémentation, des modifications de suivi, une nouvelle vérification. Une exécution terminée signifie seulement que cette exécution a pris fin, et un agent qui a répondu à une question n'a pas pour autant livré le travail de la tâche ; c'est le statut de la tâche qui détermine si elle est terminée.
+
+## Livrables
+
+Les fichiers que les membres et les agents envoient dans les commentaires sont rassemblés dans la section **Livrables** du panneau latéral de la tâche. Elle affiche les 3 dernières images et les 4 derniers autres fichiers ; « Voir les livrables » ouvre l'ensemble, groupé par commentaire, avec des filtres images, documents, vidéos et autres. `G` dans la visionneuse ouvre la même page. Les pièces jointes de la description sont des éléments d'entrée et ne comptent pas.
+
+Envoyer de nouveau un fichier de même nom et de même type ajoute une version au même livrable. La section ne l'affiche qu'une fois, avec son numéro de version (par exemple `v2`), et chaque carte de fichier dans les commentaires indique sa version. Dans la visionneuse, cliquez sur le numéro de version pour passer à une version plus ancienne, et sur **Afficher dans les commentaires** pour revenir au commentaire qui l'a envoyée.
+
+<DeliverablesDemo />
## Projets et sous-tâches
@@ -94,11 +140,52 @@ Une tâche appartient à un [projet](/projects) au plus ; le projet fournit des
Un travail plus important peut être découpé en sous-tâches : la tâche parente conserve l'objectif global tandis que les sous-tâches avancent indépendamment. Les statuts de la tâche parente et des sous-tâches ne s'influencent pas.
-Les sous-tâches peuvent recevoir une **Étape** pour avancer par lots — 1, 2, 3. Lorsque toutes les sous-tâches de la première étape non terminée atteignent `done` ou `cancelled`, la tâche parente reçoit une notification « sous-tâches terminées » ; si l'assigné de la tâche parente est un agent, celui-ci se réveille et décide s'il lance l'étape suivante. Les sous-tâches sans étape forment un seul lot et ne déclenchent qu'une notification, lorsqu'elles sont toutes terminées.
+Les sous-tâches peuvent recevoir une **Étape** pour avancer par lots — 1, 2, 3. Lorsque toutes les sous-tâches de la première étape non terminée atteignent `done` ou `cancelled`, la tâche parente reçoit une notification « sous-tâches terminées » ; si l'assigné de la tâche parente est un agent, celui-ci se réveille et décide s'il lance l'étape suivante. Les sous-tâches sans étape forment un seul lot et ne déclenchent qu'une notification, lorsqu'elles sont toutes terminées. Ce réveil est déclenché par le système ; ses règles et les autres types de réveil sont décrits dans [Réveils de tâches](/issue-wakeups).
+
+## Vues et affichage [#changer-de-vue]
+
+La page Tâches propose cinq dispositions — Liste, Tableau, Grille, Gantt et Couloirs — filtrables par statut, assigné, projet et autres propriétés. Elles affichent toutes les mêmes tâches.
+
+Le menu **Affichage** règle la disposition en cours. Un tableau se regroupe par statut, assigné, projet ou propriété à liste déroulante, et les couloirs par tâche parente, projet ou assigné. Vous y choisissez aussi le tri, l'affichage des sous-tâches, les propriétés visibles sur les cartes et les colonnes du tableau (les colonnes sont verrouillées tant qu'un filtre de statut est actif).
+
+### Enregistrer une vue
+
+Une combinaison de filtres et d'affichage que vous utilisez souvent peut devenir une vue : cliquez sur le bouton **Vues** à côté de la barre des vues, choisissez **Nouvelle vue**, puis donnez-lui un nom et une visibilité.
+
+| Visibilité | Qui la voit | Qui peut la modifier et la supprimer |
+|---|---|---|
+| **Visible par moi seul** | Vous seul | Vous |
+| **Visible par les membres de l'espace de travail** | Tous les membres | Vous, ainsi que les `owner` et `admin` de l'espace de travail |
+
+Les réglages d'affichage enregistrés dans une vue sont son **Affichage par défaut** : les membres la voient ainsi à la première ouverture, puis l'ajustent chacun pour soi sans gêner les autres. Une vue appartient à la page où elle a été créée : celle créée dans un projet reste dans ce projet, et celles créées dans **Mes tâches** sont toujours privées.
+
+Faites glisser les vues dans la barre pour les réordonner ; l'ordre et la visibilité réglés dans **Gérer les vues** ne concernent que vous. Un clic droit sur une vue permet de la modifier, de la supprimer ou de l'**Épingler à la barre latérale**.
+
+### Aperçu latéral
+
+Un clic sur une carte ou une ligne ouvre par défaut la page complète. Choisissez **L'aperçu latéral** dans **Paramètres → Préférences → Ouverture des tâches** et les tâches s'ouvrent dans un panneau à droite de la page, l'en-tête et la barre d'outils restant utilisables. Dans les deux cas, Maj+clic ouvre l'autre mode. Ce réglage ne vaut que pour l'appareil utilisé.
+
+Quand l'aperçu est ouvert, `J` / `K` passent à la tâche suivante ou précédente, `H` / `L` passent d'une colonne à l'autre dans un tableau, et `Esc` le ferme. **Ouvrir la page complète** mène à la page de la tâche.
+
+## Modifications groupées
+
+Sélectionnez plusieurs tâches dans une liste, une grille ou une liste de sous-tâches : une barre d'outils apparaît en bas de l'écran pour changer d'un coup le statut, la priorité ou l'assigné, ou pour les supprimer. Dans une grille, Maj+clic sélectionne une plage.
+
+- Si la sélection couvre plusieurs projets, le menu des statuts ne propose que ceux que tous les workflows concernés autorisent. Une tâche qui n'accepte pas la modification garde sa valeur, les autres sont mises à jour.
+- Un changement de statut groupé s'applique directement. Les tâches assignées à un agent qui quittent `backlog` démarrent normalement une exécution.
+- Une assignation groupée à un agent ou à un squad demande d'abord de confirmer les exécutions qui vont démarrer ; si toutes les tâches sélectionnées sont en `backlog`, elle s'applique directement.
+
+## Marquer comme doublon
+
+Quand la même chose a été saisie deux fois, ouvrez la tâche en trop et choisissez **Marquer comme doublon** dans le menu des statuts ou dans **Relations** du menu d'actions de la tâche, puis sélectionnez la tâche d'origine. Le sélecteur propose d'abord les tâches au titre proche et celles que vous avez consultées récemment.
+
+La tâche passe en `cancelled` et garde le lien vers l'originale :
-## Changer de vue
+- Un bandeau **Doublon de** au-dessus du titre renvoie à la tâche d'origine et affiche son statut actuel. Dans les listes, tableaux et grilles, une flèche avec le numéro de l'originale apparaît à côté de la tâche.
+- Le panneau latéral de l'originale gagne une section **Doublons** qui liste les tâches marquées comme ses doublons et leurs créateurs.
+- En cas d'erreur, cliquez sur **Pas un doublon** dans le bandeau : la tâche revient en `todo`. Passer la tâche à n'importe quel statut autre que `cancelled` retire aussi la marque.
-La page Tâches propose cinq vues — Liste, Tableau, Grille, Gantt et Couloirs — filtrables et triables par statut, assigné, projet et autres propriétés. Elles affichent toutes les mêmes tâches.
+La relation n'a qu'un niveau : une tâche déjà marquée comme doublon ne peut pas servir d'originale, et une tâche qui a déjà des doublons ne peut pas être marquée comme doublon. Si le workflow du projet n'a pas de `cancelled`, le menu d'actions de la tâche ne propose pas cette option.
## Supprimer une tâche
diff --git a/apps/docs/content/docs/issues.ja.mdx b/apps/docs/content/docs/issues.ja.mdx
index 800d7b2d84..da4e11df8c 100644
--- a/apps/docs/content/docs/issues.ja.mdx
+++ b/apps/docs/content/docs/issues.ja.mdx
@@ -4,8 +4,12 @@ description: タスクは 1 件の作業のコンテキスト、担当者、ス
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { IssueStatusDemo } from "@/components/demos/issue-status-demo";
+import { IssueDraftDemo } from "@/components/demos/issue-draft-demo";
+import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
-タスクは Multica で作業を進める基本単位です。機能、バグ、調査など、メンバーまたはエージェントが責任を持って進める作業はすべてタスクになります。関連する議論、ステータスの変化、実行のたびの記録が同じ場所に残るため、チャット履歴やターミナルのログからコンテキストを組み立て直す必要はありません。
+タスクは Multica で作業を進める基本単位です。機能、バグ、調査など、メンバーまたはエージェントが責任を持って進める作業はすべてタスクになります。関連する議論、ステータスの変化、毎回の実行はそのタスクに記録されるので、チャット履歴やターミナルのログを探し回る必要はありません。
## タスクの構成
@@ -17,15 +21,28 @@ import { Callout } from "fumadocs-ui/components/callout";
| **日付、ラベル、カスタムプロパティ** | 計画、分類、チーム独自のフィールド。 |
| **プロジェクトと親子関係** | より大きな作業への所属、または子タスクへの分割。 |
| **アクティビティと実行ログ** | コメント、ステータス変更、実行、エージェントが返した結果。 |
+| **成果物** | コメントでアップロードされたファイル。同じファイルの再アップロードはバージョンとしてまとまります。 |
![タスク詳細: 説明、ディスカッション、右側のプロパティと実行ログ](/images/docs/quickstart-run-result.webp)
## タスクの作成
-**タスク** ページまたはプロジェクト内で作成します。タイトルだけで作成でき、ほかのプロパティは後からいつでも補えます。
+**タスク** ページまたはプロジェクト内で作成します。サイドバーの **新規タスク** か `C` キーで、前回使った方法の作成ダイアログが開きます。**手動で作成** ではタイトルとプロパティを自分で入力します(タイトルだけで作成でき、ほかは後から補えます)。**エージェントで作成** では依頼内容を書くだけです。方法はダイアログ下部で切り替えられ、入力済みの内容は引き継がれます。
各タスクには `MUL-123` のような番号が付きます。数字はワークスペース内で増えていき、管理者がワークスペースのタスクプレフィックスを変更すると、番号は新しいプレフィックスで表示されます。詳細は[ワークスペース](/workspaces#ワークスペースの作成)を参照してください。
+### エージェントで作成
+
+やりたいことを書き、**作成者** にエージェントかスクワッドを選んで **作成** をクリックします。ダイアログはすぐに閉じ、エージェントがバックグラウンドで依頼をタイトルと説明にまとめてタスクを作成します。成功しても失敗してもインボックスに通知が届きます。失敗の通知には **詳細フォームで編集** があり、元の依頼文が手動作成のフォームに入ります。
+
+<IssueDraftDemo />
+
+- エージェントは依頼の内容をそのまま書き起こし、書かれていない要件や受け入れ条件を付け足しません。
+- 依頼文で担当者を指名していれば(「李雷に任せて」など)その人に割り当てます。指名がなければ、担当者は **作成者** で選んだもの、つまりそのエージェント自身か、選んだスクワッドです。新しいタスクは `todo` で作られるため、担当者がエージェントなら、作成後そのまま作業を始めます。
+- ダイアログで選んだプロジェクト、優先度、期限はそのまま使われ、エージェントが文章から別の値を推測することはありません。プロジェクトは最初から表示され、優先度と期限は **⋯** メニューにあります。常に表示するフィールドは **設定 → 環境設定 → タスク作成時に表示するフィールド** で選べます。
+- **もう 1 つ作成** をオンにすると、送信後もダイアログが閉じず、続けて次の依頼を書けます。
+- **作成者** には、あなたが割り当てられるエージェントとスクワッドだけが並びます。エージェントのランタイムの multica CLI が古い場合は、デーモンのアップグレードか手動作成への切り替えを促す表示が出ます。
+
## 担当者の選択
| 担当者 | 効果 |
@@ -42,6 +59,9 @@ import { Callout } from "fumadocs-ui/components/callout";
どのワークスペースにも 7 つの組み込みステータスが用意されており、4 つのライフサイクルカテゴリに分類されます。
+<Tabs items={["カテゴリ別", "ステータス別"]}>
+<Tab value="カテゴリ別" id="status-categories">
+
| カテゴリ | 組み込みステータス | 意味 |
|---|---|---|
| `unstarted` | `backlog`、`todo` | まだ始まっていない作業。計画済みでも保留中でも同じです。 |
@@ -49,7 +69,10 @@ import { Callout } from "fumadocs-ui/components/callout";
| `done` | `done` | 無事に完了した終了状態。 |
| `closed` | `cancelled` | もう追いかけない終了状態で、成功による完了ではありません。 |
-カテゴリはライフサイクルの判断を単純に保つためのものです。ボード、リスト、フィルタ、並び替えはいずれも個々のステータスを見ており、具体的なステータスにはエージェントや自動化が依存する細かい挙動が残ります。
+カテゴリは、タスクがライフサイクルのどの段階にあるかを判断するためだけに使われます。ボード、リスト、フィルタ、並び替えは個々のステータスで動き、エージェントや自動化が頼る特別な挙動も個々のステータスに付いています。
+
+</Tab>
+<Tab value="ステータス別" id="built-in-statuses">
| ステータス | 意味 |
|---|---|
@@ -61,9 +84,16 @@ import { Callout } from "fumadocs-ui/components/callout";
| `blocked` | 今は先に進めない。 |
| `cancelled` | 中止したが、記録は残す。 |
+</Tab>
+</Tabs>
+
+次のデモは、エージェントに割り当て済みで `backlog` に置かれたタスクから始まります。
+
+<IssueStatusDemo />
+
メンバーとエージェントは直接ステータスを変更できます。プロジェクトが[ワークフロー](/workflows)を使う場合は、そのステップから選びます。引き継ぎのあるステップに入ると担当者が変わり、エージェントに作業が依頼されることがあります。
-エージェントは作業の進み具合に合わせてステータスを更新します。通常は着手したら進行中、成果を提出したら確認待ちにします。プロジェクトにワークフローがあれば、そのステップと引き継ぎの指示に従います。実行が終わっただけではタスクは完了せず、質問への回答だけで仕事全体の完了にはなりません。
+エージェントは作業の進み具合に合わせてステータスを更新します。通常は着手時に `in_progress`、成果を提出したら `in_review` にします。プロジェクトにワークフローがあれば、そのステップと引き継ぎの指示に従います。
<Callout type="info">
次の 2 つの変更はシステムが行います。
@@ -76,7 +106,7 @@ import { Callout } from "fumadocs-ui/components/callout";
ワークスペースの `owner` または `admin` は、**コードレビュー**、**QA**、**修正**などのステータスを追加できます。**設定**に**ワークフロー**がある場合は、その下のステータスライブラリで管理します。ない場合は**設定 → タスクステータス**を使います。
-作成時に、未着手、進行中、完了、中止のどれを表すか選びます。この分類はあとで変更できません。独自のステータスに組み込みステータスの特別な動作は付きません。たとえば「待機中」という名前だけではエージェントは一時停止しません。
+作成時に分類を 1 つ選びます。選べるのは未着手、開始済み、完了、終了で、あとから変更できません。独自のステータスに組み込みステータスの特別な動作は付きません。たとえば「待機中」という名前だけではエージェントは一時停止しません。
- 組み込みステータスの名前や色は変更できず、アーカイブもできません。
- 独自のステータスは入力した名前で表示されます。名前や色を変えると、使われているすべての場所に反映されます。
@@ -84,9 +114,25 @@ import { Callout } from "fumadocs-ui/components/callout";
ステータスライブラリには使用できるステータスがあり、プロジェクトのワークフローで使うものと順序を選びます。
+## カスタムプロパティ
+
+重要度、顧客、予算など、チーム独自の項目はカスタムプロパティで追加します。ワークスペースの `owner` または `admin` が **設定 → プロパティ** で管理し、1 つのワークスペースで同時に有効にできるのは 20 個までです。
+
+タイプはテキスト、数値、選択、複数選択、日付、チェックボックス、URL、メンバー、メンバー(複数選択)、テキストリスト、URLリストで、作成後は変更できません。プロパティは絞り込みに使えます。ボードは選択タイプのプロパティでグループ化でき、数値と日付のプロパティは並び替えに使えます。
+
+使わなくなったプロパティはアーカイブできます。ピッカーと絞り込みには出なくなりますが、タスクに入っている値は残り、後から復元できます。
+
## タスクと実行
-タスクは継続して存在する作業の記録であり、[実行](/tasks)はエージェントによる 1 回の具体的な実行です。1 つのタスクからは、最初の実装、追加の修正、再度の確認というように、複数の実行が順に生まれることがあります。実行の完了はその 1 回の実行が終わったことを意味するだけで、タスクが完了したかどうかはタスクのステータスで判断します。
+タスクは継続して存在する作業の記録であり、[実行](/tasks)はエージェントによる 1 回の具体的な実行です。1 つのタスクからは、最初の実装、追加の修正、再度の確認というように、複数の実行が順に生まれることがあります。実行の「完了」はその 1 回の実行が終わったことを意味するだけです。エージェントが質問に答えただけでも、タスク本来の作業が納品されたことにはなりません。タスクが完了したかどうかはタスクのステータスで判断します。
+
+## 成果物
+
+メンバーやエージェントがコメントでアップロードしたファイルは、タスクのサイドバーの **成果物** にまとめられます。ここには最新の画像 3 件とそのほかのファイル 4 件が並び、すべて表示すると、成果物を投稿元のコメントごとに一覧でき、画像・ドキュメント・動画・その他で絞り込めます。ファイルビューアで `G` を押しても同じ画面が開きます。タスクの説明に添付したファイルは入力資料なので、成果物には含まれません。
+
+同じ名前・同じ種類のファイルをもう一度アップロードすると、同じ成果物の新しいバージョンになります。成果物には 1 件だけ、バージョン番号(`v2` など)付きで表示され、コメント内のファイルカードにもそれぞれ何版目かが表示されます。ビューアでバージョン番号をクリックすると古い版に切り替えられ、**コメントで表示** でそのファイルをアップロードしたコメントに移動します。
+
+<DeliverablesDemo />
## プロジェクトと子タスク
@@ -94,11 +140,52 @@ import { Callout } from "fumadocs-ui/components/callout";
大きな作業は子タスクに分割できます。親タスクが全体の目標を保持し、子タスクはそれぞれ独立して進みます。親子のステータスは連動しません。
-子タスクには**ステージ**(stage)を設定でき、1、2、3 とバッチごとに進められます。未完了の最も早いステージのすべての子タスクが `done` または `cancelled` に到達すると、親タスクに子タスク完了の通知が届きます。親タスクの担当者がエージェントの場合は、そのエージェントが起こされ、次のステージへ進むかどうかを判断します。ステージ未設定の子タスクは同じバッチとして扱われ、すべて終了したときに一度だけ通知されます。
+子タスクには**ステージ**(stage)を設定でき、1、2、3 とバッチごとに進められます。未完了の最も早いステージのすべての子タスクが `done` または `cancelled` に到達すると、親タスクに子タスク完了の通知が届きます。親タスクの担当者がエージェントの場合は、そのエージェントが起こされ、次のステージへ進むかどうかを判断します。ステージ未設定の子タスクは同じバッチとして扱われ、すべて終了したときに一度だけ通知されます。このウェイクアップはシステムが行います。ルールとほかのウェイクアップの種類は[タスクのウェイクアップ](/issue-wakeups)を参照してください。
+
+## ビューと表示設定 [#ビューの切り替え]
+
+タスクページには、リスト、ボード、テーブル、ガント、スイムレーンの 5 つのレイアウトがあります。ステータス、担当者、プロジェクトなどのプロパティで絞り込めて、表示されるのはどれも同じタスクです。
+
+**表示** メニューで現在のレイアウトを調整します。ボードはステータス、担当者、プロジェクト、選択タイプのプロパティで、スイムレーンは親タスク、プロジェクト、担当者でグループ化できます。並び替え、サブタスクを表示するかどうか、カードに出すプロパティ、ボードに出す列も設定できます(ステータスで絞り込んでいる間は列を変更できません)。
+
+### ビューを保存する
+
+よく使う絞り込みと表示の組み合わせはビューとして保存できます。ビューバーの横の **ビュー** ボタンから **新規ビュー** を選び、名前と公開範囲を決めます。
+
+| 公開範囲 | 見える人 | 編集・削除できる人 |
+|---|---|---|
+| **自分のみ** | 自分だけ | 自分 |
+| **ワークスペースのメンバーに表示** | ワークスペースの全メンバー | 自分と、ワークスペースの `owner`・`admin` |
+
+ビューに保存した表示設定は **デフォルト表示** です。メンバーが初めて開いたときにその表示になり、以降は各自が調整でき、ほかの人には影響しません。ビューは作成したページにだけ現れます。プロジェクトで作ったビューはそのプロジェクトのもので、**マイタスク** で作ったビューは常に自分だけに表示されます。
+
+ビューバーのビューはドラッグで並べ替えられ、**ビューを管理** での並び順と表示・非表示は自分にだけ適用されます。ビューを右クリックすると、編集、削除、**サイドバーに固定** ができます。
+
+### サイドプレビュー
+
+タスクのカードや行をクリックすると、標準ではページ全体で開きます。**設定 → 環境設定 → タスクを開く** で **サイドプレビュー** にすると、ページ右側のパネルで開き、ページのヘッダーとツールバーはそのまま使えます。どちらの設定でも、Shift+クリックでもう一方の方法で開きます。この設定は今使っているデバイスにだけ適用されます。
+
+プレビューを開いている間は、`J` / `K` で次・前のタスクへ、ボードでは `H` / `L` で隣の列へ移動し、`Esc` で閉じます。**ページ全体で開く** でタスクのページに移ります。
+
+## 一括編集
+
+リスト、テーブル、サブタスク一覧で複数のタスクを選ぶと、画面下部に一括操作のツールバーが現れ、ステータス、優先度、担当者をまとめて変えたり、削除したりできます。テーブルでは Shift+クリックで範囲を選べます。
+
+- 選んだタスクが複数のプロジェクトにまたがる場合、ステータスメニューには、すべてのタスクのワークフローで使えるステータスだけが出ます。変更に対応していないタスクは元のままで、残りが更新されます。
+- 一括のステータス変更はそのまま反映されます。エージェントに割り当て済みのタスクは、`backlog` から外れると通常どおり実行が始まります。
+- エージェントやスクワッドへ一括で割り当てるときは、始まる実行を先に確認します。選んだタスクがすべて `backlog` なら確認なしで割り当てます。
+
+## 重複としてマーク
+
+同じ内容のタスクが 2 つ作られたら、余分なほうのタスクで、ステータスメニューかタスクの操作メニューの **関係** から **重複としてマーク** を選び、元のタスクを選びます。候補には、タイトルが似ているタスクと最近見たタスクが先に出ます。
+
+マークすると、そのタスクは `cancelled` になり、元のタスクを覚えておきます。
-## ビューの切り替え
+- タイトルの上に **重複元:** のバナーが出て、元のタスクへのリンクとその現在のステータスが表示されます。リスト、ボード、テーブルでは、タスクの横に元のタスクの番号付きの矢印が出ます。
+- 元のタスクのサイドバーに **重複** が加わり、重複としてマークされたタスクとその作成者が並びます。
+- 間違えた場合は、バナーの **重複ではない** をクリックすると `todo` に戻ります。ステータスを `cancelled` 以外に変えても、マークは外れます。
-タスクページには、リスト、ボード、テーブル、ガント、スイムレーンの 5 つのビューがあります。ステータス、担当者、プロジェクトなどのプロパティで絞り込み・並べ替えでき、表示されるのはどれも同じタスクです。
+重複の関係は 1 段だけです。重複になっているタスクは元のタスクにできず、すでに重複を持つタスクを別のタスクの重複にすることもできません。プロジェクトのワークフローに `cancelled` がない場合、タスクの操作メニューにこの項目は出ません。
## タスクの削除
diff --git a/apps/docs/content/docs/issues.ko.mdx b/apps/docs/content/docs/issues.ko.mdx
index b6dc5b8acc..2b5dc67df1 100644
--- a/apps/docs/content/docs/issues.ko.mdx
+++ b/apps/docs/content/docs/issues.ko.mdx
@@ -4,8 +4,12 @@ description: 태스크는 한 작업의 컨텍스트, 담당자, 상태, 실행
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { IssueStatusDemo } from "@/components/demos/issue-status-demo";
+import { IssueDraftDemo } from "@/components/demos/issue-draft-demo";
+import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
-태스크는 Multica에서 작업을 계획하는 기본 단위입니다. 기능 하나, 버그 하나, 조사 하나처럼 멤버나 에이전트가 책임지고 진행해야 하는 모든 작업이 태스크가 될 수 있습니다. 관련 논의, 상태 변경, 모든 실행이 한곳에 남으므로 채팅 기록이나 터미널 로그에서 컨텍스트를 다시 조합할 필요가 없습니다.
+태스크는 Multica에서 작업을 계획하는 기본 단위입니다. 기능 하나, 버그 하나, 조사 하나처럼 멤버나 에이전트가 책임지고 진행해야 하는 모든 작업이 태스크가 될 수 있습니다. 관련 논의, 상태 변경, 모든 실행이 그 태스크에 기록되므로 채팅 기록이나 터미널 로그를 다시 뒤질 필요가 없습니다.
## 태스크의 구성
@@ -17,15 +21,28 @@ import { Callout } from "fumadocs-ui/components/callout";
| **날짜, 라벨, 사용자 지정 속성** | 계획, 분류, 팀 고유 필드입니다. |
| **프로젝트와 상하위 관계** | 더 큰 작업 범위에 포함하거나 하위 태스크로 나눕니다. |
| **활동과 실행 로그** | 댓글, 상태 변경, 실행, 에이전트가 반환한 결과입니다. |
+| **산출물** | 댓글에 올린 파일입니다. 같은 파일을 다시 올리면 버전으로 묶입니다. |
![태스크 상세: 설명, 논의, 오른쪽 속성, 실행 로그](/images/docs/quickstart-run-result.webp)
## 태스크 만들기
-**태스크** 페이지나 프로젝트에서 새 태스크를 만들고 제목을 입력합니다. 다른 속성은 언제든 보충할 수 있습니다.
+**태스크** 페이지나 프로젝트에서 새 태스크를 만듭니다. 사이드바의 **새 태스크**나 `C` 키를 누르면 지난번에 쓴 방식으로 생성 대화상자가 열립니다. **직접 만들기**에서는 제목과 속성을 직접 입력하며, 제목만 있으면 만들 수 있고 다른 속성은 언제든 보충할 수 있습니다. **에이전트로 만들기**에서는 요청 내용만 적으면 됩니다. 방식은 대화상자 아래쪽에서 바꿀 수 있고, 이미 입력한 내용은 그대로 넘어갑니다.
각 태스크에는 `MUL-123` 같은 번호가 있습니다. 숫자는 워크스페이스 안에서 증가합니다. 관리자가 워크스페이스의 태스크 접두사를 바꾸면 번호가 새 접두사로 표시됩니다. 자세한 내용은 [워크스페이스](/workspaces#워크스페이스-만들기)를 참고하세요.
+### 에이전트로 만들기
+
+할 일을 적고 **생성자**에서 에이전트나 스쿼드를 고른 뒤 **만들기**를 클릭합니다. 대화상자는 바로 닫히고, 에이전트가 백그라운드에서 요청을 제목과 설명으로 정리해 태스크를 만듭니다. 성공하든 실패하든 인박스로 알림이 옵니다. 실패 알림에는 **고급 양식으로 수정**이 있어, 원래 적은 요청이 직접 만들기 양식에 채워집니다.
+
+<IssueDraftDemo />
+
+- 에이전트는 요청을 원래 뜻대로 옮겨 적고, 적지 않은 요구 사항이나 완료 조건을 덧붙이지 않습니다.
+- 요청에서 담당자를 지목하면("리레이에게 맡겨 줘" 등) 그 사람에게 할당합니다. 지목하지 않으면 담당자는 **생성자**에서 고른 대상, 즉 그 에이전트 자신이거나 고른 스쿼드입니다. 새 태스크는 `todo` 상태로 만들어지므로, 담당자가 에이전트이면 태스크가 만들어진 뒤 바로 작업을 시작합니다.
+- 대화상자에서 고른 프로젝트, 우선순위, 마감일은 그대로 쓰이며, 에이전트가 글에서 다른 값을 추측하지 않습니다. 프로젝트는 처음부터 보이고, 우선순위와 마감일은 **⋯** 메뉴에 있습니다. 항상 보일 필드는 **설정 → 환경설정 → 태스크 생성 시 표시할 필드**에서 정합니다.
+- **하나 더 만들기**를 켜 두면 보낸 뒤에도 대화상자가 닫히지 않아 다음 요청을 이어서 쓸 수 있습니다.
+- **생성자** 목록에는 내가 할당할 수 있는 에이전트와 스쿼드만 나옵니다. 에이전트 런타임의 multica CLI 버전이 너무 낮으면 데몬을 업그레이드하거나 직접 만들기로 바꾸라는 안내가 나옵니다.
+
## 담당자 선택
| 담당자 | 결과 |
@@ -42,6 +59,9 @@ import { Callout } from "fumadocs-ui/components/callout";
모든 워크스페이스에는 기본 상태 7개가 준비되어 있고, 이들은 4개의 수명 주기 카테고리로 묶입니다.
+<Tabs items={["카테고리별", "상태별"]}>
+<Tab value="카테고리별" id="status-categories">
+
| 카테고리 | 기본 상태 | 의미 |
|---|---|---|
| `unstarted` | `backlog`, `todo` | 아직 시작하지 않은 작업. 계획된 것이든 미뤄둔 것이든 같습니다. |
@@ -49,7 +69,10 @@ import { Callout } from "fumadocs-ui/components/callout";
| `done` | `done` | 성공적으로 끝난 종료 상태. |
| `closed` | `cancelled` | 더 이상 진행하지 않는 종료 상태이며, 성공적인 완료는 아닙니다. |
-카테고리는 수명 주기 판단을 단순하게 유지하기 위한 것입니다. 보드와 목록, 필터, 정렬은 모두 개별 상태를 기준으로 동작하며, 구체적인 상태에는 에이전트와 자동화가 의존하는 더 세밀한 동작이 남아 있습니다.
+카테고리는 태스크가 수명 주기의 어느 구간에 있는지 판단하는 데만 쓰입니다. 보드와 목록, 필터, 정렬은 모두 개별 상태를 기준으로 동작하며, 에이전트와 자동화가 의존하는 특별한 동작도 개별 상태에 붙어 있습니다.
+
+</Tab>
+<Tab value="상태별" id="built-in-statuses">
| 상태 | 의미 |
|---|---|
@@ -61,9 +84,16 @@ import { Callout } from "fumadocs-ui/components/callout";
| `blocked` | 지금은 계속 진행할 수 없습니다. |
| `cancelled` | 더 이상 진행하지 않으며 기록은 유지합니다. |
+</Tab>
+</Tabs>
+
+아래 데모는 에이전트에게 할당된 채 `backlog`에 머물러 있는 태스크에서 시작합니다.
+
+<IssueStatusDemo />
+
멤버와 에이전트는 상태를 직접 바꿀 수 있습니다. 프로젝트가 [워크플로](/workflows)를 사용하면 그 안의 단계에서 선택합니다. 인계가 있는 단계로 옮기면 담당자가 바뀌고 에이전트에게 작업을 요청할 수 있습니다.
-에이전트는 작업 진행에 따라 태스크 상태를 업데이트합니다. 보통 시작하면 진행 중으로, 결과를 전달하면 검토 대기로 표시합니다. 프로젝트에 워크플로가 있다면 해당 단계와 인계 지침을 따릅니다. 실행이 끝난 것만으로 태스크가 완료되지는 않으며, 질문에 답한 것만으로 전체 작업을 마친 것도 아닙니다.
+에이전트는 작업 진행에 따라 태스크 상태를 업데이트합니다. 기본적으로 작업을 시작하면 `in_progress`로, 결과를 전달하면 `in_review`로 바꿉니다. 프로젝트에 워크플로가 있다면 해당 단계와 인계 지침을 따릅니다.
<Callout type="info">
다음 두 가지 변경은 시스템이 수행합니다.
@@ -76,7 +106,7 @@ import { Callout } from "fumadocs-ui/components/callout";
워크스페이스의 `owner` 또는 `admin`은 **코드 리뷰**, **QA**, **재작업** 같은 상태를 추가할 수 있습니다. **설정**에 **워크플로**가 있으면 그 아래의 상태 라이브러리에서 관리합니다. 없으면 **설정 → 태스크 상태**를 사용합니다.
-만들 때 미시작, 진행 중, 완료, 취소 중 무엇을 나타내는지 선택합니다. 이 분류는 나중에 바꿀 수 없습니다. 사용자 정의 상태가 기본 상태의 특별한 동작을 얻지는 않습니다. 예를 들어 이름을 “대기”로 정해도 에이전트가 일시 정지되지는 않습니다.
+만들 때 **시작 전**, **시작됨**, **완료**, **종료** 중 하나의 분류를 선택하며, 이 분류는 나중에 바꿀 수 없습니다. 사용자 정의 상태가 기본 상태의 특별한 동작을 얻지는 않습니다. 예를 들어 이름을 “대기”로 정해도 에이전트가 일시 정지되지는 않습니다.
- 기본 상태는 이름과 색을 바꾸거나 보관할 수 없습니다.
- 사용자 정의 상태는 입력한 이름으로 표시됩니다. 이름이나 색을 바꾸면 같은 상태를 쓰는 모든 곳에 적용됩니다.
@@ -84,9 +114,25 @@ import { Callout } from "fumadocs-ui/components/callout";
상태 라이브러리에는 사용 가능한 상태가 모여 있고, 프로젝트 워크플로는 사용할 상태와 순서를 정합니다.
+## 사용자 지정 속성
+
+심각도, 고객, 예산처럼 팀에 필요한 항목은 사용자 지정 속성으로 추가합니다. 워크스페이스의 `owner` 또는 `admin`이 **설정 → 속성**에서 관리하며, 한 워크스페이스에서 동시에 활성화할 수 있는 속성은 20개까지입니다.
+
+유형은 텍스트, 숫자, 선택, 다중 선택, 날짜, 체크박스, URL, 멤버, 멤버(다중 선택), 텍스트 목록, URL 목록이며 만든 뒤에는 바꿀 수 없습니다. 속성은 필터에 쓸 수 있고, 보드는 선택 유형 속성으로 그룹화할 수 있으며, 숫자와 날짜 속성은 정렬에 쓸 수 있습니다.
+
+더 쓰지 않는 속성은 보관할 수 있습니다. 선택기와 필터에서는 사라지지만 태스크에 들어 있는 값은 남고, 나중에 복원할 수 있습니다.
+
## 태스크와 실행
-태스크는 계속 유지되는 작업 기록이고 [실행](/tasks)은 에이전트가 한 번 실행한 기록입니다. 하나의 태스크에서 첫 구현, 추가 수정, 재검토처럼 여러 실행이 차례로 생성될 수 있습니다. 실행이 "완료됨"인 것은 이번 실행이 끝났다는 뜻일 뿐이며, 태스크의 완료 여부는 태스크 상태를 기준으로 판단합니다.
+태스크는 계속 유지되는 작업 기록이고 [실행](/tasks)은 에이전트가 한 번 실행한 기록입니다. 하나의 태스크에서 첫 구현, 추가 수정, 재검토처럼 여러 실행이 차례로 생성될 수 있습니다. 실행이 "완료됨"인 것은 이번 실행이 끝났다는 뜻일 뿐이고, 에이전트가 질문에 답했다고 해서 태스크의 작업이 전달된 것도 아닙니다. 태스크의 완료 여부는 태스크 상태를 기준으로 판단합니다.
+
+## 산출물
+
+멤버와 에이전트가 댓글에 올린 파일은 태스크 사이드바의 **산출물**에 모입니다. 여기에는 최근 이미지 3개와 다른 파일 4개가 바로 보이고, 모두 보기를 누르면 전체 산출물을 올린 댓글별로 보면서 이미지, 문서, 동영상, 기타로 거를 수 있습니다. 파일 뷰어에서 `G`를 눌러도 같은 화면이 열립니다. 태스크 설명에 첨부한 파일은 입력 자료라서 산출물에 들어가지 않습니다.
+
+이름과 형식이 같은 파일을 다시 올리면 같은 산출물의 새 버전이 됩니다. 산출물에는 하나만 버전 번호(예: `v2`)와 함께 표시되고, 댓글의 파일 카드에도 각각 몇 번째 버전인지 나옵니다. 뷰어에서 버전 번호를 클릭하면 이전 버전으로 바꿀 수 있고, **댓글에서 보기**를 누르면 그 파일을 올린 댓글로 이동합니다.
+
+<DeliverablesDemo />
## 프로젝트와 하위 태스크
@@ -94,11 +140,52 @@ import { Callout } from "fumadocs-ui/components/callout";
큰 작업은 하위 태스크로 나눌 수 있습니다. 상위 태스크에는 전체 목표를 남기고 하위 태스크는 각각 독립적으로 진행합니다. 상위와 하위 태스크의 상태는 서로 연동되지 않습니다.
-하위 태스크에는 **단계**(stage)를 지정해 1, 2, 3처럼 묶어서 진행할 수 있습니다. 현재 가장 이른 미완료 단계의 모든 하위 태스크가 `done` 또는 `cancelled`가 되면 상위 태스크에 "하위 태스크 완료" 알림이 전달됩니다. 상위 태스크 담당자가 에이전트이면 에이전트가 깨어나 다음 단계로 진행할지 결정합니다. 단계를 지정하지 않은 하위 태스크는 같은 묶음으로 간주하며 모두 끝났을 때 한 번 알립니다.
+하위 태스크에는 **단계**(stage)를 지정해 1, 2, 3처럼 묶어서 진행할 수 있습니다. 현재 가장 이른 미완료 단계의 모든 하위 태스크가 `done` 또는 `cancelled`가 되면 상위 태스크에 "하위 태스크 완료" 알림이 전달됩니다. 상위 태스크 담당자가 에이전트이면 에이전트가 깨어나 다음 단계로 진행할지 결정합니다. 단계를 지정하지 않은 하위 태스크는 같은 묶음으로 간주하며 모두 끝났을 때 한 번 알립니다. 이 깨우기는 시스템이 합니다. 규칙과 다른 깨우기 방식은 [태스크 깨우기](/issue-wakeups)를 참고하세요.
+
+## 뷰와 표시 설정 [#보기-전환]
+
+태스크 페이지에서는 리스트, 보드, 테이블, 간트, 스윔레인 다섯 가지 레이아웃을 제공합니다. 상태, 담당자, 프로젝트, 기타 속성으로 필터링할 수 있으며 모두 같은 태스크 집합을 표시합니다.
+
+**보기** 메뉴에서 현재 레이아웃을 조정합니다. 보드는 상태, 담당자, 프로젝트, 선택 유형 속성으로, 스윔레인은 상위 태스크, 프로젝트, 담당자로 그룹화합니다. 정렬, 하위 태스크 표시 여부, 카드에 보일 속성, 보드에 보일 열도 정할 수 있습니다(상태 필터가 걸려 있으면 열을 바꿀 수 없습니다).
+
+### 뷰 저장
+
+자주 쓰는 필터와 표시 설정 조합은 뷰로 저장할 수 있습니다. 뷰 바 옆의 **뷰** 버튼에서 **새 뷰**를 고르고 이름과 공개 범위를 정합니다.
+
+| 공개 범위 | 볼 수 있는 사람 | 수정·삭제할 수 있는 사람 |
+|---|---|---|
+| **나만 보기** | 나 | 나 |
+| **워크스페이스 구성원에게 표시** | 워크스페이스 구성원 전체 | 나, 그리고 워크스페이스의 `owner`와 `admin` |
+
+뷰에 저장한 표시 설정은 **기본 표시**입니다. 구성원이 처음 열 때 이 방식으로 보이고, 이후에는 각자 조정하며 서로 영향을 주지 않습니다. 뷰는 만든 페이지에만 나타납니다. 프로젝트에서 만든 뷰는 그 프로젝트에 속하고, **내 태스크**에서 만든 뷰는 항상 나만 봅니다.
+
+뷰 바의 뷰는 끌어서 순서를 바꿀 수 있고, **뷰 관리**에서 바꾼 순서와 표시 여부는 나에게만 적용됩니다. 뷰를 오른쪽 클릭하면 수정, 삭제, **사이드바에 고정**을 할 수 있습니다.
+
+### 사이드 미리보기
+
+태스크 카드나 행을 클릭하면 기본적으로 전체 페이지가 열립니다. **설정 → 환경설정 → 태스크 열기**에서 **사이드 미리보기**로 바꾸면 페이지 오른쪽 패널에서 열리고, 페이지 헤더와 도구 모음은 그대로 쓸 수 있습니다. 어느 쪽을 고르든 Shift+클릭하면 다른 쪽으로 열립니다. 이 설정은 지금 쓰는 기기에만 적용됩니다.
+
+미리보기가 열려 있을 때 `J` / `K`로 다음·이전 태스크로, 보드에서는 `H` / `L`로 옆 열로 이동하고, `Esc`로 닫습니다. **전체 페이지로 열기**를 누르면 태스크 페이지로 갑니다.
+
+## 일괄 수정
+
+리스트, 테이블, 하위 태스크 목록에서 여러 태스크를 선택하면 화면 아래에 일괄 작업 도구 모음이 나타나, 상태·우선순위·담당자를 한꺼번에 바꾸거나 삭제할 수 있습니다. 테이블에서는 Shift+클릭으로 범위를 선택합니다.
+
+- 선택한 태스크가 여러 프로젝트에 걸쳐 있으면 상태 메뉴에는 모든 태스크의 워크플로가 허용하는 상태만 나옵니다. 변경을 지원하지 않는 태스크는 그대로 두고 나머지만 바꿉니다.
+- 일괄 상태 변경은 바로 적용됩니다. 에이전트에게 할당된 태스크가 `backlog`에서 벗어나면 평소처럼 실행이 시작됩니다.
+- 에이전트나 스쿼드에게 일괄 할당할 때는 시작될 실행을 먼저 확인합니다. 선택한 태스크가 모두 `backlog`이면 확인 없이 할당합니다.
+
+## 중복으로 표시
+
+같은 일이 두 번 등록됐다면, 남는 쪽 태스크에서 상태 메뉴나 태스크 작업 메뉴의 **관계**에서 **중복으로 표시**를 고르고 원본 태스크를 선택합니다. 후보로는 제목이 비슷한 태스크와 최근에 본 태스크가 먼저 나옵니다.
+
+표시하면 그 태스크는 `cancelled`가 되고 원본 태스크를 기억합니다.
-## 보기 전환
+- 제목 위에 **중복 원본:** 배너가 나타나 원본 태스크로 연결되고, 원본의 현재 상태도 보여 줍니다. 리스트, 보드, 테이블에서는 태스크 옆에 원본 번호가 붙은 화살표가 나옵니다.
+- 원본 태스크의 사이드바에는 **중복 항목**이 생겨, 중복으로 표시된 태스크와 각 작성자를 보여 줍니다.
+- 잘못 표시했다면 배너의 **중복 아님**을 클릭하세요. 태스크가 `todo`로 돌아갑니다. 상태를 `cancelled`가 아닌 다른 상태로 바꿔도 표시가 사라집니다.
-태스크 페이지에서는 목록, 보드, 표, 간트 차트, 스윔레인 다섯 가지 보기를 제공합니다. 상태, 담당자, 프로젝트, 기타 속성으로 필터링하고 정렬할 수 있으며 모두 같은 태스크 집합을 표시합니다.
+중복 관계는 한 단계뿐입니다. 이미 중복인 태스크는 원본이 될 수 없고, 중복 항목이 있는 태스크는 다른 태스크의 중복으로 표시할 수 없습니다. 프로젝트 워크플로에 `cancelled`가 없으면 태스크 작업 메뉴에 이 항목이 나오지 않습니다.
## 태스크 삭제
diff --git a/apps/docs/content/docs/issues.mdx b/apps/docs/content/docs/issues.mdx
index f41881d8eb..55381b9d37 100644
--- a/apps/docs/content/docs/issues.mdx
+++ b/apps/docs/content/docs/issues.mdx
@@ -4,8 +4,12 @@ description: An issue holds one piece of work's context, assignee, status, and e
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { IssueStatusDemo } from "@/components/demos/issue-status-demo";
+import { IssueDraftDemo } from "@/components/demos/issue-draft-demo";
+import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
-An issue is Multica's basic unit for organizing work: a feature, a bug, an investigation — anything a member or an agent should own and drive forward. The discussion around it, its status changes, and every run stay in one place, so there is no need to reassemble context from chat logs or terminal output.
+An issue is Multica's basic unit for organizing work: a feature, a bug, an investigation — anything a member or an agent should own and drive forward. The discussion, status changes, and every run are recorded on the issue, so nobody has to dig through chat logs or terminal output for context.
## Parts of an issue
@@ -17,15 +21,28 @@ An issue is Multica's basic unit for organizing work: a feature, a bug, an inves
| **Dates, labels, and custom properties** | Planning, categorization, and your team's own fields. |
| **Project and parent-child relationships** | Fits into a larger body of work, or splits into sub-issues. |
| **Activity and execution log** | Comments, status changes, runs, and results returned by agents. |
+| **Deliverables** | Files uploaded in comments, with re-uploads of the same file kept as versions. |
![Issue detail: description, discussion, properties on the right, and the execution log](/images/docs/quickstart-run-result.webp)
## Create an issue
-Create one from the **Issues** page or inside a project — a title is enough, and every other property can be filled in later.
+Create one from the **Issues** page or inside a project. **New Issue** in the sidebar, or `C`, opens the create dialog in the mode you used last: **Create manually** has you fill in the title and properties yourself (a title is enough, the rest can come later), while **Create with agent** only needs a description of the request. Switch modes at the bottom of the dialog; what you have filled in carries over.
Each issue has a number, such as `MUL-123`. The digits increment within the workspace; after an admin changes the workspace's issue prefix, numbers display with the new prefix. See [Workspaces](/workspaces#create-a-workspace).
+### Create with agent
+
+Describe the work, pick an agent or squad under **Created by**, and click **Create**. The dialog closes right away. The agent works in the background, turns the request into a title and description, and creates the issue; success or failure lands in your inbox. A failure notification has **Edit as advanced form**, which puts your original request into the manual form.
+
+<IssueDraftDemo />
+
+- The agent restates your request faithfully and does not add requirements or acceptance criteria you did not give.
+- If the request names an assignee ("give this to Lei Li"), the agent assigns them. Otherwise the assignee is whoever you picked under **Created by**: the agent itself, or the squad if you picked one. New issues start in `todo`, so when the assignee is an agent, it starts working on the issue as soon as it exists.
+- The project, priority, and due date you set in the dialog are used as-is; the agent does not infer different ones from the text. Project shows by default, and priority and due date are under the **⋯** menu. Choose which fields always show in **Settings → Preferences → Fields shown when creating issues**.
+- With **Create another** on, the dialog stays open after each submission so you can write the next one.
+- **Created by** lists only the agents and squads you are allowed to assign. If the agent's runtime has a multica CLI that is too old, the dialog asks you to upgrade the daemon or switch to manual create.
+
## Choose an assignee
| Assignee | Effect |
@@ -40,7 +57,10 @@ Assignment does not bypass an agent's Access; when assigning to a squad, the lea
## Status
-Every workspace starts with seven built-in statuses, grouped into four lifecycle categories:
+Every workspace starts with seven built-in statuses, grouped into four lifecycle categories.
+
+<Tabs items={["By category", "By status"]}>
+<Tab value="By category" id="status-categories">
| Category | Built-in statuses | Meaning |
|---|---|---|
@@ -49,7 +69,10 @@ Every workspace starts with seven built-in statuses, grouped into four lifecycle
| `done` | `done` | Successfully finished; terminal. |
| `closed` | `cancelled` | No longer pursued; terminal, not successful completion. |
-Categories keep lifecycle reasoning simple. Boards, lists, filters, and sorting all work from the individual status, and the concrete statuses preserve the more specific workflow behavior agents and automations rely on.
+Categories only tell you which part of the lifecycle an issue is in. Boards, lists, filters, and sorting work from the individual status, and the special behavior agents and automations rely on is attached to individual statuses too.
+
+</Tab>
+<Tab value="By status" id="built-in-statuses">
| Status | Meaning |
|---|---|
@@ -61,9 +84,16 @@ Categories keep lifecycle reasoning simple. Boards, lists, filters, and sorting
| `blocked` | Cannot continue for now. |
| `cancelled` | No longer pursued; the record stays. |
+</Tab>
+</Tabs>
+
+The demo below starts from an issue already assigned to an agent and parked in `backlog`:
+
+<IssueStatusDemo />
+
Members and agents can change statuses directly. In a project with a [workflow](/workflows), choose from that workflow’s steps. Moving into a step with a handoff can also change the assignee and ask an agent to start work.
-Agents update the issue’s status as work progresses. By default, they mark work in progress when they begin and ready for review when they deliver. When a project has a workflow, they follow its steps and handoff instructions instead. A run ending does not complete the issue by itself; answering a question does not mean the issue’s work is finished.
+Agents update the issue’s status as work progresses: by default they set `in_progress` when they begin and `in_review` when they deliver. When a project has a workflow, they follow its steps and handoff instructions instead.
<Callout type="info">
Two changes are made by the system:
@@ -76,7 +106,7 @@ Two changes are made by the system:
A workspace `owner` or `admin` can add statuses such as **Code Review**, **QA**, or **Rework**. If **Settings** includes **Workflows**, manage them in the status library below it. If not, use **Settings → Issue Statuses**.
-Choose whether the status represents work that has not started, is underway, is finished, or is cancelled. That category cannot be changed after creation. A custom status does not automatically gain the special behavior of a built-in status: for example, naming one “Waiting” does not pause an agent.
+When you create one, pick its category — **Unstarted**, **Started**, **Done**, or **Closed**. The category cannot be changed later. A custom status does not automatically gain the special behavior of a built-in status: for example, naming one “Waiting” does not pause an agent.
- Built-in statuses cannot be renamed, recolored, or archived.
- Custom status names appear as you entered them. Changing a name or color updates it wherever that status is used.
@@ -84,9 +114,25 @@ Choose whether the status represents work that has not started, is underway, is
The status library holds the available statuses. A project’s workflow chooses which ones its issues use and in what order.
+## Custom properties
+
+Fields specific to your team, such as severity, customer, or budget, are custom properties. A workspace `owner` or `admin` manages them in **Settings → Properties**; a workspace can have up to 20 active properties.
+
+The types are text, number, select, multi-select, date, checkbox, URL, member, members, text list, and URL list. The type cannot be changed after creation. Properties can be used in filters; boards can also be grouped by a select property, and number and date properties can be used for sorting.
+
+Archive a property you no longer use: it disappears from pickers and filters, the values already on issues stay, and you can restore it later.
+
## Issues and runs
-An issue is the persistent record of a piece of work; a [run](/tasks) is one concrete run by an agent. One issue can produce several runs over time — a first implementation, follow-up changes, another check. A completed run only means that run ended; whether the issue is finished is determined by the issue's status.
+An issue is the persistent record of a piece of work; a [run](/tasks) is one concrete run by an agent. One issue can produce several runs over time — a first implementation, follow-up changes, another check. A completed run only means that run ended, and an agent answering a question does not mean the issue's work has been delivered; whether the issue is finished is determined by the issue's status.
+
+## Deliverables
+
+Files that members and agents upload in comments are collected in the **Deliverables** section of the issue sidebar. It lists the latest 3 images and 4 other files; **View all** opens every deliverable grouped by the comment that posted it, with filters for images, documents, videos, and other files. `G` in the file viewer opens the same page. Attachments on the issue description are inputs, so they do not count.
+
+Uploading a file again with the same name and type adds a new version of the same deliverable. The section lists it once with its version (for example `v2`), and each file card in the comments shows which version it is. In the viewer, click the version number to switch to an older one, and **Show in comments** to jump to the comment that uploaded it.
+
+<DeliverablesDemo />
## Projects and sub-issues
@@ -94,11 +140,52 @@ An issue belongs to at most one [project](/projects); the project provides share
Larger work can be split into sub-issues: the parent issue keeps the overall goal while sub-issues progress independently. Parent and child statuses do not affect each other.
-Sub-issues can be given a **stage** to advance in batches — 1, 2, 3. When every sub-issue in the earliest unfinished stage reaches `done` or `cancelled`, the parent issue receives a "sub-issues completed" notification; when the parent's assignee is an agent, it wakes up and decides whether to start the next stage. Sub-issues without a stage count as one batch and notify once when they all finish.
+Sub-issues can be given a **stage** to advance in batches — 1, 2, 3. When every sub-issue in the earliest unfinished stage reaches `done` or `cancelled`, the parent issue receives a "sub-issues completed" notification; when the parent's assignee is an agent, it wakes up and decides whether to start the next stage. Sub-issues without a stage count as one batch and notify once when they all finish. The system triggers this wakeup; see [Issue wakeups](/issue-wakeups) for its rules and the other kinds of wakeup.
+
+## Views and display settings [#switch-views]
+
+The Issues page offers five layouts — list, board, table, Gantt, and swimlane — filterable by status, assignee, project, and other properties. They all show the same issues.
+
+The **Display** menu adjusts the current layout. Boards group by status, assignee, project, or a select property, and swimlanes by parent issue, project, or assignee. You can also set the ordering, whether sub-issues show, which properties appear on cards, and which board columns show (columns are locked while a status filter is active).
+
+### Save a view
+
+Save a combination of filters and display settings you use often as a view: click the **Views** button next to the view bar, choose **New view**, and give it a name and visibility.
+
+| Visibility | Who sees it | Who can edit and delete it |
+|---|---|---|
+| **Only visible to me** | Only you | You |
+| **Visible to workspace members** | Every workspace member | You, plus workspace `owner` and `admin` |
+
+The display settings saved in a view are its **Default display**: members see the view that way the first time they open it, then adjust it for themselves without affecting anyone else. A view lives on the page it was created on: one created in a project belongs to that project, and views created in **My Issues** are always private.
+
+Drag views in the view bar to reorder them; ordering and visibility in **Manage views** affect only you. Right-click a view to edit it, delete it, or **Pin to sidebar**.
+
+### Side preview
+
+Clicking an issue card or row opens the full page by default. Switch to **Side preview** in **Settings → Preferences → Opening issues** and issues open in a panel on the right of the page, with the page header and toolbar still usable. Either way, Shift+Click opens the other one. The setting applies to the current device only.
+
+While the preview is open, `J` / `K` move to the next or previous issue, `H` / `L` move between adjacent board columns, and `Esc` closes it. **Open full page** takes you to the issue page.
+
+## Batch edits
+
+Select several issues in a list, a table, or a sub-issue list, and a batch toolbar appears at the bottom to change status, priority, or assignee, or delete them all at once. In a table, Shift-click selects a range.
+
+- When the selection spans several projects, the status menu offers only statuses every selected issue's workflow allows. An issue that does not support a change keeps its value, and the rest are updated.
+- Batch status changes apply directly. Agent-assigned issues that leave `backlog` start running as usual.
+- Batch-assigning to an agent or squad first asks you to confirm the runs that will start; if every selected issue is in `backlog`, the assignment applies directly.
+
+## Mark as duplicate
+
+When the same thing was filed twice, open the extra issue and choose **Mark as duplicate** from the status menu or from **Relations** in the issue actions menu, then pick the original. The picker suggests issues with a similar title and issues you viewed recently.
+
+The issue moves to `cancelled` and remembers its original:
-## Switch views
+- A **Duplicate of** banner above the title links to the original and shows its current status. In lists, boards, and tables, an arrow with the original's number appears next to the issue.
+- The original's sidebar gains a **Duplicates** section listing the issues marked as its duplicates and who created them.
+- To undo a mistake, click **Not a duplicate** on the banner; the issue goes back to `todo`. Changing the status to anything other than `cancelled` also removes the mark.
-The Issues page offers five views — list, board, table, Gantt, and swimlane — filterable and sortable by status, assignee, project, and other properties. They all show the same issues.
+The relation is one level deep: an issue that is itself a duplicate cannot be an original, and an issue that already has duplicates cannot be marked as a duplicate. If a project's workflow has no `cancelled`, the issue actions menu does not offer it.
## Delete an issue
diff --git a/apps/docs/content/docs/issues.zh.mdx b/apps/docs/content/docs/issues.zh.mdx
index 230c58ec7c..ed8aa3026b 100644
--- a/apps/docs/content/docs/issues.zh.mdx
+++ b/apps/docs/content/docs/issues.zh.mdx
@@ -4,8 +4,12 @@ description: 任务保存一项工作的上下文、负责人、状态和执行
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { IssueStatusDemo } from "@/components/demos/issue-status-demo";
+import { IssueDraftDemo } from "@/components/demos/issue-draft-demo";
+import { DeliverablesDemo } from "@/components/demos/deliverables-demo";
-任务是 Multica 中安排工作的基本单位:一项功能、一个 bug、一次调研,任何需要成员或智能体负责推进的工作。围绕它的讨论、状态变化和每次执行都留在同一处,无需再从聊天记录或终端日志中拼接上下文。
+任务是 Multica 中安排工作的基本单位:一项功能、一个 bug、一次调研,只要需要成员或智能体负责推进,都可以建成任务。围绕它的讨论、状态变化和每次执行都记在这条任务里,不用再去聊天记录或终端日志里翻找。
## 任务的组成
@@ -17,15 +21,28 @@ import { Callout } from "fumadocs-ui/components/callout";
| **日期、标签和自定义属性** | 计划、分类和团队自己的字段。 |
| **项目和父子关系** | 归入更大的工作范围,或拆成子任务。 |
| **动态和执行日志** | 评论、状态变化、运行和智能体返回的结果。 |
+| **产物** | 评论中上传的文件,同名文件按版本归在一起。 |
![任务详情:描述、讨论、右侧属性与执行日志](/images/docs/quickstart-run-result.webp)
## 创建任务
-在**任务**页面或项目中新建,填写标题即可,其余属性随时补充。
+在**任务**页面或项目中新建。点侧栏的**新建任务**或按 `C`,创建对话框会用你上次用的方式打开:**手动创建**由你填写标题和属性,填了标题就能创建,其余属性随时补充;**通过智能体创建**只需要写一段需求。两种方式可以在对话框底部切换,切换不会丢掉已经填写的内容。
每个任务有一个编号,例如 `MUL-123`。数字在工作区内递增;管理员修改工作区的任务前缀后,编号会用新前缀显示。详见[工作区](/workspaces#创建工作区)。
+### 通过智能体创建
+
+写下要做的事,选一个智能体或小队作为**创建者**,点击**创建**。对话框随即关闭,智能体在后台把需求整理成标题和描述,建好任务,成功或失败都会通知到你的收件箱。失败的通知里有**在完整表单中编辑**,点开后原来写的需求会填进手动创建的表单。
+
+<IssueDraftDemo />
+
+- 智能体按原意复述需求,不会替你补上没提过的要求或验收条件。
+- 需求里点名了负责人(例如"交给李雷"),就按点名分配;没点名时,负责人是创建者本身,选的是小队时是这个小队。新任务的状态是 `todo`,所以负责人是智能体时,任务建好后它会接着开始处理。
+- 对话框里选的项目、优先级和截止日期会原样使用,智能体不会从文字里另行推断。项目默认显示,优先级和截止日期在 **⋯** 菜单里;常驻显示哪些字段,在**设置 → 偏好设置 → 创建任务时显示的字段**中调整。
+- 打开**继续创建**后,提交完对话框不会关闭,可以接着写下一条。
+- 创建者列表只包含你有权分配的智能体和小队。智能体所在运行时的 multica CLI 版本过低时,对话框会提示升级守护进程,或改用手动创建。
+
## 选择负责人
| 负责人 | 效果 |
@@ -40,7 +57,10 @@ import { Callout } from "fumadocs-ui/components/callout";
## 状态
-每个工作区都自带 7 个内置状态,归入 4 个生命周期分类:
+每个工作区都自带 7 个内置状态,归入 4 个生命周期分类。
+
+<Tabs items={["按分类", "按状态"]}>
+<Tab value="按分类" id="status-categories">
| 分类 | 内置状态 | 含义 |
|---|---|---|
@@ -49,7 +69,10 @@ import { Callout } from "fumadocs-ui/components/callout";
| `done` | `done` | 顺利完成,终态。 |
| `closed` | `cancelled` | 不再继续,终态,但不算顺利完成。 |
-分类让生命周期判断保持简单。看板、列表、筛选和排序都按具体状态来,具体状态也保留了智能体和自动化依赖的那些更细的行为。
+分类只用来判断任务处在生命周期的哪一段。看板、列表、筛选和排序都按具体状态工作,智能体和自动化依赖的特殊行为也挂在具体状态上。
+
+</Tab>
+<Tab value="按状态" id="built-in-statuses">
| 状态 | 含义 |
|---|---|
@@ -61,9 +84,16 @@ import { Callout } from "fumadocs-ui/components/callout";
| `blocked` | 暂时无法继续。 |
| `cancelled` | 不再继续,保留记录。 |
+</Tab>
+</Tabs>
+
+下面的演示从一条已分配给智能体、停在 `backlog` 的任务开始:
+
+<IssueStatusDemo />
+
成员和智能体可以直接修改状态。项目使用[工作流](/workflows)时,只能选择这个工作流中的步骤。进入设有交接的步骤,还会更换负责人,并可能请智能体开始工作。
-智能体会随工作进展更新任务状态。默认情况下,开始工作时标记为进行中,交付后标记为等待检查;项目使用工作流时,则按其中的步骤和交接说明推进。一次运行结束不等于任务完成,仅回答一个问题也不表示任务本身的工作已经交付。
+智能体会随工作进展更新任务状态:默认开始工作时改为 `in_progress`,交付后改为 `in_review`;项目使用工作流时,按其中的步骤和交接说明推进。
<Callout type="info">
两个变化由系统执行:
@@ -76,7 +106,7 @@ import { Callout } from "fumadocs-ui/components/callout";
工作区的 `owner` 或 `admin` 可以添加自己的状态,比如**代码审查**、**QA**、**返工**。设置中有**工作流**时,在它下方的状态库中管理;没有时,在**设置 → 任务状态**中管理。
-创建时,选择这个状态表示尚未开始、进行中、已完成还是已取消,之后不能更改分类。自定义状态不会自动获得内置状态的特殊行为,例如取名"等待"并不会让智能体暂停。
+创建时要为它选一个分类:未开始、已开始、已完成或已关闭,之后不能更改。自定义状态不会自动获得内置状态的特殊行为,例如取名"等待"并不会让智能体暂停。
- 内置状态的名称、颜色不能修改,也不能归档。
- 自定义状态始终显示你填写的名字。修改名称或颜色,会同步到所有使用它的地方。
@@ -84,9 +114,25 @@ import { Callout } from "fumadocs-ui/components/callout";
状态库保存可用的状态;项目的工作流决定任务使用其中哪些状态,以及它们的顺序。
+## 自定义属性
+
+团队自己的字段,例如严重程度、客户、预算,用自定义属性添加。工作区的 `owner` 或 `admin` 在**设置 → 属性**中管理,一个工作区最多同时启用 20 个属性。
+
+类型有文本、数字、单选、多选、日期、勾选、链接、成员、成员(多选)、文本列表和链接列表,创建后不能更改。属性可以用于筛选;看板还能按单选属性分组,数字和日期属性可以用来排序。
+
+不再使用的属性可以归档:它从选择器和筛选中隐藏,任务上已有的值保留,之后可以恢复。
+
## 任务与运行
-任务是持续存在的工作记录;[运行](/tasks)是智能体的一次具体执行。一个任务可以先后产生多次运行——第一次实现、补充修改、再次检查。运行“已完成”只表示这一次执行结束;任务是否完成,以任务的状态为准。
+任务是持续存在的工作记录;[运行](/tasks)是智能体的一次具体执行。一个任务可以先后产生多次运行——第一次实现、补充修改、再次检查。运行"已完成"只表示这一次执行结束,智能体回答了一个问题也不代表任务本身的工作已经交付;任务是否完成,以任务的状态为准。
+
+## 产物
+
+成员和智能体在评论里上传的文件,会汇总到任务侧栏的**产物**区。这里直接列出最新的 3 张图片和 4 个其他文件,点**查看全部**可以按评论分组浏览全部产物,并按图片、文档、视频和其他筛选;在文件查看器里按 `G` 也能打开这个页面。任务描述里的附件算作输入材料,不计入产物。
+
+同名、同类型的文件再次上传,算作同一份产物的新版本。产物区只列一份,标出版本号(例如 `v2`),评论里的文件卡片也标着各自是第几版。在查看器里点版本号可以切到旧版本,点**定位到评论**回到上传它的那条评论。
+
+<DeliverablesDemo />
## 项目和子任务
@@ -94,11 +140,52 @@ import { Callout } from "fumadocs-ui/components/callout";
较大的工作可以拆成子任务:父任务保留整体目标,子任务各自独立推进。父子状态互不联动。
-子任务可以设置**阶段**(stage),按 1、2、3 分批推进。当前最早未完成阶段的全部子任务到达 `done` 或 `cancelled` 时,父任务会收到"子任务完成"通知;父任务的负责人是智能体时,它会被唤醒并决定是否推进下一阶段。未设置阶段的子任务视为同一批,全部结束时通知一次。
+子任务可以设置**阶段**(stage),按 1、2、3 分批推进。当前最早未完成阶段的全部子任务到达 `done` 或 `cancelled` 时,父任务会收到"子任务完成"通知;父任务的负责人是智能体时,它会被唤醒并决定是否推进下一阶段。未设置阶段的子任务视为同一批,全部结束时通知一次。这次唤醒由系统发起,规则和其他唤醒方式见[任务唤醒](/issue-wakeups)。
+
+## 视图和显示设置 [#切换视图]
+
+任务页面提供列表、看板、表格、甘特图和泳道五种布局,可按状态、负责人、项目和其他属性筛选,展示的都是同一批任务。
+
+**显示**菜单调整当前布局:看板可以按状态、负责人、项目或单选属性分组,泳道按父级任务、项目或负责人分组;还可以设置排序、是否显示子任务、卡片上显示哪些属性,以及看板显示哪些列(有状态筛选时不能调整列)。
+
+### 保存视图
+
+常用的筛选和显示组合可以存成视图:点视图栏旁的**视图**按钮,选择**新增视图**,填写名称和可见性。
+
+| 可见性 | 谁能看到 | 谁能编辑和删除 |
+|---|---|---|
+| **仅自己可见** | 只有你 | 你 |
+| **工作区成员可见** | 工作区全体成员 | 你,以及工作区的 `owner` 和 `admin` |
+
+视图里保存的显示设置是**默认显示**:成员第一次打开时按它显示,之后各自调整,互不影响。视图只在创建它的页面出现:在项目里建的只属于这个项目;在**我的任务**里建的视图始终仅自己可见。
+
+视图栏中的视图可以拖动排序,**管理视图**里调整顺序和是否显示,只影响你自己。右键点击视图可以编辑、删除,或**固定到侧栏**。
+
+### 悬浮预览
+
+点击任务卡片或列表行,默认打开详情页。在**设置 → 偏好设置 → 打开任务**中改成**悬浮预览**后,任务会在页面右侧的浮层中打开,页头和工具栏仍可使用。不论选哪种,按住 Shift 点击都会用另一种方式打开。这项设置只作用于当前设备。
+
+预览打开时,`J` / `K` 切换到下一条或上一条任务,看板中 `H` / `L` 在相邻列之间切换,`Esc` 关闭;点**打开完整页面**进入详情页。
+
+## 批量修改
+
+在列表、表格或子任务列表中勾选多条任务,页面底部会出现批量工具栏,可以一次修改状态、优先级、负责人,或删除。表格中按住 Shift 可以连续勾选一段。
+
+- 选中的任务分属多个项目时,状态菜单只提供它们的工作流都允许的状态。个别任务不支持某项修改时,它保持原样,其余照常更新。
+- 批量改状态直接生效。已分配给智能体的任务离开 `backlog` 后会开始运行。
+- 批量分配给智能体或小队时,会先确认将要开始的运行;所选任务都在 `backlog` 时直接分配。
+
+## 标记为重复
+
+同一件事被建了两次,在多出来的那条任务上,从状态菜单或任务操作菜单的**关系**中选择**标记为重复**,再选出原始任务。选择列表会先给出标题相近的任务和你最近看过的任务。
+
+确认后,这条任务改为 `cancelled`,并记下原始任务:
-## 切换视图
+- 标题上方出现**重复于**横幅,链接到原始任务并显示它当前的状态;在列表、看板和表格中,任务旁显示指向原始任务编号的箭头。
+- 原始任务的侧栏多出**重复项**,列出标成它重复的任务和各自的创建者。
+- 标错了,点横幅上的**不是重复**,任务回到 `todo`。把状态改成 `cancelled` 以外的任何状态,标记同样会去掉。
-任务页面提供列表、看板、表格、甘特图和泳道五种视图,可按状态、负责人、项目和其他属性筛选、排序,展示的都是同一批任务。
+重复关系只有一层:已经是重复的任务不能作为原始任务,已有重复项的任务也不能再标成别人的重复。项目的工作流里没有 `cancelled` 时,任务操作菜单不提供这一项。
## 删除任务
diff --git a/apps/docs/content/docs/lark-bot-integration.fr.mdx b/apps/docs/content/docs/lark-bot-integration.fr.mdx
index e1138ce76b..7f35c843d0 100644
--- a/apps/docs/content/docs/lark-bot-integration.fr.mdx
+++ b/apps/docs/content/docs/lark-bot-integration.fr.mdx
@@ -4,8 +4,9 @@ description: Connectez un agent à Feishu et confiez-lui du travail directement
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Connectez un agent Multica en tant que bot Feishu : les membres de l'équipe peuvent lui envoyer des messages directs dans Feishu, le @mentionner dans un groupe ou utiliser `/issue` pour créer des tâches. Les conversations et les historiques d'exécution restent enregistrés dans l'espace de travail Multica.
+Connectez un agent Multica en tant que bot Feishu : les membres de l'équipe peuvent lui envoyer des messages directs dans Feishu, le @mentionner dans un groupe ou utiliser `/issue` pour créer des tâches. Les conversations et les historiques d'exécution sont enregistrés dans l'espace de travail Multica.
Chaque bot correspond à un seul agent. Pour utiliser plusieurs agents dans Feishu, connectez un bot pour chacun d'eux.
@@ -13,13 +14,22 @@ Chaque bot correspond à un seul agent. Pour utiliser plusieurs agents dans Feis
Le propriétaire de l'agent ainsi que les propriétaires et administrateurs de l'espace de travail peuvent lancer une connexion :
-1. Ouvrez **Agents** et sélectionnez l'agent à connecter à Feishu.
-2. Accédez à **Intégrations** et cliquez sur **Associer à Feishu**.
-3. Scannez le QR code avec Feishu et confirmez l'autorisation.
-4. Revenez dans Multica. Lorsque la page affiche **Connecté à Feishu**, le bot est prêt.
-
-
-Le QR code est un identifiant à usage unique ; s'il expire, générez-en un nouveau. Un agent déjà connecté n'affiche plus le point d'entrée de scan ; pour renommer le bot ou ajuster ses permissions, cliquez sur **Gérer dans Feishu**.
+<Steps>
+<Step>
+Ouvrez **Agents** et sélectionnez l'agent à connecter à Feishu.
+</Step>
+<Step>
+Accédez à **Intégrations** et cliquez sur **Associer à Feishu**.
+</Step>
+<Step>
+Scannez le QR code avec Feishu et confirmez l'autorisation. Le QR code ne sert qu'une fois ; s'il expire, générez-en un nouveau.
+</Step>
+<Step>
+Revenez dans Multica. Lorsque la page affiche **Connecté à Feishu**, le bot est prêt.
+</Step>
+</Steps>
+
+Un agent déjà connecté n'affiche plus le point d'entrée de scan ; pour renommer le bot ou ajuster ses permissions, cliquez sur **Gérer dans Feishu**.
<Callout type="info">
Les nouvelles connexions ne sont actuellement ouvertes qu'à Feishu en Chine continentale. Les connexions Lark internationales existantes continuent de fonctionner et peuvent toujours être gérées.
@@ -29,11 +39,19 @@ Les nouvelles connexions ne sont actuellement ouvertes qu'à Feishu en Chine con
La première fois qu'un membre écrit au bot, il reçoit un lien d'association de compte :
-1. Ouvrez le lien et connectez-vous à Multica.
-2. Confirmez le compte de l'espace de travail à associer.
-3. Revenez dans Feishu et renvoyez le message.
+<Steps>
+<Step>
+Ouvrez le lien et connectez-vous à Multica.
+</Step>
+<Step>
+Confirmez le compte de l'espace de travail à associer.
+</Step>
+<Step>
+Revenez dans Feishu et renvoyez le message.
+</Step>
+</Steps>
-Ce n'est qu'après l'association que Multica peut confirmer de quel membre de l'espace de travail provient un message. Les non-membres ne peuvent pas utiliser le bot.
+C'est cette association qui permet à Multica de savoir de quel membre de l'espace de travail provient un message. Les non-membres ne peuvent pas utiliser le bot.
## Confier du travail à l'agent dans Feishu
@@ -43,7 +61,7 @@ Ce n'est qu'après l'association que Multica peut confirmer de quel membre de l'
### Conversations de groupe
-Ajoutez d'abord le bot au groupe, puis mentionnez-le avec `@Bot` et décrivez votre besoin. Le bot ne répond qu'aux messages qui le @mentionnent explicitement ; lorsqu'il s'exécute, il s'appuie sur le contexte récent qu'il peut lire dans la session en cours.
+Ajoutez d'abord le bot au groupe, puis mentionnez-le avec `@Bot` et décrivez votre besoin. Le bot ne répond qu'aux messages qui le @mentionnent explicitement, et chaque exécution reçoit les derniers messages du groupe comme contexte.
### Créer une tâche
@@ -86,7 +104,7 @@ Redémarrez le serveur API, puis connectez le bot depuis la page **Intégrations
- **QR code expiré** : fermez la boîte de dialogue et relancez la connexion.
- **Le bot demande d'associer le compte** : ouvrez le lien d'association et connectez-vous avec le compte Multica de cet espace de travail.
- **Le bot ne s'exécute pas** : vérifiez si l'agent est archivé et si le [runtime](/daemon-runtimes) qu'il utilise est en ligne.
-- **Le bot ne répond jamais** : l'application doit transmettre les événements via une connexion longue — Multica n'a pas de point de terminaison webhook. Dans la console développeur Feishu/Lark, ouvrez **Events & Callbacks → Event Configuration** et vérifiez que la méthode d'abonnement est la connexion longue et non une URL de requête, que `im.message.receive_v1` est bien souscrit, et que la version de l'application qui porte cette configuration est publiée (et approuvée, si le tenant fait valider les publications). Une application configurée avec une URL de requête s'associe quand même, affiche toujours l'état Connecté, mais ne reçoit silencieusement rien.
+- **Le bot ne répond jamais** : l'application doit transmettre les événements via une connexion longue ; Multica n'a pas de point de terminaison webhook. Dans la console développeur Feishu/Lark, ouvrez **Events & Callbacks → Event Configuration** et vérifiez que la méthode d'abonnement est la connexion longue et non une URL de requête, que `im.message.receive_v1` est bien souscrit, et que la version de l'application qui porte cette configuration est publiée (et approuvée, si le tenant fait valider les publications). Une application configurée avec une URL de requête s'associe quand même, affiche toujours l'état Connecté, mais ne reçoit silencieusement rien.
## Étapes suivantes
diff --git a/apps/docs/content/docs/lark-bot-integration.ja.mdx b/apps/docs/content/docs/lark-bot-integration.ja.mdx
index 6befc6c670..ef1950e49b 100644
--- a/apps/docs/content/docs/lark-bot-integration.ja.mdx
+++ b/apps/docs/content/docs/lark-bot-integration.ja.mdx
@@ -4,8 +4,9 @@ description: エージェントを Feishu に接続し、DM やグループチ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Multica のエージェントを Feishu Bot として接続すると、チームメンバーは Feishu から DM を送る、グループで @メンションする、`/issue` でタスクを作成するといった操作ができます。会話と実行記録は引き続き Multica ワークスペースに保存されます。
+Multica のエージェントを Feishu Bot として接続すると、チームメンバーは Feishu から DM を送る、グループで @メンションする、`/issue` でタスクを作成するといった操作ができます。会話と実行記録は Multica ワークスペースに保存されます。
各 Bot に接続できるエージェントは 1 つだけです。Feishu で複数のエージェントを使う場合は、エージェントごとに Bot を接続してください。
@@ -13,12 +14,22 @@ Multica のエージェントを Feishu Bot として接続すると、チーム
エージェントの所有者、ワークスペースの owner、admin が接続を開始できます。
-1. **エージェント**を開き、Feishu に接続するエージェントを選びます。
-2. **連携**を開き、**Feishu に接続**をクリックします。
-3. Feishu で QR コードをスキャンし、認証を承認します。
-4. Multica に戻ります。画面に **Feishu に接続済み**と表示されたら利用できます。
-
-QR コードは 1 回限りの認証情報です。期限が切れた場合は再生成してください。接続済みのエージェントにはスキャン画面は再表示されません。名前や権限を変更する場合は、**Feishu で管理**をクリックします。
+<Steps>
+<Step>
+**エージェント**を開き、Feishu に接続するエージェントを選びます。
+</Step>
+<Step>
+**連携**を開き、**Feishu に接続**をクリックします。
+</Step>
+<Step>
+Feishu で QR コードをスキャンし、認証を承認します。QR コードは 1 回しか使えません。期限が切れた場合は再生成してください。
+</Step>
+<Step>
+Multica に戻ります。画面に **Feishu に接続済み**と表示されたら利用できます。
+</Step>
+</Steps>
+
+接続済みのエージェントにはスキャン画面は再表示されません。名前や権限を変更する場合は、**Feishu で管理**をクリックします。
<Callout type="info">
現在、新規接続を利用できるのは中国本土版の Feishu だけです。既存の国際版 Lark 接続は、引き続き利用および管理できます。
@@ -28,11 +39,19 @@ QR コードは 1 回限りの認証情報です。期限が切れた場合は
メンバーが初めて Bot にメッセージを送ると、アカウント連携用のリンクが届きます。
-1. リンクを開き、Multica にログインします。
-2. 紐づけるワークスペースのアカウントを確認します。
-3. Feishu に戻り、もう一度メッセージを送ります。
+<Steps>
+<Step>
+リンクを開き、Multica にログインします。
+</Step>
+<Step>
+紐づけるワークスペースのアカウントを確認します。
+</Step>
+<Step>
+Feishu に戻り、もう一度メッセージを送ります。
+</Step>
+</Steps>
-連携が完了すると、Multica はメッセージを送ったワークスペースメンバーを特定できるようになります。ワークスペースのメンバーではないユーザーは Bot を利用できません。
+Multica はこの連携によって、メッセージを送ったワークスペースメンバーを特定します。ワークスペースのメンバーではないユーザーは Bot を利用できません。
## Feishu から仕事を依頼する
@@ -42,7 +61,7 @@ Bot にそのままメッセージを送ります。後続のメッセージは
### グループチャット
-Bot をグループへ追加し、`@Bot` に続けて依頼内容を入力します。Bot が応答するのは、明示的に @メンションされたメッセージだけです。実行時には、現在のセッションで読み取れる直近のコンテキストも利用します。
+Bot をグループへ追加し、`@Bot` に続けて依頼内容を入力します。Bot が応答するのは、明示的に @メンションされたメッセージだけです。実行時には、グループの直近の数件のメッセージもコンテキストとして渡されます。
### タスクを作成する
@@ -53,7 +72,7 @@ Bot をグループへ追加し、`@Bot` に続けて依頼内容を入力しま
Safari ではログインに成功してもログイン画面に残ります。
```
-1 行目がタイトルになり、残りの内容が説明になります。`/issue` だけを送信した場合、Multica は直前のメッセージをタイトルとして使おうとします。
+1 行目がタイトルになり、残りの内容が説明になります。`/issue` だけを送信してもタスクは作成されず、Bot が使い方を返信します。
## 接続を管理する
diff --git a/apps/docs/content/docs/lark-bot-integration.ko.mdx b/apps/docs/content/docs/lark-bot-integration.ko.mdx
index d03e68cc4e..8cdcca9a5f 100644
--- a/apps/docs/content/docs/lark-bot-integration.ko.mdx
+++ b/apps/docs/content/docs/lark-bot-integration.ko.mdx
@@ -4,8 +4,9 @@ description: 에이전트를 Feishu에 연결해 DM이나 그룹 채팅에서
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Multica 에이전트를 Feishu Bot으로 연결하면 팀 멤버가 Feishu에서 에이전트와 DM을 나누고 그룹에서 @멘션하거나 `/issue`로 태스크를 만들 수 있습니다. 대화와 실행 기록은 계속 Multica 워크스페이스에 저장됩니다.
+Multica 에이전트를 Feishu Bot으로 연결하면 팀 멤버가 Feishu에서 에이전트와 DM을 나누고 그룹에서 @멘션하거나 `/issue`로 태스크를 만들 수 있습니다. 대화와 실행 기록은 Multica 워크스페이스에 저장됩니다.
Bot 하나는 에이전트 하나에만 대응합니다. Feishu에서 여러 에이전트를 사용하려면 각 에이전트에 별도의 Bot을 연결하세요.
@@ -13,12 +14,22 @@ Bot 하나는 에이전트 하나에만 대응합니다. Feishu에서 여러 에
에이전트 owner, 워크스페이스 owner, admin이 연결을 시작할 수 있습니다.
-1. **에이전트**를 열고 Feishu에 연결할 에이전트를 선택합니다.
-2. **연동**으로 이동해 **Feishu에 연결**을 클릭합니다.
-3. Feishu로 QR 코드를 스캔하고 승인을 확인합니다.
-4. Multica로 돌아옵니다. 페이지에 **Feishu에 연결됨**이 표시되면 사용할 수 있습니다.
-
-QR 코드는 일회용 자격 증명이며 만료되면 다시 생성하면 됩니다. 이미 연결된 에이전트에는 스캔 메뉴가 다시 표시되지 않습니다. 이름이나 권한을 조정하려면 **Feishu에서 관리**를 클릭하세요.
+<Steps>
+<Step>
+**에이전트**를 열고 Feishu에 연결할 에이전트를 선택합니다.
+</Step>
+<Step>
+**연동**으로 이동해 **Feishu에 연결**을 클릭합니다.
+</Step>
+<Step>
+Feishu로 QR 코드를 스캔하고 승인을 확인합니다. QR 코드는 한 번만 쓸 수 있으며 만료되면 다시 생성하면 됩니다.
+</Step>
+<Step>
+Multica로 돌아옵니다. 페이지에 **Feishu에 연결됨**이 표시되면 사용할 수 있습니다.
+</Step>
+</Steps>
+
+이미 연결된 에이전트에는 스캔 메뉴가 다시 표시되지 않습니다. 이름이나 권한을 조정하려면 **Feishu에서 관리**를 클릭하세요.
<Callout type="info">
현재 새 연결은 중국 본토 버전 Feishu에서만 만들 수 있습니다. 기존 국제 버전 Lark 연결은 계속 사용하고 관리할 수 있습니다.
@@ -28,11 +39,19 @@ QR 코드는 일회용 자격 증명이며 만료되면 다시 생성하면 됩
멤버가 Bot에 처음 메시지를 보내면 계정 연결 링크를 받습니다.
-1. 링크를 열고 Multica에 로그인합니다.
-2. 연결할 워크스페이스 계정을 확인합니다.
-3. Feishu로 돌아가 메시지를 다시 보냅니다.
+<Steps>
+<Step>
+링크를 열고 Multica에 로그인합니다.
+</Step>
+<Step>
+연결할 워크스페이스 계정을 확인합니다.
+</Step>
+<Step>
+Feishu로 돌아가 메시지를 다시 보냅니다.
+</Step>
+</Steps>
-연결을 마쳐야 Multica가 메시지를 보낸 워크스페이스 멤버를 확인할 수 있습니다. 멤버가 아닌 사람은 Bot을 사용할 수 없습니다.
+Multica는 이 연결로 메시지를 보낸 워크스페이스 멤버를 확인합니다. 멤버가 아닌 사람은 Bot을 사용할 수 없습니다.
## Feishu에서 작업 요청
@@ -42,7 +61,7 @@ Bot에 바로 메시지를 보내면 됩니다. 연속된 메시지는 같은 Mu
### 그룹 채팅
-먼저 Bot을 그룹 채팅에 추가한 뒤 `@Bot`과 요구 사항을 함께 작성합니다. Bot은 자신을 명시적으로 @멘션한 메시지에만 응답합니다. 실행할 때는 현재 대화에서 읽을 수 있는 최근 컨텍스트를 함께 사용합니다.
+먼저 Bot을 그룹 채팅에 추가한 뒤 `@Bot`과 요구 사항을 함께 작성합니다. Bot은 자신을 명시적으로 @멘션한 메시지에만 응답하며, 실행할 때 그룹의 최근 메시지 몇 개를 컨텍스트로 함께 가져갑니다.
### 태스크 만들기
@@ -53,7 +72,7 @@ Bot에 바로 메시지를 보내면 됩니다. 연속된 메시지는 같은 Mu
Safari에서 로그인에 성공해도 로그인 페이지에 계속 머뭅니다.
```
-첫 줄이 제목이 되고 나머지 내용이 설명이 됩니다. `/issue`만 보내면 Multica가 이전 메시지를 제목으로 사용하려고 시도합니다.
+첫 줄이 제목이 되고 나머지 내용이 설명이 됩니다. `/issue`만 보내면 태스크가 만들어지지 않고, Bot이 사용법을 답장으로 보냅니다.
## 연결 관리
diff --git a/apps/docs/content/docs/lark-bot-integration.mdx b/apps/docs/content/docs/lark-bot-integration.mdx
index 984a727a6a..975baee5f5 100644
--- a/apps/docs/content/docs/lark-bot-integration.mdx
+++ b/apps/docs/content/docs/lark-bot-integration.mdx
@@ -4,8 +4,9 @@ description: Connect an agent to Feishu and hand it work directly from a DM or a
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Connect a Multica agent as a Feishu Bot and team members can DM it in Feishu, @-mention it in a group, or use `/issue` to create issues. Conversations and run records are still saved to the Multica workspace.
+Connect a Multica agent as a Feishu Bot and team members can DM it in Feishu, @-mention it in a group, or use `/issue` to create issues. Conversations and run records are saved in the Multica workspace.
Each Bot maps to exactly one agent. To use several agents in Feishu, connect a Bot for each of them.
@@ -13,13 +14,22 @@ Each Bot maps to exactly one agent. To use several agents in Feishu, connect a B
The agent's owner and workspace owners and admins can start a connection:
-1. Open **Agents** and select the agent to connect to Feishu.
-2. Go to **Integrations** and click **Bind to Feishu**.
-3. Scan the QR code with Feishu and confirm the authorization.
-4. Return to Multica. Once the page shows **Connected to Feishu**, the Bot is ready.
-
-
-The QR code is a one-time credential; if it expires, generate a new one. An agent that is already connected no longer shows the scan entry point; to rename the Bot or adjust its permissions, click **Manage in Feishu**.
+<Steps>
+<Step>
+Open **Agents** and select the agent to connect to Feishu.
+</Step>
+<Step>
+Go to **Integrations** and click **Bind to Feishu**.
+</Step>
+<Step>
+Scan the QR code with Feishu and confirm the authorization. The QR code works only once; if it expires, generate a new one.
+</Step>
+<Step>
+Return to Multica. Once the page shows **Connected to Feishu**, the Bot is ready.
+</Step>
+</Steps>
+
+An agent that is already connected no longer shows the scan entry point; to rename the Bot or adjust its permissions, click **Manage in Feishu**.
<Callout type="info">
New connections are currently open only for mainland-China Feishu. Existing international Lark connections keep working and can still be managed.
@@ -29,11 +39,19 @@ New connections are currently open only for mainland-China Feishu. Existing inte
The first time a member messages the Bot, they receive an account binding link:
-1. Open the link and sign in to Multica.
-2. Confirm the workspace account to link.
-3. Return to Feishu and send the message again.
+<Steps>
+<Step>
+Open the link and sign in to Multica.
+</Step>
+<Step>
+Confirm the workspace account to link.
+</Step>
+<Step>
+Return to Feishu and send the message again.
+</Step>
+</Steps>
-Only after binding can Multica confirm which workspace member a message comes from. Non-members cannot use the Bot.
+This binding is how Multica knows which workspace member a message comes from. Non-members cannot use the Bot.
## Hand work to the agent in Feishu
@@ -43,7 +61,7 @@ Message the Bot directly. Consecutive messages stay in the same Multica conversa
### Group chats
-Add the Bot to the group first, then `@Bot` and describe what you need. The Bot only responds to messages that explicitly @-mention it; when it runs, it draws on the recent context it can read in the current session.
+Add the Bot to the group first, then `@Bot` and describe what you need. The Bot only responds to messages that explicitly @-mention it, and each run includes the group's most recent messages as context.
### Create an issue
@@ -86,7 +104,7 @@ Restart the API server, then connect the Bot from the agent's **Integrations** p
- **QR code expired**: close the dialog and start the connection again.
- **The Bot asks for account binding**: open the binding link and sign in with the Multica account for that workspace.
- **The Bot doesn't run**: check whether the agent is archived and whether the [runtime](/daemon-runtimes) it uses is online.
-- **The Bot never replies at all**: the app must push events over a long connection — Multica has no webhook endpoint. In the Feishu/Lark developer console, open **Events & Callbacks → Event Configuration** and confirm that the subscription method is the long connection rather than a request URL, that `im.message.receive_v1` is subscribed, and that the app version carrying that configuration is published (and approved, where the tenant reviews releases). An app set to a request URL still binds, still shows Connected, and silently receives nothing.
+- **The Bot never replies at all**: the app must push events over a long connection; Multica has no webhook endpoint. In the Feishu/Lark developer console, open **Events & Callbacks → Event Configuration** and confirm that the subscription method is the long connection rather than a request URL, that `im.message.receive_v1` is subscribed, and that the app version carrying that configuration is published (and approved, where the tenant reviews releases). An app set to a request URL still binds, still shows Connected, and silently receives nothing.
## Next steps
diff --git a/apps/docs/content/docs/lark-bot-integration.zh.mdx b/apps/docs/content/docs/lark-bot-integration.zh.mdx
index d897b8888e..bfce8e2c4b 100644
--- a/apps/docs/content/docs/lark-bot-integration.zh.mdx
+++ b/apps/docs/content/docs/lark-bot-integration.zh.mdx
@@ -4,8 +4,9 @@ description: 把智能体接入飞书,在私聊或群聊中直接交代工作
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-把一个 Multica 智能体连接成飞书 Bot 后,团队成员可以在飞书里私聊它、在群里 @ 它,也可以用 `/issue` 创建任务。对话和执行记录仍会保存到 Multica 工作区。
+把一个 Multica 智能体连接成飞书 Bot 后,团队成员可以在飞书里私聊它、在群里 @ 它,也可以用 `/issue` 创建任务。对话和执行记录都保存在 Multica 工作区。
每个 Bot 只对应一个智能体。需要在飞书中使用多个智能体时,分别为它们连接 Bot。
@@ -13,13 +14,22 @@ import { Callout } from "fumadocs-ui/components/callout";
智能体的所有者、工作区 owner 和 admin 可以发起连接:
-1. 打开 **智能体**,选择要接入飞书的智能体。
-2. 进入 **集成**,点击 **绑定到飞书**。
-3. 用飞书扫描二维码并确认授权。
-4. 回到 Multica。页面显示 **已连接到飞书** 后即可使用。
-
-
-二维码为一次性凭证,过期后重新生成即可。已经连接的智能体不会再次显示扫码入口;需要改名或调整权限时,点击 **在飞书中管理**。
+<Steps>
+<Step>
+打开 **智能体**,选择要接入飞书的智能体。
+</Step>
+<Step>
+进入 **集成**,点击 **绑定到飞书**。
+</Step>
+<Step>
+用飞书扫描二维码并确认授权。二维码只能用一次,过期后重新生成即可。
+</Step>
+<Step>
+回到 Multica。页面显示 **已连接到飞书** 后即可使用。
+</Step>
+</Steps>
+
+已经连接的智能体不会再次显示扫码入口;需要改名或调整权限时,点击 **在飞书中管理**。
<Callout type="info">
目前只开放中国大陆版飞书的新连接入口。已有的国际版 Lark 连接仍可继续使用和管理。
@@ -29,11 +39,19 @@ import { Callout } from "fumadocs-ui/components/callout";
成员第一次给 Bot 发消息时,会收到一个账号绑定链接:
-1. 打开链接并登录 Multica。
-2. 确认要关联的工作区账号。
-3. 回到飞书,再发送一次消息。
+<Steps>
+<Step>
+打开链接并登录 Multica。
+</Step>
+<Step>
+确认要关联的工作区账号。
+</Step>
+<Step>
+回到飞书,再发送一次消息。
+</Step>
+</Steps>
-绑定后,Multica 才能确认消息来自哪位工作区成员。非成员无法使用 Bot。
+Multica 靠这次绑定确认消息来自哪位工作区成员。非成员无法使用 Bot。
## 在飞书中交代工作
@@ -43,7 +61,7 @@ import { Callout } from "fumadocs-ui/components/callout";
### 群聊
-先把 Bot 加入群聊,再 `@Bot` 并写下要求。Bot 只会响应明确 @ 它的消息;执行时会结合当前会话中可读取的近期上下文。
+先把 Bot 加入群聊,再 `@Bot` 并写下要求。Bot 只响应明确 @ 它的消息,执行时会带上群里最近的几条消息作为上下文。
### 创建任务
@@ -86,7 +104,7 @@ openssl rand -base64 32
- **二维码失效**:关闭弹窗后重新发起连接。
- **Bot 要求绑定账号**:打开绑定链接并使用该工作区的 Multica 账号登录。
- **Bot 不执行**:检查智能体是否已归档,以及它使用的[运行时](/daemon-runtimes)是否在线。
-- **Bot 完全不回复**:应用必须通过长连接推送事件,Multica 没有 webhook 接收地址。打开飞书开发者后台的 **事件与回调 → 事件配置**,确认订阅方式是使用长连接接收事件而不是请求地址,`im.message.receive_v1` 已订阅,并且包含该配置的版本已发布(企业需要审核时还要通过审核)。配成请求地址的应用照样能绑定、照样显示「已连接」,但一条消息都收不到。
+- **Bot 完全不回复**:应用必须通过长连接推送事件,Multica 没有 webhook 接收地址。打开飞书开发者后台的 **事件与回调 → 事件配置**,确认订阅方式是使用长连接接收事件而不是请求地址,`im.message.receive_v1` 已订阅,并且包含该配置的版本已发布(企业需要审核时还要通过审核)。配成请求地址的应用照样能绑定、照样显示"已连接",但一条消息都收不到。
## 接下来
diff --git a/apps/docs/content/docs/members-roles.fr.mdx b/apps/docs/content/docs/members-roles.fr.mdx
index b8c1d59947..775019777d 100644
--- a/apps/docs/content/docs/members-roles.fr.mdx
+++ b/apps/docs/content/docs/members-roles.fr.mdx
@@ -4,6 +4,7 @@ description: Invitez des membres et gérez les permissions de l'espace de travai
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RolesDemo } from "@/components/demos/roles-demo";
Toute personne qui rejoint un [espace de travail](/workspaces) en est membre, et chaque membre a un rôle : `owner`, `admin` ou `member`. Les rôles ne contrôlent que les paramètres de l'espace de travail et la gestion de l'équipe ; la collaboration au quotidien — créer des tâches, écrire des commentaires — est ouverte à tous les membres.
@@ -20,13 +21,15 @@ Toute personne qui rejoint un [espace de travail](/workspaces) en est membre, et
Un espace de travail doit toujours conserver au moins un `owner` : le dernier `owner` ne peut être ni rétrogradé, ni retiré, ni quitter l'espace de travail.
+<RolesDemo />
+
<Callout type="info">
Les rôles ne déterminent pas qui peut exécuter un agent. Chaque agent a son propre périmètre d'accès (**Accès**), et `owner` comme `admin` ne peuvent pas le contourner pour exécuter des agents auxquels l'accès ne leur a pas été accordé. Consultez [Agents](/agents#permissions-et-accès).
</Callout>
## Inviter des membres
-`owner` et `admin` envoient les invitations depuis Paramètres → Membres, en saisissant une adresse e-mail et en choisissant un rôle. Les invitations ne peuvent accorder que `admin` ou `member` ; un `owner` doit d'abord rejoindre l'espace de travail, puis être promu par un `owner` existant.
+`owner` et `admin` cliquent sur **Inviter un membre** dans **Paramètres → Membres**, saisissent une adresse e-mail, choisissent un rôle et envoient l'invitation. Les invitations ne peuvent accorder que `admin` ou `member` ; un `owner` doit d'abord rejoindre l'espace de travail, puis être promu par un `owner` existant.
![Gestion des membres : le formulaire d'invitation et la liste des membres avec leurs rôles](/images/docs/members-roster.webp)
@@ -34,11 +37,13 @@ La personne invitée accepte en se connectant avec cette adresse e-mail — aucu
Le lien d'invitation n'apparaît que dans l'e-mail ; il n'existe aucun endroit dans le produit pour le consulter ou le copier. Si l'envoi de l'e-mail échoue, l'invitation existe tout de même — révoquez-la et envoyez-en une nouvelle.
+Pour obtenir un lien à transmettre directement, générez-en un dans l'onglet **Liens de partage** de **Paramètres → Membres** en choisissant un rôle et une durée de validité. Toute personne qui a ce lien peut rejoindre l'espace de travail avec le rôle choisi, jusqu'à ce qu'il expire ou soit révoqué.
+
## Changer de rôle
-Un `admin` peut faire passer un membre de `admin` à `member` et inversement, et peut retirer les membres qui ont l'un de ces deux rôles. Tout changement impliquant `owner` — promotion, modification ou retrait — ne peut être effectué que par un `owner`.
+Dans la liste des membres, ouvrez le menu d'actions à droite d'un membre et choisissez **Changer de rôle** ; le nouveau rôle s'applique immédiatement.
-Les changements de rôle prennent effet immédiatement.
+Un `admin` peut faire passer un membre de `admin` à `member` et inversement, et peut retirer les membres qui ont l'un de ces deux rôles. Tout changement impliquant `owner` — promotion, modification ou retrait — ne peut être effectué que par un `owner`.
## Retirer un membre
diff --git a/apps/docs/content/docs/members-roles.ja.mdx b/apps/docs/content/docs/members-roles.ja.mdx
index 58f8c4176e..1b4d26ec82 100644
--- a/apps/docs/content/docs/members-roles.ja.mdx
+++ b/apps/docs/content/docs/members-roles.ja.mdx
@@ -4,6 +4,7 @@ description: メンバーを招待し、owner、admin、member の 3 つのロ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RolesDemo } from "@/components/demos/roles-demo";
[ワークスペース](/workspaces)に参加した人は全員メンバーで、各メンバーは `owner`、`admin`、`member` のいずれか 1 つのロールを持ちます。ロールが制御するのはワークスペース設定とチーム管理だけです。タスクの作成やコメントの投稿といった日常のコラボレーションは、すべてのメンバーに開かれています。
@@ -20,13 +21,15 @@ import { Callout } from "fumadocs-ui/components/callout";
ワークスペースには常に最低 1 人の `owner` が必要です。最後の `owner` は降格も削除もできず、退出もできません。
+<RolesDemo />
+
<Callout type="info">
ロールは、誰がエージェントを実行できるかを決めません。各エージェントには独自のアクセス範囲(Access)があり、`owner` や `admin` もそれを迂回して、許可されていないエージェントを実行することはできません。詳しくは[エージェント](/agents#権限と-access)を参照してください。
</Callout>
## メンバーの招待
-`owner` と `admin` は、設定 → メンバーでメールアドレスを入力し、ロールを選んで招待を送信します。招待で付与できるのは `admin` または `member` だけです。`owner` にするには、先にワークスペースへ参加してもらい、既存の `owner` が昇格させます。
+`owner` と `admin` は**設定 → メンバー**で**メンバーを招待**をクリックし、メールアドレスを入力してロールを選び、送信します。招待で付与できるのは `admin` または `member` だけです。`owner` にするには、先にワークスペースへ参加してもらい、既存の `owner` が昇格させます。
![メンバー管理:招待フォームとロール付きのメンバー一覧](/images/docs/members-roster.webp)
@@ -34,11 +37,13 @@ import { Callout } from "fumadocs-ui/components/callout";
招待リンクはメールにのみ含まれ、プロダクトの画面にはそれを表示・コピーする場所がありません。メールの送信に失敗しても招待レコードは残るため、取り消してから送り直せます。
+そのまま転送できるリンクが必要な場合は、**設定 → メンバー**の**共有リンク**でロールと有効期限を選んで生成します。リンクを受け取った人は、期限が切れるか取り消されるまで、選んだロールで参加できます。
+
## ロールの変更
-`admin` は `admin` と `member` の間でロールを変更でき、この 2 つのロールのメンバーを削除することもできます。`owner` が関わる変更 — 昇格、変更、削除 — を実行できるのは `owner` だけです。
+メンバー一覧で対象メンバーの右側にある操作メニューを開き、**ロールを変更**を選びます。変更はただちに反映されます。
-ロールの変更はただちに反映されます。
+`admin` は `admin` と `member` の間でロールを変更でき、この 2 つのロールのメンバーを削除することもできます。`owner` が関わる変更(昇格、変更、削除)を実行できるのは `owner` だけです。
## メンバーの削除
diff --git a/apps/docs/content/docs/members-roles.ko.mdx b/apps/docs/content/docs/members-roles.ko.mdx
index c9a5eca0f0..6be9e1a268 100644
--- a/apps/docs/content/docs/members-roles.ko.mdx
+++ b/apps/docs/content/docs/members-roles.ko.mdx
@@ -4,6 +4,7 @@ description: 멤버를 초대하고 owner, admin, member 세 가지 역할로
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RolesDemo } from "@/components/demos/roles-demo";
[워크스페이스](/workspaces)에 참여한 사람은 모두 멤버이며, 각 멤버는 `owner`, `admin`, `member` 중 하나의 역할을 가집니다. 역할은 워크스페이스 설정과 팀 관리 권한만 제어합니다. 태스크 생성, 댓글 작성 같은 일상적인 협업은 모든 멤버에게 열려 있습니다.
@@ -20,13 +21,15 @@ import { Callout } from "fumadocs-ui/components/callout";
워크스페이스에는 항상 `owner`가 한 명 이상 있어야 합니다. 마지막 `owner`는 강등되거나 제거될 수 없으며 워크스페이스를 떠날 수도 없습니다.
+<RolesDemo />
+
<Callout type="info">
역할은 에이전트를 실행할 수 있는 사람을 결정하지 않습니다. 각 에이전트에는 별도의 접근 범위(Access)가 있으며, `owner`와 `admin`도 권한이 없는 에이전트를 우회해서 실행할 수 없습니다. 자세한 내용은 [에이전트](/agents#권한과-access)를 참고하세요.
</Callout>
## 멤버 초대
-`owner`와 `admin`은 설정 → 멤버에서 이메일을 입력하고 역할을 선택한 뒤 초대를 보낼 수 있습니다. 초대 시 부여할 수 있는 역할은 `admin`과 `member`뿐입니다. `owner`로 지정하려면 먼저 워크스페이스에 참여한 다음 기존 `owner`가 역할을 올려야 합니다.
+`owner`와 `admin`은 **설정 → 멤버**에서 **멤버 초대**를 누르고 이메일을 입력한 뒤 역할을 선택해 초대를 보냅니다. 초대 시 부여할 수 있는 역할은 `admin`과 `member`뿐입니다. `owner`로 지정하려면 먼저 워크스페이스에 참여한 다음 기존 `owner`가 역할을 올려야 합니다.
![멤버 관리: 초대 양식과 역할이 표시된 멤버 명단](/images/docs/members-roster.webp)
@@ -34,11 +37,13 @@ import { Callout } from "fumadocs-ui/components/callout";
초대 링크는 이메일에만 표시되며 제품 화면에서 확인하거나 복사할 수 없습니다. 이메일 전송에 실패해도 초대 기록은 남으므로 취소한 뒤 다시 보낼 수 있습니다.
+바로 전달할 수 있는 링크가 필요하면 **설정 → 멤버**의 **공유 링크**에서 역할과 유효 기간을 선택해 링크를 만드세요. 링크를 가진 사람은 링크가 만료되거나 취소될 때까지 선택한 역할로 참여할 수 있습니다.
+
## 역할 변경
-`admin`은 `admin`과 `member` 사이에서 역할을 변경할 수 있고 두 역할의 멤버를 제거할 수도 있습니다. `owner` 승격, 역할 변경, 제거처럼 `owner`와 관련된 변경은 `owner`만 수행할 수 있습니다.
+멤버 목록에서 해당 멤버 오른쪽의 작업 메뉴를 열고 **역할 변경**을 선택하면 즉시 적용됩니다.
-역할 변경은 즉시 적용됩니다.
+`admin`은 `admin`과 `member` 사이에서 역할을 변경할 수 있고 두 역할의 멤버를 제거할 수도 있습니다. `owner` 승격, 역할 변경, 제거처럼 `owner`와 관련된 변경은 `owner`만 수행할 수 있습니다.
## 멤버 제거
diff --git a/apps/docs/content/docs/members-roles.mdx b/apps/docs/content/docs/members-roles.mdx
index 3bac902e09..200e66f508 100644
--- a/apps/docs/content/docs/members-roles.mdx
+++ b/apps/docs/content/docs/members-roles.mdx
@@ -4,6 +4,7 @@ description: Invite members and manage workspace permissions with the owner, adm
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RolesDemo } from "@/components/demos/roles-demo";
Everyone who joins a [workspace](/workspaces) is a member, and each member has one role: `owner`, `admin`, or `member`. Roles only control workspace settings and team management; day-to-day collaboration — creating issues, writing comments — is open to all members.
@@ -20,13 +21,15 @@ Everyone who joins a [workspace](/workspaces) is a member, and each member has o
A workspace must always keep at least one `owner`: the last `owner` cannot be demoted, removed, or leave.
+<RolesDemo />
+
<Callout type="info">
Roles do not decide who can run an agent. Each agent has its own Access scope, and `owner` and `admin` cannot bypass it to run agents they were not granted. See [Agents](/agents#permissions-and-access).
</Callout>
## Invite members
-`owner` and `admin` send invitations from Settings → Members by entering an email and picking a role. Invitations can only grant `admin` or `member`; an `owner` must join the workspace first and then be promoted by an existing `owner`.
+`owner` and `admin` open **Settings → Members**, click **Invite member**, enter an email, pick a role, and send. Invitations can only grant `admin` or `member`; an `owner` must join the workspace first and then be promoted by an existing `owner`.
![Member management: the invite form and the roster with roles](/images/docs/members-roster.webp)
@@ -34,11 +37,13 @@ The invitee accepts by logging in with that email — no prior signup is needed.
The invitation link appears only in the email; there is no place in the product to view or copy it. If the email fails to send, the invitation record still exists — revoke it and send a new one.
+When you need a link you can pass along yourself, generate one under **Share links** in **Settings → Members** by choosing a role and an expiry. Anyone with the link can join with that role until it expires or is revoked.
+
## Change roles
-An `admin` can move roles between `admin` and `member`, and can remove members holding those two roles. Any change involving `owner` — promoting, changing, or removing — can only be performed by an `owner`.
+In the member list, open the actions menu at the right of a member's row and choose **Change role**. The new role takes effect immediately.
-Role changes take effect immediately.
+An `admin` can move roles between `admin` and `member`, and can remove members holding those two roles. Any change involving `owner` — promoting, changing, or removing — can only be performed by an `owner`.
## Remove a member
diff --git a/apps/docs/content/docs/members-roles.zh.mdx b/apps/docs/content/docs/members-roles.zh.mdx
index be1cc4b25d..69f8273626 100644
--- a/apps/docs/content/docs/members-roles.zh.mdx
+++ b/apps/docs/content/docs/members-roles.zh.mdx
@@ -4,6 +4,7 @@ description: 邀请成员,并用 owner、admin 和 member 三种角色管理
---
import { Callout } from "fumadocs-ui/components/callout";
+import { RolesDemo } from "@/components/demos/roles-demo";
加入[工作区](/workspaces)的人都是成员,每位成员有一个角色:`owner`、`admin` 或 `member`。角色只控制工作区设置和团队管理;创建任务、发表评论等日常协作对所有成员开放。
@@ -20,13 +21,15 @@ import { Callout } from "fumadocs-ui/components/callout";
工作区必须始终保留至少一名 `owner`:最后一名 `owner` 不能被降级、移除或离开。
+<RolesDemo />
+
<Callout type="info">
角色不决定谁能运行智能体。每个智能体有独立的访问范围(Access),`owner` 和 `admin` 也不能绕过它运行未授权的智能体。详见[智能体](/agents#权限与-access)。
</Callout>
## 邀请成员
-`owner` 和 `admin` 在设置 → 成员中输入邮箱、选择角色后发送邀请。邀请只能授予 `admin` 或 `member`;`owner` 需要先加入工作区,再由现有 `owner` 提升。
+`owner` 和 `admin` 在**设置 → 成员**中点击**邀请成员**,填写邮箱、选择角色后发送。邀请只能授予 `admin` 或 `member`;`owner` 需要先加入工作区,再由现有 `owner` 提升。
![成员管理:邀请表单与带角色的成员名册](/images/docs/members-roster.webp)
@@ -34,11 +37,13 @@ import { Callout } from "fumadocs-ui/components/callout";
邀请链接只出现在邮件里,产品界面中没有查看或复制它的入口。邮件发送失败时邀请记录仍然存在,可以撤销后重新发送。
+需要一条能直接转发的链接时,在**设置 → 成员**的**分享链接**中选择角色和有效期后生成。拿到链接的人都可以以所选角色加入,直到链接过期或被撤销。
+
## 调整角色
-`admin` 可以在 `admin` 和 `member` 之间调整角色,也可以移除这两类成员。涉及 `owner` 的变更——提升、更改或移除——只有 `owner` 能执行。
+在成员列表中打开某位成员右侧的操作菜单,选择**更改角色**,角色立即生效。
-角色变化立即生效。
+`admin` 可以在 `admin` 和 `member` 之间调整角色,也可以移除这两类成员。涉及 `owner` 的变更——提升、更改或移除——只有 `owner` 能执行。
## 移除成员
diff --git a/apps/docs/content/docs/mentioning-agents.fr.mdx b/apps/docs/content/docs/mentioning-agents.fr.mdx
index 62f22412fe..b281b9f5e8 100644
--- a/apps/docs/content/docs/mentioning-agents.fr.mdx
+++ b/apps/docs/content/docs/mentioning-agents.fr.mdx
@@ -4,6 +4,8 @@ description: "@mentionnez un agent dans un commentaire de tâche, ou continuez
---
import { Callout } from "fumadocs-ui/components/callout";
+import { MentionDemo } from "@/components/demos/mention-demo";
+import { SteerDemo } from "@/components/demos/steer-demo";
@mentionnez un agent dans un commentaire lorsque vous voulez qu'il examine une nouvelle information, réponde à une question ou aide l'assigné actuel. Le commentaire devient le point de départ de l'exécution ; l'assigné et le statut de la tâche restent inchangés.
@@ -27,9 +29,9 @@ Après avoir choisi un agent ou un squad dans l'éditeur de commentaire, un aper
- si chaque cible provient d'une @mention directe, de l'assigné de la tâche ou d'un chef de squad ;
- si une cible est indisponible, ou si vous n'avez pas la permission de l'exécuter.
-Décocher un agent n'ignore que ce déclenchement-ci — inutile de supprimer son nom du commentaire, et le réglage Accès de l'agent n'est pas modifié.
+Décocher un agent n'ignore que ce déclenchement-ci : inutile de supprimer son nom du commentaire, et le réglage Accès de l'agent n'est pas modifié.
-![Aperçu des déclenchements avant l'envoi : liste des agents qui commenceront à travailler une fois le commentaire envoyé](/images/docs/mention-trigger-preview.webp)
+<MentionDemo />
Une fois le commentaire publié, un runtime en ligne prend généralement l'exécution en charge immédiatement ; si le runtime est hors ligne, l'exécution attend dans la file d'attente.
@@ -45,15 +47,37 @@ Lorsqu'un commentaire @mentionne explicitement d'autres cibles (y compris des me
Les réponses restent attribuées à l'agent ciblé même lorsque son runtime est hors ligne ou occupé. Multica ne démarre pas automatiquement l'assigné de la tâche après un délai. Pour impliquer un autre agent, @mentionnez-le explicitement.
+## Réorienter un agent en cours d'exécution
+
+Quand un agent part dans la mauvaise direction en plein travail, inutile de l'arrêter pour tout recommencer. Écrivez la correction dans la zone de commentaire et envoyez-la : le message rejoint son exécution en cours, l'agent le lit dès la fin de l'étape en cours et poursuit la tâche d'origine dans la nouvelle direction.
+
+<SteerDemo />
+
+Quand le destinataire est en cours d'exécution, une étiquette sous la zone de commentaire indique comment le message sera remis. Cliquez dessus pour changer :
+
+| Option | Effet |
+|---|---|
+| Ajouter à l'exécution en cours | Lu après l'étape en cours ; l'agent poursuit la tâche d'origine. |
+| Démarrer après cette exécution | N'interrompt pas l'exécution en cours ; traité ensuite dans une nouvelle exécution. |
+| Arrêter et recommencer | Arrête l'exécution en cours et recommence à partir de ce message. |
+| Ne démarrera pas cette fois | Publie le commentaire sans déclencher cet agent. |
+
+Après l'envoi, le commentaire affiche d'abord « En attente de lecture par … », puis « Lu par … » une fois le message lu. La liste des étapes du journal d'exécution indique aussi à quelle étape il a été lu. Si la remise échoue, vous pouvez réessayer ou l'envoyer comme nouvelle exécution.
+
+- Seul du texte peut rejoindre une exécution en cours. Un message avec des pièces jointes est traité après la fin de l'exécution.
+- La réorientation doit être prise en charge par l'outil de codage IA de l'agent. Sinon, « Ajouter à l'exécution en cours » n'est pas proposé.
+- Le choix par défaut se règle dans **Paramètres → Préférences**, sous **En répondant à un agent en cours d'exécution**. Vous pouvez toujours le modifier pour chaque message avant l'envoi.
+- Dans le chat, **Réorienter** sur un message en file d'attente fonctionne autrement : la réponse en cours s'arrête d'abord ; voir [Chat](/chat#envoyer-des-messages-pendant-une-réponse).
+
## Regroupement des commentaires consécutifs
-Lorsque le même agent a déjà une exécution en attente sur la tâche, les nouveaux commentaires consécutifs sont fusionnés dans cette exécution en attente ; si l'agent est déjà en cours d'exécution, les commentaires suivants attendent la fin de l'exécution en cours et sont fusionnés en une seule exécution de suivi. Vous pouvez continuer à ajouter des informations sans attendre la réponse de l'agent.
+Lorsque le même agent a déjà une exécution en attente sur la tâche, les nouveaux commentaires sont fusionnés dans cette exécution et traités ensemble à son démarrage. Si l'agent est déjà en cours d'exécution, chaque commentaire est traité selon le choix fait dans la zone de commentaire (voir la section précédente). Vous pouvez continuer à ajouter des informations sans attendre la réponse de l'agent.
Lorsqu'un commentaire @mentionne plusieurs agents différents, chaque agent obtient sa propre exécution ; plusieurs mentions qui désignent le même agent n'en produisent qu'une seule.
## Commentaires qui ne déclenchent pas d'agent
-Deux possibilités :
+Il y a deux possibilités :
- Commencez le commentaire par `/note` : il est publié comme une note entre membres et ne déclenche aucun agent.
- Utilisez `@all` : cela notifie tous les membres de l'espace de travail et désactive, pour ce commentaire, le déclenchement automatique de l'assigné.
@@ -70,7 +94,7 @@ Une @mention ne peut pas contourner le réglage Accès d'un agent. Si vous n'ave
## Agents qui se mentionnent entre eux
-Les agents peuvent @mentionner d'autres agents dans leurs réponses. Lorsque A @mentionne B et que B @mentionne A en retour, le système fusionne les exécutions en double au même moment, mais il ne décide pas quand la collaboration doit prendre fin — inscrivez la condition d'arrêt dans les instructions de l'agent.
+Les agents peuvent @mentionner d'autres agents dans leurs réponses. Lorsque A @mentionne B et que B @mentionne A en retour, le système fusionne les exécutions en double au même moment, mais il ne décide pas si la collaboration doit prendre fin. Indiquez dans les instructions de l'agent quand s'arrêter.
## Étapes suivantes
diff --git a/apps/docs/content/docs/mentioning-agents.ja.mdx b/apps/docs/content/docs/mentioning-agents.ja.mdx
index 2e75afc84d..52c8c36618 100644
--- a/apps/docs/content/docs/mentioning-agents.ja.mdx
+++ b/apps/docs/content/docs/mentioning-agents.ja.mdx
@@ -4,6 +4,8 @@ description: タスクのコメントでエージェントを @メンション
---
import { Callout } from "fumadocs-ui/components/callout";
+import { MentionDemo } from "@/components/demos/mention-demo";
+import { SteerDemo } from "@/components/demos/steer-demo";
新しい情報を確認してほしい、質問に答えてほしい、現在の担当者を手伝ってほしい — そんなときはコメントでエージェントを @メンションします。そのコメントが今回の実行の起点となり、タスクの担当者もステータスも変わりません。
@@ -29,7 +31,7 @@ import { Callout } from "fumadocs-ui/components/callout";
エージェントのチェックを外すと、今回のトリガーだけがスキップされます。コメントから名前を削除する必要はなく、エージェントの Access も変更されません。
-![送信前のトリガープレビュー:送信後に作業を開始するエージェントを一覧表示](/images/docs/mention-trigger-preview.webp)
+<MentionDemo />
コメントが投稿されると、オンラインのランタイムは通常すぐに実行を受け取ります。ランタイムがオフラインの場合、実行はキューで待機します。
@@ -45,9 +47,31 @@ import { Callout } from "fumadocs-ui/components/callout";
返信が担当者以外のエージェントをトリガーした場合、Multica は担当者のために遅延フォールバック実行を予約します。対象のエージェントが約 5 分以内に返信すればフォールバックは自動的にキャンセルされ、返信がなければ担当者も実行を開始します。
+## 実行中のエージェントに割り込む
+
+エージェントが作業の途中で方向を誤っていても、止めて最初からやり直す必要はありません。コメント欄に修正を書いて送信すると、そのメッセージは現在の実行に加わります。エージェントは今のステップが終わったところで読み、新しい方向で元のタスクを続けます。
+
+<SteerDemo />
+
+送り先のエージェントが実行中のときは、コメント欄の下のラベルにメッセージの届け方が表示されます。クリックすると変更できます。
+
+| 選択肢 | 動作 |
+|---|---|
+| 現在の実行に追加 | 現在のステップの後に読まれ、元のタスクがそのまま続きます。 |
+| この実行の後に開始 | 現在の実行は止めず、終了後に新しい実行で扱います。 |
+| 停止してやり直す | 現在の実行をすぐに停止し、このメッセージからやり直します。 |
+| 今回は開始しません | コメントだけを投稿し、このエージェントはトリガーしません。 |
+
+送信すると、コメントの下にまず「… が読むのを待っています」と表示され、読まれると「… が読みました」に変わります。実行ログのステップ一覧にも、どのステップで読んだかが示されます。届けられなかった場合は、再試行するか、新しい実行として送信できます。
+
+- 実行中に追加できるのはテキストだけです。ファイル付きのメッセージは、この実行の後に処理されます。
+- 割り込みには、エージェントが使う AI コーディングツールの対応が必要です。対応していない場合、「現在の実行に追加」は選択肢に表示されません。
+- 既定の選択肢は **設定 → 環境設定** の **実行中のエージェントに返信するとき** で変えられます。メッセージごとに送信前に変更することもできます。
+- チャットでキュー内のメッセージに使う**指示**は動きが違い、現在の返信を先に止めます。[チャット](/chat#返信中に続けてメッセージを送る)を参照してください。
+
## 連続コメントの統合
-同じエージェントに同じタスク上で待機中の実行がある場合、新しいコメントはその実行に統合されます。すでに実行中の場合、後続のコメントは現在の実行が終わるのを待ち、1 回のフォローアップ実行にまとめられます。エージェントの返信を待たずに、続けて情報を補足できます。
+同じエージェントに同じタスク上で待機中の実行がある場合、新しいコメントはその実行に統合され、開始時にまとめて処理されます。すでに実行中の場合は、コメント欄で選んだ方法で処理されます(前のセクションを参照)。エージェントの返信を待たずに、続けて情報を補足できます。
1 つのコメントで複数の異なるエージェントを @メンションすると、エージェントごとに実行が作成されます。複数のメンションが同じエージェントに解決される場合は、1 回だけ残ります。
@@ -70,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## エージェント同士のメンション
-エージェントは自分の返信の中で他のエージェントを @メンションできます。A が B を、B が A をメンションし返す場合、同じタイミングの重複実行は統合されますが、この協働をいつ終えるべきかをシステムは判断しません。終了条件はエージェントの指示に書いてください。
+エージェントは自分の返信の中で他のエージェントを @メンションできます。A が B を、B が A をメンションし返す場合、同じタイミングの重複実行は統合されますが、この協働を終えるべきかどうかはシステムは判断しません。いつ止めるかはエージェントの指示に書いてください。
## 次のステップ
diff --git a/apps/docs/content/docs/mentioning-agents.ko.mdx b/apps/docs/content/docs/mentioning-agents.ko.mdx
index 322a15b410..20011404a5 100644
--- a/apps/docs/content/docs/mentioning-agents.ko.mdx
+++ b/apps/docs/content/docs/mentioning-agents.ko.mdx
@@ -4,6 +4,8 @@ description: 태스크 댓글에서 에이전트를 @멘션하거나 답글을
---
import { Callout } from "fumadocs-ui/components/callout";
+import { MentionDemo } from "@/components/demos/mention-demo";
+import { SteerDemo } from "@/components/demos/steer-demo";
댓글에서 에이전트를 @멘션하면 새 정보를 검토하거나 질문에 답하거나 현재 담당자를 돕게 할 수 있습니다. 해당 댓글이 이번 실행의 시작점이 되며 태스크의 담당자와 상태는 바뀌지 않습니다.
@@ -29,7 +31,7 @@ import { Callout } from "fumadocs-ui/components/callout";
특정 에이전트의 선택을 해제하면 이번 트리거만 건너뜁니다. 댓글에서 이름을 지울 필요가 없으며 에이전트의 Access도 바뀌지 않습니다.
-![전송 전 트리거 미리보기: 전송 후 작업을 시작할 에이전트 목록](/images/docs/mention-trigger-preview.webp)
+<MentionDemo />
댓글을 게시하면 온라인 런타임이 보통 즉시 실행을 가져갑니다. 런타임이 오프라인이면 실행이 큐에서 기다립니다.
@@ -45,9 +47,31 @@ import { Callout } from "fumadocs-ui/components/callout";
답글이 담당자가 아닌 에이전트를 트리거하면 Multica가 담당자의 지연 폴백 실행을 예약합니다. 대상 에이전트가 약 5분 안에 답하면 폴백이 자동으로 취소되고, 그렇지 않으면 담당자도 실행을 시작합니다.
+## 실행 중인 에이전트에게 끼어들기
+
+에이전트가 작업 도중 엉뚱한 방향으로 가고 있어도 멈추고 처음부터 다시 할 필요는 없습니다. 댓글 입력란에 수정 사항을 써서 보내면 그 메시지가 현재 실행에 추가됩니다. 에이전트는 현재 단계가 끝난 뒤 이를 읽고, 새 방향으로 원래 태스크를 이어서 끝냅니다.
+
+<SteerDemo />
+
+받는 에이전트가 실행 중일 때는 댓글 입력란 아래의 레이블에 메시지가 어떻게 전달되는지 표시됩니다. 클릭해서 바꿀 수 있습니다.
+
+| 옵션 | 동작 |
+|---|---|
+| 현재 실행에 추가 | 현재 단계가 끝난 뒤 읽고 원래 작업을 계속합니다. |
+| 이번 실행 후 시작 | 현재 실행을 방해하지 않고, 끝난 뒤 새 실행에서 처리합니다. |
+| 중지하고 다시 시작 | 현재 실행을 즉시 중지하고 이 메시지로 처음부터 다시 시작합니다. |
+| 이번에는 시작하지 않습니다 | 댓글만 게시하고 이 에이전트는 트리거하지 않습니다. |
+
+보내면 댓글 아래에 먼저 "…이(가) 읽기를 기다리는 중"이 표시되고, 에이전트가 읽으면 "…이(가) 읽음"으로 바뀝니다. 실행 로그의 단계 목록에도 어느 단계에서 읽었는지 표시됩니다. 전달에 실패하면 다시 시도하거나 새 실행으로 보낼 수 있습니다.
+
+- 실행 중에는 텍스트만 추가할 수 있습니다. 첨부 파일이 있는 메시지는 이번 실행이 끝난 뒤 처리됩니다.
+- 끼어들기는 에이전트가 쓰는 AI 코딩 도구가 지원해야 합니다. 지원하지 않으면 '현재 실행에 추가'가 옵션에 나오지 않습니다.
+- 기본 옵션은 **설정 → 환경설정**의 **실행 중인 에이전트에 답장할 때**에서 바꿀 수 있고, 메시지마다 보내기 전에 따로 바꿀 수도 있습니다.
+- 채팅에서 대기 중인 메시지의 **지시**는 다르게 동작해 현재 답변을 먼저 멈춥니다. [채팅](/chat#답변-중에-메시지-이어서-보내기)을 참고하세요.
+
## 연속 댓글 합치기
-같은 에이전트가 같은 태스크에서 대기 중인 실행을 이미 가지고 있다면 새 댓글이 그 실행에 합쳐집니다. 이미 실행 중이라면 이후 댓글은 현재 실행이 끝난 뒤 하나의 후속 실행으로 합쳐집니다. 에이전트의 답을 기다리지 않고 정보를 계속 보충할 수 있습니다.
+같은 에이전트가 같은 태스크에서 대기 중인 실행을 이미 가지고 있다면 새 댓글이 그 실행에 합쳐지고, 실행이 시작될 때 함께 처리됩니다. 이미 실행 중이라면 댓글 입력란에서 고른 방식대로 처리됩니다(앞 섹션 참고). 에이전트의 답을 기다리지 않고 정보를 계속 보충할 수 있습니다.
한 댓글에서 서로 다른 에이전트 여러 명을 @멘션하면 각 에이전트가 실행을 하나씩 받습니다. 여러 멘션이 같은 에이전트를 가리키면 한 번만 실행됩니다.
@@ -70,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 에이전트 간 @멘션
-에이전트도 자신의 답변에서 다른 에이전트를 @멘션할 수 있습니다. A가 B를 @멘션하고 B가 다시 A를 @멘션하면 시스템은 같은 시점의 중복 실행을 합치지만 이 협업을 언제 끝내야 하는지는 판단하지 않습니다. 종료 조건은 에이전트 지시문에 작성해야 합니다.
+에이전트도 자신의 답변에서 다른 에이전트를 @멘션할 수 있습니다. A가 B를 @멘션하고 B가 다시 A를 @멘션하면 시스템은 같은 시점의 중복 실행을 합치지만 이 협업을 끝내야 하는지는 판단하지 않습니다. 언제 멈출지는 에이전트 지시문에 작성하세요.
## 다음 단계
diff --git a/apps/docs/content/docs/mentioning-agents.mdx b/apps/docs/content/docs/mentioning-agents.mdx
index cfbad275d5..b4cf0ca77d 100644
--- a/apps/docs/content/docs/mentioning-agents.mdx
+++ b/apps/docs/content/docs/mentioning-agents.mdx
@@ -4,6 +4,8 @@ description: "@-mention an agent in an issue comment, or keep replying, to have
---
import { Callout } from "fumadocs-ui/components/callout";
+import { MentionDemo } from "@/components/demos/mention-demo";
+import { SteerDemo } from "@/components/demos/steer-demo";
@-mention an agent in a comment when you want it to look at a new piece of information, answer a question, or help the current assignee. The comment becomes the starting point for the run; the issue's assignee and status stay unchanged.
@@ -27,9 +29,9 @@ After you pick an agent or squad in the comment editor, a trigger preview appear
- whether each target comes from a direct @-mention, the issue assignee, or a squad leader;
- whether a target is unavailable, or you lack permission to run it.
-Unticking an agent skips this one trigger only — you don't need to delete its name from the comment, and the agent's Access is not changed.
+Unticking an agent skips this one trigger only. You don't need to delete its name from the comment, and the agent's Access is not changed.
-![Trigger preview before sending: lists the agents that will start working once the comment is sent](/images/docs/mention-trigger-preview.webp)
+<MentionDemo />
Once the comment is posted, an online runtime usually claims the run right away; if the runtime is offline, the run waits in the queue.
@@ -45,15 +47,37 @@ When a comment explicitly @-mentions other targets (including members), the assi
Replies stay with the target agent even while its runtime is offline or busy. Multica does not automatically start the issue assignee after a timeout. To involve another agent, explicitly @-mention it.
+## Steer a running agent
+
+When an agent is halfway through and heading the wrong way, you don't have to stop it and start over. Write the correction in the comment box and send it: the message joins its current run, the agent reads it once the current step ends, and it carries on with the original task in the new direction.
+
+<SteerDemo />
+
+While the recipient is running, a label under the comment box says how the message will be delivered. Click it to change that:
+
+| Option | What happens |
+|---|---|
+| Add to current run | Read after the current step; the agent keeps working on the original task. |
+| Start after this run | Doesn't interrupt the current run; handled in a new run once it ends. |
+| Stop and start over | Stops the current run now and starts over from this message. |
+| Won't start this time | Posts the comment without triggering this agent. |
+
+After you send, the comment shows "Waiting for … to read it", which changes to "Read by …" once the agent has read it. The step list in the execution log also marks the step where it was read. If delivery fails, you can retry or send it as a new run instead.
+
+- Only text can join a running run. A message with attachments is handled after the run ends.
+- Steering needs support from the agent's AI coding tool. Without it, **Add to current run** isn't offered.
+- Set the default in **Settings → Preferences** under **When replying to a running agent**. You can still change it for any message before sending.
+- In chat, **Steer** on a queued message works differently: it stops the current reply first; see [Chat](/chat#send-messages-while-a-reply-is-in-progress).
+
## Coalescing consecutive comments
-When the same agent already has a waiting run on the issue, new consecutive comments merge into the pending run; if the agent is already running, later comments wait for the current run to finish and merge into a single follow-up run. You can keep adding information without waiting for the agent to reply.
+When the same agent already has a waiting run on the issue, new comments merge into that pending run and are handled together when it starts. If the agent is already running, each comment is handled the way you chose in the comment box; see the previous section. You can keep adding information without waiting for the agent to reply.
When one comment @-mentions several different agents, each agent gets its own run; multiple mentions resolving to the same agent keep only one.
## Comments that don't trigger agents
-Two ways:
+There are two ways:
- Start the comment with `/note`: it's posted as a note between members and triggers no agent.
- Use `@all`: it notifies every workspace member and switches off this comment's automatic trigger for the assignee.
@@ -70,7 +94,7 @@ An @-mention cannot bypass an agent's Access. When you lack permission to run th
## Agents mentioning each other
-Agents can @-mention other agents in their replies. When A @-mentions B and B @-mentions A back, the system merges duplicate runs at the same moment, but it does not decide when the collaboration should end — write the stop condition into the agent instructions.
+Agents can @-mention other agents in their replies. When A @-mentions B and B @-mentions A back, the system merges duplicate runs at the same moment, but it does not decide whether the collaboration should end. Write when to stop into the agent instructions.
## Next steps
diff --git a/apps/docs/content/docs/mentioning-agents.zh.mdx b/apps/docs/content/docs/mentioning-agents.zh.mdx
index 755d84d3c5..7e4be9618a 100644
--- a/apps/docs/content/docs/mentioning-agents.zh.mdx
+++ b/apps/docs/content/docs/mentioning-agents.zh.mdx
@@ -4,6 +4,8 @@ description: 在任务的评论中 @智能体或继续回复,让它处理新
---
import { Callout } from "fumadocs-ui/components/callout";
+import { MentionDemo } from "@/components/demos/mention-demo";
+import { SteerDemo } from "@/components/demos/steer-demo";
在评论中 @智能体,适合让它查看一条新信息、回答问题或协助当前负责人。评论会成为这次执行的起点,任务的负责人和状态都不会改变。
@@ -29,7 +31,7 @@ import { Callout } from "fumadocs-ui/components/callout";
取消选中某个智能体只跳过这一次触发,不需要删除评论中的名字,也不会修改智能体的 Access。
-![发送前的触发预览:列出发送后将开始工作的智能体](/images/docs/mention-trigger-preview.webp)
+<MentionDemo />
评论发布后,在线的运行时通常立即领取;运行时离线时,运行留在队列中等待。
@@ -45,15 +47,37 @@ import { Callout } from "fumadocs-ui/components/callout";
回复始终交给目标智能体,即使它的运行时离线或正在忙碌,也不会超时后自动唤醒任务负责人。需要其他智能体参与时,请明确 @提及。
+## 给正在运行的智能体插话
+
+智能体做到一半、方向不对时,不必停下来重来。在评论框里写下修正并发送,这条消息会插进它当前的运行:它在当前步骤结束后读到,按新方向继续完成原任务。
+
+<SteerDemo />
+
+收件人正在运行时,评论框下方的标签会说明这条消息怎么送达,点开可以改:
+
+| 选项 | 效果 |
+|---|---|
+| 插话到当前运行 | 在当前步骤结束后读到,并继续完成原任务。 |
+| 本轮结束后开始 | 不打断当前运行,结束后作为新一轮处理。 |
+| 停止并重新开始 | 立即停止当前运行,按这条消息从头开始。 |
+| 本次不会开始 | 只发布评论,不触发这个智能体。 |
+
+发送后,评论下方会先显示"等待 ... 读取",读到后变为"... 已读取";执行日志的步骤列表里也会标出它是在哪一步读到的。送达失败时,可以重试,或者改为作为新一轮发送。
+
+- 插话只支持文字。带附件的消息会在本轮结束后处理。
+- 插话需要智能体使用的 AI 编程工具支持;不支持时,选项里不会出现"插话到当前运行"。
+- 默认选项在设置的**回复正在运行的智能体时**中调整,每条消息发送前仍可单独修改。
+- 聊天里排队消息的**引导**不一样:它会先停掉当前回复,见[聊天](/chat#回复还没结束时继续发消息)。
+
## 连续评论的合并
-同一个智能体在同一条任务上已有排队中的运行,此时新评论会合并进这次运行;它已经在执行时,后续评论等当前运行结束后合并为一次跟进执行。可以连续补充信息,不必等智能体回复。
+同一个智能体在同一条任务上已有排队中的运行,此时新评论会合并进这次运行,开始时一并处理;它已经在执行时,按你在评论框中选择的方式处理,见上一节。可以连续补充信息,不必等智能体回复。
一条评论 @多个不同智能体时,每个智能体各得一次运行;多个提及指向同一个智能体时,只保留一次。
## 不触发智能体的留言
-两种方式:
+有两种方式:
- 以 `/note` 开头:评论作为成员之间的备注,不触发任何智能体。
- 使用 `@all`:通知全部工作区成员,同时关闭这条评论对负责人的自动触发。
@@ -70,7 +94,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 智能体之间的互相提及
-智能体可以在自己的回复中 @其他智能体。A @ B、B 又 @ A 时,系统会合并同一时刻的重复执行,但不会判断这段协作是否应该结束——协作的终止条件需要写进智能体指令。
+智能体可以在自己的回复中 @其他智能体。A @ B、B 又 @ A 时,系统会合并同一时刻的重复执行,但不会判断这段协作该不该结束。什么时候停,要写进智能体指令。
## 接下来
diff --git a/apps/docs/content/docs/meta.fr.json b/apps/docs/content/docs/meta.fr.json
index 9224b701a6..49c9aefd56 100644
--- a/apps/docs/content/docs/meta.fr.json
+++ b/apps/docs/content/docs/meta.fr.json
@@ -11,6 +11,7 @@
"---Espace de travail---",
"workspaces",
"members-roles",
+ "analytics",
"---Tâches et projets---",
"issues",
"projects",
@@ -29,6 +30,7 @@
"mentioning-agents",
"chat",
"inbox",
+ "shortcuts",
"---Runtime et exécution---",
"tasks",
"daemon-runtimes",
@@ -36,6 +38,7 @@
"providers",
"---Automatisation---",
"autopilots",
+ "issue-wakeups",
"---Intégrations---",
"channels",
"lark-bot-integration",
diff --git a/apps/docs/content/docs/meta.ja.json b/apps/docs/content/docs/meta.ja.json
index 5b15436ea3..5ebc6cc603 100644
--- a/apps/docs/content/docs/meta.ja.json
+++ b/apps/docs/content/docs/meta.ja.json
@@ -11,6 +11,7 @@
"---ワークスペース---",
"workspaces",
"members-roles",
+ "analytics",
"---タスクとプロジェクト---",
"issues",
"projects",
@@ -29,6 +30,7 @@
"mentioning-agents",
"chat",
"inbox",
+ "shortcuts",
"---ランタイムと実行---",
"tasks",
"daemon-runtimes",
@@ -36,6 +38,7 @@
"providers",
"---自動化---",
"autopilots",
+ "issue-wakeups",
"---連携---",
"channels",
"lark-bot-integration",
diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json
index f21ac50faf..3d5d70f71c 100644
--- a/apps/docs/content/docs/meta.json
+++ b/apps/docs/content/docs/meta.json
@@ -11,6 +11,7 @@
"---Workspace---",
"workspaces",
"members-roles",
+ "analytics",
"---Issues & projects---",
"issues",
"projects",
@@ -29,6 +30,7 @@
"mentioning-agents",
"chat",
"inbox",
+ "shortcuts",
"---Runtime & execution---",
"tasks",
"daemon-runtimes",
@@ -36,6 +38,7 @@
"providers",
"---Automation---",
"autopilots",
+ "issue-wakeups",
"---Integrations---",
"channels",
"lark-bot-integration",
diff --git a/apps/docs/content/docs/meta.ko.json b/apps/docs/content/docs/meta.ko.json
index 64ee0a452e..6940951a18 100644
--- a/apps/docs/content/docs/meta.ko.json
+++ b/apps/docs/content/docs/meta.ko.json
@@ -11,6 +11,7 @@
"---워크스페이스---",
"workspaces",
"members-roles",
+ "analytics",
"---태스크와 프로젝트---",
"issues",
"projects",
@@ -29,6 +30,7 @@
"mentioning-agents",
"chat",
"inbox",
+ "shortcuts",
"---런타임과 실행---",
"tasks",
"daemon-runtimes",
@@ -36,6 +38,7 @@
"providers",
"---자동화---",
"autopilots",
+ "issue-wakeups",
"---연동---",
"channels",
"lark-bot-integration",
diff --git a/apps/docs/content/docs/meta.zh.json b/apps/docs/content/docs/meta.zh.json
index 545466c64f..04b4639a67 100644
--- a/apps/docs/content/docs/meta.zh.json
+++ b/apps/docs/content/docs/meta.zh.json
@@ -11,6 +11,7 @@
"---工作区---",
"workspaces",
"members-roles",
+ "analytics",
"---任务与项目---",
"issues",
"projects",
@@ -29,6 +30,7 @@
"mentioning-agents",
"chat",
"inbox",
+ "shortcuts",
"---运行时与执行---",
"tasks",
"daemon-runtimes",
@@ -36,6 +38,7 @@
"providers",
"---自动化---",
"autopilots",
+ "issue-wakeups",
"---集成---",
"channels",
"lark-bot-integration",
diff --git a/apps/docs/content/docs/mobile-app.fr.mdx b/apps/docs/content/docs/mobile-app.fr.mdx
index b66f1304f9..6316cefef8 100644
--- a/apps/docs/content/docs/mobile-app.fr.mdx
+++ b/apps/docs/content/docs/mobile-app.fr.mdx
@@ -4,10 +4,11 @@ description: Installez Multica sur votre iPhone à partir des sources, et connec
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Le client iOS de Multica n'est pas encore disponible sur l'App Store. Vous pouvez compiler une version Release à partir du dépôt de code source public sur un Mac et l'installer sur votre propre iPhone. Il n'existe pas encore de client Android.
-L'application installée se connecte par défaut à Multica Cloud ; connectez-vous avec votre compte existant. Les espaces de travail, les tâches, les commentaires et l'historique des exécutions sont tous stockés sur le serveur — rien n'a besoin d'être synchronisé manuellement depuis le web ou Desktop.
+L'application installée se connecte par défaut à Multica Cloud ; connectez-vous avec votre compte existant. Les espaces de travail, les tâches, les commentaires et l'historique des exécutions sont tous stockés sur le serveur : rien n'a besoin d'être synchronisé depuis le web ou Desktop.
## Prérequis
@@ -23,6 +24,8 @@ Si Xcode ou l'environnement de développement sur appareil n'est pas encore conf
## Installer sur votre iPhone
+<Steps>
+<Step>
Clonez le dépôt et installez les dépendances :
```bash
@@ -30,16 +33,20 @@ git clone https://github.com/multica-ai/multica.git
cd multica
pnpm install
```
-
-Puis exécutez depuis la racine du dépôt :
+</Step>
+<Step>
+Exécutez depuis la racine du dépôt :
```bash
pnpm ios:mobile:device:prod:release
```
Cette commande compile une version Release sans dépendance à Metro et l'installe sur l'iPhone connecté. La première compilation télécharge les dépendances iOS et compile React Native ; les suivantes réutilisent le cache de Xcode.
-
-Si l'iPhone empêche l'ouverture de l'application, faites confiance au certificat de développeur dans **Réglages → Général → VPN et gestion de l'appareil**.
+</Step>
+<Step>
+Ouvrez l'application sur l'iPhone. Si iOS en bloque l'ouverture, faites confiance au certificat de développeur dans **Réglages → Général → VPN et gestion de l'appareil**.
+</Step>
+</Steps>
## Limite de 7 jours de la signature gratuite
@@ -70,19 +77,28 @@ pnpm ios:mobile:device:prod:release
## Se connecter à une instance auto-hébergée
-Les builds Release intègrent l'adresse de l'API dans l'application. Pour vous connecter à une instance auto-hébergée, modifiez d'abord `apps/mobile/.env.production` :
+Les builds Release intègrent l'adresse de l'API dans l'application. `apps/mobile/.env.production` est commité avec les valeurs publiques par défaut de multica.ai : un clone neuf compile donc directement la version de production.
+
+Pour vous connecter à une instance auto-hébergée :
+
+<Steps>
+<Step>
+Copiez `apps/mobile/.env.production.example` vers `apps/mobile/.env.production.local`, puis renseignez les adresses dans la copie :
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`EXPO_PUBLIC_API_URL` est obligatoire. `EXPO_PUBLIC_WEB_URL` est facultative et alimente des entrées comme « Copier le lien » et « Ouvrir sur le web » ; lorsqu'elle n'est pas définie, ces éléments de menu sont masqués.
-
-Relancez la commande de compilation après la modification. L'iPhone doit pouvoir joindre l'adresse de l'API ; si vous utilisez une adresse du réseau local, n'écrivez pas `localhost` — sur l'iPhone, cette adresse désigne le téléphone lui-même.
+Le fichier `.local` remplace les valeurs commitées clé par clé et est ignoré par git : vos adresses personnelles n'arrivent jamais dans le dépôt. `EXPO_PUBLIC_API_URL` est obligatoire. `EXPO_PUBLIC_WEB_URL` alimente des entrées comme « Copy link » et « Open on web ». Définissez les deux : une clé omise reprend la valeur par défaut de multica.ai, et ces entrées ouvriraient alors multica.ai au lieu de votre instance.
+</Step>
+<Step>
+Relancez la commande de compilation `pnpm ios:mobile:device:prod:release`. L'iPhone doit pouvoir joindre l'adresse de l'API ; si vous utilisez une adresse du réseau local, n'écrivez pas `localhost`, qui désigne sur l'iPhone le téléphone lui-même.
+</Step>
+</Steps>
<Callout type="warning">
-Modifier `.env.production` change la configuration de production de la copie de travail actuelle. Commiter cette modification inscrit votre adresse d'API personnelle dans la configuration de production du dépôt.
+Modifier directement `.env.production` change la configuration de production de la copie de travail actuelle. Gardez vos valeurs personnelles dans `.env.production.local`, ignoré par git.
</Callout>
Pour le développement mobile, l'utilisation du Simulateur ou la connexion à l'environnement de staging, consultez [`apps/mobile/README.md`](https://github.com/multica-ai/multica/blob/main/apps/mobile/README.md) dans le dépôt.
diff --git a/apps/docs/content/docs/mobile-app.ja.mdx b/apps/docs/content/docs/mobile-app.ja.mdx
index 1981982c7b..dfb70991e6 100644
--- a/apps/docs/content/docs/mobile-app.ja.mdx
+++ b/apps/docs/content/docs/mobile-app.ja.mdx
@@ -4,10 +4,11 @@ description: ソースコードから Multica を iPhone にインストール
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica の iOS クライアントはまだ App Store にありません。Mac で公開されているソースリポジトリから Release 版をビルドし、自分の iPhone にインストールできます。Android クライアントはまだ提供されていません。
-インストールしたアプリはデフォルトで Multica Cloud に接続し、既存のアカウントでそのままサインインできます。ワークスペース、タスク、コメント、実行履歴はすべてサーバー側に保存されるため、Web や Desktop から手動で同期する必要はありません。
+インストールしたアプリはデフォルトで Multica Cloud に接続し、既存のアカウントでそのままサインインできます。ワークスペース、タスク、コメント、実行履歴はすべてサーバー側に保存されるため、Web や Desktop から同期する必要はありません。
## 事前準備
@@ -23,6 +24,8 @@ Xcode や実機の開発環境がまだ設定されていない場合は、先
## iPhone へのインストール
+<Steps>
+<Step>
リポジトリをクローンして依存関係をインストールします:
```bash
@@ -30,16 +33,20 @@ git clone https://github.com/multica-ai/multica.git
cd multica
pnpm install
```
-
-続いてリポジトリのルートから実行します:
+</Step>
+<Step>
+リポジトリのルートから実行します:
```bash
pnpm ios:mobile:device:prod:release
```
これは Metro に依存しない Release 版をビルドし、接続中の iPhone にインストールします。初回ビルドは iOS の依存関係をダウンロードして React Native をコンパイルするため時間がかかりますが、以降は Xcode のキャッシュを再利用します。
-
-iPhone がアプリの起動をブロックする場合は、**設定 → 一般 → VPN とデバイス管理** で対応する開発者証明書を信頼してください。
+</Step>
+<Step>
+iPhone でアプリを開きます。起動がブロックされた場合は、**設定 → 一般 → VPN とデバイス管理** で対応する開発者証明書を信頼してください。
+</Step>
+</Steps>
## 無料署名の 7 日制限
@@ -72,16 +79,23 @@ pnpm ios:mobile:device:prod:release
Release ビルドは API アドレスをアプリに埋め込みます。`apps/mobile/.env.production` は公開されている multica.ai のデフォルト値とともにコミットされているため、新しくクローンした状態でも本番ビルドができます。
-セルフホストインスタンスに接続するには、`apps/mobile/.env.production.example` を `apps/mobile/.env.production.local` としてコピーし、コピーを編集します:
+セルフホストインスタンスに接続するには:
+
+<Steps>
+<Step>
+`apps/mobile/.env.production.example` を `apps/mobile/.env.production.local` としてコピーし、コピーにアドレスを書きます:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`.local` ファイルはコミット済みのデフォルトをキーごとに上書きし、gitignore されるため、個人の API アドレスがリポジトリに入ることはありません。`EXPO_PUBLIC_API_URL` は必須です。`EXPO_PUBLIC_WEB_URL` は "Copy link" や "Open on web" などの入口に使われます。コピーには両方を設定してください。書かなかったキーには multica.ai のデフォルト値が使われるため、これらの入口がセルフホストインスタンスではなく multica.ai を開きます。
-
-編集後にビルドコマンドを再実行します。iPhone がこの API アドレスに到達できる必要があります。LAN のアドレスを使う場合、`localhost` と書かないでください — iPhone 上では iPhone 自身を指します。
+`.local` ファイルはコミット済みのデフォルトをキーごとに上書きし、gitignore されるため、個人の API アドレスがリポジトリに入ることはありません。`EXPO_PUBLIC_API_URL` は必須です。`EXPO_PUBLIC_WEB_URL` は "Copy link" や "Open on web" などの入口に使われます。両方を設定してください。書かなかったキーには multica.ai のデフォルト値が使われるため、これらの入口がセルフホストインスタンスではなく multica.ai を開きます。
+</Step>
+<Step>
+ビルドコマンド `pnpm ios:mobile:device:prod:release` を再実行します。iPhone がこの API アドレスに到達できる必要があります。LAN のアドレスを使う場合は `localhost` と書かないでください。iPhone 上では iPhone 自身を指します。
+</Step>
+</Steps>
<Callout type="warning">
`.env.production` を直接編集すると、現在のチェックアウトの本番設定が変わります。個人の値は gitignore された `.env.production.local` に書いてください。
diff --git a/apps/docs/content/docs/mobile-app.ko.mdx b/apps/docs/content/docs/mobile-app.ko.mdx
index 62caeb65c3..b9c9b34f9d 100644
--- a/apps/docs/content/docs/mobile-app.ko.mdx
+++ b/apps/docs/content/docs/mobile-app.ko.mdx
@@ -4,10 +4,11 @@ description: 소스에서 Multica를 빌드해 iPhone에 설치하고 Cloud 또
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica iOS 클라이언트는 아직 App Store에 출시되지 않았습니다. Mac에서 공개 소스 저장소의 Release 버전을 빌드해 자신의 iPhone에 설치할 수 있습니다. Android 클라이언트는 아직 제공하지 않습니다.
-설치된 앱은 기본적으로 Multica Cloud에 연결되며 기존 계정으로 로그인하면 됩니다. 워크스페이스, 태스크, 댓글, 실행 기록은 모두 서버에 저장되므로 Web이나 Desktop에서 직접 동기화할 필요가 없습니다.
+설치된 앱은 기본적으로 Multica Cloud에 연결되며 기존 계정으로 로그인하면 됩니다. 워크스페이스, 태스크, 댓글, 실행 기록은 모두 서버에 저장되므로 Web이나 Desktop에서 동기화할 필요가 없습니다.
## 준비 사항
@@ -23,6 +24,8 @@ Xcode 또는 실제 기기 개발 환경이 설정되지 않았다면 먼저 Exp
## iPhone에 설치
+<Steps>
+<Step>
저장소를 clone하고 의존성을 설치합니다.
```bash
@@ -30,16 +33,20 @@ git clone https://github.com/multica-ai/multica.git
cd multica
pnpm install
```
-
-그런 다음 저장소 루트에서 다음 명령을 실행합니다.
+</Step>
+<Step>
+저장소 루트에서 다음 명령을 실행합니다.
```bash
pnpm ios:mobile:device:prod:release
```
Metro에 의존하지 않는 Release 버전을 빌드해 연결된 iPhone에 설치합니다. 처음 빌드할 때는 iOS 의존성을 내려받고 React Native를 컴파일하며 이후에는 Xcode 캐시를 재사용합니다.
-
-iPhone에서 앱 실행을 차단하면 **설정 → 일반 → VPN 및 기기 관리**에서 해당 개발자 인증서를 신뢰하도록 설정하세요.
+</Step>
+<Step>
+iPhone에서 앱을 엽니다. 실행이 차단되면 **설정 → 일반 → VPN 및 기기 관리**에서 해당 개발자 인증서를 신뢰하도록 설정하세요.
+</Step>
+</Steps>
## 무료 서명의 7일 제한
@@ -72,16 +79,23 @@ pnpm ios:mobile:device:prod:release
Release 빌드는 API 주소를 앱에 포함합니다. `apps/mobile/.env.production`은 공개 multica.ai 기본값과 함께 커밋되어 있어 새로 클론한 상태에서도 프로덕션 빌드가 가능합니다.
-자체 호스팅 인스턴스에 연결하려면 `apps/mobile/.env.production.example`을 `apps/mobile/.env.production.local`로 복사한 뒤 복사본을 수정합니다.
+자체 호스팅 인스턴스에 연결하려면 다음과 같이 합니다.
+
+<Steps>
+<Step>
+`apps/mobile/.env.production.example`을 `apps/mobile/.env.production.local`로 복사하고 복사본에 주소를 적습니다.
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`.local` 파일은 커밋된 기본값을 키 단위로 덮어쓰며 gitignore되므로 개인 API 주소가 저장소에 들어가지 않습니다. `EXPO_PUBLIC_API_URL`은 필수입니다. `EXPO_PUBLIC_WEB_URL`은 "Copy link", "Open on web" 같은 메뉴에 사용됩니다. 복사본에 두 값을 모두 설정하세요. 적지 않은 키는 multica.ai 기본값을 그대로 쓰므로 이 메뉴가 자체 호스팅 인스턴스 대신 multica.ai를 엽니다.
-
-수정한 뒤 빌드 명령을 다시 실행합니다. iPhone에서 이 API 주소에 접근할 수 있어야 합니다. 로컬 네트워크 주소를 사용할 때는 `localhost`를 쓰지 마세요. iPhone에서는 휴대전화 자체를 가리킵니다.
+`.local` 파일은 커밋된 기본값을 키 단위로 덮어쓰며 gitignore되므로 개인 API 주소가 저장소에 들어가지 않습니다. `EXPO_PUBLIC_API_URL`은 필수입니다. `EXPO_PUBLIC_WEB_URL`은 "Copy link", "Open on web" 같은 메뉴에 사용됩니다. 두 값을 모두 설정하세요. 적지 않은 키는 multica.ai 기본값을 그대로 쓰므로 이 메뉴가 자체 호스팅 인스턴스 대신 multica.ai를 엽니다.
+</Step>
+<Step>
+빌드 명령 `pnpm ios:mobile:device:prod:release`를 다시 실행합니다. iPhone에서 이 API 주소에 접근할 수 있어야 합니다. 로컬 네트워크 주소를 사용할 때는 `localhost`를 쓰지 마세요. iPhone에서는 휴대전화 자체를 가리킵니다.
+</Step>
+</Steps>
<Callout type="warning">
`.env.production`을 직접 수정하면 현재 checkout의 프로덕션 설정이 바뀝니다. 개인 값은 gitignore된 `.env.production.local`에 두세요.
diff --git a/apps/docs/content/docs/mobile-app.mdx b/apps/docs/content/docs/mobile-app.mdx
index 2e4ea8b203..926c2acb3d 100644
--- a/apps/docs/content/docs/mobile-app.mdx
+++ b/apps/docs/content/docs/mobile-app.mdx
@@ -4,10 +4,11 @@ description: Install Multica on your iPhone from source, and connect to Cloud or
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
The Multica iOS client is not on the App Store yet. You can build a Release version from the public source repository on a Mac and install it on your own iPhone. There is no Android client yet.
-The installed app connects to Multica Cloud by default; sign in with your existing account. Workspaces, issues, comments, and run history all live on the server — nothing needs to be synced manually from web or Desktop.
+The installed app connects to Multica Cloud by default; sign in with your existing account. Workspaces, issues, comments, and run history all live on the server, so nothing needs to be synced from web or Desktop.
## Prerequisites
@@ -23,6 +24,8 @@ If Xcode or the on-device development environment isn't set up yet, complete Exp
## Installing to your iPhone
+<Steps>
+<Step>
Clone the repository and install dependencies:
```bash
@@ -30,16 +33,20 @@ git clone https://github.com/multica-ai/multica.git
cd multica
pnpm install
```
-
-Then run from the repo root:
+</Step>
+<Step>
+Run from the repo root:
```bash
pnpm ios:mobile:device:prod:release
```
This builds a Release version with no Metro dependency and installs it on the connected iPhone. The first build downloads iOS dependencies and compiles React Native; later builds reuse Xcode's cache.
-
-If the iPhone blocks the app from opening, trust the developer certificate under **Settings → General → VPN & Device Management**.
+</Step>
+<Step>
+Open the app on the iPhone. If iOS blocks it from opening, trust the developer certificate under **Settings → General → VPN & Device Management**.
+</Step>
+</Steps>
## 7-day limit of free signing
@@ -72,16 +79,23 @@ pnpm ios:mobile:device:prod:release
Release builds bake the API address into the app. `apps/mobile/.env.production` is committed with the public multica.ai defaults, so a fresh clone builds against production as-is.
-To connect to a self-hosted instance, copy `apps/mobile/.env.production.example` to `apps/mobile/.env.production.local` and edit the copy:
+To connect to a self-hosted instance:
+
+<Steps>
+<Step>
+Copy `apps/mobile/.env.production.example` to `apps/mobile/.env.production.local`, and fill in the addresses in the copy:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-The `.local` file overrides the committed defaults key by key and is gitignored, so personal endpoints never reach the repository. `EXPO_PUBLIC_API_URL` is required. `EXPO_PUBLIC_WEB_URL` powers entries like "Copy link" and "Open on web". Set both in the copy: a key you leave out falls back to the multica.ai default, so those entries would open multica.ai instead of your instance.
-
-Re-run the build command after editing. The iPhone must be able to reach the API address; when using a LAN address, don't write `localhost` — on the iPhone it points at the phone itself.
+The `.local` file overrides the committed defaults key by key and is gitignored, so personal endpoints never reach the repository. `EXPO_PUBLIC_API_URL` is required. `EXPO_PUBLIC_WEB_URL` powers entries like "Copy link" and "Open on web". Set both: a key you leave out falls back to the multica.ai default, so those entries would open multica.ai instead of your instance.
+</Step>
+<Step>
+Re-run the build command `pnpm ios:mobile:device:prod:release`. The iPhone must be able to reach the API address; when using a LAN address, don't write `localhost`, which on the iPhone points at the phone itself.
+</Step>
+</Steps>
<Callout type="warning">
Editing `.env.production` directly changes the production configuration of the current checkout. Keep personal values in the gitignored `.env.production.local`.
diff --git a/apps/docs/content/docs/mobile-app.zh.mdx b/apps/docs/content/docs/mobile-app.zh.mdx
index aa300701df..74c3f118a8 100644
--- a/apps/docs/content/docs/mobile-app.zh.mdx
+++ b/apps/docs/content/docs/mobile-app.zh.mdx
@@ -4,10 +4,11 @@ description: 从源码把 Multica 安装到 iPhone,并连接 Cloud 或自托
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica iOS 客户端目前还没有上架 App Store。你可以在 Mac 上从公开的源码仓库构建 Release 版本,再安装到自己的 iPhone。Android 客户端暂未提供。
-安装后的 App 默认连接 Multica Cloud,使用已有账号即可登录。工作区、任务、评论和执行记录都保存在服务端,不需要从 Web 或 Desktop 手动同步。
+安装后的 App 默认连接 Multica Cloud,用已有账号登录即可。工作区、任务、评论和执行记录都保存在服务端,不需要从 Web 或 Desktop 同步。
## 准备工作
@@ -23,6 +24,8 @@ Xcode 或真机开发环境未配置时,先完成 Expo 的 [iOS Device 环境
## 安装到 iPhone
+<Steps>
+<Step>
克隆仓库并安装依赖:
```bash
@@ -30,16 +33,20 @@ git clone https://github.com/multica-ai/multica.git
cd multica
pnpm install
```
-
-然后从仓库根目录运行:
+</Step>
+<Step>
+从仓库根目录运行:
```bash
pnpm ios:mobile:device:prod:release
```
这会构建一个不依赖 Metro 的 Release 版本,并安装到已连接的 iPhone。第一次构建需要下载 iOS 依赖并编译 React Native,之后会复用 Xcode 缓存。
-
-如果 iPhone 阻止打开应用,到**设置 → 通用 → VPN 与设备管理**中信任对应的开发者证书。
+</Step>
+<Step>
+在 iPhone 上打开 App。如果系统阻止打开,到**设置 → 通用 → VPN 与设备管理**中信任对应的开发者证书。
+</Step>
+</Steps>
## 免费签名的 7 天限制
@@ -72,16 +79,23 @@ pnpm ios:mobile:device:prod:release
Release 构建会把 API 地址写入 App。`apps/mobile/.env.production` 已随仓库提交,默认指向 multica.ai 的公开后端,干净克隆即可构建生产版本。
-要连接自托管实例,把 `apps/mobile/.env.production.example` 复制为 `apps/mobile/.env.production.local` 并修改副本:
+要连接自托管实例:
+
+<Steps>
+<Step>
+把 `apps/mobile/.env.production.example` 复制为 `apps/mobile/.env.production.local`,在副本里填写地址:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`.local` 文件会按 key 覆盖提交的默认值,且已被 gitignore,个人 API 地址不会进入仓库。`EXPO_PUBLIC_API_URL` 必填;`EXPO_PUBLIC_WEB_URL` 用于 "Copy link"、"Open on web" 等入口。两个都要在副本里设置:没写的 key 会沿用 multica.ai 的默认值,这些入口就会打开 multica.ai,而不是你的实例。
-
-修改后重新运行构建命令。iPhone 必须能访问这个 API 地址;使用局域网地址时,不要写 `localhost`,因为它在 iPhone 上指向手机本身。
+`.local` 文件按 key 覆盖提交的默认值,且已被 gitignore,个人 API 地址不会进入仓库。`EXPO_PUBLIC_API_URL` 必填;`EXPO_PUBLIC_WEB_URL` 用于 "Copy link"、"Open on web" 等入口。两个都要设置:没写的 key 会沿用 multica.ai 的默认值,这些入口就会打开 multica.ai,而不是你的实例。
+</Step>
+<Step>
+重新运行构建命令 `pnpm ios:mobile:device:prod:release`。iPhone 必须能访问这个 API 地址;使用局域网地址时不要写 `localhost`,它在 iPhone 上指向手机本身。
+</Step>
+</Steps>
<Callout type="warning">
直接修改 `.env.production` 会改变当前 checkout 的生产配置。个人配置请放在 gitignore 的 `.env.production.local` 中。
diff --git a/apps/docs/content/docs/project-resources.fr.mdx b/apps/docs/content/docs/project-resources.fr.mdx
index f3bea07a5d..cfe1b9ed64 100644
--- a/apps/docs/content/docs/project-resources.fr.mdx
+++ b/apps/docs/content/docs/project-resources.fr.mdx
@@ -4,6 +4,10 @@ description: Rattachez des dépôts GitHub ou des répertoires locaux à un proj
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { LocalDirModeDemo } from "@/components/demos/local-dir-mode-demo";
Les ressources d'un [projet](/projects) indiquent aux agents quel code utilise cet ensemble de travail et où s'exécuter. Les ressources restent rattachées au projet : inutile de recoller les URL de dépôts ou les chemins locaux dans chaque tâche.
@@ -37,25 +41,42 @@ La `ref` d'une ressource définit la branche, le tag ou le commit que les checko
L'interface d'ajout d'un répertoire local n'existe que dans l'application de bureau, car les navigateurs ne peuvent pas sélectionner de dossiers sur votre ordinateur.
<Callout type="warning">
-**C'est une solution de dernier recours, pas une option par défaut plus pratique.** `local_directory` existe pour les personnes qui n'ont pas d'autre choix — le cas typique est un projet de jeu dont le checkout pèse des dizaines de gigaoctets, et pour lequel recloner le dépôt à chaque exécution n'est tout simplement pas viable.
+**Réservez cette option aux cas particuliers ; ne la choisissez pas par commodité.** `local_directory` existe pour les personnes qui n'ont pas d'autre choix, typiquement un projet de jeu dont le checkout pèse des dizaines de gigaoctets et qu'il est impossible de recloner à chaque exécution.
-Si votre répertoire est un dépôt git ordinaire que vous pouvez cloner, **utilisez plutôt `github_repo`** : il utilise le mode worktree par défaut, ce qui permet un nombre illimité d'exécutions simultanées sur le même dépôt. Un `local_directory` traite **une exécution à la fois par défaut** ; si le répertoire est un dépôt git, vous pouvez activer le mode worktree pour retrouver le parallélisme (voir « Comment les exécutions partagent le répertoire »). Lisez « Quand le choisir » ci-dessous avant de vous engager.
+Si votre répertoire est un dépôt git ordinaire que vous pouvez cloner, utilisez plutôt `github_repo` : il utilise le mode worktree par défaut, et les exécutions sur un même dépôt peuvent avoir lieu simultanément, sans limite de nombre. Un `local_directory` traite une exécution à la fois par défaut ; si le répertoire est un dépôt git, vous pouvez activer le mode worktree pour retrouver le parallélisme (voir [Comment les exécutions partagent le répertoire](#comment-les-exécutions-partagent-le-répertoire)). En cas de doute, comparez d'abord les deux types de ressources en haut de la page.
</Callout>
+<Steps>
+<Step>
-1. Assurez-vous que le daemon local de l'application de bureau est en ligne.
-2. Ouvrez les **Ressources** du projet, ou l'onglet **Répertoire local** de la boîte de dialogue de création de projet — le même choix est disponible avant même que le projet existe.
-3. Choisissez « Ajouter un répertoire local », puis sélectionnez le dossier à utiliser.
-4. Choisissez comment les exécutions doivent l'utiliser — **Direct** ou **Parallèle**, décrits dans « Comment les exécutions partagent le répertoire ». L'application de bureau présélectionne **Parallèle** lorsque le dossier est un dépôt git que le runtime de cette machine peut isoler, et **Direct** sinon. Modifiez ce choix sur place, ou plus tard depuis **Ressources** avec le crayon à côté du répertoire.
+Assurez-vous que le daemon local de l'application de bureau est en ligne.
-La présélection ne s'applique qu'au répertoire que vous rattachez maintenant. Un répertoire rattaché auparavant conserve le mode avec lequel il a été enregistré — une configuration existante n'est jamais modifiée à votre insu.
+</Step>
+<Step>
+
+Ouvrez les **Ressources** du projet, ou l'onglet **Répertoire local** de la boîte de dialogue de création de projet. Le même choix y est disponible avant même que le projet existe.
+
+</Step>
+<Step>
+
+Choisissez « Ajouter un répertoire local », puis sélectionnez le dossier à utiliser.
+
+</Step>
+<Step>
+
+Choisissez comment les exécutions doivent l'utiliser : **Direct** ou **Parallèle**, voir [Comment les exécutions partagent le répertoire](#comment-les-exécutions-partagent-le-répertoire). L'application de bureau présélectionne **Parallèle** lorsque le dossier est un dépôt git que le runtime de cette machine peut isoler, et **Direct** sinon. Modifiez ce choix sur place, ou plus tard depuis **Ressources** avec le crayon à côté du répertoire.
+
+</Step>
+</Steps>
+
+La présélection ne s'applique qu'au répertoire que vous rattachez maintenant. Un répertoire rattaché auparavant conserve le mode avec lequel il a été enregistré : une configuration existante n'est jamais modifiée à votre insu.
Le répertoire doit être un chemin absolu, doit déjà exister et doit être accessible en lecture et en écriture par le daemon actuel. Les chemins suivants sont refusés : les racines système et les racines de lecteur (`/`, `C:\`), les répertoires personnels eux-mêmes et leurs répertoires parents (comme `/Users`, `/home`, `/root`), ainsi que les répertoires système comme `/etc`, `/var`, `/tmp`, `/usr` et `/opt`. Si le chemin choisi est un lien symbolique, il est d'abord résolu en son chemin réel, puis validé à nouveau selon les mêmes règles ; le verrou de sérialisation s'applique lui aussi au chemin réel.
Chaque projet peut rattacher au plus un répertoire local par daemon. Les différents ordinateurs d'une équipe peuvent chacun rattacher leur propre répertoire pour le même projet.
<Callout type="warning">
-En mode `in_place` (par défaut), un répertoire local n'est pas un environnement isolé : l'agent voit et modifie directement votre branche actuelle et vos fichiers non commités, et Multica ne change pas automatiquement de branche, ne fait ni stash, ni commit, ni push, et n'ouvre pas de PR. Le mode worktree change cela — voir « Comment les exécutions partagent le répertoire » ci-dessous.
+En mode `in_place` (par défaut), un répertoire local n'est pas un environnement isolé : l'agent voit et modifie directement votre branche actuelle et vos fichiers non commités, et Multica ne change pas automatiquement de branche, ne fait ni stash, ni commit, ni push, et n'ouvre pas de PR. Le mode worktree fonctionne autrement, voir [Comment les exécutions partagent le répertoire](#comment-les-exécutions-partagent-le-répertoire) ci-dessous.
</Callout>
<span id="how-tasks-share-the-directory" />
@@ -64,37 +85,102 @@ En mode `in_place` (par défaut), un répertoire local n'est pas un environnemen
Un répertoire local dispose de deux modes d'exécution, définis par ressource avec `execution_mode`. L'application de bureau les nomme **Direct** et **Parallèle** ; l'API, le CLI et le reste de cette page utilisent les identifiants.
-### `in_place` (par défaut) — « Direct »
+<LocalDirModeDemo />
+
+<Tabs items={["in_place (Direct, par défaut)", "worktree (Parallèle)"]}>
+<Tab value="in_place (Direct, par défaut)" id="in-place">
L'agent travaille directement dans votre répertoire, et les exécutions ont lieu une à la fois. Lorsque deux exécutions utilisent le même répertoire réel, la seconde passe en `waiting_local_directory` et reprend une fois que la première a libéré le répertoire. Deux chemins qui mènent au même répertoire via des liens symboliques différents sont sérialisés de la même manière.
L'attente ne modifie pas le répertoire. Une exécution en attente peut être annulée ; sinon, elle attend que le répertoire devienne disponible.
-### `worktree` — « Parallèle »
+Un simple répertoire non git ne peut utiliser que ce mode : le mode worktree est réservé aux dépôts git.
+
+</Tab>
+<Tab value="worktree (Parallèle)" id="worktree">
+
+Chaque exécution obtient son propre [worktree git](https://git-scm.com/docs/git-worktree) de votre dépôt, créé dans le répertoire de travail propre au runtime. Les exécutions sur un même répertoire ont lieu simultanément, aucune n'attend, et aucune n'écrit dans votre copie de travail.
-Chaque exécution obtient son propre [worktree git](https://git-scm.com/docs/git-worktree) de votre dépôt, créé dans le répertoire de travail propre au runtime. **Les exécutions sur un même répertoire ont lieu simultanément — aucune n'attend**, et aucune n'écrit dans votre copie de travail.
+Le répertoire doit être un dépôt git contenant au moins un commit ; sinon, les exécutions échouent avec une erreur explicite au lieu de revenir silencieusement à une exécution en série.
-Le répertoire doit être un dépôt git contenant au moins un commit. Si ce n'est pas le cas, les exécutions échouent avec une erreur explicite au lieu de revenir silencieusement à une exécution en série. Le runtime de cette machine doit aussi implémenter ce mode. Il le déclare lorsqu'il se connecte, et Multica se fonde sur cette déclaration plutôt que sur un numéro de version — un build de développement peut afficher une chaîne de version qui semble assez récente sans comporter la moindre implémentation. La déclaration est vérifiée deux fois : l'enregistrement de la ressource est refusé, avec une invitation à mettre à jour l'application sur cette machine, tant que son runtime ne déclare pas cette capacité ; et chaque exécution est de nouveau vérifiée auprès du runtime qui la prend réellement en charge — ainsi, sur une machine rétrogradée après l'enregistrement de la ressource, les exécutions sont annulées avec un motif au lieu d'être silencieusement effectuées sur place. Demander `worktree`, c'est demander l'isolation ; modifier votre copie de travail à la place n'est jamais la solution de repli.
+Le runtime de cette machine doit aussi implémenter ce mode. Il le déclare lorsqu'il se connecte, et Multica se fonde uniquement sur cette déclaration, pas sur le numéro de version : un build de développement peut afficher une version qui semble assez récente sans comporter l'implémentation. La déclaration est vérifiée deux fois. À l'enregistrement de la ressource, tant que le runtime de cette machine ne déclare pas cette capacité, l'enregistrement est refusé avec une invitation à mettre à jour l'application sur cette machine ; puis chaque exécution est vérifiée de nouveau auprès du runtime qui la prend réellement en charge, si bien que sur une machine rétrogradée après l'enregistrement, les exécutions sont annulées avec un motif au lieu de tourner silencieusement dans le répertoire d'origine. Demander `worktree`, c'est demander l'isolation : Multica ne se rabat jamais sur une modification directe de votre copie de travail.
Ce que voit l'agent, et ce que vous récupérez :
-- **L'agent part de ce que vous voyez, pas de `HEAD`.** Vos modifications non commitées et vos fichiers non suivis sont rejoués dans le worktree : l'agent ne relit donc pas du code que vous n'avez plus. Votre propre copie de travail, votre index et votre liste de stash ne sont jamais touchés. Si cet état ne peut pas être reproduit fidèlement — y compris lorsque le contenu non suivi dépasse ce que couvre le rejeu (2000 fichiers / 200 Mio) — l'exécution échoue au lieu de partir d'une arborescence que vous ne reconnaîtriez pas. La solution habituelle consiste à ajouter au gitignore, ou à nettoyer, les sorties de build qui ne sont pas déjà ignorées.
-- **Le résultat est une branche de votre dépôt**, une par tâche plutôt qu'une par exécution : `agent/<agent>/<issue>` (une discussion obtient `agent/<agent>/chat-<session>`). Le panneau **Détails de l'exécution** affiche le nom de la branche (et permet de le copier) ; vous pouvez aussi la trouver avec `git branch`. Relisez-la avec `git log` / `git diff`, puis fusionnez-la ou faites un cherry-pick vous-même. Multica ne la fusionne jamais à votre place. Une exécution qui a échoué en cours de route indique tout de même sa branche, car elle a quand même commité ce que l'agent avait produit.
-- **Une suite reprend là où la dernière exécution s'est arrêtée.** Le commentaire suivant sur la même tâche récupère de nouveau cette branche : l'agent repart ainsi du travail qu'il vient de livrer, au lieu de partir de `HEAD` avec ses propres modifications laissées de côté sur une autre branche. Seul ce que vous avez modifié dans votre propre répertoire depuis la dernière exécution est rejoué par-dessus — la branche contient déjà le reste. Fusionnez la branche, et l'exécution suivante repartira de votre `HEAD`. Si deux exécutions d'une même tâche se chevauchent, la seconde bifurque à partir du travail de la première vers `agent/<agent>/<issue>-<task>`, car git n'autorise qu'un seul worktree par branche.
-- **Si vos modifications entrent en conflit avec celles de l'agent, c'est l'agent qui les résout.** Lorsque vous réécrivez les mêmes lignes que l'agent, git ne peut pas décider quelle version l'emporte : l'exécution démarre donc sur un worktree en conflit et reçoit pour consigne de terminer la fusion avant toute autre chose — `git status` dans ce worktree liste les chemins non fusionnés. Une exécution qui laisse un fichier non fusionné ne livre rien : elle échoue, conserve le worktree, et l'exécution suivante propose de nouveau les mêmes modifications ; votre changement n'est donc jamais abandonné en silence.
-- **Seules les branches qui appartiennent à Multica sont reprises.** La reprise d'une branche est décidée par un enregistrement de propriété, et non par son nom : cet enregistrement désigne la conversation, ainsi que le commit auquel la branche a été laissée. Une branche que vous avez créée vous-même et qui s'appelle par hasard `agent/<agent>/<issue>` n'est jamais récupérée, complétée ni lue comme une exécution précédente — pas plus qu'une branche qui ne contient plus le commit enregistré ; supprimer la branche de Multica pour créer la vôtre sous ce nom, ou la déplacer de force sur un autre historique, est donc sans risque. Dans ces cas, l'exécution utilise `agent/<agent>/<issue>-<id>` à la place. Commiter par-dessus une branche livrée est le cas normal et permet de continuer à la reprendre — votre commit est simplement présent lors de l'exécution suivante. Chaque branche commence aussi par son propre commit de référence, qui marque l'arborescence dont est partie la première exécution — c'est ce commit qui identifie la branche par la suite, et `git diff <baseline>..<branch>` correspond exactement au travail de l'agent. Une exécution qui n'a pas pu enregistrer sa branche — parce qu'elle a échoué avant la fin, que l'enregistrement n'a pas pu être écrit, ou qu'elle a réinitialisé son worktree au-delà du commit qui portait vos modifications dans la branche — signale un échec et conserve son worktree, et les exécutions suivantes démarrent une nouvelle branche plutôt que d'en reprendre une dont elles ne peuvent pas prouver qu'elle leur appartient.
-- **Rien n'est abandonné en silence.** Tout ce que l'agent laisse non commité est commité sur cette branche avant la suppression du worktree, y compris lorsque l'exécution échoue en cours de route. Dans le rare cas où ce commit lui-même est impossible — par exemple un dépôt avec `commit.gpgSign` et aucune clé de signature disponible pour le runtime — le worktree est délibérément conservé au lieu d'être supprimé, l'exécution est signalée comme échouée, et `git worktree list` dans votre dépôt indique le répertoire qui contient le travail.
-- **Une exécution qui ne change rien ne laisse aucune trace.** Sa branche est supprimée plutôt que laissée comme entrée vide dans `git branch` — sauf s'il s'agit de la branche de la tâche qui porte le travail d'exécutions précédentes, laquelle est toujours conservée.
+<Accordions type="multiple">
+<Accordion title="L'agent part de ce que vous voyez, pas de HEAD" id="starts-from-your-working-state">
+
+Vos modifications non commitées et vos fichiers non suivis sont rejoués dans le worktree : l'agent ne relit donc pas du code que vous n'avez plus. Votre propre copie de travail, votre index et votre liste de stash ne sont jamais touchés.
+
+Si cet état ne peut pas être reproduit fidèlement, y compris lorsque le contenu non suivi dépasse ce que couvre le rejeu (2000 fichiers / 200 Mio), l'exécution échoue au lieu de partir d'une arborescence que vous ne reconnaîtriez pas. La solution habituelle consiste à ajouter au gitignore, ou à nettoyer, les sorties de build qui ne sont pas déjà ignorées.
+
+</Accordion>
+<Accordion title="Le résultat est une branche de votre dépôt" id="result-is-a-branch">
+
+Une branche par tâche plutôt qu'une par exécution : `agent/<agent>/<issue>` (une discussion obtient `agent/<agent>/chat-<session>`). Le panneau **Détails de l'exécution** affiche le nom de la branche (et permet de le copier) ; vous pouvez aussi la trouver avec `git branch`. Relisez-la avec `git log` / `git diff`, puis fusionnez-la ou faites un cherry-pick vous-même : Multica ne la fusionne jamais à votre place.
+
+`<agent>` vient du nom de l'agent : mis en minuscules, tout ce qui n'est pas a–z ou 0–9 (lettres accentuées comprises) devient `-`, sur 30 caractères au plus. Un nom sans lettre latine ni chiffre devient `agent`. Ainsi, Assistant ops qui traite OPS-21 obtient `agent/assistant-ops/ops-21`, et un agent nommé 运营助手 obtient `agent/agent/ops-21`. `<issue>` est l'identifiant de la tâche en minuscules.
+
+Une exécution qui a échoué en cours de route indique tout de même sa branche, car elle y a déjà commité ce que l'agent avait produit.
+
+</Accordion>
+<Accordion title="Une suite reprend là où la dernière exécution s'est arrêtée" id="follow-ups-continue-the-branch">
+
+Le commentaire suivant sur la même tâche récupère de nouveau cette branche : l'agent repart du travail qu'il vient de livrer, au lieu de partir de `HEAD` avec ses propres modifications laissées de côté sur une autre branche. Seul ce que vous avez modifié dans votre propre répertoire depuis la dernière exécution est rejoué par-dessus ; la branche contient déjà le reste. Une fois la branche fusionnée, l'exécution suivante repart de votre `HEAD`.
+
+Si deux exécutions d'une même tâche se chevauchent, la seconde bifurque à partir du travail de la première vers `agent/<agent>/<issue>-<task>`, car git n'autorise qu'un seul worktree par branche.
-Comme le worktree se trouve dans le répertoire de travail du runtime, il est récupéré selon le calendrier de nettoyage habituel. Deux éléments persistent dans votre dépôt : la branche, et une ref cachée par branche sous `refs/multica/local-state/`, qui enregistre à qui elle appartient et l'état de votre répertoire lors de sa dernière reprise. Les refs cachées n'apparaissent jamais dans `git branch` ; listez-les avec `git for-each-ref refs/multica`. Multica supprime chacune d'elles avec sa branche, et élimine celles dont vous avez vous-même supprimé la branche la prochaine fois qu'une exécution démarre sur ce dépôt — vous pouvez aussi toutes les supprimer d'un coup avec `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`.
+</Accordion>
+<Accordion title="Les commits sur votre HEAD local restent séparés des modifications non commitées" id="committed-head-changes-stay-separate">
+
+Un pull ou un commit local entre deux tours n'est pas rejoué sur la branche de la tâche ; fusionnez explicitement ces commits dans la branche si besoin. Si l'exécution précédente avait capturé du travail non commité, le comparer sur le nouveau `HEAD` demande Git 2.40 ou plus récent.
+
+Si ces anciennes modifications entrent en conflit avec la nouvelle base commitée, le runtime consigne un avertissement et n'utilise le `HEAD` actuel que pour les chemins concernés ; les autres brouillons gardent leur comparaison incrémentale. Finir et commiter un brouillon ne bloque donc pas les exécutions suivantes et ne repropose pas vos brouillons inchangés face au travail de l'agent. Un conflit entre vos modifications actuelles et le travail de l'agent est toujours confié à l'agent.
+
+</Accordion>
+<Accordion title="En cas de conflit avec vos modifications, c'est l'agent qui le résout" id="conflicts-are-resolved-by-the-agent">
+
+Lorsque vous réécrivez les mêmes lignes que l'agent, git ne peut pas décider quelle version l'emporte : l'exécution démarre donc sur un worktree en conflit et reçoit pour consigne de terminer la fusion avant toute autre chose (`git status` dans ce worktree liste les chemins non fusionnés).
+
+Tant qu'un fichier reste non fusionné, l'exécution ne livre rien : elle échoue, conserve le worktree, et l'exécution suivante propose de nouveau les mêmes modifications. Votre changement n'est donc jamais abandonné en silence.
+
+</Accordion>
+<Accordion title="Seules les branches de Multica sont reprises" id="only-multica-branches-resume">
+
+La reprise d'une branche est décidée par un enregistrement de propriété, pas par son nom : cet enregistrement désigne la conversation, ainsi que le commit auquel la branche a été laissée. Une branche que vous avez créée vous-même et qui s'appelle par hasard `agent/<agent>/<issue>` n'est jamais récupérée, complétée ni lue comme une exécution précédente, pas plus qu'une branche qui ne contient plus le commit enregistré. Supprimer la branche de Multica pour créer la vôtre sous ce nom, ou la déplacer de force sur un autre historique, est donc sans risque : l'exécution utilise alors `agent/<agent>/<issue>-<id>`. Commiter par-dessus une branche livrée est le cas normal et n'empêche pas la reprise : votre commit est simplement présent lors de l'exécution suivante.
+
+Chaque branche commence aussi par son propre commit de référence, qui marque l'arborescence dont est partie la première exécution. C'est ce commit qui identifie la branche par la suite, et `git diff <baseline>..<branch>` correspond exactement au travail de l'agent.
+
+Une exécution qui n'a pas pu enregistrer sa branche, par exemple parce qu'elle a échoué avant la fin, que l'enregistrement n'a pas pu être écrit, ou qu'elle a réinitialisé son worktree au-delà du commit qui portait vos modifications dans la branche, signale un échec et conserve son worktree. Les exécutions suivantes démarrent alors une nouvelle branche plutôt que d'en reprendre une dont elles ne peuvent pas prouver qu'elle leur appartient.
+
+</Accordion>
+<Accordion title="Rien n'est perdu en silence" id="nothing-is-silently-lost">
+
+Tout ce que l'agent laisse non commité est commité sur cette branche avant la suppression du worktree, y compris lorsque l'exécution échoue en cours de route.
+
+Dans le rare cas où ce commit lui-même est impossible, par exemple un dépôt avec `commit.gpgSign` et aucune clé de signature disponible pour le runtime, le worktree est délibérément conservé, l'exécution est signalée comme échouée, et `git worktree list` dans votre dépôt indique le répertoire qui contient le travail.
+
+</Accordion>
+<Accordion title="Une exécution qui ne change rien ne laisse aucune trace" id="no-changes-leave-nothing">
+
+Sa branche est supprimée plutôt que laissée comme entrée vide dans `git branch`, sauf s'il s'agit de la branche de la tâche qui porte le travail d'exécutions précédentes : celle-ci est toujours conservée.
+
+</Accordion>
+<Accordion title="Les branches et refs cachées qui restent dans votre dépôt" id="what-stays-in-your-repo">
+
+Le worktree se trouve dans le répertoire de travail du runtime et il est récupéré selon [le calendrier de nettoyage habituel](/daemon-runtimes#cleanup). Deux éléments persistent dans votre dépôt : la branche, et une ref cachée par branche sous `refs/multica/local-state/`, qui enregistre à qui elle appartient et l'état de votre répertoire lors de sa dernière reprise.
+
+Les refs cachées n'apparaissent jamais dans `git branch` ; listez-les avec `git for-each-ref refs/multica`. Multica supprime chacune d'elles avec sa branche, et élimine celles dont vous avez vous-même supprimé la branche la prochaine fois qu'une exécution démarre sur ce dépôt. Vous pouvez aussi toutes les supprimer d'un coup avec `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`.
+
+</Accordion>
+</Accordions>
<Callout type="warn">
-**Opérateurs d'instances auto-hébergées :** l'isolation de ce mode est appliquée par le serveur (à l'enregistrement, puis de nouveau lorsqu'un runtime prend en charge chaque exécution) ; un runtime rétrogradé à n'importe quel moment est donc détecté. La combinaison qui n'est *pas* détectée consiste à ramener le serveur à un build antérieur à cette fonctionnalité alors que des runtimes qui n'implémentent pas ce mode sont encore connectés — un ancien serveur n'effectue aucun contrôle, et un tel runtime ignore `execution_mode` et effectuerait l'exécution sur place. Ne ramenez pas le serveur à une version antérieure à celle-ci tant que des ressources `worktree` existent, sauf si tous les runtimes de ces machines sont à jour.
+**Opérateurs d'instances auto-hébergées :** l'isolation de ce mode est appliquée par le serveur (à l'enregistrement, puis de nouveau lorsqu'un runtime prend en charge chaque exécution) ; un runtime rétrogradé à n'importe quel moment est donc détecté. La seule combinaison qui n'est *pas* détectée consiste à ramener le serveur à un build antérieur à cette fonctionnalité alors que des runtimes qui n'implémentent pas ce mode sont encore connectés : un ancien serveur n'effectue aucun contrôle, et un tel runtime ignore `execution_mode` et s'exécute directement dans le répertoire d'origine. Ne ramenez pas le serveur à une version antérieure à celle-ci tant que des ressources `worktree` existent, sauf si tous les runtimes de ces machines sont à jour.
</Callout>
-<Callout type="info">
-Le mode worktree couvre les dépôts git. Un simple répertoire non git s'exécute toujours en série — c'est précisément le rôle de `in_place`.
-</Callout>
+</Tab>
+</Tabs>
## Ce qui est écrit pendant une exécution
diff --git a/apps/docs/content/docs/project-resources.ja.mdx b/apps/docs/content/docs/project-resources.ja.mdx
index 6913406ff9..36a38674c5 100644
--- a/apps/docs/content/docs/project-resources.ja.mdx
+++ b/apps/docs/content/docs/project-resources.ja.mdx
@@ -4,6 +4,10 @@ description: プロジェクトに GitHub リポジトリまたはローカル
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { LocalDirModeDemo } from "@/components/demos/local-dir-mode-demo";
[プロジェクト](/projects)のリソースは、この一連の作業がどのコードを使い、どこで実行するかをエージェントに伝えます。リソースはプロジェクトに紐づいたまま保たれるため、リポジトリの URL やローカルパスをタスクごとに貼り直す必要はありません。
@@ -37,25 +41,43 @@ import { Callout } from "fumadocs-ui/components/callout";
ローカルディレクトリを追加する UI は Desktop でのみ提供されます。ブラウザからはコンピュータ上のフォルダを選択できないためです。
<Callout type="warning">
-**これは非常口であって、より便利なデフォルトではありません。** `local_directory` は他に選択肢がない人のために存在します — 典型例は、チェックアウトが数十ギガバイトになるゲームプロジェクトで、実行ごとの再クローンが現実的に不可能なケースです。
+**特別な事情があるときの選択肢です。便利そうだからという理由で選ばないでください。** `local_directory` はほかに選択肢がない人のためのものです。典型例は、チェックアウトが数十ギガバイトになるゲームプロジェクトで、実行のたびにクローンし直すのは現実的ではありません。
-対象のディレクトリが普通にクローンできる通常の git リポジトリなら、**代わりに `github_repo` を使ってください**。既定でワークツリーモードで動作するため、同じリポジトリに対する実行を無制限に並行処理できます。`local_directory` は **既定では一度に 1 つの実行だけを処理します**。ディレクトリ自体が git リポジトリであれば、ワークツリーモードを有効にして並行処理を取り戻せます(「実行がディレクトリを共有する方法」を参照)。決める前に下の「選ぶとき」を読んでください。
+対象のディレクトリが普通にクローンできる通常の git リポジトリなら、`github_repo` を使ってください。既定でワークツリーモードで動作するため、同じリポジトリに対する実行を数の制限なく同時に進められます。`local_directory` は既定では一度に 1 つの実行だけを処理します。ディレクトリ自体が git リポジトリであれば、ワークツリーモードを有効にして並行処理を取り戻せます([実行がディレクトリを共有する方法](#実行がディレクトリを共有する方法)を参照)。迷ったら、ページ冒頭の 2 種類のリソースの比較を見てください。
</Callout>
-1. Desktop のローカルデーモンがオンラインであることを確認します。
-2. プロジェクトの **リソース** を開きます。プロジェクト作成ダイアログの **ローカルディレクトリ** タブでも、プロジェクトができる前に同じ選択ができます。
-3. 「ローカルディレクトリを追加」を選び、使用するフォルダを選択します。
-4. 実行がそれをどう使うかを選びます — **直接** か **並行** で、違いは「実行がディレクトリを共有する方法」を参照してください。フォルダが git リポジトリで、そのマシンのランタイムが隔離を実行できる場合、Desktop は **並行** を、そうでなければ **直接** を初期選択します。その場で変更できますし、あとから **リソース** でディレクトリ横の鉛筆アイコンからも変更できます。
+<Steps>
+<Step>
-初期選択は、いま紐づけようとしているディレクトリにだけ適用されます。以前に紐づけたディレクトリは保存時のモードのままです — 既存の設定が知らないうちに切り替わることはありません。
+Desktop のローカルデーモンがオンラインであることを確認します。
+
+</Step>
+<Step>
+
+プロジェクトの **リソース** を開きます。プロジェクト作成ダイアログの **ローカルディレクトリ** タブでも、プロジェクトができる前に同じ選択ができます。
+
+</Step>
+<Step>
+
+「ローカルディレクトリを追加」を選び、使用するフォルダを選択します。
+
+</Step>
+<Step>
+
+実行がそれをどう使うかを、**直接** と **並行** から選びます。違いは[実行がディレクトリを共有する方法](#実行がディレクトリを共有する方法)を参照してください。フォルダが git リポジトリで、そのマシンのランタイムが隔離を実行できる場合、Desktop は **並行** を、そうでなければ **直接** を初期選択します。その場で変更でき、あとから **リソース** でディレクトリ横の鉛筆アイコンからも変更できます。
+
+</Step>
+</Steps>
+
+初期選択は、いま紐づけようとしているディレクトリにだけ適用されます。以前に紐づけたディレクトリは保存時のモードのままで、既存の設定が知らないうちに切り替わることはありません。
ディレクトリは絶対パスで、すでに存在し、現在のデーモンが読み書きできる必要があります。次のパスは拒否されます: システムのルートとドライブのルート(`/`、`C:\`)、ホームディレクトリ自体と各ホームディレクトリの親(`/Users`、`/home`、`/root` など)、および `/etc`、`/var`、`/tmp`、`/usr`、`/opt` などのシステムディレクトリ。選択したパスがシンボリックリンクの場合は、まず実体のパスに解決してから同じルールでもう一度検証されます。直列ロックも実体のパスに対して働きます。
同じデーモンに紐づけられるローカルディレクトリは、プロジェクトごとに最大 1 つです。チーム内の別々のコンピュータは、同じプロジェクトにそれぞれ自分のディレクトリを紐づけられます。
<Callout type="warning">
-既定の `in_place` モードでは、ローカルディレクトリは隔離された環境ではありません。エージェントは現在のブランチと未コミットのファイルをそのまま参照・変更し、Multica がブランチの切り替え、stash、commit、push、PR の作成を自動で行うこともありません。ワークツリーモードはこの点を変えます — 下の「実行がディレクトリを共有する方法」を参照してください。
+既定の `in_place` モードでは、ローカルディレクトリは隔離された環境ではありません。エージェントは現在のブランチと未コミットのファイルをそのまま参照・変更し、Multica がブランチの切り替え、stash、commit、push、PR の作成を自動で行うこともありません。ワークツリーモードでは事情が異なります。下の[実行がディレクトリを共有する方法](#実行がディレクトリを共有する方法)を参照してください。
</Callout>
<span id="タスクがディレクトリを共有する方法" />
@@ -65,37 +87,102 @@ import { Callout } from "fumadocs-ui/components/callout";
ローカルディレクトリには 2 つの実行モードがあり、リソースごとに設定します。リソースパネルから切り替えられるほか、CLI では `--execution-mode` を使います。Desktop での表示は **直接** と **並行** で、API・CLI とこのページの以降では識別子を使います。
-### `in_place`(既定)— 「直接」
+<LocalDirModeDemo />
+
+<Tabs items={["in_place(直接、既定)", "worktree(並行)"]}>
+<Tab value="in_place(直接、既定)" id="in-place">
エージェントはあなたのディレクトリで直接作業し、実行は一度に 1 つずつ進みます。2 つの実行が同じ実体のディレクトリを使う場合、後から来た実行は `waiting_local_directory` に入り、先の実行がディレクトリを解放してから続行します。異なるシンボリックリンク経由で同じディレクトリに到達する 2 つのパスも、同じように直列化されます。
待機中にディレクトリが変更されることはありません。待機中の実行はキャンセルできます。キャンセルしなければ、ディレクトリが使えるようになるまで待ち続けます。
-### `worktree` — 「並行」
+git 管理外の通常のディレクトリはこのモードしか使えません。ワークツリーモードは git リポジトリ専用です。
+
+</Tab>
+<Tab value="worktree(並行)" id="worktree">
-各実行が、あなたのリポジトリの独立した [git ワークツリー](https://git-scm.com/docs/git-worktree) を受け取ります。ワークツリーはランタイム自身のワークスペースディレクトリ内に作成されます。**同じディレクトリに対する実行は並行して進み、待機は発生しません**。どの実行もあなたの作業コピーには書き込みません。
+各実行が、あなたのリポジトリの独立した [git ワークツリー](https://git-scm.com/docs/git-worktree) を受け取ります。ワークツリーはランタイム自身のワークスペースディレクトリ内に作成されます。同じディレクトリに対する実行は並行して進み、待機は発生しません。どの実行もあなたの作業コピーには書き込みません。
-このモードには、コミットが 1 つ以上ある git リポジトリであることが必要です。そうでない場合、実行は黙って直列実行に戻るのではなく、明示的なエラーで失敗します。そのマシンのランタイムも、このモードを実装している必要があります。ランタイムは接続時にその能力を宣言し、Multica はバージョン番号ではなくこの宣言で判定します — 開発ビルドは、実装がまったくないまま十分に新しく見えるバージョン文字列を持ちうるからです。この宣言は 2 回検証されます。そのマシンのランタイムが能力を宣言していない間、リソースの保存は拒否され、そのマシンのアプリを更新するよう促されます。さらに各実行は実際にそれを受け取ったランタイムに対して再度検証されます — つまりリソース保存後にダウングレードされたマシンでは、実行が黙ってその場で処理されるのではなく、理由付きでキャンセルされます。`worktree` を選ぶことは隔離を求めることであり、代わりに作業コピーを書き換えることがフォールバックになることはありません。
+このモードには、コミットが 1 つ以上ある git リポジトリであることが必要です。そうでない場合、実行は黙って直列実行に戻らず、明示的なエラーで失敗します。
+
+そのマシンのランタイムも、このモードを実装している必要があります。ランタイムは接続時にその能力を宣言し、Multica はバージョン番号ではなくこの宣言だけで判定します。開発ビルドは、実装がないまま十分に新しく見えるバージョン文字列を持ちうるからです。この宣言は 2 回検証されます。リソースの保存時、そのマシンのランタイムが能力を宣言していなければ保存は拒否され、そのマシンのアプリを更新するよう促されます。さらに各実行が実際に受け取られるとき、受け取ったランタイムに対して再度検証されます。そのため、リソース保存後にダウングレードされたマシンでは、実行が元のディレクトリで黙って処理されることはなく、理由付きでキャンセルされます。`worktree` を選ぶことは隔離を求めることであり、Multica が「作業コピーを直接書き換える」ことで代用することはありません。
エージェントが見るもの、あなたが受け取るもの:
-- **エージェントは `HEAD` ではなく、あなたが今見ている状態から開始します。** 未コミットの変更と未追跡ファイルがワークツリーに再現されるため、すでに手元にないコードをレビューすることはありません。あなた自身の作業コピー、インデックス、stash リストが変更されることはありません。その状態を忠実に再現できない場合 — 再現の上限(2000 ファイル / 200 MiB)を超える未追跡コンテンツがある場合を含む — 実行は、見覚えのないツリーから開始する代わりに失敗します。通常の対処法は、まだ無視されていないビルド成果物を gitignore に加えるか削除することです。
-- **成果物はあなたのリポジトリ内のブランチ**で、実行ごとではなくタスクごとに 1 本、`agent/<agent>/<issue>`(チャットなら `agent/<agent>/chat-<session>`)という名前が付きます。実行の「実行詳細」パネルにブランチ名が表示され(コピーも可能)、`git branch` でも見つけられます。`git log` / `git diff` でレビューし、マージするか cherry-pick するかは自分で決めます。Multica が代わりにマージすることはありません。途中で失敗した実行もブランチを報告します。エージェントが作った分はすでにコミットされているからです。
-- **続きのコメントは前回の続きから始まります。** 同じタスクへの次のコメントはそのブランチを再びチェックアウトするので、エージェントは直前に納品した成果の上で作業します。`HEAD` からやり直して前回の変更が別ブランチに取り残されることはありません。再適用されるのは前回以降にあなたが自分のディレクトリで変えた分だけです — それ以外はブランチがすでに持っています。ブランチをマージすれば、次の実行はまたあなたの `HEAD` から始まります。同じタスクで 2 つの実行が重なった場合、あとの実行は前の実行の成果から `agent/<agent>/<issue>-<task>` に分岐します。git では 1 つのブランチに 1 つの worktree しか持てないためです。
-- **あなたの変更がエージェントの成果と衝突したら、エージェントが解決します。** エージェントが書き換えたのと同じ行をあなたが書き換えた場合、git はどちらが正しいか決められません。その実行は衝突したままのワークツリーで始まり、何より先にマージを終わらせるよう指示されます(そのワークツリーで `git status` を実行すると未マージのファイルが並びます)。未マージのファイルが残ったままの実行は何も納品しません。実行は失敗し、ワークツリーは保持され、次の実行が同じ変更をもう一度提示するので、あなたの変更が黙って消えることはありません。
-- **Multica のものだと確認できたブランチだけを引き継ぎます。** 引き継ぐかどうかは名前ではなく所有記録で決まります。記録にはどの対話のものかに加えて、そのブランチが最後に置かれたコミットも書かれています。あなたが自分で作った、たまたま `agent/<agent>/<issue>` という名前のブランチが、チェックアウトされることも、追記されることも、前回の成果として読まれることもありません。記録されたコミットをもう含まないブランチも同様なので、Multica のブランチを削除して同名のものを作り直したり、別の履歴へ force-move したりしても安全です。その場合、実行は `agent/<agent>/<issue>-<id>` を使います。納品済みブランチの上にコミットするのは通常の使い方で、引き継ぎはそのまま続き、あなたのコミットは次の実行にそのまま含まれます。各ブランチはそれ自身のベースラインコミットから始まります。最初の実行が開始した時点のツリーを示すもので、あとでブランチを識別するのはこのコミットであり、`git diff <baseline>..<branch>` はちょうどエージェントの変更になります。ブランチを記録できなかった実行 — 途中で失敗した、記録の書き込みに失敗した、あるいはあなたの変更をブランチに取り込んだコミットより前にワークツリーをリセットした場合 — は失敗として報告されワークツリーを残します。以降の実行は自分のものだと証明できないブランチを引き継がず、新しいブランチから始めます。
-- **黙って失われるものはありません。** エージェントが未コミットのまま残した変更は、ワークツリーが削除される前にそのブランチへコミットされます。**実行が途中で失敗した場合も同様です。** ごくまれにそのコミット自体が実行できない場合 — 例えば `commit.gpgSign` が有効で、ランタイムが署名鍵を利用できないリポジトリ — ワークツリーは削除されずに意図的に保持され、実行は失敗として報告されます。あなたのリポジトリで `git worktree list` を実行すると、その変更を保持しているディレクトリが表示されます。
-- **何も変更しなかった実行は、何も残しません。** そのブランチは `git branch` に空の項目として残らず、削除されます。ただし、それまでの実行の成果を持つタスクのブランチは常に残ります。
+<Accordions type="multiple">
+<Accordion title="エージェントは HEAD ではなく、あなたが今見ている状態から始める" id="starts-from-your-working-state">
+
+未コミットの変更と未追跡ファイルがワークツリーに再現されるため、すでに手元にないコードをレビューすることはありません。あなた自身の作業コピー、インデックス、stash リストが変更されることはありません。
+
+その状態を忠実に再現できない場合(再現の上限である 2000 ファイル / 200 MiB を超える未追跡コンテンツがある場合を含む)、実行は見覚えのないツリーから始めずに失敗します。通常の対処法は、まだ無視されていないビルド成果物を gitignore に加えるか削除することです。
+
+</Accordion>
+<Accordion title="成果物はあなたのリポジトリ内のブランチ" id="result-is-a-branch">
+
+ブランチは実行ごとではなくタスクごとに 1 本で、`agent/<agent>/<issue>`(チャットなら `agent/<agent>/chat-<session>`)という名前が付きます。実行の「実行詳細」パネルにブランチ名が表示され(コピーも可能)、`git branch` でも見つけられます。`git log` / `git diff` でレビューし、マージするか cherry-pick するかは自分で決めます。Multica が代わりにマージすることはありません。
+
+`<agent>` はエージェント名から作られます。小文字にしたうえで英字と数字だけを残し、それ以外の文字は `-` に置き換え、最大 30 文字です。英字も数字も含まない名前は `agent` になります。そのため「運用アシスタント」が OPS-21 を処理すると、ブランチは `agent/agent/ops-21` です。`<issue>` は小文字にしたタスク番号です。
+
+途中で失敗した実行もブランチを報告します。エージェントが作った分はすでにコミットされているからです。
+
+</Accordion>
+<Accordion title="続きのコメントは前回の続きから始まる" id="follow-ups-continue-the-branch">
+
+同じタスクへの次のコメントはそのブランチを再びチェックアウトするので、エージェントは直前に納品した成果の上で作業します。`HEAD` からやり直して前回の変更が別ブランチに取り残されることはありません。再適用されるのは前回以降にあなたが自分のディレクトリで変えた分だけで、それ以外はブランチがすでに持っています。ブランチをマージすれば、次の実行はまたあなたの `HEAD` から始まります。
+
+同じタスクで 2 つの実行が重なった場合、あとの実行は前の実行の成果から `agent/<agent>/<issue>-<task>` に分岐します。git では 1 つのブランチに 1 つの worktree しか持てないためです。
-ワークツリーはランタイムのワークスペースディレクトリ内にあるため、通常のクリーンアップ周期で回収されます。あなたのリポジトリに残るのは 2 つ、ブランチと、ブランチごとの隠しref(`refs/multica/local-state/` 配下)です。後者はそのブランチの所有者と、最後に引き継いだ時点のあなたのディレクトリの内容を記録します。隠しrefは `git branch` には現れません。`git for-each-ref refs/multica` で一覧できます。Multica はブランチと一緒に削除し、あなたが自分で消したブランチのrefは、そのリポジトリで次の実行が始まるときに片付けます。`git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d` で一括削除もできます。
+</Accordion>
+<Accordion title="ローカル HEAD へのコミットは、未コミットの変更とは分けて扱う" id="committed-head-changes-stay-separate">
+
+ターンの合間に行った pull やローカルコミットは、タスクのブランチには再適用されません。必要なら、それらのコミットを明示的にブランチへマージしてください。前回の実行が未コミットの作業を取り込んでいた場合、それを新しい `HEAD` 上で比較するには Git 2.40 以降が必要です。
+
+その古い変更が新しくコミットされたベースラインと衝突した場合、ランタイムは警告をログに残し、影響を受けるパスだけ現在の `HEAD` を使います。ほかの下書きは差分での比較を続けます。そのため、下書きの 1 つを仕上げてコミットしても、以降の実行が止まったり、変えていない下書きがエージェントの成果に対してもう一度持ち込まれたりはしません。今の変更とエージェントの成果の衝突は、これまでどおりエージェントに解決を任せます。
+
+</Accordion>
+<Accordion title="あなたの変更がエージェントの成果と衝突したら、エージェントが解決する" id="conflicts-are-resolved-by-the-agent">
+
+エージェントが書き換えたのと同じ行をあなたが書き換えた場合、git はどちらが正しいか決められません。その実行は衝突したままのワークツリーで始まり、何より先にマージを終わらせるよう指示されます(そのワークツリーで `git status` を実行すると未マージのファイルが並びます)。
+
+未マージのファイルが残ったままの実行は何も納品しません。実行は失敗し、ワークツリーは保持され、次の実行が同じ変更をもう一度提示するので、あなたの変更が黙って消えることはありません。
+
+</Accordion>
+<Accordion title="引き継ぐのは Multica 自身のブランチだけ" id="only-multica-branches-resume">
+
+引き継ぐかどうかは名前ではなく所有記録で決まります。記録にはどの対話のものかに加えて、そのブランチが最後に置かれたコミットも書かれています。あなたが自分で作った、たまたま `agent/<agent>/<issue>` という名前のブランチが、チェックアウトされることも、追記されることも、前回の成果として読まれることもありません。記録されたコミットをもう含まないブランチも同様です。そのため、Multica のブランチを削除して同名のものを作り直したり、別の履歴へ force-move したりしても安全で、その場合の実行は `agent/<agent>/<issue>-<id>` を使います。納品済みブランチの上にコミットするのは通常の使い方で、引き継ぎはそのまま続き、あなたのコミットは次の実行にそのまま含まれます。
+
+各ブランチはそれ自身のベースラインコミットから始まります。最初の実行が開始した時点のツリーを示すもので、あとでブランチを識別するのはこのコミットです。`git diff <baseline>..<branch>` はちょうどエージェントの変更になります。
+
+ブランチを記録できなかった実行(途中で失敗した、記録の書き込みに失敗した、あるいはあなたの変更をブランチに取り込んだコミットより前にワークツリーをリセットした場合)は、失敗として報告されワークツリーを残します。以降の実行は、自分のものだと証明できないブランチを引き継がず、新しいブランチから始めます。
+
+</Accordion>
+<Accordion title="黙って失われるものはない" id="nothing-is-silently-lost">
+
+エージェントが未コミットのまま残した変更は、ワークツリーが削除される前にそのブランチへコミットされます。実行が途中で失敗した場合も同様です。
+
+ごくまれに、そのコミット自体ができないことがあります。たとえば `commit.gpgSign` が有効で、ランタイムが署名鍵を利用できないリポジトリです。その場合ワークツリーは削除されずに意図的に保持され、実行は失敗として報告されます。あなたのリポジトリで `git worktree list` を実行すると、その変更を保持しているディレクトリが表示されます。
+
+</Accordion>
+<Accordion title="何も変更しなかった実行は、何も残さない" id="no-changes-leave-nothing">
+
+そのブランチは `git branch` に空の項目として残らず、削除されます。ただし、それまでの実行の成果を持つタスクのブランチは常に残ります。
+
+</Accordion>
+<Accordion title="リポジトリに残るブランチと隠し ref" id="what-stays-in-your-repo">
+
+ワークツリーはランタイムのワークスペースディレクトリ内にあるため、[通常のクリーンアップ周期](/daemon-runtimes#cleanup)で回収されます。あなたのリポジトリに残るのは 2 つ、ブランチと、ブランチごとの隠し ref(`refs/multica/local-state/` 配下)です。後者はそのブランチの所有者と、最後に引き継いだ時点のあなたのディレクトリの内容を記録します。
+
+隠し ref は `git branch` には現れず、`git for-each-ref refs/multica` で一覧できます。Multica はブランチと一緒に削除し、あなたが自分で消したブランチの ref は、そのリポジトリで次の実行が始まるときに片付けます。`git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d` で一括削除もできます。
+
+</Accordion>
+</Accordions>
<Callout type="warn">
-**セルフホスト運用者向け:** このモードの分離はサーバー側で強制されます(リソース保存時と、ランタイムが各実行を取得する時点の二重チェック)。そのため、ランタイムをいつダウングレードしても検出されます。検出できない唯一の組み合わせは、このモードを実装していないランタイムが接続されたまま、サーバーをこの機能より前のビルドへロールバックすることです — 古いサーバーにはこのゲートがなく、そうしたランタイムは `execution_mode` を無視して実行を元のディレクトリで直接処理してしまいます。`worktree` リソースが存在する間は、対象マシンのランタイムがすべて最新でない限り、サーバーをこのリリースより前へロールバックしないでください。
+**セルフホスト運用者向け:** このモードの分離はサーバー側で強制されます(リソース保存時と、ランタイムが各実行を取得する時点の二重チェック)。そのため、ランタイムをいつダウングレードしても検出されます。検出できない唯一の組み合わせは、このモードを実装していないランタイムが接続されたまま、サーバーをこの機能より前のビルドへロールバックすることです。古いサーバーにはこのゲートがなく、そうしたランタイムは `execution_mode` を無視して実行を元のディレクトリで直接処理してしまいます。`worktree` リソースが存在する間は、対象マシンのランタイムがすべて最新でない限り、サーバーをこのリリースより前へロールバックしないでください。
</Callout>
-<Callout type="info">
-ワークツリーモードは git リポジトリを対象とします。git 管理外の通常のディレクトリは引き続き直列実行です — それが `in_place` の役割です。
-</Callout>
+</Tab>
+</Tabs>
## 実行中に書き込まれるもの
diff --git a/apps/docs/content/docs/project-resources.ko.mdx b/apps/docs/content/docs/project-resources.ko.mdx
index a4980a867a..bb5aeba5da 100644
--- a/apps/docs/content/docs/project-resources.ko.mdx
+++ b/apps/docs/content/docs/project-resources.ko.mdx
@@ -4,6 +4,10 @@ description: 프로젝트에 GitHub 저장소나 로컬 디렉터리를 연결
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { LocalDirModeDemo } from "@/components/demos/local-dir-mode-demo";
[프로젝트](/projects) 리소스는 이 작업 묶음에 어떤 코드가 필요하며 어디에서 실행할지 에이전트에게 알려 줍니다. 리소스는 프로젝트에 계속 연결되어 있으므로 각 태스크에 저장소 주소나 로컬 경로를 반복해서 붙여 넣을 필요가 없습니다.
@@ -37,25 +41,42 @@ import { Callout } from "fumadocs-ui/components/callout";
브라우저는 컴퓨터의 폴더를 선택할 수 없으므로 로컬 디렉터리 추가 화면은 Desktop에서만 제공됩니다.
<Callout type="warning">
-**이것은 비상구이지, 더 편리한 기본값이 아닙니다.** `local_directory`는 다른 선택지가 없는 사람들을 위해 존재합니다 — 대표적인 사례는 체크아웃 하나가 수십 기가바이트인 게임 프로젝트로, 실행마다 다시 클론하는 것이 현실적으로 불가능한 경우입니다.
+**편해서 고르는 옵션이 아니라 특별한 경우를 위한 옵션입니다.** `local_directory`는 다른 방법이 없는 사람들을 위해 존재합니다. 대표적인 사례는 체크아웃 하나가 수십 기가바이트인 게임 프로젝트로, 실행마다 다시 클론하는 것이 현실적으로 불가능한 경우입니다.
-대상 디렉터리가 평범하게 클론할 수 있는 일반 git 저장소라면 **대신 `github_repo`를 사용하세요**: 기본적으로 워크트리 모드로 동작하므로 같은 저장소에서 실행을 무제한으로 동시에 처리할 수 있습니다. `local_directory`는 **기본적으로 한 번에 하나의 실행만 처리합니다**. 디렉터리 자체가 git 저장소라면 워크트리 모드를 켜서 동시 실행을 되찾을 수 있습니다(“실행이 디렉터리를 공유하는 방식” 참고). 결정하기 전에 위의 리소스 비교를 확인하세요.
+대상 디렉터리가 평범하게 클론할 수 있는 일반 git 저장소라면 `github_repo`를 사용하세요. 기본적으로 워크트리 모드로 동작하므로 같은 저장소의 실행을 개수 제한 없이 동시에 처리할 수 있습니다. `local_directory`는 기본적으로 한 번에 하나의 실행만 처리합니다. 디렉터리 자체가 git 저장소라면 워크트리 모드를 켜서 동시 실행을 되찾을 수 있습니다([실행이 디렉터리를 공유하는 방식](#실행이-디렉터리를-공유하는-방식) 참고). 판단이 서지 않으면 페이지 맨 위의 리소스 비교를 먼저 확인하세요.
</Callout>
+<Steps>
+<Step>
-1. Desktop의 로컬 데몬이 온라인인지 확인합니다.
-2. 프로젝트의 **리소스**를 엽니다. 프로젝트 생성 대화상자의 **로컬 디렉터리** 탭에서도 프로젝트가 만들어지기 전에 같은 선택을 할 수 있습니다.
-3. "로컬 디렉터리 추가"를 선택한 뒤 사용할 폴더를 고릅니다.
-4. 실행이 그 폴더를 어떻게 사용할지 고릅니다 — **직접** 또는 **병렬**이며, 차이는 "실행이 디렉터리를 공유하는 방식"에 설명되어 있습니다. 폴더가 git 저장소이고 그 기기의 런타임이 격리를 수행할 수 있으면 Desktop이 **병렬**을, 그렇지 않으면 **직접**을 미리 선택합니다. 그 자리에서 바꿀 수 있고, 나중에 **리소스**에서 디렉터리 옆 연필 아이콘으로도 바꿀 수 있습니다.
+Desktop의 로컬 데몬이 온라인인지 확인합니다.
-미리 선택은 지금 연결하는 디렉터리에만 적용됩니다. 이전에 연결한 디렉터리는 저장할 때의 모드를 그대로 유지합니다 — 기존 설정이 모르는 사이에 바뀌지 않습니다.
+</Step>
+<Step>
+
+프로젝트의 **리소스**를 엽니다. 프로젝트 생성 대화상자의 **로컬 디렉터리** 탭에서도, 프로젝트가 만들어지기 전에 같은 선택을 할 수 있습니다.
+
+</Step>
+<Step>
+
+"로컬 디렉터리 추가"를 선택한 뒤 사용할 폴더를 고릅니다.
+
+</Step>
+<Step>
+
+실행이 그 폴더를 어떻게 사용할지 **직접**과 **병렬** 중에서 고릅니다. 차이는 [실행이 디렉터리를 공유하는 방식](#실행이-디렉터리를-공유하는-방식)에 설명되어 있습니다. 폴더가 git 저장소이고 그 기기의 런타임이 격리를 수행할 수 있으면 Desktop이 **병렬**을, 그렇지 않으면 **직접**을 미리 선택합니다. 그 자리에서 바꿀 수 있고, 나중에 **리소스**에서 디렉터리 옆 연필 아이콘으로도 바꿀 수 있습니다.
+
+</Step>
+</Steps>
+
+미리 선택은 지금 연결하는 디렉터리에만 적용됩니다. 이전에 연결한 디렉터리는 저장할 때의 모드를 그대로 유지하므로, 기존 설정이 모르는 사이에 바뀌지 않습니다.
디렉터리는 절대 경로여야 하고 이미 존재해야 하며 현재 데몬이 읽고 쓸 수 있어야 합니다. 시스템 루트와 드라이브 루트(`/`, `C:\`), 사용자 홈 디렉터리 자체 및 각 홈 디렉터리의 상위 경로(`/Users`, `/home`, `/root`), 그리고 `/etc`, `/var`, `/tmp`, `/usr`, `/opt` 같은 시스템 디렉터리는 거부됩니다. 선택한 경로가 심볼릭 링크이면 실제 경로를 먼저 해석한 뒤 같은 규칙으로 다시 확인하며 직렬 잠금도 실제 경로를 기준으로 적용됩니다.
프로젝트 하나에는 같은 데몬에서 로컬 디렉터리를 최대 하나만 연결할 수 있습니다. 팀의 서로 다른 컴퓨터에서는 같은 프로젝트에 각자의 디렉터리를 연결할 수 있습니다.
<Callout type="warning">
-기본값인 `in_place` 모드에서 로컬 디렉터리는 격리된 환경이 아닙니다. 에이전트가 현재 브랜치와 커밋하지 않은 파일을 직접 보고 수정하며, Multica는 브랜치 전환, stash, commit, push, PR 생성을 자동으로 수행하지 않습니다. 워크트리 모드는 이 점을 바꿉니다 — 아래 “실행이 디렉터리를 공유하는 방식”을 참고하세요.
+기본값인 `in_place` 모드에서 로컬 디렉터리는 격리된 환경이 아닙니다. 에이전트가 현재 브랜치와 커밋하지 않은 파일을 직접 보고 수정하며, Multica는 브랜치 전환, stash, commit, push, PR 생성을 자동으로 수행하지 않습니다. 워크트리 모드는 다르게 동작합니다. 아래 [실행이 디렉터리를 공유하는 방식](#실행이-디렉터리를-공유하는-방식)을 참고하세요.
</Callout>
<span id="작업이-디렉터리를-공유하는-방식" />
@@ -64,37 +85,102 @@ import { Callout } from "fumadocs-ui/components/callout";
로컬 디렉터리에는 두 가지 실행 모드가 있으며 리소스별로 설정합니다. 리소스 패널에서 전환할 수 있고, CLI에서는 `--execution-mode`를 사용합니다. Desktop에서는 **직접**과 **병렬**로 표시하며, API와 CLI, 이 문서의 나머지 부분에서는 식별자를 사용합니다.
-### `in_place`(기본값) — "직접"
+<LocalDirModeDemo />
+
+<Tabs items={["in_place(직접, 기본값)", "worktree(병렬)"]}>
+<Tab value="in_place(직접, 기본값)" id="in-place">
에이전트가 사용자의 디렉터리에서 직접 작업하며, 실행은 한 번에 하나씩 진행됩니다. 두 실행이 같은 실제 디렉터리를 사용하면 나중에 도착한 실행이 `waiting_local_directory` 상태로 들어가 앞선 실행이 디렉터리를 해제할 때까지 기다립니다. 서로 다른 심볼릭 링크 경로가 같은 디렉터리를 가리켜도 직렬로 실행됩니다.
기다리는 동안 디렉터리는 변경되지 않습니다. 대기 중인 실행은 취소할 수 있으며 취소하지 않으면 디렉터리를 사용할 수 있을 때까지 계속 기다립니다.
-### `worktree` — "병렬"
+git으로 관리되지 않는 일반 디렉터리는 이 모드만 사용할 수 있습니다. 워크트리 모드는 git 저장소 전용입니다.
+
+</Tab>
+<Tab value="worktree(병렬)" id="worktree">
+
+각 실행이 저장소의 독립된 [git 워크트리](https://git-scm.com/docs/git-worktree)를 받으며, 워크트리는 런타임 자체의 작업 공간 디렉터리 안에 생성됩니다. 같은 디렉터리에 대한 실행들이 동시에 진행되어 어느 것도 대기하지 않고, 어느 것도 사용자의 작업 사본에 쓰지 않습니다.
-각 실행이 저장소의 독립된 [git 워크트리](https://git-scm.com/docs/git-worktree)를 받으며, 워크트리는 런타임 자체의 작업 공간 디렉터리 안에 생성됩니다. **같은 디렉터리에 대한 실행들이 동시에 진행되고 어느 것도 대기하지 않으며**, 어느 것도 사용자의 작업 사본에 쓰지 않습니다.
+이 디렉터리는 커밋이 하나 이상 있는 git 저장소여야 합니다. 조건을 만족하지 않으면 조용히 직렬 실행으로 돌아가지 않고 명시적인 오류로 실패합니다.
-이 모드는 커밋이 하나 이상 있는 git 저장소를 요구합니다. 그렇지 않으면 조용히 직렬 실행으로 되돌아가는 대신 명시적인 오류로 실패합니다. 해당 머신의 런타임도 이 모드를 구현하고 있어야 합니다. 런타임은 연결할 때 그 기능을 선언하며, Multica는 버전 번호가 아니라 이 선언을 기준으로 판단합니다 — 개발 빌드는 구현이 전혀 없는 채로 충분히 새것처럼 보이는 버전 문자열을 가질 수 있기 때문입니다. 이 선언은 두 번 확인됩니다. 해당 머신의 런타임이 기능을 선언하지 않는 동안에는 리소스 저장이 거부되고 그 머신의 앱을 업데이트하라는 안내가 표시되며, 각 실행은 실제로 그것을 가져간 런타임을 기준으로 다시 확인됩니다 — 따라서 리소스를 저장한 뒤 다운그레이드된 머신에서는 실행이 조용히 제자리에서 진행되는 대신 이유와 함께 취소됩니다. `worktree`를 요청하는 것은 격리를 요청하는 것이며, 대신 작업 사본을 수정하는 것이 대체 동작이 되는 일은 없습니다.
+해당 머신의 런타임도 이 모드를 구현하고 있어야 합니다. 런타임은 연결할 때 그 기능을 선언하며, Multica는 버전 번호가 아니라 이 선언만 봅니다. 개발 빌드는 구현이 없는데도 충분히 새것처럼 보이는 버전 문자열을 가질 수 있기 때문입니다. 이 선언은 두 번 확인됩니다. 리소스를 저장할 때 해당 머신의 런타임이 기능을 선언하지 않았다면 저장이 거부되고 그 머신의 앱을 업데이트하라는 안내가 표시됩니다. 각 실행이 실제로 가져가질 때도 가져간 런타임을 기준으로 다시 확인하므로, 리소스를 저장한 뒤 다운그레이드된 머신에서는 실행이 원본 디렉터리에서 조용히 진행되지 않고 이유와 함께 취소됩니다. `worktree`를 고르는 것은 격리를 요구하는 것이며, Multica는 작업 사본을 직접 수정하는 방식으로 대신 처리하지 않습니다.
에이전트가 보는 것과 사용자가 받는 것:
-- **에이전트는 `HEAD`가 아니라 지금 보고 있는 상태에서 시작합니다.** 커밋하지 않은 수정과 추적되지 않은 파일이 워크트리로 재현되므로, 더 이상 갖고 있지 않은 코드를 검토하지 않습니다. 사용자의 작업 사본, 인덱스, stash 목록은 절대 건드리지 않습니다. 그 상태를 충실히 재현할 수 없으면 — 재현 한도(2000개 파일 / 200 MiB)를 넘는 추적되지 않은 콘텐츠가 있는 경우 포함 — 알아볼 수 없는 트리에서 시작하는 대신 실행이 실패합니다. 보통은 아직 무시되지 않은 빌드 산출물을 gitignore에 추가하거나 정리하면 해결됩니다.
-- **결과물은 저장소 안의 브랜치**이며 실행마다가 아니라 태스크마다 하나씩, `agent/<agent>/<issue>` 형식입니다(채팅은 `agent/<agent>/chat-<session>`). 실행의 **실행 세부 정보** 패널에 브랜치 이름이 표시되고 복사할 수 있으며, `git branch`로도 찾을 수 있습니다. `git log` / `git diff`로 검토한 뒤 병합할지 cherry-pick할지 직접 결정합니다. Multica가 대신 병합하지 않습니다. 도중에 실패한 실행도 브랜치를 보고합니다. 에이전트가 만든 부분은 이미 커밋되어 있기 때문입니다.
-- **후속 실행은 지난 실행이 멈춘 지점에서 이어집니다.** 같은 태스크에 다음 댓글이 달리면 그 브랜치를 다시 체크아웃하므로, 에이전트는 방금 전달한 작업 위에서 이어서 일합니다. `HEAD`에서 새로 시작해 지난 변경이 다른 브랜치에 남겨지는 일은 없습니다. 다시 적용되는 것은 지난 실행 이후 사용자가 자기 디렉터리에서 바꾼 부분뿐이며, 나머지는 브랜치가 이미 갖고 있습니다. 브랜치를 병합하면 다음 실행은 다시 사용자의 `HEAD`에서 시작합니다. 한 태스크에서 두 실행이 겹치면 나중 실행이 앞선 실행의 작업에서 `agent/<agent>/<issue>-<task>`로 갈라져 나갑니다. git은 브랜치 하나당 worktree 하나만 허용하기 때문입니다.
-- **사용자의 변경이 에이전트의 작업과 충돌하면 에이전트가 해결합니다.** 에이전트가 고친 것과 같은 줄을 사용자가 다시 고치면 git은 어느 쪽이 맞는지 판단할 수 없습니다. 그 실행은 충돌이 남은 워크트리에서 시작하며, 다른 무엇보다 먼저 병합을 끝내라는 지시를 받습니다(그 워크트리에서 `git status`가 병합되지 않은 파일을 보여줍니다). 병합되지 않은 파일이 하나라도 남은 실행은 아무것도 전달하지 않습니다. 실행은 실패하고 워크트리는 보존되며, 다음 실행이 같은 변경을 다시 제안하므로 사용자의 변경이 조용히 사라지지 않습니다.
-- **Multica 소유임이 확인된 브랜치만 이어받습니다.** 이어받을지는 이름이 아니라 소유 기록으로 결정됩니다. 기록에는 어느 대화의 것인지와 함께 그 브랜치가 마지막으로 놓였던 커밋도 적혀 있습니다. 사용자가 직접 만든, 우연히 `agent/<agent>/<issue>`라는 이름의 브랜치는 체크아웃되지도, 커밋이 추가되지도, 이전 실행의 결과로 읽히지도 않습니다. 기록된 커밋을 더는 포함하지 않는 브랜치도 마찬가지여서, Multica의 브랜치를 지우고 같은 이름으로 새로 만들거나 다른 히스토리로 force-move해도 안전합니다. 그런 경우 실행은 `agent/<agent>/<issue>-<id>`를 사용합니다. 전달된 브랜치 위에 커밋하는 것은 정상적인 사용이며, 이어받기는 그대로 유지되고 사용자의 커밋은 다음 실행에 그대로 포함됩니다. 모든 브랜치는 자기 자신의 베이스라인 커밋으로 시작합니다. 첫 실행이 시작한 시점의 트리를 표시하며, 나중에 브랜치를 식별하는 것이 바로 이 커밋이고 `git diff <baseline>..<branch>`가 정확히 에이전트의 작업이 됩니다. 브랜치를 기록하지 못한 실행은 — 도중에 실패했거나, 기록을 쓰지 못했거나, 사용자의 변경을 브랜치에 반영한 커밋 이전으로 워크트리를 되돌린 경우 — 실패로 보고되고 워크트리를 남기며, 이후 실행은 자기 것임을 증명할 수 없는 브랜치를 이어받는 대신 새 브랜치에서 시작합니다.
-- **조용히 사라지는 것은 없습니다.** 에이전트가 커밋하지 않고 남긴 변경 사항은 워크트리가 제거되기 전에 해당 브랜치로 커밋되며, **실행이 도중에 실패한 경우에도 마찬가지입니다.** 드물게 그 커밋 자체를 할 수 없는 경우 — 예를 들어 `commit.gpgSign`이 켜져 있고 런타임이 서명 키를 사용할 수 없는 저장소 — 워크트리는 제거되지 않고 의도적으로 유지되며, 실행은 실패로 보고되고, 저장소에서 `git worktree list`를 실행하면 해당 변경 사항이 있는 디렉터리를 확인할 수 있습니다.
-- **아무것도 변경하지 않은 실행은 아무것도 남기지 않습니다.** 해당 브랜치는 `git branch`에 빈 항목으로 남지 않고 삭제됩니다. 다만 이전 실행의 작업을 담고 있는 태스크 브랜치는 항상 유지됩니다.
+<Accordions type="multiple">
+<Accordion title="에이전트는 HEAD가 아니라 지금 보고 있는 상태에서 시작합니다" id="starts-from-your-working-state">
+
+커밋하지 않은 수정과 추적되지 않은 파일이 워크트리로 재현되므로, 더 이상 쓰지 않는 코드를 검토하지 않습니다. 사용자의 작업 사본, 인덱스, stash 목록은 건드리지 않습니다.
+
+그 상태를 충실히 재현할 수 없으면(재현 한도인 2000개 파일 / 200 MiB를 넘는 추적되지 않은 콘텐츠가 있는 경우 포함) 알아볼 수 없는 트리에서 시작하지 않고 실행이 실패합니다. 보통은 아직 무시되지 않은 빌드 산출물을 gitignore에 추가하거나 정리하면 해결됩니다.
+
+</Accordion>
+<Accordion title="결과물은 저장소 안의 브랜치입니다" id="result-is-a-branch">
+
+브랜치는 실행마다가 아니라 태스크마다 하나씩, `agent/<agent>/<issue>` 형식입니다(채팅은 `agent/<agent>/chat-<session>`). 실행의 **실행 세부 정보** 패널에 브랜치 이름이 표시되고 복사할 수 있으며, `git branch`로도 찾을 수 있습니다. `git log` / `git diff`로 검토한 뒤 병합할지 cherry-pick할지 직접 결정합니다. Multica가 대신 병합하지 않습니다.
+
+`<agent>`는 에이전트 이름에서 만들어집니다. 소문자로 바꾼 뒤 영문자와 숫자만 남기고 나머지 문자는 `-`로 바꾸며, 최대 30자입니다. 영문자나 숫자가 없는 이름은 `agent`가 됩니다. 그래서 "운영 도우미"가 OPS-21을 처리하면 브랜치는 `agent/agent/ops-21`입니다. `<issue>`는 소문자로 바꾼 태스크 번호입니다.
+
+도중에 실패한 실행도 브랜치를 보고합니다. 에이전트가 만든 부분은 이미 커밋되어 있기 때문입니다.
+
+</Accordion>
+<Accordion title="후속 실행은 지난 실행이 멈춘 지점에서 이어집니다" id="follow-ups-continue-the-branch">
+
+같은 태스크에 다음 댓글이 달리면 그 브랜치를 다시 체크아웃하므로, 에이전트는 방금 전달한 작업 위에서 이어서 일합니다. `HEAD`에서 새로 시작해 지난 변경이 다른 브랜치에 남겨지는 일은 없습니다. 다시 적용되는 것은 지난 실행 이후 사용자가 자기 디렉터리에서 바꾼 부분뿐이며, 나머지는 브랜치가 이미 갖고 있습니다. 브랜치를 병합하면 다음 실행은 다시 사용자의 `HEAD`에서 시작합니다.
+
+한 태스크에서 두 실행이 겹치면 나중 실행이 앞선 실행의 작업에서 `agent/<agent>/<issue>-<task>`로 갈라져 나갑니다. git은 브랜치 하나당 worktree 하나만 허용하기 때문입니다.
-워크트리는 런타임의 작업 공간 디렉터리 안에 있으므로 일반적인 정리 주기에 따라 회수됩니다. 저장소에는 두 가지가 남습니다. 브랜치, 그리고 브랜치마다 하나씩 있는 숨은 ref(`refs/multica/local-state/` 아래)입니다. 후자는 그 브랜치의 소유자와 마지막으로 이어받을 때 사용자 디렉터리의 내용을 기록합니다. 숨은 ref는 `git branch`에 나타나지 않으며 `git for-each-ref refs/multica`로 확인할 수 있습니다. Multica는 브랜치를 지울 때 함께 지우고, 사용자가 직접 지운 브랜치의 ref는 그 저장소에서 다음 실행이 시작될 때 정리합니다. `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`로 한 번에 지울 수도 있습니다.
+</Accordion>
+<Accordion title="로컬 HEAD에 커밋한 변경은 커밋하지 않은 변경과 따로 다룹니다" id="committed-head-changes-stay-separate">
+
+실행 사이에 한 pull이나 로컬 커밋은 태스크 브랜치에 다시 적용되지 않습니다. 필요하면 그 커밋을 브랜치에 직접 병합하세요. 이전 실행이 커밋하지 않은 작업을 담아 두었다면, 그것을 새 `HEAD` 위에서 비교하려면 Git 2.40 이상이 필요합니다.
+
+그 이전 변경이 새로 커밋된 기준과 충돌하면 런타임은 경고를 기록하고, 영향을 받은 경로에만 현재 `HEAD`를 사용합니다. 나머지 초안은 계속 증분으로 비교합니다. 그래서 초안 하나를 마무리해 커밋해도 이후 실행이 막히거나, 바꾸지 않은 초안이 에이전트의 작업에 다시 제시되지 않습니다. 지금 변경과 에이전트 작업 사이의 충돌은 여전히 에이전트가 해결하도록 넘겨집니다.
+
+</Accordion>
+<Accordion title="사용자의 변경이 에이전트의 작업과 충돌하면 에이전트가 해결합니다" id="conflicts-are-resolved-by-the-agent">
+
+에이전트가 고친 것과 같은 줄을 사용자가 다시 고치면 git은 어느 쪽이 맞는지 판단할 수 없습니다. 그 실행은 충돌이 남은 워크트리에서 시작하며, 다른 무엇보다 먼저 병합을 끝내라는 지시를 받습니다(그 워크트리에서 `git status`가 병합되지 않은 파일을 보여줍니다).
+
+병합되지 않은 파일이 하나라도 남은 실행은 아무것도 전달하지 않습니다. 실행은 실패하고 워크트리는 보존되며, 다음 실행이 같은 변경을 다시 제안하므로 사용자의 변경이 조용히 사라지지 않습니다.
+
+</Accordion>
+<Accordion title="Multica 소유임이 확인된 브랜치만 이어받습니다" id="only-multica-branches-resume">
+
+이어받을지는 이름이 아니라 소유 기록으로 결정됩니다. 기록에는 어느 대화의 것인지와 함께 그 브랜치가 마지막으로 놓였던 커밋도 적혀 있습니다. 사용자가 직접 만든, 우연히 `agent/<agent>/<issue>`라는 이름의 브랜치는 체크아웃되지도, 커밋이 추가되지도, 이전 실행의 결과로 읽히지도 않습니다. 기록된 커밋을 더는 포함하지 않는 브랜치도 마찬가지여서, Multica의 브랜치를 지우고 같은 이름으로 새로 만들거나 다른 히스토리로 force-move해도 안전합니다. 그런 경우 실행은 `agent/<agent>/<issue>-<id>`를 사용합니다. 전달된 브랜치 위에 커밋하는 것은 정상적인 사용이며, 이어받기는 그대로 유지되고 사용자의 커밋은 다음 실행에 그대로 포함됩니다.
+
+모든 브랜치는 자기 자신의 베이스라인 커밋으로 시작합니다. 첫 실행이 시작한 시점의 트리를 표시하며, 나중에 브랜치를 식별하는 것이 바로 이 커밋이고 `git diff <baseline>..<branch>`가 정확히 에이전트의 작업이 됩니다.
+
+브랜치를 기록하지 못한 실행(도중에 실패했거나, 기록을 쓰지 못했거나, 사용자의 변경을 브랜치에 반영한 커밋 이전으로 워크트리를 되돌린 경우)은 실패로 보고되고 워크트리를 남깁니다. 이후 실행은 자기 것임을 증명할 수 없는 브랜치를 이어받지 않고 새 브랜치에서 시작합니다.
+
+</Accordion>
+<Accordion title="조용히 사라지는 것은 없습니다" id="nothing-is-silently-lost">
+
+에이전트가 커밋하지 않고 남긴 변경 사항은 워크트리가 제거되기 전에 해당 브랜치로 커밋되며, 실행이 도중에 실패한 경우에도 마찬가지입니다.
+
+드물게 그 커밋 자체를 할 수 없는 경우도 있습니다. 예를 들어 `commit.gpgSign`이 켜져 있는데 런타임이 서명 키를 사용할 수 없는 저장소입니다. 이때 워크트리는 의도적으로 유지되고 실행은 실패로 보고되며, 저장소에서 `git worktree list`를 실행하면 해당 변경 사항이 있는 디렉터리를 확인할 수 있습니다.
+
+</Accordion>
+<Accordion title="아무것도 변경하지 않은 실행은 아무것도 남기지 않습니다" id="no-changes-leave-nothing">
+
+해당 브랜치는 `git branch`에 빈 항목으로 남지 않고 삭제됩니다. 다만 이전 실행의 작업을 담고 있는 태스크 브랜치는 항상 유지됩니다.
+
+</Accordion>
+<Accordion title="저장소에 남는 브랜치와 숨은 ref" id="what-stays-in-your-repo">
+
+워크트리는 런타임의 작업 공간 디렉터리 안에 있으므로 [일반적인 정리 주기](/daemon-runtimes#cleanup)에 따라 회수됩니다. 저장소에는 두 가지가 남습니다. 브랜치, 그리고 브랜치마다 하나씩 있는 숨은 ref(`refs/multica/local-state/` 아래)입니다. 숨은 ref는 그 브랜치의 소유자와 마지막으로 이어받을 때 사용자 디렉터리의 내용을 기록합니다.
+
+숨은 ref는 `git branch`에 나타나지 않으며 `git for-each-ref refs/multica`로 확인할 수 있습니다. Multica는 브랜치를 지울 때 함께 지우고, 사용자가 직접 지운 브랜치의 ref는 그 저장소에서 다음 실행이 시작될 때 정리합니다. `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`로 한 번에 지울 수도 있습니다.
+
+</Accordion>
+</Accordions>
<Callout type="warn">
-**셀프 호스팅 운영자 주의:** 이 모드의 격리는 서버가 강제합니다(리소스 저장 시 한 번, 런타임이 각 실행을 가져갈 때 다시 한 번). 따라서 런타임을 언제 다운그레이드하더라도 차단됩니다. 유일하게 차단되지 않는 조합은 이 모드를 구현하지 않은 런타임이 연결된 상태에서 서버를 이 기능 이전 빌드로 롤백하는 것입니다 — 구버전 서버에는 이 게이트가 없고, 그런 런타임은 `execution_mode`를 무시한 채 실행을 원본 디렉터리에서 그대로 처리합니다. `worktree` 리소스가 존재하는 동안에는 해당 머신의 런타임이 모두 최신이 아닌 한 서버를 이 릴리스 이전으로 롤백하지 마십시오.
+**셀프 호스팅 운영자 주의:** 이 모드의 격리는 서버가 강제합니다(리소스 저장 시 한 번, 런타임이 각 실행을 가져갈 때 다시 한 번). 따라서 런타임을 언제 다운그레이드하더라도 차단됩니다. 유일하게 차단되지 않는 조합은 이 모드를 구현하지 않은 런타임이 연결된 상태에서 서버를 이 기능 이전 빌드로 롤백하는 것입니다. 구버전 서버에는 이 게이트가 없고, 그런 런타임은 `execution_mode`를 무시한 채 실행을 원본 디렉터리에서 그대로 처리합니다. `worktree` 리소스가 존재하는 동안에는 해당 머신의 런타임이 모두 최신이 아닌 한 서버를 이 릴리스 이전으로 롤백하지 마십시오.
</Callout>
-<Callout type="info">
-워크트리 모드는 git 저장소를 대상으로 합니다. git으로 관리되지 않는 일반 디렉터리는 계속 직렬로 실행됩니다 — 그것이 `in_place`의 역할입니다.
-</Callout>
+</Tab>
+</Tabs>
## 실행 중 기록되는 내용
diff --git a/apps/docs/content/docs/project-resources.mdx b/apps/docs/content/docs/project-resources.mdx
index 06540af3d8..174102d824 100644
--- a/apps/docs/content/docs/project-resources.mdx
+++ b/apps/docs/content/docs/project-resources.mdx
@@ -4,6 +4,10 @@ description: Link GitHub repositories or local directories to a project so later
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { LocalDirModeDemo } from "@/components/demos/local-dir-mode-demo";
[Project](/projects) resources tell agents which code this body of work uses and where to run. Resources stay linked to the project, so there is no need to re-paste repository URLs or local paths into every issue.
@@ -37,25 +41,42 @@ A resource's `ref` sets the branch, tag, or commit that later checkouts use by d
The UI for adding a local directory is Desktop-only, because browsers cannot pick folders on your computer.
<Callout type="warning">
-**This is an escape hatch, not a more convenient default.** `local_directory` exists for people who have no other option — the canonical case is a game project whose checkout is tens of gigabytes, where re-cloning per run is simply not viable.
+**This is for special cases; do not pick it just because it is convenient.** `local_directory` exists for people who have no other option — the canonical case is a game project whose checkout is tens of gigabytes, where re-cloning per run is simply not viable.
-If your directory is an ordinary git repo you can clone, **use `github_repo` instead**: it uses worktree mode by default, allowing unlimited concurrent runs on the same repo. A `local_directory` processes **one run at a time by default**; if the directory is a git repo you can opt into worktree mode to get concurrency back (see "How runs share the directory"). Read "When to pick" below before you commit to it.
+If your directory is an ordinary git repo you can clone, use `github_repo` instead: it uses worktree mode by default, so any number of runs on the same repo can proceed at once. A `local_directory` processes one run at a time by default; if the directory is a git repo you can opt into worktree mode to get concurrency back (see [How runs share the directory](#how-runs-share-the-directory)). If you are unsure, compare the two resource types at the top of this page.
</Callout>
+<Steps>
+<Step>
-1. Make sure Desktop's local daemon is online.
-2. Open the project's **Resources**, or the **Local directory** tab of the create-project dialog — the same choice is available before the project exists.
-3. Choose "Add local directory", then pick the folder to use.
-4. Pick how runs should use it — **Direct** or **Parallel**, described under "How runs share the directory". Desktop preselects **Parallel** when the folder is a git repository the runtime on that machine can isolate, and **Direct** otherwise. Change it right there, or later from **Resources** with the pencil next to the directory.
+Make sure Desktop's local daemon is online.
-Preselection applies only to a directory you are linking now. A directory linked earlier keeps the mode it was saved with — an existing setup is never switched under you.
+</Step>
+<Step>
+
+Open the project's **Resources**, or the **Local directory** tab of the create-project dialog. The same choice is available there before the project exists.
+
+</Step>
+<Step>
+
+Choose "Add local directory", then pick the folder to use.
+
+</Step>
+<Step>
+
+Pick how runs should use it: **Direct** or **Parallel**, described under [How runs share the directory](#how-runs-share-the-directory). Desktop preselects **Parallel** when the folder is a git repository the runtime on that machine can isolate, and **Direct** otherwise. Change it right there, or later from **Resources** with the pencil next to the directory.
+
+</Step>
+</Steps>
+
+Preselection applies only to a directory you are linking now. A directory linked earlier keeps the mode it was saved with, so an existing setup is never switched under you.
The directory must be an absolute path, must already exist, and must be readable and writable by the current daemon. These paths are rejected: system roots and drive roots (`/`, `C:\`), home directories themselves and the parents of home directories (such as `/Users`, `/home`, `/root`), and system directories such as `/etc`, `/var`, `/tmp`, `/usr`, and `/opt`. If the chosen path is a symlink, it is resolved to its real path first and validated again by the same rules; the serial lock also applies to the real path.
Each project can link at most one local directory per daemon. Different computers on a team can each link their own directory for the same project.
<Callout type="warning">
-In the default `in_place` mode a local directory is not an isolated environment: the agent directly sees and modifies your current branch and uncommitted files, and Multica does not automatically switch branches, stash, commit, push, or open PRs. Worktree mode changes this — see "How runs share the directory" below.
+In the default `in_place` mode a local directory is not an isolated environment: the agent directly sees and modifies your current branch and uncommitted files, and Multica does not automatically switch branches, stash, commit, push, or open PRs. Worktree mode is different — see [How runs share the directory](#how-runs-share-the-directory) below.
</Callout>
<span id="how-tasks-share-the-directory" />
@@ -64,38 +85,102 @@ In the default `in_place` mode a local directory is not an isolated environment:
A local directory has two execution modes, set per resource with `execution_mode`. Desktop labels them **Direct** and **Parallel**; the API, the CLI and the rest of this page use the identifiers.
-### `in_place` (default) — "Direct"
+<LocalDirModeDemo />
+
+<Tabs items={["in_place (Direct, default)", "worktree (Parallel)"]}>
+<Tab value="in_place (Direct, default)" id="in-place">
The agent works directly in your directory, and runs execute one at a time. When two runs use the same real directory, the later one enters `waiting_local_directory` and continues after the earlier one releases the directory. Two paths that reach the same directory through different symlinks serialize the same way.
Waiting does not modify the directory. A waiting run can be cancelled; otherwise it waits until the directory becomes available.
-### `worktree` — "Parallel"
+A plain non-git directory can only use this mode: worktree mode covers git repositories.
+
+</Tab>
+<Tab value="worktree (Parallel)" id="worktree">
+
+Each run gets its own [git worktree](https://git-scm.com/docs/git-worktree) of your repo, created inside the runtime's own workspace directory. Runs on the same directory run concurrently without waiting, and none of them write to your working copy.
-Each run gets its own [git worktree](https://git-scm.com/docs/git-worktree) of your repo, created inside the runtime's own workspace directory. **Runs on the same directory run concurrently — none of them wait**, and none of them write to your working copy.
+The directory must be a git repository with at least one commit; if it is not, runs fail with an explicit error rather than quietly falling back to serial execution.
-Requires the directory to be a git repository with at least one commit. If it is not, runs fail with an explicit error rather than quietly falling back to serial execution. The runtime on that machine must also implement the mode. It declares that when it connects, and Multica gates on the declaration rather than on a version number — a development build can carry a version string that looks new enough while having none of the implementation. The declaration is checked twice: saving the resource is refused, with a hint to update the app on that machine, while its runtime does not declare the capability; and each run is checked again against the runtime that actually claims it — so a machine downgraded after the resource was saved has its runs cancelled with a reason instead of silently running them in place. Asking for `worktree` is asking for isolation; editing your working copy instead is never the fallback.
+The runtime on that machine must also implement the mode. It declares that when it connects, and Multica gates on the declaration rather than on a version number: a development build can carry a version string that looks new enough while having none of the implementation. The declaration is checked twice. Saving the resource is refused, with a hint to update the app on that machine, while its runtime does not declare the capability; and each run is checked again against the runtime that actually claims it, so a machine downgraded after the resource was saved has its runs cancelled with a reason instead of silently running them in place. Asking for `worktree` is asking for isolation; Multica never falls back to editing your working copy.
What the agent sees, and what you get back:
-- **The agent starts from what you see, not from `HEAD`.** Your uncommitted edits and your untracked files are replayed into the worktree, so the agent is not reviewing code you no longer have. Your own working copy, index, and stash list are never touched. If that state cannot be reproduced faithfully — including when there is more untracked content than the replay covers (2000 files / 200 MiB) — the run fails instead of starting from a tree you would not recognise. The usual fix is to gitignore or clean up build output that is not already ignored.
-- **The result is a branch in your repo**, one per issue rather than one per run: `agent/<agent>/<issue>` (a chat gets `agent/<agent>/chat-<session>`). The run's **Run details** panel shows the branch name (and lets you copy it); you can also find it with `git branch`. Review it with `git log` / `git diff`, and merge or cherry-pick it yourself. Multica never merges it for you. A run that failed partway still reports its branch, because it still committed whatever the agent had produced.
-- **A follow-up continues where the last run stopped.** The next comment on the same issue checks that branch out again, so the agent is standing on the work it just delivered instead of starting from `HEAD` with its own changes stranded on another branch. Only what you changed in your own directory since the last run is replayed on top — the branch already carries the rest. Merge the branch and the next run starts from your `HEAD` again. If two runs on one issue overlap, the second one forks from the first's work onto `agent/<agent>/<issue>-<task>`, because git allows one worktree per branch.
-- **Committed updates to your local `HEAD` are kept separate from uncommitted edits.** A pull or local commit between turns is not replayed onto the issue branch; merge those commits into it explicitly when needed. If the previous run captured uncommitted work, comparing it on the new `HEAD` requires Git 2.40 or later. If those older edits conflict with the new committed baseline, the runtime logs a warning and uses the current `HEAD` only for the affected paths; other drafts keep their incremental comparison. Finishing and committing one draft therefore does not block future runs or re-propose your unchanged drafts against the agent's work. Any conflict between your current edits and the agent's work is still offered to the agent to resolve.
-- **If your edits collide with the agent's, the agent resolves them.** When you rewrite the same lines the agent rewrote, git cannot decide which version wins, so the run starts on a conflicted worktree and is told to finish the merge before anything else — `git status` in that worktree lists the unmerged paths. A run that leaves any file unmerged delivers nothing: it fails, keeps the worktree, and the next run offers the same edits again, so your change is never quietly dropped.
-- **Only branches Multica owns are continued.** Continuing a branch is decided by an ownership record, not by its name: the record names the conversation, and it names the commit the branch was left at. A branch you created yourself that happens to be called `agent/<agent>/<issue>` is never checked out, appended to, or read as a previous run — and neither is one that no longer contains the recorded commit, so deleting Multica's branch and making your own under that name, or force-moving it onto other history, is safe. In those cases the run takes `agent/<agent>/<issue>-<id>` instead. Committing on top of a delivered branch is the normal case and keeps it continuing — your commit is simply there in the next run. Every branch also starts with a baseline commit of its own, marking the tree the first run began from — that commit is what identifies the branch later, and `git diff <baseline>..<branch>` is exactly the agent's work. A run that could not record its branch — it failed before finishing, the record could not be written, or it reset its worktree past the commit that carried your edits into the branch — reports failure and keeps its worktree, and later runs start a new branch rather than continuing one they cannot prove is theirs.
-- **Nothing is silently dropped.** Anything the agent leaves uncommitted is committed to that branch before the worktree is removed, including when the run fails partway. In the rare case that commit itself cannot be made — for example a repo with `commit.gpgSign` and no signing key available to the runtime — the worktree is deliberately kept instead of removed, the run is reported as failed, and `git worktree list` in your repo points at the directory holding the work.
-- **A run that changes nothing leaves nothing behind.** Its branch is deleted rather than left as an empty entry in `git branch` — unless it is the issue's branch carrying earlier runs' work, which always survives.
+<Accordions type="multiple">
+<Accordion title="The agent starts from what you see, not from HEAD" id="starts-from-your-working-state">
+
+Your uncommitted edits and your untracked files are replayed into the worktree, so the agent is not reviewing code you no longer have. Your own working copy, index, and stash list are never touched.
+
+If that state cannot be reproduced faithfully, including when there is more untracked content than the replay covers (2000 files / 200 MiB), the run fails instead of starting from a tree you would not recognise. The usual fix is to gitignore or clean up build output that is not already ignored.
+
+</Accordion>
+<Accordion title="The result is a branch in your repo" id="result-is-a-branch">
+
+There is one branch per issue rather than one per run: `agent/<agent>/<issue>` (a chat gets `agent/<agent>/chat-<session>`). The run's **Run details** panel shows the branch name (and lets you copy it); you can also find it with `git branch`. Review it with `git log` / `git diff`, and merge or cherry-pick it yourself. Multica never merges it for you.
+
+`<agent>` comes from the agent's name: lowercased, with everything other than a–z and 0–9 turned into `-`, up to 30 characters. A name with no Latin letters or digits becomes `agent`. So Ops helper working on OPS-21 gets `agent/ops-helper/ops-21`, while an agent named 运营助手 gets `agent/agent/ops-21`. `<issue>` is the issue identifier in lowercase.
+
+A run that failed partway still reports its branch, because it still committed whatever the agent had produced.
+
+</Accordion>
+<Accordion title="A follow-up continues where the last run stopped" id="follow-ups-continue-the-branch">
+
+The next comment on the same issue checks that branch out again, so the agent is standing on the work it just delivered instead of starting from `HEAD` with its own changes stranded on another branch. Only what you changed in your own directory since the last run is replayed on top; the branch already carries the rest. Merge the branch and the next run starts from your `HEAD` again.
+
+If two runs on one issue overlap, the second one forks from the first's work onto `agent/<agent>/<issue>-<task>`, because git allows one worktree per branch.
-Because the worktree lives in the runtime's workspace directory, it is reclaimed on the normal cleanup schedule. Two things persist in your repo: the branch, and one hidden ref per branch under `refs/multica/local-state/` recording who owns it and what your directory looked like when it was last continued. The hidden refs never appear in `git branch`; list them with `git for-each-ref refs/multica`. Multica deletes each one with its branch, and drops any whose branch you deleted yourself the next time a run starts on that repo — or you can remove them at once with `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`.
+</Accordion>
+<Accordion title="Commits to your local HEAD stay separate from uncommitted edits" id="committed-head-changes-stay-separate">
+
+A pull or local commit between turns is not replayed onto the issue branch; merge those commits into it explicitly when needed. If the previous run captured uncommitted work, comparing it on the new `HEAD` requires Git 2.40 or later.
+
+If those older edits conflict with the new committed baseline, the runtime logs a warning and uses the current `HEAD` only for the affected paths; other drafts keep their incremental comparison. Finishing and committing one draft therefore does not block future runs or re-propose your unchanged drafts against the agent's work. Any conflict between your current edits and the agent's work is still offered to the agent to resolve.
+
+</Accordion>
+<Accordion title="If your edits collide with the agent's, the agent resolves them" id="conflicts-are-resolved-by-the-agent">
+
+When you rewrite the same lines the agent rewrote, git cannot decide which version wins, so the run starts on a conflicted worktree and is told to finish the merge before anything else (`git status` in that worktree lists the unmerged paths).
+
+A run that leaves any file unmerged delivers nothing: it fails, keeps the worktree, and the next run offers the same edits again, so your change is never quietly dropped.
+
+</Accordion>
+<Accordion title="Only branches Multica owns are continued" id="only-multica-branches-resume">
+
+Continuing a branch is decided by an ownership record, not by its name: the record names the conversation, and it names the commit the branch was left at. A branch you created yourself that happens to be called `agent/<agent>/<issue>` is never checked out, appended to, or read as a previous run, and neither is one that no longer contains the recorded commit. So deleting Multica's branch and making your own under that name, or force-moving it onto other history, is safe; the run takes `agent/<agent>/<issue>-<id>` instead. Committing on top of a delivered branch is the normal case and keeps it continuing: your commit is simply there in the next run.
+
+Every branch also starts with a baseline commit of its own, marking the tree the first run began from. That commit is what identifies the branch later, and `git diff <baseline>..<branch>` is exactly the agent's work.
+
+A run that could not record its branch — it failed before finishing, the record could not be written, or it reset its worktree past the commit that carried your edits into the branch — reports failure and keeps its worktree, and later runs start a new branch rather than continuing one they cannot prove is theirs.
+
+</Accordion>
+<Accordion title="Nothing is silently dropped" id="nothing-is-silently-lost">
+
+Anything the agent leaves uncommitted is committed to that branch before the worktree is removed, including when the run fails partway.
+
+In the rare case that commit itself cannot be made — for example a repo with `commit.gpgSign` and no signing key available to the runtime — the worktree is deliberately kept, the run is reported as failed, and `git worktree list` in your repo points at the directory holding the work.
+
+</Accordion>
+<Accordion title="A run that changes nothing leaves nothing behind" id="no-changes-leave-nothing">
+
+Its branch is deleted rather than left as an empty entry in `git branch`, unless it is the issue's branch carrying earlier runs' work, which always survives.
+
+</Accordion>
+<Accordion title="The branch and hidden ref left in your repo" id="what-stays-in-your-repo">
+
+The worktree lives in the runtime's workspace directory and is reclaimed on [the normal cleanup schedule](/daemon-runtimes#cleanup). Two things persist in your repo: the branch, and one hidden ref per branch under `refs/multica/local-state/` recording who owns it and what your directory looked like when it was last continued.
+
+The hidden refs never appear in `git branch`; list them with `git for-each-ref refs/multica`. Multica deletes each one with its branch, and drops any whose branch you deleted yourself the next time a run starts on that repo. You can also remove them at once with `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d`.
+
+</Accordion>
+</Accordions>
<Callout type="warn">
-**Self-hosted operators:** isolation for this mode is enforced by the server (at save time and again when a runtime claims each run), so a runtime downgraded at any point is caught. The combination that is *not* caught is rolling the server back to a build that predates this feature while runtimes that do not implement the mode are still connected — an old server has no gate, and such a runtime ignores `execution_mode` and would execute the run in place. Do not roll the server back past this release while `worktree` resources exist unless every runtime on those machines is up to date.
+**Self-hosted operators:** isolation for this mode is enforced by the server (at save time and again when a runtime claims each run), so a runtime downgraded at any point is caught. The combination that is *not* caught is rolling the server back to a build that predates this feature while runtimes that do not implement the mode are still connected: an old server has no gate, and such a runtime ignores `execution_mode` and would execute the run in place. Do not roll the server back past this release while `worktree` resources exist unless every runtime on those machines is up to date.
</Callout>
-<Callout type="info">
-Worktree mode covers git repositories. A plain non-git directory still runs serially — that is what `in_place` is for.
-</Callout>
+</Tab>
+</Tabs>
## What gets written during a run
diff --git a/apps/docs/content/docs/project-resources.zh.mdx b/apps/docs/content/docs/project-resources.zh.mdx
index f841f02e32..e1e6a759e1 100644
--- a/apps/docs/content/docs/project-resources.zh.mdx
+++ b/apps/docs/content/docs/project-resources.zh.mdx
@@ -4,6 +4,10 @@ description: 为项目关联 GitHub 仓库或本地目录,让后续执行获
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
+import { LocalDirModeDemo } from "@/components/demos/local-dir-mode-demo";
[项目](/projects)资源告诉智能体这组工作会用到哪些代码,以及在哪里执行。资源会持续关联在项目上,不必在每条任务中重复粘贴仓库地址或本地路径。
@@ -37,25 +41,42 @@ import { Callout } from "fumadocs-ui/components/callout";
添加本地目录的界面只在 Desktop 中提供,因为浏览器不能选择电脑上的文件夹。
<Callout type="warning">
-**这是逃生舱,不是更方便的默认项。** `local_directory` 是给那些"不得不这么开发"的人准备的 —— 典型是一个 checkout 就几十 GB 的游戏项目,不可能每来一次运行就重新 clone 一份。
+**这是特殊情况下的选项,不要因为方便就选它。** `local_directory` 是给那些"不得不这么开发"的人准备的,典型是一个 checkout 就几十 GB 的游戏项目,不可能每来一次运行就重新 clone 一份。
-如果你的目录只是一个能正常 clone 的普通 git 仓库,**请用 `github_repo`**:它默认走 worktree 模式,同一个仓库上的运行可以无限并发。`local_directory` **默认同一时间只进行一次运行**;如果这个目录本身是 git 仓库,可以主动开启 worktree 模式把并发拿回来(见“运行如何共享这个目录”)。先看上面的两种资源对照再决定。
+如果你的目录只是一个能正常 clone 的普通 git 仓库,请用 `github_repo`:它默认走 worktree 模式,同一个仓库上的运行可以同时进行,数量不受限制。`local_directory` 默认同一时间只进行一次运行;如果这个目录本身是 git 仓库,可以主动开启 worktree 模式恢复并发(见[运行如何共享这个目录](#运行如何共享这个目录))。拿不准时,先对照页首的两种资源。
</Callout>
+<Steps>
+<Step>
-1. 确认 Desktop 的本地守护进程在线。
-2. 打开项目的 **资源**,或者创建项目对话框里的 **本地目录** 标签页 —— 项目还没建出来时也能做同样的选择。
-3. 选择"添加本地目录",再选择要使用的文件夹。
-4. 选择运行如何使用它 —— **原地** 还是 **并行**,两者的区别见"运行如何共享这个目录"。如果这个文件夹是 git 仓库、并且那台机器上的运行时能做隔离,Desktop 会预选 **并行**,否则预选 **原地**。当场可以改,之后也可以在 **资源** 里点目录旁边的铅笔图标改。
+确认 Desktop 的本地守护进程在线。
-预选只作用于你此刻正在关联的目录。之前关联好的目录仍然保持保存时的模式 —— 已有的配置不会在你不知情的情况下被切换。
+</Step>
+<Step>
+
+打开项目的 **资源**,或者创建项目对话框里的 **本地目录** 标签页。项目还没建出来时,也能在这里做同样的选择。
+
+</Step>
+<Step>
+
+选择"添加本地目录",再选择要使用的文件夹。
+
+</Step>
+<Step>
+
+选择运行如何使用它:**原地** 还是 **并行**,区别见[运行如何共享这个目录](#运行如何共享这个目录)。如果这个文件夹是 git 仓库、并且那台机器上的运行时能做隔离,Desktop 会预选 **并行**,否则预选 **原地**。当场可以改,之后也可以在 **资源** 里点目录旁边的铅笔图标改。
+
+</Step>
+</Steps>
+
+预选只作用于你此刻正在关联的目录。之前关联好的目录仍然保持保存时的模式,已有配置不会在你不知情时被切换。
目录必须是绝对路径,已经存在,并且当前守护进程可以读取和写入。以下路径会被拒绝:系统根目录和盘符根(`/`、`C:\`)、用户主目录本身及各主目录的上级(如 `/Users`、`/home`、`/root`),以及 `/etc`、`/var`、`/tmp`、`/usr`、`/opt` 等系统目录。如果所选路径是符号链接,会先解析为真实路径再按同样的规则校验一次,串行锁也按真实路径生效。
每个项目在同一台守护进程上最多关联一个本地目录。团队中的不同电脑可以分别为同一个项目关联各自的目录。
<Callout type="warning">
-在默认的 `in_place` 模式下,本地目录不是隔离环境:智能体会直接看到并修改当前分支和未提交的文件,Multica 也不会自动切换分支、stash、commit、push 或创建 PR。worktree 模式会改变这一点 —— 见下面的“运行如何共享这个目录”。
+在默认的 `in_place` 模式下,本地目录不是隔离环境:智能体会直接看到并修改当前分支和未提交的文件,Multica 也不会自动切换分支、stash、commit、push 或创建 PR。worktree 模式不一样,见下面的[运行如何共享这个目录](#运行如何共享这个目录)。
</Callout>
<span id="task-如何共享这个目录" />
@@ -65,37 +86,102 @@ import { Callout } from "fumadocs-ui/components/callout";
本地目录有两种执行模式,按资源逐个设置。在资源面板里可以直接切换,CLI 用 `--execution-mode`。Desktop 里这两种模式显示为 **原地** 和 **并行**;API、CLI 和本页其余部分都使用标识符。
-### `in_place`(默认)—— “原地”
+<LocalDirModeDemo />
+
+<Tabs items={["in_place(原地,默认)", "worktree(并行)"]}>
+<Tab value="in_place(原地,默认)" id="in-place">
智能体直接在你的目录里工作,同一时间只进行一次运行。两次运行使用同一个真实目录时,后到的运行进入 `waiting_local_directory`,等前一次释放目录后继续。两个路径经不同符号链接指向同一目录时,同样串行。
等待不会修改目录。等待中的运行可以取消,否则会一直等到目录可用。
-### `worktree` —— “并行”
+普通的非 git 目录只能用这种模式:worktree 模式只面向 git 仓库。
+
+</Tab>
+<Tab value="worktree(并行)" id="worktree">
+
+每次运行拿到你仓库的一个独立 [git worktree](https://git-scm.com/docs/git-worktree),建在运行时自己的工作区目录里。同一目录上的运行并发执行,谁都不用排队,也都不会写你的工作副本。
-每次运行拿到你仓库的一个独立 [git worktree](https://git-scm.com/docs/git-worktree),建在运行时自己的工作区目录里。**同一目录上的运行并发执行,谁都不用排队**,并且都不会写你的工作副本。
+这个目录必须是至少有一次提交的 git 仓库;不满足时运行会明确报错,不会悄悄退回串行。
-要求这个目录是一个至少有一次提交的 git 仓库。如果不是,运行会明确报错,而不是悄悄退回串行。那台机器上的运行时也必须实现了该模式。运行时在连接时会声明这项能力,Multica 判断的是这个声明而不是版本号 —— 一个开发构建完全可能带着看起来足够新的版本号,却根本没有对应的实现。这个声明会被检查两次:只要那台机器的运行时没有声明该能力,保存资源就会被拒绝,并提示去升级那台机器上的 App;每次运行在被真正领取时还会再按领取它的运行时检查一次 —— 所以资源保存之后才降级的机器,其运行会被带原因取消,而不是悄悄原地跑掉。选择 `worktree` 就是在要求隔离,把它换成“直接改你的工作副本”永远不是兜底方案。
+那台机器上的运行时也必须实现了该模式。运行时在连接时会声明这项能力,Multica 只看这个声明,不看版本号:一个开发构建完全可能带着看起来足够新的版本号,却没有对应的实现。这个声明会被检查两次。保存资源时,只要那台机器的运行时没有声明该能力,保存就会被拒绝,并提示去升级那台机器上的 App;每次运行被真正领取时,还会按领取它的运行时再检查一次,所以资源保存之后才降级的机器,其运行会被带原因取消,不会悄悄在原目录里跑掉。选择 `worktree` 就是在要求隔离,Multica 不会拿"直接改你的工作副本"来兜底。
智能体看到什么、你拿回什么:
-- **智能体从你眼前的状态开始,而不是从 `HEAD` 开始。** 你未提交的改动和未跟踪的文件会被回放进 worktree,所以它不会去 review 一份你已经不用的代码。你自己的工作副本、暂存区和 stash 列表都不会被动到。如果这个状态无法忠实还原 —— 包括未跟踪内容超出回放上限(2000 个文件 / 200 MiB)—— 运行会直接失败,而不是从一棵你认不出来的树开始。通常的解决办法是把还没被忽略的构建产物加进 gitignore 或清理掉。
-- **结果是你仓库里的一个分支**,按任务而不是按每次执行来分:`agent/<agent>/<issue>`(chat 则是 `agent/<agent>/chat-<session>`)。本次运行的**详情**面板里会显示分支名(可直接复制),也可以用 `git branch` 找到它。用 `git log` / `git diff` review,然后自己决定 merge 还是 cherry-pick。Multica 不会替你合并。中途失败的运行同样会报告它的分支,因为它已经把智能体做出来的部分提交进去了。
-- **后续对话接着上一轮继续。** 同一个任务的下一条评论会重新 check out 这个分支,智能体站在自己刚交付的成果上继续做,而不是从 `HEAD` 重新开始、把上一轮的改动落在另一个分支上。只有你在上一轮之后改动的部分会被重放上去 —— 其余部分分支里已经有了。把分支 merge 掉之后,下一轮又会从你的 `HEAD` 重新开始。同一个任务上有两次执行重叠时,后一个会从前一个的成果分叉到 `agent/<agent>/<issue>-<task>`,因为 git 规定一个分支只能有一棵 worktree。
-- **你的改动和智能体的成果冲突时,由智能体来解决。** 如果你重写了智能体也重写过的那几行,git 无法判断谁对,这一轮就会在一棵带冲突的 worktree 上启动,并被要求先把 merge 做完(在那棵 worktree 里 `git status` 会列出未合并的文件)。只要还有文件没合完,这一轮就什么都不交付:运行失败、worktree 保留,下一轮会再次把同样的改动送上来,所以你的修改不会被悄悄丢掉。
-- **只有 Multica 自己的分支才会被续接。** 是否续接由归属记录决定,而不是看名字:记录里既写了属于哪个会话,也写了这条分支当时停在哪个 commit。你自己建的、恰好叫 `agent/<agent>/<issue>` 的分支永远不会被 check out、被追加提交,也不会被当成上一轮的成果读取;已经不包含记录中那个 commit 的分支同样如此 —— 所以你把 Multica 的分支删掉再自己建一条同名的,或者把它 force-move 到别的历史上,都是安全的,运行会改用 `agent/<agent>/<issue>-<id>`。在已交付的分支上继续提交则是正常用法,续接照常,你的提交下一轮就在那里。每条分支还会以一个属于自己的 baseline commit 开头,标记第一轮开始时的目录状态 —— 后续正是靠这个 commit 来辨认这条分支,同时 `git diff <baseline>..<branch>` 恰好就是智能体做的改动。如果某一轮没能记录它的分支 —— 中途失败、记录写不进去,或者把 worktree reset 到了「把你的改动带进分支的那个 commit」之前 —— 这一轮会报失败并保留 worktree,后续几轮会另起一条分支,而不是去续接一条无法证明归属的分支。
-- **不会静默丢东西。** 智能体留下的未提交改动,会在 worktree 被移除前提交到那个分支上,**运行中途失败时同样如此**。极少数情况下连这次提交都做不了 —— 例如仓库开了 `commit.gpgSign` 而运行时拿不到签名密钥 —— worktree 会被刻意保留而不是删除,运行标记为失败,并且在你仓库里执行 `git worktree list` 就能看到存放这些改动的目录。
-- **没有产生改动的运行不留下任何东西。** 它的分支会被删除,而不是作为一个空条目留在 `git branch` 里;但如果这是承载了之前几轮成果的任务分支,它一定会保留。
+<Accordions type="multiple">
+<Accordion title="智能体从你眼前的状态开始,不是从 HEAD 开始" id="starts-from-your-working-state">
+
+你未提交的改动和未跟踪的文件会被回放进 worktree,所以它不会去 review 一份你已经不用的代码。你自己的工作副本、暂存区和 stash 列表都不会被动到。
+
+如果这个状态无法忠实还原,包括未跟踪内容超出回放上限(2000 个文件 / 200 MiB),运行会直接失败,不会从一棵你认不出来的树开始。通常的解决办法是把还没被忽略的构建产物加进 gitignore 或清理掉。
+
+</Accordion>
+<Accordion title="结果是你仓库里的一个分支" id="result-is-a-branch">
+
+分支按任务而不是按每次执行来分:`agent/<agent>/<issue>`(chat 则是 `agent/<agent>/chat-<session>`)。本次运行的**详情**面板里会显示分支名(可直接复制),也可以用 `git branch` 找到它。用 `git log` / `git diff` review,然后自己决定 merge 还是 cherry-pick,Multica 不会替你合并。
+
+`<agent>` 由智能体名字得来:转成小写后只保留英文字母和数字,其余字符换成 `-`,最长 30 个字符;名字里没有英文字母和数字时写作 `agent`。所以"运营助手"处理 OPS-21 时,分支是 `agent/agent/ops-21`。`<issue>` 是小写的任务编号。
+
+中途失败的运行同样会报告它的分支,因为它已经把智能体做出来的部分提交进去了。
+
+</Accordion>
+<Accordion title="后续对话接着上一轮继续" id="follow-ups-continue-the-branch">
+
+同一个任务的下一条评论会重新 check out 这个分支,智能体站在自己刚交付的成果上继续做,不会从 `HEAD` 重新开始、把上一轮的改动落在另一个分支上。只有你在上一轮之后改动的部分会被重放上去,其余部分分支里已经有了。把分支 merge 掉之后,下一轮又会从你的 `HEAD` 重新开始。
+
+同一个任务上有两次执行重叠时,后一个会从前一个的成果分叉到 `agent/<agent>/<issue>-<task>`,因为 git 规定一个分支只能有一棵 worktree。
-由于 worktree 位于运行时的工作区目录内,它会按正常的清理周期回收。留在你仓库里的有两样东西:分支,以及每条分支对应的一个隐藏 ref(在 `refs/multica/local-state/` 下),记录这条分支归谁所有、以及上次续接时你目录里的内容。隐藏 ref 不会出现在 `git branch` 里,可以用 `git for-each-ref refs/multica` 查看。Multica 删除分支时会一并删掉它;你自己删掉的分支所对应的 ref,会在下一次该仓库上有运行开始时被清理 —— 也可以用 `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d` 一次性清掉。
+</Accordion>
+<Accordion title="提交到本地 HEAD 的改动和未提交的改动分开处理" id="committed-head-changes-stay-separate">
+
+两轮之间在本地做的 pull 或提交不会重放到任务分支上,需要时把这些提交明确 merge 进去。上一轮记下了未提交的改动时,要在新的 `HEAD` 上比较这些改动,需要 Git 2.40 或更高版本。
+
+这些旧改动和新的已提交基线冲突时,运行时会记一条警告,只对受影响的路径改用当前 `HEAD`;其他草稿照常增量比较。所以把其中一份草稿完成并提交,不会阻塞之后的运行,也不会把你没动过的草稿再次拿去和智能体的成果比较。你当前的改动和智能体的成果之间若有冲突,仍然交给智能体解决。
+
+</Accordion>
+<Accordion title="你的改动和智能体的成果冲突时,由智能体来解决" id="conflicts-are-resolved-by-the-agent">
+
+如果你重写了智能体也重写过的那几行,git 无法判断谁对,这一轮就会在一棵带冲突的 worktree 上启动,并被要求先把 merge 做完(在那棵 worktree 里 `git status` 会列出未合并的文件)。
+
+只要还有文件没合完,这一轮就什么都不交付:运行失败、worktree 保留,下一轮会再次把同样的改动送上来,你的修改不会被悄悄丢掉。
+
+</Accordion>
+<Accordion title="只有 Multica 自己的分支才会被续接" id="only-multica-branches-resume">
+
+是否续接由归属记录决定,跟分支名无关:记录里既写了属于哪个会话,也写了这条分支当时停在哪个 commit。你自己建的、恰好叫 `agent/<agent>/<issue>` 的分支永远不会被 check out、被追加提交,也不会被当成上一轮的成果读取;已经不包含记录中那个 commit 的分支同样如此。所以把 Multica 的分支删掉再自己建一条同名的,或者把它 force-move 到别的历史上,都是安全的,运行会改用 `agent/<agent>/<issue>-<id>`。在已交付的分支上继续提交则是正常用法,续接照常,你的提交下一轮就在那里。
+
+每条分支还会以一个属于自己的 baseline commit 开头,标记第一轮开始时的目录状态。后续正是靠这个 commit 辨认这条分支,`git diff <baseline>..<branch>` 也恰好就是智能体做的改动。
+
+如果某一轮没能记录它的分支,比如中途失败、记录写不进去,或者把 worktree reset 到了"把你的改动带进分支的那个 commit"之前,这一轮会报失败并保留 worktree,后续几轮会另起一条分支,不去续接一条无法证明归属的分支。
+
+</Accordion>
+<Accordion title="不会静默丢东西" id="nothing-is-silently-lost">
+
+智能体留下的未提交改动,会在 worktree 被移除前提交到那个分支上,运行中途失败时同样如此。
+
+极少数情况下连这次提交都做不了,例如仓库开了 `commit.gpgSign` 而运行时拿不到签名密钥。这时 worktree 会被刻意保留,运行标记为失败,在你仓库里执行 `git worktree list` 就能看到存放这些改动的目录。
+
+</Accordion>
+<Accordion title="没有产生改动的运行不留下任何东西" id="no-changes-leave-nothing">
+
+它的分支会被删除,不会作为一个空条目留在 `git branch` 里;但如果这是承载了之前几轮成果的任务分支,它一定会保留。
+
+</Accordion>
+<Accordion title="留在你仓库里的分支和隐藏 ref" id="what-stays-in-your-repo">
+
+worktree 位于运行时的工作区目录内,会按[正常的清理周期](/daemon-runtimes#cleanup)回收。留在你仓库里的有两样东西:分支,以及每条分支对应的一个隐藏 ref(在 `refs/multica/local-state/` 下),记录这条分支归谁所有、以及上次续接时你目录里的内容。
+
+隐藏 ref 不会出现在 `git branch` 里,可以用 `git for-each-ref refs/multica` 查看。Multica 删除分支时会一并删掉它;你自己删掉的分支所对应的 ref,会在下一次该仓库上有运行开始时被清理。也可以用 `git for-each-ref --format='%(refname)' refs/multica | xargs -n1 git update-ref -d` 一次性清掉。
+
+</Accordion>
+</Accordions>
<Callout type="warn">
-**自托管运维注意:** 该模式的隔离由服务端强制(保存资源时检查一次,运行时每次领取执行时再检查一次),所以无论何时降级运行时都会被拦住。唯一拦不住的组合是:把服务端回滚到本功能之前的版本,同时还连着没有实现该模式的运行时 —— 旧服务端没有这道门禁,而这样的运行时会忽略 `execution_mode`、直接在原目录里执行。只要还存在 `worktree` 资源,就不要把服务端回滚到本版本之前,除非那些机器上的运行时全部升级到位。
+**自托管运维注意:** 该模式的隔离由服务端强制(保存资源时检查一次,运行时每次领取执行时再检查一次),所以无论何时降级运行时都会被拦住。唯一拦不住的组合是:把服务端回滚到本功能之前的版本,同时还连着没有实现该模式的运行时。旧服务端没有这道门禁,而这样的运行时会忽略 `execution_mode`、直接在原目录里执行。只要还存在 `worktree` 资源,就不要把服务端回滚到本版本之前,除非那些机器上的运行时全部升级到位。
</Callout>
-<Callout type="info">
-worktree 模式面向 git 仓库。普通的非 git 目录仍然串行执行 —— 这正是 `in_place` 的用途。
-</Callout>
+</Tab>
+</Tabs>
## 执行期间写入的内容
diff --git a/apps/docs/content/docs/projects.fr.mdx b/apps/docs/content/docs/projects.fr.mdx
index 8d5d556c88..5fc5c19860 100644
--- a/apps/docs/content/docs/projects.fr.mdx
+++ b/apps/docs/content/docs/projects.fr.mdx
@@ -4,6 +4,7 @@ description: Organisez les tâches liées en projets et donnez-leur un objectif,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProjectDemo } from "@/components/demos/project-demo";
Les projets organisent un travail qui nécessite plusieurs [tâches](/issues) — un lancement de produit, une migration ou une fonctionnalité livrée par étapes.
@@ -22,8 +23,6 @@ Un travail qu'une seule tâche suffit à décrire n'a pas besoin de projet. Les
| **Ressources** | Dépôts GitHub rattachés ou répertoires locaux sur des ordinateurs précis. |
| **Workflow** | Les étapes des tâches et qui prend le relais à chacune. |
-![Détail d'un projet : tâches regroupées par statut, avancement et description du projet](/images/docs/project-detail.webp)
-
## Projets et tâches
Un projet peut contenir un nombre quelconque de tâches ; une tâche appartient à un projet au plus. Créez des tâches directement dans le projet, ou choisissez ou changez le projet depuis les propriétés de la tâche.
@@ -31,14 +30,18 @@ Un projet peut contenir un nombre quelconque de tâches ; une tâche appartient
L'avancement du projet est calculé automatiquement à partir des tâches liées :
```text
-avancement = tâches en done ou cancelled ÷ toutes les tâches du projet
+avancement = tâches dont le statut appartient à la catégorie done ou closed ÷ toutes les tâches du projet
```
-`cancelled` signifie que ce travail a été retiré du périmètre du projet ; il compte donc dans l'avancement. Le statut du projet et celui des tâches sont indépendants : terminer toutes les tâches ne fait pas passer automatiquement le projet à `completed`, et modifier le statut du projet ne modifie pas ses tâches en masse.
+Parmi les statuts intégrés, ce sont `done` et `cancelled` ; les statuts personnalisés rangés dans ces deux catégories comptent de la même façon. `cancelled` signifie que ce travail a été retiré du périmètre du projet, il compte donc dans l'avancement.
+
+Le statut du projet et celui des tâches sont indépendants : terminer toutes les tâches ne fait pas passer le projet à `completed`, et modifier le statut du projet ne touche pas à ses tâches.
+
+<ProjectDemo />
## Description du projet et contexte d'exécution
-Lorsqu'un agent traite une tâche d'un projet, le nom et la description du projet sont ajoutés au contexte de cette exécution. La description est l'endroit où placer les informations dont toutes les tâches liées ont besoin : l'objectif, les limites techniques, les conventions de livraison. Les exigences propres à une seule tâche ont leur place dans cette tâche.
+Lorsqu'un agent traite une tâche d'un projet, le nom et la description du projet sont ajoutés au contexte de cette exécution. Placez dans la description ce que toutes les exécutions liées doivent savoir : l'objectif, les limites techniques, les conventions de livraison. Une exigence propre à une seule tâche s'écrit dans cette tâche.
## Ajouter des ressources
@@ -55,7 +58,7 @@ Le **Workflow** du projet définit les colonnes du tableau et qui prend le relai
## Responsable du projet
-Le responsable peut être un membre ou un agent et coordonne le projet. Un membre responsable peut aussi changer le workflow du projet. Désigner un responsable ne lui assigne pas toutes les tâches et ne lance pas de travail automatiquement. Pour lui confier une étape, choisissez le responsable du projet dans le workflow.
+Le responsable peut être un membre ou un agent ; un membre responsable peut aussi changer le workflow du projet. Désigner un responsable ne lui assigne aucune tâche et ne lance aucun travail. Pour lui confier une étape, choisissez **Responsable du projet** pour cette étape dans le workflow.
## Épingler à la barre latérale
diff --git a/apps/docs/content/docs/projects.ja.mdx b/apps/docs/content/docs/projects.ja.mdx
index 72aa847c78..ce9565f40b 100644
--- a/apps/docs/content/docs/projects.ja.mdx
+++ b/apps/docs/content/docs/projects.ja.mdx
@@ -4,6 +4,7 @@ description: 関連するタスクをプロジェクトで整理し、共通の
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProjectDemo } from "@/components/demos/project-demo";
プロジェクトは、複数の[タスク](/issues)で完了する作業を整理するための単位です。プロダクトのリリース、移行、段階的に進める機能などが該当します。
@@ -22,8 +23,6 @@ import { Callout } from "fumadocs-ui/components/callout";
| **リソース** | 紐づけた GitHub リポジトリ、または特定のコンピュータ上のローカルディレクトリ。 |
| **ワークフロー** | タスクが通るステップと、各ステップを引き継ぐ相手。 |
-![プロジェクト詳細: ステータス別のタスク、進捗、プロジェクトの説明](/images/docs/project-detail.webp)
-
## プロジェクトとタスクの関係
1 つのプロジェクトは任意の数のタスクを含むことができ、1 つのタスクは最大 1 つのプロジェクトに属します。タスクはプロジェクト内で直接作成することも、タスクのプロパティでプロジェクトを選択・変更することもできます。
@@ -31,14 +30,18 @@ import { Callout } from "fumadocs-ui/components/callout";
プロジェクトの進捗は、紐づくタスクから自動的に計算されます。
```text
-進捗 = ステータスが done または cancelled のタスク数 ÷ プロジェクト内の全タスク数
+進捗 = ステータスが done または closed 分類に属するタスクの数 ÷ プロジェクト内の全タスク数
```
-`cancelled` はその作業がプロジェクトの範囲から終了したことを意味するため、進捗に数えられます。プロジェクトのステータスとタスクのステータスは互いに独立しています。すべてのタスクが完了してもプロジェクトは自動的に `completed` にならず、プロジェクトのステータスを変更しても中のタスクが一括変更されることはありません。
+組み込みステータスでは `done` と `cancelled` が該当し、この 2 つの分類に入れたカスタムステータスも同じように数えられます。`cancelled` はその作業がプロジェクトの範囲から外れて終わったことを表すので、進捗に含まれます。
+
+プロジェクトのステータスとタスクのステータスは連動しません。すべてのタスクが完了してもプロジェクトは自動では `completed` にならず、プロジェクトのステータスを変えても中のタスクは一括変更されません。
+
+<ProjectDemo />
## プロジェクトの説明と実行コンテキスト
-エージェントがプロジェクト内のタスクを実行するとき、プロジェクトの名前と説明がその実行のコンテキストに追加されます。説明には、関連するすべての実行に必要な情報 — 目標、技術的な境界、成果物の取り決め — を書きます。1 件のタスクにだけ関係する要件は、そのタスクに書いてください。
+エージェントがプロジェクト内のタスクを実行するとき、プロジェクトの名前と説明がその実行のコンテキストに追加されます。目標、技術的な境界、成果物の取り決めなど、関連するすべての実行が知っておくべき情報は説明に書き、1 件のタスクにだけ関係する要件はそのタスクに書きます。
## リソースの追加
@@ -55,7 +58,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## プロジェクトリード
-リードはメンバーまたはエージェントで、プロジェクトを調整します。メンバーであるリードはプロジェクトのワークフローも切り替えられます。リードにするだけで全タスクが割り当てられたり、作業が始まったりはしません。特定のステップをリードに渡したい場合は、ワークフローでその選択肢を選びます。
+リードはメンバーまたはエージェントで、メンバーであるリードはプロジェクトのワークフローも切り替えられます。リードに設定してもタスクは割り当てられず、作業も始まりません。あるステップをリードに渡したい場合は、ワークフローでそのステップの処理者を**プロジェクトリード**にします。
## サイドバーへのピン留め
diff --git a/apps/docs/content/docs/projects.ko.mdx b/apps/docs/content/docs/projects.ko.mdx
index 75da6edd7a..2b98731d58 100644
--- a/apps/docs/content/docs/projects.ko.mdx
+++ b/apps/docs/content/docs/projects.ko.mdx
@@ -4,6 +4,7 @@ description: 관련 태스크를 프로젝트로 구성하고 공동 목표, 계
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProjectDemo } from "@/components/demos/project-demo";
프로젝트는 제품 출시, 마이그레이션, 단계적으로 진행하는 기능처럼 여러 [태스크](/issues)를 함께 완료해야 하는 작업을 구성할 때 사용합니다.
@@ -22,8 +23,6 @@ import { Callout } from "fumadocs-ui/components/callout";
| **리소스** | 연결된 GitHub 저장소 또는 지정한 컴퓨터의 로컬 디렉터리입니다. |
| **워크플로** | 태스크가 거칠 단계와 각 단계를 이어받을 담당자. |
-![프로젝트 상세: 상태별로 나뉜 태스크, 진행률, 프로젝트 설명](/images/docs/project-detail.webp)
-
## 프로젝트와 태스크의 관계
하나의 프로젝트에는 여러 태스크가 포함될 수 있고, 하나의 태스크는 최대 하나의 프로젝트에만 속할 수 있습니다. 프로젝트에서 바로 태스크를 만들거나 태스크 속성에서 프로젝트를 선택하거나 변경할 수 있습니다.
@@ -31,14 +30,18 @@ import { Callout } from "fumadocs-ui/components/callout";
프로젝트 진행률은 연결된 태스크를 기준으로 자동 계산됩니다.
```text
-진행률 = 상태가 done 또는 cancelled인 태스크 수 ÷ 프로젝트의 전체 태스크 수
+진행률 = 상태가 done 또는 closed 분류에 속하는 태스크 수 ÷ 프로젝트의 전체 태스크 수
```
-`cancelled`는 해당 작업이 프로젝트 범위에서 종료되었다는 뜻이므로 진행률에 포함됩니다. 프로젝트 상태와 태스크 상태는 서로 독립적입니다. 모든 태스크가 완료되어도 프로젝트가 자동으로 `completed`가 되지 않으며, 프로젝트 상태를 바꿔도 그 안의 태스크 상태가 일괄 변경되지 않습니다.
+기본 상태로는 `done`과 `cancelled`가 여기에 해당하며, 이 두 분류에 속하는 사용자 지정 상태도 똑같이 포함됩니다. `cancelled`는 해당 작업이 프로젝트 범위에서 종료되었다는 뜻이므로 진행률에 포함됩니다.
+
+프로젝트 상태와 태스크 상태는 따로 움직입니다. 모든 태스크가 완료되어도 프로젝트가 자동으로 `completed`가 되지 않고, 프로젝트 상태를 바꿔도 그 안의 태스크가 일괄 변경되지 않습니다.
+
+<ProjectDemo />
## 프로젝트 설명과 실행 컨텍스트
-에이전트가 프로젝트 안의 태스크를 실행할 때 프로젝트 이름과 설명이 해당 실행의 컨텍스트에 포함됩니다. 모든 관련 작업에 필요한 목표, 기술적 경계, 납품 규칙을 설명에 저장하세요. 하나의 태스크에만 관련된 요구 사항은 해당 태스크에 작성합니다.
+에이전트가 프로젝트 안의 태스크를 실행할 때 프로젝트 이름과 설명이 해당 실행의 컨텍스트에 포함됩니다. 목표, 기술적 경계, 납품 규칙처럼 관련된 모든 실행이 알아야 할 정보는 설명에 적고, 하나의 태스크에만 관련된 요구 사항은 그 태스크에 적습니다.
## 리소스 추가
@@ -55,7 +58,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 프로젝트 담당자
-프로젝트 리드는 멤버 또는 에이전트이며 프로젝트를 조율합니다. 멤버인 리드는 프로젝트 워크플로를 바꿀 수도 있습니다. 리드로 지정하는 것만으로 모든 태스크가 할당되거나 작업이 시작되지는 않습니다. 특정 단계를 리드에게 넘기려면 워크플로에서 해당 대상을 선택합니다.
+프로젝트 리드는 멤버 또는 에이전트이며, 리드인 멤버는 프로젝트 워크플로를 바꿀 수도 있습니다. 리드로 지정해도 태스크가 할당되거나 작업이 시작되지는 않습니다. 특정 단계를 리드에게 넘기려면 워크플로에서 그 단계의 처리자를 **프로젝트 리드**로 설정하세요.
## 사이드바에 고정
diff --git a/apps/docs/content/docs/projects.mdx b/apps/docs/content/docs/projects.mdx
index 65fa6be180..7f1be11a8b 100644
--- a/apps/docs/content/docs/projects.mdx
+++ b/apps/docs/content/docs/projects.mdx
@@ -4,6 +4,7 @@ description: Organize related issues with projects and give them a shared goal,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProjectDemo } from "@/components/demos/project-demo";
Projects organize work that takes multiple [issues](/issues) to finish — a product launch, a migration, or a feature delivered in stages.
@@ -22,8 +23,6 @@ Work that a single issue can describe does not need a project. Projects fit a gr
| **Resources** | Linked GitHub repositories or local directories on specific computers. |
| **Workflow** | The steps its issues follow and who takes over at each step. |
-![Project detail: issues grouped by status, progress, and the project description](/images/docs/project-detail.webp)
-
## Projects and issues
A project can contain any number of issues; an issue belongs to at most one project. Create issues directly inside the project, or pick or change the project from the issue's properties.
@@ -31,14 +30,18 @@ A project can contain any number of issues; an issue belongs to at most one proj
Project progress is computed automatically from linked issues:
```text
-progress = issues in done or cancelled ÷ all issues in the project
+progress = issues whose status is in the done or closed category ÷ all issues in the project
```
-`cancelled` means that work has been closed out of the project's scope, so it counts toward progress. Project status and issue status are independent: finishing every issue does not automatically set the project to `completed`, and changing the project's status does not bulk-change its issues.
+Among the built-in statuses that means `done` and `cancelled`; custom statuses in those two categories count as well. `cancelled` means that work has been closed out of the project's scope, so it counts toward progress.
+
+Project status and issue status are independent: finishing every issue does not set the project to `completed`, and changing the project's status does not bulk-change its issues.
+
+<ProjectDemo />
## Project description and execution context
-When an agent runs an issue inside a project, the project's name and description are added to that run's context. The description is the place for information every related issue needs: the goal, technical boundaries, delivery conventions. Requirements that apply to only one issue belong in that issue.
+When an agent runs an issue inside a project, the project's name and description are added to that run's context. Put what every related run needs to know in the description — the goal, technical boundaries, delivery conventions — and keep requirements for a single issue in that issue.
## Add resources
@@ -55,7 +58,7 @@ Choose the project’s **Workflow** to set its board columns and who takes over
## Project lead
-The lead can be a member or an agent and coordinates the project. A member who is the lead can also switch the project’s workflow. Making someone the lead does not assign every issue to them or start work automatically. A workflow step can hand issues to the project lead when you choose that option.
+The lead can be a member or an agent; a member who is the lead can also switch the project’s workflow. Making someone the lead does not assign issues to them or start any work. To hand a step to the lead, set that step's handler to **Project lead** in the workflow.
## Pin to the sidebar
diff --git a/apps/docs/content/docs/projects.zh.mdx b/apps/docs/content/docs/projects.zh.mdx
index 86b0f4e432..71cf60c224 100644
--- a/apps/docs/content/docs/projects.zh.mdx
+++ b/apps/docs/content/docs/projects.zh.mdx
@@ -4,6 +4,7 @@ description: 用项目组织相关任务,并为它们提供共同的目标、
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProjectDemo } from "@/components/demos/project-demo";
项目用来组织需要多条 [任务](/issues) 一起完成的工作,例如一次产品发布、一次迁移,或一个分阶段推进的功能。
@@ -22,8 +23,6 @@ import { Callout } from "fumadocs-ui/components/callout";
| **资源** | 关联的 GitHub 仓库或指定电脑上的本地目录。 |
| **工作流** | 任务经过哪些步骤,以及每一步由谁接手。 |
-![项目详情:按状态分列的任务、进度与项目描述](/images/docs/project-detail.webp)
-
## 项目和任务的关系
一个项目可以包含多条任务,一条任务最多属于一个项目。可以在项目中直接创建任务,也可以在任务属性中选择或更换项目。
@@ -31,14 +30,18 @@ import { Callout } from "fumadocs-ui/components/callout";
项目进度按关联任务自动计算:
```text
-进度 = 状态为 done 或 cancelled 的 issue 数 ÷ 项目中的全部 issue 数
+进度 = 状态属于 done 或 closed 分类的任务数 ÷ 项目中的全部任务数
```
-`cancelled` 表示这项工作已从项目范围中结束,因此计入进度。项目状态与任务状态彼此独立:所有任务完成后项目不会自动变为 `completed`,修改项目状态也不会批量修改其中的任务。
+内置状态里就是 `done` 和 `cancelled`,归入这两个分类的自定义状态也一样计入。`cancelled` 表示这项工作已从项目范围中结束,所以算进进度。
+
+项目状态和任务状态各管各的:所有任务完成后,项目不会自动变为 `completed`;修改项目状态,也不会批量修改其中的任务。
+
+<ProjectDemo />
## 项目描述与执行上下文
-智能体执行项目内的任务时,项目名称和描述会加入本次执行的上下文。描述适合保存所有相关运行都需要的信息:目标、技术边界、交付约定。只与单条任务相关的要求写在该任务中。
+智能体执行项目内的任务时,项目名称和描述会加入本次执行的上下文。所有相关运行都需要知道的信息写在描述里,比如目标、技术边界、交付约定;只与单条任务相关的要求写在那条任务中。
## 添加资源
@@ -55,7 +58,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 项目负责人
-项目负责人可以是成员或智能体,负责协调项目。担任负责人的成员还可以为项目切换工作流。设置负责人本身不会把所有任务分配给它,也不会自动启动工作;如果希望某一步交给项目负责人,可以在工作流中选择这个处理人。
+项目负责人可以是成员或智能体,担任负责人的成员还可以为项目切换工作流。设置负责人不会把任务分配给它,也不会启动任何工作;想让某一步交给项目负责人,在工作流里把这一步的处理人设为**项目负责人**。
## 固定到侧边栏
diff --git a/apps/docs/content/docs/providers.fr.mdx b/apps/docs/content/docs/providers.fr.mdx
index b6bf94d8c3..970c964ea1 100644
--- a/apps/docs/content/docs/providers.fr.mdx
+++ b/apps/docs/content/docs/providers.fr.mdx
@@ -4,10 +4,9 @@ description: "Comparez les outils de codage IA pris en charge par Multica, et le
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProviderPickerDemo } from "@/components/demos/provider-picker-demo";
-Multica ne remplace pas l'outil de codage IA que vous utilisez. Un runtime invoque l'outil déjà installé et connecté sur l'ordinateur, puis renvoie la progression et les résultats dans la tâche.
-
-Si vous utilisez déjà l'un de ces outils, vous pouvez généralement le conserver tel quel. Quatre points à prendre en compte pour choisir :
+Multica ne remplace pas l'outil de codage IA que vous utilisez : un runtime invoque l'outil déjà installé et connecté sur l'ordinateur, puis renvoie la progression et les résultats dans la tâche. Si vous utilisez déjà l'un de ces outils, vous pouvez généralement le garder. Si vous n'avez pas encore choisi, regardez quatre points :
- s'il est déjà installé sur l'ordinateur ;
- quels modèles votre compte peut utiliser ;
@@ -18,36 +17,41 @@ Les étapes d'installation se trouvent dans [Installer les outils de codage IA](
## Outils pris en charge
-| Outil | Commande détectée | Reprise de session | MCP géré par Multica | Chemin d'injection des skills |
-|---|---|---:|---:|---|
-| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
-| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
-| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
-| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
-| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
-| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
-| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
-| DeepSeek Harness | `dsh` | ✓ | ✓ | `.dsh/skills/` |
-| DevEco Code | `deveco` | ✓ | — | `.deveco/skills/` |
-| Grok | `grok` | ✓ | ✓ | `.grok/skills/` |
-| Hermes | `hermes` | ✓ | ✓ | `HERMES_HOME/skills/` propre à chaque exécution |
-| Kimi CLI | `kimi` | ✓ | ✓ | `.kimi/skills/` |
-| Kiro CLI | `kiro-cli` | ✓ | ✓ | `.kiro/skills/` |
-| MiniMax Code | `mcode` | — | ✓ | `.minimax/skills/` |
-| Muse Code | `muse` | ✓ | — | `.agents/skills/` |
-| OpenClaw | `openclaw` | ✓ | ✓ | `skills/` |
-| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
-| Pi | `pi` | ✓ | ✓ | `.pi/skills/` |
-| Oh-My-Pi | `omp` | ✓ | ✓ | `.omp/skills/` |
-| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
-| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
-| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
-| QwenPaw | `qwenpaw` | ✓ | ✓ | `skills/` de l'espace de travail propre à chaque exécution |
-| Reasonix | `reasonix` | ✓ | ✓ | `.reasonix/skills/` |
-| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
-| Dim | `dim` | ✓ | ✓ | — |
-
-« MCP géré par Multica » signifie que vous pouvez définir des serveurs MCP dans la configuration de l'agent et que Multica les transmet à l'outil avant une exécution. Cela ne signifie pas que l'outil n'a pas d'autre moyen de configurer MCP.
+<ProviderPickerDemo />
+
+| Outil | Commande détectée | Reprise de session | MCP géré par Multica | Modèle choisi dans Multica | Chemin d'injection des skills |
+|---|---|---:|---:|---:|---|
+| Antigravity | `agy` | ✓ | — | ✓ | `.agents/skills/` |
+| Claude Code | `claude` | ✓ | ✓ | ✓ | `.claude/skills/` |
+| CodeBuddy | `codebuddy` | ✓ | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | ✓ | `.codeartsdoer/skills/` |
+| Codex | `codex` | ✓ | ✓ | ✓ | `$CODEX_HOME/skills/` |
+| GitHub Copilot CLI | `copilot` | ✓ | — | ✓ | `.github/skills/` |
+| Cursor Agent | `cursor-agent` | ✓ | ✓ | ✓ | `.cursor/skills/` |
+| DeepSeek Harness | `dsh` | ✓ | ✓ | ✓ | `.dsh/skills/` |
+| DevEco Code | `deveco` | ✓ | — | ✓ | `.deveco/skills/` |
+| Grok | `grok` | ✓ | ✓ | ✓ | `.grok/skills/` |
+| Hermes | `hermes` | ✓ | ✓ | ✓ | `HERMES_HOME/skills/` propre à chaque exécution |
+| Kimi CLI | `kimi` | ✓ | ✓ | ✓ | `.kimi/skills/` |
+| Kiro CLI | `kiro-cli` | ✓ | ✓ | ✓ | `.kiro/skills/` |
+| MiniMax Code | `mcode` | — | ✓ | — | `.minimax/skills/` |
+| Muse Code | `muse` | ✓ | — | ✓ | `.agents/skills/` |
+| OpenClaw | `openclaw` | ✓ | ✓ | ✓ | `skills/` |
+| OpenCode | `opencode` | ✓ | ✓ | ✓ | `.opencode/skills/` |
+| Pi | `pi` | ✓ | ✓ | ✓ | `.pi/skills/` |
+| Oh-My-Pi | `omp` | ✓ | ✓ | ✓ | `.omp/skills/` |
+| Qoder CLI | `qodercli` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qwen Code | `qwen` | ✓ | ✓ | ✓ | `.qwen/skills/` |
+| QwenPaw | `qwenpaw` | ✓ | ✓ | — | `skills/` de l'espace de travail propre à chaque exécution |
+| Reasonix | `reasonix` | ✓ | ✓ | ✓ | `.reasonix/skills/` |
+| Trae CLI | `traecli` | ✓ | ✓ | ✓ | `.traecli/skills/` |
+| Dim | `dim` | ✓ | ✓ | ✓ | — |
+| ZeroClaw | `zeroclaw` | ✓ | — | — | — |
+
+« MCP géré par Multica » signifie que vous pouvez définir des serveurs MCP dans la configuration de l'agent et que Multica les transmet à l'outil avant une exécution. Cette colonne indique seulement si Multica peut s'en charger, pas si l'outil dispose d'autres moyens de configurer MCP.
+
+Pour les outils marqués — dans « Modèle choisi dans Multica », le modèle se choisit dans la configuration propre à l'outil ; voir [Sources des modèles](#sources-des-modèles).
## Sources des modèles
@@ -55,17 +59,17 @@ Lorsque vous créez un agent, la liste des modèles provient du runtime correspo
Si vous ne choisissez pas de modèle, Multica utilise le modèle par défaut de l'outil. Si la liste est vide, vérifiez que le runtime est en ligne et que l'outil est connecté, puis actualisez la liste des modèles.
-QwenPaw et MiniMax Code font exception : ils n'acceptent pas de modèle choisi depuis Multica, donc le sélecteur est inactif et affiche « Géré par le runtime ». Choisissez plutôt le modèle dans la configuration propre à l'outil. Une liste de modèles vide y est normale et n'indique pas que le runtime est hors ligne.
+QwenPaw, MiniMax Code et ZeroClaw font exception : ils n'acceptent pas de modèle choisi depuis Multica, donc le sélecteur est inactif et affiche « Géré par le runtime ». Choisissez plutôt le modèle dans la configuration propre à l'outil. Pour ces outils, une liste de modèles vide est normale et n'indique pas que le runtime est hors ligne.
DeepSeek Harness publie son catalogue de modèles depuis le runtime lui-même (`dsh --profile multica --list-models`). Ses identifiants de modèle utilisent la forme `provider/model` (par exemple `deepseek-official/deepseek-chat`) ; sélectionnez donc l'identifiant complet dans la liste.
<Callout type="info">
-Les noms de modèles peuvent différer d'un outil à l'autre. Après un changement d'outil de codage IA, la valeur de modèle précédente n'est plus valide dans le nouvel outil et doit être sélectionnée à nouveau.
+Les noms de modèles ne sont pas communs d'un outil à l'autre. Après un changement d'outil de codage IA, la valeur de modèle précédente n'est plus valide dans le nouvel outil et doit être sélectionnée à nouveau.
</Callout>
## Reprise de session
-Tous les outils marqués ✓ permettent de poursuivre une session existante lors d'une exécution ultérieure. Les prérequis : la session d'origine existe toujours et l'exécution est effectuée par un runtime qui peut y accéder. MiniMax Code 0.1.2 n'annonce aucune capacité de chargement de session via ACP, donc Multica démarre une nouvelle session MCode pour une exécution ultérieure.
+Les outils marqués ✓ permettent de poursuivre une session existante lors d'une exécution ultérieure, à condition que la session d'origine existe toujours et que l'exécution soit effectuée par un runtime qui peut y accéder. MiniMax Code 0.1.2 n'annonce aucune capacité de chargement de session via ACP, donc Multica démarre une nouvelle session MCode pour une exécution ultérieure.
Multica stocke l'identifiant de session renvoyé par l'outil. La prochaine fois que le travail se poursuit sur la même tâche, le runtime tente de reprendre cette session ; s'il n'y parvient pas, il crée une nouvelle session et continue. Pi stocke le chemin d'un fichier de session local ; il dépend donc davantage de l'ordinateur et du fichier d'origine.
@@ -73,7 +77,7 @@ Les règles de relance et de reprise de session se trouvent dans [Exécutions](/
## Configuration MCP
-Antigravity, GitHub Copilot CLI et DevEco Code ne lisent pas encore la configuration MCP d'un agent ; le champ n'est donc pas affiché lors de la création d'agents pour ces outils.
+Antigravity, GitHub Copilot CLI, DevEco Code, Muse Code et ZeroClaw ne lisent pas encore la configuration MCP d'un agent ; le champ n'est donc pas affiché lors de la création d'agents pour ces outils.
La transmission d'une configuration MCP gérée à Pi nécessite Pi 0.99.0 ou une version ultérieure. Les versions antérieures de Pi continuent d'exécuter les agents sans configuration MCP.
@@ -81,6 +85,8 @@ La transmission d'une configuration MCP gérée à Pi nécessite Pi 0.99.0 ou un
Les commandes, arguments et variables d'environnement des serveurs MCP sont enregistrés côté serveur avec la configuration de l'agent. N'écrivez pas dans la configuration des identifiants locaux que vous n'avez pas besoin de partager.
</Callout>
+Les serveurs MCP déjà configurés sur la machine du runtime sont fusionnés sur cette machine avec la configuration de l'agent ; voir [Configuration MCP locale](/daemon-runtimes#local-mcp).
+
## Injection des skills
Avant le démarrage d'une exécution, Multica écrit les skills rattachés à l'agent dans les chemins du tableau ci-dessus, afin que chaque outil les découvre par son propre mécanisme natif.
diff --git a/apps/docs/content/docs/providers.ja.mdx b/apps/docs/content/docs/providers.ja.mdx
index e4c2f759d5..ca0cb0371d 100644
--- a/apps/docs/content/docs/providers.ja.mdx
+++ b/apps/docs/content/docs/providers.ja.mdx
@@ -4,10 +4,9 @@ description: Multica が対応する AI コーディングツールと、モデ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProviderPickerDemo } from "@/components/demos/provider-picker-demo";
-Multica は、普段使っている AI コーディングツールの代わりになるものではありません。ランタイムがコンピューターにインストール済みでログイン済みのツールを呼び出し、実行の進捗と結果をタスクに書き戻します。
-
-すでにいずれかのツールを使っている場合は、通常そのまま使い続けられます。ツールを選ぶときは、次の 4 点を確認してください。
+Multica は、普段使っている AI コーディングツールの代わりになるものではありません。ランタイムがコンピューターにインストール済みでログイン済みのツールを呼び出し、実行の進捗と結果をタスクに書き戻します。すでにいずれかのツールを使っているなら、通常はそのまま使い続けられます。まだ決めていない場合は、次の 4 点を確認してください。
- コンピューターにすでにインストールされているか
- アカウントでどのモデルを利用できるか
@@ -18,36 +17,41 @@ Multica は、普段使っている AI コーディングツールの代わり
## 対応ツール
-| ツール | 検出コマンド | セッション再開 | Multica による MCP 管理 | スキルの注入先 |
-|---|---|---:|---:|---|
-| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
-| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
-| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
-| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
-| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
-| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
-| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
-| DeepSeek Harness | `dsh` | ✓ | ✓ | `.dsh/skills/` |
-| DevEco Code | `deveco` | ✓ | — | `.deveco/skills/` |
-| Grok | `grok` | ✓ | ✓ | `.grok/skills/` |
-| Hermes | `hermes` | ✓ | ✓ | 1 回の実行専用の `HERMES_HOME/skills/` |
-| Kimi CLI | `kimi` | ✓ | ✓ | `.kimi/skills/` |
-| Kiro CLI | `kiro-cli` | ✓ | ✓ | `.kiro/skills/` |
-| MiniMax Code | `mcode` | — | ✓ | `.minimax/skills/` |
-| Muse Code | `muse` | ✓ | — | `.agents/skills/` |
-| OpenClaw | `openclaw` | ✓ | ✓ | `skills/` |
-| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
-| Pi | `pi` | ✓ | ✓ | `.pi/skills/` |
-| Oh-My-Pi | `omp` | ✓ | ✓ | `.omp/skills/` |
-| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
-| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
-| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
-| QwenPaw | `qwenpaw` | ✓ | ✓ | 1 回の実行専用のワークスペース `skills/` |
-| Reasonix | `reasonix` | ✓ | ✓ | `.reasonix/skills/` |
-| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
-| Dim | `dim` | ✓ | ✓ | — |
-
-「Multica による MCP 管理」とは、エージェント設定に MCP server を入力し、Multica が実行前にその設定を対応ツールへ渡せることを意味します。そのツールにほかの MCP 設定方法がない、という意味ではありません。
+<ProviderPickerDemo />
+
+| ツール | 検出コマンド | セッション再開 | Multica による MCP 管理 | Multica でのモデル選択 | スキルの注入先 |
+|---|---|---:|---:|---:|---|
+| Antigravity | `agy` | ✓ | — | ✓ | `.agents/skills/` |
+| Claude Code | `claude` | ✓ | ✓ | ✓ | `.claude/skills/` |
+| CodeBuddy | `codebuddy` | ✓ | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | ✓ | `.codeartsdoer/skills/` |
+| Codex | `codex` | ✓ | ✓ | ✓ | `$CODEX_HOME/skills/` |
+| GitHub Copilot CLI | `copilot` | ✓ | — | ✓ | `.github/skills/` |
+| Cursor Agent | `cursor-agent` | ✓ | ✓ | ✓ | `.cursor/skills/` |
+| DeepSeek Harness | `dsh` | ✓ | ✓ | ✓ | `.dsh/skills/` |
+| DevEco Code | `deveco` | ✓ | — | ✓ | `.deveco/skills/` |
+| Grok | `grok` | ✓ | ✓ | ✓ | `.grok/skills/` |
+| Hermes | `hermes` | ✓ | ✓ | ✓ | 1 回の実行専用の `HERMES_HOME/skills/` |
+| Kimi CLI | `kimi` | ✓ | ✓ | ✓ | `.kimi/skills/` |
+| Kiro CLI | `kiro-cli` | ✓ | ✓ | ✓ | `.kiro/skills/` |
+| MiniMax Code | `mcode` | — | ✓ | — | `.minimax/skills/` |
+| Muse Code | `muse` | ✓ | — | ✓ | `.agents/skills/` |
+| OpenClaw | `openclaw` | ✓ | ✓ | ✓ | `skills/` |
+| OpenCode | `opencode` | ✓ | ✓ | ✓ | `.opencode/skills/` |
+| Pi | `pi` | ✓ | ✓ | ✓ | `.pi/skills/` |
+| Oh-My-Pi | `omp` | ✓ | ✓ | ✓ | `.omp/skills/` |
+| Qoder CLI | `qodercli` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qwen Code | `qwen` | ✓ | ✓ | ✓ | `.qwen/skills/` |
+| QwenPaw | `qwenpaw` | ✓ | ✓ | — | 1 回の実行専用のワークスペース `skills/` |
+| Reasonix | `reasonix` | ✓ | ✓ | ✓ | `.reasonix/skills/` |
+| Trae CLI | `traecli` | ✓ | ✓ | ✓ | `.traecli/skills/` |
+| Dim | `dim` | ✓ | ✓ | ✓ | — |
+| ZeroClaw | `zeroclaw` | ✓ | — | — | — |
+
+「Multica による MCP 管理」とは、エージェント設定に MCP server を入力し、Multica が実行前にその設定を対応ツールへ渡せることを意味します。この列が示すのは Multica が代わりに設定できるかどうかで、ツール自体にほかの MCP 設定方法があるかどうかではありません。
+
+「Multica でのモデル選択」が — のツールは、ツール自身の設定でモデルを選びます。[モデルの取得元](#モデルの取得元)を参照してください。
## モデルの取得元
@@ -55,17 +59,17 @@ Multica は、普段使っている AI コーディングツールの代わり
モデルを選択しない場合、Multica はそのツールのデフォルト設定を使用します。一覧が空の場合は、ランタイムがオンラインでツールにログイン済みであることを確認してから、モデル一覧を更新してください。
-QwenPaw と MiniMax Code は例外です。Multica 側で選んだモデルを受け付けないため、選択欄は操作できず「ランタイムで管理」と表示されます。モデルは各ツール側の設定で選んでください。モデル一覧が空なのは正常であり、ランタイムがオフラインであることを示すものではありません。
+QwenPaw、MiniMax Code、ZeroClaw は例外です。Multica 側で選んだモデルを受け付けないため、選択欄は操作できず「ランタイムで管理」と表示されます。モデルは各ツール側の設定で選んでください。これらのツールでモデル一覧が空なのは正常で、ランタイムがオフラインという意味ではありません。
DeepSeek Harness のモデルカタログはランタイム自身が提供します(`dsh --profile multica --list-models`)。モデル ID は `provider/model` 形式(例: `deepseek-official/deepseek-chat`)なので、一覧から完全な ID を選択してください。
<Callout type="info">
-ツールによってモデル名が異なることがあります。AI コーディングツールを変更すると、以前のモデル値は新しいツールで使えないため、選び直す必要があります。
+モデル名はツール間で共通ではありません。AI コーディングツールを変更すると、以前のモデル値は新しいツールで使えないため、選び直す必要があります。
</Callout>
## セッション再開
-表で ✓ が付いたツールは、後続の実行で既存のセッションを続行できます。ただし、元のセッションが残っており、そのセッションへアクセスできるランタイムが実行を処理する必要があります。MiniMax Code 0.1.2 は ACP でセッション読み込み機能を通知しないため、後続の実行では新しい MCode セッションを開始します。
+表で ✓ が付いたツールは、後続の実行で既存のセッションを続行できます。前提は、元のセッションが残っていて、そのセッションにアクセスできるランタイムが実行を処理することです。MiniMax Code 0.1.2 は ACP でセッション読み込み機能を通知しないため、後続の実行では新しい MCode セッションを開始します。
Multica はツールから返されたセッション識別子を保存します。次に同じタスクで作業を続けるとき、ランタイムはそのセッションの再開を試みます。再開できない場合は、新しいセッションを作成して実行を続けます。Pi はローカルのセッションファイルパスを保存するため、元のコンピューターとファイルへの依存度が高くなります。
@@ -73,7 +77,7 @@ Multica はツールから返されたセッション識別子を保存します
## MCP 設定
-Antigravity、GitHub Copilot CLI、DevEco Code は、現時点ではエージェントの MCP 設定を読み取りません。そのため、これらのツールを選んだ場合、エージェント作成画面にこの項目は表示されません。
+Antigravity、GitHub Copilot CLI、DevEco Code、Muse Code、ZeroClaw は、現時点ではエージェントの MCP 設定を読み取らないため、これらのツールではエージェント作成画面にこの項目が表示されません。
Pi への管理 MCP 設定の引き渡しには Pi 0.99.0 以降が必要です。それより古い Pi でも、MCP 設定のないエージェントは引き続き実行できます。
@@ -81,6 +85,8 @@ Pi への管理 MCP 設定の引き渡しには Pi 0.99.0 以降が必要です
MCP server のコマンド、引数、環境変数は、エージェント設定の一部としてサーバーに保存されます。共有する必要がないローカルの認証情報を設定へ直接入力しないでください。
</Callout>
+ランタイムのマシンに設定済みの MCP サーバーは、そのマシン上でエージェントの構成とマージされます。[ローカルの MCP 設定](/daemon-runtimes#local-mcp)を参照してください。
+
## スキルの注入方法
実行を開始する前に、Multica はエージェントに紐づいたスキルを上表の場所へ書き込み、各ツールが標準の仕組みで検出できるようにします。
diff --git a/apps/docs/content/docs/providers.ko.mdx b/apps/docs/content/docs/providers.ko.mdx
index 694013431e..81a0bec16d 100644
--- a/apps/docs/content/docs/providers.ko.mdx
+++ b/apps/docs/content/docs/providers.ko.mdx
@@ -4,10 +4,9 @@ description: Multica가 지원하는 AI 코딩 도구와 모델, MCP, 세션,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProviderPickerDemo } from "@/components/demos/provider-picker-demo";
-Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타임이 컴퓨터에 이미 설치되어 로그인된 도구를 호출하고 실행 진행 상황과 결과를 태스크에 기록합니다.
-
-이미 사용 중인 도구가 있다면 보통 그대로 사용할 수 있습니다. 도구를 선택할 때는 다음 네 가지를 판단하세요.
+Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타임이 컴퓨터에 이미 설치되어 로그인된 도구를 호출하고 실행 진행 상황과 결과를 태스크에 기록합니다. 이미 사용 중인 도구가 있다면 보통 그대로 쓰면 됩니다. 아직 정하지 않았다면 다음 네 가지를 보세요.
- 컴퓨터에 이미 설치되어 있는가
- 계정에서 어떤 모델을 사용할 수 있는가
@@ -18,36 +17,41 @@ Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타
## 지원 도구
-| 도구 | 감지 명령 | 세션 복원 | Multica의 MCP 관리 | 스킬 주입 위치 |
-|---|---|---:|---:|---|
-| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
-| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
-| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
-| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
-| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
-| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
-| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
-| DeepSeek Harness | `dsh` | ✓ | ✓ | `.dsh/skills/` |
-| DevEco Code | `deveco` | ✓ | — | `.deveco/skills/` |
-| Grok | `grok` | ✓ | ✓ | `.grok/skills/` |
-| Hermes | `hermes` | ✓ | ✓ | 실행별 `HERMES_HOME/skills/` |
-| Kimi CLI | `kimi` | ✓ | ✓ | `.kimi/skills/` |
-| Kiro CLI | `kiro-cli` | ✓ | ✓ | `.kiro/skills/` |
-| MiniMax Code | `mcode` | — | ✓ | `.minimax/skills/` |
-| Muse Code | `muse` | ✓ | — | `.agents/skills/` |
-| OpenClaw | `openclaw` | ✓ | ✓ | `skills/` |
-| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
-| Pi | `pi` | ✓ | ✓ | `.pi/skills/` |
-| Oh-My-Pi | `omp` | ✓ | ✓ | `.omp/skills/` |
-| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
-| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
-| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
-| QwenPaw | `qwenpaw` | ✓ | ✓ | 실행별 워크스페이스 `skills/` |
-| Reasonix | `reasonix` | ✓ | ✓ | `.reasonix/skills/` |
-| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
-| Dim | `dim` | ✓ | ✓ | — |
-
-"Multica의 MCP 관리"는 에이전트 설정에 MCP server를 입력하면 Multica가 실행 전에 해당 도구로 전달할 수 있다는 뜻입니다. 도구 자체에 다른 MCP 설정 방법이 없다는 뜻은 아닙니다.
+<ProviderPickerDemo />
+
+| 도구 | 감지 명령 | 세션 복원 | Multica의 MCP 관리 | Multica에서 모델 선택 | 스킬 주입 위치 |
+|---|---|---:|---:|---:|---|
+| Antigravity | `agy` | ✓ | — | ✓ | `.agents/skills/` |
+| Claude Code | `claude` | ✓ | ✓ | ✓ | `.claude/skills/` |
+| CodeBuddy | `codebuddy` | ✓ | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | ✓ | `.codeartsdoer/skills/` |
+| Codex | `codex` | ✓ | ✓ | ✓ | `$CODEX_HOME/skills/` |
+| GitHub Copilot CLI | `copilot` | ✓ | — | ✓ | `.github/skills/` |
+| Cursor Agent | `cursor-agent` | ✓ | ✓ | ✓ | `.cursor/skills/` |
+| DeepSeek Harness | `dsh` | ✓ | ✓ | ✓ | `.dsh/skills/` |
+| DevEco Code | `deveco` | ✓ | — | ✓ | `.deveco/skills/` |
+| Grok | `grok` | ✓ | ✓ | ✓ | `.grok/skills/` |
+| Hermes | `hermes` | ✓ | ✓ | ✓ | 실행별 `HERMES_HOME/skills/` |
+| Kimi CLI | `kimi` | ✓ | ✓ | ✓ | `.kimi/skills/` |
+| Kiro CLI | `kiro-cli` | ✓ | ✓ | ✓ | `.kiro/skills/` |
+| MiniMax Code | `mcode` | — | ✓ | — | `.minimax/skills/` |
+| Muse Code | `muse` | ✓ | — | ✓ | `.agents/skills/` |
+| OpenClaw | `openclaw` | ✓ | ✓ | ✓ | `skills/` |
+| OpenCode | `opencode` | ✓ | ✓ | ✓ | `.opencode/skills/` |
+| Pi | `pi` | ✓ | ✓ | ✓ | `.pi/skills/` |
+| Oh-My-Pi | `omp` | ✓ | ✓ | ✓ | `.omp/skills/` |
+| Qoder CLI | `qodercli` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qwen Code | `qwen` | ✓ | ✓ | ✓ | `.qwen/skills/` |
+| QwenPaw | `qwenpaw` | ✓ | ✓ | — | 실행별 워크스페이스 `skills/` |
+| Reasonix | `reasonix` | ✓ | ✓ | ✓ | `.reasonix/skills/` |
+| Trae CLI | `traecli` | ✓ | ✓ | ✓ | `.traecli/skills/` |
+| Dim | `dim` | ✓ | ✓ | ✓ | — |
+| ZeroClaw | `zeroclaw` | ✓ | — | — | — |
+
+"Multica의 MCP 관리"는 에이전트 설정에 MCP server를 입력하면 Multica가 실행 전에 해당 도구로 전달할 수 있다는 뜻입니다. 이 열은 Multica가 대신 설정할 수 있는지만 나타내며, 도구 자체에 다른 MCP 설정 방법이 있는지와는 관계없습니다.
+
+"Multica에서 모델 선택"이 —인 도구는 도구 자체 설정에서 모델을 고릅니다. [모델 출처](#모델-출처)를 참고하세요.
## 모델 출처
@@ -55,17 +59,17 @@ Multica는 사용 중인 AI 코딩 도구를 대체하지 않습니다. 런타
모델을 선택하지 않으면 Multica가 해당 도구의 기본 설정을 사용합니다. 목록이 비어 있다면 런타임이 온라인이고 도구에 로그인되어 있는지 확인한 뒤 모델 목록을 새로 고치세요.
-QwenPaw와 MiniMax Code는 예외입니다. Multica에서 고른 모델을 받아들이지 않으므로 선택 상자가 비활성 상태로 "런타임에서 관리"라고 표시됩니다. 모델은 각 도구의 자체 설정에서 선택하세요. 모델 목록이 비어 있는 것은 정상이며 런타임이 오프라인이라는 뜻이 아닙니다.
+QwenPaw, MiniMax Code, ZeroClaw는 예외입니다. Multica에서 고른 모델을 받아들이지 않으므로 선택 상자가 비활성 상태로 "런타임에서 관리"라고 표시됩니다. 모델은 각 도구의 자체 설정에서 선택하세요. 이 도구들의 모델 목록이 비어 있는 것은 정상이며 런타임이 오프라인이라는 뜻이 아닙니다.
DeepSeek Harness의 모델 카탈로그는 런타임 자체가 제공합니다(`dsh --profile multica --list-models`). 모델 ID는 `provider/model` 형식(예: `deepseek-official/deepseek-chat`)이므로 목록에서 전체 ID를 선택하세요.
<Callout type="info">
-도구마다 모델 이름이 다를 수 있습니다. AI 코딩 도구를 바꾸면 기존 모델 값은 새 도구에서 유효하지 않으므로 다시 선택해야 합니다.
+모델 이름은 도구끼리 통용되지 않습니다. AI 코딩 도구를 바꾸면 기존 모델 값은 새 도구에서 유효하지 않으므로 다시 선택해야 합니다.
</Callout>
## 세션 복원
-표에서 ✓로 표시된 도구는 이후 실행에서 기존 세션을 이어갈 수 있습니다. 원래 세션이 여전히 존재하고 해당 세션에 접근할 수 있는 런타임이 실행을 처리해야 합니다. MiniMax Code 0.1.2는 ACP에서 세션 로드 기능을 알리지 않으므로 이후 실행에서는 새 MCode 세션을 시작합니다.
+표에서 ✓로 표시된 도구는 원래 세션이 남아 있고 그 세션에 접근할 수 있는 런타임이 실행을 처리하면, 이후 실행에서 기존 세션을 이어갈 수 있습니다. MiniMax Code 0.1.2는 ACP에서 세션 로드 기능을 알리지 않으므로 이후 실행에서는 새 MCode 세션을 시작합니다.
Multica는 도구가 반환한 세션 식별자를 저장합니다. 다음에 같은 태스크에서 작업을 이어갈 때 런타임이 이 세션의 복원을 시도합니다. 복원할 수 없으면 새 세션을 만들어 계속 실행합니다. Pi는 로컬 세션 파일 경로를 저장하므로 원래 컴퓨터와 파일에 더 많이 의존합니다.
@@ -73,7 +77,7 @@ Multica는 도구가 반환한 세션 식별자를 저장합니다. 다음에
## MCP 설정
-Antigravity, GitHub Copilot CLI, DevEco Code는 현재 에이전트의 MCP 설정을 읽지 않으므로 에이전트를 만들 때 이 항목이 표시되지 않습니다.
+Antigravity, GitHub Copilot CLI, DevEco Code, Muse Code, ZeroClaw는 현재 에이전트의 MCP 설정을 읽지 않으므로 에이전트를 만들 때 이 항목이 표시되지 않습니다.
Pi에 관리형 MCP 설정을 전달하려면 Pi 0.99.0 이상이 필요합니다. 이전 Pi 버전에서도 MCP 설정이 없는 에이전트는 계속 실행할 수 있습니다.
@@ -81,6 +85,8 @@ Pi에 관리형 MCP 설정을 전달하려면 Pi 0.99.0 이상이 필요합니
MCP server의 명령, 인수, 환경 변수는 에이전트 설정과 함께 서버에 저장됩니다. 공유할 필요가 없는 로컬 자격 증명을 설정에 직접 넣지 마세요.
</Callout>
+런타임 컴퓨터에 이미 설정된 MCP server는 그 컴퓨터에서 에이전트 설정과 합쳐집니다. [로컬 MCP 설정](/daemon-runtimes#local-mcp)을 참고하세요.
+
## 스킬 주입 방식
실행을 시작하기 전에 Multica가 에이전트에 연결된 스킬을 위 표의 해당 위치에 기록해 도구가 자체 기본 메커니즘으로 발견할 수 있게 합니다.
diff --git a/apps/docs/content/docs/providers.mdx b/apps/docs/content/docs/providers.mdx
index d81e3a7dad..09b96efbbb 100644
--- a/apps/docs/content/docs/providers.mdx
+++ b/apps/docs/content/docs/providers.mdx
@@ -4,10 +4,9 @@ description: Compare the AI coding tools Multica supports, and how models, MCP,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProviderPickerDemo } from "@/components/demos/provider-picker-demo";
-Multica does not replace the AI coding tool you use. A runtime invokes the tool already installed and signed in on the computer, then writes progress and results back to the issue.
-
-If you already use one of these tools, you can usually keep it as-is. Four things to weigh when choosing:
+Multica does not replace the AI coding tool you use: a runtime invokes the tool already installed and signed in on the computer, then writes progress and results back to the issue. If you already use one of these tools, you can usually keep it. If you have not picked one yet, weigh four things:
- whether it is already installed on the computer;
- which models your account can use;
@@ -18,36 +17,41 @@ Install steps are in [Install AI coding tools](/install-agent-runtime).
## Supported tools
-| Tool | Detected command | Session resumption | Multica-managed MCP | Skill injection path |
-|---|---|---:|---:|---|
-| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
-| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
-| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
-| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
-| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
-| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
-| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
-| DeepSeek Harness | `dsh` | ✓ | ✓ | `.dsh/skills/` |
-| DevEco Code | `deveco` | ✓ | — | `.deveco/skills/` |
-| Grok | `grok` | ✓ | ✓ | `.grok/skills/` |
-| Hermes | `hermes` | ✓ | ✓ | per-run `HERMES_HOME/skills/` |
-| Kimi CLI | `kimi` | ✓ | ✓ | `.kimi/skills/` |
-| Kiro CLI | `kiro-cli` | ✓ | ✓ | `.kiro/skills/` |
-| MiniMax Code | `mcode` | — | ✓ | `.minimax/skills/` |
-| Muse Code | `muse` | ✓ | — | `.agents/skills/` |
-| OpenClaw | `openclaw` | ✓ | ✓ | `skills/` |
-| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
-| Pi | `pi` | ✓ | ✓ | `.pi/skills/` |
-| Oh-My-Pi | `omp` | ✓ | ✓ | `.omp/skills/` |
-| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
-| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
-| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
-| QwenPaw | `qwenpaw` | ✓ | ✓ | per-run workspace `skills/` |
-| Reasonix | `reasonix` | ✓ | ✓ | `.reasonix/skills/` |
-| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
-| Dim | `dim` | ✓ | ✓ | — |
-
-"Multica-managed MCP" means you can define MCP servers in the agent configuration and Multica passes them to the tool before a run. It does not mean the tool has no other way to configure MCP.
+<ProviderPickerDemo />
+
+| Tool | Detected command | Session resumption | Multica-managed MCP | Model picked in Multica | Skill injection path |
+|---|---|---:|---:|---:|---|
+| Antigravity | `agy` | ✓ | — | ✓ | `.agents/skills/` |
+| Claude Code | `claude` | ✓ | ✓ | ✓ | `.claude/skills/` |
+| CodeBuddy | `codebuddy` | ✓ | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | ✓ | `.codeartsdoer/skills/` |
+| Codex | `codex` | ✓ | ✓ | ✓ | `$CODEX_HOME/skills/` |
+| GitHub Copilot CLI | `copilot` | ✓ | — | ✓ | `.github/skills/` |
+| Cursor Agent | `cursor-agent` | ✓ | ✓ | ✓ | `.cursor/skills/` |
+| DeepSeek Harness | `dsh` | ✓ | ✓ | ✓ | `.dsh/skills/` |
+| DevEco Code | `deveco` | ✓ | — | ✓ | `.deveco/skills/` |
+| Grok | `grok` | ✓ | ✓ | ✓ | `.grok/skills/` |
+| Hermes | `hermes` | ✓ | ✓ | ✓ | per-run `HERMES_HOME/skills/` |
+| Kimi CLI | `kimi` | ✓ | ✓ | ✓ | `.kimi/skills/` |
+| Kiro CLI | `kiro-cli` | ✓ | ✓ | ✓ | `.kiro/skills/` |
+| MiniMax Code | `mcode` | — | ✓ | — | `.minimax/skills/` |
+| Muse Code | `muse` | ✓ | — | ✓ | `.agents/skills/` |
+| OpenClaw | `openclaw` | ✓ | ✓ | ✓ | `skills/` |
+| OpenCode | `opencode` | ✓ | ✓ | ✓ | `.opencode/skills/` |
+| Pi | `pi` | ✓ | ✓ | ✓ | `.pi/skills/` |
+| Oh-My-Pi | `omp` | ✓ | ✓ | ✓ | `.omp/skills/` |
+| Qoder CLI | `qodercli` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qwen Code | `qwen` | ✓ | ✓ | ✓ | `.qwen/skills/` |
+| QwenPaw | `qwenpaw` | ✓ | ✓ | — | per-run workspace `skills/` |
+| Reasonix | `reasonix` | ✓ | ✓ | ✓ | `.reasonix/skills/` |
+| Trae CLI | `traecli` | ✓ | ✓ | ✓ | `.traecli/skills/` |
+| Dim | `dim` | ✓ | ✓ | ✓ | — |
+| ZeroClaw | `zeroclaw` | ✓ | — | — | — |
+
+"Multica-managed MCP" means you can define MCP servers in the agent configuration and Multica passes them to the tool before a run. The column only says whether Multica can configure it for you, not whether the tool has other ways to configure MCP.
+
+Tools with — under "Model picked in Multica" take their model from their own configuration; see [Model sources](#model-sources).
## Model sources
@@ -55,25 +59,25 @@ When you create an agent, the model list comes from the corresponding runtime. S
If you do not pick a model, Multica uses the tool's own default. If the list is empty, confirm the runtime is online and the tool is signed in, then refresh the model list.
-QwenPaw and MiniMax Code are exceptions: they do not accept a model chosen from Multica, so the picker is inert and shows "Managed by runtime". Choose the model in the tool's own configuration instead. An empty model list is expected there and is not a sign that the runtime is offline.
+QwenPaw, MiniMax Code, and ZeroClaw are exceptions: they do not accept a model chosen from Multica, so the picker is inert and shows "Managed by runtime". Choose the model in the tool's own configuration instead. An empty model list for these tools is expected and does not mean the runtime is offline.
DeepSeek Harness advertises its model catalog from the runtime itself (`dsh --profile multica --list-models`). Its model ids use the `provider/model` form (for example `deepseek-official/deepseek-chat`), so select the full id from the list.
<Callout type="info">
-Different tools may use different model names. After switching AI coding tools, the previous model value is invalid in the new tool and needs to be selected again.
+Model names are not shared across tools. After switching AI coding tools, the previous model value is invalid in the new tool and needs to be selected again.
</Callout>
## Session resumption
-All tools marked ✓ support continuing an existing session in a later run. The prerequisites are that the original session still exists and the run is executed by a runtime that can reach it. MiniMax Code 0.1.2 advertises no session-loading capability over ACP, so Multica starts a fresh MCode session for a later run.
+Tools marked ✓ can continue an existing session in a later run, provided the original session still exists and the run is executed by a runtime that can reach it. MiniMax Code 0.1.2 advertises no session-loading capability over ACP, so Multica starts a fresh MCode session for a later run.
-Multica stores the session identifier the tool returns. The next time work continues on the same issue, the runtime tries to resume that session; when it cannot, it creates a new session and keeps going. Pi stores a local session file path, so it depends more on the original computer and file.
+Multica stores the session identifier the tool returns. The next time work continues on the same issue, the runtime tries to resume that session; if it cannot, it starts a new session and keeps going. Pi stores a local session file path, so it depends more on the original computer and file.
Retry and session-resumption rules are in [Runs](/tasks#manual-retry).
## MCP configuration
-Antigravity, GitHub Copilot CLI, and DevEco Code do not read the MCP configuration on an agent yet, so the field is not shown when creating agents for them.
+Antigravity, GitHub Copilot CLI, DevEco Code, Muse Code, and ZeroClaw do not read the MCP configuration on an agent yet, so the field is not shown when creating agents for them.
Managed MCP delivery for Pi requires Pi 0.99.0 or later. Older Pi versions continue to run agents that have no MCP configuration.
@@ -81,9 +85,11 @@ Managed MCP delivery for Pi requires Pi 0.99.0 or later. Older Pi versions conti
MCP server commands, arguments, and environment variables are saved server-side with the agent configuration. Do not write local credentials you have no need to share into the configuration.
</Callout>
+Servers already configured on the runtime's machine are merged with the agent's configuration on that machine; see [Local MCP configuration](/daemon-runtimes#local-mcp).
+
## Skill injection
-Before a run starts, Multica writes the skills bound to the agent into the paths in the table above, so each tool discovers them through its own native mechanism.
+Before a run starts, Multica writes the skills bound to the agent into the paths in the table above, where each tool discovers them through its own native mechanism.
Skills that already exist in the repository are never overwritten. On a name collision, Multica uses a different directory name for the injected copy; after the run, it cleans up only the files it created.
diff --git a/apps/docs/content/docs/providers.zh.mdx b/apps/docs/content/docs/providers.zh.mdx
index 5247ecd0e9..b3aabbca19 100644
--- a/apps/docs/content/docs/providers.zh.mdx
+++ b/apps/docs/content/docs/providers.zh.mdx
@@ -4,10 +4,9 @@ description: 比较 Multica 支持的 AI 编程工具,以及模型、MCP、会
---
import { Callout } from "fumadocs-ui/components/callout";
+import { ProviderPickerDemo } from "@/components/demos/provider-picker-demo";
-Multica 不会替代你使用的 AI 编程工具。运行时会调用电脑上已经安装并登录的工具,再把执行进度和结果写回任务。
-
-如果你已经在使用其中一款,通常可以直接沿用。选择工具时的四个判断维度:
+Multica 不替代你在用的 AI 编程工具:运行时调用电脑上已经安装并登录的工具,再把执行进度和结果写回任务。已经在用其中一款的,通常直接沿用就行。还没定的话,看四件事:
- 电脑上是否已经安装;
- 账号可以使用哪些模型;
@@ -18,62 +17,67 @@ Multica 不会替代你使用的 AI 编程工具。运行时会调用电脑上
## 支持的工具
-| 工具 | 检测命令 | 会话恢复 | Multica 管理 MCP | Skill 注入位置 |
-|---|---|---:|---:|---|
-| Antigravity | `agy` | ✓ | — | `.agents/skills/` |
-| Claude Code | `claude` | ✓ | ✓ | `.claude/skills/` |
-| CodeBuddy | `codebuddy` | ✓ | ✓ | `.codebuddy/skills/` |
-| CodeArts | `codearts` | ✓ | ✓ | `.codeartsdoer/skills/` |
-| Codex | `codex` | ✓ | ✓ | `$CODEX_HOME/skills/` |
-| GitHub Copilot CLI | `copilot` | ✓ | — | `.github/skills/` |
-| Cursor Agent | `cursor-agent` | ✓ | ✓ | `.cursor/skills/` |
-| DeepSeek Harness | `dsh` | ✓ | ✓ | `.dsh/skills/` |
-| DevEco Code | `deveco` | ✓ | — | `.deveco/skills/` |
-| Grok | `grok` | ✓ | ✓ | `.grok/skills/` |
-| Hermes | `hermes` | ✓ | ✓ | 单次执行的 `HERMES_HOME/skills/` |
-| Kimi CLI | `kimi` | ✓ | ✓ | `.kimi/skills/` |
-| Kiro CLI | `kiro-cli` | ✓ | ✓ | `.kiro/skills/` |
-| MiniMax Code | `mcode` | — | ✓ | `.minimax/skills/` |
-| Muse Code | `muse` | ✓ | — | `.agents/skills/` |
-| OpenClaw | `openclaw` | ✓ | ✓ | `skills/` |
-| OpenCode | `opencode` | ✓ | ✓ | `.opencode/skills/` |
-| Pi | `pi` | ✓ | ✓ | `.pi/skills/` |
-| Oh-My-Pi | `omp` | ✓ | ✓ | `.omp/skills/` |
-| Qoder CLI | `qodercli` | ✓ | ✓ | `.qoder/skills/` |
-| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | `.qoder/skills/` |
-| Qwen Code | `qwen` | ✓ | ✓ | `.qwen/skills/` |
-| QwenPaw | `qwenpaw` | ✓ | ✓ | 单次执行的工作区 `skills/` |
-| Reasonix | `reasonix` | ✓ | ✓ | `.reasonix/skills/` |
-| Trae CLI | `traecli` | ✓ | ✓ | `.traecli/skills/` |
-| Dim | `dim` | ✓ | ✓ | — |
-
-"Multica 管理 MCP" 表示你可以在智能体配置中填写 MCP server,由 Multica 在执行前传给对应工具。它不代表该工具本身没有其他 MCP 配置方式。
+<ProviderPickerDemo />
+
+| 工具 | 检测命令 | 会话恢复 | Multica 管理 MCP | 在 Multica 选模型 | Skill 注入位置 |
+|---|---|---:|---:|---:|---|
+| Antigravity | `agy` | ✓ | — | ✓ | `.agents/skills/` |
+| Claude Code | `claude` | ✓ | ✓ | ✓ | `.claude/skills/` |
+| CodeBuddy | `codebuddy` | ✓ | ✓ | ✓ | `.codebuddy/skills/` |
+| CodeArts | `codearts` | ✓ | ✓ | ✓ | `.codeartsdoer/skills/` |
+| Codex | `codex` | ✓ | ✓ | ✓ | `$CODEX_HOME/skills/` |
+| GitHub Copilot CLI | `copilot` | ✓ | — | ✓ | `.github/skills/` |
+| Cursor Agent | `cursor-agent` | ✓ | ✓ | ✓ | `.cursor/skills/` |
+| DeepSeek Harness | `dsh` | ✓ | ✓ | ✓ | `.dsh/skills/` |
+| DevEco Code | `deveco` | ✓ | — | ✓ | `.deveco/skills/` |
+| Grok | `grok` | ✓ | ✓ | ✓ | `.grok/skills/` |
+| Hermes | `hermes` | ✓ | ✓ | ✓ | 单次执行的 `HERMES_HOME/skills/` |
+| Kimi CLI | `kimi` | ✓ | ✓ | ✓ | `.kimi/skills/` |
+| Kiro CLI | `kiro-cli` | ✓ | ✓ | ✓ | `.kiro/skills/` |
+| MiniMax Code | `mcode` | — | ✓ | — | `.minimax/skills/` |
+| Muse Code | `muse` | ✓ | — | ✓ | `.agents/skills/` |
+| OpenClaw | `openclaw` | ✓ | ✓ | ✓ | `skills/` |
+| OpenCode | `opencode` | ✓ | ✓ | ✓ | `.opencode/skills/` |
+| Pi | `pi` | ✓ | ✓ | ✓ | `.pi/skills/` |
+| Oh-My-Pi | `omp` | ✓ | ✓ | ✓ | `.omp/skills/` |
+| Qoder CLI | `qodercli` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qoder CN CLI | `qoderclicn` | ✓ | ✓ | ✓ | `.qoder/skills/` |
+| Qwen Code | `qwen` | ✓ | ✓ | ✓ | `.qwen/skills/` |
+| QwenPaw | `qwenpaw` | ✓ | ✓ | — | 单次执行的工作区 `skills/` |
+| Reasonix | `reasonix` | ✓ | ✓ | ✓ | `.reasonix/skills/` |
+| Trae CLI | `traecli` | ✓ | ✓ | ✓ | `.traecli/skills/` |
+| Dim | `dim` | ✓ | ✓ | ✓ | — |
+| ZeroClaw | `zeroclaw` | ✓ | — | — | — |
+
+"Multica 管理 MCP"指可以在智能体配置中填写 MCP server,由 Multica 在执行前传给对应工具。这一列只说明 Multica 能否代为配置,不说明工具自身有没有别的 MCP 配置方式。
+
+"在 Multica 选模型"为 — 的工具,模型要在工具自己的配置里选,见[模型来源](#模型来源)。
## 模型来源
-创建智能体时,模型列表来自对应的运行时。有些工具提供固定的模型名称,有些会根据本机配置、登录账号和订阅权益返回可用模型。
+创建智能体时,模型列表来自对应的运行时。有的工具给出固定的模型名称,有的按本机配置、登录账号和订阅权益返回可用模型。
不选择模型时,Multica 使用该工具的默认设置。列表为空时,先确认运行时在线并且工具已经登录,再刷新模型列表。
-QwenPaw 和 MiniMax Code 是例外:它们不接受在 Multica 侧选择的模型,因此选择框不可用,显示为"由运行时管理"。请改在工具自身的配置里选择模型。模型列表为空属于正常情况,并不表示运行时离线。
+QwenPaw、MiniMax Code 和 ZeroClaw 例外:它们不接受在 Multica 侧选择的模型,选择框不可用,显示为"由运行时管理",模型要在工具自身的配置里选。它们的模型列表为空是正常的,不表示运行时离线。
DeepSeek Harness 的模型目录由运行时自身提供(`dsh --profile multica --list-models`)。它的模型 id 采用 `provider/model` 形式(例如 `deepseek-official/deepseek-chat`),请从列表中选择完整 id。
<Callout type="info">
-不同工具可能使用不同的模型名称。更换 AI 编程工具后,原有的模型值在新工具中无效,需要重新选择。
+各工具的模型名称不通用。更换 AI 编程工具后,原来的模型值在新工具中无效,需要重新选择。
</Callout>
## 会话恢复
-表格中标记 ✓ 的工具支持在后续执行中继续已有会话。前提是原来的会话仍然存在,并且运行由能够访问它的运行时执行。MiniMax Code 0.1.2 尚未通过 ACP 声明会话加载能力,因此后续执行会新建 MCode 会话。
+表格中标 ✓ 的工具支持在后续执行中继续已有会话,前提是原会话还在,并且运行由能访问它的运行时执行。MiniMax Code 0.1.2 尚未通过 ACP 声明会话加载能力,因此后续执行会新建 MCode 会话。
-Multica 会保存工具返回的会话标识。下一次在同一任务中继续工作时,运行时会尝试恢复这段会话;无法恢复时,会创建一个新会话继续执行。Pi 保存的是本地会话文件路径,因此更依赖原来的电脑和文件。
+Multica 保存工具返回的会话标识。下次在同一任务中继续工作时,运行时先尝试恢复这段会话,恢复不了就新建会话接着执行。Pi 保存的是本地会话文件路径,所以更依赖原来的电脑和文件。
有关重试和会话恢复的规则,见 [运行](/tasks#手动重试)。
## MCP 配置
-Antigravity、GitHub Copilot CLI 和 DevEco Code 暂不读取智能体中的 MCP 配置,因此创建智能体时不会显示这一项。
+Antigravity、GitHub Copilot CLI、DevEco Code、Muse Code 和 ZeroClaw 暂不读取智能体中的 MCP 配置,创建智能体时不显示这一项。
向 Pi 下发受管 MCP 配置需要 Pi 0.99.0 或更高版本。旧版 Pi 仍可运行未配置 MCP 的智能体。
@@ -81,11 +85,13 @@ Antigravity、GitHub Copilot CLI 和 DevEco Code 暂不读取智能体中的 MCP
MCP server 的命令、参数和环境变量会随智能体配置保存在服务器端。不要把不需要共享的本地凭据直接写入配置。
</Callout>
+运行时所在电脑上已经配置的 MCP server,会在那台电脑上和智能体的配置合并,见[本机 MCP 配置](/daemon-runtimes#local-mcp)。
+
## Skill 注入方式
-执行开始前,Multica 会把智能体绑定的 skill 写入上表对应的位置,让工具通过自己的原生机制发现它们。
+执行开始前,Multica 把智能体绑定的 skill 写入上表对应的位置,工具用自己的原生机制发现它们。
-仓库里原本存在的 skill 不会被覆盖。如果名称冲突,Multica 会为注入的副本使用另一个目录名;执行结束后,只清理自己创建的文件。
+仓库里原有的 skill 不会被覆盖。名称冲突时,Multica 给注入的副本换一个目录名;执行结束后,只清理自己创建的文件。
Codex、Hermes 和 OpenClaw 的处理稍有不同:
diff --git a/apps/docs/content/docs/quick-actions.fr.mdx b/apps/docs/content/docs/quick-actions.fr.mdx
index 0a03493e02..299c2c96a1 100644
--- a/apps/docs/content/docs/quick-actions.fr.mdx
+++ b/apps/docs/content/docs/quick-actions.fr.mdx
@@ -3,7 +3,10 @@ title: Actions rapides
description: Enregistrez une demande fréquente pour l’utiliser dans une tâche sans la réécrire.
---
-Les actions rapides transforment vos demandes fréquentes en boutons sur une tâche. Enregistrez une fois qui appeler et quoi lui demander, puis réutilisez cette demande sur d’autres tâches.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { QuickActionDemo } from "@/components/demos/quick-action-demo";
+
+Les actions rapides transforment vos demandes fréquentes en boutons sur une tâche. Enregistrez une fois qui appeler et quoi lui demander, puis réutilisez cette demande d’un clic sur d’autres tâches.
Par exemple, créez **Revue de code** pour votre agent de revue avec cette consigne :
@@ -20,17 +23,41 @@ Dans l’application web ou de bureau, vous avez deux possibilités :
| **Actions rapides** dans la barre latérale de la tâche | Un clic publie immédiatement la demande enregistrée. Si un agent ou un squad est choisi, vous lui demandez de travailler sur cette tâche. |
| Saisir `/` dans le champ de commentaire | Choisissez une action pour insérer sa demande dans un brouillon. Adaptez-la à cette tâche, puis envoyez-la. La sélection seule ne publie rien. |
+<QuickActionDemo />
+
Utiliser une action rapide ne change ni le responsable ni le statut de la tâche. Suivez les réponses dans la discussion et la progression de l’agent dans le [journal d’exécution](/tasks).
Une action avec **Aucune cible** publie le message enregistré sans @mentionner qui que ce soit. Elle convient aux listes de vérification et aux réponses fréquentes.
## Créer une action rapide
-1. Ouvrez **Paramètres → Actions rapides**, puis **Nouvelle action rapide**.
-2. Donnez-lui un nom court qui décrit la demande, comme **Revue de code** ou **Résumer l’avancement**.
-3. Choisissez **Moi uniquement** pour un usage personnel ou **Équipe** pour la partager dans l’espace de travail. Créer et gérer les actions d’équipe demande le rôle `owner` ou `admin` ; les membres choisissent **Moi uniquement**.
-4. Dans **S’exécute en tant que**, choisissez un agent ou un squad, ou **Aucune cible** pour enregistrer un message sans mention.
-5. Rédigez la demande dans **Invite**, telle qu’elle doit être envoyée, puis enregistrez. Elle est envoyée telle quelle ; les variables ne sont pas prises en charge.
+<Steps>
+<Step>
+
+Ouvrez **Paramètres → Actions rapides**, puis **Nouvelle action rapide**.
+
+</Step>
+<Step>
+
+Donnez-lui un nom court qui décrit la demande, comme **Revue de code** ou **Résumer l’avancement**.
+
+</Step>
+<Step>
+
+Choisissez **Moi uniquement** pour un usage personnel ou **Équipe** pour la partager dans l’espace de travail. Créer et gérer les actions d’équipe demande le rôle `owner` ou `admin` ; les membres choisissent **Moi uniquement**.
+
+</Step>
+<Step>
+
+Dans **S’exécute en tant que**, choisissez un agent ou un squad, ou **Aucune cible** pour enregistrer un message sans mention.
+
+</Step>
+<Step>
+
+Rédigez la demande dans **Invite**, telle qu’elle doit être envoyée, puis enregistrez. Elle est envoyée telle quelle ; les variables ne sont pas prises en charge.
+
+</Step>
+</Steps>
Une action d’équipe doit utiliser un agent que tous les membres peuvent appeler. Pour un squad, cette condition concerne son leader. Une action personnelle peut utiliser les agents que vous avez le droit d’appeler.
@@ -38,11 +65,11 @@ Une action d’équipe doit utiliser un agent que tous les membres peuvent appel
## Gérer les actions enregistrées
-Revenez dans **Paramètres → Actions rapides** pour modifier, archiver ou restaurer une action. Archivez-la si vous pensez la réutiliser plus tard. La suppression retire l’action enregistrée ; les commentaires et les exécutions précédentes restent.
+Dans **Paramètres → Actions rapides**, vous pouvez modifier, archiver ou restaurer une action. Archivez-la si vous n’en avez pas besoin maintenant mais pensez la réutiliser. La suppression retire l’action enregistrée ; les commentaires et les exécutions précédentes restent.
-Si aucune action personnelle ou d’équipe n’est disponible pour vous, la barre latérale de la tâche n’affiche pas la section Actions rapides.
+Si vous ne voyez aucune action personnelle ou d’équipe, la barre latérale de la tâche n’affiche pas la section Actions rapides. La liste de la barre latérale n’est pas filtrée selon les droits d’appel : ils sont vérifiés au moment du clic.
-Si une action ne peut pas appeler son agent, demandez à un administrateur de vérifier l’agent choisi et ses droits d’appel. Si l’ordinateur de l’agent est hors ligne, le travail n’a pas encore commencé ; consultez le [dépannage](/troubleshooting).
+Si un clic vous indique que l’action ne peut pas s’exécuter, demandez à un administrateur de vérifier l’agent de cette action et ses droits d’appel. Si l’ordinateur de l’agent est hors ligne, le travail commencera quand il sera de nouveau en ligne ; consultez le [dépannage](/troubleshooting).
## Guides associés
diff --git a/apps/docs/content/docs/quick-actions.ja.mdx b/apps/docs/content/docs/quick-actions.ja.mdx
index a2c0a841ad..1f01943f9f 100644
--- a/apps/docs/content/docs/quick-actions.ja.mdx
+++ b/apps/docs/content/docs/quick-actions.ja.mdx
@@ -3,7 +3,10 @@ title: クイックアクション
description: よく使う依頼を保存し、タスクごとに書き直さずに使えます。
---
-クイックアクションは、繰り返し使う依頼をタスクのボタンにする機能です。誰に何を頼むかを一度保存すれば、ほかのタスクでも同じ依頼を使えます。
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { QuickActionDemo } from "@/components/demos/quick-action-demo";
+
+クイックアクションは、繰り返し使う依頼をタスクのボタンにする機能です。誰に何を頼むかを一度保存しておけば、ほかのタスクでもクリックひとつで使えます。
たとえば、レビューエージェント向けに**コードレビュー**を作り、次のように書きます。
@@ -20,17 +23,41 @@ Web またはデスクトップアプリでは、2 通りの使い方があり
| タスクのサイドバーの**クイックアクション** | クリックすると保存した依頼をすぐに投稿します。エージェントやスクワッドを設定していれば、その相手に作業を依頼します。 |
| コメント欄で `/` を入力 | アクションを選ぶと、依頼が下書きに入ります。今回の内容に合わせて編集し、準備ができたら送信します。選ぶだけでは投稿されません。 |
+<QuickActionDemo />
+
クイックアクションを使うこと自体では、担当者やステータスは変わりません。返信はタスクの議論で、エージェントの進み具合は[実行ログ](/tasks)で確認できます。
**対象なし**のアクションは、誰も @メンションせずに保存した文章を投稿します。チェックリストや定型の返信に使えます。
## クイックアクションを作る
-1. **設定 → クイックアクション**で**クイックアクションを作成**を選びます。
-2. **コードレビュー**や**進捗の要約**など、用途が分かる短い名前を付けます。
-3. 個人用なら**自分のみ**、ワークスペースで共有するなら**チーム**を選びます。チーム用の作成・管理には `owner` または `admin` 権限が必要です。メンバーは**自分のみ**を選んでください。
-4. **実行者**でエージェントかスクワッドを選びます。メンションのない文章だけを保存したい場合は**対象なし**を選びます。
-5. **プロンプト**に送信したい依頼を書き、保存します。書いたとおりに送信され、変数は使えません。
+<Steps>
+<Step>
+
+**設定 → クイックアクション**で**クイックアクションを作成**を選びます。
+
+</Step>
+<Step>
+
+**コードレビュー**や**進捗の要約**など、用途が分かる短い名前を付けます。
+
+</Step>
+<Step>
+
+個人用なら**自分のみ**、ワークスペースで共有するなら**チーム**を選びます。チーム用の作成・管理には `owner` または `admin` 権限が必要です。メンバーは**自分のみ**を選んでください。
+
+</Step>
+<Step>
+
+**実行者**でエージェントかスクワッドを選びます。メンションのない文章だけを保存したい場合は**対象なし**を選びます。
+
+</Step>
+<Step>
+
+**プロンプト**に送信したい依頼を書き、保存します。書いたとおりに送信され、変数は使えません。
+
+</Step>
+</Steps>
チーム用では、ワークスペースの全員が呼び出せるエージェントを選びます。スクワッドの場合はリーダーに同じ条件が当てはまります。個人用では、自分が呼び出せるエージェントを使えます。
@@ -38,11 +65,11 @@ Web またはデスクトップアプリでは、2 通りの使い方があり
## 保存したアクションを管理する
-**設定 → クイックアクション**で編集、アーカイブ、復元ができます。あとで使う可能性がある場合はアーカイブします。削除すると保存したアクションはなくなりますが、過去のコメントや実行記録は残ります。
+**設定 → クイックアクション**で編集、アーカイブ、復元ができます。今は使わないけれどあとで使うかもしれないものはアーカイブします。削除すると保存したアクションはなくなりますが、過去のコメントや実行記録は残ります。
-使える個人用・チーム用のアクションがない場合、タスクのサイドバーにはクイックアクション欄が表示されません。
+見られる個人用・チーム用のアクションがない場合、タスクのサイドバーにはクイックアクション欄が表示されません。サイドバーの一覧は呼び出し権限で絞り込まれず、クリックしたときに権限が確認されます。
-エージェントを呼び出せない場合は、管理者に実行者と呼び出し権限の確認を依頼してください。コンピューターがオフラインなら作業はまだ始まりません。[トラブルシューティング](/troubleshooting)を参照してください。
+クリックして実行できないと表示された場合は、管理者にそのアクションの実行者と呼び出し権限の確認を依頼してください。エージェントのコンピューターがオフラインなら、作業はオンラインに戻ってから始まります。[トラブルシューティング](/troubleshooting)を参照してください。
## 関連ガイド
diff --git a/apps/docs/content/docs/quick-actions.ko.mdx b/apps/docs/content/docs/quick-actions.ko.mdx
index a707010446..b28db17253 100644
--- a/apps/docs/content/docs/quick-actions.ko.mdx
+++ b/apps/docs/content/docs/quick-actions.ko.mdx
@@ -3,7 +3,10 @@ title: 퀵 액션
description: 자주 쓰는 요청을 저장해 태스크마다 다시 작성하지 않고 사용합니다.
---
-퀵 액션은 자주 하는 요청을 태스크의 버튼으로 만들어 줍니다. 누구에게 무엇을 부탁할지 한 번 저장하면 다른 태스크에서도 같은 요청을 사용할 수 있습니다.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { QuickActionDemo } from "@/components/demos/quick-action-demo";
+
+퀵 액션은 자주 하는 요청을 태스크의 버튼으로 만들어 줍니다. 누구에게 무엇을 부탁할지 한 번 저장해 두면 다른 태스크에서도 클릭 한 번으로 다시 쓸 수 있습니다.
예를 들어 리뷰 에이전트용 **코드 리뷰**를 만들고 다음 요청을 저장합니다.
@@ -20,17 +23,41 @@ description: 자주 쓰는 요청을 저장해 태스크마다 다시 작성하
| 태스크 사이드바의 **퀵 액션** | 클릭하면 저장한 요청을 바로 게시합니다. 에이전트나 스쿼드가 지정되어 있으면 해당 태스크의 작업을 요청합니다. |
| 댓글 입력창에서 `/` 입력 | 액션을 선택하면 요청이 초안에 들어갑니다. 이번 태스크에 맞게 고친 뒤 준비되면 전송합니다. 선택만 해서는 게시되지 않습니다. |
+<QuickActionDemo />
+
퀵 액션을 사용하는 것 자체로는 담당자나 상태가 바뀌지 않습니다. 답변은 태스크 논의에서, 에이전트의 진행 상황은 [실행 로그](/tasks)에서 확인합니다.
**대상 없음** 액션은 누구도 @멘션하지 않고 저장한 메시지를 게시합니다. 체크리스트나 자주 쓰는 답변에 적합합니다.
## 퀵 액션 만들기
-1. **설정 → 퀵 액션**에서 **퀵 액션 만들기**를 선택합니다.
-2. **코드 리뷰**, **진행 상황 요약**처럼 용도를 알 수 있는 짧은 이름을 정합니다.
-3. 개인용이면 **나만**, 워크스페이스와 공유하려면 **팀**을 선택합니다. 팀 액션을 만들고 관리하려면 `owner` 또는 `admin` 권한이 필요하며, 멤버는 **나만**을 선택하세요.
-4. **실행자**에서 에이전트나 스쿼드를 선택합니다. 멘션 없는 메시지만 저장하려면 **대상 없음**을 선택합니다.
-5. **프롬프트**에 전송할 요청을 작성하고 저장합니다. 작성한 그대로 전송되며 변수는 지원하지 않습니다.
+<Steps>
+<Step>
+
+**설정 → 퀵 액션**에서 **퀵 액션 만들기**를 선택합니다.
+
+</Step>
+<Step>
+
+**코드 리뷰**, **진행 상황 요약**처럼 용도를 알 수 있는 짧은 이름을 정합니다.
+
+</Step>
+<Step>
+
+개인용이면 **나만**, 워크스페이스와 공유하려면 **팀**을 선택합니다. 팀 액션을 만들고 관리하려면 `owner` 또는 `admin` 권한이 필요하며, 멤버는 **나만**을 선택하세요.
+
+</Step>
+<Step>
+
+**실행자**에서 에이전트나 스쿼드를 선택합니다. 멘션 없는 메시지만 저장하려면 **대상 없음**을 선택합니다.
+
+</Step>
+<Step>
+
+**프롬프트**에 전송할 요청을 작성하고 저장합니다. 작성한 그대로 전송되며 변수는 지원하지 않습니다.
+
+</Step>
+</Steps>
팀 액션에는 워크스페이스의 모든 멤버가 호출할 수 있는 에이전트를 사용해야 합니다. 스쿼드라면 리더에게 같은 조건이 적용됩니다. 개인 액션에는 자신이 호출할 수 있는 에이전트를 사용할 수 있습니다.
@@ -38,11 +65,11 @@ description: 자주 쓰는 요청을 저장해 태스크마다 다시 작성하
## 저장한 액션 관리하기
-**설정 → 퀵 액션**에서 편집, 보관, 복원을 할 수 있습니다. 나중에 다시 쓸 수 있다면 보관하세요. 삭제하면 저장한 액션은 사라지지만 이전 댓글과 실행 기록은 남습니다.
+**설정 → 퀵 액션**에서 편집, 보관, 복원을 할 수 있습니다. 지금은 안 쓰지만 나중에 다시 쓸 수 있다면 보관하세요. 삭제하면 저장한 액션은 사라지지만 이전 댓글과 실행 기록은 남습니다.
-사용할 수 있는 개인 또는 팀 액션이 없다면 태스크 사이드바에 퀵 액션 영역이 표시되지 않습니다.
+볼 수 있는 개인 또는 팀 액션이 없다면 태스크 사이드바에 퀵 액션 영역이 표시되지 않습니다. 사이드바 목록은 호출 권한으로 걸러지지 않으며, 클릭할 때 권한을 확인합니다.
-에이전트를 호출할 수 없다면 관리자에게 실행자와 호출 권한 확인을 요청하세요. 에이전트의 컴퓨터가 오프라인이면 아직 작업이 시작되지 않습니다. [문제 해결](/troubleshooting)을 참고하세요.
+클릭했을 때 실행할 수 없다는 안내가 나오면 관리자에게 해당 액션의 실행자와 호출 권한 확인을 요청하세요. 에이전트의 컴퓨터가 오프라인이면 다시 온라인이 될 때까지 작업이 시작되지 않습니다. [문제 해결](/troubleshooting)을 참고하세요.
## 관련 가이드
diff --git a/apps/docs/content/docs/quick-actions.mdx b/apps/docs/content/docs/quick-actions.mdx
index 9df584d4a6..603cdafe53 100644
--- a/apps/docs/content/docs/quick-actions.mdx
+++ b/apps/docs/content/docs/quick-actions.mdx
@@ -3,7 +3,10 @@ title: Quick Actions
description: Save a frequent request and use it from an issue without writing it again.
---
-Quick Actions turn requests you use often into buttons on an issue. Save who to ask and what to say once, then use the same request on other issues.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { QuickActionDemo } from "@/components/demos/quick-action-demo";
+
+Quick Actions turn requests you use often into buttons on an issue. Save who to ask and what to say once, and reuse it on other issues with a click.
For example, create **Code Review** for your review agent with this prompt:
@@ -20,17 +23,41 @@ In the web or desktop app, there are two ways to use an action:
| **Quick Actions** in the issue sidebar | Click an action to post its saved request immediately. If it has an agent or squad, it asks them to work on this issue. |
| Type `/` in the comment box | Choose an action to insert its request as a draft. Edit it for this issue, then send when ready. Nothing is posted just by choosing it. |
+<QuickActionDemo />
+
Using a quick action does not change the issue's assignee or status. Follow the reply in the issue's discussion and check the [execution log](/tasks) for the agent's progress.
An action with **No target** posts the saved message without @mentioning anyone. Use it for a checklist or a response you often write.
## Create a quick action
-1. Open **Settings → Quick Actions** and choose **New quick action**.
-2. Give it a short name that describes the request, such as **Code Review** or **Summarize progress**.
-3. Choose **Just me** for your own use, or **Team** to share it with the workspace. Creating and managing Team actions requires `owner` or `admin` permissions; members should choose **Just me**.
-4. Choose an agent or squad under **Runs as**, or choose **No target** to save a message without a mention.
-5. Write the **Prompt** as you want it sent, then save. It is sent as written; variables are not supported.
+<Steps>
+<Step>
+
+Open **Settings → Quick Actions** and choose **New quick action**.
+
+</Step>
+<Step>
+
+Give it a short name that describes the request, such as **Code Review** or **Summarize progress**.
+
+</Step>
+<Step>
+
+Choose **Just me** for your own use, or **Team** to share it with the workspace. Creating and managing Team actions requires `owner` or `admin` permissions; members should choose **Just me**.
+
+</Step>
+<Step>
+
+Choose an agent or squad under **Runs as**, or choose **No target** to save a message without a mention.
+
+</Step>
+<Step>
+
+Write the **Prompt** as you want it sent, then save. It is sent as written; variables are not supported.
+
+</Step>
+</Steps>
Team actions that call an agent must use one everyone in the workspace can run. For a squad, this applies to its leader. Personal actions can use agents you have permission to run.
@@ -38,11 +65,11 @@ Team actions that call an agent must use one everyone in the workspace can run.
## Manage saved actions
-Return to **Settings → Quick Actions** to edit an action, archive it, or restore an archived one. Archive an action to remove it from everyday use while keeping it for later. Deleting it removes the saved action; past comments and run records stay.
+In **Settings → Quick Actions** you can edit an action, archive it, or restore an archived one. Archive an action you don't need now but may want later. Deleting it removes the saved action; past comments and run records stay.
-If no actions have been created for you or your team, the issue sidebar does not show a Quick Actions section.
+When there are no personal or Team actions you can see, the issue sidebar does not show a Quick Actions section. The sidebar list is not filtered by who can run each action; permission is checked when you click one.
-If an action cannot call its agent, ask an admin to check the selected agent and who can run it. An agent that is waiting for its computer to come online has not started yet; see [Troubleshooting](/troubleshooting).
+If clicking an action tells you it can't run, ask an admin to check the action's agent and who can run it. If the agent's computer is offline, the work starts once it comes back online; see [Troubleshooting](/troubleshooting).
## Related guides
diff --git a/apps/docs/content/docs/quick-actions.zh.mdx b/apps/docs/content/docs/quick-actions.zh.mdx
index d570285d4b..3897296cd3 100644
--- a/apps/docs/content/docs/quick-actions.zh.mdx
+++ b/apps/docs/content/docs/quick-actions.zh.mdx
@@ -3,7 +3,10 @@ title: 快捷操作
description: 把常用请求保存下来,在任务中使用时不用重新写一遍。
---
-快捷操作把经常提出的请求变成任务上的按钮。保存一次"请谁来做、做什么",之后就能在其他任务上重复使用。
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { QuickActionDemo } from "@/components/demos/quick-action-demo";
+
+快捷操作把经常提出的请求变成任务上的按钮。"请谁来做、做什么"保存一次,之后在别的任务上点一下就能再用。
例如,给审查智能体创建一个**代码审查**操作,提示词写成:
@@ -20,17 +23,41 @@ description: 把常用请求保存下来,在任务中使用时不用重新写
| 任务侧栏的**快捷操作** | 点击后立即发布保存好的请求。如果设置了智能体或小队,就会请它处理这条任务。 |
| 在评论框输入 `/` | 选择操作,把请求放进草稿。可以按这次的需要修改,确认后再发送;仅选择操作不会发布。 |
-使用快捷操作本身不会改变任务的负责人或状态。在任务讨论中查看回复,在[执行日志](/tasks)中查看智能体的进展。
+<QuickActionDemo />
+
+使用快捷操作不会改变任务的负责人或状态。在任务讨论中查看回复,在[执行日志](/tasks)中查看智能体的进展。
选择**无目标**的操作会发布预设消息,不 @任何人,适合保存检查清单或常用回复。
## 创建快捷操作
-1. 打开**设置 → 快捷操作**,选择**新建快捷操作**。
-2. 填写一个能说明用途的短名称,例如**代码审查**或**总结进展**。
-3. 选择**仅自己**使用,或选择**团队**分享给工作区。创建和管理团队操作需要 `owner` 或 `admin` 权限,成员请选择**仅自己**。
-4. 在**执行者**中选择智能体或小队;只想保存一段不带提及的消息时,选择**无目标**。
-5. 在**提示词**中写好要发送的请求,然后保存。提示词会原样发送,暂不支持变量。
+<Steps>
+<Step>
+
+打开**设置 → 快捷操作**,选择**新建快捷操作**。
+
+</Step>
+<Step>
+
+填写一个能说明用途的短名称,例如**代码审查**或**总结进展**。
+
+</Step>
+<Step>
+
+选择**仅自己**使用,或选择**团队**分享给工作区。创建和管理团队操作需要 `owner` 或 `admin` 权限,成员请选择**仅自己**。
+
+</Step>
+<Step>
+
+在**执行者**中选择智能体或小队;只想保存一段不带提及的消息时,选择**无目标**。
+
+</Step>
+<Step>
+
+在**提示词**中写好要发送的请求,然后保存。提示词会原样发送,暂不支持变量。
+
+</Step>
+</Steps>
团队操作使用的智能体必须允许所有工作区成员调用;如果选择小队,则需要其 leader 允许所有成员调用。个人操作可以使用你有权限调用的智能体。
@@ -38,11 +65,11 @@ description: 把常用请求保存下来,在任务中使用时不用重新写
## 管理已有操作
-回到**设置 → 快捷操作**,可以编辑、归档或恢复操作。暂时不用但以后可能还要用时,选择归档。删除会移除保存好的操作,已经发表的评论和历史运行记录会保留。
+在**设置 → 快捷操作**中可以编辑、归档或恢复操作。暂时不用、以后可能还要用的,归档即可。删除会移除保存好的操作,已经发表的评论和历史运行记录仍然保留。
-如果还没有你能使用的个人或团队操作,任务侧栏不会显示快捷操作区域。
+还没有你能看到的个人或团队操作时,任务侧栏不显示快捷操作区域。侧栏不按调用权限过滤,点击后才检查权限。
-如果某条操作无法调用智能体,请管理员检查执行者和调用权限。智能体的电脑离线时,工作还不会开始,可以按[故障排查](/troubleshooting)检查。
+点击后提示无法执行时,请管理员检查这条操作的执行者和调用权限。智能体所在的电脑离线时,工作要等它上线才会开始,排查方法见[故障排查](/troubleshooting)。
## 相关指引
diff --git a/apps/docs/content/docs/security-model.fr.mdx b/apps/docs/content/docs/security-model.fr.mdx
index 5c3e57e2e7..3cef755eb4 100644
--- a/apps/docs/content/docs/security-model.fr.mdx
+++ b/apps/docs/content/docs/security-model.fr.mdx
@@ -5,7 +5,7 @@ description: Ce à quoi une exécution Multica peut accéder sur la machine où
import { Callout } from "fumadocs-ui/components/callout";
-Lorsqu'un agent prend en charge une exécution, le daemon lance un outil de codage IA (Codex, Claude Code, etc.) en tant que processus enfant. Comprendre ce que ce processus peut toucher, c'est comprendre tout le modèle de sécurité.
+Lorsqu'un agent prend en charge une exécution, le daemon lance un outil de codage IA (Codex, Claude Code, etc.) en tant que processus enfant. Le modèle de sécurité de Multica se résume à ce que ce processus peut toucher.
## La frontière, c'est l'utilisateur du daemon
@@ -17,9 +17,7 @@ Multica ne garantit aucun bac à sable (sandbox) pour le système de fichiers. U
Multica n'isole pas le système de fichiers à votre place. Si le daemon tourne sous votre compte utilisateur personnel, une exécution peut lire vos clés SSH, modifier votre profil de shell et supprimer vos documents. L'isolation doit venir de la frontière dans laquelle vous placez le daemon.
</Callout>
-C'est un choix délibéré. Les agents doivent installer des dépendances, lancer des builds, utiliser vos CLI cloud et piloter des outils qui s'attendent à un répertoire personnel normal. Un sandbox partiel du système de fichiers casse ce travail d'une manière difficile à diagnostiquer — l'outil signale « not logged in » ou utilise silencieusement le mauvais compte — sans pour autant protéger ce qui compte le plus, puisqu'il ne peut pas empêcher une exécution de lire des identifiants et de les envoyer sur le réseau.
-
-Multica ne prétend donc pas être la frontière. Placez-en une autour de lui.
+C'est un choix délibéré. Les agents doivent installer des dépendances, lancer des builds, utiliser vos CLI cloud et piloter des outils qui s'attendent à un répertoire personnel normal. Un sandbox partiel du système de fichiers casse ce travail d'une manière difficile à diagnostiquer — l'outil signale « not logged in » ou utilise silencieusement le mauvais compte — sans pour autant protéger ce qui compte le plus, puisqu'il ne peut pas empêcher une exécution de lire des identifiants et de les envoyer sur le réseau. Multica ne se considère donc pas comme la frontière : celle-ci se place autour de lui.
## Configurations recommandées
diff --git a/apps/docs/content/docs/security-model.ja.mdx b/apps/docs/content/docs/security-model.ja.mdx
index bf497a3b29..8c42ebcd60 100644
--- a/apps/docs/content/docs/security-model.ja.mdx
+++ b/apps/docs/content/docs/security-model.ja.mdx
@@ -5,7 +5,7 @@ description: Multica の実行が処理先のマシン上で何にアクセス
import { Callout } from "fumadocs-ui/components/callout";
-エージェントが実行を受け取ると、デーモンは AI コーディングツール(Codex、Claude Code など)を子プロセスとして起動します。このプロセスが何に触れられるかを理解することが、セキュリティモデルのすべてです。
+エージェントが実行を受け取ると、デーモンは AI コーディングツール(Codex、Claude Code など)を子プロセスとして起動します。Multica のセキュリティモデルとは、このプロセスが何に触れられるかということです。
## 境界はデーモンを実行しているユーザー
@@ -17,9 +17,7 @@ Multica はファイルシステムのサンドボックスを一切保証しま
Multica はファイルシステムのサンドボックスを提供しません。デーモンを個人アカウントで動かしている場合、実行は SSH 秘密鍵を読み、シェルの設定を書き換え、ドキュメントを削除できます。分離はデーモンの外側に用意する必要があります。
</Callout>
-これは意図的な設計です。エージェントには依存関係のインストール、ビルドの実行、クラウド CLI の利用が求められ、これらのツールは通常のホームディレクトリがあることを前提にしています。中途半端なファイルシステムサンドボックスは、こうした作業を診断しづらい形で壊します(ツールが「ログインしていません」と言う、あるいは黙って別のアカウントを使う)。しかも最も重要な部分は守れません。実行が認証情報を読み取ってネットワーク経由で送信することは止められないからです。
-
-そのため Multica は自らを境界とは称しません。外側に境界を用意してください。
+これは意図的な設計です。エージェントには依存関係のインストール、ビルドの実行、クラウド CLI の利用が求められ、これらのツールは通常のホームディレクトリがあることを前提にしています。中途半端なファイルシステムサンドボックスは、こうした作業を診断しづらい形で壊します(ツールが「ログインしていません」と言う、あるいは黙って別のアカウントを使う)。しかも最も重要な部分は守れません。実行が認証情報を読み取ってネットワーク経由で送信することは止められないからです。そのため Multica は自らを境界とはみなしません。境界はその外側に置きます。
## 推奨構成
diff --git a/apps/docs/content/docs/security-model.ko.mdx b/apps/docs/content/docs/security-model.ko.mdx
index eac52327db..362220c325 100644
--- a/apps/docs/content/docs/security-model.ko.mdx
+++ b/apps/docs/content/docs/security-model.ko.mdx
@@ -5,7 +5,7 @@ description: Multica 실행이 처리 컴퓨터에서 접근할 수 있는 범
import { Callout } from "fumadocs-ui/components/callout";
-에이전트가 실행을 맡으면 데몬은 AI 코딩 도구(Codex, Claude Code 등)를 자식 프로세스로 실행합니다. 이 프로세스가 무엇에 접근할 수 있는지 이해하는 것이 보안 모델의 전부입니다.
+에이전트가 실행을 맡으면 데몬은 AI 코딩 도구(Codex, Claude Code 등)를 자식 프로세스로 실행합니다. Multica의 보안 모델은 이 프로세스가 무엇에 접근할 수 있는가에 관한 것입니다.
## 경계는 데몬을 실행하는 사용자
@@ -17,9 +17,7 @@ Multica는 파일 시스템 샌드박스를 보장하지 않습니다. 현재
Multica는 파일 시스템 샌드박스를 제공하지 않습니다. 데몬을 개인 계정으로 실행 중이라면 실행이 SSH 키를 읽고, 셸 설정을 수정하고, 문서를 삭제할 수 있습니다. 격리는 데몬 바깥에 직접 마련해야 합니다.
</Callout>
-이는 의도된 설계입니다. 에이전트는 의존성 설치, 빌드 실행, 클라우드 CLI 사용을 요구받으며, 이런 도구들은 정상적인 홈 디렉터리를 전제로 동작합니다. 불완전한 파일 시스템 샌드박스는 이런 작업을 진단하기 어려운 방식으로 망가뜨립니다(도구가 "로그인되지 않음"이라고 하거나, 조용히 잘못된 계정을 사용). 그러면서도 정작 가장 중요한 것은 보호하지 못합니다. 실행이 자격 증명을 읽어 네트워크로 내보내는 것은 막을 수 없기 때문입니다.
-
-그래서 Multica는 스스로를 경계라고 주장하지 않습니다. 바깥에 경계를 두세요.
+이는 의도된 설계입니다. 에이전트는 의존성 설치, 빌드 실행, 클라우드 CLI 사용을 요구받으며, 이런 도구들은 정상적인 홈 디렉터리를 전제로 동작합니다. 불완전한 파일 시스템 샌드박스는 이런 작업을 진단하기 어려운 방식으로 망가뜨립니다(도구가 "로그인되지 않음"이라고 하거나, 조용히 잘못된 계정을 사용). 그러면서도 정작 가장 중요한 것은 보호하지 못합니다. 실행이 자격 증명을 읽어 네트워크로 내보내는 것은 막을 수 없기 때문입니다. 그래서 Multica는 스스로를 경계로 여기지 않으며, 경계는 그 바깥에 둡니다.
## 권장 구성
diff --git a/apps/docs/content/docs/security-model.mdx b/apps/docs/content/docs/security-model.mdx
index ace4f520ca..3f89cabb70 100644
--- a/apps/docs/content/docs/security-model.mdx
+++ b/apps/docs/content/docs/security-model.mdx
@@ -5,7 +5,7 @@ description: What a Multica run can reach on the machine that executes it, and w
import { Callout } from "fumadocs-ui/components/callout";
-When an agent picks up a run, the daemon spawns an AI coding tool (Codex, Claude Code, and so on) as a child process. Understanding what that process can touch is the whole security model.
+When an agent picks up a run, the daemon spawns an AI coding tool (Codex, Claude Code, and so on) as a child process. Multica's security model comes down to what that process can touch.
## The boundary is the daemon user
@@ -17,9 +17,7 @@ Multica makes no filesystem-sandbox guarantee. One narrow exception exists today
Multica does not sandbox the filesystem for you. If the daemon runs as your personal user account, a run can read your SSH keys, edit your shell profile, and delete your documents. Isolation has to come from the boundary you put the daemon in.
</Callout>
-This is deliberate. Agents are asked to install dependencies, run builds, use your cloud CLIs, and drive tooling that expects a normal home directory. A partial filesystem sandbox breaks that work in ways that are hard to diagnose — the tool reports "not logged in" or silently uses the wrong account — while still not protecting the thing that matters most, since it cannot stop a run from reading credentials and sending them over the network.
-
-So Multica does not pretend to be the boundary. Put one around it.
+This is deliberate. Agents are asked to install dependencies, run builds, use your cloud CLIs, and drive tooling that expects a normal home directory. A partial filesystem sandbox breaks that work in ways that are hard to diagnose — the tool reports "not logged in" or silently uses the wrong account — while still not protecting the thing that matters most, since it cannot stop a run from reading credentials and sending them over the network. So Multica does not treat itself as the boundary; the boundary goes around it.
## Recommended setups
diff --git a/apps/docs/content/docs/security-model.zh.mdx b/apps/docs/content/docs/security-model.zh.mdx
index ec48b31921..7c5e928ecf 100644
--- a/apps/docs/content/docs/security-model.zh.mdx
+++ b/apps/docs/content/docs/security-model.zh.mdx
@@ -5,7 +5,7 @@ description: 一个 Multica 运行能访问运行它的机器上的哪些内容
import { Callout } from "fumadocs-ui/components/callout";
-当智能体接到运行时,守护进程会把 AI 编程工具(Codex、Claude Code 等)作为子进程启动。理解这个进程能碰到什么,就理解了全部安全模型。
+当智能体接到运行时,守护进程会把 AI 编程工具(Codex、Claude Code 等)作为子进程启动。Multica 的安全模型,说的就是这个进程能碰到什么。
## 边界是运行守护进程的那个用户
@@ -17,9 +17,7 @@ Multica 不对文件系统沙箱作任何保证。目前只有一个狭窄的例
Multica 不会替你做文件系统沙箱。如果守护进程跑在你的个人账号下,运行可以读取你的 SSH 私钥、修改你的 shell 配置、删除你的文档。隔离必须来自你为守护进程设置的外层边界。
</Callout>
-这是有意为之。智能体需要安装依赖、执行构建、使用你的云 CLI,这些工具都假设自己面对一个正常的 home 目录。不完整的文件系统沙箱会以极难排查的方式破坏这些工作——工具报"未登录",或者悄悄用错了账号——同时又保护不了最要紧的东西:它无法阻止运行读取凭据并通过网络发出去。
-
-所以 Multica 不假装自己是边界。请在它外面加一层。
+这是有意为之。智能体需要安装依赖、执行构建、使用你的云 CLI,这些工具都假设自己面对一个正常的 home 目录。不完整的文件系统沙箱会以极难排查的方式破坏这些工作——工具报"未登录",或者悄悄用错了账号——同时又保护不了最要紧的东西:它无法阻止运行读取凭据并通过网络发出去。所以 Multica 不把自己当作边界,边界要加在它外面。
## 推荐部署方式
@@ -36,7 +34,7 @@ Multica 不会替你做文件系统沙箱。如果守护进程跑在你的个人
以下是真实存在的隔离,但它们属于便利性与影响面收敛,**不是**用来防御主动逃逸的安全边界:
- **每次运行独立工作目录。** 每个运行在 `~/multica_workspaces/` 下拥有独立 workdir,并发运行不会在同一份 checkout 上打架。
-- **每次运行独立的智能体状态。** Codex 运行拥有运行级 `CODEX_HOME`,保存配置、会话与技能,不会污染你的 `~/.codex/`。
+- **每次运行独立的智能体状态。** Codex 运行拥有运行级 `CODEX_HOME`,保存配置、会话与 skill,不会污染你的 `~/.codex/`。
- **运行级 API token。** 交给运行的 `MULTICA_TOKEN` 由服务端绑定到该智能体与该运行,因此运行无法通过 Multica API 以你或其他智能体的身份行事。
## 不构成边界的部分
diff --git a/apps/docs/content/docs/self-host-quickstart.fr.mdx b/apps/docs/content/docs/self-host-quickstart.fr.mdx
index 6de98c74c9..b6b3bd433e 100644
--- a/apps/docs/content/docs/self-host-quickstart.fr.mdx
+++ b/apps/docs/content/docs/self-host-quickstart.fr.mdx
@@ -4,6 +4,9 @@ description: Démarrez Multica avec Docker Compose, connectez-vous, puis reliez
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
L'auto-hébergement de Multica comporte deux parties :
@@ -35,7 +38,10 @@ Multica utilise Compose v2, invoqué via `docker compose`. L'ancien `docker-comp
L'ordinateur doit également disposer d'au moins un [outil de codage IA](/providers) installé et connecté, comme Claude Code, Codex ou Cursor. Le CLI Multica est installé à l'étape 5.
-## 1. Démarrer Multica
+<Steps>
+<Step>
+
+## Démarrer Multica [#1-démarrer-multica]
Sur la machine qui fera tourner le service :
@@ -45,7 +51,10 @@ cd multica
make selfhost
```
-Au premier lancement, `make selfhost` :
+Relancer `make selfhost` réutilise le `.env` et les volumes existants ; les secrets ne sont pas régénérés.
+
+<Accordions>
+<Accordion title="Ce que fait make selfhost au premier lancement" id="what-make-selfhost-does">
1. Crée `.env` à partir de `.env.example`
2. Génère un `JWT_SECRET` aléatoire, un mot de passe PostgreSQL et une `MULTICA_VCS_SECRET_KEY` (la clé de chiffrement des intégrations Git auto-hébergées)
@@ -53,12 +62,13 @@ Au premier lancement, `make selfhost` :
4. Crée des volumes persistants et démarre les trois conteneurs
5. Attend que le backend commence à répondre aux vérifications d'état
-Relancer `make selfhost` réutilise le `.env` et les volumes existants ; les secrets ne sont pas régénérés.
+</Accordion>
+</Accordions>
<Callout type="info">
`make selfhost` télécharge les images publiées et ne compile pas le code de votre copie locale. Pour tester le code source local, utilisez `make selfhost-build`.
-Les images publiées suivent le **tag de version** le plus récent, alors qu'un simple `git clone` récupère `main`, qui a généralement de l'avance. Si vous compilez quoi que ce soit à partir de cette copie locale — le CLI, ou des images via `make selfhost-build` — basculez d'abord sur le tag de version correspondant, afin que les binaires compilés et les conteneurs en cours d'exécution restent sur la même version :
+Les images publiées suivent le **tag de version** le plus récent, alors qu'un simple `git clone` récupère `main`, qui a généralement de l'avance. Si vous compilez quoi que ce soit à partir de cette copie locale (le CLI, ou des images via `make selfhost-build`), basculez d'abord sur le tag de version correspondant, afin que les binaires compilés et les conteneurs en cours d'exécution restent sur la même version :
```bash
git fetch --tags --depth 1
@@ -66,7 +76,10 @@ git checkout $(git tag -l 'v*' --sort=-v:refname | head -1)
```
</Callout>
-## 2. Vérifier que les services sont prêts
+</Step>
+<Step>
+
+## Vérifier que les services sont prêts [#2-vérifier-que-les-services-sont-prêts]
Vérifiez l'état des conteneurs :
@@ -88,13 +101,18 @@ La réponse attendue est :
Le conteneur backend exécute les migrations de base de données à chaque démarrage, avant de servir les requêtes ; il n'y a aucune commande de migration manuelle à lancer.
-## 3. Choisir le mode d'accès
+</Step>
+<Step>
-### Accès local
+## Choisir le mode d'accès [#3-choisir-le-mode-daccès]
+
+<Tabs items={["Accès local", "Accès distant"]}>
+<Tab value="Accès local">
Ouvrez directement [http://localhost:3000](http://localhost:3000). Vous n'aurez pas non plus besoin de fournir d'URL lorsque vous lancerez `multica setup self-host` plus tard.
-### Accès distant
+</Tab>
+<Tab value="Accès distant" id="remote-access">
Docker Compose lie `3000` et `8080` uniquement à `127.0.0.1`. Ne remplacez pas cette valeur par `0.0.0.0` pour exposer les ports sur l'Internet public ; utilisez plutôt un proxy inverse avec HTTPS.
@@ -111,9 +129,12 @@ MULTICA_APP_URL=https://app.example.com
MULTICA_PUBLIC_URL=https://api.example.com
```
-Avec cette configuration, tout le trafic du navigateur reste sur le domaine de l'application : les cookies ne passent jamais d'un domaine à l'autre et `COOKIE_DOMAIN` n'est pas nécessaire. Si le navigateur communique plutôt directement avec le domaine de l'API, vous devez la définir — consultez [Variables d'environnement](/environment-variables).
+Avec cette configuration, tout le trafic du navigateur reste sur le domaine de l'application : les cookies ne passent jamais d'un domaine à l'autre et `COOKIE_DOMAIN` n'est pas nécessaire. Si le navigateur communique plutôt directement avec le domaine de l'API, vous devez la définir ; consultez [Variables d'environnement](/environment-variables).
+
+Configurez ensuite le DNS et placez Caddy en proxy devant les ports locaux. Caddy obtient les certificats TLS et relaie les WebSockets.
-Configurez ensuite le DNS et placez Caddy en proxy devant les ports locaux :
+<Tabs items={["Deux domaines", "Origine unique"]}>
+<Tab value="Deux domaines">
```text
app.example.com {
@@ -138,17 +159,18 @@ api.example.com {
}
```
-Si vous préférez tout servir sur une **origine unique** (un seul domaine, ou un seul hôte avec un seul port — courant sur les petits serveurs), routez explicitement vers le backend les chemins indispensables au daemon et laissez le frontend gérer le reste :
+</Tab>
+<Tab value="Origine unique">
```text
multica.example.com {
# Sonde d'accessibilité du CLI : `multica setup` envoie un GET à <server-url>/health et
- # attend un 200 — les anciennes versions web ne le relaient pas, il faut donc le router directement
+ # attend un 200 ; les anciennes versions web ne le relaient pas, il faut donc le router directement
handle /health {
reverse_proxy 127.0.0.1:8080
}
- # WebSocket temps réel du navigateur — l'image web ne peut pas relayer les upgrades WS
+ # WebSocket temps réel du navigateur : l'image web ne peut pas relayer les upgrades WS
handle /ws {
reverse_proxy 127.0.0.1:8080 {
flush_interval -1
@@ -171,9 +193,12 @@ multica.example.com {
}
```
-Avec une origine unique, faites pointer les deux URL vers celle-ci (`FRONTEND_ORIGIN` et `MULTICA_APP_URL` dans `.env`, puis `--server-url` et `--app-url` dans `multica setup self-host`).
+</Tab>
+</Tabs>
+
+L'**origine unique** (un seul domaine, ou un seul hôte avec un seul port, courant sur les petits serveurs) route explicitement vers le backend les chemins indispensables au daemon et laisse le frontend gérer le reste. Faites alors pointer les deux URL vers elle : `FRONTEND_ORIGIN` et `MULTICA_APP_URL` dans `.env`, puis `--server-url` et `--app-url` dans `multica setup self-host`.
-Caddy obtient les certificats TLS et relaie les WebSockets. Après avoir modifié `.env`, recréez les conteneurs avec `up -d` pour que la nouvelle configuration soit prise en compte :
+Après avoir modifié `.env`, recréez les conteneurs avec `up -d` pour que la nouvelle configuration soit prise en compte :
```bash
docker compose -f docker-compose.selfhost.yml up -d
@@ -181,13 +206,27 @@ curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'
```
-La dernière commande affiche `daemon_server_url`, l'URL que les daemons utilisent pour joindre l'API : `MULTICA_DAEMON_SERVER_URL` si elle est définie, puis `MULTICA_PUBLIC_URL`, sinon l'URL de l'application — `MULTICA_APP_URL`, avec `FRONTEND_ORIGIN` en repli. Lorsque ni `MULTICA_APP_URL` ni `FRONTEND_ORIGIN` n'est défini, le champ est entièrement omis de la réponse (le grep n'affiche donc rien), même si `MULTICA_DAEMON_SERVER_URL` ou `MULTICA_PUBLIC_URL` est défini. S'il affiche une adresse `localhost`, `.env` contient encore les valeurs locales par défaut : définissez explicitement `FRONTEND_ORIGIN` et `MULTICA_APP_URL` avec les URL publiques au lieu de vous appuyer sur les références `${FRONTEND_PORT}` copiées depuis `.env.example`, puis recréez les conteneurs.
+La dernière commande affiche `daemon_server_url`, l'URL que les daemons utilisent pour joindre l'API. S'il affiche une adresse `localhost`, `.env` contient encore les valeurs locales par défaut : définissez explicitement `FRONTEND_ORIGIN` et `MULTICA_APP_URL` avec les URL publiques au lieu de vous appuyer sur les références `${FRONTEND_PORT}` copiées depuis `.env.example`, puis recréez les conteneurs.
+
+<Accordions>
+<Accordion title="Comment daemon_server_url est déterminée" id="how-daemon-server-url-is-resolved">
+
+`MULTICA_DAEMON_SERVER_URL` si elle est définie, puis `MULTICA_PUBLIC_URL`, sinon l'URL de l'application (`MULTICA_APP_URL`, avec `FRONTEND_ORIGIN` en repli). Lorsque ni `MULTICA_APP_URL` ni `FRONTEND_ORIGIN` n'est défini, le champ est entièrement omis de la réponse (le grep n'affiche donc rien), même si `MULTICA_DAEMON_SERVER_URL` ou `MULTICA_PUBLIC_URL` est défini.
+
+</Accordion>
+</Accordions>
<Callout type="warning">
`docker compose restart` ne fait que redémarrer les conteneurs existants et ne relit pas `.env`. Après une modification de configuration, exécutez `docker compose -f docker-compose.selfhost.yml up -d` pour relire `.env`.
</Callout>
-## 4. Se connecter et créer un espace de travail
+</Tab>
+</Tabs>
+
+</Step>
+<Step>
+
+## Se connecter et créer un espace de travail [#4-se-connecter-et-créer-un-espace-de-travail]
Ouvrez `http://localhost:3000` en local, ou le `https://app.example.com` que vous venez de configurer, puis saisissez votre adresse e-mail pour demander un code de vérification.
@@ -204,13 +243,16 @@ Les journaux contiennent une ligne comme celle-ci :
[DEV] Verification code for [email protected]: 123456
```
-Saisissez le code et créez votre premier espace de travail. Une fois Resend ou SMTP configuré, les codes sont envoyés par e-mail et les membres n'ont plus besoin de lire les journaux des conteneurs — consultez [Configuration de l'authentification](/auth-setup).
+Saisissez le code et créez votre premier espace de travail. Une fois Resend ou SMTP configuré, les codes sont envoyés par e-mail et les membres n'ont plus besoin de lire les journaux des conteneurs ; consultez [Configuration de l'authentification](/auth-setup).
<Callout type="warning">
Les déploiements auto-hébergés utilisent par défaut `APP_ENV=production`, qui désactive les codes de vérification fixes. Ne définissez pas `MULTICA_DEV_VERIFICATION_CODE` sur une instance publique.
</Callout>
-## 5. Connecter un ordinateur
+</Step>
+<Step>
+
+## Connecter un ordinateur [#5-connecter-un-ordinateur]
Lancez les commandes ci-dessous sur **l'ordinateur qui fait tourner vos outils de codage IA**, qui n'est pas forcément le serveur qui fait tourner Docker.
@@ -220,25 +262,34 @@ Les exécutions disposent de toutes les permissions de l'utilisateur qui fait to
Installez d'abord le CLI Multica :
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
-Si le service Multica tourne sur ce même ordinateur :
+</Tab>
+</Tabs>
+
+Reliez ensuite le CLI à votre service. Choisissez l'endroit où tourne le service Multica :
+
+<Tabs items={["Sur cet ordinateur", "Sur une autre machine"]}>
+<Tab value="Sur cet ordinateur">
```bash
multica setup self-host
```
-Si le service Multica tourne sur une autre machine, passez les deux URL configurées précédemment :
+</Tab>
+<Tab value="Sur une autre machine">
```bash
multica setup self-host \
@@ -246,7 +297,10 @@ multica setup self-host \
--app-url https://app.example.com
```
-La commande vérifie d'abord `<server-url>/health`, puis ouvre un navigateur pour terminer la connexion. Une fois la connexion effectuée, elle enregistre les identifiants en local et démarre le daemon. Une erreur `Server not reachable` à cette étape signifie que la sonde n'a pas obtenu de 200 sur `/health` : soit le proxy transmet tout à une version web qui ne relaie pas ce chemin, soit le proxy ne route pas du tout `/health` vers le backend, soit il s'agit d'une défaillance de plus bas niveau (DNS, TLS, pare-feu, délai d'attente dépassé, 5xx renvoyé par le backend) — consultez [Dépannage](/troubleshooting#multica-setup-signale-que-le-serveur-est-injoignable).
+</Tab>
+</Tabs>
+
+Si le service tourne sur une autre machine, passez les deux URL configurées précédemment. La commande vérifie d'abord `<server-url>/health`, puis ouvre un navigateur pour terminer la connexion. Une fois la connexion effectuée, elle enregistre les identifiants en local et démarre le daemon. Une erreur `Server not reachable` à cette étape signifie que la sonde n'a pas obtenu de 200 sur `/health`. Trois causes sont possibles : le proxy transmet tout à une version web qui ne relaie pas ce chemin ; le proxy ne route pas du tout `/health` vers le backend ; ou une défaillance de plus bas niveau (DNS, TLS, pare-feu, délai d'attente dépassé, 5xx renvoyé par le backend). Consultez [Dépannage](/troubleshooting#multica-setup-reports-the-server-is-not-reachable).
Vérifiez la connexion :
@@ -260,12 +314,18 @@ La sortie doit afficher :
- `Agents`, qui liste les outils de codage IA installés sur cette machine
- `Workspaces` supérieur à `0`
-## 6. Terminer la première exécution
+</Step>
+<Step>
+
+## Terminer la première exécution [#6-terminer-la-première-exécution]
De retour dans Multica, dès qu'un runtime en ligne apparaît dans la liste des runtimes, créez un agent et assignez-lui votre première tâche.
Lorsque l'exécution apparaît comme terminée et que la réponse de l'agent s'affiche dans la chronologie, le service auto-hébergé, l'ordinateur et l'outil de codage IA sont tous connectés. Pour le détail, consultez les étapes 3 à 5 du [démarrage rapide](/cloud-quickstart).
+</Step>
+</Steps>
+
## Commandes d'administration courantes
Lancez-les toutes depuis le répertoire du dépôt `multica` :
@@ -284,50 +344,32 @@ docker compose -f docker-compose.selfhost.yml up -d
docker compose -f docker-compose.selfhost.yml down
```
-Pour passer aux dernières images publiées :
-
-```bash
-git pull --ff-only
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-curl -fsS http://localhost:8080/readyz
-```
-
-Il existe deux façons de mettre à niveau une installation Docker Compose. Sur une installation existante, elles produisent le **même résultat** — la cible `selfhost` du `Makefile` exécute les mêmes `docker compose pull` + `up -d`, et en plus crée `.env` s'il est absent et attend `/health` avant d'afficher un résumé de l'état. Choisissez celle que vous préférez :
-
-```bash
-cd multica
-git pull
-make selfhost
-```
-
-```bash
-cd multica
-git pull
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-```
+<Callout type="warning">
+`docker compose down` conserve `pgdata` et `backend_uploads`. Ajouter `-v` supprime ces volumes, base de données comprise ; n'exécutez pas `docker compose down -v`, sauf si vous avez l'intention d'effacer l'instance.
+</Callout>
-### Ce que fait réellement `git pull`
+## Mise à niveau
-`git pull` met à jour **`docker-compose.selfhost.yml` lui-même** — nouvelles variables d'environnement, nouveaux services, vérifications d'état modifiées. Ce n'est **pas** ainsi que vous obtenez une nouvelle version de Multica.
+<Steps>
+<Step>
-La version que vous exécutez au final est déterminée par `docker compose pull`, qui demande à GHCR vers quoi pointe le tag à cet instant. Une copie locale en retard de plusieurs mois téléchargera quand même les images `latest` du jour ; à l'inverse, `git pull` seul ne change rien tant que vous n'avez pas téléchargé les images et recréé les conteneurs.
+### Vérifier que le tag d'image n'est pas figé
-<Callout type="warning">
-**Si vous avez figé `MULTICA_IMAGE_TAG`, aucune des deux commandes ne met quoi que ce soit à niveau.** Les deux images sont résolues en `${MULTICA_IMAGE_TAG:-latest}` (`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), et `.env.example` fournit `MULTICA_IMAGE_TAG=latest`. Si votre `.env` fige une version précise, `pull` récupère simplement de nouveau ce même tag et vous restez sur l'ancienne version — sans erreur ni avertissement. Vérifiez avant de mettre à niveau :
+Les deux images sont résolues en `${MULTICA_IMAGE_TAG:-latest}` (`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), et `.env.example` fournit `MULTICA_IMAGE_TAG=latest`.
```bash
grep MULTICA_IMAGE_TAG .env
# MULTICA_IMAGE_TAG=v0.4.5 ← figé : remplacez-le d'abord par `latest` (ou la version souhaitée)
```
-</Callout>
-### Votre `.env` n'est pas écrasé
+<Callout type="warning">
+**Si vous avez figé `MULTICA_IMAGE_TAG`, les commandes de mise à niveau ci-dessous ne mettent rien à niveau.** `pull` récupère simplement de nouveau ce même tag et vous restez sur l'ancienne version, sans erreur ni avertissement.
+</Callout>
-`make selfhost` ne génère `.env` que lorsque le fichier est **absent**. Le relancer sur une installation existante laisse votre `JWT_SECRET`, votre mot de passe Postgres, vos paramètres d'e-mail et `FRONTEND_ORIGIN` exactement tels qu'ils étaient.
+</Step>
+<Step>
-### Sauvegardez d'abord Postgres
+### Sauvegarder Postgres
Les migrations ne vont que vers l'avant ; faites donc un dump avant de mettre à niveau un déploiement auquel vous tenez :
@@ -336,42 +378,87 @@ docker compose -f docker-compose.selfhost.yml exec -T postgres \
pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
```
+Utilisez vos propres `POSTGRES_USER` / `POSTGRES_DB` de `.env` si vous avez modifié les valeurs par défaut `multica`. Les données résident dans le volume nommé `multica_pgdata`, qui survit à `docker compose down`, mais pas à `down -v`.
+
<Callout type="warning">
-**Ne redirigez pas `pg_dump` directement vers `gzip` par un pipe.** Un shell renvoie le code de sortie de la *dernière* commande d'un pipeline : `pg_dump … | gzip > backup.sql.gz` se termine donc avec `0` même si le dump a échoué — ce qui laisse une archive de 20 octets parfaitement valide, mais vide. Rediriger d'abord vers un fichier fait compter le code de sortie de `pg_dump` lui-même, et `&&` ne compresse qu'un dump qui a réellement réussi.
+**Ne redirigez pas `pg_dump` directement vers `gzip` par un pipe.** Un shell renvoie le code de sortie de la *dernière* commande d'un pipeline : `pg_dump … | gzip > backup.sql.gz` se termine donc avec `0` même si le dump a échoué, ce qui laisse une archive de 20 octets parfaitement valide, mais vide. Rediriger d'abord vers un fichier fait compter le code de sortie de `pg_dump` lui-même, et `&&` ne compresse qu'un dump qui a réellement réussi.
</Callout>
-Utilisez vos propres `POSTGRES_USER` / `POSTGRES_DB` de `.env` si vous avez modifié les valeurs par défaut `multica`. Les données résident dans le volume nommé `multica_pgdata`, qui survit à `docker compose down` — mais pas à `down -v`.
+</Step>
+<Step>
+
+### Télécharger les nouvelles images et recréer les conteneurs
+
+Sur une installation existante, les deux commandes produisent le **même résultat** : la cible `selfhost` du `Makefile` exécute les mêmes `docker compose pull` + `up -d`, et en plus crée `.env` s'il est absent et attend `/health` avant d'afficher un résumé de l'état. Choisissez celle que vous préférez :
-### Les migrations s'exécutent d'elles-mêmes
+<Tabs items={["make selfhost", "docker compose"]}>
+<Tab value="make selfhost">
-Comme à l'[étape 1](#1-démarrer-multica), le conteneur backend exécute `./migrate up` au démarrage (`docker/entrypoint.sh`) avant de servir le trafic. Il n'y a pas de commande de mise à niveau distincte — démarrer la nouvelle image *est* l'étape de migration. Pour suivre le déroulement :
+```bash
+cd multica
+git pull --ff-only
+make selfhost
+```
+
+</Tab>
+<Tab value="docker compose">
+
+```bash
+cd multica
+git pull --ff-only
+docker compose -f docker-compose.selfhost.yml pull
+docker compose -f docker-compose.selfhost.yml up -d
+```
+
+</Tab>
+</Tabs>
+
+Comme à l'[étape 2](#2-vérifier-que-les-services-sont-prêts), le conteneur backend exécute `./migrate up` au démarrage (`docker/entrypoint.sh`) avant de servir le trafic. Il n'y a pas de commande de mise à niveau distincte : démarrer la nouvelle image *est* l'étape de migration. Pour suivre le déroulement :
```bash
docker compose -f docker-compose.selfhost.yml logs -f backend
```
-Les migrations s'exécutent automatiquement au démarrage du backend ; celles qui complètent rétroactivement des données historiques (comme la 103) terminent aussi ce remplissage automatiquement. Dans de rares cas, le remplissage automatique échoue avec `refusing to drop legacy daily rollups` — consultez [Dépannage](/troubleshooting#la-migration-103-bloque-une-mise-à-niveau).
+Les migrations qui complètent rétroactivement des données historiques (comme la 103) terminent aussi ce remplissage automatiquement. Dans de rares cas, le remplissage automatique échoue avec `refusing to drop legacy daily rollups` ; consultez [Dépannage](/troubleshooting#migration-103-blocks-an-upgrade).
-### Vérifier avec `/readyz`, pas `/health`
+</Step>
+<Step>
-`/health` est une sonde de **vivacité** (liveness) — elle renvoie `{"status":"ok"}` tant que le processus tourne, y compris lorsque les migrations ont échoué. `/readyz` (`readyHandler`, enregistré dans `server/cmd/server/router.go` ; `/healthz` en est un alias) vérifie la base de données et l'ensemble des migrations appliquées : c'est donc elle qui détecte une mise à niveau ratée :
+### Vérifier avec `/readyz`, pas `/health`
```bash
curl -s localhost:8080/readyz
# {"status":"ok","checks":{"db":"ok","migrations":"ok"}}
```
-Toute réponse autre qu'un HTTP 200 avec les deux vérifications à `ok` signifie que la nouvelle version n'a pas terminé ses migrations — consultez les journaux du backend avant de lui envoyer du trafic.
+Toute réponse autre qu'un HTTP 200 avec les deux vérifications à `ok` signifie que la nouvelle version n'a pas terminé ses migrations ; consultez les journaux du backend avant de lui envoyer du trafic.
-### Kubernetes
+`/health` est une sonde de **vivacité** (liveness) : elle renvoie `{"status":"ok"}` tant que le processus tourne, y compris lorsque les migrations ont échoué. `/readyz` (`readyHandler`, enregistré dans `server/cmd/server/router.go` ; `/healthz` en est un alias) vérifie la base de données et l'ensemble des migrations appliquées : c'est donc elle qui détecte une mise à niveau ratée.
-Helm a son propre chemin de mise à niveau : définissez `images.backend.tag` / `images.frontend.tag` sur la version souhaitée dans votre fichier de valeurs, puis lancez `helm upgrade`. Changer le tag modifie la spécification du pod : Kubernetes télécharge donc la nouvelle image et redéploie progressivement les Deployments — c'est la méthode fiable.
+</Step>
+</Steps>
-`kubectl -n multica rollout restart` n'est **pas** une mise à niveau en soi. Le chart est livré avec `pullPolicy: IfNotPresent` (`deploy/helm/multica/values.yaml`) : un nœud qui a déjà ce tag en cache réutilise donc l'ancienne image, et le redémarrage ne change silencieusement rien — le même type de piège qu'un `MULTICA_IMAGE_TAG` figé. Si vous voulez suivre un tag flottant de cette manière, définissez d'abord `images.backend.pullPolicy` / `images.frontend.pullPolicy` sur `Always`. Consultez le [guide d'auto-hébergement](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative).
+<Accordions type="multiple">
+<Accordion title="Ce que fait réellement git pull" id="what-git-pull-actually-does">
-<Callout type="warning">
-`docker compose down` conserve `pgdata` et `backend_uploads`. Ajouter `-v` supprime ces volumes, base de données comprise ; n'exécutez pas `docker compose down -v`, sauf si vous avez l'intention d'effacer l'instance.
-</Callout>
+`git pull` met à jour **`docker-compose.selfhost.yml` lui-même** : nouvelles variables d'environnement, nouveaux services, vérifications d'état modifiées. Ce n'est **pas** ainsi que vous obtenez une nouvelle version de Multica.
+
+La version que vous exécutez au final est déterminée par `docker compose pull`, qui demande à GHCR vers quoi pointe le tag à cet instant. Une copie locale en retard de plusieurs mois téléchargera quand même les images `latest` du jour ; à l'inverse, `git pull` seul ne change rien tant que vous n'avez pas téléchargé les images et recréé les conteneurs.
+
+</Accordion>
+<Accordion title="Votre .env n'est pas écrasé" id="your-env-is-not-overwritten">
+
+`make selfhost` ne génère `.env` que lorsque le fichier est **absent**. Le relancer sur une installation existante laisse votre `JWT_SECRET`, votre mot de passe Postgres, vos paramètres d'e-mail et `FRONTEND_ORIGIN` exactement tels qu'ils étaient.
+
+</Accordion>
+<Accordion title="Mettre à niveau sur Kubernetes" id="kubernetes">
+
+Helm a son propre chemin de mise à niveau : définissez `images.backend.tag` / `images.frontend.tag` sur la version souhaitée dans votre fichier de valeurs, puis lancez `helm upgrade`. Changer le tag modifie la spécification du pod : Kubernetes télécharge donc la nouvelle image et redéploie progressivement les Deployments. C'est la méthode fiable.
+
+`kubectl -n multica rollout restart` n'est **pas** une mise à niveau en soi. Le chart est livré avec `pullPolicy: IfNotPresent` (`deploy/helm/multica/values.yaml`) : un nœud qui a déjà ce tag en cache réutilise donc l'ancienne image, et le redémarrage ne change silencieusement rien, le même type de piège qu'un `MULTICA_IMAGE_TAG` figé. Si vous voulez suivre un tag flottant de cette manière, définissez d'abord `images.backend.pullPolicy` / `images.frontend.pullPolicy` sur `Always`. Consultez le [guide d'auto-hébergement](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative).
+
+</Accordion>
+</Accordions>
## Problèmes courants
@@ -379,7 +466,7 @@ Helm a son propre chemin de mise à niveau : définissez `images.backend.tag` /
|---|---|
| `/readyz` ne renvoie pas `ok` | Exécutez `docker compose -f docker-compose.selfhost.yml logs backend postgres`. |
| Aucun code de vérification n'arrive | Demandez un code, puis cherchez `Verification code` dans les journaux du backend. |
-| `setup self-host` signale que le serveur est injoignable | Depuis l'ordinateur, envoyez une requête à `https://api.example.com/health` pour confirmer que le DNS, le TLS et le proxy inverse sont tous joignables. Un 404 signifie que le proxy envoie `/health` à une ancienne version web qui ne le relaie pas — routez-le vers le backend ([Dépannage](/troubleshooting#multica-setup-signale-que-le-serveur-est-injoignable)). |
+| `setup self-host` signale que le serveur est injoignable | Depuis l'ordinateur, envoyez une requête à `https://api.example.com/health` pour confirmer que le DNS, le TLS et le proxy inverse sont tous joignables. Un 404 signifie que le proxy envoie `/health` à une ancienne version web qui ne le relaie pas : routez-le vers le backend ([Dépannage](/troubleshooting#multica-setup-reports-the-server-is-not-reachable)). |
| Le daemon n'affiche rien sous `Agents` | Vérifiez que les outils de codage IA sont dans le `PATH` et connectés, puis exécutez `multica daemon restart`. |
| Les tâches restent en file d'attente | Exécutez `multica daemon status` pour confirmer que le daemon tourne et qu'il est connecté à l'espace de travail. |
diff --git a/apps/docs/content/docs/self-host-quickstart.ja.mdx b/apps/docs/content/docs/self-host-quickstart.ja.mdx
index 32e5e0872f..451b91dc9c 100644
--- a/apps/docs/content/docs/self-host-quickstart.ja.mdx
+++ b/apps/docs/content/docs/self-host-quickstart.ja.mdx
@@ -4,6 +4,9 @@ description: Docker Compose で Multica を起動し、ログインして、最
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Multica のセルフホストは 2 つの部分に分かれます。
@@ -35,7 +38,10 @@ Multica は Compose v2(`docker compose`)を使います。旧版の `docker-
実行用コンピュータには、Claude Code、Codex、Cursor などの [AI コーディングツール](/providers)を最低 1 つインストールし、ログインしておく必要があります。Multica CLI はステップ 5 でインストールします。
-## 1. Multica を起動する
+<Steps>
+<Step>
+
+## Multica を起動する [#1-multica-を起動する]
サービスを実行するマシンで次を実行します。
@@ -45,7 +51,10 @@ cd multica
make selfhost
```
-初回実行時、`make selfhost` は次を行います。
+2 回目以降の `make selfhost` は既存の `.env` とボリュームをそのまま使い、シークレットを再生成しません。
+
+<Accordions>
+<Accordion title="初回実行時に make selfhost が行うこと" id="what-make-selfhost-does">
1. `.env.example` から `.env` を作成する
2. `JWT_SECRET`、PostgreSQL パスワード、`MULTICA_VCS_SECRET_KEY`(セルフホストの Git 連携用の暗号化キー)をランダム生成する
@@ -53,12 +62,13 @@ make selfhost
4. 永続化ボリュームを作成し、3 つのコンテナを起動する
5. backend がヘルスチェックに応答し始めるまで待機する
-2 回目以降の `make selfhost` は既存の `.env` とボリュームをそのまま使い、シークレットを再生成しません。
+</Accordion>
+</Accordions>
<Callout type="info">
`make selfhost` は公開済みのイメージを取得し、checkout 中のコードをビルドしません。ローカルのソースを試すには `make selfhost-build` を使ってください。
-公開済みのイメージは最新の **release タグ** を追跡しますが、単なる `git clone` でチェックアウトされるのは `main` で、通常リリースより先行しています。この checkout から何かをビルドする場合(CLI、または `make selfhost-build` によるイメージ)は、先に対応する release タグへ切り替えて、ビルドしたバイナリと稼働中のコンテナのバージョンを揃えてください:
+公開済みのイメージは最新の **release タグ** を追跡しますが、単なる `git clone` でチェックアウトされるのは `main` で、通常リリースより先行しています。この checkout から何かをビルドする場合(CLI、または `make selfhost-build` によるイメージ)は、先に対応する release タグへ切り替えて、ビルドしたバイナリと稼働中のコンテナのバージョンを揃えてください。
```bash
git fetch --tags --depth 1
@@ -66,7 +76,10 @@ git checkout $(git tag -l 'v*' --sort=-v:refname | head -1)
```
</Callout>
-## 2. サービスの準備完了を確認する
+</Step>
+<Step>
+
+## サービスの準備完了を確認する [#2-サービスの準備完了を確認する]
コンテナの状態を確認します。
@@ -88,13 +101,18 @@ curl -fsS http://localhost:8080/readyz
backend コンテナは起動のたびにデータベースの migration を実行してからサービスを開始するため、migration コマンドを手動で実行する必要はありません。
-## 3. アクセス方法を選ぶ
+</Step>
+<Step>
+
+## アクセス方法を選ぶ [#3-アクセス方法を選ぶ]
-### ローカルアクセス
+<Tabs items={["ローカルアクセス", "リモートアクセス"]}>
+<Tab value="ローカルアクセス">
[http://localhost:3000](http://localhost:3000) をそのまま開きます。後で `multica setup self-host` を実行するときも、URL を渡す必要はありません。
-### リモートアクセス
+</Tab>
+<Tab value="リモートアクセス" id="remote-access">
Docker Compose はデフォルトで `3000` と `8080` を `127.0.0.1` だけにバインドします。`0.0.0.0` に変えて公開インターネットへ直接さらさず、HTTPS 付きのリバースプロキシを使ってください。
@@ -113,7 +131,10 @@ MULTICA_PUBLIC_URL=https://api.example.com
この構成ではブラウザのトラフィックがすべて app ドメインを経由し、cookie がドメインをまたがないため、`COOKIE_DOMAIN` の設定は不要です。ブラウザに api ドメインへ直接アクセスさせる場合は設定が必須です。[環境変数](/environment-variables)を参照してください。
-次に DNS を設定し、Caddy でローカルポートをプロキシします。
+次に DNS を設定し、Caddy でローカルポートをプロキシします。Caddy が TLS 証明書を取得し、WebSocket を転送します。
+
+<Tabs items={["2 つのドメイン", "単一オリジン"]}>
+<Tab value="2 つのドメイン">
```text
app.example.com {
@@ -138,7 +159,8 @@ api.example.com {
}
```
-すべてのトラフィックを**単一オリジン**(1 つのドメイン、または 1 台のホストに 1 つのポートで、小規模サーバーで一般的な構成)で扱いたい場合は、デーモンが依存するパスを backend に明示的に転送し、残りを frontend に任せます:
+</Tab>
+<Tab value="単一オリジン">
```text
multica.example.com {
@@ -148,15 +170,15 @@ multica.example.com {
reverse_proxy 127.0.0.1:8080
}
- # ブラウザの realtime WebSocket——web イメージは WS アップグレードを proxy できないため backend へ直接
+ # ブラウザの realtime WebSocket。web イメージは WS アップグレードを proxy できないため backend へ直接
handle /ws {
reverse_proxy 127.0.0.1:8080 {
flush_interval -1
}
}
- # デーモンの長時間接続: {server-url}/api/daemon/ws にダイヤルします(/ws ではない)。
- # このルートがないとハンドシェイクが失敗し、デーモンは通知なくポーリングへフォールバックします
+ # デーモンの長時間接続: {server-url}/api/daemon/ws にダイヤルする(/ws ではない)。
+ # このルートがないとハンドシェイクが失敗し、デーモンは通知なくポーリングへフォールバックする
handle /api/daemon/ws {
reverse_proxy 127.0.0.1:8080 {
flush_interval -1
@@ -170,9 +192,12 @@ multica.example.com {
}
```
-単一オリジンでは、2 つの URL をどちらもそこに向けます(`.env` の `FRONTEND_ORIGIN` と `MULTICA_APP_URL`、および `multica setup self-host` の `--server-url` と `--app-url`)。
+</Tab>
+</Tabs>
+
+**単一オリジン**(1 つのドメイン、または 1 台のホストに 1 つのポート。小規模サーバーで一般的な構成)では、デーモンが依存するパスを backend に明示的に転送し、残りを frontend に任せます。この場合は 2 つの URL をどちらもそこに向けます。`.env` の `FRONTEND_ORIGIN` と `MULTICA_APP_URL`、および `multica setup self-host` の `--server-url` と `--app-url` です。
-Caddy が TLS 証明書を取得し、WebSocket を転送します。`.env` を変更したら、`up -d` でコンテナを作り直して新しい設定を反映します。
+`.env` を変更したら、`up -d` でコンテナを作り直して新しい設定を反映します。
```bash
docker compose -f docker-compose.selfhost.yml up -d
@@ -180,13 +205,27 @@ curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'
```
-最後のコマンドは `daemon_server_url`(デーモンが API に接続するための URL)を出力します: `MULTICA_DAEMON_SERVER_URL` が設定されていればそれを、次に `MULTICA_PUBLIC_URL`、どちらも未設定ならアプリ URL(`MULTICA_APP_URL`、未設定なら `FRONTEND_ORIGIN` にフォールバック)を使います。`MULTICA_APP_URL` と `FRONTEND_ORIGIN` のどちらも未設定の場合、`MULTICA_DAEMON_SERVER_URL` や `MULTICA_PUBLIC_URL` が設定されていてもこのフィールドはレスポンスから丸ごと省略されます(上の grep は何も出力しません)。`localhost` と出力される場合は `.env` がまだローカルのデフォルトのままです: `.env.example` からコピーした `${FRONTEND_PORT}` 参照に頼らず、`FRONTEND_ORIGIN` と `MULTICA_APP_URL` を公開 URL として明示的に設定し、コンテナを作り直してください。
+最後のコマンドは `daemon_server_url`、つまりデーモンが API に接続するための URL を出力します。`localhost` と出力される場合は `.env` がまだローカルのデフォルトのままです。`.env.example` からコピーした `${FRONTEND_PORT}` 参照に頼らず、`FRONTEND_ORIGIN` と `MULTICA_APP_URL` を公開 URL として明示的に設定し、コンテナを作り直してください。
+
+<Accordions>
+<Accordion title="daemon_server_url の決まり方" id="how-daemon-server-url-is-resolved">
+
+`MULTICA_DAEMON_SERVER_URL` が設定されていればそれを、次に `MULTICA_PUBLIC_URL`、どちらも未設定ならアプリ URL(`MULTICA_APP_URL`、未設定なら `FRONTEND_ORIGIN` にフォールバック)を使います。`MULTICA_APP_URL` と `FRONTEND_ORIGIN` のどちらも未設定の場合、`MULTICA_DAEMON_SERVER_URL` や `MULTICA_PUBLIC_URL` が設定されていてもこのフィールドはレスポンスから丸ごと省略されます(上の grep は何も出力しません)。
+
+</Accordion>
+</Accordions>
<Callout type="warning">
`docker compose restart` は既存のコンテナを再起動するだけで、`.env` を読み直しません。設定を変更した後に `.env` を読み直すには、`docker compose -f docker-compose.selfhost.yml up -d` を実行してください。
</Callout>
-## 4. ログインしてワークスペースを作成する
+</Tab>
+</Tabs>
+
+</Step>
+<Step>
+
+## ログインしてワークスペースを作成する [#4-ログインしてワークスペースを作成する]
ローカルの `http://localhost:3000`、または先ほど設定した `https://app.example.com` を開き、メールアドレスを入力して認証コードをリクエストします。
@@ -209,35 +248,47 @@ docker compose -f docker-compose.selfhost.yml logs backend \
セルフホストのデプロイはデフォルトで `APP_ENV=production` を使い、固定の認証コードは有効になりません。公開インスタンスで `MULTICA_DEV_VERIFICATION_CODE` を設定しないでください。
</Callout>
-## 5. 実行用コンピュータを接続する
+</Step>
+<Step>
+
+## 実行用コンピュータを接続する [#5-実行用コンピュータを接続する]
以下のコマンドは **AI コーディングツールを実行するコンピュータ**で実行します。Docker を実行しているサーバーとは限りません。
<Callout type="warning">
-作業はデーモンを実行しているユーザーの全権限で動作し、そのユーザーが読み書きできるものはすべて読み書きできます。個人アカウントではなく、専用の Unix ユーザー、コンテナ、または VM でデーモンを実行してください。[セキュリティモデル](/security-model)を参照してください。
+実行はデーモンを実行しているユーザーの全権限で動作し、そのユーザーが読み書きできるものはすべて読み書きできます。個人アカウントではなく、専用の Unix ユーザー、コンテナ、または VM でデーモンを実行してください。[セキュリティモデル](/security-model)を参照してください。
</Callout>
まず Multica CLI をインストールします。
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
-Multica サービスがこのコンピュータでも動いている場合は、次を実行します。
+</Tab>
+</Tabs>
+
+次に CLI をサービスに接続します。Multica サービスが動いている場所に合わせて選んでください。
+
+<Tabs items={["このコンピュータ", "別のマシン"]}>
+<Tab value="このコンピュータ">
```bash
multica setup self-host
```
-Multica サービスが別のマシンで動いている場合は、先ほど設定した 2 つの URL を渡します。
+</Tab>
+<Tab value="別のマシン">
```bash
multica setup self-host \
@@ -245,7 +296,10 @@ multica setup self-host \
--app-url https://app.example.com
```
-このコマンドはまず `<server-url>/health` を確認し、次にブラウザを開いてログインを完了します。ログイン後はローカルに認証情報を保存し、デーモンを起動します。このステップで `Server not reachable` エラーが出る場合、`/health` のプローブが 200 を取得できなかったことを意味します: プロキシがすべてのトラフィックをこのパスを転送しない古い frontend に向けているか、プロキシが `/health` を backend にルーティングしていないか、あるいは DNS・TLS・ファイアウォール・タイムアウト・backend からの 5xx といったより下位の障害です。詳細は[トラブルシューティング](/troubleshooting#multica-setup-がサーバーに到達できないと報告する)を参照してください。
+</Tab>
+</Tabs>
+
+別のマシンの場合は、先ほど設定した 2 つの URL を渡します。このコマンドはまず `<server-url>/health` を確認し、次にブラウザを開いてログインを完了します。ログイン後はローカルに認証情報を保存し、デーモンを起動します。このステップで `Server not reachable` エラーが出る場合、`/health` のプローブが 200 を取得できていません。考えられる原因は 3 つです。プロキシがすべてのトラフィックをこのパスを転送しない古い frontend に向けている、プロキシが `/health` を backend にルーティングしていない、あるいは DNS・TLS・ファイアウォール・タイムアウト・backend からの 5xx といったより下位の障害です。詳細は[トラブルシューティング](/troubleshooting#multica-setup-reports-the-server-is-not-reachable)を参照してください。
接続状態を確認します。
@@ -259,12 +313,18 @@ multica daemon status
- `Agents` にこのマシンにインストール済みの AI コーディングツールが並ぶ
- `Workspaces` が `0` より大きい
-## 6. 最初の実行を完了する
+</Step>
+<Step>
+
+## 最初の実行を完了する [#6-最初の実行を完了する]
Multica に戻ります。ランタイム一覧にオンラインのランタイムが表示されたら、エージェントを作成し、最初のタスクを割り当てます。
実行ログが完了になり、タイムラインにエージェントの返信が現れれば、セルフホストのサービス、実行用コンピュータ、AI コーディングツールがつながっています。詳しい手順は[クイックスタート](/cloud-quickstart)のステップ 3〜5 を参照してください。
+</Step>
+</Steps>
+
## よく使う管理コマンド
以下のコマンドはすべて `multica` リポジトリのディレクトリで実行します。
@@ -283,50 +343,32 @@ docker compose -f docker-compose.selfhost.yml up -d
docker compose -f docker-compose.selfhost.yml down
```
-公開済みの最新イメージへアップグレードします。
-
-```bash
-git pull --ff-only
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-curl -fsS http://localhost:8080/readyz
-```
-
-Docker Compose 構成のアップグレード方法は2通りあります。既存の構成では**同じ結果**になります — `Makefile` の `selfhost` ターゲットは同じ `docker compose pull` + `up -d` を実行し、加えて `.env` が無ければ生成し、`/health` を待ってからステータスの要約を表示します。好きな方を使ってください。
-
-```bash
-cd multica
-git pull
-make selfhost
-```
+<Callout type="warning">
+`docker compose down` は `pgdata` と `backend_uploads` を保持します。`-v` を付けると、データベースを含むこれらのボリュームが削除されます。インスタンスを消去するつもりがない限り、`docker compose down -v` を実行しないでください。
+</Callout>
-```bash
-cd multica
-git pull
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-```
+## アップグレード
-### `git pull` が実際に更新するもの
+<Steps>
+<Step>
-`git pull` が更新するのは **`docker-compose.selfhost.yml` そのもの**です — 新しい環境変数、新しいサービス、変更された healthcheck。新しい Multica のバージョンを取得する仕組み**ではありません**。
+### イメージタグが固定されていないか確認する
-実際に動くバージョンを決めるのは `docker compose pull` で、そのタグが今どのイメージを指しているかを GHCR に問い合わせます。したがって数か月更新していない checkout でも今日の `latest` イメージを取得できますし、逆に `git pull` だけではイメージを取得してコンテナを作り直すまで何も変わりません。
-
-<Callout type="warning">
-**`MULTICA_IMAGE_TAG` を固定している場合、どちらのコマンドでもアップグレードされません。** 両方のイメージが `${MULTICA_IMAGE_TAG:-latest}` として解決され(`docker-compose.selfhost.yml`:`services.backend.image`、`services.frontend.image`)、`.env.example` は `MULTICA_IMAGE_TAG=latest` を同梱しています。`.env` で特定のリリースに固定していると、`pull` は同じタグを取り直すだけで、古いバージョンのままです — エラーも警告も出ません。アップグレード前に確認してください。
+両方のイメージが `${MULTICA_IMAGE_TAG:-latest}` として解決され(`docker-compose.selfhost.yml`:`services.backend.image`、`services.frontend.image`)、`.env.example` は `MULTICA_IMAGE_TAG=latest` を同梱しています。
```bash
grep MULTICA_IMAGE_TAG .env
# MULTICA_IMAGE_TAG=v0.4.5 ← 固定されている: 先に latest(または希望のリリース)へ変更する
```
-</Callout>
-### `.env` は上書きされません
+<Callout type="warning">
+**`MULTICA_IMAGE_TAG` を固定している場合、以下のコマンドではアップグレードされません。** `pull` は同じタグを取り直すだけで、古いバージョンのままです。エラーも警告も出ません。
+</Callout>
-`make selfhost` が `.env` を生成するのは、ファイルが**存在しない**ときだけです。既存の構成で再実行しても、`JWT_SECRET`、Postgres のパスワード、メール設定、`FRONTEND_ORIGIN` はそのまま残ります。
+</Step>
+<Step>
-### 先に Postgres をバックアップする
+### Postgres をバックアップする
migration は前方向のみで巻き戻せないため、大事な環境をアップグレードする前にダンプを取ってください。
@@ -335,42 +377,87 @@ docker compose -f docker-compose.selfhost.yml exec -T postgres \
pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
```
+`POSTGRES_USER` / `POSTGRES_DB` を `multica` のデフォルトから変更している場合は、`.env` の値に置き換えてください。データは `multica_pgdata` という名前付きボリュームにあり、`docker compose down` では消えませんが、`down -v` では消えます。
+
<Callout type="warning">
-**`pg_dump` を直接 `gzip` にパイプしないでください。** シェルはパイプラインの**最後**のコマンドの終了ステータスを返すため、`pg_dump … | gzip > backup.sql.gz` はダンプが失敗しても `0` で終了し、形式としては完全に正当な、中身が空の20バイトのアーカイブが残ります。先にファイルへリダイレクトすれば `pg_dump` 自身の終了ステータスが効くようになり、`&&` は実際に成功したダンプだけを圧縮します。
+**`pg_dump` を直接 `gzip` にパイプしないでください。** シェルはパイプラインの**最後**のコマンドの終了ステータスを返すため、`pg_dump … | gzip > backup.sql.gz` はダンプが失敗しても `0` で終了し、形式としては完全に正当な、中身が空の 20 バイトのアーカイブが残ります。先にファイルへリダイレクトすれば `pg_dump` 自身の終了ステータスが効くようになり、`&&` は実際に成功したダンプだけを圧縮します。
</Callout>
-`POSTGRES_USER` / `POSTGRES_DB` を `multica` のデフォルトから変更している場合は、`.env` の値に置き換えてください。データは `multica_pgdata` という名前付きボリュームにあり、`docker compose down` では消えませんが、`down -v` では消えます。
+</Step>
+<Step>
+
+### 新しいイメージを取得してコンテナを作り直す
+
+既存の構成では、次の 2 つの書き方は**同じ結果**になります。`Makefile` の `selfhost` ターゲットは同じ `docker compose pull` + `up -d` を実行し、加えて `.env` が無ければ生成し、`/health` を待ってからステータスの要約を表示します。好きな方を使ってください。
+
+<Tabs items={["make selfhost", "docker compose"]}>
+<Tab value="make selfhost">
+
+```bash
+cd multica
+git pull --ff-only
+make selfhost
+```
+
+</Tab>
+<Tab value="docker compose">
+
+```bash
+cd multica
+git pull --ff-only
+docker compose -f docker-compose.selfhost.yml pull
+docker compose -f docker-compose.selfhost.yml up -d
+```
-### migration は自動で実行されます
+</Tab>
+</Tabs>
-[ステップ1](#1-multica-を起動する)と同じく、バックエンドコンテナはトラフィックを受け付ける前に起動時に `./migrate up` を実行します(`docker/entrypoint.sh`)。個別のアップグレードコマンドはありません — 新しいイメージを立ち上げること自体が migration のステップです。様子を見るには:
+[ステップ 2](#2-サービスの準備完了を確認する) と同じく、backend コンテナはトラフィックを受け付ける前に起動時に `./migrate up` を実行します(`docker/entrypoint.sh`)。個別のアップグレードコマンドはなく、新しいイメージを立ち上げること自体が migration のステップです。様子を見るには次を実行します。
```bash
docker compose -f docker-compose.selfhost.yml logs -f backend
```
-migration は backend の起動時に自動で実行されます。過去データのバックフィルが必要な migration(103 など)も、バックフィルまで自動で完了します。ごくまれに自動バックフィルが `refusing to drop legacy daily rollups` で失敗することがあります。対処は[トラブルシューティング](/troubleshooting#migration-103-の失敗)を参照してください。
+過去データのバックフィルが必要な migration(103 など)も、バックフィルまで自動で完了します。ごくまれに自動バックフィルが `refusing to drop legacy daily rollups` で失敗することがあります。対処は[トラブルシューティング](/troubleshooting#migration-103-blocks-an-upgrade)を参照してください。
-### `/health` ではなく `/readyz` で検証する
+</Step>
+<Step>
-`/health` は **liveness** プローブで、プロセスが生きている限り `{"status":"ok"}` を返します — migration が失敗していても同じです。`/readyz`(`server/cmd/server/router.go` で登録された `readyHandler`、`/healthz` はそのエイリアス)はデータベースと適用済み migration の集合をチェックするため、失敗したアップグレードを捕捉できるのはこちらです。
+### `/health` ではなく `/readyz` で検証する
```bash
curl -s localhost:8080/readyz
# {"status":"ok","checks":{"db":"ok","migrations":"ok"}}
```
-HTTP 200 かつ両方のチェックが `ok` でない場合、新しいバージョンは migration を完了していません。トラフィックを流す前にバックエンドのログを確認してください。
+HTTP 200 かつ両方のチェックが `ok` でない場合、新しいバージョンは migration を完了していません。トラフィックを流す前に backend のログを確認してください。
-### Kubernetes
+`/health` は **liveness** プローブで、プロセスが生きている限り `{"status":"ok"}` を返します。migration が失敗していても同じです。`/readyz`(`server/cmd/server/router.go` で登録された `readyHandler`、`/healthz` はそのエイリアス)はデータベースと適用済み migration の集合をチェックするため、失敗したアップグレードを捕捉できるのはこちらです。
-Helm には独自のアップグレード経路があります。values ファイルで `images.backend.tag` / `images.frontend.tag` に目的のリリースを設定し、`helm upgrade` を実行してください。タグを変えると Pod スペックが変わるため、Kubernetes が新しいイメージを取得して Deployment をロールします — これが確実な経路です。
+</Step>
+</Steps>
-`kubectl -n multica rollout restart` はそれ単体ではアップグレードになりません。チャートは `pullPolicy: IfNotPresent` を同梱しているため(`deploy/helm/multica/values.yaml`)、そのタグをすでにキャッシュしているノードでは古いイメージが再利用され、restart しても何も変わりません — `MULTICA_IMAGE_TAG` の固定と同種の落とし穴です。浮動タグでこの方法を使いたい場合は、先に `images.backend.pullPolicy` / `images.frontend.pullPolicy` を `Always` に設定してください。リポジトリの [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative) を参照してください。
+<Accordions type="multiple">
+<Accordion title="git pull が実際に更新するもの" id="what-git-pull-actually-does">
-<Callout type="warning">
-`docker compose down` は `pgdata` と `backend_uploads` を保持します。`-v` を付けると、データベースを含むこれらのボリュームが削除されます。インスタンスを消去するつもりがない限り、`docker compose down -v` を実行しないでください。
-</Callout>
+`git pull` が更新するのは **`docker-compose.selfhost.yml` そのもの**です。新しい環境変数、新しいサービス、変更された healthcheck などです。新しい Multica のバージョンを取得する仕組み**ではありません**。
+
+実際に動くバージョンを決めるのは `docker compose pull` で、そのタグが今どのイメージを指しているかを GHCR に問い合わせます。したがって数か月更新していない checkout でも今日の `latest` イメージを取得できますし、逆に `git pull` だけではイメージを取得してコンテナを作り直すまで何も変わりません。
+
+</Accordion>
+<Accordion title=".env は上書きされません" id="your-env-is-not-overwritten">
+
+`make selfhost` が `.env` を生成するのは、ファイルが**存在しない**ときだけです。既存の構成で再実行しても、`JWT_SECRET`、Postgres のパスワード、メール設定、`FRONTEND_ORIGIN` はそのまま残ります。
+
+</Accordion>
+<Accordion title="Kubernetes でのアップグレード" id="kubernetes">
+
+Helm には独自のアップグレード経路があります。values ファイルで `images.backend.tag` / `images.frontend.tag` に目的のリリースを設定し、`helm upgrade` を実行してください。タグを変えると Pod スペックが変わるため、Kubernetes が新しいイメージを取得して Deployment をロールします。これが確実な経路です。
+
+`kubectl -n multica rollout restart` はそれ単体ではアップグレードに**なりません**。チャートは `pullPolicy: IfNotPresent` を同梱しているため(`deploy/helm/multica/values.yaml`)、そのタグをすでにキャッシュしているノードでは古いイメージが再利用され、restart しても何も変わりません。`MULTICA_IMAGE_TAG` の固定と同種の落とし穴です。浮動タグでこの方法を使いたい場合は、先に `images.backend.pullPolicy` / `images.frontend.pullPolicy` を `Always` に設定してください。リポジトリの [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative) を参照してください。
+
+</Accordion>
+</Accordions>
## よくある問題
@@ -378,7 +465,7 @@ Helm には独自のアップグレード経路があります。values ファ
|---|---|
| `/readyz` が `ok` を返さない | `docker compose -f docker-compose.selfhost.yml logs backend postgres` を実行する。 |
| 認証コードが届かない | コードを一度リクエストし、backend のログで `Verification code` を探す。 |
-| `setup self-host` が server に到達できないと報告する | 実行用コンピュータから `https://api.example.com/health` をリクエストし、DNS、TLS、リバースプロキシがすべて到達可能か確認する。404 が返る場合、プロキシが `/health` をこのパスを転送しない古い web リリースに向けているため、backend へ直接ルーティングすること([トラブルシューティング](/troubleshooting#multica-setup-がサーバーに到達できないと報告する))。 |
+| `setup self-host` が server に到達できないと報告する | 実行用コンピュータから `https://api.example.com/health` をリクエストし、DNS、TLS、リバースプロキシがすべて到達可能か確認する。404 が返る場合、プロキシが `/health` をこのパスを転送しない古い web リリースに向けているため、backend へ直接ルーティングすること([トラブルシューティング](/troubleshooting#multica-setup-reports-the-server-is-not-reachable))。 |
| デーモンが `Agents` を表示しない | AI コーディングツールが `PATH` にありログイン済みであることを確認し、`multica daemon restart` を実行する。 |
| タスクがキューにとどまり続ける | `multica daemon status` を実行し、デーモンが起動していてワークスペースに接続していることを確認する。 |
diff --git a/apps/docs/content/docs/self-host-quickstart.ko.mdx b/apps/docs/content/docs/self-host-quickstart.ko.mdx
index 1f7950dcdc..5b27739e46 100644
--- a/apps/docs/content/docs/self-host-quickstart.ko.mdx
+++ b/apps/docs/content/docs/self-host-quickstart.ko.mdx
@@ -4,6 +4,9 @@ description: Docker Compose로 Multica를 시작하고 로그인한 뒤 첫 실
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
자체 호스팅 Multica는 두 부분으로 나뉩니다.
@@ -35,7 +38,10 @@ Multica는 Compose v2인 `docker compose`를 사용합니다. 이전 `docker-com
실행 컴퓨터에는 Claude Code, Codex, Cursor 같은 [AI 코딩 도구](/providers)가 하나 이상 설치되어 로그인된 상태여야 합니다. Multica CLI는 5단계에서 설치합니다.
-## 1. Multica 시작
+<Steps>
+<Step>
+
+## Multica 시작 [#1-multica-시작]
서비스를 실행할 컴퓨터에서 다음을 실행합니다.
@@ -45,7 +51,10 @@ cd multica
make selfhost
```
-처음 실행할 때 `make selfhost`가 다음 작업을 수행합니다.
+이후 `make selfhost`를 다시 실행하면 기존 `.env`와 data volume을 계속 사용하며 키를 새로 만들지 않습니다.
+
+<Accordions>
+<Accordion title="처음 실행할 때 make selfhost가 하는 일" id="what-make-selfhost-does">
1. `.env.example`에서 `.env` 생성
2. `JWT_SECRET`, PostgreSQL 비밀번호, `MULTICA_VCS_SECRET_KEY`(자체 호스팅 Git 연동 암호화 키)를 임의 생성
@@ -53,12 +62,13 @@ make selfhost
4. persistent data volume 생성 및 세 컨테이너 시작
5. backend가 health check에 응답할 때까지 대기
-이후 `make selfhost`를 다시 실행하면 기존 `.env`와 data volume을 계속 사용하며 키를 새로 만들지 않습니다.
+</Accordion>
+</Accordions>
<Callout type="info">
`make selfhost`는 공개된 이미지를 pull하며 현재 checkout의 코드를 컴파일하지 않습니다. 로컬 소스 코드를 테스트하려면 `make selfhost-build`를 사용하세요.
-공개된 이미지는 최신 **release 태그**를 따르지만, 단순히 `git clone`하면 `main`이 체크아웃되며 보통 릴리스보다 앞서 있습니다. 이 checkout에서 무언가를 빌드할 때(CLI, 또는 `make selfhost-build`로 만드는 이미지)는 먼저 해당 release 태그로 전환해서 빌드 결과물과 실행 중인 컨테이너의 버전을 일치시키세요:
+공개된 이미지는 최신 **release 태그**를 따르지만, 단순히 `git clone`하면 `main`이 체크아웃되며 보통 릴리스보다 앞서 있습니다. 이 checkout에서 무언가를 빌드할 때(CLI, 또는 `make selfhost-build`로 만드는 이미지)는 먼저 해당 release 태그로 전환해서 빌드 결과물과 실행 중인 컨테이너의 버전을 일치시키세요.
```bash
git fetch --tags --depth 1
@@ -66,7 +76,10 @@ git checkout $(git tag -l 'v*' --sort=-v:refname | head -1)
```
</Callout>
-## 2. 서비스 준비 상태 확인
+</Step>
+<Step>
+
+## 서비스 준비 상태 확인 [#2-서비스-준비-상태-확인]
컨테이너 상태를 확인합니다.
@@ -88,13 +101,18 @@ curl -fsS http://localhost:8080/readyz
Backend 컨테이너는 시작할 때마다 데이터베이스 migration을 먼저 실행하고 서비스를 시작하므로 migration 명령을 직접 실행할 필요가 없습니다.
-## 3. 접근 방식 선택
+</Step>
+<Step>
-### 로컬에서 접근
+## 접근 방식 선택 [#3-접근-방식-선택]
+
+<Tabs items={["로컬에서 접근", "원격에서 접근"]}>
+<Tab value="로컬에서 접근">
[http://localhost:3000](http://localhost:3000)을 바로 엽니다. 이후 `multica setup self-host`를 실행할 때도 URL을 전달할 필요가 없습니다.
-### 원격에서 접근
+</Tab>
+<Tab value="원격에서 접근" id="remote-access">
Docker Compose는 기본적으로 `3000`과 `8080`을 `127.0.0.1`에만 bind합니다. `0.0.0.0`으로 바꿔 공개 인터넷에 직접 노출하지 말고 HTTPS reverse proxy를 사용하세요.
@@ -113,7 +131,10 @@ MULTICA_PUBLIC_URL=https://api.example.com
이 설정에서는 모든 브라우저 트래픽이 app 도메인을 거치고 cookie가 도메인을 넘지 않으므로 `COOKIE_DOMAIN`을 설정할 필요가 없습니다. 브라우저에서 api 도메인에 직접 접근하게 바꾼다면 반드시 설정해야 합니다. [환경 변수](/environment-variables)를 참고하세요.
-그런 다음 DNS를 설정하고 Caddy로 로컬 port를 proxy합니다.
+그런 다음 DNS를 설정하고 Caddy로 로컬 port를 proxy합니다. Caddy가 TLS 인증서를 발급하고 WebSocket을 전달합니다.
+
+<Tabs items={["두 개의 도메인", "단일 오리진"]}>
+<Tab value="두 개의 도메인">
```text
app.example.com {
@@ -138,7 +159,8 @@ api.example.com {
}
```
-모든 트래픽을 **단일 오리진**(하나의 도메인, 또는 호스트 하나에 포트 하나로, 소규모 서버에서 흔한 형태)으로 처리하려면, 데몬이 의존하는 경로를 backend로 명시적으로 전달하고 나머지는 frontend에 맡기세요:
+</Tab>
+<Tab value="단일 오리진">
```text
multica.example.com {
@@ -148,7 +170,7 @@ multica.example.com {
reverse_proxy 127.0.0.1:8080
}
- # 브라우저 realtime WebSocket — web 이미지는 WS 업그레이드를 proxy할 수 없어 backend로 직접
+ # 브라우저 realtime WebSocket: web 이미지는 WS 업그레이드를 proxy할 수 없어 backend로 직접
handle /ws {
reverse_proxy 127.0.0.1:8080 {
flush_interval -1
@@ -170,9 +192,12 @@ multica.example.com {
}
```
-단일 오리진에서는 두 URL을 모두 그 오리진으로 지정합니다(`.env`의 `FRONTEND_ORIGIN`과 `MULTICA_APP_URL`, 그리고 `multica setup self-host`의 `--server-url`과 `--app-url`).
+</Tab>
+</Tabs>
+
+**단일 오리진**(하나의 도메인, 또는 호스트 하나에 포트 하나로, 소규모 서버에서 흔한 형태)은 데몬이 의존하는 경로를 backend로 명시적으로 전달하고 나머지는 frontend에 맡깁니다. 이때 두 URL을 모두 그 오리진으로 지정합니다. `.env`의 `FRONTEND_ORIGIN`과 `MULTICA_APP_URL`, 그리고 `multica setup self-host`의 `--server-url`과 `--app-url`입니다.
-Caddy가 TLS 인증서를 발급하고 WebSocket을 전달합니다. `.env`를 수정한 뒤 `up -d`로 컨테이너를 다시 만들어 새 설정을 적용합니다.
+`.env`를 수정한 뒤 `up -d`로 컨테이너를 다시 만들어 새 설정을 적용합니다.
```bash
docker compose -f docker-compose.selfhost.yml up -d
@@ -180,13 +205,27 @@ curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'
```
-마지막 명령은 `daemon_server_url`(데몬이 API에 연결할 때 쓰는 URL)을 출력합니다: `MULTICA_DAEMON_SERVER_URL`이 설정되어 있으면 그 값을, 그다음 `MULTICA_PUBLIC_URL`, 둘 다 미설정이면 앱 URL(`MULTICA_APP_URL`, 미설정이면 `FRONTEND_ORIGIN`으로 폴백)을 사용합니다. `MULTICA_APP_URL`과 `FRONTEND_ORIGIN` 둘 다 설정되어 있지 않으면 `MULTICA_DAEMON_SERVER_URL`이나 `MULTICA_PUBLIC_URL`이 설정되어 있어도 이 필드는 응답에서 통째로 생략됩니다(위의 grep은 아무것도 출력하지 않음). `localhost`가 출력되면 `.env`가 아직 로컬 기본값인 것입니다: `.env.example`에서 복사한 `${FRONTEND_PORT}` 참조에 의존하지 말고 `FRONTEND_ORIGIN`과 `MULTICA_APP_URL`을 공개 URL로 명시적으로 설정한 뒤 컨테이너를 다시 만드세요.
+마지막 명령은 데몬이 API에 연결할 때 쓰는 URL인 `daemon_server_url`을 출력합니다. `localhost`가 출력되면 `.env`가 아직 로컬 기본값인 것입니다. `.env.example`에서 복사한 `${FRONTEND_PORT}` 참조에 의존하지 말고 `FRONTEND_ORIGIN`과 `MULTICA_APP_URL`을 공개 URL로 명시적으로 설정한 뒤 컨테이너를 다시 만드세요.
+
+<Accordions>
+<Accordion title="daemon_server_url이 정해지는 방식" id="how-daemon-server-url-is-resolved">
+
+`MULTICA_DAEMON_SERVER_URL`이 설정되어 있으면 그 값을, 그다음 `MULTICA_PUBLIC_URL`, 둘 다 미설정이면 앱 URL(`MULTICA_APP_URL`, 미설정이면 `FRONTEND_ORIGIN`으로 폴백)을 사용합니다. `MULTICA_APP_URL`과 `FRONTEND_ORIGIN` 둘 다 설정되어 있지 않으면 `MULTICA_DAEMON_SERVER_URL`이나 `MULTICA_PUBLIC_URL`이 설정되어 있어도 이 필드는 응답에서 통째로 생략됩니다(위의 grep은 아무것도 출력하지 않음).
+
+</Accordion>
+</Accordions>
<Callout type="warning">
`docker compose restart`는 기존 컨테이너만 다시 시작하며 `.env`를 다시 읽지 않습니다. 설정을 수정한 뒤 `.env`를 다시 읽게 하려면 `docker compose -f docker-compose.selfhost.yml up -d`를 실행하세요.
</Callout>
-## 4. 로그인 및 워크스페이스 만들기
+</Tab>
+</Tabs>
+
+</Step>
+<Step>
+
+## 로그인 및 워크스페이스 만들기 [#4-로그인-및-워크스페이스-만들기]
로컬 `http://localhost:3000` 또는 앞에서 설정한 `https://app.example.com`을 열고 이메일을 입력해 인증 코드를 받습니다.
@@ -209,35 +248,47 @@ docker compose -f docker-compose.selfhost.yml logs backend \
자체 호스팅 환경은 기본적으로 `APP_ENV=production`을 사용하므로 고정 인증 코드가 활성화되지 않습니다. 공개 인터넷 인스턴스에 `MULTICA_DEV_VERIFICATION_CODE`를 설정하지 마세요.
</Callout>
-## 5. 실행 컴퓨터 연결
+</Step>
+<Step>
+
+## 실행 컴퓨터 연결 [#5-실행-컴퓨터-연결]
다음 명령은 Docker 서버가 아니라 **AI 코딩 도구를 실행할 컴퓨터**에서 실행합니다. 두 컴퓨터가 같을 수도 있습니다.
<Callout type="warning">
-작업은 데몬을 실행하는 사용자의 모든 권한으로 동작하며, 그 사용자가 읽고 쓸 수 있는 모든 것에 접근할 수 있습니다. 개인 계정 대신 전용 Unix 사용자, 컨테이너, 또는 VM에서 데몬을 실행하세요. [보안 모델](/security-model)을 참고하세요.
+실행은 데몬을 실행하는 사용자의 모든 권한으로 동작하며, 그 사용자가 읽고 쓸 수 있는 모든 것에 접근할 수 있습니다. 개인 계정 대신 전용 Unix 사용자, 컨테이너, 또는 VM에서 데몬을 실행하세요. [보안 모델](/security-model)을 참고하세요.
</Callout>
먼저 Multica CLI를 설치합니다.
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
-Multica 서비스가 같은 컴퓨터에 있다면 다음을 실행합니다.
+</Tab>
+</Tabs>
+
+그런 다음 CLI를 서비스에 연결합니다. Multica 서비스가 있는 위치에 맞게 선택하세요.
+
+<Tabs items={["이 컴퓨터", "다른 컴퓨터"]}>
+<Tab value="이 컴퓨터">
```bash
multica setup self-host
```
-Multica 서비스가 다른 컴퓨터에 있다면 앞에서 설정한 두 주소를 전달합니다.
+</Tab>
+<Tab value="다른 컴퓨터">
```bash
multica setup self-host \
@@ -245,7 +296,10 @@ multica setup self-host \
--app-url https://app.example.com
```
-이 명령은 먼저 `<server-url>/health`를 확인한 뒤 브라우저를 열어 로그인을 완료합니다. 로그인 후 로컬 자격 증명을 저장하고 데몬을 시작합니다. 이 단계에서 `Server not reachable` 오류가 나면 `/health` 프로브가 200을 받지 못했다는 뜻입니다: 프록시가 모든 트래픽을 이 경로를 전달하지 않는 구버전 frontend로 보내고 있거나, 프록시가 `/health`를 backend로 라우팅하지 않거나, DNS·TLS·방화벽·타임아웃·backend의 5xx 같은 하위 계층의 문제일 수 있습니다. [문제 해결](/troubleshooting#multica-setup이-서버에-도달할-수-없다고-보고함)을 참고하세요.
+</Tab>
+</Tabs>
+
+서비스가 다른 컴퓨터에 있다면 앞에서 설정한 두 주소를 전달합니다. 이 명령은 먼저 `<server-url>/health`를 확인한 뒤 브라우저를 열어 로그인을 완료합니다. 로그인 후 로컬 자격 증명을 저장하고 데몬을 시작합니다. 이 단계에서 `Server not reachable` 오류가 나면 `/health` 프로브가 200을 받지 못했다는 뜻이며, 원인은 세 가지 중 하나입니다. 프록시가 모든 트래픽을 이 경로를 전달하지 않는 구버전 frontend로 보내고 있거나, 프록시가 `/health`를 backend로 라우팅하지 않거나, DNS·TLS·방화벽·타임아웃·backend의 5xx 같은 하위 계층의 문제입니다. [문제 해결](/troubleshooting#multica-setup-reports-the-server-is-not-reachable)을 참고하세요.
연결 상태를 확인합니다.
@@ -259,12 +313,18 @@ multica daemon status
- `Agents`에 로컬에 설치된 AI 코딩 도구 포함
- `Workspaces`가 `0`보다 큼
-## 6. 첫 실행 완료
+</Step>
+<Step>
+
+## 첫 실행 완료 [#6-첫-실행-완료]
Multica로 돌아옵니다. 런타임 목록에 온라인 런타임이 나타나면 에이전트를 만들고 첫 태스크를 할당합니다.
실행 로그가 "완료됨"으로 바뀌고 타임라인에 에이전트의 답변이 나타나면 자체 호스팅 서비스, 실행 컴퓨터, AI 코딩 도구가 연결된 것입니다. 자세한 단계는 [빠른 시작](/cloud-quickstart)의 3~5단계를 참고하세요.
+</Step>
+</Steps>
+
## 자주 사용하는 관리 명령
다음 명령은 모두 `multica` 저장소 디렉터리에서 실행합니다.
@@ -283,50 +343,32 @@ docker compose -f docker-compose.selfhost.yml up -d
docker compose -f docker-compose.selfhost.yml down
```
-공개된 이미지 업그레이드:
-
-```bash
-git pull --ff-only
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-curl -fsS http://localhost:8080/readyz
-```
-
-Docker Compose 설치를 업그레이드하는 방법은 두 가지이며, 기존 설치에서는 **결과가 같습니다** — `Makefile`의 `selfhost` 타깃이 동일한 `docker compose pull` + `up -d`를 실행하고, 여기에 더해 `.env`가 없으면 생성하고 `/health`를 기다린 뒤 상태 요약을 출력합니다. 편한 쪽을 쓰세요.
-
-```bash
-cd multica
-git pull
-make selfhost
-```
-
-```bash
-cd multica
-git pull
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-```
+<Callout type="warning">
+`docker compose down`은 `pgdata`와 `backend_uploads`를 유지합니다. `-v`를 추가하면 데이터베이스를 포함한 이 data volume이 삭제됩니다. 인스턴스를 비우려는 것이 확실하지 않다면 `docker compose down -v`를 실행하지 마세요.
+</Callout>
-### `git pull`이 실제로 하는 일
+## 업그레이드
-`git pull`이 갱신하는 것은 **`docker-compose.selfhost.yml` 자체**입니다 — 새로 추가된 환경 변수, 새 서비스, 변경된 healthcheck. 새 Multica 버전을 받아오는 수단이 **아닙니다**.
+<Steps>
+<Step>
-실제로 어떤 버전이 뜰지는 `docker compose pull`이 결정합니다. 이 명령이 GHCR에 해당 태그가 지금 어떤 이미지를 가리키는지 물어보기 때문입니다. 그래서 몇 달 묵은 checkout에서도 오늘자 `latest` 이미지를 받을 수 있고, 반대로 `git pull`만 해서는 이미지를 받아 컨테이너를 다시 만들기 전까지 아무것도 바뀌지 않습니다.
+### 이미지 태그가 고정되어 있지 않은지 확인
-<Callout type="warning">
-**`MULTICA_IMAGE_TAG`를 고정해 뒀다면 두 방법 모두 업그레이드되지 않습니다.** 두 이미지 모두 `${MULTICA_IMAGE_TAG:-latest}`로 해석되며(`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), `.env.example`에는 `MULTICA_IMAGE_TAG=latest`가 들어 있습니다. `.env`에서 특정 릴리스로 고정해 뒀다면 `pull`은 같은 태그를 다시 받아올 뿐이라 예전 버전에 그대로 머무릅니다 — 오류도, 경고도 없습니다. 업그레이드 전에 확인하세요.
+두 이미지 모두 `${MULTICA_IMAGE_TAG:-latest}`로 해석되며(`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), `.env.example`에는 `MULTICA_IMAGE_TAG=latest`가 들어 있습니다.
```bash
grep MULTICA_IMAGE_TAG .env
# MULTICA_IMAGE_TAG=v0.4.5 ← 고정됨: 먼저 latest(또는 원하는 릴리스)로 수정
```
-</Callout>
-### `.env`는 덮어쓰이지 않습니다
+<Callout type="warning">
+**`MULTICA_IMAGE_TAG`를 고정해 뒀다면 아래 업그레이드 명령으로는 업그레이드되지 않습니다.** `pull`은 같은 태그를 다시 받아올 뿐이라 예전 버전에 그대로 머무르며, 오류도 경고도 없습니다.
+</Callout>
-`make selfhost`는 `.env` 파일이 **없을 때만** 생성합니다. 기존 설치에서 다시 실행해도 `JWT_SECRET`, Postgres 비밀번호, 이메일 설정, `FRONTEND_ORIGIN`은 그대로 유지됩니다.
+</Step>
+<Step>
-### 먼저 Postgres를 백업하세요
+### Postgres 백업
migration은 앞으로만 진행되고 되돌릴 수 없으므로, 중요한 배포를 업그레이드하기 전에 덤프를 받아 두세요.
@@ -335,42 +377,87 @@ docker compose -f docker-compose.selfhost.yml exec -T postgres \
pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
```
+`POSTGRES_USER` / `POSTGRES_DB`를 기본값 `multica`에서 바꿨다면 `.env`의 실제 값으로 교체하세요. 데이터는 `multica_pgdata`라는 named volume에 있으며 `docker compose down`으로는 사라지지 않지만, `down -v`로는 사라집니다.
+
<Callout type="warning">
**`pg_dump`를 `gzip`으로 바로 파이프하지 마세요.** 셸은 파이프라인에서 **마지막** 명령의 종료 상태를 반환하므로, `pg_dump … | gzip > backup.sql.gz`는 덤프가 실패해도 `0`으로 끝나면서 형식상 완전히 유효하지만 내용이 비어 있는 20바이트짜리 아카이브를 남깁니다. 먼저 파일로 리다이렉트하면 `pg_dump` 자신의 종료 상태가 적용되고, `&&`는 실제로 성공한 덤프만 압축합니다.
</Callout>
-`POSTGRES_USER` / `POSTGRES_DB`를 기본값 `multica`에서 바꿨다면 `.env`의 실제 값으로 교체하세요. 데이터는 `multica_pgdata`라는 named volume에 있으며 `docker compose down`으로는 사라지지 않지만, `down -v`로는 사라집니다.
+</Step>
+<Step>
-### migration은 자동으로 실행됩니다
+### 새 이미지를 받고 컨테이너 다시 만들기
-[1단계](#1-multica-시작)와 마찬가지로, 백엔드 컨테이너는 트래픽을 받기 전에 시작 시점에 `./migrate up`을 실행합니다(`docker/entrypoint.sh`). 별도의 업그레이드 명령은 없습니다 — 새 이미지를 띄우는 것 자체가 migration 단계입니다. 진행 상황을 보려면:
+기존 설치에서는 아래 두 방법의 **결과가 같습니다**. `Makefile`의 `selfhost` 타깃이 동일한 `docker compose pull` + `up -d`를 실행하고, 여기에 더해 `.env`가 없으면 생성하고 `/health`를 기다린 뒤 상태 요약을 출력합니다. 편한 쪽을 쓰세요.
+
+<Tabs items={["make selfhost", "docker compose"]}>
+<Tab value="make selfhost">
+
+```bash
+cd multica
+git pull --ff-only
+make selfhost
+```
+
+</Tab>
+<Tab value="docker compose">
+
+```bash
+cd multica
+git pull --ff-only
+docker compose -f docker-compose.selfhost.yml pull
+docker compose -f docker-compose.selfhost.yml up -d
+```
+
+</Tab>
+</Tabs>
+
+[2단계](#2-서비스-준비-상태-확인)와 마찬가지로, backend 컨테이너는 트래픽을 받기 전에 시작 시점에 `./migrate up`을 실행합니다(`docker/entrypoint.sh`). 별도의 업그레이드 명령은 없으며, 새 이미지를 띄우는 것 자체가 migration 단계입니다. 진행 상황을 보려면 다음을 실행합니다.
```bash
docker compose -f docker-compose.selfhost.yml logs -f backend
```
-Migration은 backend 시작 시 자동으로 실행됩니다. migration 103처럼 이전 데이터 backfill이 필요한 migration도 자동으로 backfill을 완료합니다. 드물게 자동 backfill이 실패하고 `refusing to drop legacy daily rollups` 오류가 나타나면 [문제 해결](/troubleshooting#업그레이드할-때-migration-103이-실행을-거부함)을 참고하세요.
+migration 103처럼 이전 데이터 backfill이 필요한 migration도 자동으로 backfill을 완료합니다. 드물게 자동 backfill이 실패하고 `refusing to drop legacy daily rollups` 오류가 나타나면 [문제 해결](/troubleshooting#migration-103-blocks-an-upgrade)을 참고하세요.
-### `/health` 말고 `/readyz`로 검증하세요
+</Step>
+<Step>
-`/health`는 **liveness** 프로브라서 프로세스가 살아 있기만 하면 `{"status":"ok"}`를 반환합니다 — migration이 실패했더라도 마찬가지입니다. `/readyz`(`server/cmd/server/router.go`에 등록된 `readyHandler`, `/healthz`는 별칭)는 데이터베이스와 적용된 migration 집합을 확인하므로, 잘못된 업그레이드를 잡아내는 것은 이쪽입니다.
+### `/health` 말고 `/readyz`로 검증
```bash
curl -s localhost:8080/readyz
# {"status":"ok","checks":{"db":"ok","migrations":"ok"}}
```
-HTTP 200이면서 두 검사가 모두 `ok`가 아니라면 새 버전이 migration을 마치지 못한 것입니다. 트래픽을 보내기 전에 백엔드 로그를 확인하세요.
+HTTP 200이면서 두 검사가 모두 `ok`가 아니라면 새 버전이 migration을 마치지 못한 것입니다. 트래픽을 보내기 전에 backend 로그를 확인하세요.
-### Kubernetes
+`/health`는 **liveness** 프로브라서 프로세스가 살아 있기만 하면 `{"status":"ok"}`를 반환하며, migration이 실패했더라도 마찬가지입니다. `/readyz`(`server/cmd/server/router.go`에 등록된 `readyHandler`, `/healthz`는 별칭)는 데이터베이스와 적용된 migration 집합을 확인하므로, 잘못된 업그레이드를 잡아내는 것은 이쪽입니다.
-Helm은 자체 업그레이드 경로가 있습니다. values 파일에서 `images.backend.tag` / `images.frontend.tag`를 원하는 릴리스로 설정한 뒤 `helm upgrade`를 실행하세요. 태그가 바뀌면 파드 스펙이 바뀌므로 Kubernetes가 새 이미지를 받아 Deployment를 롤아웃합니다 — 이것이 확실한 경로입니다.
+</Step>
+</Steps>
-`kubectl -n multica rollout restart`는 그 자체로는 업그레이드가 **아닙니다**. 차트는 `pullPolicy: IfNotPresent`로 배포되므로(`deploy/helm/multica/values.yaml`), 해당 태그를 이미 캐시한 노드는 예전 이미지를 재사용하고 restart를 해도 아무것도 바뀌지 않습니다 — `MULTICA_IMAGE_TAG` 고정과 같은 부류의 함정입니다. 부동 태그로 이 방식을 쓰려면 먼저 `images.backend.pullPolicy` / `images.frontend.pullPolicy`를 `Always`로 설정하세요. 저장소의 [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative)를 참고하세요.
+<Accordions type="multiple">
+<Accordion title="git pull이 실제로 하는 일" id="what-git-pull-actually-does">
-<Callout type="warning">
-`docker compose down`은 `pgdata`와 `backend_uploads`를 유지합니다. `-v`를 추가하면 데이터베이스를 포함한 이 data volume이 삭제됩니다. 인스턴스를 비우려는 것이 확실하지 않다면 `docker compose down -v`를 실행하지 마세요.
-</Callout>
+`git pull`이 갱신하는 것은 **`docker-compose.selfhost.yml` 자체**입니다. 새로 추가된 환경 변수, 새 서비스, 변경된 healthcheck 등입니다. 새 Multica 버전을 받아오는 수단이 **아닙니다**.
+
+실제로 어떤 버전이 뜰지는 `docker compose pull`이 결정합니다. 이 명령이 GHCR에 해당 태그가 지금 어떤 이미지를 가리키는지 물어보기 때문입니다. 그래서 몇 달 묵은 checkout에서도 오늘자 `latest` 이미지를 받을 수 있고, 반대로 `git pull`만 해서는 이미지를 받아 컨테이너를 다시 만들기 전까지 아무것도 바뀌지 않습니다.
+
+</Accordion>
+<Accordion title=".env는 덮어쓰이지 않습니다" id="your-env-is-not-overwritten">
+
+`make selfhost`는 `.env` 파일이 **없을 때만** 생성합니다. 기존 설치에서 다시 실행해도 `JWT_SECRET`, Postgres 비밀번호, 이메일 설정, `FRONTEND_ORIGIN`은 그대로 유지됩니다.
+
+</Accordion>
+<Accordion title="Kubernetes에서 업그레이드" id="kubernetes">
+
+Helm은 자체 업그레이드 경로가 있습니다. values 파일에서 `images.backend.tag` / `images.frontend.tag`를 원하는 릴리스로 설정한 뒤 `helm upgrade`를 실행하세요. 태그가 바뀌면 파드 스펙이 바뀌므로 Kubernetes가 새 이미지를 받아 Deployment를 롤아웃합니다. 이것이 확실한 경로입니다.
+
+`kubectl -n multica rollout restart`는 그 자체로는 업그레이드가 **아닙니다**. 차트는 `pullPolicy: IfNotPresent`로 배포되므로(`deploy/helm/multica/values.yaml`), 해당 태그를 이미 캐시한 노드는 예전 이미지를 재사용하고 restart를 해도 아무것도 바뀌지 않습니다. `MULTICA_IMAGE_TAG` 고정과 같은 부류의 함정입니다. 부동 태그로 이 방식을 쓰려면 먼저 `images.backend.pullPolicy` / `images.frontend.pullPolicy`를 `Always`로 설정하세요. 저장소의 [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative)를 참고하세요.
+
+</Accordion>
+</Accordions>
## 자주 묻는 문제
@@ -378,7 +465,7 @@ Helm은 자체 업그레이드 경로가 있습니다. values 파일에서 `imag
|---|---|
| `/readyz`가 `ok`를 반환하지 않음 | `docker compose -f docker-compose.selfhost.yml logs backend postgres`를 실행합니다. |
| 인증 코드를 받지 못함 | 인증 코드를 한 번 요청한 뒤 backend 로그에서 `Verification code`를 찾습니다. |
-| `setup self-host`에 server 접근 불가가 표시됨 | 실행 컴퓨터에서 `https://api.example.com/health`를 요청해 DNS, TLS, reverse proxy에 모두 접근할 수 있는지 확인합니다. 404가 반환되면 프록시가 `/health`를 이 경로를 전달하지 않는 구버전 web 릴리스로 보내고 있다는 뜻이니 backend로 직접 라우팅해야 합니다([문제 해결](/troubleshooting#multica-setup이-서버에-도달할-수-없다고-보고함)). |
+| `setup self-host`에 server 접근 불가가 표시됨 | 실행 컴퓨터에서 `https://api.example.com/health`를 요청해 DNS, TLS, reverse proxy에 모두 접근할 수 있는지 확인합니다. 404가 반환되면 프록시가 `/health`를 이 경로를 전달하지 않는 구버전 web 릴리스로 보내고 있다는 뜻이니 backend로 직접 라우팅해야 합니다([문제 해결](/troubleshooting#multica-setup-reports-the-server-is-not-reachable)). |
| 데몬의 `Agents`가 비어 있음 | AI 코딩 도구가 `PATH`에 있고 로그인되어 있는지 확인한 뒤 `multica daemon restart`를 실행합니다. |
| 태스크가 계속 큐에서 기다림 | `multica daemon status`를 실행해 데몬이 실행 중이며 워크스페이스에 연결되었는지 확인합니다. |
diff --git a/apps/docs/content/docs/self-host-quickstart.mdx b/apps/docs/content/docs/self-host-quickstart.mdx
index 136d532698..63650fa8ce 100644
--- a/apps/docs/content/docs/self-host-quickstart.mdx
+++ b/apps/docs/content/docs/self-host-quickstart.mdx
@@ -4,6 +4,9 @@ description: Start Multica with Docker Compose, log in, and connect your first c
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Self-hosting Multica has two parts:
@@ -35,7 +38,10 @@ Multica uses Compose v2, invoked as `docker compose`. The legacy `docker-compose
The computer also needs at least one [AI coding tool](/providers) installed and logged in, such as Claude Code, Codex, or Cursor. The Multica CLI is installed in step 5.
-## 1. Start Multica
+<Steps>
+<Step>
+
+## Start Multica [#1-start-multica]
On the machine that will run the service:
@@ -45,7 +51,10 @@ cd multica
make selfhost
```
-On first run, `make selfhost` will:
+Running `make selfhost` again reuses the existing `.env` and volumes; it does not regenerate secrets.
+
+<Accordions>
+<Accordion title="What make selfhost does on first run" id="what-make-selfhost-does">
1. Create `.env` from `.env.example`
2. Generate a random `JWT_SECRET`, PostgreSQL password, and `MULTICA_VCS_SECRET_KEY` (the encryption key for self-hosted Git integrations)
@@ -53,7 +62,8 @@ On first run, `make selfhost` will:
4. Create persistent volumes and start the three containers
5. Wait until the backend starts answering health checks
-Running `make selfhost` again reuses the existing `.env` and volumes; it does not regenerate secrets.
+</Accordion>
+</Accordions>
<Callout type="info">
`make selfhost` pulls published images and does not build the code in your checkout. To test local source, use `make selfhost-build`.
@@ -66,7 +76,10 @@ git checkout $(git tag -l 'v*' --sort=-v:refname | head -1)
```
</Callout>
-## 2. Confirm the services are ready
+</Step>
+<Step>
+
+## Confirm the services are ready [#2-confirm-the-services-are-ready]
Check container status:
@@ -88,13 +101,18 @@ The expected response is:
The backend container runs database migrations on every startup before serving; there is no manual migration command to run.
-## 3. Choose how to access
+</Step>
+<Step>
+
+## Choose how to access [#3-choose-how-to-access]
-### Local access
+<Tabs items={["Local access", "Remote access"]}>
+<Tab value="Local access">
Open [http://localhost:3000](http://localhost:3000) directly. You also won't need to pass any URLs when running `multica setup self-host` later.
-### Remote access
+</Tab>
+<Tab value="Remote access" id="remote-access">
Docker Compose binds `3000` and `8080` to `127.0.0.1` only. Do not switch this to `0.0.0.0` to expose the ports to the public internet; use a reverse proxy with HTTPS instead.
@@ -113,7 +131,10 @@ MULTICA_PUBLIC_URL=https://api.example.com
With this configuration all browser traffic stays on the app domain, so cookies never cross domains and `COOKIE_DOMAIN` is not needed. If the browser talks to the api domain directly instead, you must set it — see [Environment variables](/environment-variables).
-Then set up DNS and proxy the local ports with Caddy:
+Then set up DNS and proxy the local ports with Caddy. Caddy obtains TLS certificates and forwards WebSockets.
+
+<Tabs items={["Two domains", "Single origin"]}>
+<Tab value="Two domains">
```text
app.example.com {
@@ -138,7 +159,8 @@ api.example.com {
}
```
-If you would rather serve everything on a **single origin** (one domain, or one host with one port — common on small servers), route the daemon-critical paths to the backend explicitly and let the frontend handle the rest:
+</Tab>
+<Tab value="Single origin">
```text
multica.example.com {
@@ -171,9 +193,12 @@ multica.example.com {
}
```
-With a single origin, point both URLs at it (`FRONTEND_ORIGIN` and `MULTICA_APP_URL` in `.env`, then `--server-url` and `--app-url` in `multica setup self-host`).
+</Tab>
+</Tabs>
+
+**Single origin** (one domain, or one host with one port — common on small servers) routes the daemon-critical paths to the backend explicitly and lets the frontend handle the rest. Point both URLs at it: `FRONTEND_ORIGIN` and `MULTICA_APP_URL` in `.env`, then `--server-url` and `--app-url` in `multica setup self-host`.
-Caddy obtains TLS certificates and forwards WebSockets. After editing `.env`, recreate the containers with `up -d` so the new configuration takes effect:
+After editing `.env`, recreate the containers with `up -d` so the new configuration takes effect:
```bash
docker compose -f docker-compose.selfhost.yml up -d
@@ -181,13 +206,27 @@ curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'
```
-The last command prints `daemon_server_url`, the URL daemons use to reach the API: `MULTICA_DAEMON_SERVER_URL` when set, then `MULTICA_PUBLIC_URL`, otherwise the app URL — `MULTICA_APP_URL`, falling back to `FRONTEND_ORIGIN`. When neither `MULTICA_APP_URL` nor `FRONTEND_ORIGIN` is set, the field is omitted from the response entirely (so the grep prints nothing), even if `MULTICA_DAEMON_SERVER_URL` or `MULTICA_PUBLIC_URL` is set. If it prints a `localhost` address, `.env` still carries local defaults: set `FRONTEND_ORIGIN` and `MULTICA_APP_URL` explicitly to the public URLs instead of relying on the `${FRONTEND_PORT}` references copied from `.env.example`, then recreate the containers.
+The last command prints `daemon_server_url`, the URL daemons use to reach the API. If it prints a `localhost` address, `.env` still carries local defaults: set `FRONTEND_ORIGIN` and `MULTICA_APP_URL` explicitly to the public URLs instead of relying on the `${FRONTEND_PORT}` references copied from `.env.example`, then recreate the containers.
+
+<Accordions>
+<Accordion title="How daemon_server_url is resolved" id="how-daemon-server-url-is-resolved">
+
+`MULTICA_DAEMON_SERVER_URL` when set, then `MULTICA_PUBLIC_URL`, otherwise the app URL — `MULTICA_APP_URL`, falling back to `FRONTEND_ORIGIN`. When neither `MULTICA_APP_URL` nor `FRONTEND_ORIGIN` is set, the field is omitted from the response entirely (so the grep prints nothing), even if `MULTICA_DAEMON_SERVER_URL` or `MULTICA_PUBLIC_URL` is set.
+
+</Accordion>
+</Accordions>
<Callout type="warning">
`docker compose restart` only restarts existing containers and does not re-read `.env`. After changing configuration, run `docker compose -f docker-compose.selfhost.yml up -d` to re-read `.env`.
</Callout>
-## 4. Log in and create a workspace
+</Tab>
+</Tabs>
+
+</Step>
+<Step>
+
+## Log in and create a workspace [#4-log-in-and-create-a-workspace]
Open `http://localhost:3000` locally, or the `https://app.example.com` you just configured, and enter your email to request a verification code.
@@ -210,7 +249,10 @@ Enter the code and create your first workspace. Once Resend or SMTP is configure
Self-hosted deployments default to `APP_ENV=production`, which disables fixed verification codes. Do not set `MULTICA_DEV_VERIFICATION_CODE` on a public instance.
</Callout>
-## 5. Connect a computer
+</Step>
+<Step>
+
+## Connect a computer [#5-connect-a-computer]
Run the commands below on **the computer that runs your AI coding tools**, which is not necessarily the server running Docker.
@@ -220,25 +262,34 @@ Runs execute with the full permissions of the user running the daemon — they c
Install the Multica CLI first:
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
-If the Multica service runs on this same computer:
+</Tab>
+</Tabs>
+
+Then point the CLI at your service. Pick where the Multica service runs:
+
+<Tabs items={["On this computer", "On another machine"]}>
+<Tab value="On this computer">
```bash
multica setup self-host
```
-If the Multica service runs on another machine, pass the two URLs you configured earlier:
+</Tab>
+<Tab value="On another machine">
```bash
multica setup self-host \
@@ -246,7 +297,10 @@ multica setup self-host \
--app-url https://app.example.com
```
-The command first checks `<server-url>/health`, then opens a browser to complete login. After login it stores local credentials and starts the daemon. A `Server not reachable` error at this step means the probe could not get a 200 from `/health`: the proxy forwards everything to a web release that does not forward the path, the proxy does not route `/health` to the backend at all, or a lower-level failure (DNS, TLS, firewall, timeout, 5xx from the backend) — see [Troubleshooting](/troubleshooting#multica-setup-reports-the-server-is-not-reachable).
+</Tab>
+</Tabs>
+
+When the service is on another machine, pass the two URLs you configured above. The command first checks `<server-url>/health`, then opens a browser to complete login. After login it stores local credentials and starts the daemon. A `Server not reachable` error at this step means the probe could not get a 200 from `/health`. There are three likely causes: the proxy forwards everything to a web release that does not forward the path; the proxy does not route `/health` to the backend at all; or a lower-level failure (DNS, TLS, firewall, timeout, 5xx from the backend). See [Troubleshooting](/troubleshooting#multica-setup-reports-the-server-is-not-reachable).
Confirm the connection:
@@ -260,12 +314,18 @@ The output should show:
- `Agents` listing the AI coding tools installed on this machine
- `Workspaces` greater than `0`
-## 6. Complete the first run
+</Step>
+<Step>
+
+## Complete the first run [#6-complete-the-first-run]
Back in Multica, once an online runtime appears in the runtime list, create an agent and assign it your first issue.
When the run shows as completed and the agent's reply appears in the timeline, the self-hosted service, the computer, and the AI coding tool are all connected. For detailed steps, see steps 3-5 of the [quickstart](/cloud-quickstart).
+</Step>
+</Steps>
+
## Common admin commands
Run all of these from the `multica` repository directory:
@@ -284,50 +344,32 @@ docker compose -f docker-compose.selfhost.yml up -d
docker compose -f docker-compose.selfhost.yml down
```
-To upgrade to the latest published images:
-
-```bash
-git pull --ff-only
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-curl -fsS http://localhost:8080/readyz
-```
-
-Two ways to upgrade a Docker Compose install. On an existing install they produce the **same result** — the `selfhost` target in the `Makefile` runs the same `docker compose pull` + `up -d`, and additionally creates `.env` when it is missing and waits on `/health` before printing a status summary. Pick whichever you prefer:
-
-```bash
-cd multica
-git pull
-make selfhost
-```
+<Callout type="warning">
+`docker compose down` keeps `pgdata` and `backend_uploads`. Adding `-v` deletes these volumes, including the database; do not run `docker compose down -v` unless you intend to wipe the instance.
+</Callout>
-```bash
-cd multica
-git pull
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-```
+## Upgrade
-### What `git pull` actually does
+<Steps>
+<Step>
-`git pull` updates **`docker-compose.selfhost.yml` itself** — new environment variables, new services, changed healthchecks. It is **not** how you get a new Multica version.
+### Check for a pinned image tag
-The version you end up running is resolved by `docker compose pull`, which asks GHCR what the tag points at right now. A checkout that is months out of date will still pull today's `latest` images; conversely, `git pull` alone changes nothing until you pull images and recreate the containers.
-
-<Callout type="warning">
-**If you pinned `MULTICA_IMAGE_TAG`, neither command upgrades anything.** Both images resolve as `${MULTICA_IMAGE_TAG:-latest}` (`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), and `.env.example` ships `MULTICA_IMAGE_TAG=latest`. If your `.env` pins an exact release, `pull` just re-fetches that same tag and you stay on the old version — no error, no warning. Check before you upgrade:
+Both images resolve as `${MULTICA_IMAGE_TAG:-latest}` (`docker-compose.selfhost.yml`, `services.backend.image` / `services.frontend.image`), and `.env.example` ships `MULTICA_IMAGE_TAG=latest`.
```bash
grep MULTICA_IMAGE_TAG .env
# MULTICA_IMAGE_TAG=v0.4.5 ← pinned: edit to `latest` (or the release you want) first
```
-</Callout>
-### Your `.env` is not overwritten
+<Callout type="warning">
+**If you pinned `MULTICA_IMAGE_TAG`, the upgrade commands below upgrade nothing.** `pull` just re-fetches that same tag and you stay on the old version — no error, no warning.
+</Callout>
-`make selfhost` only generates `.env` when the file is **missing**. Re-running it on an existing install leaves your `JWT_SECRET`, Postgres password, email settings, and `FRONTEND_ORIGIN` exactly as they were.
+</Step>
+<Step>
-### Back up Postgres first
+### Back up Postgres
Migrations are forward-only, so take a dump before upgrading a deployment you care about:
@@ -336,25 +378,53 @@ docker compose -f docker-compose.selfhost.yml exec -T postgres \
pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
```
+Use your own `POSTGRES_USER` / `POSTGRES_DB` from `.env` if you changed them from the `multica` defaults. Data lives in the named volume `multica_pgdata`, which survives `docker compose down` — but not `down -v`.
+
<Callout type="warning">
**Do not pipe `pg_dump` straight into `gzip`.** A shell reports the exit status of the *last* command in a pipeline, so `pg_dump … | gzip > backup.sql.gz` exits `0` even when the dump failed — leaving a perfectly valid 20-byte archive containing nothing. Redirecting to a file first makes `pg_dump`'s own exit status the one that counts, and `&&` only compresses a dump that actually succeeded.
</Callout>
-Use your own `POSTGRES_USER` / `POSTGRES_DB` from `.env` if you changed them from the `multica` defaults. Data lives in the named volume `multica_pgdata`, which survives `docker compose down` — but not `down -v`.
+</Step>
+<Step>
-### Migrations run themselves
+### Pull the new images and recreate the containers
-As in [Step 1](#1-start-multica), the backend container runs `./migrate up` on startup (`docker/entrypoint.sh`) before serving traffic. There is no separate upgrade command — bringing up the new image *is* the migration step. Watch it happen:
+On an existing install both commands produce the **same result** — the `selfhost` target in the `Makefile` runs the same `docker compose pull` + `up -d`, and additionally creates `.env` when it is missing and waits on `/health` before printing a status summary. Pick whichever you prefer:
+
+<Tabs items={["make selfhost", "docker compose"]}>
+<Tab value="make selfhost">
+
+```bash
+cd multica
+git pull --ff-only
+make selfhost
+```
+
+</Tab>
+<Tab value="docker compose">
+
+```bash
+cd multica
+git pull --ff-only
+docker compose -f docker-compose.selfhost.yml pull
+docker compose -f docker-compose.selfhost.yml up -d
+```
+
+</Tab>
+</Tabs>
+
+As in [step 2](#2-confirm-the-services-are-ready), the backend container runs `./migrate up` on startup (`docker/entrypoint.sh`) before serving traffic. There is no separate upgrade command: bringing up the new image *is* the migration step. Watch it happen:
```bash
docker compose -f docker-compose.selfhost.yml logs -f backend
```
-Migrations run automatically when the backend starts; migrations that backfill historical data (such as 103) complete the backfill automatically too. In rare cases the automatic backfill fails with `refusing to drop legacy daily rollups` — see [Troubleshooting](/troubleshooting#migration-103-blocks-an-upgrade).
+Migrations that backfill historical data (such as 103) complete the backfill automatically too. In rare cases the automatic backfill fails with `refusing to drop legacy daily rollups` — see [Troubleshooting](/troubleshooting#migration-103-blocks-an-upgrade).
-### Verify with `/readyz`, not `/health`
+</Step>
+<Step>
-`/health` is a **liveness** probe — it returns `{"status":"ok"}` as long as the process is up, including when migrations failed. `/readyz` (`readyHandler`, registered in `server/cmd/server/router.go`; `/healthz` is an alias) checks the database and the applied migration set, so it is the one that catches a bad upgrade:
+### Verify with `/readyz`, not `/health`
```bash
curl -s localhost:8080/readyz
@@ -363,15 +433,32 @@ curl -s localhost:8080/readyz
Anything other than HTTP 200 with both checks `ok` means the new version did not finish migrating — check the backend logs before sending traffic at it.
-### Kubernetes
+`/health` is a **liveness** probe — it returns `{"status":"ok"}` as long as the process is up, including when migrations failed. `/readyz` (`readyHandler`, registered in `server/cmd/server/router.go`; `/healthz` is an alias) checks the database and the applied migration set, so it is the one that catches a bad upgrade.
+
+</Step>
+</Steps>
+
+<Accordions type="multiple">
+<Accordion title="What git pull actually does" id="what-git-pull-actually-does">
+
+`git pull` updates **`docker-compose.selfhost.yml` itself** — new environment variables, new services, changed healthchecks. It is **not** how you get a new Multica version.
+
+The version you end up running is resolved by `docker compose pull`, which asks GHCR what the tag points at right now. A checkout that is months out of date will still pull today's `latest` images; conversely, `git pull` alone changes nothing until you pull images and recreate the containers.
+
+</Accordion>
+<Accordion title="Your .env is not overwritten" id="your-env-is-not-overwritten">
+
+`make selfhost` only generates `.env` when the file is **missing**. Re-running it on an existing install leaves your `JWT_SECRET`, Postgres password, email settings, and `FRONTEND_ORIGIN` exactly as they were.
+
+</Accordion>
+<Accordion title="Upgrading on Kubernetes" id="kubernetes">
Helm has its own upgrade path: set `images.backend.tag` / `images.frontend.tag` to the release you want in your values file, then `helm upgrade`. Changing the tag changes the pod spec, so Kubernetes pulls the new image and rolls the Deployments — this is the reliable route.
`kubectl -n multica rollout restart` is **not** an upgrade on its own. The chart ships `pullPolicy: IfNotPresent` (`deploy/helm/multica/values.yaml`), so a node that already has that tag cached reuses the old image and the restart silently changes nothing — the same class of trap as a pinned `MULTICA_IMAGE_TAG`. If you want to track a floating tag that way, set `images.backend.pullPolicy` / `images.frontend.pullPolicy` to `Always` first. See the [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative).
-<Callout type="warning">
-`docker compose down` keeps `pgdata` and `backend_uploads`. Adding `-v` deletes these volumes, including the database; do not run `docker compose down -v` unless you intend to wipe the instance.
-</Callout>
+</Accordion>
+</Accordions>
## Common issues
diff --git a/apps/docs/content/docs/self-host-quickstart.zh.mdx b/apps/docs/content/docs/self-host-quickstart.zh.mdx
index 64830e92fa..a656e25bb6 100644
--- a/apps/docs/content/docs/self-host-quickstart.zh.mdx
+++ b/apps/docs/content/docs/self-host-quickstart.zh.mdx
@@ -4,6 +4,9 @@ description: 用 Docker Compose 启动 Multica,完成登录,并连接第一
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
自托管 Multica 分成两部分:
@@ -35,7 +38,10 @@ Multica 使用 Compose v2,也就是 `docker compose`。旧版的 `docker-compo
执行电脑还需要至少一款已经安装并登录的 [AI 编程工具](/providers),例如 Claude Code、Codex 或 Cursor。第 5 步再安装 Multica CLI。
-## 1. 启动 Multica
+<Steps>
+<Step>
+
+## 启动 Multica [#1-启动-multica]
在准备运行服务的机器上执行:
@@ -45,7 +51,10 @@ cd multica
make selfhost
```
-第一次运行时,`make selfhost` 会:
+之后再次运行 `make selfhost` 会继续使用现有的 `.env` 和数据卷,不会重新生成密钥。
+
+<Accordions>
+<Accordion title="第一次运行时 make selfhost 做了什么" id="what-make-selfhost-does">
1. 从 `.env.example` 创建 `.env`
2. 随机生成 `JWT_SECRET`、PostgreSQL 密码和 `MULTICA_VCS_SECRET_KEY`(自托管 Git 集成的加密密钥)
@@ -53,12 +62,13 @@ make selfhost
4. 创建持久化数据卷并启动三个容器
5. 等待 backend 开始响应健康检查
-之后再次运行 `make selfhost` 会继续使用现有的 `.env` 和数据卷,不会重新生成密钥。
+</Accordion>
+</Accordions>
<Callout type="info">
`make selfhost` 拉取已发布的镜像,不会编译当前 checkout 中的代码。需要测试本地源码时,使用 `make selfhost-build`。
-已发布的镜像跟随最新的 **release tag**,而直接 `git clone` 检出的是 `main`,通常领先于发版。如果你要在这个 checkout 上构建任何东西——CLI,或通过 `make selfhost-build` 构建镜像——先切换到与镜像对应的 release tag,让构建产物和运行中的容器保持同一版本:
+已发布的镜像跟随最新的 **release tag**,而直接 `git clone` 检出的是 `main`,通常领先于发版。如果你要在这个 checkout 上构建任何东西(CLI,或通过 `make selfhost-build` 构建镜像),先切换到与镜像对应的 release tag,让构建产物和运行中的容器保持同一版本:
```bash
git fetch --tags --depth 1
@@ -66,7 +76,10 @@ git checkout $(git tag -l 'v*' --sort=-v:refname | head -1)
```
</Callout>
-## 2. 确认服务已经就绪
+</Step>
+<Step>
+
+## 确认服务已经就绪 [#2-确认服务已经就绪]
查看容器状态:
@@ -88,15 +101,20 @@ curl -fsS http://localhost:8080/readyz
Backend 容器每次启动时都会先运行数据库 migration,再启动服务,不需要手动执行 migration 命令。
-## 3. 选择访问方式
+</Step>
+<Step>
-### 本机访问
+## 选择访问方式 [#3-选择访问方式]
-直接打开 [http://localhost:3000P172。后面运行 `multica setup self-host` 时也不需要传 URL。
+<Tabs items={["本机访问", "远程访问"]}>
+<Tab value="本机访问">
-### 远程访问
+直接打开 [http://localhost:3000](http://localhost:3000)。后面运行 `multica setup self-host` 时也不需要传 URL。
-Docker Compose 默认只把 `3000` 和 `8080` 绑定到 `127.0.0.1`。不要直接改成 `0.0.0.0` 暴露到公网;使用带 HTTPS 的反向代理。
+</Tab>
+<Tab value="远程访问" id="remote-access">
+
+Docker Compose 默认只把 `3000` 和 `8080` 绑定到 `127.0.0.1`。不要直接改成 `0.0.0.0` 暴露到公网,请使用带 HTTPS 的反向代理。
下面以两个域名为例:
@@ -111,68 +129,75 @@ MULTICA_APP_URL=https://app.example.com
MULTICA_PUBLIC_URL=https://api.example.com
```
-以上配置让浏览器流量全部走 app 域,cookie 不跨域,因此不需要配置 `COOKIE_DOMAIN`。如果改为让浏览器直接访问 api 域,则必须配置它,见[环境变量](/environment-variables)。
+按这份配置,浏览器流量全部走 app 域,cookie 不跨域,因此不需要配置 `COOKIE_DOMAIN`。如果改为让浏览器直接访问 api 域,则必须配置它,见[环境变量](/environment-variables)。
+
+然后配置 DNS,并用 Caddy 代理本机端口。Caddy 会申请 TLS 证书并转发 WebSocket。
-然后配置 DNS,并用 Caddy 代理本机端口:
+<Tabs items={["两个域名", "单一 origin"]}>
+<Tab value="两个域名">
```text
app.example.com {
- # 浏览器的 WebSocket 直接交给 backend
- @ws path /ws /ws/*
- handle @ws {
- reverse_proxy 127.0.0.1:8080 {
- flush_interval -1
- }
- }
-
- # 其余路径交给 frontend;它会转发 API 和登录请求
- handle {
- reverse_proxy 127.0.0.1:3000
- }
+ # 浏览器的 WebSocket 直接交给 backend
+ @ws path /ws /ws/*
+ handle @ws {
+ reverse_proxy 127.0.0.1:8080 {
+ flush_interval -1
+ }
+ }
+
+ # 其余路径交给 frontend;它会转发 API 和登录请求
+ handle {
+ reverse_proxy 127.0.0.1:3000
+ }
}
api.example.com {
- reverse_proxy 127.0.0.1:8080 {
- flush_interval -1
- }
+ reverse_proxy 127.0.0.1:8080 {
+ flush_interval -1
+ }
}
```
-如果想让所有流量走**单一 origin**(一个域名,或一台主机一个端口——小服务器上常见),把守护进程依赖的路径显式转给 backend,其余交给 frontend:
+</Tab>
+<Tab value="单一 origin">
```text
multica.example.com {
- # CLI 可达性探测:`multica setup` 会 GET <server-url>/health 并要求 200,
- # 旧版 frontend 不转发这个路径,直接路由到 backend
- handle /health {
- reverse_proxy 127.0.0.1:8080
- }
-
- # 网页端 realtime WebSocket——前端镜像代理不了 WS 升级,直通 backend
- handle /ws {
- reverse_proxy 127.0.0.1:8080 {
- flush_interval -1
- }
- }
-
- # daemon 长连接:拨的是 {server-url}/api/daemon/ws(不是 /ws)。
- # 缺了这条,握手失败后 daemon 会静默回退到轮询
- handle /api/daemon/ws {
- reverse_proxy 127.0.0.1:8080 {
- flush_interval -1
- }
- }
-
- # 其余路径交给 frontend;它会转发 API 和登录请求
- handle {
- reverse_proxy 127.0.0.1:3000
- }
+ # CLI 可达性探测:`multica setup` 会 GET <server-url>/health 并要求 200,
+ # 旧版 frontend 不转发这个路径,直接路由到 backend
+ handle /health {
+ reverse_proxy 127.0.0.1:8080
+ }
+
+ # 网页端 realtime WebSocket——前端镜像代理不了 WS 升级,直通 backend
+ handle /ws {
+ reverse_proxy 127.0.0.1:8080 {
+ flush_interval -1
+ }
+ }
+
+ # daemon 长连接:拨的是 {server-url}/api/daemon/ws(不是 /ws)。
+ # 缺了这条,握手失败后 daemon 会静默回退到轮询
+ handle /api/daemon/ws {
+ reverse_proxy 127.0.0.1:8080 {
+ flush_interval -1
+ }
+ }
+
+ # 其余路径交给 frontend;它会转发 API 和登录请求
+ handle {
+ reverse_proxy 127.0.0.1:3000
+ }
}
```
-单一 origin 模式下,两个 URL 都指向它(`.env` 里的 `FRONTEND_ORIGIN` 和 `MULTICA_APP_URL`,以及 `multica setup self-host` 的 `--server-url` 和 `--app-url`)。
+</Tab>
+</Tabs>
+
+**单一 origin**(一个域名,或一台主机一个端口,小服务器上常见)把守护进程依赖的路径显式转给 backend,其余交给 frontend。这种模式下两个 URL 都指向它:`.env` 里的 `FRONTEND_ORIGIN` 和 `MULTICA_APP_URL`,以及 `multica setup self-host` 的 `--server-url` 和 `--app-url`。
-Caddy 会申请 TLS 证书并转发 WebSocket。修改 `.env` 后,用 `up -d` 重新创建容器,让新配置生效:
+修改 `.env` 后,用 `up -d` 重新创建容器,让新配置生效:
```bash
docker compose -f docker-compose.selfhost.yml up -d
@@ -180,13 +205,27 @@ curl -fsS https://api.example.com/readyz
curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"]*"'
```
-最后一条命令输出 `daemon_server_url`——daemon 连接 API 用的地址:设了 `MULTICA_DAEMON_SERVER_URL` 时用它,其次是 `MULTICA_PUBLIC_URL`,否则用 app URL(`MULTICA_APP_URL`,未设置时回退到 `FRONTEND_ORIGIN`)。当 `MULTICA_APP_URL` 和 `FRONTEND_ORIGIN` 都没设时,这个字段会整个从响应里省略(上面的 grep 无输出)——即使设了 `MULTICA_DAEMON_SERVER_URL` 或 `MULTICA_PUBLIC_URL` 也是如此。如果输出的是 `localhost`,说明 `.env` 里还是本地默认值:不要依赖从 `.env.example` 复制来的 `${FRONTEND_PORT}` 引用,把 `FRONTEND_ORIGIN` 和 `MULTICA_APP_URL` 显式设置为公网地址,然后重建容器。
+最后一条命令输出 `daemon_server_url`,也就是 daemon 连接 API 用的地址。如果输出的是 `localhost`,说明 `.env` 里还是本地默认值:不要依赖从 `.env.example` 复制来的 `${FRONTEND_PORT}` 引用,把 `FRONTEND_ORIGIN` 和 `MULTICA_APP_URL` 显式设置为公网地址,然后重建容器。
+
+<Accordions>
+<Accordion title="daemon_server_url 怎么确定" id="how-daemon-server-url-is-resolved">
+
+设了 `MULTICA_DAEMON_SERVER_URL` 时用它,其次是 `MULTICA_PUBLIC_URL`,否则用 app URL(`MULTICA_APP_URL`,未设置时回退到 `FRONTEND_ORIGIN`)。当 `MULTICA_APP_URL` 和 `FRONTEND_ORIGIN` 都没设时,这个字段会整个从响应里省略(上面的 grep 无输出),即使设了 `MULTICA_DAEMON_SERVER_URL` 或 `MULTICA_PUBLIC_URL` 也是如此。
+
+</Accordion>
+</Accordions>
<Callout type="warning">
`docker compose restart` 只重启现有容器,不会重新读取 `.env`。修改配置后,重新读取 `.env` 需要运行 `docker compose -f docker-compose.selfhost.yml up -d`。
</Callout>
-## 4. 登录并创建工作区
+</Tab>
+</Tabs>
+
+</Step>
+<Step>
+
+## 登录并创建工作区 [#4-登录并创建工作区]
打开本机的 `http://localhost:3000`,或刚才配置的 `https://app.example.com`,输入邮箱获取验证码。
@@ -194,7 +233,7 @@ curl -fsS https://app.example.com/api/config | grep -o '"daemon_server_url":"[^"
```bash
docker compose -f docker-compose.selfhost.yml logs backend \
- | grep "Verification code"
+ | grep "Verification code"
```
日志中会出现类似内容:
@@ -209,43 +248,58 @@ docker compose -f docker-compose.selfhost.yml logs backend \
自托管部署默认使用 `APP_ENV=production`,不会启用固定验证码。不要在公网实例上设置 `MULTICA_DEV_VERIFICATION_CODE`。
</Callout>
-## 5. 连接执行电脑
+</Step>
+<Step>
+
+## 连接执行电脑 [#5-连接执行电脑]
下面的命令在**运行 AI 编程工具的电脑**上执行,不一定是运行 Docker 的服务器。
<Callout type="warning">
-每次执行都拥有守护进程所属用户的全部权限——该用户能读写的一切,运行都能读写。请用专用 Unix 用户、容器或虚拟机来运行守护进程,而不是你的个人账号。详见[安全模型](/security-model)。
+每次运行都拥有守护进程所属用户的全部权限,该用户能读写的一切,运行都能读写。请用专用 Unix 用户、容器或虚拟机来运行守护进程,而不是你的个人账号。详见[安全模型](/security-model)。
</Callout>
先安装 Multica CLI:
-**macOS / Linux**
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
```bash
curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash
```
-**Windows PowerShell**
+</Tab>
+<Tab value="Windows">
```powershell
irm https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.ps1 | iex
```
-如果 Multica 服务也在这台电脑上,运行:
+</Tab>
+</Tabs>
+
+然后让 CLI 连接你的服务。按 Multica 服务所在的位置选择:
+
+<Tabs items={["服务在这台电脑上", "服务在另一台机器上"]}>
+<Tab value="服务在这台电脑上">
```bash
multica setup self-host
```
-如果 Multica 服务在另一台机器上,传入刚才配置的两个地址:
+</Tab>
+<Tab value="服务在另一台机器上">
```bash
multica setup self-host \
- --server-url https://api.example.com \
- --app-url https://app.example.com
+ --server-url https://api.example.com \
+ --app-url https://app.example.com
```
-这条命令会先检查 `<server-url>/health`,再打开浏览器完成登录。登录完成后,它会保存本机凭据并启动守护进程。这一步报 `Server not reachable`,说明 `/health` 没有通过探测拿到 200:可能是代理把所有流量转给了不转发该路径的旧版 frontend,可能是代理根本没把 `/health` 路由到 backend,也可能是更底层的问题(DNS、TLS、防火墙、超时、backend 返回 5xx)——见[故障排查](/troubleshooting#multica-setup-报告服务器不可达)。
+</Tab>
+</Tabs>
+
+服务在另一台机器上时,传入的是刚才配置的两个地址。这条命令会先检查 `<server-url>/health`,再打开浏览器完成登录。登录完成后,它会保存本机凭据并启动守护进程。这一步报 `Server not reachable`,说明 `/health` 没有通过探测拿到 200,可能的原因有三种:代理把所有流量转给了不转发该路径的旧版 frontend;代理根本没把 `/health` 路由到 backend;更底层的问题(DNS、TLS、防火墙、超时、backend 返回 5xx)。见[故障排查](/troubleshooting#multica-setup-reports-the-server-is-not-reachable)。
确认连接状态:
@@ -259,12 +313,18 @@ multica daemon status
- `Agents` 中包含本机已安装的 AI 编程工具
- `Workspaces` 大于 `0`
-## 6. 完成第一次执行
+</Step>
+<Step>
+
+## 完成第一次执行 [#6-完成第一次执行]
回到 Multica。运行时列表中出现在线的运行时后,创建一个智能体,并把第一个任务分配给它。
执行日志变为"已完成"、时间线中出现智能体的回复,说明自托管服务、执行电脑和 AI 编程工具已经连通。详细步骤见[快速上手](/cloud-quickstart)第 3-5 步。
+</Step>
+</Steps>
+
## 常用管理命令
以下命令都在 `multica` 仓库目录中运行:
@@ -283,77 +343,87 @@ docker compose -f docker-compose.selfhost.yml up -d
docker compose -f docker-compose.selfhost.yml down
```
-升级已发布的镜像:
+<Callout type="warning">
+`docker compose down` 会保留 `pgdata` 和 `backend_uploads`。加上 `-v` 会删除这些数据卷,包括数据库;除非确定要清空实例,否则不要运行 `docker compose down -v`。
+</Callout>
-```bash
-git pull --ff-only
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
-curl -fsS http://localhost:8080/readyz
-```
+## 升级
-Docker Compose 部署有两种升级写法。在已有部署上两者**结果相同**——`Makefile` 里的 `selfhost` target 跑的就是同一套 `docker compose pull` + `up -d`,只是额外多做了两件事:`.env` 缺失时生成一份,以及等 `/health` 就绪后打印一段状态汇总。用哪个都行:
+<Steps>
+<Step>
-```bash
-cd multica
-git pull
-make selfhost
-```
+### 确认没有钉死镜像 tag
+
+两个镜像都写成 `${MULTICA_IMAGE_TAG:-latest}`(`docker-compose.selfhost.yml`:`services.backend.image`、`services.frontend.image`),而 `.env.example` 里默认是 `MULTICA_IMAGE_TAG=latest`。
```bash
-cd multica
-git pull
-docker compose -f docker-compose.selfhost.yml pull
-docker compose -f docker-compose.selfhost.yml up -d
+grep MULTICA_IMAGE_TAG .env
+# MULTICA_IMAGE_TAG=v0.4.5 ← 钉死了:先改成 latest(或你想要的版本)
```
-### `git pull` 到底更新了什么
+<Callout type="warning">
+**如果你在 `.env` 里钉死了 `MULTICA_IMAGE_TAG`,下面的升级命令都升不上去。** `pull` 只是把同一个 tag 重拉一遍,版本原地不动,不报错,也没有任何警告。
+</Callout>
-`git pull` 更新的是 **`docker-compose.selfhost.yml` 本身**——新增的环境变量、新增的服务、改过的 healthcheck。它**不是**拉新版本 Multica 的机制。
+</Step>
+<Step>
-真正决定你跑哪个版本的是 `docker compose pull`:它去 GHCR 查这个 tag 当前指向哪个镜像。所以一个几个月没更新的 checkout 照样能拉到今天的 `latest` 镜像;反过来,只跑 `git pull` 而不拉镜像、不重建容器,什么都不会变。
+### 备份 Postgres
-<Callout type="warning">
-**如果你在 `.env` 里钉死了 `MULTICA_IMAGE_TAG`,两种写法都升不上去。** 两个镜像都写成 `${MULTICA_IMAGE_TAG:-latest}`(`docker-compose.selfhost.yml`:`services.backend.image`、`services.frontend.image`),而 `.env.example` 里默认是 `MULTICA_IMAGE_TAG=latest`。一旦你把它改成了具体版本,`pull` 只是把同一个 tag 重拉一遍,版本原地不动——不报错,也没有任何警告。升级前先确认:
+migration 只往前走、不回滚,所以正式环境升级前先导一份:
```bash
-grep MULTICA_IMAGE_TAG .env
-# MULTICA_IMAGE_TAG=v0.4.5 ← 钉死了:先改成 latest(或你想要的版本)
+docker compose -f docker-compose.selfhost.yml exec -T postgres \
+ pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
```
+
+如果你改过 `POSTGRES_USER` / `POSTGRES_DB`,把 `multica` 换成 `.env` 里的实际值。数据存在名为 `multica_pgdata` 的 volume 里,`docker compose down` 不会删它,但 `down -v` 会。
+
+<Callout type="warning">
+**不要把 `pg_dump` 直接管道接给 `gzip`。** shell 取的是管道里**最后一条**命令的退出码,所以 `pg_dump ... | gzip > backup.sql.gz` 在导出失败时照样返回 `0`,留下一个格式完全合法、但里面什么都没有的 20 字节压缩包。先重定向到文件,`pg_dump` 自己的退出码才算数,`&&` 也只会压缩真正成功的那份导出。
</Callout>
-### `.env` 不会被覆盖
+</Step>
+<Step>
-`make selfhost` 只在 `.env` **不存在**的时候才生成它。在已有部署上重复跑,你的 `JWT_SECRET`、Postgres 密码、邮件配置、`FRONTEND_ORIGIN` 都原样保留。
+### 拉取新镜像并重建容器
-### 升级前先备份 Postgres
+在已有部署上,下面两种写法**结果相同**:`Makefile` 里的 `selfhost` target 跑的就是同一套 `docker compose pull` + `up -d`,只是额外多做了两件事,`.env` 缺失时生成一份,以及等 `/health` 就绪后打印一段状态汇总。用哪个都行:
-migration 只往前走、不回滚,所以正式环境升级前先导一份:
+<Tabs items={["make selfhost", "docker compose"]}>
+<Tab value="make selfhost">
```bash
-docker compose -f docker-compose.selfhost.yml exec -T postgres \
- pg_dump -U multica multica > multica-backup.sql && gzip multica-backup.sql
+cd multica
+git pull --ff-only
+make selfhost
```
-<Callout type="warning">
-**不要把 `pg_dump` 直接管道接给 `gzip`。** shell 取的是管道里**最后一条**命令的退出码,所以 `pg_dump ... | gzip > backup.sql.gz` 在导出失败时照样返回 `0`,留下一个格式完全合法、但里面什么都没有的 20 字节压缩包。先重定向到文件,`pg_dump` 自己的退出码才算数,`&&` 也只会压缩真正成功的那份导出。
-</Callout>
+</Tab>
+<Tab value="docker compose">
-如果你改过 `POSTGRES_USER` / `POSTGRES_DB`,把 `multica` 换成 `.env` 里的实际值。数据存在名为 `multica_pgdata` 的 volume 里,`docker compose down` 不会删它——但 `down -v` 会。
+```bash
+cd multica
+git pull --ff-only
+docker compose -f docker-compose.selfhost.yml pull
+docker compose -f docker-compose.selfhost.yml up -d
+```
-### migration 自动执行
+</Tab>
+</Tabs>
-和[第 1 步](#1-启动-multica)一样,backend 容器启动时会在对外提供服务之前先跑 `./migrate up`(`docker/entrypoint.sh`)。没有单独的升级命令——把新镜像起起来,本身就是升级这一步。想看过程:
+和[第 2 步](#2-确认服务已经就绪)一样,backend 容器启动时会在对外提供服务之前先跑 `./migrate up`(`docker/entrypoint.sh`)。没有单独的升级命令,把新镜像起起来,本身就是升级这一步。想看过程:
```bash
docker compose -f docker-compose.selfhost.yml logs -f backend
```
-Migration 在 backend 启动时自动运行;需要回填历史数据的 migration(如 103)也会自动完成回填。自动回填极少数情况下失败,报 `refusing to drop legacy daily rollups`,处理见[故障排查](/troubleshooting#升级时-migration-103-拒绝执行)。
+需要回填历史数据的 migration(如 103)也会自动完成回填。自动回填极少数情况下失败,报 `refusing to drop legacy daily rollups`,处理见[故障排查](/troubleshooting#migration-103-blocks-an-upgrade)。
-### 用 `/readyz` 验证,不要用 `/health`
+</Step>
+<Step>
-`/health` 是 **liveness** 探针,只要进程还活着就返回 `{"status":"ok"}`,migration 失败了它照样是 ok。`/readyz`(`server/cmd/server/router.go` 中注册的 `readyHandler`,`/healthz` 是它的别名)会真正检查数据库和已应用的 migration 集合,升级出问题能被它拦下来:
+### 用 `/readyz` 验证,不要用 `/health`
```bash
curl -s localhost:8080/readyz
@@ -362,15 +432,32 @@ curl -s localhost:8080/readyz
只要不是 HTTP 200 且两项都是 `ok`,就说明新版本没把 migration 跑完,先去看 backend 日志,别急着放流量进来。
-### Kubernetes
+`/health` 是 **liveness** 探针,只要进程还活着就返回 `{"status":"ok"}`,migration 失败了它照样是 ok。`/readyz`(`server/cmd/server/router.go` 中注册的 `readyHandler`,`/healthz` 是它的别名)会检查数据库和已应用的 migration 集合,升级出问题能被它拦下来。
-Helm 有自己的升级路径:在 values 文件里把 `images.backend.tag` / `images.frontend.tag` 设成你要的版本,然后 `helm upgrade`。改 tag 就改了 pod spec,Kubernetes 会拉新镜像并滚动更新——这是可靠的路径。
+</Step>
+</Steps>
-`kubectl -n multica rollout restart` 本身**不是**升级。chart 默认 `pullPolicy: IfNotPresent`(`deploy/helm/multica/values.yaml`),节点上已经缓存过这个 tag 的话,restart 只会用回旧镜像,什么都没变——和钉死 `MULTICA_IMAGE_TAG` 是同一类坑。真要靠浮动 tag 走这条路,得先把 `images.backend.pullPolicy` / `images.frontend.pullPolicy` 设成 `Always`。详见仓库的 [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative)。
+<Accordions type="multiple">
+<Accordion title="git pull 到底更新了什么" id="what-git-pull-actually-does">
-<Callout type="warning">
-`docker compose down` 会保留 `pgdata` 和 `backend_uploads`。加上 `-v` 会删除这些数据卷,包括数据库;除非确定要清空实例,否则不要运行 `docker compose down -v`。
-</Callout>
+`git pull` 更新的是 **`docker-compose.selfhost.yml` 本身**:新增的环境变量、新增的服务、改过的 healthcheck。拉新版本 Multica 靠的**不是**它。
+
+真正决定你跑哪个版本的是 `docker compose pull`:它去 GHCR 查这个 tag 当前指向哪个镜像。所以一个几个月没更新的 checkout 照样能拉到今天的 `latest` 镜像;反过来,只跑 `git pull` 而不拉镜像、不重建容器,什么都不会变。
+
+</Accordion>
+<Accordion title=".env 不会被覆盖" id="your-env-is-not-overwritten">
+
+`make selfhost` 只在 `.env` **不存在**的时候才生成它。在已有部署上重复跑,你的 `JWT_SECRET`、Postgres 密码、邮件配置、`FRONTEND_ORIGIN` 都原样保留。
+
+</Accordion>
+<Accordion title="在 Kubernetes 上升级" id="kubernetes">
+
+Helm 有自己的升级路径:在 values 文件里把 `images.backend.tag` / `images.frontend.tag` 设成你要的版本,然后 `helm upgrade`。改 tag 就改了 pod spec,Kubernetes 会拉新镜像并滚动更新,这是可靠的做法。
+
+`kubectl -n multica rollout restart` 本身**不是**升级。chart 默认 `pullPolicy: IfNotPresent`(`deploy/helm/multica/values.yaml`),节点上已经缓存过这个 tag 的话,restart 只会用回旧镜像,什么都没变,和钉死 `MULTICA_IMAGE_TAG` 是同一类坑。真要靠浮动 tag 走这条路,得先把 `images.backend.pullPolicy` / `images.frontend.pullPolicy` 设成 `Always`。详见仓库的 [Self-hosting guide](https://github.com/multica-ai/multica/blob/main/SELF_HOSTING.md#kubernetes-deployment-alternative)。
+
+</Accordion>
+</Accordions>
## 常见问题
@@ -378,7 +465,7 @@ Helm 有自己的升级路径:在 values 文件里把 `images.backend.tag` / `
|---|---|
| `/readyz` 没有返回 `ok` | 运行 `docker compose -f docker-compose.selfhost.yml logs backend postgres`。 |
| 收不到验证码 | 请求一次验证码,再从 backend 日志中查找 `Verification code`。 |
-| `setup self-host` 提示 server 不可达 | 在执行电脑上请求 `https://api.example.com/health`,确认 DNS、TLS 和反向代理都可达。返回 404 说明代理把 `/health` 转给了不转发该路径的旧版 frontend——改为直通 backend(见[故障排查](/troubleshooting#multica-setup-报告服务器不可达))。 |
+| `setup self-host` 提示 server 不可达 | 在执行电脑上请求 `https://api.example.com/health`,确认 DNS、TLS 和反向代理都可达。返回 404 说明代理把 `/health` 转给了不转发该路径的旧版 frontend,改为直通 backend(见[故障排查](/troubleshooting#multica-setup-reports-the-server-is-not-reachable))。 |
| 守护进程没有列出 `Agents` | 确认 AI 编程工具在 `PATH` 中并已登录,然后运行 `multica daemon restart`。 |
| 任务一直排队 | 运行 `multica daemon status`,确认守护进程正在运行并连接了工作区。 |
diff --git a/apps/docs/content/docs/shortcuts.fr.mdx b/apps/docs/content/docs/shortcuts.fr.mdx
new file mode 100644
index 0000000000..3a558fc526
--- /dev/null
+++ b/apps/docs/content/docs/shortcuts.fr.mdx
@@ -0,0 +1,115 @@
+---
+title: Recherche, raccourcis et préférences
+description: Rechercher et exécuter des commandes avec ⌘K, consulter et modifier les raccourcis clavier, chercher du texte dans une tâche et régler vos préférences personnelles comme le thème, la langue et le fuseau horaire.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+Les touches ci-dessous sont notées pour macOS. Sous Windows et Linux, `⌘` devient `Ctrl` ; les tableaux donnent les deux.
+
+## Recherche
+
+Appuyez sur `⌘K`, ou cliquez sur **Rechercher...** en haut de la barre latérale. Sans saisie, la fenêtre propose **Nouvelle tâche** et les tâches ouvertes récemment. Dès que vous tapez, les résultats sont regroupés :
+
+| Groupe | Ce qu'il trouve |
+|---|---|
+| **Pages** | Les pages de l'espace de travail : boîte de réception, discussion, tâches, projets, agents, paramètres, etc. |
+| **Commandes** | Nouvelle tâche, Nouveau projet, et le passage au thème clair, sombre ou du système. Sur la page d'une tâche s'ajoutent Copier le lien de la tâche, Copier l'identifiant, Replier tous les commentaires et Déplier tous les commentaires. |
+| **Membres** | Recherche par nom ou par e-mail. |
+| **Espaces de travail** | Vos autres espaces de travail ; en choisir un vous y fait passer. |
+| **Projets**, **Tâches** | Correspondances dans les titres, mais aussi dans les descriptions de projets et de tâches et dans les commentaires. L'extrait trouvé s'affiche sous le résultat, et les tâches terminées sont incluses. |
+| **Annulés** | Les projets et tâches annulés sont regroupés à la fin au lieu de se mêler au reste. |
+
+Choisir un résultat l'ouvre. Maintenez `⌘` (`Ctrl` sous Windows et Linux) en cliquant ou en appuyant sur Entrée pour l'ouvrir dans un nouvel onglet. `Échap` ferme la recherche.
+
+## Raccourcis clavier
+
+| Action | macOS | Windows / Linux | Remarques |
+|---|---|---|---|
+| Ouvrir la recherche | `⌘K` | `Ctrl+K` | |
+| Créer une tâche | `C` | `C` | Ouvre votre mode de création préféré. Sur la page d'un projet, la nouvelle tâche est préremplie avec ce projet. |
+| Afficher ou masquer la barre latérale gauche | `⌘B` | `Ctrl+B` | |
+| Afficher ou masquer la barre latérale droite | `⌘/` | `Ctrl+/` | Uniquement sur les pages qui en ont une, comme une tâche. |
+| Afficher ou masquer la fenêtre de discussion | `⌘J` | `Ctrl+J` | À l'ouverture, le curseur se place dans la zone de saisie. Voir [Discuter depuis n'importe quelle page](/chat#discuter-depuis-nimporte-quelle-page). |
+| Rechercher dans la tâche | `⌘F` | `Ctrl+F` | Voir plus bas. |
+| Archiver la notification | `E` | `E` | Archive la notification ouverte dans la boîte de réception, ou la restaure quand vous consultez les archives. |
+| Envoyer | `⌘↵` | `Ctrl+Enter` | Envoie commentaires et messages de discussion, et sert aussi à créer des tâches. |
+| Revenir en arrière | `⌘[` | `Ctrl+[` | |
+| Avancer | `⌘]` | `Ctrl+]` | |
+
+Les raccourcis à une seule touche (`C`, `E`) et Revenir en arrière / Avancer ne réagissent pas pendant que vous tapez dans un champ.
+
+Le groupe **Navigation** propose aussi d'aller à la boîte de réception, aux discussions, à Mes tâches, aux tâches, aux projets, aux automatisations, aux agents, aux squads, aux statistiques, aux runtimes, aux skills et aux paramètres. Aucune de ces actions n'a de touche par défaut : attribuez-en à celles que vous utilisez.
+
+### Raccourcis système fixes
+
+Ceux-ci ne se modifient pas. Sauf `Échap`, ils ne fonctionnent que dans l'[application de bureau](/desktop-app) ; dans un navigateur, c'est le navigateur qui gère ces touches.
+
+| Action | macOS | Windows / Linux |
+|---|---|---|
+| Ouvrir les paramètres | `⌘,` | `Ctrl+,` |
+| Fermer l'onglet actif | `⌘W` | `Ctrl+W` |
+| Sélectionner l'onglet 1 à 8 | `⌘1`–`⌘8` | `Ctrl+1`–`Ctrl+8` |
+| Sélectionner le dernier onglet | `⌘9` | `Ctrl+9` |
+| Zoom avant / Zoom arrière / Réinitialiser le zoom | `⌘+` / `⌘−` / `⌘0` | `Ctrl++` / `Ctrl+-` / `Ctrl+0` |
+| Fermer la fenêtre ou le menu | `Échap` | `Échap` |
+
+## Modifier un raccourci
+
+<Steps>
+<Step>
+
+Ouvrez **Paramètres → Raccourcis**. Le champ de recherche en haut retrouve une action par son nom.
+
+</Step>
+<Step>
+
+Cliquez sur les touches à droite d'une action. Quand « Appuyez sur les touches » s'affiche, tapez la nouvelle combinaison. `Échap` annule ; `Suppr` efface le raccourci de l'action.
+
+</Step>
+<Step>
+
+Les deux boutons au bout de chaque ligne rétablissent la valeur par défaut de l'action ou la désactivent. **Rétablir les valeurs par défaut**, en haut, annule toutes les personnalisations d'un coup.
+
+</Step>
+</Steps>
+
+Les raccourcis ne sont enregistrés que sur l'appareil utilisé. Sur un autre ordinateur, ou en passant du navigateur à l'application de bureau, il faut les redéfinir.
+
+L'enregistrement refuse certaines combinaisons et en indique la raison sous les touches :
+
+- une combinaison déjà attribuée à une autre action ;
+- les combinaisons réservées au navigateur, à la fenêtre de bureau ou au système, comme `⌘W`, `⌘R`, `⌘Q`, `⌘,`, les touches d'édition (copier, coller…), `⌘0`–`⌘9` et les touches de zoom. Dans un navigateur, `⌘P`, `⌘L`, `⌘T`, `⌘N`, `⌘D` et `⌘U` sont aussi exclus ; l'application de bureau les accepte. Sous Windows et Linux, toute combinaison avec la touche Windows / Super est refusée ;
+- les actions qui fonctionnent aussi dans un champ de saisie, comme Ouvrir la recherche, la fenêtre de discussion ou Rechercher dans la tâche, exigent `⌘`, `Ctrl` ou `Control`, pour ne jamais se déclencher pendant la frappe ;
+- **Envoyer** ne peut être que `↵` ou `⌘↵`.
+
+<Callout>
+Si **Envoyer** est réglé sur `↵`, utilisez `Maj+Entrée` pour aller à la ligne : cela insère un paragraphe, poursuit une liste ou ajoute un saut de ligne dans un bloc de code.
+</Callout>
+
+## Rechercher dans une tâche
+
+Sur la page d'une tâche, `⌘F` ouvre la barre de recherche de Multica plutôt que celle du navigateur. La recherche du navigateur ne voit que les commentaires affichés à l'écran ; celle-ci parcourt toute la chronologie, titre, description et commentaires compris.
+
+La casse est ignorée. La barre indique « position/total », ou « Aucune correspondance ». `↵` passe à la correspondance suivante, `Maj+Entrée` à la précédente, `Échap` ferme la barre. Un texte coupé par un changement de mise en forme (à moitié en gras, par exemple) n'est pas trouvé.
+
+Dans l'application de bureau, seul l'onglet visible réagit à `⌘F`.
+
+## Préférences
+
+Les préférences personnelles se trouvent dans **Paramètres → Préférences** et s'appliquent immédiatement. Chaque groupe est enregistré à un endroit différent :
+
+| Groupe | Réglage | Enregistré |
+|---|---|---|
+| **Langue et région** | Langue : English, 中文, 한국어, 日本語, Français. La page se recharge après un changement.<br />Fuseau horaire : suit le navigateur par défaut ; sert aux dates et graphiques de tous vos espaces de travail. La liste couvre tous les fuseaux et se filtre par recherche. | Dans votre compte, synchronisé sur vos autres appareils |
+| **Apparence** | Thème : Clair, Sombre ou Système. Vous pouvez aussi taper « thème » dans la recherche pour en changer. | Sur cet appareil |
+| **Commentaires et discussion** | **Épingler la barre de commentaire en bas** : la zone de commentaire reste visible pendant la lecture d'une longue chronologie.<br />**En répondant à un agent en cours d'exécution** : choix par défaut entre « Ajouter à l'exécution en cours » et « Démarrer après cette exécution », modifiable pour chaque message avant l'envoi ; voir [Réorienter un agent en cours d'exécution](/mentioning-agents#réorienter-un-agent-en-cours-dexécution).<br />**Fenêtre de discussion flottante** : désactivée, le bouton de discussion n'apparaît plus en bas à droite. | Sur cet appareil |
+| **Ouverture des tâches** | Un clic sur une carte ou une ligne ouvre la page complète ou l'aperçu latéral. Maj+clic ouvre l'autre. | Sur cet appareil |
+| **Champs affichés à la création de tâches** | Les champs gardés dans la barre d'outils pour « Création avec un agent » et « Création manuelle ». Les champs masqués restent accessibles depuis le menu ⋯ et réapparaissent tant qu'ils contiennent une valeur. | Sur cet appareil, pour l'espace de travail actuel |
+
+## Étapes suivantes
+
+- [Discuter avec des agents](/chat) — la fenêtre de discussion flottante, les messages en file d'attente et Réorienter.
+- [Tâches](/issues) — contenu d'une tâche, statuts et vues.
+- [Commentaires](/comments) — commentaires, annotations et @mentions.
diff --git a/apps/docs/content/docs/shortcuts.ja.mdx b/apps/docs/content/docs/shortcuts.ja.mdx
new file mode 100644
index 0000000000..517aa24cad
--- /dev/null
+++ b/apps/docs/content/docs/shortcuts.ja.mdx
@@ -0,0 +1,115 @@
+---
+title: 検索・ショートカット・環境設定
+description: ⌘K で検索やコマンドを実行し、キーボードショートカットを確認・変更し、タスク内の文字を探し、テーマ・言語・タイムゾーンなどの個人設定を調整します。
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+以下のキーは macOS の表記です。Windows と Linux では `⌘` を `Ctrl` に読み替えてください。表には両方を載せています。
+
+## 検索
+
+`⌘K` を押すか、サイドバー上部の**検索...**をクリックすると検索ボックスが開きます。何も入力していないときは、**新規タスク**と最近開いたタスクが表示されます。キーワードを入力すると、結果がグループごとに表示されます。
+
+| グループ | 見つかるもの |
+|---|---|
+| **ページ** | インボックス、チャット、タスク、プロジェクト、エージェント、設定などのワークスペースのページ。 |
+| **コマンド** | 新規タスク、新規プロジェクト、ライト・ダーク・システムテーマへの切り替え。タスクの詳細を開いているときは、タスクのリンクをコピー、識別子をコピー、すべてのコメントを折りたたむ、すべてのコメントを展開も使えます。 |
+| **メンバー** | 名前またはメールアドレスで探します。 |
+| **ワークスペース** | 参加しているほかのワークスペース。選ぶとそこへ切り替わります。 |
+| **プロジェクト**、**タスク** | タイトルのほか、プロジェクトの説明、タスクの説明、コメントにも一致します。一致した箇所が結果の下に表示され、完了したタスクも含まれます。 |
+| **キャンセル済み** | キャンセルされたプロジェクトとタスクは、ほかの結果に混ざらず最後にまとめて表示されます。 |
+
+結果を選ぶとそのページへ移動します。`⌘`(Windows / Linux では `Ctrl`)を押しながらクリックするか Enter を押すと、新しいタブで開きます。`Esc` で検索ボックスを閉じます。
+
+## キーボードショートカット
+
+| 操作 | macOS | Windows / Linux | 補足 |
+|---|---|---|---|
+| 検索を開く | `⌘K` | `Ctrl+K` | |
+| タスクを作成 | `C` | `C` | 普段使う作成方法が開きます。プロジェクトのページで押すと、そのプロジェクトがあらかじめ入ります。 |
+| 左サイドバーを切り替え | `⌘B` | `Ctrl+B` | |
+| 右サイドバーを切り替え | `⌘/` | `Ctrl+/` | タスクの詳細など、右サイドバーのあるページでのみ使えます。 |
+| チャットウィンドウを切り替え | `⌘J` | `Ctrl+J` | 開くとカーソルが入力欄に入ります。[どのページからでもチャットする](/chat#どのページからでもチャットする)を参照。 |
+| タスク内を検索 | `⌘F` | `Ctrl+F` | 後述。 |
+| 通知をアーカイブ | `E` | `E` | インボックスで開いている通知をアーカイブします。アーカイブ表示中はアーカイブを解除します。 |
+| 送信 | `⌘↵` | `Ctrl+Enter` | コメントやチャットのメッセージを送信します。新しいタスクの作成にも使います。 |
+| 戻る | `⌘[` | `Ctrl+[` | |
+| 進む | `⌘]` | `Ctrl+]` | |
+
+1 キーだけのショートカット(`C`、`E`)と「戻る」「進む」は、入力欄で文字を打っている間は反応しません。
+
+**ナビゲーション**には、インボックス、チャット、自分のタスク、タスク、プロジェクト、自動化、エージェント、Squads、使用量、ランタイム、Skills、設定へ移動する操作もあります。どれも既定ではキーが割り当てられていないので、よく使うものに設定してください。
+
+### 固定のシステムショートカット
+
+以下は変更できません。`Esc` 以外は[デスクトップアプリ](/desktop-app)でのみ有効で、ブラウザではブラウザ側の動作になります。
+
+| 操作 | macOS | Windows / Linux |
+|---|---|---|
+| 設定を開く | `⌘,` | `Ctrl+,` |
+| アクティブなタブを閉じる | `⌘W` | `Ctrl+W` |
+| 1〜8番目のタブを選択 | `⌘1`–`⌘8` | `Ctrl+1`–`Ctrl+8` |
+| 最後のタブを選択 | `⌘9` | `Ctrl+9` |
+| 拡大 / 縮小 / ズームをリセット | `⌘+` / `⌘−` / `⌘0` | `Ctrl++` / `Ctrl+-` / `Ctrl+0` |
+| ダイアログまたはメニューを閉じる | `Esc` | `Esc` |
+
+## ショートカットを変更する
+
+<Steps>
+<Step>
+
+**設定 → ショートカット**を開きます。操作が多いときは、上部の検索欄で名前から探せます。
+
+</Step>
+<Step>
+
+操作の右側にあるキーをクリックし、「キーを入力」と表示されたら新しい組み合わせを押します。`Esc` でキャンセル、`Delete` でその操作のキーを消去します。
+
+</Step>
+<Step>
+
+各行の右端にある 2 つのボタンで、その操作をデフォルトに戻したり無効にしたりできます。上部の**デフォルトに戻す**は、すべてのカスタマイズをまとめて取り消します。
+
+</Step>
+</Steps>
+
+ショートカットは今使っているデバイスにだけ保存されます。別のパソコンを使うときや、ブラウザとデスクトップアプリを行き来するときは、設定し直してください。
+
+次のような組み合わせは登録できず、キーの下に理由が表示されます。
+
+- すでにほかの操作に割り当てられている組み合わせ。
+- ブラウザ、デスクトップウィンドウ、OS が使う組み合わせ。たとえば `⌘W`、`⌘R`、`⌘Q`、`⌘,`、コピー・貼り付けなどの編集キー、`⌘0`–`⌘9`、ズームのキーです。ブラウザでは `⌘P`、`⌘L`、`⌘T`、`⌘N`、`⌘D`、`⌘U` も使えませんが、デスクトップアプリでは使えます。Windows と Linux では、Win / Super キーを含む組み合わせはすべて使えません。
+- 検索を開く、チャットウィンドウを切り替え、タスク内を検索のように入力欄でも働く操作には、`⌘`、`Ctrl`、`Control` のいずれかが必要です。文字入力中に誤って発動しないためです。
+- **送信**に使えるのは `↵` か `⌘↵` だけです。
+
+<Callout>
+**送信**を `↵` にした場合、改行は `Shift+Enter` で入れます。段落の挿入、リストの継続、コードブロック内の改行ができます。
+</Callout>
+
+## タスク内を検索
+
+タスクの詳細ページで `⌘F` を押すと、ブラウザの検索ではなく Multica の検索バーが開きます。ブラウザの検索は画面に描画済みのコメントしか見つけられませんが、こちらはタイトル、説明、すべてのコメントを含むタイムライン全体を検索します。
+
+大文字と小文字は区別しません。検索バーには「現在の位置/総数」、見つからないときは「一致なし」と表示されます。`↵` で次の一致へ、`Shift+Enter` で前の一致へ移動し、`Esc` で閉じます。途中で書式が変わる文字列(半分だけ太字など)は見つかりません。
+
+デスクトップアプリでは、表示中のタブだけが `⌘F` に反応します。
+
+## 環境設定
+
+個人の設定は**設定 → 環境設定**にあり、変更はすぐに反映されます。グループによって保存先が異なります。
+
+| グループ | 設定 | 保存先 |
+|---|---|---|
+| **言語と地域** | 言語:English、中文、한국어、日本語、Français。変更するとページが再読み込みされます。<br />タイムゾーン:既定ではブラウザに従います。すべてのワークスペースの日付とグラフに使われ、全タイムゾーンから検索して選べます。 | アカウント(ほかのデバイスにも同期) |
+| **外観** | テーマ:ライト、ダーク、システム。検索ボックスで「テーマ」と入力して切り替えることもできます。 | このデバイス |
+| **コメントとチャット** | **コメント欄を下部に固定**:長いタイムラインを読んでいる間もコメント欄が見えたままになります。<br />**実行中のエージェントに返信するとき**:既定を「現在の実行に追加」と「この実行の後に開始」のどちらにするか。送信前にメッセージごとに変更できます。[実行中のエージェントに割り込む](/mentioning-agents#実行中のエージェントに割り込む)を参照。<br />**フローティングチャット**:オフにすると、右下のチャットボタンが表示されなくなります。 | このデバイス |
+| **タスクを開く** | カードや行をクリックしたときに、ページ全体とサイドプレビューのどちらで開くか。Shift+クリックでもう一方で開きます。 | このデバイス |
+| **タスク作成時に表示するフィールド** | 「エージェントで作成」と「手動作成」それぞれのツールバーに常に表示するフィールド。非表示のフィールドも ⋯ メニューから使え、値がある間は自動的に表示されます。 | このデバイスの現在のワークスペース |
+
+## 次のステップ
+
+- [エージェントとのチャット](/chat) — フローティングチャット、キュー内のメッセージ、指示。
+- [タスク](/issues) — タスクの構成、ステータス、ビュー。
+- [コメント](/comments) — コメント、注釈、@メンション。
diff --git a/apps/docs/content/docs/shortcuts.ko.mdx b/apps/docs/content/docs/shortcuts.ko.mdx
new file mode 100644
index 0000000000..a089daf69b
--- /dev/null
+++ b/apps/docs/content/docs/shortcuts.ko.mdx
@@ -0,0 +1,115 @@
+---
+title: 검색, 단축키, 환경설정
+description: ⌘K로 검색하고 명령을 실행하며, 키보드 단축키를 확인하고 바꾸고, 태스크 안에서 텍스트를 찾고, 테마·언어·시간대 같은 개인 설정을 조정합니다.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+아래 키는 macOS 기준으로 적었습니다. Windows와 Linux에서는 `⌘`를 `Ctrl`로 바꿔 읽으면 되고, 표에는 두 가지를 모두 적어 두었습니다.
+
+## 검색
+
+`⌘K`를 누르거나 사이드바 위쪽의 **검색...**을 클릭하면 검색 창이 열립니다. 아무것도 입력하지 않으면 **새 태스크**와 최근에 연 태스크가 보입니다. 키워드를 입력하면 결과가 그룹별로 표시됩니다.
+
+| 그룹 | 찾을 수 있는 것 |
+|---|---|
+| **페이지** | 인박스, 채팅, 태스크, 프로젝트, 에이전트, 설정 같은 워크스페이스 페이지. |
+| **명령어** | 새 태스크, 새 프로젝트, 라이트·다크·시스템 테마로 전환. 태스크 상세를 열어 둔 상태에서는 태스크 링크 복사, 식별자 복사, 모든 댓글 접기, 모든 댓글 펼치기도 나옵니다. |
+| **멤버** | 이름이나 이메일로 찾습니다. |
+| **워크스페이스** | 내가 속한 다른 워크스페이스. 선택하면 그쪽으로 전환됩니다. |
+| **프로젝트**, **태스크** | 제목뿐 아니라 프로젝트 설명, 태스크 설명, 댓글도 검색합니다. 일치한 부분이 결과 아래에 표시되고, 완료된 태스크도 포함됩니다. |
+| **취소됨** | 취소된 프로젝트와 태스크는 다른 결과와 섞이지 않고 맨 끝에 모아서 표시됩니다. |
+
+결과를 선택하면 바로 이동합니다. `⌘`(Windows / Linux에서는 `Ctrl`)를 누른 채 클릭하거나 Enter를 누르면 새 탭에서 엽니다. `Esc`로 검색 창을 닫습니다.
+
+## 키보드 단축키
+
+| 동작 | macOS | Windows / Linux | 참고 |
+|---|---|---|---|
+| 검색 열기 | `⌘K` | `Ctrl+K` | |
+| 태스크 만들기 | `C` | `C` | 평소 쓰는 생성 방식을 엽니다. 프로젝트 페이지에서 누르면 그 프로젝트가 미리 채워집니다. |
+| 왼쪽 사이드바 전환 | `⌘B` | `Ctrl+B` | |
+| 오른쪽 사이드바 전환 | `⌘/` | `Ctrl+/` | 태스크 상세처럼 오른쪽 사이드바가 있는 페이지에서만 쓸 수 있습니다. |
+| 채팅 창 전환 | `⌘J` | `Ctrl+J` | 열면 커서가 메시지 입력란에 놓입니다. [어느 페이지에서나 채팅하기](/chat#어느-페이지에서나-채팅하기)를 참고하세요. |
+| 태스크에서 찾기 | `⌘F` | `Ctrl+F` | 아래 설명 참고. |
+| 알림 보관 | `E` | `E` | 인박스에서 열어 둔 알림을 보관합니다. 보관함을 보는 중에는 보관을 해제합니다. |
+| 보내기 | `⌘↵` | `Ctrl+Enter` | 댓글과 채팅 메시지를 보내고, 새 태스크를 만들 때도 씁니다. |
+| 뒤로 가기 | `⌘[` | `Ctrl+[` | |
+| 앞으로 가기 | `⌘]` | `Ctrl+]` | |
+
+키 하나짜리 단축키(`C`, `E`)와 뒤로 가기·앞으로 가기는 입력란에서 글을 쓰는 동안에는 동작하지 않습니다.
+
+**탐색** 그룹에는 인박스, 채팅, 내 태스크, 태스크, 프로젝트, 자동화, 에이전트, 스쿼드, 사용량, 런타임, Skills, 설정으로 이동하는 동작도 있습니다. 모두 기본 키가 없으니 자주 쓰는 것에 직접 지정하세요.
+
+### 고정 시스템 단축키
+
+아래 단축키는 바꿀 수 없습니다. `Esc`를 제외하면 [데스크톱 앱](/desktop-app)에서만 동작하고, 브라우저에서는 브라우저가 이 키를 처리합니다.
+
+| 동작 | macOS | Windows / Linux |
+|---|---|---|
+| 설정 열기 | `⌘,` | `Ctrl+,` |
+| 활성 탭 닫기 | `⌘W` | `Ctrl+W` |
+| 1~8번째 탭 선택 | `⌘1`–`⌘8` | `Ctrl+1`–`Ctrl+8` |
+| 마지막 탭 선택 | `⌘9` | `Ctrl+9` |
+| 확대 / 축소 / 확대/축소 재설정 | `⌘+` / `⌘−` / `⌘0` | `Ctrl++` / `Ctrl+-` / `Ctrl+0` |
+| 대화상자 또는 메뉴 닫기 | `Esc` | `Esc` |
+
+## 단축키 바꾸기
+
+<Steps>
+<Step>
+
+**설정 → 단축키**를 엽니다. 동작이 많을 때는 위쪽 검색란에서 이름으로 찾으세요.
+
+</Step>
+<Step>
+
+동작 오른쪽의 키를 클릭하고 '키를 누르세요'가 보이면 새 조합을 누릅니다. `Esc`는 취소, `Delete`는 그 동작의 키를 지웁니다.
+
+</Step>
+<Step>
+
+각 행 오른쪽 끝의 두 버튼으로 그 동작을 기본값으로 되돌리거나 사용하지 않게 할 수 있습니다. 위쪽의 **기본값 복원**은 모든 사용자 지정을 한 번에 되돌립니다.
+
+</Step>
+</Steps>
+
+단축키는 지금 쓰는 기기에만 저장됩니다. 다른 컴퓨터를 쓰거나 브라우저와 데스크톱 앱을 오갈 때는 다시 설정해야 합니다.
+
+다음 조합은 등록되지 않으며, 키 아래에 이유가 표시됩니다.
+
+- 이미 다른 동작에 지정된 조합.
+- 브라우저, 데스크톱 창, 운영체제가 쓰는 조합. 예를 들어 `⌘W`, `⌘R`, `⌘Q`, `⌘,`, 복사·붙여넣기 같은 편집 키, `⌘0`–`⌘9`, 확대/축소 키입니다. 브라우저에서는 `⌘P`, `⌘L`, `⌘T`, `⌘N`, `⌘D`, `⌘U`도 쓸 수 없지만 데스크톱 앱에서는 쓸 수 있습니다. Windows와 Linux에서는 Win / Super 키가 들어간 조합을 모두 쓸 수 없습니다.
+- 검색 열기, 채팅 창 전환, 태스크에서 찾기처럼 입력란에서도 동작하는 단축키에는 `⌘`, `Ctrl`, `Control` 중 하나가 있어야 합니다. 글을 쓰다가 잘못 실행되지 않게 하기 위해서입니다.
+- **보내기**에는 `↵`나 `⌘↵`만 쓸 수 있습니다.
+
+<Callout>
+**보내기**를 `↵`로 바꾸면 줄바꿈은 `Shift+Enter`로 합니다. 단락을 넣거나, 목록을 이어 가거나, 코드 블록에서 줄을 바꿀 수 있습니다.
+</Callout>
+
+## 태스크에서 찾기
+
+태스크 상세 페이지에서 `⌘F`를 누르면 브라우저 찾기 대신 Multica의 찾기 막대가 열립니다. 브라우저 찾기는 화면에 그려진 댓글만 찾지만, 이 막대는 제목, 설명, 모든 댓글을 포함한 타임라인 전체를 검색합니다.
+
+대소문자는 구분하지 않습니다. 찾기 막대에는 '현재/전체' 개수가, 결과가 없으면 '일치 항목 없음'이 표시됩니다. `↵`는 다음 항목, `Shift+Enter`는 이전 항목으로 이동하고 `Esc`로 닫습니다. 중간에 서식이 바뀌는 문자열(절반만 굵게 등)은 찾지 못합니다.
+
+데스크톱 앱에서는 지금 보이는 탭만 `⌘F`에 반응합니다.
+
+## 환경설정
+
+개인 설정은 **설정 → 환경설정**에 있고, 바꾸면 바로 적용됩니다. 그룹마다 저장 위치가 다릅니다.
+
+| 그룹 | 설정 | 저장 위치 |
+|---|---|---|
+| **언어 및 지역** | 언어: English, 中文, 한국어, 日本語, Français. 바꾸면 페이지가 다시 로드됩니다.<br />시간대: 기본값은 브라우저를 따릅니다. 모든 워크스페이스의 날짜와 차트에 쓰이며, 전체 시간대에서 검색해 고를 수 있습니다. | 계정(다른 기기에도 동기화) |
+| **모양** | 테마: 라이트, 다크, 시스템. 검색 창에 '테마'를 입력해 바꿀 수도 있습니다. | 이 기기 |
+| **댓글 및 채팅** | **댓글 입력란을 하단에 고정**: 긴 타임라인을 읽는 동안에도 댓글 입력란이 보입니다.<br />**실행 중인 에이전트에 답장할 때**: 기본값을 '현재 실행에 추가'와 '이번 실행 후 시작' 중 무엇으로 할지 정합니다. 보내기 전에 메시지마다 바꿀 수 있습니다. [실행 중인 에이전트에게 끼어들기](/mentioning-agents#실행-중인-에이전트에게-끼어들기)를 참고하세요.<br />**플로팅 채팅 창**: 끄면 오른쪽 아래 채팅 버튼이 더 이상 표시되지 않습니다. | 이 기기 |
+| **태스크 열기** | 카드나 행을 클릭했을 때 전체 페이지와 사이드 미리보기 중 어디로 열지 정합니다. Shift+클릭하면 다른 쪽으로 열립니다. | 이 기기 |
+| **태스크 생성 시 표시할 필드** | '에이전트로 생성'과 '수동 생성' 각각의 툴바에 항상 표시할 필드. 숨긴 필드도 ⋯ 메뉴에서 쓸 수 있고, 값이 있는 동안에는 자동으로 표시됩니다. | 이 기기의 현재 워크스페이스 |
+
+## 다음 단계
+
+- [에이전트와 대화](/chat) — 플로팅 채팅 창, 대기 중인 메시지, 지시.
+- [태스크](/issues) — 태스크의 구성, 상태, 보기.
+- [댓글](/comments) — 댓글, 주석, @멘션.
diff --git a/apps/docs/content/docs/shortcuts.mdx b/apps/docs/content/docs/shortcuts.mdx
new file mode 100644
index 0000000000..d4734e0483
--- /dev/null
+++ b/apps/docs/content/docs/shortcuts.mdx
@@ -0,0 +1,115 @@
+---
+title: Search, shortcuts, and preferences
+description: Search and run commands with ⌘K, review and rebind keyboard shortcuts, find text inside an issue, and set personal preferences such as theme, language, and time zone.
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+Keys below are written for macOS. On Windows and Linux, `⌘` becomes `Ctrl`; the tables list both.
+
+## Search
+
+Press `⌘K`, or click **Search...** at the top of the sidebar. With nothing typed, the search box offers **New Issue** and the issues you opened recently. Once you type, results are grouped:
+
+| Group | What it finds |
+|---|---|
+| **Pages** | Workspace pages such as Inbox, Chat, Issues, Projects, Agents, and Settings. |
+| **Commands** | New Issue, New Project, and switching to the light, dark, or system theme. On an issue page you also get Copy Issue Link, Copy Identifier, Fold All Comments, and Unfold All Comments. |
+| **Members** | Matches by name or email. |
+| **Workspaces** | Other workspaces you belong to; selecting one switches to it. |
+| **Projects**, **Issues** | Matches titles as well as project descriptions, issue descriptions, and comments. The matching snippet shows under the result, and done issues are included. |
+| **Cancelled** | Cancelled projects and issues are grouped at the end instead of mixing in with the rest. |
+
+Selecting a result opens it. Hold `⌘` (`Ctrl` on Windows and Linux) while clicking or pressing Enter to open it in a new tab. `Esc` closes the search box.
+
+## Keyboard shortcuts
+
+| Action | macOS | Windows / Linux | Notes |
+|---|---|---|---|
+| Open search | `⌘K` | `Ctrl+K` | |
+| Create issue | `C` | `C` | Opens your preferred creation flow. On a project page, the new issue is prefilled with that project. |
+| Toggle left sidebar | `⌘B` | `Ctrl+B` | |
+| Toggle right sidebar | `⌘/` | `Ctrl+/` | Only on pages with a right sidebar, such as an issue. |
+| Toggle chat window | `⌘J` | `Ctrl+J` | Opening it puts the cursor in the message input. See [Chat from any page](/chat#chat-from-any-page). |
+| Find in issue | `⌘F` | `Ctrl+F` | See below. |
+| Archive notification | `E` | `E` | Archives the open inbox notification, or restores it while you're reading the archive. |
+| Send | `⌘↵` | `Ctrl+Enter` | Sends comments and chat messages, and also submits new issues. |
+| Go back | `⌘[` | `Ctrl+[` | |
+| Go forward | `⌘]` | `Ctrl+]` | |
+
+Single-key shortcuts (`C`, `E`) and Go back / Go forward don't fire while you're typing in an input.
+
+The **Navigation** group also has Go to Inbox, Chat, My Issues, Issues, Projects, Autopilot, Agents, Squads, Usage, Runtimes, Skills, and Settings. None of them has a key by default; bind the ones you use.
+
+### Fixed system shortcuts
+
+These can't be changed. Except for `Esc`, they work only in the [desktop app](/desktop-app); in a browser, the browser handles these keys.
+
+| Action | macOS | Windows / Linux |
+|---|---|---|
+| Open Settings | `⌘,` | `Ctrl+,` |
+| Close active tab | `⌘W` | `Ctrl+W` |
+| Select tab 1–8 | `⌘1`–`⌘8` | `Ctrl+1`–`Ctrl+8` |
+| Select last tab | `⌘9` | `Ctrl+9` |
+| Zoom in / Zoom out / Reset zoom | `⌘+` / `⌘−` / `⌘0` | `Ctrl++` / `Ctrl+-` / `Ctrl+0` |
+| Close dialog or menu | `Esc` | `Esc` |
+
+## Change a shortcut
+
+<Steps>
+<Step>
+
+Open **Settings → Shortcuts**. Use the search box at the top to find an action by name.
+
+</Step>
+<Step>
+
+Click the keys to the right of an action. When it says "Press keys", press the new combination. `Esc` cancels; `Delete` clears the action's shortcut.
+
+</Step>
+<Step>
+
+The two buttons at the end of each row reset that action to its default and disable it. **Restore defaults** at the top undoes every customization at once.
+
+</Step>
+</Steps>
+
+Shortcuts are saved on the current device only. On another computer, or when you switch between the browser and the desktop app, set them again.
+
+Recording rejects a few kinds of combinations and says why under the keys:
+
+- A combination already assigned to another action.
+- Combinations the browser, the desktop window, or the operating system owns, such as `⌘W`, `⌘R`, `⌘Q`, `⌘,`, editing keys like copy and paste, `⌘0`–`⌘9`, and the zoom keys. In a browser, `⌘P`, `⌘L`, `⌘T`, `⌘N`, `⌘D`, and `⌘U` are off-limits too; the desktop app allows them. On Windows and Linux, any combination with the Win / Super key is rejected.
+- Actions that also work inside an input, such as Open search, Toggle chat window, and Find in issue, need `⌘`, `Ctrl`, or `Control`, so they never fire while you type.
+- **Send** can only be `↵` or `⌘↵`.
+
+<Callout>
+If you set **Send** to `↵`, use `Shift+Enter` for a new line: it inserts a paragraph, continues a list, or adds a line break in a code block.
+</Callout>
+
+## Find in issue
+
+On an issue page, `⌘F` opens Multica's own find bar instead of the browser's. Browser find only sees the comments currently rendered on screen; this one searches the whole timeline, including the title, the description, and every comment.
+
+Matching ignores case. The bar shows "current/total", or "No matches". Press `↵` for the next match, `Shift+Enter` for the previous one, and `Esc` to close. Text that spans a formatting change (say, half of it bold) isn't found.
+
+In the desktop app, only the visible tab responds to `⌘F`.
+
+## Preferences
+
+Personal preferences live under **Settings → Preferences** and apply immediately. Each group is stored in a different place:
+
+| Group | Setting | Stored in |
+|---|---|---|
+| **Language & region** | Language: English, 中文, 한국어, 日本語, Français. The page reloads after a change.<br />Time zone: follows the browser by default; used for dates and charts in all your workspaces. The list covers every time zone and is searchable. | Your account, synced to other devices |
+| **Appearance** | Theme: Light, Dark, or System. You can also type "theme" in the search box to switch. | This device |
+| **Comments & chat** | **Pin comment bar to bottom**: keeps the comment box in view while you read a long timeline.<br />**When replying to a running agent**: whether a reply defaults to "Add to current run" or "Start after this run". You can still change it per message; see [Steer a running agent](/mentioning-agents#steer-a-running-agent).<br />**Floating chat window**: when off, the chat button no longer appears in the bottom-right corner. | This device |
+| **Opening issues** | Whether clicking a card or row opens the full page or a side preview. Shift+Click opens the other one. | This device |
+| **Fields shown when creating issues** | Which fields stay on the toolbar for "Create with agent" and "Manual create". Hidden fields remain in the ⋯ menu and reappear while they hold a value. | This device, for the current workspace |
+
+## Next steps
+
+- [Chat with agents](/chat) — the floating chat window, queued messages, and Steer.
+- [Issues](/issues) — what an issue holds, statuses, and views.
+- [Comments](/comments) — comments, annotations, and @mentions.
diff --git a/apps/docs/content/docs/shortcuts.zh.mdx b/apps/docs/content/docs/shortcuts.zh.mdx
new file mode 100644
index 0000000000..409a5e7bde
--- /dev/null
+++ b/apps/docs/content/docs/shortcuts.zh.mdx
@@ -0,0 +1,115 @@
+---
+title: 搜索、快捷键与偏好设置
+description: 用 ⌘K 搜索和执行命令,查看和修改键盘快捷键,在任务里查找文字,调整主题、语言、时区等个人偏好。
+---
+
+import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+下面的按键按 macOS 写;Windows 和 Linux 上把 `⌘` 换成 `Ctrl`,表格里两种写法都列出来了。
+
+## 搜索
+
+按 `⌘K`,或者点侧边栏顶部的**搜索...**,打开搜索框。不输入时,这里列出**新建任务**和你最近打开过的任务。输入关键词后,结果分组显示:
+
+| 分组 | 能找到什么 |
+|---|---|
+| **页面** | 收件箱、聊天、任务、项目、智能体、设置等工作区页面。中文名称可以用拼音搜,例如输入 `renwu` 找到"任务"。 |
+| **命令** | 新建任务、新建项目,切换浅色、深色主题或跟随系统主题。打开任务详情时还有复制任务链接、复制标识符、收起全部评论、展开全部评论。 |
+| **成员** | 按姓名或邮箱查找,中文姓名同样支持拼音。 |
+| **工作区** | 你加入的其他工作区,选中后切换过去。 |
+| **项目**、**任务** | 匹配标题,也匹配项目说明、任务描述和评论。命中的片段显示在结果下方;已完成的任务也会出现。 |
+| **已取消** | 已取消的项目和任务统一排在最后,不会挤到前面。 |
+
+选中结果后直接跳转。按住 `⌘`(Windows / Linux:`Ctrl`)再点击或按回车,会在新标签页里打开。按 `Esc` 关闭搜索框。
+
+## 键盘快捷键
+
+| 操作 | macOS | Windows / Linux | 说明 |
+|---|---|---|---|
+| 打开搜索 | `⌘K` | `Ctrl+K` | |
+| 新建任务 | `C` | `C` | 打开你常用的创建方式。在项目页按,新任务会预先填好这个项目。 |
+| 显示或隐藏左侧边栏 | `⌘B` | `Ctrl+B` | |
+| 显示或隐藏右侧边栏 | `⌘/` | `Ctrl+/` | 只在有右侧栏的页面可用,例如任务详情。 |
+| 显示或隐藏聊天窗 | `⌘J` | `Ctrl+J` | 打开时光标落在输入框里。见[悬浮聊天窗](/chat#在任意页面打开悬浮聊天窗)。 |
+| 在任务中查找 | `⌘F` | `Ctrl+F` | 见下文。 |
+| 归档通知 | `E` | `E` | 归档收件箱里当前打开的通知;查看已归档时则取消归档。 |
+| 发送 | `⌘↵` | `Ctrl+Enter` | 发送评论和聊天消息,也用于提交新任务。 |
+| 后退 | `⌘[` | `Ctrl+[` | |
+| 前进 | `⌘]` | `Ctrl+]` | |
+
+单键快捷键(`C`、`E`)和后退、前进在输入框里不起作用,避免打字时误触。
+
+**导航**类操作还有前往收件箱、聊天、我的任务、任务、项目、自动化、智能体、小队、统计、运行时、Skills 和设置,默认都没有设置按键,需要时自己绑定。
+
+### 固定的系统快捷键
+
+下面这些不能修改。除了 `Esc`,其余只在[桌面端](/desktop-app)有效;网页版里这些按键由浏览器处理。
+
+| 操作 | macOS | Windows / Linux |
+|---|---|---|
+| 打开设置 | `⌘,` | `Ctrl+,` |
+| 关闭当前标签页 | `⌘W` | `Ctrl+W` |
+| 选择第 1–8 个标签页 | `⌘1`–`⌘8` | `Ctrl+1`–`Ctrl+8` |
+| 选择最后一个标签页 | `⌘9` | `Ctrl+9` |
+| 放大 / 缩小 / 重置缩放 | `⌘+` / `⌘−` / `⌘0` | `Ctrl++` / `Ctrl+-` / `Ctrl+0` |
+| 关闭对话框或菜单 | `Esc` | `Esc` |
+
+## 修改快捷键
+
+<Steps>
+<Step>
+
+打开**设置 → 快捷键**。操作多时,用顶部的搜索框按名称查找。
+
+</Step>
+<Step>
+
+点击某个操作右侧的按键,看到"请按键"后按下新的组合。`Esc` 取消,`Delete` 清除这个操作的按键。
+
+</Step>
+<Step>
+
+每行右侧的两个按钮分别把这一项恢复默认、停用这一项。顶部的**恢复默认设置**会一次撤销所有自定义。
+
+</Step>
+</Steps>
+
+快捷键只保存在当前设备上。换一台电脑,或者从浏览器换到桌面端,需要重新设置。
+
+录入时会拒绝几类组合,并在按键下方说明原因:
+
+- 已经分给其他操作的组合。
+- 浏览器、桌面窗口或系统占用的组合,例如 `⌘W`、`⌘R`、`⌘Q`、`⌘,`、复制粘贴这类编辑键、`⌘0`–`⌘9` 和缩放键。网页版里 `⌘P`、`⌘L`、`⌘T`、`⌘N`、`⌘D`、`⌘U` 也不能用,桌面端可以。Windows 和 Linux 上带 Win / Super 键的组合都不能用。
+- 打开搜索、聊天窗、在任务中查找这类在输入框里也生效的操作,必须带 `⌘`、`Ctrl` 或 `Control`,否则打字时会误触。
+- **发送**只能是 `↵` 或 `⌘↵`。
+
+<Callout>
+把**发送**改成 `↵` 后,换行改用 `Shift+Enter`:它会插入新段落、继续列表,或者在代码块里换行。
+</Callout>
+
+## 在任务中查找
+
+在任务详情页按 `⌘F`,打开的是 Multica 自己的查找栏,不是浏览器的查找。浏览器查找只能找到已经滚动到屏幕上的评论;这里会把整条时间线都纳入查找,包括标题、描述和所有评论。
+
+查找不区分大小写,查找栏显示"当前 / 总数",没有结果时显示"无匹配结果"。按 `↵` 跳到下一个,`Shift+Enter` 跳到上一个,`Esc` 关闭。一段文字中间跨了格式(例如一半加粗)时,查不到这段。
+
+在桌面端,只有当前显示的标签页会响应 `⌘F`。
+
+## 偏好设置
+
+个人偏好在**设置 → 偏好设置**里,改动立即生效。各组的保存范围不同:
+
+| 分组 | 设置 | 保存在 |
+|---|---|---|
+| **语言与地区** | 语言:English、中文、한국어、日本語、Français。切换后页面会重新加载。<br />时区:默认跟随浏览器;用于所有工作区的日期和图表,可以搜索全部时区。 | 账号,其他设备同步 |
+| **外观** | 主题:浅色、深色、跟随系统。也可以在搜索框里输入"主题"切换。 | 当前设备 |
+| **评论与聊天** | **固定底部评论栏**:开启时,阅读很长的时间线也能随时看到评论框。<br />**回复正在运行的智能体时**:默认"插话到当前运行"还是"本轮结束后开始",发送前每条消息仍可单独改,见[给正在运行的智能体插话](/mentioning-agents#给正在运行的智能体插话)。<br />**悬浮聊天窗**:关闭后,页面右下角不再显示聊天按钮。 | 当前设备 |
+| **打开任务** | 点击卡片或行时打开详情页还是悬浮预览。按住 Shift 点击会打开另一种。 | 当前设备 |
+| **创建任务时显示的字段** | 分别为"智能体创建"和"手动创建"选择工具栏上常驻的字段。隐藏的字段仍可从 ⋯ 菜单使用,有值时自动显示。 | 当前设备上的当前工作区 |
+
+## 接下来
+
+- [与智能体对话](/chat) — 悬浮聊天窗、排队消息和引导。
+- [任务](/issues) — 任务的组成、状态和视图。
+- [评论](/comments) — 评论、批注和 @提及。
diff --git a/apps/docs/content/docs/skills.fr.mdx b/apps/docs/content/docs/skills.fr.mdx
index 85cf8588ce..2d75648c84 100644
--- a/apps/docs/content/docs/skills.fr.mdx
+++ b/apps/docs/content/docs/skills.fr.mdx
@@ -4,6 +4,7 @@ description: Regroupez des instructions, des étapes et des supports de référe
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SkillDemo } from "@/components/demos/skill-demo";
Un skill est un ensemble réutilisable de méthodes de travail au sein d'un espace de travail. Son fichier principal est `SKILL.md`, éventuellement accompagné de scripts, de modèles et de supports de référence.
@@ -48,10 +49,10 @@ multica skill refresh <skill-id>
Le skill est retéléchargé depuis sa source et remplacé sur place :
-- **Conservé** : l'identité du skill — rattachements aux agents, étiquettes, créateur et date de création. Les agents conservent le skill sans avoir à le rajouter.
+- **Conservé** : l'identité du skill, c'est-à-dire les rattachements aux agents, les étiquettes, le créateur et la date de création. Les agents conservent le skill sans avoir à le rajouter.
- **Remplacé** : le nom (si la source l'a renommé), la description, `SKILL.md` et tous les fichiers annexes. Les modifications locales du skill sont écrasées.
-Le créateur du skill ainsi que les `owner` et `admin` de l'espace de travail peuvent mettre à jour depuis la source. Les skills créés manuellement, importés depuis un fichier d'archive ou copiés depuis un runtime n'ont pas de source hébergée et ne peuvent pas être mis à jour de cette façon — réimportez-les.
+Le créateur du skill ainsi que les `owner` et `admin` de l'espace de travail peuvent mettre à jour depuis la source. Les skills créés manuellement, importés depuis un fichier d'archive ou copiés depuis un runtime n'ont pas de source hébergée et ne peuvent pas être mis à jour de cette façon : réimportez-les.
Pour mettre à jour plusieurs skills à la fois, sélectionnez-les dans la liste des skills et choisissez **Mettre à jour** dans la barre d'outils de sélection. Chaque skill sélectionné disposant d'une source hébergée est retéléchargé depuis celle-ci ; les autres sont ignorés.
@@ -78,7 +79,9 @@ scripts/check.sh
## Rattacher un skill à un agent
-Après sa création ou son import, un skill doit encore être ajouté à des agents précis. Choisissez les agents depuis la page du skill, ou gérez les rattachements depuis l'onglet **Skills** de l'agent.
+Après sa création ou son import, un skill doit encore être ajouté à des agents précis : choisissez **Ajouter à un agent** sur la page du skill, ou ouvrez l'onglet **Skills** de l'agent et cliquez sur **Ajouter un skill**. L'agent s'appuie sur la description du skill pour décider quand le charger.
+
+<SkillDemo />
- Un agent peut utiliser plusieurs skills ;
- un skill peut servir plusieurs agents ;
diff --git a/apps/docs/content/docs/skills.ja.mdx b/apps/docs/content/docs/skills.ja.mdx
index df198d59a6..4823b28b80 100644
--- a/apps/docs/content/docs/skills.ja.mdx
+++ b/apps/docs/content/docs/skills.ja.mdx
@@ -4,6 +4,7 @@ description: よく使う指示、手順、資料をまとめ、複数のエー
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SkillDemo } from "@/components/demos/skill-demo";
スキルは、ワークスペースで再利用できる仕事の進め方のセットです。`SKILL.md` を主ファイルとし、スクリプト、テンプレート、参考資料を添付できます。
@@ -48,7 +49,7 @@ multica skill refresh <skill-id>
スキルはソースから再ダウンロードされ、その場で置き換えられます:
-- **保持されるもの**:スキルの同一性 —— エージェントへの割り当て、ラベル、作成者、作成日時。エージェントが再追加する必要はありません。
+- **保持されるもの**:スキルの同一性(エージェントへの割り当て、ラベル、作成者、作成日時)。エージェントが再追加する必要はありません。
- **置き換えられるもの**:名前(ソース側で改名された場合はそれに従います)、説明、`SKILL.md`、すべての補助ファイル。スキルへのローカル編集は上書きされます。
ソースから更新できるのは、スキルの作成者とワークスペースの `owner`・`admin` です。手動で作成したスキル、アーカイブファイルからインポートしたスキル、ランタイムからコピーしたスキルにはホストされたソースがないため、この方法では更新できません。再インポートしてください。
@@ -78,7 +79,9 @@ scripts/check.sh
## エージェントへの追加
-スキルを作成またはインポートしたら、さらに具体的なエージェントへ追加する必要があります。スキルのページでエージェントを選ぶことも、エージェントの **スキル** タブから管理することもできます。
+スキルを作成またはインポートしたら、具体的なエージェントに追加します。スキルのページで **エージェントに追加** を選ぶか、エージェントの **スキル** タブで **スキルを追加** をクリックします。エージェントは、いつそのスキルを読み込むかをスキルの説明から判断します。
+
+<SkillDemo />
- 1 つのエージェントは複数のスキルを使えます。
- 同じスキルを複数のエージェントで使えます。
diff --git a/apps/docs/content/docs/skills.ko.mdx b/apps/docs/content/docs/skills.ko.mdx
index b0b9d14aa7..b9f1a405a3 100644
--- a/apps/docs/content/docs/skills.ko.mdx
+++ b/apps/docs/content/docs/skills.ko.mdx
@@ -4,6 +4,7 @@ description: 자주 사용하는 지시문, 단계, 자료를 여러 에이전
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SkillDemo } from "@/components/demos/skill-demo";
스킬은 워크스페이스에서 재사용할 수 있는 작업 방법의 묶음입니다. `SKILL.md`가 기본 파일이며 스크립트, 템플릿, 참고 자료를 함께 넣을 수도 있습니다.
@@ -48,7 +49,7 @@ multica skill refresh <skill-id>
스킬은 소스에서 다시 다운로드되어 그 자리에서 교체됩니다:
-- **유지되는 것**: 스킬의 정체성 — 에이전트 할당, 라벨, 생성자, 생성 시각. 에이전트가 다시 추가할 필요가 없습니다.
+- **유지되는 것**: 에이전트 할당, 라벨, 생성자, 생성 시각 등 스킬의 정체성. 에이전트가 다시 추가할 필요가 없습니다.
- **교체되는 것**: 이름(소스에서 이름이 바뀌면 따라감), 설명, `SKILL.md`, 모든 지원 파일. 스킬에 대한 로컬 편집 내용은 덮어쓰기됩니다.
스킬의 생성자와 워크스페이스 `owner`, `admin`이 소스에서 업데이트할 수 있습니다. 수동으로 만들었거나, 압축 파일에서 가져왔거나, 런타임에서 복사한 스킬은 호스팅된 소스가 없어 이 방법으로 업데이트할 수 없습니다. 다시 가져오세요.
@@ -78,7 +79,9 @@ scripts/check.sh
## 에이전트에 추가
-스킬을 만들거나 가져온 뒤에는 구체적인 에이전트에 추가해야 합니다. 스킬 페이지에서 에이전트를 선택하거나 에이전트의 **스킬** 탭을 열어 관리할 수 있습니다.
+스킬을 만들거나 가져온 뒤에는 구체적인 에이전트에 추가해야 합니다. 스킬 페이지에서 **에이전트에 추가**를 선택하거나, 에이전트의 **스킬** 탭에서 **스킬 추가**를 클릭하세요. 에이전트는 스킬 설명을 보고 언제 그 스킬을 불러올지 판단합니다.
+
+<SkillDemo />
- 한 에이전트가 여러 스킬을 사용할 수 있습니다.
- 하나의 스킬을 여러 에이전트가 사용할 수 있습니다.
diff --git a/apps/docs/content/docs/skills.mdx b/apps/docs/content/docs/skills.mdx
index 4310745257..a27cd92db8 100644
--- a/apps/docs/content/docs/skills.mdx
+++ b/apps/docs/content/docs/skills.mdx
@@ -4,6 +4,7 @@ description: Package recurring instructions, steps, and reference material into
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SkillDemo } from "@/components/demos/skill-demo";
A skill is a reusable set of working methods in a workspace. Its main file is `SKILL.md`, optionally accompanied by scripts, templates, and reference material.
@@ -48,10 +49,10 @@ multica skill refresh <skill-id>
The skill is re-downloaded from its source and replaced in place:
-- **Preserved**: the skill's identity — agent assignments, labels, creator, and creation date. Agents keep the skill without re-adding it.
+- **Preserved**: the skill's identity, including agent assignments, labels, creator, and creation date. Agents keep the skill without re-adding it.
- **Replaced**: name (if the source renamed it), description, `SKILL.md`, and all supporting files. Local edits to the skill are overwritten.
-The skill's creator and workspace `owner`s / `admin`s can update from source. Skills created manually, imported from an archive file, or copied from a runtime have no hosted source and cannot be updated this way — re-import them instead.
+The skill's creator and workspace `owner`s / `admin`s can update from source. Skills created manually, imported from an archive file, or copied from a runtime have no hosted source and can't be updated this way; re-import them instead.
To update several skills at once, select them in the skills list and pick **Update** in the selection toolbar. Every selected skill with a hosted source is re-downloaded from its source; skills without one are skipped.
@@ -78,7 +79,9 @@ scripts/check.sh
## Attaching to an agent
-After creating or importing a skill, it still needs to be added to specific agents. Pick agents on the skill page, or manage bindings from the agent's **Skills** tab.
+After creating or importing a skill, you still need to add it to specific agents: choose **Add to agent** on the skill page, or open the agent's **Skills** tab and click **Add skill**. The agent decides when to load a skill from its description.
+
+<SkillDemo />
- One agent can use multiple skills;
- one skill can serve multiple agents;
diff --git a/apps/docs/content/docs/skills.zh.mdx b/apps/docs/content/docs/skills.zh.mdx
index 1da89766c9..f40491014b 100644
--- a/apps/docs/content/docs/skills.zh.mdx
+++ b/apps/docs/content/docs/skills.zh.mdx
@@ -4,6 +4,7 @@ description: 把常用的指令、步骤和资料整理成可供多个智能体
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SkillDemo } from "@/components/demos/skill-demo";
Skill 是工作区中可以复用的一组工作方法。它以 `SKILL.md` 为主文件,也可以附带脚本、模板和参考资料。
@@ -40,7 +41,7 @@ multica skill import --file ./review-helper.skill
## 更新已导入的 skill
-从 GitHub、ClawHub 或 Skills.sh 导入的 skill 会记住它的来源。要拉取最新版本,在 skill 页面点击**更新**(或在列表行菜单里选「从来源更新」),也可以用 CLI:
+从 GitHub、ClawHub 或 Skills.sh 导入的 skill 会记住它的来源。要拉取最新版本,在 skill 页面点击**更新**(或在列表行菜单里选"从来源更新"),也可以用 CLI:
```bash
multica skill refresh <skill-id>
@@ -48,10 +49,10 @@ multica skill refresh <skill-id>
Skill 会从来源重新下载并就地替换:
-- **保留**:skill 的身份 —— 智能体分配、标签、创建者和创建时间。智能体无需重新添加。
+- **保留**:skill 的身份,包括智能体分配、标签、创建者和创建时间。智能体无需重新添加。
- **替换**:名称(来源改名时跟随)、描述、`SKILL.md` 和全部支持文件。对 skill 的本地修改会被覆盖。
-Skill 的创建者以及工作区 `owner`、`admin` 都可以从来源更新。手动创建、从压缩包导入、或从运行时复制的 skill 没有托管来源,无法这样更新 —— 请重新导入。
+Skill 的创建者以及工作区 `owner`、`admin` 都可以从来源更新。手动创建、从压缩包导入或从运行时复制的 skill 没有托管来源,不能这样更新,只能重新导入。
要一次更新多个 skill,在列表中选中它们,然后在选择工具栏中点击**更新**。所有选中的、有托管来源的 skill 都会从来源重新下载;没有托管来源的会被跳过。
@@ -78,7 +79,9 @@ scripts/check.sh
## 添加到智能体
-创建或导入 skill 后,还需要把它添加到具体的智能体。你可以在 skill 页面选择智能体,也可以打开智能体的 **Skills** 标签页进行管理。
+创建或导入 skill 后,还要把它添加到具体的智能体:在 skill 页面选择 **添加到智能体**,或打开智能体的 **Skills** 标签页点 **添加 skill**。智能体按 skill 的描述判断什么时候加载它。
+
+<SkillDemo />
- 一名智能体可以使用多个 skill;
- 同一个 skill 可以供多名智能体使用;
diff --git a/apps/docs/content/docs/slack-bot-integration.fr.mdx b/apps/docs/content/docs/slack-bot-integration.fr.mdx
index 7818c51003..cfb42e8cf9 100644
--- a/apps/docs/content/docs/slack-bot-integration.fr.mdx
+++ b/apps/docs/content/docs/slack-bot-integration.fr.mdx
@@ -4,6 +4,7 @@ description: Créez un bot Slack pour un agent et utilisez-le dans les messages
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica utilise votre propre application Slack. Une fois la connexion établie, les membres de l'équipe peuvent envoyer des messages directs au bot, le @mentionner dans un canal, utiliser `/issue` pour créer des tâches, `/new` pour démarrer une nouvelle discussion Multica ou `/clear` pour réinitialiser le contexte de l'agent dans la discussion en cours.
@@ -16,7 +17,12 @@ La connexion doit être effectuée par un propriétaire ou un administrateur de
- un Bot User OAuth Token (jeton du bot), commençant par `xoxb-` ;
- un App-level Token (jeton d'application), commençant par `xapp-`.
-## 1. Créer l'application Slack à partir d'un manifeste
+## Connecter le bot
+
+<Steps>
+<Step>
+
+### Créer l'application Slack à partir d'un manifeste [#1-créer-lapplication-slack-à-partir-dun-manifeste]
Ouvrez [Slack API Apps](https://api.slack.com/apps), cliquez sur **Create New App → From a manifest**, choisissez l'espace de travail Slack, puis collez ce qui suit sous **YAML** :
@@ -72,7 +78,7 @@ settings:
Avant de créer l'application, vous pouvez remplacer les deux occurrences de `Multica` par le nom de l'agent. Ne supprimez aucune portée ni aucun événement du manifeste, sinon les messages directs, les mentions dans les canaux, les réponses, `/issue`, `/new` ou `/clear` risquent de ne plus fonctionner.
<Callout type="warning">
-Les noms des commandes slash Slack sont globaux à l'espace de travail. Si une autre application installée utilise déjà `/new` ou `/clear`, Slack rejette la commande en conflit lorsque vous créez ou mettez à jour l'application. Résolvez le conflit, ou envoyez la forme message — `@Multica /new [message]` ou `@Multica /clear [message]` — pour contourner l'interception des commandes slash natives.
+Les noms des commandes slash Slack sont globaux à l'espace de travail. Si une autre application installée utilise déjà `/new` ou `/clear`, Slack rejette la commande en conflit lorsque vous créez ou mettez à jour l'application. Résolvez le conflit, ou envoyez la forme message `@Multica /new [message]` ou `@Multica /clear [message]` pour contourner l'interception des commandes slash natives.
</Callout>
<Callout type="warning">
@@ -81,24 +87,28 @@ Si cette application Slack a été installée avant la prise en charge des pièc
Le bot se connecte à Slack en sortie via Socket Mode : aucune Request URL publique ni OAuth Redirect URL n'est donc nécessaire.
-## 2. Obtenir les deux jetons
+</Step>
+<Step>
+
+### Obtenir les deux jetons [#2-obtenir-les-deux-jetons]
-### Jeton du bot
+#### Jeton du bot
1. Dans l'application Slack, ouvrez **Install App**.
2. Cliquez sur **Install to Workspace** et approuvez les permissions.
-3. Copiez le **Bot User OAuth Token** — il commence par `xoxb-`.
+3. Copiez le **Bot User OAuth Token**, qui commence par `xoxb-`.
-
-### Jeton d'application
+#### Jeton d'application
1. Ouvrez **Basic Information → App-Level Tokens**.
2. Cliquez sur **Generate Token and Scopes**.
3. Ajoutez la portée `connections:write`.
4. Générez et copiez le jeton commençant par `xapp-`.
+</Step>
+<Step>
-## 3. Le connecter à un agent
+### Le connecter à un agent [#3-le-connecter-à-un-agent]
1. Dans Multica, ouvrez **Agents** et sélectionnez l'agent à connecter à Slack.
2. Accédez à **Intégrations** et cliquez sur **Connecter Slack**.
@@ -111,6 +121,9 @@ Multica vérifie que les deux jetons proviennent de la même application. Une fo
Les deux jetons sont stockés chiffrés sur le serveur Multica. Les jetons sont des identifiants : ne les placez pas dans des tâches, des commentaires ou des dépôts de code. Une application déjà connectée à un autre agent ou espace de travail ne peut pas être réutilisée directement ; supprimez d'abord la connexion d'origine.
</Callout>
+</Step>
+</Steps>
+
## Première utilisation
La première fois qu'un membre envoie un message direct au bot ou le @mentionne, il reçoit un lien d'association de compte. Connectez-vous avec le compte Multica de cet espace de travail, puis revenez dans Slack et renvoyez le message.
@@ -133,7 +146,7 @@ Le bot ne répond qu'aux messages de canal qui le @mentionnent explicitement. Lo
### Envoyer des fichiers
-Joignez des fichiers à un message direct, ou à un message de canal qui @mentionne le bot. Ils arrivent en pièces jointes du même travail, si bien que l'agent les lit en même temps que votre demande.
+Joignez des fichiers à un message direct, ou à un message de canal qui @mentionne le bot. Ils sont transmis à l'agent en pièces jointes et traités avec le message.
Cela nécessite la portée `files:read` : si l'application a été installée avant la prise en charge des pièces jointes, consultez la note de l'étape 1. Chaque fichier doit faire 20 Mio au maximum, et un message peut en contenir 10 au plus. Les fichiers plus volumineux, encore en cours d'envoi ou hébergés hors de Slack (un lien Google Drive ou Dropbox, par exemple) sont ignorés ; le texte du message parvient tout de même à l'agent.
@@ -149,7 +162,7 @@ Cette commande ne nécessite aucune @mention. Multica transmet la description à
### Démarrer une nouvelle discussion avec `/new`
-Dans un message direct avec le bot, `/new` crée immédiatement une nouvelle discussion vide et visible. `/new <message>` crée la discussion et utilise le message comme premier tour. Un `/new` seul s'affiche sous le nom **Nouvelle discussion** jusqu'à l'arrivée du premier vrai message de l'utilisateur ; le titre suit ensuite le comportement habituel, fondé sur le premier message.
+Dans un message direct avec le bot, `/new` crée immédiatement une nouvelle discussion vide et visible. `/new <message>` crée la discussion et utilise le message comme premier tour. Une discussion créée par un `/new` seul s'affiche sous le nom **Nouvelle discussion** jusqu'à l'arrivée de son premier vrai message, puis prend un titre tiré de ce message.
La discussion précédente reste disponible dans Multica, et vous pouvez toujours y écrire sur le web, sur ordinateur et sur mobile. Seuls les messages suivants de cette conversation Slack sont acheminés vers la nouvelle discussion.
diff --git a/apps/docs/content/docs/slack-bot-integration.ja.mdx b/apps/docs/content/docs/slack-bot-integration.ja.mdx
index c3ca2e8506..b44910c469 100644
--- a/apps/docs/content/docs/slack-bot-integration.ja.mdx
+++ b/apps/docs/content/docs/slack-bot-integration.ja.mdx
@@ -4,6 +4,7 @@ description: エージェント用の Slack Bot を作成し、DM、チャンネ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica では、自分で作成した Slack app を使います。接続すると、チームメンバーは Bot へ DM を送る、チャンネルで @メンションする、`/issue` でタスクを作成する、`/new` で新しい Multica Chat を開始する、`/clear` で現在の Chat のエージェントコンテキストをリセットするといった操作ができます。
@@ -16,7 +17,12 @@ Multica では、自分で作成した Slack app を使います。接続する
- `xoxb-` で始まる Bot User OAuth Token
- `xapp-` で始まる App-level Token
-## 1. manifest から Slack app を作成する
+## Bot を接続する
+
+<Steps>
+<Step>
+
+### manifest から Slack app を作成する [#1-manifest-から-slack-app-を作成する]
[Slack API Apps](https://api.slack.com/apps) を開き、**Create New App → From a manifest** をクリックして Slack workspace を選びます。次の内容を **YAML** に貼り付けてください。
@@ -81,25 +87,31 @@ Slack の slash command 名は workspace 全体で共有されます。インス
Bot は Socket Mode で Slack へ接続するため、公開 Request URL や OAuth Redirect URL の設定は不要です。
-## 2. 2 つの token を取得する
+</Step>
+<Step>
+
+### 2 つの token を取得する [#2-2-つの-token-を取得する]
-### Bot token
+#### Bot token
1. Slack app で **Install App** を開きます。
2. **Install to Workspace** をクリックし、権限を承認します。
3. `xoxb-` で始まる **Bot User OAuth Token** をコピーします。
-### App-level token
+#### App-level token
1. **Basic Information → App-Level Tokens** を開きます。
2. **Generate Token and Scopes** をクリックします。
3. `connections:write` scope を追加します。
4. token を生成し、`xapp-` で始まる値をコピーします。
-## 3. エージェントへ接続する
+</Step>
+<Step>
+
+### エージェントへ接続する [#3-エージェントへ接続する]
1. Multica で**エージェント**を開き、Slack に接続するエージェントを選びます。
-2. **連携**を開き、**Slack に接続**をクリックします。
+2. **連携**を開き、**Slack を接続**をクリックします。
3. Bot token と App-level token を入力します。
4. **接続**をクリックします。
@@ -109,6 +121,9 @@ Multica は 2 つの token が同じ app のものか確認します。接続に
2 つの token は暗号化して Multica サーバーに保存されます。Token は認証情報です。タスク、コメント、コードリポジトリには書き込まないでください。ほかのエージェントやワークスペースに接続済みの app をそのまま再利用することはできません。先に元の接続を解除してください。
</Callout>
+</Step>
+</Steps>
+
## 初回利用
メンバーが初めて Bot に DM を送るか @メンションすると、アカウント連携用のリンクが届きます。そのワークスペースで使う Multica アカウントにログインしてから、Slack に戻ってもう一度メッセージを送ってください。
@@ -131,7 +146,7 @@ Bot が応答するのは、明示的に @メンションされたチャンネ
### ファイルを送る
-DM、または Bot を @ メンションしたチャンネルのメッセージに、そのままファイルを添付します。ファイルは同じ作業の添付ファイルとして届くので、エージェントは依頼内容と合わせて読み取れます。
+DM、または Bot を @ メンションしたチャンネルのメッセージに、そのままファイルを添付します。ファイルは添付ファイルとしてエージェントに渡され、メッセージと一緒に処理されます。
これには `files:read` scope が必要です。添付ファイル対応より前にインストールした app の場合は、手順 1 の注意書きを参照してください。1 ファイルあたり 20 MiB 以下、1 メッセージにつき最大 10 件です。サイズ超過、アップロード処理中、または Slack 以外(Google Drive や Dropbox のリンクなど)にあるファイルはスキップされますが、メッセージ本文はエージェントに渡ります。
@@ -147,7 +162,7 @@ DM、または Bot を @ メンションしたチャンネルのメッセージ
### `/new` で新しい Chat を開始する
-Bot との DM で `/new` を送ると、空の新しい Chat がすぐに作成され、Multica に表示されます。`/new <メッセージ>` では、そのメッセージが新しい Chat の最初のターンになります。引数なしの `/new` は、最初の有効なユーザーメッセージが届くまで「新しいチャット」と表示され、その後は既存の最初のメッセージに基づくタイトル処理が使われます。
+Bot との DM で `/new` を送ると、空の新しい Chat がすぐに作成され、Multica に表示されます。`/new <メッセージ>` では、そのメッセージが新しい Chat の最初のターンになります。引数なしの `/new` で作成した Chat は、最初の有効なメッセージが届くまで「新しいチャット」と表示され、その後は最初のメッセージからタイトルが付きます。
以前の Chat は Multica の Web、デスクトップ、モバイルに残り、引き続きメッセージを送信できます。新しい Chat に切り替わるのは、この Slack 会話からの後続メッセージだけです。
diff --git a/apps/docs/content/docs/slack-bot-integration.ko.mdx b/apps/docs/content/docs/slack-bot-integration.ko.mdx
index 5f82595dfa..923e774f62 100644
--- a/apps/docs/content/docs/slack-bot-integration.ko.mdx
+++ b/apps/docs/content/docs/slack-bot-integration.ko.mdx
@@ -4,6 +4,7 @@ description: 에이전트용 Slack Bot을 만들어 DM, 채널, /issue, /new 및
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
Multica는 사용자가 직접 만든 Slack app을 사용합니다. 연결하면 팀 멤버가 Bot과 DM을 나누고, 채널에서 @멘션하고, `/issue`로 태스크를 만들고, `/new`으로 새 Multica Chat을 시작하거나 `/clear`로 현재 Chat의 에이전트 컨텍스트를 초기화할 수 있습니다.
@@ -16,7 +17,12 @@ Slack app 하나는 Multica 에이전트 하나에 대응합니다. 여러 에
- `xoxb-`로 시작하는 Bot User OAuth Token
- `xapp-`로 시작하는 App-level Token
-## 1. manifest에서 Slack app 만들기
+## Bot 연결
+
+<Steps>
+<Step>
+
+### manifest에서 Slack app 만들기 [#1-manifest에서-slack-app-만들기]
[Slack API Apps](https://api.slack.com/apps)를 열고 **Create New App → From a manifest**를 클릭한 뒤 Slack workspace를 선택하고 **YAML**에 다음 내용을 붙여 넣습니다.
@@ -81,22 +87,28 @@ Slack slash command 이름은 workspace 전체에서 공유됩니다. 설치된
Bot은 Socket Mode로 Slack에 능동적으로 연결하므로 공개 Request URL이나 OAuth Redirect URL을 설정할 필요가 없습니다.
-## 2. 두 token 받기
+</Step>
+<Step>
+
+### 두 token 받기 [#2-두-token-받기]
-### Bot token
+#### Bot token
1. Slack app에서 **Install App**을 엽니다.
2. **Install to Workspace**를 클릭하고 권한을 승인합니다.
3. `xoxb-`로 시작하는 **Bot User OAuth Token**을 복사합니다.
-### App-level token
+#### App-level token
1. **Basic Information → App-Level Tokens**를 엽니다.
2. **Generate Token and Scopes**를 클릭합니다.
3. `connections:write` scope를 추가합니다.
4. `xapp-`로 시작하는 token을 생성하고 복사합니다.
-## 3. 에이전트에 연결
+</Step>
+<Step>
+
+### 에이전트에 연결 [#3-에이전트에-연결]
1. Multica에서 **에이전트**를 열고 Slack에 연결할 에이전트를 선택합니다.
2. **연동**으로 이동해 **Slack 연결**을 클릭합니다.
@@ -109,6 +121,9 @@ Multica가 두 token이 같은 app에서 발급되었는지 확인합니다. 연
두 token은 Multica 서버에 암호화되어 저장됩니다. Token은 자격 증명이므로 태스크, 댓글, 코드 저장소에 넣지 마세요. 이미 다른 에이전트나 워크스페이스에 연결된 app은 바로 재사용할 수 없으며 기존 연결을 먼저 해제해야 합니다.
</Callout>
+</Step>
+</Steps>
+
## 처음 사용
멤버가 처음으로 Bot과 DM을 나누거나 @멘션하면 계정 연결 링크를 받습니다. 해당 워크스페이스의 Multica 계정으로 로그인한 뒤 Slack으로 돌아가 메시지를 다시 보내세요.
@@ -131,7 +146,7 @@ Bot은 자신을 명시적으로 @멘션한 채널 메시지에만 응답합니
### 파일 보내기
-DM이나 Bot을 @멘션한 채널 메시지에 파일을 그대로 첨부하세요. 파일은 같은 작업의 첨부 파일로 전달되므로 에이전트가 요청 내용과 함께 읽을 수 있습니다.
+DM이나 Bot을 @멘션한 채널 메시지에 파일을 그대로 첨부하세요. 파일은 첨부 파일로 에이전트에 전달되어 메시지와 함께 처리됩니다.
이 기능에는 `files:read` scope가 필요합니다. 첨부 파일 지원 이전에 설치한 app이라면 1단계의 안내를 참고하세요. 파일 하나는 20 MiB 이하여야 하고 메시지 하나에 최대 10개까지 담깁니다. 용량을 초과했거나 아직 업로드 중이거나 Slack 외부에 있는 파일(예: Google Drive, Dropbox 링크)은 건너뛰며, 메시지 본문은 그대로 에이전트에 전달됩니다.
@@ -147,7 +162,7 @@ DM이나 Bot을 @멘션한 채널 메시지에 파일을 그대로 첨부하세
### `/new`으로 새 Chat 시작하기
-Bot과의 DM에서 `/new`을 보내면 비어 있는 새 Chat이 즉시 생성되어 Multica에 표시됩니다. `/new <메시지>`를 보내면 해당 메시지가 새 Chat의 첫 번째 대화가 됩니다. 인자 없는 `/new`은 첫 번째 유효한 사용자 메시지가 도착할 때까지 “새 채팅”으로 표시되고, 이후에는 기존의 첫 메시지 제목 처리 방식을 따릅니다.
+Bot과의 DM에서 `/new`을 보내면 비어 있는 새 Chat이 즉시 생성되어 Multica에 표시됩니다. `/new <메시지>`를 보내면 해당 메시지가 새 Chat의 첫 번째 대화가 됩니다. 인자 없는 `/new`로 만든 Chat은 첫 번째 유효한 메시지가 도착할 때까지 “새 채팅”으로 표시되고, 이후에는 그 메시지를 바탕으로 제목이 붙습니다.
이전 Chat은 Multica의 웹, 데스크톱, 모바일에 남아 있으며 계속 메시지를 보낼 수 있습니다. 이 Slack 대화의 후속 메시지만 새 Chat으로 라우팅됩니다.
diff --git a/apps/docs/content/docs/slack-bot-integration.mdx b/apps/docs/content/docs/slack-bot-integration.mdx
index 48905c74fd..6ffff6ed55 100644
--- a/apps/docs/content/docs/slack-bot-integration.mdx
+++ b/apps/docs/content/docs/slack-bot-integration.mdx
@@ -4,8 +4,9 @@ description: Create a Slack Bot for an agent and use it in DMs, channels, and th
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Multica uses your own Slack app. Once connected, team members can DM the Bot, @-mention it in a channel, use `/issue` to create issues, use `/new` to start a new Multica Chat, or use `/clear` to reset the current Chat's agent context.
+Multica uses your own Slack app. Once connected, team members can DM the Bot or @-mention it in a channel, and use `/issue` to create issues, `/new` to start a new Multica Chat, and `/clear` to reset the current Chat's agent context.
One Slack app maps to one Multica agent. To connect several agents, create a separate app for each.
@@ -16,7 +17,12 @@ The connection must be completed by a workspace owner or admin, and ends with tw
- a Bot User OAuth Token, starting with `xoxb-`;
- an App-level Token, starting with `xapp-`.
-## 1. Create the Slack app from a manifest
+## Connect the Bot
+
+<Steps>
+<Step>
+
+### Create the Slack app from a manifest [#1-create-the-slack-app-from-a-manifest]
Open [Slack API Apps](https://api.slack.com/apps), click **Create New App → From a manifest**, pick the Slack workspace, then paste the following under **YAML**:
@@ -72,7 +78,7 @@ settings:
Before creating, you can replace both occurrences of `Multica` with the agent's name. Do not remove scopes or events from the manifest, or DMs, channel mentions, replies, `/issue`, `/new`, or `/clear` may stop working.
<Callout type="warning">
-Slack slash-command names are workspace-global. If another installed app already owns `/new` or `/clear`, Slack rejects the conflicting command when you create or update the app. Resolve the collision, or send the message form — `@Multica /new [message]` or `@Multica /clear [message]` — to bypass native slash-command interception.
+Slack slash-command names are workspace-global. If another installed app already owns `/new` or `/clear`, Slack rejects the conflicting command when you create or update the app. Resolve the collision, or send the message form `@Multica /new [message]` or `@Multica /clear [message]` to bypass native slash-command interception.
</Callout>
<Callout type="warning">
@@ -81,24 +87,28 @@ If this Slack app was installed before attachment support was available, add the
The Bot connects out to Slack over Socket Mode, so no public Request URL or OAuth Redirect URL is needed.
-## 2. Get the two tokens
+</Step>
+<Step>
+
+### Get the two tokens [#2-get-the-two-tokens]
-### Bot token
+#### Bot token
1. In the Slack app, open **Install App**.
2. Click **Install to Workspace** and approve the permissions.
-3. Copy the **Bot User OAuth Token** — it starts with `xoxb-`.
+3. Copy the **Bot User OAuth Token**, which starts with `xoxb-`.
-
-### App-level token
+#### App-level token
1. Open **Basic Information → App-Level Tokens**.
2. Click **Generate Token and Scopes**.
3. Add the `connections:write` scope.
4. Generate and copy the token starting with `xapp-`.
+</Step>
+<Step>
-## 3. Connect it to an agent
+### Connect it to an agent [#3-connect-it-to-an-agent]
1. In Multica, open **Agents** and select the agent to connect to Slack.
2. Go to **Integrations** and click **Connect Slack**.
@@ -108,9 +118,12 @@ The Bot connects out to Slack over Socket Mode, so no public Request URL or OAut
Multica verifies that the two tokens come from the same app. Once connected, the page shows **Connected to Slack**.
<Callout type="warning">
-Both tokens are stored encrypted on the Multica server. Tokens are credentials — don't put them in issues, comments, or code repositories. An app already connected to another agent or workspace can't be reused directly; disconnect the original connection first.
+Both tokens are stored encrypted on the Multica server. Tokens are credentials: don't put them in issues, comments, or code repositories. An app already connected to another agent or workspace can't be reused directly; disconnect the original connection first.
</Callout>
+</Step>
+</Steps>
+
## First use
The first time a member DMs or @-mentions the Bot, they receive an account binding link. Sign in with the Multica account for that workspace, then return to Slack and send the message again.
@@ -123,7 +136,7 @@ Only members of the current Multica workspace can use the Bot.
### Direct messages
-Open the Bot from **Apps** in the Slack sidebar and message it directly — no @-mention needed.
+Open the Bot from **Apps** in the Slack sidebar and message it directly. No @-mention is needed.
### Channels and group chats
@@ -133,9 +146,9 @@ The Bot only responds to channel messages that explicitly @-mention it. When it
### Send files
-Attach files to a DM, or to a channel message that @-mentions the Bot. They arrive as attachments on the same piece of work, so the agent reads them together with your request.
+Attach files to a DM, or to a channel message that @-mentions the Bot. They reach the agent as attachments and are handled together with the message.
-This needs the `files:read` scope — if the app was installed before attachment support existed, see the note in step 1. Each file must be 20 MiB or smaller, and one message carries at most 10. Files that are larger, still uploading, or hosted outside Slack (a Google Drive or Dropbox link, for example) are skipped; the message text still reaches the agent.
+This needs the `files:read` scope; if the app was installed before attachment support existed, see the note in step 1. Each file must be 20 MiB or smaller, and one message carries at most 10. Files that are larger, still uploading, or hosted outside Slack (a Google Drive or Dropbox link, for example) are skipped; the message text still reaches the agent.
### Create issues with `/issue`
@@ -149,7 +162,7 @@ This command needs no @-mention. Multica hands the description to the agent behi
### Start a new Chat with `/new`
-In a DM with the Bot, `/new` immediately creates a new, visible empty Chat. `/new <message>` creates the Chat and uses the message as its first turn. A bare `/new` displays as **New chat** until the first effective user message arrives; the title then follows the existing first-message title behavior.
+In a DM with the Bot, `/new` immediately creates a new, visible empty Chat. `/new <message>` creates the Chat and uses the message as its first turn. A Chat created by a bare `/new` displays as **New chat** until its first effective message arrives, and is then titled from that message.
The previous Chat remains available and writable in Multica on the web, desktop, and mobile. Only subsequent messages from this Slack conversation are routed to the new Chat.
diff --git a/apps/docs/content/docs/slack-bot-integration.zh.mdx b/apps/docs/content/docs/slack-bot-integration.zh.mdx
index 48b3343e5d..0be0bbb1df 100644
--- a/apps/docs/content/docs/slack-bot-integration.zh.mdx
+++ b/apps/docs/content/docs/slack-bot-integration.zh.mdx
@@ -4,8 +4,9 @@ description: 为智能体创建一个 Slack Bot,在私聊、频道以及 /issu
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
-Multica 使用你自己的 Slack app。连接后,团队成员可以私聊 Bot、在频道里 @ 它、用 `/issue` 创建任务、用 `/new` 新建 Multica Chat,或用 `/clear` 重置当前 Chat 的智能体上下文。
+Multica 使用你自己的 Slack app。连接后,团队成员可以私聊 Bot、在频道里 @ 它,也可以用 `/issue` 创建任务、`/new` 新建 Multica Chat、`/clear` 重置当前 Chat 的智能体上下文。
一个 Slack app 对应一个 Multica 智能体。需要接入多个智能体时,为每个智能体分别创建 app。
@@ -16,57 +17,62 @@ Multica 使用你自己的 Slack app。连接后,团队成员可以私聊 Bot
- Bot User OAuth Token,以 `xoxb-` 开头;
- App-level Token,以 `xapp-` 开头。
-## 1. 从 manifest 创建 Slack app
+## 连接 Bot
+
+<Steps>
+<Step>
+
+### 从 manifest 创建 Slack app [#1-从-manifest-创建-slack-app]
打开 [Slack API Apps](https://api.slack.com/apps),点击 **Create New App → From a manifest**,选择 Slack workspace,然后在 **YAML** 中粘贴以下内容:
```yaml
display_information:
- name: Multica
+ name: Multica
features:
- app_home:
- home_tab_enabled: false
- messages_tab_enabled: true
- messages_tab_read_only_enabled: false
- bot_user:
- display_name: Multica
- always_online: true
- slash_commands:
- - command: /issue
- description: Create a Multica issue
- usage_hint: "[description]"
- - command: /new
- description: Start a new Multica chat
- usage_hint: "[message]"
- - command: /clear
- description: Clear the current Multica chat context
- usage_hint: "[message]"
+ app_home:
+ home_tab_enabled: false
+ messages_tab_enabled: true
+ messages_tab_read_only_enabled: false
+ bot_user:
+ display_name: Multica
+ always_online: true
+ slash_commands:
+ - command: /issue
+ description: Create a Multica issue
+ usage_hint: "[description]"
+ - command: /new
+ description: Start a new Multica chat
+ usage_hint: "[message]"
+ - command: /clear
+ description: Clear the current Multica chat context
+ usage_hint: "[message]"
oauth_config:
- scopes:
- bot:
- - app_mentions:read
- - channels:history
- - files:read
- - groups:history
- - im:history
- - mpim:history
- - chat:write
- - reactions:write
- - users:read
- - commands
+ scopes:
+ bot:
+ - app_mentions:read
+ - channels:history
+ - files:read
+ - groups:history
+ - im:history
+ - mpim:history
+ - chat:write
+ - reactions:write
+ - users:read
+ - commands
settings:
- event_subscriptions:
- bot_events:
- - app_mention
- - message.im
- - message.channels
- - message.groups
- - message.mpim
- interactivity:
- is_enabled: false
- org_deploy_enabled: false
- socket_mode_enabled: true
- token_rotation_enabled: false
+ event_subscriptions:
+ bot_events:
+ - app_mention
+ - message.im
+ - message.channels
+ - message.groups
+ - message.mpim
+ interactivity:
+ is_enabled: false
+ org_deploy_enabled: false
+ socket_mode_enabled: true
+ token_rotation_enabled: false
```
创建前可以把两个 `Multica` 改成智能体的名字。不要删除 manifest 中的权限或事件,否则私聊、频道提及、回复、`/issue`、`/new` 或 `/clear` 可能无法工作。
@@ -81,24 +87,28 @@ Slack slash command 名称在整个 workspace 中共享。如果其他已安装
Bot 使用 Socket Mode 主动连接 Slack,不需要配置公网 Request URL 或 OAuth Redirect URL。
-## 2. 获取两个 token
+</Step>
+<Step>
+
+### 获取两个 token [#2-获取两个-token]
-### Bot token
+#### Bot token
1. 在 Slack app 中打开 **Install App**。
2. 点击 **Install to Workspace** 并批准权限。
3. 复制 **Bot User OAuth Token**,它以 `xoxb-` 开头。
-
-### App-level token
+#### App-level token
1. 打开 **Basic Information → App-Level Tokens**。
2. 点击 **Generate Token and Scopes**。
3. 添加 `connections:write` scope。
4. 生成并复制以 `xapp-` 开头的 token。
+</Step>
+<Step>
-## 3. 连接到智能体
+### 连接到智能体 [#3-连接到智能体]
1. 在 Multica 中打开 **智能体**,选择要接入 Slack 的智能体。
2. 进入 **集成**,点击 **连接 Slack**。
@@ -111,6 +121,9 @@ Multica 会验证两个 token 是否来自同一个 app。连接成功后,页
两个 token 会加密保存在 Multica 服务器上。Token 即凭据,不要写进任务、评论或代码仓库。已连接到其他智能体或工作区的 app 不能直接重复使用,需先断开原连接。
</Callout>
+</Step>
+</Steps>
+
## 第一次使用
成员第一次私聊或 @ Bot 时,会收到一个账号绑定链接。用该工作区的 Multica 账号登录后,再回到 Slack 发送消息。
@@ -133,9 +146,9 @@ Bot 只会响应明确 @ 它的频道消息。执行时,它会在权限允许
### 发送文件
-在私聊里,或者在 @ 提及 Bot 的频道消息里直接带上文件。文件会作为附件进入同一项工作,智能体可以结合文件和你的诉求一起处理。
+在私聊里,或者在 @ 提及 Bot 的频道消息里直接带上文件。文件会作为附件交给智能体,和消息一起处理。
-这需要 `files:read` 权限 —— 如果这个应用是在附件支持之前安装的,参考第 1 步的提示。单个文件不超过 20 MiB,一条消息最多带 10 个。超出大小、仍在上传,或者存放在 Slack 之外(比如 Google Drive、Dropbox 链接)的文件会被跳过,消息文本仍然会交给智能体。
+这需要 `files:read` 权限;应用如果是在附件支持之前安装的,见第 1 步的提示。单个文件不超过 20 MiB,一条消息最多带 10 个。超出大小、仍在上传,或者存放在 Slack 之外(比如 Google Drive、Dropbox 链接)的文件会被跳过,消息文本仍然会交给智能体。
### 用 `/issue` 创建任务
@@ -149,9 +162,9 @@ Bot 只会响应明确 @ 它的频道消息。执行时,它会在权限允许
### 用 `/new` 新建 Chat
-在与 Bot 的私聊中,发送 `/new` 会立即创建一个空的、可见的新 Chat;发送 `/new <消息>` 会把消息作为新 Chat 的第一轮。裸 `/new` 在第一条有效用户消息到来前显示为“新对话”,之后沿用现有的首条消息标题逻辑。
+在与 Bot 的私聊中,发送 `/new` 会立即创建一个空的、可见的新 Chat;发送 `/new <消息>` 会把消息作为新 Chat 的第一轮。裸 `/new` 创建的 Chat 在收到第一条有效消息前显示为"新对话",之后按首条消息生成标题。
-旧 Chat 仍保留在 Multica 中,并可继续从 Web、桌面端或移动端发送消息;只有 Slack 这条外部会话的后续消息会切换到新 Chat。
+旧 Chat 仍保留在 Multica 中,可以继续从 Web、桌面端或移动端发消息;切换到新 Chat 的只有 Slack 这条外部会话的后续消息。
在频道或 thread 中,Slack 原生 slash command 的 payload 不包含目标 thread。请在目标 thread 里发送 `@Multica /new [消息]`。
diff --git a/apps/docs/content/docs/squads.fr.mdx b/apps/docs/content/docs/squads.fr.mdx
index 0297e0fb53..18822b99c2 100644
--- a/apps/docs/content/docs/squads.fr.mdx
+++ b/apps/docs/content/docs/squads.fr.mdx
@@ -4,10 +4,11 @@ description: Un chef coordonne plusieurs agents ou membres et confie le travail
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SquadDemo } from "@/components/demos/squad-demo";
Un squad se compose d'un agent chef et d'un nombre quelconque de membres. Assigner une tâche à un squad ne lance pas tous les agents à la fois. Multica réveille d'abord le chef ; celui-ci lit le contexte et décide qui se charge de l'étape suivante.
-Les squads répondent à la question de savoir à qui revient le travail. Ils ne fusionnent pas plusieurs agents en un nouvel agent et n'augmentent pas automatiquement le parallélisme.
+Un squad décide seulement à qui revient le travail. Il ne fusionne pas plusieurs agents en un nouvel agent et n'augmente pas automatiquement le parallélisme.
## Quand utiliser un squad
@@ -32,12 +33,16 @@ Lorsqu'une tâche qui n'est pas dans À planifier est assignée à un squad, Mul
1. **Le chef récupère l'exécution.** Le runtime de l'agent prend en charge l'exécution lors de sa prochaine interrogation, comme pour toute autre assignation d'agent.
2. **Le chef reçoit ses consignes.** Au moment de la récupération, Multica ajoute trois sections au prompt système du chef — voir [Ce que le chef voit à chaque tour](#ce-que-le-chef-voit-à-chaque-tour) ci-dessous.
-3. **Le chef publie un commentaire de délégation.** Le commentaire mentionne avec `@` le ou les membres choisis, en reprenant exactement le markdown de mention fourni par le roster — cette mention déclenche une nouvelle exécution pour chaque agent mentionné.
+3. **Le chef publie un commentaire de délégation.** Le commentaire mentionne avec `@` le ou les membres choisis, en reprenant exactement le markdown de mention fourni par le roster. Chaque agent mentionné reçoit une nouvelle exécution, et chaque membre humain mentionné reçoit une notification.
4. **Le chef consigne son évaluation** via `multica squad activity <issue-id> action --reason "..."`. Cela ajoute une entrée dans la chronologie d'activité de la tâche, afin que les humains voient que le chef a bien évalué le déclencheur.
5. **Le tour de répartition laisse la tâche parente en `in_progress`.** Même contrat de statut géré par l'agent que pour une assignation directe à un agent — coordonner le squad revient à traiter la demande de la tâche parente, qui passe donc de `todo` à `in_progress` ; répartir le travail entre les membres n'est pas une livraison, donc elle y reste pendant que le squad travaille.
6. **Le chef s'arrête.** Le chef ne réalise pas lui-même l'implémentation. Lorsque le membre délégué publie un retour — ou lorsqu'une sous-tâche ou une barrière d'étape se ferme — le chef est redéclenché pour lire la mise à jour et, au choix, déléguer l'étape suivante, escalader, passer la tâche parente en `in_review` une fois l'objectif global atteint, ou rester silencieux. `done` est laissé à un relecteur humain ou aux intégrations existantes (par exemple une PR avec intention de fermeture qui est fusionnée).
-Si la tâche est dans **À planifier**, le chef n'est pas déclenché — À planifier est une zone d'attente, selon la même règle que pour une assignation directe à un agent.
+Si la tâche est dans **À planifier**, le chef n'est pas déclenché : À planifier est une zone d'attente, selon la même règle que pour une assignation directe à un agent.
+
+La démo ci-dessous confie une tâche de préparation d'événement au Squad événements. Son chef est Assistant ops ; les membres sont Assistant rédaction et vous.
+
+<SquadDemo />
### Ce que le chef voit à chaque tour
@@ -53,13 +58,13 @@ Si la tâche est dans **À planifier**, le chef n'est pas déclenché — À pla
Après la première répartition, le chef est automatiquement réveillé par **la plupart des commentaires suivants** sur la tâche. Les règles exactes :
-| Événement | Chef déclenché ? |
-|---|---|
-| Un non-membre (rapporteur humain, agent externe) publie un commentaire | **Oui** |
-| Un membre du squad publie un point d'avancement sans `@mention` | **Oui** — le chef réévalue si l'étape suivante est nécessaire |
-| Quelqu'un publie un commentaire qui mentionne explicitement avec `@` un autre agent / membre / squad / `@all` | **Non** — le `@` explicite est le signal de routage ; le chef s'efface |
-| Le propre commentaire du chef (auto-déclenchement) | **Non** — bloqué pour éviter une boucle |
-| Un commentaire ne contenant qu'une référence croisée à une tâche (`[MUL-123](mention://issue/...)`) | **Oui** — les références à des tâches ne constituent pas un routage |
+| Événement | Déclenche le chef | Remarque |
+|---|---|---|
+| Un non-membre (rapporteur humain, agent externe) publie un commentaire | Oui | |
+| Un membre du squad publie un point d'avancement sans `@mention` | Oui | Le chef réévalue si une étape suivante est nécessaire |
+| Quelqu'un publie un commentaire qui mentionne explicitement avec `@` un autre agent / membre / squad / `@all` | Non | Le `@` explicite est le signal de routage ; le chef s'efface |
+| Le propre commentaire du chef | Non | Bloqué pour que le chef ne se déclenche pas lui-même |
+| Un commentaire ne contenant qu'une référence croisée à une tâche (`[MUL-123](mention://issue/...)`) | Oui | Les références à des tâches ne constituent pas un routage |
La déduplication s'ajoute à ces règles : si le chef a déjà une exécution `queued` ou `dispatched` sur cette tâche, un nouveau déclencheur ne met pas de doublon en file.
@@ -74,7 +79,7 @@ La déduplication s'ajoute à ces règles : si le chef a déjà une exécution `
| **Assigner une tâche à un squad** | Oui | Le squad devient l'assigné et le chef est déclenché. |
| **@mentionner un squad dans un commentaire** | Non | Le chef traite uniquement ce commentaire ; l'assigné actuel reste inchangé. |
-@mentionner directement un membre précis lui confie le travail. Multica déduplique également les déclenchements répétés et empêche les commentaires du chef de le redéclencher lui-même, ce qui évite les boucles d'exécution.
+@mentionner directement un membre précis lui confie le travail.
## Squads et Accès
diff --git a/apps/docs/content/docs/squads.ja.mdx b/apps/docs/content/docs/squads.ja.mdx
index b0ff3431bc..6b47b874bd 100644
--- a/apps/docs/content/docs/squads.ja.mdx
+++ b/apps/docs/content/docs/squads.ja.mdx
@@ -4,10 +4,11 @@ description: 1 体のリーダーが複数のエージェントやメンバー
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SquadDemo } from "@/components/demos/squad-demo";
スクワッドは、1 体のリーダーエージェントと複数のメンバーで構成されます。タスクをスクワッドに割り当てても、すべてのエージェントが一斉に動くわけではありません。Multica はまずリーダーを起こし、リーダーがコンテキストを読んで、次のステップを誰に任せるかを決めます。
-スクワッドが解決するのは「仕事を誰に渡すか」という問題です。複数のエージェントを 1 つの新しいエージェントに統合することも、同時実行数を自動的に増やすこともありません。
+スクワッドが決めるのは、仕事を誰に渡すかだけです。複数のエージェントを 1 つの新しいエージェントに統合することも、同時実行数を自動的に増やすこともありません。
## 適した場面
@@ -28,15 +29,47 @@ import { Callout } from "fumadocs-ui/components/callout";
## 割り当て後の実行フロー
-1. タスクが `backlog` 以外のステータスでスクワッドに割り当てられると、Multica はリーダーのために作業を作成します。
-2. リーダーは、タスクのコンテキスト、スクワッドの指示、そしてメンバーのロールとスキルを含む名簿を見ます。
-3. リーダーがコメントで適切なメンバーを @メンションします。エージェントへの @メンションは新しい実行をトリガーし、人間のメンバーへの @メンションはその人に通知を送ります。
-4. メンバーの進捗と結果は元のタスクに書き戻され、リーダーは後続の情報に応じて再び調整できます。
+`backlog` 以外のステータスのタスクをスクワッドに割り当てると、Multica はすぐに**リーダーエージェント**の実行を 1 つキューに入れます(メンバー全員の分ではありません)。
+
+1. **リーダーのランタイムが実行を取得します。** 通常のエージェントへの割り当てと同じ流れです。
+2. **リーダーがブリーフィングを受け取ります。** 実行が取得されると、Multica はリーダーの指示の後ろに 3 つのブロックを追加します。内容は下の[リーダーが毎回受け取る内容](#リーダーが毎回受け取る内容)を参照してください。
+3. **リーダーが割り振りのコメントを投稿します。** 名簿に載っているメンション用の markdown をそのまま使って、選んだメンバーを `@` メンションします。メンションされたエージェントには新しい実行がキューに入り、メンションされた人間のメンバーには通知が届きます。
+4. **リーダーが評価を記録します**:`multica squad activity <issue-id> <outcome> --reason "..."`。この記録はタスクのアクティビティに残るので、リーダーが毎回どう判断したかを人間が後から確認できます。
+5. **割り振りのターンで親タスクは `in_progress` になります。** エージェントに直接割り当てたときと同じステータスの扱いです。スクワッドの調整は親タスクそのものを進める作業なので、親タスクは `todo` から `in_progress` に移ります。割り振りは納品ではないため、スクワッドが作業している間はそのままです。
+6. **リーダーは止まります。** 割り振ったあと、リーダーは自分で実装しません。割り振られたメンバーが返信すると、リーダーが自動的に起こされて次の手を決めます。さらに割り振る、人間にエスカレーションする、全体の目標が達成されたら親タスクを `in_review` に進める、あるいは何もしない、のいずれかです。`done` は人間の確認か既存の連携(たとえば close intent 付きの PR のマージ)に任されます。適したメンバーがいない場合、リーダーは自分で引き受けず、足りない点をタスクのコメントに書き残します。
タスクがまだ `backlog` にある間は、割り当てだけではリーダーはトリガーされません。`backlog` を出た時点で実行が始まります。
+下のデモでは、イベント準備のタスクを「イベントスクワッド」に任せます。リーダーは運用アシスタント、メンバーはライティングアシスタントとあなたです。
+
+<SquadDemo />
+
+### リーダーが毎回受け取る内容
+
+リーダーがトリガーされるたびに、次の 3 つのブロックが指示に追加されます。
+
+- **Squad Operating Protocol(スクワッドの運用プロトコル)**:システムに組み込まれたルール一式です。タスクを読む → `@` で割り振る → 簡潔に書く(タスクの内容を繰り返さない。割り振られたメンバーは自分で読めます)→ 毎回評価を記録する → 割り振ったら止まる(割り振りのターンは親タスクが `in_progress` の状態で終わる)→ 全体の目標を達成してから `in_review` に進める。この部分はシステムが管理していて、編集できません。
+
+ ステータスに関するルールは、このスクワッドに実際に割り当てられたタスクにだけ適用されます。他人のタスクで `@スクワッド` されて起こされたリーダーも同じ名簿と割り振りルールを受け取りますが、そのタスクのステータスは変えないよう明示的に指示されます。ステータスはそのタスク自身の担当者のものだからです。
+- **Squad Roster(スクワッドの名簿)**:リーダー自身の行と、アーカイブされていない各メンバーの行です。各行にはそのまま貼り付けられるメンション用の markdown(`[@Name](mention://agent/<uuid>)`)が付いています。プレーンテキストの `@name` では誰もトリガーされません。
+- **Squad Instructions(スクワッドの指示)**:このスクワッド用に書いたカスタムの内容です。ルーティングのルール(「データベース関連は Alice、フロントエンドは Bob」)、エスカレーションの方針、タスク自体には書かれていない背景などを置きます。
+
+## リーダーが再びトリガーされるタイミング
+
+最初の割り振りのあとは、ほとんどの後続コメントでリーダーが自動的に起こされます。
+
+| イベント | リーダーをトリガー | 説明 |
+|---|---|---|
+| スクワッド外の人(人間、外部のエージェント)がコメントする | する | |
+| スクワッドのメンバーが `@` なしで進捗を投稿する | する | リーダーが次の手を評価し直す |
+| コメントでエージェント、メンバー、スクワッド、`@all` のいずれかを明示的に `@` する | しない | 明示的な `@` がルーティングの合図なので、リーダーは手を出さない |
+| リーダー自身のコメント | しない | 自分で自分をトリガーしないようにするため |
+| コメントにタスクへの相互リンクしかない | する | タスクの参照はルーティングとはみなさない |
+
+これらのルールに加えて重複排除があります。このタスクでリーダーの実行がすでにキュー待ちか取得済みなら、新しいトリガーで重複してキューに入ることはありません。
+
<Callout type="info">
-リーダーの職責は調整であり、実装を自分で仕上げることではありません。振り分けを終えると今回の実行を停止し、メンバーが進捗を更新してから改めて判断します。適切なメンバーがいない場合、リーダーは自分で引き受けず、タスクにギャップを書き残します。
+メンバーが `@` 付きでコメントしてもリーダーが起こされないのは、直接の `@` がすでに明確な引き継ぎだからです。そこでリーダーを起こしても、空回りのターンが 1 回増えるだけです。例外として、エージェントが結果を投稿するときに別のエージェントを `@` した場合は、スレッド全体を調整できるようリーダーも起こされます。
</Callout>
## スクワッドへの割り当てと @メンション
@@ -46,7 +79,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| **タスクをスクワッドに割り当てる** | はい | スクワッドが担当者になり、リーダーがトリガーされます。 |
| **コメントでスクワッドを @メンションする** | いいえ | リーダーがそのコメントだけを処理し、元の担当者は変わりません。 |
-特定のメンバーを直接 @メンションすると、仕事はそのメンバーに渡ります。Multica は重複したトリガーをまとめ、リーダーのコメントがリーダー自身を再びトリガーすることも防いで、実行ループを回避します。
+特定のメンバーを直接 @メンションすると、仕事はそのメンバーに渡ります。
## スクワッドと Access
diff --git a/apps/docs/content/docs/squads.ko.mdx b/apps/docs/content/docs/squads.ko.mdx
index 9f2e476f13..eed0e2688f 100644
--- a/apps/docs/content/docs/squads.ko.mdx
+++ b/apps/docs/content/docs/squads.ko.mdx
@@ -4,10 +4,11 @@ description: 리더 한 명이 여러 에이전트 또는 멤버를 조율해
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SquadDemo } from "@/components/demos/squad-demo";
스쿼드는 리더 에이전트 한 명과 여러 멤버로 구성됩니다. 태스크를 스쿼드에 할당해도 모든 에이전트가 동시에 실행되지는 않습니다. Multica가 먼저 리더를 깨우고, 리더가 컨텍스트를 읽은 뒤 다음 작업을 누구에게 맡길지 결정합니다.
-스쿼드는 작업을 누구에게 맡길지 해결합니다. 여러 에이전트를 하나의 새 에이전트로 합치거나 동시 실행 수를 자동으로 늘리지는 않습니다.
+스쿼드가 정하는 것은 작업을 누구에게 맡길지뿐입니다. 여러 에이전트를 하나의 새 에이전트로 합치거나 동시 실행 수를 자동으로 늘리지는 않습니다.
## 적합한 사용 사례
@@ -28,15 +29,47 @@ import { Callout } from "fumadocs-ui/components/callout";
## 할당 후 실행 과정
-1. 태스크가 `backlog`가 아닌 상태에서 스쿼드에 할당되면 Multica가 리더의 실행을 만듭니다.
-2. 리더는 태스크 컨텍스트, 스쿼드 지시문, 멤버의 역할과 스킬이 포함된 명단을 확인합니다.
-3. 리더가 댓글에서 적합한 멤버를 @멘션합니다. 에이전트를 @멘션하면 새 실행이 트리거되고 사람 멤버를 @멘션하면 알림이 전달됩니다.
-4. 멤버의 진행 상황과 결과는 원래 태스크에 계속 기록되며 리더는 이후 정보를 기준으로 다시 조율할 수 있습니다.
+`backlog`가 아닌 상태의 태스크를 스쿼드에 할당하면 Multica는 곧바로 **리더 에이전트**의 실행 하나를 큐에 넣습니다(멤버마다 하나씩 넣지 않습니다).
+
+1. **리더의 런타임이 실행을 가져갑니다.** 일반 에이전트에 할당할 때와 같은 흐름입니다.
+2. **리더가 브리핑을 받습니다.** 실행을 가져가는 순간 Multica가 리더의 지침 뒤에 세 블록을 덧붙입니다. 아래 [리더가 매번 받는 내용](#리더가-매번-받는-내용)을 참고하세요.
+3. **리더가 작업 배정 댓글을 남깁니다.** 명단에 있는 멘션 markdown을 그대로 써서 고른 멤버를 `@`멘션합니다. 멘션된 에이전트에는 새 실행이 큐에 들어가고, 멘션된 사람 멤버는 알림을 받습니다.
+4. **리더가 평가를 기록합니다**: `multica squad activity <issue-id> <outcome> --reason "..."`. 이 기록은 태스크의 활동 타임라인에 남아, 리더가 매번 어떻게 판단했는지 사람이 나중에 확인할 수 있습니다.
+5. **배정 턴에서 상위 태스크는 `in_progress`가 됩니다.** 에이전트에 직접 할당할 때와 같은 상태 규칙입니다. 스쿼드를 조율하는 일이 곧 상위 태스크를 진행하는 일이므로 상위 태스크는 `todo`에서 `in_progress`로 바뀝니다. 배정은 납품이 아니므로 스쿼드가 일하는 동안에는 그대로 유지됩니다.
+6. **리더는 멈춥니다.** 배정한 뒤 리더는 직접 구현하지 않습니다. 배정받은 멤버가 답하면 리더가 자동으로 깨어나 다음 단계를 정합니다. 더 배정하거나, 사람에게 올리거나, 전체 목표를 달성했으면 상위 태스크를 `in_review`로 옮기거나, 아무것도 하지 않습니다. `done`은 사람의 확인이나 기존 연동(예: close intent가 있는 PR 머지)에 맡깁니다. 적합한 멤버가 없으면 리더는 직접 맡지 않고, 부족한 점을 태스크 댓글로 남깁니다.
태스크가 여전히 `backlog`이면 할당만으로 리더가 트리거되지 않습니다. `backlog`에서 벗어난 뒤에 실행이 시작됩니다.
+아래 데모는 행사 준비 태스크를 "행사 스쿼드"에 맡깁니다. 리더는 운영 도우미이고, 멤버는 글쓰기 도우미와 나입니다.
+
+<SquadDemo />
+
+### 리더가 매번 받는 내용
+
+리더가 트리거될 때마다 지침에 세 블록이 덧붙습니다.
+
+- **Squad Operating Protocol(스쿼드 운영 규칙)**: 시스템에 고정된 규칙 모음입니다. 태스크 읽기 → `@`로 배정 → 간결하게 쓰기(태스크 내용을 되풀이하지 않습니다. 배정받은 멤버가 직접 읽을 수 있습니다) → 매번 평가 기록 → 배정 후 멈추기(배정 턴은 상위 태스크가 `in_progress`인 상태로 끝납니다) → 전체 목표를 달성한 뒤에만 `in_review`로 옮기기. 이 부분은 시스템이 관리하며 수정할 수 없습니다.
+
+ 상태에 관한 규칙은 이 스쿼드에 실제로 할당된 태스크에만 적용됩니다. 다른 사람의 태스크에서 `@스쿼드`로 깨어난 리더도 같은 명단과 배정 규칙을 받지만, 그 태스크의 상태는 바꾸지 말라는 지시를 명시적으로 받습니다. 상태는 그 태스크의 담당자 몫입니다.
+- **Squad Roster(스쿼드 명단)**: 리더 자신의 행과, 보관되지 않은 멤버마다 한 행씩입니다. 각 행에는 그대로 붙여 넣을 수 있는 멘션 markdown(`[@Name](mention://agent/<uuid>)`)이 들어 있습니다. 일반 텍스트 `@name`으로는 아무도 트리거되지 않습니다.
+- **Squad Instructions(스쿼드 지시문)**: 이 스쿼드를 위해 직접 쓴 내용입니다. 라우팅 규칙("데이터베이스 관련은 Alice, 프런트엔드는 Bob"), 에스컬레이션 방침, 태스크에는 없는 배경 등을 넣습니다.
+
+## 리더가 다시 트리거되는 경우
+
+첫 배정 이후에는 대부분의 후속 댓글이 리더를 자동으로 깨웁니다.
+
+| 이벤트 | 리더 트리거 | 설명 |
+|---|---|---|
+| 스쿼드 멤버가 아닌 쪽(사람, 외부 에이전트)이 댓글을 남김 | 예 | |
+| 스쿼드 멤버가 `@` 없이 진행 상황을 올림 | 예 | 리더가 다음 단계를 다시 평가 |
+| 댓글에서 에이전트, 멤버, 스쿼드, `@all` 중 하나를 명시적으로 `@`함 | 아니요 | 명시적인 `@`가 라우팅 신호이므로 리더는 물러남 |
+| 리더 자신의 댓글 | 아니요 | 자기 자신을 트리거하지 않도록 막음 |
+| 댓글에 태스크 상호 링크만 있음 | 예 | 태스크 참조는 라우팅으로 보지 않음 |
+
+이 규칙에 더해 중복 제거도 적용됩니다. 이 태스크에서 리더의 실행이 이미 대기 중이거나 가져간 상태라면, 새 트리거가 같은 실행을 또 큐에 넣지 않습니다.
+
<Callout type="info">
-리더의 역할은 직접 구현하는 것이 아니라 조율하는 것입니다. 작업을 배분한 뒤 이번 실행을 끝내고 멤버가 진행 상황을 업데이트하면 다시 판단합니다. 적합한 멤버가 없다면 리더는 태스크에 부족한 점을 설명하며 직접 맡지 않습니다.
+멤버가 `@`를 넣어 댓글을 남겨도 리더가 깨어나지 않는 이유는, 직접 `@`한 것 자체가 이미 명확한 인계이기 때문입니다. 이때 리더를 깨우면 헛도는 턴만 하나 늘어납니다. 예외로, 에이전트가 결과를 올리면서 다른 에이전트를 `@`하면 스레드 전체를 조율할 수 있도록 리더도 깨어납니다.
</Callout>
## 스쿼드 할당과 @스쿼드
@@ -46,7 +79,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| **태스크를 스쿼드에 할당** | 예 | 스쿼드가 담당자가 되고 리더를 트리거합니다. |
| **댓글에서 스쿼드 @멘션** | 아니요 | 리더가 이 댓글만 처리하며 기존 담당자는 바뀌지 않습니다. |
-특정 멤버를 직접 @멘션하면 해당 멤버에게 작업이 전달됩니다. Multica는 중복 트리거를 합치고 리더의 댓글이 리더 자신을 다시 트리거하지 않게 막아 실행 루프를 방지합니다.
+특정 멤버를 직접 @멘션하면 해당 멤버에게 작업이 전달됩니다.
## 스쿼드와 Access
diff --git a/apps/docs/content/docs/squads.mdx b/apps/docs/content/docs/squads.mdx
index 1660ff9d95..cc0fdd59f7 100644
--- a/apps/docs/content/docs/squads.mdx
+++ b/apps/docs/content/docs/squads.mdx
@@ -4,10 +4,11 @@ description: A leader coordinates multiple agents or members and hands work to t
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SquadDemo } from "@/components/demos/squad-demo";
A squad consists of one leader agent and any number of members. Assigning an issue to a squad does not run every agent at once. Multica wakes the leader first; it reads the context and decides who takes the next step.
-Squads solve the question of who the work goes to. They don't merge multiple agents into a new agent, and they don't automatically raise concurrency.
+A squad only decides who the work goes to. It doesn't merge multiple agents into a new agent, and it doesn't automatically raise concurrency.
## When to use a squad
@@ -32,12 +33,16 @@ When a non-Backlog issue is assigned to a squad, Multica immediately enqueues a
1. **Leader claims the run.** The agent runtime picks up the run on its next poll, same as any other agent assignment.
2. **Leader is briefed.** On claim, Multica appends three sections to the leader's system prompt — see [What the leader sees on every turn](#what-the-leader-sees-on-every-turn) below.
-3. **Leader posts one delegation comment.** The comment `@`-mentions the chosen member(s) using the exact mention markdown from the roster — that mention triggers a new run for each mentioned agent.
+3. **Leader posts one delegation comment.** The comment `@`-mentions the chosen member(s) using the exact mention markdown from the roster. Each mentioned agent gets a new run, and each mentioned human member gets a notification.
4. **Leader records its evaluation** via `multica squad activity <issue-id> action --reason "..."`. This writes an entry to the issue's activity timeline so humans can see the leader actually evaluated the trigger.
5. **The dispatch turn leaves the parent `in_progress`.** Same agent-managed status contract as a direct agent assignment — coordinating the squad is working the parent's ask, so the parent moves from `todo` to `in_progress`, and dispatching members is not delivery, so it stays there while the squad works.
6. **Leader stops.** The leader does not do the implementation itself. When the delegated member posts back — or when a sub-issue / stage barrier closes — the leader is re-triggered to read the update and either delegate the next step, escalate, move the parent to `in_review` once the overall goal is met, or stay silent. `done` is left to a human reviewer or existing integrations (for example a PR with close intent that merges).
-If the issue is in **Backlog**, the leader is not triggered — Backlog is a parking lot, same rule as for direct agent assignment.
+If the issue is in **Backlog**, the leader is not triggered: Backlog is a parking lot, same rule as for direct agent assignment.
+
+The demo below hands an event-prep issue to the Events squad. Ops helper is the leader; the members are Writing helper and you.
+
+<SquadDemo />
### What the leader sees on every turn
@@ -53,13 +58,13 @@ On each squad-leader run, three blocks are appended to the leader's instructions
After the first dispatch, the leader is woken up automatically by **most subsequent comments** on the issue. The exact rules:
-| Event | Leader triggered? |
-|---|---|
-| A non-member (human reporter, external agent) posts a comment | **Yes** |
-| A squad member posts a progress update with no `@mention` | **Yes** — the leader re-evaluates whether the next step is needed |
-| Anyone posts a comment that explicitly `@`-mentions another agent / member / squad / `@all` | **No** — the explicit `@` is the routing signal; the leader gets out of the way |
-| The leader's own comment (self-trigger) | **No** — guarded to prevent a loop |
-| A comment containing only an issue cross-reference (`[MUL-123](mention://issue/...)`) | **Yes** — issue references aren't routing |
+| Event | Triggers the leader | Notes |
+|---|---|---|
+| A non-member (human reporter, external agent) posts a comment | Yes | |
+| A squad member posts a progress update with no `@mention` | Yes | The leader re-evaluates whether a next step is needed |
+| Anyone posts a comment that explicitly `@`-mentions another agent / member / squad / `@all` | No | The explicit `@` is the routing signal, so the leader stays out of the way |
+| The leader's own comment | No | Guarded so the leader can't trigger itself |
+| A comment containing only an issue cross-reference (`[MUL-123](mention://issue/...)`) | Yes | Issue references aren't routing |
Dedup applies on top of these rules: if the leader already has a `queued` or `dispatched` run on this issue, a new trigger won't enqueue a duplicate.
@@ -74,7 +79,7 @@ Dedup applies on top of these rules: if the leader already has a `queued` or `di
| **Assign an issue to a squad** | Yes | The squad becomes the assignee and the leader is triggered. |
| **@-mention a squad in a comment** | No | The leader handles that comment only; the current assignee is unchanged. |
-@-mentioning a specific member directly hands the work to that member. Multica also dedupes repeated triggers and prevents the leader's comments from re-triggering itself, avoiding execution loops.
+@-mentioning a specific member directly hands the work to that member.
## Squads and Access
diff --git a/apps/docs/content/docs/squads.zh.mdx b/apps/docs/content/docs/squads.zh.mdx
index c73b431ee8..77332a931a 100644
--- a/apps/docs/content/docs/squads.zh.mdx
+++ b/apps/docs/content/docs/squads.zh.mdx
@@ -1,17 +1,18 @@
---
title: 小队
-description: 由一名 leader 协调多名智能体或成员,把工作交给合适的人。
+description: 由一名队长协调多名智能体或成员,把工作交给合适的人。
---
import { Callout } from "fumadocs-ui/components/callout";
+import { SquadDemo } from "@/components/demos/squad-demo";
-小队由一名 leader 智能体和若干成员组成。把任务分配给小队后,不会同时运行所有智能体。Multica 会先唤醒 leader,由它阅读上下文并决定下一步交给谁。
+小队由一名队长智能体和若干成员组成。把任务分配给小队后,不会同时运行所有智能体:Multica 先唤醒队长,由它阅读上下文,决定下一步交给谁。
-小队解决的是把工作交给谁的问题。它不会把多个智能体合并成一个新的智能体,也不会自动提高并发。
+小队只负责把工作交给合适的人。它不会把多个智能体合并成一个新的智能体,也不会自动提高并发。
## 适用场景
-当工作需要多种能力,而且不能在创建任务时就确定具体负责人,可以使用小队。例如,一个产品交付小队可以包含前端、后端和测试智能体,由 leader 根据每条任务的内容进行分配。
+当工作需要多种能力,而且不能在创建任务时就确定具体负责人,可以使用小队。例如,一个产品交付小队可以包含前端、后端和测试智能体,由队长根据每条任务的内容分配。
工作范围明确时,直接分配给对应的[智能体](/agents)即可。
@@ -19,47 +20,51 @@ import { Callout } from "fumadocs-ui/components/callout";
| 配置 | 作用 |
|---|---|
-| **leader** | 必须是一名智能体。接收分配给小队的工作,并决定如何处理。 |
+| **队长** | 必须是一名智能体。接收分配给小队的工作,并决定如何处理。 |
| **成员** | 可以是智能体,也可以是人类成员。同一成员可以加入多个小队。 |
-| **角色说明** | 告诉 leader 每个成员适合处理什么工作。它只是上下文,不会授予权限或自动触发成员。 |
-| **小队指令** | 保存路由规则、协作方式和需要贯穿全队的背景,只会提供给 leader。 |
+| **角色说明** | 告诉队长每个成员适合处理什么工作。它只是上下文,不会授予权限或自动触发成员。 |
+| **小队指令** | 保存路由规则、协作方式和需要贯穿全队的背景,只会提供给队长。 |
-创建小队时需要填写名称并选择 leader。小队 leader 会自动成为成员;之后可以继续添加成员、填写角色说明和小队指令。
+创建小队时需要填写名称并选择队长。队长会自动成为小队成员;之后可以继续添加成员、填写角色说明和小队指令。
## 分配后的执行流程
非 backlog 状态的任务分配给小队后,Multica 会立刻给**队长智能体**入队一次运行(不是给每个成员都入一个):
1. **队长的运行时领走运行**,和普通智能体的分配流程一样。
-2. **队长拿到 briefing。** 领走的瞬间,Multica 会在队长的指令后面追加三段内容,见下文[队长每次执行看到的内容](#队长每次执行看到的内容)。
-3. **队长发一条派活评论。** 评论里用花名册给好的 mention markdown `@` 选中的成员——这个 `@` 会触发被派的成员入队新运行。
+2. **队长拿到 briefing。** 运行被领取时,Multica 会在队长的指令后面追加三段内容,见下文[队长每次执行看到的内容](#队长每次执行看到的内容)。
+3. **队长发一条派活评论。** 评论里用花名册给好的 mention markdown `@` 选中的成员。被 `@` 的智能体会入队一次新运行,被 `@` 的人类成员会收到通知。
4. **队长记录 evaluation**:`multica squad activity <issue-id> <outcome> --reason "..."`。这一行会写进任务的 activity 时间线,方便人类回溯队长的每次评估。
5. **派活轮让父任务处于 `in_progress`。** 和直接分配给智能体同一套状态约定:协调小队就是在推进父任务本身的工作,所以父任务从 `todo` 进入 `in_progress`;派活不等于交付,小队干活期间保持不变。
6. **队长停下。** 派完活,队长不亲自动手。被派成员有回复时,队长会被自动唤醒,决定下一步:继续派活、上抛给人类、在整体目标达成后把父任务推到 `in_review`,或保持沉默。`done` 留给人工确认或既有集成(例如带 close intent 的 PR merge)。
如果任务仍在 `backlog`,分配本身不会触发队长。移出 `backlog` 后才会开始执行。
+下面的演示把一条筹备活动的任务交给"活动小队":队长是运营助手,成员是文案助手和你。
+
+<SquadDemo />
+
### 队长每次执行看到的内容
每次队长被触发,三段内容会附加到它的指令上:
-- **Squad Operating Protocol(小队工作规范)**——一段硬编码的规则集:读任务 → 用 `@` 派活 → 保持简洁(不复述任务内容,被派的成员自己能读)→ 每次记 evaluation → 派完就停(派活轮结束时父任务处于 `in_progress`)→ 整体目标达成后才推 `in_review`。这段由系统管理,不可编辑。
+- **Squad Operating Protocol(小队工作规范)**:一段硬编码的规则集,读任务 → 用 `@` 派活 → 保持简洁(不复述任务内容,被派的成员自己能读)→ 每次记 evaluation → 派完就停(派活轮结束时父任务处于 `in_progress`)→ 整体目标达成后才推 `in_review`。这段由系统管理,不可编辑。
- 其中状态相关的规则只对"确实分配给本小队"的任务生效。队长被别人任务里的 `@小队` 唤醒时,同样拿到花名册和派活规则,但会被明确告知不要改动那条任务的状态——状态仍归它自己的负责人。
-- **Squad Roster(小队花名册)**——队长一行 + 每个未归档成员一行,每行带可直接复制的 mention markdown(`[@Name](mention://agent/<uuid>)`)。纯文本 `@name` 不会触发任何人。
-- **Squad Instructions(小队指令)**——你为这个小队写的自定义内容:路由规则("数据库相关派给 Alice,前端派给 Bob")、上报策略,或任务本身不会有的背景。
+ 其中状态相关的规则只对"确实分配给本小队"的任务生效。队长被别人任务里的 `@小队` 唤醒时,同样拿到花名册和派活规则,但会被明确告知不要改动那条任务的状态,状态仍归那条任务自己的负责人。
+- **Squad Roster(小队花名册)**:队长一行,加上每个未归档成员一行,每行带可直接复制的 mention markdown(`[@Name](mention://agent/<uuid>)`)。纯文本 `@name` 不会触发任何人。
+- **Squad Instructions(小队指令)**:你为这个小队写的自定义内容,包括路由规则("数据库相关派给 Alice,前端派给 Bob")、上报策略,或任务本身不会有的背景。
## 队长的再次触发时机
第一次派活之后,大多数后续评论会自动唤醒队长:
-| 事件 | 触发队长 |
-|---|---|
-| 非小队成员(人类、外部智能体)发评论 | 会 |
-| 小队成员发进展更新,不带任何 `@` | 会——队长重新评估下一步 |
-| 任何评论里显式 `@` 了智能体、成员、小队或 `@all` | 不会——显式 `@` 就是路由信号,队长让位 |
-| 队长自己发的评论 | 不会——防自触发 |
-| 评论里只有任务互链 | 会——任务引用不算路由 |
+| 事件 | 触发队长 | 说明 |
+|---|---|---|
+| 非小队成员(人类、外部智能体)发评论 | 会 | |
+| 小队成员发进展更新,不带任何 `@` | 会 | 队长重新评估下一步 |
+| 任何评论里显式 `@` 了智能体、成员、小队或 `@all` | 不会 | 显式 `@` 就是路由信号,队长让位 |
+| 队长自己发的评论 | 不会 | 防止自己触发自己 |
+| 评论里只有任务互链 | 会 | 任务引用不算路由 |
在这些规则之上还有去重:如果队长在这条任务上已有处于排队或已领取状态的运行,新触发不会重复入队。
@@ -71,28 +76,28 @@ import { Callout } from "fumadocs-ui/components/callout";
| 操作 | 是否改变负责人 | 结果 |
|---|---|---|
-| **把任务分配给小队** | 是 | 小队成为负责人,并触发 leader。 |
-| **在评论中 @小队** | 否 | 只让 leader 处理这条评论,原负责人不变。 |
+| **把任务分配给小队** | 是 | 小队成为负责人,并触发队长。 |
+| **在评论中 @小队** | 否 | 只让队长处理这条评论,原负责人不变。 |
-直接 @某名成员时,工作会交给该成员处理。Multica 也会合并重复触发并阻止 leader 的评论再次触发自己,避免形成执行循环。
+直接 @某名成员时,工作会交给该成员处理。
## 小队与 Access
把智能体加入小队不会绕过它的 [Access](/agents#权限与-access)。普通成员创建或管理小队时,只能选择自己有权运行的智能体。
-成员能否分配或 @某个小队,也取决于其是否有权运行小队的 leader。若 leader 已归档,或当前成员无权运行它,这个小队就无法被分配或 @提及。
+成员能否分配或 @某个小队,取决于其是否有权运行小队的队长。若队长已归档,或当前成员无权运行它,这个小队就无法被分配或 @提及。
## 创建与管理权限
任何工作区成员都可以创建小队。创建者可以修改和归档自己创建的小队;工作区 `owner` 和 `admin` 可以管理所有小队。
-小队名称不要求在工作区中唯一。更换 leader 时,新 leader 会自动加入小队;当前 leader 不能直接移除,需要先指定另一名 leader。
+小队名称不要求在工作区中唯一。更换队长时,新队长会自动加入小队;当前队长不能直接移除,需要先指定另一名队长。
## 归档小队
归档后,小队会从列表、负责人选择器和 @菜单中消失,也不能恢复。
-为避免现有工作失去负责人,当前分配给小队的任务和自动化会转给原 leader 智能体。历史评论和活动记录仍然保留。如果之后还需要相同的路由,需要重新创建小队。
+为避免现有工作失去负责人,当前分配给小队的任务和自动化会转给原队长智能体。历史评论和活动记录仍然保留。如果之后还需要相同的路由,需要重新创建小队。
<Callout type="warning">
归档操作无法撤销。
diff --git a/apps/docs/content/docs/tasks.fr.mdx b/apps/docs/content/docs/tasks.fr.mdx
index ef1a51e094..5466fbfb0b 100644
--- a/apps/docs/content/docs/tasks.fr.mdx
+++ b/apps/docs/content/docs/tasks.fr.mdx
@@ -4,8 +4,10 @@ description: "Comment une exécution d'agent est mise en file d'attente, exécut
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
-Chaque fois qu'un agent commence à travailler, Multica crée une **exécution**. Elle enregistre ce qui a déclenché le travail, à quel agent il a été confié, où il en est et s'il a finalement réussi.
+Chaque fois qu'un agent commence à travailler, Multica crée une **exécution** qui enregistre ce qui a déclenché le travail, à quel agent il a été confié, où il en est et s'il a réussi.
## Tâches et exécutions
@@ -17,18 +19,19 @@ Une tâche contient l'objectif, la discussion, l'assigné et le statut final d'u
| Durée de vie | Peut être discutée, modifiée et réassignée à plusieurs reprises | Du déclenchement jusqu'à l'achèvement, l'échec ou l'annulation |
| Cardinalité | Une tâche peut couvrir de nombreuses exécutions | Chaque exécution a son propre enregistrement |
-Ainsi, une même tâche peut être confiée successivement à différents agents, ou relancée après un échec. Chaque passage produit un nouvel enregistrement d'exécution ; les enregistrements précédents ne sont jamais écrasés.
+Une même tâche peut être confiée successivement à différents agents, ou relancée après un échec. Chaque passage produit un nouvel enregistrement d'exécution ; les enregistrements précédents ne sont jamais écrasés.
## Sources de déclenchement
-Chacun des éléments suivants peut déclencher une exécution :
+Chacun des éléments suivants déclenche une exécution :
- Assigner une tâche à un agent ou à un squad.
- Mentionner un agent dans un commentaire.
- Envoyer un message à un agent dans une discussion.
- Une automatisation qui se déclenche selon une planification ou à partir d'un événement externe.
+- Un [réveil de tâche](/issue-wakeups) dont l'événement, l'heure ou la condition arrive.
-Les points d'entrée fournissent des contextes différents, mais l'exécution fonctionne toujours de la même façon : Multica crée une exécution, un runtime la prend en charge, et le runtime invoque l'outil de codage IA configuré pour l'agent.
+Selon le point d'entrée, l'agent reçoit un contexte différent, mais l'exécution fonctionne de la même façon : Multica crée une exécution, un runtime la prend en charge, et le runtime invoque l'outil de codage IA configuré pour l'agent.
## Cycle de vie d'une exécution
@@ -45,7 +48,7 @@ Une exécution passe généralement par ces états :
| `failed` | L'exécution a rencontré une erreur ou a été interrompue |
| `cancelled` | L'exécution a été arrêtée manuellement |
-Lorsque le runtime est en ligne, une nouvelle exécution démarre généralement rapidement ; si le runtime passe hors ligne après l'entrée de l'exécution dans la file d'attente, l'exécution reste en file d'attente jusqu'à son rétablissement. Le travail en file d'attente n'expire pas pour avoir trop attendu — un runtime qui continue d'envoyer ses signaux de vie (heartbeats) est occupé, pas disparu, et son arriéré peut donc s'écouler aussi longtemps que nécessaire. Une exécution en file d'attente n'échoue que lorsque les **deux** conditions sont réunies : son runtime est silencieux depuis plus longtemps que le délai de grâce de reconnexion, **et** l'exécution elle-même est en file d'attente depuis aussi longtemps. La seconde condition compte lorsque vous assignez du travail à une machine déjà en veille — l'exécution bénéficie quand même d'un délai de grâce complet pour vous laisser la réveiller, au lieu d'échouer immédiatement.
+Lorsque le runtime est en ligne, une nouvelle exécution démarre généralement rapidement ; si le runtime passe hors ligne après l'entrée de l'exécution dans la file d'attente, l'exécution reste en file d'attente jusqu'à son rétablissement. Une longue attente ne fait pas expirer une exécution en file : un runtime qui continue d'envoyer ses signaux de vie (heartbeats) est occupé, pas disparu, et son arriéré peut s'écouler aussi longtemps que nécessaire. Une exécution en file d'attente n'échoue que lorsque les **deux** conditions sont réunies : son runtime est silencieux depuis plus longtemps que le délai de grâce de reconnexion, **et** l'exécution elle-même est en file d'attente depuis aussi longtemps. La seconde condition couvre le travail assigné à une machine déjà en veille : au lieu d'échouer immédiatement, l'exécution vous laisse un délai de grâce complet pour réveiller la machine.
<Callout type="info">
Si le système sait déjà, avant le déclenchement, que le runtime cible est hors ligne, certaines actions immédiates indiquent que l'exécution ne peut pas démarrer pour le moment au lieu de créer une exécution que personne ne pourra prendre en charge.
@@ -55,26 +58,30 @@ Un runtime dont le signal de vie est sain peut mener de longues exécutions ; le
## Consulter l'historique des exécutions
-Toutes les exécutions produites par une tâche sont listées dans la section **Journal d'exécution** de la barre latérale droite de la tâche — pas sur une page ou un onglet séparé. La section est dépliée par défaut : les exécutions actives restent épinglées en haut, et celles qui sont terminées se trouvent derrière **Afficher les exécutions passées (N)**. Chaque ligne indique la source du déclenchement, l'agent qui exécute, l'état et la durée. Si vous ne voyez pas la section, ouvrez la barre latérale avec le bouton de panneau dans l'en-tête de la tâche ; sur les écrans étroits, elle est repliée au départ.
+Toutes les exécutions produites par une tâche sont listées dans la section **Journal d'exécution** de la barre latérale droite de la tâche. La section est dépliée par défaut : les exécutions actives restent épinglées en haut, suivies des 3 dernières exécutions terminées sous **Récentes** ; les plus anciennes s'ouvrent avec **Ouvrir la chronologie**. Chaque ligne indique la source du déclenchement, l'agent qui exécute et l'état. Si vous ne voyez pas la section, ouvrez la barre latérale avec le bouton de panneau dans l'en-tête de la tâche ; sur les écrans étroits, elle est repliée au départ.
-Le journal se met à jour via la connexion temps réel tant que la page reste ouverte — les nouvelles exécutions, les changements d'état et les commentaires de l'agent apparaissent sans rechargement manuel.
+Tant que la page est ouverte, le journal se met à jour via la connexion temps réel : les nouvelles exécutions, les changements d'état et les commentaires de l'agent apparaissent sans rechargement.
Pendant qu'un agent travaille, l'en-tête de la tâche affiche aussi une pastille en direct, par exemple « Engineer travaille ». La survoler affiche les mêmes exécutions actives, ce qui permet de suivre la progression sans quitter la page.
-Depuis cet endroit, vous pouvez :
+Dans le journal d'exécution, vous pouvez :
- Cliquer sur **Voir la transcription** sur une ligne pour voir les messages de l'agent, les appels d'outils et la sortie d'erreur. Pour une exécution encore en cours, la transcription continue de s'afficher en direct tant que la boîte de dialogue reste ouverte, et un bouton **Plus récents d'abord** inverse l'ordre des événements.
-- Arrêter les exécutions programmées, en file d'attente, en démarrage, en attente d'un répertoire local ou en cours.
+- Arrêter les exécutions en file d'attente, en démarrage, en attente d'un répertoire local ou au travail.
- Relancer une exécution en échec ou annulée.
-![Journal d'exécution dans la barre latérale de la tâche : exécutions actives au-dessus des exécutions passées](/images/docs/quickstart-run-result.webp)
+La démo ci-dessous parcourt un cycle complet : une exécution entre en file, démarre et échoue ; vous la relancez et la nouvelle exécution se termine. Une fois la nouvelle exécution lancée, vous pouvez aussi essayer de l'arrêter en cours de route.
+
+<RunLifecycleDemo />
![Enregistrement d'exécution : chronologie des états, résumé de l'agent et appels d'outils individuels](/images/docs/task-transcript.webp)
<Callout type="warning">
-Changer l'assigné ou le statut d'une tâche n'arrête pas une exécution déjà démarrée. Pour en interrompre une, arrêtez l'exécution correspondante dans le journal d'exécution. Les exécutions actives ne sont annulées avec une tâche que lorsque la tâche est supprimée.
+Changer l'assigné ou le statut d'une tâche n'arrête pas une exécution déjà démarrée. Pour en interrompre une, arrêtez-la dans le journal d'exécution. Supprimer une tâche annule ses exécutions actives.
</Callout>
+Le journal d'exécution totalise aussi le **Dépensé**, les **Tokens** et le **Travail d'agent** de la tâche, avec une barre de coût par exécution. Cliquer sur le total, sur une barre ou sur **Ouvrir la chronologie** ouvre la boîte de dialogue **Exécutions**, qui montre le coût par exécution ou en cumul, le répartit par agent et par modèle, et compte les exécutions en échec et annulées. Les coûts sont des estimations ; leur calcul et la consommation de tout l'espace de travail sont décrits dans [Statistiques](/analytics#coût-dune-tâche).
+
## Échecs et relances automatiques
Les défaillances transitoires — un runtime brièvement hors ligne, un redémarrage du daemon, un délai d'exécution dépassé ou une interruption réseau dans l'outil de codage IA — peuvent déclencher une relance automatique. Par défaut, une exécution ordinaire est tentée au plus deux fois ; les interruptions réseau de l'outil ont droit à trois tentatives au maximum.
@@ -87,9 +94,10 @@ Lorsqu'une tâche n'a aucune autre exécution active et aucune nouvelle relance
## Référence des motifs d'échec
-Les motifs d'échec affichés dans le journal d'exécution et dans les Statistiques se répartissent en deux groupes : les codes sans préfixe sont enregistrés par la plateforme ; les codes `agent_error.*` sont classés à partir des erreurs propres à l'outil de codage IA.
+Les motifs d'échec affichés dans le journal d'exécution et dans les [Statistiques](/analytics#onglet-erreurs) se répartissent en deux groupes : les codes sans préfixe sont enregistrés par la plateforme ; les codes `agent_error.*` sont classés à partir des erreurs propres à l'outil de codage IA.
-**Côté plateforme**
+<Tabs items={["Côté plateforme", "Côté outil (agent_error.*)"]}>
+<Tab value="Côté plateforme" id="platform-reasons">
| Motif | Signification | Que faire |
| --- | --- | --- |
@@ -104,7 +112,10 @@ Les motifs d'échec affichés dans le journal d'exécution et dans les Statistiq
| `api_invalid_request` | L'API de la plateforme a rejeté une requête invalide | Relancez ; signalez le problème s'il se reproduit |
| `codex_semantic_inactivity` | Codex n'a produit aucune sortie utile pendant trop longtemps et a été jugé bloqué | Relancez, ou ajustez le délai d'inactivité de Codex |
-**Côté outil (`agent_error.*`, préfixe omis)**
+</Tab>
+<Tab value="Côté outil (agent_error.*)" id="agent-error-reasons">
+
+Le préfixe `agent_error.` est omis dans ce tableau.
| Motif | Signification | Que faire |
| --- | --- | --- |
@@ -123,6 +134,9 @@ Les motifs d'échec affichés dans le journal d'exécution et dans les Statistiq
| `agent_timeout` | L'outil a été arrêté après être resté trop longtemps sans réponse | Relancez ou réduisez le périmètre de la tâche |
| `unknown` | Échec non classé | Consultez l'erreur brute dans l'enregistrement de l'exécution |
+</Tab>
+</Tabs>
+
## Relance manuelle
Cliquer sur le bouton Relancer l'exécution d'une ligne du journal d'exécution invoque **l'agent qui a traité cette exécution à ce moment-là**. Même si la tâche a été réassignée depuis, la relance ne bascule pas vers le nouvel assigné.
@@ -139,13 +153,11 @@ Cette forme ne vise pas une exécution passée précise : elle utilise l'agent a
## Fin d'exécution et fin de tâche
-`completed` signifie seulement que cette exécution précise s'est terminée normalement — cela ne confirme pas que l'objectif de la tâche est atteint. Vous pouvez toujours examiner le résultat, poursuivre la discussion, ajouter des exigences ou déclencher à nouveau l'agent.
-
-Le fait qu'une tâche soit terminée se juge à l'avancement réel du travail et au statut de la tâche.
+`completed` signifie seulement que cette exécution précise s'est terminée normalement ; cela ne confirme pas que l'objectif de la tâche est atteint. Une fois l'exécution finie, vous pouvez toujours examiner le résultat, poursuivre la discussion, ajouter des exigences ou déclencher à nouveau l'agent. C'est le statut de la tâche qui indique si elle est terminée.
## Référence rapide des états et délais
-Les valeurs ci-dessous reflètent la configuration par défaut du serveur, pour des vérifications croisées rapides lors du dépannage.
+Les valeurs ci-dessous sont celles de la configuration par défaut du serveur.
| État | Signification | Délai et conséquence |
| --- | --- | --- |
@@ -153,7 +165,7 @@ Les valeurs ci-dessous reflètent la configuration par défaut du serveur, pour
| `queued` | En attente de prise en charge par un runtime | Attend tant que son runtime continue d'envoyer des signaux de vie, et dans tous les cas au moins un délai de grâce de reconnexion après la mise en file d'attente ; n'échoue que lorsque les deux fenêtres sont écoulées, et n'est pas relancée automatiquement |
| `dispatched` | Prise en charge ; l'outil démarre | Considérée comme en échec après plus de **5 minutes** dans cet état |
| `waiting_local_directory` | En attente de la libération du verrou du répertoire local | Pas de délai propre ; reprend le processus de démarrage une fois le répertoire libéré |
-| `running` | L'outil de codage IA est en cours d'exécution | Pas de durée maximale fixe ; la vivacité suit le signal de vie du runtime — un toutes les 15 secondes ; un runtime qui perd son signal de vie est marqué hors ligne au plus tard en 3 minutes environ, et ses exécutions échouent avec lui |
+| `running` | L'outil de codage IA est en cours d'exécution | Pas de durée maximale fixe ; la vivacité suit le signal de vie du runtime — un toutes les 15 secondes ; un runtime qui perd son signal de vie est marqué hors ligne au plus tard en 3 minutes environ. Ses exécutions n'échouent qu'une fois le signal de vie absent au-delà du délai de grâce de reconnexion (`MULTICA_RUNTIME_RECONNECT_GRACE`, 3 heures par défaut) ; un redémarrage du daemon les récupère directement |
La relance automatique ne couvre que les défaillances transitoires ci-dessous, et ne s'applique qu'aux exécutions rattachées à une tâche ou à une discussion (hors mode **Exécution seule** des automatisations) :
diff --git a/apps/docs/content/docs/tasks.ja.mdx b/apps/docs/content/docs/tasks.ja.mdx
index ece3e896f2..450599d597 100644
--- a/apps/docs/content/docs/tasks.ja.mdx
+++ b/apps/docs/content/docs/tasks.ja.mdx
@@ -4,8 +4,10 @@ description: エージェントの 1 回の実行がどのようにキューに
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
-エージェントが動き出すたびに、Multica は**実行記録**を 1 件作成します。実行記録には、何によってトリガーされ、どのエージェントに渡され、いまどこまで進んでいて、最終的に成功したかどうかが記録されます。
+エージェントが動き出すたびに、Multica は**実行記録**を 1 件作成し、何がトリガーしたか、どのエージェントに渡したか、どこまで進んだか、最終的に成功したかを記録します。
## タスクと実行
@@ -17,16 +19,17 @@ import { Callout } from "fumadocs-ui/components/callout";
| 続く期間 | 何度でも議論・追記・再割り当てできる | トリガーから、完了・失敗・キャンセルまで |
| 数の関係 | 1 つのタスクに複数の実行が積み重なる | 実行ごとに独立した記録が残る |
-そのため、同じタスクを順番に別のエージェントへ渡すことも、失敗のあとにもう一度実行することもできます。実行のたびに新しい記録が作成され、以前の記録が上書きされることはありません。
+同じタスクを順番に別のエージェントへ渡すことも、失敗のあとにもう一度実行することもできます。実行のたびに新しい記録が作成され、以前の記録が上書きされることはありません。
## トリガー元
-次の操作はいずれも実行をトリガーできます。
+次の操作で実行がトリガーされます。
- タスクをエージェントまたはスクワッドに割り当てる。
- コメントでエージェントをメンションする。
- チャットでエージェントにメッセージを送る。
- オートパイロットがスケジュールまたは外部イベントで発火する。
+- [タスクのウェイクアップ](/issue-wakeups)のイベント、時刻、条件が来る。
入口によって渡されるコンテキストは異なりますが、実行の仕組みは同じです。Multica が実行を作成し、ランタイムがそれを取得して、エージェントに設定された AI コーディングツールを呼び出します。
@@ -45,7 +48,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| `failed` | 実行がエラーになったか中断された |
| `cancelled` | 実行が手動で停止された |
-ランタイムがオンラインなら、新しい実行は通常すぐに始まります。キューに入ったあとでランタイムがオフラインになった場合、実行は復帰までキューで待機します。待ち時間の長さだけで期限切れになることはありません。ハートビートを送り続けているランタイムは「いなくなった」のではなく「処理中」なので、その滞留分は必要なだけ待てます。キュー内の実行が失敗するのは、担当ランタイムが再接続猶予を超えてハートビートを停止し、かつ実行自体も同じ時間キューで待った場合だけです。後者の条件により、すでに休止中のマシンに割り当てた場合でも実行はすぐには失敗せず、マシンを復帰させるための猶予がまるまる 1 回分確保されます。
+ランタイムがオンラインなら、新しい実行は通常すぐに始まります。キューに入ったあとでランタイムがオフラインになった場合、実行は復帰までキューで待機します。長く待ったというだけで期限切れになることはありません。ハートビートを送り続けているランタイムは「処理中」なだけなので、滞留した実行はいつまでも待てます。キュー内の実行が失敗するのは、担当ランタイムが再接続猶予を超えてハートビートを停止し、かつ実行自体も同じ時間キューで待った場合だけです。後者の条件により、すでに休止中のマシンに割り当てた場合でも実行はすぐには失敗せず、マシンを復帰させるための猶予がまるまる 1 回分確保されます。
<Callout type="info">
トリガーの前の時点で対象ランタイムのオフラインが分かっている場合、一部の即時操作は、誰も取得できない実行を作成する代わりに、いまは実行できない旨をその場で表示します。
@@ -55,41 +58,46 @@ import { Callout } from "fumadocs-ui/components/callout";
## 実行履歴の確認
-タスクが生んだ実行は、タスク右サイドバーの**実行ログ**セクションにすべて一覧表示されます。専用のページやタブに移動する必要はありません。このセクションは既定で展開され、実行中のものが上部に固定され、終了したものは**過去の実行を表示 (N)**の下にまとまります。各行にはトリガー元、実行したエージェント、状態、時間が表示されます。見当たらない場合は、タスク上部のパネルボタンでサイドバーを開いてください。画面幅が狭いときは既定で閉じています。
+タスクが生んだ実行は、タスク右サイドバーの**実行ログ**セクションにすべて一覧表示されます。このセクションは既定で展開され、実行中のものが上部に固定され、その下の**最新**に終了した直近 3 回の実行が並びます。それより前の記録は**タイムラインを開く**から確認します。各行にはトリガー元、実行したエージェント、状態が表示されます。見当たらない場合は、タスク上部のパネルボタンでサイドバーを開いてください。画面幅が狭いときは既定で閉じています。
ページを開いたままにしていれば、実行ログはリアルタイム接続経由で自動更新されます。新しい実行、状態の変化、エージェントのコメントは手動リロードなしで表示されます。
エージェントの作業中は、タスク上部にライブ表示(例:「Engineer が作業中」)も出ます。ホバーすると同じ実行中の行が表示され、ページを離れずに進捗を確認できます。
-ここでは次の操作ができます。
+実行ログでは次の操作ができます。
- 行の**トランスクリプトを表示**をクリックし、エージェントのメッセージ、ツール呼び出し、エラー出力を確認する。進行中の実行なら、ダイアログを開いている間も内容がリアルタイムに追記され、**新しい順**で並び替えられる。
-- 後で発火する予定・キュー待ち・起動中・ローカルディレクトリ待ち・進行中の実行を停止する。
+- 待機中・開始中・ローカルディレクトリ待ち・作業中の実行を停止する。
- 失敗またはキャンセルされた実行をリトライする。
-![タスク右サイドバーの実行ログ: 実行中の行と過去の実行](/images/docs/quickstart-run-result.webp)
+下のデモでは、実行がキューに入り、始まり、失敗し、リトライした新しい実行が完了するまでを一通りたどります。新しい実行が始まったら、途中で停止することもできます。
+
+<RunLifecycleDemo />
![実行記録: 状態のタイムライン、エージェントの要約、個々のツール呼び出し](/images/docs/task-transcript.webp)
<Callout type="warning">
-タスクの担当者やステータスを変更しても、すでに始まった実行は止まりません。中断したいときは、実行ログで該当する実行を停止してください。アクティブな実行と一緒にキャンセルされるのは、タスクを削除したときだけです。
+タスクの担当者やステータスを変更しても、すでに始まった実行は止まりません。中断したいときは、実行ログで該当する実行を停止してください。タスクを削除すると、そのアクティブな実行も一緒にキャンセルされます。
</Callout>
+実行ログには、このタスクの**費用**、**トークン**、**エージェント作業**の合計と、実行ごとに 1 本のコストバーも表示されます。合計、コストバー、または**タイムラインを開く**をクリックすると**実行履歴**ダイアログが開き、費用を実行ごとまたは累計で表示し、エージェント別とモデル別に分け、失敗とキャンセルの回数も示します。費用は概算です。計算方法とワークスペース全体の使用量は[分析](/analytics#タスクのコスト)を参照してください。
+
## 失敗と自動リトライ
ランタイムの一時的なオフライン、デーモンの再起動、実行タイムアウト、AI コーディングツールのネットワーク中断といった一時的な障害は、自動リトライをトリガーできます。通常の実行はデフォルトで最大 2 回まで、ツールのネットワーク中断は最大 3 回まで実行されます。
エージェント自身が返したエラーは、通常は自動リトライされません。認証の失効、クォータ不足、設定ミス、モデルがリクエストを完了できない場合などは、まず原因を解消してから手動でリトライしてください。
-オートパイロットの**実行のみ**モードは、次のスケジュール実行と重ならないよう自動リトライしません。**タスクを作成**モードが生成するのはタスク由来の通常のイシュー実行なので、インフラ障害は上記のルールどおりリトライされます。どちらのモードも、最終結果はオートパイロットの実行履歴で確認できます。
+オートパイロットの**実行のみ**モードは、次のスケジュール実行と重ならないよう自動リトライしません。**タスクを作成**モードが生成するのは通常のタスク実行なので、インフラ障害は上記のルールどおりリトライされます。どちらのモードも、最終結果はオートパイロットの実行履歴で確認できます。
タスク上に他のアクティブな実行がなく、実行を待つ新しいリトライもない場合、失敗によって `in_progress` のタスクは `todo` に戻ります。
## 失敗理由リファレンス
-実行ログと使用量統計に表示される失敗理由は 2 つに分かれます。接頭辞のない理由コードはプラットフォームが記録するもの、`agent_error.*` は AI コーディングツール自身のエラーから分類されたものです。
+実行ログと[分析](/analytics#エラータブ)に表示される失敗理由は 2 つに分かれます。接頭辞のない理由コードはプラットフォームが記録するもの、`agent_error.*` は AI コーディングツール自身のエラーから分類されたものです。
-**プラットフォーム側**
+<Tabs items={["プラットフォーム側", "ツール側(agent_error.*)"]}>
+<Tab value="プラットフォーム側" id="platform-reasons">
| 原因 | 意味 | 対処 |
| --- | --- | --- |
@@ -104,7 +112,10 @@ import { Callout } from "fumadocs-ui/components/callout";
| `api_invalid_request` | プラットフォーム API が不正なリクエストを拒否した | リトライし、繰り返し発生する場合は問題を報告する |
| `codex_semantic_inactivity` | Codex が長時間有効な出力を出さず、停滞と判定された | リトライするか、Codex の停滞タイムアウトを調整する |
-**ツール側(`agent_error.*`、接頭辞は省略)**
+</Tab>
+<Tab value="ツール側(agent_error.*)" id="agent-error-reasons">
+
+この表では `agent_error.` 接頭辞を省略しています。
| 原因 | 意味 | 対処 |
| --- | --- | --- |
@@ -123,11 +134,14 @@ import { Callout } from "fumadocs-ui/components/callout";
| `agent_timeout` | ツールが長時間応答せず終了された | リトライするか、タスクの範囲を狭める |
| `unknown` | 分類できなかった失敗 | 実行記録の元のエラーを確認する |
+</Tab>
+</Tabs>
+
## 手動リトライ
実行ログで行の再試行ボタンをクリックすると、**当時その実行を担当したエージェント**が再び呼び出されます。その後タスクの担当者が変わっていても、新しい担当者には切り替わりません。
-リトライは、前回の実行がローカルディレクトリに書き込んだファイルをできる限り保持します。元のセッションがまだ安全で、同じランタイムが取得した場合は、前回のセッションも引き継ぎます。コンテキスト超過や不正なリクエストなど、セッションを汚染するエラーの場合は、元の作業ディレクトリの上で新しいセッションを開始します。元のディレクトリがすでに存在しない場合は、新しい作業ディレクトリを使います。
+リトライは、前回の実行がローカルディレクトリに書き込んだファイルをできる限り保持します。元のセッションがまだ安全で、同じランタイムが取得した場合は、前回のセッションを引き継ぎます。コンテキスト超過や不正なリクエストなど、セッションを汚染するエラーの場合は、元の作業ディレクトリの上で新しいセッションを開始します。元のディレクトリがすでに存在しない場合は、新しい作業ディレクトリを使います。
CLI から現在のタスクを再実行することもできます。
@@ -139,13 +153,11 @@ multica issue rerun <issue-id>
## 実行の完了とタスクの完了
-`completed` は、この 1 回の実行が正常に終了したことだけを表し、タスクの目標が達成されたことを保証するものではありません。結果を確認し、議論を続け、要件を追加し、もう一度エージェントをトリガーできます。
-
-タスクが完了したかどうかは、実際の作業の進み具合とタスクのステータスで判断してください。
+`completed` は、この 1 回の実行が正常に終了したことだけを表し、タスクの目標が達成されたことを保証するものではありません。実行が終わったあとも、結果を確認し、議論を続け、要件を追加し、もう一度エージェントをトリガーできます。タスクが完了したかどうかは、タスクのステータスで判断します。
## 状態とタイムアウトの早見表
-以下の数値はサーバーのデフォルト設定に対応しており、トラブルシューティング時の照合に使えます。
+以下の数値はサーバーのデフォルト設定です。
| 状態 | 意味 | タイムアウトと結果 |
| --- | --- | --- |
@@ -153,7 +165,7 @@ multica issue rerun <issue-id>
| `queued` | ランタイムによる取得待ち | ランタイムがハートビートを送り続けている限り待機し、さらにどの場合でもキュー投入から最低 1 回分の再接続猶予は確保される。両方の期間が過ぎたときにのみ失敗し、自動リトライはされない |
| `dispatched` | ランタイムが取得し、ツールを起動中 | **5 分**を超えてこの状態に留まると失敗として扱われる |
| `waiting_local_directory` | ローカルディレクトリロックの解放待ち | 独自のタイムアウトはなし。ディレクトリが解放されると起動フローに戻る |
-| `running` | AI コーディングツールが実行中 | 固定の時間上限はなし。生存はランタイムのハートビート(15 秒ごと)で判定し、ハートビートを失ったランタイムは遅くとも約 3 分でオフラインと判定され、その上の実行も失敗する |
+| `running` | AI コーディングツールが実行中 | 固定の時間上限はなし。生存はランタイムのハートビート(15 秒ごと)で判定し、ハートビートを失ったランタイムは遅くとも約 3 分でオフラインと判定される。その上の実行が失敗するのは、ハートビートの途絶が再接続猶予(`MULTICA_RUNTIME_RECONNECT_GRACE`、デフォルト 3 時間)を超えたとき。デーモンが再起動した場合は、これらの実行を直接回収する |
自動リトライは以下の一時的な障害のみを対象とし、タスクまたはチャットに紐づく実行にのみ適用されます(オートパイロットの**実行のみ**モードを除く):
diff --git a/apps/docs/content/docs/tasks.ko.mdx b/apps/docs/content/docs/tasks.ko.mdx
index 774f9ac819..38b86e3633 100644
--- a/apps/docs/content/docs/tasks.ko.mdx
+++ b/apps/docs/content/docs/tasks.ko.mdx
@@ -4,8 +4,10 @@ description: 에이전트의 한 번의 실행이 큐에 들어가고, 실행되
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
-에이전트가 일을 시작할 때마다 Multica가 **실행 기록**을 만듭니다. 이 기록에는 무엇이 실행을 트리거했는지, 어느 에이전트에게 전달되었는지, 현재 어디까지 진행되었는지, 최종적으로 성공했는지가 담깁니다.
+에이전트가 일을 시작할 때마다 Multica가 **실행 기록**을 만들어, 무엇이 트리거했는지, 어느 에이전트에게 갔는지, 어디까지 진행되었는지, 최종적으로 성공했는지를 남깁니다.
## 태스크와 실행
@@ -17,16 +19,17 @@ import { Callout } from "fumadocs-ui/components/callout";
| 유지 기간 | 반복해서 논의하고 보충하고 다시 할당할 수 있음 | 트리거된 시점부터 완료, 실패, 취소될 때까지 |
| 수량 관계 | 태스크 하나에 여러 실행이 포함될 수 있음 | 실행마다 독립된 기록이 있음 |
-따라서 같은 태스크를 여러 에이전트에게 차례로 맡기거나 실패 후 다시 실행할 수 있습니다. 매번 새 실행이 생성되며 이전 기록은 덮어쓰지 않습니다.
+같은 태스크를 여러 에이전트에게 차례로 맡기거나 실패 후 다시 실행할 수 있습니다. 매번 새 실행이 생성되며 이전 기록은 덮어쓰지 않습니다.
## 트리거 출처
-다음 동작은 모두 실행을 트리거할 수 있습니다.
+다음 동작은 실행을 트리거합니다.
- 태스크를 에이전트 또는 스쿼드에 할당
- 댓글에서 에이전트 멘션
- 대화에서 에이전트에게 메시지 전송
-- 일정 또는 외부 이벤트로 자동화 트리거
+- 일정 또는 외부 이벤트로 오토파일럿 트리거
+- [태스크 깨우기](/issue-wakeups)의 이벤트, 시각 또는 조건이 충족됨
각 진입점이 제공하는 컨텍스트는 다르지만 실행 방식은 같습니다. Multica가 실행을 만들고 런타임이 가져간 뒤 에이전트에 설정된 AI 코딩 도구를 호출합니다.
@@ -45,51 +48,56 @@ import { Callout } from "fumadocs-ui/components/callout";
| `failed` | 실행 중 오류가 발생했거나 중단되었습니다. |
| `cancelled` | 실행을 수동으로 중지했습니다. |
-런타임이 온라인이면 새 실행이 보통 빠르게 시작됩니다. 실행이 큐에 들어간 뒤 런타임이 오프라인이 되면 복구될 때까지 큐에서 기다립니다. 오래 기다렸다는 이유만으로 만료되지는 않습니다. 하트비트를 계속 보내는 런타임은 사라진 것이 아니라 바쁜 것이므로, 밀린 실행은 필요한 만큼 기다릴 수 있습니다. 큐의 실행은 담당 런타임이 재연결 유예를 넘겨 하트비트를 멈추고 **동시에** 그 실행 자체도 그만큼 큐에서 기다린 경우에만 실패합니다. 두 번째 조건은 이미 잠들어 있는 기기에 실행을 배정한 경우를 위한 것으로, 이때도 실행은 곧바로 실패하지 않고 기기를 깨울 수 있도록 유예를 온전히 한 번 확보합니다.
+런타임이 온라인이면 새 실행이 보통 빠르게 시작됩니다. 실행이 큐에 들어간 뒤 런타임이 오프라인이 되면 복구될 때까지 큐에서 기다립니다. 오래 기다렸다는 이유만으로 만료되지는 않습니다. 하트비트를 계속 보내는 런타임은 바쁠 뿐이므로, 밀린 실행은 얼마든지 기다릴 수 있습니다. 큐의 실행은 담당 런타임이 재연결 유예를 넘겨 하트비트를 멈추고 **동시에** 그 실행 자체도 그만큼 큐에서 기다린 경우에만 실패합니다. 두 번째 조건은 이미 잠들어 있는 기기에 실행을 배정한 경우를 위한 것으로, 이때도 실행은 곧바로 실패하지 않고 기기를 깨울 수 있도록 유예를 온전히 한 번 확보합니다.
<Callout type="info">
트리거하기 전에 대상 런타임이 오프라인임을 시스템이 이미 아는 경우 일부 즉시 실행 동작은 수령할 수 없는 실행을 만들지 않고 현재 실행할 수 없다고 바로 알립니다.
</Callout>
-heartbeat가 정상인 런타임은 장시간 실행도 실행할 수 있으며 서버는 실행 시간이 길다는 이유만으로 강제 종료하지 않습니다. 런타임은 실제 활동을 기준으로 프로세스가 멈췄는지 판단합니다. 관련 설정은 [환경 변수](/environment-variables#데몬-설정)를 참고하세요.
+하트비트가 정상인 런타임은 장시간 실행도 실행할 수 있으며 서버는 실행 시간이 길다는 이유만으로 강제 종료하지 않습니다. 런타임은 실제 활동을 기준으로 프로세스가 멈췄는지 판단합니다. 관련 설정은 [환경 변수](/environment-variables#데몬-설정)를 참고하세요.
## 실행 기록 확인
-태스크가 만든 실행은 모두 태스크 오른쪽 사이드바의 **실행 로그** 섹션에 표시됩니다. 별도의 페이지나 탭으로 이동할 필요가 없습니다. 이 섹션은 기본으로 펼쳐져 있으며, 진행 중인 실행이 위에 고정되고 끝난 실행은 **이전 실행 보기 (N)** 아래에 모입니다. 각 줄에는 트리거 출처, 실행 에이전트, 상태, 시간이 표시됩니다. 섹션이 보이지 않으면 태스크 상단의 패널 버튼으로 사이드바를 여세요. 화면이 좁으면 기본으로 접혀 있습니다.
+태스크가 만든 실행은 모두 태스크 오른쪽 사이드바의 **실행 로그** 섹션에 표시됩니다. 이 섹션은 기본으로 펼쳐져 있으며, 진행 중인 실행이 위에 고정되고 그 아래 **최근**에 끝난 실행 3개가 표시됩니다. 더 이전 기록은 **타임라인 열기**에서 확인합니다. 각 줄에는 트리거 출처, 실행 에이전트, 상태가 표시됩니다. 섹션이 보이지 않으면 태스크 상단의 패널 버튼으로 사이드바를 여세요. 화면이 좁으면 기본으로 접혀 있습니다.
페이지를 열어 두면 실행 로그는 실시간 연결을 통해 자동으로 갱신됩니다. 새 실행, 상태 변화, 에이전트 댓글이 수동 새로고침 없이 나타납니다.
에이전트가 작업하는 동안에는 태스크 상단에 실시간 표시(예: "Engineer 작업 중")도 나타납니다. 여기에 마우스를 올리면 동일한 진행 중 실행이 보여, 페이지를 벗어나지 않고 진행 상황을 확인할 수 있습니다.
-여기에서 다음을 할 수 있습니다.
+실행 로그에서 다음을 할 수 있습니다.
- 줄의 **트랜스크립트 보기**를 클릭해 에이전트 메시지, 도구 호출, 오류 정보 확인. 진행 중인 실행이면 대화 상자를 열어 둔 동안 내용이 실시간으로 이어지고, **최신 순**으로 정렬을 바꿀 수 있습니다.
-- 나중에 실행하도록 예약된 실행, 큐 대기 중인 실행, 시작 중인 실행, 로컬 디렉터리를 기다리는 실행, 진행 중인 실행 중지
+- 대기 중, 시작 중, 로컬 디렉터리 대기 중, 작업 중인 실행 중지
- 실패하거나 취소된 실행 재시도
-![태스크 오른쪽 사이드바의 실행 로그: 진행 중인 실행과 이전 실행](/images/docs/quickstart-run-result.webp)
+아래 데모는 실행이 큐에 들어가고, 시작하고, 실패한 뒤 다시 시도한 새 실행이 완료되는 전체 과정을 보여 줍니다. 새 실행이 시작되면 중간에 중지해 볼 수도 있습니다.
+
+<RunLifecycleDemo />
![실행 기록: 상태 타임라인, 에이전트 요약, 개별 도구 호출](/images/docs/task-transcript.webp)
<Callout type="warning">
-태스크의 담당자나 상태를 바꿔도 이미 시작된 실행은 중지되지 않습니다. 중단하려면 실행 로그에서 해당 실행을 중지하세요. 태스크를 삭제할 때만 연결된 활성 실행이 함께 취소됩니다.
+태스크의 담당자나 상태를 바꿔도 이미 시작된 실행은 중지되지 않습니다. 중단하려면 실행 로그에서 해당 실행을 중지하세요. 태스크를 삭제하면 연결된 활성 실행도 함께 취소됩니다.
</Callout>
+실행 로그에는 이 태스크의 **비용**, **토큰**, **에이전트 작업** 합계와 실행마다 하나씩의 비용 막대도 표시됩니다. 합계나 비용 막대, 또는 **타임라인 열기**를 클릭하면 **실행 기록** 대화상자가 열립니다. 비용을 실행별 또는 누적으로 보고, 에이전트별·모델별로 나누며, 실패와 취소 횟수도 보여 줍니다. 비용은 추정치이며, 계산 방식과 워크스페이스 전체 사용량은 [분석](/analytics#태스크-비용)을 보세요.
+
## 실패와 자동 재시도
-런타임의 일시적인 오프라인, 데몬 재시작, 실행 timeout, AI 코딩 도구의 네트워크 중단 같은 일시적 장애는 자동 재시도를 트리거할 수 있습니다. 일반 실행은 기본적으로 최대 두 번 실행되고 도구 네트워크 중단은 최대 세 번 실행됩니다.
+런타임의 일시적인 오프라인, 데몬 재시작, 실행 타임아웃, AI 코딩 도구의 네트워크 중단 같은 일시적 장애는 자동 재시도를 트리거할 수 있습니다. 일반 실행은 기본적으로 최대 두 번 실행되고 도구 네트워크 중단은 최대 세 번 실행됩니다.
에이전트 자체가 반환한 오류는 보통 자동으로 재시도되지 않습니다. 인증 만료, 사용량 부족, 설정 오류, 모델이 요청을 완료하지 못한 경우에는 먼저 원인을 해결한 뒤 수동으로 재시도해야 합니다.
-자동화의 **실행만** 모드는 다음 예약 실행과 겹치지 않도록 자동 재시도하지 않습니다. **태스크 만들기** 모드는 일반 실행을 생성하므로 인프라 장애에 위 규칙을 적용해 재시도합니다. 두 모드 모두 자동화 실행 기록에서 최종 결과를 확인할 수 있습니다.
+오토파일럿의 **실행만** 모드는 다음 예약 실행과 겹치지 않도록 자동 재시도하지 않습니다. **태스크 생성** 모드는 일반 실행을 생성하므로 인프라 장애에 위 규칙을 적용해 재시도합니다. 두 모드 모두 오토파일럿 실행 기록에서 최종 결과를 확인할 수 있습니다.
태스크에 다른 활성 실행이 없고 실행을 기다리는 새 재시도도 없다면 실패 시 `in_progress` 상태의 태스크가 `todo`로 돌아갑니다.
## 실패 원인 참조
-실행 로그와 사용량 통계의 일반적인 실패 원인은 두 종류입니다. 접두사가 없는 이유 코드는 플랫폼이 기록하고, `agent_error.*`는 AI 코딩 도구의 오류를 분류한 값입니다.
+실행 로그와 [분석](/analytics#오류-탭)의 실패 원인은 두 종류입니다. 접두사가 없는 이유 코드는 플랫폼이 기록하고, `agent_error.*`는 AI 코딩 도구의 오류를 분류한 값입니다.
-**플랫폼 측**
+<Tabs items={["플랫폼 측", "도구 측(agent_error.*)"]}>
+<Tab value="플랫폼 측" id="platform-reasons">
| 원인 | 의미 | 처리 방법 |
| --- | --- | --- |
@@ -104,7 +112,10 @@ heartbeat가 정상인 런타임은 장시간 실행도 실행할 수 있으며
| `api_invalid_request` | 플랫폼 API가 잘못된 요청을 거부함 | 재시도하고 반복되면 문제 신고 |
| `codex_semantic_inactivity` | Codex가 오랫동안 유효한 출력을 내지 않아 멈춘 것으로 판단됨 | 재시도하거나 Codex 정체 timeout 조정 |
-**도구 측(`agent_error.*`, 접두사 생략)**
+</Tab>
+<Tab value="도구 측(agent_error.*)" id="agent-error-reasons">
+
+표에서는 `agent_error.` 접두사를 생략했습니다.
| 원인 | 의미 | 처리 방법 |
| --- | --- | --- |
@@ -123,11 +134,14 @@ heartbeat가 정상인 런타임은 장시간 실행도 실행할 수 있으며
| `agent_timeout` | 도구가 오랫동안 응답하지 않아 종료됨 | 재시도하거나 태스크 범위 축소 |
| `unknown` | 분류하지 못한 실패 | 실행 로그의 원본 오류 확인 |
+</Tab>
+</Tabs>
+
## 수동 재시도
실행 로그에서 특정 줄의 재시도 버튼을 클릭하면 **당시 이 실행을 담당한 에이전트**가 다시 호출됩니다. 이후 태스크 담당자가 바뀌었더라도 새 담당자를 사용하지 않습니다.
-재시도할 때 이전 실행이 로컬 디렉터리에 이미 기록한 파일을 가능한 한 유지합니다. 원래 세션이 계속 안전하고 같은 런타임이 실행을 가져가면 이전 세션도 이어갑니다. 컨텍스트 overflow나 유효하지 않은 요청처럼 세션을 오염시키는 오류가 있었다면 원래 작업 디렉터리에서 새 세션을 시작합니다. 원래 디렉터리가 없으면 새 작업 디렉터리를 사용합니다.
+재시도할 때 이전 실행이 로컬 디렉터리에 이미 기록한 파일을 가능한 한 유지합니다. 원래 세션이 계속 안전하고 같은 런타임이 실행을 가져가면 이전 세션을 이어갑니다. 컨텍스트 overflow나 유효하지 않은 요청처럼 세션을 오염시키는 오류가 있었다면 원래 작업 디렉터리에서 새 세션을 시작합니다. 원래 디렉터리가 없으면 새 작업 디렉터리를 사용합니다.
CLI로 현재 태스크를 다시 실행할 수도 있습니다.
@@ -139,13 +153,11 @@ multica issue rerun <issue-id>
## 실행 완료와 태스크 완료
-`completed`는 이번 실행이 정상적으로 끝났다는 뜻일 뿐 태스크 목표가 확인되었다는 뜻은 아닙니다. 결과를 확인하고, 논의를 이어가고, 요구 사항을 보충하거나 에이전트를 다시 트리거할 수 있습니다.
-
-태스크의 완료 여부는 실제 작업 진행 상황과 태스크 상태를 기준으로 판단합니다.
+`completed`는 이번 실행이 정상적으로 끝났다는 뜻일 뿐 태스크 목표가 달성되었다는 뜻은 아닙니다. 실행이 끝난 뒤에도 결과를 확인하고, 논의를 이어가고, 요구 사항을 보충하거나 에이전트를 다시 트리거할 수 있습니다. 태스크의 완료 여부는 태스크 상태로 판단합니다.
## 상태와 timeout 빠른 참조
-다음 수치는 서버 기본 설정이며 문제를 확인할 때 빠르게 비교할 수 있습니다.
+다음 수치는 서버 기본 설정입니다.
| 상태 | 의미 | timeout과 결과 |
| --- | --- | --- |
@@ -153,9 +165,9 @@ multica issue rerun <issue-id>
| `queued` | 런타임이 가져가기를 기다림 | 런타임이 하트비트를 보내는 동안에는 계속 기다리고, 어떤 경우에도 큐에 들어간 뒤 최소 한 번의 재연결 유예는 확보합니다. 두 기간이 모두 지난 뒤에만 실패하며 자동 재시도하지 않습니다. |
| `dispatched` | 런타임이 가져갔고 도구를 시작 중 | **5분** 넘게 머물면 실패로 처리합니다. |
| `waiting_local_directory` | 로컬 디렉터리 잠금 해제를 기다림 | 별도 timeout이 없으며 디렉터리가 해제되면 시작 과정으로 돌아갑니다. |
-| `running` | AI 코딩 도구 실행 중 | 고정 시간 상한이 없습니다. 런타임 heartbeat로 생존을 판단하며 15초마다 heartbeat를 보냅니다. heartbeat를 잃은 런타임은 늦어도 약 3분 뒤 오프라인으로 판단되고 그 위의 실행도 실패합니다. |
+| `running` | AI 코딩 도구 실행 중 | 고정 시간 상한이 없습니다. 런타임 하트비트로 생존을 판단하며 15초마다 하트비트를 보냅니다. 하트비트를 잃은 런타임은 늦어도 약 3분 뒤 오프라인으로 판단됩니다. 그 위의 실행은 하트비트가 재연결 유예(`MULTICA_RUNTIME_RECONNECT_GRACE`, 기본 3시간)를 넘겨 끊긴 뒤에야 실패하며, 데몬이 재시작되면 바로 회수됩니다. |
-자동 재시도는 아래의 일시적 장애만 포함하며 태스크 또는 대화에 연결된 실행에만 적용됩니다. 자동화의 **실행만** 모드는 제외됩니다.
+자동 재시도는 아래의 일시적 장애만 포함하며 태스크 또는 대화에 연결된 실행에만 적용됩니다. 오토파일럿의 **실행만** 모드는 제외됩니다.
| 자동 재시도 가능한 실패 원인 | 실행 횟수 상한 |
| --- | --- |
diff --git a/apps/docs/content/docs/tasks.mdx b/apps/docs/content/docs/tasks.mdx
index e69dc85bf8..31ad7a7c24 100644
--- a/apps/docs/content/docs/tasks.mdx
+++ b/apps/docs/content/docs/tasks.mdx
@@ -4,8 +4,10 @@ description: How a single agent run is queued, executed, stopped, and retried.
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
-Every time an agent starts working, Multica creates a **run**. It records what triggered the work, which agent it went to, how far it has progressed, and whether it ultimately succeeded.
+Every time an agent starts working, Multica creates a **run** that records what triggered the work, which agent it went to, how far it has got, and whether it succeeded.
## Issues and runs
@@ -17,18 +19,19 @@ An issue holds the goal, discussion, assignee, and final status of a piece of wo
| How long it lasts | Can be discussed, amended, and reassigned repeatedly | From trigger until completion, failure, or cancellation |
| Cardinality | One issue can span many runs | Every run gets its own record |
-So the same issue can be handed to different agents in turn, or run again after a failure. Each execution produces a new run record; earlier records are never overwritten.
+The same issue can be handed to different agents in turn, or run again after a failure. Each execution produces a new run record; earlier records are never overwritten.
## Trigger sources
-Any of the following can trigger a run:
+Each of the following triggers a run:
- Assigning an issue to an agent or a squad.
- Mentioning an agent in a comment.
- Sending a message to an agent in chat.
- An Autopilot firing on a schedule or from an external event.
+- An [issue wakeup](/issue-wakeups) firing on its event, time, or condition.
-Different entry points provide different context, but execution works the same way: Multica creates a run, a runtime claims it, and the runtime invokes the AI coding tool the agent is configured with.
+The agent gets different context depending on the entry point, but execution works the same way: Multica creates a run, a runtime claims it, and the runtime invokes the AI coding tool the agent is configured with.
## Execution lifecycle
@@ -45,7 +48,7 @@ A run typically moves through these states:
| `failed` | The run errored or was interrupted |
| `cancelled` | The run was stopped manually |
-When the runtime is online, a new run usually starts quickly; if the runtime goes offline after the run enters the queue, the run stays queued until it recovers. Queued work is not expired for waiting too long — a runtime that keeps heartbeating is busy, not gone, so its backlog is allowed to drain however long that takes. A queued run fails only when **both** are true: its runtime has been silent past the reconnect grace, **and** the run itself has been queued that long. The second condition matters when you assign work to a machine that is already asleep — the run still gets a full grace for you to bring it back, rather than failing straight away.
+When the runtime is online, a new run usually starts quickly; if the runtime goes offline after the run enters the queue, the run stays queued until it recovers. Waiting a long time does not expire a queued run: a runtime that keeps heartbeating is busy, not gone, so its backlog can drain however long that takes. A queued run fails only when **both** are true: its runtime has been silent past the reconnect grace, **and** the run itself has been queued that long. The second condition covers work assigned to a machine that is already asleep: instead of failing straight away, the run gets a full grace period for you to wake the machine.
<Callout type="info">
If the system already knows the target runtime is offline before triggering, some immediate actions report that the run cannot start right now instead of creating a run nothing can claim.
@@ -55,31 +58,35 @@ A runtime with a healthy heartbeat can execute long runs; the server never force
## Viewing run history
-Every run an issue produces is listed in the **Execution log** section of the issue's right sidebar — not on a separate page or tab. The section is expanded by default: active runs stay pinned at the top, and finished ones sit behind **Show past runs (N)**. Each row shows the trigger source, the executing agent, the state, and timing. If you don't see the section, open the sidebar with the panel button in the issue header; on narrow screens it starts collapsed.
+Every run an issue produces is listed in the **Execution log** section of the issue's right sidebar. The section is expanded by default: active runs stay pinned at the top, followed by the 3 most recent finished runs under **Latest**; click **Open timeline** for older ones. Each row shows the trigger source, the executing agent, and the state. If you don't see the section, open the sidebar with the panel button in the issue header; on narrow screens it starts collapsed.
-The log updates over the realtime connection while the page stays open — new runs, status changes, and the agent's comments appear without a manual reload.
+While the page is open, the log updates over the realtime connection: new runs, status changes, and the agent's comments appear without a reload.
While an agent is working, the issue header also carries a live chip such as "Engineer is working". Hovering it shows the same active runs, so you can check progress without leaving the page.
-From here you can:
+In the execution log you can:
- Click **View transcript** on a row to see the agent's messages, tool calls, and error output. For a run still in progress the transcript keeps streaming while the dialog stays open, and a **Newest first** toggle flips the event order.
-- Stop runs that are deferred, queued, starting, waiting for a local directory, or running.
+- Stop runs that are queued, starting, waiting for a local directory, or working.
- Retry a failed or cancelled run.
-![Execution log in the issue sidebar: active runs above past runs](/images/docs/quickstart-run-result.webp)
+The demo below walks through a full cycle: a run queues, starts, and fails; you retry it and the new run completes. Once the new run starts, you can also try stopping it midway.
+
+<RunLifecycleDemo />
![Run record: status timeline, agent summary, and individual tool calls](/images/docs/task-transcript.webp)
<Callout type="warning">
-Changing an issue's assignee or status does not stop a run that has already started. To interrupt one, stop the corresponding run in the execution log. Active runs are cancelled along with an issue only when the issue is deleted.
+Changing an issue's assignee or status does not stop a run that has already started; to interrupt one, stop it in the execution log. Deleting an issue cancels its active runs.
</Callout>
+The execution log also totals the issue's **Spent**, **Tokens**, and **Agent time**, with one cost bar per run. Clicking the total, a bar, or **Open timeline** opens the **Runs** dialog, which charts cost per run or cumulatively, splits it by agent and by model, and counts failed and cancelled runs. Costs are estimates; see [Analytics](/analytics#issue-cost) for how they are calculated and for workspace-wide usage.
+
## Failures and automatic retries
Transient faults — a runtime going briefly offline, a daemon restart, an execution timeout, or a network interruption in the AI coding tool — can trigger an automatic retry. A regular run executes at most twice by default; tool network interruptions get up to three attempts.
-Errors returned by the agent itself are usually not retried automatically. Expired credentials, exhausted quota, misconfiguration, or a model unable to complete the request all need the cause fixed first, followed by a manual retry.
+Errors returned by the agent itself are usually not retried automatically. Expired credentials, exhausted quota, misconfiguration, or a model unable to complete the request all need the cause fixed first, then a manual retry.
An Autopilot's **run only** mode does not retry automatically, to avoid overlapping with the next scheduled run. The **create issue** mode produces regular issue runs, so infrastructure failures still retry under the rules above. Both modes show their final result in the Autopilot run history.
@@ -87,9 +94,10 @@ When an issue has no other active run and no new retry waiting to run, a failure
## Failure reason reference
-The failure reasons shown in the execution log and usage stats fall into two groups: unprefixed reason codes are recorded by the platform; `agent_error.*` codes are classified from the AI coding tool's own errors.
+The failure reasons shown in the execution log and [Analytics](/analytics#errors-tab) fall into two groups: unprefixed reason codes are recorded by the platform; `agent_error.*` codes are classified from the AI coding tool's own errors.
-**Platform side**
+<Tabs items={["Platform side", "Tool side (agent_error.*)"]}>
+<Tab value="Platform side" id="platform-reasons">
| Reason | Meaning | What to do |
| --- | --- | --- |
@@ -104,7 +112,10 @@ The failure reasons shown in the execution log and usage stats fall into two gro
| `api_invalid_request` | The platform API rejected an invalid request | Retry; report the problem if it recurs |
| `codex_semantic_inactivity` | Codex produced no meaningful output for too long and was judged stalled | Retry, or adjust the Codex inactivity timeout |
-**Tool side (`agent_error.*`, prefix omitted)**
+</Tab>
+<Tab value="Tool side (agent_error.*)" id="agent-error-reasons">
+
+The `agent_error.` prefix is omitted in this table.
| Reason | Meaning | What to do |
| --- | --- | --- |
@@ -123,11 +134,14 @@ The failure reasons shown in the execution log and usage stats fall into two gro
| `agent_timeout` | The tool was terminated after going unresponsive for too long | Retry or narrow the issue scope |
| `unknown` | Unclassified failure | Check the raw error in the run record |
+</Tab>
+</Tabs>
+
## Manual retry
Clicking the retry button on a row in the execution log invokes **the agent that handled that run at the time**. Even if the issue has since been reassigned, the retry does not switch to the new assignee.
-A retry keeps the files the previous run already wrote to the local directory whenever possible. If the original session is still safe and the same runtime claims the retry, it also continues the previous session. Errors that poison the session, such as context overflow or invalid requests, start a new session on top of the original working directory instead. When the original directory no longer exists, a fresh working directory is used.
+A retry keeps the files the previous run already wrote to the local directory whenever possible. If the original session is still safe and the same runtime claims the retry, it continues that session. Errors that poison the session, such as context overflow or invalid requests, start a new session on top of the original working directory instead. When the original directory no longer exists, a fresh working directory is used.
You can also rerun the current issue from the CLI:
@@ -139,13 +153,11 @@ This form does not point at a specific past run, so it uses the issue's current
## Run completion and issue completion
-`completed` only means this particular run ended normally — it does not confirm the issue's goal has been met. You can still review the result, keep discussing, add requirements, or trigger the agent again.
-
-Whether an issue is done is judged by the actual progress of the work and the issue's status.
+`completed` only means this particular run ended normally; it does not confirm the issue's goal has been met. After a run ends you can still review the result, keep discussing, add requirements, or trigger the agent again. Whether the issue is done is shown by its status.
## State and timeout quick reference
-The numbers below reflect the server's default configuration, for quick cross-checking while troubleshooting.
+The numbers below are the server's defaults.
| State | Meaning | Timeout and consequence |
| --- | --- | --- |
@@ -153,7 +165,7 @@ The numbers below reflect the server's default configuration, for quick cross-ch
| `queued` | Waiting for a runtime to claim it | Waits as long as its runtime keeps heartbeating, and in every case for at least one reconnect grace after being queued; fails only when both windows have passed, and is not retried automatically |
| `dispatched` | Claimed; the tool is starting | Treated as failed after more than **5 minutes** in this state |
| `waiting_local_directory` | Waiting for the local directory lock to release | No timeout of its own; returns to the startup flow once the directory is released |
-| `running` | The AI coding tool is executing | No fixed duration cap; liveness follows the runtime heartbeat — one every 15 seconds; a runtime that loses its heartbeat is marked offline within about 3 minutes at the latest, and its runs fail with it |
+| `running` | The AI coding tool is executing | No fixed duration cap; liveness follows the runtime heartbeat — one every 15 seconds; a runtime that loses its heartbeat is marked offline within about 3 minutes at the latest. Its runs fail only once the heartbeat has been missing longer than the reconnect grace (`MULTICA_RUNTIME_RECONNECT_GRACE`, 3 hours by default); a daemon restart reclaims them directly |
Automatic retry covers only the transient faults below, and only applies to runs attached to an issue or a chat (excluding the Autopilot **run only** mode):
diff --git a/apps/docs/content/docs/tasks.zh.mdx b/apps/docs/content/docs/tasks.zh.mdx
index ce9bb3446d..b93e4b9a7b 100644
--- a/apps/docs/content/docs/tasks.zh.mdx
+++ b/apps/docs/content/docs/tasks.zh.mdx
@@ -4,8 +4,10 @@ description: 了解智能体的一次执行如何排队、运行、停止和重
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { RunLifecycleDemo } from "@/components/demos/run-lifecycle-demo";
-每次智能体开始工作,Multica 都会创建一条**运行记录**。它记录这次运行由什么触发、交给了哪个智能体、当前进行到哪里,以及最后是否成功。
+智能体每开始一次工作,Multica 就创建一条**运行记录**,写明这次运行由什么触发、交给了哪个智能体、进行到哪里、最后是否成功。
## 任务与运行
@@ -17,18 +19,19 @@ import { Callout } from "fumadocs-ui/components/callout";
| 持续多久 | 可以反复讨论、补充和重新分配 | 从触发开始,到完成、失败或取消为止 |
| 数量关系 | 一个任务可以包含多次运行 | 每次运行都有独立记录 |
-因此,同一个任务可以先后交给不同的智能体,也可以在一次失败后重新运行。每次都会产生新的运行记录,之前的记录不会被覆盖。
+同一个任务可以先后交给不同的智能体,也可以在失败后重新运行。每次都产生一条新的运行记录,旧记录不会被覆盖。
## 触发来源
-以下操作都可能触发一次执行:
+以下操作会触发一次执行:
- 把任务分配给智能体或小队。
- 在评论中提及智能体。
- 在对话中向智能体发送消息。
- 由自动化按计划或外部事件触发。
+- [任务唤醒](/issue-wakeups)的事件、时间或条件到了。
-不同入口提供的上下文不同,但执行方式相同:Multica 创建运行,运行时领取它,再调用智能体配置的 AI 编程工具。
+入口不同,智能体拿到的上下文也不同,执行方式则是一样的:Multica 创建运行,运行时领取它,再调用智能体配置的 AI 编程工具。
## 执行过程
@@ -45,41 +48,45 @@ import { Callout } from "fumadocs-ui/components/callout";
| `failed` | 执行出错或中断 |
| `cancelled` | 执行被手动停止 |
-运行时在线时,新运行通常会很快开始;如果运行入队后运行时离线,它会留在队列中等待恢复。排队本身不会导致过期——运行时只要还在心跳就说明它是忙,不是没了,它的积压可以排多久就排多久。只有**同时**满足两个条件,排队中的运行才会失败:绑定的运行时心跳缺席超过重连宽限期,**并且**该运行自己也已经排队满这么久。第二个条件针对的是「指派给一台已经休眠的机器」——这种情况下运行仍然会获得完整的一个宽限期供你把机器唤醒,而不是立刻失败。
+运行时在线时,新运行通常很快开始;运行入队后运行时离线,运行会留在队列中等它恢复。排得久不会让运行过期:运行时还在发心跳,就说明它只是忙,积压的运行可以一直排下去。排队中的运行要**同时**满足两个条件才会失败:绑定的运行时心跳缺席超过重连宽限期,**并且**这条运行自己也已经排队满这么久。第二个条件照顾的是"指派给一台已经休眠的机器"的情况:运行不会立刻失败,你有完整的一个宽限期把机器唤醒。
<Callout type="info">
-如果系统在触发前已经知道目标运行时离线,部分即时操作会直接提示当前无法运行,而不是继续创建一条无法领取的运行。
+如果触发前系统已经知道目标运行时离线,部分即时操作会直接提示当前无法运行,不再创建一条没人能领取的运行。
</Callout>
心跳正常的运行时可以执行长时间运行,服务器不会仅因为运行时间较长就强制结束它。运行时会根据实际活动判断进程是否已经卡住;相关设置见[环境变量](/environment-variables#守护进程配置)。
## 查看执行记录
-任务产生的所有运行都列在任务右侧栏的 **执行日志**里,不需要跳转到单独的页面或标签页。这一段默认展开:进行中的运行固定在最上面,已结束的收在 **显示历史运行(N)**下面。每一行会显示触发来源、执行智能体、状态和时间。如果没看到这一段,用任务顶部的面板按钮打开右侧栏;窗口较窄时它默认是收起的。
+任务产生的所有运行都列在任务右侧栏的**执行日志**里。这一段默认展开:进行中的运行固定在最上面,下面是**最近**结束的 3 次运行;更早的记录点**打开时间线**查看。每一行显示触发来源、执行智能体和状态。没看到这一段时,用任务顶部的面板按钮打开右侧栏;窗口较窄时它默认收起。
-页面保持打开时,执行日志通过实时连接自动更新 —— 新的运行、状态变化和智能体的评论都会直接出现,不需要手动刷新。
+页面开着时,执行日志通过实时连接自动更新,新的运行、状态变化和智能体的评论会直接出现,不用手动刷新。
-智能体工作期间,任务顶部还会出现一个实时状态条,例如 "Engineer 在工作"。悬停就能看到同样的进行中运行,不用离开当前页面。
+智能体工作期间,任务顶部还有一个实时状态条,例如 "Engineer 在工作"。悬停可以看到同样的进行中运行,不用离开当前页面。
-你可以在这里:
+在执行日志里:
-- 点击某一行的 **查看记录**,查看智能体的消息、工具调用和错误信息。运行还在进行时,弹窗打开期间内容会持续实时追加,也可以用 **最新在前**切换事件顺序。
-- 停止已安排稍后触发、排队、启动、等待本地目录或进行中的运行。
+- 点击某一行的 **查看记录**,查看智能体的消息、工具调用和错误信息。运行还在进行时,弹窗开着的这段时间内容会实时追加,也可以用 **最新在前**切换事件顺序。
+- 停止排队中、启动中、等待本地目录或正在工作的运行。
- 对失败或已取消的运行发起重试。
-![任务右侧栏中的执行日志:进行中的运行在上,历史运行在下](/images/docs/quickstart-run-result.webp)
+下面的演示走一遍完整过程:运行排队、开始、失败,你重试后新的运行完成。新的运行开始后,也可以试试中途停止。
+
+<RunLifecycleDemo />
![执行记录:状态时间轴、智能体总结与逐条工具调用](/images/docs/task-transcript.webp)
<Callout type="warning">
-修改任务的负责人或状态不会停止已经开始的运行。需要中断时,在执行日志中停止对应的运行。删除任务时,关联的活动运行才会一并取消。
+修改任务的负责人或状态不会停止已经开始的运行,要中断就在执行日志中停止对应的运行。删除任务时,关联的活动运行会一并取消。
</Callout>
+执行日志还汇总这条任务的**已花费**、**Token** 和**智能体工作**时长,每次运行对应一根费用条。点合计、费用条或**打开时间线**,打开**运行记录**对话框:按次或累计查看费用,按智能体和模型拆分,并列出失败和取消的次数。费用是估算值,怎么算的以及整个工作区的用量见[统计](/analytics#任务的花费)。
+
## 失败与自动重试
运行时短暂离线、守护进程重启、执行超时或 AI 编程工具网络中断等临时故障,可以触发自动重试。普通运行默认最多执行两次;工具网络中断最多执行三次。
-智能体自身返回的错误通常不会自动重试。例如鉴权失效、额度不足、配置错误或模型无法完成请求,都需要先处理原因,再手动重试。
+智能体自身返回的错误通常不会自动重试。鉴权失效、额度不足、配置错误、模型无法完成请求,都要先处理原因,再手动重试。
自动化的**仅运行**模式不会自动重试,以免和下一次计划执行重叠。**创建任务**模式产生的是普通任务运行,基础设施故障仍按上面的规则重试。两种模式都可以在自动化运行历史中查看最终结果。
@@ -87,9 +94,10 @@ import { Callout } from "fumadocs-ui/components/callout";
## 失败原因参考
-执行日志和用量统计中常见的失败原因分两类:不带前缀的原因码由平台记录;`agent_error.*` 由 AI 编程工具的报错归类而来。
+执行日志和[统计](/analytics#错误页签)里的失败原因分两类:不带前缀的原因码由平台记录,`agent_error.*` 由 AI 编程工具的报错归类而来。
-**平台侧**
+<Tabs items={["平台侧", "工具侧(agent_error.*)"]}>
+<Tab value="平台侧" id="platform-reasons">
| 原因 | 含义 | 处理 |
| --- | --- | --- |
@@ -104,7 +112,10 @@ import { Callout } from "fumadocs-ui/components/callout";
| `api_invalid_request` | 平台 API 拒绝了非法请求 | 重试;反复出现时报告问题 |
| `codex_semantic_inactivity` | Codex 长时间无有效输出被判停滞 | 重试,或调整 Codex 停滞超时 |
-**工具侧(`agent_error.*`,前缀省略)**
+</Tab>
+<Tab value="工具侧(agent_error.*)" id="agent-error-reasons">
+
+表中省略了 `agent_error.` 前缀。
| 原因 | 含义 | 处理 |
| --- | --- | --- |
@@ -123,11 +134,14 @@ import { Callout } from "fumadocs-ui/components/callout";
| `agent_timeout` | 工具长时间无响应被终止 | 重试或缩小任务范围 |
| `unknown` | 未能归类的失败 | 查看执行日志中的原始报错 |
+</Tab>
+</Tabs>
+
## 手动重试
在执行日志中点击某一行的重试按钮,会再次调用**当时负责这次运行的智能体**。即使任务后来换了负责人,也不会改用新负责人。
-重试会尽量保留上一次已经写入本地目录的文件。如果原会话仍然安全,并且由同一个运行时领取,也会继续之前的会话。上下文溢出或无效请求等会污染会话的错误,则会在原工作目录上开启新会话。原目录已经不存在时,会改用新的工作目录。
+重试会尽量保留上一次已经写入本地目录的文件。原会话仍然安全、又由同一个运行时领取时,会接着之前的会话继续。上下文溢出、无效请求这类会污染会话的错误,会在原工作目录上开新会话;原目录已经不存在时,改用新的工作目录。
也可以通过 CLI 重新运行当前任务:
@@ -135,17 +149,15 @@ import { Callout } from "fumadocs-ui/components/callout";
multica issue rerun <issue-id>
```
-这种方式没有指定某一条历史运行,因此会使用任务当前的智能体负责人,并从新的会话和工作目录开始。
+这条命令没有指定哪一条历史运行,所以会交给任务当前的智能体负责人,从新的会话和工作目录开始。
## 运行完成与任务完成
-`completed` 只表示这一次运行正常结束,不代表任务的目标已经得到确认。你仍然可以检查结果、继续讨论、补充要求或再次触发智能体。
-
-任务是否完成,以实际工作进展和它的状态为准。
+`completed` 只表示这一次运行正常结束,不代表任务的目标已经确认达成。运行结束后,仍然可以检查结果、继续讨论、补充要求或再次触发智能体;任务是否完成,看它的状态。
## 状态与超时速查
-以下数字对应服务器的默认配置,供排查时快速对照。
+以下数字是服务器的默认配置。
| 状态 | 含义 | 超时与后果 |
| --- | --- | --- |
@@ -153,7 +165,7 @@ multica issue rerun <issue-id>
| `queued` | 等待运行时领取 | 只要运行时还在心跳就一直等待,并且无论如何都会在入队后至少保留一个重连宽限期;两个窗口都过去才会失败,且不会自动重试 |
| `dispatched` | 运行时已领取,正在启动工具 | 停留超过 **5 分钟**按失败处理 |
| `waiting_local_directory` | 等待本地目录锁释放 | 没有独立超时;目录释放后回到启动流程 |
-| `running` | AI 编程工具正在执行 | 不设固定时长上限;以运行时心跳判定存活,心跳每 15 秒一次,失去心跳的运行时最迟约 3 分钟被判为离线,其上的运行随之失败 |
+| `running` | AI 编程工具正在执行 | 不设固定时长上限;以运行时心跳判定存活,心跳每 15 秒一次,失去心跳的运行时最迟约 3 分钟被判为离线。其上的运行要等心跳缺席超过重连宽限期(`MULTICA_RUNTIME_RECONNECT_GRACE`,默认 3 小时)才失败;守护进程重启时,会直接回收这些运行 |
自动重试只覆盖以下临时故障,且仅适用于挂在任务或对话上的运行(自动化**仅运行**模式除外):
diff --git a/apps/docs/content/docs/telegram-bot-integration.fr.mdx b/apps/docs/content/docs/telegram-bot-integration.fr.mdx
index 0a631db247..b5da2c5cb1 100644
--- a/apps/docs/content/docs/telegram-bot-integration.fr.mdx
+++ b/apps/docs/content/docs/telegram-bot-integration.fr.mdx
@@ -4,10 +4,14 @@ description: Connectez un agent Multica à votre propre bot Telegram pour les co
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Multica utilise un bot que vous créez avec [@BotFather](https://t.me/BotFather), l'outil officiel de Telegram. Un bot correspond à un agent Multica. Créez un bot distinct pour chaque agent qui a besoin de sa propre identité Telegram.
+<Callout type="info">
La prise en charge de Telegram est [maintenue par la communauté](/community-maintained) : elle est incluse dans chaque version, mais sans SLA de support officiel. Signalez les problèmes dans les [issues GitHub](https://github.com/multica-ai/multica/issues).
+</Callout>
## Avant de commencer
@@ -15,18 +19,26 @@ La prise en charge de Telegram est [maintenue par la communauté](/community-mai
- Le serveur API doit pouvoir joindre `https://api.telegram.org`.
- Vous avez besoin du jeton de bot délivré par @BotFather. Traitez-le comme un mot de passe.
-## 1. Créer le bot
+## Connecter le bot
+
+<Steps>
+<Step>
+
+### Créer le bot [#1-créer-le-bot]
1. Ouvrez [@BotFather](https://t.me/BotFather) et envoyez `/newbot`.
2. Choisissez un nom d'affichage et un nom d'utilisateur se terminant par `bot`.
3. Copiez le jeton de l'API HTTP.
-4. Laissez **Group Privacy** activé pour la configuration par défaut, à visibilité minimale : dans les groupes, Telegram ne transmet alors au bot que les commandes, les @mentions explicites et les réponses à ses messages. Le désactiver est facultatif. Cela permet au bot d'inclure la conversation de groupe environnante comme contexte, avec pour contrepartie qu'il reçoit alors tous les messages du groupe — voir [Groupes et sujets de forum](#groupes-et-sujets-de-forum).
+4. Laissez **Group Privacy** activé pour la configuration par défaut, à visibilité minimale : dans les groupes, Telegram ne transmet alors au bot que les commandes, les @mentions explicites et les réponses à ses messages. Vous pouvez le désactiver pour que le bot inclue la conversation de groupe environnante comme contexte, avec pour contrepartie qu'il reçoit alors tous les messages du groupe ; voir [Group Privacy détermine ce que voit le bot](#group-privacy).
<Callout type="warning">
Ne collez jamais le jeton dans une tâche, un message de discussion, un journal ou un dépôt de code source. S'il est exposé, révoquez-le avec @BotFather, puis reconnectez le bot avec le nouveau jeton.
</Callout>
-## 2. Le connecter à un agent
+</Step>
+<Step>
+
+### Le connecter à un agent [#2-le-connecter-à-un-agent]
1. Dans Multica, ouvrez **Agents**, sélectionnez un agent et ouvrez **Intégrations**.
2. Cliquez sur **Connecter Telegram**.
@@ -34,7 +46,10 @@ Ne collez jamais le jeton dans une tâche, un message de discussion, un journal
Multica appelle Telegram pour vérifier le bot, s'assure qu'aucun webhook sortant n'entre en conflit avec le long polling, chiffre le jeton et démarre une connexion `getUpdates` supervisée. Un bot déjà connecté à un autre agent ou espace de travail doit d'abord y être déconnecté.
-## Première utilisation et association de compte
+</Step>
+</Steps>
+
+## Première utilisation [#première-utilisation-et-association-de-compte]
La première fois qu'un membre écrit au bot, celui-ci lui envoie un lien d'association de compte Multica à usage unique. Ouvrez-le, connectez-vous au même espace de travail Multica, puis revenez dans Telegram et renvoyez le message. Le lien expire au bout de 15 minutes ; écrivez de nouveau au bot pour obtenir un nouveau lien.
@@ -42,7 +57,7 @@ Dans un groupe, le bot ne publie jamais publiquement ce lien, qui donne accès
Seuls les membres actuels de l'espace de travail peuvent utiliser le bot. L'appartenance est revérifiée à chaque message.
-## Utiliser le bot
+## Confier du travail à l'agent dans Telegram [#utiliser-le-bot]
### Conversations privées
@@ -50,7 +65,31 @@ Ouvrez le bot et envoyez-lui directement du texte. Aucune @mention n'est nécess
### Groupes et sujets de forum
-Ajoutez le bot à un groupe, puis @mentionnez-le ou répondez directement à l'un de ses messages. Les messages acceptés restent dans la conversation Multica qui se poursuit. Un message de groupe qui ne s'adresse pas au bot ne démarre jamais, à lui seul, une conversation ni un tour. Il est toutefois conservé dans une petite mémoire tampon : les 10 derniers messages reçus par le bot pour chaque groupe (ou chaque sujet de forum), effacés à chaque redémarrage du serveur. Lorsqu'un membre s'adresse ensuite au bot — par une @mention ou en répondant à l'un de ses messages —, ces messages en mémoire tampon sont ajoutés en tête de ce tour comme contexte en lecture seule, et enregistrés avec le tour dans la conversation. Une photo ou un fichier en mémoire tampon n'y apparaît que sous forme de marqueur, tel que `[Image]`, suivi de sa légende ; le fichier lui-même n'est pas récupéré. `/new` démarre une nouvelle discussion sans ce contexte. Ce qui arrive dans la mémoire tampon dépend de ce que Telegram transmet : avec Group Privacy activé, il s'agit uniquement des commandes, des @mentions explicites et des réponses au bot ; le contexte ne contient donc que des messages qui lui étaient déjà adressés. Pour inclure les échanges ordinaires du groupe, désactivez Group Privacy dans @BotFather, puis retirez le bot du groupe et ajoutez-le de nouveau ; il reçoit dès lors tous les messages du groupe. Un bot administrateur du groupe reçoit tous les messages quel que soit le réglage de confidentialité : son contexte inclut donc les échanges ordinaires sans aucune modification dans @BotFather. Lorsque vous répondez au message d'une autre personne, @mentionnez explicitement le bot : c'est seulement dans ce cas que l'expéditeur et le texte (ou la légende) cités sont inclus avec votre instruction. Lorsqu'une réponse adressée au bot cite un message contenant une photo ou un fichier, ce fichier est joint lui aussi, quel qu'en soit l'expéditeur. Répondre au message d'une personne sans mentionner le bot ne le déclenche pas. Chaque groupe ordinaire a sa propre discussion Multica continue ; les sujets de forum sont isolés dans des discussions distinctes.
+Ajoutez le bot à un groupe, puis @mentionnez-le ou répondez directement à l'un de ses messages. Les messages acceptés restent dans la conversation Multica qui se poursuit : chaque groupe ordinaire a sa propre discussion, et les sujets de forum sont isolés dans des discussions distinctes.
+
+<Accordions type="multiple">
+<Accordion title="Messages de groupe qui ne s'adressent pas au bot" id="unaddressed-group-messages">
+
+Un message de groupe qui ne s'adresse pas au bot ne démarre jamais, à lui seul, une conversation ni un tour. Il est toutefois conservé dans une petite mémoire tampon : les 10 derniers messages reçus par le bot pour chaque groupe (ou chaque sujet de forum), effacés à chaque redémarrage du serveur. Lorsqu'un membre s'adresse ensuite au bot, par une @mention ou en répondant à l'un de ses messages, ces messages sont ajoutés en tête de ce tour comme contexte en lecture seule, et enregistrés avec le tour dans la conversation.
+
+Une photo ou un fichier en mémoire tampon n'y apparaît que sous forme de marqueur, tel que `[Image]`, suivi de sa légende ; le fichier lui-même n'est pas récupéré. `/new` démarre une nouvelle discussion sans ce contexte.
+
+</Accordion>
+<Accordion title="Group Privacy détermine ce que voit le bot" id="group-privacy">
+
+Ce qui arrive dans la mémoire tampon dépend de ce que Telegram transmet. Avec Group Privacy activé, il s'agit uniquement des commandes, des @mentions explicites et des réponses au bot ; le contexte ne contient donc que des messages qui lui étaient déjà adressés.
+
+Pour inclure les échanges ordinaires du groupe, désactivez Group Privacy dans @BotFather, puis retirez le bot du groupe et ajoutez-le de nouveau ; il reçoit dès lors tous les messages du groupe. Un bot administrateur du groupe reçoit tous les messages quel que soit le réglage de confidentialité : son contexte inclut donc les échanges ordinaires sans aucune modification dans @BotFather.
+
+</Accordion>
+<Accordion title="Répondre à d'autres membres" id="replying-to-members">
+
+Lorsque vous répondez au message d'une autre personne, @mentionnez explicitement le bot : c'est seulement dans ce cas que l'expéditeur et le texte (ou la légende) cités sont inclus avec votre instruction. Répondre au message d'une personne sans mentionner le bot ne le déclenche pas.
+
+Lorsqu'une réponse adressée au bot cite un message contenant une photo ou un fichier, ce fichier est joint lui aussi, quel qu'en soit l'expéditeur.
+
+</Accordion>
+</Accordions>
### Commandes
@@ -61,9 +100,28 @@ Ajoutez le bot à un groupe, puis @mentionnez-le ou répondez directement à l'u
### Réponses et contenus pris en charge
-Le bot diffuse le texte en continu en publiant puis en modifiant un message Telegram, cite le message déclencheur, respecte les sujets de forum et découpe les longues réponses pour rester sous la limite de taille des messages Telegram. Les réponses finales sont livrées de façon asynchrone par une file d'attente interne au processus. Normalement, le backoff d'une conversation n'occupe pas de worker ; si la pression sur le cache compacte l'état exact du backoff, d'autres conversations de la même installation du bot peuvent être retardées par précaution. La file d'attente finale a une capacité fixe : les dépassements sont rejetés et journalisés, et les réponses en file ne sont pas récupérées après un redémarrage du service.
+Le bot diffuse le texte en continu en publiant puis en modifiant un message Telegram, cite le message déclencheur, respecte les sujets de forum et découpe les longues réponses pour rester sous la limite de taille des messages Telegram.
+
+Les photos, fichiers, vidéos, messages vocaux et audio parviennent à l'agent sous forme de pièces jointes dans la même conversation, la légende servant de texte du message ; les fichiers produits par l'agent sont renvoyés dans la conversation après sa réponse. Dans les deux sens, le serveur doit disposer d'un stockage objet (voir la section Configuration en auto-hébergement ci-dessous).
+
+<Accordions type="multiple">
+<Accordion title="Livraison et file d'attente des réponses finales" id="reply-delivery">
+
+Les réponses finales sont livrées de façon asynchrone par une file d'attente interne au processus. Normalement, le backoff d'une conversation n'occupe pas de worker ; si la pression sur le cache compacte l'état exact du backoff, d'autres conversations de la même installation du bot peuvent être retardées par précaution. La file d'attente finale a une capacité fixe : les dépassements sont rejetés et journalisés, et les réponses en file ne sont pas récupérées après un redémarrage du service.
+
+</Accordion>
+<Accordion title="Photos, fichiers et autres médias" id="media">
+
+Répondre à un message contenant une photo, un fichier, une vidéo, un message vocal ou un audio (dans une conversation privée ou, en s'adressant au bot, dans un groupe, quel qu'en soit l'expéditeur) cite ce message avant votre instruction et joint son fichier, ce qui permet de désigner à l'agent une photo ou une vidéo antérieure.
+
+Telegram ne permet à un bot de télécharger que des fichiers de 20 Mo au maximum. Lorsqu'un fichier ne peut pas être récupéré (trop volumineux, ou échec du téléchargement), le bot vous le signale et l'agent ne voit qu'un espace réservé.
+
+Les fichiers produits par l'agent sont renvoyés sous forme de messages distincts : les photos jusqu'à 10 Mo s'affichent directement, tout le reste arrive sous forme de fichier, jusqu'à 50 Mo. Si la livraison d'un fichier ne peut pas être confirmée, le bot le signale et le fichier reste joint à la réponse dans Multica.
+
+Sans stockage objet, le bot répond aux médias en indiquant qu'ils ne sont pas pris en charge, et l'agent est informé qu'il ne peut pas envoyer de fichiers. Les stickers, positions, sondages et autres messages qui ne sont pas des fichiers reçoivent la même réponse dans les conversations privées et lorsqu'ils sont adressés au bot dans un groupe ; dans un groupe, ceux qui ne lui sont pas adressés restent sans réponse.
-Les photos, fichiers, vidéos, messages vocaux et audio parviennent à l'agent sous forme de pièces jointes dans la même conversation, la légende servant de texte du message. Répondre à un message qui en contient un — dans une conversation privée ou, en s'adressant au bot, dans un groupe, quel qu'en soit l'expéditeur — cite ce message avant votre instruction et joint son fichier, ce qui permet de désigner à l'agent une photo ou une vidéo antérieure. Telegram ne permet à un bot de télécharger que des fichiers de 20 Mo au maximum ; lorsqu'un fichier ne peut pas être récupéré (trop volumineux, ou échec du téléchargement), le bot vous le signale et l'agent ne voit qu'un espace réservé. Les fichiers produits par l'agent sont renvoyés dans la conversation sous forme de messages distincts, après sa réponse : les photos jusqu'à 10 Mo s'affichent directement, tout le reste arrive sous forme de fichier, jusqu'à 50 Mo ; si la livraison d'un fichier ne peut pas être confirmée, le bot le signale et le fichier reste joint à la réponse dans Multica. Dans les deux sens, le serveur doit disposer d'un stockage des pièces jointes (voir la section Configuration en auto-hébergement ci-dessous) ; sans cela, le bot répond aux médias en indiquant qu'ils ne sont pas pris en charge, et l'agent est informé qu'il ne peut pas envoyer de fichiers. Les stickers, positions, sondages et autres messages qui ne sont pas des fichiers reçoivent la même réponse dans les conversations privées et lorsqu'ils sont adressés au bot dans un groupe ; dans un groupe, ceux qui ne lui sont pas adressés restent sans réponse.
+</Accordion>
+</Accordions>
## Gérer les connexions
diff --git a/apps/docs/content/docs/telegram-bot-integration.ja.mdx b/apps/docs/content/docs/telegram-bot-integration.ja.mdx
index c8441b428f..127f521c74 100644
--- a/apps/docs/content/docs/telegram-bot-integration.ja.mdx
+++ b/apps/docs/content/docs/telegram-bot-integration.ja.mdx
@@ -4,10 +4,14 @@ description: 独自の Telegram Bot を Multica エージェントに接続し
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
-Multica は Telegram 公式の [@BotFather](https://t.me/BotFather) で作成した Bot を使用します。1 つの Bot は 1 つの Multica エージェントに対応します。
+Multica は Telegram 公式の [@BotFather](https://t.me/BotFather) で作成した Bot を使用します。1 つの Bot は 1 つの Multica エージェントに対応します。Telegram 上で別々の Bot として振る舞わせたいエージェントには、それぞれ Bot を作成してください。
+<Callout type="info">
Telegram 連携は[コミュニティメンテナンス](/community-maintained)です。毎リリースに同梱されますが、公式のサポート SLA は付きません。問題があれば [GitHub issues](https://github.com/multica-ai/multica/issues) に報告してください。
+</Callout>
## 準備
@@ -15,66 +19,137 @@ Telegram 連携は[コミュニティメンテナンス](/community-maintained)
- API サーバーから `https://api.telegram.org` に接続できる必要があります。
- @BotFather が発行した Bot token が必要です。パスワードと同様に扱ってください。
-## 1. Bot を作成する
+## Bot を接続する
+
+<Steps>
+<Step>
+
+### Bot を作成する [#1-bot-を作成する]
1. [@BotFather](https://t.me/BotFather) を開き、`/newbot` を送信します。
2. 表示名と、`bot` で終わる username を設定します。
3. HTTP API token をコピーします。
-4. 既定では **Group Privacy** を有効のままにします。これが可視範囲を最小にする構成で、Telegram はコマンド、明示的な @mention、Bot への返信だけを Bot に配信します。無効化は任意です。無効にすると Bot は周囲のグループ会話をコンテキストとして扱えるようになりますが、その代わりグループの全メッセージを受信します。詳細は「グループ」の項を参照してください。
+4. 既定では **Group Privacy** を有効のままにします。これが可視範囲を最小にする構成で、Telegram はコマンド、明示的な @メンション、Bot への返信だけを Bot に配信します。無効にすると Bot は周囲のグループ会話をコンテキストとして扱えるようになりますが、その代わりグループの全メッセージを受信します。詳しくは[Group Privacy で Bot に届くメッセージが決まる](#group-privacy)を参照してください。
<Callout type="warning">
-token を issue、チャット、ログ、リポジトリに記録しないでください。漏えいした場合は @BotFather で失効させ、新しい token で再接続します。
+token をタスク、チャット、ログ、リポジトリに記録しないでください。漏えいした場合は @BotFather で失効させ、新しい token で再接続します。
</Callout>
-## 2. エージェントに接続する
+</Step>
+<Step>
+
+### エージェントに接続する [#2-エージェントに接続する]
-1. Multica の **Agents** で対象エージェントを開き、**Integrations** を選びます。
-2. **Connect Telegram** をクリックします。
-3. Bot token を貼り付け、**Connect** をクリックします。
+1. Multica の **エージェント**で対象エージェントを開き、**連携**を選びます。
+2. **Telegram に接続**をクリックします。
+3. Bot token を貼り付け、**接続**をクリックします。
Multica は Telegram で Bot を検証し、long polling と競合する webhook がないことを確認して token を暗号化保存し、監視された `getUpdates` 接続を開始します。他のエージェントやワークスペースに接続済みの Bot は、先に元の接続を解除してください。
-## 初回利用とアカウント連携
+</Step>
+</Steps>
+
+## 初回利用 [#初回利用とアカウント連携]
+
+メンバーが初めて Bot にメッセージを送ると、1 回だけ使える Multica アカウント連携リンクが届きます。同じワークスペースの Multica アカウントでサインインし、Telegram に戻ってメッセージを再送してください。リンクは 15 分で期限切れになります。期限が切れたら、もう一度 Bot に DM を送ると新しいリンクが届きます。
+
+グループには認証情報にあたる連携リンクを公開しません。Bot は送信者に、先に DM を開始するよう案内します。
+
+利用できるのは現在のワークスペースメンバーだけです。メンバー資格はメッセージごとに再確認されます。
+
+## Telegram から仕事を依頼する [#bot-を使う]
+
+### DM
+
+Bot を開き、そのままテキストを送信します。@メンションは不要です。
+
+### グループと forum topic
+
+Bot をグループに追加し、@メンションするか Bot のメッセージに直接返信します。受理されたメッセージは継続中の Multica 会話に残ります。通常のグループはそれぞれ 1 つの会話を継続し、forum topic は topic ごとに分離されます。
+
+<Accordions type="multiple">
+<Accordion title="Bot 宛てでないグループメッセージ" id="unaddressed-group-messages">
+
+Bot 宛てでないグループメッセージは、それ自体で会話やターンを開始することはありません。ただし小さなメモリ上のバッファに保持されます。グループ(または forum topic)ごとに Bot が受信した直近 10 件で、サーバーの再起動で消えます。その後メンバーが @メンションまたは Bot のメッセージへの返信で Bot に指示すると、バッファ内のメッセージが読み取り専用のコンテキストとしてそのターンの前に添えられ、ターンと一緒に会話として保存されます。
+
+バッファ内の画像やファイルは、コンテキストでは `[Image]` のようなマーカーと caption だけで示され、ファイル自体は取得されません。`/new` で始めた新しい会話にはこのコンテキストは付きません。
-メンバーが初めて Bot にメッセージを送ると、1 回だけ使える Multica アカウント連携リンクが届きます。同じワークスペースの Multica アカウントでサインインし、Telegram に戻ってメッセージを再送してください。リンクは 15 分で期限切れになります。
+</Accordion>
+<Accordion title="Group Privacy で Bot に届くメッセージが決まる" id="group-privacy">
-グループには bearer link を公開しません。Bot は送信者に、先に DM を開始するよう案内します。利用できるのは現在のワークスペースメンバーだけです。
+バッファに入る内容は Telegram が何を配信するかで決まります。Group Privacy が有効ならコマンド、明示的な @メンション、Bot への返信だけなので、コンテキストには以前 Bot 宛てだったメッセージだけが入ります。
-## Bot を使う
+通常の会話も含めたい場合は @BotFather で Group Privacy を無効にし、Bot をグループから外して再追加してください。以後 Bot はグループの全メッセージを受信します。グループ管理者になっている Bot はプライバシー設定に関係なく全メッセージを受信するため、@BotFather を変更しなくても通常の会話がコンテキストに含まれます。
-- **DM**: @mention なしでテキストを送信します。
-- **グループ**: Bot を追加し、@mention するか Bot のメッセージに直接返信します。受理されたメッセージは継続中の Multica 会話に残ります。Bot 宛てでないグループメッセージは、それ自体で会話やターンを開始することはありません。ただし小さなメモリ上のバッファに保持されます。グループ(または forum topic)ごとに Bot が受信した直近 10 件で、サーバーの再起動で消えます。その後メンバーが @mention または Bot のメッセージへの返信で Bot に指示すると、バッファ内のメッセージが読み取り専用のコンテキストとしてそのターンの前に添えられ、ターンと一緒に会話として保存されます。バッファ内の画像やファイルは、コンテキストでは `[Image]` のようなマーカーと caption だけで示され、ファイル自体は取得されません。`/new` で始めた新しい会話にはこのコンテキストは付きません。バッファに入る内容は Telegram が何を配信するかで決まります。Group Privacy が有効ならコマンド、明示的な @mention、Bot への返信だけなので、コンテキストには以前 Bot 宛てだったメッセージだけが入ります。通常の会話も含めたい場合は @BotFather で Group Privacy を無効にし、Bot をグループから外して再追加してください。以後 Bot はグループの全メッセージを受信します。グループ管理者になっている Bot はプライバシー設定に関係なく全メッセージを受信するため、@BotFather を変更しなくても通常の会話がコンテキストに含まれます。他のメンバーのメッセージへ返信する場合は Bot も明示的に @mention してください。その場合に限り、引用元の送信者とテキスト(または caption)が新しい指示の文脈に含まれます。Bot 宛ての返信が引用するメッセージに画像やファイルが含まれていれば、送信者が誰であれそのファイルも一緒に添付されます。@mention なしの人への返信は Bot を起動しません。forum topic は topic ごとにセッションが分離されます。
-- **`/new` / `/new <message>`**: 空の新しい Multica Chat を作成し、その Telegram 会話の後続メッセージを新しい Chat にルーティングします。メッセージを付けた場合は新しい Chat の最初のターンになります。他のメンバーへの返信で Bot を明示的に @mention した場合、選択した引用内容も最初のターンに含まれます。
-- **`/clear` / `/clear <message>`**: 現在の Multica Chat を維持したまま、次の空でないメッセージに新しいエージェント可視コンテキストを適用します。メッセージを付けた場合は境界後の最初のターンになり、明示的に選択した返信の引用も保持されます。
-- **`/issue <title>`**: Multica issue を作成します。2 行目以降は任意の説明です。`/issue@your_bot` 形式も利用できます。
+</Accordion>
+<Accordion title="他のメンバーのメッセージに返信する" id="replying-to-members">
-Bot は Telegram メッセージを送信・編集してテキストをストリーミング表示し、元メッセージを引用して forum topic を維持します。長い返信は自動分割されます。最終返信はプロセス内で非同期に配信されます。通常、あるチャットのバックオフ待機は worker を占有しません。キャッシュが上限に達してバックオフ状態が圧縮されると、同じ Bot installation の他のチャットも安全側に遅延する場合があります。終端キューの容量は固定で、上限超過は明示的に拒否されてエラーとして記録されます。キューはサービス再起動後に復元されません。
+他のメンバーのメッセージへ返信する場合は、Bot も明示的に @メンションしてください。その場合に限り、引用元の送信者とテキスト(または caption)が新しい指示と一緒に渡されます。@メンションなしで人に返信しても Bot は起動しません。
-画像、ファイル、動画、音声メッセージは、キャプションをメッセージ本文として、同じ会話の添付ファイルとしてエージェントに届きます。これらを含むメッセージに返信すると(DM でも、グループで Bot に指示する場合でも、送信者が誰でも)、そのメッセージが引用として指示の前に添えられ、ファイルもエージェントに渡されます。以前の画像や動画を指し示したいときに使えます。Telegram の Bot がダウンロードできるのは 20 MB までで、取得できなかった場合(大きすぎる、またはダウンロード失敗)は Bot がその旨を伝え、エージェントにはプレースホルダーだけが見えます。エージェントが生成したファイルは返信の後に別メッセージとして送り返されます。10 MB までの画像はインライン表示、それ以外は 50 MB までファイルとして届きます。送達を確認できなかった場合は Bot がその旨を伝え、ファイルは Multica の返信に添付されたまま残ります。どちらの方向もサーバー側にオブジェクトストレージが必要です。未設定の場合、Bot はメディアに非対応通知を返し、エージェントにはファイルを送れない旨が伝えられます。sticker、位置情報、投票などファイル以外のメッセージは、DM または Bot 宛てのグループメッセージで同じ通知を返します。
+Bot 宛ての返信が引用するメッセージに画像やファイルが含まれていれば、送信者が誰であれそのファイルも一緒に添付されます。
-## 管理とセルフホスティング
+</Accordion>
+</Accordions>
-**設定 → メッセージング → Telegram** で接続済み Bot を確認できます。owner と admin は接続を解除できます。会話と監査履歴は保持されます。
+### コマンド
-セルフホスト環境では、API 起動前に固定の 32-byte 暗号鍵を設定します。
+- `/new` は空の新しい Multica Chat を作成し、その Telegram 会話の後続メッセージを新しい Chat にルーティングします。`/new <メッセージ>` では、そのメッセージが新しい Chat の最初のターンになります。他のメンバーへの返信で Bot を明示的に @メンションした場合、選択した引用内容も最初のターンに含まれます。
+- `/clear` は現在の Multica Chat を維持したまま、次の空でないメッセージに新しいエージェント可視コンテキストを適用します。`/clear <メッセージ>` では、そのメッセージが境界後の最初のターンになり、明示的に選択した返信の引用も保持されます。
+- `/issue <タイトル>` は Multica のタスクを作成します。2 行目以降は任意の説明です。タイトルがない場合は使い方を返します。
+- グループでは `/issue@your_bot` のような Telegram のコマンドサフィックスも利用できます。
+
+### 返信と対応する内容
+
+Bot は Telegram メッセージを送信・編集してテキストをストリーミング表示し、元メッセージを引用して forum topic を維持します。長い返信は Telegram の文字数制限に合わせて自動分割されます。
+
+画像、ファイル、動画、ボイス、音声メッセージは、キャプションをメッセージ本文として、同じ会話の添付ファイルとしてエージェントに届きます。エージェントが生成したファイルは返信の後にチャットへ送り返されます。どちらの方向もサーバー側にオブジェクトストレージが必要です(後述のセルフホスト設定を参照)。
+
+<Accordions type="multiple">
+<Accordion title="最終返信の配信とキュー" id="reply-delivery">
+
+最終返信はプロセス内で非同期に配信されます。通常、あるチャットのバックオフ待機は worker を占有しません。キャッシュが上限に達してバックオフ状態が圧縮されると、同じ Bot installation の他のチャットも安全側に遅延する場合があります。終端キューの容量は固定で、上限超過は明示的に拒否されてエラーとして記録されます。キューはサービス再起動後に復元されません。
+
+</Accordion>
+<Accordion title="画像、ファイル、その他のメディア" id="media">
+
+画像、ファイル、動画、ボイス、音声を含むメッセージに返信すると(DM でも、グループで Bot に指示する場合でも、送信者が誰でも)、そのメッセージが引用として指示の前に添えられ、ファイルもエージェントに渡されます。以前の画像や動画を指し示したいときに使えます。
+
+Telegram の Bot がダウンロードできるのは 20 MB までです。取得できなかった場合(大きすぎる、またはダウンロード失敗)は Bot がその旨を伝え、エージェントにはプレースホルダーだけが見えます。
+
+エージェントが生成したファイルは別メッセージとして送り返されます。10 MB までの画像はインライン表示、それ以外は 50 MB までファイルとして届きます。送達を確認できなかった場合は Bot がその旨を伝え、ファイルは Multica の返信に添付されたまま残ります。
+
+オブジェクトストレージが未設定の場合、Bot はメディアに非対応通知を返し、エージェントにはファイルを送れない旨が伝えられます。sticker、位置情報、投票などファイル以外のメッセージは、DM と、グループで Bot を明示的に @メンションした場合に同じ通知を返します。グループで Bot 宛てでないものには応答しません。
+
+</Accordion>
+</Accordions>
+
+## 接続を管理する
+
+**設定 → メッセージング → Telegram** で接続済み Bot を確認できます。owner と admin は接続を解除できます。解除すると long polling とその後の返信は止まりますが、Multica の会話と監査履歴は保持されます。
+
+## セルフホスト設定 [#管理とセルフホスティング]
+
+API サーバーを起動する前に、長期間変えない 32 バイトの暗号鍵を設定します。
```dotenv
MULTICA_TELEGRAM_SECRET_KEY=<base64-encoded 32-byte key>
```
-`openssl rand -base64 32` で生成できます。連携リンクは `MULTICA_APP_URL`(未設定時は `FRONTEND_ORIGIN`)を使用します。サーバーから `api.telegram.org` への HTTPS 接続も必要で、標準の `HTTPS_PROXY` / `NO_PROXY` を利用できます。
+`openssl rand -base64 32` で生成できます。この鍵を紛失またはローテーションすると既存の Bot token を復号できなくなり、Bot ごとに再接続が必要です。
+
+連携リンクは `MULTICA_APP_URL`(未設定時は `FRONTEND_ORIGIN`)を使用します。生成されるアドレスはメンバーがアクセスできる必要があります。サーバーのネットワークまたは proxy は `api.telegram.org` への HTTPS 接続を許可している必要があり、Go は標準の `HTTPS_PROXY` / `NO_PROXY` 環境変数を読み取ります。
-## トラブルシューティング
+## よくある問題 [#トラブルシューティング]
-- **Bot を検証できない**: まずサーバーのネットワークと proxy を確認します。Telegram が token を拒否した場合だけ再発行します。
-- **webhook conflict**: 接続前に既存 webhook を削除します。
-- **409 polling conflict**: 同じ Bot を polling している別プロセスを停止するか、環境ごとに Bot を分けます。
-- **グループで返信しない**: Bot が参加していて、@mention または Bot への返信になっていることを確認します。
+- **Bot を検証できない**: まずサーバーのネットワークと proxy を確認します。Telegram が token を明示的に拒否した場合だけ再発行します。
+- **webhook conflict**: 接続前にこの Bot の既存 webhook を削除します。Telegram では webhook と `getUpdates` を同時に使えません。
+- **409 polling conflict**: 別の Multica インスタンスやプロセスが同じ Bot を polling しています。そちらを停止するか、環境ごとに Bot を分けます。
+- **グループで返信しない**: Bot がグループに参加していて、メッセージが @メンションまたは Bot への返信になっていることを確認します。
- **連携リンクが期限切れ**: Bot に新しい DM を送り、最新リンクを使用します。
-- **実行されない**: エージェントの archive 状態と[ランタイム](/daemon-runtimes)を確認します。
+- **実行されない**: エージェントがアーカイブされていないか、使用している[ランタイム](/daemon-runtimes)がオンラインかを確認します。
## 次のステップ
-- [チャット連携](/channels)
-- [チャット](/chat)
-- [Issues](/issues)
+- [チャット連携](/channels) — プラットフォームの比較、セッションとアカウント連携の仕組み
+- [チャット](/chat) — Bot のメッセージがエージェントの実行になるまで
+- [タスク](/issues) — `/issue` で作成される作業単位
diff --git a/apps/docs/content/docs/telegram-bot-integration.ko.mdx b/apps/docs/content/docs/telegram-bot-integration.ko.mdx
index 51e9cbdc24..f406c3e2b9 100644
--- a/apps/docs/content/docs/telegram-bot-integration.ko.mdx
+++ b/apps/docs/content/docs/telegram-bot-integration.ko.mdx
@@ -4,10 +4,14 @@ description: 직접 만든 Telegram Bot을 Multica 에이전트에 연결해 DM,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
-Multica는 Telegram 공식 [@BotFather](https://t.me/BotFather)에서 만든 Bot을 사용합니다. Bot 하나는 Multica 에이전트 하나에 연결됩니다.
+Multica는 Telegram 공식 [@BotFather](https://t.me/BotFather)에서 만든 Bot을 사용합니다. Bot 하나는 Multica 에이전트 하나에 연결됩니다. Telegram에서 각자 다른 Bot으로 보여야 하는 에이전트가 여럿이면 에이전트마다 Bot을 만드세요.
+<Callout type="info">
Telegram 연동은 [커뮤니티가 유지관리](/community-maintained)합니다. 매 릴리스에 포함되지만 공식 지원 SLA는 제공되지 않습니다. 문제가 있으면 [GitHub issues](https://github.com/multica-ai/multica/issues)에 보고해 주세요.
+</Callout>
## 시작하기 전에
@@ -15,66 +19,137 @@ Telegram 연동은 [커뮤니티가 유지관리](/community-maintained)합니
- API 서버에서 `https://api.telegram.org`에 접속할 수 있어야 합니다.
- @BotFather가 발급한 Bot token이 필요합니다. 비밀번호처럼 보호하세요.
-## 1. Bot 만들기
+## Bot 연결
+
+<Steps>
+<Step>
+
+### Bot 만들기 [#1-bot-만들기]
1. [@BotFather](https://t.me/BotFather)를 열고 `/newbot`을 보냅니다.
2. 표시 이름과 `bot`으로 끝나는 username을 정합니다.
3. HTTP API token을 복사합니다.
-4. 기본값으로 **Group Privacy**를 켜 둡니다. 가시 범위가 가장 좁은 구성으로, Telegram은 명령, 명시적 @mention, Bot 메시지에 대한 답장만 Bot에 전달합니다. 끄는 것은 선택 사항입니다. 끄면 Bot이 주변 그룹 대화를 컨텍스트로 활용할 수 있지만, 대신 그룹의 모든 메시지를 받게 됩니다. 자세한 내용은 「그룹」 항목을 참고하세요.
+4. 기본값으로 **Group Privacy**를 켜 둡니다. 가시 범위가 가장 좁은 구성으로, Telegram은 명령, 명시적 @멘션, Bot 메시지에 대한 답장만 Bot에 전달합니다. 끄면 Bot이 주변 그룹 대화를 컨텍스트로 활용할 수 있지만, 대신 그룹의 모든 메시지를 받게 됩니다. 자세한 내용은 [Group Privacy가 Bot이 받는 메시지를 결정합니다](#group-privacy)를 참고하세요.
<Callout type="warning">
-token을 issue, 채팅, 로그, 코드 저장소에 남기지 마세요. 노출되었다면 @BotFather에서 폐기하고 새 token으로 다시 연결하세요.
+token을 태스크, 채팅, 로그, 코드 저장소에 남기지 마세요. 노출되었다면 @BotFather에서 폐기하고 새 token으로 다시 연결하세요.
</Callout>
-## 2. 에이전트에 연결하기
+</Step>
+<Step>
+
+### 에이전트에 연결하기 [#2-에이전트에-연결하기]
-1. Multica의 **Agents**에서 에이전트를 선택하고 **Integrations**를 엽니다.
-2. **Connect Telegram**을 클릭합니다.
-3. Bot token을 붙여 넣고 **Connect**를 클릭합니다.
+1. Multica의 **에이전트**에서 에이전트를 선택하고 **연동**을 엽니다.
+2. **Telegram 연결**을 클릭합니다.
+3. Bot token을 붙여 넣고 **연결**을 클릭합니다.
Multica는 Telegram에서 Bot을 검증하고 long polling과 충돌하는 webhook이 없는지 확인한 뒤 token을 암호화해 저장하고 감독되는 `getUpdates` 연결을 시작합니다. 다른 에이전트나 워크스페이스에 연결된 Bot은 먼저 기존 연결을 해제해야 합니다.
-## 최초 사용과 계정 바인딩
+</Step>
+</Steps>
+
+## 처음 사용 [#최초-사용과-계정-바인딩]
+
+멤버가 처음 Bot에 메시지를 보내면 일회용 Multica 계정 연결 링크를 받습니다. 같은 워크스페이스의 Multica 계정으로 로그인한 뒤 Telegram으로 돌아가 메시지를 다시 보내세요. 링크는 15분 후 만료되며, Bot에 다시 DM을 보내면 새 링크를 받을 수 있습니다.
+
+그룹에는 자격 증명 역할을 하는 연결 링크를 공개하지 않습니다. Bot은 먼저 개인 채팅을 시작하라고 안내합니다.
+
+현재 워크스페이스 멤버만 Bot을 사용할 수 있으며, 메시지마다 멤버 자격을 다시 확인합니다.
+
+## Telegram에서 작업 요청 [#bot-사용하기]
+
+### 개인 채팅
+
+Bot을 열고 바로 텍스트를 보냅니다. @멘션은 필요 없습니다.
+
+### 그룹과 forum topic
+
+Bot을 그룹에 추가한 뒤 @멘션하거나 Bot 메시지에 직접 답장합니다. 수락된 메시지는 이어지는 Multica 대화에 남습니다. 일반 그룹은 각자 하나의 대화를 이어 가고, forum topic은 topic별로 분리됩니다.
+
+<Accordions type="multiple">
+<Accordion title="Bot에게 보내지 않은 그룹 메시지" id="unaddressed-group-messages">
+
+Bot을 지정하지 않은 그룹 메시지는 그 자체로 대화나 턴을 시작하지 않습니다. 다만 작은 메모리 버퍼에 보관됩니다. 그룹(또는 forum topic)별로 Bot이 받은 최근 10개이며, 서버가 재시작되면 지워집니다. 이후 구성원이 @멘션이나 Bot 메시지에 대한 답장으로 Bot에게 지시하면, 버퍼의 메시지가 읽기 전용 컨텍스트로 그 턴 앞에 붙고 턴과 함께 대화의 일부로 저장됩니다.
+
+버퍼에 있는 이미지나 파일은 컨텍스트에서 `[Image]` 같은 표시와 caption으로만 나타나며 파일 자체는 가져오지 않습니다. `/new`로 시작한 새 대화에는 이 컨텍스트가 붙지 않습니다.
-멤버가 처음 Bot에 메시지를 보내면 일회용 Multica 계정 바인딩 링크를 받습니다. 같은 워크스페이스의 Multica 계정으로 로그인한 뒤 Telegram으로 돌아가 메시지를 다시 보내세요. 링크는 15분 후 만료됩니다.
+</Accordion>
+<Accordion title="Group Privacy가 Bot이 받는 메시지를 결정합니다" id="group-privacy">
-그룹에는 bearer link를 공개하지 않습니다. Bot은 먼저 개인 채팅을 시작하라고 안내합니다. 현재 워크스페이스 멤버만 Bot을 사용할 수 있습니다.
+버퍼에 무엇이 들어가는지는 Telegram이 무엇을 전달하느냐에 달려 있습니다. Group Privacy가 켜져 있으면 명령, 명시적 @멘션, Bot에 대한 답장뿐이므로 컨텍스트에는 이전에 Bot에게 보낸 메시지만 남습니다.
-## Bot 사용하기
+일반 그룹 대화까지 포함하려면 @BotFather에서 Group Privacy를 끄고 Bot을 그룹에서 내보낸 뒤 다시 추가하세요. 그 뒤로 Bot은 그룹의 모든 메시지를 받습니다. 그룹 관리자인 Bot은 프라이버시 설정과 무관하게 모든 메시지를 받으므로, @BotFather를 바꾸지 않아도 일반 대화가 컨텍스트에 포함됩니다.
-- **개인 채팅**: @mention 없이 텍스트를 보냅니다.
-- **그룹**: Bot을 추가한 뒤 @mention하거나 Bot 메시지에 직접 답장합니다. 수락된 메시지는 이어지는 Multica 대화에 남습니다. Bot을 지정하지 않은 그룹 메시지는 그 자체로 대화나 턴을 시작하지 않습니다. 다만 작은 메모리 버퍼에 보관됩니다. 그룹(또는 forum topic)별로 Bot이 받은 최근 10개이며, 서버가 재시작되면 지워집니다. 이후 구성원이 @mention이나 Bot 메시지에 대한 답장으로 Bot에게 지시하면, 버퍼의 메시지가 읽기 전용 컨텍스트로 그 턴 앞에 붙고 턴과 함께 대화의 일부로 저장됩니다. 버퍼에 있는 이미지나 파일은 컨텍스트에서 `[Image]` 같은 표시와 caption으로만 나타나며 파일 자체는 가져오지 않습니다. `/new`로 시작한 새 대화에는 이 컨텍스트가 붙지 않습니다. 버퍼에 무엇이 들어가는지는 Telegram이 무엇을 전달하느냐에 달려 있습니다. Group Privacy가 켜져 있으면 명령, 명시적 @mention, Bot에 대한 답장뿐이므로 컨텍스트에는 이전에 Bot에게 보낸 메시지만 남습니다. 일반 그룹 대화까지 포함하려면 @BotFather에서 Group Privacy를 끄고 Bot을 그룹에서 내보낸 뒤 다시 추가하세요. 그 뒤로 Bot은 그룹의 모든 메시지를 받습니다. 그룹 관리자인 Bot은 프라이버시 설정과 무관하게 모든 메시지를 받으므로, @BotFather를 바꾸지 않아도 일반 대화가 컨텍스트에 포함됩니다. 다른 사람의 메시지에 답장할 때는 Bot도 명시적으로 @mention해야 하며, 이 경우에만 인용한 발신자와 텍스트(또는 caption)가 새 지시의 맥락에 포함됩니다. Bot에게 보낸 답장이 인용한 메시지에 이미지나 파일이 있으면, 보낸 사람이 누구든 그 파일도 함께 첨부됩니다. Bot @mention 없이 사람에게 답장하면 Bot이 실행되지 않습니다. forum topic은 topic별로 세션이 분리됩니다.
-- **`/new` / `/new <message>`**: 비어 있는 새 Multica Chat을 만들고 해당 Telegram 대화의 이후 메시지를 새 Chat으로 라우팅합니다. 메시지를 함께 보내면 새 Chat의 첫 번째 대화가 됩니다. 다른 멤버에게 답장하면서 Bot을 명시적으로 @mention하면 선택한 인용 내용도 첫 번째 대화에 포함됩니다.
-- **`/clear` / `/clear <message>`**: 현재 Multica Chat을 유지하면서 다음 비어 있지 않은 메시지에 새 에이전트 컨텍스트를 적용합니다. 메시지를 함께 보내면 경계 이후의 첫 번째 대화가 되며 명시적으로 선택한 답장 인용도 유지됩니다.
-- **`/issue <title>`**: Multica issue를 만듭니다. 다음 줄은 선택 설명으로 사용됩니다. `/issue@your_bot` 형식도 지원합니다.
+</Accordion>
+<Accordion title="다른 멤버의 메시지에 답장하기" id="replying-to-members">
-Bot은 Telegram 메시지를 보내고 편집해 텍스트 응답을 스트리밍하며, 원래 메시지를 인용하고 forum topic을 유지합니다. 긴 응답은 자동으로 나뉩니다. 최종 응답은 프로세스 내에서 비동기로 전달됩니다. 일반적으로 한 채팅의 백오프 대기는 worker를 점유하지 않습니다. 캐시가 용량 한계에 도달해 백오프 상태를 압축하면 같은 Bot installation의 다른 채팅도 안전을 위해 지연될 수 있습니다. 최종 응답 큐의 용량은 고정되어 있으며 한도를 넘은 작업은 명시적으로 거부되고 오류로 기록됩니다. 큐는 서비스 재시작 후 복구되지 않습니다.
+다른 사람의 메시지에 답장할 때는 Bot도 명시적으로 @멘션해야 하며, 이 경우에만 인용한 발신자와 텍스트(또는 caption)가 새 지시와 함께 전달됩니다. Bot @멘션 없이 사람에게 답장하면 Bot이 실행되지 않습니다.
-이미지, 파일, 영상, 음성 메시지는 caption을 메시지 본문으로 하여 같은 대화의 첨부파일로 에이전트에 전달됩니다. 이런 내용이 담긴 메시지에 답장하면(개인 채팅이든, 그룹에서 Bot에게 지시할 때든, 보낸 사람이 누구든) 그 메시지가 인용으로 지시 앞에 붙고 파일도 에이전트에 전달되므로 이전 이미지나 영상을 지정할 수 있습니다. Telegram Bot은 20 MB까지만 내려받을 수 있으며, 파일을 가져오지 못하면(너무 크거나 다운로드 실패) Bot이 알려 주고 에이전트에게는 자리표시자만 보입니다. 에이전트가 만든 파일은 응답 뒤에 별도 메시지로 채팅에 전송됩니다. 10 MB 이하 이미지는 인라인으로, 그 외에는 50 MB까지 파일로 도착합니다. 전달을 확인하지 못하면 Bot이 알려 주며 파일은 Multica의 응답에 첨부된 채로 남습니다. 두 방향 모두 서버에 객체 스토리지가 필요합니다. 설정이 없으면 Bot은 미디어에 미지원 안내를 회신하고 에이전트는 파일을 보낼 수 없다는 안내를 받습니다. sticker, 위치, 투표 등 파일이 아닌 메시지는 개인 채팅 또는 Bot에게 보낸 그룹 메시지에서 같은 안내를 반환합니다.
+Bot에게 보낸 답장이 인용한 메시지에 이미지나 파일이 있으면, 보낸 사람이 누구든 그 파일도 함께 첨부됩니다.
-## 관리 및 자체 호스팅
+</Accordion>
+</Accordions>
-**설정 → 메신저 → Telegram**에서 연결된 Bot을 확인할 수 있습니다. owner와 admin은 연결을 해제할 수 있으며, 기존 대화와 감사 기록은 유지됩니다.
+### 명령
-자체 호스팅 환경에서는 API 서버 시작 전에 고정된 32-byte 암호화 키를 설정합니다.
+- `/new`는 비어 있는 새 Multica Chat을 만들고 해당 Telegram 대화의 이후 메시지를 새 Chat으로 라우팅합니다. `/new <메시지>`를 보내면 그 메시지가 새 Chat의 첫 턴이 됩니다. 다른 멤버에게 답장하면서 Bot을 명시적으로 @멘션하면 선택한 인용 내용도 첫 턴에 포함됩니다.
+- `/clear`는 현재 Multica Chat을 유지하면서 다음 비어 있지 않은 메시지에 새 에이전트 컨텍스트를 적용합니다. `/clear <메시지>`를 보내면 그 메시지가 경계 이후의 첫 턴이 되며, 명시적으로 선택한 답장 인용도 유지됩니다.
+- `/issue <제목>`은 Multica 태스크를 만듭니다. 다음 줄은 선택 설명으로 사용됩니다. 제목 없이 보내면 사용법을 안내합니다.
+- 그룹에서는 `/issue@your_bot` 같은 Telegram 명령 접미사도 지원합니다.
+
+### 응답과 지원되는 내용
+
+Bot은 Telegram 메시지를 보내고 편집해 텍스트 응답을 스트리밍하며, 원래 메시지를 인용하고 forum topic을 유지합니다. 긴 응답은 Telegram 길이 제한에 맞춰 자동으로 나뉩니다.
+
+이미지, 파일, 영상, 음성 메시지, 오디오는 caption을 메시지 본문으로 하여 같은 대화의 첨부 파일로 에이전트에 전달됩니다. 에이전트가 만든 파일은 응답 뒤에 채팅으로 다시 전송됩니다. 두 방향 모두 서버에 객체 스토리지가 필요합니다(아래 자체 호스팅 설정 참고).
+
+<Accordions type="multiple">
+<Accordion title="최종 응답의 전달과 큐" id="reply-delivery">
+
+최종 응답은 프로세스 내에서 비동기로 전달됩니다. 일반적으로 한 채팅의 백오프 대기는 worker를 점유하지 않습니다. 캐시가 용량 한계에 도달해 백오프 상태를 압축하면 같은 Bot installation의 다른 채팅도 안전을 위해 지연될 수 있습니다. 최종 응답 큐의 용량은 고정되어 있으며 한도를 넘은 실행은 명시적으로 거부되고 오류로 기록됩니다. 큐는 서비스 재시작 후 복구되지 않습니다.
+
+</Accordion>
+<Accordion title="이미지, 파일과 기타 미디어" id="media">
+
+이미지, 파일, 영상, 음성 메시지, 오디오가 담긴 메시지에 답장하면(개인 채팅이든, 그룹에서 Bot에게 지시할 때든, 보낸 사람이 누구든) 그 메시지가 인용으로 지시 앞에 붙고 파일도 에이전트에 전달되므로 이전 이미지나 영상을 지정할 수 있습니다.
+
+Telegram Bot은 20 MB까지만 내려받을 수 있습니다. 파일을 가져오지 못하면(너무 크거나 다운로드 실패) Bot이 알려 주고 에이전트에게는 자리표시자만 보입니다.
+
+에이전트가 만든 파일은 별도 메시지로 채팅에 전송됩니다. 10 MB 이하 이미지는 인라인으로, 그 외에는 50 MB까지 파일로 도착합니다. 전달을 확인하지 못하면 Bot이 알려 주며 파일은 Multica의 응답에 첨부된 채로 남습니다.
+
+객체 스토리지가 설정되지 않았으면 Bot은 미디어에 미지원 안내를 회신하고 에이전트는 파일을 보낼 수 없다는 안내를 받습니다. sticker, 위치, 투표 등 파일이 아닌 메시지는 개인 채팅에서, 그리고 그룹에서 Bot을 명시적으로 @멘션했을 때 같은 안내를 받습니다. 그룹에서 Bot을 지정하지 않은 이런 메시지에는 응답하지 않습니다.
+
+</Accordion>
+</Accordions>
+
+## 연결 관리
+
+**설정 → 메신저 → Telegram**에서 연결된 Bot을 확인할 수 있습니다. owner와 admin은 연결을 해제할 수 있습니다. 해제하면 long polling과 이후 응답이 멈추지만 Multica 대화와 감사 기록은 유지됩니다.
+
+## 자체 호스팅 설정 [#관리-및-자체-호스팅]
+
+API 서버를 시작하기 전에 오래 유지할 32바이트 암호화 키를 설정합니다.
```dotenv
MULTICA_TELEGRAM_SECRET_KEY=<base64-encoded 32-byte key>
```
-`openssl rand -base64 32`로 생성할 수 있습니다. 바인딩 링크는 `MULTICA_APP_URL`을 사용하며, 없으면 `FRONTEND_ORIGIN`으로 대체합니다. 서버는 `api.telegram.org`에 HTTPS로 접속할 수 있어야 하며 표준 `HTTPS_PROXY` / `NO_PROXY`를 사용할 수 있습니다.
+`openssl rand -base64 32`로 생성할 수 있습니다. 이 키를 잃어버리거나 교체하면 기존 Bot token을 복호화할 수 없어 Bot마다 다시 연결해야 합니다.
+
+연결 링크는 `MULTICA_APP_URL`을 사용하며, 없으면 `FRONTEND_ORIGIN`으로 대체합니다. 만들어진 주소는 멤버가 접속할 수 있어야 합니다. 서버 네트워크나 proxy는 `api.telegram.org`에 대한 HTTPS 접속을 허용해야 하며, Go는 표준 `HTTPS_PROXY` / `NO_PROXY` 환경 변수를 읽습니다.
-## 문제 해결
+## 자주 묻는 문제 [#문제-해결]
-- **Bot 검증 실패**: 먼저 서버 네트워크와 proxy를 확인합니다. Telegram이 token을 거부한 경우에만 재발급하세요.
-- **webhook conflict**: 연결 전에 기존 webhook을 제거합니다.
-- **409 polling conflict**: 같은 Bot을 polling하는 다른 프로세스를 중지하거나 환경별로 Bot을 분리합니다.
-- **그룹에서 답장 없음**: Bot이 그룹에 있고 메시지가 @mention 또는 Bot에 대한 답장인지 확인합니다.
-- **바인딩 링크 만료**: Bot에 새 DM을 보내 최신 링크를 사용합니다.
-- **실행되지 않음**: 에이전트의 archive 상태와 [runtime](/daemon-runtimes)을 확인합니다.
+- **Bot 검증 실패**: 먼저 서버 네트워크와 proxy를 확인합니다. Telegram이 token을 명시적으로 거부한 경우에만 재발급하세요.
+- **webhook conflict**: 연결 전에 이 Bot의 기존 webhook을 제거합니다. Telegram은 webhook과 `getUpdates`를 동시에 쓸 수 없습니다.
+- **409 polling conflict**: 다른 Multica 인스턴스나 프로세스가 같은 Bot을 polling하고 있습니다. 그쪽을 중지하거나 환경별로 Bot을 분리합니다.
+- **그룹에서 답장 없음**: Bot이 그룹에 있고 메시지가 @멘션 또는 Bot에 대한 답장인지 확인합니다.
+- **연결 링크 만료**: Bot에 새 DM을 보내 최신 링크를 사용합니다.
+- **실행되지 않음**: 에이전트가 보관 처리되었는지, 사용하는 [런타임](/daemon-runtimes)이 온라인인지 확인합니다.
## 다음 단계
-- [채팅 연동](/channels)
-- [채팅](/chat)
-- [Issues](/issues)
+- [채팅 연동](/channels) — 플랫폼 비교와 대화·계정 연결 방식을 알아봅니다.
+- [에이전트와 대화](/chat) — Bot 메시지가 에이전트 실행이 되는 과정을 알아봅니다.
+- [태스크](/issues) — `/issue`가 만드는 작업 단위를 알아봅니다.
diff --git a/apps/docs/content/docs/telegram-bot-integration.mdx b/apps/docs/content/docs/telegram-bot-integration.mdx
index b6352d166d..1b3cd76e99 100644
--- a/apps/docs/content/docs/telegram-bot-integration.mdx
+++ b/apps/docs/content/docs/telegram-bot-integration.mdx
@@ -4,10 +4,14 @@ description: Connect a Multica agent to your own Telegram Bot for private chats,
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Multica uses a Bot that you create with Telegram's official [@BotFather](https://t.me/BotFather). One Bot maps to one Multica agent. Create a separate Bot for each agent that needs its own Telegram identity.
-Telegram support is [community-maintained](/community-maintained): it ships in every release, but it carries no official support SLA. Report problems in [GitHub issues](https://github.com/multica-ai/multica/issues).
+<Callout type="info">
+Telegram support is [community-maintained](/community-maintained): it ships in every release, but carries no official support SLA. Report problems in [GitHub issues](https://github.com/multica-ai/multica/issues).
+</Callout>
## Before you start
@@ -15,18 +19,26 @@ Telegram support is [community-maintained](/community-maintained): it ships in e
- The API server must be able to reach `https://api.telegram.org`.
- You need the Bot token issued by @BotFather. Treat it as a password.
-## 1. Create the Bot
+## Connect the Bot
+
+<Steps>
+<Step>
+
+### Create the Bot [#1-create-the-bot]
1. Open [@BotFather](https://t.me/BotFather) and send `/newbot`.
2. Choose a display name and a username ending in `bot`.
3. Copy the HTTP API token.
-4. Leave **Group Privacy** enabled for the default, minimal-visibility setup: Telegram then delivers only commands, explicit @-mentions, and replies to the Bot in groups. Turning it off is optional. It lets the Bot include the surrounding group conversation as context, at the cost that the Bot then receives every message in the group — see [Groups and forum topics](#groups-and-forum-topics).
+4. Leave **Group Privacy** enabled for the default, minimal-visibility setup: Telegram then delivers only commands, explicit @-mentions, and replies to the Bot in groups. You can turn it off so the Bot includes the surrounding group conversation as context, at the cost that the Bot then receives every message in the group; see [Group Privacy decides what the Bot sees](#group-privacy).
<Callout type="warning">
Never paste the token into an issue, chat message, log, or source repository. If it is exposed, use @BotFather to revoke it, then reconnect the Bot with the replacement token.
</Callout>
-## 2. Connect it to an agent
+</Step>
+<Step>
+
+### Connect it to an agent [#2-connect-it-to-an-agent]
1. In Multica, open **Agents**, select an agent, and open **Integrations**.
2. Click **Connect Telegram**.
@@ -34,7 +46,10 @@ Never paste the token into an issue, chat message, log, or source repository. If
Multica calls Telegram to verify the Bot, checks that no outgoing webhook conflicts with long polling, encrypts the token, and starts one supervised `getUpdates` connection. A Bot already connected to another agent or workspace must be disconnected there first.
-## First use and account binding
+</Step>
+</Steps>
+
+## First use [#first-use-and-account-binding]
The first time a member messages the Bot, it sends a single-use Multica account-binding link. Open it, sign in to the same Multica workspace, then return to Telegram and send the message again. The link expires after 15 minutes; message the Bot again to get a new link.
@@ -42,7 +57,7 @@ In a group, the Bot never posts the bearer link publicly. It asks the sender to
Only current workspace members can use the Bot. Membership is checked again for every message.
-## Use the Bot
+## Hand work to the agent in Telegram [#use-the-bot]
### Private chats
@@ -50,7 +65,31 @@ Open the Bot and send text directly. No @-mention is required.
### Groups and forum topics
-Add the Bot to a group, then either @-mention it or reply directly to one of its messages. Accepted messages remain in the continued Multica conversation. A group message that does not address the Bot never starts a conversation or a turn on its own. It is, however, held in a short in-memory buffer: the last 10 messages per group (or per forum topic) that the Bot has received, cleared whenever the server restarts. When a member then addresses the Bot — by @-mention or by replying to one of its messages — those buffered messages are prepended to that turn as read-only context, and they are saved together with the turn as part of the conversation. A buffered photo or file appears there only as a marker such as `[Image]` followed by its caption; the file itself is not fetched. `/new` starts a fresh chat without that context. What reaches the buffer depends on what Telegram delivers: with Group Privacy enabled, that is only commands, explicit @-mentions, and replies to the Bot, so the context holds earlier addressed messages only. To include ordinary group chatter, turn Group Privacy off in @BotFather and then remove and re-add the Bot to the group; the Bot receives every group message from then on. A Bot that is a group admin receives every message regardless of the privacy setting, so its context includes ordinary chatter without any change in @BotFather. When replying to another person's message, explicitly @-mention the Bot: only then are that quoted sender and text (or caption) included with your instruction. When a reply that addresses the Bot quotes a message carrying a photo or file, that file is attached as well, whoever sent it. Replying to a human message without mentioning the Bot does not trigger it. Each ordinary group has its own continued Multica chat; forum topics are isolated into separate chats.
+Add the Bot to a group, then either @-mention it or reply directly to one of its messages. Accepted messages remain in the continued Multica conversation: each ordinary group has its own chat, and forum topics are isolated into separate chats.
+
+<Accordions type="multiple">
+<Accordion title="Group messages not addressed to the Bot" id="unaddressed-group-messages">
+
+A group message that does not address the Bot never starts a conversation or a turn on its own. It is, however, held in a short in-memory buffer: the last 10 messages per group (or per forum topic) that the Bot has received, cleared whenever the server restarts. When a member then addresses the Bot, by @-mention or by replying to one of its messages, those buffered messages are prepended to that turn as read-only context and saved with the turn as part of the conversation.
+
+A buffered photo or file appears there only as a marker such as `[Image]` followed by its caption; the file itself is not fetched. `/new` starts a fresh chat without that context.
+
+</Accordion>
+<Accordion title="Group Privacy decides what the Bot sees" id="group-privacy">
+
+What reaches the buffer depends on what Telegram delivers. With Group Privacy enabled, that is only commands, explicit @-mentions, and replies to the Bot, so the context holds earlier addressed messages only.
+
+To include ordinary group chatter, turn Group Privacy off in @BotFather, then remove the Bot from the group and add it again; from then on the Bot receives every group message. A Bot that is a group admin receives every message regardless of the privacy setting, so its context includes ordinary chatter without any change in @BotFather.
+
+</Accordion>
+<Accordion title="Replying to other members" id="replying-to-members">
+
+When replying to another person's message, explicitly @-mention the Bot: only then are the quoted sender and text (or caption) included with your instruction. Replying to a human message without mentioning the Bot does not trigger it.
+
+When a reply that addresses the Bot quotes a message carrying a photo or file, that file is attached as well, whoever sent it.
+
+</Accordion>
+</Accordions>
### Commands
@@ -61,9 +100,28 @@ Add the Bot to a group, then either @-mention it or reply directly to one of its
### Replies and supported content
-The Bot streams text by posting and editing a Telegram message, quotes the triggering message, preserves forum topics, and splits long replies under Telegram's message limit. Final replies are delivered asynchronously by an in-process queue. Normally, one chat's backoff does not occupy a worker; if cache pressure compacts exact backoff state, other chats under the same Bot installation may be conservatively delayed. The terminal queue has fixed capacity: overflow is rejected and logged, and queued replies are not recovered after a service restart.
+The Bot streams text by posting and editing a Telegram message, quotes the triggering message, preserves forum topics, and splits long replies under Telegram's message limit.
+
+Photos, files, video, voice, and audio messages reach the agent as attachments on the same conversation, with the caption as the message text, and files the agent produces are sent back into the chat after its reply. Both directions need object storage on the server (see the self-hosting section below).
+
+<Accordions type="multiple">
+<Accordion title="How final replies are delivered and queued" id="reply-delivery">
+
+Final replies are delivered asynchronously by an in-process queue. Normally, one chat's backoff does not occupy a worker; if cache pressure compacts exact backoff state, other chats under the same Bot installation may be conservatively delayed. The terminal queue has fixed capacity: overflow is rejected and logged, and queued replies are not recovered after a service restart.
+
+</Accordion>
+<Accordion title="Photos, files, and other media" id="media">
+
+Replying to a message that carries a photo, file, video, voice note, or audio (in a private chat or, when addressing the Bot, in a group, whoever sent it) quotes that message ahead of your instruction and attaches its file, so you can point the agent at an earlier photo or video.
+
+Telegram lets a Bot download files up to 20 MB. When a file can't be fetched (too large, or the download fails), the Bot tells you so, and the agent sees only a placeholder.
+
+Files the agent produces are sent back as separate messages: photos up to 10 MB render inline, and everything else up to 50 MB arrives as a file. If a file can't be confirmed delivered, the Bot says so and the file stays attached to the reply in Multica.
+
+Without object storage, the Bot answers media with the unsupported-message notice, and the agent is told it cannot send files. Stickers, locations, polls, and other non-file messages receive the same notice in private chats and when addressed in groups; unaddressed group messages of those kinds remain silent.
-Photos, files, video, voice, and audio messages reach the agent as attachments on the same conversation, with the caption as the message text. Replying to a message that carries one of these — in a private chat or, when addressing the Bot, in a group, whoever sent it — quotes that message ahead of your instruction and attaches its file, so you can point the agent at an earlier photo or video. Telegram lets a Bot download files up to 20 MB; when a file can't be fetched (too large, or the download fails) the Bot tells you so, and the agent sees only a placeholder. Files the agent produces are sent back into the chat as separate messages after its reply: photos up to 10 MB render inline, everything else up to 50 MB arrives as a file; if a file can't be confirmed delivered, the Bot says so and the file stays attached to the reply in Multica. Both directions need object storage on the server (see the self-hosting section below); without it the Bot answers media with the unsupported-message notice, and the agent is told it cannot send files. Stickers, locations, polls, and other non-file messages receive the same notice in private chats and when addressed in groups; unaddressed group messages of those kinds remain silent.
+</Accordion>
+</Accordions>
## Manage connections
diff --git a/apps/docs/content/docs/telegram-bot-integration.zh.mdx b/apps/docs/content/docs/telegram-bot-integration.zh.mdx
index 0ec2e39513..b79a0820ef 100644
--- a/apps/docs/content/docs/telegram-bot-integration.zh.mdx
+++ b/apps/docs/content/docs/telegram-bot-integration.zh.mdx
@@ -4,10 +4,14 @@ description: 把 Multica 智能体接入你自己的 Telegram Bot,支持私聊
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Multica 使用你通过 Telegram 官方 [@BotFather](https://t.me/BotFather) 创建的 Bot。一个 Bot 对应一个 Multica 智能体;需要多个独立 Bot 身份时,为每个智能体分别创建。
-Telegram 集成[由社区维护](/community-maintained):每个版本都会随包发布,但不附带官方支持 SLA。遇到问题请提到 [GitHub 任务](https://github.com/multica-ai/multica/issues)。
+<Callout type="info">
+Telegram 集成[由社区维护](/community-maintained):随每个版本发布,但没有官方支持 SLA。遇到问题请提交 [GitHub 任务](https://github.com/multica-ai/multica/issues)。
+</Callout>
## 开始前
@@ -15,18 +19,26 @@ Telegram 集成[由社区维护](/community-maintained):每个版本都会随
- API 服务器必须能够访问 `https://api.telegram.org`。
- 你需要 @BotFather 签发的 Bot token;它等同于密码。
-## 1. 创建 Bot
+## 连接 Bot
+
+<Steps>
+<Step>
+
+### 创建 Bot [#1-创建-bot]
1. 打开 [@BotFather](https://t.me/BotFather),发送 `/newbot`。
2. 设置显示名称和一个以 `bot` 结尾的用户名。
3. 复制 HTTP API token。
-4. 默认保持 **Group Privacy** 开启,这是可见范围最小的配置:Telegram 只会把命令、明确的 @ 和对 Bot 消息的回复投递给 Bot。关闭它是可选项,能让 Bot 把群里周围的讨论作为上下文,代价是 Bot 会收到群里的每一条消息,详见[群聊与 forum topic](#群聊与-forum-topic)。
+4. 默认保持 **Group Privacy** 开启,这是可见范围最小的配置:Telegram 只会把命令、明确的 @ 和对 Bot 消息的回复投递给 Bot。也可以关闭它,让 Bot 把群里周围的讨论作为上下文,代价是 Bot 会收到群里的每一条消息,详见[Group Privacy 决定 Bot 能看到哪些消息](#group-privacy)。
<Callout type="warning">
不要把 token 发到任务、聊天、日志或代码仓库。若已泄露,请在 @BotFather 中撤销,再用替换后的 token 重新连接。
</Callout>
-## 2. 连接到智能体
+</Step>
+<Step>
+
+### 连接到智能体 [#2-连接到智能体]
1. 在 Multica 打开 **智能体**,选择目标智能体并进入 **集成**。
2. 点击 **连接 Telegram**。
@@ -34,7 +46,10 @@ Telegram 集成[由社区维护](/community-maintained):每个版本都会随
Multica 会实时请求 Telegram 验证 Bot,检查是否存在与长轮询冲突的 webhook,加密保存 token,并启动一条受监督的 `getUpdates` 连接。一个 Bot 若已连接到其他智能体或工作区,必须先在原处断开。
-## 首次使用与账号绑定
+</Step>
+</Steps>
+
+## 第一次使用 [#首次使用与账号绑定]
成员第一次向 Bot 发消息时,会收到一次性 Multica 账号绑定链接。打开链接,登录同一工作区的 Multica 账号,再回到 Telegram 重新发送消息。链接 15 分钟后过期;再私聊 Bot 即可获取新链接。
@@ -42,7 +57,7 @@ Multica 会实时请求 Telegram 验证 Bot,检查是否存在与长轮询冲
只有当前工作区成员能使用 Bot;每条消息都会重新校验成员身份。
-## 使用 Bot
+## 在 Telegram 中交代工作 [#使用-bot]
### 私聊
@@ -50,7 +65,31 @@ Multica 会实时请求 Telegram 验证 Bot,检查是否存在与长轮询冲
### 群聊与 forum topic
-把 Bot 加入群后,@它,或直接回复它发过的消息。被接受的消息会保留在持续的 Multica 对话中。未明确发给 Bot 的群消息本身不会开启对话,也不会单独形成一轮,但会被暂存在一个很小的内存缓冲里:每个群(或每个 forum topic)保留 Bot 收到的最近 10 条,服务器重启即清空。之后当有成员通过 @ 或回复 Bot 的消息向它发出指令时,这些暂存消息会作为只读上下文附在该轮指令之前,并随这一轮一起保存进对话记录。缓冲里的图片或文件在上下文中只显示为 `[Image]` 之类的标记和 caption,文件本身不会被获取。`/new` 开启的新对话不带这段上下文。缓冲里有什么取决于 Telegram 投递了什么:Group Privacy 开启时只有命令、明确的 @ 和对 Bot 的回复,所以上下文里只有之前明确发给它的消息。想让它看到普通群聊,请在 @BotFather 里关闭 Group Privacy,再把 Bot 移出群重新加入,此后 Bot 会收到群里的每一条消息。被设为群管理员的 Bot 无论隐私设置如何都会收到全部消息,因此不改 @BotFather 也会把普通群聊纳入上下文。回复其他成员的消息时必须同时 @ Bot,只有这种情况下,被引用消息的发送者及文字(或 caption)才会随新指令进入上下文;发给 Bot 的回复所引用的消息若带图片或文件,该文件也会一并附上,无论发送者是谁;只回复成员而不 @ Bot 不会触发。普通群聊各自延续一段 Multica 对话;forum 的每个 topic 分别隔离。
+把 Bot 加入群后,@ 它,或直接回复它发过的消息。被接受的消息会保留在持续的 Multica 对话中:普通群聊各自延续一段对话,forum 的每个 topic 分别隔离。
+
+<Accordions type="multiple">
+<Accordion title="没有发给 Bot 的群消息" id="unaddressed-group-messages">
+
+未明确发给 Bot 的群消息本身不会开启对话,也不会单独形成一轮,但会被暂存在一个很小的内存缓冲里:每个群(或每个 forum topic)保留 Bot 收到的最近 10 条,服务器重启即清空。之后有成员通过 @ 或回复 Bot 的消息向它发出指令时,这些暂存消息会作为只读上下文附在该轮指令之前,并随这一轮一起保存进对话记录。
+
+缓冲里的图片或文件在上下文中只显示为 `[Image]` 之类的标记和 caption,文件本身不会被获取。`/new` 开启的新对话不带这段上下文。
+
+</Accordion>
+<Accordion title="Group Privacy 决定 Bot 能看到哪些消息" id="group-privacy">
+
+缓冲里有什么取决于 Telegram 投递了什么。Group Privacy 开启时只有命令、明确的 @ 和对 Bot 的回复,所以上下文里只有之前明确发给它的消息。
+
+想让它看到普通群聊,请在 @BotFather 里关闭 Group Privacy,再把 Bot 移出群重新加入,此后 Bot 会收到群里的每一条消息。被设为群管理员的 Bot 无论隐私设置如何都会收到全部消息,因此不改 @BotFather 也会把普通群聊纳入上下文。
+
+</Accordion>
+<Accordion title="回复其他成员的消息" id="replying-to-members">
+
+回复其他成员的消息时必须同时 @ Bot,被引用消息的发送者及文字(或 caption)才会随新指令进入上下文;只回复成员而不 @ Bot 不会触发。
+
+发给 Bot 的回复所引用的消息若带图片或文件,无论发送者是谁,该文件也会一并附上。
+
+</Accordion>
+</Accordions>
### 命令
@@ -61,11 +100,30 @@ Multica 会实时请求 Telegram 验证 Bot,检查是否存在与长轮询冲
### 回复与内容范围
-Bot 通过发送并编辑 Telegram 消息来流式展示文字回复,引用触发消息、保留 forum topic,并按 Telegram 长度限制自动分段。最终回复在进程内异步投递。正常情况下,某个聊天的退避等待不会占用 worker;缓存达到容量上限并压缩退避状态时,同一 Bot installation 下的其他聊天可能被保守延迟。终态队列有固定容量,超限运行会被明确拒绝并记录错误;队列不会跨服务重启恢复。
+Bot 通过发送并编辑 Telegram 消息来流式展示文字回复,引用触发消息、保留 forum topic,并按 Telegram 长度限制自动分段。
+
+图片、文件、视频、语音和音频消息会作为同一对话的附件交给智能体,caption 作为消息正文;智能体生成的文件会在回复之后发回聊天。这两个方向都需要服务端配置对象存储(见下文自托管部分)。
+
+<Accordions type="multiple">
+<Accordion title="最终回复的投递与排队" id="reply-delivery">
+
+最终回复在进程内异步投递。正常情况下,某个聊天的退避等待不会占用 worker;缓存达到容量上限并压缩退避状态时,同一 Bot installation 下的其他聊天可能被保守延迟。终态队列有固定容量,超限运行会被明确拒绝并记录错误;队列不会跨服务重启恢复。
+
+</Accordion>
+<Accordion title="图片、文件和其他媒体" id="media">
+
+回复一条带有图片、文件、视频、语音或音频的消息(私聊,或在群里向 Bot 发出指令时,无论发送者是谁),会把该消息作为引用附在你的指令前,并把它的文件一并交给智能体,这样你可以指定之前的某张图片或某段视频。
+
+Telegram 只允许 Bot 下载 20 MB 以内的文件;文件无法获取时(太大或下载失败),Bot 会告诉你,智能体只会看到一个占位符。
+
+智能体生成的文件作为单独的消息发回聊天:10 MB 以内的图片内联显示,其余 50 MB 以内的文件以文件形式到达;无法确认送达时 Bot 会说明,文件仍保留在 Multica 的回复附件里。
+
+未配置对象存储时,Bot 对媒体消息回复不支持提示,智能体也会被告知无法发送文件。贴纸、位置、投票等非文件消息在私聊中以及群里明确 @ Bot 时会收到同样的提示,群里未 @ 的此类消息保持静默。
-图片、文件、视频、语音和音频消息会作为同一对话的附件交给智能体,caption 作为消息正文。回复一条带有这类内容的消息(私聊,或在群里向 Bot 发出指令时,无论发送者是谁)会把该消息作为引用附在你的指令前,并把它的文件一并交给智能体,这样你可以指定之前的某张图片或某段视频。Telegram 只允许 Bot 下载 20 MB 以内的文件;文件无法获取时(太大或下载失败),Bot 会告诉你,智能体只会看到一个占位符。智能体生成的文件会在回复之后作为单独的消息发回聊天:10 MB 以内的图片内联显示,其余 50 MB 以内的文件以文件形式到达;无法确认送达时 Bot 会说明,文件仍保留在 Multica 的回复附件里。这两个方向都需要服务端配置对象存储(见下文自托管部分);未配置时,Bot 对媒体消息回复不支持提示,智能体也会被告知无法发送文件。贴纸、位置、投票等非文件消息在私聊中以及群里明确 @ Bot 时会收到同样的提示,群里未 @ 的此类消息保持静默。
+</Accordion>
+</Accordions>
-## 管理与断开
+## 管理连接 [#管理与断开]
在 **设置 → 消息渠道 → Telegram** 查看所有已连接 Bot。owner 和 admin 可以断开。断开会停止长轮询和后续回复,但保留 Multica 对话与审计记录。
@@ -81,7 +139,7 @@ MULTICA_TELEGRAM_SECRET_KEY=<base64 编码的 32 字节密钥>
绑定链接使用 `MULTICA_APP_URL`,未设置时回退到 `FRONTEND_ORIGIN`;生成的地址必须能被成员访问。服务器网络或代理还必须允许 HTTPS 访问 `api.telegram.org`;Go 会读取标准的 `HTTPS_PROXY` 和 `NO_PROXY` 环境变量。
-## 故障排查
+## 常见问题 [#故障排查]
- **无法验证 Bot**:先检查服务器网络和代理。只有 Telegram 明确拒绝 token 时才需要重新生成。
- **webhook 冲突**:连接前移除这个 Bot 已有的 webhook;Telegram 不允许 webhook 与 `getUpdates` 同时使用。
diff --git a/apps/docs/content/docs/triggering-agents.fr.mdx b/apps/docs/content/docs/triggering-agents.fr.mdx
index e6c610b5dc..9daad760bd 100644
--- a/apps/docs/content/docs/triggering-agents.fr.mdx
+++ b/apps/docs/content/docs/triggering-agents.fr.mdx
@@ -3,8 +3,12 @@ title: Mettre les agents au travail
description: Choisissez comment commencer un travail, le transmettre ou demander de l’aide.
---
+import { TriggerChooserDemo } from "@/components/demos/trigger-chooser-demo";
+
Partez de ce que vous attendez d’un agent : lui confier une tâche, lui demander une aide ponctuelle ou organiser un travail récurrent.
+<TriggerChooserDemo />
+
| Votre besoin | Fonction à utiliser |
|---|---|
| Confier une tâche à un agent | [Assignez-la](/assigning-issues) à un agent ou un squad. |
@@ -13,6 +17,7 @@ Partez de ce que vous attendez d’un agent : lui confier une tâche, lui demand
| Transmettre le travail selon des étapes répétées | Choisissez un [workflow](/workflows) de projet avec un responsable par étape. |
| Poser une question sans créer de tâche | Démarrez une [discussion](/chat) avec l’agent. |
| Commencer un travail récurrent selon une date ou un événement extérieur | Créez une [automatisation](/autopilots). |
+| Faire revenir un agent sur une tâche plus tard | Ajoutez à la tâche un [réveil](/issue-wakeups) avec l’heure ou l’événement à attendre. |
Vous ne pouvez appeler que les agents que vous avez le droit d’exécuter. Avant d’envoyer un commentaire, vérifiez l’aperçu sous le champ ; utilisez `/note` pour laisser un message sans réveiller d’agent. Une tâche en `backlog` attend que vous soyez prêt à la commencer.
diff --git a/apps/docs/content/docs/triggering-agents.ja.mdx b/apps/docs/content/docs/triggering-agents.ja.mdx
index 7c4134c585..1023f5ce78 100644
--- a/apps/docs/content/docs/triggering-agents.ja.mdx
+++ b/apps/docs/content/docs/triggering-agents.ja.mdx
@@ -3,8 +3,12 @@ title: エージェントに仕事を任せる
description: 作業の開始、引き継ぎ、相談の方法を目的に合わせて選びます。
---
+import { TriggerChooserDemo } from "@/components/demos/trigger-chooser-demo";
+
エージェントに何をしてほしいかから選びます。タスク全体を任せる、1 件だけ相談する、繰り返す仕事を設定するなどの方法があります。
+<TriggerChooserDemo />
+
| やりたいこと | 使うもの |
|---|---|
| エージェントにタスクを任せる | エージェントまたはスクワッドに[割り当てます](/assigning-issues)。 |
@@ -12,7 +16,8 @@ description: 作業の開始、引き継ぎ、相談の方法を目的に合わ
| 同じ種類の依頼を繰り返す | コードレビューなどを[クイックアクション](/quick-actions)に保存して使います。 |
| 決まったステップで担当者を引き継ぐ | プロジェクトの[ワークフロー](/workflows)で各ステップの担当者を決めます。 |
| タスクを作らず質問する | エージェントと[チャット](/chat)を始めます。 |
-| 時刻や外部イベントから繰り返し作業を始める | [自動化](/autopilots)を作成します。 |
+| 時刻や外部イベントから繰り返し作業を始める | [オートパイロット](/autopilots)を作成します。 |
+| あとでエージェントにタスクへ戻ってもらう | 待つ時刻やイベントを決めて、タスクに[ウェイクアップ](/issue-wakeups)を追加します。 |
呼び出せるのは実行権限のあるエージェントだけです。コメントの送信前には入力欄の下のプレビューを確認してください。起動せずにメモを残す場合は `/note` を使います。`backlog` のタスクは開始の準備ができるまで待機します。
diff --git a/apps/docs/content/docs/triggering-agents.ko.mdx b/apps/docs/content/docs/triggering-agents.ko.mdx
index 97865cc835..1235a42a1e 100644
--- a/apps/docs/content/docs/triggering-agents.ko.mdx
+++ b/apps/docs/content/docs/triggering-agents.ko.mdx
@@ -3,8 +3,12 @@ title: 에이전트에게 작업 맡기기
description: 목적에 맞게 작업 시작, 인계, 도움 요청 방법을 선택합니다.
---
+import { TriggerChooserDemo } from "@/components/demos/trigger-chooser-demo";
+
에이전트가 무엇을 하면 좋을지부터 정하세요. 태스크를 맡기거나, 한 번의 요청을 하거나, 반복 작업을 설정할 수 있습니다.
+<TriggerChooserDemo />
+
| 하고 싶은 일 | 사용할 기능 |
|---|---|
| 에이전트에게 태스크 맡기기 | 에이전트나 스쿼드에 [할당](/assigning-issues)합니다. |
@@ -12,7 +16,8 @@ description: 목적에 맞게 작업 시작, 인계, 도움 요청 방법을 선
| 같은 종류의 요청 반복하기 | 코드 리뷰 등을 [퀵 액션](/quick-actions)으로 저장해 사용합니다. |
| 정해진 단계마다 다른 담당자에게 넘기기 | 프로젝트 [워크플로](/workflows)에서 각 단계의 담당자를 정합니다. |
| 태스크를 만들지 않고 질문하기 | 에이전트와 [채팅](/chat)을 시작합니다. |
-| 일정이나 외부 이벤트에 따라 반복 작업 시작하기 | [자동화](/autopilots)를 만듭니다. |
+| 일정이나 외부 이벤트에 따라 반복 작업 시작하기 | [오토파일럿](/autopilots)을 만듭니다. |
+| 나중에 에이전트가 태스크로 돌아오게 하기 | 기다릴 시각이나 이벤트를 정해 태스크에 [깨우기](/issue-wakeups)를 추가합니다. |
호출 권한이 있는 에이전트만 실행할 수 있습니다. 댓글을 보내기 전에 입력창 아래 미리 보기를 확인하세요. 에이전트를 깨우지 않고 메모만 남기려면 `/note`를 사용합니다. `backlog` 상태의 태스크는 시작할 준비가 될 때까지 기다립니다.
diff --git a/apps/docs/content/docs/triggering-agents.mdx b/apps/docs/content/docs/triggering-agents.mdx
index 676ea3dc3e..05b646f584 100644
--- a/apps/docs/content/docs/triggering-agents.mdx
+++ b/apps/docs/content/docs/triggering-agents.mdx
@@ -3,8 +3,12 @@ title: Put agents to work
description: Choose how to start work, hand it over, or ask for help.
---
+import { TriggerChooserDemo } from "@/components/demos/trigger-chooser-demo";
+
Start with what you want an agent to do. You can give it ownership of an issue, ask for help on one request, or arrange work that repeats.
+<TriggerChooserDemo />
+
| What you need | What to use |
|---|---|
| Have an agent own an issue | [Assign the issue](/assigning-issues) to an agent or squad. |
@@ -13,6 +17,7 @@ Start with what you want an agent to do. You can give it ownership of an issue,
| Pass work through a repeatable set of steps | Choose a project [workflow](/workflows) and who takes over at each step. |
| Ask a question without creating an issue | Start a [chat](/chat) with the agent. |
| Start recurring work by time or an outside event | Create an [autopilot](/autopilots). |
+| Have an agent come back to an issue later | Add a [wakeup](/issue-wakeups) to the issue with a time or an event to wait for. |
You can only ask agents you have permission to run. For comments, check the trigger preview before sending; use `/note` when you want to leave a message without waking an agent. An issue in `backlog` waits until you are ready to start it.
diff --git a/apps/docs/content/docs/triggering-agents.zh.mdx b/apps/docs/content/docs/triggering-agents.zh.mdx
index 0bd1bb501a..3220b392e9 100644
--- a/apps/docs/content/docs/triggering-agents.zh.mdx
+++ b/apps/docs/content/docs/triggering-agents.zh.mdx
@@ -3,8 +3,12 @@ title: 让智能体开始工作
description: 根据要做的事,选择开始工作、交接或请求帮助的方式。
---
+import { TriggerChooserDemo } from "@/components/demos/trigger-chooser-demo";
+
先看你希望智能体做什么:负责一条任务、处理一次具体请求,还是按固定安排反复工作。
+<TriggerChooserDemo />
+
| 你想做什么 | 使用什么 |
|---|---|
| 让智能体负责一条任务 | 把[任务分配](/assigning-issues)给智能体或小队。 |
@@ -13,6 +17,7 @@ description: 根据要做的事,选择开始工作、交接或请求帮助的
| 让任务按固定步骤交给不同处理人 | 为项目选择[工作流](/workflows),安排每一步由谁接手。 |
| 问一个问题,不需要新建任务 | 与智能体[开始对话](/chat)。 |
| 按时间或外部事件开展重复性工作 | 创建[自动化](/autopilots)。 |
+| 让智能体之后再回到某条任务 | 在任务上添加[唤醒](/issue-wakeups),设好要等的时间或事件。 |
你只能调用自己有权限运行的智能体。发送评论前,检查输入框下方的触发预览;只想留言而不叫醒智能体时,使用 `/note`。处于 `backlog` 的任务会等待你准备好再开始。
diff --git a/apps/docs/content/docs/troubleshooting.fr.mdx b/apps/docs/content/docs/troubleshooting.fr.mdx
index 278beb5afd..8e4db74bea 100644
--- a/apps/docs/content/docs/troubleshooting.fr.mdx
+++ b/apps/docs/content/docs/troubleshooting.fr.mdx
@@ -4,9 +4,14 @@ description: Diagnostiquez les problèmes courants de connexion, d'exécution, d
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
Commencez par déterminer à quelle couche appartient le problème : le service Multica, le daemon, le runtime ou l'outil de codage IA. Ces commandes suffisent généralement à faire apparaître la première erreur significative :
+<Tabs items={["Toute installation", "Service auto-hébergé"]}>
+<Tab value="Toute installation">
+
```bash
multica version
multica auth status
@@ -14,16 +19,23 @@ multica daemon status --output json
multica daemon logs --lines 100
```
-Les instances auto-hébergées peuvent aussi vérifier directement le service :
+</Tab>
+<Tab value="Service auto-hébergé">
```bash
curl -i https://api.example.com/health
curl -i https://api.example.com/readyz
```
+</Tab>
+</Tabs>
+
`/health` indique seulement que le processus API répond ; `/readyz` vérifie aussi la base de données et les migrations. Lorsque vous signalez un problème, incluez l'erreur, les journaux pertinents, la version du CLI et le système d'exploitation ; retirez les jetons, les adresses e-mail et les autres informations sensibles avant l'envoi.
-## Le daemon ne parvient pas à se connecter
+## Connexion et authentification
+
+<Accordions>
+<Accordion title="Le daemon ne parvient pas à se connecter" id="daemon-fails-to-connect" value="daemon-fails-to-connect">
Exécutez d'abord :
@@ -48,17 +60,64 @@ multica login
multica daemon restart
```
-Les déploiements auto-hébergés doivent aussi interroger le `/health` de l'API depuis l'**ordinateur d'exécution** — un test effectué sur le serveur lui-même ne peut pas révéler les problèmes de DNS, de TLS ou de pare-feu du côté de l'ordinateur d'exécution. Pour changer l'adresse, relancez `multica setup self-host`, ou vérifiez le `server_url` du profil actuel :
+Les déploiements auto-hébergés doivent aussi interroger le `/health` de l'API depuis l'**ordinateur d'exécution** : un test effectué sur le serveur lui-même ne peut pas révéler les problèmes de DNS, de TLS ou de pare-feu du côté de l'ordinateur d'exécution. Pour changer l'adresse, relancez `multica setup self-host`, ou vérifiez le `server_url` du profil actuel :
```bash
multica config show
```
-## L'exécution de la tâche ne démarre pas
+</Accordion>
+<Accordion title={<><code>multica setup</code> signale que le serveur est injoignable</>} id="multica-setup-reports-the-server-is-not-reachable" value="multica-setup-reports-the-server-is-not-reachable">
+
+La sonde d'accessibilité du CLI envoie une requête GET à `<server-url>/health` et attend un 200. C'est le backend qui sert ce chemin. Les versions actuelles de l'application web transmettent `/health` au backend, mais pas les plus anciennes. Un proxy inverse qui transmet tout à un tel frontend ancien renvoie 404, et le CLI en conclut que le serveur est hors service alors que la pile fonctionne correctement.
+
+Router explicitement `/health` vers le backend (port 8080) dans votre proxy fonctionne avec toutes les versions ; les deux exemples Caddy du [démarrage rapide de l'auto-hébergement](/self-host-quickstart#remote-access) le font. Vérifiez avec :
+
+```bash
+curl -fsS <server-url>/health
+```
+
+</Accordion>
+<Accordion title={<><code>multica login</code> échoue avec un dépassement de délai de la poignée de main TLS</>} id="multica-login-fails-with-a-tls-handshake-timeout" value="multica-login-fails-with-a-tls-handshake-timeout">
+
+`multica login` ouvre le navigateur et la connexion web aboutit, mais le CLI échoue quand même avec « Sign-in did not complete » ou « TLS handshake timed out ». `multica --debug login` affiche `net/http: TLS handshake timeout` sur `POST /api/tokens`, alors que `curl.exe -I https://api.multica.ai` ou un navigateur sur la même machine se connecte sans problème.
+
+La connexion TCP s'ouvre, mais la poignée de main TLS n'aboutit jamais. Les clients Go, dont le CLI et le daemon Multica, envoient par défaut un partage de clé post-quantique dans le ClientHello TLS, ce qui porte sa taille à environ 1,5 Ko et le répartit sur deux paquets. Certains logiciels de sécurité, VPN, routeurs et pare-feu abandonnent ces poignées de main ; curl envoie un ClientHello beaucoup plus petit et passe.
+
+Confirmez la cause en réessayant avec le partage de clé post-quantique désactivé :
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+GODEBUG=tlsmlkem=0 multica --debug login
+```
+
+</Tab>
+<Tab value="Windows">
+
+```powershell
+$env:GODEBUG = 'tlsmlkem=0'
+multica --debug login
+```
+
+</Tab>
+</Tabs>
+
+Si cela fonctionne, définissez `GODEBUG=tlsmlkem=0` de façon permanente pour l'utilisateur qui exécute le CLI et le daemon (sous Windows, exécutez `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` et ouvrez un nouveau terminal), puis redémarrez le daemon ou l'application de bureau. Augmenter `MULTICA_HTTP_TIMEOUT` n'aide pas : cette variable ne régit pas la poignée de main. La correction durable se fait côté réseau : mettez à jour ou reconfigurez l'appareil ou le logiciel qui abandonne les poignées de main TLS fragmentées.
+
+</Accordion>
+</Accordions>
+
+## Exécutions et outils de codage IA
+
+<Accordions>
+<Accordion title="L'exécution de la tâche ne démarre pas" id="issue-does-not-start-executing" value="issue-does-not-start-executing">
Ouvrez le **Journal d'exécution** de la tâche et vérifiez le statut actuel de l'exécution ainsi que ce qu'elle attend.
-### Statut `queued`
+<Tabs items={["queued", "waiting_local_directory"]}>
+<Tab value="queued">
`queued` (affiché « En file d'attente ») signifie que l'exécution attend toujours qu'un runtime la prenne en charge. Vérifiez dans l'ordre :
@@ -77,15 +136,20 @@ multica issue runs <issue-id>
Si la liste des runtimes ne contient pas un outil attendu, vérifiez d'abord que l'outil s'exécute et est connecté sous le même compte système et avec le même `PATH`, puis exécutez `multica daemon restart`.
-### Statut `waiting_local_directory`
+</Tab>
+<Tab value="waiting_local_directory">
Ce statut (affiché « En attente du répertoire local ») signifie qu'une autre exécution en cours utilise le même répertoire local. Multica attend que le verrou du répertoire soit libéré, afin que deux agents ne modifient jamais les mêmes fichiers en même temps.
Cette attente n'existe qu'en mode `in_place` (« Direct ») du répertoire. Si le répertoire est un dépôt git, passer la ressource en `worktree` (« Parallèle ») supprime complètement la file d'attente : chaque exécution obtient son propre worktree et rend son travail sous forme de branche, si bien que rien n'attend quoi que ce soit. Consultez [Ressources de projet](/project-resources#comment-les-exécutions-partagent-le-répertoire).
-Sinon, il suffit d'attendre la fin de l'exécution précédente. Si elle est bloquée, arrêtez-la depuis son journal d'exécution (**Annuler l'exécution**), ou choisissez un autre répertoire local pour l'agent actuel. Ce verrou d'exclusion mutuelle du répertoire réside dans la mémoire du daemon — aucun fichier de verrou n'est écrit sur le disque. Si vous soupçonnez un état de verrou obsolète, `multica daemon restart` le libère ; il n'y a rien à supprimer manuellement.
+Sinon, il suffit d'attendre la fin de l'exécution précédente. Si elle est bloquée, arrêtez-la depuis son journal d'exécution (**Annuler l'exécution**), ou choisissez un autre répertoire local pour l'agent actuel. Ce verrou d'exclusion mutuelle du répertoire réside dans la mémoire du daemon ; aucun fichier de verrou n'est écrit sur le disque. Si vous soupçonnez un état de verrou obsolète, `multica daemon restart` le libère ; il n'y a rien à supprimer manuellement.
+
+</Tab>
+</Tabs>
-## L'outil de codage IA ne démarre pas
+</Accordion>
+<Accordion title="L'outil de codage IA ne démarre pas" id="ai-coding-tool-fails-to-start" value="ai-coding-tool-fails-to-start">
Un daemon en ligne ne signifie pas que l'outil lui-même fonctionne. Ouvrez l'enregistrement détaillé de l'exécution et vérifiez en priorité :
@@ -97,7 +161,8 @@ Un daemon en ligne ne signifie pas que l'outil lui-même fonctionne. Ouvrez l'en
Exécutez d'abord ce même outil directement dans un terminal sur l'ordinateur d'exécution. Si l'outil ne démarre pas seul, corrigez sa connexion ou sa configuration, puis relancez l'exécution depuis le journal d'exécution.
-## Les exécutions se bloquent sur macOS après une mise à jour du CLI
+</Accordion>
+<Accordion title="Les exécutions se bloquent sur macOS après une mise à jour du CLI" id="runs-hang-on-macos-after-a-cli-upgrade" value="runs-hang-on-macos-after-a-cli-upgrade">
Après la mise à jour du CLI `multica` installé avec Homebrew, par `brew upgrade`, `multica update`, **Mettre à jour** sur la page **Runtimes** ou la mise à jour automatique du daemon, une exécution qui lit `~/Desktop`, `~/Documents`, `~/Downloads`, iCloud Drive ou un autre dossier protégé peut cesser de progresser : le processus de l'agent n'utilise plus de CPU, et l'exécution ne se termine ni n'échoue.
@@ -111,7 +176,13 @@ Pour rétablir l'accès :
Répétez ces étapes après chaque mise à jour du CLI. La mise à jour automatique n'est activée par défaut que pour les daemons connectés à Multica Cloud ; démarrez le daemon avec `--no-auto-update` pour que les mises à jour n'aient lieu que lorsque vous les lancez. Le CLI intégré à [Multica Desktop](/desktop-app) est signé avec un Developer ID, ses autorisations survivent donc aux mises à jour.
-## Les mises à jour en temps réel ne fonctionnent plus
+</Accordion>
+</Accordions>
+
+## Application web et service auto-hébergé
+
+<Accordions>
+<Accordion title="Les mises à jour en temps réel ne fonctionnent plus" id="realtime-updates-stop-working" value="realtime-updates-stop-working">
Si les exécutions se déroulent toujours mais que les commentaires et les changements de statut n'apparaissent plus en direct, c'est généralement que le WebSocket n'est pas connecté.
@@ -122,9 +193,9 @@ Vérifiez la connexion `/ws` sous **Network → WS** (Réseau) dans les outils d
- Si le proxy inverse transmet la requête WebSocket Upgrade.
- Si la connexion du navigateur a expiré.
-Qu'un simple `curl` sur `/ws` renvoie HTTP 400 est normal : le point de terminaison exige des paramètres de requête propres à l'espace de travail et rejette une poignée de main nue avant toute mise à niveau WebSocket. Un 400/401 enregistré dans les journaux du backend prouve donc seulement que le routage HTTP ordinaire atteint le backend — il ne prouve pas que le proxy préserve les en-têtes WebSocket `Upgrade`. Pour vérifier la connexion réelle, ouvrez les DevTools du navigateur → onglet Network → WS (ou utilisez un client compatible WebSocket) et recherchez une poignée de main `101`.
+Qu'un simple `curl` sur `/ws` renvoie HTTP 400 est normal : le point de terminaison exige des paramètres de requête propres à l'espace de travail et rejette une poignée de main nue avant toute mise à niveau WebSocket. Un 400/401 enregistré dans les journaux du backend prouve donc seulement que le routage HTTP ordinaire atteint le backend ; il ne prouve pas que le proxy préserve les en-têtes WebSocket `Upgrade`. Pour vérifier la connexion réelle, ouvrez les DevTools du navigateur → onglet Network → WS (ou utilisez un client compatible WebSocket) et recherchez une poignée de main `101`.
-Remarque pour l'auto-hébergement : les daemons se connectent à `/api/daemon/ws` pour leur connexion longue durée (et non à `/ws`) — routez ce chemin vers le backend de la même façon. Si la poignée de main WebSocket y échoue, le daemon se rabat silencieusement sur l'interrogation périodique (polling) ; des lignes `status=400` répétées sur ce chemin dans le journal du backend en sont le symptôme.
+En auto-hébergement, notez aussi que les daemons se connectent à `/api/daemon/ws` pour leur connexion longue durée (et non à `/ws`) : routez ce chemin vers le backend de la même façon. Si la poignée de main WebSocket y échoue, le daemon se rabat silencieusement sur l'interrogation périodique (polling), et des lignes `status=400` répétées sur ce chemin apparaissent dans le journal du backend.
Les conteneurs ne lisent `.env` qu'au moment de leur création ; recréez-les après une modification :
@@ -132,38 +203,10 @@ Les conteneurs ne lisent `.env` qu'au moment de leur création ; recréez-les ap
docker compose -f docker-compose.selfhost.yml up -d
```
-Pour un exemple complet de proxy inverse, consultez le [démarrage rapide de l'auto-hébergement](/self-host-quickstart#3-choisir-le-mode-daccès).
-
-## `multica setup` signale que le serveur est injoignable
-
-La sonde d'accessibilité du CLI envoie une requête GET à `<server-url>/health` et attend un 200. C'est le backend qui sert ce chemin. Les versions actuelles de l'application web transmettent `/health` au backend, mais pas les plus anciennes — un proxy inverse qui transmet tout à un tel frontend ancien renvoie 404, et le CLI en conclut que le serveur est hors service alors que la pile fonctionne correctement.
-
-Router explicitement `/health` vers le backend (port 8080) dans votre proxy fonctionne avec toutes les versions — les deux exemples Caddy du [démarrage rapide de l'auto-hébergement](/self-host-quickstart#3-choisir-le-mode-daccès) le font. Vérifiez avec :
-
-```bash
-curl -fsS <server-url>/health
-```
+Pour un exemple complet de proxy inverse, consultez le [démarrage rapide de l'auto-hébergement](/self-host-quickstart#remote-access).
-## `multica login` échoue avec un dépassement de délai de la poignée de main TLS
-
-`multica login` ouvre le navigateur et la connexion web aboutit, mais le CLI échoue quand même avec « Sign-in did not complete » ou « TLS handshake timed out ». `multica --debug login` affiche `net/http: TLS handshake timeout` sur `POST /api/tokens`, alors que `curl.exe -I https://api.multica.ai` ou un navigateur sur la même machine se connecte sans problème.
-
-La connexion TCP s'ouvre, mais la poignée de main TLS n'aboutit jamais. Les clients Go, dont le CLI et le daemon Multica, envoient par défaut un partage de clé post-quantique dans le ClientHello TLS, ce qui porte sa taille à environ 1,5 Ko et le répartit sur deux paquets. Certains logiciels de sécurité, VPN, routeurs et pare-feu abandonnent ces poignées de main ; curl envoie un ClientHello beaucoup plus petit et passe.
-
-Confirmez la cause en réessayant avec le partage de clé post-quantique désactivé :
-
-```powershell
-$env:GODEBUG = 'tlsmlkem=0'
-multica --debug login
-```
-
-```bash
-GODEBUG=tlsmlkem=0 multica --debug login
-```
-
-Si cela fonctionne, définissez `GODEBUG=tlsmlkem=0` de façon permanente pour l'utilisateur qui exécute le CLI et le daemon — sous Windows, exécutez `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` et ouvrez un nouveau terminal —, puis redémarrez le daemon ou l'application de bureau. Augmenter `MULTICA_HTTP_TIMEOUT` n'aide pas : cette variable ne régit pas la poignée de main. La correction durable se fait côté réseau : mettez à jour ou reconfigurez l'appareil ou le logiciel qui abandonne les poignées de main TLS fragmentées.
-
-## Les e-mails de code de vérification et d'invitation ne sont pas reçus
+</Accordion>
+<Accordion title="Les e-mails de code de vérification et d'invitation ne sont pas reçus" id="verification-code-and-invitation-emails-not-delivered" value="verification-code-and-invitation-emails-not-delivered">
Consultez d'abord le journal de démarrage du backend. Il indique si le serveur utilise `SMTP relay`, `Resend API` ou `DEV mode` :
@@ -182,7 +225,8 @@ Lorsque `SMTP_HOST` et Resend sont tous deux configurés, Multica privilégie SM
En production, ne vous fiez pas aux codes écrits dans le journal et n'activez pas le code de test local fixe.
</Callout>
-## L'envoi ou le téléchargement de pièces jointes échoue
+</Accordion>
+<Accordion title="L'envoi ou le téléchargement de pièces jointes échoue" id="attachment-uploads-or-downloads-fail" value="attachment-uploads-or-downloads-fail">
Consultez d'abord le journal du backend et le code de statut de la réponse. Causes fréquentes :
@@ -193,7 +237,8 @@ Consultez d'abord le journal du backend et le code de statut de la réponse. Cau
Avec Docker Compose, le volume `backend_uploads` par défaut stocke les pièces jointes locales. La recréation des conteneurs ne le supprime pas, mais `docker compose down -v` supprime le volume de données. Pour la configuration S3, consultez [Variables d'environnement](/environment-variables#stockage-des-pièces-jointes).
-## La consommation affiche zéro
+</Accordion>
+<Accordion title="La consommation affiche zéro" id="usage-shows-zero" value="usage-shows-zero">
La page **Statistiques** (onglet **Consommation**) lit des agrégats horaires, et non la consommation brute de chaque exécution. Vérifiez d'abord les données brutes et la table d'agrégats :
@@ -208,17 +253,18 @@ ORDER BY plan_time DESC
LIMIT 20;
```
-Si `task_usage` contient des lignes, que la table d'agrégats est vide et que les enregistrements du planificateur montrent des échecs, vérifiez d'abord que toutes les migrations ont été appliquées ; si la migration 103 a refusé la mise à niveau, consultez la section suivante. Vous pouvez aussi lancer une agrégation manuellement pour distinguer les problèmes SQL des problèmes de planification :
+Si `task_usage` contient des lignes, que la table d'agrégats est vide et que les enregistrements du planificateur montrent des échecs, vérifiez d'abord que toutes les migrations ont été appliquées ; si la migration 103 a refusé la mise à niveau, consultez [La migration 103 bloque une mise à niveau](#migration-103-blocks-an-upgrade). Vous pouvez aussi lancer une agrégation manuellement pour distinguer les problèmes SQL des problèmes de planification :
```sql
SELECT rollup_task_usage_hourly();
```
-Si les chiffres semblent corrects après un lancement manuel, la fonction d'agrégation fonctionne et le problème vient de la planification intégrée du backend ; le SQL manuel ne produit qu'une seule agrégation et ne rétablit pas la planification. Les agrégats horaires sont calculés par le planificateur intégré du backend — vous n'avez pas besoin de configurer pg_cron vous-même.
+Si les chiffres semblent corrects après un lancement manuel, la fonction d'agrégation fonctionne et le problème vient de la planification intégrée du backend ; le SQL manuel ne produit qu'une seule agrégation et ne rétablit pas la planification. Les agrégats horaires sont calculés par le planificateur intégré du backend : vous n'avez pas besoin de configurer pg_cron vous-même.
-## La migration 103 bloque une mise à niveau
+</Accordion>
+<Accordion title="La migration 103 bloque une mise à niveau" id="migration-103-blocks-an-upgrade" value="migration-103-blocks-an-upgrade">
-Une mise à niveau normale ne nécessite aucune action pour la 103 : `migrate up` remplit automatiquement et rétroactivement les données historiques de consommation avant de l'appliquer — une base de données vide passe directement, et les instances qui ont un historique sont complétées mois par mois avant de poursuivre.
+Une mise à niveau normale ne nécessite aucune action pour la 103 : `migrate up` remplit automatiquement et rétroactivement les données historiques de consommation avant de l'appliquer. Une base de données vide passe directement, et les instances qui ont un historique sont complétées mois par mois avant de poursuivre.
Si le backend ne démarre toujours pas et affiche `refusing to drop legacy daily rollups`, le remplissage rétroactif automatique n'a pas abouti (par exemple, il a échoué en cours de route, ou le SQL a été appliqué directement au lieu de passer par `migrate up`). Lancez manuellement la commande de remplissage rétroactif, puis redémarrez le backend :
@@ -227,19 +273,35 @@ cd server
DATABASE_URL='postgres://...' go run ./cmd/backfill_task_usage_hourly
```
-Options utiles : `--dry-run` affiche un aperçu sans rien écrire ; `--sleep-between-slices` ajoute une pause entre les tranches pour réduire la pression en lecture sur une instance chargée. La commande travaille par tranches mensuelles et est idempotente — relancez-la directement après une interruption. Elle détient un verrou consultatif (advisory lock) et s'exclut mutuellement avec l'agrégation planifiée du serveur ; elle ne peut donc pas produire de données d'agrégation dupliquées ou incohérentes. Une fois terminée, redémarrez le backend et vérifiez que `migrations` vaut `ok` sur `/readyz`.
+Options utiles : `--dry-run` affiche un aperçu sans rien écrire ; `--sleep-between-slices` ajoute une pause entre les tranches pour réduire la pression en lecture sur une instance chargée. La commande travaille par tranches mensuelles et est idempotente : relancez-la directement après une interruption. Elle détient un verrou consultatif (advisory lock) et s'exclut mutuellement avec l'agrégation planifiée du serveur ; elle ne peut donc pas produire de données d'agrégation dupliquées ou incohérentes. Une fois terminée, redémarrez le backend et vérifiez que `migrations` vaut `ok` sur `/readyz`.
-## Port déjà utilisé
+</Accordion>
+<Accordion title="Port déjà utilisé" id="port-already-in-use" value="port-already-in-use">
Les ports locaux courants sont `8080` pour l'API, `3000` pour l'application web, et le port de vérification d'état du daemon. Identifiez d'abord le processus qui occupe le port :
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+lsof -nP -iTCP:8080 -sTCP:LISTEN
+```
+
+</Tab>
+<Tab value="Windows">
+
```bash
-lsof -nP -iTCP:8080 -sTCP:LISTEN # macOS / Linux
-netstat -ano | findstr :8080 # Windows
+netstat -ano | findstr :8080
```
+</Tab>
+</Tabs>
+
S'il s'agit d'une autre copie de travail (checkout) de Multica, exécutez d'abord `make stop` dans ce répertoire. Sinon, arrêtez normalement le programme en cause, ou changez le port du service actuel. Les ports publics 80/443 sont écoutés par un proxy inverse tel que Caddy ou Nginx.
+</Accordion>
+</Accordions>
+
## Emplacement des journaux
| Composant | Comment consulter |
@@ -252,7 +314,7 @@ S'il s'agit d'une autre copie de travail (checkout) de Multica, exécutez d'abor
| Backend Docker | `docker compose -f docker-compose.selfhost.yml logs -f backend` |
| Navigateur | Onglets Console et Network (Réseau) des outils de développement |
-Le fichier actif parmi ceux-ci dépend du profil avec lequel le daemon a été démarré, et un journal obsolète laissé par un daemon précédent reste parfaitement lisible — c'est le moyen le plus simple de déboguer le mauvais fichier. N'en ouvrez pas un au hasard : `multica daemon logs` affiche le chemin absolu qu'il a résolu avant d'en diffuser le contenu. Ajoutez `--profile <name>` pour lire le journal d'un profil nommé.
+Le fichier actif parmi ceux-ci dépend du profil avec lequel le daemon a été démarré, et un journal obsolète laissé par un daemon précédent reste parfaitement lisible : c'est le moyen le plus simple de déboguer le mauvais fichier. N'en ouvrez pas un au hasard : `multica daemon logs` affiche le chemin absolu qu'il a résolu avant d'en diffuser le contenu. Ajoutez `--profile <name>` pour lire le journal d'un profil nommé.
Pour observer directement le démarrage du daemon, exécutez-le plutôt au premier plan :
diff --git a/apps/docs/content/docs/troubleshooting.ja.mdx b/apps/docs/content/docs/troubleshooting.ja.mdx
index 9ef86fb432..2fa43150ef 100644
--- a/apps/docs/content/docs/troubleshooting.ja.mdx
+++ b/apps/docs/content/docs/troubleshooting.ja.mdx
@@ -4,8 +4,13 @@ description: 接続、実行、リアルタイム更新、メール、セルフ
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
-まず、問題がどの層で起きているかを切り分けます。Multica サービス、デーモン、ランタイム、AI コーディングツールのどれかです。多くの場合、次のコマンドだけで最初の有効なエラーが見つかります:
+まず、問題がどの層で起きているかを切り分けます。Multica サービス、デーモン、ランタイム、AI コーディングツールのどれかです。多くの場合、次のコマンドだけで最初の有効なエラーが見つかります。
+
+<Tabs items={["すべてのインストール方法", "セルフホストサービス"]}>
+<Tab value="すべてのインストール方法">
```bash
multica version
@@ -14,18 +19,25 @@ multica daemon status --output json
multica daemon logs --lines 100
```
-セルフホストインスタンスでは、サービスを直接確認することもできます:
+</Tab>
+<Tab value="セルフホストサービス">
```bash
curl -i https://api.example.com/health
curl -i https://api.example.com/readyz
```
+</Tab>
+</Tabs>
+
`/health` は API プロセスが応答していることだけを示します。`/readyz` はデータベースと migration も確認します。問題を報告するときは、エラー、関連ログ、CLI バージョン、OS を含め、トークンやメールアドレスなどの機微情報は提出前に取り除いてください。
-## デーモンが接続できない
+## 接続とログイン
+
+<Accordions>
+<Accordion title="デーモンが接続できない" id="daemon-fails-to-connect" value="daemon-fails-to-connect">
-まず次を実行します:
+まず次を実行します。
```bash
multica auth status
@@ -41,33 +53,80 @@ multica daemon logs --lines 100
- 現在のアカウントが対象ワークスペースのメンバーではなくなっている。
- サポートされている AI コーディングツールがこのマシンに 1 つもインストールされておらず、デーモンが起動できない。
-再ログインしてデーモンを再起動します:
+再ログインしてデーモンを再起動します。
```bash
multica login
multica daemon restart
```
-セルフホストのデプロイでは、さらに**実行用コンピューター**から API の `/health` をリクエストしてください。サーバー本体でのテストでは、実行用コンピューター側の DNS、TLS、ファイアウォールの問題は見えません。アドレスを変更する場合は `multica setup self-host` を再実行するか、現在のプロファイルの `server_url` を確認します:
+セルフホストのデプロイでは、さらに**実行用コンピューター**から API の `/health` をリクエストしてください。サーバー本体でのテストでは、実行用コンピューター側の DNS、TLS、ファイアウォールの問題は見えません。アドレスを変更する場合は `multica setup self-host` を再実行するか、現在のプロファイルの `server_url` を確認します。
```bash
multica config show
```
-## タスクの実行が始まらない
+</Accordion>
+<Accordion title={<><code>multica setup</code> がサーバーに到達できないと報告する</>} id="multica-setup-reports-the-server-is-not-reachable" value="multica-setup-reports-the-server-is-not-reachable">
+
+CLI の到達確認は `<server-url>/health` に GET を送り、200 を要求します。backend はこのパスを提供します。現在の web リリースは `/health` を backend へ転送しますが、古いリリースは転送しません。すべてのトラフィックを古い frontend へ転送するリバースプロキシでは 404 が返り、CLI は稼働中のサーバーを到達不能と判断します。
+
+プロキシで `/health` を backend(ポート 8080)へ明示的に転送すれば、すべてのリリースで動作します。[セルフホストクイックスタート](/self-host-quickstart#remote-access)の 2 つの Caddy 例に含まれています。確認方法:
+
+```bash
+curl -fsS <server-url>/health
+```
+
+</Accordion>
+<Accordion title={<><code>multica login</code> が TLS ハンドシェイクのタイムアウトで失敗する</>} id="multica-login-fails-with-a-tls-handshake-timeout" value="multica-login-fails-with-a-tls-handshake-timeout">
+
+`multica login` でブラウザが開き、Web 側のサインインは完了するのに、CLI は「Sign-in did not complete」または「TLS handshake timed out」で失敗します。`multica --debug login` では `POST /api/tokens` に `net/http: TLS handshake timeout` と表示され、同じマシンの `curl.exe -I https://api.multica.ai` やブラウザは問題なく接続できます。
+
+TCP 接続は確立されますが、TLS ハンドシェイクが完了しません。Multica CLI とデーモンを含む Go クライアントは、既定で TLS ClientHello にポスト量子鍵交換を含めるため、ClientHello が約 1.5 KB になり 2 つのパケットに分割されます。一部のセキュリティソフト、VPN、ルーター、ファイアウォールはこのようなハンドシェイクを破棄します。curl の ClientHello はずっと小さいため通過します。
+
+ポスト量子鍵交換を無効にして再試行し、原因を確認します。
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+GODEBUG=tlsmlkem=0 multica --debug login
+```
+
+</Tab>
+<Tab value="Windows">
+
+```powershell
+$env:GODEBUG = 'tlsmlkem=0'
+multica --debug login
+```
+
+</Tab>
+</Tabs>
+
+これで成功する場合は、CLI とデーモンを実行するユーザーに対して `GODEBUG=tlsmlkem=0` を恒久的に設定し(Windows では `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` を実行して新しいターミナルを開く)、デーモンまたはデスクトップアプリを再起動してください。`MULTICA_HTTP_TIMEOUT` を大きくしても効果はありません。ハンドシェイクはこの設定の対象外です。根本的な解決はネットワーク側で行います。分割された TLS ハンドシェイクを破棄する機器やソフトウェアを更新または再設定してください。
+
+</Accordion>
+</Accordions>
+
+## 実行と AI コーディングツール
+
+<Accordions>
+<Accordion title="タスクの実行が始まらない" id="issue-does-not-start-executing" value="issue-does-not-start-executing">
タスクの**実行ログ**を開き、まず実行の現在のステータスと待機理由を確認します。
-### `queued` ステータス
+<Tabs items={["queued", "waiting_local_directory"]}>
+<Tab value="queued">
-`queued` は、実行がまだランタイムに引き受けられるのを待っている状態です。順に確認します:
+`queued` は、実行がまだランタイムに引き受けられるのを待っている状態です。順に確認します。
1. エージェントに紐付いたランタイムはオンラインか。
2. ランタイムは、そのエージェントに設定された AI コーディングツールを検出しているか。
3. エージェントに利用可能な同時実行枠が残っているか。
4. デーモンに全体の実行キャパシティが残っているか。
-エージェントはデフォルトで最大 6 件、1 つのデーモンはデフォルトで最大 20 件の実行を同時に処理します。上限に達すると、新しい実行は進行中のものが終わるまでキューに残ります。ランタイムがオフラインの間も実行はキューに残り続け、そのランタイムが再接続猶予を超えてハートビートを停止し、かつ実行自体も同じ時間待った場合にのみ失敗します。取り込み中のランタイムの後ろに長い待ち行列ができても待ち時間を理由に失効することはなく、すでにオフラインのマシンに割り当てた場合も復帰させるための猶予がまるまる 1 回分残ります。
+エージェントはデフォルトで最大 6 件、1 つのデーモンはデフォルトで最大 20 件の実行を同時に処理します。上限に達すると、新しい実行は進行中のものが終わるまでキューに残ります。ランタイムがオフラインの間も実行はキューに残り続け、そのランタイムが再接続猶予を超えてハートビートを停止し、かつ実行自体も同じ時間待った場合にのみ失敗します。そのため、取り込み中のランタイムの後ろに長い待ち行列ができても待ち時間を理由に失効することはなく、すでにオフラインのマシンに割り当てた場合も復帰させるための猶予がまるまる 1 回分残ります。
```bash
multica daemon status --output json
@@ -77,7 +136,8 @@ multica issue runs <issue-id>
ランタイム一覧に期待するツールが表示されない場合は、まず同じシステムアカウントと `PATH` でツールが実行でき、ログイン済みであることを確認してから、`multica daemon restart` を実行してください。
-### `waiting_local_directory` ステータス
+</Tab>
+<Tab value="waiting_local_directory">
これは、進行中の別の実行が同じローカルディレクトリを使っていることを意味します。2 つのエージェントが同じファイルを同時に変更しないよう、Multica はディレクトリロックの解放を待ちます。
@@ -85,9 +145,13 @@ multica issue runs <issue-id>
そうでなければ、通常は前の実行が終わるのを待つだけで十分です。前の実行が固まっている場合は、その実行ログから停止するか、現在のエージェントに別のローカルディレクトリを選んでください。このディレクトリの排他はデーモンがメモリ内で管理しており、ディスクにロックファイルは書き込まれません。ロック状態が異常だと疑われる場合は `multica daemon restart` で解放されます。手動で削除すべきファイルはありません。
-## AI コーディングツールが起動しない
+</Tab>
+</Tabs>
+
+</Accordion>
+<Accordion title="AI コーディングツールが起動しない" id="ai-coding-tool-fails-to-start" value="ai-coding-tool-fails-to-start">
-デーモンがオンラインでも、ツール自体が使えるとは限りません。その実行の詳細記録を開き、次を重点的に確認します:
+デーモンがオンラインでも、ツール自体が使えるとは限りません。その実行の詳細記録を開き、次を重点的に確認します。
- ツールのログインが完了しているか。
- API key、クォータ、モデルの権限が利用可能か。
@@ -97,7 +161,8 @@ multica issue runs <issue-id>
まず実行用コンピューターのターミナルで、同じツールを直接実行してください。ツール単体でも起動できない場合は、先にツールのログインや設定を修復してから、実行ログから実行を再試行します。
-## CLI のアップグレード後に macOS で実行が止まる
+</Accordion>
+<Accordion title="CLI のアップグレード後に macOS で実行が止まる" id="runs-hang-on-macos-after-a-cli-upgrade" value="runs-hang-on-macos-after-a-cli-upgrade">
Homebrew でインストールした `multica` CLI が `brew upgrade`、`multica update`、**ランタイム**ページの**更新**、またはデーモンの自動更新でアップグレードされた後、`~/Desktop`、`~/Documents`、`~/Downloads`、iCloud Drive などの保護されたフォルダーを読み取る実行が進まなくなることがあります。エージェントのプロセスは CPU を使わず、実行は完了も失敗もしません。
@@ -111,61 +176,39 @@ Homebrew でインストールした `multica` CLI が `brew upgrade`、`multica
CLI をアップグレードするたびにこの手順を繰り返してください。自動更新がデフォルトで有効なのは Multica Cloud に接続したデーモンだけです。`--no-auto-update` を付けてデーモンを起動すると、手動で実行したときだけアップグレードされます。[Multica Desktop](/desktop-app) に同梱の CLI は Developer ID で署名されているため、アップグレード後も許可が維持されます。
-## リアルタイム更新が届かない
+</Accordion>
+</Accordions>
+
+## Web アプリとセルフホストサービス
+
+<Accordions>
+<Accordion title="リアルタイム更新が届かない" id="realtime-updates-stop-working" value="realtime-updates-stop-working">
実行は進むのに、コメントやステータスがリアルタイムに反映されない場合は、たいてい WebSocket がつながっていません。
-ブラウザ開発者ツールの **Network → WS** で `/ws` 接続を確認します。セルフホストのデプロイでは、次を重点的に確認します:
+ブラウザ開発者ツールの **Network → WS** で `/ws` 接続を確認します。セルフホストのデプロイでは、次を重点的に確認します。
- `FRONTEND_ORIGIN` が、ブラウザで実際に開いているアドレスと一致しているか。
- HTTPS のページが `wss://` で接続しているか。
- リバースプロキシが WebSocket の Upgrade リクエストを転送しているか。
- ブラウザのログインが期限切れになっていないか。
-`curl` で `/ws` にアクセスして HTTP 400 が返るのは正常な動作です: このエンドポイントは workspace を指定するクエリパラメータを要求し、それらがないハンドシェイクは WebSocket アップグレードの前に拒否されます。したがって backend ログに 400/401 の記録があっても、通常の HTTP ルーティングが backend まで届いたことしか証明しません — プロキシが WebSocket `Upgrade` ヘッダーを保持していることの証明にはなりません。実際の接続を確認するには、ブラウザの DevTools → Network → WS タブ(または WebSocket 対応クライアント)で `101` ハンドシェイクが成立しているかを見てください。
+`curl` で `/ws` にアクセスして HTTP 400 が返るのは正常な動作です。このエンドポイントは workspace を指定するクエリパラメータを要求し、それらがないハンドシェイクは WebSocket アップグレードの前に拒否されます。したがって backend ログに 400/401 の記録があっても、それが証明するのは通常の HTTP ルーティングが backend まで届いたことだけで、プロキシが WebSocket `Upgrade` ヘッダーを保持していることの証明にはなりません。実際の接続を確認するには、ブラウザの DevTools → Network → WS タブ(または WebSocket 対応クライアント)で `101` ハンドシェイクが成立しているかを見てください。
-セルフホストの注意: デーモンの長時間接続は `/api/daemon/ws` に向かいます(`/ws` ではありません)。同じように backend へ転送してください。ハンドシェイクが失敗するとデーモンは通知なくポーリングへフォールバックし、backend ログでこのパスに `status=400` が繰り返し現れるのがその兆候です。
+セルフホストでは、デーモンの長時間接続が `/api/daemon/ws` に向かう点(`/ws` ではありません)にも注意してください。同じように backend へ転送する必要があります。ここでハンドシェイクが失敗するとデーモンは通知なくポーリングへフォールバックし、backend ログでこのパスに `status=400` が繰り返し現れます。
-コンテナは作成時にしか `.env` を読み込みません。変更後は再作成してください:
+コンテナは作成時にしか `.env` を読み込みません。変更後は再作成してください。
```bash
docker compose -f docker-compose.selfhost.yml up -d
```
-完全なリバースプロキシの例は[セルフホストクイックスタート](/self-host-quickstart#3-アクセス方法を選ぶ)を参照してください。
-
-## `multica setup` がサーバーに到達できないと報告する
+完全なリバースプロキシの例は[セルフホストクイックスタート](/self-host-quickstart#remote-access)を参照してください。
-CLI の到達確認は `<server-url>/health` に GET を送り、200 を要求します。backend はこのパスを提供します。現在の web リリースは `/health` を backend へ転送しますが、古いリリースはそうではないため、すべてのトラフィックを古い frontend へ転送するリバースプロキシでは 404 が返り、CLI は稼働中のサーバーを到達不能と誤判定します。
+</Accordion>
+<Accordion title="認証コードや招待メールが届かない" id="verification-code-and-invitation-emails-not-delivered" value="verification-code-and-invitation-emails-not-delivered">
-プロキシで `/health` を backend(ポート 8080)へ明示的に転送すれば、すべてのリリースで動作します。[セルフホストクイックスタート](/self-host-quickstart#3-アクセス方法を選ぶ)の 2 つの Caddy 例に含まれています。確認方法:
-
-```bash
-curl -fsS <server-url>/health
-```
-
-## `multica login` が TLS ハンドシェイクのタイムアウトで失敗する
-
-`multica login` でブラウザが開き、Web 側のサインインは完了するのに、CLI は「Sign-in did not complete」または「TLS handshake timed out」で失敗します。`multica --debug login` では `POST /api/tokens` に `net/http: TLS handshake timeout` と表示され、同じマシンの `curl.exe -I https://api.multica.ai` やブラウザは問題なく接続できます。
-
-TCP 接続は確立されますが、TLS ハンドシェイクが完了しません。Multica CLI とデーモンを含む Go クライアントは、既定で TLS ClientHello にポスト量子鍵交換を含めるため、ClientHello が約 1.5 KB になり 2 つのパケットに分割されます。一部のセキュリティソフト、VPN、ルーター、ファイアウォールはこのようなハンドシェイクを破棄します。curl の ClientHello はずっと小さいため通過します。
-
-ポスト量子鍵交換を無効にして再試行し、原因を確認します:
-
-```powershell
-$env:GODEBUG = 'tlsmlkem=0'
-multica --debug login
-```
-
-```bash
-GODEBUG=tlsmlkem=0 multica --debug login
-```
-
-これで成功する場合は、CLI とデーモンを実行するユーザーに対して `GODEBUG=tlsmlkem=0` を恒久的に設定し(Windows では `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` を実行して新しいターミナルを開く)、デーモンまたはデスクトップアプリを再起動してください。`MULTICA_HTTP_TIMEOUT` を大きくしても効果はありません。ハンドシェイクはこの設定の対象外です。根本的な解決はネットワーク側で行います。分割された TLS ハンドシェイクを破棄する機器やソフトウェアを更新または再設定してください。
-
-## 認証コードや招待メールが届かない
-
-まず backend の起動ログを確認します。ログには、現在使っているのが `SMTP relay`、`Resend API`、`DEV mode` のどれかが表示されます:
+まず backend の起動ログを確認します。ログには、現在使っているのが `SMTP relay`、`Resend API`、`DEV mode` のどれかが表示されます。
```bash
docker compose -f docker-compose.selfhost.yml logs backend \
@@ -182,7 +225,8 @@ docker compose -f docker-compose.selfhost.yml logs backend \
プロダクションではログ内の認証コードに依存せず、固定のローカルテスト認証コードも有効にしないでください。
</Callout>
-## 添付ファイルのアップロードやダウンロードが失敗する
+</Accordion>
+<Accordion title="添付ファイルのアップロードやダウンロードが失敗する" id="attachment-uploads-or-downloads-fail" value="attachment-uploads-or-downloads-fail">
まず backend ログとレスポンスのステータスコードを確認します。よくある原因:
@@ -193,9 +237,10 @@ docker compose -f docker-compose.selfhost.yml logs backend \
Docker Compose では、デフォルトの `backend_uploads` volume がローカル添付ファイルを保存します。コンテナの再作成では削除されませんが、`docker compose down -v` はデータボリュームを削除します。S3 関連の設定は[環境変数](/environment-variables#添付ファイルストレージ)を参照してください。
-## 使用量(Usage)が 0 のまま
+</Accordion>
+<Accordion title="使用量(Usage)が 0 のまま" id="usage-shows-zero" value="usage-shows-zero">
-Usage ページは 1 時間ごとのロールアップを読み取り、各実行の生の使用量を直接読みません。まず生データとロールアップテーブルを確認します:
+Usage ページは 1 時間ごとのロールアップを読み取り、各実行の生の使用量を直接読みません。まず生データとロールアップテーブルを確認します。
```sql
SELECT count(*) FROM task_usage;
@@ -208,7 +253,7 @@ ORDER BY plan_time DESC
LIMIT 20;
```
-`task_usage` にデータがあり、ロールアップテーブルが空で、スケジューラーの記録が失敗を示している場合は、まず migration がすべて適用されていることを確認してください。migration 103 に拒否されてアップグレードできない場合は、次のセクションを参照してください。SQL の問題とスケジューリングの問題を切り分けるため、手動でロールアップを 1 回実行することもできます:
+`task_usage` にデータがあり、ロールアップテーブルが空で、スケジューラーの記録が失敗を示している場合は、まず migration がすべて適用されていることを確認してください。migration 103 に拒否されてアップグレードできない場合は、[Migration 103 がアップグレードを妨げる](#migration-103-blocks-an-upgrade)を参照してください。SQL の問題とスケジューリングの問題を切り分けるため、手動でロールアップを 1 回実行することもできます。
```sql
SELECT rollup_task_usage_hourly();
@@ -216,11 +261,12 @@ SELECT rollup_task_usage_hourly();
手動実行後に数値が正しければ、ロールアップ関数は動作しており、問題は backend の定期スケジューリング側にあります。手動 SQL は 1 回分のロールアップを補うだけで、スケジューリングを復旧させません。1 時間ごとのロールアップは backend 内蔵のスケジューラーが実行するため、pg_cron を自分で設定する必要はありません。
-## Migration 103 の失敗
+</Accordion>
+<Accordion title="Migration 103 がアップグレードを妨げる" id="migration-103-blocks-an-upgrade" value="migration-103-blocks-an-upgrade">
通常のアップグレードでは、103 のために何かをする必要はありません。`migrate up` は適用前に過去の使用量データを自動でバックフィルします。空のデータベースはそのまま通過し、履歴のあるインスタンスは月ごとに補完されてから続行します。
-それでも backend の起動が `refusing to drop legacy daily rollups` で失敗する場合は、自動バックフィルが完了していません(途中で失敗した、または `migrate up` を通さず SQL を直接適用した、など)。その場合はバックフィルコマンドを手動で実行し、完了後に backend を再起動します:
+それでも backend の起動が `refusing to drop legacy daily rollups` で失敗する場合は、自動バックフィルが完了していません(途中で失敗した、または `migrate up` を通さず SQL を直接適用した、など)。その場合はバックフィルコマンドを手動で実行し、完了後に backend を再起動します。
```bash
cd server
@@ -229,17 +275,33 @@ DATABASE_URL='postgres://...' go run ./cmd/backfill_task_usage_hourly
よく使うフラグ: `--dry-run` は書き込まずプレビューのみ、`--sleep-between-slices` はスライスの間に間隔を挟み、負荷の高いインスタンスへの読み取り圧力を下げます。コマンドは月単位のスライスで動作し、冪等なので、中断してもそのまま再実行できます。advisory lock を保持してサーバー側の定期ロールアップと相互排他になるため、重複や不整合なロールアップデータは生じません。完了後は backend を再起動し、`/readyz` で `migrations` が `ok` になっていることを確認してください。
-## ポートが使用中
+</Accordion>
+<Accordion title="ポートが使用中" id="port-already-in-use" value="port-already-in-use">
+
+ローカルでよく使うポートは、API の `8080`、Web の `3000`、デーモンのヘルスチェックポートです。まず占有しているプロセスを特定します。
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+lsof -nP -iTCP:8080 -sTCP:LISTEN
+```
-ローカルでよく使うポートは、API の `8080`、Web の `3000`、デーモンのヘルスチェックポートです。まず占有しているプロセスを特定します:
+</Tab>
+<Tab value="Windows">
```bash
-lsof -nP -iTCP:8080 -sTCP:LISTEN # macOS / Linux
-netstat -ano | findstr :8080 # Windows
+netstat -ano | findstr :8080
```
+</Tab>
+</Tabs>
+
それが別の Multica チェックアウトであれば、まずそのディレクトリで `make stop` を実行してください。そうでなければ、占有しているプログラムを通常の方法で停止するか、現在のサービスのポートを変更します。公開ポートの 80/443 は、Caddy や Nginx などのリバースプロキシがリッスンします。
+</Accordion>
+</Accordions>
+
## ログの場所
| コンポーネント | 確認方法 |
@@ -252,9 +314,9 @@ netstat -ano | findstr :8080 # Windows
| Docker backend | `docker compose -f docker-compose.selfhost.yml logs -f backend` |
| ブラウザ | 開発者ツールの Console と Network |
-どのファイルが現在有効なログかは、デーモンを起動したプロファイルによって決まります。以前のデーモンが残した古いログもそのまま読めてしまうため、誤ったファイルを調べてしまいがちです。当て推量でファイルを開かないでください: `multica daemon logs` は内容を流す前に、解決した絶対パスを表示します。名前付きプロファイルのログを読むときは `--profile <name>` を付けます。
+どのファイルが現在有効なログかは、デーモンを起動したプロファイルによって決まります。以前のデーモンが残した古いログもそのまま読めてしまうため、誤ったファイルを調べてしまいがちです。当て推量でファイルを開かないでください。`multica daemon logs` は内容を流す前に、解決した絶対パスを表示します。名前付きプロファイルのログを読むときは `--profile <name>` を付けます。
-デーモンの起動過程を直接観察したい場合は、フォアグラウンドで実行します:
+デーモンの起動過程を直接観察したい場合は、フォアグラウンドで実行します。
```bash
multica daemon stop
diff --git a/apps/docs/content/docs/troubleshooting.ko.mdx b/apps/docs/content/docs/troubleshooting.ko.mdx
index 2bba1eaa44..748c5f1c8b 100644
--- a/apps/docs/content/docs/troubleshooting.ko.mdx
+++ b/apps/docs/content/docs/troubleshooting.ko.mdx
@@ -4,9 +4,14 @@ description: 연결, 실행, 실시간 업데이트, 이메일, 자체 호스팅
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
먼저 문제가 Multica 서비스, 데몬, 런타임, AI 코딩 도구 중 어느 계층에서 발생하는지 확인하세요. 다음 명령만으로도 첫 번째 유효한 오류를 찾을 수 있는 경우가 많습니다.
+<Tabs items={["모든 설치 방식", "자체 호스팅 서비스"]}>
+<Tab value="모든 설치 방식">
+
```bash
multica version
multica auth status
@@ -14,16 +19,23 @@ multica daemon status --output json
multica daemon logs --lines 100
```
-자체 호스팅 인스턴스에서는 서비스를 직접 확인할 수도 있습니다.
+</Tab>
+<Tab value="자체 호스팅 서비스">
```bash
curl -i https://api.example.com/health
curl -i https://api.example.com/readyz
```
+</Tab>
+</Tabs>
+
`/health`는 API 프로세스가 응답한다는 것만 확인하고, `/readyz`는 데이터베이스와 migration도 확인합니다. 문제를 신고할 때는 오류, 관련 로그, CLI 버전, 운영체제를 포함하고 token과 이메일 같은 민감 정보는 제출 전에 제거하세요.
-## 데몬 연결 실패
+## 연결과 로그인
+
+<Accordions>
+<Accordion title="데몬 연결 실패" id="daemon-fails-to-connect" value="daemon-fails-to-connect">
먼저 다음을 실행합니다.
@@ -54,11 +66,58 @@ multica daemon restart
multica config show
```
-## 태스크 실행이 시작되지 않음
+</Accordion>
+<Accordion title={<><code>multica setup</code>이 서버에 도달할 수 없다고 보고함</>} id="multica-setup-reports-the-server-is-not-reachable" value="multica-setup-reports-the-server-is-not-reachable">
+
+CLI 도달 확인은 `<server-url>/health`에 GET을 보내 200을 기대합니다. backend는 이 경로를 제공합니다. 최신 web 릴리스는 `/health`를 backend로 전달하지만 구버전은 그렇지 않습니다. 모든 트래픽을 구버전 frontend로 전달하는 reverse proxy에서는 404가 반환되고, CLI는 정상 동작 중인 서버를 도달 불가로 판단합니다.
+
+프록시에서 `/health`를 backend(포트 8080)로 명시적으로 전달하면 모든 릴리스에서 동작합니다. [자체 호스팅 빠른 시작](/self-host-quickstart#remote-access)의 두 Caddy 예시에 모두 포함되어 있습니다. 확인 방법:
+
+```bash
+curl -fsS <server-url>/health
+```
+
+</Accordion>
+<Accordion title={<><code>multica login</code>이 TLS 핸드셰이크 시간 초과로 실패함</>} id="multica-login-fails-with-a-tls-handshake-timeout" value="multica-login-fails-with-a-tls-handshake-timeout">
+
+`multica login`이 브라우저를 열고 웹 로그인은 완료되지만 CLI는 "Sign-in did not complete" 또는 "TLS handshake timed out"으로 실패합니다. `multica --debug login`은 `POST /api/tokens`에서 `net/http: TLS handshake timeout`을 표시하며, 같은 컴퓨터의 `curl.exe -I https://api.multica.ai`나 브라우저는 정상적으로 연결됩니다.
+
+TCP 연결은 열리지만 TLS 핸드셰이크가 끝나지 않습니다. Multica CLI와 데몬을 포함한 Go 클라이언트는 기본적으로 TLS ClientHello에 양자내성 키 교환을 포함하므로 ClientHello가 약 1.5 KB가 되어 두 패킷으로 나뉩니다. 일부 보안 소프트웨어, VPN, 라우터, 방화벽은 이런 핸드셰이크를 버립니다. curl의 ClientHello는 훨씬 작아서 통과합니다.
+
+양자내성 키 교환을 끄고 다시 시도해 원인을 확인합니다.
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+GODEBUG=tlsmlkem=0 multica --debug login
+```
+
+</Tab>
+<Tab value="Windows">
+
+```powershell
+$env:GODEBUG = 'tlsmlkem=0'
+multica --debug login
+```
+
+</Tab>
+</Tabs>
+
+이렇게 해서 성공하면 CLI와 데몬을 실행하는 사용자에게 `GODEBUG=tlsmlkem=0`을 영구적으로 설정하고(Windows에서는 `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')`를 실행한 뒤 새 터미널을 여세요) 데몬 또는 데스크톱 앱을 다시 시작하세요. `MULTICA_HTTP_TIMEOUT`을 늘려도 도움이 되지 않습니다. 핸드셰이크는 이 설정의 영향을 받지 않습니다. 근본적인 해결은 네트워크 쪽에서 해야 합니다. 분할된 TLS 핸드셰이크를 버리는 장비나 소프트웨어를 업데이트하거나 재구성하세요.
+
+</Accordion>
+</Accordions>
+
+## 실행과 AI 코딩 도구
+
+<Accordions>
+<Accordion title="태스크 실행이 시작되지 않음" id="issue-does-not-start-executing" value="issue-does-not-start-executing">
태스크의 **실행 로그**를 열고 실행의 현재 상태와 대기 이유를 먼저 확인합니다.
-### `queued` 상태
+<Tabs items={["queued", "waiting_local_directory"]}>
+<Tab value="queued">
`queued`는 실행이 런타임에 수령되기를 기다리고 있다는 뜻입니다. 다음 순서로 확인하세요.
@@ -77,7 +136,8 @@ multica issue runs <issue-id>
런타임 목록에 예상한 도구가 없다면 같은 시스템 계정과 `PATH`에서 도구가 실행되고 로그인되어 있는지 확인한 뒤 `multica daemon restart`를 실행합니다.
-### `waiting_local_directory` 상태
+</Tab>
+<Tab value="waiting_local_directory">
다른 진행 중인 실행이 같은 로컬 디렉터리를 사용하고 있다는 뜻입니다. Multica는 두 에이전트가 같은 파일을 동시에 수정하지 않도록 디렉터리 잠금이 해제되기를 기다립니다.
@@ -85,7 +145,11 @@ multica issue runs <issue-id>
그렇지 않으면 일반적으로 앞선 실행이 끝날 때까지 기다리면 됩니다. 앞선 실행이 멈췄다면 해당 실행 로그에서 중지할 수 있고, 현재 에이전트에 다른 로컬 디렉터리를 선택할 수도 있습니다. 이 디렉터리 상호 배제는 데몬이 메모리에서 관리하며 디스크에 lock 파일을 쓰지 않습니다. 잠금 상태가 비정상이라고 의심되면 `multica daemon restart`를 실행해 해제하세요. 직접 삭제해야 할 파일은 없습니다.
-## AI 코딩 도구 시작 실패
+</Tab>
+</Tabs>
+
+</Accordion>
+<Accordion title="AI 코딩 도구 시작 실패" id="ai-coding-tool-fails-to-start" value="ai-coding-tool-fails-to-start">
데몬이 온라인이어도 도구 자체를 사용할 수 있다는 뜻은 아닙니다. 이번 실행의 상세 기록을 열고 다음 항목을 중점적으로 확인하세요.
@@ -97,7 +161,8 @@ multica issue runs <issue-id>
먼저 실행 컴퓨터의 터미널에서 같은 도구를 직접 실행하세요. 도구 자체도 시작할 수 없다면 도구 로그인 또는 설정을 먼저 수정하고 실행 로그에서 실행을 재시도합니다.
-## CLI 업그레이드 후 macOS에서 실행이 멈춤
+</Accordion>
+<Accordion title="CLI 업그레이드 후 macOS에서 실행이 멈춤" id="runs-hang-on-macos-after-a-cli-upgrade" value="runs-hang-on-macos-after-a-cli-upgrade">
Homebrew로 설치한 `multica` CLI가 `brew upgrade`, `multica update`, **런타임** 페이지의 **업데이트** 또는 데몬 자동 업데이트로 업그레이드된 뒤, `~/Desktop`, `~/Documents`, `~/Downloads`, iCloud Drive 등 보호된 폴더를 읽는 실행이 더 이상 진행되지 않을 수 있습니다. 에이전트 프로세스는 CPU를 사용하지 않고, 실행은 완료되지도 실패하지도 않습니다.
@@ -111,7 +176,13 @@ Homebrew로 설치한 `multica` CLI가 `brew upgrade`, `multica update`, **런
CLI를 업그레이드할 때마다 이 과정을 반복하세요. 자동 업데이트는 Multica Cloud에 연결된 데몬에서만 기본으로 켜져 있습니다. `--no-auto-update`로 데몬을 시작하면 직접 실행할 때만 업그레이드됩니다. [Multica Desktop](/desktop-app)에 번들된 CLI는 Developer ID로 서명되어 있어 업그레이드 후에도 권한이 유지됩니다.
-## 실시간 업데이트가 작동하지 않음
+</Accordion>
+</Accordions>
+
+## 웹 앱과 자체 호스팅 서비스
+
+<Accordions>
+<Accordion title="실시간 업데이트가 작동하지 않음" id="realtime-updates-stop-working" value="realtime-updates-stop-working">
실행은 진행되지만 댓글과 상태가 실시간으로 나타나지 않는다면 일반적으로 WebSocket이 연결되지 않은 것입니다.
@@ -122,9 +193,9 @@ CLI를 업그레이드할 때마다 이 과정을 반복하세요. 자동 업데
- reverse proxy가 WebSocket Upgrade 요청을 전달하는지
- 브라우저 로그인이 만료되었는지
-`curl`로 `/ws`에 요청했을 때 HTTP 400이 반환되는 것은 정상입니다: 이 엔드포인트는 workspace 관련 쿼리 파라미터를 요구하며, 파라미터 없는 핸드셰이크는 WebSocket 업그레이드 전에 거부됩니다. 따라서 backend 로그에 400/401 기록이 있다는 것은 일반 HTTP 라우팅이 backend까지 도달했다는 것만 증명합니다 — 프록시가 WebSocket `Upgrade` 헤더를 보존하는지는 증명하지 않습니다. 실제 연결을 확인하려면 브라우저 DevTools → Network → WS 탭(또는 WebSocket 지원 클라이언트)에서 `101` 핸드셰이크가 성립했는지 보세요.
+`curl`로 `/ws`에 요청했을 때 HTTP 400이 반환되는 것은 정상입니다. 이 엔드포인트는 workspace 관련 쿼리 파라미터를 요구하며, 파라미터 없는 핸드셰이크는 WebSocket 업그레이드 전에 거부됩니다. 따라서 backend 로그에 400/401 기록이 있다는 것은 일반 HTTP 라우팅이 backend까지 도달했다는 것만 증명할 뿐, 프록시가 WebSocket `Upgrade` 헤더를 보존하는지는 증명하지 않습니다. 실제 연결을 확인하려면 브라우저 DevTools → Network → WS 탭(또는 WebSocket 지원 클라이언트)에서 `101` 핸드셰이크가 성립했는지 보세요.
-자체 호스팅 참고: 데몬의 긴 연결은 `/api/daemon/ws`로 향합니다(`/ws`가 아님). 마찬가지로 backend로 직접 전달해야 하며, 핸드셰이크가 실패하면 데몬은 조용히 폴링으로 폴백합니다. backend 로그에서 이 경로에 `status=400`이 반복되면 그 증상입니다.
+자체 호스팅 환경에서는 데몬의 긴 연결이 `/api/daemon/ws`로 향한다는 점(`/ws`가 아님)도 주의하세요. 마찬가지로 backend로 직접 전달해야 합니다. 여기서 핸드셰이크가 실패하면 데몬은 조용히 폴링으로 폴백하며, backend 로그에서 이 경로에 `status=400`이 반복되는 것이 그 증상입니다.
컨테이너는 생성될 때만 `.env`를 읽으므로 수정 후 다시 생성해야 합니다.
@@ -132,38 +203,10 @@ CLI를 업그레이드할 때마다 이 과정을 반복하세요. 자동 업데
docker compose -f docker-compose.selfhost.yml up -d
```
-전체 reverse proxy 예시는 [자체 호스팅 빠른 시작](/self-host-quickstart#3-접근-방식-선택)을 참고하세요.
-
-## `multica setup`이 서버에 도달할 수 없다고 보고함
-
-CLI 도달 확인은 `<server-url>/health`에 GET을 보내 200을 기대합니다. backend는 이 경로를 제공합니다. 최신 web 릴리스는 `/health`를 backend로 전달하지만 구버전은 그렇지 않아, 모든 트래픽을 구버전 frontend로 전달하는 reverse proxy에서는 404가 반환되고 CLI는 정상 동작 중인 서버를 도달 불가로 오판합니다.
-
-프록시에서 `/health`를 backend(포트 8080)로 명시적으로 전달하면 모든 릴리스에서 동작합니다. [자체 호스팅 빠른 시작](/self-host-quickstart#3-접근-방식-선택)의 두 Caddy 예시에 모두 포함되어 있습니다. 확인 방법:
-
-```bash
-curl -fsS <server-url>/health
-```
+전체 reverse proxy 예시는 [자체 호스팅 빠른 시작](/self-host-quickstart#remote-access)을 참고하세요.
-## `multica login`이 TLS 핸드셰이크 시간 초과로 실패함
-
-`multica login`이 브라우저를 열고 웹 로그인은 완료되지만 CLI는 "Sign-in did not complete" 또는 "TLS handshake timed out"으로 실패합니다. `multica --debug login`은 `POST /api/tokens`에서 `net/http: TLS handshake timeout`을 표시하며, 같은 컴퓨터의 `curl.exe -I https://api.multica.ai`나 브라우저는 정상적으로 연결됩니다.
-
-TCP 연결은 열리지만 TLS 핸드셰이크가 끝나지 않습니다. Multica CLI와 데몬을 포함한 Go 클라이언트는 기본적으로 TLS ClientHello에 양자내성 키 교환을 포함하므로 ClientHello가 약 1.5 KB가 되어 두 패킷으로 나뉩니다. 일부 보안 소프트웨어, VPN, 라우터, 방화벽은 이런 핸드셰이크를 버립니다. curl의 ClientHello는 훨씬 작아서 통과합니다.
-
-양자내성 키 교환을 끄고 다시 시도해 원인을 확인합니다:
-
-```powershell
-$env:GODEBUG = 'tlsmlkem=0'
-multica --debug login
-```
-
-```bash
-GODEBUG=tlsmlkem=0 multica --debug login
-```
-
-이렇게 해서 성공하면 CLI와 데몬을 실행하는 사용자에게 `GODEBUG=tlsmlkem=0`을 영구적으로 설정하고(Windows에서는 `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')`를 실행한 뒤 새 터미널을 여세요) 데몬 또는 데스크톱 앱을 다시 시작하세요. `MULTICA_HTTP_TIMEOUT`을 늘려도 도움이 되지 않습니다. 핸드셰이크는 이 설정의 영향을 받지 않습니다. 근본적인 해결은 네트워크 쪽에서 해야 합니다. 분할된 TLS 핸드셰이크를 버리는 장비나 소프트웨어를 업데이트하거나 재구성하세요.
-
-## 인증 코드 및 초대 이메일이 도착하지 않음
+</Accordion>
+<Accordion title="인증 코드 및 초대 이메일이 도착하지 않음" id="verification-code-and-invitation-emails-not-delivered" value="verification-code-and-invitation-emails-not-delivered">
먼저 backend 시작 로그를 확인합니다. 로그에는 현재 `SMTP relay`, `Resend API`, `DEV mode` 중 무엇을 사용하는지 표시됩니다.
@@ -182,7 +225,8 @@ docker compose -f docker-compose.selfhost.yml logs backend \
프로덕션 환경에서는 로그의 인증 코드에 의존하거나 고정된 로컬 테스트 인증 코드를 활성화하지 마세요.
</Callout>
-## 첨부 파일 업로드 또는 다운로드 실패
+</Accordion>
+<Accordion title="첨부 파일 업로드 또는 다운로드 실패" id="attachment-uploads-or-downloads-fail" value="attachment-uploads-or-downloads-fail">
먼저 backend 로그와 응답 status code를 확인합니다. 일반적인 원인은 다음과 같습니다.
@@ -193,7 +237,8 @@ docker compose -f docker-compose.selfhost.yml logs backend \
Docker Compose를 사용하면 기본 `backend_uploads` volume에 로컬 첨부 파일이 저장됩니다. 컨테이너를 다시 만들어도 삭제되지 않지만 `docker compose down -v`는 data volume을 삭제합니다. S3 설정은 [환경 변수](/environment-variables#첨부-파일-저장소)를 참고하세요.
-## 사용량(Usage)이 0으로 표시됨
+</Accordion>
+<Accordion title="사용량(Usage)이 0으로 표시됨" id="usage-shows-zero" value="usage-shows-zero">
Usage 페이지는 각 실행의 원본 사용량을 직접 읽지 않고 시간별 집계 데이터를 읽습니다. 먼저 원본 데이터와 집계 테이블을 확인합니다.
@@ -208,7 +253,7 @@ ORDER BY plan_time DESC
LIMIT 20;
```
-`task_usage`에 데이터가 있지만 집계 테이블이 비어 있고 스케줄 기록에 실패가 표시된다면 migration이 모두 적용되었는지 먼저 확인하세요. 업그레이드가 migration 103에서 거부되는 경우는 다음 절을 참고하세요. 집계 함수를 직접 한 번 실행해 SQL 문제인지 스케줄 문제인지 구분할 수도 있습니다.
+`task_usage`에 데이터가 있지만 집계 테이블이 비어 있고 스케줄 기록에 실패가 표시된다면 migration이 모두 적용되었는지 먼저 확인하세요. 업그레이드가 migration 103에서 거부되는 경우는 [업그레이드할 때 migration 103이 실행을 거부함](#migration-103-blocks-an-upgrade)을 참고하세요. 집계 함수를 직접 한 번 실행해 SQL 문제인지 스케줄 문제인지 구분할 수도 있습니다.
```sql
SELECT rollup_task_usage_hourly();
@@ -216,9 +261,10 @@ SELECT rollup_task_usage_hourly();
수동 실행 후 숫자가 정상이라면 집계 함수는 사용할 수 있고 backend 정기 스케줄에 문제가 있는 것입니다. 수동 SQL은 집계를 한 번만 보충하며 스케줄을 복구하지 않습니다. 시간별 집계는 backend 내장 스케줄러가 실행하므로 pg_cron을 직접 설정할 필요가 없습니다.
-## 업그레이드할 때 migration 103이 실행을 거부함
+</Accordion>
+<Accordion title="업그레이드할 때 migration 103이 실행을 거부함" id="migration-103-blocks-an-upgrade" value="migration-103-blocks-an-upgrade">
-정상 업그레이드에서는 migration 103을 위해 따로 할 일이 없습니다. `migrate up`은 migration을 적용하기 전에 이전 사용량 데이터를 자동으로 backfill합니다. 빈 데이터베이스는 바로 통과하고 이전 데이터가 있는 인스턴스는 월별로 자동 보충한 뒤 계속 진행합니다.
+정상 업그레이드에서는 migration 103을 위해 따로 할 일이 없습니다. `migrate up`은 migration을 적용하기 전에 이전 사용량 데이터를 자동으로 backfill합니다. 빈 데이터베이스는 바로 통과하고 이전 데이터가 있는 인스턴스는 월별로 보충한 뒤 계속 진행합니다.
backend 시작 중 `refusing to drop legacy daily rollups` 오류가 계속 발생하면 자동 backfill이 완료되지 않은 것입니다. 예를 들어 도중에 실패했거나 `migrate up`을 사용하지 않고 SQL을 직접 적용했을 수 있습니다. 이때는 backfill 명령을 직접 실행하고 완료된 뒤 backend를 다시 시작하세요.
@@ -229,17 +275,33 @@ DATABASE_URL='postgres://...' go run ./cmd/backfill_task_usage_hourly
자주 쓰는 flag: `--dry-run`은 쓰지 않고 미리 보기만 하며, `--sleep-between-slices`는 slice 사이에 간격을 두어 사용량이 많은 인스턴스의 읽기 부하를 낮춥니다. 명령은 월별 slice로 실행되고 멱등성을 가지므로 중단 후 바로 다시 실행할 수 있습니다. advisory lock을 보유해 서버의 정기 집계와 상호 배제되므로 중복되거나 일관되지 않은 집계 데이터가 생기지 않습니다. 완료 후 backend를 다시 시작하고 `/readyz`에서 `migrations`가 `ok`인지 확인하세요.
-## 포트 사용 중
+</Accordion>
+<Accordion title="포트 사용 중" id="port-already-in-use" value="port-already-in-use">
로컬에서 자주 사용하는 port는 API의 `8080`, Web의 `3000`, 데몬 health check port입니다. 먼저 사용 중인 프로세스를 찾습니다.
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+lsof -nP -iTCP:8080 -sTCP:LISTEN
+```
+
+</Tab>
+<Tab value="Windows">
+
```bash
-lsof -nP -iTCP:8080 -sTCP:LISTEN # macOS / Linux
-netstat -ano | findstr :8080 # Windows
+netstat -ano | findstr :8080
```
+</Tab>
+</Tabs>
+
다른 Multica checkout이 사용 중이라면 해당 디렉터리에서 `make stop`을 먼저 실행합니다. 그렇지 않다면 port를 사용 중인 프로그램을 정상적으로 중지하거나 현재 서비스 port를 변경합니다. 공개 인터넷의 80/443은 Caddy, Nginx 같은 reverse proxy가 사용합니다.
+</Accordion>
+</Accordions>
+
## 로그 위치
| 컴포넌트 | 확인 방법 |
@@ -261,7 +323,7 @@ multica daemon stop
multica daemon start --foreground
```
-그래도 원인을 찾지 못하면 [GitHub Issues](https://github.com/multica-ai/multica/issues)에서 기존 문제를 검색하거나 새 태스크를 제출하세요.
+그래도 원인을 찾지 못하면 [GitHub Issues](https://github.com/multica-ai/multica/issues)에서 기존 문제를 검색하거나 새 issue를 제출하세요.
## 다음 단계
diff --git a/apps/docs/content/docs/troubleshooting.mdx b/apps/docs/content/docs/troubleshooting.mdx
index 501b5d33c2..c45caaf2b1 100644
--- a/apps/docs/content/docs/troubleshooting.mdx
+++ b/apps/docs/content/docs/troubleshooting.mdx
@@ -4,9 +4,14 @@ description: Diagnose common problems with connections, execution, realtime upda
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
First work out which layer the problem lives in: the Multica service, the daemon, the runtime, or the AI coding tool. These commands are usually enough to surface the first meaningful error:
+<Tabs items={["Any install", "Self-hosted service"]}>
+<Tab value="Any install">
+
```bash
multica version
multica auth status
@@ -14,16 +19,23 @@ multica daemon status --output json
multica daemon logs --lines 100
```
-Self-hosted instances can also check the service directly:
+</Tab>
+<Tab value="Self-hosted service">
```bash
curl -i https://api.example.com/health
curl -i https://api.example.com/readyz
```
+</Tab>
+</Tabs>
+
`/health` only says the API process is responding; `/readyz` also checks the database and migrations. Include the error, relevant logs, CLI version, and operating system when reporting a problem; remove tokens, email addresses, and other sensitive details before submitting.
-## Daemon fails to connect
+## Connection and sign-in
+
+<Accordions>
+<Accordion title="Daemon fails to connect" id="daemon-fails-to-connect" value="daemon-fails-to-connect">
Run these first:
@@ -54,11 +66,58 @@ Self-hosted deployments should also request the API's `/health` from the **execu
multica config show
```
-## Issue does not start executing
+</Accordion>
+<Accordion title={<><code>multica setup</code> reports the server is not reachable</>} id="multica-setup-reports-the-server-is-not-reachable" value="multica-setup-reports-the-server-is-not-reachable">
+
+The CLI reachability probe GETs `<server-url>/health` and needs a 200. The backend serves this path. Current web releases forward `/health` to the backend, but older ones do not — a reverse proxy that forwards everything to such an older frontend returns 404, and the CLI concludes the server is down while the stack is healthy.
+
+Routing `/health` to the backend (port 8080) explicitly in your proxy works across all releases — both Caddy examples in the [self-host quickstart](/self-host-quickstart#remote-access) do this. Confirm with:
+
+```bash
+curl -fsS <server-url>/health
+```
+
+</Accordion>
+<Accordion title={<><code>multica login</code> fails with a TLS handshake timeout</>} id="multica-login-fails-with-a-tls-handshake-timeout" value="multica-login-fails-with-a-tls-handshake-timeout">
+
+`multica login` opens the browser and the web sign-in completes, but the CLI still fails with "Sign-in did not complete" or "TLS handshake timed out". `multica --debug login` shows `net/http: TLS handshake timeout` on `POST /api/tokens`, while `curl.exe -I https://api.multica.ai` or a browser on the same machine connects fine.
+
+The TCP connection opens, but the TLS handshake never completes. Go clients, including the Multica CLI and daemon, send a post-quantum key share in the TLS ClientHello by default, which makes it about 1.5 KB and splits it across two packets. Some security software, VPNs, routers, and firewalls drop such handshakes; curl sends a much smaller ClientHello and gets through.
+
+Confirm the cause by retrying with the post-quantum key share disabled:
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+GODEBUG=tlsmlkem=0 multica --debug login
+```
+
+</Tab>
+<Tab value="Windows">
+
+```powershell
+$env:GODEBUG = 'tlsmlkem=0'
+multica --debug login
+```
+
+</Tab>
+</Tabs>
+
+If that succeeds, set `GODEBUG=tlsmlkem=0` permanently for the user that runs the CLI and the daemon — on Windows, run `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` and open a new terminal — then restart the daemon or the desktop app. Raising `MULTICA_HTTP_TIMEOUT` does not help: it does not govern the handshake. The permanent fix is on the network side: update or reconfigure the device or software that drops split TLS handshakes.
+
+</Accordion>
+</Accordions>
+
+## Runs and AI coding tools
+
+<Accordions>
+<Accordion title="Issue does not start executing" id="issue-does-not-start-executing" value="issue-does-not-start-executing">
Open the issue's **execution log** and check the run's current status and what it is waiting for.
-### `queued` status
+<Tabs items={["queued", "waiting_local_directory"]}>
+<Tab value="queued">
`queued` means the run is still waiting for a runtime to claim it. Check in order:
@@ -77,7 +136,8 @@ multica issue runs <issue-id>
If the runtime list is missing an expected tool, first confirm the tool runs and is signed in under the same system account and `PATH`, then run `multica daemon restart`.
-### `waiting_local_directory` status
+</Tab>
+<Tab value="waiting_local_directory">
This means another in-flight run is using the same local directory. Multica waits for the directory lock to be released so two agents never modify the same files at once.
@@ -85,7 +145,11 @@ This wait only exists in the directory's `in_place` ("Direct") mode. If the dire
Otherwise you just wait for the earlier run to finish. If it is stuck, stop it from its execution log, or pick a different local directory for the current agent. This directory mutex lives in the daemon's memory — no lock file is written to disk. If you suspect stale lock state, `multica daemon restart` releases it; there is nothing to delete manually.
-## AI coding tool fails to start
+</Tab>
+</Tabs>
+
+</Accordion>
+<Accordion title="AI coding tool fails to start" id="ai-coding-tool-fails-to-start" value="ai-coding-tool-fails-to-start">
An online daemon does not mean the tool itself works. Open the run's detailed record and focus on:
@@ -97,7 +161,8 @@ An online daemon does not mean the tool itself works. Open the run's detailed re
Run the same tool directly in a terminal on the executing computer first. If the tool cannot start on its own, fix its sign-in or configuration, then retry the run from the execution log.
-## Runs hang on macOS after a CLI upgrade
+</Accordion>
+<Accordion title="Runs hang on macOS after a CLI upgrade" id="runs-hang-on-macos-after-a-cli-upgrade" value="runs-hang-on-macos-after-a-cli-upgrade">
After the Homebrew `multica` CLI is upgraded, by `brew upgrade`, `multica update`, **Update** on the Runtimes page, or the daemon's auto-update, a run that reads `~/Desktop`, `~/Documents`, `~/Downloads`, iCloud Drive, or another protected folder can stop making progress: the agent's process uses no CPU, and the run neither finishes nor fails.
@@ -111,7 +176,8 @@ To restore access:
Repeat this after every CLI upgrade. Auto-update is on by default only for daemons connected to Multica Cloud; start the daemon with `--no-auto-update` so upgrades happen only when you run them. The CLI bundled with [Multica Desktop](/desktop-app) is signed with a Developer ID, so its grants survive upgrades.
-## Hermes runs reinstall dependencies after you use the Hermes CLI
+</Accordion>
+<Accordion title="Hermes runs reinstall dependencies after you use the Hermes CLI" id="hermes-runs-reinstall-dependencies-after-you-use-the-hermes-cli" value="hermes-runs-reinstall-dependencies-after-you-use-the-hermes-cli">
If you alternate between the Hermes CLI (or the Hermes desktop app) and Multica Hermes runs, each switch can add 30–60 seconds to startup while Hermes rebuilds its shared Python dependency environment. Each rebuild also leaves a new environment generation on disk until Hermes cleans it up.
@@ -121,7 +187,13 @@ To confirm, look in the [daemon log](#log-locations) for `hermes is reinstalling
Until Hermes fixes this upstream, you can avoid the rebuilds by setting `memory.provider: ""` in your own Hermes `config.yaml`, which turns that memory plugin off for the CLI as well. Otherwise, expect the one-time delay after each switch.
-## Realtime updates stop working
+</Accordion>
+</Accordions>
+
+## Web app and self-hosted service
+
+<Accordions>
+<Accordion title="Realtime updates stop working" id="realtime-updates-stop-working" value="realtime-updates-stop-working">
If runs still execute but comments and status changes no longer appear live, the WebSocket is usually not connected.
@@ -142,38 +214,10 @@ Containers read `.env` only at creation time; recreate them after changes:
docker compose -f docker-compose.selfhost.yml up -d
```
-For a complete reverse-proxy example, see the [self-host quickstart](/self-host-quickstart#3-choose-how-to-access).
-
-## `multica setup` reports the server is not reachable
-
-The CLI reachability probe GETs `<server-url>/health` and needs a 200. The backend serves this path. Current web releases forward `/health` to the backend, but older ones do not — a reverse proxy that forwards everything to such an older frontend returns 404, and the CLI concludes the server is down while the stack is healthy.
-
-Routing `/health` to the backend (port 8080) explicitly in your proxy works across all releases — both Caddy examples in the [self-host quickstart](/self-host-quickstart#3-choose-how-to-access) do this. Confirm with:
-
-```bash
-curl -fsS <server-url>/health
-```
-
-## `multica login` fails with a TLS handshake timeout
+For a complete reverse-proxy example, see the [self-host quickstart](/self-host-quickstart#remote-access).
-`multica login` opens the browser and the web sign-in completes, but the CLI still fails with "Sign-in did not complete" or "TLS handshake timed out". `multica --debug login` shows `net/http: TLS handshake timeout` on `POST /api/tokens`, while `curl.exe -I https://api.multica.ai` or a browser on the same machine connects fine.
-
-The TCP connection opens, but the TLS handshake never completes. Go clients, including the Multica CLI and daemon, send a post-quantum key share in the TLS ClientHello by default, which makes it about 1.5 KB and splits it across two packets. Some security software, VPNs, routers, and firewalls drop such handshakes; curl sends a much smaller ClientHello and gets through.
-
-Confirm the cause by retrying with the post-quantum key share disabled:
-
-```powershell
-$env:GODEBUG = 'tlsmlkem=0'
-multica --debug login
-```
-
-```bash
-GODEBUG=tlsmlkem=0 multica --debug login
-```
-
-If that succeeds, set `GODEBUG=tlsmlkem=0` permanently for the user that runs the CLI and the daemon — on Windows, run `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` and open a new terminal — then restart the daemon or the desktop app. Raising `MULTICA_HTTP_TIMEOUT` does not help: it does not govern the handshake. The permanent fix is on the network side: update or reconfigure the device or software that drops split TLS handshakes.
-
-## Verification code and invitation emails not delivered
+</Accordion>
+<Accordion title="Verification code and invitation emails not delivered" id="verification-code-and-invitation-emails-not-delivered" value="verification-code-and-invitation-emails-not-delivered">
Check the backend startup log first. It states whether the server is using `SMTP relay`, `Resend API`, or `DEV mode`:
@@ -192,7 +236,8 @@ When `SMTP_HOST` and Resend are both configured, Multica prefers SMTP. For confi
Do not rely on codes in the log in production, and do not enable the fixed local test code.
</Callout>
-## Attachment uploads or downloads fail
+</Accordion>
+<Accordion title="Attachment uploads or downloads fail" id="attachment-uploads-or-downloads-fail" value="attachment-uploads-or-downloads-fail">
Check the backend log and the response status code first. Common causes:
@@ -203,7 +248,8 @@ Check the backend log and the response status code first. Common causes:
With Docker Compose, the default `backend_uploads` volume stores local attachments. Recreating containers does not delete it, but `docker compose down -v` deletes the data volume. For S3 configuration, see [Environment variables](/environment-variables#attachment-storage).
-## Usage shows zero
+</Accordion>
+<Accordion title="Usage shows zero" id="usage-shows-zero" value="usage-shows-zero">
The Usage page reads hourly rollups, not each run's raw usage. Check the raw data and the rollup table first:
@@ -218,7 +264,7 @@ ORDER BY plan_time DESC
LIMIT 20;
```
-If `task_usage` has rows, the rollup table is empty, and the scheduler records show failures, first confirm all migrations have been applied; if migration 103 rejected the upgrade, see the next section. You can also run one rollup by hand to separate SQL problems from scheduling problems:
+If `task_usage` has rows, the rollup table is empty, and the scheduler records show failures, first confirm all migrations have been applied; if migration 103 rejected the upgrade, see [Migration 103 blocks an upgrade](#migration-103-blocks-an-upgrade). You can also run one rollup by hand to separate SQL problems from scheduling problems:
```sql
SELECT rollup_task_usage_hourly();
@@ -226,7 +272,8 @@ SELECT rollup_task_usage_hourly();
If the numbers look right after a manual run, the rollup function works and the problem is the backend's built-in scheduling; manual SQL only fills in one rollup and does not restore scheduling. Hourly rollups are executed by the backend's built-in scheduler — you do not need to configure pg_cron yourself.
-## Migration 103 blocks an upgrade
+</Accordion>
+<Accordion title="Migration 103 blocks an upgrade" id="migration-103-blocks-an-upgrade" value="migration-103-blocks-an-upgrade">
A normal upgrade needs no action for 103: `migrate up` automatically backfills historical usage data before applying it — an empty database passes straight through, and instances with history are backfilled month by month before continuing.
@@ -239,17 +286,33 @@ DATABASE_URL='postgres://...' go run ./cmd/backfill_task_usage_hourly
Useful flags: `--dry-run` previews without writing; `--sleep-between-slices` adds a pause between slices to reduce read pressure on a busy instance. The command works in monthly slices and is idempotent — rerun it directly after an interruption. It holds an advisory lock and is mutually exclusive with the server's scheduled rollup, so it cannot produce duplicate or inconsistent rollup data. When it finishes, restart the backend and confirm `migrations` is `ok` on `/readyz`.
-## Port already in use
+</Accordion>
+<Accordion title="Port already in use" id="port-already-in-use" value="port-already-in-use">
Common local ports are `8080` for the API, `3000` for the web app, and the daemon health-check port. Find the process holding the port first:
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+lsof -nP -iTCP:8080 -sTCP:LISTEN
+```
+
+</Tab>
+<Tab value="Windows">
+
```bash
-lsof -nP -iTCP:8080 -sTCP:LISTEN # macOS / Linux
-netstat -ano | findstr :8080 # Windows
+netstat -ano | findstr :8080
```
+</Tab>
+</Tabs>
+
If it is another Multica checkout, run `make stop` in that directory first. Otherwise stop the offending program normally, or change the current service's port. Public ports 80/443 are listened on by a reverse proxy such as Caddy or Nginx.
+</Accordion>
+</Accordions>
+
## Log locations
| Component | How to view |
diff --git a/apps/docs/content/docs/troubleshooting.zh.mdx b/apps/docs/content/docs/troubleshooting.zh.mdx
index 54f7a9af0c..c77fba0393 100644
--- a/apps/docs/content/docs/troubleshooting.zh.mdx
+++ b/apps/docs/content/docs/troubleshooting.zh.mdx
@@ -4,9 +4,14 @@ description: 排查连接、执行、实时更新、邮件和自托管服务中
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
+import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
先确认问题发生在哪一层:Multica 服务、守护进程、运行时,还是 AI 编程工具。下面几条命令通常足以找到第一条有效错误:
+<Tabs items={["所有安装方式", "自托管服务"]}>
+<Tab value="所有安装方式">
+
```bash
multica version
multica auth status
@@ -14,16 +19,23 @@ multica daemon status --output json
multica daemon logs --lines 100
```
-自托管实例还可以直接检查服务:
+</Tab>
+<Tab value="自托管服务">
```bash
curl -i https://api.example.com/health
curl -i https://api.example.com/readyz
```
-`/health` 只说明 API 进程正在响应;`/readyz` 还会检查数据库和 migration。问题反馈包含报错、相关日志、CLI 版本和操作系统;令牌、邮箱等敏感信息在提交前移除。
+</Tab>
+</Tabs>
+
+`/health` 只说明 API 进程正在响应;`/readyz` 还会检查数据库和 migration。反馈问题时附上报错、相关日志、CLI 版本和操作系统,提交前删掉令牌、邮箱等敏感信息。
+
+## 连接与登录
-## 守护进程连接失败
+<Accordions>
+<Accordion title="守护进程连接失败" id="daemon-fails-to-connect" value="daemon-fails-to-connect">
先运行:
@@ -48,17 +60,64 @@ multica login
multica daemon restart
```
-自托管部署还需要从**执行电脑**请求 API 的 `/health`——服务器本机测试无法暴露执行电脑侧的 DNS、TLS 或防火墙问题。需要修改地址时,重新运行 `multica setup self-host`,或检查当前 profile 的 `server_url`:
+自托管部署还需要从**执行电脑**请求 API 的 `/health`。在服务器本机测试,看不出执行电脑这一侧的 DNS、TLS 或防火墙问题。需要修改地址时,重新运行 `multica setup self-host`,或检查当前 profile 的 `server_url`:
```bash
multica config show
```
-## 任务未开始执行
+</Accordion>
+<Accordion title={<><code>multica setup</code> 报告服务器不可达</>} id="multica-setup-reports-the-server-is-not-reachable" value="multica-setup-reports-the-server-is-not-reachable">
+
+CLI 的可达性探测会 GET `<server-url>/health` 并要求 200。backend 提供这个路径。新版 web 前端会把 `/health` 转发给 backend,旧版不会。反向代理如果把所有流量都转给旧版 frontend,就会返回 404,CLI 因此判断服务不可用,而服务其实是健康的。
+
+在代理里把 `/health` 显式转给 backend(8080 端口),对所有版本都适用,[自托管快速上手](/self-host-quickstart#remote-access)里的两个 Caddy 示例都包含这条。确认方法:
+
+```bash
+curl -fsS <server-url>/health
+```
+
+</Accordion>
+<Accordion title={<><code>multica login</code> 报告 TLS 握手超时</>} id="multica-login-fails-with-a-tls-handshake-timeout" value="multica-login-fails-with-a-tls-handshake-timeout">
+
+`multica login` 能打开浏览器、网页登录也能完成,但 CLI 仍以 "Sign-in did not complete" 或 "TLS 握手超时" 失败。`multica --debug login` 在 `POST /api/tokens` 上显示 `net/http: TLS handshake timeout`,而同一台机器上的 `curl.exe -I https://api.multica.ai` 或浏览器都能正常连接。
+
+TCP 连接已建立,但 TLS 握手始终没有完成。Go 客户端(包括 Multica CLI 和守护进程)默认在 TLS ClientHello 中携带后量子密钥交换,报文约 1.5 KB,会拆成两个包发送。部分安全软件、VPN、路由器和防火墙会丢弃这种握手;curl 的 ClientHello 小得多,所以能通过。
+
+先关闭后量子密钥交换重试,确认是否为此原因:
+
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+GODEBUG=tlsmlkem=0 multica --debug login
+```
+
+</Tab>
+<Tab value="Windows">
+
+```powershell
+$env:GODEBUG = 'tlsmlkem=0'
+multica --debug login
+```
+
+</Tab>
+</Tabs>
+
+如果这样能成功,请为运行 CLI 和守护进程的用户永久设置 `GODEBUG=tlsmlkem=0`(Windows 上执行 `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` 后重新打开终端),然后重启守护进程或桌面应用。调高 `MULTICA_HTTP_TIMEOUT` 无效,它不控制握手。根本的解决办法在网络侧:升级或重新配置丢弃分包 TLS 握手的设备或软件。
+
+</Accordion>
+</Accordions>
+
+## 运行与 AI 编程工具
+
+<Accordions>
+<Accordion title="任务未开始执行" id="issue-does-not-start-executing" value="issue-does-not-start-executing">
打开任务的**执行日志**,先看运行的当前状态和等待原因。
-### `queued` 状态
+<Tabs items={["queued", "waiting_local_directory"]}>
+<Tab value="queued">
`queued` 表示运行还在等待运行时领取。依次检查:
@@ -67,7 +126,7 @@ multica config show
3. 智能体是否还有可用并发额度;
4. 守护进程是否还有全局执行容量。
-智能体默认最多同时执行 6 次运行;单个守护进程默认最多同时执行 20 次。达到上限时,新运行会留在队列中,等已有执行结束后再开始。运行时离线时,运行也会继续排队;只有该运行时心跳缺席超过重连宽限期、且该运行自己也已等满这么久时才会失败;所以排在忙碌运行时后面的长队列不会因为等太久而被判失败,指派给已经离线的机器时也仍然留有完整一个宽限期把它唤醒。
+智能体默认最多同时执行 6 次运行,单个守护进程默认最多同时执行 20 次。达到上限时,新运行会留在队列中,等已有执行结束后再开始。运行时离线时,运行也会继续排队。只有该运行时心跳缺席超过重连宽限期、且该运行自己也已等满这么久,运行才会失败。所以排在忙碌运行时后面的长队列不会因为等得久而被判失败,指派给已经离线的机器时,也还有完整的一个宽限期可以把它唤醒。
```bash
multica daemon status --output json
@@ -77,15 +136,20 @@ multica issue runs <issue-id>
如果运行时列表缺少预期工具,先在同一个系统账号和 `PATH` 中确认工具可以运行并且已经登录,再执行 `multica daemon restart`。
-### `waiting_local_directory` 状态
+</Tab>
+<Tab value="waiting_local_directory">
这表示另一条在途运行正在使用同一个本地目录。Multica 会等待目录锁释放,避免两个智能体同时修改同一份文件。
-这种等待只存在于目录的 `in_place`(“原地”)模式。如果这个目录是 git 仓库,把资源切到 `worktree`(“并行”)就没有队列了:每次运行拿到自己的 worktree,并以分支形式交回结果,谁都不用等谁。见[项目资源](/project-resources#task-如何共享这个目录)。
+这种等待只存在于目录的 `in_place`("原地")模式。如果这个目录是 git 仓库,把资源切到 `worktree`("并行")就没有队列了:每次运行拿到自己的 worktree,并以分支形式交回结果,谁都不用等谁。见[项目资源](/project-resources#运行如何共享这个目录)。
+
+否则通常只需等前一次运行结束。若前一次已经卡住,可以从它的执行日志中停止,也可以为当前智能体选择其他本地目录。这个目录互斥由守护进程在内存中维护,不写磁盘锁文件。怀疑锁状态异常时,运行 `multica daemon restart` 即可释放,没有需要手动删除的文件。
-否则通常只需等前一次运行结束。若前一次已经卡住,可以从它的执行日志中停止;也可以为当前智能体选择其他本地目录。这个目录互斥由守护进程在内存中维护,不写磁盘锁文件;怀疑锁状态异常时运行 `multica daemon restart` 即可释放,没有需要手动删除的文件。
+</Tab>
+</Tabs>
-## AI 编程工具启动失败
+</Accordion>
+<Accordion title="AI 编程工具启动失败" id="ai-coding-tool-fails-to-start" value="ai-coding-tool-fails-to-start">
守护进程在线不代表工具本身可用。打开这次执行的详细记录,重点检查:
@@ -97,11 +161,12 @@ multica issue runs <issue-id>
先在执行电脑的终端中直接运行同一款工具。工具自身也无法开始时,先修复工具登录或配置,再从执行日志重试运行。
-## 升级 CLI 后 macOS 上的运行卡住
+</Accordion>
+<Accordion title="升级 CLI 后 macOS 上的运行卡住" id="runs-hang-on-macos-after-a-cli-upgrade" value="runs-hang-on-macos-after-a-cli-upgrade">
通过 Homebrew 安装的 `multica` CLI 升级后(无论是 `brew upgrade`、`multica update`、**运行时**页面上的**更新**,还是守护进程自动更新),读取 `~/Desktop`、`~/Documents`、`~/Downloads`、iCloud 云盘或其他受保护文件夹的运行可能停滞:智能体进程不占用 CPU,运行既不结束也不失败。
-这种情况出现在 macOS 把隐私权限(TCC)记在守护进程本身名下时,由 launchd 启动的守护进程(例如 LaunchAgent)就是如此:等待中的弹窗显示的是 `multica`,智能体启动的所有工具都沿用守护进程的授权。Homebrew 版 CLI 没有使用固定身份签名,macOS 只能把授权绑定到这一次构建及其解析后的路径,例如 `/opt/homebrew/Cellar/multica/<version>/bin/multica`。升级后,macOS 把新二进制当作另一个应用,重新请求授权;在有人处理之前文件访问会一直阻塞,守护进程也无法感知有授权弹窗在等待。
+这种情况出现在 macOS 把隐私权限(TCC)记在守护进程本身名下时,由 launchd 启动的守护进程(例如 LaunchAgent)就是如此:等待中的弹窗显示的是 `multica`,智能体启动的所有工具都沿用守护进程的授权。Homebrew 版 CLI 没有使用固定身份签名,macOS 只能把授权绑定到这一次构建及其解析后的路径,例如 `/opt/homebrew/Cellar/multica/<version>/bin/multica`。升级后,macOS 把新二进制当作另一个应用,重新请求授权。在有人处理之前,文件访问会一直阻塞,守护进程也无法感知有授权弹窗在等待。
恢复访问:
@@ -111,7 +176,13 @@ multica issue runs <issue-id>
每次升级 CLI 后都需要重复这些步骤。只有连接 Multica Cloud 的守护进程默认开启自动更新;用 `--no-auto-update` 启动守护进程后,只在你手动升级时更新。[桌面应用](/desktop-app)内置的 CLI 使用 Developer ID 签名,授权在升级后依然有效。
-## 实时更新失效
+</Accordion>
+</Accordions>
+
+## Web 应用与自托管服务
+
+<Accordions>
+<Accordion title="实时更新失效" id="realtime-updates-stop-working" value="realtime-updates-stop-working">
运行仍能执行、但评论和状态不能实时出现,通常是 WebSocket 没有连通。
@@ -122,9 +193,9 @@ multica issue runs <issue-id>
- 反向代理是否转发 WebSocket 的 Upgrade 请求;
- 浏览器登录是否已经过期。
-直接用 `curl` 访问 `/ws` 返回 HTTP 400 是正常现象:该端点要求带 workspace 相关的查询参数,裸握手在进入 WebSocket 升级之前就会被拒。所以 backend 日志里出现 400/401 记录,只能说明普通 HTTP 路由已经到达 backend——并不能证明代理保留了 WebSocket `Upgrade` 头。要验证真正的连接,请打开浏览器开发者工具的 Network → WS 面板(或用支持 WebSocket 的客户端),看是否出现 `101` 握手。
+直接用 `curl` 访问 `/ws` 返回 HTTP 400 是正常现象:该端点要求带 workspace 相关的查询参数,裸握手在进入 WebSocket 升级之前就会被拒。所以 backend 日志里出现 400/401 记录,只能说明普通 HTTP 路由已经到达 backend,并不能证明代理保留了 WebSocket `Upgrade` 头。要验证真正的连接,请打开浏览器开发者工具的 Network → WS 面板(或用支持 WebSocket 的客户端),看是否出现 `101` 握手。
-自部署注意:daemon 的长连接拨的是 `/api/daemon/ws`(不是 `/ws`),同样要直通后端;握手失败时 daemon 会静默回退到轮询,backend 日志里该路径反复出现 `status=400` 即中招。
+自托管部署还要注意,daemon 的长连接拨的是 `/api/daemon/ws`(不是 `/ws`),同样要直通后端。这里握手失败时 daemon 会静默回退到轮询,表现是 backend 日志里该路径反复出现 `status=400`。
容器只在创建时读取 `.env`,修改后需要重新创建:
@@ -132,44 +203,16 @@ multica issue runs <issue-id>
docker compose -f docker-compose.selfhost.yml up -d
```
-完整的反向代理示例见[自托管快速上手](/self-host-quickstart#3-选择访问方式)。
-
-## `multica setup` 报告服务器不可达
-
-CLI 的可达性探测会 GET `<server-url>/health` 并要求 200。backend 提供这个路径。新版 web 前端会把 `/health` 转发给 backend,旧版不会——把所有流量都转给旧版 frontend 的反向代理会返回 404,于是 CLI 误判服务不可用,而服务实际是健康的。
-
-在代理里把 `/health` 显式转给 backend(8080 端口),对所有版本都适用——[自托管快速上手](/self-host-quickstart#3-选择访问方式)里的两个 Caddy 示例都包含这条。确认方法:
-
-```bash
-curl -fsS <server-url>/health
-```
+完整的反向代理示例见[自托管快速上手](/self-host-quickstart#remote-access)。
-## `multica login` 报告 TLS 握手超时
-
-`multica login` 能打开浏览器、网页登录也能完成,但 CLI 仍以 "Sign-in did not complete" 或 "TLS 握手超时" 失败。`multica --debug login` 在 `POST /api/tokens` 上显示 `net/http: TLS handshake timeout`,而同一台机器上的 `curl.exe -I https://api.multica.ai` 或浏览器都能正常连接。
-
-TCP 连接已建立,但 TLS 握手始终没有完成。Go 客户端(包括 Multica CLI 和守护进程)默认在 TLS ClientHello 中携带后量子密钥交换,报文约 1.5 KB,会拆成两个包发送。部分安全软件、VPN、路由器和防火墙会丢弃这种握手;curl 的 ClientHello 小得多,所以能通过。
-
-先关闭后量子密钥交换重试,确认是否为此原因:
-
-```powershell
-$env:GODEBUG = 'tlsmlkem=0'
-multica --debug login
-```
-
-```bash
-GODEBUG=tlsmlkem=0 multica --debug login
-```
-
-如果这样能成功,请为运行 CLI 和守护进程的用户永久设置 `GODEBUG=tlsmlkem=0`——Windows 上执行 `[Environment]::SetEnvironmentVariable('GODEBUG', 'tlsmlkem=0', 'User')` 后重新打开终端——然后重启守护进程或桌面应用。调高 `MULTICA_HTTP_TIMEOUT` 无效,它不控制握手。根本解决需要在网络侧处理:升级或重新配置丢弃分包 TLS 握手的设备或软件。
-
-## 验证码与邀请邮件未送达
+</Accordion>
+<Accordion title="验证码与邀请邮件未送达" id="verification-code-and-invitation-emails-not-delivered" value="verification-code-and-invitation-emails-not-delivered">
先查看 backend 启动日志。日志会说明当前使用 `SMTP relay`、`Resend API` 还是 `DEV mode`:
```bash
docker compose -f docker-compose.selfhost.yml logs backend \
- | grep "EmailService:"
+ | grep "EmailService:"
```
- **DEV mode**:邮件不会发出,验证码和邀请链接只写入 backend 日志;
@@ -182,7 +225,8 @@ docker compose -f docker-compose.selfhost.yml logs backend \
生产环境不要依赖日志中的验证码,也不要启用固定本地测试验证码。
</Callout>
-## 附件上传或下载失败
+</Accordion>
+<Accordion title="附件上传或下载失败" id="attachment-uploads-or-downloads-fail" value="attachment-uploads-or-downloads-fail">
先检查 backend 日志和响应状态码。常见原因是:
@@ -193,7 +237,8 @@ docker compose -f docker-compose.selfhost.yml logs backend \
使用 Docker Compose 时,默认的 `backend_uploads` volume 保存本地附件。重建容器不会删除它,但 `docker compose down -v` 会删除数据卷。S3 相关配置见[环境变量](/environment-variables#附件存储)。
-## 用量(Usage)为 0
+</Accordion>
+<Accordion title="用量(Usage)为 0" id="usage-shows-zero" value="usage-shows-zero">
Usage 页面读取按小时汇总的数据,不直接读取每次运行的原始用量。先确认原始数据和汇总表:
@@ -208,17 +253,18 @@ ORDER BY plan_time DESC
LIMIT 20;
```
-如果 `task_usage` 有数据、汇总表为空,并且调度记录显示失败,先确认 migration 已经全部应用;升级被 migration 103 拒绝执行的情况见下一节。也可以手动执行一次汇总来区分 SQL 和调度问题:
+如果 `task_usage` 有数据、汇总表为空,并且调度记录显示失败,先确认 migration 已经全部应用;升级被 migration 103 拒绝执行的情况见[升级时 migration 103 拒绝执行](#migration-103-blocks-an-upgrade)。也可以手动执行一次汇总,区分是 SQL 问题还是调度问题:
```sql
SELECT rollup_task_usage_hourly();
```
-手动执行后数字正常,说明汇总函数可用,问题在 backend 的定时调度;手动 SQL 只补一次汇总,不会恢复调度。按小时汇总由 backend 内置调度执行,不需要自行配置 pg_cron。
+手动执行后数字正常,说明汇总函数可用,问题在 backend 的定时调度。手动 SQL 只补一次汇总,不会恢复调度。按小时汇总由 backend 内置调度执行,不需要自行配置 pg_cron。
-## 升级时 migration 103 拒绝执行
+</Accordion>
+<Accordion title="升级时 migration 103 拒绝执行" id="migration-103-blocks-an-upgrade" value="migration-103-blocks-an-upgrade">
-正常升级不需要为 103 做任何事:`migrate up` 在应用它之前会自动回填历史用量数据——空库直接通过,有历史数据的实例自动按月补齐后继续。
+正常升级不需要为 103 做任何事:`migrate up` 在应用它之前会自动回填历史用量数据,空库直接通过,有历史数据的实例按月补齐后继续。
如果 backend 启动仍报 `refusing to drop legacy daily rollups`,说明自动回填没有完成(例如回填中途失败,或没有通过 `migrate up` 而是直接应用了 SQL)。此时手动运行回填命令,完成后重启 backend:
@@ -227,19 +273,35 @@ cd server
DATABASE_URL='postgres://...' go run ./cmd/backfill_task_usage_hourly
```
-常用 flag:`--dry-run` 只预览不写入;`--sleep-between-slices` 在切片之间加间隔,降低对繁忙实例的读压。命令按月切片、幂等,中断后可以直接重跑;它持有 advisory lock,与服务端的定时汇总互斥,不会产生重复或不一致的汇总数据。完成后重启 backend,用 `/readyz` 确认 `migrations` 为 `ok`。
+常用 flag:`--dry-run` 只预览不写入;`--sleep-between-slices` 在切片之间加间隔,降低对繁忙实例的读压。命令按月切片、幂等,中断后可以直接重跑。它持有 advisory lock,与服务端的定时汇总互斥,不会产生重复或不一致的汇总数据。完成后重启 backend,用 `/readyz` 确认 `migrations` 为 `ok`。
-## 端口占用
+</Accordion>
+<Accordion title="端口占用" id="port-already-in-use" value="port-already-in-use">
本地常用端口包括 API 的 `8080`、Web 的 `3000` 和守护进程健康检查端口。先找出占用者:
+<Tabs groupId="os" persist items={["macOS / Linux", "Windows"]}>
+<Tab value="macOS / Linux">
+
+```bash
+lsof -nP -iTCP:8080 -sTCP:LISTEN
+```
+
+</Tab>
+<Tab value="Windows">
+
```bash
-lsof -nP -iTCP:8080 -sTCP:LISTEN # macOS / Linux
-netstat -ano | findstr :8080 # Windows
+netstat -ano | findstr :8080
```
+</Tab>
+</Tabs>
+
如果它是另一个 Multica checkout,先在那个目录运行 `make stop`。否则正常停止占用端口的程序,或修改当前服务端口。公网 80/443 由 Caddy、Nginx 等反向代理监听。
+</Accordion>
+</Accordions>
+
## 日志位置
| 组件 | 查看方式 |
@@ -252,7 +314,7 @@ netstat -ano | findstr :8080 # Windows
| Docker backend | `docker compose -f docker-compose.selfhost.yml logs -f backend` |
| 浏览器 | 开发者工具中的 Console 和 Network |
-哪个文件是当前活跃的日志,取决于守护进程启动时使用的 profile;早前守护进程残留的旧日志同样能正常读出来,最容易让人调错文件。不要靠猜去开文件:`multica daemon logs` 会在输出日志内容前先打印它解析到的绝对路径。读命名 profile 的日志时加上 `--profile <name>`。
+哪个文件是当前活跃的日志,取决于守护进程启动时使用的 profile。早前守护进程留下的旧日志也能正常打开,很容易看错文件。所以不要凭猜测打开文件:`multica daemon logs` 会在输出日志内容前先打印它解析到的绝对路径。读命名 profile 的日志时加上 `--profile <name>`。
需要直接观察守护进程启动过程时,可以改为前台运行:
@@ -261,7 +323,7 @@ multica daemon stop
multica daemon start --foreground
```
-仍然无法定位时,到 [GitHub 任务](https://github.com/multica-ai/multica/issues) 搜索已有问题或提交新的任务。
+仍然无法定位时,到 [GitHub Issues](https://github.com/multica-ai/multica/issues) 搜索已有问题,或提交新的 issue。
## 接下来
diff --git a/apps/docs/content/docs/tutorial.fr.mdx b/apps/docs/content/docs/tutorial.fr.mdx
index 583298c382..0de6985633 100644
--- a/apps/docs/content/docs/tutorial.fr.mdx
+++ b/apps/docs/content/docs/tutorial.fr.mdx
@@ -3,6 +3,8 @@ title: Tutoriel complet
description: "Partez d'un espace de travail vide et faites passer un projet de site web personnel par tous les parcours clés de Multica : créer des agents, livrer avec des tâches, former un squad, construire des skills et mettre en place l'automatisation."
---
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
Multica est une plateforme où les personnes et les agents IA travaillent ensemble. Ce tutoriel part de zéro et couvre :
- la mise en place de votre propre espace de travail
@@ -21,26 +23,40 @@ Le projet d'exemple est un site web personnel, qui sert à parcourir de bout en
Un espace de travail est l'endroit où une équipe travaille : tâches, projets et agents appartiennent tous à un espace de travail. La prise en main qui suit l'inscription vous guide dans la création de votre premier espace de travail. Si vous avez été invité dans une équipe, la connexion vous amène directement dans l'espace de travail de cette équipe.
-Ce tutoriel crée un nouvel espace de travail pour la démonstration. Cliquez sur le nom de l'espace de travail en haut de la barre latérale et choisissez **Créer un espace de travail** :
+Ce tutoriel crée un nouvel espace de travail pour la démonstration.
+
+<Steps>
+<Step>
+
+Cliquez sur le nom de l'espace de travail en haut de la barre latérale et choisissez **Créer un espace de travail** :
![Le point d'entrée pour créer un espace de travail](/images/docs/tutorial-create-workspace-menu.webp)
-Deux champs sont à remplir lors de la création :
+</Step>
+<Step>
+
+Remplissez deux champs :
- **Nom de l'espace de travail** : affiché aux membres ; il peut être modifié plus tard.
- **URL** : le slug de l'adresse de l'espace de travail — le `my-team` de `multica.ai/my-team`. Elle ne peut plus être modifiée après la création.
![La page de création d'un espace de travail](/images/docs/tutorial-create-workspace-form.webp)
+</Step>
+<Step>
+
La création ouvre le nouvel espace de travail. La barre latérale à gauche est le point de départ de toutes les étapes suivantes ; la liste des tâches au centre est encore vide, et les prochaines étapes consistent à amener des agents à la remplir.
![Un espace de travail tout juste créé, encore vide](/images/docs/tutorial-empty-workspace.webp)
+</Step>
+</Steps>
+
## Connecter votre ordinateur
Les agents exécutent le travail sur les ordinateurs que vous connectez, à l'aide des outils de codage IA installés sur ces ordinateurs.
-Ce tutoriel utilise [Multica Desktop](https://multica.ai/download) : après le téléchargement et la connexion, l'application enregistre automatiquement cet ordinateur comme runtime et détecte les outils de codage IA installés. Ouvrez **Équipe IA → Runtimes** en bas de la barre latérale et vérifiez que l'ordinateur est en ligne :
+Ce tutoriel utilise [Multica Desktop](https://multica.ai/download) : après le téléchargement et la connexion, l'application enregistre automatiquement cet ordinateur comme runtime et détecte les outils de codage IA installés. Ouvrez **Runtimes** sous **Équipe IA** dans la barre latérale et vérifiez que l'ordinateur est en ligne :
![La liste des runtimes avec cet ordinateur en ligne](/images/docs/tutorial-runtimes-list.webp)
@@ -48,16 +64,16 @@ Ouvrez l'ordinateur pour voir chaque outil détecté :
![Détail du runtime : les outils de codage IA détectés](/images/docs/tutorial-runtime-detail.webp)
-Desktop n'est pas obligatoire : sur la page Runtimes, cliquez sur **Ajouter un ordinateur** et suivez les instructions pour procéder à l'installation en ligne de commande. Le daemon tourne alors en arrière-plan — voir [Daemon et runtimes](/daemon-runtimes).
+Desktop n'est pas obligatoire : sur la page Runtimes, cliquez sur **Ajouter**, choisissez **Autre machine ou serveur** et suivez les instructions pour procéder à l'installation en ligne de commande. Le daemon tourne alors en arrière-plan — voir [Daemon et runtimes](/daemon-runtimes).
## Créer votre premier agent
Les agents sont des membres à part entière d'un espace de travail : on peut leur assigner des tâches, ils publient des commentaires et discutent avec vous. Le premier agent est un assistant chargé du travail courant de l'espace de travail ; plusieurs étapes ultérieures de ce tutoriel lui sont confiées.
-Ouvrez **Agents** dans la barre latérale, cliquez sur **Nouvel agent**, choisissez **Partir de zéro** et remplissez trois champs :
+Ouvrez **Agents** sous **Équipe IA** dans la barre latérale et cliquez sur **Nouvel agent**. Choisissez d'abord le runtime : l'un des outils de codage IA de l'ordinateur connecté à l'étape précédente ; ce tutoriel utilise Claude. Remplissez ensuite trois champs sur la page de configuration :
- **Nom** : `Multica helper`.
-- **Runtime** et **Modèle** : choisissez l'ordinateur connecté à l'étape précédente et l'un de ses outils de codage IA, puis un modèle pris en charge par cet outil. Ce tutoriel utilise Claude et Sonnet.
+- **Modèle** : un modèle pris en charge par cet outil. Ce tutoriel utilise Sonnet.
- **Instructions** : le prompt fourni à l'agent à chaque exécution. Indiquez ce dont il est responsable et ce dont il ne l'est pas :
```text
@@ -74,7 +90,7 @@ request is ambiguous, ask before acting.
![La page de création d'un agent](/images/docs/tutorial-create-agent-form.webp)
-Laissez les autres champs à leurs valeurs par défaut et créez l'agent. De retour sur la page **Agents**, Multica helper est en ligne et peut prendre du travail :
+Laissez les autres champs à leurs valeurs par défaut et cliquez sur **Créer l'agent**. De retour sur la page **Agents**, Multica helper est en ligne et peut prendre du travail :
![Détail de l'agent : Multica helper en ligne](/images/docs/tutorial-agent-detail.webp)
@@ -110,7 +126,10 @@ Enfin, cliquez sur **Connecter GitHub** sur la même page et autorisez le dépô
La configuration est terminée. À partir d'ici, voici comment se déroule le travail quotidien dans Multica : les besoins sont rédigés sous forme de tâches et confiés à des agents.
-Le site part du modèle officiel de shadcn plutôt que d'être échafaudé de zéro : le modèle apporte déjà la stack et la configuration de base, et Engineer construit le contenu et le design par-dessus.
+Le site part du modèle officiel de shadcn : le modèle apporte déjà la stack et la configuration de base, et Engineer construit le contenu et le design par-dessus.
+
+<Steps>
+<Step>
Cliquez sur **Nouvelle tâche** en haut de la barre latérale (raccourci `C`). Dans le mode agent par défaut, il n'y a pas de titre à saisir — sélectionnez Engineer sous **Créé par** et écrivez directement les exigences dans la description ; le titre est généré à la création. Vous pouvez aussi passer en mode manuel et rédiger vous-même le titre et le corps. La description :
@@ -147,16 +166,25 @@ La description contient trois types d'informations : des contraintes (partir du
![Le mode agent dans la boîte de dialogue Nouvelle tâche, avec Engineer sélectionné comme créateur](/images/docs/tutorial-new-issue-agent-mode.webp)
+</Step>
+<Step>
+
Après validation, Multica crée la tâche (`MUL-1`, avec un titre généré) et l'assigne à Engineer. Engineer commence l'exécution et le statut passe à En cours. Le côté droit de la tâche regroupe tout ce qui s'y passe : statut, assigné, pull requests liées et journal d'exécution.
L'exécution prend quelques minutes, et deux points d'entrée permettent de suivre son avancement : le badge d'activité à côté du titre, et **Journal d'exécution** à droite — ouvrez l'exécution en cours :
![Les deux points d'entrée pour suivre l'avancement](/images/docs/tutorial-issue-engineer-working.webp)
+</Step>
+<Step>
+
Le journal d'exécution contient chaque étape de l'exécution : les lignes **Agent** sont son propre récit, et **Bash**, **Read** et **Edit** correspondent aux commandes qu'il a lancées et aux fichiers qu'il a lus et écrits. Au moment de cette capture, il prend des captures d'écran des pages terminées pour vérifier son propre travail, et vient de constater que le séparateur du tableau de tarifs est mal aligné. Cliquez sur le ⓘ en haut à droite pour voir l'ordinateur, l'outil de codage IA et le répertoire de travail utilisés pour l'exécution.
![Journal d'exécution : chaque étape suivie par Engineer](/images/docs/tutorial-execution-log.webp)
+</Step>
+</Steps>
+
## Validation : en discuter dans la tâche
À la fin de l'exécution, Engineer fait passer le statut à En relecture et une notification arrive dans votre Boîte de réception. Il a publié sur la tâche un commentaire de fin avec des captures d'écran des pages terminées :
@@ -165,29 +193,49 @@ Le journal d'exécution contient chaque étape de l'exécution : les lignes **Ag
Les captures donnent un aperçu, mais une vraie relecture implique d'ouvrir le site dans un navigateur. Le site a été construit sur votre ordinateur : il suffit donc de demander à Engineer de lancer un serveur local pour y accéder. La zone **Pull requests** à droite est également toujours vide — la tâche demandait explicitement une PR, posez donc directement la question aussi.
-Cette fois, pas par la zone de commentaire. Un bouton de discussion se trouve dans le coin inférieur droit, disponible sur toutes les pages de l'espace de travail ; c'est la même fonctionnalité que **Discussion** dans la barre latérale :
+Cette fois, utilisez la discussion plutôt que la zone de commentaire :
+
+<Steps>
+<Step>
+
+Un bouton de discussion se trouve dans le coin inférieur droit, disponible sur toutes les pages de l'espace de travail ; c'est la même fonctionnalité que **Discussion** dans la barre latérale :
![Le bouton de discussion dans le coin inférieur droit](/images/docs/tutorial-chat-fab.webp)
+</Step>
+<Step>
+
Ouvrez-le, sélectionnez Engineer et tapez `@` pour référencer la tâche en cours — la conversation reprend alors le contexte de cette tâche. Envoyez les deux questions :
![Poser la question dans la discussion avec la tâche référencée](/images/docs/tutorial-chat-ask-in-issue.webp)
+</Step>
+<Step>
+
La réponse d'Engineer comporte deux parties : le serveur local est lancé, avec l'adresse à ouvrir ; et la PR avait en fait déjà été soumise, mais son titre, son nom de branche et son corps ne contenaient pas `MUL-1`, si bien que la liaison automatique n'avait rien à faire correspondre — il a donc ajouté l'identifiant au titre de la PR.
![La réponse d'Engineer : l'adresse locale et la raison pour laquelle la PR n'était pas liée](/images/docs/tutorial-chat-engineer-reply.webp)
+</Step>
+<Step>
+
Ouvrez l'adresse fournie dans un navigateur pour voir le site :
![La page d'accueil du site exécutée en local](/images/docs/tutorial-site-localhost.webp)
+</Step>
+<Step>
+
De retour sur la tâche, une carte de PR apparaît désormais dans la zone **Pull requests** à droite, avec son état et la taille des modifications ; un clic ouvre la PR sur GitHub. Pour les dépôts dotés d'une CI, les résultats des vérifications s'affichent aussi :
![La carte de PR sur le côté droit de la tâche](/images/docs/tutorial-issue-pr-linked.webp)
+</Step>
+</Steps>
+
## Intégrer les retours dans les instructions
-Cette relecture a mis en évidence deux habitudes de travail d'Engineer : il vérifie son travail par des captures d'écran répétées une fois terminé, ce qui consomme beaucoup de temps d'exécution ; et il ouvre des PR sans l'identifiant de la tâche, qui ne sont donc pas liées. Aucune des deux n'est une erreur ponctuelle — il les reproduit à chaque fois. Ce qu'il faut changer, ce n'est pas cette tâche, mais ses instructions.
+Cette relecture a mis en évidence deux habitudes de travail d'Engineer : il vérifie son travail par des captures d'écran répétées une fois terminé, ce qui consomme beaucoup de temps d'exécution ; et il ouvre des PR sans l'identifiant de la tâche, qui ne sont donc pas liées. Il les reproduira à chaque fois, donc ce sont ses instructions qu'il faut modifier ; la tâche elle-même peut rester telle quelle.
Inutile de modifier les instructions à la main : un agent peut mettre à jour sa propre configuration avec le CLI multica. Dans la même conversation, donnez à Engineer les deux règles — pas d'autovérification par captures d'écran une fois le travail terminé, puisque la relecture se fait dans un navigateur ; et le nom de branche ou le titre d'une PR doit contenir l'identifiant de la tâche — et demandez-lui de les inscrire dans ses propres instructions :
@@ -199,22 +247,34 @@ Ouvrez **Agents → Engineer** : les deux règles figurent dans les instructions
![Les instructions mises à jour d'Engineer](/images/docs/tutorial-engineer-updated-instructions.webp)
-Dès lors, les deux règles s'appliquent avec les instructions à chaque exécution. C'est aussi la méthode de base pour affiner un agent : quand un problème revient sans cesse, inscrivez la correction dans les instructions au lieu de la répéter à la main à chaque fois.
+Dès lors, les deux règles s'appliquent avec les instructions à chaque exécution. Affiner un agent revient essentiellement à cela : quand un problème revient sans cesse, inscrivez la correction dans les instructions pour ne pas avoir à la répéter.
## Un troisième agent : Reviewer
Engineer a livré une première version, mais certains problèmes lui échappent. La relecture est confiée à un nouvel agent : un contexte neuf, dédié à la vérification de la qualité du code au regard des exigences de la tâche.
+<Steps>
+<Step>
+
La création est de nouveau confiée à Multica helper : un agent nommé Reviewer, cette fois sur Codex avec le modèle GPT-5.6 Sol — un outil et un modèle différents de ceux d'Engineer ; il ne fait que relire, ne modifie jamais le code et rédige ses conclusions sous forme de commentaires sur la tâche. Les instructions sont là encore générées par le helper — lire l'état réel de la PR avant de relire, rédiger les constats en commentaires avec l'emplacement des fichiers, et ne jamais modifier le code :
![La configuration de Reviewer](/images/docs/tutorial-reviewer-detail.webp)
+</Step>
+<Step>
+
La relecture ne nécessite ni nouvelle tâche ni changement d'assigné. De retour dans la zone de commentaire de MUL-1, tapez `@Reviewer` pour le mentionner, indiquez ce qu'il faut faire et envoyez — une indication sous la zone précise que Reviewer commencera son exécution dès l'envoi du commentaire :
![Lancer une relecture en @mentionnant Reviewer dans un commentaire](/images/docs/tutorial-comment-mention-reviewer.webp)
+</Step>
+<Step>
+
Quelques minutes plus tard, le commentaire de relecture arrive, avec pour conclusion que des modifications sont nécessaires avant la fusion. Cinq constats en deux groupes — trois sur les conventions de code, deux sur la conformité aux exigences — chacun avec un fichier et un numéro de ligne. Les deux constats de conformité sont précisément ce qu'Engineer ne pouvait pas voir seul : le tableau de tarifs présente des prix, des acomptes et des conditions fiscales inventés comme du contenu réel, sans aucune mention indiquant qu'il s'agit de valeurs fictives, et la section contact contient un lien Instagram non vérifié. Le commentaire se termine par ce que Reviewer a vérifié lui-même : typecheck, lint et build passent tous.
+</Step>
+<Step>
+
Corriger ne demande aucun nouveau processus : mentionnez @Engineer dans la zone de commentaire et demandez-lui de traiter tous les constats. Engineer commence son exécution dès l'envoi, ce qui est visible à la fois dans le badge à côté du titre et dans le journal d'exécution à droite :
![Les constats de Reviewer, avec @Engineer qui prend en charge les corrections](/images/docs/tutorial-reviewer-findings.webp)
@@ -223,11 +283,17 @@ Quelques minutes plus tard, Engineer rend compte : les cinq constats sont corrig
![Le compte rendu de corrections d'Engineer](/images/docs/tutorial-engineer-fixed.webp)
+</Step>
+<Step>
+
Mentionnez de nouveau Reviewer pour une seconde passe : les cinq constats sont résolus, la PR est prête à être fusionnée, et il reste deux suggestions de suivi de faible priorité :
![La nouvelle vérification de Reviewer est concluante](/images/docs/tutorial-reviewer-recheck.webp)
-Développement et relecture alternent ainsi : trouver les problèmes, les corriger, et chaque itération précise un peu plus la définition du site. Une seule tâche mobilise désormais deux agents — Engineer implémente, Reviewer relit — et quelques commentaires courts de votre part suffisent à faire tourner toute la boucle.
+</Step>
+</Steps>
+
+Une seule tâche mobilise désormais deux agents — Engineer implémente, Reviewer relit — et quelques commentaires courts de votre part suffisent pour enchaîner les allers-retours entre développement et relecture.
## Fusionner et clôturer
@@ -235,11 +301,11 @@ La fusion se demande elle aussi par un commentaire : demandez à Engineer de fus
![La fusion est terminée et la tâche passe à Terminé](/images/docs/tutorial-issue-done.webp)
-La boucle est bouclée pour la première tâche : de la description du besoin jusqu'à la fusion — implémentation, relecture, corrections, validation et fusion — tout est consigné dans un seul fil d'activité.
+La première tâche est terminée : chaque étape, de la description du besoin jusqu'à la fusion, est consignée dans un seul fil d'activité.
## Former un squad
-La boucle de MUL-1 fonctionne, mais chaque passage de relais partait de vous : mentionner Reviewer après votre propre relecture, mentionner Engineer après la sienne. La coordination elle-même est devenue votre travail. Cette couche aussi peut être déléguée. La réponse de Multica s'appelle le **squad** : un groupe nommé d'agents et de membres dirigé par un agent chef. Lorsqu'une tâche est assignée à un squad, le chef la prend en charge : il lit la tâche, délègue le travail et fait avancer le statut. Lorsqu'un membre répond, le chef est réveillé automatiquement et décide de l'étape suivante ; à la fin, il vous présente le livrable. Le chef reprend exactement le rôle que vous venez de jouer.
+La boucle de MUL-1 fonctionne, mais chaque passage de relais partait de vous : mentionner Reviewer après votre propre relecture, mentionner Engineer après la sienne. La coordination elle-même est devenue votre travail, et elle peut aussi être déléguée, grâce au **squad** : un groupe nommé d'agents et de membres dirigé par un agent chef. Lorsqu'une tâche est assignée à un squad, le chef la prend en charge : il lit la tâche, délègue le travail et fait avancer le statut. Lorsqu'un membre répond, le chef est réveillé automatiquement et décide de l'étape suivante ; à la fin, il vous présente le livrable. C'est ce que vous faisiez vous-même sur MUL-1.
Un squad, c'est la répartition des rôles que vous avez déjà, plus un chef :
@@ -260,7 +326,7 @@ Ouvrez **Squads → Website Team** dans la barre latérale pour vérifier le ré
## Skills : des méthodes réutilisables
-Inscrire les retours dans les instructions a résolu plus haut le problème d'un seul agent — les instructions n'appartiennent qu'à cet agent. Pour partager une méthode entre plusieurs agents, ou reprendre une méthode déjà écrite par quelqu'un d'autre, utilisez un **skill**.
+Inscrire les retours dans les instructions n'a résolu plus haut que le problème d'un seul agent, car les instructions n'appartiennent qu'à cet agent. Pour partager une méthode entre plusieurs agents, ou reprendre une méthode déjà écrite par quelqu'un d'autre, utilisez un **skill**.
Un skill est un paquet de connaissances pour un agent : un `SKILL.md` accompagné de fichiers annexes facultatifs, qui indique à l'agent comment aborder et traiter un type de travail. Multica suit le standard ouvert Anthropic Agent Skills : tout skill conforme à la spécification peut donc être importé directement ; une fois rattaché à un agent, il est synchronisé vers le runtime au moment de l'exécution. Ouvrez la page **Skills** — les deux skills importés ci-dessus y figurent, avec à droite les agents auxquels ils sont rattachés :
@@ -291,37 +357,49 @@ Dans la tâche générée, le besoin est déjà organisé en une description str
![MUL-2 : Lead crée la tâche et se met au travail](/images/docs/tutorial-issue-squad-created.webp)
-La suite est entièrement le travail du chef. Son commentaire de délégation est plus qu'un simple transfert : il ajoute deux contraintes absentes de la tâche — l'identité fictive doit être cohérente sur tout le site, et le passage en revue doit couvrir les métadonnées et le README — avant de passer la main à Engineer. Quand Engineer a terminé, il signale la PR dans le même fil d'activité :
+La suite est entièrement le travail du chef. Dans son commentaire de délégation, il ajoute deux contraintes absentes de la tâche — l'identité fictive doit être cohérente sur tout le site, et le passage en revue doit couvrir les métadonnées et le README — avant de passer la main à Engineer. Quand Engineer a terminé, il signale la PR dans le même fil d'activité :
![Lead délègue et Engineer signale la PR](/images/docs/tutorial-squad-dispatch.webp)
-La relecture revient avec zéro constat et Lead livre : il vous mentionne pour validation, commence par la conclusion, puis donne le lien de la PR, une description des modifications et deux points qui demandent votre jugement, et conclut par une ligne — rien n'est fusionné sans votre approbation :
+La relecture revient avec zéro constat et Lead livre : il vous mentionne pour validation, commence par la conclusion, puis donne le lien de la PR, une description des modifications et deux points qui demandent votre jugement, et précise pour finir que rien n'est fusionné sans votre approbation :
![Le compte rendu de livraison de Lead](/images/docs/tutorial-squad-delivery.webp)
-De l'organisation du besoin au choix de l'approche, en passant par le développement, la relecture et le compte rendu de livraison, aucune étape de cette tâche n'a eu besoin de vous pour faire le lien. La validation fonctionne comme pour MUL-1 — vous pouvez aussi lui faire lancer un serveur local et regarder dans le navigateur, ce qui n'est pas répété ici. Le passage à Terminé vous revient toujours : répondez pour demander la fusion, ou changez le statut à la main. Chaque étape du fil d'activité est consignée, exactement comme une tâche dans une équipe humaine — seul l'exécutant a changé.
+De l'organisation du besoin au choix de l'approche, en passant par le développement, la relecture et le compte rendu de livraison, aucune étape de cette tâche n'a eu besoin de vous pour faire le lien. La validation fonctionne comme pour MUL-1 ; vous pouvez aussi lui faire lancer un serveur local et regarder dans le navigateur, ce qui n'est pas répété ici. Le passage à Terminé vous revient toujours : répondez pour demander la fusion, ou changez le statut à la main.
## Automatisation
Jusqu'ici, chaque déclenchement partait de vous — assignation, mention, discussion. L'**automatisation** est un quatrième type de déclencheur : lancer du travail automatiquement selon une planification.
+<Steps>
+<Step>
+
Une phrase suffit pour la configurer : dites à Multica helper que chaque lundi à neuf heures du matin, Reviewer doit effectuer une vérification complète du dépôt du site — redondances et code mort, structure discutable, endroits qui pourraient mieux suivre les conventions — en consignant ses constats dans des commentaires de tâche, sans modifier le code :
![Le helper crée une automatisation](/images/docs/tutorial-autopilot-create.webp)
+</Step>
+<Step>
+
Ouvrez la page **Automatisation** : l'assigné, l'invite et la planification (cron et fuseau horaire) sont tous configurés. Il existe deux modes d'exécution :
- **Créer une tâche** (par défaut) : chaque déclenchement crée d'abord une tâche, si bien que le travail arrive sur le tableau avec un historique et des commentaires identiques à ceux de n'importe quelle autre tâche ;
-- **Exécution seule** : s'exécute sans créer de tâche et ne laisse de trace que dans l'historique des exécutions de l'automatisation — si une exécution ne trouve rien, elle ne laisse rien derrière elle.
+- **Exécution seule** : s'exécute sans créer de tâche et ne laisse de trace que dans l'historique des exécutions de l'automatisation ; si une exécution ne trouve rien, rien n'apparaît sur le tableau.
Une vérification périodique utilise le mode Créer une tâche. Plutôt que d'attendre lundi, cliquez sur **Exécuter maintenant** pour la déclencher une fois immédiatement :
![Détail de l'automatisation : la planification et Exécuter maintenant](/images/docs/tutorial-autopilot-detail.webp)
+</Step>
+<Step>
+
La tâche est créée et Reviewer commence la vérification. Désormais, chaque lundi à la même heure, la même vérification crée automatiquement une nouvelle tâche, sans que personne n'ait à la déclencher :
![Une tâche créée automatiquement par une automatisation](/images/docs/tutorial-autopilot-issue.webp)
+</Step>
+</Steps>
+
Les déclencheurs prennent en charge les webhooks en plus des planifications, et l'assigné peut aussi être un squad — voir [Automatisations](/autopilots).
## Travailler avec d'autres personnes
@@ -334,9 +412,9 @@ Jusqu'ici, vous étiez le seul membre humain de l'espace de travail. Dans **Para
Quand les tâches s'accumulent, des outils permettent de les organiser : un **projet** regroupe des tâches liées et les suit comme un tout (voir [Projets](/projects)). D'autres façons d'organiser le travail arrivent, et **Space** est presque prêt.
-Si l'on regarde le chemin parcouru : partir d'un espace de travail vide, connecter un ordinateur, créer quatre agents, mener deux tâches au bout de leur cycle de vie, puis confier la coordination à un chef et les vérifications périodiques à l'automatisation. Votre implication recule d'un niveau à chaque étape, jusqu'à ce qu'il ne reste que deux choses : décrire le besoin et valider le résultat.
+Si l'on regarde le chemin parcouru : partir d'un espace de travail vide, connecter un ordinateur, créer quatre agents, mener deux tâches à terme, puis confier la coordination à un chef et les vérifications périodiques à l'automatisation. À la fin, il ne vous reste qu'à décrire le besoin et valider le résultat.
-Les agents sont des membres à part entière et toute la collaboration reste dans le fil d'activité de la tâche — c'est la façon de travailler que propose Multica. Le produit évolue encore rapidement ; retrouvez d'autres fonctionnalités dans la [documentation](/).
+Multica évolue encore rapidement ; retrouvez d'autres fonctionnalités dans la [documentation](/).
## Étapes suivantes
diff --git a/apps/docs/content/docs/tutorial.ja.mdx b/apps/docs/content/docs/tutorial.ja.mdx
index 14d0dc87b3..dc8b36744b 100644
--- a/apps/docs/content/docs/tutorial.ja.mdx
+++ b/apps/docs/content/docs/tutorial.ja.mdx
@@ -3,6 +3,8 @@ title: 完全ガイド
description: 空のワークスペースから始めて、個人サイトのプロジェクトで Multica のコアフローを一通り実践します。エージェントの作成、タスクによる成果物の提供、スクワッドの編成、スキルの蓄積、自動化の設定を扱います。
---
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
Multica は、人と AI エージェントが一緒に働くためのプラットフォームです。このガイドではゼロから始めて、次のことを行います。
- 自分のワークスペースを構築する
@@ -21,26 +23,40 @@ Multica は、人と AI エージェントが一緒に働くためのプラッ
ワークスペースはチームが仕事をする場所です。タスク、プロジェクト、エージェントはいずれかのワークスペースに属します。登録後のガイドに従って最初のワークスペースを作成できます。チームに招待された場合は、ログインするとそのチームのワークスペースに直接入ります。
-このガイドでは新しいワークスペースを作成して説明します。サイドバー上部のワークスペース名をクリックし、**ワークスペースを作成** を選択します。
+このガイドでは新しいワークスペースを作成して説明します。
+
+<Steps>
+<Step>
+
+サイドバー上部のワークスペース名をクリックし、**ワークスペースを作成** を選択します。
![ワークスペース作成の入口](/images/docs/tutorial-create-workspace-menu.webp)
-作成時に入力する項目は 2 つです。
+</Step>
+<Step>
+
+次の 2 つを入力します。
- **ワークスペース名**:メンバーに表示される名前です。後から変更できます。
- **ワークスペースURL**:ワークスペースのアドレスに使う slug です。たとえば `multica.ai/my-team` の `my-team` の部分で、作成後は変更できません。
![ワークスペース作成ページ](/images/docs/tutorial-create-workspace-form.webp)
+</Step>
+<Step>
+
作成が完了すると新しいワークスペースに入ります。左側がサイドバーで、以降の操作はすべてここから始めます。中央のタスク一覧はまだ空です。これからの数ステップで、エージェントにここを埋めてもらいます。
![作成したばかりの空のワークスペース](/images/docs/tutorial-empty-workspace.webp)
+</Step>
+</Steps>
+
## コンピュータを接続する
エージェントは接続したコンピュータ上で作業を実行します。使うのは、そのコンピュータにインストールされている AI コーディングツールです。
-このガイドでは [Multica Desktop](https://multica.ai/download) を使って説明します。ダウンロードしてログインすると、このコンピュータが自動的にランタイムとして登録され、インストール済みの AI コーディングツールが検出されます。サイドバー下部の **設定 → ランタイム** を開き、このコンピュータがオンラインになっていることを確認します。
+このガイドでは [Multica Desktop](https://multica.ai/download) を使って説明します。ダウンロードしてログインすると、このコンピュータが自動的にランタイムとして登録され、インストール済みの AI コーディングツールが検出されます。サイドバーの **AI チーム** にある **ランタイム** を開き、このコンピュータがオンラインになっていることを確認します。
![ランタイム一覧:このコンピュータがオンライン](/images/docs/tutorial-runtimes-list.webp)
@@ -48,16 +64,16 @@ Multica は、人と AI エージェントが一緒に働くためのプラッ
![ランタイム詳細:検出された AI コーディングツール](/images/docs/tutorial-runtime-detail.webp)
-Desktop を使わない方法もあります。ランタイムのページで **コンピュータを追加** をクリックし、案内に従ってコマンドラインからインストールすると、デーモンがバックグラウンドで常駐します。詳しくは[デーモンとランタイム](/daemon-runtimes)を参照してください。
+Desktop を使わない方法もあります。ランタイムのページで **追加** をクリックして **他のマシンまたはサーバー** を選び、案内に従ってコマンドラインからインストールすると、デーモンがバックグラウンドで常駐します。詳しくは[デーモンとランタイム](/daemon-runtimes)を参照してください。
## 最初のエージェントを作成する
エージェントはワークスペースの正式なメンバーです。タスクを割り当てたり、コメントを書いたり、あなたと会話したりできます。最初のエージェントとして、ワークスペース内の日常業務を担当する helper を作成します。このガイドの以降の操作の多くは、このエージェントに任せます。
-サイドバーの **エージェント** を開き、**新規エージェント** をクリックして **空白から始める** を選び、3 つの項目を入力します。
+サイドバーの **AI チーム** にある **エージェント** を開き、**新規エージェント** をクリックします。まずランタイムとして、前のステップで接続したコンピュータ上の AI コーディングツールを選びます。このガイドでは Claude を使います。続いて設定画面で 3 つの項目を入力します。
- **名前**:`Multica helper`。
-- **ランタイム** と **モデル**:前のステップで接続したコンピュータと AI コーディングツールを選び、そのツールが対応するモデルから 1 つ選びます。このガイドでは Claude と Sonnet を使います。
+- **モデル**:そのツールが対応するモデルから 1 つ選びます。このガイドでは Sonnet を使います。
- **指示**:実行のたびにエージェントへ渡されるプロンプトです。何を担当し、何を担当しないかを明確に書きます。
```text
@@ -74,7 +90,7 @@ request is ambiguous, ask before acting.
![エージェント作成ページ](/images/docs/tutorial-create-agent-form.webp)
-残りの項目はデフォルトのまま、作成をクリックします。**エージェント** ページに戻ると、Multica helper はすでにオンラインで、仕事を受けられる状態です。
+残りの項目はデフォルトのまま、**エージェントを作成** をクリックします。**エージェント** ページに戻ると、Multica helper はすでにオンラインで、仕事を受けられる状態です。
![エージェント詳細:Multica helper がオンライン](/images/docs/tutorial-agent-detail.webp)
@@ -110,7 +126,10 @@ GitHub CLI を使わない場合は、自分で GitHub にリポジトリを作
設定はここまでですべて完了です。ここからは Multica の日常的な進め方になります。要件をタスクとして書き、エージェントに実行させます。
-サイトはゼロから組み立てるのではなく、shadcn の公式テンプレートから始めます。テンプレートには技術スタックと基本設定が含まれているため、Engineer はその上で内容とデザインを作ります。
+サイトは shadcn の公式テンプレートから始めます。テンプレートには技術スタックと基本設定が含まれているため、Engineer はその上で内容とデザインを作ります。
+
+<Steps>
+<Step>
サイドバー上部の **新規タスク** をクリックします(ショートカットは `C`)。デフォルトのエージェントモードでは、タイトルを入力する必要はありません。**作成者** で Engineer を選び、要件をそのまま説明に書くと、タイトルは作成時に自動生成されます。手動モードに切り替えて、タイトルと内容を自分で記入することもできます。説明は次のとおりです。
@@ -147,16 +166,25 @@ Open a pull request when it is ready.
![新規タスクのエージェントモード:作成者に Engineer を選択済み](/images/docs/tutorial-new-issue-agent-mode.webp)
+</Step>
+<Step>
+
送信すると、Multica がタスクを作成し(番号は `MUL-1`、タイトルは自動生成)、Engineer を担当者に設定します。Engineer はすぐに実行を開始し、ステータスが進行中に変わります。タスクの右側には、そのタスクのすべての動きが表示されます。ステータス、担当者、紐づいた pull request、実行ログです。
実行には数分かかります。進捗を見る入口は 2 つあります。タイトル横の作業ステータスのバッジと、右側の **実行ログ** です。現在の実行を開きます。
![進捗を確認する 2 つの入口](/images/docs/tutorial-issue-engineer-working.webp)
+</Step>
+<Step>
+
実行ログには、この実行の一つひとつのステップが記録されています。**Agent** の行はエージェントの説明、**Bash**、**Read**、**Edit** は実行したコマンドと読み書きしたファイルです。このスクリーンショットの時点では、Engineer は作成したページのスクリーンショットを撮って自己確認しており、価格表の区切り線がそろっていないことに気づいたところです。右上の ⓘ をクリックすると、この実行で使ったコンピュータ、AI コーディングツール、作業ディレクトリを確認できます。
![実行ログ:Engineer の一つひとつのステップ](/images/docs/tutorial-execution-log.webp)
+</Step>
+</Steps>
+
## 受け入れ確認:タスク内で対話する
実行が終わると、Engineer はステータスをレビュー中に変更し、通知がインボックスに届きます。Engineer はタスクに完了コメントを書き、作成したページのスクリーンショットを添えています。
@@ -165,29 +193,49 @@ Open a pull request when it is ready.
スクリーンショットでおおよそは分かりますが、受け入れ確認はブラウザで開いて行います。サイトはあなたのコンピュータ上でビルドされているので、Engineer にローカルサーバーを起動させればアクセスできます。また、右側の **Pull requests** の領域はまだ空です。タスクでは PR の提出を明確に求めていたので、この点もそのまま質問します。
-今回はコメント欄を使いません。画面右下にチャットボタンがあり、ワークスペースのどのページからでも開けます。サイドバーの **チャット** と同じ機能です。
+今回はコメント欄ではなく、チャットを使います。
+
+<Steps>
+<Step>
+
+画面右下にチャットボタンがあり、ワークスペースのどのページからでも開けます。サイドバーの **チャット** と同じ機能です。
![右下のチャットボタン](/images/docs/tutorial-chat-fab.webp)
+</Step>
+<Step>
+
開いたら Engineer を選び、`@` を入力して現在のタスクを参照します。会話にこのタスクのコンテキストが加わるので、先ほどの 2 点をそのまま送ります。
![チャットでタスクを参照して質問する](/images/docs/tutorial-chat-ask-in-issue.webp)
+</Step>
+<Step>
+
Engineer の返信は 2 つに分かれます。1 つは、ローカルサーバーを起動してアクセス用のアドレスを提示したこと。もう 1 つは、PR は実際にはすでに提出されているものの、タイトル、ブランチ名、本文のいずれにも `MUL-1` がなく、自動の紐づけが一致しなかったことです。その後、Engineer は PR のタイトルに番号を追加しました。
![Engineer の返信:ローカルのアドレスと PR が紐づかなかった理由](/images/docs/tutorial-chat-engineer-reply.webp)
+</Step>
+<Step>
+
提示されたアドレスをブラウザで開くと、サイトが表示されます。
![ローカルで動作しているサイトのトップページ](/images/docs/tutorial-site-localhost.webp)
+</Step>
+<Step>
+
タスクに戻ると、右側の **Pull requests** の領域にも PR カードが現れ、ステータスと変更の規模が表示されます。クリックすると GitHub 上の PR が直接開きます。CI を設定したリポジトリでは、check の結果も表示されます。
![タスク右側に現れた PR カード](/images/docs/tutorial-issue-pr-linked.webp)
+</Step>
+</Steps>
+
## フィードバックを指示に書き込む
-今回の受け入れ確認で、Engineer の 2 つの作業習慣が見えました。1 つは、完了後に何度もスクリーンショットを撮って自己確認し、実行時間をかなり使うこと。もう 1 つは、PR を提出するときにタスク番号を付けず、紐づかないことです。どちらも今回だけの偶発的なミスではなく、毎回繰り返される進め方です。直すべきなのはこのタスクではなく、Engineer の指示です。
+今回の受け入れ確認で、Engineer の 2 つの作業習慣が見えました。1 つは、完了後に何度もスクリーンショットを撮って自己確認し、実行時間をかなり使うこと。もう 1 つは、PR を提出するときにタスク番号を付けず、紐づかないことです。どちらも毎回繰り返す進め方なので、直すのは Engineer の指示です。このタスク自体はそのままで構いません。
指示を自分で書き換える必要はありません。エージェントは multica CLI で自分の設定を更新できます。先ほどの会話を続けて、Engineer に 2 つのルールを伝えます。完了後にスクリーンショットでの自己確認は不要で、受け入れ確認はブラウザで行うこと。PR のブランチ名かタイトルに必ずタスク番号を入れること。そのうえで、自分の指示に書き込むよう依頼します。
@@ -199,22 +247,34 @@ Engineer は `multica agent update` で更新を行い、指示に作業ルー
![更新後の Engineer の指示](/images/docs/tutorial-engineer-updated-instructions.webp)
-以降の実行では、この 2 つのルールが指示とともに毎回適用されます。これがエージェントを調整する基本の方法です。繰り返し起きる問題を見つけたら、毎回口頭で注意するのではなく、修正内容を指示に書き込みます。
+以降の実行では、この 2 つのルールが指示とともに毎回適用されます。エージェントの調整は基本的にこの繰り返しです。繰り返し起きる問題を見つけたら修正内容を指示に書き込み、毎回口頭で注意しなくて済むようにします。
## 3 体目のエージェント:Reviewer
Engineer は最初の版を提出しましたが、自分では気づけない問題もあります。レビューは新しいエージェントに任せます。まっさらなコンテキストで、タスクの要件と照らし合わせてコードの品質を確認する役割です。
+<Steps>
+<Step>
+
作成はやはり Multica helper に任せます。Reviewer という名前のエージェントで、今回は Codex と GPT-5.6 Sol モデルを選び、Engineer が使うツールともモデルとも別にします。レビューだけを行ってコードは変更せず、結論はタスクのコメントとして書きます。指示は今回も helper が生成します。PR の実際の状態を読んでからレビューする、指摘はファイルの位置を添えてコメントに書く、コードは決して変更しない、という内容です。
![Reviewer の設定](/images/docs/tutorial-reviewer-detail.webp)
+</Step>
+<Step>
+
レビューのために新しいタスクを作る必要も、担当者を変える必要もありません。MUL-1 のコメント欄に戻り、`@Reviewer` と入力して @メンションし、やってほしいことを書いて送信します。コメント欄の下には、送信すると Reviewer が実行を開始する旨が表示されます。
![コメントで @Reviewer してレビューを依頼する](/images/docs/tutorial-comment-mention-reviewer.webp)
+</Step>
+<Step>
+
数分後、レビューのコメントが返ってきました。結論は、マージ前に修正が必要というものです。5 件の指摘は 2 つのグループに分かれます。コーディング規約が 3 件、要件との適合が 2 件で、それぞれにファイルと行番号が付いています。要件との適合の 2 件は、まさに Engineer 自身が気づけなかった問題です。価格表が架空の価格、手付金、税務条項を正式な内容として表示していて、未定であることを示す注記がまったくないこと。連絡先に、確認していない Instagram のリンクが置かれていることです。コメントの末尾では、自分が検証した範囲も説明しています。typecheck、lint、build はいずれも通過しました。
+</Step>
+<Step>
+
修正にも新しい手順は不要です。コメント欄で @Engineer し、指摘された問題をすべて直すよう伝えます。送信すると Engineer はすぐに実行を開始し、タイトル横のバッジと右側の実行ログの両方で確認できます。
![Reviewer のレビュー結論と、@Engineer への修正依頼](/images/docs/tutorial-reviewer-findings.webp)
@@ -223,11 +283,17 @@ Engineer は最初の版を提出しましたが、自分では気づけない
![Engineer の修正報告](/images/docs/tutorial-engineer-fixed.webp)
+</Step>
+<Step>
+
もう一度 Reviewer を @メンションして再確認してもらいます。結論は、5 件の指摘はすべて解消されマージ可能、残るのは優先度の低い今後の提案が 2 件、というものです。
![Reviewer の再確認が通過](/images/docs/tutorial-reviewer-recheck.webp)
-開発とレビューはこのように往復します。問題を見つけ、問題を直し、1 周ごとにサイトの定義が少しずつ確かになります。1 つのタスクに 2 体のエージェントがいて、Engineer が実装し、Reviewer がレビューします。あなたは短いコメントを数件書くだけで、このサイクル全体を動かせます。
+</Step>
+</Steps>
+
+1 つのタスクに 2 体のエージェントがいて、Engineer が実装し、Reviewer がレビューします。あなたは短いコメントを数件書くだけで、開発とレビューを何度でも往復させられます。
## マージして仕上げる
@@ -235,11 +301,11 @@ Engineer は最初の版を提出しましたが、自分では気づけない
![マージが終わり、タスクが完了に移った状態](/images/docs/tutorial-issue-done.webp)
-最初のタスクはここで一周しました。要件の記述からマージによる反映まで、実装、レビュー、修正、受け入れ確認、マージのすべてが同じタイムラインに記録されています。
+最初のタスクはこれで終わりです。要件の記述からマージまで、すべてのステップが同じタイムラインに記録されています。
## スクワッドを編成する
-MUL-1 のサイクルは一通り回りましたが、つなぎ目はすべてあなたが起こしていました。受け入れ確認のあとに Reviewer を @メンションし、レビューのあとに Engineer を @メンションする。調整そのものがあなたの仕事になっていました。この層の仕事も任せます。Multica がそのために用意している組織の形が **スクワッド**(squad)です。エージェントとメンバーに名前を付けた集合で、1 体のリーダーエージェントが率います。タスクをスクワッドに割り当てると、受け取るのはリーダーです。タスクを読み、仕事を振り分け、ステータスを進めます。メンバーから返信があるとリーダーは自動的に起こされ、次のステップを決めます。仕上げには、あなたへ成果物を報告します。リーダーが引き受けるのは、まさに先ほどまでのあなたの役割です。
+MUL-1 のサイクルは一通り回りましたが、つなぎ目はすべてあなたが起こしていました。受け入れ確認のあとに Reviewer を @メンションし、レビューのあとに Engineer を @メンションする。調整そのものがあなたの仕事になっていました。この仕事も任せられます。使うのは **スクワッド**(squad)です。エージェントとメンバーに名前を付けた集合で、1 体のリーダーエージェントが率います。タスクをスクワッドに割り当てると、受け取るのはリーダーです。タスクを読み、仕事を振り分け、ステータスを進めます。メンバーから返信があるとリーダーは自動的に起こされ、次のステップを決めます。仕上げには、あなたへ成果物を報告します。先ほど MUL-1 であなたがしていたことです。
スクワッドは、すでにある分担にリーダーを 1 体加えたものです。
@@ -260,7 +326,7 @@ MUL-1 のサイクルは一通り回りましたが、つなぎ目はすべて
## スキル:再利用できる方法
-先ほどフィードバックを指示に書き込んだのは、1 体のエージェントの問題を解決するためでした。指示はそのエージェントだけのものです。1 つの方法を複数のエージェントで共有したい場合や、ほかの人がすでに書いた方法をそのまま借りたい場合は、**スキル**を使います。
+先ほどフィードバックを指示に書き込んで解決できたのは、1 体のエージェントの問題だけです。指示はそのエージェントだけのものだからです。1 つの方法を複数のエージェントで共有したい場合や、ほかの人がすでに書いた方法をそのまま借りたい場合は、**スキル**を使います。
スキルはエージェントのための知識パッケージです。1 つの `SKILL.md` と任意の補助ファイルで構成され、ある種類の仕事に対してどう考え、どう進めるかをエージェントに伝えます。Multica は Anthropic Agent Skills のオープン標準を採用しており、仕様に沿ったスキルはそのままインポートできます。エージェントに紐づけると、実行時に自動でランタイムへ同期されます。**スキル** ページを開くと、先ほどインポートした 2 つが表示され、右側にはそれぞれ紐づいたエージェントが並びます。
@@ -291,37 +357,49 @@ MUL-1 のサイクルは一通り回りましたが、つなぎ目はすべて
![MUL-2:Lead がタスクを作成して作業を開始](/images/docs/tutorial-issue-squad-created.webp)
-ここから先はすべてリーダーの仕事です。振り分けのコメントは単なる転送ではありません。タスクにはなかった制約を 2 つ補っています(プレースホルダーの人物情報をサイト全体で統一する、洗い出しの範囲をメタデータと README まで広げる)。そのうえで Engineer に渡します。Engineer は完了後、同じタイムラインに PR を報告します。
+ここから先はすべてリーダーの仕事です。リーダーは振り分けのコメントで、タスクにはなかった制約を 2 つ補っています(プレースホルダーの人物情報をサイト全体で統一する、洗い出しの範囲をメタデータと README まで広げる)。そのうえで Engineer に渡します。Engineer は完了後、同じタイムラインに PR を報告します。
![Lead の振り分けと、Engineer の PR 報告](/images/docs/tutorial-squad-dispatch.webp)
-レビューでの指摘はゼロで、Lead はすぐに提出します。あなたを @メンションして受け入れ確認を求め、1 行目は結論、その下に PR のリンク、変更の説明、あなたの判断が必要な 2 点が続き、最後に一言、あなたが承認しなければマージしない、と書かれています。
+レビューでの指摘はゼロで、Lead はすぐに提出します。あなたを @メンションして受け入れ確認を求め、1 行目は結論、その下に PR のリンク、変更の説明、あなたの判断が必要な 2 点が続き、最後に、あなたが承認しなければマージしないと書かれています。
![Lead の提出報告](/images/docs/tutorial-squad-delivery.webp)
-要件の整理、方針の確認、開発、レビュー、提出報告まで、このタスクではあなたがつなぐ必要のあるステップは 1 つもありません。受け入れ確認の方法は MUL-1 と同じです。ローカルサーバーを起動させてブラウザで確認することもできますが、ここでは詳しく触れません。完了への変更は引き続きあなたに残ります。マージするよう返信するか、手動でステータスを変更します。タイムラインのすべてのステップが記録され、人間のチームのタスクと変わりません。変わるのは実行する側だけです。
+要件の整理、方針の確認、開発、レビュー、提出報告まで、このタスクではあなたがつなぐ必要のあるステップは 1 つもありません。受け入れ確認の方法は MUL-1 と同じです。ローカルサーバーを起動させてブラウザで確認することもできますが、ここでは詳しく触れません。完了への変更は引き続きあなたに残ります。マージするよう返信するか、手動でステータスを変更します。
## 自動化:オートパイロット
ここまでのトリガーはすべてあなたが起こしていました。割り当て、@メンション、チャットです。**オートパイロット** は 4 つ目のトリガー方法で、時間に応じて自動的に作業を開始します。
+<Steps>
+<Step>
+
設定は一言で済みます。Multica helper に、毎週月曜の朝 9 時に Reviewer がサイトのコードベースを全面的に点検するよう伝えます。冗長なコードやデッドコード、不合理な構造、より規約に沿えるところを対象とし、見つけた内容はタスクのコメントに書き、コードは変更しない、という内容です。
![helper がオートパイロットを作成する](/images/docs/tutorial-autopilot-create.webp)
+</Step>
+<Step>
+
**オートパイロット** ページを開くと、実行担当、プロンプト、スケジュール(cron とタイムゾーン)がすべて設定済みです。実行モードは 2 つあります。
- **タスクを作成**(デフォルト):トリガーのたびにまずタスクを作成します。仕事がボード上に現れ、履歴もコメントも通常のタスクとまったく同じです。
-- **実行のみ**:タスクを作らずに直接実行し、記録はオートパイロットの実行履歴だけに残ります。今回の点検で問題が見つからなければ、実行後には何も残りません。
+- **実行のみ**:タスクを作らずに直接実行し、記録はオートパイロットの実行履歴だけに残ります。今回の点検で問題が見つからなければ、ボードには何も残りません。
定期的な点検には「タスクを作成」モードを使います。月曜まで待たずに試すには、**今すぐ実行** をクリックしてその場で 1 回トリガーします。
![オートパイロット詳細ページ:スケジュールと「今すぐ実行」](/images/docs/tutorial-autopilot-detail.webp)
+</Step>
+<Step>
+
タスクがすぐに作成され、Reviewer が点検を始めます。以降は毎週月曜の時刻になると、同じ点検が新しいタスクを自動で作成し、誰かがトリガーする必要はなくなります。
![オートパイロットが自動作成したタスク](/images/docs/tutorial-autopilot-issue.webp)
+</Step>
+</Steps>
+
トリガーはスケジュールのほかに webhook にも対応し、実行担当をスクワッドにすることもできます。[オートパイロットのドキュメント](/autopilots)を参照してください。
## 複数人での協働
@@ -334,9 +412,9 @@ MUL-1 のサイクルは一通り回りましたが、つなぎ目はすべて
タスクが増えてきたら、整理するための仕組みもあります。**プロジェクト** は関連するタスクを 1 つのグループにまとめ、1 つの単位として追跡します([プロジェクトのドキュメント](/projects)を参照)。同様の整理の仕組みは今も増えており、**Space** も近く利用できるようになります。
-ここまでの道のりを振り返ります。空のワークスペースから始め、コンピュータを 1 台つなぎ、4 体のエージェントを作り、2 つのタスクのライフサイクルを最後まで回し、調整をリーダーに、定期的な点検をオートパイロットに任せました。あなたの関与は段階的に後退し、最後に残るのは 2 つだけです。要件を説明することと、結果を受け入れ確認することです。
+ここまでの道のりを振り返ります。空のワークスペースから始め、コンピュータを 1 台つなぎ、4 体のエージェントを作り、2 つのタスクを完了させ、調整をリーダーに、定期的な点検をオートパイロットに任せました。最後にあなたに残るのは、要件を説明することと、結果を受け入れ確認することだけです。
-エージェントは一級のメンバーであり、協働のすべてがタスクのタイムラインに残ります。これが Multica の提供する働き方です。Multica は今も速いペースで改良が続いています。ほかの機能は[ドキュメント](/)を参照してください。
+Multica は今も速いペースで改良が続いています。ほかの機能は[ドキュメント](/)を参照してください。
## 次のステップ
diff --git a/apps/docs/content/docs/tutorial.ko.mdx b/apps/docs/content/docs/tutorial.ko.mdx
index 8ef46d9f33..852358ab73 100644
--- a/apps/docs/content/docs/tutorial.ko.mdx
+++ b/apps/docs/content/docs/tutorial.ko.mdx
@@ -3,6 +3,8 @@ title: 완전 가이드
description: 빈 워크스페이스에서 시작해 개인 웹사이트 프로젝트로 Multica의 핵심 흐름을 모두 거칩니다. 에이전트를 만들고, 태스크로 결과물을 만들고, 스쿼드를 구성하고, 스킬을 축적하고, 자동화를 설정합니다.
---
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
Multica는 사람과 AI 에이전트가 함께 일하는 플랫폼입니다. 이 가이드는 아무것도 없는 상태에서 시작해 다음을 진행합니다.
- 자신의 워크스페이스 만들기
@@ -21,26 +23,40 @@ Multica는 사람과 AI 에이전트가 함께 일하는 플랫폼입니다. 이
워크스페이스는 팀이 일하는 공간입니다. 태스크, 프로젝트, 에이전트는 모두 특정 워크스페이스에 속합니다. 가입 후 안내를 따라 첫 워크스페이스를 만들게 되며, 팀에 초대받아 참여한 경우에는 로그인하면 바로 팀의 워크스페이스로 들어갑니다.
-이 가이드에서는 새 워크스페이스를 만들어 설명합니다. 사이드바 위쪽의 워크스페이스 이름을 클릭하고 **워크스페이스 만들기**를 선택합니다.
+이 가이드에서는 새 워크스페이스를 만들어 설명합니다.
+
+<Steps>
+<Step>
+
+사이드바 위쪽의 워크스페이스 이름을 클릭하고 **워크스페이스 만들기**를 선택합니다.
![워크스페이스 만들기 진입점](/images/docs/tutorial-create-workspace-menu.webp)
-만들 때 두 항목을 입력합니다.
+</Step>
+<Step>
+
+두 항목을 입력합니다.
- **이름**: 멤버에게 표시되는 이름이며 나중에 수정할 수 있습니다.
- **URL**: 워크스페이스 주소의 slug입니다. 예를 들어 `multica.ai/my-team`의 `my-team`이며 만든 뒤에는 수정할 수 없습니다.
![워크스페이스 만들기 화면](/images/docs/tutorial-create-workspace-form.webp)
+</Step>
+<Step>
+
만들고 나면 새 워크스페이스로 들어갑니다. 왼쪽은 사이드바이며 이후 모든 작업은 여기에서 시작합니다. 가운데 태스크 목록은 아직 비어 있고, 다음 몇 단계에서 에이전트가 이 목록을 채우게 됩니다.
![방금 만든 빈 워크스페이스](/images/docs/tutorial-empty-workspace.webp)
+</Step>
+</Steps>
+
## 컴퓨터 연결
에이전트는 연결한 컴퓨터에서 작업을 실행하며, 그 컴퓨터에 설치된 AI 코딩 도구를 사용합니다.
-이 가이드에서는 [Multica Desktop](https://multica.ai/download)으로 설명합니다. 내려받아 로그인하면 이 컴퓨터를 런타임으로 자동 등록하고 설치된 AI 코딩 도구를 감지합니다. 사이드바 아래쪽의 **설정 → 런타임**을 열고 이 컴퓨터가 온라인인지 확인합니다.
+이 가이드에서는 [Multica Desktop](https://multica.ai/download)으로 설명합니다. 내려받아 로그인하면 이 컴퓨터를 런타임으로 자동 등록하고 설치된 AI 코딩 도구를 감지합니다. 사이드바 **AI 팀** 아래의 **런타임**을 열고 이 컴퓨터가 온라인인지 확인합니다.
![런타임 목록에 온라인으로 표시된 이 컴퓨터](/images/docs/tutorial-runtimes-list.webp)
@@ -48,16 +64,16 @@ Multica는 사람과 AI 에이전트가 함께 일하는 플랫폼입니다. 이
![런타임 상세: 감지된 AI 코딩 도구](/images/docs/tutorial-runtime-detail.webp)
-Desktop을 쓰지 않아도 됩니다. 런타임 페이지에서 **컴퓨터 추가**를 클릭하고 안내에 따라 명령줄로 설치하면 데몬이 백그라운드에 상주하며 실행됩니다. 자세한 내용은 [데몬과 런타임](/daemon-runtimes)을 참고하세요.
+Desktop을 쓰지 않아도 됩니다. 런타임 페이지에서 **추가**를 클릭하고 **다른 머신 또는 서버**를 선택한 뒤 안내에 따라 명령줄로 설치하면 데몬이 백그라운드에 상주하며 실행됩니다. 자세한 내용은 [데몬과 런타임](/daemon-runtimes)을 참고하세요.
## 첫 에이전트 만들기
에이전트는 워크스페이스의 정식 멤버입니다. 태스크를 할당받고, 댓글을 쓰고, 대화할 수 있습니다. 첫 에이전트로는 워크스페이스의 일상적인 일을 담당하는 helper를 만듭니다. 이후 가이드의 여러 작업을 이 에이전트에게 맡깁니다.
-사이드바에서 **에이전트**를 열고 **새 에이전트**를 클릭한 뒤 **빈 상태로 시작**을 선택하고 세 항목을 입력합니다.
+사이드바 **AI 팀** 아래의 **에이전트**를 열고 **새 에이전트**를 클릭합니다. 먼저 런타임으로 앞 단계에서 연결한 컴퓨터의 AI 코딩 도구 하나를 선택합니다. 이 가이드에서는 Claude를 사용합니다. 그다음 구성 화면에서 세 항목을 입력합니다.
- **이름**: `Multica helper`.
-- **런타임**과 **모델**: 앞 단계에서 연결한 컴퓨터와 AI 코딩 도구를 선택한 뒤, 그 도구가 지원하는 모델 중 하나를 고릅니다. 이 가이드에서는 Claude와 Sonnet을 사용합니다.
+- **모델**: 그 도구가 지원하는 모델 중 하나를 고릅니다. 이 가이드에서는 Sonnet을 사용합니다.
- **지시문**: 실행할 때마다 에이전트에게 제공되는 프롬프트입니다. 무엇을 담당하고 무엇을 담당하지 않는지 명확히 적습니다.
```text
@@ -74,7 +90,7 @@ request is ambiguous, ask before acting.
![에이전트 만들기 화면](/images/docs/tutorial-create-agent-form.webp)
-나머지 항목은 기본값으로 두고 생성을 클릭합니다. **에이전트** 페이지로 돌아오면 Multica helper가 온라인이며 작업을 받을 수 있습니다.
+나머지 항목은 기본값으로 두고 **에이전트 만들기**를 클릭합니다. **에이전트** 페이지로 돌아오면 Multica helper가 온라인이며 작업을 받을 수 있습니다.
![에이전트 상세: 온라인 상태의 Multica helper](/images/docs/tutorial-agent-detail.webp)
@@ -110,7 +126,10 @@ GitHub CLI를 쓰지 않는다면 GitHub에서 직접 저장소를 만들고 같
설정은 여기까지입니다. 지금부터는 Multica의 일상적인 작업 방식입니다. 요구 사항을 태스크로 쓰고 에이전트에게 실행을 맡깁니다.
-웹사이트는 처음부터 만들지 않고 shadcn의 공식 템플릿에서 시작합니다. 템플릿에 기술 스택과 기본 설정이 이미 들어 있고, Engineer는 그 위에서 내용과 디자인을 작업합니다.
+웹사이트는 shadcn의 공식 템플릿에서 시작합니다. 템플릿에 기술 스택과 기본 설정이 이미 들어 있고, Engineer는 그 위에서 내용과 디자인을 작업합니다.
+
+<Steps>
+<Step>
사이드바 위쪽의 **새 태스크**를 클릭합니다(단축키 `C`). 기본 에이전트 모드에서는 제목을 입력하지 않아도 됩니다. **생성자**에서 Engineer를 선택하고 요구 사항을 설명에 바로 작성하면 제목은 만들 때 자동으로 생성됩니다. 수동 모드로 전환해 제목과 내용을 직접 입력할 수도 있습니다. 설명은 다음과 같습니다.
@@ -147,16 +166,25 @@ Open a pull request when it is ready.
![새 태스크의 에이전트 모드: 생성자에 Engineer가 선택된 모습](/images/docs/tutorial-new-issue-agent-mode.webp)
+</Step>
+<Step>
+
제출하면 Multica가 태스크를 만들고(번호는 `MUL-1`, 제목은 자동 생성) Engineer를 담당자로 지정합니다. Engineer는 곧바로 실행을 시작하고 상태가 진행 중으로 바뀝니다. 태스크 오른쪽에는 이 태스크의 모든 상황이 모입니다. 상태, 담당자, 연결된 pull request, 실행 기록입니다.
실행에는 몇 분이 걸립니다. 진행 상황은 두 곳에서 확인합니다. 제목 옆의 작업 상태 배지, 그리고 오른쪽 **실행 로그**에서 현재 실행을 클릭하면 됩니다.
![진행 상황을 확인하는 두 곳](/images/docs/tutorial-issue-engineer-working.webp)
+</Step>
+<Step>
+
실행 기록에는 이번 실행의 모든 단계가 있습니다. **Agent** 줄은 에이전트의 설명이고, **Bash**, **Read**, **Edit**는 실행한 명령과 읽고 쓴 파일입니다. 이 스크린샷 시점에는 완성한 페이지를 스크린샷으로 찍어 스스로 점검하던 중이었고, 가격표의 구분선이 정렬되지 않은 것을 막 발견했습니다. 오른쪽 위의 ⓘ를 클릭하면 이번 실행에 사용한 컴퓨터, AI 코딩 도구, 작업 디렉터리를 확인할 수 있습니다.
![실행 기록: Engineer의 모든 단계](/images/docs/tutorial-execution-log.webp)
+</Step>
+</Steps>
+
## 검수: 태스크에서 대화하기
실행이 끝나면 Engineer가 상태를 리뷰 중으로 바꾸고 알림이 인박스로 들어옵니다. 태스크에는 완료 댓글과 함께 완성한 페이지 스크린샷을 남겼습니다.
@@ -165,29 +193,49 @@ Open a pull request when it is ready.
스크린샷으로 대략은 알 수 있지만 검수는 브라우저에서 직접 열어 봐야 합니다. 웹사이트는 내 컴퓨터에서 빌드되므로 Engineer에게 로컬 서버를 실행하게 하면 접속할 수 있습니다. 그리고 오른쪽의 **Pull requests** 영역은 아직 비어 있습니다. 태스크에서 PR 제출을 분명히 요구했으니 이 점도 함께 물어봅니다.
-이번에는 댓글을 쓰지 않습니다. 화면 오른쪽 아래에는 채팅 버튼이 있어 워크스페이스의 어느 페이지에서든 열 수 있으며, 사이드바의 **채팅**과 같은 기능입니다.
+이번에는 댓글 대신 채팅을 사용합니다.
+
+<Steps>
+<Step>
+
+화면 오른쪽 아래에는 채팅 버튼이 있어 워크스페이스의 어느 페이지에서든 열 수 있으며, 사이드바의 **채팅**과 같은 기능입니다.
![오른쪽 아래의 채팅 버튼](/images/docs/tutorial-chat-fab.webp)
+</Step>
+<Step>
+
열어서 Engineer를 선택하고 `@`를 입력해 현재 태스크를 참조합니다. 대화가 이 태스크의 컨텍스트를 함께 가져가므로 위의 두 가지를 그대로 보냅니다.
![채팅에서 태스크를 참조해 질문](/images/docs/tutorial-chat-ask-in-issue.webp)
+</Step>
+<Step>
+
Engineer의 답변은 두 부분입니다. 로컬 서버는 이미 실행했고 접속 주소를 알려 줍니다. PR도 이미 제출했지만 제목, 브랜치 이름, 본문 어디에도 `MUL-1`이 없어 자동 연결이 매칭되지 않았습니다. 이어서 PR 제목에 번호를 넣었습니다.
![Engineer의 답변: 로컬 주소와 PR이 연결되지 않은 이유](/images/docs/tutorial-chat-engineer-reply.webp)
+</Step>
+<Step>
+
알려 준 주소를 브라우저에서 열면 웹사이트가 보입니다.
![로컬에서 실행 중인 웹사이트 첫 화면](/images/docs/tutorial-site-localhost.webp)
+</Step>
+<Step>
+
태스크로 돌아오면 오른쪽 **Pull requests** 영역에 PR 카드가 나타납니다. 상태와 변경 규모가 표시되고 클릭하면 GitHub의 PR이 바로 열립니다. CI를 설정한 저장소라면 check 결과도 표시됩니다.
![태스크 오른쪽에 나타난 PR 카드](/images/docs/tutorial-issue-pr-linked.webp)
+</Step>
+</Steps>
+
## 피드백을 지시문에 반영하기
-이번 검수에서 Engineer의 작업 습관 두 가지가 드러났습니다. 완료 후 스크린샷을 반복해서 찍으며 스스로 점검하느라 실행 시간을 적지 않게 썼고, PR을 제출할 때 태스크 번호를 넣지 않아 연결되지 않았습니다. 둘 다 이번에만 생긴 실수가 아니라 매번 반복되는 방식입니다. 고쳐야 할 대상은 이 태스크가 아니라 에이전트의 지시문입니다.
+이번 검수에서 Engineer의 작업 습관 두 가지가 드러났습니다. 완료 후 스크린샷을 반복해서 찍으며 스스로 점검하느라 실행 시간을 적지 않게 썼고, PR을 제출할 때 태스크 번호를 넣지 않아 연결되지 않았습니다. 둘 다 매번 반복될 방식이므로 고칠 것은 에이전트의 지시문이고, 이 태스크 자체는 그대로 둬도 됩니다.
지시문은 직접 수정하지 않아도 됩니다. 에이전트는 multica CLI로 자기 설정을 업데이트할 수 있습니다. 앞의 대화에 이어서 Engineer에게 두 가지 규칙을 알려 주고 자기 지시문에 반영하게 합니다. 완료 후 스크린샷으로 자체 점검하지 말고 검수는 브라우저에서 진행한다는 것, 그리고 PR의 브랜치 이름이나 제목에 반드시 태스크 번호를 넣어야 한다는 것입니다.
@@ -199,22 +247,34 @@ Engineer는 `multica agent update`로 업데이트를 마치고 지시문에 작
![업데이트된 Engineer의 지시문](/images/docs/tutorial-engineer-updated-instructions.webp)
-이후 모든 실행에서 이 두 규칙이 지시문과 함께 적용됩니다. 에이전트를 다듬는 기본 방식이기도 합니다. 반복해서 나타나는 문제를 발견하면 매번 말로 상기시키는 대신 교정 내용을 지시문에 적습니다.
+이후 모든 실행에서 이 두 규칙이 지시문과 함께 적용됩니다. 에이전트는 대개 이렇게 다듬습니다. 반복해서 나타나는 문제를 발견하면 교정 내용을 지시문에 적어 두고, 매번 말로 상기시키지 않아도 되게 합니다.
## 세 번째 에이전트: Reviewer
Engineer가 첫 번째 버전을 전달했지만 스스로 알아차리지 못하는 문제도 있습니다. 검토는 새 에이전트에게 맡깁니다. 완전히 새로운 컨텍스트에서 태스크의 요구 사항과 대조하며 코드 품질을 확인하는 역할입니다.
+<Steps>
+<Step>
+
생성은 이번에도 Multica helper에게 맡깁니다. Reviewer라는 에이전트를 만들고, 이번에는 Codex와 GPT-5.6 Sol 모델을 선택해 Engineer가 쓰는 도구, 모델과 모두 다르게 합니다. 검토만 하고 코드는 수정하지 않으며 결론은 태스크 댓글로 씁니다. 지시문은 이번에도 helper가 생성합니다. PR의 실제 상태를 읽은 뒤 검토할 것, 발견한 내용은 파일 위치와 함께 댓글로 쓸 것, 코드는 절대 수정하지 말 것입니다.
![Reviewer의 설정](/images/docs/tutorial-reviewer-detail.webp)
+</Step>
+<Step>
+
검토를 위해 태스크를 새로 만들거나 담당자를 바꿀 필요는 없습니다. MUL-1의 댓글 입력란으로 돌아와 `@Reviewer`로 멘션하고 할 일을 적어 보냅니다. 입력란 아래에는 전송하면 Reviewer가 실행을 시작한다는 안내가 표시됩니다.
![댓글에서 @Reviewer를 멘션해 검토 시작](/images/docs/tutorial-comment-mention-reviewer.webp)
+</Step>
+<Step>
+
몇 분 뒤 검토 댓글이 돌아왔고 결론은 merge 전에 수정이 필요하다는 것입니다. 다섯 건의 발견은 두 그룹으로 나뉩니다. 코드 규범 세 건, 요구 사항 부합도 두 건이며 각 건마다 파일과 줄 번호가 붙어 있습니다. 요구 사항 부합도 두 건이 바로 Engineer가 스스로 알아차리지 못한 문제입니다. 가격표가 가상의 가격, 예약금, 세금 조항을 확정된 내용처럼 표시하면서 미정 표시를 전혀 하지 않았고, 연락처에는 확인되지 않은 Instagram 링크가 들어 있었습니다. 댓글 끝에는 자신이 검증한 부분도 밝혔습니다. typecheck, lint, build가 모두 통과했습니다.
+</Step>
+<Step>
+
수정에도 새로운 절차는 필요 없습니다. 댓글에서 @Engineer를 멘션해 발견된 문제를 모두 고치게 합니다. 보내면 Engineer가 곧바로 실행을 시작하며 제목 옆 배지와 오른쪽 실행 기록에서 확인할 수 있습니다.
![Reviewer의 검토 결론과 @Engineer에게 이어지는 수정 요청](/images/docs/tutorial-reviewer-findings.webp)
@@ -223,11 +283,17 @@ Engineer가 첫 번째 버전을 전달했지만 스스로 알아차리지 못
![Engineer의 수정 보고](/images/docs/tutorial-engineer-fixed.webp)
+</Step>
+<Step>
+
다시 Reviewer를 멘션해 한 번 더 확인하게 하면 결론은 다섯 건이 모두 해결되어 merge할 수 있고 낮은 우선순위의 후속 제안 두 건이 남았다는 것입니다.
![Reviewer의 재검토 통과](/images/docs/tutorial-reviewer-recheck.webp)
-개발과 검토는 이렇게 오갑니다. 문제를 발견하고 문제를 고치면서 매 라운드마다 웹사이트의 정의가 조금씩 더 분명해집니다. 이제 하나의 태스크에 에이전트 두 명이 붙어 있습니다. Engineer가 구현하고 Reviewer가 검토하며, 짧은 댓글 몇 개로 이 순환 전체를 움직입니다.
+</Step>
+</Steps>
+
+이제 하나의 태스크에 에이전트 두 명이 붙어 있습니다. Engineer가 구현하고 Reviewer가 검토하며, 짧은 댓글 몇 개로 개발과 검토를 여러 차례 주고받게 할 수 있습니다.
## merge로 마무리
@@ -235,11 +301,11 @@ merge도 댓글 하나로 지시합니다. Engineer에게 PR을 merge하고 태
![merge 완료, 완료로 바뀐 태스크](/images/docs/tutorial-issue-done.webp)
-첫 번째 태스크는 여기서 한 바퀴를 마칩니다. 요구 사항 작성부터 merge까지 구현, 검토, 수정, 검수, merge가 모두 같은 타임라인에 기록됩니다.
+첫 번째 태스크는 여기서 끝납니다. 요구 사항 작성부터 merge까지 모든 단계가 같은 타임라인에 기록되어 있습니다.
## 스쿼드 구성하기
-MUL-1의 순환은 잘 돌아갔지만 이어지는 단계는 매번 사람이 시작했습니다. 검수 후 Reviewer를 멘션하고, 검토 후 Engineer를 멘션했습니다. 조율 자체가 내 일이 된 것입니다. 이 일도 넘길 수 있습니다. Multica가 이를 위해 제공하는 조직 형태가 **스쿼드**(squad)입니다. 에이전트와 멤버를 묶어 이름을 붙인 집합이며 리더 에이전트 한 명이 이끕니다. 태스크를 스쿼드에 할당하면 리더가 받습니다. 태스크를 읽고, 작업을 나눠 주고, 상태를 진행합니다. 멤버가 답하면 자동으로 깨어나 다음 단계를 결정하고, 마무리할 때는 결과물을 보고합니다. 리더가 맡는 역할이 바로 앞에서 내가 하던 역할입니다.
+MUL-1의 순환은 잘 돌아갔지만 이어지는 단계는 매번 사람이 시작했습니다. 검수 후 Reviewer를 멘션하고, 검토 후 Engineer를 멘션했습니다. 조율 자체가 내 일이 된 것입니다. 이 일도 넘길 수 있으며, 이때 쓰는 것이 **스쿼드**(squad)입니다. 에이전트와 멤버를 묶어 이름을 붙인 집합이며 리더 에이전트 한 명이 이끕니다. 태스크를 스쿼드에 할당하면 리더가 받습니다. 태스크를 읽고, 작업을 나눠 주고, 상태를 진행합니다. 멤버가 답하면 자동으로 깨어나 다음 단계를 결정하고, 마무리할 때는 결과물을 보고합니다. 앞에서 MUL-1에서 내가 하던 일입니다.
스쿼드는 기존 분업에 리더 한 명을 더한 것입니다.
@@ -260,7 +326,7 @@ MUL-1의 순환은 잘 돌아갔지만 이어지는 단계는 매번 사람이
## 스킬: 재사용 가능한 방법
-앞에서 피드백을 지시문에 반영한 것은 에이전트 한 명의 문제를 해결한 것입니다. 지시문은 그 에이전트에게만 속하기 때문입니다. 하나의 방법을 여러 에이전트가 공유하게 하거나 다른 사람이 이미 작성해 둔 방법을 그대로 가져오려면 **스킬**을 사용합니다.
+앞에서 피드백을 지시문에 반영한 것은 에이전트 한 명의 문제만 해결합니다. 지시문은 그 에이전트에게만 속하기 때문입니다. 하나의 방법을 여러 에이전트가 공유하게 하거나 다른 사람이 이미 작성해 둔 방법을 그대로 가져오려면 **스킬**을 사용합니다.
스킬은 에이전트에게 주는 지식 묶음입니다. `SKILL.md` 하나와 선택적인 지원 파일로 구성되며, 특정 유형의 작업을 만났을 때 어떻게 생각하고 어떻게 처리할지 알려 줍니다. Multica는 Anthropic Agent Skills 공개 표준을 따르므로 규격에 맞는 스킬은 바로 가져올 수 있습니다. 에이전트에 연결하면 실행할 때 런타임으로 자동 동기화됩니다. **스킬** 페이지를 열면 방금 가져온 두 개가 있고 오른쪽에는 각각 연결된 에이전트가 표시됩니다.
@@ -291,37 +357,49 @@ MUL-1의 순환은 잘 돌아갔지만 이어지는 단계는 매번 사람이
![MUL-2: Lead가 태스크를 만들고 작업을 시작](/images/docs/tutorial-issue-squad-created.webp)
-이후는 전부 리더의 작업입니다. 작업을 배분하는 댓글은 단순 전달이 아닙니다. 태스크에 없던 제약 두 가지를 덧붙인 뒤(플레이스홀더 신원을 사이트 전체에서 통일, 점검 범위를 메타데이터와 README까지 포함) Engineer에게 넘깁니다. Engineer는 작업을 마친 뒤 같은 타임라인에 PR을 보고합니다.
+이후는 전부 리더의 작업입니다. 리더는 작업을 배분하는 댓글에서 태스크에 없던 제약 두 가지를 덧붙인 뒤(플레이스홀더 신원을 사이트 전체에서 통일, 점검 범위를 메타데이터와 README까지 포함) Engineer에게 넘깁니다. Engineer는 작업을 마친 뒤 같은 타임라인에 PR을 보고합니다.
![Lead가 작업을 배분하고 Engineer가 PR을 보고](/images/docs/tutorial-squad-dispatch.webp)
-검토에서 발견된 문제가 없자 Lead가 곧바로 전달합니다. 검수를 요청하며 멘션하고, 첫 줄은 결론, 그 아래는 PR 링크, 변경 설명, 판단이 필요한 두 가지 항목이며, 마지막 한 줄은 승인하기 전에는 merge하지 않는다는 내용입니다.
+검토에서 발견된 문제가 없자 Lead가 곧바로 전달합니다. 검수를 요청하며 멘션하고, 첫 줄은 결론, 그 아래는 PR 링크, 변경 설명, 판단이 필요한 두 가지 항목이며, 마지막에는 승인하기 전에는 merge하지 않는다고 적습니다.
![Lead의 전달 보고](/images/docs/tutorial-squad-delivery.webp)
-요구 사항 정리, 방안 확정, 개발, 검토, 전달 보고까지 이 태스크에서는 사람이 단계를 이어 줄 일이 한 번도 없었습니다. 검수 방식은 MUL-1과 같습니다. 로컬 서버를 실행하게 해 브라우저에서 확인할 수도 있으며 여기서는 다시 설명하지 않습니다. 완료는 여전히 사람의 몫입니다. merge하라고 답하거나 상태를 직접 바꿉니다. 타임라인의 모든 단계가 기록되며 사람으로 이루어진 팀의 태스크와 다르지 않습니다. 달라진 것은 실행하는 주체뿐입니다.
+요구 사항 정리, 방안 확정, 개발, 검토, 전달 보고까지 이 태스크에서는 사람이 단계를 이어 줄 일이 한 번도 없었습니다. 검수 방식은 MUL-1과 같습니다. 로컬 서버를 실행하게 해 브라우저에서 확인할 수도 있으며 여기서는 다시 설명하지 않습니다. 완료는 여전히 사람의 몫입니다. merge하라고 답하거나 상태를 직접 바꿉니다.
## 자동화: 오토파일럿
지금까지의 모든 트리거는 사람이 시작했습니다. 할당, 멘션, 대화입니다. **오토파일럿**은 네 번째 트리거 방식으로, 시간에 맞춰 자동으로 작업을 시작합니다.
+<Steps>
+<Step>
+
설정은 한 문장이면 됩니다. Multica helper에게 매주 월요일 아침 9시에 Reviewer가 웹사이트 코드베이스를 전면 점검하게 해 달라고 알려 줍니다. 중복과 죽은 코드, 부적절한 구조, 더 규범적으로 바꿀 수 있는 부분을 찾아 태스크 댓글에 쓰고 코드는 수정하지 않게 합니다.
![helper가 오토파일럿을 만드는 모습](/images/docs/tutorial-autopilot-create.webp)
+</Step>
+<Step>
+
**오토파일럿** 페이지를 열면 실행 주체, 프롬프트, 일정(cron과 시간대)이 모두 설정되어 있습니다. 실행 모드는 두 가지입니다.
- **태스크 만들기**(기본값): 트리거할 때마다 태스크를 먼저 만들어 작업이 보드에 올라가며, 기록과 댓글이 일반 태스크와 완전히 같습니다.
-- **실행만**: 태스크를 만들지 않고 바로 실행하며 오토파일럿의 실행 기록에만 남습니다. 이번에 발견된 문제가 없다면 실행이 끝난 뒤 아무것도 남지 않습니다.
+- **실행만**: 태스크를 만들지 않고 바로 실행하며 오토파일럿의 실행 기록에만 남습니다. 이번에 발견된 문제가 없다면 보드에는 아무것도 남지 않습니다.
정기 점검에는 태스크 만들기 모드를 사용합니다. 월요일까지 기다리지 않으려면 **지금 실행**을 클릭해 바로 한 번 트리거합니다.
![오토파일럿 상세 페이지: 일정과 지금 실행](/images/docs/tutorial-autopilot-detail.webp)
+</Step>
+<Step>
+
태스크가 곧바로 만들어지고 Reviewer가 점검을 시작합니다. 이후 매주 월요일 정해진 시각이 되면 같은 점검이 새 태스크를 자동으로 만들며 아무도 트리거할 필요가 없습니다.
![오토파일럿이 자동으로 만든 태스크](/images/docs/tutorial-autopilot-issue.webp)
+</Step>
+</Steps>
+
트리거는 일정 외에 webhook도 지원하며 실행 주체를 스쿼드로 지정할 수도 있습니다. [오토파일럿 문서](/autopilots)를 참고하세요.
## 여러 사람과 협업
@@ -334,9 +412,9 @@ MUL-1의 순환은 잘 돌아갔지만 이어지는 단계는 매번 사람이
태스크가 많아지면 이를 정리하는 도구도 있습니다. **프로젝트**는 관련 태스크를 한 묶음으로 모아 하나의 단위로 관리합니다([프로젝트 문서](/projects) 참고). 비슷한 정리 방식이 계속 늘고 있으며 **Space**도 곧 사용할 수 있습니다.
-지금까지의 경로를 되짚어 보면, 빈 워크스페이스에서 시작해 컴퓨터 한 대를 연결하고, 에이전트 네 명을 만들고, 태스크 두 건의 전체 생애 주기를 끝낸 뒤, 조율은 리더에게 정기 점검은 오토파일럿에 넘겼습니다. 사람의 참여는 단계마다 뒤로 물러나고 마지막에는 두 가지만 남습니다. 요구 사항을 설명하는 일과 결과를 검수하는 일입니다.
+지금까지의 경로를 되짚어 보면, 빈 워크스페이스에서 시작해 컴퓨터 한 대를 연결하고, 에이전트 네 명을 만들고, 태스크 두 건을 끝낸 뒤, 조율은 리더에게 정기 점검은 오토파일럿에 넘겼습니다. 마지막에 내가 할 일은 요구 사항을 설명하고 결과를 검수하는 것뿐입니다.
-에이전트는 일급 멤버이고 모든 협업은 태스크의 타임라인에 남습니다. 이것이 Multica가 제공하는 작업 방식입니다. 제품은 계속 빠르게 발전하고 있으며 더 많은 기능은 [문서](/)에서 확인할 수 있습니다.
+Multica는 계속 빠르게 발전하고 있으며 더 많은 기능은 [문서](/)에서 확인할 수 있습니다.
## 다음 단계
diff --git a/apps/docs/content/docs/tutorial.mdx b/apps/docs/content/docs/tutorial.mdx
index ea4d56e299..e109ed4531 100644
--- a/apps/docs/content/docs/tutorial.mdx
+++ b/apps/docs/content/docs/tutorial.mdx
@@ -3,6 +3,8 @@ title: Complete tutorial
description: "Start from an empty workspace and walk a personal website project through all of Multica's core flows: creating agents, delivering with issues, forming a squad, building skills, and setting up automation."
---
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
Multica is a platform where people and AI agents work together. This tutorial starts from nothing and covers:
- setting up a workspace of your own
@@ -21,26 +23,40 @@ The example project is a personal website, used to walk through Multica's overal
A workspace is where a team works: issues, projects, and agents all belong to one. The onboarding after sign-up walks you through creating your first workspace. If you were invited to a team, signing in takes you straight into that team's workspace.
-This tutorial creates a new workspace for the walkthrough. Click the workspace name at the top of the sidebar and choose **Create workspace**:
+This tutorial creates a new workspace for the walkthrough.
+
+<Steps>
+<Step>
+
+Click the workspace name at the top of the sidebar and choose **Create workspace**:
![The create workspace entry point](/images/docs/tutorial-create-workspace-menu.webp)
-Two fields are filled in at creation:
+</Step>
+<Step>
+
+Fill in two fields:
- **Name**: shown to members; it can be changed later.
- **URL**: the slug in the workspace address — the `my-team` in `multica.ai/my-team`. It cannot be changed after creation.
![The create workspace page](/images/docs/tutorial-create-workspace-form.webp)
-Creating it opens the new workspace. The sidebar on the left is where every later step starts; the issue list in the middle is still empty, and the next few steps are about getting agents to fill it.
+</Step>
+<Step>
+
+Creating it opens the new workspace. The sidebar on the left is where every later step starts; the issue list in the middle is still empty, and the next few steps get agents to fill it.
![A newly created, empty workspace](/images/docs/tutorial-empty-workspace.webp)
+</Step>
+</Steps>
+
## Connect your computer
Agents execute work on the computers you connect, using the AI coding tools installed on those computers.
-This tutorial uses [Multica Desktop](https://multica.ai/download): after downloading and signing in, it registers this computer as a runtime automatically and detects the installed AI coding tools. Open **Configure → Runtimes** at the bottom of the sidebar and confirm the computer is online:
+This tutorial uses [Multica Desktop](https://multica.ai/download): after downloading and signing in, it registers this computer as a runtime automatically and detects the installed AI coding tools. Open **Runtimes** under **AI Team** in the sidebar and confirm the computer is online:
![The runtime list with this computer online](/images/docs/tutorial-runtimes-list.webp)
@@ -48,16 +64,16 @@ Open the computer to see each detected tool:
![Runtime detail: the detected AI coding tools](/images/docs/tutorial-runtime-detail.webp)
-Desktop is not required: on the Runtimes page, click **Add a computer** and follow the prompts to install from the command line. The daemon then runs in the background — see [Daemon and runtimes](/daemon-runtimes).
+Desktop is not required: on the Runtimes page, click **Add**, choose **Other machine or server**, and follow the prompts to install from the command line. The daemon then runs in the background — see [Daemon and runtimes](/daemon-runtimes).
## Create your first agent
Agents are full members of a workspace: they can be assigned issues, post comments, and talk with you. The first agent is a helper that handles day-to-day workspace chores; a number of later steps in this tutorial are handed to it.
-Open **Agents** in the sidebar, click **New agent**, choose **Start blank**, and fill in three fields:
+Open **Agents** under **AI Team** in the sidebar and click **New agent**. First choose the runtime: one of the AI coding tools on the computer connected in the previous step; this tutorial uses Claude. Then fill in three fields on the configuration page:
- **Name**: `Multica helper`.
-- **Runtime** and **Model**: pick the computer connected in the previous step and one of its AI coding tools, then a model that tool supports. This tutorial uses Claude and Sonnet.
+- **Model**: one of the models that tool supports. This tutorial uses Sonnet.
- **Instructions**: the prompt provided to the agent on every run. State what it is responsible for and what it is not:
```text
@@ -74,13 +90,13 @@ request is ambiguous, ask before acting.
![The create agent page](/images/docs/tutorial-create-agent-form.webp)
-Leave the remaining fields at their defaults and create. Back on the **Agents** page, Multica helper is online and can take work:
+Leave the remaining fields at their defaults and click **Create agent**. Back on the **Agents** page, Multica helper is online and can take work:
![Agent detail: Multica helper online](/images/docs/tutorial-agent-detail.webp)
## A second agent, created through chat
-Building the site needs an engineer that can write code. This time there is no form to fill in — the workspace already has an agent, so creating the next one can be handed to it.
+Building the site needs an engineer that can write code. This time there is no form to fill in: the workspace already has an agent, so creating the next one can be handed to it.
Open **Chat** in the sidebar, select Multica helper, and tell it to create an agent named Engineer on the same runtime, with Opus as the model, responsible for building and maintaining the personal website. Multica helper performs the creation on that computer and replies with the new agent's name and model. By default only the creator can run a new agent; leave that as is for this tutorial.
@@ -92,7 +108,7 @@ Open **Agents → Engineer** to check the result: the model is Opus, and the ins
## Prepare the site repository
-The site's code lives in a GitHub repository. Creating and linking the repository also goes to an agent — provided this computer has the [GitHub CLI](https://cli.github.com) installed and signed in.
+The site's code lives in a GitHub repository. Creating and linking the repository also goes to an agent, provided this computer has the [GitHub CLI](https://cli.github.com) installed and signed in.
In **Chat**, select Engineer and tell it to create an empty repository named `personal-website` under your GitHub account (the GitHub CLI is on this computer), then register it in this workspace with `multica repo add`. Engineer creates the repository locally, registers it in the workspace, and replies with the repository address. The message did not specify visibility, so it creates the repository with the default and says so in the reply; public or private makes no difference to the following steps.
@@ -110,9 +126,12 @@ Finally, click **Connect GitHub** on the same page and authorize the repository
That completes the setup. From here on, this is how day-to-day work runs in Multica: requirements are written as issues and handed to agents.
-The site starts from shadcn's official template rather than being scaffolded from scratch: the template already brings the stack and the base configuration, and Engineer builds content and design on top of it.
+The site starts from shadcn's official template: the template already brings the stack and the base configuration, and Engineer builds content and design on top of it.
+
+<Steps>
+<Step>
-Click **New Issue** at the top of the sidebar (shortcut `C`). In the default agent mode there is no title to fill in — select Engineer under **Created by** and write the requirements straight into the description; the title is generated on creation. You can also switch to manual mode and write the title and body yourself. The description:
+Click **New Issue** at the top of the sidebar (shortcut `C`). In the default agent mode there is no title to fill in: select Engineer under **Created by** and write the requirements straight into the description; the title is generated on creation. You can also switch to manual mode and write the title and body yourself. The description:
```text
Work in the personal-website repository registered in this workspace.
@@ -147,49 +166,78 @@ The description carries three kinds of information: constraints (start from the
![Agent mode in the new issue dialog, with Engineer selected as the creator](/images/docs/tutorial-new-issue-agent-mode.webp)
+</Step>
+<Step>
+
After submitting, Multica creates the issue (`MUL-1`, with a generated title) and sets Engineer as the assignee. Engineer starts executing and the status moves to In Progress. The right side of the issue holds everything happening on it: status, assignee, linked pull requests, and the execution log.
-The run takes a few minutes, and there are two ways into its progress: the working-status badge next to the title, and **Execution log** on the right — open the current run:
+The run takes a few minutes, and there are two ways into its progress: the working-status badge next to the title, and **Execution log** on the right. Open the current run:
![The two entry points for checking progress](/images/docs/tutorial-issue-engineer-working.webp)
+</Step>
+<Step>
+
The execution log holds every step of the run: **Agent** rows are its own narration, and **Bash**, **Read**, and **Edit** are the commands it ran and the files it read and wrote. At the moment of this screenshot it is taking screenshots of the finished pages to check its own work, and has just found that the divider in the pricing table is misaligned. Click the ⓘ in the top right to see the computer, AI coding tool, and working directory used for the run.
![Execution log: every step Engineer took](/images/docs/tutorial-execution-log.webp)
+</Step>
+</Steps>
+
## Sign-off: talk it over in the issue
When the run ends, Engineer moves the status to In Review and a notification lands in your Inbox. It posted a completion comment on the issue with screenshots of the finished pages:
![Engineer's completion comment with page screenshots](/images/docs/tutorial-issue-review-comment.webp)
-Screenshots give the gist, but a review still means opening the site in a browser. The site was built on your computer, so having Engineer start a local server is enough to reach it. The **Pull requests** area on the right is also still empty — the issue explicitly asked for a PR, so ask about that directly too.
+Screenshots give the gist, but a review still means opening the site in a browser. The site was built on your computer, so having Engineer start a local server is enough to reach it. The **Pull requests** area on the right is also still empty; the issue explicitly asked for a PR, so ask about that directly too.
+
+This time, use chat instead of the comment box:
-This time, not the comment box. There is a chat button in the bottom-right corner, available on any workspace page, and it is the same feature as **Chat** in the sidebar:
+<Steps>
+<Step>
+
+There is a chat button in the bottom-right corner, available on any workspace page, and it is the same feature as **Chat** in the sidebar:
![The chat button in the bottom-right corner](/images/docs/tutorial-chat-fab.webp)
-Open it, select Engineer, and type `@` to reference the current issue — the conversation then carries that issue's context. Send both questions:
+</Step>
+<Step>
+
+Open it, select Engineer, and type `@` to reference the current issue, so the conversation carries that issue's context. Send both questions:
![Asking in chat with the issue referenced](/images/docs/tutorial-chat-ask-in-issue.webp)
-Engineer's reply has two parts: the local server is running, with the address to open; and the PR was in fact already submitted, but the title, branch name, and body all lacked `MUL-1`, so automatic linking had nothing to match — it then added the identifier to the PR title.
+</Step>
+<Step>
+
+Engineer's reply has two parts: the local server is running, with the address to open; and the PR was in fact already submitted, but the title, branch name, and body all lacked `MUL-1`, so automatic linking had nothing to match. It then added the identifier to the PR title.
![Engineer's reply: the local address and why the PR was not linked](/images/docs/tutorial-chat-engineer-reply.webp)
+</Step>
+<Step>
+
Open the address it gave in a browser to see the site:
![The site's home page running locally](/images/docs/tutorial-site-localhost.webp)
+</Step>
+<Step>
+
Back on the issue, a PR card now appears in the **Pull requests** area on the right, showing state and change size; clicking it opens the PR on GitHub. Repositories with CI configured also show check results:
![The PR card on the right side of the issue](/images/docs/tutorial-issue-pr-linked.webp)
+</Step>
+</Steps>
+
## Write feedback into the instructions
-This round of review exposed two of Engineer's working habits: it checks its own work with repeated screenshots after finishing, which takes up a lot of run time; and it opens PRs without the issue identifier, so they don't link. Neither is a one-off mistake — both are things it repeats every time. What needs changing is not this issue but its instructions.
+This round of review exposed two of Engineer's working habits: it checks its own work with repeated screenshots after finishing, which takes up a lot of run time; and it opens PRs without the issue identifier, so they don't link. Both are things it will repeat every time, so what needs changing is its instructions; this issue itself can stay as it is.
-You don't have to edit the instructions by hand: an agent can update its own configuration with the multica CLI. In the same conversation, give Engineer the two rules — no screenshot self-checks after finishing, since review happens in a browser; and the branch name or title of a PR must carry the issue identifier — and have it write them into its own instructions:
+You don't have to edit the instructions by hand: an agent can update its own configuration with the multica CLI. In the same conversation, give Engineer two rules: no screenshot self-checks after finishing, since review happens in a browser; and the branch name or title of a PR must carry the issue identifier. Then have it write them into its own instructions:
![Asking Engineer to write the rules into its own instructions](/images/docs/tutorial-chat-update-instructions.webp)
@@ -199,22 +247,34 @@ Open **Agents → Engineer**, and both rules are in the instructions:
![Engineer's updated instructions](/images/docs/tutorial-engineer-updated-instructions.webp)
-From then on, both rules take effect with the instructions on every run. This is also the basic way to tune an agent: when a problem keeps recurring, write the correction into the instructions instead of repeating it by hand each time.
+From then on, both rules take effect with the instructions on every run. That is basically how you tune an agent: when a problem keeps recurring, write the correction into the instructions so you don't have to repeat it each time.
## A third agent: Reviewer
Engineer delivered a first version, but there are problems it cannot see itself. Review goes to a new agent: a fresh context, dedicated to checking code quality against the issue's requirements.
+<Steps>
+<Step>
+
Creation again goes to Multica helper: an agent named Reviewer, this time on Codex with the GPT-5.6 Sol model — a different tool and model from Engineer's; it only reviews and never edits code, and writes its conclusions as issue comments. The instructions are again generated by the helper — read the PR's actual state before reviewing, write findings as comments with file locations, and never modify code:
![Reviewer's configuration](/images/docs/tutorial-reviewer-detail.webp)
-Review needs no new issue and no change of assignee. Back in MUL-1's comment box, type `@Reviewer` to mention it, write what needs doing, and send — a hint below the box says that Reviewer starts executing once the comment is sent:
+</Step>
+<Step>
+
+Review needs no new issue and no change of assignee. Back in MUL-1's comment box, type `@Reviewer` to mention it, write what needs doing, and send. A hint below the box says that Reviewer starts executing once the comment is sent:
![Starting a review by @-mentioning Reviewer in a comment](/images/docs/tutorial-comment-mention-reviewer.webp)
+</Step>
+<Step>
+
A few minutes later the review comment comes back, with the conclusion that changes are needed before merging. Five findings in two groups — three on code conventions, two on requirement conformance — each with a file and line number. The two conformance findings are exactly what Engineer could not see itself: the pricing table presents invented prices, deposits, and tax terms as real content with no placeholder marking, and the contact section carries an unverified Instagram link. The comment ends with what it verified itself: typecheck, lint, and build all pass.
+</Step>
+<Step>
+
Fixing needs no new process: @Engineer in the comment box and ask it to clear all the findings. Engineer starts executing on send, visible both in the badge next to the title and in the execution log on the right:
![Reviewer's findings, with @Engineer picking up the fixes](/images/docs/tutorial-reviewer-findings.webp)
@@ -223,11 +283,17 @@ A few minutes later Engineer reports back: all five fixed, pushed to the same PR
![Engineer's fix report](/images/docs/tutorial-engineer-fixed.webp)
+</Step>
+<Step>
+
Mention Reviewer again for a second pass: all five findings resolved, ready to merge, with two low-priority follow-up suggestions left:
![Reviewer's re-check passes](/images/docs/tutorial-reviewer-recheck.webp)
-Development and review go back and forth this way: find problems, fix problems, and each round makes the definition of the site a little more settled. One issue now carries two agents — Engineer implements, Reviewer reviews — and a few short comments from you drive the whole loop.
+</Step>
+</Steps>
+
+One issue now carries two agents — Engineer implements, Reviewer reviews — and a few short comments from you keep development and review going round after round.
## Merge and close out
@@ -235,15 +301,15 @@ Merging is also issued as a comment: ask Engineer to merge the PR and make sure
![The merge is complete and the issue moves to Done](/images/docs/tutorial-issue-done.webp)
-That closes the loop on the first issue: from the description of the requirement to the merge — implementation, review, fixes, sign-off, and merge — all recorded on one timeline.
+That wraps up the first issue: every step from the requirement to the merge is recorded on one timeline.
## Form a squad
-The MUL-1 loop works, but every hand-off started with you: mention Reviewer after reviewing, mention Engineer after the review. Coordination itself became your job. That layer can be handed off too. Multica's answer to it is the **squad**: a named group of agents and members led by a leader agent. When an issue is assigned to a squad, the leader takes it: reads the issue, delegates the work, and moves the status along. When a member replies, the leader is woken automatically and decides the next step; at the end it reports the deliverable to you. The leader takes over exactly the role you just played.
+The MUL-1 loop works, but every hand-off started with you: mention Reviewer after reviewing, mention Engineer after the review. Coordination itself became your job, and that can be handed off too, with a **squad**: a named group of agents and members led by a leader agent. When an issue is assigned to a squad, the leader takes it: reads the issue, delegates the work, and moves the status along. When a member replies, the leader is woken automatically and decides the next step; at the end it reports the deliverable to you, which is exactly what you were doing on MUL-1.
A squad is the division of labor you already have, plus a leader:
-- **Lead** (new): the leader, responsible for management — assigning work, moving the issue status along, and reporting deliverables to you, without doing the work itself;
+- **Lead** (new): the leader, responsible for management: assigning work, moving the issue status along, and reporting deliverables to you, without doing the work itself;
- **Engineer** (existing): development;
- **Reviewer** (existing): reviews every PR;
- **You**: final sign-off.
@@ -260,7 +326,7 @@ Open **Squads → Website Team** in the sidebar to check the result: the leader,
## Skills: reusable methods
-Writing feedback into instructions earlier solved one agent's problem — instructions belong to that agent alone. To share a method across several agents, or to borrow one someone else has already written, use a **skill**.
+Writing feedback into instructions earlier only solved one agent's problem, because instructions belong to that agent alone. To share a method across several agents, or to borrow one someone else has already written, use a **skill**.
A skill is a knowledge package for an agent: one `SKILL.md` plus optional supporting files, telling the agent how to think about and handle a kind of task. Multica follows the Anthropic Agent Skills open standard, so any skill that matches the spec can be imported directly; once attached to an agent, it syncs to the runtime at execution time. Open the **Skills** page — the two skills imported above are both there, with the agents they are attached to on the right:
@@ -283,7 +349,7 @@ Read the files of a third-party skill before importing it: Multica does not sand
## The second issue: hand it to the squad
-Give the squad a complete piece of work: turn the site into a generic template — replace the real name with a placeholder photographer name and the real email with `[email protected]`, leaving layout and content structure untouched. This issue does not have to be written by hand: describe the requirement to Lead in Chat and create it with **Create with agent**, assigned to the squad — a squad, like an agent or a member, can appear anywhere an assignee can:
+Give the squad a complete piece of work: turn the site into a generic template — replace the real name with a placeholder photographer name and the real email with `[email protected]`, leaving layout and content structure untouched. This issue does not have to be written by hand: describe the requirement to Lead in Chat and create it with **Create with agent**, assigned to the squad. A squad, like an agent or a member, can appear anywhere an assignee can:
![Creating an issue from a conversation with Create with agent](/images/docs/tutorial-create-with-agent.webp)
@@ -291,42 +357,54 @@ In the generated issue, the requirement is already organized into a structured d
![MUL-2: Lead creates the issue and starts work](/images/docs/tutorial-issue-squad-created.webp)
-What follows is all the leader's work. Its delegation comment is more than a forward: it adds two constraints the issue did not have — the placeholder identity must be consistent site-wide, and the sweep must cover metadata and the README — before handing off to Engineer. When Engineer finishes, it reports the PR on the same timeline:
+What follows is all the leader's work. In its delegation comment it adds two constraints the issue did not have — the placeholder identity must be consistent site-wide, and the sweep must cover metadata and the README — before handing off to Engineer. When Engineer finishes, it reports the PR on the same timeline:
![Lead delegates and Engineer reports the PR](/images/docs/tutorial-squad-dispatch.webp)
-The review comes back with zero findings and Lead delivers: it mentions you for sign-off, leads with the conclusion, then the PR link, a description of the changes, and two points that need your judgment, closing with one line — nothing merges without your approval:
+The review comes back with zero findings and Lead delivers: it mentions you for sign-off, leads with the conclusion, then the PR link, a description of the changes, and two points that need your judgment, and closes by saying that nothing merges without your approval:
![Lead's delivery report](/images/docs/tutorial-squad-delivery.webp)
-From organizing the requirement, to settling the approach, development, review, and the delivery report, no step of this issue needed you to connect it. Sign-off works the same as on MUL-1 — you can also have it start a local server and look in the browser, not repeated here. Done is still yours: reply to merge, or change the status by hand. Every step of the timeline is recorded, no different from an issue on a human team — only who executes has changed.
+From organizing the requirement, to settling the approach, development, review, and the delivery report, no step of this issue needed you to connect it. Sign-off works the same as on MUL-1; you can also have it start a local server and look in the browser, which is not repeated here. Done is still yours: reply to merge, or change the status by hand.
## Automation: Autopilot
-Every trigger so far started with you — assignment, mention, chat. **Autopilot** is a fourth kind of trigger: starting work automatically on a schedule.
+Every trigger so far started with you: assignment, mention, chat. **Autopilot** is a fourth kind of trigger, starting work automatically on a schedule.
+
+<Steps>
+<Step>
Configuring it takes one sentence: tell Multica helper that at nine every Monday morning, Reviewer should run a full check over the site's repository — redundancy and dead code, questionable structure, places that could follow conventions better — writing findings into issue comments and changing no code:
![The helper creating an autopilot](/images/docs/tutorial-autopilot-create.webp)
+</Step>
+<Step>
+
Open the **Autopilot** page: the executor, the prompt, and the schedule (cron plus timezone) are all configured. There are two run modes:
- **Create Issue** (default): every trigger creates an issue first, so the work lands on the board with history and comments identical to any other issue;
-- **Run only**: executes without creating an issue, leaving a record only in the autopilot's run history — if a run finds nothing, it leaves nothing behind.
+- **Run only**: executes without creating an issue, leaving a record only in the autopilot's run history; if a run finds nothing, nothing shows up on the board.
A periodic check uses Create Issue mode. Rather than waiting until Monday, click **Run now** to trigger once immediately:
![Autopilot detail: the schedule and Run now](/images/docs/tutorial-autopilot-detail.webp)
+</Step>
+<Step>
+
The issue is created and Reviewer starts checking. From then on, at the same time every Monday, the same check creates a new issue automatically, with nobody needing to trigger it:
![An issue created automatically by Autopilot](/images/docs/tutorial-autopilot-issue.webp)
+</Step>
+</Steps>
+
Triggers support webhooks in addition to schedules, and the executor can also point at a squad — see [Autopilots](/autopilots).
## Working with other people
-So far you have been the only human member of the workspace. Under **Settings → Members**, invite others by email; they create issues, @-mention agents, and join squads the same way you do — several people and several agents working together on the same set of issues:
+So far you have been the only human member of the workspace. Under **Settings → Members**, invite others by email; they create issues, @-mention agents, and join squads the same way you do, with several people and several agents working together on the same set of issues:
![Inviting a member to the workspace by email](/images/docs/tutorial-invite-member.webp)
@@ -334,9 +412,9 @@ So far you have been the only human member of the workspace. Under **Settings
Once issues pile up, there are tools for organizing them: a **Project** groups related issues and tracks them as one unit (see [Projects](/projects)). More ways to organize are being added, and **Space** is close to ready.
-Looking back at the path: starting from an empty workspace, connecting one computer, building four agents, running two issues through their full life cycle, then handing coordination to a leader and periodic checks to Autopilot. Your involvement steps back one level at a time, until two things are left: describing the requirement, and signing off on the result.
+Looking back at the path: starting from an empty workspace, connecting one computer, building four agents, running two issues, then handing coordination to a leader and periodic checks to Autopilot. By the end, all that is left for you is describing the requirement and signing off on the result.
-Agents are first-class members and all collaboration stays on the issue timeline — that is the way of working Multica provides. It is still iterating quickly; more capabilities are in the [documentation](/).
+Multica is still iterating quickly; more capabilities are in the [documentation](/).
## Next steps
diff --git a/apps/docs/content/docs/tutorial.zh.mdx b/apps/docs/content/docs/tutorial.zh.mdx
index f2e2632323..8cdf8999d4 100644
--- a/apps/docs/content/docs/tutorial.zh.mdx
+++ b/apps/docs/content/docs/tutorial.zh.mdx
@@ -3,6 +3,8 @@ title: 完整教程
description: 从空工作区开始,用一个个人网站项目走完 Multica 的全部核心流程:创建智能体、用任务交付、组建小队、沉淀 skill、配置自动化。
---
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
Multica 是人和 AI 智能体一起工作的平台。这篇教程从零开始,带你:
- 搭建一个自己的工作区
@@ -21,26 +23,40 @@ Multica 是人和 AI 智能体一起工作的平台。这篇教程从零开始
工作区是团队工作的地方:任务、项目、智能体都属于某个工作区。注册后的引导会带你创建第一个工作区;如果你是被邀请加入团队,登录后会直接进入团队的工作区。
-这篇教程新建一个工作区来演示。点击侧边栏顶部的工作区名称,选择 **创建工作区**:
+这篇教程新建一个工作区来演示。
+
+<Steps>
+<Step>
+
+点击侧边栏顶部的工作区名称,选择 **创建工作区**:
![创建工作区入口](/images/docs/tutorial-create-workspace-menu.webp)
-创建时填两项:
+</Step>
+<Step>
+
+填两项:
- **名称**:展示给成员,之后可以修改。
- **工作区 URL**:地址中的 slug,例如 `multica.ai/my-team` 里的 `my-team`,创建后不可修改。
![创建工作区页面](/images/docs/tutorial-create-workspace-form.webp)
-创建完成后会进入新工作区。左侧是侧边栏,之后的操作都从这里进入;中间的任务列表现在还是空的,接下来几步就是让智能体来填满它。
+</Step>
+<Step>
+
+创建完成后进入新工作区。左侧是侧边栏,之后的操作都从这里进入;中间的任务列表还是空的,接下来几步会让智能体把它填起来。
![刚创建好的空工作区](/images/docs/tutorial-empty-workspace.webp)
+</Step>
+</Steps>
+
## 连接你的电脑
智能体在你连接的电脑上执行工作,用的就是这台电脑上安装的 AI 编程工具。
-教程用 [Multica Desktop](https://multica.ai/download) 演示:下载并登录后,它会自动把这台电脑注册为运行时,并检测已安装的 AI 编程工具。打开侧边栏底部的 **配置 → 运行时**,确认这台电脑已经在线:
+教程用 [Multica Desktop](https://multica.ai/download) 演示:下载并登录后,它会自动把这台电脑注册为运行时,并检测已安装的 AI 编程工具。打开侧边栏 **AI 团队** 下的 **运行时**,确认这台电脑已经在线:
![运行时列表,这台电脑在线](/images/docs/tutorial-runtimes-list.webp)
@@ -48,16 +64,16 @@ Multica 是人和 AI 智能体一起工作的平台。这篇教程从零开始
![运行时详情,检测出的 AI 编程工具](/images/docs/tutorial-runtime-detail.webp)
-不用 Desktop 也可以:在运行时页面点 **添加电脑**,按提示用命令行安装,守护进程会常驻后台运行;详见[守护进程与运行时](/daemon-runtimes)。
+不用 Desktop 也可以:在运行时页面点 **添加**,选择 **其他机器或服务器**,按提示用命令行安装,守护进程会常驻后台运行;详见[守护进程与运行时](/daemon-runtimes)。
## 创建第一个智能体
智能体是工作区的正式成员:可以被分配任务、发表评论、和你对话。第一个智能体我们创建一名 helper,负责工作区里的日常事务,之后教程里的不少操作都会交给它。
-打开侧边栏的 **智能体**,点 **新建智能体**,选择 **从空白开始**,填三项:
+打开侧边栏 **AI 团队** 下的 **智能体**,点 **新建智能体**。先选择运行时:上一步连接的电脑上的一款 AI 编程工具,教程用 Claude。然后在配置页填三项:
- **名称**:`Multica helper`。
-- **运行时**和**模型**:选择上一步连接的电脑和一款 AI 编程工具,再从该工具支持的模型里选一个。教程用 Claude 和 Sonnet。
+- **模型**:从该工具支持的模型里选一个。教程用 Sonnet。
- **指令**:每次执行时提供给智能体的提示词,写清它负责什么、不负责什么:
```text
@@ -80,7 +96,7 @@ request is ambiguous, ask before acting.
## 第二个智能体:用对话创建
-建网站需要一名能写代码的工程师。这次不填表单——工作区里已经有一个智能体,创建的事可以直接交给它。
+建网站需要一名能写代码的工程师。这次不填表单:工作区里已经有一个智能体,创建的事可以直接交给它。
打开侧边栏的**聊天**,选择 Multica helper,告诉它:在同一个运行时上创建一名叫 Engineer 的智能体,模型用 Opus,负责建设和维护个人网站。Multica helper 会在这台电脑上执行创建,并回复新智能体的名称和模型。新智能体默认只有创建者可以运行,教程里保持默认即可。
@@ -92,7 +108,7 @@ request is ambiguous, ask before acting.
## 准备网站仓库
-网站的代码放在 GitHub 仓库里。仓库的创建和绑定同样交给智能体——前提是这台电脑安装并登录了 [GitHub CLI](https://cli.github.com)。
+网站的代码放在 GitHub 仓库里。仓库的创建和绑定同样交给智能体,前提是这台电脑安装并登录了 [GitHub CLI](https://cli.github.com)。
在**聊天**中选择 Engineer,告诉它:在我的 GitHub 账号下创建一个名为 `personal-website` 的空仓库(这台电脑上有 GitHub CLI),然后用 `multica repo add` 注册进这个工作区。Engineer 会在本地创建仓库、把它注册进工作区,并回复仓库地址。消息里没有指定可见性,它会按默认创建并在回复里说明;公开或私有都不影响后续步骤。
@@ -110,9 +126,12 @@ request is ambiguous, ask before acting.
配置到此全部完成。从这里开始是 Multica 的日常工作方式:需求写成任务,交给智能体执行。
-网站从 shadcn 的官方模板起步,而不是从零搭建:模板已经带好技术栈和基础配置,Engineer 在它之上做内容和设计。
+网站从 shadcn 的官方模板起步:模板已经带好技术栈和基础配置,Engineer 在它之上做内容和设计。
+
+<Steps>
+<Step>
-点侧边栏顶部的**新建任务**(快捷键 `C`)。默认的智能体模式下不用填标题——在**创建者**中选择 Engineer,把需求直接写进描述,标题在创建时自动生成;也可以切换到手动模式,自行填写标题和内容。描述:
+点侧边栏顶部的**新建任务**(快捷键 `C`)。默认的智能体模式下不用填标题:在**创建者**中选择 Engineer,把需求直接写进描述,标题在创建时自动生成;也可以切换到手动模式,自行填写标题和内容。描述:
```text
Work in the personal-website repository registered in this workspace.
@@ -147,49 +166,78 @@ Open a pull request when it is ready.
![新建任务的智能体模式,创建者已选 Engineer](/images/docs/tutorial-new-issue-agent-mode.webp)
-提交后,Multica 创建任务(编号 `MUL-1`,标题自动生成),把 Engineer 设为负责人;Engineer 随即开始执行,状态转为「进行中」。任务右侧是它的全部动态:状态、负责人、关联的 pull request 和执行记录。
+</Step>
+<Step>
-执行需要几分钟,进展有两个入口:标题旁的工作状态徽章,和右侧的**执行日志**——点开当前这次运行:
+提交后,Multica 创建任务(编号 `MUL-1`,标题自动生成),把 Engineer 设为负责人;Engineer 随即开始执行,状态转为"进行中"。任务右侧是它的全部动态:状态、负责人、关联的 pull request 和执行记录。
+
+执行需要几分钟,进展有两个入口:标题旁的工作状态徽章,和右侧的**执行日志**。点开当前这次运行:
![查看进展的两个入口](/images/docs/tutorial-issue-engineer-working.webp)
+</Step>
+<Step>
+
执行记录里是这次执行的每一步:**Agent** 行是它的说明,**Bash**、**Read**、**Edit** 是它运行的命令和读写的文件。截图这一刻,它正在给建好的页面截图自查,刚发现定价表的分隔线没有对齐。点右上角的 ⓘ,可以看到这次执行用的电脑、AI 编程工具和工作目录。
![执行记录,Engineer 的每一步](/images/docs/tutorial-execution-log.webp)
+</Step>
+</Steps>
+
## 验收:在任务里对话
-执行结束后,Engineer 把状态改为「审核中」,通知进入你的收件箱。它在任务里发表了完成评论,附上做好的页面截图:
+执行结束后,Engineer 把状态改为"审核中",通知进入你的收件箱。它在任务里发表了完成评论,附上做好的页面截图:
![Engineer 的完成评论,附页面截图](/images/docs/tutorial-issue-review-comment.webp)
-截图能看出大概,验收还是要在浏览器里点开。网站在你的电脑上构建,让 Engineer 启动本地服务就能访问。另外,右侧的 **Pull Request** 区域还是空的——任务里明确要求了提交 PR,这件事也直接问它。
+截图能看出大概,验收还是要在浏览器里点开。网站在你的电脑上构建,让 Engineer 启动本地服务就能访问。另外,右侧的 **Pull Request** 区域还是空的;任务里明确要求了提交 PR,这件事也直接问它。
+
+这次不用评论区,改用聊天:
-这次不用评论区。页面右下角有一个聊天按钮,工作区的任何页面都能打开,和侧边栏的**聊天**是同一个功能:
+<Steps>
+<Step>
+
+页面右下角有一个聊天按钮,工作区的任何页面都能打开,和侧边栏的**聊天**是同一个功能:
![右下角的聊天按钮](/images/docs/tutorial-chat-fab.webp)
-点开后选择 Engineer,输入 `@` 引用当前任务——对话会带上这条任务的上下文,把上面两件事发给它:
+</Step>
+<Step>
+
+点开后选择 Engineer,输入 `@` 引用当前任务,对话会带上这条任务的上下文。把上面两件事发给它:
![在聊天中引用任务提问](/images/docs/tutorial-chat-ask-in-issue.webp)
-Engineer 的回复分两部分:本地服务已经启动,给出访问地址;PR 其实已经提交了,只是标题、分支名和正文里都没有 `MUL-1`,自动关联匹配不上——它随后把编号补进了 PR 标题。
+</Step>
+<Step>
+
+Engineer 的回复分两部分:本地服务已经启动,给出访问地址;PR 其实已经提交了,只是标题、分支名和正文里都没有 `MUL-1`,自动关联匹配不上,它随后把编号补进了 PR 标题。
![Engineer 的回复:本地地址和 PR 未关联的原因](/images/docs/tutorial-chat-engineer-reply.webp)
+</Step>
+<Step>
+
在浏览器打开它给的地址,看到网站:
![本地运行的网站首页](/images/docs/tutorial-site-localhost.webp)
+</Step>
+<Step>
+
回到任务,右侧的 **Pull Request** 区域也出现了 PR 卡片,显示状态和改动规模,点击直接打开 GitHub 上的 PR;配置了 CI 的仓库还会显示 check 结果:
![任务右侧出现 PR 卡片](/images/docs/tutorial-issue-pr-linked.webp)
+</Step>
+</Steps>
+
## 把反馈写进指令
-这轮验收暴露了 Engineer 的两个工作习惯:完成后靠反复截图自查,占掉不少执行时间;提交 PR 时不带任务编号,关联不上。两个都不是这一次的偶然失误,而是它每次都会重复的做法——要改的不是这条任务,而是它的指令。
+这轮验收暴露了 Engineer 的两个工作习惯:完成后靠反复截图自查,占掉不少执行时间;提交 PR 时不带任务编号,关联不上。这两个都是它每次都会重复的做法,所以要改的是它的指令,这条任务本身不用动。
-指令不用你自己动手改:智能体可以用 multica CLI 更新自己的配置。继续在刚才的对话里告诉 Engineer 这两条规则——完成后不用截图自查,验收在浏览器里进行;PR 的分支名或标题里必须带任务编号——并让它写进自己的指令:
+指令不用你自己动手改,智能体可以用 multica CLI 更新自己的配置。继续在刚才的对话里告诉 Engineer 两条规则:完成后不用截图自查,验收在浏览器里进行;PR 的分支名或标题里必须带任务编号。再让它把规则写进自己的指令:
![让 Engineer 把规则写进自己的指令](/images/docs/tutorial-chat-update-instructions.webp)
@@ -199,22 +247,34 @@ Engineer 用 `multica agent update` 完成更新,在指令里新增一节工
![Engineer 更新后的指令](/images/docs/tutorial-engineer-updated-instructions.webp)
-之后每次执行,这两条规则都会随指令生效。这也是调优智能体的基本方式:发现重复出现的问题,把纠正写进指令,而不是每次口头提醒。
+之后每次执行,这两条规则都会随指令生效。调优智能体基本就是这样:发现重复出现的问题,把纠正写进指令,不用每次口头提醒。
## 第三个智能体:Reviewer
Engineer 交付了第一版,但有些问题它自己意识不到。审查交给一名新的智能体:全新的上下文,专门对照任务的要求检查代码质量。
+<Steps>
+<Step>
+
创建还是交给 Multica helper:一名叫 Reviewer 的智能体,这次选 Codex 和 GPT-5.6 Sol 模型,和 Engineer 用的工具、模型都不同;只审查、不改代码,结论写成任务评论。指令依然由 helper 生成——读取 PR 的真实状态再审查、发现写成带文件位置的评论、绝不修改代码:
![Reviewer 的配置](/images/docs/tutorial-reviewer-detail.webp)
-审查不用新开任务,也不用换负责人。回到 MUL-1 的评论框,输入 `@Reviewer` 提及它,写上要做的事再发送——评论框下方会提示:发送后 Reviewer 就开始执行:
+</Step>
+<Step>
+
+审查不用新开任务,也不用换负责人。回到 MUL-1 的评论框,输入 `@Reviewer` 提及它,写上要做的事再发送。评论框下方会提示:发送后 Reviewer 就开始执行:
![在评论中 @Reviewer 发起审查](/images/docs/tutorial-comment-mention-reviewer.webp)
+</Step>
+<Step>
+
几分钟后,审查评论回来了,结论是:合并前需要修改。五条发现分成两组——代码规范三条、需求符合度两条,每条都带文件和行号。需求符合度的两条正是 Engineer 自己意识不到的问题:定价表把虚构的价格、订金和税务条款当成正式内容展示,没有任何待定标注;联系方式里放了一个没核实过的 Instagram 链接。评论末尾它说明了自己验证过的部分:typecheck、lint 和 build 都通过。
+</Step>
+<Step>
+
修复不用新流程:在评论区 @Engineer,让它把发现的问题都修掉。发送后 Engineer 随即开始执行,标题旁的徽章和右侧执行记录里都能看到:
![Reviewer 的审查结论,@Engineer 继续修复](/images/docs/tutorial-reviewer-findings.webp)
@@ -223,27 +283,33 @@ Engineer 交付了第一版,但有些问题它自己意识不到。审查交
![Engineer 的修复报告](/images/docs/tutorial-engineer-fixed.webp)
+</Step>
+<Step>
+
再提及 Reviewer 复查一轮,结论:五条发现全部解决,可以合并,剩两条低优先级的后续建议:
![Reviewer 复查通过](/images/docs/tutorial-reviewer-recheck.webp)
-开发和审查就这样往复:发现问题,修复问题,每一轮都让网站的定义更确定一点。一条任务上现在有两名智能体:Engineer 实现,Reviewer 审查,你用几条短评论驱动整个循环。
+</Step>
+</Steps>
+
+一条任务上现在有两名智能体:Engineer 实现,Reviewer 审查,你用几条短评论推动开发和审查一轮轮往复。
## 合并收尾
-合并同样用一条评论下达:让 Engineer 合并 PR,并确保任务转到「已完成」。它合并、删除分支、在合并后的 main 上重跑检查,然后回报。任务状态变成「已完成」,收件箱里收到完成通知:
+合并同样用一条评论下达:让 Engineer 合并 PR,并确保任务转到"已完成"。它合并、删除分支、在合并后的 main 上重跑检查,然后回报。任务状态变成"已完成",收件箱里收到完成通知:
-![合并完成,任务转为「已完成」](/images/docs/tutorial-issue-done.webp)
+![合并完成,任务转为"已完成"](/images/docs/tutorial-issue-done.webp)
-第一条任务到此闭环:从需求描述到上线合并,实现、审查、修复、验收、合并,全部记录在同一条时间线里。
+第一条任务到此结束,从需求描述到合并,每一步都记在同一条时间线里。
## 组建小队
-MUL-1 的循环跑通了,但每一次衔接都由你发起:验收后提及 Reviewer,审查后提及 Engineer。协调本身成了你的工作。这层工作也交出去。Multica 为此提供的组织形式是**小队(squad)**:一组智能体和成员的命名集合,由一名队长智能体领导。任务分配给小队后,接手的是队长:读任务、派活、推进状态;成员有了回复,它被自动唤醒,决定下一步;收尾时向你汇报交付产物。队长接手的正是你刚才的角色。
+MUL-1 的循环跑通了,但每一次衔接都由你发起:验收后提及 Reviewer,审查后提及 Engineer。协调本身成了你的工作,这层工作也可以交出去,用的是**小队(squad)**:一组智能体和成员的命名集合,由一名队长智能体领导。任务分配给小队后,接手的是队长:读任务、派活、推进状态;成员有了回复,它被自动唤醒,决定下一步;收尾时向你汇报交付产物,也就是你刚才在 MUL-1 上做的事。
小队就是已有的分工加一名队长:
-- **Lead**(新建):队长,负责管理——分配运行、推进任务状态、向你汇报交付产物,自己不动手;
+- **Lead**(新建):队长,负责管理:分配运行、推进任务状态、向你汇报交付产物,自己不动手;
- **Engineer**(已有):开发;
- **Reviewer**(已有):审查每个 PR;
- **你**:最终验收。
@@ -260,7 +326,7 @@ MUL-1 的循环跑通了,但每一次衔接都由你发起:验收后提及 R
## Skill:可复用的方法
-前面把反馈写进指令,解决的是一个智能体的问题——指令只属于它自己。要让一套方法被多个智能体共享,或者直接借用别人已经写好的方法,用 **skill**。
+前面把反馈写进指令,只解决了一个智能体的问题,因为指令只属于它自己。要让一套方法被多个智能体共享,或者直接借用别人已经写好的方法,用 **skill**。
Skill 是给智能体的知识包:一个 `SKILL.md` 加上可选的支持文件,告诉智能体遇到某类运行该怎么想、怎么做。Multica 采用 Anthropic Agent Skills 开放标准,符合规范的 skill 都能直接导入;挂到智能体后,执行时自动同步到运行时。打开 **Skills** 页面,刚才导入的两个都在,右侧是各自挂载的智能体:
@@ -283,60 +349,72 @@ Skill 是给智能体的知识包:一个 `SKILL.md` 加上可选的支持文
## 第二条任务:交给小队
-给小队一件完整的工作:把网站改成通用模板——真实姓名换成占位的摄影师名字,真实邮箱换成 `[email protected]`,布局和内容结构不动。这次任务不用自己写:在聊天里把需求说给 Lead,用**通过智能体创建**直接创建,负责人是小队——小队和智能体、成员一样,可以出现在任何负责人位置:
+给小队一件完整的工作:把网站改成通用模板——真实姓名换成占位的摄影师名字,真实邮箱换成 `[email protected]`,布局和内容结构不动。这次任务不用自己写:在聊天里把需求说给 Lead,用**通过智能体创建**直接创建,负责人是小队。小队和智能体、成员一样,可以出现在任何负责人位置:
-![在聊天中用「通过智能体创建」新建任务](/images/docs/tutorial-create-with-agent.webp)
+![在聊天中用"通过智能体创建"新建任务](/images/docs/tutorial-create-with-agent.webp)
生成的任务里,需求已经被整理成结构化描述;标题旁的徽章显示队长已经接手:
![MUL-2:Lead 创建任务并开始工作](/images/docs/tutorial-issue-squad-created.webp)
-接下来全是队长的工作。它的派活评论不只是转发:补上两条任务里没有的约束(占位身份全站统一、清查范围列到元数据和 README),再交给 Engineer。Engineer 完成后,把 PR 回报在同一条时间线里:
+接下来全是队长的工作。它在派活评论里补上了两条任务里没有的约束(占位身份全站统一、清查范围列到元数据和 README),再交给 Engineer。Engineer 完成后,把 PR 回报在同一条时间线里:
![Lead 派活,Engineer 回报 PR](/images/docs/tutorial-squad-dispatch.webp)
-审查零发现,Lead 随即交付:提及你验收,第一行是结论,往下是 PR 链接、改动说明和两个需要你判断的点,结尾一句——你不点头就不合并:
+审查零发现,Lead 随即交付:提及你验收,第一行是结论,往下是 PR 链接、改动说明和两个需要你判断的点,结尾说明你不点头就不合并:
![Lead 的交付汇报](/images/docs/tutorial-squad-delivery.webp)
-从整理需求、确认方案、开发、审查到交付汇报,这条任务没有一步需要你衔接。验收方式和 MUL-1 相同——也可以让它启动本地服务在浏览器里看,不再展开。「已完成」仍然留给你:回复合并,或手动改状态。整条时间线的每一步都有记录,和人类团队的任务没有区别——变的只是执行的人。
+从整理需求、确认方案、开发、审查到交付汇报,这条任务没有一步需要你衔接。验收方式和 MUL-1 相同,也可以让它启动本地服务在浏览器里看,这里不再展开。"已完成"仍然留给你:回复合并,或手动改状态。
## 自动化
-到目前为止的每次触发都由你发起——分配、提及、对话。**自动化**是第四种触发方式:按时间自动开工。
+到目前为止的每次触发都由你发起:分配、提及、对话。**自动化**是第四种触发方式,按时间自动开工。
+
+<Steps>
+<Step>
-配置是一句话的事:告诉 Multica helper,每周一早上九点,让 Reviewer 对网站代码库做一次全面检查——冗余和死代码、不合理的结构、可以更规范的地方,发现写进任务评论,不改代码:
+配置只要一句话:告诉 Multica helper,每周一早上九点,让 Reviewer 对网站代码库做一次全面检查——冗余和死代码、不合理的结构、可以更规范的地方,发现写进任务评论,不改代码:
![helper 创建自动化](/images/docs/tutorial-autopilot-create.webp)
+</Step>
+<Step>
+
打开**自动化**页面,执行者、提示词和调度(cron + 时区)都已配置好。执行模式有两种:
- **创建任务**(默认):每次触发先建一条任务,工作落在看板上,历史、评论和普通任务完全一致;
-- **仅运行**:不建任务直接执行,只在自动化的运行历史里留记录——这次没发现问题的话,跑完就什么都不留。
+- **仅运行**:不建任务直接执行,只在自动化的运行历史里留记录;这次没发现问题的话,看板上不会留下任何东西。
-定期检查用「创建任务」模式。不想等到周一,点**立即运行**触发一次:
+定期检查用"创建任务"模式。不想等到周一,点**立即运行**触发一次:
![自动化详情页:调度和立即运行](/images/docs/tutorial-autopilot-detail.webp)
+</Step>
+<Step>
+
任务随即建出来,Reviewer 开始检查。之后每周一到点,同样的检查会自动创建新的任务,不再需要任何人触发:
![自动化创建的任务](/images/docs/tutorial-autopilot-issue.webp)
+</Step>
+</Steps>
+
触发器除了定时还支持 webhook,执行者也可以指向小队,见[自动化文档](/autopilots)。
## 多人协作
-到这里,工作区里的人类成员始终只有你一个。**设置 → 成员**里用邮箱邀请其他人加入,他们和你一样创建任务、@ 智能体、加入小队——多个人和多个智能体在同一批任务上协同:
+到这里,工作区里的人类成员始终只有你一个。**设置 → 成员**里用邮箱邀请其他人加入,他们和你一样创建任务、@ 智能体、加入小队,多个人和多个智能体在同一批任务上协同:
![用邮箱邀请成员加入工作区](/images/docs/tutorial-invite-member.webp)
## 结语
-任务多起来之后还有组织它们的工具:**Project** 把相关的任务归成一组、当成一个单元跟进(见[项目文档](/projects));类似的组织方式还在增加,**Space** 也即将就绪。
+任务多起来之后还有组织它们的工具:**项目**把相关的任务归成一组、当成一个单元跟进(见[项目文档](/projects));类似的组织方式还在增加,**Space** 也即将就绪。
-回头看这条路径:从空工作区开始,连上一台电脑,建起四名智能体,跑完两条任务的完整生命周期,再把协调交给队长、把周期检查交给自动化。你的参与逐级后撤,最后只剩两件事:描述需求,验收结果。
+回头看这条路径:从空工作区开始,连上一台电脑,建起四名智能体,跑完两条任务,再把协调交给队长、把周期检查交给自动化。到最后,你要做的只剩描述需求和验收结果。
-智能体是一等成员,一切协作都留在任务的时间线里——这就是 Multica 提供的工作方式。它还在快速迭代,更多能力见[文档](/)。
+Multica 还在快速迭代,更多能力见[文档](/)。
## 接下来
diff --git a/apps/docs/content/docs/vcs-integration.fr.mdx b/apps/docs/content/docs/vcs-integration.fr.mdx
index 72ed4e6c9a..e7219f4933 100644
--- a/apps/docs/content/docs/vcs-integration.fr.mdx
+++ b/apps/docs/content/docs/vcs-integration.fr.mdx
@@ -4,22 +4,19 @@ description: Connectez une instance Forgejo, Gitea ou GitLab auto-hébergée par
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="warn">
-**Multica auto-hébergé uniquement.** Cette intégration n'est disponible que si vous
-exécutez Multica vous-même ; elle n'est pas proposée sur Multica Cloud. « Auto-hébergé »
-signifie ici que c'est **Multica** qui est auto-hébergé — généralement pour pouvoir joindre
-une instance Git sur votre propre réseau. Un opérateur du serveur doit l'activer
-(`MULTICA_VCS_INTEGRATION_ENABLED=true`) et définir `MULTICA_VCS_SECRET_KEY` ; d'ici là,
-la ligne n'apparaît pas dans Paramètres → Code.
+**Multica auto-hébergé uniquement.** Cette intégration n'est disponible que si vous exécutez Multica vous-même ; elle n'est pas proposée sur Multica Cloud. On auto-héberge généralement Multica pour qu'il puisse joindre une instance Git de son propre réseau. Le serveur doit activer `MULTICA_VCS_INTEGRATION_ENABLED=true` et définir `MULTICA_VCS_SECRET_KEY` ; sinon, la ligne n'apparaît pas dans **Paramètres → Code**.
</Callout>
-Multica se connecte à un fournisseur Git auto-hébergé par espace de travail : **Forgejo**, **Gitea** ou **GitLab**. Une fois la connexion établie, toute pull request (GitLab : merge request) dont le nom de branche ou le titre contient un identifiant de tâche (par exemple `MUL-123`), ou dont la description en cite un après un mot-clé de clôture (`Closes MUL-123`), est **associée automatiquement** à cette [tâche](/issues), apparaît sous **Pull requests** dans la barre latérale de la tâche et — une fois toutes les PR associées fusionnées — fait passer la tâche au statut choisi par l'espace de travail (**Terminé** par défaut). La CI du commit de tête s'affiche sous forme de barre de vérifications sur la carte.
+Multica se connecte à un fournisseur Git auto-hébergé par espace de travail : Forgejo, Gitea ou GitLab. Une fois la connexion établie, toute pull request (GitLab : merge request) dont le nom de branche ou le titre contient un identifiant de tâche (par exemple `MUL-123`), ou dont la description en cite un après un mot-clé de clôture (`Closes MUL-123`), est associée automatiquement à cette [tâche](/issues) et apparaît sous **Pull requests** dans la barre latérale de la tâche. Une fois toutes les PR associées fusionnées, la tâche passe au statut choisi par l'espace de travail (**Terminé** par défaut). La CI du commit de tête s'affiche sous forme de barre de vérifications sur la carte.
-Ces fournisseurs fonctionnent en parallèle de GitHub : un espace de travail peut les combiner librement.
+Ces fournisseurs fonctionnent en parallèle de GitHub, et un espace de travail peut en connecter plusieurs.
<Callout type="info">
-Contrairement à GitHub, ces fournisseurs n'ont pas de modèle « App ». Chaque espace de travail stocke sa propre URL d'instance et un jeton d'accès, et enregistre un webhook sur son dépôt ou son organisation. Le jeton et le secret du webhook sont chiffrés au repos.
+Contrairement à GitHub, ces fournisseurs n'ont pas de modèle App. Chaque espace de travail stocke sa propre URL d'instance et un jeton d'accès, et enregistre un webhook sur son dépôt ou son organisation. Le jeton et le secret du webhook sont chiffrés au repos.
</Callout>
## Prérequis (serveur)
@@ -48,12 +45,23 @@ Définissez `MULTICA_PUBLIC_URL` sur l'URL de base publique du serveur pour que
## Connecter un espace de travail
-1. Chez votre fournisseur, créez un jeton d'accès disposant d'un accès en lecture aux dépôts que vous voulez refléter :
- - **Forgejo / Gitea** : Settings → Applications.
- - **GitLab** : un jeton d'accès personnel (ou de groupe/projet) avec la portée `read_api`.
-2. Dans Multica, ouvrez **Paramètres → Code**, puis cliquez sur **Connecter** sur la ligne **Git auto-hébergé**.
-3. Choisissez le **Fournisseur**, saisissez l'URL de l'instance (par exemple `https://forgejo.example.com`) et le jeton d'accès, puis cliquez sur **Connecter**. Multica valide le jeton auprès de l'instance avant d'enregistrer.
-4. Copiez l'**URL du webhook** et le **Secret du webhook** affichés après la connexion.
+<Steps>
+<Step>
+Chez votre fournisseur, créez un jeton d'accès disposant d'un accès en lecture aux dépôts que vous voulez refléter :
+
+- **Forgejo / Gitea** : Settings → Applications.
+- **GitLab** : un jeton d'accès personnel (ou de groupe/projet) avec la portée `read_api`.
+</Step>
+<Step>
+Dans Multica, ouvrez **Paramètres → Code**, puis cliquez sur **Connecter** sur la ligne **Git auto-hébergé**.
+</Step>
+<Step>
+Choisissez le **Fournisseur**, saisissez l'URL de l'instance (par exemple `https://forgejo.example.com`) et le jeton d'accès, puis cliquez sur **Connecter**. Multica valide le jeton auprès de l'instance avant d'enregistrer.
+</Step>
+<Step>
+Copiez l'**URL du webhook** et le **Secret du webhook** affichés après la connexion.
+</Step>
+</Steps>
<Callout type="warn">
Le secret du webhook n'est affiché qu'une seule fois. Copiez-le avant de quitter la page. Reconnecter la même instance régénère le jeton et le secret.
@@ -67,21 +75,30 @@ Multica ne propose pas d'option pour ignorer la vérification du certificat, car
## Enregistrer le webhook
-Sur le dépôt (ou sur l'organisation/le groupe, pour couvrir tous les dépôts) :
+Enregistrez-le sur le dépôt, ou sur l'organisation ou le groupe pour couvrir tous les dépôts.
-**Forgejo / Gitea** — Settings → Webhooks → Add Webhook → Forgejo/Gitea :
+<Tabs items={["Forgejo / Gitea", "GitLab"]}>
+<Tab value="Forgejo / Gitea" id="forgejo-gitea">
+
+Settings → Webhooks → Add Webhook → Forgejo/Gitea :
- **Target URL** : l'URL du webhook obtenue à l'étape précédente.
- **HTTP method** `POST`, **content type** `application/json`.
- **Secret** : le secret du webhook (utilisé pour vérifier le HMAC `X-Gitea-Signature`).
- **Trigger events** : sélectionnez **Pull Request**, ainsi que **Commit Status** pour refléter la CI.
-**GitLab** — Settings → Webhooks :
+</Tab>
+<Tab value="GitLab" id="gitlab">
+
+Settings → Webhooks :
- **URL** : l'URL du webhook.
- **Secret token** : le secret du webhook (envoyé dans `X-Gitlab-Token` et comparé tel quel).
- **Triggers** : activez **Merge request events**, ainsi que **Pipeline events** pour refléter la CI.
+</Tab>
+</Tabs>
+
Multica authentifie chaque livraison à l'aide du secret stocké : un webhook qui n'a pas le secret correspondant est rejeté.
## Ce qui est reflété
@@ -92,4 +109,4 @@ Multica authentifie chaque livraison à l'aide du secret stocké : un webhook qu
## Agents qui ouvrent des pull requests
-La création de PR ne nécessite aucune configuration de fournisseur dans Multica. Les agents récupèrent les dépôts dans le runtime, puis poussent leurs branches et ouvrent les PR avec les identifiants Git propres à la machine du runtime. Pour permettre aux agents de travailler avec un fournisseur, assurez-vous que la machine du daemon peut s'y authentifier — par exemple avec une clé de déploiement SSH, ou un jeton dans le gestionnaire d'identifiants Git (credential helper) de la machine — et ajoutez l'URL du dépôt comme d'habitude. La récupération des dépôts fonctionne avec n'importe quelle URL Git : aucun câblage propre au fournisseur n'est nécessaire.
+La création de PR ne nécessite aucune configuration de fournisseur dans Multica. Les agents récupèrent les dépôts dans le runtime, puis poussent leurs branches et ouvrent les PR avec les identifiants Git propres à la machine du runtime. Pour permettre aux agents de travailler avec un fournisseur, assurez-vous que la machine du daemon peut s'y authentifier (par exemple avec une clé de déploiement SSH, ou un jeton dans le gestionnaire d'identifiants Git, credential helper, de la machine) et ajoutez l'URL du dépôt comme d'habitude. La récupération des dépôts fonctionne avec n'importe quelle URL Git : aucun câblage propre au fournisseur n'est nécessaire.
diff --git a/apps/docs/content/docs/vcs-integration.ja.mdx b/apps/docs/content/docs/vcs-integration.ja.mdx
index e4dfd3d729..924e7b0348 100644
--- a/apps/docs/content/docs/vcs-integration.ja.mdx
+++ b/apps/docs/content/docs/vcs-integration.ja.mdx
@@ -4,17 +4,19 @@ description: ワークスペースごとにセルフホストの Forgejo、Gitea
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="warn">
-**セルフホスト版 Multica 専用です。** この連携は Multica を**自分でデプロイしている**場合のみ利用でき、Multica Cloud では提供されません。ここでの「セルフホスト」は **Multica 自体**のセルフホストを意味します。通常は独自ネットワーク内の Git インスタンスへアクセスするために使用します。サーバー運用者が `MULTICA_VCS_INTEGRATION_ENABLED=true` を設定して機能を有効にし、`MULTICA_VCS_SECRET_KEY` も設定する必要があります。それまでは、設定 → コードにこの行は表示されません。
+**セルフホスト版 Multica 専用です。** この連携は Multica を自分でデプロイしている場合のみ利用でき、Multica Cloud では提供されません。セルフホストするのは、通常は Multica から社内ネットワークの Git インスタンスにアクセスするためです。サーバー側で `MULTICA_VCS_INTEGRATION_ENABLED=true` を有効にし、`MULTICA_VCS_SECRET_KEY` を設定する必要があります。設定するまで、**設定 → コード** にこの行は表示されません。
</Callout>
-Multica はワークスペースごとにセルフホストの Git ホスティング、**Forgejo**、**Gitea**、**GitLab** のいずれかへ接続します。接続後、ブランチ名かタイトルにタスク番号(例: `MUL-123`)を含む Pull Request(GitLab では Merge Request)、または本文で終了キーワードの直後にタスク番号を置いた PR は、対応する[タスク](/issues)へ**自動的に紐づけられ**、タスクサイドバーの **Pull requests** に表示されます。タスクに紐づく PR がすべてマージされると、タスクはワークスペースが選んだステータス(既定は「完了」)へ移動します。head commit の CI はカード上のチェックバーとして表示されます。
+Multica はワークスペースごとにセルフホストの Git ホスティング、Forgejo、Gitea、GitLab のいずれかへ接続します。接続後、ブランチ名かタイトルにタスク番号(例: `MUL-123`)を含む Pull Request(GitLab では Merge Request)、または本文で終了キーワードの直後にタスク番号を置いた PR は、対応する[タスク](/issues)へ自動的に紐づけられ、タスクサイドバーの **Pull requests** に表示されます。タスクに紐づく PR がすべてマージされると、タスクはワークスペースが選んだステータス(既定は「完了」)へ移動します。head commit の CI はカード上のチェックバーとして表示されます。
-これらの Git ホスティングは GitHub と並行して利用でき、1 つのワークスペースで任意に組み合わせられます。
+これらの Git ホスティングは GitHub と並行して利用でき、1 つのワークスペースで複数を接続できます。
<Callout type="info">
-GitHub と異なり、これらの Git ホスティングには「App」モデルがありません。各ワークスペースが独自のインスタンス URL とアクセストークンを保存し、リポジトリまたは組織へ Webhook を登録します。トークンと Webhook secret はどちらも暗号化して保存されます。
+GitHub と異なり、これらの Git ホスティングには App モデルがありません。各ワークスペースが独自のインスタンス URL とアクセストークンを保存し、リポジトリまたは組織へ Webhook を登録します。トークンと Webhook secret はどちらも暗号化して保存されます。
</Callout>
## 前提条件(サーバー)
@@ -43,12 +45,23 @@ MULTICA_VCS_SECRET_KEY=<base64 32 バイト鍵>
## ワークスペースを接続
-1. Git ホスティング側で、リポジトリの読み取り権限を持つアクセストークンを作成します。
- - **Forgejo / Gitea**: 設定 → アプリケーション。
- - **GitLab**: `read_api` 権限を持つ個人(またはグループ/プロジェクト)アクセストークン。
-2. Multica で **設定 → コード**を開き、**セルフホスト Git** の行で **接続** をクリックします。
-3. **プロバイダー**を選択し、インスタンス URL(例: `https://forgejo.example.com`)とアクセストークンを入力して **接続**をクリックします。Multica は保存前に、そのトークンでインスタンスへアクセスして検証します。
-4. 接続後に表示される **Webhook URL** と **Webhook secret** をコピーします。
+<Steps>
+<Step>
+Git ホスティング側で、リポジトリの読み取り権限を持つアクセストークンを作成します。
+
+- **Forgejo / Gitea**: 設定 → アプリケーション。
+- **GitLab**: `read_api` 権限を持つ個人(またはグループ/プロジェクト)アクセストークン。
+</Step>
+<Step>
+Multica で **設定 → コード**を開き、**セルフホスト Git** の行で **接続** をクリックします。
+</Step>
+<Step>
+**プロバイダー**を選択し、インスタンス URL(例: `https://forgejo.example.com`)とアクセストークンを入力して **接続**をクリックします。Multica は保存前に、そのトークンでインスタンスへアクセスして検証します。
+</Step>
+<Step>
+接続後に表示される **Webhook URL** と **Webhook secret** をコピーします。
+</Step>
+</Steps>
<Callout type="warn">
Webhook secret は一度しか表示されません。ページを離れる前にコピーしてください。同じインスタンスへ再接続すると、トークンと secret がローテーションされます。
@@ -62,21 +75,30 @@ Webhook secret は一度しか表示されません。ページを離れる前
## Webhook を登録
-リポジトリ(または全リポジトリを対象にする組織/グループ)で設定します。
+リポジトリに登録します。すべてのリポジトリを対象にするには、組織またはグループに登録します。
-**Forgejo / Gitea** — 設定 → Webhook → Webhook を追加 → Forgejo/Gitea:
+<Tabs items={["Forgejo / Gitea", "GitLab"]}>
+<Tab value="Forgejo / Gitea" id="forgejo-gitea">
+
+設定 → Webhook → Webhook を追加 → Forgejo/Gitea:
- **送信先 URL**: 前の手順で取得した Webhook URL。
- **HTTP メソッド** `POST`、**コンテンツタイプ** `application/json`。
- **secret**: Webhook secret(`X-Gitea-Signature` HMAC の検証に使用)。
- **トリガーイベント**: **Pull Request** を選び、CI をミラーするには **Commit Status** も選択。
-**GitLab** — 設定 → Webhooks:
+</Tab>
+<Tab value="GitLab" id="gitlab">
+
+設定 → Webhooks:
- **URL**: Webhook URL。
- **Secret token**: Webhook secret(`X-Gitlab-Token` として送信され、文字列をそのまま比較)。
- **トリガー**: **Merge request events** を有効にし、CI をミラーするには **Pipeline events** も有効化。
+</Tab>
+</Tabs>
+
Multica は保存済みの secret で各 delivery を検証するため、一致する secret がない Webhook は拒否されます。
## ミラーされる内容
diff --git a/apps/docs/content/docs/vcs-integration.ko.mdx b/apps/docs/content/docs/vcs-integration.ko.mdx
index 462049e9c8..3d93851d85 100644
--- a/apps/docs/content/docs/vcs-integration.ko.mdx
+++ b/apps/docs/content/docs/vcs-integration.ko.mdx
@@ -4,17 +4,19 @@ description: 워크스페이스마다 자체 호스팅 Forgejo, Gitea, GitLab
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="warn">
-**자체 배포한 Multica에서만 사용할 수 있습니다.** 이 연동은 Multica를 **직접 배포해 운영할 때만** 제공되며 Multica Cloud에서는 사용할 수 없습니다. 여기서 "자체 호스팅"은 **Multica 자체를 배포하는 것**을 뜻합니다. 일반적으로 자체 네트워크의 Git 인스턴스에 접근하기 위해 사용합니다. 서버 운영자가 `MULTICA_VCS_INTEGRATION_ENABLED=true`로 기능을 켜고 `MULTICA_VCS_SECRET_KEY`도 설정해야 합니다. 그전에는 설정 → 코드에 이 행이 표시되지 않습니다.
+**자체 배포한 Multica에서만 사용할 수 있습니다.** 이 연동은 Multica를 직접 배포해 운영할 때만 제공되며 Multica Cloud에서는 사용할 수 없습니다. 자체 배포는 보통 Multica가 내부 네트워크의 Git 인스턴스에 접근하게 하려는 목적입니다. 서버에서 `MULTICA_VCS_INTEGRATION_ENABLED=true`를 켜고 `MULTICA_VCS_SECRET_KEY`를 설정해야 하며, 그전에는 **설정 → 코드**에 이 행이 표시되지 않습니다.
</Callout>
-Multica는 워크스페이스별로 자체 호스팅 Git 코드 호스팅인 **Forgejo**, **Gitea**, **GitLab** 중 하나에 연결합니다. 연결하면 브랜치 이름이나 제목에 태스크 번호(예: `MUL-123`)가 포함되거나 본문의 종료 키워드 뒤에 태스크 번호(`Closes MUL-123`)가 있는 Pull Request(GitLab에서는 Merge Request)가 해당 [태스크](/issues)에 **자동으로 연결**되고 태스크 사이드바의 **Pull requests**에 표시됩니다. 태스크에 연결된 PR이 모두 merge되면 태스크가 워크스페이스가 정한 상태(기본값 완료)로 이동합니다. head commit의 CI는 카드에 check bar로 표시됩니다.
+Multica는 워크스페이스별로 자체 호스팅 Git 코드 호스팅인 Forgejo, Gitea, GitLab 중 하나에 연결합니다. 연결하면 브랜치 이름이나 제목에 태스크 번호(예: `MUL-123`)가 포함되거나 본문의 종료 키워드 뒤에 태스크 번호(`Closes MUL-123`)가 있는 Pull Request(GitLab에서는 Merge Request)가 해당 [태스크](/issues)에 자동으로 연결되고 태스크 사이드바의 **Pull requests**에 표시됩니다. 태스크에 연결된 PR이 모두 merge되면 태스크가 워크스페이스가 정한 상태(기본값 완료)로 이동합니다. head commit의 CI는 카드에 check bar로 표시됩니다.
-이 코드 호스팅은 GitHub와 동시에 사용할 수 있으며 워크스페이스 하나에서 원하는 대로 조합할 수 있습니다.
+이 코드 호스팅은 GitHub와 함께 사용할 수 있으며, 워크스페이스 하나에 여러 개를 연결할 수 있습니다.
<Callout type="info">
-GitHub와 달리 이 코드 호스팅에는 "App" 모델이 없습니다. 워크스페이스마다 인스턴스 URL과 액세스 token을 저장하고 저장소 또는 조직에 Webhook을 등록합니다. Token과 Webhook secret은 모두 암호화되어 저장됩니다.
+GitHub와 달리 이 코드 호스팅에는 App 모델이 없습니다. 워크스페이스마다 인스턴스 URL과 액세스 token을 저장하고 저장소 또는 조직에 Webhook을 등록합니다. Token과 Webhook secret은 모두 암호화되어 저장됩니다.
</Callout>
## 사전 조건(서버)
@@ -43,12 +45,23 @@ MULTICA_VCS_SECRET_KEY=<base64 32바이트 키>
## 워크스페이스 연결
-1. Git 코드 호스팅에서 저장소 읽기 권한이 있는 액세스 token을 만듭니다.
- - **Forgejo / Gitea**: 설정 → 애플리케이션.
- - **GitLab**: `read_api` 권한이 있는 개인(또는 그룹/프로젝트) 액세스 token.
-2. Multica에서 **설정 → 코드**를 열고 **셀프 호스팅 Git** 행에서 **연결**을 클릭합니다.
-3. **제공자**를 선택하고 인스턴스 URL(예: `https://forgejo.example.com`)과 액세스 token을 입력한 뒤 **연결**을 클릭합니다. Multica는 저장하기 전에 해당 token으로 인스턴스에 접근해 검증합니다.
-4. 연결 후 표시되는 **Webhook URL**과 **Webhook secret**을 복사합니다.
+<Steps>
+<Step>
+Git 코드 호스팅에서 저장소 읽기 권한이 있는 액세스 token을 만듭니다.
+
+- **Forgejo / Gitea**: 설정 → 애플리케이션.
+- **GitLab**: `read_api` 권한이 있는 개인(또는 그룹/프로젝트) 액세스 token.
+</Step>
+<Step>
+Multica에서 **설정 → 코드**를 열고 **셀프 호스팅 Git** 행에서 **연결**을 클릭합니다.
+</Step>
+<Step>
+**제공자**를 선택하고 인스턴스 URL(예: `https://forgejo.example.com`)과 액세스 token을 입력한 뒤 **연결**을 클릭합니다. Multica는 저장하기 전에 해당 token으로 인스턴스에 접근해 검증합니다.
+</Step>
+<Step>
+연결 후 표시되는 **Webhook URL**과 **Webhook secret**을 복사합니다.
+</Step>
+</Steps>
<Callout type="warn">
Webhook secret은 한 번만 표시됩니다. 페이지를 떠나기 전에 복사하세요. 같은 인스턴스에 다시 연결하면 token과 secret이 교체됩니다.
@@ -62,21 +75,30 @@ Webhook secret은 한 번만 표시됩니다. 페이지를 떠나기 전에 복
## Webhook 등록
-저장소에서 설정합니다. 모든 저장소를 포함하려면 조직 또는 그룹에서 설정할 수도 있습니다.
+저장소에 등록합니다. 모든 저장소를 포함하려면 조직이나 그룹에 등록합니다.
-**Forgejo / Gitea** — 설정 → Webhook → Webhook 추가 → Forgejo/Gitea:
+<Tabs items={["Forgejo / Gitea", "GitLab"]}>
+<Tab value="Forgejo / Gitea" id="forgejo-gitea">
+
+설정 → Webhook → Webhook 추가 → Forgejo/Gitea:
- **대상 URL**: 이전 단계의 Webhook URL.
- **HTTP 메서드** `POST`, **콘텐츠 유형** `application/json`.
- **secret**: Webhook secret(`X-Gitea-Signature` HMAC 검증에 사용).
- **트리거 이벤트**: **Pull Request**를 선택하고 CI를 미러링하려면 **Commit Status**도 선택합니다.
-**GitLab** — 설정 → Webhooks:
+</Tab>
+<Tab value="GitLab" id="gitlab">
+
+설정 → Webhooks:
- **URL**: Webhook URL.
- **Secret token**: Webhook secret(`X-Gitlab-Token`으로 전송되고 문자열 그대로 비교).
- **트리거**: **Merge request events**를 활성화하고 CI를 미러링하려면 **Pipeline events**도 활성화합니다.
+</Tab>
+</Tabs>
+
Multica는 저장된 secret으로 모든 delivery를 검증하므로 일치하는 secret이 없는 Webhook은 거부됩니다.
## 미러링되는 내용
diff --git a/apps/docs/content/docs/vcs-integration.mdx b/apps/docs/content/docs/vcs-integration.mdx
index 5635d75c4d..d5a9b630e5 100644
--- a/apps/docs/content/docs/vcs-integration.mdx
+++ b/apps/docs/content/docs/vcs-integration.mdx
@@ -4,22 +4,19 @@ description: Connect a self-hosted Forgejo, Gitea, or GitLab instance per worksp
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="warn">
-**Self-hosted Multica only.** This integration is available only when you run
-Multica yourself; it is not offered on Multica Cloud. "Self-hosted" here means
-**Multica** is self-hosted — typically so it can reach a Git instance on your own
-network. A server operator must enable it (`MULTICA_VCS_INTEGRATION_ENABLED=true`)
-and set `MULTICA_VCS_SECRET_KEY`; until then the section does not appear in
-Settings → Code.
+**Self-hosted Multica only.** This integration is available only when you run Multica yourself; it is not offered on Multica Cloud. You usually self-host Multica so it can reach a Git instance on your own network. The server must enable `MULTICA_VCS_INTEGRATION_ENABLED=true` and set `MULTICA_VCS_SECRET_KEY`; otherwise the row does not appear in **Settings → Code**.
</Callout>
-Multica connects to a self-hosted Git provider per workspace: **Forgejo**, **Gitea**, or **GitLab**. Once connected, any pull request (GitLab: merge request) whose branch name or title contains an issue identifier (for example `MUL-123`), or whose body names one after a closing keyword (`Closes MUL-123`), is **auto-linked** to that [issue](/issues) and appears under **Pull requests** in the issue sidebar. When every PR linked to the issue is merged, the issue moves to the status the workspace chose (**Done** by default). CI for the head commit shows as a checks bar on the card.
+Multica connects to a self-hosted Git provider per workspace: Forgejo, Gitea, or GitLab. Once connected, any pull request (GitLab: merge request) whose branch name or title contains an issue identifier (for example `MUL-123`), or whose body names one after a closing keyword (`Closes MUL-123`), is auto-linked to that [issue](/issues) and appears under **Pull requests** in the issue sidebar. When every PR linked to the issue is merged, the issue moves to the status the workspace chose (**Done** by default). CI for the head commit shows as a checks bar on the card.
-These providers run alongside GitHub: a workspace can use any combination.
+These providers run alongside GitHub, and a workspace can connect several of them.
<Callout type="info">
-Unlike GitHub, these providers have no "App" model. Each workspace stores its own instance URL plus an access token, and registers a webhook on its repository or organisation. The token and webhook secret are encrypted at rest.
+Unlike GitHub, these providers have no App model. Each workspace stores its own instance URL plus an access token, and registers a webhook on its repository or organisation. The token and webhook secret are encrypted at rest.
</Callout>
## Prerequisites (server)
@@ -30,7 +27,7 @@ Turn the integration on for this deployment. It is off by default, so the sectio
MULTICA_VCS_INTEGRATION_ENABLED=true
```
-The official self-hosted `docker compose` file (`docker-compose.selfhost.yml`) sets this for you.
+The official self-hosted `docker compose` file (`docker-compose.selfhost.yml`) already sets it.
Then set a base64-encoded 32-byte key so the server can encrypt stored credentials. Without it, the connect form is disabled.
@@ -48,12 +45,23 @@ Set `MULTICA_PUBLIC_URL` to the server's public base URL so Multica can show a r
## Connect a workspace
-1. Create an access token in your provider with read access to the repositories you want mirrored:
- - **Forgejo / Gitea**: Settings → Applications.
- - **GitLab**: a personal (or group/project) access token with the `read_api` scope.
-2. In Multica, open **Settings → Code**, then click **Connect** in the **Self-hosted Git** row.
-3. Choose the **provider**, enter the instance URL (for example `https://forgejo.example.com`) and the access token, then **Connect**. Multica validates the token against the instance before saving.
-4. Copy the **webhook URL** and **webhook secret** shown after connecting.
+<Steps>
+<Step>
+Create an access token in your provider with read access to the repositories you want mirrored:
+
+- **Forgejo / Gitea**: Settings → Applications.
+- **GitLab**: a personal (or group/project) access token with the `read_api` scope.
+</Step>
+<Step>
+In Multica, open **Settings → Code**, then click **Connect** in the **Self-hosted Git** row.
+</Step>
+<Step>
+Choose the **provider**, enter the instance URL (for example `https://forgejo.example.com`) and the access token, then **Connect**. Multica validates the token against the instance before saving.
+</Step>
+<Step>
+Copy the **webhook URL** and **webhook secret** shown after connecting.
+</Step>
+</Steps>
<Callout type="warn">
The webhook secret is shown only once. Copy it before leaving the page. Reconnecting the same instance rotates the token and secret.
@@ -67,29 +75,38 @@ Multica has no option to skip certificate verification, because the connect requ
## Register the webhook
-On the repository (or organisation/group, to cover every repo):
+Register it on the repository, or on the organisation or group to cover every repository.
-**Forgejo / Gitea** — Settings → Webhooks → Add Webhook → Forgejo/Gitea:
+<Tabs items={["Forgejo / Gitea", "GitLab"]}>
+<Tab value="Forgejo / Gitea" id="forgejo-gitea">
+
+Settings → Webhooks → Add Webhook → Forgejo/Gitea:
- **Target URL**: the webhook URL from the previous step.
- **HTTP method** `POST`, **content type** `application/json`.
- **Secret**: the webhook secret (used to verify the `X-Gitea-Signature` HMAC).
- **Trigger events**: select **Pull Request**, and **Commit Status** to mirror CI.
-**GitLab** — Settings → Webhooks:
+</Tab>
+<Tab value="GitLab" id="gitlab">
+
+Settings → Webhooks:
- **URL**: the webhook URL.
- **Secret token**: the webhook secret (sent as `X-Gitlab-Token` and compared verbatim).
- **Triggers**: enable **Merge request events**, and **Pipeline events** to mirror CI.
+</Tab>
+</Tabs>
+
Multica authenticates every delivery against the stored secret, so a webhook without the matching secret is rejected.
## What gets mirrored
-- **Pull / merge requests** — open, closed, merged, and draft state, author, branch, and (where the provider supplies them) diff stats.
-- **Issue links** — an identifier in the title or branch links the PR to the issue, as does an identifier after a closing keyword in the body; a bare mention in the body links nothing. Once every PR linked to the issue is merged — across GitHub and self-hosted providers — the issue moves to the status the workspace chose, under the same setting and rules as [GitHub](/github-integration#when-merged-prs-move-an-issue). This page shows the same **After PRs merge, move the issue to** setting once a provider is connected.
-- **CI** — Forgejo/Gitea commit statuses and GitLab pipelines aggregate into a passed/failed/pending checks bar for the head commit.
+- **Pull / merge requests**: open, closed, merged, and draft state, author, branch, and (where the provider supplies them) diff stats.
+- **Issue links**: an identifier in the title or branch links the PR to the issue, as does an identifier after a closing keyword in the body; a bare mention in the body links nothing. Once every PR linked to the issue is merged, across GitHub and self-hosted providers, the issue moves to the status the workspace chose, under the same setting and rules as [GitHub](/github-integration#when-merged-prs-move-an-issue). This page shows the same **After PRs merge, move the issue to** setting once a provider is connected.
+- **CI**: Forgejo/Gitea commit statuses and GitLab pipelines aggregate into a passed/failed/pending checks bar for the head commit.
## Agents opening pull requests
-Creating PRs needs no provider configuration in Multica. Agents check out repositories in the runtime and push branches and open PRs using the runtime host's own Git credentials. To let agents work against a provider, ensure the daemon host can authenticate to it — for example an SSH deploy key, or a token in the host's Git credential helper — and add the repository URL as usual. Repository checkout works with any Git URL, so no provider-specific wiring is required.
+Agents need no provider configuration in Multica to open PRs. They check out repositories in the runtime and push branches and open PRs using the runtime host's own Git credentials. To let agents work against a provider, ensure the daemon host can authenticate to it (for example with an SSH deploy key, or a token in the host's Git credential helper) and add the repository URL as usual. Repository checkout works with any Git URL, so no provider-specific wiring is required.
diff --git a/apps/docs/content/docs/vcs-integration.zh.mdx b/apps/docs/content/docs/vcs-integration.zh.mdx
index 3c01e8e04e..7e05f02635 100644
--- a/apps/docs/content/docs/vcs-integration.zh.mdx
+++ b/apps/docs/content/docs/vcs-integration.zh.mdx
@@ -4,17 +4,19 @@ description: 为每个工作区连接自托管的 Forgejo、Gitea 或 GitLab 实
---
import { Callout } from "fumadocs-ui/components/callout";
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Callout type="warn">
-**仅适用于自部署的 Multica。** 此集成只在你**自己部署 Multica** 时可用,Multica 云端不提供。这里的「自托管」指的是 **Multica 本身自部署**——通常是为了让它能访问你自己网络内的 Git 实例。需要服务端运维开启(`MULTICA_VCS_INTEGRATION_ENABLED=true`)并设置 `MULTICA_VCS_SECRET_KEY`;在此之前,设置 → 代码里不会出现该行。
+**仅适用于自部署的 Multica。** 此集成只在你自己部署 Multica 时可用,Multica 云端不提供;自部署通常是为了让 Multica 能访问你内网里的 Git 实例。服务端需要开启 `MULTICA_VCS_INTEGRATION_ENABLED=true` 并设置 `MULTICA_VCS_SECRET_KEY`,否则 **设置 → 代码** 里不会出现这一行。
</Callout>
-Multica 按工作区连接自托管的 Git 代码托管:**Forgejo**、**Gitea** 或 **GitLab**。连接后,任何在分支名或标题中包含任务编号(例如 `MUL-123`)、或在正文的关闭关键字后写出该编号(`Closes MUL-123`)的 Pull Request(GitLab 为 Merge Request)都会**自动关联**到对应的 [任务](/issues),出现在任务侧栏的 **Pull requests** 中;任务的所有关联 PR 都合并后,任务会改为工作区选定的状态(默认「完成」)。head commit 的 CI 会以检查条的形式显示在卡片上。
+Multica 按工作区连接自托管的 Git 代码托管:Forgejo、Gitea 或 GitLab。连接后,分支名或标题中包含任务编号(例如 `MUL-123`)、或正文中在关闭关键字后写出该编号(`Closes MUL-123`)的 Pull Request(GitLab 为 Merge Request)会自动关联到对应的[任务](/issues),出现在任务侧栏的 **Pull requests** 中。任务的所有关联 PR 都合并后,任务改为工作区选定的状态(默认为"已完成")。head commit 的 CI 以检查条的形式显示在卡片上。
-这些代码托管与 GitHub 并行工作:一个工作区可任意组合使用。
+这些代码托管与 GitHub 并行工作,一个工作区可以同时连接多个。
<Callout type="info">
-与 GitHub 不同,这些代码托管没有「App」模型。每个工作区保存自己的实例地址和访问令牌,并在其仓库或组织上注册 Webhook。令牌和 Webhook 密钥均加密存储。
+与 GitHub 不同,这些代码托管没有 App 模型。每个工作区保存自己的实例地址和访问令牌,并在其仓库或组织上注册 Webhook。令牌和 Webhook 密钥均加密存储。
</Callout>
## 前置条件(服务端)
@@ -25,7 +27,7 @@ Multica 按工作区连接自托管的 Git 代码托管:**Forgejo**、**Gitea*
MULTICA_VCS_INTEGRATION_ENABLED=true
```
-官方自部署 `docker compose` 文件(`docker-compose.selfhost.yml`)已为你设置好。
+官方自部署 `docker compose` 文件(`docker-compose.selfhost.yml`)已经设置了这一项。
再设置一个 base64 编码的 32 字节密钥,供服务端加密存储的凭据。未设置时,连接表单将不可用。
@@ -43,12 +45,23 @@ MULTICA_VCS_SECRET_KEY=<base64 32 字节密钥>
## 连接工作区
-1. 在代码托管中创建具备仓库读取权限的访问令牌:
- - **Forgejo / Gitea**:设置 → 应用。
- - **GitLab**:具备 `read_api` 权限的个人(或群组/项目)访问令牌。
-2. 在 Multica 中打开 **设置 → 代码**,在 **自托管 Git** 一行点击 **连接**。
-3. 选择**提供方**,填写实例地址(例如 `https://forgejo.example.com`)和访问令牌,点击 **连接**。Multica 会先用该令牌访问实例进行校验,再保存。
-4. 复制连接后显示的 **Webhook 地址** 与 **Webhook 密钥**。
+<Steps>
+<Step>
+在代码托管中创建具备仓库读取权限的访问令牌:
+
+- **Forgejo / Gitea**:设置 → 应用。
+- **GitLab**:具备 `read_api` 权限的个人(或群组/项目)访问令牌。
+</Step>
+<Step>
+在 Multica 中打开 **设置 → 代码**,在 **自托管 Git** 一行点击 **连接**。
+</Step>
+<Step>
+选择**提供方**,填写实例地址(例如 `https://forgejo.example.com`)和访问令牌,点击 **连接**。Multica 会先用该令牌访问实例进行校验,再保存。
+</Step>
+<Step>
+复制连接后显示的 **Webhook 地址** 与 **Webhook 密钥**。
+</Step>
+</Steps>
<Callout type="warn">
Webhook 密钥只显示一次,请在离开页面前复制。重新连接同一实例会轮换令牌与密钥。
@@ -62,21 +75,30 @@ Multica 不提供跳过证书校验的选项,因为连接请求会携带你的
## 注册 Webhook
-在仓库(或组织/群组,以覆盖所有仓库):
+在仓库上注册;要覆盖所有仓库,就注册在组织或群组上。
-**Forgejo / Gitea** —— 设置 → Webhook → 添加 Webhook → Forgejo/Gitea:
+<Tabs items={["Forgejo / Gitea", "GitLab"]}>
+<Tab value="Forgejo / Gitea" id="forgejo-gitea">
+
+设置 → Webhook → 添加 Webhook → Forgejo/Gitea:
- **目标 URL**:上一步的 Webhook 地址。
- **HTTP 方法** `POST`,**内容类型** `application/json`。
- **密钥**:Webhook 密钥(用于校验 `X-Gitea-Signature` HMAC)。
- **触发事件**:勾选 **Pull Request**,并勾选 **Commit Status** 以镜像 CI。
-**GitLab** —— 设置 → Webhooks:
+</Tab>
+<Tab value="GitLab" id="gitlab">
+
+设置 → Webhooks:
- **URL**:Webhook 地址。
- **Secret token**:Webhook 密钥(作为 `X-Gitlab-Token` 发送并逐字比对)。
- **触发器**:启用 **Merge request events**,并启用 **Pipeline events** 以镜像 CI。
+</Tab>
+</Tabs>
+
Multica 会用存储的密钥校验每次投递,因此没有匹配密钥的 Webhook 会被拒绝。
## 镜像的内容
@@ -87,4 +109,4 @@ Multica 会用存储的密钥校验每次投递,因此没有匹配密钥的 We
## 智能体创建 Pull Request
-创建 PR 无需在 Multica 中进行任何代码托管配置。智能体在运行时中检出仓库,并使用运行时主机自身的 Git 凭据推送分支和创建 PR。要让智能体在某个代码托管上工作,确保 daemon 主机能对其完成认证即可——例如 SSH 部署密钥,或主机 Git 凭据助手中的令牌——再像往常一样添加仓库地址。仓库检出支持任意 Git URL,因此无需提供方专属配置。
+智能体创建 PR 不需要在 Multica 中做任何代码托管配置。智能体在运行时中检出仓库,用运行时主机自己的 Git 凭据推送分支和创建 PR。要让智能体在某个代码托管上工作,只要守护进程所在的主机能通过它的认证(例如 SSH 部署密钥,或主机 Git 凭据助手里的令牌),再像往常一样添加仓库地址。仓库检出支持任意 Git URL,不需要按提供方单独配置。
diff --git a/apps/docs/content/docs/workflows.fr.mdx b/apps/docs/content/docs/workflows.fr.mdx
index a222fd34e2..00fa5339b0 100644
--- a/apps/docs/content/docs/workflows.fr.mdx
+++ b/apps/docs/content/docs/workflows.fr.mdx
@@ -3,7 +3,10 @@ title: Workflows
description: Définissez les étapes des tâches d’un projet et qui prend le relais à chaque étape.
---
-Un workflow donne aux tâches d’un projet un parcours commun. Choisissez les étapes, la personne ou l’agent qui s’en charge et le travail à effectuer.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WorkflowDemo } from "@/components/demos/workflow-demo";
+
+Un workflow fixe les étapes que suivent les tâches d’un projet, qui s’occupe de chacune et ce qu’il faut y faire.
Par exemple, un workflow de livraison peut suivre ce parcours :
@@ -15,17 +18,39 @@ Par exemple, un workflow de livraison peut suivre ce parcours :
Passer une tâche en revue la confie à l’agent de revue. La description, les échanges et les résultats précédents restent dans la même tâche pour que le prochain responsable puisse prendre la suite.
-C’est la structure du modèle **Livraison**. Les projets sans workflow choisi utilisent **Default** : tous les statuts sont disponibles et rien n’est confié automatiquement, comme auparavant.
+Le modèle **Livraison** suit exactement cette structure. Les projets sans workflow choisi utilisent **Default** : tous les statuts sont disponibles et rien n’est confié automatiquement, comme auparavant.
## Créer un workflow
Un `owner` ou un `admin` de l’espace de travail peut créer des workflows dans l’application web ou de bureau :
-1. Ouvrez **Paramètres → Workflows**, puis **Nouveau workflow**. Partez de zéro ou utilisez le modèle **Livraison**, **Contenu** ou **Communauté**.
-2. Nommez le workflow et choisissez ses colonnes de statut. Faites glisser les colonnes du milieu dans l’ordre souhaité.
-3. Sélectionnez une colonne et décidez de garder le responsable ou de confier la tâche à un agent ou à un membre. Le sélecteur de membres propose aussi le responsable du projet.
-4. Pour une étape confiée à un agent, écrivez ce qu’il doit faire. Choisissez l’étape suivante une fois le travail terminé (la colonne suivante si vous ne choisissez rien) et l’étape de retour si l’étape rejette le travail reçu et qu’il doit être repris. Si l’étape ne peut pas continuer pour une raison extérieure, utilisez **Blocked** plutôt que le retour.
-5. Prévisualisez les consignes que l’agent recevra, puis enregistrez.
+<Steps>
+<Step>
+
+Ouvrez **Paramètres → Workflows**, puis **Nouveau workflow**. Partez de zéro ou utilisez le modèle **Livraison**, **Contenu** ou **Communauté**.
+
+</Step>
+<Step>
+
+Nommez le workflow et choisissez ses colonnes de statut. Faites glisser les colonnes du milieu dans l’ordre souhaité.
+
+</Step>
+<Step>
+
+Sélectionnez une colonne et choisissez ce qui se passe quand une tâche y entre : **Pas de relais**, **Confier à un agent** ou **Confier à un membre**. La liste des membres propose aussi **Responsable du projet**.
+
+</Step>
+<Step>
+
+Pour une étape confiée à un agent, écrivez ce qu’il doit faire, puis choisissez **Une fois terminé, passer à** (la colonne suivante si vous ne choisissez rien) et **En cas de rejet, renvoyer à** (quand cette étape juge le travail reçu insuffisant et qu’il doit être repris). Si l’étape ne peut pas continuer pour une raison extérieure, utilisez **Blocked** plutôt que le renvoi.
+
+</Step>
+<Step>
+
+Prévisualisez les consignes que l’agent recevra, puis enregistrez.
+
+</Step>
+</Steps>
Si vous avez ajouté un nouveau statut, enregistrez d’abord le workflow avant de configurer son passage de relais.
@@ -43,11 +68,13 @@ Le tableau du projet suit désormais les colonnes du workflow. Chaque tâche pro
Changez le statut d’une tâche ou faites glisser sa carte vers une autre colonne. Si cette étape prévoit un passage de relais, vérifiez le destinataire et, pour un agent, les consignes qu’il recevra.
+<WorkflowDemo />
+
Si vous créez une tâche dans un projet sans choisir de responsable et que son statut prévoit un passage de relais, elle est confiée directement au responsable de cette étape ; un agent commence aussitôt. La fenêtre de création indique à qui elle sera confiée. Pour la créer sans rien lancer, placez-la dans Backlog.
-Si l’agent précédent a encore une exécution en cours ou en attente, la confirmation permet de l’arrêter ou de l’annuler. Cette option est sélectionnée par défaut. Gardez-la, sauf si vous voulez que les deux agents continuent à travailler. Les commentaires publiés et le travail déjà enregistré sont conservés.
+Si le responsable précédent est un agent dont l’exécution est encore en cours ou en attente, la confirmation propose en plus de l’arrêter ou de l’annuler, option cochée par défaut. Laissez-la cochée, sauf si vous voulez que les deux agents travaillent en même temps ; ses commentaires publiés et le travail déjà enregistré sont conservés.
-Les choix d’étape suivante et de retour indiquent à l’agent où déplacer la tâche. La fin d’une exécution ne fait pas avancer la tâche à elle seule : le membre ou l’agent responsable met à jour son statut.
+**Une fois terminé, passer à** et **En cas de rejet, renvoyer à** indiquent à l’agent où déplacer la tâche ensuite. La fin d’une exécution ne fait pas avancer la tâche à elle seule : c’est le membre ou l’agent responsable de l’étape qui met à jour son statut. Quand un agent fait entrer la tâche dans l’étape suivante, le passage de relais de cette étape se déclenche de la même façon.
Le passage de relais et ses consignes restent dans l’historique de la tâche. Le menu du workflow sur le tableau du projet permet d’afficher le parcours complet.
diff --git a/apps/docs/content/docs/workflows.ja.mdx b/apps/docs/content/docs/workflows.ja.mdx
index a35e3f04a0..978d8580d6 100644
--- a/apps/docs/content/docs/workflows.ja.mdx
+++ b/apps/docs/content/docs/workflows.ja.mdx
@@ -3,7 +3,10 @@ title: ワークフロー
description: プロジェクトのタスクが進むステップと、各ステップを引き継ぐ相手を決めます。
---
-ワークフローは、プロジェクトの仕事を同じ手順で進めるためのものです。タスクが通るステップ、各ステップの担当者、そこで行うことを決めます。
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WorkflowDemo } from "@/components/demos/workflow-demo";
+
+ワークフローは、プロジェクトのタスクが通るステップ、各ステップの担当者、そこで行うことを決めます。
たとえば、開発の流れを次のように組めます。
@@ -15,17 +18,39 @@ description: プロジェクトのタスクが進むステップと、各ステ
タスクをレビューに移すと、レビューエージェントに引き継がれます。説明、議論、それまでの成果は同じタスクに残るので、次の担当者は続きから取り組めます。
-これは**開発デリバリー**テンプレートと同じ構成です。ワークフローを選んでいないプロジェクトは **Default** を使います。すべてのステータスを使え、自動の引き継ぎもなく、これまでどおりです。
+**開発デリバリー**テンプレートはこの構成です。ワークフローを選んでいないプロジェクトは **Default** を使います。すべてのステータスを使え、自動の引き継ぎもなく、これまでどおりです。
## ワークフローを作る
ワークスペースの `owner` または `admin` が、Web またはデスクトップアプリで作成できます。
-1. **設定 → ワークフロー**で**新規ワークフロー**を選びます。空白から始めるか、**開発デリバリー**、**コンテンツ制作**、**コミュニティ運営**のテンプレートを使えます。
-2. 名前を付けて、必要なステータスの列を選びます。中央の列はドラッグで並べ替えられます。
-3. 列を選び、タスクが入ったときに引き継がないか、エージェントまたはメンバーに渡すかを決めます。メンバーの選択肢からプロジェクトのリードも選べます。
-4. エージェントに渡すステップでは、行うことを書きます。完了後の移動先(未設定なら次の列)と、受け取った作業を差し戻してやり直してもらうときの戻り先も選びます。外部の理由で進められないときは、差し戻しではなく **Blocked** を使います。
-5. エージェントが受け取る説明をプレビューして、保存します。
+<Steps>
+<Step>
+
+**設定 → ワークフロー**で**新規ワークフロー**を選びます。空白から始めるか、**開発デリバリー**、**コンテンツ制作**、**コミュニティ運営**のテンプレートを使えます。
+
+</Step>
+<Step>
+
+名前を付けて、必要なステータスの列を選びます。中央の列はドラッグで並べ替えられます。
+
+</Step>
+<Step>
+
+列を選び、タスクが入ったときの動作を**引き継がない**、**エージェントに渡す**、**メンバーに渡す**から選びます。メンバーの一覧からは**プロジェクトリード**も選べます。
+
+</Step>
+<Step>
+
+エージェントに渡す場合は、このステップで行うことを書き、**完了したら移動**する先(未設定なら次の列)と**差し戻す先**(受け取った作業が不十分でやり直しが必要なときに使います)を選びます。外部の理由で進められないときは、差し戻しではなく **Blocked** を使います。
+
+</Step>
+<Step>
+
+エージェントが受け取る説明をプレビューして、保存します。
+
+</Step>
+</Steps>
新しいステータスを追加した場合は、一度保存してからそのステータスの引き継ぎを設定します。
@@ -43,11 +68,13 @@ description: プロジェクトのタスクが進むステップと、各ステ
タスクのステータスを変えるか、カードを別の列へドラッグします。引き継ぎのあるステップでは、相手を確認します。エージェントの場合は、受け取る説明も確認できます。
-プロジェクトで担当者を選ばずにタスクを作成し、そのステータスに引き継ぎがある場合、タスクはそのステップの担当者に直接渡ります。エージェントならすぐに作業を始めます。作成画面に引き継ぎ先が表示されます。まだ何も始めたくない場合は Backlog に作成します。
+<WorkflowDemo />
+
+プロジェクトで担当者を選ばずにタスクを作成し、そのステータスに引き継ぎがある場合、タスクはそのステップの担当者に直接渡ります。エージェントならすぐに作業を始めます。作成画面には「作成後に…に引き継ぎます」と引き継ぎ先が表示されます。まだ何も始めたくない場合は Backlog に作成します。
-前のエージェントがまだ実行中、または開始待ちの場合、確認画面で停止やキャンセルを選べます。最初から選択されているので、両方に作業を続けてほしい場合以外はそのままにします。公開済みのコメントと保存済みの作業は残ります。
+前の担当者がエージェントで、まだ実行中または開始待ちの場合は、確認画面にそれを停止またはキャンセルする選択肢が加わり、最初から選択されています。2 つのエージェントに同時に作業させたい場合以外はそのままで構いません。そのエージェントが投稿したコメントと保存済みの作業は残ります。
-完了後の移動先と修正時の戻り先は、エージェントへの指示になります。実行が終わっただけではタスクは次に進みません。そのステップの担当者やエージェントがステータスを更新します。
+「完了したら移動」と「差し戻す先」は、次にタスクをどこへ移すかをエージェントに伝えます。実行が終わっただけではタスクは次に進まず、そのステップを担当するメンバーやエージェントがステータスを更新します。エージェントがタスクを次のステップに移した場合も、そのステップの引き継ぎが同じように行われます。
引き継ぎとその説明はタスクのタイムラインに残ります。プロジェクトのボードにあるワークフローメニューから、流れ全体を確認できます。
diff --git a/apps/docs/content/docs/workflows.ko.mdx b/apps/docs/content/docs/workflows.ko.mdx
index 1c60142641..e4a84ffa73 100644
--- a/apps/docs/content/docs/workflows.ko.mdx
+++ b/apps/docs/content/docs/workflows.ko.mdx
@@ -3,7 +3,10 @@ title: 워크플로
description: 프로젝트 태스크가 거칠 단계와 각 단계를 이어받을 담당자를 정합니다.
---
-워크플로는 프로젝트의 일을 같은 절차로 진행하게 해 줍니다. 태스크가 거칠 단계, 각 단계의 담당자, 해야 할 일을 정할 수 있습니다.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WorkflowDemo } from "@/components/demos/workflow-demo";
+
+워크플로는 프로젝트의 태스크가 거칠 단계, 각 단계를 처리할 사람, 해야 할 일을 정합니다.
예를 들어 개발 작업을 다음과 같이 구성할 수 있습니다.
@@ -15,17 +18,39 @@ description: 프로젝트 태스크가 거칠 단계와 각 단계를 이어받
태스크를 리뷰 단계로 옮기면 리뷰 에이전트가 이어받습니다. 설명, 논의, 이전 결과는 같은 태스크에 남아 다음 담당자가 이어서 일할 수 있습니다.
-이는 **개발 딜리버리** 템플릿과 같은 구성입니다. 워크플로를 선택하지 않은 프로젝트는 **Default**를 사용합니다. 모든 상태를 쓸 수 있고 자동 인계도 없어 이전과 똑같이 동작합니다.
+**개발 딜리버리** 템플릿이 바로 이 구성입니다. 워크플로를 선택하지 않은 프로젝트는 **Default**를 사용합니다. 모든 상태를 쓸 수 있고 자동 인계도 없어 이전과 똑같이 동작합니다.
## 워크플로 만들기
워크스페이스의 `owner` 또는 `admin`이 웹이나 데스크톱 앱에서 만들 수 있습니다.
-1. **설정 → 워크플로**에서 **새 워크플로**를 선택합니다. 빈 상태로 시작하거나 **개발 딜리버리**, **콘텐츠 제작**, **커뮤니티 운영** 템플릿을 사용할 수 있습니다.
-2. 이름을 정하고 필요한 상태 열을 선택합니다. 가운데 열은 드래그해 순서를 바꿉니다.
-3. 열을 선택하고 태스크가 들어올 때 인계하지 않을지, 에이전트 또는 멤버에게 넘길지 정합니다. 멤버 목록에서 프로젝트 리드도 선택할 수 있습니다.
-4. 에이전트 단계에서는 할 일을 적고, 완료 후 이동할 단계(지정하지 않으면 다음 열)와 받은 작업을 반려해 다시 해야 할 때 되돌릴 단계를 선택합니다. 외부 사정으로 진행할 수 없을 때는 되돌리기 대신 **Blocked**를 씁니다.
-5. 에이전트가 받을 설명을 미리 보고 저장합니다.
+<Steps>
+<Step>
+
+**설정 → 워크플로**에서 **새 워크플로**를 선택합니다. 빈 상태로 시작하거나 **개발 딜리버리**, **콘텐츠 제작**, **커뮤니티 운영** 템플릿을 사용할 수 있습니다.
+
+</Step>
+<Step>
+
+이름을 정하고 필요한 상태 열을 선택합니다. 가운데 열은 드래그해 순서를 바꿉니다.
+
+</Step>
+<Step>
+
+열을 선택하고 태스크가 들어올 때 **넘기지 않음**, **에이전트에게 넘기기**, **멤버에게 넘기기** 중 하나를 정합니다. 멤버 목록에서 **프로젝트 리드**도 선택할 수 있습니다.
+
+</Step>
+<Step>
+
+에이전트에게 넘긴다면 이 단계에서 할 일을 적고, **완료 후 이동**할 단계(지정하지 않으면 다음 열)와 **반려 시 되돌릴 단계**(받은 작업이 기준에 못 미쳐 다시 해야 할 때 사용)를 선택합니다. 외부 사정으로 진행할 수 없을 때는 되돌리기 대신 **Blocked**를 씁니다.
+
+</Step>
+<Step>
+
+에이전트가 받을 설명을 미리 보고 저장합니다.
+
+</Step>
+</Steps>
새 상태를 추가했다면 워크플로를 먼저 저장한 뒤 그 상태의 인계를 설정합니다.
@@ -43,11 +68,13 @@ description: 프로젝트 태스크가 거칠 단계와 각 단계를 이어받
태스크의 상태를 바꾸거나 카드를 다른 열로 드래그합니다. 인계가 있는 단계라면 받을 사람을 확인합니다. 에이전트라면 받을 설명도 확인할 수 있습니다.
-프로젝트에서 담당자를 고르지 않고 태스크를 만들었는데 그 상태에 인계가 설정되어 있으면, 태스크는 해당 단계의 담당자에게 바로 넘어갑니다. 에이전트라면 즉시 작업을 시작합니다. 생성 창에 누구에게 인계되는지 표시됩니다. 아직 아무것도 시작하지 않으려면 Backlog에 만드세요.
+<WorkflowDemo />
+
+프로젝트에서 담당자를 고르지 않고 태스크를 만들었는데 그 상태에 인계가 설정되어 있으면, 태스크는 해당 단계의 담당자에게 바로 넘어갑니다. 에이전트라면 즉시 작업을 시작합니다. 생성 창에 "생성 후 ○○에게 인계됩니다"라고 표시됩니다. 아직 아무것도 시작하지 않으려면 Backlog에 만드세요.
-이전 에이전트가 아직 실행 중이거나 시작을 기다리고 있다면 확인 창에서 중지하거나 취소할 수 있습니다. 기본으로 선택되어 있으므로 둘 다 계속 작업하기를 원하는 경우가 아니면 그대로 둡니다. 이미 게시한 댓글과 저장한 작업은 유지됩니다.
+이전 담당자가 에이전트이고 아직 실행 중이거나 시작을 기다리고 있다면, 확인 창에 그 실행을 중지하거나 취소하는 옵션이 추가되며 기본으로 선택되어 있습니다. 두 에이전트가 함께 작업하기를 원하는 경우가 아니면 그대로 두세요. 그 에이전트가 이미 게시한 댓글과 저장한 작업은 사라지지 않습니다.
-완료 후 이동할 단계와 수정 시 돌아갈 단계는 에이전트에게 전달되는 지침입니다. 실행이 끝났다고 태스크가 저절로 다음 단계로 넘어가지는 않습니다. 해당 단계의 멤버나 에이전트가 상태를 바꿉니다.
+**완료 후 이동**과 **반려 시 되돌릴 단계**는 에이전트에게 태스크를 다음에 어디로 옮길지 알려 줍니다. 실행이 끝났다고 태스크가 저절로 다음 단계로 넘어가지는 않으며, 해당 단계의 멤버나 에이전트가 상태를 바꿉니다. 에이전트가 태스크를 다음 단계로 옮길 때도 그 단계의 인계가 똑같이 일어납니다.
인계 내역과 설명은 태스크 타임라인에 남습니다. 프로젝트 보드의 워크플로 메뉴에서 전체 흐름을 볼 수 있습니다.
diff --git a/apps/docs/content/docs/workflows.mdx b/apps/docs/content/docs/workflows.mdx
index 7c6190a786..65dcce823b 100644
--- a/apps/docs/content/docs/workflows.mdx
+++ b/apps/docs/content/docs/workflows.mdx
@@ -3,7 +3,10 @@ title: Workflows
description: Set the steps a project's issues follow and who takes over at each step.
---
-A workflow gives a project a repeatable way to finish work. Choose the steps an issue goes through, who handles each step, and what they should do.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WorkflowDemo } from "@/components/demos/workflow-demo";
+
+A workflow sets the steps a project's issues go through, who handles each step, and what they should do.
For example, a delivery workflow could look like this:
@@ -15,17 +18,39 @@ For example, a delivery workflow could look like this:
Moving an issue into Review hands it to the review agent. The description, discussion, and earlier results stay on the same issue, so the next person or agent can pick up where the last one left off.
-This is the shape of the **Delivery** template. Projects that do not choose a workflow use **Default**: every status is available and nothing is handed off automatically, just as before.
+The **Delivery** template has this shape. Projects that do not choose a workflow use **Default**: every status is available and nothing is handed off automatically, just as before.
## Create a workflow
In the web or desktop app, a workspace `owner` or `admin` can create workflows:
-1. Open **Settings → Workflows** and choose **New workflow**. Start blank or use the **Delivery**, **Content**, or **Community** template.
-2. Name the workflow and choose its status columns. Drag the middle columns into the order your team uses.
-3. Select a column and choose what happens when an issue enters it: **No handoff**, **Hand to agent**, or **Hand to member**. You can also choose the **Project lead** from the member picker.
-4. For an agent step, write what it should do. Choose where it should move the issue when finished (the next column if you leave it unset), and where to send it back if the step rejects the work it received and it needs rework. Use **Blocked**, not the send-back choice, when the step cannot continue for an outside reason.
-5. Preview the agent's brief, then save.
+<Steps>
+<Step>
+
+Open **Settings → Workflows** and choose **New workflow**. Start blank or use the **Delivery**, **Content**, or **Community** template.
+
+</Step>
+<Step>
+
+Name the workflow and choose its status columns. Drag the middle columns into the order your team uses.
+
+</Step>
+<Step>
+
+Select a column and choose what happens when an issue enters it: **No handoff**, **Hand to an agent**, or **Hand to a member**. You can also choose the **Project lead** from the member picker.
+
+</Step>
+<Step>
+
+For an agent step, write what it should do. Then set **When done, move to** (the next column if you leave it unset) and **If rejected, send back to** (used when this step finds the work it received unacceptable and it needs rework). Use **Blocked**, not send-back, when the step cannot continue for an outside reason.
+
+</Step>
+<Step>
+
+Preview the agent's brief, then save.
+
+</Step>
+</Steps>
If you added a new status, save the workflow before setting up that status's handoff.
@@ -43,11 +68,13 @@ The project's board now follows the workflow's columns. Each issue's status pick
Change an issue's status or drag its card to another column. If that step has a handoff, check who will receive it and, for an agent, the instructions it will receive.
+<WorkflowDemo />
+
When you create an issue in a project without picking an assignee, and its status has a handoff, the issue goes straight to that step's handler; an agent starts right away. The create dialog shows who it will be handed to. To create it without starting anything yet, put it in Backlog.
-If the previous agent still has a run underway or waiting to start, the confirmation offers to stop or cancel it. This option is selected by default. Leave it selected unless you want both agents to keep working; comments and work already saved are kept.
+When the previous assignee is an agent with a run underway or waiting to start, the confirmation adds an option to stop or cancel it, selected by default. Leave it selected unless you want both agents working at once; the comments and work it already saved are kept.
-The next-step and send-back choices tell the agent where to move the issue. A run finishing does not move the issue by itself: the person or agent handling the step updates its status.
+**When done, move to** and **If rejected, send back to** tell the agent where to move the issue next. A run finishing does not move the issue by itself: the member or agent handling the step updates its status. When an agent moves the issue into the next step, that step's handoff runs just as it would for a member.
You can see the handoff and its instructions in the issue's timeline. Open the workflow menu on the project board to view the full flow.
diff --git a/apps/docs/content/docs/workflows.zh.mdx b/apps/docs/content/docs/workflows.zh.mdx
index 67e0d54cd5..cc22e609e9 100644
--- a/apps/docs/content/docs/workflows.zh.mdx
+++ b/apps/docs/content/docs/workflows.zh.mdx
@@ -3,7 +3,10 @@ title: 工作流
description: 为项目安排任务经过哪些步骤,以及每一步交给谁。
---
-工作流让项目里的任务按同一套流程推进。你可以安排任务经过哪些步骤、每一步由谁处理,以及要做什么。
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { WorkflowDemo } from "@/components/demos/workflow-demo";
+
+工作流规定项目里的任务经过哪些步骤、每一步由谁处理、要做什么。
例如,一套研发交付流程可以这样安排:
@@ -15,17 +18,39 @@ description: 为项目安排任务经过哪些步骤,以及每一步交给谁
把任务移到审查这一步,就会交给审查智能体。任务的描述、讨论和之前的结果都留在原处,下一位处理人可以接着做。
-这正是**研发交付**模板的结构。项目没有选用工作流时使用 **Default**:所有状态都可用,也不会自动交接,和以前的用法一样。
+**研发交付**模板就是这个结构。项目没有选用工作流时使用 **Default**:所有状态都可用,也不会自动交接,和以前的用法一样。
## 创建工作流
工作区的 `owner` 或 `admin` 可以在网页端或桌面端创建工作流:
-1. 打开**设置 → 工作流**,选择**新建工作流**。可以从空白开始,也可以使用**研发交付**、**内容生产**或**社区维护**模板。
-2. 填写名称,选择需要的状态列,拖动中间的列调整顺序。
-3. 选择一列,设置任务进入时**不交接**、**交给智能体**或**交给成员**。成员列表里也可以选择**项目负责人**。
-4. 如果交给智能体,写清这一步要做什么,再选择**完成后进入**哪一步(不选时默认进入下一列)、**打回时退回到**哪一步(这一步认为收到的工作不合格、需要返工时使用)。因外部原因无法继续时用 **Blocked**,不要用退回。
-5. 预览智能体会收到的说明,然后保存。
+<Steps>
+<Step>
+
+打开**设置 → 工作流**,选择**新建工作流**。可以从空白开始,也可以使用**研发交付**、**内容生产**或**社区维护**模板。
+
+</Step>
+<Step>
+
+填写名称,选择需要的状态列,拖动中间的列调整顺序。
+
+</Step>
+<Step>
+
+选择一列,设置任务进入时**不交接**、**交给智能体**或**交给成员**。成员列表里也可以选择**项目负责人**。
+
+</Step>
+<Step>
+
+如果交给智能体,写清这一步要做什么,再选择**完成后进入**哪一步(不选时默认进入下一列)、**打回时退回到**哪一步(这一步认为收到的工作不合格、需要返工时使用)。因外部原因无法继续时用 **Blocked**,不要用退回。
+
+</Step>
+<Step>
+
+预览智能体会收到的说明,然后保存。
+
+</Step>
+</Steps>
如果添加了新状态,先保存工作流,再为这个状态设置交接。
@@ -43,11 +68,13 @@ description: 为项目安排任务经过哪些步骤,以及每一步交给谁
修改任务状态,或把卡片拖到另一列。如果这一步设有交接,先确认接收人;交给智能体时,还可以查看它会收到的说明。
+<WorkflowDemo />
+
在项目中新建任务时,如果没有选择负责人,而任务所在的状态设有交接,任务会直接交给这一步的处理人;处理人是智能体时会立即开始。新建窗口会提示"创建后交给"谁。想先建好再说,可以把任务放在 Backlog。
-如果上一位智能体仍在运行或等待开始,确认窗口会提供停止或取消它的选项,默认勾选。除非希望两位智能体继续同时处理,否则保留勾选即可;已发表的评论和已保存的工作会保留。
+上一位负责人是智能体、而且它仍在运行或等待开始时,确认窗口会多出停止或取消它的选项,默认勾选。除非想让两位智能体同时处理,保留勾选就行;它已发表的评论和已保存的工作不会丢。
-"完成后进入"和"需要修改时退回"会告诉智能体接下来该把任务移到哪里。一次运行结束不会自行推进任务,状态由负责这一步的成员或智能体更新。
+"完成后进入"和"打回时退回到"告诉智能体接下来该把任务移到哪里。一次运行结束不会自行推进任务,状态由负责这一步的成员或智能体更新;智能体把任务移进下一步时,同样会触发那一步的交接。
交接记录和说明会留在任务动态中。在项目看板的工作流菜单中,可以查看完整流程。
diff --git a/apps/docs/content/docs/workspaces.fr.mdx b/apps/docs/content/docs/workspaces.fr.mdx
index 3d903d9522..7b23df7719 100644
--- a/apps/docs/content/docs/workspaces.fr.mdx
+++ b/apps/docs/content/docs/workspaces.fr.mdx
@@ -5,7 +5,7 @@ description: Un espace de travail est la frontière qui isole les équipes, le t
import { Callout } from "fumadocs-ui/components/callout";
-Un espace de travail est la frontière de plus haut niveau de Multica. Les membres, les tâches, les projets, les agents, les skills et l'historique des exécutions appartiennent tous à un seul espace de travail et sont entièrement isolés de tous les autres.
+Un espace de travail est la frontière de plus haut niveau de Multica. Les membres, les tâches, les projets, les agents, les skills et l'historique des exécutions appartiennent tous à un seul espace de travail, et rien ne circule d'un espace de travail à l'autre.
## Contenu d'un espace de travail
@@ -14,7 +14,7 @@ Un espace de travail est la frontière de plus haut niveau de Multica. Les membr
| **Travail** | Tâches, projets, commentaires, pièces jointes, historique des exécutions |
| **Équipe** | Membres, rôles, invitations |
| **Agents** | Configuration des agents, skills, runtimes, automatisations |
-| **Paramètres partagés** | Contexte, étiquettes, propriétés personnalisées, intégrations |
+| **Paramètres partagés** | Contexte, étiquettes, [propriétés personnalisées](/issues#propriétés-personnalisées), intégrations |
Le **Contexte** est fourni à chaque agent de l'espace de travail — c'est l'endroit où placer les informations générales sur l'équipe, les conventions produit et les exigences durables. Les exigences ponctuelles d'une exécution ont leur place dans la tâche correspondante.
@@ -40,7 +40,7 @@ Après un changement de préfixe des tâches, chaque tâche passe immédiatement
## Changer d'espace de travail et le quitter
-Un même compte peut rejoindre plusieurs espaces de travail. Changer d'espace de travail modifie seulement ce que vous consultez ; aucune donnée n'est déplacée.
+Un même compte peut rejoindre plusieurs espaces de travail. Changer d'espace de travail change seulement ce que vous consultez ; les données ne bougent pas.
Après avoir quitté un espace de travail, il vous faut une nouvelle invitation pour y revenir. Quitter un espace de travail désactive aussi les runtimes dont vous êtes propriétaire, archive les agents qui y sont liés et annule leurs exécutions non terminées.
@@ -48,7 +48,7 @@ Le dernier `owner` ne peut pas quitter l'espace de travail ; promouvez d'abord u
## Supprimer un espace de travail
-Seul un `owner` peut supprimer un espace de travail. La suppression retire définitivement tout son travail, ses membres, la configuration de ses agents et l'historique de ses exécutions, et elle est irréversible. Si vous vous absentez seulement pour un temps, quittez l'espace de travail au lieu de le supprimer.
+Seul un `owner` peut supprimer un espace de travail. La suppression retire définitivement tout son travail, ses membres, la configuration de ses agents et l'historique de ses exécutions, et elle est irréversible. Si vous vous absentez seulement pour un temps, il suffit de quitter l'espace de travail.
## Étapes suivantes
diff --git a/apps/docs/content/docs/workspaces.ja.mdx b/apps/docs/content/docs/workspaces.ja.mdx
index f5728a67e7..dc52d01708 100644
--- a/apps/docs/content/docs/workspaces.ja.mdx
+++ b/apps/docs/content/docs/workspaces.ja.mdx
@@ -5,7 +5,7 @@ description: ワークスペースは、チーム、作業、エージェント
import { Callout } from "fumadocs-ui/components/callout";
-ワークスペースは Multica の最上位の境界です。メンバー、タスク、プロジェクト、エージェント、スキル、実行履歴はすべていずれか 1 つのワークスペースに属し、互いに完全に分離されています。
+ワークスペースは Multica の最上位の境界です。メンバー、タスク、プロジェクト、エージェント、スキル、実行履歴はすべていずれか 1 つのワークスペースに属し、別のワークスペースからは見えません。
## ワークスペースの構成
@@ -14,7 +14,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| **作業** | タスク、プロジェクト、コメント、添付ファイル、実行履歴 |
| **チーム** | メンバー、ロール、招待 |
| **エージェント** | エージェント設定、スキル、ランタイム、自動化 |
-| **共有設定** | コンテキスト、ラベル、カスタムプロパティ、連携 |
+| **共有設定** | コンテキスト、ラベル、[カスタムプロパティ](/issues#カスタムプロパティ)、連携 |
**コンテキスト**はワークスペース内のすべてのエージェントに渡されます。チームの背景、プロダクトの約束事、長期的に有効な要件を書く場所です。一回限りの要件は、対応するタスクに書いてください。
@@ -40,7 +40,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 切り替えと退出
-1 つのアカウントで複数のワークスペースに参加できます。切り替えは現在表示している範囲を変えるだけで、データは一切移動しません。
+1 つのアカウントで複数のワークスペースに参加できます。切り替えで変わるのは表示している範囲だけで、データは移動しません。
ワークスペースを退出した後に戻るには、あらためて招待を受ける必要があります。退出すると同時に、自分が所有するランタイムは無効化され、それに紐づくエージェントはアーカイブされ、未完了の実行はキャンセルされます。
@@ -48,7 +48,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## ワークスペースの削除
-ワークスペースを削除できるのは `owner` だけです。削除すると、その中の作業、メンバー、エージェント設定、実行履歴のすべてが完全に削除され、復元できません。しばらく離れるだけなら、削除ではなく退出を選んでください。
+ワークスペースを削除できるのは `owner` だけです。削除すると、その中の作業、メンバー、エージェント設定、実行履歴のすべてが完全に削除され、復元できません。しばらく参加しないだけなら、退出で十分です。
## 次のステップ
diff --git a/apps/docs/content/docs/workspaces.ko.mdx b/apps/docs/content/docs/workspaces.ko.mdx
index 9e2b8594b5..0f530be96b 100644
--- a/apps/docs/content/docs/workspaces.ko.mdx
+++ b/apps/docs/content/docs/workspaces.ko.mdx
@@ -5,7 +5,7 @@ description: 워크스페이스는 팀, 작업, 에이전트 설정이 서로
import { Callout } from "fumadocs-ui/components/callout";
-워크스페이스는 Multica의 최상위 경계입니다. 멤버, 태스크, 프로젝트, 에이전트, 스킬, 실행 기록은 모두 특정 워크스페이스에 속하며 서로 완전히 격리됩니다.
+워크스페이스는 Multica의 최상위 경계입니다. 멤버, 태스크, 프로젝트, 에이전트, 스킬, 실행 기록은 모두 하나의 워크스페이스에 속하며, 다른 워크스페이스와는 서로 공유되지 않습니다.
## 워크스페이스의 구성
@@ -14,7 +14,7 @@ import { Callout } from "fumadocs-ui/components/callout";
| **작업** | 태스크, 프로젝트, 댓글, 첨부 파일, 실행 기록 |
| **팀** | 멤버, 역할, 초대 |
| **에이전트** | 에이전트 설정, 스킬, 런타임, 자동화 |
-| **공유 설정** | 컨텍스트, 라벨, 사용자 지정 속성, 연동 |
+| **공유 설정** | 컨텍스트, 라벨, [사용자 지정 속성](/issues#사용자-지정-속성), 연동 |
**컨텍스트**는 워크스페이스의 모든 에이전트에게 제공됩니다. 팀 배경, 제품 규칙, 장기적으로 적용되는 요구 사항을 작성하기에 적합합니다. 일회성 요구 사항은 해당 태스크에 작성하세요.
@@ -40,7 +40,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 전환 및 나가기
-하나의 계정으로 여러 워크스페이스에 참여할 수 있습니다. 전환하면 현재 보는 범위만 바뀌며 데이터는 이동하지 않습니다.
+하나의 계정으로 여러 워크스페이스에 참여할 수 있습니다. 워크스페이스를 전환하면 지금 보고 있는 범위만 바뀌고 데이터는 옮겨지지 않습니다.
워크스페이스를 나가면 다시 참여하려면 초대를 새로 수락해야 합니다. 나갈 때는 본인이 소유한 런타임도 비활성화되고, 해당 런타임에 연결된 에이전트는 보관 처리되며, 완료되지 않은 실행은 취소됩니다.
@@ -48,7 +48,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 워크스페이스 삭제
-워크스페이스는 `owner`만 삭제할 수 있습니다. 삭제하면 그 안의 모든 작업, 멤버, 에이전트 설정, 실행 기록이 영구적으로 제거되며 복구할 수 없습니다. 잠시 참여하지 않으려는 경우에는 삭제하지 말고 워크스페이스를 나가세요.
+워크스페이스는 `owner`만 삭제할 수 있습니다. 삭제하면 그 안의 모든 작업, 멤버, 에이전트 설정, 실행 기록이 영구적으로 제거되며 복구할 수 없습니다. 잠시 참여하지 않을 뿐이라면 나가기만 해도 충분합니다.
## 다음 단계
diff --git a/apps/docs/content/docs/workspaces.mdx b/apps/docs/content/docs/workspaces.mdx
index 22dfd63f84..3e262a8141 100644
--- a/apps/docs/content/docs/workspaces.mdx
+++ b/apps/docs/content/docs/workspaces.mdx
@@ -14,7 +14,7 @@ A workspace is Multica's top-level boundary. Members, issues, projects, agents,
| **Work** | Issues, projects, comments, attachments, run history |
| **Team** | Members, roles, invitations |
| **Agents** | Agent configuration, skills, runtimes, automations |
-| **Shared settings** | Context, labels, custom properties, integrations |
+| **Shared settings** | Context, labels, [custom properties](/issues#custom-properties), integrations |
**Context** is provided to every agent in the workspace — the place for team background, product conventions, and long-lived requirements. One-off run requirements belong in the corresponding issue.
diff --git a/apps/docs/content/docs/workspaces.zh.mdx b/apps/docs/content/docs/workspaces.zh.mdx
index a3e2c3febb..9df3d03c1a 100644
--- a/apps/docs/content/docs/workspaces.zh.mdx
+++ b/apps/docs/content/docs/workspaces.zh.mdx
@@ -5,7 +5,7 @@ description: 工作区是团队、工作和智能体配置彼此隔离的边界
import { Callout } from "fumadocs-ui/components/callout";
-工作区是 Multica 的最上层边界。成员、任务、项目、智能体、skill 和执行记录都属于某一个工作区,彼此完全隔离。
+工作区是 Multica 的最上层边界。成员、任务、项目、智能体、skill 和执行记录都属于某一个工作区,不同工作区之间互不相通。
## 工作区的组成
@@ -14,13 +14,13 @@ import { Callout } from "fumadocs-ui/components/callout";
| **工作** | 任务、项目、评论、附件、执行记录 |
| **团队** | 成员、角色、邀请 |
| **智能体** | 智能体配置、skill、运行时、自动化 |
-| **共享设置** | 上下文、标签、自定义属性、集成 |
+| **共享设置** | 上下文、标签、[自定义属性](/issues#自定义属性)、集成 |
**上下文**会提供给工作区中的每个智能体,适合写团队背景、产品约定和长期有效的要求。一次性的运行要求写在对应的任务里。
## 创建工作区
-创建时填三项:
+创建时要填三项:
- **名称**:展示给成员,之后可以修改。
- **工作区 URL**:地址中的 slug,例如 `multica.ai/my-team` 里的 `my-team`。只能用小写字母、数字和连字符,不能与已有工作区或保留地址重复,创建后不可修改。
@@ -40,7 +40,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 切换和离开
-一个账号可以加入多个工作区。切换只改变当前查看的范围,不移动任何数据。
+一个账号可以加入多个工作区。切换工作区只换了你正在看的范围,数据不会移动。
离开工作区后,需要重新接受邀请才能回来。离开会同时停用你拥有的运行时、归档绑定在其上的智能体,并取消它们未结束的运行。
@@ -48,7 +48,7 @@ import { Callout } from "fumadocs-ui/components/callout";
## 删除工作区
-只有 `owner` 可以删除工作区。删除会永久移除其中的全部工作、成员、智能体配置和执行记录,无法恢复。暂时不参与时选择离开,而不是删除。
+只有 `owner` 可以删除工作区。删除会永久移除其中的全部工作、成员、智能体配置和执行记录,无法恢复。只是暂时不参与的话,离开就够了。
## 接下来
diff --git a/apps/docs/lib/locale-link.ts b/apps/docs/lib/locale-link.ts
index 8b08042fb9..bb270c1fe4 100644
--- a/apps/docs/lib/locale-link.ts
+++ b/apps/docs/lib/locale-link.ts
@@ -4,7 +4,7 @@ import { i18n } from "./i18n";
// navigation inside Chinese (or any non-default-language) docs stays in
// that language. Without this, `[xx](/workspaces)` written in a `*.zh.mdx`
// renders as `<a href="/workspaces">`, which Next's basePath rewrites to
-// `/docs/workspaces` and the docs middleware then routes to English —
+// `/docs/workspaces` and the docs proxy then routes to English —
// leaking the reader out of their chosen locale.
//
// We deliberately do NOT touch:
diff --git a/apps/docs/lib/source.ts b/apps/docs/lib/source.ts
index 6aee2889cb..86fbc1ebc9 100644
--- a/apps/docs/lib/source.ts
+++ b/apps/docs/lib/source.ts
@@ -1,4 +1,4 @@
-import { docs } from "@/.source";
+import { docs } from "@/.source/server";
import { loader } from "fumadocs-core/source";
import { i18n } from "./i18n";
diff --git a/apps/docs/lib/translations.ts b/apps/docs/lib/translations.ts
index 74b1dc3f4e..5bb7df9c29 100644
--- a/apps/docs/lib/translations.ts
+++ b/apps/docs/lib/translations.ts
@@ -5,52 +5,60 @@ import type { Lang } from "./i18n";
// English uses Fumadocs defaults, so only the translated locales override them.
export const uiTranslations: Partial<Record<Lang, Partial<Translations>>> = {
zh: {
- search: "搜索",
- searchNoResult: "没有找到结果",
- toc: "本页目录",
- tocNoHeadings: "无章节",
- lastUpdate: "最后更新于",
- chooseLanguage: "选择语言",
- nextPage: "下一页",
- previousPage: "上一页",
- chooseTheme: "切换主题",
- editOnGithub: "在 GitHub 上编辑",
+ "Search(search trigger)": "搜索",
+ "Search(search dialog)": "搜索",
+ "No results found(search dialog)": "没有找到结果",
+ "On this page(table of contents)": "本页目录",
+ "No Headings(table of contents)": "无章节",
+ "Last updated on(page footer)": "最后更新于",
+ "Choose a language(language switcher)": "选择语言",
+ "Choose a language(language switcher)(aria-label)": "选择语言",
+ "Next Page(pagination)": "下一页",
+ "Previous Page(pagination)": "上一页",
+ "Toggle Theme(theme switcher)(aria-label)": "切换主题",
+ "Edit on GitHub(edit page)": "在 GitHub 上编辑",
},
ko: {
- search: "검색",
- searchNoResult: "결과가 없습니다",
- toc: "이 페이지에서",
- tocNoHeadings: "제목 없음",
- lastUpdate: "마지막 업데이트",
- chooseLanguage: "언어 선택",
- nextPage: "다음 페이지",
- previousPage: "이전 페이지",
- chooseTheme: "테마 변경",
- editOnGithub: "GitHub에서 편집",
+ "Search(search trigger)": "검색",
+ "Search(search dialog)": "검색",
+ "No results found(search dialog)": "결과가 없습니다",
+ "On this page(table of contents)": "이 페이지에서",
+ "No Headings(table of contents)": "제목 없음",
+ "Last updated on(page footer)": "마지막 업데이트",
+ "Choose a language(language switcher)": "언어 선택",
+ "Choose a language(language switcher)(aria-label)": "언어 선택",
+ "Next Page(pagination)": "다음 페이지",
+ "Previous Page(pagination)": "이전 페이지",
+ "Toggle Theme(theme switcher)(aria-label)": "테마 변경",
+ "Edit on GitHub(edit page)": "GitHub에서 편집",
},
ja: {
- search: "検索",
- searchNoResult: "結果が見つかりません",
- toc: "このページの内容",
- tocNoHeadings: "見出しなし",
- lastUpdate: "最終更新",
- chooseLanguage: "言語を選択",
- nextPage: "次のページ",
- previousPage: "前のページ",
- chooseTheme: "テーマを変更",
- editOnGithub: "GitHub で編集",
+ "Search(search trigger)": "検索",
+ "Search(search dialog)": "検索",
+ "No results found(search dialog)": "結果が見つかりません",
+ "On this page(table of contents)": "このページの内容",
+ "No Headings(table of contents)": "見出しなし",
+ "Last updated on(page footer)": "最終更新",
+ "Choose a language(language switcher)": "言語を選択",
+ "Choose a language(language switcher)(aria-label)": "言語を選択",
+ "Next Page(pagination)": "次のページ",
+ "Previous Page(pagination)": "前のページ",
+ "Toggle Theme(theme switcher)(aria-label)": "テーマを変更",
+ "Edit on GitHub(edit page)": "GitHub で編集",
},
fr: {
- search: "Rechercher",
- searchNoResult: "Aucun résultat",
- toc: "Sur cette page",
- tocNoHeadings: "Aucun titre",
- lastUpdate: "Dernière mise à jour",
- chooseLanguage: "Choisir la langue",
- nextPage: "Page suivante",
- previousPage: "Page précédente",
- chooseTheme: "Changer de thème",
- editOnGithub: "Modifier sur GitHub",
+ "Search(search trigger)": "Rechercher",
+ "Search(search dialog)": "Rechercher",
+ "No results found(search dialog)": "Aucun résultat",
+ "On this page(table of contents)": "Sur cette page",
+ "No Headings(table of contents)": "Aucun titre",
+ "Last updated on(page footer)": "Dernière mise à jour",
+ "Choose a language(language switcher)": "Choisir la langue",
+ "Choose a language(language switcher)(aria-label)": "Choisir la langue",
+ "Next Page(pagination)": "Page suivante",
+ "Previous Page(pagination)": "Page précédente",
+ "Toggle Theme(theme switcher)(aria-label)": "Changer de thème",
+ "Edit on GitHub(edit page)": "Modifier sur GitHub",
},
};
@@ -97,3 +105,13 @@ export const homeCopy = {
byline: ["Premiers pas", "Mis à jour en juillet 2026", "2 min de lecture"],
},
} as const satisfies Record<Lang, unknown>;
+
+// Chrome around the interactive demos embedded in docs pages. Each demo keeps
+// its own scenario copy next to its component.
+export const demoChromeCopy = {
+ en: { label: "Try it", replay: "Replay", click: "Click" },
+ zh: { label: "动手试试", replay: "重新演示", click: "点击" },
+ ko: { label: "직접 해보기", replay: "다시 보기", click: "클릭" },
+ ja: { label: "試してみる", replay: "もう一度", click: "クリック" },
+ fr: { label: "Essayez", replay: "Rejouer", click: "Cliquez" },
+} as const satisfies Record<Lang, unknown>;
diff --git a/apps/docs/next-env.d.ts b/apps/docs/next-env.d.ts
index 830fb594ca..a419cbe4e3 100644
--- a/apps/docs/next-env.d.ts
+++ b/apps/docs/next-env.d.ts
@@ -1,6 +1,7 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
-/// <reference path="./.next/types/routes.d.ts" />
+import "./.next/dev/types/routes.d.ts";
+import "./.next/dev/types/root-params.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 21deb7537f..1d899f5c34 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -14,15 +14,16 @@
},
"dependencies": {
"@multica/ui": "workspace:*",
- "fumadocs-core": "^15.5.2",
- "fumadocs-mdx": "^12.0.3",
- "fumadocs-ui": "^15.5.2",
+ "fumadocs-core": "^16.17.8",
+ "fumadocs-mdx": "^15.4.10",
+ "fumadocs-ui": "^16.17.8",
"lucide-react": "catalog:",
"mermaid": "^11.14.0",
- "next": "^15.5.16",
+ "next": "^16.3.8",
"next-themes": "^0.4.6",
"react": "catalog:",
- "react-dom": "catalog:"
+ "react-dom": "catalog:",
+ "tw-animate-css": "^1.4.0"
},
"devDependencies": {
"@tailwindcss/postcss": "catalog:",
diff --git a/apps/docs/middleware.ts b/apps/docs/proxy.ts
similarity index 94%
rename from apps/docs/middleware.ts
rename to apps/docs/proxy.ts
index 97d97a580b..501c384f0b 100644
--- a/apps/docs/middleware.ts
+++ b/apps/docs/proxy.ts
@@ -3,14 +3,14 @@ import { i18n } from "@/lib/i18n";
const BASE_PATH = "/docs";
-// Self-contained i18n middleware. We don't use fumadocs-core's built-in
+// Self-contained i18n proxy. We don't use fumadocs-core's built-in
// middleware because it isn't basePath-aware — both its rewrite targets
// and redirect Location headers are built from the basePath-stripped path,
// leaving URLs like `/en/agents` or `/` that Next then fails to resolve
// inside a basePath-mounted app. Logic mirrors fumadocs's default-locale
// flavor: hide `/en` prefix for the default language, keep `/zh` prefix
// for other languages.
-export default function middleware(request: NextRequest) {
+export function proxy(request: NextRequest) {
const pathname = request.nextUrl.pathname;
const pathLocale = i18n.languages.find(
(loc) => pathname === `/${loc}` || pathname.startsWith(`/${loc}/`),
diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json
index b96964bc82..48b9023437 100644
--- a/apps/docs/tsconfig.json
+++ b/apps/docs/tsconfig.json
@@ -19,7 +19,7 @@
"sourceMap": true,
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
- "jsx": "preserve",
+ "jsx": "react-jsx",
"plugins": [
{
"name": "next"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 83d193c112..5e800afb98 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -242,7 +242,7 @@ importers:
version: link:../../packages/tsconfig
'@tailwindcss/vite':
specifier: ^4
'@testing-library/jest-dom':
specifier: 'catalog:'
version: 6.9.1
@@ -260,7 +260,7 @@ importers:
version: 19.2.3(@types/[email protected])
'@vitejs/plugin-react':
specifier: ^5.1.1
electron:
specifier: ^44.9.3
version: 44.9.3
@@ -269,7 +269,7 @@ importers:
version: 26.8.1([email protected])
electron-vite:
specifier: ^5.0.0
globals:
specifier: ^16.0.0
version: 16.5.0
@@ -284,7 +284,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
apps/docs:
dependencies:
@@ -292,14 +292,14 @@ importers:
specifier: workspace:*
version: link:../../packages/ui
fumadocs-core:
- specifier: ^15.5.2
+ specifier: ^16.17.8
fumadocs-mdx:
- specifier: ^12.0.3
+ specifier: ^15.4.10
fumadocs-ui:
- specifier: ^15.5.2
+ specifier: ^16.17.8
lucide-react:
specifier: 'catalog:'
version: 1.0.1([email protected])
@@ -307,8 +307,8 @@ importers:
specifier: ^11.14.0
version: 11.14.0
next:
- specifier: ^15.5.16
+ specifier: ^16.3.8
next-themes:
specifier: ^0.4.6
@@ -318,6 +318,9 @@ importers:
react-dom:
specifier: 'catalog:'
version: 19.2.3([email protected])
+ tw-animate-css:
+ specifier: ^1.4.0
+ version: 1.4.0
devDependencies:
'@tailwindcss/postcss':
specifier: 'catalog:'
@@ -336,7 +339,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
apps/mobile:
dependencies:
@@ -465,7 +468,7 @@ importers:
version: 18.0.3
nativewind:
specifier: ^4.1.23
react:
specifier: 19.2.3
version: 19.2.3
@@ -519,10 +522,10 @@ importers:
version: 2.6.1
tailwindcss:
specifier: ^3.4.17
- version: 3.4.19([email protected])
+ version: 3.4.19([email protected])
tailwindcss-animate:
specifier: ^1.0.7
zod:
specifier: ^4.1.5
version: 4.3.6
@@ -550,7 +553,7 @@ importers:
version: 6.0.3
vitest:
specifier: 'catalog:'
apps/ui-lab:
dependencies:
@@ -589,7 +592,7 @@ importers:
version: 19.2.3([email protected])
react-i18next:
specifier: 'catalog:'
shadcn:
specifier: ^4.1.0
version: 4.1.0(@types/[email protected])([email protected])
@@ -608,7 +611,7 @@ importers:
version: link:../../packages/tsconfig
'@tailwindcss/vite':
specifier: 'catalog:'
'@types/node':
specifier: 'catalog:'
version: 25.5.0
@@ -620,7 +623,7 @@ importers:
version: 19.2.3(@types/[email protected])
'@vitejs/plugin-react':
specifier: 'catalog:'
eslint:
specifier: ^9.0.0
version: 9.39.4([email protected])
@@ -632,10 +635,10 @@ importers:
version: 5.9.3
vite:
specifier: ^8.0.1
vitest:
specifier: 'catalog:'
apps/web:
dependencies:
@@ -720,7 +723,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
packages/core:
dependencies:
@@ -738,7 +741,7 @@ importers:
version: 1.369.3
react-i18next:
specifier: 'catalog:'
yaml:
specifier: 'catalog:'
version: 2.9.0
@@ -775,7 +778,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
packages/eslint-config:
dependencies:
@@ -790,7 +793,7 @@ importers:
version: 9.39.4([email protected])
eslint-plugin-import-x:
specifier: ^4.12.0
eslint-plugin-react:
specifier: ^7.37.0
@@ -799,7 +802,7 @@ importers:
typescript-eslint:
specifier: ^8.35.0
packages/plugin-sdk:
devDependencies:
@@ -873,7 +876,7 @@ importers:
version: 19.2.3([email protected])
react-i18next:
specifier: 'catalog:'
react-markdown:
specifier: ^10.1.0
version: 10.1.0(@types/[email protected])([email protected])
@@ -937,7 +940,7 @@ importers:
version: 19.2.3(@types/[email protected])
'@vitejs/plugin-react':
specifier: 'catalog:'
esbuild:
specifier: ^0.25.12
version: 0.25.12
@@ -949,7 +952,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
packages/views:
dependencies:
@@ -1102,7 +1105,7 @@ importers:
react-i18next:
specifier: 'catalog:'
react-markdown:
specifier: ^10.1.0
version: 10.1.0(@types/[email protected])([email protected])
@@ -1132,7 +1135,7 @@ importers:
version: 4.0.0
remark-cjk-friendly:
specifier: ^2.3.1
remark-gfm:
specifier: ^4.0.1
version: 4.0.1
@@ -1202,7 +1205,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
packages:
@@ -1832,156 +1835,312 @@ packages:
cpu: [ppc64]
os: [aix]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [aix]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
engines: {node: '>=18'}
cpu: [arm]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
engines: {node: '>=18'}
cpu: [x64]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [darwin]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [darwin]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
engines: {node: '>=18'}
cpu: [x64]
os: [darwin]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [darwin]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [freebsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [freebsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [freebsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [freebsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
engines: {node: '>=18'}
cpu: [arm64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
engines: {node: '>=18'}
cpu: [arm]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==}
+ engines: {node: '>=18'}
+ cpu: [arm]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
engines: {node: '>=18'}
cpu: [ia32]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
engines: {node: '>=18'}
cpu: [loong64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==}
+ engines: {node: '>=18'}
+ cpu: [loong64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
engines: {node: '>=18'}
cpu: [mips64el]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==}
+ engines: {node: '>=18'}
+ cpu: [mips64el]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
engines: {node: '>=18'}
cpu: [ppc64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
engines: {node: '>=18'}
cpu: [riscv64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==}
+ engines: {node: '>=18'}
+ cpu: [riscv64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
engines: {node: '>=18'}
cpu: [s390x]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==}
+ engines: {node: '>=18'}
+ cpu: [s390x]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
engines: {node: '>=18'}
cpu: [x64]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [netbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [netbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [netbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [netbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
engines: {node: '>=18'}
cpu: [x64]
os: [openbsd]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [openbsd]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [openharmony]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [openharmony]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
engines: {node: '>=18'}
cpu: [x64]
os: [sunos]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [sunos]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
engines: {node: '>=18'}
cpu: [arm64]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
+ os: [win32]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
engines: {node: '>=18'}
cpu: [ia32]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
+ os: [win32]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
engines: {node: '>=18'}
cpu: [x64]
os: [win32]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [win32]
+
'@eslint-community/[email protected]':
resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2257,6 +2416,27 @@ packages:
'@formatjs/[email protected]':
resolution: {integrity: sha512-J51dAnynnqJdVUEXidHoIWn+qYve+yNQEgmFk9Dyfr3p0okzm+5QhQ+9QmsMz08+BeWTVpc1HadIiLfZmRYbAQ==}
+ '@fuma-translate/[email protected]':
+ resolution: {integrity: sha512-uOiOtBx3nRXR8Nu1GzBf1tApgF1FErDBTHxRIAQeyQdyOoZbrNRN6H4kDCWObY4qyGeGbHydG0DHzgeUgFDMIw==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^19.2.0
+ react-dom: ^19.2.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ '@fumadocs/[email protected]':
+ resolution: {integrity: sha512-1LAmuroJ6TJoQodyODRhMC9ThAkfrV2N5vZjaj4KKs+dpF2bs0d/2z0604iMKBLv2BKstR7zE9TUa/L0pxGnhA==}
+ peerDependencies:
+ tailwindcss: ^4.0.0
+ peerDependenciesMeta:
+ tailwindcss:
+ optional: true
+
+ '@fumari/[email protected]':
+ resolution: {integrity: sha512-iaiV2wyzJ4mW358NX4CX3yGit+WjKYzpaQ+rldK9BjL/5jFpeV6ruWnZVq7MEyMn3Gd0DLi8g/79NZAAQaGscw==}
+
resolution: {integrity: sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==}
engines: {node: '>=18.14.1'}
@@ -2289,24 +2469,12 @@ packages:
resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}
engines: {node: '>=18'}
- resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [arm64]
- os: [darwin]
-
resolution: {integrity: sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==}
engines: {node: '>=20.9.0'}
cpu: [arm64]
os: [darwin]
- resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [x64]
- os: [darwin]
-
resolution: {integrity: sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==}
engines: {node: '>=20.9.0'}
@@ -2318,129 +2486,64 @@ packages:
engines: {node: '>=20.9.0'}
os: [freebsd]
- resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==}
- cpu: [arm64]
- os: [darwin]
-
resolution: {integrity: sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==}
cpu: [arm64]
os: [darwin]
- resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==}
- cpu: [x64]
- os: [darwin]
-
resolution: {integrity: sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==}
cpu: [x64]
os: [darwin]
- resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==}
- cpu: [arm64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==}
cpu: [arm64]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==}
- cpu: [arm]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==}
cpu: [arm]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==}
- cpu: [ppc64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==}
- cpu: [riscv64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==}
- cpu: [s390x]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==}
cpu: [s390x]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==}
- cpu: [x64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==}
cpu: [x64]
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==}
- cpu: [arm64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==}
cpu: [arm64]
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==}
- cpu: [x64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==}
cpu: [x64]
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [arm64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==}
engines: {node: '>=20.9.0'}
@@ -2448,13 +2551,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [arm]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==}
engines: {node: '>=20.9.0'}
@@ -2462,13 +2558,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [ppc64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==}
engines: {node: '>=20.9.0'}
@@ -2476,13 +2565,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [riscv64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==}
engines: {node: '>=20.9.0'}
@@ -2490,13 +2572,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [s390x]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==}
engines: {node: '>=20.9.0'}
@@ -2504,13 +2579,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [x64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==}
engines: {node: '>=20.9.0'}
@@ -2518,13 +2586,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [arm64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==}
engines: {node: '>=20.9.0'}
@@ -2532,13 +2593,6 @@ packages:
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [x64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==}
engines: {node: '>=20.9.0'}
@@ -2546,11 +2600,6 @@ packages:
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [wasm32]
-
resolution: {integrity: sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==}
engines: {node: '>=20.9.0'}
@@ -2560,36 +2609,18 @@ packages:
engines: {node: '>=20.9.0'}
cpu: [wasm32]
- resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [arm64]
- os: [win32]
-
resolution: {integrity: sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==}
engines: {node: '>=20.9.0'}
cpu: [arm64]
os: [win32]
- resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [ia32]
- os: [win32]
-
resolution: {integrity: sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==}
engines: {node: ^20.9.0}
cpu: [ia32]
os: [win32]
- resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
- cpu: [x64]
- os: [win32]
-
resolution: {integrity: sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==}
engines: {node: '>=20.9.0'}
@@ -2667,6 +2698,9 @@ packages:
'@jridgewell/[email protected]':
resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
+ '@jridgewell/[email protected]':
+ resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==}
+
'@jridgewell/[email protected]':
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
@@ -2711,46 +2745,24 @@ packages:
'@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4
'@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4
- resolution: {integrity: sha512-hAV85Ckd9QR6RvH04MEKwsfLTksvFpO47j9xwtoIuvuPnlwecpSi+uZTtm8HirVbtlI2Fnz//xpcSTjFdyJk+g==}
-
resolution: {integrity: sha512-Al9zqHVV7TJv0eFuOU4U7Lvv74PTih4Ch63sk2xCIpSTkE3udFnaOcnzP2lQVymiL7yS9Cj2iClUXlR3EQ5sEw==}
resolution: {integrity: sha512-nE/b9mht28XJxjTwKs/yk7w4XTaU3t40UHVAky6cjiijdP/SEy3hGsnQMPxmXPTpC7W4/97okm6fngKnvCqVaA==}
- resolution: {integrity: sha512-w0WvQf1n+txiwns/9pwIQteCJpZTbxzO2SE0FLcwuD4v0WEh1JPOjdyxWL21XwJsdpx8cFRjyzxzCS/siP7HcQ==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [darwin]
-
resolution: {integrity: sha512-2JPRMh2nmQG5CiL7cXGL9AGwnPWJQ//cTtAUCT+w511QHk79SYz3LGv/pc5X643B/WEO0rvu3Yww0hqwt3kgeA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
- resolution: {integrity: sha512-znn71QmDuxm+BOaglihMZfvyySMnNljkVIY5Z2TCssBmm+WqL6c19VhtH5ktFkHa8EZ2bnTUpcNcmNSQsg67og==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [darwin]
-
resolution: {integrity: sha512-GZtCCOBKJ4leVIT/Th0llWKhD1ca92lzbQiS5R5ON9QkoiFnilFsebDae1JU2a3HWoKMEmEZWGs1AGLavVM72Q==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
- resolution: {integrity: sha512-yPPe5MNL+igZUa+OsqQJisqSfh6oarIuA1Q0BDxljGJhRQyZeP+WRHh7rs/jZUGMh5aY0YdIjXZG0VohkKkUdw==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-O659ygeQYqneJ1fBKMpFxIFqYkYswu8IAS1OCKK/4f3ZgJJm1dRz4fVJZRi/kLLWjnBKnebOePA4WNv+sV1pVA==}
engines: {node: '>= 10'}
@@ -2758,13 +2770,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-glaCczEWIrHsokFZ3pP08U4BpKxwIdnT+txdOM32OBgpL9Yw4aqx8NejmgtZQZOdstQ5f0L3CasIZudzCuD+nw==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-dSjKSyWpzxoO1d3DIZZcP4XJcNaKeLmxQMFOiYl5vuBRMmweIqnAhty8tAmRsvTss779cK1FtYnDMj40e4TQlg==}
engines: {node: '>= 10'}
@@ -2772,13 +2777,6 @@ packages:
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-oUfg2EgJmU3R0OCOWiokGFUTvZiPfXtriXiuF3YNxRoROCdgvTedHIzYoeKH34gsZxS/V7mHbfq2hpAHwhH1/A==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [linux]
- libc: [glibc]
-
resolution: {integrity: sha512-lbqOuz3RPRcv+o9msNsJw5x4+Y1ZwPTs6vmL6DCf7i0fZfvng/F59wyeDwqHIvV0mK//RBy/jJkZ+nCKsSMXjQ==}
engines: {node: '>= 10'}
@@ -2786,13 +2784,6 @@ packages:
os: [linux]
libc: [glibc]
- resolution: {integrity: sha512-JLxSP3KTd9iu/bvUMQxH7RJo9xKSHf55/6RPE4a6FTSZygGn7uvZbCej0AHXydwkggQGSD9UddSjwv6Xz5ESfA==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [linux]
- libc: [musl]
-
resolution: {integrity: sha512-+316WswI8ScVgZeUd+1KGaXkHhaYQzCjvH/05TZSpJ8zBizb1a4G7DtO7F12jcBIqMOtsz9ji1t48fmKtzqsGA==}
engines: {node: '>= 10'}
@@ -2800,24 +2791,12 @@ packages:
os: [linux]
libc: [musl]
- resolution: {integrity: sha512-ir1v7enP52K2HNz3tQQvwF+x7VNxBk1ciiZ18WBPvxf4C59IqdfmHPJYK3vH7rSxpuCVw/8C712wTXNAtEp+NA==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [win32]
-
resolution: {integrity: sha512-ji0gd4kMYUxO+1fJBIbiBVRCjzG/lloiyCccnlebvb1ZJ5qXCPZqYg4Jl1DrrixnWNMKylzgpmMWx0yNDYXlzw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
- resolution: {integrity: sha512-LIu5me6QTANCd25E7I5uIEfvgQ06RK7tvHAbYo3zCb3VpxQEPvMcSpd87NwUABDT6MbGPdEGR5VRiK4PPTJhQg==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [win32]
-
resolution: {integrity: sha512-WcTlaKt/TWkh5kUjdJcUmB1XgZ+1c6fz4Y9fDHL73YNSdGaUWjceeWrrlwF0nv19iABYWC4iAq1oX1w4Bn0vfg==}
engines: {node: '>= 10'}
@@ -3230,14 +3209,17 @@ packages:
'@protobufjs/[email protected]':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==}
'@radix-ui/[email protected]':
resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==}
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==}
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-lCZ6sbGS/7WO0j84yx4srIgOf0MRJ/sZ13RonADXxvKBym8xrxNCq5f6DibGcr38sIlwPk8/52uYdXeOPsbEDw==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3249,8 +3231,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-67jjcVvxjXCCStnTW3Z+M7jmaFMuMR7M2JgpDzH4w7JSRrikmzhjfYgP/09ECb8n7whnsgh1ifJ+Ie96qEj+pQ==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3262,8 +3244,34 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-fSzLb/qy1wuZSxQBcxpW0hNXYHDMWiIXDGyJGdA4+FSLknOWZsNRrTCUavxb4PI8b8lvHo/CysO6NVi5zLpo5g==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3288,6 +3296,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==}
peerDependencies:
@@ -3297,6 +3318,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==}
peerDependencies:
@@ -3306,6 +3336,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==}
peerDependencies:
@@ -3319,6 +3358,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-+0E4qvVTwjAWra9sEhJ+9BTsvHE00zkUuNw1VGh7S+Gc13dfYk+S1PVQdchWDj+XYHhAai7Z7IpzXVDCGsDplg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==}
peerDependencies:
@@ -3328,6 +3380,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==}
peerDependencies:
@@ -3341,6 +3402,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-KIfDcAsx+oVylFZ4xryVKusJUrLLhTQmfnJW4kwk4Km5myvhHCrj04hnWWUC166+xD4DHdH8tQGylwYX1h6+Pg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw==}
peerDependencies:
@@ -3363,6 +3437,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-MPm5R0iRGUDrDnPNxmLBkv+X7pN4XKzt+MbWJEuJQsH3NFH4omrbpXpucyYCCKTSt+na/ZxGhEWQrWTZ0285cA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==}
peerDependencies:
@@ -3376,6 +3459,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-ugeMhbXt4y5S2T1GnIqbWDKEN962PDwnX1fN0eKOOgf5f63Dh2mn8F1FUySlgW0iF6GiVsRF32DzuDIWTUyQJg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==}
peerDependencies:
@@ -3385,6 +3481,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==}
peerDependencies:
@@ -3398,8 +3503,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-XPPZjkeyCSMNNvt0FyDv/PUauG7Ow4GwHQ/XZSwW36F/TS7rR4HFTsXH8ewLnXTOLn3x96/pmTPNQIVoTX/86g==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3411,8 +3516,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-ZNxvXRx5W2Wos4fXCXb5lpdqN0Z5chf+mStOUOTr4ik7d+62MRvoe9rzCA/eGNg36lxXqSrKEKmwuZEcUrIstw==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3437,6 +3542,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-yCWRvLeGv9Pz3+efwHqGPp70mZ56r3kfIgQVF56Oj2aAa4uP/Tb+IE59wNcc+758rctqbCKx4LbK8II/r7Bn0Q==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==}
peerDependencies:
@@ -3450,6 +3568,32 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-StX7xXnaRU41VvFtMm9zlhVGz8XF6GmWWTXftkQaY+tqVkbs/R9UmAp5mLzHHapk5hM9RMZQvO/3usyIP/g42g==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==}
peerDependencies:
@@ -3489,6 +3633,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==}
peerDependencies:
@@ -3515,8 +3672,21 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-UwraORzVUeEPMclhO1p0vz0qI+TbdDLO9i+FiOqhJyHKwdpCRCck9yVEscUnAMIzCiuNoQa8D4A9bIpOPXGt6Q==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-CFrLqHNejWq5FhKAcj9V/WPGRsol76HBQto81NdOBVFEOqIEkJkKIJt0Z824A/9hHLCtoiR/Kw3euRgzXP2pxg==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3559,6 +3729,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==}
peerDependencies:
@@ -3585,6 +3764,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-hRoJlode+hg5ZNlR+3tkfkUliIybdTpD5lkAvHQ9yaXseGf7XVO9Ib2GPEIOuaJJbo7YWYbNpDDRfo8Dhf6/xA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ '@types/react-dom': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==}
peerDependencies:
@@ -3594,6 +3786,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Y5GBf4NKeADoXI1geiMlMuMoURT3k9MizzzKhGb/m55H94aGigZ01PIpkvsO6lML13BA6XYAXSJ6gza7vTn5nw==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==}
peerDependencies:
@@ -3603,6 +3804,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==}
peerDependencies:
@@ -3612,6 +3822,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==}
peerDependencies:
@@ -3621,6 +3840,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==}
peerDependencies:
@@ -3630,6 +3858,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==}
peerDependencies:
@@ -3639,6 +3876,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-XoSLhbRbqxFtgJoi2fNHA3C6pDlY34x508vUpUGoFZfvePfHXHbE1lC4FYFMnJWgiCRroSTw6fOsXQoVS9RwZg==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==}
peerDependencies:
@@ -3648,6 +3894,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==}
peerDependencies:
@@ -3657,8 +3912,17 @@ packages:
'@types/react':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-feijiN1oPk4rck4u9Dm9tsU4mT6Wp9oeEEhaz1WUEs1VuqLf8xzsFG+Qk+uWq6TnMH9O+WRECRg0NftyP9E4Fw==}
peerDependencies:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
@@ -3673,6 +3937,9 @@ packages:
'@radix-ui/[email protected]':
resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==}
+
'@react-native-community/[email protected]':
resolution: {integrity: sha512-eadbnk+I2vxvW30iTAsm/qlCnMMAadkifIMYNEB2lzhxN/SvlKc7S2V4k5DyrwjdCbqdcMk3t9K6fnUMcAV34w==}
peerDependencies:
@@ -4056,12 +4323,24 @@ packages:
resolution: {integrity: sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==}
engines: {node: '>=20'}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-6CIgwq+bt2JZ3OSjb/nBkkwEf/CfpHcbam+Mg5Pllco7HAGRQ2/EFhZrrJtbyNTgKwknfVS+llsXGygiDGwJWw==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-Ed6UdEj84LyYkwnxM5CvSMWAD+id9ExTYri0/+x41U9zrgNifPSS9lZm0JqBP0VfYI8yr8tY5nbNq9+p9R0kFA==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-dKVmbJecVdB9recl8a/CU4jdpNXyjJQrIcesIkpS70s5HS02ohpnCSpMUbotPnEUzbAcLQ+S4hwZYbkBBiTcJw==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==}
@@ -4069,10 +4348,18 @@ packages:
resolution: {integrity: sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==}
engines: {node: '>=20'}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-wwBTqwduXSz0X4v9Qa2EWeFaYJEw1clCncWjoRNQRbVDu3SPRTRWucnouYapKj3b8Q+sk/41Vbc4B5c8nuYzLA==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==}
engines: {node: '>=20'}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-UM7ShlA8oz0OWxLLO8BmO9Ip6fVqdkt8yF0EH7nOCqHfrx1eEAzF0ZUVK7L+I8NEgeu1PEWSRlxaiPPeCb4iDg==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-GepKJxXHbXFfAkiZZZ+4V7x71Lw3s0ALYmydUxJRdvpKjSx9FOMSaunv6WRLFBXR6qjYerUq1YZQno+2gLEPwA==}
@@ -4083,6 +4370,10 @@ packages:
resolution: {integrity: sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==}
engines: {node: '>=20'}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-zGb87H3UBbpuI4yoh5UguB1XbU+2BDU3kflM7UfZ+Cy2hWo9lBtqjSVK20gmLY6ukYl040hAypGXMgud9vul8Q==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-F9msZVxdF+krQNSdQ4V+Ja5QemeAoTQ2jxt7nJCwhDsdF1JWS3KxIQXA3lQbyKwS3J61oHRUSv4jYWv3CkaKTQ==}
@@ -4093,6 +4384,10 @@ packages:
resolution: {integrity: sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==}
engines: {node: '>=20'}
+ '@shikijs/[email protected]':
+ resolution: {integrity: sha512-drtPrtD8N0DENyD2cyt6Ajy+IWsiCLgMxODwLTpvH1UsN6a9jf90tNTPjqwHvA+0Lzu9e0txk8DjfqH1p9UJRw==}
+ engines: {node: '>=20'}
+
'@shikijs/[email protected]':
resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
@@ -4120,9 +4415,6 @@ packages:
'@standard-schema/[email protected]':
resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==}
- resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
-
resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==}
@@ -4685,6 +4977,9 @@ packages:
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==}
+
resolution: {integrity: sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==}
@@ -4774,8 +5069,6 @@ packages:
resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==}
- '@types/[email protected]': {}
-
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-eSkwoemjo76bdXl2MYqtxg51HNwUSkWfODUOQ3PaTLZGh9uIWWFZIjyjaJnex7wXDu+TRx+ATsnSxdN9YWfRTQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -5061,10 +5354,79 @@ packages:
resolution: {integrity: sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==}
engines: {node: '>=10.0.0'}
- resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==}
- engines: {node: ^18.17.0 || >=20.5.0}
-
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw==}
+ cpu: [arm64]
+ os: [android]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ==}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg==}
+ cpu: [arm]
+ os: [linux]
+ libc: [glibc]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg==}
+ cpu: [arm]
+ os: [linux]
+ libc: [musl]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA==}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ==}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ==}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ==}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@yuku-core/[email protected]':
+ resolution: {integrity: sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw==}
+ cpu: [x64]
+ os: [win32]
+
+ '@yuku-toolchain/[email protected]':
+ resolution: {integrity: sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg==}
+
+ resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==}
+ engines: {node: ^18.17.0 || >=20.5.0}
+
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
engines: {node: '>=6.5'}
@@ -5497,6 +5859,10 @@ packages:
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
+ resolution: {integrity: sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A==}
+ engines: {node: '>= 22.22'}
+
resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
engines: {node: '>=18'}
@@ -5578,6 +5944,11 @@ packages:
react: ^18 || ^19 || ^19.0.0-rc
react-dom: ^18 || ^19 || ^19.0.0-rc
+ resolution: {integrity: sha512-JGEixZEpfFXm1P5uXwvEobOFLlHwIWi5v4tjd1ZwfiYmcEilkuD2l+054rvJcYCR1B+uVThHeUbgmNz1FwuxuA==}
+ engines: {node: '>=22'}
+ hasBin: true
+
resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==}
@@ -6324,6 +6695,11 @@ packages:
engines: {node: '>=18'}
hasBin: true
+ resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==}
+ engines: {node: '>=18'}
+ hasBin: true
+
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
@@ -6961,6 +7337,17 @@ packages:
react-dom:
optional: true
+ resolution: {integrity: sha512-MzBgZxGgoHPfSLEXmo4o5XlZvb+nVRFdHtGjVhm6LMIEJKTt/8hNO023euL5mYyzc8llV/hQTfjnN68tNRHalw==}
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ react-dom: ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ react:
+ optional: true
+ react-dom:
+ optional: true
+
resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}
engines: {node: '>= 0.6'}
@@ -7044,6 +7431,74 @@ packages:
waku:
optional: true
+ resolution: {integrity: sha512-6MCVT2gy5i2U8i7MLQEy6eImd5/AJ69zzg3XvuHQmPi0w/V2u5QTTfK8dLLSfxniQU7obs9nSpzh+adEEL1QUQ==}
+ peerDependencies:
+ '@mdx-js/mdx': '*'
+ '@mixedbread/sdk': 0.x.x
+ '@modelcontextprotocol/server': 2.x.x
+ '@orama/core': 1.x.x
+ '@oramacloud/client': 2.x.x
+ '@pierre/highlights': ^0.2.0
+ '@tanstack/react-router': 1.x.x
+ '@types/estree-jsx': '*'
+ '@types/hast': '*'
+ '@types/mdast': '*'
+ '@types/react': ^19.2.0
+ algoliasearch: 5.x.x
+ flexsearch: '*'
+ lucide-react: '*'
+ meilisearch: '>=0.50.0 <1.0.0'
+ next: 16.x.x
+ react: ^19.2.0
+ react-dom: ^19.2.0
+ react-router: 7.x.x || 8.x.x
+ waku: '*'
+ zod: 4.x.x
+ peerDependenciesMeta:
+ '@mdx-js/mdx':
+ optional: true
+ '@mixedbread/sdk':
+ optional: true
+ '@modelcontextprotocol/server':
+ optional: true
+ '@orama/core':
+ optional: true
+ '@oramacloud/client':
+ optional: true
+ '@pierre/highlights':
+ optional: true
+ '@tanstack/react-router':
+ optional: true
+ '@types/estree-jsx':
+ optional: true
+ '@types/hast':
+ optional: true
+ '@types/mdast':
+ optional: true
+ '@types/react':
+ optional: true
+ algoliasearch:
+ optional: true
+ flexsearch:
+ optional: true
+ lucide-react:
+ optional: true
+ meilisearch:
+ optional: true
+ next:
+ optional: true
+ react:
+ optional: true
+ react-dom:
+ optional: true
+ react-router:
+ optional: true
+ waku:
+ optional: true
+ zod:
+ optional: true
+
resolution: {integrity: sha512-OYqbHSmzkejG+iUMlZJJOitaVbCgBdo/REc/9Sq1WaZ1vq6bH9PCFU0cKJlRdHbQSGRfVg5EJJy5uKy5+iNFGQ==}
hasBin: true
@@ -7063,20 +7518,61 @@ packages:
vite:
optional: true
- resolution: {integrity: sha512-9pyB+9rOOsrFnmmZ9xREp/OgVhyaSq2ocEpqTNbeQ7tlJ6JWbdFWfW0C9lRXprQEB6DJWUDtDxqKS5QXLH0EGA==}
+ resolution: {integrity: sha512-myAtUxJ174py2fK5l4m608zfVEPQzB8UpjahcdegJWt7C1AfcsTn+M7aBziSShYgn9UvrBZJMLR8PgPPk6c+Sg==}
+ hasBin: true
peerDependencies:
+ '@fumadocs/satteri': 0.x.x
+ '@types/mdast': '*'
+ '@types/mdx': '*'
'@types/react': ^19.2.0
- next: 14.x.x || 15.x.x
- react: 18.x.x || 19.x.x
- react-dom: 18.x.x || 19.x.x
- tailwindcss: ^3.4.14 || ^4.0.0
+ fumadocs-core: ^16.17.8
+ mdast-util-directive: '*'
+ next: ^15.3.0 || ^16.0.0
+ react: ^19.2.0
+ rolldown: '*'
+ satteri: ^0.10.5
+ vite: 7.x.x || 8.x.x
peerDependenciesMeta:
+ '@fumadocs/satteri':
+ optional: true
+ '@types/mdast':
+ optional: true
+ '@types/mdx':
+ optional: true
'@types/react':
optional: true
+ mdast-util-directive:
+ optional: true
next:
optional: true
- tailwindcss:
+ react:
+ optional: true
+ rolldown:
+ optional: true
+ satteri:
+ optional: true
+ vite:
+ optional: true
+
+ resolution: {integrity: sha512-zU4tjQnZ7Sy/jzRvf0wxC26HJctZVKfJAgYDIwGOch2jMibchrbjUc7ind23M9UCWyv/IheHU4ZC1HHPpiehwQ==}
+ peerDependencies:
+ '@types/mdx': '*'
+ '@types/react': ^19.2.0
+ fumadocs-core: 16.17.8
+ next: 16.x.x
+ react: ^19.2.0
+ react-dom: ^19.2.0
+ takumi-js: '*'
+ peerDependenciesMeta:
+ '@types/mdx':
+ optional: true
+ '@types/react':
+ optional: true
+ next:
+ optional: true
+ takumi-js:
optional: true
@@ -8094,6 +8590,15 @@ packages:
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ resolution: {integrity: sha512-v2SQPPPNjnr+BlhL9Spuzmo5yR+hLkftfuE4E3jaxdNPgSH0hJKPcLJBP7yAta87jQNPsSERS59PJjCJ/CorBA==}
+ peerDependencies:
+ '@types/react': ^19.2.0
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
hasBin: true
@@ -8101,6 +8606,9 @@ packages:
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
+ resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==}
+
resolution: {integrity: sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==}
engines: {node: ^18.17.0 || >=20.5.0}
@@ -8384,6 +8892,9 @@ packages:
resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==}
+ resolution: {integrity: sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==}
+
resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==}
@@ -8447,6 +8958,9 @@ packages:
resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==}
+ resolution: {integrity: sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==}
+
resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==}
@@ -8477,6 +8991,9 @@ packages:
resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==}
+ resolution: {integrity: sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==}
+
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
engines: {node: '>=8.6'}
@@ -8596,9 +9113,15 @@ packages:
resolution: {integrity: sha512-pdkHLD8QYRp8VfiNLb8xIBJis1byQ9gPT3Jnh2jqfFtAsWUA3dEepDlsWe/xMpO8McV+VdpKVcp+E+TGJEtOoA==}
+ resolution: {integrity: sha512-lIojTl9aYSPIkeOOSzBliy1nNvpdO3JtVzW2WgTXQlOP4ZMuJhtWO3fP7OD4TVFwlRucdvxlDSMkL+fEQnQ52A==}
+
resolution: {integrity: sha512-eHWisygbiwVvf6PZ1vhaHCLamvkSbPIeAYxWUuL3a2PD/TROgE7FvfHWTIH4vMl798QLfMw15nRqIaRDXTlYRg==}
+ resolution: {integrity: sha512-bZJo2AmQ2aOFkaato6VXrTbkPG0XhMzivWUWSaI59pxyllj8QMQUFZ84MYRQnPkK+7dr4KldyJwF2+RM0sdq/w==}
+
resolution: {integrity: sha512-uYfXzeHlgThchzwz5Te47dlv5JOUC7OB4rjJ/7XTUgtBZD8CchMN8qEJ4ZVsUmTyYA44zjV0fBwsiktRuFnn+w==}
peerDependencies:
@@ -8613,6 +9136,17 @@ packages:
react-dom:
optional: true
+ resolution: {integrity: sha512-qqaZbyubgk7x3zxjPgP1l3Br/KQXol/IIV1uqb358SoN4ApcqNuV7+wyDPg/XLErmuyQL5lL8JVI/fOmDsmBKQ==}
+ peerDependencies:
+ react: ^18.0.0 || ^19.0.0
+ react-dom: ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ react:
+ optional: true
+ react-dom:
+ optional: true
+
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
@@ -8676,27 +9210,6 @@ packages:
react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
- resolution: {integrity: sha512-eKL8zUJkX9Y5lE+RX/2YJoItVdGlIscyVyboeD9wSpp0PaGqjoA4tTpT2qPqz9ax+5IzGESyLSeZ/RCwbSZ2uQ==}
- engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
- hasBin: true
- peerDependencies:
- '@opentelemetry/api': ^1.1.0
- '@playwright/test': ^1.51.1
- babel-plugin-react-compiler: '*'
- react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0
- react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0
- sass: ^1.3.0
- peerDependenciesMeta:
- '@opentelemetry/api':
- optional: true
- '@playwright/test':
- optional: true
- babel-plugin-react-compiler:
- optional: true
- sass:
- optional: true
-
resolution: {integrity: sha512-U7QEZaTini6wKrb8A8hqLLqYQyCetegKjCpJOyxk642vWoMoU1x5PyZCJFvgYgiptA8xc5j/9xYlZFO7w9Sjmw==}
engines: {node: '>=20.9.0'}
@@ -8797,6 +9310,10 @@ packages:
resolution: {integrity: sha512-tt6PvKu4WyzPwWUzy/hvPFqn+uwXO0K1ZHka8az3NnrhWJDmSqI8ncWq0fkL0k/lmmi5tAC11FXwXuh0rFbt1A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ resolution: {integrity: sha512-K1HmQeZT2HrjpsR6KgqbN2FAXL2NrJJmNUSD9ck7HGTVu1JKXox8n9SB+tjbU8m8JGLF4OscrroPepew/L7/Xw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
@@ -8887,9 +9404,15 @@ packages:
resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==}
+ resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==}
+
resolution: {integrity: sha512-Zjygswjpsewa0NLTsiizVuMQZbp0MDyM6lIt66OxsF21npUDlzpHi1Mgb/qhQdkb+dWFTzJmFbEWdvZgRho8eQ==}
+ resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==}
+
resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==}
engines: {node: '>=20'}
@@ -9077,6 +9600,10 @@ packages:
resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
+ engines: {node: '>=12'}
+
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
engines: {node: '>=0.10.0'}
@@ -9408,12 +9935,6 @@ packages:
'@types/react': ^19.2.0
react: '>=18'
- resolution: {integrity: sha512-cDIwdn35fRUPsGnnj/cG6Pacll+z+Mfv6EWU2wDO5ngbZjg5uLRb2ZhEnh92ufbXCJDFvXHekb8G3+oKqUcv5g==}
- peerDependencies:
- react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
- react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
-
resolution: {integrity: sha512-ATP3BACxGM4h/l8cisFauGMGxnXpu8Bcp4Bc3O7iNZpq7j0VJjc1RRRBUSBY4C4WuI7VA/xvp3puijVS9d95rg==}
engines: {node: '>=18'}
@@ -9642,6 +10163,10 @@ packages:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
+ resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==}
+ engines: {node: '>= 20.19.0'}
+
resolution: {integrity: sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==}
engines: {node: '>= 4'}
@@ -10003,10 +10528,6 @@ packages:
resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==}
- resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==}
- engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
-
resolution: {integrity: sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==}
engines: {node: '>=20.9.0'}
@@ -10039,6 +10560,10 @@ packages:
resolution: {integrity: sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==}
+ resolution: {integrity: sha512-OcRW72ngQvc+MSVWBRIovC/BTW589iUE/Vxav7VeM4RcY9MUjqB+IR6ILG1k9nuW6LiG/nct9uma4/MBtnZbmQ==}
+ engines: {node: '>=20'}
+
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
engines: {node: '>= 0.4'}
@@ -10412,6 +10937,10 @@ packages:
resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
engines: {node: '>=12.0.0'}
@@ -11042,6 +11571,11 @@ packages:
engines: {node: '>= 14.6'}
hasBin: true
+ resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==}
+ engines: {node: '>= 14.6'}
+ hasBin: true
+
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
engines: {node: '>=12'}
@@ -11062,6 +11596,22 @@ packages:
resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-Iu7DV5cWOQ3ERSA7oBquz/RT5IEGsUyUeCivYs9lQaZ4nSjM31yD17mH616JKcTyVoVWYivsFZ+twT3UyBosTA==}
+ engines: {node: '>=14.18.0'}
+
+ resolution: {integrity: sha512-PyCsiScaelhxBGzL8dyeJkLqvRZycoh78R31Vrt/WqYrm0hMFoKwIw/X7Dx5mBKLWAMlV9I9HEyBOHnj2gZVyw==}
+ engines: {node: '>=14.18.0'}
+
+ resolution: {integrity: sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg==}
+ engines: {node: '>=14.18.0'}
+
+ resolution: {integrity: sha512-lmnEEnb93QQcNv7qARDr7jBVPxYdZbZ9XdZ0dbZ0qaOvGne4jJMW4fjwPfVaUKQXv3FNWvGbDwRDgyaSb1pc8w==}
+ engines: {node: '>= 20.0.0'}
+
resolution: {integrity: sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==}
peerDependencies:
@@ -11082,6 +11632,9 @@ packages:
resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==}
+ resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==}
+
resolution: {integrity: sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g==}
engines: {node: '>=12.20.0'}
@@ -11901,81 +12454,159 @@ snapshots:
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
dependencies:
eslint: 9.39.4([email protected])
@@ -12451,11 +13082,24 @@ snapshots:
dependencies:
'@formatjs/fast-memoize': 3.1.2
dependencies:
- hono: 4.12.8
-
- '@humanfs/[email protected]': {}
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+
+ optionalDependencies:
+ tailwindcss: 4.2.2
+
+ '@fumari/[email protected]': {}
+
+ dependencies:
+ hono: 4.12.8
+
+ '@humanfs/[email protected]': {}
'@humanfs/[email protected]':
dependencies:
@@ -12477,21 +13121,11 @@ snapshots:
optional: true
- optionalDependencies:
- '@img/sharp-libvips-darwin-arm64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-darwin-arm64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-darwin-x64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-darwin-x64': 1.3.3
@@ -12502,151 +13136,76 @@ snapshots:
'@img/sharp-wasm32': 0.35.4
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-arm64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-arm64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-arm': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-arm': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-ppc64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-ppc64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-riscv64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-riscv64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-s390x': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-s390x': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linux-x64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linux-x64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linuxmusl-arm64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linuxmusl-arm64': 1.3.3
optional: true
- optionalDependencies:
- '@img/sharp-libvips-linuxmusl-x64': 1.2.4
- optional: true
-
optionalDependencies:
'@img/sharp-libvips-linuxmusl-x64': 1.3.3
optional: true
- dependencies:
- '@emnapi/runtime': 1.11.2
- optional: true
-
dependencies:
'@emnapi/runtime': 1.11.3
@@ -12657,21 +13216,12 @@ snapshots:
'@img/sharp-wasm32': 0.35.4
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
@@ -12750,6 +13300,8 @@ snapshots:
'@jridgewell/[email protected]': {}
+ '@jridgewell/[email protected]': {}
+
'@jridgewell/[email protected]':
dependencies:
'@jridgewell/resolve-uri': 3.1.2
@@ -12854,59 +13406,33 @@ snapshots:
'@tybys/wasm-util': 0.10.3
optional: true
- '@next/[email protected]': {}
-
'@next/[email protected]': {}
dependencies:
fast-glob: 3.3.1
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
@@ -13198,21 +13724,32 @@ snapshots:
'@protobufjs/[email protected]': {}
- '@radix-ui/[email protected]': {}
+ '@radix-ui/[email protected]': {}
'@radix-ui/[email protected]': {}
+ '@radix-ui/[email protected]': {}
+
dependencies:
- '@radix-ui/primitive': 1.1.3
- '@radix-ui/react-collapsible': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
+ dependencies:
react: 19.2.3
react-dom: 19.2.3([email protected])
optionalDependencies:
@@ -13244,6 +13781,22 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
@@ -13256,18 +13809,43 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13290,12 +13868,41 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.2.1(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-guards': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ aria-hidden: 1.2.6
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13309,6 +13916,19 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13330,6 +13950,12 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
@@ -13341,6 +13967,17 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
@@ -13348,6 +13985,13 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13374,43 +14018,45 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
- dependencies:
- '@radix-ui/primitive': 1.1.3
- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])
- '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-previous': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-visually-hidden': 1.2.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.2.1(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-previous': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-visually-hidden': 1.2.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
react: 19.2.3
react-dom: 19.2.3([email protected])
optionalDependencies:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
- dependencies:
- '@radix-ui/primitive': 1.1.3
- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-focus-guards': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-slot': 1.2.3(@types/[email protected])([email protected])
- '@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.2.1(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-guards': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
aria-hidden: 1.2.6
react: 19.2.3
react-dom: 19.2.3([email protected])
@@ -13437,6 +14083,24 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@floating-ui/react-dom': 2.1.8([email protected]([email protected]))([email protected])
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-rect': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-size': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/rect': 1.1.3
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
@@ -13447,6 +14111,25 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
@@ -13475,6 +14158,15 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13510,17 +14202,37 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
- dependencies:
- '@radix-ui/number': 1.1.1
- '@radix-ui/primitive': 1.1.3
- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-is-hydrated': 0.1.3(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
+ dependencies:
+ '@radix-ui/number': 1.1.3
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
react: 19.2.3
react-dom: 19.2.3([email protected])
optionalDependencies:
@@ -13550,6 +14262,13 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -13581,12 +14300,35 @@ snapshots:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-context': 1.3.0(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-roving-focus': 1.2.1(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-use-controllable-state': 1.3.0(@types/[email protected])([email protected])
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.14
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/react-use-effect-event': 0.0.2(@types/[email protected])([email protected])
@@ -13595,6 +14337,15 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/primitive': 1.2.0
+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
@@ -13602,6 +14353,13 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])
@@ -13609,18 +14367,36 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/rect': 1.1.1
@@ -13628,6 +14404,13 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
+ dependencies:
+ '@radix-ui/rect': 1.1.3
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
@@ -13635,9 +14418,16 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
+ dependencies:
react: 19.2.3
react-dom: 19.2.3([email protected])
optionalDependencies:
@@ -13646,6 +14436,8 @@ snapshots:
'@radix-ui/[email protected]': {}
+ '@radix-ui/[email protected]': {}
+
dependencies:
invariant: 2.2.4
@@ -14034,17 +14826,36 @@ snapshots:
'@types/hast': 3.0.4
hast-util-to-html: 9.0.5
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/primitive': 4.5.0
+ '@shikijs/types': 4.5.0
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.5
+ hast-util-to-html: 9.0.5
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 3.23.0
'@shikijs/vscode-textmate': 10.0.2
oniguruma-to-es: 4.3.5
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/types': 4.5.0
+ '@shikijs/vscode-textmate': 10.0.2
+ oniguruma-to-es: 4.3.6
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 3.23.0
'@shikijs/vscode-textmate': 10.0.2
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/types': 4.5.0
+ '@shikijs/vscode-textmate': 10.0.2
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 3.23.0
@@ -14053,12 +14864,22 @@ snapshots:
dependencies:
'@shikijs/types': 4.0.2
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/types': 4.5.0
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 4.0.2
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/types': 4.5.0
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.5
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/types': 3.23.0
@@ -14076,6 +14897,10 @@ snapshots:
dependencies:
'@shikijs/types': 4.0.2
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/types': 4.5.0
+
'@shikijs/[email protected]':
dependencies:
'@shikijs/core': 3.23.0
@@ -14091,6 +14916,11 @@ snapshots:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
+ '@shikijs/[email protected]':
+ dependencies:
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.5
+
'@shikijs/[email protected]': {}
@@ -14110,10 +14940,6 @@ snapshots:
'@standard-schema/[email protected]': {}
- dependencies:
- tslib: 2.8.1
-
dependencies:
tslib: 2.8.1
@@ -14193,12 +15019,12 @@ snapshots:
postcss: 8.5.26
tailwindcss: 4.2.2
dependencies:
'@tailwindcss/node': 4.2.2
'@tailwindcss/oxide': 4.2.2
tailwindcss: 4.2.2
'@tanstack/[email protected]': {}
@@ -14699,6 +15525,10 @@ snapshots:
dependencies:
'@types/unist': 3.0.3
+ '@types/[email protected]':
+ dependencies:
+ '@types/unist': 3.0.3
+
'@types/[email protected]': {}
'@types/[email protected]': {}
@@ -14789,40 +15619,19 @@ snapshots:
dependencies:
'@types/yargs-parser': 21.0.3
- '@types/[email protected]':
- dependencies:
- '@types/node': 25.5.0
- optional: true
-
- dependencies:
- '@eslint-community/regexpp': 4.12.2
- '@typescript-eslint/parser': 8.58.1([email protected]([email protected]))([email protected])
- '@typescript-eslint/scope-manager': 8.58.1
- '@typescript-eslint/type-utils': 8.58.1([email protected]([email protected]))([email protected])
- '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
- '@typescript-eslint/visitor-keys': 8.58.1
- eslint: 9.39.4([email protected])
- ignore: 7.0.5
- natural-compare: 1.4.0
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
- transitivePeerDependencies:
- - supports-color
-
dependencies:
'@eslint-community/regexpp': 4.12.2
- '@typescript-eslint/parser': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/parser': 8.58.1([email protected]([email protected]))([email protected])
'@typescript-eslint/scope-manager': 8.58.1
- '@typescript-eslint/type-utils': 8.58.1([email protected]([email protected]))([email protected])
- '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/type-utils': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
'@typescript-eslint/visitor-keys': 8.58.1
eslint: 9.39.4([email protected])
ignore: 7.0.5
natural-compare: 1.4.0
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -14854,6 +15663,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@typescript-eslint/scope-manager': 8.58.1
+ '@typescript-eslint/types': 8.58.1
+ '@typescript-eslint/typescript-estree': 8.58.1([email protected])
+ '@typescript-eslint/visitor-keys': 8.58.1
+ debug: 4.4.3
+ eslint: 9.39.4([email protected])
+ typescript: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
'@typescript-eslint/scope-manager': 8.71.1
@@ -14875,6 +15696,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@typescript-eslint/[email protected]([email protected])':
+ dependencies:
+ '@typescript-eslint/tsconfig-utils': 8.58.1([email protected])
+ '@typescript-eslint/types': 8.58.1
+ debug: 4.4.3
+ typescript: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+
'@typescript-eslint/[email protected]([email protected])':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.71.1([email protected])
@@ -14898,19 +15728,23 @@ snapshots:
dependencies:
typescript: 5.9.3
+ '@typescript-eslint/[email protected]([email protected])':
+ dependencies:
+ typescript: 6.0.3
+
'@typescript-eslint/[email protected]([email protected])':
dependencies:
typescript: 6.0.3
dependencies:
'@typescript-eslint/types': 8.58.1
- '@typescript-eslint/typescript-estree': 8.58.1([email protected])
- '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/typescript-estree': 8.58.1([email protected])
+ '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
debug: 4.4.3
eslint: 9.39.4([email protected])
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -14930,18 +15764,33 @@ snapshots:
'@typescript-eslint/[email protected]': {}
- '@typescript-eslint/[email protected]([email protected])':
+ '@typescript-eslint/[email protected]([email protected])':
+ dependencies:
+ '@typescript-eslint/project-service': 8.58.1([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.58.1([email protected])
+ '@typescript-eslint/types': 8.58.1
+ '@typescript-eslint/visitor-keys': 8.58.1
+ debug: 4.4.3
+ minimatch: 10.2.4
+ semver: 7.7.4
+ tinyglobby: 0.2.15
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 5.9.3
+ transitivePeerDependencies:
+ - supports-color
+
+ '@typescript-eslint/[email protected]([email protected])':
dependencies:
- '@typescript-eslint/project-service': 8.58.1([email protected])
- '@typescript-eslint/tsconfig-utils': 8.58.1([email protected])
+ '@typescript-eslint/project-service': 8.58.1([email protected])
+ '@typescript-eslint/tsconfig-utils': 8.58.1([email protected])
'@typescript-eslint/types': 8.58.1
'@typescript-eslint/visitor-keys': 8.58.1
debug: 4.4.3
minimatch: 10.2.4
semver: 7.7.4
tinyglobby: 0.2.15
- ts-api-utils: 2.5.0([email protected])
- typescript: 5.9.3
+ ts-api-utils: 2.5.0([email protected])
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -14960,14 +15809,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
'@typescript-eslint/scope-manager': 8.58.1
'@typescript-eslint/types': 8.58.1
- '@typescript-eslint/typescript-estree': 8.58.1([email protected])
+ '@typescript-eslint/typescript-estree': 8.58.1([email protected])
eslint: 9.39.4([email protected])
- typescript: 5.9.3
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -14982,6 +15831,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@eslint-community/eslint-utils': 4.9.1([email protected]([email protected]))
+ '@typescript-eslint/scope-manager': 8.71.1
+ '@typescript-eslint/types': 8.71.1
+ '@typescript-eslint/typescript-estree': 8.71.1([email protected])
+ eslint: 9.39.4([email protected])
+ typescript: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+ optional: true
+
'@typescript-eslint/[email protected]':
dependencies:
'@typescript-eslint/types': 8.58.1
@@ -15063,7 +15924,7 @@ snapshots:
d3-selection: 3.0.0
d3-transition: 3.0.1([email protected])
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/[email protected])
@@ -15071,21 +15932,21 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-rc.3
'@types/babel__core': 7.20.5
react-refresh: 0.18.0
transitivePeerDependencies:
- supports-color
dependencies:
'@rolldown/pluginutils': 1.0.0-rc.7
optionalDependencies:
babel-plugin-react-compiler: 1.0.0
dependencies:
'@rolldown/pluginutils': 1.0.0-rc.7
optionalDependencies:
babel-plugin-react-compiler: 1.0.0
@@ -15098,41 +15959,41 @@ snapshots:
chai: 6.2.2
tinyrainbow: 3.1.0
dependencies:
'@vitest/spy': 4.1.0
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.12.14(@types/[email protected])([email protected])
dependencies:
'@vitest/spy': 4.1.0
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.12.14(@types/[email protected])([email protected])
dependencies:
'@vitest/spy': 4.1.0
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.12.14(@types/[email protected])([email protected])
dependencies:
'@vitest/spy': 4.1.0
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.12.14(@types/[email protected])([email protected])
'@vitest/[email protected]':
dependencies:
@@ -15160,6 +16021,44 @@ snapshots:
'@xmldom/[email protected]': {}
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-core/[email protected]':
+ optional: true
+
+ '@yuku-toolchain/[email protected]': {}
+
@@ -15726,6 +16625,10 @@ snapshots:
dependencies:
readdirp: 4.1.2
+ dependencies:
+ readdirp: 5.1.1
+
@@ -15811,6 +16714,8 @@ snapshots:
- '@types/react'
- '@types/react-dom'
+
@@ -16463,7 +17368,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-transform-arrow-functions': 7.27.1(@babel/[email protected])
@@ -16471,7 +17376,7 @@ snapshots:
esbuild: 0.25.12
magic-string: 0.30.21
picocolors: 1.1.1
transitivePeerDependencies:
- supports-color
@@ -16691,6 +17596,35 @@ snapshots:
'@esbuild/win32-ia32': 0.25.12
'@esbuild/win32-x64': 0.25.12
+ optionalDependencies:
+ '@esbuild/aix-ppc64': 0.28.2
+ '@esbuild/android-arm': 0.28.2
+ '@esbuild/android-arm64': 0.28.2
+ '@esbuild/android-x64': 0.28.2
+ '@esbuild/darwin-arm64': 0.28.2
+ '@esbuild/darwin-x64': 0.28.2
+ '@esbuild/freebsd-arm64': 0.28.2
+ '@esbuild/freebsd-x64': 0.28.2
+ '@esbuild/linux-arm': 0.28.2
+ '@esbuild/linux-arm64': 0.28.2
+ '@esbuild/linux-ia32': 0.28.2
+ '@esbuild/linux-loong64': 0.28.2
+ '@esbuild/linux-mips64el': 0.28.2
+ '@esbuild/linux-ppc64': 0.28.2
+ '@esbuild/linux-riscv64': 0.28.2
+ '@esbuild/linux-s390x': 0.28.2
+ '@esbuild/linux-x64': 0.28.2
+ '@esbuild/netbsd-arm64': 0.28.2
+ '@esbuild/netbsd-x64': 0.28.2
+ '@esbuild/openbsd-arm64': 0.28.2
+ '@esbuild/openbsd-x64': 0.28.2
+ '@esbuild/openharmony-arm64': 0.28.2
+ '@esbuild/sunos-x64': 0.28.2
+ '@esbuild/win32-arm64': 0.28.2
+ '@esbuild/win32-ia32': 0.28.2
+ '@esbuild/win32-x64': 0.28.2
+
@@ -16774,13 +17708,13 @@ snapshots:
lodash: 4.18.1
requireindex: 1.1.0
dependencies:
'@package-json/types': 0.0.12
'@typescript-eslint/types': 8.58.1
comment-parser: 1.4.7
debug: 4.4.3
- eslint: 9.39.4([email protected])
+ eslint: 9.39.4([email protected])
eslint-import-context: 0.1.9([email protected])
is-glob: 4.0.3
minimatch: 10.2.4
@@ -16788,18 +17722,19 @@ snapshots:
stable-hash-x: 0.2.0
unrs-resolver: 1.12.0
optionalDependencies:
- '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.71.1([email protected]([email protected]))([email protected])
eslint-import-resolver-node: 0.3.10
transitivePeerDependencies:
- supports-color
+ optional: true
dependencies:
'@package-json/types': 0.0.12
'@typescript-eslint/types': 8.58.1
comment-parser: 1.4.7
debug: 4.4.3
- eslint: 9.39.4([email protected])
+ eslint: 9.39.4([email protected])
eslint-import-context: 0.1.9([email protected])
is-glob: 4.0.3
minimatch: 10.2.4
@@ -16807,11 +17742,10 @@ snapshots:
stable-hash-x: 0.2.0
unrs-resolver: 1.12.0
optionalDependencies:
- '@typescript-eslint/utils': 8.71.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/utils': 8.71.1([email protected]([email protected]))([email protected])
eslint-import-resolver-node: 0.3.10
transitivePeerDependencies:
- supports-color
- optional: true
dependencies:
@@ -17591,6 +18525,15 @@ snapshots:
react: 19.2.3
react-dom: 19.2.3([email protected])
+ dependencies:
+ motion-dom: 14.6.0
+ motion-utils: 14.6.0
+ tslib: 2.8.1
+ optionalDependencies:
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+
@@ -17638,7 +18581,7 @@ snapshots:
optional: true
dependencies:
'@formatjs/intl-localematcher': 0.6.2
'@orama/orama': 3.1.18
@@ -17661,51 +18604,57 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
lucide-react: 1.0.1([email protected])
react: 19.2.3
react-dom: 19.2.3([email protected])
transitivePeerDependencies:
- supports-color
dependencies:
- '@formatjs/intl-localematcher': 0.6.2
- '@orama/orama': 3.1.18
- '@shikijs/rehype': 3.23.0
- '@shikijs/transformers': 3.23.0
+ '@fumari/image-size': 0.1.1
+ estree-util-value-to-estree: 3.5.0
github-slugger: 2.0.0
+ hast-util-from-dom: 5.0.1
hast-util-to-estree: 3.1.3
- hast-util-to-jsx-runtime: 2.3.6
- image-size: 2.0.2
- negotiator: 1.0.0
- npm-to-yarn: 3.0.1
- path-to-regexp: 8.3.0
- react-remove-scroll: 2.7.2(@types/[email protected])([email protected])
+ mdast-util-mdx: 3.0.0
+ micromark: 4.0.3
+ micromark-extension-gfm-table: 2.1.2
+ npm-to-yarn: 3.2.0
remark: 15.0.1
remark-gfm: 4.0.1
remark-rehype: 11.1.2
scroll-into-view-if-needed: 3.1.0
- shiki: 3.23.0
- unist-util-visit: 5.1.0
+ shiki: 4.5.0
+ tinyglobby: 0.2.17
+ unified: 11.0.5
+ vfile: 6.0.3
+ yaml: 2.9.1
+ zbsearch: 4.0.1
optionalDependencies:
+ '@mdx-js/mdx': 3.1.1
+ '@types/estree-jsx': 1.0.5
+ '@types/hast': 3.0.5
+ '@types/mdast': 4.0.4
'@types/react': 19.2.14
lucide-react: 1.0.1([email protected])
react: 19.2.3
react-dom: 19.2.3([email protected])
+ zod: 4.6.7
transitivePeerDependencies:
- supports-color
dependencies:
'@mdx-js/mdx': 3.1.1
'@standard-schema/spec': 1.1.0
chokidar: 4.0.3
esbuild: 0.25.12
estree-util-value-to-estree: 3.5.0
js-yaml: 4.1.1
lru-cache: 11.2.7
mdast-util-to-markdown: 2.1.2
@@ -17718,73 +18667,74 @@ snapshots:
unist-util-visit: 5.1.0
zod: 4.3.6
optionalDependencies:
react: 19.2.3
transitivePeerDependencies:
- supports-color
dependencies:
'@mdx-js/mdx': 3.1.1
'@standard-schema/spec': 1.1.0
- chokidar: 4.0.3
- esbuild: 0.25.12
+ chokidar: 6.0.0
+ esbuild: 0.28.2
estree-util-value-to-estree: 3.5.0
- js-yaml: 4.1.1
- lru-cache: 11.2.7
- mdast-util-to-markdown: 2.1.2
+ github-slugger: 2.0.0
+ magic-string: 1.4.3
+ mdast-util-mdx: 3.0.0
picocolors: 1.1.1
- remark-mdx: 3.1.1
- remark-parse: 11.0.0
- tinyexec: 1.0.4
- tinyglobby: 0.2.15
+ picomatch: 4.0.7
+ tinyexec: 1.3.1
+ tinyglobby: 0.2.17
unified: 11.0.5
- unist-util-visit: 5.1.0
- zod: 4.3.6
+ unist-util-remove-position: 5.0.0
+ vfile: 6.0.3
+ yaml: 2.9.1
+ yuku-analyzer: 0.19.0
+ zod: 4.6.7
optionalDependencies:
+ '@types/mdast': 4.0.4
+ '@types/mdx': 2.0.13
+ '@types/react': 19.2.14
react: 19.2.3
transitivePeerDependencies:
- supports-color
- dependencies:
- '@radix-ui/react-collapsible': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])
- '@radix-ui/react-navigation-menu': 1.2.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-scroll-area': 1.2.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-slot': 1.2.4(@types/[email protected])([email protected])
+ dependencies:
+ '@fumadocs/tailwind': 0.1.4([email protected])
+ '@radix-ui/react-direction': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-navigation-menu': 1.4.1(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-slot': 1.5.0(@types/[email protected])([email protected])
class-variance-authority: 0.7.1
- lodash.merge: 4.6.2
+ cn: 0.5.0
+ lucide-react: 1.61.0(@types/[email protected])([email protected])
- postcss-selector-parser: 7.1.1
react: 19.2.3
react-dom: 19.2.3([email protected])
- react-medium-image-zoom: 5.4.3([email protected]([email protected]))([email protected])
+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])
scroll-into-view-if-needed: 3.1.0
- tailwind-merge: 3.5.0
+ shiki: 4.5.0
optionalDependencies:
+ '@types/mdx': 2.0.13
'@types/react': 19.2.14
- tailwindcss: 4.2.2
transitivePeerDependencies:
- - '@mixedbread/sdk'
- - '@oramacloud/client'
- - '@tanstack/react-router'
- '@types/react-dom'
- - algoliasearch
- - lucide-react
- - react-router
- - supports-color
- - waku
+ - tailwindcss
@@ -18833,12 +19783,22 @@ snapshots:
dependencies:
react: 19.2.3
+ dependencies:
+ react: 19.2.3
+ optionalDependencies:
+ '@types/react': 19.2.14
+
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.6.0
+
dependencies:
'@npmcli/agent': 3.0.0
@@ -19481,10 +20441,10 @@ snapshots:
optionalDependencies:
micromark-util-types: 2.0.2
dependencies:
devlop: 1.1.0
- micromark: 4.0.2
+ micromark: 4.0.3
micromark-extension-cjk-friendly-util: 3.0.1([email protected])
micromark-util-chunked: 2.0.1
micromark-util-resolve-all: 2.0.1
@@ -19527,6 +20487,14 @@ snapshots:
micromark-util-symbol: 2.0.1
micromark-util-types: 2.0.2
+ dependencies:
+ devlop: 1.1.0
+ micromark-factory-space: 2.0.1
+ micromark-util-character: 2.1.1
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.2
+
dependencies:
micromark-util-types: 2.0.2
@@ -19686,6 +20654,10 @@ snapshots:
micromark-util-decode-numeric-character-reference: 2.0.2
micromark-util-symbol: 2.0.1
+ dependencies:
+ micromark-util-types: 2.0.2
+
@@ -19747,6 +20719,29 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ '@types/debug': 4.1.13
+ debug: 4.4.3
+ decode-named-character-reference: 1.3.0
+ devlop: 1.1.0
+ micromark-core-commonmark: 2.0.3
+ micromark-factory-space: 2.0.1
+ micromark-util-character: 2.1.1
+ micromark-util-chunked: 2.0.1
+ micromark-util-combine-extensions: 2.0.1
+ micromark-util-decode-numeric-character-reference: 2.0.2
+ micromark-util-edit-map: 1.0.0
+ micromark-util-encode: 2.0.1
+ micromark-util-normalize-identifier: 2.0.1
+ micromark-util-resolve-all: 2.0.1
+ micromark-util-sanitize-uri: 2.0.1
+ micromark-util-subtokenize: 2.1.0
+ micromark-util-symbol: 2.0.1
+ micromark-util-types: 2.0.2
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
braces: 3.0.3
@@ -19849,8 +20844,14 @@ snapshots:
dependencies:
motion-utils: 12.36.0
+ dependencies:
+ motion-utils: 14.6.0
+
+
dependencies:
@@ -19859,6 +20860,14 @@ snapshots:
react: 19.2.3
react-dom: 19.2.3([email protected])
+ dependencies:
+ tslib: 2.8.1
+ optionalDependencies:
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+
@@ -19928,12 +20937,12 @@ snapshots:
dependencies:
comment-json: 4.6.2
debug: 4.4.3
- tailwindcss: 3.4.19([email protected])
+ tailwindcss: 3.4.19([email protected])
transitivePeerDependencies:
- react
- react-native
@@ -19955,32 +20964,6 @@ snapshots:
react: 19.2.3
react-dom: 19.2.3([email protected])
- dependencies:
- '@next/env': 15.5.18
- '@swc/helpers': 0.5.15
- caniuse-lite: 1.0.30001780
- postcss: 8.5.26
- react: 19.2.3
- react-dom: 19.2.3([email protected])
- styled-jsx: 5.1.6([email protected])
- optionalDependencies:
- '@next/swc-darwin-arm64': 15.5.18
- '@next/swc-darwin-x64': 15.5.18
- '@next/swc-linux-arm64-gnu': 15.5.18
- '@next/swc-linux-arm64-musl': 15.5.18
- '@next/swc-linux-x64-gnu': 15.5.18
- '@next/swc-linux-x64-musl': 15.5.18
- '@next/swc-win32-arm64-msvc': 15.5.18
- '@next/swc-win32-x64-msvc': 15.5.18
- '@opentelemetry/api': 1.9.1
- '@playwright/test': 1.58.2
- babel-plugin-react-compiler: 1.0.0
- sharp: 0.34.5
- transitivePeerDependencies:
- - '@babel/core'
- - babel-plugin-macros
-
dependencies:
'@next/env': 16.3.8
@@ -20090,6 +21073,8 @@ snapshots:
+
dependencies:
boolbase: 1.0.0
@@ -20184,12 +21169,20 @@ snapshots:
+
dependencies:
oniguruma-parser: 0.12.1
regex: 6.1.0
regex-recursion: 6.0.2
+ dependencies:
+ oniguruma-parser: 0.12.2
+ regex: 6.1.0
+ regex-recursion: 6.0.2
+
dependencies:
default-browser: 5.5.0
@@ -20430,6 +21423,8 @@ snapshots:
+
@@ -20481,13 +21476,13 @@ snapshots:
camelcase-css: 2.0.1
postcss: 8.5.26
dependencies:
lilconfig: 3.1.3
optionalDependencies:
jiti: 1.21.7
postcss: 8.5.26
- yaml: 2.9.0
+ yaml: 2.9.1
dependencies:
@@ -20770,7 +21765,7 @@ snapshots:
dependencies:
react: 19.2.3
dependencies:
'@babel/runtime': 7.29.2
html-parse-stringify: 3.0.1
@@ -20779,7 +21774,6 @@ snapshots:
use-sync-external-store: 1.6.0([email protected])
optionalDependencies:
react-dom: 19.2.3([email protected])
- react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])
typescript: 5.9.3
@@ -20820,12 +21814,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- react: 19.2.3
- react-dom: 19.2.3([email protected])
-
dependencies:
'@babel/helper-module-imports': 7.28.6
'@babel/traverse': 7.29.0
@@ -20836,7 +21825,7 @@ snapshots:
react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])
semver: 7.7.4
- tailwindcss: 3.4.19([email protected])
+ tailwindcss: 3.4.19([email protected])
optionalDependencies:
react-native-safe-area-context: 5.7.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])
@@ -21096,6 +22085,8 @@ snapshots:
+
dependencies:
ast-types: 0.16.1
@@ -21252,10 +22243,10 @@ snapshots:
mdast-util-newline-to-break: 2.0.0
unified: 11.0.5
dependencies:
mdast-util-to-markdown-cjk-friendly: 1.0.0(@types/[email protected])([email protected])
- micromark-extension-cjk-friendly: 2.0.1([email protected])([email protected])
+ micromark-extension-cjk-friendly: 2.0.1([email protected])([email protected])
unified: 11.0.5
optionalDependencies:
'@types/mdast': 4.0.4
@@ -21647,38 +22638,6 @@ snapshots:
- dependencies:
- '@img/colour': 1.1.0
- detect-libc: 2.1.2
- semver: 7.7.4
- optionalDependencies:
- '@img/sharp-darwin-arm64': 0.34.5
- '@img/sharp-darwin-x64': 0.34.5
- '@img/sharp-libvips-darwin-arm64': 1.2.4
- '@img/sharp-libvips-darwin-x64': 1.2.4
- '@img/sharp-libvips-linux-arm': 1.2.4
- '@img/sharp-libvips-linux-arm64': 1.2.4
- '@img/sharp-libvips-linux-ppc64': 1.2.4
- '@img/sharp-libvips-linux-riscv64': 1.2.4
- '@img/sharp-libvips-linux-s390x': 1.2.4
- '@img/sharp-libvips-linux-x64': 1.2.4
- '@img/sharp-libvips-linuxmusl-arm64': 1.2.4
- '@img/sharp-libvips-linuxmusl-x64': 1.2.4
- '@img/sharp-linux-arm': 0.34.5
- '@img/sharp-linux-arm64': 0.34.5
- '@img/sharp-linux-ppc64': 0.34.5
- '@img/sharp-linux-riscv64': 0.34.5
- '@img/sharp-linux-s390x': 0.34.5
- '@img/sharp-linux-x64': 0.34.5
- '@img/sharp-linuxmusl-arm64': 0.34.5
- '@img/sharp-linuxmusl-x64': 0.34.5
- '@img/sharp-wasm32': 0.34.5
- '@img/sharp-win32-arm64': 0.34.5
- '@img/sharp-win32-ia32': 0.34.5
- '@img/sharp-win32-x64': 0.34.5
- optional: true
-
dependencies:
'@img/colour': 1.1.0
@@ -21742,6 +22701,17 @@ snapshots:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
+ dependencies:
+ '@shikijs/core': 4.5.0
+ '@shikijs/engine-javascript': 4.5.0
+ '@shikijs/engine-oniguruma': 4.5.0
+ '@shikijs/langs': 4.5.0
+ '@shikijs/themes': 4.5.0
+ '@shikijs/types': 4.5.0
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.5
+
dependencies:
es-errors: 1.3.0
@@ -22051,11 +23021,11 @@ snapshots:
dependencies:
- tailwindcss: 3.4.19([email protected])
+ tailwindcss: 3.4.19([email protected])
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -22074,7 +23044,7 @@ snapshots:
postcss: 8.5.26
postcss-import: 15.1.0([email protected])
postcss-js: 4.1.0([email protected])
postcss-nested: 6.2.0([email protected])
postcss-selector-parser: 6.1.2
resolve: 1.22.12
@@ -22139,6 +23109,8 @@ snapshots:
+
dependencies:
fdir: 6.5.0([email protected])
@@ -22288,14 +23260,14 @@ snapshots:
possible-typed-array-names: 1.1.0
reflect.getprototypeof: 1.0.10
dependencies:
- '@typescript-eslint/parser': 8.58.1([email protected]([email protected]))([email protected])
- '@typescript-eslint/typescript-estree': 8.58.1([email protected])
- '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/parser': 8.58.1([email protected]([email protected]))([email protected])
+ '@typescript-eslint/typescript-estree': 8.58.1([email protected])
+ '@typescript-eslint/utils': 8.58.1([email protected]([email protected]))([email protected])
eslint: 9.39.4([email protected])
- typescript: 5.9.3
+ typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -22522,7 +23494,7 @@ snapshots:
d3-time: 3.1.0
d3-timer: 3.0.1
dependencies:
lightningcss: 1.32.0
picomatch: 4.0.5
@@ -22535,12 +23507,12 @@ snapshots:
fsevents: 2.3.3
jiti: 2.7.0
terser: 5.47.1
- yaml: 2.9.0
+ yaml: 2.9.1
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
dependencies:
lightningcss: 1.32.0
picomatch: 4.0.5
@@ -22552,15 +23524,32 @@ snapshots:
fsevents: 2.3.3
jiti: 1.21.7
terser: 5.47.1
+ yaml: 2.9.1
+ transitivePeerDependencies:
+ - '@emnapi/core'
+ - '@emnapi/runtime'
+
+ dependencies:
+ lightningcss: 1.32.0
+ picomatch: 4.0.5
+ postcss: 8.5.26
+ rolldown: 1.0.0-rc.10(@emnapi/[email protected])(@emnapi/[email protected])
+ tinyglobby: 0.2.17
+ optionalDependencies:
+ '@types/node': 25.5.0
+ fsevents: 2.3.3
+ jiti: 2.7.0
+ terser: 5.47.1
yaml: 2.9.0
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
dependencies:
'@vitest/expect': 4.1.0
'@vitest/pretty-format': 4.1.0
'@vitest/runner': 4.1.0
'@vitest/snapshot': 4.1.0
@@ -22577,7 +23566,7 @@ snapshots:
tinyexec: 1.0.4
tinyglobby: 0.2.15
tinyrainbow: 3.1.0
why-is-node-running: 2.3.0
optionalDependencies:
'@opentelemetry/api': 1.9.1
@@ -22586,10 +23575,10 @@ snapshots:
transitivePeerDependencies:
- msw
dependencies:
'@vitest/expect': 4.1.0
'@vitest/pretty-format': 4.1.0
'@vitest/runner': 4.1.0
'@vitest/snapshot': 4.1.0
@@ -22606,7 +23595,7 @@ snapshots:
tinyexec: 1.0.4
tinyglobby: 0.2.15
tinyrainbow: 3.1.0
why-is-node-running: 2.3.0
optionalDependencies:
'@opentelemetry/api': 1.9.1
@@ -22615,10 +23604,10 @@ snapshots:
transitivePeerDependencies:
- msw
dependencies:
'@vitest/expect': 4.1.0
'@vitest/pretty-format': 4.1.0
'@vitest/runner': 4.1.0
'@vitest/snapshot': 4.1.0
@@ -22635,7 +23624,7 @@ snapshots:
tinyexec: 1.0.4
tinyglobby: 0.2.15
tinyrainbow: 3.1.0
why-is-node-running: 2.3.0
optionalDependencies:
'@opentelemetry/api': 1.9.1
@@ -22644,10 +23633,10 @@ snapshots:
transitivePeerDependencies:
- msw
dependencies:
'@vitest/expect': 4.1.0
'@vitest/pretty-format': 4.1.0
'@vitest/runner': 4.1.0
'@vitest/snapshot': 4.1.0
@@ -22664,7 +23653,7 @@ snapshots:
tinyexec: 1.0.4
tinyglobby: 0.2.15
tinyrainbow: 3.1.0
why-is-node-running: 2.3.0
optionalDependencies:
'@opentelemetry/api': 1.9.1
@@ -22860,6 +23849,8 @@ snapshots:
+
@@ -22878,6 +23869,35 @@ snapshots:
+ dependencies:
+ '@yuku-toolchain/types': 0.19.0
+ yuku-ast: 0.19.0
+ yuku-core: 0.19.0
+
+ dependencies:
+ '@yuku-toolchain/types': 0.19.0
+
+ dependencies:
+ '@yuku-toolchain/types': 0.19.0
+ optionalDependencies:
+ '@yuku-core/binding-android-arm64': 0.19.0
+ '@yuku-core/binding-darwin-arm64': 0.19.0
+ '@yuku-core/binding-darwin-x64': 0.19.0
+ '@yuku-core/binding-freebsd-x64': 0.19.0
+ '@yuku-core/binding-linux-arm-gnu': 0.19.0
+ '@yuku-core/binding-linux-arm-musl': 0.19.0
+ '@yuku-core/binding-linux-arm64-gnu': 0.19.0
+ '@yuku-core/binding-linux-arm64-musl': 0.19.0
+ '@yuku-core/binding-linux-x64-gnu': 0.19.0
+ '@yuku-core/binding-linux-x64-musl': 0.19.0
+ '@yuku-core/binding-win32-arm64': 0.19.0
+ '@yuku-core/binding-win32-x64': 0.19.0
+
+
dependencies:
zod: 3.25.76
@@ -22892,6 +23912,8 @@ snapshots:
+
optionalDependencies:
'@types/react': 19.2.14