@agent-native/core 0.77.15 → 0.77.17
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 +19 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +46 -33
- package/corpus/core/src/client/AgentPanel.tsx +4 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +4 -0
- package/corpus/core/src/client/use-db-sync.ts +19 -2
- package/corpus/core/src/server/auth-marketing.ts +15 -0
- package/corpus/core/src/server/onboarding-html.ts +47 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +76 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +1 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +13 -2
- package/corpus/templates/analytics/app/i18n-data.ts +10 -0
- package/corpus/templates/analytics/app/lib/sql-query.ts +97 -21
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +22 -1
- package/corpus/templates/analytics/app/root.tsx +15 -6
- package/corpus/templates/analytics/changelog/2026-06-25-dashboard-charts-no-longer-refresh-in-the-background-during-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-25-first-party-dashboards-use-indexed-event-dates-for-faster-da.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-25-retention-and-active-user-dashboard-panels-now-count-account.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +58 -58
- package/corpus/templates/analytics/server/db/schema.ts +2 -0
- package/corpus/templates/analytics/server/handlers/sql-query.ts +1 -1
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -6
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +88 -56
- package/corpus/templates/analytics/server/plugins/db.ts +73 -0
- package/corpus/templates/clips/AGENTS.md +5 -0
- package/corpus/templates/clips/changelog/2026-06-25-github-issue-and-pull-request-pages-can-now-preview-playable.md +6 -0
- package/corpus/templates/clips/chrome-extension/PERMISSIONS.md +8 -2
- package/corpus/templates/clips/chrome-extension/public/manifest.json +14 -2
- package/corpus/templates/clips/chrome-extension/src/github-preview-content.ts +233 -0
- package/corpus/templates/clips/chrome-extension/src/github-preview.html +12 -0
- package/corpus/templates/clips/chrome-extension/src/github-preview.ts +414 -0
- package/corpus/templates/clips/chrome-extension/vite.config.ts +5 -0
- package/corpus/templates/mail/actions/archive-email.ts +13 -3
- package/corpus/templates/mail/app/hooks/use-emails.ts +5 -2
- package/corpus/templates/mail/changelog/2026-06-25-archive-failures-now-explain-when-gmail-needs-reconnecting-p.md +6 -0
- package/corpus/templates/mail/shared/archive-errors.ts +137 -0
- package/corpus/templates/plan/changelog/2026-06-25-hosted-signup-now-shows-how-to-switch-visual-plan-to-local-files.md +6 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +17 -12
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +3 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +9 -0
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +8 -1
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/dist/server/auth-marketing.d.ts +4 -0
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +9 -0
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +46 -1
- package/dist/server/onboarding-html.js.map +1 -1
- package/package.json +1 -1
|
@@ -2988,10 +2988,15 @@ export function createProductionAgentHandler(options) {
|
|
|
2988
2988
|
}
|
|
2989
2989
|
catch { }
|
|
2990
2990
|
};
|
|
2991
|
-
// DIAGNOSTIC
|
|
2992
|
-
//
|
|
2993
|
-
//
|
|
2994
|
-
//
|
|
2991
|
+
// DIAGNOSTIC: pre-send branches that hit their timeout/error fallback,
|
|
2992
|
+
// recorded in memory so the FINAL run diag (setupDetail) can name them even
|
|
2993
|
+
// when the Netlify function-log drain is unreadable. Readable via
|
|
2994
|
+
// /runs/active once the worker claims past the stuck branch.
|
|
2995
|
+
const bgTimedOut = [];
|
|
2996
|
+
// DIAGNOSTIC + DEFENSIVE: race a pre-send read against a short timeout and
|
|
2997
|
+
// fall back to a safe default, logging start/done/error/timeout. A single
|
|
2998
|
+
// stuck read can no longer block the worker from reaching claim, and the
|
|
2999
|
+
// recorded `bgTimedOut` set names the culprit in the run diag.
|
|
2995
3000
|
const withBgFallback = (label, ms, fallback, fn) => {
|
|
2996
3001
|
bgLog(`${label}:start`);
|
|
2997
3002
|
return new Promise((resolve) => {
|
|
@@ -3001,6 +3006,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3001
3006
|
return;
|
|
3002
3007
|
done = true;
|
|
3003
3008
|
bgLog(`${label}:TIMEOUT@${ms}ms`);
|
|
3009
|
+
bgTimedOut.push(`${label}:timeout`);
|
|
3004
3010
|
resolve(fallback);
|
|
3005
3011
|
}, ms);
|
|
3006
3012
|
fn().then((v) => {
|
|
@@ -3016,6 +3022,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3016
3022
|
done = true;
|
|
3017
3023
|
clearTimeout(timer);
|
|
3018
3024
|
bgLog(`${label}:error ${e?.message ?? e}`);
|
|
3025
|
+
bgTimedOut.push(`${label}:error`);
|
|
3019
3026
|
resolve(fallback);
|
|
3020
3027
|
});
|
|
3021
3028
|
});
|
|
@@ -3250,11 +3257,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3250
3257
|
// that starts but never finishes; the OPTIONAL context reads additionally
|
|
3251
3258
|
// race a short timeout + "" fallback (withBgFallback) so one stuck read
|
|
3252
3259
|
// cannot block the worker from reaching claim.
|
|
3253
|
-
|
|
3254
|
-
const enrichedMessagePromise = Promise.resolve(enrichMessage(requestMessage, references)).then((v) => {
|
|
3255
|
-
bgLog("enrich:done");
|
|
3256
|
-
return v;
|
|
3257
|
-
});
|
|
3260
|
+
const enrichedMessagePromise = withBgFallback("enrich", 5000, requestMessage, () => Promise.resolve(enrichMessage(requestMessage, references)));
|
|
3258
3261
|
bgLog("loop:start");
|
|
3259
3262
|
const loopSettingsPromise = readAgentLoopSettings({
|
|
3260
3263
|
userEmail: ownerEmail ?? getRequestUserEmail() ?? null,
|
|
@@ -3266,7 +3269,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3266
3269
|
return v;
|
|
3267
3270
|
});
|
|
3268
3271
|
let systemPromptError = null;
|
|
3269
|
-
const systemPromptPromise = (async () => {
|
|
3272
|
+
const systemPromptPromise = withBgFallback("sysprompt", 5000, "", async () => {
|
|
3270
3273
|
const sysPromptStart = Date.now();
|
|
3271
3274
|
bgLog("sysprompt:start");
|
|
3272
3275
|
try {
|
|
@@ -3285,7 +3288,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3285
3288
|
finally {
|
|
3286
3289
|
setupMarks.sysPromptMs = Date.now() - sysPromptStart;
|
|
3287
3290
|
}
|
|
3288
|
-
})
|
|
3291
|
+
});
|
|
3289
3292
|
const screenContextPromise = withBgFallback("screen", 6000, "", async () => {
|
|
3290
3293
|
const screenStart = Date.now();
|
|
3291
3294
|
try {
|
|
@@ -3979,7 +3982,9 @@ export function createProductionAgentHandler(options) {
|
|
|
3979
3982
|
bgLog("prestart");
|
|
3980
3983
|
const setupDetail = Object.entries(setupMarks)
|
|
3981
3984
|
.map(([k, v]) => `${k}=${v}`)
|
|
3982
|
-
.join(" ") +
|
|
3985
|
+
.join(" ") +
|
|
3986
|
+
` total=${Date.now() - setupT0}` +
|
|
3987
|
+
` to=${bgTimedOut.join(",") || "none"}`;
|
|
3983
3988
|
bgLog("startRun:invoked");
|
|
3984
3989
|
startRun(runId, effectiveThreadId, async (rawSend, signal) => {
|
|
3985
3990
|
const send = (event) => {
|