@agent-native/core 0.132.2 → 0.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +161 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/correlation.ts +11 -1
- package/corpus/core/src/a2a/types.ts +11 -3
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +33 -46
- package/corpus/core/src/agent/engine/builder-engine.ts +22 -10
- package/corpus/core/src/agent/engine/error-detail.ts +184 -3
- package/corpus/core/src/agent/engine/failure-taxonomy.ts +123 -0
- package/corpus/core/src/agent/engine/index.ts +8 -0
- package/corpus/core/src/agent/engine/registry.ts +92 -8
- package/corpus/core/src/agent/engine/translate-ai-sdk.ts +17 -2
- package/corpus/core/src/agent/production-agent.ts +13 -33
- package/corpus/core/src/agent/run-loop-with-resume.ts +1 -1
- package/corpus/core/src/agent/run-manager.ts +43 -14
- package/corpus/core/src/agent/run-store.ts +30 -3
- package/corpus/core/src/agent/thread-data-builder.ts +36 -4
- package/corpus/core/src/cli/templates-meta.ts +13 -0
- package/corpus/core/src/cli/workspace-dev.ts +1 -0
- package/corpus/core/src/client/error-format.ts +12 -0
- package/corpus/core/src/credentials/index.ts +51 -12
- package/corpus/core/src/extensions/url-safety.ts +46 -12
- package/corpus/core/src/integrations/adapters/slack.ts +32 -10
- package/corpus/core/src/integrations/google-docs-poller.ts +12 -1
- package/corpus/core/src/integrations/installations-store.ts +30 -0
- package/corpus/core/src/integrations/plugin.ts +5 -5
- package/corpus/core/src/integrations/types.ts +7 -0
- package/corpus/core/src/integrations/webhook-handler.ts +24 -1
- package/corpus/core/src/jobs/background-automation-runner.ts +38 -1
- package/corpus/core/src/provider-api/index.ts +8 -2
- package/corpus/core/src/scripts/call-agent.ts +6 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +30 -9
- package/corpus/core/src/server/agent-discovery.ts +2 -0
- package/corpus/core/src/server/builder-design-systems.ts +21 -0
- package/corpus/core/src/server/credential-provider.ts +51 -12
- package/corpus/core/src/server/index.ts +1 -0
- package/corpus/core/src/server/onboarding-html.ts +37 -2
- package/corpus/core/src/shared/reasoning-effort.ts +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +6 -2
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +39 -19
- package/corpus/templates/assets/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +30 -3
- package/corpus/templates/brain/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +54 -25
- package/corpus/templates/calendar/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +30 -3
- package/corpus/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +37 -21
- package/corpus/templates/clips/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +1 -1
- package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +1 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +34 -17
- package/corpus/templates/content/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +6 -2
- package/corpus/templates/design/actions/create-design-system.ts +1 -0
- package/corpus/templates/design/actions/set-default-design-system.ts +34 -26
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +21 -4
- package/corpus/templates/design/app/i18n-data.ts +39 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +229 -12
- package/corpus/templates/design/app/pages/DesignSystems.tsx +10 -4
- package/corpus/templates/design/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/corpus/templates/design/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
- package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +19 -4
- package/corpus/templates/dispatch/AGENTS.md +4 -0
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +562 -0
- package/corpus/templates/factory/.agents/skills/adding-a-feature/SKILL.md +198 -0
- package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +182 -0
- package/corpus/templates/factory/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/templates/factory/.agents/skills/customizing-agent-native/SKILL.md +220 -0
- package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/templates/factory/.agents/skills/factory-graphs/SKILL.md +52 -0
- package/corpus/templates/factory/.agents/skills/feature-flags/SKILL.md +169 -0
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +174 -0
- package/corpus/templates/factory/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/templates/factory/.agents/skills/security/SKILL.md +324 -0
- package/corpus/templates/factory/.agents/skills/self-modifying-code/SKILL.md +119 -0
- package/corpus/templates/factory/.agents/skills/shadcn-ui/SKILL.md +123 -0
- package/corpus/templates/factory/.agents/skills/sharing/SKILL.md +232 -0
- package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +178 -0
- package/corpus/templates/factory/.agents/skills/upgrade-agent-native/SKILL.md +122 -0
- package/corpus/templates/factory/.env.example +24 -0
- package/corpus/templates/factory/.ignore +0 -0
- package/corpus/templates/factory/.oxfmtrc.json +8 -0
- package/corpus/templates/factory/AGENTS.md +90 -0
- package/corpus/templates/factory/CHANGELOG.md +10 -0
- package/corpus/templates/factory/DEVELOPING.md +185 -0
- package/corpus/templates/factory/README.md +64 -0
- package/corpus/templates/factory/_gitignore +42 -0
- package/corpus/templates/factory/actions/add-factory-comment.ts +55 -0
- package/corpus/templates/factory/actions/approve-factory-item.ts +214 -0
- package/corpus/templates/factory/actions/babysit-pull-request.ts +126 -0
- package/corpus/templates/factory/actions/evaluate-triage-item.ts +172 -0
- package/corpus/templates/factory/actions/get-factory-graph.ts +62 -0
- package/corpus/templates/factory/actions/get-triage-config.ts +42 -0
- package/corpus/templates/factory/actions/get-triage-item.ts +74 -0
- package/corpus/templates/factory/actions/hello.ts +13 -0
- package/corpus/templates/factory/actions/ingest-github-observation.ts +100 -0
- package/corpus/templates/factory/actions/list-factories.ts +40 -0
- package/corpus/templates/factory/actions/list-factory-comments.ts +40 -0
- package/corpus/templates/factory/actions/list-triage-items.ts +85 -0
- package/corpus/templates/factory/actions/list-triage-rules.ts +44 -0
- package/corpus/templates/factory/actions/navigate.ts +41 -0
- package/corpus/templates/factory/actions/poll-slack-channel.ts +118 -0
- package/corpus/templates/factory/actions/reconcile-triage-run.ts +179 -0
- package/corpus/templates/factory/actions/record-triage-feedback.ts +58 -0
- package/corpus/templates/factory/actions/run.ts +2 -0
- package/corpus/templates/factory/actions/save-factory-graph.ts +129 -0
- package/corpus/templates/factory/actions/save-triage-config.ts +67 -0
- package/corpus/templates/factory/actions/save-triage-rule.ts +89 -0
- package/corpus/templates/factory/actions/suggest-factory-rules.ts +70 -0
- package/corpus/templates/factory/actions/view-screen.ts +73 -0
- package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +441 -0
- package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +388 -0
- package/corpus/templates/factory/app/components/layout/Header.tsx +60 -0
- package/corpus/templates/factory/app/components/layout/Layout.tsx +190 -0
- package/corpus/templates/factory/app/components/layout/Sidebar.tsx +538 -0
- package/corpus/templates/factory/app/components/triage/triage-status-pill.tsx +28 -0
- package/corpus/templates/factory/app/components/ui/button.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/card.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/input.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/label.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/factory/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/templates/factory/app/components/ui/tooltip.tsx +1 -0
- package/corpus/templates/factory/app/design-system.ts +3 -0
- package/corpus/templates/factory/app/entry.client.tsx +22 -0
- package/corpus/templates/factory/app/entry.server.tsx +10 -0
- package/corpus/templates/factory/app/global.css +93 -0
- package/corpus/templates/factory/app/hooks/use-navigation-state.ts +113 -0
- package/corpus/templates/factory/app/i18n/en-US.ts +211 -0
- package/corpus/templates/factory/app/i18n/index.ts +34 -0
- package/corpus/templates/factory/app/i18n-data.ts +556 -0
- package/corpus/templates/factory/app/lib/agent-page.tsx +49 -0
- package/corpus/templates/factory/app/lib/app-config.ts +11 -0
- package/corpus/templates/factory/app/lib/tab-id.ts +1 -0
- package/corpus/templates/factory/app/lib/utils.ts +1 -0
- package/corpus/templates/factory/app/root.tsx +175 -0
- package/corpus/templates/factory/app/routes/_index.tsx +94 -0
- package/corpus/templates/factory/app/routes/agent.tsx +24 -0
- package/corpus/templates/factory/app/routes/chat.$threadId.tsx +1 -0
- package/corpus/templates/factory/app/routes/database.tsx +17 -0
- package/corpus/templates/factory/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/templates/factory/app/routes/extensions.$id.tsx +11 -0
- package/corpus/templates/factory/app/routes/extensions._index.tsx +11 -0
- package/corpus/templates/factory/app/routes/extensions.tsx +5 -0
- package/corpus/templates/factory/app/routes/factory.tsx +1003 -0
- package/corpus/templates/factory/app/routes/observability.tsx +19 -0
- package/corpus/templates/factory/app/routes/settings.tsx +89 -0
- package/corpus/templates/factory/app/routes/team.tsx +11 -0
- package/corpus/templates/factory/app/routes.ts +4 -0
- package/corpus/templates/factory/app/vite-env.d.ts +6 -0
- package/corpus/templates/factory/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/factory/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/factory/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/factory/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/factory/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/templates/factory/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-31-added-an-inspectable-observe-only-factory-queue-for-slack-.md +6 -0
- package/corpus/templates/factory/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/corpus/templates/factory/components.json +20 -0
- package/corpus/templates/factory/data/sync-config.json +1 -0
- package/corpus/templates/factory/learnings.defaults.md +5 -0
- package/corpus/templates/factory/netlify.toml +10 -0
- package/corpus/templates/factory/package.json +105 -0
- package/corpus/templates/factory/public/agent-native-icon-dark.svg +10 -0
- package/corpus/templates/factory/public/agent-native-icon-light.svg +10 -0
- package/corpus/templates/factory/public/agent-native-logo-dark.svg +21 -0
- package/corpus/templates/factory/public/agent-native-logo-light.svg +21 -0
- package/corpus/templates/factory/public/favicon.svg +1 -0
- package/corpus/templates/factory/public/icon-180.svg +1 -0
- package/corpus/templates/factory/public/icon-192.svg +1 -0
- package/corpus/templates/factory/public/icon-512.svg +1 -0
- package/corpus/templates/factory/public/manifest.json +21 -0
- package/corpus/templates/factory/react-router.config.ts +7 -0
- package/corpus/templates/factory/server/connectors/credentials.ts +129 -0
- package/corpus/templates/factory/server/connectors/slack.ts +129 -0
- package/corpus/templates/factory/server/db/index.ts +6 -0
- package/corpus/templates/factory/server/db/schema.ts +193 -0
- package/corpus/templates/factory/server/factory-graph/contracts.ts +212 -0
- package/corpus/templates/factory/server/factory-graph/store.ts +121 -0
- package/corpus/templates/factory/server/lib/require-workspace-member.ts +55 -0
- package/corpus/templates/factory/server/middleware/auth.ts +15 -0
- package/corpus/templates/factory/server/plugins/agent-chat.ts +58 -0
- package/corpus/templates/factory/server/plugins/auth.ts +14 -0
- package/corpus/templates/factory/server/plugins/factory-migrations.ts +247 -0
- package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +116 -0
- package/corpus/templates/factory/server/plugins/integrations.ts +46 -0
- package/corpus/templates/factory/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/factory/server/routes/_agent-native/factory/builder-callback.post.ts +116 -0
- package/corpus/templates/factory/server/triage/ai-services-git.ts +197 -0
- package/corpus/templates/factory/server/triage/builder-executor.ts +118 -0
- package/corpus/templates/factory/server/triage/contracts.ts +164 -0
- package/corpus/templates/factory/server/triage/github-ingestion.ts +35 -0
- package/corpus/templates/factory/server/triage/guards.ts +121 -0
- package/corpus/templates/factory/server/triage/ids.ts +27 -0
- package/corpus/templates/factory/server/triage/pr-babysit.ts +100 -0
- package/corpus/templates/factory/server/triage/pr-monitor.ts +220 -0
- package/corpus/templates/factory/server/triage/slack-client.ts +55 -0
- package/corpus/templates/factory/server/triage/slack-poller.ts +152 -0
- package/corpus/templates/factory/ssr-entry.ts +15 -0
- package/corpus/templates/factory/tsconfig.json +21 -0
- package/corpus/templates/factory/vite.config.ts +19 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +55 -5
- package/corpus/templates/forms/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +6 -2
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +21 -6
- package/corpus/templates/plan/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +12 -0
- package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +9 -0
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +11 -0
- package/corpus/templates/slides/AGENTS.md +5 -6
- package/corpus/templates/slides/actions/_await-fit-check.ts +20 -10
- package/corpus/templates/slides/actions/add-slide.ts +17 -4
- package/corpus/templates/slides/actions/create-design-system.ts +16 -4
- package/corpus/templates/slides/actions/delete-design-system.ts +18 -2
- package/corpus/templates/slides/actions/get-layout-overflows.ts +88 -0
- package/corpus/templates/slides/actions/import-file.ts +1 -0
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +8 -0
- package/corpus/templates/slides/actions/patch-deck.ts +48 -16
- package/corpus/templates/slides/actions/set-default-design-system.ts +49 -19
- package/corpus/templates/slides/actions/update-slide.ts +13 -3
- package/corpus/templates/slides/actions/view-screen.ts +87 -10
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +155 -28
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +21 -17
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +849 -341
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +102 -2
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +13 -16
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +60 -12
- package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +11 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +66 -19
- package/corpus/templates/slides/app/i18n/en-US.ts +23 -0
- package/corpus/templates/slides/app/lib/normalize-slide-padding.ts +8 -15
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -3
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +4 -3
- package/corpus/templates/slides/app/pages/Index.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-07-31-design-system-details-now-show-their-source-and-indexing-sta.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-31-design-system-setup-keeps-focus-rings-visible-and-uses-a-sim.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-31-skip-prompt-is-now-available-in-the-new-deck-prompt-header.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-31-slides-now-detect-real-text-and-box-overflow-across-the-deck.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
- package/corpus/templates/slides/server/handlers/design-systems.ts +1 -0
- package/corpus/templates/slides/server/handlers/index-design-system-sources.ts +1 -0
- package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +23 -4
- package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/slides/server/plugins/creative-context.ts +16 -3
- package/corpus/templates/slides/server/workspace-defaults.ts +5 -1
- package/corpus/templates/slides/shared/slide-fit.ts +26 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +30 -3
- package/corpus/templates/tasks/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/dist/a2a/correlation.d.ts +4 -1
- package/dist/a2a/correlation.d.ts.map +1 -1
- package/dist/a2a/correlation.js +8 -1
- package/dist/a2a/correlation.js.map +1 -1
- package/dist/a2a/types.d.ts +11 -3
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +27 -41
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +18 -8
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/error-detail.d.ts +61 -0
- package/dist/agent/engine/error-detail.d.ts.map +1 -1
- package/dist/agent/engine/error-detail.js +145 -3
- package/dist/agent/engine/error-detail.js.map +1 -1
- package/dist/agent/engine/failure-taxonomy.d.ts +24 -0
- package/dist/agent/engine/failure-taxonomy.d.ts.map +1 -0
- package/dist/agent/engine/failure-taxonomy.js +88 -0
- package/dist/agent/engine/failure-taxonomy.js.map +1 -0
- package/dist/agent/engine/index.d.ts +2 -1
- package/dist/agent/engine/index.d.ts.map +1 -1
- package/dist/agent/engine/index.js +2 -1
- package/dist/agent/engine/index.js.map +1 -1
- package/dist/agent/engine/registry.d.ts +16 -0
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +71 -6
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/engine/translate-ai-sdk.d.ts.map +1 -1
- package/dist/agent/engine/translate-ai-sdk.js +14 -2
- package/dist/agent/engine/translate-ai-sdk.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +13 -24
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.js +1 -1
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +39 -10
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +10 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +20 -3
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +28 -4
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +13 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +1 -0
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +10 -0
- package/dist/client/error-format.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/credentials/index.d.ts +9 -2
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials/index.js +50 -8
- package/dist/credentials/index.js.map +1 -1
- package/dist/extensions/url-safety.d.ts.map +1 -1
- package/dist/extensions/url-safety.js +38 -12
- package/dist/extensions/url-safety.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +25 -8
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +13 -1
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/installations-store.d.ts +10 -0
- package/dist/integrations/installations-store.d.ts.map +1 -1
- package/dist/integrations/installations-store.js +24 -0
- package/dist/integrations/installations-store.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +6 -5
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/types.d.ts +7 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +16 -1
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/background-automation-runner.d.ts.map +1 -1
- package/dist/jobs/background-automation-runner.js +35 -2
- package/dist/jobs/background-automation-runner.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/provider-api/index.js +7 -3
- package/dist/provider-api/index.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +6 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +25 -7
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts +2 -0
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts +4 -1
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +11 -1
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +49 -12
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +37 -2
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/reasoning-effort.d.ts +1 -0
- package/dist/shared/reasoning-effort.d.ts.map +1 -1
- package/dist/shared/reasoning-effort.js +1 -1
- package/dist/shared/reasoning-effort.js.map +1 -1
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +30 -3
- package/dist/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
- package/package.json +1 -1
- package/src/a2a/correlation.ts +11 -1
- package/src/a2a/types.ts +11 -3
- package/src/agent/engine/ai-sdk-engine.ts +33 -46
- package/src/agent/engine/builder-engine.ts +22 -10
- package/src/agent/engine/error-detail.ts +184 -3
- package/src/agent/engine/failure-taxonomy.ts +123 -0
- package/src/agent/engine/index.ts +8 -0
- package/src/agent/engine/registry.ts +92 -8
- package/src/agent/engine/translate-ai-sdk.ts +17 -2
- package/src/agent/production-agent.ts +13 -33
- package/src/agent/run-loop-with-resume.ts +1 -1
- package/src/agent/run-manager.ts +43 -14
- package/src/agent/run-store.ts +30 -3
- package/src/agent/thread-data-builder.ts +36 -4
- package/src/cli/templates-meta.ts +13 -0
- package/src/cli/workspace-dev.ts +1 -0
- package/src/client/error-format.ts +12 -0
- package/src/credentials/index.ts +51 -12
- package/src/extensions/url-safety.ts +46 -12
- package/src/integrations/adapters/slack.ts +32 -10
- package/src/integrations/google-docs-poller.ts +12 -1
- package/src/integrations/installations-store.ts +30 -0
- package/src/integrations/plugin.ts +5 -5
- package/src/integrations/types.ts +7 -0
- package/src/integrations/webhook-handler.ts +24 -1
- package/src/jobs/background-automation-runner.ts +38 -1
- package/src/provider-api/index.ts +8 -2
- package/src/scripts/call-agent.ts +6 -0
- package/src/server/agent-chat-plugin.ts +30 -9
- package/src/server/agent-discovery.ts +2 -0
- package/src/server/builder-design-systems.ts +21 -0
- package/src/server/credential-provider.ts +51 -12
- package/src/server/index.ts +1 -0
- package/src/server/onboarding-html.ts +37 -2
- package/src/shared/reasoning-effort.ts +1 -1
- package/src/templates/chat/app/components/layout/Sidebar.tsx +30 -3
- package/src/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
- package/corpus/templates/clips/desktop/src/lib/media-device-selection.ts +0 -157
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useActionMutation,
|
|
3
|
+
useActionQuery,
|
|
4
|
+
} from "@agent-native/core/client/hooks";
|
|
2
5
|
import { useT } from "@agent-native/core/client/i18n";
|
|
3
6
|
import { openAgentSidebar } from "@agent-native/core/client/navigation";
|
|
4
7
|
import { withBuilderUtmTrackingParams } from "@agent-native/core/shared";
|
|
@@ -19,6 +22,7 @@ import {
|
|
|
19
22
|
IconPalette,
|
|
20
23
|
IconCheck,
|
|
21
24
|
IconExternalLink,
|
|
25
|
+
IconChevronDown,
|
|
22
26
|
} from "@tabler/icons-react";
|
|
23
27
|
import { useState, useCallback, useRef, useMemo, useEffect } from "react";
|
|
24
28
|
import { Link, useNavigate, useSearchParams } from "react-router";
|
|
@@ -34,6 +38,7 @@ import {
|
|
|
34
38
|
pollDecodeJobStatus,
|
|
35
39
|
type DecodeJobStatus,
|
|
36
40
|
} from "@/lib/builder-design-system-upload";
|
|
41
|
+
import { cn } from "@/lib/utils";
|
|
37
42
|
|
|
38
43
|
interface GitHubLink {
|
|
39
44
|
id: string;
|
|
@@ -48,6 +53,8 @@ interface UploadedFile {
|
|
|
48
53
|
textContent?: string;
|
|
49
54
|
}
|
|
50
55
|
|
|
56
|
+
type OtherSource = "brand" | "code" | "files" | "existing" | "notes";
|
|
57
|
+
|
|
51
58
|
interface BuilderIndexResult {
|
|
52
59
|
ok: boolean;
|
|
53
60
|
source: "builder";
|
|
@@ -81,6 +88,8 @@ export default function DesignSystemSetup() {
|
|
|
81
88
|
const [notes, setNotes] = useState("");
|
|
82
89
|
const [customInstructions, setCustomInstructions] = useState("");
|
|
83
90
|
const [validationError, setValidationError] = useState<string | null>(null);
|
|
91
|
+
const [sourcePanel, setSourcePanel] = useState<"figma" | "other">("figma");
|
|
92
|
+
const [otherSource, setOtherSource] = useState<OtherSource | null>(null);
|
|
84
93
|
|
|
85
94
|
const docInputRef = useRef<HTMLInputElement>(null);
|
|
86
95
|
const imageInputRef = useRef<HTMLInputElement>(null);
|
|
@@ -95,6 +104,7 @@ export default function DesignSystemSetup() {
|
|
|
95
104
|
const { data: designSystemsData } = useActionQuery<{
|
|
96
105
|
designSystems: Array<{ id: string; title: string }>;
|
|
97
106
|
}>("list-design-systems");
|
|
107
|
+
const updateSystemMutation = useActionMutation("update-design-system");
|
|
98
108
|
|
|
99
109
|
const existingProjects = designsData?.designs ?? [];
|
|
100
110
|
const existingSystems = designSystemsData?.designSystems ?? [];
|
|
@@ -185,7 +195,7 @@ export default function DesignSystemSetup() {
|
|
|
185
195
|
.replace(/[-_]+/g, " ")
|
|
186
196
|
.trim() || "Imported brand";
|
|
187
197
|
const json = await uploadAndIndexFigmaFiles([file], {
|
|
188
|
-
projectName: suggestedTitle,
|
|
198
|
+
projectName: companyInfo.trim() || suggestedTitle,
|
|
189
199
|
});
|
|
190
200
|
const parsed = json as unknown as BuilderIndexResult;
|
|
191
201
|
if (parsed.jobId) {
|
|
@@ -203,7 +213,7 @@ export default function DesignSystemSetup() {
|
|
|
203
213
|
setBuilderIndexing(false);
|
|
204
214
|
}
|
|
205
215
|
},
|
|
206
|
-
[t, startDecodePolling, stopDecodePolling],
|
|
216
|
+
[companyInfo, t, startDecodePolling, stopDecodePolling],
|
|
207
217
|
);
|
|
208
218
|
|
|
209
219
|
useEffect(() => {
|
|
@@ -248,6 +258,11 @@ export default function DesignSystemSetup() {
|
|
|
248
258
|
customInstructions,
|
|
249
259
|
]);
|
|
250
260
|
|
|
261
|
+
const selectOtherSource = useCallback((source: OtherSource) => {
|
|
262
|
+
setSourcePanel("other");
|
|
263
|
+
setOtherSource((current) => (current === source ? null : source));
|
|
264
|
+
}, []);
|
|
265
|
+
|
|
251
266
|
const addWebsiteUrl = useCallback(() => {
|
|
252
267
|
const url = websiteUrl.trim();
|
|
253
268
|
if (!url) {
|
|
@@ -386,7 +401,7 @@ export default function DesignSystemSetup() {
|
|
|
386
401
|
[readTextFiles],
|
|
387
402
|
);
|
|
388
403
|
|
|
389
|
-
const handleContinue = useCallback(() => {
|
|
404
|
+
const handleContinue = useCallback(async () => {
|
|
390
405
|
if (!hasAnySources) {
|
|
391
406
|
setValidationError(t("designSystemSetup.errors.noSources"));
|
|
392
407
|
return;
|
|
@@ -422,7 +437,9 @@ export default function DesignSystemSetup() {
|
|
|
422
437
|
);
|
|
423
438
|
|
|
424
439
|
if (companyInfo.trim()) {
|
|
425
|
-
parts.push(
|
|
440
|
+
parts.push(
|
|
441
|
+
`\n## Company / Brand\n${companyInfo.trim()}\n\nUse exactly this as the design system name. Never replace it with the uploaded Figma filename.`,
|
|
442
|
+
);
|
|
426
443
|
}
|
|
427
444
|
|
|
428
445
|
if (normalizedWebsiteUrls.length > 0) {
|
|
@@ -513,6 +530,23 @@ export default function DesignSystemSetup() {
|
|
|
513
530
|
);
|
|
514
531
|
}
|
|
515
532
|
|
|
533
|
+
const requestedTitle = companyInfo.trim();
|
|
534
|
+
const localDesignSystemId = builderIndexResult?.localDesignSystemId;
|
|
535
|
+
if (requestedTitle && localDesignSystemId) {
|
|
536
|
+
try {
|
|
537
|
+
await updateSystemMutation.mutateAsync({
|
|
538
|
+
id: localDesignSystemId,
|
|
539
|
+
title: requestedTitle,
|
|
540
|
+
});
|
|
541
|
+
} catch (error) {
|
|
542
|
+
toast.error(t("common.genericError"), {
|
|
543
|
+
description:
|
|
544
|
+
error instanceof Error ? error.message : t("common.genericError"),
|
|
545
|
+
});
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
516
550
|
parts.push(
|
|
517
551
|
`\n---\nAfter processing all sources, if you started Builder DSI indexing, report the Builder job/design-system URL plus the local selectable design-system id returned by \`index-design-system-with-builder\`. Do not call \`create-design-system\` again for Builder-indexed Figma/code/design.md sources. If you processed non-Builder sources into concrete tokens, call \`create-design-system\` with the combined tokens${
|
|
518
552
|
customInstructions.trim()
|
|
@@ -547,6 +581,7 @@ export default function DesignSystemSetup() {
|
|
|
547
581
|
existingSystems,
|
|
548
582
|
navigate,
|
|
549
583
|
t,
|
|
584
|
+
updateSystemMutation,
|
|
550
585
|
]);
|
|
551
586
|
|
|
552
587
|
useSetPageTitle(
|
|
@@ -597,11 +632,23 @@ export default function DesignSystemSetup() {
|
|
|
597
632
|
</div>
|
|
598
633
|
)}
|
|
599
634
|
|
|
600
|
-
<div className="space-y-
|
|
635
|
+
<div className="space-y-5">
|
|
601
636
|
{/* Start from a Figma file via Builder DSI. */}
|
|
637
|
+
<SourceAccordionRow
|
|
638
|
+
icon={IconBrandFigma}
|
|
639
|
+
title={t("designSystemSetup.sections.figma.title")}
|
|
640
|
+
description={t("designSystemSetup.sections.figma.description")}
|
|
641
|
+
expanded={sourcePanel === "figma"}
|
|
642
|
+
onClick={() => setSourcePanel("figma")}
|
|
643
|
+
panelId="design-system-figma-source"
|
|
644
|
+
/>
|
|
602
645
|
<Section
|
|
603
646
|
title={t("designSystemSetup.sections.figma.title")}
|
|
604
647
|
description={t("designSystemSetup.sections.figma.description")}
|
|
648
|
+
hidden={sourcePanel !== "figma"}
|
|
649
|
+
hideHeading
|
|
650
|
+
id="design-system-figma-source"
|
|
651
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
605
652
|
>
|
|
606
653
|
{!builderIndexResult ? (
|
|
607
654
|
<>
|
|
@@ -655,6 +702,7 @@ export default function DesignSystemSetup() {
|
|
|
655
702
|
<BuilderIndexPreview
|
|
656
703
|
result={builderIndexResult}
|
|
657
704
|
decodeStatus={decodeStatus}
|
|
705
|
+
displayTitle={companyInfo.trim()}
|
|
658
706
|
onReset={() => {
|
|
659
707
|
stopDecodePolling();
|
|
660
708
|
setDecodeStatus(null);
|
|
@@ -665,10 +713,97 @@ export default function DesignSystemSetup() {
|
|
|
665
713
|
)}
|
|
666
714
|
</Section>
|
|
667
715
|
|
|
716
|
+
<SourceAccordionRow
|
|
717
|
+
icon={IconPalette}
|
|
718
|
+
title={t("designSystemSetup.otherSources")}
|
|
719
|
+
description={t("designSystemSetup.otherSourcesDescription")}
|
|
720
|
+
expanded={sourcePanel === "other"}
|
|
721
|
+
onClick={() => setSourcePanel("other")}
|
|
722
|
+
panelId="design-system-other-sources"
|
|
723
|
+
/>
|
|
724
|
+
{sourcePanel === "other" && (
|
|
725
|
+
<div
|
|
726
|
+
id="design-system-other-sources"
|
|
727
|
+
className="overflow-hidden rounded-lg border border-border"
|
|
728
|
+
>
|
|
729
|
+
<div className="border-b border-border px-4 py-3">
|
|
730
|
+
<p className="text-xs font-medium text-foreground/70">
|
|
731
|
+
{t("designSystemSetup.chooseSourcePrompt")}
|
|
732
|
+
</p>
|
|
733
|
+
</div>
|
|
734
|
+
<div className="divide-y divide-border">
|
|
735
|
+
<SourceAccordionRow
|
|
736
|
+
className="rounded-none border-0"
|
|
737
|
+
icon={IconPalette}
|
|
738
|
+
title={t("designSystemSetup.sections.company.title")}
|
|
739
|
+
description={t(
|
|
740
|
+
"designSystemSetup.sections.company.description",
|
|
741
|
+
)}
|
|
742
|
+
expanded={otherSource === "brand"}
|
|
743
|
+
onClick={() => selectOtherSource("brand")}
|
|
744
|
+
panelId="design-system-brand-source"
|
|
745
|
+
/>
|
|
746
|
+
<SourceAccordionRow
|
|
747
|
+
className="rounded-none border-0"
|
|
748
|
+
icon={IconBrandGithub}
|
|
749
|
+
title={t("designSystemSetup.sections.code.title")}
|
|
750
|
+
description={t(
|
|
751
|
+
"designSystemSetup.sections.code.description",
|
|
752
|
+
)}
|
|
753
|
+
expanded={otherSource === "code"}
|
|
754
|
+
onClick={() => selectOtherSource("code")}
|
|
755
|
+
panelId="design-system-code-source"
|
|
756
|
+
/>
|
|
757
|
+
<SourceAccordionRow
|
|
758
|
+
className="rounded-none border-0"
|
|
759
|
+
icon={IconFileDescription}
|
|
760
|
+
title={t("designSystemSetup.sections.designFiles.title")}
|
|
761
|
+
description={t(
|
|
762
|
+
"designSystemSetup.sections.designFiles.description",
|
|
763
|
+
)}
|
|
764
|
+
expanded={otherSource === "files"}
|
|
765
|
+
onClick={() => selectOtherSource("files")}
|
|
766
|
+
panelId="design-system-file-source"
|
|
767
|
+
/>
|
|
768
|
+
{(existingProjects.length > 0 ||
|
|
769
|
+
existingSystems.length > 0) && (
|
|
770
|
+
<SourceAccordionRow
|
|
771
|
+
className="rounded-none border-0"
|
|
772
|
+
icon={IconPalette}
|
|
773
|
+
title={t(
|
|
774
|
+
"designSystemSetup.sections.importExisting.title",
|
|
775
|
+
)}
|
|
776
|
+
description={t(
|
|
777
|
+
"designSystemSetup.sections.importExisting.description",
|
|
778
|
+
)}
|
|
779
|
+
expanded={otherSource === "existing"}
|
|
780
|
+
onClick={() => selectOtherSource("existing")}
|
|
781
|
+
panelId="design-system-existing-source"
|
|
782
|
+
/>
|
|
783
|
+
)}
|
|
784
|
+
<SourceAccordionRow
|
|
785
|
+
className="rounded-none border-0"
|
|
786
|
+
icon={IconFileDescription}
|
|
787
|
+
title={t("designSystemSetup.sections.notes.title")}
|
|
788
|
+
description={t(
|
|
789
|
+
"designSystemSetup.sections.notes.description",
|
|
790
|
+
)}
|
|
791
|
+
expanded={otherSource === "notes"}
|
|
792
|
+
onClick={() => selectOtherSource("notes")}
|
|
793
|
+
panelId="design-system-notes-source"
|
|
794
|
+
/>
|
|
795
|
+
</div>
|
|
796
|
+
</div>
|
|
797
|
+
)}
|
|
798
|
+
|
|
668
799
|
{/* Company / Brand */}
|
|
669
800
|
<Section
|
|
670
801
|
title={t("designSystemSetup.sections.company.title")}
|
|
671
802
|
description={t("designSystemSetup.sections.company.description")}
|
|
803
|
+
hidden={sourcePanel !== "other" || otherSource !== "brand"}
|
|
804
|
+
hideHeading
|
|
805
|
+
id="design-system-brand-source"
|
|
806
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
672
807
|
>
|
|
673
808
|
<Textarea
|
|
674
809
|
value={companyInfo}
|
|
@@ -733,6 +868,10 @@ export default function DesignSystemSetup() {
|
|
|
733
868
|
<Section
|
|
734
869
|
title={t("designSystemSetup.sections.code.title")}
|
|
735
870
|
description={t("designSystemSetup.sections.code.description")}
|
|
871
|
+
hidden={sourcePanel !== "other" || otherSource !== "code"}
|
|
872
|
+
hideHeading
|
|
873
|
+
id="design-system-code-source"
|
|
874
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
736
875
|
>
|
|
737
876
|
{/* GitHub */}
|
|
738
877
|
<div className="mb-4">
|
|
@@ -863,6 +1002,10 @@ export default function DesignSystemSetup() {
|
|
|
863
1002
|
description={t(
|
|
864
1003
|
"designSystemSetup.sections.designFiles.description",
|
|
865
1004
|
)}
|
|
1005
|
+
hidden={sourcePanel !== "other" || otherSource !== "files"}
|
|
1006
|
+
hideHeading
|
|
1007
|
+
id="design-system-file-source"
|
|
1008
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
866
1009
|
>
|
|
867
1010
|
{/* Figma .fig import lives in the "Start from a Figma file"
|
|
868
1011
|
section at the top — it deeply parses the file in-process. */}
|
|
@@ -970,6 +1113,10 @@ export default function DesignSystemSetup() {
|
|
|
970
1113
|
description={t(
|
|
971
1114
|
"designSystemSetup.sections.importExisting.description",
|
|
972
1115
|
)}
|
|
1116
|
+
hidden={sourcePanel !== "other" || otherSource !== "existing"}
|
|
1117
|
+
hideHeading
|
|
1118
|
+
id="design-system-existing-source"
|
|
1119
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
973
1120
|
>
|
|
974
1121
|
<div className="grid grid-cols-2 gap-2">
|
|
975
1122
|
{existingSystems.map((ds) => (
|
|
@@ -1027,6 +1174,10 @@ export default function DesignSystemSetup() {
|
|
|
1027
1174
|
<Section
|
|
1028
1175
|
title={t("designSystemSetup.sections.notes.title")}
|
|
1029
1176
|
description={t("designSystemSetup.sections.notes.description")}
|
|
1177
|
+
hidden={sourcePanel !== "other" || otherSource !== "notes"}
|
|
1178
|
+
hideHeading
|
|
1179
|
+
id="design-system-notes-source"
|
|
1180
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
1030
1181
|
>
|
|
1031
1182
|
<Textarea
|
|
1032
1183
|
value={notes}
|
|
@@ -1043,6 +1194,9 @@ export default function DesignSystemSetup() {
|
|
|
1043
1194
|
description={t(
|
|
1044
1195
|
"designSystemSetup.sections.customInstructions.description",
|
|
1045
1196
|
)}
|
|
1197
|
+
hidden={sourcePanel !== "other" || otherSource !== "notes"}
|
|
1198
|
+
hideHeading
|
|
1199
|
+
className="rounded-lg border border-border bg-card p-4"
|
|
1046
1200
|
>
|
|
1047
1201
|
<Textarea
|
|
1048
1202
|
value={customInstructions}
|
|
@@ -1077,22 +1231,83 @@ function Section({
|
|
|
1077
1231
|
title,
|
|
1078
1232
|
description,
|
|
1079
1233
|
children,
|
|
1234
|
+
hidden = false,
|
|
1235
|
+
hideHeading = false,
|
|
1236
|
+
id,
|
|
1237
|
+
className,
|
|
1080
1238
|
}: {
|
|
1081
1239
|
title: string;
|
|
1082
1240
|
description: string;
|
|
1083
1241
|
children: React.ReactNode;
|
|
1242
|
+
hidden?: boolean;
|
|
1243
|
+
hideHeading?: boolean;
|
|
1244
|
+
id?: string;
|
|
1245
|
+
className?: string;
|
|
1084
1246
|
}) {
|
|
1247
|
+
if (hidden) return null;
|
|
1085
1248
|
return (
|
|
1086
|
-
<section>
|
|
1087
|
-
|
|
1088
|
-
<
|
|
1089
|
-
|
|
1090
|
-
|
|
1249
|
+
<section id={id} className={className}>
|
|
1250
|
+
{!hideHeading && (
|
|
1251
|
+
<div className="mb-3">
|
|
1252
|
+
<h2 className="text-sm font-medium text-foreground/70">{title}</h2>
|
|
1253
|
+
<p className="mt-0.5 text-xs text-muted-foreground/70">
|
|
1254
|
+
{description}
|
|
1255
|
+
</p>
|
|
1256
|
+
</div>
|
|
1257
|
+
)}
|
|
1091
1258
|
{children}
|
|
1092
1259
|
</section>
|
|
1093
1260
|
);
|
|
1094
1261
|
}
|
|
1095
1262
|
|
|
1263
|
+
function SourceAccordionRow({
|
|
1264
|
+
icon: Icon,
|
|
1265
|
+
title,
|
|
1266
|
+
description,
|
|
1267
|
+
expanded,
|
|
1268
|
+
onClick,
|
|
1269
|
+
panelId,
|
|
1270
|
+
className,
|
|
1271
|
+
}: {
|
|
1272
|
+
icon: React.ComponentType<{ className?: string }>;
|
|
1273
|
+
title: string;
|
|
1274
|
+
description: string;
|
|
1275
|
+
expanded: boolean;
|
|
1276
|
+
onClick: () => void;
|
|
1277
|
+
panelId: string;
|
|
1278
|
+
className?: string;
|
|
1279
|
+
}) {
|
|
1280
|
+
return (
|
|
1281
|
+
<button
|
|
1282
|
+
type="button"
|
|
1283
|
+
aria-controls={panelId}
|
|
1284
|
+
aria-expanded={expanded}
|
|
1285
|
+
onClick={onClick}
|
|
1286
|
+
className={cn(
|
|
1287
|
+
"flex w-full items-center gap-3 rounded-lg border border-border px-4 py-3 text-left transition-[background-color,border-color] duration-150 hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1288
|
+
expanded && "bg-accent/40",
|
|
1289
|
+
className,
|
|
1290
|
+
)}
|
|
1291
|
+
>
|
|
1292
|
+
<Icon className="size-4 shrink-0 text-muted-foreground" />
|
|
1293
|
+
<span className="min-w-0 flex-1">
|
|
1294
|
+
<span className="block text-sm font-medium text-foreground/90">
|
|
1295
|
+
{title}
|
|
1296
|
+
</span>
|
|
1297
|
+
<span className="mt-0.5 block truncate text-xs text-muted-foreground">
|
|
1298
|
+
{description}
|
|
1299
|
+
</span>
|
|
1300
|
+
</span>
|
|
1301
|
+
<IconChevronDown
|
|
1302
|
+
className={cn(
|
|
1303
|
+
"size-4 shrink-0 text-muted-foreground transition-transform duration-150",
|
|
1304
|
+
expanded && "rotate-180",
|
|
1305
|
+
)}
|
|
1306
|
+
/>
|
|
1307
|
+
</button>
|
|
1308
|
+
);
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1096
1311
|
function FileList({
|
|
1097
1312
|
files,
|
|
1098
1313
|
onRemove,
|
|
@@ -1128,10 +1343,12 @@ function FileList({
|
|
|
1128
1343
|
function BuilderIndexPreview({
|
|
1129
1344
|
result,
|
|
1130
1345
|
decodeStatus,
|
|
1346
|
+
displayTitle,
|
|
1131
1347
|
onReset,
|
|
1132
1348
|
}: {
|
|
1133
1349
|
result: BuilderIndexResult;
|
|
1134
1350
|
decodeStatus: DecodeJobStatus | null;
|
|
1351
|
+
displayTitle?: string;
|
|
1135
1352
|
onReset: () => void;
|
|
1136
1353
|
}) {
|
|
1137
1354
|
const t = useT();
|
|
@@ -1146,7 +1363,7 @@ function BuilderIndexPreview({
|
|
|
1146
1363
|
</div>
|
|
1147
1364
|
<div className="min-w-0 flex-1">
|
|
1148
1365
|
<h3 className="text-sm font-semibold text-foreground">
|
|
1149
|
-
{result.suggestedTitle}
|
|
1366
|
+
{displayTitle || result.suggestedTitle}
|
|
1150
1367
|
</h3>
|
|
1151
1368
|
<p className="mt-1 text-xs leading-relaxed text-muted-foreground">
|
|
1152
1369
|
{
|
|
@@ -220,7 +220,7 @@ export default function DesignSystems() {
|
|
|
220
220
|
}, []);
|
|
221
221
|
|
|
222
222
|
const handleSetDefault = useCallback(
|
|
223
|
-
(id: string) => {
|
|
223
|
+
(id: string, isDefault: boolean) => {
|
|
224
224
|
// Optimistic update
|
|
225
225
|
queryClient.setQueryData(
|
|
226
226
|
["action", "list-design-systems", undefined],
|
|
@@ -230,13 +230,17 @@ export default function DesignSystems() {
|
|
|
230
230
|
...old,
|
|
231
231
|
designSystems: old.designSystems.map((ds: DesignSystem) => ({
|
|
232
232
|
...ds,
|
|
233
|
-
isDefault:
|
|
233
|
+
isDefault: isDefault
|
|
234
|
+
? ds.id === id
|
|
235
|
+
: ds.id === id
|
|
236
|
+
? false
|
|
237
|
+
: ds.isDefault,
|
|
234
238
|
})),
|
|
235
239
|
};
|
|
236
240
|
},
|
|
237
241
|
);
|
|
238
242
|
|
|
239
|
-
setDefaultMutation.mutate({ id } as any, {
|
|
243
|
+
setDefaultMutation.mutate({ id, isDefault } as any, {
|
|
240
244
|
onError: () => {
|
|
241
245
|
queryClient.invalidateQueries({
|
|
242
246
|
queryKey: ["action", "list-design-systems"],
|
|
@@ -645,7 +649,9 @@ export default function DesignSystems() {
|
|
|
645
649
|
<Tooltip>
|
|
646
650
|
<TooltipTrigger asChild>
|
|
647
651
|
<button
|
|
648
|
-
onClick={() =>
|
|
652
|
+
onClick={() =>
|
|
653
|
+
handleSetDefault(ds.id, !ds.isDefault)
|
|
654
|
+
}
|
|
649
655
|
className="absolute top-2 end-2 opacity-0 group-hover:opacity-100 w-7 h-7 flex items-center justify-center rounded-md bg-black/60 hover:bg-black/80 cursor-pointer"
|
|
650
656
|
>
|
|
651
657
|
{ds.isDefault ? (
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
localBuilderDesignSystemId,
|
|
4
4
|
type BuilderDesignSystemIndexResult,
|
|
5
5
|
} from "@agent-native/core/server";
|
|
6
|
-
import { eq } from "drizzle-orm";
|
|
6
|
+
import { and, eq, isNull } from "drizzle-orm";
|
|
7
7
|
import { nanoid } from "nanoid";
|
|
8
8
|
|
|
9
9
|
import { getDb, schema } from "../db/index.js";
|
|
@@ -36,15 +36,19 @@ export async function upsertBuilderProxyDesignSystem({
|
|
|
36
36
|
.select({
|
|
37
37
|
id: schema.designSystems.id,
|
|
38
38
|
ownerEmail: schema.designSystems.ownerEmail,
|
|
39
|
+
orgId: schema.designSystems.orgId,
|
|
39
40
|
})
|
|
40
41
|
.from(schema.designSystems)
|
|
41
42
|
.where(eq(schema.designSystems.id, baseLocalDesignSystemId))
|
|
42
43
|
.limit(1);
|
|
44
|
+
const existingBelongsToScope =
|
|
45
|
+
existing?.ownerEmail === ownerEmail &&
|
|
46
|
+
(existing?.orgId ?? null) === (orgId ?? null);
|
|
43
47
|
const localDesignSystemId =
|
|
44
|
-
existing &&
|
|
48
|
+
existing && !existingBelongsToScope
|
|
45
49
|
? `${baseLocalDesignSystemId}-${nanoid(8)}`
|
|
46
50
|
: baseLocalDesignSystemId;
|
|
47
|
-
if (
|
|
51
|
+
if (existingBelongsToScope) {
|
|
48
52
|
await db
|
|
49
53
|
.update(schema.designSystems)
|
|
50
54
|
.set({
|
|
@@ -60,7 +64,17 @@ export async function upsertBuilderProxyDesignSystem({
|
|
|
60
64
|
const [ownedSystem] = await db
|
|
61
65
|
.select({ id: schema.designSystems.id })
|
|
62
66
|
.from(schema.designSystems)
|
|
63
|
-
.where(
|
|
67
|
+
.where(
|
|
68
|
+
orgId
|
|
69
|
+
? and(
|
|
70
|
+
eq(schema.designSystems.ownerEmail, ownerEmail),
|
|
71
|
+
eq(schema.designSystems.orgId, orgId),
|
|
72
|
+
)
|
|
73
|
+
: and(
|
|
74
|
+
eq(schema.designSystems.ownerEmail, ownerEmail),
|
|
75
|
+
isNull(schema.designSystems.orgId),
|
|
76
|
+
),
|
|
77
|
+
)
|
|
64
78
|
.limit(1);
|
|
65
79
|
await db.insert(schema.designSystems).values({
|
|
66
80
|
id: localDesignSystemId,
|
|
@@ -72,6 +86,7 @@ export async function upsertBuilderProxyDesignSystem({
|
|
|
72
86
|
isDefault: !ownedSystem,
|
|
73
87
|
ownerEmail,
|
|
74
88
|
orgId: orgId ?? null,
|
|
89
|
+
visibility: orgId ? "org" : "private",
|
|
75
90
|
createdAt: now,
|
|
76
91
|
updatedAt: now,
|
|
77
92
|
});
|
|
@@ -59,6 +59,10 @@ ladder.
|
|
|
59
59
|
infer run failure from thread text search. Cross-app results may be partial;
|
|
60
60
|
preserve the returned per-source health instead of treating an unavailable
|
|
61
61
|
source as zero failures.
|
|
62
|
+
- For a Slack-linked issue, call `read-slack-thread-context` with the exact
|
|
63
|
+
permalink before diagnosing it. It resolves child links to the parent thread,
|
|
64
|
+
preserves attachments and related URLs, and reports whether pagination is
|
|
65
|
+
complete. Never treat an unreadable Slack thread as an empty one.
|
|
62
66
|
|
|
63
67
|
## Application State
|
|
64
68
|
|