@agent-native/core 0.176.4 → 0.176.5-nightly-20260902205402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +6 -0
- package/corpus/templates/calendar/AGENTS.md +4 -0
- package/corpus/templates/calendar/actions/delete-event.ts +2 -2
- package/corpus/templates/calendar/actions/event-action-helpers.ts +7 -0
- package/corpus/templates/calendar/actions/get-event.ts +40 -3
- package/corpus/templates/calendar/actions/list-events.ts +49 -2
- package/corpus/templates/calendar/actions/list-google-calendars.ts +24 -0
- package/corpus/templates/calendar/actions/update-calendar-visual-preferences.ts +52 -1
- package/corpus/templates/calendar/actions/update-event.ts +2 -2
- package/corpus/templates/calendar/actions/view-screen.ts +54 -2
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +33 -19
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +31 -5
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +102 -0
- package/corpus/templates/calendar/app/hooks/use-events.ts +45 -10
- package/corpus/templates/calendar/app/hooks/use-google-auth.ts +8 -1
- package/corpus/templates/calendar/app/hooks/use-google-calendars.ts +41 -0
- package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +56 -4
- package/corpus/templates/calendar/app/lib/shared-calendar-demo.ts +187 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +50 -5
- package/corpus/templates/calendar/changelog/2026-09-01-calendars-shared-with-your-connected-google-accounts-can-now.md +6 -0
- package/corpus/templates/calendar/changelog/2026-09-02-updated-the-booking-link-og-preview-image-with-the-new-monoc.md +6 -0
- package/corpus/templates/calendar/server/lib/booking-og-image.ts +8 -18
- package/corpus/templates/calendar/server/lib/google-api.ts +10 -0
- package/corpus/templates/calendar/server/lib/google-calendar.ts +215 -21
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +2 -0
- package/corpus/templates/calendar/server/plugins/feature-flags.ts +5 -0
- package/corpus/templates/calendar/shared/api.ts +20 -0
- package/corpus/templates/calendar/shared/calendar-view-preferences.ts +28 -1
- package/corpus/templates/calendar/shared/feature-flags.ts +8 -0
- package/corpus/templates/calendar/shared/google-calendar-sources.ts +46 -0
- package/corpus/templates/factory/.env.example +5 -0
- package/corpus/templates/factory/README.md +9 -0
- package/corpus/templates/factory/server/connectors/credentials.ts +28 -6
- package/corpus/templates/factory/server/triage/github-client.ts +144 -7
- package/corpus/templates/forms/server/lib/form-og-image.ts +7 -17
- package/corpus/templates/slides/actions/add-slide.ts +1 -0
- package/corpus/templates/slides/actions/create-deck.ts +1 -0
- package/corpus/templates/slides/actions/get-deck.ts +1 -0
- package/corpus/templates/slides/actions/navigate.ts +1 -0
- package/corpus/templates/slides/actions/patch-deck.ts +1 -0
- package/corpus/templates/slides/actions/update-slide.ts +1 -0
- package/corpus/templates/slides/actions/view-screen.ts +1 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +2 -0
- package/dist/action.d.ts +4 -0
- package/dist/action.js +3 -0
- package/dist/agent/types.d.ts +1 -0
- package/dist/automation/index.d.ts +1 -1
- package/dist/client/webmcp.js +7 -2
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/mcp/build-server.d.ts +2 -0
- package/dist/mcp/build-server.js +4 -0
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- package/dist/provider-api/actions/provider-api.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-routes.d.ts +1 -0
- package/dist/server/action-routes.js +4 -0
- package/dist/server/agent-chat/mcp-options.d.ts +4 -0
- package/dist/server/agent-chat/mcp-options.js +1 -0
- package/dist/server/agent-chat-plugin.js +2 -0
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/social-og-image.js +6 -20
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/agent-mcp-metadata.d.ts +3 -0
- package/dist/shared/agent-mcp-metadata.js +18 -0
- package/dist/shared/social-meta.d.ts +1 -1
- package/dist/shared/social-meta.js +1 -1
- package/package.json +1 -1
|
@@ -329,8 +329,8 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
329
329
|
label?: undefined;
|
|
330
330
|
message?: undefined;
|
|
331
331
|
} | {
|
|
332
|
-
count?: undefined;
|
|
333
332
|
id?: undefined;
|
|
333
|
+
count?: undefined;
|
|
334
334
|
providers?: undefined;
|
|
335
335
|
found: boolean;
|
|
336
336
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
|
|
|
34
34
|
/** POST /_agent-native/secrets/:key — write a secret. */
|
|
35
35
|
export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
36
36
|
error: string;
|
|
37
|
-
ok?: undefined;
|
|
38
37
|
status?: undefined;
|
|
38
|
+
ok?: undefined;
|
|
39
39
|
} | {
|
|
40
|
-
error?: undefined;
|
|
41
40
|
ok: boolean;
|
|
42
41
|
status: string;
|
|
42
|
+
error?: undefined;
|
|
43
43
|
} | {
|
|
44
|
-
ok?: undefined;
|
|
45
44
|
error: string;
|
|
46
45
|
removed?: undefined;
|
|
46
|
+
ok?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
error?: undefined;
|
|
49
48
|
ok: boolean;
|
|
50
49
|
removed: boolean;
|
|
50
|
+
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
54
54
|
* or the current stored value without changing anything.
|
|
55
55
|
*/
|
|
56
56
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
57
|
-
ok?: undefined;
|
|
58
57
|
error: string;
|
|
59
58
|
note?: undefined;
|
|
59
|
+
ok?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
error?: undefined;
|
|
62
61
|
ok: boolean;
|
|
63
62
|
note?: undefined;
|
|
64
|
-
} | {
|
|
65
63
|
error?: undefined;
|
|
64
|
+
} | {
|
|
66
65
|
ok: boolean;
|
|
67
66
|
note: string;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
-
error?: undefined;
|
|
99
98
|
ok: boolean;
|
|
100
99
|
key: string;
|
|
101
|
-
} | {
|
|
102
100
|
error?: undefined;
|
|
101
|
+
} | {
|
|
103
102
|
ok: boolean;
|
|
104
103
|
removed: boolean;
|
|
104
|
+
error?: undefined;
|
|
105
105
|
}>>;
|
|
@@ -6,6 +6,7 @@ import { declaresFeatureFlagDelegation } from "../feature-flags/a2a-action-route
|
|
|
6
6
|
import { isFeatureFlagAdminEmail } from "../feature-flags/permissions.js";
|
|
7
7
|
import { resolveOrgByDomain, resolveOrgIdForEmail } from "../org/context.js";
|
|
8
8
|
import { readBody } from "../server/h3-helpers.js";
|
|
9
|
+
import { agentNativeMcpInstructions, agentNativeToolTitle, } from "../shared/agent-mcp-metadata.js";
|
|
9
10
|
import { EMBED_TARGET_HEADER } from "../shared/embed-auth.js";
|
|
10
11
|
import { isMcpEmbedCorsOrigin, MCP_EMBED_CORS_ALLOW_HEADERS, shouldAllowMcpEmbedCredentials, } from "../shared/mcp-embed-headers.js";
|
|
11
12
|
import { actionCallIsReadOnly, notifyActionChange } from "./action-change.js";
|
|
@@ -619,6 +620,7 @@ function buildWebMcpCompatibilityManifest(event, actions, options) {
|
|
|
619
620
|
};
|
|
620
621
|
return {
|
|
621
622
|
name,
|
|
623
|
+
title: agentNativeToolTitle(name, entry.tool.title),
|
|
622
624
|
description: entry.tool.description,
|
|
623
625
|
parameters: inputSchema,
|
|
624
626
|
inputSchema,
|
|
@@ -634,6 +636,7 @@ function buildWebMcpCompatibilityManifest(event, actions, options) {
|
|
|
634
636
|
name: options?.name ?? "Agent",
|
|
635
637
|
...(options?.title ? { title: options.title } : {}),
|
|
636
638
|
description: options?.description ?? "Agent-Native app agent",
|
|
639
|
+
instructions: agentNativeMcpInstructions(options?.instructions),
|
|
637
640
|
version: options?.version ?? "1.0.0",
|
|
638
641
|
...(options?.websiteUrl ? { website_url: options.websiteUrl } : {}),
|
|
639
642
|
...(options?.icons ? { icons: options.icons } : {}),
|
|
@@ -684,6 +687,7 @@ export function mountWebMcpActionRoutes(nitroApp, actions, options) {
|
|
|
684
687
|
setResponseHeader(event, "Cache-Control", "no-store");
|
|
685
688
|
return Object.entries(eligible).map(([name, entry]) => ({
|
|
686
689
|
name,
|
|
690
|
+
title: agentNativeToolTitle(name, entry.tool.title),
|
|
687
691
|
description: entry.tool.description,
|
|
688
692
|
inputSchema: entry.tool.parameters,
|
|
689
693
|
readOnly: entry.readOnly === true,
|
|
@@ -70,6 +70,8 @@ export interface AgentChatMcpOptions {
|
|
|
70
70
|
websiteUrl?: string;
|
|
71
71
|
/** App icons. Relative `src` values are resolved against the request origin. */
|
|
72
72
|
icons?: AgentChatMcpIcon[];
|
|
73
|
+
/** Additional host-facing guidance included in MCP initialization metadata. */
|
|
74
|
+
instructions?: string;
|
|
73
75
|
}
|
|
74
76
|
/** The legacy top-level keys `mcp` replaces. */
|
|
75
77
|
export interface AgentChatMcpLegacyInput {
|
|
@@ -81,6 +83,7 @@ export interface AgentChatMcpLegacyInput {
|
|
|
81
83
|
description?: string;
|
|
82
84
|
websiteUrl?: string;
|
|
83
85
|
icons?: AgentChatMcpIcon[];
|
|
86
|
+
instructions?: string;
|
|
84
87
|
};
|
|
85
88
|
/** @deprecated Use `mcp.connectorCatalog`. */
|
|
86
89
|
connectorCatalog?: string[];
|
|
@@ -98,6 +101,7 @@ export interface ResolvedAgentChatMcp {
|
|
|
98
101
|
description: string | undefined;
|
|
99
102
|
websiteUrl: string | undefined;
|
|
100
103
|
icons: AgentChatMcpIcon[] | undefined;
|
|
104
|
+
instructions: string | undefined;
|
|
101
105
|
}
|
|
102
106
|
/**
|
|
103
107
|
* Collapse the nested `mcp` option and the legacy top-level keys into the one
|
|
@@ -61,5 +61,6 @@ export function resolveAgentChatMcpOptions(input) {
|
|
|
61
61
|
description: pick("description", "mcpServerInfo.description", legacyInfo?.description, mcp.description),
|
|
62
62
|
websiteUrl: pick("websiteUrl", "mcpServerInfo.websiteUrl", legacyInfo?.websiteUrl, mcp.websiteUrl),
|
|
63
63
|
icons: pick("icons", "mcpServerInfo.icons", legacyInfo?.icons, mcp.icons),
|
|
64
|
+
instructions: pick("instructions", "mcpServerInfo.instructions", legacyInfo?.instructions, mcp.instructions),
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -1932,6 +1932,7 @@ export function createAgentChatPlugin(options) {
|
|
|
1932
1932
|
appId: options?.appId,
|
|
1933
1933
|
description: mcpOptions.description ??
|
|
1934
1934
|
`Agent-Native ${options?.appId ?? "app"} agent`,
|
|
1935
|
+
instructions: mcpOptions.instructions,
|
|
1935
1936
|
websiteUrl: mcpOptions.websiteUrl,
|
|
1936
1937
|
icons: mcpOptions.icons,
|
|
1937
1938
|
actions: externalActions,
|
|
@@ -2187,6 +2188,7 @@ export function createAgentChatPlugin(options) {
|
|
|
2187
2188
|
title: mcpOptions.title,
|
|
2188
2189
|
description: mcpOptions.description ??
|
|
2189
2190
|
`Agent-Native ${options?.appId ?? "app"} agent`,
|
|
2191
|
+
instructions: mcpOptions.instructions,
|
|
2190
2192
|
websiteUrl: mcpOptions.websiteUrl,
|
|
2191
2193
|
icons: mcpOptions.icons,
|
|
2192
2194
|
},
|
|
@@ -59,8 +59,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
|
|
|
59
59
|
expiresAt?: undefined;
|
|
60
60
|
ttlSeconds?: undefined;
|
|
61
61
|
} | {
|
|
62
|
-
error?: undefined;
|
|
63
62
|
token: string;
|
|
64
63
|
expiresAt: string;
|
|
65
64
|
ttlSeconds: number;
|
|
65
|
+
error?: undefined;
|
|
66
66
|
}>>;
|
|
@@ -10,11 +10,9 @@ export const AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL = "public, max-age=60, stale-wh
|
|
|
10
10
|
export const AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL = "public, durable, max-age=60, stale-while-revalidate=604800, stale-if-error=3600";
|
|
11
11
|
const WIDTH = AGENT_NATIVE_OG_IMAGE_WIDTH;
|
|
12
12
|
const HEIGHT = AGENT_NATIVE_OG_IMAGE_HEIGHT;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const FG = "#f5f5f5";
|
|
17
|
-
const GRID_SIZE = 48;
|
|
13
|
+
const BG = "#0A0A0A";
|
|
14
|
+
const FG = "#FAF9F5";
|
|
15
|
+
const ACCENT_FG = "#9A9997";
|
|
18
16
|
const DEFAULT_FONT_FAMILY = `${OG_FONT_FAMILY}, Arial, Helvetica, system-ui, sans-serif`;
|
|
19
17
|
const ARABIC_FONT_FAMILY = `${OG_ARABIC_FONT_FAMILY}, ${OG_FONT_FAMILY}, Arial, Helvetica, system-ui, sans-serif`;
|
|
20
18
|
const DEFAULT_ACCENT_TEXT = "100% free and open source";
|
|
@@ -23,8 +21,8 @@ const MAX_LOGO_BYTES = 2_000_000;
|
|
|
23
21
|
const LOGO_CONTENT_TYPE_RE = /^image\/(?:png|jpe?g|gif|webp|svg\+xml)$/i;
|
|
24
22
|
const LOGO_DATA_URL_RE = new RegExp(`^data:image\\/(?:png|jpe?g|gif|webp|svg\\+xml);base64,[A-Za-z0-9+/]+={0,2}$`, "i");
|
|
25
23
|
const LOGO_MARK = `
|
|
26
|
-
<path d="
|
|
27
|
-
<path d="
|
|
24
|
+
<path d="M26.8789 71.999H0L16.5146 43.1992L41.2793 0L66.2197 43.1992H43.3945L26.8789 71.999Z" fill="white"/>
|
|
25
|
+
<path d="M97.914 0H124.794L83.5143 72H56.6348L97.914 0Z" fill="white"/>
|
|
28
26
|
`;
|
|
29
27
|
function escapeSvg(value) {
|
|
30
28
|
return value
|
|
@@ -399,19 +397,7 @@ export function renderAgentNativeOgImageSvg(input = {}) {
|
|
|
399
397
|
: "";
|
|
400
398
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${WIDTH}" height="${HEIGHT}" viewBox="0 0 ${WIDTH} ${HEIGHT}">
|
|
401
399
|
<title>${escapeSvg(title)}${mode === "agent-native" ? " - Agent-Native preview" : " preview"}</title>
|
|
402
|
-
<defs>
|
|
403
|
-
${mode === "agent-native"
|
|
404
|
-
? `<linearGradient id="brand" x1="101.702" y1="67.4791" x2="113.672" y2="-37.4275" gradientUnits="userSpaceOnUse">
|
|
405
|
-
<stop stop-color="${BRAND_BLUE}"/>
|
|
406
|
-
<stop offset="1" stop-color="${BRAND_MINT}"/>
|
|
407
|
-
</linearGradient>`
|
|
408
|
-
: ""}
|
|
409
|
-
<pattern id="grid" width="${GRID_SIZE}" height="${GRID_SIZE}" patternUnits="userSpaceOnUse">
|
|
410
|
-
<path d="M 0 0.5 H ${GRID_SIZE} M 0.5 0 V ${GRID_SIZE}" fill="none" stroke="#ffffff" stroke-opacity="0.07" stroke-width="1"/>
|
|
411
|
-
</pattern>
|
|
412
|
-
</defs>
|
|
413
400
|
<rect width="${WIDTH}" height="${HEIGHT}" fill="${BG}"/>
|
|
414
|
-
<rect width="${WIDTH}" height="${HEIGHT}" fill="url(#grid)"/>
|
|
415
401
|
${logo ? `<g transform="translate(80 116) scale(0.94)">${logo}</g>` : ""}
|
|
416
402
|
<g>
|
|
417
403
|
${textBlock({
|
|
@@ -437,7 +423,7 @@ export function renderAgentNativeOgImageSvg(input = {}) {
|
|
|
437
423
|
fontSize: 34,
|
|
438
424
|
lineHeight: 40,
|
|
439
425
|
weight: 800,
|
|
440
|
-
fill:
|
|
426
|
+
fill: ACCENT_FG,
|
|
441
427
|
anchor: textAnchor,
|
|
442
428
|
fontFamily: fontFamilyForText(accentText),
|
|
443
429
|
})
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const DEFAULT_AGENT_NATIVE_MCP_INSTRUCTIONS = "This Agent-Native app exposes focused action tools. When the host supports page-local WebMCP, prefer the page's named tools over browser click/type automation for supported actions. For state-dependent work, call the app's current-screen or context read first; use the smallest matching mutation, then read back to verify the result.";
|
|
2
|
+
export declare function agentNativeMcpInstructions(custom?: string): string;
|
|
3
|
+
export declare function agentNativeToolTitle(name: string, title?: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DEFAULT_AGENT_NATIVE_MCP_INSTRUCTIONS = "This Agent-Native app exposes focused action tools. When the host supports page-local WebMCP, prefer the page's named tools over browser click/type automation for supported actions. For state-dependent work, call the app's current-screen or context read first; use the smallest matching mutation, then read back to verify the result.";
|
|
2
|
+
export function agentNativeMcpInstructions(custom) {
|
|
3
|
+
const extra = custom?.trim();
|
|
4
|
+
return extra
|
|
5
|
+
? `${DEFAULT_AGENT_NATIVE_MCP_INSTRUCTIONS}\n\nApp-specific guidance:\n${extra}`
|
|
6
|
+
: DEFAULT_AGENT_NATIVE_MCP_INSTRUCTIONS;
|
|
7
|
+
}
|
|
8
|
+
export function agentNativeToolTitle(name, title) {
|
|
9
|
+
const explicit = title?.trim();
|
|
10
|
+
if (explicit)
|
|
11
|
+
return explicit;
|
|
12
|
+
const readable = name
|
|
13
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
14
|
+
.replace(/[_.-]+/g, " ")
|
|
15
|
+
.replace(/\s+/g, " ")
|
|
16
|
+
.trim();
|
|
17
|
+
return readable ? readable[0].toUpperCase() + readable.slice(1) : name;
|
|
18
|
+
}
|
|
@@ -7,7 +7,7 @@ export type SocialMetaDescriptor = {
|
|
|
7
7
|
name: string;
|
|
8
8
|
content: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE = "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%
|
|
10
|
+
export declare const AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE = "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F9ff332b274a147229544c2bf5877a10d";
|
|
11
11
|
export declare const AGENT_NATIVE_SOCIAL_IMAGE_PATH = "/_agent-native/og-image.png";
|
|
12
12
|
export declare const AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER = "font-text-v2";
|
|
13
13
|
export declare const AGENT_NATIVE_SOCIAL_IMAGE_WIDTH = "1200";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE = "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%
|
|
1
|
+
export const AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE = "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F9ff332b274a147229544c2bf5877a10d";
|
|
2
2
|
export const AGENT_NATIVE_SOCIAL_IMAGE_PATH = "/_agent-native/og-image.png";
|
|
3
3
|
export const AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER = "font-text-v2";
|
|
4
4
|
export const AGENT_NATIVE_SOCIAL_IMAGE_WIDTH = "1200";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.176.
|
|
3
|
+
"version": "0.176.5-nightly-20260902205402",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|