@agent-native/core 0.76.9 → 0.76.11
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 +1 -1
- package/corpus/core/CHANGELOG.md +39 -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/scripts/generate-og-font-data.mjs +9 -5
- package/corpus/core/src/client/AgentPanel.tsx +70 -1
- package/corpus/core/src/client/AssistantChat.tsx +1 -3
- package/corpus/core/src/client/ErrorBoundary.tsx +151 -10
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +0 -62
- package/corpus/core/src/client/composer/TiptapComposer.tsx +6 -13
- package/corpus/core/src/server/og-fonts-data.ts +7 -4
- package/corpus/core/src/server/og-fonts.ts +10 -3
- package/corpus/core/src/server/social-og-image.ts +45 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +199 -19
- 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/app/pages/adhoc/AdhocRouter.tsx +1 -21
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +35 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +3 -26
- package/corpus/templates/analytics/changelog/2026-06-24-analytics-navigation-command-palette-and-settings-now-honor-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-daily-dashboard-charts-now-use-local-day-buckets-and-show-th.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-loading-placeholders-now-span-the-available-page-w.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-dashboard-dates-now-align-to-pacific-time-for-da.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +19 -7
- 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/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/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +23 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -3
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- 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/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -17
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +5 -9
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/server/og-fonts-data.d.ts +1 -0
- package/dist/server/og-fonts-data.d.ts.map +1 -1
- package/dist/server/og-fonts-data.js +5 -4
- package/dist/server/og-fonts-data.js.map +1 -1
- package/dist/server/og-fonts.d.ts +1 -0
- package/dist/server/og-fonts.d.ts.map +1 -1
- package/dist/server/og-fonts.js +10 -4
- package/dist/server/og-fonts.js.map +1 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +33 -6
- package/dist/server/social-og-image.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
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.76.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b6701ee: Improve localization coverage by localizing framework error screens and docs UI surfaces, and add a baseline-aware i18n guard that fails on new raw visible UI strings.
|
|
8
|
+
|
|
9
|
+
## 0.76.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2be975e: Animate the standard agent sidebar drawer when it opens and closes.
|
|
14
|
+
- 2be975e: Durable background diagnostics: preserve the background-function worker's last
|
|
15
|
+
`diag_stage` (`route_entered` / `auth_failed` / etc., or `none` if it never
|
|
16
|
+
reached the route) in the foreground circuit-breaker's
|
|
17
|
+
`foreground_inline_recovery` detail instead of overwriting it. This makes a
|
|
18
|
+
silent worker death diagnosable from `/runs/active` without reading the
|
|
19
|
+
unreadable Netlify background-function logs. `readBackgroundRunClaim` now also
|
|
20
|
+
returns `diagStage`.
|
|
21
|
+
- 2be975e: Durable background agent runs: add a foreground **circuit-breaker** so a dead
|
|
22
|
+
background worker can no longer break chat. A Netlify async background function
|
|
23
|
+
returns `202` the instant it enqueues the invocation, but the worker may never
|
|
24
|
+
execute — e.g. the generated function wrapper fails to import `./main.mjs` or
|
|
25
|
+
hand off to the Nitro `_process-run` route, so it never reaches
|
|
26
|
+
`claimBackgroundRun` and the run is reaped as "worker never claimed the run".
|
|
27
|
+
After a successful dispatch the foreground now polls briefly for the worker to
|
|
28
|
+
actually claim the run; if it doesn't within the grace window, the turn is
|
|
29
|
+
recovered **inline** (the same safe atomic-claim path used for a fast dispatch
|
|
30
|
+
failure), so a dead worker degrades to a working synchronous turn instead of a
|
|
31
|
+
reaped failure. Also harden the generated background-function wrapper to pass
|
|
32
|
+
Netlify's `context` through to the Nitro handler and wrap the handoff in
|
|
33
|
+
try/catch so a pre-route failure is logged loudly instead of silently swallowed
|
|
34
|
+
behind the async 202.
|
|
35
|
+
- 2be975e: Bundle an Arabic-capable OG image font so localized Arabic docs previews render real text instead of missing-glyph boxes.
|
|
36
|
+
- 2be975e: Show a New chat button on full-page Ask chat surfaces with visible conversation tabs after a conversation starts.
|
|
37
|
+
- 2be975e: Add an `agentNative()` Vite plugin preset so app `vite.config.ts` files can use
|
|
38
|
+
Vite's native `defineConfig` while keeping Agent-Native framework defaults.
|
|
39
|
+
- 2be975e: Stop showing previous scoped chats in the empty chat state.
|
|
40
|
+
- 2be975e: Let the agent composer model picker shrink to its content instead of forcing a tall popover.
|
|
41
|
+
|
|
3
42
|
## 0.76.9
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
|
@@ -162,19 +162,19 @@ export default defineAction({
|
|
|
162
162
|
|
|
163
163
|
بالنسبة لإجراء `GET`، يتم تمرير `leadId` كمعلمة استعلام: `/_agent-native/actions/get-lead?leadId=abc`.
|
|
164
164
|
|
|
165
|
-
```an-api title="
|
|
165
|
+
```an-api title="نقطة نهاية action المثبتة تلقائيا" method="GET" path="/_agent-native/actions/get-lead"
|
|
166
166
|
{
|
|
167
167
|
"method": "GET",
|
|
168
168
|
"path": "/_agent-native/actions/get-lead",
|
|
169
|
-
"summary": "
|
|
170
|
-
"description": "
|
|
171
|
-
"auth": "
|
|
169
|
+
"summary": "كل action يثبت هنا تلقائيا - اسم الملف هو اسم action.",
|
|
170
|
+
"description": "الافتراضي هو POST؛ `http: { method: \"GET\" }` يجعلها GET. تستدعي React hooks و `callAction` هذا المسار دائما بالاسم، بغض النظر عن أي تجاوز `http.path`.",
|
|
171
|
+
"auth": "ملف تعريف ارتباط للجلسة؛ تحمل استدعاءات الواجهة `X-Agent-Native-Frontend: 1`",
|
|
172
172
|
"params": [
|
|
173
|
-
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "
|
|
173
|
+
{ "name": "leadId", "in": "query", "type": "string", "required": true, "description": "تصل وسائط GET كمعاملات query؛ وتصل وسائط POST في جسم JSON." }
|
|
174
174
|
],
|
|
175
175
|
"responses": [
|
|
176
|
-
{ "status": "200", "description": "
|
|
177
|
-
{ "status": "400", "description": "
|
|
176
|
+
{ "status": "200", "description": "قيمة إرجاع action بصيغة JSON." },
|
|
177
|
+
{ "status": "400", "description": "فشل الإدخال في التحقق من schema قبل تشغيل run()." }
|
|
178
178
|
]
|
|
179
179
|
}
|
|
180
180
|
```
|
|
@@ -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 و commit و branch و 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,8 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
570
570
|
Read: ServerReadStub,
|
|
571
571
|
placement: ["block"],
|
|
572
572
|
label: "Risk card",
|
|
573
|
-
description:
|
|
573
|
+
description:
|
|
574
|
+
"ملاحظة مخاطر بصيغة markdown بدرجة خطورة منخفضة أو متوسطة أو عالية.",
|
|
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
|
+
"ملاحظة مخاطر بصيغة markdown بدرجة خطورة منخفضة أو متوسطة أو عالية.",
|
|
626
628
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
629
|
});
|
|
628
630
|
|
|
@@ -85,9 +85,9 @@ um actions, keine erforderliche Voraussetzung für die Aktion selbst.
|
|
|
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": "Tool
|
|
88
|
+
{ "lines": "5", "label": "Tool-Oberflaeche", "note": "`description` liest der Agent, um zu entscheiden, wann er diese Action aufruft. Die `.describe()`-Aufrufe pro Feld fliessen ebenfalls ins JSON Schema." },
|
|
89
89
|
{ "lines": "6-9", "label": "Typisierter Vertrag", "note": "Ein schema validiert Eingaben von **jeder** Oberfläche und wird für das Modell in JSON Schema umgewandelt. Ungültige Eingaben erreichen `run` nie." },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "Eine Implementierung", "note": "Der `run`-Body ist die einzige Quelle der Wahrheit: UI-Button und Agent-Tool fuehren genau das aus." }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
Für eine `GET`-Aktion wird `leadId` als Abfrageparameter übergeben: `/_agent-native/actions/get-lead?leadId=abc`.
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="Automatisch gemounteter Action-Endpunkt" 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": "
|
|
159
|
-
"auth": "Session
|
|
157
|
+
"summary": "Jede Action wird hier automatisch gemountet - der Dateiname ist der Action-Name.",
|
|
158
|
+
"description": "Standard ist POST; `http: { method: \"GET\" }` macht daraus GET. React-Hooks und `callAction` rufen diesen Pfad immer per Namen auf, unabhaengig von jedem `http.path` Override.",
|
|
159
|
+
"auth": "Session-Cookie; Frontend-Aufrufe tragen `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-Argumente kommen als Query-Parameter an; POST-Argumente im JSON-Body." }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "Der Rueckgabewert der Action als JSON." },
|
|
165
|
+
{ "status": "400", "description": "Die Eingabe ist vor dem Start von run() an der Schema-Validierung gescheitert." }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ Agent auf die gleiche Weise.
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="Zwei Befehle, eine Überprüfungsoberfläche" summary="Beide Befehle veröffentlichen über den gehosteten Plan MCP-Connector in derselben Anmerkungs- und Kommentaroberfläche."
|
|
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\">vor dem Code: Architektur, UI, Refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">nach dem Code: PR, Commit, Branch, Diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Plan MCP-Connector<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\">Review-Oberflaeche<br><small class=\"diagram-muted\">Diagramme · Wireframes · annotierter Code · Kommentare</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">Coding Agent<br><small class=\"diagram-muted\">Feedback zurueckgegeben</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 @@ Agent auf die gleiche Weise.
|
|
|
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'>Plan fuer Checkout-Redesign</h1><div style='flex:1'></div><button>Teilen</button><button class='primary'>Genehmigen</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Aktuelles Wireframe</div><div class='wf-box'>Vorgeschlagenes Wireframe</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Implementierungsplan</strong><div class='wf-box'>Entscheidung: bestehende Checkout-Shell beibehalten</div><div class='wf-box'>Annotierte Code-Einfuehrung</div><div class='wf-box'>Offene Fragen</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Kommentare</strong><div class='wf-box'>Pin am primaeren CTA</div><div class='wf-box'>Frage an den Agenten</div><div class='wf-box'>Geklaerte Copy-Notiz</div><button class='primary'>Feedback zurueckgeben</button></aside></div>"
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -569,7 +569,8 @@ const riskCardServerBlock = defineBlock<RiskCardData>({
|
|
|
569
569
|
Read: ServerReadStub,
|
|
570
570
|
placement: ["block"],
|
|
571
571
|
label: "Risk card",
|
|
572
|
-
description:
|
|
572
|
+
description:
|
|
573
|
+
"Eine Markdown-Risiknotiz mit niedriger, mittlerer oder hoher Schwere.",
|
|
573
574
|
});
|
|
574
575
|
|
|
575
576
|
export function registerPlanBlocks(registry: BlockRegistry): void {
|
|
@@ -621,7 +622,8 @@ const riskCardBlock = defineBlock<RiskCardData>({
|
|
|
621
622
|
placement: ["block"],
|
|
622
623
|
editSurface: "panel",
|
|
623
624
|
label: "Risk card",
|
|
624
|
-
description:
|
|
625
|
+
description:
|
|
626
|
+
"Eine Markdown-Risiknotiz mit niedriger, mittlerer oder hoher Schwere.",
|
|
625
627
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
626
628
|
});
|
|
627
629
|
|
|
@@ -85,9 +85,9 @@ alrededor de actions, no es un requisito previo requerido para la acción en sí
|
|
|
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": "Superficie de herramienta", "note": "`description` es lo que lee el agente para decidir cuándo llamar a esto. Las llamadas `.describe()` de cada campo también pasan al JSON Schema." },
|
|
89
89
|
{ "lines": "6-9", "label": "Contrato tipado", "note": "Un schema valida la entrada de **todas** las superficies y se convierte a JSON Schema para el modelo. Las entradas no válidas nunca llegan a `run`." },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "Una implementación", "note": "El cuerpo de `run` es la única fuente de verdad: el botón de la UI y la herramienta del agente ejecutan exactamente esto." }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
Para una acción `GET`, se pasa `leadId` como parámetro de consulta: `/_agent-native/actions/get-lead?leadId=abc`.
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="Endpoint de accion 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 accion se monta aqui automaticamente: el nombre del archivo es el nombre de la accion.",
|
|
158
|
+
"description": "POST por defecto; `http: { method: \"GET\" }` lo convierte en GET. Los hooks de React y `callAction` siempre llaman a esta ruta por nombre, sin importar cualquier override de `http.path`.",
|
|
159
|
+
"auth": "Cookie de sesion; las llamadas del frontend llevan `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": "Los argumentos GET llegan como query params; los argumentos POST llegan en el cuerpo JSON." }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "El valor de retorno de la accion como JSON." },
|
|
165
|
+
{ "status": "400", "description": "La entrada fallo la validacion del schema antes de que run() se ejecutara." }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ agente de la misma manera.
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="Dos comandos, una superficie de revisión" summary="Ambos comandos publican a través del conector alojado Plan MCP en la misma superficie de anotaciones y comentarios."
|
|
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 del codigo: arquitectura, UI, refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">despues del codigo: PR, commit, rama, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Conector MCP de 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 revision<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 devuelto</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 de la misma manera.
|
|
|
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'>Plan de rediseño del checkout</h1><div style='flex:1'></div><button>Compartir</button><button class='primary'>Aprobar</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Wireframe actual</div><div class='wf-box'>Wireframe propuesto</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Plan de implementación</strong><div class='wf-box'>Decisión: conservar el shell actual del checkout</div><div class='wf-box'>Recorrido de código anotado</div><div class='wf-box'>Preguntas abiertas</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comentarios</strong><div class='wf-box'>Pin en el CTA principal</div><div class='wf-box'>Pregunta para el agente</div><div class='wf-box'>Nota de copy resuelta</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
|
+
"Una nota de riesgo en markdown con severidad baja, media o 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
|
+
"Una nota de riesgo en markdown con severidad baja, media o alta.",
|
|
626
628
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
629
|
});
|
|
628
630
|
|
|
@@ -85,9 +85,9 @@ autour de actions, pas une condition préalable requise pour l'action elle-même
|
|
|
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": "Surface d’outil", "note": "`description` est ce que l’agent lit pour décider quand appeler cette action. Les appels `.describe()` de chaque champ alimentent aussi le JSON Schema." },
|
|
89
89
|
{ "lines": "6-9", "label": "Contrat typé", "note": "Un schema valide les entrées de **chaque** surface et les convertit en JSON Schema pour le modèle. Les entrées invalides n’atteignent jamais `run`." },
|
|
90
|
-
{ "lines": "10-13", "label": "
|
|
90
|
+
{ "lines": "10-13", "label": "Une implémentation", "note": "Le corps de `run` est la source de vérité unique : le bouton de l’UI et l’outil de l’agent exécutent exactement ceci." }
|
|
91
91
|
]
|
|
92
92
|
}
|
|
93
93
|
```
|
|
@@ -150,19 +150,19 @@ export default defineAction({
|
|
|
150
150
|
|
|
151
151
|
Pour une action `GET`, `leadId` est transmis en tant que paramètre de requête : `/_agent-native/actions/get-lead?leadId=abc`.
|
|
152
152
|
|
|
153
|
-
```an-api title="
|
|
153
|
+
```an-api title="Point de terminaison action monte automatiquement" 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": "Chaque action est montee ici automatiquement : le nom du fichier est le nom de l action.",
|
|
158
|
+
"description": "POST par defaut ; `http: { method: \"GET\" }` en fait un GET. Les hooks React et `callAction` appellent toujours ce chemin par nom, quel que soit le remplacement `http.path`.",
|
|
159
|
+
"auth": "Cookie de session ; les appels frontend portent `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": "Les arguments GET arrivent en parametres de requete ; les arguments POST arrivent dans le corps JSON." }
|
|
162
162
|
],
|
|
163
163
|
"responses": [
|
|
164
|
-
{ "status": "200", "description": "
|
|
165
|
-
{ "status": "400", "description": "
|
|
164
|
+
{ "status": "200", "description": "La valeur de retour de l action en JSON." },
|
|
165
|
+
{ "status": "400", "description": "L entree a echoue a la validation du schema avant l execution de run()." }
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
```
|
|
@@ -25,7 +25,7 @@ agent de la même manière.
|
|
|
25
25
|
|
|
26
26
|
```an-diagram title="Deux commandes, une surface de révision" summary="Les deux commandes publient via le connecteur Plan MCP hébergé dans la même surface d'annotation et de commentaire."
|
|
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\">avant le code : architecture, UI, refactorisation</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">apres le code : PR, commit, branche, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">→</div><div class=\"diagram-panel center\">Connecteur MCP 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\">Surface de revue<br><small class=\"diagram-muted\">diagrammes · wireframes · code annote · commentaires</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">↔</div><div class=\"diagram-node\">Agent de code<br><small class=\"diagram-muted\">retours transmis</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 @@ agent de la même manière.
|
|
|
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'>Plan de refonte du checkout</h1><div style='flex:1'></div><button>Partager</button><button class='primary'>Approuver</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Wireframe actuel</div><div class='wf-box'>Wireframe proposé</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Plan d implémentation</strong><div class='wf-box'>Décision : conserver la coque de checkout existante</div><div class='wf-box'>Parcours de code annoté</div><div class='wf-box'>Questions ouvertes</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Commentaires</strong><div class='wf-box'>Épingle sur le CTA principal</div><div class='wf-box'>Question pour l agent</div><div class='wf-box'>Note de texte résolue</div><button class='primary'>Renvoyer les retours</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
|
+
"Une note de risque en markdown avec une sévérité faible, moyenne ou élevée.",
|
|
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
|
+
"Une note de risque en markdown avec une sévérité faible, moyenne ou élevée.",
|
|
626
628
|
empty: () => ({ severity: "medium", body: "Describe the risk." }),
|
|
627
629
|
});
|
|
628
630
|
|
|
@@ -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
|
```
|