@agent-native/core 0.176.4 → 0.176.5-nightly-20260902202853

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +6 -0
  3. package/corpus/templates/calendar/AGENTS.md +4 -0
  4. package/corpus/templates/calendar/actions/delete-event.ts +2 -2
  5. package/corpus/templates/calendar/actions/event-action-helpers.ts +7 -0
  6. package/corpus/templates/calendar/actions/get-event.ts +40 -3
  7. package/corpus/templates/calendar/actions/list-events.ts +49 -2
  8. package/corpus/templates/calendar/actions/list-google-calendars.ts +24 -0
  9. package/corpus/templates/calendar/actions/update-calendar-visual-preferences.ts +52 -1
  10. package/corpus/templates/calendar/actions/update-event.ts +2 -2
  11. package/corpus/templates/calendar/actions/view-screen.ts +54 -2
  12. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +33 -19
  13. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +31 -5
  14. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +102 -0
  15. package/corpus/templates/calendar/app/hooks/use-events.ts +45 -10
  16. package/corpus/templates/calendar/app/hooks/use-google-auth.ts +8 -1
  17. package/corpus/templates/calendar/app/hooks/use-google-calendars.ts +41 -0
  18. package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +56 -4
  19. package/corpus/templates/calendar/app/lib/shared-calendar-demo.ts +187 -0
  20. package/corpus/templates/calendar/app/pages/CalendarView.tsx +50 -5
  21. package/corpus/templates/calendar/changelog/2026-09-01-calendars-shared-with-your-connected-google-accounts-can-now.md +6 -0
  22. package/corpus/templates/calendar/changelog/2026-09-02-updated-the-booking-link-og-preview-image-with-the-new-monoc.md +6 -0
  23. package/corpus/templates/calendar/server/lib/booking-og-image.ts +8 -18
  24. package/corpus/templates/calendar/server/lib/google-api.ts +10 -0
  25. package/corpus/templates/calendar/server/lib/google-calendar.ts +215 -21
  26. package/corpus/templates/calendar/server/plugins/agent-chat.ts +2 -0
  27. package/corpus/templates/calendar/server/plugins/feature-flags.ts +5 -0
  28. package/corpus/templates/calendar/shared/api.ts +20 -0
  29. package/corpus/templates/calendar/shared/calendar-view-preferences.ts +28 -1
  30. package/corpus/templates/calendar/shared/feature-flags.ts +8 -0
  31. package/corpus/templates/calendar/shared/google-calendar-sources.ts +46 -0
  32. package/corpus/templates/forms/server/lib/form-og-image.ts +7 -17
  33. package/dist/collab/awareness.d.ts +2 -2
  34. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  35. package/dist/notifications/routes.d.ts +3 -3
  36. package/dist/observability/routes.d.ts +5 -5
  37. package/dist/progress/routes.d.ts +1 -1
  38. package/dist/resources/handlers.d.ts +1 -1
  39. package/dist/secrets/routes.d.ts +9 -9
  40. package/dist/server/realtime-token.d.ts +1 -1
  41. package/dist/server/social-og-image.js +6 -20
  42. package/dist/shared/social-meta.d.ts +1 -1
  43. package/dist/shared/social-meta.js +1 -1
  44. package/package.json +3 -3
@@ -0,0 +1,46 @@
1
+ export interface GoogleCalendarSourceIdentity {
2
+ accountEmail: string;
3
+ calendarId: string;
4
+ }
5
+
6
+ /**
7
+ * Calendar ids are provider data and may contain separators, so encode the
8
+ * complete identity rather than joining two user-controlled strings.
9
+ */
10
+ export function createGoogleCalendarSourceKey({
11
+ accountEmail,
12
+ calendarId,
13
+ }: GoogleCalendarSourceIdentity): string {
14
+ return `google-calendar:${Buffer.from(
15
+ JSON.stringify([accountEmail.trim().toLowerCase(), calendarId]),
16
+ ).toString("base64url")}`;
17
+ }
18
+
19
+ export function parseGoogleCalendarSourceKey(
20
+ sourceKey: string,
21
+ ): GoogleCalendarSourceIdentity | null {
22
+ const prefix = "google-calendar:";
23
+ if (!sourceKey.startsWith(prefix)) return null;
24
+ try {
25
+ const parsed: unknown = JSON.parse(
26
+ Buffer.from(sourceKey.slice(prefix.length), "base64url").toString("utf8"),
27
+ );
28
+ if (
29
+ !Array.isArray(parsed) ||
30
+ parsed.length !== 2 ||
31
+ typeof parsed[0] !== "string" ||
32
+ typeof parsed[1] !== "string" ||
33
+ !parsed[0].trim() ||
34
+ !parsed[1]
35
+ ) {
36
+ return null;
37
+ }
38
+ return {
39
+ accountEmail: parsed[0].trim().toLowerCase(),
40
+ calendarId: parsed[1],
41
+ };
42
+ } catch {
43
+ // coercion-ok: malformed opaque input is a typed invalid-key result.
44
+ return null;
45
+ }
46
+ }
@@ -13,21 +13,19 @@ interface FormOgRenderOptions {
13
13
 
14
14
  const WIDTH = 1200;
15
15
  const HEIGHT = 630;
16
- const BRAND_BLUE = "#00B5FF";
17
- const BRAND_MINT = "#48FFE4";
18
- const BG = "#000000";
16
+ const BG = "#0A0A0A";
19
17
  const SURFACE = "#0a0a0a";
20
18
  const BORDER = "#1f1f1f";
21
- const FG = "#ededed";
22
- const MUTED = "#a0a0a0";
19
+ const FG = "#FAF9F5";
20
+ const MUTED = "#9A9997";
23
21
  const FONT_FAMILY = "Liberation Sans, Arial, system-ui, sans-serif";
24
22
 
25
23
  const BADGE_CX = 996;
26
24
  const BADGE_CY = 170;
27
25
 
28
26
  const LOGO_MARK = `
29
- <path d="M24.5537 65.7695H0L15.0859 39.4619L37.708 0L60.4912 39.4619H39.6396L24.5537 65.7695Z" fill="white"/>
30
- <path d="M89.446 0H114L76.2921 65.7704H51.7383L89.446 0Z" fill="url(#brand)"/>
27
+ <path d="M26.8789 71.999H0L16.5146 43.1992L41.2793 0L66.2197 43.1992H43.3945L26.8789 71.999Z" fill="white"/>
28
+ <path d="M97.914 0H124.794L83.5143 72H56.6348L97.914 0Z" fill="white"/>
31
29
  `;
32
30
 
33
31
  const AVATAR_DATA_URL_RE =
@@ -182,28 +180,20 @@ export function renderFormOgImageSvg(input: FormOgImageInput = {}): string {
182
180
  );
183
181
  const avatarContent = profileImageDataUrl
184
182
  ? `<image x="${BADGE_CX - 86}" y="${BADGE_CY - 86}" width="172" height="172" href="${escapeSvg(profileImageDataUrl)}" preserveAspectRatio="xMidYMid slice" mask="url(#avatarMask)"/>`
185
- : `<circle cx="${BADGE_CX}" cy="${BADGE_CY}" r="72" fill="url(#brand)" fill-opacity="0.2"/>
183
+ : `<circle cx="${BADGE_CX}" cy="${BADGE_CY}" r="72" fill="${FG}" fill-opacity="0.12"/>
186
184
  <text x="${BADGE_CX}" y="${BADGE_CY + 20}" text-anchor="middle" font-family="${FONT_FAMILY}" font-size="56" font-weight="800" fill="${FG}">${escapeSvg(initials)}</text>`;
187
185
 
188
186
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${WIDTH}" height="${HEIGHT}" viewBox="0 0 ${WIDTH} ${HEIGHT}">
189
187
  <title>${escapeSvg(title)} - Agent-Native Forms preview</title>
190
188
  <defs>
191
- <linearGradient id="brand" x1="101.702" y1="67.4791" x2="113.672" y2="-37.4275" gradientUnits="userSpaceOnUse">
192
- <stop stop-color="${BRAND_BLUE}"/>
193
- <stop offset="1" stop-color="${BRAND_MINT}"/>
194
- </linearGradient>
195
- <pattern id="grid" width="48" height="48" patternUnits="userSpaceOnUse">
196
- <path d="M 48 0 L 0 0 0 48" fill="none" stroke="#ffffff" stroke-opacity="0.07" stroke-width="1"/>
197
- </pattern>
198
189
  <mask id="avatarMask">
199
190
  <rect width="${WIDTH}" height="${HEIGHT}" fill="black"/>
200
191
  <circle cx="${BADGE_CX}" cy="${BADGE_CY}" r="78" fill="white"/>
201
192
  </mask>
202
193
  </defs>
203
194
  <rect width="${WIDTH}" height="${HEIGHT}" fill="${BG}"/>
204
- <rect width="${WIDTH}" height="${HEIGHT}" fill="url(#grid)"/>
205
195
  <g transform="translate(80 86)">
206
- <g transform="scale(0.62)">
196
+ <g transform="translate(0 14) scale(0.62)">
207
197
  ${LOGO_MARK}
208
198
  </g>
209
199
  <text x="90" y="31" font-family="${FONT_FAMILY}" font-size="28" font-weight="800" fill="${FG}">Agent-Native</text>
@@ -62,11 +62,11 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
62
62
  error: string;
63
63
  states?: undefined;
64
64
  } | {
65
- error?: undefined;
66
65
  states: {
67
66
  clientId: number;
68
67
  state: string;
69
68
  }[];
69
+ error?: undefined;
70
70
  }>>;
71
71
  /**
72
72
  * GET /_agent-native/collab/:docId/users
@@ -77,9 +77,9 @@ export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("
77
77
  error: string;
78
78
  users?: undefined;
79
79
  } | {
80
- error?: undefined;
81
80
  users: {
82
81
  clientId: number;
83
82
  lastSeen: number;
84
83
  }[];
84
+ error?: undefined;
85
85
  }>>;
@@ -3,18 +3,18 @@ declare const _default: import("../../action.js").ActionDefinition<{
3
3
  url?: string;
4
4
  filename?: string;
5
5
  }, {
6
+ id?: undefined;
6
7
  error: string;
7
8
  configured?: undefined;
8
9
  connectPath?: undefined;
9
10
  url?: undefined;
10
- id?: undefined;
11
11
  provider?: undefined;
12
12
  } | {
13
+ id?: undefined;
13
14
  error: string;
14
15
  configured: boolean;
15
16
  connectPath: string;
16
17
  url?: undefined;
17
- id?: undefined;
18
18
  provider?: undefined;
19
19
  } | {
20
20
  error?: undefined;
@@ -11,14 +11,14 @@
11
11
  * DELETE /_agent-native/notifications/:id — delete
12
12
  */
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
- error?: undefined;
15
14
  count: number;
16
15
  updated?: undefined;
16
+ error?: undefined;
17
17
  ok?: undefined;
18
18
  } | {
19
- error?: undefined;
20
19
  count?: undefined;
21
20
  updated: number;
21
+ error?: undefined;
22
22
  ok?: undefined;
23
23
  } | {
24
24
  count?: undefined;
@@ -26,8 +26,8 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
26
26
  error: string;
27
27
  ok?: undefined;
28
28
  } | {
29
- error?: undefined;
30
29
  count?: undefined;
31
30
  updated?: undefined;
31
+ error?: undefined;
32
32
  ok: boolean;
33
33
  }>>;
@@ -42,26 +42,26 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
42
42
  avgEvalScore: number;
43
43
  } | {
44
44
  error?: undefined;
45
- ok?: undefined;
46
45
  summary: import("./types.js").TraceSummary;
47
46
  spans: import("./types.js").TraceSpan[];
48
47
  id?: undefined;
48
+ ok?: undefined;
49
49
  } | {
50
50
  error?: undefined;
51
- ok?: undefined;
52
51
  summary?: undefined;
53
52
  spans?: undefined;
54
53
  id: string;
55
- } | {
56
54
  ok?: undefined;
55
+ } | {
57
56
  summary?: undefined;
58
57
  spans?: undefined;
59
- error: any;
60
58
  id?: undefined;
59
+ error: any;
60
+ ok?: undefined;
61
61
  } | {
62
62
  error?: undefined;
63
63
  summary?: undefined;
64
64
  spans?: undefined;
65
- ok: boolean;
66
65
  id?: undefined;
66
+ ok: boolean;
67
67
  }>>;
@@ -15,6 +15,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
48
48
  }>;
49
49
  /** DELETE /_agent-native/resources/:id — delete a resource */
50
50
  export declare function handleDeleteResource(event: any): Promise<{
51
- ok?: undefined;
52
51
  error: string;
52
+ ok?: undefined;
53
53
  } | {
54
54
  error?: undefined;
55
55
  ok: boolean;
@@ -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
  }>>;
@@ -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 BRAND_BLUE = "#00B5FF";
14
- const BRAND_MINT = "#48FFE4";
15
- const BG = "#000000";
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="M24.5537 65.7695H0L15.0859 39.4619L37.708 0L60.4912 39.4619H39.6396L24.5537 65.7695Z" fill="white"/>
27
- <path d="M89.446 0H114L76.2921 65.7704H51.7383L89.446 0Z" fill="url(#brand)"/>
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: BRAND_BLUE,
426
+ fill: ACCENT_FG,
441
427
  anchor: textAnchor,
442
428
  fontFamily: fontFamilyForText(accentText),
443
429
  })
@@ -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%2F9c533fed169648069bffaed652ec0897";
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%2F9c533fed169648069bffaed652ec0897";
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.4",
3
+ "version": "0.176.5-nightly-20260902202853",
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": {
@@ -437,8 +437,8 @@
437
437
  "y-protocols": "^1.0.7",
438
438
  "yjs": "^13.6.32",
439
439
  "zod": "^4.3.6",
440
- "@agent-native/toolkit": "^0.19.2",
441
- "@agent-native/recap-cli": "0.5.24"
440
+ "@agent-native/recap-cli": "0.5.24",
441
+ "@agent-native/toolkit": "^0.19.2"
442
442
  },
443
443
  "devDependencies": {
444
444
  "@ai-sdk/anthropic": "^3.0.71",