A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
chore(deps): mark, document and test the tailscale-rs patches
RoversXa786cd101862
diff --git a/deps/tailscale-rs/PATCHES.txt b/deps/tailscale-rs/PATCHES.txtnew file mode 100644index 00000000..be7bec5c--- /dev/null+++ b/deps/tailscale-rs/PATCHES.txt@@ -0,0 +1,121 @@+Patches to the vendored tailscale-rs crates+===========================================++What is here+------------+The folders here -- tailscale, ts_runtime, ts_control and ts_netstack_smoltcp_core -- are+copies of the tailscale-rs crates of the same names, version 0.6.1 from crates.io, with+ThinkTerm's changes on top. The root Cargo.toml points crates.io's versions at them+([patch.crates-io]) and keeps them out of the workspace (exclude). Every other tailscale-rs+crate (ts_keys, ts_tunnel, ...) still comes from crates.io, held at the same version by+Cargo.lock.++Only thinkterm-tailnet/src/node.rs calls the library; the rest of ThinkTerm goes through+thinkterm-tailnet.++Finding our changes+-------------------+Every change is marked with a comment starting "ThinkTerm (<group>)", one of the groups+below:++ grep -rn "ThinkTerm (" deps/tailscale-rs --exclude=PATCHES.txt++The whole difference from upstream, at any time, against a fresh copy of 0.6.1:++ for c in tailscale ts_runtime ts_control ts_netstack_smoltcp_core; do+ curl -sL "https://static.crates.io/crates/$c/$c-0.6.1.crate" | tar xz -C /tmp+ diff -ru "/tmp/$c-0.6.1" "deps/tailscale-rs/$c"+ done++Upstream files this copy does not carry (README.md, examples, tests, Cargo.lock,+Cargo.toml.orig, .cargo_vcs_info.json) show up as "Only in", and so do the LICENSE and+PATENTS that ts_runtime, ts_control and ts_netstack_smoltcp_core got from the tailscale+crate, as they ship without them. All of that is expected.++The changes+-----------+peer list (tailscale, ts_runtime)+ Device::peers lists every peer in the tailnet; 0.6.1 only looks one up by name or+ address. The peer tracker also answers at once when a netmap shows the tailnet has no+ other peers, instead of leaving the question waiting.+ Used by: the Tailscale group on the Remote Hosts page.+ Drop when: upstream can list all peers without waiting.++device info (ts_control; struct literals in ts_runtime's peer_db tests)+ Node keeps, as DeviceInfo, the system, distribution and device model a peer reports in+ its Hostinfo; 0.6.1 drops them.+ Used by: the machine icons and subtitles on the Remote Hosts page.+ Drop when: upstream keeps this on Node.++sign-in state (tailscale, ts_runtime)+ Device::current_auth_state, current_self_node and registration_error answer at once with+ where signing in stands; 0.6.1's questions wait until it is done. When control turns the+ device away, the control runner stays in a Failed state that says why, instead of+ stopping with the reason only in the log.+ Used by: the Tailscale panel's status, login link and error message.+ Drop when: upstream offers status queries that do not wait, and reports a refused+ registration.++shutdown (tailscale)+ Device::stop stops a device that is still shared: gracefully within a timeout, else+ violently.+ Used by: thinkterm-tailnet when it ends or replaces its node.+ Drop when: upstream's shutdown works on a shared device.++no panic (ts_runtime)+ kameo 0.21 panics in Context::forward and try_forward when the target's mailbox is full+ or closed. The registry and Env::forward ask from a task instead, so those cases come+ back as errors. Env::ask backs off from 10 ms to 1 s when it retries an actor that has+ stopped, instead of spinning.+ Drop when: upstream moves to a kameo without the panic, or stops forwarding this way.++lost peers (ts_netstack_smoltcp_core)+ TCP sockets get a 10-minute timeout and a 2-minute keep-alive, so a peer that disappears+ without a word (a laptop put to sleep) ends the connection instead of leaving it+ retrying forever.+ Drop when: upstream sets a timeout and a keep-alive on its sockets.++build (all four)+ #![doc = include_str!("../README.md")] became a one-line //! doc: the READMEs are not+ vendored (the root .gitignore drops *.md). In Cargo.toml, tailscale loses its+ [[example]], [[test]] and [profile.bench] sections, ts_netstack_smoltcp_core its+ [dev-dependencies], and ts_runtime gains tokio's "time" feature. Upstream's proptest+ module in ts_runtime/src/peer_tracker/peer_db.rs is switched off, as proptest is not a+ dependency here.++Tests+-----+The additions above are called from thinkterm-tailnet, so losing one in a merge fails the+build. The changes in behaviour have tests:++ cargo test -p ts_runtime -p ts_control -p ts_netstack_smoltcp_core --lib++ lost peers socket_impl::tcp::tests (connect and listen)+ device info node::tests+ sign-in state control_runner::tests (the reason given)+ no panic env::tests++Not covered by a test: the peer tracker's answer for an empty tailnet, and the Failed state+taking the place of the stop. Signing in to a real tailnet after an upgrade checks the+first; signing in with a wrong auth key checks the second.++Upgrading+---------+1. Read upstream's CHANGELOG.md for the new version: its security fixes, and anything that+ touches the groups above. A group upstream now covers can be dropped instead of merged.+2. For each of the four crates, merge three ways, file by file: the base is upstream's old+ version, ours is deps/tailscale-rs/<crate>, theirs is upstream's new version. With both+ versions unpacked in /tmp as above:++ git merge-file deps/tailscale-rs/<crate>/src/<file> /tmp/<crate>-<old>/src/<file> \+ /tmp/<crate>-<new>/src/<file>++ Changes that do not overlap merge by themselves; overlapping ones are left between+ conflict markers. Copy files upstream added; move by hand our changes in a file upstream+ removed or renamed. For Cargo.toml, take upstream's new one and redo the build changes.+3. Bump the version: the four entries under [patch.crates-io] in the root Cargo.toml and+ the two in thinkterm-tailnet/Cargo.toml, then `cargo update` the other tailscale-rs+ crates to the same version. All tailscale-rs crates move together.+4. Build, run the tests above and thinkterm-tailnet's, then sign in to a real tailnet and+ connect to a machine by name and by address.+5. Update this file: the version above, and every group that changed or went away.diff --git a/deps/tailscale-rs/tailscale/Cargo.toml b/deps/tailscale-rs/tailscale/Cargo.tomlindex 34245c14..c5f4dbc0 100644--- a/deps/tailscale-rs/tailscale/Cargo.toml+++ b/deps/tailscale-rs/tailscale/Cargo.toml@@ -8,6 +8,9 @@# If you are reading this file be aware that the original Cargo.toml# will likely look very different (and much more reasonable).# See Cargo.toml.orig for the original contents.+#+# ThinkTerm (build): the [[example]], [[test]] and [profile.bench] sections are+# removed: the vendored copy carries no examples or tests.[package]edition = "2024"diff --git a/deps/tailscale-rs/tailscale/src/lib.rs b/deps/tailscale-rs/tailscale/src/lib.rsindex 7b5b6aaa..baee2f80 100644--- a/deps/tailscale-rs/tailscale/src/lib.rs+++ b/deps/tailscale-rs/tailscale/src/lib.rs@@ -231,6 +231,7 @@ impl Device {})}+ // ThinkTerm (sign-in state): the next three methods are ours./// The current authorization state, or None while contacting control./// This does not queue a request waiting for registration to finish.pub async fn current_auth_state(&self) -> Result<Option<AuthState>, Error> {@@ -343,6 +344,7 @@ impl Device {.map_err(Into::into)}+ // ThinkTerm (peer list): added./// Every peer in the tailnet as of the latest update from control, or None before the first/// netmap.pub async fn peers(&self) -> Result<Option<Vec<NodeInfo>>, Error> {@@ -362,6 +364,7 @@ impl Device {.map_err(Into::into)}+ // ThinkTerm (shutdown): added./// [`Device::shutdown`] for a device still shared: stops its runtime gracefully within/// `timeout`, else violently, and reports which.pub async fn stop(&self, timeout: Duration) -> bool {diff --git a/deps/tailscale-rs/ts_control/src/lib.rs b/deps/tailscale-rs/ts_control/src/lib.rsindex 57789b6f..be8617ed 100644--- a/deps/tailscale-rs/ts_control/src/lib.rs+++ b/deps/tailscale-rs/ts_control/src/lib.rs@@ -1,4 +1,5 @@//! Client for the Tailscale control plane.+// ThinkTerm (build): was `#![doc = include_str!("../README.md")]`; the README is not vendored.extern crate alloc;@@ -28,6 +29,7 @@ pub use control_dialer::{ControlDialer, TcpDialer, complete_connection};pub use derp::{Map as DerpMap, Region as DerpRegion, convert_derp_map};pub use dial_plan::{DialCandidate, DialMode, DialPlan};pub use map_request_builder::MapRequestBuilder;+// ThinkTerm (device info): `DeviceInfo` is ours.pub use node::{DeviceInfo, Id as NodeId, Node, NodeLastSeen, NodeStatus, NodeUpdate, StableId as StableNodeId,TailnetAddress,diff --git a/deps/tailscale-rs/ts_control/src/node.rs b/deps/tailscale-rs/ts_control/src/node.rsindex 4d6d7b65..f85fd4be 100644--- a/deps/tailscale-rs/ts_control/src/node.rs+++ b/deps/tailscale-rs/ts_control/src/node.rs@@ -191,10 +191,12 @@ pub struct Node {/// The DERP region for this node, if known.pub derp_region: Option<ts_derp::RegionId>,+ // ThinkTerm (device info): added./// What the node reports about the device it runs on.pub device: DeviceInfo,}+// ThinkTerm (device info): added./// What a node reports about the device it runs on, from its Hostinfo. A field/// the node leaves out is empty.#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]@@ -391,6 +393,7 @@ impl From<&ts_control_serde::Node<'_>> for Node {.or_else(|| value.host_info.net_info.as_ref()?.preferred_derp).map(|x| ts_derp::RegionId(x.into())),+ // ThinkTerm (device info): added.device: DeviceInfo {os: value.host_info.os.to_owned(),distro: value.host_info.distro.to_owned(),@@ -469,3 +472,39 @@ impl From<&ts_control_serde::PeerChange<'_>> for NodeUpdate {}}}++// ThinkTerm (device info): the tests are ours.+#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn a_node_keeps_what_it_says_about_its_device() {+ let phone = ts_control_serde::Node {+ name: "phone.example.ts.net.",+ host_info: ts_control_serde::HostInfo {+ os: "iOS",+ device_model: "iPhone15,2",+ ..Default::default()+ },+ ..Default::default()+ };+ assert_eq!(+ Node::from(&phone).device,+ DeviceInfo {+ os: "iOS".into(),+ distro: String::new(),+ device_model: "iPhone15,2".into(),+ }+ );+ let server = ts_control_serde::Node {+ host_info: ts_control_serde::HostInfo {+ os: "linux",+ distro: "debian",+ ..Default::default()+ },+ ..Default::default()+ };+ assert_eq!(Node::from(&server).device.distro, "debian");+ }+}diff --git a/deps/tailscale-rs/ts_netstack_smoltcp_core/Cargo.toml b/deps/tailscale-rs/ts_netstack_smoltcp_core/Cargo.tomlindex a6c9db61..f92c9b81 100644--- a/deps/tailscale-rs/ts_netstack_smoltcp_core/Cargo.toml+++ b/deps/tailscale-rs/ts_netstack_smoltcp_core/Cargo.toml@@ -8,6 +8,10 @@# If you are reading this file be aware that the original Cargo.toml# will likely look very different (and much more reasonable).# See Cargo.toml.orig for the original contents.+#+# ThinkTerm (build): the [dev-dependencies] are removed: they serve upstream's tests/,+# which the vendored copy does not carry, and cargo will not test a crate outside the+# workspace that has any.[package]edition = "2024"@@ -80,29 +84,6 @@ version = "0.1"features = ["attributes"]default-features = false-[dev-dependencies.smoltcp]-version = "0.13"-features = [- "alloc",- "proto-ipv6",- "proto-ipv6-fragmentation",- "proto-ipv4",- "proto-ipv4-fragmentation",- "medium-ip",- "socket-tcp",- "socket-udp",- "socket-icmp",- "socket-raw",- "iface-max-addr-count-4",- "log",- "verbose",-]-default-features = false--[dev-dependencies.tracing-panic]-version = "0.1"-features = ["capture-backtrace"]-[lints.clippy]multiple_crate_versions = "allow"too_many_arguments = "allow"diff --git a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/lib.rs b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/lib.rsindex bc7f78e9..eb009fd9 100644--- a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/lib.rs+++ b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/lib.rs@@ -1,4 +1,5 @@//! Command-channel-based userspace netstack built on smoltcp (core functionality).+// ThinkTerm (build): was `#![doc = include_str!("../README.md")]`; the README is not vendored.#![no_std]extern crate alloc;diff --git a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/listener.rs b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/listener.rsindex 1b00b261..ffb60bfb 100644--- a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/listener.rs+++ b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/listener.rs@@ -62,7 +62,7 @@ impl Netstack {match cmd {TcpListenCommand::Listen { local_endpoint } => {let mut listener = tcp::Socket::new(self.tcp_buffer(), self.tcp_buffer());- super::notice_lost_peers(&mut listener);+ super::notice_lost_peers(&mut listener); // ThinkTerm (lost peers)if let Err(e) = listener.listen(local_endpoint) {return Response::Error(e.into());@@ -282,7 +282,7 @@ impl Netstack {tcp::SocketBuffer::new(vec![0; self.config.tcp_buffer_size]),tcp::SocketBuffer::new(vec![0; self.config.tcp_buffer_size]),);- super::notice_lost_peers(&mut new_listener);+ super::notice_lost_peers(&mut new_listener); // ThinkTerm (lost peers)if let Err(e) = new_listener.listen(listener.local_endpoint) {// invariant failure: the only variants for ListenError arediff --git a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/mod.rs b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/mod.rsindex d49341a3..0437eb30 100644--- a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/mod.rs+++ b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/mod.rs@@ -15,15 +15,72 @@ impl Netstack {}}-/// ThinkTerm: how long a connection may go without a packet from its peer -- an answer to what-/// it sent, or to a keep-alive -- before it is aborted, and how long it may sit idle before a-/// keep-alive asks. Without them a peer that goes away without a word, a laptop put to sleep,-/// leaves the connection retrying forever, and a connect nobody waits for any more lingers too.+// ThinkTerm (lost peers): everything from here down is ours.++/// How long a connection may go without a packet from its peer -- an answer to what it sent, or+/// to a keep-alive -- before it is aborted, and how long it may sit idle before a keep-alive+/// asks. Without them a peer that goes away without a word, a laptop put to sleep, leaves the+/// connection retrying forever, and a connect nobody waits for any more lingers too.const PEER_TIMEOUT: smoltcp::time::Duration = smoltcp::time::Duration::from_secs(600);const KEEP_ALIVE: smoltcp::time::Duration = smoltcp::time::Duration::from_secs(120);-/// ThinkTerm: has `socket` notice a peer that went away, as the system's own TCP would.+/// Has `socket` notice a peer that went away, as the system's own TCP would.fn notice_lost_peers(socket: &mut tcp::Socket) {socket.set_timeout(Some(PEER_TIMEOUT));socket.set_keep_alive(Some(KEEP_ALIVE));}++#[cfg(test)]+mod tests {+ use alloc::vec::Vec;+ use core::net::SocketAddr;++ use smoltcp::{socket::Socket, time::Duration, time::Instant};++ use super::{KEEP_ALIVE, PEER_TIMEOUT};+ use crate::{+ Config, Netstack,+ command::tcp::{listen::Command as TcpListenCommand, stream::Command as TcpStreamCommand},+ };++ /// The timeout and keep-alive of every TCP socket the netstack holds.+ fn liveness(netstack: &Netstack) -> Vec<(Option<Duration>, Option<Duration>)> {+ netstack+ .socket_set+ .iter()+ .filter_map(|(_, socket)| match socket {+ Socket::Tcp(socket) => Some((socket.timeout(), socket.keep_alive())),+ _ => None,+ })+ .collect()+ }++ fn addr(addr: &str) -> SocketAddr {+ addr.parse().unwrap()+ }++ #[test]+ fn a_connection_notices_a_peer_that_went_away() {+ let mut netstack = Netstack::new(Config::default(), Instant::ZERO);+ netstack.process_tcp_stream(+ TcpStreamCommand::Connect {+ local_endpoint: addr("192.0.2.1:40000"),+ remote_endpoint: addr("198.51.100.7:22"),+ },+ None,+ );+ assert_eq!(liveness(&netstack), [(Some(PEER_TIMEOUT), Some(KEEP_ALIVE))]);+ }++ #[test]+ fn a_listener_notices_a_peer_that_went_away() {+ let mut netstack = Netstack::new(Config::default(), Instant::ZERO);+ netstack.process_tcp_listen(+ TcpListenCommand::Listen {+ local_endpoint: addr("192.0.2.1:22"),+ },+ None,+ );+ assert_eq!(liveness(&netstack), [(Some(PEER_TIMEOUT), Some(KEEP_ALIVE))]);+ }+}diff --git a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/stream.rs b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/stream.rsindex 0722568a..baed5c08 100644--- a/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/stream.rs+++ b/deps/tailscale-rs/ts_netstack_smoltcp_core/src/socket_impl/tcp/stream.rs@@ -38,7 +38,7 @@ impl Netstack {}let mut sock = tcp::Socket::new(self.tcp_buffer(), self.tcp_buffer());- super::notice_lost_peers(&mut sock);+ super::notice_lost_peers(&mut sock); // ThinkTerm (lost peers)if let Err(e) = sock.connect(self.iface.context(), remote_endpoint, local_endpoint){diff --git a/deps/tailscale-rs/ts_runtime/Cargo.toml b/deps/tailscale-rs/ts_runtime/Cargo.tomlindex f7d12917..5349c6dd 100644--- a/deps/tailscale-rs/ts_runtime/Cargo.toml+++ b/deps/tailscale-rs/ts_runtime/Cargo.toml@@ -86,6 +86,7 @@ version = "1"features = ["rt-multi-thread","macros",+ # ThinkTerm (no panic): env.rs waits between retries."time",]default-features = falsediff --git a/deps/tailscale-rs/ts_runtime/src/control_runner.rs b/deps/tailscale-rs/ts_runtime/src/control_runner.rsindex 41676edd..d646318d 100644--- a/deps/tailscale-rs/ts_runtime/src/control_runner.rs+++ b/deps/tailscale-rs/ts_runtime/src/control_runner.rs@@ -42,6 +42,7 @@ enum RegState {},AuthRequired(url::Url),Registered(HttpConn),+ // ThinkTerm (sign-in state): added./// Control turned the device away, for the reason given. The runner does not try again;/// it stays to say why (see `current_registration_error`) rather than stopping, which would/// leave every question to it unanswered and the reason only in the log.@@ -228,6 +229,7 @@ impl ControlRunner {deleg}+ // ThinkTerm (sign-in state): the next three messages are ours./// The node from the latest netmap, without waiting for one to arrive.#[message]pub fn current_self_node(&mut self) -> Option<Node> {@@ -274,6 +276,7 @@ impl ControlRunner {deleg}+ // ThinkTerm (sign-in state): added.// Turned away: no answer will come, and the request goes with its reply.RegState::Failed(..) => ctx.reply_sender().0,}@@ -386,6 +389,7 @@ impl Message<RegisterResult> for ControlRunner {Ok(conn) => conn,Err(e) => {tracing::error!(error = %e, "unable to register with control server");+ // ThinkTerm (sign-in state): was `ctx.stop()`.// Pending auth requests go unanswered with it.self.state = RegState::Failed(registration_failure(&e));return;@@ -418,6 +422,7 @@ impl Message<RegisterResult> for ControlRunner {}}+// ThinkTerm (sign-in state): added./// What a failed registration says to whoever looks at the device.fn registration_failure(err: &RegistrationError) -> String {match err {@@ -569,3 +574,19 @@ impl DialerActor {self.dialer.update_dial_plan(&dial_plan)}}++// ThinkTerm (sign-in state): the tests are ours.+#[cfg(test)]+mod tests {+ use ts_control::RegistrationError;++ use super::registration_failure;++ #[test]+ fn a_sign_in_turned_away_says_why() {+ let refused = registration_failure(&RegistrationError::MachineNotAuthorized(None));+ assert!(refused.contains("auth key"), "{refused}");+ let unreachable = registration_failure(&RegistrationError::NetworkError);+ assert!(unreachable.contains("could not be reached"), "{unreachable}");+ }+}diff --git a/deps/tailscale-rs/ts_runtime/src/env.rs b/deps/tailscale-rs/ts_runtime/src/env.rsindex 5f53152d..906f2b0d 100644--- a/deps/tailscale-rs/ts_runtime/src/env.rs+++ b/deps/tailscale-rs/ts_runtime/src/env.rs@@ -20,6 +20,7 @@ use crate::{retained_bus::RetainedBus,};+// ThinkTerm (no panic): added./// How long `Env::ask` waits before its first retry at an actor that is not running, and the/// longest it waits between two.const ASK_RETRY_FIRST: Duration = Duration::from_millis(10);@@ -179,15 +180,17 @@ impl Env {// but we throw away the result and just retry the forward for the previously discussed// reasons.//- // ThinkTerm: an actor that stopped for good keeps its name in the registry, so the lookup- // answers at once and the forward fails again; each retry waits a little longer, up to a- // second, rather than spin.+ // ThinkTerm (no panic): an actor that stopped for good keeps its name in the registry, so+ // the lookup answers at once and the forward fails again; each retry waits a little+ // longer, up to a second, rather than spin.let mut pause = ASK_RETRY_FIRST;loop {let result = self.registry.ask(mk_forward(msg)).await;match result {Ok(x) => return Ok(x),+ // ThinkTerm (no panic): the registry answers with the actor's send error as its own+ // handler error.Err(SendError::HandlerError(SendError::ActorNotRunning(m))) if wait => {msg = m;}@@ -225,6 +228,7 @@ impl Env {.with_actor_info(&self.registry)}+ // ThinkTerm (no panic): rewritten./// Forward a message to an actor through the registry.////// The reply comes from a task that asks on the caller's behalf, not from kameo's@@ -275,9 +279,11 @@ impl Env {}}+// ThinkTerm (no panic): was a `ForwardedReply`.pub type RegForwarded<A, M> =DelegatedReply<Result<<<A as Message<M>>::Reply as Reply>::Ok, Error>>;+// ThinkTerm (no panic): the tests are ours.#[cfg(test)]mod tests {use kameo::{actor::Spawn, error::Infallible, mailbox};diff --git a/deps/tailscale-rs/ts_runtime/src/lib.rs b/deps/tailscale-rs/ts_runtime/src/lib.rsindex ca6f97c8..1f60bd49 100644--- a/deps/tailscale-rs/ts_runtime/src/lib.rs+++ b/deps/tailscale-rs/ts_runtime/src/lib.rs@@ -1,4 +1,5 @@//! Tailscale runtime.+// ThinkTerm (build): was `#![doc = include_str!("../README.md")]`; the README is not vendored.extern crate ts_netstack_smoltcp as netstack;@@ -165,6 +166,7 @@ macro_rules! forward {msg: $msg,ctx: &mut Context<Self, Self::Reply>,) -> RegForwarded<$actor, $msg> {+ // ThinkTerm (no panic): no longer async.self.env.forward::<$actor, $msg>(ctx, None, msg)}}@@ -179,6 +181,7 @@ forward!(control_runner::Ipv6,control_runner::SelfNode,control_runner::AuthUrl,+ // ThinkTerm (sign-in state): the next three.control_runner::CurrentSelfNode,control_runner::CurrentAuthUrl,control_runner::CurrentRegistrationError,@@ -188,5 +191,6 @@ forward!(peer_tracker::PeerByName,peer_tracker::PeerByTailnetIp,peer_tracker::PeerByAcceptedRoute,+ // ThinkTerm (peer list): added.peer_tracker::AllPeers);diff --git a/deps/tailscale-rs/ts_runtime/src/peer_tracker/mod.rs b/deps/tailscale-rs/ts_runtime/src/peer_tracker/mod.rsindex 2af1624b..be5bf649 100644--- a/deps/tailscale-rs/ts_runtime/src/peer_tracker/mod.rs+++ b/deps/tailscale-rs/ts_runtime/src/peer_tracker/mod.rs@@ -163,6 +163,7 @@ mod msg_impl {deleg}+ // ThinkTerm (peer list): added./// Every peer we know of, or None before the first netmap. Unlike the lookups, this/// doesn't wait for one.#[message]@@ -193,6 +194,7 @@ impl Message<Arc<ts_control::StateUpdate>> for PeerTracker {_ctx: &mut Context<Self, Self::Reply>,) {let Some(peer_update) = &msg.peer_update else {+ // ThinkTerm (peer list): added.// A whole netmap leaves the peers out when there are none: the tailnet is known to// have none from it. Only a whole one, with the DERP map every first netmap carries:// a tracker restarted mid-stream would take a later update of the node alone fordiff --git a/deps/tailscale-rs/ts_runtime/src/peer_tracker/peer_db.rs b/deps/tailscale-rs/ts_runtime/src/peer_tracker/peer_db.rsindex 6de8db4b..6544837c 100644--- a/deps/tailscale-rs/ts_runtime/src/peer_tracker/peer_db.rs+++ b/deps/tailscale-rs/ts_runtime/src/peer_tracker/peer_db.rs@@ -453,7 +453,9 @@ impl IndexedField for IpAddr {}}-#[cfg(test)]+// ThinkTerm (build): was `#[cfg(test)]`. Upstream's property tests need proptest, which this+// copy's dependencies leave out; switched off so that `cargo test -p ts_runtime` builds.+#[cfg(any())]mod test {use std::{collections::{BTreeMap, HashMap, HashSet},@@ -539,7 +541,7 @@ mod test {.map(|_| rand_string(&mut rng, 32)).collect(),node_capabilities: Default::default(),- device: Default::default(),+ device: Default::default(), // ThinkTerm (device info)}}@@ -852,7 +854,7 @@ mod test {accepted_routes: accepted_routes.into_iter().collect(),underlay_addresses: underlay_addrs.into_iter().collect(),- device: Default::default(),+ device: Default::default(), // ThinkTerm (device info)}}).collect()diff --git a/deps/tailscale-rs/ts_runtime/src/registry.rs b/deps/tailscale-rs/ts_runtime/src/registry.rsindex 1ec86671..11853508 100644--- a/deps/tailscale-rs/ts_runtime/src/registry.rs+++ b/deps/tailscale-rs/ts_runtime/src/registry.rs@@ -319,6 +319,7 @@ where}}+// ThinkTerm (no panic): replaces the `RegistryForward` wrapper./// The reply to a [`Forward`] that was asked: the actor's own reply, or why the message didn't/// reach it.pub type Forwarded<A, M> = Result<@@ -331,6 +332,8 @@ whereA: Message<M>,M: Send + 'static,{+ // ThinkTerm (no panic): was `RegistryForward<M, A::Reply>`; the handler replies through+ // `ctx` instead.type Reply = DelegatedReply<Forwarded<A, M>>;#[tracing::instrument(skip_all, fields(msgty = type_name::<M>(), actor = type_name::<A>(), name = %msg.id.name@@ -350,9 +353,9 @@ wherereturn ctx.reply(Err(SendError::ActorNotRunning(msg.message)));};- // Not `ctx.try_forward`: in kameo 0.21 it panics when the actor's mailbox is full or- // closed, as it takes the message back out as a (message, reply sender) pair. Asking from- // a task gets the same reply, and an error in those cases.+ // ThinkTerm (no panic): not `ctx.try_forward`, which in kameo 0.21 panics when the+ // actor's mailbox is full or closed, as it takes the message back out as a (message,+ // reply sender) pair. Asking from a task gets the same reply, and an error in those cases.let (deleg, reply) = ctx.reply_sender();match reply {Some(reply) => {