@agent-native/core 0.79.9 → 0.79.11
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/core/CHANGELOG.md +12 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/deploy/build.ts +22 -12
- package/corpus/core/src/server/action-routes.ts +6 -2
- package/corpus/templates/mail/app/hooks/use-emails.ts +28 -4
- package/corpus/templates/mail/app/root.tsx +13 -7
- package/corpus/templates/mail/changelog/2026-06-26-mail-avoids-unnecessary-message-list-reloads-after-backgroun.md +6 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/deploy/build.d.ts +1 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +19 -12
- package/dist/deploy/build.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +6 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/package.json +1 -1
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.79.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 72c1b3d: Fix Cloudflare Pages worker builds for apps with browser screenshot helpers.
|
|
8
|
+
|
|
9
|
+
## 0.79.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7e19ed6: Return plain string action results with a JSON content type so browser action clients can parse successful responses.
|
|
14
|
+
|
|
3
15
|
## 0.79.9
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.11",
|
|
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": {
|
|
@@ -82,6 +82,25 @@ export const NITRO_RUNTIME_IGNORE_PATTERNS = [
|
|
|
82
82
|
"**/*.test.cjs",
|
|
83
83
|
];
|
|
84
84
|
|
|
85
|
+
export const CLOUDFLARE_WORKER_ESBUILD_EXTERNALS = [
|
|
86
|
+
"mermaid",
|
|
87
|
+
"@excalidraw/excalidraw",
|
|
88
|
+
"@excalidraw/mermaid-to-excalidraw",
|
|
89
|
+
"pdf-parse",
|
|
90
|
+
"pdfjs-dist",
|
|
91
|
+
"@google/genai",
|
|
92
|
+
"chartjs-node-canvas",
|
|
93
|
+
"@napi-rs/canvas",
|
|
94
|
+
"@anthropic-ai/tokenizer",
|
|
95
|
+
"@resvg/resvg-js",
|
|
96
|
+
"playwright",
|
|
97
|
+
"playwright-core",
|
|
98
|
+
"chromium-bidi",
|
|
99
|
+
"chromium-bidi/*",
|
|
100
|
+
"@sparticuz/chromium-min",
|
|
101
|
+
"fsevents",
|
|
102
|
+
];
|
|
103
|
+
|
|
85
104
|
function normalizeConfiguredAppBasePath(): string {
|
|
86
105
|
return normalizeAppBasePath(
|
|
87
106
|
process.env.VITE_APP_BASE_PATH || process.env.APP_BASE_PATH,
|
|
@@ -946,18 +965,9 @@ async function buildCloudflarePages() {
|
|
|
946
965
|
// files. Both import sites degrade gracefully when the runtime import
|
|
947
966
|
// fails: context-xray token counts fall back to char/4 estimates and the
|
|
948
967
|
// OG image route falls back to SVG.
|
|
949
|
-
const heavyClientExternals =
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
"@excalidraw/mermaid-to-excalidraw",
|
|
953
|
-
"pdf-parse",
|
|
954
|
-
"pdfjs-dist",
|
|
955
|
-
"@google/genai",
|
|
956
|
-
"chartjs-node-canvas",
|
|
957
|
-
"@napi-rs/canvas",
|
|
958
|
-
"@anthropic-ai/tokenizer",
|
|
959
|
-
"@resvg/resvg-js",
|
|
960
|
-
].map((p) => `--external:${p}`);
|
|
968
|
+
const heavyClientExternals = CLOUDFLARE_WORKER_ESBUILD_EXTERNALS.map(
|
|
969
|
+
(p) => `--external:${p}`,
|
|
970
|
+
);
|
|
961
971
|
|
|
962
972
|
execFileSync(
|
|
963
973
|
esbuildBin,
|
|
@@ -356,12 +356,16 @@ export function mountActionRoutes(
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
// If the action returned a string, try to parse as JSON for a
|
|
359
|
+
// If the action returned a string, try to parse as JSON for a
|
|
360
|
+
// clean response. Plain strings still need to go over the HTTP
|
|
361
|
+
// action transport as JSON, otherwise H3 sends text/plain and the
|
|
362
|
+
// browser action client rejects the successful 2xx response.
|
|
360
363
|
if (typeof result === "string") {
|
|
361
364
|
try {
|
|
362
365
|
return JSON.parse(result);
|
|
363
366
|
} catch {
|
|
364
|
-
|
|
367
|
+
setResponseHeader(event, "Content-Type", "application/json");
|
|
368
|
+
return JSON.stringify(result);
|
|
365
369
|
}
|
|
366
370
|
}
|
|
367
371
|
|
|
@@ -90,6 +90,17 @@ export function markExternalEmailRefresh() {
|
|
|
90
90
|
externalRefreshAt = Date.now();
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
export function consumeExternalEmailRefresh(): number | undefined {
|
|
94
|
+
const refreshAt = externalRefreshAt;
|
|
95
|
+
if (!refreshAt) return undefined;
|
|
96
|
+
if (Date.now() - refreshAt >= 5000) {
|
|
97
|
+
externalRefreshAt = 0;
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
externalRefreshAt = 0;
|
|
101
|
+
return refreshAt;
|
|
102
|
+
}
|
|
103
|
+
|
|
93
104
|
function parseRecipients(value?: string): EmailMessage["to"] {
|
|
94
105
|
return (value || "")
|
|
95
106
|
.split(",")
|
|
@@ -501,8 +512,11 @@ export function useEmails(
|
|
|
501
512
|
if (search) params.set("q", search);
|
|
502
513
|
if (label) params.set("label", label);
|
|
503
514
|
if (pageParam) params.set("pageToken", pageParam);
|
|
504
|
-
|
|
505
|
-
|
|
515
|
+
const forceRefreshAt = !pageParam
|
|
516
|
+
? consumeExternalEmailRefresh()
|
|
517
|
+
: undefined;
|
|
518
|
+
if (forceRefreshAt) {
|
|
519
|
+
params.set("forceRefresh", String(forceRefreshAt));
|
|
506
520
|
}
|
|
507
521
|
return apiFetch<EmailsPage>(`/api/emails?${params}`, { signal });
|
|
508
522
|
},
|
|
@@ -682,6 +696,7 @@ export function useMarkThreadRead() {
|
|
|
682
696
|
.map((e) => ({ id: e.id, accountEmail: e.accountEmail }));
|
|
683
697
|
pendingByThread.current.set(threadId, unreadEntries);
|
|
684
698
|
const unreadIds = unreadEntries.map((e) => e.id);
|
|
699
|
+
const previousThread = getCachedThread(threadId);
|
|
685
700
|
// Set overrides so refetches don't revert read state
|
|
686
701
|
for (const id of unreadIds) {
|
|
687
702
|
setOptimisticOverride(id, { isRead: true });
|
|
@@ -694,13 +709,22 @@ export function useMarkThreadRead() {
|
|
|
694
709
|
),
|
|
695
710
|
),
|
|
696
711
|
);
|
|
697
|
-
|
|
712
|
+
if (previousThread) {
|
|
713
|
+
setCachedThread(
|
|
714
|
+
threadId,
|
|
715
|
+
previousThread.map((message) => ({ ...message, isRead: true })),
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
return { previous, overrideIds: [...unreadIds], previousThread };
|
|
698
719
|
},
|
|
699
|
-
onError: (_err,
|
|
720
|
+
onError: (_err, threadId, context) => {
|
|
700
721
|
for (const id of context?.overrideIds ?? []) {
|
|
701
722
|
clearOptimisticOverride(id);
|
|
702
723
|
}
|
|
703
724
|
context?.previous.forEach(([key, data]) => qc.setQueryData(key, data));
|
|
725
|
+
if (context?.previousThread) {
|
|
726
|
+
setCachedThread(threadId, context.previousThread);
|
|
727
|
+
}
|
|
704
728
|
},
|
|
705
729
|
onSettled: () => delayedInvalidate(qc, [["emails"], ["labels"]]),
|
|
706
730
|
});
|
|
@@ -74,6 +74,12 @@ function getHydrationStableLocaleInitScript() {
|
|
|
74
74
|
const THEME_INIT_SCRIPT = getHydrationStableThemeInitScript();
|
|
75
75
|
const LOCALE_INIT_SCRIPT = getHydrationStableLocaleInitScript();
|
|
76
76
|
|
|
77
|
+
function skipBroadActionInvalidation() {
|
|
78
|
+
// Mail's Gmail-backed reads are expensive and already refresh through the
|
|
79
|
+
// explicit app-state refresh-signal that mutating mail actions write.
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
const MAIL_ERROR_COPY: Record<
|
|
78
84
|
LocaleCode,
|
|
79
85
|
{ title: string; fallback: string; back: string; reload: string }
|
|
@@ -275,6 +281,7 @@ function DbSyncSetup() {
|
|
|
275
281
|
useDbSync({
|
|
276
282
|
queryClient: qc,
|
|
277
283
|
queryKeys: [],
|
|
284
|
+
actionInvalidatePredicate: skipBroadActionInvalidation,
|
|
278
285
|
// Skip events this tab caused — our mutations already handle cache updates
|
|
279
286
|
ignoreSource: TAB_ID,
|
|
280
287
|
onEvent: (data: {
|
|
@@ -328,8 +335,13 @@ function DbSyncSetup() {
|
|
|
328
335
|
invalidateSettingsSurfaces();
|
|
329
336
|
}
|
|
330
337
|
} else if (data.source === "action") {
|
|
338
|
+
// The core sync hook already refreshes action-backed queries for action
|
|
339
|
+
// events. Email and label reads are refreshed by the explicit
|
|
340
|
+
// refresh-signal app-state event so generic action changes do not
|
|
341
|
+
// cancel and restart Gmail list requests.
|
|
342
|
+
} else if (data.source === "screen-refresh") {
|
|
331
343
|
if (!isOwnEvent) {
|
|
332
|
-
|
|
344
|
+
markExternalEmailRefresh();
|
|
333
345
|
qc.invalidateQueries({ queryKey: ["emails"] });
|
|
334
346
|
qc.invalidateQueries({ queryKey: ["email"] });
|
|
335
347
|
qc.invalidateQueries({ queryKey: ["labels"] });
|
|
@@ -337,12 +349,6 @@ function DbSyncSetup() {
|
|
|
337
349
|
}
|
|
338
350
|
} else if (!isOwnEvent) {
|
|
339
351
|
qc.invalidateQueries({ queryKey: ["action"] });
|
|
340
|
-
qc.invalidateQueries({ queryKey: ["emails"] });
|
|
341
|
-
qc.invalidateQueries({ queryKey: ["email"] });
|
|
342
|
-
qc.invalidateQueries({ queryKey: ["labels"] });
|
|
343
|
-
qc.invalidateQueries({ queryKey: ["settings"] });
|
|
344
|
-
qc.invalidateQueries({ queryKey: ["aliases"] });
|
|
345
|
-
invalidateSettingsSurfaces();
|
|
346
352
|
}
|
|
347
353
|
},
|
|
348
354
|
});
|
|
@@ -49,11 +49,11 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
|
|
|
49
49
|
error: string;
|
|
50
50
|
states?: undefined;
|
|
51
51
|
} | {
|
|
52
|
+
error?: undefined;
|
|
52
53
|
states: {
|
|
53
54
|
clientId: number;
|
|
54
55
|
state: string;
|
|
55
56
|
}[];
|
|
56
|
-
error?: undefined;
|
|
57
57
|
}>>;
|
|
58
58
|
/**
|
|
59
59
|
* GET /_agent-native/collab/:docId/users
|
|
@@ -64,10 +64,10 @@ export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("
|
|
|
64
64
|
error: string;
|
|
65
65
|
users?: undefined;
|
|
66
66
|
} | {
|
|
67
|
+
error?: undefined;
|
|
67
68
|
users: {
|
|
68
69
|
clientId: number;
|
|
69
70
|
lastSeen: number;
|
|
70
71
|
}[];
|
|
71
|
-
error?: undefined;
|
|
72
72
|
}>>;
|
|
73
73
|
//# sourceMappingURL=awareness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awareness.d.ts","sourceRoot":"","sources":["../../src/collab/awareness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,MAAM,WAAW,cAAc;IAC7B,QAAQ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,MAAM,CAAC;CAClB;AAOD,eAAO,MAAM,sBAAsB,EAAG,kBAA2B,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD,wBAAgB,mBAAmB,IAAI,YAAY,CAElD;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,EAClD,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,GACb,IAAI,CAUN;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAO1E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,IAAI,CAOnE;AAUD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;kBAuCa,MAAM;eAAS,MAAM;;GAa1D,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;kBAWM,MAAM;kBAAY,MAAM;;GAMvD,CAAC"}
|
package/dist/deploy/build.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { type DiscoveredRoute, type DiscoveredAction } from "./route-discovery.js";
|
|
16
16
|
import { type WorkspaceCoreExports } from "./workspace-core.js";
|
|
17
17
|
export declare const NITRO_RUNTIME_IGNORE_PATTERNS: string[];
|
|
18
|
+
export declare const CLOUDFLARE_WORKER_ESBUILD_EXTERNALS: string[];
|
|
18
19
|
export declare function generateProvidedPluginsNitroPluginSource(pluginStems: string[]): string;
|
|
19
20
|
type RouteRules = Record<string, {
|
|
20
21
|
headers?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/deploy/build.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;AAmCH,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,6BAA6B,UAiBzC,CAAC;AAuBF,wBAAgB,wCAAwC,CACtD,WAAW,EAAE,MAAM,EAAE,GACpB,MAAM,CAaR;AAgBD,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC;AAgBvE,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,EACjB,WAAW,SAAK,GACf,IAAI,CAQN;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,EAAE,EACzB,WAAW,EAAE,MAAM,EAAE,EACrB,kBAAkB,GAAE,MAAM,EAAO,EACjC,OAAO,GAAE,gBAAgB,EAAO,EAChC,aAAa,GAAE,oBAAoB,GAAG,IAAW,EACjD,mBAAmB,GAAE,MAAM,EAAO,EAClC,gBAAgB,SAAmC,GAClD,MAAM,CAskBR;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/deploy/build.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;AAmCH,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,gBA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|
+
export const CLOUDFLARE_WORKER_ESBUILD_EXTERNALS = [
|
|
50
|
+
"mermaid",
|
|
51
|
+
"@excalidraw/excalidraw",
|
|
52
|
+
"@excalidraw/mermaid-to-excalidraw",
|
|
53
|
+
"pdf-parse",
|
|
54
|
+
"pdfjs-dist",
|
|
55
|
+
"@google/genai",
|
|
56
|
+
"chartjs-node-canvas",
|
|
57
|
+
"@napi-rs/canvas",
|
|
58
|
+
"@anthropic-ai/tokenizer",
|
|
59
|
+
"@resvg/resvg-js",
|
|
60
|
+
"playwright",
|
|
61
|
+
"playwright-core",
|
|
62
|
+
"chromium-bidi",
|
|
63
|
+
"chromium-bidi/*",
|
|
64
|
+
"@sparticuz/chromium-min",
|
|
65
|
+
"fsevents",
|
|
66
|
+
];
|
|
49
67
|
function normalizeConfiguredAppBasePath() {
|
|
50
68
|
return normalizeAppBasePath(process.env.VITE_APP_BASE_PATH || process.env.APP_BASE_PATH);
|
|
51
69
|
}
|
|
@@ -784,18 +802,7 @@ async function buildCloudflarePages() {
|
|
|
784
802
|
// files. Both import sites degrade gracefully when the runtime import
|
|
785
803
|
// fails: context-xray token counts fall back to char/4 estimates and the
|
|
786
804
|
// OG image route falls back to SVG.
|
|
787
|
-
const heavyClientExternals =
|
|
788
|
-
"mermaid",
|
|
789
|
-
"@excalidraw/excalidraw",
|
|
790
|
-
"@excalidraw/mermaid-to-excalidraw",
|
|
791
|
-
"pdf-parse",
|
|
792
|
-
"pdfjs-dist",
|
|
793
|
-
"@google/genai",
|
|
794
|
-
"chartjs-node-canvas",
|
|
795
|
-
"@napi-rs/canvas",
|
|
796
|
-
"@anthropic-ai/tokenizer",
|
|
797
|
-
"@resvg/resvg-js",
|
|
798
|
-
].map((p) => `--external:${p}`);
|
|
805
|
+
const heavyClientExternals = CLOUDFLARE_WORKER_ESBUILD_EXTERNALS.map((p) => `--external:${p}`);
|
|
799
806
|
execFileSync(esbuildBin, [
|
|
800
807
|
tmpEntry,
|
|
801
808
|
"--bundle",
|