@agent-native/core 0.114.6 → 0.114.8
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 +15 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/mcp-config-writers.ts +6 -4
- package/corpus/core/src/cli/mcp.ts +124 -0
- package/corpus/core/src/cli/skills-content/help.ts +4 -3
- package/corpus/core/src/cli/skills-content/index.ts +1 -0
- package/corpus/core/src/cli/skills-content/rewind-skill.ts +52 -0
- package/corpus/core/src/cli/skills.ts +115 -13
- package/corpus/core/src/mcp/screen-memory-stdio.ts +1360 -104
- package/corpus/core/src/mcp-client/index.ts +9 -0
- package/corpus/core/src/mcp-client/screen-memory-local.ts +847 -13
- package/corpus/core/src/server/agent-chat-plugin.ts +16 -9
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +19 -7
- package/corpus/templates/analytics/app/hooks/use-chart-tooltip-portal.ts +60 -0
- package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-07-20-dashboard-requests-no-longer-stall-without-progress.md +6 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +6 -0
- package/corpus/templates/clips/actions/apply-rewind-extension.ts +195 -0
- package/corpus/templates/clips/actions/delete-agent-recording-if-unpromoted.ts +64 -0
- package/corpus/templates/clips/actions/get-rewind-extension-request.ts +22 -0
- package/corpus/templates/clips/actions/get-screen-memory-status.ts +18 -2
- package/corpus/templates/clips/actions/list-rewind-extension-requests.ts +52 -0
- package/corpus/templates/clips/actions/make-recording-private-for-rewind.ts +55 -0
- package/corpus/templates/clips/actions/query-screen-memory-context.ts +4 -4
- package/corpus/templates/clips/actions/request-rewind-extension.ts +81 -0
- package/corpus/templates/clips/actions/update-rewind-extension-request.ts +47 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +25 -0
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +36 -0
- package/corpus/templates/clips/app/components/editor/rewind-extension-dialog.tsx +338 -0
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +1 -16
- package/corpus/templates/clips/app/components/editor/timeline.tsx +26 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +18 -0
- package/corpus/templates/clips/app/lib/ffmpeg-export.ts +19 -12
- package/corpus/templates/clips/app/lib/rewind-visibility.ts +31 -0
- package/corpus/templates/clips/app/lib/timestamp-mapping.ts +7 -0
- package/corpus/templates/clips/app/lib/upload-file-client.ts +17 -0
- package/corpus/templates/clips/changelog/2026-07-14-rewind-keeps-recent-screen-context-local-and-turns-it-into-clips.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-active-clips-keep-rewind-stable-and-settings-clear.md +12 -0
- package/corpus/templates/clips/changelog/2026-07-17-clicking-the-clips-icon-during-a-recording-now-opens-the-app.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-default-mic-now-uses-the-mac-default-and-transcription-shares-one-capture.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-full-screen-clips-finalize-even-when-screencapturekit-stop-hangs.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-normal-full-screen-clips-no-longer-stop-immediately-after-th.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-can-hand-one-bounded-private-clip-to-your-agent.md +12 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-home-can-copy-a-local-agent-prompt.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-now-has-a-calm-home-status-focused-first-run-consent-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-rewind-settings-are-smaller-clearer-and-agent-first.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-the-full-clips-interface-stays-available-while-recording.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-18-rewind-organizes-recent-work-into-local-searchable-chapters.md +8 -0
- package/corpus/templates/clips/changelog/2026-07-18-searchable-rewind-chapters.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-19-rewind-backed-recordings-now-start-immediately-after-the-cou.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-rewind-can-set-up-your-local-agent-once-so-future-requests-w.md +6 -0
- package/corpus/templates/clips/desktop/package.json +1 -0
- package/corpus/templates/clips/desktop/scripts/sign-macos-local.ts +12 -1
- package/corpus/templates/clips/desktop/src/app.tsx +2498 -239
- package/corpus/templates/clips/desktop/src/components/ReadinessPanel.tsx +21 -1
- package/corpus/templates/clips/desktop/src/components/Switch.tsx +3 -0
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +156 -24
- package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +6 -7
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +1763 -1160
- package/corpus/templates/clips/desktop/src/lib/rewind-agent-prompt.ts +9 -0
- package/corpus/templates/clips/desktop/src/lib/rewind-recording-start.ts +20 -0
- package/corpus/templates/clips/desktop/src/main.tsx +3 -0
- package/corpus/templates/clips/desktop/src/overlays/countdown.tsx +14 -14
- package/corpus/templates/clips/desktop/src/overlays/onboarding.tsx +4 -4
- package/corpus/templates/clips/desktop/src/overlays/preparing.tsx +13 -0
- package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +27 -2
- package/corpus/templates/clips/desktop/src/shared/config.ts +16 -0
- package/corpus/templates/clips/desktop/src/styles.css +956 -134
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +5 -0
- package/corpus/templates/clips/desktop/src-tauri/build.rs +69 -1
- package/corpus/templates/clips/desktop/src-tauri/src/accessibility.rs +386 -12
- package/corpus/templates/clips/desktop/src-tauri/src/capture_audio_bus.rs +382 -0
- package/corpus/templates/clips/desktop/src-tauri/src/capture_graph.rs +777 -0
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +249 -22
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +148 -1
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +58 -4
- package/corpus/templates/clips/desktop/src-tauri/src/logfile.rs +13 -1
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +1505 -51
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +124 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1006 -95
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_capture_suspension.rs +165 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_chapters.rs +2434 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_clip.rs +1650 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_egress.rs +643 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_local_ask.rs +803 -0
- package/corpus/templates/clips/desktop/src-tauri/src/rewind_meeting_history.rs +595 -0
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +2900 -91
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_ocr.rs +360 -0
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory_transcript.rs +408 -0
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +114 -33
- package/corpus/templates/clips/desktop/src-tauri/src/state.rs +2 -2
- package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +13 -3
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +4 -1
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +7 -13
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +198 -11
- package/corpus/templates/clips/desktop/src-tauri/tauri.alpha.conf.json +17 -0
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/dist/cli/mcp-config-writers.d.ts +2 -2
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +6 -6
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/mcp.d.ts +14 -0
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +79 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills-content/help.d.ts +1 -1
- package/dist/cli/skills-content/help.d.ts.map +1 -1
- package/dist/cli/skills-content/help.js +4 -3
- package/dist/cli/skills-content/help.js.map +1 -1
- package/dist/cli/skills-content/index.d.ts +1 -0
- package/dist/cli/skills-content/index.d.ts.map +1 -1
- package/dist/cli/skills-content/index.js +1 -0
- package/dist/cli/skills-content/index.js.map +1 -1
- package/dist/cli/skills-content/rewind-skill.d.ts +2 -0
- package/dist/cli/skills-content/rewind-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/rewind-skill.js +53 -0
- package/dist/cli/skills-content/rewind-skill.js.map +1 -0
- package/dist/cli/skills.d.ts +6 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +90 -14
- package/dist/cli/skills.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +365 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/mcp/screen-memory-stdio.js +1014 -91
- package/dist/mcp/screen-memory-stdio.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/screen-memory-local.d.ts +90 -0
- package/dist/mcp-client/screen-memory-local.d.ts.map +1 -1
- package/dist/mcp-client/screen-memory-local.js +590 -12
- package/dist/mcp-client/screen-memory-local.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/provider-api.d.ts +4 -4
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-chat-plugin.d.ts +5 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +10 -9
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/mcp-config-writers.ts +6 -4
- package/src/cli/mcp.ts +124 -0
- package/src/cli/skills-content/help.ts +4 -3
- package/src/cli/skills-content/index.ts +1 -0
- package/src/cli/skills-content/rewind-skill.ts +52 -0
- package/src/cli/skills.ts +115 -13
- package/src/mcp/screen-memory-stdio.ts +1360 -104
- package/src/mcp-client/index.ts +9 -0
- package/src/mcp-client/screen-memory-local.ts +847 -13
- package/src/server/agent-chat-plugin.ts +16 -9
|
@@ -32,6 +32,9 @@ pub(super) struct LiveUploadCtrl {
|
|
|
32
32
|
pub(super) cancelled: AtomicBool,
|
|
33
33
|
/// Recorded media duration in ms; set just before `finalize`.
|
|
34
34
|
pub(super) duration_ms: AtomicU64,
|
|
35
|
+
/// Bytes acknowledged by the server. Stop snapshots this before final-tail
|
|
36
|
+
/// drainage so telemetry measures genuine progressive upload.
|
|
37
|
+
pub(super) uploaded_bytes: AtomicU64,
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
pub(super) struct LiveUpload {
|
|
@@ -57,6 +60,80 @@ struct LiveUploadParams {
|
|
|
57
60
|
has_camera: bool,
|
|
58
61
|
}
|
|
59
62
|
|
|
63
|
+
/// Explicit opt-in credentials for a secondary Clip sink. `server_url: None`
|
|
64
|
+
/// means local-only; a partial remote configuration is rejected rather than
|
|
65
|
+
/// broadening authentication or quietly changing the retention path.
|
|
66
|
+
#[derive(Clone)]
|
|
67
|
+
pub(crate) struct ClipLiveUploadConfig {
|
|
68
|
+
pub(crate) server_url: Option<String>,
|
|
69
|
+
pub(crate) recording_id: Option<String>,
|
|
70
|
+
pub(crate) auth_token: Option<String>,
|
|
71
|
+
pub(crate) cookie: Option<String>,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
impl ClipLiveUploadConfig {
|
|
75
|
+
pub(crate) fn validated(self) -> Result<Option<(String, String, String, String)>, String> {
|
|
76
|
+
let Some(server_url) = self.server_url.filter(|value| !value.trim().is_empty()) else {
|
|
77
|
+
return Ok(None);
|
|
78
|
+
};
|
|
79
|
+
let recording_id = self
|
|
80
|
+
.recording_id
|
|
81
|
+
.filter(|value| !value.trim().is_empty())
|
|
82
|
+
.ok_or_else(|| "Clip live upload requires a recording ID".to_string())?;
|
|
83
|
+
let auth_token = self.auth_token.unwrap_or_default();
|
|
84
|
+
let cookie = self.cookie.unwrap_or_default();
|
|
85
|
+
if auth_token.trim().is_empty() && cookie.trim().is_empty() {
|
|
86
|
+
return Err("Clip live upload requires auth token or cookie".into());
|
|
87
|
+
}
|
|
88
|
+
Ok(Some((server_url, recording_id, auth_token, cookie)))
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
pub(super) fn start_clip_live_uploader(
|
|
93
|
+
app: &AppHandle,
|
|
94
|
+
path: PathBuf,
|
|
95
|
+
mime_type: String,
|
|
96
|
+
width: Option<u32>,
|
|
97
|
+
height: Option<u32>,
|
|
98
|
+
has_audio: bool,
|
|
99
|
+
has_camera: bool,
|
|
100
|
+
upload: ClipLiveUploadConfig,
|
|
101
|
+
) -> Result<Option<LiveUpload>, String> {
|
|
102
|
+
let Some((server_url, recording_id, auth_token, cookie)) = upload.validated()? else {
|
|
103
|
+
return Ok(None);
|
|
104
|
+
};
|
|
105
|
+
Ok(Some(spawn_live_uploader(
|
|
106
|
+
app.clone(),
|
|
107
|
+
LiveUploadParams {
|
|
108
|
+
path,
|
|
109
|
+
server_url,
|
|
110
|
+
recording_id,
|
|
111
|
+
auth_token,
|
|
112
|
+
cookie,
|
|
113
|
+
mime_type,
|
|
114
|
+
width,
|
|
115
|
+
height,
|
|
116
|
+
has_audio,
|
|
117
|
+
has_camera,
|
|
118
|
+
},
|
|
119
|
+
)))
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
pub(super) async fn finalize_clip_live_upload(
|
|
123
|
+
live: LiveUpload,
|
|
124
|
+
duration_ms: u64,
|
|
125
|
+
) -> Result<LiveUploadResult, String> {
|
|
126
|
+
live.ctrl.duration_ms.store(duration_ms, Ordering::SeqCst);
|
|
127
|
+
live.ctrl.finalize.store(true, Ordering::SeqCst);
|
|
128
|
+
live.result_rx
|
|
129
|
+
.await
|
|
130
|
+
.map_err(|_| "Clip live uploader ended before returning a result".to_string())?
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
pub(super) fn cancel_clip_live_upload(live: &LiveUpload) {
|
|
134
|
+
live.ctrl.cancelled.store(true, Ordering::SeqCst);
|
|
135
|
+
}
|
|
136
|
+
|
|
60
137
|
/// Spawn the background uploader and return a handle the stop path uses to
|
|
61
138
|
/// finalize (or cancel) it.
|
|
62
139
|
fn spawn_live_uploader(app: AppHandle, params: LiveUploadParams) -> LiveUpload {
|
|
@@ -64,6 +141,7 @@ fn spawn_live_uploader(app: AppHandle, params: LiveUploadParams) -> LiveUpload {
|
|
|
64
141
|
finalize: AtomicBool::new(false),
|
|
65
142
|
cancelled: AtomicBool::new(false),
|
|
66
143
|
duration_ms: AtomicU64::new(0),
|
|
144
|
+
uploaded_bytes: AtomicU64::new(0),
|
|
67
145
|
});
|
|
68
146
|
let (tx, rx) = tokio::sync::oneshot::channel();
|
|
69
147
|
let ctrl_task = ctrl.clone();
|
|
@@ -272,6 +350,10 @@ async fn live_upload_loop(
|
|
|
272
350
|
return Err(e);
|
|
273
351
|
}
|
|
274
352
|
offset += chunk;
|
|
353
|
+
ctrl.uploaded_bytes.store(offset, Ordering::SeqCst);
|
|
354
|
+
crate::logfile::diagnostic(&format!(
|
|
355
|
+
"[live-upload] {rec}: acknowledged {offset} bytes before finalize={finalize}"
|
|
356
|
+
));
|
|
275
357
|
index += 1;
|
|
276
358
|
emit_native_upload_progress(&app, "uploading", "Uploading clip", None, None);
|
|
277
359
|
}
|
|
@@ -330,6 +412,7 @@ async fn live_upload_loop(
|
|
|
330
412
|
verification_pending = pending;
|
|
331
413
|
}
|
|
332
414
|
offset += take;
|
|
415
|
+
ctrl.uploaded_bytes.store(offset, Ordering::SeqCst);
|
|
333
416
|
index += 1;
|
|
334
417
|
final_sent = final_sent || is_last;
|
|
335
418
|
}
|
|
@@ -364,6 +447,9 @@ async fn live_upload_loop(
|
|
|
364
447
|
}
|
|
365
448
|
emit_native_upload_progress(&app, "opening", "Uploading clip", None, Some(1.0));
|
|
366
449
|
eprintln!("[live-upload] {rec}: done — {index} post(s), {final_len} bytes total");
|
|
450
|
+
crate::logfile::diagnostic(&format!(
|
|
451
|
+
"[live-upload] {rec}: complete with {final_len} acknowledged bytes"
|
|
452
|
+
));
|
|
367
453
|
return Ok(LiveUploadResult {
|
|
368
454
|
bytes: final_len,
|
|
369
455
|
verification_pending,
|
|
@@ -379,3 +465,41 @@ async fn live_upload_loop(
|
|
|
379
465
|
tokio::time::sleep(Duration::from_millis(LIVE_UPLOAD_POLL_MS)).await;
|
|
380
466
|
}
|
|
381
467
|
}
|
|
468
|
+
|
|
469
|
+
#[cfg(test)]
|
|
470
|
+
mod clip_upload_config_tests {
|
|
471
|
+
use super::*;
|
|
472
|
+
|
|
473
|
+
#[test]
|
|
474
|
+
fn local_only_clip_upload_is_explicitly_allowed() {
|
|
475
|
+
assert!(ClipLiveUploadConfig {
|
|
476
|
+
server_url: None,
|
|
477
|
+
recording_id: None,
|
|
478
|
+
auth_token: None,
|
|
479
|
+
cookie: None,
|
|
480
|
+
}
|
|
481
|
+
.validated()
|
|
482
|
+
.unwrap()
|
|
483
|
+
.is_none());
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
#[test]
|
|
487
|
+
fn remote_clip_upload_rejects_partial_authority() {
|
|
488
|
+
assert!(ClipLiveUploadConfig {
|
|
489
|
+
server_url: Some("https://clips.example".into()),
|
|
490
|
+
recording_id: None,
|
|
491
|
+
auth_token: Some("token".into()),
|
|
492
|
+
cookie: None,
|
|
493
|
+
}
|
|
494
|
+
.validated()
|
|
495
|
+
.is_err());
|
|
496
|
+
assert!(ClipLiveUploadConfig {
|
|
497
|
+
server_url: Some("https://clips.example".into()),
|
|
498
|
+
recording_id: Some("recording".into()),
|
|
499
|
+
auth_token: None,
|
|
500
|
+
cookie: None,
|
|
501
|
+
}
|
|
502
|
+
.validated()
|
|
503
|
+
.is_err());
|
|
504
|
+
}
|
|
505
|
+
}
|