@agent-native/core 0.77.16 → 0.77.18
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 +21 -5
- 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 +19 -5
- 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/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +6 -6
- 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
|
@@ -2975,6 +2975,20 @@ export function createProductionAgentHandler(options) {
|
|
|
2975
2975
|
if (bgRunId)
|
|
2976
2976
|
void recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, `${s}=${Date.now() - setupT0}ms`).catch(() => { });
|
|
2977
2977
|
};
|
|
2978
|
+
// DIAGNOSTIC-ONLY: AWAITED milestone write. Fire-and-forget `workerStep`
|
|
2979
|
+
// writes never land once the worker freezes (a blocked event loop can't
|
|
2980
|
+
// flush async I/O), so for the key post-model_done milestones we AWAIT the
|
|
2981
|
+
// write — it lands while the loop is still running, so the LAST milestone
|
|
2982
|
+
// visible in /runs/active is exactly the one right before the freeze (a sync
|
|
2983
|
+
// block, or a hung await).
|
|
2984
|
+
const workerStepAwait = async (s) => {
|
|
2985
|
+
if (!bgRunId)
|
|
2986
|
+
return;
|
|
2987
|
+
try {
|
|
2988
|
+
await recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, `${s}=${Date.now() - setupT0}ms`);
|
|
2989
|
+
}
|
|
2990
|
+
catch { }
|
|
2991
|
+
};
|
|
2978
2992
|
// DIAGNOSTIC-ONLY: non-DB breadcrumb to the function log drain. `workerStep`
|
|
2979
2993
|
// writes to the DB, which is exactly what stalls after `model_done` in the bg
|
|
2980
2994
|
// worker (no diag write lands), so this logs to stdout (Netlify function
|
|
@@ -3247,7 +3261,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3247
3261
|
// DIAGNOSTIC-ONLY: engine/model/api-key resolution finished. A worker that
|
|
3248
3262
|
// reached db_request_ctx but not env_config hung in attachment upload or
|
|
3249
3263
|
// engine/model resolution.
|
|
3250
|
-
|
|
3264
|
+
await workerStepAwait("env_config");
|
|
3251
3265
|
bgLog("env_config");
|
|
3252
3266
|
bgLog("presend:creating");
|
|
3253
3267
|
// Run all independent pre-send steps in parallel. Each of these hits
|
|
@@ -3497,7 +3511,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3497
3511
|
setupMark("ctxAll");
|
|
3498
3512
|
// DIAGNOSTIC-ONLY: all parallel context gathering (system prompt, screen,
|
|
3499
3513
|
// files, loop settings, enriched message) resolved.
|
|
3500
|
-
|
|
3514
|
+
await workerStepAwait("context_all");
|
|
3501
3515
|
bgLog("context_all");
|
|
3502
3516
|
if (systemPromptError) {
|
|
3503
3517
|
setResponseHeader(event, "Content-Type", "text/event-stream");
|
|
@@ -3519,7 +3533,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3519
3533
|
const requestTools = filterInitialEngineTools(availableRequestTools, options.initialToolNames);
|
|
3520
3534
|
setupMark("actions");
|
|
3521
3535
|
// DIAGNOSTIC-ONLY: action/tool resolution + engine-tool filtering finished.
|
|
3522
|
-
|
|
3536
|
+
await workerStepAwait("action_tool_setup");
|
|
3523
3537
|
bgLog("action_tool_setup");
|
|
3524
3538
|
const requestSystemPrompt = requestMode === "plan"
|
|
3525
3539
|
? `${systemPrompt}\n\n${PLAN_MODE_SYSTEM_PROMPT}`
|
|
@@ -3619,7 +3633,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3619
3633
|
setupMark("depsThread");
|
|
3620
3634
|
// DIAGNOSTIC-ONLY: owner/thread resolution + runId/effectiveThreadId +
|
|
3621
3635
|
// chained-continuation thread fetch finished.
|
|
3622
|
-
|
|
3636
|
+
await workerStepAwait("owner_thread");
|
|
3623
3637
|
bgLog("owner_thread");
|
|
3624
3638
|
// Persist the user's turn exactly once. The foreground POST does this
|
|
3625
3639
|
// before dispatching; the background worker must NOT repeat it (it re-enters
|
|
@@ -3978,7 +3992,7 @@ export function createProductionAgentHandler(options) {
|
|
|
3978
3992
|
setupMark("preStart");
|
|
3979
3993
|
// DIAGNOSTIC-ONLY: last stage before startRun fires. A worker that reaches
|
|
3980
3994
|
// prestart but never workerStarted is hanging inside startRun itself.
|
|
3981
|
-
|
|
3995
|
+
await workerStepAwait("prestart");
|
|
3982
3996
|
bgLog("prestart");
|
|
3983
3997
|
const setupDetail = Object.entries(setupMarks)
|
|
3984
3998
|
.map(([k, v]) => `${k}=${v}`)
|