@agent-native/core 0.122.0 → 0.122.1
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 +4 -12
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +9 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +57 -4
- package/corpus/core/src/client/settings/SettingsPanel.tsx +9 -9
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +12 -2
- package/corpus/core/src/extensions/url-safety.ts +67 -4
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/corpus/core/src/templates/default/app/root.tsx +1 -1
- package/corpus/core/src/templates/default/public/manifest.json +2 -2
- package/corpus/core/src/vite/client.ts +64 -3
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -23
- package/corpus/templates/analytics/app/routes/_index.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/analytics/package.json +1 -1
- package/corpus/templates/analytics/public/manifest.json +1 -1
- package/corpus/templates/analytics/server/plugins/auth.ts +1 -1
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/assets/app/routes/_index.tsx +1 -1
- package/corpus/templates/assets/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/assets/server/plugins/auth.ts +1 -1
- package/corpus/templates/brain/app/lib/brain.ts +0 -7
- package/corpus/templates/brain/app/routes/_index.tsx +1 -2
- package/corpus/templates/brain/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/brain/package.json +1 -1
- package/corpus/templates/brain/public/manifest.json +1 -1
- package/corpus/templates/brain/server/plugins/auth.ts +1 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +0 -6
- package/corpus/templates/calendar/app/routes/_app._index.tsx +1 -1
- package/corpus/templates/calendar/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/calendar/package.json +1 -1
- package/corpus/templates/calendar/public/manifest.json +1 -1
- package/corpus/templates/calendar/server/plugins/auth.ts +1 -1
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/corpus/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/clips/actions/import-loom-recording.ts +53 -98
- package/corpus/templates/clips/actions/lib/loom-import-job.ts +260 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +0 -7
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_index.tsx +1 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +6 -0
- package/corpus/templates/clips/app/routes/record.tsx +5 -0
- package/corpus/templates/clips/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/clips/server/db/schema.ts +2 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +2 -1
- package/corpus/templates/clips/server/plugins/auth.ts +1 -1
- package/corpus/templates/clips/server/plugins/db.ts +8 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +56 -3
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -39
- package/corpus/templates/content/app/routes/_app._index.tsx +1 -2
- package/corpus/templates/content/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/content/package.json +1 -1
- package/corpus/templates/content/public/manifest.json +1 -1
- package/corpus/templates/content/server/plugins/auth.ts +1 -1
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/design/app/routes/_index.tsx +1 -1
- package/corpus/templates/design/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/design/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/design/server/plugins/auth.ts +1 -1
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +1 -10
- package/corpus/templates/dispatch/app/routes/overview.tsx +1 -1
- package/corpus/templates/dispatch/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/dispatch/package.json +1 -1
- package/corpus/templates/dispatch/public/manifest.json +1 -1
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +0 -35
- package/corpus/templates/forms/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/forms/package.json +1 -1
- package/corpus/templates/forms/public/manifest.json +1 -1
- package/corpus/templates/forms/server/plugins/auth.ts +1 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -2
- package/corpus/templates/macros/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/macros/package.json +1 -1
- package/corpus/templates/macros/server/plugins/auth.ts +2 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +0 -39
- package/corpus/templates/mail/app/routes/$view.$threadId.tsx +1 -1
- package/corpus/templates/mail/app/routes/$view.tsx +1 -1
- package/corpus/templates/mail/app/routes/_index.tsx +1 -1
- package/corpus/templates/mail/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/mail/package.json +1 -1
- package/corpus/templates/mail/public/manifest.json +1 -1
- package/corpus/templates/mail/server/plugins/auth.ts +1 -1
- package/corpus/templates/plan/agent-native.app-skill.json +1 -1
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +4 -9
- package/corpus/templates/plan/app/lib/app-config.ts +1 -1
- package/corpus/templates/plan/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/plan/package.json +1 -1
- package/corpus/templates/plan/public/manifest.json +1 -1
- package/corpus/templates/plan/server/plugins/auth.ts +1 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/slides/app/routes/_index.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/corpus/templates/slides/package.json +1 -1
- package/corpus/templates/slides/public/manifest.json +1 -1
- package/corpus/templates/slides/server/plugins/auth.ts +1 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +58 -4
- package/dist/a2a/client.js.map +1 -1
- package/dist/client/settings/SettingsPanel.js +9 -9
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +7 -4
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/url-safety.d.ts +9 -16
- package/dist/extensions/url-safety.d.ts.map +1 -1
- package/dist/extensions/url-safety.js +48 -4
- package/dist/extensions/url-safety.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/dist/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/dist/templates/default/app/root.tsx +1 -1
- package/dist/templates/default/public/manifest.json +2 -2
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +64 -1
- package/dist/vite/client.js.map +1 -1
- package/package.json +1 -1
- package/src/a2a/client.ts +57 -4
- package/src/client/settings/SettingsPanel.tsx +9 -9
- package/src/client/settings/SettingsTabsPage.tsx +12 -2
- package/src/extensions/url-safety.ts +67 -4
- package/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
- package/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
- package/src/templates/default/app/root.tsx +1 -1
- package/src/templates/default/public/manifest.json +2 -2
- package/src/vite/client.ts +64 -3
|
@@ -14,7 +14,6 @@ import { normalizeMailLabel } from "@shared/gmail-labels";
|
|
|
14
14
|
import type { Label } from "@shared/types";
|
|
15
15
|
import {
|
|
16
16
|
IconMenu2,
|
|
17
|
-
IconHierarchy2,
|
|
18
17
|
IconSettings,
|
|
19
18
|
IconSearch,
|
|
20
19
|
IconCheck,
|
|
@@ -1775,25 +1774,6 @@ function AppLayoutInner({ children }: AppLayoutProps) {
|
|
|
1775
1774
|
|
|
1776
1775
|
<div className="flex items-center justify-end gap-1 px-2 py-2">
|
|
1777
1776
|
<DevDatabaseLink />
|
|
1778
|
-
<Tooltip>
|
|
1779
|
-
<TooltipTrigger asChild>
|
|
1780
|
-
<Link
|
|
1781
|
-
to="/agent"
|
|
1782
|
-
onClick={closeSidebar}
|
|
1783
|
-
aria-label={t("settings.openAgentSettings")}
|
|
1784
|
-
className={cn(
|
|
1785
|
-
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",
|
|
1786
|
-
location.pathname === "/agent" &&
|
|
1787
|
-
"bg-accent/60 text-foreground",
|
|
1788
|
-
)}
|
|
1789
|
-
>
|
|
1790
|
-
<IconHierarchy2 className="h-4 w-4" />
|
|
1791
|
-
</Link>
|
|
1792
|
-
</TooltipTrigger>
|
|
1793
|
-
<TooltipContent>
|
|
1794
|
-
{t("settings.openAgentSettings")}
|
|
1795
|
-
</TooltipContent>
|
|
1796
|
-
</Tooltip>
|
|
1797
1777
|
<Tooltip>
|
|
1798
1778
|
<TooltipTrigger asChild>
|
|
1799
1779
|
<Link
|
|
@@ -2196,25 +2176,6 @@ function StandardLayout({ children }: AppLayoutProps) {
|
|
|
2196
2176
|
<div className="flex items-center justify-end gap-1 px-2 py-2">
|
|
2197
2177
|
<DevDatabaseLink />
|
|
2198
2178
|
<div className="flex shrink-0 items-center gap-0.5">
|
|
2199
|
-
<Tooltip>
|
|
2200
|
-
<TooltipTrigger asChild>
|
|
2201
|
-
<Link
|
|
2202
|
-
to="/agent"
|
|
2203
|
-
onClick={() => setSidebarOpen(false)}
|
|
2204
|
-
aria-label={t("settings.openAgentSettings")}
|
|
2205
|
-
className={cn(
|
|
2206
|
-
"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",
|
|
2207
|
-
location.pathname === "/agent" &&
|
|
2208
|
-
"bg-accent/60 text-foreground",
|
|
2209
|
-
)}
|
|
2210
|
-
>
|
|
2211
|
-
<IconHierarchy2 className="h-4 w-4" />
|
|
2212
|
-
</Link>
|
|
2213
|
-
</TooltipTrigger>
|
|
2214
|
-
<TooltipContent>
|
|
2215
|
-
{t("settings.openAgentSettings")}
|
|
2216
|
-
</TooltipContent>
|
|
2217
|
-
</Tooltip>
|
|
2218
2179
|
<Tooltip>
|
|
2219
2180
|
<TooltipTrigger asChild>
|
|
2220
2181
|
<Link
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InboxPage } from "@/pages/InboxPage";
|
|
2
2
|
|
|
3
3
|
const SEO_TITLE =
|
|
4
|
-
"
|
|
4
|
+
"Mail - Open Source AI email client and Superhuman alternative";
|
|
5
5
|
const SEO_DESCRIPTION =
|
|
6
6
|
"Open Source AI email client for Gmail triage, drafting, organization, follow-ups, and inbox workflows built around shared actions.";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InboxPage } from "@/pages/InboxPage";
|
|
2
2
|
|
|
3
3
|
const SEO_TITLE =
|
|
4
|
-
"
|
|
4
|
+
"Mail - Open Source AI email client and Superhuman alternative";
|
|
5
5
|
const SEO_DESCRIPTION =
|
|
6
6
|
"Open Source AI email client for Gmail triage, drafting, organization, follow-ups, and inbox workflows built around shared actions.";
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { redirect } from "react-router";
|
|
|
3
3
|
import { Spinner } from "@/components/ui/spinner";
|
|
4
4
|
|
|
5
5
|
const SEO_TITLE =
|
|
6
|
-
"
|
|
6
|
+
"Mail - Open Source AI email client and Superhuman alternative";
|
|
7
7
|
const SEO_DESCRIPTION =
|
|
8
8
|
"Open Source AI email client for Gmail triage, drafting, organization, follow-ups, and inbox workflows built around shared actions.";
|
|
9
9
|
|
|
@@ -26,7 +26,7 @@ export default createAuthPlugin({
|
|
|
26
26
|
"https://www.googleapis.com/auth/calendar.events",
|
|
27
27
|
],
|
|
28
28
|
marketing: {
|
|
29
|
-
appName: "
|
|
29
|
+
appName: "Mail",
|
|
30
30
|
tagline: "Your AI agent reads, drafts, and organizes email alongside you.",
|
|
31
31
|
features: [
|
|
32
32
|
"Replies that match your tone and style",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "plans",
|
|
4
|
-
"displayName": "
|
|
4
|
+
"displayName": "Plan",
|
|
5
5
|
"description": "Generate and review coding-agent plans as structured visual documents with diagrams, wireframes, prototypes, annotations, share links, feedback, and HTML export.",
|
|
6
6
|
"hosted": {
|
|
7
7
|
"url": "https://plan.agent-native.com",
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
type ChatHistoryItem,
|
|
21
21
|
} from "@agent-native/toolkit/chat-history";
|
|
22
22
|
import {
|
|
23
|
-
IconHierarchy2,
|
|
24
23
|
IconClipboardCheck,
|
|
25
24
|
IconEdit,
|
|
26
25
|
IconLayoutSidebarLeftCollapse,
|
|
@@ -57,19 +56,16 @@ const PLAN_CHAT_STORAGE_KEY = "plans";
|
|
|
57
56
|
|
|
58
57
|
const PLAN_BRANDING_CODE_CONTEXT = [
|
|
59
58
|
"The user is using the Plan app branding customization popover.",
|
|
60
|
-
"Make source-code changes for
|
|
59
|
+
"Make source-code changes for Plan branding in templates/plan.",
|
|
61
60
|
"Inspect the current brand surfaces first: app/lib/app-config.ts, app/components/layout/Sidebar.tsx, app/root.tsx metadata/icons, public brand assets, and app/global.css theme tokens.",
|
|
62
61
|
"Keep runtime plan data, stored plans, recaps, comments, and generated plan content unchanged unless the user explicitly asks for those data changes.",
|
|
63
62
|
"Use existing Plan styling, shadcn primitives, Tabler icons, and repo patterns. Keep changes tightly scoped.",
|
|
64
63
|
].join("\n");
|
|
65
64
|
|
|
66
65
|
function buildBrandingCustomizationMessage(request: string) {
|
|
67
|
-
return [
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
"Request:",
|
|
71
|
-
request,
|
|
72
|
-
].join("\n");
|
|
66
|
+
return ["Customize the Plan app branding.", "", "Request:", request].join(
|
|
67
|
+
"\n",
|
|
68
|
+
);
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
const navItems = [
|
|
@@ -78,7 +74,6 @@ const navItems = [
|
|
|
78
74
|
];
|
|
79
75
|
|
|
80
76
|
const bottomNavItems = [
|
|
81
|
-
{ icon: IconHierarchy2, labelKey: "settings.agentTitle", href: "/agent" },
|
|
82
77
|
{ icon: IconSettings, labelKey: "navigation.settings", href: "/settings" },
|
|
83
78
|
];
|
|
84
79
|
|
|
@@ -7,7 +7,6 @@ import { FeedbackButton } from "@agent-native/core/client/ui";
|
|
|
7
7
|
import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
|
|
8
8
|
import {
|
|
9
9
|
IconStack2,
|
|
10
|
-
IconHierarchy2,
|
|
11
10
|
IconPalette,
|
|
12
11
|
IconSettings,
|
|
13
12
|
IconLayoutSidebarLeftCollapse,
|
|
@@ -33,7 +32,6 @@ const navItems = [
|
|
|
33
32
|
];
|
|
34
33
|
|
|
35
34
|
const bottomNavItems = [
|
|
36
|
-
{ icon: IconHierarchy2, labelKey: "settings.agentTitle", href: "/agent" },
|
|
37
35
|
{ icon: IconSettings, labelKey: "navigation.settings", href: "/settings" },
|
|
38
36
|
];
|
|
39
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Index from "@/pages/Index";
|
|
2
2
|
|
|
3
3
|
const SEO_TITLE =
|
|
4
|
-
"
|
|
4
|
+
"Slides - Open Source AI presentation builder and Google Slides alternative";
|
|
5
5
|
const SEO_DESCRIPTION =
|
|
6
6
|
"Open Source AI presentation builder for generating, editing, refining, and exporting React decks as Google Slides-ready presentations.";
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import { createAuthPlugin } from "@agent-native/core/server";
|
|
|
2
2
|
|
|
3
3
|
export default createAuthPlugin({
|
|
4
4
|
marketing: {
|
|
5
|
-
appName: "
|
|
5
|
+
appName: "Slides",
|
|
6
6
|
tagline:
|
|
7
7
|
"Your AI agent builds, edits, and refines presentations alongside you.",
|
|
8
8
|
features: [
|
package/dist/a2a/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/a2a/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/a2a/client.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,SAAS,EAGT,OAAO,EACP,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,YAAY,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAU5D;CACF;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GACA,OAAO,CAAC,MAAM,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AE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC,GACA,OAAO,CAAC,uBAAuB,CAAC,CAqBlC"}
|
package/dist/a2a/client.js
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
import * as jose from "jose";
|
|
2
2
|
import { ssrfSafeFetch } from "../extensions/url-safety.js";
|
|
3
|
+
/**
|
|
4
|
+
* A workspace serves every app from one gateway on loopback, so sibling A2A
|
|
5
|
+
* targets are private addresses by construction and the SSRF guard cannot tell
|
|
6
|
+
* them apart from an attack. Trust only origins this deployment configured for
|
|
7
|
+
* itself — never a value that arrived on a request.
|
|
8
|
+
*/
|
|
9
|
+
function workspacePrivateOrigins() {
|
|
10
|
+
const origins = [
|
|
11
|
+
process.env.WORKSPACE_GATEWAY_URL,
|
|
12
|
+
process.env.APP_URL,
|
|
13
|
+
process.env.BETTER_AUTH_URL,
|
|
14
|
+
// Escape hatch for contexts that never receive the gateway manifest (the
|
|
15
|
+
// action CLI, one-off scripts). Comma-separated origins.
|
|
16
|
+
...(process.env.AGENT_NATIVE_A2A_ALLOWED_ORIGINS ?? "").split(","),
|
|
17
|
+
]
|
|
18
|
+
.map((value) => value?.trim())
|
|
19
|
+
.filter((value) => !!value);
|
|
20
|
+
// The gateway also hands each child the sibling manifest, and siblings are
|
|
21
|
+
// reached on their own loopback ports rather than through the gateway.
|
|
22
|
+
const raw = process.env.AGENT_NATIVE_WORKSPACE_APPS_JSON;
|
|
23
|
+
if (raw) {
|
|
24
|
+
try {
|
|
25
|
+
const parsed = JSON.parse(raw);
|
|
26
|
+
const apps = Array.isArray(parsed?.apps)
|
|
27
|
+
? parsed.apps
|
|
28
|
+
: Array.isArray(parsed)
|
|
29
|
+
? parsed
|
|
30
|
+
: [];
|
|
31
|
+
for (const app of apps) {
|
|
32
|
+
const url = app?.url ?? app?.origin ?? app?.baseUrl;
|
|
33
|
+
if (typeof url === "string" && url)
|
|
34
|
+
origins.push(url);
|
|
35
|
+
const port = app?.port;
|
|
36
|
+
if (typeof port === "number" && Number.isFinite(port)) {
|
|
37
|
+
origins.push(`http://127.0.0.1:${port}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// A malformed manifest must not disable the SSRF guard.
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return origins;
|
|
46
|
+
}
|
|
3
47
|
import { sanitizeA2ACorrelationMetadata } from "./correlation.js";
|
|
4
48
|
const DEFAULT_A2A_POLL_REQUEST_TIMEOUT_MS = 15_000;
|
|
5
49
|
export class A2ATaskTimeoutError extends Error {
|
|
@@ -87,7 +131,7 @@ export class A2AClient {
|
|
|
87
131
|
return;
|
|
88
132
|
for (const endpoint of this.endpointCandidates) {
|
|
89
133
|
try {
|
|
90
|
-
const res = await ssrfSafeFetch(endpoint, { method: "OPTIONS" }, { maxRedirects: 3 });
|
|
134
|
+
const res = await ssrfSafeFetch(endpoint, { method: "OPTIONS" }, { maxRedirects: 3, allowedPrivateOrigins: workspacePrivateOrigins() });
|
|
91
135
|
if (res.status !== 404 && res.status !== 405) {
|
|
92
136
|
this.endpointCandidates = [endpoint];
|
|
93
137
|
return;
|
|
@@ -157,7 +201,7 @@ export class A2AClient {
|
|
|
157
201
|
throw lastError ?? new Error("No A2A endpoint candidates available");
|
|
158
202
|
}
|
|
159
203
|
async getAgentCard() {
|
|
160
|
-
const res = await ssrfSafeFetch(`${this.baseUrl}/.well-known/agent-card.json`, {}, { maxRedirects: 3 });
|
|
204
|
+
const res = await ssrfSafeFetch(`${this.baseUrl}/.well-known/agent-card.json`, {}, { maxRedirects: 3, allowedPrivateOrigins: workspacePrivateOrigins() });
|
|
161
205
|
if (!res.ok) {
|
|
162
206
|
throw new Error(`Failed to fetch agent card (${res.status})`);
|
|
163
207
|
}
|
|
@@ -372,7 +416,7 @@ export class A2AClient {
|
|
|
372
416
|
headers: this.headers(apiKey),
|
|
373
417
|
body: JSON.stringify(body),
|
|
374
418
|
signal: controller?.signal,
|
|
375
|
-
}, { maxRedirects: 3 });
|
|
419
|
+
}, { maxRedirects: 3, allowedPrivateOrigins: workspacePrivateOrigins() });
|
|
376
420
|
}
|
|
377
421
|
finally {
|
|
378
422
|
if (timer)
|
|
@@ -609,7 +653,17 @@ async function buildA2AApiKeyAttempts(opts, audience) {
|
|
|
609
653
|
}
|
|
610
654
|
function normalizeA2AAudience(url) {
|
|
611
655
|
const explicit = splitExplicitA2AEndpoint(url.replace(/\/$/, ""));
|
|
612
|
-
|
|
656
|
+
const base = (explicit?.baseUrl ?? url).replace(/\/$/, "");
|
|
657
|
+
// Receivers derive their expected audience from APP_URL, which carries no
|
|
658
|
+
// app path. In a workspace every app is mounted under one gateway origin, so
|
|
659
|
+
// signing the path-qualified URL yields an audience the receiver can never
|
|
660
|
+
// match. The origin is the identifier both sides agree on.
|
|
661
|
+
try {
|
|
662
|
+
return new URL(base).origin;
|
|
663
|
+
}
|
|
664
|
+
catch {
|
|
665
|
+
return base;
|
|
666
|
+
}
|
|
613
667
|
}
|
|
614
668
|
function isA2AAuthRejection(err) {
|
|
615
669
|
const message = err instanceof Error ? err.message : String(err ?? "");
|