@agent-native/core 0.49.4 → 0.49.6
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/README.md +1 -1
- package/dist/cli/app-skill.js +1 -1
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +22 -4
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/create.js +2 -2
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.js +2 -2
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +2 -2
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +50 -35
- package/dist/cli/skills.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +1 -1
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/server/agent-chat-plugin.js +1 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth-marketing.js +1 -1
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/vite/client.d.ts +16 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +45 -4
- package/dist/vite/client.js.map +1 -1
- package/docs/content/external-agents.md +6 -6
- package/docs/content/frames.md +1 -1
- package/docs/content/mcp-clients.md +5 -5
- package/docs/content/plan-plugin.md +10 -8
- package/docs/content/skills-guide.md +3 -3
- package/docs/content/template-assets.md +4 -4
- package/docs/content/template-plan.md +11 -8
- package/package.json +1 -2
|
@@ -88,7 +88,7 @@ export const BUILT_IN_AUTH_MARKETING = {
|
|
|
88
88
|
"Multi-account Gmail in a single unified inbox",
|
|
89
89
|
"Autonomous triage, archiving, and follow-ups",
|
|
90
90
|
],
|
|
91
|
-
runLocalCommand: "npx @agent-native/core create my-mail-app --template mail",
|
|
91
|
+
runLocalCommand: "npx @agent-native/core@latest create my-mail-app --template mail",
|
|
92
92
|
},
|
|
93
93
|
slides: {
|
|
94
94
|
appName: "Agent-Native Slides",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-marketing.js","sourceRoot":"","sources":["../../src/server/auth-marketing.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IAC3E,SAAS,EAAE;QACT,OAAO,EAAE,wBAAwB;QACjC,OAAO,EACL,2GAA2G;QAC7G,QAAQ,EAAE;YACR,yEAAyE;YACzE,kEAAkE;YAClE,kEAAkE;SACnE;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EACL,qGAAqG;QACvG,QAAQ,EAAE;YACR,iEAAiE;YACjE,iDAAiD;YACjD,0DAA0D;SAC3D;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uFAAuF;QACzF,QAAQ,EAAE;YACR,oDAAoD;YACpD,sDAAsD;YACtD,6DAA6D;SAC9D;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EACL,0FAA0F;QAC5F,QAAQ,EAAE;YACR,2EAA2E;YAC3E,sEAAsE;YACtE,oEAAoE;SACrE;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EACL,iGAAiG;QACnG,QAAQ,EAAE;YACR,mEAAmE;YACnE,0EAA0E;YAC1E,4DAA4D;SAC7D;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EACL,wIAAwI;QAC1I,QAAQ,EAAE;YACR,oDAAoD;YACpD,4DAA4D;YAC5D,0CAA0C;SAC3C;KACF;IACD,QAAQ,EAAE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AAC,GAAG,CAAC,gBAAgB,CAAC;QACnC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC;QAC/B,YAAY,CAAC,GAAG,CAAC,kBAAkB,CAAC;QACpC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;QACxB,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC;QAChC,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC;QACrC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;QACpB,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;QAC3B,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC;KAClC,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAA2C,EAAE;IAE7C,KAAK,MAAM,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,SAAS;YAAE,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["export interface AuthMarketingContent {\n appName: string;\n tagline: string;\n description?: string;\n features?: string[];\n runLocalCommand?: string;\n}\n\nexport interface ResolveBuiltInAuthMarketingOptions {\n requestHost?: string;\n requestPath?: string;\n}\n\nexport const BUILT_IN_AUTH_MARKETING: Record<string, AuthMarketingContent> = {\n analytics: {\n appName: \"Agent-Native Analytics\",\n tagline:\n \"Your AI agent queries your data sources, builds dashboards, and answers business questions alongside you.\",\n features: [\n \"Ask any question and get answers from BigQuery, HubSpot, Jira, and more\",\n \"Agent-built dashboards that pull live data from all your sources\",\n \"Saved analyses the agent can re-run on demand with fresh numbers\",\n ],\n },\n brain: {\n appName: \"Agent-Native Brain\",\n tagline:\n \"A company memory layer where raw conversations become reviewed, searchable institutional knowledge.\",\n features: [\n \"Import transcripts, notes, Slack exports, and Granola summaries\",\n \"Validate every fact against exact source quotes\",\n \"Review company-wide knowledge through proposal workflows\",\n ],\n },\n calendar: {\n appName: \"Agent-Native Calendar\",\n tagline:\n \"Your AI agent schedules, reschedules, and manages your calendar so you never have to.\",\n features: [\n \"Finds open slots and books meetings on your behalf\",\n \"Manages availability and booking links automatically\",\n \"Answers schedule questions and resolves conflicts instantly\",\n ],\n },\n clips: {\n appName: \"Agent-Native Clips\",\n tagline:\n \"Your AI agent transcribes, summarizes, and searches everything you record alongside you.\",\n features: [\n \"One-click screen recording with automatic titles, summaries, and chapters\",\n \"Calendar-synced meeting notes with live transcripts and action items\",\n \"One searchable library across recordings, meetings, and dictations\",\n ],\n },\n content: {\n appName: \"Agent-Native Content\",\n tagline:\n \"Your AI agent creates, edits, and organizes documents alongside you in a Notion-like workspace.\",\n features: [\n \"Create and restructure entire document trees from a single prompt\",\n \"Surgical edits that sync live to your editor via real-time collaboration\",\n \"Search, summarize, and cross-reference documents instantly\",\n ],\n },\n design: {\n appName: \"Agent-Native Design\",\n tagline:\n \"Design and prototype by describing what you want. The AI agent turns your ideas into interactive, fully responsive designs in seconds.\",\n features: [\n \"Create polished prototypes just by describing them\",\n \"Build and apply design systems to keep everything on-brand\",\n \"Export your work or share it with a link\",\n ],\n },\n dispatch: {\n appName: \"Agent-Native Dispatch\",\n tagline:\n \"Your AI agent manages secrets, orchestrates other agents, and routes messages across your workspace.\",\n features: [\n \"Centralized vault for secrets with granular per-app grants\",\n \"Cross-agent orchestration and delegation to specialist apps\",\n \"Slack and Telegram routing with approval workflows\",\n ],\n },\n forms: {\n appName: \"Agent-Native Forms\",\n tagline:\n \"Your AI agent builds, publishes, and analyzes forms alongside you.\",\n features: [\n \"Create complete forms from a single sentence\",\n \"Instant publishing with shareable links and captcha\",\n \"Response summaries, exports, and trend analysis on demand\",\n ],\n },\n assets: {\n appName: \"Agent-Native Assets\",\n tagline:\n \"Your AI agent creates, refines, and organizes on-brand assets alongside you.\",\n features: [\n \"Build reusable asset libraries from logos, product shots, videos, and references\",\n \"Generate heroes, diagrams, slide art, product visuals, and videos from a prompt\",\n \"Audit prompts, references, outputs, and refinements across every run\",\n ],\n },\n mail: {\n appName: \"Agent-Native Mail\",\n tagline: \"Your AI agent reads, drafts, and organizes email alongside you.\",\n features: [\n \"Replies that match your tone and style\",\n \"Multi-account Gmail in a single unified inbox\",\n \"Autonomous triage, archiving, and follow-ups\",\n ],\n runLocalCommand:\n \"npx @agent-native/core create my-mail-app --template mail\",\n },\n slides: {\n appName: \"Agent-Native Slides\",\n tagline:\n \"Your AI agent builds, edits, and refines presentations alongside you.\",\n features: [\n \"Generate entire decks from a single prompt\",\n \"Surgical slide edits while you present or review\",\n \"Real-time collaboration between you and the agent\",\n ],\n },\n starter: {\n appName: \"Blank app\",\n tagline:\n \"Build an agent-native app where the AI agent and UI share state, actions, and context.\",\n features: [\n \"Define once, use everywhere: actions work as agent tools and API endpoints\",\n \"The agent always knows what you are looking at and can act on it\",\n \"Modify your app's own code, routes, and styles through conversation\",\n ],\n },\n videos: {\n appName: \"Agent-Native Videos\",\n tagline:\n \"Your AI agent builds, animates, and refines programmatic videos alongside you.\",\n features: [\n \"Generate animated components and compositions from a description\",\n \"Fine-tune tracks, keyframes, and easing without touching code\",\n \"Camera moves, interactive elements, and effects the agent wires for you\",\n ],\n },\n};\n\nconst SLUG_ALIASES: Record<string, string> = {\n \"agent-native\": \"\",\n \"blank-app\": \"starter\",\n asset: \"assets\",\n image: \"assets\",\n images: \"assets\",\n video: \"videos\",\n};\n\nfunction cloneMarketing(marketing: AuthMarketingContent): AuthMarketingContent {\n return {\n ...marketing,\n features: marketing.features ? [...marketing.features] : undefined,\n };\n}\n\nfunction normalizeSlug(value: string | undefined): string | undefined {\n if (!value) return undefined;\n let slug = value.trim().toLowerCase();\n if (!slug) return undefined;\n\n slug = slug.replace(/^@agent-native\\//, \"\");\n slug = slug\n .replace(/&/g, \" and \")\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n slug = slug.replace(/^agent-native-/, \"\");\n slug = SLUG_ALIASES[slug] ?? slug;\n if (!slug) return undefined;\n return BUILT_IN_AUTH_MARKETING[slug] ? slug : undefined;\n}\n\nfunction slugFromUrl(value: string | undefined): string | undefined {\n if (!value) return undefined;\n try {\n const url = new URL(value);\n return slugFromHost(url.host) ?? slugFromPath(url.pathname);\n } catch {\n return undefined;\n }\n}\n\nfunction slugFromHost(value: string | undefined): string | undefined {\n if (!value) return undefined;\n const host = value.split(\",\")[0]?.trim().split(\":\")[0]?.toLowerCase();\n if (!host) return undefined;\n if (host.endsWith(\".agent-native.com\")) {\n return normalizeSlug(host.slice(0, -\".agent-native.com\".length));\n }\n return undefined;\n}\n\nfunction slugFromPath(value: string | undefined): string | undefined {\n if (!value) return undefined;\n const firstSegment = value.split(\"?\")[0]?.split(\"/\").filter(Boolean)[0];\n return normalizeSlug(firstSegment);\n}\n\nfunction candidateSlugs(\n opts: ResolveBuiltInAuthMarketingOptions = {},\n): string[] {\n const env = process.env;\n const candidates = [\n opts.requestHost ? slugFromHost(opts.requestHost) : undefined,\n opts.requestPath ? slugFromPath(opts.requestPath) : undefined,\n normalizeSlug(env.AGENT_NATIVE_TEMPLATE),\n normalizeSlug(env.APP_NAME),\n normalizeSlug(env.npm_package_name),\n slugFromPath(env.APP_BASE_PATH),\n slugFromPath(env.VITE_APP_BASE_PATH),\n slugFromUrl(env.APP_URL),\n slugFromUrl(env.BETTER_AUTH_URL),\n slugFromUrl(env.VITE_BETTER_AUTH_URL),\n slugFromUrl(env.URL),\n slugFromUrl(env.DEPLOY_URL),\n slugFromUrl(env.DEPLOY_PRIME_URL),\n ];\n\n return candidates.filter((slug): slug is string => !!slug);\n}\n\nexport function resolveBuiltInAuthMarketing(\n opts: ResolveBuiltInAuthMarketingOptions = {},\n): AuthMarketingContent | undefined {\n for (const slug of candidateSlugs(opts)) {\n const marketing = BUILT_IN_AUTH_MARKETING[slug];\n if (marketing) return cloneMarketing(marketing);\n }\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auth-marketing.js","sourceRoot":"","sources":["../../src/server/auth-marketing.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IAC3E,SAAS,EAAE;QACT,OAAO,EAAE,wBAAwB;QACjC,OAAO,EACL,2GAA2G;QAC7G,QAAQ,EAAE;YACR,yEAAyE;YACzE,kEAAkE;YAClE,kEAAkE;SACnE;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EACL,qGAAqG;QACvG,QAAQ,EAAE;YACR,iEAAiE;YACjE,iDAAiD;YACjD,0DAA0D;SAC3D;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uFAAuF;QACzF,QAAQ,EAAE;YACR,oDAAoD;YACpD,sDAAsD;YACtD,6DAA6D;SAC9D;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EACL,0FAA0F;QAC5F,QAAQ,EAAE;YACR,2EAA2E;YAC3E,sEAAsE;YACtE,oEAAoE;SACrE;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EACL,iGAAiG;QACnG,QAAQ,EAAE;YACR,mEAAmE;YACnE,0EAA0E;YAC1E,4DAA4D;SAC7D;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EACL,wIAAwI;QAC1I,QAAQ,EAAE;YACR,oDAAoD;YACpD,4DAA4D;YAC5D,0CAA0C;SAC3C;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,sGAAsG;QACxG,QAAQ,EAAE;YACR,4DAA4D;YAC5D,6DAA6D;YAC7D,oDAAoD;SACrD;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,o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ACxB,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC;QAChC,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC;QACrC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC;QACpB,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;QAC3B,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC;KAClC,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAA2C,EAAE;IAE7C,KAAK,MAAM,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,SAAS;YAAE,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["export interface AuthMarketingContent {\n appName: string;\n tagline: string;\n description?: string;\n features?: string[];\n runLocalCommand?: string;\n}\n\nexport interface ResolveBuiltInAuthMarketingOptions {\n requestHost?: string;\n requestPath?: string;\n}\n\nexport const BUILT_IN_AUTH_MARKETING: Record<string, AuthMarketingContent> = {\n analytics: {\n appName: \"Agent-Native Analytics\",\n tagline:\n \"Your AI agent queries your data sources, builds dashboards, and answers business questions alongside you.\",\n features: [\n \"Ask any question and get answers from BigQuery, HubSpot, Jira, and more\",\n \"Agent-built dashboards that pull live data from all your sources\",\n \"Saved analyses the agent can re-run on demand with fresh numbers\",\n ],\n },\n brain: {\n appName: \"Agent-Native Brain\",\n tagline:\n \"A company memory layer where raw conversations become reviewed, searchable institutional knowledge.\",\n features: [\n \"Import transcripts, notes, Slack exports, and Granola summaries\",\n \"Validate every fact against exact source quotes\",\n \"Review company-wide knowledge through proposal workflows\",\n ],\n },\n calendar: {\n appName: \"Agent-Native Calendar\",\n tagline:\n \"Your AI agent schedules, reschedules, and manages your calendar so you never have to.\",\n features: [\n \"Finds open slots and books meetings on your behalf\",\n \"Manages availability and booking links automatically\",\n \"Answers schedule questions and resolves conflicts instantly\",\n ],\n },\n clips: {\n appName: \"Agent-Native Clips\",\n tagline:\n \"Your AI agent transcribes, summarizes, and searches everything you record alongside you.\",\n features: [\n \"One-click screen recording with automatic titles, summaries, and chapters\",\n \"Calendar-synced meeting notes with live transcripts and action items\",\n \"One searchable library across recordings, meetings, and dictations\",\n ],\n },\n content: {\n appName: \"Agent-Native Content\",\n tagline:\n \"Your AI agent creates, edits, and organizes documents alongside you in a Notion-like workspace.\",\n features: [\n \"Create and restructure entire document trees from a single prompt\",\n \"Surgical edits that sync live to your editor via real-time collaboration\",\n \"Search, summarize, and cross-reference documents instantly\",\n ],\n },\n design: {\n appName: \"Agent-Native Design\",\n tagline:\n \"Design and prototype by describing what you want. The AI agent turns your ideas into interactive, fully responsive designs in seconds.\",\n features: [\n \"Create polished prototypes just by describing them\",\n \"Build and apply design systems to keep everything on-brand\",\n \"Export your work or share it with a link\",\n ],\n },\n dispatch: {\n appName: \"Agent-Native Dispatch\",\n tagline:\n \"Your AI agent manages secrets, orchestrates other agents, and routes messages across your workspace.\",\n features: [\n \"Centralized vault for secrets with granular per-app grants\",\n \"Cross-agent orchestration and delegation to specialist apps\",\n \"Slack and Telegram routing with approval workflows\",\n ],\n },\n forms: {\n appName: \"Agent-Native Forms\",\n tagline:\n \"Your AI agent builds, publishes, and analyzes forms alongside you.\",\n features: [\n \"Create complete forms from a single sentence\",\n \"Instant publishing with shareable links and captcha\",\n \"Response summaries, exports, and trend analysis on demand\",\n ],\n },\n assets: {\n appName: \"Agent-Native Assets\",\n tagline:\n \"Your AI agent creates, refines, and organizes on-brand assets alongside you.\",\n features: [\n \"Build reusable asset libraries from logos, product shots, videos, and references\",\n \"Generate heroes, diagrams, slide art, product visuals, and videos from a prompt\",\n \"Audit prompts, references, outputs, and refinements across every run\",\n ],\n },\n mail: {\n appName: \"Agent-Native Mail\",\n tagline: \"Your AI agent reads, drafts, and organizes email alongside you.\",\n features: [\n \"Replies that match your tone and style\",\n \"Multi-account Gmail in a single unified inbox\",\n \"Autonomous triage, archiving, and follow-ups\",\n ],\n runLocalCommand:\n \"npx @agent-native/core@latest create my-mail-app --template mail\",\n },\n slides: {\n appName: \"Agent-Native Slides\",\n tagline:\n \"Your AI agent builds, edits, and refines presentations alongside you.\",\n features: [\n \"Generate entire decks from a single prompt\",\n \"Surgical slide edits while you present or review\",\n \"Real-time collaboration between you and the agent\",\n ],\n },\n starter: {\n appName: \"Blank app\",\n tagline:\n \"Build an agent-native app where the AI agent and UI share state, actions, and context.\",\n features: [\n \"Define once, use everywhere: actions work as agent tools and API endpoints\",\n \"The agent always knows what you are looking at and can act on it\",\n \"Modify your app's own code, routes, and styles through conversation\",\n ],\n },\n videos: {\n appName: \"Agent-Native Videos\",\n tagline:\n \"Your AI agent builds, animates, and refines programmatic videos alongside you.\",\n features: [\n \"Generate animated components and compositions from a description\",\n \"Fine-tune tracks, keyframes, and easing without touching code\",\n \"Camera moves, interactive elements, and effects the agent wires for you\",\n ],\n },\n};\n\nconst SLUG_ALIASES: Record<string, string> = {\n \"agent-native\": \"\",\n \"blank-app\": \"starter\",\n asset: \"assets\",\n image: \"assets\",\n images: \"assets\",\n video: \"videos\",\n};\n\nfunction cloneMarketing(marketing: AuthMarketingContent): AuthMarketingContent {\n return {\n ...marketing,\n features: marketing.features ? [...marketing.features] : undefined,\n };\n}\n\nfunction normalizeSlug(value: string | undefined): string | undefined {\n if (!value) return undefined;\n let slug = value.trim().toLowerCase();\n if (!slug) return undefined;\n\n slug = slug.replace(/^@agent-native\\//, \"\");\n slug = slug\n .replace(/&/g, \" and \")\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n slug = slug.replace(/^agent-native-/, \"\");\n slug = SLUG_ALIASES[slug] ?? slug;\n if (!slug) return undefined;\n return BUILT_IN_AUTH_MARKETING[slug] ? slug : undefined;\n}\n\nfunction slugFromUrl(value: string | undefined): string | undefined {\n if (!value) return undefined;\n try {\n const url = new URL(value);\n return slugFromHost(url.host) ?? slugFromPath(url.pathname);\n } catch {\n return undefined;\n }\n}\n\nfunction slugFromHost(value: string | undefined): string | undefined {\n if (!value) return undefined;\n const host = value.split(\",\")[0]?.trim().split(\":\")[0]?.toLowerCase();\n if (!host) return undefined;\n if (host.endsWith(\".agent-native.com\")) {\n return normalizeSlug(host.slice(0, -\".agent-native.com\".length));\n }\n return undefined;\n}\n\nfunction slugFromPath(value: string | undefined): string | undefined {\n if (!value) return undefined;\n const firstSegment = value.split(\"?\")[0]?.split(\"/\").filter(Boolean)[0];\n return normalizeSlug(firstSegment);\n}\n\nfunction candidateSlugs(\n opts: ResolveBuiltInAuthMarketingOptions = {},\n): string[] {\n const env = process.env;\n const candidates = [\n opts.requestHost ? slugFromHost(opts.requestHost) : undefined,\n opts.requestPath ? slugFromPath(opts.requestPath) : undefined,\n normalizeSlug(env.AGENT_NATIVE_TEMPLATE),\n normalizeSlug(env.APP_NAME),\n normalizeSlug(env.npm_package_name),\n slugFromPath(env.APP_BASE_PATH),\n slugFromPath(env.VITE_APP_BASE_PATH),\n slugFromUrl(env.APP_URL),\n slugFromUrl(env.BETTER_AUTH_URL),\n slugFromUrl(env.VITE_BETTER_AUTH_URL),\n slugFromUrl(env.URL),\n slugFromUrl(env.DEPLOY_URL),\n slugFromUrl(env.DEPLOY_PRIME_URL),\n ];\n\n return candidates.filter((slug): slug is string => !!slug);\n}\n\nexport function resolveBuiltInAuthMarketing(\n opts: ResolveBuiltInAuthMarketingOptions = {},\n): AuthMarketingContent | undefined {\n for (const slug of candidateSlugs(opts)) {\n const marketing = BUILT_IN_AUTH_MARKETING[slug];\n if (marketing) return cloneMarketing(marketing);\n }\n return undefined;\n}\n"]}
|
package/dist/vite/client.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { UserConfig } from "vite";
|
|
2
2
|
import { type AgentNativeRouteWarmupConfigInput } from "../shared/route-warmup-config.js";
|
|
3
|
+
/**
|
|
4
|
+
* Build the `resolve.dedupe` list dynamically. Reads core's package.json and
|
|
5
|
+
* collects every peerDependency that the consuming app also declares. This
|
|
6
|
+
* ensures Vite resolves them from the app root, not from core's own
|
|
7
|
+
* node_modules — preventing duplicate React context / singleton issues.
|
|
8
|
+
*/
|
|
9
|
+
declare function getClientDedupe(cwd: string): string[];
|
|
10
|
+
/**
|
|
11
|
+
* Locate `packages/core/src` if we're inside the framework monorepo.
|
|
12
|
+
* Shared between `getCoreSourceAliases` (which redirects imports to src/)
|
|
13
|
+
* and `getDefaultOptimizeDeps` (which must NOT prebundle from dist/ when
|
|
14
|
+
* the alias is active — otherwise the prebundle is built from a snapshot
|
|
15
|
+
* of dist/ at startup and never picks up new exports).
|
|
16
|
+
*/
|
|
17
|
+
declare function findCorePackageRoot(cwd: string): string | null;
|
|
3
18
|
export interface NitroOptions {
|
|
4
19
|
/** Nitro deployment preset (e.g. "node", "vercel", "netlify", "cloudflare_pages"). Default: "node" */
|
|
5
20
|
preset?: string;
|
|
@@ -87,4 +102,5 @@ export declare function isFrameworkDevPath(reqUrl: string, base: string | undefi
|
|
|
87
102
|
* Both modes include Nitro for API routes, path aliases, and fs restrictions.
|
|
88
103
|
*/
|
|
89
104
|
export declare function defineConfig(options?: ClientConfigOptions): UserConfig;
|
|
105
|
+
export { getClientDedupe as _getClientDedupe, findCorePackageRoot as _findCorePackageRoot, };
|
|
90
106
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/vite/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAmB/C,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../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AAE,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;IACvD,wCAAwC;IACxC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,iCAAiC,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AA+dD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAWT;AAoMD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,UAAU,CAmS1E;AAED,OAAO,EACL,eAAe,IAAI,gBAAgB,EACnC,mBAAmB,IAAI,oBAAoB,GAC5C,CAAC"}
|
package/dist/vite/client.js
CHANGED
|
@@ -116,7 +116,16 @@ function hasDep(pkg, cwd) {
|
|
|
116
116
|
*/
|
|
117
117
|
function getClientDedupe(cwd) {
|
|
118
118
|
// Always dedupe React internals (sub-path exports aren't in peerDeps)
|
|
119
|
-
const always = new Set([
|
|
119
|
+
const always = new Set([
|
|
120
|
+
"react",
|
|
121
|
+
"react-dom",
|
|
122
|
+
"react-dom/client",
|
|
123
|
+
// Framework routers must share one react-router instance so
|
|
124
|
+
// FrameworkContext (Meta/Links/Scripts) matches ServerRouter/HydratedRouter.
|
|
125
|
+
...(hasDep("react-router", cwd)
|
|
126
|
+
? ["react-router", "react-router/dom"]
|
|
127
|
+
: []),
|
|
128
|
+
]);
|
|
120
129
|
// Server-only packages that never run in the browser — no point deduping.
|
|
121
130
|
const serverOnly = new Set([
|
|
122
131
|
"drizzle-kit",
|
|
@@ -169,18 +178,43 @@ function getClientDedupe(cwd) {
|
|
|
169
178
|
* the alias is active — otherwise the prebundle is built from a snapshot
|
|
170
179
|
* of dist/ at startup and never picks up new exports).
|
|
171
180
|
*/
|
|
172
|
-
function
|
|
181
|
+
function findCorePackageRoot(cwd) {
|
|
182
|
+
try {
|
|
183
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(cwd, "package.json"), "utf-8"));
|
|
184
|
+
const spec = pkg.dependencies?.["@agent-native/core"] ??
|
|
185
|
+
pkg.devDependencies?.["@agent-native/core"];
|
|
186
|
+
if (typeof spec === "string" && spec.startsWith("file:")) {
|
|
187
|
+
const rooted = fileURLToPath(spec);
|
|
188
|
+
if (fs.existsSync(path.join(rooted, "src/index.ts")))
|
|
189
|
+
return rooted;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
// package.json missing or unreadable — fall through to path heuristics.
|
|
194
|
+
}
|
|
173
195
|
const candidates = [
|
|
174
196
|
path.resolve(cwd, "../../packages/core"), // templates/<name>/
|
|
175
197
|
path.resolve(cwd, "../core"), // packages/<name>/
|
|
198
|
+
path.resolve(cwd, "node_modules/@agent-native/core"),
|
|
176
199
|
];
|
|
177
200
|
for (const candidate of candidates) {
|
|
178
|
-
|
|
179
|
-
|
|
201
|
+
try {
|
|
202
|
+
if (!fs.existsSync(candidate))
|
|
203
|
+
continue;
|
|
204
|
+
const root = fs.realpathSync(candidate);
|
|
205
|
+
if (fs.existsSync(path.join(root, "src/index.ts")))
|
|
206
|
+
return root;
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
continue;
|
|
180
210
|
}
|
|
181
211
|
}
|
|
182
212
|
return null;
|
|
183
213
|
}
|
|
214
|
+
function findCoreSrcDir(cwd) {
|
|
215
|
+
const root = findCorePackageRoot(cwd);
|
|
216
|
+
return root ? path.join(root, "src") : null;
|
|
217
|
+
}
|
|
184
218
|
/**
|
|
185
219
|
* Every `@agent-native/core` subpath that gets a source alias. Must stay in
|
|
186
220
|
* sync with `getCoreSourceAliases`. Used by `getDefaultOptimizeDeps` to skip
|
|
@@ -305,6 +339,12 @@ function getDefaultOptimizeDeps(cwd) {
|
|
|
305
339
|
{ specifier: "h3" },
|
|
306
340
|
{ specifier: "next-themes" },
|
|
307
341
|
{ specifier: "react-hook-form" },
|
|
342
|
+
...(hasDep("react-router", cwd)
|
|
343
|
+
? [
|
|
344
|
+
{ specifier: "react-router" },
|
|
345
|
+
{ specifier: "react-router/dom", packageName: "react-router" },
|
|
346
|
+
]
|
|
347
|
+
: []),
|
|
308
348
|
{ specifier: "sonner" },
|
|
309
349
|
{ specifier: "tailwind-merge" },
|
|
310
350
|
{ specifier: "zod" },
|
|
@@ -1297,4 +1337,5 @@ export function defineConfig(options = {}) {
|
|
|
1297
1337
|
},
|
|
1298
1338
|
};
|
|
1299
1339
|
}
|
|
1340
|
+
export { getClientDedupe as _getClientDedupe, findCorePackageRoot as _findCorePackageRoot, };
|
|
1300
1341
|
//# sourceMappingURL=client.js.map
|