Files
Dax ec7b6b283d labs: copy captures as a zip (#1721)
* labs: copy captures as a zip

A finished Annotate capture can go on the clipboard as one light zip
file (Labs > Copy captures as a zip, off by default): the bundle's
manifest, summary, contact sheet, and keyframes, with summary.md's
bundle path written as ".", and without its video, audio, full-size
frames, delivery markers, or an earlier copy.

crates/capture/src/slim_zip.rs writes it with STORED local headers, a
central directory, and an end-of-central-directory record (CRC-32,
UTF-8 flag, DOS timestamp; no dependency). It lands inside the bundle
beside the other files, renamed into place, so retention removes it
with the bundle.

The clipboard holds only the file: a macOS file URL, Windows CF_HDROP,
or Linux text/uri-list (X11 target or wl-copy). A failed zip build or
clipboard write logs and falls back to the normal copy.

Checks: slim_zip unit tests (CRC-32 vector, central-directory read-back,
excludes, summary rewrite, a second copy), linux/paste file_uri, the
labs switch test, and the regenerated Labs goldens. Not verified: a
real paste of the zip into a chat or agent app on any OS.

* labs: leave the light zip out of the agent host copy

The SSH light-files tar copies a bundle wholesale to the agent host, so
a capture's <stem>.scrawl.slim.zip would travel with it. Share the name
pattern as scrawl-router's SLIM_ZIP_SUFFIX/SLIM_ZIP_TEMP_SUFFIX, use it
from slim_zip, and exclude both from light_files_tar. The existing tar
test now puts the zip and its temp file in the fixture and checks they
stay out.

No other path copies a bundle wholesale: phone ingest builds a new
bundle from the movie and timeline, retention shrinks or trashes named
media, and zoom/export write their own files.

* labs: tidy the capture zip copy

Generate the zipped summary with the bundle folder as ".", so only its
header names the copy's location and transcript text is never touched.

Use strict limits before ZIP64 (0xFFFF files, 0xFFFFFFFF bytes), a
Windows path from encode_wide rather than lossy text, and the current
time for an entry whose summary.md is missing. DOS times stay UTC: the
crate has no local-time facility without a new dependency.

Show the lab row only where Annotate itself is available, under the same
Annotate policy lock, with a folder icon and a shorter description that
fits its card. Docs note the terminal paste gets no text and that the
manifest and summary still name media the zip leaves out.

* labs: match the capture zip description

Use the same shortened sentence in the Labs description the card shows.
2026-11-12 09:14:48 -05:00

58 lines
1.5 KiB
Rust

pub use scrawl_router::{
Action, AutoSend, Decision, DeliverRequest, Delivered, DeliveryMode, OfferRule, Router,
RouterConfig, RouterDirs, RuleKind, Sent, Target as RouterTarget, UndoReport, Undone, bundle,
delivery, env, model, opencode, router_config_from_scrawl, routing,
};
pub mod agent_context;
pub mod audio;
pub mod autocrop;
pub mod autocrop_lab;
// Windows looks elements up through UI Automation (`win/uia.rs`); other systems have no lookup.
#[cfg_attr(
not(any(target_os = "macos", target_os = "windows")),
path = "ax_other.rs"
)]
pub mod ax;
pub mod capture;
pub mod command_transcriber;
pub mod export;
pub mod handoff;
#[cfg_attr(target_os = "windows", path = "win/helper.rs")]
#[cfg_attr(target_os = "linux", path = "linux/helper.rs")]
pub mod helper;
#[cfg(feature = "hex-client")]
pub mod hex;
pub mod hosted_input;
pub mod ingest_http;
pub mod keyframes;
#[cfg(target_os = "linux")]
pub mod linux;
pub mod live_transcribe;
pub mod log;
pub mod mic;
pub mod page;
pub mod permissions;
pub mod phone;
pub mod pipeline;
pub mod recover;
pub mod render;
pub mod retention;
pub mod screens;
pub mod sketch;
pub mod slim_zip;
pub mod speech_model;
pub mod transcribe;
pub mod web;
#[cfg(target_os = "windows")]
pub mod win;
pub mod window_log;
pub use window_log as windows;
pub mod zoom;
pub use handoff::{
EngineConfig, enable_scrawl_host_defaults, engine_config_from_scrawl, parse_scrawl_config,
};
pub use log::{Sink, enable_file_log, scrawl_log, set_sink, set_sink_if_unset, start_metric};
pub use mic::Choice as MicChoice;