@agent-native/core 0.79.6 → 0.79.9
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 +2 -2
- package/corpus/core/CHANGELOG.md +19 -0
- package/corpus/core/docs/content/locales/zh-TW/durable-background-runs.md +74 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +0 -93
- package/corpus/core/src/agent/run-manager.ts +9 -1
- package/corpus/core/src/client/agent-chat-adapter.ts +24 -16
- package/corpus/core/src/client/session-replay.ts +67 -13
- package/corpus/core/src/onboarding/default-steps.ts +3 -3
- package/corpus/core/src/server/agent-chat-plugin.ts +82 -162
- package/corpus/core/src/server/agent-run-context.ts +204 -0
- package/corpus/core/src/server/credential-provider.ts +20 -4
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +14 -4
- package/corpus/templates/analytics/changelog/2026-06-26-session-replay-uploads-now-accept-compressed-payloads-so-lar.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-26-sql-chart-tooltips-now-stay-stable-while-moving-across-dense.md +6 -0
- package/corpus/templates/analytics/server/handlers/session-replay.ts +56 -8
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +44 -16
- package/corpus/templates/clips/app/i18n/ar-SA.ts +12 -9
- package/corpus/templates/clips/app/i18n/de-DE.ts +12 -9
- package/corpus/templates/clips/app/i18n/en-US.ts +19 -16
- package/corpus/templates/clips/app/i18n/es-ES.ts +12 -9
- package/corpus/templates/clips/app/i18n/fr-FR.ts +12 -9
- package/corpus/templates/clips/app/i18n/hi-IN.ts +13 -9
- package/corpus/templates/clips/app/i18n/ja-JP.ts +12 -9
- package/corpus/templates/clips/app/i18n/ko-KR.ts +12 -9
- package/corpus/templates/clips/app/i18n/pt-BR.ts +12 -9
- package/corpus/templates/clips/app/i18n/zh-CN.ts +19 -14
- package/corpus/templates/clips/app/i18n/zh-TW.ts +19 -14
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -0
- package/corpus/templates/clips/app/routes/record.tsx +2 -2
- package/corpus/templates/clips/changelog/2026-06-26-desktop-recordings-recover-more-reliably-when-macos-reports-.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-slack-unfurls-now-recognize-recording-dashboard-links-pasted.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-storage-setup-now-explains-why-clips-needs-connected-storage.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
- package/corpus/templates/clips/chrome-extension/src/background.ts +24 -3
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +28 -2
- package/corpus/templates/clips/chrome-extension/src/popup.html +16 -0
- package/corpus/templates/clips/chrome-extension/src/popup.ts +59 -7
- package/corpus/templates/clips/chrome-extension/src/sentry.ts +28 -1
- package/corpus/templates/clips/chrome-extension/src/styles.css +74 -0
- package/corpus/templates/clips/desktop/src/app.tsx +85 -18
- package/corpus/templates/clips/desktop/src/styles.css +55 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +88 -51
- package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +12 -3
- package/corpus/templates/clips/server/lib/slack-unfurls.ts +5 -2
- package/corpus/templates/slides/actions/_app-url.ts +1 -1
- package/corpus/templates/slides/changelog/2026-06-26-deck-links-now-use-the-workspace-gateway-when-available-so-g.md +6 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +0 -79
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +12 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +15 -8
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +55 -14
- package/dist/client/session-replay.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +7 -7
- package/dist/onboarding/default-steps.js +3 -3
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +69 -154
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/dist/server/agent-run-context.d.ts +35 -0
- package/dist/server/agent-run-context.d.ts.map +1 -0
- package/dist/server/agent-run-context.js +137 -0
- package/dist/server/agent-run-context.js.map +1 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +15 -4
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/docs/content/locales/zh-TW/durable-background-runs.md +74 -0
- package/package.json +1 -1
- package/corpus/templates/.retired/README.md +0 -9
- package/corpus/templates/.retired/calls/package.json +0 -8
- package/corpus/templates/.retired/code/package.json +0 -8
- package/corpus/templates/.retired/contracts/package.json +0 -8
- package/corpus/templates/.retired/images/package.json +0 -8
- package/corpus/templates/.retired/issues/package.json +0 -8
- package/corpus/templates/.retired/meeting-notes/package.json +0 -8
- package/corpus/templates/.retired/migration/package.json +0 -8
- package/corpus/templates/.retired/recruiting/package.json +0 -8
- package/corpus/templates/.retired/scheduling/package.json +0 -8
- package/corpus/templates/.retired/visual-plans/package.json +0 -8
- package/corpus/templates/.retired/voice/package.json +0 -8
- package/corpus/templates/.retired/workbench/package.json +0 -8
|
@@ -179,7 +179,7 @@ enum NativeFullscreenBackend {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/// `SCRecordingOutput` finalizes the MP4 *asynchronously*: after
|
|
182
|
-
/// `
|
|
182
|
+
/// `remove_recording_output()` / `stop_capture()` it still has to flush its
|
|
183
183
|
/// last buffered sample fragment and write the `moov` atom, then it calls
|
|
184
184
|
/// `recording_did_finish` (or `recording_did_fail`). If we move the file
|
|
185
185
|
/// before that callback we lose the trailing fragment — a consistent
|
|
@@ -770,7 +770,8 @@ pub async fn native_fullscreen_recording_stop_and_upload(
|
|
|
770
770
|
has_audio,
|
|
771
771
|
has_camera,
|
|
772
772
|
)?;
|
|
773
|
-
|
|
773
|
+
let stop_error = stop_outcome.err();
|
|
774
|
+
if let Some(stop_err) = &stop_error {
|
|
774
775
|
saved.last_error = Some(stop_err.clone());
|
|
775
776
|
// Only mark corrupt when the SCK delegate explicitly called recording_did_fail
|
|
776
777
|
// (error contains "finalize failed"). Transient stop_capture /
|
|
@@ -779,11 +780,37 @@ pub async fn native_fullscreen_recording_stop_and_upload(
|
|
|
779
780
|
// "finalization callback failed" is unique to the delegate path;
|
|
780
781
|
// "recording finalize failed" also appears on remove_recording_output errors.
|
|
781
782
|
let is_definitive = stop_err.contains("finalization callback failed");
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
783
|
+
match mp4_has_moov(&saved.file_path) {
|
|
784
|
+
Some(false) => {
|
|
785
|
+
if is_definitive {
|
|
786
|
+
saved.corrupt = true;
|
|
787
|
+
eprintln!(
|
|
788
|
+
"[clips-tray] recording marked corrupt: definitive finalize error + missing moov atom"
|
|
789
|
+
);
|
|
790
|
+
} else {
|
|
791
|
+
eprintln!(
|
|
792
|
+
"[clips-tray] native stop reported an error and MP4 is missing moov; saving for retry"
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
write_saved_recording_metadata(&app, &saved)?;
|
|
796
|
+
emit_native_upload_progress(&app, "failed", "Upload paused", None, None);
|
|
797
|
+
let suffix = if saved.corrupt {
|
|
798
|
+
"The local file is incomplete and cannot be recovered. Discard it from the Clips menu and record again."
|
|
799
|
+
} else {
|
|
800
|
+
"The clip was saved locally and can be retried from the Clips menu."
|
|
801
|
+
};
|
|
802
|
+
return Err(format!("{stop_err}. {suffix}"));
|
|
803
|
+
}
|
|
804
|
+
Some(true) => {
|
|
805
|
+
eprintln!(
|
|
806
|
+
"[clips-tray] native stop reported an error but MP4 metadata is present; continuing upload: {stop_err}"
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
None => {
|
|
810
|
+
eprintln!(
|
|
811
|
+
"[clips-tray] native stop reported an error and MP4 metadata could not be verified; continuing upload: {stop_err}"
|
|
812
|
+
);
|
|
813
|
+
}
|
|
787
814
|
}
|
|
788
815
|
} else if mp4_has_moov(&saved.file_path) == Some(false) {
|
|
789
816
|
// stop_outcome was Ok but the finalize callback timed out — SCK may still be
|
|
@@ -791,26 +818,19 @@ pub async fn native_fullscreen_recording_stop_and_upload(
|
|
|
791
818
|
// in the UI, then bail out before upload_recording_file re-checks moov and
|
|
792
819
|
// permanently marks it corrupt.
|
|
793
820
|
saved.last_error = Some(
|
|
794
|
-
"Recorded MP4 is missing playback metadata. Please retry the recording."
|
|
795
|
-
.to_string(),
|
|
821
|
+
"Recorded MP4 is missing playback metadata. Please retry the recording.".to_string(),
|
|
796
822
|
);
|
|
797
823
|
eprintln!("[clips-tray] recording missing moov after Ok stop outcome (likely finalize timeout) — saving as retryable, skipping upload");
|
|
798
824
|
write_saved_recording_metadata(&app, &saved)?;
|
|
799
825
|
emit_native_upload_progress(&app, "failed", "Upload paused", None, None);
|
|
800
826
|
return Err(
|
|
801
|
-
"Recorded MP4 is missing playback metadata. Please retry the recording."
|
|
802
|
-
.to_string(),
|
|
827
|
+
"Recorded MP4 is missing playback metadata. Please retry the recording.".to_string(),
|
|
803
828
|
);
|
|
804
829
|
} else if let Err(merge_err) = &consolidate_outcome {
|
|
805
830
|
saved.last_error = Some(merge_err.clone());
|
|
806
831
|
}
|
|
807
832
|
write_saved_recording_metadata(&app, &saved)?;
|
|
808
833
|
emit_native_upload_progress(&app, "preparing", "Optimizing clip", None, None);
|
|
809
|
-
if let Err(stop_err) = stop_outcome {
|
|
810
|
-
return Err(format!(
|
|
811
|
-
"{stop_err}. The clip was saved locally and can be retried from the Clips menu."
|
|
812
|
-
));
|
|
813
|
-
}
|
|
814
834
|
if multi_segment {
|
|
815
835
|
if let Err(merge_err) = consolidate_outcome {
|
|
816
836
|
return Err(format!(
|
|
@@ -2338,14 +2358,10 @@ fn stop_native_recording(
|
|
|
2338
2358
|
finish,
|
|
2339
2359
|
..
|
|
2340
2360
|
} => {
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
//
|
|
2345
|
-
// StreamError("Failed due to an invalid parameter") when the audio
|
|
2346
|
-
// tap or stream state hasn't fully drained yet. We retry once after
|
|
2347
|
-
// a 200ms drain delay; the sleep is in the error branch only so
|
|
2348
|
-
// healthy clips pay no extra stop latency.
|
|
2361
|
+
// Removing the recording output is the clean "stop recording" path.
|
|
2362
|
+
// It lets SCRecordingOutput finish while the stream is still alive;
|
|
2363
|
+
// stopping the stream first can make ReplayKit report -5814 while
|
|
2364
|
+
// writing the MP4's final metadata.
|
|
2349
2365
|
let remove_result = stream
|
|
2350
2366
|
.remove_recording_output(recording)
|
|
2351
2367
|
.map_err(|e| format!("ScreenCaptureKit recording finalize failed: {e:?}"));
|
|
@@ -2361,28 +2377,42 @@ fn stop_native_recording(
|
|
|
2361
2377
|
})
|
|
2362
2378
|
}
|
|
2363
2379
|
};
|
|
2364
|
-
//
|
|
2380
|
+
// remove_recording_output()/stop_capture() only *trigger* the
|
|
2365
2381
|
// async finalize; the MP4 isn't complete until the delegate's
|
|
2366
|
-
// recording_did_finish fires.
|
|
2367
|
-
// the
|
|
2368
|
-
//
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
let
|
|
2372
|
-
|
|
2373
|
-
let finalize_outcome = if waited_for_finalize {
|
|
2382
|
+
// recording_did_finish fires. Prefer waiting after removal while
|
|
2383
|
+
// the stream is alive, then stop the stream after the output has
|
|
2384
|
+
// had a chance to flush.
|
|
2385
|
+
let remove_ok = remove_result.is_ok();
|
|
2386
|
+
let mut waited_for_finalize = false;
|
|
2387
|
+
let mut finalize_outcome = if wait_for_finalize && remove_ok {
|
|
2388
|
+
waited_for_finalize = true;
|
|
2374
2389
|
let outcome = finish.wait(SCK_FINALIZE_TIMEOUT);
|
|
2375
2390
|
if outcome.is_none() {
|
|
2376
2391
|
eprintln!(
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2392
|
+
"[clips-tray] SCRecordingOutput finalize callback did not fire within {}s after remove_recording_output; saving file as-is",
|
|
2393
|
+
SCK_FINALIZE_TIMEOUT.as_secs()
|
|
2394
|
+
);
|
|
2380
2395
|
}
|
|
2381
2396
|
outcome
|
|
2382
2397
|
} else {
|
|
2383
2398
|
None
|
|
2384
2399
|
};
|
|
2385
2400
|
|
|
2401
|
+
let stop_result = stream
|
|
2402
|
+
.stop_capture()
|
|
2403
|
+
.map_err(|e| format!("ScreenCaptureKit stop failed: {e:?}"));
|
|
2404
|
+
|
|
2405
|
+
if wait_for_finalize && !waited_for_finalize && stop_result.is_ok() {
|
|
2406
|
+
waited_for_finalize = true;
|
|
2407
|
+
finalize_outcome = finish.wait(SCK_FINALIZE_TIMEOUT);
|
|
2408
|
+
if finalize_outcome.is_none() {
|
|
2409
|
+
eprintln!(
|
|
2410
|
+
"[clips-tray] SCRecordingOutput finalize callback did not fire within {}s after stop_capture; saving file as-is",
|
|
2411
|
+
SCK_FINALIZE_TIMEOUT.as_secs()
|
|
2412
|
+
);
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2386
2416
|
// Check the delegate outcome BEFORE returning on stop_result. When
|
|
2387
2417
|
// stop_capture() fails AND recording_did_fail fires, callers must see
|
|
2388
2418
|
// the "finalization callback failed" prefix to correctly identify
|
|
@@ -2391,12 +2421,11 @@ fn stop_native_recording(
|
|
|
2391
2421
|
eprintln!("[clips-tray] SCK finalize failed: {err}");
|
|
2392
2422
|
// Use a unique prefix so callers can distinguish the SCK delegate
|
|
2393
2423
|
// reporting failure (recording_did_fail) from teardown API errors.
|
|
2394
|
-
return Err(format!(
|
|
2424
|
+
return Err(format!(
|
|
2425
|
+
"ScreenCaptureKit finalization callback failed: {err}"
|
|
2426
|
+
));
|
|
2395
2427
|
}
|
|
2396
2428
|
|
|
2397
|
-
if let Err(err) = stop_result {
|
|
2398
|
-
return Err(err);
|
|
2399
|
-
}
|
|
2400
2429
|
if waited_for_finalize && finalize_outcome.is_none() {
|
|
2401
2430
|
eprintln!(
|
|
2402
2431
|
"[clips-tray] SCK finalize timed out after {}s — moov atom may be missing",
|
|
@@ -2404,21 +2433,32 @@ fn stop_native_recording(
|
|
|
2404
2433
|
);
|
|
2405
2434
|
}
|
|
2406
2435
|
|
|
2436
|
+
let remove_recoverable = matches!(finalize_outcome.as_ref(), Some(Ok(())))
|
|
2437
|
+
|| (waited_for_finalize && finalize_outcome.is_none());
|
|
2407
2438
|
match remove_result {
|
|
2408
|
-
Ok(()) =>
|
|
2439
|
+
Ok(()) => {}
|
|
2409
2440
|
Err(remove_err) => {
|
|
2410
|
-
if
|
|
2411
|
-
|| (waited_for_finalize && finalize_outcome.is_none())
|
|
2412
|
-
{
|
|
2441
|
+
if remove_recoverable {
|
|
2413
2442
|
eprintln!(
|
|
2414
2443
|
"[clips-tray] ScreenCaptureKit recording output removal reported an error after finalize completed or timed out; continuing upload: {remove_err}"
|
|
2415
2444
|
);
|
|
2416
|
-
Ok(())
|
|
2417
2445
|
} else {
|
|
2418
|
-
Err(remove_err)
|
|
2446
|
+
return Err(remove_err);
|
|
2419
2447
|
}
|
|
2420
2448
|
}
|
|
2421
2449
|
}
|
|
2450
|
+
|
|
2451
|
+
if let Err(stop_err) = stop_result {
|
|
2452
|
+
if remove_ok || matches!(finalize_outcome.as_ref(), Some(Ok(()))) {
|
|
2453
|
+
eprintln!(
|
|
2454
|
+
"[clips-tray] ScreenCaptureKit stop_capture reported an error after recording output teardown; continuing upload: {stop_err}"
|
|
2455
|
+
);
|
|
2456
|
+
} else {
|
|
2457
|
+
return Err(stop_err);
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
Ok(())
|
|
2422
2462
|
}
|
|
2423
2463
|
}
|
|
2424
2464
|
}
|
|
@@ -2827,8 +2867,7 @@ fn is_moov_corrupt_error(err: &str) -> bool {
|
|
|
2827
2867
|
// Matches both the native prepare_recording_file error and the server-side
|
|
2828
2868
|
// finalize-recording.ts error so the corrupt flag is set regardless of
|
|
2829
2869
|
// which layer first detected the missing moov atom.
|
|
2830
|
-
err.contains("video is missing required metadata")
|
|
2831
|
-
|| err.contains("corrupted or incomplete")
|
|
2870
|
+
err.contains("video is missing required metadata") || err.contains("corrupted or incomplete")
|
|
2832
2871
|
}
|
|
2833
2872
|
|
|
2834
2873
|
/// Walk the top-level ISO BMFF boxes of a file and return `Some(true)` when a
|
|
@@ -2925,9 +2964,7 @@ fn prepare_recording_file(
|
|
|
2925
2964
|
// full chunked upload that the server will reject anyway.
|
|
2926
2965
|
if mime_type == "video/mp4" || mime_type == "video/quicktime" {
|
|
2927
2966
|
if mp4_has_moov(path) == Some(false) {
|
|
2928
|
-
eprintln!(
|
|
2929
|
-
"[clips-tray] native recording corrupt moov check failed — skipping upload"
|
|
2930
|
-
);
|
|
2967
|
+
eprintln!("[clips-tray] native recording corrupt moov check failed — skipping upload");
|
|
2931
2968
|
return Err(
|
|
2932
2969
|
"Recorded file is corrupted or incomplete — the video is missing required \
|
|
2933
2970
|
metadata. Please record again."
|
|
@@ -748,7 +748,10 @@ pub(crate) mod macos {
|
|
|
748
748
|
if !is_cancelled && !transient {
|
|
749
749
|
let _ = app.emit(
|
|
750
750
|
"voice:speech-error",
|
|
751
|
-
ErrorPayload {
|
|
751
|
+
ErrorPayload {
|
|
752
|
+
error: msg,
|
|
753
|
+
source: "mic",
|
|
754
|
+
},
|
|
752
755
|
);
|
|
753
756
|
}
|
|
754
757
|
clear_session_slot();
|
|
@@ -766,11 +769,17 @@ pub(crate) mod macos {
|
|
|
766
769
|
return;
|
|
767
770
|
}
|
|
768
771
|
if let Err(e) = native_speech_start_impl(
|
|
769
|
-
app.clone(),
|
|
772
|
+
app.clone(),
|
|
773
|
+
locale,
|
|
774
|
+
mic_device_id,
|
|
775
|
+
mic_device_label,
|
|
770
776
|
) {
|
|
771
777
|
let _ = app.emit(
|
|
772
778
|
"voice:speech-error",
|
|
773
|
-
ErrorPayload {
|
|
779
|
+
ErrorPayload {
|
|
780
|
+
error: e,
|
|
781
|
+
source: "mic",
|
|
782
|
+
},
|
|
774
783
|
);
|
|
775
784
|
}
|
|
776
785
|
});
|
|
@@ -172,13 +172,16 @@ export function extractShareLink(urlValue: string): {
|
|
|
172
172
|
|
|
173
173
|
const parts = url.pathname.split("/").filter(Boolean);
|
|
174
174
|
const shareIndex = parts.indexOf("share");
|
|
175
|
-
const
|
|
175
|
+
const recordingIndex = parts.indexOf("r");
|
|
176
|
+
const resourceIndex = shareIndex >= 0 ? shareIndex : recordingIndex;
|
|
177
|
+
const id = resourceIndex >= 0 ? parts[resourceIndex + 1] : undefined;
|
|
176
178
|
if (!id) return null;
|
|
177
179
|
|
|
178
180
|
return {
|
|
179
181
|
id: decodeURIComponent(id),
|
|
180
182
|
origin: url.origin,
|
|
181
|
-
basePath:
|
|
183
|
+
basePath:
|
|
184
|
+
resourceIndex > 0 ? `/${parts.slice(0, resourceIndex).join("/")}` : "",
|
|
182
185
|
};
|
|
183
186
|
}
|
|
184
187
|
|
|
@@ -11,8 +11,8 @@ function normalizeUrl(raw: string): string {
|
|
|
11
11
|
|
|
12
12
|
function configuredBaseUrl(): string | undefined {
|
|
13
13
|
const candidates = [
|
|
14
|
-
process.env.APP_URL,
|
|
15
14
|
process.env.WORKSPACE_GATEWAY_URL,
|
|
15
|
+
process.env.APP_URL,
|
|
16
16
|
process.env.URL,
|
|
17
17
|
process.env.DEPLOY_URL,
|
|
18
18
|
process.env.BETTER_AUTH_URL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production-agent.d.ts","sourceRoot":"","sources":["../../src/agent/production-agent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC;AAkCzD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AA0BvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAMhE,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,EACN,QAAQ,EAET,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA6BlD,OAAO,KAAK,EACV,UAAU,EAEV,mBAAmB,EAEnB,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,OAAQ,CAAC;AACxD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GACjC;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,GACpB;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IACE,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,iBAAiB,GAAG,sBAAsB,GAAG,QAAQ,CAAC;CAC/D,CAAC;AAmBN;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gCAAgC,CAAC,IAAI,EAAE;IAC3D,UAAU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985,23 +2985,6 @@ export function createProductionAgentHandler(options) {
|
|
|
2985
2985
|
if (bgRunId)
|
|
2986
2986
|
void recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, `${s}=${Date.now() - setupT0}ms`).catch(() => { });
|
|
2987
2987
|
};
|
|
2988
|
-
// DIAGNOSTIC-ONLY: AWAITED worker mark. Fire-and-forget workerStep marks
|
|
2989
|
-
// after `post_model_ok` stopped landing even though writes still work
|
|
2990
|
-
// there — so the worker's MAIN FLOW stalls between post_model and pre_claim
|
|
2991
|
-
// (not a write hang). Awaited marks block until they land (or withDbTimeout-
|
|
2992
|
-
// reject), so `worker_stage` reliably advances to the last phase the main
|
|
2993
|
-
// flow actually reached — pinpointing the stall. Bg worker only.
|
|
2994
|
-
const awaitedWorkerMark = async (s) => {
|
|
2995
|
-
if (!isBackgroundWorker || !bgRunId)
|
|
2996
|
-
return;
|
|
2997
|
-
try {
|
|
2998
|
-
await recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, `${s}=${Date.now() - setupT0}ms`);
|
|
2999
|
-
}
|
|
3000
|
-
catch {
|
|
3001
|
-
// bounded by withDbTimeout; ignore — the absence of the next mark is
|
|
3002
|
-
// itself the signal.
|
|
3003
|
-
}
|
|
3004
|
-
};
|
|
3005
2988
|
// Whether this worker is REALLY executing inside a 15-min Netlify
|
|
3006
2989
|
// `-background` function (proven by the runtime function name), not merely a
|
|
3007
2990
|
// `_process-run` re-entry that may have landed on the ~60s synchronous
|
|
@@ -3197,42 +3180,12 @@ export function createProductionAgentHandler(options) {
|
|
|
3197
3180
|
? requestEffort
|
|
3198
3181
|
: options.reasoningEffort);
|
|
3199
3182
|
options.onEngineResolved?.(engine, model);
|
|
3200
|
-
// DIAGNOSTIC-ONLY: localize where the worker stalls AFTER model_done. These
|
|
3201
|
-
// land in `worker_stage` (foreground-independent), so even though the
|
|
3202
|
-
// foreground overwrites `diag_stage` on inline recovery, the worker's last
|
|
3203
|
-
// reached point survives. If the last worker_stage is `model_done`, writes
|
|
3204
|
-
// hang right after model resolution (DB connection); if it's
|
|
3205
|
-
// `engine_resolved`/`systemprompt_enter`, the stall is in the named step.
|
|
3206
|
-
workerStep("engine_resolved");
|
|
3207
|
-
// DIAGNOSTIC-ONLY: AWAITED probe (bg worker only). worker_stage stalls at
|
|
3208
|
-
// `model_done` even though the code right after is trivial sync — this
|
|
3209
|
-
// distinguishes the two causes: if `post_model_awaited` lands, DB writes
|
|
3210
|
-
// still work after model_done and the stall is later in the main flow; if it
|
|
3211
|
-
// never lands (stays `model_done`), the bg-fn DB connection itself is hung
|
|
3212
|
-
// right after model resolution. `recordRunDiagnostic` is `withDbTimeout`-
|
|
3213
|
-
// bounded, so a hung write rejects (caught) rather than blocking forever.
|
|
3214
|
-
if (isBackgroundWorker && bgRunId) {
|
|
3215
|
-
const probeStart = Date.now();
|
|
3216
|
-
try {
|
|
3217
|
-
await recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, "post_model_awaited");
|
|
3218
|
-
workerStep(`post_model_ok=${Date.now() - probeStart}ms`);
|
|
3219
|
-
}
|
|
3220
|
-
catch (e) {
|
|
3221
|
-
workerStep(`post_model_threw=${Date.now() - probeStart}ms:${String(e?.message ?? e).slice(0, 80)}`);
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
3183
|
// One-line per-turn resolution log so it's obvious in dev which engine
|
|
3225
3184
|
// is actually handling the request. `requestEngine` is what the client
|
|
3226
3185
|
// sent from the model picker; `engine.name` is what resolveEngine picked.
|
|
3227
3186
|
// Divergence between them is the usual cause of "status says builder but
|
|
3228
3187
|
// no [builder-engine] log lines appear" confusion.
|
|
3229
3188
|
console.log(`[agent-chat] resolved engine=${engine.name} model=${model} requestEngine=${requestEngine ?? "(none)"}`);
|
|
3230
|
-
// DIAGNOSTIC-ONLY: the worker reaches post_model_ok but never aw_env — the
|
|
3231
|
-
// only exit between them is this anthropic key check. Capture the exact
|
|
3232
|
-
// resolution state so we know WHY effectiveApiKey is falsy in the worker
|
|
3233
|
-
// (owner not resolved from the HMAC/thread? owner has no stored key? deploy
|
|
3234
|
-
// fallback blocked?) vs the foreground which resolves it fine.
|
|
3235
|
-
await awaitedWorkerMark(`apikey_state:engine=${engine.name},owner=${ownerEmail ? "Y" : "N"},userKey=${userApiKey ? "Y" : "N"},effKey=${effectiveApiKey ? "Y" : "N"},block=${shouldBlockDeployCredentialFallback()}`);
|
|
3236
3189
|
// Check for API key before starting a run (only for anthropic engine)
|
|
3237
3190
|
if (engine.name === "anthropic" && !effectiveApiKey) {
|
|
3238
3191
|
setResponseHeader(event, "Content-Type", "text/event-stream");
|
|
@@ -3255,7 +3208,6 @@ export function createProductionAgentHandler(options) {
|
|
|
3255
3208
|
// reached db_request_ctx but not env_config hung in attachment upload or
|
|
3256
3209
|
// engine/model resolution.
|
|
3257
3210
|
workerStep("env_config");
|
|
3258
|
-
await awaitedWorkerMark("aw_env");
|
|
3259
3211
|
// Run all independent pre-send steps in parallel. Each of these hits
|
|
3260
3212
|
// the DB or invokes an action; running them sequentially was the
|
|
3261
3213
|
// single biggest contributor to pre-LLM latency.
|
|
@@ -3267,16 +3219,10 @@ export function createProductionAgentHandler(options) {
|
|
|
3267
3219
|
let systemPromptError = null;
|
|
3268
3220
|
const systemPromptThunk = () => (async () => {
|
|
3269
3221
|
const sysPromptStart = Date.now();
|
|
3270
|
-
// Brackets the system-prompt build (which runs the template's
|
|
3271
|
-
// extraContext / data-dictionary). If worker_stage stalls at
|
|
3272
|
-
// `systemprompt_enter` with no `systemprompt_done`, the build itself is
|
|
3273
|
-
// the stall point.
|
|
3274
|
-
workerStep("systemprompt_enter");
|
|
3275
3222
|
try {
|
|
3276
3223
|
const built = typeof options.systemPrompt === "function"
|
|
3277
3224
|
? await options.systemPrompt(event)
|
|
3278
3225
|
: options.systemPrompt;
|
|
3279
|
-
workerStep("systemprompt_done");
|
|
3280
3226
|
return built;
|
|
3281
3227
|
}
|
|
3282
3228
|
catch (error) {
|
|
@@ -3512,7 +3458,6 @@ export function createProductionAgentHandler(options) {
|
|
|
3512
3458
|
// DIAGNOSTIC-ONLY: all parallel context gathering (system prompt, screen,
|
|
3513
3459
|
// files, loop settings, enriched message) resolved.
|
|
3514
3460
|
workerStep("context_all");
|
|
3515
|
-
await awaitedWorkerMark("aw_presend");
|
|
3516
3461
|
if (systemPromptError) {
|
|
3517
3462
|
setResponseHeader(event, "Content-Type", "text/event-stream");
|
|
3518
3463
|
setResponseHeader(event, "Cache-Control", "no-cache");
|
|
@@ -3534,7 +3479,6 @@ export function createProductionAgentHandler(options) {
|
|
|
3534
3479
|
setupMark("actions");
|
|
3535
3480
|
// DIAGNOSTIC-ONLY: action/tool resolution + engine-tool filtering finished.
|
|
3536
3481
|
workerStep("action_tool_setup");
|
|
3537
|
-
await awaitedWorkerMark("aw_actions");
|
|
3538
3482
|
const requestSystemPrompt = requestMode === "plan"
|
|
3539
3483
|
? `${systemPrompt}\n\n${PLAN_MODE_SYSTEM_PROMPT}`
|
|
3540
3484
|
: systemPrompt;
|
|
@@ -3634,7 +3578,6 @@ export function createProductionAgentHandler(options) {
|
|
|
3634
3578
|
// DIAGNOSTIC-ONLY: owner/thread resolution + runId/effectiveThreadId +
|
|
3635
3579
|
// chained-continuation thread fetch finished.
|
|
3636
3580
|
workerStep("owner_thread");
|
|
3637
|
-
await awaitedWorkerMark("aw_owner");
|
|
3638
3581
|
// Persist the user's turn exactly once. The foreground POST does this
|
|
3639
3582
|
// before dispatching; the background worker must NOT repeat it (it re-enters
|
|
3640
3583
|
// with the same body, which would double-persist the user message).
|
|
@@ -3991,28 +3934,6 @@ export function createProductionAgentHandler(options) {
|
|
|
3991
3934
|
// DIAGNOSTIC-ONLY: last stage before startRun fires. A worker that reaches
|
|
3992
3935
|
// prestart but never workerStarted is hanging inside startRun itself.
|
|
3993
3936
|
workerStep("prestart");
|
|
3994
|
-
// DIAGNOSTIC-ONLY: AWAITED probe right before startRun (bg worker only). If
|
|
3995
|
-
// worker_stage reaches `pre_claim_ok` but the run never flips to
|
|
3996
|
-
// `worker_started`, the stall is inside startRun's claim itself; if it never
|
|
3997
|
-
// reaches `pre_claim_*`, the stall is somewhere in the setup between
|
|
3998
|
-
// post_model and here.
|
|
3999
|
-
if (isBackgroundWorker && bgRunId) {
|
|
4000
|
-
const claimProbeStart = Date.now();
|
|
4001
|
-
try {
|
|
4002
|
-
await recordRunDiagnostic(bgRunId, RUN_DIAG_STAGE.workerSetupStep, "pre_claim");
|
|
4003
|
-
workerStep(`pre_claim_ok=${Date.now() - claimProbeStart}ms`);
|
|
4004
|
-
}
|
|
4005
|
-
catch (e) {
|
|
4006
|
-
workerStep(`pre_claim_threw=${Date.now() - claimProbeStart}ms:${String(e?.message ?? e).slice(0, 80)}`);
|
|
4007
|
-
}
|
|
4008
|
-
}
|
|
4009
|
-
// DIAGNOSTIC-ONLY: peak-ish RSS (MB) + assembled system-prompt size (KB) at
|
|
4010
|
-
// prestart. The analytics bg worker dies right after model_done; if the
|
|
4011
|
-
// FOREGROUND (identical build, writes land) is already near the ~1024MB
|
|
4012
|
-
// Netlify function limit, an OOM kill in the heavier worker explains the
|
|
4013
|
-
// freeze. Both numbers ride along in the existing setup-timings detail.
|
|
4014
|
-
setupMarks.rssMB = Math.round(process.memoryUsage().rss / 1048576);
|
|
4015
|
-
setupMarks.promptKB = Math.round((systemPrompt?.length ?? 0) / 1024);
|
|
4016
3937
|
const setupDetail = Object.entries(setupMarks)
|
|
4017
3938
|
.map(([k, v]) => `${k}=${v}`)
|
|
4018
3939
|
.join(" ") + ` total=${Date.now() - setupT0}`;
|