@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.
Files changed (130) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +13 -0
  3. package/corpus/core/docs/content/locales/ar-SA/actions.md +7 -7
  4. package/corpus/core/docs/content/locales/ar-SA/template-plan.md +6 -4
  5. package/corpus/core/docs/content/locales/de-DE/actions.md +9 -9
  6. package/corpus/core/docs/content/locales/de-DE/template-plan.md +6 -4
  7. package/corpus/core/docs/content/locales/es-ES/actions.md +9 -9
  8. package/corpus/core/docs/content/locales/es-ES/template-plan.md +6 -4
  9. package/corpus/core/docs/content/locales/fr-FR/actions.md +9 -9
  10. package/corpus/core/docs/content/locales/fr-FR/template-plan.md +6 -4
  11. package/corpus/core/docs/content/locales/hi-IN/actions.md +9 -9
  12. package/corpus/core/docs/content/locales/hi-IN/template-plan.md +4 -4
  13. package/corpus/core/docs/content/locales/ja-JP/actions.md +9 -9
  14. package/corpus/core/docs/content/locales/ja-JP/template-plan.md +4 -4
  15. package/corpus/core/docs/content/locales/ko-KR/actions.md +9 -9
  16. package/corpus/core/docs/content/locales/ko-KR/template-plan.md +4 -4
  17. package/corpus/core/docs/content/locales/pt-BR/actions.md +9 -9
  18. package/corpus/core/docs/content/locales/pt-BR/template-plan.md +6 -4
  19. package/corpus/core/docs/content/locales/zh-CN/actions.md +9 -9
  20. package/corpus/core/docs/content/locales/zh-CN/template-plan.md +4 -4
  21. package/corpus/core/package.json +1 -1
  22. package/corpus/core/src/client/ErrorBoundary.tsx +151 -10
  23. package/corpus/core/src/client/FeedbackButton.tsx +162 -18
  24. package/corpus/core/src/client/blocks/library/AnnotatedCodeBlock.tsx +11 -2
  25. package/corpus/core/src/client/blocks/library/ApiEndpointBlock.tsx +46 -19
  26. package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +7 -5
  27. package/corpus/core/src/client/blocks/library/block-copy.ts +367 -0
  28. package/corpus/core/src/client/blocks/library/diagram.tsx +8 -6
  29. package/corpus/core/src/client/blocks/library/wireframe.tsx +7 -2
  30. package/corpus/core/src/client/i18n.tsx +4 -0
  31. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +51 -31
  32. package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +26 -16
  33. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -2
  34. package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +8 -1
  35. package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -5
  36. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +172 -107
  37. package/corpus/templates/analytics/app/i18n-data.ts +1076 -5
  38. package/corpus/templates/analytics/app/pages/Settings.tsx +2 -2
  39. package/corpus/templates/analytics/changelog/2026-06-24-analytics-navigation-command-palette-and-settings-now-honor-.md +6 -0
  40. package/corpus/templates/assets/app/components/layout/Header.tsx +0 -2
  41. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +0 -2
  42. package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -2
  43. package/corpus/templates/chat/app/components/layout/Header.tsx +1 -6
  44. package/corpus/templates/clips/app/components/layout/Header.tsx +1 -6
  45. package/corpus/templates/clips/app/hooks/use-library.ts +2 -0
  46. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +3 -1
  47. package/corpus/templates/clips/changelog/2026-06-24-archive-and-spaces-navigation-is-more-resilient-when-sidebar.md +6 -0
  48. package/corpus/templates/content/app/components/layout/Header.tsx +0 -2
  49. package/corpus/templates/design/app/components/layout/Header.tsx +1 -6
  50. package/corpus/templates/forms/app/components/layout/Header.tsx +1 -6
  51. package/corpus/templates/macros/app/components/layout/Header.tsx +1 -6
  52. package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +4 -2
  53. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +18 -12
  54. package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -5
  55. package/corpus/templates/mail/app/components/email/ComposeModal.tsx +36 -19
  56. package/corpus/templates/mail/app/components/email/EmailList.tsx +59 -55
  57. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +7 -3
  58. package/corpus/templates/mail/app/components/email/EmailThread.tsx +25 -16
  59. package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +25 -19
  60. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +32 -17
  61. package/corpus/templates/mail/app/components/email/RecipientInput.tsx +26 -10
  62. package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +5 -3
  63. package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +4 -2
  64. package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +9 -5
  65. package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +4 -2
  66. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +168 -86
  67. package/corpus/templates/mail/app/components/layout/SearchBar.tsx +4 -2
  68. package/corpus/templates/mail/app/i18n/ar-SA.ts +212 -0
  69. package/corpus/templates/mail/app/i18n/de-DE.ts +212 -0
  70. package/corpus/templates/mail/app/i18n/en-US.ts +212 -0
  71. package/corpus/templates/mail/app/i18n/es-ES.ts +212 -0
  72. package/corpus/templates/mail/app/i18n/fr-FR.ts +212 -0
  73. package/corpus/templates/mail/app/i18n/hi-IN.ts +212 -0
  74. package/corpus/templates/mail/app/i18n/ja-JP.ts +212 -0
  75. package/corpus/templates/mail/app/i18n/ko-KR.ts +212 -0
  76. package/corpus/templates/mail/app/i18n/pt-BR.ts +212 -0
  77. package/corpus/templates/mail/app/i18n/zh-CN.ts +211 -0
  78. package/corpus/templates/mail/app/root.tsx +90 -6
  79. package/corpus/templates/mail/changelog/2026-06-24-interface-language-support-now-covers-more-mail-controls-and.md +6 -0
  80. package/corpus/templates/plan/app/components/layout/Header.tsx +1 -6
  81. package/corpus/templates/slides/app/components/layout/Header.tsx +1 -6
  82. package/corpus/templates/videos/app/components/layout/Header.tsx +1 -6
  83. package/dist/client/ErrorBoundary.d.ts.map +1 -1
  84. package/dist/client/ErrorBoundary.js +128 -7
  85. package/dist/client/ErrorBoundary.js.map +1 -1
  86. package/dist/client/FeedbackButton.d.ts.map +1 -1
  87. package/dist/client/FeedbackButton.js +142 -14
  88. package/dist/client/FeedbackButton.js.map +1 -1
  89. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  90. package/dist/client/blocks/library/AnnotatedCodeBlock.js +6 -2
  91. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  92. package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
  93. package/dist/client/blocks/library/ApiEndpointBlock.js +14 -6
  94. package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
  95. package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -1
  96. package/dist/client/blocks/library/MermaidBlock.js +6 -4
  97. package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
  98. package/dist/client/blocks/library/block-copy.d.ts +33 -0
  99. package/dist/client/blocks/library/block-copy.d.ts.map +1 -0
  100. package/dist/client/blocks/library/block-copy.js +329 -0
  101. package/dist/client/blocks/library/block-copy.js.map +1 -0
  102. package/dist/client/blocks/library/diagram.d.ts.map +1 -1
  103. package/dist/client/blocks/library/diagram.js +7 -5
  104. package/dist/client/blocks/library/diagram.js.map +1 -1
  105. package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
  106. package/dist/client/blocks/library/wireframe.js +4 -2
  107. package/dist/client/blocks/library/wireframe.js.map +1 -1
  108. package/dist/client/i18n.d.ts +1 -0
  109. package/dist/client/i18n.d.ts.map +1 -1
  110. package/dist/client/i18n.js +3 -0
  111. package/dist/client/i18n.js.map +1 -1
  112. package/docs/content/locales/ar-SA/actions.md +7 -7
  113. package/docs/content/locales/ar-SA/template-plan.md +6 -4
  114. package/docs/content/locales/de-DE/actions.md +9 -9
  115. package/docs/content/locales/de-DE/template-plan.md +6 -4
  116. package/docs/content/locales/es-ES/actions.md +9 -9
  117. package/docs/content/locales/es-ES/template-plan.md +6 -4
  118. package/docs/content/locales/fr-FR/actions.md +9 -9
  119. package/docs/content/locales/fr-FR/template-plan.md +6 -4
  120. package/docs/content/locales/hi-IN/actions.md +9 -9
  121. package/docs/content/locales/hi-IN/template-plan.md +4 -4
  122. package/docs/content/locales/ja-JP/actions.md +9 -9
  123. package/docs/content/locales/ja-JP/template-plan.md +4 -4
  124. package/docs/content/locales/ko-KR/actions.md +9 -9
  125. package/docs/content/locales/ko-KR/template-plan.md +4 -4
  126. package/docs/content/locales/pt-BR/actions.md +9 -9
  127. package/docs/content/locales/pt-BR/template-plan.md +6 -4
  128. package/docs/content/locales/zh-CN/actions.md +9 -9
  129. package/docs/content/locales/zh-CN/template-plan.md +4 -4
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/client/i18n.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,OAAsC,MAAM,SAAS,CAAC;AAC7D,OAAc,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,sBAAsB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,GAK5B,MAAM,2BAA2B,CAAC;AAE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J,CAAC","sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { IconCheck, IconChevronDown, IconLanguage } from \"@tabler/icons-react\";\nimport i18next, { type i18n as I18nInstance } from \"i18next\";\nimport React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n I18nextProvider,\n initReactI18next,\n useTranslation,\n} from \"react-i18next\";\nimport { callAction } from \"./use-action.js\";\nimport { setClientAppState } from \"./application-state.js\";\nimport defaultEnglishMessages from \"../templates/default/app/i18n/en-US.js\";\nimport {\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n localeDirection,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n type LocaleCode,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"../localization/shared.js\";\n\nexport {\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n type LocaleCode,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"../localization/shared.js\";\nexport { getLocaleInitScript } from \"../localization/server.js\";\n\nexport type LocaleMessages = Record<string, unknown>;\n\nexport interface LocaleHydrationPayload {\n locale?: LocaleCode;\n preference?: LocalizationPreference;\n dir?: \"ltr\" | \"rtl\";\n messages?: LocaleMessages;\n}\n\nexport interface AgentNativeI18nCatalog {\n namespace?: string;\n sourceLocale?: LocaleCode;\n messages?: LocaleMessages;\n loadMessages?: (locale: LocaleCode) => Promise<LocaleMessages | null>;\n}\n\nexport interface AgentNativeI18nProviderProps {\n children: React.ReactNode;\n catalog?: AgentNativeI18nCatalog;\n initialLocale?: LocaleCode;\n initialPreference?: LocalizationPreference | LocalePreference;\n initialMessages?: LocaleMessages | null;\n persistPreference?: boolean;\n}\n\ninterface LocaleContextValue {\n locale: LocaleCode;\n sourceLocale: LocaleCode;\n preference: LocalePreference;\n dir: \"ltr\" | \"rtl\";\n metadata: LocaleMetadata;\n setPreference: (preference: LocalePreference) => Promise<void>;\n loading: boolean;\n}\n\ndeclare global {\n interface Window {\n __AGENT_NATIVE_LOCALE__?: LocaleHydrationPayload;\n }\n}\n\nconst LocaleContext = createContext<LocaleContextValue | null>(null);\n\nconst LANGUAGE_PICKER_COPY: Record<\n LocaleCode,\n { label: string; system: string; systemDescription: string }\n> = {\n \"en-US\": {\n label: \"Language\",\n system: \"System\",\n systemDescription: \"Use your browser language\",\n },\n \"zh-CN\": {\n label: \"语言\",\n system: \"系统\",\n systemDescription: \"使用浏览器语言\",\n },\n \"es-ES\": {\n label: \"Idioma\",\n system: \"Sistema\",\n systemDescription: \"Usar el idioma del navegador\",\n },\n \"fr-FR\": {\n label: \"Langue\",\n system: \"Système\",\n systemDescription: \"Utiliser la langue du navigateur\",\n },\n \"de-DE\": {\n label: \"Sprache\",\n system: \"System\",\n systemDescription: \"Browsersprache verwenden\",\n },\n \"ja-JP\": {\n label: \"言語\",\n system: \"システム\",\n systemDescription: \"ブラウザーの言語を使用\",\n },\n \"ko-KR\": {\n label: \"언어\",\n system: \"시스템\",\n systemDescription: \"브라우저 언어 사용\",\n },\n \"pt-BR\": {\n label: \"Idioma\",\n system: \"Sistema\",\n systemDescription: \"Usar o idioma do navegador\",\n },\n \"hi-IN\": {\n label: \"भाषा\",\n system: \"सिस्टम\",\n systemDescription: \"ब्राउज़र की भाषा का उपयोग करें\",\n },\n \"ar-SA\": {\n label: \"اللغة\",\n system: \"النظام\",\n systemDescription: \"استخدام لغة المتصفح\",\n },\n};\n\nfunction browserLanguageCandidates(): string[] {\n if (typeof navigator === \"undefined\") return [];\n return navigator.languages?.length\n ? [...navigator.languages]\n : navigator.language\n ? [navigator.language]\n : [];\n}\n\nfunction readStoredPreference(): LocalePreference | null {\n if (typeof window === \"undefined\") return null;\n try {\n return normalizeLocalizationPreference(\n window.localStorage.getItem(LOCALE_STORAGE_KEY),\n ).locale;\n } catch {\n return null;\n }\n}\n\nfunction writeStoredPreference(preference: LocalePreference) {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(LOCALE_STORAGE_KEY, preference);\n } catch {\n // Ignore storage-denied browsers; the in-memory provider state still works.\n }\n}\n\nfunction readHydrationPayload(): LocaleHydrationPayload {\n if (typeof window === \"undefined\") return {};\n return window[LOCALE_HYDRATION_GLOBAL] ?? {};\n}\n\nfunction resolveInitialState(args: {\n initialLocale?: LocaleCode;\n initialPreference?: LocalizationPreference | LocalePreference;\n}): { locale: LocaleCode; preference: LocalePreference } {\n const hydration = readHydrationPayload();\n const preference = normalizeLocalizationPreference(\n args.initialPreference ?? hydration.preference ?? readStoredPreference(),\n ).locale;\n const locale =\n args.initialLocale ??\n hydration.locale ??\n resolveLocaleFromPreference(preference, browserLanguageCandidates());\n return { locale, preference };\n}\n\nfunction normalizeLoadedMessages(value: unknown): LocaleMessages | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return null;\n const maybeDefault = (value as { default?: unknown }).default;\n if (\n maybeDefault &&\n typeof maybeDefault === \"object\" &&\n !Array.isArray(maybeDefault)\n ) {\n return maybeDefault as LocaleMessages;\n }\n return value as LocaleMessages;\n}\n\nfunction createI18nInstance(args: {\n namespace: string;\n sourceLocale: LocaleCode;\n messages: LocaleMessages;\n initialLocale: LocaleCode;\n initialMessages?: LocaleMessages | null;\n}): I18nInstance {\n const instance = i18next.createInstance();\n const resources: Record<string, Record<string, LocaleMessages>> = {\n [args.sourceLocale]: {\n [args.namespace]: args.messages,\n },\n };\n if (args.initialLocale !== args.sourceLocale && args.initialMessages) {\n resources[args.initialLocale] = {\n [args.namespace]: args.initialMessages,\n };\n }\n void instance.use(initReactI18next).init({\n resources,\n lng: args.initialLocale,\n fallbackLng: args.sourceLocale,\n defaultNS: args.namespace,\n ns: [args.namespace],\n interpolation: { escapeValue: false },\n react: { useSuspense: false },\n returnNull: false,\n initAsync: false,\n });\n return instance;\n}\n\nexport function AgentNativeI18nProvider({\n children,\n catalog,\n initialLocale,\n initialPreference,\n initialMessages,\n persistPreference = true,\n}: AgentNativeI18nProviderProps) {\n const namespace = catalog?.namespace ?? \"translation\";\n const sourceLocale = catalog?.sourceLocale ?? DEFAULT_LOCALE;\n const sourceMessages = catalog?.messages ?? {};\n const loadMessages = catalog?.loadMessages;\n const hydration = readHydrationPayload();\n const initialState = useMemo(\n () => resolveInitialState({ initialLocale, initialPreference }),\n [initialLocale, initialPreference],\n );\n const [preference, setPreferenceState] = useState<LocalePreference>(\n initialState.preference,\n );\n const [locale, setLocale] = useState<LocaleCode>(initialState.locale);\n const [loading, setLoading] = useState(false);\n const i18nRef = useRef<I18nInstance | null>(null);\n\n if (!i18nRef.current) {\n const preloadedMessages = normalizeLoadedMessages(\n hydration.locale === initialState.locale && hydration.messages\n ? hydration.messages\n : initialMessages,\n );\n i18nRef.current = createI18nInstance({\n namespace,\n sourceLocale,\n messages:\n hydration.locale === sourceLocale && hydration.messages\n ? hydration.messages\n : sourceMessages,\n initialLocale: initialState.locale,\n initialMessages: preloadedMessages,\n });\n }\n\n const i18n = i18nRef.current;\n\n useEffect(() => {\n if (i18n.hasResourceBundle(sourceLocale, namespace)) {\n i18n.addResourceBundle(\n sourceLocale,\n namespace,\n sourceMessages,\n true,\n true,\n );\n }\n }, [i18n, namespace, sourceLocale, sourceMessages]);\n\n useEffect(() => {\n const nextLocale =\n preference === \"system\"\n ? resolveLocaleFromCandidates(browserLanguageCandidates())\n : preference;\n setLocale(nextLocale);\n }, [preference]);\n\n useEffect(() => {\n let cancelled = false;\n\n async function applyLocale() {\n setLoading(true);\n try {\n if (\n locale !== sourceLocale &&\n !i18n.hasResourceBundle(locale, namespace)\n ) {\n const preloaded =\n hydration.locale === locale && hydration.messages\n ? hydration.messages\n : initialLocale === locale && initialMessages\n ? initialMessages\n : null;\n const loaded = preloaded ?? (await loadMessages?.(locale));\n const messages = normalizeLoadedMessages(loaded);\n if (messages) {\n i18n.addResourceBundle(locale, namespace, messages, true, true);\n }\n }\n if (!cancelled) {\n await i18n.changeLanguage(locale);\n }\n } finally {\n if (!cancelled) setLoading(false);\n }\n }\n\n void applyLocale();\n return () => {\n cancelled = true;\n };\n }, [\n hydration.locale,\n hydration.messages,\n i18n,\n initialLocale,\n initialMessages,\n loadMessages,\n locale,\n namespace,\n sourceLocale,\n ]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n const dir = localeDirection(locale);\n const root = document.documentElement;\n root.setAttribute(\"lang\", locale);\n root.setAttribute(\"dir\", dir);\n root.setAttribute(\"data-locale\", locale);\n }, [locale]);\n\n useEffect(() => {\n if (!persistPreference) return;\n let cancelled = false;\n callAction<LocalizationPreference>(\n \"get-localization-preference\",\n undefined,\n { method: \"GET\" },\n )\n .then((value) => {\n if (cancelled) return;\n const normalized = normalizeLocalizationPreference(value).locale;\n setPreferenceState(normalized);\n writeStoredPreference(normalized);\n })\n .catch(() => {\n // Anonymous/public routes use localStorage/browser language only.\n });\n return () => {\n cancelled = true;\n };\n }, [persistPreference]);\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n const onStorage = (event: StorageEvent) => {\n if (event.key !== LOCALE_STORAGE_KEY || event.newValue == null) return;\n setPreferenceState(\n normalizeLocalizationPreference(event.newValue).locale,\n );\n };\n window.addEventListener(\"storage\", onStorage);\n return () => window.removeEventListener(\"storage\", onStorage);\n }, []);\n\n useEffect(() => {\n void setClientAppState(\n \"localization\",\n {\n locale,\n preference,\n dir: localeDirection(locale),\n },\n { requestSource: \"localization\" },\n ).catch(() => {\n // Public/anonymous pages cannot write app-state; localization still works.\n });\n }, [locale, preference]);\n\n const setPreference = useCallback(\n async (next: LocalePreference) => {\n const normalized = normalizeLocalizationPreference(next).locale;\n setPreferenceState(normalized);\n writeStoredPreference(normalized);\n if (!persistPreference) return;\n try {\n await callAction<LocalizationPreference>(\n \"set-localization-preference\",\n {\n locale: normalized,\n },\n );\n } catch (error) {\n const status = (error as { status?: unknown })?.status;\n if (status !== 401 && status !== 403) {\n throw error;\n }\n }\n },\n [persistPreference],\n );\n\n const context = useMemo<LocaleContextValue>(\n () => ({\n locale,\n sourceLocale,\n preference,\n dir: localeDirection(locale),\n metadata: LOCALE_METADATA[locale],\n setPreference,\n loading,\n }),\n [loading, locale, preference, setPreference, sourceLocale],\n );\n\n return (\n <LocaleContext.Provider value={context}>\n <I18nextProvider i18n={i18n}>{children}</I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n\nexport function useLocale(): LocaleContextValue {\n const value = useContext(LocaleContext);\n if (!value) {\n throw new Error(\"useLocale must be used within AgentNativeI18nProvider\");\n }\n return value;\n}\n\nconst CORE_FALLBACK_MESSAGES: Record<string, string> = {\n \"runsTray.runs\": \"Runs\",\n \"runsTray.agentRuns\": \"Agent runs\",\n \"runsTray.activeRun_one\": \"{{count}} active run\",\n \"runsTray.activeRun_other\": \"{{count}} active runs\",\n \"runsTray.failedRun_one\": \"{{count}} failed run\",\n \"runsTray.failedRun_other\": \"{{count}} failed runs\",\n \"runsTray.recentRuns\": \"Recent runs\",\n \"runsTray.noRecentRuns\": \"No recent runs\",\n \"runsTray.ariaAgentRuns\": \"Agent runs, {{label}}\",\n \"runsTray.summaryRunning\": \"{{activeCount}} running\",\n \"runsTray.summaryRunningRecent\":\n \"{{activeCount}} running · {{terminalCount}} recent\",\n \"runsTray.summaryRecent_one\": \"{{count}} recent run\",\n \"runsTray.summaryRecent_other\": \"{{count}} recent runs\",\n \"runsTray.noTrackedWorkYet\": \"No tracked work yet\",\n \"runsTray.emptyDescription\":\n \"Background agent work will appear here while it runs and after it finishes.\",\n \"runsTray.open\": \"Open\",\n \"runsTray.stopRun\": \"Stop {{title}}\",\n \"runsTray.hideRun\": \"Hide {{title}}\",\n \"runsTray.statusRunning\": \"Running\",\n \"runsTray.statusDone\": \"Done\",\n \"runsTray.statusFailed\": \"Failed\",\n \"runsTray.statusStopped\": \"Stopped\",\n \"runsTray.updatedJustNow\": \"Updated just now\",\n \"runsTray.finishedJustNow\": \"Finished just now\",\n \"runsTray.updatedMinutes\": \"Updated {{count}}m ago\",\n \"runsTray.finishedMinutes\": \"Finished {{count}}m ago\",\n \"runsTray.updatedHours\": \"Updated {{count}}h ago\",\n \"runsTray.finishedHours\": \"Finished {{count}}h ago\",\n \"runsTray.updatedDate\": \"Updated {{date}}\",\n \"runsTray.finishedDate\": \"Finished {{date}}\",\n \"codeRequired.fallbackDetail\":\n \"Edit locally or use Builder.io to edit this code in the cloud and continue customizing the app any way you like.\",\n \"codeRequired.defaultFeature\": \"Make the requested code changes to this app\",\n \"codeRequired.branchError\": \"Failed to create branch\",\n \"codeRequired.title\": \"Code changes required\",\n \"codeRequired.subtitleWithFeature\":\n '\"{{feature}}\" creates or modifies source code, which needs Desktop or Builder from this surface.',\n \"codeRequired.subtitle\":\n \"This action creates or modifies source code, which needs Desktop or Builder from this surface.\",\n \"codeRequired.desktopTitle\": \"Use Agent Native Desktop\",\n \"codeRequired.desktopDescription\":\n \"Open the project in the desktop app to enable source edits and CLI access.\",\n \"codeRequired.builderAgentTitle\": \"Use Builder.io Agent\",\n \"codeRequired.builderAgentDescription\":\n \"Let our cloud agent make the changes for you. You'll get a link to preview and deploy.\",\n \"codeRequired.codeChangeTitle\": \"This requires a code change\",\n \"codeRequired.codeChangeBadge\": \"Code change\",\n \"codeRequired.connectBuilderTitle\": \"Connect Builder.io\",\n \"codeRequired.connectBuilderDescription\":\n \"Connect Builder to enable cloud-based code changes from this app.\",\n \"codeRequired.setupRequired\": \"Setup required\",\n \"codeRequired.branchCreated\": \"Branch created\",\n \"codeRequired.close\": \"Close\",\n \"agentPanel.useBuilder\": \"Use Builder\",\n \"agentPanel.openDesktopToEditCode\": \"Open Desktop to edit code\",\n \"agentPanel.codeUnavailableDescription\":\n \"Source-code changes and CLI access are available in the Agent Native Desktop app.\",\n \"agentPanel.downloadDesktop\": \"Download Desktop\",\n \"agentPanel.chatMode\": \"Chat mode\",\n \"agentPanel.chat\": \"Chat\",\n \"agentPanel.cliTerminalMode\": \"CLI terminal mode\",\n \"agentPanel.cli\": \"CLI\",\n \"agentPanel.workspaceMode\": \"Workspace files, agents, skills, and tasks\",\n \"agentPanel.workspace\": \"Workspace\",\n \"agentPanel.newChat\": \"New chat\",\n \"agentPanel.newTerminal\": \"New terminal\",\n \"agentPanel.panelOptions\": \"Agent panel options\",\n \"agentPanel.collapseSidebar\": \"Collapse sidebar\",\n \"agentPanel.hideChats\": \"Hide chats\",\n \"agentPanel.allChats\": \"All chats\",\n \"agentPanel.settings\": \"Settings\",\n \"agentPanel.feedback\": \"Feedback\",\n \"agentPanel.exitFullscreen\": \"Exit fullscreen\",\n \"agentPanel.fullscreen\": \"Fullscreen\",\n \"agentPanel.closeTab\": \"Close tab\",\n \"agentPanel.closeOtherTabs\": \"Close other tabs\",\n \"agentPanel.closeAllTabs\": \"Close all tabs\",\n \"agentPanel.clearChat\": \"Clear chat\",\n \"agentPanel.cliRequiresDevMode\": \"CLI requires dev mode\",\n \"agentPanel.cliRequiresDevModeDescription\":\n \"Run this app locally with pnpm dev or use Builder.io to access the CLI terminal.\",\n \"agentPanel.toggleAgent\": \"Toggle agent\",\n};\n\nfunction flattenMessages(\n value: unknown,\n prefix = \"\",\n out: Record<string, string> = {},\n) {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return out;\n for (const [key, child] of Object.entries(value)) {\n const nextKey = prefix ? `${prefix}.${key}` : key;\n if (typeof child === \"string\") {\n out[nextKey] = child;\n } else {\n flattenMessages(child, nextKey, out);\n }\n }\n return out;\n}\n\nconst DEFAULT_ENGLISH_MESSAGES = flattenMessages(defaultEnglishMessages);\n\nfunction interpolateFallbackMessage(\n template: string,\n options?: Record<string, unknown>,\n) {\n return template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, name: string) => {\n const value = options?.[name];\n return value == null ? \"\" : String(value);\n });\n}\n\nfunction fallbackMessage(key: string, options?: Record<string, unknown>) {\n const count = Number(options?.count);\n const pluralKey =\n Number.isFinite(count) && count === 1 ? `${key}_one` : `${key}_other`;\n const template =\n DEFAULT_ENGLISH_MESSAGES[pluralKey] ??\n DEFAULT_ENGLISH_MESSAGES[key] ??\n CORE_FALLBACK_MESSAGES[pluralKey] ??\n CORE_FALLBACK_MESSAGES[key];\n return template ? interpolateFallbackMessage(template, options) : key;\n}\n\nexport function useT() {\n const { i18n, t } = useTranslation();\n const context = useContext(LocaleContext);\n const sourceLocale = context?.sourceLocale ?? DEFAULT_LOCALE;\n return useCallback(\n (key: string, options?: Record<string, unknown>) => {\n const translated = t(key, options);\n if (translated !== key) return translated;\n const getFixedT = (\n i18n as { getFixedT?: (locale: LocaleCode) => typeof t }\n ).getFixedT;\n const sourceFallback = getFixedT?.(sourceLocale)(key, options);\n if (sourceFallback && sourceFallback !== key) return sourceFallback;\n return fallbackMessage(key, options);\n },\n [i18n, sourceLocale, t],\n );\n}\n\nexport function useFormatters() {\n const context = useContext(LocaleContext);\n const locale = context?.locale ?? DEFAULT_LOCALE;\n return useMemo(\n () => ({\n formatDate(\n value: Date | number | string,\n options?: Intl.DateTimeFormatOptions,\n ) {\n return new Intl.DateTimeFormat(locale, options).format(\n value instanceof Date ? value : new Date(value),\n );\n },\n formatNumber(value: number, options?: Intl.NumberFormatOptions) {\n return new Intl.NumberFormat(locale, options).format(value);\n },\n formatRelativeTime(\n value: number,\n unit: Intl.RelativeTimeFormatUnit,\n options?: Intl.RelativeTimeFormatOptions,\n ) {\n return new Intl.RelativeTimeFormat(locale, options).format(value, unit);\n },\n formatList(value: string[], options?: Intl.ListFormatOptions) {\n return new Intl.ListFormat(locale, options).format(value);\n },\n }),\n [locale],\n );\n}\n\nexport function LanguagePicker({\n className,\n includeSystem = true,\n label,\n variant = \"select\",\n}: {\n className?: string;\n includeSystem?: boolean;\n label?: string;\n variant?: \"select\" | \"icon\";\n}) {\n const { locale, preference, setPreference } = useLocale();\n const copy =\n LANGUAGE_PICKER_COPY[locale] ?? LANGUAGE_PICKER_COPY[DEFAULT_LOCALE];\n const resolvedLabel = label ?? copy.label;\n const options = [\n ...(includeSystem\n ? [\n {\n value: \"system\" as const,\n label: copy.system,\n description: copy.systemDescription,\n },\n ]\n : []),\n ...SUPPORTED_LOCALES.map((code) => ({\n value: code,\n label:\n LOCALE_METADATA[code].nativeName === LOCALE_METADATA[code].englishName\n ? LOCALE_METADATA[code].nativeName\n : `${LOCALE_METADATA[code].nativeName} (${LOCALE_METADATA[code].englishName})`,\n description: code,\n })),\n ];\n const selected = options.find((option) => option.value === preference);\n\n return (\n <div className={className}>\n <SelectPrimitive.Root\n value={preference}\n onValueChange={(value) =>\n void setPreference(normalizeLocalizationPreference(value).locale)\n }\n >\n <SelectPrimitive.Trigger\n className={\n variant === \"icon\"\n ? \"flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground\"\n : \"flex h-9 w-full items-center justify-between rounded-md border border-border bg-background px-3 text-start text-[12px] text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground\"\n }\n aria-label={resolvedLabel}\n title={selected?.label ?? resolvedLabel}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <IconLanguage className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n {variant === \"select\" ? (\n <SelectPrimitive.Value>\n <span className=\"truncate\">\n {selected?.label ?? preference}\n </span>\n </SelectPrimitive.Value>\n ) : null}\n </span>\n {variant === \"select\" ? (\n <SelectPrimitive.Icon asChild>\n <IconChevronDown className=\"h-3.5 w-3.5 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n ) : null}\n </SelectPrimitive.Trigger>\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n position=\"popper\"\n sideOffset={6}\n className={\n variant === \"icon\"\n ? \"z-[9999] min-w-56 overflow-hidden rounded-lg border border-border bg-popover shadow-lg\"\n : \"z-[9999] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover shadow-lg\"\n }\n >\n <SelectPrimitive.Viewport className=\"p-1\">\n {options.map((option) => (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n className=\"relative flex w-full cursor-pointer select-none items-start gap-2 rounded-md px-8 py-2.5 text-[12px] outline-none data-[highlighted]:bg-accent/60 data-[state=checked]:bg-accent/40\"\n >\n <span className=\"absolute start-2 top-2.5 flex h-4 w-4 items-center justify-center text-muted-foreground\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"h-3.5 w-3.5\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <div className=\"flex min-w-0 flex-col\">\n <SelectPrimitive.ItemText>\n <span className=\"text-foreground\">{option.label}</span>\n </SelectPrimitive.ItemText>\n <span className=\"mt-0.5 text-[11px] leading-relaxed text-muted-foreground\">\n {option.description}\n </span>\n </div>\n </SelectPrimitive.Item>\n ))}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/client/i18n.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,OAAsC,MAAM,SAAS,CAAC;AAC7D,OAAc,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,E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AAC,SAAS,EAAC,aAAa,GAAG,GACP,GAC3B,EACP,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,eAAe,CAAC,QAAQ,cACvB,eAAM,SAAS,EAAC,iBAAiB,YAAE,MAAM,CAAC,KAAK,GAAQ,GAC9B,EAC3B,eAAM,SAAS,EAAC,0DAA0D,YACvE,MAAM,CAAC,WAAW,GACd,IACH,KAhBD,MAAM,CAAC,KAAK,CAiBI,CACxB,CAAC,GACuB,GACH,GACH,IACJ,GACnB,CACP,CAAC;AACJ,CAAC","sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { IconCheck, IconChevronDown, IconLanguage } from \"@tabler/icons-react\";\nimport i18next, { type i18n as I18nInstance } from \"i18next\";\nimport React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n I18nextProvider,\n initReactI18next,\n useTranslation,\n} from \"react-i18next\";\nimport { callAction } from \"./use-action.js\";\nimport { setClientAppState } from \"./application-state.js\";\nimport defaultEnglishMessages from \"../templates/default/app/i18n/en-US.js\";\nimport {\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n localeDirection,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n type LocaleCode,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"../localization/shared.js\";\n\nexport {\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n type LocaleCode,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"../localization/shared.js\";\nexport { getLocaleInitScript } from \"../localization/server.js\";\n\nexport type LocaleMessages = Record<string, unknown>;\n\nexport interface LocaleHydrationPayload {\n locale?: LocaleCode;\n preference?: LocalizationPreference;\n dir?: \"ltr\" | \"rtl\";\n messages?: LocaleMessages;\n}\n\nexport interface AgentNativeI18nCatalog {\n namespace?: string;\n sourceLocale?: LocaleCode;\n messages?: LocaleMessages;\n loadMessages?: (locale: LocaleCode) => Promise<LocaleMessages | null>;\n}\n\nexport interface AgentNativeI18nProviderProps {\n children: React.ReactNode;\n catalog?: AgentNativeI18nCatalog;\n initialLocale?: LocaleCode;\n initialPreference?: LocalizationPreference | LocalePreference;\n initialMessages?: LocaleMessages | null;\n persistPreference?: boolean;\n}\n\ninterface LocaleContextValue {\n locale: LocaleCode;\n sourceLocale: LocaleCode;\n preference: LocalePreference;\n dir: \"ltr\" | \"rtl\";\n metadata: LocaleMetadata;\n setPreference: (preference: LocalePreference) => Promise<void>;\n loading: boolean;\n}\n\ndeclare global {\n interface Window {\n __AGENT_NATIVE_LOCALE__?: LocaleHydrationPayload;\n }\n}\n\nconst LocaleContext = createContext<LocaleContextValue | null>(null);\n\nconst LANGUAGE_PICKER_COPY: Record<\n LocaleCode,\n { label: string; system: string; systemDescription: string }\n> = {\n \"en-US\": {\n label: \"Language\",\n system: \"System\",\n systemDescription: \"Use your browser language\",\n },\n \"zh-CN\": {\n label: \"语言\",\n system: \"系统\",\n systemDescription: \"使用浏览器语言\",\n },\n \"es-ES\": {\n label: \"Idioma\",\n system: \"Sistema\",\n systemDescription: \"Usar el idioma del navegador\",\n },\n \"fr-FR\": {\n label: \"Langue\",\n system: \"Système\",\n systemDescription: \"Utiliser la langue du navigateur\",\n },\n \"de-DE\": {\n label: \"Sprache\",\n system: \"System\",\n systemDescription: \"Browsersprache verwenden\",\n },\n \"ja-JP\": {\n label: \"言語\",\n system: \"システム\",\n systemDescription: \"ブラウザーの言語を使用\",\n },\n \"ko-KR\": {\n label: \"언어\",\n system: \"시스템\",\n systemDescription: \"브라우저 언어 사용\",\n },\n \"pt-BR\": {\n label: \"Idioma\",\n system: \"Sistema\",\n systemDescription: \"Usar o idioma do navegador\",\n },\n \"hi-IN\": {\n label: \"भाषा\",\n system: \"सिस्टम\",\n systemDescription: \"ब्राउज़र की भाषा का उपयोग करें\",\n },\n \"ar-SA\": {\n label: \"اللغة\",\n system: \"النظام\",\n systemDescription: \"استخدام لغة المتصفح\",\n },\n};\n\nfunction browserLanguageCandidates(): string[] {\n if (typeof navigator === \"undefined\") return [];\n return navigator.languages?.length\n ? [...navigator.languages]\n : navigator.language\n ? [navigator.language]\n : [];\n}\n\nfunction readStoredPreference(): LocalePreference | null {\n if (typeof window === \"undefined\") return null;\n try {\n return normalizeLocalizationPreference(\n window.localStorage.getItem(LOCALE_STORAGE_KEY),\n ).locale;\n } catch {\n return null;\n }\n}\n\nfunction writeStoredPreference(preference: LocalePreference) {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(LOCALE_STORAGE_KEY, preference);\n } catch {\n // Ignore storage-denied browsers; the in-memory provider state still works.\n }\n}\n\nfunction readHydrationPayload(): LocaleHydrationPayload {\n if (typeof window === \"undefined\") return {};\n return window[LOCALE_HYDRATION_GLOBAL] ?? {};\n}\n\nfunction resolveInitialState(args: {\n initialLocale?: LocaleCode;\n initialPreference?: LocalizationPreference | LocalePreference;\n}): { locale: LocaleCode; preference: LocalePreference } {\n const hydration = readHydrationPayload();\n const preference = normalizeLocalizationPreference(\n args.initialPreference ?? hydration.preference ?? readStoredPreference(),\n ).locale;\n const locale =\n args.initialLocale ??\n hydration.locale ??\n resolveLocaleFromPreference(preference, browserLanguageCandidates());\n return { locale, preference };\n}\n\nfunction normalizeLoadedMessages(value: unknown): LocaleMessages | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return null;\n const maybeDefault = (value as { default?: unknown }).default;\n if (\n maybeDefault &&\n typeof maybeDefault === \"object\" &&\n !Array.isArray(maybeDefault)\n ) {\n return maybeDefault as LocaleMessages;\n }\n return value as LocaleMessages;\n}\n\nfunction createI18nInstance(args: {\n namespace: string;\n sourceLocale: LocaleCode;\n messages: LocaleMessages;\n initialLocale: LocaleCode;\n initialMessages?: LocaleMessages | null;\n}): I18nInstance {\n const instance = i18next.createInstance();\n const resources: Record<string, Record<string, LocaleMessages>> = {\n [args.sourceLocale]: {\n [args.namespace]: args.messages,\n },\n };\n if (args.initialLocale !== args.sourceLocale && args.initialMessages) {\n resources[args.initialLocale] = {\n [args.namespace]: args.initialMessages,\n };\n }\n void instance.use(initReactI18next).init({\n resources,\n lng: args.initialLocale,\n fallbackLng: args.sourceLocale,\n defaultNS: args.namespace,\n ns: [args.namespace],\n interpolation: { escapeValue: false },\n react: { useSuspense: false },\n returnNull: false,\n initAsync: false,\n });\n return instance;\n}\n\nexport function AgentNativeI18nProvider({\n children,\n catalog,\n initialLocale,\n initialPreference,\n initialMessages,\n persistPreference = true,\n}: AgentNativeI18nProviderProps) {\n const namespace = catalog?.namespace ?? \"translation\";\n const sourceLocale = catalog?.sourceLocale ?? DEFAULT_LOCALE;\n const sourceMessages = catalog?.messages ?? {};\n const loadMessages = catalog?.loadMessages;\n const hydration = readHydrationPayload();\n const initialState = useMemo(\n () => resolveInitialState({ initialLocale, initialPreference }),\n [initialLocale, initialPreference],\n );\n const [preference, setPreferenceState] = useState<LocalePreference>(\n initialState.preference,\n );\n const [locale, setLocale] = useState<LocaleCode>(initialState.locale);\n const [loading, setLoading] = useState(false);\n const i18nRef = useRef<I18nInstance | null>(null);\n\n if (!i18nRef.current) {\n const preloadedMessages = normalizeLoadedMessages(\n hydration.locale === initialState.locale && hydration.messages\n ? hydration.messages\n : initialMessages,\n );\n i18nRef.current = createI18nInstance({\n namespace,\n sourceLocale,\n messages:\n hydration.locale === sourceLocale && hydration.messages\n ? hydration.messages\n : sourceMessages,\n initialLocale: initialState.locale,\n initialMessages: preloadedMessages,\n });\n }\n\n const i18n = i18nRef.current;\n\n useEffect(() => {\n if (i18n.hasResourceBundle(sourceLocale, namespace)) {\n i18n.addResourceBundle(\n sourceLocale,\n namespace,\n sourceMessages,\n true,\n true,\n );\n }\n }, [i18n, namespace, sourceLocale, sourceMessages]);\n\n useEffect(() => {\n const nextLocale =\n preference === \"system\"\n ? resolveLocaleFromCandidates(browserLanguageCandidates())\n : preference;\n setLocale(nextLocale);\n }, [preference]);\n\n useEffect(() => {\n let cancelled = false;\n\n async function applyLocale() {\n setLoading(true);\n try {\n if (\n locale !== sourceLocale &&\n !i18n.hasResourceBundle(locale, namespace)\n ) {\n const preloaded =\n hydration.locale === locale && hydration.messages\n ? hydration.messages\n : initialLocale === locale && initialMessages\n ? initialMessages\n : null;\n const loaded = preloaded ?? (await loadMessages?.(locale));\n const messages = normalizeLoadedMessages(loaded);\n if (messages) {\n i18n.addResourceBundle(locale, namespace, messages, true, true);\n }\n }\n if (!cancelled) {\n await i18n.changeLanguage(locale);\n }\n } finally {\n if (!cancelled) setLoading(false);\n }\n }\n\n void applyLocale();\n return () => {\n cancelled = true;\n };\n }, [\n hydration.locale,\n hydration.messages,\n i18n,\n initialLocale,\n initialMessages,\n loadMessages,\n locale,\n namespace,\n sourceLocale,\n ]);\n\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n const dir = localeDirection(locale);\n const root = document.documentElement;\n root.setAttribute(\"lang\", locale);\n root.setAttribute(\"dir\", dir);\n root.setAttribute(\"data-locale\", locale);\n }, [locale]);\n\n useEffect(() => {\n if (!persistPreference) return;\n let cancelled = false;\n callAction<LocalizationPreference>(\n \"get-localization-preference\",\n undefined,\n { method: \"GET\" },\n )\n .then((value) => {\n if (cancelled) return;\n const normalized = normalizeLocalizationPreference(value).locale;\n setPreferenceState(normalized);\n writeStoredPreference(normalized);\n })\n .catch(() => {\n // Anonymous/public routes use localStorage/browser language only.\n });\n return () => {\n cancelled = true;\n };\n }, [persistPreference]);\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n const onStorage = (event: StorageEvent) => {\n if (event.key !== LOCALE_STORAGE_KEY || event.newValue == null) return;\n setPreferenceState(\n normalizeLocalizationPreference(event.newValue).locale,\n );\n };\n window.addEventListener(\"storage\", onStorage);\n return () => window.removeEventListener(\"storage\", onStorage);\n }, []);\n\n useEffect(() => {\n void setClientAppState(\n \"localization\",\n {\n locale,\n preference,\n dir: localeDirection(locale),\n },\n { requestSource: \"localization\" },\n ).catch(() => {\n // Public/anonymous pages cannot write app-state; localization still works.\n });\n }, [locale, preference]);\n\n const setPreference = useCallback(\n async (next: LocalePreference) => {\n const normalized = normalizeLocalizationPreference(next).locale;\n setPreferenceState(normalized);\n writeStoredPreference(normalized);\n if (!persistPreference) return;\n try {\n await callAction<LocalizationPreference>(\n \"set-localization-preference\",\n {\n locale: normalized,\n },\n );\n } catch (error) {\n const status = (error as { status?: unknown })?.status;\n if (status !== 401 && status !== 403) {\n throw error;\n }\n }\n },\n [persistPreference],\n );\n\n const context = useMemo<LocaleContextValue>(\n () => ({\n locale,\n sourceLocale,\n preference,\n dir: localeDirection(locale),\n metadata: LOCALE_METADATA[locale],\n setPreference,\n loading,\n }),\n [loading, locale, preference, setPreference, sourceLocale],\n );\n\n return (\n <LocaleContext.Provider value={context}>\n <I18nextProvider i18n={i18n}>{children}</I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n\nexport function useLocale(): LocaleContextValue {\n const value = useContext(LocaleContext);\n if (!value) {\n throw new Error(\"useLocale must be used within AgentNativeI18nProvider\");\n }\n return value;\n}\n\nexport function useOptionalLocale(): LocaleContextValue | null {\n return useContext(LocaleContext);\n}\n\nconst CORE_FALLBACK_MESSAGES: Record<string, string> = {\n \"runsTray.runs\": \"Runs\",\n \"runsTray.agentRuns\": \"Agent runs\",\n \"runsTray.activeRun_one\": \"{{count}} active run\",\n \"runsTray.activeRun_other\": \"{{count}} active runs\",\n \"runsTray.failedRun_one\": \"{{count}} failed run\",\n \"runsTray.failedRun_other\": \"{{count}} failed runs\",\n \"runsTray.recentRuns\": \"Recent runs\",\n \"runsTray.noRecentRuns\": \"No recent runs\",\n \"runsTray.ariaAgentRuns\": \"Agent runs, {{label}}\",\n \"runsTray.summaryRunning\": \"{{activeCount}} running\",\n \"runsTray.summaryRunningRecent\":\n \"{{activeCount}} running · {{terminalCount}} recent\",\n \"runsTray.summaryRecent_one\": \"{{count}} recent run\",\n \"runsTray.summaryRecent_other\": \"{{count}} recent runs\",\n \"runsTray.noTrackedWorkYet\": \"No tracked work yet\",\n \"runsTray.emptyDescription\":\n \"Background agent work will appear here while it runs and after it finishes.\",\n \"runsTray.open\": \"Open\",\n \"runsTray.stopRun\": \"Stop {{title}}\",\n \"runsTray.hideRun\": \"Hide {{title}}\",\n \"runsTray.statusRunning\": \"Running\",\n \"runsTray.statusDone\": \"Done\",\n \"runsTray.statusFailed\": \"Failed\",\n \"runsTray.statusStopped\": \"Stopped\",\n \"runsTray.updatedJustNow\": \"Updated just now\",\n \"runsTray.finishedJustNow\": \"Finished just now\",\n \"runsTray.updatedMinutes\": \"Updated {{count}}m ago\",\n \"runsTray.finishedMinutes\": \"Finished {{count}}m ago\",\n \"runsTray.updatedHours\": \"Updated {{count}}h ago\",\n \"runsTray.finishedHours\": \"Finished {{count}}h ago\",\n \"runsTray.updatedDate\": \"Updated {{date}}\",\n \"runsTray.finishedDate\": \"Finished {{date}}\",\n \"codeRequired.fallbackDetail\":\n \"Edit locally or use Builder.io to edit this code in the cloud and continue customizing the app any way you like.\",\n \"codeRequired.defaultFeature\": \"Make the requested code changes to this app\",\n \"codeRequired.branchError\": \"Failed to create branch\",\n \"codeRequired.title\": \"Code changes required\",\n \"codeRequired.subtitleWithFeature\":\n '\"{{feature}}\" creates or modifies source code, which needs Desktop or Builder from this surface.',\n \"codeRequired.subtitle\":\n \"This action creates or modifies source code, which needs Desktop or Builder from this surface.\",\n \"codeRequired.desktopTitle\": \"Use Agent Native Desktop\",\n \"codeRequired.desktopDescription\":\n \"Open the project in the desktop app to enable source edits and CLI access.\",\n \"codeRequired.builderAgentTitle\": \"Use Builder.io Agent\",\n \"codeRequired.builderAgentDescription\":\n \"Let our cloud agent make the changes for you. You'll get a link to preview and deploy.\",\n \"codeRequired.codeChangeTitle\": \"This requires a code change\",\n \"codeRequired.codeChangeBadge\": \"Code change\",\n \"codeRequired.connectBuilderTitle\": \"Connect Builder.io\",\n \"codeRequired.connectBuilderDescription\":\n \"Connect Builder to enable cloud-based code changes from this app.\",\n \"codeRequired.setupRequired\": \"Setup required\",\n \"codeRequired.branchCreated\": \"Branch created\",\n \"codeRequired.close\": \"Close\",\n \"agentPanel.useBuilder\": \"Use Builder\",\n \"agentPanel.openDesktopToEditCode\": \"Open Desktop to edit code\",\n \"agentPanel.codeUnavailableDescription\":\n \"Source-code changes and CLI access are available in the Agent Native Desktop app.\",\n \"agentPanel.downloadDesktop\": \"Download Desktop\",\n \"agentPanel.chatMode\": \"Chat mode\",\n \"agentPanel.chat\": \"Chat\",\n \"agentPanel.cliTerminalMode\": \"CLI terminal mode\",\n \"agentPanel.cli\": \"CLI\",\n \"agentPanel.workspaceMode\": \"Workspace files, agents, skills, and tasks\",\n \"agentPanel.workspace\": \"Workspace\",\n \"agentPanel.newChat\": \"New chat\",\n \"agentPanel.newTerminal\": \"New terminal\",\n \"agentPanel.panelOptions\": \"Agent panel options\",\n \"agentPanel.collapseSidebar\": \"Collapse sidebar\",\n \"agentPanel.hideChats\": \"Hide chats\",\n \"agentPanel.allChats\": \"All chats\",\n \"agentPanel.settings\": \"Settings\",\n \"agentPanel.feedback\": \"Feedback\",\n \"agentPanel.exitFullscreen\": \"Exit fullscreen\",\n \"agentPanel.fullscreen\": \"Fullscreen\",\n \"agentPanel.closeTab\": \"Close tab\",\n \"agentPanel.closeOtherTabs\": \"Close other tabs\",\n \"agentPanel.closeAllTabs\": \"Close all tabs\",\n \"agentPanel.clearChat\": \"Clear chat\",\n \"agentPanel.cliRequiresDevMode\": \"CLI requires dev mode\",\n \"agentPanel.cliRequiresDevModeDescription\":\n \"Run this app locally with pnpm dev or use Builder.io to access the CLI terminal.\",\n \"agentPanel.toggleAgent\": \"Toggle agent\",\n};\n\nfunction flattenMessages(\n value: unknown,\n prefix = \"\",\n out: Record<string, string> = {},\n) {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return out;\n for (const [key, child] of Object.entries(value)) {\n const nextKey = prefix ? `${prefix}.${key}` : key;\n if (typeof child === \"string\") {\n out[nextKey] = child;\n } else {\n flattenMessages(child, nextKey, out);\n }\n }\n return out;\n}\n\nconst DEFAULT_ENGLISH_MESSAGES = flattenMessages(defaultEnglishMessages);\n\nfunction interpolateFallbackMessage(\n template: string,\n options?: Record<string, unknown>,\n) {\n return template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, name: string) => {\n const value = options?.[name];\n return value == null ? \"\" : String(value);\n });\n}\n\nfunction fallbackMessage(key: string, options?: Record<string, unknown>) {\n const count = Number(options?.count);\n const pluralKey =\n Number.isFinite(count) && count === 1 ? `${key}_one` : `${key}_other`;\n const template =\n DEFAULT_ENGLISH_MESSAGES[pluralKey] ??\n DEFAULT_ENGLISH_MESSAGES[key] ??\n CORE_FALLBACK_MESSAGES[pluralKey] ??\n CORE_FALLBACK_MESSAGES[key];\n return template ? interpolateFallbackMessage(template, options) : key;\n}\n\nexport function useT() {\n const { i18n, t } = useTranslation();\n const context = useContext(LocaleContext);\n const sourceLocale = context?.sourceLocale ?? DEFAULT_LOCALE;\n return useCallback(\n (key: string, options?: Record<string, unknown>) => {\n const translated = t(key, options);\n if (translated !== key) return translated;\n const getFixedT = (\n i18n as { getFixedT?: (locale: LocaleCode) => typeof t }\n ).getFixedT;\n const sourceFallback = getFixedT?.(sourceLocale)(key, options);\n if (sourceFallback && sourceFallback !== key) return sourceFallback;\n return fallbackMessage(key, options);\n },\n [i18n, sourceLocale, t],\n );\n}\n\nexport function useFormatters() {\n const context = useContext(LocaleContext);\n const locale = context?.locale ?? DEFAULT_LOCALE;\n return useMemo(\n () => ({\n formatDate(\n value: Date | number | string,\n options?: Intl.DateTimeFormatOptions,\n ) {\n return new Intl.DateTimeFormat(locale, options).format(\n value instanceof Date ? value : new Date(value),\n );\n },\n formatNumber(value: number, options?: Intl.NumberFormatOptions) {\n return new Intl.NumberFormat(locale, options).format(value);\n },\n formatRelativeTime(\n value: number,\n unit: Intl.RelativeTimeFormatUnit,\n options?: Intl.RelativeTimeFormatOptions,\n ) {\n return new Intl.RelativeTimeFormat(locale, options).format(value, unit);\n },\n formatList(value: string[], options?: Intl.ListFormatOptions) {\n return new Intl.ListFormat(locale, options).format(value);\n },\n }),\n [locale],\n );\n}\n\nexport function LanguagePicker({\n className,\n includeSystem = true,\n label,\n variant = \"select\",\n}: {\n className?: string;\n includeSystem?: boolean;\n label?: string;\n variant?: \"select\" | \"icon\";\n}) {\n const { locale, preference, setPreference } = useLocale();\n const copy =\n LANGUAGE_PICKER_COPY[locale] ?? LANGUAGE_PICKER_COPY[DEFAULT_LOCALE];\n const resolvedLabel = label ?? copy.label;\n const options = [\n ...(includeSystem\n ? [\n {\n value: \"system\" as const,\n label: copy.system,\n description: copy.systemDescription,\n },\n ]\n : []),\n ...SUPPORTED_LOCALES.map((code) => ({\n value: code,\n label:\n LOCALE_METADATA[code].nativeName === LOCALE_METADATA[code].englishName\n ? LOCALE_METADATA[code].nativeName\n : `${LOCALE_METADATA[code].nativeName} (${LOCALE_METADATA[code].englishName})`,\n description: code,\n })),\n ];\n const selected = options.find((option) => option.value === preference);\n\n return (\n <div className={className}>\n <SelectPrimitive.Root\n value={preference}\n onValueChange={(value) =>\n void setPreference(normalizeLocalizationPreference(value).locale)\n }\n >\n <SelectPrimitive.Trigger\n className={\n variant === \"icon\"\n ? \"flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground\"\n : \"flex h-9 w-full items-center justify-between rounded-md border border-border bg-background px-3 text-start text-[12px] text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground\"\n }\n aria-label={resolvedLabel}\n title={selected?.label ?? resolvedLabel}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <IconLanguage className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n {variant === \"select\" ? (\n <SelectPrimitive.Value>\n <span className=\"truncate\">\n {selected?.label ?? preference}\n </span>\n </SelectPrimitive.Value>\n ) : null}\n </span>\n {variant === \"select\" ? (\n <SelectPrimitive.Icon asChild>\n <IconChevronDown className=\"h-3.5 w-3.5 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n ) : null}\n </SelectPrimitive.Trigger>\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n position=\"popper\"\n sideOffset={6}\n className={\n variant === \"icon\"\n ? \"z-[9999] min-w-56 overflow-hidden rounded-lg border border-border bg-popover shadow-lg\"\n : \"z-[9999] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover shadow-lg\"\n }\n >\n <SelectPrimitive.Viewport className=\"p-1\">\n {options.map((option) => (\n <SelectPrimitive.Item\n key={option.value}\n value={option.value}\n className=\"relative flex w-full cursor-pointer select-none items-start gap-2 rounded-md px-8 py-2.5 text-[12px] outline-none data-[highlighted]:bg-accent/60 data-[state=checked]:bg-accent/40\"\n >\n <span className=\"absolute start-2 top-2.5 flex h-4 w-4 items-center justify-center text-muted-foreground\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"h-3.5 w-3.5\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <div className=\"flex min-w-0 flex-col\">\n <SelectPrimitive.ItemText>\n <span className=\"text-foreground\">{option.label}</span>\n </SelectPrimitive.ItemText>\n <span className=\"mt-0.5 text-[11px] leading-relaxed text-muted-foreground\">\n {option.description}\n </span>\n </div>\n </SelectPrimitive.Item>\n ))}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n </div>\n );\n}\n"]}
@@ -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="The auto-mounted action endpoint" method="GET" path="/_agent-native/actions/get-lead"
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": "Every action is mounted here automatically the filename is the action name.",
170
- "description": "POST by default; `http: { method: \"GET\" }` makes it a GET. The React hooks and `callAction` always call this path by name, regardless of any `http.path` override.",
171
- "auth": "Session cookie; frontend calls carry `X-Agent-Native-Frontend: 1`",
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": "GET args arrive as query params; POST args arrive in the JSON body." }
173
+ { "name": "leadId", "in": "query", "type": "string", "required": true, "description": "تصل وسائط GET كمعاملات query؛ وتصل وسائط POST في جسم JSON." }
174
174
  ],
175
175
  "responses": [
176
- { "status": "200", "description": "The action's return value as JSON." },
177
- { "status": "400", "description": "Input failed schema validation before run() fired." }
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\">before code architecture, UI, refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">after code PR, commit, branch, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&rarr;</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\">&rarr;</div><div class=\"diagram-box\">Review surface<br><small class=\"diagram-muted\">diagrams · wireframes · annotated code · comments</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&harr;</div><div class=\"diagram-node\">Coding agent<br><small class=\"diagram-muted\">feedback handed back</small></div></div>",
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\">&rarr;</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\">&rarr;</div><div class=\"diagram-box\">سطح المراجعة<br><small class=\"diagram-muted\">مخططات · إطارات سلكية · كود مشروح · تعليقات</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&harr;</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'>Checkout redesign plan</h1><div style='flex:1'></div><button>مشاركة</button><button class='primary'>Approve</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Current wireframe</div><div class='wf-box'>Proposed wireframe</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Implementation plan</strong><div class='wf-box'>Decision: keep existing checkout shell</div><div class='wf-box'>Annotated code walkthrough</div><div class='wf-box'>Open questions</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comments</strong><div class='wf-box'>Pin on primary CTA</div><div class='wf-box'>Question for agent</div><div class='wf-box'>Resolved copy note</div><button class='primary'>Hand back feedback</button></aside></div>"
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: "A markdown risk note with a low, medium, or high severity.",
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: "A markdown risk note with a low, medium, or high severity.",
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 surface", "note": "`description` is what the agent reads to decide when to call this. The per-field `.describe()` calls flow into the JSON Schema too." },
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": "One implementation", "note": "The `run` body is the single source of truth — the UI button and the agent tool both execute exactly this." }
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="The auto-mounted action endpoint" method="GET" path="/_agent-native/actions/get-lead"
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": "Every action is mounted here automatically the filename is the action name.",
158
- "description": "POST by default; `http: { method: \"GET\" }` makes it a GET. The React hooks and `callAction` always call this path by name, regardless of any `http.path` override.",
159
- "auth": "Session cookie; frontend calls carry `X-Agent-Native-Frontend: 1`",
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 args arrive as query params; POST args arrive in the JSON body." }
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": "The action's return value as JSON." },
165
- { "status": "400", "description": "Input failed schema validation before run() fired." }
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\">before code architecture, UI, refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">after code PR, commit, branch, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&rarr;</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\">&rarr;</div><div class=\"diagram-box\">Review surface<br><small class=\"diagram-muted\">diagrams · wireframes · annotated code · comments</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&harr;</div><div class=\"diagram-node\">Coding agent<br><small class=\"diagram-muted\">feedback handed back</small></div></div>",
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\">&rarr;</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\">&rarr;</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\">&harr;</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'>Checkout redesign plan</h1><div style='flex:1'></div><button>Teilen</button><button class='primary'>Approve</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Current wireframe</div><div class='wf-box'>Proposed wireframe</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Implementation plan</strong><div class='wf-box'>Decision: keep existing checkout shell</div><div class='wf-box'>Annotated code walkthrough</div><div class='wf-box'>Open questions</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comments</strong><div class='wf-box'>Pin on primary CTA</div><div class='wf-box'>Question for agent</div><div class='wf-box'>Resolved copy note</div><button class='primary'>Hand back feedback</button></aside></div>"
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: "A markdown risk note with a low, medium, or high severity.",
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: "A markdown risk note with a low, medium, or high severity.",
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": "Tool surface", "note": "`description` is what the agent reads to decide when to call this. The per-field `.describe()` calls flow into the JSON Schema too." },
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": "One implementation", "note": "The `run` body is the single source of truth the UI button and the agent tool both execute exactly this." }
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="The auto-mounted action endpoint" method="GET" path="/_agent-native/actions/get-lead"
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": "Every action is mounted here automatically the filename is the action name.",
158
- "description": "POST by default; `http: { method: \"GET\" }` makes it a GET. The React hooks and `callAction` always call this path by name, regardless of any `http.path` override.",
159
- "auth": "Session cookie; frontend calls carry `X-Agent-Native-Frontend: 1`",
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 args arrive as query params; POST args arrive in the JSON body." }
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": "The action's return value as JSON." },
165
- { "status": "400", "description": "Input failed schema validation before run() fired." }
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\">before code architecture, UI, refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">after code PR, commit, branch, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&rarr;</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\">&rarr;</div><div class=\"diagram-box\">Review surface<br><small class=\"diagram-muted\">diagrams · wireframes · annotated code · comments</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&harr;</div><div class=\"diagram-node\">Coding agent<br><small class=\"diagram-muted\">feedback handed back</small></div></div>",
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\">&rarr;</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\">&rarr;</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\">&harr;</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'>Checkout redesign plan</h1><div style='flex:1'></div><button>Compartir</button><button class='primary'>Approve</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Current wireframe</div><div class='wf-box'>Proposed wireframe</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Implementation plan</strong><div class='wf-box'>Decision: keep existing checkout shell</div><div class='wf-box'>Annotated code walkthrough</div><div class='wf-box'>Open questions</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comments</strong><div class='wf-box'>Pin on primary CTA</div><div class='wf-box'>Question for agent</div><div class='wf-box'>Resolved copy note</div><button class='primary'>Hand back feedback</button></aside></div>"
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: "A markdown risk note with a low, medium, or high severity.",
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: "A markdown risk note with a low, medium, or high severity.",
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": "Tool surface", "note": "`description` is what the agent reads to decide when to call this. The per-field `.describe()` calls flow into the JSON Schema too." },
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": "One implementation", "note": "The `run` body is the single source of truth the UI button and the agent tool both execute exactly this." }
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="The auto-mounted action endpoint" method="GET" path="/_agent-native/actions/get-lead"
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": "Every action is mounted here automatically the filename is the action name.",
158
- "description": "POST by default; `http: { method: \"GET\" }` makes it a GET. The React hooks and `callAction` always call this path by name, regardless of any `http.path` override.",
159
- "auth": "Session cookie; frontend calls carry `X-Agent-Native-Frontend: 1`",
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 args arrive as query params; POST args arrive in the JSON body." }
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": "The action's return value as JSON." },
165
- { "status": "400", "description": "Input failed schema validation before run() fired." }
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\">before code architecture, UI, refactor</small></div><div class=\"diagram-node\"><span class=\"diagram-pill\">/visual-recap</span><small class=\"diagram-muted\">after code PR, commit, branch, diff</small></div></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&rarr;</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\">&rarr;</div><div class=\"diagram-box\">Review surface<br><small class=\"diagram-muted\">diagrams · wireframes · annotated code · comments</small></div><div class=\"diagram-arrow diagram-muted\" aria-hidden=\"true\">&harr;</div><div class=\"diagram-node\">Coding agent<br><small class=\"diagram-muted\">feedback handed back</small></div></div>",
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\">&rarr;</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\">&rarr;</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\">&harr;</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'>Checkout redesign plan</h1><div style='flex:1'></div><button>Partager</button><button class='primary'>Approve</button></div><div class='wf-card' style='display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:150px'><div class='wf-box'>Current wireframe</div><div class='wf-box'>Proposed wireframe</div></div><div class='wf-card' style='flex:1;display:flex;flex-direction:column;gap:10px'><strong>Implementation plan</strong><div class='wf-box'>Decision: keep existing checkout shell</div><div class='wf-box'>Annotated code walkthrough</div><div class='wf-box'>Open questions</div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comments</strong><div class='wf-box'>Pin on primary CTA</div><div class='wf-box'>Question for agent</div><div class='wf-box'>Resolved copy note</div><button class='primary'>Hand back feedback</button></aside></div>"
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: "A markdown risk note with a low, medium, or high severity.",
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: "A markdown risk note with a low, medium, or high severity.",
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