@agent-native/core 0.76.10 → 0.76.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +13 -0
- package/corpus/core/docs/content/locales/ar-SA/actions.md +7 -7
- package/corpus/core/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/de-DE/actions.md +9 -9
- package/corpus/core/docs/content/locales/de-DE/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/es-ES/actions.md +9 -9
- package/corpus/core/docs/content/locales/es-ES/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/fr-FR/actions.md +9 -9
- package/corpus/core/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/hi-IN/actions.md +9 -9
- package/corpus/core/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ja-JP/actions.md +9 -9
- package/corpus/core/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ko-KR/actions.md +9 -9
- package/corpus/core/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/pt-BR/actions.md +9 -9
- package/corpus/core/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/zh-CN/actions.md +9 -9
- package/corpus/core/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/ErrorBoundary.tsx +151 -10
- package/corpus/core/src/client/FeedbackButton.tsx +162 -18
- package/corpus/core/src/client/blocks/library/AnnotatedCodeBlock.tsx +11 -2
- package/corpus/core/src/client/blocks/library/ApiEndpointBlock.tsx +46 -19
- package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +7 -5
- package/corpus/core/src/client/blocks/library/block-copy.ts +367 -0
- package/corpus/core/src/client/blocks/library/diagram.tsx +8 -6
- package/corpus/core/src/client/blocks/library/wireframe.tsx +7 -2
- package/corpus/core/src/client/i18n.tsx +4 -0
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +51 -31
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +26 -16
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +8 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +172 -107
- package/corpus/templates/analytics/app/i18n-data.ts +1076 -5
- package/corpus/templates/analytics/app/pages/Settings.tsx +2 -2
- package/corpus/templates/analytics/changelog/2026-06-24-analytics-navigation-command-palette-and-settings-now-honor-.md +6 -0
- package/corpus/templates/assets/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +0 -2
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -2
- package/corpus/templates/chat/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/hooks/use-library.ts +2 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-06-24-archive-and-spaces-navigation-is-more-resilient-when-sidebar.md +6 -0
- package/corpus/templates/content/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/design/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/forms/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/macros/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +4 -2
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +18 -12
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -5
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +36 -19
- package/corpus/templates/mail/app/components/email/EmailList.tsx +59 -55
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +7 -3
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +25 -16
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +25 -19
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +32 -17
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +26 -10
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +5 -3
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +4 -2
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +9 -5
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +4 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +168 -86
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +4 -2
- package/corpus/templates/mail/app/i18n/ar-SA.ts +212 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +212 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +212 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +212 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +212 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +212 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +212 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +212 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +212 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +211 -0
- package/corpus/templates/mail/app/root.tsx +90 -6
- package/corpus/templates/mail/changelog/2026-06-24-interface-language-support-now-covers-more-mail-controls-and.md +6 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/videos/app/components/layout/Header.tsx +1 -6
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +128 -7
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +142 -14
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +6 -2
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.js +14 -6
- package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +6 -4
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/block-copy.d.ts +33 -0
- package/dist/client/blocks/library/block-copy.d.ts.map +1 -0
- package/dist/client/blocks/library/block-copy.js +329 -0
- package/dist/client/blocks/library/block-copy.js.map +1 -0
- package/dist/client/blocks/library/diagram.d.ts.map +1 -1
- package/dist/client/blocks/library/diagram.js +7 -5
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe.js +4 -2
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/i18n.d.ts +1 -0
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +3 -0
- package/dist/client/i18n.js.map +1 -1
- package/docs/content/locales/ar-SA/actions.md +7 -7
- package/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/docs/content/locales/de-DE/actions.md +9 -9
- package/docs/content/locales/de-DE/template-plan.md +6 -4
- package/docs/content/locales/es-ES/actions.md +9 -9
- package/docs/content/locales/es-ES/template-plan.md +6 -4
- package/docs/content/locales/fr-FR/actions.md +9 -9
- package/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/docs/content/locales/hi-IN/actions.md +9 -9
- package/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/docs/content/locales/ja-JP/actions.md +9 -9
- package/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/docs/content/locales/ko-KR/actions.md +9 -9
- package/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/docs/content/locales/pt-BR/actions.md +9 -9
- package/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/docs/content/locales/zh-CN/actions.md +9 -9
- package/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/package.json +1 -1
|
@@ -85,9 +85,9 @@ actions के आसपास, कार्रवाई के लिए को
|
|
|
85
85
|
"language": "ts",
|
|
86
86
|
"code": "import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description: \"Reply to an email thread in the user's voice.\",\n schema: z.object({\n emailId: z.string().describe(\"The id of the email to reply to.\"),\n body: z.string().describe(\"The reply body, in markdown.\"),\n }),\n run: async ({ emailId, body }) => {\n await db.insert(replies).values({ emailId, body });\n return { ok: true, emailId };\n },\n});",
|
|
87
87
|
"annotations": [
|
|
88
|
-
{ "lines": "5", "label": "
|
|
88
|
+
{ "lines": "5", "label": "टूल सतह", "note": "`description` वह पाठ है जिसे एजेंट यह तय करने के लिए पढ़ता है कि इसे कब कॉल करना है। हर फ़ील्ड की `.describe()` कॉल JSON Schema में भी जाती है।" },
|
|
89
89
|
{ "lines": "6-9", "label": "टाइप किया हुआ अनुबंध", "note": "एक schema **हर** सतह से आने वाले input को validate करता है और model के लिए JSON Schema में बदलता है। अमान्य input कभी `run` तक नहीं पहुंचते।" },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "एक कार्यान्वयन", "note": "`run` का मुख्य भाग ही भरोसेमंद स्रोत है — UI बटन और एजेंट टूल दोनों यही चलाते हैं।" }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
`GET` कार्रवाई के लिए, `leadId` को क्वेरी पैरामीटर के रूप में पारित किया जाता है: `/_agent-native/actions/get-lead?leadId=abc`।
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="अपने आप mount हुआ action endpoint" method="GET" path="/_agent-native/actions/get-lead"
|
|
154
154
|
{
|
|
155
155
|
"method": "GET",
|
|
156
156
|
"path": "/_agent-native/actions/get-lead",
|
|
157
|
-
"summary": "
|
|
158
|
-
"description": "POST
|
|
159
|
-
"auth": "Session cookie; frontend calls
|
|
157
|
+
"summary": "हर action यहां अपने आप mount होता है - filename ही action name है।",
|
|
158
|
+
"description": "Default POST है; `http: { method: \"GET\" }` इसे GET बनाता है। React hooks और `callAction` हमेशा इस path को name से call करते हैं, चाहे कोई भी `http.path` override हो।",
|
|
159
|
+
"auth": "Session cookie; frontend calls `X-Agent-Native-Frontend: 1` लेकर चलते हैं",
|
|
160
160
|
"params": [
|
|
161
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET args
|
|
161
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET args query params के रूप में आते हैं; POST args JSON body में आते हैं।" }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "Action का return value JSON के रूप में।" },
|
|
165
|
+
{ "status": "400", "description": "run() चलने से पहले input schema validation में fail हुआ।" }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ Codex, Claude कोड, Markdown, या एक संरचित में
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="दो आदेश, एक समीक्षा सतह" summary="दोनों कमांड होस्ट किए गए प्लान MCP कनेक्टर के माध्यम से एक ही एनोटेट-और-टिप्पणी सतह पर प्रकाशित होते हैं।"
|
|
27
27
|
{
|
|
28
|
-
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\"
|
|
28
|
+
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">कोड से पहले — आर्किटेक्चर, UI, रिफैक्टर</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">कोड के बाद — PR, कमिट, ब्रांच, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Plan MCP कनेक्टर<br><small class=\"diagram-muted\">plan.agent-native.com</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-box\">समीक्षा सतह<br><small class=\"diagram-muted\">डायग्राम · वायरफ्रेम · एनोटेटेड कोड · टिप्पणियां</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">कोडिंग एजेंट<br><small class=\"diagram-muted\">feedback वापस भेजा गया</small></div></div>",
|
|
29
29
|
"css": ".diagram-plan{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.diagram-plan .diagram-col{display:flex;flex-direction:column;gap:10px}.diagram-plan .diagram-arrow{font-size:22px;line-height:1}.diagram-plan .center{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}"
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ Codex, Claude कोड, Markdown, या एक संरचित में
|
|
|
33
33
|
```an-wireframe
|
|
34
34
|
{
|
|
35
35
|
"surface": "desktop",
|
|
36
|
-
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'
|
|
36
|
+
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>चेकआउट रीडिज़ाइन योजना</h1><div style='flex:1'></div><button>साझा करें</button><button class='primary'>स्वीकृत करें</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>वर्तमान वायरफ्रेम</div><div class='wf-box'>प्रस्तावित वायरफ्रेम</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>कार्यान्वयन योजना</strong><div class='wf-box'>निर्णय: मौजूदा चेकआउट शेल रखें</div><div class='wf-box'>एनोटेटेड कोड walkthrough</div><div class='wf-box'>खुले प्रश्न</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>टिप्पणियाँ</strong><div class='wf-box'>प्राथमिक CTA पर पिन</div><div class='wf-box'>एजेंट के लिए प्रश्न</div><div class='wf-box'>हल किया गया copy note</div><button class='primary'>फ़ीडबैक वापस दें</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -570,7 +570,7 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
570
570
|
Read: ServerReadStub,
|
|
571
571
|
placement: ["block"],
|
|
572
572
|
label: "Risk card",
|
|
573
|
-
description: "
|
|
573
|
+
description: "low, medium या high severity वाला markdown risk note।",
|
|
574
574
|
});
|
|
575
575
|
|
|
576
576
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -622,7 +622,7 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
622
622
|
placement: ["block"],
|
|
623
623
|
editSurface: "panel",
|
|
624
624
|
label: "Risk card",
|
|
625
|
-
description: "
|
|
625
|
+
description: "low, medium या high severity वाला markdown risk note।",
|
|
626
626
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
627
|
});
|
|
628
628
|
|
|
@@ -85,9 +85,9 @@ actions 付近ですが、アクション自体の必要な前提条件ではあ
|
|
|
85
85
|
"language": "ts",
|
|
86
86
|
"code": "import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description: \"Reply to an email thread in the user's voice.\",\n schema: z.object({\n emailId: z.string().describe(\"The id of the email to reply to.\"),\n body: z.string().describe(\"The reply body, in markdown.\"),\n }),\n run: async ({ emailId, body }) => {\n await db.insert(replies).values({ emailId, body });\n return { ok: true, emailId };\n },\n});",
|
|
87
87
|
"annotations": [
|
|
88
|
-
{ "lines": "5", "label": "
|
|
88
|
+
{ "lines": "5", "label": "ツール面", "note": "`description` は、エージェントがこれをいつ呼び出すか判断するために読む内容です。各フィールドの `.describe()` も JSON Schema に反映されます。" },
|
|
89
89
|
{ "lines": "6-9", "label": "型付き契約", "note": "1つの schema が**すべて**のサーフェスからの入力を検証し、モデル向けに JSON Schema へ変換します。無効な入力が `run` に届くことはありません。" },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "単一の実装", "note": "`run` 本体が唯一の信頼できる実装です。UI ボタンとエージェントツールはどちらもこれをそのまま実行します。" }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
`GET` アクションの場合、`leadId` はクエリ パラメーター `/_agent-native/actions/get-lead?leadId=abc` として渡されます。
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="自動マウントされる action エンドポイント" method="GET" path="/_agent-native/actions/get-lead"
|
|
154
154
|
{
|
|
155
155
|
"method": "GET",
|
|
156
156
|
"path": "/_agent-native/actions/get-lead",
|
|
157
|
-
"summary": "
|
|
158
|
-
"description": "POST
|
|
159
|
-
"auth": "
|
|
157
|
+
"summary": "すべての action はここに自動でマウントされます。ファイル名が action 名になります。",
|
|
158
|
+
"description": "デフォルトは POST です。`http: { method: \"GET\" }` で GET になります。React hooks と `callAction` は、`http.path` の上書きに関係なく常にこのパスを名前で呼び出します。",
|
|
159
|
+
"auth": "セッション cookie。フロントエンド呼び出しには `X-Agent-Native-Frontend: 1` が付きます",
|
|
160
160
|
"params": [
|
|
161
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET
|
|
161
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET 引数は query params として届き、POST 引数は JSON body に届きます。" }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "action の戻り値を JSON として返します。" },
|
|
165
|
+
{ "status": "400", "description": "run() が実行される前に入力が schema 検証に失敗しました。" }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ Codex、Claude コード、Markdown、または構造化された実装計画に
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="2 つのコマンド、1 つのレビュー サーフェス" summary="どちらのコマンドも、ホストされた Plan MCP コネクタを介して、同じ注釈とコメントのサーフェスにパブリッシュされます。"
|
|
27
27
|
{
|
|
28
|
-
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\"
|
|
28
|
+
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">コード前 — アーキテクチャ、UI、リファクタ</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">コード後 — PR、コミット、ブランチ、diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Plan MCP コネクター<br><small class=\"diagram-muted\">plan.agent-native.com</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-box\">レビュー画面<br><small class=\"diagram-muted\">図 · ワイヤーフレーム · 注釈付きコード · コメント</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">コーディングエージェント<br><small class=\"diagram-muted\">フィードバックを返却</small></div></div>",
|
|
29
29
|
"css": ".diagram-plan{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.diagram-plan .diagram-col{display:flex;flex-direction:column;gap:10px}.diagram-plan .diagram-arrow{font-size:22px;line-height:1}.diagram-plan .center{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}"
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ Codex、Claude コード、Markdown、または構造化された実装計画に
|
|
|
33
33
|
```an-wireframe
|
|
34
34
|
{
|
|
35
35
|
"surface": "desktop",
|
|
36
|
-
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'
|
|
36
|
+
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>チェックアウト再設計計画</h1><div style='flex:1'></div><button>共有</button><button class='primary'>承認</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>現在のワイヤーフレーム</div><div class='wf-box'>提案ワイヤーフレーム</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>実装計画</strong><div class='wf-box'>判断:既存のチェックアウトシェルを維持</div><div class='wf-box'>注釈付きコードウォークスルー</div><div class='wf-box'>未解決の質問</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>コメント</strong><div class='wf-box'>主要 CTA へのピン</div><div class='wf-box'>エージェントへの質問</div><div class='wf-box'>解決済みコピー注記</div><button class='primary'>フィードバックを返す</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -569,7 +569,7 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
569
569
|
Read: ServerReadStub,
|
|
570
570
|
placement: ["block"],
|
|
571
571
|
label: "Risk card",
|
|
572
|
-
description: "
|
|
572
|
+
description: "low、medium、high の重大度を持つ markdown のリスクメモ。",
|
|
573
573
|
});
|
|
574
574
|
|
|
575
575
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -621,7 +621,7 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
621
621
|
placement: ["block"],
|
|
622
622
|
editSurface: "panel",
|
|
623
623
|
label: "Risk card",
|
|
624
|
-
description: "
|
|
624
|
+
description: "low、medium、high の重大度を持つ markdown のリスクメモ。",
|
|
625
625
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
626
626
|
});
|
|
627
627
|
|
|
@@ -85,9 +85,9 @@ actions 정도이며 작업 자체에 필요한 전제 조건은 아닙니다.
|
|
|
85
85
|
"language": "ts",
|
|
86
86
|
"code": "import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description: \"Reply to an email thread in the user's voice.\",\n schema: z.object({\n emailId: z.string().describe(\"The id of the email to reply to.\"),\n body: z.string().describe(\"The reply body, in markdown.\"),\n }),\n run: async ({ emailId, body }) => {\n await db.insert(replies).values({ emailId, body });\n return { ok: true, emailId };\n },\n});",
|
|
87
87
|
"annotations": [
|
|
88
|
-
{ "lines": "5", "label": "
|
|
88
|
+
{ "lines": "5", "label": "도구 표면", "note": "`description`은 에이전트가 이 액션을 언제 호출할지 판단하기 위해 읽는 내용입니다. 각 필드의 `.describe()` 호출도 JSON Schema에 들어갑니다." },
|
|
89
89
|
{ "lines": "6-9", "label": "타입 계약", "note": "하나의 schema가 **모든** 표면의 입력을 검증하고 모델용 JSON Schema로 변환합니다. 유효하지 않은 입력은 `run`에 도달하지 않습니다." },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "단일 구현", "note": "`run` 본문이 단일 진실 공급원입니다. UI 버튼과 에이전트 도구가 정확히 이것을 실행합니다." }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
`GET` 작업의 경우 `leadId`는 쿼리 매개변수 `/_agent-native/actions/get-lead?leadId=abc`로 전달됩니다.
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="자동 마운트된 action 엔드포인트" method="GET" path="/_agent-native/actions/get-lead"
|
|
154
154
|
{
|
|
155
155
|
"method": "GET",
|
|
156
156
|
"path": "/_agent-native/actions/get-lead",
|
|
157
|
-
"summary": "
|
|
158
|
-
"description": "POST
|
|
159
|
-
"auth": "
|
|
157
|
+
"summary": "모든 action은 여기에 자동으로 마운트됩니다. 파일 이름이 action 이름입니다.",
|
|
158
|
+
"description": "기본값은 POST입니다. `http: { method: \"GET\" }`는 이를 GET으로 만듭니다. React hooks와 `callAction`은 `http.path` override와 관계없이 항상 이름으로 이 경로를 호출합니다.",
|
|
159
|
+
"auth": "세션 쿠키; 프론트엔드 호출에는 `X-Agent-Native-Frontend: 1`이 포함됩니다",
|
|
160
160
|
"params": [
|
|
161
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET
|
|
161
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET 인수는 query params로 도착하고 POST 인수는 JSON body로 도착합니다." }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "action의 반환값을 JSON으로 반환합니다." },
|
|
165
|
+
{ "status": "400", "description": "run()이 실행되기 전에 입력이 schema validation에 실패했습니다." }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ Codex, Claude 코드, Markdown 또는 구조화된 구현 계획에 붙여넣기
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="두 개의 명령, 하나의 검토 표면" summary="두 명령 모두 호스팅된 Plan MCP 커넥터를 통해 동일한 주석 및 설명 화면에 게시됩니다."
|
|
27
27
|
{
|
|
28
|
-
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\"
|
|
28
|
+
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">코드 전 — 아키텍처, UI, 리팩터</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">코드 후 — PR, 커밋, 브랜치, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Plan MCP 커넥터<br><small class=\"diagram-muted\">plan.agent-native.com</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-box\">검토 화면<br><small class=\"diagram-muted\">다이어그램 · 와이어프레임 · 주석 코드 · 댓글</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">코딩 에이전트<br><small class=\"diagram-muted\">피드백 전달됨</small></div></div>",
|
|
29
29
|
"css": ".diagram-plan{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.diagram-plan .diagram-col{display:flex;flex-direction:column;gap:10px}.diagram-plan .diagram-arrow{font-size:22px;line-height:1}.diagram-plan .center{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}"
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ Codex, Claude 코드, Markdown 또는 구조화된 구현 계획에 붙여넣기
|
|
|
33
33
|
```an-wireframe
|
|
34
34
|
{
|
|
35
35
|
"surface": "desktop",
|
|
36
|
-
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'
|
|
36
|
+
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>결제 재설계 계획</h1><div style='flex:1'></div><button>공유</button><button class='primary'>승인</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>현재 와이어프레임</div><div class='wf-box'>제안 와이어프레임</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>구현 계획</strong><div class='wf-box'>결정: 기존 결제 셸 유지</div><div class='wf-box'>주석이 달린 코드 워크스루</div><div class='wf-box'>열린 질문</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>댓글</strong><div class='wf-box'>기본 CTA에 핀</div><div class='wf-box'>에이전트에게 묻는 질문</div><div class='wf-box'>해결된 문구 메모</div><button class='primary'>피드백 전달</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -570,7 +570,7 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
570
570
|
Read: ServerReadStub,
|
|
571
571
|
placement: ["block"],
|
|
572
572
|
label: "Risk card",
|
|
573
|
-
description: "
|
|
573
|
+
description: "low, medium, high 심각도를 가진 markdown 위험 메모입니다.",
|
|
574
574
|
});
|
|
575
575
|
|
|
576
576
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -622,7 +622,7 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
622
622
|
placement: ["block"],
|
|
623
623
|
editSurface: "panel",
|
|
624
624
|
label: "Risk card",
|
|
625
|
-
description: "
|
|
625
|
+
description: "low, medium, high 심각도를 가진 markdown 위험 메모입니다.",
|
|
626
626
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
627
|
});
|
|
628
628
|
|
|
@@ -85,9 +85,9 @@ em torno de actions, não é um pré-requisito obrigatório para a ação em si.
|
|
|
85
85
|
"language": "ts",
|
|
86
86
|
"code": "import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description: \"Reply to an email thread in the user's voice.\",\n schema: z.object({\n emailId: z.string().describe(\"The id of the email to reply to.\"),\n body: z.string().describe(\"The reply body, in markdown.\"),\n }),\n run: async ({ emailId, body }) => {\n await db.insert(replies).values({ emailId, body });\n return { ok: true, emailId };\n },\n});",
|
|
87
87
|
"annotations": [
|
|
88
|
-
{ "lines": "5", "label": "
|
|
88
|
+
{ "lines": "5", "label": "Superfície da ferramenta", "note": "`description` é o que o agente lê para decidir quando chamar isto. As chamadas `.describe()` de cada campo também entram no JSON Schema." },
|
|
89
89
|
{ "lines": "6-9", "label": "Contrato tipado", "note": "Um schema valida a entrada de **todas** as superfícies e é convertido em JSON Schema para o modelo. Entradas inválidas nunca chegam a `run`." },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "Uma implementação", "note": "O corpo de `run` é a fonte única da verdade: o botão da UI e a ferramenta do agente executam exatamente isto." }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
Para uma ação `GET`, `leadId` é passado como um parâmetro de consulta: `/_agent-native/actions/get-lead?leadId=abc`.
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="Endpoint de action montado automaticamente" method="GET" path="/_agent-native/actions/get-lead"
|
|
154
154
|
{
|
|
155
155
|
"method": "GET",
|
|
156
156
|
"path": "/_agent-native/actions/get-lead",
|
|
157
|
-
"summary": "
|
|
158
|
-
"description": "POST
|
|
159
|
-
"auth": "
|
|
157
|
+
"summary": "Cada action e montada aqui automaticamente: o nome do arquivo e o nome da action.",
|
|
158
|
+
"description": "POST por padrao; `http: { method: \"GET\" }` torna a chamada GET. Os hooks React e `callAction` sempre chamam este caminho pelo nome, independentemente de qualquer override de `http.path`.",
|
|
159
|
+
"auth": "Cookie de sessao; chamadas do frontend levam `X-Agent-Native-Frontend: 1`",
|
|
160
160
|
"params": [
|
|
161
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET
|
|
161
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "Argumentos GET chegam como query params; argumentos POST chegam no corpo JSON." }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "O valor de retorno da action como JSON." },
|
|
165
|
+
{ "status": "400", "description": "A entrada falhou na validacao de schema antes de run() executar." }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ agente da mesma maneira.
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="Dois comandos, uma superfície de revisão" summary="Ambos os comandos são publicados por meio do conector do Plano MCP hospedado na mesma superfície de anotação e comentário."
|
|
27
27
|
{
|
|
28
|
-
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">
|
|
28
|
+
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">antes do codigo: arquitetura, UI, refatoracao</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">depois do codigo: PR, commit, branch, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Conector MCP do Plan<br><small class=\"diagram-muted\">plan.agent-native.com</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-box\">Superficie de revisao<br><small class=\"diagram-muted\">diagramas · wireframes · codigo anotado · comentarios</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">Agente de codigo<br><small class=\"diagram-muted\">feedback devolvido</small></div></div>",
|
|
29
29
|
"css": ".diagram-plan{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.diagram-plan .diagram-col{display:flex;flex-direction:column;gap:10px}.diagram-plan .diagram-arrow{font-size:22px;line-height:1}.diagram-plan .center{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}"
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ agente da mesma maneira.
|
|
|
33
33
|
```an-wireframe
|
|
34
34
|
{
|
|
35
35
|
"surface": "desktop",
|
|
36
|
-
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>
|
|
36
|
+
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>Plano de redesenho do checkout</h1><div style='flex:1'></div><button>Compartilhar</button><button class='primary'>Aprovar</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Wireframe atual</div><div class='wf-box'>Wireframe proposto</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Plano de implementação</strong><div class='wf-box'>Decisão: manter o shell atual do checkout</div><div class='wf-box'>Passo a passo de código anotado</div><div class='wf-box'>Perguntas em aberto</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comentários</strong><div class='wf-box'>Pin no CTA principal</div><div class='wf-box'>Pergunta para o agente</div><div class='wf-box'>Nota de texto resolvida</div><button class='primary'>Devolver feedback</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -570,7 +570,8 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
570
570
|
Read: ServerReadStub,
|
|
571
571
|
placement: ["block"],
|
|
572
572
|
label: "Risk card",
|
|
573
|
-
description:
|
|
573
|
+
description:
|
|
574
|
+
"Uma nota de risco em markdown com severidade baixa, média ou alta.",
|
|
574
575
|
});
|
|
575
576
|
|
|
576
577
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -622,7 +623,8 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
622
623
|
placement: ["block"],
|
|
623
624
|
editSurface: "panel",
|
|
624
625
|
label: "Risk card",
|
|
625
|
-
description:
|
|
626
|
+
description:
|
|
627
|
+
"Uma nota de risco em markdown com severidade baixa, média ou alta.",
|
|
626
628
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
629
|
});
|
|
628
630
|
|
|
@@ -85,9 +85,9 @@ pnpm agent "Call hello for Steve and explain the result"
|
|
|
85
85
|
"language": "ts",
|
|
86
86
|
"code": "import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description: \"Reply to an email thread in the user's voice.\",\n schema: z.object({\n emailId: z.string().describe(\"The id of the email to reply to.\"),\n body: z.string().describe(\"The reply body, in markdown.\"),\n }),\n run: async ({ emailId, body }) => {\n await db.insert(replies).values({ emailId, body });\n return { ok: true, emailId };\n },\n});",
|
|
87
87
|
"annotations": [
|
|
88
|
-
{ "lines": "5", "label": "
|
|
88
|
+
{ "lines": "5", "label": "工具表面", "note": "`description` 是代理读取以决定何时调用此动作的内容。每个字段的 `.describe()` 也会进入 JSON Schema。" },
|
|
89
89
|
{ "lines": "6-9", "label": "类型化契约", "note": "一个 schema 会验证来自**每个**界面的输入,并转换为供模型使用的 JSON Schema。无效输入永远不会进入 `run`。" },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "单一实现", "note": "`run` 主体是唯一事实来源,UI 按钮和代理工具都会执行这一段。" }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
对于 `GET` 操作,`leadId` 作为查询参数传递:`/_agent-native/actions/get-lead?leadId=abc`。
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="自动挂载的 action 端点" method="GET" path="/_agent-native/actions/get-lead"
|
|
154
154
|
{
|
|
155
155
|
"method": "GET",
|
|
156
156
|
"path": "/_agent-native/actions/get-lead",
|
|
157
|
-
"summary": "
|
|
158
|
-
"description": "POST
|
|
159
|
-
"auth": "
|
|
157
|
+
"summary": "每个 action 都会自动挂载在这里 - 文件名就是 action 名称。",
|
|
158
|
+
"description": "默认是 POST;`http: { method: \"GET\" }` 会让它成为 GET。无论任何 `http.path` 覆盖如何,React hooks 和 `callAction` 始终按名称调用这个路径。",
|
|
159
|
+
"auth": "会话 cookie;前端调用会携带 `X-Agent-Native-Frontend: 1`",
|
|
160
160
|
"params": [
|
|
161
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET
|
|
161
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "GET 参数以查询参数传入;POST 参数以 JSON body 传入。" }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "action 的返回值,以 JSON 表示。" },
|
|
165
|
+
{ "status": "400", "description": "输入在 run() 触发前未通过 schema 验证。" }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ Codex、Claude 代码、Markdown 或将实施计划粘贴到结构化中
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="两个命令,一个查看界面" summary="这两个命令都通过托管的 Plan MCP 连接器发布到相同的注释和评论界面。"
|
|
27
27
|
{
|
|
28
|
-
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\"
|
|
28
|
+
"html": "<div class=\"diagram-plan\"><div class=\"diagram-col\"><div class=\"diagram-node\"><span class=\"diagram-pill accent\">/visual-plan</span><small class=\"diagram-muted\">写代码前 — 架构、UI、重构</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">写代码后 — PR、提交、分支、diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Plan MCP 连接器<br><small class=\"diagram-muted\">plan.agent-native.com</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-box\">审阅界面<br><small class=\"diagram-muted\">图表 · 线框图 · 带注释的代码 · 评论</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">编码代理<br><small class=\"diagram-muted\">反馈已交回</small></div></div>",
|
|
29
29
|
"css": ".diagram-plan{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.diagram-plan .diagram-col{display:flex;flex-direction:column;gap:10px}.diagram-plan .diagram-arrow{font-size:22px;line-height:1}.diagram-plan .center{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}"
|
|
30
30
|
}
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ Codex、Claude 代码、Markdown 或将实施计划粘贴到结构化中
|
|
|
33
33
|
```an-wireframe
|
|
34
34
|
{
|
|
35
35
|
"surface": "desktop",
|
|
36
|
-
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'
|
|
36
|
+
"html": "<div style='display:grid;grid-template-columns:1fr 250px;gap:14px;padding:16px;min-height:520px;box-sizing:border-box'><main style='display:flex;flex-direction:column;gap:12px;min-width:0'><div style='display:flex;align-items:center;gap:10px'><h1 style='margin:0'>结账改版计划</h1><div style='flex:1'></div><button>分享</button><button class='primary'>批准</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>当前线框图</div><div class='wf-box'>拟议线框图</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>实施计划</strong><div class='wf-box'>决策:保留现有结账外壳</div><div class='wf-box'>带注释的代码演练</div><div class='wf-box'>开放问题</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>评论</strong><div class='wf-box'>主 CTA 上的标注</div><div class='wf-box'>给代理的问题</div><div class='wf-box'>已解决的文案备注</div><button class='primary'>交回反馈</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -569,7 +569,7 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
569
569
|
Read: ServerReadStub,
|
|
570
570
|
placement: ["block"],
|
|
571
571
|
label: "Risk card",
|
|
572
|
-
description: "
|
|
572
|
+
description: "一条 markdown 风险说明,严重级别可为 low、medium 或 high。",
|
|
573
573
|
});
|
|
574
574
|
|
|
575
575
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -621,7 +621,7 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
621
621
|
placement: ["block"],
|
|
622
622
|
editSurface: "panel",
|
|
623
623
|
label: "Risk card",
|
|
624
|
-
description: "
|
|
624
|
+
description: "一条 markdown 风险说明,严重级别可为 low、medium 或 high。",
|
|
625
625
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
626
626
|
});
|
|
627
627
|
|